Get element size
@param {HTMLElement} element
@returns {Object} {width, height}
480390
function getElementSize(element) {
            if (!element.getBoundingClientRect) {
                return {
                    width: element.offsetWidth,
                    height: element.offsetHeight
                }
            }

            var rect = element.getBoundingClientRect();
            return {
                width: Math.round(rect.width),
                height: Math.round(rect.height)
            }
        }
629594
function getElementType (node) {
  if (utils.isCustomComponent(node)) {
    return ELEMENT_TYPE.COMPONENT
  }
  if (utils.isHtmlElementNode(node)) {
    if (utils.isHtmlVoidElementName(node.name)) {
      return ELEMENT_TYPE.VOID
    }
    return ELEMENT_TYPE.NORMAL
  }
  if (utils.isSvgElementNode(node)) {
    return ELEMENT_TYPE.SVG
  }
  if (utils.isMathMLElementNode(node)) {
    return ELEMENT_TYPE.MATH
  }
  return 'unknown elements'
}
1164164
function isIntrinsicSize(element, prop) {

	var computedStyle = getComputedStyle(element);

	if (computedStyle.display === 'none') {
		return false;
	}

	if (computedStyle.display === 'inline') {
		return true;
	}

	// Non-floating non-absolute block elements (only width)
	if (
		prop === 'width'
		&& ['block', 'list-item', 'flex', 'grid'].indexOf(computedStyle.display) !== -1
		&& computedStyle.cssFloat === 'none'
		&& computedStyle.position !== 'absolute'
		&& computedStyle.position !== 'fixed'
	) {
		return false;
	}

	var originalStyle = getOriginalStyle(element, prop);

	// Fixed size
	if (originalStyle && originalStyle.match(LENGTH_REGEXP)) {
		return false;
	}

	// Percentage size
	if (originalStyle && originalStyle.substr(-1) === '%') {
		return false;
	}

	// Calc expression
	if (originalStyle && originalStyle.substr(0, 5) === 'calc(') {
		return false;
	}

	// Elements without a defined size
	return true;

}
920052
def GetSizeHint(self, context=None, **unused_kwargs):
    
    context_state = getattr(context, 'state', {})

    elements_data_size = self.GetByteSize()
    if elements_data_size:
      return elements_data_size

    try:
      elements_data_size = self._CalculateElementsDataSize(context)
    except errors.MappingError:
      pass

    if elements_data_size is None and self._HasElementsTerminator():
      size_hints = context_state.get('size_hints', {})
      size_hint = size_hints.get(self._data_type_definition.name, None)

      elements_data_size = 0

      if size_hint:
        elements_data_size = size_hint.byte_size

      if not size_hint or not size_hint.is_complete:
        elements_data_size += self._element_data_type_definition.GetByteSize()

    return elements_data_size
634452
function getElementStyle(element) {
  assertHTMLElement(element);
  return genericPropertyGet(
      Methods.STYLE_GETTER, element, 'style', function(style) {
        return style instanceof CSSStyleDeclaration;
      });
}
178862
function ( includeMargin ) {
            var el = this.element(),
                margin = 0;
    
            if ( el === window ) {
                if ( window.outerHeight ) {
                    return window.outerHeight;
                } else {
                    return $B.measure.windowHeight();
                }
            } else if ( el === document ) {
                return $B.measure.documentHeight();
            } else if ( el === screen ) {
                return screen.height;
            } else {
                if ( includeMargin === true ) {
                    var marginT = parseFloat( $B( el ).css( 'margin-top' ) ),
                        marginB = parseFloat( $B( el ).css( 'margin-bottom' ) );
    
                    if ( marginT ) margin += marginT;
                    if ( marginB ) margin += marginB;
                }
    
                return el.offsetHeight + margin;
            }
        }
904117
function (element) {
            var p = this.padding,
                w = this.canvas.width,
                h = this.canvas.height * 0.5;

            // Convert padding percentage to actual padding
            p = p.map(function (a, i) {
                return a * ((i % 2) ? w : h);
            });

            return [
                this.prettify((parseInt($(element).css("left"), 10)    - p[3]) / (w + p[1] + p[3])),
                this.prettify((h - parseInt($(element).css("top"), 10) - p[2]) / (h - p[0] - p[2]))
            ];
        }
883367
function( element, point ) {
            element = $.getElement( element );
            var offset = $.getElementOffset( element ),
                size = $.getElementSize( element );
            return point.x >= offset.x && point.x < offset.x + size.x && point.y < offset.y + size.y && point.y >= offset.y;
        }
482058
function getPixelHeight(element) {

        var heightString = getStyleOrAttrib(element, 'height');

        var heightNumber = parseInt(heightString, 10);

        if (isPercentageBasedSize(heightString)) {
          heightNumber = 0;
        }

        return !isNaN(heightNumber) && heightNumber > 0 ?
          heightNumber : getComputedStyleSize(element, 'height');
      }
52320
function(i,j) {
            	if (i < 1 || i > this.elements.length || j < 1 || j > this.elements[0].length) { return null; }
            	return this.elements[i - 1][j - 1];
                }
1270325
function(element){
    element = getEl(element);
    return {
      height : element.offsetHeight,
      width : element.offsetWidth };
  }
515394
function getImageSize(element) {
            var imageObj = url.parse(element.attribs.src),
                requestOptions,
                timeout = 3000;

            if (!validator.isURL(imageObj.href)) {
                // revert this element, do not show
                element.name = 'img';

                return enter();
            }

            // We need the user-agent, otherwise some https request may fail (e. g. cloudfare)
            requestOptions = {
                headers: {
                    'User-Agent': 'Mozilla/5.0 Safari/537.36'
                },
                timeout: timeout,
                encoding: null
            };

            return got(
                imageObj.href,
                requestOptions
            ).then(function (response) {
                try {
                    // Using the Buffer rather than an URL requires to use sizeOf synchronously.
                    // See https://github.com/image-size/image-size#asynchronous
                    var dimensions = sizeOf(response.body);

                    // CASE: `.ico` files might have multiple images and therefore multiple sizes.
                    // We return the largest size found (image-size default is the first size found)
                    if (dimensions.images) {
                        dimensions.width = _.maxBy(dimensions.images, function (w) {return w.width;}).width;
                        dimensions.height = _.maxBy(dimensions.images, function (h) {return h.height;}).height;
                    }

                    element.attribs.width = dimensions.width;
                    element.attribs.height = dimensions.height;

                    return getLayoutAttribute(element);
                } catch (err) {
                    // revert this element, do not show
                    element.name = 'img';
                    return enter();
                }
            }).catch(function () {
                // revert this element, do not show
                element.name = 'img';
                return enter();
            });
        }
466580
function getContentDimensions(instance) {
    const contentElement = instance._root.firstElementChild
    if (!contentElement) {
      return {
        width: 0,
        height: 0,
      }
    }

    let width
    let height
    if (window.devicePixelRatio > 1) {
      // This is much less performant, so we use in only on HiDPi displays
      const bounds = contentElement.getBoundingClientRect()
      width = bounds.width
      height = bounds.height
    } else {
      width = contentElement.scrollWidth
      height = contentElement.scrollHeight
    }

    return {
      width,
      height,
    }
  }
1082609
function getMaxElement(side, elements) {
    var elementsLength = elements.length,
      elVal = 0,
      maxVal = 0,
      Side = capitalizeFirstLetter(side),
      timer = getNow()

    for (var i = 0; i < elementsLength; i++) {
      elVal =
        elements[i].getBoundingClientRect()[side] +
        getComputedStyle('margin' + Side, elements[i])
      if (elVal > maxVal) {
        maxVal = elVal
      }
    }

    timer = getNow() - timer

    log('Parsed ' + elementsLength + ' HTML elements')
    log('Element position calculated in ' + timer + 'ms')

    chkEventThottle(timer)

    return maxVal
  }
1169871
function() {
			var element = this._.element.getFirst();
			return { width: element.$.offsetWidth || 0, height: element.$.offsetHeight || 0 };
		}
807407
function getComputedLength(value, element) {
	var length = value.match(LENGTH_REGEXP);
	if (!length) {
		return parseFloat(value);
	}
	value = parseFloat(length[1]);
	var unit = length[2].toLowerCase();
	if (FIXED_UNIT_MAP[unit]) {
		return value * FIXED_UNIT_MAP[unit];
	}
	if (unit === 'vw') {
		return value * window.innerWidth / 100;
	}
	if (unit === 'vh') {
		return value * window.innerHeight / 100;
	}
	if (unit === 'vmin') {
		return value * Math.min(window.innerWidth, window.innerHeight) / 100;
	}
	if (unit === 'vmax') {
		return value * Math.max(window.innerWidth, window.innerHeight) / 100;
	}
	// em units
	if (unit === 'rem') {
		element = documentElement;
	}
	if (unit === 'ex') {
		value /= 2;
	}
	return parseFloat(getComputedStyle(element).fontSize) * value;
}
1291338
function _getIndicatorRect (el) {
  let width, height
  if (el.children.length === 1) {
    width = height = window.getComputedStyle(el.children[0])
  }
  else {
    const itemComputedStyle = window.getComputedStyle(el.children[1])
    const padding = parseFloat(itemComputedStyle.marginLeft)
    height = parseFloat(itemComputedStyle.height)
    width = el.children.length * (height + padding) - padding
  }
  return { width, height }
}