"use strict";!function(a){jQuery.sessionTimeout=function(b){function c(){i||(a.ajax({type:"POST",url:h.keepAliveUrl,data:h.ajaxData}),i=!0,setTimeout(function(){i=!1},h.keepAliveInterval))}function d(){clearTimeout(f),h.keepAlive&&c(),f=setTimeout(function(){"function"!=typeof h.onWarn?a("#sessionTimeout-dialog").modal("show"):h.onWarn("warn"),e()},h.warnAfter)}function e(){clearTimeout(f),f=setTimeout(function(){"function"!=typeof h.onRedir?(e("start"),window.location=h.redirUrl):h.onRedir()},h.redirAfter-h.warnAfter)}var f,g={message:"Your session is about to expire.",keepAliveUrl:"/keep-alive",ajaxData:"",redirUrl:"/timed-out",logoutUrl:"/log-out",warnAfter:9e5,redirAfter:12e5,keepAliveInterval:5e3,keepAlive:!0,ignoreUserActivity:!1,onWarn:!1,onRedir:!1},h=g;if(b&&(h=a.extend(g,b)),h.warnAfter>=h.redirAfter)return("undefined"!=typeof console||"undefined"!=typeof console.error)&&console.error('Bootstrap-session-timeout plugin is miss-configured. Option "redirAfter" must be equal or greater than "warnAfter".'),!1;"function"!=typeof h.onWarn&&(a("body").append('<div class="modal fade" id="sessionTimeout-dialog"><div class="modal-dialog"><div class="modal-content"><div class="modal-header"><button type="button" class="close" data-dismiss="modal" aria-hidden="true">&times;</button><h4 class="modal-title">Your Session is About to Expire!</h4></div><div class="modal-body">'+h.message+'</div><div class="modal-footer"><button id="sessionTimeout-dialog-logout" type="button" class="btn btn-default">Logout</button><button id="sessionTimeout-dialog-keepalive" type="button" class="btn btn-primary" data-dismiss="modal">Stay Connected</button></div></div></div></div>'),a("#sessionTimeout-dialog-logout").on("click",function(){window.location=h.logoutUrl}),a("#sessionTimeout-dialog").on("hide.bs.modal",function(){d()})),h.ignoreUserActivity||a(document).on("keyup mouseup mousemove touchend touchmove",function(){d()});var i=!1;d()}}(jQuery);
"use strict";(function(e){jQuery.sessionTimeout=function(t){function o(){if(!s){e.ajax({type:r.ajaxType,url:r.keepAliveUrl,data:r.ajaxData});s=true;setTimeout(function(){s=false},r.keepAliveInterval)}}function u(){clearTimeout(i);if(r.keepAlive){o()}i=setTimeout(function(){if(typeof r.onWarn!=="function"){e("#sessionTimeout-dialog").modal("show")}else{r.onWarn("warn")}a()},r.warnAfter)}function a(){clearTimeout(i);i=setTimeout(function(){if(typeof r.onRedir!=="function"){a("start");window.location=r.redirUrl}else{r.onRedir()}},r.redirAfter-r.warnAfter)}var n={title:"Your Session is About to Expire!",message:"Your session is about to expire.",logoutButton:"Logout",keepAliveButton:"Stay Connected",keepAliveUrl:"/keep-alive",ajaxType:"POST",ajaxData:"",redirUrl:"/timed-out",logoutUrl:"/log-out",warnAfter:9e5,redirAfter:12e5,keepAliveInterval:5e3,keepAlive:true,ignoreUserActivity:false,onWarn:false,onRedir:false};var r=n,i;if(t){r=e.extend(n,t)}if(r.warnAfter>=r.redirAfter){if(typeof console!=="undefined"||typeof console.error!=="undefined"){console.error('Bootstrap-session-timeout plugin is miss-configured. Option "redirAfter" must be equal or greater than "warnAfter".')}return false}if(typeof r.onWarn!=="function"){e("body").append('<div class="modal fade" id="sessionTimeout-dialog">               <div class="modal-dialog">                 <div class="modal-content">                   <div class="modal-header">                     <button type="button" class="close" data-dismiss="modal" aria-hidden="true">&times;</button>                     <h4 class="modal-title">'+r.title+'</h4>                   </div>                   <div class="modal-body">'+r.message+'</div>                   <div class="modal-footer">                     <button id="sessionTimeout-dialog-logout" type="button" class="btn btn-default">'+r.logoutButton+'</button>                     <button id="sessionTimeout-dialog-keepalive" type="button" class="btn btn-primary" data-dismiss="modal">'+r.keepAliveButton+"</button>                   </div>                 </div>               </div>              </div>");e("#sessionTimeout-dialog-logout").on("click",function(){window.location=r.logoutUrl});e("#sessionTimeout-dialog").on("hide.bs.modal",function(){u()})}if(!r.ignoreUserActivity){e(document).on("keyup mouseup mousemove touchend touchmove",function(){u()})}var s=false;u()}})(jQuery)

Update minify version