1&&void 0!==arguments[1]?arguments[1]:nav.path;if(e||(e=$("#feed_add_form .cp_attached_wrap")),!e||0!==n.indexOf("/wall"))return this.initialized=!1,removeClass(document.body,"te_i"),void(p.destroyLongpress&&p.destroyLongpress());if(addClass(document.body,"te_i"),!geByClass1("ThumbsEdit",e)){var a=(0,i.ceFromString)(o.default.html({class:"ThumbsEdit",style:"width: 100%; height: 100%",id:"ThumbsEdit"})),r=(0,i.ceFromString)(o.default.html({class:["ThumbsEdit-wrap"," _preventMenuOpen"],inner:a}));r.appendChild(a),e.insertBefore(r,e.firstChild),p=h({},p,{previews:[],loaders:{},attachEl:a});var s=this.parsePreviews((0,i.getPreloadData)());this.initialized=!0,s.length&&(p.previews=s,this.draw(),(0,i.onBodyResize)(function(){return t.draw()}))}},parsePreviews:function(e){return e.map(function(e){return c.convert.apply(void 0,f(e))}).filter(function(e){var t=e.type;return(0,c.isValidThumbType)(t)})},draw:function(){var e=this,t=p,n=t.previews,a=t.attachEl,i=n[0]?(0,c.getRatio)(n[0]):c.THUMBS_CONTAINER_DEFAULT_RATIO,r={width:a.parentNode.offsetWidth,height:Math.min(Math.round(a.parentNode.offsetWidth/i),360),wide:!0},o=(0,c.processThumbs)(r.width,r.height,n,r),s=o.thumbs,l=o.height,u=o.width;p=h({},p,{thumbs:s,height:l,options:r});var d=document.createDocumentFragment();s.forEach(function(t,n){d.appendChild(e.createThumbEl(t,n))}),this.updateIds();var f=ce("div");f.id="ThumbsEdit-splitter",val(a,""),a.style.width=u+"px",a.parentNode.style.height=l+"px",a.appendChild(d),ge("ThumbsEdit-splitter")||a.parentNode.appendChild(f),mediaUpload.refreshUploadState(),this.updatePhotos()},update:function(e,t){var n=this;if(e=ge(e)){var a=e.id,r=ge(a),s=p.thumbs,l=p.height,u=p,d=u.options,f=u.drag,h=t[0]?(0,c.getRatio)(t[0]):c.THUMBS_CONTAINER_DEFAULT_RATIO,A=d.width,m=d.height;A&&m||(A=e.parentNode.offsetWidth,m=Math.min(Math.round(A/h),360)),d.width=A,d.height=m,d.wide=!0;var _=(0,c.processThumbs)(A,m,t,d),v=_.thumbs,g=_.height,y=_.width,b=(0,i.ceFromString)(o.default.html({class:"ThumbsEdit",style:"width: ".concat(y,"px; height: ").concat(g,"px; position: fixed; left: ").concat(f.wpos[0],"px; top: ").concat(f.wpos[1],"px; visibility: hidden")}));v.forEach(function(e,t){b.appendChild(n.createThumbEl(e,t,!0))}),document.body.appendChild(b);var w=this.getCoords(b,f.wpos);re(b),w.forEach(function(e,t){var n=p.drag.coords.find(function(t){return t.id===e.id});if(n){var a=geByClass1("Thumb",n.node),r=$("img",a),o=s[n.index],l=v.find(function(e){return e.id===o.id});p.drag.toIndex!==t&&i.setStyle.transform(a,1,[0,0]),n.height===e.height&&e.x===n.x&&e.y===n.y&&n.index!==p.drag.i||setTimeout(function(){i.setStyle.animate(a,"margin-left, margin-top, height, width, opacity, transform",{duration:c.THUMB_DRAG_ANIMATION_DURATION+"ms"}),(0,i.setStyle)(a,{"margin-left":0,"margin-top":0,height:e.height,width:e.width,opacity:1}),i.setStyle.transform(a,1,[e.x-n.x,e.y-n.y]),i.setStyle.animate(a.parentNode,"background",{duration:c.THUMB_DRAG_ANIMATION_DURATION+"ms"}),(0,i.setStyle)(a.parentNode,{func:"ease-in",background:"transparent"});var t=(0,c.crop)(l,e.width,e.height);r&&(i.setStyle.animate(r,Object.keys(t).join(),c.THUMB_DRAG_ANIMATION_DURATION+"ms"),(0,i.setStyle)(r,t))})}}),l!==g&&setTimeout(function(){[r,r.parentNode].forEach(function(e){i.setStyle.animate(e,"height",{duration:c.THUMB_DRAG_ANIMATION_DURATION+"ms"}),(0,i.setStyle)(e,{height:g})})}),y>=A&&(i.setStyle.animate(r,"width",{duration:c.THUMB_DRAG_ANIMATION_DURATION+"ms"}),(0,i.setStyle)(r,{width:y})),setTimeout(function(){(0,i.setStyle)(r,{width:y}),p.thumbs=v,p.previews=t,p.height=g;var e=document.createDocumentFragment();v.forEach(function(t,a){e.appendChild(n.createThumbEl(t,a))}),r.innerHTML="",r.appendChild(e),p.drag.updating=!1,n.updatePhotos()},c.THUMB_DRAG_ANIMATION_DURATION)}else console.error("empty el to update")},createThumbEl:function(e,t){var n=e.image,s=e.width,l=e.height,u=e.type,d=(0,c.crop)(e,s,l),f=["Thumb-wrap","".concat("Thumb-wrap","--").concat(u)],h=0===e.id.indexOf("phototemp_"),A=h||s<=30||l<=60;h&&f.push("".concat("Thumb-wrap","--temp")),e.lastColumn&&f.push("last_column"),e.lastRow&&f.push("last_row");var m=p.previews[t],_=null;m.label&&(_=o.default.wrap(m.label));if(h&&m.orientation>1){var v=(s-l)/2;"\n position: absolute;\n right: ".concat(v,"px;\n bottom: ").concat(-v,"px;\n height: ").concat(s,"px;\n width: ").concat(l,"px;\n ")}var g=this.getCached(e.id,n.src);this.cachePhoto(e.id,n.src);var y=[{tag:"img",src:g?g.src:n.src,width:"".concat(Math.round(d.width)),height:"".concat(Math.round(d.height)),style:"margin-left: ".concat(d.marginLeft,"px; margin-top: ").concat(d.marginTop,"px;")},{class:"Thumb__overlay",inner:[!A&&{class:"Thumb__overlay-closeBtn",onclick:"ThumbsEdit.remove(null, ".concat(t,")")},_]},{tag:"input",type:"hidden",name:"attach"+(t+1)+"_type",value:u},{tag:"input",type:"hidden",name:"attach"+(t+1),value:e.id.slice(u.length,e.id.length)}];if(h){var b,w=Math.min(Math.min((d.width-24)/2,30),Math.min((d.height-24)/2,30));p.loaders[e.id]&&(b=p.loaders[e.id]);var E=a.default.init(b,w),k=E.component,S=E.id;p.loaders[e.id]=S,y.push(k)}var C=(0,i.ceFromString)(o.default.html({class:"Thumb",style:"width: ".concat(Math.round(s),"px; height: ").concat(Math.round(l),"px"),inner:y})),M=(0,i.ceFromString)(o.default.html({class:f.join(" "),style:"width: ".concat(Math.round(s),"px; height: ").concat(Math.round(l),"px"),"data-media":e.id,"data-index":t,"data-upload":m.upload}));return p.destroyLongpress=(0,r.onLongpress)(C,350,this.startDrag.bind(this,C)),addEvent(M,"click",this.showPopup.bind(this)),M.appendChild(C),M},addTempPreview:function(e){var t;if(p.attachEl){var n=this.parsePreviews([e]);(t=p.previews).push.apply(t,f(n)),this.draw()}},replaceTemp:function(e,t,n){var i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{},r=p.previews.findIndex(function(t){return t.ownerId===e}),o=p.previews[r],s=t.split("_").ownerId,l=t.split("_").itemId;o.ownerId=s,o.owner_id=s,o.itemId=l,o.temp=!1,o.upload=e,o.list=n,o.photo.sizes=i,o.photo.id="photo"+t,o.photo.pid=l,o.data=o.photo,a.default.ready(p.loaders["phototemp_"+e]),this.draw()},onUploadProgress:function(e,t){a.default.update(p.loaders["phototemp_"+e],t)},preventScroll:function(e){preventEvent(e)},startDrag:function(e,t){if(addEvent(window,"touchmove",this.preventScroll),e.classList.contains("Thumb")&&!e.classList.contains("Thumb--moving")){window.navigator.vibrate&&navigator.vibrate(50),(0,i.setStyle)(document.body,"overflow","hidden"),(0,i.setStyle)(document.body,"max-height","100%"),(0,i.setStyle)(document.body,"user-select","none");var n=this.onDrag.bind(this),a=this.onDrop.bind(this);addEvent(window,"mousemove touchmove",n),addEvent(window,"mouseup touchend touchcancel",a),statlogsValueEvent("mvk_thumb_edit_interaction",""),p.drag=h({},p.drag,{curEl:e,curIndex:e.parentNode.dataset.index,dragListener:n,dropListener:a});var r=e.offsetWidth>=40&&e.offsetHeight>=80,o=e.parentNode.parentNode,s=$("img",e),l=intval(e.parentNode.getAttribute("data-index")),u=p.thumbs[l],d=getXY(o),f=getXY(e.parentNode),A=this.getCoords(o,d);p.drag.id=o.id,p.drag.i=l,p.drag.toIndex=l,p.drag.x=(t.pageX||t.detail.pageX)-f[0],p.drag.y=(t.pageY||t.detail.pageY)-f[1],p.drag.t=u,p.drag.w=u.width,p.drag.h=u.height,p.drag.pos=f,p.drag.wpos=d,p.drag.crop=(0,c.crop)(u,u.width,u.height),p.drag.coords=A,p.drag.needScale=r;var m=r?(0,c.scale)(u.width,u.height,.9*e.offsetWidth,.9*e.offsetHeight):[u.width,u.height],_=m[0],v=m[1],g=intval((u.width-_)*(browser.android?.5:p.drag.x/u.width)),y=intval((u.height-v)*(browser.android?.5:p.drag.y/u.height));addClass(e,"Thumb--moving"),(0,i.setStyle)(e,{zIndex:100}),(0,i.setStyle)(e.parentNode,{zIndex:100});var b=(0,c.crop)(u,_,v);(0,i.setStyle)(e,{opacity:.75,width:_,height:v,marginLeft:g,marginTop:y}),s&&(0,i.setStyle)(s,b),p.drag.state=!0}},onDrag:function(e){var t=p.drag.curEl;if(e.touches&&e.touches.length>1)return this.drop();var n=this._getClickCoord(e),a=n.x,r=n.y,o=p.drag,s=a-(o.pos[0]+o.x),l=r-(o.pos[1]+o.y);i.setStyle.transform(t,1,[s,l]);var u=o.wpos;s=o.pos[0]+intval(t.style.marginLeft)+s-u[0],l=o.pos[1]+intval(t.style.marginTop)+l-u[1];var d=s,f=l,h=(t.offsetWidth,t.offsetHeight,o.i),A=!1,m=o.i,_=-1,v=window.innerWidth>=480?c.THUMBS_MESH_GAP_MVK:c.THUMBS_MESH_GAP_MVK_SMALL,g={};if(o.coords.forEach(function(e,t){if(t!==o.i&&t!==_){e.offsetX=e.node.offsetWidth+v,e.offsetY=e.node.offsetHeight+v;var n=o.coords[t-1],a=o.coords[t+1],r=d+o.x,s=f+o.y,l=e.x+e.offsetX/2,c=e.y+e.offsetY/2,u=e.x+e.offsetX,p=e.y+e.offsetY,y=(n&&n.x===e.x&&n.y!=e.y&&0!=e.y||a&&a.x===e.x&&a.y!=e.y)&&0!=e.x,b=r>=l&&(a&&(r<=a.x+a.offsetX/2&&(a.offsetY===e.offsetY||re.y&&s =e.x&&(!n||n.y!=e.y&&!(n.x===e.x&&!a))&&s>e.y&&s
=c&&s
e.x&&r=e.y&&r>e.x&&re.x&&h>e.index&&(i.setStyle.transform(e.node,1,[0,0]),i.setStyle.transform(e.node,1,[0,0]),i.setStyle.transform(a.node,1,[5,0]),_=t+1,g.side="left",g.toIndex=m),E&&a&&a.x===e.x&&a.y>e.y&&s<=c&&(i.setStyle.transform(a.node,1,[0,0]),_=t+1),k&&n&&n.x===e.x&&n.yt.width?-1:e.width0&&void 0!==arguments[0]&&arguments[0];this.started&&(this.pause(e),this.left=this.initialTime,e||this.onStop())}},{key:"pause",value:function(){var e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];this.timer&&(this.timer=clearInterval(this.timer),this.started=!1,e||this.onPause())}},{key:"start",value:function(){var e=this;if(this.started)return!1;var t=new Date(Date.now()+this.left).getTime();this.started=!0,this.timer=setInterval(function(){var n=(new Date).getTime();e.left=t-n,e.left<=0?(e.onTick(0),e.onEnd(),e.stop(!0)):e.onTick(e.left)},this.tick),this.onStart()}},{key:"isStarted",value:function(){return this.started}},{key:"getTimeLeft",value:function(){return this.left}}])&&a(t.prototype,n),i&&a(t,i),e}();t.default=i},WwUR:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var a,i=n("OcsD"),r=(a=n("+cqQ"))&&a.__esModule?a:{default:a},o=n("Ep6I"),s=n("V1Nw"),l=n("BxOC"),c=n("f01n");var u={onNewMsg:(0,r.default)("{ peerId, msgId, authorId, text, date, hasAttachments, flags, isService }"),onEditMsg:(0,r.default)("{ peerId, msgId, authorId, text, date, hasAttachments, flags }"),onMsgReadByMe:(0,r.default)("msgId","dialogId"),onMsgReadByOther:(0,r.default)("msgId","dialogId"),onOnlineChange:(0,r.default)("{ userId, isOnline, onlinePlatform, lastActionTime }"),onTyping:(0,r.default)("dialogId","authorId"),onMultiTyping:(0,r.default)("peerId","userIds","totalCount"),onRecordingAudio:(0,r.default)("peerId","userIds","totalCount"),onMsgImportantRemove:(0,r.default)("msgId"),onMsgImportantAdd:(0,r.default)("msgId"),onMsgRequestChange:(0,r.default)("peerId","type"),onMsgRemove:(0,r.default)("msgId"),onMsgListen:(0,r.default)("msgId"),onMsgRestore:(0,r.default)("msgId"),onPeerKeyboard:(0,r.default)("peerId"),onPeerBanner:(0,r.default)("peerId"),onPeerConvert:(0,r.default)("peerId","convertId"),onPeerAdmin:(0,r.default)("peerId","userId","isAdmin"),onDialogImportant:(0,r.default)("peerId","isImportant"),onDialogRemove:(0,r.default)("peerId"),onUnreadCount:(0,r.default)("count"),onResync:(0,r.default)(),_onLpEvents:(0,r.default)("Array"),init:function(e){u._lpConnect&&(u._onLpEvents.off(),u._lpConnect.stopConnection(),u._lpQueue=null,u._lpConnect=null),u._lpConfig=e},isLongPollingEnabled:function(){return!(!u._lpConnect||u._lpConnect.isStopped())},on:function(){clog("[longpoll] start"),window.addEventListener("online",f),window.addEventListener("offline",f),u._lpConnect?u._lpConnect.reinitConnection():u._createLongpoll(u._lpConfig)},off:function(){clog("[longpoll] stop"),window.removeEventListener("online",f),window.removeEventListener("offline",f),u._lpConnect&&u._lpConnect.stopConnection()},pause:function(){clog("[longpoll] pause"),u._lpQueue&&u._lpQueue.pause()},resume:function(){clog("[longpoll] resume"),u._lpQueue&&u._lpQueue.resume()},abortWaiting:function(){clog("[longpoll] abort waiting"),u._lpConnect.abortWaiting()},_createLongpoll:function(e){if(!u._lpConnect){var t=(0,s.createLongpollEventsQueue)(e.ts,function(e){u._onLpEvents(e)}),n=(0,o.createLongpollConnect)(e,{onEvents:function(e,n,a){a.forEach(function(a){t.onLp(e,n,[a])})},onHistoryLost:function(){clog("[longpoll] ts expired")},onKeyExpired:function(e){return clog("[longpoll] key expired"),(0,l.post)("/mail",{act:"get_key",user_id:e.id})},onLpBroken:function(){clog("[longpoll] broken, reload"),window.location.reload()}});u._lpQueue=t,u._lpConnect=n,u._onLpEvents(function(e){try{e.forEach(u._onEvent)}catch(e){console.error(e)}})}},_onEvent:function(e){var t=e.type;switch(t){case c.REPLACE_FLAGS:var n=e.flags,a=e.messageId;e.peerId;n&c.FLAG_IMPORTANT?u.onMsgImportantAdd(a):u.onMsgImportantRemove(a),n&c.FLAG_DELETED||n&c.FLAG_SPAM?u.onMsgRemove(a):u.onMsgRestore(a);break;case c.SET_FLAGS:var r=e.flags,o=e.messageId,s=e.peerId;r&c.FLAG_IMPORTANT&&u.onMsgImportantAdd(o),(r&c.FLAG_DELETED||r&c.FLAG_SPAM)&&u.onMsgRemove(o,s),r&c.FLAG_AUDIO_MESSAGE_LISTENED&&u.onMsgListen(o);break;case c.RESET_FLAGS:var l=e.flags,d=e.messageId;e.peerId;l&c.FLAG_IMPORTANT&&u.onMsgImportantRemove(d),(l&c.FLAG_DELETED||l&c.FLAG_SPAM)&&u.onMsgRestore(d);break;case c.ADD_MESSAGE:case c.EDIT_MESSAGE:case c.REPLACE_MESSAGE:var f=e.messageId,h=e.peerId,p=e.randomId,A=e.text,m=e.flags,_=e.attaches,v=e.kludges,g=e.date,y=(0,i.toInt)(v.from_admin)||null,b=function(e){if(e.flags&c.FLAG_OUTBOUND)return u._lpConfig.id;return e.userId}(e),w=!!v.source_act,E=t===c.EDIT_MESSAGE||t===c.REPLACE_MESSAGE,k=m&c.FLAG_OUTBOUND,S=!!(m&c.FLAG_STEALTH),C=v.keyboard,M=function(e,t){t&c.FLAG_HAS_REPLY&&function(e){e.fwd_count}(e)}(v,m),P={peerId:h,id:f,authorId:b,attaches:_,text:A,ts:g,flags:m,adminId:y,randomId:p,isService:E?void 0:w,edited:!!E||void 0,replaced:t===c.REPLACE_MESSAGE,keyboard:C,isStealth:S,isOut:k,hasReply:M};E?u.onEditMsg(P):u.onNewMsg(P);break;case c.READ_INBOUND:case c.READ_OUTBOUND:var T=e.peerId,D=e.upToId;e.unread;t===c.READ_INBOUND?u.onMsgReadByMe(D,T):u.onMsgReadByOther(D,T);break;case c.GOT_ONLINE:case c.GOT_OFFLINE:var I=e.userId,x=e.platform,O=(e.reason,e.lastSeenTs),B="mobile";x&&6!==x&&7!==x||(B="desktop"),u.onOnlineChange({userId:I,isOnline:t===c.GOT_ONLINE,onlinePlatform:B,lastActionTime:O});break;case c.RESET_DIRECTORIES:case c.SET_DIRECTORIES:var L=e.mask,R=e.peerId;e.local;L&c.FOLDER_IMPORTANT&&u.onDialogImportant(R,t===c.SET_DIRECTORIES);break;case c.REPLACE_DIRECTORIES:var N=e.mask,j=e.peerId;e.local;u.onDialogImportant(j,!!(N&c.FOLDER_IMPORTANT));break;case c.DELETE_DIALOG:var F=e.peerId;u.onDialogRemove(F);break;case c.CONVERSATION_UPDATED:var H=e.peerId,V=e.updateType,U=e.updateArg;if(11===V&&u.onPeerKeyboard(H),10===V&&u.onPeerBanner(H),13===V&&u.onPeerConvert(U,H),12===V){var z="";switch(U){case 3:z="created";break;case 2:z="rejected";break;case 1:z="accepted";break;case 0:z="canceled"}u.onMsgRequestChange(H,z)}3===V&&u.onPeerAdmin(H,U,!0),9===V&&u.onPeerAdmin(H,U,!1);break;case c.TYPING:var W=e.peerId,q=e.userIds,G=e.totalCount;e.ts;u.onMultiTyping(W,q,G);break;case c.RECORDING_AUDIO:var $=e.peerId,Y=e.userIds,Q=e.totalCount;e.ts;u.onRecordingAudio($,Y,Q);break;case c.VIDEO_CALL:break;case c.UNREAD_COUNT:var X=e.count,K=e.countNotMuted,J=e.showOnlyNotMuted;u.onUnreadCount(J?K:X);break;case c.NOTIFY_SETTINGS_CHANGED:break;case c.RESYNC:u.onResync()}}},d=u;function f(e){"online"===e.type?(clog("[longpoll] online"),u._lpConnect.reinitConnection()):(clog("[longpoll] offline"),u._lpConnect.stopConnection())}t.default=d},XBHu:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.AudioAds=void 0;var a=n("lkNA"),i=n("rEJs"),r=n("W0fz"),o=n("VnbJ"),s=n("YvCB");function l(e,t){for(var n=0;n"),params:c,browser:{adBlock:!!window.abp,mobile:!1}}),s._sendEvent("requested",n)})}},{key:"_sendEvent",value:function(e,t,n,a){var i=this,r=n?"/"+n:"",o=a?"/"+a:"";this._adEvents.push(e+"/"+t+r+o),clearTimeout(this._adEventDelay),this._adEventDelay=setTimeout(function(){ajax.post(i.adsStatUrl,{act:"ad_event",events:i._adEvents.join(","),v:i.playerVersion,abp:intval(window.abp)},{onFail:function(){return!0}}),i._adEvents=[]},500)}},{key:"_play",value:function(t,n,a){var r=this;this._adman.onCompleted(function(){r.deinit(!0),t?r._sendEvent("statistics",n):(r.player.notify(i.events.PROGRESS,0),r.player.notify(i.events.AD_COMPLETED),r._isPlaying=!1,r._adsCurrentProgress=0,r._sendEvent("completed",n),window.setDocumentTitle&&window.setDocumentTitle(r._adsPrevTitle),a&&a())}),this._adman.onStarted(function(){t||(r.player.setIsPlaying(!0),r.player.notify(i.events.PLAY),r.player.notify(i.events.PROGRESS,0),r.player.notify(i.events.AD_STARTED),r.updateVolume(),r._sendEvent("started",n))}),this._adman.onPaused(function(){r.player.setIsPlaying(!1),r.player.notify(i.events.PAUSE)}),this._adman.onPlayed(function(){r.player.setIsPlaying(!0),r.player.notify(i.events.PLAY)});var o=[.25,.5,.75];if(this._adman.onTimeRemained(function(e){r._duration=isNaN(e.duration)?0:e.duration,r._adsCurrentProgress=(isNaN(e.percent)?0:e.percent)/100,r.player.notify(i.events.PROGRESS,r._adsCurrentProgress,r._duration),each(o,function(e,t){if(r._adsCurrentProgress>=t)return o.shift(),r._sendEvent("progress_"+intval(100*t),n),!1})}),this._adman.start(e.AD_TYPE),t)return a&&a();this._isPlaying=!0,this._adsPrevTitle=document.title,this.isMvk||setDocumentTitle(getLang("global_audio_ad"))}},{key:"updateVolume",value:function(){this._adman&&this._adman.setVolume(.7*this.player.getVolume())}},{key:"deinit",value:function(e){this._adman=null,!e&&this.player.notify(i.events.AD_DEINITED)}},{key:"pause",value:function(){this._adman&&(this.player.setIsPlaying(!1),this._adman.pause())}},{key:"resume",value:function(){this._adman&&(this.player.setIsPlaying(!0),this._adman.resume(),this.player.notify(i.events.PLAY))}},{key:"checkPlay",value:function(t,n){var a=this.player._getPlayingContextSection(),i=this._isAllowed(t),r=i.type,o=i.reason,s=function(){return n&&n()};switch(r){case e.ALLOW_ALLOWED:this._fetchAd(t,a,!1,s);break;case e.ALLOW_DISABLED:s();break;case e.ALLOW_REJECT:this._fetchAd(t,a,!0,!1,o),s()}}},{key:"_isAllowed",value:function(t){if(vk.widget)return{type:e.ALLOW_DISABLED};if((0,r.isPodcast)(t))return{type:e.ALLOW_DISABLED};if(window.browser&&window.browser.safari)return{type:e.ALLOW_DISABLED};var n=this._adsConfig||vk.audioAdsConfig||window.audioAdsConfig;if(n){if(!n.enabled)return{type:e.ALLOW_DISABLED};if(cur.adsPreview)return{type:e.ALLOW_ALLOWED};if(n.day_limit_reached)return{type:e.ALLOW_REJECT,reason:e.REJECT_REASON_LIMIT};var a=this.player._getPlayingContextSection();return n.sections.indexOf(a)>-1?{type:e.ALLOW_ALLOWED}:{type:e.ALLOW_REJECT,reason:e.REJECT_REASON_SECTION}}return{type:e.ALLOW_REJECT,reason:e.REJECT_REASON_UNKNOWN}}},{key:"startPlay",value:function(e,t,n){var a=this;this._startAdsTO&&(0,o.clearWorkerTimeout)(this._startAdsTO),t?this._startAdsTO=(0,s.setWorkerTimeout)(function(){return a.checkPlay(e,n)},0):this.checkPlay(e,n)}}])&&l(t.prototype,n),c&&l(t,c),e}();function u(e,t){for(var n=e.toString(16),a=t.toString(16);a.length<8;)a="0"+a;return n+a}t.AudioAds=c,c.ADMAN_SRC="//ad.mail.ru/static/admanhtml/rbadman-html5.min.js",c.CAT_IDS={my:101,my_playlists:101,audio_feed:109,recent:113,user_wall:104,group_wall:104,user_list:102,group_list:103,user_playlists:102,group_playlists:103,feed:105,search:110,global_search:110,replies:104,im:106,group_status:104,user_status:104,recs:107,recs_audio:107,recs_album:107,other:114},c.AD_TYPE="preroll",c.ALLOW_DISABLED=1,c.ALLOW_ALLOWED=2,c.ALLOW_REJECT=3,c.REJECT_REASON_UNKNOWN="unknown",c.REJECT_REASON_LIMIT="track_limit_exceeded",c.REJECT_REASON_SECTION="section_not_allowed"},XCiN:function(e,t,n){"use strict";var a=n("izth");window.isBootstrapInited||(window.cur={destroy:[]},window.lang={},(0,a.setDocumentDomain)(),window.NodeList&&!NodeList.prototype.forEach&&(NodeList.prototype.forEach=Array.prototype.forEach),window.isBootstrapInited=!0)},XLP4:function(e,t,n){"use strict";window.FeedAssistanceImportContacts={importContacts:function(e,t,n){if(!window.XMLHttpRequest||n)return;var i=domData(e,"service-id");return window.open(t),a[i]=e,!1}};var a={},i="feedAssistanceImportContacts__desc",r=!1;FeedAssistanceStats.registerTrackingCls("feedAssistance_importContacts"),FeedAssistanceStats.onStartViewElement(function(e){FeedAssistanceStats.getElementType(e)===FeedAssistanceStats.BLOCKS.BLOCK_TYPE_IMPORT_CONTACTS&&(r=!0)}),Friends.onImportSuccess(function(){var e=arguments[0],t=arguments[2],n=a[e];if(n){var o=geByClass1(i,n);o.textContent=getLang("mobile_join_friends_found_count",t)}r&&FeedAssistanceStats.dispatchEvent({type:FeedAssistanceStats.EVENTS.EVENT_FEED_ASSISTANCE,data:FeedAssistanceStats.serializeEventData(FeedAssistanceStats.EVENTS.EVENT_FEED_ASSISTANCE,n,"m_mp",FeedAssistanceStats.EVENTS.SUB_EVENT_FILLED)})}),Friends.onImportFailed(function(e){var t=a[e];t&&(geByClass1(i,t).textContent=getLang("mobile_friends_import_error"))})},XLUH:function(e,t,n){"use strict";function a(e,t){for(var n=0;n1&&void 0!==arguments[1]?arguments[1]:null,n="last"===t,a=store.mail,r=a.peers[e],o=r.url,s=null;if(t){var l;n||(o="".concat(o,"&msg=").concat(t)),(l=n?p(e):a.msgs[t])&&(s={text:u(l),date:l.dateShort,unreadCount:f(e),muted:r.isMuted,typing:A(e),pending:l.pending,failed:l.failed})}return(0,i.default)({id:e,url:o,photos:r.avatarImages,title:r.title,online:d(r),important:r.isImportant,profileUrl:r.profileUrl,isLast:n,more:s})};function u(e){var t=window.lang,n=store.mail,i=!!e.attaches.call;if(e.isService&&!i)return a.default.html({tag:"span",inner:[a.default.wrap(e.serviceText)]});var r=e.body?a.default.wrap((0,o.Msg__textPreview)(e.body)):function(e){return{tag:"span",class:"convo__msgAttach",inner:(0,o.Msg__attachPreview)(e)}}(e),l="";return e.authorId===n.cur.userId&&e.peerId!==n.cur.userId?l=t.mobile_mail_you:(0,s.isChatPeer)(e.peerId)&&(l=(l=n.members[e.authorId].shortName).replace(/\.$/,"")),l&&(l+=": "),a.default.html({tag:"span",inner:[a.default.wrap(l),r]})}function d(e){return!!e.isOnline&&("desktop"===e.onlinePlatform?"desktop":"mobile")}function f(e){var t=function(e){return store.mail.peers[e]}(e).countUnread;if(0===t){var n=store.mail,a=p(e);a&&a.isUnread&&a.authorId===n.cur.viewerId&&(t=-1)}return t}function h(e){var t=store.mail,n=t.rolls.peer[e],a=t.presend&&t.presend.pending[e],i=t.presend&&t.presend.failed[e];if(a&&a.length)for(var r=a.length-1;r>=0;r--){var o=a[r];if(-1===o.indexOf("edit"))return o}if(i&&i.length)for(var s=i.length-1;s>=0;s--){var l=i[s];if(-1===l.indexOf("edit"))return l}return n&&n.length?last(n):null}function p(e){var t=store.mail.msgs,n=store.mail.presend,a=n&&n.msgs,i=h(e);return a&&a[i]?a[i]:i?t[i]:null}function A(e){var t,n,a=(0,r.uTyping_getPeerTyping)(e),i=a&&1===a.count&&a.users[0]===e;return a?("mixed"===a.type?(t="simple-dots",n="mixed"):"audio"===a.type?(t="audio",n="audio"):"text"===a.type&&(t="simple-dots",n=""),{typing:!!i||(0,r.uTyping_getNames)(a),typingCount:a.count,animation:t,text:n,dimmed:!1,compact:!0}):""}t.default=c},YQfe:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.SILENCE=void 0;t.SILENCE="data:audio/wav;base64,UklGRigAAABXQVZFZm10IBIAAAABAAEARKwAAIhYAQACABAAAABkYXRhAgAAAAEA"},Yaig:function(e,t,n){"use strict";function a(){return(a=Object.assign||function(e){for(var t=1;t1&&void 0!==arguments[1])||arguments[1];(0,r.isIosWebView)()||(0,r.isAndroidWebView)()||(0,r.isVkWebView)()||(n||(l=geByClass1(i.default.class.btn),page.onChange(e.bind(this))),t=t?t.split("?")[0]:nav.path,!/^\/photo/.test(t)&&u(),(0,o.isForbiddenPage)(t,c)||nav.getQuery("z")?(u(),setTimeout(u)):d())}(null,!1)});var f={_onCloseClick:function(e){i.default._onCloseClick(e),(0,s.setCookie)("remixregbtn",0,0)},show:d,hide:u};t.default=f},YvCB:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.setWorkerTimeout=function(e,t){if(!window.Worker||!window.Blob)return setTimeout(e,t);var n=new Blob(["\n var timeout;\n onmessage = function(e) {\n clearTimeout(timeout);\n if (e.data == 'start') {\n timeout = setTimeout(function() { postMessage({}); }, ".concat(t,");\n }\n }\n ")]);try{var a=new Worker(window.URL.createObjectURL(n));return a.onmessage=function(){a.terminate(),e()},a.postMessage("start"),a}catch(n){return setTimeout(e,t)}}},Z9Of:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.onOpen=function(e){if(A=e,m=!1,a=!1,r=0,o=0,l=0,c=0,_={},void 0,u="start",d=0,v=0,!f.isIPhone)return;if("top"!==A&&"bottom"!==A)return void document.body.classList.add("ScrollViewsDisabled");E()f.IPHONE_KEYBOARD_REJECT_OFFSET?e>t?(k(e),f.isWKWebView||y()):ew(t)?(_[e]=!0,y(s)):y():e!==w(t)&&y():t||(e=3&&(window.removeEventListener("scroll",g),k(r)),setTimeout(function(){y()},300)):y()))}}else{if((0,f.isLandscapePhone)())return;if(f.isWKWebView)return void(0!==pageYOffset&&y(0));var n=innerHeight;if("start"===u&&(n=375?e:(f.isIPhoneX?e-=f.IPHONE_X_SAFARI_BOTTOM_BAR:e-=f.IPHONE_SAFARI_BOTTOM_BAR,e)}function E(){return 90===Math.abs(window.orientation)?h:p}function k(e){90===Math.abs(window.orientation)?h=e:p=e}},ZYIi:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Select=o,t.default=void 0;var a=r(n("9y81")),i=r(n("z9sQ"));function r(e){return e&&e.__esModule?e:{default:e}}function o(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.on_change;return{class:[e.mix||e.class,i.default.class("Select",{disabled:e.disabled})],inner:[{class:"Select__native",tag:"select",name:e.name,disabled:e.disabled,onchange:t?["Select._onChange","this",t]:null,inner:e.options.map(function(e){return e?{class:"Select__option",tag:"option",value:e.value,selected:e.selected?"selected":null,inner:e.label,attrs:e.attrs}:null})},{outerHTML:(0,a.default)({mix:"Select__chevron",icon:"chevron_down"})}]}}var s=o;t.default=s},Ziv7:function(e,t,n){"use strict";var a=n("UxAg"),i=x(n("+cqQ")),r=x(n("bZ/P")),o=x(n("TYsd")),s=x(n("jk6M")),l=x(n("rKp0")),c=(x(n("Mc5h")),x(n("gy8s"))),u=(x(n("u33z")),I(n("V4qE"))),d=I(n("HGMY")),f=x(n("/Id8")),h=I(n("t7Ww")),p=x(n("r/ag")),A=x(n("29dZ")),m=n("hOuX"),_=n("N4ZS"),v=n("9M99"),g=n("H5mD"),y=I(n("aiw/")),b=n("Qz23"),w=n("jE6c"),E=n("hw56"),k=n("j80l"),S=x(n("wcVR")),C=I(n("dVvW")),M=x(n("B+U2")),P=n("DgYJ"),T=I(n("HdGT"));n("qHA9");function D(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return D=function(){return e},e}function I(e){if(e&&e.__esModule)return e;var t=D();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 x(e){return e&&e.__esModule?e:{default:e}}Object.assign(C.default,{onToBottomClick:(0,i.default)(),onAttachedMsgsRemove:(0,i.default)(),onReplyClose:(0,i.default)(),onMessage:(0,i.default)(),showToBottom:function(){if(U)return;z&&(clearTimeout(z),z=null);addClass("uMailWrite__toBottom_visible",(0,a.$)(".uMailWrite__toBottom"))},hideToBottom:function(){clearTimeout(W),z=setTimeout(function(){removeClass("uMailWrite__toBottom_visible",(0,a.$)(".uMailWrite__toBottom"))},100)},preventShowToBottom:function(){U=!0,setTimeout(function(){U=!1},300)},openStickersPanel:re,redrawReply:_e,uiRedrawAttachments:ve,redrawToBottom:function(){(0,a.$$)(".uMailWrite__toBottom").forEach(function(e){return e.innerHTML=(0,C.uMailWrite_ToBottomInner)()})},drawStickers:ne,setModifiers:function(e){(0,a.$$)(".uMailWrite").forEach(function(t){var n=r.default.parseClass("uMailWrite",t.getAttribute("class"));t.setAttribute("class",r.default.class("uMailWrite",Object.assign({},n,e)))})},hideStickersPanel:ie,setText:Re,renderKeyboardIfNeeded:je,openKeyboard:He,init:function(){var e=store.mail,t=e.cur,n=(e.msgs,e.pendingReplies),i=t&&(0,E.getPeerDraft)(t.viewerId,t.peerId);i&&!t.editing&&i.text&&function(e){var t=document.createElement("textarea");t.innerHTML=e;var n=t.value;(0,a.$$)(".uMailWrite__textarea").forEach(function(e){return e.value=n});var i=(0,a.$)(".uMailWrite__textareaGhost");i.innerText=n,"\n"===last(n)&&(i.innerHTML+=" ");Q()}(i.text);"templates"===(0,E.getKeyboardType)()?fe():je();Ge(),K(),i&&!t.editing&&Array.isArray(i.msgs)&&(t.msgAttached[t.peerId]=i.msgs);if(i&&!t.editing&&isFinite(i.reply)){var r=f.default.getReplyDataFromHTML(i.reply);r&&(t.msgReply[t.peerId]=i.reply,n[i.reply]=r)}_e(),ve(t.peerId),(0,a.$$)(".uMailWrite__textarea").forEach(function(e){(0,b.setScrollView)(e,{topBanner:!1,overscrollY:!1})}),(0,a.$$)(".uMailWrite__attachments").forEach(function(e){(0,b.setScrollView)(e,{topBanner:!1,allowY:!1})})},reset:function(){(0,E.setKeyboardType)("")},loadTemplatePage:function(e,t,n){e.preventDefault(),uMessenger.loadMailPage(n)}}),uVK.onReady(X),C.default._onBlur=Te,C.default._onKeyUp=we,C.default._onKeyDown=Ce,C.default._onFocus=Pe,C.default._onInput=Ee,C.default._onSubmit=ye,C.default._onClick=Me,C.default._onAttachClick=pe,C.default._onStickersClick=ae,C.default._onKeyboardClick=oe,C.default._onKeyboardButtonClick=se,C.default._onDeleteTemplate=Ue,C.default._onConfirmDeleteTemplate=ze,C.default._onSendTouchEnd=be,C.default._onRetryFailedMsg=Ye,C.default._onDeleteFailedMsg=Qe,C.default._onCancelPendingMsg=Xe,C.default._onConfirmSendGeo=le,mediaUpload.onRemove(J),mediaUpload.onComplete(te),mediaUpload.onStart(Z),mediaUpload.onError(ee),post.onStickersTabSelected(Ae),post.onStickerClick(me),T.onSent(qe),T.onErrorMessage(Ke),f.default.onPendingClick($e),c.default.onOpen("uMailWrite_attachments")(Y),C.default.onToBottomClick(function(){var e=(0,a.$)(".uMailWrite__toBottom_visible");e&&e.classList.remove("uMailWrite__toBottom_visible"),l.default.removeDivider()}),C.default.onReplyClose(function(){var e=store.mail.cur;e.msgReply[e.peerId]=null,(0,E.setPeerDraft)(e.viewerId,e.peerId,{reply:void 0},e.editing),e.editing||ajaxRequest("/mail",{act:"reply_cancel",peer_id:store.mail.cur.peerId,hash:store.mail.hash.reply}),_e()}),C.default.onTemplateClick=function(e,t,n){var a;n&&(store.mail.cur.templates.some(function(e){if(e.id===n)return a=e,!0}),a&&Re((0,P.prepareTemplateText)(a.text)))},Mention.onOpen(function(){if(store.mail.cur){var e=store.mail.cur,t=e.peerMembers,n=e.peerId;t[n]||(t[n]=!0,ajaxRequest("/mail",{act:"get_members",peer_id:n},function(e){Object.assign(store.mail.members,e);var t=ke(n);Mention.update({items:t,defaultItems:t})},function(){t[n]=!1}))}});var O,B,L="uMailWrite__popupAttach_open",R="uMailWrite__popupStickers_open",N="uMailWrite__keyboard_open",j="uMailWrite__templates_open",F=!1,H={canAttachPoll:"uMailWrite_canAttachPoll"},V={mailWrite:".uMailWrite",pollAttachment:".attachment_type_poll"},U=!1,z=null,W=null,q=[],G=debounce(Ie,100),$=debounce(De,1e3);function Y(){function e(e,t){return e=e.replace(/&edit_msg_id=\d+/,"").replace(/=mailedit(-?\d+)/,"=mail$1"),store.mail.cur.editing&&(e=e.replace(/=mail(-?\d+)/,"=mailedit$1"),e+=t?"&edit_msg_id="+store.mail.cur.editing:""),e}(0,a.$$)("a.Unfold__item").forEach(function(t){var n=e(t.getAttribute("href"),!0);t.setAttribute("href",n)}),(0,a.$$)("input.inline_upload").forEach(function(t){t.setAttribute("data-upload-url",e(t.getAttribute("data-upload-url")))})}function Q(){var e=(0,a.$)(".uMailWrite__textareaGhost").offsetHeight;(0,a.$$)(".uMailWrite__textarea").forEach(function(t){return setStyle(t,"height",e)}),(0,a.$$)(".uMailWrite__main").forEach(function(t){return setStyle(t,"height",e)}),Ie()}function X(){if("/mail"===location.pathname||0===location.pathname.indexOf("/write")){var e=store.mail.cur;if(e&&e.peerId){var t=geBySel(".uMailWrite__attachments .medias_thumb").length,n=geBySel(".uMailWrite__attachments .medias_row").length,i=(e.msgAttached[e.peerId]||[]).length?1:0;e.hasAttachments=t+n+i>0,(0,a.$$)(".uMailWrite__attachments").forEach(function(t){toggleClass("uMailWrite__attachments_hasAttachments",t,e.hasAttachments)}),function(){var e=(0,a.$)(".uMailWrite__buttonAttach");if(!e)return;var t=(n=(0,a.$)(".uMailWrite__attachments"),(n?n.$$(".thumb_item").length+n.$$(".medias_row").length-n.$$(".fwd_item").length:0)>=10);var n;e.classList.add("uMailWrite__button_disabled",t),t?e.addEventListener("mousedown",Le,!0):e.removeEventListener("mousedown",Le,!0)}()}}}function K(){var e=store.mail.cur;e&&e.peerId&&(q=ke(e.peerId),Mention.init({defaultItems:q,items:q,appendTo:geByClass1("uMailWrite__main"),url:null,params:{},preferDomain:!0,afterInsert:function(t){var n=(0,a.$)(".uMailWrite__textareaGhost"),i=t.value;n.innerText=i,Q(),De(i,e.viewerId,e.peerId)}}))}function J(e){if(store.mail.cur){var t=store.mail,n=t.cur,i=t.peers,r=n.peerId;if(r&&(i[r].attachmentsHTML=geBySel1(".uMailWrite__attachments_".concat(r," .cp_attached_wrap")).outerHTML,ve(r)),e.closest(V.pollAttachment))(0,a.$)(V.mailWrite).classList.add(H.canAttachPoll)}}function Z(){store.mail.cur&&(X(),Ie())}function ee(){if(store.mail.cur){var e=store.mail,t=e.cur,n=(e.peers,t.peerId);n&&(ve(n),Messenger.scrollConvoToBottom())}}function te(){var e=store.mail,t=e.cur,n=e.peers;if(t){var a=t.peerId;a&&(n[a].attachmentsHTML=geBySel1(".uMailWrite__attachments_".concat(a," .cp_attached_wrap")).outerHTML,Ie())}}function ne(){var e=store.mail.cur,t=(0,a.$)(".uMailWrite__popupStickers");e&&t&&!t.childElementCount&&(t.innerHTML=e.stickersPanelHTML.replace(/mail0/g,"mail".concat(e.peerId)),(0,a.$$)(".sp_body",t).forEach(function(e){(0,b.setScrollView)(e,{topBanner:!1})}),(0,a.$$)(".scroller_wrap",t).forEach(function(e){(0,b.setScrollView)(e,{topBanner:!1,allowY:!1})}),post.stickersSelectTab(null,-1))}function ae(e){var t=(0,a.$)(".uMailWrite__popupStickers"),n=hasClass(R,t);e.preventDefault(),ne(),Ve("stickers"),n?ie():re()}function ie(){"stickers"===(0,E.getKeyboardType)()&&(0,E.setKeyboardType)("");var e=(0,a.$)(".uMailWrite__popupStickers");removeClass(R,e),xe(!1);var t=ge("stickers_panel");t&&"block"===t.style.display&&(t.style.display="none")}function re(){(0,E.setKeyboardType)("stickers");var e=(0,a.$)(".uMailWrite__popupStickers");addClass(R,e),post.stickersInit(),xe(!0)}function oe(e){var t=(0,a.$)(".uMailWrite__keyboard"),n=hasClass(N,t);e.preventDefault(),Ve("buttons"),n?ce({store:!0}):ue({store:!0})}function se(e,t,n){var a,i=n.authorId,o=n.inline,s=n.msgId,l=JSON.parse((0,w.replaceEntities)(n.action)),c=l.type,d=l.payload,f=l.rawLabel,h=store.mail,p=h.cur,v=h.members,g=h.peers,y=h.msgs,b=v[i],E=(0,m.random)();if(s){var C=y[s];a=C.peerId}else a=p.peerId;var M,P=g[a],T=f||"";if(a>=2e9)if(b.domain)M="@".concat(b.domain," ").concat(T);else{var D=b.url.replace(/^\//,"");M="@".concat(D," (").concat(b.firstName,") ").concat(T)}else M=T;var I=c,x=o?"inline":"normal";if("open_app"===I&&(I="app"),statlogsValueEvent("message_send_from_keyboard",0,p.viewerId,a,i,I,x),"vkpay"!==c)if("open_app"!==c)if("open_link"!==c){if("location"!==c)Be({act:"send",to:a,from:"dialog",hash:P.hashSend,message:M,media:"",_af:p._af,random_id:E,payload:d}),o&&!p.peerId&&nav.go((0,k.makeUrl)("/mail",{act:"show",peer:a,community:nav.getQuery("community")}));else S.default.init()?(A.default.setLoading(e,!0,"blue"),S.default.getCurrentPosition(function(t){var n=t.coords,i=n.latitude,o=n.longitude;A.default.setLoading(e,!1),MailDialog.open({body:lang.mobile_mail_geo_send_question,confirmText:lang.mobile_mail_geo_send_confirm,cancelText:lang.mobile_cancel,onConfirm:r.default.onClick("uMailWrite._onConfirmSendGeo",i,o,d,M,a)})},function(){A.default.setLoading(e,!1),u.init({text:lang.mobile_mail_geo_not_available})},{maximumAge:100,enableHighAccuracy:!0,timeout:1e4})):u.init({text:lang.mobile_mail_geo_not_available})}else{var O=l.link,B=(0,_.wrapAwayIfExternal)(O,!0);nav.hard_go(B)}else{var L=l.app_id,R=l.hash,N=(0,k.makeUrl)("/app".concat(L),{from:nav.cur.slice(1)});nav.hard_go("".concat(N,"#").concat(R))}else{var j=l.hash,F=(0,k.makeUrl)("/app6217559",{from:nav.cur.slice(1)});nav.hard_go("".concat(F,"#").concat(j))}}function le(e,t,n,a,i){var r=store.mail,o=r.cur,s=r.peers[i],l=(0,m.random)();Be({act:"send",to:i,from:"dialog",hash:s.hashSend,message:a,media:"",_af:o._af,random_id:l,payload:n,attach1_type:"map",attach1:"".concat(e,"_").concat(t)}),MailDialog.close(),nav.go((0,k.makeUrl)("/mail",{act:"show",peer:i,community:nav.getQuery("community")}))}function ce(e){"buttons"===(0,E.getKeyboardType)()&&(0,E.setKeyboardType)("");var t=(0,a.$)(".uMailWrite__keyboard");if(removeClass(N,t),Oe(!1),e&&e.store){var n=store.mail.cur.peerId,i=store.mail.peers[n];i&&i.keyboard&&(O[n]=i.keyboard.chat_local_id,lsSet("mail_keyboard_hidden",O))}}function ue(e){(0,E.setKeyboardType)("buttons");var t=(0,a.$)(".uMailWrite__keyboard"),n=e&&e.forceRender;addClass(N,t),Oe(!0);var i=(0,E.getKeyboardState)(store.mail.cur.peerId);!n&&!!i.rendered||function(){var e=store.mail,t=e.cur,n=e.peers,i=t.peerId&&n[t.peerId];if(!i||!i.keyboard||!i.keyboard.buttons)return;var r=o.default.render((0,M.default)({keyboard:i.keyboard})),s=(0,a.$)(".uMailWrite__keyboard");s.innerHTML=r,(0,b.setScrollView)(s,{topBanner:!1}),(0,E.getKeyboardState)(t.peerId).rendered=!0}(),e&&e.store&&de()}function de(){var e=store.mail.cur.peerId;O&&(delete O[e],lsSet("mail_keyboard_hidden",O))}function fe(){(0,E.setKeyboardType)("templates");var e=(0,a.$)(".uMailWrite__templates");addClass(j,e),Ie(),Fe()}function he(){"templates"===(0,E.getKeyboardType)()&&(0,E.setKeyboardType)("");var e=(0,a.$)(".uMailWrite__templates");removeClass(j,e),Ie()}function pe(e){var t=(0,a.$)(".uMailWrite__popupAttach"),n=(0,a.$)(".uMailWrite__popupStickers");e.preventDefault(),e.stopPropagation(),hasClass(R,n)&&removeClass(R,n),hasClass(L,t)?removeClass(L,t):(addClass(L,t),addEvent(window,"click",function e(n){removeClass(L,t);removeEvent(window,"click",e)}))}function Ae(){store.mail.cur&&(geByClass1("sp_body")&&(cur.scroller&&cur.scroller.destroy(),geByClass1("sp_body").scrollTop=0,removeClass("scroller_wrap",geByClass1("sp_cont")),geByClass("sp_page").forEach(function(e){return removeClass("scroller_page",e)})))}function me(e,t){if(store.mail.cur){var n=store.mail,i=n.cur,r=n.peers,o=(geByClass1("uMailWrite"),(0,a.$)(".uMailWrite__popupStickers")),s=(0,m.random)(),l=0===t.indexOf("suggestion"),c={act:"send",to:i.peerId,from:"dialog",hash:r[i.peerId].hashSend,message:"",media:"sticker".concat(e),_af:i._af,random_id:s,sticker_referrer:t},u=i.msgReply[i.peerId];if(u&&(c.attached_messages=u,c.has_reply=!0,(0,E.setPeerDraft)(i.viewerId,i.peerId,{reply:void 0}),ajaxRequest("/mail",{act:"reply_cancel",peer_id:store.mail.cur.peerId,hash:store.mail.hash.reply}),i.msgReply[i.peerId]=null),l){var d=(0,a.$)(".uMailWrite__textarea");d.value="",De("",i.viewerId,i.peerId),Ee({},d)}return Be(c),Ie(),_e(),F&&(removeClass(R,o),xe(!1)),!0}}function _e(){var e=store.mail,t=e.cur,n=e.replies,i=t.msgReply[t.peerId],r="";if(t.editing){var o=n[i];o&&(r=o.preview_url)}else{var s=i&&f.default.getElem(i);if(s){var l=(0,a.$)(".thumbs_map .thumb_map_img_as_div",s);(r=l&&l.style.backgroundImage)&&(r=r.replace(/^url\((['"])?/,"").replace(/(['"])?\)$/,""))}}(0,a.$$)(".uMailWrite__reply").forEach(function(e){e.outerHTML=(0,C.uMailWrite_Reply)(r)})}function ve(e){(0,a.$$)(".uMailWrite__attachments_".concat(e)).forEach(function(t){t.outerHTML=(0,C.uMailWrite_Attachments)(e)}),X(),(0,a.$)(".uMailWrite__textarea")&&Ie();var t=(0,a.$)(V.mailWrite);if(t){var n=!!t.$(V.pollAttachment);t.classList.toggle(H.canAttachPoll,!n)}}function ye(e){if(e&&e.preventDefault(),!mediaUpload.checkUploading())return!1;var t,n=(0,a.$)(".uMailWrite__textarea"),i=store.mail,r=i.cur,o=i.peers,c=(0,m.random)(),u=store.mail.cur.editing,d=u&&store.mail.msgs[u],f=d?{act:"edit_message",id:u,peerId:d.peerId,hash:o[r.peerId].hashSend}:{act:"send",to:r.peerId,from:"dialog",hash:o[r.peerId].hashSend,_af:r._af,random_id:c,entrypoint:store.mail.cur.mvk_entrypoint||""};if(!Ne())return d?MsgDeleteDialog.open({isEditing:!0}):r.groupId&&(t=(0,a.$)(".uMailWrite__templates"),Ve("templates"),hasClass(j,t)?he():fe()),!1;each(geByClass1("uMailWrite"),function(e,t){return!(t.name&&!t.disabled)||("radio"===t.type&&!t.checked||("checkbox"===t.type&&!t.checked||("button"===t.type||("submit"===t.type||("image"===t.type||void(f[t.name]=t.value))))))}),u?(uMailHat.onCancelEditing(!0),Be(f)):(Be(f),store.mail.cur.mvk_entrypoint="",(0,E.popPeerAttachments)(r.peerId),n.value="",De("",r.viewerId,r.peerId),(0,E.setPeerDraft)(r.viewerId,r.peerId,{msgs:void 0,reply:void 0},r.editing),r.msgReply[r.peerId]&&!r.editing&&ajaxRequest("/mail",{act:"reply_cancel",peer_id:store.mail.cur.peerId,hash:store.mail.hash.reply}),r.msgAttached[r.peerId]=[],r.msgReply[r.peerId]=null,Ee({},n)),l.default.onSystemMessageClick(),ve(r.peerId),_e(),StickersHints.actualizeVisibility(),g.isIOS?(n.focus(),setTimeout(function(){return n.focus()})):s.default.msie_edge||(n.focus(),requestAnimationFrame(function(){return n.focus()}))}function be(e){s.default.msie_edge&&(e.preventDefault(),ye(e))}function we(){var e=we,t=e.typingData||(e.typingData={});if(0!==(0,a.$)(".uMailWrite__textarea").value.length&&!store.mail.cur.editing){var n=Date.now(),i=store.mail,r=i.cur,o=i.peers,s=r.peerId;s<=-2e9||t[s]&&n-t[s]<5e3||(t[s]=n,ajaxRequest("/mail",{_ajax:1,act:"typing",peer:s,hash:o[s].hashTyping,community:nav.getQuery("community")}))}}function Ee(e,t){var n=(0,a.$)(".uMailWrite__textareaGhost"),i=t.value;n.innerText=i,"\n"===last(i)&&(n.innerHTML+=" ");var r=store.mail.cur,o=n.offsetHeight;(0,a.$$)(".uMailWrite__textarea").forEach(function(e){return setStyle(e,"height",o)}),(0,a.$$)(".uMailWrite__main").forEach(function(e){return setStyle(e,"height",o)}),G(),r&&$(i,r.viewerId,r.peerId),Se(e,t,function(){Mention.onKeyUp(e,t)})}function ke(e){var t=store.mail,n=t.peers,a=t.members,i=t.cur,r=n[e].memberIds||[],o=[],s=[];return r.forEach(function(e,t){if(e!==i.viewerId){var n=a[e];if(n){var r=[n.id,n.name,n.url.replace("/","@"),n.avatar,n.url.replace("/",""),null,null,null,n.firstName,n.domain];o.push(r)}else{var l=["fake"+t,"...","@...",a[0].avatar,"",null,null,null,"...",null];s.push(l)}}}),o.concat(s)}function Se(e,t,n){q.length&&(!hasClass("Mention_inited",geByClass1("uMailWrite__main"))&&K(),n(e,t))}function Ce(e,t){Se(e,t,function(){Mention.onKeyDown(e,t)}),(10==e.keyCode||13==e.keyCode&&(e.ctrlKey||e.metaKey))&&ye()}function Me(e,t){Se(e,t,function(){Mention.onClick(e,t)})}function Pe(e,t){(0,E.setKeyboardType)("text");var n=function(){ne(),Ve("text"),StickersHints.init({peerId:store.mail.cur.peerId}),Se(e,t,function(){Mention.onFocus(e,t)})};g.isIOS?n():requestAnimationFrame(function(){requestAnimationFrame(function(){n()})}),y.onOpen("bottom")}function Te(e,t){if("text"===(0,E.getKeyboardType)()&&(0,E.setKeyboardType)(""),y.onClose(),$._timer&&clearTimeout($._timer),store.mail&&store.mail.cur){var n=store.mail.cur,a=n.viewerId,i=n.peerId;De(t.value,a,i)}}function De(e,t,n){var a=store.mail.cur.editing;(0,E.setPeerDraft)(t,n,{text:e},a)}function Ie(){var e=store.mail,t=e.cur,n=(e.queue,e.flags);if(t.peerId){var i=!Ne(),o=!mediaUpload.checkUploading(),s=!!t.editing,l={sendActive:!i&&!s&&!o,loading:o,editAccept:s&&!i,editRemove:s&&i},c=n.templates&&!(s||!t.groupId||!i||l.loading||l.uploading);l.templates=c&&"templates"!==(0,E.getKeyboardType)(),l.templatesActive=c&&"templates"===(0,E.getKeyboardType)();var u=!(l.sendActive||l.loading||l.editAccept||l.editRemove||l.templates||l.templatesActive);l.disabled=u;var d=r.default.class("uMailWrite__button","uMailWrite__buttonSend",l);(0,a.$$)(".uMailWrite__buttonSend").forEach(function(e){return e.className=d})}}function xe(e){var t=r.default.class("uMailWrite__button","uMailWrite__buttonStickers",{active:e});(0,a.$$)(".uMailWrite__buttonStickers").forEach(function(e){return e.className=t})}function Oe(e){var t=r.default.class("uMailWrite__button","uMailWrite__buttonKeyboard",{active:e});(0,a.$$)(".uMailWrite__buttonKeyboard").forEach(function(e){return e.className=t})}function Be(e){if(store.mail.cur){var t=store.mail.cur,n=t.ref,a=t.refSource,i=e.to;if(a&&(e.ref_source=a,e.ref=n,store.mail.refSource=void 0,store.mail.ref=void 0),T.send(e),i){var r=store.mail.peers[i];if(r&&r.keyboard&&r.keyboard.one_time)r.keyboard=null,(0,E.getKeyboardState)(i).updateTime=Date.now(),je()}Ie()}}function Le(e){e.stopPropagation(),alert(lang.mobile_mail_attachments_limit)}function Re(e){var t=document.createElement("textarea");t.innerHTML=e;var n=t.value,i=(0,a.$$)(".uMailWrite__textarea");i.forEach(function(e){return e.value=n}),Ee({},i[0])}function Ne(){return function(){var e=store.mail,t=e.cur;e.peers;return!!t&&t.hasAttachments}()||!!(0,a.$)(".uMailWrite__textarea").value.trim()}function je(e){if((0,a.$)(".uMailWrite__keyboard")){var t,n=store.mail,i=n.cur,o=n.peers,s=i.peerId&&o[i.peerId];t=!(i.groupId||!s||s.closed||s.kicked)&&!(!s.keyboard||!s.keyboard.buttons.length);var l=(0,a.$)(".uMailWrite"),c=r.default.parseClass("uMailWrite",l.className);if(c.keyboard!==t&&(l.className=r.default.class("uMailWrite",Object.assign({},c,{keyboard:t}))),(0,E.getKeyboardState)(i.peerId).rendered=!1,t){O||(O=lsGet("mail_keyboard_hidden")||{});var u=s.keyboard,d=O[i.peerId],f=(e&&e.update,!(0,E.getKeyboardType)()||"buttons"===(0,E.getKeyboardType)()||"text"===(0,E.getKeyboardType)()),h=!1;d&&(d==u.chat_local_id?f=!1:h=!0),f?He("buttons",{store:h}):h&&de()}else ce()}}function Fe(){var e=store.mail,t=e.cur,n=e.peers,i=t.peerId&&n[t.peerId];if(t.groupId&&i&&!i.closed&&!i.kicked){var r=(0,a.$)(".uMailWrite__templatesBody"),o=t.templates;if(r)return o?void function(e,t){e.innerHTML=(0,P.uMailWrite_TemplatesContent)(t)}(r,o):(function(e){e.innerHTML=(0,P.uMailWrite_TemplatesLoading)()}(r),B||(B=new Promise(function(e){ajaxRequest("/mail",{act:"get_templates"},function(t){e(t)},function(t){e()})})),void B.then(function(e){B=null,store.mail&&store.mail.cur&&(store.mail.cur.templates=e),Fe()}))}}function He(e,t){switch(Ve(e),e){case"stickers":re();break;case"buttons":ue(t);break;case"text":(n=(0,a.$)(".uMailWrite__textarea"))&&n.focus();break;case"templates":fe()}var n}function Ve(e){var t;"stickers"!==e&&ie(),"buttons"!==e&&ce(),"text"!==e&&(t=(0,a.$)(".uMailWrite__textarea"))&&document.activeElement===t&&t.blur(),"templates"!==e&&he()}function Ue(e){var t=store.mail.cur.templates.find(function(t){return t.id===e});if(t){var n=lang.mobile_mail_templates_delete_popup_text;n=n.replace("{name}",(0,v.emojiToHTML)(t.name)),MailDialog.open({body:n,confirmText:lang.mobile_mail_delete_popup_delete,cancelText:lang.mobile_mail_delete_popup_cancel,onConfirm:r.default.onClick("uMailWrite._onConfirmDeleteTemplate",e)})}}function ze(e){var t=store.mail.cur.templates,n=t.findIndex(function(t){return t.id===e});if(-1!==n){var i=t[n],r=(0,a.$)(".uMailWrite__templatesRow".concat(i.id));i.deleting=!0,r.classList.add("uMailWrite__templatesRow_hidden"),ajaxRequest("/mail",{act:"delete_template",hash:store.mail.hash.templateDelete,id:e},function(n){if(n.error)We(e);else{var a=t.findIndex(function(t){return t.id===e});t.splice(a,1),Fe()}},function(){We(e)})}MailDialog.close()}function We(e){var t=store.mail.cur.templates,n=(0,a.$)(".uMailWrite__templatesRow".concat(e)),i=t.findIndex(function(t){return t.id===e}),r=t[i];r.deleting=!1,n.classList.remove("uMailWrite__templatesRow_hidden");var o=lang.mobile_mail_templates_delete_error;o=o.replace("{name}",r.name),u.init({text:o,action:{text:lang.mobile_mail_templates_toast_action_ok,callback:function(e,t){var n=t.id;u.close(n)}}})}function qe(){l.default.clearSystemMessage2(),remove(geByClass1("message__newMsgsDivider")),remove(geByClass1("Unfold__item_returnToChat"))}function Ge(){var e=store.mail,t=e.cur,n=e.presend,a=e.pendingReplies,i=[],r=n.failed[t.peerId]||[],o=n.pending[t.peerId]||[];(r.length||o.length)&&(r.concat(o).map(function(e){var t=n.msgs[e];if(t)if(0===t.sendId.indexOf("edit"))C.default.onMessage(t);else{if(t.reply){var r=f.default.getReplyDataFromHTML(t.reply);r&&(a[t.reply]=r)}i.push(t)}}),d.setMsgs(i))}function $e(e,t,n){var a;n?a=[(0,h.ModalMenuBtn)({inner:lang.mobile_mail_presend_menu_retry,onclick:["uMailWrite._onRetryFailedMsg","this",t]}),(0,h.ModalMenuBtn)({inner:lang.mobile_mail_presend_menu_delete,onclick:["uMailWrite._onDeleteFailedMsg","this",t]})]:a=[(0,h.ModalMenuBtn)({inner:lang.mobile_mail_presend_menu_cancel,onclick:["uMailWrite._onCancelPendingMsg","this",t]})];var i=(0,h.default)({class:"",close:!0,closeText:lang.mobile_mail_presend_menu_close,items:a});p.default.open(o.default.elem(i),!0)}function Ye(e,t){h.default.close(e);var n=store.mail.presend.msgs[t];(0,E.removeFailedMsg)(n),T.retry(t,function(e){var t=store.mail.cur.peerId,n=store.mail.peers[t];return e.data.hash=n.hashSend,e})}function Qe(e,t){h.default.close(e),T.remove(t)}function Xe(e,t){h.default.close(e),T.remove(t)}function Ke(e){u.init({duration:0,text:e,action:{text:lang.mobile_mail_templates_toast_action_ok,callback:function(e,t){var n=t.id;u.close(n)}}})}},ZoJ6:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var a=o(n("bZ/P")),i=o(n("9y81")),r=n("fdw3");function o(e){return e&&e.__esModule?e:{default:e}}var s=function(e){var t=window.lang,n=(0,r.isNewNavigation)(),o=e.query;return Wd.html({class:[Bem.class("mailFilter",{hasQuery:!!o}),e.mix],inner:[Wd.wrap((0,i.default)({icon:"search"})),{class:"mailFilter__input",tag:"input",placeholder:t.mobile_search,value:o,oninput:["MailFilter._onInput","this"],attrs:a.default.onFocus("MailFilter._onFocus")},{class:"mailFilter__right",inner:[n?null:Wd.wrap((0,i.default)({mix:"mailFilter__create",icon:"plus",url:e.createUrl})),Wd.wrap((0,i.default)({mix:"mailFilter__clear",icon:"close12",attrs:a.default.onMouseDown("MailFilter._onClearMouseDown","this")}))]}]})};t.default=s},Zoa4:function(e,t,n){"use strict";var a=u(n("+cqQ")),i=u(n("jk6M")),r=u(n("CkGd")),o=u(n("QBkA")),s=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("lQx8")),l=n("Qz23");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}}function d(){(0,l.cleanScrollView)(s.Messenger.getConvoBody()),removeEvent(s.Messenger.getConvoBody(),"touchstart",f,{passive:!0})}function f(e){var t=e.target.closest(".msg__sticker");t&&Msg.onStickerTouchStart(e,t),(t||e.target.closest(".msg"))&&Msg._onTouchStart()}function h(e,t){$$(".messenger__layer_".concat(e)).forEach(function(e){e.classList.toggle("messenger__layer_loading",t)})}function p(e){return $(".messenger__layer_".concat(e," .messenger__body"))}function A(e){s.Messenger.onMainScroll(e)}function m(e){s.Messenger.onConvoScroll(e),e._isScrolling=!0,function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null;return!window._preventedCheckTop&&(e&&function(e){return e.scrollHeight&&e.scrollTop<=2.5*window.innerHeight}(e))}(e)&&s.Messenger.onConvoAtTop(),function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null;return e&&function(e){return e.scrollHeight&&e.scrollHeight-e.scrollTop-e.offsetHeight<=1.5*window.innerHeight}(e)}(e)&&s.Messenger.onConvoAtBottom(),e._scrollingTimer&&clearTimeout(e._scrollingTimer),e._scrollingTimer=setTimeout(function(){e._isScrolling=!1},100)}function _(){var e=s.Messenger.getConvoBody();e&&(e.prevHeight&&e.prevHeight!==e.offsetHeight&&function(e,t){e.scrollTop=e.scrollHeight-e.offsetHeight-t}(e,e.scrollBottom),e.prevHeight=e.offsetHeight,e.scrollBottom=function(e){return e.scrollHeight-e.scrollTop-e.offsetHeight}(e),v&&requestAnimationFrame(_))}Object.assign(s.Messenger,{scrollMainBodyToTop:function(){$(".messenger__layer_main .messenger__body").scrollTop=0},onMainScroll:(0,a.default)("scrollElem"),onQueryChange:o.default.onChange,onQueryClear:o.default.onClear,onSearchMsgsClick:(0,a.default)(),setQuery:o.default.setQuery,setQuerySilently:o.default.setQuerySilently,getMainBody:function(e){return p("main")},setMainLoading:function(e){return h("main",e)},onConvoAtTop:(0,a.default)(),onConvoAtBottom:(0,a.default)(),onConvoScroll:(0,a.default)("scrollElem"),setConvoLoading:function(e){return h("convo",e)},getConvoBody:function(){return p("convo")},scrollConvoToBottom:function(){var e=s.Messenger.getConvoBody();e&&(e.scrollTop=e.scrollHeight)},redrawConvoLayer:function(){var e=(0,s.Messenger_renderConvoLayer)();d(),$$(".messenger__layer_convo").forEach(function(t){t.innerHTML=e})},cleanConvoBody:d,setupConvoBody:function(){(0,l.setScrollView)(s.Messenger.getConvoBody(),{topBanner:!1}),addEvent(s.Messenger.getConvoBody(),"touchstart",f,{passive:!0})},getPageLayer:function(){return $(".messenger__layer_page")}}),s.Messenger._onMainScroll=A,s.Messenger._onConvoScroll=m,s.Messenger._onSearchMsgsClick=s.Messenger.onSearchMsgsClick;var v=!1;if(s.default.startPolling=function(){v=!0,_()},s.default.stopPolling=function(){v=!1},Object.assign(s.default,{redraw:function(){$$(".uMessenger").forEach(function(e){return e.outerHTML=(0,s.default)()})},redrawView:function(){$$(".uMessenger").forEach(function(e){return e.className=(0,s.uMessenger_class)()});var e=store.mail,t=e.cur,n=e.peers;t.peerId&&(b(),r.default.togglePin(n[t.peerId].canPin));w()},redrawMailActions:function(){var e=(0,s.uMessenger_hasSelectedMsgs)();$$(".messenger__layer_convo").forEach(function(t){t.$(".messenger__footer").classList.toggle("messenger__footer_actionsOpen",e),r.default.update();var n=store.mail,a=n.cur,i=n.peers;if(!a.peerId||!i[a.peerId].isIncomingMR){var o=t.$(".messenger__write").offsetHeight,s=t.$(".messenger__acts").offsetHeight-o,l=t.$(".messenger__body");requestAnimationFrame(function(){!l._fixed&&s&&(l.style.paddingBottom=s+"px",l._fixed=!0),s<=0&&(l.style.paddingBottom=0,l._fixed=!1)})}})},redrawPinnedMsg:b,setPinnedVisibility:function(e){var t=store.mail,n=t.peers,a=t.cur,i=n[a.peerId].hasPinnedMsg;$$(".messenger").forEach(function(t){t.classList.toggle("messenger_pinnedVisible",i&&e),t.classList.toggle("messenger_pinnedHidden",i&&!e)})},redrawBanner:function(){var e=(0,s.uMessenger_getBanner)();$$(".messenger__banner").forEach(function(t){t.innerHTML=e,t.classList.toggle("messenger__bannerVisible",!!e)})},redrawMRsHint:w,expandPeerBefore:function(){if(!$(".load_before_closed"))return;var e=s.Messenger.getConvoBody();if(i.default.safari_mobile){var t=function(){var t=$$(".load_before_closed"),n=e.scrollHeight-e.scrollTop-e.offsetHeight;setStyle(e,"overflow","hidden"),t.forEach(function(e){return e.classList.remove("load_before_closed")});var a=e.scrollHeight-n-e.offsetHeight;setStyle(e,"overflow","auto"),e.scrollTop=a,AudioMessagePlayer.redrawWaves()};e.isScrolling?(y&&clearInterval(y),y=setInterval(function(){e.isScrolling||(clearInterval(y),t())},10)):t()}else if(e.scrollTop<=184){var n=$$(".load_before_closed"),a=e.scrollHeight-e.scrollTop-e.offsetHeight;n.forEach(function(e){return e.classList.remove("load_before_closed")});var r=e.scrollHeight-a-e.offsetHeight;e.scrollTop=r,AudioMessagePlayer.redrawWaves()}},scrollToMsg:function(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1],n=!(arguments.length>2&&void 0!==arguments[2])||arguments[2],a=Msg.getElem(e);if(!a)return!1;var i=s.Messenger.getConvoBody();if($(".mailScrap__loading_before"),t)i.scrollTop=a.offsetTop-.18*i.offsetHeight;else{var r=$(".typing_id_curConvo").offsetHeight;i.scrollTop=a.offsetTop-.5*(i.offsetHeight+2)+(a.offsetHeight+r)/2,a.offsetHeight>i.offsetHeight&&(i.scrollTop=a.offsetTop)}return n&&(addClass("msg_highlight",a),setTimeout(function(){removeClass("msg_highlight",a)},1500)),!0},loadMailPage:(0,a.default)()}),i.default.safari_mobile){var g=null;s.Messenger.onConvoScroll(function(e){e.isScrolling=!0,g&&clearTimeout(g),g=setTimeout(function(){return e.isScrolling=!1},50)})}var y=null;function b(){var e=store.mail,t=e.peers,n=e.cur,a=(0,s.uMessenger_getPinnedMsg)(),i=t[n.peerId].hasPinnedMsg;$(".messenger__pinned").innerHTML=a,MailHat_convo.setHasPinnedMsg(i)}function w(){var e=store.mail.cur,t=e.countMR,n=t&&"all"===e.folder&&!e.query&&!e.forwardFromId,a=$(".messenger__mrsHint");if(n){var i=t?(0,s.uMessenger_renderMRsHint)(t):"";a.innerHTML=i}a.classList.toggle("messenger__mrsHint_hidden",!n)}},"Zw+j":function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var a=function(e){var t=e.items.map(function(e){return{tag:"li",class:"OrderFieldsList__item",inner:[{inner:e.title,class:"OrderFieldsList__title",tag:"span"},{inner:Wd.wrap(e.text),class:"OrderFieldsList__text",tag:"span"}]}});return{tag:"ul",class:"OrderFieldsList ".concat(e.class?e.class:""),inner:t}};t.default=a},a0wW:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.FLAG_SUPPORTS_HISTORY_API=t.FLAG_GIF_AUTOPLAY=t.FLAG_MP4=t.default=void 0;var a,i=(a=n("jk6M"))&&a.__esModule?a:{default:a},r=n("J8bf");function o(e,t){for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AAYABhYL/QACIhgAPuC/rKgnKGWgQ+gANEBAAEQEAAYABhYL/QACIhgAPuC/rOgnKGWgRDtANEBAAEQEAAYABhYL/QACIhgAPuC/rOgnKGWgRI7ANEBAAEQEAAYABhYL/QACIhgAPuC/rIcU7trQOC7jLOBALeH94EB8YIUzLuNs4IBTbeH94EB8YIUzLuNs4ICm7eH94EB8YIUzLuNs4ID6LeH94EB8YIUzLuNs4IFNbeH94EB8YIUzLuNs4IGg7eH94EB8YIUzLuNs4IH0LeH94EB8YIUzLuNs4IJHbeH94EB8YIUzLuNs4IKa7eH94EB8YIUzLuNs4ILuLeH94EB8YIUzLuNs4INBbeH94EB8YIUzLuNs4IOU7eH94EB8YIUzLuNs4IPoLeH94EB8YIUzLuNs4IQ7beH94EB8YIUzLuNs4ISO7eH94EB8YIUzBFNm3SPTbuMU6uEH0O2dVOsghTM",append(r,n),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"),append(n,document.body);var o=ge("base64testvideo");if(i.default.mobile&&i.default.ios&&i.default.ios<10)return s.autoplay=!1,remove(n),t(!1),void clearTimeout(e.autoDetectTimeout);if(!i.default.safari_mobile||i.default.safari_mobile&&parseInt(i.default.version,10)>=10){var l=n.play();void 0!==l&&l.then(function(){s.autoplay=!0,remove(n),t(!0),clearTimeout(e.autoDetectTimeout)}).catch(function(a){s.autoplay=!1,remove(n),t(!1),clearTimeout(e.autoDetectTimeout)})}o.onplay=function(){s.autoplay=!0,remove(n),t(!0),clearTimeout(e.autoDetectTimeout)},e.autoDetectTimeout=setTimeout(function(){o.paused||(s.autoplay=!0),remove(n),t(s.autoplay)},250)}})}},{key:"getFlags",value:function(){return((0,r.getCookie)("remixff")||"").split("").map(function(e){return+e?"1":"0"}).join("")}},{key:"getFlag",value:function(e){var t=this.getFlags();return!!toInt(t[e])}},{key:"setFlag",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1],n=(0,r.getCookie)("remixff")||"",a=n.split("");e>=a.length&&(a=Array.from(Array(e),function(e,t){return a[t]||"0"})),a[e]=t?"1":"0";var i=a.join("");(0,r.setCookie)("remixff",i,10)}}],(n=null)&&o(t.prototype,n),a&&o(t,a),e}();onDOMReady(function(){l.detectMp4Support()});var c=l;t.default=c},a1OB:function(e,t,n){"use strict";function a(e){return(a="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 i(e,t){for(var n=0;n10){this._player=!1;var t=this._onReady;return t&&t(!1)}if(e&&e.paused){this._player=e;var n=this._onReady;n&&n(!0),this._onReady=null}else{var a=this;setTimeout(function(){a._checkFlashLoaded()},100)}}},{key:"type",get:function(){return"flash"}},{key:"loaded",get:function(){return!!this._player}}])&&i(t.prototype,n),r&&i(t,r),e}();t.PlayerFlash=r,window.VoicePlayerFlash=r,r.PLAYER_EL_ID="flash_voice"},aXSb:function(e,t,n){"use strict";var a=10;window.CreatePost={setMaxAttach:function(e){a=e},checkAttaches:function(){CreatePost.toggleEnableAttaches(mediaUpload.getAttachesCount()0&&void 0!==arguments[0])||arguments[0];geByClass("cp_attach_btn","feed_add_form").forEach(function(t){t.classList.toggle("cp_disabled_btn",!e)}),["photo","video","audio","doc","poll"].forEach(function(t){Unfold.toggleItemEnabled(Unfold.getByName("attaches"),t,e)})}}},"aiw/":function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.onOpen=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"default",t=(arguments.length>1&&void 0!==arguments[1]?arguments[1]:{}).exitIfStarted,n=void 0!==t&&t;if(!o.isIOS||o.iosMajor<8)return;if(u&&n)return;if(c)return;A=e,u=!0,f&&(clearTimeout(f),f=null);if("bottom"===e){if(((0,o.isLandscapePhone)()||!m&&!_)&&!r.onOpen())return;!m&&_&&i.onOpen(e),m&&a.onOpen()}else!m&&_&&i.onOpen(e);p.length&&p.forEach(function(e){return e()});c=!0,u=!1},t.onClose=function(){var e=(arguments.length>0&&void 0!==arguments[0]?arguments[0]:{}).exitIfStarted,t=void 0!==e&&e;if(!o.isIOS||o.iosMajor<8)return;if(d&&t)return;if(d=!0,"bottom"===A){if(((0,o.isLandscapePhone)()||!m&&!_)&&!r.onClose())return;if(!c)return;!m&&_&&i.onClose(),m&&a.onClose()}else!m&&_&&i.onClose();c=!1,d=!1,A=null,f&&clearTimeout(f);f=setTimeout(function(){scrollTo(0,0),h.length&&h.forEach(function(e){return e()})},10)},t.isKeyboardOpen=function(){return c},t.onCloseCallback=function(e){-1===h.indexOf(e)&&h.push(e)},t.offCloseCallback=function(e){var t=h.indexOf(e);-1!==t&&h.splice(t,1)},t.onOpenCallback=function(e){-1===p.indexOf(e)&&p.push(e)},t.offOpenCallback=function(e){var t=p.indexOf(e);-1!==t&&p.splice(t,1)};var a=l(n("QO40")),i=l(n("Z9Of")),r=l(n("GYEY")),o=n("H5mD");function s(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return s=function(){return e},e}function l(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]}}return n.default=e,t&&t.set(e,n),n}var c=!1,u=!1,d=!1,f=null,h=[],p=[],A=null,m=o.isScrollBasedViewport&&(o.isIPad||o.isWKWebView),_=o.isScrollBasedViewport&&o.iosMajor<=12},bRFj:function(e,t,n){"use strict";window.Friends={onImportSuccess:befall("serviceId","friendsHtml","total"),onImportFailed:befall("serviceId"),accept:function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"",a=arguments.length>3&&void 0!==arguments[3]?arguments[3]:null,r=arguments.length>4&&void 0!==arguments[4]?arguments[4]:"",s=arguments.length>5&&void 0!==arguments[5]?arguments[5]:"",l=arguments.length>6&&void 0!==arguments[6]?arguments[6]:o,c=arguments.length>7&&void 0!==arguments[7]?arguments[7]:o;h(i,e,t,n,a,r,s,l,c)},decline:function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"",a=arguments.length>3&&void 0!==arguments[3]?arguments[3]:null,i=arguments.length>4&&void 0!==arguments[4]?arguments[4]:"",s=arguments.length>5&&void 0!==arguments[5]?arguments[5]:"",l=arguments.length>6&&void 0!==arguments[6]?arguments[6]:o,c=arguments.length>7&&void 0!==arguments[7]?arguments[7]:o;h(r,e,t,n,a,i,s,l,c)},makeImportRequest:function(e,t,n){if(!window.XMLHttpRequest)return void(window.location=e);ajax.plainpost(e,{_ajax:1},function(e){return function(e,t,n){var a=parseJSON(e),i=a.user,r=a.user_hash,o=a.contacts,h=s+n;if(a.error)return void p(n);ajax.post(h,{_ajax:1,user:i,userhash:r,hash:t,contacts:o},{onDone:function(e,t){return function(e,t,n){var a=geByClass1(l),i=geByClass1(u);addClass(c,a),i&&(i.innerHTML=t,addClass(d,i));autoScroll(function(){return geByClass1(f)},ImportedFriends,{no_cache:!0}),Friends.onImportSuccess(e,t,n),window.opener&&window.opener.Friends.onImportSuccess(e,t,n)}(n,e,t)},onFail:function(){return p(n)}})}(e,t,n)},function(){return p(n)},!0)}};var a="/friends",i="accept",r="decline",o=null,s="/friends.php?act=save_contacts&type=",l="friendsImport__loading",c=l+"_hidden",u="friendsImport__result",d=u+"_shown",f="friendsList__footerBtn_showMore";function h(e,t,n,i,r,o,s,l,c){var u={act:e,hash:n,id:t};i&&(u.from=i),r&&(u.block_id=r),o&&(u.ref=o),s&&(u.track_code=s);var d=a+obj2qs(u);ajax.post(d,{_ajax:1},{onDone:l,onFail:c})}function p(e){Friends.onImportFailed(e),window.opener&&(window.opener.Friends.onImportFailed(e),window.close())}},bYEY:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var a,i=(a=n("iGfS"))&&a.__esModule?a:{default:a};var r=i.default;t.default=r,window.uBell=i.default},"bZ/P":function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var a,i=(a=n("SRbS"))&&a.__esModule?a:{default:a};n("zb1z"),n("dbQR"),n("l90V"),n("c0X5");var r=i.default;t.default=r,window.q=i.default},blmJ:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var a,i=(a=n("0Zid"))&&a.__esModule?a:{default:a};var r=i.default;t.default=r,window.PrometheusEditConfirm=i.default},"bvP/":function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.initAutogrow=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:3,n=ce("span");setStyle(n,{width:"".concat(e.clientWidth,"px")}),n.innerText="_",append(n,e.parentNode);var a=n.clientHeight;addEvent(e,"input",function(){n.innerText=e.value,e.rows=Math.max(1,Math.min(t,Math.ceil(n.clientHeight/a)))})}},c0X5:function(e,t,n){"use strict";var a,i=(a=n("SRbS"))&&a.__esModule?a:{default:a};Object.assign(i.default,{class:function(){for(var e=[],t=null,n=arguments.length,a=new Array(n),i=0;i1)||a[1]}}),n}})},cGUQ:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.fromQueryString=function(e){if(!e)return{};var t={};return e=e.split("&"),(0,a.each)(e,function(e,n){var a=n.split("=");if(a[0]){var i=o(a[1]+"");if("[]"===a[0].substr(a.length-2)){var r=o(a[0].substr(0,a.length-2));t[r]||(t[r]=[]),t[r].push(i)}else t[o(a[0])]=i}}),t},t.toQueryString=function(e,t){var n=[];for(var i in e)if(e.hasOwnProperty(i)&&null!=e[i]&&!(0,a.isFunction)(e[i]))if((0,a.isArray)(e[i]))for(var o=0,s=0,l=e[i].length;o=Emoji.favoriteLimit&&!Emoji.favoriteLimitNoticed){var r=langStr(getLang("purchases_stickers_favorite_limit_notice"),"%s",Emoji.favoriteLimit);return setTimeout(showFastBox(getLang("global_error"),r).hide,3e3),ajax.post("stickers.php",{act:"favorite_limit_noticed",value:1}),Emoji.favoriteLimitNoticed=!0,!1}var o=attr(e,"data-sticker-id"),s=attr(e,"data-hash");return!(!o||!s)&&(!a[o]&&(a[o]=1,toggleClass(e,"on"),void ajax.post("/stickers.php",{act:"toggle_favorite",sticker_id:o,hash:s},{onDone:i.pbind(n,o,e)})))},getStickerUrl:function(e,t){var n={id:e,size:t};return window.isMVK?rs(window.store.stickers.url_template,n):getTemplate("stickers_sticker_url",n)}};t.Stickers=r},dVvW:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.uMailWrite_Reply=M,t.uMailWrite_Attachments=P,t.uMailWrite_ToBottomInner=S,t.default=void 0;var a=u(n("bZ/P")),i=(u(n("TYsd")),u(n("Mc5h"))),r=u(n("9y81")),o=u(n("AXyT")),s=u(n("gy8s")),l=(u(n("29dZ")),u(n("Y6JH"))),c=n("/Id8");u(n("BoyB"));function u(e){return e&&e.__esModule?e:{default:e}}function d(){var e=E(['\n \n ']);return d=function(){return e},e}function f(){var e=E(['\n \n ',"\n ","\n ",'\n
',"
\n
\n "]);return f=function(){return e},e}function h(){var e=E(['\n \n "]);return h=function(){return e},e}function p(){var e=E(['\n \n ',"\n ","\n ","\n
\n "]);return p=function(){return e},e}function A(){var e=E(['\n \n ']);return A=function(){return e},e}function m(){var e=E(['\n
\n ']);return m=function(){return e},e}function _(){var e=E(['\n \n\n
\n ']);return _=function(){return e},e}function v(){var e=E(['\n
\n ']);return v=function(){return e},e}function g(){var e=E(['\n \n
','
\n
",'
\n
","",'
\n
\n ","\n ","\n ","\n ","\n ","\n ","\n ",'\n \n
\n
\n ']);return g=function(){return e},e}function y(){var e=E(["\n ","\n ","\n "]);return y=function(){return e},e}function b(){var e=E(['\n \n "]);return b=function(){return e},e}function w(){var e=E(['\n \n "]);return w=function(){return e},e}function E(e,t){return t||(t=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(t)}}))}var k=function(){var e=window.lang,t=store.mail,n=t.cur.peerId;if(!n)return'';var o=t.peers[n];if(o.unableToWrite){if(o.isChannel)return"";var c=o.kickedMessage||e.mobile_msg_mail_privacy_error,u=(0,r.default)({mix:"uMailWrite__unableToWriteIcon",icon:"warning"});return a.default.html(w(),u,c)}var d=a.default.onSubmit("uMailWrite._onSubmit","event","this"),f=a.default.onClick("uMailWrite.onToBottomClick"),h=(0,i.default)({mix:"uMailWrite__popupStickers _preventMenuOpen",inner:""}),p=M(null),v=P(n),y=function(e){var t=window.lang,n=store.mail,i=n.cur,o=n.queue,c=("/attachments?act=stickers&target=mail".concat(e),a.default.onMouseDown("uMailWrite._onStickersClick","event")),u=a.default.onMouseDown("uMailWrite._onKeyboardClick","event"),d=n.peers[e],f=i.groupId,h=Math.abs(f),p=f?"&community=".concat(h):"",A=(0,s.default)({icon:"attach",name:"uMailWrite_attachments",position:"bottomLeft",items:[{text:i.inlineUploadHTML.replace(/mail\d+/g,"mail".concat(e)),icon:(0,l.default)("mail-attachments","camera_24")},{text:t.mobile_attachments_add_photo_vk,url:"/attachments?act=choose_photo&target=mail".concat(e).concat(p),icon:(0,l.default)("mail-attachments","gallery_24")},{text:t.mobile_attachments_add_video,url:"/attachments?act=choose_video&target=mail".concat(e).concat(p),icon:(0,l.default)("mail-attachments","video_24")},{text:t.mobile_attachments_add_audio,url:"/attachments?act=choose_audio&target=mail".concat(e).concat(p),icon:(0,l.default)("mail-attachments","music_24")},{text:t.mobile_attachments_add_doc,url:"/attachments?act=choose_doc&target=mail".concat(e).concat(p),icon:(0,l.default)("mail-attachments","document_24")},d.canSendGift?{text:t.mobile_attachments_add_gift,url:"/gifts".concat(e,"?act=send&from=mail&ref=media_selector"),icon:(0,l.default)("mail-attachments","gift_24")}:null,d.canAttachMoney?{text:t.mobile_attachments_add_money,url:"/attachments?act=attach_money&target=mail".concat(e).concat(p),icon:(0,l.default)("mail-attachments","money_transfer_24")}:null,d.canAttachPoll?{text:t.mobile_attachments_add_poll,url:"/attachments?act=attach_poll&target=mail".concat(e).concat(p),icon:(0,l.default)("mail-attachments","poll_24"),mix:"uMailWrite__pollUnfoldItem"}:null]}),_=a.default.onKeyUp("uMailWrite._onKeyUp"),v=a.default.onInput("uMailWrite._onInput","event","this"),y=a.default.onKeyDown("uMailWrite._onKeyDown","event","this"),b=a.default.onFocus("uMailWrite._onFocus","event","this"),w=a.default.onBlur("uMailWrite._onBlur","event","this"),E=a.default.onClick("uMailWrite._onClick","event","this"),k=a.default.onTouchEnd("uMailWrite._onSendTouchEnd","event","this"),S=(0,r.default)({mix:"uMailWrite__buttonSendIcon",icon:"send"}),M=(0,r.default)({mix:"uMailWrite__buttonSendIcon",icon:"send",active:!0}),P=C("accept"),T=C("remove"),D=C("templates"),I=C("templatesActive"),x=(0,r.default)({mix:"uMailWrite__buttonSendIcon",icon:"spinner"}),O=(0,r.default)({mix:"uMailWrite__buttonStickersIcon",icon:"sticker"}),B=(0,r.default)({mix:"uMailWrite__buttonStickersIcon",icon:"sticker",active:!0}),L=a.default.html(m()),R=d.attachmentsHTML.length,N=i.msgAttached[i.peerId],j=N&&N.length,F=!!(o[i.peerId]||[]).length,H=a.default.class("uMailWrite__button","uMailWrite__buttonSend",{send:!0,sendActive:!!(R>150||j),loading:F});return a.default.html(g(),A,u,L,c,O,B,H,k,S,M,x,P,T,D,I,t.mobile_mail_message_placeholder,b,_,v,y,b,w,E)}(n),E=a.default.html(_()),k=function(){var e=window.lang,t=(0,r.default)({icon:"plus"}),n=store.mail.cur.peerId,i=store.mail.cur.communityParam,o="/mail?act=template&from="+n+i,s=a.default.onClick("uMailWrite.loadTemplatePage","event","this",o);return a.default.html(A(),e.mobile_mail_templates_panel_title,o,s,t)}(),T=S(),D=a.default.class("uMailWrite",{canAttachMoney:!!o.canAttachMoney,canAttachPoll:!0});return a.default.html(b(),D,n,o.hashSend,t.cur.communityParam,d,f,T,p,v,y,h,E,k)};function S(){var e=store.mail,t=e.cur,n=e.peers,i=n[t.peerId]?n[t.peerId].countUnread:null,s=i?(0,o.default)({mix:"uMailWrite__toBottomValue",value:i}):"",l=(0,r.default)({mix:"uMailWrite__toBottomIcon",icon:"arrowDown"});return a.default.html(y(),s,l)}function C(e){return a.default.html(v(),e)}function M(e){var t=store.mail.cur,n=store.mail.members,i=t.peerId,r=t.msgReply[i],o=null;r&&(o=store.mail.forwards[r]||store.mail.msgs[r]);var s="",l="";if(o){var u=(0,c.Msg__authorName)(n[o.authorId],i,t.userId);s=(0,c.Msg__reply)(o,u,e),l='\n \n \n '),t.editing&&(l+='\n \n ')}var d=a.default.class("uMailWrite__reply",{visible:!!s}),f=MailButton({class:"uMailWrite__replyClose",onClick:a.default.onClick("uMailWrite.onReplyClose")});return a.default.html(p(),d,s,f,l)}function P(e){var t=store.mail,n=t.cur,i=t.peers[e].attachmentsHTML,o=a.default.class("uMailWrite__attachments",function(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}({},e,!0)),s=n.msgAttached[e]||[],l=s.length,c="";l>0&&(c=function(e,t){var n=window.lang,i=a.default.onClick("uMailWrite.onAttachedMsgsRemove"),o=(0,r.default)({mix:"uMailWrite__attachedMsgsIcon",icon:"msgMini"}),s=(0,r.default)({mix:"uMailWrite__attachedMsgsRemove",icon:"close9",attrs:i}),l=langNumeric(e,n.mobile_mail_messages),c=function(e){return a.default.html(d(),e)}(t);return a.default.html(f(),c,s,o,l)}(l,s.join(";")));return a.default.html(h(),o,c,i)}t.default=k},dbQR:function(e,t,n){"use strict";var a,i=(a=n("SRbS"))&&a.__esModule?a:{default:a};function r(e,t){return"".concat(e,'="').concat(t,'"')}function o(e){return function(){for(var t=arguments.length,n=new Array(t),a=0;a /g,">")}Object.assign(i.default,{attr:r,onBlur:o("onblur"),onClick:o("onclick"),onFocus:o("onfocus"),onInput:o("oninput"),onKeyDown:o("onkeydown"),onKeyPress:o("onkeypress"),onKeyUp:o("onkeyup"),onMouseDown:o("onmousedown"),onMouseUp:o("onmouseup"),onScroll:o("onscroll"),onSubmit:o("onsubmit"),onTouchEnd:o("ontouchend"),onTouchMove:o("ontouchmove"),onTouchStart:o("ontouchstart"),onWheel:o("onwheel"),onChange:o("onchange")})},eFmH:function(e,t,n){"use strict";var a,i=(a=n("jk6M"))&&a.__esModule?a:{default:a},r=n("H5mD");function o(e,t,n){if(r.isWKWebView){attr(t,"onclick",""),attr(t,"href","vk://vk.com/write"+(2e9+e));var a=new Event("click");return t.dispatchEvent(a),void setTimeout(function(){attr(t,"href","/mail?act=show&chat="+e),t.textContent=n})}i.default.android?location.href="https://vk.com/write"+(2e9+e):r.isIOS?(attr(t,"onclick",""),attr(t,"href","/mail?act=show&chat="+e),t.textContent=n,location.href="vk://vk.com/write"+(2e9+e)):location.href="/mail?act=show&chat="+e}window.ChatPreview={join:function(e,t,n){return ajax.post(e,{},{onDone:function(e){o(e,t,n)}}),!1},open:function(e,t,n){return setTimeout(function(){o(e,t,n)}),!1}}},eGQV:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.init=u,t.isStandalone=function(){return c},t.isOfflineCapable=d;var a=o(n("i/4A")),i=o(n("50sn")),r=o(n("OGfC"));function o(e){return e&&e.__esModule?e:{default:e}}var s,l=new a.default;window.sw_client=l,window.SWClient=a.default,window.initPushNotifier=function(){try{window.PushNotifier=r.default,window.pushNotifier=new r.default(l,a.default)}catch(e){}};var c=!1;function u(){window.addEventListener&&(!function(){if(c=!0===navigator.standalone||window.matchMedia&&matchMedia("(display-mode: standalone)").matches,!history.replaceState)return;var e=location.search;if((e=(e=(e=e.replace(/(\?|&)mode\=([^&]+)(&)?/,"$1")).replace(/(\?|&)__appshell_fallback\=([^&]+)(&)?/,"$1")).replace(/(\?|&)+$/,""))!==location.search){var t=location.pathname+e+location.hash;history.replaceState(null,"",t)}}(),function(){if(!a.default.isSupported())return;l.listenMessages(),navigator.serviceWorker.addEventListener("message",function(e){var t=e.data;t&&t.action&&"update-ready"===t.action&&(hasUpdate=!0)})}(),window.addEventListener("beforeinstallprompt",function(e){e.preventDefault()}),window.addEventListener("appinstalled",function(){statlogsValueEvent("pwa_installed_event",1)}),"complete"===document.readyState?f():window.addEventListener("load",function(){f()}))}function d(){return void 0===s&&(s=!(!a.default.isSupported()||!navigator.serviceWorker.controller)),s}function f(){window.vk&&window.vk.sw&&(l.register(window.vk.sw).then(function(e){},function(e){if(e!==a.default.SW_NOT_AVAILABLE_ERROR)throw e}),a.default.isSupported()&&navigator.serviceWorker.getRegistration().then(function(e){!function(e){if(!d())return;e&&e.active&&e.installing&&e.installing.postMessage({action:"activate"})}(e)}),(0,i.default)())}u()},eR1x:function(e,t,n){"use strict";var a=n("UxAg"),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("NSb7"));function r(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return r=function(){return e},e}Object.assign(i.default,{setTyping:function(e,t){var n="string"==typeof e?(0,a.$)(".typing_id_".concat(e)):e,r=n.$(".typing__names");n.classList.toggle("typing_empty",(0,i.TypingIsEmpty)(t.typingCount)),r.innerHTML=(0,i.TypingRenderNames)(t)},getElem:function(e){return(0,a.$)(".typing_id_".concat(e))}})},eVa8:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getAudioPerformers=function(e){var t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],n="",o=!(0,a.isPodcast)(e)&&t;isArray(e[r.AUDIO_PLAYER_ENUMS.AUDIO_ITEM_INDEX_MAIN_ARTISTS])&&(n=(0,i.getAudioArtistsString)(e[r.AUDIO_PLAYER_ENUMS.AUDIO_ITEM_INDEX_MAIN_ARTISTS],o));isArray(e[r.AUDIO_PLAYER_ENUMS.AUDIO_ITEM_INDEX_FEAT_ARTISTS])&&(n+=" feat. ",n+=(0,i.getAudioArtistsString)(e[r.AUDIO_PLAYER_ENUMS.AUDIO_ITEM_INDEX_FEAT_ARTISTS],o));if(!n){var s=e[r.AUDIO_PLAYER_ENUMS.AUDIO_ITEM_INDEX_PERFORMER]?e[r.AUDIO_PLAYER_ENUMS.AUDIO_ITEM_INDEX_PERFORMER].replace(/<\/?em>/g,""):"";if(o){var l="/audio?performer=1&q="+encodeURIComponent(s);n='').concat(s," ")}else n=s}return n};var a=n("W0fz"),i=n("TGUg"),r=n("uk5P")},eZEc:function(e,t,n){"use strict";var a;Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var i=((a=n("Zw+j"))&&a.__esModule?a:{default:a}).default;t.default=i},el8Q:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var a=o(n("29dZ")),i=o(n("r/ag")),r=o(n("p5n7"));function o(e){return e&&e.__esModule?e:{default:e}}var s=function(e){return(0,i.default)({class:"CartQtyPopup",content:[{inner:[{class:"CartQtyPopup__message",inner:[{class:"CartQtyPopup__messageTitle",inner:lang.mobile_market_cart_change_quantity_title},{class:"CartQtyPopup__messageText",inner:lang.mobile_market_cart_change_quantity_text}]},{tag:"table",attrs:{cellpadding:0,cellspacing:0,border:0},inner:{tag:"tr",inner:[{tag:"td",class:"CartQtyPopup__inputWrapper",inner:(0,r.default)({value:e.quantity,on_change:["Cart.view.setQuantity","this"],on_key_down:"void",maxlength:10,type:"number",spellcheck:lang.mobile_market_cart_change_quantity_text})},{tag:"td",inner:{inner:langNumeric("",lang.mobile_market_items_count_short),class:"CartQtyPopup__pc"}},{tag:"td",inner:(0,a.default)({inner:lang.mobile_market_cart_change_quantity_button,on_click:"Cart.view.changeQuantity",size:"large",attrs:{"data-item-id":e.id}})}]}}]}]})};t.default=s},eoxF:function(e,t,n){"use strict";var a=function(){var e=null,t=!1,n=!1,i={},r=[],o=0,s=null,l="",c="";function u(e,t){return!t&&v(e)}function d(e){n=!1;var a=ge("medias_map"),i=ge("attached_wrap");a||(a=ce("div",{id:"medias_map",className:"pi_medias"}),append(a,i));var r=+e[1]||0,o=e[3]||"",s=e[4]||"",l=e[5]||"",c=(+e[6].lat||0)+"_"+(+e[6].lng||0),u=geByClass1("medias_map",a),d='
'+o+(l?", "+l:s?", "+s:"")+"
",f=' ';if(u)val(u,d+f);else{d=''+d+f+"
";val(a,d)}addClass("cp_geo_btn_sel","geo_btn"),t=!0,show(a)}function f(t){return v(e)}function h(){val("place_add_box",""),hide("place_add_box"),show("places_box")}function p(t,n){A();var a=i[n];a&&(e={latitude:+a[6].lat||0,longitude:+a[6].lng||0},n?d(a):m(e,a))}function A(e){if(!s)return!0;val("m",s),s=null,scrollToEl(geByClass1("create_post_extra","mcont"));var t=nav.path+(nav.params?"?"+nav.params:"");return nav.go(t,null,{push_only:!0,no_push:e}),!1}function m(e,a){n=!0;var i=ge("medias_map"),r=ge("attached_wrap");i||(i=ce("div",{id:"medias_map",className:"pi_medias"}),r.appendChild(i));var o=e.latitude,s=e.longitude,l=(window.devicePixelRatio,a&&a[4]||!1),c=geByClass1("medias_map",i),u=l?'
'+l+"
":"",d=' ';c?val(c,u+""+d):val(i,''+u+d+"
");t=!0,addClass("cp_geo_btn_sel","geo_btn"),show(i)}function _(){e=null,i={},r=[],o=0,ajax.post(c,{_ajax:1}),remove("medias_map")}function v(e){var t=window.al;remove("feed_extra_field");var n=Math.round(1e8*e.latitude)/1e8,a=Math.round(1e8*e.longitude)/1e8,i=gpeByTag("form","geo_btn"),r=ce("input",{id:"feed_extra_field",type:"hidden",name:"add_place",value:n+","+a});if(!i)return nav.go(nav.path+"?act=places&lat="+n+"&lng="+a);var o=!1;return each(i,function(e,t){if("submit"===t.type)return o=t,!1}),o?(append(r,i),window.al&&t.ver?nav.go(o,null,{removeAfterNextResponse:!1}):i.submit()):void 0}function g(t){t&&t.coords&&u(e={latitude:+t.coords.latitude||0,longitude:+t.coords.longitude||0})}function y(e){a.remove(),hide("geo_waiting")}return{toggle:function(){t?a.remove():a.add()},addNewPlace:function(){var t=val("place_name_fld"),n=val("place_address_fld");return t?(lockButton("place_add_btn"),ajax.post("/places.php",{_ajax:1,act:"add_place",latitude:e.latitude,longitude:e.longitude,title:t,address:n,hash:l},{onDone:function(e,t){if(unlockButton("place_add_btn"),e){var n={};n[e]=t,extend(i,n),r.splice(r[0]?0:1,0,e),h(),p(null,e)}},onFail:function(){unlockButton("place_add_btn");var e=Array.prototype.slice.call(arguments),t=e.shift(),n=ge("place_add_form");switch(t){case 2:n&&n.submit()}}}),!1):(elfocus("place_name_fld"),!1)},addPlaceShow:function(t,n){var a=window.lang,i="/places.php"+obj2qs({act:"add_place",latitude:e.latitude,longitude:e.longitude,hash:l});val("place_add_box",'"),val("place_name_fld",unescapeAttr(t)||""),val("place_address_fld",unescapeAttr(n)||""),hide("places_box"),show("place_add_box"),t?elfocus("place_address_fld"):elfocus("place_name_fld")},addPlaceCancel:h,selectPlace:p,changePlace:f,back:A,refreshCurrentPosition:function(){geo.getCurrentPosition(g,y)},getCurrentAddress:function(){return i[0]&&i[0][5]||""},savePlaces:function(e){extend(i,e)},add:function(n){if(!n&&t)return f();n&&(n.latitude||n.longitude)&&n.place?(e={latitude:+n.latitude||0,longitude:+n.longitude||0},n.place[1]?d(n.place):m(e,n.place),u(e,!0)):(geo.getCurrentPosition(g,y),show("geo_waiting"))},add_place:function(n){if(!n&&t)return f();n&&(n.latitude||n.longitude)&&n.place?(e={latitude:+n.latitude||0,longitude:+n.longitude||0},n.place[1]?d(n.place):m(e,n.place),u(e,!0)):(geo.getCurrentPosition(g,y),show("geo_waiting"))},remove:function(){t=!1,removeClass("cp_geo_btn_sel","geo_btn"),_()},stash:function(a){if(!a)return[e,t,n,i,r,o,s];e=a[0],t=a[1],n=a[2],i=a[3],r=a[4],o=a[5],s=a[6]},init:function(u,d,f){return hide("geo_waiting"),e=null,t=!1,n=!1,i={},r=[],o=0,s=null,l=d||"",c=f||"",u&&a.add(u),geo.init()}}}();window.checkin=a},eyw1:function(e,t,n){"use strict";var a=function(){var e="/club",t="enter",n="leave",a=null;function i(t,n,a,i,r,o){var s=e+n+obj2qs({act:t,hash:a,id:n,from:i});ajax.post(s,{_ajax:1},{onDone:r,onFail:o})}return{enter:function(e,n,r){var o=arguments.length>3&&void 0!==arguments[3]?arguments[3]:a,s=arguments.length>4&&void 0!==arguments[4]?arguments[4]:a;i(t,e,n,r,o,s)},leave:function(e,t,r){var o=arguments.length>3&&void 0!==arguments[3]?arguments[3]:a,s=arguments.length>4&&void 0!==arguments[4]?arguments[4]:a;i(n,e,t,r,o,s)}}}();window.Groups=a},f01n:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.deleteEvent=function(e){var t=i(e,2)[1];return{type:r,localId:t}},t.replaceFlagsEvent=function(e){var t=i(e,4),n=t[1],a=t[2],r=t[3];return{type:s,messageId:n,mask:a,peerId:r}},t.setFlagsEvent=function(e){var t=i(e,4),n=t[1],a=t[2],r=t[3];return{type:o,messageId:n,flags:a,peerId:r}},t.resetFlagsEvent=function(e){var t=i(e,4),n=t[1],a=t[2],r=t[3];return{type:l,messageId:n,flags:a,peerId:r}},t.addMessageEvent=V,t.editMessageEvent=function(e){var t=V(e);return t.type=L,t},t.replaceMessageEvent=function(e){var t=V(e);return t.type=R,t},t.editMessageLocallyEvent=function(e){return extend({},e,{type:L})},t.readInboundEvent=function(e){var t=i(e,4),n=t[1],a=t[2],r=t[3];return{type:u,peerId:n,upToId:a,unread:r}},t.readOutboundEvent=function(e){var t=i(e,4),n=t[1],a=t[2],r=t[3];return{type:d,peerId:n,upToId:a,unread:r}},t.gotOnlineEvent=function(e){var t=i(e,4),n=t[1],a=t[2],r=t[3];return{type:f,userId:-n,platform:a,lastSeenTs:r}},t.gotOfflineEvent=function(e){var t=i(e,4),n=t[1],a=t[2],r=t[3];return{type:h,userId:-n,reason:a,lastSeenTs:r}},t.resetDirectoriesEvent=function(e){var t=i(e,4),n=t[1],a=t[2],r=t[3];return{type:w,peerId:n,mask:a,local:void 0!==r&&r}},t.replaceDirectoriesEvent=function(e){var t=i(e,3),n=t[1],a=t[2];return{type:E,peerId:n,mask:a}},t.setDirectoriesEvent=function(e){var t=i(e,4),n=t[1],a=t[2],r=t[3];return{type:k,peerId:n,mask:a,local:void 0!==r&&r}},t.deleteDialogEvent=function(e){var t=i(e,3),n=t[1],a=t[2];return{type:B,peerId:n,localId:a}},t.chatChangedEvent=function(e){var t=i(e,3),n=t[1],a=t[2];return{type:p,chatId:n,self:a}},t.chatUpdatedEvent=function(e){var t=i(e,4),n=t[1],a=t[2],r=t[3];return{type:A,peerId:a,updateType:n,updateArg:r}},t.typingEvent=function(e){var t=i(e,5),n=t[1],a=t[2],r=t[3],o=t[4];return{type:m,peerId:n,userIds:a,totalCount:r,ts:o}},t.recordingAudioEvent=function(e){var t=i(e,5),n=t[1],a=t[2],r=t[3],o=t[4];return{type:_,peerId:n,userIds:a,totalCount:r,ts:o}},t.videoCallEvent=function(e){var t=i(e,3),n=t[1],a=t[2];return{type:v,userId:n,callId:a}},t.unreadCountEvent=function(e){var t=i(e,4),n=t[1],a=t[2],r=t[3];return{type:g,count:n,countNotMuted:a,showOnlyNotMuted:r}},t.notifySettingsChangedEvent=function(e){var t=i(e,2)[1],n=void 0===t?{}:t;return{type:y,peerId:n.peer_id,sound:n.sound,disabledUntil:n.disabled_until}},t.refreshMessageEvent=function(e){var t=i(e,2)[1],n=void 0===t?{}:t,a=V([!1,n.id,n.flags,n.peer_id,n.date,n.message,extend(n.kludges,{title:n.title||""}),{},n.random_id,n.chat_local_id,n.update_time]);return a.type=L,a},t.audioStartEvent=function(e){var t=i(e,2)[1],n=void 0===t?{}:t;return{type:N,uuid:n.uuid,deviceName:n.device_name||""}},t.emptyEvent=function(e){return{type:b,params:e}},t.transitionEvent=function(e){return{type:M,state:e}},t.resyncEvent=function(){return{type:S}},t.refreshLpKeyEvent=function(e){var t=i(e,3),n=t[1],a=t[2];return{type:C,key:n,url:a}},t.waitingForReconnectEvent=function(e){var t=i(e,2)[1];return{type:j,timeout:t}},t.reconnectingEvent=function(){return{type:F}},t.reconnectedEvent=function(){return{type:H}},t.resetPeer=function(){var e=arguments.length>0&&void 0!==arguments[0]&&arguments[0],t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];return{type:P,cancelSearch:e,removeActivePeer:t}},t.changePeer=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],i=arguments.length>4&&void 0!==arguments[4]?arguments[4]:"";return{type:D,peerId:e,msgid:t,forward:n,cancelSearch:a,entryPoint:i}},t.changeTab=function(e){return{type:I,tab:e}},t.failedMessage=function(e,t,n){return{type:x,message:t,peer:e,error:n}},t.mutexEvent=function(e){var t=i(e,6),n=(t[0],t[1]),a=t[2],r=t[3],o=t[4],s=t[5];return{type:T,free:!!intval(n)||intval(o)===vk.id,resource:a,peerId:intval(r),who:intval(o),name:s}},t.resendEvent=function(e,t){return{type:O,message:t,peerId:e}},t.MESSAGE_REQUEST_STATUS_NEW=t.MAIL_CHAT_UPDATE_TYPE_CONTACT_CONVERTED=t.MAIL_CHAT_UPDATE_TYPE_MESSAGE_REQUEST_CHANGED=t.MAIL_CHAT_UPDATE_TYPE_KEYBOARD_CHANGED=t.MAIL_CHAT_UPDATE_TYPE_BANNER_CHANGED=t.MAIL_CHAT_UPDATE_TYPE_ADMIN_KICKED=t.MAIL_CHAT_UPDATE_TYPE_USER_KICKED=t.MAIL_CHAT_UPDATE_TYPE_USER_LEFT=t.MAIL_CHAT_UPDATE_TYPE_USER_JOINED=t.MAIL_CHAT_UPDATE_TYPE_PINNED=t.MAIL_CHAT_UPDATE_TYPE_FLAGS_CHANGED=t.MAIL_CHAT_UPDATE_TYPE_ADMIN_GRANTED=t.MAIL_CHAT_UPDATE_TYPE_AVATAR_CHANGED=t.MAIL_CHAT_UPDATE_TYPE_TITLE_CHANGED=t.FOLDER_HAS_BANNER=t.FOLDER_UNRESPOND=t.FOLDER_IMPORTANT=t.FLAG_AUDIO_MESSAGE_LISTENED=t.FLAG_HAS_REPLY=t.FLAG_STEALTH=t.FLAG_MEDIA=t.FLAG_DELETED=t.FLAG_SPAM=t.FLAG_FRIENDS=t.FLAG_CHAT=t.FLAG_IMPORTANT=t.FLAG_OUTBOUND=t.FLAG_UNREAD=t.RECONNECTED=t.RECONNECTING=t.WAITING_FOR_RECONNECT=t.AUDIO_START=t.REPLACE_MESSAGE=t.EDIT_MESSAGE=t.DELETE_DIALOG=t.RESEND=t.FAILED_MESSAGE=t.CHANGE_TAB=t.CHANGE_PEER=t.MUTEX=t.RESET_PEER=t.TRANSITION=t.REFRESH_LP_KEY=t.RESYNC=t.SET_DIRECTORIES=t.REPLACE_DIRECTORIES=t.RESET_DIRECTORIES=t.EMPTY=t.NOTIFY_SETTINGS_CHANGED=t.UNREAD_COUNT=t.VIDEO_CALL=t.RECORDING_AUDIO=t.TYPING=t.CONVERSATION_UPDATED=t.CHAT_CHANGED=t.GOT_OFFLINE=t.GOT_ONLINE=t.READ_OUTBOUND=t.READ_INBOUND=t.ADD_MESSAGE=t.RESET_FLAGS=t.REPLACE_FLAGS=t.SET_FLAGS=t.DELETE=void 0;var a=n("rudk");function i(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")}()}var r="event_delete";t.DELETE=r;var o="event_set_flags";t.SET_FLAGS=o;var s="event_replace_flags";t.REPLACE_FLAGS=s;var l="event_reset_flags";t.RESET_FLAGS=l;var c="event_add_message";t.ADD_MESSAGE=c;var u="event_read_inbound";t.READ_INBOUND=u;var d="event_read_outbound";t.READ_OUTBOUND=d;var f="event_got_online";t.GOT_ONLINE=f;var h="event_got_offline";t.GOT_OFFLINE=h;var p="event_chat_changed";t.CHAT_CHANGED=p;var A="event_chat_updated";t.CONVERSATION_UPDATED=A;var m="event_typing";t.TYPING=m;var _="event_recoding_audio";t.RECORDING_AUDIO=_;var v="event_video_call";t.VIDEO_CALL=v;var g="event_unread_count";t.UNREAD_COUNT=g;var y="event_notify_settings_changed";t.NOTIFY_SETTINGS_CHANGED=y;var b="event_empty";t.EMPTY=b;var w="event_reset_directories";t.RESET_DIRECTORIES=w;var E="event_replace_directories";t.REPLACE_DIRECTORIES=E;var k="event_set_directories";t.SET_DIRECTORIES=k;var S="event_resync";t.RESYNC=S;var C="event_refresh_lp_key";t.REFRESH_LP_KEY=C;var M="transition_event";t.TRANSITION=M;var P="reset_peer";t.RESET_PEER=P;var T="mutex";t.MUTEX=T;var D="change_peer";t.CHANGE_PEER=D;var I="event_change_tab";t.CHANGE_TAB=I;var x="event_failed_message";t.FAILED_MESSAGE=x;var O="event_resend";t.RESEND=O;var B="event_delete_dialog";t.DELETE_DIALOG=B;var L="event_edit_message";t.EDIT_MESSAGE=L;var R="event_replace_message";t.REPLACE_MESSAGE=R;var N="event_audio_start";t.AUDIO_START=N;var j="event_waiting_for_reconnect";t.WAITING_FOR_RECONNECT=j;var F="event_reconnecting";t.RECONNECTING=F;var H="event_reconnected";t.RECONNECTED=H;t.FLAG_UNREAD=1;t.FLAG_OUTBOUND=2;t.FLAG_IMPORTANT=8;t.FLAG_CHAT=16;t.FLAG_FRIENDS=32;t.FLAG_SPAM=64;t.FLAG_DELETED=128;t.FLAG_MEDIA=512;t.FLAG_STEALTH=65536;t.FLAG_HAS_REPLY=1<<21;t.FLAG_AUDIO_MESSAGE_LISTENED=4096;t.FOLDER_IMPORTANT=1;t.FOLDER_UNRESPOND=2;t.FOLDER_HAS_BANNER=8;t.MAIL_CHAT_UPDATE_TYPE_TITLE_CHANGED=1;t.MAIL_CHAT_UPDATE_TYPE_AVATAR_CHANGED=2;t.MAIL_CHAT_UPDATE_TYPE_ADMIN_GRANTED=3;t.MAIL_CHAT_UPDATE_TYPE_FLAGS_CHANGED=4;t.MAIL_CHAT_UPDATE_TYPE_PINNED=5;t.MAIL_CHAT_UPDATE_TYPE_USER_JOINED=6;t.MAIL_CHAT_UPDATE_TYPE_USER_LEFT=7;t.MAIL_CHAT_UPDATE_TYPE_USER_KICKED=8;t.MAIL_CHAT_UPDATE_TYPE_ADMIN_KICKED=9;t.MAIL_CHAT_UPDATE_TYPE_BANNER_CHANGED=10;t.MAIL_CHAT_UPDATE_TYPE_KEYBOARD_CHANGED=11;t.MAIL_CHAT_UPDATE_TYPE_MESSAGE_REQUEST_CHANGED=12;t.MAIL_CHAT_UPDATE_TYPE_CONTACT_CONVERTED=13;function V(e){var t=i(e,11),n=t[1],r=t[2],o=t[3],s=t[4],l=t[5],u=t[6],d=t[7],f=t[8],h=t[9],p=t[10],A=extend(u,d||void 0);return{type:c,messageId:intval(n),flags:intval(r),peerId:intval(o),date:intval(s),attaches:(0,a.convertKludgesToAttaches)(A,n),subject:u.title||"",text:l,kludges:A,randomId:intval(f),userId:(0,a.isChatPeer)(o)?intval(A.from):intval(o),update_time:p,chat_local_id:h}}t.MESSAGE_REQUEST_STATUS_NEW=3},f9C2:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Recommended=o,t.default=void 0;var a=n("/zOt"),i=n("seaN"),r=n("/xuI");function o(e){for(var t=Math.ceil((window.innerHeight-r.HEADER_HEIGHT)/210),n=[],o=0;o0&&void 0!==arguments[0]?arguments[0]:"";return!!(arguments.length>1&&void 0!==arguments[1]?arguments[1]:[]).find(function(t){return"*"===t[t.length-1]?e.startsWith(t.slice(0,t.length-1)):e===t})}},fOXz:function(e,t,n){"use strict";function a(e,t){for(var n=0;n=0;)addClass(this.progressItemElems[--e],"StoryAuthor__progressItem_filled")}},{key:"setCurrentStoryIndex",value:function(e){this.data.index=e,this.drawFilledProgressItems()}},{key:"renderEmpty",value:function(){var e=this.story.getPreview(),t=Stories.getWidth();return a.default.html({class:"StoryAuthor StoryAuthor_empty",style:"width: ".concat(t,"px;"),attrs:{"data-src":e}})}},{key:"render",value:function(){var e,t,n,r=window.lang,o=Stories.getWidth(),s=i.isTouch?"ontouchstart":"onmousedown",c=i.isTouch?"ontouchend":"onmouseup";return a.default.html({class:"StoryAuthor StoryAuthor_inited",style:"width: ".concat(o,"px;"),inner:[{class:"StoryAuthor__header",inner:{class:"StoryAuthor__progress",inner:this.data.items.map(function(){return{class:"StoryAuthor__progressItem",inner:{class:"StoryAuthor__progressItemBar",inner:{class:"StoryAuthor__progressItemCurrent"}}}})}},(e={class:"StoryAuthor__muted"},l(e,s,"Stories.unMute(this, event);"),l(e,"inner",[{class:"Story__icon Story__icon_unmute"},{class:"StoryAuthor__muted_text",inner:r.mobile_stories_unmute}]),e),(t={class:"StoryAuthor__next"},l(t,s,"Stories.onTouchStart(event);"),l(t,c,"Stories.onTouchEnd(event);"),l(t,"ontouchcancel","Stories.onTouchEnd(event);"),t),(n={class:"StoryAuthor__prev"},l(n,s,"Stories.onTouchStart(event);"),l(n,c,"Stories.onTouchEnd(event, true);"),l(n,"ontouchcancel","Stories.onTouchEnd(event, true);"),n),{class:"StoryAuthor__body",inner:this.authorStoriesHTML}]})}}])&&c(t.prototype,n),s&&c(t,s),e}();t.StoryAuthor=u},fw35:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var a=r(n("wMVj")),i=r(n("29dZ"));function r(e){return e&&e.__esModule?e:{default:e}}var o={reload:function(e){i.default.setDisabled(e,!0),!1===navigator.onLine?setTimeout(function(){i.default.setDisabled(e,!1)},500):a.default.reload()}};t.default=o},gD36: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=function(e){var t=!(!e.tags||!e.tags.length)&&e.tags;return{class:"Owner__tags",inner:t?[{class:"Owner__tags_icon Icon Icon_tagLabel"},t.map(function(e){return{class:"Owner__tag",inner:i.default.wrap(e.name)}})]:null}};t.default=r},gF8j:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=s,t.getVisibilityState=u,t.getVisiblityEvent=d;var a,i=(a=n("uQjJ"))&&a.__esModule?a:{default:a},r=n("JuPy");var o=browser.iphone||browser.ipad||browser.ipod;function s(e){this.started=!1,this.is_idle=!0,this.activeTimeStart=null,this.cbActiveB=this.cbActive.bind(this),this.cbInactiveB=this.cbInactive.bind(this),this.onVisiblityChange=this.onVisiblityChange.bind(this),this.opts=extend({triggerEvents:"mousemove keydown",onIdleCb:function(){},onUnIdleCb:function(){},focusElement:e.element,element:null,idleTimeout:3e4},e)}function l(e,t,n){(0,r.isMvk)()?window.addEvent(e,t,n,{passive:!0}):window.addEvent(e,t,n)}function c(e,t,n){(0,r.isMvk)()?window.removeEvent(e,t,n,{passive:!0}):window.removeEvent(e,t,n)}function u(){return document.visibilityState||document.webkitVisibilityState}function d(){var e="visibilitychange";return document.visibilityState||(document.webkitVisibilityState?e+="webkit":e=""),e}extend(s.prototype,i.default.prototype),extend(s.prototype,{stop:function(){this.started=!1,c(this.opts.element,this.opts.triggerEvents,this.cbActiveB),(0,r.isMvk)()&&this._isTopLevel()&&d()&&c(document,d(),this.onVisiblityChange),(0,r.isMvk)()&&o||(c(this.opts.focusElement,"focus",this.cbActiveB),c(this.opts.focusElement,"blur",this.cbInactiveB)),clearTimeout(this.setIdleTo),clearTimeout(this.checkIdleCbTo),clearTimeout(this.sendCbTO),this.is_idle=!0,this.opts.parentManager&&this.opts.parentManager.off("idle",this.cbInactiveB)},idle:function(e){this.is_idle=!0,e||this.opts.onIdleCb(),this.emit("idle")},unidle:function(e){this.is_idle=!1,e||this.opts.onUnIdleCb(),this.emit("unidle")},start:function(){this.started=!0,!(0,r.isMvk)()&&browser.mobile||(this.is_idle=!this._isFocused(),this.opts.parentManager&&this.opts.parentManager.on("idle",this.cbInactiveB),(0,r.isMvk)()&&this._isTopLevel()&&d()&&l(document,d(),this.onVisiblityChange),(0,r.isMvk)()&&o||(l(this.opts.focusElement,"focus",this.cbActiveB),l(this.opts.focusElement,"blur",this.cbInactiveB)),clearTimeout(this.checkIdleCbTo),this.checkIdleCb(),this.checkIdleCbTo=setTimeout(this.checkIdleCb.bind(this),this.opts.idleTimeout))},checkIdleCb:function(){this.started&&(l(this.opts.element,this.opts.triggerEvents,this.cbActiveB),clearTimeout(this.setIdleTo),this.setIdleTo=setTimeout(this.cbInactiveB,this.opts.idleTimeout))},cbActive:function(){this.started&&(this.activeTimeStart=(new Date).getTime(),clearTimeout(this.setIdleTo),this.is_idle&&(this.is_idle=!1,clearTimeout(this.sendCbTO),this.sendCbTO=setTimeout(function(){this.emit("unidle"),this.opts.onUnIdleCb&&this.opts.onUnIdleCb()}.bind(this),100)),c(this.opts.element,this.opts.triggerEvents,this.cbActiveB),clearTimeout(this.checkIdleCbTo),this.checkIdleCbTo=setTimeout(this.checkIdleCb.bind(this),this.opts.idleTimeout))},cbInactive:function(){this.started&&(this.activeTimeStart=null,this.is_idle||(this.is_idle=!0,clearTimeout(this.sendCbTO),this.sendCbTO=setTimeout(function(){this.emit("idle"),this.opts.onIdleCb&&this.opts.onIdleCb()}.bind(this),100)),clearTimeout(this.checkIdleCbTo),c(this.opts.element,this.opts.triggerEvents,this.cbActiveB),l(this.opts.element,this.opts.triggerEvents,this.cbActiveB),this.checkIdleCbTo=setTimeout(this.checkIdleCb,this.opts.idleTimeout))},getActiveTime:function(){return!this.is_idle&&this.activeTimeStart?(new Date).getTime()-this.activeTimeStart:0},onVisiblityChange:function(){"visible"===u()?this.cbActiveB():this.cbInactiveB()},_isTopLevel:function(){var e=this.opts.focusElement;return e===window||e===document},_isFocused:function(){var e=this.opts.focusElement;if(this._isTopLevel()){var t=u();return"string"==typeof t&&"visible"===t}return document.activeElement===e}})},gLrT:function(e,t,n){"use strict";var a;Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var i=((a=n("B+E1"))&&a.__esModule?a:{default:a}).default;t.default=i},gMTq:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var a=l(n("TYsd")),i=n("DkIl"),r=l(n("rKp0")),o=l(n("29dZ")),s=l(n("bZ/P"));function l(e){return e&&e.__esModule?e:{default:e}}var c=function(e){var t=window.lang,n=(0,i.MailHat)({type:"page",left:(0,i.MailHat__icon)({icon:"back",url:"/mail"}),center:(0,i.MailHat__Title)({title:t.mobile_mail_mrs_page_title})}),l=[{class:"MessageRequestsPage__content ScrollView",inner:[{class:"MessageRequestsPage__info",inner:t.mobile_mail_mrs_page_info},a.default.wrap((0,r.default)({scrap:"mrs"}))]},e.count?{class:"MessageRequestsPage__footer",inner:[(0,o.default)({theme:"negative",size:"large",type:"button",inner:t.mobile_mail_mrs_button_reject_all,attrs:s.default.onClick("MessageRequestsPage.rejectAll","event","this")})]}:null];return{class:"messenger__page MessageRequestsPage",inner:[{class:"messenger__header",inner:a.default.wrap(n)},{class:"messenger__body",inner:l}]}};t.default=c},gNTM:function(e,t,n){"use strict";var a=function(){var e=null,t=!1;function n(e,t){var n=ge("medias_map"),a=ge("attached_wrap");n||(n=ce("div",{id:"medias_map",className:"pi_medias"}),a.appendChild(n));var i=e.latitude,r=e.longitude,o=(window.devicePixelRatio,geByClass1("medias_map",n)),s=t?'
'+t+"
":"",l=' ';o?val(o,s+""+l):val(n,''+s+l+"
");show(n)}function i(){e=null,remove("medias_map")}function r(t){var a;t&&t.coords&&(e={latitude:+t.coords.latitude||0,longitude:+t.coords.longitude||0},a=e,ajax.post("/places.php",{_ajax:1,act:"map_label",lat:a.latitude,lng:a.longitude},{onDone:function(e){hide("geo_waiting"),n(a,e)},onFail:o}))}function o(e){a.remove(),hide("geo_waiting")}return{toggle:function(){t?a.remove():a.add()},add:function(a){!a&&t||(t=!0,addClass("cp_geo_btn_sel","geo_btn"),a&&(a.latitude||a.longitude)?n(e={latitude:+a.latitude||0,longitude:+a.longitude||0},a.label):(geo.getCurrentPosition(r,o),show("geo_waiting")))},remove:function(){t&&(t=!1,removeClass("cp_geo_btn_sel","geo_btn"),i())},init:function(e){return e&&a.add(e),geo.init()}}}();window.geoloc=a},gTod:function(e,t,n){"use strict";var a=n("UxAg");function i(){(0,a.$)(r.self).classList.toggle(o.restCodesShown)}window.ReservedCodes={},ReservedCodes._onShowRestCodesClick=i;var r={self:".ReservedCodes"},o={restCodesShown:"ReservedCodes_restCodesShown"}},gUYQ:function(e,t,n){"use strict";var a,i=n("UxAg"),r=n("BZzM"),o=n("OcsD"),s=(a=n("BoyB"))&&a.__esModule?a:{default:a},l=n("V4qE");var c={onDone:function(e,t,n,a){var i=(0,o.ge)(e)||(0,o.geByClass1)("like_box","z")||(0,o.geByClass1)("like_box")||(0,o.geByClass1)("wall_item_for_like_"+e);if(i&&e){var r,s,l=(0,o.geByClass1)("item_repost",i);(0,o.hasClass)("wall_item",i)||(0,o.hasClass)("market_item",i)?s=(0,o.geByClass1)("wi_like_wrap",i):(0,o.hasClass)("ReplyItem",i)?r=(0,o.geByClass1)("ReplyItem__likeWrap",i):s=(0,o.geByClass1)("item_like",i),r||(r=(0,o.geByClass1)("like_wrap",i)),s&&(s.innerHTML=t||"",(0,o.toggleClass)("is_empty",s,!t),(0,o.toggle)(s,t)),l&&(l.innerHTML=n||"",(0,o.toggle)(l,n)),r&&(0,o.val)(r,a||"")}},onFail:function(){var e=Array.prototype.slice.call(arguments),t=e.shift();switch(t){case 2:nav.hard_go(e[0])}}},u={onDone:function(e,t,n,a,i){var r=window,s=r.photo;if(c.onDone.apply(this,arguments),this.photo_id){var l=s.get(this.photo_id);if(l){var u=(0,o.ce)("div",{innerHTML:l.likes});(0,o.val)((0,o.geByClass1)("item_like",u),t),l.likes=(0,o.val)(u),l.publish=''+n+" ",l.likes_cnt=(0,o.intval)(((0,o.attr)((0,o.geByClass1)("v_like",u),"data-like_count")||"").replace(/\D+/g,"")),l.likes_me=i;u=(0,o.ce)("div",{innerHTML:l.actions});var d=(0,o.geByClass1)("like_wrap",u);(0,o.val)(d,a),l.actions=(0,o.val)(u),s.save(l)}}},onFail:c.onFail},d={onDone:function(e){var t=window.photo;if(this.photo_id){if(!e.error){var n={};"confirm"===e.type?n={type:l.SNACKBAR_TYPE_SUCCESS,text:getLang("mobile_msg_photos_tag_confirmed")}:"delete"===e.type&&(n={type:l.SNACKBAR_TYPE_SUCCESS,text:getLang("mobile_msg_photos_tag_deleted")}),Snackbar.init(n)}var a=t.get(this.photo_id);a&&(a.tag_info="",t.save(a));var i=(0,o.geByClass1)("photo_view"),r=(0,o.geByClass1)("pv_tag_wrap",i);(0,o.val)(r,"")}}},f={onDone:function(e,t,n){var a=window.photo,i=window.menu,r=(0,o.geByClass1)("photo_view"),s=(0,o.geByClass1)("photo_msg"),l=!!t;if(r&&s){(0,o.val)(s,t||""),(0,o.toggleClass)("photo_deleted",r,l);var c=a.get(e);c&&(c.deleted=t,a.save(c)),n&&i&&i.refresh({pp:n})}}},h={onDone:function(e,t){var n=window.isNewMail&&(0,i.$)(".messenger")&&this.link.closest(".msg");if((0,o.val)(e,t),n){var a=Number(n.className.match(/msg_id_(\d+)/)[1]);store.mail.msgs[a].textFull=n.$(".msg__text").innerHTML}}},p={onDone:function(e){this.link&&((0,o.after)(cdf(e),(0,o.gpeByClass)("pic_body_wrap",this.link)),(0,o.hide)(this.link))}},A={onStart:function(){(0,o.addClass)("cm_item_loading",this.link)},onDone:function(e){this.link&&(0,o.val)(this.link.parentNode,e)}},m={onDone:function(e,t){if(e){var n=window.photo;(0,o.remove)(e+"_msg");var a=(0,o.ge)(e);if(a){if(t){var i=(0,o.ce)("div",{id:e+"_msg",className:(a.className||"")+" post_message_item"});(0,o.val)(i,''+t+"
"),(0,o.after)(i,a),(0,o.hide)(a),(0,o.geByClass1)("rtm_reply_wrap",a)&&window.reply&&window.reply.edithide()}else(0,o.show)(e);if(this.photo_id){var r=n.get(this.photo_id);if(r){var s=(0,o.geByClass1)("photoview"),l=(0,o.geByClass1)("comments_wrap",s);r.comments_html=(0,o.val)(l)}}}}}},_={onDone:function(e,t,n,a){if(e){(0,o.remove)(e+"_msg");var i=(0,o.ge)(e);if(i)if(t){var r=(/^([a-z]+)_item$/i.exec(n||"")||[])[1]||"inline",s=(0,o.ce)("div",{id:e+"_msg",className:r+"_item "+r+"_message_item"}),l=a||"message_item_cont";(0,o.val)(s,''+t+"
"),(0,o.after)(s,i),(0,o.hide)(i)}else!1===t?(0,o.hide)(i):(0,o.show)(i)}}},v={onDone:function(e,t,n){if(e){var a=(0,o.ge)(e),i=(0,o.getY)(a)||(0,o.getY)(e+"_msg"),r=(0,o.getH)(a)||(0,o.getH)(e+"_msg"),s=i+(u<320?r:0)-(0,o.scrollTop)();if((0,o.remove)(e+"_msg"),a){var l=(0,o.hasClass)("wall_item",a)||(0,o.hasClass)("post",a)?"wall":"post";if(n){var c=(0,o.ce)("div",{id:e+"_msg",className:l+"_item post_message_item"});(0,o.val)(c,''+n+"
"),(0,o.after)(c,a)}if(t){(0,o.each)((0,o.geByClass)(l+"_item"),function(){var e=!!this.id&&this.id.match(/^wall((-?\d+)_(-?\d+)(_\d+)?)$/),a=(0,o.attr)(this,"data-copy"),i=!!a&&a.match(/^(-?\d+)_(-?\d+)$/);if(!e)return!0;(!e[4]&&e[2]==t||e[4]&&e[3]==t||i&&i[1]==t)&&(0,o.toggleClass)("post_item_ignored",this,n)});var u=(0,o.getCw)(),d=(i=(0,o.getY)(a)||(0,o.getY)(e+"_msg"),r=(0,o.getH)(a)||(0,o.getH)(e+"_msg"),i+(u<320?r:0)-s);(0,o.geByClass1)("wall_item")===a&&(d=0),(0,o.scrollTop)(d)}}}}},g={onDone:function(e,t){if(e){var n=(0,o.ge)(e);if((0,o.remove)(e+"_msg"),n&&t){var a=(0,o.hasClass)("wall_item",n)||(0,o.hasClass)("post",n)?"wall":"post",i=(0,o.ce)("div",{id:e+"_msg",className:a+"_item post_message_item"});(0,o.val)(i,''+t+"
"),(0,o.after)(i,n)}(0,o.toggleClass)("post_item_ignored",n,t)}}},y={onDone:function(e,t,n){if(e){var a=(0,o.ge)(e);if((0,o.remove)(e+"_msg"),a){if(n){var i=(0,o.ce)("div",{id:e+"_msg",className:"wall_item post_message_item"});(0,o.val)(i,''+n+"
"),(0,o.after)(i,a)}(0,o.toggleClass)("post_item_ignored",a)}}}},b={onStart:function(){var e=(0,o.gpeByClass)("show_more_wrap",this.link),t=(0,o.geByClass1)("show_more",e)||this.link,n=(0,o.ce)("div",{id:"show_more_loading",className:"show_more_loading",innerHTML:' '}),a=(0,o.ce)("div",{id:"show_more_wrap",className:"show_more_wrap"});(0,o.attr)(n,"data-href",(0,o.getHref)(t)),a.appendChild(n),(0,o.before)(a,e),(0,o.remove)(e)},onDone:function(e){var t=window.cur;ajax.tAlProcess=(new Date).getTime();var n=(0,o.ge)("show_more_wrap"),a=cdf(e);(0,o.before)(a,n),(0,o.remove)(n),ajax.prepare_click("mcont"),(0,o.onBodyScrollForce)(100),ajax.tAlModule=t.module,ajax.tAlRender=(new Date).getTime(),Gif.onUpdate(),(0,r.resizePosters)()}},w={onStart:b.onStart,onDone:function(e,t){b.onDone.apply(null,arguments),Bookmarks.pushItemsToStore(t)}},E={onStart:b.onStart,onDone:function(e,t){var n=window.cur;ajax.tAlProcess=(new Date).getTime();var a=(0,o.geByClass1)("photos_page","mcont"),i=(0,o.ge)("show_more_wrap"),s=cdf(t);e=e.replace(/