# Path: applitools/core/logger.py
# _DEFAULT_EYES_LOGGER_NAME = 'eyes'
# _DEFAULT_EYES_FORMATTER = logging.Formatter('%(asctime)s [%(levelname)s] %(name)s: %(message)s')
# _DEFAULT_LOGGER_LEVEL = int(os.environ.get('LOGGER_LEVEL', logging.INFO))
# _DEBUG_SCREENSHOT_PREFIX = os.environ.get('DEBUG_SCREENSHOT_PREFIX', 'screenshot_')
# _DEBUG_SCREENSHOT_PATH = os.environ.get('DEBUG_SCREENSHOT_PATH', '.')
# class _Logger(ABC):
# class StdoutLogger(_Logger):
# class FileLogger(_Logger):
# class NullLogger(_Logger):
#     def __init__(self, name=__name__, level=_DEFAULT_LOGGER_LEVEL, handler_factory=lambda: None,
#                  formatter=None):
#     def open(self):
#     def close(self):
#     def info(self, msg):
#     def debug(self, msg):
#     def __init__(self, name=_DEFAULT_EYES_LOGGER_NAME, level=_DEFAULT_LOGGER_LEVEL):
#     def __init__(self, filename="eyes.log", mode='a', encoding=None, delay=0,
#                  name=_DEFAULT_EYES_LOGGER_NAME, level=_DEFAULT_LOGGER_LEVEL):
#     def __init__(self, name=_DEFAULT_EYES_LOGGER_NAME, level=_DEFAULT_LOGGER_LEVEL):
# def set_logger(logger=None):
# def open_():
# def close():
# def info(msg):
# def debug(msg):
# def warning(msg):
# def deprecation(msg):
# def save_screenshot(image, suffix, region=None):
# 
# Path: applitools/utils/general_utils.py
# class _UtcTz(tzinfo):
#     _ZERO = timedelta(0)
# UTC = _UtcTz()
#     def utcoffset(self, dt):
#     def tzname(self, dt):
#     def dst(self, dt):
# def to_json(obj):
# def create_proxy_property(property_name, target_name, is_settable=False):
#     def _proxy_get(self):
#     def _proxy_set(self, val):
# def create_forwarded_method(from_,  # type: tp.Union[EyesWebDriver, EyesWebElement, _EyesSwitchTo]
#                             to,  # type: tp.Union[WebDriver, WebElement, SwitchTo]
#                             func_name,  # type: str
#                             ):
#     def forwarded_method(self_, *args, **kwargs):
# def create_proxy_interface(from_,  # type: tp.Union[EyesWebDriver, EyesWebElement, _EyesSwitchTo]
#                            to,  # type: tp.Union[WebDriver, WebElement, SwitchTo]
#                            ignore_list=None,  # type: tp.List[str]
#                            override_existing=False,  # type: bool
#                            ):
# def cached_property(f):
#     def get(self):
# def is_absolute_url(url):
# def is_url_with_scheme(url):
# def timeit(method):
#     def timed(*args, **kw):
# def retry(delays=(0, 1, 5),
#           exception=Exception,
#           report=lambda *args: None):
#     def wrapper(function):
#         def wrapped(*args, **kwargs):
# 
# Path: applitools/utils/compat.py
# PY3 = sys.version_info >= (3,)
#     ABC = abc.ABC
#     ABC = abc.ABCMeta(str("ABC"), (), {})
#     def gzip_compress(data, compresslevel=9):
# def iteritems(dct):


import json
import typing as tp
import multiprocessing as mp
import requests
import tinycss2
from collections import OrderedDict
from applitools.core import logger
from applitools.utils import general_utils
from applitools.utils.compat import urljoin
    from applitools.selenium.webdriver import EyesWebDriver
                if tag.type == 'url':
                    logger.debug('The node has import')
                    yield CssNode.create_sub_node(
                        parent_node=node,
                        href=tag.value)
            continue

        try:
            if minimize:
                try:
                    # remove whitespaces inside blocks
                    style_node.content = [tok for tok in style_node.content if tok.type != 'whitespace']
                except AttributeError as e:
                    logger.warning("Cannot serialize item: {}, cause error: {}".format(style_node, str(e)))
            serialized = style_node.serialize()
            if minimize:
                serialized = serialized.replace('\n', '').replace('/**/', ' ').replace(' {', '{')

        except TypeError as e:
            logger.warning(str(e))
            continue
        yield CssNode.create_serialized_node(text=serialized)


def _make_url(base_url, value):
    # type: (tp.Text, tp.Text) -> tp.Text
    if (general_utils.is_absolute_url(value) and  # noqa
            not general_utils.is_url_with_scheme(value)):
        url = urljoin('http://', value)
    else:

# Path: applitools/core/logger.py
# _DEFAULT_EYES_LOGGER_NAME = 'eyes'
# _DEFAULT_EYES_FORMATTER = logging.Formatter('%(asctime)s [%(levelname)s] %(name)s: %(message)s')
# _DEFAULT_LOGGER_LEVEL = int(os.environ.get('LOGGER_LEVEL', logging.INFO))
# _DEBUG_SCREENSHOT_PREFIX = os.environ.get('DEBUG_SCREENSHOT_PREFIX', 'screenshot_')
# _DEBUG_SCREENSHOT_PATH = os.environ.get('DEBUG_SCREENSHOT_PATH', '.')
# class _Logger(ABC):
# class StdoutLogger(_Logger):
# class FileLogger(_Logger):
# class NullLogger(_Logger):
#     def __init__(self, name=__name__, level=_DEFAULT_LOGGER_LEVEL, handler_factory=lambda: None,
#                  formatter=None):
#     def open(self):
#     def close(self):
#     def info(self, msg):
#     def debug(self, msg):
#     def __init__(self, name=_DEFAULT_EYES_LOGGER_NAME, level=_DEFAULT_LOGGER_LEVEL):
#     def __init__(self, filename="eyes.log", mode='a', encoding=None, delay=0,
#                  name=_DEFAULT_EYES_LOGGER_NAME, level=_DEFAULT_LOGGER_LEVEL):
#     def __init__(self, name=_DEFAULT_EYES_LOGGER_NAME, level=_DEFAULT_LOGGER_LEVEL):
# def set_logger(logger=None):
# def open_():
# def close():
# def info(msg):
# def debug(msg):
# def warning(msg):
# def deprecation(msg):
# def save_screenshot(image, suffix, region=None):
# 
# Path: applitools/utils/general_utils.py
# class _UtcTz(tzinfo):
#     _ZERO = timedelta(0)
# UTC = _UtcTz()
#     def utcoffset(self, dt):
#     def tzname(self, dt):
#     def dst(self, dt):
# def to_json(obj):
# def create_proxy_property(property_name, target_name, is_settable=False):
#     def _proxy_get(self):
#     def _proxy_set(self, val):
# def create_forwarded_method(from_,  # type: tp.Union[EyesWebDriver, EyesWebElement, _EyesSwitchTo]
#                             to,  # type: tp.Union[WebDriver, WebElement, SwitchTo]
#                             func_name,  # type: str
#                             ):
#     def forwarded_method(self_, *args, **kwargs):
# def create_proxy_interface(from_,  # type: tp.Union[EyesWebDriver, EyesWebElement, _EyesSwitchTo]
#                            to,  # type: tp.Union[WebDriver, WebElement, SwitchTo]
#                            ignore_list=None,  # type: tp.List[str]
#                            override_existing=False,  # type: bool
#                            ):
# def cached_property(f):
#     def get(self):
# def is_absolute_url(url):
# def is_url_with_scheme(url):
# def timeit(method):
#     def timed(*args, **kw):
# def retry(delays=(0, 1, 5),
#           exception=Exception,
#           report=lambda *args: None):
#     def wrapper(function):
#         def wrapped(*args, **kwargs):
# 
# Path: applitools/utils/compat.py
# PY3 = sys.version_info >= (3,)
#     ABC = abc.ABC
#     ABC = abc.ABCMeta(str("ABC"), (), {})
#     def gzip_compress(data, compresslevel=9):
# def iteritems(dct):


# Path: applitools/selenium/capture/dom_capture.py
import json
import typing as tp
import multiprocessing as mp
import requests
import tinycss2
from collections import OrderedDict
from applitools.core import logger
from applitools.utils import general_utils
from applitools.utils.compat import urljoin
    from applitools.selenium.webdriver import EyesWebDriver

                if tag.type == 'url':
                    logger.debug('The node has import')
                    yield CssNode.create_sub_node(
                        parent_node=node,
                        href=tag.value)
            continue

        try:
            if minimize:
                try:
                    # remove whitespaces inside blocks
                    style_node.content = [tok for tok in style_node.content if tok.type != 'whitespace']
                except AttributeError as e:
                    logger.warning("Cannot serialize item: {}, cause error: {}".format(style_node, str(e)))
            serialized = style_node.serialize()
            if minimize:
                serialized = serialized.replace('\n', '').replace('/**/', ' ').replace(' {', '{')

        except TypeError as e:
            logger.warning(str(e))
            continue
        yield CssNode.create_serialized_node(text=serialized)


def _make_url(base_url, value):
    # type: (tp.Text, tp.Text) -> tp.Text
    if (general_utils.is_absolute_url(value) and  # noqa
            not general_utils.is_url_with_scheme(value)):
        url = urljoin('http://', value)
    else:

        url = urljoin(base_url, value)