!function(e){try{var t=e("#pusher-session-id"),r=e("#status-id"),s=e("#integration-id"),n=e("#totp-token"),o=e('.twofas-login-form input[name="_wpnonce"]'),a=e(".error-modal"),i=e("#error-modal-message");function u(t){r.val(t.statusId),n.val(t.totpToken),e(".submit").addClass("pusher"),e(".sockets .token-setup").removeClass("play"),e(".sockets .token-loading").addClass("play"),this.disconnect(),setTimeout(function(){e("#loginform").submit()},1)}function c(e,r,s){var t=e.subscribe(r);t.bind("twofas-login-request",u,e),t.bind("pusher:subscription_error",function(t){!function(t,e,r,s){s<3?c(e,r,++s):(Sentry.captureMessage("Subscription error",{extra:{channel_name:r,status:t}}),e.disconnect(),i.html("Subscription error ("+t+")"),a.trigger("display"))}(t,e,r,s)})}if(t.length){var p=new Pusher(twofas.pusherKey,{encrypted:!0,authEndpoint:twofas.authEndpoint,auth:{params:{_wpnonce:o.val()}}}),l="private-wp_"+s.val()+"_"+t.val();c(p,l,1)}}catch(t){Sentry.captureException(t),i.html("Server error occurred. Please try to refresh this page."),a.trigger("display")}}(jQuery);