(function(){!function(t){var e;t.gl||(t.gl={}),(e=t.gl).utils||(e.utils={}),t.gl.utils.isInGroupsPage=function(){return"groups"===gl.utils.getPagePath()},t.gl.utils.isInProjectPage=function(){return"projects"===gl.utils.getPagePath()},t.gl.utils.getProjectSlug=function(){return this.isInProjectPage()?$("body").data("project"):null},t.gl.utils.getGroupSlug=function(){return this.isInGroupsPage()?$("body").data("group"):null},t.gl.utils.ajaxGet=function(t){return $.ajax({type:"GET",url:t,dataType:"script"})},t.gl.utils.extractLast=function(t){return this.split(t).pop()},t.gl.utils.rstrip=function(t){return t?t.replace(/\s+$/,""):t},t.gl.utils.disableButtonIfEmptyField=function(t,e,n){n=n||"input";var l,i,r;return r=this,i=$(t),l=i.closest("form").find(e),""===this.rstrip(i.val())&&l.disable(),i.on(n,function(){return""===r.rstrip($(this).val())?l.disable():l.enable()})},t.gl.utils.handleLocationHash=function(){var e=t.gl.utils.getLocationHash();if(e){var n=document.querySelector(".navbar-gitlab"),l=document.querySelector(".layout-nav"),i=document.querySelector(".js-tabs-affix"),r=0;if(n&&(r-=n.offsetHeight),l&&(r-=l.offsetHeight),null===document.getElementById(e)){var u=document.getElementById("user-content-"+e);u&&u.scrollIntoView&&(u.scrollIntoView(!0),window.scrollBy(0,r))}else i&&(r-=i.offsetHeight),window.scrollBy(0,r)}},t.gl.utils.isInViewport=function(t){var e=t.getBoundingClientRect();return e.top>=0&&e.left>=0&&e.bottom<=window.innerHeight&&e.right<=window.innerWidth},gl.utils.getPagePath=function(){return $("body").data("page").split(":")[0]},gl.utils.parseUrl=function(t){var e=document.createElement("a");return e.href=t,e},gl.utils.parseUrlPathname=function(t){var e=gl.utils.parseUrl(t);return"/"===e.pathname.charAt(0)?e.pathname:"/"+e.pathname},gl.utils.isMetaKey=function(t){return t.metaKey||t.ctrlKey||t.altKey||t.shiftKey}}(window)}).call(this);