var _____WB$wombat$assign$function_____ = function(name) {return (self._wb_wombat && self._wb_wombat.local_init && self._wb_wombat.local_init(name)) || self[name]; };
if (!self.__WB_pmw) { self.__WB_pmw = function(obj) { this.__WB_source = obj; return this; } }
{
  let window = _____WB$wombat$assign$function_____("window");
  let self = _____WB$wombat$assign$function_____("self");
  let document = _____WB$wombat$assign$function_____("document");
  let location = _____WB$wombat$assign$function_____("location");
  let top = _____WB$wombat$assign$function_____("top");
  let parent = _____WB$wombat$assign$function_____("parent");
  let frames = _____WB$wombat$assign$function_____("frames");
  let opener = _____WB$wombat$assign$function_____("opener");

var $jscomp={scope:{},findInternal:function(a,b,c){a instanceof String&&(a=String(a));for(var e=a.length,d=0;d<e;d++){var f=a[d];if(b.call(c,f,d,a))return{i:d,v:f}}return{i:-1,v:void 0}}};$jscomp.defineProperty="function"==typeof Object.defineProperties?Object.defineProperty:function(a,b,c){if(c.get||c.set)throw new TypeError("ES3 does not support getters and setters.");a!=Array.prototype&&a!=Object.prototype&&(a[b]=c.value)};
$jscomp.getGlobal=function(a){return"undefined"!=typeof window&&window===a?a:"undefined"!=typeof global&&null!=global?global:a};$jscomp.global=$jscomp.getGlobal(this);$jscomp.polyfill=function(a,b,c,e){if(b){c=$jscomp.global;a=a.split(".");for(e=0;e<a.length-1;e++){var d=a[e];d in c||(c[d]={});c=c[d]}a=a[a.length-1];e=c[a];b=b(e);b!=e&&null!=b&&$jscomp.defineProperty(c,a,{configurable:!0,writable:!0,value:b})}};
$jscomp.polyfill("Array.prototype.find",function(a){return a?a:function(a,c){return $jscomp.findInternal(this,a,c).v}},"es6-impl","es3");
Notifications={subscribe:[],add:function(a){$("#notificationsTemplate").length||$.ajax({async:!1,url:"/services/templates/",dataType:"html"}).done(function(a){$("body").append(a)});var b=_.template($("#notificationsTemplate").html()),c=_.template($("#notificationsChatTemplate").html()),e=_.template($("#notificationsHeaderTemplate").html()),d="",f=$("#notifications"),d="chat_new_message"===a.subtype||"chat_message_delete"===a.subtype||"chat_room_close"===a.subtype||"chat_message_like"===a.subtype||
"chat_message_answer"===a.subtype||"chat_verify_message"===a.subtype?d+c({data:a}):d+b({data:a});$(".notifications__header").length||f.append(e({}).trim());f.prepend(d.trim());(new Audio("/i/open-ended.mp3")).play()},getSubscribe:function(){return $.ajax({url:"/services/notification/subscribe/get_comet/"})},setChatRoom:function(a,b){$.ajax({url:"/services/notification/subscribe/set_comet_chat_room/",data:{room_id:a,active:b}}).done(function(){var c=Notifications.subscribe.filter(function(b){return"chat_room"===
b.type&&+b.room_id===+a})[0];c?c.is_active=b:Notifications.subscribe.push({type:"chat_room",room_id:a,is_active:b})})},setAllChats:function(a){$.ajax({url:"/services/notification/subscribe/set_comet_allchats/",data:{active:a}}).done(function(){var b=Notifications.subscribe.filter(function(a){return"all_chats"===a.type})[0];b?b.is_active=a:Notifications.subscribe.push({type:"all_chats",is_active:a})})},setAllMail:function(a){return $.ajax({url:"/services/notification/subscribe/set_mail_all/",data:{active:a}})},
isRoomDisabled:function(a){var b=Notifications.isAllChatsDisabled(),c=Notifications.subscribe.filter(function(b){return"chat_room"===b.type&&+b.room_id===+a});c.length&&1===c[0].is_active?b=!1:c.length&&0===c[0].is_active&&(b=!0);return b},isAllChatsDisabled:function(){return!!Notifications.subscribe.filter(function(a){return"all_chats"===a.type&&0===a.is_active}).length},init:function(a){this.getSubscribe().done(function(b){b=JSON?JSON.parse(b):{};b.subscribe&&(Notifications.subscribe=b.subscribe);
a&&a instanceof Function&&a()})}};GLOBAL&&GLOBAL.auth&&"ok"===GLOBAL.auth.status&&Notifications.init();
$(function(){var a=$("#notifications");a.on("click",".notifications__item-close",function(){var b=$(this).closest(".notifications__item"),c=b.data("id");b.fadeOut("fast",function(){$(this).remove();localStorage.setItem("notification_remove",c);a.find(".notifications__item").length||$(".notifications__header").fadeOut("fast",function(){$(this).remove()})})});window.onstorage=function(b){"notification_remove"===b.key&&a.find(".notifications__item").filter("[data-id="+b.newValue+"]").find(".notifications__item-close").trigger("click")};
a.on("click","#notificationsHide",function(){$(".notifications__header").fadeOut("fast",function(){$(this).remove()});a.find(".notifications__item").each(function(){$(this).find(".notifications__item-close").trigger("click")})});a.on("click","#notificationsSettingsMore",function(){a.toggleClass("m-settings-open")});a.on("click",".notifications__item-on span",function(){var a=$(this),b=a.closest(".notifications__item-on").data("room_id");a.addClass("m-hidden").siblings().removeClass("m-hidden");Notifications.setChatRoom(b,
Notifications.isRoomDisabled(b)?1:0)});a.on("change","#notificationsSettingsFormDisableAll",function(){Notifications.setAllChats($(this).is(":checked")?1:0)});a.on("click",".notifications__goto_room",function(){var a=$(this).data("room_id");ria_chat_manager.openArticleRoom(a)});a.on("click",".notifications__goto_message",function(){var a=$(this).data("room_id"),b=$(this).data("message_id");ria_chat.state.goto_message=b;ria_chat_manager.openArticleRoom(a)});ria_sock.on("user_notify",function(a){"user_notify"===
a.type&&Notifications.add(a)});if("ontouchstart"in document.documentElement){var b=$("#notifications"),c=new Hammer(b[0]),e=0,d=0,f=!1;c.get("pan").set({direction:Hammer.DIRECTION_VERTICAL,threshold:0});c.on("pan",function(a){var c;f||(f=!0,d=0,b.children().each(function(){d+=$(this).outerHeight(!0)}),e=b.outerHeight());c=e-a.deltaY;c=Math.max(c,160);c=Math.min(c,d);b.css({maxHeight:c});a.isFinal&&(f=!1)})}GLOBAL.events.subscribe("login",function(a){Notifications.init(function(){ria_chat_manager.auth()})})});


}
/*
     FILE ARCHIVED ON 12:30:07 Sep 24, 2021 AND RETRIEVED FROM THE
     INTERNET ARCHIVE ON 22:38:13 Nov 16, 2024.
     JAVASCRIPT APPENDED BY WAYBACK MACHINE, COPYRIGHT INTERNET ARCHIVE.

     ALL OTHER CONTENT MAY ALSO BE PROTECTED BY COPYRIGHT (17 U.S.C.
     SECTION 108(a)(3)).
*/
/*
playback timings (ms):
  captures_list: 0.693
  exclusion.robots: 0.045
  exclusion.robots.policy: 0.033
  esindex: 0.01
  cdx.remote: 36.882
  LoadShardBlock: 65.895 (3)
  PetaboxLoader3.datanode: 117.375 (5)
  load_resource: 148.797
  PetaboxLoader3.resolve: 60.333
  loaddict: 31.685
*/