shuoyao/BirdGo

View on GitHub
public/assets/application-b34af937661b1e622cea2d933ff65194efa8c7968c100e4a1364a2a317ea4460.js

Summary

Maintainability
F
2 mos
Test Coverage

File application-b34af937661b1e622cea2d933ff65194efa8c7968c100e4a1364a2a317ea4460.js has 7517 lines of code (exceeds 250 allowed). Consider refactoring.
Open

/*!
 * jQuery JavaScript Library v1.12.4
 * http://jquery.com/
 *
 * Includes Sizzle.js

    Function Sizzle has 1387 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

    (function( window ) {
    
    var i,
        support,
        Expr,

      Function ajax has 248 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

          ajax: function( url, options ) {
      
              // If url is an object, simulate pre-1.5 signature
              if ( typeof url === "object" ) {
                  options = url;

        Function setDocument has 218 lines of code (exceeds 25 allowed). Consider refactoring.
        Open

        setDocument = Sizzle.setDocument = function( node ) {
            var hasCompare, parent,
                doc = node ? node.ownerDocument || node : preferredDoc;
        
            // Return early if doc is invalid or already selected

          Consider simplifying this complex logical expression.
          Open

                      if ( event.pageX == null && original.clientX != null ) {
                          eventDoc = event.target.ownerDocument || document;
                          doc = eventDoc.documentElement;
                          body = eventDoc.body;
          
          

            Function Callbacks has 121 lines of code (exceeds 25 allowed). Consider refactoring.
            Open

            jQuery.Callbacks = function( options ) {
            
                // Convert options from String-formatted to Object-formatted if needed
                // (we check in cache first)
                options = typeof options === "string" ?

              Function defaultPrefilter has 105 lines of code (exceeds 25 allowed). Consider refactoring.
              Open

              function defaultPrefilter( elem, props, opts ) {
                  /* jshint validthis: true */
                  var prop, value, toggle, tween, hooks, oldfire, display, checkDisplay,
                      anim = this,
                      orig = {},

                Function trigger has 93 lines of code (exceeds 25 allowed). Consider refactoring.
                Open

                    trigger: function( event, data, elem, onlyHandlers ) {
                        var handle, ontype, cur,
                            bubbleType, special, tmp, i,
                            eventPath = [ elem || document ],
                            type = hasOwn.call( event, "type" ) ? event.type : event,

                  Function Animation has 92 lines of code (exceeds 25 allowed). Consider refactoring.
                  Open

                  function Animation( elem, properties, options ) {
                      var result,
                          stopped,
                          index = 0,
                          length = Animation.prefilters.length,

                    Function Sizzle has 81 lines of code (exceeds 25 allowed). Consider refactoring.
                    Open

                    function Sizzle( selector, context, results, seed ) {
                        var m, i, elem, nid, nidselect, match, groups, newSelector,
                            newContext = context && context.ownerDocument,
                    
                            // nodeType defaults to 9, since context defaults to document

                      Function CHILD has 80 lines of code (exceeds 25 allowed). Consider refactoring.
                      Open

                              "CHILD": function( type, what, argument, first, last ) {
                                  var simple = type.slice( 0, 3 ) !== "nth",
                                      forward = type.slice( -4 ) !== "last",
                                      ofType = what === "of-type";
                      
                      

                        Function buildFragment has 78 lines of code (exceeds 25 allowed). Consider refactoring.
                        Open

                        function buildFragment( elems, context, scripts, selection, ignored ) {
                            var j, elem, contains,
                                tmp, tag, tbody, wrap,
                                l = elems.length,
                        
                        

                          Function add has 75 lines of code (exceeds 25 allowed). Consider refactoring.
                          Open

                              add: function( elem, types, handler, data, selector ) {
                                  var tmp, events, t, handleObjIn,
                                      special, eventHandle, handleObj,
                                      handlers, type, namespaces, origType,
                                      elemData = jQuery._data( elem );

                            Function matcherFromGroupMatchers has 72 lines of code (exceeds 25 allowed). Consider refactoring.
                            Open

                            function matcherFromGroupMatchers( elementMatchers, setMatchers ) {
                                var bySet = setMatchers.length > 0,
                                    byElement = elementMatchers.length > 0,
                                    superMatcher = function( seed, context, xml, results, outermost ) {
                                        var elem, j, matcher,

                              Function done has 67 lines of code (exceeds 25 allowed). Consider refactoring.
                              Open

                                      function done( status, nativeStatusText, responses, headers ) {
                                          var isSuccess, success, error, response, modified,
                                              statusText = nativeStatusText;
                              
                                          // Called once

                                Consider simplifying this complex logical expression.
                                Open

                                                        if ( forward && useCache ) {
                                
                                                            // Seek `elem` from a previously-cached index
                                
                                                            // ...in a gzip-friendly way

                                  Function send has 66 lines of code (exceeds 25 allowed). Consider refactoring.
                                  Open

                                                  send: function( headers, complete ) {
                                                      var i,
                                                          xhr = options.xhr(),
                                                          id = ++xhrId;
                                  
                                  

                                    Function setMatcher has 66 lines of code (exceeds 25 allowed). Consider refactoring.
                                    Open

                                    function setMatcher( preFilter, selector, matcher, postFilter, postFinder, postSelector ) {
                                        if ( postFilter && !postFilter[ expando ] ) {
                                            postFilter = setMatcher( postFilter );
                                        }
                                        if ( postFinder && !postFinder[ expando ] ) {

                                      Function superMatcher has 65 lines of code (exceeds 25 allowed). Consider refactoring.
                                      Open

                                              superMatcher = function( seed, context, xml, results, outermost ) {
                                                  var elem, j, matcher,
                                                      matchedCount = 0,
                                                      i = "0",
                                                      unmatched = seed && [],

                                        Function domManip has 63 lines of code (exceeds 25 allowed). Consider refactoring.
                                        Open

                                        function domManip( collection, args, callback, ignored ) {
                                        
                                            // Flatten any nested arrays
                                            args = concat.apply( [], args );
                                        
                                        

                                          Function init has 63 lines of code (exceeds 25 allowed). Consider refactoring.
                                          Open

                                              init = jQuery.fn.init = function( selector, context, root ) {
                                                  var match, elem;
                                          
                                                  // HANDLE: $(""), $(null), $(undefined), $(false)
                                                  if ( !selector ) {

                                            Function Deferred has 62 lines of code (exceeds 25 allowed). Consider refactoring.
                                            Open

                                                Deferred: function( func ) {
                                                    var tuples = [
                                            
                                                            // action, add listener, listener list, final state
                                                            [ "resolve", "done", jQuery.Callbacks( "once memory" ), "resolved" ],

                                              Function handleRemote has 62 lines of code (exceeds 25 allowed). Consider refactoring.
                                              Open

                                                  handleRemote: function(element) {
                                                    var method, url, data, withCredentials, dataType, options;
                                              
                                                    if (rails.fire(element, 'ajax:before')) {
                                                      withCredentials = element.data('with-credentials') || null;

                                                Function ajaxConvert has 59 lines of code (exceeds 25 allowed). Consider refactoring.
                                                Open

                                                function ajaxConvert( s, response, jqXHR, isSuccess ) {
                                                    var conv2, current, conv, tmp, prev,
                                                        converters = {},
                                                
                                                        // Work with a copy of dataTypes in case we need to modify it for conversion

                                                  Function remove has 54 lines of code (exceeds 25 allowed). Consider refactoring.
                                                  Open

                                                      remove: function( elem, types, handler, selector, mappedTypes ) {
                                                          var j, handleObj, tmp,
                                                              origCount, t, events,
                                                              special, handlers, type,
                                                              namespaces, origType,

                                                    Consider simplifying this complex logical expression.
                                                    Open

                                                                    if ( ( mappedTypes || origType === handleObj.origType ) &&
                                                                        ( !handler || handler.guid === handleObj.guid ) &&
                                                                        ( !tmp || tmp.test( handleObj.namespace ) ) &&
                                                                        ( !selector || selector === handleObj.selector ||
                                                                            selector === "**" && handleObj.selector ) ) {

                                                      Function internalRemoveData has 49 lines of code (exceeds 25 allowed). Consider refactoring.
                                                      Open

                                                      function internalRemoveData( elem, name, pvt ) {
                                                          if ( !acceptData( elem ) ) {
                                                              return;
                                                          }
                                                      
                                                      

                                                        Function internalData has 48 lines of code (exceeds 25 allowed). Consider refactoring.
                                                        Open

                                                        function internalData( elem, name, data, pvt /* Internal Use Only */ ) {
                                                            if ( !acceptData( elem ) ) {
                                                                return;
                                                            }
                                                        
                                                        

                                                          Function select has 47 lines of code (exceeds 25 allowed). Consider refactoring.
                                                          Open

                                                          select = Sizzle.select = function( selector, context, results, seed ) {
                                                              var i, tokens, token, type, find,
                                                                  compiled = typeof selector === "function" && selector,
                                                                  match = !seed && tokenize( (selector = compiled.selector || selector) );
                                                          
                                                          

                                                            Function tokenize has 46 lines of code (exceeds 25 allowed). Consider refactoring.
                                                            Open

                                                            tokenize = Sizzle.tokenize = function( selector, parseOnly ) {
                                                                var matched, match, tokens, type,
                                                                    soFar, groups, preFilters,
                                                                    cached = tokenCache[ selector + " " ];
                                                            
                                                            

                                                              Function matcherFromTokens has 46 lines of code (exceeds 25 allowed). Consider refactoring.
                                                              Open

                                                              function matcherFromTokens( tokens ) {
                                                                  var checkContext, matcher, j,
                                                                      len = tokens.length,
                                                                      leadingRelative = Expr.relative[ tokens[0].type ],
                                                                      implicitRelative = leadingRelative || Expr.relative[" "],

                                                                Function val has 45 lines of code (exceeds 25 allowed). Consider refactoring.
                                                                Open

                                                                    val: function( value ) {
                                                                        var hooks, ret, isFunction,
                                                                            elem = this[ 0 ];
                                                                
                                                                        if ( !arguments.length ) {

                                                                  Function computeStyleTests has 43 lines of code (exceeds 25 allowed). Consider refactoring.
                                                                  Open

                                                                      function computeStyleTests() {
                                                                          var contents, divStyle,
                                                                              documentElement = document.documentElement;
                                                                  
                                                                          // Setup

                                                                    Consider simplifying this complex logical expression.
                                                                    Open

                                                                                if ( typeof value === "string" && !rnoInnerhtml.test( value ) &&
                                                                                    ( support.htmlSerialize || !rnoshimcache.test( value )  ) &&
                                                                                    ( support.leadingWhitespace || !rleadingWhitespace.test( value ) ) &&
                                                                                    !wrapMap[ ( rtagName.exec( value ) || [ "", "" ] )[ 1 ].toLowerCase() ] ) {
                                                                    
                                                                    

                                                                      Function extend has 41 lines of code (exceeds 25 allowed). Consider refactoring.
                                                                      Open

                                                                      jQuery.extend = jQuery.fn.extend = function() {
                                                                          var src, copyIsArray, copy, name, options, clone,
                                                                              target = arguments[ 0 ] || {},
                                                                              i = 1,
                                                                              length = arguments.length,

                                                                        Function stop has 41 lines of code (exceeds 25 allowed). Consider refactoring.
                                                                        Open

                                                                            stop: function( type, clearQueue, gotoEnd ) {
                                                                                var stopQueue = function( hooks ) {
                                                                                    var stop = hooks.stop;
                                                                                    delete hooks.stop;
                                                                                    stop( gotoEnd );

                                                                          Function showHide has 40 lines of code (exceeds 25 allowed). Consider refactoring.
                                                                          Open

                                                                          function showHide( elements, show ) {
                                                                              var display, elem, hidden,
                                                                                  values = [],
                                                                                  index = 0,
                                                                                  length = elements.length;

                                                                            Function addCombinator has 40 lines of code (exceeds 25 allowed). Consider refactoring.
                                                                            Open

                                                                            function addCombinator( matcher, combinator, base ) {
                                                                                var dir = combinator.dir,
                                                                                    checkNonElements = base && dir === "parentNode",
                                                                                    doneName = done++;
                                                                            
                                                                            

                                                                              Function on has 40 lines of code (exceeds 25 allowed). Consider refactoring.
                                                                              Open

                                                                              function on( elem, types, selector, data, fn, one ) {
                                                                                  var origFn, type;
                                                                              
                                                                                  // Types can be a map of types/handlers
                                                                                  if ( typeof types === "object" ) {

                                                                                Function access has 39 lines of code (exceeds 25 allowed). Consider refactoring.
                                                                                Open

                                                                                var access = function( elems, fn, key, value, chainable, emptyGet, raw ) {
                                                                                    var i = 0,
                                                                                        length = elems.length,
                                                                                        bulk = key == null;
                                                                                
                                                                                

                                                                                  Function when has 37 lines of code (exceeds 25 allowed). Consider refactoring.
                                                                                  Open

                                                                                      when: function( subordinate /* , ..., subordinateN */ ) {
                                                                                          var i = 0,
                                                                                              resolveValues = slice.call( arguments ),
                                                                                              length = resolveValues.length,
                                                                                  
                                                                                  

                                                                                    Function toggleClass has 37 lines of code (exceeds 25 allowed). Consider refactoring.
                                                                                    Open

                                                                                        toggleClass: function( value, stateVal ) {
                                                                                            var type = typeof value;
                                                                                    
                                                                                            if ( typeof stateVal === "boolean" && type === "string" ) {
                                                                                                return stateVal ? this.addClass( value ) : this.removeClass( value );

                                                                                      Function style has 37 lines of code (exceeds 25 allowed). Consider refactoring.
                                                                                      Open

                                                                                          style: function( elem, name, value, extra ) {
                                                                                      
                                                                                              // Don't set styles on text and comment nodes
                                                                                              if ( !elem || elem.nodeType === 3 || elem.nodeType === 8 || !elem.style ) {
                                                                                                  return;

                                                                                        Function ajaxHandleResponses has 37 lines of code (exceeds 25 allowed). Consider refactoring.
                                                                                        Open

                                                                                        function ajaxHandleResponses( s, jqXHR, responses ) {
                                                                                            var firstDataType, ct, finalDataType, type,
                                                                                                contents = s.contents,
                                                                                                dataTypes = s.dataTypes;
                                                                                        
                                                                                        

                                                                                          Function dispatch has 36 lines of code (exceeds 25 allowed). Consider refactoring.
                                                                                          Open

                                                                                              dispatch: function( event ) {
                                                                                          
                                                                                                  // Make a writable jQuery.Event from the native event object
                                                                                                  event = jQuery.event.fix( event );
                                                                                          
                                                                                          

                                                                                            Function clone has 36 lines of code (exceeds 25 allowed). Consider refactoring.
                                                                                            Open

                                                                                                clone: function( elem, dataAndEvents, deepDataAndEvents ) {
                                                                                                    var destElements, node, clone, i, srcElements,
                                                                                                        inPage = jQuery.contains( elem.ownerDocument, elem );
                                                                                            
                                                                                                    if ( support.html5Clone || jQuery.isXMLDoc( elem ) ||

                                                                                              Function adjustCSS has 34 lines of code (exceeds 25 allowed). Consider refactoring.
                                                                                              Open

                                                                                              function adjustCSS( elem, prop, valueParts, tween ) {
                                                                                                  var adjusted,
                                                                                                      scale = 1,
                                                                                                      maxIterations = 20,
                                                                                                      currentValue = tween ?

                                                                                                Function load has 34 lines of code (exceeds 25 allowed). Consider refactoring.
                                                                                                Open

                                                                                                jQuery.fn.load = function( url, params, callback ) {
                                                                                                    if ( typeof url !== "string" && _load ) {
                                                                                                        return _load.apply( this, arguments );
                                                                                                    }
                                                                                                
                                                                                                

                                                                                                  Function setOffset has 34 lines of code (exceeds 25 allowed). Consider refactoring.
                                                                                                  Open

                                                                                                      setOffset: function( elem, options, i ) {
                                                                                                          var curPosition, curLeft, curCSSTop, curTop, curOffset, curCSSLeft, calculatePosition,
                                                                                                              position = jQuery.css( elem, "position" ),
                                                                                                              curElem = jQuery( elem ),
                                                                                                              props = {};

                                                                                                    Consider simplifying this complex logical expression.
                                                                                                    Open

                                                                                                        if ( initialInUnit && initialInUnit[ 3 ] !== unit ) {
                                                                                                    
                                                                                                            // Trust units reported by jQuery.css
                                                                                                            unit = unit || initialInUnit[ 3 ];
                                                                                                    
                                                                                                    

                                                                                                      Function data has 32 lines of code (exceeds 25 allowed). Consider refactoring.
                                                                                                      Open

                                                                                                          data: function( key, value ) {
                                                                                                              var i, name, data,
                                                                                                                  elem = this[ 0 ],
                                                                                                                  attrs = elem && elem.attributes;
                                                                                                      
                                                                                                      

                                                                                                        Function addClickEvents has 32 lines of code (exceeds 25 allowed). Consider refactoring.
                                                                                                        Open

                                                                                                            addClickEvents: function () {
                                                                                                                var base = this;
                                                                                                                
                                                                                                                base.hidePassword.on("click", function (e) {
                                                                                                                    var $this = $(this),

                                                                                                          Function fixCloneNodeIssues has 32 lines of code (exceeds 25 allowed). Consider refactoring.
                                                                                                          Open

                                                                                                          function fixCloneNodeIssues( src, dest ) {
                                                                                                              var nodeName, e, data;
                                                                                                          
                                                                                                              // We do not need to do anything for non-Elements
                                                                                                              if ( dest.nodeType !== 1 ) {

                                                                                                            Function cleanData has 32 lines of code (exceeds 25 allowed). Consider refactoring.
                                                                                                            Open

                                                                                                                cleanData: function( elems, /* internal */ forceAcceptData ) {
                                                                                                                    var elem, type, id, data,
                                                                                                                        i = 0,
                                                                                                                        internalKey = jQuery.expando,
                                                                                                                        cache = jQuery.cache,

                                                                                                              Function removeClass has 31 lines of code (exceeds 25 allowed). Consider refactoring.
                                                                                                              Open

                                                                                                                  removeClass: function( value ) {
                                                                                                                      var classes, elem, cur, curValue, clazz, j, finalValue,
                                                                                                                          i = 0;
                                                                                                              
                                                                                                                      if ( jQuery.isFunction( value ) ) {

                                                                                                                Function promise has 31 lines of code (exceeds 25 allowed). Consider refactoring.
                                                                                                                Open

                                                                                                                jQuery.ready.promise = function( obj ) {
                                                                                                                    if ( !readyList ) {
                                                                                                                
                                                                                                                        readyList = jQuery.Deferred();
                                                                                                                
                                                                                                                

                                                                                                                  Function handlers has 31 lines of code (exceeds 25 allowed). Consider refactoring.
                                                                                                                  Open

                                                                                                                      handlers: function( event, handlers ) {
                                                                                                                          var i, matches, sel, handleObj,
                                                                                                                              handlerQueue = [],
                                                                                                                              delegateCount = handlers.delegateCount,
                                                                                                                              cur = event.target;

                                                                                                                    Function attr has 30 lines of code (exceeds 25 allowed). Consider refactoring.
                                                                                                                    Open

                                                                                                                        attr: function( elem, name, value ) {
                                                                                                                            var ret, hooks,
                                                                                                                                nType = elem.nodeType;
                                                                                                                    
                                                                                                                            // Don't get/set attributes on text, comment and attribute nodes

                                                                                                                      Function html has 29 lines of code (exceeds 25 allowed). Consider refactoring.
                                                                                                                      Open

                                                                                                                          html: function( value ) {
                                                                                                                              return access( this, function( value ) {
                                                                                                                                  var elem = this[ 0 ] || {},
                                                                                                                                      i = 0,
                                                                                                                                      l = this.length;

                                                                                                                        Function fix has 28 lines of code (exceeds 25 allowed). Consider refactoring.
                                                                                                                        Open

                                                                                                                            fix: function( event ) {
                                                                                                                                if ( event[ jQuery.expando ] ) {
                                                                                                                                    return event;
                                                                                                                                }
                                                                                                                        
                                                                                                                        

                                                                                                                          Function addClass has 28 lines of code (exceeds 25 allowed). Consider refactoring.
                                                                                                                          Open

                                                                                                                              addClass: function( value ) {
                                                                                                                                  var classes, elem, cur, curValue, clazz, j, finalValue,
                                                                                                                                      i = 0;
                                                                                                                          
                                                                                                                                  if ( jQuery.isFunction( value ) ) {

                                                                                                                            Function blankInputs has 28 lines of code (exceeds 25 allowed). Consider refactoring.
                                                                                                                            Open

                                                                                                                                blankInputs: function(form, specifiedSelector, nonBlank) {
                                                                                                                                  var foundInputs = $(),
                                                                                                                                    input,
                                                                                                                                    valueToCheck,
                                                                                                                                    radiosForNameWithNoneSelected,

                                                                                                                              Function finish has 28 lines of code (exceeds 25 allowed). Consider refactoring.
                                                                                                                              Open

                                                                                                                                  finish: function( type ) {
                                                                                                                                      if ( type !== false ) {
                                                                                                                                          type = type || "fx";
                                                                                                                                      }
                                                                                                                                      return this.each( function() {

                                                                                                                                Function off has 28 lines of code (exceeds 25 allowed). Consider refactoring.
                                                                                                                                Open

                                                                                                                                    off: function( types, selector, fn ) {
                                                                                                                                        var handleObj, type;
                                                                                                                                        if ( types && types.preventDefault && types.handleObj ) {
                                                                                                                                
                                                                                                                                            // ( event )  dispatched jQuery.Event

                                                                                                                                  Function propFilter has 27 lines of code (exceeds 25 allowed). Consider refactoring.
                                                                                                                                  Open

                                                                                                                                  function propFilter( props, specialEasing ) {
                                                                                                                                      var index, name, easing, value, hooks;
                                                                                                                                  
                                                                                                                                      // camelCase, specialEasing and expand cssHook pass
                                                                                                                                      for ( index in props ) {

                                                                                                                                    Function setup has 27 lines of code (exceeds 25 allowed). Consider refactoring.
                                                                                                                                    Open

                                                                                                                                            setup: function() {
                                                                                                                                    
                                                                                                                                                if ( rformElems.test( this.nodeName ) ) {
                                                                                                                                    
                                                                                                                                                    // IE doesn't fire change on a check/radio until blur; trigger it on click

                                                                                                                                      Function offset has 26 lines of code (exceeds 25 allowed). Consider refactoring.
                                                                                                                                      Open

                                                                                                                                          offset: function( options ) {
                                                                                                                                              if ( arguments.length ) {
                                                                                                                                                  return options === undefined ?
                                                                                                                                                      this :
                                                                                                                                                      this.each( function( i ) {

                                                                                                                                        Function getWidthOrHeight has 26 lines of code (exceeds 25 allowed). Consider refactoring.
                                                                                                                                        Open

                                                                                                                                        function getWidthOrHeight( elem, name, extra ) {
                                                                                                                                        
                                                                                                                                            // Start with offset property, which is equivalent to the border-box value
                                                                                                                                            var valueIsBorderBox = true,
                                                                                                                                                val = name === "width" ? elem.offsetWidth : elem.offsetHeight,

                                                                                                                                          Consider simplifying this complex logical expression.
                                                                                                                                          Open

                                                                                                                                                  if ( tokens.length > 2 && (token = tokens[0]).type === "ID" &&
                                                                                                                                                          support.getById && context.nodeType === 9 && documentIsHTML &&
                                                                                                                                                          Expr.relative[ tokens[1].type ] ) {
                                                                                                                                          
                                                                                                                                                      context = ( Expr.find["ID"]( token.matches[0].replace(runescape, funescape), context ) || [] )[0];

                                                                                                                                            Consider simplifying this complex logical expression.
                                                                                                                                            Open

                                                                                                                                                if ( support.matchesSelector && documentIsHTML &&
                                                                                                                                                    !compilerCache[ expr + " " ] &&
                                                                                                                                                    ( !rbuggyMatches || !rbuggyMatches.test( expr ) ) &&
                                                                                                                                                    ( !rbuggyQSA     || !rbuggyQSA.test( expr ) ) ) {
                                                                                                                                            
                                                                                                                                            

                                                                                                                                              Function access has 7 arguments (exceeds 4 allowed). Consider refactoring.
                                                                                                                                              Open

                                                                                                                                              var access = function( elems, fn, key, value, chainable, emptyGet, raw ) {

                                                                                                                                                Avoid deeply nested control flow statements.
                                                                                                                                                Open

                                                                                                                                                                                    if ( ( ofType ?
                                                                                                                                                                                        node.nodeName.toLowerCase() === name :
                                                                                                                                                                                        node.nodeType === 1 ) &&
                                                                                                                                                                                        ++diff ) {
                                                                                                                                                
                                                                                                                                                

                                                                                                                                                  Avoid deeply nested control flow statements.
                                                                                                                                                  Open

                                                                                                                                                                          for ( match in context ) {
                                                                                                                                                  
                                                                                                                                                                              // Properties of context are called as methods if possible
                                                                                                                                                                              if ( jQuery.isFunction( this[ match ] ) ) {
                                                                                                                                                                                  this[ match ]( context[ match ] );

                                                                                                                                                    Avoid deeply nested control flow statements.
                                                                                                                                                    Open

                                                                                                                                                                    } else if ( match[2] ) {
                                                                                                                                                                        push.apply( results, context.getElementsByTagName( selector ) );
                                                                                                                                                                        return results;
                                                                                                                                                    
                                                                                                                                                                    // Class selector

                                                                                                                                                      Avoid deeply nested control flow statements.
                                                                                                                                                      Open

                                                                                                                                                                          if ( (nid = context.getAttribute( "id" )) ) {
                                                                                                                                                                              nid = nid.replace( rescape, "\\$&" );
                                                                                                                                                                          } else {
                                                                                                                                                                              context.setAttribute( "id", (nid = expando) );
                                                                                                                                                                          }

                                                                                                                                                        Avoid deeply nested control flow statements.
                                                                                                                                                        Open

                                                                                                                                                                            while ( j-- ) {
                                                                                                                                                                                if ( jQuery.nodeName( ( tbody = elem.childNodes[ j ] ), "tbody" ) &&
                                                                                                                                                                                    !tbody.childNodes.length ) {
                                                                                                                                                        
                                                                                                                                                                                    elem.removeChild( tbody );

                                                                                                                                                          Avoid deeply nested control flow statements.
                                                                                                                                                          Open

                                                                                                                                                                                  for ( type in data.events ) {
                                                                                                                                                                                      if ( special[ type ] ) {
                                                                                                                                                                                          jQuery.event.remove( elem, type );
                                                                                                                                                          
                                                                                                                                                                                      // This is a shortcut to avoid jQuery.event.remove's overhead

                                                                                                                                                            Avoid deeply nested control flow statements.
                                                                                                                                                            Open

                                                                                                                                                                                    while ( cur.indexOf( " " + clazz + " " ) > -1 ) {
                                                                                                                                                                                        cur = cur.replace( " " + clazz + " ", " " );
                                                                                                                                                                                    }

                                                                                                                                                              Function setMatcher has 6 arguments (exceeds 4 allowed). Consider refactoring.
                                                                                                                                                              Open

                                                                                                                                                              function setMatcher( preFilter, selector, matcher, postFilter, postFinder, postSelector ) {

                                                                                                                                                                Avoid deeply nested control flow statements.
                                                                                                                                                                Open

                                                                                                                                                                                            if ( (newCache[ 2 ] = matcher( elem, context, xml )) ) {
                                                                                                                                                                                                return true;
                                                                                                                                                                                            }

                                                                                                                                                                  Avoid deeply nested control flow statements.
                                                                                                                                                                  Open

                                                                                                                                                                                          if ( (elem = matcherOut[i]) ) {
                                                                                                                                                                                              // Restore matcherIn since elem is not yet a final match
                                                                                                                                                                                              temp.push( (matcherIn[i] = elem) );
                                                                                                                                                                                          }

                                                                                                                                                                    Avoid deeply nested control flow statements.
                                                                                                                                                                    Open

                                                                                                                                                                                            if ( elem.id !== match[ 2 ] ) {
                                                                                                                                                                                                return rootjQuery.find( selector );
                                                                                                                                                                                            }

                                                                                                                                                                      Avoid deeply nested control flow statements.
                                                                                                                                                                      Open

                                                                                                                                                                                          if ( Expr.relative[ tokens[j].type ] ) {
                                                                                                                                                                                              break;
                                                                                                                                                                                          }

                                                                                                                                                                        Avoid deeply nested control flow statements.
                                                                                                                                                                        Open

                                                                                                                                                                                                if ( attrs[ i ] ) {
                                                                                                                                                                                                    name = attrs[ i ].name;
                                                                                                                                                                                                    if ( name.indexOf( "data-" ) === 0 ) {
                                                                                                                                                                                                        name = jQuery.camelCase( name.slice( 5 ) );
                                                                                                                                                                                                        dataAttr( elem, name, data[ name ] );

                                                                                                                                                                          Avoid deeply nested control flow statements.
                                                                                                                                                                          Open

                                                                                                                                                                                                          if ( typeof xhr.responseText === "string" ) {
                                                                                                                                                                                                              responses.text = xhr.responseText;
                                                                                                                                                                                                          }

                                                                                                                                                                            Avoid deeply nested control flow statements.
                                                                                                                                                                            Open

                                                                                                                                                                                                            if ( !status && options.isLocal && !options.crossDomain ) {
                                                                                                                                                                                                                status = responses.text ? 200 : 404;
                                                                                                                                                                            
                                                                                                                                                                                                            // IE - #1450: sometimes returns 1223 when it should be 204
                                                                                                                                                                                                            } else if ( status === 1223 ) {

                                                                                                                                                                              Function init has 6 arguments (exceeds 4 allowed). Consider refactoring.
                                                                                                                                                                              Open

                                                                                                                                                                                  init: function( elem, options, prop, end, easing, unit ) {

                                                                                                                                                                                Avoid deeply nested control flow statements.
                                                                                                                                                                                Open

                                                                                                                                                                                                    if ( hasScripts ) {
                                                                                                                                                                                
                                                                                                                                                                                                        // Support: Android<4.1, PhantomJS<2
                                                                                                                                                                                                        // push.apply(_, arraylike) throws on ancient WebKit
                                                                                                                                                                                                        jQuery.merge( scripts, getAll( node, "script" ) );

                                                                                                                                                                                  Avoid deeply nested control flow statements.
                                                                                                                                                                                  Open

                                                                                                                                                                                            if (element.data('params')) data = data + '&' + element.data('params');

                                                                                                                                                                                    Avoid deeply nested control flow statements.
                                                                                                                                                                                    Open

                                                                                                                                                                                                        if ( copyIsArray ) {
                                                                                                                                                                                                            copyIsArray = false;
                                                                                                                                                                                                            clone = src && jQuery.isArray( src ) ? src : [];
                                                                                                                                                                                    
                                                                                                                                                                                                        } else {

                                                                                                                                                                                      Avoid deeply nested control flow statements.
                                                                                                                                                                                      Open

                                                                                                                                                                                                              if ( matches[ sel ] === undefined ) {
                                                                                                                                                                                                                  matches[ sel ] = handleObj.needsContext ?
                                                                                                                                                                                                                      jQuery( sel, this ).index( cur ) > -1 :
                                                                                                                                                                                                                      jQuery.find( sel, this, null, [ cur ] ).length;
                                                                                                                                                                                                              }

                                                                                                                                                                                        Avoid deeply nested control flow statements.
                                                                                                                                                                                        Open

                                                                                                                                                                                                                        if ( xhr.readyState !== 4 ) {
                                                                                                                                                                                                                            xhr.abort();
                                                                                                                                                                                                                        }

                                                                                                                                                                                          Avoid deeply nested control flow statements.
                                                                                                                                                                                          Open

                                                                                                                                                                                                                  if ( nid === expando ) {
                                                                                                                                                                                                                      context.removeAttribute( "id" );
                                                                                                                                                                                                                  }

                                                                                                                                                                                            Avoid deeply nested control flow statements.
                                                                                                                                                                                            Open

                                                                                                                                                                                                                        if ( !(unmatched[i] || setMatched[i]) ) {
                                                                                                                                                                                                                            setMatched[i] = pop.call( results );
                                                                                                                                                                                                                        }

                                                                                                                                                                                              Avoid deeply nested control flow statements.
                                                                                                                                                                                              Open

                                                                                                                                                                                                                      if ( ( event.result = ret ) === false ) {
                                                                                                                                                                                                                          event.preventDefault();
                                                                                                                                                                                                                          event.stopPropagation();
                                                                                                                                                                                                                      }

                                                                                                                                                                                                Avoid deeply nested control flow statements.
                                                                                                                                                                                                Open

                                                                                                                                                                                                                        if ( cur.indexOf( " " + clazz + " " ) < 0 ) {
                                                                                                                                                                                                                            cur += clazz + " ";
                                                                                                                                                                                                                        }

                                                                                                                                                                                                  Avoid deeply nested control flow statements.
                                                                                                                                                                                                  Open

                                                                                                                                                                                                                          if ( !attributes && typeof elem.removeAttribute !== "undefined" ) {
                                                                                                                                                                                                                              elem.removeAttribute( internalKey );
                                                                                                                                                                                                  
                                                                                                                                                                                                                          // Webkit & Blink performance suffers when deleting properties
                                                                                                                                                                                                                          // from DOM nodes, so set to undefined instead

                                                                                                                                                                                                    Avoid deeply nested control flow statements.
                                                                                                                                                                                                    Open

                                                                                                                                                                                                                        if ( conv && s[ "throws" ] ) { // jscs:ignore requireDotNotation
                                                                                                                                                                                                                            response = conv( response );
                                                                                                                                                                                                                        } else {
                                                                                                                                                                                                                            try {
                                                                                                                                                                                                                                response = conv( response );

                                                                                                                                                                                                      Avoid deeply nested control flow statements.
                                                                                                                                                                                                      Open

                                                                                                                                                                                                                          if ( nodeType === 9 ) {
                                                                                                                                                                                                                              if ( (elem = context.getElementById( m )) ) {
                                                                                                                                                                                                      
                                                                                                                                                                                                                                  // Support: IE, Opera, Webkit
                                                                                                                                                                                                                                  // TODO: identify versions

                                                                                                                                                                                                        Avoid deeply nested control flow statements.
                                                                                                                                                                                                        Open

                                                                                                                                                                                                                            while ( i-- ) {
                                                                                                                                                                                                                                groups[i] = nidselect + " " + toSelector( groups[i] );
                                                                                                                                                                                                                            }

                                                                                                                                                                                                          Avoid deeply nested control flow statements.
                                                                                                                                                                                                          Open

                                                                                                                                                                                                                                              if ( ofType ?
                                                                                                                                                                                                                                                  node.nodeName.toLowerCase() === name :
                                                                                                                                                                                                                                                  node.nodeType === 1 ) {
                                                                                                                                                                                                          
                                                                                                                                                                                                                                                  return false;

                                                                                                                                                                                                            Avoid deeply nested control flow statements.
                                                                                                                                                                                                            Open

                                                                                                                                                                                                                                if ( name in thisCache ) {
                                                                                                                                                                                                                                    name = [ name ];
                                                                                                                                                                                                                                } else {
                                                                                                                                                                                                                                    name = name.split( " " );
                                                                                                                                                                                                                                }

                                                                                                                                                                                                              Avoid deeply nested control flow statements.
                                                                                                                                                                                                              Open

                                                                                                                                                                                                                                  if ( !selector ) {
                                                                                                                                                                                                                                      push.apply( results, seed );
                                                                                                                                                                                                                                      return results;
                                                                                                                                                                                                                                  }

                                                                                                                                                                                                                Avoid deeply nested control flow statements.
                                                                                                                                                                                                                Open

                                                                                                                                                                                                                                        if ( matches[ sel ] ) {
                                                                                                                                                                                                                                            matches.push( handleObj );
                                                                                                                                                                                                                                        }

                                                                                                                                                                                                                  Avoid deeply nested control flow statements.
                                                                                                                                                                                                                  Open

                                                                                                                                                                                                                                      if ( rscriptType.test( node.type || "" ) &&
                                                                                                                                                                                                                                          !jQuery._data( node, "globalEval" ) &&
                                                                                                                                                                                                                                          jQuery.contains( doc, node ) ) {
                                                                                                                                                                                                                  
                                                                                                                                                                                                                                          if ( node.src ) {

                                                                                                                                                                                                                    Function on has 6 arguments (exceeds 4 allowed). Consider refactoring.
                                                                                                                                                                                                                    Open

                                                                                                                                                                                                                    function on( elem, types, selector, data, fn, one ) {

                                                                                                                                                                                                                      Avoid deeply nested control flow statements.
                                                                                                                                                                                                                      Open

                                                                                                                                                                                                                                      } else if ( copy !== undefined ) {
                                                                                                                                                                                                                                          target[ name ] = copy;
                                                                                                                                                                                                                                      }

                                                                                                                                                                                                                        Avoid deeply nested control flow statements.
                                                                                                                                                                                                                        Open

                                                                                                                                                                                                                                            for ( conv2 in converters ) {
                                                                                                                                                                                                                        
                                                                                                                                                                                                                                                // If conv2 outputs current
                                                                                                                                                                                                                                                tmp = conv2.split( " " );
                                                                                                                                                                                                                                                if ( tmp[ 1 ] === current ) {

                                                                                                                                                                                                                          Consider simplifying this complex logical expression.
                                                                                                                                                                                                                          Open

                                                                                                                                                                                                                                  if ( delegateCount && cur.nodeType &&
                                                                                                                                                                                                                                      ( event.type !== "click" || isNaN( event.button ) || event.button < 1 ) ) {
                                                                                                                                                                                                                          
                                                                                                                                                                                                                                      /* jshint eqeqeq: false */
                                                                                                                                                                                                                                      for ( ; cur != this; cur = cur.parentNode || this ) {

                                                                                                                                                                                                                            Consider simplifying this complex logical expression.
                                                                                                                                                                                                                            Open

                                                                                                                                                                                                                            if ( !support.opacity ) {
                                                                                                                                                                                                                                jQuery.cssHooks.opacity = {
                                                                                                                                                                                                                                    get: function( elem, computed ) {
                                                                                                                                                                                                                            
                                                                                                                                                                                                                                        // IE uses filters for opacity

                                                                                                                                                                                                                              Consider simplifying this complex logical expression.
                                                                                                                                                                                                                              Open

                                                                                                                                                                                                                                      if ( window.getComputedStyle ) {
                                                                                                                                                                                                                                          divStyle = window.getComputedStyle( div );
                                                                                                                                                                                                                                          pixelPositionVal = ( divStyle || {} ).top !== "1%";
                                                                                                                                                                                                                                          reliableMarginLeftVal = ( divStyle || {} ).marginLeft === "2px";
                                                                                                                                                                                                                                          boxSizingReliableVal = ( divStyle || { width: "4px" } ).width === "4px";

                                                                                                                                                                                                                                Consider simplifying this complex logical expression.
                                                                                                                                                                                                                                Open

                                                                                                                                                                                                                                    if ( ( !id || !cache[ id ] || ( !pvt && !cache[ id ].data ) ) &&
                                                                                                                                                                                                                                        data === undefined && typeof name === "string" ) {
                                                                                                                                                                                                                                        return;
                                                                                                                                                                                                                                    }

                                                                                                                                                                                                                                  Consider simplifying this complex logical expression.
                                                                                                                                                                                                                                  Open

                                                                                                                                                                                                                                          if ( s.crossDomain == null ) {
                                                                                                                                                                                                                                              parts = rurl.exec( s.url.toLowerCase() );
                                                                                                                                                                                                                                              s.crossDomain = !!( parts &&
                                                                                                                                                                                                                                                  ( parts[ 1 ] !== ajaxLocParts[ 1 ] || parts[ 2 ] !== ajaxLocParts[ 2 ] ||
                                                                                                                                                                                                                                                      ( parts[ 3 ] || ( parts[ 1 ] === "http:" ? "80" : "443" ) ) !==

                                                                                                                                                                                                                                    Consider simplifying this complex logical expression.
                                                                                                                                                                                                                                    Open

                                                                                                                                                                                                                                                if ( matcher[ expando ] ) {
                                                                                                                                                                                                                                                    // Find the next relative operator (if any) for proper handling
                                                                                                                                                                                                                                                    j = ++i;
                                                                                                                                                                                                                                                    for ( ; j < len; j++ ) {
                                                                                                                                                                                                                                                        if ( Expr.relative[ tokens[j].type ] ) {

                                                                                                                                                                                                                                      Function superMatcher has 5 arguments (exceeds 4 allowed). Consider refactoring.
                                                                                                                                                                                                                                      Open

                                                                                                                                                                                                                                              superMatcher = function( seed, context, xml, results, outermost ) {

                                                                                                                                                                                                                                        Function augmentWidthOrHeight has 5 arguments (exceeds 4 allowed). Consider refactoring.
                                                                                                                                                                                                                                        Open

                                                                                                                                                                                                                                        function augmentWidthOrHeight( elem, name, extra, isBorderBox, styles ) {

                                                                                                                                                                                                                                          Function Tween has 5 arguments (exceeds 4 allowed). Consider refactoring.
                                                                                                                                                                                                                                          Open

                                                                                                                                                                                                                                          function Tween( elem, options, prop, end, easing ) {

                                                                                                                                                                                                                                            Function remove has 5 arguments (exceeds 4 allowed). Consider refactoring.
                                                                                                                                                                                                                                            Open

                                                                                                                                                                                                                                                remove: function( elem, types, handler, selector, mappedTypes ) {

                                                                                                                                                                                                                                              Function condense has 5 arguments (exceeds 4 allowed). Consider refactoring.
                                                                                                                                                                                                                                              Open

                                                                                                                                                                                                                                              function condense( unmatched, map, filter, context, xml ) {

                                                                                                                                                                                                                                                Function add has 5 arguments (exceeds 4 allowed). Consider refactoring.
                                                                                                                                                                                                                                                Open

                                                                                                                                                                                                                                                    add: function( elem, types, handler, data, selector ) {

                                                                                                                                                                                                                                                  Function buildFragment has 5 arguments (exceeds 4 allowed). Consider refactoring.
                                                                                                                                                                                                                                                  Open

                                                                                                                                                                                                                                                  function buildFragment( elems, context, scripts, selection, ignored ) {

                                                                                                                                                                                                                                                    Function CHILD has 5 arguments (exceeds 4 allowed). Consider refactoring.
                                                                                                                                                                                                                                                    Open

                                                                                                                                                                                                                                                            "CHILD": function( type, what, argument, first, last ) {

                                                                                                                                                                                                                                                      Avoid too many return statements within this function.
                                                                                                                                                                                                                                                      Open

                                                                                                                                                                                                                                                              return compare & 4 ? -1 : 1;

                                                                                                                                                                                                                                                        Avoid too many return statements within this function.
                                                                                                                                                                                                                                                        Open

                                                                                                                                                                                                                                                                        return this.constructor( context ).find( selector );

                                                                                                                                                                                                                                                          Avoid too many return statements within this function.
                                                                                                                                                                                                                                                          Open

                                                                                                                                                                                                                                                                              return results;

                                                                                                                                                                                                                                                            Avoid too many return statements within this function.
                                                                                                                                                                                                                                                            Open

                                                                                                                                                                                                                                                                    return key === undefined || hasOwn.call( obj, key );

                                                                                                                                                                                                                                                              Avoid too many return statements within this function.
                                                                                                                                                                                                                                                              Open

                                                                                                                                                                                                                                                                  return select( selector.replace( rtrim, "$1" ), context, results, seed );

                                                                                                                                                                                                                                                                Avoid too many return statements within this function.
                                                                                                                                                                                                                                                                Open

                                                                                                                                                                                                                                                                            return sortInput ?
                                                                                                                                                                                                                                                                                ( indexOf( sortInput, a ) - indexOf( sortInput, b ) ) :
                                                                                                                                                                                                                                                                                0;

                                                                                                                                                                                                                                                                  Avoid too many return statements within this function.
                                                                                                                                                                                                                                                                  Open

                                                                                                                                                                                                                                                                              return this;

                                                                                                                                                                                                                                                                    Avoid too many return statements within this function.
                                                                                                                                                                                                                                                                    Open

                                                                                                                                                                                                                                                                                return typeof root.ready !== "undefined" ?
                                                                                                                                                                                                                                                                                    root.ready( selector ) :
                                                                                                                                                                                                                                                                    
                                                                                                                                                                                                                                                                                    // Execute immediately if ready is not present
                                                                                                                                                                                                                                                                                    selector( jQuery );

                                                                                                                                                                                                                                                                      Avoid too many return statements within this function.
                                                                                                                                                                                                                                                                      Open

                                                                                                                                                                                                                                                                                  return ret;

                                                                                                                                                                                                                                                                        Avoid too many return statements within this function.
                                                                                                                                                                                                                                                                        Open

                                                                                                                                                                                                                                                                                            return results;

                                                                                                                                                                                                                                                                          Avoid too many return statements within this function.
                                                                                                                                                                                                                                                                          Open

                                                                                                                                                                                                                                                                                                  return results;

                                                                                                                                                                                                                                                                            Avoid too many return statements within this function.
                                                                                                                                                                                                                                                                            Open

                                                                                                                                                                                                                                                                                    return jQuery.makeArray( selector, this );

                                                                                                                                                                                                                                                                              Avoid too many return statements within this function.
                                                                                                                                                                                                                                                                              Open

                                                                                                                                                                                                                                                                                              return ( context || root ).find( selector );

                                                                                                                                                                                                                                                                                Avoid too many return statements within this function.
                                                                                                                                                                                                                                                                                Open

                                                                                                                                                                                                                                                                                        return elem[ name ];

                                                                                                                                                                                                                                                                                  Avoid too many return statements within this function.
                                                                                                                                                                                                                                                                                  Open

                                                                                                                                                                                                                                                                                              return value;

                                                                                                                                                                                                                                                                                    Avoid too many return statements within this function.
                                                                                                                                                                                                                                                                                    Open

                                                                                                                                                                                                                                                                                            return ret == null ? undefined : ret;

                                                                                                                                                                                                                                                                                      Identical blocks of code found in 2 locations. Consider refactoring.
                                                                                                                                                                                                                                                                                      Open

                                                                                                                                                                                                                                                                                      var LoginModalController = {
                                                                                                                                                                                                                                                                                          tabsElementName: ".logmod__tabs li",
                                                                                                                                                                                                                                                                                          tabElementName: ".logmod__tab",
                                                                                                                                                                                                                                                                                          inputElementsName: ".logmod__form .input",
                                                                                                                                                                                                                                                                                          hidePasswordName: ".hide-password",
                                                                                                                                                                                                                                                                                      app/assets/javascripts/users/sessions/new.html.js on lines 1..103

                                                                                                                                                                                                                                                                                      Duplicated Code

                                                                                                                                                                                                                                                                                      Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                                                                                                                                                                                                                                                                                      Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                                                                                                                                                                                                                                                                                      When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                                                                                                                                                                                                                                                                                      Tuning

                                                                                                                                                                                                                                                                                      This issue has a mass of 755.

                                                                                                                                                                                                                                                                                      We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                                                                                                                                                                                                                                                                                      The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                                                                                                                                                                                                                                                                                      If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                                                                                                                                                                                                                                                                                      See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                                                                                                                                                                                                                                                                                      Refactorings

                                                                                                                                                                                                                                                                                      Further Reading

                                                                                                                                                                                                                                                                                      Similar blocks of code found in 3 locations. Consider refactoring.
                                                                                                                                                                                                                                                                                      Open

                                                                                                                                                                                                                                                                                      (function(){(function(){(function(){this.Turbolinks={supported:function(){return null!=window.history.pushState&&null!=window.requestAnimationFrame}(),visit:function(e,r){return t.controller.visit(e,r)},clearCache:function(){return t.controller.clearCache()}}}).call(this)}).call(this);var t=this.Turbolinks;(function(){(function(){var e,r;t.copyObject=function(t){var e,r,n;r={};for(e in t)n=t[e],r[e]=n;return r},t.closest=function(t,r){return e.call(t,r)},e=function(){var t,e;return t=document.documentElement,null!=(e=t.closest)?e:function(t){var e;for(e=this;e;){if(e.nodeType===Node.ELEMENT_NODE&&r.call(e,t))return e;e=e.parentNode}}}(),t.defer=function(t){return setTimeout(t,1)},t.dispatch=function(t,e){var r,n,o,i,s;return i=null!=e?e:{},s=i.target,r=i.cancelable,n=i.data,o=document.createEvent("Events"),o.initEvent(t,!0,r===!0),o.data=null!=n?n:{},(null!=s?s:document).dispatchEvent(o),o},t.match=function(t,e){return r.call(t,e)},r=function(){var t,e,r,n;return t=document.documentElement,null!=(e=null!=(r=null!=(n=t.matchesSelector)?n:t.webkitMatchesSelector)?r:t.msMatchesSelector)?e:t.mozMatchesSelector}(),t.uuid=function(){var t,e,r;for(r="",t=e=1;36>=e;t=++e)r+=9===t||14===t||19===t||24===t?"-":15===t?"4":20===t?(Math.floor(4*Math.random())+8).toString(16):Math.floor(15*Math.random()).toString(16);return r}}).call(this),function(){t.Location=function(){function t(t){var e,r;null==t&&(t=""),r=document.createElement("a"),r.href=t.toString(),this.absoluteURL=r.href,e=r.hash.length,2>e?this.requestURL=this.absoluteURL:(this.requestURL=this.absoluteURL.slice(0,-e),this.anchor=r.hash.slice(1))}var e,r,n,o;return t.wrap=function(t){return t instanceof this?t:new this(t)},t.prototype.getOrigin=function(){return this.absoluteURL.split("/",3).join("/")},t.prototype.getPath=function(){var t,e;return null!=(t=null!=(e=this.absoluteURL.match(/\/\/[^\/]*(\/[^?;]*)/))?e[1]:void 0)?t:"/"},t.prototype.getPathComponents=function(){return this.getPath().split("/").slice(1)},t.prototype.getLastPathComponent=function(){return this.getPathComponents().slice(-1)[0]},t.prototype.getExtension=function(){var t,e;return null!=(t=null!=(e=this.getLastPathComponent().match(/\.[^.]*$/))?e[0]:void 0)?t:""},t.prototype.isHTML=function(){return this.getExtension().match(/^(?:|\.(?:htm|html|xhtml))$/)},t.prototype.isPrefixedBy=function(t){var e;return e=r(t),this.isEqualTo(t)||o(this.absoluteURL,e)},t.prototype.isEqualTo=function(t){return this.absoluteURL===(null!=t?t.absoluteURL:void 0)},t.prototype.toCacheKey=function(){return this.requestURL},t.prototype.toJSON=function(){return this.absoluteURL},t.prototype.toString=function(){return this.absoluteURL},t.prototype.valueOf=function(){return this.absoluteURL},r=function(t){return e(t.getOrigin()+t.getPath())},e=function(t){return n(t,"/")?t:t+"/"},o=function(t,e){return t.slice(0,e.length)===e},n=function(t,e){return t.slice(-e.length)===e},t}()}.call(this),function(){var e=function(t,e){return function(){return t.apply(e,arguments)}};t.HttpRequest=function(){function r(r,n,o){this.delegate=r,this.requestCanceled=e(this.requestCanceled,this),this.requestTimedOut=e(this.requestTimedOut,this),this.requestFailed=e(this.requestFailed,this),this.requestLoaded=e(this.requestLoaded,this),this.requestProgressed=e(this.requestProgressed,this),this.url=t.Location.wrap(n).requestURL,this.referrer=t.Location.wrap(o).absoluteURL,this.createXHR()}return r.NETWORK_FAILURE=0,r.TIMEOUT_FAILURE=-1,r.timeout=60,r.prototype.send=function(){var t;return this.xhr&&!this.sent?(this.notifyApplicationBeforeRequestStart(),this.setProgress(0),this.xhr.send(),this.sent=!0,"function"==typeof(t=this.delegate).requestStarted?t.requestStarted():void 0):void 0},r.prototype.cancel=function(){return this.xhr&&this.sent?this.xhr.abort():void 0},r.prototype.requestProgressed=function(t){return t.lengthComputable?this.setProgress(t.loaded/t.total):void 0},r.prototype.requestLoaded=function(){return this.endRequest(function(t){return function(){var e;return 200<=(e=t.xhr.status)&&300>e?t.delegate.requestCompletedWithResponse(t.xhr.responseText,t.xhr.getResponseHeader("Turbolinks-Location")):(t.failed=!0,t.delegate.requestFailedWithStatusCode(t.xhr.status,t.xhr.responseText))}}(this))},r.prototype.requestFailed=function(){return this.endRequest(function(t){return function(){return t.failed=!0,t.delegate.requestFailedWithStatusCode(t.constructor.NETWORK_FAILURE)}}(this))},r.prototype.requestTimedOut=function(){return this.endRequest(function(t){return function(){return t.failed=!0,t.delegate.requestFailedWithStatusCode(t.constructor.TIMEOUT_FAILURE)}}(this))},r.prototype.requestCanceled=function(){return this.endRequest()},r.prototype.notifyApplicationBeforeRequestStart=function(){return t.dispatch("turbolinks:request-start",{data:{url:this.url,xhr:this.xhr}})},r.prototype.notifyApplicationAfterRequestEnd=function(){return t.dispatch("turbolinks:request-end",{data:{url:this.url,xhr:this.xhr}})},r.prototype.createXHR=function(){return this.xhr=new XMLHttpRequest,this.xhr.open("GET",this.url,!0),this.xhr.timeout=1e3*this.constructor.timeout,this.xhr.setRequestHeader("Accept","text/html, application/xhtml+xml"),this.xhr.setRequestHeader("Turbolinks-Referrer",this.referrer),this.xhr.onprogress=this.requestProgressed,this.xhr.onload=this.requestLoaded,this.xhr.onerror=this.requestFailed,this.xhr.ontimeout=this.requestTimedOut,this.xhr.onabort=this.requestCanceled},r.prototype.endRequest=function(t){return this.xhr?(this.notifyApplicationAfterRequestEnd(),null!=t&&t.call(this),this.destroy()):void 0},r.prototype.setProgress=function(t){var e;return this.progress=t,"function"==typeof(e=this.delegate).requestProgressed?e.requestProgressed(this.progress):void 0},r.prototype.destroy=function(){var t;return this.setProgress(1),"function"==typeof(t=this.delegate).requestFinished&&t.requestFinished(),this.delegate=null,this.xhr=null},r}()}.call(this),function(){var e=function(t,e){return function(){return t.apply(e,arguments)}};t.ProgressBar=function(){function t(){this.trickle=e(this.trickle,this),this.stylesheetElement=this.createStylesheetElement(),this.progressElement=this.createProgressElement()}var r;return r=300,t.defaultCSS=".turbolinks-progress-bar {\n  position: fixed;\n  display: block;\n  top: 0;\n  left: 0;\n  height: 3px;\n  background: #0076ff;\n  z-index: 9999;\n  transition: width "+r+"ms ease-out, opacity "+r/2+"ms "+r/2+"ms ease-in;\n  transform: translate3d(0, 0, 0);\n}",t.prototype.show=function(){return this.visible?void 0:(this.visible=!0,this.installStylesheetElement(),this.installProgressElement(),this.startTrickling())},t.prototype.hide=function(){return this.visible&&!this.hiding?(this.hiding=!0,this.fadeProgressElement(function(t){return function(){return t.uninstallProgressElement(),t.stopTrickling(),t.visible=!1,t.hiding=!1}}(this))):void 0},t.prototype.setValue=function(t){return this.value=t,this.refresh()},t.prototype.installStylesheetElement=function(){return document.head.insertBefore(this.stylesheetElement,document.head.firstChild)},t.prototype.installProgressElement=function(){return this.progressElement.style.width=0,this.progressElement.style.opacity=1,document.documentElement.insertBefore(this.progressElement,document.body),this.refresh()},t.prototype.fadeProgressElement=function(t){return this.progressElement.style.opacity=0,setTimeout(t,1.5*r)},t.prototype.uninstallProgressElement=function(){return this.progressElement.parentNode?document.documentElement.removeChild(this.progressElement):void 0},t.prototype.startTrickling=function(){return null!=this.trickleInterval?this.trickleInterval:this.trickleInterval=setInterval(this.trickle,r)},t.prototype.stopTrickling=function(){return clearInterval(this.trickleInterval),this.trickleInterval=null},t.prototype.trickle=function(){return this.setValue(this.value+Math.random()/100)},t.prototype.refresh=function(){return requestAnimationFrame(function(t){return function(){return t.progressElement.style.width=10+90*t.value+"%"}}(this))},t.prototype.createStylesheetElement=function(){var t;return t=document.createElement("style"),t.type="text/css",t.textContent=this.constructor.defaultCSS,t},t.prototype.createProgressElement=function(){var t;return t=document.createElement("div"),t.className="turbolinks-progress-bar",t},t}()}.call(this),function(){var e=function(t,e){return function(){return t.apply(e,arguments)}};t.BrowserAdapter=function(){function r(r){this.controller=r,this.showProgressBar=e(this.showProgressBar,this),this.progressBar=new t.ProgressBar}var n,o,i,s;return s=t.HttpRequest,n=s.NETWORK_FAILURE,i=s.TIMEOUT_FAILURE,o=500,r.prototype.visitProposedToLocationWithAction=function(t,e){return this.controller.startVisitToLocationWithAction(t,e)},r.prototype.visitStarted=function(t){return t.issueRequest(),t.changeHistory(),t.loadCachedSnapshot()},r.prototype.visitRequestStarted=function(t){return this.progressBar.setValue(0),t.hasCachedSnapshot()||"restore"!==t.action?this.showProgressBarAfterDelay():this.showProgressBar()},r.prototype.visitRequestProgressed=function(t){return this.progressBar.setValue(t.progress)},r.prototype.visitRequestCompleted=function(t){return t.loadResponse()},r.prototype.visitRequestFailedWithStatusCode=function(t,e){switch(e){case n:case i:return this.reload();default:return t.loadResponse()}},r.prototype.visitRequestFinished=function(t){return this.hideProgressBar()},r.prototype.visitCompleted=function(t){return t.followRedirect()},r.prototype.pageInvalidated=function(){return this.reload()},r.prototype.showProgressBarAfterDelay=function(){return this.progressBarTimeout=setTimeout(this.showProgressBar,o)},r.prototype.showProgressBar=function(){return this.progressBar.show()},r.prototype.hideProgressBar=function(){return this.progressBar.hide(),clearTimeout(this.progressBarTimeout)},r.prototype.reload=function(){return window.location.reload()},r}()}.call(this),function(){var e,r=function(t,e){return function(){return t.apply(e,arguments)}};e=!1,addEventListener("load",function(){return t.defer(function(){return e=!0})},!1),t.History=function(){function n(t){this.delegate=t,this.onPopState=r(this.onPopState,this)}return n.prototype.start=function(){return this.started?void 0:(addEventListener("popstate",this.onPopState,!1),this.started=!0)},n.prototype.stop=function(){return this.started?(removeEventListener("popstate",this.onPopState,!1),this.started=!1):void 0},n.prototype.push=function(e,r){return e=t.Location.wrap(e),this.update("push",e,r)},n.prototype.replace=function(e,r){return e=t.Location.wrap(e),this.update("replace",e,r)},n.prototype.onPopState=function(e){var r,n,o,i;return this.shouldHandlePopState()&&(i=null!=(n=e.state)?n.turbolinks:void 0)?(r=t.Location.wrap(window.location),o=i.restorationIdentifier,this.delegate.historyPoppedToLocationWithRestorationIdentifier(r,o)):void 0},n.prototype.shouldHandlePopState=function(){return e===!0},n.prototype.update=function(t,e,r){var n;return n={turbolinks:{restorationIdentifier:r}},history[t+"State"](n,null,e)},n}()}.call(this),function(){t.Snapshot=function(){function e(t){var e,r;r=t.head,e=t.body,this.head=null!=r?r:document.createElement("head"),this.body=null!=e?e:document.createElement("body")}return e.wrap=function(t){return t instanceof this?t:this.fromHTML(t)},e.fromHTML=function(t){var e;return e=document.createElement("html"),e.innerHTML=t,this.fromElement(e)},e.fromElement=function(t){return new this({head:t.querySelector("head"),body:t.querySelector("body")})},e.prototype.clone=function(){return new e({head:this.head.cloneNode(!0),body:this.body.cloneNode(!0)})},e.prototype.getRootLocation=function(){var e,r;return r=null!=(e=this.getSetting("root"))?e:"/",new t.Location(r)},e.prototype.getCacheControlValue=function(){return this.getSetting("cache-control")},e.prototype.hasAnchor=function(t){try{return null!=this.body.querySelector("[id='"+t+"']")}catch(e){}},e.prototype.isPreviewable=function(){return"no-preview"!==this.getCacheControlValue()},e.prototype.isCacheable=function(){return"no-cache"!==this.getCacheControlValue()},e.prototype.getSetting=function(t){var e,r;return r=this.head.querySelectorAll("meta[name='turbolinks-"+t+"']"),e=r[r.length-1],null!=e?e.getAttribute("content"):void 0},e}()}.call(this),function(){var e=[].slice;t.Renderer=function(){function t(){}var r;return t.render=function(){var t,r,n,o;return n=arguments[0],r=arguments[1],t=3<=arguments.length?e.call(arguments,2):[],o=function(t,e,r){r.prototype=t.prototype;var n=new r,o=t.apply(n,e);return Object(o)===o?o:n}(this,t,function(){}),o.delegate=n,o.render(r),o},t.prototype.renderView=function(t){return this.delegate.viewWillRender(this.newBody),t(),this.delegate.viewRendered(this.newBody)},t.prototype.invalidateView=function(){return this.delegate.viewInvalidated()},t.prototype.createScriptElement=function(t){var e;return"false"===t.getAttribute("data-turbolinks-eval")?t:(e=document.createElement("script"),e.textContent=t.textContent,r(e,t),e)},r=function(t,e){var r,n,o,i,s,a,u;for(i=e.attributes,a=[],r=0,n=i.length;n>r;r++)s=i[r],o=s.name,u=s.value,a.push(t.setAttribute(o,u));return a},t}()}.call(this),function(){t.HeadDetails=function(){function t(t){var e,r,i,s,a,u,c;for(this.element=t,this.elements={},c=this.element.childNodes,s=0,u=c.length;u>s;s++)i=c[s],i.nodeType===Node.ELEMENT_NODE&&(a=i.outerHTML,r=null!=(e=this.elements)[a]?e[a]:e[a]={type:o(i),tracked:n(i),elements:[]},r.elements.push(i))}var e,r,n,o;return t.prototype.hasElementWithKey=function(t){return t in this.elements},t.prototype.getTrackedElementSignature=function(){var t,e;return function(){var r,n;r=this.elements,n=[];for(t in r)e=r[t].tracked,e&&n.push(t);return n}.call(this).join("")},t.prototype.getScriptElementsNotInDetails=function(t){return this.getElementsMatchingTypeNotInDetails("script",t)},t.prototype.getStylesheetElementsNotInDetails=function(t){return this.getElementsMatchingTypeNotInDetails("stylesheet",t)},t.prototype.getElementsMatchingTypeNotInDetails=function(t,e){var r,n,o,i,s,a;o=this.elements,s=[];for(n in o)i=o[n],a=i.type,r=i.elements,a!==t||e.hasElementWithKey(n)||s.push(r[0]);return s},t.prototype.getProvisionalElements=function(){var t,e,r,n,o,i,s;r=[],n=this.elements;for(e in n)o=n[e],s=o.type,i=o.tracked,t=o.elements,null!=s||i?t.length>1&&r.push.apply(r,t.slice(1)):r.push.apply(r,t);return r},o=function(t){return e(t)?"script":r(t)?"stylesheet":void 0},n=function(t){return"reload"===t.getAttribute("data-turbolinks-track")},e=function(t){var e;return e=t.tagName.toLowerCase(),"script"===e},r=function(t){var e;return e=t.tagName.toLowerCase(),"style"===e||"link"===e&&"stylesheet"===t.getAttribute("rel")},t}()}.call(this),function(){var e=function(t,e){function n(){this.constructor=t}for(var o in e)r.call(e,o)&&(t[o]=e[o]);return n.prototype=e.prototype,t.prototype=new n,t.__super__=e.prototype,t},r={}.hasOwnProperty;t.SnapshotRenderer=function(r){function n(e,r){this.currentSnapshot=e,this.newSnapshot=r,this.currentHeadDetails=new t.HeadDetails(this.currentSnapshot.head),this.newHeadDetails=new t.HeadDetails(this.newSnapshot.head),this.newBody=this.newSnapshot.body}return e(n,r),n.prototype.render=function(t){return this.trackedElementsAreIdentical()?(this.mergeHead(),this.renderView(function(e){return function(){return e.replaceBody(),e.focusFirstAutofocusableElement(),t()}}(this))):this.invalidateView()},n.prototype.mergeHead=function(){return this.copyNewHeadStylesheetElements(),this.copyNewHeadScriptElements(),this.removeCurrentHeadProvisionalElements(),this.copyNewHeadProvisionalElements()},n.prototype.replaceBody=function(){return this.activateBodyScriptElements(),this.importBodyPermanentElements(),this.assignNewBody()},n.prototype.trackedElementsAreIdentical=function(){return this.currentHeadDetails.getTrackedElementSignature()===this.newHeadDetails.getTrackedElementSignature()},n.prototype.copyNewHeadStylesheetElements=function(){var t,e,r,n,o;for(n=this.getNewHeadStylesheetElements(),o=[],e=0,r=n.length;r>e;e++)t=n[e],o.push(document.head.appendChild(t));return o},n.prototype.copyNewHeadScriptElements=function(){var t,e,r,n,o;for(n=this.getNewHeadScriptElements(),o=[],e=0,r=n.length;r>e;e++)t=n[e],o.push(document.head.appendChild(this.createScriptElement(t)));return o},n.prototype.removeCurrentHeadProvisionalElements=function(){var t,e,r,n,o;for(n=this.getCurrentHeadProvisionalElements(),o=[],e=0,r=n.length;r>e;e++)t=n[e],o.push(document.head.removeChild(t));return o},n.prototype.copyNewHeadProvisionalElements=function(){var t,e,r,n,o;for(n=this.getNewHeadProvisionalElements(),o=[],e=0,r=n.length;r>e;e++)t=n[e],o.push(document.head.appendChild(t));return o},n.prototype.importBodyPermanentElements=function(){var t,e,r,n,o,i;for(n=this.getNewBodyPermanentElements(),i=[],e=0,r=n.length;r>e;e++)o=n[e],(t=this.findCurrentBodyPermanentElement(o))?i.push(o.parentNode.replaceChild(t,o)):i.push(void 0);return i},n.prototype.activateBodyScriptElements=function(){var t,e,r,n,o,i;for(n=this.getNewBodyScriptElements(),i=[],e=0,r=n.length;r>e;e++)o=n[e],t=this.createScriptElement(o),i.push(o.parentNode.replaceChild(t,o));return i},n.prototype.assignNewBody=function(){return document.body=this.newBody},n.prototype.focusFirstAutofocusableElement=function(){var t;return null!=(t=this.findFirstAutofocusableElement())?t.focus():void 0},n.prototype.getNewHeadStylesheetElements=function(){return this.newHeadDetails.getStylesheetElementsNotInDetails(this.currentHeadDetails)},n.prototype.getNewHeadScriptElements=function(){return this.newHeadDetails.getScriptElementsNotInDetails(this.currentHeadDetails)},n.prototype.getCurrentHeadProvisionalElements=function(){return this.currentHeadDetails.getProvisionalElements()},n.prototype.getNewHeadProvisionalElements=function(){return this.newHeadDetails.getProvisionalElements()},n.prototype.getNewBodyPermanentElements=function(){return this.newBody.querySelectorAll("[id][data-turbolinks-permanent]")},n.prototype.findCurrentBodyPermanentElement=function(t){return document.body.querySelector("#"+t.id+"[data-turbolinks-permanent]")},n.prototype.getNewBodyScriptElements=function(){return this.newBody.querySelectorAll("script")},n.prototype.findFirstAutofocusableElement=function(){return document.body.querySelector("[autofocus]")},n}(t.Renderer)}.call(this),function(){var e=function(t,e){function n(){this.constructor=t}for(var o in e)r.call(e,o)&&(t[o]=e[o]);return n.prototype=e.prototype,t.prototype=new n,t.__super__=e.prototype,t},r={}.hasOwnProperty;t.ErrorRenderer=function(t){function r(t){this.html=t}return e(r,t),r.prototype.render=function(t){return this.renderView(function(e){return function(){return e.replaceDocumentHTML(),e.activateBodyScriptElements(),t()}}(this))},r.prototype.replaceDocumentHTML=function(){return document.documentElement.innerHTML=this.html},r.prototype.activateBodyScriptElements=function(){var t,e,r,n,o,i;for(n=this.getScriptElements(),i=[],e=0,r=n.length;r>e;e++)o=n[e],t=this.createScriptElement(o),i.push(o.parentNode.replaceChild(t,o));return i},r.prototype.getScriptElements=function(){return document.documentElement.querySelectorAll("script")},r}(t.Renderer)}.call(this),function(){t.View=function(){function e(t){this.delegate=t,this.element=document.documentElement}return e.prototype.getRootLocation=function(){return this.getSnapshot().getRootLocation()},e.prototype.getSnapshot=function(){return t.Snapshot.fromElement(this.element)},e.prototype.render=function(t,e){var r,n,o;return o=t.snapshot,r=t.error,n=t.isPreview,this.markAsPreview(n),null!=o?this.renderSnapshot(o,e):this.renderError(r,e)},e.prototype.markAsPreview=function(t){return t?this.element.setAttribute("data-turbolinks-preview",""):this.element.removeAttribute("data-turbolinks-preview")},e.prototype.renderSnapshot=function(e,r){return t.SnapshotRenderer.render(this.delegate,r,this.getSnapshot(),t.Snapshot.wrap(e))},e.prototype.renderError=function(e,r){return t.ErrorRenderer.render(this.delegate,r,e)},e}()}.call(this),function(){var e=function(t,e){return function(){return t.apply(e,arguments)}};t.ScrollManager=function(){function t(t){this.delegate=t,this.onScroll=e(this.onScroll,this)}return t.prototype.start=function(){return this.started?void 0:(addEventListener("scroll",this.onScroll,!1),this.onScroll(),this.started=!0)},t.prototype.stop=function(){return this.started?(removeEventListener("scroll",this.onScroll,!1),this.started=!1):void 0},t.prototype.scrollToElement=function(t){return t.scrollIntoView()},t.prototype.scrollToPosition=function(t){var e,r;return e=t.x,r=t.y,window.scrollTo(e,r)},t.prototype.onScroll=function(t){return this.updatePosition({x:window.pageXOffset,y:window.pageYOffset})},t.prototype.updatePosition=function(t){var e;return this.position=t,null!=(e=this.delegate)?e.scrollPositionChanged(this.position):void 0},t}()}.call(this),function(){t.SnapshotCache=function(){function e(t){this.size=t,this.keys=[],this.snapshots={}}var r;return e.prototype.has=function(t){var e;return e=r(t),e in this.snapshots},e.prototype.get=function(t){var e;if(this.has(t))return e=this.read(t),this.touch(t),e},e.prototype.put=function(t,e){return this.write(t,e),this.touch(t),e},e.prototype.read=function(t){var e;return e=r(t),this.snapshots[e]},e.prototype.write=function(t,e){var n;return n=r(t),this.snapshots[n]=e},e.prototype.touch=function(t){var e,n;return n=r(t),e=this.keys.indexOf(n),e>-1&&this.keys.splice(e,1),this.keys.unshift(n),this.trim()},e.prototype.trim=function(){var t,e,r,n,o;for(n=this.keys.splice(this.size),o=[],t=0,r=n.length;r>t;t++)e=n[t],o.push(delete this.snapshots[e]);return o},r=function(e){return t.Location.wrap(e).toCacheKey()},e}()}.call(this),function(){var e=function(t,e){return function(){return t.apply(e,arguments)}};t.Visit=function(){function r(r,n,o){this.controller=r,this.action=o,this.performScroll=e(this.performScroll,this),this.identifier=t.uuid(),this.location=t.Location.wrap(n),this.adapter=this.controller.adapter,this.state="initialized",this.timingMetrics={}}var n;return r.prototype.start=function(){return"initialized"===this.state?(this.recordTimingMetric("visitStart"),this.state="started",this.adapter.visitStarted(this)):void 0},r.prototype.cancel=function(){var t;return"started"===this.state?(null!=(t=this.request)&&t.cancel(),this.cancelRender(),this.state="canceled"):void 0},r.prototype.complete=function(){var t;return"started"===this.state?(this.recordTimingMetric("visitEnd"),this.state="completed","function"==typeof(t=this.adapter).visitCompleted&&t.visitCompleted(this),this.controller.visitCompleted(this)):void 0},r.prototype.fail=function(){var t;return"started"===this.state?(this.state="failed","function"==typeof(t=this.adapter).visitFailed?t.visitFailed(this):void 0):void 0},r.prototype.changeHistory=function(){var t,e;return this.historyChanged?void 0:(t=this.location.isEqualTo(this.referrer)?"replace":this.action,e=n(t),this.controller[e](this.location,this.restorationIdentifier),this.historyChanged=!0)},r.prototype.issueRequest=function(){return this.shouldIssueRequest()&&null==this.request?(this.progress=0,this.request=new t.HttpRequest(this,this.location,this.referrer),this.request.send()):void 0},r.prototype.getCachedSnapshot=function(){var t;return!(t=this.controller.getCachedSnapshotForLocation(this.location))||null!=this.location.anchor&&!t.hasAnchor(this.location.anchor)||"restore"!==this.action&&!t.isPreviewable()?void 0:t},r.prototype.hasCachedSnapshot=function(){return null!=this.getCachedSnapshot()},r.prototype.loadCachedSnapshot=function(){var t,e;return(e=this.getCachedSnapshot())?(t=this.shouldIssueRequest(),this.render(function(){var r;return this.cacheSnapshot(),this.controller.render({snapshot:e,isPreview:t},this.performScroll),"function"==typeof(r=this.adapter).visitRendered&&r.visitRendered(this),t?void 0:this.complete()})):void 0},r.prototype.loadResponse=function(){return null!=this.response?this.render(function(){var t,e;return this.cacheSnapshot(),this.request.failed?(this.controller.render({error:this.response},this.performScroll),"function"==typeof(t=this.adapter).visitRendered&&t.visitRendered(this),this.fail()):(this.controller.render({snapshot:this.response},this.performScroll),"function"==typeof(e=this.adapter).visitRendered&&e.visitRendered(this),this.complete())}):void 0},r.prototype.followRedirect=function(){return this.redirectedToLocation&&!this.followedRedirect?(this.location=this.redirectedToLocation,this.controller.replaceHistoryWithLocationAndRestorationIdentifier(this.redirectedToLocation,this.restorationIdentifier),this.followedRedirect=!0):void 0},r.prototype.requestStarted=function(){var t;return this.recordTimingMetric("requestStart"),"function"==typeof(t=this.adapter).visitRequestStarted?t.visitRequestStarted(this):void 0},r.prototype.requestProgressed=function(t){var e;return this.progress=t,"function"==typeof(e=this.adapter).visitRequestProgressed?e.visitRequestProgressed(this):void 0},r.prototype.requestCompletedWithResponse=function(e,r){return this.response=e,null!=r&&(this.redirectedToLocation=t.Location.wrap(r)),this.adapter.visitRequestCompleted(this)},r.prototype.requestFailedWithStatusCode=function(t,e){return this.response=e,this.adapter.visitRequestFailedWithStatusCode(this,t)},r.prototype.requestFinished=function(){var t;return this.recordTimingMetric("requestEnd"),"function"==typeof(t=this.adapter).visitRequestFinished?t.visitRequestFinished(this):void 0},r.prototype.performScroll=function(){return this.scrolled?void 0:("restore"===this.action?this.scrollToRestoredPosition()||this.scrollToTop():this.scrollToAnchor()||this.scrollToTop(),this.scrolled=!0)},r.prototype.scrollToRestoredPosition=function(){var t,e;return t=null!=(e=this.restorationData)?e.scrollPosition:void 0,null!=t?(this.controller.scrollToPosition(t),!0):void 0},r.prototype.scrollToAnchor=function(){return null!=this.location.anchor?(this.controller.scrollToAnchor(this.location.anchor),!0):void 0},r.prototype.scrollToTop=function(){return this.controller.scrollToPosition({x:0,y:0})},r.prototype.recordTimingMetric=function(t){var e;return null!=(e=this.timingMetrics)[t]?e[t]:e[t]=(new Date).getTime()},r.prototype.getTimingMetrics=function(){return t.copyObject(this.timingMetrics)},n=function(t){switch(t){case"replace":return"replaceHistoryWithLocationAndRestorationIdentifier";case"advance":case"restore":return"pushHistoryWithLocationAndRestorationIdentifier"}},r.prototype.shouldIssueRequest=function(){return"restore"===this.action?!this.hasCachedSnapshot():!0},r.prototype.cacheSnapshot=function(){return this.snapshotCached?void 0:(this.controller.cacheSnapshot(),this.snapshotCached=!0)},r.prototype.render=function(t){return this.cancelRender(),this.frame=requestAnimationFrame(function(e){return function(){return e.frame=null,t.call(e)}}(this))},r.prototype.cancelRender=function(){return this.frame?cancelAnimationFrame(this.frame):void 0},r}()}.call(this),function(){var e=function(t,e){return function(){return t.apply(e,arguments)}};t.Controller=function(){function r(){this.clickBubbled=e(this.clickBubbled,this),this.clickCaptured=e(this.clickCaptured,this),this.pageLoaded=e(this.pageLoaded,this),this.history=new t.History(this),this.view=new t.View(this),this.scrollManager=new t.ScrollManager(this),this.restorationData={},this.clearCache()}return r.prototype.start=function(){return t.supported&&!this.started?(addEventListener("click",this.clickCaptured,!0),addEventListener("DOMContentLoaded",this.pageLoaded,!1),this.scrollManager.start(),this.startHistory(),this.started=!0,this.enabled=!0):void 0},r.prototype.disable=function(){return this.enabled=!1},r.prototype.stop=function(){return this.started?(removeEventListener("click",this.clickCaptured,!0),removeEventListener("DOMContentLoaded",this.pageLoaded,!1),this.scrollManager.stop(),this.stopHistory(),this.started=!1):void 0},r.prototype.clearCache=function(){return this.cache=new t.SnapshotCache(10)},r.prototype.visit=function(e,r){var n,o;return null==r&&(r={}),e=t.Location.wrap(e),this.applicationAllowsVisitingLocation(e)?this.locationIsVisitable(e)?(n=null!=(o=r.action)?o:"advance",this.adapter.visitProposedToLocationWithAction(e,n)):window.location=e:void 0},r.prototype.startVisitToLocationWithAction=function(e,r,n){var o;return t.supported?(o=this.getRestorationDataForIdentifier(n),this.startVisit(e,r,{restorationData:o})):window.location=e},r.prototype.startHistory=function(){return this.location=t.Location.wrap(window.location),this.restorationIdentifier=t.uuid(),this.history.start(),this.history.replace(this.location,this.restorationIdentifier)},r.prototype.stopHistory=function(){return this.history.stop()},r.prototype.pushHistoryWithLocationAndRestorationIdentifier=function(e,r){return this.restorationIdentifier=r,this.location=t.Location.wrap(e),this.history.push(this.location,this.restorationIdentifier)},r.prototype.replaceHistoryWithLocationAndRestorationIdentifier=function(e,r){return this.restorationIdentifier=r,this.location=t.Location.wrap(e),this.history.replace(this.location,this.restorationIdentifier)},r.prototype.historyPoppedToLocationWithRestorationIdentifier=function(e,r){var n;return this.restorationIdentifier=r,this.enabled?(n=this.getRestorationDataForIdentifier(this.restorationIdentifier),this.startVisit(e,"restore",{restorationIdentifier:this.restorationIdentifier,restorationData:n,historyChanged:!0}),this.location=t.Location.wrap(e)):this.adapter.pageInvalidated()},r.prototype.getCachedSnapshotForLocation=function(t){var e;return e=this.cache.get(t),e?e.clone():void 0},r.prototype.shouldCacheSnapshot=function(){return this.view.getSnapshot().isCacheable()},r.prototype.cacheSnapshot=function(){var t;return this.shouldCacheSnapshot()?(this.notifyApplicationBeforeCachingSnapshot(),t=this.view.getSnapshot(),this.cache.put(this.lastRenderedLocation,t.clone())):void 0},r.prototype.scrollToAnchor=function(t){var e;return(e=document.getElementById(t))?this.scrollToElement(e):this.scrollToPosition({x:0,y:0})},r.prototype.scrollToElement=function(t){return this.scrollManager.scrollToElement(t)},r.prototype.scrollToPosition=function(t){return this.scrollManager.scrollToPosition(t)},r.prototype.scrollPositionChanged=function(t){var e;return e=this.getCurrentRestorationData(),e.scrollPosition=t},r.prototype.render=function(t,e){return this.view.render(t,e)},r.prototype.viewInvalidated=function(){return this.adapter.pageInvalidated()},r.prototype.viewWillRender=function(t){return this.notifyApplicationBeforeRender(t)},r.prototype.viewRendered=function(){return this.lastRenderedLocation=this.currentVisit.location,this.notifyApplicationAfterRender()},r.prototype.pageLoaded=function(){return this.lastRenderedLocation=this.location,this.notifyApplicationAfterPageLoad()},r.prototype.clickCaptured=function(){return removeEventListener("click",this.clickBubbled,!1),addEventListener("click",this.clickBubbled,!1)},r.prototype.clickBubbled=function(t){var e,r,n;return this.enabled&&this.clickEventIsSignificant(t)&&(r=this.getVisitableLinkForNode(t.target))&&(n=this.getVisitableLocationForLink(r))&&this.applicationAllowsFollowingLinkToLocation(r,n)?(t.preventDefault(),e=this.getActionForLink(r),this.visit(n,{action:e})):void 0},r.prototype.applicationAllowsFollowingLinkToLocation=function(t,e){var r;return r=this.notifyApplicationAfterClickingLinkToLocation(t,e),!r.defaultPrevented},r.prototype.applicationAllowsVisitingLocation=function(t){var e;return e=this.notifyApplicationBeforeVisitingLocation(t),!e.defaultPrevented},r.prototype.notifyApplicationAfterClickingLinkToLocation=function(e,r){return t.dispatch("turbolinks:click",{target:e,data:{url:r.absoluteURL},cancelable:!0})},r.prototype.notifyApplicationBeforeVisitingLocation=function(e){return t.dispatch("turbolinks:before-visit",{data:{url:e.absoluteURL},cancelable:!0})},r.prototype.notifyApplicationAfterVisitingLocation=function(e){return t.dispatch("turbolinks:visit",{data:{url:e.absoluteURL}})},r.prototype.notifyApplicationBeforeCachingSnapshot=function(){return t.dispatch("turbolinks:before-cache")},r.prototype.notifyApplicationBeforeRender=function(e){return t.dispatch("turbolinks:before-render",{data:{newBody:e}})},r.prototype.notifyApplicationAfterRender=function(){return t.dispatch("turbolinks:render")},r.prototype.notifyApplicationAfterPageLoad=function(e){return null==e&&(e={}),t.dispatch("turbolinks:load",{data:{url:this.location.absoluteURL,timing:e}})},r.prototype.startVisit=function(t,e,r){var n;return null!=(n=this.currentVisit)&&n.cancel(),this.currentVisit=this.createVisit(t,e,r),this.currentVisit.start(),this.notifyApplicationAfterVisitingLocation(t)},r.prototype.createVisit=function(e,r,n){
                                                                                                                                                                                                                                                                                      public/assets/application-b34af937661b1e622cea2d933ff65194efa8c7968c100e4a1364a2a317ea4460.js on lines 11570..11570
                                                                                                                                                                                                                                                                                      public/assets/application-b34af937661b1e622cea2d933ff65194efa8c7968c100e4a1364a2a317ea4460.js on lines 11570..11570

                                                                                                                                                                                                                                                                                      Duplicated Code

                                                                                                                                                                                                                                                                                      Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                                                                                                                                                                                                                                                                                      Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                                                                                                                                                                                                                                                                                      When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                                                                                                                                                                                                                                                                                      Tuning

                                                                                                                                                                                                                                                                                      This issue has a mass of 119.

                                                                                                                                                                                                                                                                                      We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                                                                                                                                                                                                                                                                                      The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                                                                                                                                                                                                                                                                                      If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                                                                                                                                                                                                                                                                                      See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                                                                                                                                                                                                                                                                                      Refactorings

                                                                                                                                                                                                                                                                                      Further Reading

                                                                                                                                                                                                                                                                                      Similar blocks of code found in 2 locations. Consider refactoring.
                                                                                                                                                                                                                                                                                      Open

                                                                                                                                                                                                                                                                                                      event.pageX = original.clientX +
                                                                                                                                                                                                                                                                                                          ( doc && doc.scrollLeft || body && body.scrollLeft || 0 ) -
                                                                                                                                                                                                                                                                                                          ( doc && doc.clientLeft || body && body.clientLeft || 0 );
                                                                                                                                                                                                                                                                                      public/assets/application-b34af937661b1e622cea2d933ff65194efa8c7968c100e4a1364a2a317ea4460.js on lines 5382..5384

                                                                                                                                                                                                                                                                                      Duplicated Code

                                                                                                                                                                                                                                                                                      Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                                                                                                                                                                                                                                                                                      Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                                                                                                                                                                                                                                                                                      When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                                                                                                                                                                                                                                                                                      Tuning

                                                                                                                                                                                                                                                                                      This issue has a mass of 71.

                                                                                                                                                                                                                                                                                      We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                                                                                                                                                                                                                                                                                      The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                                                                                                                                                                                                                                                                                      If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                                                                                                                                                                                                                                                                                      See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                                                                                                                                                                                                                                                                                      Refactorings

                                                                                                                                                                                                                                                                                      Further Reading

                                                                                                                                                                                                                                                                                      Similar blocks of code found in 2 locations. Consider refactoring.
                                                                                                                                                                                                                                                                                      Open

                                                                                                                                                                                                                                                                                                      event.pageY = original.clientY +
                                                                                                                                                                                                                                                                                                          ( doc && doc.scrollTop  || body && body.scrollTop  || 0 ) -
                                                                                                                                                                                                                                                                                                          ( doc && doc.clientTop  || body && body.clientTop  || 0 );
                                                                                                                                                                                                                                                                                      public/assets/application-b34af937661b1e622cea2d933ff65194efa8c7968c100e4a1364a2a317ea4460.js on lines 5379..5381

                                                                                                                                                                                                                                                                                      Duplicated Code

                                                                                                                                                                                                                                                                                      Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                                                                                                                                                                                                                                                                                      Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                                                                                                                                                                                                                                                                                      When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                                                                                                                                                                                                                                                                                      Tuning

                                                                                                                                                                                                                                                                                      This issue has a mass of 71.

                                                                                                                                                                                                                                                                                      We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                                                                                                                                                                                                                                                                                      The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                                                                                                                                                                                                                                                                                      If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                                                                                                                                                                                                                                                                                      See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                                                                                                                                                                                                                                                                                      Refactorings

                                                                                                                                                                                                                                                                                      Further Reading

                                                                                                                                                                                                                                                                                      Similar blocks of code found in 2 locations. Consider refactoring.
                                                                                                                                                                                                                                                                                      Open

                                                                                                                                                                                                                                                                                            $($.rails.enableSelector).each(function () {
                                                                                                                                                                                                                                                                                              var element = $(this);
                                                                                                                                                                                                                                                                                      
                                                                                                                                                                                                                                                                                              if (element.data('ujs:disabled')) {
                                                                                                                                                                                                                                                                                                $.rails.enableFormElement(element);
                                                                                                                                                                                                                                                                                      public/assets/application-b34af937661b1e622cea2d933ff65194efa8c7968c100e4a1364a2a317ea4460.js on lines 11419..11425

                                                                                                                                                                                                                                                                                      Duplicated Code

                                                                                                                                                                                                                                                                                      Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                                                                                                                                                                                                                                                                                      Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                                                                                                                                                                                                                                                                                      When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                                                                                                                                                                                                                                                                                      Tuning

                                                                                                                                                                                                                                                                                      This issue has a mass of 69.

                                                                                                                                                                                                                                                                                      We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                                                                                                                                                                                                                                                                                      The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                                                                                                                                                                                                                                                                                      If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                                                                                                                                                                                                                                                                                      See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                                                                                                                                                                                                                                                                                      Refactorings

                                                                                                                                                                                                                                                                                      Further Reading

                                                                                                                                                                                                                                                                                      Similar blocks of code found in 2 locations. Consider refactoring.
                                                                                                                                                                                                                                                                                      Open

                                                                                                                                                                                                                                                                                            $($.rails.linkDisableSelector).each(function () {
                                                                                                                                                                                                                                                                                              var element = $(this);
                                                                                                                                                                                                                                                                                      
                                                                                                                                                                                                                                                                                              if (element.data('ujs:disabled')) {
                                                                                                                                                                                                                                                                                                $.rails.enableElement(element);
                                                                                                                                                                                                                                                                                      public/assets/application-b34af937661b1e622cea2d933ff65194efa8c7968c100e4a1364a2a317ea4460.js on lines 11411..11417

                                                                                                                                                                                                                                                                                      Duplicated Code

                                                                                                                                                                                                                                                                                      Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                                                                                                                                                                                                                                                                                      Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                                                                                                                                                                                                                                                                                      When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                                                                                                                                                                                                                                                                                      Tuning

                                                                                                                                                                                                                                                                                      This issue has a mass of 69.

                                                                                                                                                                                                                                                                                      We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                                                                                                                                                                                                                                                                                      The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                                                                                                                                                                                                                                                                                      If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                                                                                                                                                                                                                                                                                      See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                                                                                                                                                                                                                                                                                      Refactorings

                                                                                                                                                                                                                                                                                      Further Reading

                                                                                                                                                                                                                                                                                      Similar blocks of code found in 2 locations. Consider refactoring.
                                                                                                                                                                                                                                                                                      Open

                                                                                                                                                                                                                                                                                              if ( jQuery.isFunction( value ) ) {
                                                                                                                                                                                                                                                                                                  return this.each( function( j ) {
                                                                                                                                                                                                                                                                                                      jQuery( this ).addClass( value.call( this, j, getClass( this ) ) );
                                                                                                                                                                                                                                                                                                  } );
                                                                                                                                                                                                                                                                                              }
                                                                                                                                                                                                                                                                                      public/assets/application-b34af937661b1e622cea2d933ff65194efa8c7968c100e4a1364a2a317ea4460.js on lines 8851..8855

                                                                                                                                                                                                                                                                                      Duplicated Code

                                                                                                                                                                                                                                                                                      Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                                                                                                                                                                                                                                                                                      Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                                                                                                                                                                                                                                                                                      When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                                                                                                                                                                                                                                                                                      Tuning

                                                                                                                                                                                                                                                                                      This issue has a mass of 61.

                                                                                                                                                                                                                                                                                      We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                                                                                                                                                                                                                                                                                      The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                                                                                                                                                                                                                                                                                      If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                                                                                                                                                                                                                                                                                      See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                                                                                                                                                                                                                                                                                      Refactorings

                                                                                                                                                                                                                                                                                      Further Reading

                                                                                                                                                                                                                                                                                      Similar blocks of code found in 2 locations. Consider refactoring.
                                                                                                                                                                                                                                                                                      Open

                                                                                                                                                                                                                                                                                              if ( jQuery.isFunction( value ) ) {
                                                                                                                                                                                                                                                                                                  return this.each( function( j ) {
                                                                                                                                                                                                                                                                                                      jQuery( this ).removeClass( value.call( this, j, getClass( this ) ) );
                                                                                                                                                                                                                                                                                                  } );
                                                                                                                                                                                                                                                                                              }
                                                                                                                                                                                                                                                                                      public/assets/application-b34af937661b1e622cea2d933ff65194efa8c7968c100e4a1364a2a317ea4460.js on lines 8813..8817

                                                                                                                                                                                                                                                                                      Duplicated Code

                                                                                                                                                                                                                                                                                      Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                                                                                                                                                                                                                                                                                      Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                                                                                                                                                                                                                                                                                      When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                                                                                                                                                                                                                                                                                      Tuning

                                                                                                                                                                                                                                                                                      This issue has a mass of 61.

                                                                                                                                                                                                                                                                                      We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                                                                                                                                                                                                                                                                                      The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                                                                                                                                                                                                                                                                                      If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                                                                                                                                                                                                                                                                                      See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                                                                                                                                                                                                                                                                                      Refactorings

                                                                                                                                                                                                                                                                                      Further Reading

                                                                                                                                                                                                                                                                                      Similar blocks of code found in 2 locations. Consider refactoring.
                                                                                                                                                                                                                                                                                      Open

                                                                                                                                                                                                                                                                                          disableFormElements: function(form) {
                                                                                                                                                                                                                                                                                            rails.formElements(form, rails.disableSelector).each(function() {
                                                                                                                                                                                                                                                                                              rails.disableFormElement($(this));
                                                                                                                                                                                                                                                                                            });
                                                                                                                                                                                                                                                                                          },
                                                                                                                                                                                                                                                                                      public/assets/application-b34af937661b1e622cea2d933ff65194efa8c7968c100e4a1364a2a317ea4460.js on lines 11277..11281

                                                                                                                                                                                                                                                                                      Duplicated Code

                                                                                                                                                                                                                                                                                      Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                                                                                                                                                                                                                                                                                      Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                                                                                                                                                                                                                                                                                      When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                                                                                                                                                                                                                                                                                      Tuning

                                                                                                                                                                                                                                                                                      This issue has a mass of 57.

                                                                                                                                                                                                                                                                                      We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                                                                                                                                                                                                                                                                                      The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                                                                                                                                                                                                                                                                                      If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                                                                                                                                                                                                                                                                                      See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                                                                                                                                                                                                                                                                                      Refactorings

                                                                                                                                                                                                                                                                                      Further Reading

                                                                                                                                                                                                                                                                                      Similar blocks of code found in 2 locations. Consider refactoring.
                                                                                                                                                                                                                                                                                      Open

                                                                                                                                                                                                                                                                                          enableFormElements: function(form) {
                                                                                                                                                                                                                                                                                            rails.formElements(form, rails.enableSelector).each(function() {
                                                                                                                                                                                                                                                                                              rails.enableFormElement($(this));
                                                                                                                                                                                                                                                                                            });
                                                                                                                                                                                                                                                                                          },
                                                                                                                                                                                                                                                                                      public/assets/application-b34af937661b1e622cea2d933ff65194efa8c7968c100e4a1364a2a317ea4460.js on lines 11252..11256

                                                                                                                                                                                                                                                                                      Duplicated Code

                                                                                                                                                                                                                                                                                      Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                                                                                                                                                                                                                                                                                      Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                                                                                                                                                                                                                                                                                      When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                                                                                                                                                                                                                                                                                      Tuning

                                                                                                                                                                                                                                                                                      This issue has a mass of 57.

                                                                                                                                                                                                                                                                                      We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                                                                                                                                                                                                                                                                                      The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                                                                                                                                                                                                                                                                                      If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                                                                                                                                                                                                                                                                                      See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                                                                                                                                                                                                                                                                                      Refactorings

                                                                                                                                                                                                                                                                                      Further Reading

                                                                                                                                                                                                                                                                                      Similar blocks of code found in 2 locations. Consider refactoring.
                                                                                                                                                                                                                                                                                      Open

                                                                                                                                                                                                                                                                                              if ( jQuery.isFunction( html ) ) {
                                                                                                                                                                                                                                                                                                  return this.each( function( i ) {
                                                                                                                                                                                                                                                                                                      jQuery( this ).wrapInner( html.call( this, i ) );
                                                                                                                                                                                                                                                                                                  } );
                                                                                                                                                                                                                                                                                              }
                                                                                                                                                                                                                                                                                      public/assets/application-b34af937661b1e622cea2d933ff65194efa8c7968c100e4a1364a2a317ea4460.js on lines 9919..9923

                                                                                                                                                                                                                                                                                      Duplicated Code

                                                                                                                                                                                                                                                                                      Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                                                                                                                                                                                                                                                                                      Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                                                                                                                                                                                                                                                                                      When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                                                                                                                                                                                                                                                                                      Tuning

                                                                                                                                                                                                                                                                                      This issue has a mass of 56.

                                                                                                                                                                                                                                                                                      We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                                                                                                                                                                                                                                                                                      The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                                                                                                                                                                                                                                                                                      If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                                                                                                                                                                                                                                                                                      See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                                                                                                                                                                                                                                                                                      Refactorings

                                                                                                                                                                                                                                                                                      Further Reading

                                                                                                                                                                                                                                                                                      Similar blocks of code found in 2 locations. Consider refactoring.
                                                                                                                                                                                                                                                                                      Open

                                                                                                                                                                                                                                                                                              if ( jQuery.isFunction( html ) ) {
                                                                                                                                                                                                                                                                                                  return this.each( function( i ) {
                                                                                                                                                                                                                                                                                                      jQuery( this ).wrapAll( html.call( this, i ) );
                                                                                                                                                                                                                                                                                                  } );
                                                                                                                                                                                                                                                                                              }
                                                                                                                                                                                                                                                                                      public/assets/application-b34af937661b1e622cea2d933ff65194efa8c7968c100e4a1364a2a317ea4460.js on lines 9949..9953

                                                                                                                                                                                                                                                                                      Duplicated Code

                                                                                                                                                                                                                                                                                      Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                                                                                                                                                                                                                                                                                      Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                                                                                                                                                                                                                                                                                      When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                                                                                                                                                                                                                                                                                      Tuning

                                                                                                                                                                                                                                                                                      This issue has a mass of 56.

                                                                                                                                                                                                                                                                                      We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                                                                                                                                                                                                                                                                                      The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                                                                                                                                                                                                                                                                                      If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                                                                                                                                                                                                                                                                                      See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                                                                                                                                                                                                                                                                                      Refactorings

                                                                                                                                                                                                                                                                                      Further Reading

                                                                                                                                                                                                                                                                                      Similar blocks of code found in 2 locations. Consider refactoring.
                                                                                                                                                                                                                                                                                      Open

                                                                                                                                                                                                                                                                                              if (handleRemote === false) {
                                                                                                                                                                                                                                                                                                rails.enableElement(link);
                                                                                                                                                                                                                                                                                              } else {
                                                                                                                                                                                                                                                                                                handleRemote.fail( function() { rails.enableElement(link); } );
                                                                                                                                                                                                                                                                                              }
                                                                                                                                                                                                                                                                                      public/assets/application-b34af937661b1e622cea2d933ff65194efa8c7968c100e4a1364a2a317ea4460.js on lines 11469..11473

                                                                                                                                                                                                                                                                                      Duplicated Code

                                                                                                                                                                                                                                                                                      Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                                                                                                                                                                                                                                                                                      Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                                                                                                                                                                                                                                                                                      When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                                                                                                                                                                                                                                                                                      Tuning

                                                                                                                                                                                                                                                                                      This issue has a mass of 55.

                                                                                                                                                                                                                                                                                      We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                                                                                                                                                                                                                                                                                      The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                                                                                                                                                                                                                                                                                      If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                                                                                                                                                                                                                                                                                      See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                                                                                                                                                                                                                                                                                      Refactorings

                                                                                                                                                                                                                                                                                      Further Reading

                                                                                                                                                                                                                                                                                      Similar blocks of code found in 2 locations. Consider refactoring.
                                                                                                                                                                                                                                                                                      Open

                                                                                                                                                                                                                                                                                            if (handleRemote === false) {
                                                                                                                                                                                                                                                                                              rails.enableFormElement(button);
                                                                                                                                                                                                                                                                                            } else {
                                                                                                                                                                                                                                                                                              handleRemote.fail( function() { rails.enableFormElement(button); } );
                                                                                                                                                                                                                                                                                            }
                                                                                                                                                                                                                                                                                      public/assets/application-b34af937661b1e622cea2d933ff65194efa8c7968c100e4a1364a2a317ea4460.js on lines 11447..11451

                                                                                                                                                                                                                                                                                      Duplicated Code

                                                                                                                                                                                                                                                                                      Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                                                                                                                                                                                                                                                                                      Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                                                                                                                                                                                                                                                                                      When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                                                                                                                                                                                                                                                                                      Tuning

                                                                                                                                                                                                                                                                                      This issue has a mass of 55.

                                                                                                                                                                                                                                                                                      We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                                                                                                                                                                                                                                                                                      The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                                                                                                                                                                                                                                                                                      If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                                                                                                                                                                                                                                                                                      See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                                                                                                                                                                                                                                                                                      Refactorings

                                                                                                                                                                                                                                                                                      Further Reading

                                                                                                                                                                                                                                                                                      Similar blocks of code found in 2 locations. Consider refactoring.
                                                                                                                                                                                                                                                                                      Open

                                                                                                                                                                                                                                                                                              "odd": createPositionalPseudo(function( matchIndexes, length ) {
                                                                                                                                                                                                                                                                                                  var i = 1;
                                                                                                                                                                                                                                                                                                  for ( ; i < length; i += 2 ) {
                                                                                                                                                                                                                                                                                                      matchIndexes.push( i );
                                                                                                                                                                                                                                                                                                  }
                                                                                                                                                                                                                                                                                      public/assets/application-b34af937661b1e622cea2d933ff65194efa8c7968c100e4a1364a2a317ea4460.js on lines 2049..2055

                                                                                                                                                                                                                                                                                      Duplicated Code

                                                                                                                                                                                                                                                                                      Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                                                                                                                                                                                                                                                                                      Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                                                                                                                                                                                                                                                                                      When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                                                                                                                                                                                                                                                                                      Tuning

                                                                                                                                                                                                                                                                                      This issue has a mass of 54.

                                                                                                                                                                                                                                                                                      We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                                                                                                                                                                                                                                                                                      The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                                                                                                                                                                                                                                                                                      If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                                                                                                                                                                                                                                                                                      See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                                                                                                                                                                                                                                                                                      Refactorings

                                                                                                                                                                                                                                                                                      Further Reading

                                                                                                                                                                                                                                                                                      Similar blocks of code found in 2 locations. Consider refactoring.
                                                                                                                                                                                                                                                                                      Open

                                                                                                                                                                                                                                                                                              "even": createPositionalPseudo(function( matchIndexes, length ) {
                                                                                                                                                                                                                                                                                                  var i = 0;
                                                                                                                                                                                                                                                                                                  for ( ; i < length; i += 2 ) {
                                                                                                                                                                                                                                                                                                      matchIndexes.push( i );
                                                                                                                                                                                                                                                                                                  }
                                                                                                                                                                                                                                                                                      public/assets/application-b34af937661b1e622cea2d933ff65194efa8c7968c100e4a1364a2a317ea4460.js on lines 2057..2063

                                                                                                                                                                                                                                                                                      Duplicated Code

                                                                                                                                                                                                                                                                                      Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                                                                                                                                                                                                                                                                                      Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                                                                                                                                                                                                                                                                                      When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                                                                                                                                                                                                                                                                                      Tuning

                                                                                                                                                                                                                                                                                      This issue has a mass of 54.

                                                                                                                                                                                                                                                                                      We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                                                                                                                                                                                                                                                                                      The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                                                                                                                                                                                                                                                                                      If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                                                                                                                                                                                                                                                                                      See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                                                                                                                                                                                                                                                                                      Refactorings

                                                                                                                                                                                                                                                                                      Further Reading

                                                                                                                                                                                                                                                                                      Similar blocks of code found in 2 locations. Consider refactoring.
                                                                                                                                                                                                                                                                                      Open

                                                                                                                                                                                                                                                                                          $document.on('ajax:send.rails', rails.formSubmitSelector, function(event) {
                                                                                                                                                                                                                                                                                            if (this === event.target) rails.disableFormElements($(this));
                                                                                                                                                                                                                                                                                          });
                                                                                                                                                                                                                                                                                      public/assets/application-b34af937661b1e622cea2d933ff65194efa8c7968c100e4a1364a2a317ea4460.js on lines 11555..11557

                                                                                                                                                                                                                                                                                      Duplicated Code

                                                                                                                                                                                                                                                                                      Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                                                                                                                                                                                                                                                                                      Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                                                                                                                                                                                                                                                                                      When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                                                                                                                                                                                                                                                                                      Tuning

                                                                                                                                                                                                                                                                                      This issue has a mass of 50.

                                                                                                                                                                                                                                                                                      We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                                                                                                                                                                                                                                                                                      The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                                                                                                                                                                                                                                                                                      If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                                                                                                                                                                                                                                                                                      See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                                                                                                                                                                                                                                                                                      Refactorings

                                                                                                                                                                                                                                                                                      Further Reading

                                                                                                                                                                                                                                                                                      Similar blocks of code found in 2 locations. Consider refactoring.
                                                                                                                                                                                                                                                                                      Open

                                                                                                                                                                                                                                                                                          $document.on('ajax:complete.rails', rails.formSubmitSelector, function(event) {
                                                                                                                                                                                                                                                                                            if (this === event.target) rails.enableFormElements($(this));
                                                                                                                                                                                                                                                                                          });
                                                                                                                                                                                                                                                                                      public/assets/application-b34af937661b1e622cea2d933ff65194efa8c7968c100e4a1364a2a317ea4460.js on lines 11551..11553

                                                                                                                                                                                                                                                                                      Duplicated Code

                                                                                                                                                                                                                                                                                      Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                                                                                                                                                                                                                                                                                      Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                                                                                                                                                                                                                                                                                      When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                                                                                                                                                                                                                                                                                      Tuning

                                                                                                                                                                                                                                                                                      This issue has a mass of 50.

                                                                                                                                                                                                                                                                                      We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                                                                                                                                                                                                                                                                                      The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                                                                                                                                                                                                                                                                                      If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                                                                                                                                                                                                                                                                                      See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                                                                                                                                                                                                                                                                                      Refactorings

                                                                                                                                                                                                                                                                                      Further Reading

                                                                                                                                                                                                                                                                                      There are no issues that match your filters.

                                                                                                                                                                                                                                                                                      Category
                                                                                                                                                                                                                                                                                      Status