1current_notification_number = 0; 2current_notification_number = 0; 3current_messages_number = 0; 4current_follow_requests_number = 0; 5var preLoadedVideo = null; 6var preLoadedVideo_id = null; 7var preLoadedPreviousVideo = null; 8var preLoadedPreviousVideo_id = null; 9current_width = $(window).width(); 10document_title = document.title; 11 12document.querySelectorAll('.auto-resize').forEach(el => { 13 el.style.height = el.setAttribute('style', 'height: ' + el.scrollHeight + 'px'); 14 el.classList.add('auto'); 15 el.addEventListener('input', e => { 16 el.style.height = 'auto'; 17 el.style.height = (el.scrollHeight) + 'px'; 18 }); 19}); 20 21// Static Dropdown 22$(document).on('click', '.dropdown-static-menu', function (e) { 23 e.stopPropagation(); 24}); 25 26$(document).on('click', '.filterby li.filter-by-li a', function(event) { 27 $('.filterby li.filter-by-li').each(function(){ 28 $(this).removeClass('active'); 29 }); 30 $(this).parent().addClass('active'); 31}); 32 33$(function () { 34 35 $(window).on("dragover",function(e){ 36 e.preventDefault(); 37 },false); 38 39 $(window).on("drop",function(e){ 40 e.preventDefault(); 41 },false); 42 43 //$('.postText').autogrow({vertical: true, horizontal: false, height: 200}); 44 $('#movies-comment').autogrow({vertical: true, horizontal: false, height: 200}); 45 $('#blog-comment').autogrow({vertical: true, horizontal: false, height: 200}); 46 var api = $('#api').val(); 47 var hash = $('.main_session').val(); 48 setTimeout(function (argument) { 49 $.ajaxSetup({ 50 data: { 51 hash: hash 52 }, 53 cache: false 54 }); 55 },100) 56 $(document).on("click",".mfp-arrow",function(event) { 57 Wo_StoryProgress(); 58 }); 59 $(document).on('click', '.messages-recipients-list', function(event) { 60 scrollToTop(); 61 }); 62 $('[data-toggle="tooltip"]').tooltip(); 63 // open last active tab 64 var url = document.location.toString(); 65 if(url.match('#')) { 66 var val_hash = url.split('#')[1]; 67 $('.nav-tabs a[href="#' + val_hash + '"]').tab('show'); 68 } 69 $('.nav-tabs a').on('shown.bs.tab', function (e) { 70 //window.location.hash = e.target.hash; 71 $('body').scrollTop(0); 72 }); 73 74 intervalUpdates = setTimeout(Wo_intervalUpdates, 6000); 75 if (node_socket_flow == "0") { 76 //setTimeout(Wo_UpdateLastSeen, 40000); 77 setTimeout(Wo_IsLogged, 30000); 78 } 79 80 scrolled = 0; 81 if(current_width > 90 || api) { 82 $(window).scroll(function () { 83 var nearToBottom = 500; 84 if($('#posts').length > 0) { 85 if ($(window).scrollTop() + $(window).height() > $(document).height() - nearToBottom) { 86 if (scrolled == 0) { 87 scrolled = 1; 88 Wo_GetMorePosts(); 89 } 90 } 91 } 92 }); 93 } 94}); 95 96 97function Wo_CloseModels() { 98 $('.modal').modal('hide'); 99} 100// update user last seen 101function Wo_UpdateLastSeen() { 102 $.get(Wo_Ajax_Requests_File(), { 103 f: 'update_lastseen' 104 }, function () { 105 setTimeout(Wo_UpdateLastSeen, 40000); 106 }); 107} 108// js function 109function Wo_CheckUsername(username) { 110 var check_container = $('.checking'); 111 var check_input = $('#username').val(); 112 if(check_input == '') { 113 check_container.empty(); 114 return false; 115 } 116 check_container.removeClass('unavailable').removeClass('available').html('<span id="loading"> Checking <span>.</span><span>.</span><span>.</span></span>'); 117 $.get(Wo_Ajax_Requests_File(), { 118 f: 'check_username', 119 username: username 120 }, function (data) { 121 if(data.status == 200) { 122 check_container.html('<i class="fa fa-check"></i> ' + data.message).removeClass('unavailable').addClass('available'); 123 } else if(data.status == 300) { 124 check_container.html('<i class="fa fa-remove"></i> ' + data.message).removeClass('available').addClass('unavailable'); 125 } else if(data.status == 400) { 126 check_container.html('<i class="fa fa-remove"></i> ' + data.message).removeClass('available').addClass('unavailable'); 127 } else if(data.status == 500) { 128 check_container.html('<i class="fa fa-remove"></i> ' + data.message).removeClass('available').addClass('unavailable'); 129 } else if(data.status == 600) { 130 check_container.html('<i class="fa fa-remove"></i> ' + data.message).removeClass('available').addClass('unavailable'); 131 } 132 }); 133} 134 135function Wo_CheckPagename(pagename, page_id) { 136 var check_container = $('.checking'); 137 var check_input = $('#page_name').val(); 138 if(check_input == '') { 139 check_container.empty(); 140 return false;
141 } 142 check_container.removeClass('unavailable').removeClass('available').html('<i class="fa fa-clock-o"></i><span id="loading"> Checking <span>.</span><span>.</span><span>.</span></span>'); 143 $.get(Wo_Ajax_Requests_File(), { 144 f: 'check_pagename', 145 pagename: pagename, 146 page_id: page_id 147 }, function (data) { 148 if(data.status == 200) { 149 check_container.html('<i class="fa fa-check"></i> ' + data.message).removeClass('unavailable').addClass('available'); 150 } else if(data.status == 300) { 151 check_container.html('<i class="fa fa-remove"></i> ' + data.message).removeClass('available').addClass('unavailable'); 152 } else if(data.status == 400) { 153 check_container.html('<i class="fa fa-remove"></i> ' + data.message).removeClass('available').addClass('unavailable'); 154 } else if(data.status == 500) { 155 check_container.html('<i class="fa fa-remove"></i> ' + data.message).removeClass('available').addClass('unavailable'); 156 } else if(data.status == 600) { 157 check_container.html('<i class="fa fa-remove"></i> ' + data.message).removeClass('available').addClass('unavailable'); 158 } 159 }); 160} 161 162function Wo_CheckGroupname(groupname, group_id) { 163 var check_container = $('.checking'); 164 var check_input = $('#group_name').val(); 165 if(check_input == '') { 166 check_container.empty(); 167 return false; 168 } 169 check_container.removeClass('unavailable').removeClass('available').html('<i class="fa fa-clock-o"></i><span id="loading"> Checking <span>.</span><span>.</span><span>.</span></span>'); 170 $.get(Wo_Ajax_Requests_File(), { 171 f: 'check_groupname', 172 groupname: groupname, 173 group_id:group_id 174 }, function (data) { 175 if(data.status == 200) { 176 check_container.html('<i class="fa fa-check"></i> ' + data.message).removeClass('unavailable').addClass('available'); 177 } else if(data.status == 300) { 178 check_container.html('<i class="fa fa-remove"></i> ' + data.message).removeClass('available').addClass('unavailable'); 179 } else if(data.status == 400) { 180 check_container.html('<i class="fa fa-remove"></i> ' + data.message).removeClass('available').addClass('unavailable'); 181 } else if(data.status == 500) { 182 check_container.html('<i class="fa fa-remove"></i> ' + data.message).removeClass('available').addClass('unavailable'); 183 } else if(data.status == 600) { 184 check_container.html('<i class="fa fa-remove"></i> ' + data.message).removeClass('available').addClass('unavailable'); 185 } 186 }); 187} 188 189// scroll to top function 190function scrollToTop() { 191 verticalOffset = typeof (verticalOffset) != 'undefined' ? verticalOffset : 0; 192 element = $('html'); 193 offset = element.offset(); 194 offsetTop = offset.top; 195 $('html, body').animate({ 196 scrollTop: offsetTop 197 }, 300, 'linear'); 198} 199 200// check if user is logged in function 201function Wo_IsLogged() { 202 $.post(Wo_Ajax_Requests_File() + '?f=session_status', function (data) { 203 setTimeout(Wo_UpdateLastSeen, 30000); 204 if(data.status == 200) { 205 $('#logged-out-modal').modal({ 206 show: true 207 }); 208 } 209 }); 210} 211 212// side bar users 213function Wo_ReloadSideBarUsers() { 214 $('.sidebar-users-may-know-container').html('<div class="wow_side_usrs"><div class="tag_sidebar_users"><a class="avatar"><div class="skel"></div></a><div class="skel skel_2 skel_noti_name"></div><div class="clear"></div></div></div><div class="wow_side_usrs"><div class="tag_sidebar_users"><a class="avatar"><div class="skel"></div></a><div class="skel skel_2 skel_noti_name"></div><div class="clear"></div></div></div><div class="wow_side_usrs"><div class="tag_sidebar_users"><a class="avatar"><div class="skel"></div></a><div class="skel skel_2 skel_noti_name"></div><div class="clear"></div></div></div><div class="wow_side_usrs"><div class="tag_sidebar_users"><a class="avatar"><div class="skel"></div></a><div class="skel skel_2 skel_noti_name"></div><div class="clear"></div></div></div>'); 215 $.get(Wo_Ajax_Requests_File(), { 216 f: 'update_sidebar_users' 217 }, function (data) { 218 if(data.status == 200) { 219 $('.sidebar-users-may-know-container').html(data.html); 220 } 221 }); 222} 223 224function Wo_ReloadSideBarServices() { 225 Wo_progressIconLoader($('#sidebar-user-service-container').find('.refresh')); 226 $.get(Wo_Ajax_Requests_File(), { 227 f: 'update_sidebar_services' 228 }, function (data) { 229 if(data.status == 200) { 230 $('.sidebar-users-may-service-container').html(data.html); 231 } 232 Wo_progressIconLoader($('#sidebar-user-service-container').find('.refresh')); 233 }); 234} 235 236function Wo_ReloadSideBarGroups() { 237 $.get(Wo_Ajax_Requests_File(), { 238 f: 'update_sidebar_groups' 239 }, function (data) { 240 if(data.status == 200) { 241 $('.sidebar-group-may-know-container').html(data.html); 242 } 243 }); 244} 245 246// side bar pages 247function Wo_ReloadSideBarPages() { 248 var page_id = $('.sidebar-pages-may-know-container').find('.sidebar-page-data').attr('data-page-id'); 249 if (page_id == 'undefined') { 250 page_id = ''; 251 } 252 $.get(Wo_Ajax_Requests_File(), { 253 f: 'pages', 254 s: 'get_next_page', 255 page_id: page_id 256 }, function (data) { 257 if(data.status == 200) { 258 if (data.html.length == 0) { 259 $('.sidebar-pages-may-know-container').html('<h2><div class="no-more-pages text-center">No more pages to like</div></h2>'); 260 } else { 261 $('.sidebar-pages-may-know-container').hide().html(data.html).fadeIn(300); 262 } 263 } 264 }); 265} 266 267// get new notifications 268function Wo_OpenNotificationsMenu() { 269 notification_container = $('.notification-container'); 270 notification_list = $('#notification-list'); 271 notification_container.find('.new-update-alert').addClass('hidden').text('0'); 272 $.get(Wo_Ajax_Requests_File(), { 273 f: 'get_notifications' 274 }, function (data) { 275 if(data.status == 200) { 276 if(data.html.length == 0) { 277 notification_list.html('<div class="empty_state"><svg viewBox="0 0 512 512" xmlns="http://www.w3.org/2000/svg"><path d="m416 512h-320c-53.023438 0-96-42.976562-96-96v-320c0-53.023438 42.976562-96 96-96h320c53.023438 0 96 42.976562 96 96v320c0 53.023438-42.976562 96-96 96zm0 0" fill="#e3f8fa"/><path d="m245.328125 384c19.3125 0 35.472656-13.761719 39.183594-32h-78.382813c3.726563 18.238281 19.886719 32 39.199219 32zm0 0" fill="#8ce1eb"/><path d="m320.128906 256c-.050781 0-.082031 0-.128906 0-41.167969 0-74.671875-33.488281-74.671875-74.671875 0-11.3125 2.609375-22.015625 7.136719-31.648437-2.351563-.222657-4.722656-.367188-7.136719-.367188-41.230469 0-74.671875 33.421875-74.671875 74.671875v29.742187c0 21.105469-9.25 41.027344-25.472656 54.753907-5.40625 4.625-7.808594 11.984375-5.871094 19.152343 2.289062 8.367188 10.527344 13.695313 19.199219 13.695313h173.601562c9.085938 0 17.664063-5.886719
27719.503907-14.785156 1.421874-6.878907-1.023438-13.773438-6.371094-18.253907-15.519532-13.023437-24.476563-32.128906-25.117188-52.289062zm0 0" fill="#26c6da"/><path d="m373.328125 181.328125c0 29.453125-23.875 53.328125-53.328125 53.328125s-53.328125-23.875-53.328125-53.328125 23.875-53.328125 53.328125-53.328125 53.328125 23.875 53.328125 53.328125zm0 0" fill="#8ce1eb"/></svg>' + data.message + '</div>'); 278 } else { 279 document.getElementById('notification-list').innerHTML = data.html; 280 Wo_intervalUpdates(); 281 } 282 } 283 }); 284} 285function Wo_OpenMessagesMenu() { 286 messages_container = $('.messages-notification-container'); 287 messages_list = $('#messages-list'); 288 $.get(Wo_Ajax_Requests_File(), { 289 f: 'get_messages' 290 }, function (data) { 291 if(data.status == 200) { 292 if(data.html.length == 0) { 293 messages_list.html('<div class="empty_state"><svg enable-background="new 0 0 32 32" viewBox="0 0 32 32" xmlns="http://www.w3.org/2000/svg"><path d="m26 32h-20c-3.314 0-6-2.686-6-6v-20c0-3.314 2.686-6 6-6h20c3.314 0 6 2.686 6 6v20c0 3.314-2.686 6-6 6z" fill="#ffe6e2"/><g fill="#fc573b"><circle cx="20.333" cy="17.667" r="2"/><path d="m22.167 20.667h-3.667c-1.011 0-1.833.822-1.833 1.833v1c0 .276.224.5.5.5h6.333c.276 0 .5-.224.5-.5v-1c0-1.011-.822-1.833-1.833-1.833z"/><circle cx="10.667" cy="19.333" r="1.333"/><path d="m11.5 21.333h-1.667c-1.011 0-1.833.823-1.833 1.834v.333c0 .276.224.5.5.5h4.333c.276 0 .5-.224.5-.5v-.333c0-1.011-.822-1.834-1.833-1.834z"/></g><path d="m16.167 8h-6.334c-1.011 0-1.833.822-1.833 1.833v5c0 1.011.822 1.833 1.833 1.833h3.305l2.023 1.868c.094.087.216.132.339.132.068 0 .136-.014.201-.042.181-.079.299-.259.299-.457v-1.5h.167c1.011 0 1.833-.822 1.833-1.833v-5c0-1.012-.822-1.834-1.833-1.834zm-3.167 7c-.276 0-.5-.224-.5-.5s.224-.5.5-.5.5.224.5.5-.224.5-.5.5zm.5-2.167c0 .276-.224.5-.5.5s-.5-.224-.5-.5v-2.333c0-.276.224-.5.5-.5s.5.224.5.5z" fill="#fd907e"/></svg>' + data.message + '</div>'); 294 } else { 295 //messages_list.html(data.html); 296 document.getElementById('messages-list').innerHTML = data.html; 297 messages_list.append('<a href="' + data.messages_url + '" class="show-message-link" target="_blank">' + data.messages_text + '</a>'); 298 //Wo_intervalUpdates(); 299 } 300 } 301 }); 302} 303// get new friend requests 304function Wo_OpenRequestsMenu() { 305 requests_container = $('.requests-container'); 306 requests_List = $('#requests-list'); 307 $.get(Wo_Ajax_Requests_File(), { 308 f: 'get_follow_requests' 309 }, function (data) { 310 if(data.status == 200) { 311 requests_container.find('.new-update-alert').addClass('hidden'); 312 requests_container.find('.new-update-alert').addClass('hidden').text('0').hide(); 313 if(data.html.length == 0) { 314 requests_List.html('<div class="empty_state"><svg enable-background="new 0 0 32 32" viewBox="0 0 32 32" xmlns="http://www.w3.org/2000/svg"><path d="m26 32h-20c-3.314 0-6-2.686-6-6v-20c0-3.314 2.686-6 6-6h20c3.314 0 6 2.686 6 6v20c0 3.314-2.686 6-6 6z" fill="#f5e6fe"/><g fill="#be63f9"><path d="m10.4 10.733c0-.667 1.011-2.4 2.933-2.4 1.911 0 2.94 1.733 2.94 2.4-.007 0-.02.007-.027.007-1.12.3-1.847-.92-1.873-.973-.118-.192-.368-.213-.52-.073-1.413 1.313-3.3 1.059-3.453 1.039z"/><path d="m14.02 10.427c-1.52 1.193-3.313 1.02-3.68.973-.081 1.215 1.094 2.933 2.993 2.933 1.907 0 3.079-1.73 2.993-2.933-.883.23-1.727-.249-2.306-.973z"/><path d="m15.804 15.667h-5.304c-1.379 0-2.5 1.121-2.5 2.5v2.333c0 .276.224.5.5.5h6.104c-.625-1.893-.144-3.918 1.2-5.333z"/></g><path d="m19.667 15c-2.389 0-4.333 1.944-4.333 4.333s1.944 4.333 4.333 4.333 4.333-1.943 4.333-4.333-1.944-4.333-4.333-4.333zm1.638 5.029c.26.26.26.682 0 .943-.26.26-.682.26-.943 0l-.695-.695-.695.695c-.26.26-.682.26-.943 0-.26-.26-.26-.682 0-.943l.695-.695-.695-.695c-.26-.26-.26-.682 0-.943s.682-.26.943 0l.695.695.695-.695c.26-.26.682-.26.943 0s.26.682 0 .943l-.695.695z" fill="#d9a4fc"/></svg>' + data.message + '</div>'); 315 } else { 316 requests_List.html(data.html); 317 Wo_intervalUpdates(); 318 } 319 } 320 }); 321} 322 323function Wo_CheckForCallAnswerTabs(id) { 324 $.get(Wo_Ajax_Requests_File(), {f:'check_for_answer', id:id}, function (data1) { 325 if (data1.status == 400 || data1.status == 200) { 326 clearTimeout(checkcalls); 327 setTimeout(function () { 328 $( '#re-calling-modal' ).remove(); 329 $( '.modal-backdrop' ).remove(); 330 $( 'body' ).removeClass( "modal-open" ); 331 document.title = document_title; 332 }, 3000); 333 } 334 }); 335 checkcalls = setTimeout(function () { 336 Wo_CheckForCallAnswerTabs(id); 337 }, 2000); 338} 339function Wo_CheckForAudioCallAnswerTabs(id) { 340 $.get(Wo_Ajax_Requests_File(), {f:'check_for_audio_answer', id:id}, function (data1) { 341 if (data1.status == 400 || data1.status == 200) { 342 clearTimeout(checkcalls); 343 setTimeout(function () { 344 $( '#re-calling-modal' ).remove(); 345 $( '.modal-backdrop' ).remove(); 346 $( 'body' ).removeClass( "modal-open" ); 347 document.title = document_title; 348 }, 3000); 349 if (data1.status == 400) { 350 Wo_PlayVideoCall('stop'); 351 Wo_PlayAudioCall('stop'); 352 } 353 } 354 }); 355 checkcalls = setTimeout(function () { 356 Wo_CheckForAudioCallAnswerTabs(id); 357 }, 2000); 358} 359 360// Notifications & follow requests updates 361function Wo_intervalUpdates(force_update = 0, loop = 0) { 362 if (node_socket_flow == "0" || force_update == 1) { 363 var check_posts = true; 364 var hash_posts = true; 365 if ($('.posts-hashtag-count').length == 0) { 366 hash_posts = false;
367 } 368 var api = $('#api').val(); 369 if (api) { 370 return false; 371 } 372 if ($('.posts-count').length == 0 || hash_posts == true) { 373 check_posts = false; 374 } 375 if(typeof ($('#posts').attr('data-story-user')) == "string") { 376 user_id = $('#posts').attr('data-story-user'); 377 } else { 378 user_id = 0; 379 } 380 before_post_id = 0; 381 if($('.post-container').length > 0) { 382 // var before_post_id = $('.post-container > .post:not(.boosted)').attr('data-post-id'); 383 var before_post_id = $('#last_id_post').val(); 384 } 385 var notification_container = $('.notification-container'); 386 var messages_notification_container = $('.messages-notification-container'); 387 var follow_requests_container = $('.requests-container'); 388 var ajax_request = { 389 f: 'update_data', 390 user_id: user_id, 391 before_post_id: before_post_id, 392 check_posts:check_posts, 393 hash_posts:hash_posts 394 }; 395 if (hash_posts == true) { 396 ajax_request['hashtagName'] = $('#hashtagName').val(); 397 } 398 var ids = []; 399 $('.post').each(function() { 400 ids.push($(this).attr('data-post-id')); 401 }); 402 $.post(Wo_Ajax_Requests_File() + '?' + $.param(ajax_request), {ids:ids} , function (data) { 403 if (node_socket_flow == "0" || force_update == 0 || loop == 1) { 404 clearTimeout(intervalUpdates); 405 intervalUpdates = setTimeout(function () { 406 Wo_intervalUpdates(force_update); 407 } , 15000); 408 } 409 if (hash_posts == true) { 410 if (data.count_num > 0) { 411 $('.posts-count').html(data.count); 412 $('.posts-count').attr('data-loader',data.load_posts); 413 414 } 415 } else { 416 if (data.count_num > 0 && $('.filter-by-more').attr('data-filter-by') == 'all') { 417 $('.posts-count').html(data.count); 418 $('.posts-count').attr('data-loader',data.load_posts); 419 420 } 421 } 422 if(typeof (data.notifications) != "undefined" && data.notifications > 0) { 423 notification_container.find('.new-update-alert').removeClass('hidden'); 424 notification_container.find('.sixteen-font-size').addClass('unread-update'); 425 notification_container.find('.new-update-alert').text(data.notifications).show(); 426 if(current_width > 800 && data.pop == 200) { 427 Wo_NotifyMe(data.icon, decodeHtml(data.title), decodeHtml(data.notification_text), data.url); 428 } 429 if(data.notifications != current_notification_number) { 430 if (data.notifications_sound == 0) { 431 document.getElementById('notification-sound').play(); 432 } 433 current_notification_number = data.notifications; 434 } 435 } else { 436 notification_container.find('.new-update-alert').hide(); 437 notification_container.find('.sixteen-font-size').removeClass('unread-update'); 438 current_notification_number = 0; 439 } 440 if(typeof (data.messages) != "undefined" && data.messages > 0) { 441 messages_notification_container.find('.new-update-alert').removeClass('hidden'); 442 messages_notification_container.find('.sixteen-font-size').addClass('unread-update'); 443 messages_notification_container.find('.new-update-alert').text(data.messages).show(); 444 if(data.messages != $("[data_messsages_count]").attr('data_messsages_count')) { 445 if (data.notifications_sound == 0 && $("[data_messsages_count]").attr('data_messsages_count') < data.messages) { 446 document.getElementById('message-sound').play(); 447 } 448 $("[data_messsages_count]").attr('data_messsages_count', data.messages); 449 current_messages_number = data.messages; 450 } 451 } else { 452 messages_notification_container.find('.new-update-alert').hide(); 453 messages_notification_container.find('.sixteen-font-size').removeClass('unread-update'); 454 current_messages_number = 0; 455 } 456 if(typeof (data.followRequests) != "undefined" && data.followRequests > 0) { 457 follow_requests_container.find('.new-update-alert').removeClass('hidden'); 458 follow_requests_container.find('.sixteen-font-size').addClass('unread-update'); 459 follow_requests_container.find('.new-update-alert').text(data.followRequests).show(); 460 if(data.followRequests != current_follow_requests_number) { 461 current_follow_requests_number = data.followRequests; 462 } 463 } else { 464 follow_requests_container.find('.new-update-alert').hide(); 465 follow_requests_container.find('.sixteen-font-size').removeClass('unread-update'); 466 current_follow_requests_number = 0; 467 } 468 469 if(typeof (data.messages) != "undefined" && data.messages > 0 || typeof (data.notifications) != "undefined" && data.notifications > 0 || typeof (data.followRequests) != "undefined" && data.followRequests > 0) { 470 title = Number(data.notifications) + Number(data.messages) + Number(data.followRequests); 471 document.title = '(' + title + ') ' + document_title; 472 } else { 473 document.title = document_title; 474 } 475 if (data.calls == 200 && $('#re-calling-modal').length == 0 && $('#re-talking-modal').length == 0) { 476 if (node_socket_flow != "1") { 477 Wo_CheckForCallAnswerTabs(data.call_id); 478 } 479 if ($('#calling-modal').length == 0) { 480 $('body').append(data.calls_html); 481 if (!$('#re-calling-modal').hasClass('calling')) { 482 $('#re-calling-modal').modal({ 483 show: true 484 }); 485 Wo_PlayVideoCall('play'); 486 $('body').addClass('tag_call_incoming'); 487 } 488 document.title = 'New video call..'; 489 setTimeout(function () { 490 Wo_CloseModels(); 491 $('#re-calling-modal').addClass('calling'); 492 Wo_PlayVideoCall('stop'); 493 document.title = document_title; 494 setTimeout(function () { 495 $( '#re-calling-modal' ).remove(); 496 $( '.modal-backdrop' ).remove(); 497 $( 'body' ).removeClass( "modal-open" ); 498 $('body').removeClass('tag_call_incoming'); 499 }, 3000); 500 $( '#re-calling-modal' ).remove(); 501 $('.modal-backdrop.in').hide(); 502 }, 40000); 503 } 504 } else if (data.audio_calls == 200 && $('#re-calling-modal').length == 0 && $('#re-talking-modal').length == 0) { 505 if (node_socket_flow != "1") { 506 Wo_CheckForAudioCallAnswerTabs(data.call_id); 507 } 508 if ($('#calling-modal').length == 0) { 509 $('body').append(data.audio_calls_html); 510 if (!$('#re-calling-modal').hasClass('calling')) { 511 $('#re-calling-modal').modal({ 512 show: true 513 }); 514 Wo_PlayVideoCall('play'); 515 $('body').addClass('tag_call_incoming'); 516 } 517 document.title = 'New audio call..'; 518 setTimeout(function () { 519 if ($('#re-talking-modal').length == 0) { 520 Wo_CloseModels(); 521 $('#re-calling-modal').addClass('calling'); 522 Wo_PlayVideoCall('stop'); 523 document.title = document_title; 524 setTimeout(function () { 525 $( '#re-calling-modal' ).remove(); 526 $( '.modal-backdrop' ).remove(); 527 $( 'body' ).removeClass( "modal-open" ); 528 $('body').removeClass('tag_call_incoming'); 529 }, 3000) 530 } 531 }, 40000); 532 } 533 } else if (data.is_audio_call == 0 && data.is_call == 0 && ($('#re-calling-modal').length > 0 || $('#re-talking-modal').length > 0)) { 534 Wo_PlayVideoCall('stop'); 535 $( '#re-calling-modal' ).remove(); 536 $( '.modal-backdrop' ).remove(); 537 $( 'body' ).removeClass( "modal-open" ); 538 $('body').removeClass('tag_call_incoming'); 539 } 540 }).fail(function() { 541 clearTimeout(intervalUpdates); 542 if (force_update == 0) { 543 intervalUpdates = setTimeout(function () { 544 Wo_intervalUpdates(force_update); 545 } , 45000); 546 } 547 }); 548 } 549} 550 551function RemoveNotification(obj) { 552 current_notifications = $('.notification-container').find('.new-update-alert').text(); 553 $('.notification-container').find('.new-update-alert').removeClass('hidden'); 554 if (Number(current_notifications) > 0) { 555 if ((Number(current_notifications) - 1) == 0) { 556 $('.notification-container').find('.new-update-alert').addClass('hidden'); 557 $('.notification-container').find('.new-update-alert').addClass('hidden').text('0').hide(); 558 } else { 559 $('.notification-container').find('.sixteen-font-size').addClass('unread-update'); 560 $('.notification-container').find('.new-update-alert').text(Number(current_notifications) - 1).show(); 561 } 562 } else if (Number(current_notifications) == 0) { 563 $('.notification-container').find('.new-update-alert').addClass('hidden'); 564 $('.notification-container').find('.new-update-alert').addClass('hidden').text('0').hide(); 565 } 566 $(obj).fadeOut(1000, function () { 567 $(this).remove(); 568 }); 569} 570 571function Wo_GetLastNotification() { 572 if(current_width > 800) { 573 $.get(Wo_Ajax_Requests_File(), { f: 'get_last_notification', }, function (data) { 574 Wo_NotifyMe(data.icon, decodeHtml(data.title), decodeHtml(data.notification_text), data.url); 575 $('#notification-popup').append(data.html); 576 setTimeout(function () { 577 $('#notification-popup').find("[data-id='" + data.id + "']").fadeOut(2000, function () { 578 $(this).remove(); 579 }); 580 }, 3000) 581 }); 582 } 583} 584 585function Wo_GetNewHashTagPosts() { 586 before_post_id = 0; 587 if($('.post-container').length > 0) { 588 var before_post_id = $('.post-container > .post:not(.boosted)').attr('data-post-id'); 589 } 590 var hashtagName = $('#hashtagName').val(); 591 if (!hashtagName) { 592 return false;
593 } 594 var api = $('#api').val(); 595 var api_ = 0; 596 if (api) { 597 api_ = 1; 598 } 599 $.get(Wo_Ajax_Requests_File(), { 600 f: 'posts', 601 s: 'get_new_hashtag_posts', 602 before_post_id: before_post_id, 603 hashtagName: hashtagName, 604 api: api_ 605 }, function (data) { 606 if(data.length > 0) { 607 $('#posts_hashtag').find('.posts-container').remove(); 608 $('#posts_hashtag').prepend(data); 609 } 610 $('.posts-count').empty(); 611 }); 612} 613// intervel new posts 614function Wo_GetNewPosts() { 615 var filter_by_more = $('#load-more-filter').find('.filter-by-more').attr('data-filter-by'); 616 if(filter_by_more != 'all') { 617 return false; 618 } 619 if(typeof ($('#posts').attr('data-story-user')) == "string") { 620 user_id = $('#posts').attr('data-story-user'); 621 } else { 622 user_id = 0; 623 } 624 var api = $('#api').val(); 625 var api_ = 0; 626 if (api) { 627 api_ = 1; 628 } 629 before_post_id = 0; 630 if($('.post-container').length > 0) { 631 var before_post_id = $('.post-container > .post:not(.boosted)').attr('data-post-id'); 632 } 633 $('body,html').animate({ 634 scrollTop : 0 // Scroll to top of body 635 }, 500); 636 $.get(Wo_Ajax_Requests_File(), { 637 f: 'posts', 638 s: 'get_new_posts', 639 before_post_id: before_post_id, 640 user_id: user_id, 641 load_only : $('.posts-count').attr('data-loader'), 642 api: api_ 643 }, function (data) { 644 if(data.length > 0) { 645 $('#posts').find('.posts-container').remove(); 646 $('#posts').prepend(data); 647 } 648 $('.posts-count').empty(); 649 }); 650} 651 652// load more posts 653 654function Wo_GetMorePosts() { 655 var more_posts = $('#load-more-posts'); 656 var filter_by_more = $('#load-more-filter').find('.filter-by-more').attr('data-filter-by'); 657 var after_post_id = $('div.post:last').attr('data-post-id'); 658 var page_id = 0; 659 var user_id = 0; 660 var group_id = 0; 661 var event_id = 0; 662 var is_api = 0; 663 var ad_id = 0; 664 var story_id = 0; 665 var api = $('#api').val(); 666 if (api) { 667 is_api = 1; 668 } 669 if(after_post_id != null) { 670 more_posts.show(); 671 } 672 if(typeof ($('#posts').attr('data-story-user')) == "string") { 673 user_id = $('#posts').attr('data-story-user'); 674 } else if(typeof ($('#posts').attr('data-story-page')) == "string") { 675 page_id = $('#posts').attr('data-story-page'); 676 } else if(typeof ($('#posts').attr('data-story-group')) == "string") { 677 group_id = $('#posts').attr('data-story-group'); 678 } else if(typeof ($('#posts').attr('data-story-event')) == "string") { 679 event_id = $('#posts').attr('data-story-event'); 680 } 681 $('#posts').append('<div class="hidden loading-status loading-single"></div>'); 682 $('#load-more-posts').hide(); 683 $('.loading-status').hide().html('<div class="wow_content p15 tag_post_skel"><div class="valign"><div class="skel skel_50 skel_avatar"></div><div><div class="skel skel_2 skel_noti_name"></div><div class="skel skel_2 skel_noti_time"></div></div></div><div class="valign tag_post_skel_foot"><div class="valign"><div class="skel skel_action"></div><div class="skel skel_action"></div></div><div><div class="skel skel_action"></div></div></div></div><div class="wow_content p15 tag_post_skel"><div class="valign"><div class="skel skel_50 skel_avatar"></div><div><div class="skel skel_2 skel_noti_name"></div><div class="skel skel_2 skel_noti_time"></div></div></div><div class="valign tag_post_skel_foot"><div class="valign"><div class="skel skel_action"></div><div class="skel skel_action"></div></div><div><div class="skel skel_action"></div></div></div></div>').removeClass('hidden').show(); 684 Wo_progressIconLoader($('#load-more-posts')); 685 posts_count = 0; 686 if ($('.post').length > 0) { 687 posts_count = $('.post').length; 688 } 689 690 if ($(".user-ad-container").length > 0) { 691 ad_id = $(".user-ad-container").last().attr('id'); 692 } 693 694 if ($(".user-story-container").length > 0) { 695 story_id = $(".user-story-container").last().attr('id'); 696 } 697 698 if ($('body').attr('no-more-posts')) { 699 $('#load-more-posts').html('<div class="wow_content p15"><div class="empty_state"><svg height="512" viewBox="0 0 32 32" width="512" xmlns="http://www.w3.org/2000/svg"><path d="m26 32h-20c-3.314 0-6-2.686-6-6v-20c0-3.314 2.686-6 6-6h20c3.314 0 6 2.686 6 6v20c0 3.314-2.686 6-6 6z" fill="#fff9dd"/><path d="m20.167 8h-8.333c-1.012 0-1.834.822-1.834 1.833v12.333c0 1.012.822 1.834 1.833 1.834h8.333c1.012 0 1.834-.822 1.834-1.833v-12.334c0-1.011-.822-1.833-1.833-1.833zm-7.5 3.333h3.5c.368 0 .667.299.667.667s-.299.667-.667.667h-3.5c-.369 0-.667-.299-.667-.667s.298-.667.667-.
699667zm6.666 9.334h-6.667c-.368 0-.666-.299-.666-.667s.299-.667.667-.667h6.667c.368 0 .666.299.666.667s-.298.667-.667.667zm0-2.667h-6.667c-.368 0-.666-.298-.666-.667s.299-.667.667-.667h6.667c.368 0 .667.299.667.667s-.299.667-.668.667zm0-2.667h-6.667c-.368 0-.667-.299-.667-.667s.299-.666.668-.666h6.667c.368 0 .666.298.666.667s-.298.666-.667.666z" fill="#ffd200"/></svg>' + $('#get_no_posts_name').val() + '</div></div>'); 700 $('#load-more-posts').show(); 701 $('.loading-status').remove(); 702 scrolled = 0; 703 return false; 704 } 705 if ($('#page_post_jobs_filter').length > 0) { 706 filter_by_more = 'job'; 707 } 708 if ($('#page_post_offer_filter').length > 0) { 709 filter_by_more = 'offer'; 710 } 711 /* 712 $.get(Wo_Ajax_Requests_File(), { 713 f: 'posts', 714 s: 'load_more_posts', 715 filter_by_more: filter_by_more, 716 after_post_id: after_post_id, 717 user_id: user_id, 718 page_id: page_id, 719 group_id: group_id, 720 event_id: event_id, 721 posts_count: posts_count, 722 is_api: is_api, 723 ad_id: ad_id, 724 story_id:story_id 725 }, function (data) { 726 */ 727 var ids = []; 728 $('.post').each(function() { 729 ids.push($(this).attr('data-post-id')); 730 }); 731 $.post(Wo_Ajax_Requests_File() + "?" + $.param({ 732 f: 'posts', 733 s: 'load_more_posts', 734 filter_by_more: filter_by_more, 735 after_post_id: after_post_id, 736 user_id: user_id, 737 page_id: page_id, 738 group_id: group_id, 739 event_id: event_id, 740 posts_count: posts_count, 741 is_api: is_api, 742 ad_id: ad_id, 743 story_id:story_id 744 }), 745 746 { 747 ids:ids 748 } 749 , function (data) { 750 751 if (data.length == 0) { 752 $('body').attr('no-more-posts', "true"); 753 $('#load-more-posts').html('<div class="wow_content p15"><div class="empty_state"><svg height="512" viewBox="0 0 32 32" width="512" xmlns="http://www.w3.org/2000/svg"><path d="m26 32h-20c-3.314 0-6-2.686-6-6v-20c0-3.314 2.686-6 6-6h20c3.314 0 6 2.686 6 6v20c0 3.314-2.686 6-6 6z" fill="#fff9dd"/><path d="m20.167 8h-8.333c-1.012 0-1.834.822-1.834 1.833v12.333c0 1.012.822 1.834 1.833 1.834h8.333c1.012 0 1.834-.822 1.834-1.833v-12.334c0-1.011-.822-1.833-1.833-1.833zm-7.5 3.333h3.5c.368 0 .667.299.667.667s-.299.667-.667.667h-3.5c-.369 0-.667-.299-.667-.667s.298-.667.667-.667zm6.666 9.334h-6.667c-.368 0-.666-.299-.666-.667s.299-.667.667-.667h6.667c.368 0 .666.299.666.667s-.298.667-.667.667zm0-2.667h-6.667c-.368 0-.666-.298-.666-.667s.299-.667.667-.667h6.667c.368 0 .667.299.667.667s-.299.667-.668.667zm0-2.667h-6.667c-.368 0-.667-.299-.667-.667s.299-.666.668-.666h6.667c.368 0 .666.298.666.667s-.298.666-.667.666z" fill="#ffd200"/></svg>
753' + $('#get_no_posts_name').val() + '</div></div>'); 754 } else { 755 if (data != 'Please login or signup to continue.') { 756 $('body').removeAttr('no-more-posts'); 757 $('#posts').append(data); 758 } else { 759 $('body').attr('no-more-posts', "true"); 760 } 761 } 762 $('#load-more-posts').show(); 763 $('.loading-status').remove(); 764 Wo_progressIconLoader($('#load-more-posts')); 765 scrolled = 0; 766 }); 767} 768 769function animateStory(element) { 770 if ($(element).hasClass('opacity')) { 771 $(element).removeClass('opacity'); 772 $(element).addClass('no-opacity'); 773 } else { 774 $(element).removeClass('no-opacity'); 775 $(element).addClass('opacity'); 776 } 777} 778function Wo_LoadStory(type, user_id, element) { 779 780 var filter_by_more = $('#load-more-filter').find('.filter-by-more'); 781 filter_by_more.attr("data-filter-by", 'story'); 782 var filter_by_progress_icon = $('.filter-container').find('.type-story'); 783 Wo_progressIconLoader(filter_by_progress_icon); 784 var story = null; 785 var user = null; 786 if (type == 'all') { 787 story = 'a'; 788 user = 0; 789 } 790 else if(type == 'prof' && user_id){ 791 story = 'p'; 792 user = user_id; 793 } 794 animateStory(element); 795 var animation = setInterval(function () { 796 animateStory(element); 797 }, 500); 798 $.ajax({ 799 url: Wo_Ajax_Requests_File(), 800 type: 'GET', 801 dataType: 'json', 802 data: {f: 'status',s:story,id:user}, 803 }) 804 .done(function(data) { 805 if (data.status == 200) { 806 $('#posts').html(data.html); 807 } 808 else if(data.status == 404){ 809 $('#posts').html(data.html); 810 } 811 $(element).removeClass('opacity'); 812 clearInterval(animation); 813 Wo_progressIconLoader(filter_by_progress_icon); 814 }) 815 .fail(function() { 816 console.log("error"); 817 }) 818 819} 820function Wo_ResetStory() { 821 $('.mfp-progress-line span').css('width', '0%'); 822} 823 824// post filteration 825function Wo_FilterPostBy(filter_by) { 826 var more_posts = $('#load-more-posts'); 827 var filter_by_more = $('#load-more-filter').find('.filter-by-more'); 828 filter_by_more.attr("data-filter-by", filter_by); 829 //Wo_progressIconLoader(filter_by_progress_icon); 830 var type = ''; 831 var id = 0; 832 if(typeof ($('#posts').attr('data-story-user')) == "string") { 833 id = $('#posts').attr('data-story-user'); 834 type = 'profile'; 835 } else if(typeof ($('#posts').attr('data-story-page')) == "string") { 836 id = $('#posts').attr('data-story-page'); 837 type = 'page'; 838 } else if (typeof ($('#posts').attr('data-story-group')) == "string") { 839 id = $('#posts').attr('data-story-group'); 840 type = 'group'; 841 } else if (typeof ($('#posts').attr('data-story-event')) == "string") { 842 id = $('#posts').attr('data-story-event'); 843 type = 'event'; 844 } 845 $.get(Wo_Ajax_Requests_File(), { 846 f: 'posts', 847 s: 'filter_posts', 848 filter_by: filter_by, 849 id: id, 850 type: type 851 }, function (data) { 852 if(data) { 853 $('html, body').animate({ 854 scrollTop: $('#scroll_filter_click').offset().top - 100 //#DIV_ID is an example. Use the id of your destination on the page 855 }, 500); 856 $('#posts').html(data); 857 858 } 859 }); 860} 861// register post share 862function Wo_RegisterShare(post_id) { 863 var post = $('#post-' + post_id); 864 $.get(Wo_Ajax_Requests_File(), { 865 f: 'posts', 866 s: 'register_share', 867 post_id: post_id 868 }, function (data) { 869 if(data.status == 200) { 870 post.find("#share-button").addClass('active'); 871 post.find("[id^=shares]").text(data.shares); 872 } else { 873 post.find("#share-button").removeClass('active'); 874 post.find("[id^=shares]").text(data.shares); 875 } 876 if (data.can_send == 1) { 877 Wo_SendMessages(); 878 } 879 }); 880} 881 882// open post share buttons 883function Wo_OpenShareBtns(post_id) { 884 post_wrapper = $('#post-' + post_id); 885 post_wrapper.find('.post-share').slideToggle(200); 886} 887// register post comment 888function Wo_RegisterCommentClick(text, post_id, user_id, page_id, type) { 889 post_wrapper = $('[id=post-' + post_id + ']'); 890 comment_textarea = post_wrapper.find('.post-comments'); 891 comment_btn = comment_textarea.find('.emo-comment'); 892 textarea_wrapper = comment_textarea.find('.textarea'); 893 comment_list = post_wrapper.find('.comments-list'); 894 if(text == '') { 895 return false;
896 } 897 textarea_wrapper.val(''); 898 Wo_progressIconLoader(comment_btn); 899 $.post(Wo_Ajax_Requests_File() + '?f=posts&s=register_comment', { 900 post_id: post_id, 901 text: text, 902 user_id: user_id, 903 page_id: page_id 904 }, function (data) { 905 if(data.status == 200) { 906 post_wrapper.find('.comment-container:first-child').before(data.html); 907 post_wrapper.find('[id=comments]').html(data.comments_num); 908 } 909 Wo_progressIconLoader(comment_btn); 910 if (data.can_send == 1) { 911 Wo_SendMessages(); 912 } 913 }); 914} 915// register post comment 916function Wo_LightBoxComment(text, post_id, user_id, event, page_id) { 917 if(event.keyCode == 13 && event.shiftKey == 0) { 918 post_wrapper = $('#lightbox-post-' + post_id); 919 comment_textarea = post_wrapper.find('.post-comments'); 920 comment_btn = comment_textarea.find('.comment-btn'); 921 textarea_wrapper = comment_textarea.find('.textarea'); 922 comment_list = post_wrapper.find('.comments-list'); 923 if(textarea_wrapper.val() == '') { 924 return false; 925 } 926 textarea_wrapper.val(''); 927 Wo_progressIconLoader(comment_btn); 928 $.post(Wo_Ajax_Requests_File() + '?f=posts&s=register_comment', { 929 post_id: post_id, 930 text: text, 931 user_id: user_id, 932 page_id: page_id 933 }, function (data) { 934 if(data.status == 200) { 935 post_wrapper.find('.comment-container:first-child').before(data.html); 936 post_wrapper.find('#comments').html(data.comments_num); 937 } 938 Wo_progressIconLoader(comment_btn); 939 if (data.can_send == 1) { 940 Wo_SendMessages(); 941 } 942 }); 943 } 944} 945 946function Wo_loadPostMoreComments(post_id,self) { 947 main_wrapper = $('#post-' + post_id); 948 $('#post-' + post_id).find('.post-comments .msg_progress').show(); 949 comment_id = main_wrapper.find('.comment').last().attr('data-comment-id'); 950 $.get(Wo_Ajax_Requests_File(), { 951 f: 'posts', 952 s: 'load_more_post_comments', 953 post_id: post_id, 954 comment_id: comment_id 955 }, function (data) { 956 if(data.status == 200) { 957 main_wrapper.find('.comments-list').append(data.html); 958 if (data.no_more == 1) { 959 $(self).remove(); 960 } 961 $('#post-' + post_id).find('.post-comments .msg_progress').hide(); 962 } 963 }); 964} 965 966// load all post comments 967function Wo_loadAllComments(post_id,self) { 968 main_wrapper = $('#post-' + post_id); 969 $('#post-' + post_id).find('.post-comments .msg_progress').show(); 970 $.get(Wo_Ajax_Requests_File(), { 971 f: 'posts', 972 s: 'load_more_comments', 973 post_id: post_id 974 }, function (data) { 975 if(data.status == 200) { 976 main_wrapper.find('.comments-list').html(data.html); 977 $(self).remove(); 978 $('#post-' + post_id).find('.post-comments .msg_progress').hide(); 979 } 980 }); 981} 982function Wo_loadAllCommentslightbox(post_id) { 983 main_wrapper_light = $('#post-' + post_id); 984 view_more_wrapper_light = main_wrapper_light.find('.view-more-wrapper'); 985 $.get(Wo_Ajax_Requests_File(), { 986 f: 'posts', 987 s: 'load_more_comments', 988 post_id: post_id 989 }, function (data) { 990 if(data.status == 200) { 991 $('.comments-list-lightbox').html(data.html); 992 $('.view-more-wrapper').remove(); 993 } 994 }); 995} 996 997// show post comments 998function Wo_ShowComments(post_id) { 999 if ($('[data-page-type="watch"]').length > 0 ) { 1000 Wo_OpenLightBox(post_id); 1001 return; 1002 } 1003 $('#post-comments-' + post_id).toggleClass('hidden'); 1004} 1005 1006// open post edit modal 1007function Wo_OpenPostEditBox(post_id) { 1008 var edit_box = $('#post-' + post_id).find('#edit-post'); 1009 edit_box.modal({ 1010 show: true 1011 }); 1012} 1013function Wo_OpenOfferEditBox(offer_id) { 1014 $('.edit_offer_modal_form').empty(); 1015 $.post(Wo_Ajax_Requests_File() + '?f=offer&s=get_offer', {offer_id: offer_id}, function(data, textStatus, xhr) { 1016 if (data.status == 200) { 1017 $('.edit_offer_modal_form').html(data.html); 1018 var edit_box = $('#edit-offer-modal'); 1019 edit_box.modal({ 1020 show: true 1021 }); 1022 } 1023 }); 1024 1025} 1026function change_discount(self,offer_id) { 1027 var type = $(self).val(); 1028 $('.discount_percent_input_'+offer_id).slideUp(); 1029 $('.discount_amount_input_'+offer_id).slideUp(); 1030 $('.buy_get_discount_input_'+offer_id).slideUp(); 1031 $('.spend_get_off_input_'+offer_id).slideUp(); 1032 if (type == 'discount_percent') { 1033 $('.discount_percent_input_'+offer_id).slideDown(); 1034 } 1035 else if(type == 'discount_amount'){ 1036 $('.discount_amount_input_'+offer_id).slideDown(); 1037 } 1038 else if(type == 'buy_get_discount'){ 1039 $('.buy_get_discount_input_'+offer_id).slideDown(); 1040 $('.discount_percent_input_'+offer_id).slideDown(); 1041 } 1042 else if(type == 'spend_get_off'){ 1043 $('.spend_get_off_input_'+offer_id).slideDown(); 1044 } 1045} 1046 1047// save edited post 1048function Wo_EditPost(post_id) { 1049 var post = $('#post-' + post_id); 1050 var edit_box = $('#post-' + post_id).find('#edit-post'); 1051 var edit_textarea = post.find('.edit-textarea-' + post_id + ' textarea'); 1052 var text = edit_textarea.val(); 1053 var post_text = post.find('.post-description p'); 1054 var type = post.attr('data-post-type'); 1055 if (type == 'share') { 1056 var post_text = post.find('.post-description .edited_text'); 1057 } 1058 else{ 1059 var post_text = post.find('.post-description p'); 1060 } 1061 Wo_progressIconLoader(post.find('#edit-post-button')); 1062 $('#post-' + post_id).find('#edit-post .disable_btn').attr('disabled','disabled'); 1063 $.post(Wo_Ajax_Requests_File() + '?f=posts&s=edit_post', { 1064 post_id: post_id, 1065 text: text 1066 }, function (data) { 1067 if(data.status == 200) { 1068 post_text.html(data.html); 1069 edit_box.modal('hide'); 1070 } 1071 $('#post-' + post_id).find('#edit-post .disable_btn').removeAttr("disabled"); 1072 if (data.can_send == 1) { 1073 Wo_SendMessages(); 1074 } 1075 }); 1076} 1077 1078function DeleteUploadedImageById(name,id,post_id) { 1079 $('#delete_uploaded_image_by_id_'+id).remove(); 1080 if ($('#edit-post-form-'+post_id).find('.thumb-image-old').length < 1) { 1081 $('#edit-post-form-'+post_id).find('#all_images').val('1'); 1082 } 1083 if ($('#edit-post-form-'+post_id).find('.thumb-image').length < 1) { 1084 $('#edit-post-form-'+post_id).find('#publisher-post-photos-'+post_id).val(''); 1085 } 1086} 1087 1088function DeletePostImage(post_id,image_id = 0) { 1089 if (image_id > 0) { 1090 $('#edit-post-form-'+post_id).find('#delete_image_by_id_'+image_id).remove(); 1091 } 1092 else{ 1093 $('#edit-post-form-'+post_id).find('#delete_image_by_id').remove(); 1094 } 1095 if ($('#edit-post-form-'+post_id).find('.thumb-image-old').length < 1) { 1096 $('#edit-post-form-'+post_id).find('#all_images').val('1'); 1097 } 1098 if ($('#edit-post-form-'+post_id).find('.thumb-image').length < 1) { 1099 $('#edit-post-form-'+post_id).find('#publisher-post-photos-'+post_id).val(''); 1100 } 1101 $.post(Wo_Ajax_Requests_File() + '?f=posts&s=delete_post_image', {post_id: post_id,image_id: image_id}, function(data, textStatus, xhr) {}); 1102} 1103 1104// open delete post modal 1105function Wo_OpenPostDeleteBox(post_id) { 1106 var delete_box = $('#post-' + post_id).find('#delete-post'); 1107 delete_box.modal({ 1108 show: true 1109 }); 1110} 1111 1112// delete post 1113function Wo_DeletePost(post_id) { 1114 Wo_CloseLightbox(); 1115 var delete_box = $('#post-' + post_id).find('#delete-post'); 1116 var delete_button = delete_box.find('#delete-all-post'); 1117 $('#post-' + post_id).find('#delete-post .disable_btn').attr('disabled','disabled'); 1118 $.get(Wo_Ajax_Requests_File(), { 1119 f: 'posts', 1120 s: 'delete_post', 1121 post_id: post_id 1122 }, function (data) { 1123 if(data.status == 200) { 1124 delete_box.modal('hide'); 1125 if ($('.hidden_reels').length > 0) { 1126 $('#delete-reel-modal').modal('hide'); 1127 window.location.href = websiteUrl+"/reels"; 1128 } 1129 $('body').removeClass('modal-open'); 1130 $('#post-' + post_id).slideUp(200, function () { 1131 $(this).remove(); 1132 }); 1133 } 1134 $('#post-' + post_id).find('#delete-post .disable_btn').removeAttr("disabled"); 1135 }); 1136} 1137 1138// open comment textarea 1139function Wo_OpenCommentEditBox(comment_id) { 1140 comment = $('[id=comment_' + comment_id + ']'); 1141 comment_text = comment.find('.comment-edit'); 1142 comment_text.slideToggle(100); 1143} 1144 1145function Wo_ReportComment( comment_id ){ 1146 if (!comment_id || comment_id <= 0) { 1147 return false;
1148 } 1149 $.get(Wo_Ajax_Requests_File(), { 1150 f: 'posts', 1151 s: 'report_comment', 1152 comment_id: comment_id 1153 }, function (data) { 1154 if(data.status == 200) { 1155 $("body").snackbar({ 1156 message: data.text 1157 }); 1158 setTimeout(function () { 1159 $('#reportComment'+comment_id).css({"color":"#F44336"}); 1160 }, 1500); 1161 }else if(data.status == 300) { 1162 $("body").snackbar({ 1163 message: data.text 1164 }); 1165 setTimeout(function () { 1166 $('#reportComment'+comment_id).css({"color":"inherit"}); 1167 }, 1500); 1168 } 1169 }); 1170 1171} 1172// save edited comment 1173function Wo_EditComment(text, comment_id, event) { 1174 comment_ = $('#edit_comment_'+comment_id); 1175 Wo_Get_Mention(comment_); 1176 comment = $('[id=comment_' + comment_id + ']'); 1177 comment_text = comment.find('.comment-text'); 1178 if(event.keyCode == 13 && event.shiftKey == 0) { 1179 $.post(Wo_Ajax_Requests_File() + '?f=posts&s=edit_comment', { 1180 comment_id: comment_id, 1181 text: text 1182 }, function (data) { 1183 if(data.status == 200) { 1184 comment_text.html(data.html); 1185 Wo_OpenCommentEditBox(comment_id); 1186 } 1187 }); 1188 } 1189} 1190 1191// delete comment 1192function Wo_DeleteComment(comment_id) { 1193 var delete_box = $('[id=comment_' + comment_id + ']').find('#delete-comment'); 1194 var delete_button = delete_box.find('#delete-all-post'); 1195 delete_box.modal({ 1196 show: true 1197 }); 1198 var comment = $('[id=comment_' + comment_id + ']'); 1199 delete_button.on('click', function () { 1200 $('[id=comment_' + comment_id + ']').find('#delete-comment .disable_btn').attr('disabled','disabled'); 1201 $.get(Wo_Ajax_Requests_File(), { 1202 f: 'posts', 1203 s: 'delete_comment', 1204 comment_id: comment_id 1205 }, function (data) { 1206 if(data.status == 200) { 1207 delete_box.modal('hide'); 1208 $('.modal').modal('hide'); 1209 comment.fadeOut(300, function () { 1210 comment.remove(); 1211 }); 1212 } 1213 }); 1214 }); 1215} 1216 1217function Wo_DeleteReplyComment(reply_id) { 1218 var delete_box = $('[id=comment_reply_' + reply_id + ']').find('#delete-comment-reply'); 1219 var delete_button = delete_box.find('#delete-all-reply'); 1220 delete_box.modal({ 1221 show: true 1222 }); 1223 var comment = $('[id=comment_reply_' + reply_id + ']'); 1224 delete_button.on('click', function () { 1225 $('[id=comment_reply_' + reply_id + ']').find('#delete-comment-reply .disable_btn').attr('disabled','disabled'); 1226 $.get(Wo_Ajax_Requests_File(), { 1227 f: 'posts', 1228 s: 'delete_comment_reply', 1229 reply_id: reply_id 1230 }, function (data) { 1231 if(data.status == 200) { 1232 delete_box.modal('hide'); 1233 comment.fadeOut(300, function () { 1234 $(this).remove(); 1235 }); 1236 } 1237 }); 1238 }); 1239} 1240 1241// register comment wonder 1242function Wo_RegisterCommentWonder(comment_id) { 1243 var comment = $('[id=comment_' + comment_id + ']'); 1244 comment_text = comment.find('div.comment-text').text(); 1245 Wo_progressIconLoader(comment.find('#WonderComment')); 1246 $.post(Wo_Ajax_Requests_File() + '?f=posts&s=register_comment_wonder', { 1247 comment_id: comment_id, 1248 comment_text: comment_text 1249 }, function (data) { 1250 if(data.status == 200) { 1251 if (node_socket_flow == "1") { 1252 socket.emit("comment_notification", { comment_id: comment_id, user_id: _getCookie("user_id"), type: "added" }); 1253 } 1254 if (data.dislike == 1) { 1255 comment.find("#comment-likes").text(data.likes_c); 1256 comment.find("#LikeComment").html('<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="feather feather-thumbs-up"><path d="M14 9V5a3 3 0 0 0-3-3l-4 9v11h11.28a2 2 0 0 0 2-1.7l1.38-9a2 2 0 0 0-2-2.3zM7 22H4a2 2 0 0 1-2-2v-7a2 2 0 0 1 2-2h3"></path></svg>'); 1257 } 1258 comment.find("#WonderComment").html('<span class="active-wonder">' + data.icon + '</span>').fadeIn(150); 1259 comment.find("#comment-wonders").text(data.wonders); 1260 } else if (data.status == 300) { 1261 if (node_socket_flow == "1") { 1262 socket.emit("comment_notification", { comment_id: comment_id, user_id: _getCookie("user_id"), type: "removed" }); 1263 } 1264 comment.find("#WonderComment").html('' + data.icon + '').fadeIn(150); 1265 comment.find("#comment-wonders").text(data.wonders); 1266 } 1267 }); 1268} 1269 1270// register comment wonder 1271function Wo_RegisterCommentReplyWonder(reply_id) { 1272 var comment = $('[id=comment_reply_' + reply_id + ']'); 1273 comment_text = comment.find('div.reply-text').text(); 1274 Wo_progressIconLoader(comment.find('#WonderReplyComment')); 1275 $.post(Wo_Ajax_Requests_File() + '?f=posts&s=register_comment_reply_wonder', { 1276 reply_id: reply_id, 1277 comment_text: comment_text 1278 }, function (data) { 1279 if(data.status == 200) { 1280 if (node_socket_flow == "1") { 1281 socket.emit("reply_notification", { reply_id: reply_id, user_id: _getCookie("user_id"), type: "added" }); 1282 } 1283 if (data.dislike == 1) { 1284 comment.find("#comment-reply-likes").text(data.likes_r); 1285 comment.find("#LikeReplyComment").html('<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="feather feather-thumbs-up"><path d="M14 9V5a3 3 0 0 0-3-3l-4 9v11h11.28a2 2 0 0 0 2-1.7l1.38-9a2 2 0 0 0-2-2.3zM7 22H4a2 2 0 0 1-2-2v-7a2 2 0 0 1 2-2h3"></path></svg>'); 1286 } 1287 comment.find("#WonderReplyComment").html('<span class="active-wonder">' + data.icon + '</span>').fadeIn(150); 1288 comment.find("#comment-reply-wonders").text(data.wonders); 1289 } else if (data.status == 300){ 1290 if (node_socket_flow == "1") { 1291 socket.emit("reply_notification", { reply_id: reply_id, user_id: _getCookie("user_id"), type: "removed" }); 1292 } 1293 comment.find("#WonderReplyComment").html('' + data.icon + '').fadeIn(150); 1294 comment.find("#comment-reply-wonders").text(data.wonders); 1295 } 1296 }); 1297} 1298 1299function Wo_RegisterCommentReplyLike(reply_id) { 1300 var comment = $('[id=comment_reply_' + reply_id + ']'); 1301 comment_text = comment.find('div.reply-text').text(); 1302 Wo_progressIconLoader(comment.find('#LikeReplyComment')); 1303 $.post(Wo_Ajax_Requests_File() + '?f=posts&s=register_comment_reply_like', { 1304 reply_id: reply_id, 1305 comment_text: comment_text 1306 }, function (data) { 1307 if(data.status == 200) { 1308 if (node_socket_flow == "1") { 1309 socket.emit("reply_notification", { reply_id: reply_id, user_id: _getCookie("user_id"), type: "added" }); 1310 } 1311 if (data.dislike == 1) { 1312 comment.find("#comment-reply-wonders").text(data.wonders_r); 1313 comment.find("#WonderReplyComment").html('<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="feather feather-thumbs-down"><path d="M10 15v4a3 3 0 0 0 3 3l4-9V2H5.72a2 2 0 0 0-2 1.7l-1.38 9a2 2 0 0 0 2 2.3zm7-13h2.67A2.31 2.31 0 0 1 22 4v7a2.31 2.31 0 0 1-2.33 2H17"></path></svg>'); 1314 } 1315 comment.find("#LikeReplyComment").html('<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="feather feather-thumbs-up active-like"><path d="M14 9V5a3 3 0 0 0-3-3l-4 9v11h11.28a2 2 0 0 0 2-1.7l1.38-9a2 2 0 0 0-2-2.3zM7 22H4a2 2 0 0 1-2-2v-7a2 2 0 0 1 2-2h3"></path></svg>').fadeIn(150); 1316 comment.find("#comment-reply-likes").text(data.likes); 1317 } else if (data.status == 300){ 1318 if (node_socket_flow == "1") { 1319 socket.emit("reply_notification", { reply_id: reply_id, user_id: _getCookie("user_id"), type: "removed" }); 1320 } 1321 comment.find("#LikeReplyComment").html('<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="feather feather-thumbs-up"><path d="M14 9V5a3 3 0 0 0-3-3l-4 9v11h11.28a2 2 0 0 0 2-1.7l1.38-9a2 2 0 0 0-2-2.3zM7 22H4a2 2 0 0 1-2-2v-7a2 2 0 0 1 2-2h3"></path></svg>').fadeIn(150); 1322 comment.find("#comment-reply-likes").text(data.likes); 1323 } 1324 }); 1325} 1326// save post 1327function Wo_SavePost(post_id) { 1328 var post = $('#post-' + post_id); 1329 post.find('.tag_post_men_disable').show(); 1330 $.get(Wo_Ajax_Requests_File(), { 1331 f: 'posts', 1332 s: 'save_post', 1333 post_id: post_id 1334 }, function (data) { 1335 if(data.status == 200) { 1336 post.find('.save-post').html(data.text); 1337 post.find('.save-product').toggleClass('active'); 1338 } else if(data.status == 300) { 1339 post.find('.save-product').toggleClass('active'); 1340 post.find('.save-post').html(data.text); 1341 } 1342 post.find('.tag_post_men_disable').hide(); 1343 }); 1344} 1345 1346// report post 1347function Wo_ReportPost(post_id) { 1348 var post = $('#post-' + post_id); 1349 post.find('.tag_post_men_disable').show(); 1350 $.get(Wo_Ajax_Requests_File(), { 1351 f: 'posts', 1352 s: 'report_post', 1353 post_id: post_id 1354 }, function (data) { 1355 if(data.status == 200) { 1356 post.find('.report-post').html(data.text); 1357 } else if(data.status == 300) { 1358 post.find('.report-post').html(data.text); 1359 } 1360 post.find('.tag_post_men_disable').hide(); 1361 }); 1362} 1363 1364function Wo_DisableComment(post_id, type) { 1365 var post = $('#post-' + post_id); 1366 var p = post.find('.disable-comments').find('p').text(); 1367 if (type == 0 ) { 1368 post.find('.disable-comments').attr('onclick', 'Wo_DisableComment(' + post_id + ', 1);'); 1369 post.find('.post-comments').show() 1370 } else { 1371 post.find('.disable-comments').attr('onclick', 'Wo_DisableComment(' + post_id + ', 0);'); 1372 post.find('.post-comments').hide() 1373 } 1374 $.get(Wo_Ajax_Requests_File(), { 1375 f: 'posts', 1376 s: 'disable_comment', 1377 post_id: post_id, 1378 type: type 1379 }, function (data) { 1380 post.find('.disable-comments').html('<svg viewBox="0 0 24 24">
1380<path fill="currentColor" d="M9,22A1,1 0 0,1 8,21V18H4A2,2 0 0,1 2,16V4C2,2.89 2.9,2 4,2H20A2,2 0 0,1 22,4V16A2,2 0 0,1 20,18H13.9L10.2,21.71C10,21.9 9.75,22 9.5,22V22H9M5,5V7H19V5H5M5,9V11H13V9H5M5,13V15H15V13H5Z" /></svg> <div><b>'+data.text+'</b><p>'+p+'</p></div>'); 1381 }); 1382} 1383 1384function Wo_PinPost(post_id, id, type) { 1385 var post = $('#post-' + post_id); 1386 var p = post.find('.pin-post').find('p').text(); 1387 post.find('.tag_post_men_disable').show(); 1388 $.get(Wo_Ajax_Requests_File(), { 1389 f: 'posts', 1390 s: 'pin_post', 1391 post_id: post_id, 1392 id: id, 1393 type: type 1394 }, function (data) { 1395 post.find('.pin-post').html('<svg viewBox="0 0 24 24"><path fill="currentColor" d="M16,12V4H17V2H7V4H8V12L6,14V16H11.2V22H12.8V16H18V14L16,12Z" /></svg> <div><b>'+data.text+'</b><p>'+p+'</p></div>'); 1396 1397 post.find('.tag_post_men_disable').hide(); 1398 }); 1399} 1400 1401function Wo_BoostPost(post_id) { 1402 var post = $('#post-' + post_id); 1403 var p = post.find('.boost-post').find('p').text(); 1404 post.find('.tag_post_men_disable').show(); 1405 $.get(Wo_Ajax_Requests_File(), { 1406 f: 'posts', 1407 s: 'boost_post', 1408 post_id: post_id 1409 }, function (data) { 1410 post.find('.boost-post').html('<svg viewBox="0 0 24 24"><path fill="currentColor" d="M16,12V4H17V2H7V4H8V12L6,14V16H11.2V22H12.8V16H18V14L16,12Z" /></svg> <div><b>'+data.text+'</b><p>'+p+'</p></div>'); 1411 post.find('.tag_post_men_disable').hide(); 1412 }); 1413} 1414 1415// open post Reacted users 1416function Wo_OpenPostReactedUsers(post_id, type,col) { 1417 if (col != 'story') { 1418 //$('body').append('<div class="lightbox-container"><div class="lightbox-backgrond" onclick="Wo_CloseLightbox();"></div><div class="lb-preloader" style="display:block"><svg width="50px" height="50px" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100" preserveAspectRatio="xMidYMid"><rect x="0" y="0" width="100" height="100" fill="none" class="bk"></rect><circle cx="50" cy="50" r="40" stroke="#676d76" fill="none" stroke-width="6" stroke-linecap="round"><animate attributeName="stroke-dashoffset" dur="1.5s" repeatCount="indefinite" from="0" to="502"></animate><animate attributeName="stroke-dasharray" dur="1.5s" repeatCount="indefinite" values="150.6 100.4;1 250;150.6 100.4"></animate></circle></svg></div></div>'); 1419 } 1420 if (col == 'story') { 1421 $('.width_').css('width', $('.width_').css('width')); 1422 value = $('.story_lightbox').attr('data-post-id'); 1423 $('.story_lightbox').addClass('dont_close_story_'+value); 1424 } 1425 1426 $('.reacted_users_load_more').css('display', 'inline'); 1427 $.get(Wo_Ajax_Requests_File(), { 1428 f: 'posts', 1429 s: 'get_post_reacted', 1430 post_id: post_id, 1431 type: type, 1432 col:col 1433 }, function (data) { 1434 if(data.status == 200) { 1435 if (col != 'story') { 1436 setTimeout(function () { 1437 //$('.lightbox-container').remove(); 1438 },100); 1439 } 1440 //$('#views_info_title').html(data.title); 1441 if(data.html.length == 0) { 1442 $('.reacted_users_load_more').attr('data-type', ''); 1443 $('#reacted_users_box').html('<div class="empty_state"><svg height="512pt" viewBox="0 0 512 512" width="512pt" xmlns="http://www.w3.org/2000/svg"><path d="m416 512h-320c-53.023438 0-96-42.976562-96-96v-320c0-53.023438 42.976562-96 96-96h320c53.023438 0 96 42.976562 96 96v320c0 53.023438-42.976562 96-96 96zm0 0" fill="#ffe6e2"/><path d="m271.089844 256 64.109375-64.113281c4.160156-4.160157 4.160156-10.910157 0-15.085938-4.160157-4.175781-10.910157-4.160156-15.085938 0l-64.113281 64.109375-64.113281-64.109375c-4.160157-4.160156-10.910157-4.160156-15.085938 0-4.175781 4.160157-4.160156 10.910157 0 15.085938l64.109375 64.113281-64.109375 64.113281c-4.160156 4.160157-4.160156 10.910157 0 15.085938 2.078125 2.082031 4.816407 3.121093 7.535157 3.121093 2.734374 0 5.457031-1.039062 7.535156-3.121093l64.128906-64.109375 64.113281 64.109375c2.078125 2.082031 4.816407 3.121093 7.535157 3.121093s5.457031-1.039062 7.535156-3.121093c4.160156-4.160157 4.160156-10.910157 0-15.085938zm0 0" fill="#fc573b"/></svg>' + data.message + '</div>'); 1444 $('#reacted_users_load').css('display', 'none'); 1445 $('#users-reacted-modal').modal('show'); 1446 } else { 1447 $('.reacted_users_load_more').attr('col-type', col); 1448 $('.reacted_users_load_more').attr('data-type', type); 1449 $('.reacted_users_load_more').attr('post-id', post_id); 1450 $('#reacted_users_load').css('display', 'block'); 1451 $('#reacted_users_box').html(data.html); 1452 $('#users-reacted-modal').modal('show'); 1453 } 1454 } 1455 }); 1456} 1457 1458function Wo_ClosePostReactedUsers(post_id) { 1459 var post = $('#post-' + post_id);
1459post_likes_container = post.find('.post-reacted'); 1460 post_likes_container.slideUp(200).empty(); 1461} 1462 1463// open post liked users 1464function Wo_OpenPostLikedUsers(post_id,table) { 1465 $('.views_info_load_more').css('display', 'inline'); 1466 $.get(Wo_Ajax_Requests_File(), { 1467 f: 'posts', 1468 s: 'get_post_likes', 1469 post_id: post_id, 1470 table:table 1471 }, function (data) { 1472 if(data.status == 200) { 1473 $('#views_info_title').html(data.title); 1474 if(data.html.length == 0) { 1475 $('.views_info_load_more').attr('data-type', ''); 1476 $('#views_info').html('<div class="empty_state"><svg height="512" viewBox="0 0 32 32" width="512" xmlns="http://www.w3.org/2000/svg"><path d="m26 32h-20c-3.314 0-6-2.686-6-6v-20c0-3.314 2.686-6 6-6h20c3.314 0 6 2.686 6 6v20c0 3.314-2.686 6-6 6z" fill="#ffe6e2"/><path d="m9.167 13.333c-.644 0-1.167.524-1.167 1.167v7.667c0 .643.523 1.167 1.167 1.167.614-.114 2.833.486 2.833-1.167v-7.667c0-1.669-2.256-1.06-2.833-1.167z" fill="#fd907e"/><path d="m21.334 13.833h-3.147s.5-1 .5-2.667c0-2-1.5-2.667-2.167-2.667s-1 .333-1 2c0 1.584-1.534 2.858-2.521 3.515v8.259c3.298 1.526 7.102 1.171 7.587 1.226 3.367 0 2.679-4.353 3.373-6.547.282-1.632-.972-3.119-2.625-3.119z" fill="#fc573b"/></svg>' + data.message + '</div>'); 1477 $('#views_info_load').css('display', 'none'); 1478 $('#views-info-modal').modal('show'); 1479 } else { 1480 $('.views_info_load_more').attr('data-type', 'like'); 1481 $('.views_info_load_more').attr('table-type', table); 1482 $('.views_info_load_more').attr('post-id', post_id); 1483 $('#views_info_load').css('display', 'block'); 1484 $('#views_info').html(data.html); 1485 $('#views-info-modal').modal('show'); 1486 } 1487 } 1488 }); 1489} 1490 1491// open post shared users 1492function Wo_OpenPostSharedUsers(post_id) { 1493 $('.views_info_load_more').css('display', 'inline'); 1494 $.get(Wo_Ajax_Requests_File(), { 1495 f: 'posts', 1496 s: 'get_post_shared', 1497 post_id: post_id 1498 }, function (data) { 1499 if(data.status == 200) { 1500 $('#views_info_title').html(data.title); 1501 if(data.html.length == 0) { 1502 $('.views_info_load_more').attr('data-type', ''); 1503 $('#views_info').html('<div class="empty_state"><svg height="512" viewBox="0 0 32 32" width="512" xmlns="http://www.w3.org/2000/svg"><path d="m26 32h-20c-3.314 0-6-2.686-6-6v-20c0-3.314 2.686-6 6-6h20c3.314 0 6 2.686 6 6v20c0 3.314-2.686 6-6 6z" fill="#ffe6e2"/><path d="m17.5 8h-7.667c-1.013 0-1.833.82-1.833 1.833v10.333c0 1.014.82 1.834 1.833 1.834h6.407c-.553-.487-.907-1.2-.907-2 0-1.473 1.193-2.667 2.667-2.667.267 0 .513.053.753.12l.58-.327v-7.293c0-1.013-.82-1.833-1.833-1.833zm-6.833 2.667h2.667c.367 0 .667.3.667.667s-.301.666-.668.666h-2.667c-.366 0-.666-.3-.666-.667s.3-.666.667-.666zm3.333 6.666h-3.333c-.367 0-.667-.3-.667-.667s.3-.666.667-.666h3.333c.367 0 .667.3.667.667s-.3.666-.667.666zm2.667-2.666h-6c-.367 0-.667-.3-.667-.667s.3-.667.667-.667h6c.367 0 .667.3.667.667-.001.367-.301.667-.667.667z" fill="#fc573b"/><g fill="#fd907e"><path d="m21.945 22.752c-.083 0-.168-.021-.245-.064l-3.236-1.826c-.241-.136-.326-.441-.19-.681.137-.24.441-.325.681-.19l3.236 1.826c.241.136.326.441.19.681-.092.162-.262.254-.436.254z"/><path d="m18.721 20.086c-.174 0-.342-.09-.435-.252-.137-.24-.053-.545.187-.682l3.224-1.838c.24-.136.546-.053.682.187.137.24.053.545-.187.682l-3.224 1.838c-.078.044-.163.065-.247.065z"/><path d="m22.667 18.667c-.735 0-1.333-.598-1.333-1.333s.597-1.334 1.333-1.334c.735 0 1.333.598 1.333 1.333s-.598 1.334-1.333 1.334z"/><path d="m22.667 24c-.735 0-1.333-.598-1.333-1.333s.598-1.333 1.333-1.333 1.333.598 1.333 1.333-.598 1.333-1.333 1.333z"/><path d="m18 21.333c-.735 0-1.333-.598-1.333-1.333s.598-1.333 1.333-1.333 1.333.598 1.333 1.333-.598 1.333-1.333 1.333z"/></g></svg>' + data.message + '</div>'); 1504 $('#views_info_load').css('display', 'none'); 1505 $('#views-info-modal').modal('show'); 1506 } else { 1507 $('.views_info_load_more').attr('data-type', 'share'); 1508 $('.views_info_load_more').attr('post-id', post_id); 1509 $('#views_info_load').css('display', 'block'); 1510 $('#views_info').html(data.html); 1511 $('#views-info-modal').modal('show'); 1512 } 1513 } 1514 }); 1515} 1516 1517 1518// open post wodered users 1519function Wo_OpenPostWonderedUsers(post_id,table) { 1520 $('.views_info_load_more').css('display', 'inline'); 1521 $.get(Wo_Ajax_Requests_File(), { 1522 f: 'posts', 1523 s: 'get_post_wonders', 1524 post_id: post_id, 1525 table:table 1526 }, function (data) { 1527 if(data.status == 200) { 1528 $('#views_info_title').html(data.title); 1529 if(data.html.length == 0) { 1530 $('.views_info_load_more').attr('data-type', ''); 1531 $('#views_info').html('<div class="empty_state"><svg height="512pt" viewBox="0 0 512 512" width="512pt" xmlns="http://www.w3.org/2000/svg"><path d="m416 512h-320c-53.023438 0-96-42.976562-96-96v-320c0-53.023438 42.976562-96 96-96h320c53.023438 0 96 42.976562 96 96v320c0 53.023438-42.976562 96-96 96zm0 0" fill="#ffe6e2"/><path d="m271.089844 256 64.109375-64.113281c4.160156-4.160157 4.160156-10.910157 0-15.085938-4.160157-4.175781-10.910157-4.160156-15.085938 0l-64.113281 64.109375-64.113281-64.109375c-4.160157-4.160156-10.910157-4.160156-15.085938 0-4.175781 4.160157-4.160156 10.910157 0 15.085938l64.109375 64.113281-64.109375 64.113281c-4.160156 4.160157-4.160156 10.910157 0 15.085938 2.078125 2.082031 4.816407 3.121093 7.535157 3.121093 2.734374 0 5.457031-1.039062 7.535156-3.121093l64.128906-64.109375 64.113281 64.109375c2.078125 2.082031 4.816407 3.121093 7.535157 3.121093s5.457031-1.039062 7.535156-3.121093c4.160156-4.160157 4.160156-10.910157 0-15.085938zm0 0" fill="#fc573b"/></svg>
1531' + data.message + '</div>'); 1532 $('#views_info_load').css('display', 'none'); 1533 $('#views-info-modal').modal('show'); 1534 } else { 1535 $('.views_info_load_more').attr('data-type', 'wonder'); 1536 $('.views_info_load_more').attr('table-type', table); 1537 $('.views_info_load_more').attr('post-id', post_id); 1538 $('#views_info_load').css('display', 'block'); 1539 $('#views_info').html(data.html); 1540 $('#views-info-modal').modal('show'); 1541 } 1542 } 1543 }); 1544} 1545 1546 1547// add emo to input 1548function Wo_AddEmo(code, input) { 1549 inputTag = $(input); 1550 inputVal = inputTag.val(); 1551 if(typeof (inputTag.attr('placeholder')) != "undefined") { 1552 inputPlaceholder = inputTag.attr('placeholder'); 1553 if(inputPlaceholder == inputVal) { 1554 inputTag.val(''); 1555 inputVal = inputTag.val(); 1556 } 1557 } 1558 if(inputVal.length == 0) { 1559 inputTag.val(code); 1560 } else { 1561 inputTag.val(inputVal + code); 1562 } 1563 inputTag.keyup(); 1564} 1565 1566// accept follow request 1567function Wo_AcceptFollowRequest(user_id, btn) { 1568 var main_container = btn 1569 ? $(btn).closest('.user-request-list') 1570 : $('.user-follow-request-' + user_id); 1571 1572 var follow_main_container = btn 1573 ? $(btn) 1574 : main_container.find('#accept-' + user_id); 1575 1576 follow_main_container.attr('disabled','disabled'); 1577 1578 $.get(Wo_Ajax_Requests_File(), { 1579 f: 'accept_follow_request', 1580 following_id: user_id 1581 }).always(function () { 1582 1583 main_container.find('.accept-btns').html( 1584 '<button type="button" class="btn btn-mat btn-main" disabled><i class="fa fa-user-check"></i> Friends</button>' 1585 ); 1586 1587 var count_badge = $('.requests-container .new-update-alert'); 1588 var current_count = parseInt(count_badge.text(), 10) || 0; 1589 var new_count = Math.max(current_count - 1, 0); 1590 1591 count_badge.text(new_count); 1592 1593 if (new_count === 0) { 1594 count_badge.addClass('hidden'); 1595 } 1596 }); 1597} 1598 1599function Wo_DeleteFollowGroupRequest(group_id) { 1600 var main_container = $('.user-group-request-' + group_id); 1601 var follow_main_container = main_container.find('#delete-' + group_id); 1602 follow_main_container.attr('disabled','disabled'); 1603 $.get(Wo_Ajax_Requests_File(), { 1604 f: 'chat', 1605 s: 'delete_group_request', 1606 group_id: group_id 1607 }, function (data) { 1608 if(data.status == 200) { 1609 main_container.remove(); 1610 } 1611 }); 1612} 1613 1614function Wo_AcceptFollowGroupRequest(group_id) { 1615 var main_container = $('.user-group-request-' + group_id); 1616 var follow_main_container = main_container.find('#accept-' + group_id); 1617 follow_main_container.attr('disabled','disabled'); 1618 $.get(Wo_Ajax_Requests_File(), { 1619 f: 'chat', 1620 s: 'accept_group_request', 1621 group_id: group_id 1622 }, function (data) { 1623 if(data.status == 200) { 1624 main_container.remove(); 1625 } 1626 }); 1627} 1628 1629function Wo_StartRepositioner() { 1630 $('.user-cover-reposition-w').hide(); 1631 $('.user-reposition-container').show(); 1632 $('.cover-resize-buttons').show(); 1633 $('.default-buttons').hide(); 1634 $('.when-notedit').hide(); 1635 $('.when-edit').show(); 1636 $('.user-reposition-dragable-container').show(); 1637 $('.profile-cover-changer').show(); 1638 $('.wo_user_profile .card.hovercard .pic-info-cont, .problackback').fadeOut(); 1639 $('.screen-width').val($('.user-reposition-container').width()); 1640 $('.user-reposition-container img').css('cursor', '-webkit-grab').draggable({ 1641 scroll: false, 1642 axis: "y", 1643 cursor: "-webkit-grab", 1644 drag: function (event, ui) { 1645 y1 = $('.user-cover-reposition-container').height(); 1646 y2 = $('.user-reposition-container').find('img').height(); 1647 if (ui.position.top >= 0) { 1648 ui.position.top = 0; 1649 }else 1650 if (ui.position.top <= (y1-y2)) { 1651 ui.position.top = y1-y2; 1652 } 1653 }, 1654 stop: function(event, ui) { 1655 $('input.cover-position').val(ui.position.top); 1656 } 1657 }); 1658} 1659 1660function Wo_SubmitRepositioner() { 1661 if ($('input.cover-position').length == 1) { 1662 posY = $('input.cover-position').val(); 1663 $('form.cover-position-form').submit(); 1664 } 1665} 1666 1667function Wo_StopRepositioner() { 1668 $('.when-notedit').show(); 1669 $('.when-edit').hide(); 1670 $('.user-cover-reposition-w').show(); 1671 $('.user-reposition-container').hide(); 1672 $('.cover-resize-buttons').hide(); 1673 $('.default-buttons').show(); 1674 $('input.cover-position').val(0); 1675 $('.wo_user_profile .card.hovercard .pic-info-cont, .problackback').fadeIn(); 1676 $('.user-reposition-container img').draggable('destroy').css('cursor','default'); 1677} 1678// delete follow request 1679function Wo_DeleteFollowRequest(user_id) { 1680 var main_container = $('.user-follow-request-' + user_id); 1681 var follow_main_container = main_container.find('#delete-' + user_id); 1682 follow_main_container.attr('disabled','disabled'); 1683 $.get(Wo_Ajax_Requests_File(), { 1684 f: 'delete_follow_request', 1685 following_id: user_id 1686 }, function (data) { 1687 if(data.status == 200) { 1688 main_container.remove(); 1689 //main_container.find('.accept-btns').html(data.html); 1690 } 1691 }); 1692} 1693 1694// open chat tab 1695 1696 1697/* ========================================================= 1698 KIFO LIVEKIT WEB CALLS 1699========================================================= */ 1700 1701window.kifoIncomingCallLock = false;
1702 1703async function KifoStartVideoCall(targetUserId) { 1704 1705 try { 1706 1707 const r = await fetch('/kifo_api/web_start_call.php', { 1708 method: 'POST', 1709 headers: { 1710 'Content-Type': 'application/x-www-form-urlencoded' 1711 }, 1712 body: 1713 'receiver_halafeek_id=' + encodeURIComponent(targetUserId) + 1714 '&call_type=video' 1715 }); 1716 1717 const data = await r.json(); 1718 1719 console.log('Kifo start call:', data); 1720 1721 if (!data.success) { 1722 alert(data.message || 'Failed to start call'); 1723 return; 1724 } 1725 1726 KifoShowOutgoingCall(data); 1727 1728 } catch(e) { 1729 1730 console.error(e); 1731 alert('Call failed'); 1732 1733 } 1734} 1735 1736function KifoShowOutgoingCall(data) { 1737 1738 const modal = document.createElement('div'); 1739 1740 modal.id = 'kifo-outgoing-call'; 1741 1742 modal.innerHTML = ` 1743 <div style=" 1744 position:fixed; 1745 inset:0; 1746 background:rgba(0,0,0,.75); 1747 z-index:999999; 1748 display:flex; 1749 align-items:center; 1750 justify-content:center; 1751 "> 1752 <div style=" 1753 width:380px; 1754 max-width:95%; 1755 background:#121826; 1756 border-radius:28px; 1757 padding:40px 30px; 1758 text-align:center; 1759 color:#fff; 1760 box-shadow:0 20px 80px rgba(0,0,0,.45); 1761 "> 1762 1763 <img src="${data.receiver_avatar}" style=" 1764 width:110px; 1765 height:110px; 1766 border-radius:50%; 1767 object-fit:cover; 1768 margin-bottom:20px; 1769 "> 1770 1771 <h2 style=" 1772 margin:0; 1773 font-size:28px; 1774 font-weight:700; 1775 "> 1776 ${data.receiver_name} 1777 </h2> 1778 1779 <p style=" 1780 opacity:.7; 1781 margin-top:10px; 1782 font-size:18px; 1783 "> 1784 Calling... 1785 </p> 1786 1787 <div style=" 1788 margin-top:35px; 1789 display:flex; 1790 justify-content:center; 1791 "> 1792 1793 <button 1794 onclick="KifoCancelOutgoingCall()" 1795 style=" 1796 width:72px; 1797 height:72px; 1798 border:none; 1799 border-radius:50%; 1800 background:#ff4d67; 1801 color:#fff; 1802 font-size:28px; 1803 cursor:pointer; 1804 " 1805 > 1806 â 1807 </button> 1808 1809 </div> 1810 1811 </div> 1812 </div> 1813 `; 1814 1815 document.body.appendChild(modal); 1816 1817 KifoPollCallAnswer(data.call_id); 1818} 1819 1820async function KifoPollCallAnswer(callId) { 1821 1822 const intv = setInterval(async () => { 1823 1824 try { 1825 1826 const r = await fetch( 1827 '/kifo_api/web_get_call_status.php?call_id=' + callId 1828 ); 1829 1830 const data = await r.json(); 1831 1832 console.log('Call status:', data); 1833 1834 if (!data.success) return; 1835 1836 if (data.status === 'accepted') { 1837 1838 clearInterval(intv); 1839 1840 const m = document.getElementById('kifo-outgoing-call'); 1841 1842 if (m) m.remove(); 1843 1844 window.location = 1845 '/kifo_web_call.php?room=' + 1846 encodeURIComponent(data.room) + 1847 '&call_id=' + callId; 1848 } 1849 1850 if ( 1851 data.status === 'rejected' || 1852 data.status === 'ended' 1853 ) { 1854 1855 clearInterval(intv); 1856 1857 const m = document.getElementById('kifo-outgoing-call'); 1858 1859 if (m) m.remove(); 1860 } 1861 1862 } catch(e) { 1863 1864 console.error(e); 1865 1866 } 1867 1868 }, 2000); 1869} 1870 1871function KifoCancelOutgoingCall() { 1872 1873 const m = document.getElementById('kifo-outgoing-call'); 1874 1875 if (m) m.remove(); 1876} 1877 1878async function KifoCheckIncomingCalls() { 1879 /* Kifo incoming checker */ 1880 1881 1882 if (window.kifoIncomingCallLock) return; 1883 1884 try { 1885 1886 const r = await fetch('/kifo_api/web_get_incoming_calls.php'); 1887 1888 const data = await r.json(); 1889 1890 /* incoming call response received */ 1891 1892 if ( 1893 !data.success || 1894 !data.calls || 1895 !data.calls.length 1896 ) { 1897 return; 1898 } 1899 1900 const call = data.calls[0]; 1901 1902 window.kifoIncomingCallLock = true; 1903
1904 const url = '/kifo_web_call.php?call_id=' + encodeURIComponent(call.call_id) + '&incoming=1'; 1905 1906 const width = 420; 1907 const height = 760; 1908 const left = Math.max(0, (screen.width - width) / 2); 1909 const top = Math.max(0, (screen.height - height) / 2); 1910 1911 if (window.kifoIncomingCallWindow && !window.kifoIncomingCallWindow.closed) { 1912 try { window.kifoIncomingCallWindow.focus(); } catch(e) {} 1913 } else { 1914 window.kifoIncomingCallWindow = window.open( 1915 url, 1916 'kifoIncomingCall', 1917 `width=${width},height=${height},left=${left},top=${top},resizable=yes` 1918 ); 1919 1920 if (window.kifoIncomingCallWindow) { 1921 try { window.kifoIncomingCallWindow.focus(); } catch(e) {} 1922 } 1923 } 1924 1925 } catch(e) { 1926 1927 console.error(e); 1928 1929 } 1930} 1931 1932 1933function KifoShowIncomingCall(call) { 1934 1935 if (document.hidden && 'Notification' in window) { 1936 1937 if (Notification.permission === 'granted') { 1938 1939 try { 1940 1941 const n = new Notification( 1942 (call.caller_name || 'Kifo'), 1943 { 1944 body: 'Incoming ' + (call.call_type || 'video') + ' call', 1945 icon: call.avatar || '/themes/wondertag/img/icon.png', 1946 requireInteraction: true 1947 } 1948 ); 1949 1950 n.onclick = function() { 1951 window.focus(); 1952 n.close(); 1953 }; 1954 1955 } catch(e) { 1956 console.error(e); 1957 } 1958 } 1959 } 1960 1961 const oldTitle = document.title; 1962 1963 let flashState = false; 1964 1965 if (window.kifoIncomingTitleInterval) { 1966 clearInterval(window.kifoIncomingTitleInterval); 1967 } 1968 1969 window.kifoIncomingTitleInterval = setInterval(() => { 1970 1971 flashState = !flashState; 1972 1973 document.title = flashState 1974 ? 'ð Incoming Call...' 1975 : oldTitle; 1976 1977 }, 1000); 1978 1979 1980 const url = 1981 '/kifo_web_call.php?call_id=' + 1982 encodeURIComponent(call.call_id) + 1983 '&incoming=1'; 1984 1985 const width = 420; 1986 const height = 760; 1987 1988 const left = Math.max(0, (screen.width - width) / 2); 1989 const top = Math.max(0, (screen.height - height) / 2); 1990 1991 if ( 1992 window.kifoIncomingCallWindow && 1993 !window.kifoIncomingCallWindow.closed 1994 ) { 1995 1996 try { 1997 window.kifoIncomingCallWindow.focus(); 1998 } catch(e) {} 1999 2000 return; 2001 } 2002 2003 window.kifoIncomingCallWindow = window.open( 2004 url, 2005 'kifoIncomingCall', 2006 `width=${width},height=${height},left=${left},top=${top},resizable=yes` 2007 ); 2008 2009 if (window.kifoIncomingCallWindow) { 2010 2011 try { 2012 window.kifoIncomingCallWindow.focus(); 2013 } catch(e) {} 2014 2015 if (window.kifoIncomingCallFocusInterval) { 2016 clearInterval(window.kifoIncomingCallFocusInterval); 2017 } 2018 2019 window.kifoIncomingCallFocusInterval = setInterval(() => { 2020 2021 if ( 2022 !window.kifoIncomingCallWindow || 2023 window.kifoIncomingCallWindow.closed 2024 ) { 2025 clearInterval(window.kifoIncomingCallFocusInterval); 2026 return; 2027 } 2028 2029 try { 2030 window.kifoIncomingCallWindow.focus(); 2031 window.focus(); 2032 } catch(e) {} 2033 2034 }, 1500); 2035 } 2036} 2037 2038 2039async function KifoAcceptIncomingCall(callId) { 2040 2041 const r = await fetch('/kifo_api/web_answer_call.php', { 2042 method: 'POST', 2043 headers: { 2044 'Content-Type':'application/x-www-form-urlencoded' 2045 }, 2046 body: 2047 'call_id=' + callId + 2048 '&action=accept' 2049 }); 2050 2051 const data = await r.json(); 2052 2053 console.log(data); 2054 2055 if (data.success) { 2056 2057 const m = document.getElementById('kifo-incoming-call'); 2058 2059 if (m) m.remove(); 2060 2061 window.location = 2062 '/kifo_web_call.php?room=' + 2063 encodeURIComponent(data.room) + 2064 '&call_id=' + callId; 2065 } 2066} 2067 2068async function KifoRejectIncomingCall(callId) { 2069 2070 await fetch('/kifo_api/web_answer_call.php', { 2071 method: 'POST', 2072 headers: { 2073 'Content-Type':'application/x-www-form-urlencoded' 2074 }, 2075 body: 2076 'call_id=' + callId + 2077 '&action=reject' 2078 }); 2079 2080 const m = document.getElementById('kifo-incoming-call'); 2081 2082 if (m) m.remove(); 2083 2084 window.kifoIncomingCallLock = false;
2085} 2086 2087setInterval(KifoCheckIncomingCalls, 15000); 2088 2089/* ========================================================= */ 2090 2091 2092function Wo_OpenChatTab(recipient_id, group_id,product_id = 0,page_id = 0,page_user_id = 0,story_id = 0) { 2093 CheckIfCanUse(); 2094 2095 if ($(".chat_"+recipient_id).length > 0 && story_id == 0) { 2096 SendSeen(recipient_id); 2097 $('.chat_'+recipient_id).find('.online-toggle-hdr').attr('style', ''); 2098 return false; 2099 } 2100 go_to = ''; 2101 2102 if(group_id != 0){ 2103 $("#group_tab_" + group_id).find('.group-lastseen').empty(); 2104 } 2105 if (group_id == null) { 2106 group_id = 0; 2107 } 2108 if (story_id != 0) { 2109 Wo_CloseLightbox(); 2110 } 2111 2112 if(node_socket_flow === "0"){ 2113 $.get(Wo_Ajax_Requests_File(), { 2114 f: 'chat', 2115 s: 'is_chat_on', 2116 recipient_id: recipient_id, 2117 story_id: story_id 2118 }, function (data) { 2119 length = 0; 2120 if ($('body').attr('chat-off')) { 2121 length = $('body').attr('chat-off').length; 2122 } 2123 if(current_width < 768 || length > 0) { 2124 if (page_id > 0) { 2125 document.location = websiteUrl+"/messages/"+page_user_id+"&page="+page_id; 2126 } 2127 else{ 2128 go_to = data.url; 2129 // document.location = data.url; 2130 } 2131 return false; 2132 } 2133 if(data.chat != 1 && group_id === 0) { 2134 document.location = data.url; 2135 return false; 2136 } 2137 }); 2138 } 2139 if(current_width < 768) { 2140 $.get(Wo_Ajax_Requests_File(), { 2141 f: 'chat', 2142 s: 'close_chat', 2143 recipient_id: recipient_id, 2144 story_id: story_id 2145 }, function (data) { 2146 if(node_socket_flow !== "0"){ 2147 go_to = data.url; 2148 } 2149 }); 2150 //return false; 2151 } 2152 placement = 1; 2153 if ($('.chat-wrapper').length == 1) { 2154 placement = 2; 2155 } else if ($('.chat-wrapper').length == 2) { 2156 placement = 3; 2157 } 2158 var loading_icon = '<svg width="50px" height="50px" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100" preserveAspectRatio="xMidYMid"><rect x="0" y="0" width="100" height="100" fill="none" class="bk"></rect><circle cx="50" cy="50" r="40" stroke="#fff" fill="none" stroke-width="11" stroke-linecap="round"><animate attributeName="stroke-dashoffset" dur="1.5s" repeatCount="indefinite" from="0" to="502"></animate><animate attributeName="stroke-dasharray" dur="1.5s" repeatCount="indefinite" values="150.6 100.4;1 250;150.6 100.4"></animate></circle></svg>'; 2159 $('#online_' + recipient_id).find('.new-message-alert').html('0').hide(); 2160 if (group_id) { 2161 var loading_div = $('.chat-container').find('#group_tab_' + group_id).find('.chat-loading-icon'); 2162 }else{ 2163 var loading_div = $('.chat-container').find('#online_' + recipient_id).find('.chat-loading-icon'); 2164 } 2165 2166 loading_div.html(loading_icon); 2167 chat_container = $('.chat-container'); 2168 $(document.body).attr('data-chat-recipient-'+recipient_id, recipient_id); 2169 $('.chat-wrapper').show(); 2170 /* var data_html = '<div class="chat-wrapper" id="chat_"><div class="online-toggle pointer" onclick="javascript:$(\'.chat-tab-container\').slideToggle(100);"><a style="color:#fff;" href=""><span class="chat-tab-status">
2170......</span></a></div><div class="chat-tab-container"><div class="chat-messages-wrapper"><div class="chat-messages"></div><div class="clear"></div></div><div class="chat-textarea btn-group"><div class="emo-container"></div><form action="#" method="post" class="chat-sending-form"><textarea name="textSendMessage" disabled id="sendMessage" class="form-control" cols="10" rows="5" placeholder="" onkeydown="Wo_SubmitChatForm(event);" onfocus="Wo_SubmitChatForm(event);" dir="auto"></textarea><input type="hidden" id="user-id" name="user_id" value="" /></form></div></div></div>'; 2171 $('.chat-tab').append('<span class="chat_main chat_main_"></span>'); 2172 $('.chat_main_').append(data_html); */ 2173 $.get(Wo_Ajax_Requests_File(), { 2174 f: 'chat', 2175 s: 'load_chat_tab', 2176 recipient_id: recipient_id, 2177 placement:placement, 2178 group_id:group_id, 2179 page_id:page_id, 2180 page_user_id:page_user_id, 2181 story_id:story_id 2182 }, function (data) { 2183 if(data.status == 200) { 2184 if (go_to != '') { 2185 document.location = go_to; 2186 } 2187 2188 if ($('.chat-wrapper').length == 3) { 2189 if ($('.chat_main_' + recipient_id).length == 0) { 2190 $('.chat_main:first-child').remove(); 2191 $('.chat-tab').append('<span class="chat_main chat_main_' + recipient_id +'"></span>'); 2192 } else { 2193 $('.chat_main_' + recipient_id).remove(); 2194 } 2195 $('.chat_main_' + recipient_id).html(data.html).hide().fadeIn(100); 2196 } else { 2197 if ($('.chat_main_' + recipient_id).length > 0) { 2198 $('.chat_main_' + recipient_id).html(data.html).hide().fadeIn(100); 2199 } else { 2200 $('.chat-tab').append('<span class="chat_main chat_main_' + recipient_id +'"></span>'); 2201 $('.chat_main_' + recipient_id).html(data.html).hide().fadeIn(100); 2202 } 2203 } 2204 if (page_id > 0) { 2205 setTimeout(function () { 2206 2207 $('.page-messages-wrapper-'+page_id).scrollTop($('.page-messages-wrapper-'+page_id)[0].scrollHeight); 2208 2209 }, 1000); 2210 2211 } 2212 $('.chat-wrapper').fadeIn(200); 2213 loading_div.empty(); 2214 $('.chat-textarea textarea').keyup(); 2215 if (group_id == 0 && page_id == 0) { 2216 setTimeout(function () { 2217 $.get(Wo_Ajax_Requests_File(), { 2218 f: 'chat', 2219 s: 'load_chat_messages', 2220 recipient_id: recipient_id, 2221 product_id: product_id 2222 }, function (data) { 2223 Wo_intervalUpdates(); 2224 if (data.messages.length > 0) { 2225 $('.chat-tab').find('.chat_' + recipient_id).find('.chat-messages').html(data.messages); 2226 } else { 2227 $('.chat_' + recipient_id).find('.chat-user-desc').addClass('chat-user-desc-show'); 2228 } 2229 if (node_socket_flow === "1") { 2230 var chat_container = $('.chat-tab').find('.chat_main_' + recipient_id); 2231 var last_id = chat_container.find('.messages-text:last').attr('data-message-id'); 2232 socket.emit("is_chat_on", { 2233 message_id: last_id, 2234 user_id: _getCookie("user_id"), 2235 recipient_id: recipient_id 2236 }) 2237 } 2238 if ($('.chat-messages-wrapper').length > 0) { 2239 setTimeout(function () { 2240 $('.chat-messages-wrapper').scrollTop($('.chat-messages-wrapper')[0].scrollHeight); 2241 }, 1000); 2242 } 2243 if (node_socket_flow == "1") { 2244 socket.emit("count_unseen_messages", { user_id: _getCookie("user_id") }); 2245 } 2246 }); 2247 }, 300); 2248 }else if(group_id!==0){ 2249 if (node_socket_flow === "1") { 2250 var chat_container = $('.chat-tab').find('.chat_main_' + group_id); 2251 var last_id = chat_container.find('.messages-text:last').attr('data-message-id'); 2252 socket.emit("is_chat_on", { 2253 message_id: last_id, 2254 user_id: _getCookie("user_id"), 2255 recipient_id: group_id, 2256 isGroup: true 2257 }) 2258 } 2259 } 2260 } 2261 }); 2262} 2263 2264function Wo_SearchForPosts(query) { 2265 var type = ''; 2266 if ($('.page-margin').attr('data-page') == "timeline") { 2267 type = 'user'; 2268 } else if ($('.page-margin').attr('data-page') == "page"){ 2269 type = 'page'; 2270 } else if ($('.page-margin').attr('data-page') == "group") { 2271 type = 'group' 2272 } else { 2273 return false;
2274 } 2275 Wo_progressIconLoader($('.search-for-posts-container')); 2276 var id = $('.page-margin').attr('data-id'); 2277 if (id == null || id == "undefined") { 2278 return false; 2279 } 2280 $.get(Wo_Ajax_Requests_File(), {f:'posts', s:'search_for_posts', id: id, search_query: query, type: type}, function (data) { 2281 if (data.status == 200) { 2282 $('#posts').html(data.html); 2283 } 2284 Wo_progressIconLoader($('.search-for-posts-container')); 2285 }); 2286} 2287 2288function Wo_Fetch(id, post_id) { 2289 var clickedOnBody = true; 2290 var user_from_post_id = '#post-' + post_id; 2291 var user_from_image = '#post-' + post_id + ' .post-heading'; 2292 var div = '.user-fetch-post-' + post_id + '-user-' + id; 2293 var bla = user_from_post_id + ', ' + div; 2294 clearTimeout(timeout); 2295 $(div).fadeIn(200); 2296 var timeout; 2297 function hidepanel() { 2298 $(div).fadeOut(0); 2299 } 2300 $(div).mouseleave(doTimeout); 2301 $(user_from_image).mouseleave(doTimeout); 2302 function doTimeout(){ 2303 clearTimeout(timeout); 2304 timeout = setTimeout(hidepanel, 0); 2305 } 2306} 2307 2308function Wo_RequestVerification(id, type) { 2309 $.get(Wo_Ajax_Requests_File(), {f:'request_verification', id:id, type:type}, function(data) { 2310 if (data.status == 200) { 2311 $('#verification-request').html(data.html); 2312 } 2313 }); 2314} 2315 2316function Wo_DeleteUserVerification(id, type) { 2317 if (confirm("Are you sure ?") == false) { 2318 return false; 2319 } 2320 $.get(Wo_Ajax_Requests_File(), {f:'delete_verification', id:id, type:type}, function(data) { 2321 if (data.status == 200) { 2322 $('#verification-request').html(data.html); 2323 } 2324 }); 2325} 2326 2327function Wo_RemoveVerification(id, type) { 2328 $.get(Wo_Ajax_Requests_File(), {f:'remove_verification', id:id, type:type}, function(data) { 2329 if (data.status == 200) { 2330 $('#verification-request').html(data.html); 2331 } 2332 }); 2333} 2334 2335$('body').on('mouseenter', '.user-popover', function() { 2336 var popover = $(this); 2337 var type = popover.attr('data-type'); 2338 var id = popover.attr('data-id'); 2339 var placement = popover.attr('data-placement') || 'none'; 2340 var placement_code = 'user-details not-profile'; 2341 if (placement == 'profile') { 2342 placement_code = 'user-details'; 2343 } 2344 var over_time = setTimeout(function() { 2345 var offset = popover.offset(); 2346 var posY = (offset.top - $(window).scrollTop()) + popover.height(); 2347 var posX = offset.left - $(window).scrollLeft(); 2348 var available = $(window).width() - posX; 2349 if ($(window).width() > 800) { 2350 if (available < 400) { 2351 var right = available - popover.width(); 2352 if (posY > 0) { 2353 $('body').append('<div class="' + placement_code + ' right" style="position: fixed; top: ' + posY + 'px; right:' + right + 'px"><div class="loading-user"><div class="skel tag_pop_skel_cover"></div><div class="valign tag_profile_popover"><div class="user-avatar"><div class="skel skel_50"></div></div><div class="full_width"><div class="skel skel_2 skel_noti_name"></div><div class="skel skel_2 skel_noti_time"></div><div class="skel skel_2 skel_noti_time"></div></div></div></div></div>'); 2354 } 2355 } else { 2356 if (posY > 0) { 2357 $('body').append('<div class="' + placement_code + '" style="position: fixed; top: ' + posY + 'px; left:' + posX + 'px"><div class="loading-user"><div class="skel tag_pop_skel_cover"></div><div class="valign tag_profile_popover"><div class="user-avatar"><div class="skel skel_50"></div></div><div class="full_width"><div class="skel skel_2 skel_noti_name"></div><div class="skel skel_2 skel_noti_time"></div><div class="skel skel_2 skel_noti_time"></div></div></div></div></div>'); 2358 } 2359 } 2360 } 2361 $.get(Wo_Ajax_Requests_File(), {f:'popover', id:id, type:type}, function(data) { 2362 if (data.status == 200) { 2363 $('.user-details').html(data.html); 2364 } 2365 }); 2366 }, 1000); 2367 popover.data('timeout', over_time); 2368}); 2369 2370$('body').on('mouseleave', '.user-popover', function(e) { 2371 var to = e.toElement || e.relatedTarget; 2372 if (!$(to).is(".user-details")) { 2373 clearTimeout($(this).data('timeout')); 2374 $('.user-details').remove(); 2375 } 2376}); 2377$('body').on('mouseleave', '.user-details', function() { 2378 $('.user-details').remove(); 2379}); 2380function Wo_OpenAlbumLightBox(image_id, type) { 2381 $('body').addClass('no_scroll'); 2382 $('body').append('<div class="lightbox-container"><div class="tag_lboxside_skel"><div class="valign tag_lbox_toolbar"><div class="valign"><div class="btn btn-mat close-lightbox" onclick="Wo_CloseLightbox();"><svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" width="24" height="24">
2382<path fill="currentColor" d="M7.828 11H20v2H7.828l5.364 5.364-1.414 1.414L4 12l7.778-7.778 1.414 1.414z"></path></svg></div></div></div></div></div>'); 2383 $.get(Wo_Ajax_Requests_File(), {f:'open_album_lightbox', image_id:image_id, type:type}, function(data) { 2384 if (data.status == 200) { 2385 $('body').addClass('no_scroll'); 2386 $('.lightbox-container').html(data.html); 2387 } 2388 if (data.html.length == 0) { 2389 $('body').removeClass('no_scroll'); 2390 } 2391 }); 2392} 2393function Wo_CloseLightbox() { 2394 $('.lightbox-container').remove(); 2395 $('body').removeClass('no_scroll'); 2396} 2397function Wo_OpenLightBox(post_id) { 2398 Wo_CloseLightbox(); 2399 $('video').each(function(index, el) { 2400 $(this).get(0).pause(); 2401 }); 2402 $('body').addClass('no_scroll'); 2403 $('#contnet').append('<div class="lightbox-container"><div class="tag_lboxside_skel"><div class="valign tag_lbox_toolbar"><div class="valign"><div class="btn btn-mat close-lightbox" onclick="Wo_CloseLightbox();"><svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" width="24" height="24"><path fill="currentColor" d="M7.828 11H20v2H7.828l5.364 5.364-1.414 1.414L4 12l7.778-7.778 1.414 1.414z"></path></svg></div></div></div><div class="tag_lboxside_skel_white"><div class="valign"><div class="skel skel_50 skel_avatar"></div><div><div class="skel skel_2 skel_noti_name"></div><div class="skel skel_2 skel_noti_time"></div></div></div><hr class="style-two tag_lbox_skel_hr"><div class="valign tag_lbox_skel_foot"><div class="skel skel_50 skel_avatar"></div><div class="skel skel_2 tag_lbox_skel_tbox"></div></div></div></div></div>'); 2404 $.get(Wo_Ajax_Requests_File(), {f:'open_lightbox', post_id:post_id}, function(data) { 2405 if (data.redirect) { 2406 window.location.href = data.redirect; 2407 return; 2408 } 2409 if (data.status == 200) { 2410 $('body').addClass('no_scroll'); 2411 $('.lightbox-container').html(data.html); 2412 if ($('[data-page-type="watch"]').length > 0 && $('.lightbox-container').find('video').length > 0) { 2413 $('.lightbox-container').find('video').get(0).play(); 2414 } 2415 } 2416 if (data.html.length == 0) { 2417 $('body').removeClass('no_scroll'); 2418 } 2419 }); 2420} 2421function Wo_OpenMultiLightBox(url) { 2422 $('body').append('<div class="lightbox-container"><div class="lightbox-backgrond" onclick="Wo_CloseLightbox();"></div><div class="lb-preloader" style="display:block"><svg width="50px" height="50px" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100" preserveAspectRatio="xMidYMid"><rect x="0" y="0" width="100" height="100" fill="none" class="bk"></rect><circle cx="50" cy="50" r="40" stroke="#676d76" fill="none" stroke-width="6" stroke-linecap="round"><animate attributeName="stroke-dashoffset" dur="1.5s" repeatCount="indefinite" from="0" to="502"></animate><animate attributeName="stroke-dasharray" dur="1.5s" repeatCount="indefinite" values="150.6 100.4;1 250;150.6 100.4"></animate></circle></svg></div></div>'); 2423 $.post(Wo_Ajax_Requests_File() + '?f=open_multilightbox', {url:url}, function(data) { 2424 if (data.status == 200) { 2425 $('body').addClass('no_scroll'); 2426 $('.lightbox-container').html(data.html); 2427 } 2428 if (data.html.length == 0) { 2429 $('body').removeClass('no_scroll'); 2430 } 2431 }); 2432} 2433function Wo_NextAlbumPicture(post_id, id) { 2434 Wo_CloseLightbox(); 2435 $('body').addClass('no_scroll'); 2436 $('body').append('<div class="lightbox-container"><div class="tag_lboxside_skel"><div class="valign tag_lbox_toolbar"><div class="valign"><div class="btn btn-mat close-lightbox" onclick="Wo_CloseLightbox();"><svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" width="24" height="24"><path fill="currentColor" d="M7.828 11H20v2H7.828l5.364 5.364-1.414 1.414L4 12l7.778-7.778 1.414 1.414z"></path></svg></div></div></div></div></div>'); 2437 $.get(Wo_Ajax_Requests_File(), {f:'get_next_album_image', post_id:post_id, after_image_id:id}, function(data) { 2438 if (data.status == 200) { 2439 $('body').addClass('no_scroll'); 2440 $('.lightbox-container').html(data.html); 2441 $( ".changer").fadeIn(200); 2442 } 2443 if (data.html.length == 0) { 2444 $('body').removeClass('no_scroll'); 2445 } 2446 }); 2447} 2448function Wo_PreviousAlbumPicture(post_id, id) { 2449 Wo_CloseLightbox(); 2450 $('body').addClass('no_scroll'); 2451 $('body').append('<div class="lightbox-container"><div class="tag_lboxside_skel"><div class="valign tag_lbox_toolbar"><div class="valign"><div class="btn btn-mat close-lightbox" onclick="Wo_CloseLightbox();"><svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" width="24" height="24">
2451<path fill="currentColor" d="M7.828 11H20v2H7.828l5.364 5.364-1.414 1.414L4 12l7.778-7.778 1.414 1.414z"></path></svg></div></div></div></div></div>'); 2452 $.get(Wo_Ajax_Requests_File(), {f:'get_previous_album_image', post_id:post_id, before_image_id:id}, function(data) { 2453 if (data.status == 200) { 2454 $('body').addClass('no_scroll'); 2455 $('.lightbox-container').html(data.html); 2456 $( ".changer").fadeIn(200); 2457 } 2458 if (data.html.length == 0) { 2459 $('body').removeClass('no_scroll'); 2460 } 2461 }); 2462} 2463 2464function Wo_NextPicture(post_id) { 2465 var id = 0; 2466 var type = 'none'; 2467 if(typeof ($('[data-page=timeline]').attr('data-id')) == "string") { 2468 id = $('[data-page=timeline]').attr('data-id'); 2469 type = 'profile'; 2470 } else if(typeof ($('[data-page=page]').attr('data-id')) == "string") { 2471 id = $('[data-page=page]').attr('data-id'); 2472 type = 'page'; 2473 } else if (typeof ($('[data-page=group]').attr('data-id')) == "string") { 2474 id = $('[data-page=group]').attr('data-id'); 2475 type = 'group'; 2476 } 2477 Wo_CloseLightbox(); 2478 $('body').addClass('no_scroll'); 2479 $('body').append('<div class="lightbox-container"><div class="tag_lboxside_skel"><div class="valign tag_lbox_toolbar"><div class="valign"><div class="btn btn-mat close-lightbox" onclick="Wo_CloseLightbox();"><svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" width="24" height="24"><path fill="currentColor" d="M7.828 11H20v2H7.828l5.364 5.364-1.414 1.414L4 12l7.778-7.778 1.414 1.414z"></path></svg></div></div></div><div class="tag_lboxside_skel_white"><div class="valign"><div class="skel skel_50 skel_avatar"></div><div><div class="skel skel_2 skel_noti_name"></div><div class="skel skel_2 skel_noti_time"></div></div></div><hr class="style-two tag_lbox_skel_hr"><div class="valign tag_lbox_skel_foot"><div class="skel skel_50 skel_avatar"></div><div class="skel skel_2 tag_lbox_skel_tbox"></div></div></div></div></div>'); 2480 $.get(Wo_Ajax_Requests_File(), {f:'get_next_image', post_id:post_id, type:type, id:id}, function(data) { 2481 if (data.status == 200) { 2482 $('body').addClass('no_scroll'); 2483 $('.lightbox-container').html(data.html); 2484 $( ".changer" ).fadeIn(200); 2485 } 2486 if (data.html.length == 0) { 2487 $('body').removeClass('no_scroll'); 2488 } 2489 }); 2490} 2491 2492function Wo_PreviousPicture(post_id) { 2493 var id = 0; 2494 var type = 'none'; 2495 if(typeof ($('[data-page=timeline]').attr('data-id')) == "string") { 2496 id = $('[data-page=timeline]').attr('data-id'); 2497 type = 'profile'; 2498 } else if(typeof ($('[data-page=page]').attr('data-id')) == "string") { 2499 id = $('[data-page=page]').attr('data-id'); 2500 type = 'page'; 2501 } else if (typeof ($('[data-page=group]').attr('data-id')) == "string") { 2502 id = $('[data-page=group]').attr('data-id'); 2503 type = 'group'; 2504 } 2505 Wo_CloseLightbox(); 2506 $('body').addClass('no_scroll'); 2507 $('body').append('<div class="lightbox-container"><div class="tag_lboxside_skel"><div class="valign tag_lbox_toolbar"><div class="valign"><div class="btn btn-mat close-lightbox" onclick="Wo_CloseLightbox();"><svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" width="24" height="24"><path fill="currentColor" d="M7.828 11H20v2H7.828l5.364 5.364-1.414 1.414L4 12l7.778-7.778 1.414 1.414z"></path></svg></div></div></div><div class="tag_lboxside_skel_white"><div class="valign"><div class="skel skel_50 skel_avatar"></div><div><div class="skel skel_2 skel_noti_name"></div><div class="skel skel_2 skel_noti_time"></div></div></div><hr class="style-two tag_lbox_skel_hr"><div class="valign tag_lbox_skel_foot"><div class="skel skel_50 skel_avatar"></div><div class="skel skel_2 tag_lbox_skel_tbox"></div></div></div></div></div>'); 2508 $.get(Wo_Ajax_Requests_File(), {f:'get_previous_image', post_id:post_id, type:type, id:id}, function(data) { 2509 if (data.status == 200) { 2510 $('body').addClass('no_scroll'); 2511 $('.lightbox-container').html(data.html); 2512 $( ".changer" ).fadeIn(200); 2513 } 2514 if (data.html.length == 0) { 2515 $('body').removeClass('no_scroll'); 2516 } 2517 }); 2518} 2519 2520function Wo_NextVideo(post_id) { 2521 var id = 0; 2522 var type = 'reels'; 2523 if(typeof ($('[data-page=timeline]').attr('data-id')) == "string") { 2524 id = $('[data-page=timeline]').attr('data-id'); 2525 type = 'profile'; 2526 id = $('[data-page=page]').attr('data-id'); 2527 type = 'page'; 2528 } else if (typeof ($('[data-page=group]').attr('data-id')) == "string") { 2529 id = $('[data-page=group]').attr('data-id'); 2530 type = 'group'; 2531 } else if ($('[data-page-type=watch]').length > 0) { 2532 type = 'watch'; 2533 } 2534 2535 $('.lightbox-content').remove(); 2536 Wo_CloseLightbox(); 2537 $('body').addClass('no_scroll'); 2538 $('body').append('<div class="lightbox-container"><div class="tag_lboxside_skel"><div class="valign tag_lbox_toolbar"><div class="valign"><div class="btn btn-mat close-lightbox" onclick="Wo_CloseLightbox();"><svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" width="24" height="24">
2538<path fill="currentColor" d="M7.828 11H20v2H7.828l5.364 5.364-1.414 1.414L4 12l7.778-7.778 1.414 1.414z"></path></svg></div></div></div><div class="tag_lboxside_skel_white"><div class="valign"><div class="skel skel_50 skel_avatar"></div><div><div class="skel skel_2 skel_noti_name"></div><div class="skel skel_2 skel_noti_time"></div></div></div><hr class="style-two tag_lbox_skel_hr"><div class="valign tag_lbox_skel_foot"><div class="skel skel_50 skel_avatar"></div><div class="skel skel_2 tag_lbox_skel_tbox"></div></div></div></div></div>'); 2539 2540 $.get(Wo_Ajax_Requests_File(), {f:'get_next_video', post_id:post_id, type:type, id:id}, function(data) { 2541 if (data.status == 200) { 2542 $('body').addClass('no_scroll'); 2543 $(`.plyrr-${data.post_id}`).removeClass(`plyrr-${data.post_id} video-container`); 2544 $('.lightbox-container').html(data.html); 2545 $( ".changer" ).fadeIn(200); 2546 } 2547 if (!data.html) { 2548 if (type == 'reels') { 2549 window.location.reload() 2550 } 2551 return; 2552 } 2553 2554 if (data.html && data.html.length == 0) { 2555 $('body').removeClass('no_scroll'); 2556 } 2557 if (type == 'reels' && data.html.length > 0) { 2558 window.history.pushState({}, "", data.url); 2559 } 2560 }); 2561} 2562 2563function Wo_PreviousVideo(post_id) { 2564 var id = 0; 2565 var type = 'reels'; 2566 if(typeof ($('[data-page=timeline]').attr('data-id')) == "string") { 2567 id = $('[data-page=timeline]').attr('data-id'); 2568 type = 'profile'; 2569 } else if(typeof ($('[data-page=page]').attr('data-id')) == "string") { 2570 id = $('[data-page=page]').attr('data-id'); 2571 type = 'page'; 2572 } else if (typeof ($('[data-page=group]').attr('data-id')) == "string") { 2573 id = $('[data-page=group]').attr('data-id'); 2574 type = 'group'; 2575 } else if ($('[data-page-type=watch]').length > 0) { 2576 type = 'watch'; 2577 } 2578 $('.lightbox-content').remove(); 2579 Wo_CloseLightbox(); 2580 $('body').addClass('no_scroll'); 2581 $('body').append('<div class="lightbox-container"><div class="tag_lboxside_skel"><div class="valign tag_lbox_toolbar"><div class="valign"><div class="btn btn-mat close-lightbox" onclick="Wo_CloseLightbox();"><svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" width="24" height="24"><path fill="currentColor" d="M7.828 11H20v2H7.828l5.364 5.364-1.414 1.414L4 12l7.778-7.778 1.414 1.414z"></path></svg></div></div></div><div class="tag_lboxside_skel_white"><div class="valign"><div class="skel skel_50 skel_avatar"></div><div><div class="skel skel_2 skel_noti_name"></div><div class="skel skel_2 skel_noti_time"></div></div></div><hr class="style-two tag_lbox_skel_hr"><div class="valign tag_lbox_skel_foot"><div class="skel skel_50 skel_avatar"></div><div class="skel skel_2 tag_lbox_skel_tbox"></div></div></div></div></div>'); 2582 2583 $.get(Wo_Ajax_Requests_File(), {f:'get_previous_video', post_id:post_id, type:type, id:id}, function(data) { 2584 if (data.status == 200) { 2585 $('body').addClass('no_scroll'); 2586 $('.lightbox-container').html(data.html); 2587 $( ".changer" ).fadeIn(200); 2588 } 2589 if (!data.html) { 2590 if (type == 'reels') { 2591 window.location.reload() 2592 } 2593 return; 2594 } 2595 if (data.html.length == 0) { 2596 $('body').removeClass('no_scroll'); 2597 } 2598 if (type == 'reels' && data.html.length > 0) { 2599 window.history.pushState({}, "", data.url); 2600 } 2601 }); 2602} 2603 2604function Wo_AcceptJoinGroup(user_id, group_id) { 2605 $.get(Wo_Ajax_Requests_File(), {f:'groups', s:'accept_request', user_id:user_id, group_id:group_id}, function(data) { 2606 if (data.status == 200) { 2607 if (node_socket_flow == "1") { 2608 socket.emit("user_notification", { to_id: user_id, user_id: _getCookie("user_id"), type: "added" }); 2609 } 2610 $('#request-' + user_id).fadeOut(300, function () { 2611 $(this).remove(); 2612 }); 2613 } 2614 }); 2615} 2616 2617function Wo_DeleteJoinGroup(user_id, group_id) { 2618 $.get(Wo_Ajax_Requests_File(), {f:'groups', s:'delete_request', user_id:user_id, group_id:group_id}, function(data) { 2619 if (data.status == 200) { 2620 if (node_socket_flow == "1") { 2621 socket.emit("user_notification", { to_id: user_id, user_id: _getCookie("user_id"), type: "added" }); 2622 } 2623 $('#request-' + user_id).fadeOut(300, function () { 2624 $(this).remove(); 2625 }); 2626 } 2627 }); 2628} 2629 2630function Wo_DeleteJoinedUser(user_id, group_id) { 2631 $.get(Wo_Ajax_Requests_File(), {f:'groups', s:'delete_joined_user', user_id:user_id, group_id:group_id}, function(data) { 2632 if (data.status == 200) { 2633 $('#member-' + user_id).fadeOut(300, function () { 2634 $(this).remove(); 2635 }); 2636 } 2637 }); 2638} 2639 2640function Wo_OpenReplyBox(id) { 2641 Wo_ViewMoreReplies(id); 2642 $('#comment_' + id).find('.comment-replies').slideDown(50, function () { 2643 $('#comment_' + id).find('.comment-reply').slideDown(50); 2644 }); 2645} 2646// register post comment 2647function Wo_RegisterReply(text, comment_id, user_id, event, page_id, type) { 2648 if(event.keyCode == 13 && event.shiftKey == 0) { 2649 comment_wrapper = $('[id=comment_' + comment_id + ']'); 2650 reply_textarea = comment_wrapper.find('.comment-replies'); 2651 textarea_wrapper = reply_textarea.find('.textarea'); 2652 reply_list = comment_wrapper.find('.comment-replies-text'); 2653 var comment_src_image = $('#comment_src_image_'+comment_id); 2654 var comment_image = ''; 2655 if (comment_src_image.length > 0) { 2656 comment_image = comment_src_image.val(); 2657 } 2658 2659 if(text == '' && comment_image == '') { 2660 return false;
2661 } 2662 $.post(Wo_Ajax_Requests_File() + '?f=posts&s=register_reply', { 2663 comment_id: comment_id, 2664 text: text, 2665 user_id: user_id, 2666 page_id: page_id, 2667 comment_image: comment_image 2668 }, function (data) { 2669 textarea_wrapper.val('').css("cssText", "height: 32px;"); 2670 if(data.status == 200) { 2671 if (node_socket_flow == "1") { 2672 socket.emit("comment_notification", { comment_id: comment_id, user_id: _getCookie("user_id"), type: "added", for: "replies" }); 2673 } 2674 if (data.mention.length > 0 && node_socket_flow == "1") { 2675 $.each(data.mention, function( index, value ) { 2676 socket.emit("user_notification", { to_id: value, user_id: _getCookie("user_id")}); 2677 }); 2678 } 2679 $('.comment-image-con').empty(); 2680 $('#comment_src_image_'+comment_id).val(''); 2681 $('#comment_src_image_'+comment_id).val(''); 2682 $('#comment_reply_image_' + comment_id).val(''); 2683 Wo_OpenReplyBox(comment_id); 2684 comment_wrapper.find('.reply-container:last-child').after(data.html); 2685 comment_wrapper.find('[id=comment-replies]').html(data.replies_num); 2686 } 2687 }); 2688 } 2689} 2690// register post comment 2691function Wo_RegisterReply2(comment_id, user_id, page_id, type,gif_url = '') { 2692 $('.chat-box-stickers-cont').html(''); 2693 $('#gif-form-'+comment_id).slideUp(200); 2694 comment_wrapper = $('[id=comment_' + comment_id + ']'); 2695 text = $('#comment_'+comment_id).find('.comment-reply-textarea').val(); 2696 2697 reply_textarea = comment_wrapper.find('.comment-replies'); 2698 textarea_wrapper = reply_textarea.find('.textarea'); 2699 reply_list = comment_wrapper.find('.comment-replies-text'); 2700 var comment_src_image = $('#comment_src_image_'+comment_id); 2701 var comment_image = ''; 2702 if (comment_src_image.length > 0) { 2703 comment_image = comment_src_image.val(); 2704 } 2705 2706 if(text == '' && comment_image == '' && gif_url == '') { 2707 return false; 2708 } 2709 $.post(Wo_Ajax_Requests_File() + '?f=posts&s=register_reply', { 2710 comment_id: comment_id, 2711 text: text, 2712 user_id: user_id, 2713 page_id: page_id, 2714 comment_image: comment_image, 2715 gif_url: gif_url 2716 }, function (data) { 2717 if (node_socket_flow == "1") { 2718 socket.emit("comment_notification", { comment_id: comment_id, user_id: _getCookie("user_id"), type: "added", for: "replies" }); 2719 } 2720 if (data.mention.length > 0 && node_socket_flow == "1") { 2721 $.each(data.mention, function( index, value ) { 2722 socket.emit("user_notification", { to_id: value, user_id: _getCookie("user_id")}); 2723 }); 2724 } 2725 textarea_wrapper.val(''); 2726 if(data.status == 200) { 2727 $('.comment-image-con').empty(); 2728 $('#comment_src_image_'+comment_id).val(''); 2729 $('#comment_src_image_'+comment_id).val(''); 2730 $('#comment_reply_image_' + comment_id).val(''); 2731 Wo_OpenReplyBox(comment_id); 2732 comment_wrapper.find('.reply-container:last-child').after(data.html); 2733 comment_wrapper.find('[id=comment-replies]').html(data.replies_num); 2734 } 2735 }); 2736} 2737 2738function Wo_ViewMoreReplies(comment_id) { 2739 main_wrapper = $('[id=comment_' + comment_id + ']'); 2740 view_more_wrapper = main_wrapper.find('.view-more-replies'); 2741 Wo_progressIconLoader(view_more_wrapper); 2742 $.get(Wo_Ajax_Requests_File(), { 2743 f: 'posts', 2744 s: 'load_more_replies', 2745 comment_id: comment_id 2746 }, function (data) { 2747 if(data.status == 200) { 2748 main_wrapper.find('.comment-replies-text').html(data.html); 2749 main_wrapper.find('.comment-reply').fadeIn(100); 2750 view_more_wrapper.remove(); 2751 } 2752 }); 2753} 2754 2755function Wo_RegsiterRecent(id, type) { 2756 $.get(Wo_Ajax_Requests_File(), { 2757 f: 'register_recent_search', 2758 id: id, 2759 type:type 2760 }, function (data) { 2761 if(data.status == 200) { 2762 window.location.href = data.href; 2763 } 2764 }); 2765} 2766 2767function Wo_RemoveAlbumImage(post_id, id) { 2768 $.get(Wo_Ajax_Requests_File(), { 2769 f: 'delete_album_image', 2770 id: id, 2771 post_id: post_id 2772 }, function (data) { 2773 if(data.status == 200) { 2774 $('#post-' + post_id).find('#image-' + id).fadeOut(200, function () { 2775 $(this).remove(); 2776 }); 2777 $('div[data_image_parent="image-' + post_id + '"]').remove(); 2778 } 2779 }); 2780} 2781 2782function Wo_RegisterInvite(user_id, page_id) { 2783 Wo_progressIconLoader($('#invite-' + user_id).find('button')); 2784 $.get(Wo_Ajax_Requests_File(), { 2785 f: 'register_page_invite', 2786 user_id: user_id, 2787 page_id: page_id 2788 }, function (data) { 2789 if(data.status == 200) { 2790 if (node_socket_flow == "1") { 2791 socket.emit("user_notification", { to_id: user_id, user_id: _getCookie("user_id"), type: "added" }); 2792 } 2793 $('#invite-' + user_id).fadeOut(200, function () { 2794 $(this).remove(); 2795 }); 2796 } 2797 }); 2798} 2799 2800function Wo_RegisterAddGroup(user_id, group_id) { 2801 Wo_progressIconLoader($('#add-' + user_id).find('button')); 2802 $.get(Wo_Ajax_Requests_File(), { 2803 f: 'register_group_add', 2804 user_id: user_id, 2805 group_id: group_id 2806 }, function (data) { 2807 if(data.status == 200) { 2808 if (node_socket_flow == "1") { 2809 socket.emit("user_notification", { to_id: user_id, user_id: _getCookie("user_id"), type: "added" }); 2810 } 2811 $('#add-' + user_id).fadeOut(200, function () { 2812 $(this).remove(); 2813 }); 2814 } 2815 }); 2816} 2817 2818function Wo_SkipStep(type) { 2819 $.get(Wo_Ajax_Requests_File(), { 2820 f: 'skip_step', 2821 type: type 2822 }, function (data) { 2823 if(data.status == 200) { 2824 window.location.reload(); 2825 } 2826 }); 2827}
2828function Wo_AddEmoToCommentInput(post_id, code, type) { 2829 inputTag = $('[id=post-' + post_id + ']').find('.comment-textarea'); 2830 if (type == 'lightbox-post-footer') { 2831 inputTag = $('.lightbox-post-footer').find('.comment-textarea'); 2832 } 2833 inputVal = inputTag.val(); 2834 if (typeof(inputTag.attr('placeholder')) != "undefined") { 2835 inputPlaceholder = inputTag.attr('placeholder'); 2836 if (inputPlaceholder == inputVal) { 2837 inputTag.val(''); 2838 inputVal = inputTag.val(); 2839 } 2840 } 2841 if (inputVal.length == 0) { 2842 inputTag.val(code + ' '); 2843 } else { 2844 inputTag.val(inputVal + ' ' + code); 2845 } 2846 inputTag.keyup().focus(); 2847} 2848function Wo_SendMessages() { 2849 $.get(Wo_Ajax_Requests_File(), {f: 'send_mails'}); 2850} 2851// request permission on page load 2852document.addEventListener('DOMContentLoaded', function () { 2853 if (Notification.permission !== "granted") 2854 Notification.requestPermission(); 2855}); 2856 2857function Wo_NotifyMe(icon, title, notification_text, url) { 2858 if (!Notification) { 2859 return; 2860 } 2861 if (Notification.permission !== "granted") 2862 Notification.requestPermission(); 2863 else { 2864 var notification = new Notification(title, { 2865 icon: icon, 2866 body: notification_text, 2867 }); 2868 2869 notification.onclick = function () { 2870 2871 if (window.kifoIncomingCallWindow && !window.kifoIncomingCallWindow.closed) { 2872 try { 2873 window.kifoIncomingCallWindow.focus(); 2874 } catch(e) {} 2875 } else { 2876 2877 const width = 420; 2878 const height = 760; 2879 2880 const left = Math.max(0, (screen.width - width) / 2); 2881 const top = Math.max(0, (screen.height - height) / 2); 2882 2883 window.kifoIncomingCallWindow = window.open( 2884 url, 2885 'kifoIncomingCall', 2886 `width=${width},height=${height},left=${left},top=${top},resizable=yes` 2887 ); 2888 2889 if (window.kifoIncomingCallWindow) { 2890 2891 try { 2892 window.kifoIncomingCallWindow.focus(); 2893 } catch(e) {} 2894 2895 if (window.kifoIncomingCallFocusInterval) { 2896 clearInterval(window.kifoIncomingCallFocusInterval); 2897 } 2898 2899 window.kifoIncomingCallFocusInterval = setInterval(() => { 2900 2901 if ( 2902 !window.kifoIncomingCallWindow || 2903 window.kifoIncomingCallWindow.closed 2904 ) { 2905 clearInterval(window.kifoIncomingCallFocusInterval); 2906 return; 2907 } 2908 2909 try { 2910 window.kifoIncomingCallWindow.focus(); 2911 window.focus(); 2912 } catch(e) {} 2913 2914 }, 1500); 2915 } 2916 } 2917 2918 notification.close(); 2919 Wo_OpenNotificationsMenu(); 2920 }; 2921 } 2922} 2923function Wo_CheckForCallAnswer(id) { 2924 $.get(Wo_Ajax_Requests_File(), {f:'check_for_answer', id:id}, function (data1) { 2925 if (data1.status == 200) { 2926 clearTimeout(checkcalls); 2927 $('#calling-modal').find('p').html(data1.text_answered + ". " + data1.text_please_wait); 2928 setTimeout(function () { 2929 window.location.href = data1.url; 2930 }, 1000); 2931 return false; 2932 } else if (data1.status == 400) { 2933 clearTimeout(checkcalls); 2934 Wo_PlayAudioCall('stop'); 2935 $('#calling-modal').find('p').html(data1.text_call_declined + ". " + data1.text_call_declined_desc); 2936 } 2937 checkcalls = setTimeout(function () { 2938 Wo_CheckForCallAnswer(id); 2939 }, 2000); 2940 }); 2941} 2942 2943function Wo_CheckForAudioCallAnswer(id) { 2944 $.get(Wo_Ajax_Requests_File(), {f:'check_for_audio_answer', id:id}, function (data1) { 2945 if (data1.status == 200) { 2946 clearTimeout(checkcalls); 2947 $('#calling-modal').find('p').html(data1.text_answered + ". " + data1.text_please_wait); 2948 Wo_PlayAudioCall('stop'); 2949 setTimeout(function () { 2950 $( '#calling-modal' ).remove(); 2951 $( '.modal-backdrop' ).remove(); 2952 $( 'body' ).removeClass( "modal-open" ); 2953 $('body').append(data1.calls_html); 2954 $('#re-talking-modal').modal({ 2955 show: true 2956 }); 2957 }, 3000); 2958 } else if (data1.status == 400) { 2959 clearTimeout(checkcalls); 2960 Wo_PlayAudioCall('stop');
2961 $('#calling-modal').find('p').html(data1.text_call_declined + ". " + data1.text_call_declined_desc); 2962 } else { 2963 checkcalls = setTimeout(function () { 2964 Wo_CheckForAudioCallAnswer(id); 2965 }, 2000); 2966 } 2967 }); 2968} 2969 2970function Wo_AnswerCall(id, url, type) { 2971 type1 = 'video'; 2972 if (type == 'video') { 2973 type1 = 'video'; 2974 } else if (type == 'audio') { 2975 type1 = 'audio'; 2976 } 2977 $('#re-calling-modal').find('.btn').attr('disabled','disabled'); 2978 $.get(Wo_Ajax_Requests_File(), {f:'answer_call', id:id, type:type1}, function (data) { 2979 Wo_PlayVideoCall('stop'); 2980 if (type1 == 'video') { 2981 if (data.status == 200) { 2982 window.location.href = url; 2983 } 2984 } else { 2985 $( '#re-calling-modal' ).remove(); 2986 $( '.modal-backdrop' ).remove(); 2987 $( 'body' ).removeClass( "modal-open" ); 2988 $('body').removeClass('tag_call_incoming'); 2989 $('body').append(data.calls_html); 2990 $('#re-talking-modal').modal({ 2991 show: true 2992 }); 2993 } 2994 }); 2995} 2996function Wo_DeclineCall(id, url, type) { 2997 type1 = 'video'; 2998 if (type == 'video') { 2999 type1 = 'video'; 3000 } else if (type == 'audio') { 3001 type1 = 'audio'; 3002 } 3003 $('#re-calling-modal').find('.btn').attr('disabled','disabled'); 3004 $.get(Wo_Ajax_Requests_File(), {f:'decline_call', id:id, type:type1}, function (data) { 3005 if (data.status == 200) { 3006 if (node_socket_flow == "1") { 3007 socket.emit("decline_call", {user_id: _getCookie("user_id") }); 3008 } 3009 Wo_PlayVideoCall('stop'); 3010 Wo_PlayAudioCall('stop'); 3011 $( '#re-calling-modal' ).remove(); 3012 $( '.modal-backdrop' ).remove(); 3013 $( 'body' ).removeClass( "modal-open" ); 3014 $('body').removeClass('tag_call_incoming'); 3015 } 3016 }); 3017} 3018 3019function Wo_CloseCall(id) { 3020 $('#re-talking-modal').find('.decline-call').attr('disabled','disabled'); 3021 $.get(Wo_Ajax_Requests_File(), {f:'close_call', id:id}, function (data) { 3022 if (data.status == 200) { 3023 $( '#re-talking-modal' ).remove(); 3024 $( '.modal-backdrop' ).remove(); 3025 $( 'body' ).removeClass( "modal-open"); 3026 } 3027 }); 3028} 3029 3030function Wo_CancelCall() { 3031 $('#calling-modal').find('.cancel-call').attr('disabled','disabled'); 3032 $.get(Wo_Ajax_Requests_File(), {f:'cancel_call'}, function (data) { 3033 if (data.status == 200) { 3034 Wo_PlayAudioCall('stop'); 3035 $( '#calling-modal' ).remove(); 3036 $( '.modal-backdrop' ).remove(); 3037 $( 'body' ).removeClass( "modal-open" ); 3038 } 3039 }); 3040} 3041 3042 3043 3044function Wo_GenerateVideoCall(user_id1, user_id2) { 3045 if (window.Wo_GenerateVideoCall && window.Wo_GenerateVideoCall.__kifoOverride) { 3046 return window.Wo_GenerateVideoCall(user_id1, user_id2); 3047 } 3048 console.log('[KIFO fallback video] override file not loaded yet'); 3049} 3050 3051 3052 3053 3054 3055 3056function Wo_GenerateVoiceCall(user_id1, user_id2) { 3057 if (window.Wo_GenerateVoiceCall && window.Wo_GenerateVoiceCall.__kifoOverride) { 3058 return window.Wo_GenerateVoiceCall(user_id1, user_id2); 3059 } 3060 console.log('[KIFO fallback voice] override file not loaded yet'); 3061} 3062 3063 3064 3065function Wo_PlayAudioCall(type) { 3066 if (type == 'play') { 3067 document.getElementById('calling-sound').play(); 3068 window.playmusic_ = setTimeout(function() { 3069 Wo_PlayAudioCall('play'); 3070 }, 100); 3071 } else { 3072 clearTimeout(window.playmusic_); 3073 document.getElementById('calling-sound').pause(); 3074 } 3075} 3076function Wo_PlayVideoCall(type) { 3077 if (type == 'play') { 3078 document.getElementById('video-calling-sound').play(); 3079 window.playmusic = setTimeout(function() { 3080 Wo_PlayVideoCall('play'); 3081 }, 100); 3082 } else { 3083 clearTimeout(window.playmusic); 3084 document.getElementById('video-calling-sound').pause(); 3085 } 3086} 3087function textAreaAdjust(o, h, n) { 3088 if (n == 'lightbox') { 3089 recording_node = "comm"; 3090 } else { 3091 o.style.height = h + 'px'; 3092 o.style.height = (5+o.scrollHeight)+"px"; 3093 } 3094 if (n == 'comm') { 3095 recording_node = "comm"; 3096 } 3097} 3098 3099function textAreaAdjustTag(o, n) { 3100 if (n == 'lightbox') { 3101 recording_node = "comm"; 3102 } else { 3103 } 3104 if (n == 'comm') { 3105 recording_node = "comm"; 3106 } 3107} 3108 3109function Wo_MarkAsSold(post_id, product_id) { 3110 var post = $('#post-' + post_id); 3111 post.find('.tag_post_men_disable').show(); 3112 $.get(Wo_Ajax_Requests_File(), { 3113 f: 'posts', 3114 s: 'mark_as_sold_post', 3115 post_id: post_id, 3116 product_id: product_id 3117 }, function (data) { 3118 if(data.status == 200) { 3119 post.find('.product-status').text(data.text); 3120 $("body").snackbar({ 3121 message: data.text 3122 }); 3123 post.find('.tag_post_men_disable').hide(); 3124 post.find('.mark-as-sold-post').html('').hide(); 3125 } 3126 }); 3127} 3128 3129function Wo_VoteUp(id) { 3130 var $vote_con = $('#option-' + id); 3131 var $post_id = $vote_con.attr('data-post-id'); 3132 if ($post_id.length == 0) { 3133 return false;
3134 } 3135 $is_voted = $('#post-' + $post_id).find('.options').attr('data-vote'); 3136 if ($is_voted.length == 0) { 3137 return false; 3138 } 3139 if ($is_voted == 'false') { 3140 $('#post-' + $post_id).find('.wo_votes').addClass('active_all'); 3141 $vote_con.addClass('active'); 3142 } 3143 $('#post-' + $post_id).find('.options').attr('data-vote', true); 3144 $.get(Wo_Ajax_Requests_File(), {f:'vote_up', id:id}, function (data) { 3145 if (data.status == 200) { 3146 $('#post-' + $post_id).find('.result-bar-parent').removeClass('hidden'); 3147 $('#post-' + $post_id).find('.answer-vote').removeClass('hidden'); 3148 data.votes.forEach(function(option) { 3149 $('#post-' + $post_id).find('#total-votes').text(option.all); 3150 $('#option-' + option.id).find('.answer-vote').html(option.percentage); 3151 if (option.percentage_num > 0) { 3152 $('#option-' + option.id).find('.result-bar').text(' ').css('width', option.percentage); 3153 } 3154 }); 3155 } else if (data.status == 400) { 3156 $("body").snackbar({ 3157 message: data.text 3158 }); 3159 } 3160 }); 3161} 3162 3163function Wo_UploadReplyCommentImage(id) { 3164 var image_container = $('#post-' + id); 3165 var fetched_image = $('.comment-reply-image-'+id); 3166 var data = new FormData(); 3167 data.append('image', $('#comment_reply_image_' + id).prop('files')[0]); 3168 fetched_image.html('<div class="skel skel_comm_img"></div>'); 3169 $.ajax({ 3170 type: "POST", 3171 url: Wo_Ajax_Requests_File() + '?f=upload_image&id=' + id, 3172 data: data, 3173 processData: false, 3174 contentType: false, 3175 success: function (data) { 3176 if (data.status == 200) { 3177 fetched_image.html(''); 3178 fetched_image.html('<img src="' + data.image + '"><div class="remove-icon" onclick="Wo_EmptyReplyCommentImage(' + id + ')"><svg xmlns="http://www.w3.org/2000/svg" height="22" viewBox="0 0 24 24" width="22"><path fill="currentColor" d="M18.3 5.71c-.39-.39-1.02-.39-1.41 0L12 10.59 7.11 5.7c-.39-.39-1.02-.39-1.41 0-.39.39-.39 1.02 0 1.41L10.59 12 5.7 16.89c-.39.39-.39 1.02 0 1.41.39.39 1.02.39 1.41 0L12 13.41l4.89 4.89c.39.39 1.02.39 1.41 0 .39-.39.39-1.02 0-1.41L13.41 12l4.89-4.89c.38-.38.38-1.02 0-1.4z"/></svg></div>'); 3179 $('#comment_src_image_' + id).val(data.image_src); 3180 fetched_image.removeClass('hidden'); 3181 image_container.find('.comment-reply-textarea').focus(); 3182 } 3183 //fetched_image.html(''); 3184 } 3185 }); 3186} 3187function Wo_EmptyReplyCommentImage(id) { 3188 var image_container = $('#post-' + id); 3189 var fetched_image = $('.comment-reply-image-'+id); 3190 $('.comment-image-con').empty(); 3191 $('#comment_src_image_'+id).val(''); 3192 $('#comment_src_image_'+id).val(''); 3193 $('#comment_reply_image_' + id).val(''); 3194} 3195 3196 3197function Wo_UploadCommentImage(id) { 3198 var image_container = $('#post-' + id); 3199 var fetched_image = image_container.find('#comment-image'); 3200 var data = new FormData(); 3201 data.append('image', $('#comment_image_' + id).prop('files')[0]); 3202 fetched_image.html('<div class="skel skel_comm_img"></div>'); 3203 $.ajax({ 3204 type: "POST", 3205 url: Wo_Ajax_Requests_File() + '?f=upload_image&id=' + id, 3206 data: data, 3207 processData: false, 3208 contentType: false, 3209 success: function (data) { 3210 if (data.status == 200) { 3211 fetched_image.html(''); 3212 fetched_image.html('<img src="' + data.image + '"><div class="remove-icon" onclick="Wo_EmptyCommentImage(' + id + ')"><svg xmlns="http://www.w3.org/2000/svg" height="22" viewBox="0 0 24 24" width="22"><path fill="currentColor" d="M18.3 5.71c-.39-.39-1.02-.39-1.41 0L12 10.59 7.11 5.7c-.39-.39-1.02-.39-1.41 0-.39.39-.39 1.02 0 1.41L10.59 12 5.7 16.89c-.39.39-.39 1.02 0 1.41.39.39 1.02.39 1.41 0L12 13.41l4.89 4.89c.39.39 1.02.39 1.41 0 .39-.39.39-1.02 0-1.41L13.41 12l4.89-4.89c.38-.38.38-1.02 0-1.4z"/></svg></div>'); 3213 image_container.find('#comment_src_image').val(data.image_src); 3214 fetched_image.removeClass('hidden'); 3215 image_container.find('.comment-textarea').focus(); 3216 } 3217 //fetched_image.html(''); 3218 } 3219 }); 3220} 3221 3222function Wo_EmptyCommentImage(id) { 3223 var image_container = $('#post-' + id); 3224 var fetched_image = image_container.find('#comment-image'); 3225 image_container.find('.comment-image-con').empty().addClass('hidden'); 3226 image_container.find('#comment_src_image').val(''); 3227 image_container.find('#comment_src_image').val(''); 3228 image_container.find('#comment_image_' + id).val(''); 3229} 3230 3231function Wo_TurnOffSound() { 3232 var sound = $('.turn-off-sound'); 3233 $.get(Wo_Ajax_Requests_File(), { 3234 f: 'turn-off-sound' 3235 }, function (data) { 3236 if(data.status == 200) { 3237 sound.html(data.message); 3238 } 3239 }); 3240} 3241 3242function Wo_Del_Article(id) { 3243 $('#delete-blog').find('.disable_btn').attr('disabled','disabled'); 3244 $.ajax({ 3245 type: "GET", 3246 url: Wo_Ajax_Requests_File(), 3247 data: { 3248 id: id, 3249 f: 'delete-my-blog' 3250 }, 3251 dataType: 'json', 3252 success: function(data) { 3253 if (data['status'] == 200) { 3254 $("#delete-blog").modal("hide"); 3255 $("div[data-rm-blog='" + data['id'] + "']").fadeOut(function() { 3256 $(this).remove() 3257 }); 3258 } 3259 $('#delete-blog').find('.disable_btn').removeAttr("disabled"); 3260 } 3261 }); 3262} 3263 3264function Wo_DelReply(id) { 3265 if (!id) { 3266 return false;
3267 }else{ 3268 3269 Wo_progressIconLoader($('#delete-reply').find('button')); 3270 $.ajax({ 3271 type: "GET", 3272 url: Wo_Ajax_Requests_File(), 3273 data: { 3274 id: id, 3275 f: 'delete-reply' 3276 }, 3277 dataType: 'json', 3278 success: function(data) { 3279 if (data['status'] == 200) { 3280 $("#delete-reply").modal("hide"); 3281 $("[data-thread-reply='" + id + "']").slideUp(function() { 3282 $(this).remove() 3283 }); 3284 } 3285 Wo_progressIconLoader($('#delete-reply').find('button')); 3286 } 3287 }); 3288 } 3289} 3290 3291function Wo_DelThread(id) { 3292 if (!id) { 3293 return false; 3294 }else{ 3295 3296 Wo_progressIconLoader($('#delete-thread').find('button')); 3297 $.ajax({ 3298 type: "GET", 3299 url: Wo_Ajax_Requests_File(), 3300 data: { 3301 id: id, 3302 f: 'delete-thread' 3303 }, 3304 dataType: 'json', 3305 success: function(data) { 3306 if (data['status'] == 200) { 3307 $("#delete-thread").modal("hide"); 3308 $("[data-thread-ident='" + id + "']").slideUp(function() { 3309 $(this).remove() 3310 }); 3311 } 3312 Wo_progressIconLoader($('#delete-thread').find('button')); 3313 } 3314 }); 3315 } 3316} 3317var Wo_Delay = (function(){ 3318 var timer = 0; 3319 return function(callback, ms){ 3320 clearTimeout (timer); 3321 timer = setTimeout(callback, ms); 3322 }; 3323})(); 3324function Wo_AddVideoViews(post_id){ 3325 $('.video-js').each(function(index, el) { 3326 if ($(this).attr('data-post-video') != post_id) { 3327 $(this).get(0).pause(); 3328 } 3329 }); 3330 if (post_id && typeof(Number(post_id)) == 'number' && post_id > 0) { 3331 Wo_Delay(function(){ 3332 $.ajax({ 3333 url: Wo_Ajax_Requests_File(), 3334 type: 'GET', 3335 dataType: 'json', 3336 data: {f:'posts', s:'add-video-view',post_id:post_id}, 3337 }) 3338 .done(function(data) { 3339 if (data.status == 200) { 3340 $("#video-views-count-"+post_id).text(data.views); 3341 $("span[data-post-video-views="+post_id+"]").text(data.views); 3342 $("video[data-post-video="+post_id+"]").removeAttr('onplay'); 3343 } 3344 }) 3345 },5000) 3346 } 3347 } 3348function Wo_DeleteStatus(id){ 3349 if (!id || !confirm('Are you sure you want to delete your status?')) { 3350 return false; 3351 } 3352 3353 $.ajax({ 3354 url: Wo_Ajax_Requests_File(), 3355 type: 'GET', 3356 dataType: 'json', 3357 data: {f: 'status',s:'remove',id:id}, 3358 }) 3359 .done(function(data) { 3360 if (data.status == 200) { 3361 location.reload(); 3362 $("[data-status-id='"+id+"']").slideUp(function(){ 3363 $(this).remove(); 3364 }) 3365 } 3366 }) 3367 .fail(function() { 3368 console.log("error"); 3369 }) 3370} 3371 3372function Wo_StoryProgress(){ 3373 $('.mfp-progress-line').html('<span width="0"></span>').find('span').delay(1).queue(function () { 3374 $(this).css('width', '100%') 3375 }); 3376} 3377 3378 3379function Wo_EditReplyComment(id){ 3380 if (!id) { return false;} 3381 var self = $("div[data-post-comm-reply-edit='"+id+"']").toggleClass('hidden'); 3382 //self.find('textarea').val($("div[data-post-comm-reply-text='"+id+"']").text().trim()); 3383} 3384 3385function Wo_UpdatCommReply(id,event,self){ 3386 if (!id || !event || !self) { 3387 return false; 3388 } 3389 3390 else if (event.keyCode == 13 && event.shiftKey == 0) { 3391 var text = $(self).val(); 3392 var id = id; 3393 $.ajax({ 3394 url: Wo_Ajax_Requests_File() + "?f=posts&s=update-reply", 3395 type: 'POST', 3396 dataType: 'json', 3397 data: {id:id,text:text}, 3398 }) 3399 .done(function(data) { 3400 if (data.status == 200) { 3401 $("div[data-post-comm-reply-text='"+id+"']").html(data.text); 3402 var edit_box = $("div[data-post-comm-reply-edit='"+id+"']").addClass('hidden'); 3403 edit_box.find('textarea').val(data.orginal); 3404 } 3405 }) 3406 .fail(function() { 3407 console.log("error"); 3408 }) 3409 3410 } 3411 else{ 3412 Wo_Get_Mention(self); 3413 } 3414 3415} 3416 3417function Wo_HidePost(post_id){ 3418 if (!post_id) { 3419 return false; 3420 } 3421 $.ajax({ 3422 url: Wo_Ajax_Requests_File(), 3423 type: 'GET', 3424 dataType: 'json', 3425 data: {f: 'posts',s:'hide_post',post:post_id}, 3426 }) 3427 .done(function(data) { 3428 if (data.status == 200) { 3429 $("#post-"+post_id).slideUp(function(){ 3430 $(this).remove(); 3431 }) 3432 } 3433 }) 3434 .fail(function() { 3435 console.log("error"); 3436 }) 3437} 3438 3439function Wo_SharePostOn(post_id, owner_id,type){ 3440 3441 if (!post_id) { 3442 return false;
3443 } 3444 3445 $('#share_post_modal').modal('hide'); 3446 $('#share_post_modal').remove(); 3447 $.ajax({ 3448 url: Wo_Ajax_Requests_File(), 3449 type: 'GET', 3450 dataType: 'json', 3451 data: {f: 'get_share_post',post_id:post_id}, 3452 }) 3453 .done(function(data) { 3454 if (data.status == 200) { 3455 $('body').append(data.html); 3456 $('#SearchForInputPostId').val(post_id); 3457 $('#SearchForInputTypeId').val(owner_id); 3458 $('#share_post_modal').modal('show'); 3459 } 3460 }) 3461 .fail(function() { 3462 }) 3463 .always(function() { 3464 }); 3465 3466} 3467function SearchFor(self,type){ 3468 name = $(self).val(); 3469 $.ajax({ 3470 url: Wo_Ajax_Requests_File(), 3471 type: 'GET', 3472 dataType: 'json', 3473 data: {f: 'search_for',s:type,name:name}, 3474 }) 3475 .done(function(data) { 3476 if (data.status == 200) { 3477 $(self).autocomplete({ 3478 source: data.info, 3479 select: function (event, ui) { 3480 //if (type == 'group') { 3481 $('#SearchForInputTypeId').val(ui.item.id); 3482 // } 3483 // else if (type == 'page') { 3484 // $('#SearchForInputPage').val(ui.item.id); 3485 // } 3486 // else if (type == 'user') { 3487 // $('#SearchForInputUser').val(ui.item.id); 3488 // } 3489 } 3490 }); 3491 } 3492 else{ 3493 3494 } 3495 }) 3496 .fail(function() { 3497 }) 3498} 3499 3500function Wo_AddGroupUserAdmin(member_id, group_id, self){ 3501 if (!member_id || !group_id || !self) { 3502 return false; 3503 } 3504 $.ajax({ 3505 url: Wo_Ajax_Requests_File(), 3506 type: 'GET', 3507 dataType: 'json', 3508 data: {f: 'groups',s:'add_admin',user_id:member_id,group_id:group_id}, 3509 }) 3510 .done(function(data) { 3511 if (data.status == 200 && data.code == 1) { 3512 $(self).find('span').html('<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" width="24" height="24"><path fill="#bababa" d="M13.41406,12l3.293-3.293A.99989.99989,0,0,0,15.293,7.293L12,10.58594,8.707,7.293A.99989.99989,0,0,0,7.293,8.707L10.58594,12,7.293,15.293A.99989.99989,0,0,0,8.707,16.707L12,13.41406l3.293,3.293A.99989.99989,0,0,0,16.707,15.293Z"></path><path fill="#bababa" opacity="0.2" d="M19.0708,4.9292A9.99962,9.99962,0,1,0,4.9292,19.0708,9.99962,9.99962,0,1,0,19.0708,4.9292ZM16.707,15.293A.99989.99989,0,1,1,15.293,16.707L12,13.41406,8.707,16.707A.99989.99989,0,0,1,7.293,15.293L10.58594,12,7.293,8.707A.99989.99989,0,0,1,8.707,7.293L12,10.58594l3.293-3.293A.99989.99989,0,0,1,16.707,8.707L13.41406,12Z"></path></svg>'); 3513 $('#privileges_admin_'+member_id).slideDown(); 3514 } 3515 else if(data.status == 200 && data.code == 0){ 3516 $(self).find('span').html('<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" width="24" height="24"><path fill="#4CAF50" d="M10.3125,16.09375a.99676.99676,0,0,1-.707-.293L6.793,12.98828A.99989.99989,0,0,1,8.207,11.57422l2.10547,2.10547L15.793,8.19922A.99989.99989,0,0,1,17.207,9.61328l-6.1875,6.1875A.99676.99676,0,0,1,10.3125,16.09375Z" opacity=".99"></path><path fill="#4CAF50" opacity="0.2" d="M12,2A10,10,0,1,0,22,12,10.01146,10.01146,0,0,0,12,2Zm5.207,7.61328-6.1875,6.1875a.99963.99963,0,0,1-1.41406,0L6.793,12.98828A.99989.99989,0,0,1,8.207,11.57422l2.10547,2.10547L15.793,8.19922A.99989.99989,0,0,1,17.207,9.61328Z"></path></svg>'); 3517 $('#privileges_admin_'+member_id).slideUp(); 3518 } 3519 }) 3520 .fail(function() { 3521 console.log("error"); 3522 }) 3523 3524} 3525 3526function Wo_OpenLighteBox(self ,event){ 3527 if (!self || !event) { 3528 return false; 3529 } 3530 event.stopPropagation(); 3531 var url = $(self).attr('data-href'); 3532 $('#modal_light_box').modal('show').find('.image').attr('src', url); 3533} 3534 3535function Wo_UpdateLocation(position) { 3536 if (!position) { 3537 return false; 3538 } 3539 $.post(Wo_Ajax_Requests_File() + '?f=save_user_location', {lat: position.coords.latitude, lng:position.coords.longitude}, function(data, textStatus, xhr) { 3540 if (data.status == 200) { 3541 return true; 3542 } 3543 }); 3544 return false; 3545} 3546 3547 3548var Wo_ElementLoad = function(selector, callback){ 3549 $(selector).each(function(){ 3550 if (this.complete || $(this).height() > 0) { 3551 callback.apply(this); 3552 } 3553 else { 3554 $(this).on('load', function(){ 3555 callback.apply(this); 3556 }); 3557 } 3558 }); 3559}; 3560 3561 3562function Wo_NextProductPicture(product_id, id) { 3563 Wo_CloseLightbox(); 3564 $('body').addClass('no_scroll'); 3565 $('body').append('<div class="lightbox-container"><div class="tag_lboxside_skel"><div class="valign tag_lbox_toolbar"><div class="valign"><div class="btn btn-mat close-lightbox" onclick="Wo_CloseLightbox();"><svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" width="24" height="24">
3565<path fill="currentColor" d="M7.828 11H20v2H7.828l5.364 5.364-1.414 1.414L4 12l7.778-7.778 1.414 1.414z"></path></svg></div></div></div></div></div>'); 3566 $.get(Wo_Ajax_Requests_File(), {f:'get_next_product_image', product_id:product_id, after_image_id:id}, function(data) { 3567 if (data.status == 200) { 3568 $('body').addClass('no_scroll'); 3569 $('.lightbox-container').html(data.html); 3570 $( ".changer").fadeIn(200); 3571 } 3572 if (data.html.length == 0) { 3573 $('body').removeClass('no_scroll'); 3574 } 3575 }); 3576} 3577 3578function Wo_PreviousProductPicture(product_id, id) { 3579 Wo_CloseLightbox(); 3580 $('body').addClass('no_scroll'); 3581 $('body').append('<div class="lightbox-container"><div class="tag_lboxside_skel"><div class="valign tag_lbox_toolbar"><div class="valign"><div class="btn btn-mat close-lightbox" onclick="Wo_CloseLightbox();"><svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" width="24" height="24"><path fill="currentColor" d="M7.828 11H20v2H7.828l5.364 5.364-1.414 1.414L4 12l7.778-7.778 1.414 1.414z"></path></svg></div></div></div></div></div>'); 3582 $.get(Wo_Ajax_Requests_File(), {f:'get_previous_product_image', product_id:product_id, before_image_id:id}, function(data) { 3583 if (data.status == 200) { 3584 $('body').addClass('no_scroll'); 3585 $('.lightbox-container').html(data.html); 3586 $( ".changer").fadeIn(200); 3587 } 3588 if (data.html.length == 0) { 3589 $('body').removeClass('no_scroll'); 3590 } 3591 }); 3592} 3593function decodeHtml(html) { 3594 var txt = document.createElement("textarea"); 3595 txt.innerHTML = html; 3596 return txt.value; 3597} 3598 3599 3600function Wo_IsFileAllowedToUpload(filename, allowed) { 3601 var extension = filename.replace(/^.*\./, '').toLowerCase(); 3602 var allowed_array = allowed.split(','); 3603 if (isInArray(extension, allowed_array)) { 3604 return true; 3605 } 3606 return false; 3607} 3608 3609function isInArray(value, array) { 3610 return array.indexOf(value) > -1; 3611} 3612 3613/*Stickey Sidebar*/ 3614!function(i){i.fn.theiaStickySidebar=function(t){function e(t,e){var a=o(t,e);
3614a||(console.log("TSS: Body width smaller than options.minWidth. Init is delayed."),i(document).on("scroll."+t.namespace,function(t,e){return function(a){var n=o(t,e);n&&i(this).unbind(a)}}(t,e)),i(window).on("resize."+t.namespace,function(t,e){return function(a){var n=o(t,e);n&&i(this).unbind(a)}}(t,e)))}function o(t,e){return t.initialized===!0||!(i("body").width()<t.minWidth)&&(a(t,e),!0)}function a(t,e){t.initialized=!0;var o=i("#theia-sticky-sidebar-stylesheet-"+t.namespace);0===o.length&&i("head").append(i('<style id="theia-sticky-sidebar-stylesheet-'+t.namespace+'">.theiaStickySidebar:after {content: ""; display: table; clear: both;}</style>')),e.each(function(){function e(){a.fixedScrollTop=0,a.sidebar.css({"min-height":"1px"}),a.stickySidebar.css({position:"static",width:"",transform:"none"})}function o(t){var e=t.height();return t.children().each(function(){e=Math.max(e,i(this).height())}),e}var a={};if(a.sidebar=i(this),a.options=t||{},a.container=i(a.options.containerSelector),0==a.container.length&&(a.container=a.sidebar.parent()),a.sidebar.parents().css("-webkit-transform","none"),a.sidebar.css({position:a.options.defaultPosition,overflow:"visible","-webkit-box-sizing":"border-box","-moz-box-sizing":"border-box","box-sizing":"border-box"}),a.stickySidebar=a.sidebar.find(".theiaStickySidebar"),0==a.stickySidebar.length){var s=/(?:text|application)\/(?:x-)?(?:javascript|ecmascript)/i;a.sidebar.find("script").filter(function(i,t){return 0===t.type.length||t.type.match(s)}).remove(),a.stickySidebar=i("<div>").addClass("theiaStickySidebar").append(a.sidebar.children()),a.sidebar.append(a.stickySidebar)}a.marginBottom=parseInt(a.sidebar.css("margin-bottom")),a.paddingTop=parseInt(a.sidebar.css("padding-top")),a.paddingBottom=parseInt(a.sidebar.css("padding-bottom"));var r=a.stickySidebar.offset().top,d=a.stickySidebar.outerHeight();a.stickySidebar.css("padding-top",1),a.stickySidebar.css("padding-bottom",1),r-=a.stickySidebar.offset().top,d=a.stickySidebar.outerHeight()-d-r,0==r?(a.stickySidebar.css("padding-top",0),a.stickySidebarPaddingTop=0):a.stickySidebarPaddingTop=1,0==d?(a.stickySidebar.css("padding-bottom",0),a.stickySidebarPaddingBottom=0):a.stickySidebarPaddingBottom=1,a.previousScrollTop=null,a.fixedScrollTop=0,e(),a.onScroll=function(a){if(a.stickySidebar.is(":visible")){if(i("body").width()<a.options.minWidth)return void e();if(a.options.disableOnResponsiveLayouts){var s=a.sidebar.outerWidth("none"==a.sidebar.css("float"));if(s+50>a.container.width())return void e()}var r=i(document).scrollTop(),d="static";if(r>=a.sidebar.offset().top+(a.paddingTop-a.options.additionalMarginTop)){var c,p=a.paddingTop+t.additionalMarginTop,b=a.paddingBottom+a.marginBottom+t.additionalMarginBottom,l=a.sidebar.offset().top,f=a.sidebar.offset().top+o(a.container),h=0+t.additionalMarginTop,g=a.stickySidebar.outerHeight()+p+b<i(window).height();c=g?h+a.stickySidebar.outerHeight():i(window).height()-a.marginBottom-a.paddingBottom-t.additionalMarginBottom;var u=l-r+a.paddingTop,S=f-r-a.paddingBottom-a.marginBottom,y=a.stickySidebar.offset().top-r,m=a.previousScrollTop-r;"fixed"==a.stickySidebar.css("position")&&"modern"==a.options.sidebarBehavior&&(y+=m),"stick-to-top"==a.options.sidebarBehavior&&(y=t.additionalMarginTop),"stick-to-bottom"==a.options.sidebarBehavior&&(y=c-a.stickySidebar.outerHeight()),y=m>0?Math.min(y,h):Math.max(y,c-a.stickySidebar.outerHeight()),y=Math.max(y,u),y=Math.min(y,S-a.stickySidebar.outerHeight());var k=a.container.height()==a.stickySidebar.outerHeight();d=(k||y!=h)&&(k||y!=c-a.stickySidebar.outerHeight())?r+y-a.sidebar.offset().top-a.paddingTop<=t.additionalMarginTop?"static":"absolute":"fixed"}if("fixed"==d){var v=i(document).scrollLeft();a.stickySidebar.css({position:"fixed",width:n(a.stickySidebar)+"px",transform:"translateY("+y+"px)",left:a.sidebar.offset().left+parseInt(a.sidebar.css("padding-left"))-v+"px",top:"0px"})}else if("absolute"==d){var x={};"absolute"!=a.stickySidebar.css("position")&&(x.position="absolute",x.transform="translateY("+(r+y-a.sidebar.offset().top-a.stickySidebarPaddingTop-a.stickySidebarPaddingBottom)+"px)",x.top="0px"),x.width=n(a.stickySidebar)+"px",x.left="",a.stickySidebar.css(x)}else"static"==d&&e();"static"!=d&&1==a.options.updateSidebarHeight&&a.sidebar.css({"min-height":a.stickySidebar.outerHeight()+a.stickySidebar.offset().top-a.sidebar.offset().top+a.paddingBottom}),a.previousScrollTop=r}},a.onScroll(a),i(document).on("scroll."+a.options.namespace,function(i){return function(){i.onScroll(i)}}(a)),i(window).on("resize."+a.options.namespace,function(i){return function(){i.stickySidebar.css({position:"static"}),i.onScroll(i)}}(a)),"undefined"!=typeof ResizeSensor&&new ResizeSensor(a.stickySidebar[0],function(i){return function(){i.onScroll(i)}}(a))})}function n(i){var t;try{t=i[0].getBoundingClientRect().width}catch(i){}return"undefined"==typeof t&&(t=i.width()),t}var s={containerSelector:"",additionalMarginTop:0,additionalMarginBottom:0,updateSidebarHeight:!0,minWidth:0,disableOnResponsiveLayouts:!0,sidebarBehavior:"modern",defaultPosition:"relative",namespace:"TSS"};return t=i.extend(s,t),t.additionalMarginTop=parseInt(t.additionalMarginTop)||0,t.additionalMarginBottom=parseInt(t.additionalMarginBottom)||
36140,e(t,this),this}}(jQuery); 3615 3616 3617 3618/*! 3619 * Snackbar 3620 */ 3621$.fn.snackbar=function(a){var t=this,i=$('<div class="snackbar"></div>');$(".snackbar").remove();var s,e,o=7,n="This is a snackbar. (snackbar.js)",c=!1,r="UNDO",d=!1;if(void 0!=a&&(void 0!=a.primary&&(s=a.primary),void 0!=a.accent&&(e=a.accent),void 0!=a.duration&&(o=a.duration),void 0!=a.message&&(n=a.message),void 0!=a.optionText&&(r=a.optionText,r.length>0&&(c=!0)),void 0!=a.swipe&&(d=a.swipe),void 0==a.callback&&(a.callback=function(){}),i.callback=a.callback),/Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent)&&(i.css({width:"100%",left:"0",bottom:"0"}),d=!1),$message=$('<span class="snackbar-message"></span>'),$message.text(n),void 0!=s&&$message.css("color",s),i.append($message),c&&($option=$('<span class="snackbar-option"></span>'),$option.text(r),void 0!=e&&$option.css("color",e),i.append($option)),t.append(i),$(i).show("drop",{direction:"down"},300),d){var l=$(i).offset().left;i.draggable({axis:"x",start:function(a,t){startX=a.clientX},drag:function(a,t){startX-a.clientX>100&&i.css("opacity",1-(startX-a.clientX-100)/200),a.clientX-startX>100&&i.css("opacity",1-(a.clientX-startX-100)/200)},stop:function(a,t){startX-a.clientX>100&&i.hide("drop",{direction:"left"},300),a.clientX-startX>100&&i.hide("drop",{direction:"right"},300),startX-a.clientX<100&&($(this).animate({left:l},250),i.css("opacity",1))}})}else i.delay(1e3*o).hide("drop",{direction:"down"},300);c&&$option.click(function(){i.callback()})}; 3622 3623 3624/*! 3625 Non-Sucking Autogrow 1.1.6 3626 license: MIT 3627 author: Roman Pushkin 3628 https://github.com/ro31337/jquery.ns-autogrow 3629*/ 3630(function(){var e;!function(t,l){return t.fn.autogrow=function(i){if(null==i&&(i={}),null==i.horizontal&&(i.horizontal=!0),null==i.vertical&&(i.vertical=!0),null==i.debugx&&(i.debugx=-1e4),null==i.debugy&&(i.debugy=-1e4),null==i.debugcolor&&(i.debugcolor="yellow"),null==i.flickering&&(i.flickering=!0),null==i.postGrowCallback&&(i.postGrowCallback=function(){}),null==i.verticalScrollbarWidth&&(i.verticalScrollbarWidth=e()),i.horizontal!==!1||i.vertical!==!1)return this.filter("textarea").each(function(){var e,n,r,o,a,c,d;if(e=t(this),!e.data("autogrow-enabled"))return e.data("autogrow-enabled"),a=e.height(),c=e.width(),o=1*e.css("lineHeight")||0,e.hasVerticalScrollBar=function(){return e[0].clientHeight<e[0].scrollHeight},n=t('<div class="autogrow-shadow"></div>').css({position:"absolute",display:"inline-block","background-color":i.debugcolor,top:i.debugy,left:i.debugx,"max-width":e.css("max-width"),padding:e.css("padding"),fontSize:e.css("fontSize"),fontFamily:e.css("fontFamily"),fontWeight:e.css("fontWeight"),lineHeight:e.css("lineHeight"),resize:"none","word-wrap":"break-word"}).appendTo(document.body),i.horizontal===!1?n.css({width:e.width()}):(r=e.css("font-size"),n.css("padding-right","+="+r),n.normalPaddingRight=n.css("padding-right")),d=function(t){return function(l){var r,d,s;return d=t.value.replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">").replace(/\n /g,"<br/> ").replace(/"/g,""").replace(/'/g,"'").replace(/\n$/,"<br/> ").replace(/\n/g,"<br/>").replace(/ {2,}/g,function(e){return Array(e.length-1).join(" ")+" "}),/(\n|\r)/.test(t.value)&&(d+="<br />",i.flickering===!1&&(d+="<br />")),n.html(d),i.vertical===!0&&(r=Math.max(n.height()+o,a),e.height(r)),i.horizontal===!0&&(n.css("padding-right",n.normalPaddingRight),i.vertical===!1&&e.hasVerticalScrollBar()&&n.css("padding-right","+="+i.verticalScrollbarWidth+"px"),s=Math.max(n.outerWidth(),c),e.width(s)),i.postGrowCallback(e)}}(this),e.change(d).keyup(d).keydown(d),t(l).resize(d),d()})}}(window.jQuery,window),e=function(){var e,t,l,i;return e=document.createElement("p"),e.style.width="100%",e.style.height="200px",t=document.createElement("div"),t.style.position="absolute",t.style.top="0px",t.style.left="0px",t.style.visibility="hidden",t.style.width="200px",t.style.height="150px",t.style.overflow="hidden",t.appendChild(e),document.body.appendChild(t),l=e.offsetWidth,t.style.overflow="scroll",i=e.offsetWidth,l===i&&(i=t.clientWidth),document.body.removeChild(t),l-i}}).call(this); 3631 3632 3633function escapeHtml(html) 3634{ 3635 var text = document.createTextNode(html); 3636 var div = document.createElement('div'); 3637 div.appendChild(text); 3638 return div.innerHTML; 3639} 3640 3641function decodeHTMLEntities(text) { 3642 var entities = [ 3643 ['amp', '&'], 3644 ['apos', '\''], 3645 ['#x27', '\''], 3646 ['#x2F', '/'], 3647 ['#39', '\''], 3648 ['#47', '/'], 3649 ['lt', '<'], 3650 ['gt', '>'], 3651 ['nbsp', ' '], 3652 ['quot', '"'] 3653 ]; 3654 3655 for (var i = 0, max = entities.length; i < max; ++i) 3656 text = text.replace(new RegExp('&'+entities[i][0]+';', 'g'), entities[i][1]); 3657 3658 return text; 3659} 3660 3661function Wo_RegisterCommentReaction(comment_id,reaction){ 3662 if (!comment_id && !reaction) 3663 return false;
3664 3665 $('.reactions-comment-container-' + comment_id).css('display', 'none'); 3666 $.get(Wo_Ajax_Requests_File(), {f: 'posts', s: 'register_comment_reaction', comment_id: comment_id, reaction: reaction}, function (data) { 3667 if(data.status == 200) { 3668 if (node_socket_flow == "1") { 3669 socket.emit("comment_notification", { comment_id: comment_id, user_id: _getCookie("user_id"), type: "added" }); 3670 } 3671 $('.comment-reactions-icons-'+comment_id).html(data.reactions); 3672 $('.comment-status-reaction-'+comment_id).addClass("active-like"); 3673 //$('.c_likes-'+comment_id).html(data.like_lang); 3674 //post.find("[id^=likes]").text(data.likes); 3675 } else { 3676 //post.find("[id^=likes]").text(data.likes); 3677 } 3678 if (data.can_send == 1) { 3679 Wo_SendMessages(); 3680 } 3681 }); 3682 3683} 3684 3685function Wo_RegisterBlogCommentReaction(comment_id,reaction){ 3686 if (!comment_id && !reaction) 3687 return false; 3688 3689 $('.reactions-comment-container-' + comment_id).css('display', 'none'); 3690 $.get(Wo_Ajax_Requests_File(), {f: 'blog', s: 'register_blog_comment_reaction', comment_id: comment_id, reaction: reaction}, function (data) { 3691 if(data.status == 200) { 3692 if (node_socket_flow == "1") { 3693 socket.emit("user_notification", { to_id: data.user_id, user_id: _getCookie("user_id"), type: "added" }); 3694 } 3695 $('.comment-reactions-icons-'+comment_id).html(data.reactions); 3696 $('.comment-status-reaction-'+comment_id).addClass("active-like"); 3697 //$('.c_likes-'+comment_id).html(data.like_lang); 3698 //post.find("[id^=likes]").text(data.likes); 3699 } else { 3700 //post.find("[id^=likes]").text(data.likes); 3701 } 3702 if (data.can_send == 1) { 3703 Wo_SendMessages(); 3704 } 3705 }); 3706 3707} 3708 3709 3710function Wo_RegisterBlogReplyReaction(user_id,reply_id,reaction){ 3711 if (!reply_id && !reaction) 3712 return false; 3713 3714 $('.reactions-box-comment-replay-container-' + reply_id).css('display', 'none'); 3715 $.get(Wo_Ajax_Requests_File(), {f: 'blog', s: 'register_reply_reaction', user_id: user_id, reply_id: reply_id, reaction: reaction}, function (data) { 3716 if(data.status == 200) { 3717 if (node_socket_flow == "1") { 3718 socket.emit("user_notification", { to_id: data.user_id, user_id: _getCookie("user_id"), type: "added" }); 3719 } 3720 $('.replay-reactions-icons-'+reply_id).html(data.reactions); 3721 $('.replay-status-reaction-'+reply_id).addClass("active-like"); 3722 //$('.r_likes-'+reply_id).html(data.like_lang); 3723 //post.find("[id^=likes]").text(data.likes); 3724 } else { 3725 //post.find("[id^=likes]").text(data.likes); 3726 } 3727 if (data.can_send == 1) { 3728 Wo_SendMessages(); 3729 } 3730 }); 3731 3732} 3733 3734function Wo_RegisterlightboxCommentReaction(comment_id,reaction){ 3735 if (!comment_id && !reaction) 3736 return false; 3737 3738 $.get(Wo_Ajax_Requests_File(), {f: 'posts', s: 'register_comment_reaction', comment_id: comment_id, reaction: reaction}, function (data) { 3739 if(data.status == 200) { 3740 if (node_socket_flow == "1") { 3741 socket.emit("comment_notification", { comment_id: comment_id, user_id: _getCookie("user_id"), type: "added" }); 3742 } 3743 $('.lightbox-comment-reactions-icons-'+comment_id).html(data.reactions); 3744 $('.lightbox-comment-status-reaction-'+comment_id).addClass("active-like"); 3745 //$('.c_likes-'+comment_id).html(data.like_lang); 3746 //post.find("[id^=likes]").text(data.likes); 3747 } else { 3748 //post.find("[id^=likes]").text(data.likes); 3749 } 3750 if (data.can_send == 1) { 3751 Wo_SendMessages(); 3752 } 3753 }); 3754 3755} 3756 3757 3758function Wo_RegisterReplyReaction(user_id,reply_id,reaction){ 3759 if (!reply_id && !reaction) 3760 return false; 3761 3762 $('.reactions-box-comment-replay-container-' + reply_id).css('display', 'none'); 3763 $.get(Wo_Ajax_Requests_File(), {f: 'posts', s: 'register_replay_reaction', user_id: user_id, reply_id: reply_id, reaction: reaction}, function (data) { 3764 if(data.status == 200) { 3765 if (node_socket_flow == "1") { 3766 socket.emit("reply_notification", { reply_id: reply_id, user_id: _getCookie("user_id"), type: "added" }); 3767 } 3768 $('.replay-reactions-icons-'+reply_id).html(data.reactions); 3769 $('.replay-status-reaction-'+reply_id).addClass("active-like"); 3770 //$('.r_likes-'+reply_id).html(data.like_lang); 3771 //post.find("[id^=likes]").text(data.likes); 3772 } else { 3773 //post.find("[id^=likes]").text(data.likes); 3774 } 3775 if (data.can_send == 1) { 3776 Wo_SendMessages(); 3777 } 3778 }); 3779 3780} 3781 3782 3783function load_ajax_emojii(id, path){ 3784 var emojjii = "ð*ð*ð*ð¤£*ð*ð*ð *ð*ð*ð*ð*ð*ð*ð*ð*ð*ð*ð*ð¤*ð¤©*ð¤*ð¤¨*ð*ð*ð¶*ð*ð*ð£*ð¥*ð®*ð¤*ð¯*ðª*ð«*ð´*ð*ð*ð*ð*ð¤¤*ð*ð*ð*ð*ð*ð¤*ð²*â¹ï¸*ð*ð*ð*ð*ð¤*ð¢*ð*ð¦*ð§*ð¨*ð©*ð¤¯*ð¬*ð°*ð±*ð³*ð¤ª*ðµ*ð¡*ð *ð¤¬*ð·*ð¤*ð¤*ð¤¢*ð¤®*ð¤§*ð*ð¤ *ð¤¡*ð¤¥*ð¤«*ð¤*ð§*ð¤*ð*ð¿*ð¹*ðº*ð*ð»*ð½*ð¤*ð©*ðº*ð¸*ð¹*ð»*ð¼*ð½*ð*ð¿*ð¾*ð¶*ð§*ð§*ð¦*ð©*ð§*ð¨*ðµ*ð§*ð´*ð²*ð *ð¤³*ð*ðº*ð´*ð«*ð*ð¬*ð*ð¤²*ð*ð*ð*ð¤*ð*ð*ð*â*ð¤*ð¤*ð¤*âï¸*ð¤*ð¤*ð*ð*ð*ð*ð*âï¸*â*ð¤*ð*ð*ð*ð¤*ðª*ð*âï¸*ð*ð*ð*ð*ð*ð *ð*ð*ð£*ð*ð*ð§ *ð£*ð¤*ð¥"; 3785 3786 $('.emo-comment-container-' + id ).html(""); 3787 $.each(emojjii.split('*'), function(key, value) { 3788 $('.emo-comment-container-' + id ).append("<span class=\"emoji_holder\" onclick=\"Wo_AddEmoToCommentInput("+ id +",'"+ value +"');\"><span>"+ value + "</span>"); 3789 }); 3790} 3791function load_ajax_chat_emojii(id, path){ 3792 var emojjii = "ð*ð*ð*ð¤£*ð*ð*ð *ð*ð*ð*ð*ð*ð*ð*ð*ð*ð*ð*ð¤*ð¤©*ð¤*ð¤¨*ð*ð*ð¶*ð*ð*ð£*ð¥*ð®*ð¤*ð¯*ðª*ð«*ð´*ð*ð*ð*ð*ð¤¤*ð*ð*ð*ð*ð*ð¤*ð²*â¹ï¸*ð*ð*ð*ð*ð¤*ð¢*ð*ð¦*ð§*ð¨*ð©*ð¤¯*ð¬*ð°*ð±*ð³*ð¤ª*ðµ*ð¡*ð *ð¤¬*ð·*ð¤*ð¤*ð¤¢*ð¤®*ð¤§*ð*ð¤ *ð¤¡*ð¤¥*ð¤«*ð¤*ð§*ð¤*ð*ð¿*ð¹*ðº*ð*ð»*ð½*ð¤*ð©*ðº*ð¸*ð¹*ð»*ð¼*ð½*ð*ð¿*ð¾*ð¶*ð§*ð§*ð¦*ð©*ð§*ð¨*ðµ*ð§*ð´*ð²*ð *ð¤³*ð*ðº*ð´*ð«*ð*ð¬*ð*ð¤²*ð*ð*ð*ð¤*ð*ð*ð*â*ð¤*ð¤*ð¤*âï¸*ð¤*ð¤*ð*ð*ð*ð*ð*âï¸*â*ð¤*ð*ð*ð*ð¤*ðª*ð*âï¸*ð*ð*ð*ð*ð*ð *ð*ð*ð£*ð*ð*ð§ *ð£*ð¤*ð¥"; 3793 3794 $('.emo-container-' + id ).html(""); 3795 $.each(emojjii.split('*'), function(key, value) { 3796 $('.emo-container-' + id ).append("<span class=\"emoji_holder\" onclick=\"Wo_AddEmoToChat("+ id +",'"+ value +"');\"><span>"+ value + "</span>"); 3797 }); 3798} 3799function load_ajax_chat_group_emojii(id, path){ 3800 var emojjii = "ð*ð*ð*ð¤£*ð*ð*ð *ð*ð*ð*ð*ð*ð*ð*ð*ð*ð*ð*ð¤*ð¤©*ð¤*ð¤¨*ð*ð*ð¶*ð*ð*ð£*ð¥*ð®*ð¤*ð¯*ðª*ð«*ð´*ð*ð*ð*ð*ð¤¤*ð*ð*ð*ð*ð*ð¤*ð²*â¹ï¸*ð*ð*ð*ð*ð¤*ð¢*ð*ð¦*ð§*ð¨*ð©*ð¤¯*ð¬*ð°*ð±*ð³*ð¤ª*ðµ*ð¡*ð *ð¤¬*ð·*ð¤*ð¤*ð¤¢*ð¤®*ð¤§*ð*ð¤ *ð¤¡*ð¤¥*ð¤«*ð¤*ð§*ð¤*ð*ð¿*ð¹*ðº*ð*ð»*ð½*ð¤*ð©*ðº*ð¸*ð¹*ð»*ð¼*ð½*ð*ð¿*ð¾*ð¶*ð§*ð§*ð¦*ð©*ð§*ð¨*ðµ*ð§*ð´*ð²*ð *ð¤³*ð*ðº*ð´*ð«*ð*ð¬*ð*ð¤²*ð*ð*ð*ð¤*ð*ð*ð*â*ð¤*ð¤*ð¤*âï¸*ð¤*ð¤*ð*ð*ð*ð*ð*âï¸*â*ð¤*ð*ð*ð*ð¤*ðª*ð*âï¸*ð*ð*ð*ð*ð*ð *ð*ð*ð£*ð*ð*ð§ *ð£*ð¤*ð¥"; 3801 3802 $('.emo-group-container-' + id ).html(""); 3803 $.each(emojjii.split('*'), function(key, value) { 3804 $('.emo-group-container-' + id ).append("<span class=\"emoji_holder\" onclick=\"Wo_AddEmoToGroup("+ id +",'"+ value +"');\"><span>"+ value + "</span>"); 3805 }); 3806} 3807function load_ajax_chat_page_emojii(id, path){ 3808 var emojjii = "ð*ð*ð*ð¤£*ð*ð*ð *ð*ð*ð*ð*ð*ð*ð*ð*ð*ð*ð*ð¤*ð¤©*ð¤*ð¤¨*ð*ð*ð¶*ð*ð*ð£*ð¥*ð®*ð¤*ð¯*ðª*ð«*ð´*ð*ð*ð*ð*ð¤¤*ð*ð*ð*ð*ð*ð¤*ð²*â¹ï¸*ð*ð*ð*ð*ð¤*ð¢*ð*ð¦*ð§*ð¨*ð©*ð¤¯*ð¬*ð°*ð±*ð³*ð¤ª*ðµ*ð¡*ð *ð¤¬*ð·*ð¤*ð¤*ð¤¢*ð¤®*ð¤§*ð*ð¤ *ð¤¡*ð¤¥*ð¤«*ð¤*ð§*ð¤*ð*ð¿*ð¹*ðº*ð*ð»*ð½*ð¤*ð©*ðº*ð¸*ð¹*ð»*ð¼*ð½*ð*ð¿*ð¾*ð¶*ð§*ð§*ð¦*ð©*ð§*ð¨*ðµ*ð§*ð´*ð²*ð *ð¤³*ð*ðº*ð´*ð«*ð*ð¬*ð*ð¤²*ð*ð*ð*ð¤*ð*ð*ð*â*ð¤*ð¤*ð¤*âï¸*ð¤*ð¤*ð*ð*ð*ð*ð*âï¸*â*ð¤*ð*ð*ð*ð¤*ðª*ð*âï¸*ð*ð*ð*ð*ð*ð *ð*ð*ð£*ð*ð*ð§ *ð£*ð¤*ð¥"; 3809 3810 $('.emo-container-' + id ).html(""); 3811 $.each(emojjii.split('*'), function(key, value) { 3812 $('.emo-container-' + id ).append("<span class=\"emoji_holder\" onclick=\"Wo_AddEmoToPage("+ id +",'"+ value +"');\"><span>"+ value + "</span>"); 3813 }); 3814} 3815function load_ajax_message_emojii(path){ 3816 var emojjii = "ð*ð*ð*ð¤£*ð*ð*ð *ð*ð*ð*ð*ð*ð*ð*ð*ð*ð*ð*ð¤*ð¤©*ð¤*ð¤¨*ð*ð*ð¶*ð*ð*ð£*ð¥*ð®*ð¤*ð¯*ðª*ð«*ð´*ð*ð*ð*ð*ð¤¤*ð*ð*ð*ð*ð*ð¤*ð²*â¹ï¸*ð*ð*ð*ð*ð¤*ð¢*ð*ð¦*ð§*ð¨*ð©*ð¤¯*ð¬*ð°*ð±*ð³*ð¤ª*ðµ*ð¡*ð *ð¤¬*ð·*ð¤*ð¤*ð¤¢*ð¤®*ð¤§*ð*ð¤ *ð¤¡*ð¤¥*ð¤«*ð¤*ð§*ð¤*ð*ð¿*ð¹*ðº*ð*ð»*ð½*ð¤*ð©*ðº*ð¸*ð¹*ð»*ð¼*ð½*ð*ð¿*ð¾*ð¶*ð§*ð§*ð¦*ð©*ð§*ð¨*ðµ*ð§*ð´*ð²*ð *ð¤³*ð*ðº*ð´*ð«*ð*ð¬*ð*ð¤²*ð*ð*ð*ð¤*ð*ð*ð*â*ð¤*ð¤*ð¤*âï¸*ð¤*ð¤*ð*ð*ð*ð*ð*âï¸*â*ð¤*ð*ð*ð*ð¤*ðª*ð*âï¸*ð*ð*ð*ð*ð*ð *ð*ð*ð£*ð*ð*ð§ *ð£*ð¤*ð¥"; 3817 3818 $('.emo-message-container').html(""); 3819 $.each(emojjii.split('*'), function(key, value) { 3820 $('.emo-message-container').append("<span class=\"emoji_holder\" onclick=\"Wo_AddEmoToMessageInput('"+ value +"');\"><span>"+ value + "</span>"); 3821 }); 3822} 3823function load_ajax_publisher_emojii(path){ 3824 var emojjii = "ð*ð*ð*ð¤£*ð*ð*ð *ð*ð*ð*ð*ð*ð*ð*ð*ð*ð*ð*ð¤*ð¤©*ð¤*ð¤¨*ð*ð*ð¶*ð*ð*ð£*ð¥*ð®*ð¤*ð¯*ðª*ð«*ð´*ð*ð*ð*ð*ð¤¤*ð*ð*ð*ð*ð*ð¤*ð²*â¹ï¸*ð*ð*ð*ð*ð¤*ð¢*ð*ð¦*ð§*ð¨*ð©*ð¤¯*ð¬*ð°*ð±*ð³*ð¤ª*ðµ*ð¡*ð *ð¤¬*ð·*ð¤*ð¤*ð¤¢*ð¤®*ð¤§*ð*ð¤ *ð¤¡*ð¤¥*ð¤«*ð¤*ð§*ð¤*ð*ð¿*ð¹*ðº*ð*ð»*ð½*ð¤*ð©*ðº*ð¸*ð¹*ð»*ð¼*ð½*ð*ð¿*ð¾*ð¶*ð§*ð§*ð¦*ð©*ð§*ð¨*ðµ*ð§*ð´*ð²*ð *ð¤³*ð*ðº*ð´*ð«*ð*ð¬*ð*ð¤²*ð*ð*ð*ð¤*ð*ð*ð*â*ð¤*ð¤*ð¤*âï¸*ð¤*ð¤*ð*ð*ð*ð*ð*âï¸*â*ð¤*ð*ð*ð*ð¤*ðª*ð*âï¸*ð*ð*ð*ð*ð*ð *ð*ð*ð£*ð*ð*ð§ *ð£*ð¤*ð¥"; 3825 3826 $('.publisher-box-emooji').html(""); 3827 $.each(emojjii.split('*'), function(key, value) { 3828 $('.publisher-box-emooji').append("<span class=\"emoji_holder\" onclick=\"Wo_AddEmo('"+ value +"', '#post-textarea textarea'), Wo_ShowPosInfo();\"><span>"+ value + "</span>"); 3829 }); 3830} 3831function load_ajax_reply_emojii(id, path){ 3832 var emojjii = "ð*ð*ð*ð¤£*ð*ð*ð *ð*ð*ð*ð*ð*ð*ð*ð*ð*ð*ð*ð¤*ð¤©*ð¤*ð¤¨*ð*ð*ð¶*ð*ð*ð£*ð¥*ð®*ð¤*ð¯*ðª*ð«*ð´*ð*ð*ð*ð*ð¤¤*ð*ð*ð*ð*ð*ð¤*ð²*â¹ï¸*ð*ð*ð*ð*ð¤*ð¢*ð*ð¦*ð§*ð¨*ð©*ð¤¯*ð¬*ð°*ð±*ð³*ð¤ª*ðµ*ð¡*ð *ð¤¬*ð·*ð¤*ð¤*ð¤¢*ð¤®*ð¤§*ð*ð¤ *ð¤¡*ð¤¥*ð¤«*ð¤*ð§*ð¤*ð*ð¿*ð¹*ðº*ð*ð»*ð½*ð¤*ð©*ðº*ð¸*ð¹*ð»*ð¼*ð½*ð*ð¿*ð¾*ð¶*ð§*ð§*ð¦*ð©*ð§*ð¨*ðµ*ð§*ð´*ð²*ð *ð¤³*ð*ðº*ð´*ð«*ð*ð¬*ð*ð¤²*ð*ð*ð*ð¤*ð*ð*ð*â*ð¤*ð¤*ð¤*âï¸*ð¤*ð¤*ð*ð*ð*ð*ð*âï¸*â*ð¤*ð*ð*ð*ð¤*ðª*ð*âï¸*ð*ð*ð*ð*ð*ð *ð*ð*ð£*ð*ð*ð§ *ð£*ð¤*ð¥"; 3833 3834 $('.emo-comment-container-' + id ).html(""); 3835 $.each(emojjii.split('*'), function(key, value) { 3836 $('.emo-comment-container-' + id ).append("<span class=\"emoji_holder\" onclick=\"Wo_AddEmoTo_replyCommentInput("+ id +",'"+ value +"');\"><span>"+ value + "</span>"); 3837 }); 3838}
3839function Wo_AddEmoTo_replyCommentInput(post_id, code, type) { 3840 inputTag = $('[id=post-' + post_id + ']').find('.comment-reply-textarea'); 3841 if (type == 'lightbox-post-footer') { 3842 inputTag = $('.lightbox-post-footer').find('.comment-reply-textarea'); 3843 } 3844 inputVal = inputTag.val(); 3845 if (typeof(inputTag.attr('placeholder')) != "undefined") { 3846 inputPlaceholder = inputTag.attr('placeholder'); 3847 if (inputPlaceholder == inputVal) { 3848 inputTag.val(''); 3849 inputVal = inputTag.val(); 3850 } 3851 } 3852 if (inputVal.length == 0) { 3853 inputTag.val(code + ' '); 3854 } else { 3855 inputTag.val(inputVal + ' ' + code); 3856 } 3857 inputTag.keyup().focus(); 3858} 3859 3860function _getCookie(cname) { 3861 var name = cname + "="; 3862 var decodedCookie = decodeURIComponent(document.cookie); 3863 var ca = decodedCookie.split(';'); 3864 for(var i = 0; i <ca.length; i++) { 3865 var c = ca[i]; 3866 while (c.charAt(0) == ' ') { 3867 c = c.substring(1); 3868 } 3869 if (c.indexOf(name) == 0) { 3870 return c.substring(name.length, c.length); 3871 } 3872 } 3873 if (cname == 'user_id') { 3874 return _getSession('user_id'); 3875 } 3876 return ""; 3877} 3878 3879var _shortcut_helper = _getCookie("shortcut_helper"); 3880if ( _shortcut_helper == "false" ) { 3881 $('#shortcut_helper').hide(); 3882} 3883 3884$(window).on('load', function() { 3885 window.post = 0; 3886 $('body').on('keypress', function(key) { 3887 var tag = key.target.tagName.toLowerCase(); 3888 3889 key.stopPropagation(); 3890 var k = parseInt(key.which, 10); 3891 if( window.post >= 0 ){ 3892 if( k == 106 && tag != 'input' && tag != 'textarea'){ 3893 3894 var date = new Date(); 3895 var expires = ""; 3896 date.setTime(date.getTime() + (7*24*60*60*1000)); 3897 expires = "; expires=" + date.toUTCString(); 3898 document.cookie = "shortcut_helper=false" + expires + "; path=/"; 3899 3900 $('#shortcut_helper').show(); 3901 3902 console.log(post); 3903 if( $( '.post-container' ).eq( window.post ).hasClass( 'user-ad-container' ) ){ 3904 console.log('ad'); 3905 $("html, body").animate({ scrollTop: $(document).height() }, "slow"); 3906 } 3907 3908 var listItems = $( '.post-container .post' ).eq( window.post ).find('.panel'); 3909 if (listItems.length) { 3910 listItems.addClass('active_shadow'); 3911 $('html, body').animate({ 3912 scrollTop: parseInt(listItems.offset().top - 60) 3913 }, 600); 3914 setTimeout(function(){ 3915 listItems.removeClass('active_shadow'); 3916 }, 500); 3917 //}else{ 3918 // post++; 3919 } 3920 window.post++; 3921 }else if( k == 107 && tag != 'input' && tag != 'textarea'){ 3922 $('#shortcut_helper').show(); 3923 window.post--; 3924 var listItems = $( '.post-container .post' ).eq( post ).find('.panel'); 3925 if (listItems.length) { 3926 listItems.addClass('active_shadow'); 3927 $('html, body').animate({ 3928 scrollTop: parseInt(listItems.offset().top - 60) 3929 }, 500); 3930 setTimeout(function(){ 3931 listItems.removeClass('active_shadow'); 3932 }, 500); 3933 } 3934 } 3935 3936 }else{ 3937 //post = post -1; 3938 } 3939 }); 3940 3941}); 3942 3943 3944 3945 3946 3947function Wo_ShowCommentCombo(post_id){ 3948 comment_combo_wrapper = $('.wo_comment_combo_' + post_id); 3949 comment_combo_wrapper.addClass('comment-toggle'); 3950 //comment_combo_wrapper.find('textarea').focus(); 3951} 3952 3953function Wo_Get_Mention(self) { 3954 $(self).triggeredAutocomplete({ 3955 source: Wo_Ajax_Requests_File() + "?f=mention", 3956 trigger: "@" 3957 }); 3958} 3959 3960function Wo_RemoveBlur(self,id) { 3961 $('.remover_blur_btn_'+id).remove(); 3962 $('.remover_blur_'+id).removeClass('image_blur'); 3963} 3964function Wo_RemoveBlurAlbum(self,id) { 3965 $('.show_album_'+id).remove(); 3966} 3967 3968function Wo_OpenJobEditBox(job_id) { 3969 var edit_box = $('#edit-job-modal-' + job_id); 3970 edit_box.modal({ 3971 show: true 3972 }); 3973} 3974 3975function Wo_ShowCommonUserProfile(user_id) { 3976 $('#contnet').append('<div class="lightbox-container"><div class="lightbox-backgrond" onclick="Wo_CloseLightbox();"></div><div class="valign tag_comm_skel"><div class="tag_comm_skels"><div class="tag_comm_skels_innr"><div class="tag_comm_skels_covr"></div><div class="tag_comm_skels_avtr"></div><div class="tag_comm_skels_name"></div></div></div><div class="tag_comm_skels"><div class="tag_comm_skels_innr"><div class="tag_comm_skels_covr"></div><div class="tag_comm_skels_avtr"></div><div class="tag_comm_skels_name"></div></div></div><div class="tag_comm_skels"><div class="tag_comm_skels_innr"><div class="tag_comm_skels_covr"></div><div class="tag_comm_skels_avtr"></div><div class="tag_comm_skels_name"></div></div></div></div></div>'); 3977 $.get(Wo_Ajax_Requests_File(), {f:'show_common_user',s:'show', user_id:user_id}, function(data) { 3978 if (data.status == 200) { 3979 $('body').addClass('no_scroll'); 3980 $('.lightbox-container').html(data.html); 3981 } 3982 if (data.html.length == 0) { 3983 $('body').removeClass('no_scroll'); 3984 } 3985 }); 3986} 3987
3988function Wo_DeleteFund(id) { 3989 $("#delete-fund").find('.disable_btn').attr('disabled','disabled'); 3990 $.ajax({ 3991 type: "GET", 3992 url: Wo_Ajax_Requests_File(), 3993 data: { 3994 id: id, 3995 f: 'funding', 3996 s: 'delete_fund' 3997 }, 3998 dataType: 'json', 3999 success: function(data) { 4000 if (data['status'] == 200) { 4001 $("#delete-fund").modal("hide"); 4002 $("div[data-rm-blog='" + id + "']").fadeOut(function() { 4003 $(this).remove() 4004 }); 4005 } 4006 $("#delete-fund").find('.disable_btn').removeAttr("disabled"); 4007 } 4008 }); 4009} 4010 4011function go_to_duration(id,duration) { 4012 if ($('#video--'+id+'_html5_api').length > 0) { 4013 id = 'video--'+id+'_html5_api'; 4014 } 4015 else{ 4016 id = 'video--'+id; 4017 } 4018 var vid = document.getElementById(id); 4019 vid.currentTime = duration; 4020 vid.play(); 4021} 4022 4023!function(e){"use strict";"function"==typeof define&&define.amd?define(["jquery"],e):"object"==typeof exports&&"function"==typeof require?e(require("jquery")):e(jQuery)}(function(e){"use strict";var t={escapeRegExChars:function(e){return e.replace(/[|\\{}()[\]^$+*?.]/g,"\\$&")},createNode:function(e){var t=document.createElement("div");return t.className=e,t.style.position="absolute",t.style.display="none",t}},n=27,o=9,s=13,i=38,a=39,u=40,r=e.noop;function l(t,n){var o=this;o.element=t,o.el=e(t),o.suggestions=[],o.badQueries=[],o.selectedIndex=-1,o.currentValue=o.element.value,o.timeoutId=null,o.cachedResponse={},o.onChangeTimeout=null,o.onChange=null,o.isLocal=!1,o.suggestionsContainer=null,o.noSuggestionsContainer=null,o.options=e.extend({},l.defaults,n),o.classes={selected:"autocomplete-selected",suggestion:"autocomplete-suggestion"},o.hint=null,o.hintValue="",o.selection=null,o.initialize(),o.setOptions(n)}l.utils=t,e.Autocomplete=l,l.defaults={ajaxSettings:{},autoSelectFirst:!1,appendTo:"body",serviceUrl:null,lookup:null,onSelect:null,width:"auto",minChars:1,maxHeight:300,deferRequestBy:0,params:{},formatResult:function(e,n){if(!n)return e.value;var o="("+t.escapeRegExChars(n)+")";return e.value.replace(new RegExp(o,"gi"),"<strong>$1</strong>").replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">").replace(/"/g,""").replace(/<(\/?strong)>/g,"<$1>")},formatGroup:function(e,t){return'<div class="autocomplete-group">'+t+"</div>"},delimiter:null,zIndex:9999,type:"GET",noCache:!1,onSearchStart:r,onSearchComplete:r,onSearchError:r,preserveInput:!1,containerClass:"autocomplete-suggestions",tabDisabled:!1,dataType:"text",currentRequest:null,triggerSelectOnValidInput:!0,preventBadQueries:!0,lookupFilter:function(e,t,n){return-1!==e.value.toLowerCase().indexOf(n)},paramName:"query",transformResult:function(t){return"string"==typeof t?e.parseJSON(t):t},showNoSuggestionNotice:!1,noSuggestionNotice:"No results",orientation:"bottom",forceFixPosition:!1},l.prototype={initialize:function(){var t,n=this,o="."+n.classes.suggestion,s=n.classes.selected,i=n.options;n.element.setAttribute("autocomplete","off"),n.noSuggestionsContainer=e('<div class="autocomplete-no-suggestion"></div>').html(this.options.noSuggestionNotice).get(0),n.suggestionsContainer=l.utils.createNode(i.containerClass),(t=e(n.suggestionsContainer)).appendTo(i.appendTo||"body"),"auto"!==i.width&&t.css("width",i.width),t.on("mouseover.autocomplete",o,function(){n.activate(e(this).data("index"))}),t.on("mouseout.autocomplete",function(){n.selectedIndex=-1,t.children("."+s).removeClass(s)}),t.on("click.autocomplete",o,function(){n.select(e(this).data("index"))}),t.on("click.autocomplete",function(){clearTimeout(n.blurTimeoutId)}),n.fixPositionCapture=function(){n.visible&&n.fixPosition()},e(window).on("resize.autocomplete",n.fixPositionCapture),n.el.on("keydown.autocomplete",function(e){n.onKeyPress(e)}),n.el.on("keyup.autocomplete",function(e){n.onKeyUp(e)}),n.el.on("blur.autocomplete",function(){n.onBlur()}),n.el.on("focus.autocomplete",function(){n.onFocus()}),n.el.on("change.autocomplete",function(e){n.onKeyUp(e)}),n.el.on("input.autocomplete",function(e){n.onKeyUp(e)})},onFocus:function(){var e=this;e.fixPosition(),e.el.val().length>=e.options.minChars&&e.onValueChange()},onBlur:function(){var e=this;e.blurTimeoutId=setTimeout(function(){e.hide()},200)},abortAjax:function(){var e=this;e.currentRequest&&(e.currentRequest.abort(),e.currentRequest=null)},setOptions:function(t){var n=this,o=n.options;this.options=e.extend({},o,t),n.isLocal=e.isArray(o.lookup),n.isLocal&&(o.lookup=n.verifySuggestionsFormat(o.lookup)),o.orientation=n.validateOrientation(o.orientation,"bottom"),e(n.suggestionsContainer).css({"max-height":o.maxHeight+"px",width:o.width+"px","z-index":o.zIndex})},clearCache:function(){this.cachedResponse={},this.badQueries=[]},clear:function(){this.clearCache(),this.currentValue="",this.suggestions=[]},disable:function(){var e=this;e.disabled=!0,clearTimeout(e.onChangeTimeout),e.abortAjax()},enable:function(){this.disabled=!1},fixPosition:function(){var t=this,n=e(t.suggestionsContainer),o=n.parent().get(0);if(o===document.body||t.options.forceFixPosition){var s=t.options.orientation,i=n.outerHeight(),a=t.el.outerHeight(),u=t.el.offset(),r={top:u.top,left
4023:u.left};if("auto"===s){var l=e(window).height(),c=e(window).scrollTop(),g=-c+u.top-i,d=c+l-(u.top+a+i);s=Math.max(g,d)===g?"top":"bottom"}if(r.top+="top"===s?-i:a,o!==document.body){var h,p=n.css("opacity");t.visible||n.css("opacity",0).show(),h=n.offsetParent().offset(),r.top-=h.top,r.left-=h.left,t.visible||n.css("opacity",p).hide()}"auto"===t.options.width&&(r.width=t.el.outerWidth()+"px"),n.css(r)}},isCursorAtEnd:function(){var e,t=this.el.val().length,n=this.element.selectionStart;return"number"==typeof n?n===t:!document.selection||((e=document.selection.createRange()).moveStart("character",-t),t===e.text.length)},onKeyPress:function(e){var t=this;if(t.disabled||t.visible||e.which!==u||!t.currentValue){if(!t.disabled&&t.visible){switch(e.which){case n:t.el.val(t.currentValue),t.hide();break;case a:if(t.hint&&t.options.onHint&&t.isCursorAtEnd()){t.selectHint();break}return;case o:if(t.hint&&t.options.onHint)return void t.selectHint();if(-1===t.selectedIndex)return void t.hide();if(t.select(t.selectedIndex),!1===t.options.tabDisabled)return;break;case s:if(-1===t.selectedIndex)return void t.hide();t.select(t.selectedIndex);break;case i:t.moveUp();break;case u:t.moveDown();break;default:return}e.stopImmediatePropagation(),e.preventDefault()}}else t.suggest()},onKeyUp:function(e){var t=this;if(!t.disabled){switch(e.which){case i:case u:return}clearTimeout(t.onChangeTimeout),t.currentValue!==t.el.val()&&(t.findBestHint(),t.options.deferRequestBy>0?t.onChangeTimeout=setTimeout(function(){t.onValueChange()},t.options.deferRequestBy):t.onValueChange())}},onValueChange:function(){var t=this,n=t.options,o=t.el.val(),s=t.getQuery(o);t.selection&&t.currentValue!==s&&(t.selection=null,(n.onInvalidateSelection||e.noop).call(t.element)),clearTimeout(t.onChangeTimeout),t.currentValue=o,t.selectedIndex=-1,n.triggerSelectOnValidInput&&t.isExactMatch(s)?t.select(0):s.length<n.minChars?t.hide():t.getSuggestions(s)},isExactMatch:function(e){var t=this.suggestions;return 1===t.length&&t[0].value.toLowerCase()===e.toLowerCase()},getQuery:function(t){var n,o=this.options.delimiter;return o?(n=t.split(o),e.trim(n[n.length-1])):t},getSuggestionsLocal:function(t){var n,o=this.options,s=t.toLowerCase(),i=o.lookupFilter,a=parseInt(o.lookupLimit,10);return n={suggestions:e.grep(o.lookup,function(e){return i(e,t,s)})},a&&n.suggestions.length>a&&(n.suggestions=n.suggestions.slice(0,a)),n},getSuggestions:function(t){var n,o,s,i,a=this,u=a.options,r=u.serviceUrl;u.params[u.paramName]=t,!1!==u.onSearchStart.call(a.element,u.params)&&(o=u.ignoreParams?null:u.params,e.isFunction(u.lookup)?u.lookup(t,function(e){a.suggestions=e.suggestions,a.suggest(),u.onSearchComplete.call(a.element,t,e.suggestions)}):(a.isLocal?n=a.getSuggestionsLocal(t):(e.isFunction(r)&&(r=r.call(a.element,t)),s=r+"?"+e.param(o||{}),n=a.cachedResponse[s]),n&&e.isArray(n.suggestions)?(a.suggestions=n.suggestions,a.suggest(),u.onSearchComplete.call(a.element,t,n.suggestions)):a.isBadQuery(t)?u.onSearchComplete.call(a.element,t,[]):(a.abortAjax(),i={url:r,data:o,type:u.type,dataType:u.dataType},e.extend(i,u.ajaxSettings),a.currentRequest=e.ajax(i).done(function(e){var n;a.currentRequest=null,n=u.transformResult(e,t),a.processResponse(n,t,s),u.onSearchComplete.call(a.element,t,n.suggestions)}).fail(function(e,n,o){u.onSearchError.call(a.element,t,e,n,o)}))))},isBadQuery:function(e){if(!this.options.preventBadQueries)return!1;for(var t=this.badQueries,n=t.length;n--;)if(0===e.indexOf(t[n]))return!0;return!1},hide:function(){var t=this,n=e(t.suggestionsContainer);e.isFunction(t.options.onHide)&&t.visible&&t.options.onHide.call(t.element,n),t.visible=!1,t.selectedIndex=-1,clearTimeout(t.onChangeTimeout),e(t.suggestionsContainer).hide(),t.signalHint(null)},suggest:function(){if(this.suggestions.length){var t,n=this,o=n.options,s=o.groupBy,i=o.formatResult,a=n.getQuery(n.currentValue),u=n.classes.suggestion,r=n.classes.selected,l=e(n.suggestionsContainer),c=e(n.noSuggestionsContainer),g=o.beforeRender,d="";o.triggerSelectOnValidInput&&n.isExactMatch(a)?n.select(0):(e.each(n.suggestions,function(e,n){var r,l;s&&(d+=(l=(r=n).data[s],t===l?"":(t=l,o.formatGroup(r,t)))),d+='<div class="'+u+'" data-index="'+e+'">'+i(n,a,e)+"</div>"}),this.adjustContainerWidth(),c.detach(),l.html(d),e.isFunction(g)&&g.call(n.element,l,n.suggestions),n.fixPosition(),l.show(),o.autoSelectFirst&&(n.selectedIndex=0,l.scrollTop(0),l.children("."+u).first().addClass(r)),n.visible=!0,n.findBestHint())}else this.options.showNoSuggestionNotice?this.noSuggestions():this.hide()},noSuggestions:function(){var t=this,n=t.options.beforeRender,o=e(t.suggestionsContainer),s=e(t.noSuggestionsContainer);this.adjustContainerWidth(),s.detach(),o.empty(),o.append(s),e.isFunction(n)&&n.call(t.element,o,t.suggestions),t.fixPosition(),o.show(),t.visible=!0},adjustContainerWidth:function(){var t,n=this.options,o=e(this.suggestionsContainer);"auto"===n.width?(t=this.el.outerWidth(),o.css("width",t>0?t:300)):"flex"===n.width&&o.css("width","")},findBestHint:function(){var t=this.el.val().toLowerCase(),n=null;t&&(e.each(this.suggestions,function(e,o){var s=0===o.value.toLowerCase().indexOf(t);return s&&(n=o),!s}),this.signalHint(n))},signalHint:function(t){var n="",o=this;t&&(n=o.currentValue+t.value.substr(o.currentValue.length)),o.hintValue!==n&&(o.hintValue=n,o.hint=t,(this.options.onHint||e.noop)(n))},verifySuggestionsFormat:function(t){return t.length&&"string"==typeof t[0]?e.map(t,function(e){return{value:e,data:null}}):t},validateOrientation:function(t,n){return t=e.trim(t||"").toLowerCase(),-1===e.inArray(t,["auto","bottom","top"])&&(t=n),t},processResponse:function(e,t,n){var o=this,s=o.options;e.suggestions=o.verifySuggestionsFormat(e.suggestions),s.noCache||(o.cachedResponse[n]=e,s.preventBadQueries&&!e.suggestions.length&&o.badQueries.push(t)),t===o.getQuery(o.currentValue)&&(o.suggestions=e.suggestions,o.suggest())},activate:function(t){var n,o=this,s=o.classes.selected,i=e(o.suggestionsContainer),a=i.find("."+o.classes.suggestion);return i.find("."+s).removeClass(s),o.selectedIndex=t,-1!==o.selectedIndex&&a.length>o.selectedIndex?(n=a.get(o.selectedIndex),e(n).addClass(s),n):null},selectHint:function(){var t=e.inArray(this.hint,this.suggestions);this.select(t)},select:function(e){this.hide(),this.onSelect(e)},moveUp:function(){var t=this;if(-1!==t.selectedIndex)return 0===t.selectedIndex?(e(t.suggestionsContainer).children().first().removeClass(t.classes.selected),t.selectedIndex=-1,t.el.val(t.currentValue),void t.findBestHint()):void t.adjustScroll(t.selectedIndex-1)},moveDown:function(){this.selectedIndex!==this.suggestions.length-1&&this.adjustScroll(this.selectedIndex+1)},adjustScroll:function(t){var n=this,o=n.activate(t);if(o){var s,i,a,u=e(o).outerHeight();s=o.offsetTop,a=(i=e(n.suggestionsContainer).scrollTop())+n.options.maxHeight-u,s<i?e(n.suggestionsContainer).scrollTop(s):s>a&&e(n.suggestionsContainer).scrollTop(s-n.options.maxHeight+u),n.options.preserveInput||n.el.val(n.getValue(n.suggestions[t].value)),n.signalHint(null)}},onSelect:function(t){var n=this,o=n.options.onSelect,s=n.suggestions[t];n.currentValue=n.getValue(s.value),n.currentValue===n.el.val()||n.options.preserveInput||n.el.val(n.currentValue),n.signalHint(null),n.suggestions=[],n.selection=s,e.isFunction(o)&&o.call(n.element,s)},getValue:function(e){var t,n,o=this.options.delimiter;return o?1===(n=(t=this.currentValue).split(o)).length?e:t.substr(0,t.length-n[n.length-1].length)+e:e},dispose:function(){this.el.off(".autocomplete").removeData("autocomplete"),e(window).off("resize.autocomplete",this.fixPositionCapture),e(this.suggestionsContainer).remove()}},e.fn.devbridgeAutocomplete=function(t,n){var o="autocomplete";return arguments.length?this.each(function(){var s=e(this),i=s.data(o);"string"==typeof t?i&&"function"==typeof i[t]&&i[t](n):(i&&i.dispose&&i.dispose(),i=new l(this,t),s.data(o,i))}):this.first().data(o)},e.fn.autocomplete||(e.fn.autocomplete=e.fn.devbridgeAutocomplete)}); 4024!function(e){"function"==typeof define&&define.amd?define(["jquery"],e):"object"==typeof exports?e(require("jquery")):e(window.jQuery||window.Zepto)}(function(e){var t,n,i,o,r,a,s="Close",l="BeforeClose",c="MarkupParse",d="Open",p="Change",u="mfp",f="."+u,m="mfp-ready",g="mfp-removing",h="mfp-prevent-close",v=function(){},y=!!window.jQuery,C=e(window),w=function(e,n){t.ev.on(u+e+f,n)},b=function(t,n,i,o){var r=document.createElement("div");return r.className="mfp-"+t,i&&(r.innerHTML=i),o?n&&n.appendChild(r):(r=e(r),n&&r.appendTo(n)),r},I=function(n,i){t.ev.triggerHandler(u+n,i),t.st.callbacks&&(n=n.charAt(0).toLowerCase()+n.slice(1),t.st.callbacks[n]&&t.st.callbacks[n].apply(t,e.isArray(i)?i:[i]))},x=function(n){return n===a&&t.currTemplate.closeBtn||(t.currTemplate.closeBtn=e(t.st.closeMarkup.replace("%title%",t.st.tClose)),a=n),t.currTemplate.closeBtn},k=function(){e.magnificPopup.instance||((t=new v).init(),e.magnificPopup.instance=t)};v.prototype={constructor:v,init:function(){var n=navigator.appVersion;t.isLowIE=t.isIE8=document.all&&!document.addEventListener,t.isAndroid=/android/gi.test(n),t.isIOS=/iphone|ipad|ipod/gi.test(n),t.supportsTransition=function(){var e=document.createElement("p").style,t=["ms","O","Moz","Webkit"];if(void 0!==e.transition)return!0;for(;t.length;)if(t.pop()+"Transition"in e)return!0;return!1}(),t.probablyMobile=t.isAndroid||t.isIOS||/(Opera Mini)|Kindle|webOS|BlackBerry|(Opera Mobi)|(Windows Phone)|IEMobile/i.test(navigator.userAgent),i=e(document),t.popupsCache={}},open:function(n){var o;
4024if(!1===n.isObj){t.items=n.items.toArray(),t.index=0;var a,s=n.items;for(o=0;o<s.length;o++)if((a=s[o]).parsed&&(a=a.el[0]),a===n.el[0]){t.index=o;break}}else t.items=e.isArray(n.items)?n.items:[n.items],t.index=n.index||0;if(!t.isOpen){t.types=[],r="",n.mainEl&&n.mainEl.length?t.ev=n.mainEl.eq(0):t.ev=i,n.key?(t.popupsCache[n.key]||(t.popupsCache[n.key]={}),t.currTemplate=t.popupsCache[n.key]):t.currTemplate={},t.st=e.extend(!0,{},e.magnificPopup.defaults,n),t.fixedContentPos="auto"===t.st.fixedContentPos?!t.probablyMobile:t.st.fixedContentPos,t.st.modal&&(t.st.closeOnContentClick=!1,t.st.closeOnBgClick=!1,t.st.showCloseBtn=!1,t.st.enableEscapeKey=!1),t.bgOverlay||(t.bgOverlay=b("bg").on("click"+f,function(){t.close()}),t.wrap=b("wrap").attr("tabindex",-1).on("click"+f,function(e){t._checkIfClose(e.target)&&t.close()}),t.container=b("container",t.wrap)),t.contentContainer=b("content"),t.st.preloader&&(t.preloader=b("preloader",t.container,t.st.tLoading));var l=e.magnificPopup.modules;for(o=0;o<l.length;o++){var p=l[o];p=p.charAt(0).toUpperCase()+p.slice(1),t["init"+p].call(t)}I("BeforeOpen"),t.st.showCloseBtn&&(t.st.closeBtnInside?(w(c,function(e,t,n,i){n.close_replaceWith=x(i.type)}),r+=" mfp-close-btn-in"):t.wrap.append(x())),t.st.alignTop&&(r+=" mfp-align-top"),t.fixedContentPos?t.wrap.css({overflow:t.st.overflowY,overflowX:"hidden",overflowY:t.st.overflowY}):t.wrap.css({top:C.scrollTop(),position:"absolute"}),(!1===t.st.fixedBgPos||"auto"===t.st.fixedBgPos&&!t.fixedContentPos)&&t.bgOverlay.css({height:i.height(),position:"absolute"}),t.st.enableEscapeKey&&i.on("keyup"+f,function(e){27===e.keyCode&&t.close()}),C.on("resize"+f,function(){t.updateSize()}),t.st.closeOnContentClick||(r+=" mfp-auto-cursor"),r&&t.wrap.addClass(r);var u=t.wH=C.height(),g={};if(t.fixedContentPos&&t._hasScrollBar(u)){var h=t._getScrollbarSize();h&&(g.marginRight=h)}t.fixedContentPos&&(t.isIE7?e("body, html").css("overflow","hidden"):g.overflow="hidden");var v=t.st.mainClass;return t.isIE7&&(v+=" mfp-ie7"),v&&t._addClassToMFP(v),t.updateItemHTML(),I("BuildControls"),e("html").css(g),t.bgOverlay.add(t.wrap).prependTo(t.st.prependTo||e(document.body)),t._lastFocusedEl=document.activeElement,setTimeout(function(){t.content?(t._addClassToMFP(m),t._setFocus()):t.bgOverlay.addClass(m),i.on("focusin"+f,t._onFocusIn)},16),t.isOpen=!0,t.updateSize(u),I(d),n}t.updateItemHTML()},close:function(){t.isOpen&&(I(l),t.isOpen=!1,t.st.removalDelay&&!t.isLowIE&&t.supportsTransition?(t._addClassToMFP(g),setTimeout(function(){t._close()},t.st.removalDelay)):t._close())},_close:function(){I(s);var n=g+" "+m+" ";if(t.bgOverlay.detach(),t.wrap.detach(),t.container.empty(),t.st.mainClass&&(n+=t.st.mainClass+" "),t._removeClassFromMFP(n),t.fixedContentPos){var o={marginRight:""};t.isIE7?e("body, html").css("overflow",""):o.overflow="",e("html").css(o)}i.off("keyup.mfp focusin"+f),t.ev.off(f),t.wrap.attr("class","mfp-wrap").removeAttr("style"),t.bgOverlay.attr("class","mfp-bg"),t.container.attr("class","mfp-container"),!t.st.showCloseBtn||t.st.closeBtnInside&&!0!==t.currTemplate[t.currItem.type]||t.currTemplate.closeBtn&&t.currTemplate.closeBtn.detach(),t.st.autoFocusLast&&t._lastFocusedEl&&e(t._lastFocusedEl).focus(),t.currItem=null,t.content=null,t.currTemplate=null,t.prevHeight=0,I("AfterClose")},updateSize:function(e){if(t.isIOS){var n=document.documentElement.clientWidth/window.innerWidth,i=window.innerHeight*n;t.wrap.css("height",i),t.wH=i}else t.wH=e||C.height();t.fixedContentPos||t.wrap.css("height",t.wH),I("Resize")},updateItemHTML:function(){var n=t.items[t.index];t.contentContainer.detach(),t.content&&t.content.detach(),n.parsed||(n=t.parseEl(t.index));var i=n.type;if(I("BeforeChange",[t.currItem?t.currItem.type:"",i]),t.currItem=n,!t.currTemplate[i]){var r=!!t.st[i]&&t.st[i].markup;I("FirstMarkupParse",r),t.currTemplate[i]=!r||e(r)}o&&o!==n.type&&t.container.removeClass("mfp-"+o+"-holder");var a=t["get"+i.charAt(0).toUpperCase()+i.slice(1)](n,t.currTemplate[i]);t.appendContent(a,i),n.preloaded=!0,I(p,n),o=n.type,t.container.prepend(t.contentContainer),I("AfterChange")},appendContent:function(e,n){t.content=e,e?t.st.showCloseBtn&&t.st.closeBtnInside&&!0===t.currTemplate[n]?t.content.find(".mfp-close").length||t.content.append(x()):t.content=e:t.content="",I("BeforeAppend"),t.container.addClass("mfp-"+n+"-holder"),t.contentContainer.append(t.content)},parseEl:function(n){var i,o=t.items[n];if(o.tagName?o={el:e(o)}:(i=o.type,o={data:o,src:o.src}),o.el){for(var r=t.types,a=0;a<r.length;a++)if(o.el.hasClass("mfp-"+r[a])){i=r[a];break}o.src=o.el.attr("data-mfp-src"),o.src||(o.src=o.el.attr("href"))}return o.type=i||t.st.type||"inline",o.index=n,o.parsed=!0,t.items[n]=o,I("ElementParse",o),t.items[n]},addGroup:function(e,n){var i=function(i){i.mfpEl=this,t._openClick(i,e,n)};n||(n={});var o="click.magnificPopup";n.mainEl=e,n.items?(n.isObj=!0,e.off(o).on(o,i)):(n.isObj=!1,n.delegate?e.off(o).on(o,n.delegate,i):(n.items=e,e.off(o).on(o,i)))},_openClick:function(n,i,o){if((void 0!==o.midClick?o.midClick:e.magnificPopup.defaults.midClick)||!(2===n.which||n.ctrlKey||n.metaKey||n.altKey||n.shiftKey)){var r=void 0!==o.disableOn?o.disableOn:e.magnificPopup.defaults.disableOn;if(r)if(e.isFunction(r)){if(!r.call(t))return!0}else if(C.width()<r)return!0;n.type&&(n.preventDefault(),t.isOpen&&n.stopPropagation()),o.el=e(n.mfpEl),o.delegate&&(o.items=i.find(o.delegate)),t.open(o)}},updateStatus:function(e,i){if(t.preloader){n!==e&&t.container.removeClass("mfp-s-"+n),i||"loading"!==e||(i=t.st.tLoading);var o={status:e,text:i};I("UpdateStatus",o),e=o.status,i=o.text,t.preloader.html(i),t.preloader.find("a").on("click",function(e){e.stopImmediatePropagation()}),t.container.addClass("mfp-s-"+e),n=e}},_checkIfClose:function(n){if(!e(n).hasClass(h)){var i=t.st.closeOnContentClick,o=t.st.closeOnBgClick;if(i&&o)return!0;
4024if(!t.content||e(n).hasClass("mfp-close")||t.preloader&&n===t.preloader[0])return!0;if(n===t.content[0]||e.contains(t.content[0],n)){if(i)return!0}else if(o&&e.contains(document,n))return!0;return!1}},_addClassToMFP:function(e){t.bgOverlay.addClass(e),t.wrap.addClass(e)},_removeClassFromMFP:function(e){this.bgOverlay.removeClass(e),t.wrap.removeClass(e)},_hasScrollBar:function(e){return(t.isIE7?i.height():document.body.scrollHeight)>(e||C.height())},_setFocus:function(){(t.st.focus?t.content.find(t.st.focus).eq(0):t.wrap).focus()},_onFocusIn:function(n){if(n.target!==t.wrap[0]&&!e.contains(t.wrap[0],n.target))return t._setFocus(),!1},_parseMarkup:function(t,n,i){var o;i.data&&(n=e.extend(i.data,n)),I(c,[t,n,i]),e.each(n,function(n,i){if(void 0===i||!1===i)return!0;if((o=n.split("_")).length>1){var r=t.find(f+"-"+o[0]);if(r.length>0){var a=o[1];"replaceWith"===a?r[0]!==i[0]&&r.replaceWith(i):"img"===a?r.is("img")?r.attr("src",i):r.replaceWith(e("<img>").attr("src",i).attr("class",r.attr("class"))):r.attr(o[1],i)}}else t.find(f+"-"+n).html(i)})},_getScrollbarSize:function(){if(void 0===t.scrollbarSize){var e=document.createElement("div");e.style.cssText="width: 99px; height: 99px; overflow: scroll; position: absolute; top: -9999px;",document.body.appendChild(e),t.scrollbarSize=e.offsetWidth-e.clientWidth,document.body.removeChild(e)}return t.scrollbarSize}},e.magnificPopup={instance:null,proto:v.prototype,modules:[],open:function(t,n){return k(),(t=t?e.extend(!0,{},t):{}).isObj=!0,t.index=n||0,this.instance.open(t)},close:function(){return e.magnificPopup.instance&&e.magnificPopup.instance.close()},registerModule:function(t,n){n.options&&(e.magnificPopup.defaults[t]=n.options),e.extend(this.proto,n.proto),this.modules.push(t)},defaults:{disableOn:0,key:null,midClick:!1,mainClass:"",preloader:!0,focus:"",closeOnContentClick:!1,closeOnBgClick:!0,closeBtnInside:!0,showCloseBtn:!0,enableEscapeKey:!0,modal:!1,alignTop:!1,removalDelay:0,prependTo:null,fixedContentPos:"auto",fixedBgPos:"auto",overflowY:"auto",closeMarkup:'<button title="%title%" type="button" class="mfp-close">×</button>',tClose:"Close (Esc)",tLoading:"Loading...",autoFocusLast:!0}},e.fn.magnificPopup=function(n){k();var i=e(this);if("string"==typeof n)if("open"===n){var o,r=y?i.data("magnificPopup"):i[0].magnificPopup,a=parseInt(arguments[1],10)||0;r.items?o=r.items[a]:(o=i,r.delegate&&(o=o.find(r.delegate)),o=o.eq(a)),t._openClick({mfpEl:o},i,r)}else t.isOpen&&t[n].apply(t,Array.prototype.slice.call(arguments,1));else n=e.extend(!0,{},n),y?i.data("magnificPopup",n):i[0].magnificPopup=n,t.addGroup(i,n);return i};var T,_,P,S="inline",E=function(){P&&(_.after(P.addClass(T)).detach(),P=null)};e.magnificPopup.registerModule(S,{options:{hiddenClass:"hide",markup:"",tNotFound:"Content not found"},proto:{initInline:function(){t.types.push(S),w(s+"."+S,function(){E()})},getInline:function(n,i){if(E(),n.src){var o=t.st.inline,r=e(n.src);if(r.length){var a=r[0].parentNode;a&&a.tagName&&(_||(T=o.hiddenClass,_=b(T),T="mfp-"+T),P=r.after(_).detach().removeClass(T)),t.updateStatus("ready")}else t.updateStatus("error",o.tNotFound),r=e("<div>");return n.inlineElement=r,r}return t.updateStatus("ready"),t._parseMarkup(i,{},n),i}}});var z,O="ajax",M=function(){z&&e(document.body).removeClass(z)},B=function(){M(),t.req&&t.req.abort()};e.magnificPopup.registerModule(O,{options:{settings:null,cursor:"mfp-ajax-cur",tError:'<a href="%url%">The content</a> could not be loaded.'},proto:{initAjax:function(){t.types.push(O),z=t.st.ajax.cursor,w(s+"."+O,B),w("BeforeChange."+O,B)},getAjax:function(n){z&&e(document.body).addClass(z),t.updateStatus("loading");var i=e.extend({url:n.src,success:function(i,o,r){var a={data:i,xhr:r};I("ParseAjax",a),t.appendContent(e(a.data),O),n.finished=!0,M(),t._setFocus(),setTimeout(function(){t.wrap.addClass(m)},16),t.updateStatus("ready"),I("AjaxContentAdded")},error:function(){M(),n.finished=n.loadError=!0,t.updateStatus("error",t.st.ajax.tError.replace("%url%",n.src))}},t.st.ajax.settings);return t.req=e.ajax(i),""}}});var L;e.magnificPopup.registerModule("image",{options:{markup:'<div class="mfp-figure"><div class="mfp-close"></div><figure onclick="return false;"><span class="mfp-progress-line"><span></span></span><div class="mfp-img hren"></div><figcaption><div class="mfp-bottom-bar"><div class="mfp-title"></div><div class="mfp-counter"></div></div></figcaption></figure></div>',cursor:"mfp-zoom-out-cur",titleSrc:"title",verticalFit:!0,tError:'<a href="%url%">The image</a> could not be loaded.'},proto:{initImage:function(){var n=t.st.image,i=".image";t.types.push("image"),w(d+i,function(){"image"===t.currItem.type&&n.cursor&&e(document.body).addClass(n.cursor)}),w(s+i,function(){n.cursor&&e(document.body).removeClass(n.cursor),C.off("resize"+f)}),w("Resize"+i,t.resizeImage),t.isLowIE&&w("AfterChange",t.resizeImage)},resizeImage:function(){var e=t.currItem;if(e&&e.img&&t.st.image.verticalFit){var n=0;t.isLowIE&&(n=parseInt(e.img.css("padding-top"),10)+parseInt(e.img.css("padding-bottom"),10)),e.img.css("max-height",t.wH-n)}},_onImageHasSize:function(e){e.img&&(e.hasSize=!0,L&&clearInterval(L),e.isCheckingImgSize=!1,I("ImageHasSize",e),e.imgHidden&&(t.content&&t.content.removeClass("mfp-loading"),e.imgHidden=!1))},findImageSize:function(e){var n=0,i=e.img[0],o=function(r){L&&clearInterval(L),L=setInterval(function(){i.naturalWi
4024dth>0?t._onImageHasSize(e):(n>200&&clearInterval(L),3===++n?o(10):40===n?o(50):100===n&&o(500))},r)};o(1)},getImage:function(n,i){var o=0,r=function(){n&&(n.img[0].complete?(n.img.off(".mfploader"),n===t.currItem&&(t._onImageHasSize(n),t.updateStatus("ready")),n.hasSize=!0,n.loaded=!0,I("ImageLoadComplete")):++o<200?setTimeout(r,100):a())},a=function(){n&&(n.img.off(".mfploader"),n===t.currItem&&(t._onImageHasSize(n),t.updateStatus("error",s.tError.replace("%url%",n.src))),n.hasSize=!0,n.loaded=!0,n.loadError=!0)},s=t.st.image,l=i.find(".mfp-img");if(l.length){var c=document.createElement("img");c.className="mfp-img",n.el&&n.el.find("img").length&&(c.alt=n.el.find("img").attr("alt")),n.img=e(c).on("load.mfploader",r).on("error.mfploader",a),c.src=n.src,l.is("img")&&(n.img=n.img.clone()),(c=n.img[0]).naturalWidth>0?n.hasSize=!0:c.width||(n.hasSize=!1)}return t._parseMarkup(i,{title:function(n){if(n.data&&void 0!==n.data.title)return n.data.title;var i=t.st.image.titleSrc;if(i){if(e.isFunction(i))return i.call(t,n);if(n.el)return n.el.attr(i)||""}return""}(n),img_replaceWith:n.img},n),t.resizeImage(),n.hasSize?(L&&clearInterval(L),n.loadError?(i.addClass("mfp-loading"),t.updateStatus("error",s.tError.replace("%url%",n.src))):(i.removeClass("mfp-loading"),t.updateStatus("ready")),i):(t.updateStatus("loading"),n.loading=!0,n.hasSize||(n.imgHidden=!0,i.addClass("mfp-loading"),t.findImageSize(n)),i)}}});var H;e.magnificPopup.registerModule("zoom",{options:{enabled:!1,easing:"ease-in-out",duration:300,opener:function(e){return e.is("img")?e:e.find("img")}},proto:{initZoom:function(){var e,n=t.st.zoom,i=".zoom";if(n.enabled&&t.supportsTransition){var o,r,a=n.duration,c=function(e){var t=e.clone().removeAttr("style").removeAttr("class").addClass("mfp-animated-image"),i="all "+n.duration/1e3+"s "+n.easing,o={position:"fixed",zIndex:9999,left:0,top:0,"-webkit-backface-visibility":"hidden"},r="transition";return o["-webkit-"+r]=o["-moz-"+r]=o["-o-"+r]=o[r]=i,t.css(o),t},d=function(){t.content.css("visibility","visible")};w("BuildControls"+i,function(){if(t._allowZoom()){if(clearTimeout(o),t.content.css("visibility","hidden"),!(e=t._getItemToZoom()))return void d();(r=c(e)).css(t._getOffset()),t.wrap.append(r),o=setTimeout(function(){r.css(t._getOffset(!0)),o=setTimeout(function(){d(),setTimeout(function(){r.remove(),e=r=null,I("ZoomAnimationEnded")},16)},a)},16)}}),w(l+i,function(){if(t._allowZoom()){if(clearTimeout(o),t.st.removalDelay=a,!e){if(!(e=t._getItemToZoom()))return;r=c(e)}r.css(t._getOffset(!0)),t.wrap.append(r),t.content.css("visibility","hidden"),setTimeout(function(){r.css(t._getOffset())},16)}}),w(s+i,function(){t._allowZoom()&&(d(),r&&r.remove(),e=null)})}},_allowZoom:function(){return"image"===t.currItem.type},_getItemToZoom:function(){return!!t.currItem.hasSize&&t.currItem.img},_getOffset:function(n){var i,o=(i=n?t.currItem.img:t.st.zoom.opener(t.currItem.el||t.currItem)).offset(),r=parseInt(i.css("padding-top"),10),a=parseInt(i.css("padding-bottom"),10);o.top-=e(window).scrollTop()-r;var s={width:i.width(),height:(y?i.innerHeight():i[0].offsetHeight)-a-r};return void 0===H&&(H=void 0!==document.createElement("p").style.MozTransform),H?s["-moz-transform"]=s.transform="translate("+o.left+"px,"+o.top+"px)":(s.left=o.left,s.top=o.top),s}}});var A="iframe",F=function(e){if(t.currTemplate[A]){var n=t.currTemplate[A].find("iframe");n.length&&(e||(n[0].src="//about:blank"),t.isIE8&&n.css("display",e?"block":"none"))}};e.magnificPopup.registerModule(A,{options:{markup:'<div class="mfp-iframe-scaler"><div class="mfp-close"></div><iframe class="mfp-iframe" src="//about:blank" frameborder="0" allowfullscreen></iframe></div>',srcAction:"iframe_src",patterns:{youtube:{index:"youtube.com",id:"v=",src:"//www.youtube.com/embed/%id%?autoplay=1"},vimeo:{index:"vimeo.com/",id:"/",src:"//player.vimeo.com/video/%id%?autoplay=1"},gmaps:{index:"//maps.google.",src:"%id%&output=embed"}}},proto:{initIframe:function(){t.types.push(A),w("BeforeChange",function(e,t,n){t!==n&&(t===A?F():n===A&&F(!0))}),w(s+"."+A,function(){F()})},getIframe:function(n,i){var o=n.src,r=t.st.iframe;e.each(r.patterns,function(){if(o.indexOf(this.index)>-1)return this.id&&(o="string"==typeof this.id?o.substr(o.lastIndexOf(this.id
4024)+this.id.length,o.length):this.id.call(this,o)),o=this.src.replace("%id%",o),!1});var a={};return r.srcAction&&(a[r.srcAction]=o),t._parseMarkup(i,a,n),t.updateStatus("ready"),i}}});var j=function(e){var n=t.items.length;return e>n-1?e-n:e<0?n+e:e},W=function(e,t,n){return e.replace(/%curr%/gi,t+1).replace(/%total%/gi,n)};e.magnificPopup.registerModule("gallery",{options:{enabled:!1,arrowMarkup:'<button title="%title%" type="button" class="mfp-arrow mfp-arrow-%dir%"></button>',preload:[0,2],navigateByImgClick:!0,arrows:!0,tPrev:"Previous (Left arrow key)",tNext:"Next (Right arrow key)",tCounter:"%curr% of %total%"},proto:{initGallery:function(){var n=t.st.gallery,o=".mfp-gallery";if(t.direction=!0,!n||!n.enabled)return!1;r+=" mfp-gallery",w(d+o,function(){n.navigateByImgClick&&t.wrap.on("click"+o,".mfp-img",function(){if(t.items.length>1)return t.next(),!1}),i.on("keydown"+o,function(e){37===e.keyCode?t.prev():39===e.keyCode&&t.next()})}),w("UpdateStatus"+o,function(e,n){n.text&&(n.text=W(n.text,t.currItem.index,t.items.length))}),w(c+o,function(e,i,o,r){var a=t.items.length;o.counter=a>1?W(n.tCounter,r.index,a):""}),w("BuildControls"+o,function(){if(t.items.length>1&&n.arrows&&!t.arrowLeft){var i=n.arrowMarkup,o=t.arrowLeft=e(i.replace(/%title%/gi,n.tPrev).replace(/%dir%/gi,"left")).addClass(h),r=t.arrowRight=e(i.replace(/%title%/gi,n.tNext).replace(/%dir%/gi,"right")).addClass(h);o.click(function(){t.prev()}),r.click(function(){t.next()}),t.container.append(o.add(r))}}),w(p+o,function(){t._preloadTimeout&&clearTimeout(t._preloadTimeout),t._preloadTimeout=setTimeout(function(){t.preloadNearbyImages(),t._preloadTimeout=null},16)}),w(s+o,function(){i.off(o),t.wrap.off("click"+o),t.arrowRight=t.arrowLeft=null})},next:function(e){t.direction=!0,t.index=j(t.index+1),t.updateItemHTML(),1==e&&Wo_StoryProgress()},prev:function(){t.index=j(t.index-1),t.updateItemHTML()},goTo:function(e){t.direction=e>=t.index,t.index=e,t.updateItemHTML()},preloadNearbyImages:function(){var e,n=t.st.gallery.preload,i=Math.min(n[0],t.items.length),o=Math.min(n[1],t.items.length);for(e=1;e<=(t.direction?o:i);e++)t._preloadItem(t.index+e);for(e=1;e<=(t.direction?i:o);e++)t._preloadItem(t.index-e)},_preloadItem:function(n){if(n=j(n),!t.items[n].preloaded){var i=t.items[n];i.parsed||(i=t.parseEl(n)),I("LazyLoad",i),"image"===i.type&&(i.img=e('<img class="mfp-img"/>').on("load.mfploader",function(){i.hasSize=!0}).on("error.mfploader",function(){i.hasSize=!0,i.loadError=!0,I("LazyLoadError",i)}).attr("src",i.src)),i.preloaded=!0}}}});var N="retina";e.magnificPopup.registerModule(N,{options:{replaceSrc:function(e){return e.src.replace(/\.\w+$/,function(e){return"@2x"+e})},ratio:1},proto:{initRetina:function(){if(window.devicePixelRatio>1){var e=t.st.retina,n=e.ratio;(n=isNaN(n)?n():n)>1&&(w("ImageHasSize."+N,function(e,t){t.img.css({"max-width":t.img[0].naturalWidth/n,width:"100%"})}),w("ElementParse."+N,function(t,i){i.src=e.replaceSrc(i,n)}))}}}}),k()}); 4025!function(t){t.rcrop={settings:{full:!1,minSize:[20,20],maxSize:[null,null],preserveAspectRatio:!1,inputs:!0,inputsPrefix:"",grid:!1,preview:{display:!1,size:[50,50],wrapper:""}}},ResponsiveCrop=function(e,i){var r=this,a="rcrop-",o={x:0,y:0,width:0,height:0};this.el=e instanceof t?e:t(e),this.image={instance:null,width:0,height:0},this.wrapper=t("<div>",{class:"rcrop-wrapper"}),this.cropArea=t("<div>",{class:"rcrop-croparea"}),this.cropData={width:0,height:0,x:0,y:0},this.outer={wrapper:t("<div>",{class:"rcrop-outer-wrapper"}),left:t("<div>",{class:"rcrop-outer rcrop-outer-left"}),right:t("<div>",{class:"rcrop-outer rcrop-outer-right"}),top:t("<div>",{class:"rcrop-outer rcrop-outer-top"}),bottom:t("<div>",{class:"rcrop-outer rcrop-outer-bottom"})},this.cropAspectRatio,this.preview=null,this.clayfy,this.settings=t.extend(!0,{},t.rcrop.settings,i);var n=function(){if(r.wrapper.insertAfter(r.el),r.wrapper.append(r.el),r.wrapper.append(r.outer.wrapper),r.outer.wrapper.append(r.outer.left,r.outer.right,r.outer.top,r.outer.bottom),r.wrapper.append(r.cropArea),r.cropArea.append('<div class="rcrop-croparea-inner">'),r.settings.grid){var e='<div class="rcrop-grid-line"></div>';r.cropArea.append('<div class="rcrop-grid">'+e+e+"</div>")}if(p(),r.settings.inputs){var i=0!=r.settings.inputsPrefix?r.settings.inputsPrefix+"-":"",a=["x","y","width","height"];t.each(a,function(t,e){r.wrapper.append('<input type="hidden" name="'+i+e+'[]">')})}},p=function(){var e=t('<div class="rcrop-handler-wrapper"></div>');isTouchDevice()?e.append('<div class="rcrop-handler-bottom-right rcrop-handler-corner""></div>'):(t.each(["top-left","top-right","bottom-left","bottom-right"],function(t,i){e.append('<div class="rcrop-handler-'+i+" "+a+'handler-corner""></div>')}),t.each(["top","right","bottom","left"],function(t,i){e.append('<div class="rcrop-handler-'+i+" "+a+'handler-border"></div>')})),r.cropArea.append(e)},c=function(){var t=r.cropArea.position();o={width:Math.round(r.cropArea.width()),height:Math.round(r.cropArea.height()),x:Math.round(t.left),y:Math.round(t.top)}},h=function(){var t=r.cropArea.position(),e=o.width!==Math.round(r.cropArea.width()),i=o.height!==Math.round(r.cropArea.height()),a=o.x!==Math.round(t.left),n=o.y!==Math.round(t.top);s(e,i,a,n)},s=function(e,i,a,o){if(!1!==e&&(r.cropData.width="number"==typeof e?e:z(r.clayfy.newSize.width),r.cropData.width=Math.max(r.cropData.width,r.settings.minSize[0]),r.settings.maxSize[0]&&(r.cropData.width=Math.min(r.cropData.width,r.settings.maxSize[0]))),!1!==i&&(r.cropData.height="number"==typeof i?i:z(r.clayfy.newSize.height),r.cropData.height=Math.max(r.cropData.height,r.settings.minSize[1]),r.settings.maxSize[1]&&(r.cropData.height=Math.min(r.cropData.height,r.settings.maxSize[1]))),(!1!==i||!1!==e)&&r.settings.preserveAspectRatio){var n={max:r.settings.maxSize[0]||r.image.width,min:r.settings.minSize[0]};r.cropData.height*r.cropAspectRatio>n.max||r.cropData.height*r.cropAspectRatio<n.min?r.cropData.height=Math.round(r.cropData.width/r.cropAspectRatio):r.cropData.width=Math.round(r.cropData.height*r.cropAspectRatio)}!1!==a&&(r.cropData.x="number"==typeof a?a:z(r.clayfy.newSize.left),r.cropData.x+r.cropData.width>r.image.width&&(r.cropData.x=r.image.width-r.cropData.width)),!1!==o&&(r.cropData.y="number"==typeof o?o:z(r.clayfy.newSize.top),r.cropData.y+r.cropData.height>r.image.height&&(r.cropData.y=r.image.height-r.cropData.height)),r.settings.inputs&&t.each(["width","height","x","y"],function(t,e){r.wrapper.find('[name$="'+e+'[]"]').val(r.cropData[e])}),r.settings.preview.display&&w()},g=function(){var t=r.el[0].getBoundingClientRect(),e=t.width,i=t.height,a=r.clayfy.newSize,o={width:a.width,height:a.height,top:a.top,left
4025:a.left};r.cropArea.css({width:o.width/e*100+"%",height:o.height/i*100+"%",top:o.top/i*100+"%",left:o.left/e*100+"%"}),r.outer.left.width(o.left/e*100+"%"),r.outer.top.height(o.top/i*100+"%"),r.outer.bottom.css({top:(o.top+o.height)/i*100+"%"}),r.outer.right.css({left:(o.left+o.width)/e*100+"%"})},d=function(){var t=r.clayfy.newSize;r.outer.left.width(t.left),r.outer.top.height(t.top),r.outer.bottom.css({top:t.top+t.outerHeight}),r.outer.right.css({left:t.left+t.outerWidth})},l=function(){var t=r.settings,e=r.clayfy.settings;e.minSize=v(t.minSize),e.maxSize=v(t.maxSize),r.clayfy.draggable.setBounderies()},f=function(){var t=r.settings;r.cropArea.clayfy({type:"resizable",container:r.wrapper,preserveAspectRatio:t.preserveAspectRatio,minSize:v(t.minSize),maxSize:v(t.maxSize)}),r.clayfy=r.cropArea.clayfy("instance"),r.clayfy.originalSize.width=r.settings.minSize[0],r.clayfy.originalSize.height=r.settings.minSize[1];var e=t.full?r.image.height:Math.max(.8*r.image.height,t.minSize[1]),i=t.full?r.image.width:Math.max(.8*r.image.width,t.minSize[0]);r.resize(i,e,"center","center"),r.cropArea.on("mousedown touchstart",l),r.cropArea.on("clayfy-resizestart clayfy-dragstart",c),r.cropArea.on("clayfy-resizeend clayfy-drop",h),r.cropArea.on("clayfy-resize clayfy-drag",d),r.settings.preview.display&&(r.cropArea.on("clayfy-resize clayfy-drag",w),r.cropArea.on("clayfy-cancel",w)),r.cropArea.on("clayfy-resizeend clayfy-drop",g),r.cropArea.on("clayfy-cancel",g),r.cropArea.on("clayfy-resizeend clayfy-drop",function(){r.el.trigger("rcrop-changed",[r])}),r.cropArea.on("clayfy-drag clayfy-resize",function(){r.el.trigger("rcrop-change",[r])})},u=function(){var t=r.settings.preview.size,e=[],i=r.clayfy?r.clayfy.newSize:{width:r.cropArea.width(),height:r.cropArea.height()};return"string"==typeof t[0]&&t[0].indexOf("%")>-1?e[0]=Number(t[0].replace("%",""))/100*i.width:e[0]=t[0],"string"==typeof t[1]&&t[1].indexOf("%")>-1?e[1]=Number(t[1].replace("%",""))/100*i.height:e[1]=t[1],e},y=function(){var e=r.settings.preview.wrapper;e&&(e=e instanceof t?e:t(e)),e&&e.length||(e=t("<div>",{class:"rcrop-preview-wrapper"}),r.wrapper.after(e));var i=u();r.preview=t('<canvas width="'+i[0]+'" height="'+i[1]+'"></canvas>'),r.preview.appendTo(e)},w=function(t){var e=r.cropData;t&&(e=z({width:r.clayfy.newSize.width,height:r.clayfy.newSize.height,x:r.clayfy.newSize.left,y:r.clayfy.newSize.top}));var i=u();r.preview.attr({width:i[0],height:i[1]}),r.preview[0].getContext("2d").drawImage(r.image.instance,e.x,e.y,e.width,e.height,0,0,i[0],i[1])},m=function(t,e){if("object"==typeof t){var i=t instanceof Array?[]:{};for(var r in t)i[r]="number"!=typeof t[r]?null:Math.round(t[r]*e);return i}return Math.round(t*e)},v=function(t){return m(t,r.el.width()/r.image.width)},z=function(t){return m(t,r.image.width/r.el.width())};this.getValues=function(){return{width:r.cropData.width,height:r.cropData.height,y:r.cropData.y,x:r.cropData.x}},this.getRealSize=function(t){var e=new Image;e.onload=function(){return r.image.width=this.width,r.image.height=this.height,"function"==typeof t&&t(),{width:r.image.width,height:r.image.height}},e.onerror=function(){return{width:null,height:null}},e.src=r.el.attr("src"),r.image.instance=e},this.getDataURL=function(e,i){e=e||r.cropData.width,i=i||r.cropData.height;var a=t('<canvas width="'+e+'" height="'+i+'"></canvas>');return a[0].getContext("2d").drawImage(r.image.instance,r.cropData.x,r.cropData.y,r.cropData.width,r.cropData.height,0,0,e,i),a[0].toDataURL()},this.resize=function(t,e,i,a){var o,n,p,c,h=r.settings;t=h.maxSize[0]?Math.min(t,r.image.width,h.maxSize[0]):Math.min(t,r.image.width),e=h.maxSize[1]?Math.min(e,r.image.height,h.maxSize[1]):Math.min(e,r.image.height),t=h.minSize[0]?Math.max(t,h.minSize[0]):t,e=h.minSize[1]?Math.max(e,h.minSize[1]):e,h.preserveAspectRatio&&(t/e>r.cropAspectRatio?t=e*r.cropAspectRatio:e=t/r.cropAspectRatio),t=Math.round(t),e=Math.round(e),o=v(t),n=v(e),(a=void 0===a?r.cropArea.position().top:"center"===a?Math.round((r.image.height-e)/2):Math.round(a))+e>r.image.height&&(a=r.image.height-e),c=v(a),(i=void 0===i?r.cropData.x?z(r.cropArea.position().left):r.cropData.x:"center"===i?Math.round((r.image.width-t)/2):Math.round(i))+t>r.image.width&&(i=r.image.width-t),p=v(i),r.cropArea.css({width:o,height:n,top:c,left:p}),r.clayfy.newSize=r.clayfy.getNewSize(),s(t,e,i,a),d(),g(),r.settings.preview.display&&w()},this.destroy=function(){var t=r.el;r.wrapper.replaceWith(t),t.attr("style","")},function(){r.cropAspectRatio=r.settings.minSize[0]/r.settings.minSize[1],n(),r.settings.preview.display&&y(),r.getRealSize(function(){f(),r.el.trigger("rcrop-ready")})}()};var e=ResponsiveCrop;t.fn.rcrop=function(i){var r=arguments;if(void 0===i||"object"==typeof i)return this.each(function(){t.data(this,"rcrop")||t.data(this,"rcrop",new e(this,i))});if("string"==typeof i&&"_"!==i[0]&&"init"!==i){if("instance"===i)return this.length?t.data(this[0],"rcrop"):null;if(-1!=t.inArray(i,t.fn.rcrop.getters)){var a=t.data(this[0],"rcrop");return a[i].apply(a,Array.prototype.slice.call(r,1))}return this.each(function(){var a=t.data(this,"rcrop");a instanceof e&&"function"==typeof a[i]&&a[i].apply(a,Array.prototype.slice.call(r,1))})}},t.fn.rcrop.getters=["getDataURL","getValues","getRealSize"]}(jQuery); 4026!function(){function e(e,i){function o(e){return e.el[0].scrollHeight-e.el.scrollTop()===e.innerHe
4026ight}function r(e){return e.el[0].scrollWidth-e.el.scrollLeft()===e.innerWidth}this.el=e instanceof $?e:$(e),this.draggableBox,this.x,this.y,this.dX,this.dY,this.diffDX,this.diffDY,this.history={dX:[0,0,0],dY:[0,0,0],diffDX:0,diffDY:0},this.actualPos,this.originalPos,this.initPos={y:0,x:0,scrollTop:null,scrollLeft:null},this.bounderies={},this.droppedTarget,this.scrollable=[],this.container={},this.tempContainer=$("<div>",{style:"position: absolute; top:0; left:0"}),this.droppable={dragElement:[],dropArea:[]},this.status="ready",this.settings=$.extend(!0,{},$.clayfy.settings,i);var a,n,s=this,l=!1,d=!0,g=$("<div>",{style:"height:100%;width:100%;position:fixed;top:0;left:0"});this.contentGhost;var p=function(){s.settings.ghost?(!0===s.settings.ghost?(s.draggableBox=s.el.clone(),s.draggableBox.addClass("clayfy-ghost-opacity")):(s.draggableBox=$("<div>",{margin:s.el.css("margin")}),s.contentGhost=$('<div class="clayfy-ghost-content" style="position:absolute"></div>'),s.draggableBox.append(s.contentGhost)),s.draggableBox.css({position:"absolute",width:"100%",height:"100%"}).addClass("clayfy-ghost")):s.draggableBox=s.el},f=function(e){var t=s.getPosition(s.el),i=s.settings.overflow?s.tempContainer:s.el.parent(),o=s.el.offset(),r=s.initPos.parent?s.initPos.parent.scrollTop():0,a=s.initPos.parent?s.initPos.parent.scrollLeft():0,n={width:s.el.width(),height:s.el.height(),top:t.y,left:t.x};if(!0!==s.settings.ghost&&(n={top:e.pageY-o.top+t.y+5-r,left:e.pageX-o.left+t.x+5-a,width:"auto",height:"auto"}),s.settings.overflow&&(n.top=o.top-r,n.left=o.left-a,!0!==s.settings.ghost&&(n.top=e.pageY-r+5,n.left=e.pageX-a+5)),s.draggableBox.css(n),s.draggableBox.appendTo(i),s.contentGhost){s.contentGhost.html("");var l;switch(typeof s.settings.ghost){case"string":l=s.settings.ghost;break;case"function":l=s.settings.ghost()}if(s.contentGhost.append(l),s.container.offset){var d=s.container.offset.innerBottom,g=s.container.offset.innerRight,p=s.draggableBox.offset(),f=p.top+s.contentGhost.outerHeight()-d,c=p.left+s.contentGhost.outerWidth()-g;f>0&&s.draggableBox.css({top:e.pageY-o.top+t.y+5-f}),c>0&&s.draggableBox.css({left:e.pageX-o.left+t.x+5-c})}}},c=function(e){if("canceling"!==s.status&&s.settings.move){var t=s.getPosition(),i=s.draggableBox.offset();s.contentGhost?s.contentGhost:s.draggableBox;if(s.container.offset){var o=s.container.offset.innerBottom,r=s.container.offset.innerRight;i.top>=o-s.el.outerHeight()&&(t.y+=o-s.el.outerHeight()-i.top),i.left>=r-s.el.outerWidth()&&(t.x+=r-s.el.outerWidth()-i.left)}if(s.el.css({top:t.y,left:t.x}),"clayfy-dropinside"===e.type){var o=e.area.offset.innerBottom,r=e.area.offset.innerRight;i.top>=o-s.el.outerHeight()&&(t.y+=o-s.el.outerHeight()-i.top),i.left>=r-s.el.outerWidth()&&(t.x+=r-s.el.outerWidth()-i.left),s.el.css({top:t.y,left:t.x})}}s.draggableBox.detach()},h=function(){var e=s.settings.container;e instanceof t?s.container=e:s.settings.container&&(s.container=new t(s.el,e))},y=function(e){27===e.keyCode&&s.cancel(e)};this.cancel=function(e){s.status="canceling",s.draggableBox.animate({top:s.initPos.y,left:s.initPos.x},100,function(){s.draggableBox.trigger("mouseup"),s.status="ready"}),null!==s.initPos.scrollTop&&s.initPos.parent.animate({scrollTop:s.initPos.scrollTop},100),null!==s.initPos.scrollLeft&&s.initPos.parent.animate({scrollLeft:s.initPos.scrollLeft},100)},s.scrollables=[];var u,b,v,m,x=function(){$(s.settings.scrollable).each(function(){var e=$
4026(this);if(!e.length)return!0;var t=w(e);if(!t.x&&!t.y)return!0;var i=e[0].getBoundingClientRect(),o=z(e),r=parseInt(e.css("border-top-width")),a=parseInt(e.css("border-left-width")),n={el:e,top:i.top+r,bottom:i.top+o.innerHeight+r,left:i.left+a,right:i.left+o.innerWidth+a,innerHeight:o.innerHeight,innerWidth:o.innerWidth,interval:{top:!1,bottom:!1,left:!1,right:!1},isParent:!s.settings.overflow&&s.el.offsetParent().is(e),isBody:e.is("body")};if(n.isBody){var l=$(window);n.top=0,n.left=0,n.bottom=l.height(),n.right=l.width(),n.innerHeight=l.height(),n.innerWidth=l.width()}s.scrollables.push(n)})},w=function(e){var t=!1,i=!1,o=$(window),r=$("body");return e.is("body")?(r.height()>o.height()&&(i=!0),r.width()>o.width()&&(t=!0)):(e[0].scrollHeight>e.height()&&(i=!0),e[0].scrollWidth>e.width()&&(t=!0)),{x:t,y:i}},z=function(e){var t,i,o,r,a,n,s,l=e instanceof $?e:$(e);return l.length?(t=l[0].style.position,"static"===l.css("position")&&l.css({position:"relative"}),o=$("<div>",{style:"position:absolute;top:0;left:0;bottom:0;right:0"}),i=$("<div>",{style:"position:absolute;top:0;left:0;width:100%;height:100%"}),o.append(i),l.append(o),r=i.width(),a=i.height(),n=parseInt(i.css("border-top-width")),s=parseInt(i.css("border-left-width")),o.remove(),l[0].style.position=t,{innerWidth:r,innerHeight:a,innerOffset:{top:n,left:s,bottom:a+n,right:r+s}}):{width:0,height:0}},B=function(e){var t=s.contentGhost?s.contentGhost:s.draggableBox,i=s.draggableBox[0].getBoundingClientRect(),a=t.offset(),n={top:i.top,bottom:i.top+t.outerHeight(),left:i.left,right:i.left+t.outerWidth(),x:0,y:0};n.x=(n.right-n.left)/2+n.left,n.y=(n.bottom-n.top)/2+n.top,s.history.diffDY>0&&u&&(u=!1,s.y=Math.min(a.top+t.outerHeight(),e.pageY)),s.history.diffDY<0&&b&&(b=!1,s.y=Math.max(a.top,e.pageY)),s.history.diffDX>0&&m&&(m=!1,s.x=Math.min(a.left+t.outerWidth(),e.pageX)),s.history.diffDX<0&&v&&(v=!1,s.x=Math.max(a.left,e.pageX));for(var l=0,d=s.scrollables.length;l<d;l++){var g=s.scrollables[l],p=0,f={top:n.top-g.top,bottom:g.bottom-n.bottom,left:n.left-g.left,right:g.right-n.right,x:n.x<g.right&&n.x>g.left,y:n.y<g.bottom&&n.y>g.top};if(!o(g)&&f.bottom<6&&(f.bottom>-6||g.isBody)&&f.x?(P(e,g,"bottom"),D(g,"top"),p++):(D(g,"bottom"),g.el.scrollTop()&&f.top<6&&(f.top>-6||g.isBody)&&f.x?(P(e,g,"top"),p++):D(g,"top")),g.el.scrollLeft()&&f.left<6&&(f.left>-6||g.isBody)&&f.y?(P(e,g,"left"),D(g,"right"),p++):(D(g,"left"),!r(g)&&f.right<6&&(f.right>-6||g.isBody)&&f.y?(P(e,g,"right"),p++):D(g,"right")),p)break}},P=function(e,t,i){t.interval[i]&&clearInterval(t.interval[i]);var o=function(e){};switch(i){case"bottom":o=function(i){i=i||10,t.el.scrollTop(t.el.scrollTop()+i),t.isParent&&(s.x=e.pageX,s.setBounderies(),s.updateDropArea(),u=!0)};break;case"top":o=function(i){i=i||10,t.el.scrollTop(t.el.scrollTop()-i),t.isParent&&(s.x=e.pageX,s.setBounderies(),s.updateDropArea(),b=!0)};break;case"left":o=function(i){i=i||10,t.el.scrollLeft(t.el.scrollLeft()-i),t.isParent&&(s.y=e.pageY,s.setBounderies(),s.updateDropArea(),v=!0)};break;case"right":o=function(i){i=i||10,t.el.scrollLeft(t.el.scrollLeft()+i),t.isParent&&(s.y=e.pageY,s.setBounderies(),s.updateDropArea(),m=!0)}}o(3),t.isParent||(t.interval[i]=setInterval(o,50))},D=function(e,t){if(t)e.interval[t]&&(clearInterval(e.interval[t]),e.interval[t]=!1);else for(var i in s.scrollables){var o=s.scrollables[i].interval;for(var r in o)o[r]&&(clearInterval(o[r]),o[r]=!1)}};this.appendTo=function(e,t){if(t=t||s.el,(e=e instanceof $?e:$(e)).length){var i=t.offset(),o=e.offset(),r={top:i.top-o.top-parseInt(e.css("border-top-width"))+e.scrollTop(),left:i.left-o.left-parseInt(e.css("border-left-width"))+e.scrollLeft()};"static"===e.css("position")&&e.css("position","relative"),t.appendTo(e).css(r)}};var S=function(){s.el.on("clayfy-dragstart",s.updateDragElement),s.el.on("clayfy-dragstart",s.updateDropArea),s.el.on("clayfy-drag",H),s.el.on("clayfy-drop",W),s.settings.ghost&&(s.el.on("clayfy-dropinside",c),s.el.on("clayfy-dropoutside",c)),s.el.on("clayfy-dragstart",function(){X()||(s.el.removeClass("clayfy-dropinside"),s.draggableBox.removeClass("clayfy-dropinside"))}),s.el.on("clayfy-dragenter",function(e){s.el.addClass("clayfy-dragenter"),s.draggableBox.addClass("clayfy-dragenter"),e.droparea.addClass("clayfy-dragenter"),s.el[0].id&&e.droparea.addClass("clayfy-dragenter-"+s.el[0].id)}),s.el.on("clayfy-dragleave",function(e){s.el.removeClass("clayfy-dropinside"),s.draggableBox.removeClass("clayfy-dropinside"),e.droparea.removeClass("clayfy-dropinside"),s.el[0].id&&e.droparea.removeClass("clayfy-dropinside-"+s.el[0].id)}),s.el.on("clayfy-dragleave clayfy-drop",function(e){s.el.removeClass("clayfy-dragenter"),s.draggableBox.removeClass("clayfy-dragenter"),$(".clayfy-dragenter").removeClass("clayfy-dragenter"),s.el[0].id&&$(".clayfy-dragenter-"+s.el[0].id).removeClass("clayfy-dragenter-"+s.el[0].id)}),s.el.on("clayfy-dropinside",function(e){s.el.addClass("clayfy-dropinside"),s.draggableBox.addClass("clayfy-dropinside"),e.droparea.addClass("clayfy-dropinside"),s.el[0].id&&e.droparea.addClass("clayfy-dropinside-"+s.el[0].id),s.settings.migrate&&s.appendTo(e.drop
4026area)})};this.updateDropArea=function(e){s.droppable.dropArea=[];var t=s.settings.droppable instanceof $?s.settings.droppable:$(s.settings.droppable);s.addDroppable(t)},this.updateDragElement=function(){s.droppable.dragElement=[],s.droppable.dragElement={originalPos:s.getPosition(),id:s.el[0].id,originalDropArea:null,width:s.draggableBox.width(),height:s.draggableBox.height(),x:0,y:0};var e=s.droppable.dragElement;e.setCenter=function(){var t=s.draggableBox.offset();e.x=t.left+e.width/2,e.y=t.top+e.height/2},e.setCenter(),e.originalDropArea=X()},this.resetDroppable=function(e){e&&(s.settings.droppable=e),s.updateDragElement(),s.updateDropArea()},this.addDroppable=function(e){(e instanceof $?e:$(e)).each(function(){var e=$(this),t=e.offset(),i=e.outerHeight(),o=e.outerWidth(),r=parseInt(e.css("border-top-width")),a=parseInt(e.css("border-left-width")),n=$.clayfy.getInner(e);s.droppable.dropArea.push({el:e,id:this.id,left:t.left,top:t.top,width:o,height:i,innerWidth:n.innerWidth,innerHeight:n.innerHeight,offset:{innerTop:t.top+r,innerLeft:t.left+a,innerBottom:n.innerHeight+t.top+r,innerRight:n.innerWidth+t.left+a},right:t.left+o,bottom:t.top+i,active:!1,triggered:!1})})};var H=function(e){var t=s.droppable.dragElement;t.setCenter();for(var i=0,o=s.droppable.dropArea.length;i<o;i++){var r=s.droppable.dropArea[i];r&&(t.x>r.left&&t.x<r.right&&t.y>r.top&&t.y<r.bottom?r.active=!0:r.active=!1,!r.triggered&&r.active?(r.triggered=!0,s.el.trigger($.Event("clayfy-dragenter",{target:r.el[0],droparea:r.el}))):r.triggered&&!r.active&&(r.triggered=!1,s.el.trigger($.Event("clayfy-dragleave",{target:r.el[0],droparea:r.el,area:r}))))}},X=function(){var e=s.droppable.dragElement;e.setCenter();for(var t=!1,i=0,o=s.droppable.dropArea.length;i<o;i++){var r=s.droppable.dropArea[i];r&&(e.x>r.left&&e.x<r.right&&e.y>r.top&&e.y<r.bottom&&(r.active=!0,r.triggered=!0,t=r))}return t},Y=function(e){var t=s.contentGhost?s.contentGhost:s.draggableBox,i={},o=s.el.offset(),r={top:o.top,left:o.left,right:s.droppable.dragElement.width+o.left,bottom:s.droppable.dragElement.height+o.top};t.outerWidth()<e.innerWidth&&(r.right>e.offset.innerRight&&(i.left=parseInt(t.css("left"))+e.offset.innerRight-r.right),r.left<e.offset.innerLeft&&(i.left=parseInt(t.css("left"))+e.offset.innerLeft-r.left)),t.outerHeight()<e.innerHeight&&(r.bottom>e.offset.innerBottom&&(i.top=parseInt(t.css("top"))+e.offset.innerBottom-r.bottom),r.top<e.offset.innerTop&&(i.top=parseInt(s.el.css("top"))+e.offset.innerTop-r.top)),s.el.css(i)},A=function(){var e=s.droppable.dragElement.originalDropArea;e&&s.el.trigger($.Event("clayfy-dropinside",{target:e.el[0],droparea:e.el})),s.settings.overflow&&!s.settings.ghost?s.el.css({left:s.initPos.x-s.initPos.parent.offset().left-parseInt(s.initPos.parent.css("border-left-width"))+s.initPos.scrollLeft,top:s.initPos.y-s.initPos.parent.offset().top-parseInt(s.initPos.parent.css("border-top-width"))+s.initPos.scrollTop}):s.el.css({left:s.initPos.x,top:s.initPos.y})},W=function(){for(var e,t=0,i=s.droppable.dropArea.length;t<i;t++)s.droppable.dropArea[t].active&&(e=s.droppable.dropArea[t]);if("canceling"===s.status){if(e&&(e.active=!1,e.triggered=!1,s.el.trigger($.Event("clayfy-dragleave",{target:e.el[0],droparea:e.el}))),!(e=s.droppable.dragElement.originalDropArea))return;e.active=!0,e.triggered=!0}e?(s.el.trigger($.Event("clayfy-dropinside",{target:e.el[0],droparea:e.el,area:e})),s.settings.fit&&Y(e)):(s.el.trigger("clayfy-dropoutside"),s.settings.dropoutside||A(),s.settings.dropoutside&&s.settings.migrate&&s.settings.overflow&&s.appendTo(s.tempContainer)),e&&(s.droppedTarget=e.el[0])},T=function(e){var t=e.pageX-s.el.offset().left,i=e.pageY-s.el.offset().top,o=$("<div>",{style:"position:absolute;left:0;top:0;width:100%;height:100%"});s.el.append(o);var r=o.width(),a=o.height();return o.remove(),!(t>r)&&!(i>a)},C=function(e){n.is(e.target)||s.el.has(e.target).length&&!s.settings.propagate||(isTouchDevice()||void 0===e.which||1===e.which)&&(e.preventDefault(),T(e)&&(s.settings.coverScreen&&E(),l=!0,document.body.style.cursor=a,s.settings.dragstart.call(s,e),s.el.trigger("clayfy-dragstart"),$(document).on("mousemove touchmove",I).on("mouseup touchend",R)))},R=function(e){if(l){e.preventDefault(),l=!1,d=!0,document.body.style.cursor="",s.settings.overflow&&(s.appendTo(s.initPos.parent,s.draggableBox),s.appendTo(s.initPos.parent)),s.settings.coverScreen&&k(),s.settings.drop.call(s);var t=$.Event("clayfy-drop",{pageX:e.pageX,pageY:e.pageY,screenX:e.screenX,screenY:e.screenY});s.el.trigger(t),$(document).off("mousemove touchmove",I).off("mouseup touchend",R)}},I=function(e){if(l){if(e.preventDefault(),e.originalEvent.touches&&1==e.originalEvent.touches.length)var e=e.originalEvent.touches[0]||e.originalEvent.changedTouches[0];if(d){d=!1;var t=s.el.parent();s.initPos.parent=t,s.settings.overflow&&s.appendTo(s.tempContainer,s.draggableBox),s.settings.ghost&&f(e),s.x=e.pageX,s.y=e.pageY,s.setBounderies();var i=s.getPosition(s.el);s.initPos={x:i.x,y:i.y,scrollLeft:t.scrollLeft(),scrollTop:t.scrollTop(),parent:t},s.history={dX:[0,0,0],dY:[0,0,0],diffDX:0,diffDY:0}}s.dX=e.pageX-s.x,s.dY=e.pageY-s.y,$.clayfy.dX=s.dX,$.clayfy.dY=s.dY,s.history.diffDX=(s.history.dX[0]+s.history.dX[1]-(s.history.dX[2]+s.dX))/2,s.history.diffDY=(s.history.dY[0]+s.history.dY[1]-(s.history.dY[2]+s.dY))/2,s.history.dX=[s.history.dX[1],s.history.dX[2],s.dX],s.history.dY=[s.history.dY[1],s.history.dY[2],s.dY],s.fixDeltasWithBounderies(),(s.settings.move||s.settings.ghost)&&s.move(),s.settings.drag.call(s,e);var o=$.Event("clayfy-drag",{shiftKey:e.shiftKey,pageX:e.pageX,pageY:e.pageY,clientX:e.clientX,clientY:e.clientY,screenX:e.screenX,screenY:e.screenY,altKey:e.altKey});s.el.trigger(o)}},E=function(){$("body").append(g)},k=function(){g.detach()};this.getContainerBounderies=function(){if(!s.container.type)return!1;var e,t,i=s.draggableBox.offset(),o={};
4026return s.container.update(),e=s.contentGhost?s.contentGhost.outerWidth():s.draggableBox.outerWidth(),t=s.contentGhost?s.contentGhost.outerHeight():s.draggableBox.outerHeight(),o={top:i.top-s.container.offset.innerTop,right:s.container.offset.innerRight-i.left-e,bottom:s.container.offset.innerBottom-i.top-t,left:i.left-s.container.offset.innerLeft},isNaN(o.top)&&(o={top:1e13,right:1e13,bottom:1e13,left:1e13}),o},this.setBounderies=function(){var e=s.settings.bounderies;s.actualPos=s.getPosition(),s.bounderies={top:-e[0],right:e[1],bottom:e[2],left:-e[3]};var t=s.getContainerBounderies();t&&(s.bounderies={top:Math.max(-t.top,s.bounderies.top),right:Math.min(t.right,s.bounderies.right),bottom:Math.min(t.bottom,s.bounderies.bottom),left:Math.max(-t.left,s.bounderies.left)})},this.move=function(){s.draggableBox.css({top:s.actualPos.y+$.clayfy.dY,left:s.actualPos.x+$.clayfy.dX})},this.getPosition=function(e){var t,i=s.el.offsetParent(),o=(t=void 0===e?s.draggableBox||s.el:e).position();return{y:o.top+i.scrollTop(),x:o.left+i.scrollLeft()}},this.fixDeltasWithBounderies=function(){$.clayfy.dX>s.bounderies.right&&($.clayfy.dX=s.bounderies.right),$.clayfy.dX<s.bounderies.left&&($.clayfy.dX=s.bounderies.left),$.clayfy.dY<s.bounderies.top&&($.clayfy.dY=s.bounderies.top),$.clayfy.dY>s.bounderies.bottom&&($.clayfy.dY=s.bounderies.bottom),s.settings.moveX||($.clayfy.dX=0),s.settings.moveY||($.clayfy.dY=0)},this.destroy=function(){},function(){s.originalPos=s.getPosition(),s.actualPos=s.originalPos,h(),p(),s.el.addClass("clayfy-box"),s.settings.move||s.el.addClass("clayfy-not-move"),a=s.el.css("cursor"),n=$(s.settings.not),s.settings.overflow&&$("body").append(s.tempContainer),s.el.on("mousedown touchstart",C),$("body").on("mouseup touchend",R),s.settings.escape&&(s.el.on("clayfy-dragstart",function(e){e.stopPropagation(),$(window).on("keydown",y)}),s.el.on("clayfy-drop",function(){$(window).off("keydown",y)})),!1!==s.settings.scrollable&&"node"===s.container.type&&(s.settings.container instanceof t||("string"==typeof s.settings.scrollable?s.settings.scrollable=s.settings.scrollable?s.settings.scrollable+" , "+s.settings.container:s.settings.container:s.settings.scrollable instanceof $&&(s.settings.scrollable=s.settings.scrollable.add(s.settings.container)))),s.el.on("clayfy-dragstart",x),s.el.on("clayfy-drag",B),s.el.on("clayfy-drop",D),0!=s.settings.droppable?(s.updateDragElement(),s.updateDropArea(),S()):s.settings.ghost&&s.el.on("clayfy-drop",c)}()}function t(e,t){this.draggableEl=e instanceof $?e:$(e),this.values,this.el,this.type,this.originalDraggable,this.width=0,this.height=0,this.innerHeight=0,this.innerWidth=0,this.offset={top:0,left:0,innerBottom:0,innerRight:0,innerLeft:0,innerTop:0};var i=this,o=function(){var e=a(i.el);i.width=i.el.width(),i.height=i.el.height(),i.innerWidth=e.innerWidth,i.innerHeight=e.innerHeight,i.offset=i.el.offset(),i.offset.innerTop=i.offset.top+parseInt(i.el.css("border-top-width")),i.offset.innerLeft=i.offset.left+parseInt(i.el.css("border-left-width")),i.offset.innerBottom=i.offset.innerTop+i.innerHeight,i.offset.innerRight=i.offset.innerLeft+i.innerWidth},r=function(){var e=i.getDraggableValues();i.offset={top:e.offset.top-(e.position.top-i.originalDraggable.position.top)-i.values[0],left:e.offset.left-(e.position.left-i.originalDraggable.position.left)-i.values[3]},i.width=i.originalDraggable.outerWidth+i.values[3]+i.values[1],i.height=i.originalDraggable.outerHeight+i.values[0]+i.values[2],i.innerWidth=i.width,i.innerHeight=i.height,i.offset.innerTop=i.offset.top,i.offset.innerLeft=i.offset.left,i.offset.innerBottom=i.offset.top+i.height,i.offset.innerRight=i.offset.left+i.width},a=function(e){var t,i,o,r,a,n=e instanceof $?e:$(e);return n.length?(t=n[0].style.position,"static"===n.css("position")&&n.css({position:"relative"}),o=$("<div>",{style:"position:absolute;top:0;left:0;bottom:0;right:0"}),i=$("<div>",{style:"position:absolute;top:0;left:0;width:100%;height:100%"}),o.append(i),n.append(o),r=i.width(),a=i.height(),o.remove(),n[0].style.position=t,{innerWidth:r,innerHeight:a}):{width:0,height:0}};this.getDraggableValues=function(){var e=i.draggableEl.offset(),t=i.draggableEl.offsetParent();return{position:{top:i.draggableEl.position().top+t.scrollTop(),left:i.draggableEl.position().left+t.scrollLeft()},offset:e,outerWidth:i.draggableEl.outerWidth(),outerHeight:i.draggableEl.outerHeight()}},function(){"string"==typeof t||t instanceof $?(i.el=t instanceof $?t:$(t),i.type="node","static"===i.el.css("position")&&i.el.css("position","relative"),i.update=o):(i.values=t,i.type="object",i.update=r,i.originalDraggable=i.getDraggableValues()),i.update()}()}function i(t,i){this.el=t instanceof $?t:$(t),this.originalSize={},this.initSize={},this.handlers=[],this.actualSize,this.newSize,this.draggable,this.preserveAspectRatio=!1,this.shift=!1,this.status="ready",this.touchableDevice;var r=$.extend(!0,{},$.clayfy.settings,{callbacks:{resizestart:function(){},resize:function(){},resizeend:function(){}}});this.settings=$.extend(!0,{},r,i);
4026var a,n=this,s=!1,l=function(e){27===e.keyCode&&n.cancel()},d=function(){var t=["top left","top right","bottom left","bottom right","left","right","top","bottom"];n.touchableDevice&&(t=["bottom right"]),"static"===n.el.css("position")&&n.el.css("position","relative"),n.cssPosition=n.el.css("position");var i={container:n.settings.container,not:".clayfy-handler",escape:!1,droppable:n.settings.droppable};i=$.extend(!0,{},n.settings,i),n.settings.move&&"relative"!==n.cssPosition||(i.move=!1),n.draggable=new e(n.el,i);for(var r=0;r<t.length;r++){var a=t[r].split(" "),s=!0;for(var l in a)n.settings.hasOwnProperty(a[l])&&n.settings[a[l]]||(s=!1);s&&n.handlers.push(new o(t[r],n))}n.touchableDevice&&n.el.addClass("clayfy-touch-device")};this.getSize=function(){n.parent=n.el.offsetParent();var e=n.parent,t=n.el.position();return{width:n.el.width(),height:n.el.height(),left:t.left+e.scrollLeft(),top:t.top+e.scrollTop(),outerWidth:n.el.outerWidth(),outerHeight:n.el.outerHeight()}},this.getNewSize=function(){var e=n.el.outerHeight(),t=n.el.outerWidth(),i=n.el.position(),o=i.left+n.parent.scrollLeft(),r=i.top+n.parent.scrollTop();return{outerWidth:t,outerHeight:e,top:r,left:o,right:o+t,bottom:r+e,width:n.el.width(),height:n.el.height()}},this.resize={left:function(){n.el.width(n.actualSize.width-$.clayfy.dX),"relative"!==n.cssPosition&&n.el.css({left:n.actualSize.left+$.clayfy.dX})},top:function(){n.el.height(n.actualSize.height-$.clayfy.dY),"relative"!==n.cssPosition&&n.el.css({top:n.actualSize.top+$.clayfy.dY})},bottom:function(){n.el.height(n.actualSize.height+$.clayfy.dY)},right:function(){n.el.width(n.actualSize.width+$.clayfy.dX)}},this.hideHandlers=function(){"ready"===n.status&&($.each(n.handlers,function(e,t){t.el.css("display","none")}),s=!1)},this.showHandlers=function(){s||"ready"!==n.status&&!n.touchableDevice||($.each(n.handlers,function(e,t){t.el.css("display","block")}),s=!0,n.updateHandlersPosition())},this.updateHandlersPosition=function(){n.newSize=n.getNewSize(),$.each(n.handlers,function(e,t){t.updatePosition()})},this.cancel=function(){console.log("cancelled"),n.status="ready",n.hideHandlers(),n.status="canceling",$("body").trigger("mouseup");var e="relative"!==n.cssPosition?n.initSize:{width:n.initSize.width,height:n.initSize.height};n.el.animate(e,100,function(){n.status="ready",n.el.is(":hover")&&n.showHandlers(),n.el.trigger("clayfy-cancel")})},function(){n.touchableDevice=isTouchDevice(),n.originalSize=n.getSize(),n.actualSize=n.originalSize,n.newSize=n.getNewSize(),d(),n.preserveAspectRatio=n.settings.preserveAspectRatio,n.el.on("clayfy-resizestart",function(e){n.initSize=n.getNewSize(),$(window).on("keydown",l),n.status="resizing"}),n.el.on("clayfy-resizeend",function(){$(window).off("keydown",l),n.status="ready"}),n.el.on("clayfy-dragstart",function(e){e.stopPropagation(),n.initSize=n.getSize(),n.status="dragging"}),n.el.on("clayfy-drop",function(e){e.stopPropagation(),n.status="ready"}),n.el.on("clayfy-resize clayfy-drag",n.updateHandlersPosition),$(window).on("resize",n.updateHandlersPosition),n.el.on("clayfy-dragstart",function(e){e.stopPropagation(),$(window).on("keydown",l)}),n.el.on("clayfy-drop",function(e){e.stopPropagation(),$(window).off("keydown",l)});var e=n.el;$.each(n.handlers,function(t,i){n.hideHandlers(),e=e.add(i.el)}),e.on("mouseover",function(){a&&clearTimeout(a),n.showHandlers()}),e.on("mouseout",function(){a=setTimeout(n.hideHandlers,20)}),n.el.on("clayfy-resizeend clayfy-drop",function(e){e.stopPropagation(),n.el.parent().find(":hover").length||n.touchableDevice||(s=!1,n.el.trigger("mouseout"))}),n.touchableDevice&&(e.on("touchstart",function(){a&&clearTimeout(a),n.showHandlers(),a=setTimeout(n.hideHandlers,4e3)}),n.el.on("clayfy-resizeend clayfy-drop",function(){n.el.trigger("click")}))}()}function o(t,i){this.el=$("<div>",{class:"clayfy-handler clayfy-"+t,style:"position: absolute"}),this.resizable=i,this.position=t,this.draggable;var o=this,r=!1;this.updatePosition=function(){var e=i.newSize;switch(o.position){case"left":o.el.css({width:5,left:e.left,top:e.top,height:e.outerHeight});break;case"right":o.el.css({width:5,left:e.right-5,top:e.top,height:e.outerHeight});break;case"top":o.el.css({height:5,left:e.left,top:e.top,width:e.outerWidth});break;case"bottom":o.el.css({height:5,left:e.left,top:e.bottom-5,width:e.outerWidth});break;
4026case"top left":o.el.css({width:8,height:8,left:e.left,top:e.top});break;case"top right":o.el.css({width:8,height:8,left:e.right-8,top:e.top});break;case"bottom left":o.el.css({width:8,height:8,left:e.left,top:e.bottom-8});break;case"bottom right":o.resizable.touchableDevice?o.el.css({width:18,height:18,left:e.right-20,top:e.bottom-20}):o.el.css({width:8,height:8,left:e.right-8,top:e.bottom-8})}},this.setBounderies=function(e){var t,i,r,a,n=e||[1e5,1e5,1e5,1e5],s=[];o.resizable.actualSize=o.resizable.getSize(),t=o.resizable.actualSize,i=o.resizable.settings,r=o.resizable.originalSize.width/o.resizable.originalSize.height,(a=o.draggable.getContainerBounderies())||(a={top:1e13,right:1e13,bottom:1e13,left:1e13});for(var l=0,d=i.maxSize.length;l<d;l++)null===i.maxSize[l]&&(i.maxSize[l]=1e13);$.clayfy.getInner(o.draggable.el);"left"!==o.position&&"top"!==o.position&&"top left"!==o.position||(n[1]=t.outerWidth-i.minSize[0],n[3]=i.maxSize[0]-t.outerWidth,n[2]=t.outerHeight-i.minSize[1],n[0]=i.maxSize[1]-t.outerHeight,o.draggable.settings.bounderies=n,s[3]=Math.min(a.left,n[3],a.top*r,n[0]*r),s[0]=Math.min(a.top,n[0],a.left/r,n[3]/r),s[1]=Math.min(a.right,n[1],a.bottom*r+n[2],n[2]*r),s[2]=Math.min(a.bottom,n[2],a.right/r+n[1],n[1]/r)),"right"!==o.position&&"bottom"!==o.position&&"bottom right"!==o.position||(n[3]=t.outerWidth-i.minSize[0],n[1]=i.maxSize[0]-t.outerWidth,n[0]=t.outerHeight-i.minSize[1],n[2]=i.maxSize[1]-t.outerHeight,o.draggable.settings.bounderies=n,s[1]=Math.min(a.right,n[1],a.bottom*r,n[2]*r),s[2]=Math.min(a.bottom,n[2],a.right/r,n[1]/r),s[3]=Math.min(a.left,n[3],a.top*r+n[0],n[0]*r),s[0]=Math.min(a.top,n[0],a.left/r+n[3],n[3]/r)),"bottom left"===o.position&&(n[0]=t.outerHeight-i.minSize[1],n[1]=t.outerWidth-i.minSize[0],n[2]=i.maxSize[1]-t.outerHeight,n[3]=i.maxSize[0]-t.outerWidth,o.draggable.settings.bounderies=n,s[3]=parseInt(Math.min(a.left,n[3],a.bottom*r,n[2]*r)),s[2]=parseInt(Math.min(a.bottom,n[2],a.left/r,n[3]/r)),s[0]=parseInt(Math.min(a.top,n[0],a.right/r+n[1],n[1]/r)),s[1]=parseInt(Math.min(a.right,n[1],a.top*r+n[0],n[0]*r))),"top right"===o.position&&(n[0]=i.maxSize[1]-t.outerHeight,n[1]=i.maxSize[0]-t.outerWidth,n[2]=t.outerHeight-i.minSize[1],n[3]=t.outerWidth-i.minSize[0],o.draggable.settings.bounderies=n,s[0]=parseInt(Math.min(a.top,n[0],a.right/r,n[1]/r)),s[1]=parseInt(Math.min(a.right,n[1],a.top*r,n[0]*r)),s[3]=parseInt(Math.min(a.left,n[3],a.bottom*r+n[2],n[2]*r)),s[2]=parseInt(Math.min(a.bottom,n[2],a.left/r+n[3],n[3]/r))),o.originalBounderies={top:-n[0],right:n[1],bottom:n[2],left:-n[3]},o.aspectRatioBounderies={top:-s[0],right:s[1],bottom:s[2],left:-s[3]},o.draggable.bounderies=o.resizable.preserveAspectRatio?o.aspectRatioBounderies:o.originalBounderies},this.fixDeltas=function(){var e=$.clayfy;if(o.resizable.preserveAspectRatio)t=o.resizable.originalSize.width/o.resizable.originalSize.height;if(!o.resizable.preserveAspectRatio&&o.resizable.shiftKey)var t=o.resizable.actualSize.width/o.resizable.actualSize.height;(o.resizable.preserveAspectRatio||o.resizable.shiftKey)&&("right"===o.position&&(e.dY=e.dX/t),"bottom"===o.position&&(e.dX=e.dY*t),"left"===o.position&&(e.dY=e.dX/t),"top"===o.position&&(e.dX=e.dY*t),"top left"===o.position&&(e.dY=e.dX/t),"top right"===o.position&&(e.dY=-e.dX/t),"bottom left"===o.position&&(e.dY=-e.dX/t),"bottom right"===o.position&&(e.dY=e.dX/t))},function(){i.settings.className&&o.el.addClass(i.settings.className),o.updatePosition(),o.resizable.el.after(o.el),o.draggable=new e(o.el,{move:!1,container:i.draggable.container,scroll:!1,escape:!1}),o.draggable.el.on("clayfy-drop",function(e){i.el.trigger("clayfy-resizeend"),i.settings.callbacks.resizeend()}),o.draggable.el.on("clayfy-dragstart",function(e){e.stopPropagation(),o.resizable.preserveAspectRatio||(o.resizable.originalSize=o.resizable.getSize()),i.el.trigger("clayfy-beforeresize"),o.setBounderies(),i.el.trigger("clayfy-resizestart"),i.settings.callbacks.resizestart(),r=!1}),o.draggable.el.on("clayfy-drag",function(e){e.shiftKey&&!i.preserveAspectRatio&&(i.shiftKey=!0),e.shiftKey||(i.shiftKey=!1),!r||e.shiftKey||i.preserveAspectRatio||(console.log("Desactivate: preserve aspect ratio"),o.draggable.bounderies=o.originalBounderies,r=!1),r||!e.shiftKey||i.preserveAspectRatio||(console.log("Activate: preserve aspect ratio"),o.draggable.bounderies=o.aspectRatioBounderies,r=!0),i.preserveAspectRatio&&!i.shiftKey&&(o.draggable.bounderies=o.aspectRatioBounderies)}),t.indexOf("left")>-1&&o.draggable.el.on("clayfy-drag",function(e){(i.preserveAspectRatio||i.shiftKey)&&(o.fixDeltas(),"left"===t&&i.resize.top()),i.resize.left()}),t.indexOf("top")>-1&&o.draggable.el.on("clayfy-drag",function(e){(i.preserveAspectRatio||i.shiftKey)&&(o.fixDeltas(),"top"===t&&i.resize.left()),i.resize.top()}),t.indexOf("right")>-1&&o.draggable.el.on("clayfy-drag",function(e){(i.preserveAspectRatio||i.shiftKey)&&(o.fixDeltas(),"right"===t&&i.resize.bottom()),i.resize.right()}),t.indexOf("bottom")>-1&&o.draggable.el.on("clayfy-drag",function(e){(i.preserveAspectRatio||i.shiftKey)&&(o.fixDeltas(),"bottom"===t&&i.resize.right()),i.resize.bottom()}),o.draggable.el.on("clayfy-drag",function(e){i.el.trigger("clayfy-resize"),i.settings.callbacks.resize()}),o.resizable.touchableDevice&&o.el.addClass("clayfy-touch-device")}()}function r(t,i){this.el=t instanceof $?t:$(t),this.draggableBox,this.dropArea=$("<div>",{class:"clayfy-sort-droparea"}),this.draggable,this.droppable,this.droppableParent,this.index,this.indexRelative,this.parent,this.settings=$.extend(!0,{},$.clayfy.settings,i);
4026var o,r=this,a=function(e){27===e.keyCode&&r.cancel()},n=function(){r.draggableBox=r.el.clone(),r.draggableBox.css({position:"absolute",width:"100%",height:"100%"}).addClass("clayfy-sort-dragging");var e=r.el.parent();"static"===e.css("position")&&e.css("position","relative")},s=function(){f(),c(),r.index=r.droppable.index(r.el),r.parent=r.el.parent(),r.indexRelative=r.parent.find(r.droppable).index(r.el),r.draggableBox.css({width:r.el.outerWidth(),height:r.el.outerHeight(),top:r.el.position().top,left:r.el.position().left}),l(),r.draggableBox.appendTo(r.parent),r.el.css({visibility:"hidden"})},l=function(){r.dropArea.appendTo(r.el.parent()),r.dropArea.css({position:"absolute",width:r.el.outerWidth(),height:r.el.outerHeight(),top:r.el.position().top+parseInt(r.el.css("margin-top"))-parseInt(r.dropArea.css("border-top-width")),left:r.el.position().left+parseInt(r.el.css("margin-left"))-parseInt(r.dropArea.css("border-left-width"))})},d=function(e){var t=r.parent.find(r.droppable);if(r.parent.is($(r.droppedTarget).parent())){var i=t.index(r.el);r.indexRelative<i?t.eq(r.indexRelative).before(r.el):t.eq(r.indexRelative).after(r.el)}else t.length?t.eq(r.indexRelative).before(r.el):r.parent.append(r.el);l()},g=function(e){f(),(!1===r.el.triggerHandler("validateChange")||!r.parent.is($(r.droppedTarget).parent())&&!r.settings.export||o)&&d();var t=r.dropArea.parent().offset(),i=r.draggableBox.parent().offset(),a=r.el.position().left+(t.left-i.left),n=r.el.position().top+(t.top-i.top);return r.draggableBox.animate({top:n,left:a},200,function(){r.dropArea.detach(),r.el[0].style.visibility="",r.draggableBox.detach(),f();var e=r.droppable.index(r.el);e!=r.index&&(r.index=e,r.el.trigger($.Event("clayfy-changeorder",{index:r.index,order:r.droppable}))),r.el.parent().find(".clayfy-sort-helper").remove()}),o=!1,!1},p=function(e){if(!r.el.is(e.target)){f();var t=r.droppable.index(e.target),i=r.droppable.index(r.el);r.droppedTarget=e.target,t>i?$(e.target).after(r.el):$(e.target).before(r.el),l(),r.draggable.updateDropArea(),r.parent.find(r.droppable).length<2?r.parent.find(".clayfy-sort-helper").length||r.parent.append('<div class="clayfy-sort-helper" style="position: absolute; width: 100%; height: 100%; top: 0; left:0"></div>'):r.parent.find(".clayfy-sort-helper").remove(),$(".clayfy-sort-helper").each(function(){var e=$
4026(this);e.parent().is(r.droppableParent)&&r.draggable.addDroppable(e)})}},f=function(){r.settings.siblings?r.droppable=r.settings.siblings instanceof $?r.settings.siblings:$(r.settings.siblings):r.droppable=r.el.siblings().andSelf()},c=function(){r.droppableParent||(r.droppableParent=r.el.parent()),r.droppable.each(function(){r.droppableParent=r.droppableParent.add($(this).parent())})};this.cancel=function(){o=!0,$("body").trigger("mouseup")},function(){f(),c(),n(),r.el.on("mousedown touchstart",function(e){"mousedown"===e.type&&1!==e.which||(s(),r.draggableBox.trigger($.Event(e.type,e)))});var t=$.extend(!0,{},r.settings,{droppable:r.droppable,escape:!1,dropoutside:!0});r.draggable=new e(r.draggableBox,t),r.draggableBox.on("clayfy-drop",g),r.draggableBox.on("clayfy-dropoutside",function(e){return!1}),r.draggableBox.on("clayfy-dragenter",p),r.draggableBox.on("clayfy-dragstart",function(){r.draggable.resetDroppable(r.droppable),$(".clayfy-sort-helper").each(function(){var e=$(this);e.parent().is(r.droppableParent)&&r.draggable.addDroppable(e)})}),r.draggableBox.on("clayfy-dragstart",function(e){e.stopPropagation(),$(window).on("keydown",a)}),r.draggableBox.on("clayfy-drop",function(){$(window).off("keydown",a)})}()}$.clayfy={dX:0,dY:0,container:function(e,i){return new t(e,i)},settings:{type:"draggable",bounderies:[1e7,1e7,1e7,1e7],container:"",moveX:!0,moveY:!0,move:!0,not:"",ghost:!1,coverScreen:!0,scrollable:"",droppable:"",fit:!0,dropoutside:!1,migrate:!1,overflow:!1,escape:!0,propagate:!0,preserveAspectRatio:!1,maxSize:[500,200],minSize:[100,50],left:!0,top:!0,right:!0,bottom:!0,className:"",siblings:"",export:!0,dragstart:function(e){},drag:function(e){},drop:function(e){}},getInner:function(e){var t,i,o,r,a,n=e instanceof $?e:$(e);return n.length?(t=n[0].style.position,"static"===n.css("position")&&n.css({position:"relative"}),o=$("<div>",{style:"position:absolute;top:0;left:0;bottom:0;right:0"}),i=$("<div>",{style:"position:absolute;top:0;left:0;width:100%;height:100%"}),o.append(i),n.append(o),r=i.width(),a=i.height(),o.remove(),n[0].style.position=t,{innerWidth:r,innerHeight:a}):{width:0,height:0}}};var a;$.fn.clayfy=function(t){var o=arguments;if(void 0===t||"object"==typeof t){var n=$.clayfy.settings.type;switch(void 0!==t&&void 0!==t.type&&(n=t.type),n){case"draggable":a=e;break;case"resizable":a=i;break;case"sortable":a=r}return this.each(function(){$.data(this,"clayfy")||$.data(this,"clayfy",new a(this,t))})}if("string"==typeof t&&"_"!==t[0]&&"init"!==t){if("instance"===t)return this.length?$.data(this[0],"clayfy"):null;if(0==Array.prototype.slice.call(o,1).length&&-1!=$.inArray(t,$.fn.clayfy.getters)){var s=$.data(this[0],"clayfy");return s[t].apply(s,Array.prototype.slice.call(o,1))}return this.each(function(){var e=$.data(this,"clayfy");"function"==typeof e[t]&&e[t].apply(e,Array.prototype.slice.call(o,1))})}},$.fn.clayfy.getters=["getPosition"]}(jQuery); 4027isTouchDevice=function(){return"ontouchstart"in window||navigator.maxTouchPoints}; 4028 4029!function(a,u){a.guessLanguage=(a.module||{}).exports=new function(){var e=a._languageData||{};"object"==typeof module&&module.exports===a&&(e=require("./_languageData")||{});var n=20,i=300,t={ab:"Abkhazian",af:"Afrikaans",ar:"Arabic",az:"Azeri",be:"Belarusian",bg:"Bulgarian",bn:"Bengali",bo:"Tibetan",br:"Breton",ca:"Catalan",ceb:"Cebuano",cs:"Czech",cy:"Welsh",da:"Danish",de:"German",el:"Greek",en:"English",eo:"Esperanto",es:"Spanish",et:"Estonian",eu:"Basque",fa:"Farsi",fi:"Finnish",fo:"Faroese",fr:"French",fy:"Frisian",gd:"Scots Gaelic",gl:"Galician",gu:"Gujarati",ha:"Hausa",haw:"Hawaiian",he:"Hebrew",hi:"Hindi",hmn:"Pahawh Hmong",hr:"Croatian",hu:"Hungarian",hy:"Armenian",id:"Indonesian",is:"Icelandic",it:"Italian",ja:"Japanese",ka:"Georgian",kk:"Kazakh",km:"Cambodian",ko:"Korean",ku:"Kurdish",ky:"Kyrgyz",la:"Latin",lt:"Lithuanian",lv:"Latvian",mg:"Malagasy",mk:"Macedonian",ml:"Malayalam",mn:"Mongolian",mr:"Marathi",ms:"Malay",nd:"Ndebele",ne:"Nepali",nl:"Dutch",nn:"Nynorsk",no:"Norwegian",nso:"Sepedi",pa:"Punjabi",pl:"Polish",ps:"Pashto",pt:"Portuguese","pt-PT":"Portuguese (Portugal)","pt-B
4029R":"Portuguese (Brazil)",ro:"Romanian",ru:"Russian",sa:"Sanskrit",bs:"Serbo-Croatian",sk:"Slovak",sl:"Slovene",so:"Somali",sq:"Albanian",sr:"Serbian",sv:"Swedish",sw:"Swahili",ta:"Tamil",te:"Telugu",th:"Thai",tl:"Tagalog",tlh:"Klingon",tn:"Setswana",tr:"Turkish",ts:"Tsonga",tw:"Twi",uk:"Ukrainian",ur:"Urdu",uz:"Uzbek",ve:"Venda",vi:"Vietnamese",xh:"Xhosa",zh:"Chinese","zh-TW":"Traditional Chinese (Taiwan)",zu:"Zulu"},r={ab:12026,af:40,ar:26020,az:26030,be:11890,bg:26050,bn:26040,bo:26601,br:1361,ca:3,ceb:26060,cs:26080,cy:26560,da:26090,de:26160,el:26165,en:26110,eo:11933,es:26460,et:26120,eu:1232,fa:26130,fi:26140,fo:11817,fr:26150,fy:1353,gd:65555,gl:1252,gu:26599,ha:26170,haw:26180,he:26592,hi:26190,hr:26070,hu:26200,hy:26597,id:26220,is:26210,it:26230,ja:26235,ka:26600,kk:26240,km:1222,ko:26255,ku:11815,ky:26260,la:26280,lt:26300,lv:26290,mg:1362,mk:26310,ml:26598,mn:26320,mr:1201,ms:1147,ne:26330,nl:26100,nn:172,no:26340,pa:65550,pl:26380,ps:26350,pt:26390,ro:26400,ru:26410,sa:1500,bs:1399,sk:26430,sl:26440,so:26450,sq:26010,sr:26420,sv:26480,sw:26470,ta:26595,te:26596,th:26594,tl:26490,tlh:26250,tn:65578,tr:26500,tw:1499,uk:26520,ur:26530,uz:26540,vi:26550,zh:26065,"zh-TW":22},F=[["Armenian","hy"],["Hebrew","he"],["Bengali","bn"],["Gurmukhi","pa"],["Greek","el"],["Gujarati","gu"],["Oriya","or"],["Tamil","ta"],["Telugu","te"],["Kannada","kn"],["Malayalam","ml"],["Sinhala","si"],["Thai","th"],["Lao","lo"],["Tibetan","bo"],["Burmese","my"],["Georgian","ka"],["Mongolian","mn"],["Khmer","km"],["Pahawh Hmong","hmn"]],o="unknown",g=["cs","af","pl","hr","ro","sk","sl","tr","hu","az","et","sq","ca","es","fr","de","nl","it","da","is","no","sv","fi","lv","pt","ve","lt","tl","cy","vi"],l=["en","ceb","ha","so","tlh","id","haw","la","sw","eu","nr","nso","zu","xh","ss","st","tn","ts"].concat(g),s=["ru","uk","kk","uz","mn","sr","mk","bg","ky"],h=["ar","fa","ps","ur"],c=["hi","ne"],p=["pt-BR","pt-PT"],m={"Basic Latin":/[\u0000-\u007F]/g,"Latin-1 Supplement":/[\u0080-\u00FF]/g,"Latin Extended-A":/[\u0100-\u017F]/g,"Latin Extended-B":/[\u0180-\u024F]/g,"IPA Extensions":/[\u0250-\u02AF]/g,"Spacing Modifier Letters":/[\u02B0-\u02FF]/g,"Combining Diacritical Marks":/[\u0300-\u036F]/g,"Greek and Coptic":/[\u0370-\u03FF]/g,Cyrillic:/[\u0400-\u04FF]/g,"Cyrillic Supplement":/[\u0500-\u052F]/g,Armenian:/[\u0530-\u058F]/g,Hebrew:/[\u0590-\u05FF]/g,Arabic:/[\u0600-\u06FF]/g,Syriac:/[\u0700-\u074F]/g,"Arabic Supplement":/[\u0750-\u077F]/g,Thaana:/[\u0780-\u07BF]/g,NKo:/[\u07C0-\u07FF]/g,Devanagari:/[\u0900-\u097F]/g,Bengali:/[\u0980-\u09FF]/g,Gurmukhi:/[\u0A00-\u0A7F]/g,Gujarati:/[\u0A80-\u0AFF]/g,Oriya:/[\u0B00-\u0B7F]/g,Tamil:/[\u0B80-\u0BFF]/g,Telugu:/[\u0C00-\u0C7F]/g,Kannada:/[\u0C80-\u0CFF]/g,Malayalam:/[\u0D00-\u0D7F]/g,Sinhala:/[\u0D80-\u0DFF]/g,Thai:/[\u0E00-\u0E7F]/g,Lao:/[\u0E80-\u0EFF]/g,Tibetan:/[\u0F00-\u0FFF]/g,Burmese:/[\u1000-\u109F]/g,Georgian:/[\u10A0-\u10FF]/g,"Hangul Jamo":/[\u1100-\u11FF]/g,Ethiopic:/[\u1200-\u137F]/g,"Ethiopic Supplement":/[\u1380-\u139F]/g,Cherokee:/[\u13A0-\u13FF]/g,"Unified Canadian Aboriginal Syllabics":/[\u1400-\u167F]/g,Ogham:/[\u1680-\u169F]/g,Runic:/[\u16A0-\u16FF]/g,"Pahawh Hmong":/[\u16B0-\u16B8]/g,Tagalog:/[\u1700-\u171F]/g,Hanunoo:/[\u1720-\u173F]/g,Buhid:/[\u1740-\u175F]/g,Tagbanwa:/[\u1760-\u177F]/g,Khmer:/[\u1780-\u17FF]/g,Mongolian:/[\u1800-\u18AF]/g,Limbu:/[\u1900-\u194F]/g,"Tai Le":/[\u1950-\u197F]/g,"New Tai Lue":/[\u1980-\u19DF]/g,"Khmer Symbols":/[\u19E0-\u19FF]/g,Buginese:/[\u1A00-\u1A1F]/g,Balinese:/[\u1B00-\u1B7F]/g,"Phonetic Extensions":/[\u1D00-\u1D7F]/g,"Phonetic Extensions Supplement":/[\u1D80-\u1DBF]/g,"Combining Diacritical Marks Supplement":/[\u1DC0-\u1DFF]/g,"Latin Extended Additional":/[\u1E00-\u1EFF]/g,"Greek Extended":/[\u1F00-\u1FFF]/g,"General Punctuation":/[\u2000-\u206F]/g,"Superscripts and Subscripts":/[\u2070-\u209F]/g,"Currency Symbols":/[\u20A0-\u20CF]/g,"Combining Diacritical Marks for Symbols":/[\u20D0-\u20FF]/g,"Letterlike Symbols":/[\u2100-\u214F]/g,"Number Forms":/[\u2150-\u218F]/g,Arrows:/[\u2190-\u21FF]/g,"Mathematical Operators":/[\u2200-\u22FF]/g,"Miscellaneous Technical":/[\u2300-\u23FF]/g,"Control Pictures":/[\u2400-\u243F]/g,"Optical Character Recognition":/[\u2440-\u245F]/g,"Enclosed Alphanumerics":/[\u2460-\u24FF]/g,"Box Drawing":/[\u2500-\u257F]/g,"Block Elements":/[\u2580-\u259F]/g,"Geometric Shapes":/[\u25A0-\u25FF]/g,"Miscellaneous Symbols":/[\u2600-\u26FF]/g,Dingbats:/[\u2700-\u27BF]/g,"Miscellaneous Mathematical Symbols-A":/[\u27C0-\u27EF]/g,"Supplemental Arrows-A":/[\u27F0-\u27FF]/g,"Braille Patterns":/[\u2800-\u28FF]/g,"Supplemental Arrows-B":/[\u2900-\u297F]/g,"Miscellaneous Mathematical Symbols-B":/[\u2980-\u29FF]/g,"Supplemental Mathematical Operators":/[\u2A00-\u2AFF]/g,"Miscellaneous Symbols and Arrows":/[\u2B00-\u2BFF]/g,Glagolitic:/[\u2C00-\u2C5F]/g,"Latin Extended-C":/[\u2C60-\u2C7F]/g,Coptic:/[\u2C80-\u2CFF]/g,"Georgian Supplement":/[\u2D00-\u2D2F]/g,Tifinagh:/[\u2D30-\u2D7F]/g,"Ethiopic Extended":/[\u2D80-\u2DDF]/g,"Supplemental Punctuation":/[\u2E00-\u2E7F]/g,"CJK Radicals Supplement":/[\u2E80-\u2EFF]/g,"KangXi Radicals":/[\u2F00-\u2FDF]/g,"Ideographic Description Characters":/[\u2FF0-\u2FFF]/g,"CJK Symbols and Punctuation":/[\u3000-\u303F]/g,Hiragana:/[\u3040-\u309F]/g,Katakana:/[\u30A0-\u30FF]/g,Bopomofo:/[\u3100-\u312F]/g,"Hangul Compatibility Jamo":/[\u3130-\u318F]/g,Kanbun:/[\u3190-\u319F]/g,"Bopomofo Extended":/[\u31A0-\u31BF]/g,"CJK Strokes":/[\u31C0-\u31EF]/g,"Katakana Phonet
4029ic Extensions":/[\u31F0-\u31FF]/g,"Enclosed CJK Letters and Months":/[\u3200-\u32FF]/g,"CJK Compatibility":/[\u3300-\u33FF]/g,"CJK Unified Ideographs Extension A":/[\u3400-\u4DBF]/g,"Yijing Hexagram Symbols":/[\u4DC0-\u4DFF]/g,"CJK Unified Ideographs":/[\u4E00-\u9FFF]/g,"Yi Syllables":/[\uA000-\uA48F]/g,"Yi Radicals":/[\uA490-\uA4CF]/g,"Modifier Tone Letters":/[\uA700-\uA71F]/g,"Latin Extended-D":/[\uA720-\uA7FF]/g,"Syloti Nagri":/[\uA800-\uA82F]/g,"Phags-pa":/[\uA840-\uA87F]/g,"Hangul Syllables":/[\uAC00-\uD7AF]/g,"High Surrogates":/[\uD800-\uDB7F]/g,"High Private Use Surrogates":/[\uDB80-\uDBFF]/g,"Low Surrogates":/[\uDC00-\uDFFF]/g,"Private Use Area":/[\uE000-\uF8FF]/g,"CJK Compatibility Ideographs":/[\uF900-\uFAFF]/g,"Alphabetic Presentation Forms":/[\uFB00-\uFB4F]/g,"Arabic Presentation Forms-A":/[\uFB50-\uFDFF]/g,"Variation Selectors":/[\uFE00-\uFE0F]/g,"Vertical Forms":/[\uFE10-\uFE1F]/g,"Combining Half Marks":/[\uFE20-\uFE2F]/g,"CJK Compatibility Forms":/[\uFE30-\uFE4F]/g,"Small Form Variants":/[\uFE50-\uFE6F]/g,"Arabic Presentation Forms-B":/[\uFE70-\uFEFF]/g,"Halfwidth and Fullwidth Forms":/[\uFF00-\uFFEF]/g,Specials:/[\uFFF0-\uFFFF]/g};function d(a,e){var n=function(a){var u={};for(var e in m){var n=a.match(m[e]),i=(n?n.length:0)/a.length;u[e]=i}return u}(a);if(n["Hangul Syllables"]+n["Hangul Jamo"]+n["Hangul Compatibility Jamo"]>=.4)e.apply(u,["ko"]);else if(n["Greek and Coptic"]>=.4)e.apply(u,["el"]);else if(n.Hiragana+n.Katakana+n["Katakana Phonetic Extensions"]>=.2)e.apply(u,["ja"]);else if(n["CJK Unified Ideographs"]+n.Bopomofo+n["Bopomofo Extended"]+n["KangXi Radicals"]>=.4)e.apply(u,["zh"]);else if(n.Cyrillic>=.4)b(a,s,e);else if(n.Arabic+n["Arabic Presentation Forms-A"]+n["Arabic Presentation Forms-B"]>=.4)b(a,h,e);else if(n.Devanagari>=.4)b(a,c,e);else{for(var i=0,t=F.length;i<t;i++)if(n[F[i][0]]>=.4)return void e.apply(u,[F[i][1]]);n["Latin-1 Supplement"]+n["Latin Extended-A"]+n["IPA Extensions"]>=.4?b(a,g,function(n){"pt"==n?b(a,p,e):e.apply(u,[n])}):n["Basic Latin"]>=.15?b(a,l,e):e.apply(u,[o])}}function b(a,e,i){if(a.length<n)i.apply(u,[o]);else{for(var t={},r=function(a){for(var u={},e=[],n=(a=a.toLowerCase()).split(""),i=0,t=n.length-2;i<t;i++){var r=n[i]+n[i+1]+n[i+2]+"";u[r]?u[r]+=1:u[r]=1}for(var i in u)e[e.length]=[i,u[i]];return e.sort(function(a,u){return u[1]-a[1]})}(a),F=0,g=e.length;F<g;F++){var l=e[F].toLowerCase(),s=y(l)||null;s&&(t[l]=A(r,s))}var h=[];for(var c in t)h.push([c,t[c]]);if(0!=h.length){var p=h.sort(function(a,u){return a[1]-u[1]});i.apply(u,[p[0][0]])}else i.apply(u,[o])}}var f={};function y(a){if(f[a])return f[a];var u=e[a];if(!u)return{};for(var n=u.match(/([\s\S]{1,3})/g),i={},t=0,r=n.length;t<r;t++)i[n[t]]=t;return f[a]=i,i}function A(a,u){for(var e=0,n=0,t=a.length;n<t;n++)u[a[n][0]]?e+=Math.abs(a[n][1]-u[a[n][0]]):e+=i;return e}return{detect:function(a,e){a?d(a=a.substr(0,4096).replace(/[\u0021-\u0040]/g,""),e):e.apply(u,[o])},info:function(a,e){this.detect(a,function(a){a!==o?e.apply(u,[[a,r[a],t[a]]]):e.apply(u,[[o,o,o]])})},code:function(a,e){this.detect(a,function(a){a!==o?e.apply(u,[r[a]]):e.apply(u,[-1])})},name:function(a,e){this.detect(a,function(a){a!==o?e.apply(u,[t[a]]):e.apply(u,[o])})}}}}(this); 4030!function(t,e,i,s){t.widget("ui.triggeredAutocomplete",t.extend(!0,{},t.ui.autocomplete.prototype,{options:{trigger:"@",allowDuplicates:!1},_create:function(){var e=this;this.id_map=new Object,this.stopIndex=-1,this.stopLength=-1,this.contents="",this.cursorPos=0,this.element.bind("keydown.autocomplete.fix",function(i){switch(i.keyCode){case t.ui.keyCode.ESCAPE:e.close(i),i.stopImmediatePropagation();break;case t.ui.keyCode.UP:case t.ui.keyCode.DOWN:e.menu.element.is(":visible")||i.stopImmediatePropagation()}});var i=this.element.attr("id_map");i&&(this.id_map=jQuery.parseJSON(i)),this.ac=t.ui.autocomplete.prototype,this.ac._create.apply(this,arguments),this.updateHidden(),this.options.select=function(t,i){var s=e.contents,n=e.cursorPos,o=s.substring(n,s.length),r=s.substring(0,n);r=r.substring(0,r.lastIndexOf(e.options.trigger));var a=e.element.scrollTop();this.value=r+e.options.trigger+i.item.username+" "+o,e.element.scrollTop(a),e.id_map[i.item.label]=i.item.value,e.updateHidden();var l=r.length+e.options.trigger.length+i.item.username.length+2;if(this.createTextRange){var u=this.createTextRange();u.move("character",l),u.select()}else this.setSelectionRange&&this.setSelectionRange(l,l);return!1},this.options.focus=function(t,e){return!1},this.menu.options.blur=function(t,e){return!1},this.element.focus(function(){e.updateHidden()}),this.element.change(function(){e.updateHidden()})},_renderItem:function(e,i){return void 0!=i.img?t("<li></li>").data("item.autocomplete",i).append("<a><img src='"+i.img+"' /><span>"+i.label+" <span class='small-mention'>@"+i.username+"</span></span></a>").appendTo(e):t("<li></li>").data("item.autocomplete",i).append(t("<a></a>").text(i.label)).appendTo(e)},_move:function(t,e){this.menu.element.is(":visible")?this.menu.first()&&/^previous/.test(t)||this.menu.last()&&/^next/.test(t)?this.menu.deactivate():this.menu[t](e):this.search(null,e)},search:function(t,e){var i=this.element.val(),s=this.getCursor();this.contents=i,this.cursorPos=s;i.substring(i.lastIndexOf(this.options.trigger)-1,s),new RegExp("\\B\\"+this.options.trigger+"([\\w\\-]+)");if(i.indexOf(this.options.trigger)>=0){var n=(i=i.substring(0,s)).substring(i.lastIndexOf(this.options.trigger)+1,i.length);if(this.stopIndex==i.lastIndexOf(this.options.trigger)&&n.length>this.stopLength&&(n=""),n.length>0)return this.updateHidden(),this._search(n);this.close()}},_initSource:function(){var e,i,s=this;t.isArray(this.options.source)?(e=this.options.source,this.source=function(i,s){s(t.ui.autocomplete.filter(e,i.term))}):"string"==typeof this.options.source?(i=this.options.source,this.source=function(e,n){s.xhr&&s.xhr.abort(),s.xhr=t.ajax({url:i,data:e,dataType:"json",success:function(i){null!=i?(n(t.map(i,function(t){if(label="string"==typeof t?t:t.label,!s.id_map[label]||s.options.allowDuplicates)return t})),s.stopLength=-1,s.stopIndex=-1):(s.stopLength=e.term.length,s.stopIndex=s.contents.lastIndexOf(s.options.trigger),s.close())}})}):this.source=this.options.source},destroy:function(){t.Widget.prototype.destroy.call(this)},getCursor:function(){var t=this.element[0];if(t.selectionStart)return t.selectionStart;if(t.ownerDocument.selection){var e=t.ownerDocument.selection.createRange();if(!e)return 0;var i=t.createTextRange(),s=i.duplicate();return i.moveToBookmark(e.getBookmark()),s.setEndPoint("EndToStart",i),s.text.length}},updateHidden:function(){var e=this.options.trigger,i=this.element.scrollTop(),s=this.element.val();for(var n in this.id_map){var o=e+n;o=o.replace(/[^a-zA-Z 0-9@]+/g,"\\$&");var r=new RegExp(o,"g");s==(s=s.replace(r,e+"["+this.id_map[n]+"]"))&&delete this.id_map[n]}t(this.options.hidden).val(s),this.element.scrollTop(i)}}))}(jQuery,window,document); 4031 4032!function($){$.fn.extend({limit:function(limit,element){var interval,f,self=$(this);$(this).focus(function(){interval=window.setInterval(substring,100)}),$(this).blur(function(){clearInterval(interval),substring()}),substringFunction="function substring(){ var val = $(self).val();var length = val.length;if(length > limit){$(self).val($(self).val().substring(0,limit));}",void 0!==element&&(substringFunction+="if($(element).html() != limit-length){$(element).html((limit-length<=0)?'0':limit-length);}"),substringFunction+="}",eval(substringFunction),substring()}})}(jQuery); 4033 4034/*! 4035 * jQuery Form Plugin 4036 * version: 3.51.0-2014.06.20 4037 * Requires jQuery v1.5 or later 4038 * Copyright (c) 2014 M. Alsup 4039 * Examples and documentation at: http://malsup.com/jquery/form/ 4040 * Project repository: https://github.com/malsup/form 4041 * Dual licensed under the MIT and GPL licenses.
4042 * https://github.com/malsup/form#copyright-and-license 4043 */ 4044!function(e){"use strict";"function"==typeof define&&define.amd?define(["jquery"],e):e("undefined"!=typeof jQuery?jQuery:window.Zepto)}(function(e){"use strict";function t(t){var r=t.data;t.isDefaultPrevented()||(t.preventDefault(),e(t.target).ajaxSubmit(r))}function r(t){var r=t.target,a=e(r);if(!a.is("[type=submit],[type=image]")){var n=a.closest("[type=submit]");if(0===n.length)return;r=n[0]}var i=this;if(i.clk=r,"image"==r.type)if(void 0!==t.offsetX)i.clk_x=t.offsetX,i.clk_y=t.offsetY;else if("function"==typeof e.fn.offset){var o=a.offset();i.clk_x=t.pageX-o.left,i.clk_y=t.pageY-o.top}else i.clk_x=t.pageX-r.offsetLeft,i.clk_y=t.pageY-r.offsetTop;setTimeout(function(){i.clk=i.clk_x=i.clk_y=null},100)}function a(){if(e.fn.ajaxSubmit.debug){var t="[jquery.form] "+Array.prototype.join.call(arguments,"");window.console&&window.console.log?window.console.log(t):window.opera&&window.opera.postError&&window.opera.postError(t)}}var n={};n.fileapi=void 0!==e("<input type='file'/>").get(0).files,n.formdata=void 0!==window.FormData;var i=!!e.fn.prop;e.fn.attr2=function(){if(!i)return this.attr.apply(this,arguments);var e=this.prop.apply(this,arguments);return e&&e.jquery||"string"==typeof e?e:this.attr.apply(this,arguments)},e.fn.ajaxSubmit=function(t){function r(r){var a,n,i=e.param(r,t.traditional).split("&"),o=i.length,s=[];for(a=0;o>a;a++)i[a]=i[a].replace(/\+/g," "),n=i[a].split("="),s.push([decodeURIComponent(n[0]),decodeURIComponent(n[1])]);return s}function o(a){for(var n=new FormData,i=0;i<a.length;i++)n.append(a[i].name,a[i].value);if(t.extraData){var o=r(t.extraData);for(i=0;i<o.length;i++)o[i]&&n.append(o[i][0],o[i][1])}t.data=null;var s=e.extend(!0,{},e.ajaxSettings,t,{contentType:!1,processData:!1,cache:!1,type:u||"POST"});t.uploadProgress&&(s.xhr=function(){var r=e.ajaxSettings.xhr();return r.upload&&r.upload.addEventListener("progress",function(e){var r=0,a=e.loaded||e.position,n=e.total;e.lengthComputable&&(r=Math.ceil(a/n*100)),t.uploadProgress(e,a,n,r)},!1),r}),s.data=null;var c=s.beforeSend;return s.beforeSend=function(e,r){r.data=t.formData?t.formData:n,c&&c.call(this,e,r)},e.ajax(s)}function s(r){function n(e){var t=null;try{e.contentWindow&&(t=e.contentWindow.document)}catch(r){a("cannot get iframe.contentWindow document: "+r)}if(t)return t;try{t=e.contentDocument?e.contentDocument:e.document}catch(r){a("cannot get iframe.contentDocument: "+r),t=e.document}return t}function o(){function t(){try{var e=n(g).readyState;a("state = "+e),e&&"uninitialized"==e.toLowerCase()&&setTimeout(t,50)}catch(r){a("Server abort: ",r," (",r.name,")"),s(k),j&&clearTimeout(j),j=void 0}}var r=f.attr2("target"),i=f.attr2("action"),o="multipart/form-data",c=f.attr("enctype")||f.attr("encoding")||o;w.setAttribute("target",p),(!u||/post/i.test(u))&&w.setAttribute("method","POST"),i!=m.url&&w.setAttribute("action",m.url),m.skipEncodingOverride||u&&!/post/i.test(u)||f.attr({encoding:"multipart/form-data",enctype:"multipart/form-data"}),m.timeout&&(j=setTimeout(function(){T=!0,s(D)},m.timeout));var l=[];try{if(m.extraData)for(var d in m.extraData)m.extraData.hasOwnProperty(d)&&l.push(e.isPlainObject(m.extraData[d])&&m.extraData[d].hasOwnProperty("name")&&m.extraData[d].hasOwnProperty("value")?e('<input type="hidden" name="'+m.extraData[d].name+'">').val(m.extraData[d].value).appendTo(w)[0]:e('<input type="hidden" name="'+d+'">').val(m.extraData[d]).appendTo(w)[0]);m.iframeTarget||v.appendTo("body"),g.attachEvent?g.attachEvent("onload",s):g.addEventListener("load",s,!1),setTimeout(t,15);try{w.submit()}catch(h){var x=document.createElement("form").submit;x.apply(w)}}finally{w.setAttribute("action",i),w.setAttribute("enctype",c),r?w.setAttribute("target",r):f.removeAttr("target"),e(l).remove()}}function s(t){if(!x.aborted&&!F){if(M=n(g),M||(a("cannot access response document"),t=k),t===D&&x)return x.abort("timeout"),void S.reject(x,"timeout");if(t==k&&x)return x.abort("server abort"),void S.reject(x,"error","server abort");if(M&&M.location.href!=m.iframeSrc||T){g.detachEvent?g.detachEvent("onload",s):g.removeEventListener("load",s,!1);var r,i="success";try{if(T)throw"timeout";var o="xml"==m.dataType||M.XMLDocument||e.isXMLDoc(M);if(a("isXml="+o),!o&&window.opera&&(null===M.body||!M.body.innerHTML)&&--O)return a("requeing onLoad callback, DOM not available"),void setTimeout(s,250);var u=M.body?M.body:M.documentElement;x.responseText=u?u.innerHTML:null,x.responseXML=M.XMLDocument?M.XMLDocument:M,o&&(m.dataType="xml"),x.getResponseHeader=function(e){var t={"content-type":m.dataType};return t[e.toLowerCase()]},u&&(x.status=Number(u.getAttribute("status"))||x.status,x.statusText=u.getAttribute("statusText")||x.statusText);var c=(m.dataType||"").toLowerCase(),l=/(json|script|text)/.test(c);if(l||m.textarea){var f=M.getElementsByTagName("textarea")[0];if(f)x.responseText=f.value,x.status=Number(f.getAttribute("status"))||x.status,x.statusText=f.getAttribute("statusText")||x.statusText;else if(l){var p=M.getElementsByTagName("pre")[0],h=M.getElementsByTagName("body")[0];p?x.responseText=p.textContent?p.textContent:p.innerText:h&&(x.responseText=h.textContent?h.textContent:h.innerText)}}else"xml"==c&&!x.responseXML&&x.responseText&&(x.responseXML=X(x.responseText));try{E=_(x,c,m)}catch(y){i="parsererror",x.error=r=y||i}}catch(y){a("error caught: ",y),i="error",x.error=r=y||i}x.aborted&&(a("upload aborted"),i=null),x.status&&(i=x.status>=200&&x.status<300||304===x.status?"success":"error"),"success"===i?(m.success&&m.success.call(m.context,E,"success",x),S.resolve(x.responseText,"success",x),d&&e.event.trigger("ajaxSuccess",[x,m])):i&&(void 0===r&&(r=x.statusText),m.error&&m.error.call(m.context,x,i,r),S.reject(x,"error",r),d&&e.event.trigger("ajaxError",[x,m,r])),d&&e.event.trigger("ajaxComplete",[x,m]),d&&!--e.active&&e.event.trigger("ajaxStop"),m.complete&&m.complete.call(m.context,x,i),F=!0,m.timeout&&clearTimeout(j),setTimeout(function(){m.iframeTarget?v.attr("src",m.iframeSrc):v.remove(),x.responseXML=null},100)}}}var c,l,m,d,p,v,g,x,y,b,T,j,w=f[0],S=e.Deferred();if(S.abort=function(e){x.abort(e)},r)for(l=0;l<h.length;l++)c=e(h[l]),i?c.prop("disabled",!1):c.removeAttr("disabled");if(m=e.extend(!0,{},e.ajaxSettings,t),m.context=m.context||m,p="jqFormIO"+(new Date).getTime(),m.iframeTarget?(v=e(m.iframeTarget),b=v.attr2("name"),b?p=b:v.attr2("name",p)):(v=e('<iframe name="'+p+'" src="'+m.iframeSrc+'" />'),v.css({position:"absolute",top:"-1000px",left:"-1000px"})),g=v[0],x={aborted:0,responseText:null,responseXML:null,status:0,statusText:"n/a",getAllResponseHeaders:function(){},getResponseHeader:function(){},setRequestHeader:function(){},abort:function(t){var r="timeout"===t?"timeout":"aborted";a("aborting upload... "+r),this.aborted=1;try{g.contentWindow.document.execCommand&&g.contentWindow.document.execCommand("Stop")}catch(n){}v.attr("src",m.iframeSrc),x.error=r,m.error&&m.error.call(m.context,x,r,t),d&&e.event.trigger("ajaxError",[x,m,r]),m.complete&&m.complete.call(m.context,x,r)}},d=m.global,d&&0===e.active++&&e.event.trigger("ajaxStart"),d&&e.event.trigger("ajaxSend",[x,m]),m.beforeSend&&m.beforeSend.c
4044all(m.context,x,m)===!1)return m.global&&e.active--,S.reject(),S;if(x.aborted)return S.reject(),S;y=w.clk,y&&(b=y.name,b&&!y.disabled&&(m.extraData=m.extraData||{},m.extraData[b]=y.value,"image"==y.type&&(m.extraData[b+".x"]=w.clk_x,m.extraData[b+".y"]=w.clk_y)));var D=1,k=2,A=e("meta[name=csrf-token]").attr("content"),L=e("meta[name=csrf-param]").attr("content");L&&A&&(m.extraData=m.extraData||{},m.extraData[L]=A),m.forceSync?o():setTimeout(o,10);var E,M,F,O=50,X=e.parseXML||function(e,t){return window.ActiveXObject?(t=new ActiveXObject("Microsoft.XMLDOM"),t.async="false",t.loadXML(e)):t=(new DOMParser).parseFromString(e,"text/xml"),t&&t.documentElement&&"parsererror"!=t.documentElement.nodeName?t:null},C=e.parseJSON||function(e){return window.eval("("+e+")")},_=function(t,r,a){var n=t.getResponseHeader("content-type")||"",i="xml"===r||!r&&n.indexOf("xml")>=0,o=i?t.responseXML:t.responseText;return i&&"parsererror"===o.documentElement.nodeName&&e.error&&e.error("parsererror"),a&&a.dataFilter&&(o=a.dataFilter(o,r)),"string"==typeof o&&("json"===r||!r&&n.indexOf("json")>=0?o=C(o):("script"===r||!r&&n.indexOf("javascript")>=0)&&e.globalEval(o)),o};return S}if(!this.length)return a("ajaxSubmit: skipping submit process - no element selected"),this;var u,c,l,f=this;"function"==typeof t?t={success:t}:void 0===t&&(t={}),u=t.type||this.attr2("method"),c=t.url||this.attr2("action"),l="string"==typeof c?e.trim(c):"",l=l||window.location.href||"",l&&(l=(l.match(/^([^#]+)/)||[])[1]),t=e.extend(!0,{url:l,success:e.ajaxSettings.success,type:u||e.ajaxSettings.type,iframeSrc:/^https/i.test(window.location.href||"")?"javascript:false":"about:blank"},t);var m={};if(this.trigger("form-pre-serialize",[this,t,m]),m.veto)return a("ajaxSubmit: submit vetoed via form-pre-serialize trigger"),this;if(t.beforeSerialize&&t.beforeSerialize(this,t)===!1)return a("ajaxSubmit: submit aborted via beforeSerialize callback"),this;var d=t.traditional;void 0===d&&(d=e.ajaxSettings.traditional);var p,h=[],v=this.formToArray(t.semantic,h);if(t.data&&(t.extraData=t.data,p=e.param(t.data,d)),t.beforeSubmit&&t.beforeSubmit(v,this,t)===!1)return a("ajaxSubmit: submit aborted via beforeSubmit callback"),this;if(this.trigger("form-submit-validate",[v,this,t,m]),m.veto)return a("ajaxSubmit: submit vetoed via form-submit-validate trigger"),this;var g=e.param(v,d);p&&(g=g?g+"&"+p:p),"GET"==t.type.toUpperCase()?(t.url+=(t.url.indexOf("?")>=0?"&":"?")+g,t.data=null):t.data=g;var x=[];if(t.resetForm&&x.push(function(){f.resetForm()}),t.clearForm&&x.push(function(){f.clearForm(t.includeHidden)}),!t.dataType&&t.target){var y=t.success||function(){};x.push(function(r){var a=t.replaceTarget?"replaceWith":"html";e(t.target)[a](r).each(y,arguments)})}else t.success&&x.push(t.success);if(t.success=function(e,r,a){for(var n=t.context||this,i=0,o=x.length;o>i;i++)x[i].apply(n,[e,r,a||f,f])},t.error){var b=t.error;t.error=function(e,r,a){var n=t.context||this;b.apply(n,[e,r,a,f])}}if(t.complete){var T=t.complete;t.complete=function(e,r){var a=t.context||this;T.apply(a,[e,r,f])}}var j=e("input[type=file]:enabled",this).filter(function(){return""!==e(this).val()}),w=j.length>0,S="multipart/form-data",D=f.attr("enctype")==S||f.attr("encoding")==S,k=n.fileapi&&n.formdata;a("fileAPI :"+k);var A,L=(w||D)&&!k;t.iframe!==!1&&(t.iframe||L)?t.closeKeepAlive?e.get(t.closeKeepAlive,function(){A=s(v)}):A=s(v):A=(w||D)&&k?o(v):e.ajax(t),f.removeData("jqxhr").data("jqxhr",A);for(var E=0;E<h.length;E++)h[E]=null;return this.trigger("form-submit-notify",[this,t]),this},e.fn.ajaxForm=function(n){if(n=n||{},n.delegation=n.delegation&&e.isFunction(e.fn.on),!n.delegation&&0===this.length){var i={s:this.selector,c:this.context};return!e.isReady&&i.s?(a("DOM not ready, queuing ajaxForm"),e(function(){e(i.s,i.c).ajaxForm(n)}),this):(a("terminating; zero elements found by selector"+(e.isReady?"":" (DOM not ready)")),this)}return n.delegation?(e(document).off("submit.form-plugin",this.selector,t).off("click.form-plugin",this.selector,r).on("submit.form-plugin",this.selector,n,t).on("click.form-plugin",this.selector,n,r),this):this.ajaxFormUnbind().bind("submit.form-plugin",n,t).bind("click.form-plugin",n,r)},e.fn.ajaxFormUnbind=function(){return this.unbind("submit.form-plugin click.form-plugin")},e.fn.formToArray=function(t,r){var a=[];if(0===this.length)return a;var i,o=this[0],s=this.attr("id"),u=t?o.getElementsByTagName("*"):o.elements;if(u&&!/MSIE [678]/.test(navigator.userAgent)&&(u=e(u).get()),s&&(i=e(':input[form="'+s+'"]').get(),i.length&&(u=(u||[]).concat(i))),!u||!u.length)return a;var c,l,f,m,d,p,h;for(c=0,p=u.length;p>c;c++)if(d=u[c],f=d.name,f&&!d.disabled)if(t&&o.clk&&"image"==d.type)o.clk==d&&(a.push({name:f,value:e(d).val(),type:d.type}),a.push({name:f+".x",value:o.clk_x},{name:f+".y",value:o.clk_y}));else if(m=e.fieldValue(d,!0),m&&m.constructor==Array)for(r&&r.push(d),l=0,h=m.length;h>l;l++)a.push({name:f,value:m[l]});else if(n.fileapi&&"file"==d.type){r&&r.push(d);var v=d.files;if(v.length)for(l=0;l<v.length;l++)a.push({name:f,value:v[l],type:d.type});else a.push({name:f,value:"",type:d.type})}else null!==m&&"undefined"!=typeof m&&(r&&r.push(d),a.push({name:f,value:m,type:d.type,required:d.required}));if(!t&&o.clk){var g=e(o.clk),x=g[0];f=x.name,f&&!x.disabled&&"image"==x.type&&(a.push({name:f,value:g.val()}),a.push({name:f+".x",value:o.clk_x},{name:f+".y",value:o.clk_y}))}return a}
4044,e.fn.formSerialize=function(t){return e.param(this.formToArray(t))},e.fn.fieldSerialize=function(t){var r=[];return this.each(function(){var a=this.name;if(a){var n=e.fieldValue(this,t);if(n&&n.constructor==Array)for(var i=0,o=n.length;o>i;i++)r.push({name:a,value:n[i]});else null!==n&&"undefined"!=typeof n&&r.push({name:this.name,value:n})}}),e.param(r)},e.fn.fieldValue=function(t){for(var r=[],a=0,n=this.length;n>a;a++){var i=this[a],o=e.fieldValue(i,t);null===o||"undefined"==typeof o||o.constructor==Array&&!o.length||(o.constructor==Array?e.merge(r,o):r.push(o))}return r},e.fieldValue=function(t,r){var a=t.name,n=t.type,i=t.tagName.toLowerCase();if(void 0===r&&(r=!0),r&&(!a||t.disabled||"reset"==n||"button"==n||("checkbox"==n||"radio"==n)&&!t.checked||("submit"==n||"image"==n)&&t.form&&t.form.clk!=t||"select"==i&&-1==t.selectedIndex))return null;if("select"==i){var o=t.selectedIndex;if(0>o)return null;for(var s=[],u=t.options,c="select-one"==n,l=c?o+1:u.length,f=c?o:0;l>f;f++){var m=u[f];if(m.selected){var d=m.value;if(d||(d=m.attributes&&m.attributes.value&&!m.attributes.value.specified?m.text:m.value),c)return d;s.push(d)}}return s}return e(t).val()},e.fn.clearForm=function(t){return this.each(function(){e("input,select,textarea",this).not('input[name="postPrivacy"]').clearFields(t)})},e.fn.clearFields=e.fn.clearInputs=function(t){var r=/^(?:color|date|datetime|email|month|number|password|range|search|tel|text|time|url|week)$/i;return this.each(function(){var a=this.type,n=this.tagName.toLowerCase();r.test(a)||"textarea"==n?this.value="":"checkbox"==a||"radio"==a?this.checked=!1:"select"==n?this.selectedIndex=-1:"file"==a?/MSIE/.test(navigator.userAgent)?e(this).replaceWith(e(this).clone(!0)):e(this).val(""):t&&(t===!0&&/hidden/.test(a)||"string"==typeof t&&e(this).is(t))&&(this.value="")})},e.fn.resetForm=function(){return this.each(function(){("function"==typeof this.reset||"object"==typeof this.reset&&!this.reset.nodeType)&&this.reset()})},e.fn.enable=function(e){return void 0===e&&(e=!0),this.each(function(){this.disabled=!e})},e.fn.selected=function(t){return void 0===t&&(t=!0),this.each(function(){var r=this.type;if("checkbox"==r||"radio"==r)this.checked=t;else if("option"==this.tagName.toLowerCase()){var a=e(this).parent("select");t&&a[0]&&"select-one"==a[0].type&&a.find("option").selected(!1),this.selected=t}})},e.fn.ajaxSubmit.debug=!1}); 4045 4046/*! 4047 * Bootstrap v4.5.3 (https://getbootstrap.com/) 4048 * Copyright 2011-2020 The Bootstrap Authors (https://github.com/twbs/bootstrap/graphs/contributors) 4049 * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE) 4050 */ 4051!function(t,e){"object"==typeof exports&&"undefined"!=typeof module?e(exports,require("jquery")):"function"==typeof define&&define.amd?define(["exports","jquery"],e):e((t="undefined"!=typeof globalThis?globalThis:t||self).bootstrap={},t.jQuery)}(this,(function(t,e){"use strict";function n(t){return t&&"object"==typeof t&&"default"in t?t:{default:t}}var i=n(e);function o(t,e){for(var n=0;n<e.length;n++){var i=e[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,i.key,i)}}function r(t,e,n){return e&&o(t.prototype,e),n&&o(t,n),t}function a(){return(a=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(t[i]=n[i])}return t}).apply(this,arguments)}function s(t){var e=this,n=!1;return i.default(this).one(l.TRANSITION_END,(function(){n=!0})),setTimeout((function(){n||l.triggerTransitionEnd(e)}),t),this}var l={TRANSITION_END:"bsTransitionEnd",getUID:function(t){do{t+=~~(1e6*Math.random())}while(document.getElementById(t));return t},getSelectorFromElement:function(t){var e=t.getAttribute("data-target");if(!e||"#"===e){var n=t.getAttribute("href");e=n&&"#"!==n?n.trim():""}try{return document.querySelector(e)?e:null}catch(t){return null}},getTransitionDurationFromElement:function(t){if(!t)return 0;var e=i.default(t).css("transition-duration"),n=i.default(t).css("transition-delay"),o=parseFloat(e),r=parseFloat(n);return o||r?(e=e.split(",")[0],n=n.split(",")[0],1e3*(parseFloat(e)+parseFloat(n))):0},reflow:function(t){return t.offsetHeight},triggerTransitionEnd:function(t){i.default(t).trigger("transitionend")},supportsTransitionEnd:function(){return Boolean("transitionend")},isElement:function(t){return(t[0]||t).nodeType},typeCheckConfig:function(t,e,n){for(var i in n)if(Object.prototype.hasOwnProperty.call(n,i)){var o=n[i],r=e[i],a=r&&l.isElement(r)?"element":null===(s=r)||"undefined"==typeof s?""+s:{}.toString.call(s).match(/\s([a-z]+)/i)[1].toLowerCase();if(!new RegExp(o).test(a))throw new Error(t.toUpperCase()+': Option "'+i+'" provided type "'+a+'" but expected type "'+o+'".')}var s},findShadowRoot:function(t){if(!document.documentElement.attachShadow)return null;if("function"==typeof t.getRootNode){var e=t.getRootNode();return e instanceof ShadowRoot?e:null}return t instanceof ShadowRoot?t:t.parentNode?l.findShadowRoot(t.parentNode):null},jQueryDetection:function(){if("undefined"==typeof i.default)throw new TypeError("Bootstrap's JavaScript requires jQuery. jQuery must be included before Bootstrap's JavaScript.");var t=i.default.fn.jquery.split(" ")[0].split(".");if(t[0]<2&&t[1]<9||1===t[0]&&9===t[1]&&t[2]<1||t[0]>=4)throw new Error("Bootstrap's JavaScript requires at least jQuery v1.9.1 but less than v4.0.0")}};l.jQueryDetection(),i.default.fn.emulateTransitionEnd=s,i.default.event.special[l.TRANSITION_END]={bindType:"transitionend",delegateType:"transitionend",handle:function(t){if(i.default(t.target).is(this))return t.handleObj.handler.apply(this,arguments)}};var u="alert",f=i.default.fn[u],d=function(){function t(t){this._element=t}var e=t.prototype;return e.close=function(t){var e=this._element;t&&(e=this._getRootElement(t)),this._triggerCloseEvent(e).isDefaultPrevented()||this._removeElement(e)}
vendor: 11,030 bytes, line 4051
4051,e.dispose=function(){i.default.removeData(this._element,"bs.alert"),this._element=null},e._getRootElement=function(t){var e=l.getSelectorFromElement(t),n=!1;return e&&(n=document.querySelector(e)),n||(n=i.default(t).closest(".alert")[0]),n},e._triggerCloseEvent=function(t){var e=i.default.Event("close.bs.alert");return i.default(t).trigger(e),e},e._removeElement=function(t){var e=this;if(i.default(t).removeClass("show"),i.default(t).hasClass("fade")){var n=l.getTransitionDurationFromElement(t);i.default(t).one(l.TRANSITION_END,(function(n){return e._destroyElement(t,n)})).emulateTransitionEnd(n)}else this._destroyElement(t)},e._destroyElement=function(t){i.default(t).detach().trigger("closed.bs.alert").remove()},t._jQueryInterface=function(e){return this.each((function(){var n=i.default(this),o=n.data("bs.alert");o||(o=new t(this),n.data("bs.alert",o)),"close"===e&&o[e](this)}))},t._handleDismiss=function(t){return function(e){e&&e.preventDefault(),t.close(this)}},r(t,null,[{key:"VERSION",get:function(){return"4.5.3"}}]),t}();i.default(document).on("click.bs.alert.data-api",'[data-dismiss="alert"]',d._handleDismiss(new d)),i.default.fn[u]=d._jQueryInterface,i.default.fn[u].Constructor=d,i.default.fn[u].noConflict=function(){return i.default.fn[u]=f,d._jQueryInterface};var c=i.default.fn.button,h=function(){function t(t){this._element=t,this.shouldAvoidTriggerChange=!1}var e=t.prototype;return e.toggle=function(){var t=!0,e=!0,n=i.default(this._element).closest('[data-toggle="buttons"]')[0];if(n){var o=this._element.querySelector('input:not([type="hidden"])');if(o){if("radio"===o.type)if(o.checked&&this._element.classList.contains("active"))t=!1;else{var r=n.querySelector(".active");r&&i.default(r).removeClass("active")}t&&("checkbox"!==o.type&&"radio"!==o.type||(o.checked=!this._element.classList.contains("active")),this.shouldAvoidTriggerChange||i.default(o).trigger("change")),o.focus(),e=!1}}this._element.hasAttribute("disabled")||this._element.classList.contains("disabled")||(e&&this._element.setAttribute("aria-pressed",!this._element.classList.contains("active")),t&&i.default(this._element).toggleClass("active"))},e.dispose=function(){i.default.removeData(this._element,"bs.button"),this._element=null},t._jQueryInterface=function(e,n){return this.each((function(){var o=i.default(this),r=o.data("bs.button");r||(r=new t(this),o.data("bs.button",r)),r.shouldAvoidTriggerChange=n,"toggle"===e&&r[e]()}))},r(t,null,[{key:"VERSION",get:function(){return"4.5.3"}}]),t}();i.default(document).on("click.bs.button.data-api",'[data-toggle^="button"]',(function(t){var e=t.target,n=e;if(i.default(e).hasClass("btn")||(e=i.default(e).closest(".btn")[0]),!e||e.hasAttribute("disabled")||e.classList.contains("disabled"))t.preventDefault();else{var o=e.querySelector('input:not([type="hidden"])');if(o&&(o.hasAttribute("disabled")||o.classList.contains("disabled")))return void t.preventDefault();"INPUT"!==n.tagName&&"LABEL"===e.tagName||h._jQueryInterface.call(i.default(e),"toggle","INPUT"===n.tagName)}})).on("focus.bs.button.data-api blur.bs.button.data-api",'[data-toggle^="button"]',(function(t){var e=i.default(t.target).closest(".btn")[0];i.default(e).toggleClass("focus",/^focus(in)?$/.test(t.type))})),i.default(window).on("load.bs.button.data-api",(function(){for(var t=[].slice.call(document.querySelectorAll('[data-toggle="buttons"] .btn')),e=0,n=t.length;e<n;e++){var i=t[e],o=i.querySelector('input:not([type="hidden"])');o.checked||o.hasAttribute("checked")?i.classList.add("active"):i.classList.remove("active")}for(var r=0,a=(t=[].slice.call(document.querySelectorAll('[data-toggle="button"]'))).length;r<a;r++){var s=t[r];"true"===s.getAttribute("aria-pressed")?s.classList.add("active"):s.classList.remove("active")}})),i.default.fn.button=h._jQueryInterface,i.default.fn.button.Constructor=h,i.default.fn.button.noConflict=function(){return i.default.fn.button=c,h._jQueryInterface};var p="carousel",m=".bs.carousel",g=i.default.fn[p],v={interval:5e3,keyboard:!0,slide:!1,pause:"hover",wrap:!0,touch:!0},_={interval:"(number|boolean)",keyboard:"boolean",slide:"(boolean|string)",pause:"(string|boolean)",wrap:"boolean",touch:"boolean"},b={TOUCH:"touch",PEN:"pen"},y=function(){function t(t,e){this._items=null,this._interval=null,this._activeElement=null,this._isPaused=!1,this._isSliding=!1,this.touchTimeout=null,this.touchStartX=0,this.touchDeltaX=0,this._config=this._getConfig(e),this._element=t,this._indicatorsElement=this._element.querySelector(".carousel-indicators"),this._touchSupported="ontouchstart"in document.documentElement||navigator.maxTouchPoints>0,this._pointerEvent=Boolean(window.PointerEvent||window.MSPointerEvent),this._addEventListeners()}var e=t.prototype;return e.next=function(){this._isSliding||this._slide("next")},e.nextWhenVisible=function(){var t=i.default(this._element);!document.hidden&&t.is(":visible")&&"hidden"!==t.css("visibility")&&this.next()},e.prev=function(){this._isSliding||this._slide("prev")},e.pause=function(t){t||(this._isPaused=!0),this._element.querySelector(".carousel-item-next, .carousel-item-prev")&&(l.triggerTransitionEnd(this._element),this.cycle(!0)),clearInterval(this._interval),this._interval=null},e.cycle=function(t){t||(this._isPaused=!1),this._interval&&(clearInterval(this._interval),this._interval=null),this._config.interval&&!this._isPaused&&(this._interval=setInterval((document.visibilityState?this.nextWhenVisible:this.next).bind(this),this._config.interval))},e.to=function(t){var e=this;this._activeElement=this._element.querySelector(".active.carousel-item");var n=this._getItemIndex(this._activeElement);if(!(t>this._items.length-1||t<0))if(this._isSliding)i.default(this._element).one("slid.bs.carousel",(function(){return e.to(t)}));else{if(n===t)return this.pause(),void this.cycle();var o=t>n?"next":"prev";this._slide(o,this._items[t])}},e.dispose=function(){i.default(this._element).off(m),i.default.removeData(this._element,"bs.carousel"),this._items=null,this._config=null,this._element=null,this._interval=null,this._isPaused=null,this._isSliding=null,this._activeElement=null,this._indicatorsElement=null},e._getConfig=function(t){return t=a({},v,t),l.typeCheckConfig(p,t,_),t},e._handleSwipe=function(){var t=Math.abs(this.touchDeltaX);if(!(t<=40)){var e=t/this.touchDeltaX;this.touchDeltaX=0,e>0&&this.prev(),e<0&&this.next()}},e._addEventListeners=function(){var t=this;this._config.keyboard&&i.default(this._element).on("keydown.bs.carousel",(function(e){return t._keydown(e)})),"hover"===this._config.pause&&i.default(this._element).on("mouseenter.bs.carousel",(function(e){return t.pause(e)})).on("mouseleave.bs.carousel",(function(e){return t.cycle(e)})),this._config.touch&&this._addTouchEventListeners()},e._addTouchEventListeners=function(){var t=this;if(this._touchSupported){var e=function(e){t._pointerEvent&&b[e.originalEvent.pointerType.toUpperCase()]?t.touchStartX=e.originalEvent.clientX:t._pointerEvent||(t.touchStartX=e.originalEvent.touches[0].clientX)},n=function(e){t._pointerEvent&&b[e.originalEvent.pointerType.toUpperCase()]&&(t.touchDeltaX=e.originalEvent.clientX-t.touchStartX),t._handleSwipe(),"hover"===t._config.pause&&(t.pause(),t.touchTimeout&&clearTimeout(t.touchTimeout),t.touchTimeout=setTimeout((function(e){return t.cycle(e)}),500+t._config.interval))};i.default(this._element.querySelectorAll(".carousel-item img")).on("dragstart.bs.carousel",(function(t){return t.preventDefault()})),this._pointerEvent?(i.default(this._element).on("pointerdown.bs.carousel",(function(t){return e(t)})),i.default(this._element).on("pointerup.bs.carousel",(function(t){return n(t)})),this._element.classList.add("pointer-event")):(i.default(this._element).on("touchstart.bs.carousel",(function(t){return e(t)})),i.default(this._element).on("touchmove.bs.carousel",(function(e){return function(e){e.originalEvent.touches&&e.originalEvent.touches.length>1?t.touchDeltaX=0:t.touchDeltaX=e.originalEvent.touches[0].clientX-t.touchStartX}(e)})),i.default(this._element).on("touchend.bs.carousel",(function(t){return n(t)})))}},e._keydown=function(t){if(!/input|textarea/i.test(t.target.tagName))switch(t.which){case 37:t.preventDefault(),this.prev();break;case 39:t.preventDefault(),this.next()}},e._getItemIndex=function(t){return this._items=t&&t.parentNode?[].slice.call(t.parentNode.querySelectorAll(".carousel-item")):[],this._items.indexOf(t)},e._getItemByDirection=function(t,e){var n="next"===t,i="prev"===t,o=this._getItemIndex(e),r=this._items.length-1;if((i&&0===o||n&&o===r)&&!this._config.wrap)return e;var a=(o+("prev"===t?-1:1))%this._items.length;return-1===a?this._items[this._items.length-1]:this._items[a]},e._triggerSlideEvent=function(t,e){var n=this._getItemIndex(t),o=this._getItemIndex(this._element.querySelector(".active.carousel-item")),r=i.default.Event("slide.bs.carousel",{relatedTarget:t,direction:e,from:o,to:n});return i.default(this._element).trigger(r),r},e._setActiveIndicatorElement=function(t){if(this._indicatorsElement){var e=[].slice.call(this._indicatorsElement.querySelectorAll(".active"));i.default(e).removeClass("active");var n=this._indicatorsElement.children[this._getItemIndex(t)];n&&i.default(n).addClass("active")}},e._slide=function(t,e){var n,o,r,a=this,s=this._element.querySelector(".active.carousel-item"),u=this._getItemIndex(s),f=e||s&&this._getItemByDirection(t,s),d=this._getItemIndex(f),c=Boolean(this._interval);if("next"===t?(n="carousel-item-left",o="carousel-item-next",r="left"):(n="carousel-item-right",o="carousel-item-prev",r="right"),f&&i.default(f).hasClass("active"))this._isSliding=!1;else if(!this._triggerSlideEvent(f,r).isDefaultPrevented()&&s&&f){this._isSliding=!0,c&&this.pause(),this._setActiveIndicatorElement(f);var h=i.default.Event("slid.bs.carousel",{relatedTarget:f,direction:r,from:u,to:d});if(i.default(this._element).hasClass("slide")){i.default(f).addClass(o),l.reflow(f),i.default(s).addClass(n),i.default(f).addClass(n);var p=parseInt(f.getAttribute("data-interval"),10);p?(this._config.defaultInterval=this._config.defaultInterval||this._config.interval,this._config.interval=p):this._config.interval=this._config.defaultInterval||this._config.interval;var m=l.getTransitionDurationFromElement(s);i.default(s).one(l.TRANSITION_END,(function(){i.default(f).removeClass(n+" "+o).addClass("active"),i.default(s).removeClass("active "+o+" "+n),a._isSliding=!1,setTimeout((function(){return i.default(a._element).trigger(h)}),0)})).emulateTransitionEnd(m)}else i.default(s).removeClass("active"),i.default(f).addClass("active"),this._isSliding=!1,i.default(this._element).trigger(h);c&&this.cycle()}},t._jQueryInterface=function(e){return this.each((function(){var n=i.default(this).data("bs.carousel"),o=a({},v,i.default(this).data());"object"==typeof e&&(o=a({},o,e));var r="string"==typeof e?e:o.slide;if(n||(n=new t(this,o),i.default(this).data("bs.carousel",n)),"number"==typeof e)n.to(e);else if("string"==typeof r){if("undefined"==typeof n[r])throw new TypeError('No method n
4051amed "'+r+'"');n[r]()}else o.interval&&o.ride&&(n.pause(),n.cycle())}))},t._dataApiClickHandler=function(e){var n=l.getSelectorFromElement(this);if(n){var o=i.default(n)[0];if(o&&i.default(o).hasClass("carousel")){var r=a({},i.default(o).data(),i.default(this).data()),s=this.getAttribute("data-slide-to");s&&(r.interval=!1),t._jQueryInterface.call(i.default(o),r),s&&i.default(o).data("bs.carousel").to(s),e.preventDefault()}}},r(t,null,[{key:"VERSION",get:function(){return"4.5.3"}},{key:"Default",get:function(){return v}}]),t}();i.default(document).on("click.bs.carousel.data-api","[data-slide], [data-slide-to]",y._dataApiClickHandler),i.default(window).on("load.bs.carousel.data-api",(function(){for(var t=[].slice.call(document.querySelectorAll('[data-ride="carousel"]')),e=0,n=t.length;e<n;e++){var o=i.default(t[e]);y._jQueryInterface.call(o,o.data())}})),i.default.fn[p]=y._jQueryInterface,i.default.fn[p].Constructor=y,i.default.fn[p].noConflict=function(){return i.default.fn[p]=g,y._jQueryInterface};var w="collapse",E=i.default.fn[w],T={toggle:!0,parent:""},C={toggle:"boolean",parent:"(string|element)"},S=function(){function t(t,e){this._isTransitioning=!1,this._element=t,this._config=this._getConfig(e),this._triggerArray=[].slice.call(document.querySelectorAll('[data-toggle="collapse"][href="#'+t.id+'"],[data-toggle="collapse"][data-target="#'+t.id+'"]'));for(var n=[].slice.call(document.querySelectorAll('[data-toggle="collapse"]')),i=0,o=n.length;i<o;i++){var r=n[i],a=l.getSelectorFromElement(r),s=[].slice.call(document.querySelectorAll(a)).filter((function(e){return e===t}));null!==a&&s.length>0&&(this._selector=a,this._triggerArray.push(r))}this._parent=this._config.parent?this._getParent():null,this._config.parent||this._addAriaAndCollapsedClass(this._element,this._triggerArray),this._config.toggle&&this.toggle()}var e=t.prototype;return e.toggle=function(){i.default(this._element).hasClass("show")?this.hide():this.show()},e.show=function(){var e,n,o=this;if(!this._isTransitioning&&!i.default(this._element).hasClass("show")&&(this._parent&&0===(e=[].slice.call(this._parent.querySelectorAll(".show, .collapsing")).filter((function(t){return"string"==typeof o._config.parent?t.getAttribute("data-parent")===o._config.parent:t.classList.contains("collapse")}))).length&&(e=null),!(e&&(n=i.default(e).not(this._selector).data("bs.collapse"))&&n._isTransitioning))){var r=i.default.Event("show.bs.collapse");if(i.default(this._element).trigger(r),!r.isDefaultPrevented()){e&&(t._jQueryInterface.call(i.default(e).not(this._selector),"hide"),n||i.default(e).data("bs.collapse",null));var a=this._getDimension();i.default(this._element).removeClass("collapse").addClass("collapsing"),this._element.style[a]=0,this._triggerArray.length&&i.default(this._triggerArray).removeClass("collapsed").attr("aria-expanded",!0),this.setTransitioning(!0);var s="scroll"+(a[0].toUpperCase()+a.slice(1)),u=l.getTransitionDurationFromElement(this._element);i.default(this._element).one(l.TRANSITION_END,(function(){i.default(o._element).removeClass("collapsing").addClass("collapse show"),o._element.style[a]="",o.setTransitioning(!1),i.default(o._element).trigger("shown.bs.collapse")})).emulateTransitionEnd(u),this._element.style[a]=this._element[s]+"px"}}},e.hide=function(){var t=this;if(!this._isTransitioning&&i.default(this._element).hasClass("show")){var e=i.default.Event("hide.bs.collapse");if(i.default(this._element).trigger(e),!e.isDefaultPrevented()){var n=this._getDimension();this._element.style[n]=this._element.getBoundingClientRect()[n]+"px",l.reflow(this._element),i.default(this._element).addClass("collapsing").removeClass("collapse show");var o=this._triggerArray.length;if(o>0)for(var r=0;r<o;r++){var a=this._triggerArray[r],s=l.getSelectorFromElement(a);if(null!==s)i.default([].slice.call(document.querySelectorAll(s))).hasClass("show")||i.default(a).addClass("collapsed").attr("aria-expanded",!1)}this.setTransitioning(!0);this._element.style[n]="";var u=l.getTransitionDurationFromElement(this._element);i.default(this._element).one(l.TRANSITION_END,(function(){t.setTransitioning(!1),i.default(t._element).removeClass("collapsing").addClass("collapse").trigger("hidden.bs.collapse")})).emulateTransitionEnd(u)}}},e.setTransitioning=function(t){this._isTransitioning=t}
vendor: 12,179 bytes, line 4051
4051,e.dispose=function(){i.default.removeData(this._element,"bs.collapse"),this._config=null,this._parent=null,this._element=null,this._triggerArray=null,this._isTransitioning=null},e._getConfig=function(t){return(t=a({},T,t)).toggle=Boolean(t.toggle),l.typeCheckConfig(w,t,C),t},e._getDimension=function(){return i.default(this._element).hasClass("width")?"width":"height"},e._getParent=function(){var e,n=this;l.isElement(this._config.parent)?(e=this._config.parent,"undefined"!=typeof this._config.parent.jquery&&(e=this._config.parent[0])):e=document.querySelector(this._config.parent);var o='[data-toggle="collapse"][data-parent="'+this._config.parent+'"]',r=[].slice.call(e.querySelectorAll(o));return i.default(r).each((function(e,i){n._addAriaAndCollapsedClass(t._getTargetFromElement(i),[i])})),e},e._addAriaAndCollapsedClass=function(t,e){var n=i.default(t).hasClass("show");e.length&&i.default(e).toggleClass("collapsed",!n).attr("aria-expanded",n)},t._getTargetFromElement=function(t){var e=l.getSelectorFromElement(t);return e?document.querySelector(e):null},t._jQueryInterface=function(e){return this.each((function(){var n=i.default(this),o=n.data("bs.collapse"),r=a({},T,n.data(),"object"==typeof e&&e?e:{});if(!o&&r.toggle&&"string"==typeof e&&/show|hide/.test(e)&&(r.toggle=!1),o||(o=new t(this,r),n.data("bs.collapse",o)),"string"==typeof e){if("undefined"==typeof o[e])throw new TypeError('No method named "'+e+'"');o[e]()}}))},r(t,null,[{key:"VERSION",get:function(){return"4.5.3"}},{key:"Default",get:function(){return T}}]),t}();i.default(document).on("click.bs.collapse.data-api",'[data-toggle="collapse"]',(function(t){"A"===t.currentTarget.tagName&&t.preventDefault();var e=i.default(this),n=l.getSelectorFromElement(this),o=[].slice.call(document.querySelectorAll(n));i.default(o).each((function(){var t=i.default(this),n=t.data("bs.collapse")?"toggle":e.data();S._jQueryInterface.call(t,n)}))})),i.default.fn[w]=S._jQueryInterface,i.default.fn[w].Constructor=S,i.default.fn[w].noConflict=function(){return i.default.fn[w]=E,S._jQueryInterface};var D="undefined"!=typeof window&&"undefined"!=typeof document&&"undefined"!=typeof navigator,N=function(){for(var t=["Edge","Trident","Firefox"],e=0;e<t.length;e+=1)if(D&&navigator.userAgent.indexOf(t[e])>=0)return 1;return 0}();var k=D&&window.Promise?function(t){var e=!1;return function(){e||(e=!0,window.Promise.resolve().then((function(){e=!1,t()})))}}:function(t){var e=!1;return function(){e||(e=!0,setTimeout((function(){e=!1,t()}),N))}};function A(t){return t&&"[object Function]"==={}.toString.call(t)}function I(t,e){if(1!==t.nodeType)return[];var n=t.ownerDocument.defaultView.getComputedStyle(t,null);return e?n[e]:n}function O(t){return"HTML"===t.nodeName?t:t.parentNode||t.host}function x(t){if(!t)return document.body;switch(t.nodeName){case"HTML":case"BODY":return t.ownerDocument.body;case"#document":return t.body}var e=I(t),n=e.overflow,i=e.overflowX,o=e.overflowY;return/(auto|scroll|overlay)/.test(n+o+i)?t:x(O(t))}function j(t){return t&&t.referenceNode?t.referenceNode:t}var L=D&&!(!window.MSInputMethodContext||!document.documentMode),P=D&&/MSIE 10/.test(navigator.userAgent);function F(t){return 11===t?L:10===t?P:L||P}function R(t){if(!t)return document.documentElement;for(var e=F(10)?document.body:null,n=t.offsetParent||null;n===e&&t.nextElementSibling;)n=(t=t.nextElementSibling).offsetParent;var i=n&&n.nodeName;return i&&"BODY"!==i&&"HTML"!==i?-1!==["TH","TD","TABLE"].indexOf(n.nodeName)&&"static"===I(n,"position")?R(n):n:t?t.ownerDocument.documentElement:document.documentElement}function H(t){return null!==t.parentNode?H(t.parentNode):t}function M(t,e){if(!(t&&t.nodeType&&e&&e.nodeType))return document.documentElement;var n=t.compareDocumentPosition(e)&Node.DOCUMENT_POSITION_FOLLOWING,i=n?t:e,o=n?e:t,r=document.createRange();r.setStart(i,0),r.setEnd(o,0);var a,s,l=r.commonAncestorContainer;if(t!==l&&e!==l||i.contains(o))return"BODY"===(s=(a=l).nodeName)||"HTML"!==s&&R(a.firstElementChild)!==a?R(l):l;var u=H(t);return u.host?M(u.host,e):M(t,H(e).host)}function B(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"top",n="top"===e?"scrollTop":"scrollLeft",i=t.nodeName;if("BODY"===i||"HTML"===i){var o=t.ownerDocument.documentElement,r=t.ownerDocument.scrollingElement||o;return r[n]}return t[n]}function q(t,e){var n=arguments.length>2&&void 0!==arguments[2]&&arguments[2],i=B(e,"top"),o=B(e,"left"),r=n?-1:1;return t.top+=i*r,t.bottom+=i*r,t.left+=o*r,t.right+=o*r,t}function Q(t,e){var n="x"===e?"Left":"Top",i="Left"===n?"Right":"Bottom";return parseFloat(t["border"+n+"Width"])+parseFloat(t["border"+i+"Width"])}function W(t,e,n,i){return Math.max(e["offset"+t],e["scroll"+t],n["client"+t],n["offset"+t],n["scroll"+t],F(10)?parseInt(n["offset"+t])+parseInt(i["margin"+("Height"===t?"Top":"Left")])+parseInt(i["margin"+("Height"===t?"Bottom":"Right")]):0)}function U(t){var e=t.body,n=t.documentElement,i=F(10)&&getComputedStyle(n);return{height:W("Height",e,n,i),width:W("Width",e,n,i)}}var V=function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")},Y=function(){function t(t,e){for(var n=0;n<e.length;n++){var i=e[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,i.key,i)}}return function(e,n,i){return n&&t(e.prototype,n),i&&t(e,i),e}}(),z=function(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t},X=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(t[i]=n[i])}return t};function K(t){return X({},t,{right:t.left+t.width,bottom:t.top+t.height})}function G(t){var e={};try{if(F(10)){e=t.getBoundingClientRect();var n=B(t,"top"),i=B(t,"left");e.top+=n,e.left+=i,e.bottom+=n,e.right+=i}else e=t.getBoundingClientRect()}catch(t){}var o={left:e.left,top:e.top,width:e.right-e.left,height:e.bottom-e.top},r="HTML"===t.nodeName?U(t.ownerDocument):{},a=r.width||t.clientWidth||o.width,s=r.height||t.clientHeight||o.height,l=t.offsetWidth-a,u=t.offsetHeight-s;if(l||u){var f=I(t);l-=Q(f,"x"),u-=Q(f,"y"),o.width-=l,o.height-=u}return K(o)}function $(t,e){var n=arguments.length>2&&void 0!==arguments[2]&&arguments[2],i=F(10),o="HTML"===e.nodeName,r=G(t),a=G(e),s=x(t),l=I(e),u=parseFloat(l.borderTopWidth),f=parseFloat(l.borderLeftWidth);n&&o&&(a.top=Math.max(a.top,0),a.left=Math.max(a.left,0));var d=K({top:r.top-a.top-u,left:r.left-a.left-f,width:r.width,height:r.height});if(d.marginTop=0,d.marginLeft=0,!i&&o){var c=parseFloat(l.marginTop),h=parseFloat(l.marginLeft);d.top-=u-c,d.bottom-=u-c,d.left-=f-h,d.right-=f-h,d.marginTop=c,d.marginLeft=h}return(i&&!n?e.contains(s):e===s&&"BODY"!==s.nodeName)&&(d=q(d,e)),d}function J(t){var e=arguments.length>1&&void 0!==arguments[1]&&arguments[1],n=t.ownerDocument.documentElement,i=$(t,n),o=Math.max(n.clientWidth,window.innerWidth||0),r=Math.max(n.clientHeight,window.innerHeight||0),a=e?0:B(n),s=e?0:B(n,"left"),l={top:a-i.top+i.marginTop,left:s-i.left+i.marginLeft,width:o,height:r};return K(l)}function Z(t){var e=t.nodeName;if("BODY"===e||"HTML"===e)return!1;if("fixed"===I(t,"position"))return!0;var n=O(t);return!!n&&Z(n)}function tt(t){if(!t||!t.parentElement||F())return document.documentElement;for(var e=t.parentElement;e&&"none"===I(e,"transform");)e=e.parentElement;return e||document.documentElement}function et(t,e,n,i){var o=arguments.length>4&&void 0!==arguments[4]&&arguments[4],r={top:0,left:0},a=o?tt(t):M(t,j(e));if("viewport"===i)r=J(a,o);else{var s=void 0;"scrollParent"===i?"BODY"===(s=x(O(e))).nodeName&&(s=t.ownerDocument.documentElement):s="window"===i?t.ownerDocument.documentElement:i;var l=$(s,a,o);if("HTML"!==s.nodeName||Z(a))r=l;else{var u=U(t.ownerDocument),f=u.height,d=u.width;r.top+=l.top-l.marginTop,r.bottom=f+l.top,r.left+=l.left-l.marginLeft,r.right=d+l.left}}var c="number"==typeof(n=n||0);return r.left+=c?n:n.left||0,r.top+=c?n:n.top||0,r.right-=c?n:n.right||0,r.bottom-=c?n:n.bottom||0,r}function nt(t){return t.width*t.height}function it(t,e,n,i,o){var r=arguments.length>5&&void 0!==arguments[5]?arguments[5]:0;if(-1===t.indexOf("auto"))return t;var a=et(n,i,r,o),s={top:{width:a.width,height:e.top-a.top},right:{width:a.right-e.right,height:a.height},bottom:{width:a.width,height:a.bottom-e.bottom},left:{width:e.left-a.left,height:a.height}},l=Object.keys(s).map((function(t){return X({key:t},s[t],{area:nt(s[t])})})).sort((function(t,e){return e.area-t.area})),u=l.filter((function(t){var e=t.width,i=t.height;return e>=n.clientWidth&&i>=n.clientHeight})),f=u.length>0?u[0].key:l[0].key,d=t.split("-")[1];return f+(d?"-"+d:"")}function ot(t,e,n){var i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:null,o=i?tt(e):M(e,j(n));return $(n,o,i)}function rt(t){var e=t.ownerDocument.defaultView.getComputedStyle(t),n=parseFloat(e.marginTop||0)+parseFloat(e.marginBottom||0),i=parseFloat(e.marginLeft||0)+parseFloat(e.marginRight||0);return{width:t.offsetWidth+i,height:t.offsetHeight+n}}function at(t){var e={left:"right",right:"left",bottom:"top",top:"bottom"};return t.replace(/left|right|bottom|top/g,(function(t){return e[t]}))}function st(t,e,n){n=n.split("-")[0];var i=rt(t),o={width:i.width,height:i.height},r=-1!==["right","left"].indexOf(n),a=r?"top":"left",s=r?"left":"top",l=r?"height":"width",u=r?"width":"height";return o[a]=e[a]+e[l]/2-i[l]/2,o[s]=n===s?e[s]-i[u]:e[at(s)],o}function lt(t,e){return Array.prototype.find?t.find(e):t.filter(e)[0]}function ut(t,e,n){return(void 0===n?t:t.slice(0,function(t,e,n){if(Array.prototype.findIndex)return t.findIndex((function(t){return t[e]===n}));var i=lt(t,(function(t){return t[e]===n}));return t.indexOf(i)}(t,"name",n))).forEach((function(t){t.function&&console.warn("`modifier.function` is deprecated, use `modifier.fn`!");var n=t.function||t.fn;t.enabled&&A(n)&&(e.offsets.popper=K(e.offsets.popper),e.offsets.reference=K(e.offsets.reference),e=n(e,t))})),e}function ft(){if(!this.state.isDestroyed){var t={instance:this,styles:{},arrowStyles:{},attributes:{},flipped:!1,offsets:{}};t.offsets.reference=ot(this.state,this.popper,this.reference,this.options.positionFixed),t.placement=it(this.options.placement,t.offsets.reference,this.popper,this.reference,this.options.modifiers.flip.boundariesElement,this.options.modifiers.flip.padding),t.originalPlacement=t.placement,t.positionFixed=this.options.positionFixed,t.offsets.popper=st(this.popper,t.offsets.reference,t.placement),t.offsets.popper.position=this.options.positionFixed?"fixed":"absolute",t=ut(this.modifiers,t),this.state.isCreated?this.options.onUpdate(t):(this.state.isCreated=!0,this.options.onCreate(t))}}function dt(t,e){return t.some((function(t){var n=t.name;return t.enabled&&n===e}))}function ct(t){for(var e=[!1,"ms","Webkit","Moz","O"],n=t.charAt(0).toUpperCase()+t.slice(1),i=0;i<e.length;i++){var o=e[i],r=o?""+o+n:t;if("undefined"!=typeof document.body.style[r])return r}return null}function ht(){return this.state.isDestroyed=!0,dt(this.modifiers,"applyStyle")&&(this.popper.removeAttribute("x-placement"),this.popper.style.position="",this.popper.style.top="",this.popper.style.left="",this.popper.style.right="",this.popper.style.bottom="",this.popper.style.willChange="",this.popper.style[ct("transform")]=""),this.disableEventListeners(),this.options.removeOnDestroy&&this.popper.parentNode.removeChild(this.popper),this}function pt(t){var e=t.ownerDocument;return e?e.defaultView:window}function mt(t,e,n,i){n.updateBound=i,pt(t).addEventListener("resize",n.updateBound,{passive:!0});var o=x(t);return function t(e,n,i,o){var r="BODY"===e.nodeName,a=r?e.ownerDocument.defaultView:e;a.addEventListener(n,i,{passive:!0}),r||t(x(a.parentNode),n,i,o),o.push(a)}(o,"scroll",n.updateBound,n.scrollParents),n.scrollElement=o,n.eventsEnabled=!0,n}function gt(){this.state.eventsEnabled||(this.state=mt(this.reference,this.options,this.state,this.scheduleUpdate))}function vt(){var t,e;this.state.eventsEnabled&&(cancelAnimationFrame(this.scheduleUpdate),this.state=(t=this.reference,e=this.state,pt(t).removeEventListener("resize",e.updateBound),e.scrollParents.forEac
vendor: 2,175 bytes, line 4051
4051h((function(t){t.removeEventListener("scroll",e.updateBound)})),e.updateBound=null,e.scrollParents=[],e.scrollElement=null,e.eventsEnabled=!1,e))}function _t(t){return""!==t&&!isNaN(parseFloat(t))&&isFinite(t)}function bt(t,e){Object.keys(e).forEach((function(n){var i="";-1!==["width","height","top","right","bottom","left"].indexOf(n)&&_t(e[n])&&(i="px"),t.style[n]=e[n]+i}))}var yt=D&&/Firefox/i.test(navigator.userAgent);function wt(t,e,n){var i=lt(t,(function(t){return t.name===e})),o=!!i&&t.some((function(t){return t.name===n&&t.enabled&&t.order<i.order}));if(!o){var r="`"+e+"`",a="`"+n+"`";console.warn(a+" modifier is required by "+r+" modifier in order to work, be sure to include it before "+r+"!")}return o}var Et=["auto-start","auto","auto-end","top-start","top","top-end","right-start","right","right-end","bottom-end","bottom","bottom-start","left-end","left","left-start"],Tt=Et.slice(3);function Ct(t){var e=arguments.length>1&&void 0!==arguments[1]&&arguments[1],n=Tt.indexOf(t),i=Tt.slice(n+1).concat(Tt.slice(0,n));return e?i.reverse():i}var St="flip",Dt="clockwise",Nt="counterclockwise";function kt(t,e,n,i){var o=[0,0],r=-1!==["right","left"].indexOf(i),a=t.split(/(\+|\-)/).map((function(t){return t.trim()})),s=a.indexOf(lt(a,(function(t){return-1!==t.search(/,|\s/)})));a[s]&&-1===a[s].indexOf(",")&&console.warn("Offsets separated by white space(s) are deprecated, use a comma (,) instead.");var l=/\s*,\s*|\s+/,u=-1!==s?[a.slice(0,s).concat([a[s].split(l)[0]]),[a[s].split(l)[1]].concat(a.slice(s+1))]:[a];return(u=u.map((function(t,i){var o=(1===i?!r:r)?"height":"width",a=!1;return t.reduce((function(t,e){return""===t[t.length-1]&&-1!==["+","-"].indexOf(e)?(t[t.length-1]=e,a=!0,t):a?(t[t.length-1]+=e,a=!1,t):t.concat(e)}),[]).map((function(t){return function(t,e,n,i){var o=t.match(/((?:\-|\+)?\d*\.?\d*)(.*)/),r=+o[1],a=o[2];if(!r)return t;if(0===a.indexOf("%")){var s=void 0;switch(a){case"%p":s=n;break;case"%":case"%r":default:s=i}return K(s)[e]/100*r}if("vh"===a||"vw"===a){return("vh"===a?Math.max(document.documentElement.clientHeight,window.innerHeight||0):Math.max(document.documentElement.clientWidth,window.innerWidth||0))/100*r}
vendor: 9,756 bytes, line 4051
4051return r}(t,o,e,n)}))}))).forEach((function(t,e){t.forEach((function(n,i){_t(n)&&(o[e]+=n*("-"===t[i-1]?-1:1))}))})),o}var At={placement:"bottom",positionFixed:!1,eventsEnabled:!0,removeOnDestroy:!1,onCreate:function(){},onUpdate:function(){},modifiers:{shift:{order:100,enabled:!0,fn:function(t){var e=t.placement,n=e.split("-")[0],i=e.split("-")[1];if(i){var o=t.offsets,r=o.reference,a=o.popper,s=-1!==["bottom","top"].indexOf(n),l=s?"left":"top",u=s?"width":"height",f={start:z({},l,r[l]),end:z({},l,r[l]+r[u]-a[u])};t.offsets.popper=X({},a,f[i])}return t}},offset:{order:200,enabled:!0,fn:function(t,e){var n=e.offset,i=t.placement,o=t.offsets,r=o.popper,a=o.reference,s=i.split("-")[0],l=void 0;return l=_t(+n)?[+n,0]:kt(n,r,a,s),"left"===s?(r.top+=l[0],r.left-=l[1]):"right"===s?(r.top+=l[0],r.left+=l[1]):"top"===s?(r.left+=l[0],r.top-=l[1]):"bottom"===s&&(r.left+=l[0],r.top+=l[1]),t.popper=r,t},offset:0},preventOverflow:{order:300,enabled:!0,fn:function(t,e){var n=e.boundariesElement||R(t.instance.popper);t.instance.reference===n&&(n=R(n));var i=ct("transform"),o=t.instance.popper.style,r=o.top,a=o.left,s=o[i];o.top="",o.left="",o[i]="";var l=et(t.instance.popper,t.instance.reference,e.padding,n,t.positionFixed);o.top=r,o.left=a,o[i]=s,e.boundaries=l;var u=e.priority,f=t.offsets.popper,d={primary:function(t){var n=f[t];return f[t]<l[t]&&!e.escapeWithReference&&(n=Math.max(f[t],l[t])),z({},t,n)},secondary:function(t){var n="right"===t?"left":"top",i=f[n];return f[t]>l[t]&&!e.escapeWithReference&&(i=Math.min(f[n],l[t]-("right"===t?f.width:f.height))),z({},n,i)}};return u.forEach((function(t){var e=-1!==["left","top"].indexOf(t)?"primary":"secondary";f=X({},f,d[e](t))})),t.offsets.popper=f,t},priority:["left","right","top","bottom"],padding:5,boundariesElement:"scrollParent"},keepTogether:{order:400,enabled:!0,fn:function(t){var e=t.offsets,n=e.popper,i=e.reference,o=t.placement.split("-")[0],r=Math.floor,a=-1!==["top","bottom"].indexOf(o),s=a?"right":"bottom",l=a?"left":"top",u=a?"width":"height";return n[s]<r(i[l])&&(t.offsets.popper[l]=r(i[l])-n[u]),n[l]>r(i[s])&&(t.offsets.popper[l]=r(i[s])),t}},arrow:{order:500,enabled:!0,fn:function(t,e){var n;if(!wt(t.instance.modifiers,"arrow","keepTogether"))return t;var i=e.element;if("string"==typeof i){if(!(i=t.instance.popper.querySelector(i)))return t}else if(!t.instance.popper.contains(i))return console.warn("WARNING: `arrow.element` must be child of its popper element!"),t;var o=t.placement.split("-")[0],r=t.offsets,a=r.popper,s=r.reference,l=-1!==["left","right"].indexOf(o),u=l?"height":"width",f=l?"Top":"Left",d=f.toLowerCase(),c=l?"left":"top",h=l?"bottom":"right",p=rt(i)[u];s[h]-p<a[d]&&(t.offsets.popper[d]-=a[d]-(s[h]-p)),s[d]+p>a[h]&&(t.offsets.popper[d]+=s[d]+p-a[h]),t.offsets.popper=K(t.offsets.popper);var m=s[d]+s[u]/2-p/2,g=I(t.instance.popper),v=parseFloat(g["margin"+f]),_=parseFloat(g["border"+f+"Width"]),b=m-t.offsets.popper[d]-v-_;return b=Math.max(Math.min(a[u]-p,b),0),t.arrowElement=i,t.offsets.arrow=(z(n={},d,Math.round(b)),z(n,c,""),n),t},element:"[x-arrow]"},flip:{order:600,enabled:!0,fn:function(t,e){if(dt(t.instance.modifiers,"inner"))return t;if(t.flipped&&t.placement===t.originalPlacement)return t;var n=et(t.instance.popper,t.instance.reference,e.padding,e.boundariesElement,t.positionFixed),i=t.placement.split("-")[0],o=at(i),r=t.placement.split("-")[1]||"",a=[];switch(e.behavior){case St:a=[i,o];break;case Dt:a=Ct(i);break;case Nt:a=Ct(i,!0);break;default:a=e.behavior}return a.forEach((function(s,l){if(i!==s||a.length===l+1)return t;i=t.placement.split("-")[0],o=at(i);var u=t.offsets.popper,f=t.offsets.reference,d=Math.floor,c="left"===i&&d(u.right)>d(f.left)||"right"===i&&d(u.left)<d(f.right)||"top"===i&&d(u.bottom)>d(f.top)||"bottom"===i&&d(u.top)<d(f.bottom),h=d(u.left)<d(n.left),p=d(u.right)>d(n.right),m=d(u.top)<d(n.top),g=d(u.bottom)>d(n.bottom),v="left"===i&&h||"right"===i&&p||"top"===i&&m||"bottom"===i&&g,_=-1!==["top","bottom"].indexOf(i),b=!!e.flipVariations&&(_&&"start"===r&&h||_&&"end"===r&&p||!_&&"start"===r&&m||!_&&"end"===r&&g),y=!!e.flipVariationsByContent&&(_&&"start"===r&&p||_&&"end"===r&&h||!_&&"start"===r&&g||!_&&"end"===r&&m),w=b||y;(c||v||w)&&(t.flipped=!0,(c||v)&&(i=a[l+1]),w&&(r=function(t){return"end"===t?"start":"start"===t?"end":t}(r)),t.placement=i+(r?"-"+r:""),t.offsets.popper=X({},t.offsets.popper,st(t.instance.popper,t.offsets.reference,t.placement)),t=ut(t.instance.modifiers,t,"flip"))})),t},behavior:"flip",padding:5,boundariesElement:"viewport",flipVariations:!1,flipVariationsByContent:!1},inner:{order:700,enabled:!1,fn:function(t){var e=t.placement,n=e.split("-")[0],i=t.offsets,o=i.popper,r=i.reference,a=-1!==["left","right"].indexOf(n),s=-1===["top","left"].indexOf(n);return o[a?"left":"top"]=r[n]-(s?o[a?"width":"height"]:0),t.placement=at(e),t.offsets.popper=K(o),t}},hide:{order:800,enabled:!0,fn:function(t){if(!wt(t.instance.modifiers,"hide","preventOverflow"))return t;var e=t.offsets.reference,n=lt(t.instance.modifiers,(function(t){return"preventOverflow"===t.name})).boundaries;if(e.bottom<n.top||e.left>n.right||e.top>n.bottom||e.right<n.left){if(!0===t.hide)return t;t.hide=!0,t.attributes["x-out-of-boundaries"]=""}else{if(!1===t.hide)return t;t.hide=!1,t.attributes["x-out-of-boundaries"]=!1}return t}},computeStyle:{order:850,enabled:!0,fn:function(t,e){var n=e.x,i=e.y,o=t.offsets.popper,r=lt(t.instance.modifiers,(function(t){return"applyStyle"===t.name})).gpuAcceleration;void 0!==r&&console.warn("WARNING: `gpuAcceleration` option moved to `computeStyle` modifier and will not be supported in future versions of Popper.js!");var a=void 0!==r?r:e.gpuAcceleration,s=R(t.instance.popper),l=G(s),u={position:o.position},f=function(t,e){var n=t.offsets,i=n.popper,o=n.reference,r=Math.round,a=Math.floor,s=function(t){return t},l=r(o.width),u=r(i.width),f=-1!==["left","right"].indexOf(t.placement),d=-1!==t.placement.indexOf("-"),c=e?f||d||l%2==u%2?r:a:s,h=e?r:s;return{left:c(l%2==1&&u%2==1&&!d&&e?i.left-1:i.left),top:h(i.top),bottom:h(i.bottom),right:c(i.right)}}(t,window.devicePixelRatio<2||!yt),d="bottom"===n?"top":"bottom",c="right"===i?"left":"right",h=ct("transform"),p=void 0,m=void 0;if(m="bottom"===d?"HTML"===s.nodeName?-s.clientHeight+f.bottom:-l.height+f.bottom:f.top,p="right"===c?"HTML"===s.nodeName?-s.clientWidth+f.right:-l.width+f.right:f.left,a&&h)u[h]="translate3d("+p+"px, "+m+"px, 0)",u[d]=0,u[c]=0,u.willChange="transform";else{var g="bottom"===d?-1:1,v="right"===c?-1:1;u[d]=m*g,u[c]=p*v,u.willChange=d+", "+c}var _={"x-placement":t.placement};return t.attributes=X({},_,t.attributes),t.styles=X({},u,t.styles),t.arrowStyles=X({},t.offsets.arrow,t.arrowStyles),t},gpuAcceleration:!0,x:"bottom",y:"right"},applyStyle:{order:900,enabled:!0,fn:function(t){var e,n;return bt(t.instance.popper,t.styles),e=t.instance.popper,n=t.attributes,Object.keys(n).forEach((function(t){!1!==n[t]?e.setAttribute(t,n[t]):e.removeAttribute(t)})),t.arrowElement&&Object.keys(t.arrowStyles).length&&bt(t.arrowElement,t.arrowStyles),t},onLoad:function(t,e,n,i,o){var r=ot(o,e,t,n.positionFixed),a=it(n.placement,r,e,t,n.modifiers.flip.boundariesElement,n.modifiers.flip.padding);return e.setAttribute("x-placement",a),bt(e,{position:n.positionFixed?"fixed":"absolute"}),n},gpuAcceleration:void 0}}},It=function(){function t(e,n){var i=this,o=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};V(this,t),this.scheduleUpdate=function(){return requestAnimationFrame(i.update)},this.update=k(this.update.bind(this)),this.options=X({},t.Defaults,o),this.state={isDestroyed:!1,isCreated:!1,scrollParents:[]},this.reference=e&&e.jquery?e[0]:e,this.popper=n&&n.jquery?n[0]:n,this.options.modifiers={},Object.keys(X({},t.Defaults.modifiers,o.modifiers)).forEach((function(e){i.options.modifiers[e]=X({},t.Defaults.modifiers[e]||{},o.modifiers?o.modifiers[e]:{})})),this.modifiers=Object.keys(this.options.modifiers).map((function(t){return X({name:t},i.options.modifiers[t])})).sort((function(t,e){return t.order-e.order})),this.modifiers.forEach((function(t){t.enabled&&A(t.onLoad)&&t.onLoad(i.reference,i.popper,i.options,t,i.state)})),this.update();var r=this.options.eventsEnabled;r&&this.enableEventListeners(),this.state.eventsEnabled=r}return Y(t,[{key:"update",value:function(){return ft.call(this)}},{key:"destroy",value:function(){return ht.call(this)}},{key:"enableEventListeners",value:function(){return gt.call(this)}},{key:"disableEventListeners",value:function(){return vt.call(this)}}]),t}();It.Utils=("undefined"!=typeof window?window:global).PopperUtils,It.placements=Et,It.Defaults=At;var Ot="dropdown",xt=i.default.fn[Ot],jt=new RegExp("38|40|27"),Lt={offset:0,flip:!0,boundary:"scrollParent",reference:"toggle",display:"dynamic",popperConfig:null},Pt={offset:"(number|string|function)",flip:"boolean",boundary:"(string|element)",reference:"(string|element)",display:"string",popperConfig:"(null|object)"},Ft=function(){function t(t,e){this._element=t,this._popper=null,this._config=this._getConfig(e),this._menu=this._getMenuElement(),this._inNavbar=this._detectNavbar(),this._addEventListeners()}var e=t.prototype;return e.toggle=function(){if(!this._element.disabled&&!i.default(this._element).hasClass("disabled")){var e=i.default(this._menu).hasClass("show");t._clearMenus(),e||this.show(!0)}},e.show=function(e){if(void 0===e&&(e=!1),!(this._element.disabled||i.default(this._element).hasClass("disabled")||i.default(this._menu).hasClass("show"))){var n={relatedTarget:this._element},o=i.default.Event("show.bs.dropdown",n),r=t._getParentFromElement(this._element);if(i.default(r).trigger(o),!o.isDefaultPrevented()){if(!this._inNavbar&&e){if("undefined"==typeof It)throw new TypeError("Bootstrap's dropdowns require Popper
4051.js (https://popper.js.org/)");var a=this._element;"parent"===this._config.reference?a=r:l.isElement(this._config.reference)&&(a=this._config.reference,"undefined"!=typeof this._config.reference.jquery&&(a=this._config.reference[0])),"scrollParent"!==this._config.boundary&&i.default(r).addClass("position-static"),this._popper=new It(a,this._menu,this._getPopperConfig())}"ontouchstart"in document.documentElement&&0===i.default(r).closest(".navbar-nav").length&&i.default(document.body).children().on("mouseover",null,i.default.noop),this._element.focus(),this._element.setAttribute("aria-expanded",!0),i.default(this._menu).toggleClass("show"),i.default(r).toggleClass("show").trigger(i.default.Event("shown.bs.dropdown",n))}}},e.hide=function(){if(!this._element.disabled&&!i.default(this._element).hasClass("disabled")&&i.default(this._menu).hasClass("show")){var e={relatedTarget:this._element},n=i.default.Event("hide.bs.dropdown",e),o=t._getParentFromElement(this._element);i.default(o).trigger(n),n.isDefaultPrevented()||(this._popper&&this._popper.destroy(),i.default(this._menu).toggleClass("show"),i.default(o).toggleClass("show").trigger(i.default.Event("hidden.bs.dropdown",e)))}},e.dispose=function(){i.default.removeData(this._element,"bs.dropdown"),i.default(this._element).off(".bs.dropdown"),this._element=null,this._menu=null,null!==this._popper&&(this._popper.destroy(),this._popper=null)},e.update=function(){this._inNavbar=this._detectNavbar(),null!==this._popper&&this._popper.scheduleUpdate()},e._addEventListeners=function(){var t=this;i.default(this._element).on("click.bs.dropdown",(function(e){e.preventDefault(),e.stopPropagation(),t.toggle()}))},e._getConfig=function(t){return t=a({},this.constructor.Default,i.default(this._element).data(),t),l.typeCheckConfig(Ot,t,this.constructor.DefaultType),t},e._getMenuElement=function(){if(!this._menu){var e=t._getParentFromElement(this._element);e&&(this._menu=e.querySelector(".dropdown-menu"))}return this._menu},e._getPlacement=function(){var t=i.default(this._element.parentNode),e="bottom-start";return t.hasClass("dropup")?e=i.default(this._menu).hasClass("dropdown-menu-right")?"top-end":"top-start":t.hasClass("dropright")?e="right-start":t.hasClass("dropleft")?e="left-start":i.default(this._menu).hasClass("dropdown-menu-right")&&(e="bottom-end"),e},e._detectNavbar=function(){return i.default(this._element).closest(".navbar").length>0},e._getOffset=function(){var t=this,e={};return"function"==typeof this._config.offset?e.fn=function(e){return e.offsets=a({},e.offsets,t._config.offset(e.offsets,t._element)||{}),e}:e.offset=this._config.offset,e},e._getPopperConfig=function(){var t={placement:this._getPlacement(),modifiers:{offset:this._getOffset(),flip:{enabled:this._config.flip},preventOverflow:{boundariesElement:this._config.boundary}}};return"static"===this._config.display&&(t.modifiers.applyStyle={enabled:!1}),a({},t,this._config.popperConfig)},t._jQueryInterface=function(e){return this.each((function(){var n=i.default(this).data("bs.dropdown");
vendor: 4,661 bytes, line 4051
4051if(n||(n=new t(this,"object"==typeof e?e:null),i.default(this).data("bs.dropdown",n)),"string"==typeof e){if("undefined"==typeof n[e])throw new TypeError('No method named "'+e+'"');n[e]()}}))},t._clearMenus=function(e){if(!e||3!==e.which&&("keyup"!==e.type||9===e.which))for(var n=[].slice.call(document.querySelectorAll('[data-toggle="dropdown"]')),o=0,r=n.length;o<r;o++){var a=t._getParentFromElement(n[o]),s=i.default(n[o]).data("bs.dropdown"),l={relatedTarget:n[o]};if(e&&"click"===e.type&&(l.clickEvent=e),s){var u=s._menu;if(i.default(a).hasClass("show")&&!(e&&("click"===e.type&&/input|textarea/i.test(e.target.tagName)||"keyup"===e.type&&9===e.which)&&i.default.contains(a,e.target))){var f=i.default.Event("hide.bs.dropdown",l);i.default(a).trigger(f),f.isDefaultPrevented()||("ontouchstart"in document.documentElement&&i.default(document.body).children().off("mouseover",null,i.default.noop),n[o].setAttribute("aria-expanded","false"),s._popper&&s._popper.destroy(),i.default(u).removeClass("show"),i.default(a).removeClass("show").trigger(i.default.Event("hidden.bs.dropdown",l)))}}}},t._getParentFromElement=function(t){var e,n=l.getSelectorFromElement(t);return n&&(e=document.querySelector(n)),e||t.parentNode},t._dataApiKeydownHandler=function(e){if(!(/input|textarea/i.test(e.target.tagName)?32===e.which||27!==e.which&&(40!==e.which&&38!==e.which||i.default(e.target).closest(".dropdown-menu").length):!jt.test(e.which))&&!this.disabled&&!i.default(this).hasClass("disabled")){var n=t._getParentFromElement(this),o=i.default(n).hasClass("show");if(o||27!==e.which){if(e.preventDefault(),e.stopPropagation(),!o||27===e.which||32===e.which)return 27===e.which&&i.default(n.querySelector('[data-toggle="dropdown"]')).trigger("focus"),void i.default(this).trigger("click");var r=[].slice.call(n.querySelectorAll(".dropdown-menu .dropdown-item:not(.disabled):not(:disabled)")).filter((function(t){return i.default(t).is(":visible")}));if(0!==r.length){var a=r.indexOf(e.target);38===e.which&&a>0&&a--,40===e.which&&a<r.length-1&&a++,a<0&&(a=0),r[a].focus()}}}},r(t,null,[{key:"VERSION",get:function(){return"4.5.3"}},{key:"Default",get:function(){return Lt}},{key:"DefaultType",get:function(){return Pt}}]),t}();i.default(document).on("keydown.bs.dropdown.data-api",'[data-toggle="dropdown"]',Ft._dataApiKeydownHandler).on("keydown.bs.dropdown.data-api",".dropdown-menu",Ft._dataApiKeydownHandler).on("click.bs.dropdown.data-api keyup.bs.dropdown.data-api",Ft._clearMenus).on("click.bs.dropdown.data-api",'[data-toggle="dropdown"]',(function(t){t.preventDefault(),t.stopPropagation(),Ft._jQueryInterface.call(i.default(this),"toggle")})).on("click.bs.dropdown.data-api",".dropdown form",(function(t){t.stopPropagation()})),i.default.fn[Ot]=Ft._jQueryInterface,i.default.fn[Ot].Constructor=Ft,i.default.fn[Ot].noConflict=function(){return i.default.fn[Ot]=xt,Ft._jQueryInterface};var Rt=i.default.fn.modal,Ht={backdrop:!0,keyboard:!0,focus:!0,show:!0},Mt={backdrop:"(boolean|string)",keyboard:"boolean",focus:"boolean",show:"boolean"},Bt=function(){function t(t,e){this._config=this._getConfig(e),this._element=t,this._dialog=t.querySelector(".modal-dialog"),this._backdrop=null,this._isShown=!1,this._isBodyOverflowing=!1,this._ignoreBackdropClick=!1,this._isTransitioning=!1,this._scrollbarWidth=0}var e=t.prototype;return e.toggle=function(t){return this._isShown?this.hide():this.show(t)},e.show=function(t){var e=this;if(!this._isShown&&!this._isTransitioning){i.default(this._element).hasClass("fade")&&(this._isTransitioning=!0);var n=i.default.Event("show.bs.modal",{relatedTarget:t});i.default(this._element).trigger(n),this._isShown||n.isDefaultPrevented()||(this._isShown=!0,this._checkScrollbar(),this._setScrollbar(),this._adjustDialog(),this._setEscapeEvent(),this._setResizeEvent(),i.default(this._element).on("click.dismiss.bs.modal",'[data-dismiss="modal"]',(function(t){return e.hide(t)})),i.default(this._dialog).on("mousedown.dismiss.bs.modal",(function(){i.default(e._element).one("mouseup.dismiss.bs.modal",(function(t){i.default(t.target).is(e._element)&&(e._ignoreBackdropClick=!0)}))})),this._showBackdrop((function(){return e._showElement(t)})))}},e.hide=function(t){var e=this;if(t&&t.preventDefault(),this._isShown&&!this._isTransitioning){var n=i.default.Event("hide.bs.modal");if(i.default(this._element).trigger(n),this._isShown&&!n.isDefaultPrevented()){this._isShown=!1;var o=i.default(this._element).hasClass("fade");if(o&&(this._isTransitioning=!0),this._setEscapeEvent(),this._setResizeEvent(),i.default(document).off("focusin.bs.modal"),i.default(this._element).removeClass("show"),i.default(this._element).off("
4051click.dismiss.bs.modal"),i.default(this._dialog).off("mousedown.dismiss.bs.modal"),o){var r=l.getTransitionDurationFromElement(this._element);i.default(this._element).one(l.TRANSITION_END,(function(t){return e._hideModal(t)})).emulateTransitionEnd(r)}else this._hideModal()}}},e.dispose=function(){[window,this._element,this._dialog].forEach((function(t){return i.default(t).off(".bs.modal")})),i.default(document).off("focusin.bs.modal"),i.default.removeData(this._element,"bs.modal"),this._config=null,this._element=null,this._dialog=null,this._backdrop=null,this._isShown=null,this._isBodyOverflowing=null,this._ignoreBackdropClick=null,this._isTransitioning=null,this._scrollbarWidth=null},e.handleUpdate=function(){this._adjustDialog()},e._getConfig=function(t){return t=a({},Ht,t),l.typeCheckConfig("modal",t,Mt),t},e._triggerBackdropTransition=function(){var t=this;if("static"===this._config.backdrop){var e=i.default.Event("hidePrevented.bs.modal");if(i.default(this._element).trigger(e),e.isDefaultPrevented())return;var n=this._element.scrollHeight>document.documentElement.clientHeight;n||(this._element.style.overflowY="hidden"),this._element.classList.add("modal-static");var o=l.getTransitionDurationFromElement(this._dialog);i.default(this._element).off(l.TRANSITION_END),i.default(this._element).one(l.TRANSITION_END,(function(){t._element.classList.remove("modal-static"),n||i.default(t._element).one(l.TRANSITION_END,(function(){t._element.style.overflowY=""})).emulateTransitionEnd(t._element,o)})).emulateTransitionEnd(o),this._element.focus()}else this.hide()},e._showElement=function(t){var e=this,n=i.default(this._element).hasClass("fade"),o=this._dialog?this._dialog.querySelector(".modal-body"):null;this._element.parentNode&&this._element.parentNode.nodeType===Node.ELEMENT_NODE||document.body.appendChild(this._element),this._element.style.display="block",this._element.removeAttribute("aria-hidden"),this._element.setAttribute("aria-modal",!0),this._element.setAttribute("role","dialog"),i.default(this._dialog).hasClass("modal-dialog-scrollable")&&o?o.scrollTop=0:this._element.scrollTop=0,n&&l.reflow(this._element),i.default(this._element).addClass("show"),this._config.focus&&this._enforceFocus();var r=i.default.Event("shown.bs.modal",{relatedTarget:t}),a=function(){e._config.focus&&e._element.focus(),e._isTransitioning=!1,i.default(e._element).trigger(r)};if(n){var s=l.getTransitionDurationFromElement(this._dialog);i.default(this._dialog).one(l.TRANSITION_END,a).emulateTransitionEnd(s)}else a()},e._enforceFocus=function(){var t=this;i.default(document).off("focusin.bs.modal").on("focusin.bs.modal",(function(e){document!==e.target&&t._element!==e.target&&0===i.default(t._element).has(e.target).length&&t._element.focus()}))},e._setEscapeEvent=function(){var t=this;this._isShown?i.default(this._element).on("keydown.dismiss.bs.modal",(function(e){t._config.keyboard&&27===e.which?(e.preventDefault(),t.hide()):t._config.keyboard||27!==e.which||t._triggerBackdropTransition()})):this._isShown||i.default(this._element).off("keydown.dismiss.bs.modal")},e._setResizeEvent=function(){var t=this;this._isShown?i.default(window).on("resize.bs.modal",(function(e){return t.handleUpdate(e)})):i.default(window).off("resize.bs.modal")},e._hideModal=function(){var t=this;this._element.style.display="none",this._element.setAttribute("aria-hidden",!0),this._element.removeAttribute("aria-modal"),this._element.removeAttribute("role"),this._isTransitioning=!1,this._showBackdrop((function(){i.default(document.body).removeClass("modal-open"),t._resetAdjustments(),t._resetScrollbar(),i.default(t._element).trigger("hidden.bs.modal")}))},e._removeBackdrop=function(){this._backdrop&&(i.default(this._backdrop).remove(),this._backdrop=null)},e._showBackdrop=function(t){var e=this,n=i.default(this._element).hasClass("fade")?"fade":"";if(this._isShown&&this._config.backdrop){if(this._backdrop=document.createElement("div"),this._backdrop.className="modal-backdrop",n&&this._backdrop.classList.add(n),i.default(this._backdrop).appendTo(document.body),i.default(this._element).on("click.dismiss.bs.modal",(function(t){e._ignoreBackdropClick?e._ignoreBackdropClick=!1:t.target===t.currentTarget&&e._triggerBackdropTransition()})),n&&l.reflow(this._backdrop),i.default(this._backdrop).addClass("show"),!t)return;if(!n)return void t();var o=l.getTransitionDurationFromElement(this._backdrop);i.default(this._backdrop).one(l.TRANSITION_END,t).emulateTransitionEnd(o)}else if(!this._isShown&&this._backdrop){i.default(this._backdrop).removeClass("show");var r=function(){e._removeBackdrop(),t&&t()};if(i.default(this._element).hasClass("fade")){var a=l.getTransitionDurationFromElement(this._backdrop);i.default(this._backdrop).one(l.TRANSITION_END,r).emulateTransitionEnd(a)}else r()}else t&&t()},e._adjustDialog=function(){var t=this._element.scrollHeight>document.documentElement.clientHeight;!this._isBodyOverflowing&&t&&(this._element.style.paddingLeft=this._scrollbarWidth+"px"),this._isBodyOverflowing&&!t&&(this._element.style.paddingRight=this._scrollbarWidth+"px")},e._resetAdjustments=function(){this._element.style.paddingLeft="",this._element.style.paddingRight=""},e._checkScrollbar=function(){var t=document.body.getBoundingClientRect();this._isBodyOverflowing=Math.round(t.left+t.right)<window.innerWidth,this._scrollbarWidth=this._getScrollbarWidth()},e._setScrollbar=function(){var t=this;if(this._isBodyOverflowing){var e=[].slice.call(document.querySelectorAll(".fixed-top, .fixed-bottom, .is-fixed, .sticky-top")),n=[].slice.call(document.querySelectorAll(".sticky-top"));i.default(e).each((function(e,n){var o=n.style.paddingRight,r=i.default(n).css("padding-right");i.default(n).data("padding-right",o).css("padding-right",parseFloat(r)+t._scrollbarWidth+"px")})),i.default(n).each((function(e,n){var o=n.style.marginRight,r=i.default(n).css("margin-right");i.default(n).data("margin-right",o).css("margin-right",parseFloat(r)-t._scrollbarWidth+"px")}));var o=document.body.style.paddingRight,r=i.default(document.body).css("padding-right");i.default(document.body).data("padding-right",o).css("padding-right",parseFloat(r)+this._scrollbarWidth+"px")}i.default(document.body).addClass("modal-open")},e._resetScrollbar=function(){var t=[].slice.call(document.querySelectorAll(".fixed-top, .fixed-bottom, .is-fixed, .sticky-top"));i.default(t).each((function(t,e){var n=i.default(e).data("padding-right");i.default(e).removeData("padding-right"),e.style.paddingRight=n||""}));var e=[].slice.call(document.querySelectorAll(".sticky-top"));i.default(e).each((function(t,e){var n=i.default(e).data("margin-right");"undefined"!=typeof n&&i.default(e).css("margin-right",n).removeData("margin-right")}));var n=i.default(document.body).data("padding-right");i.default(document.body).removeData("padding-right"),document.body.style.paddingRight=n||""},e._getScrollbarWidth=function(){var t=document.createElement("div");t.className="modal-scrollbar-measure",document.body.appendChild(t);var e=t.getBoundingClientRect().width-t.clientWidth;return document.body.removeChild(t),e},t._jQueryInterface=function(e,n){return this.each((function(){var o=i.default(this).data("bs.modal"),r=a({},Ht,i.default(this).data(),"object"==typeof e&&e?e:{});if(o||(o=new t(this,r),i.default(this).data("bs.modal",o)),"string"==typeof e){if("undefined"==typeof o[e])throw new TypeError('No method n
4051amed "'+e+'"');o[e](n)}else r.show&&o.show(n)}))},r(t,null,[{key:"VERSION",get:function(){return"4.5.3"}},{key:"Default",get:function(){return Ht}}]),t}();i.default(document).on("click.bs.modal.data-api",'[data-toggle="modal"]',(function(t){var e,n=this,o=l.getSelectorFromElement(this);o&&(e=document.querySelector(o));var r=i.default(e).data("bs.modal")?"toggle":a({},i.default(e).data(),i.default(this).data());"A"!==this.tagName&&"AREA"!==this.tagName||t.preventDefault();var s=i.default(e).one("show.bs.modal",(function(t){t.isDefaultPrevented()||s.one("hidden.bs.modal",(function(){i.default(n).is(":visible")&&n.focus()}))}));Bt._jQueryInterface.call(i.default(e),r,this)})),i.default.fn.modal=Bt._jQueryInterface,i.default.fn.modal.Constructor=Bt,i.default.fn.modal.noConflict=function(){return i.default.fn.modal=Rt,Bt._jQueryInterface};var qt=["background","cite","href","itemtype","longdesc","poster","src","xlink:href"],Qt={"*":["class","dir","id","lang","role",/^aria-[\w-]*$/i],a:["target","href","title","rel"],area:[],b:[],br:[],col:[],code:[],div:[],em:[],hr:[],h1:[],h2:[],h3:[],h4:[],h5:[],h6:[],i:[],img:["src","srcset","alt","title","width","height"],li:[],ol:[],p:[],pre:[],s:[],small:[],span:[],sub:[],sup:[],strong:[],u:[],ul:[]},Wt=/^(?:(?:https?|mailto|ftp|tel|file):|[^#&/:?]*(?:[#/?]|$))/gi,Ut=/^data:(?:image\/(?:bmp|gif|jpeg|jpg|png|tiff|webp)|video\/(?:mpeg|mp4|ogg|webm)|audio\/(?:mp3|oga|ogg|opus));base64,[\d+/a-z]+=*$/i;function Vt(t,e,n){if(0===t.length)return t;if(n&&"function"==typeof n)return n(t);for(var i=(new window.DOMParser).parseFromString(t,"text/html"),o=Object.keys(e),r=[].slice.call(i.body.querySelectorAll("*")),a=function(t,n){var i=r[t],a=i.nodeName.toLowerCase();if(-1===o.indexOf(i.nodeName.toLowerCase()))return i.parentNode.removeChild(i),"continue";var s=[].slice.call(i.attributes),l=[].concat(e["*"]||[],e[a]||[]);s.forEach((function(t){(function(t,e){var n=t.nodeName.toLowerCase();if(-1!==e.indexOf(n))return-1===qt.indexOf(n)||Boolean(t.nodeValue.match(Wt)||t.nodeValue.match(Ut));for(var i=e.filter((function(t){return t instanceof RegExp})),o=0,r=i.length;o<r;o++)if(n.match(i[o]))return!0;return!1})(t,l)||i.removeAttribute(t.nodeName)}))},s=0,l=r.length;s<l;s++)a(s);return i.body.innerHTML}var Yt="tooltip",zt=i.default.fn[Yt],Xt=new RegExp("(^|\\s)bs-tooltip\\S+","g"),Kt=["sanitize","whiteList","sanitizeFn"],Gt={animation:"boolean",template:"string",title:"(string|element|function)",trigger:"string",delay:"(number|object)",html:"boolean",selector:"(string|boolean)",placement:"(string|function)",offset:"(number|string|function)",container:"(string|element|boolean)",fallbackPlacement:"(string|array)",boundary:"(string|element)",sanitize:"boolean",sanitizeFn:"(null|function)",whiteList:"object",popperConfig:"(null|object)"},$t={AUTO:"auto",TOP:"top",RIGHT:"right",BOTTOM:"bottom",LEFT:"left"},Jt={animation:!0,template:'<div class="tooltip" role="tooltip"><div class="arrow"></div><div class="tooltip-inner"></div></div>',trigger:"hover focus",title:"",delay:0,html:!1,selector:!1,placement:"top",offset:0,container:!1,fallbackPlacement:"flip",boundary:"scrollParent",sanitize:!0,sanitizeFn:null,whiteList:Qt,popperConfig:null},Zt={HIDE:"hide.bs.tooltip",HIDDEN:"hidden.bs.tooltip",SHOW:"show.bs.tooltip",SHOWN:"shown.bs.tooltip",INSERTED:"inserted.bs.tooltip",CLICK:"click.bs.tooltip",FOCUSIN:"focusin.bs.tooltip",FOCUSOUT:"focusout.bs.tooltip",MOUSEENTER:"mouseenter.bs.tooltip",MOUSELEAVE:"mouseleave.bs.tooltip"},te=function(){function t(t,e){if("undefined"==typeof It)throw new TypeError("Bootstrap's tooltips require Popper.js (https://popper.js.org/)");this._isEnabled=!0,this._timeout=0,this._hoverState="",this._activeTrigger={},this._popper=null,this.element=t,this.config=this._getConfig(e),this.tip=null,this._setListeners()}var e=t.prototype;return e.enable=function(){this._isEnabled=!0},e.disable=function(){this._isEnabled=!1},e.toggleEnabled=function(){this._isEnabled=!this._isEnabled},e.toggle=function(t){if(this._isEnabled)if(t){var e=this.constructor.DATA_KEY,n=i.default(t.currentTarget).data(e);n||(n=new this.constructor(t.currentTarget,this._getDelegateConfig()),i.default(t.currentTarget).data(e,n)),n._activeTrigger.click=!n._activeTrigger.click,n._isWithActiveTrigger()?n._enter(null,n):n._leave(null,n)}else{if(i.default(this.getTipElement()).hasClass("show"))return void this._leave(null,this);this._enter(null,this)}},e.dispose=function(){clearTimeout(this._timeout),i.default.removeData(this.element,this.constructor.DATA_KEY),i.default(this.element).off(this.constructor.EVENT_KEY),i.default(this.element).closest(".modal").off("hide.bs.modal",this._hideModalHandler),this.tip&&i.default(this.tip).remove(),this._isEnabled=null,this._timeout=null,this._hoverState=null,this._activeTrigger=null,this._popper&&this._popper.destroy(),this._popper=null,this.element=null,this.config=null,this.tip=null},e.show=function(){var t=this;if("none"===i.default(this.element).css("display"))throw new Error("Please use show on visible elements");var e=i.default.Event(this.constructor.Event.SHOW);if(this.isWithContent()&&this._isEnabled){i.default(this.element).trigger(e);var n=l.findShadowRoot(this.element),o=i.default.contains(null!==n?n:this.element.ownerDocument.documentElement,this.element);if(e.isDefaultPrevented()||!o)return;var r=this.getTipElement(),a=l.getUID(this.constructor.NAME);r.setAttribute("id",a),this.element.setAttribute("aria-describedby",a),this.setContent(),this.config.animation&&i.default(r).addClass("fade");var s="function"==typeof this.config.placement?this.config.placement.call(this,r,this.element):this.config.placement,u=this._getAttachment(s);this.addAttachmentClass(u);var f=this._getContainer();i.default(r).data(this.constructor.DATA_KEY,this),i.default.contains(this.element.ownerDocument.documentElement,this.tip)||i.default(r).appendTo(f),i.default(this.element).trigger(this.constructor.Event.INSERTED),this._popper=new It(this.element,r,this._getPopperConfig(u)),i.default(r).addClass("show"
vendor: 6,831 bytes, line 4051
4051),"ontouchstart"in document.documentElement&&i.default(document.body).children().on("mouseover",null,i.default.noop);var d=function(){t.config.animation&&t._fixTransition();var e=t._hoverState;t._hoverState=null,i.default(t.element).trigger(t.constructor.Event.SHOWN),"out"===e&&t._leave(null,t)};if(i.default(this.tip).hasClass("fade")){var c=l.getTransitionDurationFromElement(this.tip);i.default(this.tip).one(l.TRANSITION_END,d).emulateTransitionEnd(c)}else d()}},e.hide=function(t){var e=this,n=this.getTipElement(),o=i.default.Event(this.constructor.Event.HIDE),r=function(){"show"!==e._hoverState&&n.parentNode&&n.parentNode.removeChild(n),e._cleanTipClass(),e.element.removeAttribute("aria-describedby"),i.default(e.element).trigger(e.constructor.Event.HIDDEN),null!==e._popper&&e._popper.destroy(),t&&t()};if(i.default(this.element).trigger(o),!o.isDefaultPrevented()){if(i.default(n).removeClass("show"),"ontouchstart"in document.documentElement&&i.default(document.body).children().off("mouseover",null,i.default.noop),this._activeTrigger.click=!1,this._activeTrigger.focus=!1,this._activeTrigger.hover=!1,i.default(this.tip).hasClass("fade")){var a=l.getTransitionDurationFromElement(n);i.default(n).one(l.TRANSITION_END,r).emulateTransitionEnd(a)}else r();this._hoverState=""}},e.update=function(){null!==this._popper&&this._popper.scheduleUpdate()},e.isWithContent=function(){return Boolean(this.getTitle())},e.addAttachmentClass=function(t){i.default(this.getTipElement()).addClass("bs-tooltip-"+t)},e.getTipElement=function(){return this.tip=this.tip||i.default(this.config.template)[0],this.tip},e.setContent=function(){var t=this.getTipElement();this.setElementContent(i.default(t.querySelectorAll(".tooltip-inner")),this.getTitle()),i.default(t).removeClass("fade show")},e.setElementContent=function(t,e){"object"!=typeof e||!e.nodeType&&!e.jquery?this.config.html?(this.config.sanitize&&(e=Vt(e,this.config.whiteList,this.config.sanitizeFn)),t.html(e)):t.text(e):this.config.html?i.default(e).parent().is(t)||t.empty().append(e):t.text(i.default(e).text())},e.getTitle=function(){var t=this.element.getAttribute("data-original-title");return t||(t="function"==typeof this.config.title?this.config.title.call(this.element):this.config.title),t},e._getPopperConfig=function(t){var e=this;return a({},{placement:t,modifiers:{offset:this._getOffset(),flip:{behavior:this.config.fallbackPlacement},arrow:{element:".arrow"},preventOverflow:{boundariesElement:this.config.boundary}},onCreate:function(t){t.originalPlacement!==t.placement&&e._handlePopperPlacementChange(t)},onUpdate:function(t){return e._handlePopperPlacementChange(t)}},this.config.popperConfig)},e._getOffset=function(){var t=this,e={};return"function"==typeof this.config.offset?e.fn=function(e){return e.offsets=a({},e.offsets,t.config.offset(e.offsets,t.element)||{}),e}:e.offset=this.config.offset,e},e._getContainer=function(){return!1===this.config.container?document.body:l.isElement(this.config.container)?i.default(this.config.container):i.default(document).find(this.config.container)},e._getAttachment=function(t){return $t[t.toUpperCase()]},e._setListeners=function(){var t=this;this.config.trigger.split(" ").forEach((function(e){if("click"===e)i.default(t.element).on(t.constructor.Event.CLICK,t.config.selector,(function(e){return t.toggle(e)}));else if("manual"!==e){var n="hover"===e?t.constructor.Event.MOUSEENTER:t.constructor.Event.FOCUSIN,o="hover"===e?t.constructor.Event.MOUSELEAVE:t.constructor.Event.FOCUSOUT;i.default(t.element).on(n,t.config.selector,(function(e){return t._enter(e)})).on(o,t.config.selector,(function(e){return t._leave(e)}))}})),this._hideModalHandler=function(){t.element&&t.hide()},i.default(this.element).closest(".modal").on("hide.bs.modal",this._hideModalHandler),this.config.selector?this.config=a({},this.config,{trigger:"manual",selector:""}):this._fixTitle()},e._fixTitle=function(){var t=typeof this.element.getAttribute("data-original-title");(this.element.getAttribute("title")||"string"!==t)&&(this.element.setAttribute("data-original-title",this.element.getAttribute("title")||""),this.element.setAttribute("title",""))},e._enter=function(t,e){var n=this.constructor.DATA_KEY;(e=e||i.default(t.currentTarget).data(n))||(e=new this.constructor(t.currentTarget,this._getDelegateConfig()),i.default(t.currentTarget).data(n,e)),t&&(e._activeTrigger["focusin"===t.type?"focus":"hover"]=!0),i.default(e.getTipElement()).hasClass("show")||"show"===e._hoverState?e._hoverState="show":(clearTimeout(e._timeout),e._hoverState="show",e.config.delay&&e.config.delay.show?e._timeout=setTimeout((function(){"show"===e._hoverState&&e.show()}),e.config.delay.show):e.show())},e._leave=function(t,e){var n=this.constructor.DATA_KEY;(e=e||i.default(t.currentTarget).data(n))||(e=new this.constructor(t.currentTarget,this._getDelegateConfig()),i.default(t.currentTarget).data(n,e)),t&&(e._activeTrigger["focusout"===t.type?"focus":"hover"]=!1),e._isWithActiveTrigger()||(clearTimeout(e._timeout),e._hoverState="out",e.config.delay&&e.config.delay.hide?e._timeout=setTimeout((function(){"out"===e._hoverState&&e.hide()}),e.config.delay.hide):e.hide())},e._isWithActiveTrigger=function(){for(var t in this._activeTrigger)if(this._activeTrigger[t])return!0;return!1},e._getConfig=function(t){var e=i.default(this.element).data();return Object.keys(e).forEach((function(t){-1!==Kt.indexOf(t)&&delete e[t]})),"number"==typeof(t=a({},this.constructor.Default,e,"object"==typeof t&&t?t:{})).delay&&(t.delay={show:t.delay,hide:t.delay}),"number"==typeof t.title&&(t.title=t.title.toString()),"number"==typeof t.content&&(t.content=t.content.toString()),l.typeCheckConfig(Yt,t,this.constructor.DefaultType),t.sanitize&&(t.template=Vt(t.template,t.whiteList,t.sanitizeFn)),t},e._getDelegateConfig=function(){var t={};if(this.config)for(var e in this.config)this.constructor.Default[e]!==this.config[e]&&(t[e]=this.config[e]);return t},e._cleanTipClass=function(){var t=i.default(this.getTipElement()),e=t.attr("class").match(Xt);null!==e&&e.length&&t.removeClass(e.join(""))},e._handlePopperPlacementChange=function(t){this.tip=t.instance.popper,this._cleanTipClass(),this.addAttachmentClass(this._getAttachment(t.placement))},e._fixTransition=function(){var t=this.getTipElement(),e=this.config.animation;null===t.getAttribute("x-placement")&&(i.default(t).removeClass("fade"),this.config.animation=!1,this.hide(),this.show(),this.config.animation=e)},t._jQueryInterface=function(e){return this.each((function(){var n=i.default(this),o=n.data("bs.tooltip"),r="object"==typeof e&&e;if((o||!/dispose|hide/.test(e))&&(o||(o=new t(this,r),n.data("bs.tooltip",o)),"string"==typeof e)){if("undefined"==typeof o[e])throw new TypeError('No method named "'+e+'"');o[e]()}}))},r(t,null,[{key:"VERSION",get:function(){return"4.
40515.3"}},{key:"Default",get:function(){return Jt}},{key:"NAME",get:function(){return Yt}},{key:"DATA_KEY",get:function(){return"bs.tooltip"}},{key:"Event",get:function(){return Zt}},{key:"EVENT_KEY",get:function(){return".bs.tooltip"}},{key:"DefaultType",get:function(){return Gt}}]),t}();i.default.fn[Yt]=te._jQueryInterface,i.default.fn[Yt].Constructor=te,i.default.fn[Yt].noConflict=function(){return i.default.fn[Yt]=zt,te._jQueryInterface};var ee="popover",ne=i.default.fn[ee],ie=new RegExp("(^|\\s)bs-popover\\S+","g"),oe=a({},te.Default,{placement:"right",trigger:"click",content:"",template:'<div class="popover" role="tooltip"><div class="arrow"></div><h3 class="popover-header"></h3><div class="popover-body"></div></div>'}),re=a({},te.DefaultType,{content:"(string|element|function)"}),ae={HIDE:"hide.bs.popover",HIDDEN:"hidden.bs.popover",SHOW:"show.bs.popover",SHOWN:"shown.bs.popover",INSERTED:"inserted.bs.popover",CLICK:"click.bs.popover",FOCUSIN:"focusin.bs.popover",FOCUSOUT:"focusout.bs.popover",MOUSEENTER:"mouseenter.bs.popover",MOUSELEAVE:"mouseleave.bs.popover"},se=function(t){var e,n;function o(){return t.apply(this,arguments)||this}n=t,(e=o).prototype=Object.create(n.prototype),e.prototype.constructor=e,e.__proto__=n;var a=o.prototype;return a.isWithContent=function(){return this.getTitle()||this._getContent()},a.addAttachmentClass=function(t){i.default(this.getTipElement()).addClass("bs-popover-"+t)},a.getTipElement=function(){return this.tip=this.tip||i.default(this.config.template)[0],this.tip},a.setContent=function(){var t=i.default(this.getTipElement());this.setElementContent(t.find(".popover-header"),this.getTitle());var e=this._getContent();"function"==typeof e&&(e=e.call(this.element)),this.setElementContent(t.find(".popover-body"),e),t.removeClass("fade show")},a._getContent=function(){return this.element.getAttribute("data-content")||this.config.content},a._cleanTipClass=function(){var t=i.default(this.getTipElement()),e=t.attr("class").match(ie);null!==e&&e.length>0&&t.removeClass(e.join(""))},o._jQueryInterface=function(t){return this.each((function(){var e=i.default(this).data("bs.popover"),n="object"==typeof t?t:null;if((e||!/dispose|hide/.test(t))&&(e||(e=new o(this,n),i.default(this).data("bs.popover",e)),"string"==typeof t)){if("undefined"==typeof e[t])throw new TypeError('No method named "'+t+'"');e[t]()}}))},r(o,null,[{key:"VERSION",get:function(){return"4.5.3"}},{key:"Default",get:function(){return oe}},{key:"NAME",get:function(){return ee}},{key:"DATA_KEY",get:function(){return"bs.popover"}},{key:"Event",get:function(){return ae}},{key:"EVENT_KEY",get:function(){return".bs.popover"}},{key:"DefaultType",get:function(){return re}}]),o}(te);i.default.fn[ee]=se._jQueryInterface,i.default.fn[ee].Constructor=se,i.default.fn[ee].noConflict=function(){return i.default.fn[ee]=ne,se._jQueryInterface};var le="scrollspy",ue=i.default.fn[le],fe={offset:10,method:"auto",target:""},de={offset:"number",method:"string",target:"(string|element)"},ce=function(){function t(t,e){var n=this;this._element=t,this._scrollElement="BODY"===t.tagName?window:t,this._config=this._getConfig(e),this._selector=this._config.target+" .nav-link,"+this._config.target+" .list-group-item,"+this._config.target+" .dropdown-item",this._offsets=[],this._targets=[],this._activeTarget=null,this._scrollHeight=0,i.default(this._scrollElement).on("scroll.bs.scrollspy",(function(t){return n._process(t)})),this.refresh(),this._process()}var e=t.prototype;return e.refresh=function(){var t=this,e=this._scrollElement===this._scrollElement.window?"offset":"position",n="auto"===this._config.method?e:this._config.method,o="position"===n?this._getScrollTop():0;this._offsets=[],this._targets=[],this._scrollHeight=this._getScrollHeight(),[].slice.call(document.querySelectorAll(this._selector)).map((function(t){var e,r=l.getSelectorFromElement(t);if(r&&(e=document.querySelector(r)),e){var a=e.getBoundingClientRect();if(a.width||a.height)return[i.default(e)[n]().top+o,r]}return null})).filter((function(t){return t})).sort((function(t,e){return t[0]-e[0]}
vendor: 8,484 bytes, line 4051
4051)).forEach((function(e){t._offsets.push(e[0]),t._targets.push(e[1])}))},e.dispose=function(){i.default.removeData(this._element,"bs.scrollspy"),i.default(this._scrollElement).off(".bs.scrollspy"),this._element=null,this._scrollElement=null,this._config=null,this._selector=null,this._offsets=null,this._targets=null,this._activeTarget=null,this._scrollHeight=null},e._getConfig=function(t){if("string"!=typeof(t=a({},fe,"object"==typeof t&&t?t:{})).target&&l.isElement(t.target)){var e=i.default(t.target).attr("id");e||(e=l.getUID(le),i.default(t.target).attr("id",e)),t.target="#"+e}return l.typeCheckConfig(le,t,de),t},e._getScrollTop=function(){return this._scrollElement===window?this._scrollElement.pageYOffset:this._scrollElement.scrollTop},e._getScrollHeight=function(){return this._scrollElement.scrollHeight||Math.max(document.body.scrollHeight,document.documentElement.scrollHeight)},e._getOffsetHeight=function(){return this._scrollElement===window?window.innerHeight:this._scrollElement.getBoundingClientRect().height},e._process=function(){var t=this._getScrollTop()+this._config.offset,e=this._getScrollHeight(),n=this._config.offset+e-this._getOffsetHeight();if(this._scrollHeight!==e&&this.refresh(),t>=n){var i=this._targets[this._targets.length-1];this._activeTarget!==i&&this._activate(i)}else{if(this._activeTarget&&t<this._offsets[0]&&this._offsets[0]>0)return this._activeTarget=null,void this._clear();for(var o=this._offsets.length;o--;){this._activeTarget!==this._targets[o]&&t>=this._offsets[o]&&("undefined"==typeof this._offsets[o+1]||t<this._offsets[o+1])&&this._activate(this._targets[o])}}},e._activate=function(t){this._activeTarget=t,this._clear();var e=this._selector.split(",").map((function(e){return e+'[data-target="'+t+'"],'+e+'[href="'+t+'"]'})),n=i.default([].slice.call(document.querySelectorAll(e.join(","))));n.hasClass("dropdown-item")?(n.closest(".dropdown").find(".dropdown-toggle").addClass("active"),n.addClass("active")):(n.addClass("active"),n.parents(".nav, .list-group").prev(".nav-link, .list-group-item").addClass("active"),n.parents(".nav, .list-group").prev(".nav-item").children(".nav-link").addClass("active")),i.default(this._scrollElement).trigger("activate.bs.scrollspy",{relatedTarget:t})},e._clear=function(){[].slice.call(document.querySelectorAll(this._selector)).filter((function(t){return t.classList.contains("active")})).forEach((function(t){return t.classList.remove("active")}))},t._jQueryInterface=function(e){return this.each((function(){var n=i.default(this).data("bs.scrollspy");if(n||(n=new t(this,"object"==typeof e&&e),i.default(this).data("bs.scrollspy",n)),"string"==typeof e){if("undefined"==typeof n[e])throw new TypeError('No method named "'+e+'"');n[e]()}}))},r(t,null,[{key:"VERSION",get:function(){return"4.5.3"}},{key:"Default",get:function(){return fe}}]),t}();i.default(window).on("load.bs.scrollspy.data-api",(function(){for(var t=[].slice.call(document.querySelectorAll('[data-spy="scroll"]')),e=t.length;e--;){var n=i.default(t[e]);ce._jQueryInterface.call(n,n.data())}})),i.default.fn[le]=ce._jQueryInterface,i.default.fn[le].Constructor=ce,i.default.fn[le].noConflict=function(){return i.default.fn[le]=ue,ce._jQueryInterface};var he=i.default.fn.tab,pe=function(){function t(t){this._element=t}var e=t.prototype;return e.show=function(){var t=this;if(!(this._element.parentNode&&this._element.parentNode.nodeType===Node.ELEMENT_NODE&&i.default(this._element).hasClass("active")||i.default(this._element).hasClass("disabled"))){var e,n,o=i.default(this._element).closest(".nav, .list-group")[0],r=l.getSelectorFromElement(this._element);if(o){var a="UL"===o.nodeName||"OL"===o.nodeName?"> li > .active":".active";n=(n=i.default.makeArray(i.default(o).find(a)))[n.length-1]}var s=i.default.Event("hide.bs.tab",{relatedTarget:this._element}),u=i.default.Event("show.bs.tab",{relatedTarget:n});if(n&&i.default(n).trigger(s),i.default(this._element).trigger(u),!u.isDefaultPrevented()&&!s.isDefaultPrevented()){r&&(e=document.querySelector(r)),this._activate(this._element,o);var f=function(){var e=i.default.Event("hidden.bs.tab",{relatedTarget:t._element}),o=i.default.Event("shown.bs.tab",{relatedTarget:n});i.default(n).trigger(e),i.default(t._element).trigger(o)};e?this._activate(e,e.parentNode,f):f()}}},e.dispose=function(){i.default.removeData(this._element,"bs.tab"),this._element=null},e._activate=function(t,e,n){var o=this,r=(!e||"UL"!==e.nodeName&&"OL"!==e.nodeName?i.default(e).children(".active"):i.default(e).find("> li > .active"))[0],a=n&&r&&i.default(r).hasClass("fade"),s=function(){return o._transitionComplete(t,r,n)};if(r&&a){var u=l.getTransitionDurationFromElement(r);i.default(r).removeClass("show").one(l.TRANSITION_END,s).emulateTransitionEnd(u)}else s()},e._transitionComplete=function(t,e,n){if(e){i.default(e).removeClass("active");var o=i.default(e.parentNode).find("> .dropdown-menu .active")[0];o&&i.default(o).removeClass("active"),"tab"===e.getAttribute("role")&&e.setAttribute("aria-selected",!1)}if(i.default(t).addClass("active"),"tab"===t.getAttribute("role")&&t.setAttribute("aria-selected",!0),l.reflow(t),t.classList.contains("fade")&&t.classList.add("show"),t.parentNode&&i.default(t.parentNode).hasClass("dropdown-menu")){var r=i.default(t).closest(".dropdown")[0];if(r){var a=[].slice.call(r.querySelectorAll(".dropdown-toggle"));i.default(a).addClass("active")}t.setAttribute("aria-expanded",!0)}n&&n()},t._jQueryInterface=function(e){return this.each((function(){var n=i.default(this),o=n.data("bs.tab");if(o||(o=new t(this),n.data("bs.tab",o)),"string"==typeof e){if("undefined"==typeof o[e])throw new TypeError('No method named "'+e+'"');o[e]()}}))},r(t,null,[{key:"VERSION",get:function(){return"4.5.3"}}]),t}();i.default(document).on("click.bs.tab.data-api",'[data-toggle="tab"], [data-toggle="pill"], [data-toggle="list"]',(function(t){t.preventDefault(),pe._jQueryInterface.call(i.default(this),"show")})),i.default.fn.tab=pe._jQueryInterface,i.default.fn.tab.Constructor=pe,i.default.fn.tab.noConflict=function(){return i.default.fn.tab=he,pe._jQueryInterface};var me=i.default.fn.toast,ge={animation:"boolean",autohide:"boolean",delay:"number"},ve={animation:!0,autohide:!0,delay:500},_e=function(){function t(t,e){this._element=t,this._config=this._getConfig(e),this._timeout=null,this._setListeners()}var e=t.prototype;return e.show=function(){var t=this,e=i.default.Event("show.bs.toast");if(i.default(this._element).trigger(e),!e.isDefaultPrevented()){this._clearTimeout(),this._config.animation&&this._element.classList.add("fade");var n=function(){t._element.classList.remove("showing"),t._element.classList.add("show"),i.default(t._element).trigger("shown.bs.toast"),t._config.autohide&&(t._timeout=setTimeout((function(){t.hide()}),t._config.delay))};if(this._element.classList.remove("hide"),l.reflow(this._element),this._element.classList.add("showing"),this._config.animation){var o=l.getTransitionDurationFromElement(this._element);i.default(this._element).one(l.TRANSITION_END,n).emulateTransitionEnd(o)}else n()}},e.hide=function(){if(this._element.classList.contains("show")){var t=i.default.Event("hide.bs.toast");i.default(this._element).trigger(t),t.isDefaultPrevented()||this._close()}},e.dispose=function(){this._clearTimeout(),this._element.classList.contains("show")&&this._element.classList.remove("show"),i.default(this._element).off("click.dismiss.bs.toast"),i.default.removeData(this._element,"bs.toast"),this._element=null,this._config=null},e._getConfig=function(t){return t=a({},ve,i.default(this._element).data(),"object"==typeof t&&t?t:{}),l.typeCheckConfig("toast",t,this.constructor.DefaultType),t},e._setListeners=function(){var t=this;i.default(this._element).on("click.dismiss.bs.toast",'[data-dismiss="toast"]',(function(){return t.hide()}))},e._close=function(){var t=this,e=function(){t._element.classList.add("hide"),i.default(t._element).trigger("hidden.bs.toast")};if(this._element.classList.remove("show"),this._config.animation){var n=l.getTransitionDurationFromElement(this._element);i.default(this._element).one(l.TRANSITION_END,e).emulateTransitionEnd(n)}else e()},e._clearTimeout=function(){clearTimeout(this._timeout),this._timeout=null},t._jQueryInterface=function(e){return this.each((function(){var n=i.default(this),o=n.data("bs.toast");if(o||(o=new t(this,"object"==typeof e&&e),n.data("bs.toast",o)),"string"==typeof e){if("undefined"==typeof o[e])throw new TypeError('No method n
4051amed "'+e+'"');o[e](this)}}))},r(t,null,[{key:"VERSION",get:function(){return"4.5.3"}},{key:"DefaultType",get:function(){return ge}},{key:"Default",get:function(){return ve}}]),t}();i.default.fn.toast=_e._jQueryInterface,i.default.fn.toast.Constructor=_e,i.default.fn.toast.noConflict=function(){return i.default.fn.toast=me,_e._jQueryInterface},t.Alert=d,t.Button=h,t.Carousel=y,t.Collapse=S,t.Dropdown=Ft,t.Modal=Bt,t.Popover=se,t.Scrollspy=ce,t.Tab=pe,t.Toast=_e,t.Tooltip=te,t.Util=l,Object.defineProperty(t,"__esModule",{value:!0})})); 4052 4053function Wo_progressIconLoader(e){e.each(function(){return progress_icon_elem=$(this).find("i.progress-icon"),default_icon=progress_icon_elem.attr("data-icon"),hide_back=!1,1==progress_icon_elem.hasClass("hidde")&&(hide_back=!0),1==$(this).find("i.fa-spinner").length?(progress_icon_elem.removeClass("fa-spinner").removeClass("fa-spin").addClass("fa-"+default_icon),1==hide_back&&progress_icon_elem.hide()):progress_icon_elem.removeClass("fa-"+default_icon).addClass("fa-spinner fa-spin").show(),!0})}function Wo_StartBar(){$(".barloading").css("display","block")}function Wo_FinishBar(){$(".barloading").css("display","none")}$(document).ready(function(){$(".nav-footer-toggle").on("click",function(e){e.preventDefault(),$(this).parent().toggleClass("Wide-Footer"),$(".nav-footer-toggle i").toggleClass("fa-arrow-circle-up fa-arrow-circle-down")})}); 4054 4055!function(e){if(!e.hasInitialised){var t={escapeRegExp:function(e){return e.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g,"\\$&")},hasClass:function(e,t){var i=" ";return 1===e.nodeType&&(i+e.className+i).replace(/[\n\t]/g,i).indexOf(i+t+i)>=0},addClass:function(e,t){e.className+=" "+t},removeClass:function(e,t){var i=new RegExp("\\b"+this.escapeRegExp(t)+"\\b");e.className=e.className.replace(i,"")},interpolateString:function(e,t){var i=/{{([a-z][a-z0-9\-_]*)}}/gi;return e.replace(i,function(e){return t(arguments[1])||""})},getCookie:function(e){var t="; "+document.cookie,i=t.split("; "+e+"=");return 2!=i.length?void 0:i.pop().split(";").shift()}
4055,setCookie:function(e,t,i,n,o){var s=new Date;s.setDate(s.getDate()+(i||365));var r=[e+"="+t,"expires="+s.toUTCString(),"path="+(o||"/")];n&&r.push("domain="+n),document.cookie=r.join(";")},deepExtend:function(e,t){for(var i in t)t.hasOwnProperty(i)&&(i in e&&this.isPlainObject(e[i])&&this.isPlainObject(t[i])?this.deepExtend(e[i],t[i]):e[i]=t[i]);return e},throttle:function(e,t){var i=!1;return function(){i||(e.apply(this,arguments),i=!0,setTimeout(function(){i=!1},t))}},hash:function(e){var t,i,n,o=0;if(0===e.length)return o;for(t=0,n=e.length;t<n;++t)i=e.charCodeAt(t),o=(o<<5)-o+i,o|=0;return o},normaliseHex:function(e){return"#"==e[0]&&(e=e.substr(1)),3==e.length&&(e=e[0]+e[0]+e[1]+e[1]+e[2]+e[2]),e},getContrast:function(e){e=this.normaliseHex(e);var t=parseInt(e.substr(0,2),16),i=parseInt(e.substr(2,2),16),n=parseInt(e.substr(4,2),16),o=(299*t+587*i+114*n)/1e3;return o>=128?"#000":"#fff"},getLuminance:function(e){var t=parseInt(this.normaliseHex(e),16),i=38,n=(t>>16)+i,o=(t>>8&255)+i,s=(255&t)+i,r=(16777216+65536*(n<255?n<1?0:n:255)+256*(o<255?o<1?0:o:255)+(s<255?s<1?0:s:255)).toString(16).slice(1);return"#"+r},isMobile:function(){return/Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent)},isPlainObject:function(e){return"object"==typeof e&&null!==e&&e.constructor==Object}};
4055e.status={deny:"deny",allow:"allow",dismiss:"dismiss"},e.transitionEnd=function(){var e=document.createElement("div"),t={t:"transitionend",OT:"oTransitionEnd",msT:"MSTransitionEnd",MozT:"transitionend",WebkitT:"webkitTransitionEnd"};for(var i in t)if(t.hasOwnProperty(i)&&"undefined"!=typeof e.style[i+"ransition"])return t[i];return""}(),e.hasTransition=!!e.transitionEnd;var i=Object.keys(e.status).map(t.escapeRegExp);e.customStyles={},e.Popup=function(){function n(){this.initialise.apply(this,arguments)}function o(e){this.openingTimeout=null,t.removeClass(e,"cc-invisible")}function s(t){t.style.display="none",t.removeEventListener(e.transitionEnd,this.afterTransition),this.afterTransition=null}function r(){var t=this.options.onInitialise.bind(this);if(!window.navigator.cookieEnabled)return t(e.status.deny),!0;if(window.CookiesOK||window.navigator.CookiesOK)return t(e.status.allow),!0;var i=Object.keys(e.status),n=this.getStatus(),o=i.indexOf(n)>=0;return o&&t(n),o}function a(){var e=this.options.position.split("-"),t=[];return e.forEach(function(e){t.push("cc-"+e)}),t}function c(){var e=this.options,i="top"==e.position||"bottom"==e.position?"banner":"floating";t.isMobile()&&(i="floating");var n=["cc-"+i,"cc-type-"+e.type,"cc-theme-"+e.theme];e["static"]&&n.push("cc-static"),n.push.apply(n,a.call(this));p.call(this,this.options.palette);return this.customStyleSelector&&n.push(this.customStyleSelector),n}function l(){var e={},i=this.options;i.showLink||(i.elements.link="",i.elements.messagelink=i.elements.message),Object.keys(i.elements).forEach(function(n){e[n]=t.interpolateString(i.elements[n],function(e){var t=i.content[e];return e&&"string"==typeof t&&t.length?t:""})});var n=i.compliance[i.type];n||(n=i.compliance.info),e.compliance=t.interpolateString(n,function(t){return e[t]});var o=i.layouts[i.layout];return o||(o=i.layouts.basic),t.interpolateString(o,function(t){return e[t]})}function u(i){var n=this.options,o=document.createElement("div"),s=n.container&&1===n.container.nodeType?n.container:document.body;o.innerHTML=i;var r=o.children[0];return r.style.display="none",t.hasClass(r,"cc-window")&&e.hasTransition&&t.addClass(r,"cc-invisible"),this.onButtonClick=h.bind(this),r.addEventListener("click",this.onButtonClick),n.autoAttach&&(s.firstChild?s.insertBefore(r,s.firstChild):s.appendChild(r)),r}function h(n){var o=n.target;if(t.hasClass(o,"cc-btn")){var s=o.className.match(new RegExp("\\bcc-("+i.join("|")+")\\b")),r=s&&s[1]||!1;r&&(this.setStatus(r),this.close(!0))}t.hasClass(o,"cc-close")&&(this.setStatus(e.status.dismiss),this.close(!0)),t.hasClass(o,"cc-revoke")&&this.revokeChoice()}function p(e){var i=t.hash(JSON.stringify(e)),n="cc-color-override-"+i,o=t.isPlainObject(e);return this.customStyleSelector=o?n:null,o&&d(i,e,"."+n),o}function d(i,n,o){if(e.customStyles[i])return void++e.customStyles[i].references;var s={},r=n.popup,a=n.button,c=n.highlight;r&&(r.text=r.text?r.text:t.getContrast(r.background),r.link=r.link?r.link:r.text,s[o+".cc-window"]=["color: "+r.text,"background-color: "+r.background],s[o+".cc-revoke"]=["color: "+r.text,"background-color: "+r.background],s[o+" .cc-link,"+o+" .cc-link:active,"+o+" .cc-link:visited"]=["color: "+r.link],a&&(a.text=a.text?a.text:t.getContrast(a.background),a.border=a.border?a.border:"transparent",s[o+" .cc-btn"]=["color: "+a.text,"border-color: "+a.border,"background-color: "+a.background],"transparent"!=a.background&&(s[o+" .cc-btn:hover, "+o+" .cc-btn:focus"]=["background-color: "+v(a.background)]),c?(c.text=c.text?c.text:t.getContrast(c.background),c.border=c.border?c.border:"transparent",s[o+" .cc-highlight .cc-btn:first-child"]=["color: "+c.text,"border-color: "+c.border,"background-color: "+c.background]):s[o+" .cc-highlight .cc-btn:first-child"]=["color: "+r.text]));var l=document.createElement("style");document.head.appendChild(l),e.customStyles[i]={references:1,element:l.sheet};var u=-1;for(var h in s)s.hasOwnProperty(h)&&l.sheet.insertRule(h+"{"+s[h].join(";")+"}",++u)}function v(e){return e=t.normaliseHex(e),"000000"==e?"#222":t.getLuminance(e)}function f(i){if(t.isPlainObject(i)){var n=t.hash(JSON.stringify(i)),o=e.customStyles[n];if(o&&!--o.references){var s=o.element.ownerNode;s&&s.parentNode&&s.parentNode.removeChild(s),e.customStyles[n]=null}}}function m(e,t){for(var i=0,n=e.length;i<n;++i){var o=e[i];if(o instanceof RegExp&&o.test(t)||"string"==typeof o&&o.length&&o===t)return!0}return!1}function b(){var t=this.setStatus.bind(this),i=this.options.dismissOnTimeout;"number"==typeof i&&i>
4055=0&&(this.dismissTimeout=window.setTimeout(function(){t(e.status.dismiss)},Math.floor(i)));var n=this.options.dismissOnScroll;if("number"==typeof n&&n>=0){var o=function(i){window.pageYOffset>Math.floor(n)&&(t(e.status.dismiss),window.removeEventListener("scroll",o),this.onWindowScroll=null)};this.onWindowScroll=o,window.addEventListener("scroll",o)}}function y(){if("info"!=this.options.type&&(this.options.revokable=!0),t.isMobile()&&(this.options.animateRevokable=!1),this.options.revokable){var e=a.call(this);this.options.animateRevokable&&e.push("cc-animate"),this.customStyleSelector&&e.push(this.customStyleSelector);var i=this.options.revokeBtn.replace("{{classes}}",e.join(" "));this.revokeBtn=u.call(this,i);var n=this.revokeBtn;if(this.options.animateRevokable){var o=t.throttle(function(e){var i=!1,o=20,s=window.innerHeight-20;t.hasClass(n,"cc-top")&&e.clientY<o&&(i=!0),t.hasClass(n,"cc-bottom")&&e.clientY>s&&(i=!0),i?t.hasClass(n,"cc-active")||t.addClass(n,"cc-active"):t.hasClass(n,"cc-active")&&t.removeClass(n,"cc-active")},200);this.onMouseMove=o,window.addEventListener("mousemove",o)}}}var g={enabled:!0,container:null,cookie:{name:"cookieconsent_status",path:"/",domain:"",expiryDays:365},onPopupOpen:function(){},onPopupClose:function(){},onInitialise:function(e){},onStatusChange:function(e,t){},onRevokeChoice:function(){},content:{header:"Cookies used on the website!",message:"This website uses cookies to ensure you get the best experience on our website.",dismiss:"Got it!",allow:"Allow cookies",deny:"Decline",link:"Learn more",href:"http://cookie
4055sandyou.com",close:"❌"},elements:{header:'<span class="cc-header">{{header}}</span> ',message:'<span id="cookieconsent:desc" class="cc-message">{{message}}</span>',messagelink:'<span id="cookieconsent:desc" class="cc-message">{{message}} <a aria-label="learn more about cookies" role=button tabindex="0" class="cc-link" href="{{href}}" target="_blank">{{link}}</a></span>',dismiss:'<a aria-label="dismiss cookie message" role=button tabindex="0" class="cc-btn cc-dismiss">{{dismiss}}</a>',allow:'<a aria-label="allow cookies" role=button tabindex="0" class="cc-btn cc-allow">{{allow}}</a>',deny:'<a aria-label="deny cookies" role=button tabindex="0" class="cc-btn cc-deny">{{deny}}</a>',link:'<a aria-label="learn more about cookies" role=button tabindex="0" class="cc-link" href="{{href}}" target="_blank">{{link}}</a>',close:'<span aria-label="dismiss cookie message" role=button tabindex="0" class="cc-close">{{close}}</span>'},window:'<div role="dialog" aria-live="polite" aria-label="cookieconsent" aria-describedby="cookieconsent:desc" class="cc-window {{classes}}"><!--googleoff: all-->{{children}}<!--googleon: all--></div>',revokeBtn:'<div class="cc-revoke {{classes}}">Cookie Policy</div>',compliance:{info:'<div class="cc-compliance">{{dismiss}}</div>',"opt-in":'<div class="cc-compliance cc-highlight">{{dismiss}}{{allow}}</div>',"opt-out":'<div class="cc-compliance cc-highlight">{{deny}}{{dismiss}}</div>'},type:"info",layouts:{basic:"{{messagelink}}{{compliance}}","basic-close":"{{messagelink}}{{compliance}}{{close}}","basic-header":"{{header}}{{message}}{{link}}{{compliance}}"},layout:"basic",position:"bottom",theme:"block","static":!1,palette:null,revokable:!1,animateRevokable:!0,showLink:!0,dismissOnScroll:!1,dismissOnTimeout:!1,autoOpen:!0,autoAttach:!0,whitelistPage:[],blacklistPage:[],overrideHTML:null};return n.prototype.initialise=function(e){this.options&&this.destroy(),t.deepExtend(this.options={},g),t.isPlainObject(e)&&t.deepExtend(this.options,e),r.call(this)&&(this.options.enabled=!1),m(this.options.blacklistPage,location.pathname)&&(this.options.enabled=!1),m(this.options.whitelistPage,location.pathname)&&(this.options.enabled=!0);var i=this.options.window.replace("{{classes}}",c.call(this).join(" ")).replace("{{children}}",l.call(this)),n=this.options.overrideHTML;if("string"==typeof n&&n.length&&(i=n),this.options["static"]){var o=u.call(this,'<div class="cc-grower">'+i+"</div>");o.style.display="",this.element=o.firstChild,this.element.style.display="none",t.addClass(this.element,"cc-invisible")}else this.element=u.call(this,i);b.call(this),y.call(this),this.options.autoOpen&&this.autoOpen()},n.prototype.destroy=function(){this.onButtonClick&&this.element&&(this.element.removeEventListener("click",this.onButtonClick),this.onButtonClick=null),this.dismissTimeout&&(clearTimeout(this.dismissTimeout),this.dismissTimeout=null),this.onWindowScroll&&(window.removeEventListener("scroll",this.onWindowScroll),this.onWindowScroll=null),this.onMouseMove&&(window.removeEventListener("mousemove",this.onMouseMove),this.onMouseMove=null),this.element&&this.element.parentNode&&this.element.parentNode.removeChild(this.element),this.element=null,this.revokeBtn&&this.revokeBtn.parentNode&&this.revokeBtn.parentNode.removeChild(this.revokeBtn),this.revokeBtn=null,f(this.options.palette),this.options=null},n.prototype.open=function(t){if(this.element)return this.isOpen()||(e.hasTransition?this.fadeIn():this.element.style.display="",this.options.revokable&&this.toggleRevokeButton(),this.options.onPopupOpen.call(this)),this},n.prototype.close=function(t){if(this.element)return this.isOpen()&&(e.hasTransition?this.fadeOut():this.element.style.display="none",t&&this.options.revokable&&this.toggleRevokeButton(!0),this.options.onPopupClose.call(this)),this},n.prototype.fadeIn=function(){var i=this.element;if(e.hasTransition&&i&&(this.afterTransition&&s.call(this,i),t.hasClass(i,"cc-invisible"))){if(i.style.display="",this.options["static"]){var n=this.element.clientHeight;this.element.parentNode.style.maxHeight=n+"px"}var r=20;this.openingTimeout=setTimeout(o.bind(this,i),r)}},n.prototype.fadeOut=function(){var i=this.element;e.hasTransition&&i&&(this.openingTimeout&&(clearTimeout(this.openingTimeout),o.bind(this,i)),t.hasClass(i,"cc-invisible")||(this.options["static"]&&(this.element.parentNode.style.maxHeight=""),this.afterTransition=s.bind(this,i),i.addEventListener(e.transitionEnd,this.afterTransition),t.addClass(i,"cc-invisible")))},n.prototype.isOpen=function(){return this.element&&""==this.element.style.display&&(!e.hasTransition||!t.hasClass(this.element,"cc-invisible"))},n.prototype.toggleRevokeButton=function(e){this.revokeBtn&&(this.revokeBtn.style.display=e?"":"none")},n.prototype.revokeChoice=function(e){this.options.enabled=!0,this.clearStatus(),this.options.onRevokeChoice.call(this),e||this.autoOpen()},n.prototype.hasAnswered=function(t){return Object.keys(e.status).indexOf(this.getStatus())>=0}
4055,n.prototype.hasConsented=function(t){var i=this.getStatus();return i==e.status.allow||i==e.status.dismiss},n.prototype.autoOpen=function(e){!this.hasAnswered()&&this.options.enabled&&this.open()},n.prototype.setStatus=function(i){var n=this.options.cookie,o=t.getCookie(n.name),s=Object.keys(e.status).indexOf(o)>=0;Object.keys(e.status).indexOf(i)>=0?(t.setCookie(n.name,i,n.expiryDays,n.domain,n.path),this.options.onStatusChange.call(this,i,s)):this.clearStatus()},n.prototype.getStatus=function(){return t.getCookie(this.options.cookie.name)},n.prototype.clearStatus=function(){var e=this.options.cookie;t.setCookie(e.name,"",-1,e.domain,e.path)},n}(),e.Location=function(){function e(e){t.deepExtend(this.options={},s),t.isPlainObject(e)&&t.deepExtend(this.options,e),this.currentServiceIndex=-1}function i(e,t,i){var n,o=document.createElement("script");o.type="text/"+(e.type||"javascript"),o.src=e.src||e,o.async=!1,o.onreadystatechange=o.onload=function(){var e=o.readyState;clearTimeout(n),t.done||e&&!/loaded|complete/.test(e)||(t.done=!0,t(),o.onreadystatechange=o.onload=null)},document.body.appendChild(o),n=setTimeout(function(){t.done=!0,t(),o.onreadystatechange=o.onload=null},i)}function n(e,t,i,n,o){var s=new(window.XMLHttpRequest||window.ActiveXObject)("MSXML2.XMLHTTP.3.0");if(s.open(n?"POST":"GET",e,1),s.setRequestHeader("X-Requested-With","XMLHttpRequest"),s.setRequestHeader("Content-type","application/x-www-form-urlencoded"),Array.isArray(o))for(var r=0,a=o.length;r<a;++r){var c=o[r].split(":",2);s.setRequestHeader(c[0].replace(/^\s+|\s+$/g,""),c[1].replace(/^\s+|\s+$/g,""))}"function"==typeof t&&(s.onreadystatechange=function(){s.readyState>3&&t(s)}),s.send(n)}function o(e){return new Error("Error ["+(e.code||"UNKNOWN")+"]: "+e.error)}var s={timeout:5e3,services:["freegeoip","ipinfo","maxmind"],serviceDefinitions:{freegeoip:function(){return{url:"//freegeoip.net/json/?callback={callback}",isScript:!0,callback:function(e,t){try{var i=JSON.parse(t);return i.error?o(i):{code:i.country_code}}catch(n){return o({error:"Invalid response ("+n+")"})}}}},ipinfo:function(){return{url:"//ipinfo.io",headers:["Accept: application/json"],callback:function(e,t){try{var i=JSON.parse(t);return i.error?o(i):{code:i.country}}catch(n){return o({error:"Invalid response ("+n+")"})}}}},ipinfodb:function(e){return{url:"//api.ipinfodb.com/v3/ip-country/?key={api_key}&format=json&callback={callback}",isScript:!0,callback:function(e,t){try{var i=JSON.parse(t);return"ERROR"==i.statusCode?o({error:i.statusMessage}):{code:i.countryCode}}catch(n){return o({error:"Invalid response ("+n+")"})}}}},maxmind:function(){return{url:"//js.maxmind.com/js/apis/geoip2/v2.1/geoip2.js",isScript:!0,callback:function(e){return window.geoip2?void geoip2.country(function(t){try{e({code:t.country.iso_code})}catch(i){e(o(i))}},function(t){e(o(t))}):void e(new Error("Unexpected response format. The downloaded script should have exported `geoip2` to the global scope"))}}}}};return e.prototype.getNextService=function(){var e;do e=this.getServiceByIdx(++this.currentServiceIndex);while(this.currentServiceIndex<this.options.services.length&&!e);return e},e.prototype.getServiceByIdx=function(e){var i=this.options.services[e];if("function"==typeof i){var n=i();return n.name&&t.deepExtend(n,this.options.serviceDefinitions[n.name](n)),n}return"string"==typeof i?this.options.serviceDefinitions[i]():t.isPlainObject(i)?this.options.serviceDefinitions[i.name](i):null},e.prototype.locate=function(e,t){var i=this.getNextService();return i?(this.callbackComplete=e,this.callbackError=t,void this.runService(i,this.runNextServiceOnError.bind(this))):void t(new Error("No services to run"))},e.prototype.setupUrl=function(e){var t=this.getCurrentServiceOpts();return e.url.replace(/\{(.*?)\}/g,function(i,n){if("callback"===n){var o="callback"+Date.now();return window[o]=function(t){e.__JSONP_DATA=JSON.stringify(t)},o}if(n in t.interpolateUrl)return t.interpolateUrl[n]})},e.prototype.runService=function(e,t){var o=this;if(e&&e.url&&e.callback){var s=e.isScript?i:n,r=this.setupUrl(e);s(r,function(i){var n=i?i.responseText:"";e.__JSONP_DATA&&(n=e.__JSONP_DATA,delete e.__JSONP_DATA),o.runServiceCallback.call(o,t,e,n)},this.options.timeout,e.data,e.headers)}},e.prototype.runServiceCallback=function(e,t,i){var n=this,o=function(t){s||n.onServiceResult.call(n,e,t)},s=t.callback(o,i);s&&this.onServiceResult.call(this,e,s)},e.prototype.onServiceResult=function(e,t){t instanceof Error||t&&t.error?e.call(this,t,null):e.call(this,null,t)},e.prototype.runNextServiceOnError=function(e,t){if(e){this.logError(e);var i=this.getNextService();i?this.runService(i,this.runNextServiceOnError.bind(this)):this.completeService.call(this,this.callbackError,new Error("All services failed"))}else this.completeService.call(this,this.callbackComplete,t)},e.prototype.getCurrentServiceOpts=function(){var e=this.options.services[this.currentServiceIndex];return"string"==typeof e?{name:e}
4055:"function"==typeof e?e():t.isPlainObject(e)?e:{}},e.prototype.completeService=function(e,t){this.currentServiceIndex=-1,e&&e(t)},e.prototype.logError=function(e){var t=this.currentServiceIndex,i=this.getServiceByIdx(t);console.error("The service["+t+"] ("+i.url+") responded with the following error",e)},e}(),e.Law=function(){function e(e){this.initialise.apply(this,arguments)}var i={regionalLaw:!0,hasLaw:["AT","BE","BG","HR","CZ","CY","DK","EE","FI","FR","DE","EL","HU","IE","IT","LV","LT","LU","MT","NL","PL","PT","SK","SI","ES","SE","GB","UK"],revokable:["HR","CY","DK","EE","FR","DE","LV","LT","NL","PT","ES"],explicitAction:["HR","IT","ES"]};return e.prototype.initialise=function(e){t.deepExtend(this.options={},i),t.isPlainObject(e)&&t.deepExtend(this.options,e)},e.prototype.get=function(e){var t=this.options;return{hasLaw:t.hasLaw.indexOf(e)>=0,revokable:t.revokable.indexOf(e)>=0,explicitAction:t.explicitAction.indexOf(e)>=0}},e.prototype.applyLaw=function(e,t){var i=this.get(t);return i.hasLaw||(e.enabled=!1),this.options.regionalLaw&&(i.revokable&&(e.revokable=!0),i.explicitAction&&(e.dismissOnScroll=!1,e.dismissOnTimeout=!1)),e},e}(),e.initialise=function(t,i,n){var o=new e.Law(t.law);i||(i=function(){}),n||(n=function(){}),e.getCountryCode(t,function(n){delete t.law,delete t.location,n.code&&(t=o.applyLaw(t,n.code)),i(new e.Popup(t))},function(i){delete t.law,delete t.location,n(i,new e.Popup(t))})},e.getCountryCode=function(t,i,n){if(t.law&&t.law.countryCode)return void i({code:t.law.countryCode});if(t.location){var o=new e.Location(t.location);return void o.locate(function(e){i(e||{})},n)}i({})},e.utils=t,e.hasInitialised=!0,window.cookieconsent=e}}(window.cookieconsent||{}); 4056/*! 4057 * @preserve 4058 * 4059 * Readmore.js jQuery plugin 4060 * Author: @jed_foster 4061 * Project home: http://jedfoster.github.io/Readmore.js 4062 * Licensed under the MIT license 4063 * 4064 * Debounce function from http://davidwalsh.name/javascript-debounce-function 4065 */!(function (t) { 4066 "function" == typeof define && define.amd ? define(["jquery"], t) : "object" == typeof exports ? (module.exports = t(require("jquery"))) : t(jQuery); 4067})(function (t) { 4068 "use strict"; 4069 function e(t, e, i) { 4070 var o; 4071 return function () { 4072 var n = this, 4073 a = arguments, 4074 s = function () { 4075 (o = null), i || t.apply(n, a); 4076 }, 4077 r = i && !o; 4078 clearTimeout(o), (o = setTimeout(s, e)), r && t.apply(n, a); 4079 }; 4080 } 4081 function i(t) { 4082 var e = ++h; 4083 return String(null == t ? "rmjs-" : t) + e; 4084 } 4085 function o(t) { 4086 var e = t.clone().css({ height: "auto", width: t.width(), maxHeight: "none", overflow: "hidden" }).insertAfter(t), 4087 i = e.outerHeight(), 4088 o = parseInt( 4089 e 4090 .css({ maxHeight: "" }) 4091 .css("max-height") 4092 .replace(/[^-\d\.]/g, ""), 4093 10 4094 ), 4095 n = t.data("defaultHeight"); 4096 e.remove(); 4097 var a = o || t.data("collapsedHeight") || n; 4098 t.data({ expandedHeight: i, maxHeight: o, collapsedHeight: a }).css({ maxHeight: "none" }); 4099 } 4100 function n(t) { 4101 if (!d[t.selector]) { 4102 var e = " "; 4103 t.embedCSS && "" !== t.blockCSS && (e += t.selector + " + [data-readmore-toggle], " + t.selector + "[data-readmore]{" + t.blockCSS + "}"), 4104 (e += t.selector + "[data-readmore]{transition: height " + t.speed + "ms;overflow: hidden;}"), 4105 (function (t, e) { 4106 var i = t.createElement("style"); 4107 (i.type = "text/css"), i.styleSheet ? (i.styleSheet.cssText = e) : i.appendChild(t.createTextNode(e)), t.getElementsByTagName("head")[0].appendChild(i); 4108 })(document, e), 4109 (d[t.selector] = !0); 4110 } 4111 } 4112 function a(e, i) { 4113 (this.element = e), 4114 (this.options = t.extend({}, r, i)), 4115 n(this.options), 4116 (this._defaults = r), 4117 (this._name = s), 4118 this.init(), 4119 window.addEventListener ? (window.addEventListener("load", c), window.addEventListener("resize", c)) : (window.attachEvent("load", c), window.attachEvent("resize", c)); 4120 } 4121 var s = "readmore", 4122 r = { 4123 speed: 100, 4124 collapsedHeight: 200, 4125 heightMargin: 16, 4126 moreLink: '<a href="#">Read More</a>', 4127 lessLink: '<a href="#">Close</a>', 4128 embedCSS: !0, 4129 blockCSS: "display: block; width: 100%;", 4130 startOpen: !1, 4131 blockProcessed: function () {}, 4132 beforeToggle: function () {}, 4133 afterToggle: function () {}, 4134 }, 4135 d = {}, 4136 h = 0, 4137 c = e(function () { 4138 }, 100); 4139 (a.prototype = { 4140 init: function () { 4141 var e = t(this.element); 4142 e.data({ defaultHeight: this.options.collapsedHeight, heightMargin: this.options.heightMargin }), o(e); 4143 var n = e.data("collapsedHeight"), 4144 a = e.data("heightMargin"); 4145 if (e.outerHeight(!0) <= n + a) return this.options.blockProcessed && "function" == typeof this.options.blockProcessed && this.options.blockProcessed(e, !1), !0; 4146 var s = e.attr("id") || i(), 4147 r = this.options.startOpen ? this.options.lessLink : this.options.moreLink; 4148 e.attr({ "data-readmore": "", "aria-expanded": this.options.startOpen, id: s }), 4149 e.after( 4150 t(r) 4151 .on( 4152 "click", 4153 (function (t) { 4154 return function (i) { 4155 t.toggle(this, e[0], i); 4156 }; 4157 })(this) 4158 ) 4159 .attr({ "data-readmore-toggle": s, "aria-controls": s }) 4160 ), 4161 this.options.startOpen || e.css({ height: n }), 4162 this.options.blockProcessed && "function" == typeof this.options.blockProcessed && this.options.blockProcessed(e, !0); 4163 }, 4164 toggle: function (e, i, o) { 4165 o && o.preventDefault(), e || (e = t('[aria-controls="' + this.element.i
4165d + '"]')[0]), i || (i = this.element); 4166 var n = t(i), 4167 a = "", 4168 s = "", 4169 r = !1, 4170 d = n.data("collapsedHeight"); 4171 n.height() <= d ? ((a = n.data("expandedHeight") + "px"), (s = "lessLink"), (r = !0)) : ((a = d), (s = "moreLink")), 4172 this.options.beforeToggle && "function" == typeof this.options.beforeToggle && this.options.beforeToggle(e, n, !r), 4173 n.css({ height: a }), 4174 n.on( 4175 "transitionend", 4176 (function (i) { 4177 return function () { 4178 i.options.afterToggle && "function" == typeof i.options.afterToggle && i.options.afterToggle(e, n, r), t(this).attr({ "aria-expanded": r }).off("transitionend"); 4179 }; 4180 })(this) 4181 ), 4182 t(e).replaceWith( 4183 t(this.options[s]) 4184 .on( 4185 "click", 4186 (function (t) { 4187 return function (e) { 4188 t.toggle(this, i, e); 4189 }; 4190 })(this) 4191 ) 4192 .attr({ "data-readmore-toggle": n.attr("id"), "aria-controls": n.attr("id") }) 4193 ); 4194 }, 4195 destroy: function () { 4196 t(this.element).each(function () { 4197 var e = t(this); 4198 e.attr({ "data-readmore": null, "aria-expanded": null }).css({ maxHeight: "", height: "" }).next("[data-readmore-toggle]").remove(), e.removeData(); 4199 }); 4200 }, 4201 }), 4202 (t.fn.readmore = function (e) { 4203 return false; 4204 var i = arguments, 4205 o = this.selector; 4206 return ( 4207 (e = e || {}), 4208 "object" == typeof e 4209 ? this.each(function () { 4210 if (t.data(this, "plugin_" + s)) { 4211 var i = t.data(this, "plugin_" + s); 4212 i.destroy.apply(i); 4213 } 4214 (e.selector = o), t.data(this, "plugin_" + s, new a(this, e)); 4215 }) 4216 : "string" == typeof e && "_" !== e[0] && "init" !== e 4217 ? this.each(function () { 4218 var o = t.data(this, "plugin_" + s); 4219 o instanceof a && "function" == typeof o[e] && o[e].apply(o, Array.prototype.slice.call(i, 1)); 4220 }) 4221 : void 0 4222 ); 4223 }); 4224}); 4225 4226function FileListItems (files) { 4227 var b = new ClipboardEvent("").clipboardData || new DataTransfer() 4228 for (var i = 0, len = files.length; i<len; i++) b.items.add(files[i]) 4229 return b.files 4230} 4231 4232/*! 4233 * In Viewport 4234 */ 4235!function(e,n){"object"==typeof exports&&"undefined"!=typeof module?n(require("jquery")):"function"==typeof define&&define.amd?define(["jquery"],n):n(e.jQuery)}(this,function(e){"use strict";function n(n){var t=this;if(1===arguments.length&&"function"==typeof n&&(n=[n]),!(n instanceof Array))throw new SyntaxError("isInViewport: Argument(s) passed to .do/.run should be a function or an array of functions");return n.forEach(function(n){"function"!=typeof n?(console.warn("isInViewport: Argument(s) passed to .do/.run should be a function or an array of functions"),console.warn("isInViewport: Ignoring non-function values in array and moving on")):[].slice.call(t).forEach(function(t){return n.call(e(t))})}),this}function t(n){var t=e("<div></div>").css({width:"100%"});n.append(t);var o=n.width()-t.width();return t.remove(),o}function o(n,r){var i=n.getBoundingClientRect(),a=i.top,u=i.bottom,c=i.left,f=i.right,s=e.extend({tolerance:0,viewport:window},r),d=!1,l=s.viewport.jquery?s.viewport:e(s.viewport);l.length||(console.warn("isInViewport: The viewport selector you have provided matches no element on page."),console.warn("isInViewport: Defaulting to viewport as window"),l=e(window));var p=l.height(),w=l.width(),h=l[0].toString();if(l[0]!==window&&"[object Window]"!==h&&"[object DOMWindow]"!==h){var v=l[0].getBoundingClientRect();a-=v.top,u-=v.top,c-=v.left,f-=v.left,o.scrollBarWidth=o.scrollBarWidth||t(l),w-=o.scrollBarWidth}return s.tolerance=~~Math.round(parseFloat(s.tolerance)),s.tolerance<0&&(s.tolerance=p+s.tolerance),f<=0||c>=w?d:d=s.tolerance?a<=s.tolerance&&u>=s.tolerance:u>0&&a<=p}function r(n){if(n){var t=n.split(",");return 1===t.length&&isNaN(t[0])&&(t[1]=t[0],t[0]=void 0),{tolerance:t[0]?t[0].trim():void 0,viewport:t[1]?e(t[1].trim()):void 0}}return{}}e=e&&e.hasOwnProperty("default")?e.default:e,/** 4236 * @author Mudit Ameta 4237 * @license https://github.com/zeusdeux/isInViewport/blob/master/license.md MIT 4238 */ 4239e.extend(e.expr.pseudos||e.expr[":"],{"in-viewport":e.expr.createPseudo?e.expr.createPseudo(function(e){return function(n){return o(n,r(e))}}):function(e,n,t){return o(e,r(t[3]))}}),e.fn.isInViewport=function(e){return this.filter(function(n,t){return o(t,e)})},e.fn.run=n
vendor: 4 bytes, line 4239
4239});
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.