/* >>> file start: js/front-bundled/dist/profile.js */
/*! For license information please see profile.js.LICENSE.txt */
(()=>{var e,t={2833:e=>{e.exports=function(e,t,r,n){var o=r?r.call(n,e,t):void 0;if(void 0!==o)return!!o;if(e===t)return!0;if("object"!=typeof e||!e||"object"!=typeof t||!t)return!1;var i=Object.keys(e),a=Object.keys(t);if(i.length!==a.length)return!1;for(var c=Object.prototype.hasOwnProperty.bind(t),l=0;l<i.length;l++){var u=i[l];if(!c(u))return!1;var s=e[u],f=t[u];if(!1===(o=r?r.call(n,s,f,u):void 0)||void 0===o&&s!==f)return!1}return!0}},3451:(e,t,r)=>{"use strict";r.d(t,{$:()=>o,a:()=>i});var n=r(79056),o=n.default.button.withConfig({displayName:"Button",componentId:"sc-k30yql-0"})(["position:relative;display:inline-block;padding:6px 16px;box-sizing:border-box;border-radius:4px;vertical-align:middle;text-align:center;font:inherit;font-size:14px;line-height:1;white-space:nowrap;cursor:pointer;transition:border-color .2s,background-color .2s,color .2s;"," "," "," "," "," "," "," "," ",""],(function(e){return e.primary?(0,n.css)(["color:#FFFFFF;background-color:#00A3D9;border:1px solid #00A3D9;&:visited{color:#FFFFFF;}&:hover,&:focus{border-color:#00C0FF;background-color:#00C0FF;color:#FFFFFF;}&:active{border-color:#0996C5;background-color:#0996C5;color:#FFFFFF;}"]):(0,n.css)(["color:#333333;background-color:#FFFFFF;border:1px solid #D4DCE0;&:visited{color:#333333;}&:hover,&:focus{border-color:#00A3D9;background-color:#FFFFFF;}&:active{border-color:#D4DCE0;background-color:#F9FAFA;}"])}),(function(e){return e.isLoading&&(0,n.css)(["color:transparent;&:hover,&:focus,&:active{color:transparent;}"])}),(function(e){var t=e.disabled,r=e.primary;return t&&(0,n.css)(["opacity:.5;cursor:not-allowed;&:hover,&:focus{background-color:",";border-color:",";}"],r?"#00A3D9":"#FFFFFF",r?"#00A3D9":"#D4DCE0")}),(function(e){return e.noBorder&&(0,n.css)(["border:1px solid transparent;color:#00A3D9;background-color:transparent;&:hover,&:focus{border-color:#00A3D9;}&:active{border-color:#0996C5;color:#0996C5;}"])}),(function(e){return e.hasOutline&&(0,n.css)(["border:1px solid #D4DCE0;color:#333;background-color:transparent;&:hover{border-color:#BDC8CD;background-color:transparent;}&:focus{border-color:#00A3D9;background-color:transparent;}&:active{border-color:#F9FAFA;background-color:transparent;}"])}),(function(e){return e.linkType&&(0,n.css)(["padding:0;border:0;background-color:transparent;color:#0099CC;&:hover,&:active,&:focus{color:#0086B3;background-color:transparent;}"])}),(function(e){var t=e.$size;return{medium:(0,n.css)(["padding:8px 16px;"])}[t]}),(function(e){return e.text&&(0,n.css)(["display:flex;align-items:center;justify-content:center;min-height:24px;padding:4px 8px;border:0;border-radius:4px;font-weight:600;letter-spacing:0.24px;color:#2EADDF;text-align:left;background-color:transparent;transition:background-color 0.15s linear;cursor:pointer;&:hover{background-color:rgba(0,0,0,0.08);}&:active{background-color:rgba(0,0,0,0.12);}&:focus{outline:none;}&:focus-visible{outline:2px dashed #2EADDF;outline-offset:2px;}&:disabled{color:rgba(203,218,225,1);pointer-events:none;}"])}),(function(e){return e.sizeL&&(0,n.css)(["min-height:32px;padding:8px 16px;"])})),i=n.default.div.withConfig({displayName:"Loader",componentId:"sc-k30yql-1"})(["position:absolute;left:50%;top:50%;transform:translate(-50%,-50%);color:#FFFFFF;svg{display:block;animation:svgrotate .57s linear infinite;}@keyframes svgrotate{100%{transform:rotate(360deg);}}"])},4146:(e,t,r)=>{"use strict";var n=r(44363),o={childContextTypes:!0,contextType:!0,contextTypes:!0,defaultProps:!0,displayName:!0,getDefaultProps:!0,getDerivedStateFromError:!0,getDerivedStateFromProps:!0,mixins:!0,propTypes:!0,type:!0},i={name:!0,length:!0,prototype:!0,caller:!0,callee:!0,arguments:!0,arity:!0},a={$$typeof:!0,compare:!0,defaultProps:!0,displayName:!0,propTypes:!0,type:!0},c={};function l(e){return n.isMemo(e)?a:c[e.$$typeof]||o}c[n.ForwardRef]={$$typeof:!0,render:!0,defaultProps:!0,displayName:!0,propTypes:!0},c[n.Memo]=a;var u=Object.defineProperty,s=Object.getOwnPropertyNames,f=Object.getOwnPropertySymbols,p=Object.getOwnPropertyDescriptor,d=Object.getPrototypeOf,m=Object.prototype;e.exports=function e(t,r,n){if("string"!=typeof r){if(m){var o=d(r);o&&o!==m&&e(t,o,n)}var a=s(r);f&&(a=a.concat(f(r)));for(var c=l(t),h=l(r),y=0;y<a.length;++y){var v=a[y];if(!(i[v]||n&&n[v]||h&&h[v]||c&&c[v])){var b=p(r,v);try{u(t,v,b)}catch(e){}}}}return t}},7463:(e,t)=>{"use strict";function r(e,t){var r=e.length;e.push(t);e:for(;0<r;){var n=r-1>>>1,o=e[n];if(!(0<i(o,t)))break e;e[n]=t,e[r]=o,r=n}}function n(e){return 0===e.length?null:e[0]}function o(e){if(0===e.length)return null;var t=e[0],r=e.pop();if(r!==t){e[0]=r;e:for(var n=0,o=e.length,a=o>>>1;n<a;){var c=2*(n+1)-1,l=e[c],u=c+1,s=e[u];if(0>i(l,r))u<o&&0>i(s,l)?(e[n]=s,e[u]=r,n=u):(e[n]=l,e[c]=r,n=c);else{if(!(u<o&&0>i(s,r)))break e;e[n]=s,e[u]=r,n=u}}}return t}function i(e,t){var r=e.sortIndex-t.sortIndex;return 0!==r?r:e.id-t.id}if("object"==typeof performance&&"function"==typeof performance.now){var a=performance;t.unstable_now=function(){return a.now()}}else{var c=Date,l=c.now();t.unstable_now=function(){return c.now()-l}}var u=[],s=[],f=1,p=null,d=3,m=!1,h=!1,y=!1,v="function"==typeof setTimeout?setTimeout:null,b="function"==typeof clearTimeout?clearTimeout:null,g="undefined"!=typeof setImmediate?setImmediate:null;function w(e){for(var t=n(s);null!==t;){if(null===t.callback)o(s);else{if(!(t.startTime<=e))break;o(s),t.sortIndex=t.expirationTime,r(u,t)}t=n(s)}}function x(e){if(y=!1,w(e),!h)if(null!==n(u))h=!0,I(E);else{var t=n(s);null!==t&&F(x,t.startTime-e)}}function E(e,r){h=!1,y&&(y=!1,b(L),L=-1),m=!0;var i=d;try{for(w(r),p=n(u);null!==p&&(!(p.expirationTime>r)||e&&!C());){var a=p.callback;if("function"==typeof a){p.callback=null,d=p.priorityLevel;var c=a(p.expirationTime<=r);r=t.unstable_now(),"function"==typeof c?p.callback=c:p===n(u)&&o(u),w(r)}else o(u);p=n(u)}if(null!==p)var l=!0;else{var f=n(s);null!==f&&F(x,f.startTime-r),l=!1}return l}finally{p=null,d=i,m=!1}}"undefined"!=typeof navigator&&void 0!==navigator.scheduling&&void 0!==navigator.scheduling.isInputPending&&navigator.scheduling.isInputPending.bind(navigator.scheduling);var S,j=!1,O=null,L=-1,_=5,k=-1;function C(){return!(t.unstable_now()-k<_)}function P(){if(null!==O){var e=t.unstable_now();k=e;var r=!0;try{r=O(!0,e)}finally{r?S():(j=!1,O=null)}}else j=!1}if("function"==typeof g)S=function(){g(P)};else if("undefined"!=typeof MessageChannel){var N=new MessageChannel,A=N.port2;N.port1.onmessage=P,S=function(){A.postMessage(null)}}else S=function(){v(P,0)};function I(e){O=e,j||(j=!0,S())}function F(e,r){L=v((function(){e(t.unstable_now())}),r)}t.unstable_IdlePriority=5,t.unstable_ImmediatePriority=1,t.unstable_LowPriority=4,t.unstable_NormalPriority=3,t.unstable_Profiling=null,t.unstable_UserBlockingPriority=2,t.unstable_cancelCallback=function(e){e.callback=null},t.unstable_continueExecution=function(){h||m||(h=!0,I(E))},t.unstable_forceFrameRate=function(e){0>e||125<e?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):_=0<e?Math.floor(1e3/e):5},t.unstable_getCurrentPriorityLevel=function(){return d},t.unstable_getFirstCallbackNode=function(){return n(u)},t.unstable_next=function(e){switch(d){case 1:case 2:case 3:var t=3;break;default:t=d}var r=d;d=t;try{return e()}finally{d=r}},t.unstable_pauseExecution=function(){},t.unstable_requestPaint=function(){},t.unstable_runWithPriority=function(e,t){switch(e){case 1:case 2:case 3:case 4:case 5:break;default:e=3}var r=d;d=e;try{return t()}finally{d=r}},t.unstable_scheduleCallback=function(e,o,i){var a=t.unstable_now();switch(i="object"==typeof i&&null!==i&&"number"==typeof(i=i.delay)&&0<i?a+i:a,e){case 1:var c=-1;break;case 2:c=250;break;case 5:c=1073741823;break;case 4:c=1e4;break;default:c=5e3}return e={id:f++,callback:o,priorityLevel:e,startTime:i,expirationTime:c=i+c,sortIndex:-1},i>a?(e.sortIndex=i,r(s,e),null===n(u)&&e===n(s)&&(y?(b(L),L=-1):y=!0,F(x,i-a))):(e.sortIndex=c,r(u,e),h||m||(h=!0,I(E))),e},t.unstable_shouldYield=C,t.unstable_wrapCallback=function(e){var t=d;return function(){var r=d;d=t;try{return e.apply(this,arguments)}finally{d=r}}}},7723:(e,t,r)=>{"use strict";r.d(t,{J:()=>o.A,Y:()=>n.A});var n=r(70373),o=r(31016)},8680:(e,t,r)=>{"use strict";r.d(t,{A:()=>a});var n=r(96540),o=r(10489),i=r(90764);const a=function(e){var t=e.id,r=(0,n.useRef)(t||(0,o.A)()),a="js--scroll-lock-".concat(r.current);return(0,n.useEffect)((function(){var e=document.body;return e.classList.add(a),function(){e.classList.remove(a)}}),[a]),n.createElement(i.k,{bodyClassName:a})}},8887:(e,t,r)=>{"use strict";r.d(t,{A:()=>n});const n=function(e){function t(e,n,l,u,p){for(var d,m,h,y,w,E=0,S=0,j=0,O=0,L=0,A=0,F=h=d=0,T=0,M=0,J=0,U=0,R=l.length,B=R-1,G="",z="",$="",q="";T<R;){if(m=l.charCodeAt(T),T===B&&0!==S+O+j+E&&(0!==S&&(m=47===S?10:47),O=j=E=0,R++,B++),0===S+O+j+E){if(T===B&&(0<M&&(G=G.replace(f,"")),0<G.trim().length)){switch(m){case 32:case 9:case 59:case 13:case 10:break;default:G+=l.charAt(T)}m=59}switch(m){case 123:for(d=(G=G.trim()).charCodeAt(0),h=1,U=++T;T<R;){switch(m=l.charCodeAt(T)){case 123:h++;break;case 125:h--;break;case 47:switch(m=l.charCodeAt(T+1)){case 42:case 47:e:{for(F=T+1;F<B;++F)switch(l.charCodeAt(F)){case 47:if(42===m&&42===l.charCodeAt(F-1)&&T+2!==F){T=F+1;break e}break;case 10:if(47===m){T=F+1;break e}}T=F}}break;case 91:m++;case 40:m++;case 34:case 39:for(;T++<B&&l.charCodeAt(T)!==m;);}if(0===h)break;T++}if(h=l.substring(U,T),0===d&&(d=(G=G.replace(s,"").trim()).charCodeAt(0)),64===d){switch(0<M&&(G=G.replace(f,"")),m=G.charCodeAt(1)){case 100:case 109:case 115:case 45:M=n;break;default:M=N}if(U=(h=t(n,M,h,m,p+1)).length,0<I&&(w=c(3,h,M=r(N,G,J),n,k,_,U,m,p,u),G=M.join(""),void 0!==w&&0===(U=(h=w.trim()).length)&&(m=0,h="")),0<U)switch(m){case 115:G=G.replace(x,a);case 100:case 109:case 45:h=G+"{"+h+"}";break;case 107:h=(G=G.replace(v,"$1 $2"))+"{"+h+"}",h=1===P||2===P&&i("@"+h,3)?"@-webkit-"+h+"@"+h:"@"+h;break;default:h=G+h,112===u&&(z+=h,h="")}else h=""}else h=t(n,r(n,G,J),h,u,p+1);$+=h,h=J=M=F=d=0,G="",m=l.charCodeAt(++T);break;case 125:case 59:if(1<(U=(G=(0<M?G.replace(f,""):G).trim()).length))switch(0===F&&(d=G.charCodeAt(0),45===d||96<d&&123>d)&&(U=(G=G.replace(" ",":")).length),0<I&&void 0!==(w=c(1,G,n,e,k,_,z.length,u,p,u))&&0===(U=(G=w.trim()).length)&&(G="\0\0"),d=G.charCodeAt(0),m=G.charCodeAt(1),d){case 0:break;case 64:if(105===m||99===m){q+=G+l.charAt(T);break}default:58!==G.charCodeAt(U-1)&&(z+=o(G,d,m,G.charCodeAt(2)))}J=M=F=d=0,G="",m=l.charCodeAt(++T)}}switch(m){case 13:case 10:47===S?S=0:0===1+d&&107!==u&&0<G.length&&(M=1,G+="\0"),0<I*D&&c(0,G,n,e,k,_,z.length,u,p,u),_=1,k++;break;case 59:case 125:if(0===S+O+j+E){_++;break}default:switch(_++,y=l.charAt(T),m){case 9:case 32:if(0===O+E+S)switch(L){case 44:case 58:case 9:case 32:y="";break;default:32!==m&&(y=" ")}break;case 0:y="\\0";break;case 12:y="\\f";break;case 11:y="\\v";break;case 38:0===O+S+E&&(M=J=1,y="\f"+y);break;case 108:if(0===O+S+E+C&&0<F)switch(T-F){case 2:112===L&&58===l.charCodeAt(T-3)&&(C=L);case 8:111===A&&(C=A)}break;case 58:0===O+S+E&&(F=T);break;case 44:0===S+j+O+E&&(M=1,y+="\r");break;case 34:case 39:0===S&&(O=O===m?0:0===O?m:O);break;case 91:0===O+S+j&&E++;break;case 93:0===O+S+j&&E--;break;case 41:0===O+S+E&&j--;break;case 40:0===O+S+E&&(0===d&&(2*L+3*A==533||(d=1)),j++);break;case 64:0===S+j+O+E+F+h&&(h=1);break;case 42:case 47:if(!(0<O+E+j))switch(S){case 0:switch(2*m+3*l.charCodeAt(T+1)){case 235:S=47;break;case 220:U=T,S=42}break;case 42:47===m&&42===L&&U+2!==T&&(33===l.charCodeAt(U+2)&&(z+=l.substring(U,T+1)),y="",S=0)}}0===S&&(G+=y)}A=L,L=m,T++}if(0<(U=z.length)){if(M=n,0<I&&void 0!==(w=c(2,z,M,e,k,_,U,u,p,u))&&0===(z=w).length)return q+z+$;if(z=M.join(",")+"{"+z+"}",0!==P*C){switch(2!==P||i(z,2)||(C=0),C){case 111:z=z.replace(g,":-moz-$1")+z;break;case 112:z=z.replace(b,"::-webkit-input-$1")+z.replace(b,"::-moz-$1")+z.replace(b,":-ms-input-$1")+z}C=0}}return q+z+$}function r(e,t,r){var o=t.trim().split(h);t=o;var i=o.length,a=e.length;switch(a){case 0:case 1:var c=0;for(e=0===a?"":e[0]+" ";c<i;++c)t[c]=n(e,t[c],r).trim();break;default:var l=c=0;for(t=[];c<i;++c)for(var u=0;u<a;++u)t[l++]=n(e[u]+" ",o[c],r).trim()}return t}function n(e,t,r){var n=t.charCodeAt(0);switch(33>n&&(n=(t=t.trim()).charCodeAt(0)),n){case 38:return t.replace(y,"$1"+e.trim());case 58:return e.trim()+t.replace(y,"$1"+e.trim());default:if(0<1*r&&0<t.indexOf("\f"))return t.replace(y,(58===e.charCodeAt(0)?"":"$1")+e.trim())}return e+t}function o(e,t,r,n){var a=e+";",c=2*t+3*r+4*n;if(944===c){e=a.indexOf(":",9)+1;var l=a.substring(e,a.length-1).trim();return l=a.substring(0,e).trim()+l+";",1===P||2===P&&i(l,1)?"-webkit-"+l+l:l}if(0===P||2===P&&!i(a,1))return a;switch(c){case 1015:return 97===a.charCodeAt(10)?"-webkit-"+a+a:a;case 951:return 116===a.charCodeAt(3)?"-webkit-"+a+a:a;case 963:return 110===a.charCodeAt(5)?"-webkit-"+a+a:a;case 1009:if(100!==a.charCodeAt(4))break;case 969:case 942:return"-webkit-"+a+a;case 978:return"-webkit-"+a+"-moz-"+a+a;case 1019:case 983:return"-webkit-"+a+"-moz-"+a+"-ms-"+a+a;case 883:if(45===a.charCodeAt(8))return"-webkit-"+a+a;if(0<a.indexOf("image-set(",11))return a.replace(L,"$1-webkit-$2")+a;break;case 932:if(45===a.charCodeAt(4))switch(a.charCodeAt(5)){case 103:return"-webkit-box-"+a.replace("-grow","")+"-webkit-"+a+"-ms-"+a.replace("grow","positive")+a;case 115:return"-webkit-"+a+"-ms-"+a.replace("shrink","negative")+a;case 98:return"-webkit-"+a+"-ms-"+a.replace("basis","preferred-size")+a}return"-webkit-"+a+"-ms-"+a+a;case 964:return"-webkit-"+a+"-ms-flex-"+a+a;case 1023:if(99!==a.charCodeAt(8))break;return"-webkit-box-pack"+(l=a.substring(a.indexOf(":",15)).replace("flex-","").replace("space-between","justify"))+"-webkit-"+a+"-ms-flex-pack"+l+a;case 1005:return d.test(a)?a.replace(p,":-webkit-")+a.replace(p,":-moz-")+a:a;case 1e3:switch(t=(l=a.substring(13).trim()).indexOf("-")+1,l.charCodeAt(0)+l.charCodeAt(t)){case 226:l=a.replace(w,"tb");break;case 232:l=a.replace(w,"tb-rl");break;case 220:l=a.replace(w,"lr");break;default:return a}return"-webkit-"+a+"-ms-"+l+a;case 1017:if(-1===a.indexOf("sticky",9))break;case 975:switch(t=(a=e).length-10,c=(l=(33===a.charCodeAt(t)?a.substring(0,t):a).substring(e.indexOf(":",7)+1).trim()).charCodeAt(0)+(0|l.charCodeAt(7))){case 203:if(111>l.charCodeAt(8))break;case 115:a=a.replace(l,"-webkit-"+l)+";"+a;break;case 207:case 102:a=a.replace(l,"-webkit-"+(102<c?"inline-":"")+"box")+";"+a.replace(l,"-webkit-"+l)+";"+a.replace(l,"-ms-"+l+"box")+";"+a}return a+";";case 938:if(45===a.charCodeAt(5))switch(a.charCodeAt(6)){case 105:return l=a.replace("-items",""),"-webkit-"+a+"-webkit-box-"+l+"-ms-flex-"+l+a;case 115:return"-webkit-"+a+"-ms-flex-item-"+a.replace(S,"")+a;default:return"-webkit-"+a+"-ms-flex-line-pack"+a.replace("align-content","").replace(S,"")+a}break;case 973:case 989:if(45!==a.charCodeAt(3)||122===a.charCodeAt(4))break;case 931:case 953:if(!0===O.test(e))return 115===(l=e.substring(e.indexOf(":")+1)).charCodeAt(0)?o(e.replace("stretch","fill-available"),t,r,n).replace(":fill-available",":stretch"):a.replace(l,"-webkit-"+l)+a.replace(l,"-moz-"+l.replace("fill-",""))+a;break;case 962:if(a="-webkit-"+a+(102===a.charCodeAt(5)?"-ms-"+a:"")+a,211===r+n&&105===a.charCodeAt(13)&&0<a.indexOf("transform",10))return a.substring(0,a.indexOf(";",27)+1).replace(m,"$1-webkit-$2")+a}return a}function i(e,t){var r=e.indexOf(1===t?":":"{"),n=e.substring(0,3!==t?r:10);return r=e.substring(r+1,e.length-1),F(2!==t?n:n.replace(j,"$1"),r,t)}function a(e,t){var r=o(t,t.charCodeAt(0),t.charCodeAt(1),t.charCodeAt(2));return r!==t+";"?r.replace(E," or ($1)").substring(4):"("+t+")"}function c(e,t,r,n,o,i,a,c,l,s){for(var f,p=0,d=t;p<I;++p)switch(f=A[p].call(u,e,d,r,n,o,i,a,c,l,s)){case void 0:case!1:case!0:case null:break;default:d=f}if(d!==t)return d}function l(e){return void 0!==(e=e.prefix)&&(F=null,e?"function"!=typeof e?P=1:(P=2,F=e):P=0),l}function u(e,r){var n=e;if(33>n.charCodeAt(0)&&(n=n.trim()),n=[n],0<I){var o=c(-1,r,n,n,k,_,0,0,0,0);void 0!==o&&"string"==typeof o&&(r=o)}var i=t(N,n,r,0,0);return 0<I&&void 0!==(o=c(-2,i,n,n,k,_,i.length,0,0,0))&&(i=o),C=0,_=k=1,i}var s=/^\0+/g,f=/[\0\r\f]/g,p=/: */g,d=/zoo|gra/,m=/([,: ])(transform)/g,h=/,\r+?/g,y=/([\t\r\n ])*\f?&/g,v=/@(k\w+)\s*(\S*)\s*/,b=/::(place)/g,g=/:(read-only)/g,w=/[svh]\w+-[tblr]{2}/,x=/\(\s*(.*)\s*\)/g,E=/([\s\S]*?);/g,S=/-self|flex-/g,j=/[^]*?(:[rp][el]a[\w-]+)[^]*/,O=/stretch|:\s*\w+\-(?:conte|avail)/,L=/([^-])(image-set\()/,_=1,k=1,C=0,P=1,N=[],A=[],I=0,F=null,D=0;return u.use=function e(t){switch(t){case void 0:case null:I=A.length=0;break;default:if("function"==typeof t)A[I++]=t;else if("object"==typeof t)for(var r=0,n=t.length;r<n;++r)e(t[r]);else D=0|!!t}return e},u.set=l,void 0!==e&&l(e),u}},9472:(e,t,r)=>{"use strict";r(96540)},10489:(e,t,r)=>{"use strict";r.d(t,{A:()=>n});const n=function(){return Date.now().toString(36)+Math.random().toString(36).slice(2)}},13768:(e,t,r)=>{"use strict";r.d(t,{KB:()=>u,VY:()=>i,pd:()=>a,wi:()=>l,yY:()=>c});var n=r(79056),o=r(28081),i=n.default.p.withConfig({displayName:"Description",componentId:"sc-i2y7sb-0"})(["margin:0 0 12px 0;"]),a=n.default.input.attrs({type:"text"}).withConfig({displayName:"Input",componentId:"sc-i2y7sb-1"})(["width:100%;text-overflow:ellipsis;"]),c=(0,n.default)(o.A).withConfig({displayName:"SaveButton",componentId:"sc-i2y7sb-2"})(["",""],(function(e){return e.isLoading&&(0,n.css)(["& span{opacity:0;}"])})),l=n.default.div.withConfig({displayName:"Footer",componentId:"sc-i2y7sb-3"})(["display:flex;justify-content:space-between;align-items:center;"]),u=n.default.div.withConfig({displayName:"ButtonsWrap",componentId:"sc-i2y7sb-4"})(["display:flex;justify-content:space-between;align-items:center;gap:0.5rem;margin-left:auto;"])},14554:(e,t,r)=>{"use strict";r.d(t,{D:()=>n,N:()=>o});var n=r(96540).createContext({}),o=n.Provider},18092:(e,t,r)=>{"use strict";function n(e){return n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},n(e)}function o(e,t,r){return(t=function(e){var t=function(e){if("object"!==n(e)||null===e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var r=t.call(e,"string");if("object"!==n(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"===n(t)?t:String(t)}(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}r(96540);var i="alignLeftEdges",a="alignRightEdges",c="alignCenters",l="right",u="left",s="above",f="below";o(o(o(o(o({},i,[a]),a,[i]),u,[l]),l,[u]),c,[i,a]),o(o({},s,[f]),f,[s])},20158:(e,t,r)=>{"use strict";r(96540)},20230:(e,t,r)=>{"use strict";r.d(t,{d:()=>n});var n=r(79056).default.a.withConfig({displayName:"ButtonAction",componentId:"sc-sle5ki-0"})(["display:inline-flex;align-items:center;height:28px;padding-top:0;padding-bottom:0;white-space:nowrap;text-decoration:none;&:hover{font-family:'ProximaNova',Helvetica,sans-serif;font-size:14px;text-decoration:none;}"])},20339:(e,t,r)=>{"use strict";r.d(t,{Y:()=>u,f:()=>l});var n=r(96540),o=r(5338),i=r(61206);function a(e){return a="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},a(e)}function c(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}var l=i.F,u=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.targetNode,r=e.initProps,l=void 0===r?{}:r,u=l.targetUserData,s=l.customProps,f=void 0===s?{}:s;if(!t)throw new Error("SubscribeBtn2022:initOnNode:targetNode is not provided");if(!u)throw new Error("SubscribeBtn2022:initOnNode:targetUserData is not provided");t.innerHTML="";var p=function(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?c(Object(r),!0).forEach((function(t){var n,o,i;n=e,o=t,i=r[t],(o=function(e){var t=function(e){if("object"!==a(e)||null===e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var r=t.call(e,"string");if("object"!==a(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"===a(t)?t:String(t)}(o))in n?Object.defineProperty(n,o,{value:i,enumerable:!0,configurable:!0,writable:!0}):n[o]=i})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):c(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}({targetUserData:u},f);(0,o.H)(t).render(n.createElement(i.F,p))};LJ.define("LJ.Components.SubscribeBtn2022"),LJ.Components.SubscribeBtn2022.initOnNode=u},22068:(e,t,r)=>{"use strict";r.d(t,{Mn:()=>o,c9:()=>a,jZ:()=>i});var n=r(79056),o=n.default.a.withConfig({displayName:"Userhead",componentId:"sc-7u2ddd-0"})([""]),i=n.default.a.withConfig({displayName:"Username",componentId:"sc-7u2ddd-1"})([""]),a=n.default.span.withConfig({displayName:"LjUser",componentId:"sc-7u2ddd-2"})(["","{margin-right:4px !important;}"],o)},22799:(e,t)=>{"use strict";var r="function"==typeof Symbol&&Symbol.for,n=r?Symbol.for("react.element"):60103,o=r?Symbol.for("react.portal"):60106,i=r?Symbol.for("react.fragment"):60107,a=r?Symbol.for("react.strict_mode"):60108,c=r?Symbol.for("react.profiler"):60114,l=r?Symbol.for("react.provider"):60109,u=r?Symbol.for("react.context"):60110,s=r?Symbol.for("react.async_mode"):60111,f=r?Symbol.for("react.concurrent_mode"):60111,p=r?Symbol.for("react.forward_ref"):60112,d=r?Symbol.for("react.suspense"):60113,m=r?Symbol.for("react.suspense_list"):60120,h=r?Symbol.for("react.memo"):60115,y=r?Symbol.for("react.lazy"):60116,v=r?Symbol.for("react.block"):60121,b=r?Symbol.for("react.fundamental"):60117,g=r?Symbol.for("react.responder"):60118,w=r?Symbol.for("react.scope"):60119;function x(e){if("object"==typeof e&&null!==e){var t=e.$$typeof;switch(t){case n:switch(e=e.type){case s:case f:case i:case c:case a:case d:return e;default:switch(e=e&&e.$$typeof){case u:case p:case y:case h:case l:return e;default:return t}}case o:return t}}}function E(e){return x(e)===f}t.AsyncMode=s,t.ConcurrentMode=f,t.ContextConsumer=u,t.ContextProvider=l,t.Element=n,t.ForwardRef=p,t.Fragment=i,t.Lazy=y,t.Memo=h,t.Portal=o,t.Profiler=c,t.StrictMode=a,t.Suspense=d,t.isAsyncMode=function(e){return E(e)||x(e)===s},t.isConcurrentMode=E,t.isContextConsumer=function(e){return x(e)===u},t.isContextProvider=function(e){return x(e)===l},t.isElement=function(e){return"object"==typeof e&&null!==e&&e.$$typeof===n},t.isForwardRef=function(e){return x(e)===p},t.isFragment=function(e){return x(e)===i},t.isLazy=function(e){return x(e)===y},t.isMemo=function(e){return x(e)===h},t.isPortal=function(e){return x(e)===o},t.isProfiler=function(e){return x(e)===c},t.isStrictMode=function(e){return x(e)===a},t.isSuspense=function(e){return x(e)===d},t.isValidElementType=function(e){return"string"==typeof e||"function"==typeof e||e===i||e===f||e===c||e===a||e===d||e===m||"object"==typeof e&&null!==e&&(e.$$typeof===y||e.$$typeof===h||e.$$typeof===l||e.$$typeof===u||e.$$typeof===p||e.$$typeof===b||e.$$typeof===g||e.$$typeof===w||e.$$typeof===v)},t.typeOf=x},24582:(e,t,r)=>{"use strict";r.d(t,{FQ:()=>s,aF:()=>a,az:()=>c,hJ:()=>i,nB:()=>l,wi:()=>u});var n=r(79056),o=r(83581),i=(r(32231),n.default.div.withConfig({displayName:"Overlay",componentId:"sc-1jopm0p-0"})(["position:fixed;top:0;left:0;width:100vw;height:100vh;background-color:rgba(0,0,0,.4);opacity:",";z-index:5000;"],(function(e){return e.show?.5:0}))),a=n.default.div.withConfig({displayName:"Modal",componentId:"sc-1jopm0p-1"})(['position:relative;max-width:650px;display:flex;align-items:center;min-height:calc(100% - 3.5rem);height:calc(100% - 3.5rem);width:100%;margin:1.75rem auto;padding:1rem;font:400 16px/1 "ProximaNova",Helvetica,sans-serif;letter-spacing:0;color:#15374C;-webkit-font-smoothing:antialiased;pointer-events:none;z-index:5000;']),c=n.default.div.withConfig({displayName:"Box",componentId:"sc-1jopm0p-2"})(["position:relative;display:flex;flex-direction:column;width:100%;max-height:min(580px,100%);border-radius:8px;background-color:#fff;box-shadow:0px 2px 6px rgba(0,0,0,0.16),0px 4px 16px rgba(0,0,0,0.12);pointer-events:auto;"]),l=n.default.div.withConfig({displayName:"Body",componentId:"sc-1jopm0p-3"})(["display:flex;flex-direction:column;flex:1 1 auto;padding:0 24px 6px;overflow-y:auto;&:last-child{padding-bottom:16px;}@media ","{padding:0 16px 6px;&:last-child{padding-bottom:16px;}}"," "," .modal--iframe &{padding-right:0;}"],o.j.maxMobileL,(function(e){return e.isBodyScrollable&&"border-bottom: 1px solid #E5EBEE;"}),(function(e){return e.bodyScrollTop&&"border-top: 1px solid #E5EBEE;"})),u=n.default.footer.withConfig({displayName:"Footer",componentId:"sc-1jopm0p-4"})(["flex-shrink:0;padding:10px 24px 16px;@media ","{padding:10px 16px 16px;}"],o.j.maxMobileL),s=(n.default.div.withConfig({displayName:"ButtonsRow",componentId:"sc-1jopm0p-5"})(["display:flex;flex-flow:row wrap;justify-content:flex-end;margin:-5px;"]),n.default.div.withConfig({displayName:"ButtonsRowItem",componentId:"sc-1jopm0p-6"})(["padding:5px;"]),n.default.p.withConfig({displayName:"Text",componentId:"sc-1jopm0p-7"})(["margin:0;margin-bottom:0.5rem;"]),n.default.div.withConfig({displayName:"ModalWrapper",componentId:"sc-1jopm0p-8"})(["position:fixed;top:0;left:0;width:100%;height:100%;overflow-x:hidden;overflow-y:auto;z-index:5000;box-sizing:border-box;*{box-sizing:inherit;}&:before{box-sizing:inherit;}&:after{box-sizing:inherit;}.borderTop{border-top:1px solid #E5EBEE;}.borderBottom{border-bottom:1px solid #E5EBEE;}"]))},25439:(e,t,r)=>{"use strict";r.d(t,{AM:()=>i,Cl:()=>a,_3:()=>c});var n=r(79056),o=r(69710),i=(0,n.default)(o.A).withConfig({displayName:"Popover",componentId:"sc-1vwzq8j-0"})(["z-index:5000;width:200px;&.basepopup--fix-bug{font:400 14px/1.6 ProximaNova,Helvetica,sans-serif !important;white-space:normal !important;@media (max-width:400px){position:absolute;}}& .basepopup__list{margin:0 -2px;padding:0 2px;}@media (max-width:400px){position:fixed;}"]),a=(n.default.div.withConfig({displayName:"Modal",componentId:"sc-1vwzq8j-1"})(["font:400 16px/1.2 'ProximaNova',Helvetica,sans-serif;letter-spacing:0;color:#333;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;text-size-adjust:100%;A,BUTTON,LABEL{font:400 16px/1.2 'ProximaNova',Helvetica,sans-serif;border:0;}"]),n.default.div.withConfig({displayName:"ButtonItem",componentId:"sc-1vwzq8j-2"})(["color:",";.basepopup-selector__text{display:flex;align-items:center;svg{display:block;margin-right:4px;}}"],(function(e){var t=e.remoteIsPaid,r=e.isPaidItem;return t||!r?"":"#a2a2a2"}))),c=n.default.a.withConfig({displayName:"LinkText",componentId:"sc-1vwzq8j-3"})(["border:0 !important;font:inherit;color:inherit !important;text-transform:none !important;text-decoration:none !important;"]);n.default.div.withConfig({displayName:"Footer",componentId:"sc-1vwzq8j-4"})(["text-align:right;"])},26508:(e,t,r)=>{"use strict";r.d(t,{n:()=>i});var n=r(79056),o=r(83581),i=n.default.button.withConfig({displayName:"CloseBtn",componentId:"sc-100e668-0"})(["position:absolute;top:12px;right:16px;display:flex;align-items:center;justify-content:center;width:32px;height:32px;margin:0;padding:4px;border:none;border-radius:4px;background:none;transition:background-color 0.15s linear;cursor:pointer;&:hover{background-color:hsl(197deg 8% 10% / 5%);}&:active{background-color:hsl(197deg 8% 10% / 10%);}&:focus{outline:none;}&:focus-visible{outline:2px solid #00a3d9;border-radius:2px;}svg{width:24px;height:24px;fill:#272C2E !important;}@media ","{right:8px;}"],o.j.maxMobileL)},27374:(e,t,r)=>{"use strict";r.d(t,{l:()=>a});var n=r(96540);function o(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}var i=function(){return{width:window.innerWidth,height:window.innerHeight}},a=function(){var e,t,r=(e=(0,n.useState)(i),t=2,function(e){if(Array.isArray(e))return e}(e)||function(e,t){var r=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=r){var n,o,i,a,c=[],l=!0,u=!1;try{if(i=(r=r.call(e)).next,0===t){if(Object(r)!==r)return;l=!1}else for(;!(l=(n=i.call(r)).done)&&(c.push(n.value),c.length!==t);l=!0);}catch(e){u=!0,o=e}finally{try{if(!l&&null!=r.return&&(a=r.return(),Object(a)!==a))return}finally{if(u)throw o}}return c}}(e,t)||function(e,t){if(e){if("string"==typeof e)return o(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?o(e,t):void 0}}(e,t)||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.")}()),a=r[0],c=r[1];return(0,n.useEffect)((function(){var e=function(){c(i())};return window.addEventListener("resize",e),e(),function(){window.removeEventListener("resize",e)}}),[]),a}},28081:(e,t,r)=>{"use strict";r.d(t,{A:()=>c});var n=r(96540),o=r(3451),i=["children","type","onClick","isLoading","disabled","primary","className","size"];function a(){return a=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},a.apply(this,arguments)}const c=function(e){var t=e.children,r=e.type,c=void 0===r?"button":r,l=e.onClick,u=e.isLoading,s=e.disabled,f=e.primary,p=e.className,d=e.size,m=void 0===d?"medium":d,h=function(e,t){if(null==e)return{};var r,n,o=function(e,t){if(null==e)return{};var r,n,o={},i=Object.keys(e);for(n=0;n<i.length;n++)r=i[n],t.indexOf(r)>=0||(o[r]=e[r]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(n=0;n<i.length;n++)r=i[n],t.indexOf(r)>=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(o[r]=e[r])}return o}(e,i);return n.createElement(o.$,a({type:c||"button",onClick:l,isLoading:u,disabled:s,primary:f,className:p,$size:m},h),u&&n.createElement(o.a,null,n.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",className:"svgicon flaticon flaticon--preloader",width:"14",height:"14"},n.createElement("use",{xlinkHref:"#flaticon--preloader"}))),t)}},31016:(e,t,r)=>{"use strict";r.d(t,{A:()=>a});var n=r(96540),o=r(92968),i=r(26508);const a=function(e){var t=e.onClick;return n.createElement(i.n,{className:"svgicon flaticon flaticons-v2--cross","aria-label":"Close","aria-required":"true",onClick:t},n.createElement(o.A,{width:"16",height:"16",xlinkHref:"flaticons-v2--cross"}))}},32231:(e,t,r)=>{"use strict";r.d(t,{VY:()=>a,Y9:()=>c,hE:()=>i});var n=r(79056),o=r(83581),i=n.default.h2.withConfig({displayName:"Title",componentId:"sc-kjq3xj-0"})(['margin:0 !important;padding:0 !important;font:bold 24px/1.2 "ProximaNova",Helvetica,sans-serif !important;color:#000 !important;',""],(function(e){return e.$withCloseBtn&&(0,n.css)(["padding-right:30px !important;"])})),a=n.default.p.withConfig({displayName:"Description",componentId:"sc-kjq3xj-1"})(['margin:8px 0 0 !important;padding:0 !important;font:400 16px/1.2 "ProximaNova",Helvetica,sans-serif !important;color:#333333 !important;']),c=n.default.header.withConfig({displayName:"Header",componentId:"sc-kjq3xj-2"})(["position:relative;flex-shrink:0;margin-bottom:0;padding:16px 24px;@media ","{padding:16px;}"],o.j.maxMobileL)},39316:(e,t,r)=>{"use strict";r.d(t,{A:()=>o});var n=/^((children|dangerouslySetInnerHTML|key|ref|autoFocus|defaultValue|defaultChecked|innerHTML|suppressContentEditableWarning|suppressHydrationWarning|valueLink|abbr|accept|acceptCharset|accessKey|action|allow|allowUserMedia|allowPaymentRequest|allowFullScreen|allowTransparency|alt|async|autoComplete|autoPlay|capture|cellPadding|cellSpacing|challenge|charSet|checked|cite|classID|className|cols|colSpan|content|contentEditable|contextMenu|controls|controlsList|coords|crossOrigin|data|dateTime|decoding|default|defer|dir|disabled|disablePictureInPicture|download|draggable|encType|enterKeyHint|form|formAction|formEncType|formMethod|formNoValidate|formTarget|frameBorder|headers|height|hidden|high|href|hrefLang|htmlFor|httpEquiv|id|inputMode|integrity|is|keyParams|keyType|kind|label|lang|list|loading|loop|low|marginHeight|marginWidth|max|maxLength|media|mediaGroup|method|min|minLength|multiple|muted|name|nonce|noValidate|open|optimum|pattern|placeholder|playsInline|poster|preload|profile|radioGroup|readOnly|referrerPolicy|rel|required|reversed|role|rows|rowSpan|sandbox|scope|scoped|scrolling|seamless|selected|shape|size|sizes|slot|span|spellCheck|src|srcDoc|srcLang|srcSet|start|step|style|summary|tabIndex|target|title|translate|type|useMap|value|width|wmode|wrap|about|datatype|inlist|prefix|property|resource|typeof|vocab|autoCapitalize|autoCorrect|autoSave|color|incremental|fallback|inert|itemProp|itemScope|itemType|itemID|itemRef|on|option|results|security|unselectable|accentHeight|accumulate|additive|alignmentBaseline|allowReorder|alphabetic|amplitude|arabicForm|ascent|attributeName|attributeType|autoReverse|azimuth|baseFrequency|baselineShift|baseProfile|bbox|begin|bias|by|calcMode|capHeight|clip|clipPathUnits|clipPath|clipRule|colorInterpolation|colorInterpolationFilters|colorProfile|colorRendering|contentScriptType|contentStyleType|cursor|cx|cy|d|decelerate|descent|diffuseConstant|direction|display|divisor|dominantBaseline|dur|dx|dy|edgeMode|elevation|enableBackground|end|exponent|externalResourcesRequired|fill|fillOpacity|fillRule|filter|filterRes|filterUnits|floodColor|floodOpacity|focusable|fontFamily|fontSize|fontSizeAdjust|fontStretch|fontStyle|fontVariant|fontWeight|format|from|fr|fx|fy|g1|g2|glyphName|glyphOrientationHorizontal|glyphOrientationVertical|glyphRef|gradientTransform|gradientUnits|hanging|horizAdvX|horizOriginX|ideographic|imageRendering|in|in2|intercept|k|k1|k2|k3|k4|kernelMatrix|kernelUnitLength|kerning|keyPoints|keySplines|keyTimes|lengthAdjust|letterSpacing|lightingColor|limitingConeAngle|local|markerEnd|markerMid|markerStart|markerHeight|markerUnits|markerWidth|mask|maskContentUnits|maskUnits|mathematical|mode|numOctaves|offset|opacity|operator|order|orient|orientation|origin|overflow|overlinePosition|overlineThickness|panose1|paintOrder|pathLength|patternContentUnits|patternTransform|patternUnits|pointerEvents|points|pointsAtX|pointsAtY|pointsAtZ|preserveAlpha|preserveAspectRatio|primitiveUnits|r|radius|refX|refY|renderingIntent|repeatCount|repeatDur|requiredExtensions|requiredFeatures|restart|result|rotate|rx|ry|scale|seed|shapeRendering|slope|spacing|specularConstant|specularExponent|speed|spreadMethod|startOffset|stdDeviation|stemh|stemv|stitchTiles|stopColor|stopOpacity|strikethroughPosition|strikethroughThickness|string|stroke|strokeDasharray|strokeDashoffset|strokeLinecap|strokeLinejoin|strokeMiterlimit|strokeOpacity|strokeWidth|surfaceScale|systemLanguage|tableValues|targetX|targetY|textAnchor|textDecoration|textRendering|textLength|to|transform|u1|u2|underlinePosition|underlineThickness|unicode|unicodeBidi|unicodeRange|unitsPerEm|vAlphabetic|vHanging|vIdeographic|vMathematical|values|vectorEffect|version|vertAdvY|vertOriginX|vertOriginY|viewBox|viewTarget|visibility|widths|wordSpacing|writingMode|x|xHeight|x1|x2|xChannelSelector|xlinkActuate|xlinkArcrole|xlinkHref|xlinkRole|xlinkShow|xlinkTitle|xlinkType|xmlBase|xmlns|xmlnsXlink|xmlLang|xmlSpace|y|y1|y2|yChannelSelector|z|zoomAndPan|for|class|autofocus)|(([Dd][Aa][Tt][Aa]|[Aa][Rr][Ii][Aa]|x)-.*))$/;const o=function(){var e=Object.create(null);return function(t){return void 0===e[t]&&(e[t]=(r=t,n.test(r)||111===r.charCodeAt(0)&&110===r.charCodeAt(1)&&r.charCodeAt(2)<91)),e[t];var r}}()},44363:(e,t,r)=>{"use strict";e.exports=r(22799)},52464:(e,t,r)=>{"use strict";r.d(t,{c:()=>s});var n=r(96540),o=r(80074),i=r(22068);function a(e){return a="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},a(e)}function c(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function l(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function u(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?l(Object(r),!0).forEach((function(t){var n,o,i;n=e,o=t,i=r[t],(o=function(e){var t=function(e){if("object"!==a(e)||null===e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var r=t.call(e,"string");if("object"!==a(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"===a(t)?t:String(t)}(o))in n?Object.defineProperty(n,o,{value:i,enumerable:!0,configurable:!0,writable:!0}):n[o]=i})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):l(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}var s=function(e){var t,r=e.className,a=e.linksTarget,l=void 0===a?"_self":a,s=e.noCtxPopup,f=void 0===s||s,p=e.userData,d=p.username,m=p.userheadUrl,h=p.displayName,y=p.displayUsername,v=p.profileUrl,b=p.journalUrl,g=p.journalType,w=p.isInvisible,x=u({as:v?"a":"span",className:"i-ljuser-profile"},v?{href:v,target:l}:{}),E=u({as:b?"a":"span",className:"i-ljuser-username"},b?{href:b,target:l,title:y}:{});return n.createElement(i.c9,{className:(0,o._)(["ljuser","i-ljuser",g&&"i-ljuser-type-".concat(g),w&&"i-ljuser-deleted"].concat((t=f?["i-ljuser-nopopup","noctxpopup"]:[],function(e){if(Array.isArray(e))return c(e)}(t)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(t)||function(e,t){if(e){if("string"==typeof e)return c(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?c(e,t):void 0}}(t)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()),[r])),"data-ljuser":d},m&&n.createElement(i.Mn,x,n.createElement("img",{className:"i-ljuser-userhead",src:m})),n.createElement(i.jZ,E,h||y))}},55153:(e,t,r)=>{"use strict";r.d(t,{W:()=>o});var n=r(96540),o=function(e,t){var r=(arguments.length>2&&void 0!==arguments[2]?arguments[2]:{}).startImmediately,o=void 0!==r&&r;(0,n.useEffect)((function(){var r=function(r){e.current&&!e.current.contains(r.target)&&t(r)};return o?document.addEventListener("click",r):setTimeout((function(){document.addEventListener("click",r)})),function(){document.removeEventListener("click",r)}}),[e,t,o])}},55998:(e,t,r)=>{"use strict";r(96540)},58936:(e,t,r)=>{"use strict";r.d(t,{Vw:()=>u,ql:()=>l});var n=r(96540);function o(e){return o="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},o(e)}function i(){i=function(){return t};var e,t={},r=Object.prototype,n=r.hasOwnProperty,a=Object.defineProperty||function(e,t,r){e[t]=r.value},c="function"==typeof Symbol?Symbol:{},l=c.iterator||"@@iterator",u=c.asyncIterator||"@@asyncIterator",s=c.toStringTag||"@@toStringTag";function f(e,t,r){return Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{f({},"")}catch(e){f=function(e,t,r){return e[t]=r}}function p(e,t,r,n){var o=t&&t.prototype instanceof g?t:g,i=Object.create(o.prototype),c=new A(n||[]);return a(i,"_invoke",{value:k(e,r,c)}),i}function d(e,t,r){try{return{type:"normal",arg:e.call(t,r)}}catch(e){return{type:"throw",arg:e}}}t.wrap=p;var m="suspendedStart",h="suspendedYield",y="executing",v="completed",b={};function g(){}function w(){}function x(){}var E={};f(E,l,(function(){return this}));var S=Object.getPrototypeOf,j=S&&S(S(I([])));j&&j!==r&&n.call(j,l)&&(E=j);var O=x.prototype=g.prototype=Object.create(E);function L(e){["next","throw","return"].forEach((function(t){f(e,t,(function(e){return this._invoke(t,e)}))}))}function _(e,t){function r(i,a,c,l){var u=d(e[i],e,a);if("throw"!==u.type){var s=u.arg,f=s.value;return f&&"object"==o(f)&&n.call(f,"__await")?t.resolve(f.__await).then((function(e){r("next",e,c,l)}),(function(e){r("throw",e,c,l)})):t.resolve(f).then((function(e){s.value=e,c(s)}),(function(e){return r("throw",e,c,l)}))}l(u.arg)}var i;a(this,"_invoke",{value:function(e,n){function o(){return new t((function(t,o){r(e,n,t,o)}))}return i=i?i.then(o,o):o()}})}function k(t,r,n){var o=m;return function(i,a){if(o===y)throw new Error("Generator is already running");if(o===v){if("throw"===i)throw a;return{value:e,done:!0}}for(n.method=i,n.arg=a;;){var c=n.delegate;if(c){var l=C(c,n);if(l){if(l===b)continue;return l}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(o===m)throw o=v,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);o=y;var u=d(t,r,n);if("normal"===u.type){if(o=n.done?v:h,u.arg===b)continue;return{value:u.arg,done:n.done}}"throw"===u.type&&(o=v,n.method="throw",n.arg=u.arg)}}}function C(t,r){var n=r.method,o=t.iterator[n];if(o===e)return r.delegate=null,"throw"===n&&t.iterator.return&&(r.method="return",r.arg=e,C(t,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),b;var i=d(o,t.iterator,r.arg);if("throw"===i.type)return r.method="throw",r.arg=i.arg,r.delegate=null,b;var a=i.arg;return a?a.done?(r[t.resultName]=a.value,r.next=t.nextLoc,"return"!==r.method&&(r.method="next",r.arg=e),r.delegate=null,b):a:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,b)}function P(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function N(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function A(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(P,this),this.reset(!0)}function I(t){if(t||""===t){var r=t[l];if(r)return r.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var i=-1,a=function r(){for(;++i<t.length;)if(n.call(t,i))return r.value=t[i],r.done=!1,r;return r.value=e,r.done=!0,r};return a.next=a}}throw new TypeError(o(t)+" is not iterable")}return w.prototype=x,a(O,"constructor",{value:x,configurable:!0}),a(x,"constructor",{value:w,configurable:!0}),w.displayName=f(x,s,"GeneratorFunction"),t.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===w||"GeneratorFunction"===(t.displayName||t.name))},t.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,x):(e.__proto__=x,f(e,s,"GeneratorFunction")),e.prototype=Object.create(O),e},t.awrap=function(e){return{__await:e}},L(_.prototype),f(_.prototype,u,(function(){return this})),t.AsyncIterator=_,t.async=function(e,r,n,o,i){void 0===i&&(i=Promise);var a=new _(p(e,r,n,o),i);return t.isGeneratorFunction(r)?a:a.next().then((function(e){return e.done?e.value:a.next()}))},L(O),f(O,s,"Generator"),f(O,l,(function(){return this})),f(O,"toString",(function(){return"[object Generator]"})),t.keys=function(e){var t=Object(e),r=[];for(var n in t)r.push(n);return r.reverse(),function e(){for(;r.length;){var n=r.pop();if(n in t)return e.value=n,e.done=!1,e}return e.done=!0,e}},t.values=I,A.prototype={constructor:A,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=e,this.done=!1,this.delegate=null,this.method="next",this.arg=e,this.tryEntries.forEach(N),!t)for(var r in this)"t"===r.charAt(0)&&n.call(this,r)&&!isNaN(+r.slice(1))&&(this[r]=e)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var r=this;function o(n,o){return c.type="throw",c.arg=t,r.next=n,o&&(r.method="next",r.arg=e),!!o}for(var i=this.tryEntries.length-1;i>=0;--i){var a=this.tryEntries[i],c=a.completion;if("root"===a.tryLoc)return o("end");if(a.tryLoc<=this.prev){var l=n.call(a,"catchLoc"),u=n.call(a,"finallyLoc");if(l&&u){if(this.prev<a.catchLoc)return o(a.catchLoc,!0);if(this.prev<a.finallyLoc)return o(a.finallyLoc)}else if(l){if(this.prev<a.catchLoc)return o(a.catchLoc,!0)}else{if(!u)throw new Error("try statement without catch or finally");if(this.prev<a.finallyLoc)return o(a.finallyLoc)}}}},abrupt:function(e,t){for(var r=this.tryEntries.length-1;r>=0;--r){var o=this.tryEntries[r];if(o.tryLoc<=this.prev&&n.call(o,"finallyLoc")&&this.prev<o.finallyLoc){var i=o;break}}i&&("break"===e||"continue"===e)&&i.tryLoc<=t&&t<=i.finallyLoc&&(i=null);var a=i?i.completion:{};return a.type=e,a.arg=t,i?(this.method="next",this.next=i.finallyLoc,b):this.complete(a)},complete:function(e,t){if("throw"===e.type)throw e.arg;return"break"===e.type||"continue"===e.type?this.next=e.arg:"return"===e.type?(this.rval=this.arg=e.arg,this.method="return",this.next="end"):"normal"===e.type&&t&&(this.next=t),b},finish:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.finallyLoc===e)return this.complete(r.completion,r.afterLoc),N(r),b}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.tryLoc===e){var n=r.completion;if("throw"===n.type){var o=n.arg;N(r)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(t,r,n){return this.delegate={iterator:I(t),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=e),b}},t}function a(e,t,r,n,o,i,a){try{var c=e[i](a),l=c.value}catch(e){return void r(e)}c.done?t(l):Promise.resolve(l).then(n,o)}var c=function(){var e,t=(e=i().mark((function e(){var t,r,n,o,a,c,l,u,s,f,p,d,m,h,y=arguments;return i().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(r=(t=y.length>0&&void 0!==y[0]?y[0]:{}).reducerState,n=t.targetUserId,o=t.targetUsername,a=t.dispatch,!r.userNameDisplayData.isLoaded){e.next=4;break}return e.abrupt("return");case 4:if(c={fields:{display_username:!0,userhead_url:!0,profile_url:!0,journal_url:!0}},!n){e.next=9;break}c.targetid=n,e.next=14;break;case 9:if(!o){e.next=13;break}c.target=o,e.next=14;break;case 13:throw new Error("user.get target is not provided");case 14:return e.next=16,LJ.Api.callP("user.get",c);case 16:l=e.sent,u=l.user,s=u.username,f=u.display_username,p=u.userhead_url,d=u.profile_url,m=u.journal_url,h=u.id,a({type:"setUserNameDisplayData",value:{isLoaded:!0,username:s,displayUsername:f,userheadUrl:p,profileUrl:d,journalUrl:m,id:h}});case 21:case"end":return e.stop()}}),e)})),function(){var t=this,r=arguments;return new Promise((function(n,o){var i=e.apply(t,r);function c(e){a(i,n,o,c,l,"next",e)}function l(e){a(i,n,o,c,l,"throw",e)}c(void 0)}))});return function(){return t.apply(this,arguments)}}(),l=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.reducerState,r=e.dispatch,n=e.targetUserId,o=e.targetUsername;return{userNameDisplayData:t.userNameDisplayData,savedUserNote:t.savedUserNote,onDropdownUserNoteBtnClick:function(){c({reducerState:t,targetUserId:n,targetUsername:o,dispatch:r}).then((function(){r({type:"showUserNoteModal"})})).catch((function(e){var t=e.message;LJ.Messages.error(LJ.ml("common.something_went_wrong")),console.error("SubscribeBtn2022/userNote/loadUserNameDisplayData: ".concat(t).trim())}))},modal:{onClose:function(){r({type:"closeUserNoteModal"})},isShown:t.isUserNoteModalShown}}},u=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.targetUserId,r=e.reducerState,o=e.dispatch;(0,n.useEffect)((function(){t&&r.hasShownDropdown&&!r.hasLoadedUserNote&&LJ.Api.callP("user.alias_get",{user_id:t}).then((function(){var e=(arguments.length>0&&void 0!==arguments[0]?arguments[0]:{}).alias;o({type:"markUserNoteAsLoaded"}),o({type:"setSavedUserNote",value:e})}))}),[r.hasLoadedUserNote,r.hasShownDropdown,t,o])}},61206:(e,t,r)=>{"use strict";r.d(t,{F:()=>d});var n=r(96540),o=r(14554),i=r(85194),a=r(82595),c=r(58936);function l(e){return l="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},l(e)}function u(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function s(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?u(Object(r),!0).forEach((function(t){var n,o,i;n=e,o=t,i=r[t],(o=function(e){var t=function(e){if("object"!==l(e)||null===e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var r=t.call(e,"string");if("object"!==l(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"===l(t)?t:String(t)}(o))in n?Object.defineProperty(n,o,{value:i,enumerable:!0,configurable:!0,writable:!0}):n[o]=i})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):u(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}function f(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var r=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=r){var n,o,i,a,c=[],l=!0,u=!1;try{if(i=(r=r.call(e)).next,0===t){if(Object(r)!==r)return;l=!1}else for(;!(l=(n=i.call(r)).done)&&(c.push(n.value),c.length!==t);l=!0);}catch(e){u=!0,o=e}finally{try{if(!l&&null!=r.return&&(a=r.return(),Object(a)!==a))return}finally{if(u)throw o}}return c}}(e,t)||function(e,t){if(e){if("string"==typeof e)return p(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?p(e,t):void 0}}(e,t)||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 p(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function d(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.targetUserData,r=void 0===t?{}:t,l=e.theme,u=void 0===l?"light":l,p=e.gluePopups,d=e.onSubscribe,m=void 0===d?function(){}:d,h=e.id,y=f((0,n.useReducer)(a.F,a.u),2),v=y[0],b=y[1],g=f((0,n.useState)(r),2),w=g[0],x=g[1],E=f((0,n.useState)({}),2),S=E[0],j=E[1],O=f((0,n.useState)({componentId:h||Math.random().toString(36).substr(2,9)}),1)[0],L=r.targetId,_=w.targetUsername,k=w.isInSubscriptionList,C=w.friendGroupsData,P=w.isCommunity,N=O.componentId,A=function(){var e,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},r=t.username,n=t.data;if(r===_)if(n.is_invite_sent&&void 0===n.is_friend)x(s(s({},w),{},{joinRequestPending:!0}));else{var o=s(s({},w),{},{isInFriendList:n.is_friend,isInSubscriptionList:n.is_subscriber,remoteIsCommunityOwner:"owner"===(null===(e=Site.journal)||void 0===e?void 0:e.community_relation),remoteIsCommunityMember:n.is_member,joinRequestPending:n.is_invite_sent&&n.is_friend,isFollowerOfRemote:!n.is_friend&&!n.is_subscriber&&(n.is_subscriberof||n.is_friendof)});P&&(o.isInSubscriptionList=n.is_friend),x(o)}},I=function(e,t){(null==e?void 0:e.message)&&(null!=t&&t.shouldShowStickyMessage?LJ.Messages.error(e.message):j({isShown:!0,messageHtml:e.message}))};if((0,n.useEffect)((function(){return LJ.Event.on("relations.changed",A),function(){LJ.Event.off("relations.changed",A)}})),(0,c.Vw)({targetUserId:L,reducerState:v,dispatch:b}),!_)return console.warn("SubscribeBtn2022: not enough data for render"),null;var F=function(e){LJ.Track.YM.call({method:"reachGoal",argArr:e})},D={onDropdownShow:function(){b({type:"markDropdownAsShown"})}},T=(0,c.ql)({reducerState:v,dispatch:b,targetUserId:L,targetUsername:_}),M=s(s(s({},D),w),{},{hintPopupData:S,miscData:O,requestRelationActionCb:function(e){if("subscribe"===e){var t={target:_,is_subscriber:1,show_recommendations:!0};P&&delete t.is_subscriber,LJ.Api.callP("relations.addfriend",t).then((function(t){LJ.Event.trigger("relations.changed",{username:_,id:L,data:t,source:"SubscribeBtn2022",sourceCompId:N,action:e}),m()})).catch(I)}if("unsubscribe"===e){var r={target:_,is_subscriber:1};P&&delete r.is_subscriber,LJ.Api.call("relations.removefriend",r).then((function(t){LJ.Event.trigger("relations.changed",{username:_,id:L,data:t,source:"SubscribeBtn2022",sourceCompId:N,action:e})})).fail(I)}if("addToFriends"===e){var n={target:_,show_recommendations:!0};LJ.Api.callP("relations.addfriend",n).then((function(t){LJ.Event.trigger("relations.changed",{username:_,id:L,data:t,source:"SubscribeBtn2022",action:e}),F(["COMPLEX_SUBSCRIBE"])})).catch(I)}"removeFromFriends"===e&&LJ.Api.call("relations.removefriend",{target:_}).then((function(t){LJ.Event.trigger("relations.changed",{username:_,id:L,data:t,source:"SubscribeBtn2022",action:e}),F(["COMPLEX_UNSUBSCRIBE"])})).fail(I),"leaveComm"===e&&LJ.Api.call("relations.leave",{target:_}).then((function(t){LJ.Event.trigger("relations.changed",{username:_,id:L,data:t,source:"SubscribeBtn2022",sourceCompId:N,action:e})})).fail(I),"joinComm"===e&&LJ.Api.callP("relations.join",{target:_}).then((function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return k?e:LJ.Api.call("relations.join",{target:_}).then((function(t){return s(s({},e),t)}))})).then((function(t){t.is_invite_sent&&x(s(s({},w),{},{isJoinRequestSent:!0})),F(["COMMUNITY_JOIN"]),LJ.Event.trigger("relations.changed",{username:_,id:L,data:t,source:"SubscribeBtn2022",action:e})})).catch(I)},requestGroupsDataCb:function(){LJ.Api.call("groups.list",{target:_}).then((function(e){x(s(s({},w),{},{friendGroupsData:e.groups}))}))},toggleFriendInGroupCb:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.id,r=e.shouldBeInGroup,n=C.map((function(e){return e.id===t?s(s({},e),{},{selected:r}):e})),o=n.map((function(e){return e.selected?e.id:null})).filter((function(e){return e}));LJ.Api.call("groups.update_users",{users:[{username:_,groups:o}]},void 0,{silent:!1}).then((function(){x(s(s({},w),{},{friendGroupsData:n}))})).fail((function(e){I(e,{shouldShowStickyMessage:!0})}))},requestHintPopupHide:function(){j(s(s({},S),{},{isShown:!1}))},gluePopups:p,userNoteProps:T});return n.createElement(o.N,{value:u},n.createElement(i.m,M))}},62600:(e,t,r)=>{"use strict";r.d(t,{Z:()=>o}),r(96540);var n=r(40961),o=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.children,r=e.mountRef,o=(void 0===r?{}:r).current||document.body;return(0,n.createPortal)(t,o)}},64054:(e,t,r)=>{"use strict";r.d(t,{D:()=>i});var n=r(96540),o=r(14554),i=function(){return(0,n.useContext)(o.D)}},69710:(e,t,r)=>{"use strict";r.d(t,{A:()=>m});var n=r(96540),o=r(62600),i=r(8680),a=r(74044),c=r(80074),l=r(95618),u=["onClose","getPosition","anchorEl","anchorRect","className","placement","margins","withScrollLock","withAutoClosing"];function s(e){return s="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},s(e)}function f(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function p(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function d(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?p(Object(r),!0).forEach((function(t){var n,o,i;n=e,o=t,i=r[t],(o=function(e){var t=function(e){if("object"!==s(e)||null===e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var r=t.call(e,"string");if("object"!==s(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"===s(t)?t:String(t)}(o))in n?Object.defineProperty(n,o,{value:i,enumerable:!0,configurable:!0,writable:!0}):n[o]=i})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):p(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}var m=function(e){var t,r,s=e.onClose,p=void 0===s?function(){}:s,m=e.getPosition,h=e.anchorEl,y=e.anchorRect,v=e.className,b=e.placement,g=e.margins,w=e.withScrollLock,x=e.withAutoClosing,E=function(e,t){if(null==e)return{};var r,n,o=function(e,t){if(null==e)return{};var r,n,o={},i=Object.keys(e);for(n=0;n<i.length;n++)r=i[n],t.indexOf(r)>=0||(o[r]=e[r]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(n=0;n<i.length;n++)r=i[n],t.indexOf(r)>=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(o[r]=e[r])}return o}(e,u),S=(t=(0,n.useState)({x:0,y:0}),r=2,function(e){if(Array.isArray(e))return e}(t)||function(e,t){var r=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=r){var n,o,i,a,c=[],l=!0,u=!1;try{if(i=(r=r.call(e)).next,0===t){if(Object(r)!==r)return;l=!1}else for(;!(l=(n=i.call(r)).done)&&(c.push(n.value),c.length!==t);l=!0);}catch(e){u=!0,o=e}finally{try{if(!l&&null!=r.return&&(a=r.return(),Object(a)!==a))return}finally{if(u)throw o}}return c}}(t,r)||function(e,t){if(e){if("string"==typeof e)return f(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?f(e,t):void 0}}(t,r)||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.")}()),j=S[0],O=S[1],L=(0,n.useRef)(),_=(0,a.DP)();(0,a.lW)(),(0,a.Wr)(L,p),(0,n.useLayoutEffect)((function(){var e,t,r=null===(e=L.current)||void 0===e?void 0:e.getBoundingClientRect(),n=h?h.getBoundingClientRect():y;t=m?m({popoverRect:r,targetRect:n}):function(e){var t=e.targetRect,r=e.popoverRect,n={anchorRect:t,objectRect:r,placement:e.placement,margins:e.margins},o=LJ.Util.Positioning.RectNearRect.calculateCoords(n),i=window.innerHeight>t.top+t.height+r.height+25,a=t.top-r.height-25>0,c=window.innerWidth>t.left+r.width;return{x:(o=LJ.Util.Positioning.RectNearRect.calculateCoords(d(d({},n),{},{placement:{x:c?"alignLeftEdges":"alignRightEdges",y:!i&&a?"above":"below"}}))).x+window.scrollX,y:o.y+window.scrollY}}({targetRect:n,popoverRect:r,placement:b,margins:g}),JSON.stringify(j)!==JSON.stringify(t)&&O(t)}),[]),(0,n.useEffect)((function(){var e=function(e){L.current&&!L.current.contains(e.target)&&p()};return x&&window.addEventListener("scroll",e,!0),function(){x&&window.removeEventListener("scroll",e,!0)}}),[p,x,L]),(0,n.useEffect)((function(){return LJ.Event.on("react::CommonPopover::closeAll",p),function(){LJ.Event.off("react::CommonPopover::closeAll",p)}}),[p]);var k=d({$position:j,className:(0,c._)(["basepopup","basepopup--fix-bug","dark"===_&&"basepopup--dark",v]),ref:L},E);return n.createElement(n.Fragment,null,w&&n.createElement(i.A,null),n.createElement(o.Z,null,n.createElement(l.u,k)))}},69982:(e,t,r)=>{"use strict";e.exports=r(7463)},70373:(e,t,r)=>{"use strict";r.d(t,{A:()=>i});var n=r(96540),o=r(32231);const i=function(e){var t=e.children,r=e.title,i=e.description,a=e.withCloseBtn;return n.createElement(o.Y9,null,r&&n.createElement(o.hE,{$withCloseBtn:a},r),i&&n.createElement(o.VY,null,i),t)}},72317:(e,t,r)=>{"use strict";r.d(t,{k:()=>l});var n=r(96540),o=r(62600),i=r(80074),a=r(25439),c=function(){};function l(e){var t=e.targetUsername,r=e.isInSubscriptionList,l=void 0!==r&&r,u=e.isInFriendList,s=void 0!==u&&u,f=e.remoteIsCommunityOwner,p=void 0!==f&&f,d=e.isCommunity,m=void 0!==d&&d,h=e.isSyndicated,y=void 0!==h&&h,v=e.friendGroupsData,b=e.requestRelationActionCb,g=e.requestPopupClose,w=void 0===g?c:g,x=e.toggleFriendInGroupCb,E=e.remoteIsCommunityMember,S=e.joinRequestPending,j=e.isBannedInCommunity,O=e.isClosedCommunity,L=e.targetNode,_=e.isGlued,k=e.savedUserNote,C=void 0===k?"":k,P=e.onUserNoteBtnClick,N=void 0===P?function(){}:P,A=LJ.Support.isMobile(),I=(0,n.useRef)(null);(0,n.useEffect)((function(){function e(e){null!=I&&I.current&&!I.current.contains(e.target)&&w()}return A&&(document.body.style.overflow="hidden",setTimeout((function(){document.addEventListener("click",e)}))),function(){A&&(document.removeEventListener("click",e),document.querySelectorAll("[data-react-overlay]").length||(document.body.style.overflow=""))}}),[]);var F,D=[],T=n.createElement(a.Cl,{onClick:function(){w(),b("addToFriends")},key:"addToFriends",className:"basepopup-selector__label"},n.createElement("div",{className:"basepopup-selector__text"},LJ.ml("common.add_to_friends"))),M=n.createElement(a.Cl,{onClick:function(){w(),b("removeFromFriends")},key:"removeFromFriends",className:"basepopup-selector__label"},n.createElement("div",{className:"basepopup-selector__text"},LJ.ml("common.remove_from_friends"))),J=n.createElement(a.Cl,{remoteIsPaid:Site.remote.is_paid,isPaidItem:!0,onClick:function(){Site.remote.is_paid?(N(),w()):window.open("".concat(Site.siteroot,"/shop/profaccount.bml?ila_campaign=inactive_prof_sign&ila_location=reminder"),"_blank")},key:"changeUserNote",className:"basepopup-selector__label"},n.createElement("div",{className:"basepopup-selector__text"},!Site.remote.is_paid&&n.createElement("svg",{width:"22",height:"16"},n.createElement("use",{xlinkHref:"#flaticon--pro-outline-gradient"})),C?LJ.ml("subscribe_button_2022.edit_user_note"):LJ.ml("subscribe_button_2022.add_user_note"))),U=n.createElement(a.Cl,{key:"editFriend",className:"basepopup-selector__label"},n.createElement(a._3,{href:"".concat(Site.siteroot,"/friends/add.bml?user=").concat(t),target:"_blank",className:"basepopup-selector__text"},LJ.ml("subscribe_button_2022.subscribe_settings"))),R=n.createElement(a.Cl,{onClick:function(){w(),b("subscribe")},key:"subscribe",className:"basepopup-selector__label"},n.createElement("div",{className:"basepopup-selector__text"},LJ.ml("common.subscribe"))),B=n.createElement(a.Cl,{onClick:function(){w(),b(y?"removeFromFriends":"unsubscribe")},key:"unsubscribe",className:"basepopup-selector__label"},n.createElement("div",{className:"basepopup-selector__text"},LJ.ml("common.unsubscribe"))),G=n.createElement(a.Cl,{onClick:function(){w(),b("joinComm")},key:"joinComm",className:"basepopup-selector__label"},n.createElement("div",{className:"basepopup-selector__text"},LJ.ml("subscribe_button_2022.join_community"))),z=n.createElement(a.Cl,{onClick:function(){w(),b("leaveComm")},key:"leaveComm",className:"basepopup-selector__label"},n.createElement("div",{className:"basepopup-selector__text"},LJ.ml("subscribe_button_2022.leave_community"))),$=n.createElement(a.Cl,{onClick:function(){w()},className:"lightbutton"},LJ.ml("common.close")),q=n.createElement("span",{key:"joinRequestPending",className:"basepopup-selector__label"},n.createElement("div",{className:"basepopup-selector__text"},LJ.ml("subscribe_button_2022.join_request_is_pending"))),H=[];return v.forEach((function(e){H.push(n.createElement("li",{className:"basepopup__item",key:e.id},n.createElement("label",{className:"lightcheckbox"},n.createElement("input",{className:"lightcheckbox__input",type:"checkbox",value:e.id,checked:!!e.selected,onChange:function(){x({id:e.id,shouldBeInGroup:!e.selected})}}),n.createElement("span",{className:"lightcheckbox__text"},e.name))))})),!m&&!y&&(l&&!s?(D.push(T),D.push(J),D.push(U),D.push(B)):s&&(D.push(M),D.push(J),D.push(U))),y&&(s&&D.push(B),D.push(J),D.push(U)),m&&(!E&&S&&D.push(q),l?(D.push(J),D.push(U),D.push(B)):D.push(R),E&&!p?D.push(z):S||j||O||p||D.push(G)),m&&!l||(F=n.createElement("div",{className:"basepopup__group"},n.createElement("div",{className:"basepopup__content"},n.createElement("div",{className:"basepopup__title"},LJ.ml("common.add_to_group")),n.createElement("ul",{className:"basepopup__list m-scrollbar"},H)))),n.createElement(n.Fragment,null,A?n.createElement(o.Z,null,n.createElement("div",{className:"new-modal-backdrop","data-react-overlay":!0}),n.createElement("div",{className:"new-modal new-modal--popup",style:{display:"block"}},n.createElement("div",{className:"new-modal-dialog new-modal-dialog--centered"},n.createElement("div",{className:"new-modal-content js--subscribe-btn-dropdown",ref:I},n.createElement("div",{className:"basepopup__group"},n.createElement("div",{className:"basepopup__content"},n.createElement("div",{className:"basepopup-selector"},D))),F,n.createElement("div",{className:"basepopup__group",style:{textAlign:"right"}},$))))):n.createElement(a.AM,{onClose:w,anchorEl:L,placement:{x:"alignLeftEdges",y:"below"},margins:{y:_?0:5},withAutoClosing:!0,className:(0,i._)([_&&"basepopup--glued"])},n.createElement("div",{className:"basepopup__group"},n.createElement("div",{className:"basepopup__content"},n.createElement("div",{className:"basepopup-selector"},D))),F))}},74044:(e,t,r)=>{"use strict";r.d(t,{DP:()=>i.D,Wr:()=>n.W,lW:()=>o.l}),r(18092);var n=r(55153),o=(r(55998),r(27374)),i=r(64054);r(9472),r(20158)},74536:()=>{function e(t){return e="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},e(t)}function t(e){return function(e){if(Array.isArray(e))return u(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||l(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function r(){"use strict";r=function(){return n};var t,n={},o=Object.prototype,i=o.hasOwnProperty,a=Object.defineProperty||function(e,t,r){e[t]=r.value},c="function"==typeof Symbol?Symbol:{},l=c.iterator||"@@iterator",u=c.asyncIterator||"@@asyncIterator",s=c.toStringTag||"@@toStringTag";function f(e,t,r){return Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{f({},"")}catch(t){f=function(e,t,r){return e[t]=r}}function p(e,t,r,n){var o=t&&t.prototype instanceof g?t:g,i=Object.create(o.prototype),c=new A(n||[]);return a(i,"_invoke",{value:k(e,r,c)}),i}function d(e,t,r){try{return{type:"normal",arg:e.call(t,r)}}catch(e){return{type:"throw",arg:e}}}n.wrap=p;var m="suspendedStart",h="suspendedYield",y="executing",v="completed",b={};function g(){}function w(){}function x(){}var E={};f(E,l,(function(){return this}));var S=Object.getPrototypeOf,j=S&&S(S(I([])));j&&j!==o&&i.call(j,l)&&(E=j);var O=x.prototype=g.prototype=Object.create(E);function L(e){["next","throw","return"].forEach((function(t){f(e,t,(function(e){return this._invoke(t,e)}))}))}function _(t,r){function n(o,a,c,l){var u=d(t[o],t,a);if("throw"!==u.type){var s=u.arg,f=s.value;return f&&"object"==e(f)&&i.call(f,"__await")?r.resolve(f.__await).then((function(e){n("next",e,c,l)}),(function(e){n("throw",e,c,l)})):r.resolve(f).then((function(e){s.value=e,c(s)}),(function(e){return n("throw",e,c,l)}))}l(u.arg)}var o;a(this,"_invoke",{value:function(e,t){function i(){return new r((function(r,o){n(e,t,r,o)}))}return o=o?o.then(i,i):i()}})}function k(e,r,n){var o=m;return function(i,a){if(o===y)throw new Error("Generator is already running");if(o===v){if("throw"===i)throw a;return{value:t,done:!0}}for(n.method=i,n.arg=a;;){var c=n.delegate;if(c){var l=C(c,n);if(l){if(l===b)continue;return l}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(o===m)throw o=v,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);o=y;var u=d(e,r,n);if("normal"===u.type){if(o=n.done?v:h,u.arg===b)continue;return{value:u.arg,done:n.done}}"throw"===u.type&&(o=v,n.method="throw",n.arg=u.arg)}}}function C(e,r){var n=r.method,o=e.iterator[n];if(o===t)return r.delegate=null,"throw"===n&&e.iterator.return&&(r.method="return",r.arg=t,C(e,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),b;var i=d(o,e.iterator,r.arg);if("throw"===i.type)return r.method="throw",r.arg=i.arg,r.delegate=null,b;var a=i.arg;return a?a.done?(r[e.resultName]=a.value,r.next=e.nextLoc,"return"!==r.method&&(r.method="next",r.arg=t),r.delegate=null,b):a:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,b)}function P(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function N(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function A(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(P,this),this.reset(!0)}function I(r){if(r||""===r){var n=r[l];if(n)return n.call(r);if("function"==typeof r.next)return r;if(!isNaN(r.length)){var o=-1,a=function e(){for(;++o<r.length;)if(i.call(r,o))return e.value=r[o],e.done=!1,e;return e.value=t,e.done=!0,e};return a.next=a}}throw new TypeError(e(r)+" is not iterable")}return w.prototype=x,a(O,"constructor",{value:x,configurable:!0}),a(x,"constructor",{value:w,configurable:!0}),w.displayName=f(x,s,"GeneratorFunction"),n.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===w||"GeneratorFunction"===(t.displayName||t.name))},n.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,x):(e.__proto__=x,f(e,s,"GeneratorFunction")),e.prototype=Object.create(O),e},n.awrap=function(e){return{__await:e}},L(_.prototype),f(_.prototype,u,(function(){return this})),n.AsyncIterator=_,n.async=function(e,t,r,o,i){void 0===i&&(i=Promise);var a=new _(p(e,t,r,o),i);return n.isGeneratorFunction(t)?a:a.next().then((function(e){return e.done?e.value:a.next()}))},L(O),f(O,s,"Generator"),f(O,l,(function(){return this})),f(O,"toString",(function(){return"[object Generator]"})),n.keys=function(e){var t=Object(e),r=[];for(var n in t)r.push(n);return r.reverse(),function e(){for(;r.length;){var n=r.pop();if(n in t)return e.value=n,e.done=!1,e}return e.done=!0,e}},n.values=I,A.prototype={constructor:A,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=t,this.done=!1,this.delegate=null,this.method="next",this.arg=t,this.tryEntries.forEach(N),!e)for(var r in this)"t"===r.charAt(0)&&i.call(this,r)&&!isNaN(+r.slice(1))&&(this[r]=t)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var r=this;function n(n,o){return c.type="throw",c.arg=e,r.next=n,o&&(r.method="next",r.arg=t),!!o}for(var o=this.tryEntries.length-1;o>=0;--o){var a=this.tryEntries[o],c=a.completion;if("root"===a.tryLoc)return n("end");if(a.tryLoc<=this.prev){var l=i.call(a,"catchLoc"),u=i.call(a,"finallyLoc");if(l&&u){if(this.prev<a.catchLoc)return n(a.catchLoc,!0);if(this.prev<a.finallyLoc)return n(a.finallyLoc)}else if(l){if(this.prev<a.catchLoc)return n(a.catchLoc,!0)}else{if(!u)throw new Error("try statement without catch or finally");if(this.prev<a.finallyLoc)return n(a.finallyLoc)}}}},abrupt:function(e,t){for(var r=this.tryEntries.length-1;r>=0;--r){var n=this.tryEntries[r];if(n.tryLoc<=this.prev&&i.call(n,"finallyLoc")&&this.prev<n.finallyLoc){var o=n;break}}o&&("break"===e||"continue"===e)&&o.tryLoc<=t&&t<=o.finallyLoc&&(o=null);var a=o?o.completion:{};return a.type=e,a.arg=t,o?(this.method="next",this.next=o.finallyLoc,b):this.complete(a)},complete:function(e,t){if("throw"===e.type)throw e.arg;return"break"===e.type||"continue"===e.type?this.next=e.arg:"return"===e.type?(this.rval=this.arg=e.arg,this.method="return",this.next="end"):"normal"===e.type&&t&&(this.next=t),b},finish:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.finallyLoc===e)return this.complete(r.completion,r.afterLoc),N(r),b}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.tryLoc===e){var n=r.completion;if("throw"===n.type){var o=n.arg;N(r)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(e,r,n){return this.delegate={iterator:I(e),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=t),b}},n}function n(e,t,r,n,o,i,a){try{var c=e[i](a),l=c.value}catch(e){return void r(e)}c.done?t(l):Promise.resolve(l).then(n,o)}function o(e){return function(){var t=this,r=arguments;return new Promise((function(o,i){var a=e.apply(t,r);function c(e){n(a,o,i,c,l,"next",e)}function l(e){n(a,o,i,c,l,"throw",e)}c(void 0)}))}}function i(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function a(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?i(Object(r),!0).forEach((function(t){c(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):i(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}function c(t,r,n){return(r=function(t){var r=function(t){if("object"!==e(t)||null===t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var n=r.call(t,"string");if("object"!==e(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"===e(r)?r:String(r)}(r))in t?Object.defineProperty(t,r,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[r]=n,t}function l(e,t){if(e){if("string"==typeof e)return u(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?u(e,t):void 0}}function u(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}LJ.define("LJ.Misc.NotifSubs");var s=!1,f={newEntry:"JournalNewEntry"},p={notifCenter:"NotificationCentre",email:"Email"},d=Object.fromEntries(Object.entries(p).map((function(e){var t,r,n=(r=2,function(e){if(Array.isArray(e))return e}(t=e)||function(e,t){var r=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=r){var n,o,i,a,c=[],l=!0,u=!1;try{if(i=(r=r.call(e)).next,0===t){if(Object(r)!==r)return;l=!1}else for(;!(l=(n=i.call(r)).done)&&(c.push(n.value),c.length!==t);l=!0);}catch(e){u=!0,o=e}finally{try{if(!l&&null!=r.return&&(a=r.return(),Object(a)!==a))return}finally{if(u)throw o}}return c}}(t,r)||l(t,r)||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.")}()),o=n[0];return[n[1],o]}))),m={},h=function(e,t,r){var n,o=(arguments.length>3&&void 0!==arguments[3]?arguments[3]:{}).source,i=null===(n=m[e])||void 0===n?void 0:n[t];JSON.stringify(i)===JSON.stringify(r)||(function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=a(a({},m[e]),t);m[e]=r}(e,c({},t,r)),LJ.Event.trigger("NotifSubs/".concat(e,"/").concat(t,"/changed"),{value:r,source:o}))},y=function(e,t){var r=m[e]&&a({},m[e]);return t?(null==r?void 0:r[t])||[]:r},v=function(){var e=o(r().mark((function e(t){var n,o,i,a,c,l;return r().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n=t.event,o=t.eventType,i=t.method,a=t.username,c={event:f[n],target_journal:a,method:p[i]},e.next=4,LJ.Api.callP("subscriptions.".concat(o),c);case 4:return l=e.sent,e.abrupt("return",l);case 6:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}();LJ.Misc.NotifSubs.init=function(){!s&&Site.remote&&(LJ.Misc.NotifSubs.getUserSubs=y,LJ.Misc.NotifSubs.fetchUserSubs=function(){var e=o(r().mark((function e(t){var n,o,i,a;return r().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n=t.event,o=t.username,i={event:f[n],target_journal:o},e.next=4,LJ.Api.callP("subscriptions.get",i);case 4:r=e.sent.subscriptions,a=r.map((function(e){return d[e.method]})),h(o,n,a);case 7:case"end":return e.stop()}var r}),e)})));return function(t){return e.apply(this,arguments)}}(),LJ.Misc.NotifSubs.requestSubNotifAdd=function(){var e=o(r().mark((function e(n,o,i){var a,c,l=arguments;return r().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return a=(l.length>3&&void 0!==l[3]?l[3]:{}).source,(c=t(y(i,n))).push(o),h(i,n,c,{source:a}),e.next=7,v({event:n,eventType:"create",method:o,username:i});case 7:case"end":return e.stop()}}),e)})));return function(t,r,n){return e.apply(this,arguments)}}(),LJ.Misc.NotifSubs.requestSubNotifDelete=function(){var e=o(r().mark((function e(n,o,i){var a,c,l=arguments;return r().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return a=(l.length>3&&void 0!==l[3]?l[3]:{}).source,c=(c=t(y(i,n))).filter((function(e){return e!==o})),h(i,n,c,{source:a}),e.next=7,v({event:n,eventType:"delete",method:o,username:i});case 7:case"end":return e.stop()}}),e)})));return function(t,r,n){return e.apply(this,arguments)}}(),LJ.Event.on("relations.changed",(function(e){var t=e.action,r=e.username;["unsubscribe","removeFromFriends","removeFriend"].includes(t)&&h(r,"newEntry",[])})),s=!0)}},80074:(e,t,r)=>{"use strict";r.d(t,{_:()=>n});var n=function(){return(arguments.length>0&&void 0!==arguments[0]?arguments[0]:[]).filter(Boolean).join(" ")}},81834:(e,t,r)=>{"use strict";r.d(t,{Ay:()=>s});var n=r(96540),o=r(62600),i=r(8680),a=r(7723),c=r(24582);function l(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var r=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=r){var n,o,i,a,c=[],l=!0,u=!1;try{if(i=(r=r.call(e)).next,0===t){if(Object(r)!==r)return;l=!1}else for(;!(l=(n=i.call(r)).done)&&(c.push(n.value),c.length!==t);l=!0);}catch(e){u=!0,o=e}finally{try{if(!l&&null!=r.return&&(a=r.return(),Object(a)!==a))return}finally{if(u)throw o}}return c}}(e,t)||function(e,t){if(e){if("string"==typeof e)return u(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?u(e,t):void 0}}(e,t)||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 u(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}const s=n.forwardRef((function(e,t){var r=e.className,u=e.children,s=e.title,f=e.description,p=e.extraHeaderContent,d=e.footer,m=e.withCloseBtn,h=void 0===m||m,y=e.withOverlay,v=void 0===y||y,b=e.onClose,g=void 0===b?function(){}:b,w=l((0,n.useState)(!1),2),x=w[0],E=w[1],S=l((0,n.useState)(null),2),j=S[0],O=S[1],L=(0,n.useRef)(null),_=(0,n.useRef)(null);return(0,n.useImperativeHandle)(t,(function(){return{elements:{modal:L.current,body:_.current}}})),(0,n.useEffect)((function(){var e=function(e){"Escape"===e.key&&(e.preventDefault(),g({reason:"esc-keydown"}))};return window.addEventListener("keydown",e),function(){window.removeEventListener("keydown",e)}}),[g]),(0,n.useLayoutEffect)((function(){var e=new ResizeObserver((function(){_.current&&d&&(_.current.clientHeight<_.current.scrollHeight?E(!0):E(!1))}));return e.observe(_.current),function(){e.unobserve(_.current)}}),[_,d]),n.createElement(n.Fragment,null,n.createElement(i.A,null),n.createElement(o.Z,null,n.createElement(c.FQ,null,n.createElement(c.hJ,{show:v,"data-react-overlay":!0,onClick:function(){g({reason:"overlay-click"})}}),n.createElement(c.aF,{className:r,ref:L},n.createElement(c.az,null,n.createElement(a.Y,{title:s,description:f,withCloseBtn:h},p,h&&n.createElement(a.J,{onClick:function(){g({reason:"close-btn-click"})}})),n.createElement(c.nB,{className:"m-scrollbar rfb-components-Modal-body",bodyScrollTop:j,isBodyScrollable:x,ref:_,onScroll:function(e){O(e.target.scrollTop)}},u),d&&n.createElement(c.wi,null,d))))))}))},82259:(e,t,r)=>{"use strict";r.d(t,{Cl:()=>i,Z4:()=>a,ZM:()=>c,fY:()=>o});var n=r(79056),o=n.default.div.withConfig({displayName:"OuterContainer",componentId:"sc-g0gy0y-0"})(["top:",";left:",";z-index:5000;width:300px;z-index:100;@media (max-width:400px){position:fixed;}"],(function(e){var t=e.position;return t?"".concat(t.top,"px"):"calc(100% + 5px)"}),(function(e){var t=e.position;return t?"".concat(t.left,"px"):"0"})),i=n.default.div.withConfig({displayName:"ButtonItem",componentId:"sc-g0gy0y-1"})(["cursor:pointer;"]),a=n.default.div.withConfig({displayName:"MsgContainer",componentId:"sc-g0gy0y-2"})(["margin:8px 16px;white-space:normal;line-height:1.4 !important;text-transform:none !important;A{white-space:normal;line-height:1.4 !important;text-transform:none !important;}"]),c=n.default.div.withConfig({displayName:"OuterMobileContainer",componentId:"sc-g0gy0y-3"})(["display:block;.basepopup__group--right{text-align:right;}"])},82595:(e,t,r)=>{"use strict";function n(e){return n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},n(e)}function o(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function i(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?o(Object(r),!0).forEach((function(t){var o,i,a;o=e,i=t,a=r[t],(i=function(e){var t=function(e){if("object"!==n(e)||null===e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var r=t.call(e,"string");if("object"!==n(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"===n(t)?t:String(t)}(i))in o?Object.defineProperty(o,i,{value:a,enumerable:!0,configurable:!0,writable:!0}):o[i]=a})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):o(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}r.d(t,{F:()=>c,u:()=>a});var a={hasShownDropdown:!1,hasLoadedUserNote:!1,savedUserNote:null,isUserNoteModalShown:!1,userNameDisplayData:{}},c=function(e,t){switch(t.type){case"markDropdownAsShown":return i(i({},e),{},{hasShownDropdown:!0});case"markUserNoteAsLoaded":return i(i({},e),{},{hasLoadedUserNote:!0});case"showUserNoteModal":return i(i({},e),{},{isUserNoteModalShown:!0});case"closeUserNoteModal":return i(i({},e),{},{isUserNoteModalShown:!1});case"setSavedUserNote":return i(i({},e),{},{savedUserNote:t.value});case"setUserNameDisplayData":return i(i({},e),{},{userNameDisplayData:t.value});default:return console.warn('SubscribeBtn2022: Got unknown action type "'.concat(t.type,'"')),e}}},83581:(e,t,r)=>{"use strict";r.d(t,{j:()=>n});var n={maxMobileS:"(max-width: ".concat(320,"px)"),maxMobileM:"(max-width: ".concat(360,"px)"),maxMobileL:"(max-width: ".concat(576,"px)"),maxTabletS:"(max-width: ".concat(768,"px)"),maxTabletM:"(max-width: ".concat(969.9,"px)"),maxLaptopS:"(max-width: ".concat(1024,"px)"),maxLaptopM:"(max-width: ".concat(1440,"px)"),maxDesktopS:"(max-width: ".concat(1920,"px)")}},85194:(e,t,r)=>{"use strict";r.d(t,{m:()=>h});var n=r(96540),o=r(98476),i=r(14554),a=r(72317),c=r(91241),l=r(20230);function u(e){return u="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},u(e)}function s(){return s=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},s.apply(this,arguments)}function f(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function p(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?f(Object(r),!0).forEach((function(t){var n,o,i;n=e,o=t,i=r[t],(o=function(e){var t=function(e){if("object"!==u(e)||null===e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var r=t.call(e,"string");if("object"!==u(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"===u(t)?t:String(t)}(o))in n?Object.defineProperty(n,o,{value:i,enumerable:!0,configurable:!0,writable:!0}):n[o]=i})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):f(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}function d(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}var m=function(){};function h(e){var t,r,u,f,h=e.onDropdownShow,y=void 0===h?function(){}:h,v=e.isCommunity,b=void 0!==v&&v,g=e.isInSubscriptionList,w=void 0!==g&&g,x=e.isInFriendList,E=void 0!==x&&x,S=e.remoteIsCommunityMember,j=e.isFollowerOfRemote,O=void 0!==j&&j,L=e.remoteIsCommunityOwner,_=void 0!==L&&L,k=e.requestRelationActionCb,C=void 0===k?m:k,P=e.requestGroupsDataCb,N=e.joinRequestPending,A=e.isSyndicated,I=void 0!==A&&A,F=e.isNews,D=void 0!==F&&F,T=e.hintPopupData,M=void 0===T?{}:T,J=e.requestHintPopupHide,U=void 0===J?m:J,R=e.miscData,B=e.gluePopups,G=e.userNoteProps,z=void 0===G?{}:G,$=z.savedUserNote,q=z.onDropdownUserNoteBtnClick,H=z.modal,Y=void 0===H?{}:H,W=(0,n.useContext)(i.D),Z=(u=(0,n.useState)(!1),f=2,function(e){if(Array.isArray(e))return e}(u)||function(e,t){var r=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=r){var n,o,i,a,c=[],l=!0,u=!1;try{if(i=(r=r.call(e)).next,0===t){if(Object(r)!==r)return;l=!1}else for(;!(l=(n=i.call(r)).done)&&(c.push(n.value),c.length!==t);l=!0);}catch(e){u=!0,o=e}finally{try{if(!l&&null!=r.return&&(a=r.return(),Object(a)!==a))return}finally{if(u)throw o}}return c}}(u,f)||function(e,t){if(e){if("string"==typeof e)return d(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?d(e,t):void 0}}(u,f)||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.")}()),V=Z[0],X=Z[1],K=function(e){X(e),!V&&e&&y()},Q=(0,n.useRef)(null);(0,n.useEffect)((function(){LJ.Event.on("controlstrip::dropdownHideRequest",(function(){return K(!1)}))}),[]),(0,n.useEffect)((function(){var e,t=null==Q||null===(e=Q.current)||void 0===e?void 0:e.dataset;t&&(t.componentId=R.componentId)}),[R.componentId]);var ee=!1,te=[];b||(w||E||!I&&!D?w||E||!O?w||E?w&&!E||E&&(I||D)?(t=LJ.ml("subscribe_button_2022.you_are_subscribed"),r=function(){K(!V),V||P()},ee=!0):E&&(t=LJ.ml("subscribe_button_2022.is_in_friend_list"),r=function(){K(!V),V||P()},ee=!0):(t=LJ.ml("common.subscribe"),r=function(){C("subscribe")},te.push("lightbutton--blue")):(t=LJ.ml("subscribe_button_2022.mutual_subscribe"),r=function(){C("subscribe")},te.push("lightbutton--blue")):(t=LJ.ml("common.subscribe"),r=function(){C("addToFriends")},te.push("lightbutton--blue"))),b&&(_?(t=LJ.ml("subscribe_button_2022.you_are_owner"),r=function(){K(!V),V||P()},ee=!0):!S&&N&&E?(t=LJ.ml("subscribe_button_2022.join_request_is_pending"),r=function(){K(!V),V||P()},ee=!0):w||S?w&&!S?(t=LJ.ml("subscribe_button_2022.you_are_subscribed"),r=function(){K(!V),V||P()},ee=!0):S&&(t=LJ.ml("subscribe_button_2022.you_are_member"),r=function(){K(!V),V||P()},ee=!0):(t=LJ.ml("common.subscribe"),r=function(){C("subscribe")},te.push("lightbutton--blue")));var re=["lightbutton"].concat(te).join(" ");Site.remote||(r=function(){window.setTimeout(LJ.Util.Action.login,0)});var ne=M.isShown,oe=p(p({},M),{},{theme:W,isGlued:B}),ie=p(p({},e),{},{isGlued:B,savedUserNote:$,onUserNoteBtnClick:q});return n.createElement(n.Fragment,null,n.createElement(l.d,{className:re+(V?" lightbutton--toggle-open":"")+(ee?" lightbutton--toggle":""),href:"#",target:"_self",onClick:function(e){e.preventDefault(),r()},ref:Q},t,ee&&n.createElement("svg",{className:"lightbutton__dropdown-icon",width:"16",height:"16"},n.createElement("use",{xlinkHref:"#flaticon--arrow-dropdown"}))),V?n.createElement(a.k,s({},ie,{requestPopupClose:function(){K(!1)},targetNode:null==Q?void 0:Q.current})):null,ne?n.createElement(c.A,s({},oe,{handleOutsideClick:function(){U()},handleScroll:function(){U()},requestPopupClose:function(){U()},targetNode:null==Q?void 0:Q.current})):null,Y.isShown?n.createElement(o.A,{onClose:Y.onClose,inputValue:z.savedUserNote||"",userData:z.userNameDisplayData}):null)}},87202:(e,t,r)=>{"use strict";r.d(t,{_:()=>O});var n=r(96540),o=r(5338),i=r(81834),a=r(79056),c=a.default.h3.withConfig({displayName:"Title",componentId:"sc-v4x63z-0"})(["margin:0;margin-bottom:1rem;font-family:ProximaNova,Helvetica,sans-serif !important;font-size:14px;font-weight:bold;color:#000000;"]),l=a.default.div.withConfig({displayName:"CategoryContainer",componentId:"sc-v4x63z-1"})(["&:not(:last-child){margin-bottom:1.5rem;}"]),u=a.default.div.withConfig({displayName:"UserContainer",componentId:"sc-v4x63z-2"})(["position:relative;display:flex;justify-content:space-between;width:100%;margin:0px;&:not(:last-child){margin-bottom:1rem;}"]),s=a.default.div.withConfig({displayName:"Userpic",componentId:"sc-v4x63z-3"})(["display:flex;flex-direction:column;justify-content:start;align-items:center;flex-shrink:0;margin-right:16px;border-radius:4px;overflow:hidden;img{width:65px;height:65px;border-radius:0px;object-fit:cover;}"]),f=a.default.div.withConfig({displayName:"UserContent",componentId:"sc-v4x63z-4"})(["display:flex;flex:1 1 0%;@media (max-width:480px){flex-direction:column;align-items:flex-start;}"]),p=a.default.div.withConfig({displayName:"SubscribeBtnContainer",componentId:"sc-v4x63z-5"})(["display:flex;align-items:center;margin-left:auto;@media (max-width:480px){margin-top:6px;margin-left:0;}"]),d=a.default.div.withConfig({displayName:"UserDescription",componentId:"sc-v4x63z-6"})(["margin-right:16px;@media (max-width:480px){margin-right:0;}"]),m=a.default.div.withConfig({displayName:"UserDisplayWrapper",componentId:"sc-v4x63z-7"})(["margin-bottom:4px;.i-ljuser{display:flex;flex-wrap:nowrap;}.i-ljuser-userhead{margin-right:4px!important;opacity:1 !important;}.i-ljuser-username{text-decoration:none !important;font-weight:normal !important;color:#00A3D9 !important;&:hover,&:focus{color:#00C0FF !important;}}.i-ljuser-profile{background-image:none !important;}"]),h=a.default.p.withConfig({displayName:"JournalTitle",componentId:"sc-v4x63z-8"})(["font-size:14px;line-height:17px;"]),y=r(20339),v=function(e){var t=e.data,r=void 0===t?{}:t,o=r.name,i=r.users;return n.createElement(l,null,n.createElement(c,null,o),i.map((function(e,t){var r={targetUsername:e.user,targetId:e.userid,isInSubscriptionList:e.is_subscribed,isInFriendList:e.is_friend,friendGroupsData:[],isCommunity:e.is_community,remoteIsCommunityMember:e.is_community&&e.is_member,joinRequestPending:e.is_invite_sent,isBannedInCommunity:e.is_banned,isClosedCommunity:"closed"===e.community_membership};return r.isCommunity&&(r.isInSubscriptionList=e.is_friend),n.createElement(u,{key:"".concat(t,"-").concat(e.userid)},n.createElement(s,null,n.createElement("img",{src:e.userpic,alt:e.user})),n.createElement(f,null,n.createElement(d,null,n.createElement(m,{dangerouslySetInnerHTML:{__html:e.user_display}}),e.journal_title&&n.createElement(h,null,e.journal_title)),n.createElement(p,null,n.createElement(y.f,{targetUserData:r}))))})))};function b(e){return b="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},b(e)}function g(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function w(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?g(Object(r),!0).forEach((function(t){var n,o,i;n=e,o=t,i=r[t],(o=function(e){var t=function(e){if("object"!==b(e)||null===e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var r=t.call(e,"string");if("object"!==b(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"===b(t)?t:String(t)}(o))in n?Object.defineProperty(n,o,{value:i,enumerable:!0,configurable:!0,writable:!0}):n[o]=i})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):g(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}function x(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}LJ.define("LJ.Page.SubRecommendModal");var E={isShown:!1,recommendations:[]},S=function(){var e,t,r=(e=(0,n.useState)(E),t=2,function(e){if(Array.isArray(e))return e}(e)||function(e,t){var r=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=r){var n,o,i,a,c=[],l=!0,u=!1;try{if(i=(r=r.call(e)).next,0===t){if(Object(r)!==r)return;l=!1}else for(;!(l=(n=i.call(r)).done)&&(c.push(n.value),c.length!==t);l=!0);}catch(e){u=!0,o=e}finally{try{if(!l&&null!=r.return&&(a=r.return(),Object(a)!==a))return}finally{if(u)throw o}}return c}}(e,t)||function(e,t){if(e){if("string"==typeof e)return x(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?x(e,t):void 0}}(e,t)||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.")}()),o=r[0],a=r[1];(0,n.useEffect)((function(){return LJ.Page.SubRecommendModal.setState=function(e){a(e)},function(){LJ.Page.SubRecommendModal=null}}),[]),(0,n.useEffect)((function(){return LJ.Event.on("SubRecommendModal.requestShow",(function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};if(!o.isShown){var t=e.recommendations;if(0!==(void 0===t?[]:t).length){LJ.Track.YM.call({method:"reachGoal",argArr:["SHOW_FRIENDS_RECOMMENDATIONS"]});var r={isShown:!0};r=w(w({},r),{},{recommendations:e.recommendations}),a(r)}}})),LJ.Page.SubRecommendModal.isMounted=!0,LJ.Event.trigger("SubRecommendModal.mounted"),function(){LJ.Event.off("SubRecommendModal.requestShow")}}),[]);var c=o.isShown,l=o.recommendations,u=(0,n.useCallback)((function(){a(E)}),[]),s=(0,n.useMemo)((function(){return null!=l&&l.length?l.map((function(e){return n.createElement(v,{data:e,key:e.id})})):null}),[c]);return n.createElement(n.Fragment,null,c&&(null==s?void 0:s.length)&&n.createElement(i.Ay,{title:LJ.ml("common.recommended"),description:LJ.ml("common.recommended.description"),onClose:u},n.createElement("div",null,s)))},j=!1,O=function(){var e=(arguments.length>0&&void 0!==arguments[0]?arguments[0]:{}).forceCreateNewModal;if(!j||e){var t=document.createElement("div");t.dataset.subRecommendationModal="",document.body.append(t),(0,o.H)(t).render(n.createElement(S,null)),j=!0}};O()},90764:(e,t,r)=>{"use strict";r.d(t,{k:()=>n});var n=(0,r(79056).createGlobalStyle)(["body.","{overflow:hidden;}"],(function(e){return e.bodyClassName}))},91241:(e,t,r)=>{"use strict";r.d(t,{A:()=>u});var n=r(96540),o=r(14554),i=r(82259),a=r(62600),c=function(){},l=LJ.Support.isMobile();function u(e){var t=e.handleOutsideClick,r=void 0===t?c:t,u=e.requestPopupClose,s=void 0===u?c:u,f=e.messageHtml,p=e.targetNode,d=e.handleScroll,m=void 0===d?c:d,h=e.isGlued,y=(0,n.useContext)(o.D),v=(0,n.useRef)(null),b=(0,n.useMemo)((function(){var e={top:0,left:0};if(!p)return e;var t=p.getBoundingClientRect(),r=t.top,n=t.height,o=t.left,i=window.scrollY;return e.top=r+n+i+(!h&&5),e.left=o,e}),[]);(0,n.useEffect)((function(){function e(e){null!=v&&v.current&&!v.current.contains(e.target)&&r()}function t(e){var t=e.target;null!=t&&t.closest&&t.closest("[data-hint-popup]")||m()}return l&&(document.body.style.overflow="hidden"),setTimeout((function(){document.addEventListener("click",e),l||document.addEventListener("scroll",t,!0)})),function(){l&&!document.querySelectorAll("[data-react-overlay]").length&&(document.body.style.overflow=""),document.removeEventListener("click",e),l||document.removeEventListener("scroll",t,!0)}}),[]);var g=n.createElement(i.Cl,{onClick:function(){s()},className:"lightbutton"},LJ.ml("common.close"));return n.createElement(n.Fragment,null,l?n.createElement(a.Z,null,n.createElement("div",{className:"new-modal-backdrop","data-react-overlay":!0}),n.createElement(i.ZM,{className:"new-modal new-modal--popup"},n.createElement("div",{className:"new-modal-dialog new-modal-dialog--centered"},n.createElement("div",{className:"new-modal-content",ref:v},n.createElement("div",{className:"basepopup__group"},n.createElement("div",{className:"basepopup__content"},n.createElement("div",{className:"basepopup-selector"},n.createElement(i.Z4,{dangerouslySetInnerHTML:{__html:f}})))),n.createElement("div",{className:"basepopup__group basepopup__group--right"},g))))):n.createElement(a.Z,null,n.createElement(i.fY,{className:"basepopup ".concat("dark"===y&&"basepopup--dark"," ").concat(h&&"basepopup--glued"),ref:v,position:b,"data-hint-popup":!0},n.createElement("div",{className:"basepopup__group"},n.createElement("div",{className:"basepopup__content"},n.createElement("div",{className:"basepopup-selector"},n.createElement(i.Z4,{dangerouslySetInnerHTML:{__html:f}})))))))}},92968:(e,t,r)=>{"use strict";r.d(t,{A:()=>a});var n=r(96540),o=["className","xlinkHref"];function i(){return i=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},i.apply(this,arguments)}const a=(0,n.forwardRef)((function(e,t){var r=e.className,a=void 0===r?"":r,c=e.xlinkHref,l=function(e,t){if(null==e)return{};var r,n,o=function(e,t){if(null==e)return{};var r,n,o={},i=Object.keys(e);for(n=0;n<i.length;n++)r=i[n],t.indexOf(r)>=0||(o[r]=e[r]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(n=0;n<i.length;n++)r=i[n],t.indexOf(r)>=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(o[r]=e[r])}return o}(e,o);return n.createElement("svg",i({xmlns:"http://www.w3.org/2000/svg",className:"svgicon ".concat(c," ").concat(a),ref:t},l),n.createElement("use",{xlinkHref:"#".concat(c)}))}))},95618:(e,t,r)=>{"use strict";r.d(t,{u:()=>n});var n=r(79056).default.div.withConfig({displayName:"Component",componentId:"sc-zvb2mg-0"})(["position:absolute;top:",";left:",";-webkit-font-smoothing:antialiased;z-index:5000;"],(function(e){var t=e.$position;return"".concat(t.y,"px")}),(function(e){var t=e.$position;return"".concat(t.x,"px")}))},95774:(e,t,r)=>{"use strict";var n,o,i,a,c=!(null!==(n=Site.journal)&&void 0!==n&&n.is_friend)&&!(null!==(o=Site.journal)&&void 0!==o&&o.is_subscriber)&&((null===(i=Site.remote)||void 0===i?void 0:i.is_friend)||(null===(a=Site.remote)||void 0===a?void 0:a.is_subscriber));function l(e){return l="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},l(e)}function u(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function s(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?u(Object(r),!0).forEach((function(t){var n,o,i;n=e,o=t,i=r[t],(o=function(e){var t=function(e){if("object"!==l(e)||null===e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var r=t.call(e,"string");if("object"!==l(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"===l(t)?t:String(t)}(o))in n?Object.defineProperty(n,o,{value:i,enumerable:!0,configurable:!0,writable:!0}):n[o]=i})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):u(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}LJ.define("LJ.UserRelations");var f=!1,p={},d=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=(arguments.length>2&&void 0!==arguments[2]?arguments[2]:{}).silent,n=s(s({},p[e]||{}),t);p[e]=n,r||LJ.Event.trigger("UserRelations/".concat(e,"/changed"),n)},m=function(e){var t=p[e];return t&&s({},t)};LJ.UserRelations.init=function(){if(!f&&Site.remote){if(Site.journal&&Site.journal.username!==Site.remote.username){var e={isInSubscriptionList:Site.journal.is_subscriber,isInFriendList:Site.journal.is_friend,friendGroupsData:[],isCommunity:Site.journal.is_community,isFollowerOfRemote:c,remoteIsCommunityOwner:"owner"===Site.journal.community_relation,remoteIsCommunityMember:Site.journal.is_community&&Site.journal.is_member,joinRequestPending:Site.journal.is_invite_sent&&Site.journal.is_friend,isBannedInCommunity:Site.journal.is_banned};e.isCommunity&&(e.isInSubscriptionList=Site.journal.is_friend),d(Site.journal.username,e,{silent:!0})}LJ.UserRelations.patch=d,LJ.UserRelations.getUserRelations=m,LJ.Event.on("relations.changed",(function(e){var t=e.data,r=e.username,n=t.is_subscriber,o=t.is_friend,i=t.is_member,a=t.is_invite_sent,c=m(r),l={isInSubscriptionList:n,isInFriendList:o,remoteIsCommunityMember:i,joinRequestPending:a&&o,isFollowerOfRemote:!(o||n||!Site.remote.is_friend&&!Site.remote.is_subscriber)};null!=c&&c.isCommunity&&(l.isInSubscriptionList=o),d(r,l)})),f=!0}},r(74536);var h=r(96540),y=r(5338),v=r(92968),b=r(28081),g=r(79056),w=r(81834),x=(0,g.default)(w.Ay).withConfig({displayName:"Wrapper",componentId:"sc-1l6wbxb-0"})(["max-width:380px;text-align:center;"]),E=g.default.div.withConfig({displayName:"Body",componentId:"sc-1l6wbxb-1"})(["display:flex;flex-direction:column;align-items:center;.svgicon{width:auto;height:120px;fill:#E6EFF2;}.svgicon + p{color:#7A9199;}"]),S=g.default.img.withConfig({displayName:"Image",componentId:"sc-1l6wbxb-2"})(["width:140px;height:140px;object-fit:cover;object-position:center;"]),j=g.default.p.withConfig({displayName:"Description",componentId:"sc-1l6wbxb-3"})(["margin:10px 0;font-size:14px;line-height:17px;"]),O=g.default.p.withConfig({displayName:"Date",componentId:"sc-1l6wbxb-4"})(["margin:0 0 20px;text-transform:capitalize;font-size:13px;line-height:16px;color:#7A9199;"]);const L=function(e){var t,r=e.onClose,n=e.data,o=void 0===n?{}:n,i=o.achieved,a=o.display,c=void 0===a?"":a,l=o.image_large,u=void 0===l?"":l,s=o.description,f=void 0===s?"":s,p=o.date,d=void 0===p?"":p,m=Site.journal.username===(null===(t=Site.remote)||void 0===t?void 0:t.username),y=Site.locale.includes("ru")?"ru":"en";return h.createElement(x,{title:c,onClose:r,withCloseBtn:!1},h.createElement(E,null,i?h.createElement(S,{src:u,alt:c}):h.createElement(v.A,{xlinkHref:"flaticon--lock"}),h.createElement(j,{dangerouslySetInnerHTML:{__html:f}}),m&&i?h.createElement(O,null,LJ.ml("ljcom.userinfo.achievements.received_date",{date:moment(d).locale(y).format("MMM DD, YYYY")})):null,h.createElement(b.A,{onClick:r,primary:!0},LJ.ml("ljcom.userinfo.achievements.modal.submit"))))};var _=g.default.div.withConfig({displayName:"Wrapper",componentId:"sc-rsmut0-0"})(["display:inline-flex;svg{display:block;width:",";height:",";animation:svgrotate .57s linear infinite;}@keyframes svgrotate{100%{transform:rotate(360deg);}}"],(function(e){var t=e.$size;return"".concat(t,"px")}),(function(e){var t=e.$size;return"".concat(t,"px")}));var k=g.default.div.withConfig({displayName:"Wrapper",componentId:"sc-16m5tup-0"})(["position:relative;display:flex;justify-content:center;align-items:center;gap:10px;margin-bottom:4px;background:#FFFFFF;"]),C=(0,g.default)((function(e){var t=e.className,r=e.size,n=void 0===r?16:r;return h.createElement(_,{className:t,$size:n},h.createElement("svg",{viewBox:"0 0 31 31",version:"1.1",xmlns:"http://www.w3.org/2000/svg"},h.createElement("g",{fillRule:"evenodd"},h.createElement("path",{d:"M15.5,31 C24.0604136,31 31,24.0604136 31,15.5 C31,6.93958638 24.0604136,0 15.5,0 C6.93958638,0 0,6.93958638 0,15.5 C0,24.0604136 6.93958638,31 15.5,31 Z M15.5,24 C20.1944204,24 24,20.1944204 24,15.5 C24,10.8055796 20.1944204,7 15.5,7 C10.8055796,7 7,10.8055796 7,15.5 C7,20.1944204 10.8055796,24 15.5,24 Z",fill:"#00AFEA"}),h.createElement("path",{d:"M15.7960584,7.00505942 L15.8509795,0.00389541322 C20.1020367,0.0983450811 23.9309467,1.90428116 26.675877,4.7598713 L26.675877,4.7598713 L21.7412314,9.72958246 C20.2508535,8.11838542 18.1443589,7.08544079 15.7960584,7.00505942 Z",fill:"#346B7C"}))))})).withConfig({displayName:"SliderLoader",componentId:"sc-16m5tup-1"})(["svg{width:30px;height:30px;}"]),P=g.default.button.withConfig({displayName:"SliderNavButton",componentId:"sc-16m5tup-2"})(["display:flex;justify-content:center;align-items:center;margin-bottom:24px;padding:0 16px;height:100px;border:none;border-radius:50%;background:#FFFFFF;text-align:center;cursor:pointer;svg{width:12px;height:60px;fill:#7A9199;transition:fill .2s;}&[disabled]{opacity:0;pointer-events:none;visibility:hidden;}"]),N=g.default.ul.withConfig({displayName:"List",componentId:"sc-16m5tup-3"})(["display:flex;gap:40px;width:100%;margin:0;padding:0;overflow-x:auto;list-style:none;"]),A=g.default.li.withConfig({displayName:"ListItem",componentId:"sc-16m5tup-4"})(["display:inline-block;width:100px;margin:0;padding:0;vertical-align:top;text-align:center;cursor:pointer;"]),I=g.default.img.withConfig({displayName:"AchievementImage",componentId:"sc-16m5tup-5"})(["width:100px;height:100px;"]),F=(0,g.default)(v.A).withConfig({displayName:"AchievementPlaceholderImage",componentId:"sc-16m5tup-6"})(["width:100px;height:100px;fill:#E6EFF2;"]),D=g.default.p.withConfig({displayName:"AchievementName",componentId:"sc-16m5tup-7"})(["margin:0;font-size:12px;line-height:14px;color:#333333;"]),T=g.default.p.withConfig({displayName:"AchievementPlaceholderName",componentId:"sc-16m5tup-8"})(["margin:0;font-size:12px;line-height:14px;color:#7A9199;"]);function M(e){return M="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},M(e)}function J(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var r=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=r){var n,o,i,a,c=[],l=!0,u=!1;try{if(i=(r=r.call(e)).next,0===t){if(Object(r)!==r)return;l=!1}else for(;!(l=(n=i.call(r)).done)&&(c.push(n.value),c.length!==t);l=!0);}catch(e){u=!0,o=e}finally{try{if(!l&&null!=r.return&&(a=r.return(),Object(a)!==a))return}finally{if(u)throw o}}return c}}(e,t)||function(e,t){if(e){if("string"==typeof e)return U(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?U(e,t):void 0}}(e,t)||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 U(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function R(){R=function(){return t};var e,t={},r=Object.prototype,n=r.hasOwnProperty,o=Object.defineProperty||function(e,t,r){e[t]=r.value},i="function"==typeof Symbol?Symbol:{},a=i.iterator||"@@iterator",c=i.asyncIterator||"@@asyncIterator",l=i.toStringTag||"@@toStringTag";function u(e,t,r){return Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{u({},"")}catch(e){u=function(e,t,r){return e[t]=r}}function s(e,t,r,n){var i=t&&t.prototype instanceof v?t:v,a=Object.create(i.prototype),c=new P(n||[]);return o(a,"_invoke",{value:L(e,r,c)}),a}function f(e,t,r){try{return{type:"normal",arg:e.call(t,r)}}catch(e){return{type:"throw",arg:e}}}t.wrap=s;var p="suspendedStart",d="suspendedYield",m="executing",h="completed",y={};function v(){}function b(){}function g(){}var w={};u(w,a,(function(){return this}));var x=Object.getPrototypeOf,E=x&&x(x(N([])));E&&E!==r&&n.call(E,a)&&(w=E);var S=g.prototype=v.prototype=Object.create(w);function j(e){["next","throw","return"].forEach((function(t){u(e,t,(function(e){return this._invoke(t,e)}))}))}function O(e,t){function r(o,i,a,c){var l=f(e[o],e,i);if("throw"!==l.type){var u=l.arg,s=u.value;return s&&"object"==M(s)&&n.call(s,"__await")?t.resolve(s.__await).then((function(e){r("next",e,a,c)}),(function(e){r("throw",e,a,c)})):t.resolve(s).then((function(e){u.value=e,a(u)}),(function(e){return r("throw",e,a,c)}))}c(l.arg)}var i;o(this,"_invoke",{value:function(e,n){function o(){return new t((function(t,o){r(e,n,t,o)}))}return i=i?i.then(o,o):o()}})}function L(t,r,n){var o=p;return function(i,a){if(o===m)throw new Error("Generator is already running");if(o===h){if("throw"===i)throw a;return{value:e,done:!0}}for(n.method=i,n.arg=a;;){var c=n.delegate;if(c){var l=_(c,n);if(l){if(l===y)continue;return l}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(o===p)throw o=h,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);o=m;var u=f(t,r,n);if("normal"===u.type){if(o=n.done?h:d,u.arg===y)continue;return{value:u.arg,done:n.done}}"throw"===u.type&&(o=h,n.method="throw",n.arg=u.arg)}}}function _(t,r){var n=r.method,o=t.iterator[n];if(o===e)return r.delegate=null,"throw"===n&&t.iterator.return&&(r.method="return",r.arg=e,_(t,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),y;var i=f(o,t.iterator,r.arg);if("throw"===i.type)return r.method="throw",r.arg=i.arg,r.delegate=null,y;var a=i.arg;return a?a.done?(r[t.resultName]=a.value,r.next=t.nextLoc,"return"!==r.method&&(r.method="next",r.arg=e),r.delegate=null,y):a:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,y)}function k(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function C(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function P(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(k,this),this.reset(!0)}function N(t){if(t||""===t){var r=t[a];if(r)return r.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var o=-1,i=function r(){for(;++o<t.length;)if(n.call(t,o))return r.value=t[o],r.done=!1,r;return r.value=e,r.done=!0,r};return i.next=i}}throw new TypeError(M(t)+" is not iterable")}return b.prototype=g,o(S,"constructor",{value:g,configurable:!0}),o(g,"constructor",{value:b,configurable:!0}),b.displayName=u(g,l,"GeneratorFunction"),t.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===b||"GeneratorFunction"===(t.displayName||t.name))},t.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,g):(e.__proto__=g,u(e,l,"GeneratorFunction")),e.prototype=Object.create(S),e},t.awrap=function(e){return{__await:e}},j(O.prototype),u(O.prototype,c,(function(){return this})),t.AsyncIterator=O,t.async=function(e,r,n,o,i){void 0===i&&(i=Promise);var a=new O(s(e,r,n,o),i);return t.isGeneratorFunction(r)?a:a.next().then((function(e){return e.done?e.value:a.next()}))},j(S),u(S,l,"Generator"),u(S,a,(function(){return this})),u(S,"toString",(function(){return"[object Generator]"})),t.keys=function(e){var t=Object(e),r=[];for(var n in t)r.push(n);return r.reverse(),function e(){for(;r.length;){var n=r.pop();if(n in t)return e.value=n,e.done=!1,e}return e.done=!0,e}},t.values=N,P.prototype={constructor:P,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=e,this.done=!1,this.delegate=null,this.method="next",this.arg=e,this.tryEntries.forEach(C),!t)for(var r in this)"t"===r.charAt(0)&&n.call(this,r)&&!isNaN(+r.slice(1))&&(this[r]=e)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var r=this;function o(n,o){return c.type="throw",c.arg=t,r.next=n,o&&(r.method="next",r.arg=e),!!o}for(var i=this.tryEntries.length-1;i>=0;--i){var a=this.tryEntries[i],c=a.completion;if("root"===a.tryLoc)return o("end");if(a.tryLoc<=this.prev){var l=n.call(a,"catchLoc"),u=n.call(a,"finallyLoc");if(l&&u){if(this.prev<a.catchLoc)return o(a.catchLoc,!0);if(this.prev<a.finallyLoc)return o(a.finallyLoc)}else if(l){if(this.prev<a.catchLoc)return o(a.catchLoc,!0)}else{if(!u)throw new Error("try statement without catch or finally");if(this.prev<a.finallyLoc)return o(a.finallyLoc)}}}},abrupt:function(e,t){for(var r=this.tryEntries.length-1;r>=0;--r){var o=this.tryEntries[r];if(o.tryLoc<=this.prev&&n.call(o,"finallyLoc")&&this.prev<o.finallyLoc){var i=o;break}}i&&("break"===e||"continue"===e)&&i.tryLoc<=t&&t<=i.finallyLoc&&(i=null);var a=i?i.completion:{};return a.type=e,a.arg=t,i?(this.method="next",this.next=i.finallyLoc,y):this.complete(a)},complete:function(e,t){if("throw"===e.type)throw e.arg;return"break"===e.type||"continue"===e.type?this.next=e.arg:"return"===e.type?(this.rval=this.arg=e.arg,this.method="return",this.next="end"):"normal"===e.type&&t&&(this.next=t),y},finish:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.finallyLoc===e)return this.complete(r.completion,r.afterLoc),C(r),y}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.tryLoc===e){var n=r.completion;if("throw"===n.type){var o=n.arg;C(r)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(t,r,n){return this.delegate={iterator:N(t),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=e),y}},t}function B(e,t,r,n,o,i,a){try{var c=e[i](a),l=c.value}catch(e){return void r(e)}c.done?t(l):Promise.resolve(l).then(n,o)}function G(e){return function(){var t=this,r=arguments;return new Promise((function(n,o){var i=e.apply(t,r);function a(e){B(i,n,o,a,c,"next",e)}function c(e){B(i,n,o,a,c,"throw",e)}a(void 0)}))}}var z=140,$=function(){var e=G(R().mark((function e(t){var r,n,o;return R().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return r=t.username,n={user:r},e.next=4,LJ.Api.callP("user.get_achievements",n);case 4:return o=e.sent,e.abrupt("return",o);case 6:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}();const q=function(){var e,t=J((0,h.useState)([]),2),r=t[0],n=t[1],o=J((0,h.useState)(!1),2),i=o[0],a=o[1],c=J((0,h.useState)(!1),2),l=c[0],u=c[1],s=J((0,h.useState)(!1),2),f=s[0],p=s[1],d=J((0,h.useState)({isShow:!1,data:null}),2),m=d[0],y=d[1],b=(0,h.useRef)(null),g=Site.journal.username===(null===(e=Site.remote)||void 0===e?void 0:e.username);return(0,h.useEffect)((function(){var e=function(){var e=G(R().mark((function e(){var t,r;return R().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,p(!0),e.next=4,$({username:Site.journal.username});case 4:t=e.sent,r=t.achievements,n(r),p(!1),e.next=13;break;case 10:e.prev=10,e.t0=e.catch(0),p(!1);case 13:case"end":return e.stop()}}),e,null,[[0,10]])})));return function(){return e.apply(this,arguments)}}();e()}),[]),(0,h.useEffect)((function(){if(b.current&&r.length){var e=new ResizeObserver((function(){b.current.clientWidth<b.current.scrollWidth&&u(!0)}));return e.observe(b.current),function(){e.disconnect()}}}),[r.length]),f?h.createElement(k,null,h.createElement(C,null)):h.createElement(k,null,h.createElement(P,{type:"button",onClick:function(){var e=b.current.scrollLeft;b.current.scroll({left:(Math.trunc(e/z)-1)*z,behavior:"smooth"})},"aria-label":LJ.ml("ljcom.userinfo.achievements.slider.button.left"),disabled:!i},h.createElement(v.A,{xlinkHref:"flaticon--arrow-left"})),h.createElement(N,{className:"m-scrollbar",ref:b,onScroll:function(){var e=b.current.lastChild.getBoundingClientRect(),t=e.left,r=e.width,n=b.current.firstChild.getBoundingClientRect().left,o=b.current.getBoundingClientRect(),i=o.left,c=o.width;i+c>=t+r-1?u(!1):i+c<t+r&&(u(!0),i>n?a(!0):n<=i&&a(!1))}},r.filter((function(e){return Boolean(e.achieved)||g})).map((function(e){return h.createElement(A,{key:e.vgift_id,onClick:function(){return function(e){y({isShow:!0,data:e})}(e)}},e.achieved?h.createElement(h.Fragment,null,h.createElement(I,{src:e.image_small}),h.createElement(D,null,e.display)):h.createElement(h.Fragment,null,h.createElement(F,{xlinkHref:"flaticon--lock"}),h.createElement(T,null,e.display)))}))),h.createElement(P,{type:"button",onClick:function(){var e=b.current.scrollLeft;b.current.scroll({left:(Math.trunc(e/z)+1)*z,behavior:"smooth"})},"aria-label":LJ.ml("ljcom.userinfo.achievements.slider.button.right"),disabled:!l},h.createElement(v.A,{xlinkHref:"flaticon--arrow-right"})),m.isShow&&h.createElement(L,{data:m.data,onClose:function(){y({isShow:!1,data:null})}}))};LJ.define("LJ.Profile.Achievements"),LJ.Profile.Achievements.init=function(){LJ.Util.DOM.initPromise.then((function(){var e=document.querySelector("[data-achievements-mount]");e&&(0,y.H)(e).render(h.createElement(q,null))}))};var H=r(87202),Y=r(20339),W=r(80074),Z=r(14554),V=r(69710),X=g.default.div.withConfig({displayName:"Wrapper",componentId:"sc-3oa966-0"})(["position:relative;display:flex;align-items:center;justify-content:flex-start;"]),K=g.default.label.withConfig({displayName:"Slider",componentId:"sc-3oa966-1"})(['box-sizing:border-box;display:block;width:40px;height:24px;padding:1px;border:1px solid #DFE6E8;border-radius:12px;background-color:#F5F7F8;transition:border-width .15s,border-color .15s,background-color .15s;cursor:pointer;&:before{content:"";display:block;width:20px;height:20px;box-shadow:0 0 2px 0 rgb(0 0 0 / 8%),0 4px 8px 0 rgb(0 0 0 / 12%);border-radius:10px;background-color:#fff;transition:margin .2s;}']),Q=g.default.label.withConfig({displayName:"Label",componentId:"sc-3oa966-2"})(["word-break:break-word;font-size:14px;line-height:16px;color:#000000;"," ",""],(function(e){return"left"===e.labelPosition&&(0,g.css)(["order:0;margin-right:12px;"])}),(function(e){return"right"===e.labelPosition&&(0,g.css)(["order:1;margin-left:12px;"])})),ee=g.default.input.withConfig({displayName:"Control",componentId:"sc-3oa966-3"})(["position:absolute;width:1px;height:1px;margin:-1px;border:0;padding:0;white-space:nowrap;clip-path:inset(100%);clip:rect(0 0 0 0);overflow:hidden;&:checked ~ ","{border-color:transparent;background-color:#00A3D9;}&:checked ~ ","::before{margin-left:16px;}&:hover ~ ","{border-color:#BDC8CD;}&:focus ~ ","{border-color:#00C0FF;}&:checked:hover ~ ",",&:checked:focus ~ ","{border-color:transparent;background-color:#00C0FF;}&:disabled{& ~ *{cursor:not-allowed;}& ~ ","{color:#8c969b;}& ~ ","{border:1px solid #DFE6E8;}&:checked ~ ","{background-color:#d5dde0;cursor:not-allowed;}}"],K,K,K,K,K,K,Q,K,K),te=["onChange","className","label","checked","id","labelPosition","disabled","autoFocus"];function re(){return re=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},re.apply(this,arguments)}const ne=function(e){var t=e.onChange,r=e.className,n=e.label,o=e.checked,i=e.id,a=e.labelPosition,c=void 0===a?"left":a,l=e.disabled,u=e.autoFocus,s=function(e,t){if(null==e)return{};var r,n,o=function(e,t){if(null==e)return{};var r,n,o={},i=Object.keys(e);for(n=0;n<i.length;n++)r=i[n],t.indexOf(r)>=0||(o[r]=e[r]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(n=0;n<i.length;n++)r=i[n],t.indexOf(r)>=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(o[r]=e[r])}return o}(e,te);return h.createElement(X,re({className:r},s),h.createElement(ee,{onChange:t,type:"checkbox",id:i,checked:o,disabled:l,autoFocus:u}),n&&h.createElement(Q,{htmlFor:i,labelPosition:c},n),h.createElement(K,{htmlFor:i,$disabled:l}))};var oe=function(e){var t=e.onChange,r=e.event,n=e.description,o=e.method,i=e.id,a=e.isActive,c=e.isMobile,l=function(e){var n=e.target;t({event:r,method:o,isActive:n.checked})};return h.createElement(h.Fragment,null,!c&&h.createElement("label",{className:"lightcheckbox"},h.createElement("input",{className:"lightcheckbox__input",type:"checkbox",id:i,checked:a,onChange:l}),h.createElement("span",{className:"lightcheckbox__text"},n)),!!c&&h.createElement(ne,{checked:a,onChange:l,label:n,id:i}))},ie=g.default.ul.withConfig({displayName:"List",componentId:"sc-10wr8u4-0"})(["list-style:none;margin:0;padding:0;",""],(function(e){return e.isMobile&&(0,g.css)(["& li:not(:last-of-type){margin-bottom:15px;}"])})),ae=g.default.li.withConfig({displayName:"ListItem",componentId:"sc-10wr8u4-1"})(["display:flex;align-items:center;flex-wrap:wrap;"]),ce=(g.default.span.withConfig({displayName:"ItemDescription",componentId:"sc-10wr8u4-2"})(["font-size:14px;line-height:20px;font-weight:400;color:#333333;"]),g.default.span.withConfig({displayName:"PreloaderContainer",componentId:"sc-10wr8u4-3"})(["display:flex;align-items:center;justify-content:center;width:16px;height:16px;margin-right:8px;"]),g.default.div.withConfig({displayName:"ModalFooter",componentId:"sc-10wr8u4-4"})(["display:flex;justify-content:flex-end;"])),le=(g.default.button.withConfig({displayName:"Button",componentId:"sc-10wr8u4-5"})(["cursor:pointer;"]),function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.onClose,r=e.onSubscriptionChange,n=e.subscriptions,o=e.targetNode,i=e.isGlued,a=LJ.Support.isMobile(),c=n.filter((function(e){return"newEntry"===e.event})).map((function(e){var t=e.event,n=e.method,o=e.description,i=e.isActive,c="".concat(t,"-").concat(n);return h.createElement(ae,{className:"basepopup__item",key:c},h.createElement(oe,{event:t,method:n,description:o,isMobile:a,onChange:r,isActive:i,id:c}))})),l=h.createElement(ce,null,h.createElement(b.A,{onClick:t,type:"button",primary:!0,sizeL:!0},LJ.ml("notif_dropdown_2022.button")));return h.createElement(h.Fragment,null,!a&&h.createElement(V.A,{onClose:t,anchorEl:o,placement:{x:"alignLeftEdges",y:"below"},margins:{y:i?0:5},withAutoClosing:!0,className:(0,W._)([i&&"basepopup--glued"])},h.createElement("div",{className:"basepopup__title"},LJ.ml("notif_dropdown_2022.title")),h.createElement(ie,null,c)),!!a&&h.createElement(w.Ay,{title:LJ.ml("notif_dropdown_2022.title"),onClose:t,footer:l,withCloseBtn:!1},h.createElement("div",{className:"basepopup__group"},h.createElement(ie,{isMobile:a},c))))}),ue=(0,g.keyframes)(["from{transform:translateY(0);opacity:1;}to{transform:translateY(10px);opacity:0;}"]),se=(0,g.default)(V.A).withConfig({displayName:"Popover",componentId:"sc-128wtuh-0"})(["",""],(function(e){var t=e.$animationDuration,r=e.$animationDelay;return(0,g.css)(["animation:"," ","ms linear ","ms forwards;"],ue,t,r)})),fe=g.default.button.withConfig({displayName:"CloseButton",componentId:"sc-128wtuh-1"})(["display:inline-flex;.svgicon{width:12px;height:12px;}"]),pe=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.onClose,r=e.targetNode,n=e.isGlued;return(0,h.useEffect)((function(){var e=setTimeout((function(){t()}),3500);return function(){clearTimeout(e)}}),[t]),h.createElement(se,{onClose:t,anchorEl:r,placement:{x:"alignLeftEdges",y:"below"},margins:{y:n?0:5},className:(0,W._)([n&&"basepopup--glued"]),$animationDuration:500,$animationDelay:3e3},h.createElement(fe,{onClick:t,className:"basepopup__close",type:"button"},h.createElement(v.A,{className:"basepopup__close-icon",xlinkHref:"flaticon--cross-2"})),h.createElement("p",null,LJ.ml("notif_dropdown_tip")))};function de(e){return de="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},de(e)}function me(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function he(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?me(Object(r),!0).forEach((function(t){var n,o,i;n=e,o=t,i=r[t],(o=function(e){var t=function(e){if("object"!==de(e)||null===e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var r=t.call(e,"string");if("object"!==de(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"===de(t)?t:String(t)}(o))in n?Object.defineProperty(n,o,{value:i,enumerable:!0,configurable:!0,writable:!0}):n[o]=i})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):me(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}function ye(){ye=function(){return t};var e,t={},r=Object.prototype,n=r.hasOwnProperty,o=Object.defineProperty||function(e,t,r){e[t]=r.value},i="function"==typeof Symbol?Symbol:{},a=i.iterator||"@@iterator",c=i.asyncIterator||"@@asyncIterator",l=i.toStringTag||"@@toStringTag";function u(e,t,r){return Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{u({},"")}catch(e){u=function(e,t,r){return e[t]=r}}function s(e,t,r,n){var i=t&&t.prototype instanceof v?t:v,a=Object.create(i.prototype),c=new P(n||[]);return o(a,"_invoke",{value:L(e,r,c)}),a}function f(e,t,r){try{return{type:"normal",arg:e.call(t,r)}}catch(e){return{type:"throw",arg:e}}}t.wrap=s;var p="suspendedStart",d="suspendedYield",m="executing",h="completed",y={};function v(){}function b(){}function g(){}var w={};u(w,a,(function(){return this}));var x=Object.getPrototypeOf,E=x&&x(x(N([])));E&&E!==r&&n.call(E,a)&&(w=E);var S=g.prototype=v.prototype=Object.create(w);function j(e){["next","throw","return"].forEach((function(t){u(e,t,(function(e){return this._invoke(t,e)}))}))}function O(e,t){function r(o,i,a,c){var l=f(e[o],e,i);if("throw"!==l.type){var u=l.arg,s=u.value;return s&&"object"==de(s)&&n.call(s,"__await")?t.resolve(s.__await).then((function(e){r("next",e,a,c)}),(function(e){r("throw",e,a,c)})):t.resolve(s).then((function(e){u.value=e,a(u)}),(function(e){return r("throw",e,a,c)}))}c(l.arg)}var i;o(this,"_invoke",{value:function(e,n){function o(){return new t((function(t,o){r(e,n,t,o)}))}return i=i?i.then(o,o):o()}})}function L(t,r,n){var o=p;return function(i,a){if(o===m)throw new Error("Generator is already running");if(o===h){if("throw"===i)throw a;return{value:e,done:!0}}for(n.method=i,n.arg=a;;){var c=n.delegate;if(c){var l=_(c,n);if(l){if(l===y)continue;return l}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(o===p)throw o=h,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);o=m;var u=f(t,r,n);if("normal"===u.type){if(o=n.done?h:d,u.arg===y)continue;return{value:u.arg,done:n.done}}"throw"===u.type&&(o=h,n.method="throw",n.arg=u.arg)}}}function _(t,r){var n=r.method,o=t.iterator[n];if(o===e)return r.delegate=null,"throw"===n&&t.iterator.return&&(r.method="return",r.arg=e,_(t,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),y;var i=f(o,t.iterator,r.arg);if("throw"===i.type)return r.method="throw",r.arg=i.arg,r.delegate=null,y;var a=i.arg;return a?a.done?(r[t.resultName]=a.value,r.next=t.nextLoc,"return"!==r.method&&(r.method="next",r.arg=e),r.delegate=null,y):a:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,y)}function k(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function C(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function P(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(k,this),this.reset(!0)}function N(t){if(t||""===t){var r=t[a];if(r)return r.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var o=-1,i=function r(){for(;++o<t.length;)if(n.call(t,o))return r.value=t[o],r.done=!1,r;return r.value=e,r.done=!0,r};return i.next=i}}throw new TypeError(de(t)+" is not iterable")}return b.prototype=g,o(S,"constructor",{value:g,configurable:!0}),o(g,"constructor",{value:b,configurable:!0}),b.displayName=u(g,l,"GeneratorFunction"),t.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===b||"GeneratorFunction"===(t.displayName||t.name))},t.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,g):(e.__proto__=g,u(e,l,"GeneratorFunction")),e.prototype=Object.create(S),e},t.awrap=function(e){return{__await:e}},j(O.prototype),u(O.prototype,c,(function(){return this})),t.AsyncIterator=O,t.async=function(e,r,n,o,i){void 0===i&&(i=Promise);var a=new O(s(e,r,n,o),i);return t.isGeneratorFunction(r)?a:a.next().then((function(e){return e.done?e.value:a.next()}))},j(S),u(S,l,"Generator"),u(S,a,(function(){return this})),u(S,"toString",(function(){return"[object Generator]"})),t.keys=function(e){var t=Object(e),r=[];for(var n in t)r.push(n);return r.reverse(),function e(){for(;r.length;){var n=r.pop();if(n in t)return e.value=n,e.done=!1,e}return e.done=!0,e}},t.values=N,P.prototype={constructor:P,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=e,this.done=!1,this.delegate=null,this.method="next",this.arg=e,this.tryEntries.forEach(C),!t)for(var r in this)"t"===r.charAt(0)&&n.call(this,r)&&!isNaN(+r.slice(1))&&(this[r]=e)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var r=this;function o(n,o){return c.type="throw",c.arg=t,r.next=n,o&&(r.method="next",r.arg=e),!!o}for(var i=this.tryEntries.length-1;i>=0;--i){var a=this.tryEntries[i],c=a.completion;if("root"===a.tryLoc)return o("end");if(a.tryLoc<=this.prev){var l=n.call(a,"catchLoc"),u=n.call(a,"finallyLoc");if(l&&u){if(this.prev<a.catchLoc)return o(a.catchLoc,!0);if(this.prev<a.finallyLoc)return o(a.finallyLoc)}else if(l){if(this.prev<a.catchLoc)return o(a.catchLoc,!0)}else{if(!u)throw new Error("try statement without catch or finally");if(this.prev<a.finallyLoc)return o(a.finallyLoc)}}}},abrupt:function(e,t){for(var r=this.tryEntries.length-1;r>=0;--r){var o=this.tryEntries[r];if(o.tryLoc<=this.prev&&n.call(o,"finallyLoc")&&this.prev<o.finallyLoc){var i=o;break}}i&&("break"===e||"continue"===e)&&i.tryLoc<=t&&t<=i.finallyLoc&&(i=null);var a=i?i.completion:{};return a.type=e,a.arg=t,i?(this.method="next",this.next=i.finallyLoc,y):this.complete(a)},complete:function(e,t){if("throw"===e.type)throw e.arg;return"break"===e.type||"continue"===e.type?this.next=e.arg:"return"===e.type?(this.rval=this.arg=e.arg,this.method="return",this.next="end"):"normal"===e.type&&t&&(this.next=t),y},finish:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.finallyLoc===e)return this.complete(r.completion,r.afterLoc),C(r),y}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.tryLoc===e){var n=r.completion;if("throw"===n.type){var o=n.arg;C(r)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(t,r,n){return this.delegate={iterator:N(t),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=e),y}},t}function ve(e,t,r,n,o,i,a){try{var c=e[i](a),l=c.value}catch(e){return void r(e)}c.done?t(l):Promise.resolve(l).then(n,o)}function be(e){return function(){var t=this,r=arguments;return new Promise((function(n,o){var i=e.apply(t,r);function a(e){ve(i,n,o,a,c,"next",e)}function c(e){ve(i,n,o,a,c,"throw",e)}a(void 0)}))}}function ge(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var r=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=r){var n,o,i,a,c=[],l=!0,u=!1;try{if(i=(r=r.call(e)).next,0===t){if(Object(r)!==r)return;l=!1}else for(;!(l=(n=i.call(r)).done)&&(c.push(n.value),c.length!==t);l=!0);}catch(e){u=!0,o=e}finally{try{if(!l&&null!=r.return&&(a=r.return(),Object(a)!==a))return}finally{if(u)throw o}}return c}}(e,t)||function(e,t){if(e){if("string"==typeof e)return we(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?we(e,t):void 0}}(e,t)||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 we(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}var xe={active:"flaticon--bell-active",inactive:"flaticon--bell"},Ee=function e(t){var r=t.targetUsername,n=t.className,o=t.isShown,i=t.text,a=t.theme,c=void 0===a?"light":a,l=t.gluePopups,u=t.id,s=ge((0,h.useState)(o),2),f=s[0],p=s[1],d=(0,h.useState)((function(){return function(e){var t=LJ.Misc.NotifSubs.getUserSubs(e,"newEntry");return[{event:"newEntry",method:"notifCenter",description:LJ.ml("notif_dropdown_2022.notify.in.notif.center"),isActive:null==t?void 0:t.includes("notifCenter"),requestTimeout:null},{event:"newEntry",method:"email",description:LJ.ml("notif_dropdown_2022.notify.in.email"),isActive:null==t?void 0:t.includes("email"),requestTimeout:null}]}(r)})),m=ge(d,2),y=m[0],v=m[1],b=ge((0,h.useState)(null),2),g=b[0],w=b[1],x=ge((0,h.useState)(!1),2),E=x[0],S=x[1],j=ge((0,h.useState)(!1),2),O=j[0],L=j[1],_=(0,h.useRef)(u||"".concat(e.name,":").concat(+new Date)),k=function(){L(!1)},C=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};S(!1);var t={type:"error",body:e.message||LJ.ml("common.something_went_wrong")};LJ.Messages.add(t)};if((0,h.useEffect)((function(){E&&k()}),[E]),(0,h.useEffect)((function(){var e=function(e){var t=e.value;if(e.source!==_.current){var r=y.map((function(e){return"newEntry"!==e.event?e:he(he({},e),{},{isActive:t.includes(e.method)})}));v(r)}};return LJ.Event.on("NotifSubs/".concat(r,"/newEntry/changed"),e),function(){LJ.Event.off("NotifSubs/".concat(r,"/newEntry/changed"),e)}}),[y,r]),(0,h.useEffect)((function(){return LJ.Event.on("NotifSubBtn2022.requestShow",(function(){p(!0)})),LJ.Event.on("NotifSubBtn2022.requestHide",(function(){p(!1)})),function(){LJ.Event.off("NotifSubBtn2022.requestShow"),LJ.Event.off("NotifSubBtn2022.requestHide")}}),[]),(0,h.useEffect)((function(){var e=function(){S(!1)};return LJ.Event.on("controlstrip::dropdownHideRequest",e),LJ.Event.on("notificationCenter::dropdownHideRequest",e),function(){LJ.Event.off("controlstrip::dropdownHideRequest",e),LJ.Event.off("notificationCenter::dropdownHideRequest",e)}}),[]),(0,h.useEffect)((function(){var e=function(){(arguments.length>0&&void 0!==arguments[0]?arguments[0]:{}).compId===_.current&&L(!0)};return LJ.Event.on("NotifSubBtn2022.notifTip.requestShow",e),function(){LJ.Event.off("NotifSubBtn2022.notifTip.requestShow",e)}}),[]),!f)return null;var P=y.some((function(e){return e.isActive})),N=xe[P?"active":"inactive"];return h.createElement(Z.N,{value:c},h.createElement("button",{type:"button",ref:function(e){w(e)},onClick:function(){S((function(e){return!e}))},className:(0,W._)(["notification-button",n])},h.createElement("svg",{className:(0,W._)(["svgicon","flaticon",N])},h.createElement("use",{xlinkHref:"#".concat(N)})),i&&h.createElement("span",null,i)),g&&E&&h.createElement(le,{subscriptions:y,onSubscriptionChange:function(e){var t=e.event,n=e.method,o=e.isActive,i=y.find((function(e){return e.event===t&&e.method===n})),a=i.requestTimeout;a&&clearTimeout(a);var c=setTimeout(be(ye().mark((function e(){var i;return ye().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return i=o?LJ.Misc.NotifSubs.requestSubNotifAdd:LJ.Misc.NotifSubs.requestSubNotifDelete,e.prev=1,e.next=4,i(t,n,r,{source:_.current});case 4:e.next=9;break;case 6:e.prev=6,e.t0=e.catch(1),C();case 9:case"end":return e.stop()}}),e,null,[[1,6]])}))),500),l=y.map((function(e){return e===i?he(he({},i),{},{isActive:o,requestTimeout:c}):e}));v(l)},onClose:function(){S(!1)},isGlued:l,targetNode:g,targetUsername:r}),g&&O&&h.createElement(pe,{onClose:k,isGlued:l,targetNode:g}))};function Se(e){return Se="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Se(e)}function je(){je=function(){return t};var e,t={},r=Object.prototype,n=r.hasOwnProperty,o=Object.defineProperty||function(e,t,r){e[t]=r.value},i="function"==typeof Symbol?Symbol:{},a=i.iterator||"@@iterator",c=i.asyncIterator||"@@asyncIterator",l=i.toStringTag||"@@toStringTag";function u(e,t,r){return Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{u({},"")}catch(e){u=function(e,t,r){return e[t]=r}}function s(e,t,r,n){var i=t&&t.prototype instanceof v?t:v,a=Object.create(i.prototype),c=new P(n||[]);return o(a,"_invoke",{value:L(e,r,c)}),a}function f(e,t,r){try{return{type:"normal",arg:e.call(t,r)}}catch(e){return{type:"throw",arg:e}}}t.wrap=s;var p="suspendedStart",d="suspendedYield",m="executing",h="completed",y={};function v(){}function b(){}function g(){}var w={};u(w,a,(function(){return this}));var x=Object.getPrototypeOf,E=x&&x(x(N([])));E&&E!==r&&n.call(E,a)&&(w=E);var S=g.prototype=v.prototype=Object.create(w);function j(e){["next","throw","return"].forEach((function(t){u(e,t,(function(e){return this._invoke(t,e)}))}))}function O(e,t){function r(o,i,a,c){var l=f(e[o],e,i);if("throw"!==l.type){var u=l.arg,s=u.value;return s&&"object"==Se(s)&&n.call(s,"__await")?t.resolve(s.__await).then((function(e){r("next",e,a,c)}),(function(e){r("throw",e,a,c)})):t.resolve(s).then((function(e){u.value=e,a(u)}),(function(e){return r("throw",e,a,c)}))}c(l.arg)}var i;o(this,"_invoke",{value:function(e,n){function o(){return new t((function(t,o){r(e,n,t,o)}))}return i=i?i.then(o,o):o()}})}function L(t,r,n){var o=p;return function(i,a){if(o===m)throw new Error("Generator is already running");if(o===h){if("throw"===i)throw a;return{value:e,done:!0}}for(n.method=i,n.arg=a;;){var c=n.delegate;if(c){var l=_(c,n);if(l){if(l===y)continue;return l}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(o===p)throw o=h,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);o=m;var u=f(t,r,n);if("normal"===u.type){if(o=n.done?h:d,u.arg===y)continue;return{value:u.arg,done:n.done}}"throw"===u.type&&(o=h,n.method="throw",n.arg=u.arg)}}}function _(t,r){var n=r.method,o=t.iterator[n];if(o===e)return r.delegate=null,"throw"===n&&t.iterator.return&&(r.method="return",r.arg=e,_(t,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),y;var i=f(o,t.iterator,r.arg);if("throw"===i.type)return r.method="throw",r.arg=i.arg,r.delegate=null,y;var a=i.arg;return a?a.done?(r[t.resultName]=a.value,r.next=t.nextLoc,"return"!==r.method&&(r.method="next",r.arg=e),r.delegate=null,y):a:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,y)}function k(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function C(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function P(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(k,this),this.reset(!0)}function N(t){if(t||""===t){var r=t[a];if(r)return r.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var o=-1,i=function r(){for(;++o<t.length;)if(n.call(t,o))return r.value=t[o],r.done=!1,r;return r.value=e,r.done=!0,r};return i.next=i}}throw new TypeError(Se(t)+" is not iterable")}return b.prototype=g,o(S,"constructor",{value:g,configurable:!0}),o(g,"constructor",{value:b,configurable:!0}),b.displayName=u(g,l,"GeneratorFunction"),t.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===b||"GeneratorFunction"===(t.displayName||t.name))},t.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,g):(e.__proto__=g,u(e,l,"GeneratorFunction")),e.prototype=Object.create(S),e},t.awrap=function(e){return{__await:e}},j(O.prototype),u(O.prototype,c,(function(){return this})),t.AsyncIterator=O,t.async=function(e,r,n,o,i){void 0===i&&(i=Promise);var a=new O(s(e,r,n,o),i);return t.isGeneratorFunction(r)?a:a.next().then((function(e){return e.done?e.value:a.next()}))},j(S),u(S,l,"Generator"),u(S,a,(function(){return this})),u(S,"toString",(function(){return"[object Generator]"})),t.keys=function(e){var t=Object(e),r=[];for(var n in t)r.push(n);return r.reverse(),function e(){for(;r.length;){var n=r.pop();if(n in t)return e.value=n,e.done=!1,e}return e.done=!0,e}},t.values=N,P.prototype={constructor:P,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=e,this.done=!1,this.delegate=null,this.method="next",this.arg=e,this.tryEntries.forEach(C),!t)for(var r in this)"t"===r.charAt(0)&&n.call(this,r)&&!isNaN(+r.slice(1))&&(this[r]=e)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var r=this;function o(n,o){return c.type="throw",c.arg=t,r.next=n,o&&(r.method="next",r.arg=e),!!o}for(var i=this.tryEntries.length-1;i>=0;--i){var a=this.tryEntries[i],c=a.completion;if("root"===a.tryLoc)return o("end");if(a.tryLoc<=this.prev){var l=n.call(a,"catchLoc"),u=n.call(a,"finallyLoc");if(l&&u){if(this.prev<a.catchLoc)return o(a.catchLoc,!0);if(this.prev<a.finallyLoc)return o(a.finallyLoc)}else if(l){if(this.prev<a.catchLoc)return o(a.catchLoc,!0)}else{if(!u)throw new Error("try statement without catch or finally");if(this.prev<a.finallyLoc)return o(a.finallyLoc)}}}},abrupt:function(e,t){for(var r=this.tryEntries.length-1;r>=0;--r){var o=this.tryEntries[r];if(o.tryLoc<=this.prev&&n.call(o,"finallyLoc")&&this.prev<o.finallyLoc){var i=o;break}}i&&("break"===e||"continue"===e)&&i.tryLoc<=t&&t<=i.finallyLoc&&(i=null);var a=i?i.completion:{};return a.type=e,a.arg=t,i?(this.method="next",this.next=i.finallyLoc,y):this.complete(a)},complete:function(e,t){if("throw"===e.type)throw e.arg;return"break"===e.type||"continue"===e.type?this.next=e.arg:"return"===e.type?(this.rval=this.arg=e.arg,this.method="return",this.next="end"):"normal"===e.type&&t&&(this.next=t),y},finish:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.finallyLoc===e)return this.complete(r.completion,r.afterLoc),C(r),y}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.tryLoc===e){var n=r.completion;if("throw"===n.type){var o=n.arg;C(r)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(t,r,n){return this.delegate={iterator:N(t),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=e),y}},t}function Oe(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function Le(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?Oe(Object(r),!0).forEach((function(t){var n,o,i;n=e,o=t,i=r[t],(o=function(e){var t=function(e){if("object"!==Se(e)||null===e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var r=t.call(e,"string");if("object"!==Se(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"===Se(t)?t:String(t)}(o))in n?Object.defineProperty(n,o,{value:i,enumerable:!0,configurable:!0,writable:!0}):n[o]=i})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Oe(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}function _e(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function ke(e,t,r,n,o,i,a){try{var c=e[i](a),l=c.value}catch(e){return void r(e)}c.done?t(l):Promise.resolve(l).then(n,o)}var Ce=!1,Pe=null,Ne=function(e){var t=LJ.Misc.NotifSubs.getUserSubs(e),r=[];return null!=t&&t.newEntry||r.push(LJ.Misc.NotifSubs.fetchUserSubs({event:"newEntry",username:e})),Promise.all(r)},Ae=function(e){LJ.Event.on("UserRelations/".concat(e,"/changed"),(function(e){var t=e.isInSubscriptionList,r=e.isInFriendList;t||r?LJ.Event.trigger("NotifSubBtn2022.requestShow"):LJ.Event.trigger("NotifSubBtn2022.requestHide")})),Ce=!0},Ie=function(){var e,t=(e=je().mark((function e(t,r){var n,o,i,a,c,l,u,s,f;return je().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(a=Site.journal.username,c=null===(n=LJ.UserRelations)||void 0===n||null===(o=n.getUserRelations)||void 0===o?void 0:o.call(n,a),t&&a&&c){e.next=4;break}return e.abrupt("return");case 4:return Pe||(Pe=Ne(a)),e.next=7,Pe;case 7:l=c.isInSubscriptionList,u=c.isInFriendList,s=document.createElement("div"),(i=s.classList).add.apply(i,function(e){if(Array.isArray(e))return _e(e)}(p=t.classList)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(p)||function(e,t){if(e){if("string"==typeof e)return _e(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?_e(e,t):void 0}}(p)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()),f=Le({targetUsername:a,isShown:!(!l&&!u),text:t.dataset.text,theme:t.dataset.theme,gluePopups:t.dataset.hasOwnProperty("gluePopups"),className:t.dataset.className||"",id:t.getAttribute("id")},r),t.replaceWith(s),(0,y.H)(s).render(h.createElement(Ee,f)),Ce||Ae(a);case 15:case"end":return e.stop()}var p}),e)})),function(){var t=this,r=arguments;return new Promise((function(n,o){var i=e.apply(t,r);function a(e){ke(i,n,o,a,c,"next",e)}function c(e){ke(i,n,o,a,c,"throw",e)}a(void 0)}))});return function(e,r){return t.apply(this,arguments)}}(),Fe=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};if(Site.journal){var t=e.targetNode,r=e.initialUserData,n=e.initProps,o=void 0===n?{}:n;if(!t)throw new Error("SubscribeBtn2022:initSubscribeButton2022:targetNode is not provided");var i,a=o.targetUserData,l=void 0===a?r||((i={targetId:Site.journal.id,targetUsername:Site.journal.username,isInSubscriptionList:Site.journal.is_subscriber,isInFriendList:Site.journal.is_friend,friendGroupsData:[],isCommunity:Site.journal.is_community,isFollowerOfRemote:c,remoteIsCommunityOwner:"owner"===Site.journal.community_relation,remoteIsCommunityMember:Site.journal.is_community&&Site.journal.is_member,joinRequestPending:Site.journal.is_invite_sent&&Site.journal.is_friend,isBannedInCommunity:Site.journal.is_banned,isClosedCommunity:"closed"===Site.journal.community_membership,isSyndicated:Site.journal.is_syndicated,isNews:Site.journal.is_news}).isCommunity&&(i.isInSubscriptionList=Site.journal.is_friend),i):a,u={id:t.getAttribute("id")};t.closest(".js--controlstrip")&&(u.theme="dark",u.gluePopups=!0),t.removeAttribute("id"),t.classList.remove("lightbutton","lightbutton--blue"),Y.Y({targetNode:t,initProps:{targetUserData:l,customProps:u}})}},De=r(52464),Te=(g.default.div.withConfig({displayName:"SuccessMsgPadder",componentId:"sc-152dpkr-0"})(["margin:200px auto;text-align:center;"]),g.default.div.withConfig({displayName:"SuccessMsgIcon",componentId:"sc-152dpkr-1"})(["font-size:30px;margin-bottom:25px;"]),(0,g.default)(De.c).withConfig({displayName:"LjUser",componentId:"sc-152dpkr-2"})(["font-weight:inherit !important;text-transform:inherit !important;"])),Me=g.default.p.withConfig({displayName:"AboveInputHint",componentId:"sc-152dpkr-3"})(["margin:0px 4px 16px 0px;","{margin-left:4px !important;}"],Te),Je=g.default.textarea.withConfig({displayName:"Input",componentId:"sc-152dpkr-4"})(['margin:0px 0px 16px;padding:12px 16px;min-height:100px;font:400 16px/1.2 "ProximaNova",Helvetica,sans-serif;background:#F5F7F8;border-radius:2px;resize:none;']),Ue=g.default.div.withConfig({displayName:"BtnWrap",componentId:"sc-152dpkr-5"})(["display:flex;justify-content:right;align-items:center;"]),Re=(g.default.a.withConfig({displayName:"CancelButton",componentId:"sc-152dpkr-6"})(["margin-right:20px;font-weight:600;font-size:13px;line-height:16px;"]),g.default.div.withConfig({displayName:"ErrorMessage",componentId:"sc-152dpkr-7"})(["padding:0 8px 8px;font-size:12px;text-align:end;color:#CB1427;"]));function Be(e){return Be="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Be(e)}function Ge(){Ge=function(){return t};var e,t={},r=Object.prototype,n=r.hasOwnProperty,o=Object.defineProperty||function(e,t,r){e[t]=r.value},i="function"==typeof Symbol?Symbol:{},a=i.iterator||"@@iterator",c=i.asyncIterator||"@@asyncIterator",l=i.toStringTag||"@@toStringTag";function u(e,t,r){return Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{u({},"")}catch(e){u=function(e,t,r){return e[t]=r}}function s(e,t,r,n){var i=t&&t.prototype instanceof v?t:v,a=Object.create(i.prototype),c=new P(n||[]);return o(a,"_invoke",{value:L(e,r,c)}),a}function f(e,t,r){try{return{type:"normal",arg:e.call(t,r)}}catch(e){return{type:"throw",arg:e}}}t.wrap=s;var p="suspendedStart",d="suspendedYield",m="executing",h="completed",y={};function v(){}function b(){}function g(){}var w={};u(w,a,(function(){return this}));var x=Object.getPrototypeOf,E=x&&x(x(N([])));E&&E!==r&&n.call(E,a)&&(w=E);var S=g.prototype=v.prototype=Object.create(w);function j(e){["next","throw","return"].forEach((function(t){u(e,t,(function(e){return this._invoke(t,e)}))}))}function O(e,t){function r(o,i,a,c){var l=f(e[o],e,i);if("throw"!==l.type){var u=l.arg,s=u.value;return s&&"object"==Be(s)&&n.call(s,"__await")?t.resolve(s.__await).then((function(e){r("next",e,a,c)}),(function(e){r("throw",e,a,c)})):t.resolve(s).then((function(e){u.value=e,a(u)}),(function(e){return r("throw",e,a,c)}))}c(l.arg)}var i;o(this,"_invoke",{value:function(e,n){function o(){return new t((function(t,o){r(e,n,t,o)}))}return i=i?i.then(o,o):o()}})}function L(t,r,n){var o=p;return function(i,a){if(o===m)throw new Error("Generator is already running");if(o===h){if("throw"===i)throw a;return{value:e,done:!0}}for(n.method=i,n.arg=a;;){var c=n.delegate;if(c){var l=_(c,n);if(l){if(l===y)continue;return l}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(o===p)throw o=h,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);o=m;var u=f(t,r,n);if("normal"===u.type){if(o=n.done?h:d,u.arg===y)continue;return{value:u.arg,done:n.done}}"throw"===u.type&&(o=h,n.method="throw",n.arg=u.arg)}}}function _(t,r){var n=r.method,o=t.iterator[n];if(o===e)return r.delegate=null,"throw"===n&&t.iterator.return&&(r.method="return",r.arg=e,_(t,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),y;var i=f(o,t.iterator,r.arg);if("throw"===i.type)return r.method="throw",r.arg=i.arg,r.delegate=null,y;var a=i.arg;return a?a.done?(r[t.resultName]=a.value,r.next=t.nextLoc,"return"!==r.method&&(r.method="next",r.arg=e),r.delegate=null,y):a:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,y)}function k(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function C(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function P(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(k,this),this.reset(!0)}function N(t){if(t||""===t){var r=t[a];if(r)return r.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var o=-1,i=function r(){for(;++o<t.length;)if(n.call(t,o))return r.value=t[o],r.done=!1,r;return r.value=e,r.done=!0,r};return i.next=i}}throw new TypeError(Be(t)+" is not iterable")}return b.prototype=g,o(S,"constructor",{value:g,configurable:!0}),o(g,"constructor",{value:b,configurable:!0}),b.displayName=u(g,l,"GeneratorFunction"),t.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===b||"GeneratorFunction"===(t.displayName||t.name))},t.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,g):(e.__proto__=g,u(e,l,"GeneratorFunction")),e.prototype=Object.create(S),e},t.awrap=function(e){return{__await:e}},j(O.prototype),u(O.prototype,c,(function(){return this})),t.AsyncIterator=O,t.async=function(e,r,n,o,i){void 0===i&&(i=Promise);var a=new O(s(e,r,n,o),i);return t.isGeneratorFunction(r)?a:a.next().then((function(e){return e.done?e.value:a.next()}))},j(S),u(S,l,"Generator"),u(S,a,(function(){return this})),u(S,"toString",(function(){return"[object Generator]"})),t.keys=function(e){var t=Object(e),r=[];for(var n in t)r.push(n);return r.reverse(),function e(){for(;r.length;){var n=r.pop();if(n in t)return e.value=n,e.done=!1,e}return e.done=!0,e}},t.values=N,P.prototype={constructor:P,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=e,this.done=!1,this.delegate=null,this.method="next",this.arg=e,this.tryEntries.forEach(C),!t)for(var r in this)"t"===r.charAt(0)&&n.call(this,r)&&!isNaN(+r.slice(1))&&(this[r]=e)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var r=this;function o(n,o){return c.type="throw",c.arg=t,r.next=n,o&&(r.method="next",r.arg=e),!!o}for(var i=this.tryEntries.length-1;i>=0;--i){var a=this.tryEntries[i],c=a.completion;if("root"===a.tryLoc)return o("end");if(a.tryLoc<=this.prev){var l=n.call(a,"catchLoc"),u=n.call(a,"finallyLoc");if(l&&u){if(this.prev<a.catchLoc)return o(a.catchLoc,!0);if(this.prev<a.finallyLoc)return o(a.finallyLoc)}else if(l){if(this.prev<a.catchLoc)return o(a.catchLoc,!0)}else{if(!u)throw new Error("try statement without catch or finally");if(this.prev<a.finallyLoc)return o(a.finallyLoc)}}}},abrupt:function(e,t){for(var r=this.tryEntries.length-1;r>=0;--r){var o=this.tryEntries[r];if(o.tryLoc<=this.prev&&n.call(o,"finallyLoc")&&this.prev<o.finallyLoc){var i=o;break}}i&&("break"===e||"continue"===e)&&i.tryLoc<=t&&t<=i.finallyLoc&&(i=null);var a=i?i.completion:{};return a.type=e,a.arg=t,i?(this.method="next",this.next=i.finallyLoc,y):this.complete(a)},complete:function(e,t){if("throw"===e.type)throw e.arg;return"break"===e.type||"continue"===e.type?this.next=e.arg:"return"===e.type?(this.rval=this.arg=e.arg,this.method="return",this.next="end"):"normal"===e.type&&t&&(this.next=t),y},finish:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.finallyLoc===e)return this.complete(r.completion,r.afterLoc),C(r),y}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.tryLoc===e){var n=r.completion;if("throw"===n.type){var o=n.arg;C(r)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(t,r,n){return this.delegate={iterator:N(t),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=e),y}},t}function ze(e,t,r,n,o,i,a){try{var c=e[i](a),l=c.value}catch(e){return void r(e)}c.done?t(l):Promise.resolve(l).then(n,o)}function $e(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function qe(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?$e(Object(r),!0).forEach((function(t){var n,o,i;n=e,o=t,i=r[t],(o=function(e){var t=function(e){if("object"!==Be(e)||null===e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var r=t.call(e,"string");if("object"!==Be(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"===Be(t)?t:String(t)}(o))in n?Object.defineProperty(n,o,{value:i,enumerable:!0,configurable:!0,writable:!0}):n[o]=i})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):$e(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}function He(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}var Ye={error:null,message:"",isFetchMessage:!1};function We(e){var t,r,n=e.isShown,o=e.afterSubmitCb,i=void 0===o?function(){}:o,a=e.handleCloseModal,c=void 0===a?function(){}:a,l=(t=(0,h.useState)(Ye),r=2,function(e){if(Array.isArray(e))return e}(t)||function(e,t){var r=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=r){var n,o,i,a,c=[],l=!0,u=!1;try{if(i=(r=r.call(e)).next,0===t){if(Object(r)!==r)return;l=!1}else for(;!(l=(n=i.call(r)).done)&&(c.push(n.value),c.length!==t);l=!0);}catch(e){u=!0,o=e}finally{try{if(!l&&null!=r.return&&(a=r.return(),Object(a)!==a))return}finally{if(u)throw o}}return c}}(t,r)||function(e,t){if(e){if("string"==typeof e)return He(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?He(e,t):void 0}}(t,r)||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.")}()),u=l[0],s=l[1],f=(0,h.useRef)(null),p=u.message,d=(0,h.useCallback)((function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};s((function(t){return qe(qe({},t),e)}))}),[]),m=(0,h.useCallback)((function(){d(Ye)}),[d]);(0,h.useEffect)((function(){n||m(),n&&f.current&&f.current.focus()}),[n,m]);var y=function(){var e,t=(e=Ge().mark((function e(){var t,r;return Ge().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(p){e.next=2;break}return e.abrupt("return");case 2:return d({isFetchMessage:!0,error:null}),e.prev=3,e.next=6,LJ.Api.callP("inbox.send_message",{recipients:Site.journal.username,body:p});case 6:m(),d({isFetchMessage:!1}),i(),t={type:"success",body:LJ.ml("send_message_form.successfully_sent")},LJ.Messages.add(t),setTimeout((function(){LJ.Messages.fadeOut(t)}),3e3),e.next=17;break;case 14:e.prev=14,e.t0=e.catch(3),d({isFetchMessage:!1,error:Array.isArray(e.t0.data)&&null!==(r=e.t0.data[0])&&void 0!==r&&r.error?e.t0.data[0].error:e.t0.message});case 17:case"end":return e.stop()}}),e,null,[[3,14]])})),function(){var t=this,r=arguments;return new Promise((function(n,o){var i=e.apply(t,r);function a(e){ze(i,n,o,a,c,"next",e)}function c(e){ze(i,n,o,a,c,"throw",e)}a(void 0)}))});return function(){return t.apply(this,arguments)}}();if(!n)return null;var v=h.createElement(h.Fragment,null,h.createElement(Me,null,LJ.ml("send_message_form.send_to_user"),h.createElement(Te,{userData:{username:Site.journal.display_username,userheadUrl:Site.journal.userhead_url,displayUsername:Site.journal.display_username,profileUrl:Site.journal.profile_url,journalUrl:Site.journal.journal_url}})),h.createElement(Je,{value:p,className:"lightinput",placeholder:LJ.ml("send_message_form.placeholder"),onChange:function(e){d({message:e.target.value})},onKeyDown:function(e){"Enter"===e.key&&e.ctrlKey&&y()},ref:f}),u.error&&h.createElement(Re,{dangerouslySetInnerHTML:{__html:u.error}})),g=h.createElement(Ue,null,h.createElement(b.A,{sizeL:!0,primary:!0,type:"button",onClick:y,disabled:!u.message.length,isLoading:u.isFetchMessage},LJ.ml("send_message_form.submit")));return h.createElement(w.Ay,{title:LJ.ml("send_message_form.title"),onClose:c,footer:g},v)}function Ze(e){return Ze="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Ze(e)}function Ve(){Ve=function(){return t};var e,t={},r=Object.prototype,n=r.hasOwnProperty,o=Object.defineProperty||function(e,t,r){e[t]=r.value},i="function"==typeof Symbol?Symbol:{},a=i.iterator||"@@iterator",c=i.asyncIterator||"@@asyncIterator",l=i.toStringTag||"@@toStringTag";function u(e,t,r){return Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{u({},"")}catch(e){u=function(e,t,r){return e[t]=r}}function s(e,t,r,n){var i=t&&t.prototype instanceof v?t:v,a=Object.create(i.prototype),c=new P(n||[]);return o(a,"_invoke",{value:L(e,r,c)}),a}function f(e,t,r){try{return{type:"normal",arg:e.call(t,r)}}catch(e){return{type:"throw",arg:e}}}t.wrap=s;var p="suspendedStart",d="suspendedYield",m="executing",h="completed",y={};function v(){}function b(){}function g(){}var w={};u(w,a,(function(){return this}));var x=Object.getPrototypeOf,E=x&&x(x(N([])));E&&E!==r&&n.call(E,a)&&(w=E);var S=g.prototype=v.prototype=Object.create(w);function j(e){["next","throw","return"].forEach((function(t){u(e,t,(function(e){return this._invoke(t,e)}))}))}function O(e,t){function r(o,i,a,c){var l=f(e[o],e,i);if("throw"!==l.type){var u=l.arg,s=u.value;return s&&"object"==Ze(s)&&n.call(s,"__await")?t.resolve(s.__await).then((function(e){r("next",e,a,c)}),(function(e){r("throw",e,a,c)})):t.resolve(s).then((function(e){u.value=e,a(u)}),(function(e){return r("throw",e,a,c)}))}c(l.arg)}var i;o(this,"_invoke",{value:function(e,n){function o(){return new t((function(t,o){r(e,n,t,o)}))}return i=i?i.then(o,o):o()}})}function L(t,r,n){var o=p;return function(i,a){if(o===m)throw new Error("Generator is already running");if(o===h){if("throw"===i)throw a;return{value:e,done:!0}}for(n.method=i,n.arg=a;;){var c=n.delegate;if(c){var l=_(c,n);if(l){if(l===y)continue;return l}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(o===p)throw o=h,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);o=m;var u=f(t,r,n);if("normal"===u.type){if(o=n.done?h:d,u.arg===y)continue;return{value:u.arg,done:n.done}}"throw"===u.type&&(o=h,n.method="throw",n.arg=u.arg)}}}function _(t,r){var n=r.method,o=t.iterator[n];if(o===e)return r.delegate=null,"throw"===n&&t.iterator.return&&(r.method="return",r.arg=e,_(t,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),y;var i=f(o,t.iterator,r.arg);if("throw"===i.type)return r.method="throw",r.arg=i.arg,r.delegate=null,y;var a=i.arg;return a?a.done?(r[t.resultName]=a.value,r.next=t.nextLoc,"return"!==r.method&&(r.method="next",r.arg=e),r.delegate=null,y):a:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,y)}function k(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function C(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function P(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(k,this),this.reset(!0)}function N(t){if(t||""===t){var r=t[a];if(r)return r.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var o=-1,i=function r(){for(;++o<t.length;)if(n.call(t,o))return r.value=t[o],r.done=!1,r;return r.value=e,r.done=!0,r};return i.next=i}}throw new TypeError(Ze(t)+" is not iterable")}return b.prototype=g,o(S,"constructor",{value:g,configurable:!0}),o(g,"constructor",{value:b,configurable:!0}),b.displayName=u(g,l,"GeneratorFunction"),t.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===b||"GeneratorFunction"===(t.displayName||t.name))},t.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,g):(e.__proto__=g,u(e,l,"GeneratorFunction")),e.prototype=Object.create(S),e},t.awrap=function(e){return{__await:e}},j(O.prototype),u(O.prototype,c,(function(){return this})),t.AsyncIterator=O,t.async=function(e,r,n,o,i){void 0===i&&(i=Promise);var a=new O(s(e,r,n,o),i);return t.isGeneratorFunction(r)?a:a.next().then((function(e){return e.done?e.value:a.next()}))},j(S),u(S,l,"Generator"),u(S,a,(function(){return this})),u(S,"toString",(function(){return"[object Generator]"})),t.keys=function(e){var t=Object(e),r=[];for(var n in t)r.push(n);return r.reverse(),function e(){for(;r.length;){var n=r.pop();if(n in t)return e.value=n,e.done=!1,e}return e.done=!0,e}},t.values=N,P.prototype={constructor:P,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=e,this.done=!1,this.delegate=null,this.method="next",this.arg=e,this.tryEntries.forEach(C),!t)for(var r in this)"t"===r.charAt(0)&&n.call(this,r)&&!isNaN(+r.slice(1))&&(this[r]=e)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var r=this;function o(n,o){return c.type="throw",c.arg=t,r.next=n,o&&(r.method="next",r.arg=e),!!o}for(var i=this.tryEntries.length-1;i>=0;--i){var a=this.tryEntries[i],c=a.completion;if("root"===a.tryLoc)return o("end");if(a.tryLoc<=this.prev){var l=n.call(a,"catchLoc"),u=n.call(a,"finallyLoc");if(l&&u){if(this.prev<a.catchLoc)return o(a.catchLoc,!0);if(this.prev<a.finallyLoc)return o(a.finallyLoc)}else if(l){if(this.prev<a.catchLoc)return o(a.catchLoc,!0)}else{if(!u)throw new Error("try statement without catch or finally");if(this.prev<a.finallyLoc)return o(a.finallyLoc)}}}},abrupt:function(e,t){for(var r=this.tryEntries.length-1;r>=0;--r){var o=this.tryEntries[r];if(o.tryLoc<=this.prev&&n.call(o,"finallyLoc")&&this.prev<o.finallyLoc){var i=o;break}}i&&("break"===e||"continue"===e)&&i.tryLoc<=t&&t<=i.finallyLoc&&(i=null);var a=i?i.completion:{};return a.type=e,a.arg=t,i?(this.method="next",this.next=i.finallyLoc,y):this.complete(a)},complete:function(e,t){if("throw"===e.type)throw e.arg;return"break"===e.type||"continue"===e.type?this.next=e.arg:"return"===e.type?(this.rval=this.arg=e.arg,this.method="return",this.next="end"):"normal"===e.type&&t&&(this.next=t),y},finish:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.finallyLoc===e)return this.complete(r.completion,r.afterLoc),C(r),y}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.tryLoc===e){var n=r.completion;if("throw"===n.type){var o=n.arg;C(r)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(t,r,n){return this.delegate={iterator:N(t),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=e),y}},t}function Xe(e,t,r,n,o,i,a){try{var c=e[i](a),l=c.value}catch(e){return void r(e)}c.done?t(l):Promise.resolve(l).then(n,o)}var Ke=function(){var e,t=(e=Ve().mark((function e(){var t,r,n,o,i;return Ve().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,LJ.Util.DOM.initPromise;case 2:t=document.querySelector(".js--send-message-btn"),r=document.createElement("div"),document.body.appendChild(r),n={},o=(0,y.H)(r),i=function(){o.render(h.createElement(We,n))},n={isShown:!1,afterSubmitCb:function(){n.isShown=!1,i()},handleCloseModal:function(){n.isShown=!1,i()}},t&&t.addEventListener("click",(function(e){e.preventDefault(),n.isShown=!0,i()}));case 10:case"end":return e.stop()}}),e)})),function(){var t=this,r=arguments;return new Promise((function(n,o){var i=e.apply(t,r);function a(e){Xe(i,n,o,a,c,"next",e)}function c(e){Xe(i,n,o,a,c,"throw",e)}a(void 0)}))});return function(){return t.apply(this,arguments)}}();function Qe(e){return Qe="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Qe(e)}function et(){et=function(){return t};var e,t={},r=Object.prototype,n=r.hasOwnProperty,o=Object.defineProperty||function(e,t,r){e[t]=r.value},i="function"==typeof Symbol?Symbol:{},a=i.iterator||"@@iterator",c=i.asyncIterator||"@@asyncIterator",l=i.toStringTag||"@@toStringTag";function u(e,t,r){return Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{u({},"")}catch(e){u=function(e,t,r){return e[t]=r}}function s(e,t,r,n){var i=t&&t.prototype instanceof v?t:v,a=Object.create(i.prototype),c=new P(n||[]);return o(a,"_invoke",{value:L(e,r,c)}),a}function f(e,t,r){try{return{type:"normal",arg:e.call(t,r)}}catch(e){return{type:"throw",arg:e}}}t.wrap=s;var p="suspendedStart",d="suspendedYield",m="executing",h="completed",y={};function v(){}function b(){}function g(){}var w={};u(w,a,(function(){return this}));var x=Object.getPrototypeOf,E=x&&x(x(N([])));E&&E!==r&&n.call(E,a)&&(w=E);var S=g.prototype=v.prototype=Object.create(w);function j(e){["next","throw","return"].forEach((function(t){u(e,t,(function(e){return this._invoke(t,e)}))}))}function O(e,t){function r(o,i,a,c){var l=f(e[o],e,i);if("throw"!==l.type){var u=l.arg,s=u.value;return s&&"object"==Qe(s)&&n.call(s,"__await")?t.resolve(s.__await).then((function(e){r("next",e,a,c)}),(function(e){r("throw",e,a,c)})):t.resolve(s).then((function(e){u.value=e,a(u)}),(function(e){return r("throw",e,a,c)}))}c(l.arg)}var i;o(this,"_invoke",{value:function(e,n){function o(){return new t((function(t,o){r(e,n,t,o)}))}return i=i?i.then(o,o):o()}})}function L(t,r,n){var o=p;return function(i,a){if(o===m)throw new Error("Generator is already running");if(o===h){if("throw"===i)throw a;return{value:e,done:!0}}for(n.method=i,n.arg=a;;){var c=n.delegate;if(c){var l=_(c,n);if(l){if(l===y)continue;return l}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(o===p)throw o=h,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);o=m;var u=f(t,r,n);if("normal"===u.type){if(o=n.done?h:d,u.arg===y)continue;return{value:u.arg,done:n.done}}"throw"===u.type&&(o=h,n.method="throw",n.arg=u.arg)}}}function _(t,r){var n=r.method,o=t.iterator[n];if(o===e)return r.delegate=null,"throw"===n&&t.iterator.return&&(r.method="return",r.arg=e,_(t,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),y;var i=f(o,t.iterator,r.arg);if("throw"===i.type)return r.method="throw",r.arg=i.arg,r.delegate=null,y;var a=i.arg;return a?a.done?(r[t.resultName]=a.value,r.next=t.nextLoc,"return"!==r.method&&(r.method="next",r.arg=e),r.delegate=null,y):a:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,y)}function k(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function C(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function P(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(k,this),this.reset(!0)}function N(t){if(t||""===t){var r=t[a];if(r)return r.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var o=-1,i=function r(){for(;++o<t.length;)if(n.call(t,o))return r.value=t[o],r.done=!1,r;return r.value=e,r.done=!0,r};return i.next=i}}throw new TypeError(Qe(t)+" is not iterable")}return b.prototype=g,o(S,"constructor",{value:g,configurable:!0}),o(g,"constructor",{value:b,configurable:!0}),b.displayName=u(g,l,"GeneratorFunction"),t.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===b||"GeneratorFunction"===(t.displayName||t.name))},t.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,g):(e.__proto__=g,u(e,l,"GeneratorFunction")),e.prototype=Object.create(S),e},t.awrap=function(e){return{__await:e}},j(O.prototype),u(O.prototype,c,(function(){return this})),t.AsyncIterator=O,t.async=function(e,r,n,o,i){void 0===i&&(i=Promise);var a=new O(s(e,r,n,o),i);return t.isGeneratorFunction(r)?a:a.next().then((function(e){return e.done?e.value:a.next()}))},j(S),u(S,l,"Generator"),u(S,a,(function(){return this})),u(S,"toString",(function(){return"[object Generator]"})),t.keys=function(e){var t=Object(e),r=[];for(var n in t)r.push(n);return r.reverse(),function e(){for(;r.length;){var n=r.pop();if(n in t)return e.value=n,e.done=!1,e}return e.done=!0,e}},t.values=N,P.prototype={constructor:P,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=e,this.done=!1,this.delegate=null,this.method="next",this.arg=e,this.tryEntries.forEach(C),!t)for(var r in this)"t"===r.charAt(0)&&n.call(this,r)&&!isNaN(+r.slice(1))&&(this[r]=e)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var r=this;function o(n,o){return c.type="throw",c.arg=t,r.next=n,o&&(r.method="next",r.arg=e),!!o}for(var i=this.tryEntries.length-1;i>=0;--i){var a=this.tryEntries[i],c=a.completion;if("root"===a.tryLoc)return o("end");if(a.tryLoc<=this.prev){var l=n.call(a,"catchLoc"),u=n.call(a,"finallyLoc");if(l&&u){if(this.prev<a.catchLoc)return o(a.catchLoc,!0);if(this.prev<a.finallyLoc)return o(a.finallyLoc)}else if(l){if(this.prev<a.catchLoc)return o(a.catchLoc,!0)}else{if(!u)throw new Error("try statement without catch or finally");if(this.prev<a.finallyLoc)return o(a.finallyLoc)}}}},abrupt:function(e,t){for(var r=this.tryEntries.length-1;r>=0;--r){var o=this.tryEntries[r];if(o.tryLoc<=this.prev&&n.call(o,"finallyLoc")&&this.prev<o.finallyLoc){var i=o;break}}i&&("break"===e||"continue"===e)&&i.tryLoc<=t&&t<=i.finallyLoc&&(i=null);var a=i?i.completion:{};return a.type=e,a.arg=t,i?(this.method="next",this.next=i.finallyLoc,y):this.complete(a)},complete:function(e,t){if("throw"===e.type)throw e.arg;return"break"===e.type||"continue"===e.type?this.next=e.arg:"return"===e.type?(this.rval=this.arg=e.arg,this.method="return",this.next="end"):"normal"===e.type&&t&&(this.next=t),y},finish:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.finallyLoc===e)return this.complete(r.completion,r.afterLoc),C(r),y}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.tryLoc===e){var n=r.completion;if("throw"===n.type){var o=n.arg;C(r)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(t,r,n){return this.delegate={iterator:N(t),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=e),y}},t}function tt(e,t,r,n,o,i,a){try{var c=e[i](a),l=c.value}catch(e){return void r(e)}c.done?t(l):Promise.resolve(l).then(n,o)}var rt,nt=function(){var e,t=(e=et().mark((function e(){return et().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,LJ.Util.DOM.initPromise;case 2:(document.querySelectorAll(".j-user-subscribe-btn")||[]).forEach((function(e){Fe({targetNode:e})}));case 4:case"end":return e.stop()}}),e)})),function(){var t=this,r=arguments;return new Promise((function(n,o){var i=e.apply(t,r);function a(e){tt(i,n,o,a,c,"next",e)}function c(e){tt(i,n,o,a,c,"throw",e)}a(void 0)}))});return function(){return t.apply(this,arguments)}}();LJ.UserRelations.init(),LJ.Misc.NotifSubs.init(),LJ.Profile.Achievements.init(),nt(),(0,H._)(),(rt=document.querySelectorAll("[data-notif-sub-btn-mount-point]")).length&&rt.forEach(Ie),Ke(),LJ.Event.on("relations.changed",(function(e){var t=e.action,r=e.username,n=e.source,o=e.data;if("SubscribeBtn2022"===n)if(Site.journal.is_community&&Site.journal.username===r&&["subscribe","unsubscribe","leaveComm"].includes(t))window.location.reload();else if(["subscribe","addToFriends"].includes(t)){var i=o.recommendations;setTimeout((function(){LJ.Event.trigger("SubRecommendModal.requestShow",{recommendations:i})}),700)}}))},98476:(e,t,r)=>{"use strict";r.d(t,{A:()=>d});var n=r(96540),o=(r(5338),r(28081)),i=r(81834),a=r(52464),c=r(13768);function l(e){return l="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},l(e)}function u(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function s(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?u(Object(r),!0).forEach((function(t){var n,o,i;n=e,o=t,i=r[t],(o=function(e){var t=function(e){if("object"!==l(e)||null===e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var r=t.call(e,"string");if("object"!==l(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"===l(t)?t:String(t)}(o))in n?Object.defineProperty(n,o,{value:i,enumerable:!0,configurable:!0,writable:!0}):n[o]=i})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):u(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}function f(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var r=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=r){var n,o,i,a,c=[],l=!0,u=!1;try{if(i=(r=r.call(e)).next,0===t){if(Object(r)!==r)return;l=!1}else for(;!(l=(n=i.call(r)).done)&&(c.push(n.value),c.length!==t);l=!0);}catch(e){u=!0,o=e}finally{try{if(!l&&null!=r.return&&(a=r.return(),Object(a)!==a))return}finally{if(u)throw o}}return c}}(e,t)||function(e,t){if(e){if("string"==typeof e)return p(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?p(e,t):void 0}}(e,t)||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 p(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}const d=function(e){var t=e.onClose,r=void 0===t?function(){}:t,l=e.inputValue,u=e.userData,p=f((0,n.useState)(l||""),2),d=p[0],m=p[1],h=f((0,n.useState)(!1),2),y=h[0],v=h[1],b=(0,n.useRef)(null),g=function(){window.location.reload()},w=function(e){v(!1),null!=e&&e.code&&null!=e&&e.message&&LJ.Messages.error(e.message)},x=(0,n.useCallback)((function(){v(!0),LJ.Api.callP("user.alias_set",{aliases:[{id:u.id,alias:d}]}).then(g).catch(w)}),[d,u]);(0,n.useEffect)((function(){var e=function(e){13===e.which?x():27===e.which&&r()};return window.addEventListener("keydown",e),function(){window.removeEventListener("keydown",e)}}),[r,x]),(0,n.useEffect)((function(){b.current.focus()}),[]);var E=!!l,S={title:LJ.ml(E?"user_note_modal.title.edit":"user_note_modal.title.add"),description:LJ.ml(E?"user_note_modal.edit_note_for":"user_note_modal.add_note_for")},j=!!d&&d!==l;return n.createElement(i.Ay,{onClose:y?void 0:r,title:S.title,withCloseBtn:!y,footer:n.createElement(c.wi,null,n.createElement(c.KB,null,E&&n.createElement(o.A,{onClick:function(){v(!0),LJ.Api.callP("user.alias_delete",{user_ids:[u.id]}).then(g).catch(w)},disabled:y,sizeL:!0},LJ.ml("common.delete")),n.createElement(c.yY,{onClick:j?x:void 0,disabled:!j||y,isLoading:y,primary:!0,sizeL:!0},n.createElement("span",null,LJ.ml("common.save")))))},n.createElement(c.VY,null,"".concat(S.description," "),n.createElement(a.c,{userData:s(s({},u),{},{displayUsername:u.username})}),":"),n.createElement(c.pd,{onChange:function(e){m(e.currentTarget.value)},className:"lightinput lightinput--big",value:d,maxLength:400,disabled:y,ref:b}))}}},r={};function n(e){var o=r[e];if(void 0!==o)return o.exports;var i=r[e]={exports:{}};return t[e](i,i.exports,n),i.exports}n.m=t,e=[],n.O=(t,r,o,i)=>{if(!r){var a=1/0;for(s=0;s<e.length;s++){for(var[r,o,i]=e[s],c=!0,l=0;l<r.length;l++)(!1&i||a>=i)&&Object.keys(n.O).every((e=>n.O[e](r[l])))?r.splice(l--,1):(c=!1,i<a&&(a=i));if(c){e.splice(s--,1);var u=o();void 0!==u&&(t=u)}}return t}i=i||0;for(var s=e.length;s>0&&e[s-1][2]>i;s--)e[s]=e[s-1];e[s]=[r,o,i]},n.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return n.d(t,{a:t}),t},n.d=(e,t)=>{for(var r in t)n.o(t,r)&&!n.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:t[r]})},n.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),n.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},(()=>{var e={138:0,202:0};n.O.j=t=>0===e[t];var t=(t,r)=>{var o,i,[a,c,l]=r,u=0;if(a.some((t=>0!==e[t]))){for(o in c)n.o(c,o)&&(n.m[o]=c[o]);if(l)var s=l(n)}for(t&&t(r);u<a.length;u++)i=a[u],n.o(e,i)&&e[i]&&e[i][0](),e[i]=0;return n.O(s)},r=self.webpackChunkfrontend_bundled=self.webpackChunkfrontend_bundled||[];r.forEach(t.bind(null,0)),r.push=t.bind(null,r.push.bind(r))})(),n.nc=void 0;var o=n.O(void 0,[35],(()=>n(95774)));o=n.O(o)})();
/* <<< file end: js/front-bundled/dist/profile.js */

//# map link was there [profile.js.map]
