text:
/*
 * This var has to be outside the angular factory, otherwise when
 * there are multiple material apps on the same page, each app
 * will create its own instance of this array and the app's IDs
 * will not be unique.
 */
var nextUniqueId = 0, isIos, isAndroid, isFirefox;

// Support material-tools builds.
if (window.navigator) {
  var userAgent = window.navigator.userAgent || window.navigator.vendor || window.opera;
  isIos = userAgent.match(/ipad|iphone|ipod/i);
  isAndroid = userAgent.match(/android/i);
  isFirefox = userAgent.match(/(firefox|minefield)/i);
}

/**
 * @ngdoc module
 * @name material.core.util
 * @description
 * Util
 */
angular
.module('material.core')
.factory('$mdUtil', UtilFactory);

/**
 * @ngInject
 */
function UtilFactory($document, $timeout, $compile, $rootScope, $$mdAnimate, $interpolate, $log,
                     $rootElement, $window, $$rAF) {
  // Setup some core variables for the processTemplate method
  var startSymbol = $interpolate.startSymbol(),
    endSymbol = $interpolate.endSymbol(),
    usesStandardSymbols = ((startSymbol === '{{') && (endSymbol === '}}'));

  // Polyfill document.contains for IE11.
  document.contains || (document.contains = function (node) {
    return document.body.contains(node);
  });

  /**
   * Checks if the target element has the requested style by key
   * @param {DOMElement|JQLite} target Target element
   * @param {string} key Style key
   * @param {string=} expectedVal Optional expected value
   * @returns {boolean} Whether the target element has the style or not
   */
  var hasComputedStyle = function (target, key, expectedVal) {
    var hasValue = false;

    if (target && target.length) {
      var computedStyles = $window.getComputedStyle(target[0]);
      hasValue = angular.isDefined(computedStyles[key]) &&
        (expectedVal ? computedStyles[key] == expectedVal : true);
    }

    return hasValue;
  };

  function validateCssValue(value) {
    return !value ? '0' :
      hasPx(value) || hasPercent(value) ? value : value + 'px';
  }

  function hasPx(value) {
    return String(value).indexOf('px') > -1;
  }

  function hasPercent(value) {
    return String(value).indexOf('%') > -1;
  }

  var $mdUtil = {
    dom: {},
    isIos: isIos,
    isAndroid: isAndroid,
    now: window.performance && window.performance.now ?
      angular.bind(window.performance, window.performance.now) : Date.now || function() {
      return new Date().getTime();
    },

    /**
     * Cross-version compatibility method to retrieve an option of a ngModel controller,
     * which supports the breaking changes in the AngularJS snapshot (SHA 87a2ff76af5d0a9268d8eb84db5755077d27c84c).
     * @param {!ngModel.NgModelController} ngModelCtrl
     * @param {!string} optionName
     * @returns {string|number|boolean|Object|undefined}
     */
    getModelOption: function (ngModelCtrl, optionName) {
      if (!ngModelCtrl.$options) {
        return;
      }

      var $options = ngModelCtrl.$options;

      // The newer versions of AngularJS introduced a getOption function and made the option values
      // no longer visible on the $options object.
      return $options.getOption ? $options.getOption(optionName) : $options[optionName];
    },

    /**
     * Determines the current 'dir'ectional value based on the value of 'dir'
     * attribute of the element. If that is not defined, it will try to use
     * a 'dir' attribute of the body or html tag.
     *
     * @param {Object=} attrs a hash object with key-value pairs of normalized
     *     attribute names and their corresponding attribute values.
     * @returns {boolean} true if the element's passed in attributes,
     *     the document, or the body indicates RTL mode, false otherwise.
     */
    isRtl: function(attrs) {
      var dir = angular.isDefined(attrs) && attrs.hasOwnProperty('dir') && attrs.dir;

      switch (dir) {
        case 'ltr':
          return false;

        case 'rtl':
          return true;
      }

      return ($document[0].dir === 'rtl' || $document[0].body.dir === 'rtl');
    },

    /**
     * Bi-directional accessor/mutator used to easily update an element's
     * property based on the current 'dir'ectional value.
     */
    bidi: function(element, property, lValue, rValue) {
      var ltr = !this.isRtl();

      // If accessor
      if (arguments.length == 0) return ltr ? 'ltr' : 'rtl';

      // If mutator
      var elem = angular.element(element);

      if (ltr && angular.isDefined(lValue)) {
        elem.css(property, validateCssValue(lValue));
      }
      else if (!ltr && angular.isDefined(rValue)) {
        elem.css(property, validateCssValue(rValue));
      }
    },

    bidiProperty: function (element, lProperty, rProperty, value) {
      var ltr = !this.isRtl();

      var elem = angular.element(element);

      if (ltr && angular.isDefined(lProperty)) {
        elem.css(lProperty, validateCssValue(value));
        elem.css(rProperty, '');
      }
      else if (!ltr && angular.isDefined(rProperty)) {
        elem.css(rProperty, validateCssValue(value));
        elem.css(lProperty, '');
      }
    },

    clientRect: function(element, offsetParent, isOffsetRect) {
      var node = getNode(element);
      offsetParent = getNode(offsetParent || node.offsetParent || document.body);
      var nodeRect = node.getBoundingClientRect();

      // The user can ask for an offsetRect: a rect relative to the offsetParent,
      // or a clientRect: a rect relative to the page
      var offsetRect = isOffsetRect ?
        offsetParent.getBoundingClientRect() :
        {left: 0, top: 0, width: 0, height: 0};
      return {
        left: nodeRect.left - offsetRect.left,
        top: nodeRect.top - offsetRect.top,
        width: nodeRect.width,
        height: nodeRect.height
      };
    },
    offsetRect: function(element, offsetParent) {
      return $mdUtil.clientRect(element, offsetParent, true);
    },

    /**
     * Annoying method to copy nodes to an array, thanks to IE.
     * @param nodes
     * @return {Array}
     */
    nodesToArray: function(nodes) {
      var results = [], i;
      nodes = nodes || [];

      for (i = 0; i < nodes.length; ++i) {
        results.push(nodes.item(i));
      }
      return results;
    },

    /**
     * Determines the absolute position of the viewport.
     * Useful when making client rectangles absolute.
     * @returns {number}
     */
    getViewportTop: function() {
      // If body scrolling is disabled, then use the cached viewport top value, otherwise get it
      // fresh from the $window.
      if ($mdUtil.disableScrollAround._count && $mdUtil.disableScrollAround._viewPortTop) {
        return $mdUtil.disableScrollAround._viewPortTop;
      } else {
        return $window.scrollY || $window.pageYOffset || 0;
      }
    },

    /**
     * Finds the proper focus target by searching the DOM.
     *
     * @param {!JQLite} containerEl
     * @param {string=} attributeVal
     * @returns {JQLite|undefined}
     */
    findFocusTarget: function(containerEl, attributeVal) {
      var AUTO_FOCUS = this.prefixer('md-autofocus', true);
      var elToFocus;

      elToFocus = scanForFocusable(containerEl, attributeVal || AUTO_FOCUS);

      // Scan for fallback to 'universal' API
      if (!elToFocus) {
        elToFocus = scanForFocusable(containerEl, AUTO_FOCUS);
      }

      return elToFocus;

      /**
       * Can target and nested children for specified Selector (attribute)
       * whose value may be an expression that evaluates to True/False.
       * @param {!JQLite} target
       * @param {!string} selector
       * @return {JQLite|undefined}
       */
      function scanForFocusable(target, selector) {
        var elFound, items = target[0].querySelectorAll(selector);

        // Find the last child element with the focus attribute
        if (items && items.length) {
          items.length && angular.forEach(items, function(it) {
            it = angular.element(it);

            // Check the element for the md-autofocus class to ensure any associated expression
            // evaluated to true.
            var isFocusable = it.hasClass('md-autofocus');
            if (isFocusable) elFound = it;
          });
        }
        return elFound;
      }
    },

    /**
     * Disables scroll around the passed parent element.
     * @param {Element|JQLite=} element Origin Element (not used)
     * @param {Element|JQLite=} parent Element to disable scrolling within.
     *   Defaults to body if none supplied.
     * @param {Object=} options Object of options to modify functionality
     *   - disableScrollMask Boolean of whether or not to create a scroll mask element or
     *     use the passed parent element.
     */
    disableScrollAround: function(element, parent, options) {
      options = options || {};

      $mdUtil.disableScrollAround._count = Math.max(0, $mdUtil.disableScrollAround._count || 0);
      $mdUtil.disableScrollAround._count++;

      if ($mdUtil.disableScrollAround._restoreScroll) {
        return $mdUtil.disableScrollAround._restoreScroll;
      }

      var body = $document[0].body;
      var restoreBody = disableBodyScroll();
      var restoreElement = disableElementScroll(parent, options);

      return $mdUtil.disableScrollAround._restoreScroll = function() {
        if (--$mdUtil.disableScrollAround._count <= 0) {
          delete $mdUtil.disableScrollAround._viewPortTop;
          restoreBody();
          restoreElement();
          delete $mdUtil.disableScrollAround._restoreScroll;
        }
      };

      /**
       * Creates a virtual scrolling mask to prevent touchmove, keyboard, scrollbar clicking,
       * and wheel events.
       * @param {!Element|!JQLite} elementToDisable
       * @param {Object=} scrollMaskOptions Object of options to modify functionality
       *   - disableScrollMask Boolean of whether or not to create a scroll mask element or
       *     use the passed parent element.
       * @returns {Function}
       */
      function disableElementScroll(elementToDisable, scrollMaskOptions) {
        var scrollMask;
        var wrappedElementToDisable = angular.element(elementToDisable || body);

        if (scrollMaskOptions.disableScrollMask) {
          scrollMask = wrappedElementToDisable;
        } else {
          scrollMask = angular.element(
            '
' +
            '

' +
            '
');
          wrappedElementToDisable.append(scrollMask);
        }

        /**
         * @param {Event} $event
         */
        function preventDefault($event) {
          $event.preventDefault();
        }

        scrollMask.on('wheel touchmove', preventDefault);

        return function restoreElementScroll() {
          scrollMask.off('wheel touchmove', preventDefault);

          if (!scrollMaskOptions.disableScrollMask && scrollMask[0].parentNode) {
            scrollMask[0].parentNode.removeChild(scrollMask[0]);
          }
        };
      }

      // Converts the body to a position fixed block and translate it to the proper scroll position
      function disableBodyScroll() {
        var documentElement = $document[0].documentElement;

        var prevDocumentStyle = documentElement.style.cssText || '';
        var prevBodyStyle = body.style.cssText || '';

        var viewportTop = $mdUtil.getViewportTop();
        $mdUtil.disableScrollAround._viewPortTop = viewportTop;
        var clientWidth = body.clientWidth;
        var hasVerticalScrollbar = body.scrollHeight > body.clientHeight + 1;

        // Scroll may be set on  element (for example by overflow-y: scroll)
        // but Chrome is reporting the scrollTop position always on .
        // scrollElement will allow to restore the scrollTop position to proper target.
        var scrollElement = documentElement.scrollTop > 0 ? documentElement : body;

        if (hasVerticalScrollbar) {
          angular.element(body).css({
            position: 'fixed',
            width: '100%',
            top: -viewportTop + 'px'
          });
        }

        if (body.clientWidth < clientWidth) {
          body.style.overflow = 'hidden';
        }

        return function restoreScroll() {
          // Reset the inline style CSS to the previous.
          body.style.cssText = prevBodyStyle;
          documentElement.style.cssText = prevDocumentStyle;

          // The scroll position while being fixed
          scrollElement.scrollTop = viewportTop;
        };
      }

    },

    enableScrolling: function() {
      var restoreFn = this.disableScrollAround._restoreScroll;
      restoreFn && restoreFn();
    },

    floatingScrollbars: function() {
      if (this.floatingScrollbars.cached === undefined) {
        var tempNode = angular.element('

').css({
          width: '100%',
          'z-index': -1,
          position: 'absolute',
          height: '35px',
          'overflow-y': 'scroll'
        });
        tempNode.children().css('height', '60px');

        $document[0].body.appendChild(tempNode[0]);
        this.floatingScrollbars.cached =
          (tempNode[0].offsetWidth === tempNode[0].childNodes[0].offsetWidth);
        tempNode.remove();
      }
      return this.floatingScrollbars.cached;
    },

    /**
     * Mobile safari only allows you to set focus in click event listeners.
     * @param {Element|JQLite} element to focus
     */
    forceFocus: function(element) {
      var node = element[0] || element;

      document.addEventListener('click', function focusOnClick(ev) {
        if (ev.target === node && ev.$focus) {
          node.focus();
          ev.stopImmediatePropagation();
          ev.preventDefault();
          node.removeEventListener('click', focusOnClick);
        }
      }, true);

      var newEvent = document.createEvent('MouseEvents');
      newEvent.initMouseEvent('click', false, true, window, {}, 0, 0, 0, 0,
        false, false, false, false, 0, null);
      newEvent.$material = true;
      newEvent.$focus = true;
      node.dispatchEvent(newEvent);
    },

    /**
     * facade to build md-backdrop element with desired styles
     * NOTE: Use $compile to trigger backdrop postLink function
     */
    createBackdrop: function(scope, addClass) {
      return $compile($mdUtil.supplant('<md-backdrop class="{0}">', [addClass]))(scope);
    },

    /**
     * supplant() method from Crockford's `Remedial Javascript`
     * Equivalent to use of $interpolate; without dependency on
     * interpolation symbols and scope. Note: the '{<token>}' can
     * be property names, property chains, or array indices.
     */
    supplant: function(template, values, pattern) {
      pattern = pattern || /\{([^{}]*)\}/g;
      return template.replace(pattern, function(a, b) {
        var p = b.split('.'),
          r = values;
        try {
          for (var s in p) {
            if (p.hasOwnProperty(s)) {
              r = r[p[s]];
            }
          }
        } catch (e) {
          r = a;
        }
        return (typeof r === 'string' || typeof r === 'number') ? r : a;
      });
    },

    fakeNgModel: function() {
      return {
        $fake: true,
        $setTouched: angular.noop,
        $setViewValue: function(value) {
          this.$viewValue = value;
          this.$render(value);
          this.$viewChangeListeners.forEach(function(cb) {
            cb();
          });
        },
        $isEmpty: function(value) {
          return ('' + value).length === 0;
        },
        $parsers: [],
        $formatters: [],
        $viewChangeListeners: [],
        $render: angular.noop
      };
    },

    /**
     * @param {Function} func original function to be debounced
     * @param {number} wait number of milliseconds to delay (since last debounce reset).
     *  Default value 10 msecs.
     * @param {Object} scope in which to apply the function after debouncing ends
     * @param {boolean} invokeApply should the $timeout trigger $digest() dirty checking
     * @return {Function} A function, that, as long as it continues to be invoked, will not be
     *  triggered. The function will be called after it stops being called for N milliseconds.
     */
    debounce: function(func, wait, scope, invokeApply) {
      var timer;

      return function debounced() {
        var context = scope,
            args = Array.prototype.slice.call(arguments);

        $timeout.cancel(timer);
        timer = $timeout(function() {

          timer = undefined;
          func.apply(context, args);

        }, wait || 10, invokeApply);
      };
    },

    /**
     * The function will not be called unless it has been more than `delay` milliseconds since the
     * last call.
     * @param {Function} func original function to throttle
     * @param {number} delay number of milliseconds to delay
     * @return {Function} a function that can only be triggered every `delay` milliseconds.
     */
    throttle: function throttle(func, delay) {
      var recent;
      return function throttled() {
        var context = this;
        var args = arguments;
        var now = $mdUtil.now();

        if (!recent || (now - recent > delay)) {
          func.apply(context, args);
          recent = now;
        }
      };
    },

    /**
     * Measures the number of milliseconds taken to run the provided callback
     * function. Uses a high-precision timer if available.
     */
    time: function time(cb) {
      var start = $mdUtil.now();
      cb();
      return $mdUtil.now() - start;
    },

    /**
     * Create an implicit getter that caches its `getter()`
     * lookup value
     */
    valueOnUse : function (scope, key, getter) {
      var value = null, args = Array.prototype.slice.call(arguments);
      var params = (args.length > 3) ? args.slice(3) : [];

      Object.defineProperty(scope, key, {
        get: function () {
          if (value === null) value = getter.apply(scope, params);
          return value;
        }
      });
    },

    /**
     * Get a unique ID.
     *
     * @returns {string} an unique numeric string
     */
    nextUid: function() {
      return '' + nextUniqueId++;
    },

    /**
     * Stop watchers and events from firing on a scope without destroying it,
     * by disconnecting it from its parent and its siblings' linked lists.
     * @param {Object} scope to disconnect
     */
    disconnectScope: function disconnectScope(scope) {
      if (!scope) return;

      // we can't destroy the root scope or a scope that has been already destroyed
      if (scope.$root === scope) return;
      if (scope.$$destroyed) return;

      var parent = scope.$parent;
      scope.$$disconnected = true;

      // See Scope.$destroy
      if (parent.$$childHead === scope) parent.$$childHead = scope.$$nextSibling;
      if (parent.$$childTail === scope) parent.$$childTail = scope.$$prevSibling;
      if (scope.$$prevSibling) scope.$$prevSibling.$$nextSibling = scope.$$nextSibling;
      if (scope.$$nextSibling) scope.$$nextSibling.$$prevSibling = scope.$$prevSibling;

      scope.$$nextSibling = scope.$$prevSibling = null;

    },

    /**
     * Undo the effects of disconnectScope().
     * @param {Object} scope to reconnect
     */
    reconnectScope: function reconnectScope(scope) {
      if (!scope) return;

      // we can't disconnect the root node or scope already disconnected
      if (scope.$root === scope) return;
      if (!scope.$$disconnected) return;

      var child = scope;

      var parent = child.$parent;
      child.$$disconnected = false;
      // See Scope.$new for this logic...
      child.$$prevSibling = parent.$$childTail;
      if (parent.$$childHead) {
        parent.$$childTail.$$nextSibling = child;
        parent.$$childTail = child;
      } else {
        parent.$$childHead = parent.$$childTail = child;
      }
    },

    /**
     * Get an element's siblings matching a given tag name.
     *
     * @param {JQLite|angular.element|HTMLElement} element Element to start walking the DOM from
     * @param {string} tagName HTML tag name to match against
     * @returns {Object[]} JQLite
     */
    getSiblings: function getSiblings(element, tagName) {
      var upperCasedTagName = tagName.toUpperCase();
      if (element instanceof angular.element) {
        element = element[0];
      }
      var siblings = Array.prototype.filter.call(element.parentNode.children, function(node) {
        return element !== node && node.tagName.toUpperCase() === upperCasedTagName;
      });
      return siblings.map(function (sibling) {
        return angular.element(sibling);
      });
    },

    /**
     * getClosest replicates jQuery.closest() to walk up the DOM tree until it finds a matching
     * nodeName.
     *
     * @param {Node} el Element to start walking the DOM from
     * @param {string|function} validateWith If a string is passed, it will be evaluated against
     * each of the parent nodes' tag name. If a function is passed, the loop will call it with each
     * of the parents and will use the return value to determine whether the node is a match.
     * @param {boolean=} onlyParent Only start checking from the parent element, not `el`.
     * @returns {Node|null} closest matching parent Node or null if not found
     */
    getClosest: function getClosest(el, validateWith, onlyParent) {
      if (angular.isString(validateWith)) {
        var tagName = validateWith.toUpperCase();
        validateWith = function(el) {
          return el.nodeName.toUpperCase() === tagName;
        };
      }

      if (el instanceof angular.element) el = el[0];
      if (onlyParent) el = el.parentNode;
      if (!el) return null;

      do {
        if (validateWith(el)) {
          return el;
        }
      } while (el = el.parentNode);

      return null;
    },

    /**
     * Build polyfill for the Node.contains feature (if needed)
     * @param {Node} node
     * @param {Node} child
     * @returns {Node}
     */
    elementContains: function(node, child) {
      var hasContains = (window.Node && window.Node.prototype && Node.prototype.contains);
      var findFn = hasContains ? angular.bind(node, node.contains) : angular.bind(node, function(arg) {
        // compares the positions of two nodes and returns a bitmask
        return (node === child) || !!(this.compareDocumentPosition(arg) & 16);
      });

      return findFn(child);
    },

    /**
     * Functional equivalent for $element.filter(‘md-bottom-sheet’)
     * useful with interimElements where the element and its container are important...
     *
     * @param {JQLite} element to scan
     * @param {string} nodeName of node to find (e.g. 'md-dialog')
     * @param {boolean=} scanDeep optional flag to allow deep scans; defaults to 'false'.
     * @param {boolean=} warnNotFound optional flag to enable log warnings; defaults to false
     */
    extractElementByName: function(element, nodeName, scanDeep, warnNotFound) {
      var found = scanTree(element);
      if (!found && !!warnNotFound) {
        $log.warn($mdUtil.supplant("Unable to find node '{0}' in element '{1}'.",[nodeName, element[0].outerHTML]));
      }

      return angular.element(found || element);

      /**
       * Breadth-First tree scan for element with matching `nodeName`
       */
      function scanTree(element) {
        return scanLevel(element) || (scanDeep ? scanChildren(element) : null);
      }

      /**
       * Case-insensitive scan of current elements only (do not descend).
       */
      function scanLevel(element) {
        if (element) {
          for (var i = 0, len = element.length; i < len; i++) {
            if (element[i].nodeName.toLowerCase() === nodeName) {
              return element[i];
            }
          }
        }
        return null;
      }

      /**
       * Scan children of specified node
       */
      function scanChildren(element) {
        var found;
        if (element) {
          for (var i = 0, len = element.length; i < len; i++) {
            var target = element[i];
            if (!found) {
              for (var j = 0, numChild = target.childNodes.length; j < numChild; j++) {
                found = found || scanTree([target.childNodes[j]]);
              }
            }
          }
        }
        return found;
      }

    },

    /**
     * Give optional properties with no value a boolean true if attr provided or false otherwise
     */
    initOptionalProperties: function(scope, attr, defaults) {
      defaults = defaults || {};
      angular.forEach(scope.$$isolateBindings, function(binding, key) {
        if (binding.optional && angular.isUndefined(scope[key])) {
          var attrIsDefined = angular.isDefined(attr[binding.attrName]);
          scope[key] = angular.isDefined(defaults[key]) ? defaults[key] : attrIsDefined;
        }
      });
    },

    /**
     * Alternative to $timeout calls with 0 delay.
     * nextTick() coalesces all calls within a single frame
     * to minimize $digest thrashing
     *
     * @param {Function} callback function to be called after the tick
     * @param {boolean=} digest true to call $rootScope.$digest() after callback
     * @param {Object=} scope associated with callback. If the scope is destroyed, the callback will
     *  be skipped.
     * @returns {*}
     */
    nextTick: function(callback, digest, scope) {
      // grab function reference for storing state details
      var nextTick = $mdUtil.nextTick;
      var timeout = nextTick.timeout;
      var queue = nextTick.queue || [];

      // add callback to the queue
      queue.push({scope: scope, callback: callback});

      // set default value for digest
      if (digest == null) digest = true;

      // store updated digest/queue values
      nextTick.digest = nextTick.digest || digest;
      nextTick.queue = queue;

      // either return existing timeout or create a new one
      return timeout || (nextTick.timeout = $timeout(processQueue, 0, false));

      /**
       * Grab a copy of the current queue
       * Clear the queue for future use
       * Process the existing queue
       * Trigger digest if necessary
       */
      function processQueue() {
        var queue = nextTick.queue;
        var digest = nextTick.digest;

        nextTick.queue = [];
        nextTick.timeout = null;
        nextTick.digest = false;

        queue.forEach(function(queueItem) {
          var skip = queueItem.scope && queueItem.scope.$$destroyed;
          if (!skip) {
            queueItem.callback();
          }
        });

        if (digest) $rootScope.$digest();
      }
    },

    /**
     * Processes a template and replaces the start/end symbols if the application has
     * overridden them.
     *
     * @param template The template to process whose start/end tags may be replaced.
     * @returns {*}
     */
    processTemplate: function(template) {
      if (usesStandardSymbols) {
        return template;
      } else {
        if (!template || !angular.isString(template)) return template;
        return template.replace(/\{\{/g, startSymbol).replace(/}}/g, endSymbol);
      }
    },

    /**
     * Scan up dom hierarchy for enabled parent;
     */
    getParentWithPointerEvents: function (element) {
      var parent = element.parent();

      // jqLite might return a non-null, but still empty, parent; so check for parent and length
      while (hasComputedStyle(parent, 'pointer-events', 'none')) {
        parent = parent.parent();
      }

      return parent;
    },

    getNearestContentElement: function (element) {
      var current = element.parent()[0];
      // Look for the nearest parent md-content, stopping at the rootElement.
      while (current && current !== $rootElement[0] && current !== document.body && current.nodeName.toUpperCase() !== 'MD-CONTENT') {
        current = current.parentNode;
      }
      return current;
    },

    /**
     * Checks if the current browser is natively supporting the `sticky` position.
     * @returns {string} supported sticky property name
     */
    checkStickySupport: function() {
      var stickyProp;
      var testEl = angular.element('
');
      $document[0].body.appendChild(testEl[0]);

      var stickyProps = ['sticky', '-webkit-sticky'];
      for (var i = 0; i < stickyProps.length; ++i) {
        testEl.css({
          position: stickyProps[i],
          top: 0,
          'z-index': 2
        });

        if (testEl.css('position') == stickyProps[i]) {
          stickyProp = stickyProps[i];
          break;
        }
      }

      testEl.remove();

      return stickyProp;
    },

    /**
     * Parses an attribute value, mostly a string.
     * By default checks for negated values and returns `false´ if present.
     * Negated values are: (native falsy) and negative strings like:
     * `false` or `0`.
     * @param value Attribute value which should be parsed.
     * @param negatedCheck When set to false, won't check for negated values.
     * @returns {boolean}
     */
    parseAttributeBoolean: function(value, negatedCheck) {
      return value === '' || !!value && (negatedCheck === false || value !== 'false' && value !== '0');
    },

    hasComputedStyle: hasComputedStyle,

    /**
     * Returns true if the parent form of the element has been submitted.
     * @param element An AngularJS or HTML5 element.
     * @returns {boolean}
     */
    isParentFormSubmitted: function(element) {
      var parent = $mdUtil.getClosest(element, 'form');
      var form = parent ? angular.element(parent).controller('form') : null;

      return form ? form.$submitted : false;
    },

    /**
     * Animate the requested element's scrollTop to the requested scrollPosition with basic easing.
     * @param {!Element} element The element to scroll.
     * @param {number} scrollEnd The new/final scroll position.
     * @param {number=} duration Duration of the scroll. Default is 1000ms.
     */
    animateScrollTo: function(element, scrollEnd, duration) {
      var scrollStart = element.scrollTop;
      var scrollChange = scrollEnd - scrollStart;
      var scrollingDown = scrollStart < scrollEnd;
      var startTime = $mdUtil.now();

      $$rAF(scrollChunk);

      function scrollChunk() {
        var newPosition = calculateNewPosition();

        element.scrollTop = newPosition;

        if (scrollingDown ? newPosition < scrollEnd : newPosition > scrollEnd) {
          $$rAF(scrollChunk);
        }
      }

      function calculateNewPosition() {
        var easeDuration = duration || 1000;
        var currentTime = $mdUtil.now() - startTime;

        return ease(currentTime, scrollStart, scrollChange, easeDuration);
      }

      function ease(currentTime, start, change, duration) {
        // If the duration has passed (which can occur if our app loses focus due to $$rAF), jump
        // straight to the proper position
        if (currentTime > duration) {
          return start + change;
        }

        var ts = (currentTime /= duration) * currentTime;
        var tc = ts * currentTime;

        return start + change * (-2 * tc + 3 * ts);
      }
    },

    /**
     * Provides an easy mechanism for removing duplicates from an array.
     *
     *    var myArray = [1, 2, 2, 3, 3, 3, 4, 4, 4, 4];
     *
     *    $mdUtil.uniq(myArray) => [1, 2, 3, 4]
     *
     * @param {Array} array The array whose unique values should be returned.
     * @returns {Array|void} A copy of the array containing only unique values.
     */
    uniq: function(array) {
      if (!array) { return; }

      return array.filter(function(value, index, self) {
        return self.indexOf(value) === index;
      });
    },

    /**
     * Gets the inner HTML content of the given HTMLElement.
     * Only intended for use with SVG or Symbol elements in IE11.
     * @param {Element} element
     * @returns {string} the inner HTML of the element passed in
     */
    getInnerHTML: function(element) {
      // For SVG or Symbol elements, innerHTML returns `undefined` in IE.
      // Reference: https://stackoverflow.com/q/28129956/633107
      // The XMLSerializer API is supported on IE11 and is the recommended workaround.
      var serializer = new XMLSerializer();

      return Array.prototype.map.call(element.childNodes, function (child) {
        return serializer.serializeToString(child);
      }).join('');
    },

    /**
     * Gets the outer HTML content of the given HTMLElement.
     * Only intended for use with SVG or Symbol elements in IE11.
     * @param {Element} element
     * @returns {string} the outer HTML of the element passed in
     */
    getOuterHTML: function(element) {
      // For SVG or Symbol elements, outerHTML returns `undefined` in IE.
      // Reference: https://stackoverflow.com/q/29888050/633107
      // The XMLSerializer API is supported on IE11 and is the recommended workaround.
      var serializer = new XMLSerializer();
      return serializer.serializeToString(element);
    },

    /**
     * Support: IE 9-11 only
     * documentMode is an IE-only property
     * http://msdn.microsoft.com/en-us/library/ie/cc196988(v=vs.85).aspx
     */
    msie: window.document.documentMode,

    getTouchAction: function() {
      var testEl = document.createElement('div');
      var vendorPrefixes = ['', 'webkit', 'Moz', 'MS', 'ms', 'o'];

      for (var i = 0; i < vendorPrefixes.length; i++) {
        var prefix = vendorPrefixes[i];
        var property = prefix ? prefix + 'TouchAction' : 'touchAction';
        if (angular.isDefined(testEl.style[property])) {
          return property;
        }
      }
    },

    /**
     * @param {Event} event the event to calculate the bubble path for
     * @return {EventTarget[]} the set of nodes that this event could bubble up to
     */
    getEventPath: function(event) {
      var path = [];
      var currentTarget = event.target;
      while (currentTarget) {
        path.push(currentTarget);
        currentTarget = currentTarget.parentElement;
      }
      if (path.indexOf(window) === -1 && path.indexOf(document) === -1)
        path.push(document);
      if (path.indexOf(window) === -1)
        path.push(window);
      return path;
    },

    /**
     * Gets the string the user has entered and removes Regex identifiers
     * @param {string} term
     * @returns {string} sanitized string
     */
    sanitize: function(term) {
      if (!term) return term;
      return term.replace(/[\\^$*+?.()|{}[]/g, '\\$&');
    },

    /**********************************************************************************************
     * The following functions were sourced from
     * https://github.com/angular/components/blob/3c37e4b1c1cb74a3d0a90d173240fc730d21d9d4/src/cdk/a11y/interactivity-checker/interactivity-checker.ts
     **********************************************************************************************/

    /**
     * Gets whether an element is disabled.
     * @param {HTMLElement} element Element to be checked.
     * @returns {boolean} Whether the element is disabled.
     */
    isDisabled: function(element) {
      // This does not capture some cases, such as a non-form control with a disabled attribute or
      // a form control inside of a disabled form, but should capture the most common cases.
      return element.hasAttribute('disabled');
    },

    /**
     * Gets whether an element is visible for the purposes of interactivity.
     *
     * This will capture states like `display: none` and `visibility: hidden`, but not things like
     * being clipped by an `overflow: hidden` parent or being outside the viewport.
     *
     * @param {HTMLElement} element
     * @returns {boolean} Whether the element is visible.
     */
    isVisible: function(element) {
      return $mdUtil.hasGeometry(element) && getComputedStyle(element).visibility === 'visible';
    },

    /**
     * Gets whether an element can be reached via Tab key.
     * Assumes that the element has already been checked with isFocusable.
     * @param {HTMLElement} element Element to be checked.
     * @returns {boolean} Whether the element is tabbable.
     */
    isTabbable: function(element) {
      var frameElement = $mdUtil.getFrameElement($mdUtil.getWindow(element));

      if (frameElement) {
        // Frame elements inherit their tabindex onto all child elements.
        if ($mdUtil.getTabIndexValue(frameElement) === -1) {
          return false;
        }

        // Browsers disable tabbing to an element inside of an invisible frame.
        if (!$mdUtil.isVisible(frameElement)) {
          return false;
        }
      }

      var nodeName = element.nodeName.toLowerCase();
      var tabIndexValue = $mdUtil.getTabIndexValue(element);

      if (element.hasAttribute('contenteditable')) {
        return tabIndexValue !== -1;
      }

      if (nodeName === 'iframe' || nodeName === 'object') {
        // The frame or object's content may be tabbable depending on the content, but it's
        // not possibly to reliably detect the content of the frames. We always consider such
        // elements as non-tabbable.
        return false;
      }

      // In iOS, the browser only considers some specific elements as tabbable.
      if (isIos && !$mdUtil.isPotentiallyTabbableIOS(element)) {
        return false;
      }

      if (nodeName === 'audio') {
        // Audio elements without controls enabled are never tabbable, regardless
        // of the tabindex attribute explicitly being set.
        if (!element.hasAttribute('controls')) {
          return false;
        }
        // Audio elements with controls are by default tabbable unless the
        // tabindex attribute is set to `-1` explicitly.
        return tabIndexValue !== -1;
      }

      if (nodeName === 'video') {
        // For all video elements, if the tabindex attribute is set to `-1`, the video
        // is not tabbable. Note: We cannot rely on the default `HTMLElement.tabIndex`
        // property as that one is set to `-1` in Chrome, Edge and Safari v13.1. The
        // tabindex attribute is the source of truth here.
        if (tabIndexValue === -1) {
          return false;
        }
        // If the tabindex is explicitly set, and not `-1` (as per check before), the
        // video element is always tabbable (regardless of whether it has controls or not).
        if (tabIndexValue !== null) {
          return true;
        }
        // Otherwise (when no explicit tabindex is set), a video is only tabbable if it
        // has controls enabled. Firefox is special as videos are always tabbable regardless
        // of whether there are controls or not.
        return isFirefox || element.hasAttribute('controls');
      }

      return element.tabIndex >= 0;
    },

    /**
     * Gets whether an element can be focused by the user.
     * @param {HTMLElement} element Element to be checked.
     * @returns {boolean} Whether the element is focusable.
     */
    isFocusable: function(element) {
      // Perform checks in order of left to most expensive.
      // Again, naive approach that does not capture many edge cases and browser quirks.
      return $mdUtil.isPotentiallyFocusable(element) && !$mdUtil.isDisabled(element) &&
        $mdUtil.isVisible(element);
    },

    /**
     * Gets whether an element is potentially focusable without taking current visible/disabled
     * state into account.
     * @param {HTMLElement} element
     * @returns {boolean}
     */
    isPotentiallyFocusable: function(element) {
      // Inputs are potentially focusable *unless* they're type="hidden".
      if ($mdUtil.isHiddenInput(element)) {
        return false;
      }

      return $mdUtil.isNativeFormElement(element) ||
        $mdUtil.isAnchorWithHref(element) ||
        element.hasAttribute('contenteditable') ||
        $mdUtil.hasValidTabIndex(element);
    },

    /**
     * Checks whether the specified element is potentially tabbable on iOS.
     * @param {HTMLElement} element
     * @returns {boolean}
     */
    isPotentiallyTabbableIOS: function(element) {
      var nodeName = element.nodeName.toLowerCase();
        var inputType = nodeName === 'input' && element.type;

      return inputType === 'text'
        || inputType === 'password'
        || nodeName === 'select'
        || nodeName === 'textarea';
    },

    /**
     * Returns the parsed tabindex from the element attributes instead of returning the
     * evaluated tabindex from the browsers defaults.
     * @param {HTMLElement} element
     * @returns {null|number}
     */
    getTabIndexValue: function(element) {
      if (!$mdUtil.hasValidTabIndex(element)) {
        return null;
      }

      // See browser issue in Gecko https://bugzilla.mozilla.org/show_bug.cgi?id=1128054
      var tabIndex = parseInt(element.getAttribute('tabindex') || '', 10);

      return isNaN(tabIndex) ? -1 : tabIndex;
    },

    /**
     * Gets whether an element has a valid tabindex.
     * @param {HTMLElement} element
     * @returns {boolean}
     */
    hasValidTabIndex: function(element) {
      if (!element.hasAttribute('tabindex') || element.tabIndex === undefined) {
        return false;
      }

      var tabIndex = element.getAttribute('tabindex');

      // IE11 parses tabindex="" as the value "-32768"
      if (tabIndex == '-32768') {
        return false;
      }

      return !!(tabIndex && !isNaN(parseInt(tabIndex, 10)));
    },

    /**
     * Checks whether the specified element has any geometry / rectangles.
     * @param {HTMLElement} element
     * @returns {boolean}
     */
    hasGeometry: function(element) {
      // Use logic from jQuery to check for an invisible element.
      // See https://github.com/jquery/jquery/blob/8969732518470a7f8e654d5bc5be0b0076cb0b87/src/css/hiddenVisibleSelectors.js#L9
      return !!(element.offsetWidth || element.offsetHeight ||
        (typeof element.getClientRects === 'function' && element.getClientRects().length));
    },

    /**
     * Returns the frame element from a window object. Since browsers like MS Edge throw errors if
     * the frameElement property is being accessed from a different host address, this property
     * should be accessed carefully.
     * @param {Window} window
     * @returns {null|HTMLElement}
     */
    getFrameElement: function(window) {
      try {
        return window.frameElement;
      } catch (error) {
        return null;
      }
    },

    /**
     * Gets the parent window of a DOM node with regards of being inside of an iframe.
     * @param {HTMLElement} node
     * @returns {Window}
     */
    getWindow: function(node) {
      // ownerDocument is null if `node` itself *is* a document.
      return node.ownerDocument && node.ownerDocument.defaultView || window;
    },

    /**
     * Gets whether an element's
     * @param {Node} element
     * @returns {boolean}
     */
    isNativeFormElement: function(element) {
      var nodeName = element.nodeName.toLowerCase();
      return nodeName === 'input' ||
        nodeName === 'select' ||
        nodeName === 'button' ||
        nodeName === 'textarea';
    },

    /**
     * Gets whether an element is an `<input type="hidden">`.
     * @param {HTMLElement} element
     * @returns {boolean}
     */
    isHiddenInput: function(element) {
      return $mdUtil.isInputElement(element) && element.type == 'hidden';
    },

    /**
     * Gets whether an element is an anchor that has an href attribute.
     * @param {HTMLElement} element
     * @returns {boolean}
     */
    isAnchorWithHref: function(element) {
      return $mdUtil.isAnchorElement(element) && element.hasAttribute('href');
    },

    /**
     * Gets whether an element is an input element.
     * @param {HTMLElement} element
     * @returns {boolean}
     */
    isInputElement: function(element) {
      return element.nodeName.toLowerCase() == 'input';
    },

    /**
     * Gets whether an element is an anchor element.
     * @param {HTMLElement} element
     * @returns {boolean}
     */
    isAnchorElement: function(element) {
      return element.nodeName.toLowerCase() == 'a';
    },

    /**********************************************************************************************
     * The following two functions were sourced from
     * https://github.com/angular/components/blob/3c37e4b1c1cb74a3d0a90d173240fc730d21d9d4/src/cdk/a11y/focus-trap/focus-trap.ts#L268-L311
     **********************************************************************************************/

    /**
     * Get the first tabbable element from a DOM subtree (inclusive).
     * @param {HTMLElement} root
     * @returns {HTMLElement|null}
     */
    getFirstTabbableElement: function(root) {
      if ($mdUtil.isFocusable(root) && $mdUtil.isTabbable(root)) {
        return root;
      }

      // Iterate in DOM order. Note that IE doesn't have `children` for SVG so we fall
      // back to `childNodes` which includes text nodes, comments etc.
      var children = root.children || root.childNodes;

      for (var i = 0; i < children.length; i++) {
        var tabbableChild = children[i].nodeType === $document[0].ELEMENT_NODE ?
          $mdUtil.getFirstTabbableElement(children[i]) : null;

        if (tabbableChild) {
          return tabbableChild;
        }
      }

      return null;
    },

    /**
     * Get the last tabbable element from a DOM subtree (inclusive).
     * @param {HTMLElement} root
     * @returns {HTMLElement|null}
     */
    getLastTabbableElement: function(root) {
      if ($mdUtil.isFocusable(root) && $mdUtil.isTabbable(root)) {
        return root;
      }

      // Iterate in reverse DOM order.
      var children = root.children || root.childNodes;

      for (var i = children.length - 1; i >= 0; i--) {
        var tabbableChild = children[i].nodeType === $document[0].ELEMENT_NODE ?
          $mdUtil.getLastTabbableElement(children[i]) : null;

        if (tabbableChild) {
          return tabbableChild;
        }
      }

      return null;
    }
  };

  // Instantiate other namespace utility methods

  $mdUtil.dom.animator = $$mdAnimate($mdUtil);

  return $mdUtil;

  function getNode(el) {
    return el[0] || el;
  }
}

/**
 * Since removing jQuery from the demos, some code that uses `element.focus()` is broken.
 * We need to add `element.focus()`, because it's testable unlike `element[0].focus`.
 */
angular.element.prototype.focus = angular.element.prototype.focus || function() {
  if (this.length) {
    this[0].focus();
  }
  return this;
};

angular.element.prototype.blur = angular.element.prototype.blur || function() {
  if (this.length) {
    this[0].blur();
  }
  return this;
};

repository: angular/material

repo_name: angular/material


text:
include libopieobex0.inc

PV = "1.2.1+cvs-${CVSDATE}"

SRC_URI = "${HANDHELDS_CVS};module=opie/core/obex \
           ${HANDHELDS_CVS};module=opie/pics"

license: MIT

repository: BackupTheBerlios/openslug-svn

license_type: permissive

repo_name: BackupTheBerlios/openslug-svn

branch_name: refs/heads/master

extension: bb


text:
SECTION = "libs"
DESCRIPTION = "lib sumo"
PR = "r0"
LICENSE = "LGPLv2.1"
LIC_FILES_CHKSUM = "file://COPYING;md5=4fbd65380cdd255951079008b364516c"

SRCREV="cb8d020ffaf52933ae87a45aa0a4a3183124d2e8"
SRC_URI = "git://github.com/iloreen/libsumo.git \
	file://CMakeLists.patch;pnum=0"

S = "${WORKDIR}/git"

inherit cmake

do_install_append () {
	cd ${D}${libdir}/
	ln -s libsumo.so libsumo.so.${PV}
}

# create different packages
PACKAGES = "${PN}-dbg ${PN}-dev ${PN}"

FILES_${PN}-dev = "/usr/lib/*.so.* /usr/include/sumo/*"

FILES_${PN}+= "/usr/lib/*.so"


text:
% This is the data resource for this paper
@misc{kamvar2017data,
  title={Data and Analysis for Population structure and phenotypic variation of {\textit{Sclerotinia sclerotiorum}} from dry bean ({\textit{Phaseolus vulgaris}}) in the {United States}},
  url={osf.io/k8wtm},
  publisher={Open Science Framework},
  author={Kamvar, Zhian N and Amaradasa, Bimal S and Jhala, Rachana and McCoy, Serena and Steadman, James R and Everhart, Sydney E},
  year={2017},
  month={Nov}
}

% Citing rocker because it's out as a preprint

@article{boettiger2017introduction,
  author    = {Carl Boettiger and
               Dirk Eddelbuettel},
  title     = {An Introduction to Rocker: Docker Containers for {R}},
  journal   = {CoRR},
  volume    = {abs/1710.03675},
  year      = {2017},
  url       = {http://arxiv.org/abs/1710.03675},
  archivePrefix = {arXiv},
  eprint    = {1710.03675},
  timestamp = {Wed, 01 Nov 2017 19:05:42 +0100},
  biburl    = {http://dblp.org/rec/bib/journals/corr/abs-1710-03675},
  bibsource = {dblp computer science bibliography, http://dblp.org}
}

@article{kamvar2014poppr,
  doi = {10.7717/peerj.281},
  year = {2014},
  month = {mar},
  publisher = {{PeerJ}},
  volume = {2},
  pages = {e281},
  author = {Zhian N. Kamvar and Javier F. Tabima and Niklaus J. Gr{\"u}nwald},
  title = {Poppr: an {R} package for genetic analysis of populations with clonal, partially clonal, and/or sexual reproduction},
  journal = {{PeerJ}},
}

@article{kamvar2015novel,
   title={Novel {R} tools for analysis of genome-wide population genetic data with emphasis on clonality},
  author={Kamvar, Zhian N and Brooks, Jonah C and Gr{\"u}nwald, Niklaus J},
  journal={Frontiers in Genetics},
  volume={6},
  year={2015},
  doi={10.3389/fgene.2015.00208},
  publisher={Frontiers Media SA}
}

@article{bruvo2004simple,
  title={A simple method for the calculation of microsatellite genotype distances irrespective of ploidy level},
  author={Bruvo, Ru{\v{z}}ica and Michiels, Nicolaas K and D'Souza, Thomas G and Schulenburg, Hinrich},
  journal={Molecular Ecology},
  volume={13},
  number={7},
  pages={2101--2106},
  year={2004},
  publisher={Wiley Online Library}
}

%0 Journal Article
@article{abawi1975source,
	author = {Abawi, G. S. and Grogan, R. G.},
	year = {1975},
	 title = {Source of primary inoculum and effects of temperature and moisture on infection of beans by {\textit{Whetzelinia sclerotiorum}}},
	journal = {{Phytopathology}},
	volume = {65},
	pages = {300--309},
}
%! Source of primary inoculum and effects of temperature and moisture on infection of beans by Whetzelinia sclerotiorum

%0 Journal Article
@article{agapow2001indices,
	author = {Agapow, P. and Burt, A.},
	year = {2001},
	 title = {Indices of multilocus linkage disequilibrium},
	journal = {{Molecular Ecology Notes}},
	volume = {1},
	pages = {101--102},
}
%! Indices of multilocus linkage disequilibrium

@article{smith1993how,
  author = {Smith, J M and Smith, N H and O'Rourke, M and Spratt, B G},
  title = {How clonal are bacteria?},
  volume = {90},
  number = {10},
  pages = {4384-4388},
  year = {1993},
  doi = {10.1073/pnas.90.10.4384},
  abstract ={Data from multilocus enzyme electrophoresis of bacterial populations were analyzed using a statistical test designed to detect associations between g
  enes at different loci. Some species (e.g., Salmonella) were found to be clonal at all levels of analysis. At the other extreme, Neisseria gonorrhoeae is panmic
  tic, with random association between loci. Two intermediate types of population structure were also found. Neisseria meningitidis displays what we have called a
  n "epidemic" structure. There is significant association between loci, but this arises only because of the recent, explosive, increase in particular electrophor
  etic types; when this effect is eliminated the population is found to be effectively panmictic. In contrast, linkage disequilibrium in a population of Rhizobium
   meliloti exists because the sample consisted of two genetically isolated divisions, often fixed for different alleles: within each division association between
   loci was almost random. The method of analysis is appropriate whenever there is doubt about the extent of genetic recombination between members of a population
  . To illustrate this we analyzed data on protozoan parasites and again found panmictic, epidemic, and clonal population structures.},
  URL = {http://www.pnas.org/content/90/10/4384.abstract},
  eprint = {http://www.pnas.org/content/90/10/4384.full.pdf+html},
  journal = {Proceedings of the National Academy of Sciences}
}

@article{aldrich-wolfe2015genetic,
  doi = {10.1371/journal.pone.0139188},
  url = {https://doi.org/10.1371/journal.pone.0139188},
  year = {2015},
  month = {sep},
  publisher = {Public Library of Science ({PLoS})},
  volume = {10},
  number = {9},
  pages = {e0139188},
  author = {Laura Aldrich-Wolfe and Steven Travers and Berlin D. Nelson},
  editor = {Zhengfeng Wang},
  title = {Genetic Variation of {\textit{Sclerotinia sclerotiorum}} from Multiple Crops in the North Central {United States}},
  journal = {{PLOS} {ONE}},
}

@article{arnaud2007standardizing,
  title={Standardizing methods to address clonality in population studies},
  author={Arnaud-Hanod, Sophie and Duarte, Carlos M and Alberto, Filipe and Serr{\~a}o, Ester A},
  journal={Molecular Ecology},
  volume={16},
  number={24},
  pages={5115--5139},
  year={2007},
  doi={10.1111/j.1365-294X.2007.03535.x},
  publisher={Wiley Online Library}
}

%0 Journal Article
@article{atallah2004high,
	author = {Atallah, Z. K. and Larget, B. and Chen, X. and Johnson, D. A.},
	year = {2004},
	 title = {High genetic diversity, phenotypic uniformity, and evidence of outcrossing in {\textit{Sclerotinia sclerotiorum}} in the {Columbia Basin of Washington State}},
	journal = {{Phytopathology}},
	volume = {94},
	pages = {737--742},
}
%! High genetic diversity, phenotypic uniformity, and evidence of outcrossing in \textit{Sclerotinia sclerotiorum} in the Columbia Basin of Washington State

@article{attanayake2013sclerotinia,
  doi = {10.1094/phyto-07-12-0159-r},
  url = {https://doi.org/10.1094/phyto-07-12-0159-r},
  year = {2013},
  month = {jul},
  publisher = {Scientific Societies},
  volume = {103},
  number = {7},
  pages = {750--761},
  author = {Renuka N. Attanayake and Patrick A. Carter and Daohong Jiang and Luis {del R\'{\i}o-Mendoza} and Weidong Chen},
  title = {{\textit{Sclerotinia sclerotiorum}} Populations Infecting Canola from {China} and the {United States} Are Genetically and Phenotypically Distinct},
  journal = {Phytopathology},
}

%! Genetic and phenotypic diversity and random association of DNA markers of isolates of the fungal plant pathogen \textit{Sclerotinia sclerotiorum} from soil on a fine geographic scale

%0 Journal Article
@article{boland1994index,
	doi = {10.1080/07060669409500766},
	url = {https://doi.org/10.1080/07060669409500766},
	year = 1994,
	month = {jun},
	publisher = {Informa {UK} Limited},
	volume = {16},
	number = {2},
	pages = {93--108},
	author = {G.J. Boland and R. Hall},
	title = {Index of plant hosts of {\textit{Sclerotinia sclerotiorum}}},
	journal = {Canadian Journal of Plant Pathology}
}

@Article{bolton2006sclerotinia,
  doi = {10.1111/j.1364-3703.2005.00316.x},
  url = {https://doi.org/10.1111/j.1364-3703.2005.00316.x},
  year = {2006},
  month = {jan},
  publisher = {Wiley-Blackwell},
  volume = {7},
  number = {1},
  pages = {1--16},
  author = {Melvin D. Bolton and Bart P. H. J. Thomma and Berlin D. Nelson},
  title = {{\textit{Sclerotinia sclerotiorum}} {(Lib.) de Bary}: {Biology} and molecular traits of a cosmopolitan pathogen},
  journal = {Molecular Plant Pathology},
}

%0 Journal Article
@article{brown1980multilocus,
	author = {Brown, A. H. D. and Feldman, M. W. and Nevo, E.},
	title = {Multilocus Structure Of Natural Populations Of {\textit{Hordeum Spontaneum}}},
	volume = {96},
	number = {2},
	pages = {523--536},
	year = {1980},
	publisher = {Genetics},
	issn = {0016-6731},
	URL = {http://www.genetics.org/content/96/2/523},
	eprint = {http://www.genetics.org/content/96/2/523.full.pdf},
	journal = {Genetics}
}

%! Multilocus structure of natural populations of Hordeum spontaneum

%0 Journal Article
@article{carbone1993ribosomal,
	author = {Carbone, I. and Kohn, L. M.},
	year = {1993},
	 title = {Ribosomal DNA sequence divergence within internal transcribed spacer 1 of the {Sclerotiniaceae}},
	journal = {{Mycologia}},
	volume = {85},
	pages = {415--427},
}
%! Ribosomal DNA sequence divergence within internal transcribed spacer 1 of the Sclerotiniaceae

%0 Journal Article
@article{clarkson2013population,
	author = {Clarkson, J. P. and Coventry, E. and Kitchen, J. and Carter, H. E. and Whipps, J. M.},
	year = {2013},
	 title = {Population structure of {\textit{Sclerotinia sclerotiorum}} in crop and wild hosts in the {UK}},
	journal = {{Plant Pathology}},
	volume = {62},
	pages = {309--324},
}
%! Population structure of \textit{Sclerotinia sclerotiorum} in crop and wild hosts in the UK

%0 Journal Article
@article{clarkson2003ascospore,
	author = {Clarkson, J. P. and Staveley, J and Phelps, K and Young, C. S. and Whipps, J. M.},
	year = {2003},
	 title = {Ascospore release and survival in {\textit{Sclerotinia sclerotiorum}}},
	journal = {{Mycological Research}},
	volume = {107},
	pages = {213--222},
}
%! Ascospore release and survival in \textit{Sclerotinia sclerotiorum}

%0 Journal Article
@article{cubeta1997clonality,
	author = {Cubeta, M. A. and Cody, B. R. and Kohli, Y. and Kohn, L. M.},
	year = {1997},
	 title = {Clonality in {\textit{Sclerotinia sclerotiorum}} on infected cabbage in eastern {North Carolina}},
	journal = {{Phytopathology}},
	volume = {87},
	pages = {1000--1004},
}
%! Clonality in \textit{Sclerotinia sclerotiorum} on infected cabbage in eastern North Carolina

@article{cubeta2001mycelial,
   title={Mycelial interactions of {\textit{Sclerotinia minor}}},
  author={Cubeta, MA and Sermons, DN and Cody, BR},
  journal={Phytopathology},
  doi = {10.1094/phyto.2001.91.6.s1},
  url = {https://doi.org/10.1094/phyto.2001.91.6.s1},
  volume={91},
  number = {6S},
  pages={S19},
  month = {jun},
  year={2001}
}

@misc{ekins1999genetic,
	 title = {Genetic Diversity in {\textit{Sclerotinia}} species},
	author = {Ekins, M. G.},
	volume = {Ph.D.},
	publisher = {University of Queensland},
	year = {1999},
}
%! Genetic Diversity in Sclerotinia species

%0 Journal Article
@article{ekins2011population,
	author = {Ekins, M. G. and Hayden, H. L. and Aitken, E. A. B. and Goulter, K. C.},
	year = {2011},
	 title = {Population structure of {\textit{Sclerotinia sclerotiorum}} on sunflower in {Australia}},
	journal = {{Australasian Plant Pathology}},
	volume = {40},
	pages = {99--108},
}
%! Population structure of \textit{Sclerotinia sclerotiorum} on sunflower in Australia

%0 Journal Article
@article{grunwald2003analysis,
  doi = {10.1094/phyto.2003.93.6.738},
  url = {http://dx.doi.org/10.1094/PHYTO.2003.93.6.738},
  pubmedid = {18943061},
  issn = {0031-949X},
  year = {2003},
  month = {jun},
  publisher = {Scientific Societies},
  volume = {93},
  number = {6},
  pages = {738--746},
  author = {Niklaus J. Gr{\"u}nwald and Stephen B. Goodwin and Michael G. Milgroom and William E. Fry},
  title = {Analysis of Genotypic Diversity Data for Populations of Microorganisms},
  journal = {Phytopathology},
}
%! Analysis of genotypic diversity data for populations of microorganisms

%0 Journal Article
@article{huang1991induction,
	author = {Huang, H. C.},
	year = {1991},
	 title = {Induction of myceliogenic germination of sclerotia of {\textit{Sclerotinia sclerotiorum}} by exposure to sub-freezing temperatures},
	journal = {{Plant Pathology}},
	volume = {40},
	pages = {621--625},
}
%! Induction of myceliogenic germination of sclerotia of \textit{Sclerotinia sclerotiorum} by exposure to sub-freezing temperatures

%0 Journal Article
@article{jombart2008adegenet,
	doi = {10.1093/bioinformatics/btn129},
	url = {https://doi.org/10.1093/bioinformatics/btn129},
	year = 2008,
	month = {apr},
	publisher = {Oxford University Press ({OUP})},
	volume = {24},
	number = {11},
	pages = {1403--1405},
	author = {Thibaut Jombart},
	title = {{adegenet: A R} package for the multivariate analysis of genetic markers},
	journal = {Bioinformatics}
}

%! adegenet: a R package for the multivariate analysis of genetic markers
%R 10.1093/bioinformatics/btn129

%0 Journal Article
@article{jombart2010discriminant,
	author = {Jombart, T. and Devillard, S.  and Balloux, F.},
	year = {2010},
	 title = {Discriminant analysis of principal components: {A} new method for the analysis of genetically structured populations},
	journal = {{BMC Genetics}},
	volume = {11:94},
	doi = {10.1186/1471--2156--11--94},
}
%! Discriminant analysis of principal components: a new method for the analysis of genetically structured populations

@article{jost2008gst,
  doi = {10.1111/j.1365-294x.2008.03887.x},
  url = {https://doi.org/10.1111/j.1365-294x.2008.03887.x},
  year = 2008,
  month = {sep},
  publisher = {Wiley-Blackwell},
  volume = {17},
  number = {18},
  pages = {4015--4026},
  author = {Lou Jost},
  title = {{$G_{st}$} and its relatives do not measure differentiation},
  journal = {Molecular Ecology}
}

%0 Journal Article
@article{kohli1995clonal,
	author = {Kohli, Y. and Brunner, L. J. and Yoell, H and Milgroom, M. G. and Anderson, J. B. and Morrall, R. A. A. and Kohn, L. M.},
	year = {1995},
	 title = {Clonal dispersal and spatial mixing in populations of the plant pathogenic fungus, {\textit{Sclerotinia sclerotiorum}}},
	journal = {{Molecular Ecology}},
	volume = {4},
	pages = {69--77},
}
%! Clonal dispersal and spatial mixing in populations of the plant pathogenic fungus, \textit{Sclerotinia sclerotiorum}

%0 Journal Article
@article{kohli1998random,
	author = {Kohli, Y. and Kohn, L. M.},
	year = {1998},
	title = {Random association among alleles in clonal populations of {\textit{Sclerotinia sclerotiorum}}},
	journal = {{Fungal Genetics and Biology}},
	volume = {23},
	pages = {139--149},
}
%! Random association among alleles in clonal populations of \textit{Sclerotinia sclerotiorum}

%0 Journal Article
@article{kohn1995clonal,
	doi = {10.1139/b95-383},
	url = {https://doi.org/10.1139/b95-383},
	year = 1995,
	month = {dec},
	publisher = {Canadian Science Publishing},
	volume = {73},
	number = {S1},
	pages = {1231--1240},
	author = {L. M. Kohn},
	title = {The clonal dynamic in wild and agricultural plant-pathogen populations},
	journal = {Canadian Journal of Botany}
}
%! The clonal dynamic in wild and agricultural plant-pathogen populations

%0 Journal Article
@article{kohn1990mycelial,
	author = {Kohn, L. M. and Carbone, I. and Anderson, J. B.},
	year = {1990},
	 title = {Mycelial interactions in {\textit{Sclerotinia sclerotiorum}}},
	journal = {{Experimental Mycology}},
	volume = {14},
	pages = {255--267},
}
%! Mycelial interactions in \textit{Sclerotinia sclerotiorum}

@article{schafer2006optimized,
	doi = {10.1080/15572536.2006.11832662},
	url = {https://doi.org/10.1080/15572536.2006.11832662},
	year = 2006,
	month = {jul},
	publisher = {Informa {UK} Limited},
	volume = {98},
	number = {4},
	pages = {593--597},
	author = {Michelle R. Schafer and Linda M. Kohn},
	 title = {An optimized method for mycelial compatibility testing in {\textit{Sclerotinia sclerotiorum}}},
	journal = {Mycologia}
}

%0 Journal Article
@article{kolkman2002agronomic,
	author = {Kolkman, J. M. and Kelly, J. D.},
	year = {2002},
	 title = {Agronomic Traits Affecting Resistance to White Mold in Common Bean},
	journal = {{Crop Science}},
	volume = {42},
	pages = {693--699},
}
%! Agronomic Traits Affecting Resistance to White Mold in Common Bean

%0 Journal Article
@article{legendre1999distance,
	author = {Legendre, P. and Anderson, M. J.},
	year = {1999},
	title = {Distance-based redundancy analysis: {Testing} multispecies responses in multifactorial ecological experiments},
	journal = {{Ecological Monographs}},
	volume = {69},
	pages = {1--24},
}
%! Distance-based redundancy analysis: testing multispecies responses in multifactorial ecological experiments

@article{lehner2017sclerotinia,
  doi = {10.1007/s40858-016-0125-1},
  url = {https://doi.org/10.1007/s40858-016-0125-1},
  year = {2017},
  month = {jan},
  publisher = {Springer Nature},
  volume = {42},
  number = {2},
  pages = {61--69},
  author = {Miller S. Lehner and Eduardo S. G. Mizubuti},
   title = {Are {\textit{Sclerotinia sclerotiorum}} populations from the tropics more variable than those from subtropical and temperate zones?},
  journal = {Tropical Plant Pathology},
}

@article{lehner2017independently,
   title={Independently founded populations of {\textit{Sclerotinia sclerotiorum}} from a tropical and a temperate region have similar genetic structure},
  author={Lehner, Miller S and de Paula J{\'u}nior, Trazilbo J and Del Ponte, Emerson M and Mizubuti, Eduardo SG and Pethybridge, Sarah J},
  journal={PloS one},
  volume={12},
  number={3},
  pages={e0173915},
  year={2017},
  publisher={Public Library of Science},
  doi = {10.1371/journal.pone.0173915}
}

%0 Journal Article
@article{malvarez2007new,
	author = {Malvarez, G. and Carbone, I. and Gr\"unwald, N. J. and Subbarao, K. V. and Schafer, M. R. and Kohn, L. M.},
	year = {2007},
	 title = {New populations of {\textit{Sclerotinia sclerotiorum}} from lettuce in {California} and peas and lentils in {Washington}},
	journal = {{Phytopathology}},
	volume = {97},
	pages = {470--483},
}
%! New populations of \textit{Sclerotinia sclerotiorum} from lettuce in California and peas and lentils in Washington

%0 Journal Article
@article{matheron1989in-vitro,
	doi = {10.1094/pd-73-0727},
	url = {https://doi.org/10.1094/pd-73-0727},
	year = 1989,
	publisher = {Scientific Societies},
	volume = {73},
	number = {9},
	pages = {727},
	author = {M. E. Matheron and J. C. Matejka},
	 title = {In Vitro and Field Comparison of Six New Fungicides with Iprodione and Vinclozolin for Control of Leaf Drop of Lettuce Caused by {\textit{Sclerotinia sclerotiorum}}},
	journal = {Plant Disease}
}

%! In vitro and field comparison of six new fungicides with iprodione and vinclozolin for control of leaf drop of lettuce caused by \textit{Sclerotinia sclerotiorum}

%0 Journal Article
@article{nei1978estimation,
	author = {Nei, M.},
	year = {1978},
	 title = {Estimation of average heterozygosity and genetic distance from a small number of individuals},
	journal = {{Genetics}},
	volume = {89},
	pages = {583--590},
}
%! Estimation of average heterozygosity and genetic distance from a small number of individuals

%0 Journal Article
@article{njambere2014genotypic,
	author = {Njambere, E. N. and Peever, T. L. and Vandemark, G. and Chen, W.},
	year = {2014},
	 title = {Genotypic variation and population structure of {\textit{Sclerotinia trifoliorum}} infecting chickpea in {California}},
	journal = {{Plant Pathology}},
	volume = {63},
	pages = {994--1004},
}
%! Genotypic variation and population structure of Sclerotinia trifoliorum infecting chickpea in California

@article{parks1993study,
  doi = {10.2307/2445369},
  url = {http://dx.doi.org/10.2307/2445369},
  year = {1993},
  month = {may},
  publisher = {Botanical Society of America},
  volume = {80},
  number = {5},
  pages = {537},
  author = {James C. Parks and Charles R. Werth},
  title = {A Study of Spatial Features of Clones in a Population of Bracken Fern, {\textit{Pteridium aquilinum} (Dennstaedtiaceae)}},
  journal = {American Journal of Botany},
}

%0 Journal Article
@article{peakall2012genalex,
	author = {Peakall, R and Smouse, P.E.},
	year = {2012},
	 title = {{GenAlEx} 6.5: genetic analysis in {Excel}. {Population} genetic software for teaching and research---an update},
	journal = {{Bioinformatics}},
	volume = {28},
	pages = {2537--2539},
}
%! GenAlEx 6.5: genetic analysis in Excel. Population genetic software for teaching and research---an update

%0 Journal Article
@article{petzoldt1996straw,
	author = {Petzoldt, R and Dickson, M. H.},
	year = {1996},
	title = {Straw test for resistance to white mold in beans},
	journal = {{Bean Improvement Cooperative Annual Report}},
	volume = {39},
	pages = {142--143},
	url = {https://naldc.nal.usda.gov/naldc/catalog.xhtml?id=IND20562675},
}
%! Straw test for resistance to white mold in beans

%0 Journal Article
@article{sexton2004microsatellite,
	doi = {10.1007/s00294-004-0543-3},
	url = {https://doi.org/10.1007/s00294-004-0543-3},
	year = 2004,
	month = {nov},
	publisher = {Springer Nature},
	volume = {46},
	number = {6},
	pages = {357--365},
	author = {Adrienne C. Sexton and Barbara J. Howlett},
	title = {Microsatellite markers reveal genetic differentiation among populations of {\textit{Sclerotinia sclerotiorum}} from {Australian} canola fields},
	journal = {Current Genetics}
}
%! Microsatellite markers reveal genetic differentiation among populations of \textit{Sclerotinia sclerotiorum} from Australian canola fields

%0 Journal Article
@article{sexton2006population,
	doi = {10.1139/g06-101},
	url = {https://doi.org/10.1139/g06-101},
	year = 2006,
	month = {nov},
	publisher = {Canadian Science Publishing},
	volume = {49},
	number = {11},
	pages = {1408--1415},
	author = {Adrienne C. Sexton and Athol R. Whitten and Barbara J. Howlett},
	title = {Population structure of {\textit{Sclerotinia sclerotiorum}} in an {Australian} canola field at flowering and stem-infection stages of the disease cycle},
	journal = {Genome}
}
%! Population structure of \textit{Sclerotinia sclerotiorum} in an Australian canola field at flowering and stem infection stages of the disease cycle

@article{sirjusingh2001characterisation,
  doi = {10.1046/j.1471-8278.2001.00102.x},
  url = {https://doi.org/10.1046/j.1471-8278.2001.00102.x},
  year = {2001},
  month = {dec},
  publisher = {Wiley-Blackwell},
  volume = {1},
  number = {4},
  pages = {267--269},
  author = {Caroline Sirjusingh and Linda M. Kohn},
  title = {Characterisation of microsatellites in the fungal plant pathogen, {\textit{Sclerotinia sclerotiorum}}},
  journal = {Molecular Ecology Notes},
}

@article{carbone2001multilocus,
	doi = {10.1046/j.0962-1083.2001.01380.x},
	url = {https://doi.org/10.1046/j.0962-1083.2001.01380.x},
	year = 2001,
	month = {dec},
	publisher = {Wiley-Blackwell},
	volume = {10},
	number = {10},
	pages = {2409--2422},
	author = {Ignazio Carbone and Linda M. Kohn},
	title = {Multilocus nested haplotype networks extended with {DNA} fingerprints show common origin and fine-scale, ongoing genetic divergence in a wild microbial metapopulation},
	journal = {Molecular Ecology}
}

@article{tu1982tolerance,
	doi = {10.4141/cjps82-010},
	url = {https://doi.org/10.4141/cjps82-010},
	year = 1982,
	month = {jan},
	publisher = {Canadian Science Publishing},
	volume = {62},
	number = {1},
	pages = {65--69},
	author = {J. C. Tu and W. D. Beversdorf},
	title = {Tolerance to white mold ({\textit{Sclerotinia sclerotiorum} (Lib.) De Bary)} in {Ex Rico} 23, A cultivar of white bean ({\textit{Phaseolus vulgaris} L.)}},
	journal = {Canadian Journal of Plant Science}
}

%0 Journal Article
@article{steadman1983white,
	author = {Steadman, J. R.},
	year = {1983},
	 title = {White Mold - A Serious Yield-Limiting Disease of Bean},
	journal = {{Plant Disease}},
	volume = {67},
	pages = {346--350},
}
%! White Mold - A Serious Yield-Limiting Disease of Bean

@article{otto-hanson2011variation,
	doi = {10.1094/pdis-11-10-0865},
	url = {https://doi.org/10.1094/pdis-11-10-0865},
	year = 2011,
	month = {nov},
	publisher = {Scientific Societies},
	volume = {95},
	number = {11},
	pages = {1370--1377},
	author = {Lindsey Otto-Hanson and James R. Steadman and Rebecca Higgins and Kent M. Eskridge},
	title = {Variation in {\textit{Sclerotinia sclerotiorum}} Bean Isolates from Multisite Resistance Screening Locations},
	journal = {Plant Disease}
}

% Mycelial compatibility groups with genotypes
@article{kohn1991mycelial,
  title={Mycelial incompatibility and molecular markers identify genetic variability in field populations of {\textit{Sclerotinia sclerotiorum}}},
  author={Kohn, LM and Stasovski, E and Carbone, I and Royer, J and Anderson, JB},
  journal={Phytopathology},
  volume={81},
  number={4},
  pages={480--485},
  year={1991}
}

% Barrage formation != vcg
@article{micali2003independence,
	doi = {10.1016/s1087-1845(02)00533-9},
	url = {https://doi.org/10.1016/s1087-1845%2802%2900533-9},
	year = 2003,
	month = {mar},
	publisher = {Elsevier {BV}},
	volume = {38},
	number = {2},
	pages = {209--219},
	author = {Cristina O Micali and Myron L Smith},
	 title = {On the independence of barrage formation and heterokaryon incompatibility in {\textit{Neurospora crassa}}},
	journal = {Fungal Genetics and Biology}
}

% Barrage formation != vcg
@article{papaioannou2014barrage,
	doi = {10.1007/s10658-014-0525-3},
	url = {https://doi.org/10.1007/s10658-014-0525-3},
	year = 2014,
	month = {sep},
	publisher = {Springer Nature},
	volume = {141},
	number = {1},
	pages = {71--82},
	author = {Ioannis A. Papaioannou and Milton A. Typas},
	 title = {Barrage formation is independent from heterokaryon incompatibility in {\textit{Verticillium dahliae}}},
	journal = {European Journal of Plant Pathology}
}

% Barrage formation != vcg
@article{jo2008reassessment,
	doi = {10.1094/phyto-98-1-0108},
	url = {https://doi.org/10.1094/phyto-98-1-0108},
	year = 2008,
	month = {jan},
	publisher = {Scientific Societies},
	volume = {98},
	number = {1},
	pages = {108--114},
	author = {Y.-K. Jo and S. W. Chang and J. Rees and G. Jung},
	 title = {Reassessment of Vegetative Compatibility of {\textit{Sclerotinia homoeocarpa}} Using Nitrate-Nonutilizing Mutants},
	journal = {Phytopathology}
}

@article{strom2016genomes,
	doi = {10.1186/s40694-016-0022-x},
	url = {https://doi.org/10.1186/s40694-016-0022-x},
	year = 2016,
	month = {may},
	publisher = {Springer Nature},
	volume = {3},
	number = {1},
	author = {Noah B. Strom and Kathryn E. Bushley},
	title = {Two genomes are better than one: history, genetics, and biotechnological applications of fungal heterokaryons},
	journal = {Fungal Biology and Biotechnology}
}

@article{hall2010evolution,
	doi = {10.1371/journal.pone.0014055},
	url = {https://doi.org/10.1371/journal.pone.0014055},
	year = 2010,
	month = {nov},
	publisher = {Public Library of Science ({PLoS})},
	volume = {5},
	number = {11},
	pages = {e14055},
	author = {Charles Hall and Juliet Welch and David J. Kowbel and N. Louise Glass},
	editor = {Alexander Idnurm},
	title = {Evolution and Diversity of a Fungal Self/Nonself Recognition Locus},
	journal = {{PLoS} {ONE}}
}

@article{saupe2000molecular,
	doi = {10.1128/mmbr.64.3.489-502.2000},
	url = {https://doi.org/10.1128/mmbr.64.3.489-502.2000},
	year = 2000,
	month = {sep},
	publisher = {American Society for Microbiology},
	volume = {64},
	number = {3},
	pages = {489--502},
	author = {S. J. Saupe},
	title = {Molecular Genetics of Heterokaryon Incompatibility in Filamentous Ascomycetes},
	journal = {Microbiology and Molecular Biology Reviews}
}

% Diversity on a fine-scale. They show here that there is little correlation between MCG and MLG
@article{attanayake2012genetic,
	doi = {10.1016/j.soilbio.2012.06.002},
	url = {https://doi.org/10.1016/j.soilbio.2012.06.002},
	year = 2012,
	month = {dec},
	publisher = {Elsevier {BV}},
	volume = {55},
	pages = {28--36},
	author = {R.N. Attanayake and L. Porter and D.A. Johnson and W. Chen},
	 title = {Genetic and phenotypic diversity and random association of {DNA} markers of isolates of the fungal plant pathogen {\textit{Sclerotinia sclerotiorum}} from soil on a fine geographic scale},
	journal = {Soil Biology and Biochemistry}
}

% MCGs do not explain genotypic diversity or severity.
@article{lehner2016similar,
	doi = {10.1094/pdis-04-15-0400-re},
	url = {https://doi.org/10.1094/pdis-04-15-0400-re},
	year = 2016,
	month = {feb},
	publisher = {Scientific Societies},
	volume = {100},
	number = {2},
	pages = {360--366},
	author = {M. S. Lehner and R. C. Lima and J. E. S. Carneiro and T. J. Paula J{\'{u}}nior and R. F. Vieira and E. S. G. Mizubuti},
	 title = {Similar Aggressiveness of Phenotypically and Genotypically Distinct Isolates of {\textit{Sclerotinia sclerotiorum}}},
	journal = {Plant Disease}
}

% Not just one isolate can be used for screening resistance
@article{willbur2017comprehensive,
	doi = {10.1094/pdis-07-16-1055-re},
	url = {https://doi.org/10.1094/pdis-07-16-1055-re},
	year = 2017,
	month = {feb},
	publisher = {Scientific Societies},
	volume = {101},
	number = {2},
	pages = {344--353},
	author = {J. F. Willbur and S. Ding and M. E. Marks and H. Lucas and C. R. Grau and C. L. Groves and M. Kabbage and D. L. Smith},
	 title = {Comprehensive Sclerotinia Stem Rot Screening of Soybean Germplasm Requires Multiple Isolates of {\textit{Sclerotinia sclerotiorum}}},
	journal = {Plant Disease}
}

% Steadman, J.R., Otto-Hanson, L.K., Powers, K., Kurowski, C., Mainz, R., Kelly, J., Griffiths, P., Grafton, K., Myers, J., Miklas, P.N., Schwartz, H. 2004. Identification of partial resistance to \textit{Sclerotinia sclerotiorum} in common bean at multiple locations. Bean Improvement Cooperative Annual Report. 47:281-282.

@article{steadman2003identification,
  title={Identification of partial resistance to {\textit{Sclerotinia sclerotiorum}} in common bean at multiple locations},
  author={Steadman, J. R. and Eskridge, KM and Powers, K},
  Journal={Bean Improvement Cooperative Annual Report},
  pages={225--226},
  url={https://naldc.nal.usda.gov/naldc/catalog.xhtml?id=IND43757287},
  year={2003}
}

@article{steadman2004identification,
  title={Identification of partial resistance to {\textit{Sclerotinia sclerotiorum}} in common bean at multiple locations},
  author={Steadman, J. R. and Otto-Hanson, LK and Powers, K},
  Journal={Bean Improvement Cooperative Annual Report},
  volume={47},
  pages={281--282},
  url={https://naldc.nal.usda.gov/naldc/catalog.xhtml?id=IND43758354},
  year={2004}
}

@article{steadman2005identification,
  title={Identification of partial resistance to {\textit{Sclerotinia sclerotiorum}} in common bean at multiple locations in 2004},
  author={Steadman, J. R. and Otto-Hanson, LK and Powers, K},
  Journal={Bean Improvement Cooperative Annual Report},
  pages={124--125},
  year={2005},
  url={https://naldc.nal.usda.gov/naldc/catalog.xhtml?id=IND43759243}
}

@article{steadman2006identification,
  title={Identification of partial resistance to {\textit{Sclerotinia sclerotiorum}} in common bean at multiple locations in 2005},
  author={Steadman, J. R. and Otto-Hanson, LK and Breathnach, J},
  Journal={Bean Improvement Cooperative Annual Report},
  pages={223--224},
  year={2006},
  url={https://naldc.nal.usda.gov/naldc/catalog.xhtml?id=IND43805570}
}

@article{otto2007identification,
  title={Identification of partial resistance to {\textit{Sclerotinia sclerotiorum}} in common bean at multiple locations in 2006},
  author={Otto-Hanson, LK and Steadman, J. R.},
  pages={133--134},
  journal={Bean Improvement Cooperative Annual report},
  year={2007},
  url={https://naldc.nal.usda.gov/naldc/catalog.xhtml?id=IND43940892}
}

@article{otto2008identification,
  title={Identification of partial resistance to {\textit{Sclerotinia sclerotiorum}} in common bean at multiple locations in 2007},
  author={Otto-Hanson, LK and Steadman, J. R.},
  pages={214--215},
  journal={Bean Improvement Cooperative Annual report},
  year={2008},
  url={https://naldc.nal.usda.gov/naldc/catalog.xhtml?id=IND44063230}
}

@article{mccoy2009use,
  title={Use of Multi-Site Screening to Identify Partial Resistance to White Mold in Common Bean in 2008},
  author={{McCoy}, S and Steadman, J. R.},
  pages={86--87},
  journal={Bean Improvement Cooperative Annual report},
  year={2009},
  url={https://naldc.nal.usda.gov/naldc/catalog.xhtml?id=IND44207142}
  }

%0 Journal Article
@article{teran2006modified,
	author = {Teran, H.  and Lema, M. and Schwartz, H. F. and Duncan, R.  and Gilbeitson, R. and Singh, S. P.},
	year = {2006},
	title = {{Modified Petzoldt and Dickson} scale for white mold rating of common bean},
	journal = {{Bean Improvement Cooperative Annual Report}},
	volume = {49},
	pages = {115--116},
	url={https://naldc.nal.usda.gov/naldc/catalog.xhtml?id=IND43805401},
}
%! Modified Petzoldt and Dickson scale for white mold rating of common bean

@phdthesis{lehner2015analysis,
    title    = {Analysis Of The Population Structure Of {\textit{Sclerotinia sclerotiorum}} Causing White Mold On Common Bean In {Brazil}},
    school   = {Federal University of Viçosa},
    author   = {Lehner, Miller {da Silva}},
    year     = {2015},
    type     = {{PhD} dissertation},
}

@article{carbone1999patterns,
	doi = {10.1111/j.1558-5646.1999.tb05329.x},
	url = {https://doi.org/10.1111/j.1558-5646.1999.tb05329.x},
	year = 1999,
	month = {feb},
	publisher = {Wiley-Blackwell},
	volume = {53},
	number = {1},
	pages = {11--21},
	author = {Ignazio Carbone and James B. Anderson and Linda M. Kohn},
	title = {Patterns Of Descent In Clonal Lineages And Their Multilocus Fingerprints Are Resolved With Combined Gene Genealogies},
	journal = {Evolution}
}

@article{leslie1993fungal,
	Author = {Leslie, JF},
	Title = {Fungal Vegetative Compatibility},
	Journal = {{Annual Review Of Phytopathology}},
	Year = {1993},
	Volume = {31},
	Pages = {127--150},
	Publisher = {{Annual Reviews Inc}},
	Address = {{4139 El Camino Way, Po Box 10139, Palo Alto, CA 94303-0139}},
	Type = {{Review}},
	Language = {{English}},
	Affiliation = {{Leslie, JF (reprint Author), Kansas State Univ Agr \& Appl Sci,dept Plant Pathol,throckmorton Hall,manhattan,ks 66506, Usa.}},
	DOI = {10.1146/annurev.py.31.090193.001015},
	ISSN = {{0066-4286}},
	Keywords = {{ASCOMYCETES; FUNGAL GENETICS; HETEROKARYONS; PARASEXUAL CYCLE}},
}

@article{ford1995heterokaryon,
  title={Heterokaryon formation and vegetative compatibility in {\textit{Sclerotinia sclerotiorum}}},
  author={Ford, EJ and Miller, RV and Gray, H and Sherwood, JE},
  journal={Mycological Research},
  volume={99},
  number={2},
  pages={241--247},
  year={1995},
  publisher={Elsevier}
}

@article{lehner2015genetic,
	doi = {10.1111/ppa.12322},
	url = {https://doi.org/10.1111/ppa.12322},
	year = 2015,
	month = {jan},
	publisher = {Wiley-Blackwell},
	volume = {64},
	number = {4},
	pages = {921--931},
	author = {M. S. Lehner and T. J. Paula J{\'{u}}nior and B. T. Hora J{\'{u}}nior and H. Teixeira and R. F. Vieira and J. E. S. Carneiro and E. S. G. Mizubuti},
	 title = {Low genetic variability in {\textit{Sclerotinia sclerotiorum}} populations from common bean fields in {Minas Gerais State, Brazil}, at regional, local and micro-scales},
	journal = {Plant Pathology}
}

@Article{csardi2006igraph,
  title = {The {igraph} software package for complex network research},
  author = {Gabor Csardi and Tamas Nepusz},
  journal = {InterJournal},
  volume = {Complex Systems},
  pages = {1695},
  year = {2006},
  url = {http://igraph.org},
}

@Manual{dplyr,
  title = {{dplyr}: A Grammar of Data Manipulation},
  author = {Hadley Wickham and Romain Francois and Lionel Henry and Kirill Müller},
  year = {2017},
  note = {R package version 0.7.1},
  url = {https://CRAN.R-project.org/package=dplyr},
}

@Manual{purrr,
  title = {{purrr}: Functional Programming Tools},
  author = {Lionel Henry and Hadley Wickham},
  year = {2017},
  note = {R package version 0.2.2.2},
  url = {https://CRAN.R-project.org/package=purrr},
}

@Manual{ggraph,
  title = {{ggraph}: {An} Implementation of Grammar of Graphics for Graphs and Networks},
  author = {Thomas Lin Pedersen},
  year = {2017},
  note = {R package version 1.0.0},
  url = {https://CRAN.R-project.org/package=ggraph},
}

@Book{ggplot2,
  author = {Hadley Wickham},
  title = {{ggplot2}: Elegant Graphics for Data Analysis},
  publisher = {Springer-Verlag New York},
  year = {2009},
  isbn = {978-0-387-98140-6},
  url = {http://ggplot2.org},
}

@Manual{R,
	title = {R: A Language and Environment for Statistical Computing},
	author = {{R Core Team}},
	organization = {R Foundation for Statistical Computing},
	address = {Vienna, Austria},
	year = {2017},
	url = {https://www.R-project.org/},
}

@article{mendiburu2015agricolae,
  doi = {10.7287/peerj.preprints.1404v1},
  author = {Mendiburu, Felipe De and Simon, Reinhard},
  keywords = {Bioinformatics, Computational Biology, Scientific Computing and Simulation, Visual Analytics},
  language = {eng},
  title = {Agricolae - Ten years of an open source statistical tool for experiments in breeding, agriculture and biology},
  publisher = {PeerJ PrePrints},
  year = {2015}
}

@Manual{vegan,
	title = {vegan: Community Ecology Package},
	author = {Jari Oksanen and F. Guillaume Blanchet and Michael Friendly and Roeland Kindt and Pierre Legendre and Dan McGlinn and Peter R. Minchin and R. B. O'Hara and Gavin L. Simpson and Peter Solymos and M. Henry H. Stevens and Eduard Szoecs and Helene Wagner},
	year = {2017},
	note = {R package version 2.4-4},
	url = {https://CRAN.R-project.org/package=vegan},
}

@article{pons2006computing,
	doi = {10.7155/jgaa.00124},
	url = {https://doi.org/10.7155/jgaa.00124},
	year = 2006,
	publisher = {Journal of Graph Algorithms and Applications},
	volume = {10},
	number = {2},
	pages = {191--218},
	author = {Pascal Pons and Matthieu Latapy},
	title = {Computing Communities in Large Networks Using Random Walks},
	journal = {Journal of Graph Algorithms and Applications}
}

@article{excoffier1992analysis,
  title = {Analysis of molecular variance inferred from metric distances among {DNA} haplotypes: {Application} to human mitochondrial {DNA} restriction data},
  author = {L Excoffier and P E Smouse and J M Quattro},
  year = {1992},
  month = {Jun},
  journal = {Genetics},
  volume = {131},
  number = {2},
  pages = {479-91},
  eprint = {1644282},
  archiveprefix = {pubmed},
}

@article{shannon2001mathematical,
  title={A mathematical theory of communication},
  author={Shannon, Claude Elwood},
  journal={ACM SIGMOBILE Mobile Computing and Communications Review},
  volume={5},
  number={1},
  pages={3--55},
  year={1948},
  publisher={ACM}
}

@article{milgroom1996recombination,
  title={Recombination and the multilocus structure of fungal populations},
  author={Milgroom, Michael G},
  journal={Annual Review of Phytopathology},
  volume={34},
  number={1},
  pages={457--477},
  year={1996},
  publisher={Annual Reviews},
  address={4139 El Camino Way, PO Box 10139, Palo Alto, CA 94303-0139, USA}
}

% id: b43
% Stoddart, J. A., and Taylor, J. F.1988. Genotypic diversity: Estimation and prediction in samples. Genetics 118:705-711.
%
%      //
%      genRefLink(128, 'b43', 'A1988M808900017');
%      //
%
% -- stoddart1988genotypic
@article{stoddart1988genotypic,
  title = {Genotypic diversity: estimation and prediction in samples},
  author = {J A Stoddart and J F Taylor},
  year = {1988},
  month = {Apr},
  journal = {Genetics},
  volume = {118},
  number = {4},
  pages = {705-11},
  eprint = {17246421},
  archiveprefix = {pubmed},
}

@book{pielou1975ecological,
  title={{Ecological Diversity}},
  publisher={Wiley \& Sons},
  author={Pielou, EC},
  address={New York},
  year={1975}
}

@article{heck1975explicit,
  doi = {10.2307/1934716},
  url = {http://dx.doi.org/10.2307/1934716},
  year = {1975},
  month = {oct},
  publisher = {Wiley-Blackwell},
  volume = {56},
  number = {6},
  pages = {1459--1461},
  author = {Kenneth L. Heck and Gerald {van Belle} and Daniel Simberloff},
  title = {Explicit Calculation of the Rarefaction Diversity Measurement and the Determination of Sufficient Sample Size},
  journal = {Ecology},
}

% id: b22
% -- hurlbert1971nonconcept
@article{hurlbert1971nonconcept,
  doi = {10.2307/1934145},
  url = {http://dx.doi.org/10.2307/1934145},
  year = {1971},
  month = {jul},
  publisher = {Wiley-Blackwell},
  volume = {52},
  number = {4},
  pages = {577--586},
  author = {Stuart H. Hurlbert},
  title = {The Nonconcept of Species Diversity: A Critique and Alternative Parameters},
  journal = {Ecology},
}

@article{simpson1949measurement,
	doi = {10.1038/163688a0},
	url = {https://doi.org/10.1038/163688a0},
	year = 1949,
	month = {apr},
	publisher = {Springer Nature},
	volume = {163},
	number = {4148},
	pages = {688--688},
	author = {E. H. Simpson},
	title = {Measurement of Diversity},
	journal = {Nature}
}

@article{davey2011genome,
  doi = {10.1038/nrg3012},
  url = {http://dx.doi.org/10.1038/nrg3012},
  year = {2011},
  month = {jun},
  publisher = {Springer Nature},
  volume = {12},
  number = {7},
  pages = {499--510},
  author = {John W. Davey and Paul A. Hohenlohe and Paul D. Etter and Jason Q. Boone and Julian M. Catchen and Mark L. Blaxter},
  title = {Genome-wide genetic marker discovery and genotyping using next-generation sequencing},
  journal = {Nature Reviews Genetics},
}

@article{derbyshire2017complete,
  doi = {10.1093/gbe/evx030},
  url = {https://doi.org/10.1093/gbe/evx030},
  year = {2017},
  month = {mar},
  publisher = {Oxford University Press ({OUP})},
  volume = {9},
  number = {3},
  pages = {593--618},
  author = {Mark Derbyshire and Matthew Denton-Giles and Dwayne Hegedus and Shirin Seifbarghy and Jeffrey Rollins and Jan {van Kan} and Michael F. Seidl and Luigi Faino and Malick Mbengue and Olivier Navaud and Sylvain Raffaele and Kim Hammond-Kosack and Stephanie Heard and Richard Oliver},
  title = {The Complete Genome Sequence of the Phytopathogenic Fungus {\textit{Sclerotinia sclerotiorum}} Reveals Insights into the Genome Architecture of Broad Host Range Pathogens},
  journal = {Genome Biology and Evolution},
}

@article{grover2012targeted,
	doi = {10.3732/ajb.1100323},
	url = {https://doi.org/10.3732/ajb.1100323},
	year = 2012,
	month = {jan},
	publisher = {Botanical Society of America},
	volume = {99},
	number = {2},
	pages = {312--319},
	author = {C. E. Grover and A. Salmon and J. F. Wendel},
	title = {Targeted sequence capture as a powerful tool for evolutionary analysis},
	journal = {American Journal of Botany}
}

@book{sambrook1989molecular,
  title={{Molecular Cloning: A Laboratory Manual.}},
  author={Sambrook, Joseph and Fritsch, Edward F and Maniatis, Tom and others},
  number={2},
  year={1989},
  publisher={Cold spring harbor laboratory press}
}

@article{prugnolle2010apparent,
  title={Apparent high recombination rates in clonal parasitic organisms due to inappropriate sampling design},
  author={Prugnolle, Franck and {de Mee{\^u}s}, Thierry},
  journal={Heredity},
  volume={104},
  number={2},
  pages={135--140},
  year={2010},
  doi={10.1038/hdy.2009.128},
  publisher={Nature Publishing Group}
}

@article{mcdonald2002pathogen,
	doi = {10.1146/annurev.phyto.40.120501.101443},
	url = {https://doi.org/10.1146/annurev.phyto.40.120501.101443},
	year = 2002,
	month = {sep},
	publisher = {Annual Reviews},
	volume = {40},
	number = {1},
	pages = {349--379},
	author = {Bruce A. McDonald and Celeste Linde},
	title = {Pathogen Population Genetics, Evolutionary Potential, and Durable Resistance},
	journal = {Annual Review of Phytopathology}
}

@article{botelho2013performance,
	doi = {10.1590/s2317-15372013000200003},
	url = {https://doi.org/10.1590/s2317-15372013000200003},
	year = 2013,
	publisher = {{FapUNIFESP} ({SciELO})},
	volume = {35},
	number = {2},
	pages = {153--160},
	author = {Luana {da Silva} Botelho and Willian Luis Antonio Zancan and Jos{\'{e}} da Cruz Machado and Ellen Noly Barrocas},
	title = {Performance of common bean seeds infected by the fungus {\textit{Sclerotinia sclerotiorum}}},
	journal = {Journal of Seed Science}
}

@article{strausbaugh2003management,
  title={Management of White Mold of Beans},
  author={Strausbaugh, CA and Forster, RL},
  year={2003},
  journal = {Pacific Northwest Extension},
  publisher = {Pacific Northwest Extension},
  institution = {University of Idaho; Oregon State University; Washington State University},
  volume = {PNW568},
  note = {Publication PNW568},
  url = {http://http://www.extension.uidaho.edu/publishing/pdf/PNW/PNW0568.pdf}
}

@article{knodel2012dry,
  title={2012 Dry Bean Grower Survey of Production, Pest Problems and Pesticide Use in {Minnesota} and {North Dakota}},
  author={Knodel, JJ and Beauzay, PB and Franzen, DW and Kandel, HJ and Markell, SG and Osorno, JM and Pasche, JS and Zollinger, RK},
  journal={North Dakota State University Extension},
  publisher={North Dakota State University Extension},
  institution = {North Dakota State University; Northarvest Bean Growers Association},
  volume = {E1640},
  note = {Publication E1640},
  year={2012}
}

@article{knodel2015dry,
  title={2015 Dry Bean Grower Survey of Production, Pest Problems and Pesticide Use in {Minnesota} and {North Dakota}},
  author={Knodel, JJ and Beauzay, PB and Franzen, DW and Kandel, HJ and Markell, SG and Osorno, JM and Pasche, JS and Zollinger, RK},
  journal={North Dakota State University Extension},
  publisher={North Dakota State University Extension},
  institution = {North Dakota State University; Northarvest Bean Growers Association},
  volume = {E1802},
  note = {Publication E1802},
  year={2015}
}

@article{knodel2016dry,
  title={2016 Dry Bean Grower Survey of Production, Pest Problems and Pesticide Use in {Minnesota} and {North Dakota}},
  author={Knodel, JJ and Beauzay, PB and Franzen, DW and Kandel, HJ and Markell, SG and Osorno, JM and Pasche, JS and Zollinger, RK},
  journal={North Dakota State University Extension},
  publisher={North Dakota State University Extension},
  institution = {North Dakota State University; Northarvest Bean Growers Association},
  volume = {E1841},
  note = {Publication E1841},
  year={2016}
}

@article{ramasubramaniam2008estimates,
	doi = {10.2134/agronj2007.0127},
	url = {https://doi.org/10.2134/agronj2007.0127},
	year = 2008,
	publisher = {American Society of Agronomy},
	volume = {100},
	number = {2},
	pages = {315},
	author = {Harikrishnan Ramasubramaniam and Luis E. {del R\'{\i}o Mendoza} and Carl A. Bradley},
	title = {Estimates of Yield and Economic Losses Associated with White Mold of Rain-Fed Dry Bean in {North Dakota}
		},
	journal = {Agronomy Journal}
}

extension: bib


text:
import React, { useContext, useEffect, useState } from 'react';
import './NoteList.scss';
import {
    useRouteMatch,
    useHistory,
    NavLink //for click functionality ie. on clicking note in NoteList, it should appear in the noteTextArea
} from "react-router-dom"; //for match.url
import { BASE_URL, GET_ALL_NOTES, GET_TRASH_NOTES } from './../../utils/apiEndpoints';
import { getRequest } from './../../utils/apiRequests';
import { NotesContext } from './../../context/context';
import { listFormatDate } from './../../utils/helpers';

const NoteList = (props) => {
    const [error, setError] = useState(null)
    const notesContext = useContext(NotesContext);
    const { title } = props;
    const match = useRouteMatch();
    const history = useHistory();
    useEffect(() => {
        // console.log(match.url); Done for testing; ignore
        getNotes()
    }, [match.url]) //we need to call this useEffect whenever the match.url is changing

    const getNotes = async () => {
        let endpoint = '';
        if (match.url == '/all-notes') {
            endpoint = GET_ALL_NOTES;
        } else if (match.url == '/trash') {
            endpoint = GET_TRASH_NOTES;
        } else {
            return;
        }

        const response = await getRequest(`${BASE_URL}${endpoint}`)
        if (response.error) {
            setError(response.error);
            return false;
        }
        notesContext.notesDispatch({ type: 'getAllNotesSuccess', payload: response });
        if (response.length > 0) {
            history.push({
                pathname: `${match.url}/${response[0]._id}`, //concatenating match.url and first note._id
                note: response[0]
            })
        }
    }

    return (

 {title}

                        {notesContext.notesState.length} notes

                {
                    (notesContext.notesState.length > 0) ? notesContext.notesState.map((note) => (
                        <NavLink key={note._id}className="note-card" to={
                            {
                                pathname: `${match.url}/${note._id}`,
                                note
                            }
                        }>

                                    {note.title}

                                    {note.desc}

                                {listFormatDate (note.updatedAt)}

                        </NavLink> //for click functionality we're using NavLink
                    )
                    ) :
No data found

                }

    )
}

export default NoteList;

repository: akshatrb/Clevernote

repo_name: akshatrb/Clevernote

extension: js


text:
SECTION = "x11/utils"
DESCRIPTION = "Inkscape is an SVG-based graphics editor featuring alpha \
blending, node editing, SVG to PNG export, and more. Its goal is for features \
similar to Illustrator, CorelDraw, Visio, etc."
DEPENDS = "intltool-native gtk+ libart-lgpl libxml2 libsigc++-1.2 popt"
LICENSE = "GPL"

SRC_URI = "${SOURCEFORGE_MIRROR}/inkscape/inkscape-${PV}.tar.bz2"
S = "${WORKDIR}/inkscape-${PV}"

inherit autotools gettext

EXTRA_OECONF = "--disable-mmx"

SRC_URI[md5sum] = "3542a646c6742686557b2f0e52c5f6dc"
SRC_URI[sha256sum] = "9436f3c01dc69a1e7781633cd85936a40b3a84325e01930188bbae45e13fdbdc"

repository: overo/overo-oe-natty

repo_name: overo/overo-oe-natty

branch_name: HEAD


text:
DESCRIPTION = "Freescale Image"
LICENSE = "MIT"

#require recipes-fsl/images/fsl-image-validation-imx.bb
require recipes-100ask/images/100ask-image-validation-imx.bb