1var c_cache={},p_cache={},dle_poll_voted={},file_uploaders={},active_comments_editor=null;function reload(){$("#dle-captcha").html('<img src="'+dle_root+"index.php?controller=antibot&rndval="+Date.now()+'" width="160" height="80" alt="">')}function dle_change_sort(e,t){var o=new FormData(document.getElementById("news_set_sort"));return o.set("dlenewssortby",e),o.set("dledirection",t),o.set("user_hash",dle_login_hash),$.ajax({url:dle_root+"index.php?controller=ajax&mod=adminfunction&action=setsort",data:o,processData:!1,contentType:!1,type:"POST",dataType:"json",success:function(){location.reload(!0)}}),!1}function doPoll(e,t){var o=document.getElementById("dlepollform_"+t),i=o.status.value,n="";if(!dle_poll_voted[t]){if("results"!=e&&1!=i){for(var a=0;a<o.elements.length;a++){var d=o.elements[a];if("radio"==d.type&&1==d.checked){n=d.value;break}"checkbox"==d.type&&1==d.checked&&(n=n+d.value+" ")}if("vote"==e&&""==n)return;dle_poll_voted[t]=!0}else i=1,o.status.value=1;1==i&&"vote"==e&&(i=0,o.status.value=0,e="list"),ShowLoading(""),$.post(dle_root+"index.php?controller=ajax&mod=poll",{news_id:t,action:e,answer:n,dle_skin:dle_skin,user_hash:dle_login_hash},(function(e){HideLoading(""),$("#dle-poll-list-"+t).fadeOut(500,(function(){$(this).html(e),$(this).fadeIn(500)}))}))}}function IPMenu(e,t,o,i){var n=[];return n[0]='<a href="https://www.nic.ru/whois/?searchWord='+e+'" target="_blank">'+t+"</a>",n[1]='<a href="'+dle_root+dle_admin+"?mod=iptools&ip="+e+'" target="_blank">'+o+"</a>",n[2]='<a href="'+dle_root+dle_admin+"?mod=blockip&ip="+e+'" target="_blank">'+i+"</a>",n}function ajax_save_for_edit(e,t){tinyMCE.triggerSave();var o=new FormData($("#ajaxnews"+e)[0]);return o.append("id",e),o.append("field",t),o.append("action","save"),o.append("user_hash",dle_login_hash),console.log(e),ShowLoading(""),$.ajax({url:dle_root+"index.php?controller=ajax&mod=editnews",data:o,processData:!1,contentType:!1,type:"POST",dataType:"html",success:function(e){HideLoading(""),"ok"!=e?DLEPush.error(e):($("#dlepopup-news-edit").dialog("close"),DLEconfirm(dle_save_ok,dle_confirm,(function(){location.reload(!0)})))}}),!1}function ajax_prep_for_edit(e,t){return Object.keys(c_cache).forEach((e=>{c_cache[e]&&ajax_cancel_comm_edit(e)})),ShowLoading(""),$.get(dle_root+"index.php?controller=ajax&mod=editnews",{id:e,field:t,action:"edit"},(function(o){HideLoading("");var i="none";$("#modal-overlay").remove(),$("body").prepend('<div id="modal-overlay" style="position: fixed; top: 0; left: 0; width: 100%; height: 100%; background: #000; z-index: 980; display:none;opacity: 0;"></div>'),$("#modal-overlay").show(),$("#modal-overlay").css("transition","opacity .5s ease"),$("#modal-overlay").css("opacity",".5");var n={};n[dle_act_lang[3]]=function(){$(this).dialog("close")},n[dle_act_lang[4]]=function(){ajax_save_for_edit(e,t)},$("#dlepopup-news-edit").remove(),$("body").prepend("<div id='dlepopup-news-edit' class='dlepopupnewsedit editor-style-light' title='"+menu_short+"' style='display:none'></div>"),$("#dlepopup-news-edit").html(o);var a=1024*getBaseSize(),d=800*getBaseSize(),l=$(document).height()>$(window).height();a>.95*$(window).width()&&(a=.95*$(window).width()),d>.95*$(window).height()&&(d=.95*$(window).height()),$("#dlepopup-news-edit").dialog({autoOpen:!0,width:a,height:d,buttons:n,resizable:!1,dialogClass:"modalfixed dle-popup-quickedit",classes:{"ui-dialog":"modalfixed dle-popup-quickedit"},dragStart:function(e,t){i=$(".modalfixed").css("box-shadow"),$(".modalfixed").css("box-shadow","none")},dragStop:function(e,t){$(".modalfixed").css("box-shadow",i)},open:function(){l&&$(window).width()>800&&$(window).height()>500&&($("body").css("overflow","hidden"),$("html").css("scrollbar-gutter","stable"))},close:function(){l&&($("body").css("overflow",""),$("html").css("scrollbar-gutter","")),"undefined"!=typeof tinymce&&tinymce.remove("#dlepopup-news-edit textarea.wysiwygeditor"),$(this).dialog("destroy"),$("#modal-overlay").css("transition","none"),$("#modal-overlay").fadeOut((function(){$("#modal-overlay").remove()}))}}),$(window).width()>800&&$(window).height()>500&&($(".modalfixed.ui-dialog").css({position:"fixed"}),$("#dlepopup-news-edit").dialog("option","position",{my:"center",at:"center",of:window})),$("#dlepopup-news-edit").css({overflow:"auto"}),$("#dlepopup-news-edit").css({"overflow-x":"hidden"}),setTimeout((function(){document.activeElement.blur()}),1)}),"html"),!1}function ajax_comm_edit(e,t){return Object.keys(c_cache).forEach((e=>{c_cache[e]&&ajax_cancel_comm_edit(e)})),c_cache[e]||(c_cache[e]=$("#comm-id-"+e).html()),$("#dlereplypopup").remove(),$("#dlefastreplyesponse").remove(),$("#dlefastreplycomments").remove(),ShowLoading(""),$.get(dle_root+"index.php?controller=ajax&mod=editcomments",{id:e,area:t,action:"edit"}
1,(function(t){HideLoading(""),active_comments_editor="comm-id-"+e,$("#comm-id-"+e).html(t),setTimeout((function(){scrollToCenterPosition("#comment-id-"+e)}),1)}),"html"),!1}function ajax_cancel_comm_edit(e){return active_comments_editor=null,dle_wysiwyg&&tinymce.remove("textarea.ajaxwysiwygeditor"),c_cache[e]&&$("#comm-id-"+e).html(c_cache[e]),delete c_cache[e],$('[data-commentsgallery="'+e+'"]').show(),!1}function ajax_save_comm_edit(e,t){if("selected"==$("#comments-image-uploader-edit").data("files"))return $("#comments-image-uploader-edit").on("complete",(function(o,i){HideLoading(""),$("#comments-image-uploader-edit").data("files","uploaded"),ajax_save_comm_edit(e,t)})),$("#comments-image-uploader-edit").plupload("start"),!1;dle_wysiwyg&&tinyMCE.triggerSave();var o=$("#dleeditcomments"+e).val();if($("#c_edit_autor"+e).val())var i=$("#c_edit_autor"+e).val();else i="";return ShowLoading(""),$.post(dle_root+"index.php?controller=ajax&mod=editcomments",{id:e,name:i,comm_txt:o,area:t,action:"save",user_hash:dle_login_hash},(function(t){HideLoading(""),t.success?(dle_wysiwyg&&tinymce.remove("textarea.ajaxwysiwygeditor"),delete c_cache[e],$("#comm-id-"+e).html(t.content),scrollToCenterPosition("#comment-id-"+e),active_comments_editor=null):t.error&&DLEPush.error(t.message),$('[data-commentsgallery="'+e+'"]').show()}),"json"),!1}function DeleteComments(e,t){DLEconfirmDelete(dle_del_agree,dle_confirm,(function(){ShowLoading(""),$.get(dle_root+"index.php?controller=ajax&mod=deletecomments",{id:e,dle_allow_hash:t},(function(e){if(HideLoading(""),e=parseInt(e),!isNaN(e)){var t="#comment-id-"+e;"1"==dle_tree_comm&&(t="#comments-tree-item-"+e),scrollToCenterPosition(t,(function(){$(t).slideUp(300)}))}}))}))}function MarkSpam(e,t){DLEconfirm(dle_spam_agree,dle_confirm,(function(){ShowLoading(""),$.get(dle_root+"index.php?controller=ajax&mod=adminfunction",{id:e,action:"commentsspam",user_hash:t},(function(e){HideLoading(""),"error"!=e&&location.reload(!0)}))}))}function doFavorites(e,t,o,i){return ShowLoading(""),$.get(dle_root+"index.php?controller=ajax&mod=favorites",{fav_id:e,action:t,module:i,skin:dle_skin,alert:o,user_hash:dle_login_hash},(function(t){HideLoading(""),t.success?(o?DLEPush.info(t.content):$('[data-fav-id="'+e+'"]').html(t.content),t.modify&&t.modify.del_fav_html?($('[data-favorites-add="'+e+'"]').next().remove(),$('[data-favorites-del="'+e+'"]').after(t.modify.del_fav_html)):t.modify&&t.modify.add_fav_html&&($('[data-favorites-del="'+e+'"]').next().remove(),$('[data-favorites-add="'+e+'"]').after(t.modify.add_fav_html))):t.error&&DLEPush.error(t.content)}),"json"),!1}function CheckLogin(){var e=document.getElementById("name").value;return ShowLoading(""),$.post(dle_root+"index.php?controller=ajax&mod=registration",{name:e,user_hash:dle_login_hash},(function(e){HideLoading(""),e.success?DLEPush.info(e.message):DLEPush.error(e.message)}),"json"),!1}function doCalendar(e,t,o){ShowLoading(""),$.get(dle_root+"index.php?controller=ajax&mod=calendar",{month:e,year:t},(function(e){HideLoading(""),"left"==o?$("#calendar-layer").hide("slide",{direction:"left"},500,(function(){$("#calendar-layer").html(e).show("slide",{direction:"right"},500)})):$("#calendar-layer").hide("slide",{direction:"right"},500,(function(){$("#calendar-layer").html(e).show("slide",{direction:"left"},500)}))}))}function doRate(e,t){ShowLoading(""),$.get(dle_root+"index.php?controller=ajax&mod=rating",{go_rate:e,news_id:t,skin:dle_skin,user_hash:dle_login_hash},(function(e){if(HideLoading(""),e.success){var o=e.rating;o=(o=(o=o.replace(/</g,"<")).replace(/>/g,">")).replace(/&/g,"&"),$('[data-ratig-layer-id="'+t+'"]').html(o),$('[data-vote-num-id="'+t+'"]').html(e.votenum),$('[data-likes-id="'+t+'"]').html(e.likes),$('[data-dislikes-id="'+t+'"]').html(e.dislikes)}else e.error&&DLEPush.error(e.errorinfo)}),"json")}function doCommentsRate(e,t){ShowLoading(""),$.get(dle_root+"index.php?controller=ajax&mod=ratingcomments",{go_rate:e,c_id:t,skin:dle_skin,user_hash:dle_login_hash},(function(e){if(HideLoading(""),e.success){var o=e.rating;o=(o=(o=o.replace(/</g,"<")).replace(/>/g,">")).replace(/&
1/g,"&"),$('[data-comments-ratig-layer-id="'+t+'"]').html(o),$('[data-comments-vote-num-id="'+t+'"]').html(e.votenum),$('[data-comments-likes-id="'+t+'"]').html(e.likes),$('[data-comments-dislikes-id="'+t+'"]').html(e.dislikes)}else e.error&&DLEPush.error(e.errorinfo)}),"json")}function ajax_cancel_reply(){active_comments_editor=null,$("#dlefastreplycomments").slideUp(200),setTimeout((function(){dle_wysiwyg&&tinymce.remove("textarea.ajaxwysiwygeditor"),$("#dlefastreplyesponse").remove(),$("#dlefastreplycomments").remove()}),190)}function DLESendPM(e){var t={},o=800*getBaseSize();return o>.95*$(window).width()&&(o=.95*$(window).width()),$("#dlesendpmpopup").remove(),$("#dleprofilepopup").remove(),t[dle_act_lang[3]]=function(){$(this).dialog("close")},t[dle_p_send]=function(){dle_pm_wysiwyg&&tinyMCE.triggerSave();var e=$("#pm_subj").val(),o=$("#pm_text").val(),i=$("#pm_name").val(),n=$("#pm_question_answer").val(),a=$("#sec_code_pm").val(),d="";if(""==i)return DLEPush.error(dle_req_field[0]),!1;if(""==o)return DLEPush.error(dle_req_field[1]),!1;if(""==e)return DLEPush.error(dle_req_field[2]),!1;if("1"==dle_captcha_type)"undefined"!=typeof grecaptcha&&(d=grecaptcha.getResponse(recaptcha_widget));else if("2"==dle_captcha_type&&"undefined"!=typeof grecaptcha){if(""==(d=$("#pm-recaptcha-response").val())){var l=$("#pm-recaptcha-response").data("key");return grecaptcha.execute(l,{action:"personal_message"}).then((function(e){$("#pm-recaptcha-response").val(e),t[dle_p_send]()})),!1}}else"3"==dle_captcha_type?"undefined"!=typeof hcaptcha&&(d=hcaptcha.getResponse(recaptcha_widget)):"4"==dle_captcha_type?"undefined"!=typeof turnstile&&(d=turnstile.getResponse(recaptcha_widget)):"5"==dle_captcha_type&&void 0!==window.smartCaptcha&&(d=window.smartCaptcha.getResponse(recaptcha_widget));return a||(a=""),n||(n=""),ShowLoading(""),$.post(dle_root+"index.php?controller=ajax&mod=pm",{action:"send_pm",subj:e,comments:o,name:i,skin:dle_skin,sec_code:a,question_answer:n,g_recaptcha_response:d,user_hash:dle_login_hash},(function(e){if(HideLoading(""),e.success)$("#dlesendpmpopup").dialog("close"),$("#dlesendpmpopup").remove(),DLEPush.info(e.success);else if(e.error){if("2"==dle_captcha_type){if("undefined"!=typeof grecaptcha){var t=$("#pm-recaptcha-response").data("key");grecaptcha.execute(t,{action:"pm"}).then((function(e){$("#pm-recaptcha-response").val(e)}))}}else"4"==dle_captcha_type?"undefined"!=typeof turnstile&&turnstile.reset(recaptcha_widget):"5"==dle_captcha_type?void 0!==window.smartCaptcha&&window.smartCaptcha.reset(recaptcha_widget):"3"==dle_captcha_type?"undefined"!=typeof hcaptcha&&hcaptcha.reset(recaptcha_widget):"1"==dle_captcha_type&&"undefined"!=typeof grecaptcha&&grecaptcha.reset(recaptcha_widget);DLEPush.error(e.error)}}),"json"),!1},ShowLoading(""),$.get(dle_root+"index.php?controller=ajax&mod=pm",{name:e,action:"show_send",skin:dle_skin,user_hash:dle_login_hash},(function(e){HideLoading(""),$("body").append(e),$("#dlesendpmpopup").dialog({autoOpen:!0,width:o,resizable:!1,dialogClass:"modalfixed dle-popup-sendpm",classes:{"ui-dialog":"modalfixed dle-popup-sendpm"},buttons:t}),$(".modalfixed.ui-dialog").css({position:"fixed"}),$(".dle-popup-sendpm").css({cssText:"width:"+o+"px;max-height: none !important"}),$("#dlesendpmpopup").css({cssText:"height: auto !important"}),$("#dlesendpmpopup").dialog("option","position",{my:"center",at:"center",of:window})}),"html"),!1}function ajax_fast_reply(e,t,o){var i="";dle_wysiwyg&&(tinyMCE.triggerSave(),i="wysiwyg");var n=$("#comments"+e).val(),a=$("#name"+e).val(),d=$("#mail"+e).val(),l=$("#question_answer"+e).val(),s=$("#sec_code"+e).val(),r=$("#subscribe"+e+":checked").val(),c=$("#postid"+e).val(),p="";if(""==a)return DLEPush.error(dle_req_field[0]),!1;if(""==n)return DLEPush.error(dle_req_field[1]),!1;if("1"==dle_captcha_type)"undefined"!=typeof grecaptcha&&(p=grecaptcha.getResponse(recaptcha_widget));else if("2"==dle_captcha_type&&"undefined"!=typeof grecaptcha){if(""==(p=$("#comments-recaptcha-response"+e).val())){var m=$("#comments-recaptcha-response"+e).data("key");return grecaptcha.execute(m,{action:"comments"}).then((function(i){$("#comments-recaptcha-response"+e).val(i),ajax_fast_reply(e,t,o)})),!1}}else"3"==dle_captcha_type?"undefined"!=typeof hcaptcha&&(p=hcaptcha.getResponse(recaptcha_widget)):"4"==dle_captcha_type?"undefined"!=typeof turnstile&&(p=turnstile.getResponse(recaptcha_widget)):"5"==dle_captcha_type&&void 0!==window.smartCaptcha&&(p=window.smartCaptcha.getResponse(recaptcha_widget));return"selected"==$("#comments-image-uploader-reply").data("files")?($("#comments-image-uploader-reply").on("complete",(function(i,n){HideLoading(""),$("#comments-image-uploader-reply").data("files","uploaded"),ajax_fast_reply(e,t,o)})),$("#comments-image-uploader-reply").plupload("start"),!1):(r||(r=0),s||(s=""),l||(l=""),ShowLoading(""),$.post(dle_root+"index.php?controller=ajax&mod=addcomments",{post_id:c,parent:e,indent:t,comments:n,name:a,mail:d,editor_mode:i,skin:dle_skin,sec_code:s,question_answer:l,g_recaptcha_response:p,allow_subscribe:r,user_hash:dle_login_hash,needwrap:o},(function(e){if(HideLoading(""),e.error)$(e.content).insertBefore("#dlefastreplyesponse");else if(e.success)if(active_comments_editor=null,$("#comm-id-"+e.id).length){var t=$(e.content).find("#comm-id-"+e.id).html();
1$("#dlefastreplycomments").slideUp(200),setTimeout((function(){dle_wysiwyg&&tinymce.remove("textarea.ajaxwysiwygeditor"),$("#dlefastreplycomments").remove(),scrollToCenterPosition("#comment-id-"+e.id,(function(){$("#comm-id-"+e.id).fadeOut(300,(function(){$(this).html(t+"<script>"+e.scripts+"<\/script>"),$("#comm-id-"+e.id).fadeIn(300)}))}))}),200)}else{var o=$(e.content+"<script>"+e.scripts+"<\/script>").insertBefore("#dlefastreplyesponse");$("#dlefastreplycomments").slideUp(200),setTimeout((function(){dle_wysiwyg&&tinymce.remove("textarea.ajaxwysiwygeditor"),$("#dlefastreplycomments").remove(),scrollToCenterPosition("#dlefastreplyesponse",(function(){$("#comments-tree-item-"+e.id).length?$("#comments-tree-item-"+e.id).slideDown(300):o.slideDown(300)}))}),200)}}),"json"),!1)}function dle_reply(e,t,o){Object.keys(c_cache).forEach((e=>{c_cache[e]&&ajax_cancel_comm_edit(e)}));var i={},n="",a=0,d=800*getBaseSize();return d>.95*$(window).width()&&(d=.95*$(window).width()),$("#dlereplypopup").remove(),$("#dlefastreplyesponse").remove(),$("#dlefastreplycomments").remove(),$("#comment-id-"+e).next(".comments-tree-list").length?$("#comment-id-"+e).next(".comments-tree-list").append("<div id='dlefastreplyesponse'></div>"):($("<div id='dlefastreplyesponse'></div>").insertAfter("#comment-id-"+e),a=1),i[dle_act_lang[3]]=function(){dle_wysiwyg&&tinymce.remove("textarea.ajaxwysiwygeditor"),active_comments_editor=null,$(this).dialog("close")},i[dle_p_send]=function(){dle_wysiwyg&&(tinyMCE.triggerSave(),n="wysiwyg");var o=$("#comments"+e).val(),d=$("#name"+e).val(),l=$("#mail"+e).val(),s=$("#question_answer"+e).val(),r=$("#sec_code"+e).val(),c=$("#subscribe"+e+":checked").val(),p=$("#postid"+e).val(),m="";if(""==d)return DLEPush.error(dle_req_field[0]),!1;if(""==o)return DLEPush.error(dle_req_field[1]),!1;if("1"==dle_captcha_type)"undefined"!=typeof grecaptcha&&(m=grecaptcha.getResponse(recaptcha_widget));else if("2"==dle_captcha_type&&"undefined"!=typeof grecaptcha){if(""==(m=$("#comments-recaptcha-response"+e).val())){var u=$("#comments-recaptcha-response"+e).data("key");return grecaptcha.execute(u,{action:"comments"}).then((function(t){$("#comments-recaptcha-response"+e).val(t),i[dle_p_send]()})),!1}}else"3"==dle_captcha_type?"undefined"!=typeof hcaptcha&&(m=hcaptcha.getResponse(recaptcha_widget)):"4"==dle_captcha_type?"undefined"!=typeof turnstile&&(m=turnstile.getResponse(recaptcha_widget)):"5"==dle_captcha_type&&void 0!==window.smartCaptcha&&(m=window.smartCaptcha.getResponse(recaptcha_widget));return"selected"==$("#comments-image-uploader-reply").data("files")?($("#comments-image-uploader-reply").on("complete",(function(e,t){HideLoading(""),$("#comments-image-uploader-reply").data("files","uploaded"),i[dle_p_send]()})),$("#comments-image-uploader-reply").plupload("start"),!1):(c||(c=0),r||(r=""),s||(s=""),ShowLoading(""),$.post(dle_root+"index.php?controller=ajax&mod=addcomments",{post_id:p,parent:e,indent:t,comments:o,name:d,mail:l,editor_mode:n,skin:dle_skin,sec_code:r,question_answer:s,g_recaptcha_response:m,allow_subscribe:c,user_hash:dle_login_hash,needwrap:a},(function(e){if(HideLoading(""),e.error)$(e.content).insertBefore("#dlefastreplyesponse");else if(e.success)if(dle_wysiwyg&&tinymce.remove("textarea.ajaxwysiwygeditor"),active_comments_editor=null,$("#dlereplypopup").remove(),$("#comm-id-"+e.id).length){var t=$(e.content).find("#comm-id-"+e.id).html();$("#dlefastreplycomments").hide(),scrollToCenterPosition("#comment-id-"+e.id,(function(){$("#comm-id-"+e.id).fadeOut("slow",(function(){$(this).html(t+"<script>"+e.scripts+"<\/script>"),$("#comm-id-"+e.id).fadeIn("slow")}))}))}else{var o=$(e.content+"<script>"+e.scripts+"<\/script>").insertBefore("#dlefastreplyesponse");$("#dlefastreplycomments").hide(),scrollToCenterPosition("#dlefastreplyesponse",(function(){$("#comments-tree-item-"+e.id).length?$("#comments-tree-item-"+e.id).slideDown(300):o.slideDown(300)}))}}),"json"),!1)},ShowLoading(""),$.get(dle_root+"index.php?controller=ajax&mod=replycomments",{id:e,indent:t,skin:dle_skin,user_hash:dle_login_hash,needwrap:a},(function(t){HideLoading(""),active_comments_editor="dle-comments-form-"+e,"0"!=o?($("<div id='dlefastreplycomments'></div>").insertAfter("#comment-id-"+e),$("#dlefastreplycomments").html(t),setTimeout((function(){scrollToCenterPosition("#dlefastreplycomments")}),1)):($("body").append("<div id='dlereplypopup' title='"+dle_reply_title+"' style='display:none'></div>"),$("#dlereplypopup").html(t),$("#dlereplypopup").dialog({autoOpen:!0,width:d,resizable:!1,dialogClass:"modalfixed dle-popup-replycomments",classes:{"ui-dialog":"modalfixed dle-popup-replycomments"},buttons:i}),$(".modalfixed.ui-dialog").css({position:"fixed"}),$(".dle-popup-replycomments").css({cssText:"width:"+d+"px; max-height: none !important"}),$("#dlereplypopup").css({cssText:"height: auto !important"}),$("#dlereplypopup").dialog("option","position",{my:"center",at:"center",of:window}))}),"html"),!1}function ajax_pm_edit(e){return Object.keys(p_cache).forEach((e=>{p_cache[e]&&ajax_cancel_pm_edit(e)})),p_cache[e]||(p_cache[e]=$("#pm-id-"+e).html()),ShowLoading(""),$.get(dle_root+"index.php?controller=ajax&mod=pm",{id:e,action:"edit",user_hash:dle_login_hash},(function(t){HideLoading(""),active_comments_editor="pm-id-"+e,t.success?($("#pm-id-"+e).html(t.response),setTimeout((function(){scrollToCenterPosition("#pm-id-"+e)}),1)):t.error&&DLEPush.error(t.error)}),"json"),!1}function ajax_save_pm_edit(e){dle_pm_wysiwyg&&tinyMCE.triggerSave();var t=$("#dleeditpm"+e).val();return ShowLoading(""),$.post(dle_root+"index.php?controller=ajax&mod=pm",{id:e,message:t,action:"save_edit_pm",user_hash:dle_login_hash},(function(t){HideLoading(""),t.success?(delete p_cache[e],$("#pm-id-"+e).html(t.response),scrollToCenterPosition("#message-id-"+e),active_comments_editor=null):t.error&&DLEPush.error(t.error)}),"json"),!1}function ajax_cancel_pm_edit(e){return active_comments_editor=null,p_cache[e]&&$("#pm-id-"+e).html(p_cache[e]),delete p_cache[e],!1}
1function doSendPM(){Object.keys(p_cache).forEach((e=>{p_cache[e]&&ajax_cancel_pm_edit(e)}));var e=document.getElementById("dle-comments-form"),t=new FormData(e);return t.append("skin",dle_skin),ShowLoading(""),$.ajax({url:dle_root+"index.php?controller=ajax&mod=pm",data:t,processData:!1,contentType:!1,type:"POST",dataType:"json",success:function(t){HideLoading(""),t&&(t.success?t.content?(dle_pm_wysiwyg?tinyMCE.activeEditor.setContent(""):e.comments.value="",$(t.content).insertBefore("#dle-ajax-pm"),scrollToCenterPosition("#dle-ajax-pm",(function(){$("#blind-animation-"+t.id).slideDown(300)}))):t.text&&($("#dle-comments-form").html(t.text),scrollToCenterPosition("#dle-comments-form")):t.error&&(e.sec_code&&(e.sec_code.value="",reload()),"1"==dle_captcha_type?"undefined"!=typeof grecaptcha&&grecaptcha.reset():"3"==dle_captcha_type?"undefined"!=typeof hcaptcha&&hcaptcha.reset():"4"==dle_captcha_type?"undefined"!=typeof turnstile&&turnstile.reset():"5"==dle_captcha_type&&void 0!==window.smartCaptcha&&window.smartCaptcha.reset(),DLEPush.error(t.error)))}}),!1}function DeleteMessage(e,t,o){return DLEconfirmDelete(dle_del_agree,dle_confirm,(function(){ShowLoading(""),$.get(dle_root+"index.php?controller=ajax&mod=pm",{message_id:e,conversation_id:t,action:"del_pm",user_hash:o},(function(t){HideLoading(""),t.success?scrollToCenterPosition("#message-id-"+e,(function(){$("#message-id-"+e).slideUp(300)})):t.error&&DLEPush.error(t.error)}),"json")})),!1}function doAddComments(){var e=document.getElementById("dle-comments-form"),t="",o="",i="",n="",a="0",d="";return dle_wysiwyg&&(tinyMCE.triggerSave(),t="wysiwyg"),""==e.name.value?(DLEPush.error(dle_req_field[0]),!1):""==e.comments.value?(DLEPush.error(dle_req_field[1]),!1):(e.question_answer&&(o=e.question_answer.value),e.sec_code&&(i=e.sec_code.value),"1"==dle_captcha_type?"undefined"!=typeof grecaptcha&&(n=grecaptcha.getResponse()):"2"==dle_captcha_type?n=$("#g-recaptcha-response").val():"3"==dle_captcha_type?"undefined"!=typeof hcaptcha&&(n=hcaptcha.getResponse()):"4"==dle_captcha_type?"undefined"!=typeof turnstile&&(n=turnstile.getResponse()):"5"==dle_captcha_type&&void 0!==window.smartCaptcha&&(n=window.smartCaptcha.getResponse()),e.allow_subscribe&&1==e.allow_subscribe.checked&&(a="1"),e.mail&&(d=e.mail.value),ShowLoading(""),$.post(dle_root+"index.php?controller=ajax&mod=addcomments",{post_id:e.post_id.value,comments:e.comments.value,name:e.name.value,mail:d,editor_mode:t,skin:dle_skin,sec_code:i,question_answer:o,g_recaptcha_response:n,allow_subscribe:a,user_hash:dle_login_hash},(function(t){if(HideLoading(""),t.error)$("#dle-ajax-comments").append(t.content);else if(t.success){if($("#comm-id-"+t.id).length){var o=$(t.content).find("#comm-id-"+t.id).html();scrollToCenterPosition("#comment-id-"+t.id,(function(){$("#comm-id-"+t.id).fadeOut("slow",(function(){$(this).html(o+"<script>"+t.scripts+"<\/script>"),$("#comm-id-"+t.id).fadeIn("slow")}))}))}else $(t.content+"<script>"+t.scripts+"<\/script>").insertBefore("#dle-ajax-comments"),$("#comments-tree-item-"+t.id).length?node=$("#comments-tree-item-"+t.id):node=$("#blind-animation-"+t.id),scrollToCenterPosition("#dle-ajax-comments",(function(){$(node).slideDown(300)}));e.sec_code&&(e.sec_code.value="",reload()),"1"==dle_captcha_type?"undefined"!=typeof grecaptcha&&grecaptcha.reset():"3"==dle_captcha_type?"undefined"!=typeof hcaptcha&&hcaptcha.reset():"4"==dle_captcha_type?"undefined"!=typeof turnstile&&turnstile.reset():"5"==dle_captcha_type&&void 0!==window.smartCaptcha&&window.smartCaptcha.reset()}}),"json"),!1)}function isHistoryApiAvailable(){return!(!window.history||!history.pushState)}function CommentsPage(e,t,o){return isHistoryApiAvailable()&&!CommentsPage.navigation&&(CommentsPage.navigation={current:!1,pages:{},key:function(e){var t=document.createElement("a");return t.href=null==e?window.location.href:e,t.pathname+t.search}
1,shown:function(){var e=$(".dle-comments-navigation").find("span").not(".nav_ext").filter((function(){return!$(this).children().length&&/^[0-9]+$/.test($.trim($(this).text()))})).first();return!!e.length&&$.trim(e.text())},save:function(e,t,o){var i={cstart:String(e),news_id:String(t)};return this.current=i.cstart,this.pages[this.key(o)]=i,{dle_comments:i}},restore:function(){var e=window.history.state;(e=e&&e.dle_comments?e.dle_comments:this.pages[this.key()])&&e.cstart!==this.current&&CommentsPage(e.cstart,e.news_id)}},CommentsPage.navigation.current=CommentsPage.navigation.shown(),CommentsPage.navigation.current&&window.history.replaceState(CommentsPage.navigation.save(CommentsPage.navigation.current,t),"",window.location.href),$(window).on("popstate.dlecomments",(function(){CommentsPage.navigation.restore()}))),ShowLoading(""),$("html").css("scroll-behavior","smooth"),$.get(dle_root+"index.php?controller=ajax&mod=comments",{cstart:e,news_id:t,skin:dle_skin},(function(i){HideLoading(""),isNaN(e)||isNaN(t)||($("#dle-comm-link").off("click"),$("#dle-comm-link").on("click",(function(){return CommentsPage(e,t),!1}))),$("#dle-comments-list").html(i.comments),$(".dle-comments-navigation").html(i.navigation);var n=$("#dle-comments-list").find("[id^='comment-id-']").first();if(scrollToCenterPosition(n.length?n:"#dle-comments-list",null,1),isHistoryApiAvailable()){var a=CommentsPage.navigation.save(e,t,o);o?window.history.pushState(a,"",o):window.history.replaceState(a,"",window.location.href)}}),"json"),!1}function dle_copy_quote(e,t,o,i,n,a,d){if(dle_txt="",void 0===i)i="comments";if(window.getSelection?dle_txt=window.getSelection().toString():document.selection&&(dle_txt=document.selection.createRange().text.toString()),""!=dle_txt)if(!dle_wysiwyg&&"pm"!=i||!dle_pm_wysiwyg&&"pm"==i)dle_txt="[quote="+e+"]"+dle_txt+"[/quote]";else{var l=dle_txt.replace(/\n/g,"<br>");l=l.replace(/\r/g,""),dle_txt='<div class="quote_block noncontenteditable"><div class="title_quote" data-commenttime="'+t+'" data-commentuser="'+e+'"',void 0!==n&&void 0!==a&&(dle_txt+=' data-commentid="'+n+'" data-commentpostid="'+a+'"'),void 0!==d&&(d="1"==d?"0":"1",dle_txt+=' data-commentgast="'+d+'"'),dle_txt+=">"+o+'</div><div class="quote"><div class="quote_body contenteditable">'+l+"</div></div></div>"}}function dle_fastreply(e,t){if(null!==active_comments_editor&&document.getElementById(active_comments_editor))var o=$("#"+active_comments_editor).find("textarea"),i="#"+active_comments_editor;else{active_comments_editor=null;o=$("#dle-comments-form").find("textarea"),i=".dleaddcomments-editor"}$("html").css("scroll-behavior","smooth");var n="";return dle_wysiwyg?(n=t?'<span class="comments-user-profile noncontenteditable" data-username="'+encodeURI(e)+'" data-userurl="'+t+'">@'+e+"</span> ":"@"+e+", ",tinyMCE.execCommand("mceInsertContent",!1,n)):(o.val(o.val()+"@"+e+", "),setTimeout((function(){o.focus()}),500),i=null!==active_comments_editor?"#"+active_comments_editor:"#comments"),scrollToCenterPosition(i,null,1),!1}function dle_ins(e,t){if(void 0===t)t="comments";if($("html").css("scroll-behavior","smooth"),!document.getElementById("dle-comments-form"))return!1;if(null!==active_comments_editor&&document.getElementById(active_comments_editor))var o=$("#"+active_comments_editor).find("textarea"),i="#"+active_comments_editor;else{active_comments_editor=null;o=$("#dle-comments-form").find("textarea");if("pm"==t)i=".dlepm-editor";else i=".dleaddcomments-editor"}var n="";return""!=dle_txt?(!dle_wysiwyg&&"pm"!=t||!dle_pm_wysiwyg&&"pm"==t?(o.val(o.val()+dle_txt+"\n"),setTimeout((function(){o.focus()}),500),i=null!==active_comments_editor?"#"+active_comments_editor:"#comments"):(n=dle_txt,tinyMCE.execCommand("mceInsertContent",!1,n+"<p><br></p>")),scrollToCenterPosition(i,null,1)):(ShowLoading(""),$.get(dle_root+"index.php?controller=ajax&mod=quote",{id:e,mode:t,user_hash:dle_login_hash},(function(e){HideLoading(""),e=(e=(e=(e=(e=(e=(e=e.replace(/</g,"<")).replace(/>/g,">")).replace(/&/g,"&")).replace(/"/g,'"')).replace(/'/g,"'")).replace(/'/g,"'")).replace(/"/g,'"'),!dle_wysiwyg&&"pm"!=t||!dle_pm_wysiwyg&&"pm"==t?(o.val(o.val()+e+"\n"),setTimeout((function(){o.focus()}),500),i=null!==active_comments_editor?"#"+active_comments_editor:"#comments"):(n=e,tinyMCE.execCommand("mceInsertContent",!1,n+"<p><br></p>")),scrollToCenterPosition(i,null,1)}))),!1}function ShowOrHide(e){var t=$("#"+e),o=null,i=null;document.getElementById("image-"+e)&&(o=document.getElementById("image-"+e)),document.getElementById("svg-"+e)&&(i=document.getElementById("svg-"+e)),jQuery().lazyLoadXT&&$("#"+e+" *[data-src]").lazyLoadXT();var n=t.height()/200*500;n>500&&(n=500),n<200&&(n=200),"none"==t.css("display")?(t.slideDown(n),o&&(o.src=dle_root+"templates/"+dle_skin+"/dleimages/spoiler-minus.gif"),i&&$("#svg-"+e).attr("d","M2.582 13.891c-0.272 0.268-0.709 0.268-0.979 0s-0.271-0.701 0-0.969l7.908-7.83c0.27-0.268 0.707-0.268 0.979 0l7.908 7.83c0.27 0.268 0.27 0.701 0 0.969s-0.709 0.268-0.978 0l-7.42-7.141-7.418 7.141z")):(n>300&&(n=300),t.slideUp(n),o&&(o.src=dle_root+"templates/"+dle_skin+"/dleimages/spoiler-plus.gif"),i&&$("#svg-"+e).attr("d","M17.418 6.109c0.272-0.268 0.709-0.268 0.979 0s0.271 0.701 0 0.969l-7.908 7.83c-0.27 0.268-0.707 0.268-0.979 0l-7.908-7.83c-0.27-0.268-0.27-0.701 0-0.969s0.709-0.268 0.979 0l7.419 7.141 7.418-7.141z"))}function ckeck_uncheck_all(){for(var e=document.pmlist,t=0;t<e.elements.length;t++){var o=e.elements[t];"checkbox"==o.type&&(1==e.master_box.checked?o.checked=!1:o.checked=!0)}1==e.master_box.checked?e.master_box.checked=!1:e.master_box.checked=!0}
1function confirmDelete(e){DLEconfirmDelete(dle_del_agree,dle_confirm,(function(){document.location=e}))}function setNewField(e,t){e!=selField&&(fombj=t,selField=e)}function dle_news_delete(e){var t={},o=600*getBaseSize();o>.95*$(window).width()&&(o=.95*$(window).width()),t[dle_act_lang[1]]=function(){$(this).dialog("close")},allow_dle_delete_news&&(t[dle_del_msg]=function(){$(this).dialog("close");var t={};t[dle_act_lang[3]]=function(){$(this).dialog("close")},t[dle_p_send]=function(){if($("#dle-promt-text").val().length<1)$("#dle-promt-text").addClass("ui-state-error");else{var t=$("#dle-promt-text").val();$(this).dialog("close"),$("#dlepopup").remove(),$.post(dle_root+"index.php?controller=ajax&mod=message",{id:e,user_hash:dle_login_hash,text:t},(function(t){"ok"==t?document.location=dle_root+"index.php?do=deletenews&id="+e+"&hash="+dle_login_hash:DLEPush.error("Send Error")}))}},$("#dlepopup").remove(),$("body").append("<div id='dlepopup' class='dle-promt' title='"+dle_notice+"' style='display:none'>"+dle_p_text+"<br><br><textarea name='dle-promt-text' dir='auto' id='dle-promt-text' style='width:100%;' rows='4'></textarea></div>"),$("#dlepopup").dialog({autoOpen:!0,width:o,resizable:!1,dialogClass:"modalfixed dle-popup-newsdelete",classes:{"ui-dialog":"modalfixed dle-popup-newsdelete"},buttons:t}),$(".modalfixed.ui-dialog").css({position:"fixed"}),$("#dlepopup").dialog("option","position",{my:"center",at:"center",of:window})}),t[dle_act_lang[5]]={text:dle_act_lang[5],class:"ui-button-delete",click:function(){$(this).dialog("close"),document.location=dle_root+"index.php?do=deletenews&id="+e+"&hash="+dle_login_hash}},$("#dlepopup").remove(),$("body").append("<div id='dlepopup' class='dle-promt' title='"+dle_confirm+"' style='display:none'><div id='dlepopupmessage'>"+dle_del_agree+"</div></div>"),$("#dlepopup").dialog({autoOpen:!0,width:o,resizable:!1,dialogClass:"modalfixed dle-popup-newsdelete",classes:{"ui-dialog":"modalfixed dle-popup-newsdelete"},buttons:t}),$(".modalfixed.ui-dialog").css({position:"fixed"}),$("#dlepopup").dialog("option","position",{my:"center",at:"center",of:window})}function MenuNewsBuild(e,t,o){var i=[];if(void 0===o)o=!1;return i[0]="<a onclick=\"ajax_prep_for_edit('"+e+"', '"+t+'\'); return false;" href="#">'+menu_short+"</a>",""!=dle_admin?i[1]='<a href="'+dle_root+dle_admin+"?mod=editnews&action=editnews&id="+e+'" target="_blank">'+menu_full+"</a>":i[1]='<a href="'+dle_root+"index.php?do=addnews&id="+e+'" target="_blank">'+menu_full+"</a>",allow_dle_delete_news?(i[2]="<a onclick=\"sendNotice ('"+e+'\'); return false;" href="#">'+dle_notice+"</a>",i[3]="<a onclick=\"dle_news_delete ('"+e+'\'); return false;" href="#">'+dle_del_news+"</a>"):o&&(i[2]="<a onclick=\"dle_news_delete ('"+e+'\'); return false;" href="#">'+dle_del_news+"</a>"),i}function sendNotice(e){var t={},o=600*getBaseSize();o>.95*$(window).width()&&(o=.95*$(window).width()),t[dle_act_lang[3]]=function(){$(this).dialog("close")},t[dle_p_send]=function(){if($("#dle-promt-text").val().length<1)$("#dle-promt-text").addClass("ui-state-error");else{var t=$("#dle-promt-text").val();$(this).dialog("close"),$("#dlepopup").remove(),$.post(dle_root+"index.php?controller=ajax&mod=message",{id:e,user_hash:dle_login_hash,text:t,allowdelete:"no"},(function(e){"ok"==e&&DLEPush.info(dle_p_send_ok)}))}},$("#dlepopup").remove(),$("body").append("<div id='dlepopup' title='"+dle_notice+"' style='display:none'>"+dle_p_text+"<br><br><textarea dir='auto' name='dle-promt-text' id='dle-promt-text' style='width:100%;' rows='4'></textarea></div>"),$("#dlepopup").dialog({autoOpen:!0,width:o,resizable:!1,dialogClass:"modalfixed dle-popup-sendmessage",classes:{"ui-dialog":"modalfixed dle-popup-newsdelete"},buttons:t}),$(".modalfixed.ui-dialog").css({position:"fixed"}),$("#dlepopup").dialog("option","position",{my:"center",at:"center",of:window})}function AddComplaint(e,t){var o={},i="",n=600*getBaseSize();n>.95*$(window).width()&&(n=.95*$(window).width()),o[dle_act_lang[3]]=function(){$(this).dialog("close")},o[dle_p_send]=function(){if($("#dle-promt-text").val().length<1)$("#dle-promt-text").addClass("ui-state-error");else{var o=$("#dle-promt-text").val(),i="";$("#dle-promt-mail").val()&&(i=$("#dle-promt-mail").val()),ShowLoading(""),$.post(dle_root+"index.php?controller=ajax&mod=complaint",{id:e,text:o,action:t,mail:i,user_hash:dle_login_hash},(function(e){HideLoading(""),"ok"==e?($("#dlecomplaint").remove(),DLEPush.info(dle_p_send_ok)):DLEPush.error(e)}))}},$("#dlecomplaint").remove(),5==dle_group&&(i=dle_mail+'<br><input type="text" dir="auto" name="dle-promt-mail" id="dle-promt-mail" style="width:100%;" value="">'),$("body").append("<div id='dlecomplaint' title='"+dle_c_title+"' style='display:none'>"+dle_complaint+"<br><textarea dir='auto' name='dle-promt-text' id='dle-promt-text' style='width:100%;' rows='6'></textarea>"+i+"</div>"),$("#dlecomplaint").dialog({autoOpen:!0,width:n,resizable:!1,dialogClass:"modalfixed dle-popup-complaint",classes:{"ui-dialog":"modalfixed dle-popup-complaint"},buttons:o}),$(".modalfixed.ui-dialog").css({position:"fixed"}),$("#dlecomplaint").dialog("option","position",{my:"center",at:"center",of:window})}function getBaseSize(){if($("html").is('[class^="htmlfontsize-"]')){var e=document.querySelector("html");return parseFloat(window.getComputedStyle(e).getPropertyValue("font-size"))/16}var t=window.innerWidth,o=window.getComputedStyle(window.document.documentElement).getPropertyValue("--font-size-base").trim();if(t>1500&&o){const e=document.documentElement,t=.9*parseFloat(getComputedStyle(e).fontSize),o=document.createElement("div");o.style.fontSize="var(--font-size-base)",o.style.position="absolute",o.style.visibility="hidden",document.body.appendChild(o);const i=parseFloat(getComputedStyle(o).fontSize);return document.body.removeChild(o),parseFloat((i/t).toFixed(2))}return 1}function getFontSizeBase(){const e=document.documentElement;if(!getComputedStyle(e).getPropertyValue("--font-size-base").trim())return!1;const t=document.createElement("div");Object.assign(t.style,{position:"absolute",left:"-9999px",visibility:"hidden",fontSize:"var(--font-size-base)",fontFamily:"system-ui"}),document.body.appendChild(t);const o=getComputedStyle(t).fontSize;return document.body.removeChild(t),o}function DLEalert(e,t){var o=500*getBaseSize();o>.95*$(window).width()&&(o=.95*$(window).width()),$("#dlepopup").remove(),$("body").append("<div id='dlepopup' class='dle-alert' title='"+t+"' style='display:none'>"+e+"</div>"),$("#dlepopup").dialog({autoOpen:!0,width:o,minHeight:160,resizable:!1,dialogClass:"modalfixed dle-popup-alert",classes:{"ui-dialog":"modalfixed dle-popup-alert"},buttons:{Ok:function(){$(this).dialog("close"),$("#dlepopup").remove()}}}),$(".modalfixed.ui-dialog").css({position:"fixed"}),$("#dlepopup").dialog("option","position",{my:"center",at:"center",of:window})}function DLEconfirm(e,t,o){var i={},n=500*getBaseSize();n>.95*$(window).width()&&(n=.95*$(window).width()),i[dle_act_lang[1]]=function(){$(this).dialog("close"),$("#dlepopup").remove()},i[dle_act_lang[0]]=function(){$(this).dialog("close"),$("#dlepopup").remove(),o&&o()},$("#dlepopup").remove(),$("body").append("<div id='dlepopup' class='dle-confirm' title='"+t+"' style='display:none'>"+e+"</div>"),$("#dlepopup").dialog({autoOpen:!0,width:n,minHeight:160,resizable:!1,dialogClass:"modalfixed dle-popup-confirm",classes:{"ui-dialog":"modalfixed dle-popup-confirm"},buttons:i}),$(".modalfixed.ui-dialog").css({position:"fixed"}),$("#dlepopup").dialog("option","position",{my:"center",at:"center",of:window})}function DLEconfirmDelete(e,t,o){var i=500*getBaseSize();i>.95*$(window).width()&&(i=.95*$(window).width()),$("#dlepopup").remove(),$("body").append("<div id='dlepopup' class='dle-confirm' title='"+t+"' style='display:none'>"+e+"</div>"),$("#dlepopup").dialog({autoOpen:!0,width:i,minHeight:160,resizable:!1,buttons:[{text:dle_act_lang[1],click:function(){$(this).dialog("close"),$("#dlepopup").remove()}},{text:dle_act_lang[5],class:"ui-button-delete",click:function(){$(this).dialog("close"),$("#dlepopup").remove(),o&&o()}}]})}function DLEprompt(e,t,o,i,n,a){var d={},l=500*getBaseSize();if(l>.95*$(window).width()&&(l=.95*$(window).width()),void 0===a)a="text";d[dle_act_lang[3]]=function(){$(this).dialog("close")},d[dle_act_lang[2]]=function(){if(!n&&$("#dle-promt-text").val().length<1)$("#dle-promt-text").addClass("ui-state-error");else{var e=$("#dle-promt-text").val();$(this).dialog("close"),$("#dlepopup").remove(),i&&i(e)}},$("#dlepopup").remove(),$("body").append("<div id='dlepopup' class='dle-promt' title='"+o+"' style='display:none'>"+e+"<br><br><input type='"+a+"' dir='auto' name='dle-promt-text' id='dle-promt-text' style='width:100%;' value='"+t+"'/></div>"),$("#dlepopup").dialog({autoOpen:!0,width:l,resizable:!1,dialogClass:"modalfixed dle-popup-promt",classes:{"ui-dialog":"modalfixed dle-popup-promt"},buttons:d}),$(".modalfixed.ui-dialog").css({position:"fixed"}),$("#dlepopup").dialog("option","position",{my:"center",at:"center",of:window}),t.length>0?$("#dle-promt-text").select().focus():$("#dle-promt-text").focus()}var dle_user_profile="",dle_user_profile_link="";function ShowPopupProfile(e,t,o){var i={},n=600*getBaseSize(),a=400*getBaseSize();return n>.95*$(window).width()&&(n=.95*$(window).width()),i[menu_profile]=function(){document.location=dle_user_profile_link},o&&(i[menu_send]=function(){$(this).dialog("close"),$("#dleuserpopup").remove(),DLESendPM(dle_user_profile)}),1==t&&(i[menu_uedit]=function(){$(this).dialog("close");var e={};return $("body").append('<div id="modal-overlay" style="position: fixed; top: 0; left: 0; width: 100%; height: 100%; background: #666666; opacity: .40;filter:Alpha(Opacity=40); z-index: 980; display:none;"></div>
1'),$("#modal-overlay").css({filter:"alpha(opacity=40)"}).fadeIn("slow"),$("#dleuserpopup").remove(),$("body").append("<div id='dleuserpopup' title='"+menu_uedit+"' style='display:none'></div>"),e[dle_act_lang[5]]={text:dle_act_lang[5],class:"ui-button-delete",click:function(){window.frames.edituserframe.confirmDelete(dle_login_hash)}},e[dle_act_lang[3]]=function(){$(this).dialog("close"),$("#dleuserpopup").remove()},e[dle_act_lang[4]]=function(){document.getElementById("edituserframe").contentWindow.document.getElementById("saveuserform").submit()},$("#dleuserpopup").dialog({autoOpen:!0,width:700*getBaseSize(),resizable:!1,dialogClass:"modalfixed dle-popup-userprofileadmin",classes:{"ui-dialog":"modalfixed dle-popup-userprofileadmin"},buttons:e,open:function(e,t){$("#dleuserpopup").html("<iframe name='edituserframe' id='edituserframe' width='100%' height='"+a+"' src='"+dle_root+dle_admin+"?mod=editusers&action=edituser&user="+dle_user_profile+"&skin="+dle_skin+"' frameborder='0' marginwidth='0' marginheight='0' allowtransparency='true'></iframe>")},beforeClose:function(e,t){$("#dleuserpopup").html("")},close:function(e,t){$("#modal-overlay").fadeOut("slow",(function(){$("#modal-overlay").remove()}))}}),$(window).width()>830&&$(window).height()>530&&($(".modalfixed.ui-dialog").css({position:"fixed"}),$("#dleuserpopup").dialog("option","position",{my:"center",at:"center",of:window})),!1}),$("#dleprofilepopup").remove(),$("body").append(e),$("#dleprofilepopup").dialog({autoOpen:!0,resizable:!1,dialogClass:"dle-popup-userprofile",classes:{"ui-dialog":"dle-popup-userprofile"},buttons:i,width:n}),!1}function ShowProfile(e,t,o){return dle_user_profile==e&&document.getElementById("dleprofilepopup")?($("#dleprofilepopup").dialog("open"),!1):(dle_user_profile=e,dle_user_profile_link=t,ShowLoading(""),$.get(dle_root+"index.php?controller=ajax&mod=profile",{name:e,skin:dle_skin,user_hash:dle_login_hash},(function(e){HideLoading(""),e.error?DLEPush.error(e.error):e.warning?DLEPush.warning(e.warning):e.success&&ShowPopupProfile(e.content,o,e.pm_allowed)}),"json"),!1)}function onTwofactoryChange(e,t){if(!t)return!1;var o=550*getBaseSize();o>.95*$(window).width()&&(o=.95*$(window).width());var i=$(e).val(),n=$("#twofactor_auth_prev").val();return i&&2==i&&i!=n&&(ShowLoading(""),$.get(dle_root+"index.php?controller=ajax&mod=twofactor",{mode:"createsecret",skin:dle_skin,user_hash:dle_login_hash},(function(t){HideLoading(""),$("#dletwofactorsecret").remove(),$("body").append("<div id='dletwofactorsecret' title='"+dle_confirm+"' style='display:none'>"+t+"</div>");var i={};i[dle_act_lang[3]]=function(){$(e).val(n),$("#dletwofactorsecret").remove()},i[dle_act_lang[4]]=function(){if($("#dle-promt-text").val().length<1)$("#dle-promt-text").addClass("ui-state-error");else{var e=$("#dle-promt-text").val();ShowLoading(""),$.post(dle_root+"index.php?controller=ajax&mod=twofactor",{mode:"verifysecret",pin:e,skin:dle_skin,user_hash:dle_login_hash},(function(e){HideLoading(""),e.success?($("#twofactor_auth_prev").val("2"),$("#dletwofactorsecret").remove(),DLEPush.info(e.message)):e.error&&(DLEPush.error(e.errorinfo),$(".dle-popup-twofactor-secret").css("max-height",""),$("#dletwofactorsecret").css("height","auto"))}),"json")}},$("#dletwofactorsecret").dialog({autoOpen:!0,show:"fade",hide:"fade",width:o,resizable:!1,dialogClass:"dle-popup-twofactor-secret",classes:{"ui-dialog":"dle-popup-twofactor-secret"},buttons:i})}))),!1}function FastSearch(){$("#story").attr("autocomplete","off"),$("#story").blur((function(){$("#searchsuggestions").fadeOut()}
1)),$("#story").keyup((function(){var e=$(this).val();0==e.length?$("#searchsuggestions").fadeOut():dle_search_value!=e&&e.length>=dle_min_search&&(clearInterval(dle_search_delay),dle_search_delay=setInterval((function(){dle_do_search(e)}),600))}))}function dle_do_search(e){clearInterval(dle_search_delay),$("#searchsuggestions").remove(),$("body").append("<div id='searchsuggestions' style='display:none'></div>"),$.post(dle_root+"index.php?controller=ajax&mod=search",{query:""+e,skin:dle_skin,user_hash:dle_login_hash},(function(e){$("#searchsuggestions").html(e).fadeIn().css({position:"absolute",top:0,left:0}).position({my:"left top",at:"left bottom",of:"#story"})})),dle_search_value=e}function ShowLoading(e,t,o){var i="";if(void 0===t)t="center";if(void 0===o)o="center";if(void 0===e)e="";$("#loading-layer").remove(),0!==e.length&&e.trim()?(i="withtext",e="<span>"+e+"</span>"):(e='<svg xmlns:svg="http://www.w3.org/2000/svg" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" version="1.0" width="32px" height="32px" viewBox="0 0 128 128" xml:space="preserve"><g><path fill="#ffffff" d="M64,128a64,64,0,1,1,64-64A64,64,0,0,1,64,128ZM64,2.75A61.25,61.25,0,1,0,125.25,64,61.25,61.25,0,0,0,64,2.75Z"/><path fill="#ffffff" d="M64 128a64 64 0 1 1 64-64 64 64 0 0 1-64 64zM64 2.75A61.2 61.2 0 0 0 3.34 72.4c1.28-3.52 3.9-6.32 7.5-6.86 6.55-1 11.9 2.63 13.6 8.08 3.52 11.27.5 23 15 35.25 19.47 16.46 40.34 13.54 52.84 9.46A61.25 61.25 0 0 0 64 2.75z"/><animateTransform attributeName="transform" type="rotate" from="0 64 64" to="360 64 64" dur="1400ms" repeatCount="indefinite"></animateTransform></g></svg>',i="withouttext"),$("body").append('<div id="loading-layer" class="'+i+'" style="display:none">'+e+"</div>");var n=($(window).width()-$("#loading-layer").outerWidth())/2,a=($(window).height()-$("#loading-layer").outerHeight())/2;switch(t){case"left":n=15;break;case"right":n=$(window).width()-$("#loading-layer").outerWidth()-15}switch(o){case"top":a=15;break;case"bottom":a=$(window).height()-$("#loading-layer").outerHeight()-15}$("#loading-layer").css({left:n+"px",top:a+"px",position:"fixed",zIndex:"9999"}),$("#loading-layer").fadeTo(300,1)}function HideLoading(e){$("#loading-layer").fadeOut(300,(function(){$("#loading-layer").remove()}))}function ShowAllVotes(){var e=600*getBaseSize(),t=400*getBaseSize();return e>.95*$(window).width()&&(e=.95*$(window).width()),t>.95*$(window).height()&&(t=.95*$(window).height()),document.getElementById("dlevotespopup")?($("#dlevotespopup").dialog("open"),!1):($.ajaxSetup({cache:!1}),ShowLoading(""),$.get(dle_root+"index.php?controller=ajax&mod=allvotes&dle_skin="+dle_skin,(function(o){HideLoading(""),$("#dlevotespopup").remove(),$("body").append(o),$(".dlevotebutton").button(),$("#dlevotespopup").dialog({autoOpen:!0,width:e,height:t,resizable:!1,dialogClass:"dle-popup-allvotes",classes:{"ui-dialog":"dle-popup-allvotes"}})})),!1)}function fast_vote(e){var t=$("#vote_"+e+" input:radio[name=vote_check]:checked").val();return void 0===t||(ShowLoading(""),$.get(dle_root+"index.php?controller=ajax&mod=vote",{vote_id:e,vote_action:"vote",vote_mode:"fast_vote",vote_check:t,dle_skin:dle_skin,user_hash:dle_login_hash},(function(t){HideLoading(""),$("#dle-vote_list-"+e).fadeOut(500,(function(){$(this).html(t),$(this).fadeIn(500)}))}))),!1}function AddIgnorePM(e,t){DLEconfirm(t,dle_confirm,(function(){ShowLoading(""),$.get(dle_root+"index.php?controller=ajax&mod=adminfunction",{id:e,action:"add_ignore",skin:dle_skin,user_hash:dle_login_hash},(function(e){return HideLoading(""),e.success?DLEPush.info(e.success):e.error&&DLEPush.error(e.error),!1}),"json")}))}function DelIgnorePM(e,t){return DLEconfirm(t,dle_confirm,(function(){ShowLoading(""),$.get(dle_root+"index.php?controller=ajax&mod=adminfunction",{id:e,action:"del_ignore",skin:dle_skin,user_hash:dle_login_hash},(function(t){return HideLoading(""),$("#dle-ignore-list-"+e).html(""),DLEPush.info(t),!1}))})),!1}function DelSocial(e,t){return DLEconfirmDelete(t,dle_confirm,(function(){ShowLoading(""),$.get(dle_root+"index.php?controller=ajax&mod=adminfunction",{id:e,action:"del_social",user_hash:dle_login_hash},(function(t){return HideLoading(""),$("#dle-social-list-"+e).html(""),DLEPush.info(t),!1}))})),!1}function subscribe(e,t){var o=dle_sub_agree;return 0==t&&(o=dle_unsub_agree),DLEconfirm(o,dle_confirm,(function(){ShowLoading(""),$.get(dle_root+"index.php?controller=ajax&mod=commentssubscribe",{news_id:e,skin:dle_skin,sub_action:t,user_hash:dle_login_hash},(function(e){HideLoading(""),e.success?DLEPush.info(e.info):e.error&&DLEPush.error(e.errorinfo)}),"json")})),!1}var media_upload_manager=!1;function media_upload(e,t,o,i){var n=e+t+o+i;return $("#mediaupload").hasClass("ui-dialog-content")&&media_upload_manager==n?($("#mediaupload").dialog("open"),check_all(),!1):($("#mediaupload").remove(),$("body").append("<div id='mediaupload' class='mediaupload-body' title='"+text_upload+"' style='display:none'></div>"),ShowLoading(""),$.get(dle_root+"index.php?controller=ajax",{mod:"upload",area:e,news_id:o,author:t,wysiwyg:i,skin:dle_skin},(function(e){HideLoading(""),$("#mediaupload").html(e);var t=900*getBaseSize(),o=600*getBaseSize();t>.95*$(window).width()&&(t=.95*$(window).width()),o>.95*$(window).height()&&(o=.95*$(window).height()),$("#mediaupload").dialog({autoOpen:!0,width:t,height:o,resizable:!1,dialogClass:"modalfixed dle-popup-mediaupload",classes:{"ui-dialog":"modalfixed dle-popup-mediaupload"},open:function(e,t){$(".dle-popup-mediaupload").append($("#mediaupload-buttonpane").html()),$("#mediaupload-buttonpane").remove()},dragStart:function(e,t){$("#mediaupload").css("opacity","0"),$(".mediaupload-insert-params").css("opacity","0"),$(".modalfixed").css("opacity","0.8")},dragStop:function(e,t){$("#mediaupload").css("opacity","1"),$(".mediaupload-insert-params").css("opacity","1"),$(".modalfixed").css("opacity","1")}}),media_upload_manager=n,$(window).width()>830&&$(window).height()>530&&($(".modalfixed.ui-dialog").css({position:"fixed"}),$("#mediaupload").dialog("option","position",{my:"center",at:"center",of:window}))}),"html"),!1)}function dropdownmenu(e,t,o,i){t.stopPropagation();var n=$("#dropmenudiv");if(n.is(":visible"))return clearhidemenu(),n.fadeOut("fast"),!1;n.remove(),$("body").append('<div id="dropmenudiv" style="display:none;position:absolute;z-index:1000;width:auto;"></div>'),(n=$("#dropmenudiv")).html(o.join(""));var a=$(document).width()-30,d=$(e).offset();return a-d.left<n.outerWidth()&&(d.left=d.left-(n.outerWidth()-$(e).outerWidth())),n.css({left:d.left+"px",to
1p:d.top+$(e).outerHeight()+"px"}),n.fadeIn("fast"),n.on("mouseenter",(function(){clearhidemenu()})),n.on("mouseleave",(function(){delayhidemenu()})),$(document).one("click",(function(){hidemenu()})),!1}function setcookie(e,t){var o=new Date;o.setTime(o.getTime()+26784e5);var i="expires="+o.toUTCString();document.cookie=e+"="+t+";"+i+";path=/"}function get_local_storage(e){try{return localStorage.getItem(e)?JSON.parse(localStorage.getItem(e)):null}catch(e){return null}}function set_local_storage(e,t){try{localStorage.setItem(e,JSON.stringify(t))}catch(e){}}function del_local_storage(e,t){try{localStorage.removeItem(e)}catch(e){}}function save_last_viewed(e){if(e=parseInt(e),!isNaN(e)){var t=get_local_storage("viewed_ids");Array.isArray(t)?((t=t.filter((function(t){return t!=e}))).unshift(e),t.length>20&&t.pop()):t=[e],set_local_storage("viewed_ids",t),setcookie("viewed_ids",t.join(","))}}function hidemenu(e){$("#dropmenudiv").fadeOut("fast")}function delayhidemenu(){delayhide=setTimeout("hidemenu()",1e3)}function clearhidemenu(){"undefined"!=typeof delayhide&&clearTimeout(delayhide)}function removeEmptyElements(e){for(var t=[],o=0;o<e.length;o++)""!==e[o]&&t.push(e[o]);return t}function find_comment_onpage(){if(window.location.hash){var e=window.location.hash;if("findcomment"==e.slice(1,12)){var t=e.slice(12);t&&document.getElementById("comment-id-"+t)&&setTimeout((function(){scrollToCenterPosition("#comment-id-"+t,(function(){scrollToCenterPosition("#comment-id-"+t,null,1)}),500)}),300)}}}function findCommentsPage(e,t,o){var i=$(e).attr("href"),n="#comment";return $(e).css("pointer-events","none"),ShowLoading(""),$.post(dle_root+"index.php?controller=ajax&mod=adminfunction",{action:"findcommentspage",comment_id:t,post_id:o,user_hash:dle_login_hash},(function(o){$(e).css("pointer-events","auto"),HideLoading(""),o&&(o.url&&(i=o.url),"ok"==o.status&&(n="#findcomment"+t));var a=!1;document.location.pathname==i&&(a=!0),i+=n,document.location.href=i,a&&find_comment_onpage()}),"json").fail((function(e){HideLoading(""),i+=n,document.location=i})),!1}function scrollToCenterPosition(e,t,o){var i,n=$(e),a=n.offset().top,d=$(window).height(),l=n.outerHeight();if(void 0===o)o=400;i=l>d-100||0==l?a-d/4:a-d/2+l/2,void 0===t||null==t?$("html,body").stop().animate({scrollTop:i},o):$("html,body").stop().animate({scrollTop:i},o,t)}function DLEPasteSafeText(e,t){if(void 0!==e.node.innerHTML){var o=e.node.innerHTML;if(t){var i=[];o=(o=o.replace(/<a[^>]*?href=["'](https?:\/\/[^\s<]+)["'][^>]*?>.*?<\/a>/gi,(e=>(i.push(e),"__LINK"+i.length-1+"__")))).split(/(<[^>]+>)/g).map((e=>e.startsWith("<")?e:e.replace(/(https?:\/\/[^\s"'<>{}\[\]]+)/g,((e,t,o,i)=>{var n=i[o-1];return"["===n||"]"===n||"="===n?t:'<a href="'+t+'" target="_blank">'+t+"</a>"})))).join(""),i.forEach(((e,t)=>{o=o.replace("__LINK"+t+"__",e)}))}e.node.innerHTML=o}return e}async function DLEsharePage(e){const t=e=>document.querySelector(e)?.getAttribute("content")?.trim()||"",o=(e,t)=>e.length>t?e.slice(0,t-1).trimEnd()+"â¦":e,i="string"==typeof e&&e.trim().length>0,n=i?new URL(e.trim(),window.location.href).href:(()=>{const e=document.querySelector('link[rel="canonical"]')?.getAttribute("href")?.trim();return e?new URL(e,window.location.href).href:window.location.href})(),a=i?{url:n}:{title:o(t('meta[property="og:title"]')||document.title,70),text:o(t('meta[property="og:description"]')||t('meta[name="description"]')||"",160),url:n};try{navigator.share?await navigator.share(a):(await navigator.clipboard.writeText(n),DLEPush.info(dle_link_copied))}catch(e){}return!1}jQuery((function(e){var t=!1,o=new Array,i="";(e(".dle_spoiler div.text_spoiler, .dle-spoiler div.text_spoiler").hide(),e(document).on("click",".title_spoiler a",(function(t){var o=e(this).data("id");o&&(t.preventDefault(),ShowOrHide(o))})),e(document).keydown((function(t){if(13==t.which&&t.ctrlKey){if(t.preventDefault(),window.getSelection)var o=window.getSelection();else if(document.getSelection)o=document.getSelection();else if(document.selection)o=document.selection.createRange().text;if(""==o)return!1;if(o.toString().length>255)return DLEPush.error(dle_big_text),!1;var n={},a=600*getBaseSize();a>.95*e(window).width()&&(a=.95*e(window).width()),n[dle_act_lang[3]]=function(){e(this).dialog("close")},n[dle_p_send]=function(){if(e("#dle-promt-text").val().length<1)e("#dle-promt-text").addClass("ui-state-error");else{var t=e("#dle-promt-text").val(),o=e("#orfom").text(),i="";e("#dle-promt-mail").val()&&(i=e("#dle-promt-mail").val()),ShowLoading(""),e.post(dle_root+"index.php?controller=ajax&mod=complaint",{seltext:o,text:t,mail:i,user_hash:dle_login_hash,action:"orfo",url:window.location.href},(function(t){HideLoading(""),"ok"==t?(e("#dlecomplaint").remove(),DLEPush.info(dle_p_send_ok)):DLEPush.error(t)}))}},e("#dlecomplaint").remove(),5==dle_group&&(i=dle_mail+'<br><input type="text" dir="auto" name="dle-promt-mail" id="dle-promt-mail" style="width:100%;" value="">'),e("body").append("<div id='dlecomplaint' class='dle-promt' title='"+dle_c_title+"' style='display:none'>"+dle_orfo_title+"<br><textarea dir='auto' name='dle-promt-text' id='dle-promt-text' style='width:100%;' rows='6'></textarea>"+i+"<div id='orfom' style='display:none'>"+o+"</div></div>"),e("#dlecomplaint").dialog({autoOpen:!0,width:a,resizable:!1,dialogClass:"modalfixed dle-popup-complaint",classes:{"ui-dialog":"modalfixed dle-popup-complaint"},buttons:n}),e(".modalfixed.ui-dialog").css({position:"fixed"}),e("#dlecomplaint").dialog("option","position",{my:"center",at:"center",of:window})}})),setTimeout((function(){e("img[data-maxwidth]").each((function(){var o=e(this).width(),i=e(this).data("maxwidth");
1e(this)[0].naturalWidth&&(o=e(this)[0].naturalWidth),o>i&&(e(this).width(i),e(this).wrap('<a href="'+e(this).attr("src")+'" data-highslide="single" target="_blank"></a>'),"undefined"==typeof Fancybox&&0==t&&(t=!0,e.getCachedScript(dle_root+"public/fancybox/fancybox.js")))}))}),300),setTimeout((function(){e("div[data-dlebclicks]").each((function(){var t=e(this).data("dlebid");e(this).find("a").on("click",(function(){e.post(dle_root+"index.php?controller=ajax&mod=adminfunction",{id:t,action:"bannersclick",user_hash:dle_login_hash})}))}))}),400),e("div[data-dlebviews]").each((function(){o.push(e(this).data("dlebid"))})),o.length&&setTimeout((function(){e.post(dle_root+"index.php?controller=ajax&mod=adminfunction",{"ids[]":o,action:"bannersviews",user_hash:dle_login_hash})}),1e3),e(document).on("click",".comments-user-profile",(function(t){return e(this).data("userurl")&&e(this).data("username")&&ShowProfile(e(this).data("username"),e(this).data("userurl"),dle_allow_edit_users),!1})),window.location.hash)&&("comment"==window.location.hash.slice(1,8)&&(e("html").css("scroll-behavior","smooth"),document.getElementById("comment")&&setTimeout((function(){scrollToCenterPosition("#comment",(function(){scrollToCenterPosition("#comment",null,0)}),0)}),300)))})),jQuery.getCachedScript=function(e,t){return t=$.extend(t||{},{dataType:"script",cache:!0,url:e}),jQuery.ajax(t)};
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.