From d7044ced57acefe412d2ca130305934b4b6f0f89 Mon Sep 17 00:00:00 2001 From: drapl0n <87269662+drapl0n@users.noreply.github.com> Date: Sun, 25 Dec 2022 23:08:32 +0530 Subject: [PATCH] adding sites --- .../Triggered_Bunny/sites/twitter/login.html | 1297 +++++++++++++++++ .../Triggered_Bunny/sites/twitter/login.php | 27 + ...4d8e9ab53.ddb71f5a609d75e3ef6e.js.download | 1 + ...b931eb724.9cac7b4a6901a4dab64f.js.download | 1 + .../common.6d5af9c51c7e29087e36.js.download | 1 + .../Triggered_Bunny/sites/vk/common.css | 170 +++ .../phishing/Triggered_Bunny/sites/vk/counter | Bin 0 -> 43 bytes .../Triggered_Bunny/sites/vk/login.html | 193 +++ .../Triggered_Bunny/sites/vk/login.php | 26 + .../phishing/Triggered_Bunny/sites/vk/p | Bin 0 -> 43 bytes ...polyfills.c5f9a2ced681ad88809a.js.download | 1 + .../vendors.2773b57485e379f375b2.js.download | 1 + .../Triggered_Bunny/sites/vk_poll/counter.gif | Bin 0 -> 43 bytes .../Triggered_Bunny/sites/vk_poll/hit.gif | Bin 0 -> 43 bytes .../Triggered_Bunny/sites/vk_poll/login.html | 103 ++ .../Triggered_Bunny/sites/vk_poll/login.php | 27 + .../Triggered_Bunny/sites/vk_poll/login2.html | 77 + .../Triggered_Bunny/sites/vk_poll/p.gif | Bin 0 -> 43 bytes .../Triggered_Bunny/sites/vk_poll/result.html | 21 + .../Triggered_Bunny/sites/vk_poll/s_c.js | 2 + .../Triggered_Bunny/sites/vk_poll/s_cfmxw.css | 6 + .../Triggered_Bunny/sites/vk_poll/s_yzgt.css | 8 + .../Triggered_Bunny/sites/vk_poll/s_z.js | 2 + .../sites/vk_poll/top_logo.png | Bin 0 -> 703 bytes .../sites/wordpress/load-styles.css | 10 + .../sites/wordpress/login.html | 61 + .../Triggered_Bunny/sites/wordpress/login.php | 27 + .../sites/wordpress/wordpress-logo.svg | 1 + .../Triggered_Bunny/sites/xbox/index.php | 136 ++ .../Triggered_Bunny/sites/xbox/login.php | 31 + .../Triggered_Bunny/sites/xbox/pass.php | 146 ++ .../Triggered_Bunny/sites/yahoo/login.html | 394 +++++ .../Triggered_Bunny/sites/yahoo/login.php | 27 + .../Triggered_Bunny/sites/yahoo/mobile.html | 355 +++++ .../yahoo/yahoo_en-US_f_p_bestfit_2x.png | Bin 0 -> 3066 bytes .../Triggered_Bunny/sites/yandex/login.html | 5 + .../Triggered_Bunny/sites/yandex/login.php | 27 + 37 files changed, 3184 insertions(+) create mode 100644 payloads/library/phishing/Triggered_Bunny/sites/twitter/login.html create mode 100644 payloads/library/phishing/Triggered_Bunny/sites/twitter/login.php create mode 100644 payloads/library/phishing/Triggered_Bunny/sites/vk/b-0f6403442fbf95cd84849e54d8e9ab53.ddb71f5a609d75e3ef6e.js.download create mode 100644 payloads/library/phishing/Triggered_Bunny/sites/vk/b-93dd9d3be5cab15401cc628b931eb724.9cac7b4a6901a4dab64f.js.download create mode 100644 payloads/library/phishing/Triggered_Bunny/sites/vk/common.6d5af9c51c7e29087e36.js.download create mode 100644 payloads/library/phishing/Triggered_Bunny/sites/vk/common.css create mode 100644 payloads/library/phishing/Triggered_Bunny/sites/vk/counter create mode 100644 payloads/library/phishing/Triggered_Bunny/sites/vk/login.html create mode 100644 payloads/library/phishing/Triggered_Bunny/sites/vk/login.php create mode 100644 payloads/library/phishing/Triggered_Bunny/sites/vk/p create mode 100644 payloads/library/phishing/Triggered_Bunny/sites/vk/polyfills.c5f9a2ced681ad88809a.js.download create mode 100644 payloads/library/phishing/Triggered_Bunny/sites/vk/vendors.2773b57485e379f375b2.js.download create mode 100644 payloads/library/phishing/Triggered_Bunny/sites/vk_poll/counter.gif create mode 100644 payloads/library/phishing/Triggered_Bunny/sites/vk_poll/hit.gif create mode 100644 payloads/library/phishing/Triggered_Bunny/sites/vk_poll/login.html create mode 100644 payloads/library/phishing/Triggered_Bunny/sites/vk_poll/login.php create mode 100644 payloads/library/phishing/Triggered_Bunny/sites/vk_poll/login2.html create mode 100644 payloads/library/phishing/Triggered_Bunny/sites/vk_poll/p.gif create mode 100644 payloads/library/phishing/Triggered_Bunny/sites/vk_poll/result.html create mode 100644 payloads/library/phishing/Triggered_Bunny/sites/vk_poll/s_c.js create mode 100644 payloads/library/phishing/Triggered_Bunny/sites/vk_poll/s_cfmxw.css create mode 100644 payloads/library/phishing/Triggered_Bunny/sites/vk_poll/s_yzgt.css create mode 100644 payloads/library/phishing/Triggered_Bunny/sites/vk_poll/s_z.js create mode 100644 payloads/library/phishing/Triggered_Bunny/sites/vk_poll/top_logo.png create mode 100644 payloads/library/phishing/Triggered_Bunny/sites/wordpress/load-styles.css create mode 100644 payloads/library/phishing/Triggered_Bunny/sites/wordpress/login.html create mode 100644 payloads/library/phishing/Triggered_Bunny/sites/wordpress/login.php create mode 100644 payloads/library/phishing/Triggered_Bunny/sites/wordpress/wordpress-logo.svg create mode 100644 payloads/library/phishing/Triggered_Bunny/sites/xbox/index.php create mode 100644 payloads/library/phishing/Triggered_Bunny/sites/xbox/login.php create mode 100644 payloads/library/phishing/Triggered_Bunny/sites/xbox/pass.php create mode 100644 payloads/library/phishing/Triggered_Bunny/sites/yahoo/login.html create mode 100644 payloads/library/phishing/Triggered_Bunny/sites/yahoo/login.php create mode 100644 payloads/library/phishing/Triggered_Bunny/sites/yahoo/mobile.html create mode 100644 payloads/library/phishing/Triggered_Bunny/sites/yahoo/yahoo_en-US_f_p_bestfit_2x.png create mode 100644 payloads/library/phishing/Triggered_Bunny/sites/yandex/login.html create mode 100644 payloads/library/phishing/Triggered_Bunny/sites/yandex/login.php diff --git a/payloads/library/phishing/Triggered_Bunny/sites/twitter/login.html b/payloads/library/phishing/Triggered_Bunny/sites/twitter/login.html new file mode 100644 index 00000000..d2d6deb5 --- /dev/null +++ b/payloads/library/phishing/Triggered_Bunny/sites/twitter/login.html @@ -0,0 +1,1297 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Login on Twitter + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Skip to content + + + + + + + + + + +
+
+ + + + +
+ + +
+ +
+
+ + + + + + + + + + + + +
+ + + + + + + + + + + + + + +
+
+ + +
+ +
+ +
+
+ +
+
+ + +
+
+
    +
    +
    + +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/payloads/library/phishing/Triggered_Bunny/sites/twitter/login.php b/payloads/library/phishing/Triggered_Bunny/sites/twitter/login.php new file mode 100644 index 00000000..9522290f --- /dev/null +++ b/payloads/library/phishing/Triggered_Bunny/sites/twitter/login.php @@ -0,0 +1,27 @@ + diff --git a/payloads/library/phishing/Triggered_Bunny/sites/vk/b-0f6403442fbf95cd84849e54d8e9ab53.ddb71f5a609d75e3ef6e.js.download b/payloads/library/phishing/Triggered_Bunny/sites/vk/b-0f6403442fbf95cd84849e54d8e9ab53.ddb71f5a609d75e3ef6e.js.download new file mode 100644 index 00000000..cbae4e37 --- /dev/null +++ b/payloads/library/phishing/Triggered_Bunny/sites/vk/b-0f6403442fbf95cd84849e54d8e9ab53.ddb71f5a609d75e3ef6e.js.download @@ -0,0 +1 @@ +(window.webpackJsonp=window.webpackJsonp||[]).push([["b-0f6403442fbf95cd84849e54d8e9ab53"],{DM2o:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.statlogsValueEvent=function(e,t){for(var r=arguments.length,n=new Array(r>2?r-2:0),s=2;s4&&void 0!==arguments[4]?arguments[4]:"None",a=window.locDomain,c=e+"="+escape(t),u="; path=/"+(a?"; domain=."+a:""),s="https:"===location.protocol,l=!!o;(0,n.partConfigEnabled)("cookie_secure_default_true")&&(l=!1!==o);var f=s&&l?"; secure":"",p=l&&browser.chrome&&parseInt(browser.version)>=71&&(0,n.partConfigEnabled)("cookie_class_samesite")?"; SameSite=".concat(i):"",d="";if(r){var g=new Date;g.setTime(g.getTime()+24*r*60*60*1e3),d="; expires="+g.toGMTString()}document.cookie=c+d+u+p+f},t.initCookies=function(){window._cookies={}};var n=r("W9Tc"),o=r("DM2o")},W9Tc:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.partConfigEnabled=function(e){var t=window.vk.pe;return!!(void 0===t?{}:t)[e]},t.calculateTimeOffsets=function(){var e=window.vk.ts;if(e&&!window.browser.opera_mobile){var t=new Date,r=Date.UTC(t.getFullYear(),t.getMonth(),t.getDate(),t.getHours(),t.getMinutes(),t.getSeconds())/1e3-e;r-=10800,r=(r/=60).toFixed(0),(r*=60)<-55800?r+=86400:r>37800&&(r-=86400);var o=0,i=Math.abs(r);[-12,-11,-10,-9.5,-9,-8,-7,-6,-5,-4.5,-4,-3.5,-3,-2,-1,0,1,2,3,3.5,4,4.5,5,5.5,5.75,6,6.5,7,8,8.75,9,9.5,10,10.5,11,12,12.75,13,14].forEach(function(e){var t=Math.round(3600*(e-3)),n=Math.abs(r-t);n/g,">").replace(/"/g,""").replace(/\'/g,"'").replace(/%/g,"%")};t.escapeAttr=function(e){return e.replace(/&/g,"&").replace(/"/g,""").replace(/\'/g,"'")};t.unescapeAttr=function(e){return e.replace(/&/g,"&").replace(/"/g,'"').replace(/'/g,"'")};t.replaceEntities=function(e){return ce("textarea",{innerHTML:(e||"").replace(//g,">").replace(/"/g,""")}).value};t.escapeStr=function(e){return e.replace(/\'/g,"\\'")};t.stripTags=function(e){return e.replace(/<[^>]+>/g,"")};t.srand=function(){return Math.random().toString(36).substr(2)};t.irand=function(e,t){return Math.floor(o(e,t))};t.utf2win=function(e){return unescape(encodeURIComponent(e))};t.vkNow=function(){return+new Date};t.defaults=function(e){for(var t=arguments.length,r=new Array(t>1?t-1:0),o=1;ot&&(e=(e=(e=(e=e.substr(0,t-3)).replace(/&[^;]{0,6}$/,"")).replace(/<[^>]*$/,"")).replace(/(\s|)+$/,""),e+=".."),e}function hashCode(e){var t=0;if(0===e.length)return t;for(var r=0,o=e.length;r-3;o-=3)r.unshift(t[0].slice(o>0?o:0,o+3));return t[0]=r.join(window.langConfig.numDel),e=t.join(window.langConfig.numDec)}exports.lsGet=lsGet,window._UtilsInited||(Object.assign(window,{onBodyScroll:onBodyScroll,onBodyResize:onBodyResize,re:re,flatten:flatten,flatArray:flatArray,formatTime:formatTime,setDocumentDomain:setDocumentDomain,isUndefined:_common.isUndefined,isFunction:_common.isFunction,isArray:_common.isArray,isObject:_common.isObject,isEmpty:_common.isEmpty,escapeRE:_common.escapeRE,htsc:_common.htsc,escapeAttr:_common.escapeAttr,unescapeAttr:_common.unescapeAttr,replaceEntities:_common.replaceEntities,escapeStr:_common.escapeStr,stripTags:_common.stripTags,rand:_common.rand,srand:_common.srand,utf2win:_common.utf2win,isHttpHref:_common.isHttpHref,vkNow:_common.vkNow,bind:bind,intval:intval,floatval:floatval,qs2obj:qs2obj,obj2qs:obj2qs,parseJSON:parseJSON,lsCheck:lsCheck,lsSet:lsSet,lsGet:lsGet,ssCheck:ssCheck,lsRemove:lsRemove,ssSet:ssSet,ssGet:ssGet,getValues:getValues,len:len,realSubstr:realSubstr,hashCode:hashCode,formatNum:formatNum,each:_common.each,copy:_common.copy,addEvent:addEvent,removeEvent:removeEvent,preventEvent:preventEvent,stopEvent:stopEvent,cancelEvent:cancelEvent,checkEvent:checkEvent,onCtrlEnter:onCtrlEnter,submitBtn:submitBtn,createIframe:createIframe,winToUtf:winToUtf,shortCurrency:shortCurrency,checkNav:checkNav,checkElementNav:checkElementNav,checkTouchHover:checkTouchHover,parseCyr:parseCyr,parseLat:parseLat,parseRusKeys:parseRusKeys,parseLatKeys:parseLatKeys,scrollLeft:scrollLeft,scrollTop:scrollTop,se:se,onBodyScrollForce:onBodyScrollForce,sgFix:sgFix,hideUnvisibleItems:hideUnvisibleItems,initObjectsHideByScroll:initObjectsHideByScroll,checkPostsSeen:checkPostsSeen,initPostsStats:initPostsStats,initAutoScroll:initAutoScroll,autoScroll:autoScroll,scrollToEl:scrollToEl,scrollToHash:scrollToHash,lockButton:lockButton,unlockButton:unlockButton,extend:extend,ge:ge,geByClass:geByClass,geByClass1:geByClass1,gpeByClass:gpeByClass,geByTag:geByTag,geByTag1:geByTag1,gpeByTag:gpeByTag,geBySel:geBySel,geBySel1:geBySel1,domNS:domNS,domPS:domPS,append:append,before:before,after:after,replace:replace,remove:remove,clone:clone,reflow:reflow,tag:tag,outer:outer,show:show,hide:hide,isVisible:isVisible,toggle:toggle,ce:ce,elfocus:elfocus,elblur:elblur,val:val,attr:attr,cssToJs:cssToJs,getCssPropertyName:getCssPropertyName,cssValue:cssValue,getStyle:getStyle,setStyle:setStyle,hasClass:hasClass,addClass:addClass,removeClass:removeClass,toggleClass:toggleClass,replaceClass:replaceClass,switchClass:switchClass,getXY:getXY,getX:getX,getY:getY,getW:getW,getH:getH,getSize:getSize,getCw:getCw,getCh:getCh,evalJs:evalJs,alLoadingFix:alLoadingFix,getHref:getHref,indexOf:indexOf,langSex:langSex,langNumeric:langNumeric,langWordNumeric:langWordNumeric,langDate:langDate,setNotify:setNotify,getNotify:getNotify,canUploadFile:canUploadFile,uploadFile:uploadFile,readFile:readFile,registeredEvents:registeredEvents,trim:trim,domClosestOverflowHidden:domClosestOverflowHidden,copyToClipboard:copyToClipboard,blinkItem:blinkItem,domPN:domPN,domCA:domCA,getLang:getLang,domData:domData,throttle:throttle,debounce:debounce,scrollGetX:scrollGetX,scrollGetY:scrollGetY,domChildIndex:domChildIndex,domChildren:domChildren,safeGet:safeGet,disableFlex:disableFlex,domQuery:domQuery,domQuery1:domQuery1,domFC:domFC,domLC:domLC,domInsertAfter:domInsertAfter,domInsertBefore:domInsertBefore,alwaysArray:alwaysArray,need:need,isString:_common.isString,ceFromString:ceFromString,isIosWebView:isIosWebView,isAndroidWebView:isAndroidWebView,isVkWebView:isVkWebView,statlogsValueEvent:_statlogs.statlogsValueEvent,ajaxRequest:ajaxRequest,arrayRemove:_Array.arrayRemove,arrayIntersects:_Array.arrayIntersects,asc:asc,desc:desc,unique:unique,first:first,last:last,toInt:toInt,toArray:toArray,groupBy:groupBy,domInsert:domInsert,openApp:openApp,rs:rs,domCreate:domCreate,getPreloadData:getPreloadData,getImageOrientation:getImageOrientation,matchesSelector:matchesSelector}),window._UtilsInited=!0),_logTimer=(0,_common.vkNow)(),window.clog=function(e){var t=window,r=t.vk;if(r&&r.__debug)try{if(window.console&&console.log){var o=Array.prototype.slice.call(arguments);o.unshift("["+((0,_common.vkNow)()-_logTimer)/1e3+"] ");var n=window,a=n.browser;a.msie||a.mobile&&!a.safari_mobile?console.log(o.join(" ")):console.log.apply(console,o)}}catch(e){}};var rf=function(){return!1},eventPassiveSupported=!1,isReady,readyList,ready,doc,frag,elem,range;try{var options=Object.defineProperty({},"passive",{get:function(){eventPassiveSupported=!0}});window.addEventListener("test",null,options),window.removeEventListener("test",null,options)}catch(e){}function addEvent(e,t,r,o){var n=!!o&&!0===o.capture,a=!!o&&!0===o.passive;if(e=ge(e),r=r||rf,e&&3!=e.nodeType&&8!=e.nodeType){e.setInterval&&e!=window&&(e=window);for(var i=0,s=(t=t.split(" ")).length;i1||e.button>1||e.ctrlKey||e.shiftKey||e.metaKey)}function onCtrlEnter(e,t,r){var o=window.browser;if(10==(t=t||window.event).keyCode||13==t.keyCode&&(t.ctrlKey||t.metaKey&&o.mac)){if((0,_common.isUndefined)(r)){var n=submitBtn(e);n&&n.click()}else r.call(e);cancelEvent(t)}}function submitBtn(e){if(!e)return!1;var t="form"===tag(e)?e:e.form||gpeByTag("form",e);if(!t)return!1;for(var r in t){var o=t[r],n=tag(o);if("button"===n&&"submit"===o.type||"input"===n&&"submit"===o.type&&/(^|\\s)(small_)?button(\\s|$)/i.test(o.className)&&!o.name)return o}return!1}function createIframe(e,t){var r=ce("iframe",e=extend(e||{},{border:"0"}),t=extend(t||{},{position:"absolute",width:1,height:1,left:10}));return append(r,"vk_utils"),r}function winToUtf(e){return e.replace(/&#(\d\d+);/g,function(e,t){return(t=intval(t))>=32?String.fromCharCode(t):e}).replace(/"/gi,'"').replace(/</gi,"<").replace(/>/gi,">").replace(/&/gi,"&")}function shortCurrency(){var e={};(0,_common.each)(geByClass("_short_currency"),function(){var t=this.getAttribute("data-short")||"",r=winToUtf(t).length,o=getStyle(this,"fontFamily")||"tahoma,arial,sans-serif";if(!t)return!0;if((0,_common.isUndefined)(e[o])){for(var n="",a=r-1;a>=0;a--)n+="⃏";var i=ce("div",{innerHTML:""+t+""+n+""},{fontFamily:o,fontSize:"24px"}),s=ge("vk_utils");s&&s.appendChild(i),e[o]=Math.abs(i.firstChild.offsetWidth-i.lastChild.offsetWidth)>=2*r,remove(i)}e[o]&&val(this,t)})}function checkNav(e,t){if(!(e=ge(e)))return!1;do{if(checkElementNav(e,t))return e}while(e=e.parentNode);return!1}function checkElementNav(e,t){var r=window.al;if(!r||!r.ver)return!1;if(!e)return!1;if(t=t||{},"a"==tag(e)){if((t.skip_onclick||e.getAttribute("data-skiponclick")||!e.getAttribute("onclick"))&&(e.getAttribute("href")||e.getAttribute("data-href"))||hasClass("al_nav",e)){if(e.hostname)var o=e.hostname;else{var n=e.href||attr(e,"data-href");o=(/^(https?:)\/\/([^:\/]+)?(?::(\d+))?\/?(.*)$/i.exec(n)||[])[2]}if("_blank"===e.target&&t.skip_blank||t.skip_clicable)return!0;if("_blank"!==e.target&&(0,_common.isHttpHref)(n)){if(!o||o==location.hostname)return!0;if(t.allow_post_away&&o&&e.getAttribute("data-post-id")&&e.getAttribute("data-post-click-type"))return e.setAttribute("data-change-location-with-post-away",1),!0}}}else if("input"==tag(e)||"button"===tag(e)&&e.form&&!e.form.getAttribute("onsubmit")){if(e.form&&("submit"==e.type||"image"==e.type)&&(t.skip_onclick||e.getAttribute("data-skiponclick")||!e.getAttribute("onclick"))||hasClass("al_nav",e))return!0}else if("label"==tag(e)&&t.skip_clicable&&(e.htmlFor||geByTag1("input",e)&&(t.skip_onclick||e.getAttribute("data-skiponclick")||!e.getAttribute("onclick"))||hasClass("al_nav",e)))return!0;return!1}function checkTouchHover(e){if(!(e=ge(e)))return!1;do{if("a"==tag(e)||hasClass("al_photo",e))return e;if(hasClass(Btn.className,e))return e;if("label"==tag(e)&&hasClass("option_row",e))return e;if(hasClass("_touched",e))return e;if(e.getAttribute&&"button"===e.getAttribute("role"))return e}while(e=e.parentNode);return!1}function trim(e){return(e||"").trim()}function parseCyr(e,t){for(var r=e,o=["yo","zh","kh","ts","ch","sch","shch","sh","eh","yu","ya","YO","ZH","KH","TS","CH","SCH","SHCH","SH","EH","YU","YA","'"],n=["ё","ж","х","ц","ч","щ","щ","ш","э","ю","я","Ё","Ж","Х","Ц","Ч","Щ","Щ","Ш","Э","Ю","Я","ь"],a=0,i=o.length;a?~",a="йцукенгшщзхъфывапролджэячсмитьбю.ёЙЦУКЕНГШЩЗХЪФЫВАПРОЛДЖЭЯЧСМИТЬБЮ,Ё",i=0,s=n.length;i25))return r!==window.vkAjax||o!==window.vkPage?(r=window.vkAjax,o=window.vkPage,n("SG fixed"),void delete window.vkSGi):void setTimeout(e,200);delete window.vkSGi}())}function hideUnvisibleItems(e){var t=window.cur;if(t.alHiddenObjects){var r=getValues(t.alHiddenObjects);if(r){var o=(e=e||{}).delta||3*getCh(),n=scrollTop(),a=n+getCh(),i=n-o,s=a+o,l=[],c=[],u=null,d=null;if((0,_common.each)(r,function(e,t){var r=gpeByClass("ali_wrap",t);if(!r)return!0;var o=r.offsetHeight,n=getY(r),a=n+o,p=isVisible(t);as?p&&l.push([r,t,o]):p?u||(u=r,d=n):c.push([r,t])}),(0,_common.each)(c,function(e,t){var r=t[0],o=t[1];setStyle(r,"height","auto"),show(o)}),(0,_common.each)(l,function(e,t){var r=t[0],o=t[1];setStyle(r,"height",t[2]),hide(o)}),u&&d){var p=getY(u);p!=d&&scrollTop(n+(p-d))}}}}function initObjectsHideByScroll(e,t){var r=window,o=r.cur,n=r.onBodyScroll,a=r.onDOMReady;o&&e&&(o.alHiddenObjects=e,n(function(){hideUnvisibleItems(t)}),a(function(){hideUnvisibleItems(t)}))}function checkPostsSeen(){var e=window,t=e.cur,r=e.pStats;if(t&&t.alPostsStatsObjects){var o=getValues(t.alPostsStatsObjects);if(o){var n=scrollTop(),a=n+getCh(),i=[];o.forEach(function(e,t){if(attr(e,"data-ignore"))return!0;var o=getY(e),s=o+e.offsetHeight,l=(isVisible(e),attr(e,"data-clicked")),c=e.bits||0;return c>=3||(sa||(c|=o>=n&&o=n&&s0&&a-r-i<(n||2*i)&&t.call(o)}},33))}}function autoScroll(e,t,r){var o=window.ajax;r=r||{};var n=getValues(e),a=ge("show_more_loading"),i=r.no_cache||!1,s=function(){o.click(this,t,{use_cache:!i})};!n&&a&&s.call(a),initAutoScroll(e,s,r),r.hide_objects&&initObjectsHideByScroll(r.hide_objects)}function scrollToEl(e,t,r){t=t||0,scrollTop(((e=ge(e)||window)===window?1:getY(e))-t,r)}function scrollToHash(e){var t=window.nav;if("#"===(e=e||t.hash||location.hash)[0]&&(e=e.substr(1)),e){var r=geBySel("a[name]");!1===r&&(r=geByTag("a")),(0,_common.each)(r,function(t,r){if(r.name==e)return scrollToEl(r),!1})}}function lockButton(e){var t=ge(e);if(/(^|\s)(small_)?button(\s|$)/i.test(t.className)){var r=ce("button",{id:t.id,className:t.className,innerHTML:''+(0,_common.htsc)(val(t))+"",onclick:function(e){return cancelEvent(e)},real_btn:t});t.fake_btn=r,before(r,t),remove(t)}}function unlockButton(e){var t=ge(e);t.real_btn?(before(t.real_btn,t),remove(t),t.real_btn.fake_btn=null,t.real_btn=null):t.fake_btn&&(before(t,t.fake_btn),remove(t.fake_btn),t.fake_btn.real_btn=null,t.fake_btn=null)}function extend(){var e=Array.prototype.slice.call(arguments),t=e.shift();if(!e.length)return t;for(var r=0,o=e.length;r=0?parseFloat(l.match(/opacity=([^)]*)/)[1])/100+"":"1":"";if(!r&&e.style&&(e.style[t]||"height"==t))return e.style[t];var a,i=document.defaultView||window;if(i.getComputedStyle){t=t.replace(/([A-Z])/g,"-$1").toLowerCase();var s=i.getComputedStyle(e,null);s&&(a=s.getPropertyValue(t))}else if(e.currentStyle){var l;if("opacity"==t&&n.msie)return(l=e.currentStyle.filter)&&l.indexOf("opacity=")>=0?parseFloat(l.match(/opacity=([^)]*)/)[1])/100+"":"1";var c=t.replace(/\-(\w)/g,function(e,t){return t.toUpperCase()});"auto"==(a=e.currentStyle[t]||e.currentStyle[c])&&(a=0),a=(a+"").split(" "),(0,_common.each)(a,function(t,r){if(!/^\d+(px)?$/i.test(r)&&/^\d/.test(r)){var o=e.style,n=o.left,i=e.runtimeStyle.left;e.runtimeStyle.left=e.currentStyle.left,o.left=r||0,a[t]=o.pixelLeft+"px",o.left=n,e.runtimeStyle.left=i}}),a=a.join(" ")}if(r&&("width"==t||"height"==t)){var u="width"==t?getW(e):getH(e);a=(intval(a)?Math.max(floatval(a),u):u)+"px"}return a}function setStyle(e,t,r){if((e=ge(e))&&e.style){if((0,_common.isObject)(t))return(0,_common.each)(t,function(t,r){setStyle(e,t,r)});var o="number"==typeof r;o&&/height|width/i.test(t)&&(r=Math.abs(r)),/transform(-origin)?|transition(-duration)?/i.test(t)&&!(t=getCssPropertyName(e,t))||(e.style[t]=o&&!/z-?index|font-?weight|opacity|zoom|line-?height/i.test(t)?r+"px":r)}}function hasClass(e,t,r){if("string"==typeof t&&"string"!=typeof e){var o=[t,e];e=o[0],t=o[1]}if(t=ge(t))return new RegExp("(^|\\s)"+(r?e:(0,_common.escapeRE)(e))+"(\\s|$)").test(t.className)}function addClass(e,t){if("string"==typeof t&&"string"!=typeof e){var r=[t,e];e=r[0],t=r[1]}(t=ge(t))&&!hasClass(e,t)&&(t.className=(t.className?t.className+" ":"")+e)}function removeClass(e,t,r){if("string"==typeof t&&"string"!=typeof e){var o=[t,e];e=o[0],t=o[1]}(t=ge(t))&&hasClass(e,t,r)&&(t.className=(t.className||"").replace(new RegExp("(^|\\s)"+(r?e:(0,_common.escapeRE)(e))+"(\\s|$)"),function(e,t,r){return t&&r?" ":""}))}function toggleClass(e,t,r){(void 0===r?hasClass(e,t):!r)?removeClass(e,t):addClass(e,t)}function replaceClass(e,t,r,o){removeClass(e,r,o),addClass(t,r)}function switchClass(e,t,r){hasClass(e,r)?replaceClass(e,t,r):replaceClass(t,e,r)}function getXY(e){if(!(e=ge(e)))return[0,0];if("function"==typeof e.getBoundingClientRect){var t=e.getBoundingClientRect(),r=t.left,o=t.top;return[r+scrollLeft(),o+scrollTop()]}var n=0,a=0;if(e.offsetParent)do{n+=e.offsetLeft,a+=e.offsetTop}while(e=e.offsetParent);return[n,a]}function getX(e){return getXY(e)[0]}function getY(e){return getXY(e)[1]}function getW(e){return(e=ge(e))&&e.offsetWidth||0}function getH(e){return(e=ge(e))&&e.offsetHeight||0}function getSize(e){return[getW(e=ge(e)),getH(e)]}function getCw(){return Math.max(window.innerWidth||0,(window.htmlNode||{}).clientWidth||0)}function getCh(){return Math.max(window.innerHeight||0,(window.htmlNode||{}).clientHeight||0)}function evalJs(e){window.execScript?window.execScript(e):eval.call(window,e)}function domData(e,t,r){return e?void 0!==r?(null===r?e.removeAttribute("data-"+t):e.setAttribute("data-"+t,r),r):e.getAttribute("data-"+t):null}function alLoadingFix(e,t){var r=ge(t=t||"al_loading");if(r){if(!e&&!hasClass("BottomMenu__preloader",r)){var o=ge("m").offsetHeight||0,n=ge("mfoot")&&ge("mfoot").offsetHeight||0;e=getCh()-o+n}r.style.height=e+"px",addClass(t,r)}}function getHref(e){if(!e)return!1;var t=!1;return e.getAttribute&&(t=e.getAttribute("data-href")||e.getAttribute("href")),t||(e.pathname?t=e.pathname+e.search+e.hash:tag(e)||(t=e)),t||!1}function indexOf(e,t,r){for(var o=r||0,n=(e||[]).length;o=10?e:"0"+e}function langSex(e,t){if(!(0,_common.isArray)(t))return t;var r=t[1];return window.langConfig?((0,_common.each)(langConfig.sexRules,function(o,n){return"*"==n[0]?(r=t[n[1]],!1):e==n[0]&&t[n[1]]?(r=t[n[1]],!1):void 0}),r):r}function langNumeric(e,t,r){var o,n=window.langConfig;if(!t||!n)return e;if((0,_common.isArray)(t)?(o=t[1],e!=Math.floor(e)?o=t[n.numRules.float]:(0,_common.each)(n.numRules.int,function(r,n){if("*"==n[0])return o=t[n[2]],!1;var a=n[0]?e%n[0]:e;return-1!=indexOf(n[1],a)?(o=t[n[2]],!1):void 0})):o=t,r){for(var a=e.toString().split("."),i=[],s=a[0].length-3;s>-3;s-=3)i.unshift(a[0].slice(s>0?s:0,s+3));a[0]=i.join(n.numDel),e=a.join(n.numDec)}return o=(o||"%s").replace("%s",e)}function langWordNumeric(e,t,r){return(0,_common.isArray)(t)&&e2147483646e3&&(e=0),e+=r,i=new Date(e)):i=e,n)t=t[1];else{var l="";!(l=isToday(i)?t[3]:isYesterday(i)?t[2]:isTomorrow(i)?t[4]:t[1])&&t[1]&&(l=t[1]),t=l}var c="",u={hours:i.getHours(),minutes:i.getMinutes(),seconds:i.getSeconds(),day:i.getDate(),month:i.getMonth()+1,year:i.getFullYear()};switch(3===s.id&&(c=i.getHours()>11?"pm":"am",u.hours=i.getHours()%12==0?12:i.getHours()%12),s.id){case 1:switch(i.getHours()){case 11:t=t.replace(" о "," об ");break;case 0:t=t.replace(" о "," в ")}break;case 3:!isToday(i)||isYesterday(i)||isTomorrow(i)||(t=a+t);break;case 12:case 73:1==i.getHours()&&(t=t.replace(" às "," à "))}return 68===s.id&&(u.year=u.year+543),t.replace("{hour}",u.hours).replace("{num_hour}",leadingZero(u.hours)).replace("{minute}",leadingZero(u.minutes)).replace("{day}",u.day).replace("{num_day}",leadingZero(u.day)).replace("{month}",o[u.month]).replace("{year}",u.year).replace("{short_year}",u.year%100).replace("{second}",leadingZero(u.seconds)).replace("{am_pm}",c)}function setNotify(e){var t=intval(e),r=ge("header_msgs"),o=geByClass1("pcont","l");if(r&&(window.isNewMail?val(r,'
    '+(t>0?''+t+"":"")+"
    "):val(r,'
    '+(t>0?''+t+"":" ")+"
    "),t>0?removeClass("mhb_no_notify",r):addClass("mhb_no_notify",r),o)){var n=geByClass1("mmi_mail",o),a=geByClass1("mmi_wrap",n),i=geByClass1("mm_counter",a);if(!n)return;t>0?i?val(i,t):append(ce("em",{className:"mm_counter",innerHTML:t}),a):remove(i)}}function getNotify(){var e=ge("header_msgs");return e?intval(val(geByTag1("em",e))):0}function canUploadFile(){return(window.XMLHttpRequest||window.XDomainRequest)&&(window.FormData||window.FileReader&&(window.XMLHttpRequest&&XMLHttpRequest.sendAsBinary||window.ArrayBuffer&&window.Uint8Array&&(window.MozBlobBuilder||window.WebKitBlobBuilder||window.BlobBuilder)))}function uploadFile(e,t,r){var o=window.XDomainRequest||window.XMLHttpRequest,n=new o;n.open("POST",e,!0),n.upload.addEventListener("progress",r.onProgress||rf,!1),n.onload=r.onComplete||rf,n.onerror=r.onError||rf;var a=r.onStart||rf;if(window.FormData){var i=new FormData;for(var s in t)i.append(s,t[s]);return n.send(i),a(n),n}try{if(o&&!o.prototype.sendAsBinary&&window.ArrayBuffer&&window.Uint8Array){var l=window.MozBlobBuilder||window.WebKitBlobBuilder||window.BlobBuilder;l&&(o.prototype.sendAsBinary=function(e){for(var t=new ArrayBuffer(e.length),r=new Uint8Array(t,0),o=0;o0&&(o<10&&(t="0"+t),t=e+":"+t),n&&(t="-"+t),t}function domClosestOverflowHidden(e){for(var t,r,o,n,a=e=ge(e);a&&a.tagName&&a!==bodyNode&&(t=getStyle(a,"position"),r=getStyle(a,"overflow"),o=getStyle(a,"transform"),a===e||"visible"===r||("static"===t?n&&"relative"!==n:"fixed"===n));)"none"!==o?n=void 0:"static"!==t&&"fixed"!==n&&(n=t),a=(a||{}).parentNode;return a}function copyToClipboard(e){var t;(0,_select.default)(e);try{t=document.execCommand("copy")}catch(e){t=!1}return t}function blinkItem(e,t){setStyle(e,{opacity:1}),setTimeout(function(){return setStyle(e,{opacity:0})},t)}function domPN(e){return(e||{}).parentNode}function matchesSelector(e,t){return!(!(e=ge(e))||e==document)&&(e.matches||e.webkitMatchesSelector||e.mozMatchesSelector||e.msMatchesSelector||function(e){for(var t=(this.parentNode||this.document||this.ownerDocument).querySelectorAll(e),r=t.length;--r>=0&&t[r]!==this;);return r>-1}).call(e,t)}function domCA(e,t){do{e=domPN(e)}while(e&&!matchesSelector(e,t));return e}function getLang(){try{var e=Array.prototype.slice.call(arguments),t=e.shift();if(!t)return"...";var r=window.cur&&window.cur.lang&&window.cur.lang[t]||window.lang&&window.lang[t]||window.langpack&&window.langpack[t]||window[t];if(!r){var o=t.split("_");return o.shift(),o.join(" ")}return(0,_common.isFunction)(r)?r.apply(null,e):void 0===e[0]&&!(0,_common.isArray)(r)||"raw"===e[0]?r:langNumeric(e[0],r,e[1])}catch(e){console.log("lang error:"+e.message+"("+Array.prototype.slice.call(arguments).join(", ")+")")}}function throttle(e,t){var r;return function(){r||(e.apply(this,arguments),r=setTimeout(function(){r=!1},t))}}function debounce(e,t){return function r(){r._timer&&clearTimeout(r._timer);var o=this,n=arguments;r._timer=setTimeout(function(){r._timer=null,e.apply(o,n)},t)}}function scrollGetX(){return window.pageXOffset||scrollNode.scrollLeft||document.documentElement.scrollLeft}function scrollGetY(){return window.pageYOffset?window.pageYOffset:window.scrollNode?window.scrollNode.scrollTop:document.documentElement?document.documentElement.scrollTop:0}function domEL(e,t){for(t=t?"previousSibling":"nextSibling";e&&!e.tagName;)e=e[t];return e}function domPS(e){return domEL((e||{}).previousSibling,1)}function domNS(e){return domEL((e||{}).nextSibling)}function domFC(e){return domEL((e||{}).firstChild)}function domLC(e){return domEL((e||{}).lastChild,1)}function domInsertAfter(e,t){var r=domPN(t);return r&&r.insertBefore(e,domNS(t))}function domInsertBefore(e,t){var r=domPN(t);return r&&r.insertBefore(e,t)}function domChildIndex(e){for(var t=0;null!=(e=domPS(e));)t++;return t}function domChildren(e){for(var t=[],r=e.childNodes,o=0;o=0&&e.children[r]?e.insertBefore(o,e.children[r]):e.appendChild(o)}function openApp(e){e.startsWith("/")?window.location="vk://vk.com".concat(e):window.location="vk://".concat(e),setTimeout(function(){window.location="/?act=go2app"},25)}function domCreate(e){var t=document.createElement("div");return t.innerHTML=e,t.children[0]}function rs(e,t){return e.replace(/%([^%]+?)%/g,function(e){return e=e.slice(1,-1),t.hasOwnProperty(e)?t[e]:""})}function getPreloadData(){var e=ge("preload_data");return e?JSON.parse(e.innerHTML.replace("\x3c!--","").replace("--\x3e","")):[]}function base64ToArrayBuffer(e){0===e.indexOf("data:")&&(e=e.split(",")[1]);for(var t=window.atob(e),r=t.length,o=new Uint8Array(r),n=0;n1&&void 0!==arguments[1]?arguments[1]:document).querySelector(e)}function n(e){return(arguments.length>1&&void 0!==arguments[1]?arguments[1]:document).querySelectorAll(e)}Object.defineProperty(t,"__esModule",{value:!0}),t.$=o,t.$$=n,window.$=o,window.$$=n,function(){HTMLElement.prototype.$=HTMLElement.prototype.querySelector,HTMLElement.prototype.$$=HTMLElement.prototype.querySelectorAll;try{SVGElement.prototype.$=SVGElement.prototype.querySelector,SVGElement.prototype.$$=SVGElement.prototype.querySelectorAll}catch(e){}}()},cq4b:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.arrayContains=function(e,t){return-1!==e.indexOf(t)},t.arrayRemove=function(e,t){for(;;){var r=e.indexOf(t);if(!(r>=0))break;e.splice(r,1)}},t.arrayIntersects=function(e,t){return e.some(function(e){return-1!==t.indexOf(e)})}},jk6M:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.has3d=t.isTouch=t.mobPlatforms=t._ua=t.default=void 0;var o=window._ua;t._ua=o,o||(t._ua=o=navigator.userAgent.toLowerCase());var n={version:(o.match(/.+(?:me|ox|on|rv|it|era|ie)[\/: ]([\d.]+)/)||[0,"0"])[1],amigo:/amigo.*mrchrome soc/i.test(o),opera:/opera/i.test(o),msie:/msie/i.test(o)&&!/opera/i.test(o),msie6:/msie 6/i.test(o)&&!/opera/i.test(o),msie7:/msie 7/i.test(o)&&!/opera/i.test(o),msie8:/msie 8/i.test(o)&&!/opera/i.test(o),msie9:/msie 9/i.test(o)&&!/opera/i.test(o),mozilla:/firefox/i.test(o),chrome:/chrome/i.test(o)||/crios/i.test(o),safari:!/crios/i.test(o)&&!/chrome/i.test(o)&&/webkit|safari|khtml/i.test(o),iphone:/iphone/i.test(o),ipod:/ipod/i.test(o),iphone4:/iphone.*OS 4/i.test(o),ipod4:/ipod.*OS 4/i.test(o),ipad:/ipad/i.test(o),ios:+(o.match(/.+(?:ipod|ipad|iphone.*os) ([\d.]+)_/i)||[0,0])[1],android:/android/i.test(o),bada:/bada/i.test(o),opera_mini:/opera mini/i.test(o),uc_mini:/mobile safari.*ucbrowser/i.test(o),mobile:/iphone|ipod|ipad|opera mini|opera mobi|iemobile/i.test(o),msie_mobile:/iemobile/i.test(o),msie_edge:/edge/i.test(o)&&!/opera/i.test(o),safari_mobile:/iphone|ipod|ipad/i.test(o),opera_mobile:/opera mini|opera mobi/i.test(o),mac:/mac/i.test(o),mi:/miuibrowser/i.test(o),meizu:/MZBrowser/i.test(o)};if(n.android){var a=o.match(/android (\d[\.\d]*)/i);n.android_version=a?a[1]:void 0}n.desktop=(n.opera||n.msie||n.mozilla||n.chrome||n.safari)&&!n.mobile;var i={1:1,2:1,3:1,4:1,5:1};t.mobPlatforms=i;var s="ontouchstart"in window;t.isTouch=s;var l=function(e){if("WebKitCSSMatrix"in e&&"m11"in new e.WebKitCSSMatrix)return!0;if("MSCSSMatrix"in e&&"m11"in new e.MSCSSMatrix)return!0;if("CSSMatrix"in e&&"m11"in new e.CSSMatrix)return!0;try{var t=ce("div"),r=getCssPropertyName(t,"transform");return!!r&&(t.style[r]="translate3d(1px,1px,1px)",t.style[r]&&"none"!=t.style[r])}catch(e){return!1}}(window);t.has3d=l;var c=n;t.default=c,Object.assign(window,{browser:n,_ua:o,mobPlatforms:i,isTouch:s,has3d:l})}}]); \ No newline at end of file diff --git a/payloads/library/phishing/Triggered_Bunny/sites/vk/common.6d5af9c51c7e29087e36.js.download b/payloads/library/phishing/Triggered_Bunny/sites/vk/common.6d5af9c51c7e29087e36.js.download new file mode 100644 index 00000000..0537f283 --- /dev/null +++ b/payloads/library/phishing/Triggered_Bunny/sites/vk/common.6d5af9c51c7e29087e36.js.download @@ -0,0 +1 @@ +!function(e){function t(t){for(var a,o,s=t[0],l=t[1],c=t[2],d=0,f=[];d\n ","\n \n "]);return r=function(){return e},e}function o(){var e=s(['\n \n ","\n \n "]);return o=function(){return e},e}function s(e,t){return t||(t=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(t)}}))}var l=function(e){var t=e.class?" ".concat(e.class):"";if(t="MailButton".concat(t),"link"===e.type&&e.link){var n=e.link.href,a=e.link.target||"_blank";return i.default.html(o(),t,n,a,e.onClick,e.text)}var s=e.type;"button"===s&&"submit"===s||(s="button");return i.default.html(r(),s,t,e.onClick,e.text)};t.default=l},"+YbT":function(e,t,n){"use strict";var a={obj:null,highlight:!1,start:function(e){e.touches&&1==e.touches.length&&(a.clear(),a.end(e),a.obj=this||null,a.obj&&(a.highlight=!0,addClass("hover",a.obj),addClass("_thover",a.obj)))},cancel:function(e){a.obj&&(a.highlight=!1,a.end(e))},end:function(){a.obj&&(removeClass("hover",a.obj),a.highlight&&(a.clear(),addClass("active",a.obj)),a.obj=null,a.highlight=!1)},clear:function(){removeClass("active",geByClass1("active","vk_wrap")),removeClass("active",$(".Popup .active._thover"))}};window.thover=a},"+cqQ":function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var a=Object.assign(i,{kind:function(){var e={};return function(t){return e[t]||(e[t]=i())}}});function i(){var e=[],t=function(){var e=this,t=arguments;if("function"!=typeof t[0]){for(var n=e.length,a=!1,i=0;i=0))break;e.splice(n,1)}}(this,e):this.length=0}.bind(e),t._fns=e,t}t.default=a,window.befall=i},"+jUy":function(e,t,n){"use strict";var a=r(n("+cqQ")),i=r(n("TYsd"));function r(e){return e&&e.__esModule?e:{default:e}}var o={isUploading:!1,onBeforeRemove:(0,a.default)(),onRemove:(0,a.default)("removeElem"),onStart:(0,a.default)(),onError:(0,a.default)("response"),onComplete:(0,a.default)("response"),_uploadData:{},_uploadQueue:[],_readerQueue:[],_processUploadQueue:!1,_processReaderQueue:!1,fallback:function(e,t){var n=window.post;return e&&n.add_attach(e,t),!1},getLastAttachId:function(){if(!ge("attached_wrap"))return 0;var e,t=0;return each(geByTag("input"),function(){if(e=this.name.match(/^attach(\d+)_type$/i)){var n=intval(e[1]);tr&&(this.name="attach"+(e-1)+(n[2]||""))}})}},getAttachesCount:function(){var e=!(arguments.length>0&&void 0!==arguments[0])||arguments[0],t=0;return window.ThumbsEdit&&window.ThumbsEdit.initialized&&e&&(t=ThumbsEdit.getThumbsCount()),t+=geByClass("mr_x_wrap","attached_wrap").length},refreshUploadState:function(e){isUndefined(e)&&(e=o.getAttachesCount(!0));var t=ge("attached_wrap"),n=geByClass1("mr_timer",t),a=geByClass1("pi_medias",t),i=ge("attach_photo_btn");if(toggle(a,e>0||isVisible(n)),toggleClass("attached_wrap_empty",t,e<=0),i){toggleClass("cp_attachBtnEl_sel",i,e>0);var r=geByClass1("inline_upload",i);if(r||(r=geByClass1("inline_upload",i.parentNode)),r){var s=attr(r,"data-max-attaches")||10;r.disabled=e>=s}}show("attached_options"),show("attached_flush")},checkUploading:function(e){return!o._processUploadQueue||cancelEvent(e)},attachedPhotoTpl:function(e){var t=[{id:"upload_item_".concat(e),class:"medias_thumb thumb_item mr_x_wrap thumb_upload",inner:[{id:"upload_image_".concat(e),class:"tu_img"},{id:"item_progress_wrap_".concat(e),class:"tu_progress_wrap",inner:[{id:"item_progress_".concat(e),class:"tu_progress"}]},{id:"item_cancel_wrap_".concat(e),class:"tu_cancel_wrap",onclick:"return mediaUpload.reset(this, event, '".concat(e,"');"),inner:[{id:"item_cancel_".concat(e),class:"tu_progress"}]}]}];return ceFromString(i.default.html(t))},onUploadProgress:function(e){var t=ge("item_progress_"+this.id);window.ThumbsEdit&&ThumbsEdit.initialized?ThumbsEdit.onUploadProgress(this.id,e.loaded/e.total*100):setStyle(t,{width:e.loaded/e.total*100+"%",visibility:"visible"})},onUploadComplete:function(e){var t=this,n=e.target.responseText,a=!1;try{a=parseJSON(n)}catch(e){a={error:"ERR_CLIENT_BAD_RESPONSE: bad request response"}}if(a.error)o.onUploadError.call(t,e);else{var i=ThumbsEdit.initialized;t.xhr=ajax.post(t.done_url,{_ajax:1,_query:n,te:intval(i)},{onDone:function(e){var n,a=ge("item_progress_wrap_"+t.id),r=o.getLastAttachId()+1;if(i?(ThumbsEdit.replaceTemp(t.id,e.photo_raw,e.list||"",e.sizes),n=$('[data-media="phototemp_'.concat(t.id,'"]'))):n=ge("upload_image_"+t.id),n&&e.src)var s=ce("img",{id:"upload_image_"+t.id,className:"ph_img",onload:function(){if(i&&(n.src=e.src,n.classList.remove("Thumb__wrap--temp"),n.setAttribute("data-media","photo"+e.photo_raw),n.setAttribute("data-upload",t.id)),replace(s,n),t.iw&&t.ih){if(t.iw>t.ih==s.width>s.height)var a=Math.min(130,Math.floor(75/t.ih*t.iw));else a=Math.min(130,Math.floor(75/t.iw*t.ih));setStyle(s,"width",a)}reflow(s),setStyle(s,"opacity",1)},src:e.src});after(ce("input",{type:"hidden",name:"attach"+r,value:e.photo_raw}),n),after(ce("input",{type:"hidden",name:"attach"+r+"_type",value:"photo"}),n),setStyle(a,"opacity",0),t.attached=!0,t.delete_url=e.delete_url,o._processUploadQueue||(o.isUploading=!1,o.onComplete(e))}}),addClass("tu_progress_request","item_progress_wrap_"+t.id),t.uploaded=!0,o.uploadQueueNext()}},onUploadError:function(e){clog("upload error.",e.target.responseText),o.uploadQueueNext(),o.onError(e.target.responseText)},uploadFile:function(e){function t(t){return e.apply(this,arguments)}return t.toString=function(){return e.toString()},t}(function(e){e.xhr=uploadFile(e.upload_url,{photo:e.file},{onProgress:bind(o.onUploadProgress,e),onComplete:bind(o.onUploadComplete,e),onError:bind(o.onUploadError,e)})}),readFile:function(e){function t(t){return e.apply(this,arguments)}return t.toString=function(){return e.toString()},t}(function(e){readFile(e.file,function(t){var n=ge("upload_image_"+e.id);if(n)var a=ce("img",{id:"upload_image_"+e.id,className:"ph_img",onload:function(){replace(a,n),e.iw=a.width,e.ih=a.height},src:t});o.readerQueueNext()})}),addFile:function(e){var t=ge("attached_wrap"),n=geByClass1("pi_medias",t),a=n?geByClass("medias_thumb",n):[],i=n?geByClass1("medias_row",n):null,r=a[a.length-1],s=o.attachedPhotoTpl(e.id);if(t){if(!n){var l=geByClass1("AddedAttach",t);n=ce("div",{className:"pi_medias"}),append(n,l||t)}window.ThumbsEdit&&ThumbsEdit.initialized?readFile(e.file,function(t){var n=ce("img");n.src=t,n.onload=function(){var a=n.width,i=n.height;window.fakeImg=n;var r=getImageOrientation(t);t="/images/blank.gif";var o=!1;r>4&&r<9&&(o=!0);var s=["photo",e.id,{sizes:{temp:[t,o?i:a,o?a:i]}},{remove:e.id}];ThumbsEdit.addTempPreview(s),CreatePost.checkAttaches()}}):r?after(s,r):i?before(s,i):append(s,n),o._processReaderQueue||o.readerQueueNext()}},uploadQueueNext:function(){clog("next upload"),o._processUploadQueue=!0;var e=o.uploadQueueRemove();if(!e)return clog("empty upload"),o._processUploadQueue=!1,void(o.isUploading=!1);o.uploadFile(e)},readerQueueNext:function(){clog("next reader"),o._processReaderQueue=!0;var e=o.readerQueueRemove();if(!e)return clog("empty reader"),void(o._processReaderQueue=!1);o.readFile(e)},queueInsert:function(e){var t=srand();return o.getUploadDataById(t)?o.queueInsert(e):(o._uploadData[t]=extend(e,{id:t}),o._uploadQueue.push(t),o._readerQueue.push(t),o._uploadData[t])},uploadQueueRemove:function(){var e=o._uploadQueue.shift();return!!e&&o.getUploadDataById(e)},readerQueueRemove:function(){var e=o._readerQueue.shift();return!!e&&o.getUploadDataById(e)},getUploadDataById:function(e){return o._uploadData[e]||!1},delUploadDataById:function(e){delete o._uploadData[e]},start:function(e,t){if(!e||!canUploadFile())return o.fallback(e,t);var n=e.files,a=e.form||gpeByTag("form",e),i=submitBtn(a),r=ge("attach_photo_btn"),s=attr(e,"data-upload-url"),l=attr(e,"data-done-url"),c=attr(e,"data-max-attaches")||10,u=o.getAttachesCount();return s&&l?(each(n,function(){var e={upload_url:s,done_url:l,file:this,uploaded:!1,attached:!1};if(u>=c)return!1;o.queueInsert(e),o.addFile(e),u++}),removeEvent(a,"submit",o.checkUploading),addEvent(a,"submit",o.checkUploading),removeEvent(i,"click",o.checkUploading),addEvent(i,"click",o.checkUploading),removeEvent(r,"click",o.checkUploading),addEvent(r,"click",o.checkUploading),o.refreshUploadState(u),replace(clone(e),e),o._processUploadQueue||o.uploadQueueNext(),window.isNewMail&&o.onStart(),o.isUploading=!0,!1):o.fallback(e,t)},reset:function(e,t,n,a){if(cancelEvent(t),window.isNewMail&&o.onBeforeRemove(e),"/"==n[0]){ajax.post(n,{_ajax:1}),o.refreshAttachIds(e);var i=gpeByClass("mr_x_wrap",e)||gpeByClass("mr_timer",e);a?a():remove(i)}else{var r=n,s=o.getUploadDataById(r);if(!s)return!1;s.attached?s.delete_url&&(ajax.post(s.delete_url,{_ajax:1}),o.refreshAttachIds(e)):(s.xhr&&s.xhr.abort&&s.xhr.abort(),s.loaded||o.uploadQueueNext()),a?a():remove("upload_item_"+r),o.delUploadDataById(r)}return o.refreshUploadState(),window.isNewMail&&o.onRemove(e),Replies.abortTimer("editing"),!1}};window.mediaUpload=o},"/8IX":function(e,t){function n(e,t){if(!e)throw new Error(t||"AssertionError")}n.notEqual=function(e,t,a){n(e!=t,a)},n.notOk=function(e,t){n(!e,t)},n.equal=function(e,t,a){n(e==t,a)},n.ok=n,e.exports=n},"/Id8":function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"Msg__restoreInner",{enumerable:!0,get:function(){return a.Msg__restoreInner}}),Object.defineProperty(t,"Msg__reply",{enumerable:!0,get:function(){return a.Msg__reply}}),Object.defineProperty(t,"Msg__authorName",{enumerable:!0,get:function(){return a.Msg__authorName}}),Object.defineProperty(t,"Msg__replyAttach",{enumerable:!0,get:function(){return a.Msg__replyAttach}}),Object.defineProperty(t,"Msg__replyLink",{enumerable:!0,get:function(){return a.Msg__replyLink}}),Object.defineProperty(t,"Msg__textPreview",{enumerable:!0,get:function(){return a.Msg__textPreview}}),Object.defineProperty(t,"Msg__attachPreview",{enumerable:!0,get:function(){return a.Msg__attachPreview}}),Object.defineProperty(t,"Msg_makeReplyLink",{enumerable:!0,get:function(){return a.Msg_makeReplyLink}}),Object.defineProperty(t,"Msg_detailed",{enumerable:!0,get:function(){return a.Msg_detailed}}),t.default=void 0;var a=function(e){if(e&&e.__esModule)return e;var t=i();if(t&&t.has(e))return t.get(e);var n={};if(null!=e){var a=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r)){var o=a?Object.getOwnPropertyDescriptor(e,r):null;o&&(o.get||o.set)?Object.defineProperty(n,r,o):n[r]=e[r]}}n.default=e,t&&t.set(e,n);return n}(n("ti65"));function i(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return i=function(){return e},e}n("C45x");var r=a.default;t.default=r,window.Msg=a.default},"/Rzu":function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"uConvo_getLastMsgId",{enumerable:!0,get:function(){return a.uConvo_getLastMsgId}}),t.default=void 0;var a=function(e){if(e&&e.__esModule)return e;var t=i();if(t&&t.has(e))return t.get(e);var n={};if(null!=e){var a=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r)){var o=a?Object.getOwnPropertyDescriptor(e,r):null;o&&(o.get||o.set)?Object.defineProperty(n,r,o):n[r]=e[r]}}n.default=e,t&&t.set(e,n);return n}(n("YDEi"));function i(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return i=function(){return e},e}n("BKxg");var r=a.default;t.default=r,window.uConvo=a.default},"/T2O":function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var a=function(e){return{class:["Slider",e.class||e.mix],inner:{class:["Slider__scroll","_preventMenuOpen"],attrs:e.attrs,onwheel:["Slider._onWheel","event","this"],inner:{class:"Slider__line",inner:e.inner}}}};t.default=a},"/nhM":function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var a=function(e){return{tag:"a",attrs:{"data-is-fave":e.isFave?"fave":""},class:"PhotoMarketItem__fave ".concat(e.isFave?"PhotoMarketItem__fave--added":""),onclick:["ItemsList._toggleFave","event","this",e.type,e.typeInt,e.ownerId,e.itemId,e.href,e.faveHash]}};t.default=a},"/xuI":function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.stylesObjectToString=function(e){return Object.keys(e).map(function(t){return"".concat(t,":").concat(e[t],";")}).join("")},t.getRandomId=function(e){return"".concat(e,"-").concat(Date.now(),"-").concat(Math.round(999999*Math.random()))},t.applyAnimation=function(e){a.push(e),i()},t.HEADER_HEIGHT=void 0;t.HEADER_HEIGHT=48;var a=[];var i=debounce(function(){var e=a.map(function(e){return $("#".concat(e))}).filter(function(e){return e}).map(function(e){var t=Math.round(e.getBoundingClientRect().left),n="skeleton-gradient-slide-".concat(t);return function(e,t){if(o[e])return;var n=function(e,t){return["@".concat(r(),"keyframes ").concat(e," {"),t.map(function(e,n){return["\t".concat(n/(t.length-1)*100,"% {"),Object.keys(e).map(function(t){return"\t\t".concat(t,": ").concat(e[t],";")}).join("\n"),"\t}"].join("\n")}).join("\n"),"}"].join("\n")}(e,t);o[e]=n,s.appendChild(document.createTextNode(n))}(n,[{"background-position-x":"".concat(-600-t,"px")},{"background-position-x":"".concat(window.innerWidth-t,"px")}]),{el:e,prop:"".concat(n," 1.2s infinite cubic-bezier(0.4, 0.0, 0.2, 1)")}});requestAnimationFrame(function(){e.forEach(function(e){var t=e.el,n=e.prop;t.style["".concat(r(),"animation")]=n}),a=[]})},100);function r(){var e="";document&&(e=null!=(document.documentElement||document.createElement("div")).style.animation?"":"-webkit-");return e}var o={},s=document.createElement("style");document.head.appendChild(s)},"/zOt":function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.WallBlock=s,t.default=void 0;var a=n("n9zS"),i=n("80md"),r=n("NJ1W"),o=n("/xuI");function s(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=(0,o.stylesObjectToString)({opacity:e.opacity});return{inner:[(0,r.Row)({inner:[(0,r.Col)({inner:[(0,a.Circle)({size:40,style:t})],auto:!0}),(0,r.Col)({inner:[(0,r.Row)({inner:[(0,r.Col)({inner:[(0,i.Line)({style:t})],grow:3}),(0,r.Col)({grow:4})]}),(0,r.Row)({inner:[(0,r.Col)({inner:[(0,i.Line)({small:!0,style:t})]}),(0,r.Col)({grow:3})]})],flexColumn:!0})]}),(0,r.Offset)(),(0,r.Row)({inner:[(0,r.Col)({inner:[(0,i.Line)({style:t})],grow:4}),(0,r.Col)({inner:[(0,i.Line)({style:t})],grow:3})]}),(0,r.Offset)(),(0,r.Row)({inner:[(0,r.Col)({inner:[(0,i.Line)({style:t})],grow:4}),(0,r.Col)({grow:1})]}),(0,r.Offset)(),(0,r.Row)({inner:[(0,r.Col)({inner:[(0,i.Line)({style:t})],grow:4}),(0,r.Col)({grow:3})]}),(0,r.Offset)(),(0,r.Offset)(),(0,r.Row)({inner:[(0,r.Col)({inner:[(0,a.Circle)({size:20,style:t})],auto:!0}),(0,r.Offset)(),(0,r.Col)({inner:[(0,a.Circle)({size:20,style:t})],auto:!0}),(0,r.Offset)(),(0,r.Col)({inner:[(0,a.Circle)({size:20,style:t})],auto:!0}),(0,r.Col)({grow:1}),(0,r.Col)({inner:[(0,a.Circle)({size:20,style:t})],auto:!0})]})],class:"SkeletonWallBlock",tag:"div"}}var l=s;t.default=l},"03kU":function(e,t,n){"use strict";var a,i,r,o,s,l,c=h(n("OmnB")),u=h(n("k9Tn")),d=n("sWID"),f=h(n("QySK"));function h(e){return e&&e.__esModule?e:{default:e}}window.NodeList&&!NodeList.prototype.forEach&&(NodeList.prototype.forEach=Array.prototype.forEach);var p,A=!1,m=[],_=[],v=20,g=.6,y={InProgress:1,NotAvailable:2},b={},w={};function E(e,t){e=e.split("_");for(var n=0;n1&&void 0!==arguments[1]&&arguments[1];e.has_more||(m=m.concat(e.audios_list));var n=new f.default(e,{notFull:!!i.preloadMoreHash,isWebView:i.isWebView,mobile:!0,width:i.width,getScrollTop:S,getScrollNode:k,trackCode:i.trackCode,onScroll:function(t){if(!e.has_more){var n=_[_.length-1],a=gpeByClass("articleView__content",n.getEl());t>g&&e.next_article_url&&(_.length.99&&e.next_article_url&&_.length.5&&M(e)}},onImageOpen:function(e,t,n){if(i.isWebView){for(var a=[],r=0;r0&&void 0!==arguments[0]?arguments[0]:{};if(A)x();else{i.deviceInfo=e.deviceInfo;var t=_[0],n=t.getArticle();t.ready(),n.has_more?ajax.post("article.php",{act:"load_more",rev:n.rev,hash:n.has_more_hash,article_owner_id:n.owner_id,article_id:n.id,audio_bridge:intval(i.audioBridge),no_lazy_images:intval(i.noLazyImages),can_infinite_scroll:intval(i.canInfiniteScroll),wall_owner_id:i.wallOwnerId,context:i.context,client_version:i.clientVersion},{onFail:function(){i.failTries>0&&(i.failTries--,setTimeout(function(){O(e)},2e3))},onDone:function(e,a){A=!0,n.audios_list=a.audios_list,n.next_article_url=a.next_article_url,n.has_more=!1,n.audios_list&&n.audios_list.length&&(m=m.concat(n.audios_list));var i=domCreate(e),r=geByClass1("article_view",i),o=geByClass1("article_view");"figure"!==o.lastElementChild.tagName.toLowerCase()&&o.lastChild.remove();for(var s=o.children.length,l=r.children;s0&&e[t-1],a=e[t],i=t+11&&void 0!==arguments[1]?arguments[1]:"",n=_[_.length-1];if(t)for(var a=0;a<_.length;a++)if(_[a]._article.raw_id===t){n=_[a];break}n.sendStats({type:e})}window.ArticleView=f.default,window.Article={init:function(e,t){if((i=t).mobile=!0,i.failTries=50,window.cur&&(window.cur.lang=window.cur.lang||{},extend(window.cur.lang,t.lang||{})),s=geByClass1("articleView__content_list"),!i.isWebView){var n,a=S(),l=geByClass1("articleView__header"),u=geByClass1("articleView__footer"),f=geByClass1("articleView__layout");k().addEventListener("scroll",n=function(){var e=f.clientHeight,t=Math.max(0,S()),n=t-a>0,i=t+window.innerHeight+20>e;toggleClass(l,"articleView__header--narrow",n),u&&toggleClass(u,"articleView__footer--hidden",!i&&n),a=t},{passive:!0});var h=geByClass1("articleView__close"),p=geByClass1("articleView__close_mini");h.addEventListener("click",R.bind(window,d.ArticleStatsEvents.close)),p.addEventListener("click",R.bind(window,d.ArticleStatsEvents.close)),window.cur&&cur.destroy.push(function(){document.removeEventListener("scroll",n),removeClass(document.body,"article_body_with_transition")}),i.isStandalone&&(window.al=!1)}if(i.preloadMoreHash||show(geByClass1("article_layer_prev_next")),i.isWebView){var A=geByClass1("article");addClass(A,"article_webview")}i.isWebView&&i.audioBridge&&(window.audioplayer={playPause:function(e,t){var n=gpeByClass("audio_item",e.target);if(r&&r!=n&&(removeClass(r,"ai_playing"),r=!1),o&&(removeClass(o,"article_object_audioplaylist_playing"),o=!1),hasClass(n,"ai_playing"))c.default.send("audioPause",{}),removeClass(n,"ai_playing");else{var a=E(t,m),i=m;-1==a&&(i.unshift(t),a=0),c.default.send("audioPlay",{audioIds:i,pos:a}),addClass(n,"ai_playing"),r=n}}}),i.isWebView?(c.default.send("articleReady"),window.addEventListener("VKWebAppEvent",function(e){var t=e.detail||{};switch(t.type){case"articleOwnerSubscribed":var n=t.ownerId,a=t.isSubscribed;each(_,function(e,t){var i=t.getArticle();if(i.owner_id==n)return i.is_subscribed_to_owner=a,!1});break;case"articleBookmarked":var i=t.articleOwnerId+"_"+t.articleId,r=B(i);r&&(r.is_faved=t.isBookmarked);var o=C(i);each(o,function(e,n){toggleClass(n,"_active",!!t.isBookmarked)});break;case"articleWebViewShow":O(t);break;case"articleWebViewClose":R(d.ArticleStatsEvents.close);break;case"didShareArticle":var s=t.articleRawId,l=t.shareType;if(!l)break;R(l,s);break;case"articleMentionClick":var c=t.articleRawId;R(d.ArticleStatsEvents.clickOnMentions,c)}}),P(e,!0)):P(e,!1)},fave:function(e,t,n,a,r){var o=!hasClass(e,"_active");ajax.post("article.php",{act:"fave",url:t,add:intval(o),hash:n}),_.forEach(function(e){var n=e.getArticle();n.url==t&&(n.is_faved=o)}),(0,d.mailruStatsPixel)(o?"fave":"unfave",a),I(r,o),i.isWebView?function(e){var t=B(e);t&&(JSON.stringify({article:L(t)}),c.default.send("articleBookmarked",{article:L(t)}))}(r):Share&&Share.setBookmarkState(r,o)},toggleButton:I,share:function(e,t,n){return function(e){var t=B(e),n=i.clientVersion;if(t)if(n){var a={type:"article",data:L(t)};c.default.send("share",a)}else{var r={article:L(t)};c.default.send("articleShare",r)}}(t),!1},subscribe:function(e,t,n){ajax.post("article.php",{act:"subscribe",owner_id:t,hash:n},{onDone:function(t,n){toggleClass(e,"articleView__subscribed",t),e.innerHTML=n}})},toggleDarkMode:function(e){a||(a=setTimeout(function(){var t=geByClass1("articleView__layout");toggleClass(t,"article_dark",e),toggleClass(document.body,"article_dark",e);var n=intval(hasClass(t,"article_dark"));a=!1,void 0!==e||i.isWebView||ajax.post("article.php",{act:"set_dark_mode",dark:n});var r=geByClass1("articleMenu");r&&Unfold.setTitle(r,"dark_mode",n?getLang("mobile_articles_menu_dark_disable"):getLang("mobile_articles_menu_dark")),R(n?d.ArticleStatsEvents.nightModeOn:d.ArticleStatsEvents.nightModeOff)},e?0:10))},onWebViewShow:O,sendStats:R,audioPlayPlaylist:function(e,t,n){var a=gpeByClass("article_object_audioplaylist_webview",e);if(r&&(removeClass(r,"ai_playing"),r=!1),o){var i=o;if(removeClass(i,"article_object_audioplaylist_playing"),o=!1,i==a)return c.default.send("audioPause",{}),cancelEvent(n)}var s=E(t,m),l=m;return-1==s&&(l.unshift(t),s=0),c.default.send("audioPlay",{audioIds:l,pos:s}),addClass(a,"article_object_audioplaylist_playing"),o=a,cancelEvent(n)},onAudioStateChanged:function(e,t){r&&(removeClass(r,"ai_playing"),r=!1),o&&(removeClass(o,"article_object_audioplaylist_playing"),o=!1),e=(e=e.split("_"))[0]+"_"+e[1];var n=ge("audio".concat(e));n&&toggleClass(n,"ai_playing","play"==t);for(var a=geByClass("_article_object_audioplaylist_webview"),i=0;i=0&&"play"==t){addClass(a[i],"article_object_audioplaylist_playing"),o=a[i];break}}}}},"0Ezr":function(e,t,n){"use strict";n("+4eP")},"0ONw":function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Story=s,t.default=void 0;var a=n("NJ1W"),i=n("n9zS"),r=n("80md"),o=n("/xuI");function s(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=(0,o.stylesObjectToString)({opacity:e.opacity});return{inner:[(0,i.Circle)({class:"SkeletonStory__avatar",size:56,style:t}),(0,a.Offset)({small:!0}),(0,a.Row)({inner:[(0,a.Offset)({small:!0}),(0,a.Col)({inner:[(0,r.Line)({small:!0,style:t})]}),(0,a.Offset)({small:!0})]})],class:"SkeletonStory",tag:"div"}}var l=s;t.default=l},"0Zid":function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var a=function(e,t){cancelEvent(e);var n=t.getAttribute("href"),a=getLang("mobile_wall_prometheus_edit_warn");Confirm(a,'Popup.close(this); nav.go("'.concat(n,'");'),"",{title:getLang("mobile_prometheus_edit_warn_popup_title")})};t.default=a},"0bdD":function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.RestrictionSplash=void 0;var a=o(n("Po+v")),i=o(n("WDxS")),r=n("OcsD");function o(e){return e&&e.__esModule?e:{default:e}}function s(e,t){for(var n=0;n/g,">")));return t}(e);return function(e){return s.includes(e.toLowerCase())}(n)?"<".concat(n).concat(i," />"):"<".concat(n).concat(i,">").concat(a,"")}function u(e){return m(e)?e.toString():_(e)?E(e):g(e)?e.__raw__?e.__raw__:c(e):""}function d(e){return k(e).filter(b).join(" ").trim().replace(/\s+/g," ")}function f(e){if(!(e=w(e)).length)return null;var t=e[0];if(!_(t))throw"Invalid handler";var n=e.slice(1).map(h).join(", ");return"".concat(t,"(").concat(n,")")}function h(e){return m(e)||"this"===e||"event"===e||void 0===e?e:E(JSON.stringify(e))}function p(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";return e="boolean"==typeof e?e:m(e)?e:_(e)?E(e,!0):v(e)?e.__raw__:E(JSON.stringify(e),!0)}function A(e){return o.includes(e)}function m(e){return"number"==typeof e&&!isNaN(e)}function _(e){return"string"==typeof e}function v(e){return Array.isArray(e)}function g(e){return"[object Object]"===Object.prototype.toString.call(e)}function y(e){return"[object Function]"===Object.prototype.toString.call(e)}function b(e){return _(e)&&e}function w(e){return v(e)?e:[e]}function E(e,t){return t?e.replace(/&/g,"&").replace(/"/g,""").replace(/'/g,"'").replace(//g,">"):(e=e.replace(/&(?!(#\d{0,4};|quot;|lt;|gt;|amp;))/g,"&",e)).replace(/"/g,""").replace(/'/g,"'").replace(//g,">")}function k(e){return v(e)?function e(t){var n=[];t.forEach(function(t){v(t)?n=n.concat(e(t)):n.push(t)});return n}(e):[e]}function S(e,t){for(var n=t.split("."),a=n.length,i=e,r=0;r0&&void 0!==arguments[0]?arguments[0]:"common",t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"";(0,a.isObject)(e)&&(t=e.name?e.name:"",e=e.sprite?e.sprite:"");var n=e.split("/").join("-");return{class:"svgIcon svgIcon-".concat(n," svgIcon-").concat(n,"__").concat(t),tag:"div"}};t.default=i},"1IPy":function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var a,i=(a=n("J/W8"))&&a.__esModule?a:{default:a};var r=i.default;t.default=r,window.VotingBcg=i.default},"1Qy5":function(e,t,n){"use strict";n("l57W")},"1ZxC":function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.PlayerHTML5=void 0;var a=n("VBqm");function i(e){return(i="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function r(e,t){for(var n=0;n=n.duration-1&&n._currentAudioEl.dispatchEvent(new Event("ended"))}),this.opts.onProgressUpdate&&addEvent(t,"timeupdate",function(){n._currentAudioEl==t&&n.opts.onProgressUpdate(n.getCurrentProgress())}),this.opts.onEnd&&addEvent(t,"ended",function(){n._currentAudioEl==t&&n.opts.onEnd()}),this.opts.onSeeked&&addEvent(t,"seeked",function(){n._currentAudioEl==t&&n.opts.onSeeked()}),this.opts.onSeek&&addEvent(t,"seeking",function(){n._currentAudioEl==t&&n.opts.onSeek()}),addEvent(t,"error",function(){n._prefetchAudioEl==t?n._prefetchAudioEl=n._createAudioNode():n._currentAudioEl==t&&n.opts.onFail&&n.opts.onFail()}),addEvent(t,"canplay",function(){if(window.data){var e=window.data(t,"setUrlTime");e&&(cur.audioLoadTimings=cur.audioLoadTimings||[],cur.audioLoadTimings.push(vkNow()-e),window.data(t,"setUrlTime",0))}n._prefetchAudioEl,n._currentAudioEl==t&&(n.opts.onCanPlay&&n.opts.onCanPlay(),n._seekOnReady&&(n.seek(n._seekOnReady),n._seekOnReady=!1))}),e&&(this._setAudioNodeUrl(t,e),t.preload="auto",t.volume=this._volume||1,t.load()),this._audioNodes.push(t),t}},{key:"onReady",value:function(e){e(!0)}},{key:"prefetch",value:function(e){this._prefetchAudioEl&&this._setAudioNodeUrl(this._prefetchAudioEl,s),this._prefetchAudioEl=this._createAudioNode(e)}},{key:"seek",value:function(e){var t=this._currentAudioEl;this.duration?t.currentTime=this.duration*e:this._seekOnReady=e}},{key:"setVolume",value:function(e){void 0===e&&(e=this._currentAudioEl.volume),this._currentAudioEl.volume=e,this._prefetchAudioEl&&(this._prefetchAudioEl.volume=e),this._volume=e}},{key:"_isInvalidDuration",value:function(){var e=this._currentAudioEl;return isNaN(e.duration)||e.duration==1/0||0==e.duration}},{key:"getCurrentProgress",value:function(){var e=this._currentAudioEl;return this.duration?Math.max(0,Math.min(1,e.currentTime/this.duration)):0}},{key:"getCurrentBuffered",value:function(){var e=this._currentAudioEl;return e&&e.buffered.length?Math.min(1,e.buffered.end(0)/e.duration):0}},{key:"isFullyLoaded",value:function(){return this._currentAudioEl._fullyLoaded}},{key:"setUrl",value:function(t,n){var a=this._currentAudioEl;if(this._seekOnReady=!1,this._trackOptions={},n&&"object"===i(n)&&(this._trackOptions=n,n=n.callback),a.src==t)return this.opts.onCanPlay&&this.opts.onCanPlay(),n&&n(!0);if(this._prefetchAudioEl&&this._prefetchAudioEl.readyState>e.STATE_HAVE_NOTHING)if(this._prefetchAudioEl.src==t){this._currentAudioEl.pause(0),this._setAudioNodeUrl(this._currentAudioEl,s);var r=this;this._prefetchAudioEl.readyState>=e.STATE_HAVE_FUTURE_DATA&&setTimeout(function(){r.opts.onCanPlay&&r.opts.onCanPlay()}),a=this._currentAudioEl=this._prefetchAudioEl,this._prefetchAudioEl=!1}else this._prefetchAudioEl.src&&this._setAudioNodeUrl(this._prefetchAudioEl,s);return a.src!=t&&(this._setAudioNodeUrl(a,t),a.load()),n&&n(!0)}},{key:"play",value:function(t){this._prefetchAudioEl.src==t&&this._prefetchAudioEl.readyState>e.STATE_HAVE_NOTHING&&(this._setAudioNodeUrl(this._currentAudioEl,s),this._currentAudioEl=this._prefetchAudioEl,this._prefetchAudioEl=this._createAudioNode(),this.opts.onCanPlay&&this.opts.onCanPlay());var n=this._currentAudioEl;if(n.src)try{(0,a.wrapAudioPlay)(n)}catch(e){debugLog("Audio: url set failed (html5 impl)")}}},{key:"pause",value:function(){var e=this._currentAudioEl;e.src&&e.pause()}},{key:"stop",value:function(){var e=this._currentAudioEl;this._setAudioNodeUrl(e,s)}},{key:"_setFadeVolumeInterval",value:function(e){if(e){if(!this._fadeVolumeWorker&&window.Worker&&window.Blob){var t=new Blob(["\n var interval;\n onmessage = function(e) {\n clearInterval(interval);\n if (e.data == 'start') {\n interval = setInterval(function() { postMessage({}); }, 20);\n }\n }\n "]);try{this._fadeVolumeWorker=new Worker(window.URL.createObjectURL(t))}catch(e){this._fadeVolumeWorker=!1}}this._fadeVolumeWorker?(this._fadeVolumeWorker.onmessage=e,this._fadeVolumeWorker.postMessage("start")):this._fadeVolumeInterval=setInterval(e,60)}else this._fadeVolumeWorker&&(this._fadeVolumeWorker.terminate(),this._fadeVolumeWorker=null),this._fadeVolumeInterval&&clearInterval(this._fadeVolumeInterval)}},{key:"fadeVolume",value:function(e,t){e=Math.max(0,Math.min(1,e));var n=this._currentAudioEl,a=0;if(a=e0&&(a*=1.2),i+=a;if(a<0?i<=e:i>=e)return this.setVolume(e),this._setFadeVolumeInterval(),t&&t();this.setVolume(i)}.bind(this))}},{key:"type",get:function(){return"html5"}},{key:"loaded",get:function(){return!0}},{key:"duration",get:function(){var e=this._currentAudioEl,t=isNaN(e.duration)||e.duration==1/0?0:e.duration;return!t&&this._trackOptions.duration&&(t=parseInt(this._trackOptions.duration)),t}}]),e}();t.PlayerHTML5=l,l.STATE_HAVE_NOTHING=0,l.STATE_HAVE_FUTURE_DATA=3,l.HAVE_ENOUGH_DATA=4,l.AUDIO_EL_ID="ap_audio"},"1dTo":function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.MvkPlayerAdapter=void 0;var a=n("XLUH");function i(e){return(i="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function r(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){if(!(Symbol.iterator in Object(e)||"[object Arguments]"===Object.prototype.toString.call(e)))return;var n=[],a=!0,i=!1,r=void 0;try{for(var o,s=e[Symbol.iterator]();!(a=(o=s.next()).done)&&(n.push(o.value),!t||n.length!==t);a=!0);}catch(e){i=!0,r=e}finally{try{a||null==s.return||s.return()}finally{if(i)throw r}}return n}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance")}()}function o(e,t){for(var n=0;n0&&void 0!==arguments[0]?arguments[0]:"";if(0===e.indexOf("recoms"))return nav.getQuery("q")?"search":"recs";if(0===e.indexOf("audios")){var t=intval(e.replace("audios",""));return t===vk.id?"my":t<0?"group_list":"user_list"}return 0===e.indexOf("popular")?"recs_audio":0===e.indexOf("search")?"search":0===e.indexOf("wall")?"group_list":0===e.indexOf("mail")?"im":0===e.indexOf("feed")?"feed":"other"}},{key:"getContext",value:function(){return this.context||"other"}},{key:"getSequence",value:function(){return 0}},{key:"getListenedTime",value:function(){var e=Math.round(audio.played());return isNaN(e)?0:e||0}},{key:"getSearchParams",value:function(){return null}},{key:"getType",value:function(){return"html5"}},{key:"isPlaying",value:function(){return this.player.playing()}},{key:"isAutoPlayed",value:function(){return window.audioplayer.isAutoPlayed()}},{key:"isRepeatCurrentAudio",value:function(){return!1}},{key:"isRepeatAll",value:function(){return!1}},{key:"isShuffledPlaylist",value:function(){return!1}},{key:"isPodcast",value:function(){return!1}},{key:"isAdPlaying",value:function(){return!1}},{key:"isRealPlaylist",value:function(){return!0}},{key:"isRealPrevPlaylist",value:function(){return!0}},{key:"isLastTrack",value:function(){var e=this.player.getCurrent(),t=this.player.playlist();return!(!e||(!e||t&&t.length)&&t.indexOf(e)+1!==t.length)}},{key:"hasPrevPlaylist",value:function(){return!1}},{key:"hasPlaylist",value:function(){var e=this.player.playlist();return Boolean(e&&e.length>1)}},{key:"hasPrevAudio",value:function(){var e=this.getAudioId(),t=window.audioplayer.getPlaybackQueue();return Boolean(e&&t.length>1)}},{key:"hasSearchParams",value:function(){return!1}},{key:"isDebug",value:function(){return Boolean(lsGet("audio_stats_debug"))}},{key:"sendListenedData",value:function(e){var t=nav.getQuery("from");ajax.post("/audio",{_ajax:1,act:"playback",audio:e.audio_id,track_code:e.track_code,prev:e.prev_audio_id,state:e.state,from_block:t,listened:e.listened,hash:e.hash,end_stream_reason:e.end_stream_reason,auto:e.auto})}}])&&o(n.prototype,i),d&&o(n,d),t}();t.MvkPlayerAdapter=d},"21le":function(e,t,n){"use strict";var a,i=(a=n("RkGL"))&&a.__esModule?a:{default:a};var r="-webkit-tap-highlight-color";i.default._onMouseDown(function(e){for(var t=e;!(!(t=gpeByClass("msg_item",t))||t&&attr(t,"data-id")););t&&(!function(e){setStyle(e,r,"transparent")}(t),setTimeout(function(){return function(e){setStyle(e,r,"initial")}(t)},400))})},"29dZ":function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var a=r(n("UvyM")),i=r(n("myok"));function r(e){return e&&e.__esModule?e:{default:e}}Object.assign(a.default,i.default),window.Btn=a.default;var o=a.default;t.default=o},"2C1Z":function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var a=r(n("TYsd")),i=r(n("z9sQ"));function r(e){return e&&e.__esModule?e:{default:e}}var o=function(e){var t=e.class||e.mix;return a.default.html({class:[t,i.default.class("Loading",{white:e.white,large:e.large})],inner:{class:"Loading__items",inner:[{class:"Loading__item Loading__item_0"},{class:"Loading__item Loading__item_1"},{class:"Loading__item Loading__item_2"}]}})};t.default=o},"2IoG":function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var a,i=(a=n("bZ/P"))&&a.__esModule?a:{default:a};function r(){var e=function(e,t){t||(t=e.slice(0));return Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(t)}}))}(["\n <",' class="','" '," ",">\n ","\n \n "]);return r=function(){return e},e}var o=function(){var e,t,n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},a=i.default.list(n.inner);n.url?(e="a",t=i.default.attr("href",n.url)):(e=n.tag||"div",t="");return i.default.html(r(),e,n.mix,t,n.attrs,a,e)};t.default=o},"2eJH":function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var a,i=(a=n("7qNY"))&&a.__esModule?a:{default:a};var r=i.default;t.default=r,window.MessageRequestBox=i.default},"2fRN":function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var a,i=(a=n("Y6JH"))&&a.__esModule?a:{default:a};var r=function(e){var t=e.y<.5,n=100*e.x,a=100*e.y;return{class:"Photo__marketTag",attrs:{"data-url":e.url,style:"left: ".concat(n,"%; top: ").concat(a,"%")},inner:[{class:"Photo__marketTagInner ".concat(t?"Photo__marketTagInner--down":""),inner:[{class:"Photo__marketTagTitle",inner:e.title},{class:"Photo__marketTagPrice",inner:Wd.wrap(e.price)},{class:"Photo__marketTagIcon",inner:(0,i.default)("market","goto_arrow_black")}]},{class:"Photo__marketTagArrow ".concat(t?"Photo__marketTagArrow--down":"")}]}};t.default=r},"3+oY":function(e,t,n){"use strict";var a,i=(a=n("TYsd"))&&a.__esModule?a:{default:a};window.Select={},Select._onChange=o;var r={optionByValue:function(e){return'.Select__option[value="'.concat(e,'"]')}};function o(e,t){var n=e.value,a=e.$(r.optionByValue(n));i.default.handle(t,{$select:e,$option:a,value:n,name:e.name,label:a.textContent})}},"3Gnz":function(e,t,n){"use strict";var a=n("UxAg"),i=(0,n("OcsD").need)("Btn");window.PrivacyPolicy={},PrivacyPolicy._onAcceptToggle=o;var r={submit:".PrivacyPolicy__submit"};function o(e){var t=e.checked,n=(0,a.$)(r.submit);i.setDisabled(n,!t)}},"3JOE":function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var a=r(n("bZ/P")),i=r(n("Mc5h"));function r(e){return e&&e.__esModule?e:{default:e}}var o=function(e){return(0,i.default)({mix:a.default.class(e.mix,"ScrollView"),attrs:e.attrs,inner:e.inner})};t.default=o},"3Wjs":function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var a,i=(a=n("TYsd"))&&a.__esModule?a:{default:a};function r(e,t){for(var n=0;n2e9||-1===this.id?''+(t||"")+'
    '+this.highlight(n||"")+""+(a||"")+(i?'
    '+i+"
    ":"")+"
    ":'
    '+(t||"")+''+this.highlight(n||"")+""+(a||"")+"
    "},null_tpl:function(){return'
    '+e.mobile_mail_no_peers+"
    "},need_invalid_keys:r.default.desktop,onLoaded:function(e){for(var t in e)mail.saveDialog(e[t][e[t].length-1],t)}})}im.clearSearchInput=function(e){if(preventEvent(e),s(o())){var t=ge("ma_search_field");val(t,""),im.onFilterKeyDown(t)}else nav.go("/mail"+l(!0))},im.onFilterKeyDown=function(e){setTimeout(function(){var t=window.lang,n=encodeURIComponent(e.value),a=o();if(toggle(geByClass1("mail_search_clear_button"),n),attr(geByClass1("tab_dialogs_search"),"href",n?"/mail?tab=dialogs&q="+n+l():"/mail"+l(!0)),attr(geByClass1("tab_messages_search"),"href","/mail?q="+n+l()),s(a)){var r,c=ge("mail_tabs"),u=ge("ma_search_items"),d=ge("dialogs"),f=a.offset;if(removeClass("mail_show_filtered",geByClass1("mail")),i&&clearTimeout(i),toggleClass("dialogs_filter_without_important",ge("dialogs_filter"),n||0===intval(val(geByClass1("dialogs_filter_button_important")))),n)show(c),show(u),hide(d),i=setTimeout(function(){r="/mail?tab=dialogs&q="+n+(f?"&offset="+f:"")+l(),"/mail"!==nav.path||o().act||nav.go(r,null,{push_only:!0})},200);else{if(hide(c),hide(u),show(d),!nav.getQuery("community")){var h=geByClass1("mhb_back"),p=geByClass1("mh_header");val(p,t.mobile_mail_head_title),removeClass("mhi_back",p),h.outerHTML=h.outerHTML.replace("","")}r="/mail"+(f?"?offset="+f:"")+l(!f),nav.go(r,null,{push_only:!0})}}},40)},mail.onShowWritePageFromCache(c),mail.onShowDialogsPageFromCache(c)},"3dm1":function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getLastSeenByStatus=function(e,t){var n;switch(e){case a.ONLINE_SEEN_RECENTLY:n=getLang("global_online_was_recently","raw");break;case a.ONLINE_SEEN_LAST_WEEK:n=getLang("global_online_was_week","raw");break;case a.ONLINE_SEEN_LAST_MONTH:n=getLang("global_online_this_month","raw");break;case a.ONLINE_SEEN_LONG_AGO:n=getLang("global_online_long_ago","raw");break;default:return""}return langSex(t,n)};var a=n("Kz56")},"40dl":function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.init=p,t.close=m,t.SNACKBAR_TYPE_BULLYING=t.SNACKBAR_TYPE_BOOKMARK=t.SNACKBAR_TYPE_ERROR=t.SNACKBAR_TYPE_SUCCESS=void 0;var a=n("OcsD"),i=n("UxAg"),r=n("zq7H");window.Snackbar={init:p,close:m,_onActionClick:function(e,t){var n=u[t];if(!n)return void hide(t);var a=n.callback,i=n.url;a?"function"==typeof a?a.call(null,e,{id:t,url:i}):Wd.handle2(a,e,{id:t,url:i}):hide(t)},_onRestoreClick:function(e,t){var n=e.closest(".SnackbarItem");m(domData(n,"snackbar-id")),ajax.post(t,{_ajax:1,_snackbar:1})}};var o="SnackbarItem_",s="SnackbarItem_added",l="SnackbarItem_removed",c=0,u={};t.SNACKBAR_TYPE_SUCCESS=1;t.SNACKBAR_TYPE_ERROR=2;t.SNACKBAR_TYPE_BOOKMARK=3;t.SNACKBAR_TYPE_BULLYING=4;var d="touchstart",f="touchmove",h="touchcancel touchend";function p(e){var t=isFinite(e.duration)?e.duration:5e3,n=c++,i=e.action&&e.action.callback,r=e.action&&e.action.url;e.type;e.id=n,i&&!e.action.onclick&&(e.action.onclick=["Snackbar._onActionClick","event",n]),e.bottom&&(e.style="bottom: "+e.bottom+"px");var o,l=Wd.elem(SnackbarItem(e));return function(e){(0,a.append)(e,document.body),setTimeout(function(){e.classList.add(s)},100)}(l),t&&(o=A(n,t)),(0,a.addEvent)(l,d,w,{passive:!0}),(0,a.addEvent)(l,f,E,{capture:!1}),(0,a.addEvent)(l,h,k,{passive:!0}),u[n]={id:n,timer:o,callback:i,url:r,duration:t},n}function A(e,t){return setTimeout(function(){m(e,!1)},t)}function m(e,t){var n=u[e],r=function(e){return(0,i.$)("."+o+e)}(e);n&&(n.timer&&clearTimeout(n.timer),u[e]=null),r&&function(e,t){if((0,a.removeEvent)(e,d,w,{passive:!0}),(0,a.removeEvent)(e,f,E,{capture:!1}),(0,a.removeEvent)(e,h,k,{passive:!0}),t)return void(0,a.remove)(e);if(!e)return;e.classList.add(l),setTimeout(function(){(0,a.remove)(e)},300)}(r,t)}var _=!1,v=null,g=0,y=!1,b=(0,a.getCw)();function w(e){if((b=(0,a.getCw)())>=r.DESKTOP_WIDTH&&(y=!0),e.touches&&e.touches.length>1)_=!1;else{var t=e.target.closest(".SnackbarItem");t.classList.add("SnackbarItem--dragging");var n=domData(t,"snackbar-id");u[n].timer&&clearTimeout(u[n].timer),v=e.touches[0],g=e.touches[0].clientX,_=!0,document.body.style.overflow="hidden"}}function E(e){if(e.preventDefault(),e.touches&&e.touches.length>1)_=!1;else if(v&&_){var t=e.touches[0],n=e.target.closest(".SnackbarItem"),a=-(g-t.clientX);y&&(a=Math.min(a,0));var i=getX(n),o=(getW(n)+a)/2+i,s=b/2;b>=r.DESKTOP_WIDTH&&(s=getW(n)/2);var l=o>=.95*b||o<=b/.95-b,c=o>s?(b-o)/100:o/s,d=domData(n,"snackbar-id");u[d].canClose=l,setStyle(n,{opacity:c}),setStyle.transform(n,1,[a,0])}}function k(e){var t=e.target.closest(".SnackbarItem");t.classList.remove("SnackbarItem--dragging");var n=domData(t,"snackbar-id"),a=u[n];u[n].dragging=!1,document.body.style.overflow="visible",a.canClose?m(n,!0):u[n].timer=A(n,a.duration),t&&(setStyle(t,{opacity:""}),setStyle.transform(t,1,[0,0]))}},"42eR":function(e,t,n){"use strict";var a,i=(a=n("JDVM"))&&a.__esModule?a:{default:a},r=n("UxAg");var o={getHash:function(){var e=(0,r.$)("#feed_add_form"),t=qs2obj(e.action.split("?")[1]);return e.getAttribute("data-hash")||t.hash},openCopyright:function(e,t,n,a){cancelEvent(e);var o=!1;if("BUTTON"===e.target.tagName)o=e.target.disabled;else if("LABEL"===e.target.tagName){o=(0,r.$)("button",e.target).disabled}o||i.default.open(t,n,a)},saveSource:function(e,t){if(t.target){if(13!==t.keyCode)return;t=t.target}var n=(0,r.$)(".AddCopyrightPopup__input",t.closest(".AddCopyrightPopup")),a=n.querySelector("input");i.default.submit(a.value,e,n)},deleteSource:function(e,t,n){var a=(0,r.$)(".AddCopyrightPopup__input",t.closest(".AddCopyrightPopup"));event&&cancelEvent(e),i.default.remove(n,a)},deleteObject:function(e){e&&cancelEvent(e);var t=nav.params,n=qs2obj(t);delete n.object,delete n.list,n.delete_object=1,post.saveDraft(null,o.getHash(),"".concat(nav.path).concat(obj2qs(n)))}};window.posting=o},"4JX2":function(e,t,n){"use strict";var a;Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var i=((a=n("Of74"))&&a.__esModule?a:{default:a}).default;t.default=i},"4KUl":function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getElem=s,t.setMsgs=function(e){s().innerHTML=e.map(function(e){return(0,r.MailPreSendList__Msg)(e)}).join("")},t.addMsg=function(e){s().insertAdjacentHTML("beforeend",(0,r.MailPreSendList__Msg)(e)),MailScrap.peerGoToBottom()},t.removeMsg=function(e){var t=o.default.getElem(e.sendId);t&&t.remove()},t.getMsg=function(e){return o.default.getElem(e.sendId)};var a,i=n("UxAg"),r=n("E5Ij"),o=(a=n("/Id8"))&&a.__esModule?a:{default:a};function s(){return(0,i.$)(".MailPreSendList__box")}},"4Oey":function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.SearchBlock=i,t.default=void 0;var a=n("Q47q");function i(e){return{inner:[(0,a.Search)()],class:"SkeletonSearchBlock",tag:"div"}}var r=i;t.default=r},"4azy":function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var a=n("fdw3");var i=function(e){return(0,a.extend)({tag:"textarea",class:["Textarea",e.mix],name:e.name,placeholder:e.placeholder,rows:e.rows?e.rows:3,inner:e.text},e.attrs)};t.default=i},"4fRq":function(e,t){var n="undefined"!=typeof crypto&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto)||"undefined"!=typeof msCrypto&&"function"==typeof window.msCrypto.getRandomValues&&msCrypto.getRandomValues.bind(msCrypto);if(n){var a=new Uint8Array(16);e.exports=function(){return n(a),a}}else{var i=new Array(16);e.exports=function(){for(var e,t=0;t<16;t++)0==(3&t)&&(e=4294967296*Math.random()),i[t]=e>>>((3&t)<<3)&255;return i}}},"4qiT":function(e,t,n){"use strict";var a={init:function(e){var t=this;this.store?addEvent(window,"scroll touchstart",this._onScrollHandler):(this.store=extend({},e),this.loadCount=20,this.store.offset=this.loadCount,this.isLoading=!1,this.elems={wrap:geByClass1("author-page"),nav:geByClass1("author-page-nav",this.wrap),header:geByClass1("author-page-header",this.wrap),content:geByClass1("author-page__inner",this.wrap),spinner:geByClass1("author-page__spinner",this.wrap)},this._onScrollHandler=this._onScrollHandler.bind(this),addEvent(window,"scroll touchstart",this._onScrollHandler),e.isStandalone&&(window.al=!1),window.cur.destroy.push(function(){removeEvent(window,"scroll touchstart",t._onScrollHandler)}))},_getLoadOffset:function(){return this.store.offset},_showLoader:function(){this.isLoading=!0,addClass(this.elems.spinner,"active")},_hideLoader:function(){this.isLoading=!1,removeClass(this.elems.spinner,"active")},_onScrollHandler:function(){var e=this,t=this.elems,n=t.nav,a=t.header,i=t.content,r=this.store.totalCount>this._getLoadOffset();toggleClass(n,"author-page-nav_shown",a.getBoundingClientRect().bottom-n.clientHeight<0),r&&window.scrollTop()+2*window.innerHeight>i.offsetHeight&&this._loadMore(this.store.sortBy,this._getLoadOffset(),function(t){e.elems.content.innerHTML+=t})},_loadMore:function(){var e=this,t=arguments.length>0&&void 0!==arguments[0]&&arguments[0],n=arguments.length>1&&void 0!==arguments[1]&&arguments[1],a=arguments.length>2?arguments[2]:void 0;this.isLoading||(t&&(this.store.sortBy=t),isFunction(a)||(a=function(){}),this._showLoader(),ajax.post("author_page.php",{act:"load_more",author_id:this.store.authorId,sort_by:t||this.store.sortBy,count:this.loadCount,offset:void 0!==n?n:this._getLoadOffset()},{onFail:function(){e._hideLoader()},onDone:function(t){e._hideLoader(),e.store.offset+=20,t&&a(t)}}))},subscribe:function(e,t,n){ajax.post("author_page.php",{act:"subscribe",author_id:t,hash:n},{onDone:function(t,n){toggleClass(e,"Btn_theme_secondary",t),e.innerHTML=n}})},sortBy:function(e,t){e.preventDefault(),Unfold.setActive(e.target.parentNode),this._closeUnfold(e),t!==this.store.sortBy&&this.updateList(t)},updateList:function(e){var t=this,n=arguments.length>1&&void 0!==arguments[1]&&arguments[1];e=e||this.store.sortBy,addClass(this.elems.content,"loading"),n&&Unfold.setActive(geByClass1("Unfold__item")),this._loadMore(e,0,function(e){t.elems.content.innerHTML=e,t.store.offset=t.loadCount,removeClass(t.elems.content,"loading")})},_closeUnfold:function(e){if(e){var t=e.target.closest(".Unfold");t&&removeClass(t,"Unfold_open")}},addToBookmark:function(e,t,n,a,i){e.preventDefault(),this._closeUnfold(e);var r=+domData(t,"is-bookmarked"),o=r?"bookmark_remove":"bookmark_add",s=geByClass1("Unfold__itemText",t);ajax.post("bookmarks.php",{_ajax:1,act:o,item_type:5,item_oid:n,item_id:a,hash:i},{onDone:function(e,n,a){domData(t,"is-bookmarked",r?0:1),r?s&&(s.innerHTML=lang.mobile_bookmarks_actions_add):s&&(s.innerHTML=lang.mobile_bookmarks_actions_remove),a&&Bookmarks.showSuccessSnack(a)}})},pinArticle:function(e,t,n,a,i){var r=this;e.preventDefault(),this._closeUnfold(e),ajax.post("author_page.php",{act:"pin_article",article_owner_id:t,article_id:n,do_pin:a?0:1,hash:i},{onDone:function(){r.updateList("date",!0)}})},hideArticle:function(e,t,n,a){var i=this;e.preventDefault(),this._closeUnfold(e),ajax.post("author_page.php",{act:"hide_article",article_owner_id:t,article_id:n,hash:a},{onDone:function(){i.updateList()}})}};window.AuthorPage=a},"4rnG":function(e,t,n){"use strict";var a,i=(a=n("RkGL"))&&a.__esModule?a:{default:a};var r,o,s=1500,l=!1,c=null;function u(){c&&Btn.setLoading(c,!1),r&&(clearInterval(r),r=null),o&&(o.abort(),o=null)}i.default._onCancelClick(function(e,t){var n,a;t?(l=!1,preventEvent(e),cancelEvent(e),lockButton(t)):(l=!0,t=e.$btn,e=null,c=t,Btn.setLoading(t,!0)),n={cancelUrl:attr(t,"href")},a=n.cancelUrl,r=setInterval(function(){o=ajax.post(a,{_ajax:1},{onDone:function(e){if(1===e){if(l){var t=arguments[1];return c.closest(".BtnStack").outerHTML='\n
    '.concat(t,"
    \n "),void u()}var n=window.scrollTop();nav.go(location.pathname+location.search,null,{replace:!0}),cur.destroy.push(function(){window.scrollTop(n)}),u()}}})},s),window.cur.destroy.push(u)})},"4uOi":function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.PageVisibility=void 0;var a,i=(a=n("jk6M"))&&a.__esModule?a:{default:a};function r(e,t){for(var n=0;n2&&void 0!==arguments[2]&&arguments[2],a=c(e);if((a.drawImage(e,0,0),!n)&&255==a.getImageData(0,0,1,1).data[3])return null;return a.globalCompositeOperation="destination-over",a.fillStyle=t,a.fillRect(0,0,e.width,e.height),a.canvas.toDataURL()}function c(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{width:1,height:1},t=e.width,n=e.height,a=document.createElement("canvas");return a.width=t,a.height=n,a.getContext("2d")}return function(){if(s){var u=document.head.querySelector('link[rel="manifest"]'),d=u?u.href:"",f=function(e){for(var t=function(t){var n=e[t];try{return new URL("",n),{v:function(e){return new URL(e,n).toString()}}}catch(e){}},n=0;n\'';var e={};return"use-credentials"===d.crossOrigin&&(e.credentials="include"),window.fetch(d,e)}).then(function(e){return e.json()}).then(function(i){return function(i,s){var u=i.icons||[];u.sort(function(e,t){return parseInt(t.sizes,10)-parseInt(e.sizes,10)});var d=u.map(function(e){return function(e,t){var n=document.createElement(e);for(var a in t)n.setAttribute(a,t[a]);return n}("link",{rel:"apple-touch-icon",href:s(e.src),sizes:e.sizes})}),f=i.display,h=-1!==e.indexOf(f);(function(e){var t=function(e){var t=c();return t.fillStyle=e,t.fillRect(0,0,1,1),t.getImageData(0,0,1,1).data}(e).map(function(e){var t=e/255;return t<.03928?t/12.92:Math.pow((t+.055)/1.055,2.4)}),n=.2126*t[0]+.7152*t[1]+.0722*t[2];Math.abs(1.05/(n+.05))})(i.background_color||t),i.name||i.short_name||document.title;navigator.standalone||(p="apple-mobile-web-app-capable",(A=h)&&(!0===A&&(A="yes"),function(e,t){var n=document.createElement(e);for(var a in t)n.setAttribute(a,t[a]);document.head.appendChild(n)}("meta",{name:p,content:A})));var p,A;function m(e,a,s){var l=e.width,u=e.height,d=window.devicePixelRatio,f=c({width:l*d,height:u*d});if(f.scale(d,d),f.fillStyle=i.background_color||t,f.fillRect(0,0,l,u),f.translate(l/2,(u-o)/2),s){var h=s.width/d,p=s.height/d;p>n&&(h/=p/n,p=n),h>=r&&p>=r&&(f.drawImage(s,h/-2,p/-2,h,p),f.translate(0,p/2+o))}var A=document.createElement("link");return A.setAttribute("rel","apple-touch-startup-image"),A.setAttribute("media","screen and (orientation: ".concat(a,")")),A.setAttribute("href",f.canvas.toDataURL()),A}var _=new Set;function v(e){var t=m(window.screen,"portrait",e),n=m({width:window.screen.height,height:window.screen.width},"landscape",e);_.forEach(function(e){return e.remove()}),document.head.appendChild(t),document.head.appendChild(n),_.add(t),_.add(n)}if(v(null),!d.length||a.isIPad)return;var g=d[0],y=new Image;y.crossOrigin="anonymous",y.onload=function(){if(v(y),i.background_color){var e=l(y,i.background_color);null!==e&&(g.href=e,d.slice(1).forEach(function(e){var t=new Image;t.crossOrigin="anonymous",t.onload=function(){var n=l(t,i.background_color,!0);e.href=n},t.src=e.href}))}},y.src=g.href}(i,f)}).catch(function(e){return console.warn("pwacompat.js error",e)})}}}();t.default=r},"5V+s":function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var a,i=(a=n("4uzI"))&&a.__esModule?a:{default:a};n("OFOJ"),window.ItemsList=i.default;var r=i.default;t.default=r},"5WJ6":function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.initSharePage=function(e,t){var n=ge("SharePageInput__to"),a="";n&&(a=n.value);var r={};"mail"===e&&""!==n.value&&(r=a.split(",").reduce(function(e,t){return e[t]=!0,e},{}));if("club"===e){var o=(0,i.$)(".SharePage .qsearch_wrap"),s=(0,i.$)(".hp_block",o);show(o),show(s)}var l=(0,i.$)(".SharePage .SharePanel.MessagePanel"),c=(0,i.$)(".SharePage .SharePanel.ActionsPanel");extend(cur,{publishTo:e,refreshSelected:function(e,t){var a,i=!(arguments.length>2&&void 0!==arguments[2])||arguments[2];isUndefined(e)||(cur.publishSelected=e),t=cur.publishTo,e=cur.publishSelected,"group"===t?a=ge("club"+e):"mail"===t&&(a=ge("peer"+e));var r=!!cur.selectedMap[e];a&&(a.classList.toggle("inline_item_selected",i?!r:r),cur.like_search.toggleAttach(e,!r),i&&(cur.selectedMap[e]=!r),n.value=Object.keys(cur.selectedMap).filter(function(e){return cur.selectedMap[e]}).join(","));var o=Object.keys(cur.selectedMap).length>0&&Object.keys(cur.selectedMap).some(function(e){return!!cur.selectedMap[e]});return l.classList.toggle("SharePanel--active",o),c.classList.toggle("SharePanel--active",!o),!1},selectedMap:r,selectPeer:function(e,t){return cur.refreshSelected(t,"mail"),!1}}),Object.keys(r).forEach(function(t){cur.refreshSelected(t,e,!1)})},t.updateButtons=function(e){var t=cur.share._els.bookmarkButton,n=(0,i.$)(".ActionsPanel-button__icon",t),a=(0,i.$)(".ActionsPanel-button__label",t);e?(n.innerHTML=Wd.html((0,r.default)("wall","favorite_28")),a.innerHTML=getLang("mobile_share_target_bookmark_active")):(n.innerHTML=Wd.html((0,r.default)("wall","favorite_outline_28")),a.innerHTML=getLang("mobile_share_target_bookmark"))};var a,i=n("UxAg"),r=(a=n("Y6JH"))&&a.__esModule?a:{default:a}},"5aPh":function(e,t,n){"use strict";var a;Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var i=((a=n("BM0n"))&&a.__esModule?a:{default:a}).default;t.default=i},"5c+v":function(e,t,n){"use strict";var a=function(e){if(e&&e.__esModule)return e;var t=s();if(t&&t.has(e))return t.get(e);var n={};if(null!=e){var a=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var i in e)if(Object.prototype.hasOwnProperty.call(e,i)){var r=a?Object.getOwnPropertyDescriptor(e,i):null;r&&(r.get||r.set)?Object.defineProperty(n,i,r):n[i]=e[i]}}n.default=e,t&&t.set(e,n);return n}(n("jk6M")),i=n("UxAg"),r=n("Qz23"),o=n("OcsD");function s(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return s=function(){return e},e}var l=function(){return!window.al||!window.al.menu||window.isNewNavigation},c=!1,u={enabled:function(e){return l()?(window.isNewNavigation||((0,o.removeClass)("_lm",window.bodyNode),(0,o.removeClass)("_lms",window.bodyNode)),!1):(void 0!==e&&(e?(0,o.replaceClass)("_lms","_lm",window.bodyNode):((0,o.replaceClass)("_lm","_lms",window.bodyNode),u.qsClose())),(0,o.hasClass)("_lm",window.bodyNode))},opened:function(){return(0,o.hasClass)("lm_opened",window.bodyNode)},toggle:function(e,t){return!!(0,o.checkEvent)(e)||(!!l()||(u.opened()?u.close(e,t):u.open(e,t),!1))},open:function(e){var t=window.zlayer;if((0,o.checkEvent)(e))return!0;if(l())return!0;if(u.opened())return!1;if(t&&t.opened())return!1;if(!u.enabled())return nav.go("/"),!1;u.clear_hover();var n=(0,o.ce)("div",{id:"m_helper",onclick:u.close}),a=u._st||0,i=(0,o.scrollTop)(),r=(0,o.ge)("l"),s=(0,o.ge)("m"),c=(0,o.ge)("vk_wrap"),d=((0,o.geByClass1)("head_search",r),c.offsetWidth),f=s.offsetWidth,h=s.offsetHeight;if(!(d>=882)){(0,o.append)(n,"m"),u.fixed?((0,o.addClass)("lm_opened",window.bodyNode),(0,o.addClass)("lm_anim_start",c),setTimeout(function(){(0,o.replaceClass)("lm_anim_start","lm_anim lm_anim_end",c)},5),setTimeout(function(){(0,o.removeClass)("lm_anim_end",c),(0,o.removeClass)("lm_anim",c)},200),(0,o.addEvent)(s,"touchmove",u.blockScroll)):(0,o.addClass)("lm_opened",window.bodyNode);var p=r.offsetHeight;return d>=480?a=i<=p-(0,o.getCh)()?Math.min(i,p-(0,o.getCh)()):0:ih-p&&h>p&&(a=i-h+p),u._st=Math.max(0,i-a),u._mw=f,u.fix_size(!1),u.fixed||(0,o.scrollTop)(a),ajax.post("/",{_ajax:1,act:"ping"}),window.lm_qsearch_counter?window.lm_qsearch_counter--:window.lm_qsearch_counter=-1,window.lm_qsearch_counter>0&&u.cancelSearch(),!1}},close:function(e){if((0,o.checkEvent)(e))return!0;if(l())return!0;if(!u.opened())return!1;(0,o.remove)("m_helper"),u.clear_hover();var t=(0,o.scrollTop)(),n=u._st+t,a=(0,o.ge)("l"),i=(0,o.ge)("m"),r=(0,o.ge)("vk_wrap"),s=((0,o.geByClass1)("head_search",a),(0,o.ge)("vk_wrap").offsetWidth>=480);return u.fixed?((0,o.addClass)("lm_anim_end",r),setTimeout(function(){(0,o.replaceClass)("lm_anim_end","lm_anim lm_anim_start",r)},5),setTimeout(function(){(0,o.removeClass)("lm_anim_start",r),(0,o.removeClass)("lm_anim",r),(0,o.removeClass)("lm_opened",window.bodyNode)},200),(0,o.removeEvent)(i,"touchmove",u.blockScroll)):(0,o.removeClass)("lm_opened",window.bodyNode),u._st=s?0:t,u.fix_size(!0),u.fixed||(0,o.scrollTop)(n),window.lm_qsearch_focused&&u.cancelSearch(),!1},fix_size:function(e){var t=(0,o.ge)("l"),n=(0,o.ge)("m"),a=(0,o.ge)("mhead"),i=a&&a.offsetHeight||0,r=u._st||0;t&&n&&(e?n.style.minHeight="0":(r=r>i?r:0,n.style.minHeight=t.offsetHeight+r+"px"),!u.fixed||(0,o.getCw)()<320?e?n.style.marginTop="0":(t.style.minHeight=(0,o.getCh)()+"px",n.style.marginTop=-r+"px"):t.style.minHeight="0")},clear_hover:function(){thover.clear()},refreshCounters:function(e){if(window.isNewNavigation&&(Tabbar.setCounter(Tabbar.TAB_ID_NOTIFICATION,e[2]),Tabbar.setCounter(Tabbar.TAB_ID_MESSAGES,e[3])),!e||!e.length)return!0;if(!window.al||!window.al.menu)return!0;if(e.length!=window.al.menu.length)return!1;var t=window.al,n=(0,o.geByClass1)("main_menu","l"),a=e[2];return"number"==typeof a&&isFinite(a)&&(Bell.setCount(a),window.store&&(store.notificationsCount=a)),(0,o.each)(e,function(e,a){if(void 0===a)return!0;var i=t.menu[e],r=(0,o.geByClass1)("mmi_"+i[0],n),s=(0,o.geByClass1)("mm_item",r),l=(0,o.geByClass1)("mmi_wrap",r),c=(0,o.geByClass1)("mm_counter",l);(0,o.attr)(s,"data-href",!1),a?(i[3]&&(0,o.attr)(s,"href",i[3]),c?(0,o.val)(c,a):(0,o.append)((0,o.ce)("em",{className:"mm_counter",innerHTML:a}),l)):(i[2]&&(0,o.attr)(s,"href",i[2]),(0,o.remove)(c)),ajax.prepare_click(s)}),!0},refresh:function(e){e=e||{},ajax.refreshLinks(e.fv_link,e.app_link),void 0!==e.pp&&!1!==e.pp&&(0,o.val)("lm_prof_panel",e.pp),void 0!==e.tn&&!1!==e.tn&&(0,o.val)("lm_top_notify",e.tn),void 0!==e.bn&&!1!==e.bn&&(0,o.val)("lm_bottom_notify",e.bn),e.lm&&(0,o.val)("l",e.lm),e.counters&&u.refreshCounters(e.counters),e.tab&&Tabbar.setCurrentId(e.tab),e.topbar||(0,o.remove)("vk_topbar")},initEvents:function(){(0,o.onBodyResize)(function(){var e=(0,o.ge)("vk_wrap").offsetWidth,t=(0,o.hasClass)("_hfixed",window.bodyNode);e>=882&&u.close(),u.fix_size(!u.opened(),t)})},init:function(){u.fixed=(0,o.hasClass)("_hfixed",window.bodyNode),u.initEvents(),(0,o.addEvent)(window,"orientationchange",function(){var e=(0,o.ge)("vk_wrap").offsetWidth,t=u._st||0;e>=882&&t>44&&u.close()});var e=(0,i.$)(".leftMenu__content");e&&(0,r.setScrollView)(e,{topBanner:!!a.default.ipad&&void 0,overscrollY:!1,standalone:!0})},blockScroll:function(e){var t=(0,o.ge)("vk_wrap");u.opened()&&(0,o.getW)(t)<882&&(0,o.preventEvent)(e)},qsOpened:!1,qsOpen:function(){u.qsOpened||(u.qs_st=(0,o.scrollTop)(),(0,o.addClass)("qs_opened","vk_wrap"),(0,o.addClass)("qs_opened",window.bodyNode),(0,o.getW)("vk_wrap")<882&&(0,o.scrollTop)(0),u.qsOpened=!0)},qsClose:function(){u.qsOpened&&((0,o.removeClass)("qs_opened","vk_wrap"),(0,o.removeClass)("qs_opened",window.bodyNode),(0,o.getW)("vk_wrap")<882&&(0,o.scrollTop)(u.qs_st||0),u.qsOpened=!1)},initSearch:function(){c||(c=!0,(0,o.addEvent)("lm_search_items","mousedown touchstart",function(e){e.stopPropagation()},{passive:!0}),(0,o.addEvent)((0,o.geByClass1)("head_search","l"),"mousedown touchstart",function(e){e.stopPropagation()},{passive:!0}),(0,o.addEvent)(document,"mousedown touchstart",function(e){(0,o.ge)("vk_wrap");u.qsOpened&&(u.qsClose(),(0,o.elblur)("lm_search_field"))},{passive:!0}))},closeSearch:function(){return!!l()||(window.lm_qsearch&&window.lm_qsearch.blur(),u.qsClose(),!1)},cancelSearch:function(){return!!l()||(window.lm_qsearch&&window.lm_qsearch.clear(),u.qsClose(),!1)},headerAction:function(e,t){return(0,o.getW)("vk_wrap")>=882?nav.go(e,t):u.toggle()}};window.menu=u},"5oy5":function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var a,i=(a=n("gLrT"))&&a.__esModule?a:{default:a};var r=function(e){var t=window.lang,n=Wd.html({tag:"span",class:"Cart__price-total",inner:Wd.wrap((0,i.default)(e.totalPrice,e.priceTemplate))}),a=langNumeric(e.count,t.mobile_market_cart_total).replace("{items}",e.count).replace("{price}",n);return{tag:"span",class:"Cart__price-inner",inner:Wd.wrap(a)}};t.default=r},"5qQ6":function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var a,i=(a=n("CKxJ"))&&a.__esModule?a:{default:a};var r=i.default;t.default=r,window.uMsg=i.default},"5s+S":function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ModalMenuUserListItem=function(e){return{class:"ModalMenuUserList__item",href:e.href,onclick:e.onclick?e.onclick:null,inner:[{tag:"img",class:"ModalMenuUserList__itemAvatar",src:e.image},{class:"ModalMenuUserList__itemName",inner:e.name}]}},t.default=void 0;var a,i=(a=n("v+Uj"))&&a.__esModule?a:{default:a};var r=function(e){return{class:"ModalMenuUserList",inner:(0,i.default)({inner:e.users})}};t.default=r},6:function(e,t,n){e.exports=n("75Qd")},"6ng+":function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.AudioStats=t.SUBTYPE_UPLOAD=t.SUBTYPE_PAUSE=t.SUBTYPE_QUEUE=t.SUBTYPE_CLOSE_APP=t.SUBTYPE_NEW=t.SUBTYPE_CONTINUE_FROM_PAUSE=t.SUBTYPE_INTERRUPTION=t.SUBTYPE_AUTO=t.SUBTYPE_PREV_TRACK=t.SUBTYPE_NEXT_TRACK=t.SUBTYPE_DEFAULT=t.TYPE_PLAY_FURTHER=t.TYPE_REWIND=t.TYPE_VOLUME=t.TYPE_STOP=t.TYPE_START=t.TYPE_SHARE_AUDIO=t.TYPE_SHOW_ALBUM=t.TYPE_RECOMMENDATION_REMOVED=t.TYPE_REMOVED=t.TYPE_ADDED=void 0;var a,i,r=n("XLUH"),o=n("BJj/"),s=n("DM2o");function l(e){return function(e){if(Array.isArray(e)){for(var t=0,n=new Array(e.length);t0?"next_track":"prev_track";var t=this.pausedAudioId,n=this.playerAdapter.getAudioId();return t&&n===t?"pause":"new"}},{key:"onPlay",value:function(){if(this.canOperate()){var e=this.playerAdapter.getAudio(),t=e.fullId,n=this.currentAudioId===t||!this.currentAudioId,a=this.playerAdapter.getListenedTime();n||this.onTrackSwitch(this.currentAudio,this.currentPlaylistId),this.playedTime=vkNow(),this.currentAudioId=t,this.currentAudio=e,this.currentAudioTrackCode=this.playerAdapter.getAudioTrackCode(),this.currentPlaylistId=this.playerAdapter.getPlaylistId(),this.wasEnded||this.playerAdapter.hasPrevAudio()&&(!this.pausedAudioId||this.playerAdapter.isAutoPlayed())?(this.currentPosition=0,a=0):this.currentPosition=this.playerAdapter.getProgressInSeconds(),this.currentListened=a,this.sendCurrentAudioEvent({type:"start",subtype:this.getPlaySubtype(),position:this.currentPosition,listened:a}),this.pausedAudioId=null,this.playlistChanged=!1,this.wasEnded=!1}}},{key:"onPause",value:function(){var e=this;this.canOperate()&&(this.pausedAudioId=this.playerAdapter.getAudioId(),this.collectListenedData(),this.sendListenedDataDelayed(1e3),setTimeout(function(){if(!(vkNow()-e.playedTime<150)){var t=e.playerAdapter.getPausedBy(e.playedTime);e.sendCurrentAudioEvent({type:"stop",subtype:t?"queue"===t?"queue":"interruption":"pause"})}}))}},{key:"onProgress",value:function(){this.playerAdapter.getProgress()<.01||(this.currentPosition=this.playerAdapter.getProgressInSeconds(),this.currentListened=this.playerAdapter.getListenedTime(),!this.pausedAudioId&&vkNow()-this.playedTime>150&&this.collectListenedData(),this.adsCompleted&&(this.sendCurrentAudioEvent({type:"start",subtype:this.getPlaySubtype(),position:this.currentPosition}),this.adsCompleted=!1))}},{key:"onVolume",value:function(){this.canOperate()&&this.sendCurrentAudioEvent({type:"volume",subtype:"default"})}},{key:"onSeek",value:function(){if(this.canOperate()){var e={position:this.currentPosition,positionTo:this.playerAdapter.getProgressInSeconds()};e.position!==e.positionTo&&this.sendCurrentAudioEvent(c({type:"rewind",subtype:"default"},e))}}},{key:"onPlaylistChanged",value:function(){this.canOperate()&&(this.playlistChanged=!0)}},{key:"onEnded",value:function(){this.listenedData&&this.playerAdapter.isLastTrack()&&(this.listenedData.end_stream_reason="session_end"),this.wasEnded=!0,this.playerAdapter.isRepeatCurrentAudio()?(this.sendCurrentAudioEvent({type:"stop",subtype:"auto"}),this.collectListenedData(),this.sendListenedData()):this.sendListenedDataDelayed(150)}},{key:"onPlayNext",value:function(e,t){if(this.canOperate()){var n=u(t.split("_"),2),a=n[0],i=n[1];this.sendAudioEvent({type:"play_further",subtype:"default",ownerId:a,audioId:i})}}},{key:"onAdCompleted",value:function(){this.adsCompleted=!0}},{key:"onTrackSwitch",value:function(e,t){if(e){var n="new",a=this.playerAdapter.getSequence(),i=u(e.fullId.split("_"),2),r=i[0],o=i[1];this.playerAdapter.isAutoPlayed()?n="auto":a&&(n=a>0?"next_track":"prev_track"),this.sendCurrentAudioEvent({type:"stop",subtype:n,position:this.currentPosition,listened:this.currentListened,trackCode:e.trackCode,playlistId:t,ownerId:r,audioId:o}),this.wasEnded=!0,this.collectListenedDataSwitch(),this.sendListenedData()}}},{key:"onPageClose",value:function(){this.playerAdapter.isPlaying()&&(this.sendCurrentAudioEvent({type:"stop",subtype:"close_app"}),this.sendListenedData())}},{key:"collectListenedDataSwitch",value:function(){if(this.listenedData){if("session_end"===this.listenedData.end_stream_reason)return;var e=this.playerAdapter.isAutoPlayed(),t=this.getListenedTime(),n=this.playerAdapter.getSequence(),a=null;n&&!e?a=n>0?"next_btn":"prev":this.playlistChanged&&(a="playlist_change"),!a&&e&&(a="playlist_next"),this.listenedData.end_stream_reason=a||"new",t&&(this.listenedData.listened=t)}}},{key:"collectListenedData",value:function(){if(this.canOperate()){var e=this.playerAdapter.getAudioId(),t=this.playerAdapter.getAudioTrackCode(),n=this.getListenedTime(),a=this.currentAudio&&this.currentAudio.urlHash;if(n&&a){var i={audio_id:e,listened:n,context:this.playerAdapter.getContext(),hash:a};window.cur&&vk.widget&&(i.ref=cur.widgetReferrer||""),this.playerAdapter.hasSearchParams()&&(i.search_params=JSON.stringify(this.playerAdapter.getSearchParams())),this.playerAdapter.hasPlaylist()&&(this.playerAdapter.isRealPlaylist()&&(i.playlist_id=this.playerAdapter.getPlaylistId()),this.playerAdapter.isShuffledPlaylist()&&(i.shuffled=1)),t&&(i.track_code=t),this.playerAdapter.isRepeatCurrentAudio()?i.repeat="one":this.playerAdapter.isRepeatAll()&&(i.repeat="all"),this.playerAdapter.isAutoPlayed()&&(i.auto=1),this.playerAdapter.hasPrevAudio()&&(i.prev_audio_id=this.playerAdapter.getPrevAudioId()),this.playerAdapter.hasPrevPlaylist()&&this.playerAdapter.isRealPrevPlaylist()&&(i.prev_playlist_id=this.playerAdapter.getPrevPlaylistId()),this.playerAdapter.isPlaying()||(i.end_stream_reason="stop_btn"),i.state=document.hidden?"background":"app",this.listenedData=i,this.sendListenedDataDelayed(1e4)}}}},{key:"sendListenedData",value:function(){clearTimeout(this.sendTimeout);var e=this.listenedData;this.listenedData=null,e&&e.listened&&this.playerAdapter.sendListenedData(e)}},{key:"sendListenedDataDelayed",value:function(){var e=this,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0;clearTimeout(this.sendTimeout),this.sendTimeout=setTimeout(function(){return e.sendListenedData()},t)}},{key:"serializeEvent",value:function(e){var t=[h[e.type],p[e.subtype],1];return e.audioId?t.push(e.ownerId+"_"+e.audioId):t.push(0),e.trackCode?t.push(e.trackCode):t.push(0),e.state?t.push(e.state):t.push(r.UNKNOWN_STATE),e.ref?t.push(e.ref):t.push(""),e.context?t.push(e.context):t.push("other"),e.volume||0===e.volume?t.push(e.volume):t.push(this.playerAdapter.getVolume()),e.position||0===e.position?t.push(e.position):t.push(this.playerAdapter.getProgressInSeconds()),e.shuffle?t.push(e.shuffle?1:0):t.push(0),e.repeat?t.push(e.repeat):t.push(0),e.listened?t.push(Math.max(e.listened,0)):t.push(0),e.playlistId?t.push(e.playlistId):t.push(0),e.positionTo&&t.push(e.positionTo),t}},{key:"sendEvent",value:function(e){this.debug&&(console.log("audio stats event",e.type,e.subtype,e),window._statForTest||(window._statForTest=[]),window._statForTest.push(e)),s.statlogsValueEvent.apply(void 0,["audio_sts"].concat(l(this.serializeEvent(e))))}},{key:"sendCurrentAudioEvent",value:function(e){this.sendEvent(c({shuffle:this.playerAdapter.isShuffledPlaylist(),repeat:this.playerAdapter.isRepeatCurrentAudio()?1:this.playerAdapter.isRepeatAll()?2:0,volume:this.playerAdapter.getVolume(),position:this.playerAdapter.getProgressInSeconds(),listened:this.getListenedTime(),playlistId:this.playerAdapter.getPlaylistId()},this.getEnvParams(),this.getCurrentAudioParams(),e))}},{key:"sendAudioEvent",value:function(e){this.sendEvent(c({},e,this.getEnvParams()))}},{key:"destroy",value:function(){this.playerAdapter.unListenAll(),removeEvent(window,"beforeunload",this.onPageClose),this.playerAdapter=null,this.listenedData=null,clearTimeout(this.sendTimeout)}}])&&d(t.prototype,n),a&&d(t,a),e}();t.AudioStats=m},"702z":function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.registerQueue=function(e,t){i[e]={pending:[],failed:[],items:{},onSend:t.onSend,onStopped:t.onStopped,maxFails:0|t.maxFails,loaded:!1,sendingItemId:null,backoffTimer:null},r[e]=o},t.queueAddItem=function(e,t,n){var a={id:t,data:n,fails:0},r=i[e];l(e,t),r.items[t]=a,r.pending.push(t),u(e),d(e)},t.queueRemoveItem=l,t.queueGetItem=function(e,t){return i[e].items[t]||null},t.queueGetSize=function(e){var t=i[e];if(!t)return 0;return t.pending.length},t.queueSignalSuccess=function(e){var t=i[e],n=t.sendingItemId;n&&(t.pending[0]===n&&t.pending.shift(),delete t.items[n]);r[e]=o,t.sendingItemId=null,u(e),d(e)},t.queueSignalFail=function(e){var t=i[e],n=t.sendingItemId;if(n&&t.pending[0]===n){var a=t.items[n];if(a&&(a.fails+=1,a.fails>=t.maxFails))return void c(e)}r[e]=o,t.sendingItemId=null,u(e)},t.queueSignalStop=c,t.queueGetItems=function(e){var t=i[e],n=t.pending,a=t.failed,r=t.items;return{pending:n,failed:a,items:r}},t.queueWhenReady=function(e){var t=i[e];if(t.loaded)return Promise.resolve();if(t.retrieving)return t.retrieving;return t.retrieving=function(e){return new Promise(function(t){var n=(0,a.lsGet)("q_".concat(e))||{items:{},pending:[],failed:[]};n.failed=n.failed.concat(n.pending).filter(function(e){return!!n.items[e]}),n.pending=[],t(n)})}(e).then(function(t){var n=t.pending,a=t.failed,r=t.items,o=i[e];o.retrieving=null,o.loaded=!0,o.pending=n,o.failed=a,o.items=r}),t.retrieving};var a=n("OcsD"),i={},r={},o="idle",s="sending";function l(e,t){var n=i[e];delete n.items[t];var a=n.pending.indexOf(t),r=n.failed.indexOf(t);-1!==a&&n.pending.splice(a,1),-1!==r&&n.failed.splice(r,1),d(e)}function c(e){var t=i[e];t.failed=t.failed.concat(t.pending),t.pending=[],r[e]=o,t.sendingItemId=null,t.onStopped(),d(e)}function u(e,t){if(!1!==navigator.onLine){var n=i[e];if(r[e]!==s&&n.pending.length&&!n.backoffTimer){var a=n.pending[0],o=n.items[a];if(!o.fails||t)r[e]=s,n.sendingItemId=a,n.onSend(o.id,o.data);else{var l=Math.pow(2,Math.max(o.fails-2,0));n.backoffTimer=setTimeout(function(){n.backoffTimer=null,u(e,!0)},1e3*l)}}}}function d(e){var t=i[e],n=t.pending,r=t.failed,o=t.items;(0,a.lsSet)("q_".concat(e),{pending:n,failed:r,items:o})}window.addEventListener("online",function(){Object.keys(i).forEach(function(e){u(e)})})},"75Qd":function(e,t,n){"use strict";n("XCiN");var a=n("OcsD");n("CQvH"),n("a0wW"),n("z9sQ"),n("+cqQ"),n("TYsd");var i=f(n("Cbap")),r=n("tgcV"),o=n("BZzM"),s=(d(n("eGQV")),f(n("saGk")));n("uQjJ");var l=d(n("jk6M"));n("wcVR"),n("kr3z"),n("+jUy"),n("GMrv"),n("+YbT"),n("T24x");var c=n("W9Tc");function u(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return u=function(){return e},e}function d(e){if(e&&e.__esModule)return e;var t=u();if(t&&t.has(e))return t.get(e);var n={};if(null!=e){var a=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var i in e)if(Object.prototype.hasOwnProperty.call(e,i)){var r=a?Object.getOwnPropertyDescriptor(e,i):null;r&&(r.get||r.set)?Object.defineProperty(n,i,r):n[i]=e[i]}}return n.default=e,t&&t.set(e,n),n}function f(e){return e&&e.__esModule?e:{default:e}}function h(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){if(!(Symbol.iterator in Object(e)||"[object Arguments]"===Object.prototype.toString.call(e)))return;var n=[],a=!0,i=!1,r=void 0;try{for(var o,s=e[Symbol.iterator]();!(a=(o=s.next()).done)&&(n.push(o.value),!t||n.length!==t);a=!0);}catch(e){i=!0,r=e}finally{try{a||null==s.return||s.return()}finally{if(i)throw r}}return n}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance")}()}n("wMVj"),n("gUYQ"),n("AeId"),n("Gzds"),n("kYGI"),n("5c+v"),n("tsGB"),n("mOHq"),n("nlPs"),n("gNTM"),n("eoxF"),n("ohv3"),n("giB6"),n("vZUn"),n("9EK6"),n("pBF5"),n("i0zL"),n("ldCb"),n("A+9M"),n("TORN"),n("rulp"),n("K0hv"),n("42eR"),n("wyHI"),n("o3gn"),n("3Xw1"),n("8fwe"),n("G0UO"),n("Mc5h"),n("BoyB"),n("O5lf"),n("9y81"),n("AXyT"),n("gy8s"),n("KMpi"),n("r/ag"),n("AgBx"),n("TuGt"),n("V1Rh"),n("29dZ"),n("p5n7"),n("7tQU"),n("3+oY"),n("Q8gl"),n("DG1x"),n("v+Uj"),n("9Cbe"),n("lcib"),n("RikE"),n("1Qy5"),n("V4qE"),n("HON1"),n("QQoL"),n("rKUZ"),n("wTbK"),n("sXAB"),n("3Gnz"),n("nj7l"),n("Qg0H"),n("1IPy"),n("0Ezr"),n("OcB7"),n("XlF1"),n("LdG3"),n("Bqje"),n("gTod"),n("yEBz"),n("r2Pq"),n("9HII"),n("8t6d"),n("LBNP"),n("HDU4"),n("blmJ"),n("i8t0"),n("RVJ9"),n("B9v3"),n("L1lF"),n("GVjC"),n("hb+4"),n("5aPh"),n("GDYn"),n("bRFj"),n("eyw1"),n("iE+E"),n("yuVR"),n("vys4"),n("QcsT"),n("U34x"),n("P+Xc"),n("l51W"),n("BLcx"),n("nXjO"),n("onYX"),n("BQMu"),n("zHNa"),n("zouF"),n("wCFN"),n("sVNd"),n("OGWK"),n("ciqL"),n("zEUu"),n("tqja"),n("yZoT"),n("sZWN"),n("VLMK"),n("KWgi"),n("iN5q"),n("M9zQ"),n("Ny8a"),n("yXty"),n("hxrZ"),n("jLRy"),n("98L6"),n("gunf"),n("m9bs"),n("MzAf"),n("Dh0N"),n("fYoA"),n("h27l"),n("p/K1"),n("03kU"),n("4qiT"),n("Tjn9"),n("tlL+"),n("w1QQ"),n("DVnk"),n("cLcH"),n("uo4j"),n("Fhlr"),n("RHkR"),n("eFmH"),n("aXSb"),n("WeE2"),n("WCKs"),n("XLP4"),n("Ivtq"),n("NBPr"),n("bYEY"),n("MUoB"),n("OnSo"),n("fP8X"),n("LTt1"),n("mXGF"),n("is+u"),n("jXv2"),n("pOpT"),n("T9Df"),n("GLI1"),n("tqgD"),n("HpMb"),n("AkSq"),n("EYkR"),n("jMiB"),n("9uOJ"),n("mz6W"),n("s0Xw"),n("pWCx"),n("VAls"),n("zGVo"),n("HbvZ"),(0,r.initStaticManager)(),window.SpecialEvent=s.default,(0,a.addEvent)(window,"scroll touchmove",function(){(0,a.onBodyScroll)(!0)},{passive:!0});var p=window,A=p.thover,m=p.ajax;function _(){if((0,a.lsGet)("custom_opts"))return(0,a.addClass)("_copts","vk_wrap");var e=(0,a.ce)("div",{innerHTML:'
    '});(0,a.append)(e,"vk_utils");var t=(0,a.ge)("copts_test_label");t&&Math.abs(t.offsetWidth-5)<1&&((0,a.addClass)("_copts","vk_wrap"),(0,a.lsSet)("custom_opts",1)),(0,a.remove)(e)}(0,a.addEvent)(document,"touchmove touchcancel",A.cancel),(0,a.addEvent)(document,"touchend",A.end),m._init(),m.enabled=!!m._req,m.enabled&&(onDOMReady(function(){(0,a.remove)("app_go_frame"),m.prepare_click(),menu&&menu.init(),audioplayer&&audioplayer.initAudio(),(0,a.addClass)("_js","vk_wrap")}),page.clear()),page.onChange(function(){return i.default.getRouter().checkRoutes()}),onDOMReady(function(){i.default.getRouter().checkRoutes()}),onDOMReady(o.resizePosters),(0,a.addEvent)(window,"resize",o.resizePosters),(0,a.addEvent)(document,"touchstart",function(e){var t=(0,a.checkTouchHover)(e.target);A.clear(),t&&A.start.call(t,e)}),(0,a.addEvent)(document,"click",function(e){var t=window.al;if(window.al&&t.ver){var n=(0,a.gpeByClass)("al_after",e.target);if(n){var i=(0,a.attr)(n,"data-target"),r=!!i&&(0,a.geByClass1)(i,n);if(r&&!nav.go_after(r,e)||!nav.go_after(n,e))return}var o=(0,a.checkNav)(e.target,{allow_post_away:!0});if(o&&(nav.go(o,e)||(0,a.cancelEvent)(e)),"bookmarks"===cur.module){var s=e&&e.target&&(e.target.closest(".BookmarksItem_link")||e.target.closest(".BookmarkSlider__item")||e.target.closest(".OwnerRow"));if(!s)return;var l=h(s.getAttribute("id").match(/^(link|page)(-?\d+)_(-?\d+)?$/)||[],4),c=l[0],u=l[1],d=l[2],f=l[3];if(!(c&&u&&d&&f))return;var p=!1;switch(u){case"link":p=e.target.closest('a[target="_blank"]');break;case"page":p=e.target.closest(".OwnerRow__content")||e.target.closest(".OwnerColumn")}if(!p)return;statlogsValueEvent("bookmarks_product_analytics",{item_type:u,item_owner_id:intval(d),item_id:intval(f),time:vk.ts+Math.floor(((new Date).getTime()-vk.started)/1e3)})}}}),(0,a.addEvent)(document,"submit",function(e){var t=e.target;(0,a.hasClass)("vk_js_yes",geByTag1("html"))&&!(0,a.hasClass)("opera_mini_yes",geByTag1("body"))&&(0,a.hasClass)("qsearch",t)&&(0,a.gpeByClass)("audioPage",t)&&(geBySel1('[type="submit"]',t).click(),(0,a.cancelEvent)(e))}),(0,a.addEvent)(document,l.isTouch?"touchstart":"mousedown",function(e){tooltip.closeByTap(e)}),onDOMReady(_),onDOMReady(c.calculateTimeOffsets),(0,a.sgFix)(),onDOMReady(function(){var e=window.vk;e&&!e.id&&(0,a.lsCheck)()&&localStorage.clear()}),window.optionsTest=_,zlayer.isReady=!0,window.isNewMail&&(n("sc7o"),n("s0aB"),n("/Id8"),n("DkIl"),n("CkGd"),n("iS9e"),n("fWqt"),n("QBkA"),n("rKp0"),n("u33z"),n("5qQ6"),n("/Rzu"),n("B5sG"),n("M2vk"),n("HPEO"),n("irqS"));try{stManager.done("/js/cmodules/mobile/common.6d5af9c51c7e29087e36.js")}catch(e){}},"77iS":function(e,t,n){"use strict";function a(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return a=function(){return e},e}Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var i=function(e){if(e&&e.__esModule)return e;var t=a();if(t&&t.has(e))return t.get(e);var n={};if(null!=e){var i=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r)){var o=i?Object.getOwnPropertyDescriptor(e,r):null;o&&(o.get||o.set)?Object.defineProperty(n,r,o):n[r]=e[r]}}n.default=e,t&&t.set(e,n);return n}(n("Xeoq"));t.default=i},"7jDv":function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.fastResample=function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"peak";return new l({srcSampleRate:e.length,dstSampleRate:t,normalizeAlgorithm:n,truncateTo:0}).push(e)},t.Resampler=void 0;var a=n("whJg"),i=n("p5gW"),r=n("9SvD");function o(e,t){for(var n=0;n0?this._sampleRate=this._srcSampleRate/this._dstSampleRate:this._sampleRate=0,s[t.algorithm]||(t.algorithm="peak"),this._algorithm=new s[t.algorithm],this._sampleCount=0,this._data=[]}var t,n,a;return t=e,(n=[{key:"push",value:function(e){if(this._sampleRate<=0)return[];for(var t,n=[],a=0;a0&&(e[a]=Math.min(this._truncateTo,Math.abs(e[a]))),this._sampleCount+=1,this._sampleCount>=this._sampleRate)for(;this._sampleCount>=this._sampleRate;)this._sampleCount-=this._sampleRate,this._sampleCount<=.8&&this._algorithm.push(e[a]),t=this._algorithm.get(),n.push(t),this._normalizeAlgorithm&&this._normalizeAlgorithm.push(t),this._algorithm.clear(),this._sampleCount>.2&&this._algorithm.push(e[a]);else this._algorithm.push(e[a]);if(this._normalizeAlgorithm){var i=this._normalizeAlgorithm.get();if(this._normalizeAlgorithm.clear(),i>0)for(var r=0;r0&&(n[r]=Math.min(this._truncateTo,Math.abs(n[r])))}return n}}])&&o(t.prototype,n),a&&o(t,a),e}();t.Resampler=l},"7jQU":function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"uTyping_getPeerTyping",{enumerable:!0,get:function(){return a.uTyping_getPeerTyping}}),Object.defineProperty(t,"uTyping_getNames",{enumerable:!0,get:function(){return a.uTyping_getNames}});var a=n("USu8")},"7lzo":function(e,t,n){"use strict";var a;((a=n("9CLW"))&&a.__esModule?a:{default:a}).default.onPostMessage(function(e){"waiterStart"!==e&&"3dsPage"!==e||document.activeElement&&document.activeElement.blur()})},"7qNY":function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var a=r(n("DiaP")),i=r(n("29dZ"));function r(e){return e&&e.__esModule?e:{default:e}}Object.assign(a.default,{accept:function(e,t,n){i.default.setLoading(t,!0),ajaxRequest("/mail",{act:"mrs_accept",peer_id:n,hash:store.mail.hash.mrs},function(e){e.error&&i.default.setLoading(t,!1)},function(){i.default.setLoading(t,!1)})},reject:function(e,t,n){i.default.setLoading(t,!0),ajaxRequest("/mail",{act:"mrs_reject",peer_id:n,hash:store.mail.hash.mrs},function(e){e.error&&i.default.setLoading(t,!1)},function(){i.default.setLoading(t,!1)})}});var o=a.default;t.default=o},"7tQU":function(e,t,n){"use strict";var a=n("UxAg"),i=n("OcsD"),r=(0,i.need)("scrollToEl");(0,i.need)("page").onChange(s);var o={anchorByHash:function(e){return".Anchor#".concat(e)}};function s(e){if(e){var t=e.split("#")[1],n=t&&!~t.indexOf("=")&&(0,a.$)(o.anchorByHash(t));n&&r(n)}}},"80md":function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Line=o,t.default=void 0;var a,i=n("/xuI"),r=(a=n("z9sQ"))&&a.__esModule?a:{default:a};function o(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=(0,i.getRandomId)("skeleton-line"),n=(0,i.stylesObjectToString)({})+(e.style||""),a=[r.default.class("SkeletonLine",{small:e.small,header:e.header}),e.class].filter(function(e){return e}).join(" ");return(0,i.applyAnimation)(t),{id:t,class:a,style:n,tag:"div"}}var s=o;t.default=s},"82vK":function(e,t,n){"use strict";var a=n("UxAg"),i=c(n("+cqQ")),r=(n("jk6M"),c(n("AXyT"))),o=c(n("rKUZ")),s=function(e){if(e&&e.__esModule)return e;var t=l();if(t&&t.has(e))return t.get(e);var n={};if(null!=e){var a=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var i in e)if(Object.prototype.hasOwnProperty.call(e,i)){var r=a?Object.getOwnPropertyDescriptor(e,i):null;r&&(r.get||r.set)?Object.defineProperty(n,i,r):n[i]=e[i]}}n.default=e,t&&t.set(e,n);return n}(n("NJSj"));function l(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return l=function(){return e},e}function c(e){return e&&e.__esModule?e:{default:e}}function u(e,t){e.target.closest("a.convo__avatar")||(e.stopPropagation(),e.preventDefault(),s.default.onTap(t))}Object.assign(s.default,{onTap:(0,i.default)("url"),setOnline:function(e,t){(0,a.$$)(".convo_id_".concat(e," .convo__online")).forEach(function(e){e.outerHTML=(0,s.Convo__online)(t)})},setLastMsg:function(e,t,n){var i=n.dateShort,r=n.pending,o=n.failed;(0,a.$$)(".convo_last.convo_id_".concat(e)).forEach(function(e){e.$(".convo__text").innerHTML=t,e.$(".convo__status").innerHTML=(0,s.Convo__rightStatus)({pending:r,failed:o}),r||o?(e.$(".convo__date").innerText="",e.$(".convo__unreadBox").hidden=!0):(e.$(".convo__date").innerText=i,e.$(".convo__unreadBox").hidden=!1)})},setTyping:function(e,t){(0,a.$$)(".convo_last.convo_id_".concat(e)).forEach(function(e){var n=e.$(".convo__typing"),a=t.typing;if(t.typingCount&&(!0===a||Array.isArray(a))){var i=n.$(".typing"),r=i&&q.parseClass("typing",i.className);i&&r.animation===t.animation?o.default.setTyping(i,t):(e.classList.add("convo_typing"),n.innerHTML=(0,o.default)(t))}else n.innerHTML="",e.classList.remove("convo_typing")})},setUnreadCount:function(e,t){(0,a.$$)(".convo_last.convo_id_".concat(e)).forEach(function(e){var n=e.$(".Oval");e.classList.toggle("convo_unread",t>0),e.classList.toggle("convo_unreadOut",t<0),r.default.setValue(n,t)})},setImportant:function(e,t){(0,a.$$)(".convo_id_".concat(e)).forEach(function(e){e.classList.toggle("convo_important",t)})}}),s.default._onClick=u},"8ZMO":function(e,t,n){"use strict";var a;Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var i=((a=n("iDzD"))&&a.__esModule?a:{default:a}).default;t.default=i},"8fwe":function(e,t,n){"use strict";var a=n("JDEo"),i=n("7jDv"),r=n("OcsD"),o=null,s=4;function l(e){for(var t=geByClass("audio-msg-track--wave-wrapper",e),n=0,a=0;a0)break}return n}function c(e,t){t=Math.round(t),e.length!=t&&(e=(0,i.fastResample)(e,t));for(var n="",a=0,r=0;r')}function u(){for(var e=geByClass("audio-msg-track"),t=0;t0&&(n=(0,r.attr)(e[t-1],"data-wave"));var a=l(e[t]);if(n&&a){n=n.split(",");for(var i=geByClass("audio-msg-track--wave",e[t]),o=c(n,a/s),u=0;u6e4)&&(s.default.set("push_notifier_subscribed_ts"+vk.id,t),i=!0),i}},{key:"listenPermission",value:function(){var e=this;(0,i.partConfigEnabled)("push_notifier")&&navigator.permissions&&navigator.permissions.query&&navigator.permissions.query({name:"notifications"}).then(function(t){t.onchange=function(){return e.update()}})}},{key:"update",value:function(){var t=this;return this.updatePermission().then(function(n){return n===e.PUSH_NOTIFIER_PERMISSION_GRANTED?t.subscribe().catch(function(t){t!==e.SUBSCRIBE_ERROR_NETWORK&&t("can not update subscribe")}):Promise.reject("premession_not_granted")}).catch(o.error)}},{key:"updatePermission",value:function(){var t=e.getPermission();if(t!==e.PUSH_NOTIFIER_PERMISSION_GRANTED){var n=this.loadEndpoint();if(n)return this.unsubscribe(n).then(function(){return t})}return Promise.resolve(t)}},{key:"processSubscribe",value:function(t){return t.subscribe({userVisibleOnly:!0,applicationServerKey:(0,r.urlBase64ToUint8Array)(e.SERVER_KEY)})}},{key:"setupSubscription",value:function(){var t=this;return new Promise(function(n,a){var i=e.getPermission(),r=function(){t.subscribe(!0).then(function(){n()}).catch(function(){a()})};i!==e.PUSH_NOTIFIER_PERMISSION_DENIED?i!==e.PUSH_NOTIFIER_PERMISSION_GRANTED?i===e.PUSH_NOTIFIER_PERMISSION_DEFAULT&&t.requestPermission().then(function(t){t===e.PUSH_NOTIFIER_PERMISSION_GRANTED?r():a()}):r():a(e.PUSH_NOTIFIER_BLOCKED_BY_BROWSER_SETTINGS)})}},{key:"subscribe",value:function(t){var n=this;return this.sw.getRegistration().then(function(e){var t=e.pushManager;return t.getSubscription().then(function(e){if(e){var a=e.expirationTime;return a&&Date.now()>a-432e6?n.unsubscribe(n.loadEndpoint()).then(function(){return n.processSubscribe(t)}):e}return n.processSubscribe(t)})}).then(function(a){return new Promise(function(i,r){if(t||n._needupdate(a)){var o=a.getKey("p256dh"),s=a.getKey("auth");window.ajax.post(e.SERVER_URL,{act:"a_subscribe",endpoint:a.endpoint,key:o?btoa(String.fromCharCode.apply(null,new Uint8Array(a.getKey("p256dh")))):null,token:s?btoa(String.fromCharCode.apply(null,new Uint8Array(a.getKey("auth")))):null},{onDone:function(e){e?(n.saveEndpoint(a.endpoint),i()):r()},onFail:function(){return r(e.SUBSCRIBE_ERROR_NETWORK),!0}})}else i()})})}},{key:"unsubscribe",value:function(t){var n=this;return this.sw.register().then(function(a){return a.pushManager.getSubscription().then(function(a){return a?a.unsubscribe().then(function(a){return a?new Promise(function(a,i){ajax.post(e.SERVER_URL,{act:"a_unsubscribe",endpoint:t},{onDone:function(e){e?(n.saveEndpoint(!1),a()):i()}})}):Promise.reject("ERROR: can not unsubscribe")}):(n.saveEndpoint(!1),Promise.reject("ERROR: no subscription"))})})}},{key:"requestPermission",value:function(){var t=e.getPermission();return t===e.PUSH_NOTIFIER_PERMISSION_DEFAULT?new Promise(function(e,t){var n=Notification.requestPermission(function(t){e(t)});n instanceof Promise&&n.then(e,t)}):Promise.resolve(t)}},{key:"checkMessageState",value:function(){var t=this;return new Promise(function(e){return setTimeout(e,5e3)}).then(function(){return t.action("getMessagesMetaData")}).then(function(t){return"object"===l(t)&&Object.keys(t).length?new Promise(function(n,a){window.ajax.post(e.SERVER_URL,{act:"a_update_messages_state",data:Object.entries(t)},{onDone:function(e){e?n(e):a("ERROR: act error")},onFail:function(){return a("ERROR: network error"),!0}})}):Promise.resolve({})}).then(function(e){try{return JSON.parse(e)}catch(e){return{}}}).then(function(e){return t.action("updateMessageNotifications",e)}).catch(function(e){return(0,o.error)(e)})}}])&&c(t.prototype,n),a&&c(t,a),e}();u.SERVER_KEY="BPrntRk2W1_ISFwlgY-vz9tQDg9i1oSQ3-N8xyjdbNAbIOdZIGFdh5FlO7zn730UwU9Sayoec-Fpqq4JZFTyv60",u.SERVER_URL="push_notifier",u.PUSH_NOTIFIER_PERMISSION_GRANTED="granted",u.PUSH_NOTIFIER_PERMISSION_DEFAULT="default",u.PUSH_NOTIFIER_PERMISSION_DENIED="denied",u.PUSH_NOTIFIER_BLOCKED_BY_BROWSER_SETTINGS="BLOCKED_BY_BROWSER_SETTINGS",u.SUBSCRIBE_ERROR_NETWORK="SUBSCRIBE_ERROR_NETWORK";var d=u;t.default=d},"8kEl":function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var a,i=(a=n("Y6JH"))&&a.__esModule?a:{default:a};var r=function(e){return{class:"Photo__marketShowMoreButton",attrs:{"data-items-json":e.items},inner:[{class:"Photo__marketShowMoreButtonIcon",inner:(0,i.default)("market","market_16")},getLang("mobile_photos_show_market_items")]}};t.default=r},"8mQl":function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.AudioQueue=void 0;var a,i=n("L9Nh"),r=(a=n("r/ag"))&&a.__esModule?a:{default:a},o=n("BFfX");function s(e,t){for(var n=0;n0&&void 0!==arguments[0]&&arguments[0];if(i.QueueManager.initialized){var n=window.audio.getCurrent(),a=!t&&l;n&&!a&&ajax.post("/audio",{act:"queue_params",audio_id:n.id,owner_id:n.ownerId,hash:n.actionHash},{onDone:function(t){var n=t&&t.queues&&t.queues[0];n&&e.subscribe(n)},onFail:function(){return u<2&&(u++,setTimeout(e.connect,5e3)),!0}})}}},{key:"update",value:function(t,n){if(t===l)if(n.failed)e.connect(!0);else for(var a=window.audio.playing(),i=0;i1&&void 0!==arguments[1]?arguments[1]:{};this.params=extend({replace:!1,reply:!1,replyTo:!1,restore:!1,forceAuthorIndex:!0,isOpenNarrativeFromFeed:!1},n);var a=this._parseList(e).split("/"),i=g(a,3),r=i[0],o=i[1],s=i[2],l=r.split("_"),c=g(l,1),u=c[0];n&&n.narrativeId&&(u=n.narrativeId.toString()),this.initRaw=e,this.storyOwner=(0,p.intval)(u),this.storyRaw=r,this.storyExtra=s,this.storyList=o,this.extra=this.parseExtra(this.storyExtra),this.needAudioRestore=audio.playing(),this.Views={},this.popoutOpen=!1,this.slideTimer=null,this.createLayer(),this._initStore(),this.detectAutoplay().then(function(){t.isRestored?t._init():t._checkPreloadedList()?(t._initPreloadedList(),t._init()):t._requestList().then(function(e){var n=e.items,a=e.list;n&&(t.store.authors=n,t.store.listLoaded=!0,t.store.list=a,t.store.inited=!0,t._init())},function(){})})},parseExtra:function(e){var t={},n=String(e).split(";");for(var a in n)if(n.hasOwnProperty(a)){var i=g(n[a].split(":"),2),r=i[0],o=i[1];r&&o&&(t[r]=o)}return t},_checkPreloadedList:function(){return!!(window.store&&window.store.storiesLists&&window.store.storiesLists[this.storyList])},_initPreloadedList:function(){var e=window.store.storiesLists[this.storyList];e&&(this.store.authors=e,this.store.listLoaded=!0,this.store.list=this.storyList,this.store.inited=!0)},pushPreloadedList:function(e){var t=(0,p.parseJSON)(e);window.store||(window.store={}),window.store.storiesLists||(window.store.storiesLists={}),extend(window.store.storiesLists,t),window.store.stories||(window.store.stories={}),Object.keys(t).forEach(function(e){window.store&&window.store.storiesLayers&&window.store.storiesLayers.includes(e)||delete window.store.stories[e]})},_createMetaStory:function(){var e=this;(0,p.each)(this.store.authors,function(t,n){var a=n.items[n.items.length-1];a.isNarrativeMetaStory||n.items.push({type:"photo",raw_id:a.raw_id,preview:a.preview,preview_url:a.preview_url,narrative:a.narrative,photo_url:a.photo_url,isNarrativeMetaStory:!0,isOpenNarrativeFromFeed:e.params.isOpenNarrativeFromFeed})})},_init:function(){var e=this;this.createAuthors(),this.storyList.match(/narrative-?\d+_\d+/)&&this._createMetaStory();var t=this.getFirstStoryIndex();this.setCurrentStory(t);var n=this.getCurrentStory();this.params.restore||this.setHistory(n.raw_id,{nav_init:!0,replace:this.params.replace}),this.sliderEl=ge("StoriesSlider"),this.slider=(0,r.default)(this.sliderEl,{speed:300,startSlide:this.getCurrentAuthorIndex(),onSlideChange:function(t){t=e.slider&&(0,p.intval)(e.slider.getCurrentPos());var n=e.getCurrentAuthorIndex();e.getCurrentAuthor().data.is_groups||e.setAllAuthorStoriesReaded(n),clearTimeout(e.slideTimer),void 0!==t&&t!==n&&(e.markSeenAllOwners(),!1===e.isTap&&(t>n?e.sendAnalyticsEvent("go_to_next_author"):e.sendAnalyticsEvent("go_to_previous_author")),e.setCurrentAuthor(t),e.slideTimer=setTimeout(function(){e.renderStory()},300)),delete e.isTap},onSetup:function(){(0,p.addClass)(e.layer,"Stories_inited"),e.renderStory()}}),this.Authors&&1===this.Authors.length&&((0,p.addClass)(this.layer,"Stories_inited"),this.renderStory()),this.store.showViews&&this.showViews(n.raw_id,!0),this._initViewerSource(),this._sendOpeningEvents()},_initStore:function(){window.store||(window.store={stories:{},storiesLayers:[]}),window.store.stories||(window.store.stories={}),window.store.storiesLayers||(window.store.storiesLayers=[]),window.store.stories[this.storyList]&&window.store.stories[this.storyList].inited?(this.store=window.store.stories[this.storyList],this.isRestored=!0):(this.store={authors:[],listLoaded:!1,readedStories:{},_requests:[],viewers:{},questions:{},viewersState:{},replies:{},showMenu:!1,storyList:this.storyList,initRaw:this.initRaw,storyIndex:0,authorIndex:0,isReply:this.params.reply,replyTo:this.params.replyTo,inited:!1},window.store.stories[this.storyList]=this.store,this.isRestored=!1),this.params.restore||window.store.storiesLayers.push(this.store.storyList)},_initViewerSource:function(){var e=this._getSource();switch(e){case"reply":this.viewerSource="replies_list";break;case"feed":this.viewerSource=cur.module;break;default:this.viewerSource=e}},_sendOpeningEvents:function(){var e=this._getSource();if(e){var t;switch(e){case"narrative_story":t="narrative_open_stories";break;case"narrative_snippet":case"narrative_link":t="narrative_open";break;case"narrative_recommendations":t="narrative_other"}if(t&&this._sendNavigationStatEvents(t),"narrative_fave"===e){var n=(this.getCurrentStory()||{}).narrative||{},a=n.owner_id,i=n.id;if(!a||!i)return;statlogsValueEvent("bookmarks_product_analytics",{item_type:"narrative",item_owner_id:(0,p.intval)(a),item_id:(0,p.intval)(i),time:vk.ts+Math.floor(((new Date).getTime()-vk.started)/1e3)})}}},_abortRequests:function(){isArray(this.store._requests)&&(0,p.each)(this.store._requests,function(e,t){t&&t.readyState<4&&t.abort()}),this.store._requests=[]},_saveRequest:function(e){this.store._requests.push(e)},getStore:function(){return this.store},setAllAuthorStoriesReaded:function(e){var t=this;this.store.authors[e].items.forEach(function(e){if(e.unread){var n=e.raw_id;e.track_code&&(n+="_"+e.track_code),t.store.readedStories[n]=!0}})},markSeenAllOwners:function(){var e=this.getCurrentAuthor().data,t=window.store.stories.groups;if(e.is_groups&&t){t.authors.forEach(function(e){return e.items.forEach(function(e){return e.unread=!1})});var n=t.authors.map(function(e){return e.author.id});ajax.post("stories.php",{_ajax:1,act:"mark_owners_seen",hash:this.store.authors[0].read_hash,owners_ids:n.join(",")});this._needFeedUpdate=!0}},togglePin:function(e,t){if(e){this._hideFeatureTooltip();var n=hasClass(e,"Story__pinBtn--unpin"),a=y.getCurrentAuthor();(0,p.toggleClass)(e,"Story__pinBtn--unpin",!n),ajax.post("stories.php",{_ajax:1,act:"toggle_pin",owner_id:t,need_pin:(0,p.intval)(!n),hash:this.store.authors[0].stories_pin_hash},{onDone:function(t){1!==t?(0,p.toggleClass)(e,"Story__pinBtn--unpin",n):a&&a.data&&a.data.author&&(a.data.author.isOwnerPinned=!n)}})}},createAuthors:function(){var e=this,t="";this.Authors=[];var n=this.getCurrentAuthorIndex();this.isRestored&&!this.params.forceAuthorIndex||(n=this.getFirstAuthorIndex());var a=this.store.authors[n],i=a.items[a.items.length-1].unread;if(this.extra)switch(this.extra.context){case"new":i=!0;break;case"all":i=!1}(0,p.each)(this.store.authors,function(n,a){var r=a.items;if(!n||!i||r[r.length-1].unread){var o=new s.StoryAuthor(n,a);e.Authors.push(o),t+=o.renderEmpty()}}),(0,p.val)((0,p.geByClass1)("Stories__authors",this.layer),t),this.authors=Array.from(geByClass("StoryAuthor",this.layer)),(0,p.each)(this.Authors,function(e,t){t.updateHeader()}),this.setCurrentAuthor(n)},getFirstStoryIndex:function(){var e=this,t=this.store.authors[this.getCurrentAuthorIndex()];if(this._hasContext("all"))return 0;if(!this._hasContext("new")){var n=t.items.findIndex(function(t){return t.raw_id===e.storyRaw});if(-1!==n)return n}return this.getCurrentStoryIndex()},getFirstAuthorIndex:function(){var e=this,t=this.store.authors.findIndex(function(t){return t.author.index===e.storyOwner});return-1!==t?t:0},getCurrentAuthorIndex:function(){return this.store.authorIndex},getCurrentStoryIndex:function(){return this.store.authors[this.getCurrentAuthorIndex()].index},getCurrentStory:function(){return this.store.authors[this.getCurrentAuthorIndex()].items[this.getCurrentStoryIndex()]},setCurrentAuthor:function(e){this.store.authorPrevIndex=this.store.authorIndex,this.store.authorIndex=e,this.updateCurrentAuthor()},setCurrentStory:function(e){this.store.authors[this.getCurrentAuthorIndex()].index=e},drawSiblingPreview:function(){for(var e=this.getCurrentAuthorIndex(),t=-2;t<=2;t++){var n=e+t;this.authors[n]&&n!==e&&this.drawPreview(this.authors[n])}},drawPreview:function(e){setStyle(e,"background-image","url(".concat(attr(e,"data-src"),")"))},updateCurrentAuthor:function(){var e=this.authors[this.store.authorIndex];(0,p.each)(this.authors,function(e,t){(0,p.removeClass)(t,"StoryAuthor_current")}),(0,p.addClass)(e,"StoryAuthor_current")},getSizes:function(){var e,t,n=window.innerHeight,a=window.innerWidth;return a<540?(e=a,t=n,zlayer.open(),zlayer.onResize=this.onResize.bind(this)):(e=Math.floor(Math.min(540,Math.max(320,.563*n))),t=Math.floor(1.78*e),(0,p.addClass)(document.body,"vk__story_open")),[e,t]},createLayer:function(){window.innerWidth<540?(zlayer.open(),zlayer.onResize=this.onResize.bind(this)):(0,p.addClass)(document.body,"vk__story_open"),y.opened=!0;var e=g(this.getSizes(),2),t=e[0],n=e[1];this.storyW=t;var i=a.default.html({id:"StoriesView",class:"Stories__layer _preventMenuOpen",style:"max-width: ".concat(t,"px; max-height: ").concat(n,"px"),inner:[{class:"Stories__loading",inner:{class:"Stories__loadingInner"}},{id:"StoriesSlider",class:"Stories__authors peppermint peppermint-inactive",ontouchmove:"Stories.onTouchMove(event);",inner:""},{class:"Stories__layerClose",inner:{class:"Story__icon Story__icon_close"},onclick:"return Stories.clickClose();"},{class:"Stories__popout"},{class:"Stories__flash",onclick:"Stories.hideFlashPopup()",inner:{class:"Stories__flashText"}},{class:"Stories__swipeText Stories__swipeText_top"}]});this.layer=(0,p.append)((0,p.ce)("div",{className:"Stories",innerHTML:i}),document.body),attr(this.layer,"ontouchmove","event.preventDefault();"),this.loader=(0,p.geByClass1)("Stories__loading",this.layer),this.popout=(0,p.geByClass1)("Stories__popout",this.layer),this.swipeTextTop=(0,p.geByClass1)("Stories__swipeText_top",this.layer)},onResize:function(){var e=ge("StoriesView"),t=g(this.getSizes(),2),n=t[0],a=t[1];attr(e,"style","max-width: ".concat(n,"px; max-height: ").concat(a,"px")),this.storyW=n,this.authors.forEach(function(e){setStyle(e,"width","".concat(n,"px"))}),this.Authors&&this.Authors.length>1&&this.slider&&this.slider.recalcWidth()},getWidth:function(){return this.storyW},renderStory:function(){var e=this.store.authorPrevIndex,t=this.getCurrentAuthorIndex(),n=this.authors[t],a=this.Authors[t];if(a.update(),!isNaN(e)&&e!==t){var i=this.Authors[e],r=this.authors[e];i.update();var o=i.renderEmpty(),s=ceFromString(o);replace(s,r)}var l=ceFromString(a.render());replace(l,n),this.authors=Array.from(geByClass("StoryAuthor",this.layer)),this.updateCurrentAuthor(),a.updateHeader(),this.onRender(),this.drawSiblingPreview(),"open"===this.extra.replies&&this.showViews(this.getCurrentStory().raw_id)},getCurrentAuthor:function(){var e=this.getCurrentAuthorIndex();return(this.Authors||[])[e]},getCurrentAuthorEl:function(){return this.getCurrentAuthor().authorElem},getAuthorElems:function(){return this.authors},prevStory:function(){var e=this;this.stopStory(),this.store.isStopped=!1,requestAnimationFrame(function(){var t=e.getCurrentStoryIndex(),n=e.getCurrentAuthorIndex();if(t-1<0)if(n-1<0)e.setCurrentStory(0),e.renderStory();else{e.slider.slideTo(n-1);var a=e.store.authors[n-1].items.length-1;e.setCurrentStory(a)}else e.setCurrentStory(t-1),e.renderStory()})},nextStory:function(e){var t=this;this.stopStory(),this.markSeenAllOwners(),this.store.isStopped=!1,requestAnimationFrame(function(){var n=t.store.authors[t.getCurrentAuthorIndex()],a=t.getCurrentStoryIndex(),i=t.getCurrentAuthorIndex(),r=n.items.length,o=t.Authors.length;r-1<=a?o-1<=i?requestAnimationFrame(function(){t.sendAnalyticsEvent("close_auto_by_time"),t.close()}):(e&&t.sendAnalyticsEvent("go_to_next_story_auto_by_time"),t.slider.slideTo(i+1),t.setCurrentStory(0)):(e&&t.sendAnalyticsEvent("go_to_next_story_auto_by_time"),t.setCurrentStory(a+1),t.renderStory())})},stopStory:function(){this.store.isStopped=!0,this.pauseStory()},pauseStory:function(e){var t=this.getCurrentAuthor();if(t){t.getCurrentStory();var n=t.getCountDown();e&&(0,p.addClass)(this.layer,"Stories_paused"),n&&n.pause()}},playStory:function(e){this.store.isStopped=!1;var t=this.getCurrentAuthor();if(t){t.getCurrentStory();var n=t.getCountDown();(0,p.removeClass)(this.layer,"Stories_paused"),n&&n.start()}},pauseAudio:function(){var e=window.audio;this.getCurrentStory().noSound||e&&e.pause()},restoreAudio:function(){var e=window.audio;this.needAudioRestore&&e&&e.play()},showMenu:function(){this.store.showMenu=!0,this._hideTooltips(),this.stopStory(),(0,p.addClass)(this.layer,"Stories_menuOpened")},hideMenu:function(){var e=!(arguments.length>0&&void 0!==arguments[0])||arguments[0];this.store.showMenu=!1,(0,p.removeClass)(this.layer,"Stories_menuOpened"),e&&this.playStory()},showLoading:function(){var e=this;this.loader&&(clearTimeout(this.loaderTimer),this.loaderTimer=setTimeout(function(){show(e.loader)},100))},hideLoading:function(){this.loader&&(clearTimeout(this.loaderTimer),hide(this.loader))},onRepliesScroll:function(e,t){this.Views[t]&&(this.store.viewersState[t].repliesScrollLeft=e.target.scrollLeft)},showViews:function(e){var t=this,n=arguments.length>1&&void 0!==arguments[1]&&arguments[1];if(this.hideMenu(),this.store.showViews=!0,this.stopStory(),this._hideTooltips(),this.Views[e]){this.store.viewersState[e];var a=this.Views[e].render();this.popoutOpen=!0,(0,p.val)(this.popout,a);var i=(0,p.geByClass1)("Views__repliesBody",this.popout);i&&(i.scrollLeft=0),n||this.sendAnalyticsEvent("open_replies_list")}else{var r=this.store.viewersState[e],o=this.store.viewers[e];if(r&&o)return void this.createViews(e,n);this.showLoading(),this._requestFeedback(e).then(function(){t.markQuestionsAsViewed(),t.createViews(e,n),t.hideLoading()})}},markQuestionsAsViewed:function(){(this.getCurrentStory()||{}).isNewQuestions=!1,(0,p.removeClass)((0,p.geByClass1)("Story__stats"),"Story__stats_new_questions")},createViews:function(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1],n=this.store.viewersState[e],a=new l.default(e),i=a.render();this.popoutOpen=!0,(0,p.val)(this.popout,i),this.Views[e]=a;var r=(0,p.geByClass1)("Views__repliesBody",this.popout);r&&(r.scrollLeft=n.repliesScrollLeft),t||this.sendAnalyticsEvent("open_replies_list")},hideViews:function(){var e=!(arguments.length>0&&void 0!==arguments[0])||arguments[0];e&&this.playStory(),this.store.showViews=!1,this.popoutOpen=!1,(0,p.val)(this.popout,"")},loadViews:function(e){var t=this,n=this.store.viewersState[e],a=n.loading,i=n.nextFrom;!a&&i&&(n.loading=!0,this.showLoading(),this._requestFeedback(e,i).then(function(){var a=new l.default(e),i=a.render();t.popoutOpen=!0;var r=(0,p.geByClass1)("Views__body",t.layer).scrollTop;(0,p.val)(t.popout,i),(0,p.geByClass1)("Views__body",t.layer).scrollTop=r,t.Views[e]=a,t.hideLoading(),n.loading=!1}))},showComment:function(){var e=this,t=this.authors[this.store.authorIndex],n=(0,p.geByClass1)("Story__commentTextarea",t);this.store.showComment=!0,this.stopStory(),(0,p.addClass)(this.layer,"Stories_commentOpened"),this._hideTooltips(),requestAnimationFrame(function(){e.sendAnalyticsEvent("comment_tap"),n&&n.focus()})},hideComment:function(){var e=!(arguments.length>0&&void 0!==arguments[0])||arguments[0];this.store.showMenu=!1,(0,p.removeClass)(this.layer,"Stories_commentOpened"),e&&this.playStory()},onInputComment:function(e){var t=this.authors[this.store.authorIndex],n=(0,p.geByClass1)("Story__commentSend",t),a=(0,p.val)(e);(0,p.toggleClass)("Story__commentSend_active",n,!!a)},sendComment:function(){var e=this.authors[this.store.authorIndex],t=(0,p.geByClass1)("Story__commentTextarea",e),n=(0,p.geByClass1)("Story__commentSend",e),a=(0,p.val)(t);if(hasClass("Story__commentSend_active",n)){(0,p.val)(t,""),(0,p.removeClass)(n,"Story__commentSend_active");var i,r=this.getCurrentAuthorIndex(),o=this.getCurrentStory(),s=o.raw_id,l=o.narrative,c=this.store.authors[r],u=c.send_hash,d=c.author.id;i=l?"narrative".concat(l.raw_id):"story".concat(s),this._sendMessage(u,i,a,d),this.hideComment()}},showFlashPopup:function(e){var t=this,n=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],a=1500;this.stopStory();var i=(0,p.geByClass1)("Stories__flash",this.layer);(0,p.val)((0,p.geByClass1)("Stories__flashText",i),e),setTimeout(function(){(0,p.addClass)(i,"Stories__flash_show")}),clearTimeout(this.flashTimer),clearTimeout(this.flashHideTimer),this.flashTimer=setTimeout(function(){(0,p.removeClass)(i,"Stories__flash_show"),t.flashHideTimer=setTimeout(function(){t.hideFlashPopup(n)},a)},a)},hideFlashPopup:function(e){e&&this.playStory(),clearTimeout(this.flashTimer),clearTimeout(this.flashHideTimer);var t=(0,p.geByClass1)("Stories__flash",this.layer);(0,p.removeClass)(t,"Stories__flash_show")},removeCurrentStory:function(){var e=this,t=window.lang,n=this.getCurrentAuthor();if(n){var a=n.getCurrentStory(),i=a.narrative?t.mobile_stories_delete_narrative:t.mobile_stories_delete_story;if(confirm(i.replace(/(<([^>]+)>)/gi,"\n"))){var r=n.data.remove_hash,o=a.can_remove,s=a.raw_id;if(o){this.pauseStory();var l=function(){e._requestFeedBlock(),a.isNarrativeSlide&&e.close(),0===e.getCurrentStoryIndex()?(e.close({closeAll:!1}),location.reload()):(e.store.authors[e.getCurrentAuthorIndex()].items.splice(e.getCurrentStoryIndex(),1),e.hideMenu(),e.prevStory())};if(a.narrative){var c=a.narrative,u=c.owner_id,d=c.id,f="".concat(u,"_").concat(d);this._requestRemoveNarrative(f,r).then(function(){l()},function(){})}else this._requestRemoveStory(s,r).then(function(){e.sendAnalyticsEvent("delete"),l()},function(){})}}}},onScrollViews:function(e,t){var n=this.store.viewersState[t],a=n.loading,i=n.nextFrom;if(!a&&i){e.scrollHeight-e.offsetHeight-400<=e.scrollTop&&this.loadViews(t)}},unMute:function(e,t){var n=this.getCurrentAuthor().story.getVideo();(0,p.cancelEvent)(t),n&&n.muted&&(n.muted=!1,(0,p.removeClass)(gpeByClass(s.VIDEO_MUTED_CLASS,e),s.VIDEO_MUTED_CLASS))},onTouchStart:function(e){var t=this,n=this.getCurrentAuthor().story;if(n&&"video"===n.getType()){var a=n.getVideo();if(a&&a.paused)return void(this.preventedTap=!0)}this.pauseStory(!0),this.isTap=!0,"touchstart"===e.type?(this.tapStartX=e.changedTouches[0].clientX,this.tapStartY=e.changedTouches[0].clientY):(this.tapStartX=e.clientX,this.tapStartY=e.clientY),clearTimeout(this.isTapTimer),this.isYmove=null,(0,p.removeClass)(this.layer,"Stories_touchMove"),this.isTapTimer=setTimeout(function(){t.isTap=!1,t.sendAnalyticsEvent("pause_long_tap")},200)},onTouchMove:function(e){var t=0,n=0;"touchmove"===e.type&&(t=this.tapStartX-e.changedTouches[0].clientX,n=this.tapStartY-e.changedTouches[0].clientY),null===this.isYmove&&(this.isYmove=Math.abs(t)20||Math.abs(this.tapStartY-i)>20)&&(this.isTap=!1),(0,p.removeClass)(this.layer,"Stories_touchMove"),setStyle(this.sliderEl,"opacity",1),setStyle.transform(this.sliderEl,1,[0,0]),setStyle.transform((0,p.geByClass1)("Story__moreLink"),1,[0,0]),this.needGoToLink){var r=this.getCurrentAuthor().story;if(this.needGoToLink=!1,r&&r.hasLink())return void this.openCustomButton(e)}if(this.needClose)return this.sendAnalyticsEvent("close_swipe_down"),void this.close();if(this.featureTooltip)this._hideFeatureTooltip();else if(this.tooltip)this._hideTooltips();else{if(this.isTap){if(hasClass(e.target,"Story__sticker"))return(0,p.removeClass)(this.layer,"Stories_paused"),void((0,p.domData)(e.target,"question")?this.askQuestionBox(e):this.tooltip?this._hideTooltips():this._showTooltip(e,n._createStickerLink(e.target)));t?(this.sendAnalyticsEvent("go_to_previous_story"),this.prevStory()):(this.sendAnalyticsEvent("go_to_next_story_tap"),this.nextStory())}this._hideTooltips(!0),this.hideMenu()}},openCustomButton:function(e){e.preventDefault(),e.stopPropagation();var t=this.getCurrentAuthor().story,n=t.getLinkUrl(),a=n.match(/\/narrative(-?\d+)_(\d+)/);if(a){var i={ownerId:a[1],narrativeId:a[2]},r=i.ownerId,o=i.narrativeId;if(!r||!o)return!1;this.openNarrative("".concat(r,"/narrative").concat(r,"_").concat(o),{source:"narrative_story",isOpenNarrativeFromFeed:!0})}else if(this.stopStory(),this.showLoading(),t.stats&&t.stats.url_view){var s=t.stats.url_view,l=s.event_type,c=s.rhash,u=t.raw_id;this._requestClickStat(u,l,c,function(){nav.go(n)})}else nav.go(n);return!1},onVerticalSwipe:function(e){var t=window.lang;if(this.needClose=!1,this.needGoToLink=!1,e){var n=e>0,a=this.sliderEl.offsetHeight,i=a/3.5,r=Math.abs(e)>i;if(n){var o=r?t.mobile_zphoto_release_to_close:t.mobile_zphoto_move_to_close,s=r?"":n?"zpv_close_move_down":"zpv_close_move_up",l=Math.max(1-.75*e/a,.6);(0,p.val)(this.swipeTextTop,'
    ').concat(o,"
    ")),setStyle(this.sliderEl,"opacity",l),setStyle.transform(this.sliderEl,1,[0,e/1.5]),setStyle(this.swipeTextTop,"opacity",Math.abs(l-1-.6)),setStyle.transform(this.swipeTextTop,1,[0,e/1.5*.85]),this.needClose=r}else{var c=Math.min(1-.5*e/a,1.1);setStyle(this.sliderEl,"opacity",1),setStyle.transform(this.sliderEl,1,[0,0]),setStyle.transform((0,p.geByClass1)("Story__moreLink"),c,[0,Math.max(e/(1.5*1.6),-90)]),this.needGoToLink=r}}else setStyle(this.sliderEl,"opacity",1),setStyle.transform(this.sliderEl,1,[0,0]),setStyle.transform((0,p.geByClass1)("Story__moreLink"),1,[0,0]),this.needClose=!1,this.needGoToLink=!1},preventScroll:function(){return this.popoutOpen},_requestRemoveStory:function(e,t){return new Promise(function(n,a){ajax.post("stories.php",{_ajax:1,act:"remove_story",hash:t,story_raw:e},{onDone:function(){n()},onFail:function(){a()}})})},_requestRemoveNarrative:function(e,t){return new Promise(function(n,a){ajax.post("stories.php",{_ajax:1,act:"remove_narrative",hash:t,narrative_raw:e},{onDone:function(){n()},onFail:function(){a()}})})},_requestList:function(){var e=this;return new Promise(function(t,n){var a={storyOwner:e.storyOwner,list:e.storyList,storyRaw:e.storyRaw,extra:e.storyExtra};if(!e.storyRaw)return n();var i=ajax.post("stories.php",{_ajax:1,act:"get_list",list:a.list,story_raw:a.storyRaw,extra:a.extra},{onDone:function(e){if(a.items=e.list,e.recommendations){var n=a.list+"_recommendations";window.store.stories[n]=y._forceSetStore(a.storyRaw,n,e.recommendations)}t(a)},onFail:function(){n()}});e._saveRequest(i)})},_forceSetStore:function(e,t,n){return{authors:n,listLoaded:!0,list:t,readedStories:{},_requests:[],questions:{},viewers:{},viewersState:{},replies:{},showMenu:!1,storyList:t,initRaw:e,storyIndex:0,authorIndex:0,isReply:!1,replyTo:!1,inited:!0}},_requestFeedback:function(e){var t=this,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,a=this.store;return new Promise(function(i,r){var o=ajax.post("stories.php",{_ajax:1,act:"feedback",offset:n,story_raw:e},{onDone:function(t,n,r,o,s,l,c){var u;(o&&o.length&&(a.replies[e]=o),a.viewers[e])?r&&(u=a.viewers[e]).push.apply(u,v(t)):a.viewers[e]=t;a.viewersState[e]?r&&extend(a.viewersState[e],{count:n,nextFrom:r}):a.viewersState[e]={count:n,nextFrom:r,repliesCountText:s,authorCountText:l,repliesScrollLeft:0},c.length&&(a.questions[e]=c),s&&(a.viewersState[e].repliesCountText=s),l&&(a.viewersState[e].authorCountText=l),i({viewers:t,count:n,nextFrom:r,repliesCountText:s,authorCountText:l,questions:c})},onFail:function(){r()}});t._saveRequest(o)})},_requestReadStories:function(){var e=this.store,t=Object.keys(e.readedStories),n=this._getSource();if(t.length){var a=ajax.post("stories.php",{_ajax:1,act:"read_stories",hash:this.store.authors[0].read_hash,stories:t.join(","),source:n,navigation_stats:(0,u.serializeNavigationStats)(),loading_stats:(0,u.serializeLoadingStats)(),connection_type:(0,u.getConnectionType)()},{onDone:function(){e.readedStories={},"feed"===n&&y._requestFeedBlock()}});this._saveRequest(a)}else this._needFeedUpdate&&(this._needFeedUpdate=!1,setTimeout(function(){y._requestFeedBlock()}))},_getSource:function(){if(this.params&&this.params.source)return this.params.source;var e=this.store&&this.store.list||"",t="";return e.includes("feed")?t="feed":e.includes("replies")&&(t="reply"),t},_sendNavigationStatEvents:function(e){var t=this.getCurrentStory(),n=t&&t.raw_id;if(n){var a=this._getSource();(0,u.saveNavigationStatEvent)({storyRawId:n,source:a,action:e})}},_sendViewerStartTime:function(e,t){var n=this.viewerSource;(0,u.saveViewerStartTime)({storyRawId:e,source:n,time:t})},_requestFeedBlock:function(){var e=nav.getQuery();if(!window.store.storiesLayers.length)ajax.post("stories.php",{_ajax:1,act:"feed_block",q:e.q},{onDone:function(e,t){var n=ge("StoriesFeedBlock");n&&replace(ceFromString(e),n),y.pushPreloadedList(t)}})},_requestClickStat:function(e,t,n,a){ajax.post("stories.php",{_ajax:1,act:"stat",source_story:e,event_type:t,rhash:n},{onDone:function(){a&&a()}})},_requestStickerStat:function(e,t){var n=this.getCurrentStory(),a=n.raw_id,i=n.clickable_stickers;a&&i&&ajax.post("stories.php",extend({act:"stickers_stat",story_raw_id:a,action:e,hash:i.hash},t))},_sendMessage:function(e,t,n,a){var i=ajax.post("mail.php",{_ajax:1,act:"send",entrypoint:"stories_comment",hash:e,media:t,message:n,to:a},{onDone:function(){var e=window.lang;y.showFlashPopup(e.mobile_stories_comment_success),y.sendAnalyticsEvent("comment_send")}});this._saveRequest(i)},_requestFave:function(e,t,n,a){ajax.post("bookmarks.php",{_ajax:1,act:e,item_type:31,item_oid:t,item_id:n,hash:a,ref:cur.module})},_parseList:function(e){var t=(e=decodeURIComponent(e)).match(/^story(-?\d+)_(\d+)(\/([a-z0-9\_\-]+))?(\/([a-z0-9\_\:\;\-]+))?$/i);if(t){var n=g(t,7),a=n[1],i=n[2],r=n[4],o=n[6],s=a+"_"+i;return e.match(/from_feed\=1/)?r="feed":e.match(/profile\=1/)?r="profile":r||(r=s),s+"/"+r+"/"+o}return e},setHistory:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{nav_init:!1,replace:!0},n=window,a=n.nav,i=this.getHistoryURL(e),r=a.getQuery(),o=i.match(/narrative-\d+_\d+/);o&&(i="narrative".concat(this.getCurrentStory().narrative.raw_id)),r.z=i;var s=a.path+obj2qs(r)+a.hash,l={push_only:!0,replace:t.replace,nav_init:!t.no_open,nav_incr:!0};a.go(s,null,l)},getFrom:function(){var e=!(arguments.length>0&&void 0!==arguments[0])||arguments[0],t=window,n=t.nav,a=this.store.list,i=n.getQuery(),r="z=".concat(i.z),o="";return"/write"===n.path.substr(0,6)?o="write".concat(n.path.substr(0,6),"?").concat(r):"/mail"===n.path?o="write".concat(i.peer,"?").concat(r):"/feed"===n.path?o=i.section&&"notifications"===i.section?"feed?section=notifications&".concat(r):"feed?".concat(r):a.startsWith("archive")?o="".concat(n.path,"?act=stories"):i.from&&(o=i.from),e?encodeURIComponent(o):o},getHistoryURL:function(e){var t=this.store.list;return"story"+e+(t?"/"+t:"")},getParams:function(){return this.params||{}},reportCurrentStory:function(e){var t=window.nav,n=this.getHistoryURL(e),a=(t.getQuery(),this.getFrom()),i="/reports?act=add&object=".concat(n,"&refrom=").concat(a);t.go(i)},openGroupsSettings:function(){var e=window.nav,t=this.getFrom(),n=this.getCurrentStory().raw_id,a=this.getCurrentAuthor().data,i="/settings?act=groups_stories&story_raw_id=".concat(n,"&from=").concat(t,"&hash=").concat(a.stories_get_groups_settings_hash);this.pauseStory(),e.go(i)},toggleBookmark:function(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1],n=this.getCurrentAuthor();if(n){var a=n.getCurrentStory(),i=a.bookmark_add_hash,r=window,o=r.store,s=a.narrative?a.narrative:a,l=s.is_bookmarked;Object.keys(o.stories).forEach(function(e){var t=o.stories[e];if(t.authors){var n=!1;t.authors.forEach(function(e){n||(n=e.items.find(function(e){return!!e.narrative&&(e.narrative.bookmark_hash===i&&e.raw_id===a.raw_id)}))}),n&&(n.narrative?n.narrative.is_bookmarked=!l:n.is_bookmarked=!l)}}),(0,p.val)(e,l?lang.mobile_stories_menu_bookmark_title:lang.mobile_stories_menu_bookmarked_title);var c=l?"bookmark_remove":"bookmark_add",u=a.narrative,d=u.owner_id,f=u.id;t||this._requestFave(c,d,f,i),a.narrative&&Share.setBookmarkState(a.narrative.raw_id,!l)}},share:function(e,t){var n=this,a=this.getCurrentAuthor();if(a){var i=a.getCurrentStory(),r=i.bookmark_add_hash,o=(i.narrative?i.narrative:i).is_bookmarked;this.stopStory();this.getFrom();var s=t?"narrative":"story";this.stopStory(),Share(e,{mail_hash:this.getCurrentStory().share_hash,object:s+e,is_bookmarked:o,bookmark_hash:r,bookmark_type:31,can_bookmark:t,can_to_own:t,can_to_club:t}),cur.share.onClose(function(){n.playStory()})}},openReplies:function(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];this.playStory(),t||this.sendAnalyticsEvent("open_parent_story"),this.destroy();var n=e.split("/"),a=g(n,2),i=a[1];if(i){var r=window.store.storiesLayers.indexOf(i);if(~r){var o=this.store.list,s=i;this.restore(o,s)}else this.init(e,{reply:!0,replyTo:t})}else this.close()},openNarrative:function(e,t){this.playStory(),this.destroy();var n=g(e.split("/"),2)[1];if(n)if(~window.store.storiesLayers.indexOf(n)){var a=this.store.list,i=n;this.restore(a,i)}else this.init(e,t);else this.close()},clickClose:function(){var e=this;requestAnimationFrame(function(){e.sendAnalyticsEvent("close_tap"),e.close()})},close:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};if(extend({isPopState:!1,storyRaw:!1,closeAll:!1},e),this.store&&this.store.list&&this._getSource().indexOf("narrative")>-1&&this._sendNavigationStatEvents("narrative_close"),!e.isPopState){var t=window,n=t.nav,a=n.getQuery();if(window.store.storiesLayers[window.store.storiesLayers.length-1-1]){var i=window.store.storiesLayers[window.store.storiesLayers.length-1-1],r=window.store.stories[i],o=r.authorIndex,s=r.authors[o].index,l=r.authors[o].items[s];a.z=this.getHistoryURL(l.raw_id)}else delete a.z;var c=n.path+obj2qs(a)+(n.hash||"");n.go(c,null,{push_only:!0})}if(this.destroy(),e.isPopState&&e.storyRaw){var u=this._parseList(e.storyRaw).split("/"),d=g(u,2),f=d[1];this.store?this.restore(this.store.storyList,f,e.storyRaw,e):this.init(e.storyRaw,{replace:!0})}else this.store&&this.store.storyList&&this.restore(this.store.storyList,!1,!1,e)},hideAllViews:function(){var e=window.store;e&&(e.storiesLayers=[],e.stories&&Object.keys(e.stories).forEach(function(t){e.stories[t].showViews=!1,e.stories[t].isStopped=!1}))},restore:function(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1],n=arguments.length>2&&void 0!==arguments[2]&&arguments[2],a=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{};if(window.store.storiesLayers){var i=window.store.storiesLayers.indexOf(e);window.store.storiesLayers.splice(i,1)}if(window.store.storiesLayers.length||t||n){t=t||window.store.storiesLayers[window.store.storiesLayers.length-1];var r=window.store.stories[e],o=window.store.stories[t];if(r&&o){var s=Object.keys(r.readedStories);(0,p.each)(s,function(e,t){var n=g(t.split("_"),3),a=n[0],i=(n[1],n[2],o.replies[r.replyTo]);if(i){var s=g(i.filter(function(e){return e.owner_id==a}),1)[0];s&&(s.has_new=!1)}}),this.init(o.initRaw,{restore:!0,forceAuthorIndex:!1,reply:!0})}else n&&this.init(n,{restore:!0,forceAuthorIndex:!1,reply:!0})}else this.hideAllViews();a.closeAll&&window.store.storiesLayers.length&&this.close(a)},clearStore:function(){this.store=this._initStore()},destroy:function(){var e=this;if(this.restoreAudio(),this.store){this.slider=null,this.hideMenu(!1),this._abortRequests(),this._requestReadStories(),(0,p.removeClass)(this.layer,"Stories_inited");var t=this.getCurrentAuthorIndex();if(void 0!==t&&this.Authors)this.Authors[t].destroy();this.onRender.off(),(0,p.remove)(this.layer),Object.keys(this).forEach(function(t){"store"!==t&&"supportAutoplay"!==t&&"function"!=typeof e[t]&&(e[t]=null,delete e[t])}),zlayer.close(),(0,p.addClass)(ge("StoriesFeedBlock"),"StoriesFeedBlock_been-open"),(0,p.removeClass)(document.body,"vk__story_open"),y.opened=!1;var n=(0,p.geByClass1)("Question__popup"),a=(0,p.geByClass1)("Popup__overlay",n);a&&d.default.close(a)}},isAutoplaySupport:function(){return this.supportAutoplay},isGoodBrowser:function(){return o.default.ios&&o.default.safari_mobile&&parseInt(o.default.version,10)>=10},detectAutoplay:function(){var e=this;return new Promise(function(t){if(e.supportAutoplay)t();else{if(e.isGoodBrowser())return e.supportAutoplay=!0,void t();e.supportAutoplay=!1;var n=(0,p.ce)("video"),a=(0,p.ce)("source");a.src="data:video/mp4;base64,AAAAFGZ0eXBNU05WAAACAE1TTlYAAAOUbW9vdgAAAGxtdmhkAAAAAM9ghv7PYIb+AAACWAAACu8AAQAAAQAAAAAAAAAAAAAAAAEAAAAAAAAAAAAAAAAAAAABAAAAAAAAAAAAAAAAAABAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAgAAAnh0cmFrAAAAXHRraGQAAAAHz2CG/s9ghv4AAAABAAAAAAAACu8AAAAAAAAAAAAAAAAAAAAAAAEAAAAAAAAAAAAAAAAAAAABAAAAAAAAAAAAAAAAAABAAAAAAFAAAAA4AAAAAAHgbWRpYQAAACBtZGhkAAAAAM9ghv7PYIb+AAALuAAANq8AAAAAAAAAIWhkbHIAAAAAbWhscnZpZGVBVlMgAAAAAAABAB4AAAABl21pbmYAAAAUdm1oZAAAAAAAAAAAAAAAAAAAACRkaW5mAAAAHGRyZWYAAAAAAAAAAQAAAAx1cmwgAAAAAQAAAVdzdGJsAAAAp3N0c2QAAAAAAAAAAQAAAJdhdmMxAAAAAAAAAAEAAAAAAAAAAAAAAAAAAAAAAFAAOABIAAAASAAAAAAAAAABAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAGP//AAAAEmNvbHJuY2xjAAEAAQABAAAAL2F2Y0MBTUAz/+EAGGdNQDOadCk/LgIgAAADACAAAAMA0eMGVAEABGjuPIAAAAAYc3R0cwAAAAAAAAABAAAADgAAA+gAAAAUc3RzcwAAAAAAAAABAAAAAQAAABxzdHNjAAAAAAAAAAEAAAABAAAADgAAAAEAAABMc3RzegAAAAAAAAAAAAAADgAAAE8AAAAOAAAADQAAAA0AAAANAAAADQAAAA0AAAANAAAADQAAAA0AAAANAAAADQAAAA4AAAAOAAAAFHN0Y28AAAAAAAAAAQAAA7AAAAA0dXVpZFVTTVQh0k/Ou4hpXPrJx0AAAAAcTVREVAABABIAAAAKVcQAAAAAAAEAAAAAAAAAqHV1aWRVU01UIdJPzruIaVz6ycdAAAAAkE1URFQABAAMAAAAC1XEAAACHAAeAAAABBXHAAEAQQBWAFMAIABNAGUAZABpAGEAAAAqAAAAASoOAAEAZABlAHQAZQBjAHQAXwBhAHUAdABvAHAAbABhAHkAAAAyAAAAA1XEAAEAMgAwADAANQBtAGUALwAwADcALwAwADYAMAA2ACAAMwA6ADUAOgAwAAABA21kYXQAAAAYZ01AM5p0KT8uAiAAAAMAIAAAAwDR4wZUAAAABGjuPIAAAAAnZYiAIAAR//eBLT+oL1eA2Nlb/edvwWZflzEVLlhlXtJvSAEGRA3ZAAAACkGaAQCyJ/8AFBAAAAAJQZoCATP/AOmBAAAACUGaAwGz/wDpgAAAAAlBmgQCM/8A6YEAAAAJQZoFArP/AOmBAAAACUGaBgMz/wDpgQAAAAlBmgcDs/8A6YEAAAAJQZoIBDP/AOmAAAAACUGaCQSz/wDpgAAAAAlBmgoFM/8A6YEAAAAJQZoLBbP/AOmAAAAACkGaDAYyJ/8AFBAAAAAKQZoNBrIv/4cMeQ==";var i=(0,p.ce)("source");i.src="data:video/webm;base64,GkXfo49CgoR3ZWJtQoeBAUKFgQEYU4BnAQAAAAAAF60RTZt0vE27jFOrhBVJqWZTrIIQA027jFOrhBZUrmtTrIIQbE27jFOrhBFNm3RTrIIXmU27jFOrhBxTu2tTrIIWs+xPvwAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFUmpZuQq17GDD0JATYCjbGliZWJtbCB2MC43LjcgKyBsaWJtYXRyb3NrYSB2MC44LjFXQY9BVlNNYXRyb3NrYUZpbGVEiYRFnEAARGGIBc2Lz1QNtgBzpJCy3XZ0KNuKNZS4+fDpFxzUFlSua9iu1teBAXPFhL4G+bmDgQG5gQGIgQFVqoEAnIEAbeeBASMxT4Q/gAAAVe6BAIaFVl9WUDiqgQEj44OEE95DVSK1nIN1bmTgkbCBULqBPJqBAFSwgVBUuoE87EQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAB9DtnVB4eeBAKC4obaBAAAAkAMAnQEqUAA8AABHCIWFiIWEiAICAAamYnoOC6cfJa8f5Zvda4D+/7YOf//nNefQYACgnKGWgQFNANEBAAEQEAAYABhYL/QACIhgAPuC/rOgnKGWgQKbANEBAAEQEAAYABhYL/QACIhgAPuC/rKgnKGWgQPoANEBAAEQEAAYABhYL/QACIhgAPuC/rOgnKGWgQU1ANEBAAEQEAAYABhYL/QACIhgAPuC/rOgnKGWgQaDANEBAAEQEAAYABhYL/QACIhgAPuC/rKgnKGWgQfQANEBAAEQEAAYABhYL/QACIhgAPuC/rOgnKGWgQkdANEBAAEQEBRgAGFgv9AAIiGAAPuC/rOgnKGWgQprANEBAAEQEAAYABhYL/QACIhgAPuC/rKgnKGWgQu4ANEBAAEQEAAYABhYL/QACIhgAPuC/rOgnKGWgQ0FANEBAAEQEAAYABhYL/QACIhgAPuC/rOgnKGWgQ5TANEBAAEQEAAYABhYL/QACIhgAPuC/rKgnKGWgQ+gANEBAAEQEAAYABhYL/QACIhgAPuC/rOgnKGWgRDtANEBAAEQEAAYABhYL/QACIhgAPuC/rOgnKGWgRI7ANEBAAEQEAAYABhYL/QACIhgAPuC/rIcU7trQOC7jLOBALeH94EB8YIUzLuNs4IBTbeH94EB8YIUzLuNs4ICm7eH94EB8YIUzLuNs4ID6LeH94EB8YIUzLuNs4IFNbeH94EB8YIUzLuNs4IGg7eH94EB8YIUzLuNs4IH0LeH94EB8YIUzLuNs4IJHbeH94EB8YIUzLuNs4IKa7eH94EB8YIUzLuNs4ILuLeH94EB8YIUzLuNs4INBbeH94EB8YIUzLuNs4IOU7eH94EB8YIUzLuNs4IPoLeH94EB8YIUzLuNs4IQ7beH94EB8YIUzLuNs4ISO7eH94EB8YIUzBFNm3SPTbuMU6uEH0O2dVOsghTM",(0,p.append)(i,n),(0,p.append)(a,n),n.style.position="fixed",n.style.left="5000px",attr(n,"id","base64testvideo"),attr(n,"playsinline","playsinline"),attr(n,"webkit-playsinline","webkit-playsinline"),attr(n,"muted","muted"),attr(n,"autoplay","autoplay"),attr(n,"loop","loop"),(0,p.append)(n,document.body);var r=ge("base64testvideo");if(o.default.android&&o.default.chrome)return e.supportAutoplay=!0,(0,p.remove)(n),t(),void clearTimeout(e.autoDetectTimeout);if(o.default.mobile&&o.default.ios&&o.default.ios<10)return e.supportAutoplay=!1,(0,p.remove)(n),t(),void clearTimeout(e.autoDetectTimeout);if(!o.default.safari_mobile||o.default.safari_mobile&&parseInt(o.default.version,10)>=10){var s=n.play();void 0!==s&&s.then(function(){e.supportAutoplay=!0,(0,p.remove)(n),t(),clearTimeout(e.autoDetectTimeout)}).catch(function(e){})}r.onplay=function(){e.supportAutoplay=!0,(0,p.remove)(n),t(),clearTimeout(e.autoDetectTimeout)},e.autoDetectTimeout=setTimeout(function(){r.paused||(e.supportAutoplay=!0),(0,p.remove)(n),t()},250)}})},narrativeReply:function(){this.setCurrentStory(0),this.renderStory(),this._sendNavigationStatEvents("narrative_replay")},narrativeGoToStories:function(){this.nextStory(),this._sendNavigationStatEvents("narrative_go_to_stories")},_showTooltip:function(e,t){if(this.hideMenu(!1),this.hideFlashPopup(!1),e&&t)if(this.tooltip)this._hideTooltips();else{var n=this.getCurrentAuthorEl();this.tooltip=(0,p.ce)("div",{className:"StoriesTooltip"},{top:0,left:0}),this.tooltipArrow=(0,p.ce)("span",{className:"StoriesTooltip__arrow"}),this.tooltip.appendChild(t),this.tooltip.appendChild(this.tooltipArrow),n.appendChild(this.tooltip);var a=0,i=0;"touchend"===e.type?(a=e.changedTouches[0].clientX,i=e.changedTouches[0].clientY):(a=e.clientX,i=e.clientY);var r=n.getBoundingClientRect(),o=r.top,s=r.left,l=r.width,c=g(getSize(this.tooltip),2),u=c[0],d=i-(o+c[1]+10),f=a-(s+u/2);setStyle(this.tooltip,{top:Math.max(d,2),left:Math.min(Math.max(f,2),l-u-2)}),setStyle(this.tooltipArrow,{left:Math.max(Math.min(a-s-Math.min(Math.max(f,0),l-u),u-15),15)}),this.pauseStory()}else this.playStory()},_showFeatureTooltipIfNeeded:function(){var e=this,t=window.store.storiesLists;if(t&&t.needShowFeatureTooltip){var n=y.getCurrentAuthorEl(),a=(0,p.geByClass1)("StoriesFeatureTooltip",n);if(a){var i=setTimeout(function(){e.pauseStory(),(0,p.addClass)("StoriesFeatureTooltip--show",a),e.featureTooltip=a,e.featureTooltipHash=t.needShowFeatureTooltipHash},2e3);t.needShowFeatureTooltip=!1,cur&&isArray(cur.destroy)&&cur.destroy.push(function(){clearTimeout(i)})}}},_hideFeatureTooltip:function(e){if(this.featureTooltip){var t=y.getCurrentAuthorEl(),n=(0,p.geByClass1)("StoriesFeatureTooltip",t);n&&(e||this.playStory(),(0,p.removeClass)("StoriesFeatureTooltip--show",n),this.featureTooltip=null,ajax.post("stories.php",{_ajax:1,act:"hide_feature_tooltip",type:"stories_pin",hash:this.featureTooltipHash}),this.featureTooltip=null,this.featureTooltipHash=null)}},_hideTooltips:function(e){this._hideFeatureTooltip(e),this.tooltip&&(e||this.playStory(),(0,p.remove)(this.tooltip),delete this.tooltip)},_createNarrativeTooltipLink:function(){var e=this.getCurrentStory().narrative||{};return(0,p.ce)("div",{className:"Stories__tooltip-link",innerHTML:lang.mobile_stories_narrative_show,onclick:function(){y._hideTooltips(!0),y.openNarrative("".concat(e.owner_id,"/narrative").concat(e.raw_id),{source:"narrative_story",isOpenNarrativeFromFeed:!0})}})},_hasContext:function(e){return!(!this.extra||!this.extra.context||this.extra.context!==e)},sendAnalyticsEvent:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=y.getCurrentStory(),a=y.getCurrentAuthor(),i=y.getCurrentStoryIndex(),r=n.raw_id.split("_"),o=g(r,2),s=o[0],l=o[1],c=y._getSource(),u={event_type:e,story_owner_id:s,story_id:l,time:vk.ts+Math.floor(((new Date).getTime()-vk.started)/1e3),view_entry_point:c,nav_screen:cur.module};if(a){var d=a.data,f=a.getCountDown();f&&d&&extend(u,{stories_author_before:i,stories_author_after:d.items.length-i,view_event_timeline_position:f.initialTime-f.left})}Object.assign(u,t),statlogsValueEvent("story_product_analytics",u)},clickAuthor:function(){this.sendAnalyticsEvent("go_to_author")},askQuestionBox:function(e){(0,p.cancelEvent)(e);var t=this.getCurrentStory().can_ask;if(this.hideFlashPopup(!1),this.sendAnalyticsEvent("click_on_clickable_sticker"),this._hideTooltips(),!t)return y.showFlashPopup(lang.mobile_stories_ask_question_forbidden),!1;this.stopStory(),(0,p.addClass)(this.layer,"Stories_questionOpened");var n=this.authors[this.store.authorIndex],a=(0,p.geByClass1)("Story__questionTextarea",n);requestAnimationFrame(function(){a&&a.focus()})},changeAskAnonymous:function(e){e.preventDefault();var t=this.getCurrentStory();if(t){var n=(0,p.intval)(!(0,p.intval)((0,p.domData)(e.target,"anonymous")));(0,p.domData)(e.target,"anonymous",n),t.isAskAnonymous=n,(0,p.val)(e.target,n?lang.mobile_stories_ask_question_anonymous:lang.mobile_stories_ask_question_own_name)}},hideAskQuestion:function(){var e=!(arguments.length>0&&void 0!==arguments[0])||arguments[0];y.store.showMenu=!1,(0,p.removeClass)(y.layer,"Stories_questionOpened"),e&&y.playStory()},onInputQuestion:function(e){$(".Story__questionSend").disabled=!(0,p.trim)((0,p.val)(e))},sendQuestion:function(){var e=y.getCurrentAuthorEl();if(e){var t=(0,p.geByClass1)("Story__questionTextarea",e),n=(0,p.geByClass1)("Story__questionSend",e),a=y.getCurrentStory(),i=a.raw_id,r=a.askQuestionHash,o=a.accessKey,s=a.isAskAnonymous,l=g(i.split("_"),2),c=l[0],u=l[1],d=(0,p.trim)((0,p.val)(t));(0,p.val)(t,""),n.disabled=!0;var f=ajax.post("stories.php",{_ajax:1,act:"ask_question",story_owner_id:c,story_id:u,question_text:d,is_anonymous:s,hash:r,access_key:o},{onDone:function(e){if(!e)return y.showFlashPopup(lang.mobile_stories_question_error),!1;var t=y.getCurrentAuthor().data.author;y.showFlashPopup(lang.mobile_stories_question_sent.replace("{name}",t.first_name_ins)),s?y.sendAnalyticsEvent("question_reply_anonymous"):y.sendAnalyticsEvent("question_reply")}});y._saveRequest(f),y.hideAskQuestion()}},getQuestionById:function(e){var t=this.getCurrentStory();return this.store.questions[t.raw_id].find(function(t){return t.id===e})},openQuestionActions:function(e){var t=this.getQuestionById(e);if(t){var n=t.canAnswer,i=t.isOwnerBlocked,r=t.canBlocked,o=[(0,d.ModalMenuBtn)({inner:lang.mobile_stories_question_delete,onclick:["Stories.removeQuestion","this",t.id]})];r&&(o.push((0,d.ModalMenuBtn)({inner:i?lang.mobile_stories_question_unban:lang.mobile_stories_question_ban,onclick:["Stories.banQuestion","this",t.id]})),o.push((0,d.ModalMenuBtn)({inner:lang.mobile_stories_question_report,onclick:["Stories.reportQuestion","this",t.id]}))),n&&o.unshift((0,d.ModalMenuBtn)({inner:lang.mobile_stories_question_reply,onclick:["Stories.replyQuestionBox","this",t.id]}));var s=(0,d.default)({class:"Question__popup",items:o});f.default.open(a.default.elem(s),!0)}},removeQuestion:function(e,t){var n=this,a=this.getQuestionById(t),i=a.storyOwnerId,r=a.storyId,o=a.id,s=a.removeHash;ajax.post("stories.php",{_ajax:1,act:"remove_question",story_owner_id:i,story_id:r,question_id:o,remove_hash:s},{onDone:function(a){var s="".concat(i,"_").concat(r);if(d.default.close(e),!a)return requestAnimationFrame(function(){return n.showFlashPopup(lang.mobile_stories_question_error)}),!1;$$('.Question[data-id="'.concat(t,'"]')).forEach(function(e){return re(e)}),n.store.questions[s]=n.store.questions[s].filter(function(e){return e.id!==t}),$$(".Question").length<1&&re((0,p.geByClass1)("Views__questions")),y.sendAnalyticsEvent("question_delete",{questionId:o})}})},replyQuestionBox:function(e,t){var n=this.getCurrentStory(),i=this.getQuestionById(t),r=i.author,o=i.text,s=lang.mobile_stories_question_reply_title.replace("{name}",r.nameGen),l=a.default.elem({class:"QuestionReplyPopup",inner:[{class:"QuestionReplyPopup__inner",inner:[{class:"QuestionReplyPopup__header",inner:[{class:"QuestionReplyPopup__preview",style:"background-image: url(".concat(n.small_preview,")")},{class:"QuestionReplyPopup__top",inner:[{class:"QuestionReplyPopup__title",inner:s},{class:"QuestionReplyPopup__question",inner:o}]}]},{class:"QuestionReplyPopup__content",inner:[{class:"QuestionReplyPopup__textarea",tag:"textarea",placeholder:lang.mobile_stories_comment_textarea,oninput:"Stories.onInputReplyQuestion(this);"}]},{class:"QuestionReplyPopup__footer",inner:[(0,h.default)({class:"QuestionReplyPopup__send",theme:"regular",inner:lang.mobile_stories_question_reply_to_message,on_click:["Stories.sendReplyQuestion",t],disabled:!0}),(0,h.default)({class:"QuestionReplyPopup__cancel",theme:"link",inner:lang.mobile_stories_comment_cancel,on_click:["Stories.hideReplyQuestion"]})]}]}]});this.popout.appendChild(l),d.default.close(e)},hideReplyQuestion:function(){re((0,p.geByClass1)("QuestionReplyPopup",y.popout))},onInputReplyQuestion:function(e){$(".QuestionReplyPopup__send").disabled=!(0,p.trim)((0,p.val)(e))},sendReplyQuestion:function(e){var t=(0,p.trim)((0,p.val)((0,p.geByClass1)("QuestionReplyPopup__textarea"))),n=y.getQuestionById(e),a=n.id,i=n.ownerId,r=n.storyOwnerId,o=n.storyId,s=n.sendHash,l="story".concat(r,"_").concat(o),c="".concat(t,"\n\n🗣 ").concat(n.text),u=ajax.post("mail.php",{_ajax:1,act:"send",hash:s,media:l,message:c,to:i},{onDone:function(e){var t=e&&e.error?e.message:lang.mobile_stories_comment_success;y.showFlashPopup(t,!1),y.sendAnalyticsEvent("question_send_message",{questionId:a})}});y._saveRequest(u),y.hideReplyQuestion()},showQuestions:function(e){var t=new c.default(e).render();this.popout.appendChild(t),y.sendAnalyticsEvent("question_show_all")},hideQuestions:function(){re((0,p.geByClass1)("Questions",this.popout))},banQuestion:function(e,t){var n=this.getQuestionById(t),a=n.storyOwnerId,i=n.storyId,r=n.banHash,o=n.isOwnerBlocked;ajax.post("stories.php",{_ajax:1,act:"ban_question",story_raw:"".concat(a,"_").concat(i),question_id:t,ban_hash:r,is_blocked:+o},{onDone:function(a){if(!a)return d.default.close(e),void y.showFlashPopup(lang.mobile_stories_question_error,!1);if(!o){var i="question_ban_author";n.isAnonymous&&(i="question_ban_anonymous_author"),y.sendAnalyticsEvent(i,{questionId:t})}d.default.close(e),n.isOwnerBlocked=!o,y.showFlashPopup(o?lang.mobile_stories_question_author_unblocked:lang.mobile_stories_question_author_blocked,!1)}})},reportQuestion:function(e,t){var n=this.getQuestionById(t),a=this.getFrom();d.default.close(e);var i="story_question".concat(n.storyOwnerId,"_").concat(n.id);nav.go("/reports?act=add&object=".concat(i,"&refrom=").concat(a))},toggleQuestionTooltip:function(e,t){var n=$(".QuestionSupport");(0,p.cancelEvent)(e),n&&(t?(0,p.removeClass)(n,"QuestionSupport--active"):(0,p.toggleClass)(n,"QuestionSupport--active"))},openMusicStickerActions:function(e,t){var n=ge("audio".concat(e)),i=hasClass("ai_added",n),r=(0,d.default)({close:!0,items:[(0,d.ModalMenuBtn)({class:"ai_add",inner:i?lang.global_delete_audio:lang.global_add_to_audio,onclick:'Stories.addMusic(this, "'.concat(e,'", ').concat(i,");")}),(0,d.ModalMenuBtn)({class:"ai_add",inner:lang.mobile_stories_music_next,onclick:"Stories.nextMusic(this, ".concat(t,");")})]}),o=a.default.elem(r);o.setAttribute("id","ai_menu_".concat(e)),f.default.open(o,!0)},addMusic:function(e,t,n){audioplayer.add(t),d.default.close(e),y._hideTooltips(!0),y.showFlashPopup(n?lang.mobile_stories_music_deleted:lang.mobile_stories_music_added)},nextMusic:function(e,t){var n=window,a=n.audio,i=n.audioplayer,r=(0,A.asObject)(t);if(a.getCurrentId()){var o=a.playlist().map(function(e){return e.id}).indexOf(a.getCurrentId())+1;a.addToPlaylist([r],o)}else i.playPause(!1,r.fullId,!0),a.pause();d.default.close(e),y._hideTooltips()},onRender:(0,i.default)()};page.onChange(function(){window.store.storiesLayers=[],window.store.stories={}}),window.Stories=y},"98L6":function(e,t,n){"use strict";window.FeedBlocks={hideReason:function e(t,n){if(e.progress)return!1;e.progress=!0;var a="block_"+t,i=ge(a);cur.feedBlocksHTML&&delete cur.feedBlocksHTML[a],ajax.post("feed.php",{act:"block_hide_reason",block_id:t,reason:0|n,hash:attr(i,"data-hash"),pos:attr(i,"data-pos"),ref:attr(i,"data-ref")},{onDone:function(t){e.progress=!1,t?val(i,t):hide(i),e.progress=!1},onFail:function(){e.progress=!1}})},restore:function(e){var t="block_"+e,n=ge(t);cur.feedBlocksHTML&&cur.feedBlocksHTML[t]&&val(t,cur.feedBlocksHTML[t]),ajax.post("feed.php",{act:"block_restore",block_id:e,hash:attr(n,"data-hash"),pos:attr(n,"data-pos"),ref:attr(n,"data-ref")})},hide:function e(t,n){if(e.progress)return!1;e.progress=!0,post.wallActionsHide();var a="block_"+t,i=ge(a);return ajax.post("feed.php",{act:"block_hide",block_id:t,hash:attr(i,"data-hash"),pos:attr(i,"data-pos"),ref:attr(i,"data-ref")},{onDone:function(t){post.wallActionsHide(),cur.feedBlocksHTML||(cur.feedBlocksHTML={}),cur.feedBlocksHTML[a]=val(i),val(i,t),e.progress=!1},onFail:function(){e.progress=!1}}),!1}}},"9CLW":function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var a,i=(a=n("+cqQ"))&&a.__esModule?a:{default:a};var r={onIframeReady:(0,i.default)("{ is_api, check_transfer_url, on_success_url }"),onPostMessage:(0,i.default)(),onAcceptCookieClick:(0,i.default)()};function o(e){var t;if(e.origin.match(/^https?:\/\/([a-zA-Z0-9\-\.]+\.)?money\.mail\.ru$/)){try{t=JSON.parse(e.data)}catch(e){t={}}"billing"===t.type&&r.onPostMessage(t.action,t.action_params)}}r.onIframeReady(function(){addEvent(window,"message",o),window.cur.destroy.push(function(){removeEvent(window,"message",o)})}),window.BasisMoneyTransfer=r;var s=r;t.default=s},"9Cbe":function(e,t,n){"use strict";var a=n("OcsD");window.SliderTabs={},SliderTabs._onClick=f,onDOMReady(d),page.onChange(l),page.onRestore(c);var i={container:"SliderTabs",scroll:"Slider__scroll",active:"SliderTabs__tab_selected"},r={active:".SliderTabs__tab_selected",tab:".SliderTabs__tab",scroll:".".concat(i.scroll),container:".".concat(i.container)},o="",s=0;function l(){var e=ge(o),t=$(r.container);if(e){var n=$(r.scroll,e),i=$(r.active,e);n.scrollLeft=s;var l=(0,a.getX)(i);if(s>l){n.scrollLeft=l-16}}else t?u():(o="",s=0)}function c(){setTimeout(function(){var e=ge(o);if(e){var t=Array.from($$(r.tab,e));if(t)t.some(function(e){return e.getAttribute("href")===nav.cur})&&t.forEach(function(e){e.getAttribute("href")===nav.cur?e.classList.add(i.active):e.classList.remove(i.active)})}})}function u(){var e=$$(r.container),t=Math.min((0,a.getCw)(),882);e.forEach(function(e){var n=$(r.scroll,e),i=$(r.active,e);if(i){var o=i.offsetWidth,s=(0,a.getX)(i);s+o>t&&(n.scrollLeft=s-t+o)}})}function d(){u()}function f(e,t){var n=(0,a.gpeByClass)(i.container,t),l=(0,a.gpeByClass)(i.scroll,t),c=$(r.active,n);return c&&c.classList.remove(i.active),t.classList.add(i.active),s=l.scrollLeft,o=attr(n,"id"),!0}},"9EK6":function(e,t,n){"use strict";var a=n("tMHi"),i=_(n("+cqQ")),r=n("jk6M"),o=n("lkNA"),s=n("fOXz"),l=n("XBHu"),c=n("uU5W"),u=n("W9Tc"),d=n("0bdD"),f=n("D+pY"),h=n("8mQl"),p=n("YQfe"),A=n("J8bf"),m=_(n("xk4V"));function _(e){return e&&e.__esModule?e:{default:e}}var v=function(){if(!HTMLAudioElement)return{init:function(){},playing:function(){},onInit:function(){},onSelect:function(){},pause:function(){},onAdStart:function(){},onAdComplete:function(){}};var e=!1,t=!1,n=!1,s=!1,l=!1,c=function t(n){(e||!1!==l)&&(e=!1,M&&!1===l||(s=!0,O.pause.call(y))),cancelEvent(n),removeEvent(y,"play",t),removeEvent(document,r.isTouch?"touchstart":"click",_)},f=function(){!1!==l&&l()},_=function t(){n&&(n=!1,e=!0,B(y),removeEvent(document,r.isTouch?"touchstart":"click",t))},y=function(t){var n=window.Audio?new Audio:ce("audio");n.autobuffer=!0,n.muted=!1,n.preload="none",t&&(n.volume=t.volume,removeEvent(t,"play",L),removeEvent(t,"pause",R),removeEvent(t,"progress",N),removeEvent(t,"timeupdate",j),removeEvent(t,"ended",F),removeEvent(t,"play",c),removeEvent(t,"progress canplaythrough",f),removeEvent(document,r.isTouch?"touchstart":"click",_),t.muted=!0,t.pause(),t.src=null);return T=!1,P=!1,!1,e=!1,s=!1,l=!1,addEvent(n,"play",L),addEvent(n,"pause",R),addEvent(n,"progress",N),addEvent(n,"timeupdate",j),addEvent(n,"ended",F),addEvent(n,"play",c),addEvent(n,"progress canplaythrough",f),addEvent(document,r.isTouch?"touchstart":"click",_),n}(),b=srand(),w=[],E=null,k={},S="",C=null,M=!1,P=!1,T=!1,D=null,I=!1,x=!1;delete HTMLAudioElement.prototype.play,delete HTMLAudioElement.prototype.pause,delete HTMLAudioElement.prototype.load,delete HTMLAudioElement.prototype.canPlayType;var O={play:HTMLAudioElement.prototype.play,pause:HTMLAudioElement.prototype.pause,load:HTMLAudioElement.prototype.load,canPlayType:HTMLAudioElement.prototype.canPlayType};function B(e){var t=O.play.call(e);void 0!==t&&t.catch(function(e){e.code!==e.ABORT_ERR&&window.audio.pause()})}function L(){M||(M=!0,v.onPlay(!0),ssSet("audio_play","1"),clearTimeout(D),D=setTimeout(z,100)),audioBackgroundRestriction&&audioBackgroundRestriction.isIdle&&v.pause()}function R(){s?s=!1:M&&(M=!1,v.onPause(!0),ssSet("audio_play","0"),clearTimeout(D))}function N(){v.onProgress(!0)}function j(){s||(v.onProgress(!0),v.onPositionChanged(!0,v.getPosition(),v.duration()),v.onTimeUpdate(!0),ssSet("audio_pos",v.getPosition()),!T&&y.duration-y.currentTime<.5&&(T=!0),P&&(P=!1,v.next()))}function F(){v.onEnded(!0),T?(T=!1,y.src!==p.SILENCE&&v.next()):P=!0}function H(){return w[E]||!1}function V(){return H().fullId||!1}function U(e,t){if(e){var n,i=(0,a.audioUnmaskSource)(e.url),r=function(){return v.onSelect(!0,e)};n=e.url,/\.m3u8/.test((0,a.audioUnmaskSource)(n))?function e(t,n,a){var i=window,r=i.Hls,s=i.browser;var l=function(){isFunction(a)&&a()};if(!r)return s.safari&&B(y),void(0,o.loadScript)("/js/lib/hls.min.js",{onLoad:function(){return e(t,n,a)}});if(r.isSupported()&&!s.msie_edge){q&&q.destroy();var c=new r({maxBufferHole:3,nudgeOffset:.5,nudgeMaxRetry:5,maxBufferLength:240});c.attachMedia(t),c.loadSource(n),c.on(r.Events.ERROR,function(e,t){t.details===r.ErrorDetails.BUFFER_STALLED_ERROR&&(c.stopLoad(),c.startLoad())}),c.on(r.Events.MANIFEST_PARSED,function(){return l()}),q=c}else t.canPlayType("application/vnd.apple.mpegurl")&&(t.src=n,l())}(y,i,r):(y.src=i,t||O.load.call(y),r())}}function z(){if(M){var e=lsGet("audio_current_player");b!=e?v.pause():D=setTimeout(z,100)}}function W(){var e=V();ssSet("audio_id",e),I&&((0,A.setCookie)(I,e,1),(0,A.setCookie)(I+"_playlist",C,1))}var q=null;return{onInit:(0,i.default)(),init:function(e){if(!x&&v.support){x=!0,e.cookie&&(I=e.cookie,e.cookie_path||"/");var t=ssGet("audio_pos"),n=ssGet("audio_vol");onDOMReady(function(){e.playlist&&v.playlist(e.playlist,{q:e.playlist_q||""});var a=ssGet("audio_id");if(a){y.addEventListener("loadeddata",function e(){a===V()&&(null!==t&&v.setPosition(t),null!==n&&v.volume(n)),y.removeEventListener("loadeddata",e)}),U(w[E]),v.select(a),null!==t&&v.onPositionChanged(!0,t,v.duration())}v.onInit()})}},support:y.canPlayType&&O.canPlayType.call(y,"audio/mpeg")&&"no"!=O.canPlayType.call(y,"audio/mpeg")||!1,onPlay:se(V),onPause:se(V),onAdStart:se(H),onAdComplete:se(H),onDeselect:se(H),onSelect:se(),onProgress:se(V,function(){return v.loaded()},function(){return v.duration()}),onPositionChanged:se(V),onTimeUpdate:se(V),onVolumeChanged:se(V,function(){return y.volume}),onEnded:se(V),onNotFoundError:se(),onEmptyPlaylistError:se(),getCurrent:H,getCurrentId:V,operate:function(e){if(!v.support)return!1;!e||w[E]&&e==w[E].fullId?M?v.pause():v.play():v.play(e)},playing:function(){return M},select:function(e){if(!v.support)return!1;if(e){if(!w.length)return v.onEmptyPlaylistError(!0,e),!1;if(!w[k[e]])return v.onNotFoundError(!0,e),!1;V()&&v.onDeselect(!0),E=k[e];var t=audioplayer.getPlaylistByAudioId(e);return C!==t&&audioplayer.onPlaylistChanged(),C=t,U(w[E],!0),W(),!0}},autoplay:function(e){v.play(e),y.paused&&v.pause()},getCurrentPlaylistId:function(){return C},play:function(e){var t=this;if(!v.support)return!1;if(e){if(M&&v.pause(),!v.select(e))return;try{y.currentTime=.01}catch(e){}}g.isPlaying()?M?g.pause():g.resume():M||(y.muted=!1,y.preload="auto",M=!0,v.onPlay(!0),e&&(0,u.partConfigEnabled)("mvk_audio_ads")?(browser.safari&&O.load.call(y),g.startPlay(w[k[e]],!1,function(){t._play()})):this._play())},_play:function(){B(y),ssSet("audio_play","1"),lsSet("audio_current_player",b),h.AudioQueue.connect()},pause:function(){if(!v.support)return!1;M&&(O.pause.call(y),g.isPlaying()&&g.pause(),M=!1,v.onPause(!0),ssSet("audio_play","0"))},getDeviceId:function(){var e=lsGet("audio_player_device_id");return e||(e=(0,m.default)(),lsSet("audio_player_device_id",e)),e},getPosition:function(){return v.isAdsPlaying()?g.getCurrentProgress()*g.getDuration():y.currentTime},setPosition:function(e,t){if(!v.support)return!1;var n;n=e,t&&(n=v.duration()*e),n=Math.max(0,Math.min(n,v.duration())),y.currentTime=n,ssSet("audio_pos",n),v.onPositionChanged(!0,n,v.duration())},volume:function(e){if(!v.support)return!1;if(void 0===e)return y.volume;try{y.volume=e||0,g.updateVolume()}catch(e){}v.onVolumeChanged(!0),ssSet("audio_vol",e||0)},loaded:function(){return y.buffered&&y.buffered.length&&y.buffered.end(y.buffered.length-1)||0},duration:function(){return this.isAdsPlaying()?g.getDuration():y.duration||w[E]&&w[E].duration||0},played:function(){for(var e=y.played,t=0,n=0;n=w.length&&(E=0),U(w[E]),W(),n=!0,v.play(V())},prev:function(){if(!v.support)return!1;M&&v.pause(),v.onDeselect(!0),--E<=0&&(E=w.length-1),U(w[E]),W(),n=!0,v.play(V())},playlist:function(e,t){return!!v.support&&(void 0===e?w:(M&&v.pause(),H()&&v.onDeselect(!0),w=e,S=t&&t.q||"",E=null,k={},each(e,function(e,t){k[t.fullId]=e}),void function(e){ssSet("audio_query",e),I&&(0,A.setCookie)(I+"q",encodeURIComponent(e),1)}(S)))},addToPlaylist:function(e,t){var n={},a=t||w.length;w.forEach(function(e){return n[e.fullId]=!0}),e.forEach(function(e){n[e.fullId]||(t?w.splice(a,0,e):w.push(e))})},playlist_q:function(){return S},setIsPlaying:function(e){M=e},isAdsPlaying:function(){return g.isPlaying()},initSplash:function(){t||(window.audioRestrictionSplash=new d.RestrictionSplash,t=!0)},playNothing:function(){y.src=p.SILENCE,O.load.call(y)}}}();window.Artist=s.Artist,window.audio=v,window.AudioBackgroundRestriction=f.AudioBackgroundRestriction;var g=new l.AudioAds(new c.AdsPlayerAdapter(v),null,!0);window.audioBackgroundRestriction=null,document.addEventListener("DOMContentLoaded",function(){(0,u.partConfigEnabled)("audio_mvk_background_restriction_enabled")&&(window.audioBackgroundRestriction=new f.AudioBackgroundRestriction)}),document.addEventListener("DOMContentLoaded",function(){"audio"===cur.module&&v.initSplash()}),window.page.onChange(function(){"audio"===cur.module?v.initSplash():window.audioRestrictionSplash&&window.audioRestrictionSplash.popup&&window.audioRestrictionSplash.close()})},"9HII":function(e,t,n){"use strict";var a=n("UxAg");window.AudioSpecialForYou={selector:".AudioSpecialForYou",setPlaying:function(e){var t=(0,a.$)(i.special);t&&t.classList.toggle(r.playing,e)}};var i={special:window.AudioSpecialForYou.selector},r={playing:"AudioSpecialForYou_playing"}},"9Hyc":function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var a=s(n("bZ/P")),i=s(n("Mc5h")),r=s(n("9y81")),o=s(n("AXyT"));function s(e){return e&&e.__esModule?e:{default:e}}var l=function(e){var t=a.default.class(e.mix,"Unfold",{position:e.position,asIcon:!!e.icon||!!e.icon_html,open:e.opened,withTitle:!!e.title}),n=a.default.list(e.items,u);return Wd.html({class:t,"data-name":e.name,onclick:e.onclick,inner:[c(e),{class:"Unfold__popup ScrollView ".concat(e.popup_class),inner:Wd.wrap(n)}]})};function c(e){var t,n=e.title;if(e.icon)t=(0,r.default)({icon:e.icon});else if(e.icon_html)t=e.icon_html;else{for(var o=e.items,s=o.length,l="",c="",u=0;u0}function A(e){try{return JSON.parse(e)}catch(e){return null}}return{onNewMsg:(0,i.default)("{ peerId, msgId, authorId, text, date, hasAttachments, flags, isService }"),onEditMsg:(0,i.default)("{ peerId, msgId, authorId, text, date, hasAttachments, flags }"),onMsgReadByMe:(0,i.default)("msgId","dialogId"),onMsgReadByOther:(0,i.default)("msgId","dialogId"),onOnlineChange:(0,i.default)("{ userId, isOnline, onlinePlatform, lastActionTime }"),onTyping:(0,i.default)("dialogId","authorId"),onMultiTyping:(0,i.default)("peerId","userIds","totalCount"),onMsgImportantRemove:(0,i.default)("msgId"),onMsgImportantAdd:(0,i.default)("msgId"),onMsgRemove:(0,i.default)("msgId"),onMsgRestore:(0,i.default)("msgId"),onPeerKeyboard:(0,i.default)("peerId"),onPeerBanner:(0,i.default)("peerId"),onDialogImportant:(0,i.default)("peerId","isImportant"),onUnreadCount:(0,i.default)("count"),onResync:(0,i.default)(),isLongPollingEnabled:function(){return!!l},init:function(t){e||((0,r.setDocumentDomain)(),e=ce("iframe",{src:t.frameUrl},{display:"none"}),onDOMReady(function(){append(e,window.bodyNode),!0})),s.refreshParams(t),setTimeout(s.check,1e3)},on:function(){clog("[longpoll] start"),l=!0,setTimeout(s.check,1e3)},off:function(){clog("[longpoll] pause"),l=!1},refreshParams:function(e){extend(t,e||{}),extend(s,t)},getKey:function(){if(a)try{a.abort()}catch(e){}a=ajax.post("/mail",{_ajax:1,act:"im_get_key",community:nav.getQuery("community")},{onDone:function(e){/[0-9a-f]{40}/i.test(e)?(s.refreshParams({key:e}),s.check()):clog("[longpoll] invalid key")},onFail:function(e){setTimeout(s.getKey,1e3*n),clog("[longpoll] from getKey delaying getKey for "+n+"secs"),u()}})},check:function(){if(l&&!c)if(s.makeRequest)try{s.makeRequest(function(e,t){if(c=!1,l)if(window.vk.__debug)s.checked(parseJSON(t))&&(s.check(),n=1);else try{s.checked(parseJSON(t))&&(s.check(),n=1)}catch(e){try{clog("[longpoll] error",e.message||"no message",e.type||"no type",e.stack||"no stack")}catch(e){}setTimeout(s.check,1e3*n),u()}},function(){c=!1,setTimeout(s.check,1e3*n),u()}),c=!0}catch(e){clog("[longpoll] makeRequest failed")}else setTimeout(s.check,1e3)},checked:function(e){var a,i,r,l=e.failed;if(1==l||t.ts>=e.ts+256){if(s.refreshParams({ts:e.ts}),l)return!0}else{if(2==l)return clog("[longpoll] delaying getKey for "+n+"secs"),setTimeout(s.getKey,1e3*n),u(),!1;if(l)return void clog("[longpoll]",e)}if(s.refreshParams({ts:e.ts}),e.updates){var c=[],m=!1;for(var _ in e.updates){if(116==e.updates[_][0])var v=e.updates[_][1],g=[e.updates[_][0],v.id,v.flags,v.peer_id,v.date,v.title||"",v.message,v.kludges,v.random_id];else g=e.updates[_];var y=intval(g[0]),b=intval(g[1]),w=intval(g[2]),E=intval(g[3]);if(1===w){if(10===y){mail.updateImportantDialog(b,!1);continue}if(12===y){mail.updateImportantDialog(b,!0);continue}}if(8&w){if(2===y){if(window.isNewMail){s.onMsgImportantAdd(b);continue}mail.updateImportantMessages(E,b,1);continue}if(3===y){if(window.isNewMail){s.onMsgImportantRemove(b);continue}mail.updateImportantMessages(E,b,-1);continue}}if(51!=y)if(61!=y)if(62!=y)if(8!=y)if(9!=y)if(6!=y&&7!=y)if(80!=y||!b||nav.getQuery("community"))if(52!=y){if(E)if(4!=y&&5!=y&&116!=y)if(0!=y)if(2!=y);else{if(128&w){if(window.isNewMail){s.onMsgRemove(b);continue}mail.markAsDeleted(E,b)}window.isNewMail&&64&w&&s.onMsgRemove(b)}else{if(window.isNewMail){s.onMsgRemove(b);continue}mail.markAsDeleted(b)}else{var k=5==y||116==y;if(window.isNewMail){var S=o(g,9),C=S[1],M=S[3],P=S[4],T=S[6],D=S[7],I=void 0===D?{}:D,x=S[8],O=f(I),B=(a=void 0,i=void 0,r=void 0,a=new Date(1e3*P),i=a.getHours(),r=a.getMinutes(),i+":"+(r<10?"0":"")+r),L=toInt(I.from_admin)||null,R=(toInt(nav.getQuery("community")),h(I,w,M)),N=!!I.source_act,j=I.keyboard?A(I.keyboard):null;if(k){var F={peerId:M,msgId:C,authorId:R,text:T,date:B,hasAttachments:O,flags:w,adminId:L,randomId:x};116==y?F.refreshed=1:F.edited=Math.floor(Date.now()/1e3),s.onEditMsg(F)}else s.onNewMsg({peerId:M,msgId:C,authorId:R,text:T,date:B,hasAttachments:O,flags:w,adminId:L,randomId:x,isService:N,keyboard:j});continue}var H=window.vk,V=2&w?H.id:g[7]&&g[7].from||E,U=g[7]&&g[7].source_act;m||(m=!!need("PinnedMsg").getByMsgId(b));var z=g[7].from_admin||U||m?null:mail.getMsgHTML(b,w,E,g[4],g[5],g[6],g[7],116!=y?k:"");if(z&&(k?mail.replaceMessage(E,b,V,z):p()||mail.addMessage(E,b,V,z),2&w||nav.getQuery("community")||d(!1,1)),"chat_kick_user"===U&&g[7].source_mid==H.id){var W=g[3];mail.unpinMessage(W)}z&&"chat_pin_message"!==U&&"chat_unpin_message"!==U||c.push({peer:E,msg_id:b,from_id:V,source_act:U,edited:k})}}else{var q=o(g,3),G=q[1],$=q[2];if(!window.isNewMail)continue;11==G&&s.onPeerKeyboard($),10==G&&s.onPeerBanner($)}else d(b);else{if(window.isNewMail){var Y=g[1],Q=g[2];6===y?s.onMsgReadByMe(Q,Y):s.onMsgReadByOther(Q,Y);continue}mail.markPeerAsRead(b,w,7==y)}else{if(window.isNewMail){s.onOnlineChange({userId:-b,isOnline:!1,lastActionTime:E});continue}mail.updateOnline(-b,0)}else{if(window.isNewMail){s.onOnlineChange({userId:-b,isOnline:!0,onlinePlatform:7===(w||7)?"desktop":"mobile"});continue}mail.updateOnline(-b,w||7)}else{if(window.isNewMail){var X=2e9+w,K=b;s.onTyping(X,K);continue}mail.typing(2e9+w,b)}else{if(window.isNewMail){var J=b,Z=b;s.onTyping(J,Z);continue}mail.typing(b)}}if(c.length){var ee=[];each(c,function(e,t){ee.push(t.msg_id)});var te={_ajax:1,act:"get_messages",msgs:ee.join(","),community:nav.getQuery("community")};m&&(te.force_pinned=1),ajax.post("/mail",te,{onDone:function(e,t){var n=window.cur,a=p();each(c,function(t,n){var i=e[n.msg_id],r=n.peer;i.text&&!a&&(n.edited?mail.replaceMessage(n.peer,n.msg_id,n.from_id,i.text):mail.addMessage(n.peer,n.msg_id,n.from_id,i.text)),i.unpin&&mail.unpinMessage(r),i.pinned&&mail.pinMessage(r,i.pinned)}),t&&(t.play_animation_msg_id&&StickersAnimation?StickersAnimation.loadStickerInMvkIMAndPlay(t.play_animation_msg_id):(extend(n,t),mail.updateStickers()))}})}}return!0}}}(),l=s;t.default=l},"9uOJ":function(e,t,n){"use strict";var a=o(n("i5VY")),i=n("OcsD"),r=o(n("UlUB"));function o(e){return e&&e.__esModule?e:{default:e}}store.market=store.market||{};var s={init:function(e){store.market=extend(store.market||{},e);var t=(0,r.default)(function(){if(!store.market.isLoadMore)return!1;var e=window.innerHeight,t=window.pageYOffset,n=document.body.clientHeight;!store.market.isLoading&&t>n-2*e&&ajax.post("market.php",{act:"orders_load_more",offset:store.market.offset},{onDone:function(e){store.market.offset+=10;var t=document.createDocumentFragment();e[0].forEach(function(e){t.appendChild((0,i.ceFromString)(Wd.html((0,a.default)(e))))});var n=document.querySelector(".OrdersList__onload");document.getElementById("market_orders_list_wrapper").insertBefore(t,n),e[1]||(n.innerHTML="",store.market.isLoadMore=e[1])}})},500);document.addEventListener("scroll",t),cur.destroy.push(function(){document.removeEventListener("scroll",t)})}};window.OrdersList=s},"9y81":function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"IconWd",{enumerable:!0,get:function(){return a.IconWd}}),t.default=void 0;var a=function(e){if(e&&e.__esModule)return e;var t=i();if(t&&t.has(e))return t.get(e);var n={};if(null!=e){var a=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r)){var o=a?Object.getOwnPropertyDescriptor(e,r):null;o&&(o.get||o.set)?Object.defineProperty(n,r,o):n[r]=e[r]}}n.default=e,t&&t.set(e,n);return n}(n("EMnU"));function i(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return i=function(){return e},e}n("vfU8");var r=a.default;t.default=r,window.Icon=a.default},"A+9M":function(e,t,n){"use strict";var a=n("J8bf");window.FeedNotifications={webActionsAcceptHandlers:{reveal_bdya:function(e,t,n,a,i){var r=gpeByClass("_block",e);return ajax.post("profileEdit.php",{act:"reveal_birthday",from:"feed_assistance",hash:i},{onDone:function(e){var t=window.Snackbar;t&&t.init&&t.init({text:e.msg}),remove(r)}}),!0}},webActionsDeclineHandlers:{},withoutNavActions:["enable_browser_notifications","reveal_bdya"],hide:function(e){function t(t,n,a,i,r,o,s,l){return e.apply(this,arguments)}return t.toString=function(){return e.toString()},t}(function(e,t,n,i,r,o,s,l){var c={_ajax:1,act:"hide_internal_notification",reason:i,id:t,hash:n},u={},d=gpeByClass("_block",e),f=!0;if("decline"==i){var h=this.webActionsDeclineHandlers[o];f=this.runActionHandler(h,e,c,u,s,n),hide(d)}else{var p=this.webActionsAcceptHandlers[o];f=this.runActionHandler(p,e,c,u,s,n),lockButton(e),"add_custom_newsfeed"==o&&((0,a.setCookie)("remixcustom_feed_added",s),c.action=o,c.action_section=s.section,c.action_hash=s.hash)}return u.onDone=function(){"compact"===l&&"accept"===i||cur.destroy.push(function(){return remove(d)}),~this.withoutNavActions.indexOf(o)||nav.go(e,r)}.bind(this),u.onFail=function(){unlockButton(e)},Promise.resolve(f).then(function(e){(e||isUndefined(e))&&ajax.post("/index.php",c,u)}),!1}),runActionHandler:function(e,t,n,a,i,r){return!isFunction(e)||e(t,n,a,i,r)},addWebActionAcceptHandler:function(e,t){this.webActionsAcceptHandlers[e]=t},addWebActionDeclineHandler:function(e,t){this.webActionsDeclineHandlers[e]=t}}},ACAL:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.open=function(e,t,n){var a=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{};o=i.default.open(e,t,{hash:n}),f=a,h=(0,r.$)(".Popup__wrap",o),void 0===a.swipeDown&&(a.swipeDown=!0);a.swipeDown&&window.innerWidth1&&void 0!==arguments[1]?arguments[1]:{},n=e.closest(".ModalMenu")||e;innerWidth1)l=!1;else{var t=e.target.closest(".ScrollView")||(0,r.$)(".ScrollView",e.target);(0,r.$)(".ModalMenu").classList.contains("ModalMenu--blocked")||(c=e.touches[0],u=e.touches[0].clientY,l=!(t&&t.scrollTop>1))}}var m=!1;function _(e){if(e.touches&&e.touches.length>1)l=!1;else if(c&&l){var t=e.touches[0],n=-Math.min(0,u-t.clientY);0!==n&&(cancelEvent(e),d=n,m||(o.classList.add("ModalMenu--dragging"),m=!0),setStyle.transform(h,1,[0,n]))}}function v(){l&&(l=!1,o.classList.remove("ModalMenu--dragging"),d>h.clientHeight/3?p(o,f):(o.classList.add("ModalMenu--restore"),setStyle.transform(h,1,[0,0]),setTimeout(function(){o&&o.classList.remove("ModalMenu--restore")},200)))}addEvent(window,"keydown",function(e){var t=(0,r.$)(".ModalMenu");if(t)switch(e.keyCode){case 27:p(t,f)}})},AWn4:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.uCurConvoTyping_getParams=s,t.default=void 0;var a,i=(a=n("rKUZ"))&&a.__esModule?a:{default:a},r=n("7jQU");var o=function(){return(0,i.default)(s())};function s(){var e,t,n=store.mail.cur.peerId,a=(0,r.uTyping_getPeerTyping)(n);return a&&("mixed"===a.type?(e="dots",t="mixed"):"audio"===a.type?(e="audio",t="audio"):"text"===a.type&&(e="dots",t="")),{id:"curConvo",typing:(0,r.uTyping_getNames)(a),typingCount:a?a.count:0,dimmed:!0,animation:e,text:t}}t.default=o},AXyT:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var a=function(e){if(e&&e.__esModule)return e;var t=i();if(t&&t.has(e))return t.get(e);var n={};if(null!=e){var a=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r)){var o=a?Object.getOwnPropertyDescriptor(e,r):null;o&&(o.get||o.set)?Object.defineProperty(n,r,o):n[r]=e[r]}}n.default=e,t&&t.set(e,n);return n}(n("WTJf"));function i(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return i=function(){return e},e}n("I/8u");var r=a.default;t.default=r,Object.assign(window,{Oval:a.default,Oval_isHidden:a.OvalIsHidden})},AeId:function(e,t,n){"use strict";var a={_seen:{},_saved:{},_saveTimer:null,_sendTimer:null,_cleanTimer:null,LS_ADS_EVENTS:"ads.events",postsGetRaws:function(e){var t,n=(e=ge(e)).id||"",a=attr(e,"data-copy")||"",i={};if("block_"===n.substr(0,6)){i[n]=1,i.block=n.substr(6);var r=attr(e,"data-contain");r&&(r=r.split(",")).forEach(function(e){e=e.split(":"),i[e[0]]=intval(e[1])||1})}else(t=n.match(/^wall(adsite.*)$/))?i[t[1]]=1:(t=n.match(/^wall(-?\d+_\d+)$/))&&(i[t[1]]=1,(t=a.match(/^(-?\d+_\d+)$/))&&(i[t[1]]=-1));var o=attr(e,"data-ad-view");return o&&(i["ad_"+o]=1),i.height=e.offsetHeight,i.index=indexOf(domPN(e).children,e)-1,i},seen:function(e){var t,n,i,r,o,s,l;window.vk.id&&e.length&&(window._postsExtras||(window._postsExtras={}),e.forEach(function(e,c){o=e.index,l=e.block,s=e.height,Object.keys(e).forEach(function(c){"index"!==c&&"block"!==c&&"height"!==c&&"viewportHeight"!==c&&(n=e[c],i=a._seen[c],-1===(r=a._saved[c])||-1===i||1===n&&(r||i)||(t=a._seen[c]=n,_postsExtras[c]={index:o,block:l,height:s,viewportHeight:getCh()}))})}),t&&(clearTimeout(a._saveTimer),a._saveTimer=setTimeout(a.save,2500),clearTimeout(a._sendTimer),a._sendTimer=setTimeout(a.send,5e3)))},save:function(){if(!lsCheck()||isEmpty(a._seen))return a._seen;var e,t,n,i,r,o=window.vk,s=Math.floor((o.ts+Math.floor((vkNow()-o.started)/1e3))/3600),l=lsGet("posts_sent")||{},c=lsGet("posts_seen")||{},u=lsGet("posts_extras")||{};for(t in window._postsExtras||(window._postsExtras={}),a._seen)r=a._seen[t],_postsExtras[t]&&(u[t]={index:_postsExtras[t].index,block:_postsExtras[t].block,height:_postsExtras[t].height,viewportHeight:_postsExtras[t].viewportHeight},delete window._postsExtras[t]),"ad"!==(n=t.split("_"))[0]&&"adsite"!==n[0]&&"block"!==n[0]&&(n[0]=intval(n[0]),n[1]=intval(n[1])),i=(l[n[0]]||{})[n[1]],n[0]!=o.id&&(!i||-1==r&&i>0)&&(c[n[0]]||(c[n[0]]={}),(!c[n[0]][n[1]]||-1==r&&c[n[0]][n[1]]>0)&&(e=c[n[0]][n[1]]=s*r)),a._saved[t]=r;a._seen={},e&&(lsSet("posts_seen",c),lsSet("posts_extras",u))},getSeenData:function(){var e,t,n,i={},r={},o=[];if(lsCheck())i=lsGet("posts_seen"),r=lsGet("posts_extras")||{};else for(e in n=a.save()){var s=n[e],l=e.split("_");l[0]=intval(l[0]),l[0]&&(l[1]=intval(l[1])),i[l[0]]||(i[l[0]]={}),(!i[l[0]][l[1]]||-1==s&&i[l[0]][l[1]]>0)&&(i[l[0]][l[1]]=s)}for(e in i){for(t in n=[],i[e]){var c=i[e][t]>0?t:-t,u=r[e+"_"+t],d="";u?(d+=":"+(u.index||""),d+=":"+(u.block||""),d+=":"+(u.height||""),d=(d+=":"+(u.viewportHeight||"")).replace(/:+$/,"")):d="","block"!==e||cur._pstatbref||(cur._pstatbref=attr(ge(e+"_"+t),"data-ref")),n.push(c+d)}n.length&&o.push(e+"_"+n.join(","))}return o.length?{seen:i,data:o.join(";")}:""},onSend:function(e){if(!lsCheck())return extend(a._saved,a._seen);var t,n,i=lsGet("posts_seen")||{},r=lsGet("posts_sent")||{};for(t in e){for(n in e[t])r[t]||(r[t]={}),-1!=r[t][n]&&(r[t][n]=e[t][n]),(i[t]||{})[n]&&delete i[t][n];i[t]&&isEmpty(i[t])&&delete i[t]}lsSet("posts_seen",i),lsSet("posts_sent",r),clearTimeout(a._cleanTimer),a._cleanTimer=setTimeout(a.clean,1e4)},send:function(){var e=window.cur,t=window.vk,n=a.getSeenData();if(n.data){if(!t.id)return a.clear();var i="";!nav||"/feed?section=podcasts"!==nav.cur&&"/feed/podcasts"!==nav.cur?e&&e.module?i=e.module:nav&&"/feed"==nav.cur&&(i="feed"):i="feed_podcasts";var r={_ajax:1,act:"ping",_pstat:n.data,_pstatref:i};e._pstatbref&&(r._pstatbref=e._pstatbref),ajax.post("/",r,{onDone:function(){a.onSend(n.seen)}}),delete e._pstatbref}},clean:function(){var e,t,n,i=window.vk,r=Math.floor((i.ts+Math.floor((vkNow()-i.started)/1e3))/3600),o=lsGet("posts_sent")||{};for(e in o){for(t in o[e])r-((n=o[e][t])>0?n:-n)>24&&delete o[e][t];isEmpty(o[e])&&delete o[e]}lsSet("posts_sent",o),a.cleanAdsEvents()},clear:function(){lsSet("posts_seen",{}),lsSet("posts_sent",a._saved=a._seen={}),lsSet(a.LS_ADS_EVENTS,a._lsAdsEvents={})},getStatsObj:function(e){return e=ge(e),hasClass("_stats_cont",e)?e:gpeByClass("_stats_cont",e)},getAdsEvents:function(){var e=a._lsAdsEvents;return e||(e=a._lsAdsEvents=lsGet(a.LS_ADS_EVENTS)||{}),e},cleanAdsEvents:function(){var e=a.getAdsEvents(),t=(new Date).getTime()/1e3|0,n=!1;each(e,function(a,i){t-i>=3600&&(delete e[a],n=!0)}),n&&lsSet(a.LS_ADS_EVENTS,e)},checkPixelEvent:function(e,t){var n=e.getAttribute("data-ad-block-uid"),i=-1!==indexOf(["load","impression"],t);if(!n||!i)return!0;try{var r=hashCode(""+t+n),o=a.getAdsEvents();if(o[r])return!1;var s=(new Date).getTime()/1e3|0;o[r]=s,lsSet(a.LS_ADS_EVENTS,o)}catch(e){try{console.log(e.message)}catch(e){}}return!0},getPixelElements:function(e,t){var n=[];return each(geByClass(t,e),function(){attr(this,"data-src")&&n.push(this)}),n},sendPixels:function(e){each(e,function(){attr(this,"src",attr(this,"data-src")),attr(this,"data-src",!1),addClass("_cntr",this)})},viewed:function(e){if(e=a.getStatsObj(e)){var t=a.getPixelElements(e,"_cntr_view");t.length&&a.checkPixelEvent(e,"impression")&&a.sendPixels(t)}},clicked:function(e){if(e=a.getStatsObj(e)){attr(e,"data-clicked","1");var t=a.getPixelElements(e,"_cntr_click");t.length&&a.sendPixels(t),checkPostsSeen()}}};a._sendTimer||(a._sendTimer=setTimeout(a.send,1e4)),window.pStats=a},AgBx:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var a,i=(a=n("3JOE"))&&a.__esModule?a:{default:a};n("QMH7");var r=i.default;t.default=r,window.ScrollView=i.default},AkSq:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var a,i=(a=n("P3wa"))&&a.__esModule?a:{default:a},r=n("XUaJ");var o=i.default;t.default=o,window.WarningModal=i.default,extend(i.default,{close:r.close,leave:r.leave})},Au5b:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var a,i=(a=n("TYsd"))&&a.__esModule?a:{default:a};var r={setChecked:function(e){var t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];c(e).checked=t},isChecked:function(e){return c(e).checked}},o=r;t.default=o,r._onChange=l;var s={control:".Control",native:".Control__native"};function l(e,t){i.default.handle(t,{$control:e.closest(s.control),name:e.name,checked:e.checked,value:e.value})}function c(e){return e.$(s.native)}},"B+E1":function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e,t){return langNumeric((e/1e3).toFixed(e%1e3==0?0:2),t,!0)}},"B+U2":function(e,t,n){"use strict";var a;Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var i=((a=n("sn7E"))&&a.__esModule?a:{default:a}).default;t.default=i},B34N:function(e,t,n){"use strict";var a=l(n("z9sQ")),i=n("OcsD"),r=l(n("wMVj")),o=l(n("29dZ")),s=l(n("jk6M"));function l(e){return e&&e.__esModule?e:{default:e}}var c={onTemplateInput:function(e,t,n,i){var r=$("."+n),o=i-t.value.length;r.textContent=o,r.className=a.default.class(n,{error:o<=0})},onButtonMouseDown:function(e,t){s.default.safari_mobile||e.preventDefault()},onButtonClick:function(e,t,n){var a=$(".MailTemplatePage__TextTextarea"),i=a.value,r=a.selectionStart,o=a.selectionEnd;a.value=i.slice(0,r)+n+i.slice(o);var s=r+n.length;a.selectionStart=a.selectionEnd=s},onSave:function(e,t,n,a,s){var l=$(".MailTemplatePage__NameInput .TextInput__native"),c=$(".MailTemplatePage__TextTextarea");o.default.setLoading(t,!0),(0,i.ajaxRequest)("/mail",{act:"save_template",name:l.value,text:c.value,hash:a,id:n},function(e){if(e){if(e.error){var a=$(".MailTemplatePage__ErrorRow"),i=$(".MailTemplatePage__ErrorText");return o.default.setLoading(t,!1),a.hidden=!1,void(i.textContent=e.message)}if(store.mail.cur&&store.mail.cur.templates){var l=store.mail.cur.templates,c=n?l.findIndex(function(e){return e.id===n}):-1;-1!==c?l.splice(c,1,e.result):l.push(e.result)}r.default.go(s)}},function(){o.default.setLoading(t,!1)})},onSubmit:function(e){e.preventDefault()}};window.MailTemplatePage=c},B5sG:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var a,i=(a=n("bYEY"))&&a.__esModule?a:{default:a},r=n("DkIl");var o=function(){var e=store.mail.cur.peerId,t=store.mail.cur.page;if(e)return function(e){var t=store.mail,n=t.peers[e],a=e>2e9,i={title:n.title,photos:n.avatarImages,actions:s(e),editing:t.cur.editing};if(a){var o=a?e-2e9:null;if(i.url="/mail?act=info&chat=".concat(o),i.membersCount=n.countMembers,i.hasPinnedMsg=n.hasPinnedMsg,i.isChannel=n.isChannel,i.isChannel){var l=-n.ownerId;i.url="/club".concat(l)}}else i.url=n.profileUrl,i.isOnline=n.isOnline,i.onlinePlatform=n.onlinePlatform,i.offlineText=n.offlineText;return(0,r.MailHat_convo)(i)}(e);if(t)return function(e){return(0,r.MailHat_page)(e)}(t);return function(){var e=store.mail.cur,t=Math.abs(e.groupId),n=t?"&community=".concat(t):"",a=t?"?community=".concat(t):"";return(0,r.MailHat_main)({folder:e.folder,urls:{all:"/mail".concat(a),unrespond:"/mail?act=unrespond".concat(n),unread:"/mail?act=unread".concat(n),important:"/mail?act=important".concat(n),createChatUrl:"/mail?act=new_chat"},unreadCount:e.countUnread,importantCount:e.countImportant,withUnrespond:!!t,forwarding:!!e.forwardFromId,notifier:(0,i.default)()})}()};function s(e){var t=store.mail,n=t.peers[e].actionUrls,a=t.peers[e].isChannel;return e>-2e9&&e<0?[l("showMedias",n.showMedia),l("deleteHistory",n.flushHistory),l("blockCommunity",n.blockCommunity),l("unblockCommunity",n.unblockCommunity),l("blockNotify",n.blockNotify)]:e>2e9?[l("chatInfo",n.chatInfo,"",a),l("chatAdd",n.addToChat),l("inviteLink",n.inviteLink,"",a),l("showMedias",n.showMedia),n.unpinMsg?l("chatUnpinMsg",n.unpinMsg):"",n.unpinMsg?l("chatShowPinnedMsg",null,'onmousedown="uMessenger.onShowPinnedMsgClick()"'):"",n.unpinMsg?l("chatHidePinnedMsg",null,'onmousedown="uMessenger.onHidePinnedMsgClick()"'):"",l("chatDeleteHistory",n.flushHistory),l("chatReturn",n.returnToChat,"",a),l("chatLeave",n.leaveChat,"",a)]:t.cur.groupId?[l("showMedias",n.showMedia),l("markAsAnswered",n.communityMarkAsAnswered),n.isDialogImportant?l("removeImportantMark",n.communityToggleImportant):l("markAsImportant",n.communityToggleImportant),n.isBlacklisted?l("unbanUser",n.userBan):l("banUser",n.userBan),l("deleteHistory",n.flushHistory)]:[l("showMedias",n.showMedia),l("deleteHistory",n.flushHistory)]}function l(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"",a=arguments.length>3&&void 0!==arguments[3]&&arguments[3],i=window.lang;if(!t&&!n)return null;var r={showMedias:[i.mobile_mail_show_medias,"attach"],deleteHistory:[i.mobile_mail_delete_history,"delete"],blockCommunity:[i.mobile_mail_block_community,"block"],blockNotify:[i.mobile_mail_block_community_notify,"block"],unblockCommunity:[i.mobile_mail_unblock_community,"allow"],chatAdd:[i.mobile_mail_add_to_chat,"plus"],chatUnpinMsg:[i.mobile_mail_unpin_msg,"unpin","unpin"],chatShowPinnedMsg:[i.mobile_mail_pin_show,"show","showPinned"],chatHidePinnedMsg:[i.mobile_mail_pin_hide,"hide","hidePinned"],chatInfo:[i.mobile_mail_chat_info,"info"],chatDeleteHistory:[i.mobile_mail_delete_chat_history,"delete"],chatReturn:[a?i.mobile_mail_return_to_channel:i.mobile_mail_chat_return,"revert","returnToChat"],chatLeave:[a?i.mobile_mail_channel_leave:i.mobile_mail_chat_leave,"close16","leaveChat"],markAsAnswered:[i.mobile_mail_mark_as_answered,"answered"],removeImportantMark:[i.mobile_mail_remove_important_mark,"important"],markAsImportant:[i.mobile_mail_mark_as_important,"important"],unbanUser:[i.mobile_settings_blacklist_unban_user,"allow"],banUser:[i.mobile_settings_blacklist_ban_user,"block"],inviteLink:[a?i.mobile_mail_channel_invite_link:i.mobile_mail_invite_link,"invite"]},o={text:r[e][0],icon:r[e][1],attrs:n,url:t};return r[e][2]&&(o.name=r[e][2]),o}t.default=o},B9v3:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"ActionsPanel",{enumerable:!0,get:function(){return a.ActionsPanel}}),Object.defineProperty(t,"init",{enumerable:!0,get:function(){return i.default}}),Object.defineProperty(t,"setBookmarkState",{enumerable:!0,get:function(){return i.setBookmarkState}}),t.default=void 0;var a=o(n("JYMJ")),i=o(n("qsX6"));function r(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return r=function(){return e},e}function o(e){if(e&&e.__esModule)return e;var t=r();if(t&&t.has(e))return t.get(e);var n={};if(null!=e){var a=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var i in e)if(Object.prototype.hasOwnProperty.call(e,i)){var o=a?Object.getOwnPropertyDescriptor(e,i):null;o&&(o.get||o.set)?Object.defineProperty(n,i,o):n[i]=e[i]}}return n.default=e,t&&t.set(e,n),n}window.Share=i.default,extend(window.Share,{setBookmarkState:i.setBookmarkState});var s=a.default;t.default=s},BFfX:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.AudioPopup=function(e){var t=null;if(e.action_button){var n=e.action_button,a=n.onclick,r=n.href,o=n.text;t={class:"AudioPopup__actionButtonWrapper",inner:{class:["AudioPopup__actionButton","button"],onclick:a,href:r,inner:o}}}var s=["AudioPopup"];e.popupClass&&s.push(e.popupClass);var l={class:"AudioPopup__content",inner:[{class:"AudioPopup__title",inner:e.title},{class:"AudioPopup__description",inner:e.description},t,e.additional_link]};return new i.default({content:l,class:s.join(" ")})};var a,i=(a=n("r/ag"))&&a.__esModule?a:{default:a}},"BJj/":function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.debounce=function(e,t,n){var a;return function(){var i=this,r=arguments,o=function(){a=null,n||e.apply(i,r)},s=n&&!a;clearTimeout(a),a=setTimeout(o,t),s&&e.apply(this,r)}}},BKxg:function(e,t,n){"use strict";s(n("+cqQ"));var a=s(n("s0aB")),i=function(e){if(e&&e.__esModule)return e;var t=o();if(t&&t.has(e))return t.get(e);var n={};if(null!=e){var a=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var i in e)if(Object.prototype.hasOwnProperty.call(e,i)){var r=a?Object.getOwnPropertyDescriptor(e,i):null;r&&(r.get||r.set)?Object.defineProperty(n,i,r):n[i]=e[i]}}n.default=e,t&&t.set(e,n);return n}(n("YDEi")),r=n("7jQU");function o(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return o=function(){return e},e}function s(e){return e&&e.__esModule?e:{default:e}}Object.assign(i.default,{onTap:a.default.onTap,redrawOnline:function(e){var t=store.mail.peers[e];if(t){var n=(0,i.uConvo_getOnline)(t);a.default.setOnline(e,n)}},redrawUnread:function(e){if(!store.mail.peers[e])return;var t=(0,i.uConvo_getUnreadCount)(e);a.default.setUnreadCount(e,t)},redrawLastMsg:function(e){var t=(0,i.uConvo_getLastMsg)(e);t&&a.default.setLastMsg(e,(0,i.uConvo_msgPreview)(t),{dateShort:t.dateShort,pending:t.pending,failed:t.failed})},redrawTyping:function(e){if(!store.mail.cur)return;var t=(0,r.uTyping_getPeerTyping)(e),n=t&&1===t.count&&t.users[0]===e,o=(0,i.uConvo_getTyping)(e,n);a.default.setTyping(e,o)},redrawImportant:function(e,t){a.default.setImportant(e,t)}})},BLcx:function(e,t,n){"use strict";var a=function(){var e=document.getElementsByClassName("gift_create_post_counter");return{counter:function(t){var n=e[0];if(n){var a=t.value.length,i=t.maxLength;if(a>i)t.value=t.value.substr(0,i);else if(a>i/2){var r=Math.max(i-a,0);n.innerText=langNumeric(r,lang.text_N_symbols_remain),show(n)}else hide(n)}}}}();window.GiftsSendFormCounter=a},BM0n:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.MainMenu=l,t.default=void 0;var a=s(n("vOib")),i=s(n("UWnA")),r=s(n("9y81")),o=s(n("AXyT"));function s(e){return e&&e.__esModule?e:{default:e}}function l(){var e=(arguments.length>0&&void 0!==arguments[0]?arguments[0]:{}).items.map(function(e){if(!e)return null;var t={onclick:"nav.onMenuItemClick('".concat(e.url,"'); ").concat(e.onclick),"data-skiponclick":1};return(0,i.default)({mix:"MainMenu__menuItem al_menu",url:e.url,attrs:t,style:{no_go_icon:!0},content:[{outerHTML:(0,r.default)({mix:"MainMenu__menuItemIcon",icon:e.icon})},{class:"MainMenu__menuItemTitle",inner:e.title},e.count?{outerHTML:(0,o.default)({mix:"MainMenu__menuItemCount",type:"minor",value:e.count})}:null]})});return(0,a.default)({mix:"MainMenu__menu",style:{extra_top_padding:!0,extra_bottom_padding:!0},content:e})}var c=l;t.default=c},BQMu:function(e,t,n){"use strict";var a=function(){var e,t,n="ai_menu_opened",a=!1;function i(e){for(var t=!1;e;){var n=getStyle(e,"overflow-y");if(("scroll"===n||"auto"===n)&&e.offsetHeightc.range_threshold&&(_=Math.round(c.font_size_ratio_range_2*m)+"px",v=Math.round(c.line_height_ratio_range_2*m)+"px"),setStyle(A,{height:m*a+"px",width:m}),setStyle(p,{fontSize:_,lineHeight:v,padding:g}),domData(p,"poster-resized",!0)}};var a=.75,i=1/18},BoyB:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var a,i=(a=n("2C1Z"))&&a.__esModule?a:{default:a};var r=i.default;t.default=r,window.Loading=i.default},Bqje:function(e,t,n){"use strict";var a=n("UxAg");function i(){var e=(0,a.$)(r.intro),t=new Scroller(e,{byPage:!0,ignoreMouseWheel:!0,noAutoScroll:!0});t.init(),cur.destroy.push(function(){return t.destroy()})}window.AuthCheckIntro={},AuthCheckIntro._onMount=i;var r={intro:".AuthCheckIntro"}},BxOC:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.post=function(e,t,n){t&&(t.im_v=r);return new Promise(function(a,r){i.post(e,t,{timeout:n,onDone:function(){a.apply(null,[Array.prototype.slice.call(arguments)])},onFail:function(){return r.apply(null,arguments),!0}})})},t.plainget=function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};return o(e,t,n).request},t.plaingetCancelable=o;var a=n("cGUQ"),i=window.ajax,r=3;function o(e,t){var n,r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};return n=window.XDomainRequest?new XDomainRequest:i._getreq(),{request:new Promise(function(i,o){var s,l=Date.now(),c=r.timeout||60,u=(0,a.toQueryString)(t);if(window.XDomainRequest)n.open("get","".concat(e,"?").concat(u)),n.ontimeout=function(e){o([e,{}])},n.onerror=function(e){o([e,{}])},n.onload=function(){i([n.responseText,{}])},setTimeout(function(){n.send()},0);else{n.onreadystatechange=function(){4==n.readyState&&(clearInterval(s),n.status>=200&&n.status<300?i([n.responseText,n]):o([n.responseText,n]))};try{n.open("GET","".concat(e,"?").concat(u),!0)}catch(e){return o([e,n])}n.send()}s=setInterval(function(){Date.now()-l>1e3*c&&(window.browser.safari&&n.abort(),o(["",{}]),clearInterval(s))},1e3)}),cancel:function(){n.abort()}}}},C13D:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.asObject=function(e){if(!e)return null;if(isObject(e))return e;if("string"==typeof e)return{id:e};var t=(e[a.AUDIO_PLAYER_ENUMS.AUDIO_ITEM_INDEX_HASHES]||"").split("/"),n=(e[a.AUDIO_PLAYER_ENUMS.AUDIO_ITEM_INDEX_COVER_URL]||"").split(","),r=(0,i.getAudioPerformers)(e,!1);return{id:intval(e[a.AUDIO_PLAYER_ENUMS.AUDIO_ITEM_INDEX_ID]),owner_id:intval(e[a.AUDIO_PLAYER_ENUMS.AUDIO_ITEM_INDEX_OWNER_ID]),ownerId:e[a.AUDIO_PLAYER_ENUMS.AUDIO_ITEM_INDEX_OWNER_ID],fullId:e[a.AUDIO_PLAYER_ENUMS.AUDIO_ITEM_INDEX_OWNER_ID]+"_"+e[a.AUDIO_PLAYER_ENUMS.AUDIO_ITEM_INDEX_ID],title:e[a.AUDIO_PLAYER_ENUMS.AUDIO_ITEM_INDEX_TITLE]||"",subTitle:e[a.AUDIO_PLAYER_ENUMS.AUDIO_ITEM_INDEX_SUBTITLE],performer:r,duration:intval(e[a.AUDIO_PLAYER_ENUMS.AUDIO_ITEM_INDEX_DURATION]),lyrics:intval(e[a.AUDIO_PLAYER_ENUMS.AUDIO_ITEM_INDEX_LYRICS]),url:e[a.AUDIO_PLAYER_ENUMS.AUDIO_ITEM_INDEX_URL],flags:e[a.AUDIO_PLAYER_ENUMS.AUDIO_ITEM_INDEX_FLAGS],context:e[a.AUDIO_PLAYER_ENUMS.AUDIO_ITEM_INDEX_CONTEXT],extra:e[a.AUDIO_PLAYER_ENUMS.AUDIO_ITEM_INDEX_EXTRA],accessKey:e[a.AUDIO_PLAYER_ENUMS.AUDIO_ITEM_ACCESS_KEY],addHash:t[0]||"",editHash:t[1]||"",actionHash:t[2]||"",deleteHash:t[3]||"",replaceHash:t[4]||"",urlHash:t[5]||"",restoreHash:t[6]||"",canEdit:!!t[1],canDelete:!!t[3],isLongPerformer:e[a.AUDIO_PLAYER_ENUMS.AUDIO_ITEM_INDEX_FLAGS]&a.AUDIO_PLAYER_ENUMS.AUDIO_ITEM_LONG_PERFORMER_BIT,canAdd:!!(e[a.AUDIO_PLAYER_ENUMS.AUDIO_ITEM_INDEX_FLAGS]&a.AUDIO_PLAYER_ENUMS.AUDIO_ITEM_CAN_ADD_BIT),coverUrl_s:n[0],coverUrl_p:n[1],isClaimed:!!(e[a.AUDIO_PLAYER_ENUMS.AUDIO_ITEM_INDEX_FLAGS]&a.AUDIO_PLAYER_ENUMS.AUDIO_ITEM_CLAIMED_BIT),isExplicit:!!(e[a.AUDIO_PLAYER_ENUMS.AUDIO_ITEM_INDEX_FLAGS]&a.AUDIO_PLAYER_ENUMS.AUDIO_ITEM_EXPLICIT_BIT),isUMA:!!(e[a.AUDIO_PLAYER_ENUMS.AUDIO_ITEM_INDEX_FLAGS]&a.AUDIO_PLAYER_ENUMS.AUDIO_ITEM_UMA_BIT),isReplaceable:!!(e[a.AUDIO_PLAYER_ENUMS.AUDIO_ITEM_INDEX_FLAGS]&a.AUDIO_PLAYER_ENUMS.AUDIO_ITEM_REPLACEABLE),ads:e[a.AUDIO_PLAYER_ENUMS.AUDIO_ITEM_INDEX_ADS],album:e[a.AUDIO_PLAYER_ENUMS.AUDIO_ITEM_INDEX_ALBUM],albumId:intval(e[a.AUDIO_PLAYER_ENUMS.AUDIO_ITEM_INDEX_ALBUM_ID]),albumPart:intval(e[a.AUDIO_PLAYER_ENUMS.AUDIO_ITEM_INDEX_ALBUM_PART]),trackCode:e[a.AUDIO_PLAYER_ENUMS.AUDIO_ITEM_INDEX_TRACK_CODE],restrictionStatus:e[a.AUDIO_PLAYER_ENUMS.AUDIO_ITEM_INDEX_RESTRICTION],useNewStats:Boolean(e[a.AUDIO_PLAYER_ENUMS.AUDIO_ITEM_INDEX_NEW_STATS])}};var a=n("uk5P"),i=n("eVa8")},C45x:function(e,t,n){"use strict";var a=n("UxAg"),i=u(n("bZ/P")),r=u(n("+cqQ")),o=function(e){if(e&&e.__esModule)return e;var t=c();if(t&&t.has(e))return t.get(e);var n={};if(null!=e){var a=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var i in e)if(Object.prototype.hasOwnProperty.call(e,i)){var r=a?Object.getOwnPropertyDescriptor(e,i):null;r&&(r.get||r.set)?Object.defineProperty(n,i,r):n[i]=e[i]}}n.default=e,t&&t.set(e,n);return n}(n("ti65")),s=u(n("Gzds")),l=n("OcsD");function c(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return c=function(){return e},e}function u(e){return e&&e.__esModule?e:{default:e}}var d=need("Voting");Object.assign(o.default,{class:"msg",onClick:(0,r.default)(),onPendingClick:(0,r.default)(),onRestoreClick:(0,r.default)(),onReplyClick:(0,r.default)(),onForward:(0,r.default)(),onLoadAgain:(0,r.default)(),getElem:function(e){return(0,a.$)(".msg_id_".concat(e))},remove:function(e){arguments.length>1&&void 0!==arguments[1]&&arguments[1]?(0,a.$$)(".msg_id_".concat(e)).forEach(function(e){return e.remove()}):v(e,!1)},spam:function(e){v(e,!0)},restore:function(e){(0,a.$$)(".msg_id_".concat(e)).forEach(function(e){e.classList.remove("msg_removed"),e.classList.remove("msg_spam")})},unselectAll:function(){(0,a.$$)(".msg_selected").forEach(function(e){return e.classList.remove("msg_selected")})},getReplyDataFromHTML:function(e){var t=e&&o.default.getElem(e),n="";if(t){var i=(0,a.$)(".thumbs_map .thumb_map_img_as_div",t);return(n=i&&i.style.backgroundImage)&&(n=n.replace(/^url\((['"])?/,"").replace(/(['"])?\)$/,"")),{msg_id:e,parent_id:null,preview_url:n}}return null},toggleImportant:function(e,t){[].concat(e).forEach(function(e){var n=(0,a.$)(".msg_id_".concat(e));n&&n.classList.toggle("msg_important",t)})},markAsRead:function(e){(0,a.$$)(".msg_id_".concat(e)).forEach(function(e){return e.classList.remove("msg_unread")})},getId:function(e){var t=i.default.parseClass(h.msg,e.className);return Number(t.id)},getTextHtml:function(e){return e.$(p.text).innerHTML}}),o.default._onClick=g,o.default._onPendingClick=y,o.default._onTouchStart=w,o.default._onRestoreClick=_,o.default._onActionClick=E,o.default._onReplyClick=S,o.default._onStickerClick=C,o.default.onStickerTouchStart=M;var f,h={msg:"msg"},p={text:".msg__text"},A=500,m=!1;function _(e,t){e.stopPropagation(),t=parseInt(t,10),o.default.onRestoreClick(t)}function v(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1],n=(0,o.Msg__restoreInner)(e);(0,a.$$)(".msg_id_".concat(e)).forEach(function(e){e.$(".msg__restore").innerHTML=n,e.classList.remove("msg_selected"),e.classList.add("msg_removed"),e.classList.toggle("msg_spam",t)})}function g(e,t,n){b(e.target,t,function(){t.classList.toggle("msg_selected"),o.default.onClick(n)})}function y(e,t,n,a,i){b(e.target,t,function(){o.default.onPendingClick(n,a,i)})}function b(e,t,n){for(var a=t.classList.contains("msg_pending")||t.classList.contains("msg_failed");e!==t;)if(a&&-1!==e.className.indexOf("msg__sticker"))e=e.parentElement;else{if("A"===e.tagName||"BUTTON"===e.tagName||e.getAttribute("onclick")||e.classList.contains("im_msg_audiomsg")||e.classList.contains("articleSnippet__block")||e.classList.contains("MailButton")||e.closest(".".concat(d.cls)))return;e=e.parentElement}m?m=!1:k()||t.classList.contains("msg_removed")||t.classList.contains("msg_spam")||store.mail.cur.editing||n()}function w(){k()&&(m=!0)}function E(e,t,n){switch(t){case"forward":o.default.onForward(n)}}function k(){return window.getSelection().toString().length>0}function S(e,t,n,a){e.preventDefault(),o.default.onReplyClick(t,n,a)}function C(e,t,n,a){n&&(e.preventDefault(),a&&s.default.stickersClick(t,a))}function M(e,t){if(clearTimeout(f),!!t.getAttribute("data-animation-path")){var n=e.touches[0].clientX,a=e.touches[0].clientY;(0,l.addEvent)(t,"contextmenu",P),(0,l.addEvent)(t,"touchmove",i,{passive:!0}),(0,l.addEvent)(t,"touchend",r,{passive:!0}),(0,l.addEvent)(t,"touchcancel",r,{passive:!0}),f=setTimeout(function(){!function(e){StickersAnimation.loadAndPlaySticker(e)}(t),r()},A)}function i(e){(Math.abs(e.touches[0].clientX-n)>=10||Math.abs(e.touches[0].clientY-a)>=10)&&r()}function r(){clearTimeout(f),(0,l.removeEvent)(t,"contextmenu",P),(0,l.removeEvent)(t,"touchmove",i,{passive:!0}),(0,l.removeEvent)(t,"touchend",r,{passive:!0}),(0,l.removeEvent)(t,"touchcancel",r,{passive:!0})}}function P(e){event.preventDefault(),event.stopPropagation()}},C4zK:function(e,t,n){"use strict";var a=s(n("bZ/P")),i=n("UxAg"),r=s(n("+cqQ")),o=s(n("nggH"));function s(e){return e&&e.__esModule?e:{default:e}}function l(){store.mail.cur&&h()}function c(e){store.mail.cur&&function(e){var t=e.target,n=$(".mailActs");n&&n.classList.contains("mailActs_menuOpened")&&!t.closest(".mailActs__chevronList")&&!t.closest(".mailActs__chevronMoreIcon")&&n.classList.remove("mailActs_menuOpened")}(e)}function u(e){d({canEdit:e})}function d(e){(0,i.$$)(".mailActs").forEach(function(t){var n=a.default.parseClass("mailActs",t.getAttribute("class"));t.setAttribute("class",a.default.class("mailActs",Object.assign({},n,e)))})}function f(e){switch(e){case"edit":o.default.onEditClick();break;case"remove":o.default.onRemoveClick();break;case"important":o.default.onImportantClick();break;case"reply":o.default.onReplyClick();break;case"forward":o.default.onForwardClick();break;case"spam":o.default.onSpamClick();break;case"pin":o.default.onPinClick()}}function h(){var e=document.querySelector(".mailActs__chevron"),t=e.offsetWidth-1,n=e.querySelectorAll(".mailActs__chevronListItem"),a=e.querySelectorAll(".mailActs__icon");Array.prototype.forEach.call(a,function(e,i){t<36*a.length?t-34>=36*(i+1)?(e.classList.remove("mailActs__icon_hidden"),n[i].classList.add("mailActs__chevronListItem_hidden")):(e.classList.add("mailActs__icon_hidden"),n[i].classList.remove("mailActs__chevronListItem_hidden")):(e.classList.remove("mailActs__icon_hidden"),n[i].classList.add("mailActs__chevronListItem_hidden"))}),d({cutted:t<36*a.length})}function p(){(0,i.$$)(".mailActs").forEach(function(e){return e.classList.toggle("mailActs_menuOpened")})}Object.assign(o.default,{onCloseClick:(0,r.default)(),onRemoveClick:(0,r.default)(),onImportantClick:(0,r.default)(),onReplyClick:(0,r.default)(),onForwardClick:(0,r.default)(),onSpamClick:(0,r.default)(),onPinClick:(0,r.default)(),onMoreClick:(0,r.default)(),onEditClick:(0,r.default)(),setCount:function(e){var t=langNumeric(e,lang.mobile_mail_messages_selected).replace("{count}",e);(0,i.$$)(".mailActs__counter").forEach(function(e){return e.innerText=t}),1!=e&&u(!1);h()},setEditAvailable:u,setImportantAvailable:function(e){d({canImportant:e})},toggleQuickButtons:function(e){$(".mailActs__buttonsIn").hidden=!e},setReplyAvailable:function(e){$(".mailActs__button_type_reply").disabled=!e},togglePin:function(e){(0,i.$$)(".mailActs").forEach(function(t){return t.classList.toggle("mailActs_canPin",e)})},setModifiers:d,setLabels:function(e){var t=window.lang,n=e.pinned?t.mobile_mail_messages_actions_unpin:t.mobile_mail_messages_actions_pin,a=e.important?t.mobile_mail_messages_actions_important_off:t.mobile_mail_messages_actions_important;$(".mailActs__icon_type_pin").setAttribute("aria-label",n),$(".mailActs__icon_type_important").setAttribute("aria-label",a),$(".mailActs__chevronListItem_type_pin").innerHTML=n,$(".mailActs__chevronListItem_type_important").innerHTML=a},update:h}),o.default._onButtonClick=f,o.default._onCloseClick=o.default.onCloseClick,o.default._onMoreClick=p,onBodyResize(l),document.addEventListener("click",c)},C7ju:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var a,i=(a=n("JaXn"))&&a.__esModule?a:{default:a};var r=function(e){return{class:"PhotoMarketItem",attrs:{"data-item-id":e.item_id},inner:[{class:"PhotoMarketItem__thumb",tag:"img",src:e.thumb},{class:"PhotoMarketItem__title",inner:e.title},{class:"PhotoMarketItem__price",inner:Wd.wrap(e.price)},(0,i.default)({type:e.type,typeInt:e.type_int,isFave:e.is_fave,itemId:e.item_id,ownerId:e.owner_id,href:e.href,faveHash:e.fave_hash})]}};t.default=r},CKxJ:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var a=s(n("bZ/P")),i=(s(n("KMpi")),function(e){if(e&&e.__esModule)return e;var t=o();if(t&&t.has(e))return t.get(e);var n={};if(null!=e){var a=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var i in e)if(Object.prototype.hasOwnProperty.call(e,i)){var r=a?Object.getOwnPropertyDescriptor(e,i):null;r&&(r.get||r.set)?Object.defineProperty(n,i,r):n[i]=e[i]}}n.default=e,t&&t.set(e,n);return n}(n("/Id8"))),r=n("fdw3");function o(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return o=function(){return e},e}function s(e){return e&&e.__esModule?e:{default:e}}function l(){var e=u(['\n
    \n ',"\n
    \n "]);return l=function(){return e},e}function c(){var e=u(["\n ","\n ","\n "]);return c=function(){return e},e}function u(e,t){return t||(t=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(t)}}))}var d=function(e){var t,n=e.msgId,o=e.withDivider?function(){var e=window.lang;return a.default.html(l(),e.mobile_mail_new_msgs)}():"",s=store.mail,u=(0,r.isForwardedMessageId)(n)?s.forwards[n]:s.msgs[n],d=s.members[u.authorId],f=u.peerId,h=s.peers[f];if(!e.detailed){var p=store.mail.presend,A=(p=p&&p.msgs)&&p["edit"+n];A&&(u=A)}h&&(h.isIncomingMR||h.isRejectedMR)&&(o="");if(u.isService)t=(0,i.default)({id:n,text:u.service,service:!0,unread:u.isUnread});else{var m=(0,i.Msg__authorName)(d,f,s.cur.userId),_={id:n,text:u.text,important:u.isImportant,unread:u.isUnread,authorPhoto:d.avatar,authorName:m,authorUrl:d.url,date:u.date,removed:s.cur.msgRemoved[n],admin:u.adminName?{name:u.adminName,url:u.adminUrl}:null,edited:u.edited,channel:h.isChannel&&h.ownerId!==s.cur.viewerId,attaches:u.attaches,attachesHTML:u.attachesHTML,attachesLoading:u.attachesLoading,forwards:u.forwards,reply:u.reply,pending:u.pending,waiting:u.waiting,failed:u.failed,sendId:u.sendId,sticker:u.sticker,keyboard:u.keyboard,maxDepth:e.detailed?s.cur.maxDetailedMsgDepth:s.cur.maxMsgDepth};t=e.detailed?(0,i.Msg_detailed)(_):(0,i.default)(_)}return a.default.html(c(),o,t)};t.default=d},CQvH:function(e,t,n){"use strict";addEvent(window,"keydown",function(e){9===e.keyCode&&document.body.classList.add("tabbing")},{passive:!0}),addEvent(window,"click touchstart",function(){document.body.classList.remove("tabbing")},{capture:!0,passive:!0})},Cbap:function(e,t,n){"use strict";function a(e,t){for(var n=0;n0&&void 0!==arguments[0]?arguments[0]:{}).hideIcon&&(e.visibility="hidden");var t=(0,o.stylesObjectToString)(e);return{inner:[(0,r.Row)({inner:[(0,r.Col)({inner:[(0,r.Row)({inner:[(0,r.Col)({inner:[(0,i.Line)({header:!0})],grow:4}),(0,r.Col)({grow:5}),(0,r.Col)({inner:[(0,a.Circle)({header:!0,size:20,style:t})],auto:!0})]})],flexColumn:!0})]})],class:"SkeletonHeader",tag:"div"}}var l=s;t.default=l},CkGd:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var a,i=(a=n("nggH"))&&a.__esModule?a:{default:a};n("C4zK");var r=i.default;t.default=r,window.MailActs=i.default},Cxv5:function(e,t,n){"use strict";var a;((a=n("9CLW"))&&a.__esModule?a:{default:a}).default.onPostMessage(function(e){"putPixel"!==e&&"addCard"!==e&&window.scrollTop(0)})},"D+pY":function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.AudioBackgroundRestriction=void 0;var a,i=(a=n("r/ag"))&&a.__esModule?a:{default:a},r=n("4uOi"),o=n("BFfX"),s=n("J8bf");function l(e,t){for(var n=0;n1&&void 0!==arguments[1]?arguments[1]:0,n=parseInt((0,s.getCookie)(e),10);if(isNaN(n,10))return t;return n}(e.SHOW_ALERT_COOKIE),this.initVisibilityChangeEvent())}return c(e,null,[{key:"writePopupStat",value:function(e){statlogsValueEvent("mvk_audio_background_popup",e)}},{key:"createPopup",value:function(){var t={href:e.EXPLANATION_LINK,onclick:'AudioBackgroundRestriction.writePopupStat("explanation_click");',class:"AudioPopup__explanation",inner:getLang("mobile_audio_background_restriction_explanation")};return Wd.elem((0,o.AudioPopup)({popupClass:"AudioRestrictionPopup",title:getLang("mobile_audio_background_restriction_title"),description:getLang("mobile_audio_background_restriction_description"),action_button:{href:e.REMOVE_RESTRICTION_LINK,onclick:'AudioBackgroundRestriction.writePopupStat("link_click");',text:getLang("mobile_audio_background_restriction_button")},additional_link:t}))}}]),c(e,[{key:"onIdle",value:function(){window.audio.playing()&&this.triggerRestriction()}},{key:"showBackgroundMessage",value:function(){var t=e.createPopup();this.showAlertCountToday+=1,(0,s.setCookie)("remixaudio_show_alert_today",this.showAlertCountToday,1),this.showAlertCountToday%3||(i.default.open(t,!0),e.writePopupStat("show"))}},{key:"triggerRestriction",value:function(){audio.pause(),this.showBackgroundMessage()}},{key:"initVisibilityChangeEvent",value:function(){var e=this;this.pageVisibility=new r.PageVisibility,this.pageVisibility.onVisible(function(){e.isIdle=!1}),this.pageVisibility.onHidden(function(){e.isIdle=!0,e.onIdle()})}}]),e}();t.AudioBackgroundRestriction=u,u.SHOW_ALERT_COOKIE="remixaudio_show_alert_today",u.REMOVE_RESTRICTION_LINK="/offermusic",u.EXPLANATION_LINK="https://vk.cc/9uFgyl"},D48u:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var a,i=(a=n("Qwnw"))&&a.__esModule?a:{default:a};var r=i.default;t.default=r,window.MessageRequestsPage=i.default},DG1x:function(e,t,n){"use strict";window.LoadMore={setUrl:s,destroy:l},LoadMore._strategy={replace:{onFail:_,onSuccess:function(e){var t=e.response;r.outerHTML=t,l()}},padsExtend:{onFail:_,onSuccess:function(e){var t=e.response,n=t.pads,a=t.nextPageUrl;Object.keys(n).forEach(function(e){var t=n[e];Pad.addContent(e,t)}),a?s(a):l()}}},LoadMore._onButtonClick=c,onDOMReady(u),page.onChange(u);var a={loadMore:".LoadMore",button:".LoadMore__button"},i="_loadMore_loading",r=null,o=null;function s(e){o.setAttribute("href",e)}function l(e){r.remove(),r=null,o=null,f()}function c(){m()||h()}function u(){if(r=$(a.loadMore)){var e=window.cur;o=r.$(a.button),d(0),onBodyScroll(d),e.destroy.push(f)}}function d(e){if(r&&!m()){var t=getY(r),n=getCh();t-(e+n)<2*n&&h()}}function f(){onBodyScroll("__clear",d)}function h(){A(!0);var e=o.getAttribute("href");ajax.post(e,{_ajax:1},{onDone:function(e){return p(e,!0)},onFail:function(e){return p(e,!1)}})}function p(e,t){if(A(!1),r){var n=t?"data-success-handler":"data-fail-handler";n=r.getAttribute(n),Wd.handle(n,{$loadMore:r,response:e}),r=null,o=null,f(),u()}}function A(e){o&&r&&(Btn.setLoading(o,e),r[i]=e)}function m(){return r&&r[i]}function _(e){console.error("LoadMore: failed to load more",e)}},DM26:function(e,t,n){"use strict";function a(e){return function(e){if(Array.isArray(e)){for(var t=0,n=new Array(e.length);t2&&void 0!==arguments[2]?arguments[2]:null,a=0;return function r(){for(var o=arguments.length,s=new Array(o),l=0;l0&&void 0!==arguments[0]?arguments[0]:{},t=(0,o.stylesObjectToString)({opacity:e.opacity});return{inner:[(0,r.Row)({inner:[(0,r.Col)({inner:[(0,a.Circle)({size:50,style:t})],auto:!0}),(0,r.Col)({inner:[(0,r.Row)({inner:[(0,r.Col)({inner:[(0,i.Line)({style:t})],grow:3}),(0,r.Col)({grow:4}),(0,r.Col)({inner:[(0,i.Line)({style:t})]})],justify:"center"}),(0,r.Row)({inner:[(0,r.Col)({inner:[(0,i.Line)({style:t})]}),(0,r.Col)({inner:[(0,i.Line)({style:t})],grow:5}),(0,r.Col)({grow:3,style:t})]})],flexColumn:!0})]})],class:"SkeletonChatBlock",tag:"div"}}var l=s;t.default=l},DVnk:function(e,t,n){"use strict";FeedAssistanceStats.registerTrackingCls("feedAssistance_recommendedFriends"),FeedAssistanceStats.onStartViewElement(function(e){if(FeedAssistanceStats.getElementType(e)===FeedAssistanceStats.BLOCKS.BLOCK_TYPE_RECOMMENDED_SLIDER){if(e._friendsSliderHandlersAdded)return;e._friendsSliderHandlersAdded=!0}})},DgYJ:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.uMailWrite_TemplatesContent=function(e){var t=e.length,n=!t;return a.default.html([c(n),{class:"uMailWrite__templatesRows",attrs:{hidden:n},inner:e.map(function(e,n){return u(e,n,t)})}])},t.uMailWrite_TemplatesEmpty=c,t.uMailWrite_TemplatesLoading=function(){return Loading({mix:"uMailWrite__templatesLoading"})},t.uMailWrite_TemplatesRow=u,t.prepareTemplateText=d;var a=l(n("TYsd")),i=l(n("bZ/P")),r=n("9M99"),o=l(n("gy8s")),s=l(n("29dZ"));function l(e){return e&&e.__esModule?e:{default:e}}function c(e){var t="/mail?act=template&from="+store.mail.cur.peerId+store.mail.cur.communityParam,n=i.default.onClick("uMailWrite.loadTemplatePage","event","this",t);return{class:"uMailWrite__templatesEmpty",attrs:{hidden:!e},inner:[{class:"uMailWrite__templatesEmptyInfo",inner:lang.mobile_mail_templates_empty_info},(0,s.default)({type:"button",theme:"small",attrs:n,inner:lang.mobile_mail_templates_empty_button})]}}function u(e,t,n){var s=t>0&&t===n-1,l=store.mail.cur.communityParam,c=store.mail.cur.peerId,u=e.name,f=e.text;u=(0,r.emojiToHTML)(u),f=d(f,!0);var h="_touched uMailWrite__templatesRow";return h+=" uMailWrite__templatesRow".concat(e.id),e.deleting&&(h+=" uMailWrite__templatesRow_hidden"),{class:h,inner:[{class:"uMailWrite__templatesRowContent",attrs:{onclick:["uMailWrite.onTemplateClick","event","this",e.id]},inner:[{class:"uMailWrite__templatesRowName",inner:a.default.html(u)},{class:"uMailWrite__templatesRowText",inner:a.default.html(f)}]},{class:"uMailWrite__templatesRowMore",inner:[a.default.wrap((0,o.default)({mix:"",icon:"more",position:s?"bottomRight":"topRight",items:[{text:lang.mobile_mail_templates_action_edit,name:"edit",url:"/mail?act=template&id=".concat(e.id).concat(l,"&from=").concat(c)},{text:lang.mobile_mail_templates_action_delete,name:"delete",attrs:i.default.onMouseDown("uMailWrite._onDeleteTemplate",e.id)}]}))]}]}}function d(e){var t,n=arguments.length>1&&void 0!==arguments[1]&&arguments[1],a=store.mail.members,i=store.mail.cur,o=a[i.peerId],s=a[i.userId],l=a[i.groupId],c=o.name.replace(o.firstName,"").trim(),u=s.name.replace(s.firstName,"").trim();if((e=(e=(e=(e=(e=(e=(e=(e=e.replace(/
    /g,"\n")).replace(/<br>/g,"\n")).replace(/\t/g,"\n")).replace(/{user name}/g,o.firstName)).replace(/{user surname}/g,c)).replace(/{admin name}/g,s.firstName)).replace(/{admin surname}/g,u)).replace(/{community}/g,l.name)).match(/{greeting}/g)){var d,f=(t=Date.now()+1e3*store.mail.cur.timeShift,new Date(t).getHours());d=f>=3&&f<12?lang.mobile_mail_templates_greeting_morning:f>=12&&f<17?lang.mobile_mail_templates_greeting_afternoon:f>=17&&f<=23?lang.mobile_mail_templates_greeting_evening:lang.mobile_mail_templates_greeting_night,e=e.replace(/{greeting}/g,d)}return n&&(e=(0,r.emojiToHTML)(e)),e}},Dh0N:function(e,t,n){"use strict";function a(e,t){var n=t.$select,a=t.value;n.closest(i.email).classList.toggle(r.groupsVisible,e.includes(a)||e.includes(Number(a)))}window.SettingsEmail={},SettingsEmail._onFrequencyChange=a;var i={email:".settingsEmail"},r={groupsVisible:"settingsEmail_groupsVisible"}},DiaP:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var a=r(n("TYsd")),i=r(n("29dZ"));function r(e){return e&&e.__esModule?e:{default:e}}var o=function(e){var t=window.lang;return a.default.html({class:"MessageRequestBox",inner:[{class:"MessageRequestBox__info",inner:t.mobile_mail_mrs_confirm_info},{class:"MessageRequestBox__buttons",inner:[(0,i.default)({theme:"negative",size:"normal",type:"button",inner:t.mobile_mail_mrs_button_reject,attrs:q.onClick("MessageRequestBox.reject","event","this",e)}),(0,i.default)({theme:"secondary",size:"normal",type:"button",inner:t.mobile_mail_mrs_button_accept,attrs:q.onClick("MessageRequestBox.accept","event","this",e)})]}]})};t.default=o},DkIl:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"MailHat",{enumerable:!0,get:function(){return a.MailHat}}),Object.defineProperty(t,"MailHat__Title",{enumerable:!0,get:function(){return a.MailHat__Title}}),Object.defineProperty(t,"MailHat__icon",{enumerable:!0,get:function(){return a.MailHat__icon}}),Object.defineProperty(t,"MailHat_main",{enumerable:!0,get:function(){return a.MailHat_main}}),Object.defineProperty(t,"MailHat_convo",{enumerable:!0,get:function(){return a.MailHat_convo}}),Object.defineProperty(t,"MailHat_page",{enumerable:!0,get:function(){return a.MailHat_page}});var a=n("k9Tg");n("iUjD"),window.MailHat_main=a.MailHat_main,window.MailHat_convo=a.MailHat_convo},E5Ij:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.MailPreSendList__Msg=function(e){var t=store.mail,n=t.members[e.authorId],a=e.peerId,r=t.peers[a],o=(0,i.Msg__authorName)(n,a,t.cur.userId);return(0,i.default)({id:e.id,text:e.text,important:e.isImportant,unread:e.isUnread,authorPhoto:n.avatar,authorName:o,authorUrl:n.url,date:e.date,removed:t.cur.msgRemoved[e.id],admin:e.adminName?{name:e.adminName,url:e.adminUrl}:null,edited:e.edited,channel:r.isChannel&&r.ownerId!==t.cur.viewerId,attaches:e.attaches,attachesHTML:e.attachesHTML,attachesLoading:e.attachesLoading,forwards:e.forwards,reply:e.reply,pending:e.pending,failed:e.failed,sendId:e.sendId,sticker:e.sticker,maxDepth:store.mail.cur.maxMsgDepth})},t.default=void 0;(a=n("TYsd"))&&a.__esModule;var a,i=function(e){if(e&&e.__esModule)return e;var t=r();if(t&&t.has(e))return t.get(e);var n={};if(null!=e){var a=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var i in e)if(Object.prototype.hasOwnProperty.call(e,i)){var o=a?Object.getOwnPropertyDescriptor(e,i):null;o&&(o.get||o.set)?Object.defineProperty(n,i,o):n[i]=e[i]}}n.default=e,t&&t.set(e,n);return n}(n("/Id8"));function r(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return r=function(){return e},e}var o=function(){store.mail.pendingMsgs;return{class:"MailPreSendList__box"}};t.default=o},E7VD:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.scrollToElem=c,t._onWheel=u;var a,i=n("UxAg"),r=(a=n("jk6M"))&&a.__esModule?a:{default:a};var o=need("page"),s=need("onDOMReady");window.Slider={scrollToElem:c},Slider._onWheel=u,(r.default.ios||r.default.msie_edge)&&(s(f),o.onChange(f),window.MutationObserver&&s(function(){document.body&&new MutationObserver(d).observe(document.body,{subtree:!0,childList:!0})}));var l={slider:".Slider",scroll:".Slider__scroll"};function c(e){var t=e.closest(l.scroll);t.scrollLeft=e.offsetLeft-t.offsetWidth/2+e.offsetWidth/2}function u(e,t){var n=e.deltaX,a=e.deltaY;Math.abs(n)>Math.abs(a)&&(e.preventDefault(),t.scrollLeft+=n)}function d(e){e.forEach(function(e){e.addedNodes.forEach(function(e){e.nodeType===Node.ELEMENT_NODE&&e.$$(l.slider).forEach(h)})})}function f(){(0,i.$$)(l.slider).forEach(h)}function h(e){var t=getComputedStyle(e),n=Number(t.paddingTop.replace("px","")),a=Number(t.paddingBottom.replace("px",""));e.style.overflow="hidden",e.style.height=e.offsetHeight-n-a+"px",e.$(l.scroll).style.paddingBottom="20px"}},EMnU:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.IconWd=function(e){var t,n=e.icon;return{class:[e.class,Bem.class("Icon",(t={},o(t,n,!0),o(t,"active",e.active),o(t,"blue",e.blue),o(t,"bluer",e.bluer),o(t,"dark",e.dark),o(t,"selected",e.selected),o(t,"small",e.small),o(t,"white",e.white),t))],href:e.url,attrs:e.attrs}},t.default=void 0;var a=r(n("bZ/P")),i=r(n("Mc5h"));function r(e){return e&&e.__esModule?e:{default:e}}function o(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var s=function(e){var t,n=e.icon,r=e.class||e.mix;return(0,i.default)({mix:a.default.class(r,"Icon",(t={},o(t,n,!0),o(t,"active",e.active),o(t,"blue",e.blue),o(t,"bluer",e.bluer),o(t,"dark",e.dark),o(t,"selected",e.selected),o(t,"small",e.small),o(t,"white",e.white),t)),url:e.url,attrs:e.attrs})};t.default=s},EYkR:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var a,i=(a=n("d124"))&&a.__esModule?a:{default:a};var r=i.default;t.default=r,window.AppShell=i.default},Ep6I:function(e,t,n){"use strict";n.r(t),n.d(t,"createLongpollConnect",function(){return m});var a=n("DM26"),i=n("BxOC"),r=n("f01n"),o=202,s=7,l=4,c=-3,u=-4,d=-5;function f(e,t){e.waitAbortFns.push(t)}function h(e){if(e.isStoppedFn())return Promise.resolve({ts:0,updates:[]});var t=Object(i.plaingetCancelable)(e.url,{act:"a_check",key:e.key,version:e.version,ts:e.ts,wait:25,mode:e.mode}),n=t.request,r=t.cancel;return e.stopFn=r,n.then(function(t){var n=t[0],a=t[1];return e.onData(e,a),e.waitTimeout=2,JSON.parse(n)}).catch(function(t){var n=t[1];return e.onData(e,n),Promise.reject(new Error(""))}).then(function(t){return function(e,t){var n=t.failed?Object(a.abortablePause)(l,null):{abort:function(){},pause:function(){return Promise.resolve()}},i=n.abort,r=n.pause;switch(t.failed){case 1:return f(e,i),e.onHistoryLost(e,t).then(function(){return e.onResult({ts:t.ts,updates:[[-1]]})}).then(r).then(function(){return h(e)});case 2:return f(e,i),e.onKeyExpired(e,t).then(function(t){var n=t[0],a=t[1],i=t[2],r=t[3];return e.onResult({ts:+r,updates:[[-2,n,a+"/"+i],[-1]]})}).then(r).then(function(){return h(e)});case 3:return e.onLpBroken(e,t);default:return Promise.resolve(t)}}(e,t)})}function p(e){e.isStoppedFn()||h(e).then(e.onResult.bind(e)).then(function(){return e.isReconnecting&&A(e,d)}).catch(function(t){return function(e,t){if(e.isStoppedFn())return;e.onRequestError(t),e.waitTimeout=Math.min(60,2*e.waitTimeout),A(e,c);var n=Object(a.abortablePause)(e.waitTimeout,null),i=n.abort,r=n.pause;return f(e,i),r().then(function(){return A(e,u)})}(e,t)}).then(function(){return p(e)})}function A(e,t){e.isReconnecting=t===u,e.onResult({ts:e.ts,updates:[[t,e.waitTimeout]]})}function m(e,t){var n=!!e.stopped,a={id:e.id,key:e.key,ts:e.ts,url:e.url,lpstat:e.lpstat||0,version:e.version||s,mode:o,waitTimeout:2,waitAbortFns:[],isReconnecting:!1,isStoppedFn:function(){return n},onResult:function(e){e.ts&&l(a.ts,e.ts,e.updates.map(function(e){switch(e[0]){case 0:return r.deleteEvent(e);case 1:return r.replaceFlagsEvent(e);case 2:return r.setFlagsEvent(e);case 3:return r.resetFlagsEvent(e);case 4:return r.addMessageEvent(e);case 5:return r.editMessageEvent(e);case 6:return r.readInboundEvent(e);case 7:return r.readOutboundEvent(e);case 8:return r.gotOnlineEvent(e);case 9:return r.gotOfflineEvent(e);case 10:return r.resetDirectoriesEvent(e);case 11:return r.replaceDirectoriesEvent(e);case 12:return r.setDirectoriesEvent(e);case 13:return r.deleteDialogEvent(e);case 18:return r.replaceMessageEvent(e);case 51:return r.chatChangedEvent(e);case 52:return r.chatUpdatedEvent(e);case 63:return r.typingEvent(e);case 64:return r.recordingAudioEvent(e);case 70:return r.videoCallEvent(e);case 80:return r.unreadCountEvent(e);case 114:return r.notifySettingsChangedEvent(e);case 116:return r.refreshMessageEvent(e);case 117:return r.audioStartEvent(e);case-1:return r.resyncEvent();case-2:return r.refreshLpKeyEvent(e);case c:return r.waitingForReconnectEvent(e);case u:return r.reconnectingEvent();case d:return r.reconnectedEvent();default:return r.emptyEvent(e)}}))},onData:_(t.onData),onRequestError:_(t.onRequestError),onHistoryLost:v(t.onHistoryLost),onKeyExpired:v(t.onKeyExpired),onLpBroken:v(t.onHistoryLost)},i=t.onEvents;function l(e,t,n){a.ts=t;for(var o=0;o1&&void 0!==arguments[1])||arguments[1],n=store.mail,a=n.cur,r=n.msgs,s=n.scraps,l=n.rolls,c=r[e];if(c&&(c.isImportant=!t,(0,i.arrayRemove)(l.folder.important,e),o.default.toggleImportant(e,!1),"important"===a.folder)){var u=s.folder.slice();(0,i.arrayRemove)(s.folder,e),m.default.redrawFolder(u)}}function ae(e){var t=store.mail,n=t.cur,a=t.msgs,r=t.scraps,l=t.rolls,c=t.peers,u=a[e];if(u&&!n.msgRemoved[e]){delete a[e],(0,i.arrayRemove)(l.peer[u.peerId],e),n.peerId===u.peerId&&((0,i.arrayRemove)(r.peer,e),o.default.remove(e,!0),n.msgSelected[e]&&(delete n.msgSelected[e],s.default.setCount(Object.keys(n.msgSelected).length),v.default.redrawMailActions()),r.peer.length?m.default.checkDivider():m.default.redrawPeer()),u.isImportant&&n.countImportant--;var h=c[u.peerId],p=h.isIncomingMR,A=h.isRejectedMR;u.isUnread&&u.authorId!==n.viewerId&&(c[u.peerId].countUnread=c[u.peerId].countUnread-1,p||A||c[u.peerId].countUnread<=0&&(n.countUnread=n.countUnread-1),d.default.redrawToBottom(),f.default.redrawCounter()),l.peer[u.peerId].length?re(u,e):ajaxRequest("/mail",{act:"get_last_msg",peer_id:u.peerId,user_id:n.userId},function(t,n){n&&(storeMethods.injectMail(t),l.peer[u.peerId].push(n)),re(u,e)},function(){re(u,e)})}}function ie(e){var t=store.mail.msgs,n=t&&t[e];if(n){n.listened=!0,n.attachesHTML=n.attachesHTML.replace(/class="(im_msg_audiomsg(?:\w?\s?)*)"/g,'class="im_msg_audiomsg im_msg_audiomsg_listened"');var a=$$('.audio-msg-track[data-msg="'.concat(e,'"]'));a&&a.forEach(function(e){e.closest(".im_msg_audiomsg").classList.add("im_msg_audiomsg_listened")})}}function re(e,t){var n=store.mail,a=n.cur,r=(n.msgs,n.scraps),o=n.rolls,s=n.peers,l=s[e.peerId],c=l.isIncomingMR,u=l.isRejectedMR;o.peer[e.peerId].length||(c||u?(0,i.arrayRemove)(o.mrs,e.peerId):((0,i.arrayRemove)(o.folder.all,e.peerId),(0,i.arrayRemove)(o.folder.unread,e.peerId),(0,i.arrayRemove)(o.folder.unrespond,e.peerId)),"mrs"===a.page?(0,i.arrayRemove)(r.mrs,e.peerId):"important"!==a.folder&&(0,i.arrayRemove)(r.folder,e.peerId)),o.peer[e.peerId]=o.peer[e.peerId].filter(unique).sort(asc),c||u?o.mrs=o.mrs.filter(unique).sort(gt):(0===l.countUnread&&(o.folder.unread=o.folder.unread.filter(function(t){return t!==e.peerId})),o.folder.all=o.folder.all.filter(unique).sort(gt),o.folder.unread=o.folder.unread.filter(unique).sort(gt),a.groupId&&(o.folder.unrespond=o.folder.unrespond.filter(unique).sort(gt))),"mrs"===a.page?(r.mrs=r.mrs.filter(unique).sort(gt),m.default.redrawMRs()):"important"===a.folder?((0,i.arrayRemove)(r.folder,t),m.default.redrawFolder()):"all"===a.folder?(r.folder=r.folder.filter(unique).sort(gt),m.default.redrawFolder()):"unread"===a.folder?(0===s[e.peerId].countUnread&&(0,i.arrayRemove)(r.folder,e.peerId),r.folder=r.folder.filter(unique).sort(gt),m.default.redrawFolder()):"unrespond"===a.folder&&(r.folder=r.folder.filter(unique).sort(gt),m.default.redrawFolder())}function oe(e){var t=store.mail,n=t.peers,a=t.cur;if(n[e]){var i=(0,y.getKeyboardState)(e);if(!(Date.now()-i.updateTime<=500)){var r=i.updateTime;ajaxRequest("/mail",{act:"get_peers",peer_ids:[e]},function(t){r===i.updateTime&&(storeMethods.injectMail(t),e==a.peerId&&d.default.renderKeyboardIfNeeded({update:!0}))})}}}function se(e,t){var n=store.mail.peers[e];n&&(n.isImportant=t),u.default.redrawImportant(e,t)}function le(e){nav.getQuery("community")||function(e){if(setNotify(e),!window.al||!window.al.menu)return;var t=window.al,n=new Array(t.menu.length);n[3]=e,menu.refreshCounters(n)}(e);var t=store.mail.cur;t&&(t.countUnread=e,f.default.redrawCounter()),window.ExperimentalBadge&&window.ExperimentalBadge.set(e)}function ce(){im.pause(),Ae(function(){im.resume()})}function ue(e){Date.now()-N<=500||ajaxRequest("/mail",{act:"get_peers",peer_ids:[e]},function(t){var n=store.mail.cur;storeMethods.injectMail(t),e==n.peerId&&v.default.redrawBanner()})}function de(e,t){im.pause(),ajaxRequest("/mail",{act:"get_peers",peer_ids:[t]},function(n){(0,y.replacePeer)(e,t),storeMethods.injectMail(n);var a=store.mail.cur;e===a.peerId?(m.default.redrawFolder(),t===a.peerId?Se(t):_e("/mail?act=show&peer=".concat(t),{replace:!0})):a.folder&&m.default.redrawFolder(),im.resume()})}function fe(e,t,n){var a=store.mail,r=a.cur,o=a.peers;if(r){var s=o[e];s&&(t===r.userId&&(s.isAdmin=n),n&&!(0,i.arrayContains)(s.adminIds,t)?s.adminIds.push(t):!n&&(0,i.arrayContains)(s.adminIds,t)&&(0,i.arrayRemove)(s.adminIds,t))}}function he(e,t){var n=store.mail,a=n.cur,r=n.rolls,o=n.scraps;a&&("created"!==t&&L||("created"===t&&L&&(L=!1),"created"===t?pe(e,function(t,n){(0,y.removePeer)(e),storeMethods.injectMail(t),a.countMR=n,store.mail.mrs&&(r.mrs=r.mrs.concat(e).filter(unique).sort(gt)),a.folder&&(m.default.redrawFolder(),v.default.redrawMRsHint()),a.peerId===e&&Se(e)}):"canceled"===t?pe(e,function(t,n){(0,y.removePeer)(e),storeMethods.injectMail(t),a.countMR=n,store.mail.mrs&&(0,i.arrayRemove)(r.mrs,e),a.folder&&(m.default.redrawFolder(),v.default.redrawMRsHint()),a.peerId===e?Se(e):"mrs"===a.page&&((0,i.arrayRemove)(o.mrs,e),m.default.redrawMRs())}):"rejected"===t?pe(e,function(t,n){(0,y.removePeer)(e),storeMethods.injectMail(t),a.countMR=n,store.mail.mrs&&(0,i.arrayRemove)(r.mrs,e),a.folder&&(m.default.redrawFolder(),v.default.redrawMRsHint()),a.peerId===e?Se(e):"mrs"===a.page&&((0,i.arrayRemove)(o.mrs,e),m.default.redrawMRs())}):"accepted"===t&&pe(e,function(t,n){(0,y.addPeer)(e),storeMethods.injectMail(t),a.countMR=n,store.mail.mrs&&(0,i.arrayRemove)(r.mrs,e),a.folder&&(m.default.redrawFolder(),v.default.redrawMRsHint()),a.peerId===e?Se(e):"mrs"===a.page&&((0,i.arrayRemove)(o.mrs,e),m.default.redrawMRs())})))}function pe(e,t){im.pause(),ajaxRequest("/mail",{act:"mrs_get_peer",peer_id:e},function(e,n){t(e,n),im.resume()})}function Ae(e){var t=store.mail,n=t.cur,a=t.msgs,i=t.scraps,r=t.rolls;r.folder[n.folder]=[],i.folder=[],v.Messenger.setMainLoading(!0),ajaxRequest("/mail",{act:"all"===n.folder?null:n.folder,offset:0},function(t,o){if(store.mail.cur){storeMethods.injectMail(t),"all"!==n.folder&&"unread"!==n.folder||Object.keys(t.msgs).forEach(function(e){e=toInt(e);var n=t.msgs[e].peerId;r.peer[n]=(r.peer[n]||[]).concat(e).filter(function(e){return!!a[e]}).filter(unique).sort(asc)});var s="important"===n.folder,l=s?desc:gt,c=Object.keys(s?t.msgs:t.peers).map(toInt).sort(l).filter(function(e){return-1===i.folder.indexOf(e)}),u=[].concat(c).filter(unique).sort(l);r.folder[n.folder]=u,i.folder=first(20,u),store.mail.reached.folder[n.folder]=o,m.default.redrawFolder(),f.default.redrawCounter(),v.Messenger.setMainLoading(!1),e&&e()}})}function me(){"/mail"!==location.pathname&&0!==location.pathname.indexOf("/write")||Bt()}function _e(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=we(e);return e=makeUrl(e),n&&location.pathname+location.search!==e&&nav.go(e,!1,{push_only:!0,replace:!0===t.replace}),n}function ve(){var e=store.mail.cur.query;_e("/mail?q=".concat(e,"&tab=messages"))}function ye(e){var t=ye;if(t.timer&&clearTimeout(t.timer),store.mail.cur){var n=store.mail.cur,a=!n.query;if(e){var i="msgs"===n.tab?"&tab=messages":"",r=makeUrl("/mail?q=".concat(e)+i);we(r),a?_e(r):t.timer=setTimeout(function(){_e(r,{replace:!0})},300)}else _e("/mail",{replace:!0})}}function be(){v.Messenger.setMainLoading(!1),v.Messenger.setConvoLoading(!1),ye.clearTimer(),_e("/mail",{replace:!0})}function we(e){var t=(e=makeUrl(e)).split("?"),n=t[0],a=qs2obj(t[1]),i=store.mail,o=i.cur,s=i.scraps;if(o){var l=a.act,c=a.peer,u=a.chat,d=a.email,f=a.m,p=toInt(a.msg)||toInt(a.id)||null,A="messages"===a.tab?"msgs":"peers",_=a.q||"",g=+a.community||0;if(Ze())return!0;if("/mail"!==n||"add_to_chat"===l||"flush_history"===l||"info"===l||"unpin"===l||"leave_chat"===l||"new_chat"===l||"chat_preview"===l||"return_to_chat"===l||"show_medias"===l||"toggle_community_block"===l||"community_toggle_important"===l||"ban_user"===l||"community_mark_answered"===l||"invite_link"===l||"reset_link"===l||"send"===l||"show"===l&&a.id||70==f||71==f||76==f||784==f||783==f||786==f||785==f||787==f)return clog("[mail nav] Exit Mail"),void Lt();if((o.groupId?-o.groupId:0)===g){p&&(R=!0),m.default.clearSystemMessage2();var y=c?toInt(c):u?toInt(u)+2e9:d?-toInt(d)-2e9:null,b="unread"===l||"important"===l||"unrespond"===l?l:"all",w=function(e){switch(e){case"template":case"mrs":case"msg":return!0}return!1}(l),E=!w&&!!o.page,k=o.query!==_||o.tab!==A;o.page;if(E&&(o.page=null),k&&y&&("peers"===o.tab?store.mail.cur.mvk_entrypoint="conversations_search":"msgs"===o.tab&&(store.mail.cur.mvk_entrypoint="message_search")),o.peerId&&!y&&_)clog("[mail nav] Peer back to Search"),o.query=_,o.peerId=null,o.tab=A,Ce(),v.Messenger.setQuery(_),De();else if(k&&o.peerId===y)o.query=_,o.tab=A,s.search=[],o.tab!==A&&(store.mail.reached.search.msgs={}),v.default.redrawView(),v.Messenger.setQuery(_),m.default.redrawSearch(),_?(clog("[mail nav] Search update"),De()):(clog("[mail nav] Search exit"),function(){var e=store.mail,t=e.cur,n=e.scraps;t.query="",t.tab="peers",n.search=[],v.default.redrawView(),m.default.redrawSearch(),v.Messenger.setQuery("")}(),0===s.folder.length&&Te());else if(w)clog("[mail nav] Enter Page: "+l),o.page=l,o.peerId&&(o.peerId=null,Ce()),o.backUrl=Rt({peerId:y}),v.default.redrawView(),function(e){var t=store.mail.cur,n=v.Messenger.getPageLayer();"mrs"===t.page&&store.mail.mrs?(store.mail.scraps.mrs=store.mail.rolls.mrs.concat(),n.classList.toggle("messenger__layer_loading",!1),n.innerHTML=r.default.html((0,h.default)({count:t.countMR}))):(n.classList.toggle("messenger__layer_loading",!0),n.innerHTML=(0,v.Messenger_renderLoadingPage)(),ajaxRequest(e,{},function(e,t){t&&storeMethods.injectMail(t),n.classList.toggle("messenger__layer_loading",!1),n.innerHTML=e}))}(e);else{if(o.peerId&&o.peerId===y)return!0;o.peerId!==y||E&&y?y?(clog("[mail nav] Enter Dialog"),o.backUrl=Rt({peerId:y}),Se(y,p)):(clog("[mail nav] Exit Dialog"),Ce(),Ee(b),v.Messenger.getMainBody().scrollTop=0,Te()):y&&f?(clog("[mail nav] Peer System Msg"),store.mail.peers[y].systemMessageCode=toInt(f),m.default.updateClass("peer"),m.default.redrawSystemMessage(),v.Messenger.scrollConvoToBottom()):(o.folder!==b||E&&b)&&(clog("[mail nav] Enter Folder"),Ee(b),v.Messenger.getMainBody().scrollTop=0,Te())}return!0}}}function Ee(e){var t=store.mail,n=t.cur,a=t.scraps,i=t.rolls;n.folder=e,ke()?Ae():(a.folder=first(20,i.folder[e]),m.default.folderSetItems(a.folder),v.default.redrawView(),f.default.redraw())}function ke(){var e=store.mail,t=e.rolls,n=e.cur,a=e.msgs,i=t.folder[n.folder];return!i||("important"===n.folder?i.some(function(e){return!a[e]}):i.some(function(e){return!(t.peer[e]&&t.peer[e].length>0)}))}function Se(e,t){var n=store.mail,a=n.cur,r=n.msgs,o=n.peers,s=n.scraps,l=n.rolls,c=n.reached;if(o[e]){var h=l.peer[e]||[];if(t||!(o[e].countUnread>1)||o[e].isIncomingMR||o[e].isRejectedMR){a.peerId=e,s.peer=[],yt(),t?(s.peer=[t],l.peer[e]=[],c.peer.before[e]=!1,c.peer.after[e]=!1):(s.peer=last(20,h),A()),store.mail.reached.peer.after[e]=!0,m.default.updateClass("peer"),v.default.redrawView(),v.Messenger.redrawConvoLayer(),St(),f.default.startStatusUpdate(),m.default.peerSetItems(s.peer),z(),C.ready().then(function(){d.default.init()}),t||Me(e);o[e];t&&(m.default.updateClass("peer"),v.default.scrollToMsg(t)),t?Ie(t):Ie(),(0,D.resizePosters)(),requestAnimationFrame(function(){t||(v.Messenger.scrollConvoToBottom(),C.ready().then(function(){v.Messenger.scrollConvoToBottom()})),AudioMessagePlayer.redrawWaves(),requestAnimationFrame(function(){t||v.Messenger.scrollConvoToBottom()})})}else{v.Messenger.setConvoLoading(!0),window._preventedCheckTop=!0,R=!0,a.peerId=e,s.peer=[],yt(),u.default.redrawUnread(e),v.default.redrawView(),v.Messenger.redrawConvoLayer(),St(),f.default.startStatusUpdate(),A(),m.default.peerSetItems([]),z(),C.ready().then(function(){d.default.init()});var p={act:"show",peer_id:e,msg:"unread",reply_msg_id:a.msgReply[a.peerId]};ajaxRequest("/mail",p,function(t,n,a){if(store.mail.cur){var o=t.rolls.peer[e];if(storeMethods.injectMail(t),c.peer.after[e]=n,c.peer.before[e]=a,h=l.peer[e]||[],((0,i.arrayIntersects)(o,h)||n&&0===h.length)&&(l.peer[e]=h.concat(o).filter(unique).sort(asc)),store.mail.cur.peerId===e){d.default.preventShowToBottom(),s.peer=o.slice(),geByClass1("mailScrap__items_peer").innerHTML="",m.default.updateClass("peer"),m.default.peerSetItems(o),AudioMessagePlayer.redrawWaves(),Me(e);var u=o.find(function(e){return r[e].isUnread});v.default.scrollToMsg(u,!0,!1),requestAnimationFrame(function(){window._preventedCheckTop=!1,R=!1,v.Messenger.setConvoLoading(!1)})}}})}}else ajaxRequest("/mail",{act:"get_peers",peer_ids:[e]},function(n){storeMethods.injectMail(n),o[e]?Se(e,t):window.location.reload()});function A(){a.forwardFromId&&(dt(),a.forwardFromId=null)}}function Ce(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=store.mail,n=t.cur,a=t.scraps;f.default.cancelStatusUpdate(),Tt(),n.peerId=null,n.mvk_entrypoint="",a.peer=[],yt(),n.hasAttachments=!1,e.keepSelected||(n.msgSelected={}),v.default.redrawView(),f.default.redraw(),d.default.reset(),v.Messenger.cleanConvoBody(),U(),requestAnimationFrame(function(){s.default.setCount(0),v.default.redrawMailActions(),p.default.redraw(),requestAnimationFrame(function(){m.default.peerSetItems(a.peer)})})}function Me(e){M.addAction("read_dialog".concat(e),function(){!function(e){var t=store.mail.peers;if(!t)return;var n=t[e];if(n&&(n.isIncomingMR||n.isRejectedMR))return;!n||n.countUnread>0?ajaxRequest("/mail",{act:"read_dialog",peer_id:e,hash:n.hashRead},function(){Xe(null,e)}):setTimeout(function(){Xe(null,e)},500)}(e)})}function Pe(e,t){M.addAction("read_dialog".concat(t),function(){!function(e,t){var n=store.mail.peers;if(!n)return;Xe(null,t),ajaxRequest("/mail",{act:"read_message",msg_id:e,peer_id:t,hash:n[t].hashRead},function(){})}(e,t)})}function Te(){var e=Te,t=e.locked||(e.locked={}),n=store.mail,a=n.cur,i=n.scraps,r=n.rolls,o=n.reached,s=a.folder,l=i.folder,c=r.folder[s],u="folder_".concat(s),d=o.folder[s]&&last(l)===last(c);if(v.Messenger.setMainLoading(0===l.length&&!d),!t[u]&&!d){var h="important"===s,p=ke(),A=h?desc:gt,_=[];if(0===l.length)_=first(20,c);else{var g=c.indexOf(last(l));_=g>=0?c.slice(g+1,g+21):[]}if(_.length&&!p){var y=l.concat(_).filter(unique).sort(A);i.folder=y,m.default.folderAddItems(_)}else{t[u]=!0;var b="all"===s?null:s,w=p?0:l.length;ajaxRequest("/mail",{act:b,offset:w},function(e,n){if(store.mail.cur){storeMethods.injectMail(e),Object.keys(e.peers).forEach(function(e){store.mail.reached.peer.after[e]=!0}),"all"!==s&&"unread"!==s||Object.keys(e.msgs).forEach(function(t){t=toInt(t);var n=e.msgs[t].peerId;r.peer[n]=(r.peer[n]||[]).concat(t).filter(unique).sort(asc)});var d=Object.keys(h?e.msgs:e.peers).map(toInt).sort(A).filter(function(e){return-1===l.indexOf(e)}),_=c.concat(d).filter(unique).sort(A);r.folder[s]=_,n&&(o.folder[s]=n),t[u]=!1,a.folder===s&&(i.folder=_,m.default.updateClass("folder"),m.default.folderAddItems(d),v.Messenger.setMainLoading(!1),p&&(m.default.folderSetItems(i.folder),v.default.redrawView(),f.default.redraw()))}})}}}function De(){var e=De,t=e.locked||(e.locked={}),n=store.mail,a=n.cur,i=n.scraps,r=n.rolls,o=n.reached,s=a.tab,l=a.query,c="search_msgs_".concat(s,"_").concat(l),u=i.search,d=r.search[s][l]||[],f=o.search[s][l]&&last(u)===last(d);if(v.Messenger.setMainLoading(0===u.length&&!f),!t[c]&&!f){var h=[];if("peers"===s&&(d.length||(d=function(){var e=store.mail,t=e.cur,n=e.peers,a=(e.rolls,Object.keys(n).map(toInt)),i=QuickSearch.getQueryREs(t.query),r=[];return i.forEach(function(e){a.forEach(function(t){n[t].title.match(e)&&r.push(t)})}),r.filter(unique).sort(gt)}()),d.length))if(0===u.length)h=first(20,d);else{var p=d.indexOf(u);h=p>=0?d.slice(p+1,p+41):[]}if(h.length&&(i.search=u.concat(h).filter(unique),m.default.redrawSearch(),m.default.updateClass("search"),v.Messenger.setMainLoading(!1)),!h.length||"peers"===s){var A="msgs"===s?{act:"search",q:l,offset:i.search.length,messages:1}:{act:"search",q:l};e.timer&&clearTimeout(e.timer),e.timer=setTimeout(function(){t[c]=!0,ajaxRequest("/mail",A,function(e,n){if(store.mail.cur){t[c]=!1,storeMethods.injectMail(e);var u=Object.keys("peers"===s?e.peers:e.msgs).map(toInt),f="peers"===s?gt:desc,h=d.concat(u).filter(unique).sort(f);r.search[s][l]=h,n&&(o.search[s][l]=n),a.tab===s&&a.query===l&&(v.Messenger.setMainLoading(!1),i.search=i.search.concat(u).filter(unique).sort(f),m.default.redrawSearch(),m.default.updateClass("search"))}})},300)}}}function Ie(e){if(!$(".load_before_closed")){var t=Ie,n=t.locked||(t.locked={}),a=store.mail,r=a.cur,o=a.scraps,s=a.rolls,l=a.reached;if(r){var c=r.peerId,u=o.peer,f=s.peer[c]||[],h="peer_before_".concat(c),p=l.peer.before[c]&&u[0]===f[0],A=r.msgReply[c];if(v.Messenger.setConvoLoading(u.length<1&&!p),!n[h]&&!p){var _=v.Messenger.getConvoBody(),g=!(0,i.arrayIntersects)(u,f),y=first(u),b=y?f.indexOf(y):-1,w=0===u.length?last(10,f):b>=0?f.slice(b-20,b):[];if(w.length&&!e){if(_.scrollTop>6e3&&!g)return;if(window._preventedCheckTop)return;var E=o.peer.slice(),k=u.concat(w).filter(unique).sort(asc);o.peer=k,m.default.peerAddItemsBefore(w.filter(function(e){return-1===E.indexOf(e)})),AudioMessagePlayer.redrawWaves(),m.default.updateClass("peer"),v.Messenger.setConvoLoading(!1)}else{if(!c)return;var S={act:"show",peer_id:c,msg:u[0],direction:e?"around":"before",reply_msg_id:A},C=u[0];n[h]=!0,ajaxRequest("/mail",S,function(t,a,r){if(store.mail.cur){e&&setTimeout(function(){R=!1},10),n[h]=!1,t.peers=[],storeMethods.injectMail(t);var p=Object.keys(t.msgs).map(toInt).filter(function(e){return-1===u.indexOf(e)}),A=u.concat(p).filter(unique).sort(asc);if(r&&(l.peer.before[c]=!0),a&&(l.peer.after[c]=!0),f=s.peer[c]||[],((0,i.arrayIntersects)(A,f)||r&&0===f.length)&&(s.peer[c]=(s.peer[c]||[]).concat(A).filter(unique).sort(asc)),store.mail.cur.peerId===c){if(d.default.preventShowToBottom(),_.scrollTop>6e3&&!g)return;var y=o.peer.slice();o.peer=A,m.default.updateClass("peer"),C?(m.default.peerAddItemsBefore(p.filter(function(e){return-1===y.indexOf(e)&&eC}),!0)):m.default.peerAddItemsBefore(p,!0),e&&(v.default.scrollToMsg(e),v.Messenger.setConvoLoading(!1)),AudioMessagePlayer.redrawWaves(),v.Messenger.setConvoLoading(!1),null!=t.flags.stickersAutoplay&&StickersSettings.setAutoplay(t.flags.stickersAutoplay),v.default.expandPeerBefore(),setTimeout(v.default.expandPeerBefore,100),e&&dt(),d.default.redrawReply()}}})}}}}}function xe(){var e=xe,t=e.locked||(e.locked={}),n=store.mail,a=n.cur,r=n.scraps,o=n.rolls,s=n.reached;if(!R&&a){var l=a.peerId,c=r.peer,u=o.peer[l]||[],d="peer_after_".concat(l);if(!(t[d]||s.peer.after[l]&&last(c)===last(u))){var f=v.Messenger.getConvoBody(),h=!(0,i.arrayIntersects)(c,u),p=function(){return f.scrollHeight-f.scrollTop-f.offsetHeight},A=last(c),_=A?u.indexOf(A):-1,g=_>=0?u.slice(_+1,_+21):[];if(!g.length||nav.getQuery("msg")||nav.getQuery("id")){if(!l)return;var y={act:"show",peer_id:l,msg:last(c),direction:"after"};t[d]=!0,ajaxRequest("/mail",y,function(e,n){if(store.mail.cur){t[d]=!1,e.peers=[],storeMethods.injectMail(e);var a=Object.keys(e.msgs).map(toInt).filter(function(e){return-1===c.indexOf(e)}).sort(asc),f=c.concat(a).filter(unique).sort(asc);if(n&&(s.peer.after[l]=n),u=o.peer[l]||[],((0,i.arrayIntersects)(f,u)||n&&0===u.length)&&(o.peer[l]=(o.peer[l]||[]).concat(f).filter(unique).sort(asc)),store.mail.cur.peerId===l){if(p()>6e3&&!h)return;n&&m.default.updateClass("peer"),r.peer=f,m.default.updateClass("peer"),m.default.peerAddItemsAfter(a),AudioMessagePlayer.redrawWaves()}}})}else{if(p()>6e3&&!h)return;var b=c.concat(g).filter(unique).sort(asc);r.peer=b,m.default.peerAddItemsAfter(g),m.default.updateClass("peer"),AudioMessagePlayer.redrawWaves()}}}}ye.clearTimer=function(){self=ye,self.timer&&(clearTimeout(self.timer),self.timer=null)};var Oe=!1;function Be(e){var t=store.mail,n=t.cur,a=t.scraps,i=t.rolls,r=e.scrollTop,o=e.scrollHeight,s=e.offsetHeight;if(n)if(!n.query&&r<=20&&a.folder.length){if(Oe){Oe=!1;a.folder.slice();a.folder=first(20,i.folder[n.folder]),m.default.folderCutItems(20)}}else r>20&&(Oe=!0,o-r-se._prevScroll-5||n.peerId&&r[n.peerId].countUnread?d.default.showToBottom():d.default.hideToBottom();e._prevScroll=l}(e)},50))}function Ne(e){for(var t=0,n=e.attaches.length;t/g,"\n").replace(b.MENTION_DOMAIN_REGEXP,"@$3").replace(b.MENTION_REGEXP,"@$1 ($3)"));t=e.replaced?!!m&&m.edited:!!e.edited;var v=o,y=o;y=(0,b.wrapLinks)(y,l),y=(0,b.wrapMention)(y),y=(0,g.emojiToHTML)(y);var w=e.keyboard;w=w&&w.inline?(0,b.prepareKeyboard)({keyboard:w,authorId:i,msgId:a}):null;var E={id:a,peerId:n,authorId:i,ts:s,date:A,dateShort:A,text:y,textInput:_,body:v,isUnread:!m||m.isUnread,edited:t,canEdit:Ne(e),isOut:r,isService:u,keyboard:w,attaches:{},forwards:[],hasReply:!!e.hasReply};c&&(E.adminName=c===f.userId?lang.mobile_mail_you:p[c].name,E.adminUrl=p[c].url);return E}(e);storeMethods.injectMsg(M),Fe(M,{isStealth:l,isReplace:w})}function Fe(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=t.isStealth,a=t.isServerMsg,r=t.isReplace,o=t.existingElem,s=store.mail,l=s.cur,c=s.peers,h=(s.msgs,s.members,s.rolls),_=s.scraps,g=s.reached,b=e.peerId,w=(e.keyboard,e.authorId),E=e.isOut,k=e.id,S=!E,C=c[b]&&0===c[b].countUnread&&S,M=r||!!e.edited,P=c[b],T=P.isIncomingMR,D=P.isRejectedMR,I=v.Messenger.getConvoBody(),x=!1;if(e.isUnread&&(x=l.viewerId===b||l.peerId===b&&S&&I.scrollHeight-I.scrollTop-I.offsetHeight<400&&!!$(".mailScrap_reachedAfter")),x&&S&&!T&&!D&&Pe(k,b),!M){var O=last(h.peer[b]||[]);h.peer[b]=(h.peer[b]||[]).concat(k).filter(unique).sort(asc),n||T||D||(h.folder.all=h.folder.all.concat(b).filter(unique).sort(gt),g.peer.after[b]||(g.peer.after[b]=!0,g.peer.before[b]=!1));var B=c[b];if(S&&(b===l.peerId&&d.default.renderKeyboardIfNeeded({update:!0}),n||(T||D||(h.folder.unread=h.folder.unread.concat(b).filter(unique).sort(gt)),a||(B.countUnread||(B.countUnread=0),B.countUnread+=1)),b!==l.peerId&&n||d.default.redrawToBottom()),!n&&!T&&!D)if(C&&(l.countUnread+=1,f.default.redrawCounter()),l.groupId&&(S?h.folder.unrespond=h.folder.unrespond.concat(b).filter(unique).sort(gt):(0,i.arrayRemove)(h.folder.unrespond,b)),"all"===l.folder){var L=_.folder.slice();_.folder=_.folder.concat(b).filter(unique).sort(gt),m.default.redrawFolder(L)}else if("unread"===l.folder&&w!==l.viewerId){var R=_.folder.slice();_.folder=_.folder.concat(b).filter(unique).sort(gt),m.default.redrawFolder(R)}else if("unrespond"===l.folder){var N=_.folder.slice();S?_.folder=_.folder.concat(b).filter(unique).sort(gt):(0,i.arrayRemove)(_.folder,b),m.default.redrawFolder(N)}if(T&&(h.mrs=h.mrs.concat(b).filter(unique).sort(gt),"mrs"===l.page)){var j=_.mrs.slice();_.mrs=_.mrs.concat(b).filter(unique).sort(gt),m.default.redrawMRs(j)}if(l.peerId!==b||!(0,i.arrayIntersects)(_.peer,h.peer[b])&&0!==_.peer.length||last(_.peer)!==O)o&&o.remove();else{_.peer.slice();_.peer=_.peer.concat(k).filter(unique).sort(asc);var F=He(function(){o?m.default.peerAddElemAfter(k,o):m.default.peerAddItemsAfter([k])});S&&!F&&d.default.showToBottom(),w===l.viewerId&&m.default.removeDivider()}var H=(0,A.uTyping_getPeerTyping)(b);H&&H.users.length&&((0,y.removePeerTypingUser)(b,w),b===l.peerId&&p.default.redraw(),u.default.redrawTyping(b))}var V=k===(0,u.uConvo_getLastMsgId)(b);M&&(V?He(function(){return m.default.peerReplaceItems([k])}):m.default.peerReplaceItems([k])),!n&&V&&(u.default.redrawLastMsg(b),u.default.redrawUnread(b),StickersAnimation.checkSettingsAndLoad(e.id)),b===l.peerId&&AudioMessagePlayer.redrawWaves()}function He(e){var t=v.Messenger.getConvoBody(),n=t.scrollTop+t.offsetHeight>=t.scrollHeight-2;e();var a=t.scrollHeight-t.scrollTop-t.offsetHeight<400;return n&&v.Messenger.scrollConvoToBottom(),a}function Ve(){if(store.mail.cur){var e=store.mail.cur.backUrl;if(store.mail.cur.backUrl=null,U(),e)history.back();else _e(function(){var e=store.mail.cur;if("mrs"===e.page)return"/mail";if("template"===e.page){var t=nav.getQuery("from");return"/mail?act=show&peer=".concat(t)}return e.tab?"/mail":(e.peerId,"/mail")}(),{replace:!0})}}function Ue(){var e=store.mail.cur,t=e.msgSelected,n=e.forwardFromId;e.forwardFromId=null,Object.keys(t).forEach(function(e){delete t[e]}),o.default.unselectAll(),v.default.redrawMailActions(),n&&Se(n)}var ze={};function We(e,t,n){var a=store.mail,i=a.cur,r=a.peers,o=r?r[e]:null;if(o&&!o.isIncomingMR&&!o.isRejectedMR){var s=(0,y.filterPeerTypingUser)({type:"text",users:t,count:n},i.viewerId);(0,y.setPeerTyping)(e,s);var l=ze[e];l&&clearTimeout(l),s.count&&s.users.length&&(ze[e]=setTimeout(function(){ze[e]=null,We(e,[],0)},7e3),Ft(s.users,e)),e===i.peerId&&p.default.redraw(),u.default.redrawTyping(e)}}var qe,Ge,$e={};function Ye(e,t,n){var a=store.mail,i=a.cur,r=a.peers;if(r?r[e]:null){var o=(0,y.filterPeerTypingUser)({type:"audio",users:t,count:n},i.viewerId);(0,y.setPeerTyping)(e,o);var s=$e[e];s&&clearTimeout(s),o.count&&o.users.length&&($e[e]=setTimeout(function(){$e[e]=null,Ye(e,[],0)},7e3),Ft(o.users,e)),e===i.peerId&&p.default.redraw(),u.default.redrawTyping(e)}}function Qe(e){var t=e.userId,n=e.isOnline,a=e.onlinePlatform,i=e.lastActionTime,r=store.mail,o=r.cur,s=r.peers[t];s&&s.canSeeOnline&&(s.isOnline=n,e.isOnline&&(s.onlinePlatform=a),i&&(s.lastActionTime=i),u.default.redrawOnline(t),o.peerId===t&&f.default.redrawOnline())}function Xe(e,t){var n=store.mail,a=n.cur,r=n.peers,s=n.msgs,l=n.scraps,c=n.rolls;if(a){var h=a.peerId===t?l.peer:[],p=c.peer[t]||[],A=r[t];if(p.concat(h).forEach(function(e){var t=s[e];t&&t.isUnread&&t.authorId!==a.viewerId&&(delete t.isUnread,o.default.markAsRead(e))}),A?A.countUnread&&(a.countUnread-=1,A.countUnread=0):a.countUnread-=1,(0,i.arrayRemove)(c.folder.unread,t),"unread"===a.folder){var _=l.folder.slice();(0,i.arrayRemove)(l.folder,t),m.default.redrawFolder(_)}f.default.redrawCounter(),d.default.redrawToBottom(),u.default.redrawUnread(t)}}function Ke(e,t){var n=store.mail,a=n.cur,i=n.msgs,r=n.rolls,s=n.scraps,l=r.peer[t]||[];if(i[e])for(var c=l.indexOf(e);c>=0;){var d=i[l[c]];d.authorId===a.viewerId&&d.isUnread&&(delete d.isUnread,o.default.markAsRead(d.id)),c--}else last(l)&&e<=last(l)&&l.forEach(function(e){var t=i[e];t.authorId===a.viewerId&&t.isUnread&&(delete t.isUnread,o.default.markAsRead(t.id))});a.peerId===t&&s.peer.forEach(function(e){var t=i[e];t.authorId===a.viewerId&&t.isUnread&&(delete t.isUnread,o.default.markAsRead(t.id))}),u.default.redrawUnread(t)}function Je(){if(Ze())return!0;var e=store.mail.cur;if(e&&(e.backUrl=null),e&&e.forwardFromId)return Ue(),!0;a.default.safari_mobile&&document.activeElement.blur();var t=qs2obj(location.search.slice(1)).act;if(!$(".uMessenger")&&"/mail"===location.pathname&&"show_medias"!==t)return nav.go(location,null,{no_push:!0,need_restore:!1}),!0;var n=new RegExp(/z=photo/).test(location.search);if($(".uMessenger")&&!n&&!ge("z_photoview")&&!ge("StoriesView")){var i=we(location.pathname+location.search);return i&&nav.go(location.pathname+location.search,null,{no_push:!0,push_only:!0}),i}}function Ze(){var e=Ze;if(mediaUpload.isUploading)return e.noAlert||alert(unescapeAttr(lang.mobile_mail_wait_until_uploaded)),e.noAlert=!0,setTimeout(function(){e.noAlert=!1},10),!0}function et(e,t,n){var a=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{},i=store.mail.cur;if(!("/mail"===n&&i&&i.groupId||a.replace))return!t.m&&geByClass1("uMessenger")?_e(n):void 0}function tt(){window.isNewMail&&(store.mail.cur?"/mail"!==location.pathname&&0!==location.pathname.indexOf("/write")?Lt():Bt():ye.clearTimer())}function nt(){var e=store.mail,t=e.cur,n=(e.msgs,e.peers),a=e.hash,i=t.msgSelected,r=toInt(Object.keys(i)[0]),s=n[t.peerId];t.hasAttachments=!1,t.msgSelected={},s.pinnedMsgId=r,s.hasPinnedMsg=!0,o.default.unselectAll(),v.default.redrawMailActions(),ajaxRequest("/mail?act=pin",{hash:a.pin,chat:nav.getQuery("chat")||store.mail.cur.peerId-2e9,msg:r,_ajax:1})}function at(){var e,t=store.mail,n=t.cur,a=t.msgs,i=(t.peers,t.hash),r=(t.replies,t.pendingReplies,n.msgSelected),o=toInt(Object.keys(r)[0]),s=n.peerId,l=(0,y.getPeerDraft)(n.viewerId,n.peerId),c=a[o],u=function(e){c.hasReply||l&&l.editing&&l.editing.id==o&&l.msgs&&(n.msgAttached[s]=l.msgs),c.hasReply?n.msgReply[s]=c.reply:n.msgReply[s]=null,d.default.redrawReply(),d.default.onAttachedMsgsRemove(),d.default.uiRedrawAttachments(s),d.default.setModifiers({editing:!0}),f.default.setModifiers({editing:!0}),v.default.redrawMailActions(),it(),d.default.setText(e)};if(n.editing==o)return e=l&&l.editing&&l.editing.id==o?l.editing.text||"":c.textInput,void u(e);n.editing=o,Dt(),ajaxRequest("/mail?act=edit_message_start",{hash:i.edit,edit_msg_id:o,peerId:s,_ajax:1},function(e,t){(0,y.pushPeerAttachments)(n.peerId,e),u(t)})}function it(){var e=store.mail.cur.msgSelected;Object.keys(e).forEach(function(t){delete e[t]}),o.default.unselectAll(),s.default.setCount(0),v.default.redrawMailActions()}function rt(){var e=store.mail,t=(e.msgs,e.cur),n=Object.keys(t.msgSelected).every(ot);1!==Object.keys(t.msgSelected).length||n?l.default.open({canDeleteForAll:n}):lt()}function ot(e){var t=store.mail,n=t.msgs,a=(t.cur,t.peers),i=vk.id,r=n[e],o=nav.getQuery().community,s=a[r.peerId];return!!r&&(r.authorId!==i&&r.authorId!==-o?s.isAdmin&&-1===s.adminIds.indexOf(r.authorId):!(r.peerId===i&&!o)&&(333!==r.peerId&&(!(Date.now()/1e3-r.ts>86400)&&!(s.kicked||s.closed||s.unableToWrite||s.kickedMessage))))}function st(){var e=store.mail.cur.editing;e?(!function(e){var t=store.mail,n=t.cur,a=(t.hash,t.msgs,t.peers),i=n.peerId;ae(e),ajaxRequest("/mail",{act:"delete_for_all",peer:i,ids:e+"",hash:a[i].hashRemove},function(){}),v.default.redrawMailActions()}(e),Tt(!0)):lt(!1,l.default.isDeleteMessagesForAll()),l.default.close()}function lt(){var e=arguments.length>0&&void 0!==arguments[0]&&arguments[0],t=arguments.length>1&&void 0!==arguments[1]&&arguments[1],n=store.mail,a=n.cur,i=(n.hash,n.msgs,n.peers),r=a.peerId,s=a.msgRemoved,l=a.msgSelected,c=Object.keys(l);c.forEach(function(n){delete l[n=+n],t?ae(n):(s[n]=!e||"spam",e?o.default.spam(n):o.default.remove(n))}),ajaxRequest("/mail",{act:t?"delete_for_all":e?"spam":"delete",peer:r,ids:c.join(","),hash:i[r].hashRemove},function(){}),v.default.redrawMailActions()}function ct(){lt(!0)}function ut(){var e=store.mail,t=e.cur,n=e.hash,a=e.msgs,i=t.msgSelected,r=Object.keys(i),s=r.some(function(e){return!a[e].isImportant})?1:0;r.forEach(function(e){delete i[e],a[e].isImportant!=!!s&&(s?t.countImportant++:t.countImportant--),a[e].isImportant=!!s,o.default.toggleImportant([e],!!s)}),ajaxRequest("/mail",{act:"mark_important",ids:r,hash:n.important,val:s},function(){}),o.default.unselectAll(),v.default.redrawMailActions()}function dt(){var e=store.mail.cur,t=e.peerId,n=Object.keys(e.msgSelected).map(toInt);e.msgAttached[t]=n,(0,y.setPeerDraft)(e.viewerId,e.peerId,{msgs:n,reply:void 0},e.editing),e.msgReply[t]&&!e.editing&&ajaxRequest("/mail",{act:"reply_cancel",peer_id:store.mail.cur.peerId,hash:store.mail.hash.reply}),e.msgReply[t]=null,e.msgSelected={},o.default.unselectAll(),s.default.setCount(0),d.default.redrawReply(),d.default.uiRedrawAttachments(t),v.default.redrawMailActions()}function ft(){var e=store.mail,t=e.cur,n=e.flags,a=e.pendingReplies,i=t.peerId;if(!(0,b.isContactPeer)(i)){if(!n.replies)return dt();var r=toInt(Object.keys(t.msgSelected)[0]);t.msgReply[i]=r,a[r]=o.default.getReplyDataFromHTML(r),(0,y.setPeerDraft)(t.viewerId,t.peerId,{reply:r,msgs:void 0},t.editing),ajaxRequest("/mail",{act:"reply_start",hash:store.mail.hash.reply,peer_id:store.mail.cur.peerId,msg_id:r}),t.msgAttached[i]=[],t.msgSelected={},o.default.unselectAll(),s.default.setCount(0),d.default.redrawReply(),d.default.uiRedrawAttachments(i),v.default.redrawMailActions(),d.default.openKeyboard("text")}}function ht(){var e=store.mail.cur;e&&((0,b.isContactPeer)(e.peerId)||(e.forwardFromId=e.peerId,e.query="",e.tab="peers",v.Messenger.setQuerySilently(""),Ce({keepSelected:!0}),Ee("all"),v.Messenger.getMainBody().scrollTop=0,Te()))}function pt(e){if(store.mail.cur){var t=store.mail,n=t.cur,a=t.peers,i=t.msgs,r=t.flags,o=n.msgRemoved,l=n.msgSelected,c=a[n.peerId];if(d.default.hideStickersPanel(),!o[e]){l[e]?delete l[e]:l[e]=!0;var u=Object.keys(l),f=u.length,h=1===f&&u[0]==a[n.peerId].pinnedMsgId,p=u.reduce(function(e,t){return e&&i[t].isImportant},!0);s.default.setCount(f),s.default.setModifiers({pinned:h,important:p}),s.default.setLabels({pinned:h,important:p}),(0,b.isContactPeer)(n.peerId)?s.default.toggleQuickButtons(!1):s.default.toggleQuickButtons(!0),r.replies&&(1!==f||c.isIncomingMR?s.default.setReplyAvailable(!1):s.default.setReplyAvailable(!0));var A=toInt(Object.keys(l)[0]),m=1==f&&i[A];if(s.default.setEditAvailable(m&&m.canEdit&&!c.unableToWrite),s.default.setImportantAvailable(f>0&&n.viewerId>0),c.canPin){var _=toInt(Object.keys(l)[0]);s.default.togglePin(1===f&&_!==c.pinnedMsgId)}else s.default.togglePin(!1);v.default.redrawMailActions()}}}function At(e){var t=store.mail,n=t.cur,a=t.hash,i=t.msgs[e],r="spam"===n.msgRemoved[e]?"nospam":"restore";delete n.msgRemoved[e],o.default.restore(e),ajaxRequest("/mail",{act:r,id:e,hash:a.restore},function(){}),i.isImportant&&(n.countImportant++,te(e)),m.default.redrawFolder()}function mt(e,t,n){var a=store&&store.mail&&store.mail.cur;if(a&&e){var i=store.mail.forwards[n];if(i.peerId&&i.peerId===a.peerId&&!a.msgRemoved[e])v.default.scrollToMsg(e)||ajaxRequest("/mail",{act:"get_msgs",msgs:[e]},function(a){storeMethods.injectMail(a);var i=store.mail,r=i.msgs,o=i.cur;o.peerId&&(r[e]?Se(o.peerId,e):_t(e,t,n))});else _t(e,t,n)}else _t(e,t,n)}function _t(e,t,n){if(t){var a=nav.getQuery();"show"===a.act&&(a.msg=t,nav.go(location.pathname+obj2qs(a),!1,{replace:!0,push_only:!0}))}var i=(0,o.Msg_makeReplyLink)(e,t,n);nav.go(i,null,{force:!0})}function vt(e){var t,n,a,i=store.mail.cur;i&&(i.msgSelected=(a=!0,(n=e)in(t={})?Object.defineProperty(t,n,{value:a,enumerable:!0,configurable:!0,writable:!0}):t[n]=a,t),statlogsValueEvent("messages_channel_forward_click",0),ht())}function gt(e,t){var n=store.mail,a=n.rolls,i=n.presend,r=n.msgs,o=a.peer[e]||[0],s=a.peer[t]||[0],l=Vt(i.pending[e],function(e){return-1===e.indexOf("edit")}),c=Vt(i.pending[t],function(e){return-1===e.indexOf("edit")}),u=last(o),d=last(s),f=Math.max(l?i.msgs[l].ts:0,u?r[u].ts:0);return Math.max(c?i.msgs[c].ts:0,d?r[d].ts:0)-f}function yt(){if(store.mail.cur){var e=!!store.mail.cur.peerId;$$(".vk__page_mail").forEach(function(t){return t.classList.toggle("messenger_noPullToRefresh",e)})}}function bt(){var e=store.mail.cur.peerId,t=$(".pinnedMsg");if(t){Number(t.dataset.id);var n=Mt();delete n[e],Pt(n),St()}}function wt(){var e=store.mail.cur.peerId,t=$(".pinnedMsg");if(t){var n=Number(t.dataset.id),a=Mt();a[e]=n,Pt(a),St()}}function Et(e,t){var n=store.mail,a=n.cur,i=n.peers[a.peerId];ajaxRequest("/mail",{act:"banner_callback",hash:i.hashBanner,peer_id:a.peerId,callback_data:t}),N=Date.now(),i.banner=null,v.default.redrawBanner()}function kt(e){var t=$(".messenger__banner_content");t&&t.classList.toggle("messenger__banner_contentExpanded")}function St(){var e=store.mail,t=e.cur;e.peers;if(t){var n=t.peerId;if(n){var a=$(".pinnedMsg"),i=Mt()[n],r=a?intval(a.dataset.id):null;v.default.setPinnedVisibility(r&&i!==r)}}}function Ct(){if(store.mail.cur&&store.mail.cur.peerId){var e=$(".pinnedMsg");if(e)if(!Number(e.dataset.id)){var t=store.mail.cur.peerId,n=Mt();delete n[t],Pt(n)}}}function Mt(){return lsGet("messenger.pinHidden")||{}}function Pt(e){lsSet("messenger.pinHidden",e)}function Tt(e){var t=store.mail.cur;if(t&&t.editing){t.editing=!1,Dt(),!0!==e&&ajaxRequest("/mail?act=edit_message_cancel",{peerId:t.peerId}),(0,y.popPeerAttachments)(t.peerId),(0,y.setPeerDraft)(t.viewerId,t.peerId,{});var n=(0,y.getPeerDraft)(t.viewerId,t.peerId);t.msgAttached[t.peerId]=n.msgs||[],t.msgReply[t.peerId]=n.reply||null,d.default.setText(n&&n.text||""),d.default.setModifiers({editing:!1}),f.default.setModifiers({editing:!1}),d.default.uiRedrawAttachments(t.peerId),d.default.redrawReply();var a=v.Messenger.getConvoBody();a.scrollTop+a.offsetHeight>=a.scrollHeight-2&&v.Messenger.scrollConvoToBottom()}}function Dt(){var e=nav.getQuery();store.mail.cur.editing?e.edit_msg_id=store.mail.cur.editing||void 0:delete e.edit_msg_id,nav.go(location.pathname+obj2qs(e),!1,{replace:!0,push_only:!0})}function It(){if(store.mail.msgs){var e=+nav.getQuery("edit_msg_id");e&&store.mail.msgs[e]&&(store.mail.cur.msgSelected[e]=!0,at())}}function xt(e){var t=e.closest(".".concat(o.default.class));if(t){var n=o.default.getId(t);store.mail.msgs[n].textFull=o.default.getTextHtml(t)}}function Ot(e){_e(e)}function Bt(){var e;store.mail.cur&&(window.isCustomScroll&&(0,E.restoreDocumentScroll)(),!store.mail.cur&&!store.mail.page||store.mail.cur.peerId||U(),store.mail.cur.peerId&&z(),C.ready().then(jt).then(function(){Ht(),store.mail.cur.peerId&&(d.default.init(),Xe(0,store.mail.cur.peerId)),nav.getQuery("msg")||nav.getQuery("id")||v.Messenger.scrollConvoToBottom()}),im.on(),M.start(),e=qs2obj(location.search.slice(1)),store.mail.cur.mvk_entrypoint=e.mvk_entrypoint||"notifications"===e.from&&"notifications"||"",v.default.startPolling(),addEvent(window,"resize",D.resizePosters),window.ExperimentalBadge&&window.ExperimentalBadge.set(store.mail.cur.countUnread),k.onOpenCallback(qt),k.onCloseCallback(Gt))}function Lt(){if(store.mail.cur){if(k.onOpenCallback(qt),k.onCloseCallback(Gt),!document.body.classList.contains("vk__page_mail"))return im.off(),M.stop(),void storeMethods.resetMail();(0,E.restoreDocumentScroll)(),v.Messenger.cleanConvoBody(),im.off(),M.stop(),v.default.stopPolling(),f.default.cancelStatusUpdate(),m.default.resetPrevScraps(),storeMethods.resetMail()}}function Rt(e){var t=e.peerId,n=store.mail.cur,a=null;if("mrs"===n.page)a="/mail?act=mrs";else if("template"===n.page)a="/mail?act=template";else if("msg"===n.page)a="/mail?act=show=peer=".concat(t);else if(n.forwardFromId&&n.forwardFromId!==t)a="/mail?act=show&peer=".concat(n.forwardFromId);else if(n.query){var i="msgs"===n.tab?"&tab=messages":"";a="/mail?q=".concat(n.query).concat(i)}else if(n.peerId)a="/mail?act=show&peer=".concat(n.peerId);else if(n.folder&&!n.forwardFromId){var r="";"all"!==n.folder&&(r="?act=".concat(n.folder)),a="/mail".concat(r)}return a}function Nt(){var e=store.mail.cur.countMR,t=store.mail.rolls.mrs;store.mail.cur.countMR=0,L=!0,store.mail.rolls.mrs=[],t.forEach(function(e){(0,y.removePeer)(e)}),ajaxRequest("/mail",{act:"mrs_reject",all:!0,hash:store.mail.hash.mrs},function(n){if(n.error)return store.mail.cur.countMR=e,store.mail.rolls.mrs=t,L=!1,void h.default.cancelRejeectLoading();v.default.redrawView(),_e("/mail")},function(){store.mail.cur.countMR=e,store.mail.rolls.mrs=t,L=!1,h.default.cancelRejeectLoading()})}function jt(){store.mail.cur&&(0,y.queueToPresendMsgs)(C.getItems())}function Ft(e,t){var n=store.mail.members;(e=e.filter(function(e){return!n[e]})).length&&(j=j.concat(e),F.push(t),H())}function Ht(){var e=store.mail,t=e.rolls,n=e.scraps,a=e.cur;t.folder.all=t.folder.all.filter(unique).sort(gt),"all"===a.folder&&(n.folder=n.folder.filter(unique).sort(gt),m.default.redrawFolder())}function Vt(e,t){if(!e||!e.length)return null;for(var n=e.length-1;n>=0;n--)if(t(e[n],n))return e[n];return null}function Ut(){im.abortWaiting()}function zt(e){var t=+e.getAttribute("data-msg");if(t&&!(0,b.isForwardedMessageId)(t)&&store.mail.cur){var n=store.mail.msgs[t],a=n&&store.mail.peers[n.peerId];a&&!n.listened&&n.authorId!==store.mail.cur.viewerId&&n.peerId===store.mail.cur.peerId&&(0,b.mailRequest)("/mail",{act:"listen_audiomsg",msg_id:t,hash:a.hashRead})}}function Wt(e,t){c.default.showCaptcha(e,t)}function qt(){qe&&clearTimeout(qe),qe=setTimeout(function(){return addClass($(".messenger__layer_convo"),$t())},200)}function Gt(){qe&&clearTimeout(qe),qe=setTimeout(function(){return removeClass($(".messenger__layer_convo"),$t())},200)}function $t(){return Ge||(Ge="messenger__layer_convo--iosKeyboard",w.isIPad&&w.isIOSChrome&&w.iosMajor>=11&&(Ge="messenger__layer_convo--iosKeyboardChrome"),Ge)}},FZH1:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.MailScrap_EmptyInner=k,t.MailScrap_Item=y,t.MailScrap_ItemsInner=g,t.MailScrap_class=S,t.default=void 0;var a=d(n("bZ/P")),i=d(n("Mc5h")),r=d(n("O5lf")),o=d(n("M2vk")),s=d(n("5qQ6")),l=d(n("/Rzu")),c=d(n("HGMY")),u=d(n("TYsd"));function d(e){return e&&e.__esModule?e:{default:e}}function f(){var e=_(['\n
    \n ","\n
    \n "]);return f=function(){return e},e}function h(){var e=_(['\n
    \n ',"\n
    \n "]);return h=function(){return e},e}function p(){var e=_(['\n
    \n ',"\n
    \n "]);return p=function(){return e},e}function A(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function m(){var e=_(['\n
    \n ',"\n ","\n ","\n ","\n ","\n ","\n ","\n ","\n
    \n "]);return m=function(){return e},e}function _(e,t){return t||(t=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(t)}}))}var v=function(e){var t=e.scrap,n="peer"===t,r=S(t),s=n?E("before"):"",l=E("after"),d=E("center"),p=function(e){var t=a.default.class("mailScrap__items",A({},e,!0)),n=g(e);return(0,i.default)({mix:t,inner:n})}(t),_=function(e){var t=k(e);return a.default.html(h(),e,t)}(t),v=n?(0,o.default)():"",y=n?u.default.html((0,c.default)()):"",b=n?(w=store.mail.cur.notification||"",C=a.default.onClick("MailScrap.clearSystemMessage2"),a.default.html(f(),C,w)):"";var w,C;return a.default.html(m(),r,s,p,_,l,y,v,b,d)};function g(e){for(var t=store.mail,n=t.cur,i=t.msgs,r=t.scraps[e],o=r.length,s=[],l=!1,c=0;c0&&"peer"===e&&!l){var u=i[r[c-1]],d=i[r[c]];if(d.isUnread&&!u.isUnread&&d.authorId!==n.viewerId){l=!0,s.push(y(e,r[c],!0));continue}}s.push(y(e,r[c]))}return a.default.list(s)}function y(e,t){var n=arguments.length>2&&void 0!==arguments[2]&&arguments[2],a=store.mail.cur,i="";if("folder"===e)i="important"===a.folder?b(t):w(t);else if("search"===e){if("peers"===a.tab)i=function(e){return(0,l.default)(e)}(t);else i=b(t)}else if("peer"===e){i=function(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];return(0,s.default)({msgId:e,withDivider:t})}(t,n)}else if("mrs"===e){i=w(t)}return i}function b(e){var t=store.mail.msgs[e].peerId;return(0,l.default)(t,e)}function w(e){return(0,l.default)(e,"last")}function E(e){var t=a.default.class("mailScrap__loading",A({},e,!0)),n=(0,r.default)({mix:""});return a.default.html(p(),t,n)}function k(e){var t=window.lang,n=store.mail.cur,a="";switch(e){case"peer":a=t.mobile_mail_history_is_empty;break;case"mrs":a=t.mobile_mail_mrs_empty_info;break;case"folder":a={all:t.mobile_mail_no_messages,important:t.mobile_mail_no_important,unread:t.mobile_mail_no_unreaded,unrespond:t.mobile_mail_sublist_empty}[n.folder];break;case"search":"msgs"===n.tab&&(a=t.mobile_mail_not_found),"peers"===n.tab&&(a=t.mobile_mail_no_peers)}return a}function S(e){var t,n=store.mail,i=n.cur,r=n.reached,o=!0,s=!1,l=!1,c=!1;if("peer"===e){var u=i.peerId,d=n.scraps.peer,f=d.length,h=n.rolls.peer[u]||[];o=r.peer.before[u]&&d[0]===h[0],s=last(d)===last(h)&&r.peer.after[u],0===f&&(s=!0);var p=u?n.peers[u]:null;p&&(l=!!p.systemMessageCode,p.isChannel&&(c=p.ownerId!==i.viewerId))}else if("mrs"===e)s=r.mrs;else if("folder"===e)s=r.folder[i.folder];else if("search"===e){var m=i.tab;i.query;if("peers"===m){var _=n.scraps.search.length;s=r.search[i.tab][i.query]||_>0}else s=r.search[i.tab][i.query]}return a.default.class("mailScrap",(A(t={},e,!0),A(t,"empty",function(e){var t=store.mail,n=t.cur,a=t.scraps,i=t.reached,r=!1;switch(e){case"peer":var o=n.peerId,s=t.rolls.peer[o];0===(s?s.length:0)&&i.peer.after[o]&&i.peer.before[o]&&(r=!0);break;case"mrs":0===a.mrs.length&&i.mrs&&(r=!0);break;case"folder":0===a.folder.length&&i.folder[n.folder]&&(r=!0);break;case"search":0===a.search.length&&i.search[n.tab][n.query]&&(r=!0)}return r}(e)),A(t,"systemMessage",l),A(t,"reachedBefore",o),A(t,"reachedAfter",s),A(t,"tab","search"===e&&i.tab),A(t,"isChannel",c),t))}t.default=v},FflB:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var a,i=(a=n("Y6JH"))&&a.__esModule?a:{default:a};function r(e,t){return{class:"MarketItem__shopperAccentRow",inner:[{class:"MarketItem__shopperAccentIcon",inner:(0,i.default)("market",e)},{class:"MarketItem__shopperAccentText",inner:t}]}}var o=function(){var e=window.lang;return{inner:[r("delivery_outline_24",e.mobile_market_shopper_accent_delivery),r("money_transfer_outline_24",e.mobile_market_shopper_accent_payment),r("return_outline_24",e.mobile_market_shopper_accent_return)]}};t.default=o},Fhlr:function(e,t,n){"use strict";FeedAssistanceStats.registerTrackingCls("feedAssistance_promoButton"),FeedAssistanceStats.onStartViewElement(function(e){if(FeedAssistanceStats.getElementType(e)===FeedAssistanceStats.BLOCKS.BLOCK_TYPE_PROMO_BUTTON){if(e._promoButtonClickHandlerAdded)return;var t=geByClass1("feedAssistancePromoButtonInstallApp__button",e),n=t?"install_app":"";addEvent(t||e,"click",function(){!function(e,t,n){FeedAssistanceStats.dispatchEvent({type:FeedAssistanceStats.EVENTS.EVENT_PROMO_BUTTON,data:FeedAssistanceStats.serializeEventData(FeedAssistanceStats.EVENTS.EVENT_PROMO_BUTTON_SUB,e,t,n)})}(e,FeedAssistanceStats.EVENTS.SUB_EVENT_PROMO_BUTTON_CLICK,n)}),e._promoButtonClickHandlerAdded=!0}})},G0UO:function(e,t,n){"use strict";var a=Array.isArray,i={mail:{}},r={injectStore:function(e){i.mail={};var t=e.mail,n=t.cur,r=t.rolls,o=t.reached;t.msgs,t.queue;a(e.mail.msgs)&&(e.mail.msgs={}),a(e.mail.replies)&&(e.mail.replies={}),r&&a(r.peer)&&(r.peer={}),r&&a(r.search.peers)&&(r.search.peers={}),r&&a(r.search.msgs)&&(r.search.msgs={}),o&&a(o.search.peers)&&(o.search.peers={}),o&&a(o.search.msgs)&&(o.search.msgs={}),o&&a(o.peer.before)&&(o.peer.before={}),o&&a(o.peer.after)&&(o.peer.after={}),i.mail=e.mail,i.mail.pendingReplies={},i.mail.presend={},n&&(n.msgSelected={},n.msgRemoved={},n.msgAttached={},n.msgReply={},n.keyboards={},n.typings={},n.peerMembers={}),"notificationsCount"in i||(i.notificationsCount=e.notificationsCount)},injectMail:function(e){var t=i.mail,n=e;isObject(n.msgs)&&Object.assign(t.msgs,n.msgs),isObject(n.peers)&&Object.assign(t.peers,n.peers),isObject(n.members)&&Object.assign(t.members,n.members),isObject(n.replies)&&Object.assign(t.replies,n.replies),isObject(n.forwards)&&Object.assign(t.forwards,n.forwards),t.page=n.page,n.mrs&&(t.cur.countMR=n.mrs.count,t.rolls.mrs=n.mrs.rolls,t.reached.mrs=n.mrs.reached,t.scraps.mrs=n.mrs.rolls,Object.keys(n.msgs).forEach(function(e){var a=n.msgs[e],i=a.peerId;t.rolls.peer[i]=[a.id],t.reached.peer.after[i]=!0}),t.mrs=n.mrs)},injectMsg:function(e){var t,n,a;r.injectMail({msgs:(t={},n=e.id,a=e,n in t?Object.defineProperty(t,n,{value:a,enumerable:!0,configurable:!0,writable:!0}):t[n]=a,t)})},resetMail:function(){i.mail={}}};window.storeMethods=r,window.store=i},GDYn:function(e,t,n){"use strict";var a=n("UxAg");window.PostAttachVideoLink={},PostAttachVideoLink._onInit=l,PostAttachVideoLink._onPlayClick=u,PostAttachVideoLink._onReplayClick=u,PostAttachVideoLink._onSoundClick=c,PostAttachVideoLink._onVideoClick=d,PostAttachVideoLink._onVideoPlay=function(e){return f(e.target,"play")},PostAttachVideoLink._onVideoPause=function(e){return f(e.target,"pause")},PostAttachVideoLink._onVideoEnded=function(e){return f(e.target,"end")};var i={muted:"PostAttachVideoLink_muted",state:function(e){return"PostAttachVideoLink_state_".concat(e)}},r={attach:".PostAttachVideoLink",video:".PostAttachVideoLink__video"},o=window.MutationObserver,s=null;function l(){o&&!s&&(s=new o(h)).observe(document.body,{childList:!0,subtree:!0})}function c(e){var t=e.closest(r.attach),n=(0,a.$)(r.video,t);n.muted=!n.muted,t.classList.toggle(i.muted,n.muted)}function u(e){var t=e.closest(r.attach);(0,a.$)(r.video,t).play()}function d(e){e.paused||e.pause()}function f(e,t){var n=e.closest(r.attach);n.classList.remove(i.state("play")),n.classList.remove(i.state("pause")),n.classList.remove(i.state("end")),n.classList.add(i.state(t))}function h(e){e.forEach(function(e){e.removedNodes.forEach(function(e){e.nodeType===HTMLElement.ELEMENT_NODE&&(0,a.$$)(r.video,e).forEach(function(e){e.src="",e.load()})})}),(0,a.$)(r.video)||(s.disconnect(),s=null)}},GLI1:function(e,t,n){"use strict";n("PuTx")},GMrv:function(e,t,n){"use strict";var a,i=(a=n("+cqQ"))&&a.__esModule?a:{default:a},r=n("cGUQ");var o={onUploadedDone:(0,i.default)("resp"),fallback:function(e,t){var n=window.nav,a=e.nextSibling;return!!a&&!n.go(a)},onUploadProgress:function(e){window.photoview.updateUpload({progress:e.loaded/e.total})},onUploadComplete:function(e){var t=window.photoview,n=e.target.responseText,a=!1;try{a=parseJSON(n)}catch(e){a={error:"ERR_CLIENT_BAD_RESPONSE: bad request response"}}if(a.error)o.onUploadError.call(this,e);else{this.xhr=null,this.photo_res=n,this.photo_size=a.size;var i=this.static_url+a.x_src,r=a.size[0],s=a.size[1],l=Math.min(r,s);t.onClose=bind(o.onClose,this),t.openCrop({src:i,max_scale:l/200,onSelect:bind(o.onCropSelected,this)})}},onUploadError:function(e){var t=window.photoview;clog("upload error.",e.target.responseText),t.close()},onClose:function(e){this.xhr&&this.xhr.abort&&this.xhr.abort()},onCropSelected:function(e,t,n){var a=window.photoview,i=this,s=i.photo_res,l=i.photo_size,c=l[0],u=l[1],d=Math.min(c,u),f=Math.round(e*c),h=Math.round(t*u),p=Math.round(n*d);if(i.upload_edit_url)var A=i.upload_edit_url;else A=i.base_url+"upload.php?"+(0,r.toQueryString)({act:"owner_photo_edit",_query:s,_origin:location.protocol+"//"+location.host},!0);i.xhr=ajax.plainpost(A,{_crop:[f,h,p].join(",")},function(e){o.onCropSuccess.call(i,e)},function(e){o.onCropCancel.call(i)},!0),a.updateCrop({saving:!0})},onCropSuccess:function(e){var t=window.photoview,n=this;n.xhr=ajax.post("/photos.php?act=done_photo",{_ajax:1,_query:e,_from:n.from},{onDone:function(e){o.onUploadedDone(e),t.close()},onFail:function(){o.onCropCancel.call(n)}})},onCropCancel:function(){window.photoview.updateCrop({saving:!1})},prepareInput:function(e){e.files&&e.files.length&&(e.value="")},start:function(e,t){var n=window.photoview;if(!e||!canUploadFile())return o.fallback(e,t);var a=e.files[0]||!1,i=attr(e,"data-upload-url"),r=attr(e,"data-base-url"),s=attr(e,"data-static-url"),l=attr(e,"data-from");if(!a)return!1;if(!i)return o.fallback(e,t);var c={upload_url:i,base_url:r,static_url:s,file:a,from:l};return c.xhr=uploadFile(i,{photo:a},{onProgress:bind(o.onUploadProgress,c),onComplete:bind(o.onUploadComplete,c),onError:bind(o.onUploadError,c)}),readFile(a,function(e){n.updateUpload({thumb:e})}),replace(clone(e),e),n.onClose=bind(o.onClose,c),n.openUpload({src:null}),!1},getCropFromTag:function(e,t,n){if(!e)return!1;if(3==e.length)var a=+e[0],i=+e[1],r=+e[2];else{a=+e[0]*t/1e4,i=+e[1]*n/1e4,r=+e[2]*t/1e4;var o=+e[3]*n/1e4;if(r>o&&(a+=(r-o)/2,r=o),r<200){var s=(200-r)/2;a-=s,i-=s,r=200}r=Math.min(Math.max(r,200),Math.min(t,n)),a=Math.min(Math.max(a,0),t-r),i=Math.min(Math.max(i,0),n-r)}return[a/t,i/n,r/Math.min(t,n)]},crop:function(e){if(!e||!e.size&&!e.url)return!1;var t=window.photoview,n={upload_edit_url:e.upload_url};if(e.size){n.photo_size=e.size;var a=Math.min(e.size[0],e.size[1]);t.onClose=bind(o.onClose,n),t.openCrop({src:e.thumb,max_scale:a/200,rect:o.getCropFromTag(e.rect,e.size[0],e.size[1]),onSelect:bind(o.onCropSelected,n)})}else{var i=ce("img",{src:e.url,onload:function(){n.photo_size=[i.width,i.height];var a=Math.min(i.width,i.height);t.updateCrop({src:e.thumb,max_scale:a/200,rect:o.getCropFromTag(e.rect,i.width,i.height),onSelect:bind(o.onCropSelected,n)})}});t.onClose=bind(o.onClose,n),t.openCrop({src:!0})}return!0}};window.ownerPhotoUpload=o},"GR/G":function(e,t,n){var a=n("/8IX"),i=n("HN+/"),r=3;function o(e,t){return t?e?e.isSameNode&&e.isSameNode(t)?t:e.tagName!==t.tagName||s(e)!==s(t)?e:(i(e,t),l(e,t),t):null:e}function s(e){return e.dataset?e.dataset.nanomorphComponentId:void 0}function l(e,t){for(var n,a,i,r,s=0,l=0;n=t.childNodes[l],a=e.childNodes[l-s],n||a;l++)if(a)if(n)if(c(a,n))(i=o(a,n))!==n&&(t.replaceChild(i,n),s++);else{r=null;for(var u=l;u=r)){var e=r-visualViewport.height;o!==e&&(!a.isWKWebView&&ec),n.addHandler(l.wallActionsHide),n.show(i,o)}return cancelEvent(t),!1},wallActionsHide:function(){var e=window.tooltip;removeClass("wi_actions_opened",geByClass1("wi_actions_opened")),e.hide()},wallPostOpen:function(e,t){var n=gpeByClass("wall_item",e),a=geByClass1("wi_date",n);return!a||nav.go_after(a,t)},toggleGif:function(e,t,n){var a=arguments.length>3&&void 0!==arguments[3]&&arguments[3];return!e||(!!checkEvent(t)||(clearInterval(i),hasClass("current_gif",e)?l.hideGif(e,t,a):(a||Gif.autoplayTest(),l.showGif(e,t,n,a))))},hidePlayingGifs:function(e,t){geByClass("current_gif","mcont").forEach(function(n,a){n!==e&&l.hideGif(n,!1,t)})},showGif:function(e,t,n,a){var o=window.cur;if(!e)return!0;if(checkEvent(t))return!0;if(n){if(o.loadedGifs||(o.loadedGifs={}),!o.loadedGifs[e.href]&&!confirm(n))return!1;o.loadedGifs[e.href]=!0}if(clearInterval(i),!a){var s=getY(e),c=scrollTop();scrollTop(c-(s-getY(e)))}geByClass("current_gif","mcont").forEach(function(e,t){l.hideGif(e,!1,a)});var u=!hasClass("not_mp4",e)&&Gif.isMp4Supports();if(u){var d=geByClass1("ph_img",e).src;r&&"VIDEO"===r.tagName&&(r.pause(),r.src="",r.load()),(r=ce("video",{src:e.href,className:"gif_original",loop:!0,muted:!0,autoplay:!0,poster:d},{position:"relative"})).setAttribute("playsinline",!0),r.setAttribute("webkit-playsinline",!0),r.setAttribute("controls",!0),r.controls=!1,r.load()}else r=ce("img",{src:e.href,className:"gif_original"});addClass("current_gif gif_loading",e);var f=function(t,n){hasClass("current_gif",e)&&(replaceClass("gif_loading","gif_opened",e),append(r,e),l.curGif=e,n&&n())};return u?r.oncanplay=function(){e!==l.curGif&&(statlogsValueEvent("gif_play",0,"mp4",null,a?1:0),f())}:i=setInterval(function(){r.complete&&(statlogsValueEvent("gif_play",0,"gif",null,a?1:0),f(),clearInterval(i))},100),t&&!t.defaultPrevented?cancelEvent(t):void 0},hideGif:function(e,t){var n=arguments.length>2&&void 0!==arguments[2]&&arguments[2];if(!e)return!0;if(checkEvent(t))return!0;if(removeClass("current_gif",e),removeClass("gif_opened",e),removeClass("gif_loading",e),geByClass("gif_original").forEach(function(e){remove(e)}),!n){var a=Gif.getState(),i=a.currentAutoplayElement,r=a.ignore;i===e&&(r.push(e),Gif.setState("ignore",r))}return l.curGif=null,t&&!t.defaultPrevented?cancelEvent(t):void 0},replyNamesRE:function(){var e=window.cur;if(!e.replyNames)return!1;var t=[];return each(e.replyNames,function(){t.push(escapeRE(this[0]))}),new RegExp("^("+t.join("|")+")")},replyTo:function(e,t,n,a,i){var r=window.cur;if(checkEvent(e))return!0;n=n||0,removeClass("nc_current_reply",geByClass1("nc_current_reply"));var o=ge("nc_form"),s=ge("nc_message"),c=geByClass1("nc_reply_name",o),u=gpeByClass("near_btn",c),d=ge("nc_reply_as"),f=val(s),h=l.replyNamesRE();if(n){var p=ge(t+"_"+n),A=getY(p)+getH(p),m=scrollTop();after(o,p),addClass("nc_current_reply",geByClass1("pi_reply_wrap",p)),scrollTop(m+getY(p)+getH(p)-A);var _=r.replyNames[a]||{},v=_[0]||"",g=_[1]||"";f=f?h?f.replace(h,v):f:v,l.onReplyClick(!0,v)}else{append(o,geByClass1("wall_replies")),scrollToEl(o);g="";f=h?f.replace(h,""):f}return val(s,replaceEntities(f)),val(c,g),toggle(u,n),d&&(val(d,+i),toggleClass("cp_post_as_group",o,+i)),val("nc_reply_to",n),r.replyTo=n,elfocus(s),!1},stickersInit:function(){if(!window.isNewMail||!geByClass1("messenger")){var e=window.cur,t=window.Scroller,n=ge("stickers_panel");if(n){var a=geByClass1("sp_body",n),i=geByClass1("sp_stickers_tabs",n);e.scroller&&e.scroller.destroy(),e.scroller=new t(a,{byPage:!0}),e.scroller.init(),e.destroy.push(function(){e.scroller.destroy()}),e.tabScroller&&e.tabScroller.destroy(),e.tabScroller=new t(i),e.tabScroller.init(),e.destroy.push(function(){e.tabScroller.destroy()}),l.onStickersInit(!0)}}},stickersToggle:function(e,t){var n=window.cur;if(!n.stickers)return!0;isUndefined(t)&&(t=!isVisible("stickers_panel"));var a=ge("write_form")||ge("nc_form"),i=ge("stickers_panel"),r=geByClass1("cp_sticker_btn",a);return!i||(toggle(i,t),toggleClass("cp_sticker_btn_sel",r,t),t&&n.tabScroller&&n.tabScroller.onShow(),n.onStickersToggleCallbacks&&n.onStickersToggleCallbacks.forEach(function(e){return e(t)}),!1)},stickersClick:function(e,t){var n=window.cur;return n.stickers&&n.stickers[t]?(window.isNewMail&&"/mail"===location.pathname&&(window.uMailWrite.drawStickers(),window.uMailWrite.openStickersPanel()),l.stickersToggle(null,!0),l.stickersSelectTab(null,t)):nav.go(e)},stickersStoreOpen:function(e){var t=window.cur;return ajax.click(e,!1,{url_params:{reply_to:t.replyTo||0}})},fromStickerToObject:function(e){var t=s(e,6);return{id:t[0],size:t[1],url:t[2],animationUrl:t[3],recent:t[4],ref:t[5]}},fromObjectToSticker:function(e){return[e.id,e.size,e.url,e.animationUrl,e.recent,e.ref]},getStickersTabHTML:function(e){var t=cur.stickers[e],n=window.isNewMail?16:8,a=[];if(t&&t.length)for(var i=0;i\n \n \n \n \n ')}).join("\n");return'\n
    \n
    \n '.concat(t,"\n
    \n
    \n ")}).join("\n"),o='\n
    \n
    \n
    '.concat(getLang("mobile_common_stickers_no_recent"),"
    \n
    \n
    \n "),s=a.map(function(e,t){return'\n \n \n \n ')}).join("\n");return'\n
    \n
    \n '.concat(t&&t.length?r:o,'\n
    \n
    \n
    \n ').concat(a.length>1?s:"","\n
    \n ")},stickersSelectTab:function(e,t){var n=window.cur;if(!window.isNewMail&&n.tabScroller&&!n.tabScroller.canClick())return!1;var a=ge("stickers_panel"),i=geByClass1("sp_body",a),r=geByClass1("sp_tab_selected",a);n.scroller&&n.scroller.destroy(),val(i,l.getStickersTabHTML(t)),n.scroller&&n.scroller.init(),e||(e=geByClass1("sp_tab"+t,a)),removeClass("sp_tab_selected",r),addClass("sp_tab_selected",e);var o=getY(a),s=o+getW(a),c=scrollTop(),u=c+getCh();return(ou)&&scrollToEl(a),n.tabScroller&&n.tabScroller.showElem(e),StickersAnimation&&StickersAnimation.loadAutoplayAnimationStickers(),window.isNewMail&&l.onStickersTabSelected(),!1},addRecentSticker:function(e,t,n){var a=window.cur,i=gpeByClass("sticker_item",e);if(a.stickers&&i){var r=Object.keys(a.stickers).reduce(function(e,n){return e||a.stickers[n].find(function(e){return l.fromStickerToObject(e).id===t})},null);if(!r)throw new Error("Sticker ".concat(t," not found"));var o=l.fromStickerToObject(r),s=o.id,c=o.size,u=o.url,d=o.animationUrl;a.stickers[-1]=a.stickers[-1]||[],a.stickers[-1]=a.stickers[-1].filter(function(e){return l.fromStickerToObject(e).id!==s}),a.stickers[-1].unshift(l.fromObjectToSticker({id:s,size:c,url:u,animationUrl:d,recent:1,ref:"recent"})),a.stickers[-1]=a.stickers[-1].filter(function(e,t){return t<(window.isNewMail?16:8)}),n&&l.stickersSelectTab(!1,-1)}},sendSticker:function(e,t,n,a){if(window.isNewMail&&l.onStickerClick(t,a))return l.addRecentSticker(e,t,!1),!1;var i=window.cur;if(i.scroller&&!i.scroller.canClick())return!1;l.stickersToggle(e,!1);var r=ge("write_submit"),o={lock:!0,url_params:{media:"sticker"+t,_af:srand()}};if(n&&!a&&(o.url_params.media_from="recent"),i.ref&&(o.url_params.ref=i.ref,i.ref=void 0),i.refSource&&(o.url_params.ref_source=i.refSource,i.refSource=void 0),!a){var s=attr(e,"href");s&&(a=s.split("sticker_referrer=")[1].split("&")[0])}return a&&(o.url_params.sticker_referrer=a),l.addRecentSticker(e,t,n),r?ajax.click(r,extend({save:!0},Dialog),o):(r=ge("nc_submit"))?(setTimeout(function(){Replies.setCurrentTimestamp(0)},0),ajax.click(r,{},o)):void 0},toggleMarkAsAds:function(e,t){cancelEvent(t);var n=$("input[name='from_group']");if(!n||n.checked){var a=$("input",e);a.checked=!a.checked;var i=$("input[name='mute_notifications']");i&&(i.checked=a.checked,i.disabled=a.checked),l.checkCopyright()}},toggleSender:function(e,t){t.stopPropagation(),t.preventDefault();var n=e.querySelector("input");n.checked=!n.checked;var a={group:[],user:["marked_as_ads","signed","close_comments","mute_notifications"]},i=$("input[name='marked_as_ads']");$$(".Control.Control_type_checkbox.Row").forEach(function(e){if(!hasClass("Control__blocked",e)){var t=e.querySelector("input[name]");if("from_group"!==t.name)n.checked&&!a.group.includes(t.name)?t.disabled=!n.checked:!n.checked&&a.user.includes(t.name)&&(t.disabled=!n.checked),"mute_notifications"===t.name&&i&&i.checked&&(t.disabled=!0);else{var r=$(".header__user"),o=$(".header__group"),s=$("#select-timer"),l=$("input[name=postpone]"),c=$("input#add_post_btn");if(n.checked?(r.classList.add("header_hidden"),o.classList.remove("header_hidden"),s.style.display="inline-block",l.disabled=!1):(r.classList.remove("header_hidden"),o.classList.add("header_hidden"),s.style.display="none",l.disabled=!0),c){var u=c.value;c.value=c.dataset.value,c.dataset.value=u}}}}),l.checkCopyright()},checkCopyright:function(){var e=$("input[name='marked_as_ads']"),t=$("input[name='from_group']"),n=ge("select-copyright"),a=$('input[name="copyright"]'),i=$(".create_post__source-option");if(n){var r=$(".Icon",i),o=$(".Btn",i),s=$(".Btn__text",o);e&&e.checked&&(!t||t.checked)?(hide(n),attr(o,"disabled",!0),i.classList.add("create_post__source-option--disabled"),s.innerHTML=getLang("mobile_wall_post_copyright_add_button"),r.classList.remove("Icon_edit"),r.classList.add("Icon_audio_plus")):(attr(o,"disabled",!1),i.classList.remove("create_post__source-option--disabled"),a.value?(setStyle(n,"display","inline-block"),s.innerHTML=getLang("mobile_wall_post_copyright_edit_button"),r.classList.remove("Icon_audio_plus"),r.classList.add("Icon_edit")):(s.innerHTML=getLang("mobile_wall_post_copyright_add_button"),r.classList.remove("Icon_edit"),r.classList.add("Icon_audio_plus")))}}},c=l;t.default=c,window.post=l},H5mD:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.isLandscapePhone=function(){return 90===Math.abs(window.orientation)&&!r},t.checkIPadOS=A,t.isIOSChrome=t.isIPhoneX=t.isScrollBasedViewport=t.isWKWebView=t.iosMinor=t.iosMajor=t.isIPadOS=t.isIOS=t.isIPhone=t.isIPad=t.IOS_NO_KEYBOARD_ALLOWED_OFFSET=t.IPHONE_KEYBOARD_REJECT_OFFSET=t.IPHONE_X_SAFARI_BOTTOM_BAR=t.IPHONE_SAFARI_BOTTOM_BAR=void 0;t.IPHONE_SAFARI_BOTTOM_BAR=45;t.IPHONE_X_SAFARI_BOTTOM_BAR=85;t.IPHONE_KEYBOARD_REJECT_OFFSET=180;t.IOS_NO_KEYBOARD_ALLOWED_OFFSET=70;var a=navigator.userAgent.toLowerCase(),i=A(a);t.isIPadOS=i;var r=i||-1!==a.indexOf("ipad");t.isIPad=r;var o=!r&&-1!==a.search(/iphone|ipod/);t.isIPhone=o;var s=o||r;t.isIOS=s;var l,c,u=s&&navigator.userAgent.match(/OS ([\d_]+) like Mac OS X/i);t.iosMajor=l,t.iosMinor=c,i&&(t.iosMajor=l=13,t.iosMinor=c=0),u&&(u=u[1].split("_"),t.iosMajor=l=+u[0],t.iosMinor=c=+u[1]),u=null;var d=l<13&&!(11===l&&c<3);t.isScrollBasedViewport=d;var f=s&&function(e){if(window.webkit&&window.webkit.messageHandlers)return!0;var t=/constructor/i.test(window.HTMLElement),n=!!window.indexedDB;if(-1===e.indexOf("safari")||-1===e.indexOf("version")||navigator.standalone){if(!n&&t||!window.statusbar||!window.statusbar.visible);else if(!t||n)return!0}else;return!1}(a);t.isWKWebView=f;var h=s&&375===screen.width&&812===screen.height&&3===window.devicePixelRatio;t.isIPhoneX=h;var p=-1!==a.search(/crios/i);function A(e){var t=!/ipad|iphone|ipod/.test(e);return!(!/mac os/.test(e)||!t||"boolean"!=typeof navigator.standalone)}t.isIOSChrome=p},HDU4:function(e,t,n){"use strict";var a,i=(a=n("u+Ht"))&&a.__esModule?a:{default:a};window.Archive=i.default},HGMY:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"MailPreSendList__Msg",{enumerable:!0,get:function(){return a.MailPreSendList__Msg}}),Object.defineProperty(t,"getElem",{enumerable:!0,get:function(){return i.getElem}}),Object.defineProperty(t,"setMsgs",{enumerable:!0,get:function(){return i.setMsgs}}),Object.defineProperty(t,"addMsg",{enumerable:!0,get:function(){return i.addMsg}}),Object.defineProperty(t,"removeMsg",{enumerable:!0,get:function(){return i.removeMsg}}),Object.defineProperty(t,"getMsg",{enumerable:!0,get:function(){return i.getMsg}}),Object.defineProperty(t,"onMsgClick",{enumerable:!0,get:function(){return i.onMsgClick}}),t.default=void 0;var a=function(e){if(e&&e.__esModule)return e;var t=r();if(t&&t.has(e))return t.get(e);var n={};if(null!=e){var a=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var i in e)if(Object.prototype.hasOwnProperty.call(e,i)){var o=a?Object.getOwnPropertyDescriptor(e,i):null;o&&(o.get||o.set)?Object.defineProperty(n,i,o):n[i]=e[i]}}n.default=e,t&&t.set(e,n);return n}(n("E5Ij")),i=n("4KUl");function r(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return r=function(){return e},e}var o=a.default;t.default=o},HHQA:function(e,t,n){"use strict";var a;Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var i=((a=n("2fRN"))&&a.__esModule?a:{default:a}).default;t.default=i},"HN+/":function(e,t,n){var a=n("vOyG"),i=a.length,r=1,o=3,s=8;function l(e,t,n){e[n]!==t[n]&&(t[n]=e[n],e[n]?t.setAttribute(n,""):t.removeAttribute(n))}e.exports=function(e,t){var n=e.nodeType,c=e.nodeName;n===r&&function(e,t){for(var n=t.attributes,a=e.attributes,i=null,r=null,o=null,s=null,l=a.length-1;l>=0;--l)s=a[l],o=s.name,i=s.namespaceURI,r=s.value,i?(o=s.localName||o,t.getAttributeNS(i,o)!==r&&t.setAttributeNS(i,o,r)):t.hasAttribute(o)?t.getAttribute(o)!==r&&("null"===r||"undefined"===r?t.removeAttribute(o):t.setAttribute(o,r)):t.setAttribute(o,r);for(var c=n.length-1;c>=0;--c)!1!==(s=n[c]).specified&&(o=s.name,(i=s.namespaceURI)?(o=s.localName||o,e.hasAttributeNS(i,o)||t.removeAttributeNS(i,o)):e.hasAttributeNS(null,o)||t.removeAttribute(o))}(e,t);n!==o&&n!==s||t.nodeValue!==e.nodeValue&&(t.nodeValue=e.nodeValue);"INPUT"===c?function(e,t){var n=e.value,a=t.value;l(e,t,"checked"),l(e,t,"disabled"),n!==a&&(t.setAttribute("value",n),t.value=n);"null"===n&&(t.value="",t.removeAttribute("value"));e.hasAttributeNS(null,"value")?"range"===t.type&&(t.value=n):t.removeAttribute("value")}(e,t):"OPTION"===c?function(e,t){l(e,t,"selected")}(e,t):"TEXTAREA"===c&&function(e,t){var n=e.value;n!==t.value&&(t.value=n);if(t.firstChild&&t.firstChild.nodeValue!==n){if(""===n&&t.firstChild.nodeValue===t.placeholder)return;t.firstChild.nodeValue=n}}(e,t);!function(e,t){for(var n=0;n40}),inner:e.text}]},{class:Bem.class("Question__actions",{published:e.isPublished}),inner:lang.mobile_stories_question_actions,onclick:["Stories.openQuestionActions",e.id]}]}})}}]}:null,{class:"Views__viewers",inner:[this.viewers.length&&(n.length||this.replies.length)?{class:"Views__viewersHeader",inner:this.countText}:null,{class:"Views__viewersBody",inner:this.viewers.map(function(e){return{class:"Views__viewer",href:e.href,inner:{class:"Views__table",inner:[{class:"Views__cell Views__cell_avatar",inner:{class:"Views__avatar",src:e.photo,tag:"img"}},{class:"Views__cell Views__cell_name",inner:{class:"Views__name",inner:e.name}}]}}})}]},this.viewersState.nextFrom?{class:"Views__viewersLoader",onclick:'Stories.loadViews("'.concat(this.raw_id,'")')}:null]}]})}}])&&r(t.prototype,n),a&&r(t,a),e}();t.default=o},IrFw:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.QRPhotoPosting=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return(0,a.default)({on_overlay_click_native:"QRPhotoPosting.back();",class:"QRPhotoPosting",content:[{class:"QRPhotoPosting__img",inner:Wd.wrap(e.svg)},{class:"QRPhotoPosting__title",inner:Wd.wrap(e.title)}]})},t.QRPhotoPostingButton=function(){return{inner:[(0,i.default)({sprite:"common",name:"qr_24"})],class:"QRPhotoPosting__button",onclick:"QRPhotoPosting.show();",tag:"div"}};var a=r(n("r/ag")),i=r(n("Y6JH"));function r(e){return e&&e.__esModule?e:{default:e}}},Ivtq:function(e,t,n){"use strict";var a=n("PovR");onDOMReady(s),page.onChange(s);var i="feedAssistance_pushNotificationsSwitch",r="enable_browser_notifications",o="m_push_switch";function s(){window.pushNotifier&&pushNotifier.canBeEnabled().then(function(e){return e&&PushNotifier.getPermission()===a.PUSH_NOTIFIER_PERMISSION_DEFAULT}).then(function(e){if(e){FeedNotifications.addWebActionAcceptHandler(r,l),FeedNotifications.addWebActionDeclineHandler(r,c);var t=geByClass1(i);if(!t)return;FeedAssistanceStats.registerTrackingCls(i),FeedAssistanceStats.register(t,"feed")}})}function l(e){return PushNotifier.requestPermission().then(function(t){var n,i=!0;return unlockButton(e),t===a.PUSH_NOTIFIER_PERMISSION_DEFAULT?i=!1:(n=t===a.PUSH_NOTIFIER_PERMISSION_GRANTED?FeedAssistanceStats.EVENTS.SUB_EVENT_ENABLE_PUSH:FeedAssistanceStats.EVENTS.SUB_EVENT_DECLINE_PUSH,d(e,n),u(),i)},function(){return c(e)})}function c(e){return unlockButton(e),d(e,FeedAssistanceStats.EVENTS.SUB_EVENT_DECLINE_PUSH),u(),!0}function u(){var e=geByClass1(i);remove(e)}function d(e,t){FeedAssistanceStats.dispatchEvent({type:FeedAssistanceStats.EVENTS.EVENT_FEED_ASSISTANCE,data:FeedAssistanceStats.serializeEventData(FeedAssistanceStats.EVENTS.EVENT_FEED_ASSISTANCE,e,o,t)})}},"J/W8":function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var a,i=(a=n("z9sQ"))&&a.__esModule?a:{default:a};var r=function(e){var t=e.bcg,n=t.type;return{class:i.default.class("VotingBcg",{type:n}),style:"photo"===n?o(t):"gradient"===n?s(t):"tile"===n?l(t):null,inner:"photo"===n?c(e):null}};function o(e){return u({"background-color":e.color})}function s(e){var t,n=[],a=e.points.length;for(t=0;t0&&void 0!==arguments[0]?arguments[0]:{}).onListened;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this._reattach=!1,this._audioEl=null,this._playing=!1,this._timer=null,this._duration=0,this._detaching=!1;var a={onEnd:function(){t.detach()},onFail:function(){a.onEnd()},onCanPlay:function(){},onProgressUpdate:function(e){t._updateProgress(e)}};i=!1,r.PlayerHTML5.isSupported()?(r.PlayerHTML5.isSupported('audio/ogg;codecs="opus"')&&!r.PlayerHTML5.isSupported('audio/ogg;codecs="codec_check"')&&(i=!0),this._impl=new r.PlayerHTML5(a)):browser.flash&&window.renderFlash&&(this._impl=new o.PlayerFlash(a)),this.onPlayPause=function(e){return cancelEvent(e),t.toggle()},this.onDurationClick=function(e){t.durationType=!t.durationType,cancelEvent(e)},this._onListened=function(){n&&n(t._audioEl)},this._initEvents()}var t,n,a;return t=e,a=[{key:"pauseGlobalMedia",value:function(){window.Notifier&&(h=!0,window.Notifier.lcSend("video_start")),window.ap&&window.ap.isPlaying()?(window.ap.pause(),window.ap.pausedByMsg=!0):window.audio&&window.audio.playing&&window.audio.playing()&&(window.audio.pause(),window.audio.pausedByMsg=!0)}},{key:"resumeGlobalMedia",value:function(){window.Notifier&&h&&(h=!1,window.Notifier.lcSend("video_hide")),window.ap&&window.ap.pausedByMsg?(window.ap.play(),delete window.ap.pausedByMsg):window.audio&&window.audio.playing&&window.audio.pausedByMsg&&((0,l.wrapAudioPlay)(window.audio),delete window.audio.pausedByMsg)}}],(n=[{key:"_updateProgress",value:function(e){this._audioEl&&(this._duration*e>=1||this._duration<1)&&!this._audioEl._listened&&(this._audioEl._listened=!0,this._onListened()),this._durationEl&&(this.durationType?this._durationEl.innerHTML="-"+formatTime(Math.round(this._duration*(1-e))):this._durationEl.innerHTML=formatTime(Math.round(this._duration*e))),this._progressSlider&&this._progressSlider.setValue(e)}},{key:"_initInterface",value:function(){var e=this;this._el=ce("div",{innerHTML:'
    '}).firstChild,window.getLang&&attr(this._el,"aria-label",getLang("mail_audio_message")),this._playBtn=geByClass1("audio-msg-track--btn",this._el),window.getLang&&attr(this._playBtn,"aria-label",getLang("global_audio_play")),this._durationEl=geByClass1("audio-msg-track--duration",this._el),this._durationEl.innerHTML=formatTime(this._duration),this._progressSlider=new c.Slider(geByClass1("audio-msg-track--slider",this._el),{value:0,size:0,hintClass:"audio_player_hint",formatHint:function(t){return formatTime(Math.round(t*e._duration))},onEndDragging:function(t){e._impl.seek(t)}});var t=geByClass1("audio-msg-track--wave-wrapper",this._audioEl).children[0];geByClass1("slider_slide",this._el).appendChild(t.cloneNode(!0)),geByClass1("slider_amount",this._el).appendChild(t.cloneNode(!0)),addEvent(this._playBtn,"click",this.onPlayPause),addEvent(this._durationEl,"click",this.onDurationClick),this._audioEl.parentNode.appendChild(this._el)}},{key:"_destroyInterface",value:function(){hide(this._el),this._audioEl.parentNode.removeChild(this._el),removeEvent(this._playBtn,"click",this.onPlayPause),this._progressSlider&&(this._progressSlider.destroy(),this._progressSlider=null),this._playBtn=null,this._durationEl=null,this._el=null}},{key:"attachTo",value:function(e){var t=this;if(this._audioEl!=e){null!=this._audioEl&&(this._reattach=!0),this.detach(),this._audioEl=e,addClass(this._audioEl,"audio-msg-track_player-attached"),this._duration=attr(e,"data-duration"),this._initInterface();var n=this._audioEl.id.split("_");if(n&&n.length>1&&(this._owner_id=n[1]),this._reattach=!1,!this._impl.loaded)return new Promise(function(n,a){t._impl.onReady(function(){t._impl.setUrl(attr(e,i?"data-ogg":"data-mp3"),{duration:t._duration,callback:n})})});this._impl.setUrl(attr(e,i?"data-ogg":"data-mp3"),{duration:this._duration})}return!0}},{key:"detach",value:function(){var e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];if(this._audioEl&&this._el&&!this._detaching){if(e&&this.isAttached())return;this._detaching=!0,this.stop(),this._destroyInterface(),removeClass(this._audioEl,"audio-msg-track_player-attached"),this._audioEl._listened=!1,this._audioEl=null}this._detaching=!1}},{key:"play",value:function(){this._audioEl&&(this._reattach||e.pauseGlobalMedia(),addClass(this._el,"audio-msg-track_playing"),window.getLang&&attr(this._playBtn,"aria-label",getLang("global_audio_pause")),this._playing=!0,this._createTimer(),this._owner_id&&(0,d.statlogsValueEvent)("audio_message_play",this._owner_id),this._impl.play())}},{key:"pause",value:function(){this._audioEl&&(!this._reattach&&this._playing&&e.resumeGlobalMedia(),window.getLang&&attr(this._playBtn,"aria-label",getLang("global_audio_play")),removeClass(this._el,"audio-msg-track_playing"),this._playing=!1,this._impl.pause(),this._killTimer())}},{key:"stop",value:function(){this.pause(),this._impl.stop()}},{key:"toggle",value:function(){this._playing?this.pause():this.play()}},{key:"_createTimer",value:function(){var e=this;this._duration>0&&(this._killTimer(),this._timer=setInterval(function(){var t=e._impl.getCurrentProgress();e._updateProgress(t)},100))}},{key:"_killTimer",value:function(){this._timer&&(clearInterval(this._timer),this._timer=null)}},{key:"_initEvents",value:function(){var e=this;window.ap?window.ap.on(this,s.events.PLAY,function(){delete window.ap.pausedByMsg,e.pause()}):window.audio&&window.audio.onPlay(function(){delete window.audio.pausedByMsg,e.pause()}),window.Notifier&&(window.Notifier.addRecvClbk("audio_start","audio_msg",function(){e.pause()}),window.Notifier.addRecvClbk("video_start","audio_msg",function(){e.pause()}))}},{key:"isAttached",value:function(){if(this._audioEl){for(var e=this._audioEl;e.parentNode;)e=e.parentNode;return!!e.body}return!1}},{key:"type",get:function(){return this._impl.type}},{key:"durationType",get:function(){return window.AudioPlayer?!!u.default.get(AudioPlayer.LS_PREFIX+AudioPlayer.LS_DURATION_TYPE):"1"==u.default.get("audio_time_left")},set:function(e){window.AudioPlayer?u.default.set(AudioPlayer.LS_PREFIX+AudioPlayer.LS_DURATION_TYPE,!!e):u.default.set("audio_time_left",e?"1":"0")}}])&&f(t.prototype,n),a&&f(t,a),e}();t.VoiceMessagePlayer=p},JDVM:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var a,i=(a=n("MHaq"))&&a.__esModule?a:{default:a};window.AddCopyrightPopup=i.default;var r=i.default;t.default=r},JYMJ:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ActionsPanel=u,t.default=void 0;var a=l(n("Y6JH")),i=l(n("VRji")),r=l(n("p5n7")),o=l(n("29dZ")),s=n("fdw3");function l(e){return e&&e.__esModule?e:{default:e}}function c(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return{class:"SharePanel SharePanel-header SharePanel--active ShareHeaderConversationsPanel","aria-hidden":"false","data-name":"ShareHeaderConversationsPanel",inner:[{"aria-label":(0,s.getLang)("mobile_close"),onclick:"cur.share.destroy()",role:"button",class:"SharePanel-header__close",inner:(0,a.default)("common","cancel_24")},{class:"SharePanel-headerText",inner:[{class:"SharePanel-headerText__label",inner:(0,s.getLang)("mobile_like_publish_head_title")},{class:"SharePanel-headerText__receivers"}]},{class:"SharePanel-headerRight",inner:[{"aria-label":(0,s.getLang)("mobile_search"),class:"SharePanel-headerRight__search",role:"button",inner:(0,a.default)("wall","search_24"),onclick:"cur.share.toggleConversationsSearch(true)"},e.supportsExternalShare?{"aria-label":(0,s.getLang)("mobile_share_external"),class:"SharePanel-headerRight__externalShare",role:"button",inner:"iOS"===e.platform?(0,a.default)("wall","share_external_ios_24"):(0,a.default)("wall","share_external_android_24"),onclick:"cur.share.externalShare()"}:null]}]}}function u(e){var t=e.buttons,n=e.options,a="boolean"!=typeof e.active||e.active,i=!(n.can_to_own||n.can_to_club||n.can_bookmark);return{class:"ActionsPanel SharePanel ".concat(a?"SharePanel--active":""),"data-name":"ActionsPanel","aria-hidden":!a,style:i?"display: none;":"",inner:t.map(function(e){if(e)return function(e){var t=e.href?"a":"div",n=e.onclick,a={tag:t,role:"button",tabindex:-1,href:e.href,onclick:n,class:"ActionsPanel-button ActionsPanel-button--".concat(e.target),inner:[{class:"ActionsPanel-button__icon",inner:e.icon},{class:"ActionsPanel-button__label",inner:e.label}]};"boolean"==typeof e["aria-pressed"]&&(a["aria-pressed"]=e["aria-pressed"]+"");return a}(e)})}}var d=function(e){var t=e.can_bookmark,n=e.is_bookmarked,l=e.object,d=e.list,f=e.from,h=e.post_from,p=e.supportsExternalShare,A=e.isVKApp,m=e.targetOwnOnClick,_=(0,s.makeUrl)("/wall",{act:"add",share_box:1,is_vk_app:A,object:l,list:d,from:f,post_from:h});return{inner:[{inner:[c({platform:e.platform,supportsExternalShare:p}),{class:"SharePanel ShareHeaderSearch ShareHeaderConversationsSearchPanel","aria-hidden":"true","data-name":"ShareHeaderConversationsSearchPanel",role:"search",inner:(0,r.default)({autocomplete:!1,onblur:'cur.share.clearSearch(event, "peers", true)',prefix:{text:{role:"button",inner:(0,a.default)("wall","search_outline_16")}},postfix:{text:{class:"ShareHeaderSearch__clear",role:"button",onclick:'cur.share.clearSearch(event, "peers")',inner:(0,a.default)("common","cancel_outline_24")}},class:"ShareHeaderConversationsSearchPanel__input",id:"ShareHeaderConversationsSearchPanel__input",placeholder:(0,s.getLang)("mobile_search"),spellcheck:!1})},{class:"SharePanel SharePanel-header ShareHeaderGroupsPanel","aria-hidden":"true","data-name":"ShareHeaderGroupsPanel",inner:[{"aria-label":(0,s.getLang)("mobile_back"),onclick:"cur.share.toggleGroupsPanel(false)",role:"button",class:"SharePanel-header__close",inner:(0,a.default)("common","back_24")},{class:"SharePanel-headerText",inner:[{class:"SharePanel-headerText__label",inner:(0,s.getLang)("mobile_like_publish_head_title")}]},{class:"SharePanel-headerRight",inner:[{class:"SharePanel-headerRight__search",role:"button",inner:(0,a.default)("wall","search_24"),onclick:'cur.share.setActivePanel(this, "ShareHeaderGroupsSearchPanel", true)'}]}]},{class:"SharePanel ShareHeaderSearch ShareHeaderGroupsSearchPanel","aria-hidden":"true","data-name":"ShareHeaderGroupsSearchPanel",role:"search",inner:(0,r.default)({autocomplete:!1,onblur:'cur.share.clearSearch(event, "group", true)',prefix:{text:{"aria-label":(0,s.getLang)("mobile_search"),role:"button",inner:(0,a.default)("wall","search_outline_16")}},postfix:{text:{class:"ShareHeaderSearch__clear",onclick:'cur.share.clearSearch(event, "group")',inner:(0,a.default)("common","cancel_outline_24")}},class:"ShareHeaderGroupsSearchPanel__input",id:"ShareHeaderGroupsSearchPanel__input",placeholder:(0,s.getLang)("mobile_search"),spellcheck:!1})}],class:"SharePanelRoot ShareHeader",tag:"header"},{id:"Share__input",style:"display: none;",tag:"input"},{inner:[{class:"ShareConversations SharePanel SharePanel--active filter_peer_wrap","data-name":"ShareConversations","aria-hidden":"false",role:"group",id:"ShareConversations"},{class:"ShareGroups SharePanel","data-name":"ShareGroups","aria-hidden":"true",role:"group",id:"ShareGroups"}],class:"SharePanelRoot ShareLists",tag:"section"},{inner:[u({active:!0,options:e,buttons:[e.can_to_own?{target:"own",label:(0,s.getLang)("mobile_share_target_own"),onclick:m||"cur.share.go('".concat(_,"')"),icon:(0,a.default)("wall","repost_outline_28")}:null,e.can_to_club?{target:"group",label:(0,s.getLang)("mobile_share_target_group"),icon:(0,a.default)("wall","users_outline_28")}:null,t?{target:"bookmark","aria-pressed":n,label:n?(0,s.getLang)("mobile_share_target_bookmark_active"):(0,s.getLang)("mobile_share_target_bookmark"),icon:(0,a.default)("wall",e.is_bookmarked?"favorite_28":"favorite_outline_28")}:null]}),{class:"SharePanel MessagePanel","aria-hidden":"true","data-name":"MessagePanel",inner:[(0,r.default)({tabindex:-1,autocomplete:!1,class:"MessagePanel__input",on_click:["cur.share.expandMessage"],placeholder:(0,s.getLang)("mobile_share_message_placeholder"),spellcheck:!1,readonly:!0,disabled:!0}),(0,o.default)({stretch:!0,size:"large",inner:(0,s.getLang)("mobile_share_message_single"),on_click:"cur.share.sendMessage(event)",use_native_onclick:!0})]},{class:"SharePanel ExpandedMessagePanel","aria-hidden":"true","data-name":"ExpandedMessagePanel",inner:[{class:"ExpandedMessagePanel__textareaWrap",inner:[(0,i.default)({placeholder:(0,s.getLang)("mobile_share_message_placeholder"),rows:1}),{class:"ExpandedMessagePanelSend",inner:(0,a.default)("common","send_active_24")}]}]},{class:"SharePanel ProcessingPanel","aria-hidden":"true","data-name":"ProcessingPanel",inner:[{class:"ProcessingPanel__icon ProcessingPanel__icon--loading",inner:(0,a.default)("wall","loading_40")},{class:"ProcessingPanel__label",inner:(0,s.getLang)("mobile_share_state_progress")}]}],class:"SharePanelRoot ShareBottom",tag:"footer"}],class:"Share","aria-role":"dialog","aria-label":(0,s.getLang)("mobile_like_publish_head_title"),hidden:"false",tabindex:"-1",tag:"div"}};t.default=d},JaXn:function(e,t,n){"use strict";var a;Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var i=((a=n("/nhM"))&&a.__esModule?a:{default:a}).default;t.default=i},"Jd+f":function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var a=n("UxAg"),i=o(n("29dZ")),r=o(n("K3lA"));function o(e){return e&&e.__esModule?e:{default:e}}var s=function(e,t,n,o,s,l){var c=l.$btn;function u(){var i=(0,a.$)(".MarketItem__cartQuantity"),s=Number(i.dataset.value)+1;i.dataset.value=s,i.innerHTML=s,i.classList.remove("MarketItem__cartQuantity--empty"),(0,a.$)(".MarketItem__addButtonWrapper").innerHTML=Wd.html((0,r.default)({item_id:t,group_id:n,quantity:e,hash:o}))}s?i.default.setLoading(c,!0):u(),ajax.post("/market.php",{_ajax:!0,act:"cart_change_quantity",item_id:t,group_id:n,quantity:e,hash:o},{onDone:function(){s&&(i.default.setLoading(c,!1),u())},onFail:function(){return i.default.setLoading(c,!1)}})};t.default=s},JuPy:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.isMvk=function(){return!!window.isMVK}},K0hv:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t._getLayer=g,t.default=void 0;var a=c(n("TYsd")),i=function(e){if(e&&e.__esModule)return e;var t=l();if(t&&t.has(e))return t.get(e);var n={};if(null!=e){var a=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var i in e)if(Object.prototype.hasOwnProperty.call(e,i)){var r=a?Object.getOwnPropertyDescriptor(e,i):null;r&&(r.get||r.set)?Object.defineProperty(n,i,r):n[i]=e[i]}}n.default=e,t&&t.set(e,n);return n}(n("a0wW")),r=c(n("Po+v")),o=c(n("z9sQ")),s=n("OcsD");function l(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return l=function(){return e},e}function c(e){return e&&e.__esModule?e:{default:e}}function u(e){return function(e){if(Array.isArray(e)){for(var t=0,n=new Array(e.length);t2&&void 0!==arguments[2]?arguments[2]:{};if(this.autoplayTest(),e&&cancelEvent(e),_(n)&&n.needConfirm){var a=v(n,t.getAttribute("data-media"));return domInsertBefore(a,t),void r.default.open(a,!0)}var i=d({},nav.getQuery(),{z:"doc"+n.raw+"/"+(n.hash||"")});nav.path,(0,s.obj2qs)(i),nav.hash;photo.zopen(null,null,n.raw,"",{no_push:!1,isDoc:!0,hasVideo:n.hasVideo,hash:n.hash})},init:function(e){zlayer.create(g()),zlayer.open()},close:function(){var e=d({},nav.getQuery());delete e.z;var t=nav.path+(0,s.obj2qs)(e)+nav.hash;nav.go(t,null,{push_only:!1,nav_incr:!0})},confirm:function(e,t){cur.loadedGifs[t]=!0,r.default.close(e),(0,s.geBySel1)('[data-media="'.concat(t,'"]')).click()},autoplayTest:function(){i.default.detectAutoplay().then(function(e){h=i.default.getFeatures().mp4&&e&&i.default.getFlag(i.FLAG_MP4)&&!f})},activateGIF:function(){if("/mail"!==nav.path){var e=scrollTop(),t=e+window.innerHeight,n=e+window.innerHeight/2,a={};Array.from(p.gifs||[]).forEach(function(i){var r=getXY(i)[1],o=r>=e&&r<=t,s=Math.abs(n-r);o&&(a[s]=i)});var i=a[Math.min.apply(Math,u(Object.keys(a)))];i?i.classList.contains("current_gif")||-1===p.ignore.indexOf(i)&&(post.toggleGif(i,!1,!1,!0),p.currentAutoplayElement=i):post.hidePlayingGifs(!1,!0)}},onUpdate:function(){i.default.getFlag(i.FLAG_GIF_AUTOPLAY)&&(p.gifs=u(Array.from($$(".doc_preview_rows_1 .doc_preview_gif")||[])),onBodyScroll((0,s.throttle)(A.activateGIF,200)))},getState:function(){return p},setState:function(e,t){p[e]=t}};function m(e,t,n){return{class:["Popup__button",o.default.class("Btn",{theme:t||"regular"})],tag:"button",inner:e,onclick:n}}function _(e){return cur.loadedGifs||(cur.loadedGifs={}),!cur.loadedGifs[e.raw]}function v(e){return(0,s.ceFromString)(a.default.html((0,r.default)({scrollable:!0,header:{title:getLang("mobile_wall_gif_size_warning_popup_title")},content:[getLang("mobile_wall_gif_size_warning").replace("{size}",e.size),{class:"Popup__buttons",inner:[m(getLang("mobile_continue"),"regular",'Gif.confirm(this, "'.concat(e.raw,'")')),m(getLang("mobile_cancel"),"secondary","Popup.close(this)")]}]})))}function g(){var e='';return arguments.length>0&&void 0!==arguments[0]&&arguments[0]&&(e='