AnonSec Shell
Server IP : 54.36.91.62  /  Your IP : 216.73.217.94
Web Server : Apache
System : Linux webm013.cluster127.gra.hosting.ovh.net 5.15.206-ovh-vps-grsec-zfs-classid #1 SMP Fri May 15 02:41:25 UTC 2026 x86_64
User : coopiak ( 151928)
PHP Version : 8.3.23
Disable Function : _dyuweyrj4,_dyuweyrj4r,dl
MySQL : OFF  |  cURL : ON  |  WGET : ON  |  Perl : ON  |  Python : ON  |  Sudo : OFF  |  Pkexec : OFF
Directory :  /home/coopiak/amisdesseniors-fr/lemans/components/com_community/assets/app/dist/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ HOME ]     

Current File : /home/coopiak/amisdesseniors-fr/lemans/components/com_community/assets/app/dist/770.js
"use strict";(self.webpackChunkjoms=self.webpackChunkjoms||[]).push([[770],{3770:(t,o,e)=>{e.r(o),e.d(o,{initBundle:()=>Cw});const n={edit:function(t,o){$(".joms-js--announcement-view-".concat(t,"-").concat(o)).hide(),$(".joms-js--announcement-edit-".concat(t,"-").concat(o)).show(),$(".joms-subnav,.joms-subnav--desktop").hide(),$(".joms-sidebar").hide(),$(".joms-main").css({padding:0,width:"100%"})},editCancel:function(t,o){$(".joms-js--announcement-edit-".concat(t,"-").concat(o)).hide(),$(".joms-js--announcement-view-".concat(t,"-").concat(o)).show(),$(".joms-subnav,.joms-subnav--desktop").css("display",""),$(".joms-main").css({padding:"",width:""}),$(".joms-sidebar").show()}};function s(t,o,e){$(".joms-js--invitation-buttons-"+t+"-"+o).remove(),$(".joms-js--invitation-notice-"+t+"-"+o).html(e&&e.message||""),joms.fn.notification.updateCounter("general",o,-1)}const a={accept:function(t,o){var e,n=[o];switch(t){case"group":e="notification,ajaxGroupJoinInvitation";break;case"page":e="notification,ajaxPageJoinInvitation";break;default:e="events,ajaxJoinInvitation"}joms.ajax({func:e,data:n,callback:function(e){s(t,o,e)}})},reject:function(t,o){var e,n=[o];switch(t){case"group":e="notification,ajaxGroupRejectInvitation";break;case"page":e="notification,ajaxPageRejectInvitation";break;default:e="events,ajaxRejectInvitation"}joms.ajax({func:e,data:n,callback:function(e){s(t,o,e)}})}};function c(t){return c="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},c(t)}function l(t,o){for(var e=0;e<o.length;e++){var n=o[e];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,p(n.key),n)}}function p(t){var o=function(t,o){if("object"!=c(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var n=e.call(t,"string");if("object"!=c(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==c(o)?o:o+""}$=joms.jQuery;var r,m,u,d,f,v,b,h,g,w=function(){return t=function t(){!function(t,o){if(!(t instanceof o))throw new TypeError("Cannot call a class as a function")}(this,t)},o=[{key:"prepare",value:function(t){var o,e=this;if($.magnificPopup)return o=this.showPopup(),void t(o);this.loadlib((function(){$.magnificPopup&&(o=e.showPopup(),t(o))}))}},{key:"showPopup",value:function(){$.magnificPopup.open({type:"inline",items:{src:[]},tClose:window.joms_lang.COM_COMMUNITY_CLOSE_BUTTON,tLoading:window.joms_lang.COM_COMMUNITY_POPUP_LOADING,callbacks:{beforeOpen:function(){$("html").css("overflow","hidden")},afterClose:function(){$("html").css("overflow","")}}});var t=$.magnificPopup.instance,o="joms-popup__wrapper";return joms.mobile&&(o+=" joms-popup__mobile"),t.container.addClass(o),t.updateStatus("loading"),t.container.off("click.joms-closepopup",".joms-js--button-close").on("click.joms-closepopup",".joms-js--button-close",(function(){t.close()})),t}},{key:"loadlib",value:function(t){t()}}],null&&l(t.prototype,null),o&&l(t,o),Object.defineProperty(t,"prototype",{writable:!1}),t;var t,o}();function y(t){return y="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},y(t)}function k(t,o){var e;m&&m.off(),(r=t).items[0]={type:"inline",src:(e=o,e||(e={}),['<div class="joms-popup joms-popup--whiteblock joms-popup--500">','<div class="joms-popup__title"><button class="mfp-close" type="button" title="',window.joms_lang.COM_COMMUNITY_CLOSE_BUTTON_TITLE,'">×</button>',e.title,"</div>",'<div class="joms-popup__content joms-popup__content--single">',e.html||"","</div>","</div>"].join(""))},r.updateItemHTML(),(m=r.contentContainer).find("form").on("submit",T)}function T(t){t.preventDefault(),t.stopPropagation(),joms.ajax({func:"system,ajaxGetLoginFormToken",data:[],callback:function(t){var o=m.find("form");t.token&&o.find(".joms-js--token input").prop("name",t.token),o.off("submit"),o.find("[name=submit]").click()}})}function x(t){w.prepare((function(o){!function(t,o){if(o&&"object"===y(o))k(t,o);else{var e=o;"string"!=typeof o&&(e=(e=window.location.href).replace(/#.*$/,"")),joms.ajax({func:"system,ajaxLogin",data:[e],callback:function(o){k(t,o)}})}}(o,t)}))}function C(t,o){u=t,d=o,joms.ajax({func:"photos,ajaxAddFeatured",data:[d],callback:function(t){u.items[0]={type:"inline",src:M(t)},u.st.callbacks||(u.st.callbacks={}),u.st.callbacks.close=function(){window.location.reload()},u.updateItemHTML()}})}function M(t){return t||(t={}),['<div class="joms-popup joms-popup--whiteblock">','<div class="joms-popup__title"><button class="mfp-close" type="button" title="',window.joms_lang.COM_COMMUNITY_CLOSE_BUTTON_TITLE,'">×</button>',t.title,"</div>",'<div class="joms-popup__content joms-popup__content--single">',t.html||t.error||"","</div>",'<div class="joms-popup__action">','<button class="joms-button--neutral joms-button--small joms-js--button-close">',window.joms_lang.COM_COMMUNITY_CLOSE_BUTTON,"</button>","</div>","</div>"].join("")}function O(t){return t||(t={}),['<div class="joms-popup joms-popup--whiteblock">','<div class="joms-popup__title"><button class="mfp-close" type="button" title="',window.joms_lang.COM_COMMUNITY_CLOSE_BUTTON_TITLE,'">×</button>',t.title,"</div>",'<div class="joms-popup__content joms-popup__content--single">',t.html||t.error||"","</div>",'<div class="joms-popup__action">','<button class="joms-button--neutral joms-button--small joms-js--button-close">',window.joms_lang.COM_COMMUNITY_CLOSE_BUTTON,"</button>","</div>","</div>"].join("")}function I(){h.off(),b.close()}function S(){h.find("form").submit()}function U(t){return t||(t={}),['<div class="joms-popup joms-popup--whiteblock">','<div class="joms-popup__title"><button class="mfp-close" type="button" title="',window.joms_lang.COM_COMMUNITY_CLOSE_BUTTON_TITLE,'">×</button>',t.title,"</div>",'<div data-ui-object="popup-step-1"',t.error?' class="joms-popup__hide"':"",">",'<div class="joms-popup__content">',t.message,"</div>",'<div class="joms-popup__action">','<a href="javascript:" class="joms-button--neutral joms-button--small joms-left" data-ui-object="popup-button-cancel">',t.btnCancel,"</a> &nbsp;",'<button class="joms-button--primary joms-button--small" data-ui-object="popup-button-save">',t.btnYes,"</button>","</div>","</div>",'<div data-ui-object="popup-step-2"',t.error?"":' class="joms-popup__hide"',">",'<div class="joms-popup__content joms-popup__content--single" data-ui-object="popup-message">',t.error||"","</div>","</div>","</div>"].join("")}const E={addFeatured:function(t){w.prepare((function(o){C(o,t)}))},removeFeatured:function(t){w.prepare((function(o){f=o,v=t,joms.ajax({func:"photos,ajaxRemoveFeatured",data:[v],callback:function(t){f.items[0]={type:"inline",src:O(t)},f.st.callbacks||(f.st.callbacks={}),f.st.callbacks.close=function(){window.location.reload()},f.updateItemHTML()}})}))},remove:function(t){w.prepare((function(o){var e,n;e=o,n=t,h&&h.off(),b=e,g=n,joms.ajax({func:"photos,ajaxRemoveAlbum",data:[g,"myphotos"],callback:function(t){b.items[0]={type:"inline",src:U(t)},b.updateItemHTML(),(h=b.contentContainer).on("click","[data-ui-object=popup-button-cancel]",I),h.on("click","[data-ui-object=popup-button-save]",S)}})}))}};var N,A,R,Y,B,P,H,F;function D(t,o,e){A&&A.off(),N=t,R=o,Y=e,joms.ajax({func:"groups,ajaxShowRemoveBulletin",data:[R,Y],callback:function(t){N.items[0]={type:"inline",src:z(t)},N.updateItemHTML(),(A=N.contentContainer).on("click",".joms-js--button-cancel",q),A.on("click",".joms-js--button-save",V)}})}function q(){A.off(),N.close()}function V(){A.find("form")[0].submit()}function z(t){return t||(t={}),['<div class="joms-popup joms-popup--whiteblock">','<div class="joms-popup__title"><button class="mfp-close" type="button" title="',window.joms_lang.COM_COMMUNITY_CLOSE_BUTTON_TITLE,'">×</button>',t.title,"</div>",'<div class="joms-js--step1">','<div class="joms-popup__content">',t.html,"</div>",'<div class="joms-popup__action">','<button class="joms-button--neutral joms-button--small joms-left joms-js--button-cancel">',t.btnNo,"</button> &nbsp;",'<button class="joms-button--primary joms-button--small joms-js--button-save">',t.btnYes,"</button>","</div>","</div>",'<div class="joms-popup__hide joms-js--step2">','<div class="joms-popup__content joms-popup__content--single"></div>',"</div>","</div>"].join("")}function G(){P.off(),B.close()}function W(){P.find("form")[0].submit()}function Q(t){return t||(t={}),['<div class="joms-popup joms-popup--whiteblock">','<div class="joms-popup__title"><button class="mfp-close" type="button" title="',window.joms_lang.COM_COMMUNITY_CLOSE_BUTTON_TITLE,'">×</button>',t.title,"</div>",'<div class="joms-js--step1">','<div class="joms-popup__content">',t.html,"</div>",'<div class="joms-popup__action">','<button class="joms-button--neutral joms-button--small joms-left joms-js--button-cancel">',t.btnNo,"</button> &nbsp;",'<button class="joms-button--primary joms-button--small joms-js--button-save">',t.btnYes,"</button>","</div>","</div>",'<div class="joms-popup__hide joms-js--step2">','<div class="joms-popup__content joms-popup__content--single"></div>',"</div>","</div>"].join("")}const J={remove:function(t,o){w.prepare((function(e){D(e,t,o)}))},edit:function(t,o){w.prepare((function(e){var n,s,a;n=e,s=t,a=o,P&&P.off(),B=n,H=s,F=a,joms.ajax({func:"groups,ajaxShowRemoveDiscussion",data:[H,F],callback:function(t){B.items[0]={type:"inline",src:Q(t)},B.updateItemHTML(),(P=B.contentContainer).on("click",".joms-js--button-cancel",G),P.on("click",".joms-js--button-save",W)}})}))}};var K,X,Z,tt,ot,et,nt,st,at,it,ct,lt,pt,rt;function mt(t){return t||(t={}),['<div class="joms-popup joms-popup--whiteblock">','<div class="joms-popup__title"><button class="mfp-close" type="button" title="',window.joms_lang.COM_COMMUNITY_CLOSE_BUTTON_TITLE,'">×</button>',t.title,"</div>",'<div class="joms-popup__content joms-popup__content--single">',t.html||"","</div>",'<div class="joms-popup__action">','<button class="joms-button--neutral joms-button--small joms-js--button-close">',window.joms_lang.COM_COMMUNITY_CLOSE_BUTTON,"</button>","</div>","</div>"].join("")}function ut(t,o){tt&&tt.off(),Z=t,ot=o,joms.ajax({func:"apps,ajaxBrowse",data:[ot],callback:function(t){Z.items[0]={type:"inline",src:ft(t)},Z.updateItemHTML(),(tt=Z.contentContainer).on("click","a[data-appname]",dt),tt.on("click",".joms-js--btn-view-all",jt)}})}function dt(t){var o=$(t.target),e=o.data("appname"),n=o.data("position"),s=n.indexOf("-stacked")>=0;joms.ajax({func:"apps,ajaxAddApp",data:[e,n],callback:function(t){var o,n,a;t.success&&(a=(o=$(".joms-js--app-pos-"+ot)).find(".joms-tab__bar").eq(0),s?a.before($(t.item).show()):((n=a.find(".joms-js--app-new")).prevAll().removeClass("active"),n.before('<a href="#joms-js--app-app_id" class="no-padding joms-js--app-tab-app_id active"><div class="joms-tab__bar--button"><span class="title">app_title</span></div></a>'.replace(/app_id/g,t.id).replace(/app_title/,t.title)),o.find(".joms-tab__content").hide(),o.append($(t.item).show())),function(t,o){joms.ajax({func:"apps,ajaxShowSettings",data:[t,o],callback:function(t){tt.off("click","a[data-appname]"),tt.html(ft(t,"setting")),tt.on("click",".joms-popup__content,.joms-popup__action",(function(t){return t.stopPropagation(),!1})),tt.on("click","[data-ui-object=popup-button-save]",(function(){!function(){var t,o=tt.find("form").serializeArray(),e=[];for(t=0;t<o.length;t++)e.push([o[t].name,o[t].value]);joms.ajax({func:"apps,ajaxSaveSettings",data:[e],callback:function(t){if(t.error)return tt.find(".joms-popup__content").html(t.error),void tt.find(".joms-popup__action").remove();Z.close()}})}()}))}})}(t.id,e))}})}function jt(){var t=tt.find(".joms-popup__content").eq(0),o=t.innerHeight();t.css({height:o,overflow:"auto"}),tt.find(".joms-js--btn-view-all").parent().remove(),tt.find(".joms-js--app").show(),t.animate({scrollTop:t[0].scrollHeight})}function ft(t,o){var e="";return t||(t={}),e="setting"===o&&t.btnSave?['<div class="joms-popup__action">','<button class="joms-button--neutral joms-button--small joms-js--button-close joms-left">',window.joms_lang.COM_COMMUNITY_CLOSE_BUTTON,"</button>",'<button class="joms-button--primary joms-button--small" data-ui-object="popup-button-save">',t.btnSave,"</button>","</div>"].join(""):['<div class="joms-popup__action">','<button class="joms-button--neutral joms-button--small joms-js--button-close">',window.joms_lang.COM_COMMUNITY_CLOSE_BUTTON,"</button>","</div>"].join(""),['<div class="joms-popup joms-popup--whiteblock">','<div class="joms-popup__title"><button class="mfp-close" type="button" title="',window.joms_lang.COM_COMMUNITY_CLOSE_BUTTON_TITLE,'">×</button>',t.title,"</div>",'<div class="joms-popup__content joms-popup__content--single">',t.html||"","</div>",e,"</div>"].join("")}function vt(){var t=nt.find("input[type=radio]:checked").val();joms.ajax({func:"apps,ajaxSavePrivacy",data:[st,t],callback:function(t){if(t.error)return nt.find(".joms-popup__content").html(t.error),void nt.find(".joms-popup__action").remove();et.close()}})}function bt(t){return t||(t={}),['<div class="joms-popup joms-popup--whiteblock">','<div class="joms-popup__title"><button class="mfp-close" type="button" title="',window.joms_lang.COM_COMMUNITY_CLOSE_BUTTON_TITLE,'">×</button>',t.title,"</div>",'<div class="joms-popup__content joms-popup__content--single">',t.html||"","</div>",'<div class="joms-popup__action">','<button class="joms-button--primary joms-button--small" data-ui-object="popup-button-save">',t.btnSave,"</button>","</div>","</div>"].join("")}function _t(t){return t||(t={}),['<div class="joms-popup joms-popup--whiteblock">','<div class="joms-popup__title"><button class="mfp-close" type="button" title="',window.joms_lang.COM_COMMUNITY_CLOSE_BUTTON_TITLE,'">×</button>',t.title,"</div>",'<div class="joms-popup__content joms-popup__content--single">',t.html||"","</div>",'<div class="joms-popup__action">','<button class="joms-button--neutral joms-button--small joms-js--button-close">',window.joms_lang.COM_COMMUNITY_CLOSE_BUTTON,"</button>","</div>","</div>"].join("")}function ht(){var t,o=lt.find("form").serializeArray(),e=[];for(t=0;t<o.length;t++)e.push([o[t].name,o[t].value]);joms.ajax({func:"apps,ajaxSaveSettings",data:[e],callback:function(t){if(t.error)return lt.find(".joms-popup__content").html(t.error),void lt.find(".joms-popup__action").remove();ct.close()}})}function gt(t){var o="";return t||(t={}),t.btnSave&&(o=['<div class="joms-popup__action">','<button class="joms-button--neutral joms-button--small joms-js--button-close joms-left">',window.joms_lang.COM_COMMUNITY_CLOSE_BUTTON,"</button>",'<button class="joms-button--primary joms-button--small" data-ui-object="popup-button-save">',t.btnSave,"</button>","</div>"].join("")),['<div class="joms-popup joms-popup--whiteblock">','<div class="joms-popup__title"><button class="mfp-close" type="button" title="',window.joms_lang.COM_COMMUNITY_CLOSE_BUTTON_TITLE,'">×</button>',t.title,"</div>",'<div class="joms-popup__content joms-popup__content--single" style="max-height:315px; overflow:auto">',t.html||"","</div>",o,"</div>"].join("")}const wt={about:function(t){w.prepare((function(o){K=o,X=t,joms.ajax({func:"apps,ajaxShowAbout",data:[X],callback:function(t){K.items[0]={type:"inline",src:mt(t)},K.updateItemHTML()}})}))},browse:function(t){w.prepare((function(o){ut(o,t)}))},privacy:function(t){w.prepare((function(o){var e,n;e=o,n=t,nt&&nt.off(),et=e,st=n,joms.ajax({func:"apps,ajaxShowPrivacy",data:[st],callback:function(t){et.items[0]={type:"inline",src:bt(t)},et.updateItemHTML(),(nt=et.contentContainer).on("click","[data-ui-object=popup-button-save]",vt)}})}))},remove:function(t){w.prepare((function(o){at=o,it=t,joms.ajax({func:"apps,ajaxRemove",data:[it],callback:function(t){var o,e,n;at.items[0]={type:"inline",src:_t(t)},at.updateItemHTML(),o=$(".joms-js--app-tab-"+it),n=$("#joms-js--app-"+it),(e=o.prev()).length||(e=o.next().not(".joms-js--app-new")),o.remove(),n.remove(),e.length&&e.click()}})}))},setting:function(t,o){w.prepare((function(e){var n,s,a;n=e,s=t,a=o,lt&&lt.off(),ct=n,pt=s,rt=a,joms.ajax({func:"apps,ajaxShowSettings",data:[pt,rt],callback:function(t){ct.items[0]={type:"inline",src:gt(t)},ct.updateItemHTML(),(lt=ct.contentContainer).on("click","[data-ui-object=popup-button-save]",ht)}})}))}};var yt,kt,Tt,xt,Ct,Mt=!joms.mobile;function Ot(t){return Ot.attach(t)}function Lt(){var t=kt[0],o=kt.children("img"),e=yt.position();xt={imageWidth:o.width(),imageHeight:o.height(),wrapperTop:t.scrollTop,wrapperLeft:t.scrollLeft,wrapperWidth:kt.width(),wrapperHeight:kt.height(),cropperTop:e.top+t.scrollTop,cropperLeft:e.left+t.scrollLeft,cropperWidth:yt.outerWidth(),cropperHeight:yt.outerHeight()}}Ot.init=function(){kt||(kt=$('<div class="joms-cropper__wrapper" />')),yt||(yt=$('<div class="joms-cropper__box" />'))},Ot.attach=function(t){return Ot.init(),Ot.detach(),yt.css({top:"",left:"",right:"",bottom:"",width:"",height:"",webkitTransform:"",mozTransform:"",transform:""}),$(t).wrap(kt),kt=$(t).parent(),yt.insertAfter(t),Tt||(Tt=new joms.Hammer(yt[0])).on("touch drag release",(function(t){var o;t.stopPropagation(),t.preventDefault(),t.gesture.stopPropagation(),t.gesture.preventDefault(),"touch"===t.type?(Mt&&yt.off("mousemove.joms-cropper"),o=t.gesture,Lt(),Ct=function(t){var o,e,n=Mt?15:20,s=(o=t.center.pageX,{top:t.center.pageY-(e=yt.offset()).top,left:o-e.left}),a=xt,i="";return s.top<n?i+="n":s.top>a.cropperHeight-n&&(i+="s"),s.left<n?i+="w":s.left>a.cropperWidth-n&&(i+="e"),i}(o)):"release"!==t.type?It(t.gesture):(function(){var t=yt.position(),o=xt;yt.css({top:Math.max(t.top+o.wrapperTop,0),left:Math.max(t.left+o.wrapperLeft,0),right:"",bottom:"",webkitTransform:"",mozTransform:"",transform:""}),Lt()}(t.gesture),St())})),St(),t},Ot.detach=function(){Ot.init(),yt.detach(),kt.children().unwrap(),kt.detach()},Ot.getSelection=function(){var t=xt;return{x:t.cropperLeft,y:t.cropperTop,width:t.cropperWidth,height:t.cropperHeight}};var It=joms._.throttle((function(t){Ct?function(t){var o=Ct,e=xt,n={};o.match(/n/)?(n.top="auto",n.bottom=e.wrapperHeight-e.cropperTop-e.cropperHeight,n.height=e.cropperHeight-t.deltaY):o.match(/s/)&&(n.bottom="auto",n.top=e.cropperTop,n.height=e.cropperHeight+t.deltaY),o.match(/e/)?(n.right="auto",n.left=e.cropperLeft,n.width=e.cropperWidth+t.deltaX):o.match(/w/)&&(n.left="auto",n.right=e.wrapperWidth-e.cropperLeft-e.cropperWidth,n.width=e.cropperWidth-t.deltaX),n.width=n.height=Math.max(n.width||0,n.height||0,64),o.match(/n/)?n.height=Math.min(n.height,e.wrapperHeight-n.bottom):o.match(/s/)?n.height=Math.min(n.height,e.imageHeight-n.top):"auto"!==yt[0].style.top?n.height=Math.min(n.height,e.imageHeight-parseInt(yt.css("top"))):n.height=Math.min(n.height,e.wrapperHeight-parseInt(yt.css("bottom"))),o.match(/e/)?n.width=Math.min(n.width,e.imageWidth-n.left):o.match(/w/)?n.width=Math.min(n.width,e.wrapperWidth-n.right):"auto"!==yt[0].style.left?n.width=Math.min(n.width,e.imageWidth-parseInt(yt.css("left"))):n.width=Math.min(n.width,e.wrapperWidth-parseInt(yt.css("right"))),n.width=n.height=Math.min(n.width,n.height),yt.css(n)}(t):function(t){var o,e=xt,n=t.deltaY,s=t.deltaX;s=Math.min(s,e.imageWidth-e.cropperWidth-e.cropperLeft),s=Math.max(s,0-e.cropperLeft),n=Math.min(n,e.imageHeight-e.cropperHeight-e.cropperTop),o="translate3d("+s+"px, "+(n=Math.max(n,0-e.cropperTop))+"px, 0)",yt.css({webkitTransform:o,mozTransform:o,transform:o})}(t)}),Mt?10:100);function St(){Mt&&yt.on("mousemove.joms-cropper",Ut)}function Ut(t){var o,e=$(t.target).parent().offset(),n=t.pageX-e.left,s=t.pageY-e.top,a="";Lt(),s<(o=xt).cropperTop-o.wrapperTop+15?a+="n":s>o.cropperTop-o.wrapperTop+o.cropperHeight-15&&(a+="s"),n<o.cropperLeft-o.wrapperLeft+15?a+="w":n>o.cropperLeft-o.wrapperLeft+o.cropperWidth-15&&(a+="e"),yt.css({cursor:a?a+"-resize":""})}const $t=Ot,Et=function(t,o){return"gmap"===t?function(t){return t()}(o):"mediaelement"===t?function(t){if(window.MediaElement)return t();joms.$LAB.script(joms.ASSETS_URL+"vendors/mediaelement/mediaelement-and-player.min.js").wait((function(){t()}))}(o):"flowplayer"===t?function(t){if(window.flowplayer)return t();joms.$LAB.script(joms.ASSETS_URL+"flowplayer/flowplayer-3.2.6.min.js").wait((function(){t()}))}(o):"plupload"===t?function(t){if(window.plupload)return t();joms.$LAB.script(joms.ASSETS_URL+"vendors/plupload.min.js").wait((function(){t()}))}(o):"trumbowyg"===t?function(t){return!!joms.jQuery&&(joms.jQuery.trumbowyg?t():(joms.loadCSS(joms.ASSETS_URL+"vendors/trumbowyg/ui/trumbowyg.min.css"),void joms.$LAB.script(joms.ASSETS_URL+"vendors/trumbowyg/trumbowyg.min.js").wait().script(joms.ASSETS_URL+"vendors/trumbowyg/plugins/base64/trumbowyg.base64.min.js").wait().script(joms.ASSETS_URL+"vendors/trumbowyg/plugins/upload/trumbowyg.upload.js").wait((function(){t()}))))}(o):"dragsort"===t?function(t){if(window.Sortable)return t();joms.$LAB.script(joms.ASSETS_URL+"dragsort/jquery.dragsort-0.5.1.min.js").wait((function(){t()}))}(o):void o()};var Nt,At,Rt,Yt,Bt,Pt,Ht,Ft,Dt,qt,Vt;function zt(t,o,e){At&&At.off(),Nt=t,Rt=o,Yt=e,joms.ajax({func:"photos,ajaxUploadAvatar",data:[Rt,Yt],callback:function(t){Nt.items[0]={type:"inline",src:so(t)},Nt.updateItemHTML(),(At=Nt.contentContainer).on("click",".joms-js--button-upload",Kt),At.on("click",".joms-js--button-save",Gt),At.on("click",".joms-js--button-rotate-left",Wt),At.on("click",".joms-js--button-rotate-right",Qt),Xt()}})}function Gt(){var t=$t.getSelection();joms.ajax({func:"photos,ajaxUpdateThumbnail",data:[Rt,Yt,t.x,t.y,t.width,t.height],callback:function(t){t.success&&window.location.reload(!0)}})}function Wt(){joms.api.avatarRotate(Rt,Yt,"left",(function(){Jt()}))}function Qt(){joms.api.avatarRotate(Rt,Yt,"right",(function(){Jt()}))}function Jt(){var t=$(".joms-avatar__cropper").find("img"),o=t.attr("src");o=(o=o.replace(/\?.*$/,""))+"?_="+(new Date).getTime(),$t.detach(),t.removeAttr("src"),t.attr("src",o),setTimeout((function(){$t(t)}),100)}function Kt(){Xt((function(){Ht.click()}))}function Xt(t){"function"!=typeof t&&(t=function(){}),Bt?t():Et("plupload",(function(){var o;o=At.find("form").attr("action"),Pt=$('<div id="joms-js--avatar-uploader" aria-hidden="true" style="width:1px; height:1px; position:absolute; overflow:hidden;">').appendTo(document.body),Ht=$('<div id="joms-js--avatar-uploader-button">').appendTo(Pt),(Bt=new window.plupload.Uploader({url:o,filters:[{title:"Image files",extensions:"jpg,jpeg,png,gif"}],container:"joms-js--avatar-uploader",browse_button:"joms-js--avatar-uploader-button",runtimes:"html5,html4",multi_selection:!1,file_data_name:"filedata"})).bind("FilesAdded",Zt),Bt.bind("Error",to),Bt.bind("UploadProgress",oo),Bt.bind("FileUploaded",eo),Bt.bind("UploadComplete",no),Bt.init(),Ht=Pt.find("input[type=file]"),t()}))}function Zt(t){window.setTimeout((function(){At.find(".joms-progressbar__progress").css({width:0}),t.refresh(),t.start()}),0)}function to(){}function oo(t,o){var e;e=Math.min(100,Math.floor(o.loaded/o.size*100)),At.find(".joms-progressbar__progress").stop().animate({width:e+"%"}),$(".please-wait").show()}function eo(t,o,e){var n,s={};try{s=JSON.parse(e.response)}catch(t){}Ft=s,s.msg&&!s.error&&((n=$(".joms-avatar__cropper")).find("img").attr("src",s.msg),n.show(),setTimeout((function(){var t=n.find("img");$t.detach(),$t(t)}),100))}function no(){Ft.error?(At.find(".joms-js--avatar-uploader-error").html(Ft.msg).show(),At.find(".joms-progressbar__progress").stop().animate({width:"0%"})):At.find(".joms-js--avatar-uploader-error").hide(),At.find(".please-wait").hide()}function so(t){return t||(t={}),['<div class="joms-popup joms-popup--whiteblock">','<div class="joms-popup__title"><button class="mfp-close" type="button" title="',window.joms_lang.COM_COMMUNITY_CLOSE_BUTTON_TITLE,'">×</button>',t.title,"</div>",t.html||"",'<div class="joms-popup__action">','<button class="joms-button--neutral joms-button--small joms-js--button-close">',window.joms_lang.COM_COMMUNITY_CLOSE_BUTTON,"</button>","</div>","</div>"].join("")}function ao(){qt.off(),Dt.close()}function io(){qt.find("form").submit()}function co(t){return t||(t={}),['<div class="joms-popup joms-popup--whiteblock">','<div class="joms-popup__title"><button class="mfp-close" type="button" title="',window.joms_lang.COM_COMMUNITY_CLOSE_BUTTON_TITLE,'">×</button>',t.title,"</div>",'<div class="joms-popup__content joms-popup__content--single">',t.html||"","</div>",'<div class="joms-popup__action">','<a href="javascript:" class="joms-button--neutral joms-button--small joms-left" data-ui-object="popup-button-cancel">',t.btnNo,"</a> &nbsp;",'<button class="joms-button--primary joms-button--small" data-ui-object="popup-button-save">',t.btnYes,"</button>",'<div class="joms-popup__hide">','<form method="POST" action="',t.redirUrl,'"><input type="hidden" name="userid" value="',Vt,'"></form>',"</div>","</div>","</div>"].join("")}const lo={change:function(t,o){w.prepare((function(e){zt(e,t,o)}))},remove:function(t,o){w.prepare((function(t){var e,n;e=t,n=o,qt&&qt.off(),Dt=e,Vt=n,joms.ajax({func:"profile,ajaxRemovePicture",data:[Vt],callback:function(t){Dt.items[0]={type:"inline",src:co(t)},Dt.updateItemHTML(),(qt=Dt.contentContainer).on("click","[data-ui-object=popup-button-cancel]",ao),qt.on("click","[data-ui-object=popup-button-save]",io)}})}))},rotate:function(t,o,e,n){!function(t,o,e,n){joms.ajax({func:"profile,ajaxRotateAvatar",data:[t,o,e],callback:function(t){t.error?window.alert(t.error):t.success&&($(".joms-js--avatar-"+o).attr("src",t.avatar+"?_="+(new Date).getTime()),"function"==typeof n&&n(t))}})}(t,o,e,n)}};var po,ro,mo,uo,jo,fo,vo,bo,_o,ho,go,wo;function yo(){var t=$(this),o=t.data("album"),e=t.data("total");joms.ajax({func:"photos,ajaxGetPhotoList",data:[o,e],callback:function(t){t&&t.html&&($(".joms-js--album-list").hide(),$(".joms-js--photo-list").html(t.html).show())}})}function ko(){$(".joms-js--photo-list").hide(),$(".joms-js--album-list").show()}function To(){var t=$(this).data("photo");joms.ajax({func:"photos,ajaxSetPhotoCover",data:[mo,t,uo],callback:function(t){t&&t.path&&($(".joms-js--cover-image > img").attr("src",t.path).css({top:0}),$(".joms-js--cover-image-mobile").css({background:"url("+t.path+") no-repeat center center"}),po.close(),$(".joms-js--menu-reposition").show())}})}function xo(){Co((function(){vo.click()}))}function Co(t){"function"!=typeof t&&(t=function(){}),jo?t():Et("plupload",(function(){var o;o=ro.find("form").attr("action"),fo=$('<div id="joms-js--cover-uploader" aria-hidden="true" style="width:1px; height:1px; position:absolute; overflow:hidden;">').appendTo(document.body),vo=$('<div id="joms-js--cover-uploader-button">').appendTo(fo),(jo=new window.plupload.Uploader({url:o,filters:[{title:"Image files",extensions:"jpg,jpeg,png,gif"}],container:"joms-js--cover-uploader",browse_button:"joms-js--cover-uploader-button",runtimes:"html5,html4",multi_selection:!1,file_data_name:"uploadCover"})).bind("FilesAdded",Mo),jo.bind("UploadProgress",Oo),jo.bind("Error",(function(){})),jo.bind("FileUploaded",Lo),jo.bind("UploadComplete",Io),jo.init(),vo=fo.find("input[type=file]"),t()}))}function Mo(t){window.setTimeout((function(){t.refresh(),t.start()}),0)}function Oo(t,o){var e;e=Math.min(100,Math.floor(o.loaded/o.size*100)),ro.find(".joms-progressbar__progress").stop().animate({width:e+"%"}),$(".please-wait").show()}function Lo(t,o,e){var n={};try{n=JSON.parse(e.response)}catch(t){}bo=n,n.path&&($(".joms-js--cover-image > img").attr("src",n.path).css({top:0}),$(".joms-js--cover-image-mobile").css({background:"url("+n.path+") no-repeat center center"}),po.close(),$(".joms-js--menu-reposition").show())}function Io(){bo.error?(ro.find(".joms-js--cover-uploader-error").html(bo.error).show(),ro.find(".joms-progressbar__progress").stop().animate({width:"0%"})):ro.find(".joms-js--cover-uploader-error").hide(),ro.find(".please-wait").hide()}function So(t){return t||(t={}),['<div class="joms-popup joms-popup--whiteblock joms-popup--500">','<div class="joms-popup__title"><button class="mfp-close" type="button" title="',window.joms_lang.COM_COMMUNITY_CLOSE_BUTTON_TITLE,'">×</button>',t.title,"</div>",t.html||"",'<div class="joms-popup__action">','<button class="joms-button--neutral joms-button--small joms-js--button-close">',window.joms_lang.COM_COMMUNITY_CLOSE_BUTTON,"</button>","</div>","</div>"].join("")}function Uo(){ho.off(),_o.close()}function $o(){var t=ho.find("form");t.data("saving")||(t.data("saving",1),t.submit())}function Eo(t){return t||(t={}),['<div class="joms-popup joms-popup--whiteblock">','<div class="joms-popup__title"><button class="mfp-close" type="button" title="',window.joms_lang.COM_COMMUNITY_CLOSE_BUTTON_TITLE,'">×</button>',t.title,"</div>",'<div class="joms-js--step1',t.error?" joms-popup__hide":"",'">','<div class="joms-popup__content joms-popup__content--single">',t.html||"","</div>",'<div class="joms-popup__action">','<button class="joms-button--neutral joms-button--small joms-left joms-js--button-cancel">',t.btnNo,"</button> &nbsp;",'<button class="joms-button--primary joms-button--small joms-js--button-save">',t.btnYes,"</button>",'<div class="joms-popup__hide">','<form method="POST" action="',t.redirUrl,'">',"group"===go||"event"===go?'<input type="hidden" name="type" value="'+go+'">':"","group"===go||"event"===go?'<input type="hidden" name="id" value="'+wo+'">':"","group"===go||"event"===go?"":'<input type="hidden" name="userid" value="'+wo+'">',"</form>","</div>","</div>","</div>",'<div class="joms-js--step2',t.error?"":" joms-popup__hide",'">','<div class="joms-popup__content joms-popup__content--single">',t.error||"","</div>","</div>","</div>"].join("")}const No={change:function(t,o){w.prepare((function(e){var n,s,a;n=e,s=t,a=o,ro&&ro.off(),po=n,mo=s,uo=a,joms.ajax({func:"photos,ajaxChangeCover",data:[mo,uo],callback:function(t){po.items[0]={type:"inline",src:So(t)},po.updateItemHTML(),(ro=po.contentContainer).on("click",".joms-js--album",yo),ro.on("click",".joms-js--back-to-album",ko),ro.on("click",".joms-js--select-photo",To),ro.on("click","[data-ui-object=popup-button-upload]",xo),Co()}})}))},remove:function(t,o){w.prepare((function(e){!function(t,o,e){var n,s;ho&&ho.off(),_o=t,n="profile,ajaxRemoveCover",s=[wo=e],"group"!==(go=o)&&"event"!==go||(n="photos,ajaxRemoveCover",s=[go,wo]),joms.ajax({func:n,data:s,callback:function(t){_o.items[0]={type:"inline",src:Eo(t)},_o.updateItemHTML(),(ho=_o.contentContainer).on("click",".joms-js--button-cancel",Uo),ho.on("click",".joms-js--button-save",$o)}})}(e,t,o)}))}};var Ao,Ro,Yo,Bo,Po,Ho,Fo,Do;function qo(){Ro.off(),Ao.close()}function Vo(){Ro.find("form")[0].submit()}function zo(t){return t||(t={}),['<div class="joms-popup joms-popup--whiteblock">','<div class="joms-popup__title"><button class="mfp-close" type="button" title="',window.joms_lang.COM_COMMUNITY_CLOSE_BUTTON_TITLE,'">×</button>',t.title,"</div>",'<div class="joms-js--step1">','<div class="joms-popup__content">',t.html,"</div>",'<div class="joms-popup__action">','<button class="joms-button--neutral joms-button--small joms-left joms-js--button-cancel">',t.btnNo,"</button> &nbsp;",'<button class="joms-button--primary joms-button--small joms-js--button-save">',t.btnYes,"</button>","</div>","</div>",'<div class="joms-popup__hide joms-js--step2">','<div class="joms-popup__content joms-popup__content--single"></div>',"</div>","</div>"].join("")}function Go(){Ho.off(),Po.close()}function Wo(){Ho.find("form")[0].submit()}function Qo(t){return t||(t={}),['<div class="joms-popup joms-popup--whiteblock">','<div class="joms-popup__title"><button class="mfp-close" type="button" title="',window.joms_lang.COM_COMMUNITY_CLOSE_BUTTON_TITLE,'">×</button>',t.title,"</div>",'<div class="joms-js--step1">','<div class="joms-popup__content">',t.html,"</div>",'<div class="joms-popup__action">','<button class="joms-button--neutral joms-button--small joms-left joms-js--button-cancel">',t.btnNo,"</button> &nbsp;",'<button class="joms-button--primary joms-button--small joms-js--button-save">',t.btnYes,"</button>","</div>","</div>",'<div class="joms-popup__hide joms-js--step2">','<div class="joms-popup__content joms-popup__content--single"></div>',"</div>","</div>"].join("")}const Jo={lock:function(t,o){w.prepare((function(e){var n,s,a;n=e,s=t,a=o,Ro&&Ro.off(),Ao=n,Yo=s,Bo=a,joms.ajax({func:"groups,ajaxShowLockDiscussion",data:[Yo,Bo],callback:function(t){Ao.items[0]={type:"inline",src:zo(t)},Ao.updateItemHTML(),(Ro=Ao.contentContainer).on("click",".joms-js--button-cancel",qo),Ro.on("click",".joms-js--button-save",Vo)}})}))},remove:function(t,o){w.prepare((function(e){var n,s,a;n=e,s=t,a=o,Ho&&Ho.off(),Po=n,Fo=s,Do=a,joms.ajax({func:"groups,ajaxShowRemoveDiscussion",data:[Fo,Do],callback:function(t){Po.items[0]={type:"inline",src:Qo(t)},Po.updateItemHTML(),(Ho=Po.contentContainer).on("click",".joms-js--button-cancel",Go),Ho.on("click",".joms-js--button-save",Wo)}})}))}};var Ko,Xo,Zo,te,oe,ee,ne,se,ae,ie,ce,le,pe,re,me,ue,de,je,fe,ve,be,_e,he,ge,we,ye,ke,Te,xe,Ce,Me,Oe,Le,Ie,Se,Ue,$e,Ee,Ne,Ae,Re,Ye,Be,Pe;function He(){Xo.off(),Ko.close()}function Fe(t,o,e){var n,s;o?n=[Zo,o,e]:(n=[Zo,1],s=Xo.find("[name=recurring]:checked"),n.push(s&&s.length?s.val():"")),joms.ajax({func:"events,ajaxDeleteEvent",data:n,callback:function(t){var o;Xo.find(".joms-js--step1").hide(),Xo.find(".joms-js--step2").show().children().first().append("<div>"+(t.error||t.message)+"</div>"),t.next?Fe(0,t.next,n[2]):t.redirect&&((o=Xo.find(".joms-js--step2")).find(".joms-js--button-done").html(t.btnDone).on("click",(function(){window.location=t.redirect})),o.find(".joms-popup__action").show(),o.find(".joms-popup__content").removeClass("joms-popup__content--single"))}})}function De(t){var o,e,n;if(t||(t={}),o="",t.radios&&t.radios.length){for(o='<div><form style="margin:5px;padding:0">',n=0;n<t.radios.length;n++)o+='<div><label> <input type="radio" name="recurring" value="'+(e=t.radios[n])[0]+'"'+(e[2]?" checked":"")+"> ",o+=e[1]+"</label></div>";o+="</form></div>"}return['<div class="joms-popup joms-popup--whiteblock">','<div class="joms-popup__title"><button class="mfp-close" type="button" title="',window.joms_lang.COM_COMMUNITY_CLOSE_BUTTON_TITLE,'">×</button>',t.title,"</div>",'<div class="joms-js--step1',t.error?" joms-popup__hide":"",'">','<div class="joms-popup__content">',t.html,o,"</div>",'<div class="joms-popup__action">','<button class="joms-button--neutral joms-button--small joms-left joms-js--button-cancel">',t.btnCancel,"</button> &nbsp;",'<button class="joms-button--primary joms-button--small joms-js--button-save">',t.btnDelete,"</button>","</div>","</div>",'<div class="joms-js--step2',t.error?"":" joms-popup__hide",'">','<div class="joms-popup__content joms-popup__content--single">',t.error||"","</div>",'<div class="joms-popup__action joms-popup__hide">','<button class="joms-button--primary joms-js--button-done"></button>',"</div>","</div>","</div>"].join("")}function qe(t){Je($(t.currentTarget).val())}function Ve(){var t,o=ne.find("input[type=checkbox]"),e=[],n=oe.find("input[name=emails]").val()||"",s=oe.find("[name=message]").val()||"",a=/^\s+|\s+$/g;o.each((function(){e.push(this.value)})),t=[["friendsearch",""],["emails",n=n.replace(a,"")],["message",s=s.replace(a,"")],["friends",e.join(",")]],joms.ajax({func:"system,ajaxSubmitInvitation",data:["events,inviteUsers",ie,t],callback:function(){oe.off(),te.close()}})}function ze(t){var o="#joms-popup-tab-selected"===$(t.target).attr("href"),e=window.joms_lang[o?"COM_COMMUNITY_UNSELECT_ALL":"COM_COMMUNITY_SELECT_ALL"];se.html(e)}function Ge(){var t,o=$(".joms-tab__content:visible");if("joms-popup-tab-selected"===o.attr("id"))return o.find(".joms-js--friend").remove(),void oe.find("input[type=checkbox]").each((function(){this.checked=!1}));(t=o.find(".joms-js--friend").clone()).find("input[type=checkbox]").add(o.find("input[type=checkbox]")).prop("checked","checked"),(o=oe.find("#joms-popup-tab-selected")).html(t)}function We(){Je()}function Qe(t){var o,e,n=$(t.target),s=n.closest(".joms-tab__content");return"joms-popup-tab-selected"===s.attr("id")?(o=n[0].value,n.closest(".joms-js--friend").remove(),void(oe.find(".joms-js--friend-"+o+" input[type=checkbox]")[0].checked=!1)):n[0].checked?(s=oe.find("#joms-popup-tab-selected"),e=n.closest(".joms-js--friend").clone(),(n=e.find("input[type=checkbox]"))[0].checked=!0,void s.append(e)):(o=n[0].value,void oe.find("#joms-popup-tab-selected .joms-js--friend-"+o).remove())}function Je(t){var o,e,n="string"==typeof t;n?(ee.empty(),pe=0,le=t):pe+=re,o="group"===ce?"system,ajaxLoadGroupEventMembers":"page"===ce?"system,ajaxLoadPageEventMembers":"system,ajaxLoadFriendsList",e=[le,"events,inviteUsers",ie,pe,re],"group"===ce&&e.splice(1,1),me&&me.abort(),me=joms.ajax({func:o,data:e,callback:function(t){var o;t.html&&((o=$($.trim(t.html))).each((function(){var t=$(this).find(":checkbox"),o=t.val();ne.find(":checkbox[value="+o+"]").length&&(t[0].checked=!0)})),ee.append(o)),n||(ee[0].scrollTop=ee[0].scrollHeight),t.loadMore?(se.css({width:"49%",marginRight:"2%"}),ae.css({width:"49%"}).html(window.joms_lang.COM_COMMUNITY_INVITE_LOAD_MORE+" ("+t.moreCount+")").show()):(ae.hide(),se.css({width:"100%",marginRight:"0"}))}})}function Ke(t){return['<div class="joms-popup joms-popup--whiteblock">','<div class="joms-popup__title"><button class="mfp-close" type="button" title="',window.joms_lang.COM_COMMUNITY_CLOSE_BUTTON_TITLE,'">×</button>',t.title,"</div>",'<div data-ui-object="popup-step-1"',t.error?' class="joms-popup__hide"':"",">",'<div class="joms-popup__content">',t.html,"</div>",'<div class="joms-popup__action">','<button class="joms-button--primary" data-btn-save="1">',t.btnInvite,"</button>","</div>","</div>",'<div data-ui-object="popup-step-2"',t.error?"":' class="joms-popup__hide"',">",'<div class="joms-popup__content joms-popup__content--single" data-ui-object="popup-message">',t.error||"","</div>","</div>","</div>"].join("")}function Xe(){de.off(),ue.close()}function Ze(){de.find("form")[0].submit()}function tn(t){return t||(t={}),['<div class="joms-popup joms-popup--whiteblock">','<div class="joms-popup__title"><button class="mfp-close" type="button" title="',window.joms_lang.COM_COMMUNITY_CLOSE_BUTTON_TITLE,'">×</button>',t.title,"</div>",'<div class="joms-js--step1 ',t.isMember?"joms-popup__hide":"",'">','<div class="joms-popup__content">',t.html,"</div>",'<div class="joms-popup__action">','<button class="joms-button--neutral joms-button--small joms-left joms-js--button-cancel">',t.btnNo,"</button> &nbsp;",'<button class="joms-button--primary joms-button--small joms-js--button-save">',t.btnYes,"</button>","</div>","</div>",'<div class="joms-js--step2 ',t.isMember?"":"joms-popup__hide",'">','<div class="joms-popup__content joms-popup__content--single">',t.html,"</div>","</div>","</div>"].join("")}function on(){ve.off(),fe.close()}function en(){ve.find("form")[0].submit()}function nn(t){return t||(t={}),['<div class="joms-popup joms-popup--whiteblock">','<div class="joms-popup__title"><button class="mfp-close" type="button" title="',window.joms_lang.COM_COMMUNITY_CLOSE_BUTTON_TITLE,'">×</button>',t.title,"</div>",'<div class="joms-js--step1">','<div class="joms-popup__content">',t.html,"</div>",'<div class="joms-popup__action">','<button class="joms-button--neutral joms-button--small joms-left joms-js--button-cancel">',t.btnNo,"</button> &nbsp;",'<button class="joms-button--primary joms-button--small joms-js--button-save">',t.btnYes,"</button>","</div>","</div>",'<div class="joms-popup__hide joms-js--step2">','<div class="joms-popup__content joms-popup__content--single"></div>',"</div>","</div>"].join("")}function sn(t){var o=$(t.currentTarget).data("value");joms.ajax({func:"events,ajaxUpdateStatus",data:[ge,o],callback:function(){window.location.reload()}})}function an(t){var o,e="";for(o=0;o<t.length;o++)e+='<li><a data-value="'+t[o][0]+'" href="javascript:">'+t[o][1]+"</a></li>";return['<div class="joms-popup joms-popup--dropdown">','<ul class="joms-dropdown">',e,"</ul>",'<button class="mfp-close" type="button" title="',window.joms_lang.COM_COMMUNITY_CLOSE_BUTTON_TITLE,'">×</button>',"</div>"].join("")}function cn(t){return t||(t={}),['<div class="joms-popup joms-popup--whiteblock">','<div class="joms-popup__title"><button class="mfp-close" type="button" title="',window.joms_lang.COM_COMMUNITY_CLOSE_BUTTON_TITLE,'">×</button>',t.title,"</div>",'<div class="joms-popup__content joms-popup__content--single">',t.html||t.error||"","</div>",'<div class="joms-popup__action">','<button class="joms-button--neutral joms-button--small joms-js--button-close">',window.joms_lang.COM_COMMUNITY_CLOSE_BUTTON,"</button>","</div>","</div>"].join("")}function ln(t,o,e){Te&&Te.off(),ke=t,xe=o,Ce=e,joms.ajax({func:"events,ajaxConfirmRemoveGuest",data:[Ce,xe],callback:function(t){ke.items[0]={type:"inline",src:mn(t)},ke.updateItemHTML(),(Te=ke.contentContainer).on("click",".joms-js--button-cancel",pn),Te.on("click",".joms-js--button-save",rn)}})}function pn(){Te.off(),ke.close()}function rn(){var t=Te.find("input:checkbox")[0].checked||!1;joms.ajax({func:t?"events,ajaxBlockGuest":"events,ajaxRemoveGuest",data:[Ce,xe],callback:function(t){var o=Te.find(".joms-js--step1"),e=Te.find(".joms-js--step2");t.error||(ke.st.callbacks||(ke.st.callbacks={}),ke.st.callbacks.close=function(){window.location.reload()}),e.find(".joms-popup__content").html(t.error||t.message),o.hide(),e.show()}})}function mn(t){return t||(t={}),['<div class="joms-popup joms-popup--whiteblock">','<div class="joms-popup__title"><button class="mfp-close" type="button" title="',window.joms_lang.COM_COMMUNITY_CLOSE_BUTTON_TITLE,'">×</button>',t.title,"</div>",'<div class="joms-js--step1">','<div class="joms-popup__content">',t.html,"</div>",'<div class="joms-popup__action">','<button class="joms-button--neutral joms-button--small joms-left joms-js--button-cancel">',t.btnNo,"</button> &nbsp;",'<button class="joms-button--primary joms-button--small joms-js--button-save">',t.btnYes,"</button>","</div>","</div>",'<div class="joms-popup__hide joms-js--step2">','<div class="joms-popup__content joms-popup__content--single"></div>',"</div>","</div>"].join("")}function un(t){return t||(t={}),['<div class="joms-popup joms-popup--whiteblock">','<div class="joms-popup__title"><button class="mfp-close" type="button" title="',window.joms_lang.COM_COMMUNITY_CLOSE_BUTTON_TITLE,'">×</button>',t.title,"</div>",'<div class="joms-popup__content joms-popup__content--single">',t.html||t.error||"","</div>",'<div class="joms-popup__action">','<button class="joms-button--neutral joms-button--small joms-js--button-close">',window.joms_lang.COM_COMMUNITY_CLOSE_BUTTON,"</button>","</div>","</div>"].join("")}function dn(t){Ie.find("textarea").val(t.target.value)}function jn(){Ie.off(),Le.close()}function fn(){var t;(t=(t=Ie.find("textarea").val()).replace(/^\s+|\s+$/g,""))?(Ie.find(".joms-js--error").hide(),joms.ajax({func:"system,ajaxSendReport",data:["events,reportEvent",window.location.href,t,Se],callback:function(t){Ie.find(".joms-js--step1").hide(),Ie.find(".joms-js--step2").show().children().html(t.error||t.message)}})):Ie.find(".joms-js--error").show()}function vn(t){return t||(t={}),['<div class="joms-popup joms-popup--whiteblock joms-popup--500">','<div class="joms-popup__title"><button class="mfp-close" type="button" title="',window.joms_lang.COM_COMMUNITY_CLOSE_BUTTON_TITLE,'">×</button>',t.title,"</div>",'<div class="joms-js--step1',t.error?" joms-popup__hide":"",'">',t.html,'<div class="joms-popup__action">','<button class="joms-button--neutral joms-button--small joms-left joms-js--button-cancel">',t.btnCancel,"</button> &nbsp;",'<button class="joms-button--primary joms-button--small joms-js--button-save">',t.btnSend,"</button>","</div>","</div>",'<div class="joms-js--step2',t.error?"":" joms-popup__hide",'">','<div class="joms-popup__content joms-popup__content--single">',t.error||"","</div>","</div>","</div>"].join("")}function bn(t){return t||(t={}),['<div class="joms-popup joms-popup--whiteblock">','<div class="joms-popup__title"><button class="mfp-close" type="button" title="',window.joms_lang.COM_COMMUNITY_CLOSE_BUTTON_TITLE,'">×</button>',t.title||"","</div>",'<div class="joms-popup__content joms-popup__content--single">',t.html||t.message||t.error||"","</div>",'<div class="joms-popup__action">','<button class="joms-button--neutral joms-button--small joms-js--button-close">',window.joms_lang.COM_COMMUNITY_CLOSE_BUTTON,"</button>","</div>","</div>"].join("")}function _n(t){return t||(t={}),['<div class="joms-popup joms-popup--whiteblock">','<div class="joms-popup__title"><button class="mfp-close" type="button" title="',window.joms_lang.COM_COMMUNITY_CLOSE_BUTTON_TITLE,'">×</button>',t.title||"","</div>",'<div class="joms-popup__content joms-popup__content--single">',t.html||t.message||t.error||"","</div>",'<div class="joms-popup__action">','<button class="joms-button--neutral joms-button--small joms-js--button-close">',window.joms_lang.COM_COMMUNITY_CLOSE_BUTTON,"</button>","</div>","</div>"].join("")}function hn(){Be.off(),Ye.close()}function gn(t,o,e){var n;n=o?[Pe,o,e]:[Pe],Be.find(".joms-js--step1").find(".joms-popup__content").html(joms_lang.COM_COMMUNITY_POPUP_LOADING),Be.find(".joms-js--step1").find(".joms-popup__action").children().hide(),joms.ajax({func:"events,ajaxUnpublishEvent",data:n,callback:function(t){var o;Be.find(".joms-js--step1").hide(),Be.find(".joms-js--step2").show().children().first().append("<div>"+(t.error||t.message)+"</div>"),t.next?gn(0,t.next,n[2]):t.redirect&&((o=Be.find(".joms-js--step2")).find(".joms-js--button-done").html(t.btnDone).on("click",(function(){window.location=t.redirect})),o.find(".joms-popup__action").show(),o.find(".joms-popup__content").removeClass("joms-popup__content--single"))}})}function wn(t){var o,e,n;if(t||(t={}),o="",t.radios&&t.radios.length){for(o='<div><form style="margin:5px;padding:0">',n=0;n<t.radios.length;n++)o+='<div><label> <input type="radio" name="recurring" value="'+(e=t.radios[n])[0]+'"'+(e[2]?" checked":"")+"> ",o+=e[1]+"</label></div>";o+="</form></div>"}return['<div class="joms-popup joms-popup--whiteblock">','<div class="joms-popup__title"><button class="mfp-close" type="button" title="',window.joms_lang.COM_COMMUNITY_CLOSE_BUTTON_TITLE,'">×</button>',t.title,"</div>",'<div class="joms-js--step1',t.error?" joms-popup__hide":"",'">','<div class="joms-popup__content">',t.html,o,"</div>",'<div class="joms-popup__action">','<button class="joms-button--neutral joms-button--small joms-left joms-js--button-cancel">',t.btnNo,"</button> &nbsp;",'<button class="joms-button--primary joms-button--small joms-js--button-save">',t.btnYes,"</button>","</div>","</div>",'<div class="joms-js--step2',t.error?"":" joms-popup__hide",'">','<div class="joms-popup__content joms-popup__content--single">',t.error||"","</div>",'<div class="joms-popup__action joms-popup__hide">','<button class="joms-button--primary joms-js--button-done"></button>',"</div>","</div>","</div>"].join("")}const yn={deleteEvent:function(t){w.prepare((function(o){var e,n;e=o,n=t,Xo&&Xo.off(),Ko=e,Zo=n,joms.ajax({func:"events,ajaxWarnEventDeletion",data:[Zo],callback:function(t){Ko.items[0]={type:"inline",src:De(t)},Ko.updateItemHTML(),(Xo=Ko.contentContainer).on("click",".joms-js--button-cancel",He),Xo.on("click",".joms-js--button-save",Fe)}})}))},invite:function(t,o){w.prepare((function(e){var n,s,a;n=e,s=t,a=o,oe&&oe.off(),te=n,ie=s,ce=a,re=200,joms.ajax({func:"system,ajaxShowInvitationForm",data:[null,"",ie,1,"group"===ce?0:1,ce],callback:function(t){te.items[0]={type:"inline",src:Ke(t)},te.updateItemHTML(),t.limit&&(re=+t.limit),oe=te.contentContainer,ee=oe.find(".joms-tab__content").eq(0),ne=oe.find(".joms-tab__content").eq(1),se=oe.find("[data-btn-select]"),ae=oe.find("[data-btn-load]"),oe.on("keyup","[data-search]",qe),oe.on("click",".joms-tab__bar a",ze),oe.on("click","[data-btn-select]",Ge),oe.on("click","[data-btn-load]",We),oe.on("click","[data-btn-save]",Ve),oe.on("click","input[type=checkbox]",Qe),Je("")}})}))},join:function(t){w.prepare((function(o){var e,n;e=o,n=t,de&&de.off(),ue=e,je=n,joms.ajax({func:"events,ajaxRequestInvite",data:[je],callback:function(t){ue.items[0]={type:"inline",src:tn(t)},ue.updateItemHTML(),(de=ue.contentContainer).on("click",".joms-js--button-cancel",Xe),de.on("click",".joms-js--button-save",Ze)}})}))},leave:function(t){w.prepare((function(o){var e,n;e=o,n=t,ve&&ve.off(),fe=e,be=n,joms.ajax({func:"events,ajaxIgnoreEvent",data:[be],callback:function(t){fe.items[0]={type:"inline",src:nn(t)},fe.updateItemHTML(),(ve=fe.contentContainer).on("click",".joms-js--button-cancel",on),ve.on("click",".joms-js--button-save",en)}})}))},response:function(t){var o=[].slice.call(arguments);o.shift(),w.prepare((function(e){var n,s,a;n=e,s=t,a=o,he&&he.off(),ge=s,(_e=n).items[0]={type:"inline",src:an(a)},_e.updateItemHTML(),(he=_e.contentContainer).on("click","a[data-value]",sn)}))},addFeatured:function(t){w.prepare((function(o){we=o,ye=t,joms.ajax({func:"events,ajaxAddFeatured",data:[ye],callback:function(t){we.items[0]={type:"inline",src:cn(t)},we.st.callbacks||(we.st.callbacks={}),we.st.callbacks.close=function(){window.location.reload()},we.updateItemHTML()}})}))},rejectGuest:function(t,o){w.prepare((function(e){ln(e,t,o)}))},removeFeatured:function(t){w.prepare((function(o){Me=o,Oe=t,joms.ajax({func:"events,ajaxRemoveFeatured",data:[Oe],callback:function(t){Me.items[0]={type:"inline",src:un(t)},Me.st.callbacks||(Me.st.callbacks={}),Me.st.callbacks.close=function(){window.location.reload()},Me.updateItemHTML()}})}))},report:function(t){w.prepare((function(o){var e,n;e=o,n=t,Ie&&Ie.off(),Le=e,Se=n,joms.ajax({func:"system,ajaxReport",data:[],callback:function(t){Le.items[0]={type:"inline",src:vn(t)},Le.updateItemHTML(),(Ie=Le.contentContainer).on("change","select",dn),Ie.on("click",".joms-js--button-cancel",jn),Ie.on("click",".joms-js--button-save",fn)}})}))},banMember:function(t,o){w.prepare((function(e){Ue=e,$e=t,Ee=o,joms.ajax({func:"events,ajaxBanMember",data:[Ee,$e],callback:function(t){Ue.items[0]={type:"inline",src:bn(t)},Ue.updateItemHTML(),t.success&&(Ue.st.callbacks||(Ue.st.callbacks={}),Ue.st.callbacks.close=function(){window.location.reload()})}})}))},unbanMember:function(t,o){w.prepare((function(e){Ne=e,Ae=t,Re=o,joms.ajax({func:"events,ajaxUnbanMember",data:[Re,Ae],callback:function(t){Ne.items[0]={type:"inline",src:_n(t)},Ne.updateItemHTML(),t.success&&(Ne.st.callbacks||(Ne.st.callbacks={}),Ne.st.callbacks.close=function(){window.location.reload()})}})}))},unpublish:function(t){w.prepare((function(o){var e,n;e=o,n=t,Be&&Be.off(),Ye=e,Pe=n,joms.ajax({func:"events,ajaxShowUnpublishEvent",data:[Pe],callback:function(t){Ye.items[0]={type:"inline",src:wn(t)},Ye.updateItemHTML(),(Be=Ye.contentContainer).on("click",".joms-js--button-cancel",hn),Be.on("click",".joms-js--button-save",gn)}})}))}};var kn,Tn,xn,Cn;function Mn(t){Tn&&Tn.off(),joms.ajax({func:"connect,ajaxUpdate",data:[t||""],callback:function(t){var o=t.jax_token_var;o&&(t.btnNext=t.btnContinue,window.jax_token_var=t.jax_token_var),kn.items[0]={type:"inline",src:Nn(t)},kn.updateItemHTML(),Tn=kn.contentContainer,xn=t.lang,Tn.off("click"),Tn.on("click",".joms-js--button-next",o?Un:On),Tn.on("click",".joms-js--button-back2",Ln),Tn.on("click",".joms-js--button-next2",In),Tn.on("click",".joms-js--button-back3",$n)}})}function On(){var t,o;(Cn=2==+Tn.find("[name=membertype]:checked").val())?joms.ajax({func:"connect,ajaxShowExistingUserForm",data:[""],callback:function(t){var o;Tn.find(".joms-js--step1").hide(),(o=Tn.find(".joms-js--step2")).find(".joms-popup__content").html(t.html),o.find(".joms-js--button-back2").html(t.btnBack),o.find(".joms-js--button-next2").html(t.btnLogin),o.show()}}):(t=Tn.find("#joms-js--fbc-tnc-checkbox")).length?(t=t[0],o=Tn.find(".joms-js--fbc-tnc-error"),t.checked?(o.hide(),Sn()):o.show()):Sn()}function Ln(){Tn.find(".joms-js--step2").hide(),Tn.find(".joms-js--step3").hide(),Tn.find(".joms-js--step1").show()}function In(){Cn?function(){var t=Tn.find(".joms-js--step2"),o=t.find("[name=username]").val(),e=t.find("[name=password]").val();joms.ajax({func:"connect,ajaxValidateLogin",data:[o,e],callback:function(t){var o;if(t.error)return t.redirect?(alert(t.error),void(location.href=t.redirect)):(Tn.find(".joms-js--step2").hide(),(o=Tn.find(".joms-js--step3")).find(".joms-popup__content").html(t.error),o.find(".joms-js--button-back3").html(t.btnBack),void o.show());Tn.off(),kn.close(),joms.popup.fbc.update()}})}():function(){var t=Tn.find(".joms-js--step2"),o=t.find("[name=name]").val(),e=t.find("[name=username]").val(),n=t.find("[name=email]").val(),s=t.find("[name=profiletype]"),a="";if(s.length){if(!s.filter(":checked").length)return t.hide(),(t=Tn.find(".joms-js--step3")).find(".joms-popup__content").html(xn.selectProfileType),t.find(".joms-js--button-back3").html(xn.btnBack),void t.show();a=s.filter(":checked").val()}joms.ajax({func:"connect,ajaxCreateNewAccount",data:[o,e,n,a],callback:function(t){var o;if(t.error)return Tn.find(".joms-js--step2").hide(),(o=Tn.find(".joms-js--step3")).find(".joms-popup__content").html(t.error),o.find(".joms-js--button-back3").html(t.btnBack),void o.show();Tn.off(),kn.close(),joms.popup.fbc.update()}})}()}function Sn(){joms.ajax({func:"connect,ajaxShowNewUserForm",data:[""],callback:function(t){var o;Tn.find(".joms-js--step1").hide(),(o=Tn.find(".joms-js--step2")).find(".joms-popup__content").html(t.html),o.find(".joms-js--button-back2").html(t.btnBack),o.find(".joms-js--button-next2").html(t.btnCreate),o.show()}})}function Un(){var t=Tn.find("[name=importstatus]"),o=Tn.find("[name=importavatar]");t=t.length&&t[0].checked?1:0,o=o.length&&o[0].checked?1:0,joms.ajax({func:"connect,ajaxImportData",data:[t,o],callback:function(t){var o;return Tn.find(".joms-js--step1").hide(),t.error?(Tn.off("click").on("click",".joms-js--button-next2",En),(o=Tn.find(".joms-js--step2")).find(".joms-popup__content").html(t.error),o.find(".joms-js--button-back2").hide(),o.find(".joms-js--button-next2").html(t.btnNext),void o.show()):t.btnUpdate?(Tn.off("click").on("click",".joms-js--button-back2",En),Tn.off("click").on("click",".joms-js--button-next2",(function(){window.location=t.redirect})),(o=Tn.find(".joms-js--step2")).find(".joms-popup__content").html(t.html),o.find(".joms-js--button-back2").html(t.btnSkip),o.find(".joms-js--button-next2").html(t.btnUpdate),void o.show()):(En(),void(window.location=t.redirect))}})}function $n(){Tn.find(".joms-js--step3").hide(),Cn?(Tn.find(".joms-js--step2").hide(),Tn.find(".joms-js--step1").show()):(Tn.find(".joms-js--step2").show(),Tn.find(".joms-js--step1").hide())}function En(){Tn.off(),kn.close()}function Nn(t){return t||(t={}),['<div class="joms-popup joms-popup--whiteblock">','<div class="joms-popup__title"><button class="mfp-close" type="button" title="',window.joms_lang.COM_COMMUNITY_CLOSE_BUTTON_TITLE,'">×</button>',t.title,"</div>",'<div class="joms-js--step1">','<div class="joms-popup__content ',t.btnNext?"":"joms-popup__content--single",'">',t.error||t.html||"","</div>",t.btnNext?'<div class="joms-popup__action">':"",t.btnNext?'<button class="joms-button--primary joms-button--small joms-js--button-next">'+t.btnNext+"</button>":"",t.btnNext?"</div>":"","</div>",'<div class="joms-js--step2 joms-popup__hide">','<div class="joms-popup__content"></div>','<div class="joms-popup__action">','<button class="joms-button--neutral joms-button--small joms-left joms-js--button-back2"></button>','<button class="joms-button--primary joms-button--small joms-js--button-next2"></button>',"</div>","</div>",'<div class="joms-js--step3 joms-popup__hide">','<div class="joms-popup__content joms-popup__content--single"></div>','<div class="joms-popup__action">','<button class="joms-button--neutral joms-button--small joms-js--button-back3"></button>',"</div>","</div>","</div>"].join("")}function An(){var t=window.joms_lang||{};return['<div class="joms-popup joms-popup--whiteblock">','<div class="joms-popup__title"><button class="mfp-close" type="button" title="',window.joms_lang.COM_COMMUNITY_CLOSE_BUTTON_TITLE,'">×</button>',t.COM_COMMUNITY_AUTHENTICATION_KEY||"Authentication key","</div>",'<div class="joms-popup__content">',"<span>",t.COM_COMMUNITY_AUTHENTICATION_KEY_LABEL||"Insert your two-factor authentication key","</span>",'<input type="text" class="joms-input" name="secret">',"</div>",'<div class="joms-popup__action">','<button class="joms-button--neutral joms-button--small joms-left joms-js--button-skip">',t.COM_COMMUNITY_SKIP_BUTTON||"Skip","</button>",'<button class="joms-button--primary joms-button--small joms-js--button-next">',t.COM_COMMUNITY_NEXT||"Next","</button>","</div>","</div>"].join("")}const Rn={update:function(){w.prepare((function(t){var o;o=t,Tn&&Tn.off(),kn=o,window.joms_use_tfa?(kn.items[0]={type:"inline",src:An()},kn.updateItemHTML(),(Tn=kn.contentContainer).off("click"),Tn.on("click",".joms-js--button-next",(function(){Mn(Tn.find("[name=secret]").val())})),Tn.on("click",".joms-js--button-skip",(function(){Mn()}))):Mn()}))}};var Yn,Bn,Pn,Hn,Fn,Dn,qn,Vn,zn,Gn,Wn,Qn,Jn,Kn,Xn,Zn,ts,os,es,ns,ss,as,is;function cs(t,o,e,n){Yn=t,Bn=o,Pn=e,Hn=n,joms.ajax({func:"files,ajaxFileDownload",data:[Bn,Pn],callback:function(t){Yn.items[0]={type:"inline",src:ls(t)},Yn.updateItemHTML(),t.url&&(Yn.close(),window.open(Hn))}})}function ls(t){return t||(t={}),['<div class="joms-popup joms-popup--whiteblock">','<div class="joms-popup__title"><button class="mfp-close" type="button" title="',window.joms_lang.COM_COMMUNITY_CLOSE_BUTTON_TITLE,'">×</button>',t.title,"</div>",'<div class="joms-popup__content joms-popup__content--single">',t.message||t.error,"</div>",'<div class="joms-popup__action">','<button class="joms-button--neutral joms-button--small joms-js--button-close">',window.joms_lang.COM_COMMUNITY_CLOSE_BUTTON,"</button>","</div>","</div>"].join("")}function ps(t,o){joms.ajax({func:"files,ajaxgetFileList",data:[t,Vn,Gn,4,qn],callback:function(t){o(t)}})}function rs(){var t=$(this),o=t.data("id");zn!==o&&(zn=o,Wn=Dn.find(".joms-js--tab-"+o),t.addClass("active").siblings().removeClass("active"),Qn.css({visibility:"hidden"}),Wn.empty().show().siblings(".joms-js--tab").hide(),Gn=0,ps(zn,(function(t){Wn.html(t.html),t.next&&t.count?(Gn=t.next,Qn.css({visibility:"visible"}),Qn.html(window.joms_lang.COM_COMMUNITY_FILES_LOAD_MORE+" ("+t.count+")")):Qn.css({visibility:"hidden"})})))}function ms(){ps(zn,(function(t){Wn.append(t.html),Wn[0].scrollTop=Wn[0].scrollHeight,t.next&&t.count?(Gn=t.next,Qn.css({visibility:"visible"}),Qn.html(window.joms_lang.COM_COMMUNITY_FILES_LOAD_MORE+" ("+t.count+")")):Qn.css({visibility:"hidden"})}))}function us(t){return t||(t={}),['<div class="joms-popup joms-popup--whiteblock joms-popup--600">','<div class="joms-popup__title"><button class="mfp-close" type="button" title="',window.joms_lang.COM_COMMUNITY_CLOSE_BUTTON_TITLE,'">×</button>',t.title,"</div>",t.html,"</div>"].join("")}function ds(t){return t||(t={}),['<div class="joms-popup joms-popup--whiteblock">','<div class="joms-popup__title"><button class="mfp-close" type="button" title="',window.joms_lang.COM_COMMUNITY_CLOSE_BUTTON_TITLE,'">×</button> &nbsp; </div>','<div class="joms-popup__content joms-popup__content--single">',t.message||t.error,"</div>","</div>"].join("")}function js(){fs((function(){ss.click()}))}function fs(t){"function"!=typeof t&&(t=function(){}),es?t():(ns=joms.BASE_URL+Zn.find("input[name=url]").val(),Et("plupload",(function(){var o;o=$('<div id="joms-js--file-uploader" aria-hidden="true" style="width:1px; height:1px; overflow:hidden">').appendTo(document.body),$('<button id="joms-js--file-uploader-button">').appendTo(o),(es=new window.plupload.Uploader({url:ns,container:"joms-js--file-uploader",browse_button:"joms-js--file-uploader-button",runtimes:"html5,html4",filters:[{title:"Document files",extensions:Zn.find("input[name=filetype]").val()}],max_file_size:Zn.find("input[name=maxfilesize]").val()+"mb"})).bind("FilesAdded",vs),es.bind("Error",bs),es.bind("UploadProgress",hs),es.bind("FileUploaded",gs),es.bind("uploadComplete",ws),es.init(),ss=o.find("input[type=file]"),t()})))}function vs(t,o){var e,n="";for(e=0;e<o.length;e++)n+='<div class="joms-file--'+o[e].id+'" style="margin-bottom:5px">',n+="<div><strong>"+o[e].name+"</strong> <span>("+Math.round(o[e].size/1024)+" KB)</span></div>",n+='<div class="joms-progressbar"><div class="joms-progressbar__progress" style="width:0%"></div></div>',n+="</div>";as.find(".joms-js--upload-placeholder").remove(),as.append(n),Zn.find(".joms-js--btn-add").html(Zn.find(".joms-js--btn-add").data("lang-more")).css({visibility:"visible"}),Zn.find(".joms-js--btn-upload").show(),Zn.find(".joms-js--btn-done").hide()}function bs(t,o){as.find(".joms-file--"+o.file.id).remove(),window.alert(o.message+" ("+o.code+")")}function _s(){Zn.find(".joms-js--btn-add").css({visibility:"hidden"}),Zn.find(".joms-js--btn-upload").hide(),Zn.find(".joms-js--btn-done").hide(),es.settings.url=ns+"&type="+ts+"&id="+os,es.refresh(),es.start()}function hs(t,o){var e;e=Math.min(100,Math.floor(o.loaded/o.size*100)),Zn.find(".joms-file--"+o.id).find(".joms-progressbar__progress").stop().animate({width:e+"%"})}function gs(t,o,e){var n={};try{n=JSON.parse(e.response)}catch(t){}if(n.error)return es.stop(),Zn.find(".joms-js--btn-add").css({visibility:"hidden"}),Zn.find(".joms-js--btn-upload").hide(),Zn.find(".joms-js--btn-done").show(),Zn.find(".joms-file--"+o.id).nextAll().addBack().remove(),void window.alert(n.msg);n.msg?Zn.find(".joms-file--"+o.id).css({color:"#F00"}):n.id&&(is=!0)}function ws(){Zn.find(".joms-js--btn-add").css({visibility:"visible"}),Zn.find(".joms-js--btn-upload").hide(),Zn.find(".joms-js--btn-done").show()}function ys(t){return t||(t={}),['<div class="joms-popup joms-popup--whiteblock joms-popup--500">','<div class="joms-popup__title"><button class="mfp-close" type="button" title="',window.joms_lang.COM_COMMUNITY_CLOSE_BUTTON_TITLE,'">×</button>',t.title,"</div>",t.html,"</div>"].join("")}const ks={download:function(t,o,e){w.prepare((function(n){cs(n,t,o,e)}))},list:function(t,o){w.prepare((function(e){var n,s,a;n=e,s=t,a=o,Dn&&Dn.off(),Fn=n,qn=s,Vn=a,joms.ajax({func:"files,ajaxviewMore",data:[qn,Vn],callback:function(t){Fn.items[0]={type:"inline",src:us(t)},Fn.updateItemHTML(),Dn=Fn.contentContainer,Qn=Dn.find(".joms-js--btn-loadmore"),Dn.on("click",".joms-js--tab-bar a",rs),Dn.on("click",".joms-js--btn-loadmore",ms),zn=!1,Dn.find(".joms-js--tab-bar a.active").trigger("click")}})}))},remove:function(t,o){Jn=t,Kn=o,window.confirm(window.joms_lang.COM_COMMUNITY_FILES_DELETE_CONFIRM)&&joms.ajax({func:"files,ajaxDeleteFile",data:[Jn,Kn],callback:function(t){t.success?$(".joms-js--file-"+Kn).remove():w.prepare((function(o){!function(t,o){t.items[0]={type:"inline",src:ds(o)},t.updateItemHTML()}(o,t)}))}})},upload:function(t,o){w.prepare((function(e){var n,s,a;n=e,s=t,a=o,Zn&&Zn.off(),Xn=n,ts=s,os=a,joms.ajax({func:"files,ajaxFileUploadForm",data:[ts,os],callback:function(t){Xn.items[0]={type:"inline",src:ys(t)},Xn.updateItemHTML(),Xn.st.callbacks||(Xn.st.callbacks={}),Xn.st.callbacks.close=function(){is&&window.location.reload()},Zn=Xn.contentContainer,is=!1,as=Zn.find(".joms-js--upload-preview"),Zn.on("click",".joms-js--btn-add",js),Zn.on("click",".joms-js--btn-upload",_s),Zn.on("click",".joms-js--btn-done",(function(){is&&window.location.reload()})),fs()}})}))},updateHit:function(t,o){joms.ajax({func:"files,ajaxUpdateHit",data:[t],callback:function(){}}),"string"==typeof o&&window.open(o)}};var Ts,xs,Cs,Ms,Os,Ls;function Is(){xs.off(),Ts.close()}function Ss(){var t=xs.find("textarea").val().replace(/\t/g,"\\t").replace(/\n/g,"\\n").replace(/&quot;/g,'"');joms.ajax({func:"friends,ajaxSaveFriend",data:[[["msg",t],["userid",Cs]]],callback:function(t){var o=xs.find("[data-ui-object=popup-step-1]"),e=xs.find("[data-ui-object=popup-step-2]");t.error||(Ts.st.callbacks||(Ts.st.callbacks={}),Ts.st.callbacks.close=function(){window.location.reload()}),e.find("[data-ui-object=popup-message]").html(t.error||t.message),o.hide(),e.show()}})}function Us(t){return t||(t={}),['<div class="joms-popup joms-popup--whiteblock">','<div class="joms-popup__title"><button class="mfp-close" type="button" title="',window.joms_lang.COM_COMMUNITY_CLOSE_BUTTON_TITLE,'">×</button>',t.title,"</div>",'<div data-ui-object="popup-step-1"',t.error?' class="joms-popup__hide"':"",">",'<div class="joms-popup__content">','<div class="joms-stream__header" style="padding:0">','<div class="joms-avatar--stream"><img src="',t.avatar,'"></div>','<div class="joms-stream__meta"><span>',t.desc,"</span></div>","</div>","</div>",'<div class="joms-popup__content">','<textarea class="joms-textarea" style="margin:0">',t.message,"</textarea>","</div>",'<div class="joms-popup__action">','<a href="javascript:" class="joms-button--neutral joms-button--small joms-left" data-ui-object="popup-button-cancel">',t.btnCancel,"</a> &nbsp;",'<button class="joms-button--primary joms-button--small" data-ui-object="popup-button-save">',t.btnAdd,"</button>","</div>","</div>",'<div data-ui-object="popup-step-2"',t.error?"":' class="joms-popup__hide"',">",'<div class="joms-popup__content joms-popup__content--single" data-ui-object="popup-message">',t.error||"","</div>",'<div class="joms-popup__action">','<button class="joms-button--neutral joms-button--small joms-js--button-close">',window.joms_lang.COM_COMMUNITY_CLOSE_BUTTON,"</button>","</div>","</div>","</div>"].join("")}function $s(){Os.off(),Ms.close()}function Es(){Os.find("form")[0].submit()}function Ns(t){return t||(t={}),['<div class="joms-popup joms-popup--whiteblock">','<div class="joms-popup__title"><button class="mfp-close" type="button" title="',window.joms_lang.COM_COMMUNITY_CLOSE_BUTTON_TITLE,'">×</button>',t.title,"</div>",'<div class="joms-js--step1">','<div class="joms-popup__content">',t.html,"</div>",'<div class="joms-popup__action">','<button class="joms-button--neutral joms-button--small joms-left joms-js--button-cancel">',t.btnNo,"</button> &nbsp;",'<button class="joms-button--primary joms-button--small joms-js--button-save">',t.btnYes,"</button>","</div>","</div>",'<div class="joms-popup__hide joms-js--step2">','<div class="joms-popup__content joms-popup__content--single"></div>',"</div>","</div>"].join("")}var As=[];const Rs={updateCounter:function(t,o,e){var n;o=t+"-"+o,As.indexOf(o)>=0||(n=$(".joms-js--notiflabel-"+t),As.indexOf(o)<0&&(As.push(o),e=+n.eq(0).text()+e,n.html(e>0?e:"")))}};var Ys,Bs,Ps,Hs,Fs,Ds,qs,Vs,zs;function Gs(t){return t||(t={}),['<div class="joms-popup joms-popup--whiteblock">','<div class="joms-popup__title"><button class="mfp-close" type="button" title="',window.joms_lang.COM_COMMUNITY_CLOSE_BUTTON_TITLE,'">×</button>',t.title,"</div>",'<div class="joms-popup__content joms-popup__content--single">',t.error||t.message,"</div>",'<div class="joms-popup__action">','<button class="joms-button--neutral joms-button--small joms-js--button-close">',window.joms_lang.COM_COMMUNITY_CLOSE_BUTTON,"</button>","</div>","</div>"].join("")}function Ws(t){return t||(t={}),['<div class="joms-popup joms-popup--whiteblock">','<div class="joms-popup__title"><button class="mfp-close" type="button" title="',window.joms_lang.COM_COMMUNITY_CLOSE_BUTTON_TITLE,'">×</button>',t.title,"</div>",'<div class="joms-popup__content joms-popup__content--single">',t.error||t.message,"</div>",'<div class="joms-popup__action">','<button class="joms-button--neutral joms-button--small joms-js--button-close">',window.joms_lang.COM_COMMUNITY_CLOSE_BUTTON,"</button>","</div>","</div>"].join("")}function Qs(){Hs.off(),Ps.close()}function Js(){var t;t=Hs.find("input[type=checkbox]")[0].checked?"friends,ajaxBlockFriend":"friends,ajaxRemoveFriend",joms.ajax({func:t,data:[Fs],callback:function(t){var o=Hs.find("[data-ui-object=popup-step-1]"),e=Hs.find("[data-ui-object=popup-step-2]");e.find("[data-ui-object=popup-message]").html(t.error||t.message),o.hide(),e.show(),t&&t.success&&$("#friend-"+Fs).remove()}})}function Ks(t){return t||(t={}),['<div class="joms-popup joms-popup--whiteblock">','<div class="joms-popup__title"><button class="mfp-close" type="button" title="',window.joms_lang.COM_COMMUNITY_CLOSE_BUTTON_TITLE,'">×</button>',t.title,"</div>",'<div data-ui-object="popup-step-1"',t.error?' class="joms-popup__hide"':"",">",'<div class="joms-popup__content">',t.html||"","</div>",'<div class="joms-popup__action">','<a href="javascript:" class="joms-button--neutral joms-button--small joms-left" data-ui-object="popup-button-cancel">',t.btnNo,"</a> &nbsp;",'<button class="joms-button--primary joms-button--small" data-ui-object="popup-button-save">',t.btnYes,"</button>","</div>","</div>",'<div data-ui-object="popup-step-2"',t.error?"":' class="joms-popup__hide"',">",'<div class="joms-popup__content joms-popup__content--single" data-ui-object="popup-message">',t.error||"","</div>","</div>","</div>"].join("")}function Xs(){joms.ajax({func:"friends,ajaxRejectRequest",data:[zs],callback:function(t){ta(t)}})}function Zs(){joms.ajax({func:"friends,ajaxApproveRequest",data:[zs],callback:function(t){ta(t)}})}function ta(t){var o=qs.find(".joms-js--step1"),e=qs.find(".joms-js--step2");t.error||(Ds.st.callbacks||(Ds.st.callbacks={}),Ds.st.callbacks.close=function(){window.location.reload()}),e.find(".joms-popup__content").html(t.error||t.message),o.hide(),e.show()}function oa(t){var o=!1;return t||(t={}),t.error&&!t.desc&&(o=t.error),['<div class="joms-popup joms-popup--whiteblock">','<div class="joms-popup__title"><button class="mfp-close" type="button" title="',window.joms_lang.COM_COMMUNITY_CLOSE_BUTTON_TITLE,'">×</button>',t.title,"</div>",'<div class="joms-js--step1',o?" joms-popup__hide":"",'">','<div class="joms-popup__content">','<div class="joms-stream__header" style="padding:0">','<div class="joms-avatar--stream"><img src="',t.avatar,'"></div>','<div class="joms-stream__meta"><span>',t.desc,"</span></div>","</div>","</div>",'<div class="joms-popup__content">','<div class="cStream-Quote">',t.message,"</div>","</div>",'<div class="joms-popup__action">','<button class="joms-button--neutral joms-button--small joms-left joms-js--button-cancel">',t.btnReject,"</button>",'<button class="joms-button--primary joms-button--small joms-js--button-save">',t.btnAccept,"</button>","</div>","</div>",'<div class="joms-js--step2',o?"":" joms-popup__hide",'">','<div class="joms-popup__content joms-popup__content--single">',o||"","</div>","</div>","</div>"].join("")}const ea={add:function(t){w.prepare((function(o){var e,n;e=o,n=t,xs&&xs.off(),Ts=e,Cs=n,joms.ajax({func:"friends,ajaxConnect",data:[Cs],callback:function(t){Ts.items[0]={type:"inline",src:Us(t)},Ts.updateItemHTML(),(xs=Ts.contentContainer).on("click","[data-ui-object=popup-button-cancel]",Is),xs.on("click","[data-ui-object=popup-button-save]",Ss)}})}))},addCancel:function(t){w.prepare((function(o){var e,n;e=o,n=t,Os&&Os.off(),Ms=e,Ls=n,joms.ajax({func:"friends,ajaxCancelRequest",data:[Ls,window.location.href],callback:function(t){Ms.items[0]={type:"inline",src:Ns(t)},Ms.updateItemHTML(),(Os=Ms.contentContainer).on("click",".joms-js--button-cancel",$s),Os.on("click",".joms-js--button-save",Es)}})}))},approve:function(t){Ys=t,joms.ajax({func:"friends,ajaxApproveRequest",data:[Ys],callback:function(t){t.success?function(t){$(".joms-js--frequest-msg-"+Ys).html(t.message),$(".joms-js--frequest-btn-"+Ys).remove(),Rs.updateCounter("frequest",Ys,-1)}(t):w.prepare((function(o){o.items[0]={type:"inline",src:Gs(t)},o.updateItemHTML()}))}})},reject:function(t){Bs=t,joms.ajax({func:"friends,ajaxRejectRequest",data:[Bs],callback:function(t){t.success?function(t){$(".joms-js--frequest-msg-"+Bs).html(t.message),$(".joms-js--frequest-btn-"+Bs).remove(),Rs.updateCounter("frequest",Bs,-1)}(t):w.prepare((function(o){o.items[0]={type:"inline",src:Ws(t)},o.updateItemHTML()}))}})},remove:function(t){w.prepare((function(o){var e,n;e=o,n=t,Hs&&Hs.off(),Ps=e,Fs=n,joms.ajax({func:"friends,ajaxConfirmFriendRemoval",data:[Fs],callback:function(t){Ps.items[0]={type:"inline",src:Ks(t)},Ps.st.callbacks||(Ps.st.callbacks={}),Ps.st.callbacks.close=function(){window.location.reload()},Ps.updateItemHTML(),(Hs=Ps.contentContainer).on("click","[data-ui-object=popup-button-cancel]",Qs),Hs.on("click","[data-ui-object=popup-button-save]",Js)}})}))},response:function(t){w.prepare((function(o){var e,n;e=o,n=t,qs&&qs.off(),Ds=e,Vs=n,joms.ajax({func:"friends,ajaxConnect",data:[Vs],callback:function(t){Ds.items[0]={type:"inline",src:oa(t)},Ds.updateItemHTML(),zs=t.connection_id,(qs=Ds.contentContainer).on("click",".joms-js--button-cancel",Xs),qs.on("click",".joms-js--button-save",Zs)}})}))}};var na,sa,aa,ia,ca,la,pa,ra,ma,ua,da,ja,fa,va,ba;function _a(){sa.off(),na.close()}function ha(){joms.ajax({func:"followers,ajaxSaveFollow",data:[[["msg",""],["userid",aa]]],callback:function(t){var o=sa.find("[data-ui-object=popup-step-1]"),e=sa.find("[data-ui-object=popup-step-2]");t.error||(na.st.callbacks||(na.st.callbacks={}),na.st.callbacks.close=function(){window.location.reload()}),e.find("[data-ui-object=popup-message]").html(t.error||t.message),o.hide(),e.show()}})}function ga(t){return t||(t={}),['<div class="joms-popup joms-popup--whiteblock">','<div class="joms-popup__title"><button class="mfp-close" type="button" title="',window.joms_lang.COM_COMMUNITY_CLOSE_BUTTON_TITLE,'">×</button>',t.title,"</div>",'<div data-ui-object="popup-step-1"',t.error?' class="joms-popup__hide"':"",">",'<div class="joms-popup__content">','<div class="joms-stream__header" style="padding:0">','<div class="joms-avatar--stream"><img src="',t.avatar,'"></div>','<div class="joms-stream__meta"><span>',t.desc,"</span></div>","</div>","</div>",'<div class="joms-popup__action">','<a href="javascript:" class="joms-button--neutral joms-button--small joms-left" data-ui-object="popup-button-cancel">',t.btnCancel,"</a> &nbsp;",'<button class="joms-button--primary joms-button--small" data-ui-object="popup-button-save">',t.btnAdd,"</button>","</div>","</div>",'<div data-ui-object="popup-step-2"',t.error?"":' class="joms-popup__hide"',">",'<div class="joms-popup__content joms-popup__content--single" data-ui-object="popup-message">',t.error||"","</div>",'<div class="joms-popup__action">','<button class="joms-button--neutral joms-button--small joms-js--button-close">',window.joms_lang.COM_COMMUNITY_CLOSE_BUTTON,"</button>","</div>","</div>","</div>"].join("")}function wa(){ca.off(),ia.close()}function ya(){ca.find("form")[0].submit()}function ka(t){return t||(t={}),['<div class="joms-popup joms-popup--whiteblock">','<div class="joms-popup__title"><button class="mfp-close" type="button" title="',window.joms_lang.COM_COMMUNITY_CLOSE_BUTTON_TITLE,'">×</button>',t.title,"</div>",'<div class="joms-js--step1">','<div class="joms-popup__content">',t.html,"</div>",'<div class="joms-popup__action">','<button class="joms-button--neutral joms-button--small joms-left joms-js--button-cancel">',t.btnNo,"</button> &nbsp;",'<button class="joms-button--primary joms-button--small joms-js--button-save">',t.btnYes,"</button>","</div>","</div>",'<div class="joms-popup__hide joms-js--step2">','<div class="joms-popup__content joms-popup__content--single"></div>',"</div>","</div>"].join("")}function Ta(t){return t||(t={}),['<div class="joms-popup joms-popup--whiteblock">','<div class="joms-popup__title"><button class="mfp-close" type="button" title="',window.joms_lang.COM_COMMUNITY_CLOSE_BUTTON_TITLE,'">×</button>',t.title,"</div>",'<div class="joms-popup__content joms-popup__content--single">',t.error||t.message,"</div>",'<div class="joms-popup__action">','<button class="joms-button--neutral joms-button--small joms-js--button-close">',window.joms_lang.COM_COMMUNITY_CLOSE_BUTTON,"</button>","</div>","</div>"].join("")}function xa(t){return t||(t={}),['<div class="joms-popup joms-popup--whiteblock">','<div class="joms-popup__title"><button class="mfp-close" type="button" title="',window.joms_lang.COM_COMMUNITY_CLOSE_BUTTON_TITLE,'">×</button>',t.title,"</div>",'<div class="joms-popup__content joms-popup__content--single">',t.error||t.message,"</div>",'<div class="joms-popup__action">','<button class="joms-button--neutral joms-button--small joms-js--button-close">',window.joms_lang.COM_COMMUNITY_CLOSE_BUTTON,"</button>","</div>","</div>"].join("")}function Ca(){ua.off(),ma.close()}function Ma(){joms.ajax({func:"followers,ajaxUnfollowSave",data:[da],callback:function(t){var o=ua.find("[data-ui-object=popup-step-1]"),e=ua.find("[data-ui-object=popup-step-2]");e.find("[data-ui-object=popup-message]").html(t.error||t.message),o.hide(),e.show(),t&&t.success&&$("#follower-"+da).remove()}})}function Oa(t){return t||(t={}),['<div class="joms-popup joms-popup--whiteblock">','<div class="joms-popup__title"><button class="mfp-close" type="button" title="',window.joms_lang.COM_COMMUNITY_CLOSE_BUTTON_TITLE,'">×</button>',t.title,"</div>",'<div data-ui-object="popup-step-1"',t.error?' class="joms-popup__hide"':"",">",'<div class="joms-popup__content">',t.html||"","</div>",'<div class="joms-popup__action">','<a href="javascript:" class="joms-button--neutral joms-button--small joms-left" data-ui-object="popup-button-cancel">',t.btnNo,"</a> &nbsp;",'<button class="joms-button--primary joms-button--small" data-ui-object="popup-button-save">',t.btnYes,"</button>","</div>","</div>",'<div data-ui-object="popup-step-2"',t.error?"":' class="joms-popup__hide"',">",'<div class="joms-popup__content joms-popup__content--single" data-ui-object="popup-message">',t.error||"","</div>","</div>","</div>"].join("")}function La(){joms.ajax({func:"followers,ajaxRejectRequest",data:[ba],callback:function(t){Sa(t)}})}function Ia(){joms.ajax({func:"followers,ajaxApproveRequest",data:[ba],callback:function(t){Sa(t)}})}function Sa(t){var o=fa.find(".joms-js--step1"),e=fa.find(".joms-js--step2");t.error||(ja.st.callbacks||(ja.st.callbacks={}),ja.st.callbacks.close=function(){window.location.reload()}),e.find(".joms-popup__content").html(t.error||t.message),o.hide(),e.show()}function Ua(t){var o=!1;return t||(t={}),t.error&&!t.desc&&(o=t.error),['<div class="joms-popup joms-popup--whiteblock">','<div class="joms-popup__title"><button class="mfp-close" type="button" title="',window.joms_lang.COM_COMMUNITY_CLOSE_BUTTON_TITLE,'">×</button>',t.title,"</div>",'<div class="joms-js--step1',o?" joms-popup__hide":"",'">','<div class="joms-popup__content">','<div class="joms-stream__header" style="padding:0">','<div class="joms-avatar--stream"><img src="',t.avatar,'"></div>','<div class="joms-stream__meta"><span>',t.desc,"</span></div>","</div>","</div>",'<div class="joms-popup__content">','<div class="cStream-Quote">',t.message,"</div>","</div>",'<div class="joms-popup__action">','<button class="joms-button--neutral joms-button--small joms-left joms-js--button-cancel">',t.btnReject,"</button>",'<button class="joms-button--primary joms-button--small joms-js--button-save">',t.btnAccept,"</button>","</div>","</div>",'<div class="joms-js--step2',o?"":" joms-popup__hide",'">','<div class="joms-popup__content joms-popup__content--single">',o||"","</div>","</div>","</div>"].join("")}const $a={add:function(t){w.prepare((function(o){var e,n;e=o,n=t,sa&&sa.off(),na=e,aa=n,joms.ajax({func:"followers,ajaxConfirmFollow",data:[aa],callback:function(t){na.items[0]={type:"inline",src:ga(t)},na.updateItemHTML(),(sa=na.contentContainer).on("click","[data-ui-object=popup-button-cancel]",_a),sa.on("click","[data-ui-object=popup-button-save]",ha)}})}))},addCancel:function(t){w.prepare((function(o){var e,n;e=o,n=t,ca&&ca.off(),ia=e,la=n,joms.ajax({func:"followers,ajaxCancelRequest",data:[la,window.location.href],callback:function(t){ia.items[0]={type:"inline",src:ka(t)},ia.updateItemHTML(),(ca=ia.contentContainer).on("click",".joms-js--button-cancel",wa),ca.on("click",".joms-js--button-save",ya)}})}))},approve:function(t){pa=t,joms.ajax({func:"followers,ajaxApproveRequest",data:[pa],callback:function(t){t.success?function(t){$(".joms-js--frequest-msg-"+pa).html(t.message),$(".joms-js--frequest-btn-"+pa).remove(),Rs.updateCounter("frequest",pa,-1)}(t):w.prepare((function(o){o.items[0]={type:"inline",src:Ta(t)},o.updateItemHTML()}))}})},reject:function(t){ra=t,joms.ajax({func:"followers,ajaxRejectRequest",data:[ra],callback:function(t){t.success?function(t){$(".joms-js--frequest-msg-"+ra).html(t.message),$(".joms-js--frequest-btn-"+ra).remove(),Rs.updateCounter("frequest",ra,-1)}(t):w.prepare((function(o){o.items[0]={type:"inline",src:xa(t)},o.updateItemHTML()}))}})},remove:function(t){w.prepare((function(o){var e,n;e=o,n=t,ua&&ua.off(),ma=e,da=n,joms.ajax({func:"followers,ajaxConfirmUnfollow",data:[da],callback:function(t){ma.items[0]={type:"inline",src:Oa(t)},ma.st.callbacks||(ma.st.callbacks={}),ma.st.callbacks.close=function(){window.location.reload()},ma.updateItemHTML(),(ua=ma.contentContainer).on("click","[data-ui-object=popup-button-cancel]",Ca),ua.on("click","[data-ui-object=popup-button-save]",Ma)}})}))},response:function(t){w.prepare((function(o){var e,n;e=o,n=t,fa&&fa.off(),ja=e,va=n,joms.ajax({func:"followers,ajaxConnect",data:[va],callback:function(t){ja.items[0]={type:"inline",src:Ua(t)},ja.updateItemHTML(),ba=t.connection_id,(fa=ja.contentContainer).on("click",".joms-js--button-cancel",La),fa.on("click",".joms-js--button-save",Ia)}})}))}};var Ea,Na,Aa,Ra,Ya,Ba,Pa,Ha,Fa,Da,qa,Va,za,Ga,Wa,Qa,Ja,Ka,Xa,Za,ti,oi,ei,ni,si,ai,ii,ci,li,pi,ri,mi,ui,di,ji,fi,vi;function bi(t,o){var e,n,s;Na&&Na.off(),Ea=t,Aa=o,$.ajax({url:Aa,success:function(t){e=(e=t.match(/<meta property="og:title" content="([^"]+)"/i)||!1)&&e[1],n=(n=t.match(/<meta property="og:description" content="([^"]+)"/i)||!1)&&n[1],s=(s=t.match(/<meta property="og:image" content="([^"]+)"/i)||!1)&&s[1]},complete:function(){var t=[Aa,e||"",n||"",s||""];joms.ajax({func:"bookmarks,ajaxShowBookmarks",data:t,callback:function(t){Ea.items[0]={type:"inline",src:wi(t)},Ea.updateItemHTML(),(Na=Ea.contentContainer).on("click",".joms-bookmarks a",_i),Na.on("click",".joms-js--button-cancel",hi),Na.on("click",".joms-js--button-save",gi)}})}})}function _i(t){var o,e,n;t.preventDefault(),t.stopPropagation(),e=(o=$(this)).attr("href"),n=o.text(),Na.off(),Ea.close(),window.open(e,n,"top=150, left=150, width=650, height=330, scrollbars=yes")}function hi(){Na.off(),Ea.close()}function gi(){var t=Na.find("form"),o=t.find("[name=bookmarks-email]").val(),e=t.find("[name=bookmarks-message]").val();joms.ajax({func:"bookmarks,ajaxEmailPage",data:[Aa,o,e],callback:function(t){Na.find(".joms-js--step1").hide(),Na.find(".joms-js--step2").show().children().html(t.error||t.message)}})}function wi(t){return t||(t={}),['<div class="joms-popup joms-popup--whiteblock joms-popup--500">','<div class="joms-popup__title"><button class="mfp-close" type="button" title="',window.joms_lang.COM_COMMUNITY_CLOSE_BUTTON_TITLE,'">×</button>',t.title,"</div>",'<div class="joms-js--step1">','<div class="joms-popup__content">',t.html,"</div>",'<div class="joms-popup__action">','<button class="joms-button--neutral joms-button--small joms-left joms-js--button-cancel">',t.btnCancel,"</button>",t.viaEmail?' &nbsp;<button class="joms-button--primary joms-button--small joms-js--button-save">'+t.btnShare+"</button>":"","</div>","</div>",'<div class="joms-popup__hide joms-js--step2">','<div class="joms-popup__content joms-popup__content--single"></div>',"</div>","</div>"].join("")}function yi(t){Oi($(t.currentTarget).val())}function ki(){var t,o=Pa.find("input[type=checkbox]"),e=[],n=Ya.find("input[name=emails]").val()||"",s=Ya.find("[name=message]").val()||"",a=/^\s+|\s+$/g;o.each((function(){e.push(this.value)})),t=[["friendsearch",""],["emails",n=n.replace(a,"")],["message",s=s.replace(a,"")],["friends",e.join(",")]],joms.ajax({func:"system,ajaxSubmitInvitation",data:["pages,inviteUsers",Da,t],callback:function(){Ya.off(),Ra.close()}})}function Ti(t){var o="#joms-popup-tab-selected"===$(t.target).attr("href"),e=window.joms_lang[o?"COM_COMMUNITY_UNSELECT_ALL":"COM_COMMUNITY_SELECT_ALL"];Ha.html(e)}function xi(){var t,o=$(".joms-tab__content:visible");if("joms-popup-tab-selected"===o.attr("id"))return o.find(".joms-js--friend").remove(),void Ya.find("input[type=checkbox]").each((function(){this.checked=!1}));(t=o.find(".joms-js--friend").clone()).find("input[type=checkbox]").add(o.find("input[type=checkbox]")).prop("checked","checked"),(o=Ya.find("#joms-popup-tab-selected")).html(t)}function Ci(){Oi()}function Mi(t){var o,e,n=$(t.target),s=n.closest(".joms-tab__content");return"joms-popup-tab-selected"===s.attr("id")?(o=n[0].value,n.closest(".joms-js--friend").remove(),void(Ya.find(".joms-js--friend-"+o+" input[type=checkbox]")[0].checked=!1)):n[0].checked?(s=Ya.find("#joms-popup-tab-selected"),e=n.closest(".joms-js--friend").clone(),(n=e.find("input[type=checkbox]"))[0].checked=!0,void s.append(e)):(o=n[0].value,void Ya.find("#joms-popup-tab-selected .joms-js--friend-"+o).remove())}function Oi(t){var o="string"==typeof t;o?(Ba.empty(),Va=0,qa=t):Va+=za,Ga&&Ga.abort(),Ga=joms.ajax({func:"system,ajaxLoadFriendsList",data:[qa,"pages,inviteUsers",Da,Va,za],callback:function(t){var e;t.html&&((e=$($.trim(t.html))).each((function(){var t=$(this).find(":checkbox"),o=t.val();Pa.find(":checkbox[value="+o+"]").length&&(t[0].checked=!0)})),Ba.append(e)),o||(Ba[0].scrollTop=Ba[0].scrollHeight),t.loadMore?(Ha.css({width:"49%",marginRight:"2%"}),Fa.css({width:"49%"}).html(window.joms_lang.COM_COMMUNITY_INVITE_LOAD_MORE+" ("+t.moreCount+")").show()):(Fa.hide(),Ha.css({width:"100%",marginRight:"0"}))}})}function Li(t){return['<div class="joms-popup joms-popup--whiteblock">','<div class="joms-popup__title"><button class="mfp-close" type="button" title="',window.joms_lang.COM_COMMUNITY_CLOSE_BUTTON_TITLE,'">×</button>',t.title,"</div>",'<div data-ui-object="popup-step-1"',t.error?' class="joms-popup__hide"':"",">",'<div class="joms-popup__content">',t.html,"</div>",'<div class="joms-popup__action">','<button class="joms-button--primary" data-btn-save="1">',t.btnInvite,"</button>","</div>","</div>",'<div data-ui-object="popup-step-2"',t.error?"":' class="joms-popup__hide"',">",'<div class="joms-popup__content joms-popup__content--single" data-ui-object="popup-message">',t.error||"","</div>","</div>","</div>"].join("")}function Ii(){Qa.off(),Wa.close()}function Si(t,o){joms.ajax({func:"pages,ajaxDeletePage",data:[Ja,o||1],callback:function(t){var o;Qa.find(".joms-js--step1").hide(),Qa.find(".joms-js--step2").show().children().first().append("<div>"+(t.error||t.message)+"</div>"),t.next?Si(0,t.next):t.redirect&&((o=Qa.find(".joms-js--step2")).find(".joms-js--button-done").html(t.btnDone).on("click",(function(){window.location=t.redirect})),o.find(".joms-popup__action").show(),o.find(".joms-popup__content").removeClass("joms-popup__content--single"))}})}function Ui(t){return t||(t={}),['<div class="joms-popup joms-popup--whiteblock">','<div class="joms-popup__title"><button class="mfp-close" type="button" title="',window.joms_lang.COM_COMMUNITY_CLOSE_BUTTON_TITLE,'">×</button>',t.title,"</div>",'<div class="joms-js--step1',t.error?" joms-popup__hide":"",'">','<div class="joms-popup__content">',t.html,"</div>",'<div class="joms-popup__action">','<button class="joms-button--neutral joms-button--small joms-left joms-js--button-cancel">',t.btnCancel,"</button> &nbsp;",'<button class="joms-button--primary joms-button--small joms-js--button-save">',t.btnDelete,"</button>","</div>","</div>",'<div class="joms-js--step2',t.error?"":" joms-popup__hide",'">','<div class="joms-popup__content joms-popup__content--single">',t.error||"","</div>",'<div class="joms-popup__action joms-popup__hide">','<button class="joms-button--primary joms-js--button-done"></button>',"</div>","</div>","</div>"].join("")}function $i(){Xa.off(),Ka.close()}function Ei(){Xa.find("form")[0].submit()}function Ni(t){return t||(t={}),['<div class="joms-popup joms-popup--whiteblock">','<div class="joms-popup__title"><button class="mfp-close" type="button" title="',window.joms_lang.COM_COMMUNITY_CLOSE_BUTTON_TITLE,'">×</button>',t.title,"</div>",'<div class="joms-popup__content">',t.html,"</div>",'<div class="joms-popup__action">','<button class="joms-button--neutral joms-button--small joms-left joms-js--button-cancel">',t.btnNo,"</button> &nbsp;",'<button class="joms-button--primary joms-button--small joms-js--button-save">',t.btnYes,"</button>","</div>","</div>"].join("")}function Ai(t){return t||(t={}),['<div class="joms-popup joms-popup--whiteblock">','<div class="joms-popup__title"><button class="mfp-close" type="button" title="',window.joms_lang.COM_COMMUNITY_CLOSE_BUTTON_TITLE,'">×</button>',t.title,"</div>",'<div class="joms-popup__content joms-popup__content--single">',t.html||t.error||"","</div>",'<div class="joms-popup__action">','<button class="joms-button--neutral joms-button--small joms-js--button-close">',window.joms_lang.COM_COMMUNITY_CLOSE_BUTTON,"</button>","</div>","</div>"].join("")}function Ri(t){return t||(t={}),['<div class="joms-popup joms-popup--whiteblock">','<div class="joms-popup__title"><button class="mfp-close" type="button" title="',window.joms_lang.COM_COMMUNITY_CLOSE_BUTTON_TITLE,'">×</button>',t.title,"</div>",'<div class="joms-popup__content joms-popup__content--single">',t.html||t.error||"","</div>",'<div class="joms-popup__action">','<button class="joms-button--neutral joms-button--small joms-js--button-close">',window.joms_lang.COM_COMMUNITY_CLOSE_BUTTON,"</button>","</div>","</div>"].join("")}function Yi(t){return t||(t={}),['<div class="joms-popup joms-popup--whiteblock">','<div class="joms-popup__title"><button class="mfp-close" type="button" title="',window.joms_lang.COM_COMMUNITY_CLOSE_BUTTON_TITLE,'">×</button>',t.title||"","</div>",'<div class="joms-popup__content joms-popup__content--single">',t.html||t.message||t.error||"","</div>",'<div class="joms-popup__action">','<button class="joms-button--neutral joms-button--small joms-js--button-close">',window.joms_lang.COM_COMMUNITY_CLOSE_BUTTON,"</button>","</div>","</div>"].join("")}function Bi(t){return t||(t={}),['<div class="joms-popup joms-popup--whiteblock">','<div class="joms-popup__title"><button class="mfp-close" type="button" title="',window.joms_lang.COM_COMMUNITY_CLOSE_BUTTON_TITLE,'">×</button>',t.title||"","</div>",'<div class="joms-popup__content joms-popup__content--single">',t.html||t.message||t.error||"","</div>",'<div class="joms-popup__action">','<button class="joms-button--neutral joms-button--small joms-js--button-close">',window.joms_lang.COM_COMMUNITY_CLOSE_BUTTON,"</button>","</div>","</div>"].join("")}function Pi(){mi.off(),ri.close()}function Hi(){var t=mi.find("input:checkbox")[0].checked?"pages,ajaxBanMember":"pages,ajaxRemoveMember",o=[di,ui];joms.ajax({func:t,data:o,callback:function(t){mi.find(".joms-js--step1").hide(),mi.find(".joms-js--step2").show().children().append(t.error||t.message),t.success&&($(".joms-js--member-page-"+ui+"-"+di).remove(),$(".joms-js--request-buttons-page-"+ui+"-"+di).remove(),$(".joms-js--request-notice-page-"+ui+"-"+di).html(t&&t.message||""),Rs.updateCounter("general",ui,-1))}})}function Fi(t){return t||(t={}),['<div class="joms-popup joms-popup--whiteblock">','<div class="joms-popup__title"><button class="mfp-close" type="button" title="',window.joms_lang.COM_COMMUNITY_CLOSE_BUTTON_TITLE,'">×</button>',t.title,"</div>",'<div class="joms-js--step1">','<div class="joms-popup__content">',t.html,"</div>",'<div class="joms-popup__action">','<button class="joms-button--neutral joms-button--small joms-left joms-js--button-cancel">',t.btnNo,"</button> &nbsp;",'<button class="joms-button--primary joms-button--small joms-js--button-save">',t.btnYes,"</button>","</div>","</div>",'<div class="joms-popup__hide joms-js--step2">','<div class="joms-popup__content joms-popup__content--single"></div>',"</div>","</div>"].join("")}function Di(t){fi.find("textarea").val(t.target.value)}function qi(){fi.off(),ji.close()}function Vi(){var t;(t=(t=fi.find("textarea").val()).replace(/^\s+|\s+$/g,""))?(fi.find(".joms-js--error").hide(),joms.ajax({func:"system,ajaxSendReport",data:["pages,reportPage",window.location.href,t,vi],callback:function(t){fi.find(".joms-js--step1").hide(),fi.find(".joms-js--step2").show().children().html(t.error||t.message)}})):fi.find(".joms-js--error").show()}function zi(t){return t||(t={}),['<div class="joms-popup joms-popup--whiteblock joms-popup--500">','<div class="joms-popup__title"><button class="mfp-close" type="button" title="',window.joms_lang.COM_COMMUNITY_CLOSE_BUTTON_TITLE,'">×</button>',t.title,"</div>",'<div class="joms-js--step1',t.error?" joms-popup__hide":"",'">',t.html,'<div class="joms-popup__action">','<button class="joms-button--neutral joms-button--small joms-left joms-js--button-cancel">',t.btnCancel,"</button> &nbsp;",'<button class="joms-button--primary joms-button--small joms-js--button-save">',t.btnSend,"</button>","</div>","</div>",'<div class="joms-js--step2',t.error?"":" joms-popup__hide",'">','<div class="joms-popup__content joms-popup__content--single">',t.error||"","</div>","</div>","</div>"].join("")}const Gi={share:function(t){w.prepare((function(o){bi(o,t)}))},invite:function(t){w.prepare((function(o){var e,n;e=o,n=t,Ya&&Ya.off(),Ra=e,Da=n,za=200,joms.ajax({func:"system,ajaxShowInvitationForm",data:[null,"",Da,1,1],callback:function(t){Ra.items[0]={type:"inline",src:Li(t)},Ra.updateItemHTML(),t.limit&&(za=+t.limit),Ya=Ra.contentContainer,Ba=Ya.find(".joms-tab__content").eq(0),Pa=Ya.find(".joms-tab__content").eq(1),Ha=Ya.find("[data-btn-select]"),Fa=Ya.find("[data-btn-load]"),Ya.on("keyup","[data-search]",yi),Ya.on("click",".joms-tab__bar a",Ti),Ya.on("click","[data-btn-select]",xi),Ya.on("click","[data-btn-load]",Ci),Ya.on("click","[data-btn-save]",ki),Ya.on("click","input[type=checkbox]",Mi),Oi("")}})}))},deletePage:function(t){w.prepare((function(o){var e,n;e=o,n=t,Qa&&Qa.off(),Wa=e,Ja=n,joms.ajax({func:"pages,ajaxWarnPageDeletion",data:[Ja],callback:function(t){Wa.items[0]={type:"inline",src:Ui(t)},Wa.updateItemHTML(),(Qa=Wa.contentContainer).on("click",".joms-js--button-cancel",Ii),Qa.on("click",".joms-js--button-save",Si)}})}))},unpublish:function(t){w.prepare((function(o){var e,n;e=o,n=t,Xa&&Xa.off(),Ka=e,Za=n,joms.ajax({func:"pages,ajaxShowUnpublishPage",data:[Za],callback:function(t){Ka.items[0]={type:"inline",src:Ni(t)},Ka.updateItemHTML(),(Xa=Ka.contentContainer).on("click",".joms-js--button-cancel",$i),Xa.on("click",".joms-js--button-save",Ei)}})}))},addFeatured:function(t){w.prepare((function(o){ti=o,oi=t,joms.ajax({func:"pages,ajaxAddFeatured",data:[oi],callback:function(t){ti.items[0]={type:"inline",src:Ai(t)},ti.st.callbacks||(ti.st.callbacks={}),ti.st.callbacks.close=function(){window.location.reload()},ti.updateItemHTML()}})}))},removeFeatured:function(t){w.prepare((function(o){ei=o,ni=t,joms.ajax({func:"pages,ajaxRemoveFeatured",data:[ni],callback:function(t){ei.items[0]={type:"inline",src:Ri(t)},ei.st.callbacks||(ei.st.callbacks={}),ei.st.callbacks.close=function(){window.location.reload()},ei.updateItemHTML()}})}))},banMember:function(t,o){w.prepare((function(e){si=e,ai=t,ii=o,joms.ajax({func:"pages,ajaxBanMember",data:[ii,ai],callback:function(t){si.items[0]={type:"inline",src:Yi(t)},si.updateItemHTML(),t.success&&(si.st.callbacks||(si.st.callbacks={}),si.st.callbacks.close=function(){window.location.reload()})}})}))},unbanMember:function(t,o){w.prepare((function(e){ci=e,li=t,pi=o,joms.ajax({func:"pages,ajaxUnbanMember",data:[pi,li],callback:function(t){ci.items[0]={type:"inline",src:Bi(t)},ci.updateItemHTML(),t.success&&(ci.st.callbacks||(ci.st.callbacks={}),ci.st.callbacks.close=function(){window.location.reload()})}})}))},report:function(t){w.prepare((function(o){var e,n;e=o,n=t,fi&&fi.off(),ji=e,vi=n,joms.ajax({func:"system,ajaxReport",data:[],callback:function(t){ji.items[0]={type:"inline",src:zi(t)},ji.updateItemHTML(),(fi=ji.contentContainer).on("change","select",Di),fi.on("click",".joms-js--button-cancel",qi),fi.on("click",".joms-js--button-save",Vi)}})}))},removeMember:function(t,o){w.prepare((function(e){var n,s,a;n=e,s=t,a=o,mi&&mi.off(),ri=n,ui=s,di=a,joms.ajax({func:"pages,ajaxConfirmMemberRemoval",data:[di,ui],callback:function(t){ri.items[0]={type:"inline",src:Fi(t)},ri.updateItemHTML(),(mi=ri.contentContainer).on("click",".joms-js--button-cancel",Pi),mi.on("click",".joms-js--button-save",Hi)}})}))}};var Wi,Qi,Ji,Ki,Xi,Zi,tc,oc,ec,nc,sc,ac,ic,cc,lc,pc,rc,mc,uc,dc,jc,fc,vc,bc,_c,hc,gc,wc,yc,kc,Tc,xc,Cc,Mc,Oc,Lc,Ic,Sc,Uc,$c;function Ec(){Qi.off(),Wi.close()}function Nc(t,o){joms.ajax({func:"groups,ajaxDeleteGroup",data:[Ji,o||1],callback:function(t){var o;Qi.find(".joms-js--step1").hide(),Qi.find(".joms-js--step2").show().children().first().append("<div>"+(t.error||t.message)+"</div>"),t.next?Nc(0,t.next):t.redirect&&((o=Qi.find(".joms-js--step2")).find(".joms-js--button-done").html(t.btnDone).on("click",(function(){window.location=t.redirect})),o.find(".joms-popup__action").show(),o.find(".joms-popup__content").removeClass("joms-popup__content--single"))}})}function Ac(t){return t||(t={}),['<div class="joms-popup joms-popup--whiteblock">','<div class="joms-popup__title"><button class="mfp-close" type="button" title="',window.joms_lang.COM_COMMUNITY_CLOSE_BUTTON_TITLE,'">×</button>',t.title,"</div>",'<div class="joms-js--step1',t.error?" joms-popup__hide":"",'">','<div class="joms-popup__content">',t.html,"</div>",'<div class="joms-popup__action">','<button class="joms-button--neutral joms-button--small joms-left joms-js--button-cancel">',t.btnCancel,"</button> &nbsp;",'<button class="joms-button--primary joms-button--small joms-js--button-save">',t.btnDelete,"</button>","</div>","</div>",'<div class="joms-js--step2',t.error?"":" joms-popup__hide",'">','<div class="joms-popup__content joms-popup__content--single">',t.error||"","</div>",'<div class="joms-popup__action joms-popup__hide">','<button class="joms-button--primary joms-js--button-done"></button>',"</div>","</div>","</div>"].join("")}function Rc(t){Dc($(t.currentTarget).val())}function Yc(){var t,o=tc.find("input[type=checkbox]"),e=[],n=Xi.find("input[name=emails]").val()||"",s=Xi.find("[name=message]").val()||"",a=/^\s+|\s+$/g;o.each((function(){e.push(this.value)})),t=[["friendsearch",""],["emails",n=n.replace(a,"")],["message",s=s.replace(a,"")],["friends",e.join(",")]],joms.ajax({func:"system,ajaxSubmitInvitation",data:["groups,inviteUsers",nc,t],callback:function(){Xi.off(),Ki.close()}})}function Bc(t){var o="#joms-popup-tab-selected"===$(t.target).attr("href"),e=window.joms_lang[o?"COM_COMMUNITY_UNSELECT_ALL":"COM_COMMUNITY_SELECT_ALL"];oc.html(e)}function Pc(){var t,o=$(".joms-tab__content:visible");if("joms-popup-tab-selected"===o.attr("id"))return o.find(".joms-js--friend").remove(),void Xi.find("input[type=checkbox]").each((function(){this.checked=!1}));(t=o.find(".joms-js--friend").clone()).find("input[type=checkbox]").add(o.find("input[type=checkbox]")).prop("checked","checked"),(o=Xi.find("#joms-popup-tab-selected")).html(t)}function Hc(){Dc()}function Fc(t){var o,e,n=$(t.target),s=n.closest(".joms-tab__content");return"joms-popup-tab-selected"===s.attr("id")?(o=n[0].value,n.closest(".joms-js--friend").remove(),void(Xi.find(".joms-js--friend-"+o+" input[type=checkbox]")[0].checked=!1)):n[0].checked?(s=Xi.find("#joms-popup-tab-selected"),e=n.closest(".joms-js--friend").clone(),(n=e.find("input[type=checkbox]"))[0].checked=!0,void s.append(e)):(o=n[0].value,void Xi.find("#joms-popup-tab-selected .joms-js--friend-"+o).remove())}function Dc(t){var o="string"==typeof t;o?(Zi.empty(),ac=0,sc=t):ac+=ic,cc&&cc.abort(),cc=joms.ajax({func:"system,ajaxLoadFriendsList",data:[sc,"groups,inviteUsers",nc,ac,ic],callback:function(t){var e;t.html&&((e=$($.trim(t.html))).each((function(){var t=$(this).find(":checkbox"),o=t.val();tc.find(":checkbox[value="+o+"]").length&&(t[0].checked=!0)})),Zi.append(e)),o||(Zi[0].scrollTop=Zi[0].scrollHeight),t.loadMore?(oc.css({width:"49%",marginRight:"2%"}),ec.css({width:"49%"}).html(window.joms_lang.COM_COMMUNITY_INVITE_LOAD_MORE+" ("+t.moreCount+")").show()):(ec.hide(),oc.css({width:"100%",marginRight:"0"}))}})}function qc(t){return['<div class="joms-popup joms-popup--whiteblock">','<div class="joms-popup__title"><button class="mfp-close" type="button" title="',window.joms_lang.COM_COMMUNITY_CLOSE_BUTTON_TITLE,'">×</button>',t.title,"</div>",'<div data-ui-object="popup-step-1"',t.error?' class="joms-popup__hide"':"",">",'<div class="joms-popup__content">',t.html,"</div>",'<div class="joms-popup__action">','<button class="joms-button--primary" data-btn-save="1">',t.btnInvite,"</button>","</div>","</div>",'<div data-ui-object="popup-step-2"',t.error?"":' class="joms-popup__hide"',">",'<div class="joms-popup__content joms-popup__content--single" data-ui-object="popup-message">',t.error||"","</div>","</div>","</div>"].join("")}function Vc(){rc.off(),pc.close()}function zc(){rc.find("form")[0].submit()}function Gc(t){return t||(t={}),['<div class="joms-popup joms-popup--whiteblock">','<div class="joms-popup__title"><button class="mfp-close" type="button" title="',window.joms_lang.COM_COMMUNITY_CLOSE_BUTTON_TITLE,'">×</button>',t.title,"</div>",'<div class="joms-js--step1">','<div class="joms-popup__content">',t.html,"</div>",'<div class="joms-popup__action">','<button class="joms-button--neutral joms-button--small joms-left joms-js--button-cancel">',t.btnNo,"</button> &nbsp;",'<button class="joms-button--primary joms-button--small joms-js--button-save">',t.btnYes,"</button>","</div>","</div>",'<div class="joms-popup__hide joms-js--step2">','<div class="joms-popup__content joms-popup__content--single"></div>',"</div>","</div>"].join("")}function Wc(t){return t||(t={}),['<div class="joms-popup joms-popup--whiteblock">','<div class="joms-popup__title"><button class="mfp-close" type="button" title="',window.joms_lang.COM_COMMUNITY_CLOSE_BUTTON_TITLE,'">×</button>',t.title,"</div>",'<div class="joms-popup__content joms-popup__content--single">',t.html||t.error||"","</div>",'<div class="joms-popup__action">','<button class="joms-button--neutral joms-button--small joms-js--button-close">',window.joms_lang.COM_COMMUNITY_CLOSE_BUTTON,"</button>","</div>","</div>"].join("")}function Qc(t){return t||(t={}),['<div class="joms-popup joms-popup--whiteblock">','<div class="joms-popup__title"><button class="mfp-close" type="button" title="',window.joms_lang.COM_COMMUNITY_CLOSE_BUTTON_TITLE,'">×</button>',t.title,"</div>",'<div class="joms-popup__content joms-popup__content--single">',t.html||t.error||"","</div>",'<div class="joms-popup__action">','<button class="joms-button--neutral joms-button--small joms-js--button-close">',window.joms_lang.COM_COMMUNITY_CLOSE_BUTTON,"</button>","</div>","</div>"].join("")}function Jc(t){bc.find("textarea").val(t.target.value)}function Kc(){bc.off(),vc.close()}function Xc(){var t;(t=(t=bc.find("textarea").val()).replace(/^\s+|\s+$/g,""))?(bc.find(".joms-js--error").hide(),joms.ajax({func:"system,ajaxSendReport",data:["groups,reportGroup",window.location.href,t,_c],callback:function(t){bc.find(".joms-js--step1").hide(),bc.find(".joms-js--step2").show().children().html(t.error||t.message)}})):bc.find(".joms-js--error").show()}function Zc(t){return t||(t={}),['<div class="joms-popup joms-popup--whiteblock joms-popup--500">','<div class="joms-popup__title"><button class="mfp-close" type="button" title="',window.joms_lang.COM_COMMUNITY_CLOSE_BUTTON_TITLE,'">×</button>',t.title,"</div>",'<div class="joms-js--step1',t.error?" joms-popup__hide":"",'">',t.html,'<div class="joms-popup__action">','<button class="joms-button--neutral joms-button--small joms-left joms-js--button-cancel">',t.btnCancel,"</button> &nbsp;",'<button class="joms-button--primary joms-button--small joms-js--button-save">',t.btnSend,"</button>","</div>","</div>",'<div class="joms-js--step2',t.error?"":" joms-popup__hide",'">','<div class="joms-popup__content joms-popup__content--single">',t.error||"","</div>","</div>","</div>"].join("")}function tl(){gc.off(),hc.close()}function ol(){gc.find("form")[0].submit()}function el(t){return t||(t={}),['<div class="joms-popup joms-popup--whiteblock">','<div class="joms-popup__title"><button class="mfp-close" type="button" title="',window.joms_lang.COM_COMMUNITY_CLOSE_BUTTON_TITLE,'">×</button>',t.title,"</div>",'<div class="joms-popup__content">',t.html,"</div>",'<div class="joms-popup__action">','<button class="joms-button--neutral joms-button--small joms-left joms-js--button-cancel">',t.btnNo,"</button> &nbsp;",'<button class="joms-button--primary joms-button--small joms-js--button-save">',t.btnYes,"</button>","</div>","</div>"].join("")}function nl(){xc.off(),Tc.close()}function sl(){var t=xc.find("input:checkbox")[0].checked?"groups,ajaxBanMember":"groups,ajaxRemoveMember",o=[Mc,Cc];joms.ajax({func:t,data:o,callback:function(t){xc.find(".joms-js--step1").hide(),xc.find(".joms-js--step2").show().children().append(t.error||t.message),t.success&&($(".joms-js--member-group-"+Cc+"-"+Mc).remove(),$(".joms-js--request-buttons-group-"+Cc+"-"+Mc).remove(),$(".joms-js--request-notice-group-"+Cc+"-"+Mc).html(t&&t.message||""),Rs.updateCounter("general",Cc,-1))}})}function al(t){return t||(t={}),['<div class="joms-popup joms-popup--whiteblock">','<div class="joms-popup__title"><button class="mfp-close" type="button" title="',window.joms_lang.COM_COMMUNITY_CLOSE_BUTTON_TITLE,'">×</button>',t.title,"</div>",'<div class="joms-js--step1">','<div class="joms-popup__content">',t.html,"</div>",'<div class="joms-popup__action">','<button class="joms-button--neutral joms-button--small joms-left joms-js--button-cancel">',t.btnNo,"</button> &nbsp;",'<button class="joms-button--primary joms-button--small joms-js--button-save">',t.btnYes,"</button>","</div>","</div>",'<div class="joms-popup__hide joms-js--step2">','<div class="joms-popup__content joms-popup__content--single"></div>',"</div>","</div>"].join("")}function il(t){return t||(t={}),['<div class="joms-popup joms-popup--whiteblock">','<div class="joms-popup__title"><button class="mfp-close" type="button" title="',window.joms_lang.COM_COMMUNITY_CLOSE_BUTTON_TITLE,'">×</button>',t.title||"","</div>",'<div class="joms-popup__content joms-popup__content--single">',t.html||t.message||t.error||"","</div>",'<div class="joms-popup__action">','<button class="joms-button--neutral joms-button--small joms-js--button-close">',window.joms_lang.COM_COMMUNITY_CLOSE_BUTTON,"</button>","</div>","</div>"].join("")}function cl(t){return t||(t={}),['<div class="joms-popup joms-popup--whiteblock">','<div class="joms-popup__title"><button class="mfp-close" type="button" title="',window.joms_lang.COM_COMMUNITY_CLOSE_BUTTON_TITLE,'">×</button>',t.title||"","</div>",'<div class="joms-popup__content joms-popup__content--single">',t.html||t.message||t.error||"","</div>",'<div class="joms-popup__action">','<button class="joms-button--neutral joms-button--small joms-js--button-close">',window.joms_lang.COM_COMMUNITY_CLOSE_BUTTON,"</button>","</div>","</div>"].join("")}const ll={deleteGroup:function(t){w.prepare((function(o){var e,n;e=o,n=t,Qi&&Qi.off(),Wi=e,Ji=n,joms.ajax({func:"groups,ajaxWarnGroupDeletion",data:[Ji],callback:function(t){Wi.items[0]={type:"inline",src:Ac(t)},Wi.updateItemHTML(),(Qi=Wi.contentContainer).on("click",".joms-js--button-cancel",Ec),Qi.on("click",".joms-js--button-save",Nc)}})}))},invite:function(t){w.prepare((function(o){var e,n;e=o,n=t,Xi&&Xi.off(),Ki=e,nc=n,ic=200,joms.ajax({func:"system,ajaxShowInvitationForm",data:[null,"",nc,1,1],callback:function(t){Ki.items[0]={type:"inline",src:qc(t)},Ki.updateItemHTML(),t.limit&&(ic=+t.limit),Xi=Ki.contentContainer,Zi=Xi.find(".joms-tab__content").eq(0),tc=Xi.find(".joms-tab__content").eq(1),oc=Xi.find("[data-btn-select]"),ec=Xi.find("[data-btn-load]"),Xi.on("keyup","[data-search]",Rc),Xi.on("click",".joms-tab__bar a",Bc),Xi.on("click","[data-btn-select]",Pc),Xi.on("click","[data-btn-load]",Hc),Xi.on("click","[data-btn-save]",Yc),Xi.on("click","input[type=checkbox]",Fc),Dc("")}})}))},join:function(t){w.prepare((function(o){lc=t,joms.ajax({func:"groups,ajaxJoinGroup",data:[lc],callback:function(){window.location.reload()}})}))},leave:function(t){w.prepare((function(o){var e,n;e=o,n=t,rc&&rc.off(),pc=e,mc=n,joms.ajax({func:"groups,ajaxShowLeaveGroup",data:[mc],callback:function(t){pc.items[0]={type:"inline",src:Gc(t)},pc.updateItemHTML(),(rc=pc.contentContainer).on("click",".joms-js--button-cancel",Vc),rc.on("click",".joms-js--button-save",zc)}})}))},addFeatured:function(t){w.prepare((function(o){uc=o,dc=t,joms.ajax({func:"groups,ajaxAddFeatured",data:[dc],callback:function(t){uc.items[0]={type:"inline",src:Wc(t)},uc.st.callbacks||(uc.st.callbacks={}),uc.st.callbacks.close=function(){window.location.reload()},uc.updateItemHTML()}})}))},removeFeatured:function(t){w.prepare((function(o){jc=o,fc=t,joms.ajax({func:"groups,ajaxRemoveFeatured",data:[fc],callback:function(t){jc.items[0]={type:"inline",src:Qc(t)},jc.st.callbacks||(jc.st.callbacks={}),jc.st.callbacks.close=function(){window.location.reload()},jc.updateItemHTML()}})}))},report:function(t){w.prepare((function(o){var e,n;e=o,n=t,bc&&bc.off(),vc=e,_c=n,joms.ajax({func:"system,ajaxReport",data:[],callback:function(t){vc.items[0]={type:"inline",src:Zc(t)},vc.updateItemHTML(),(bc=vc.contentContainer).on("change","select",Jc),bc.on("click",".joms-js--button-cancel",Kc),bc.on("click",".joms-js--button-save",Xc)}})}))},unpublish:function(t){w.prepare((function(o){var e,n;e=o,n=t,gc&&gc.off(),hc=e,wc=n,joms.ajax({func:"groups,ajaxShowUnpublishGroup",data:[wc],callback:function(t){hc.items[0]={type:"inline",src:el(t)},hc.updateItemHTML(),(gc=hc.contentContainer).on("click",".joms-js--button-cancel",tl),gc.on("click",".joms-js--button-save",ol)}})}))},approve:function(t,o){yc=t,kc=o,joms.ajax({func:"groups,ajaxApproveMember",data:[kc,yc],callback:function(t){t&&($(".joms-js--request-buttons-group-"+yc+"-"+kc).remove(),$(".joms-js--request-notice-group-"+yc+"-"+kc).html(t.message||t.error),t.success&&Rs.updateCounter("general",yc,-1))}})},removeMember:function(t,o){w.prepare((function(e){var n,s,a;n=e,s=t,a=o,xc&&xc.off(),Tc=n,Cc=s,Mc=a,joms.ajax({func:"groups,ajaxConfirmMemberRemoval",data:[Mc,Cc],callback:function(t){Tc.items[0]={type:"inline",src:al(t)},Tc.updateItemHTML(),(xc=Tc.contentContainer).on("click",".joms-js--button-cancel",nl),xc.on("click",".joms-js--button-save",sl)}})}))},banMember:function(t,o){w.prepare((function(e){Oc=e,Lc=t,Ic=o,joms.ajax({func:"groups,ajaxBanMember",data:[Ic,Lc],callback:function(t){Oc.items[0]={type:"inline",src:il(t)},Oc.updateItemHTML(),t.success&&(Oc.st.callbacks||(Oc.st.callbacks={}),Oc.st.callbacks.close=function(){window.location.reload()})}})}))},unbanMember:function(t,o){w.prepare((function(e){Sc=e,Uc=t,$c=o,joms.ajax({func:"groups,ajaxUnbanMember",data:[$c,Uc],callback:function(t){Sc.items[0]={type:"inline",src:cl(t)},Sc.updateItemHTML(),t.success&&(Sc.st.callbacks||(Sc.st.callbacks={}),Sc.st.callbacks.close=function(){window.location.reload()})}})}))}};var pl,rl,ml,ul,dl,jl,fl,vl,bl,_l,hl,gl,wl,yl,kl;function Tl(t){Il($(t.currentTarget).val())}function xl(){var t=$("#joms-js--compose-to");ul.find(".joms-js--friend").each((function(){var o=$(this),e=o.find(":checkbox").val();t.find(".joms-js--friend-"+e).length||t.append(o.clone())})),rl.off(),pl.close(),t.show()}function Cl(t){var o="#joms-popup-tab-selected"===$(t.target).attr("href"),e=window.joms_lang[o?"COM_COMMUNITY_UNSELECT_ALL":"COM_COMMUNITY_SELECT_ALL"];dl.html(e)}function Ml(){var t,o=$(".joms-tab__content:visible");if("joms-popup-tab-selected"===o.attr("id"))return o.find(".joms-js--friend").remove(),void rl.find("input[type=checkbox]").each((function(){this.checked=!1}));(t=o.find(".joms-js--friend").clone()).find("input[type=checkbox]").add(o.find("input[type=checkbox]")).prop("checked","checked"),(o=rl.find("#joms-popup-tab-selected")).html(t)}function Ol(){Il()}function Ll(t){var o,e,n=$(t.target),s=n.closest(".joms-tab__content");return"joms-popup-tab-selected"===s.attr("id")?(o=n[0].value,n.closest(".joms-js--friend").remove(),void(rl.find(".joms-js--friend-"+o+" input[type=checkbox]")[0].checked=!1)):n[0].checked?(s=rl.find("#joms-popup-tab-selected"),e=n.closest(".joms-js--friend").clone(),(n=e.find("input[type=checkbox]"))[0].checked=!0,void s.append(e)):(o=n[0].value,void rl.find("#joms-popup-tab-selected .joms-js--friend-"+o).remove())}function Il(t){var o="string"==typeof t;o?(ml.empty(),bl=0,vl=t):bl+=_l,hl&&hl.abort(),hl=joms.ajax({func:"system,ajaxLoadFriendsList",data:[vl,"friends,inviteUsers",fl,bl,_l],callback:function(t){var e;t.html&&((e=$($.trim(t.html))).each((function(){var t=$(this).find(":checkbox"),o=t.val();ul.find(":checkbox[value="+o+"]").length&&(t[0].checked=!0)})),ml.append(e)),o||(ml[0].scrollTop=ml[0].scrollHeight),t.loadMore?(dl.css({width:"49%",marginRight:"2%"}),jl.css({width:"49%"}).html(window.joms_lang.COM_COMMUNITY_INVITE_LOAD_MORE+" ("+t.moreCount+")").show()):(jl.hide(),dl.css({width:"100%",marginRight:"0"}))}})}function Sl(t){return['<div class="joms-popup joms-popup--whiteblock">','<div class="joms-popup__title"><button class="mfp-close" type="button" title="',window.joms_lang.COM_COMMUNITY_CLOSE_BUTTON_TITLE,'">×</button>',t.title,"</div>",'<div data-ui-object="popup-step-1"',t.error?' class="joms-popup__hide"':"",">",'<div class="joms-popup__content">',t.html,"</div>",'<div class="joms-popup__action">','<button class="joms-button--primary" data-btn-save="1">',t.btnSelect,"</button>","</div>","</div>",'<div data-ui-object="popup-step-2"',t.error?"":' class="joms-popup__hide"',">",'<div class="joms-popup__content joms-popup__content--single" data-ui-object="popup-message">',t.error||"","</div>","</div>","</div>"].join("")}function Ul(t,o,e){var n;wl&&wl.off(),gl=t,n=[yl=o],(kl=e).length||n.push("empty"),joms.ajax({func:"inbox,ajaxDeleteMessages",data:n,callback:function(t){gl.items[0]={type:"inline",src:Nl(t)},gl.updateItemHTML(),(wl=gl.contentContainer).on("click",".joms-js--button-cancel",$l),wl.on("click",".joms-js--button-save",El)}})}function $l(){wl.off(),gl.close()}function El(){joms.ajax({func:"inbox"===yl?"inbox,ajaxRemoveFullMessages":"inbox,ajaxRemoveSentMessages",data:[kl.join(",")],callback:function(t){var o;if(wl.find(".joms-js--step1").hide(),wl.find(".joms-js--step2").show().children().html(t.error||t.message),t.success){for($(".joms-js--message-checkall")[0].checked=!1,o=0;o<kl.length;o++)$(".joms-js--message-item-"+kl[o]).remove();$(".joms-js--message-item").length||$(".joms-js--message-ct").remove()}}})}function Nl(t){return t||(t={}),['<div class="joms-popup joms-popup--whiteblock">','<div class="joms-popup__title"><button class="mfp-close" type="button" title="',window.joms_lang.COM_COMMUNITY_CLOSE_BUTTON_TITLE,'">×</button>',t.title,"</div>",'<div class="joms-js--step1 ',t.error?"joms-popup__hide":"",'">','<div class="joms-popup__content">',t.html||"","</div>",'<div class="joms-popup__action">','<button class="joms-button--neutral joms-button--small joms-left joms-js--button-cancel">',t.btnNo,"</button> &nbsp;",'<button class="joms-button--primary joms-button--small joms-js--button-save">',t.btnYes,"</button>","</div>","</div>",'<div class="joms-js--step2 ',t.error?"":"joms-popup__hide",'">','<div class="joms-popup__content joms-popup__content--single">',t.error||"","</div>","</div>","</div>"].join("")}const Al={addRecipient:function(t){w.prepare((function(o){var e,n;e=o,n=t,rl&&rl.off(),pl=e,fl=n,_l=200,joms.ajax({func:"system,ajaxShowFriendsForm",data:[null,"",fl,1,1],callback:function(t){pl.items[0]={type:"inline",src:Sl(t)},pl.updateItemHTML(),t.limit&&(_l=+t.limit),rl=pl.contentContainer,ml=rl.find(".joms-tab__content").eq(0),ul=rl.find(".joms-tab__content").eq(1),dl=rl.find("[data-btn-select]"),jl=rl.find("[data-btn-load]"),rl.on("keyup","[data-search]",Tl),rl.on("click",".joms-tab__bar a",Cl),rl.on("click","[data-btn-select]",Ml),rl.on("click","[data-btn-load]",Ol),rl.on("click","[data-btn-save]",xl),rl.on("click","input[type=checkbox]",Ll),Il("")}})}))},remove:function(t,o){w.prepare((function(e){Ul(e,t,o)}))},setRead:function(t,o){!function(t,o){var e;if(t.length)for(e=0;e<t.length;e++)window.jax.call("community","inbox,ajaxMarkMessageAsRead",t[e]);else w.prepare((function(t){var e;t.items[0]={type:"inline",src:(e={error:o},e||(e={}),['<div class="joms-popup joms-popup--whiteblock">','<div class="joms-popup__title"><button class="mfp-close" type="button" title="',window.joms_lang.COM_COMMUNITY_CLOSE_BUTTON_TITLE,'">×</button>',e.title||"","</div>",'<div class="joms-js--step1 ',e.error?"joms-popup__hide":"",'">','<div class="joms-popup__content">',e.html||"","</div>",'<div class="joms-popup__action">','<button class="joms-button--neutral joms-button--small joms-left joms-js--button-cancel">',e.btnNo,"</button> &nbsp;",'<button class="joms-button--primary joms-button--small joms-js--button-save">',e.btnYes,"</button>","</div>","</div>",'<div class="joms-js--step2 ',e.error?"":"joms-popup__hide",'">','<div class="joms-popup__content joms-popup__content--single">',e.error||"","</div>","</div>","</div>"].join(""))},t.updateItemHTML()}))}(t,o)},setUnread:function(t,o){!function(t,o){var e;if(t.length)for(e=0;e<t.length;e++)window.jax.call("community","inbox,ajaxMarkMessageAsUnread",t[e]);else w.prepare((function(t){var e;t.items[0]={type:"inline",src:(e={error:o},e||(e={}),['<div class="joms-popup joms-popup--whiteblock">','<div class="joms-popup__title"><button class="mfp-close" type="button" title="',window.joms_lang.COM_COMMUNITY_CLOSE_BUTTON_TITLE,'">×</button>',e.title||"","</div>",'<div class="joms-js--step1 ',e.error?"joms-popup__hide":"",'">','<div class="joms-popup__content">',e.html||"","</div>",'<div class="joms-popup__action">','<button class="joms-button--neutral joms-button--small joms-left joms-js--button-cancel">',e.btnNo,"</button> &nbsp;",'<button class="joms-button--primary joms-button--small joms-js--button-save">',e.btnYes,"</button>","</div>","</div>",'<div class="joms-js--step2 ',e.error?"":"joms-popup__hide",'">','<div class="joms-popup__content joms-popup__content--single">',e.error||"","</div>","</div>","</div>"].join(""))},t.updateItemHTML()}))}(t,o)}};var Rl,Yl,Bl;function Pl(t){return"openstreetmap"==window.joms_maps_api?function(t){return t||(t={}),joms.map.executeOpenStreetmap((function(){setTimeout((function(){var o=joms.jQuery("#joms-locaton-popup-openstreet");o.css("height",500),o.css("width",500);var e=new L.Map(o[0],{attributionControl:!1});L.tileLayer("https://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png",{minZoom:14,center:[51.505,-.09],id:"mapbox.streets"}).addTo(e);var n=L.marker().addTo(e),s=L.latLng(t.latitude,t.longitude);n.setLatLng(s),e.setView(s,11,{animation:!1})}),500)})),['<div id="joms-locaton-popup" class="joms-popup">','<div id="joms-locaton-popup-openstreet">',"</div>","</div>"].join("")}(t):function(t){var o,e;return t||(t={}),o=t.latitude+","+t.longitude,t.location,e="https://maps.googleapis.com/maps/api/staticmap?center="+o+"&markers=color:red%7Clabel:S%7C"+o+"&zoom=14&size=600x350&maptype=roadmap",window.joms_gmap_key&&(e+="&key="+window.joms_gmap_key),['<div class="joms-popup joms-popup--location-view">',"<div",t.error?' class="joms-popup__hide"':"",">",'<a href="//www.google.com/maps/@',o,',19z" target="_blank">','<img src="',e,'">',"</a>","</div>","<div",t.error?"":' class="joms-popup__hide"',">",'<div class="joms-popup__content joms-popup__content--single">',t.error,"</div>","</div>","</div>"].join("")}(t)}const Hl=function(t){w.prepare((function(o){var e,n;e=o,n=t,Yl&&Yl.off(),Rl=e,Bl=n,joms.ajax({func:"activities,ajaxShowMap",data:[Bl],callback:function(t){Rl.items[0]={type:"inline",src:Pl(t)},Rl.updateItemHTML(),Yl=Rl.contentContainer}})}))};var Fl,Dl,ql,Vl,zl,Gl,Wl,Ql,Jl=void 0;function Kl(t){var o,e,n,s;Vl||(Vl=window.joms_friends||[]),o=$(t?t.currentTarget:Dl.find("input")),e=o.val().replace(/^\s+|\s+$/g,"").toLowerCase(),n=Vl,n=(n=joms._.filter(Vl,(function(t){return!(!t||!t.name||Gl&&Gl.indexOf(t.id+"")>=0||e&&t.name.toLowerCase().indexOf(e)<0)}))).slice(0,8),(n=joms._.map(n,(function(t){return'<a href="javascript:" data-id="'+t.id+'">'+t.name+"</a>"}))).length?Ql=!1:(n=["<span><em>"+window.joms_lang.COM_COMMUNITY_NO_RESULT_FOUND+"</em></span>"],Ql=!0),(s=Dl.find(".joms-phototag__autocomplete")).html(n.join("")),s.append('<div><button class="joms-button--neutral joms-button--small joms-button--full">'+window.joms_lang.COM_COMMUNITY_PHOTO_DONE_TAGGING+"</button></div>"),s.show()}function Xl(t){var o,e=Dl.find(".joms-phototag__autocomplete"),n=$(t.currentTarget).data("id")||"";t.stopPropagation(),e.hide(),zl&&zl.tagAdded&&(Gl||(Gl=[]),Gl.push(n+""),o=function(){var t,o,e,n,s,a,i;return o=Fl.width(),e=Fl.height(),t=Dl.position(),n=Dl.width(),s=Dl.height(),a=t.left,i=t.top,{top:i/=e,left:a/=o,width:n/=o,height:s/=e}}(),zl.tagAdded(n,o.left,o.top,o.width,o.height),Kl())}function Zl(){$(".joms-phototag__tags").show(),Dl&&(Dl.remove(),Fl.remove(),$(window).off("resize.phototag"),Dl=Jl,ql=Jl,zl&&zl.destroy&&zl.destroy(),zl=Jl)}function tp(t){var o,e,n,s=ql.height(),a=ql.width();return Wl?(n=t.clientY-45-t.target.offsetTop-43,e=t.clientX-45-t.target.offsetLeft-43):(o=ql.offset(),n=t.pageY-o.top-43,e=t.pageX-o.left-43),{top:n=Math.max(0,Math.min(n,s-86)),left:e=Math.max(0,Math.min(e,a-86))}}function op(t){var o;Ql?Zl():(o=tp(t),Dl.css({top:o.top,left:o.left}))}const ep={populate:function(t,o){var e,n,s,a,i,c,l,p,r,m,u,d=".joms-phototag__tags";if($(d).remove(),o&&o.length)for((a=(ql=$(t)).position()).top,a.left,i=ql.width(),m=ql.height(),(e=$("<div class="+d.substr(1)+"></div>")).css({top:0,left:0,right:0,bottom:0,margin:"auto",width:i,height:m}),e.insertAfter(ql),u=0;u<o.length;u++)s=o[u],c=Math.round(m*s.top),l=Math.round(i*s.left),p=Math.round(i*s.width),r=Math.round(m*s.height),r=p=Math.max(10,Math.min(p,r)),(n=$("<div class="+".joms-phototag__tag".substr(1)+"><span>"+s.displayName+"</span></div>")).css({top:c+"px",left:l+"px",width:p+"px",height:r+"px"}),n.appendTo(e)},create:function(t,o,e,n,s){var a,i,c,l,p,r,m;Zl(),$(".joms-phototag__tags").hide(),Fl=$(["<div class=joms-phototag__wrapper>","<div class=joms-phototag>","<div class=joms-phototag__input>",'<input type=text placeholder="',window.joms_lang.COM_COMMUNITY_SEARCH,'">','<div class="joms-phototag__autocomplete"></div>',"</div>","</div>","</div>"].join("")),Dl=Fl.find(".joms-phototag"),ql=$(t.target),Vl=Jl,zl={},r=ql.width(),m=ql.height(),a=ql.offset(),i=ql.parent().offset(),l=a.top-i.top,p=a.left-i.left,Gl=o||[],Wl="page"!==e,Dl.css({top:0,left:0}),Fl.css({top:l,left:p,width:r,height:m}),Fl.insertAfter(ql),c=tp(t),Dl.css({top:c.top,left:c.left}),Dl.on("keyup","input",Kl),Dl.on("click","a[data-id]",Xl),Dl.on("click","button",Zl),Dl.on("click",(function(t){t.stopPropagation()})),Fl.on("click",op),+n?joms.fn.tagging.fetchGroupMembers(n,(function(t){Vl=t,Kl()})):+s?joms.fn.tagging.fetchEventMembers(s,(function(t){Vl=t,Kl()})):Kl(),joms.mobile||$(window).on("resize.phototag",Zl)},destroy:Zl,on:function(t,o){zl[t]=o},off:function(t){t?zl[t]&&(zl[t]=Jl):zl={}}};function np(t){return np="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},np(t)}var sp,ap,ip,cp,lp,pp,rp,mp,up,dp,jp,fp,vp,bp,_p,hp,gp,wp,yp,kp,Tp,xp,Cp,Mp,Op,Lp,Ip,Sp,Up,$p,Ep,Np,Ap,Rp,Yp,Bp='<svg viewBox="0 0 16 16" class="joms-icon"><use xlink:href="#joms-icon-cog"></use></svg>',Pp='<svg viewBox="0 0 16 16" class="joms-icon"><use xlink:href="#joms-icon-bubble"></use></svg>',Hp='<svg viewBox="0 0 16 16" class="joms-icon"><use xlink:href="#joms-icon-thumbs-up"></use></svg>',Fp='<svg viewBox="0 0 16 16" class="joms-icon"><use xlink:href="#joms-icon-tag"></use></svg>',Dp='<svg viewBox="0 0 16 16" class="joms-icon"><use xlink:href="#joms-icon-newspaper"></use></svg>';function qp(t,o){clearTimeout(Rp),clearTimeout(Yp),t.hide(),t.removeAttr("src"),Yp=setTimeout((function(){cp.show()}),100),Rp=setTimeout((function(){$("<img>").on("load",(function(){clearTimeout(Yp),cp.hide(),t.attr("src",o),t.show()})).attr("src",o)}),1)}function Vp(){--vp<0&&(vp=fp.length-1),jp=fp[vp].id,qp(ip,fp[vp].url),lp.html(kp+' <span class="joms-popup__optcapindex">'+(vp+1)+" "+window.joms_lang.COM_COMMUNITY_OF+" "+fp.length+"</span>"),Xp(),wr(jp),Gp(),Wp()}function zp(){++vp>=fp.length&&(vp=0),jp=fp[vp].id,qp(ip,fp[vp].url),lp.html(kp+' <span class="joms-popup__optcapindex">'+(vp+1)+" "+window.joms_lang.COM_COMMUNITY_OF+" "+fp.length+"</span>"),Xp(),wr(jp),Gp(),Wp()}function Gp(){var t=vp<=0,o=vp>=fp.length-1;ap.find(".mfp-arrow-left")[t?"hide":"show"](),ap.find(".mfp-arrow-right")[o?"hide":"show"]()}function Wp(){var t=vp<=0,o=vp>=fp.length-1;t||((new Image).src=fp[vp-1].url),o||((new Image).src=fp[vp+1].url)}function Qp(){pp.data("tagging")?Xp():(pp.data("tagging",1),ap.find(".joms-phototag__tags").hide(),ap.children(".joms-popup--photo").addClass("joms-popup--phototag"),ip.off("click.phototag").on("click.phototag",Jp),ip.addClass("joms-phototag__image"),ap.find(".joms-popup__btn-tag-photo").html(Fp+" "+bp.done_tagging))}function Jp(t){var o=joms._.map(rp,(function(t){return t.userId+""}));ep.create(t,o,!1,Mp,Op),ep.on("tagAdded",Kp),ep.on("destroy",(function(){pp.removeData("tagging"),ap.children(".joms-popup--photo").removeClass("joms-popup--phototag"),ip.off("click.phototag"),ip.removeClass("joms-phototag__image"),ap.find(".joms-popup__btn-tag-photo").html(Fp+' <span class="joms-popup__btn-overlay">'+bp.tag_photo+"</span>")})),ap.children(".joms-popup--photo").removeClass("joms-popup--phototag"),ip.off("click.phototag")}function Kp(t,o,e,n,s){joms.ajax({func:"photos,ajaxAddPhotoTag",data:[jp,t,e,o,n,s],callback:function(t){t.error?window.alert(_r(t.error)):t.success&&(rp.push(t.data),ap.find(".joms-popup__comment").find(".joms-js--tag-info").html(tr()))}})}function Xp(){ep.destroy()}function Zp(t){var o=$(t.currentTarget).data("id");joms.ajax({func:"photos,ajaxRemovePhotoTag",data:[jp,o],callback:function(t){var e;if(t.error)window.alert(_r(t.error));else if(t.success){for(e=0;e<rp.length;e++)+o==+rp[e].userId&&rp.splice(e--,1);ap.find(".joms-popup__comment").find(".joms-js--tag-info").html(tr())}}})}function tr(){var t,o,e,n;if(rp&&rp.length||(rp=[]),ep.populate(ip,rp,"page"),!rp.length)return"";for(t=[],n=0;n<rp.length;n++)e='<a href="'+(o=rp[n]).profileUrl+'">'+o.displayName+"</a>",o.canRemove&&(e+=' (<a href="javascript:" class="joms-js--remove-tag" data-id="'+o.userId+'">'+up+"</a>)"),t.push(e);return t=t.join(", "),mp+"<br>"+t}function or(t){t.stopPropagation(),ap.children(".joms-popup").toggleClass("joms-popup--togglecomment")}function er(){var t=ap.children(".joms-popup"),o="joms-popup--togglecomment";t.hasClass(o)?t.removeClass(o):$.magnificPopup.proto.close.call(this)}function nr(t){$(t.target).closest(".joms-popup__dropdown--wrapper").children(".joms-popup__dropdown").toggleClass("joms-popup__dropdown--open")}function sr(t){$(t.target).closest(".joms-popup__dropdown--wrapper").children(".joms-popup__dropdown").removeClass("joms-popup__dropdown--open")}function ar(){joms.api.pageShare(xp.replace("___photo_id___",jp))}function ir(){window.open(fp[vp].original)}function cr(){joms.api.photoReport(Cp,xp.replace("___photo_id___",jp))}function lr(){joms.api.photoUpload(dp)}function pr(){joms.ajax({func:"photos,ajaxConfirmDefaultPhoto",data:[dp,jp],callback:function(t){t.error?window.alert(_r(t.error)):window.confirm(_r(t.message))&&joms.ajax({func:"photos,ajaxSetDefaultPhoto",data:[dp,jp],callback:function(t){window.alert(_r(t.error||t.message))}})}})}function rr(){joms.ajax({func:"photos,ajaxLinkToProfile",data:[jp],callback:function(t){var o,e;if(t.error)window.alert(_r(t.error));else if(window.confirm(_r(t.message))){for(e in t.formParams||(t.formParams={}),o=$('<form method=post action="'+t.formUrl+'" style="width:1px; height:1px; position:absolute"/>'),t.formParams)o.append('<input type=hidden name="'+e+'" value="'+t.formParams[e]+'"/>');o.appendTo(document.body),o[0].submit()}}})}function mr(){joms.ajax({func:"photos,ajaxConfirmRemovePhoto",data:[jp],callback:function(t){t.error?window.alert(_r(t.error)):window.confirm(_r(t.message))&&joms.ajax({func:"photos,ajaxRemovePhoto",data:[jp],callback:function(t){t.error?window.alert(_r(t.error)):(ap.off(),sp.close(),window.location.reload())}})}})}function ur(){joms.api.photoSetAlbum(jp)}function dr(){}function jr(){}function fr(){br("left")}function vr(){br("right")}function br(t){var o=fp[vp]&&fp[vp].id;o&&joms.ajax({func:"photos,ajaxRotatePhoto",data:[o,t],callback:function(t){joms._.extend(fp[vp],t||{}),ip.attr("src",fp[vp].url)}})}function _r(t){return t.replace(/<\/?[^>]+>/g,"")}function hr(t){var o,e,n="";return t||(t={}),o=t.error||"",e=t.error?"":t.commentHtml||"",t.error||(fp=t.list||[],vp=t.index||0,vp=Math.min(fp.length,vp),o='<img src="'+fp[vp].url+'" data-index="'+vp+'"><div class="joms-spinner" style="display:none"></div>',n=kp+' <span class="joms-popup__optcapindex">'+(vp+1)+" "+window.joms_lang.COM_COMMUNITY_OF+" "+fp.length+"</span>"),['<div class="joms-popup joms-popup--photo'+(Ap?" joms-reaction--on":"")+'">','<div class="joms-popup__commentwrapper">','<div class="joms-popup__content">',fp&&fp.length>1?'<button class="mfp-arrow mfp-arrow-left" type="button" title="'+bp.prev+'"></button>':"",fp&&fp.length>1?'<button class="mfp-arrow mfp-arrow-right" type="button" title="'+bp.next+'"></button>':"",o,'<div class="joms-popup__option clearfix">','<div class="joms-popup__optcaption">',n||"Untitled","</div>",'<div class="joms-popup__optoption">','<button class="joms-popup__btn-viewalbum" onclick="window.location=\'',Tp,"'\">",Dp,' <span class="joms-popup__btn-overlay">',bp.view_album,"</span></button>",'<button class="joms-popup__btn-comments">',Pp,' <span class="joms-popup__btn-overlay">',bp.comments,"</span></button>",Ap?"":'<button class="joms-popup__btn-like"></button>',gp?'<button class="joms-popup__btn-tag-photo">'+Fp+' <span class="joms-popup__btn-overlay">'+bp.tag_photo+"</span></button>":"",'<div class="joms-popup__dropdown--wrapper"><div class="joms-popup__dropdown"></div><button class="joms-popup__btn-option">',Bp,' <span class="joms-popup__btn-overlay">',bp.options,"</span></button></div>","</div>","</div>","</div>",'<div class="joms-popup__comment">',e,"</div>",'<button class="mfp-close" type="button" title="',window.joms_lang.COM_COMMUNITY_CLOSE_BUTTON_TITLE,'">×</button>',"</div>","</div>"].join("")}function gr(t){return t||(t={}),t.title||(t.title="&nbsp;"),['<div class="joms-popup joms-popup--whiteblock">','<div class="joms-popup__title"><button class="mfp-close" type="button" title="',window.joms_lang.COM_COMMUNITY_CLOSE_BUTTON_TITLE,'">×</button>',t.title,"</div>",'<div class="joms-popup__content joms-popup__content--single">',t.error,"</div>","</div>"].join("")}function wr(t,o){var e=ap.find(".joms-popup__comment");o||e.empty(),joms.ajax({func:"photos,ajaxSwitchPhotoTrigger",data:[t,o?1:0],callback:function(t){var n,s,a,i;o||t.comments&&t.showall&&(t.showall='<div class="joms-comment__more joms-js--more-comments"><a href="javascript:">'+t.showall+"</a></div>",t.comments=$($.trim(t.comments)),t.comments.prepend(t.showall)),o?e.find(".joms-comment").replaceWith(t.comments):(e.html(t.head||""),e.append(t.comments),e.append(t.form||""),rp=t.tagged||[],mp=t.tagLabel||"",up=t.tagRemoveLabel||"",_p=void 0===t.can_edit?_p:t.can_edit,hp=void 0===t.can_delete?hp:t.can_delete,gp=void 0===t.can_tag?gp:t.can_tag,wp=void 0===t.can_move_photo?wp:t.can_move_photo,yp=void 0===t.can_rotate?yp:t.can_rotate,e.find(".joms-js--description").html(function(t){return"object"!==np(t)&&(t={}),['<div class="joms-js--btn-desc-content">',t.content||"","</div>",'<div class="joms-js--btn-desc-editor joms-popup__hide">','<textarea class="joms-textarea" style="margin:0" placeholder="',t.lang_placeholder||"",'">',(o=t.rawcontent||"",o=(o=o||"").replace(/<br\s*\/?>/g,"\n")),"</textarea>",'<div style="margin-top:5px;text-align:right">','<button class="joms-button--neutral joms-button--small joms-js--btn-desc-cancel">',t.lang_cancel||"Cancel","</button> ",'<button class="joms-button--primary joms-button--small joms-js--btn-desc-save">',t.lang_save||"Save","</button>","</div>","</div>",'<div class="joms-js--btn-desc-edit"',_p?"":' style="display:none"','><a href="javascript:"',' data-lang-add="',t.lang_add||"Add description",'"',' data-lang-edit="',t.lang_edit||"Edit description",'">',t.rawcontent?t.lang_edit:t.lang_add,"</a>","</div>"].join("");var o}(t.description||{})),n=!!yp,s=ap.find(".joms-popup__btn-rotate-toggle"),"boolean"==typeof n&&(n?s.show():s.hide()),e.find(".joms-js--tag-info").html(tr()),e.find(".joms-js--comments,.joms-js--newcomment").find("textarea.joms-textarea"),joms.fn.tagging.initInputbox()),function(t){var o,e,n="",s="";t||(t={}),e=t.is_photo_owner,Ep&&(n+='<a href="javascript:" class="joms-popup__btn-share">'+bp.share+"</a>"),Up&&(n+='<a href="javascript:" class="joms-popup__btn-download">'+bp.download+"</a>"),Ip||Sp||e?(n+=Ep||Up?'<div class="sep"></div>':"",n+=Ip?'<a href="javascript:" class="joms-popup__btn-upload">'+bp.upload_photos+"</a>":"",n+=Ip?'<div class="sep"></div>':"",n+=Ip?'<a href="javascript:" class="joms-popup__btn-profile">'+bp.set_as_profile_picture+"</a>":"",n+=Ip||Sp?'<a href="javascript:" class="joms-popup__btn-cover">'+bp.set_as_album_cover+"</a>":"",n+=hp?'<a href="javascript:" class="joms-popup__btn-delete">'+bp.delete_photo+"</a>":"",n+=wp||e?'<a href="javascript:" class="joms-popup__btn-move">'+bp.move_to_another_album+"</a>":"",n+=yp?'<div class="sep joms-popup__btn-rotate-toggle"></div>':"",n+=yp?'<a href="javascript:" class="joms-popup__btn-rotate-left joms-popup__btn-rotate-toggle">'+bp.rotate_left+"</a>":"",n+=yp?'<a href="javascript:" class="joms-popup__btn-rotate-right joms-popup__btn-rotate-toggle">'+bp.rotate_right+"</a>":""):(n+=hp?'<a href="javascript:" class="joms-popup__btn-delete">'+bp.delete_photo+"</a>":"",n+=$p?'<a href="javascript:" class="joms-popup__btn-report">'+bp.report+"</a>":""),n='<div class="joms-popup__dropdown"><div class="joms-popup__ddcontent">'+n+"</div></div>",Np&&t&&t.like&&!Ap&&(s+='<button class="joms-popup__btn-like joms-js--like-photo-'+jp+(t.like.is_liked?" liked":"")+'"',s+=' onclick="joms.api.page'+(t.like.is_liked?"Unlike":"Like")+"('photo', '"+jp+"');\"",s+=' data-lang="'+(t.like.lang||"Like")+'"',s+=' data-lang-like="'+(t.like.lang_like||"Like")+'"',s+=' data-lang-liked="'+(t.like.lang_liked||"Liked")+'">',s+=Hp+" ",s+="<span>",s+=t.like.is_liked?t.like.lang_liked:t.like.lang_like,(o=+t.like.count)>0&&(s+=" ("+o+")"),s+="</span></button>"),ap.find(".joms-popup__dropdown").replaceWith(n),ap.find(".joms-popup__btn-like").replaceWith(s)}(t),a=".joms-js--video",(i=$(".joms-comment__body,.joms-js--inbox").find(a).not(".joms-js--initialized")).length&&(joms.loadCSS(joms.ASSETS_URL+"vendors/mediaelement/mediaelementplayer.min.css"),i.on("click.joms-video",a+"-play",(function(){var t=$(this).closest(a);joms.util.video.play(t,t.data())})),joms.ios&&setTimeout((function(){i.find(a+"-play").click()}),2e3)),joms.parseEmoji()}})}function yr(){ap.find(".joms-js--btn-desc-content").hide(),ap.find(".joms-js--btn-desc-edit").hide(),ap.find(".joms-js--btn-desc-editor").show()}function kr(){ap.find(".joms-js--btn-desc-editor").hide(),ap.find(".joms-js--btn-desc-content").show(),ap.find(".joms-js--btn-desc-edit").show()}function Tr(){var t=ap.find(".joms-js--btn-desc-content"),o=ap.find(".joms-js--btn-desc-editor"),e=ap.find(".joms-js--btn-desc-edit"),n=o.find("textarea"),s=$.trim(n.val());joms.ajax({func:"photos,ajaxSaveCaption",data:[jp,s],callback:function(n){var a=e.find("a");n.error?window.alert(n.error):n.success&&(o.hide(),t.html(n.caption).show(),a.html(a.data("lang-"+(s?"edit":"add"))),e.show())}})}Ap=!!joms.getData("joms_reaction");const xr=joms._.debounce((function(t,o){w.prepare((function(e){var n,s,a;n=e,s=t,a=o,ap&&ap.off(),sp=n,dp=s,jp=a,joms.ajax({func:"photos,ajaxGetPhotosByAlbum",data:[dp,jp],callback:function(t){t||(t={}),bp=t.lang||{},_p=t.can_edit||!1,hp=t.can_delete||!1,gp=t.can_tag||!1,wp=t.can_move_photo||!1,yp=t.can_rotate||!1,kp=t.album_name||"Untitled",Tp=t.album_url,xp=t.photo_url,Lp=Cp=+t.my_id,Mp=+t.groupid,Op=+t.eventid,Ip=Lp&&+t.my_id==+t.owner_id,Sp=+t.is_admin,Up=!+t.deleteoriginalphotos,$p=+t.enablereporting,Ep=+t.enablesharing,Np=+t.enablelike,Tp&&(kp='<a href="'+Tp+'">'+kp+"</a>"),sp.items[0]={type:"inline",src:t.error?gr(t):hr(t)},sp.updateItemHTML(),sp.close=er,ap=sp.contentContainer,t.error||(ip=ap.find("img"),cp=ap.find(".joms-spinner"),lp=ap.find(".joms-popup__optcaption"),pp=ap.find(".joms-popup__btn-tag-photo"),ap.on("click",".mfp-arrow-left",Vp),ap.on("click",".mfp-arrow-right",zp),ap.on("click",".joms-popup__btn-tag-photo",Qp),ap.on("click",".joms-popup__btn-comments",or),ap.on("click",".joms-popup__btn-comments .joms-icon",or),ap.on("click",".joms-popup__btn-option",nr),ap.on("click",".joms-popup__btn-share",ar),ap.on("click",".joms-popup__btn-download",ir),ap.on("click",".joms-popup__btn-report",cr),ap.on("click",".joms-popup__btn-upload",lr),ap.on("click",".joms-popup__btn-cover",pr),ap.on("click",".joms-popup__btn-profile",rr),ap.on("click",".joms-popup__btn-delete",mr),ap.on("click",".joms-popup__btn-move",ur),ap.on("click",".joms-popup__btn-like",dr),ap.on("click",".joms-popup__btn-dislike",jr),ap.on("click",".joms-popup__btn-rotate-left",fr),ap.on("click",".joms-popup__btn-rotate-right",vr),ap.on("mouseleave",".joms-popup__dropdown--wrapper",sr),ap.on("click",".joms-js--remove-tag",Zp),ap.on("click",".joms-js--btn-desc-edit",yr),ap.on("click",".joms-js--btn-desc-cancel",kr),ap.on("click",".joms-js--btn-desc-save",Tr),$(document).off("keyup.photomodal").on("keyup.photomodal",(function(t){var o=t.target.tagName.toLowerCase(),e=t.keyCode;"input"!==o&&"textarea"!==o&&(37!==e&&39!==e||(37===e&&vp>0?Vp():39===e&&vp<fp.length-1&&zp()))})),sp.st.callbacks||(sp.st.callbacks={}),sp.st.callbacks.close=function(){$(document).off("keyup.photomodal")},jp||(jp=t.list[t.index].id),wr(jp),Gp(),Wp())}})}))}),200);var Cr,Mr,Or,Lr,Ir,Sr,Ur,$r,Er,Nr,Ar,Rr,Yr,Br,Pr,Hr,Fr,Dr,qr,Vr,zr,Gr,Wr,Qr,Jr,Kr,Xr,Zr;function tm(){Mr.off(),Cr.close()}function om(){joms.ajax({func:"photos,ajaxRemovePhoto",data:[Or],callback:function(t){var o;t.error?(Mr.find(".joms-js--step1").hide(),Mr.find(".joms-js--step2").show().children().html(t.error||t.message)):(o=$(".joms-js--photo-"+Or)).length&&o.siblings().length?(o.remove(),tm()):window.location.reload()}})}function em(t){return t||(t={}),['<div class="joms-popup joms-popup--whiteblock">','<div class="joms-popup__title"><button class="mfp-close" type="button" title="',window.joms_lang.COM_COMMUNITY_CLOSE_BUTTON_TITLE,'">×</button>',t.title,"</div>",'<div class="joms-js--step1',t.error?" joms-popup__hide":"",'">','<div class="joms-popup__content joms-popup__content--single">',t.message,"</div>",'<div class="joms-popup__action">','<button class="joms-button--neutral joms-button--small joms-left joms-js--button-cancel">',t.btnCancel,"</button> &nbsp;",'<button class="joms-button--primary joms-button--small joms-js--button-save">',t.btnYes,"</button>","</div>","</div>",'<div class="joms-js--step2',t.error?"":" joms-popup__hide",'">','<div class="joms-popup__content joms-popup__content--single">',t.error||"","</div>","</div>","</div>"].join("")}function nm(t){Ir.find("textarea").val(t.target.value)}function sm(){Ir.off(),Lr.close()}function am(){var t;(t=(t=Ir.find("textarea").val()).replace(/^\s+|\s+$/g,""))?(Ir.find(".joms-js--error").hide(),joms.ajax({func:"system,ajaxSendReport",data:["photos,reportPhoto",Ur||window.location.href,t,Sr],callback:function(t){Ir.find(".joms-js--step1").hide(),Ir.find(".joms-js--step2").show().children().html(t.error||t.message)}})):Ir.find(".joms-js--error").show()}function im(t){return t||(t={}),['<div class="joms-popup joms-popup--whiteblock joms-popup--500">','<div class="joms-popup__title"><button class="mfp-close" type="button" title="',window.joms_lang.COM_COMMUNITY_CLOSE_BUTTON_TITLE,'">×</button>',t.title,"</div>",'<div class="joms-js--step1',t.error?" joms-popup__hide":"",'">',t.html,'<div class="joms-popup__action">','<button class="joms-button--neutral joms-button--small joms-left joms-js--button-cancel">',t.btnCancel,"</button> &nbsp;",'<button class="joms-button--primary joms-button--small joms-js--button-save">',t.btnSend,"</button>","</div>","</div>",'<div class="joms-js--step2',t.error?"":" joms-popup__hide",'">','<div class="joms-popup__content joms-popup__content--single">',t.error||"","</div>","</div>","</div>"].join("")}function cm(){Er.off(),$r.close()}function lm(){var t,o=$('<form method=post action="'+Ar+'" style="width:1px; height:1px; position:absolute"/>');for(t in Rr)o.append('<input type=hidden name="'+t+'" value="'+Rr[t]+'"/>');o.appendTo(document.body),o[0].submit()}function pm(t){return t||(t={}),['<div class="joms-popup joms-popup--whiteblock">','<div class="joms-popup__title"><button class="mfp-close" type="button" title="',window.joms_lang.COM_COMMUNITY_CLOSE_BUTTON_TITLE,'">×</button>',t.title,"</div>",'<div class="joms-js--step1',t.error?" joms-popup__hide":"",'">','<div class="joms-popup__content">',t.message,"</div>",'<div class="joms-popup__action">','<button class="joms-button--neutral joms-button--small joms-left joms-js--button-cancel">',t.btnCancel,"</button> &nbsp;",'<button class="joms-button--primary joms-button--small joms-js--button-save">',t.btnYes,"</button>","</div>","</div>",'<div class="joms-js--step2',t.error?"":" joms-popup__hide",'">','<div class="joms-popup__content joms-popup__content--single">',t.error||"","</div>","</div>","</div>"].join("")}function rm(){Br.off(),Yr.close()}function mm(){joms.ajax({func:"photos,ajaxSetDefaultPhoto",data:[Pr,Hr],callback:function(t){Br.find(".joms-js--step1").hide(),Br.find(".joms-js--step2").show().children().html(t.error||t.message)}})}function um(t){return t||(t={}),['<div class="joms-popup joms-popup--whiteblock">','<div class="joms-popup__title"><button class="mfp-close" type="button" title="',window.joms_lang.COM_COMMUNITY_CLOSE_BUTTON_TITLE,'">×</button>',t.title,"</div>",'<div class="joms-js--step1',t.error?" joms-popup__hide":"",'">','<div class="joms-popup__content">',t.message,"</div>",'<div class="joms-popup__action">','<button class="joms-button--neutral joms-button--small joms-left joms-js--button-cancel">',t.btnNo,"</button> &nbsp;",'<button class="joms-button--primary joms-button--small joms-js--button-save">',t.btnYes,"</button>","</div>","</div>",'<div class="joms-js--step2',t.error?"":" joms-popup__hide",'">','<div class="joms-popup__content joms-popup__content--single">',t.error||"","</div>","</div>","</div>"].join("")}function dm(t,o,e,n){var s;Dr&&Dr.off(),Fr=t,Qr=n||!1,Wr=e||!1,(s=[]).push((Gr=o||!1)||""),s.push(Wr||""),s.push(Qr||""),joms.ajax({func:"photos,ajaxUploadPhoto",data:s,callback:function(t){Fr.items[0]={type:"inline",src:xm(t)},Fr.updateItemHTML(),t.lang,Dr=Fr.contentContainer,zr=Dr.find(".joms-gallery"),Jr=[],Dr.on("click",".joms-tab__bar a",jm),Dr.on("click",".joms-js--form-toggle",fm),Dr.on("click",".joms-js--btn-create",vm),Dr.on("click",".joms-js--btn-add",bm),Dr.on("click",".joms-js--btn-view",Tm),_m()}})}function jm(t){var o=Dr.find(".joms-js--btn-create"),e=Dr.find(".joms-js--btn-add"),n=$(t.target).attr("href");Kr||n.match(/select-album/)?(o.hide(),e.show()):(e.hide(),o.show())}function fm(t){var o=Dr.find(".joms-js--form-toggle");"show"!==t&&"hide"!==t&&(t=o.data("hidden")?"show":"hide"),"show"===t?(o.removeData("hidden"),Dr.find(".joms-js--thumbnails").hide(),Dr.find(".joms-js--form-detail").css({height:""})):"hide"===t&&(o.data("hidden","hidden"),Dr.find(".joms-js--form-detail").css({height:0}),Dr.find(".joms-js--thumbnails").show())}function vm(){var t=$.trim(Dr.find("[name=name]").val()),o=$.trim(Dr.find("[name=location]").val()),e=$.trim(Dr.find("[name=description]").val()),n=Dr.find("[name=permissions]").val(),s=Dr.find("[name=name]").siblings(".joms-help").hide(),a=Dr.find(".joms-js--btn-create img");t.length?a.is(":visible")||(a.show(),joms.ajax({func:"photos,ajaxCreateAlbum",data:[t,Wr||"",Qr||"",o||"",e||"",n||""],callback:joms._.debounce((function(t){a.hide(),t.error?window.alert(t.error):t.albumid&&(Gr=Kr=t.albumid,Dr.find(".joms-js--btn-create").hide(),Dr.find(".joms-js--btn-add").show(),Dr.find("#joms-js__new-album").find("input.joms-input, textarea.joms-textarea, select.joms-select").attr("disabled","disabled"),fm("hide"))}),500)})):s.show()}function bm(){_m((function(){Vr.click()}))}function _m(t){"function"!=typeof t&&(t=function(){}),qr?t():Et("plupload",(function(){var o;o=$('<div id="joms-js--photoupload-uploader" aria-hidden="true" style="width:1px; height:1px; overflow:hidden">').appendTo(document.body),$('<button id="joms-js--photoupload-uploader-button">').appendTo(o),(qr=new window.plupload.Uploader({url:"index.php?option=com_community&view=photos&task=multiUpload",filters:[{title:"Image files",extensions:"jpg,jpeg,png,gif"}],container:"joms-js--photoupload-uploader",browse_button:"joms-js--photoupload-uploader-button",runtimes:"html5,html4"})).bind("FilesAdded",hm),qr.bind("Error",gm),qr.bind("UploadProgress",wm),qr.bind("FileUploaded",ym),qr.bind("uploadComplete",km),qr.init(),Vr=o.find("input[type=file]"),t()}))}function hm(t,o){var e,n="";for(e=0;e<o.length;e++)n+='<li class="joms-gallery__item joms-file--'+o[e].id+'">',n+='<div class="joms-gallery__thumbnail"><img src="'+joms.ASSETS_URL+'photo_thumb.png"></div>',n+='<div class="joms-gallery__body">',n+='<a class="joms-gallery__title">'+o[e].name+"</a> <span>("+Math.round(o[e].size/1024)+" KB)</span>",n+='<div class="joms-progressbar"><div class="joms-progressbar__progress" style="width:0%"></div></div>',n+="</div>",n+="</li>";zr.append(n),Dr.find(".joms-js--btn-add").css({visibility:"visible"}),Dr.find(".joms-js--btn-view").hide(),setTimeout((function(){Dr.find("[name=name]").is(":visible")?Kr&&(Gr=Kr):Gr=Dr.find("[name=album-id]").val(),Dr.find(".joms-js--btn-add").css({visibility:"hidden"}),Dr.find(".joms-js--btn-view").hide(),qr.settings.url=joms.BASE_URL+"index.php?option=com_community&view=photos&task=multiUpload&albumid="+Gr,qr.refresh(),qr.start()}),1e3)}function gm(){}function wm(t,o){var e;e=Math.min(100,Math.floor(o.loaded/o.size*100)),Dr.find(".joms-file--"+o.id).find(".joms-progressbar__progress").stop().animate({width:e+"%"})}function ym(t,o,e){var n,s={};try{s=JSON.parse(e.response)}catch(t){}if(s.error)return qr.stop(),s.canContinue?Dr.find(".joms-js--btn-add").css({visibility:"visible"}):Dr.find(".joms-js--btn-add").css({visibility:"hidden"}),(n=Dr.find(".joms-file--"+o.id)).prevAll().length&&Dr.find(".joms-js--btn-view").show(),n.nextAll().addBack().remove(),void window.alert(s.msg);s.info&&(Jr.push({photoId:s.photoId}),(n=(n=Dr.find(".joms-file--"+o.id)).find("img")).attr("src",s.info),Dr.find(".joms-js--btn-add").html(Dr.find(".joms-js--btn-add").data("lang-more")),Dr.find(".joms-js--btn-view").show(),Dr.off("click",".joms-tab__bar a"),Dr.find(".joms-tab__bar a").removeAttr("href"),Dr.find("input.joms-input, textarea.joms-textarea, select.joms-select").attr("disabled","disabled"))}function km(){Dr.find(".joms-js--btn-add").css({visibility:"visible"}),Dr.find(".joms-js--btn-view").show(),joms.ajax({func:"photos,ajaxUpdateCounter",data:[Gr,JSON.stringify({files:Jr})],callback:function(){}})}function Tm(){joms.ajax({func:"photos,ajaxGetAlbumURL",data:[Gr||"",Wr||"",Qr||""],callback:function(t){t.url&&(window.location=t.url)}})}function xm(t){return t||(t={}),['<div class="joms-popup joms-popup--whiteblock joms-popup--photoupload">','<div class="joms-popup__title"><button class="mfp-close" type="button" title="',window.joms_lang.COM_COMMUNITY_CLOSE_BUTTON_TITLE,'">×</button>',t.title,"</div>",t.html,"</div>"].join("")}function Cm(t){return['<div class="joms-popup-wrapper" style="width:100%;height:100%;margin:0 auto;text-align:center">','<div class="joms-popup" style="max-width:100%;left:auto;right:auto;position:relative;top:0;display:none;">','<img src="'+(t=(t=t||"").replace("thumb_",""))+'" style="width:auto;max-width:100%; display:none;">',"</div>","</div>"].join("")}var Mm,Om,Lm,Im=joms._.debounce((function(){var t=Xr.find(".joms-popup").css({position:"",display:"",top:"",width:""}),o=t.find("img").css({height:""});Xr.find(".joms-popup-wrapper").length&&(Xr.find(".joms-popup-wrapper .mfp-close").appendTo(t),t.unwrap());var e,n,s,a=t.parents(".mfp-content");n=o.get(0).height,e=(s=o.get(0).width)/n,a.width()/e>a.height()?(s="auto",n=a.height()):(s=a.width(),n="auto"),o.css({display:"block",height:n,width:s}),t.css({position:"relative",width:o.width()})}),100);function Sm(){Om.off(),Mm.close()}function Um(){var t=Om.find("[name=albumid]").val();joms.ajax({func:"photos,ajaxConfirmPhotoAlbum",data:[t,Lm.join(",")],callback:function(t){var o,e,n=[];if(t.message&&n.push(t.message),t.moved&&t.moved.length)for(e=0;e<t.moved.length;e++)(o=$(".joms-js--album-"+t.moved[e].old_album)).length&&o.find(".joms-js--photo-"+t.moved[e].id).remove();if("[object Array]"===Object.prototype.toString.call(t.error)){if(t.error.length){for(e=0;e<t.error.length;e++)t.error[e]="<li>ID: "+t.error[e][0]+" - "+t.error[e][1]+"</li>";n.push("<ul>"+t.error.join("")+"</ul>")}}else"string"==typeof t.error&&n.push(t.error);Om.find(".joms-js--step1").hide(),Om.find(".joms-js--step2").show().children().html(n.join("<br/>"))}})}function $m(t){return t||(t={}),['<div class="joms-popup joms-popup--whiteblock">','<div class="joms-popup__title"><button class="mfp-close" type="button" title="',window.joms_lang.COM_COMMUNITY_CLOSE_BUTTON_TITLE,'">×</button>',t.title,"</div>",'<div class="joms-js--step1',t.error?" joms-popup__hide":"",'">','<div class="joms-popup__content joms-popup__content--single">',t.html||"","</div>",'<div class="joms-popup__action">','<button class="joms-button--neutral joms-button--small joms-left joms-js--button-cancel">',t.btnCancel,"</button> &nbsp;",'<button class="joms-button--primary joms-button--small joms-js--button-save">',t.btnYes,"</button>","</div>","</div>",'<div class="joms-js--step2',t.error?"":" joms-popup__hide",'">','<div class="joms-popup__content joms-popup__content--single">',t.error||"","</div>","</div>","</div>"].join("")}const Em={open:xr,remove:function(t){w.prepare((function(o){var e,n;e=o,n=t,Mr&&Mr.off(),Cr=e,Or=n,joms.ajax({func:"photos,ajaxConfirmRemovePhoto",data:[Or],callback:function(t){Cr.items[0]={type:"inline",src:em(t)},Cr.updateItemHTML(),(Mr=Cr.contentContainer).on("click",".joms-js--button-cancel",tm),Mr.on("click",".joms-js--button-save",om)}})}))},report:function(t,o){w.prepare((function(e){var n,s,a;n=e,s=t,a=o,Ir&&Ir.off(),Lr=n,Sr=s,Ur=a,joms.ajax({func:"system,ajaxReport",data:[],callback:function(t){Lr.items[0]={type:"inline",src:im(t)},Lr.updateItemHTML(),(Ir=Lr.contentContainer).on("change","select",nm),Ir.on("click",".joms-js--button-cancel",sm),Ir.on("click",".joms-js--button-save",am)}})}))},setAvatar:function(t){w.prepare((function(o){var e,n;e=o,n=t,Er&&Er.off(),$r=e,Nr=n,joms.ajax({func:"photos,ajaxLinkToProfile",data:[Nr],callback:function(t){$r.items[0]={type:"inline",src:pm(t)},$r.updateItemHTML(),Ar=t.formUrl||"",Rr=t.formParams||{},(Er=$r.contentContainer).on("click",".joms-js--button-cancel",cm),Er.on("click",".joms-js--button-save",lm)}})}))},setCover:function(t,o){w.prepare((function(e){var n,s,a;n=e,s=t,a=o,Br&&Br.off(),Yr=n,Pr=s,Hr=a,joms.ajax({func:"photos,ajaxConfirmDefaultPhoto",data:[Pr,Hr],callback:function(t){Yr.items[0]={type:"inline",src:um(t)},Yr.updateItemHTML(),(Br=Yr.contentContainer).on("click",".joms-js--button-cancel",rm),Br.on("click",".joms-js--button-save",mm)}})}))},upload:function(t,o,e){w.prepare((function(n){dm(n,t,o,e)}))},zoom:function(t){w.prepare((function(o){!function(t,o){var e="resize.joms-photozoom";t.items[0]={type:"inline",src:Cm(o)},Xr=t.container,Zr=$(window),setTimeout((function(){Xr.find(".joms-popup img").one("load",Im).each((function(){this.complete&&$(this).trigger("load")}))}),1),Zr.off(e).on(e,Im),t.updateItemHTML(),t.st.callbacks||(t.st.callbacks={}),t.st.callbacks.close=function(){Zr.off(e)}}(o,t)}))},setAlbum:function(t){w.prepare((function(o){var e,n;e=o,n=t,Om&&Om.off(),Mm=e,Lm=n,"[object Array]"!==Object.prototype.toString.call(Lm)&&(Lm=[Lm]),joms.ajax({func:"photos,ajaxSetPhotoAlbum",data:[Lm.join(",")],callback:function(t){Mm.items[0]={type:"inline",src:$m(t)},Mm.updateItemHTML(),(Om=Mm.contentContainer).on("click",".joms-js--button-cancel",Sm),Om.on("click",".joms-js--button-save",Um)}})}))}};var Nm,Am,Rm;function Ym(){Am.off(),Nm.close()}function Bm(){var t,o,e=Am.find("[name=body]").val(),n=Am.find(".joms-textarea__attachment"),s={};e=e.replace(/\t/g,"\\t").replace(/\n/g,"\\n").replace(/&quot;/g,'"'),Am.data("saving")||(Am.data("saving",1),n.is(":visible")&&(o=(t=n.find(".joms-textarea__attachment--thumbnail img")).siblings("b"),t.is(":visible")&&t.attr("src")?s={type:"image",id:t.data("photo_id")}:o.is(":visible")&&(s={type:"file",id:o.data("id")})),joms.ajax({func:"chat,ajaxPrivateMessageSend",data:[Rm,e,JSON.stringify(s)],callback:function(t){var o=Am.find("[data-ui-object=popup-step-1]"),e=Am.find("[data-ui-object=popup-step-2]");Am.removeData("saving"),e.find("[data-ui-object=popup-message]").html(t),o.hide(),e.show()}}))}function Pm(t){return t||(t={}),['<div class="joms-popup joms-popup--whiteblock joms-popup--500">','<div class="joms-popup__title"><button class="mfp-close" type="button" title="',window.joms_lang.COM_COMMUNITY_CLOSE_BUTTON_TITLE,'">×</button>',t.title,"</div>",'<div data-ui-object="popup-step-1"',t.error?' class="joms-popup__hide"':"",">",t.html||"",'<div class="joms-popup__action">','<a href="javascript:" class="joms-button--neutral joms-button--small joms-left" data-ui-object="popup-button-cancel">',t.btnCancel,"</a> &nbsp;",'<button class="joms-button--primary joms-button--small" data-ui-object="popup-button-save">',t.btnSend,"</button>","</div>","</div>",'<div data-ui-object="popup-step-2"',t.error?"":' class="joms-popup__hide"',">",'<div class="joms-popup__content joms-popup__content--single" data-ui-object="popup-message">',t.error||"","</div>","</div>","</div>"].join("")}const Hm={send:function(t){w.prepare((function(o){var e,n;e=o,n=t,Am&&Am.off(),Nm=e,Rm=n,joms.ajax({func:"inbox,ajaxCompose",data:[Rm],callback:function(t){Nm.items[0]={type:"inline",src:Pm(t)},Nm.updateItemHTML(),(Am=Nm.contentContainer).find("textarea.joms-textarea").jomsTagging(),Am.on("click","[data-ui-object=popup-button-cancel]",Ym),Am.on("click","[data-ui-object=popup-button-save]",Bm)}})}))}};var Fm,Dm,qm;function Vm(t,o){var e,n,s,a,i,c;for(Dm&&Dm.off(),Fm=t,e=(qm=o||{}).json||{},n=(qm.keys||"").split(","),a=[],c=0;c<n.length;c++)i="date"===e["fieldType"+(s=n[c])]||"birthdate"===e["fieldType"+s]||"between"===e["condition"+s]?e["value"+s]+","+e["value"+s+"_2"]:e["value"+s],a[c]=["field="+e["field"+s]+",condition="+e["condition"+s]+",fieldType="+e["fieldType"+s]+",value="+i];joms.ajax({func:"memberlist,ajaxShowSaveForm",data:[qm.operator,qm.avatar_only?1:0].concat(a),callback:function(t){Fm.items[0]={type:"inline",src:Wm(t)},Fm.updateItemHTML(),(Dm=Fm.contentContainer).on("click",".joms-js--button-cancel",zm),Dm.on("click",".joms-js--button-save",Gm)}})}function zm(){Dm.off(),Fm.close()}function Gm(){var t=Dm.find("[name=title]"),o=Dm.find("[name=description]"),e=!1;$.trim(t.val())?t.siblings(".joms-help").hide():(t.siblings(".joms-help").show(),e=!0),$.trim(o.val())?o.siblings(".joms-help").hide():(o.siblings(".joms-help").show(),e=!0),e||Dm.find("form").submit()}function Wm(t){return t||(t={}),['<div class="joms-popup joms-popup--whiteblock">','<div class="joms-popup__title"><button class="mfp-close" type="button" title="',window.joms_lang.COM_COMMUNITY_CLOSE_BUTTON_TITLE,'">×</button>',t.title,"</div>",'<div class="joms-js--step1',t.error?" joms-popup__hide":"",'">','<div class="joms-popup__content">',t.html,"</div>",'<div class="joms-popup__action">','<button class="joms-button--neutral joms-button--small joms-left joms-js--button-cancel">',t.btnCancel,"</button> &nbsp;",'<button class="joms-button--primary joms-button--small joms-js--button-save">',t.btnSave,"</button>","</div>","</div>",'<div class="joms-js--step2',t.error?"":" joms-popup__hide",'">','<div class="joms-popup__content joms-popup__content--single">',t.error||"","</div>","</div>","</div>"].join("")}const Qm={save:function(t){w.prepare((function(o){Vm(o,t)}))}};var Jm,Km,Xm,Zm,tu,ou,eu,nu,su,au,iu,cu,lu,pu,ru,mu,uu,du,ju,fu,vu,bu,_u,hu,gu,wu,yu,ku,Tu;function xu(t){return t||(t={}),['<div class="joms-popup joms-popup--whiteblock">','<div class="joms-popup__title"><button class="mfp-close" type="button" title="',window.joms_lang.COM_COMMUNITY_CLOSE_BUTTON_TITLE,'">×</button>',t.title,"</div>",'<div class="joms-popup__content joms-popup__content--single" style="max-height:400px;overflow:auto;">',t.html||"&nbsp;","</div>","</div>"].join("")}function Cu(){joms.util.popup.prepare((function(t){Jm=t,joms.ajax({func:"register,ajaxShowTnc",data:[0],callback:function(t){Jm.items[0]={type:"inline",src:xu(t)},Jm.updateItemHTML()}})}))}function Mu(){Xm.off(),Km.close()}function Ou(){Xm.find("form").submit()}function Lu(t){var o="";return t||(t={}),t.btnUpdate&&t.btnCancel&&(o=['<div class="joms-popup__action">','<a href="javascript:" class="joms-button--neutral joms-button--small joms-left" data-ui-object="popup-button-cancel">',t.btnCancel,"</a> &nbsp;",'<button class="joms-button--primary joms-button--small" data-ui-object="popup-button-save">',t.btnUpdate,"</button>","</div>"].join("")),['<div class="joms-popup joms-popup--whiteblock">','<div class="joms-popup__title"><button class="mfp-close" type="button" title="',window.joms_lang.COM_COMMUNITY_CLOSE_BUTTON_TITLE,'">×</button>',t.title,"</div>",'<div class="joms-popup__content">',t.html||t.message,"</div>",o,"</div>"].join("")}function Iu(t){return t||(t={}),['<div class="joms-popup joms-popup--whiteblock">','<div class="joms-popup__title"><button class="mfp-close" type="button" title="',window.joms_lang.COM_COMMUNITY_CLOSE_BUTTON_TITLE,'">×</button>',t.title,"</div>",'<div class="joms-popup__content joms-popup__content--single">',t.html||"","</div>",'<div class="joms-popup__action">','<button class="joms-button--neutral joms-button--small joms-js--button-close">',window.joms_lang.COM_COMMUNITY_CLOSE_BUTTON,"</button>","</div>","</div>"].join("")}function Su(t){return t||(t={}),['<div class="joms-popup joms-popup--whiteblock">','<div class="joms-popup__title"><button class="mfp-close" type="button" title="',window.joms_lang.COM_COMMUNITY_CLOSE_BUTTON_TITLE,'">×</button>',t.title,"</div>",'<div class="joms-popup__content joms-popup__content--single">',t.html||"","</div>",'<div class="joms-popup__action">','<button class="joms-button--neutral joms-button--small joms-js--button-close">',window.joms_lang.COM_COMMUNITY_CLOSE_BUTTON,"</button>","</div>","</div>"].join("")}function Uu(){au.off(),su.close()}function $u(){au.find("form").submit()}function Eu(t){var o="";return t||(t={}),t.error||(o=['<div class="joms-popup__action">','<a href="javascript:" class="joms-button--neutral joms-button--small joms-left" data-ui-object="popup-button-cancel">',t.btnNo,"</a> &nbsp;",'<button class="joms-button--primary joms-button--small" data-ui-object="popup-button-save">',t.btnYes,"</button>","</div>"].join("")),['<div class="joms-popup joms-popup--whiteblock">','<div class="joms-popup__title"><button class="mfp-close" type="button" title="',window.joms_lang.COM_COMMUNITY_CLOSE_BUTTON_TITLE,'">×</button>',t.title,"</div>",'<div class="joms-popup__content',t.error?" joms-popup__content--single":"",'">',t.html||t.error,"</div>",o,"</div>"].join("")}function Nu(){lu.off(),cu.close()}function Au(){lu.find("form").submit()}function Ru(t){var o="";return t||(t={}),t.error||(o=['<div class="joms-popup__action">','<a href="javascript:" class="joms-button--neutral joms-button--small joms-left" data-ui-object="popup-button-cancel">',t.btnNo,"</a> &nbsp;",'<button class="joms-button--primary joms-button--small" data-ui-object="popup-button-save">',t.btnYes,"</button>","</div>"].join("")),['<div class="joms-popup joms-popup--whiteblock">','<div class="joms-popup__title"><button class="mfp-close" type="button" title="',window.joms_lang.COM_COMMUNITY_CLOSE_BUTTON_TITLE,'">×</button>',t.title,"</div>",'<div class="joms-popup__content',t.error?" joms-popup__content--single":"",'">',t.html||t.error,"</div>",o,"</div>"].join("")}function Yu(){mu.off(),ru.close()}function Bu(){joms.ajax({func:"profile,ajaxBlockUser",data:[uu],callback:function(t){if(!t.success)return mu.find(".joms-popup__action").hide(),void mu.find(".joms-popup__content").html(t.error);ru.close(),window.location.reload()}})}function Pu(t){var o;return t||(t={}),o=t.error?['<div class="joms-popup__action">','<button class="joms-button--neutral joms-button--small joms-js--button-cancel">',t.btnClose,"</button>","</div>"].join(""):['<div class="joms-popup__action">','<a href="javascript:" class="joms-button--neutral joms-button--small joms-left joms-js--button-cancel">',t.btnNo,"</a> &nbsp;",'<button class="joms-button--primary joms-button--small joms-js--button-save">',t.btnYes,"</button>","</div>"].join(""),['<div class="joms-popup joms-popup--whiteblock">','<div class="joms-popup__title"><button class="mfp-close" type="button" title="',window.joms_lang.COM_COMMUNITY_CLOSE_BUTTON_TITLE,'">×</button>',t.title,"</div>",'<div class="joms-popup__content">',t.error||t.html||t.message,"</div>",o,"</div>"].join("")}function Hu(){ju.off(),du.close()}function Fu(){joms.ajax({func:"profile,ajaxUnblockUser",data:[fu],callback:function(t){if(!t.success)return ju.find(".joms-popup__action").hide(),void ju.find(".joms-popup__content").html(t.error);du.close(),window.location.reload()}})}function Du(t){return t||(t={}),['<div class="joms-popup joms-popup--whiteblock">','<div class="joms-popup__title"><button class="mfp-close" type="button" title="',window.joms_lang.COM_COMMUNITY_CLOSE_BUTTON_TITLE,'">×</button>',t.title,"</div>",'<div class="joms-popup__content">',t.html||t.message,"</div>",'<div class="joms-popup__action">','<a href="javascript:" class="joms-button--neutral joms-button--small joms-left" data-ui-object="popup-button-cancel">',t.btnNo,"</a> &nbsp;",'<button class="joms-button--primary joms-button--small" data-ui-object="popup-button-save">',t.btnYes,"</button>","</div>","</div>"].join("")}function qu(){bu.off(),vu.close()}function Vu(){joms.ajax({func:"profile,ajaxIgnoreUser",data:[_u],callback:function(t){if(!t.success)return bu.find(".joms-popup__action").hide(),void bu.find(".joms-popup__content").html(t.error);vu.close(),window.location.reload()}})}function zu(t){return t||(t={}),['<div class="joms-popup joms-popup--whiteblock">','<div class="joms-popup__title"><button class="mfp-close" type="button" title="',window.joms_lang.COM_COMMUNITY_CLOSE_BUTTON_TITLE,'">×</button>',t.title,"</div>",'<div class="joms-popup__content">',t.html||t.message,"</div>",'<div class="joms-popup__action">','<a href="javascript:" class="joms-button--neutral joms-button--small joms-left" data-ui-object="popup-button-cancel">',t.btnNo,"</a> &nbsp;",'<button class="joms-button--primary joms-button--small" data-ui-object="popup-button-save">',t.btnYes,"</button>","</div>","</div>"].join("")}function Gu(t){gu.find("textarea").val(t.target.value)}function Wu(){gu.off(),hu.close()}function Qu(){var t;(t=(t=gu.find("textarea").val()).replace(/^\s+|\s+$/g,""))?(gu.find(".joms-js--error").hide(),joms.ajax({func:"system,ajaxSendReport",data:["profile,reportProfile",window.location.href,t,wu],callback:function(t){gu.find(".joms-js--step1").hide(),gu.find(".joms-js--step2").show().children().html(t.error||t.message)}})):gu.find(".joms-js--error").show()}function Ju(t){return t||(t={}),['<div class="joms-popup joms-popup--whiteblock joms-popup--500">','<div class="joms-popup__title"><button class="mfp-close" type="button" title="',window.joms_lang.COM_COMMUNITY_CLOSE_BUTTON_TITLE,'">×</button>',t.title,"</div>",'<div class="joms-js--step1',t.error?" joms-popup__hide":"",'">',t.html,'<div class="joms-popup__action">','<button class="joms-button--neutral joms-button--small joms-left joms-js--button-cancel">',t.btnCancel,"</button> &nbsp;",'<button class="joms-button--primary joms-button--small joms-js--button-save">',t.btnSend,"</button>","</div>","</div>",'<div class="joms-js--step2',t.error?"":" joms-popup__hide",'">','<div class="joms-popup__content joms-popup__content--single">',t.error||"","</div>","</div>","</div>"].join("")}function Ku(){ku.off(),yu.close()}function Xu(){joms.ajax({func:"profile,ajaxUnIgnoreUser",data:[Tu],callback:function(t){if(!t.success)return ku.find(".joms-popup__action").hide(),void ku.find(".joms-popup__content").html(t.error);yu.close(),window.location.reload()}})}function Zu(t){return t||(t={}),['<div class="joms-popup joms-popup--whiteblock">','<div class="joms-popup__title"><button class="mfp-close" type="button" title="',window.joms_lang.COM_COMMUNITY_CLOSE_BUTTON_TITLE,'">×</button>',t.title,"</div>",'<div class="joms-popup__content">',t.html||t.message,"</div>",'<div class="joms-popup__action">','<a href="javascript:" class="joms-button--neutral joms-button--small joms-left" data-ui-object="popup-button-cancel">',t.btnNo,"</a> &nbsp;",'<button class="joms-button--primary joms-button--small" data-ui-object="popup-button-save">',t.btnYes,"</button>","</div>","</div>"].join("")}const td={changeVanityURL:function(t){w.prepare((function(o){var e,n;e=o,n=t,Xm&&Xm.off(),Km=e,Zm=n,joms.ajax({func:"profile,ajaxUpdateURL",data:[Zm],callback:function(t){Km.items[0]={type:"inline",src:Lu(t)},Km.updateItemHTML(),(Xm=Km.contentContainer).on("click","[data-ui-object=popup-button-cancel]",Mu),Xm.on("click","[data-ui-object=popup-button-save]",Ou)}})}))},addFeatured:function(t){w.prepare((function(o){tu=o,ou=t,joms.ajax({func:"search,ajaxAddFeatured",data:[ou],callback:function(t){tu.items[0]={type:"inline",src:Iu(t)},tu.st.callbacks||(tu.st.callbacks={}),tu.st.callbacks.close=function(){window.location.reload()},tu.updateItemHTML()}})}))},removeFeatured:function(t){w.prepare((function(o){eu=o,nu=t,joms.ajax({func:"search,ajaxRemoveFeatured",data:[nu],callback:function(t){eu.items[0]={type:"inline",src:Su(t)},eu.st.callbacks||(eu.st.callbacks={}),eu.st.callbacks.close=function(){window.location.reload()},eu.updateItemHTML()}})}))},ban:function(t){w.prepare((function(o){var e,n;e=o,n=t,au&&au.off(),su=e,iu=n,joms.ajax({func:"profile,ajaxBanUser",data:[iu,0],callback:function(t){su.items[0]={type:"inline",src:Eu(t)},su.updateItemHTML(),(au=su.contentContainer).on("click","[data-ui-object=popup-button-cancel]",Uu),au.on("click","[data-ui-object=popup-button-save]",$u)}})}))},unban:function(t){w.prepare((function(o){var e,n;e=o,n=t,lu&&lu.off(),cu=e,pu=n,joms.ajax({func:"profile,ajaxBanUser",data:[pu,1],callback:function(t){cu.items[0]={type:"inline",src:Ru(t)},cu.updateItemHTML(),(lu=cu.contentContainer).on("click","[data-ui-object=popup-button-cancel]",Nu),lu.on("click","[data-ui-object=popup-button-save]",Au)}})}))},block:function(t){w.prepare((function(o){var e,n;e=o,n=t,mu&&mu.off(),ru=e,uu=n,joms.ajax({func:"profile,ajaxConfirmBlockUser",data:[uu],callback:function(t){ru.items[0]={type:"inline",src:Pu(t)},ru.updateItemHTML(),(mu=ru.contentContainer).on("click",".joms-js--button-cancel",Yu),mu.on("click",".joms-js--button-save",Bu)}})}))},unblock:function(t){w.prepare((function(o){var e,n;e=o,n=t,ju&&ju.off(),du=e,fu=n,joms.ajax({func:"profile,ajaxConfirmUnBlockUser",data:[fu],callback:function(t){du.items[0]={type:"inline",src:Du(t)},du.updateItemHTML(),(ju=du.contentContainer).on("click","[data-ui-object=popup-button-cancel]",Hu),ju.on("click","[data-ui-object=popup-button-save]",Fu)}})}))},ignore:function(t){w.prepare((function(o){var e,n;e=o,n=t,bu&&bu.off(),vu=e,_u=n,joms.ajax({func:"profile,ajaxConfirmIgnoreUser",data:[_u],callback:function(t){vu.items[0]={type:"inline",src:zu(t)},vu.updateItemHTML(),(bu=vu.contentContainer).on("click","[data-ui-object=popup-button-cancel]",qu),bu.on("click","[data-ui-object=popup-button-save]",Vu)}})}))},report:function(t){w.prepare((function(o){var e,n;e=o,n=t,gu&&gu.off(),hu=e,wu=n,joms.ajax({func:"system,ajaxReport",data:[],callback:function(t){hu.items[0]={type:"inline",src:Ju(t)},hu.updateItemHTML(),(gu=hu.contentContainer).on("change","select",Gu),gu.on("click",".joms-js--button-cancel",Wu),gu.on("click",".joms-js--button-save",Qu)}})}))},unignore:function(t){w.prepare((function(o){var e,n;e=o,n=t,ku&&ku.off(),yu=e,Tu=n,joms.ajax({func:"profile,ajaxConfirmUnIgnoreUser",data:[Tu],callback:function(t){yu.items[0]={type:"inline",src:Zu(t)},yu.updateItemHTML(),(ku=yu.contentContainer).on("click","[data-ui-object=popup-button-cancel]",Ku),ku.on("click","[data-ui-object=popup-button-save]",Xu)}})}))}};var od,ed,nd,sd,ad,id,cd,ld=void 0;function pd(t){var o,e,n,s;sd||(sd=window.joms_friends||[]),o=$(t?t.currentTarget:ed.find("input")),e=o.val().replace(/^\s+|\s+$/g,"").toLowerCase(),n=sd,n=(n=joms._.filter(sd,(function(t){return!(!t||!t.name||id&&id.indexOf(t.id+"")>=0||e&&t.name.toLowerCase().indexOf(e)<0)}))).slice(0,8),(n=joms._.map(n,(function(t){return'<a href="javascript:" data-id="'+t.id+'">'+t.name+"</a>"}))).length?cd=!1:(n=["<span><em>"+window.joms_lang.COM_COMMUNITY_NO_RESULT_FOUND+"</em></span>"],cd=!0),(s=ed.find(".joms-phototag__autocomplete")).html(n.join("")),s.append('<div><button class="joms-button--neutral joms-button--small joms-button--full">'+window.joms_lang.COM_COMMUNITY_PHOTO_DONE_TAGGING+"</button></div>"),s.show()}function rd(t){var o,e=ed.find(".joms-phototag__autocomplete"),n=$(t.currentTarget).data("id")||"";t.stopPropagation(),e.hide(),ad&&ad.tagAdded&&(id||(id=[]),id.push(n+""),o=function(){var t,o,e,n,s,a,i;return o=od.width(),e=od.height(),t=ed.position(),n=ed.width(),s=ed.height(),a=t.left+n/2,i=t.top+s/2,{top:i/=e,left:a/=o,width:n/=e,height:s/=e}}(),ad.tagAdded(n,o.left,o.top,o.width,o.height),pd())}function md(){ed&&(ed.remove(),od.remove(),$(window).off("resize.phototag"),ed=ld,nd=ld,ad&&ad.destroy&&ad.destroy(),ad=ld)}function ud(){var t=nd.height(),o=nd.width();return{top:Math.max(0,t-86)/4.5,left:Math.max(0,o-86)/2}}function dd(t){var o;cd?md():(o=ud(),ed.css({top:o.top,left:o.left}))}const jd={create:function(t,o,e,n){var s,a,i,c,l;if(md(),od=$(["<div class=joms-phototag__wrapper>","<div class=joms-phototag>","<div class=joms-phototag__input>",'<input type=text placeholder="',window.joms_lang.COM_COMMUNITY_SEARCH,'">','<div class="joms-phototag__autocomplete"></div>',"</div>","</div>","</div>"].join("")),ed=od.find(".joms-phototag"),nd=t&&t.currentTarget?$(t.currentTarget).closest(".joms-popup--video").find("iframe,video,.joms-js--video").eq(0):$(t),sd=ld,ad={},c=nd.width(),l=nd.height(),a=(s=nd.position()).top,i=s.left,id=o||[],ed.css({top:0,left:0}),od.css({top:a,left:i,width:c,height:l}),od.insertBefore(nd),s=ud(),ed.css({top:s.top,left:s.left}),ed.on("keyup","input",pd),ed.on("click","a[data-id]",rd),ed.on("click","button",md),ed.on("click",(function(t){t.stopPropagation()})),od.on("click",dd),+e?joms.fn.tagging.fetchGroupMembers(e,(function(t){sd=t,pd()})):+n?joms.fn.tagging.fetchEventMembers(n,(function(t){sd=t,pd()})):pd(),joms.ios)try{window.scrollTo(window.scrollLeft,ed.find("input").offset().top-100)}catch(t){}joms.mobile||$(window).on("resize.phototag",md)},destroy:md,on:function(t,o){ad[t]=o},off:function(t){t?ad[t]&&(ad[t]=ld):ad={}}};function fd(t){return fd="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},fd(t)}var vd,bd,_d,hd,gd,wd,yd,kd,Td,xd,Cd,Md,Od,Ld,Id,Sd,Ud,$d,Ed,Nd,Ad,Rd='<svg viewBox="0 0 16 16" class="joms-icon"><use xlink:href="#joms-icon-cog"></use></svg>',Yd='<svg viewBox="0 0 16 16" class="joms-icon"><use xlink:href="#joms-icon-bubble"></use></svg>',Bd='<svg viewBox="0 0 16 16" class="joms-icon"><use xlink:href="#joms-icon-thumbs-up"></use></svg>',Pd='<svg viewBox="0 0 16 16" class="joms-icon"><use xlink:href="#joms-icon-tag"></use></svg>',Hd=!!joms.getData("joms_reaction");function Fd(t){return t.replace(/<\/?[^>]+>/g,"")}function Dd(t){var o;return t||(t={}),o=t.error||t.playerHtml||"",['<div class="joms-popup joms-popup--video'+(Hd?" joms-reaction--on":"")+'">','<div class="joms-popup__commentwrapper">','<div class="joms-popup__content">','<div class="joms-popup__video">',o,"</div>",'<div class="joms-popup__option clearfix">','<div class="joms-popup__optcaption">',' &nbsp;<svg viewBox="0 0 16 16" class="joms-icon"><use xlink:href="#joms-icon-eye"></use></svg> ',t.hits,"</div>",'<div class="joms-popup__optoption">','<button class="joms-popup__btn-comments">',Yd,' <span class="joms-popup__btn-overlay">',kd.comments,"</span></button>",qd(t.like),Td?'<button class="joms-popup__btn-tag-video">'+Pd+' <span class="joms-popup__btn-overlay">'+kd.tag_video+"</span></button>":"",'<div class="joms-popup__dropdown--wrapper">',Zd(t),'<button class="joms-popup__btn-option">',Rd,' <span class="joms-popup__btn-overlay">',kd.options,"</span></button></div>","</div>","</div>","</div>",'<div class="joms-popup__comment"></div>','<button class="mfp-close" type="button" title="',window.joms_lang.COM_COMMUNITY_CLOSE_BUTTON_TITLE,'">×</button>',"</div>","</div>"].join("")}function qd(t){var o,e;return o="",t&&!Hd&&(o+='<button class="joms-popup__btn-like joms-js--like-videos-'+yd+(t.is_liked?" liked":"")+'"',o+=' onclick="joms.api.page'+(t.is_liked?"Unlike":"Like")+"('videos', '"+yd+"');\"",o+=' data-lang="'+(t.lang||"Like")+'"',o+=' data-lang-like="'+(t.lang_like||"Like")+'"',o+=' data-lang-liked="'+(t.lang_liked||"Liked")+'">',o+=Bd+" ",o+="<span>",o+=t.is_liked?t.lang_liked:t.lang_like,(e=+t.count)>0&&(o+=" ("+e+")"),o+="</span></button>"),o}function Vd(t){_d.data("tagging")?(_d.removeData("tagging"),_d.html(Pd+' <span class="joms-popup__btn-overlay">'+kd.tag_video+"</span>"),jd.destroy()):(_d.data("tagging",1),_d.html(Pd+" "+kd.done_tagging),function(t){var o=joms._.map(hd,(function(t){return t.userId+""}));jd.create(t,o,Od,Ld),jd.on("tagAdded",zd),jd.on("destroy",(function(){_d.removeData("tagging"),_d.html(Pd+' <span class="joms-popup__btn-overlay">'+kd.tag_video+"</span>")}))}(t))}function zd(t){joms.ajax({func:"videos,ajaxAddVideoTag",data:[yd,t],callback:function(t){t.error?window.alert(Fd(t.error)):t.success&&(hd.push(t.data),bd.find(".joms-popup__comment").find(".joms-js--tag-info").html(Wd()))}})}function Gd(t){var o=$(t.currentTarget).data("id");joms.ajax({func:"videos,ajaxRemoveVideoTag",data:[yd,o],callback:function(t){var e;if(t.error)window.alert(Fd(t.error));else if(t.success){for(e=0;e<hd.length;e++)+o==+hd[e].userId&&hd.splice(e--,1);bd.find(".joms-popup__comment").find(".joms-js--tag-info").html(Wd())}}})}function Wd(){var t,o,e,n;if(!hd||!hd.length)return"";for(t=[],n=0;n<hd.length;n++)e='<a href="'+(o=hd[n]).profileUrl+'">'+o.displayName+"</a>",o.canRemove&&(e+=' (<a href="javascript:" class="joms-js--remove-tag" data-id="'+o.userId+'">'+wd+"</a>)"),t.push(e);return t=t.join(", "),gd+"<br>"+t}function Qd(){bd.children(".joms-popup").toggleClass("joms-popup--togglecomment")}function Jd(){var t=bd.children(".joms-popup"),o="joms-popup--togglecomment";t.hasClass(o)?t.removeClass(o):$.magnificPopup.proto.close.call(this)}function Kd(t){$(t.target).closest(".joms-popup__dropdown--wrapper").children(".joms-popup__dropdown").toggleClass("joms-popup__dropdown--open")}function Xd(t){$(t.target).closest(".joms-popup__dropdown--wrapper").children(".joms-popup__dropdown").removeClass("joms-popup__dropdown--open")}function Zd(t){var o="";return t||(t={}),Nd&&(o+='<a href="javascript:" class="joms-popup__btn-share">'+kd.share+"</a>",o+='<div class="sep"></div>'),Sd||Ud?(o+='<a href="javascript:" class="joms-popup__btn-fetch">'+kd.fetch+"</a>",o+=Sd&&$d?'<a href="javascript:" class="joms-popup__btn-profile">'+kd.set_as_profile_video+"</a>":"",Ud&&Ad&&("add"===Ad?o+='<a href="javascript:" class="joms-popup__btn-feature" data-featured="0">'+kd.make_feature+"</a>":"remove"===Ad&&(o+='<a href="javascript:" class="joms-popup__btn-feature" data-featured="1">'+kd.remove_featured+"</a>")),o+='<div class="sep"></div>',o+=Td?'<a href="javascript:" class="joms-popup__btn-edit">'+kd.edit_video+"</a>":"",o+=xd?'<a href="javascript:" class="joms-popup__btn-delete">'+kd.delete_video+"</a>":""):(o+=Td?'<a href="javascript:" class="joms-popup__btn-edit">'+kd.edit_video+"</a>":"",o+=xd?'<a href="javascript:" class="joms-popup__btn-delete">'+kd.delete_video+"</a>":"",o+=Ed?'<a href="javascript:" class="joms-popup__btn-report">'+kd.report+"</a>":""),'<div class="joms-popup__dropdown"><div class="joms-popup__ddcontent">'+o+"</div></div>"}function tj(){joms.api.pageShare(Cd)}function oj(){joms.api.videoReport(Md,Cd)}function ej(){joms.api.videoFetchThumbnail(yd)}function nj(){joms.ajax({func:"profile,ajaxConfirmLinkProfileVideo",data:[yd],callback:function(t){t.error?window.alert(Fd(t.error)):window.confirm(Fd(t.html))&&joms.ajax({func:"profile,ajaxLinkProfileVideo",data:[yd],callback:function(t){t.error?window.alert(Fd(t.error)):(window.alert(Fd(t.message)),setTimeout((function(){window.location.reload()}),500))}})}})}function sj(t){+$(t.currentTarget).data("featured")?joms.api.videoRemoveFeatured(yd):joms.api.videoAddFeatured(yd)}function aj(){joms.api.videoEdit(yd)}function ij(){joms.ajax({func:"videos,ajaxConfirmRemoveVideo",data:[yd],callback:function(t){t.error?window.alert(Fd(t.error)):window.confirm(Fd(t.html))&&joms.ajax({func:"videos,ajaxRemoveVideo",data:[yd],callback:function(t){t.error?window.alert(Fd(t.error)):(window.alert(Fd(t.message)),setTimeout((function(){window.location.reload()}),500))}})}})}function cj(){var t=bd.find(".joms-js--btn-desc-excerpt"),o=bd.find(".joms-js--btn-desc-fulltext"),e=bd.find(".joms-js--btn-desc-toggle");o.is(":visible")?(o.hide(),t.show(),e.html(window.joms_lang.COM_COMMUNITY_SHOW_MORE)):(t.hide(),o.show(),e.html(window.joms_lang.COM_COMMUNITY_SHOW_LESS))}function lj(){bd.find(".joms-js--btn-desc-content").hide(),bd.find(".joms-js--btn-desc-edit").hide(),bd.find(".joms-js--btn-desc-editor").show()}function pj(){bd.find(".joms-js--btn-desc-editor").hide(),bd.find(".joms-js--btn-desc-content").show(),bd.find(".joms-js--btn-desc-edit").show()}function rj(){var t=bd.find(".joms-js--btn-desc-content"),o=bd.find(".joms-js--btn-desc-editor"),e=bd.find(".joms-js--btn-desc-edit"),n=o.find("textarea"),s=$.trim(n.val());joms.ajax({func:"videos,ajaxSaveDescription",data:[yd,s],callback:function(n){var a,i,c,l=e.find("a");n.error?window.alert(n.error):n.success&&(a=t.find(".joms-js--btn-desc-excerpt"),i=t.find(".joms-js--btn-desc-fulltext"),c=t.find(".joms-js--btn-desc-toggle"),n.caption&&n.caption!==n.excerpt?(a.html(n.excerpt).show(),c.html(window.joms_lang.COM_COMMUNITY_SHOW_MORE).show(),i.html(n.caption).hide()):(a.hide(),c.hide(),i.html(n.caption).show()),o.hide(),t.show(),l.html(l.data("lang-"+(s?"edit":"add"))),e.show())}})}const mj=joms._.debounce((function(t){w.prepare((function(o){var e,n;e=o,n=t,bd&&bd.off(),vd=e,yd=n,joms.ajax({func:"videos,ajaxShowVideoWindow",data:[yd],callback:function(t){t||(t={}),kd=t.lang||{},Td=t.can_edit||!1,xd=t.can_delete||!1,Cd=t.video_url,Id=Md=+t.my_id,Od=+t.groupid,Ld=+t.eventid,Sd=Id&&+t.my_id==+t.owner_id,Ud=+t.is_admin,$d=+t.enableprofilevideo,Ed=+t.enablereporting,Nd=+t.enablesharing,Ad=t.enablefeature,vd.items[0]={type:"inline",src:Dd(t)},vd.updateItemHTML(),vd.close=Jd,function(){var t=".joms-js--video",o=$(".joms-popup__content").find(t);o.length&&(joms.loadCSS(joms.ASSETS_URL+"vendors/mediaelement/mediaelementplayer.min.css"),o.on("click.joms-video",t+"-play",(function(){var o=$(this).closest(t);joms.util.video.play(o,o.data())})))}(),bd=vd.contentContainer,_d=bd.find(".joms-popup__btn-tag-video"),bd.on("click",".joms-popup__btn-tag-video",Vd),bd.on("click",".joms-popup__btn-comments",Qd),bd.on("click",".joms-popup__btn-option",Kd),bd.on("click",".joms-popup__btn-share",tj),bd.on("click",".joms-popup__btn-report",oj),bd.on("click",".joms-popup__btn-fetch",ej),bd.on("click",".joms-popup__btn-profile",nj),bd.on("click",".joms-popup__btn-feature",sj),bd.on("click",".joms-popup__btn-edit",aj),bd.on("click",".joms-popup__btn-delete",ij),bd.on("mouseleave",".joms-popup__dropdown--wrapper",Xd),bd.on("click",".joms-js--remove-tag",Gd),bd.on("click",".joms-js--btn-desc-toggle",cj),bd.on("click",".joms-js--btn-desc-edit",lj),bd.on("click",".joms-js--btn-desc-cancel",pj),bd.on("click",".joms-js--btn-desc-save",rj),function(t,o){var e=bd.find(".joms-popup__comment");e.empty(),joms.ajax({func:"videos,ajaxGetInfo",data:[t,0],callback:function(t){var o,n,s;t.comments&&t.showall&&(t.showall='<div class="joms-comment__more joms-js--more-comments"><a href="javascript:">'+t.showall+"</a></div>",t.comments=$(t.comments),t.comments.prepend(t.showall)),e.html(t.head||""),e.append(t.comments),e.append(t.form||""),e.find(".joms-js--description").html(function(t){var o,e;return"object"!==fd(t)&&(t={}),t.content&&t.excerpt!==t.rawcontent&&(o=!0),['<div class="joms-js--btn-desc-content">','<span class="joms-js--btn-desc-excerpt"',o?"":' style="display:none"',">",t.excerpt||"","</span>",'<span class="joms-js--btn-desc-fulltext"',o?' style="display:none"':"",">",t.content||"","</span>",'<div><a href="javascript:" class="joms-js--btn-desc-toggle"',o?"":' style="display:none"',">",window.joms_lang.COM_COMMUNITY_SHOW_MORE,"</a></div>","</div>",'<div class="joms-js--btn-desc-editor joms-popup__hide">','<textarea class="joms-textarea" style="margin:0" placeholder="',t.lang_placeholder||"",'">',(e=t.content||"",e=(e=e||"").replace(/<br\s*\/?>/g,"\n")),"</textarea>",'<div style="margin-top:5px;text-align:right">','<button class="joms-button--neutral joms-button--small joms-js--btn-desc-cancel">',t.lang_cancel||"Cancel","</button> ",'<button class="joms-button--primary joms-button--small joms-js--btn-desc-save">',t.lang_save||"Save","</button>","</div>","</div>",'<div class="joms-js--btn-desc-edit"',Td?"":' style="display:none"','><a href="javascript:"',' data-lang-add="',t.lang_add||"Add description",'"',' data-lang-edit="',t.lang_edit||"Edit description",'">',t.content?t.lang_edit:t.lang_add,"</a>","</div>"].join("")}(t.description||{})),hd=t.tagged||[],gd=t.tagLabel||"",wd=t.tagRemoveLabel||"",e.find(".joms-js--tag-info").html(Wd()),e.find("textarea.joms-textarea"),joms.fn.tagging.initInputbox(),o=".joms-js--initialized",n=".joms-js--video",(s=$(".joms-comment__body,.joms-js--inbox").find(n).not(o).addClass(o.substr(1))).length&&(joms.loadCSS(joms.ASSETS_URL+"vendors/mediaelement/mediaelementplayer.min.css"),s.on("click.joms-video",n+"-play",(function(){var t=$(this).closest(n);joms.util.video.play(t,t.data())})),joms.ios&&setTimeout((function(){s.find(n+"-play").click()}),2e3)),joms.parseEmoji()}})}(yd)}})}))}),200);var uj,dj,jj,fj,vj,bj,_j,hj,gj,wj,yj,kj,Tj,xj,Cj,Mj,Oj,Lj,Ij,Sj,Uj,$j,Ej,Nj,Aj,Rj,Yj,Bj,Pj;function Hj(t){t.preventDefault();var o=$(t.currentTarget),e=o.find("[name=videoLinkUrl]"),n=o.find("[name=category_id]"),s=e.val().trim(/^\s+|\s+$/g,""),a=+n.val(),i=o.find("[type=submit]"),c=i.data("lang-linking")||"Linking***";e.siblings("[data-elem=form-warning]")[s?"hide":"show"](),n.parents(".joms-select--wrapper").siblings("[data-elem=form-warning]")[a?"hide":"show"](),s&&a&&(o.removeAttr("onsubmit"),i.val(c),i.prop("disabled",!0),dj.off("submit",".joms-js--form-link"),setTimeout((function(){o.submit()}),300))}function Fj(){Dj((function(){fj.click()}))}function Dj(t){"function"!=typeof t&&(t=function(){}),jj?t():Et("plupload",(function(){var o;o=$('<div id="joms-js--videoupload-uploader" aria-hidden="true" style="width:1px; height:1px; overflow:hidden">').appendTo(document.body),$('<button id="joms-js--videoupload-uploader-button">').appendTo(o),(jj=new window.plupload.Uploader({url:"index.php?option=com_community&view=videos&task=uploadvideo",filters:[{title:"Video files",extensions:"3g2,3gp,asf,asx,avi,flv,mov,mp4,mpg,rm,swf,vob,wmv,m4v"}],container:"joms-js--videoupload-uploader",browse_button:"joms-js--videoupload-uploader-button",runtimes:"html5,html4",multi_selection:!1})).bind("FilesAdded",qj),jj.bind("BeforeUpload",zj),jj.bind("Error",Gj),jj.bind("UploadProgress",Wj),jj.bind("FileUploaded",Qj),jj.bind("uploadComplete",Jj),jj.init(),fj=o.find("input[type=file]"),t()}))}function qj(t,o){if(o&&o.length){for(var e=dj.find(".joms-js--select-file"),n=o[0],s="<span>"+n.name+"</span>",a=n.size||0,i="Bytes",c=["KB","MB","GB"];a>=1e3&&c.length;)i=c.shift(),a=Math.ceil(a/1e3);a&&(s+=" <span>("+a+" "+i+")</span>"),e.html(s)}}function Vj(t){t.preventDefault();var o=$(t.currentTarget),e=o.find("[name=title]"),n=o.find("[name=category_id]"),s=e.val().trim(/^\s+|\s+$/g,""),a=+n.val();if(e.siblings("[data-elem=form-warning]")[s?"hide":"show"](),n.siblings("[data-elem=form-warning]")[a?"hide":"show"](),!s||!a)return!1;o.find(".joms-progressbar__progress").css({width:0}),jj.refresh(),jj.start()}function zj(){var t,o=dj.find(".joms-js--form-upload").serializeArray(),e={};for(t=0;t<o.length;t++)e[o[t].name]=o[t].value;jj.settings.multipart_params=e}function Gj(t,o){var e="Undefined error.";o&&o.code&&o.message&&(e="("+o.code+") "+o.message),dj.find(".joms-js--select-file").html("&nbsp;"),jj.splice(),jj.refresh(),window.alert(e)}function Wj(t,o){var e;e=Math.min(100,Math.floor(o.loaded/o.size*100)),dj.find(".joms-js--form-upload").find(".joms-progressbar__progress").stop().animate({width:e+"%"})}function Qj(t,o,e){var n={};try{n=JSON.parse(e.response)}catch(t){}"success"===n.status?setTimeout((function(){window.alert(n.processing_str),uj.close()}),1e3):window.alert(n.message||"Undefined error.")}function Jj(){}function Kj(t){return t||(t={}),['<div class="joms-popup joms-popup--whiteblock joms-popup--videoupload">','<div class="joms-popup__title"><button class="mfp-close" type="button" title="',window.joms_lang.COM_COMMUNITY_CLOSE_BUTTON_TITLE,'">×</button>',t.title,"</div>",t.html?t.html:'<div class="joms-popup__content joms-popup__content--single">'+t.error+"</div>","</div>"].join("")}function Xj(){hj.off(),_j.close()}function Zj(){hj.find("form").submit()}function tf(t){return t||(t={}),['<div class="joms-popup joms-popup--whiteblock joms-popup--600">','<div class="joms-popup__title"><button class="mfp-close" type="button" title="',window.joms_lang.COM_COMMUNITY_CLOSE_BUTTON_TITLE,'">×</button>',t.title,"</div>",'<div class="joms-js--step1',t.error?" joms-popup__hide":"",'">','<div class="joms-popup__content joms-popup__content--single">',t.html,"</div>",'<div class="joms-popup__action">','<button class="joms-button--neutral joms-button--small joms-left joms-js--button-cancel">',t.btnCancel,"</button> &nbsp;",'<button class="joms-button--primary joms-button--small joms-js--button-save">',t.btnSave,"</button>","</div>","</div>",'<div class="joms-js--step2',t.error?"":" joms-popup__hide",'">','<div data-ui-object="popup-step-2"',t.error?"":' class="joms-popup__hide"',">",'<div class="joms-popup__content joms-popup__content--single">',t.error||"","</div>","</div>","</div>"].join("")}function of(t){return t||(t={}),['<div class="joms-popup joms-popup--whiteblock">','<div class="joms-popup__title"><button class="mfp-close" type="button" title="',window.joms_lang.COM_COMMUNITY_CLOSE_BUTTON_TITLE,'">×</button>',t.title,"</div>",'<div class="joms-popup__content joms-popup__content--single">',t.message||t.error||"",t.thumbnail?'<div style="padding-top:10px;"><img src="'+t.thumbnail+'" style="max-width:100%;"></div>':"","</div>","</div>"].join("")}function ef(){Tj.off(),kj.close()}function nf(){joms.ajax({func:"profile,ajaxLinkProfileVideo",data:[xj],callback:function(t){Tj.find(".joms-js--step1").hide(),Tj.find(".joms-js--step2").show().children().html(t.error||t.message),t.success&&setTimeout((function(){window.location.reload()}),1e3)}})}function sf(t){return t||(t={}),['<div class="joms-popup joms-popup--whiteblock">','<div class="joms-popup__title"><button class="mfp-close" type="button" title="',window.joms_lang.COM_COMMUNITY_CLOSE_BUTTON_TITLE,'">×</button>',t.title,"</div>",'<div class="joms-js--step1">','<div class="joms-popup__content">',t.html,"</div>",'<div class="joms-popup__action">','<button class="joms-button--neutral joms-button--small joms-left joms-js--button-cancel">',t.btnNo,"</button> &nbsp;",'<button class="joms-button--primary joms-button--small joms-js--button-save">',t.btnYes,"</button>","</div>","</div>",'<div class="joms-popup__hide joms-js--step2">','<div class="joms-popup__content joms-popup__content--single"></div>',"</div>","</div>"].join("")}function af(){Mj.off(),Cj.close()}function cf(t){joms.ajax({func:"videos,ajaxRemoveVideo",data:[Oj,t.data.redirect],callback:function(t){Mj.find(".joms-js--step1").hide(),Mj.find(".joms-js--step2").show().children().html(t.error||t.message),t.success&&setTimeout((function(){t.redirect?window.location=t.redirect:window.location.reload()}),1e3)}})}function lf(t){return t||(t={}),['<div class="joms-popup joms-popup--whiteblock">','<div class="joms-popup__title"><button class="mfp-close" type="button" title="',window.joms_lang.COM_COMMUNITY_CLOSE_BUTTON_TITLE,'">×</button>',t.title,"</div>",'<div class="joms-js--step1">','<div class="joms-popup__content">',t.html,"</div>",'<div class="joms-popup__action">','<button class="joms-button--neutral joms-button--small joms-left joms-js--button-cancel">',t.btnNo,"</button> &nbsp;",'<button class="joms-button--primary joms-button--small joms-js--button-save">',t.btnYes,"</button>","</div>","</div>",'<div class="joms-popup__hide joms-js--step2">','<div class="joms-popup__content joms-popup__content--single"></div>',"</div>","</div>"].join("")}function pf(t){Ij.find("textarea").val(t.target.value)}function rf(){Ij.off(),Lj.close()}function mf(){var t;(t=(t=Ij.find("textarea").val()).replace(/^\s+|\s+$/g,""))?(Ij.find(".joms-js--error").hide(),joms.ajax({func:"system,ajaxSendReport",data:["videos,reportVideo",Uj||window.location.href,t,Sj],callback:function(t){Ij.find(".joms-js--step1").hide(),Ij.find(".joms-js--step2").show().children().html(t.error||t.message)}})):Ij.find(".joms-js--error").show()}function uf(t){return t||(t={}),['<div class="joms-popup joms-popup--whiteblock joms-popup--500">','<div class="joms-popup__title"><button class="mfp-close" type="button" title="',window.joms_lang.COM_COMMUNITY_CLOSE_BUTTON_TITLE,'">×</button>',t.title,"</div>",'<div class="joms-js--step1',t.error?" joms-popup__hide":"",'">',t.html,'<div class="joms-popup__action">','<button class="joms-button--neutral joms-button--small joms-left joms-js--button-cancel">',t.btnCancel,"</button> &nbsp;",'<button class="joms-button--primary joms-button--small joms-js--button-save">',t.btnSend,"</button>","</div>","</div>",'<div class="joms-js--step2',t.error?"":" joms-popup__hide",'">','<div class="joms-popup__content joms-popup__content--single">',t.error||"","</div>","</div>","</div>"].join("")}function df(t){return t||(t={}),['<div class="joms-popup joms-popup--whiteblock">','<div class="joms-popup__title"><button class="mfp-close" type="button" title="',window.joms_lang.COM_COMMUNITY_CLOSE_BUTTON_TITLE,'">×</button>',t.title,"</div>",'<div class="joms-popup__content joms-popup__content--single">',t.html||t.error||"","</div>",'<div class="joms-popup__action">','<button class="joms-button--neutral joms-button--small joms-js--button-close">',window.joms_lang.COM_COMMUNITY_CLOSE_BUTTON,"</button>","</div>","</div>"].join("")}function jf(t){return t||(t={}),['<div class="joms-popup joms-popup--whiteblock">','<div class="joms-popup__title"><button class="mfp-close" type="button" title="',window.joms_lang.COM_COMMUNITY_CLOSE_BUTTON_TITLE,'">×</button>',t.title,"</div>",'<div class="joms-popup__content joms-popup__content--single">',t.html||t.error||"","</div>",'<div class="joms-popup__action">','<button class="joms-button--neutral joms-button--small joms-js--button-close">',window.joms_lang.COM_COMMUNITY_CLOSE_BUTTON,"</button>","</div>","</div>"].join("")}function ff(){Yj.off(),Rj.close()}function vf(){joms.ajax({func:"profile,ajaxRemoveLinkProfileVideo",data:[Pj,Bj],callback:function(t){Yj.find(".joms-js--step1").hide(),Yj.find(".joms-js--step2").show().children().html(t.error||t.message),t.success&&setTimeout((function(){window.location.reload()}),1e3)}})}function bf(t){return t||(t={}),['<div class="joms-popup joms-popup--whiteblock">','<div class="joms-popup__title"><button class="mfp-close" type="button" title="',window.joms_lang.COM_COMMUNITY_CLOSE_BUTTON_TITLE,'">×</button>',t.title,"</div>",'<div class="joms-js--step1">','<div class="joms-popup__content">',t.html,"</div>",'<div class="joms-popup__action">','<button class="joms-button--neutral joms-button--small joms-left joms-js--button-cancel">',t.btnNo,"</button> &nbsp;",'<button class="joms-button--primary joms-button--small joms-js--button-save">',t.btnYes,"</button>","</div>","</div>",'<div class="joms-popup__hide joms-js--step2">','<div class="joms-popup__content joms-popup__content--single"></div>',"</div>","</div>"].join("")}const _f={open:mj,add:function(t,o){w.prepare((function(e){!function(t,o,e){var n;dj&&dj.off(),uj=t,bj=e||!1,n=[],(vj=o||!1)&&(n.push(bj||""),n.push(vj||"")),joms.ajax({func:"videos,ajaxAddVideo",data:n,callback:function(t){uj.items[0]={type:"inline",src:Kj(t)},uj.updateItemHTML(),(dj=uj.contentContainer).on("submit",".joms-js--form-link",Hj),dj.on("click",".joms-js--select-file",Fj),dj.on("submit",".joms-js--form-upload",Vj),Dj()}})}(e,t,o)}))},edit:function(t){w.prepare((function(o){var e,n;e=o,n=t,hj&&hj.off(),_j=e,gj=n,joms.ajax({func:"videos,ajaxEditVideo",data:[gj,window.location.href],callback:function(t){_j.items[0]={type:"inline",src:tf(t)},_j.updateItemHTML(),(hj=_j.contentContainer).on("click",".joms-js--button-cancel",Xj),hj.on("click",".joms-js--button-save",Zj)}})}))},fetchThumbnail:function(t){w.prepare((function(o){wj=o,yj=t,joms.ajax({func:"videos,ajaxFetchThumbnail",data:[yj,"myvideos"],callback:function(t){wj.items[0]={type:"inline",src:of(t)},t.success&&(wj.st.callbacks||(wj.st.callbacks={}),wj.st.callbacks.close=function(){window.location.reload()}),wj.updateItemHTML()}})}))},linkToProfile:function(t){w.prepare((function(o){var e,n;e=o,n=t,Tj&&Tj.off(),kj=e,xj=n,joms.ajax({func:"profile,ajaxConfirmLinkProfileVideo",data:[xj],callback:function(t){kj.items[0]={type:"inline",src:sf(t)},kj.updateItemHTML(),(Tj=kj.contentContainer).on("click",".joms-js--button-cancel",ef),Tj.on("click",".joms-js--button-save",nf)}})}))},remove:function(t,o){w.prepare((function(e){!function(t,o,e){Mj&&Mj.off(),Cj=t,Oj=o,joms.ajax({func:"videos,ajaxConfirmRemoveVideo",data:[Oj],callback:function(t){Cj.items[0]={type:"inline",src:lf(t)},Cj.updateItemHTML(),(Mj=Cj.contentContainer).on("click",".joms-js--button-cancel",af),Mj.on("click",".joms-js--button-save",{redirect:e?1:0},cf)}})}(e,t,o)}))},report:function(t,o){w.prepare((function(e){var n,s,a;n=e,s=t,a=o,Ij&&Ij.off(),Lj=n,Sj=s,Uj=a,joms.ajax({func:"system,ajaxReport",data:[],callback:function(t){Lj.items[0]={type:"inline",src:uf(t)},Lj.updateItemHTML(),(Ij=Lj.contentContainer).on("change","select",pf),Ij.on("click",".joms-js--button-cancel",rf),Ij.on("click",".joms-js--button-save",mf)}})}))},addFeatured:function(t){joms.util.popup.prepare((function(o){$j=o,Ej=t,joms.ajax({func:"videos,ajaxAddFeatured",data:[Ej],callback:function(t){$j.items[0]={type:"inline",src:df(t)},t.success&&($j.st.callbacks||($j.st.callbacks={}),$j.st.callbacks.close=function(){window.location.reload()}),$j.updateItemHTML()}})}))},removeFeatured:function(t){w.prepare((function(o){Nj=o,Aj=t,joms.ajax({func:"videos,ajaxRemoveFeatured",data:[Aj],callback:function(t){Nj.items[0]={type:"inline",src:jf(t)},t.success&&(Nj.st.callbacks||(Nj.st.callbacks={}),Nj.st.callbacks.close=function(){window.location.reload()}),Nj.updateItemHTML()}})}))},removeLinkFromProfile:function(t,o){w.prepare((function(e){var n,s,a;n=e,s=t,a=o,Yj&&Yj.off(),Rj=n,Bj=s,Pj=a,joms.ajax({func:"profile,ajaxRemoveConfirmLinkProfileVideo",data:[Pj,Bj],callback:function(t){Rj.items[0]={type:"inline",src:bf(t)},Rj.updateItemHTML(),(Yj=Rj.contentContainer).on("click",".joms-js--button-cancel",ff),Yj.on("click",".joms-js--button-save",vf)}})}))}};var hf,gf,wf,yf,kf;function Tf(t){var o,e,n;o=$(t.target),wf.children(".joms-focus__actions--reposition").off("click","input"),"button-save"===o.data("ui-object")?(n=100*yf.position().top/wf.height(),e=(n=Math.round(1e4*n)/1e4)+"%",xf(),joms.ajax({func:"photos,ajaxSetPhotoPhosition",data:[hf,gf,e]})):(yf.css({top:yf.data("top")}),xf())}function xf(){wf.css("cursor",""),wf.children(".joms-focus__actions--reposition").hide(),wf.children(".joms-focus__header").show(),wf=null,yf=null,kf=null}const Cf={reposition:function(t,o){var e,n;hf=t,gf=o,wf=$(".joms-focus__cover"),(yf=wf.children(".joms-js--cover-image").children("img"))&&(wf.css("cursor","move"),wf.children(".joms-focus__header").hide(),wf.children(".joms-focus__actions--reposition").on("click","input",Tf).show(),yf.data("top",yf.position().top),kf=!0,new joms.Hammer(yf[0]).on("dragstart dragup dragdown dragend",(function(t){var o;"dragstart"===t.type?(e=yf.position().top,n=wf.height()-yf.height()):"dragend"!==t.type&&(o=Math.min(0,e+t.gesture.deltaY),o=Math.max(n,o),yf.css({top:o}))})))},click:function(t,o){kf||joms.api.photoOpen(t,o)}};function Mf(t,o,e,n){$(".joms-js--like-"+o+"-"+e).each((function(){var s=this.tagName.toLowerCase(),a=$(this);"a"===s?a.hasClass("joms-popup__btn-like")?Of(a,t,o,e,n):function(t,o,e,n,s){var a;t.find("span").html(s),"like"===o?(t.attr("onclick",'joms.view.page.unlike("'+e+'", "'+n+'");'),t.addClass("liked"),(a=t.data("lang-liked"))&&t.find(".joms-js--lang").text(a)):"unlike"===o&&(t.attr("onclick",'joms.view.page.like("'+e+'", "'+n+'");'),t.removeClass("liked"),(a=t.data("lang-like"))&&t.find(".joms-js--lang").text(a))}(a,t,o,e,n):"button"===s&&(a.hasClass("joms-popup__btn-like")?Of(a,t,o,e,n):function(t,o,e,n,s){var a;"like"===o?(t.attr("onclick",'joms.view.page.unlike("'+e+'", "'+n+'");'),t.removeClass("joms-button--neutral"),t.addClass("joms-button--primary"),a=t.data("lang-liked")):"unlike"===o&&(t.attr("onclick",'joms.view.page.like("'+e+'", "'+n+'");'),t.addClass("joms-button--neutral"),t.removeClass("joms-button--primary"),a=t.data("lang-like")),a=a||t.data("lang")||"",(s=+s)>0&&(a+=" ("+s+")"),t.html(a)}(a,t,o,e,n))}))}function Of(t,o,e,n,s){var a;"like"===o?(t.attr("onclick",'joms.view.page.unlike("'+e+'", "'+n+'");'),t.addClass("liked"),a=t.data("lang-liked")):"unlike"===o&&(t.attr("onclick",'joms.view.page.like("'+e+'", "'+n+'");'),t.removeClass("liked"),a=t.data("lang-like")),a=a||t.data("lang"),(s=+s)>0&&(a+=" ("+s+")"),t.html('<svg viewBox="0 0 16 16" class="joms-icon"><use xlink:href="#joms-icon-thumbs-up"></use></svg> <span>'+a+"</span>")}const Lf={initialize:function(){},like:function(t,o){"profile"===t&&$("a.joms-js--like-profile-"+o).attr("onclick","javascript:;"),joms.ajax({func:"system,ajaxLike",data:[t,o],callback:function(e){e.success&&(Mf("like",t,o,e.likeCount),location.reload())}})},unlike:function(t,o){"profile"===t&&$("a.joms-js--like-profile-"+o).attr("onclick","javascript:;"),joms.ajax({func:"system,ajaxUnlike",data:[t,o],callback:function(e){e.success&&(Mf("unlike",t,o,e.likeCount),location.reload())}})},share:function(t){Gi.share(t)},react:function(t,o,e){var n,s=function(t){return joms.getData("joms_reaction").filter((function(o){return o.id==t})).pop()}(o),a=s.text,i="reaction-btn--"+s.name,c=$(".joms-button--reaction[data-uid="+t+"][data-type=page]"),l=c.attr("data-element");"photo"===l&&(n=$(".joms-button--reaction[data-element=photo"+t+"]")).length&&(c=c.add(n)),c.removeClass(["reaction-btn--like","reaction-btn--love","reaction-btn--haha","reaction-btn--wow","reaction-btn--sad","reaction-btn--angry"].join(" ")),"onBar"===e&&(c.addClass("reaction-btn--animate"),setTimeout((function(){c.removeClass("reaction-btn--animate")}),200)),c.addClass(i),c.text(a),c.attr("data-reactid",o),c.attr("data-action","unreact"),c.attr("onclick","javascript:;"),joms.ajax({func:"system,ajaxLike",data:[l,t,o],callback:function(e){var n=c.parents(".joms-stream__actions").siblings(".joms-stream__status");n.show(),n.html(e.html);var s="joms.view.page.unreact("+t+", "+o+")";c.attr("onclick",s)}})},unreact:function(t,o){var e,n=$(".joms-stream__actions .joms-button--reaction[data-uid="+t+"][data-type=page]"),s=n.attr("data-element"),a=n.attr("data-lang-like");"photo"===s&&(e=$(".joms-button--reaction[data-element=photo"+t+"]")).length&&(n=n.add(e)),n.removeClass(["reaction-btn--like","reaction-btn--love","reaction-btn--haha","reaction-btn--wow","reaction-btn--sad","reaction-btn--angry"].join(" ")),n.text(a),n.attr("data-reactid",1),n.attr("data-action","react"),n.attr("onclick","javascript:;"),joms.ajax({func:"system,ajaxUnlike",data:[s,t,o],callback:function(o){var e=n.parents(".joms-stream__actions").siblings(".joms-stream__status");o.html||e.hide(),e.html(o.html);var s="joms.view.page.react("+t+", 1)";n.attr("onclick",s)}})}};var If,Sf,Uf,$f,Ef,Nf,Af,Rf,Yf,Bf,Pf,Hf,Ff,Df,qf,Vf,zf,Gf,Wf,Qf,Jf,Kf,Xf,Zf,tv,ov,ev,nv,sv,av,iv,cv,lv;function pv(){Sf.off(),If.close()}function rv(){joms.ajax({func:"activities,ajaxDeleteActivity",data:["",Uf],callback:function(t){var o;Sf.off(),If.close(),t.success&&(o=joms.jQuery(".joms-stream").filter("[data-stream-id="+Uf+"]")).fadeOut(500,(function(){o.remove()}))}})}function mv(t){return t||(t={}),['<div class="joms-popup joms-popup--whiteblock">','<div class="joms-popup__title"><button class="mfp-close" type="button" title="',window.joms_lang.COM_COMMUNITY_CLOSE_BUTTON_TITLE,'">×</button>',t.title,"</div>","<div>",'<div class="joms-popup__content">',t.error||t.message,"</div>",'<div class="joms-popup__action">','<a href="javascript:" class="joms-button--neutral joms-button--small joms-left" data-ui-object="popup-button-cancel">',t.btnCancel,"</a> &nbsp;",'<button class="joms-button--primary joms-button--small" data-ui-object="popup-button-save">',t.btnYes,"</button>","</div>","</div>","</div>"].join("")}function uv(){Ef.off(),$f.close()}function dv(){var t=Ef.find(".joms-js--location-input"),o=t.data("name"),e=t.data("lat"),n=t.data("lng");joms.ajax({func:"activities,ajaxSaveLocation",data:[Nf,o,e,n],callback:function(t){Ef.off(),$f.close(),t.success&&$(".joms-stream").filter("[data-stream-id="+Nf+"]").find(".joms-status-location a").html(o)}})}function jv(t){return t||(t={}),['<div class="joms-popup joms-popup--whiteblock">','<div class="joms-popup__title"><button class="mfp-close" type="button" title="',window.joms_lang.COM_COMMUNITY_CLOSE_BUTTON_TITLE,'">×</button>',t.title,"</div>","<div>",'<div class="joms-popup__content">',t.html||t.error,"</div>",'<div class="joms-popup__action">','<a href="javascript:" class="joms-button--neutral joms-button--small joms-left" data-ui-object="popup-button-cancel">',t.btnCancel,"</a> &nbsp;",'<button class="joms-button--primary joms-button--small" data-ui-object="popup-button-save">',t.btnEdit,"</button>","</div>","</div>","</div>"].join("")}function fv(t){return t||(t={}),['<div class="joms-popup joms-popup--whiteblock">','<div class="joms-popup__title"><button class="mfp-close" type="button" title="',window.joms_lang.COM_COMMUNITY_CLOSE_BUTTON_TITLE,'">×</button>',t.title||"&nbsp;","</div>",'<div class="joms-popup__content joms-popup__content--single">',t.error||t.message,"</div>","</div>"].join("")}function vv(t){return t||(t={}),['<div class="joms-popup joms-popup--whiteblock">','<div class="joms-popup__title"><button class="mfp-close" type="button" title="',window.joms_lang.COM_COMMUNITY_CLOSE_BUTTON_TITLE,'">×</button>',t.title||"&nbsp;","</div>",'<div class="joms-popup__content joms-popup__content--single">',t.error||t.message,"</div>","</div>"].join("")}function bv(){Hf.off(),Pf.close()}function _v(){joms.ajax({func:"activities,deleteLocation",data:[Ff],callback:function(t){Hf.off(),Pf.close(),t.success&&joms.jQuery(".joms-stream").filter("[data-stream-id="+Ff+"]").find(".joms-status-location").remove()}})}function hv(t){return t||(t={}),['<div class="joms-popup joms-popup--whiteblock">','<div class="joms-popup__title"><button class="mfp-close" type="button" title="',window.joms_lang.COM_COMMUNITY_CLOSE_BUTTON_TITLE,'">×</button>',t.title,"</div>","<div>",'<div class="joms-popup__content">',t.error||t.message,"</div>",'<div class="joms-popup__action">','<a href="javascript:" class="joms-button--neutral joms-button--small joms-left" data-ui-object="popup-button-cancel">',t.btnNo,"</a> &nbsp;",'<button class="joms-button--primary joms-button--small" data-ui-object="popup-button-save">',t.btnYes,"</button>","</div>","</div>","</div>"].join("")}function gv(){qf.off(),Df.close()}function wv(){joms.ajax({func:"activities,ajaxRemoveMood",data:[Vf],callback:function(t){var o;qf.off(),Df.close(),t.success&&((o=joms.jQuery(".joms-stream").filter("[data-stream-id="+Vf+"]")).find("[data-type=stream-content]").find("span").eq(0).html(t.html),o.find(".colorcolorful-status__mood").html(""),o.find("li.joms-js--contextmenu-removemood").remove())}})}function yv(t){return t||(t={}),['<div class="joms-popup joms-popup--whiteblock">','<div class="joms-popup__title"><button class="mfp-close" type="button" title="',window.joms_lang.COM_COMMUNITY_CLOSE_BUTTON_TITLE,'">×</button>',t.title,"</div>","<div>",'<div class="joms-popup__content">',t.error||t.message,"</div>",'<div class="joms-popup__action">','<a href="javascript:" class="joms-button--neutral joms-button--small joms-left" data-ui-object="popup-button-cancel">',t.btnNo,"</a> &nbsp;",'<button class="joms-button--primary joms-button--small" data-ui-object="popup-button-save">',t.btnYes,"</button>","</div>","</div>","</div>"].join("")}function kv(t,o,e){Gf&&Gf.off(),zf=t,Wf=o,Qf=e,joms.ajax({func:"system,ajaxReport",data:[],callback:function(t){zf.items[0]={type:"inline",src:Mv(t)},zf.updateItemHTML(),(Gf=zf.contentContainer).on("change","select",Tv),Gf.on("click",".joms-js--button-cancel",xv),Gf.on("click",".joms-js--button-save",Cv)}})}function Tv(t){Gf.find("textarea").val(t.target.value)}function xv(){Gf.off(),zf.close()}function Cv(){var t;(t=(t=Gf.find("textarea").val()).replace(/^\s+|\s+$/g,""))?(Gf.find(".joms-js--error").hide(),joms.ajax({func:"system,ajaxSendReport",data:["activities,reportActivities",window.location.href,t,Wf,Qf],callback:function(t){Gf.find(".joms-js--step1").hide(),Gf.find(".joms-js--step2").show().children().html(t.error||t.message)}})):Gf.find(".joms-js--error").show()}function Mv(t){return t||(t={}),['<div class="joms-popup joms-popup--whiteblock joms-popup--500">','<div class="joms-popup__title"><button class="mfp-close" type="button" title="',window.joms_lang.COM_COMMUNITY_CLOSE_BUTTON_TITLE,'">×</button>',t.title,"</div>",'<div class="joms-js--step1',t.error?" joms-popup__hide":"",'">',t.html,'<div class="joms-popup__action">','<button class="joms-button--neutral joms-button--small joms-left joms-js--button-cancel">',t.btnCancel,"</button> &nbsp;",'<button class="joms-button--primary joms-button--small joms-js--button-save">',t.btnSend,"</button>","</div>","</div>",'<div class="joms-js--step2',t.error?"":" joms-popup__hide",'">','<div class="joms-popup__content joms-popup__content--single">',t.error||"","</div>","</div>","</div>"].join("")}function Ov(t){var o=$(t.currentTarget),e=o.data("value"),n=o.data("classname");joms.ajax({func:"activities,ajaxUpdatePrivacyActivity",data:[Xf,e],callback:function(t){Kf.off(),Jf.close(),t.success&&$(".joms-stream").filter("[data-stream-id="+Xf+"]").find(".joms-stream__meta use").attr("xlink:href",window.location+"#"+n)}})}function Lv(){var t,o,e,n,s;if(t=[["public",10,window.joms_lang.COM_COMMUNITY_PRIVACY_PUBLIC,"earth"],["site_members",20,window.joms_lang.COM_COMMUNITY_PRIVACY_SITE_MEMBERS,"users"],["friends",30,window.joms_lang.COM_COMMUNITY_PRIVACY_FRIENDS,"user"],["me",40,window.joms_lang.COM_COMMUNITY_PRIVACY_ME,"lock"]],(o=window.joms_privacylist)&&o.length)for(s=t.length-1;s>=0;s--)o.indexOf(t[s][0])<0&&t.splice(s,1);for(e=(e=window.location.href).replace(/#.*$/,""),n="",s=0;s<t.length;s++)n+='<a href="javascript:" data-value="'+t[s][1]+'" data-classname="joms-icon-'+t[s][3]+'">',n+='<svg viewBox="0 0 16 16" class="joms-icon"><use xlink:href="'+e+"#joms-icon-"+t[s][3]+'"></use></svg> ',n+="<span>"+t[s][2]+"</span></a>";return['<div class="joms-popup joms-popup--whiteblock joms-popup--privacy">','<div><div class="joms-popup__content joms-popup__content--single">',n,"</div></div>","</div>"].join("")}function Iv(){tv.off(),Zf.close()}function Sv(){var t={msg:tv.find("textarea.joms-textarea").val(),privacy:tv.find("[data-ui-object=joms-dropdown-value]").val()};joms.ajax({func:"activities,ajaxAddShare",data:[ov,JSON.stringify(t)],callback:function(t){tv.off(),Zf.close(),t.success&&($(".joms-stream__container").prepend(t.html),Uv(),$v())}})}function Uv(){var t=".joms-js--initialized";$(".joms-media--images").not(t).each((function(){var o=$(this),e=o.find("img"),n=0;e.each((function(){var s=$(this);$("<img>").on("load",(function(){++n===e.length&&(o.siblings(".joms-media--loading").remove(),o.addClass(t.substr(1)),e.show(),joms.util.photos.arrange(o))})).attr("src",s.attr("src"))}))}))}function $v(){var t=".joms-js--initialized",o=".joms-js--video",e=$(o).not(t).addClass(t.substr(1));e.length&&(joms.loadCSS(joms.ASSETS_URL+"vendors/mediaelement/mediaelementplayer.min.css"),e.on("click.joms-video",o+"-play",(function(){var t=$(this).closest(o);joms.util.video.play(t,t.data())})),joms.ios&&setTimeout((function(){e.find(o+"-play").click()}),2e3))}function Ev(t){return t||(t={}),['<div class="joms-popup joms-popup--whiteblock joms-popup--500">','<div class="joms-popup__title"><button class="mfp-close" type="button" title="',window.joms_lang.COM_COMMUNITY_CLOSE_BUTTON_TITLE,'">×</button>',t.title,"</div>","<div>",'<div class="joms-popup__content joms-popup__content--single">',t.html||"","</div>",'<div class="joms-popup__action">','<button class="joms-button--neutral joms-button--small joms-left joms-js--button-cancel">',t.btnCancel,"</button> &nbsp;",'<button class="joms-button--primary joms-button--small joms-js--button-save">',t.btnShare,"</button> &nbsp;",'<div style="display:inline-block; position:relative;">','<div class="joms-button--privacy" data-ui-object="joms-dropdown-button" data-name="share-privacy" data-type="no-popup">','<svg class="joms-icon" viewBox="0 0 16 16"><use xlink:href="#joms-icon-earth"></use></svg>','<input type="hidden" data-ui-object="joms-dropdown-value" value="10">',"</div>",'<ul class="joms-dropdown joms-dropdown--privacy" data-name="share-privacy">','<li data-classname="joms-icon-earth" data-value="10" style="white-space:nowrap">','<svg class="joms-icon" viewBox="0 0 16 16"><use xlink:href="#joms-icon-earth"></use></svg>'," <span>",window.joms_lang.COM_COMMUNITY_PRIVACY_PUBLIC,"</span>","</li>",'<li data-classname="joms-icon-users" data-value="20" style="white-space:nowrap">','<svg class="joms-icon" viewBox="0 0 16 16"><use xlink:href="#joms-icon-users"></use></svg>'," <span>",window.joms_lang.COM_COMMUNITY_PRIVACY_SITE_MEMBERS,"</span>","</li>",'<li data-classname="joms-icon-user" data-value="30" style="white-space:nowrap">','<svg class="joms-icon" viewBox="0 0 16 16"><use xlink:href="#joms-icon-user"></use></svg>'," <span>",window.joms_lang.COM_COMMUNITY_PRIVACY_FRIENDS,"</span>","</li>",'<li data-classname="joms-icon-lock" data-value="40" style="white-space:nowrap">','<svg class="joms-icon" viewBox="0 0 16 16"><use xlink:href="#joms-icon-lock"></use></svg>'," <span>",window.joms_lang.COM_COMMUNITY_PRIVACY_ME,"</span>","</li>","</ul>","</div>","</div>","</div>","</div>"].join("")}function Nv(t){var o=!0;return t||(t={}),$($.trim(t.html||"")).children().length&&(o=!1),['<div class="joms-popup joms-popup--whiteblock joms-popup--rounded joms-popup--80pc">','<button class="mfp-close joms-hide"></button>','<div class="joms-comment">',o?window.joms_lang.COM_COMMUNITY_NO_COMMENTS_YET:t.html,"</div>","</div>"].join("")}function Av(t,o,e){sv=t,av=o,iv=e,joms.ajax({func:"system,ajaxStreamShowLikes",data:[av,iv],callback:function(t){sv.items[0]={type:"inline",src:Rv(t)},sv.updateItemHTML()}})}function Rv(t){var o=!0;return t||(t={}),$($.trim(t.html||"")).children().length&&(o=!1),['<div class="joms-popup joms-popup--whiteblock joms-popup--rounded joms-popup--80pc">','<button class="mfp-close joms-hide"></button>','<div class="joms-comment">',o?window.joms_lang.COM_COMMUNITY_NO_LIKES_YET:t.html,"</div>","</div>"].join("")}function Yv(t){return t||(t={}),['<div class="joms-popup joms-popup--whiteblock joms-popup--rounded joms-popup--80pc">','<button class="mfp-close joms-hide"></button>','<div class="joms-comment">',t.html||"","</div>","</div>"].join("")}const Bv={remove:function(t){w.prepare((function(o){var e,n;e=o,n=t,Sf&&Sf.off(),If=e,Uf=n,joms.ajax({func:"activities,ajaxConfirmDeleteActivity",data:["",Uf],callback:function(t){If.items[0]={type:"inline",src:mv(t)},If.updateItemHTML(),(Sf=If.contentContainer).on("click","[data-ui-object=popup-button-cancel]",pv),Sf.on("click","[data-ui-object=popup-button-save]",rv)}})}))},editLocation:function(t){w.prepare((function(o){var e,n;e=o,n=t,Ef&&Ef.off(),$f=e,Nf=n,joms.ajax({func:"activities,ajaxeditLocation",data:[Nf],callback:function(t){$f.items[0]={type:"inline",src:jv(t)},$f.updateItemHTML(),(Ef=$f.contentContainer).on("click","[data-ui-object=popup-button-cancel]",uv),Ef.on("click","[data-ui-object=popup-button-save]",dv),_.defer((function(){!function(t){joms.util.map((function(){var o,e,n,s=Ef.find(".joms-js--location-map"),a=Ef.find(".joms-js--location-input"),i=Ef.find(".joms-js--location-loading"),c=Ef.find(".joms-js--location-selector");e={center:o=new window.google.maps.LatLng(t.latitude,t.longitude),zoom:14,mapTypeId:window.google.maps.MapTypeId.ROADMAD,mapTypeControl:!1,disableDefaultUI:!0,draggable:!1,scaleControl:!1,scrollwheel:!1,navigationControl:!1,streetViewControl:!1,disableDoubleClickZoom:!0},s=new window.google.maps.Map(s[0],e),(n=new window.google.maps.Marker({draggable:!1,map:s})).setPosition(o),s.panTo(o),a.on("input",(function(){c.hide(),i.show(),l(this.value)}));var l=_.debounce((function(t){(t=$.trim(t))&&joms.util.map.search(t).done((function(t){var o="";_.isArray(t)&&_.each(t,(function(t){o+='<a class="joms-map--location-item" data-id="'+t.id+'""><strong>'+t.name+"</strong><br /><span>"+(t.description||"")+"</span></a>"})),i.hide(),c.html(o),c.show()}))}),1e3);a.val(t.location),l(t.location),c.on("click",".joms-map--location-item",(function(){var t=$(this),o=t.data(),e=t.find("strong").text();a.data("name",e),joms.util.map.detail(o.id).done((function(t){var o=t.geometry,e=o.location,i=o.viewport;a.data("lat",e.lat()),a.data("lng",e.lng()),s.setCenter(e),n.setPosition(e),i?s.fitBounds(i):s.setZoom(15)}))}))}))}(t)}))}})}))},addFeatured:function(t){w.prepare((function(o){!function(t,o){Af=t,Rf=o;var e,n=window.joms_page;"profile"===n?(n="profile",e=window.joms_user_id):"groups"===n?(n="group",e=window.joms_group_id):"events"===n?(n="event",e=window.joms_event_id):(n="frontpage",e=0),joms.ajax({func:"system,ajaxFeatureStream",data:[n,e,Rf],callback:function(t){t.success?window.location.reload():(Af.items[0]={type:"inline",src:fv(t)},Af.updateItemHTML())}})}(o,t)}))},removeFeatured:function(t){w.prepare((function(o){!function(t,o){Yf=t,Bf=o;var e,n=window.joms_page;"profile"===n?(n="profile",e=window.joms_user_id):"groups"===n?(n="group",e=window.joms_group_id):"events"===n?(n="event",e=window.joms_event_id):(n="frontpage",e=0),joms.ajax({func:"system,ajaxUnfeatureStream",data:[n,e,Bf],callback:function(t){t.success?window.location.reload():(Yf.items[0]={type:"inline",src:vv(t)},Yf.updateItemHTML())}})}(o,t)}))},removeLocation:function(t){w.prepare((function(o){var e,n;e=o,n=t,Hf&&Hf.off(),Pf=e,Ff=n,joms.ajax({func:"activities,ajaxRemoveLocation",callback:function(t){Pf.items[0]={type:"inline",src:hv(t)},Pf.updateItemHTML(),(Hf=Pf.contentContainer).on("click","[data-ui-object=popup-button-cancel]",bv),Hf.on("click","[data-ui-object=popup-button-save]",_v)}})}))},removeMood:function(t){w.prepare((function(o){var e,n;e=o,n=t,qf&&qf.off(),Df=e,Vf=n,joms.ajax({func:"activities,ajaxConfirmRemoveMood",callback:function(t){Df.items[0]={type:"inline",src:yv(t)},Df.updateItemHTML(),(qf=Df.contentContainer).on("click","[data-ui-object=popup-button-cancel]",gv),qf.on("click","[data-ui-object=popup-button-save]",wv)}})}))},report:function(t,o){w.prepare((function(e){kv(e,t,o)}))},selectPrivacy:function(t){w.prepare((function(o){var e,n;e=o,n=t,Kf&&Kf.off(),Xf=n,(Jf=e).items[0]={type:"inline",src:Lv()},Jf.updateItemHTML(),(Kf=Jf.contentContainer).on("click","a",Ov)}))},share:function(t){w.prepare((function(o){var e,n;e=o,n=t,tv&&tv.off(),Zf=e,ov=n,joms.ajax({func:"activities,ajaxSharePopup",data:[ov],callback:function(t){Zf.items[0]={type:"inline",src:Ev(t)},Zf.updateItemHTML(),Uv(),$v(),(tv=Zf.contentContainer).on("click",".joms-js--button-cancel",Iv),tv.on("click",".joms-js--button-save",Sv)}})}))},showComments:function(t,o){w.prepare((function(e){!function(t,o,e){var n;ev=t,n=[o],(nv=e)&&n.push(nv),joms.ajax({func:"system,ajaxStreamShowComments",data:n,callback:function(t){var o,e,n;ev.items[0]={type:"inline",src:Nv(t)},ev.updateItemHTML(),o=".joms-js--initialized",e=".joms-js--video",(n=$(".joms-comment__body,.joms-js--inbox").find(e).not(o).addClass(o.substr(1))).length&&(joms.loadCSS(joms.ASSETS_URL+"vendors/mediaelement/mediaelementplayer.min.css"),n.on("click.joms-video",e+"-play",(function(){var t=$(this).closest(e);joms.util.video.play(t,t.data())})),joms.ios&&setTimeout((function(){n.find(e+"-play").click()}),2e3)),joms.parseEmoji()}})}(e,t,o)}))},showLikes:function(t,o){w.prepare((function(e){Av(e,t,o)}))},showOthers:function(t){w.prepare((function(o){cv=o,lv=t,joms.ajax({func:"activities,ajaxShowOthers",data:[lv],callback:function(t){cv.items[0]={type:"inline",src:Yv(t)},cv.updateItemHTML()}})}))}};var Pv;function Hv(){Pv&&Pv.off()}const Fv={start:function(){Hv(),Pv=$(".joms-stream__wrapper")},stop:Hv,like:function(t){var o=Pv.find(".joms-js--stream-"+t);+o.attr("do-like")||(o.attr("do-like",1),joms.ajax({func:"system,ajaxStreamAddLike",data:[t],callback:function(o){var e,n,s,a,i;o.success&&(e=Pv.find(".joms-js--stream-"+t)).length&&((n=e.find(".joms-stream__actions").find(".joms-button--liked")).attr("onclick","joms.api.streamUnlike('"+t+"');"),n.addClass("liked"),n.find("span").html(n.data("lang-unlike")),n.find("use").attr("xlink:href",window.location+"#joms-icon-thumbs-down"),s=e.find(".joms-stream__status"),o.html?s.length?s.html(o.html):(s=e.find(".joms-stream__actions"),(s=$("<div class=joms-stream__status />").insertAfter(s)).html(o.html)):s.remove(),(i=e.find(".joms-stream__status--mobile")).length&&((a=i.find(".joms-like__counter--"+t)).html(+a.eq(0).text()+1),i.find(".joms-like__status").show()),e.attr("do-like",0))}}))},unlike:function(t){var o=Pv.find(".joms-js--stream-"+t);+o.attr("do-like")||(o.attr("do-like",1),joms.ajax({func:"system,ajaxStreamUnlike",data:[t],callback:function(o){var e,n,s,a,i;if(o.success&&(e=Pv.find(".joms-js--stream-"+t)).length){if((n=e.find(".joms-stream__actions").find(".joms-button--liked")).attr("onclick","joms.api.streamLike('"+t+"');"),n.removeClass("liked"),n.find("span").html(n.data("lang-like")),n.find("use").attr("xlink:href",window.location+"#joms-icon-thumbs-up"),s=e.find(".joms-stream__status"),o.html?s.length?s.html(o.html):(s=e.find(".joms-stream__actions"),(s=$("<div class=joms-stream__status />").insertAfter(s)).html(o.html)):s.remove(),(i=e.find(".joms-stream__status--mobile")).length){var c=+(a=i.find(".joms-like__counter--"+t)).eq(0).text()-1;a.html(c),0===c&&i.find(".joms-like__status").hide()}e.attr("do-like",0)}}}))},edit:function(t){var o=$(".joms-js--stream-"+t).eq(0).find(".joms-stream__body"),e=o.find(".colorful-status__container"),n=o.find("[data-type=stream-content]"),s=o.find("[data-type=stream-editor]"),a=s.find("textarea"),i=a.val();n.hide(),s.show(),a.removeData("joms-tagging"),a.jomsTagging(),a.off("reset.joms-tagging"),a.on("reset.joms-tagging",(function(){s.hide(),n.show(),a.val(i)})),!a.hasClass("limited")&&e.length&&(a.attr("maxlength",150),a.on("keydown",(function(t){13===t.keyCode&&4===a.val().split("\n").length&&t.preventDefault()})),a.addClass("limited")),a.focus()},save:function(t,o){var e=$(o).closest(".joms-js--stream").find(".joms-stream__body").find("[data-type=stream-editor]").find("textarea"),n=e.val();e[0].joms_hidden&&(n=e[0].joms_hidden.val()),function(t,o,e){joms.ajax({func:"activities,ajaxSaveStatus",data:[t,o],callback:function(o){var n=$(".joms-stream").filter("[data-stream-id="+t+"]").find(".joms-stream__body"),s=n.find("[data-type=stream-content]"),a=n.find(".colorful-status__container"),i=n.find("[data-type=stream-editor]"),c=i.find("textarea");o.success?(a.length?a.find(".colorful-status__inner").html(o.data):s.html("<span>"+o.data+"</span>"),s.html("<span>"+o.data+"</span>"),c.val(o.unparsed)):c.val(e),i.hide(),a.length||s.show(),joms.parseEmoji()}})}(t,n,n)},cancel:function(t){var o=$(".joms-js--stream-"+t).find(".joms-stream__body"),e=o.find("[data-type=stream-content]");o.find("[data-type=stream-editor]").hide(),e.show()},editLocation:function(t){Bv.editLocation(t)},remove:function(t){Bv.remove(t)},removeLocation:function(t){Bv.removeLocation(t)},removeMood:function(t){Bv.removeMood(t)},removeTag:function(t){joms.ajax({func:"activities,ajaxRemoveUserTag",data:[t,"post"],callback:function(o){var e,n,s,a,i;o.success&&(n=(e=$(".joms-js--stream-"+t)).find(".joms-stream__body"),s=e.find(".joms-list__options").find(".joms-dropdown").find(".joms-js--contextmenu-removetag"),a=n.find("[data-type=stream-content]"),i=n.find("[data-type=stream-editor]").find("textarea"),a.html("<span>"+o.data+"</span>"),i.val(o.unparsed),s.remove())}})},selectPrivacy:function(t){Bv.selectPrivacy(t)},share:function(t){Bv.share(t)},hide:function(t,o){joms.ajax({func:"activities,ajaxHideStatus",data:[t,o],callback:function(o){var e;o.success&&(e=Pv.find(".joms-stream[data-stream-id="+t+"]")).fadeOut(500,(function(){e.remove()}))}})},ignoreUser:function(t){Bv.ignoreUser(t)},showLikes:function(t,o){"popup"!==o?joms.ajax({func:"system,ajaxStreamShowLikes",data:[t],callback:function(o){o.success&&Pv.find(".joms-stream[data-stream-id="+t+"]").find(".joms-stream__status").html(o.html||"")}}):Bv.showLikes(t,o)},showComments:function(t,o){Bv.showComments(t,o)},showOthers:function(t){Bv.showOthers(t)},report:function(t,o){Bv.report(t,o)},toggleText:function(t){var o=$(".joms-js--stream-text-"+t),e=$(".joms-js--stream-textfull-"+t),n=$(".joms-js--stream-texttoggle-"+t);e.is(":visible")?(e.hide(),o.show(),n.html(n.data("lang-more"))):(o.hide(),e.show(),n.html(n.data("lang-less")))},addFeatured:function(t){Bv.addFeatured(t)},removeFeatured:function(t){Bv.removeFeatured(t)},react:function(t,o,e){var n=function(t){return joms.getData("joms_reaction").filter((function(o){return o.id==t})).pop()}(o),s=n.text,a="reaction-btn--"+n.name,i=$(".joms-button--reaction[data-uid="+t+"][data-type=stream]");i.removeClass(["reaction-btn--like","reaction-btn--love","reaction-btn--haha","reaction-btn--wow","reaction-btn--sad","reaction-btn--angry"].join(" ")),"onBar"===e&&(i.addClass("reaction-btn--animate"),setTimeout((function(){i.removeClass("reaction-btn--animate")}),200)),i.addClass(a),i.text(s),i.attr("data-reactid",o),i.attr("data-action","unreact"),i.attr("onclick","javascript:;"),joms.ajax({func:"system,ajaxStreamAddLike",data:[t,"",o],callback:function(e){if(e){var n=i.parents(".joms-stream__actions").siblings(".joms-stream__status");n.show(),n.html(e.html);var s="joms.view.stream.unreact("+t+", "+o+")";i.attr("onclick",s)}}})},unreact:function(t,o){var e=$(".joms-stream__actions .joms-button--reaction[data-uid="+t+"][data-type=stream]"),n=e.attr("data-lang-like");e.removeClass(["reaction-btn--like","reaction-btn--love","reaction-btn--haha","reaction-btn--wow","reaction-btn--sad","reaction-btn--angry"].join(" ")),e.text(n),e.attr("data-reactid",1),e.attr("data-action","react"),e.attr("onclick","javascript:;"),joms.ajax({func:"system,ajaxStreamUnlike",data:[t,"",o],callback:function(o){if(o){var n=e.parents(".joms-stream__actions").siblings(".joms-stream__status");o.html||n.hide(),n.html(o.html);var s="joms.view.stream.react("+t+", 1)";e.attr("onclick",s)}}})}};var Dv,qv=0,Vv=0,zv=0,Gv={},Wv=!1,Qv=0,Jv="mouseover.joms-hcard",Kv="mouseout.joms-hcard",Xv="img[data-author]";function Zv(t){var o=$(t.target),e=o.data("author");if(o.removeAttr("title"),ob(),Wv=!0,Qv=e,clearTimeout(Vv),Gv[e])return clearTimeout(qv),void(qv=setTimeout((function(){Wv&&eb(Gv[e],o)}),100));joms.ajax({func:"profile,ajaxFetchCard",data:[e],callback:function(t){t.html&&(Gv[e]=t.html,clearTimeout(qv),Wv&&Qv==e&&eb(t.html,o))}})}function tb(){Wv=!1,clearTimeout(qv),Vv=setTimeout((function(){Dv&&ob()}),100)}function ob(){clearTimeout(zv),Dv&&Dv.css({display:"none",opacity:0})}function eb(t,o){var e,n=$(document),s=o.offset(),a=o.width(),i=o.height(),c=window.innerWidth,l=window.innerHeight+n.scrollTop(),p=s.left+320<c,r=s.top+i+10;Dv.html(t),e=Dv.height(),r+e>l&&(r=s.top-e-4),Dv.css({top:r-10,left:p?s.left:"",right:p?"":c-s.left-a,display:"block",opacity:0}),zv=setTimeout((function(){Dv.css({top:r,opacity:1})}),300)}const nb={initialize:function(){joms.mobile||((Dv=$("<div>Loading...</div>")).css({position:"absolute",zIndex:2e3,display:"none",opacity:0,transition:"opacity 300ms, top 300ms"}),Dv.appendTo(document.body),Dv.on(Jv,(function(){clearTimeout(Vv)})),Dv.on(Kv,tb),$(document.body).off(Jv).off(Kv).on(Jv,Xv,Zv).on(Kv,Xv,tb))}};var sb=[];function ab(t,o){var e=0,n=o.length;o.each((function(s){var a,i,c,l;for(a=0,l=e;l<=s;l++)a+=(i=o.eq(l).data()).width/i.height;if((c=t/a)<=180){for(l=e;l<=s;l++)o.eq(l).find("img").css({height:c});e=s+1}else if(l===n)for(l=e;l<=n;l++)o.eq(l).nextAll().addBack().css({height:180}).find("img").css({height:c})})),o.css("border","1px solid transparent"),setTimeout((function(){o.css("border","")}))}$(window).resize(joms._.debounce((function(){!function(){var t,o;for(t=0;t<sb.length;t++)ab((o=sb[t]).width(),o.children())}()}),500));const ib={arrange:function(t){var o=t.children(),e=t.width();o.css({display:"block",float:"left",margin:"1px 0",overflow:"hidden",padding:0,position:"relative"}).each((function(){var t=$(this);t.data({width:t.width(),height:t.height()})})),ab(e,o),sb.push(t)}};var cb={_initMediaElement:function(t,o,e){"file"===o&&"flv"===e.fileType?Et("flowplayer",(function(){window.flowplayer(t,{src:joms.ASSETS_URL+"flowplayer/flowplayer-3.2.7.swf",wmode:"opaque"},{streamingServer:"lighttpd",playlist:[{url:e.filePath,autoPlay:!1,autoBuffering:!0,provider:"lighttpd",scaling:"scale"}],plugins:{lighttpd:{url:joms.ASSETS_URL+"flowplayer/flowplayer.pseudostreaming-3.2.7.swf",queryString:window.escape("?target=${start}")},controls:{url:joms.ASSETS_URL+"flowplayer/flowplayer.controls-3.2.5.swf"}}})})):Et("mediaelement",(function(){var e=$("#"+t).css({visibility:""}),n={iPadUseNativeControls:"file"===o,iPhoneUseNativeControls:"file"===o,success:function(t,o,e){setTimeout((function(){e.disableControls(),e.enableControls()}),1),"flash"===t.pluginType?t.addEventListener("canplay",(function(){t.play()}),!1):(!joms.mobile||"youtube"!==t.pluginType&&"vimeo"!==t.pluginType)&&t.play()}};"youtube"===o&&(n.defaultVideoWidth=e.width(),n.defaultVideoHeight=e.height()),e.mediaelementplayer(n)}))},responsivePlayer:function(t,o){var e,n,s,a,i=t.find(".joms-media__thumbnail"),c=$('<div class="joms-media__responsive-player"></div>');s=(n=(e=t.width())/(a=o.width/o.height||16/9))>500?(n=500)*a:e,c.css({width:s,height:n,margin:"0 auto"}),t.addClass("being-played"),c.html('<iframe src="'+o.src+'" width="'+s+'" height="'+n+'" '+o.options+'"></iframe>'),i.html(c)},_play_file:function(t,o){var e,n,s,a=t.find(".joms-media__thumbnail");n=joms._.uniqueId("joms-js--video-"),e="flv"==(s=o.path.match(/\.flv$/)?"flv":"mp4")?$('<div class="flowplayer" id="'+n+'" style="width:100%;height:281px;"></div>'):$('<video id="'+n+'" width="480" height="360" preload="metadata" autoplay="autoplay"><source src="'+o.path+'" type="video/mp4" /></video>'),t.addClass("being-played"),a.html(e),cb._initMediaElement(n,o.type,{fileType:s,filePath:o.path})},_play_youtube:function(t,o){window.joms_videoplayer_native?cb._play_YoutubeNativePlayer(t,o):cb._play_YoutubeJomsPlayer(t,o)},_play_YoutubeJomsPlayer:function(t,o){var e,n,s,a;e=joms._.uniqueId("joms-js--video-"),n=o.path,joms.ios&&(n=(n=n.replace(/#.*$/,"")).replace(/&t=\d+/,"")),(s=$('<video id="'+e+'" controls="control" preload="none"><source src="'+n+'" type="video/youtube" /></video>')).css({visibility:"hidden"}),(a=t.find(".joms-media__thumbnail")).length||(a=t),t.addClass("being-played"),a.html(s),cb._initMediaElement(e,o.type)},_play_YoutubeNativePlayer:function(t,o){var e=t.find(".joms-media__thumbnail");e.length||(e=t),t.addClass("being-played joms-media--video-native"),e.html('<iframe src="//www.youtube.com/embed/'+o.id+'?autoplay=1&rel=0" width="500" height="281" frameborder="0" allowfullscreen allow="autoplay; encrypted-media"></iframe>')},_play_vimeo:function(t,o){o.src="//player.vimeo.com/video/"+o.id+"?autoplay=1",o.options='frameborder="0" webkitallowfullscreen mozallowfullscreen allowfullscreen',cb.responsivePlayer(t,o)},_play_myspace:function(t,o){var e=t.find(".joms-media__thumbnail"),n="https://media.myspace.com/play/video/"+o.id;t.addClass("being-played"),e.html('<iframe src="'+n+'" frameborder="0" width="500" height="281" AllowFullScreen></iframe>')},_play_blip:function(t,o){var e=t.find(".joms-media__thumbnail"),n="//blip.tv/play/"+o.id;t.addClass("being-played"),e.html('<iframe src="'+n+'" width="500" height="281" frameborder="0" allowfullscreen></iframe>')},_play_dailymotion:function(t,o){var e=t.find(".joms-media__thumbnail");t.addClass("being-played"),e.html('<iframe frameborder="0" width="500" height="270" src="//www.dailymotion.com/embed/video/'+o.id+'?autoPlay=1" allowfullscreen="" allow="autoplay"></iframe>')},_play_liveleak:function(t,o){var e=t.find(".joms-media__thumbnail"),n="//www.liveleak.com/ll_embed?i="+o.id;t.addClass("being-played"),e.html('<iframe src="'+n+'" width="500" height="281" frameborder="0" allowfullscreen></iframe>')},_play_yahoo:function(t,o){var e=t.find(".joms-media__thumbnail"),n=o.path;n=n.replace("www.yahoo.com/movies/v","movies.yahoo.com/video"),n+="?format=embed&player_autoplay=true",t.addClass("being-played"),e.html('<iframe src="'+n+'" width="500" height="281" frameborder="0" allowfullscreen="true" mozallowfullscreen="true" webkitallowfullscreen="true" allowtransparency="true"></iframe>')},_play_metacafe:function(t,o){var e=t.find(".joms-media__thumbnail"),n="http://www.metacafe.com/embed/"+o.id+"/";t.addClass("being-played"),e.html('<iframe src="'+n+'" width="500" height="281" frameborder="0" allowfullscreen></iframe>')},_play_funnyordie:function(t,o){var e=t.find(".joms-media__thumbnail"),n="//www.funnyordie.com/embed/"+o.id+"/";t.addClass("being-played"),e.html('<iframe src="'+n+'" width="500" height="300" frameborder="0" allowfullscreen webkitallowfullscreen mozallowfullscreen></iframe>')},_play_collegehumor:function(t,o){var e=t.find(".joms-media__thumbnail"),n="http://www.collegehumor.com/e/"+o.id;t.addClass("being-played"),e.html('<iframe src="'+n+'" width="500" height="281" frameborder="0" allowfullscreen webkitallowfullscreen mozallowfullscreen></iframe>')},_play_flickr:function(t,o){var e=t.find(".joms-media__thumbnail"),n="https://www.flickr.com/photos/"+o.id;t.addClass("being-played"),e.html('<a data-flickr-embed="true" href="'+n+'" ><img src="https://farm2.staticflickr.com/1729/42437754852_936a2d5e9f_b.jpg" width="1024" height="576" alt="flickr"></a><script async src="https://embedr.flickr.com/assets/client-code.js" charset="utf-8"><\/script>')},_play_dotsub:function(t,o){var e=t.find(".joms-media__thumbnail"),n="https://dotsub.com/media/"+o.id+"/embed/";t.addClass("being-played"),e.html('<iframe src="'+n+'" frameborder="0" width="500" height="281" AllowFullScreen></iframe>')},_play_gloria:function(t,o){var e=t.find(".joms-media__thumbnail"),n="https://gloria.tv/video/"+o.id+"/embed/";t.addClass("being-played"),e.html('<iframe src="'+n+'" frameborder="0" width="500" height="265" AllowFullScreen></iframe>')},_play_sapo:function(t,o){var e=t.find(".joms-media__thumbnail"),n="http://rd.videos.sapo.pt/playhtml?file=http://rd.videos.sapo.pt/"+o.id+"/mov/1";t.addClass("being-played"),e.html('<iframe src="'+n+'" frameborder="0" width="500" height="265" AllowFullScreen></iframe>')},_play_facebook:function(t,o){console.log(o),o.src="https://www.facebook.com/plugins/video.php?href="+encodeURIComponent("https://www.facebook.com/watch/?v="+o.id)+"&show_text=false",o.options='style="border:none;overflow:hidden" scrolling="no" frameborder="0" allowTransparency="true" allow="encrypted-media"',cb.responsivePlayer(t,o)},_play_soundcloud:function(t,o){var e=t.find(".joms-media__thumbnail"),n="https://w.soundcloud.com/player/?url=https%3A//api.soundcloud.com/tracks/"+o.id+"&color=%23ff5500&auto_play=true&hide_related=false&show_comments=false&show_user=false&show_reposts=false&show_teaser=true&visual=true";t.addClass("being-played"),e.html('<iframe src="'+n+'" width="100%" height="166" scrolling="no" frameborder="no" allow="autoplay" ></iframe>')},_play_godtube:function(t,o){var e=t.find(".joms-media__thumbnail"),n=o.id.split("|"),s=(n[0],n[1]),a=n[2];if("godtube"===s){t.addClass("being-played");var i="https://www.godtube.com/embed/watch/"+n[0].toLowerCase()+"/?w=728&h=408&ap=true&sl=true&title=true&dp=true";e.html('<iframe width="500" height="250" aspectratio="16:9" frameborder="0" scrolling="no" src="'+i+'"></iframe>"')}else if("youtube"===s){t.addClass("being-played");var c={id:a,path:"https://www.youtube.com/watch?v="+a,type:s};cb._play_youtube(t,c)}else cb._play_other(t,o)},_play_rutube:function(t,o){var e=t.find(".joms-media__thumbnail"),n="//rutube.ru/play/embed/"+o.id;t.addClass("being-played"),e.html('<iframe src="'+n+'" frameborder="0" width="500" height="265" AllowFullScreen></iframe>')},_play_ku6:function(t,o){var e=t.find(".joms-media__thumbnail");t.addClass("being-played"),e.html('<iframe src="'+o.id+'" frameborder="0" width="500" height="265" AllowFullScreen></iframe>')},_play_twitch:function(t,o){var e,n=t.find(".joms-media__thumbnail"),s=o.id.split("|")[0],a=o.id.split("|")[1];t.addClass("being-played"),e="clip"===a?"https://clips.twitch.tv/embed?autoplay=true&clip="+s+"&parent="+location.hostname:"https://player.twitch.tv/?autoplay=true&video="+s+"&parent="+location.hostname,n.html('<iframe src="'+e+'" frameborder="0" allowfullscreen="true" scrolling="no" height="265" width="500"></iframe>')},_play_flic:function(t,o){cb._play_flickr(t,o)},_play_vbox7:function(t,o){var e=t.find(".joms-media__thumbnail"),n="https://www.vbox7.com/emb/external.php?vid="+o.id+"&autoplay=1";t.addClass("being-played"),e.html('<iframe src="'+n+'" frameborder="0" allowtransparency="true" webkitallowfullscreen mozallowfullscreen allowfullscreen height="265" width="500"></iframe>')},_play_veoh:function(t,o){var e=t.find(".joms-media__thumbnail");t.addClass("being-played"),e.html(['<object width="500" height="280">','<embed src="http://www.veoh.com/swf/webplayer/WebPlayer.swf?version=AFrontend.5.7.0.1509&permalinkId='+o.id+'&player=videodetailsembedded&videoAutoPlay=1&id=anonymous"','type="application/x-shockwave-flash"','allowscriptaccess="always"','allowfullscreen="true"','width="500"','height="280"',">","</embed>","</object>"].join(""))},_play_videa:function(t,o){var e=t.find(".joms-media__thumbnail");t.addClass("being-played"),e.html('<iframe width="500" height="280" src="//videa.hu/player?v='+o.id+'&autoplay=1" allowfullscreen="allowfullscreen" webkitallowfullscreen="webkitallowfullscreen" mozallowfullscreen="mozallowfullscreen" frameborder="0"></iframe>')},_play_youku:function(t,o){var e=t.find(".joms-media__thumbnail");t.addClass("being-played"),e.html('<iframe height=280 width=500 src="http://player.youku.com/embed/'+o.id+'" frameborder=0 allowfullscreen></iframe>')},_play_other:function(t,o){window.open(o.path)}};const lb={play:function(t,o){var e="_play_"+o.type;"function"==typeof cb[e]?cb[e](t,o):cb._play_other(t,o)}};var pb={},rb={},mb={},ub={},db={},jb={};function fb(t){var o,e=this,n=this.textarea.joms_data,s=n.tagId||n.id,a=(n.tagFunc||n.func||"").toLowerCase(),i=n.type||"",c=[];this.textarea.joms_friends?t(this.textarea.joms_friends):(a?(o="index.php?option=com_community&view=friends&task=ajaxAutocomplete",a.indexOf("album")>-1?o+="&albumid="+s:a.indexOf("photo")>-1?o+="&photoid="+s+"&rule=photo-comment":a.indexOf("video")>-1?o+="&videoid="+s:a.indexOf("discussion")>-1?o+="&discussionid="+s:a.indexOf("inbox")>-1?o+="&msgid="+s:i.match(/service\.comment\.joomla\.article/)&&(o+="&type=comment&streamid="+s)):(o="index.php?option=com_community&view=friends&task=ajaxAutocomplete&type=comment&streamid="+s,window.joms_group_id?o+="&groupid="+window.joms_group_id:window.joms_event_id&&(o+="&eventid="+window.joms_event_id)),this.fetchXHR&&this.fetchXHR.abort(),this.fetchXHR=$.ajax({url:joms.BASE_URL+o,dataType:"json",success:function(t){e.textarea.joms_friends=c=vb(t)},complete:function(){var o,n,s,a;if(c.length&&window.joms_friends.length)for(o=0,s=Math.min(c.length,30);o<s;o++)for(n=0,a=Math.min(window.joms_friends.length,30);n<a;n++)+c[o].id==+window.joms_friends[n].id&&(window.joms_friends[n].avatar=c[o].avatar,window.joms_friends[n].name=c[o].name);e.fetchXHR=!1,t(c)}}))}function vb(t){var o,e,n=[],s=[];if(t&&t.suggestions&&t.suggestions.length)for(e=0;e<t.suggestions.length;e++)o=""+t.data[e],n.indexOf(o)>=0||(n.push(o),s.push({id:o,name:t.suggestions[e],avatar:t.img[e].replace(/^.+src="([^"]+)".+$/,"$1"),type:"contact"}));return s}const bb={initInputbox:function(){$(document.body).find(".joms-js--newcomment").find("textarea.joms-textarea").each((function(){var t=$(this);t[0].joms_beautifier||(t[0].joms_data=t.data(),t.jomsTagging(fb))}))},fetchInputbox:fb,fetchFriendsInContext:function(){var t="index.php?option=com_community&view=friends&task=ajaxAutocomplete",o=[];window.joms_group_id?t+="&groupid="+window.joms_group_id:window.joms_event_id?t+="&eventid="+window.joms_event_id:t+="&allfriends=1",joms.jQuery.ajax({url:joms.BASE_URL+t,dataType:"json",success:function(t){o=vb(t)},complete:function(){window.joms_friends=o;var t=new CustomEvent("JomsFriendsFetched");document.dispatchEvent(t)}})},fetchGroupMembers:function(t,o){var e="index.php?option=com_community&view=friends&task=ajaxAutocomplete&groupid="+t;db[t]||(db[t]=[]),mb[t]?db[t].push(o):pb[t]?o(pb[t]):(mb[t]=!0,joms.jQuery.ajax({url:joms.BASE_URL+e,dataType:"json",success:function(o){pb[t]=vb(o)},complete:function(){for(o(pb[t]);db[t].length;)try{db[t].shift()(pb[t])}catch(t){}mb[t]=!1}}))},fetchEventMembers:function(t,o){var e="index.php?option=com_community&view=friends&task=ajaxAutocomplete&eventid="+t;jb[t]||(jb[t]=[]),ub[t]?jb[t].push(o):rb[t]?o(rb[t]):(ub[t]=!0,joms.jQuery.ajax({url:joms.BASE_URL+e,dataType:"json",success:function(o){rb[t]=vb(o)},complete:function(){for(o(rb[t]);jb[t].length;)try{jb[t].shift()(rb[t])}catch(t){}ub[t]=!1}}))}};var _b,hb,gb;function wb(){_b&&_b.off()}function yb(){var t=".joms-js--initialized";$(".joms-media--images").not(t).each((function(){var o=$(this),e=o.find("img"),n=0;e.each((function(){var s=$(this);$("<img>").on("load",(function(){++n===e.length&&(o.siblings(".joms-media--loading").remove(),o.addClass(t.substr(1)),e.show(),ib.arrange(o))})).attr("src",s.attr("src"))}))}))}function kb(){var t=".joms-js--initialized",o=".joms-js--video",e=$(".joms-stream__body").find(o).not(t).addClass(t.substr(1));e.length&&(joms.loadCSS(joms.ASSETS_URL+"vendors/mediaelement/mediaelementplayer.min.css"),e.on("click.joms-video",o+"-play",(function(){var t=$(this).closest(o);lb.play(t,t.data())})))}function Tb(){bb.initInputbox()}function xb(t){var o,e;return(o=_b.find(".joms-stream").not(".joms-stream--adagency")).length?(e=[],o.each((function(){e.push(+$(this).data("stream-id"))})),e["last"===t?e.length-1:0]):0}function Cb(){var t=_b.children(".joms-stream__container");return{filter:t.data("filter"),filterId:t.data("filterid"),filterValue:t.data("filter-value")}}function Mb(){var t,o,e=Mb;e.loading||((t=window.joms_newest_stream_id)?(o=Cb(),e.loading=!0,e.xhr&&e.xhr.abort(),e.xhr=joms.ajax({func:"activities,ajaxGetRecentActivitiesCount",data:[t,o.filter,o.filterId,o.filterValue],callback:function(t){var o,n=+t.count,s=+t.nextPingDelay,a=$(".joms-js--stream-latest");e.loading=!1,e.xhr=null,window.joms_postbox_posting||(n>0?((o=$('<a href="javascript:">'+t.html+"</a>")).on("click",Ob),a.html(o).show()):a.hide().empty()),s>0&&joms._.delay(Mb,s)}})):console.warn("Variable `window.joms_newest_stream_id` not found."))}function Ob(){var t,o,e=Ob;e.loading||(t=xb())&&(o=Cb(),e.loading=!0,e.xhr&&e.xhr.abort(),e.xhr=joms.ajax({func:"activities,ajaxGetRecentActivities",data:[t,o.filter,o.filterId,o.filterValue],callback:function(t){var o,n=$($.trim(t.html)).filter(".joms-stream__wrapper").find(".joms-stream"),s=$(".joms-js--stream-latest");if(t.newest_stream_id&&(window.joms_newest_stream_id=+t.newest_stream_id),e.loading=!1,n.length)for(o=n.length-1;o>=0;o--)$(".joms-js--stream-"+n.eq(o).data("stream-id")).length||_b.find(".joms-stream__container").prepend(n.eq(o));s.hide(),Tb(),yb(),kb()}}))}function Lb(t,o){var e;return e='<div data-stream-type="adagency" class="joms-stream joms-stream--adagency">',e+='<div class="joms-stream__header">',e+='<div class="joms-avatar--stream">',e+='<a href="'+o.on_click_url+'" target="_blank" onclick="window.open(\''+o.on_click_url+"'); return false;\">",e+='<img src="'+o.banner_avatar+'">',e+="</a>",e+="</div>",e+='<div class="joms-stream__meta">',e+='<a class="joms-stream__user" href="'+o.on_click_url+'" target="_blank" onclick="window.open(\''+o.on_click_url+"'); return false;\">"+o.banner_headline+"</a>",e+='<a href="'+o.on_click_url+'" target="_blank" onclick="window.open(\''+o.on_click_url+'\'); return false;"><span class="joms-stream__time"><small>'+(o.short_url_to_promote||o.url_to_promote)+"</small></span></a>",e+="</div>",e+="</div>",e+='<div class="joms-stream__body">',e+="<p>"+o.banner_text+"</p>",e+='<div class="joms-media--image">',e+='<a href="'+o.on_click_url+'" target="_blank" onclick="window.open(\''+o.on_click_url+"'); return false;\">",e+='<img src="'+o.banner_image_content+'">',e+="</a>",e+="</div>",e+="</div>",(+t.show_sponsored_stream_info||+t.show_create_ad_link)&&(e+='<div class="joms-stream__actions">',+t.show_sponsored_stream_info&&(e+='<span style="float:left">'+t.sponsored_stream_info_text+"</span>"),+t.show_create_ad_link&&(e+='<a href="'+t.create_ad_link+'" style="float:right">'+t.create_ad_link_text+"</a>"),e+='<div style="clear:both"></div>',e+="</div>"),e+"</div>"}function Ib(){var t,o,e,n,s,a,i;if(hb&&hb.config&&hb.ads&&hb.ads.length){if(t=hb.ads,o=hb.config,e=+o.display_stream_ads_after_value,n=+o.display_stream_ads_every_value,a=+o.display_stream_ads,s=0,!+window.joms_my_id)for(var c=t.length-1;c>=0;c--)+t[c].banner_access||t.splice(c,1);t.length&&(i={frontpage:"front_page_stream",profile:"profile_stream",pages:"pages_stream",groups:"group_stream",events:"event_stream"},(o.js_stream_ads_on||[]).indexOf(i[window.joms_page])<0||_b.find(".joms-stream").not(".joms-stream--adagency").each((function(i){var c,l;if(a){if(!e)return!1;if(i===e-1)return(l=(c=$(this)).next()).length&&l.hasClass("joms-stream--adagency")||(c.after(Lb(o,t[s])),Sb(t[s])),!1}else{if(!n)return!1;(i+1)%n==0&&((l=(c=$(this)).next()).length&&l.hasClass("joms-stream--adagency")||(c.after(Lb(o,t[s%t.length])),Sb(t[s%t.length])),s++)}})))}}function Sb(t){var o=[t.advertiser_id,t.campaign_id,t.banner_id,t.campaign_type].join("-");gb||(gb={}),gb[o]||(gb[o]=!0,joms.ajax({func:"system,ajaxAdagencyGetImpression",data:[t.advertiser_id,t.campaign_id,t.banner_id,t.campaign_type],callback:function(){}}))}const Ub={start:function(){if(wb(),(_b=$(".joms-stream__wrapper")).length){Tb(),yb(),kb(),window.joms_singleactivity||window.joms_filter_keyword||(+window.joms_adagency&&joms.ajax({func:"system,ajaxGetAdagency",callback:function(t){(hb=t||{}).ads&&hb.ads.length&&(hb.ads=joms._.shuffle(hb.ads)),Ib()}}),+window.joms_infinitescroll&&function(){var t,o,e,n,s;if(joms.mobile)return!1;$(".joms-stream__loadmore").find("a").hide(),o=$(window),e=$(document),n=Math.max(+window.joms_autoloadtrigger||0,20),s=0,t=function(){var a,i,c,l=o.scrollTop(),p=o.height();a=l<s?"up":"down",s=l,"down"===a&&(l+p<e.height()-n||t.loading||(t.loading=!0,_b.find(".joms-stream__loadmore .loading").show(),(i=xb("last"))&&(c=Cb(),joms.ajax({func:"activities,ajaxGetOlderActivities",data:[i,c.filter,c.filterId,c.filterValue],callback:function(o){var e,n=!1;_b.find(".joms-stream__loadmore .loading").hide(),o.html&&((e=$($.trim(o.html)).filter(".joms-stream__wrapper").find(".joms-stream")).length?_b.find(".joms-stream__container").append(e):n=!0),Tb(),yb(),kb(),Ib(),joms.parseEmoji(),n||(t.loading=!1)}}))))},o.on("scroll",t)}(),+window.joms_enable_refresh&&Mb());var t=document.getElementsByClassName("joms-activity-filter-action");t&&t.length&&window.FastClick.attach(t[0])}},stop:wb,loadMore:function t(){var o,e,n,s,a=t;a.loading||(o=xb("last"))&&(e=Cb(),a.loading=!0,n=_b.find("#activity-more"),s=n.find(".loading"),(n=n.find(".joms-button--primary")).hide(),s.show(),joms.ajax({func:"activities,ajaxGetOlderActivities",data:[o,e.filter,e.filterId,e.filterValue],callback:function(t){var o,e=!1;a.loading=!1,s.hide(),t.html&&((o=$($.trim(t.html)).filter(".joms-stream__wrapper").find(".joms-stream")).length?_b.find(".joms-stream__container").append(o):e=!0),Tb(),yb(),kb(),Ib(),joms.parseEmoji(),e||n.show()}}))}};var $b=e(6540),Eb=e(5338),Nb=e(410),Ab=e(3324);const Rb=function(){return $b.createElement(Ab.A,{data:Nb,onEmojiSelect:function(t){var o;null!=(o=t)&&w_.smileyCallback(o.native)},previewPosition:"none"})},Yb=function(){return $b.createElement("div",null,"sticker picker")},Bb=function(){return $b.createElement("div",null,$b.createElement("div",null,"gif picker"),$b.createElement("div",null,"gif picker"),$b.createElement("div",null,"gif picker"),$b.createElement("div",null,"gif picker"),$b.createElement("div",null,"gif picker"))};var Pb=e(8689),Hb=e(3734);function Fb(t){return Fb="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Fb(t)}function Db(t,o){var e=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);o&&(n=n.filter((function(o){return Object.getOwnPropertyDescriptor(t,o).enumerable}))),e.push.apply(e,n)}return e}function qb(t){for(var o=1;o<arguments.length;o++){var e=null!=arguments[o]?arguments[o]:{};o%2?Db(Object(e),!0).forEach((function(o){Vb(t,o,e[o])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(e)):Db(Object(e)).forEach((function(o){Object.defineProperty(t,o,Object.getOwnPropertyDescriptor(e,o))}))}return t}function Vb(t,o,e){return(o=function(t){var o=function(t,o){if("object"!=Fb(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var n=e.call(t,"string");if("object"!=Fb(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==Fb(o)?o:o+""}(o))in t?Object.defineProperty(t,o,{value:e,enumerable:!0,configurable:!0,writable:!0}):t[o]=e,t}function zb(t,o){return function(t){if(Array.isArray(t))return t}(t)||function(t,o){var e=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null!=e){var n,s,a,i,c=[],l=!0,p=!1;try{if(a=(e=e.call(t)).next,0===o){if(Object(e)!==e)return;l=!1}else for(;!(l=(n=a.call(e)).done)&&(c.push(n.value),c.length!==o);l=!0);}catch(t){p=!0,s=t}finally{try{if(!l&&null!=e.return&&(i=e.return(),Object(i)!==i))return}finally{if(p)throw s}}return c}}(t,o)||function(t,o){if(t){if("string"==typeof t)return Gb(t,o);var e={}.toString.call(t).slice(8,-1);return"Object"===e&&t.constructor&&(e=t.constructor.name),"Map"===e||"Set"===e?Array.from(t):"Arguments"===e||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(e)?Gb(t,o):void 0}}(t,o)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function Gb(t,o){(null==o||o>t.length)&&(o=t.length);for(var e=0,n=Array(o);e<o;e++)n[e]=t[e];return n}var Wb,Qb,Jb,Kb,Xb,Zb,t_,o_,e_=document.querySelector("body"),n_=document.createElement("div");function s_(){var t=zb((0,$b.useState)(!1),2),o=t[0],e=t[1],n=zb((0,$b.useState)(!1),2),s=n[0],a=n[1],i=(0,Pb.we)({placement:"top",middleware:[(0,Hb.BN)({padding:10}),(0,Hb.cY)(15)]}),c=i.refs,l=i.floatingStyles,p=i.update;(0,$b.useEffect)((function(){function t(){document.querySelectorAll(".joms-icon--active").forEach((function(t){return t.classList.remove("joms-icon--active")}))}function n(o){var n=o.detail;if(n.forceClose)return t(),e(!1),void a(!1);var s=n.el.closest(".joms-icon--emoticon");s.classList.contains("joms-icon--active")||(t(),s.classList.add("joms-icon--active"),c.setReference(s),e(!0),setTimeout((function(){p(),setTimeout((function(){a(!0)}))})))}function s(){e(!1),a(!1)}function i(o){var e=o.target;e.closest(".joms-icon--active")||e.closest("#joms-comment-floating-container")||(t(),s())}function l(){o&&(t(),s())}return document.addEventListener("toggleCommentFloatingElement",n),document.addEventListener("click",i),window.addEventListener("resize",l),function(){document.removeEventListener("toggleCommentFloatingElement",n),document.removeEventListener("click",i),window.removeEventListener("resize",l)}}));var r=[{text:"Emoji",value:"emoji"},{text:"Sticker",value:"sticker"},{text:"GIF",value:"gif"}].map((function(t){return t.value})),m=sessionStorage.getItem("joms-comment-floating-element-type"),u=r.includes(m)?m:"emoji",d=zb((0,$b.useState)(u),2),j=d[0];return d[1],$b.createElement($b.Fragment,null,o&&$b.createElement("div",{className:"comment-floating-element",ref:c.setFloating,style:qb(qb({},l),{},{visibility:s?"visible":"hidden"})},$b.createElement("div",{className:"comment-floating-nav"}),$b.createElement("div",{className:"comment-floating-content"},"emoji"===j&&$b.createElement("div",{className:"emoji-content-item"},$b.createElement(Rb,null)),"sticker"===j&&$b.createElement("div",{className:"sticker-content-item"},$b.createElement(Yb,null)),"gif"===j&&$b.createElement("div",{className:"gif-content-item"},$b.createElement(Bb,null)))))}function a_(){Wb&&(Wb.off("keydown.joms-comment",".joms-comment__reply textarea"),Wb.off("focus.joms-comment",".joms-comment__reply textarea"),Wb.off("focus.joms-comment",".joms-js--pm-message textarea"),Wb.off("click.joms-comment",".joms-comment__reply .joms-js--btn-send"),Wb.off("click.joms-comment",".joms-js--inbox-reply .joms-js--btn-send"),Wb.off("click.joms-comment",".joms-comment__more"))}function i_(){bb.initInputbox()}function c_(){var t=".joms-js--initialized",o=".joms-js--video",e=$(".joms-comment__body,.joms-js--inbox").find(o).not(t).addClass(t.substr(1));e.length&&(joms.loadCSS(joms.ASSETS_URL+"vendors/mediaelement/mediaelementplayer.min.css"),e.on("click.joms-video",o+"-play",(function(){var t=$(this).closest(o);lb.play(t,t.data())})),joms.ios&&setTimeout((function(){e.find(o+"-play").click()}),2e3))}function l_(t){if(13===(t.keyCode||t.charCode)&&!t.shiftKey&&!$(t.target).data("noentersend")&&!joms.mobile)return setTimeout((function(){m_(t)}),100),!1}function p_(t){var o=$(t.target).closest(".joms-textarea__wrapper").find(".joms-textarea__attachment");o.length&&(Zb=o)}function r_(t){m_({currentTarget:$(t.currentTarget).closest(".joms-comment__reply,.joms-js--inbox-reply").find("textarea")[0]})}function m_(t){var o,e,n,s,a=$(t.currentTarget),i=a.val()||"",c=+a.data("edit");if(a[0].joms_hidden&&(i=a[0].joms_hidden.val()||i),""!==i.replace(/^\s+|\s+$/g,"")||(s=a.siblings(".joms-textarea__attachment")).length&&s.is(":visible")){o=+a.data("id"),e=a.data("func")||"",n=a.data("type")||"";var l=new CustomEvent("toggleCommentFloatingElement",{detail:{forceClose:!0}});document.dispatchEvent(l),c?function(t,o,e,n,s,a){var i,c,l,p,r,m=e;t.data("saving")||(t.data("saving",1),(i=t.siblings(".joms-textarea__attachment")).is(":visible")?(c=i.find(".joms-textarea__attachment--thumbnail").find("img"),l=c.attr("src"),c=c.data("photo_id")||"0"):c=i.data("no_thumb")?"0":"-1",m?(p=[o,s,e,c],e="system,ajaxUpdateWall"):(e="system,ajaxeditComment",p=[o,s,c]),(r=$(t).siblings(".joms-textarea__loading")).show(),joms.ajax({func:e,data:p,callback:function(e){var n,s,i;r.hide(),e.success&&(s=(n=$(".joms-js--comment-"+o)).find(".joms-js--comment-body"),i=$(".joms-js--newcomment-"+n.data("parent")),n.find(".joms-js--comment-editor").hide().find("textarea").val(e.originalComment||""),n.find(".joms-js--comment-content").html(e.comment||""),n.find(".joms-js--comment-actions").show(),s.show(),i.show(),(+c<0||+c>0)&&(s.children(".joms-js--comment-content").next("div").remove(),+c>0&&l&&s.children(".joms-js--comment-content").after(['<div style="padding:5px 0">','<a href="javascript:" onclick="joms.api.photoZoom(\'',l,"');\">",'<img class="joms-stream-thumb" src="',l,'">',"</a>","</div>"].join(""))),joms.parseEmoji()),e.error&&alert(e.error),a();try{t.blur()}catch(t){}t.removeData("saving"),t_&&t_.siblings("svg").removeData("disabled").css("opacity","")}}))}(a,o,e,0,i,(function(){c_(),u_(a,"edit")})):function(t,o,e,n,s,a){var i,c,l,p,r=e,m=!1,u=!1,d=!1,j=!1,f=!1,v=!1;t.data("saving")||(t.data("saving",1),r&&((l=e.toLowerCase()).indexOf("album")>-1||(l.indexOf("photo")>-1||(l.indexOf("video")>-1?m=!0:l.indexOf("discussion")>-1?u=!0:l.indexOf("inbox")>-1?d=!0:l.indexOf("wall")&&(j=!0)))),(c=Zb)&&c.is(":visible")&&(v=(f=c.find(".joms-textarea__attachment--thumbnail").find("img")).siblings("b"),f.is(":visible")?(f=f.data("photo_id"),v=""):v.is(":visible")&&(v=v.data("id"),f="")),f=f||"",v=v||"",r?i=m||u?[s,o,f]:d?[o,s,f,v]:j?[n,o,s,f]:[s,o,"",f]:(e="system,ajaxStreamAddComment",i=[o,s,f]),(p=$(t).siblings(".joms-textarea__loading")).show(),joms.ajax({func:e,data:i,callback:function(e){var n;if(p.hide(),e.success){if(d)return function(t){var o,e,n,s,a,i,c,l,p,r;for(o=$(".joms-js--inbox"),e=$(".joms-js--inbox-status"),s=(n=$(".joms-js--inbox-reply")).find("textarea"),i=n.find(".joms-textarea__attachment"),t=$($.trim(t)),c=window.location.href.split("#")[0],l=t.find("use"),r=0;r<l.length;r++)p=c+"#"+(p=l.eq(r).attr("xlink:href").split("#")[1]),l.eq(r).attr("xlink:href",p);o.append(t),s.length&&((a=s.data("joms-tagging"))?a.clear():s.val("")),i.length&&i.hide(),e.length&&e.html("<span>"+e.data("lang-notseen")+"</span>"),c_()}(e.html),t.removeData("saving"),void(t_&&t_.siblings("svg").removeData("disabled").css("opacity",""));$(".joms-js--comments-"+o).append(e.html||""),(n=$(".joms-comment__counter--"+o)).html(+n.eq(0).text()+1),n.parents(".joms-comment__status").show(),joms.parseEmoji()}a(),t.removeData("saving"),t_&&t_.siblings("svg").removeData("disabled").css("opacity",""),e.error&&window.alert(e.error)}}))}(a,o,e,n,i,(function(){a.val(""),c_(),u_(a)}))}else alert(joms_lang.COM_COMMUNITY_CANNOT_EDIT_COMMENT_ERROR)}function u_(t,o){"edit"!==o&&t.closest(".joms-comment__reply").find(".joms-textarea__attachment").hide(),(t=t[0]).joms_reset&&t.joms_reset(),t.joms_beautifier&&"none"!==t.joms_beautifier&&t.joms_beautifier.html(""),t.joms_hidden&&t.joms_hidden.val(t.value)}function d_(t){var o=$(t.currentTarget).closest(".joms-js--comments"),e=o.data("type")||"",n=+o.data("id"),s=o.children(".joms-js--comment").length,a=window.joms_prev_comment_load;n&&joms.ajax({func:"system,ajaxStreamShowComments",data:[n,e,s,a],callback:function(t){var o,s,a,i,c;t.success&&(o=$($.trim(t.html)),e&&(o=o.filter(".joms-js--comments").children()),(s=$(".joms-js--comments-"+n)).find(".joms-js--comment").remove(),s.append(o),t.total=+t.total,(a=Math.max(0,t.total-s.children(".joms-js--comment").length))>0?(c=(i=s.find(".joms-js--more-comments a")).data("lang")||window.joms_lang.COM_COMMUNITY_SHOW_PREVIOUS_COMMENTS+" (%d)")&&i.text(c.replace("%d",a)):s.find(".joms-js--more-comments").remove(),c_(),joms.parseEmoji())}})}function j_(t,o){if("function"!=typeof o&&(o=function(){}),Qb)return Zb=t&&t.find(".joms-textarea__attachment"),void o();Et("plupload",(function(){setTimeout((function(){var e;e=$('<div id="joms-js--attachment-uploader" aria-hidden="true" style="width:1px; height:1px; overflow:hidden">').appendTo(document.body),$('<button id="joms-js--attachment-uploader-button">').appendTo(e),(Qb=new window.plupload.Uploader({url:joms.BASE_URL+"index.php?option=com_community&view=photos&task=ajaxPreviewComment",container:"joms-js--attachment-uploader",browse_button:"joms-js--attachment-uploader-button",runtimes:"html5,html4",multi_selection:!1})).bind("FilesAdded",f_),Qb.bind("BeforeUpload",v_),Qb.bind("Error",b_),Qb.bind("FileUploaded",__),Qb.init(),Zb=t&&t.find(".joms-textarea__attachment"),Xb=e.find("input[type=file]"),o()}))}))}function f_(t){o_=!1,window.setTimeout((function(){var o=Zb,e=o.find(".joms-textarea__attachment--loading"),n=o.find(".joms-textarea__attachment--thumbnail"),s=o.find("button");o_||(t.start(),t.refresh(),n.find("img").replaceWith("<img>"),n.hide(),s.hide(),e.show(),o.show(),t_.siblings("svg").data("disabled",1).css("opacity",.5))}),0)}function v_(t){var o,e="";for(o in Kb)e+="&"+o+"="+Kb[o];t.settings.url+=e}function b_(t,o){o_=!0,window.alert(o&&o.message||"Undefined error.")}function __(t,o,e){var n,s,a,i,c,l,p;try{n=JSON.parse(e.response)}catch(t){}return n||(n={}),s=Zb,n.error||n.msg?(window.alert(n.error||n.msg),void s.hide()):n.thumb_url&&n.photo_id||n.id?(a=s.find(".joms-textarea__attachment--loading"),l=(i=s.find(".joms-textarea__attachment--thumbnail")).find("img"),c=s.find("button"),"file"===Jb?(p=$("<b>"+o.name+"</b>").data({id:n.id,path:n.path,name:o.name}),l.removeData("photo_id"),l.hide().siblings("b").remove(),l.after(p)):(l.siblings("b").remove(),l.attr("src",n.thumb_url),l.data("photo_id",n.photo_id).show()),a.hide(),i.show(),c.show(),void s.show()):(window.alert("Undefined error."),void s.hide())}function h_(t,o){var e,n,s;o?(e=$(".joms-js--inbox-item-"+t),o=$($.trim(o)),s=window.location.href.split("#")[0]+"#"+(s=(n=o.find("use")).attr("xlink:href").split("#")[1]),n.attr("xlink:href",s),e.replaceWith(o),c_()):g_(t)}function g_(t){var o;(o=$(".joms-js--inbox-item-"+t)).fadeOut(500,(function(){o.remove()}))}n_.id="joms-comment-floating-container",n_.style.setProperty("position","relative"),n_.style.setProperty("z-index",1e3),e_.appendChild(n_),(0,Eb.H)(n_).render($b.createElement(s_,null));const w_={start:function(){a_(),(Wb=$(document.body)).on("keydown.joms-comment",".joms-comment__reply textarea",l_),Wb.on("focus.joms-comment",".joms-comment__reply textarea",p_),Wb.on("focus.joms-comment",".joms-js--pm-message textarea",p_),Wb.on("click.joms-comment",".joms-comment__reply .joms-js--btn-send",r_),Wb.on("click.joms-comment",".joms-js--inbox-reply .joms-js--btn-send",r_),Wb.on("click.joms-comment",".joms-comment__more",d_),j_(),i_(),c_()},stop:a_,like:function(t){joms.ajax({func:"system,ajaxStreamAddLike",data:[t,"comment"],callback:function(o){var e,n,s;o.success&&(e=$(".joms-js--comment-"+t)).length&&((n=e.find(".joms-comment__actions").find(".joms-button--liked")).attr("onclick","joms.api.commentUnlike('"+t+"');"),n.addClass("liked"),n.find("span").html(n.data("lang-unlike")),n.find("use").attr("xlink:href",window.location+"#joms-icon-thumbs-down"),s=e.find(".joms-comment__actions [data-action=showlike]"),o.html?s.length?s.replaceWith(o.html):n.after(o.html):s.remove())}})},unlike:function(t){joms.ajax({func:"system,ajaxStreamUnlike",data:[t,"comment"],callback:function(o){var e,n,s;o.success&&(e=$(".joms-js--comment-"+t)).length&&((n=e.find(".joms-comment__actions").find(".joms-button--liked")).attr("onclick","joms.api.commentLike('"+t+"');"),n.removeClass("liked"),n.find("span").html(n.data("lang-like")),n.find("use").attr("xlink:href",window.location+"#joms-icon-thumbs-up"),s=e.find(".joms-comment__actions [data-action=showlike]"),o.html?s.length?s.replaceWith(o.html):n.after(o.html):s.remove())}})},edit:function(t,o,e){var n,s,a,i="wall"===e;o=$(o),a=(n=o.closest(".joms-comment__item")).children(".joms-comment__reply").find("textarea"),(s=i?n.closest(".joms-comment").siblings(".joms-comment__reply"):n.closest(".joms-stream").children(".joms-comment__reply")).hide(),n.children(".joms-comment__body,.joms-comment__actions").hide(),n.children(".joms-comment__reply").show(),a.jomsTagging(),a.off("reset.joms-tagging"),a.on("reset.joms-tagging",(function(){n.children(".joms-comment__reply").hide(),n.children(".joms-comment__body,.joms-comment__actions").show(),s.show()})),a[0].focus()},cancel:function(t){var o,e,n;(o=t&&t.nodeType?$(t).closest(".joms-js--comment"):$(".joms-js--comment-"+t)).length&&(n=o.data(),e=$(".joms-js--newcomment-"+n.parent),o.find(".joms-js--comment-editor").hide(),o.find(".joms-js--comment-body").show(),o.find(".joms-js--comment-actions").show(),e.show())},remove:function(t,o){if(confirm(joms_lang.COM_COMMUNITY_ARE_YOU_SURE_YOU_WANT_TO_DELETE_THIS_COMMENT)){var e,n,s="inbox"===o;s?(e="inbox,ajaxRemoveMessage",n=[t]):"wall"===o?(e=window.joms_wall_remove_func,n=[t]):(e="system,ajaxStreamRemoveComment",n=[t]),joms.ajax({func:e,data:n,callback:function(o){var e;if(o.success){if(s)g_(t);else if((e=$(".joms-js--comment-"+t)).length){e.fadeOut(300,(function(){$(this).remove()}));var n=e.data("stream-id")||e.data("parent"),a=$(".joms-comment__counter--"+n);if(a.length){var i=+a.eq(0).text()-1;0===i&&(a.parents(".joms-comment__status").hide(),e.parents(".joms-popup").find(".joms-comment").html(joms_lang.COM_COMMUNITY_NO_COMMENTS_YET)),a.html(i)}}}else window.alert(o.error||"Undefined error.")}})}},removeTag:function(t,o){joms.ajax({func:"activities,ajaxRemoveUserTag",data:[t,o||"comment"],callback:function(e){var n,s,a,i;e.success&&("inbox"===o?(s=(n=$(".joms-js--inbox-item-"+t)).find(".joms-button--remove-tag"),(a=n.find(".joms-js--inbox-content")).html(e.data),s.remove()):(s=(n=$(".joms-js--comment-"+t)).find(".joms-button--remove-tag"),a=n.find(".joms-js--comment-content"),i=n.find(".joms-js--comment-editor").find("textarea"),a.html(e.data),i.val(e.unparsed),s.remove()))}})},removePreview:function(t,o){var e,n,s="inbox"===o;s?(e="inbox,ajaxRemovePreview",n=[t]):"wall"===o?(e="system,ajaxRemoveWallPreview",n=[t]):(e="system,ajaxRemoveCommentPreview",n=[t]),joms.ajax({func:e,data:n,callback:function(o){o.success?s?h_(t,o.html):$(".joms-js--comment-"+t).find(".joms-js--comment-preview").remove():window.alert(o.error||"Undefined error.")}})},removeThumbnail:function(t,o){var e,n,s="inbox"===o;s&&(e="inbox,ajaxRemoveThumbnail",n=[t]),joms.ajax({func:e,data:n,callback:function(o){o.success?s&&h_(t,o.html):window.alert(o.error||"Undefined error.")}})},addAttachment:function(t,o,e){var n,s,a;(t=$(t)).data("disabled")||(t_=t,(t=t.siblings(".joms-textarea__wrapper")).length&&("file"!==o&&(o="image"),n=+(e=e||{}).max_file_size,s=e.exts,delete e.max_file_size,delete e.exts,Jb=o,Kb="file"===o?e:{},a={file:{url:joms.BASE_URL+"index.php?option=com_community&view=files&task=multiUpload",filters:{mime_types:[{title:"Document files",extensions:s}]},max_file_size:n>0?1048576*+n:0},image:{url:joms.BASE_URL+"index.php?option=com_community&view=photos&task=ajaxPreviewComment",filters:{mime_types:[{title:"Image files",extensions:"jpg,jpeg,png,gif"}]},max_file_size:void 0}},j_(t,(function(){Qb.refresh(),Qb.settings.url=a[o].url,Qb.settings.filters=a[o].filters,Qb.settings.max_file_size=a[o].max_file_size,Qb.refresh(),window.joms_webdriver||Xb.click()}))))},removeAttachment:function(t){(t=(t=$(t)).closest(".joms-textarea__attachment"))&&(t.find(".joms-textarea__attachment--thumbnail img").replaceWith('<img src="" alt="attachment">'),t.hide(),t.removeData("no_thumb"),t.removeAttr("data-no_thumb")),t_&&t_.siblings("svg").removeData("disabled").css("opacity","")},toggleText:function(t){var o=$(".joms-js--comment-text-"+t),e=$(".joms-js--comment-textfull-"+t),n=$(".joms-js--comment-texttoggle-"+t);o.hide(),e.show(),n.hide()},initInputbox:i_,showEmoticonBoard:function(t){var o;$(t).parent().parent().data("editor",this),o=new CustomEvent("toggleCommentFloatingElement",{detail:{el:t}}),document.dispatchEvent(o)},insertEmoticon:function(t){var o,e=$(".joms-icon--active").parent().find(".joms-textarea__wrapper"),n=e.find("textarea.joms-textarea"),s=e.find("input.joms-textarea__hidden"),a=$(t).attr("data-code"),i=n.prop("selectionStart");o=n.val().slice(0,i)+a+n.val().slice(i),s.val(o),n.val(o),n.prop("selectionStart",i+a.length),n.prop("selectionEnd",i+a.length),n.focus(),n.trigger("keydown")},smileyCallback:function(t){var o,e=$(".joms-icon--active").parent().find(".joms-textarea__wrapper"),n=e.find("textarea.joms-textarea"),s=e.find("input.joms-textarea__hidden"),a=n.prop("selectionStart");o=n.val().slice(0,a)+t+n.val().slice(a),s.val(o),n.val(o),n.prop("selectionStart",a+t.length),n.prop("selectionEnd",a+t.length),n.focus(),n.trigger("keydown")},react:function(t,o,e){var n=function(t){return joms.getData("joms_reaction").filter((function(o){return o.id==t})).pop()}(o),s=n.text,a="reaction-btn--"+n.name,i=$(".joms-js--comment-actions .joms-button--reaction[data-uid="+t+"]");i.removeClass(["reaction-btn--like","reaction-btn--love","reaction-btn--haha","reaction-btn--wow","reaction-btn--sad","reaction-btn--angry"].join(" ")),"onBar"===e&&(i.addClass("reaction-btn--animate"),setTimeout((function(){i.removeClass("reaction-btn--animate")}),200)),i.addClass(a),i.text(s),i.attr("data-reactid",o),i.attr("data-action","unreact"),i.attr("onclick","javascript:;"),joms.ajax({func:"system,ajaxStreamAddLike",data:[t,"comment",o],callback:function(e){var n=i.siblings(".joms-comment__reaction-status"),s="joms.view.comment.unreact("+t+", "+o+")";n.show(),n.html(e.html),i.attr("onclick",s)}})},unreact:function(t,o,e){var n=$(".joms-js--comment-actions .joms-button--reaction[data-uid="+t+"]"),s=n.attr("data-lang-like");n.removeClass(["reaction-btn--like","reaction-btn--love","reaction-btn--haha","reaction-btn--wow","reaction-btn--sad","reaction-btn--angry"].join(" ")),n.text(s),n.attr("data-reactid",1),n.attr("data-action","react"),n.attr("onclick","javascript:;"),joms.ajax({func:"system,ajaxStreamUnlike",data:[t,"comment",o],callback:function(o){var e=n.siblings(".joms-comment__reaction-status"),s="joms.view.comment.react("+t+", 1)";e.show(),e.html(o.html),n.attr("onclick",s)}})}};var y_,k_,T_,x_,C_,M_;function O_(t){$(t.target).closest(".joms-trigger__menu--main, .joms-trigger__menu--user, .joms-menu, .joms-menu--user").length||(y_.hasClass("show-menu")||y_.hasClass("show-menu--user"))&&(t.preventDefault(),t.stopPropagation(),y_.removeClass("show-menu"),y_.removeClass("show-menu--user"))}function L_(t){t.stopPropagation(),y_.toggleClass("show-menu")}function I_(t){t.stopPropagation(),y_.toggleClass("show-menu--user")}function S_(t){var o=$(t.currentTarget).closest("li");o.hasClass("show-submenu")?o.removeClass("show-submenu"):o.addClass("show-submenu").siblings().removeClass("show-submenu")}function U_(){y_&&(y_.off("click.menu"),y_.off("click.menu",".joms-js--has-dropdown"),y_.off("mouseenter.menu",".joms-toolbar--desktop > ul > li > a.joms-js--has-dropdown"),y_.off("mouseleave.menu",".joms-toolbar--desktop")),k_&&k_.off("click.menu"),T_&&T_.off("click.menu"),x_&&x_.off("click.submenu")}function $_(t){var o=$(t.currentTarget),e=o.data("connection");joms.ajax({func:"friends,ajaxRejectRequest",data:[e],callback:function(t){(o=$(".joms-js__friend-request-"+e)).find(".joms-popover__actions").remove(),o.find(".joms-popover__content").html(t.error||t.message),N_("friendrequest",-1)}})}function E_(t){var o=$(t.currentTarget),e=o.data("connection");joms.ajax({func:"friends,ajaxApproveRequest",data:[e],callback:function(t){(o=$(".joms-js__friend-request-"+e)).find(".joms-popover__actions").remove(),o.find(".joms-popover__content").html(t.error||t.message),N_("friendrequest",-1)}})}function N_(t,o){var e;["general","friendrequest","pm"].indexOf(t)<0||(o=+(e=$(".joms-notifications__label--"+t)).eq(0).text()+o,e.html(o>0?o:""))}function A_(){+window.joms_my_id&&$(".joms-js--notiflabel-general").length&&joms.ajax({func:"activities,ajaxGetTotalNotifications",callback:function(t){var o,e,n,s,a;t||(t={}),o=t.newNotificationCount,e=t.newFriendInviteCount,n=t.newMessageCount,s=+t.nextPingDelay,void 0!==o&&(o=+o||"",$(".joms-js--notiflabel-general").html(o),a=(o?"("+o+") ":"")+(a=(a=document.title).replace(/^\(\d+\)\s/,"")),document.title=a),void 0!==e&&$(".joms-js--notiflabel-frequest").html(+e||""),void 0!==n&&$(".joms-js--notiflabel-inbox").html(+n||""),s>0&&joms._.delay(A_,s)}})}const R_={start:function(){y_||(y_=$(".jomsocial-wrapper")),k_||(k_=$(".joms-trigger__menu--main")),T_||(T_=$(".joms-trigger__menu--user")),x_||(x_=$(".joms-menu__toggle")),U_(),y_.on("click.menu",O_),y_.on("click.menu",".joms-js--has-dropdown",(function(t){t.preventDefault(),t.stopPropagation(),window.location=$(t.currentTarget).attr("href")})),y_.on("mouseenter.menu",".joms-toolbar--desktop > ul > li > a.joms-js--has-dropdown",(function(t){var o=$(t.currentTarget);o.siblings("ul.joms-dropdown").is(":visible")||(M_=o.trigger("click.dropdown"))})),y_.on("mouseleave.menu",".joms-toolbar--desktop",(function(){M_&&(M_.trigger("collapse.dropdown"),M_=void 0)})),k_.on("click.menu",L_),T_.on("click.menu",I_),x_.on("click.submenu",S_),A_()},stop:U_,notificationGeneral:function(){joms.ajax({func:"notification,ajaxGetNotification",data:[""],callback:function(t){t.html&&$(".joms-popover--toolbar-general").html(t.html)}})},notificationFriend:function(){joms.ajax({func:"notification,ajaxGetRequest",data:[""],callback:function(t){var o;t.html&&((o=$(".joms-popover--toolbar-friendrequest")).html(t.html),o.off("click",".joms-button__approve").on("click",".joms-button__approve",$_),o.off("click",".joms-button__reject").on("click",".joms-button__reject",E_))}})},notificationPm:function(){joms.ajax({func:"notification,ajaxGetInbox",data:[""],callback:function(t){t.html&&$(".joms-popover--toolbar-pm").html(t.html)}})},notificationCounter:N_,search:function(t){var o,e,n,s=t;"string"!=typeof t&&(s=$(t).val()),(s=s||"").replace(/^\s+|\s+$/g,"")&&(C_&&C_.abort(),t=$(".joms-popover--toolbar-search"),o=t.find(".joms-js--field"),e=t.find(".joms-js--loading"),n=t.find(".joms-js--viewall"),t.find("li:not(.joms-js--noremove)").remove(),n.hide(),e.show(),C_=joms.ajax({func:"search,ajaxSearch",data:[s],callback:function(a){var i,c,l,p,r;if(e.hide(),a.error)return i='<li class="joms-js--error">'+a.error+"</li>",void o.after(i);if(a.length){for(i="",p=Math.min(3,a.length),c=0;c<p;c++)i+='<li><div class="joms-popover__avatar"><div class="joms-avatar">',i+='<img src="'+a[c].thumb+'"></div></div>',i+='<div class="joms-popover__content">',i+='<h5><a href="'+a[c].url+'">'+a[c].name+"</a></h5>",i+="</div></li>";(l=n.find("form")).find("input").val(s),n.off("click","a").on("click","a",(function(){l[0].submit()})),(r=n.find("a")).html(r.data("lang").replace("%1$s",a.length)),o.after(i),n.show(),t.show()}}}))}};var Y_,B_,P_,H_,F_,D_,q_,V_,z_,G_,W_,Q_;function J_(){var t={};H_.find(".joms-js--friend").each((function(){var o=$(this),e=o.find(":checkbox").val(),n={id:+e,name:o.find(".joms-avatar--comment a img").attr("alt"),avatar:o.find(".joms-avatar--comment a img").attr("src")};t[e]=n})),joms_observer.do_action("chat_add_people",t),B_.off(),Y_.close()}function K_(t){var o="#joms-popup-tab-selected"===$(t.target).attr("href"),e=window.joms_lang[o?"COM_COMMUNITY_UNSELECT_ALL":"COM_COMMUNITY_SELECT_ALL"];F_.html(e)}function X_(){var t,o=$(".joms-tab__content:visible");if("joms-popup-tab-selected"===o.attr("id"))return o.find(".joms-js--friend").remove(),void B_.find("input[type=checkbox]").each((function(){this.checked=!1}));(t=o.find(".joms-js--friend").clone()).find("input[type=checkbox]").add(o.find("input[type=checkbox]")).prop("checked","checked"),(o=B_.find("#joms-popup-tab-selected")).html(t)}function Z_(t){var o,e,n=$(t.target),s=n.closest(".joms-tab__content");return"joms-popup-tab-selected"===s.attr("id")?(o=n[0].value,n.closest(".joms-js--friend").remove(),void(B_.find(".joms-js--friend-"+o+" input[type=checkbox]")[0].checked=!1)):n[0].checked?(s=B_.find("#joms-popup-tab-selected"),e=n.closest(".joms-js--friend").clone(),(n=e.find("input[type=checkbox]"))[0].checked=!0,void s.append(e)):(o=n[0].value,void B_.find("#joms-popup-tab-selected .joms-js--friend-"+o).remove())}function th(t,o){var e="string"==typeof t,n=o&&"string"==typeof o?o.split(","):[];e?(P_.empty(),z_=0,V_=t):z_+=G_,W_&&W_.abort(),W_=joms.ajax({func:"system,ajaxLoadFriendsList",data:[V_,"friends,inviteUsers",q_,z_,G_],callback:function(t){var o;t.html&&((o=$($.trim(t.html))).each((function(){var t=$(this).find(":checkbox"),o=t.val();H_.find(":checkbox[value="+o+"]").length&&(t[0].checked=!0)})),P_.append(o),_.each(n,(function(t){var o=P_.find(".joms-js--friend-"+t);o.length&&o.find(".joms-stream__time label").text(joms_lang.COM_COMMUNITY_APPS_LIST_ADDED)}))),e||(P_[0].scrollTop=P_[0].scrollHeight),t.loadMore?(F_.css({width:"49%",marginRight:"2%"}),D_.css({width:"49%"}).html(window.joms_lang.COM_COMMUNITY_INVITE_LOAD_MORE+" ("+t.moreCount+")").show()):(D_.hide(),F_.css({width:"100%",marginRight:"0"}))}})}function oh(t){return['<div class="joms-popup joms-popup--whiteblock">','<div class="joms-popup__title"><button class="mfp-close" type="button" title="',window.joms_lang.COM_COMMUNITY_CLOSE_BUTTON_TITLE,'">×</button>',t.title,"</div>",'<div data-ui-object="popup-step-1"',t.error?' class="joms-popup__hide"':"",">",'<div class="joms-popup__content">',t.html,"</div>",'<div class="joms-popup__action">','<button class="joms-button--primary" data-btn-save="1">',t.btnSelect,"</button>","</div>","</div>",'<div data-ui-object="popup-step-2"',t.error?"":' class="joms-popup__hide"',">",'<div class="joms-popup__content joms-popup__content--single" data-ui-object="popup-message">',t.error||"","</div>","</div>","</div>"].join("")}var eh,nh;function sh(t){return t||(t={}),['<div class="joms-popup joms-popup--whiteblock joms-popup--rounded joms-popup--80pc">','<button class="mfp-close joms-hide"></button>','<div class="joms-comment">',t.html||"","</div>","</div>"].join("")}function ah(t,o){return['<div class="joms-popup joms-popup--whiteblock">','<div class="joms-popup__title"><button class="mfp-close" type="button" title="',window.joms_lang.COM_COMMUNITY_CLOSE_BUTTON_TITLE,'">×</button>',t||"&nbsp;","</div>",'<div class="joms-popup__content joms-popup__content--single">',o||"","</div>",'<div class="joms-popup__action">','<button class="joms-button--neutral joms-button--small joms-js--button-close">',window.joms_lang.COM_COMMUNITY_CLOSE_BUTTON,"</button>","</div>","</div>"].join("")}function ih(t){return t||(t={}),['<div class="joms-popup joms-popup--whiteblock">','<div class="joms-popup__title">',t.title||"","</div>",'<div class="joms-popup__content joms-popup__content--single" style="max-height:400px;overflow:auto">','<ul style="margin: 0; list-style: none;">',t.html||"","</ul>","</div>","</div>"].join("")}function ch(t){return t||(t={}),['<div class="joms-popup joms-popup--whiteblock">','<div class="joms-popup__title">',t.title||"","</div>",'<div class="joms-popup__content joms-popup__content--single" style="max-height:400px;overflow:auto">','<ul style="margin: 0; list-style: none;">',t.html||"","</ul>","</div>","</div>"].join("")}function lh(t){return t||(t={}),['<div class="joms-popup joms-popup--whiteblock">','<div class="joms-popup__title">',t.title||"","</div>",'<div class="joms-popup__content joms-popup__content--single" style="max-height:400px;overflow:auto">','<ul style="margin: 0; list-style: none;">',t.html||"","</ul>","</div>","</div>"].join("")}const ph={global:function(){w.prepare((function(t){!function(t){joms.ajax({func:"notification,ajaxGetNotification",data:[""],callback:function(o){t.items[0]={type:"inline",src:ih(o)},t.updateItemHTML()}})}(t)}))},friend:function(){w.prepare((function(t){!function(t){joms.ajax({func:"notification,ajaxGetRequest",data:[""],callback:function(o){t.items[0]={type:"inline",src:ch(o)},t.updateItemHTML()}})}(t)}))},chat:function(t){w.prepare((function(o){!function(t,o){var e=$(o).next(".joms-popover--toolbar-chat"),n={};n.title=window.joms_lang&&joms_lang.COM_COMMUNITY_MESSAGE||"Message",n.html=e.html(),t.items[0]={type:"inline",src:lh(n)},t.updateItemHTML()}(o,t)}))}};var rh,mh,uh,dh,jh,fh,vh;function bh(){mh.off(),rh.close()}function _h(){joms.ajax({func:"polls,ajaxDeletePollOption",data:["",uh],callback:function(t){var o;mh.off(),rh.close(),t.success&&(o=joms.jQuery(".joms-poll-item-"+uh)).fadeOut(500,(function(){o.remove()}))}})}function hh(t){return t||(t={}),['<div class="joms-popup joms-popup--whiteblock">','<div class="joms-popup__title"><button class="mfp-close" type="button" title="',window.joms_lang.COM_COMMUNITY_CLOSE_BUTTON_TITLE,'">×</button>',t.title,"</div>","<div>",'<div class="joms-popup__content">',t.error||t.message,"</div>",'<div class="joms-popup__action">','<a href="javascript:" class="joms-button--neutral joms-button--small joms-left" data-ui-object="popup-button-cancel">',t.btnCancel,"</a> &nbsp;",'<button class="joms-button--primary joms-button--small" data-ui-object="popup-button-save">',t.btnYes,"</button>","</div>","</div>","</div>"].join("")}function gh(){jh.off(),dh.close()}function wh(){joms.ajax({func:"polls,ajaxDeletePoll",data:["",fh],callback:function(t){var o;jh.off(),dh.close(),t.success&&(o=joms.jQuery(".joms-poll__item-"+fh)).fadeOut(500,(function(){o.remove()}))}})}function yh(t){return t||(t={}),['<div class="joms-popup joms-popup--whiteblock">','<div class="joms-popup__title"><button class="mfp-close" type="button" title="',window.joms_lang.COM_COMMUNITY_CLOSE_BUTTON_TITLE,'">×</button>',t.title,"</div>","<div>",'<div class="joms-popup__content">',t.error||t.message,"</div>",'<div class="joms-popup__action">','<a href="javascript:" class="joms-button--neutral joms-button--small joms-left" data-ui-object="popup-button-cancel">',t.btnCancel,"</a> &nbsp;",'<button class="joms-button--primary joms-button--small" data-ui-object="popup-button-save">',t.btnYes,"</button>","</div>","</div>","</div>"].join("")}function kh(t){return['<div class="joms-popup joms-popup--whiteblock">','<div class="joms-popup__title"><button class="mfp-close" type="button" title="',window.joms_lang.COM_COMMUNITY_CLOSE_BUTTON_TITLE,'">×</button>',t.title,"</div>",'<div data-ui-object="popup-step-1"',t.error?' class="joms-popup__hide"':"",">",'<div class="joms-popup__content">',t.html,"</div>","</div>",'<div data-ui-object="popup-step-2"',t.error?"":' class="joms-popup__hide"',">",'<div class="joms-popup__content joms-popup__content--single" data-ui-object="popup-message">',t.error||"","</div>","</div>","</div>"].join("")}const Th={removeoption:function(t){w.prepare((function(o){var e,n;e=o,n=t,mh&&mh.off(),rh=e,uh=n,joms.ajax({func:"polls,ajaxConfirmDeletePollOption",data:["",uh],callback:function(t){rh.items[0]={type:"inline",src:hh(t)},rh.updateItemHTML(),(mh=rh.contentContainer).on("click","[data-ui-object=popup-button-cancel]",bh),mh.on("click","[data-ui-object=popup-button-save]",_h)}})}))},deletepoll:function(t){w.prepare((function(o){var e,n;e=o,n=t,jh&&jh.off(),dh=e,fh=n,joms.ajax({func:"polls,ajaxWarnPollDeletion",data:["",fh],callback:function(t){dh.items[0]={type:"inline",src:yh(t)},dh.updateItemHTML(),(jh=dh.contentContainer).on("click","[data-ui-object=popup-button-cancel]",gh),jh.on("click","[data-ui-object=popup-button-save]",wh)}})}))},voted:function(t,o){w.prepare((function(e){!function(t,o,e){vh=t,joms.ajax({func:"polls,ajaxShowVotedUsers",data:[o,e],callback:function(t){vh.items[0]={type:"inline",src:kh(t)},vh.updateItemHTML()}})}(e,t,o)}))}};var xh;function Ch(t){var o=$(t.currentTarget),e=o.attr("data-element"),n=o.attr("data-reactid"),s=o.attr("data-uid"),a=$(xh.getContent()),i=a.find(".joms-js--loading"),c=a.find(".joms-reacted__content"),l=a.find("li.joms-reacted__item");o.hasClass("active")||(l.removeClass("active"),o.addClass("active"),c.hide(),i.show(),joms.ajax({func:"system,ajaxGetUsersByReaction",data:[e,s,n],callback:function(t){c.html(t.html),c.show(),i.hide()}}))}const Mh={album:E,app:wt,avatar:lo,chat:function(t){w.prepare((function(o){var e,n;e=o,n=t,B_&&B_.off(),Y_=e,q_=n,G_=200,joms.ajax({func:"system,ajaxShowFriendsForm",data:[null,"","",1,1],callback:function(t){Y_.items[0]={type:"inline",src:oh(t)},Y_.updateItemHTML(),t.limit&&(G_=+t.limit),B_=Y_.contentContainer,P_=B_.find(".joms-tab__content").eq(0),H_=B_.find(".joms-tab__content").eq(1),F_=B_.find("[data-btn-select]"),D_=B_.find("[data-btn-load]"),B_.on("input","[data-search]",(function(t){!function(t,o){var e=$(t.currentTarget);clearTimeout(Q_),Q_=setTimeout((function(){th(e.val(),o)}),300)}(t,n)})),B_.on("click",".joms-tab__bar a",K_),B_.on("click","[data-btn-select]",X_),B_.on("click","[data-btn-load]",(function(t){!function(t,o){th("",o)}(0,n)})),B_.on("click","[data-btn-save]",J_),B_.on("click","input[type=checkbox]",Z_),th("",n)}})}))},comment:function(t){w.prepare((function(o){eh=o,nh=t,joms.ajax({func:"activities,ajaxshowLikedUser",data:[nh],callback:function(t){eh.items[0]={type:"inline",src:sh(t)},eh.updateItemHTML()}})}))},cover:No,discussion:Jo,event:yn,fbc:Rn,file:ks,follower:$a,friend:ea,group:ll,inbox:Al,info:function(t,o){w.prepare((function(e){!function(t,o,e){t.items[0]={type:"inline",src:ah(o,e)},t.updateItemHTML()}(e,t,o)}))},location:Hl,login:x,notification:ph,page:Gi,photo:Em,pm:Hm,poll:Th,reaction:function(t,o,e){joms.util.dialog.prepare((function(n){!function(t,o,e,n){xh=t,$(xh.modal).find(".tingle-modal__close").remove(),n=n||0,joms.ajax({func:"system,ajaxShowReactedUsers",data:[o,e,n],context:this,callback:function(t){setTimeout((function(){xh.setContent(function(t){return['<div class="joms-popup--whiteblock">','<div class="joms-popup__title">','<button class="mfp-close"  type="button" title="',window.joms_lang.COM_COMMUNITY_CLOSE_BUTTON_TITLE,'">×</button>',t.title,"</div>",'<div class="joms-popup__content joms-popup__reacted">',t.html,"</div>","</div>"].join("")}(t));var o=$(xh.getContent());o.find(".joms-popup__title").data("popup",xh),o.find(".mfp-close").on("click",o,(function(){xh.close()})),o.find("li.joms-reacted__item").on("click",Ch)}),100)}})}(n,t,o,e)}))},search:Qm,stream:Bv,tnc:Cu,user:td,video:_f};var Oh=(0,joms.jQuery)(document.body),Lh="",Ih=function(){var t=document.createElement("div");t.style.visibility="hidden",t.style.width="100px",t.style.msOverflowStyle="scrollbar",document.body.appendChild(t);var o=t.offsetWidth;t.style.overflow="scroll";var e=document.createElement("div");e.style.width="100%",t.appendChild(e);var n=e.offsetWidth;return t.parentNode.removeChild(t),o-n}(),Sh=function(){};Sh.prototype.prepare=function(t){(t=t||function(){})(this.show())},Sh.prototype.show=function(){var t=new window.tingle.modal({closeMethods:["overlay","button","escape"],closeLabel:window.joms_lang.COM_COMMUNITY_CLOSE_BUTTON,cssClass:["joms-dialog"],onClose:function(){joms.jQuery(t.getContent()).parents(".tingle-modal").remove()},beforeClose:function(){return Oh.attr("style",Lh||""),!0},beforeOpen:function(){Lh=Oh.attr("style");var t=parseInt(Oh.css("paddingRight"));Oh.css("padding-right",Ih+t)}}),o='<div style="width: 100%; text-align: center;"><img src="'+joms.BASE_URL+'components/com_community/assets/ajax-loader.gif" /></div>';return t.setContent(o),t.open(),t};const Uh=new Sh;$=joms.jQuery;var $h,Eh,Nh,Ah,Rh="click.dropdown",Yh="collapse.dropdown",Bh="[data-ui-object=joms-dropdown-button]",Ph=".joms-dropdown,.joms-popover";function Hh(){Eh&&Eh.hide(),$h&&Dh($h)}function Fh(t){var o,e,n,s,a;if(t.stopPropagation(),t.preventDefault(),s=(n=$(t.currentTarget)).attr("data-type"),o=$(t.currentTarget),(e=o.siblings(Ph)).length){if(e.is(":visible"))return e.hide(),void Dh(o);if("large"!==(a=joms.screenSize())&&n.siblings(".joms-dropdown").css("right",0),"large"===a||"no-popup"===s)return Hh(),e.show(),function(t){var o=t.parent();o.hasClass(".joms-focus__button--options--desktop")?o.addClass("active"):t.addClass("active")}(o),$h=o,Eh=e,void Vh(e);w.prepare((function(t){(Nh=t).items[0]={type:"inline",src:qh(e)},Nh.updateItemHTML(),Vh(e),Nh.contentContainer.on("click","li > a",(function(){Nh.close()}))}))}}function Dh(t){var o=t.parent();o.hasClass(".joms-focus__button--options--desktop")?o.removeClass("active"):t.removeClass("active")}function qh(t){return'<div class="joms-popup joms-popup--dropdown">'+t[0].outerHTML+"</div>"}function Vh(t){var o=t.attr("class")||"";t.css("left",""),t.offset().left<0&&t.css("left",-25),o.match("joms-popover--toolbar-general")?joms.api.notificationGeneral():o.match("joms-popover--toolbar-friendrequest")?joms.api.notificationFriend():o.match("joms-popover--toolbar-pm")&&joms.api.notificationPm()}var zh=joms._.debounce((function(t){var o,e,n,s,a,i;(t.currentTarget.className||"").indexOf("joms-dropdown--privacy")<0||(o=$(t.currentTarget),(e=$(t.target).closest("li")).length&&(s=(n=$(".joms-button--privacy").filter('[data-name="'+o.data("name")+'"]')).children("[data-ui-object=joms-dropdown-value]"),a=n.children("span"),i=n.find("use"),s.val(e.data("value")),a.html(e.children("span").html()),i.attr("xlink:href",window.location.href.replace(/#.*$/,"")+"#"+e.data("classname"))),Hh(),Nh&&Nh.close())}),100);function Gh(){Ah&&(Ah.off(Rh),Ah.off(Rh,Bh),Ah.off(Yh,Bh),Ah.off(Rh,Ph))}const Wh={start:function(){Gh(),Ah||(Ah=$(document.body)),Ah.on(Rh,Hh),Ah.on(Rh,Bh,Fh),Ah.on(Yh,Bh,Hh),Ah.on(Rh,Ph,(function(t){$(t.target).data("propagate")||$(t.currentTarget).data("propagate")||t.stopPropagation(),zh(t);var o=$(t.currentTarget);o.hasClass("joms-popover--toolbar-search")||o.hide()}))},stop:Gh};var Qh,Jh="joms-legacy-dropdown",Kh=Jh+"--opened",Xh="."+Jh,Zh="."+Kh;function tg(t){var o=joms.jQuery(t.target).closest(Xh),e=!1;o.length&&(e=o.hasClass(Kh),o[e?"removeClass":"addClass"](Kh)),e||Qh.find(Zh).not(o).removeClass(Kh)}function og(){Qh&&Qh.off("click."+Jh)}const eg={start:function(){og(),Qh||(Qh=joms.jQuery(document.body)),Qh.on("click."+Jh,tg)},stop:function(){og()}};function ng(){}ng.prototype.addLocation=function(){var t;t={element:"profile",target:451,type:"message",privacy:10,location:["Plaza Tunjungan",-7.2664271,112.7424973]},joms.ajax({func:"system,ajaxStreamAdd",data:["Hello...",JSON.stringify(t)]})};const sg=new ng,ag={file:function(t){(t=$(t)).each((function(t,o){var e;o=$(o),(e=o.parent()).data("wrap")||(e=$(['<div data-wrap="file" style="width:350px;max-width:100%;position:relative;overflow:hidden">','<input type="text" class="joms-input" readonly="readonly" placeholder="',window.joms_lang&&window.joms_lang.COM_COMMUNITY_SELECT_FILE||"Select file",'.."','style="margin-bottom:2px">',"</div>"].join("")),o.before(e),o.hide(),o.appendTo(e),o.css({cursor:"pointer",position:"absolute",right:0,top:0,width:"100%",height:"100%",opacity:0}),o.show()),o.off("change.joms-file"),o.on("change.joms-file",(function(){e.find(".joms-input").val(function(t){var o=t.match(/[^\\\/]+$/);return o&&o[0]?o[0]:""}($(this).val()))}))}))}};var ig,cg,lg=0,pg=0,rg=0,mg=0,ug="mouseover.joms-button--reaction",dg="mouseout.joms-button--reaction",jg="mousedown.joms-button--reaction",fg="mouseup.joms-button--reaction",vg="touchstart.joms-button--reaction",bg="touchend.joms-button--reaction",_g="touchmove.joms-button--reaction",hg="contextmenu.joms-button--reaction",gg="a.joms-button--reaction",wg=".joms-reactions",yg=!0,kg=!1;function Tg(t){clearTimeout(cg),clearTimeout(mg);var o=$(t.target);kg=!1,yg=!0,o.attr("onclick",""),Ug(),$(document).off("click.hide-reaction-bar"),mg=setTimeout((function(){!function(t){kg||$g(t)}(t),yg=!1}),300)}function xg(t){clearTimeout(mg),clearTimeout(cg),cg=setTimeout((function(){$(document).off("click.hide-reaction-bar").one("click.hide-reaction-bar",Ug)}),300),yg&&function(t){var o=$(t.target),e=o.attr("data-type"),n=o.attr("data-uid"),s=o.attr("data-reactid"),a=o.attr("data-action");"stream"===e&&("react"===a?joms.view.stream.react(n,s):joms.view.stream.unreact(n,s)),"comment"===e&&("react"===a?joms.view.comment.react(n,s):joms.view.comment.unreact(n,s)),"page"===e&&("react"===a?joms.view.page.react(n,s):joms.view.page.unreact(n,s))}(t),kg=!1,yg=!0}function Cg(t){clearTimeout(mg),clearTimeout(cg),clearTimeout(pg),yg=!1,kg=!0,pg=setTimeout((function(){Ug()}),300)}function Mg(t){return t.preventDefault(),t.stopPropagation(),!1}function Og(t){clearTimeout(pg),clearTimeout(rg),Ug(),lg=setTimeout((function(){$g(t)}),500)}function Lg(t){clearTimeout(lg),pg=setTimeout((function(){Ug()}),1e3)}function Ig(t){1===t.which&&clearTimeout(lg)}function Sg(t){1===t.which&&(clearTimeout(lg),ig.hide())}function Ug(){clearTimeout(rg),ig.is(":visible")&&ig.css({display:"none",opacity:0})}function $g(t){clearTimeout(rg);var o=$(t.target),e=o.attr("data-uid"),n=o.attr("data-type");ig.find(".joms-reactions__item").each((function(t,o){var s=$(o),a=s.attr("data-react-id"),i=(s.attr("data-text"),"");"stream"===n&&(i="joms.view.stream.react("+e+", "+a+", 'onBar')"),"comment"===n&&(i="joms.view.comment.react("+e+", "+a+", 'onBar')"),"page"===n&&(i="joms.view.page.react("+e+", "+a+", 'onBar')"),s.attr("onclick",i),s.off("click.react").one("click.react",(function(){Ug()}))}));var s=$(document).width(),a=ig.outerWidth(),i=o.offset(),c=ig.height(),l=i.top-c-10;if("rtl"===$("html").attr("dir"))p=(p=i.left-a+o.outerWidth()+10)<0?0:p;else{var p,r=s-(p=i.left-10);r<a&&(p-=a-r)<0&&(p=$(document).width())}ig.css({display:"block",top:l,left:p}),rg=setTimeout((function(){ig.css({opacity:1,top:l-5})}),300)}const Eg={initialize:function(){joms.getData("enablereaction")&&((ig=$(joms.getLayout("stream.reaction").trim())).hide().appendTo(document.body),joms.mobile?$(document.body).off(vg).off(bg).off(hg).off(_g).on(vg,gg,Tg).on(bg,gg,xg).on(_g,Cg).on(hg,gg,Mg):($(document.body).off(ug).off(dg).off(jg).off(fg).on(ug,gg,Og).on(dg,gg,Lg).on(jg,gg,Ig).on(fg,gg,Sg),$(document.body).on(ug,wg,(function(){clearTimeout(pg)})).on(dg,wg,Lg)))}},Ng={start:function(){!function(){var t,o=".joms-tab__bar",e=".joms-tab__content";function n(t){var n,s,a=joms.jQuery(t.currentTarget),i=a.parent(o),c=a.attr("href");return a.find(".joms-tab__bar--button").length&&((s=joms.jQuery(t.target)).hasClass("add")||s[0].tagName.match(/use|svg/i))?(t.preventDefault(),t.stopPropagation(),!1):0===c.indexOf("#")?(a.closest(o).siblings(c).show().siblings(e).hide(),a.addClass("active").siblings("a").removeClass("active"),(n=i.data("id"))&&(n="#tab:"+n+"/"+a.data("id"),window.location=n),jQuery(window).trigger("tab:change"),!1):void 0}t&&t.off("click.joms-tab"),t||(t=joms.jQuery(document.body)),t.on("click.joms-tab",o+" a",n)}(),joms.jQuery(".cTabsBar").on("click","li",(function(t){var o,e,n=joms.jQuery(t.currentTarget),s=n.closest(".cTabsBar").siblings(".cTabsContentWrap");s.length&&(o=n.prevAll().length,(e=s.children(".cTabsContent").eq(o)).length&&(n.addClass("cTabCurrent").siblings(".cTabCurrent").removeClass("cTabCurrent"),e.siblings(".cTabsContent").hide(),e.show()))}))}};var Ag=13,Rg=27,Yg=38,Bg=40,Pg="joms-tagging",Hg=".joms-textarea",Fg=Hg+"__wrapper",Dg=Hg+"__beautifier",qg=Hg+"__hidden",Vg=Hg+"__tag-ct",zg=Hg+"__tag-item",Gg=zg+"--active",Wg=/@\[\[(\d+):contact:([^\]]+)\]\]/g,Qg=/@\[\[(\d+):contact:([^\]]+)\]\]/,Jg=/(^|#|\s)(#[^#\s]+)/g,Kg=/\n/g;function Xg(t,o){return this.textarea=t,this.fetcher=o||!1,this.$textarea=$(t),this.$textarea.data("initialValue",t.value),this.$textarea.data(Pg,this),this.$textarea.on("focus."+Pg,$.proxy(this.initialize,this)),this.contenteditable=!1,this.contenteditable="true"==this.$textarea.attr("contenteditable"),this}Xg.prototype.getValue=function(){var t="";return this.contenteditable?(this.$textarea.children().each((function(o,e){var n=e.textContent;t?t+="\n"+n:t=n})),0==this.$textarea.children().length?this.$textarea.text():(t||(t=$(".input.input-status.joms-textarea").text()),t)):t=this.textarea.value},Xg.prototype.setValue=function(t){if(this.contenteditable){var o="",e=this.tagsAdded;if(e.length){for(rMatch="^",rReplace="",start=0,i=0;i<e.length;i++)tag=e[i],rMatch+="([\\s\\S]{"+(tag.start-start)+"})([\\s\\S]{"+tag.length+"})",rReplace+="$"+(2*i+1)+'<span contenteditable="false">'+tag.name+"</span>",start=tag.start+tag.length;rMatch=new RegExp(rMatch),t=t.replace(rMatch,rReplace)}var n=t.split("\n");for(j=0;j<n.length;j++)o+="<div>"+n[j]+"</div>";"<div><br></div>"==o&&retrun,""==o&&(o="<div><br></div>"),o=o.replace(/(?:[\u2700-\u27bf]|(?:\ud83c[\udde6-\uddff]){2}|[\ud800-\udbff][\udc00-\udfff])[\ufe0e\ufe0f]?(?:[\u0300-\u036f\ufe20-\ufe23\u20d0-\u20f0]|\ud83c[\udffb-\udfff])?(?:\u200d(?:[^\ud800-\udfff]|(?:\ud83c[\udde6-\uddff]){2}|[\ud800-\udbff][\udc00-\udfff])[\ufe0e\ufe0f]?(?:[\u0300-\u036f\ufe20-\ufe23\u20d0-\u20f0]|\ud83c[\udffb-\udfff])?)*/g,(function(t,o,e){return joms.util.emoji.getIconByUni(t)})),this.$textarea.html(o)}else this.textarea.value=t},Xg.prototype.setSelectionRange=function(t,o){if(this.contenteditable){range=document.createRange(),range.selectNodeContents(this.textarea);var e=window.getSelection();range.collapse(!1),e.removeAllRanges(),e.addRange(range)}else this.textarea.setSelectionRange(t,o)},Xg.prototype.initialize=function(){var t,o,e,n,s;if(this.dropdownIsOpened=!1,this.dropdownIsClicked=!1,this.dropdownSelectedItem=!1,this.domPrepare(),this.tagsAdded=[],t="",this.$textarea.data("initialValue")&&(o=(t=this.getValue()).match(Wg),this.setValue(t.replace(Wg,"$2")),o&&o.length))for(s=0;s<o.length;s++)e=o[s].match(Qg),n=t.indexOf(o[s]),t=t.replace(o[s],e[2]),this.tagsAdded.push({id:e[1],name:e[2],start:n,length:e[2].length});this.beautifierUpdate(t,this.tagsAdded),this.hiddenUpdate(t,this.tagsAdded),this.inputAutogrow(),this.$textarea.off("focus."+Pg).on("focus."+Pg,$.proxy(this.inputOnKeydown,this)).off("click."+Pg).on("click."+Pg,$.proxy(this.inputOnKeydown,this)).off("keydown."+Pg).on("keydown."+Pg,$.proxy(this.inputOnKeydown,this)).off("keyup."+Pg).on("keyup."+Pg,$.proxy(this.inputOnKeyup,this)).off("input."+Pg).on("input."+Pg,$.proxy(this.inputOnInput,this)).off("blur."+Pg).on("blur."+Pg,$.proxy(this.inputOnBlur,this)),this.$dropdown.off("mouseenter."+Pg).on("mouseenter."+Pg,zg,$.proxy(this.dropdownOnMouseEnter,this)).off("mousedown."+Pg).on("mousedown."+Pg,zg,$.proxy(this.dropdownOnMouseDown,this)).off("mouseup."+Pg).on("mouseup."+Pg,zg,$.proxy(this.dropdownOnMouseUp,this)),this.textarea.joms_beautifier=this.$beautifier,this.textarea.joms_hidden=this.$hidden;var a=this;this.textarea.joms_reset=function(){a.inputReset()}},Xg.prototype.domPrepare=function(){this.$wrapper=this.$textarea.parent(Fg),this.$wrapper.length||(this.$textarea.wrap('<div class="'+Fg.substr(1)+'"></div>'),this.$wrapper=this.$textarea.parent()),this.$beautifier=this.$wrapper.children(Dg),this.$beautifier.length||(this.$beautifier=$('<div class="'+".joms-textarea".substr(1).replace("."," ")+" "+Dg.substr(1)+'"></div>'),this.$beautifier.prependTo(this.$wrapper)),this.$hidden=this.$wrapper.children(qg),this.$hidden.length||(this.$hidden=$('<input type="hidden" class="'+qg.substr(1)+'">'),this.$hidden.appendTo(this.$wrapper)),this.$dropdown=this.$wrapper.children(Vg),this.$dropdown.length||(this.$dropdown=$('<div class="'+Vg.substr(1)+'"></div>'),this.$dropdown.appendTo(this.$wrapper))},Xg.prototype.inputPrepare=function(){},Xg.prototype.inputReset=function(){this.tagsAdded&&(this.tagsAdded=[])},Xg.prototype.inputAutogrow=function(){var t,o=+this.$textarea.data(Pg+"-prevHeight");this.$wrapper.css({height:o}),this.$textarea.css({height:""}),t=this.textarea.scrollHeight+2,this.$textarea.css({height:t}),t!==+o&&this.$textarea.data(Pg+"-prevHeight",t),this.$wrapper.css({height:""})},Xg.prototype.inputOnKeydown=function(t){return!(this.dropdownIsOpened&&[Ag,Rg,Yg,Bg].indexOf(t.keyCode)>=0)&&(t.keyCode===Rg?(this.inputReset(),!1):(this.prevSelStart=this.textarea.selectionStart,void(this.prevSelEnd=this.textarea.selectionEnd)))},Xg.prototype.inputOnKeyup=function(t){if(this.dropdownIsOpened){if(t.keyCode===Yg||t.keyCode===Bg)return this.dropdownChangeItem(t.keyCode),!1;if(t.keyCode===Ag)return this.dropdownSelectItem(),!1;if(t.keyCode===Rg)return this.dropdownHide(),!1}},Xg.prototype.inputOnInput=function(){var t,o,e,n,s,a,i,c,l,p,r,m=this.getValue();if(this.tagsAdded){if(this.prevSelStart!==this.prevSelEnd)for(p=0;p<this.tagsAdded.length;p++)e=(o=this.tagsAdded[p]).start+o.length,(this.prevSelStart>o.start&&this.prevSelStart<e||this.prevSelEnd>o.start&&this.prevSelEnd<e||o.start>=this.prevSelStart&&e<=this.prevSelEnd)&&this.tagsAdded.splice(p--,1);for(t=this.textarea.selectionStart-this.prevSelStart-(this.prevSelEnd-this.prevSelStart),p=0;p<this.tagsAdded.length;p++)if((o=this.tagsAdded[p]).start>=this.prevSelStart)o.start+=t;else if((e=o.start+o.length)<this.prevSelStart);else if(e>this.prevSelStart){if(t>0)this.tagsAdded.splice(p--,1);else if(t<0){for(a=(n=m.substring(o.start,this.prevSelStart+t)).split(" ").length-1,(n=o.name.split(" ")).splice(a,1),n=n.join(" "),s=(s=(s=o.name.split(" ")).slice(0,a)).join(" "),i=new RegExp("^([\\s\\S]{"+o.start+"})([\\s\\S]{"+(o.length+t)+"})"),c="$1"+n,this.setValue(this.getValue().replace(i,c)),m=this.getValue(),l=o.length-n.length,o.name=n,o.length=n.length,r=p+1;r<this.tagsAdded.length;r++)this.tagsAdded[r].start-=l;n.length||this.tagsAdded.splice(p--,1),p=this.tagsAdded.length,this.setValue(m),this.setSelectionRange(o.start+s.length,o.start+s.length)}}else if(t<0){for((n=o.name.split(" ")).pop(),n=n.join(" "),s=(s=(s=o.name.split(" ")).slice(0,a)).join(" "),i=new RegExp("^([\\s\\S]{"+o.start+"})([\\s\\S]{"+(o.length+t)+"})"),c="$1"+n,this.setValue(this.getValue().replace(i,c)),m=this.getValue(),l=o.length-n.length,o.name=n,o.length=n.length,r=p+1;r<this.tagsAdded.length;r++)this.tagsAdded[r].start-=l;n.length||this.tagsAdded.splice(p--,1),p=this.tagsAdded.length,this.setValue(this.getValue()),this.setSelectionRange(o.start+s.length,o.start+s.length)}}this.inputAutogrow(),this.beautifierUpdate(m,this.tagsAdded),this.hiddenUpdate(m,this.tagsAdded||[]),this.dropdownToggle()},Xg.prototype.inputOnBlur=function(){this.dropdownIsClicked||this.dropdownHide()},Xg.prototype.beautifierUpdate=joms._.debounce((function(t,o){var e,n,s,a,i;if(o.length){for(e="^",n="",s=0,i=0;i<o.length;i++)e+="([\\s\\S]{"+((a=o[i]).start-s)+"})([\\s\\S]{"+a.length+"})",n+="$"+(2*i+1)+"[b]"+a.name+"[/b]&nbsp;&nbsp;",s=a.start+a.length;e=new RegExp(e),t=t.replace(e,n)}t=(t=(t=(t=t.replace(/</g,"&lt;").replace(/>/g,"&gt;")).replace(/\[(\/?b)\]/g,"<$1>")).replace(Jg,"$1<b>$2</b>")).replace(Kg,"<br>"),this.$beautifier.html(t)}),joms.mobile?100:1),Xg.prototype.hiddenUpdate=joms._.debounce((function(t,o){var e,n,s,a,i;if(o.length){for(e="^",n="",s=0,i=0;i<o.length;i++)e+="([\\s\\S]{"+((a=o[i]).start-s)+"})([\\s\\S]{"+a.length+"})",n+="$"+(2*i+1)+"@[["+a.id+":contact:"+a.name+"]]",s=a.start+a.length;e=new RegExp(e),t=t.replace(e,n)}this.$hidden.val(t)}),joms.mobile?500:50),Xg.prototype.dropdownToggle=joms._.debounce((function(){var t=this.textarea.selectionStart,o=this.getValue().substr(0,t),e=o.lastIndexOf("@");e<0||++e>=t?this.dropdownHide():(o=o.substring(e,t),this.dropdownFetch(o,joms._.bind(this.dropdownUpdate,this)))}),joms.mobile?1e3:200),Xg.prototype.dropdownFetch=function(t,o,e){var n,s,a,i,c,l=(window.joms_friends||[]).concat(e||[]),p=this.tagsAdded||[],r=[],m=[];if(l&&l.length)for(t=t.toLowerCase(),i=0;i<l.length&&r.length<20;i++)if(((n=l[i]).name||"").toLowerCase().indexOf(t)>=0){for(s=!1,c=0;c<p.length;c++)if(+n.id==+p[c].id){s=!0;break}!s&&m.indexOf(+n.id)<0&&(m.push(+n.id),r.push({id:n.id,name:n.name,img:n.avatar}))}r.sort((function(t,o){return t.name<o.name?-1:t.name>o.name?1:0})),o(r),"function"!=typeof this.fetcher||e||(a=this,this.fetcher((function(o){o||(o=[]),a.dropdownFetch(t,joms._.bind(a.dropdownUpdate,a),o)})))},Xg.prototype.dropdownUpdate=function(t){var o,e,n,s,a;if(t&&t.length){for(o="",n=zg.substr(1),a=Math.min(10,t.length),s=0;s<a;s++)o+='<a href="javascript:" class='+n+' data-id="'+(e=t[s]).id+'" data-name="'+e.name+'">',o+='<img src="'+e.img+'">'+e.name+"</a>";this.dropdownShow(o)}else this.dropdownHide()},Xg.prototype.dropdownShow=function(t){this.$dropdown.html(t).show(),this.dropdownIsOpened=!0,this.dropdownSelectedItem=!1},Xg.prototype.dropdownHide=function(){this.$dropdown.hide(),this.dropdownIsOpened=!1},Xg.prototype.dropdownOnMouseEnter=function(t){this.dropdownChangeItem(t)},Xg.prototype.dropdownOnMouseDown=function(){this.dropdownIsClicked=!0},Xg.prototype.dropdownOnMouseUp=function(t){this.dropdownSelectItem(t),this.dropdownIsClicked=!1,this.dropdownHide()},Xg.prototype.dropdownChangeItem=function(t){var o,e,n,s=Gg.substr(1);if("number"!=typeof t)return e=(o=this.dropdownSelectedItem=$(t.target)).siblings(Gg),o.addClass(s),void e.removeClass(s);(o=this.$dropdown.children(Gg)).length?(n=o[t===Yg?"prev":"next"](),o.removeClass(s),n.length?(this.dropdownSelectedItem=n,n.addClass(s)):this.dropdownSelectedItem=!1):(o=this.dropdownSelectedItem=this.$dropdown.children()[t===Yg?"last":"first"]()).addClass(s)},Xg.prototype.dropdownSelectItem=function(t){var o,e,n=t?$(t.currentTarget):this.dropdownSelectedItem,s=n.data("id"),a=n.data("name"),i=this.textarea.selectionStart,c=this.getValue().substr(0,i).lastIndexOf("@");if(this.tagsAdded||(this.tagsAdded=[]),this.tagsAdded.push({id:s,name:a,start:c,length:a.length}),o=new RegExp("^([\\s\\S]{"+c+"})[\\s\\S]{"+(i-c)+"}"),e=this.getValue().replace(o,"$1"+a),this.setValue(e),this.inputAutogrow(),this.beautifierUpdate(e,this.tagsAdded),this.hiddenUpdate(e,this.tagsAdded),this.dropdownHide(),this.contenteditable){range=document.createRange(),range.selectNodeContents(this.$textarea.children(":last").get(0));var l=window.getSelection();range.collapse(!1),l.removeAllRanges(),l.addRange(range)}},Xg.prototype.clear=function(){this.tagsAdded=[],this.$textarea&&this.$textarea.val(""),this.$hidden&&this.$hidden.val(""),this.$beautifier&&this.$beautifier.empty()},$.fn.jomsTagging=function(t){return this.each((function(){joms.util.tagging(this,t)}))};var Zg="valid",tw="invalid";function ow(t){var o,e;return(e=(o=(t=$(t)).parents(".joms-select--wrapper, .joms-textarea__wrapper, .joms-location__wrapper, .joms-checkbox--wrapper, .joms-radio--wrapper")).length?o.next("p.joms-help"):t.next("p.joms-help")).length||(e=$('<p class="joms-help" style="color:red">')).hide().insertAfter(o.length?o:t),e}function ew(t,o){joms.ajax({func:"register,ajaxSetMessage",data:o,callback:function(o){var e=ow(t);e.html(o.message),e.show()}})}const nw={start:function(){var t,o,e,n,s,a,i;$(".joms-form__group").find("[required]").add($(".joms-form__group").find("[data-required]")).each((function(){var t=$(this).closest(".joms-form__group").children().first();t.find(".joms-required").length||t.append(' <span class="joms-required">*</span>')})),(t=$(".joms-form__group").find("textarea[data-maxchars]")).css("display","inline"),t.wrap('<div style="position:relative"></div>'),t.parent().append('<div class="joms-js--textarea-counter" style="position:absolute;bottom:2px;right:5px"></div>'),t.each((function(){var t=$(this);t.siblings(".joms-js--textarea-counter").html(t.data("maxchars"))})),t.off("input").on("input",(function(){var t,o=$(this),e=o.siblings(".joms-js--textarea-counter"),n=o.data("maxchars")||0;n&&((t=o.val()).length>n&&(t=t.substr(0,n),o.val(t)),e.html(n-t.length))})),function(){var t=$(".joms-textarea__wrapper").find(".joms-textarea--limit"),o="joms-textarea--error",e="input.joms-textarea-limit";t.off(e).on(e,(function(){var t=$(this),e=t.parent(".joms-textarea__wrapper"),n=e.find(".joms-textarea__limit > span > span"),s=t.data("min-char"),a=t.data("max-char"),i=t.val(),c=i.length;e.length||(e=t),s=isNaN(s)?0:Math.max(0,+s),a=!isNaN(a)&&Math.max(s,+a),c<s?e.hasClass(o)||e.addClass(o):(e.hasClass(o)&&e.removeClass(o),!1!==a&&c>a&&(i=i.substr(0,a),t.val(i))),e.css("display","inline-block"),n.html(i.length),setTimeout((function(){e.css("display","")}),0)}))}(),e="focus."+(o="joms-validation"),n="blur."+o,s="change."+o,a="validate."+o,(i=$(".joms-form__group")).find("[required]").add(i.find("[data-required]")).off(s).on(s,(function(t,o){var e=$(this);"checkbox"!==e.attr("type")&&"radio"!==e.attr("type")||e.trigger(a,o)})).off(e).on(e,(function(){var t=$(this);t.data("currentValue",t.val())})).off(n).on(n,(function(t,o){var e=$(this),n=e.data("currentValue");void 0!==n&&e.val()!==n&&e.trigger(a,o)})).off(a).on(a,(function(t,o){var e,n,s,i,c=$(this),l=ow(c),p=c.closest(".joms-form__group").children().first(),r=c.attr("name"),m=(c.attr("type")||"").toLowerCase(),u=c.prop("tagName").toLowerCase(),d=$.trim(p.text().replace(/\*/g,"")),j=$.trim(c.val());"function"!=typeof o&&(o=function(){var t,o=c.data("verify");o&&(t=$(o)).length&&$.trim(t.val())&&t.trigger(a)}),m.match(/^(text|password)$/)||u.match(/^(select|textarea)$/)?j?"username"===(e=c.data("validation")||"")?function(t,o,e,n){joms.ajax({func:"register,ajaxCheckUserName",data:[o,n],callback:function(o){var n=ow(t);o.error?(n.html(o.error),n.show(),e(tw)):(n.fadeOut(),e(Zg))}})}(c,j,o,c.data("current")||""):"email"===e?function(t,o,e){if(!/^([*+!.&#$¦\'\\%\/0-9a-z^_`{}=?~:-]+)@(([0-9a-z-]+\.)+[0-9a-z]{2,10})$/i.test(o))return ew(t,["","","COM_COMMUNITY_INVALID_EMAIL"]),void e(tw);joms.ajax({func:"register,ajaxCheckEmail",data:[o],callback:function(o){var n=ow(t);o.error?(n.html(o.error),n.show(),e(tw)):(n.fadeOut(),e(Zg))}})}(c,j,o):e.match(/^email:/)?function(t,o,e){var n,s,a;n=t.data("validation").split(":"),s=$(n[1]),a=ow(t),s.length&&o!==s.val()?(ew(t,["","","COM_COMMUNITY_REGISTER_EMAIL_NOT_SAME"]),e(tw)):(a.fadeOut(),e(Zg))}(c,j,o):"password"===e?(n=c,s=j,i=o,joms.ajax({func:"register,ajaxCheckPass",data:[s],callback:function(t){var o=ow(n);t.error?(o.html(t.error.replace(/\n/g,"<br/>")),o.show(),i(tw)):(o.fadeOut(),i(Zg))}})):e.match(/^password:/)?function(t,o,e){var n,s,a;n=t.data("validation").split(":"),s=$(n[1]),a=ow(t),s.length&&o!==s.val()?(ew(t,["","","COM_COMMUNITY_REGISTER_PASSWORD_NOT_SAME"]),e(tw)):(a.fadeOut(),e(Zg))}(c,j,o):(l.fadeOut(),o(Zg)):(ew(c,[r,d,"COM_COMMUNITY_REGISTER_INVALID_VALUE"]),o(tw)):m.match(/^(radio|checkbox)$/)&&($('[name="'+r+'"]:checked').length?(l.fadeOut(),o(Zg)):(ew(c,[r,d,"COM_COMMUNITY_REGISTER_INVALID_VALUE"]),o(tw)))}))},stop:function(){},validate:function(t,o){var e,n,s,a=0,i=0;return n=(e=$(t)).find("[required]").add(e.find("[data-required]")),s=n.length,n.length||o(a),n.each((function(){$(this).trigger("validate.joms-validation",(function(t){t===tw&&a++,++i>=s&&o(a)}))})),!1}};function sw(t,o){return $("<button/>",{class:"joms-button--full-small joms-button--"+("submit"===t?"primary":"neutral"),type:t,text:this.lang[t]||t}).appendTo(o.find("form"))}const aw={start:function(){var t=$("textarea").filter("[data-wysiwyg=trumbowyg]");t.length&&Et("trumbowyg",(function(){$.extend(jQuery.trumbowyg.langs.en,window.joms_lang.wysiwyg||{});var o=!1;"rtl"===$("html").attr("dir")&&(o=!0),$.extend(jQuery.trumbowyg,{upload:{serverPath:joms.BASE_URL+"index.php?option=com_community&view=photos&task=ajaxPreviewComment&isEditor=1"}}),t.each((function(){var t,e;t={btnsDef:{image:{dropdown:["insertImage","upload"],ico:"insertImage"}},btns:($(this).data("btns")||"viewHTML,|,bold,italic,underline,|,unorderedList,orderedList,|,link,image").split(","),fullscreenable:!1,mobile:!1,tablet:!1,removeformatPasted:!0,autogrow:!0},o&&(t.dir="rtl"),(e=$(this).trumbowyg(t).on("tbwblur",(function(){$(this).data("trumbowyg").syncCode()})).data("trumbowyg")).buildModalBtn=sw,e._openModalInsert=e.openModalInsert,e.openModalInsert=function(t,o,n){var s=e._openModalInsert(t,o,n);return s.find("label").each((function(){var t,o=$(this),e=o.find("input"),n=e.attr("name"),s=e.attr("type");["url","file","title","text","target","alt"].indexOf(n)>=0&&(t='<div class="joms-form__group" style="text-align:left">',t+='<span style="width:90px;text-align:center">'+o.find(".trumbowyg-input-infos").text()+"</span>","file"===s?(t+='<input name="'+n+'" class="joms-input" value="'+(e.val()||"")+'" type="file"',t+=' accept="image/png,image/jpeg,image/gif,image/bmp">'):t+='<input name="'+n+'" class="joms-input" value="'+(e.val()||"")+'" type="'+(s||"text")+'">',t+="</div>",o.replaceWith($(t)))})),s}}))}))}};var iw,cw=window.joms_gmap_key,lw=jQuery;function pw(){iw||(iw=this)}pw.prototype={search:function(t){var o=this;return lw.Deferred((function(e){o.autocompleteService().then((function(n){n.getPlacePredictions({input:t},(function(t,n){"OK"===n?e.resolve(o.mapResult(t)):e.reject(n)}))}))}))},mapResult:function(t){var o=[];return _.isArray(t)&&_.each(t,(function(t){var e=t.place_id,n=t.description.split(/,\s(.+)?/),s=n[0],a=n[1]||"";o.push({id:e,name:s,description:a})})),o},render:function(t,o){var e,n,s=lw(t).show(),a=s.data("joms-map"),i=s.data("joms-map-marker"),c=o.formatted_address||"";o.geometry?(e=o.geometry.location,n=o.geometry.viewport):e=new google.maps.LatLng(o.latitude,o.longitude),a||s.data("joms-map",a=new google.maps.Map(t,{center:e,zoom:15,draggable:!1,scrollwheel:!1,disableDefaultUI:!0})),i||s.data("joms-map-marker",i=new google.maps.Marker({map:a,position:e,title:c})),a.setCenter(e),i.setPosition(e),n?a.fitBounds(n):a.setZoom(15)},loadAPI:function(){return"openstreetmap"==joms_maps_api?this.loadAPI_OPENSTREET():this.loadAPI_GOOGLE()},loadAPI_OPENSTREET:function(){this.callback=!1;var t=this;return lw.Deferred((function(o){var e,n,s;return s=!1,"undefined"==typeof openstreetmap&&((n=document.createElement("script")).type="text/javascript",n.src=joms.ASSETS_URL+"source/js/utils/openstreet.js",document.body.appendChild(n)),window.L&&window.L.map||t.loaded?(!1!==t.callback&&t.callback(),void o.resolve()):(t.queue=t.queue||[],t.queue.push(o),void(t.loading||(t.loading=!0,(e=document.createElement("script")).type="text/javascript",e.src="https://unpkg.com/leaflet@1.3.4/dist/leaflet.js",e.onload=e.onreadystatechange=function(){s||this.readyState&&"complete"!=this.readyState||(s=!0,t.callback())},jQuery("<link>").appendTo("head").attr({type:"text/css",rel:"stylesheet",href:"https://unpkg.com/leaflet@1.3.4/dist/leaflet.css"}),t.callback=function(){for(t.loaded=!0,t.loading=!1;t.queue.length;)t.queue.shift().resolve();t.callback=!1},document.body.appendChild(e))))}))},loadAPI_GOOGLE:function(){var t=this;return lw.Deferred((function(o){var e,n;window.google&&window.google.maps&&window.google.maps.places||t.loaded?o.resolve():(t.queue=t.queue||[],t.queue.push(o),t.loading||(t.loading=!0,n=_.uniqueId("jomsCallback"),(e=document.createElement("script")).type="text/javascript",e.src="https://maps.googleapis.com/maps/api/js?libraries=places"+(cw?"&key="+cw:"")+"&callback="+n,window[n]=function(){for(t.loaded=!0,t.loading=!1;t.queue.length;)t.queue.shift().resolve();delete window[n]},document.body.appendChild(e)))}))},autocompleteService:function(){var t=this;return lw.Deferred((function(o){t.loadAPI().then((function(){var e="_cacheAutocompleteService";t[e]=t[e]||new google.maps.places.AutocompleteService,o.resolve(t[e])}))}))},placeService:function(){var t=this;return lw.Deferred((function(o){t.loadAPI().then((function(){var e="_cachePlaceService",n=document.createElement("div");document.body.appendChild(n),t[e]=t[e]||new google.maps.places.PlacesService(n),o.resolve(t[e])}))}))},placeDetail:function(t){var o=this;return lw.Deferred((function(e){o.placeService().then((function(n){var s="_cachePlaceDetail";o[s]=o[s]||{},o[s][t]?e.resolve(o[s][t]):n.getDetails({placeId:t},(function(n,a){"OK"===a?(o[s][t]=n,e.resolve(n)):e.reject(a)}))}))}))}},joms.util||(joms.util={}),joms.util.map=function(t){"function"==typeof t&&(new pw).loadAPI().done((function(){t()}))},joms.util.map.search=function(t){return lw.Deferred((function(o){(new pw).search(t).done((function(t){o.resolve(t)}))}))},joms.util.map.detail=function(t){return lw.Deferred((function(o){(new pw).placeDetail(t).done((function(t){o.resolve(t)}))}))};const rw=joms.util.map,mw={crop:$t,dialog:Uh,dropdown:Wh,dropdownLegacy:eg,dummy:sg,field:ag,hovercard:nb,loadLib:Et,photos:ib,phototag:ep,popup:w,reaction:Eg,tab:Ng,tagging:function(t,o){return $(t).data(Pg)||new Xg(t,o)},validation:nw,video:lb,videotag:jd,wysiwyg:aw,map:rw},uw={announcement:n,facebook:{update:function(){joms.ajax({func:"connect,ajaxUpdate",data:[""],callback:function(t){console.log(t)}})}},invitation:a,notification:Rs,tagging:bb};const dw={start:function(){},stop:function(){}};var jw,fw,vw=joms._.debounce((function(){"large"!==joms.screenSize()?fw.nextAll(".joms-main").length&&fw.insertAfter(jw):fw.prevAll(".joms-main").length&&fw.insertBefore(jw)}),500),bw=joms._.debounce((function(){var t=window.joms_current_url,o="joms-icon--svg-fixed";t&&$(".joms-icon use").not("."+o).each((function(){var e=this.getAttribute("xlink:href")||"",n=e.replace(/^[^#]*#/,"#");e===t+n?o+=" joms-icon--svg-unmodified":this.setAttribute("xlink:href",t+n),this.setAttribute("class",o)}))}),200);const _w={start:function(){jw=$(".joms-main"),fw=$(".joms-sidebar"),vw(),$(window).on("resize",vw)},fixSVG:bw};var hw;hw=$("#joms-template-poll-option__input").html();const gw={addOption:function(t){$(hw).insertBefore(t),$(".poll-input").last().focus()},removeOption:function(t){var o=$(t).parents(".joms-poll-option"),e=o.find('[name="pollItemId[]"]');if(e.length){var n=e.val();Th.removeoption(n)}else o.remove()},delete:function(t){Th.deletepoll(t)},vote:function(t,o){var e=$(".joms-poll__container-"+t),n=$(".joms-poll__module-container-"+t),s=e.add(n),a=(s.find(".joms-poll__loader"),[]);e.length&&a.push("stream"),n.length&&a.push("module"),function(t,o,e){var n=$(".joms-poll__container-"+t),s=$(".joms-poll__module-container-"+t),a=n.add(s).find(".joms-poll__loader"),i=$(".joms-poll__option-list-"+t).attr("data-collapse");a.fadeIn(300),joms.ajax({func:"polls,ajaxPollVote",data:[t,o,i,e],callback:function(t){a.fadeOut(300),t.success?(t.html.stream&&n.html(t.html.stream),t.html.module&&s.html(t.html.module)):alert("ajax vote error! Please contact your admin.")}})}(t,o,a.join(".")),s.find(".input--radio").length&&function(t,o){t.find(".joms-poll_input").not(".joms-poll_input-"+o).each((function(t,o){$(o).is(":checked")&&$(o).prop("checked",!1)}))}(s,o)},showVotedUsers:function(t,o){Th.voted(t,o)},moreOptions:function(t){var o=$(".joms-poll__option-list-"+t),e=$(".joms-poll__more-"+t);o.attr("data-collapse",1),o.find("li").show(),e.hide()}},ww={comment:w_,cover:Cf,customize:dw,misc:_w,page:Lf,stream:Fv,streams:Ub,toolbar:R_,poll:gw};function yw(t){return yw="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},yw(t)}function kw(t,o){var e=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);o&&(n=n.filter((function(o){return Object.getOwnPropertyDescriptor(t,o).enumerable}))),e.push.apply(e,n)}return e}function Tw(t){for(var o=1;o<arguments.length;o++){var e=null!=arguments[o]?arguments[o]:{};o%2?kw(Object(e),!0).forEach((function(o){xw(t,o,e[o])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(e)):kw(Object(e)).forEach((function(o){Object.defineProperty(t,o,Object.getOwnPropertyDescriptor(e,o))}))}return t}function xw(t,o,e){return(o=function(t){var o=function(t,o){if("object"!=yw(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var n=e.call(t,"string");if("object"!=yw(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==yw(o)?o:o+""}(o))in t?Object.defineProperty(t,o,{value:e,enumerable:!0,configurable:!0,writable:!0}):t[o]=e,t}function Cw(){!function(){joms=joms||{},joms.BASE_URL=window.joms_base_url,delete window.joms_base_url;var t=/https?:\/\/[^/]+/,o=joms.BASE_URL.match(t),e=location.href.match(t);o&&e&&o[0]!==e[0]&&joms.BASE_URL.replace(t,e[0]),joms.ASSETS_URL=window.joms_assets_url,delete window.joms_assets_url,joms.mobile=/android|webos|iphone|ipad|ipod|blackberry|iemobile|opera mini/i.test(navigator.userAgent),joms.ios=/iphone|ipad|ipod/i.test(navigator.userAgent),joms.screenSize=function(){var t=window.innerWidth;return t<=480?"small":t<=991?"medium":"large"},joms.ajax=function(t){var o,e=window.jax_live_site||"",n=window.jax_token_var||"_no_token_found_",s={};if(t||(t={}),s[n]=1,s.task="azrul_ajax",s.option=t.option||"community",s.func=t.func,s.no_html=1,delete t.option,delete t.func,t.data&&t.data.length)for(var a,i=0;i<t.data.length;i++)"string"==typeof(a=t.data[i])&&(a=a.replace(/"/g,"&quot;")),joms._.isArray(a)||(a=["_d_",encodeURIComponent(a)]),s["arg"+(i+2)]=JSON.stringify(a);return t.url=e,t.type="post",t.dataType="json",t.data=s,t.success=function(t){t&&(o=t)},t.complete=function(){if(o||(o={error:"Undefined error."}),o.noLogin)return joms.api&&joms.api.login(o),void joms.view.misc.fixSVG();var e;if(joms._onAjaxReponseQueue&&joms._onAjaxReponseQueue[s.func]&&joms._onAjaxReponseQueue[s.func].length)for(var n=0;n<joms._onAjaxReponseQueue[s.func].length;n++)"function"==typeof joms._onAjaxReponseQueue[s.func][n]&&!1===joms._onAjaxReponseQueue[s.func][n](o)&&(e=!0);"function"!=typeof t.callback||e||t.callback(o),joms.view.misc.fixSVG()},joms.jQuery.ajax(t)},joms.____=function(){for(var t=joms.jQuery("#community-wrap");t.length&&"body"!==t[0].tagName.toLowerCase();)t.siblings().hide(),(t=t.parent()).css({border:"0 none",padding:0,marginTop:0,marginBottom:0,width:"auto"})},joms._printSVGIcons=function(){for(var t=["home","newspaper","pencil","image","images","camera","play","film","camera2","bullhorn","library","profile","support","envelope","location","clock","bell","calendar","box-add","box-remove","bubble","bubbles","user","users","spinner","search","key","lock","wrench","cog","gift","remove","briefcase","switch","signup","list","menu","earth","link","eye","star","star2","star3","thumbs-up","happy","smiley","tongue","sad","wink","grin","cool","angry","evil","shocked","confused","neutral","wondering","warning","info","blocked","spam","close","checkmark","plus","arrow-right","arrow-left","tab","filter","console","share","facebook","libreoffice","file-zip","arrow-down","redo","tag","search-user"],o=joms.jQuery("<div>"),e=0;e<t.length;e++)o.append('<svg viewBox="0 0 30 30" class="joms-icon" style="width:30px;height:30px"><use xlink:href="#joms-icon-'+t[e]+'"></use></svg>');o.appendTo(document.body)}}(),joms=Tw(Tw({},joms),{popup:Mh,util:mw,fn:uw,view:ww}),joms.api={login:function(t){x(t)},userChangeVanityURL:function(t){td.changeVanityURL(t)},userAddFeatured:function(t){td.addFeatured(t)},userRemoveFeatured:function(t){td.removeFeatured(t)},userBan:function(t){td.ban(t)},userUnban:function(t){td.unban(t)},userBlock:function(t){td.block(t)},userUnblock:function(t){td.unblock(t)},userIgnore:function(t){td.ignore(t)},userUnignore:function(t){td.unignore(t)},userReport:function(t){td.report(t)},avatarChange:function(t,o,e){lo.change(t,o),e&&(e.stopPropagation(),e.preventDefault())},avatarRemove:function(t,o){lo.remove(t,o)},avatarRotate:function(t,o,e,n){lo.rotate(t,o,e,n)},coverChange:function(t,o){No.change(t,o)},coverRemove:function(t,o){No.remove(t,o)},coverReposition:function(t,o){Cf.reposition(t,o)},coverClick:function(t,o){Cf.click(t,o)},eventInvite:function(t,o){yn.invite(t,o)},eventJoin:function(t){yn.join(t)},eventLeave:function(t){yn.leave(t)},eventResponse:function(){yn.response.apply(this,arguments)},eventAddFeatured:function(t){yn.addFeatured(t)},eventRemoveFeatured:function(t){yn.removeFeatured(t)},eventReport:function(t){yn.report(t)},eventDelete:function(t){yn.deleteEvent(t)},eventRejectGuest:function(t,o){yn.rejectGuest(t,o)},eventBanMember:function(t,o){yn.banMember(t,o)},eventUnbanMember:function(t,o){yn.unbanMember(t,o)},eventUnpublish:function(t){yn.unpublish(t)},friendAdd:function(t){ea.add(t)},friendAddCancel:function(t){ea.addCancel(t)},friendRemove:function(t){ea.remove(t)},friendResponse:function(t){ea.response(t)},friendApprove:function(t){ea.approve(t)},friendReject:function(t){ea.reject(t)},followAdd:function(t){$a.add(t)},followRemove:function(t){$a.remove(t)},groupInvite:function(t){ll.invite(t,1,1)},groupJoin:function(t){ll.join(t)},groupLeave:function(t){ll.leave(t)},groupAddFeatured:function(t){ll.addFeatured(t)},groupRemoveFeatured:function(t){ll.removeFeatured(t)},groupReport:function(t){ll.report(t)},groupUnpublish:function(t){ll.unpublish(t)},groupDelete:function(t){ll.deleteGroup(t)},groupApprove:function(t,o){ll.approve(t,o)},groupRemoveMember:function(t,o){ll.removeMember(t,o)},groupBanMember:function(t,o){ll.banMember(t,o)},groupUnbanMember:function(t,o){ll.unbanMember(t,o)},notificationGeneral:function(){R_.notificationGeneral()},notificationFriend:function(){R_.notificationFriend()},notificationPm:function(){R_.notificationPm()},photoUpload:function(t,o,e){Em.upload(t,o,e)},photoOpen:function(t,o){Em.open(t,o)},photoRemove:function(t){Em.remove(t)},photoZoom:function(t){Em.zoom(t)},photoSetAvatar:function(t){Em.setAvatar(t)},photoSetCover:function(t,o){Em.setCover(t,o)},photoSetAlbum:function(t){Em.setAlbum(t)},photoReport:function(t,o){Em.report(t,o)},albumRemove:function(t){E.remove(t)},albumAddFeatured:function(t){E.addFeatured(t)},albumRemoveFeatured:function(t){E.removeFeatured(t)},pmSend:function(t){Hm.send(t)},videoAdd:function(t,o){_f.add(t,o)},videoOpen:function(t){_f.open(t)},videoEdit:function(t){_f.edit(t)},videoRemove:function(t,o){_f.remove(t,o)},videoAddFeatured:function(t){_f.addFeatured(t)},videoRemoveFeatured:function(t){_f.removeFeatured(t)},videoLinkToProfile:function(t){_f.linkToProfile(t)},videoRemoveLinkFromProfile:function(t,o){_f.removeLinkFromProfile(t,o)},videoFetchThumbnail:function(t){_f.fetchThumbnail(t)},videoReport:function(t,o){_f.report(t,o)},locationView:function(t){Hl(t)},streamLike:function(t){Fv.like(t)},streamUnlike:function(t){Fv.unlike(t)},streamEdit:function(t,o){Fv.edit(t,o)},streamEditLocation:function(t){Fv.editLocation(t)},streamRemove:function(t){Fv.remove(t)},streamRemoveLocation:function(t){Fv.removeLocation(t)},streamRemoveMood:function(t){Fv.removeMood(t)},streamRemoveTag:function(t){Fv.removeTag(t)},streamSelectPrivacy:function(t){Fv.selectPrivacy(t)},streamShare:function(t){Fv.share(t)},streamHide:function(t,o){Fv.hide(t,o)},streamShowLikes:function(t,o){Fv.showLikes(t,o)},streamShowComments:function(t,o){Fv.showComments(t,o)},streamShowOthers:function(t){Fv.showOthers(t)},streamReport:function(t,o){Fv.report(t,o)},streamToggleText:function(t){Fv.toggleText(t)},streamAddFeatured:function(t){Fv.addFeatured(t)},streamRemoveFeatured:function(t){Fv.removeFeatured(t)},streamsLoadMore:function(){Ub.loadMore()},commentLike:function(t){w_.like(t)},commentUnlike:function(t){w_.unlike(t)},commentEdit:function(t,o,e){w_.edit(t,o,e)},commentCancel:function(t){w_.cancel(t)},commentRemove:function(t,o){w_.remove(t,o)},commentRemoveTag:function(t,o){w_.removeTag(t,o)},commentRemovePreview:function(t,o){w_.removePreview(t,o)},commentRemoveThumbnail:function(t,o){w_.removeThumbnail(t,o)},commentShowLikes:function(t){w_.showLikes(t)},commentToggleText:function(t){w_.toggleText(t)},appAbout:function(t){wt.about(t)},appBrowse:function(t){wt.browse(t)},appPrivacy:function(t){wt.privacy(t)},appRemove:function(t){wt.remove(t)},appSetting:function(t,o){wt.setting(t,o)},searchSave:function(t){Qm.save(t)},pageLike:function(t,o){Lf.like(t,o)},pageUnlike:function(t,o){Lf.unlike(t,o)},pageShare:function(t){Lf.share(t)},pageInvite:function(t){Gi.invite(t)},pageDelete:function(t){Gi.deletePage(t)},pagePublish:function(t){Gi.publish(t)},pageUnpublish:function(t){Gi.unpublish(t)},pageAddFeatured:function(t){Gi.addFeatured(t)},pageRemoveFeatured:function(t){Gi.removeFeatured(t)},pageBanMember:function(t,o){Gi.banMember(t,o)},pageUnbanMember:function(t,o){Gi.unbanMember(t,o)},pageRemoveMember:function(t,o){Gi.removeMember(t,o)},pageReport:function(t){Gi.report(t)},invitationAccept:function(t,o){a.accept(t,o)},invitationReject:function(t,o){a.reject(t,o)},fileUpload:function(t,o){ks.upload(t,o)},fileList:function(t,o){ks.list(t,o)},fileDownload:function(t,o,e){ks.download(t,o,e)},fileRemove:function(t,o){ks.remove(t,o)},fileUpdateHit:function(t,o){ks.updateHit(t,o)},discussionLock:function(t,o){Jo.lock(t,o)},discussionRemove:function(t,o){Jo.remove(t,o)},announcementEdit:function(t,o){n.edit(t,o)},announcementEditCancel:function(t,o){n.editCancel(t,o)},announcementRemove:function(t,o){J.remove(t,o)},inboxRemove:function(t,o){Al.remove(t,o)},inboxSetRead:function(t,o){Al.setRead(t,o)},inboxSetUnread:function(t,o){Al.setUnread(t,o)},tnc:function(){Cu.tnc()},fbcUpdate:function(){Rn.update()}},joms.onStart((function(){"site"===joms.getData("client")&&(joms.view.comment.start(),joms.view.page.initialize(),joms.view.stream.start(),joms.view.streams.start(),joms.view.toolbar.start(),joms.view.customize.start(),joms.view.misc.start(),joms.util.dropdown.start(),joms.util.tab.start(),joms.util.validation.start(),joms.util.hovercard.initialize(),joms.util.reaction.initialize(),+window.joms_my_id&&joms.fn.tagging.fetchFriendsInContext(),joms.view.misc.fixSVG()),joms.util.wysiwyg.start()})),joms.jQuery((function(){joms.start()}))}}}]);

Anon7 - 2022
AnonSec Team