Converts the old brackets working set sort preference into the modern paneview sort preference
@private
@param {!string} sortMethod - sort preference to convert
@return {?string} new sort preference string or undefined if an sortMethod is not found
327306
function _convertSortPref(sortMethod) {
        if (!sortMethod) {
            return null;
        }

        if (_sortPrefConversionMap.hasOwnProperty(sortMethod)) {
            sortMethod = _sortPrefConversionMap[sortMethod];
            PreferencesManager.setViewState(_WORKING_SET_SORT_PREF, sortMethod);
        } else {
            sortMethod = null;
        }

        return sortMethod;
    }
764325
protected List<ExecutableElement> getOrderedMethods(TypeElement typeElement, Comparator<ExecutableElement> comparator) {
		List<ExecutableElement> methods = ElementFilter.methodsIn(typeElement.getEnclosedElements());
		Collections.sort(methods, comparator);
		return methods;
	}
723690
function orderNodes(ast) {
  var comments  = Array.isArray(ast.comments) ? ast.comments.slice() : [];
  var comparitor = ('sortIndex' in ast) ? compareIndex : compareLocation;
  return comments
    .concat(depthFirst(ast, ast.parent))
    .sort(comparitor)
    .map(setSortIndex);
}
324889
function(authMethod){
      var method = {};
      var _methodName = authMethod.name;

      try{
        var _method = _.merge(require('../../'+_methodName), authMethod);
        method[_method.authType] = _method;
      }catch(e){
        this._errorHandler(_methodName);
      }

      return method;
    }
336619
function getCurrentNodeMethods () {
  return http.METHODS && http.METHODS.map(function upperCaseMethod (method) {
    return method.toUpperCase()
  })
}
465596
function popMethod(/*DOM*/ elem, /*string*/ key) {
		// IE doesn't like colon in property names
		key = key.split(':').join('$');

		var method = elem[key];
		if (method) {
			try {
				delete elem[key];
			} catch (ex) {
				// sometimes IE doesn't like deleting from DOM
				elem[key] = undefined;
			}
		}
		return method;
	}
165748
function _keepProps(method, newMethod) {
  var props = ['methodName', 'params', 'removeOutput'];
  _lodash2.default.extend(newMethod, _lodash2.default.pick(method, props));
  return newMethod;
}
392416
function(sortOptions) {
        var className;

        if (this._$currentSortBtn) {
            this._$currentSortBtn.removeClass(classNameConst.BTN_SORT_DOWN + ' ' + classNameConst.BTN_SORT_UP);
        }
        this._$currentSortBtn = this.$el.find(
            'th[' + ATTR_COLUMN_NAME + '="' + sortOptions.columnName + '"] a.' + classNameConst.BTN_SORT
        );

        className = sortOptions.ascending ? classNameConst.BTN_SORT_UP : classNameConst.BTN_SORT_DOWN;

        this._$currentSortBtn.addClass(className);
    }
102031
function sortCompare(left, right) {
        var hasj = $hasOwn(left, 0),
            hask = $hasOwn(right, 0),
            typex,
            typey,
            val;

        if (!hasj && !hask) {
            val = +0;
        } else if (!hasj) {
            val = 1;
        } else if (!hask) {
            val = -1;
        } else {
            typex = typeof left[0];
            typey = typeof right[0];
            if (typex === 'undefined' && typey === 'undefined') {
                val = +0;
            } else if (typex === 'undefined') {
                val = 1;
            } else if (typey === 'undefined') {
                val = -1;
            }
        }

        return val;
    }
1065873
private static String quoteSort(Sort[] sort) {
        LinkedList<String> sorts = new LinkedList<String>();
        for (Sort pair : sort) {
            sorts.add(String.format("{%s: %s}", Helpers.quote(pair.getName()), Helpers.quote(pair.getOrder().toString())));
        }
        return sorts.toString();
    }
946305
function getTheMethod(classDef, conditionals, methods) {
  return function runMixinMethods(...args) {
    let result;
    for (let i = 0; i < conditionals.length; i++) {
      if (!conditionals[i].apply(this, args)) return;
    }

    methods.forEach(function runMixinMethodsIterator(method) {
      const resultTmp = method.apply(this, args);
      if (resultTmp !== undefined) result = resultTmp;
    }, this);
    return result;
  };
}
828149
function formatValue(v,depth) {
    if (depth===undefined || depth===null) {
        depth=1;
    }
    var tp=typeof(v), val;
    if (v===null) {
        return "null";
    } else if (v===undefined) {
        return "undefined";
    } else if (tp==='object') {
        if (depth>0) {
            var properties=[];
            if (v.constructor===Array) {
                for (var i=0,sz=v.length;sz>i;i++) {
                    val=v[i];
                    if (typeof(val)==='string') {
                        properties.push(i+':"'+formatValue(val,depth-1)+'"');
                    } else {
                        properties.push(i+":"+formatValue(val,depth-1));
                    }
                }
                return "["+properties.join(", ")+"]";
            } else {
                var keys=[];
                for (var k in v) {
                    if (k.match(/^\+/)) {
                        // this is a meta-data property
                        continue;
                    }
                    keys.push(k);
                }
                // sort keys as IE 8 uses a different order than other browsers
                keys.sort(lexicalSort);

                for (var i=0,sz=keys.length;sz>i;i++) {
                    val=v[keys[i]];
                    if (typeof(val)==='string') {
                        properties.push(keys[i]+':"'+formatValue(val,depth-1)+'"');
                    } else {
                        properties.push(keys[i]+':'+formatValue(val,depth-1));
                    }
                }
                return "{"+properties.join(", ")+"}";
            }
        } else {
            if (v.constructor===Array) {
                return "Array["+v.length+"]";
            } else if (v.constructor===Function) {
                return "Function";
            } else {
                return "Object";
            }
        }
    } else if (tp==='function') {
        return "Function";
    } else {
        return ''+v;
    }
}
344804
function allowedMethods(methods) {
  // default values
  var methodsAllowed = { 'GET': true, 'POST': false, 'PUT': false, 'HEAD': false, 'DELETE': false  };
  // check and override if one of the default methods
  for (var key in methods) {
    var newKey = key.toUpperCase();
    if ( methodsAllowed[newKey]!=undefined) {
      methodsAllowed[newKey] = Boolean(methods[key]);
    }
  }
  return methodsAllowed;
}
91520
function attachSelectionMethods(box) {
  box.selected = 0;

  var nextTop = 0;
  var items = {};

  box.layout = function() {
    nextTop = 1;
    box.children.forEach(function(child) {
      child.top = nextTop;
      child.height = child.getScreenLines().length;
      nextTop += child.height;
    })
  }

  box.addItem = function(text, itemKey, itemData) {
    var node = blessed.text({
        left: 0,
        right: 0,
        top: nextTop,
        height: 1,
        tags: true,
        content: text
    });
    node.itemData = itemData;
    items[itemKey] = node;
    box.append(node);
    node.height = node.getScreenLines().length;
    nextTop += node.height;
  }

  box.getItem = function(itemKey) {
    return items[itemKey];
  }

  box.selectItem = function(itemKey) {
    var item = box.getItem(itemKey);
    if (!item) {
      return;
    }
    var i = box.children.indexOf(item);
    if (i == -1) {
      return;
    }
    box.select(i);
  }

  box.removeItem = function(itemKey) {
    var item = items[itemKey];
    if (!item) {
      return;
    }
    delete items[itemKey];
    item.detach();
    box.layout();
  }

  box.clearItems = function() {
    box.children.slice().forEach(function(child) {
      child.detach();
    });
    box.selected = -1;
    nextTop = 0;
    items = {};
  }

  box.up = function(n) {
    if (box.selected == -1) {
      box.select(box.children.length - 1);
    } else {
      n = n === undefined ? 1 : n;
      box.select(box.selected - n);
    }
  }

  box.down = function(n) {
    if (box.selected == -1) {
      box.select(box.children.length - 1);
    } else {
      n = n === undefined ? 1 : n;
      box.select(box.selected + n);
    }
  }

  box.select = function(n) {
    highlight(box.selected, false);
    n = Math.max(0, Math.min(box.children.length - 1, n));
    if (n == -1) {
      return;
    }
    box.selected = n;
    highlight(n, true);
  }

  box.getSelectedItem = function() {
    return box.children[box.selected];
  }

  function highlight(n, on) {
    var item = box.children[n];
    if (!item) {
      return;
    }
    item.style.inverse = on;
  }
}
973575
function addMethod (char, method) {
  var keyIsBound = hasKeybinding(char);
  var listener = keyupHandler.bind(null, char, method);

  bindings[char] = bindings[char] || {methods: [], listeners: []};

  if (keyIsBound) window.removeEventListener('keyup', bindings[char].listeners[0]);

  bindings[char].methods.unshift(method);
  bindings[char].listeners.unshift(listener);
  window.addEventListener('keyup', listener);
}
518784
public void setSortMode(final SortMode sortMode) {
		getOrCreateComponentModel().sortMode = sortMode == null ? SortMode.NONE : sortMode;
	}
1098376
@Override
  public Object invokeMethod(String name, Object[] args) {
    ISlot slot = findSlot(name, args);
    PojoGestalt gestalt = createGestalt(slot.getType(), args);
    new Sculpturer().$form(gestalt);
    slot.write(gestalt.getSubject());
    return gestalt.getSubject();
  }