plain-draggable-limit.esm.js
function validPPBBox(bBox) {
  if (!isObject(bBox)) {
    return null;
  }
  var ppValue = void 0;
  if ((ppValue = validPPValue(bBox.left)) || (ppValue = validPPValue(bBox.x))) {
    bBox.left = bBox.x = ppValue;
  } else {
    return null;
  }
  if ((ppValue = validPPValue(bBox.top)) || (ppValue = validPPValue(bBox.y))) {
    bBox.top = bBox.y = ppValue;
  } else {
    return null;
  }

  if ((ppValue = validPPValue(bBox.width)) && ppValue.value >= 0) {
    bBox.width = ppValue;
    delete bBox.right;
  } else if (ppValue = validPPValue(bBox.right)) {
    bBox.right = ppValue;
    delete bBox.width;
  } else {
    return null;
  }
  if ((ppValue = validPPValue(bBox.height)) && ppValue.value >= 0) {
    bBox.height = ppValue;
    delete bBox.bottom;
  } else if (ppValue = validPPValue(bBox.bottom)) {
    bBox.bottom = ppValue;
    delete bBox.height;
  } else {
    return null;
  }
  return bBox;
}
function validPPBBox(bBox) {
  if (!isObject(bBox)) {
    return null;
  }
  var ppValue = void 0;
  if ((ppValue = validPPValue(bBox.left)) || (ppValue = validPPValue(bBox.x))) {
    bBox.left = bBox.x = ppValue;
  } else {
    return null;
  }
  if ((ppValue = validPPValue(bBox.top)) || (ppValue = validPPValue(bBox.y))) {
    bBox.top = bBox.y = ppValue;
  } else {
    return null;
  }

  if ((ppValue = validPPValue(bBox.width)) && ppValue.value >= 0) {
    bBox.width = ppValue;
    delete bBox.right;
  } else if (ppValue = validPPValue(bBox.right)) {
    bBox.right = ppValue;
    delete bBox.width;
  } else {
    return null;
  }
  if ((ppValue = validPPValue(bBox.height)) && ppValue.value >= 0) {
    bBox.height = ppValue;
    delete bBox.bottom;
  } else if (ppValue = validPPValue(bBox.bottom)) {
    bBox.bottom = ppValue;
    delete bBox.height;
  } else {
    return null;
  }
  return bBox;
}
function validPPBBox ( bBox ) { if ( ! isObject ( bBox ) ) { return null ; } var ppValue = void 0 ; if ( ( ppValue = validPPValue ( bBox . left ) ) || ( ppValue = validPPValue ( bBox . x ) ) ) { bBox . left = bBox . x = ppValue ; } else { return null ; } if ( ( ppValue = validPPValue ( bBox . top ) ) || ( ppValue = validPPValue ( bBox . y ) ) ) { bBox . top = bBox . y = ppValue ; } else { return null ; } if ( ( ppValue = validPPValue ( bBox . width ) ) && ppValue . value >= 0 ) { bBox . width = ppValue ; delete bBox . right ; } else if ( ppValue = validPPValue ( bBox . right ) ) { bBox . right = ppValue ; delete bBox . width ; } else { return null ; } if ( ( ppValue = validPPValue ( bBox . height ) ) && ppValue . value >= 0 ) { bBox . height = ppValue ; delete bBox . bottom ; } else if ( ppValue = validPPValue ( bBox . bottom ) ) { bBox . bottom = ppValue ; delete bBox . height ; } else { return null ; } return bBox ; }
An object that simulates BBox but properties are PPValue.
@typedef {Object} PPBBox
 
@param {Object} bBox - A target object.
@returns {(PPBBox|null)} A normalized `PPBBox`, or null if `bBox` is invalid.
An object that simulates BBox but properties are PPValue .