diff --git a/CHANGELOG.rst b/CHANGELOG.rst index 9c3652f7f..de43f9bcf 100644 --- a/CHANGELOG.rst +++ b/CHANGELOG.rst @@ -6,6 +6,25 @@ foursight-core Change Log ---------- +4.4.0 +===== +* 2023-06-20 +* Changes to the access key check; making sure the action does not run every single day. + This the primary/necessary change for this release; required since 4.3.0 where the access + key check itself was fixed to work; without this new access keys would be created daily. +* Replaced calls to boto3.client/resource("sqs"/"s3") to boto_sqs/s3_client/resource; + this in preparation to allow using localstack to run SQS and S3 locally for testing; + to really do this we need similar changes in dcicutils. +* Miscellaneous minor UI improvements, including: + * Allow viewing of list of secrets and values (obfuscated if senstive) in Infrastucture page. + * Allow accounts file to be uploaded; this now lives in, for example: + s3://cgap-kmp-main-application-cgap-supertest-system/known_accounts + No longer need to encrypt this file as it resides in a protected area in S3, + i.e. the same place as the Portal access keys files (e.g. access_key_foursight). + * New info and convenience links to associated AWS resources on accounts page. + * Allow specifying UUID when creating a new user (C4-1050). + * Started adding ECS info to Infrastructure page. + 4.3.0 ===== * Fix to checks.access_key_expiration_detection.refresh_access_keys bug (key exception) which diff --git a/foursight_core/app_utils.py b/foursight_core/app_utils.py index 0a1d20558..035040747 100644 --- a/foursight_core/app_utils.py +++ b/foursight_core/app_utils.py @@ -40,6 +40,7 @@ from dcicutils.secrets_utils import (get_identity_name, get_identity_secrets) from dcicutils.redis_tools import RedisSessionToken, RedisException, SESSION_TOKEN_COOKIE from .app import app +from .boto_sqs import boto_sqs_client from .check_utils import CheckHandler from .deploy import Deploy from .environment import Environment @@ -47,6 +48,10 @@ from .s3_connection import S3Connection from .react.api.auth import Auth from .react.api.react_api import ReactApi +from .react.api.datetime_utils import ( + convert_time_t_to_utc_datetime_string, + convert_utc_datetime_to_utc_datetime_string +) from .routes import Routes from .route_prefixes import CHALICE_LOCAL from .sqs_utils import SQS @@ -70,7 +75,6 @@ class AppUtilsCore(ReactApi, Routes): """ CHECK_SETUP_FILE_NAME = "check_setup.json" - ACCOUNTS_FILE_NAME = "accounts.json.encrypted" # Define in subclass. APP_PACKAGE_NAME = None @@ -119,9 +123,6 @@ def __init__(self): self.sqs = SQS(self.prefix) self.check_setup_file = self._locate_check_setup_file() logger.info(f"Using check_setup file: {self.check_setup_file}") - self.accounts_file = self._locate_accounts_file() - if self.accounts_file: - logger.info(f"Using accounts file: {self.accounts_file}") self.check_handler = CheckHandler(self.prefix, self.package_name, self.check_setup_file, self.get_default_env()) self.CheckResult = self.check_handler.CheckResult self.ActionResult = self.check_handler.ActionResult @@ -172,6 +173,7 @@ def init_environments(self, env='all', envs=None): :param env: allows you to specify a single env to be initialized :param envs: allows you to specify multiple envs to be initialized """ + logger.warning(f'In init_environments with args {env} {envs}') stage_name = self.stage.get_stage() return self.environment.get_environment_and_bucket_info_in_batch(stage=stage_name, env=env, envs=envs) @@ -182,6 +184,9 @@ def init_connection(self, environ, _environments=None): Returns an FSConnection object or raises an error. """ environments = self.init_environments(environ) if _environments is None else _environments + if not environments: + environ = self.get_default_env() + environments = self.init_environments(environ) if _environments is None else _environments logger.warning("environments = %s" % str(environments)) # if still not there, return an error if environ not in environments: @@ -235,8 +240,8 @@ def get_logged_in_user_info(self, environ: str, request_dict: dict) -> dict: last_name = name.get("name_last") subject = jwt_decoded.get("sub") audience = jwt_decoded.get("aud") - issued_time = self.convert_time_t_to_useastern_datetime(jwt_decoded.get("iat")) - expiration_time = self.convert_time_t_to_useastern_datetime(jwt_decoded.get("exp")) + issued_time = convert_time_t_to_utc_datetime_string(jwt_decoded.get("iat")) + expiration_time = convert_time_t_to_utc_datetime_string(jwt_decoded.get("exp")) except Exception as e: self.note_non_fatal_error_for_ui_info(e, 'get_logged_in_user_info') return {"email_address": email_address, @@ -368,9 +373,11 @@ def check_authorization(self, request_dict, env=None): try: if env is None: return False # we have no env to check auth - for env_info in self.init_environments(env).values(): + envs = self.init_environments(env) + for env_info in envs.values(): + connection = self.init_connection(env, envs) user_res = ff_utils.get_metadata('users/' + jwt_decoded.get('email').lower(), - ff_env=env_info['ff_env'], + key=connection.ff_keys, add_on='frame=object&datastore=database') logger.warning("foursight_core.check_authorization: env_info ...") logger.warning(env_info) @@ -688,44 +695,6 @@ def get_obfuscated_credentials_info(self, env_name: str) -> dict: self.note_non_fatal_error_for_ui_info(e, 'get_obfuscated_credentials_info') return {} - def convert_utc_datetime_to_useastern_datetime(self, t) -> str: - """ - Converts the given UTC datetime object or string into a US/Eastern datetime string - and returns its value in a form that looks like 2022-08-22 13:25:34 EDT. - If the argument is a string it is ASSUMED to have a value which looks - like 2022-08-22T14:24:49.000+0000; this is the datetime string format - we get from AWS via boto3 (e.g. for a lambda last-modified value). - - :param t: UTC datetime object or string value. - :return: US/Eastern datetime string (e.g.: 2022-08-22 13:25:34 EDT). - """ - try: - if isinstance(t, str): - t = datetime.datetime.strptime(t, "%Y-%m-%dT%H:%M:%S.%f%z") - t = t.replace(tzinfo=pytz.UTC).astimezone(pytz.timezone("US/Eastern")) - return t.strftime("%Y-%m-%d %H:%M:%S %Z") - except Exception as e: - self.note_non_fatal_error_for_ui_info(e, 'convert_utc_datetime_to_useastern_datetime') - return "" - - def convert_time_t_to_useastern_datetime(self, time_t: int) -> str: - """ - Converts the given "epoch" time (seconds since 1970-01-01T00:00:00Z) - integer value to a US/Eastern datetime string and returns its value - in a form that looks like 2022-08-22 13:25:34 EDT. - - :param time_t: Epoch time value (i.e. seconds since 1970-01-01T00:00:00Z) - :return: US/Eastern datetime string (e.g.: 2022-08-22 13:25:34 EDT). - """ - try: - if not isinstance(time_t, int): - return "" - t = datetime.datetime.fromtimestamp(time_t, tz=pytz.UTC) - return self.convert_utc_datetime_to_useastern_datetime(t) - except Exception as e: - self.note_non_fatal_error_for_ui_info(e, 'convert_time_t_to_useastern_datetime') - return "" - def ping_elasticsearch(self, env_name: str) -> bool: logger.warning(f"foursight_core: Pinging ElasticSearch: {self.host}") try: @@ -819,10 +788,10 @@ def get_lambda_last_modified(self, lambda_name: str = None) -> Optional[str]: lambda_tags = boto_lambda.list_tags(Resource=lambda_arn)["Tags"] lambda_last_modified_tag = lambda_tags.get("last_modified") if lambda_last_modified_tag: - lambda_last_modified = self.convert_utc_datetime_to_useastern_datetime(lambda_last_modified_tag) + lambda_last_modified = convert_utc_datetime_to_utc_datetime_string(lambda_last_modified_tag) else: lambda_last_modified = lambda_info["Configuration"]["LastModified"] - lambda_last_modified = self.convert_utc_datetime_to_useastern_datetime(lambda_last_modified) + lambda_last_modified = convert_utc_datetime_to_utc_datetime_string(lambda_last_modified) return lambda_last_modified except Exception as e: logger.warning(f"Error getting lambda ({lambda_name}) last modified time: {e}") @@ -1103,10 +1072,11 @@ def view_user(self, request, environ, is_admin=False, domain="", context="/", em request_dict = request.to_dict() stage_name = self.stage.get_stage() users = [] + connection = self.init_connection(environ) for this_email in email.split(","): try: this_user = ff_utils.get_metadata('users/' + this_email.lower(), - ff_env=full_env_name(environ), + key=connection.ff_keys, add_on='frame=object&datastore=database') users.append({"email": this_email, "record": this_user}) except Exception as e: @@ -1152,7 +1122,9 @@ def view_users(self, request, environ, is_admin=False, domain="", context="/"): stage_name = self.stage.get_stage() users = [] # TODO: Support paging. - user_records = ff_utils.get_metadata('users/', ff_env=full_env_name(environ), add_on='frame=object&limit=10000&datastore=database') + connection = self.init_connection(environ) + user_records = ff_utils.get_metadata('users/', key=connection.ff_keys, + add_on='frame=object&limit=10000&datastore=database') for user_record in user_records["@graph"]: last_modified = user_record.get("last_modified") if last_modified: @@ -1173,7 +1145,7 @@ def view_users(self, request, environ, is_admin=False, domain="", context="/"): "first_name": user_record.get("first_name"), "last_name": user_record.get("last_name"), "uuid": user_record.get("uuid"), - "modified": self.convert_utc_datetime_to_useastern_datetime(last_modified)}) + "modified": convert_utc_datetime_to_utc_datetime_string(last_modified)}) users = sorted(users, key=lambda key: key["email_address"]) template = self.jin_env.get_template('users.html') html_resp.body = template.render( @@ -1862,10 +1834,13 @@ def run_check_runner(self, runner_input, propogate=True): Returns: dict: run result if something was run, else None """ + # FYI the runner_input argument is a dict that looks something like this (2023-06-16): + # {'sqs_url': 'https://sqs.us-east-1.amazonaws.com/466564410312/foursight-cgap-prod-check_queue'} + # and the propogate arguments is a bootstrap.LambdaContext that instance. sqs_url = runner_input.get('sqs_url') if not sqs_url: return - client = boto3.client('sqs') + client = boto_sqs_client() response = client.receive_message( QueueUrl=sqs_url, AttributeNames=['MessageGroupId'], @@ -1876,7 +1851,7 @@ def run_check_runner(self, runner_input, propogate=True): message = response.get('Messages', [{}])[0] # TODO/2022-12-01/dmichaels: Issue with check not running because not detecting that - # dependency # has already run; for example with expset_opf_unique_files_in_experiments + # dependency has already run; for example with expset_opf_unique_files_in_experiments # depending on expset_opfsets_unique_titles; seems not checking the result in S3 of the # depdendency correctly. This is what seems to be returned here if the check has a dependency, e.g.: # @@ -1994,9 +1969,10 @@ def run_check_runner(self, runner_input, propogate=True): logger.warning('-RUN-> RESULT: %s (uuid)' % str(run_result.get('uuid'))) # invoke action if running a check and kwargs['queue_action'] matches stage stage = self.stage.get_stage() + # TODO: Factor out this (et.al.) for better testing. if run_result['type'] == 'check' and run_result['kwargs']['queue_action'] == stage: # must also have check.action and check.allow_action set - if run_result['allow_action'] and run_result['action']: + if run_result['allow_action'] and run_result['action'] and not run_result.get('prevent_action'): action_params = {'check_name': run_result['name'], 'called_by': run_result['kwargs']['uuid']} try: @@ -2031,12 +2007,9 @@ def collect_run_info(cls, run_uuid, env, no_trailing_slash=False): def _locate_check_setup_file(self) -> Optional[str]: return self._locate_config_file(AppUtilsCore.CHECK_SETUP_FILE_NAME) - def _locate_accounts_file(self) -> Optional[str]: - return self._locate_config_file(AppUtilsCore.ACCOUNTS_FILE_NAME) - def _locate_config_file(self, file_name: str) -> Optional[str]: """ - Returns the full path to the given named file (e.g. check_setup.json or accounts.json), + Returns the full path to the given named file (e.g. check_setup.json), looking for the first NON-EMPTY file within these directories, in the following order; if not found then returns None. diff --git a/foursight_core/boto_s3.py b/foursight_core/boto_s3.py new file mode 100644 index 000000000..8c4ebfc78 --- /dev/null +++ b/foursight_core/boto_s3.py @@ -0,0 +1,25 @@ +# The primary/initial purpose of this was to be able to use the S3_URL environment variable to refer +# to a locally running ersatz version of S3 via an emulator like localstack (https://localstack.cloud). + +import boto3 +import os + + +def boto_s3_client(**kwargs): + """ + Creates and returns a boto3 s3 client object. If the S3_URL environment variable is set then it + will use that value as the endpoint_url for the boto3 s3 client, unless an explicit endpoint_url + was passed in (via kwargs, per boto3.client convention) in which case that value will be used. + """ + s3_url = kwargs.get("endpoint_url") or os.environ.get("S3_URL") + return boto3.client("s3", endpoint_url=s3_url, **kwargs) if s3_url else boto3.client("s3", **kwargs) + + +def boto_s3_resource(**kwargs): + """ + Creates and returns a boto3 s3 resource object. If the S3_URL environment variable is set then it + will use that value as the endpoint_url for the boto3 s3 resource, unless an explicit endpoint_url + was passed in (via kwargs, per boto3.resource convention) in which case that value will be used. + """ + s3_url = kwargs.get("endpoint_url") or os.environ.get("S3_URL") + return boto3.resource("s3", endpoint_url=s3_url, **kwargs) if s3_url else boto3.resource("s3", **kwargs) diff --git a/foursight_core/boto_sqs.py b/foursight_core/boto_sqs.py new file mode 100644 index 000000000..354ad280c --- /dev/null +++ b/foursight_core/boto_sqs.py @@ -0,0 +1,25 @@ +# The primary/initial purpose of this was to be able to use the SQS_URL environment variable to refer +# to a locally running ersatz version of SQS via an emulator like localstack (https://localstack.cloud). + +import boto3 +import os + + +def boto_sqs_client(**kwargs): + """ + Creates and returns a boto3 sqs client object. If the SQS_URL environment variable is set then it + will use that value as the endpoint_url for the boto3 sqs client, unless an explicit endpoint_url + was passed in (via kwargs, per boto3.client convention) in which case that value will be used. + """ + sqs_url = kwargs.get("endpoint_url") or os.environ.get("SQS_URL") + return boto3.client("sqs", endpoint_url=sqs_url, **kwargs) if sqs_url else boto3.client("sqs", **kwargs) + + +def boto_sqs_resource(**kwargs): + """ + Creates and returns a boto3 sqs resource object. If the SQS_URL environment variable is set then it + will use that value as the endpoint_url for the boto3 sqs resource, unless an explicit endpoint_url + was passed in (via kwargs, per boto3.resource convention) in which case that value will be used. + """ + sqs_url = kwargs.get("endpoint_url") or os.environ.get("SQS_URL") + return boto3.resource("sqs", endpoint_url=sqs_url, **kwargs) if sqs_url else boto3.resource("sqs", **kwargs) diff --git a/foursight_core/buckets.py b/foursight_core/buckets.py index bc9747221..b74dab0bd 100644 --- a/foursight_core/buckets.py +++ b/foursight_core/buckets.py @@ -1,7 +1,6 @@ -import boto3 import json - from dcicutils.misc_utils import ignored +from .boto_s3 import boto_s3_client class Buckets(object): @@ -46,7 +45,7 @@ def es_url(cls, env): return 'https://placeholder_url' def create_buckets(self): - s3 = boto3.client('s3') + s3 = boto_s3_client() for bucket in self.bucket_names: param = {'Bucket': bucket, 'ACL': self.default_acl} if self.region != 'us-east-1': @@ -54,7 +53,7 @@ def create_buckets(self): s3.create_bucket(**param) def configure_env_bucket(self): - s3 = boto3.client('s3') + s3 = boto_s3_client() try: s3.head_bucket(self.env_bucket) # check if bucket exists except Exception as e: diff --git a/foursight_core/checks/access_key_expiration_detection.py b/foursight_core/checks/access_key_expiration_detection.py index 24c766034..f369d4388 100644 --- a/foursight_core/checks/access_key_expiration_detection.py +++ b/foursight_core/checks/access_key_expiration_detection.py @@ -1,3 +1,4 @@ +from ..app import app from .helpers.confchecks import ( check_function, CheckResult, action_function, ActionResult ) @@ -15,9 +16,8 @@ def access_key_status(connection, **kwargs): """ check = CheckResult(connection, 'access_key_status') check.action = 'refresh_access_keys' - # TOOD: Figure this out ... Seems like, both from this code and what we are seeing in the actual action history, - # that the refresh action is running everday; we only want to run a refresh if the access is expiring very soon. - check.allow_action = True # always allow refresh + check.allow_action = True + check.prevent_action = False fs_user_email, fs_user_kp = 'foursight.app@gmail.com', 'access_key_foursight' user_props = get_metadata(f'/users/{fs_user_email}?datastore=database', key=connection.ff_keys) user_uuid = user_props['uuid'] @@ -41,11 +41,17 @@ def access_key_status(connection, **kwargs): check.summary = (f'Application access keys will expire in less than 21 days! Please run' f' the deployment action soon') check.brief_output = check.full_output = check.summary + # This prevents the from running automatically after the check; + # though the user is still allowed to run it manually in any case. + check.prevent_action = True return check else: check.status = 'PASS' check.summary = (f'Application access keys expiration is more than 3 weeks away. All good.' f' Expiration date: {expiration_date}') + # This prevents the from running automatically after the check; + # though the user is still allowed to run it manually in any case. + check.prevent_action = True return check @@ -61,15 +67,25 @@ def refresh_access_keys(connection, **kwargs): full_output = { 'successfully_generated': [] } + # N.B. The ordering of the admin_keys (above) in this loop is actually VERY IMPORTANT, + # the one for Foursight itself (access_key_foursight) being LAST. This is because unless + # this is the case (i.e. access_key_foursight being last), we would loose access to the + # very Portal calls we are making below, via the current Foursight access key which is + # being refreshed, i.e. where this current Foursight access key is in the process of + # being decommissioned (i.e. deleted). FYI this (ordering requirement) would not be + # the case if we were to re-initialize the (given) connection (via init_connection) + # on each iteration of the loop (but since that is passed it, and since we don't need + # to do this, so long as we are careful about the ordering here, we don't do this). for email, kp_name in admin_keys: try: user = get_metadata(f'/users/{email}?datastore=database', key=connection.ff_keys) except Exception: continue # user not found user_uuid = user['uuid'] + # Get list of currently defined access keys. access_keys = search_metadata(f'/search/?type=AccessKey&description={kp_name}&user.uuid={user_uuid}' f'&sort=-date_created', key=connection.ff_keys) - # generate new key + # Now generate a new access key. access_key_req = {'user': user_uuid, 'description': kp_name} # 2020-06-13/dmichaels: The actual result returned by the portal for this POST is not what # seems to be expected; the access_key_id and secret_access_key are not within the @graph @@ -78,20 +94,31 @@ def refresh_access_keys(connection, **kwargs): access_key_res = post_metadata(access_key_req, 'access-keys', key=connection.ff_keys) access_key_id = access_key_res.get('access_key_id') secret_access_key = access_key_res.get('secret_access_key') - import pdb ; pdb.set_trace() if not access_key_id or not secret_access_key: # We will say these must occur in pairs; both at the top level or both within the @graph array. graph_item = access_key_res.get('@graph', [{}])[0] access_key_id = graph_item.get('access_key_id') secret_access_key = graph_item.get('secret_access_key') s3_obj = {'secret': secret_access_key, 'key': access_key_id, 'server': s3.url} + # Now we store this newly generated access key in a (secure bucket) in S3, + # e.g. s3://elasticbeanstalk-fourfront-mastertest-system/access_key_foursight s3.s3_put_secret(json.dumps(s3_obj), kp_name) full_output['successfully_generated'].append(email) - # clear out old keys after generating new one + _sanity_check_newly_created_access_key(name=kp_name, user_uuid=user_uuid) + # Delete any old access keys after generating a new one (see VERY IMPORTANT comment above). for access_key in access_keys: # note this search result was computed before the new key was added if access_key['status'] != 'deleted': - patch_metadata(patch_item={'status': 'deleted'}, obj_id=access_key['uuid'], key=connection.ff_keys) + try: + patch_metadata(patch_item={'status': 'deleted'}, obj_id=access_key['uuid'], key=connection.ff_keys) + except Exception as e: + print(f"Exception while trying to delete old access key ({access_key['uuid']})") + print(e) action.full_output = full_output action.status = 'DONE' return action + + +def _sanity_check_newly_created_access_key(name: str, user_uuid: str): + connection = app.core.init_connection(app.core.get_default_env()) + _ = search_metadata(f'/search/?type=AccessKey&description={name}&user.uuid={user_uuid}', key=connection.ff_keys) diff --git a/foursight_core/deploy.py b/foursight_core/deploy.py index 978dc2110..b324870b7 100644 --- a/foursight_core/deploy.py +++ b/foursight_core/deploy.py @@ -92,7 +92,8 @@ def get_config_filepath(cls): def build_config(cls, stage, identity=None, stack_name=None, trial_creds=None, trial_global_env_bucket=False, global_env_bucket=None, security_group_ids=None, subnet_ids=None, check_runner=None, - lambda_timeout=DEFAULT_LAMBDA_TIMEOUT, is_foursight_fourfront=False): + lambda_timeout=DEFAULT_LAMBDA_TIMEOUT, is_foursight_fourfront=False, + is_foursight_smaht=False): """ Builds the chalice config json file. See: https://aws.github.io/chalice/topics/configfile""" # dmichaels/2022-07-22/C4-826: # Removed value from the Foursight CloudFormation template; get from GAC/etc at runtime. @@ -189,6 +190,10 @@ def build_config(cls, stage, identity=None, stack_name=None, if is_foursight_fourfront: subprocess_call( ['poetry', 'export', '-f', 'requirements.txt', '--without-hashes', '--with', 'foursight_fourfront', '-o', 'requirements.txt'], verbose=True) + elif is_foursight_smaht: + subprocess_call( + ['poetry', 'export', '-f', 'requirements.txt', '--without-hashes', '--with', 'foursight_smaht', + '-o', 'requirements.txt'], verbose=True) else: subprocess_call( ['poetry', 'export', '-f', 'requirements.txt', '--without-hashes', '--with', 'foursight_cgap', '-o', 'requirements.txt'], verbose=True) @@ -216,8 +221,17 @@ def build_config_and_package(cls, args, identity=None, stack_name=None, trial_cr # the provision stack name setup in 4dn-cloud-infra/stack.py. This is used to # conditionally include the appropriate library (foursight-cgap or foursight) # in the Chalice package. dmichaels/2022-11-01. + # Added smaht to this to minimally perturb existing structure, but should be + # refactored at a later time to clean up and use EnvUtils _4DN_CLOUD_INFRA_FOURSIGHT_FOURFRONT_PROVISION_TARGETS = ["foursight-development", "foursight-production"] - is_foursight_fourfront = args.stack in _4DN_CLOUD_INFRA_FOURSIGHT_FOURFRONT_PROVISION_TARGETS + _4DN_CLOUD_INFRA_FOURSIGHT_SMAHT_PROVISION_TARGETS = ["foursight-smaht"] + is_foursight_fourfront = False + is_foursight_smaht = False + if args.stack in _4DN_CLOUD_INFRA_FOURSIGHT_FOURFRONT_PROVISION_TARGETS: + is_foursight_fourfront = True + elif args.stack in _4DN_CLOUD_INFRA_FOURSIGHT_SMAHT_PROVISION_TARGETS: + is_foursight_smaht = True + # For compatibility during transition, we allow these argument to be passed in lieu of args. if merge_template is None: merge_template = args.merge_template @@ -238,7 +252,8 @@ def build_config_and_package(cls, args, identity=None, stack_name=None, trial_cr cls.build_config(stage, identity=identity, stack_name=stack_name, trial_creds=trial_creds, trial_global_env_bucket=True, global_env_bucket=global_env_bucket, lambda_timeout=lambda_timeout, - security_group_ids=security_ids, subnet_ids=subnet_ids, check_runner=check_runner, is_foursight_fourfront=is_foursight_fourfront) + security_group_ids=security_ids, subnet_ids=subnet_ids, check_runner=check_runner, + is_foursight_fourfront=is_foursight_fourfront, is_foursight_smaht=is_foursight_smaht) else: raise Exception('Build config requires trial_creds, sg id, and subnet ids to run in trial account') else: diff --git a/foursight_core/environment.py b/foursight_core/environment.py index fc8adba79..d53201506 100644 --- a/foursight_core/environment.py +++ b/foursight_core/environment.py @@ -2,6 +2,7 @@ from dcicutils.common import EnvName, ChaliceStage from dcicutils.env_manager import EnvManager +from dcicutils.function_cache_decorator import function_cache from dcicutils.misc_utils import full_class_name from dcicutils.s3_utils import s3Utils from typing import Optional, List @@ -40,7 +41,6 @@ def __init__(self, foursight_prefix: Optional[str] = None): # the foursight_pre self.prefix = prefix self.s3_connection = S3Connection(self.get_env_bucket_name()) - self.cached_list_environment_names = None def get_env_bucket_name(self) -> Optional[str]: @@ -62,15 +62,13 @@ def list_unique_environment_names(self) -> List[EnvName]: result.add(infer_foursight_from_env(envname=env)) return sorted(result) # a list and sorted + @function_cache def list_environment_names(self) -> List[EnvName]: """ Lists all environments in the foursight-envs s3. Returns: a list of names """ - if self.cached_list_environment_names: - return self.cached_list_environment_names - environment_names = [infer_foursight_from_env(envname=env) for env in sorted(EnvManager.get_all_environments(env_bucket=self.get_env_bucket_name()))] @@ -83,7 +81,6 @@ def list_environment_names(self) -> List[EnvName]: if modern_full_names != legacy_full_names: logger.warning(f"{full_class_name(self)}.list_environment_names has consistency problems.") - self.cached_list_environment_names = environment_names return environment_names def list_valid_schedule_environment_names(self) -> List[EnvName]: @@ -114,7 +111,7 @@ def get_environment_info_from_s3(cls, env_name: EnvName) -> dict: return s3Utils.get_synthetic_env_config(env_name) def get_environment_and_bucket_info(self, env_name: EnvName, stage: ChaliceStage) -> dict: - + logger.warning(f'Getting env info from s3 for {env_name}') env_info = self.get_environment_info_from_s3(env_name) portal_url = env_info['fourfront'] diff --git a/foursight_core/es_connection.py b/foursight_core/es_connection.py index ede67a86d..a08069963 100644 --- a/foursight_core/es_connection.py +++ b/foursight_core/es_connection.py @@ -356,3 +356,9 @@ def info(self): Returns basic info about the Elasticsearch server. """ return self.es.info() + + def health(self): + """ + Returns basic health about the Elasticsearch server cluster. + """ + return self.es.cluster.health() diff --git a/foursight_core/fs_connection.py b/foursight_core/fs_connection.py index 0563965b7..7a4ef2670 100644 --- a/foursight_core/fs_connection.py +++ b/foursight_core/fs_connection.py @@ -57,8 +57,9 @@ def __init__(self, fs_environ, fs_environ_info, test=False, use_es=True, host=No self.redis = RedisBase(create_redis_client(url=self.redis_url)) else: PRINT("Redis URL was not specified in any way so running without Redis.") - except redis.exceptions.ConnectionError: - PRINT(f"Cannot connect to Redis ({self.redis_url}); but can run without it so continuing.") + except redis.exceptions.ConnectionError as e: + PRINT(f"Error {str(e)} \n" + f"Cannot connect to Redis ({self.redis_url}); but can run without it so continuing.") self.redis = None self.redis_url = None if self.redis: @@ -110,6 +111,11 @@ def es_info(self): if self.connections['es']: return self.connections['es'].info() + def es_health(self): + """ Returns basic health about the Elasticsearch server cluster. """ + if self.connections['es']: + return self.connections['es'].health() + def redis_info(self): """ Returns basic info about the Redis server """ return self.redis.info() if self.redis else None diff --git a/foursight_core/react/api/auth0_config.py b/foursight_core/react/api/auth0_config.py index a8f9a6339..29065a691 100644 --- a/foursight_core/react/api/auth0_config.py +++ b/foursight_core/react/api/auth0_config.py @@ -1,3 +1,4 @@ +import json import logging import os import requests @@ -114,7 +115,14 @@ def get_config_raw_data(self) -> dict: Returns raw data (dictionary) from the Auth0 config URL. """ try: - return requests.get(self.get_config_url()).json() or {} + auth0_config_response = requests.get(self.get_config_url()).json() or {} + allowed_connections = auth0_config_response.get("auth0Options", {}).get("allowedConnections") + if isinstance(allowed_connections, str): + # Slight temporary hack to deal with fact that at some points in + # time the allowedConnections property from the /auth0_config Portal + # endpoint returned a JSON-ized string of a ist rather than a list. + auth0_config_response["auth0Options"]["allowedConnections"] = json.loads(allowed_connections) + return auth0_config_response except Exception as e: logger.error(f"Exception fetching Auth0 config ({self.get_config_url()}): {get_error_message(e)}") return {} diff --git a/foursight_core/react/api/aws_s3.py b/foursight_core/react/api/aws_s3.py index c78c249c6..a79c3160c 100644 --- a/foursight_core/react/api/aws_s3.py +++ b/foursight_core/react/api/aws_s3.py @@ -1,7 +1,7 @@ -import boto3 import logging from typing import Optional -from .datetime_utils import convert_utc_datetime_to_useastern_datetime_string +from .datetime_utils import convert_utc_datetime_to_utc_datetime_string +from ...boto_s3 import boto_s3_client, boto_s3_resource logging.basicConfig() logger = logging.getLogger(__name__) @@ -13,7 +13,7 @@ class AwsS3: def get_buckets(cls) -> list: results = [] try: - s3 = boto3.resource("s3") + s3 = boto_s3_resource() results = sorted([bucket.name for bucket in s3.buckets.all()]) except Exception as e: logger.error(f"Exception getting S3 bucket list: {e}") @@ -23,7 +23,7 @@ def get_buckets(cls) -> list: def get_bucket_keys(cls, bucket_name: str) -> list: results = [] try: - s3 = boto3.client("s3") + s3 = boto_s3_client() bucket_keys = s3.list_objects(Bucket=bucket_name) if bucket_keys: bucket_keys = bucket_keys.get("Contents") @@ -32,7 +32,7 @@ def get_bucket_keys(cls, bucket_name: str) -> list: results.append({ "key": bucket_key["Key"], "size": bucket_key["Size"], - "modified": convert_utc_datetime_to_useastern_datetime_string(bucket_key["LastModified"]) + "modified": convert_utc_datetime_to_utc_datetime_string(bucket_key["LastModified"]) }) except Exception as e: @@ -54,7 +54,7 @@ def _may_look_at_key_content(cls, bucket, key, size) -> bool: @classmethod def _get_bucket_key_content_size(cls, bucket_name: str, bucket_key_name) -> int: try: - s3 = boto3.client('s3') + s3 = boto_s3_client() response = s3.head_object(Bucket=bucket_name, Key=bucket_key_name) size = response['ContentLength'] return size @@ -77,7 +77,7 @@ def get_bucket_key_contents(cls, bucket_name: str, bucket_key_name) -> Optional[ size = cls._get_bucket_key_content_size(bucket_name, bucket_key_name) if size <= 0 or not cls._may_look_at_key_content(bucket_name, bucket_key_name, size): return None - s3 = boto3.resource("s3") + s3 = boto_s3_resource() s3_object = s3.Object(bucket_name, bucket_key_name) return s3_object.get()["Body"].read().decode("utf-8") except Exception as e: diff --git a/foursight_core/react/api/aws_stacks.py b/foursight_core/react/api/aws_stacks.py index 5768e9365..452efe705 100644 --- a/foursight_core/react/api/aws_stacks.py +++ b/foursight_core/react/api/aws_stacks.py @@ -1,5 +1,5 @@ import boto3 -from .datetime_utils import convert_utc_datetime_to_useastern_datetime_string +from .datetime_utils import convert_utc_datetime_to_utc_datetime_string from .yaml_utils import load_yaml from collections import OrderedDict from dcicutils.function_cache_decorator import function_cache @@ -35,8 +35,8 @@ def _create_aws_stack_info(stack: object): "description": stack.description, "role_arn": stack.role_arn, "status": stack.stack_status, - "updated": convert_utc_datetime_to_useastern_datetime_string(stack.last_updated_time), - "created": convert_utc_datetime_to_useastern_datetime_string(stack.creation_time) + "updated": convert_utc_datetime_to_utc_datetime_string(stack.last_updated_time), + "created": convert_utc_datetime_to_utc_datetime_string(stack.creation_time) } diff --git a/foursight_core/react/api/datetime_utils.py b/foursight_core/react/api/datetime_utils.py index 023bcc6cf..d7b7ba18a 100644 --- a/foursight_core/react/api/datetime_utils.py +++ b/foursight_core/react/api/datetime_utils.py @@ -5,10 +5,10 @@ EPOCH = datetime.datetime.utcfromtimestamp(0) # I.e.: 1970-01-01 00:00:00 UTC -TIMEZONE_USEASTERN = "US/Eastern" -def convert_utc_datetime_to_datetime_string(t: Union[datetime.datetime, str], tzname: str) -> Optional[str]: +def _convert_utc_datetime_to_datetime_string(t: Union[datetime.datetime, str], + tzname: Optional[str] = None) -> Optional[str]: """ Converts the given datetime object OR string, which is ASSUMED to by in the UTC timezone, into a datetime string in the given/named timezone, and returns its value in a form that looks @@ -17,6 +17,7 @@ def convert_utc_datetime_to_datetime_string(t: Union[datetime.datetime, str], tz boto3 (e.g. for a lambda last-modified value) or from values in ElasticSearch. :param t: A datetime object or string value ASSUMED to be in the UTC timezone. + :param tzname: A timezone name (string); default to UTC if unspecified. :return: A datetime string in the given timezone formatted like: 2022-08-22 13:25:34 EDT """ def make_utc_aware_datetime(t: datetime) -> datetime: @@ -35,36 +36,38 @@ def make_utc_aware_datetime(t: datetime) -> datetime: # t = datetime.datetime.strptime(t, "%Y-%m-%dT%H:%M:%S.%f%z") # t = dateutil_parser.parse(t) - t = make_utc_aware_datetime(t).astimezone(pytz.timezone(tzname)) + tz = pytz.timezone(tzname) if tzname else pytz.UTC + t = make_utc_aware_datetime(t).astimezone(tz) return t.strftime("%Y-%m-%d %H:%M:%S %Z") - except Exception: + except Exception as e: return None -def convert_utc_datetime_to_useastern_datetime_string(t: Union[datetime.datetime, str]) -> Optional[str]: +def convert_utc_datetime_to_utc_datetime_string(t: Union[datetime.datetime, str]) -> Optional[str]: """ - Same as convert_utc_datetime_to_datetime_string (above) but specifically for US/Eastern timezone. + Same as _convert_utc_datetime_to_datetime_string (above) but explicitly for the UTC timezone. """ - return convert_utc_datetime_to_datetime_string(t, TIMEZONE_USEASTERN) + return _convert_utc_datetime_to_datetime_string(t) -def convert_time_t_to_datetime_string(time_t: int, tzname: str) -> Optional[str]: +def convert_time_t_to_datetime_string(time_t: int, tzname: Optional[str] = None) -> Optional[str]: """ Converts the given "epoch" time (seconds since 1970-01-01T00:00:00Z) integer value to a datetime string in the given/named timezone, and returns its value in a form that looks like 2022-08-22 13:25:34 EDT. :param time_t: Epoch time value (i.e. seconds since 1970-01-01T00:00:00Z) + :param tzname: A timezone name (string); default to UTC if unspecified. :return: A datetime string in the given timezone formatted like: 2022-08-22 13:25:34 EDT """ - return convert_utc_datetime_to_datetime_string(convert_time_t_to_datetime(time_t), tzname) + return _convert_utc_datetime_to_datetime_string(convert_time_t_to_datetime(time_t), tzname) -def convert_time_t_to_useastern_datetime_string(time_t: int) -> Optional[str]: +def convert_time_t_to_utc_datetime_string(time_t: int) -> Optional[str]: """ - Same as convert_time_t_to_datetime_string (above) but specifically for US/Eastern timezone. + Same as convert_time_t_to_datetime_string (above) but explicitly for the UTC timezone. """ - return convert_time_t_to_datetime_string(time_t, TIMEZONE_USEASTERN) + return convert_time_t_to_datetime_string(time_t) def convert_iso_datetime_string_to_datetime(value: str) -> Optional[datetime.datetime]: diff --git a/foursight_core/react/api/gac.py b/foursight_core/react/api/gac.py index 455a9c234..7ec8f3802 100644 --- a/foursight_core/react/api/gac.py +++ b/foursight_core/react/api/gac.py @@ -1,6 +1,8 @@ import re import boto3 import logging +import os +from typing import Optional from dcicutils.diff_utils import DiffManager from dcicutils.env_utils import short_env_name from dcicutils.function_cache_decorator import function_cache @@ -17,17 +19,32 @@ class Gac: @staticmethod - def get_secrets_names() -> list: + def _all_secret_names(): + secrets_manager = boto3.client('secretsmanager') + pagination_next_token = None + while True: + kwargs = {"NextToken": pagination_next_token} if pagination_next_token else {} + response = secrets_manager.list_secrets(**kwargs) + for secret in response["SecretList"]: + yield secret["Name"] + if "NextToken" in response: + pagination_next_token = response['NextToken'] + else: + break + + @staticmethod + def get_secret_names() -> list: try: - boto_secrets_manager = boto3.client('secretsmanager') - return [secrets['Name'] for secrets in boto_secrets_manager.list_secrets()['SecretList']] + secret_names = [secret_name for secret_name in Gac._all_secret_names()] + secret_names.sort() + return secret_names except Exception as e: logger.error(f"Exception getting secrets: {get_error_message(e)}") return [] @staticmethod def get_gac_names() -> list: - secrets_names = Gac.get_secrets_names() + secrets_names = Gac.get_secret_names() pattern = ".*App(lication)?Config(uration)?.*" return [secret_name for secret_name in secrets_names if re.match(pattern, secret_name, re.IGNORECASE)] @@ -74,6 +91,16 @@ def compare_gacs(env_name_a: str, env_name_b: str) -> dict: "gac_diffs": diffs } + @staticmethod + @function_cache + def get_identity_name() -> str: + return get_identity_name() + @staticmethod def get_secret_value(name: str) -> str: return get_identity_secrets().get(name) + + @staticmethod + def get_secrets(secrets_name: str) -> Optional[str]: + with override_environ(IDENTITY=secrets_name): + return sort_dictionary_by_case_insensitive_keys(obfuscate_dict(get_identity_secrets())) diff --git a/foursight_core/react/api/misc_utils.py b/foursight_core/react/api/misc_utils.py index 9cb66b9c1..721763d87 100644 --- a/foursight_core/react/api/misc_utils.py +++ b/foursight_core/react/api/misc_utils.py @@ -239,3 +239,40 @@ def dict_to_keys_and_values(dictionary: dict, key_name: str = "Key", value_name: for key in dictionary: result.append({key_name: key, value_name: dictionary[key]}) return result + + +def longest_common_initial_substring(string_list: list) -> str: + """ + Returns the longest common initial substring among all of the strings in the given list. + """ + if not string_list: + return "" + min_length = min(len(s) for s in string_list) + for i in range(min_length): + if any(string_list[j][i] != string_list[0][i] for j in range(1, len(string_list))): + return string_list[0][:i] + return string_list[0][:min_length] + + +def name_value_list_to_dict(items: list, + name_property_name: str = "name", + value_property_name: str = "value"): + """ + Give a list that looks like this: + + [ { "name": "abc", "value": 123 }, + { "name": "def", "value": 456 } ] + + Returns a dictionary that looks like this: + + { "abc": 123, "def": 456 } + + If there are duplicate names then takes the value of the last one in the list. + """ + result = {} + for item in items: + name = item.get(name_property_name) + if name: + value = item.get(value_property_name) + result[name] = value + return result diff --git a/foursight_core/react/api/portal_access_key_utils.py b/foursight_core/react/api/portal_access_key_utils.py index 25534fba0..d12079ad8 100644 --- a/foursight_core/react/api/portal_access_key_utils.py +++ b/foursight_core/react/api/portal_access_key_utils.py @@ -4,7 +4,10 @@ from dcicutils.misc_utils import future_datetime from typing import Optional, Tuple from ...app import app -from .datetime_utils import convert_iso_datetime_string_to_datetime +from .datetime_utils import ( + convert_iso_datetime_string_to_datetime as normalize_portal_datetime, + convert_utc_datetime_to_utc_datetime_string as datetime_to_string +) _PORTAL_ACCESS_KEY_NAME = "access_key_foursight" @@ -32,14 +35,14 @@ def get_portal_access_key_info(env: str, access_key_create_date, access_key_expires_date, access_key_expires_exception = \ _get_portal_access_key_expires_date(connection_keys) if access_key_expires_date: - access_key_info["created_at"] = access_key_create_date.strftime("%Y-%m-%d %H:%M:%S") + access_key_info["created_at"] = datetime_to_string(access_key_create_date) if access_key_expires_date == datetime.max: access_key_info["expires_at"] = None access_key_info["expired"] = False access_key_info["invalid"] = False access_key_info["expires_soon"] = False else: - access_key_info["expires_at"] = access_key_expires_date.strftime("%Y-%m-%d %H:%M:%S") + access_key_info["expires_at"] = datetime_to_string(access_key_expires_date) access_key_info["expired"] = now >= access_key_expires_date access_key_info["invalid"] = access_key_info["expired"] # Note that these "test_mode_xyz" variables are for testing only and are set @@ -61,7 +64,7 @@ def get_portal_access_key_info(env: str, if "credenti" in e or "expir" in e: access_key_info["probably_expired"] = True access_key_info["invalid"] = True - access_key_info["timestamp"] = now.strftime("%Y-%m-%d %H:%M:%S") + access_key_info["timestamp"] = datetime_to_string(now) return access_key_info except Exception: return {} @@ -71,10 +74,10 @@ def _get_portal_access_key_expires_date(keys: dict) -> Tuple[datetime, Optional[ try: query = f"/search/?type=AccessKey&description={_PORTAL_ACCESS_KEY_NAME}&sort=-date_created" access_key = ff_utils.search_metadata(query, key=keys)[0] - access_key_create_date = convert_iso_datetime_string_to_datetime(access_key["date_created"]) + access_key_create_date = normalize_portal_datetime(access_key["date_created"]) access_key_expires_date = access_key.get("expiration_date") if access_key_expires_date: - access_key_expires_date = convert_iso_datetime_string_to_datetime(access_key_expires_date) + access_key_expires_date = normalize_portal_datetime(access_key_expires_date) else: # There may or may not be an expiration date (e.g. for fourfront); # if not then make it the max date which is 9999-12-31 23:59:59.999999. diff --git a/foursight_core/react/api/react_api.py b/foursight_core/react/api/react_api.py index eac2c8093..d4d7602b3 100644 --- a/foursight_core/react/api/react_api.py +++ b/foursight_core/react/api/react_api.py @@ -1,4 +1,6 @@ from chalice import Response, __version__ as chalice_version +import boto3 +from botocore.errorfactory import ClientError as BotoClientError import copy import datetime import io @@ -12,10 +14,11 @@ from typing import Optional import urllib.parse from itertools import chain +from dcicutils.ecs_utils import ECSUtils from dcicutils.env_utils import EnvUtils, get_foursight_bucket, get_foursight_bucket_prefix, full_env_name from dcicutils.env_utils import get_portal_url as env_utils_get_portal_url from dcicutils.function_cache_decorator import function_cache, function_cache_info, function_cache_clear -from dcicutils import ff_utils +from dcicutils import ff_utils, s3_utils from dcicutils.misc_utils import get_error_message, ignored from dcicutils.obfuscation_utils import obfuscate_dict from dcicutils.redis_tools import RedisSessionToken, SESSION_TOKEN_COOKIE @@ -36,13 +39,18 @@ from .checks import Checks from .cognito import get_cognito_oauth_config, handle_cognito_oauth_callback from .cookie_utils import create_delete_cookie_string, read_cookie, read_cookie_bool, read_cookie_int -from .datetime_utils import convert_uptime_to_datetime, convert_utc_datetime_to_useastern_datetime_string +from .datetime_utils import ( + convert_uptime_to_datetime, + convert_utc_datetime_to_utc_datetime_string +) from .encryption import Encryption from .encoding_utils import base64_decode_to_json from .gac import Gac from .misc_utils import ( get_base_url, is_running_locally, + longest_common_initial_substring, + name_value_list_to_dict, sort_dictionary_by_case_insensitive_keys ) from .portal_access_key_utils import get_portal_access_key_info @@ -58,6 +66,7 @@ def __init__(self): super(ReactApi, self).__init__() self._react_ui = ReactUi(self) self._checks = Checks(app.core.check_handler.CHECK_SETUP, self._envs) + self._accounts_file_name = "known_accounts" @staticmethod def _get_stack_name() -> str: @@ -83,6 +92,8 @@ def get_package_version(package_name: str) -> Optional[str]: "tibanna": get_package_version("tibanna"), "tibanna_ff": get_package_version("tibanna-ff"), "python": platform.python_version(), + "boto3": get_package_version("boto3"), + "botocore": get_package_version("botocore"), "chalice": chalice_version, "elasticsearch_server": self._get_elasticsearch_server_version(), "elasticsearch": get_package_version("elasticsearch"), @@ -91,12 +102,58 @@ def get_package_version(package_name: str) -> Optional[str]: "redis_server": self._get_redis_server_version() } + @function_cache + def _get_known_buckets(self, env: str = None) -> dict: + if not env: + env = self._envs.get_default_env() + s3 = s3_utils.s3Utils(env=env) + return { + "blob_bucket": s3.blob_bucket, + "metadata_bucket": s3.metadata_bucket, + "outfile_bucket": s3.outfile_bucket, + "raw_file_bucket": s3.raw_file_bucket, + "sys_bucket": s3.sys_bucket, + "results_bucket": get_foursight_bucket(envname=env, stage=app.core.stage.get_stage()), + "tibanna_cwls_bucket": s3.tibanna_cwls_bucket, + "tibanna_output_bucket": s3.tibanna_output_bucket + } + + def _get_elasticsearch_server_status(self) -> Optional[dict]: + response = {} + try: + connection = app.core.init_connection(self._envs.get_default_env()) + response["url"] = app.core.host + response["info"] = connection.es_info() + response["health"] = connection.es_health() + except Exception: + pass + return response + @function_cache(nokey=True, nocache=None) def _get_elasticsearch_server_version(self) -> Optional[str]: connection = app.core.init_connection(self._envs.get_default_env()) es_info = connection.es_info() return es_info.get("version", {}).get("number") + @function_cache(nokey=True, nocache=None) + def _get_elasticsearch_server_cluster(self) -> Optional[str]: + status = self._get_elasticsearch_server_status() + cluster = status.get("health", {}).get("cluster_name") + cluster_parts = cluster.split(":", 1) + cluster_name = cluster_parts[1] if len(cluster_parts) > 1 else cluster + return cluster_name + + @function_cache(nokey=True, nocache=None) + def _get_rds_server(self) -> Optional[str]: + return os.environ.get("RDS_HOSTNAME") + + @function_cache(nokey=True, nocache=None) + def _get_rds_name(self) -> Optional[str]: + server = self._get_rds_server() + name_parts = server.split(".", 1) if server else None + name = name_parts[0] if len(name_parts) > 0 else "" + return name + @function_cache(nokey=True, nocache=None) def _get_redis_server_version(self) -> Optional[str]: connection = app.core.init_connection(self._envs.get_default_env()) @@ -320,7 +377,9 @@ def reactapi_header(self, request: dict, env: str) -> Response: if data_portal["ssl_certificate"]: data_portal["ssl_certificate"]["name"] = "Portal" data_portal["ssl_certificate"]["exception"] = e - data["timestamp"] = convert_utc_datetime_to_useastern_datetime_string(datetime.datetime.utcnow()) + data["timestamp"] = convert_utc_datetime_to_utc_datetime_string(datetime.datetime.utcnow()) + import tzlocal # xyzzy temporary + data["timezone"] = tzlocal.get_localzone_name() test_mode_access_key_simulate_error = read_cookie_bool(request, "test_mode_access_key_simulate_error") if auth.get("user_exception"): # or test_mode_access_key_simulate_error: # Since this call to get the Portal access key info can be relatively expensive, we don't want to @@ -361,6 +420,7 @@ def _reactapi_header_cache(self, request: dict, env: str) -> dict: "domain": domain, "context": context, "stack": self._get_stack_name(), + "identity": Gac.get_identity_name(), "local": is_running_locally(request), "credentials": { "aws_account_number": aws_credentials.get("aws_account_number"), @@ -370,8 +430,7 @@ def _reactapi_header_cache(self, request: dict, env: str) -> dict: }, "launched": app.core.init_load_time, "deployed": app.core.get_lambda_last_modified(), - "accounts_file": self._get_accounts_file(), - "accounts_file_from_s3": self._get_accounts_file_from_s3() + "accounts_file": self._get_accounts_file_name() }, "versions": self._get_versions_object(), "portal": { @@ -381,10 +440,12 @@ def _reactapi_header_cache(self, request: dict, env: str) -> dict: }, "resources": { "es": app.core.host, + "es_cluster": self._get_elasticsearch_server_cluster(), "foursight": self.foursight_instance_url(request), "portal": portal_url, # TODO: May later want to rds_username and/or such. - "rds": os.environ["RDS_HOSTNAME"], + "rds": self._get_rds_server(), + "rds_name": self._get_rds_name(), "redis": redis_url, "redis_running": redis is not None, "sqs": self._get_sqs_queue_url(), @@ -392,7 +453,8 @@ def _reactapi_header_cache(self, request: dict, env: str) -> dict: "s3": { "bucket_org": os.environ.get("ENCODED_S3_BUCKET_ORG", os.environ.get("S3_BUCKET_ORG", None)), "global_env_bucket": os.environ.get("GLOBAL_ENV_BUCKET", os.environ.get("GLOBAL_BUCKET_ENV", None)), - "encrypt_key_id": os.environ.get("S3_ENCRYPT_KEY_ID", None) + "encrypt_key_id": os.environ.get("S3_ENCRYPT_KEY_ID", None), + "buckets": self._get_known_buckets() } } return response @@ -458,7 +520,7 @@ def reactapi_portal_access_key(self, request: dict, args: Optional[dict] = None) def reactapi_elasticsearch(self) -> Response: try: - return self.create_success_response(self._get_elasticsearch_server_version()) + return self.create_success_response(self._get_elasticsearch_server_status()) except Exception as e: return self.create_error_response(get_error_message(e)) @@ -513,6 +575,7 @@ def reactapi_info(self, request: dict, env: str) -> Response: "domain": domain, "context": context, "stack": self._get_stack_name(), + "identity": Gac.get_identity_name(), "local": is_running_locally(request), "credentials": self._auth.get_aws_credentials(env or default_env), "launched": app.core.init_load_time, @@ -524,7 +587,9 @@ def reactapi_info(self, request: dict, env: str) -> Response: "foursight": socket.gethostname(), "portal": portal_url, "es": app.core.host, - "rds": os.environ["RDS_HOSTNAME"], + "es_cluster": self._get_elasticsearch_server_cluster(), + "rds": self._get_rds_server(), + "rds_name": self._get_rds_name(), "sqs": self._get_sqs_queue_url(), }, "buckets": { @@ -580,8 +645,8 @@ def _create_user_record_for_output(self, user: dict) -> dict: "institution": user.get("user_institution"), "roles": user.get("project_roles"), "status": user.get("status"), - "updated": convert_utc_datetime_to_useastern_datetime_string(updated), - "created": convert_utc_datetime_to_useastern_datetime_string(user.get("date_created")) + "updated": convert_utc_datetime_to_utc_datetime_string(updated), + "created": convert_utc_datetime_to_utc_datetime_string(user.get("date_created")) } def _create_user_record_from_input(self, user: dict, include_deletes: bool = False) -> dict: @@ -749,6 +814,7 @@ def reactapi_get_user(self, request: dict, env: str, uuid: str, args: Optional[d if other_error_count > 0: return self.create_response(500, users[0] if len(items) == 1 else users) elif not_found_count > 0: + # TODO: Maybe raise special 404 exception and have common handler (e.g. in the @route decorator). return self.create_response(404, users[0] if len(items) == 1 else users) else: return self.create_success_response(users[0] if len(items) == 1 else users) @@ -930,13 +996,13 @@ def reactapi_checks_history_latest(self, request: dict, env: str, check: str) -> if check_results.get("action"): check_results["action_title"] = " ".join(check_results["action"].split("_")).title() check_datetime = datetime.datetime.strptime(uuid, "%Y-%m-%dT%H:%M:%S.%f") - check_datetime = convert_utc_datetime_to_useastern_datetime_string(check_datetime) + check_datetime = convert_utc_datetime_to_utc_datetime_string(check_datetime) check_results["timestamp"] = check_datetime return self.create_success_response(check_results) def reactapi_checks_history_uuid(self, request: dict, env: str, check: str, uuid: str) -> Response: """ - Called from react_routes for endpoint: GET /{env}/checks/{check}/{uuid} + Called from react_routes for endpoint: GET /{env}/checks/{check}/history/{uuid} Returns the check result for the given check (name) and uuid. Analogous legacy function is app_utils.view_foursight_check. TODO: No need to return array. @@ -950,6 +1016,10 @@ def reactapi_checks_history_uuid(self, request: dict, env: str, check: str, uuid if connection: check_result = app.core.CheckResult(connection, check) if check_result: + # This gets the result from S3, for example: + # s3://cgap-kmp-main-foursight-cgap-supertest-results/access_key_status/2023-06-15T10:00:21.205768.json + # where access_key_status is the check (name) and 2023-06-15T10:00:21.205768 is the uuid; + # and cgap-kmp-main-foursight-cgap-supertest-results is the bucket name which is from our environment. data = check_result.get_result_by_uuid(uuid) if data is None: # the check hasn't run. Return a placeholder view @@ -1020,7 +1090,7 @@ def reactapi_checks_history_recent(self, request: dict, env: str, args: Optional break if uuid: timestamp = datetime.datetime.strptime(uuid, "%Y-%m-%dT%H:%M:%S.%f") - timestamp = convert_utc_datetime_to_useastern_datetime_string(timestamp) + timestamp = convert_utc_datetime_to_utc_datetime_string(timestamp) results.append({ "check": check_name, "title": check_title, @@ -1065,7 +1135,7 @@ def reactapi_checks_history(self, request: dict, env: str, check: str, args: Opt uuid = subitem.get("uuid") if uuid: timestamp = datetime.datetime.strptime(uuid, "%Y-%m-%dT%H:%M:%S.%f") - timestamp = convert_utc_datetime_to_useastern_datetime_string(timestamp) + timestamp = convert_utc_datetime_to_utc_datetime_string(timestamp) subitem["timestamp"] = timestamp body = { "env": env, @@ -1211,59 +1281,31 @@ def reactapi_aws_s3_buckets_key_contents(self, request: dict, env: str, bucket: # We use the ENCODED_AUTH0_SECRET in the GAC as the encryption password. # ---------------------------------------------------------------------------------------------- - @staticmethod - def _get_accounts_file() -> Optional[str]: + def _put_accounts_file_data(self, accounts_file_data: list) -> list: + accounts_file_data = {"data": accounts_file_data} + s3 = s3_utils.s3Utils(env=self._envs.get_default_env()) + s3.s3_put_secret(accounts_file_data, self._accounts_file_name) + return self.create_success_response(accounts_data) + + def _get_accounts_file_data(self) -> Optional[list]: + try: + s3 = s3_utils.s3Utils(env=self._envs.get_default_env()) + accounts_file_data = s3.get_key(self._accounts_file_name) + return accounts_file_data.get("data") if accounts_file_data else {} + except BotoClientError as e: + if e.response.get("Error", {}).get("Code") == "NoSuchKey": + return None + raise e + + def _get_accounts_file_name(self) -> Optional[str]: """ - Returns the full path name to the accounts.json file if one was found or None if not. - The search for this file happens at startup in AppUtilsCore construction time via its - _locate_accounts_file function. + Returns the full path name to the accounts.json file name is S3. """ - return app.core.accounts_file + s3 = s3_utils.s3Utils(env=self._envs.get_default_env()) + return f"s3://{s3.sys_bucket}/{self._accounts_file_name}" @staticmethod - def _get_accounts_file_from_s3() -> Optional[str]: - bucket = os.environ.get("GLOBAL_ENV_BUCKET", os.environ.get("GLOBAL_BUCKET_ENV", None)) - if not bucket: - return None - key = app.core.ACCOUNTS_FILE_NAME - if not AwsS3.bucket_key_exists(bucket, key): - return None - return f"s3://{bucket}/{key}" - - def _get_accounts_from_s3(self, request: dict) -> Optional[dict]: - # Let's not cache this for now, maybe change mind later, thus the OR True clause below. - s3_uri = self._get_accounts_file_from_s3() - if not s3_uri: - return self._get_accounts_only_for_current_account(request) - s3_uri = s3_uri.replace("s3://", "") - s3_uri_components = s3_uri.split("/") - if len(s3_uri_components) != 2: - return self._get_accounts_only_for_current_account(request) - bucket = s3_uri_components[0] - key = s3_uri_components[1] - accounts_json_content = AwsS3.get_bucket_key_contents(bucket, key) - return self._read_accounts_json(accounts_json_content) - - def _get_accounts_only_for_current_account(self, request: dict) -> Optional[list]: - aws_credentials = self._auth.get_aws_credentials(self._envs.get_default_env()) - if aws_credentials: - account_name = aws_credentials.get("aws_account_name") - if account_name: - account_stage = app.core.stage.get_stage() - account_id = account_name + ":" + account_stage - return [{ - "id": account_id, - "name": account_name, - "stage": account_stage, - "foursight_url": self.foursight_instance_url(request) - }] - return None - - @staticmethod - def _read_accounts_json(accounts_json_content) -> dict: - encryption = Encryption() - accounts_json_content = encryption.decrypt(accounts_json_content) - accounts_json = json.loads(accounts_json_content) + def _read_accounts_json(accounts_json) -> dict: for account in accounts_json: account_name = account.get("name") if account_name: @@ -1274,25 +1316,38 @@ def _read_accounts_json(accounts_json_content) -> dict: account["id"] = account_name return accounts_json - @function_cache(nocache=None) - def _get_accounts(self) -> Optional[dict]: - accounts_file = self._get_accounts_file() - if not accounts_file: - return None - try: - with io.open(self._get_accounts_file(), "r") as accounts_json_f: - accounts_json_content_encrypted = accounts_json_f.read() - accounts_json = self._read_accounts_json(accounts_json_content_encrypted) - return accounts_json - except Exception: - return None - - def reactapi_accounts(self, request: dict, env: str, from_s3: bool = False) -> Response: + def _get_accounts(self, request) -> Optional[list]: + accounts_file_data = self._get_accounts_file_data() + if not accounts_file_data: + return accounts_file_data + env = self._envs.get_default_env() + stage = app.core.stage.get_stage() + aws_credentials = self._auth.get_aws_credentials(env) or {} + aws_account_name = aws_credentials.get("aws_account_name") + if self.is_running_locally(request): + # For running locally put this localhost account first. + accounts_file_data.insert(0, { + "name": "localhost", + "stage": stage, + "foursight_url": "http://localhost:8000/api" + }) + else: + # Put this account at first. + for account in accounts_file_data: + if account.get("name") == aws_account_name and account.get("stage") == stage: + accounts_file_data.remove(account) + accounts_file_data.insert(0, account) + break + return self._read_accounts_json(accounts_file_data) + + def reactapi_accounts(self, request: dict, env: str) -> Response: ignored(env) - accounts = self._get_accounts() if not from_s3 else self._get_accounts_from_s3(request) + accounts = self._get_accounts(request) + if accounts is None: + return self.create_response(404, {"message": f"Account file not found: {self._get_accounts_file_name()}"}) return self.create_success_response(accounts) - def reactapi_account(self, request: dict, env: str, name: str, from_s3: bool = False) -> Response: + def reactapi_account(self, request: dict, env: str, name: str) -> Response: def is_account_name_match(account: dict, name: str) -> bool: account_name = account.get("name") @@ -1340,14 +1395,29 @@ def get_foursight_info(foursight_url: str, response: dict) -> Optional[str]: response["foursight"]["deployed"] = foursight_app.get("deployed") response["foursight"]["default_env"] = foursight_header_json["auth"]["known_envs"][0] response["foursight"]["env_count"] = foursight_header_json["auth"]["known_envs_actual_count"] - response["foursight"]["identity"] = foursight_header_json["auth"]["known_envs"][0].get("gac_name") + response["foursight"]["identity"] = foursight_app.get("identity") + if not response["foursight"]["identity"]: + response["foursight"]["identity"] = foursight_header_json["auth"]["known_envs"][0].get("gac_name") + response["foursight"]["redis_url"] = foursight_header_json.get("resources",{}).get("redis") + response["foursight"]["es_url"] = foursight_header_json.get("resources",{}).get("es") + response["foursight"]["es_cluster"] = foursight_header_json.get("resources",{}).get("es_cluster") + response["foursight"]["rds"] = foursight_header_json.get("resources",{}).get("rds") + response["foursight"]["rds_name"] = foursight_header_json.get("resources",{}).get("rds_name") + response["foursight"]["sqs_url"] = foursight_header_json.get("resources",{}).get("sqs") foursight_header_json_s3 = foursight_header_json.get("s3") + # TODO: Maybe eventually make separate API call (to get Portal Access Key info for any account) + # so that we do not have to wait here within this API call for this synchronous API call. + portal_access_key_url = response["foursight"]["url"] + f"/reactapi/portal_access_key" + portal_access_key_response = requests.get(portal_access_key_url) + if portal_access_key_response and portal_access_key_response.status_code == 200: + response["foursight"]["portal_access_key"] = portal_access_key_response.json() # Older versions of the /header API might not have this s3 element so check. if foursight_header_json_s3: response["foursight"]["s3"] = {} response["foursight"]["s3"]["bucket_org"] = foursight_header_json_s3.get("bucket_org") response["foursight"]["s3"]["global_env_bucket"] = foursight_header_json_s3.get("global_env_bucket") response["foursight"]["s3"]["encrypt_key_id"] = foursight_header_json_s3.get("encrypt_key_id") + response["foursight"]["s3"]["buckets"] = foursight_header_json_s3.get("buckets") response["foursight"]["aws_account_number"] = foursight_app["credentials"].get("aws_account_number") response["foursight"]["aws_account_name"] = foursight_app["credentials"].get("aws_account_name") response["foursight"]["re_captcha_key"] = foursight_app["credentials"].get("re_captcha_key") @@ -1383,7 +1453,7 @@ def get_portal_info(portal_url: str, response: dict) -> Optional[str]: } portal_uptime = portal_health_json.get("uptime") portal_started = convert_uptime_to_datetime(portal_uptime) - response["portal"]["started"] = convert_utc_datetime_to_useastern_datetime_string(portal_started) + response["portal"]["started"] = convert_utc_datetime_to_utc_datetime_string(portal_started) response["portal"]["identity"] = portal_health_json.get("identity") response["portal"]["elasticsearch"] = portal_health_json.get("elasticsearch") response["portal"]["database"] = portal_health_json.get("database") @@ -1393,8 +1463,8 @@ def get_portal_info(portal_url: str, response: dict) -> Optional[str]: return foursight_url ignored(request) - response = {"accounts_file": self._get_accounts_file(), "accounts_file_from_s3": self._get_accounts_file_from_s3()} - accounts = self._get_accounts() if not from_s3 else self._get_accounts_from_s3(request) + response = {"accounts_file": self._get_accounts_file_name()} + accounts = self._get_accounts(request) if not accounts: return self.create_success_response({"status": "No accounts file support."}) account = [account for account in accounts if is_account_name_match(account, name)] if accounts else None @@ -1569,10 +1639,223 @@ def reactapi_aws_stack_template(self, request: dict, env: str, stack: str) -> Re ignored(request, env) return self.create_success_response(aws_get_stack_template(stack)) + def reactapi_accounts_file_upload(self, accounts_file_data: list) -> Response: + return self.create_success_response(self._put_accounts_file_data(accounts_file_data)) + + def reactapi_accounts_file_download(self) -> Response: + accounts_file_data = self._get_accounts_file_data() + if accounts_file_data is None: + return self.create_response(404, {"message": f"Account file not found: {self._get_accounts_file_name()}"}) + return self.create_success_response(self._get_accounts_file_data()) + # ---------------------------------------------------------------------------------------------- # END OF EXPERIMENTAL - /accounts page # ---------------------------------------------------------------------------------------------- + def reactapi_aws_secret_names(self) -> Response: + return self.create_success_response(Gac.get_secret_names()) + + def reactapi_aws_secrets(self, secrets_name: str) -> Response: + return self.create_success_response(Gac.get_secrets(secrets_name)) + + def reactapi_aws_ecs_clusters(self) -> Response: + ecs = ECSUtils() + clusters = ecs.list_ecs_clusters() + def ecs_cluster_arn_to_name(cluster_arn: str) -> str: + cluster_arn_parts = cluster_arn.split("/", 1) + return cluster_arn_parts[1] if len(cluster_arn_parts) > 1 else cluster_arn + + clusters = [{"cluster_name": ecs_cluster_arn_to_name(arn), "cluster_arn": arn} for arn in clusters] + clusters = sorted(clusters, key=lambda item: item["cluster_name"]) + return self.create_success_response(clusters) + + def reactapi_aws_ecs_cluster(self, cluster_arn: str) -> Response: + # Given cluster_name may actually be either a cluster name or its ARN, + # e.g. either c4-ecs-cgap-supertest-stack-CGAPDockerClusterForCgapSupertest-YZMGi06YOoSh or + # arn:aws:ecs:us-east-1:466564410312:cluster/c4-ecs-cgap-supertest-stack-CGAPDockerClusterForCgapSupertest-YZMGi06YOoSh + # URL-decode because the ARN may contain a slash. + cluster_arn = urllib.parse.unquote(cluster_arn) + ecs = ECSUtils() + cluster = ecs.client.describe_clusters(clusters=[cluster_arn])["clusters"][0] + response = { + "cluster_arn": cluster["clusterArn"], + "cluster_name": cluster["clusterName"], + "status": cluster["status"], + "services": [] + } + most_recent_deployment_at = None + service_arns = ecs.list_ecs_services(cluster_name=cluster_arn) + for service_arn in service_arns: + service = ecs.client.describe_services(cluster=cluster_arn, services=[service_arn])["services"][0] + deployments = [] + most_recent_update_at = None + # Typically we have just one deployment record, but if there are more than one, then the + # one with a status of PRIMARY (of which there should be at most one), is the active one, + # and we will place that first in the list; all others will go after that. + for deployment in service.get("deployments", []): + if (not most_recent_update_at or + (deployment.get("updatedAt") and deployment.get("updatedAt") > most_recent_update_at)): + most_recent_update_at = deployment.get("updatedAt") + deployment_status = deployment.get("status") + deployment_info = { + "deployment_id": deployment.get("id"), + "task_arn": deployment.get("taskDefinition"), + "task_name": self._ecs_task_definition_arn_to_name(deployment.get("taskDefinition")), + "task_display_name": self._ecs_task_definition_arn_to_name(deployment.get("taskDefinition")), + "status": deployment_status, + "counts": {"running": deployment.get("runningCount"), + "pending": deployment.get("pendingCount"), + "expected": deployment.get("desiredCount")}, + "rollout": {"state": deployment.get("rolloutState"), + "reason": deployment.get("rolloutStateReason")}, + "created": convert_utc_datetime_to_utc_datetime_string(deployment.get("createdAt")), + "updated": convert_utc_datetime_to_utc_datetime_string(deployment.get("updatedAt")) + } + if deployment_status and deployment_status.upper() == "PRIMARY": + deployments.insert(0, deployment_info) + else: + deployments.append(deployment_info) + if (not most_recent_deployment_at or + (most_recent_update_at and most_recent_update_at > most_recent_deployment_at)): + most_recent_deployment_at = most_recent_update_at + if len(deployments) > 1: + task_name_common_prefix = longest_common_initial_substring([deployment["task_name"] for deployment in deployments]) + if task_name_common_prefix: + for deployment in deployments: + deployment["task_display_name"] = deployment["task_name"][len(task_name_common_prefix):] + response["services"].append({ + "service_arn": service_arn, + "service_name": service.get("serviceName"), + "service_display_name": service.get("serviceName"), + "task_arn": service.get("taskDefinition"), + "task_name": self._ecs_task_definition_arn_to_name(service.get("taskDefinition")), + "task_display_name": self._ecs_task_definition_arn_to_name(service.get("taskDefinition")), + "deployments": deployments + }) + if len(response["services"]) > 1: + service_name_common_prefix = ( + longest_common_initial_substring([service["service_name"] for service in response["services"]])) + if service_name_common_prefix: + for service in response["services"]: + service["service_display_name"] = service["service_name"][len(service_name_common_prefix):] + task_name_common_prefix = ( + longest_common_initial_substring([service["task_name"] for service in response["services"]])) + if task_name_common_prefix: + for service in response["services"]: + service["task_display_name"] = service["task_name"][len(task_name_common_prefix):] + + if most_recent_deployment_at: + response["most_recent_deployment_at"] = convert_utc_datetime_to_utc_datetime_string(most_recent_deployment_at) + return self.create_success_response(response) + + def reactapi_aws_ecs_task_arns(self, latest: bool = True) -> Response: + # If latest is True then only looks for the non-revisioned task ARNs. + ecs = boto3.client('ecs') + task_definition_arns = ecs.list_task_definitions()['taskDefinitionArns'] # TODO: ecs_utils.list_ecs_tasks + if latest: + task_definition_arns = list(set([self._ecs_task_definition_arn_to_name(task_definition_arn) + for task_definition_arn in task_definition_arns])) + task_definition_arns.sort() + return task_definition_arns + + def reactapi_aws_ecs_tasks(self, latest: bool = True) -> Response: + task_definitions = [] + ecs = boto3.client('ecs') + task_definition_arns = ecs.list_task_definitions()['taskDefinitionArns'] + if latest: + task_definition_arns = list(set([self._ecs_task_definition_arn_to_name(task_definition_arn) + for task_definition_arn in task_definition_arns])) + for task_definition_arn in task_definition_arns: + task_definition = self._reactapi_aws_ecs_task(task_definition_arn) + task_containers = task_definition["task_containers"] + task_container_names = [task_container["task_container_name"] for task_container in task_containers] + if task_container_names: + # If the "name" value of all of the task containers are then same then we + # will take this to be the the task display name, e.g. "DeploymentAction". + if all(task_container_name == task_container_names[0] for task_container_name in task_container_names): + task_definition["task_display_name"] = task_container_names[0] + task_definitions.append(task_definition) + # Here we have the flattened out list of task definitions, by revisions, + # but we want them (the revisions) to be grouped by task_family, so do that now. + response = [] + for task_definition in task_definitions: + task_family = task_definition["task_family"] + task_definition_response = [td for td in response if td["task_family"] == task_family] + if not task_definition_response: + task_definition_response = { + "task_family": task_family, + "task_name": task_definition["task_name"], + "task_display_name": task_definition["task_display_name"], + "task_revisions": [] + } + response.append(task_definition_response) + else: + task_definition_response = task_definition_response[0] + task_definition_response["task_revisions"].append(task_definition) + response.sort(key=lambda value: value["task_family"]) + return self.create_success_response(response) + + def reactapi_aws_ecs_task(self, task_definition_arn: str) -> Response: + return self.create_success_response(self._reactapi_aws_ecs_task(task_definition_arn)) + + def _reactapi_aws_ecs_task(self, task_definition_arn: str) -> Response: + # Note that the task_definition_arn can be either the specific task definition revision ARN, + # i.e. the one with the trailing ":", or the plain task definition ARN, + # i.e. without that trailing revision suffix. If it is the without the revision suffix, + # then the latest (most recent, i.e. the revision with the highest number) is returned; + # and the ARN prefix, e.g. "arn:aws:ecs:us-east-1:643366669028:task-definition", may be + # also be omitted. URL-decode because the ARN may contain a slash. + task_definition_arn = urllib.parse.unquote(task_definition_arn) + ecs = boto3.client('ecs') + task_definition = ecs.describe_task_definition(taskDefinition=task_definition_arn)["taskDefinition"] + task_containers = [] + for task_container in task_definition.get("containerDefinitions", []): + task_container_log = task_container.get("logConfiguration", {}).get("options", {}) + task_containers.append({ + "task_container_name": task_container["name"], + "task_container_image": task_container["image"], + "task_container_env": obfuscate_dict(name_value_list_to_dict(task_container["environment"])), + "task_container_log_group": task_container_log.get("awslogs-group"), + "task_container_log_region": task_container_log.get("awslogs-region"), + "task_container_log_stream_prefix": task_container_log.get("awslogs-stream-prefix") + }) + task_definition = { + "task_arn": task_definition["taskDefinitionArn"], + # The values of the task_family and task_name below should be exactly the same. + "task_family": task_definition["family"], + "task_name": self._ecs_task_definition_arn_to_name(task_definition_arn), + "task_display_name": task_definition["family"], + "task_revision": self._ecs_task_definition_revision(task_definition["taskDefinitionArn"]), + "task_containers": task_containers + } + task_container_names = [task_container["task_container_name"] for task_container in task_containers] + if task_container_names: + # If the "name" value of all of the task containers are then same then we + # will take this to be the the task display name, e.g. "DeploymentAction". + if all(task_container_name == task_container_names[0] for task_container_name in task_container_names): + task_definition["task_display_name"] = task_container_names[0] + return task_definition + + @staticmethod + def _ecs_task_definition_arn_to_name(task_definition_arn: str) -> str: + """ + Given something like this: + - arn:aws:ecs:us-east-1:466564410312:task-definition/c4-ecs-cgap-supertest-stack-CGAPDeployment-of2dr96JX1ds:1 + this function would return this: + - c4-ecs-cgap-supertest-stack-CGAPDeployment-of2dr96JX1ds + """ + if not task_definition_arn: + return "" + task_definition_arn_parts = task_definition_arn.split("/", 1) + task_definition_name = task_definition_arn_parts[1] if len(task_definition_arn_parts) > 1 else task_definition_arn + task_definition_name_parts = task_definition_name.rsplit(":", 1) + return task_definition_name_parts[0] if len(task_definition_name_parts) > 1 else task_definition_name + + @staticmethod + def _ecs_task_definition_revision(task_definition_arn: str) -> str: + task_definition_arn_parts = task_definition_arn.rsplit(":", 1) + return task_definition_arn_parts[1] if len(task_definition_arn_parts) > 1 else task_definition_arn + def reactapi_reload_lambda(self, request: dict) -> Response: """ Called from react_routes for endpoint: GET /__reloadlambda__ diff --git a/foursight_core/react/api/react_routes.py b/foursight_core/react/api/react_routes.py index 39f745585..a60d30af8 100644 --- a/foursight_core/react/api/react_routes.py +++ b/foursight_core/react/api/react_routes.py @@ -21,7 +21,7 @@ def reactapi_route_auth0_config(env: str) -> Response: # noqa: implicit @static Note that this in an UNPROTECTED route. """ ignored(env) - return reactapi_route_auth0_config_noenv() + return ReactRoutes.reactapi_route_auth0_config_noenv() @route("/auth0_config", authorize=False) def reactapi_route_auth0_config_noenv() -> Response: # noqa: implicit @staticmethod via @route @@ -439,20 +439,6 @@ def reactapi_route_account(env: str, name: str) -> Response: # noqa: implicit @ """ return app.core.reactapi_account(app.current_request.to_dict(), env, name) - @route("/{env}/accounts_from_s3", authorize=True) - def reactapi_route_accounts_from_s3(env: str) -> Response: # noqa: implicit @staticmethod via @route - """ - Returns info on known accounts/environments as defined in an accounts.json file in S3 if present. - """ - return app.core.reactapi_accounts(app.current_request.to_dict(), env, from_s3=True) - - @route("/{env}/accounts_from_s3/{name}", authorize=True) - def reactapi_route_account_from_s3(env: str, name: str) -> Response: # noqa: implicit @staticmethod via @route - """ - Returns info on known accounts/environments as defined in an accounts.json file in S3 if present. - """ - return app.core.reactapi_account(app.current_request.to_dict(), env, name, from_s3=True) - @route("/{env}/aws/vpcs", authorize=True) def reactapi_route_aws_vpcs(env: str) -> Response: # noqa: implicit @staticmethod via @route """ @@ -624,6 +610,67 @@ def reactapi_route_testsize(n: int) -> Response: # noqa: implicit @staticmethod """ return app.core.reactapi_testsize(n) + @route("/{env}/accounts_file", methods=["POST"], authorize=True) + def reactapi_route_accounts_file_upload(env: str) -> Response: # noqa: implicit @staticmethod via @route + ignored(env) + return ReactRoutes.reactapi_route_accounts_file_upload_noenv() + + @route("/accounts_file", methods=["POST"], authorize=True) + def reactapi_route_accounts_file_upload_noenv() -> Response: # noqa: implicit @staticmethod via @route + accounts_file_data = get_request_body(app.current_request) + return app.core.reactapi_accounts_file_upload(accounts_file_data) + + @route("/{env}/accounts_file", authorize=True) + def reactapi_route_accounts_file_download(env: str) -> Response: # noqa: implicit @staticmethod via @route + ignored(env) + return ReactRoutes.reactapi_route_accounts_file_download_noenv() + + @route("/accounts_file", authorize=True) + def reactapi_route_accounts_file_download_noenv() -> Response: # noqa: implicit @staticmethod via @route + return app.core.reactapi_accounts_file_download() + + @route("/{env}/aws/secrets/{secrets_name}", authorize=True) + def reactapi_route_aws_secrets(env: str, secrets_name: str) -> Response: # noqa: implicit @staticmethod via @route + ignored(env) + return ReactRoutes.reactapi_route_aws_secrets_noenv(secrets_name) + + @route("/aws/secrets/{secrets_name}", authorize=True) + def reactapi_route_aws_secrets_noenv(secrets_name: str) -> Response: # noqa: implicit @staticmethod via @route + return app.core.reactapi_aws_secrets(secrets_name) + + @route("/{env}/aws/secrets", authorize=True) + def reactapi_route_aws_secret_names(env: str) -> Response: # noqa: implicit @staticmethod via @route + ignored(env) + return ReactRoutes.reactapi_route_aws_secret_names_noenv() + + @route("/aws/secrets", authorize=True) + def reactapi_route_aws_secret_names_noenv() -> Response: # noqa: implicit @staticmethod via @route + return app.core.reactapi_aws_secret_names() + + @route("/aws/ecs/clusters", authorize=True) + def reactapi_route_aws_ecs_clusters() -> Response: # noqa: implicit @staticmethod via @route + return app.core.reactapi_aws_ecs_clusters() + + @route("/aws/ecs/clusters/{cluster_arn}", authorize=True) + def reactapi_route_aws_ecs_cluster(cluster_arn: str) -> Response: # noqa: implicit @staticmethod via @route + return app.core.reactapi_aws_ecs_cluster(cluster_arn=cluster_arn) + + @route("/aws/ecs/tasks", authorize=True) + def reactapi_route_aws_ecs_tasks() -> Response: # noqa: implicit @staticmethod via @route + return app.core.reactapi_aws_ecs_task_arns(latest=False) + + @route("/aws/ecs/tasks/{task_definition_arn}", authorize=True) + def reactapi_route_aws_ecs_task(task_definition_arn: str) -> Response: # noqa: implicit @staticmethod via @route + if task_definition_arn.lower() == "latest": + return app.core.reactapi_aws_ecs_task_arns(latest=True) + elif task_definition_arn.lower() == "details": + return app.core.reactapi_aws_ecs_tasks(latest=False) + return app.core.reactapi_aws_ecs_task(task_definition_arn) + + @route("/aws/ecs/tasks/latest/details", authorize=True) + def reactapi_route_aws_ecs_task() -> Response: # noqa: implicit @staticmethod via @route + return app.core.reactapi_aws_ecs_tasks(latest=True) + # ---------------------------------------------------------------------------------------------- # Foursight React UI (static file) routes, serving the HTML/CSS/JavaScript/React files. # Note that ALL of these are UNPROTECTED routes. diff --git a/foursight_core/react/ui/static/css/main.css b/foursight_core/react/ui/static/css/main.css index 8933f411a..d2e0bf92d 100644 --- a/foursight_core/react/ui/static/css/main.css +++ b/foursight_core/react/ui/static/css/main.css @@ -1 +1 @@ -.html-scroll{overflow-y:scroll}.container{max-width:1900px;padding-top:10px}.control-form{display:inline;margin-right:20px;margin-top:-8px}.boxstyle{padding:2px 10px}.boxstyle,.group-boxstyle{border:1px solid #ccc;border-radius:8px;margin-bottom:5px}.group-boxstyle{background-color:#f8f8f8;padding:0}.group-boxstyle:hover{background-color:#f2f2f2}.login-w-hover{background-color:#f8f8f8;border:1px solid #ccc;border-radius:8px;font-weight:350}.login-w-hover:hover{background-color:#d9d9d9}.commonstyle{margin:0 10px 5px}.collapse-div{clear:both;overflow:hidden}.own-line{display:block}.action-icon,.in-line{display:inline-block}.action-icon{border-radius:50%;height:11px;width:11px}.assc-action-done{background-color:#55aa57}.assc-action-fail{background-color:#b84947}.assc-action-pend{background-color:#e7c418}.assc-action-ready{background-color:#b6b5b5}.info{background-color:#d6eaf8;color:#263a48}.check-done,.check-pass{background-color:#dff0d8;color:#3c763d}.check-pend,.check-warn{background-color:#fcf8e3;color:#8a6d3b}.check-fail{background-color:#f2dede;color:#a94442}.check-error{background-color:#fbdcbd;color:#b75c00}.check-ignore{display:none}.center-element{text-align:center}.opacity-transition{transition:opacity .5s}.title-image-hover,.title-image-hover:active,.title-image-hover:visited{opacity:.7;text-decoration:none}.title-image-hover:focus,.title-image-hover:hover{opacity:1;text-decoration:none}.title-hover,.title-hover:active,.title-hover:visited{color:inherit}.title-hover:focus,.title-hover:hover{color:#000;text-decoration:none}.top-level-list{padding:0}.no-border{border:none}dl{margin-bottom:0}dd{margin-bottom:5px;margin-left:20px}.dropdown-button{background-color:inherit;border:none;color:inherit;cursor:pointer}.dropdown{display:inline-block;position:relative}.dropdown-content{background-color:inherit;box-shadow:10px 10px 10px #476f86;display:none;min-width:160px;position:absolute;width:-webkit-fit-content;width:-moz-fit-content;width:fit-content;z-index:1}.dropdown-content a{background-color:inherit;color:inherit}.dropdown-content a,.dropdown-content span{display:block;padding:4px 80px 4px 8px;text-align:left;text-decoration:none}.dropdown-content span{color:#000;cursor:default}.dropdown-content a:hover{background-color:#365e75;color:#ff0;cursor:pointer}.dropdown-content span:hover{color:blue}.dropdown:hover .dropdown-content{display:block}.dropdown:hover .dropdown-button{color:#000}.check-box{background-color:#dff0d8;color:#3c763d;-webkit-filter:brightness(.95);filter:brightness(.95)}.check-box:hover{-webkit-filter:brightness(1.05);filter:brightness(1.05)}.check-run-button{background:#09430c;background:var(--box-fg);border:1px solid var(--box-fg-darken);border-radius:12px;color:#fff;cursor:pointer;padding:2pt 12pt 3pt 8pt;-webkit-user-select:none;user-select:none}.check-run-button.red,.check-run-button.red:hover{background:red}.check-run-button.red:active{background:#ff0;color:red}.check-action-confirm-button{background:#dfe;background:var(--box-bg);border:1px solid red;border-radius:12px;color:red;cursor:pointer;padding:2pt 12pt 3pt 8pt;-webkit-user-select:none;user-select:none}.check-run-button:disabled{background:gray;color:#fff}.check-run-button.disabled{cursor:not-allowed}.check-run-button.disabled,.check-run-button.disabled:hover{background:gray;color:#fff!important}.check-run-button.disabled:active{background:gray;color:#fff}.check-run-button:hover{background:#09430c;background:var(--box-fg);color:#ff0}.check-run-button:active{background:#ff0;color:darkred!important}.check-run-wait-button{background:#09430c;background:var(--box-fg);border-radius:12px;color:#ff0;cursor:not-allowed;padding:2pt 12pt 3pt 8pt;-webkit-user-select:none;user-select:none}.check-config-button{cursor:pointer}.check-config-button,.check-config-wait-button{background:inherit;border:1px solid #006400;border-radius:12px;color:inherit;padding:2pt 12pt 3pt 8pt;-webkit-user-select:none;user-select:none}.check-config-wait-button{cursor:not-allowed}.tool-tip{position:relative}.tool-tip:before{background:#000;border-radius:10px;color:#fff;content:attr(data-text);display:none;font-family:tahoma;font-size:10pt;font-style:italic;font-weight:400;left:100%;margin-left:15px;min-width:200px;padding:8px 10px 8px 15px;position:absolute;text-align:left;top:50%;-webkit-transform:translateY(-50%);transform:translateY(-50%);width:-webkit-fit-content;width:-moz-fit-content;width:fit-content;z-index:99}.tool-tip:hover:before{display:block;z-index:99}.tool-tip.left:before{left:auto;margin:initial;margin-right:15px;right:100%;z-index:99}.tool-tip:after{border:10px solid transparent;border-right-color:#000;content:"";display:none;left:100%;margin-left:-2px;position:absolute;top:50%;-webkit-transform:translateY(-50%);transform:translateY(-50%);z-index:99}.tool-tip:hover:after,.tool-tip:hover:before{display:block}.App{text-align:center}.App-logo{height:40vmin;pointer-events:none}@media (prefers-reduced-motion:no-preference){.App-logo{-webkit-animation:App-logo-spin 20s linear infinite;animation:App-logo-spin 20s linear infinite}}.App-header{align-items:center;background-color:#282c34;color:#fff;display:flex;flex-direction:column;font-size:calc(10px + 2vmin);justify-content:center;min-height:100vh}.App-link{color:#61dafb}@-webkit-keyframes App-logo-spin{0%{-webkit-transform:rotate(0deg);transform:rotate(0deg)}to{-webkit-transform:rotate(1turn);transform:rotate(1turn)}}@keyframes App-logo-spin{0%{-webkit-transform:rotate(0deg);transform:rotate(0deg)}to{-webkit-transform:rotate(1turn);transform:rotate(1turn)}}@font-face{font-family:Sansation Bold;src:url(https://allfont.ru/cache/fonts/sansation-bold_1ed7ffb329f73655e972f658a6514075.ttf)}.title-font{font-family:Sansation Bold,Arial}:root{--foursight-fourfront-box-bg:#dfe;--foursight-fourfront-box-fg:#09430c;--foursight-cgap-box-bg:#def;--foursight-cgap-box-fg:#000069;--box-fg:var(--foursight-fourfront-box-fg);--box-bg:var(--foursight-fourfront-box-bg)}.box{background:#dfe;background:var(--box-bg);border:1px solid #09430c;border:1px solid var(--box-fg);border-radius:0 10px 10px 10px;color:#09430c;color:var(--box-fg);padding:.6em .8em;vertical-align:middle}.box.margin{margin-top:1.8pt}.box.bigmargin{margin-top:3.6pt}.box.noborder{border:0}.box.thickborder{border:2px solid #09430c;border:2px solid var(--box-fg)}.box.lighten{background:var(--box-bg-lighten)}.box.darken{background:var(--box-bg-darken)}.box.warning{background-color:#fcf8e3;color:#8a6d3b}.box.error{background-color:#ffeeeb;border-color:darkred;color:darkred}.bg{background:#dfe;background:var(--box-bg)}.fgbg{background:#09430c;background:var(--box-fg)}.fg{color:#09430c;color:var(--box-fg)}.td{color:inherit;padding-bottom:4pt;padding-right:8pt;vertical-align:top}.td.thin{width:1%}ul{padding-left:12pt}.input{background:var(--box-bg-lighten);border:1px solid gray;border-radius:4px;height:14pt;margin-left:0;padding:.7em .3em;width:30em}.input:focus{border:1px solid #09430c;border:1px solid var(--box-fg);box-shadow:0 0 2px #09430c;box-shadow:0 0 2px var(--box-fg);outline:none}.input::-webkit-input-placeholder{font-style:italic;opacity:.4}.input::placeholder{font-style:italic;opacity:.4}.input:read-only{background:#dfe;background:var(--box-bg);border:0;box-shadow:0 0 1px #09430c;box-shadow:0 0 1px var(--box-fg);outline:none}.button{background:#09430c;background:var(--box-fg);border:1px solid #09430c;border:1px solid var(--box-fg);border-radius:6px;color:#dfe;color:var(--box-bg);min-width:4em;padding:.1em .4em .25em}.button:active{background:#ff0;color:red}.button:disabled{background:gray;color:#fff;cursor:not-allowed}.button.cancel{background:#dfe;background:var(--box-bg);color:#09430c;color:var(--box-fg);-webkit-filter:brightness(1.02);filter:brightness(1.02)}.button.cancel:active{background:#ff0;color:red}.button.delete{background:red;color:#ff0}.button.delete:active{background:#ff0;color:red}.select{background:var(--box-bg-lighten);border-radius:3px}form{display:inline}.pagination-control *{margin:0}.page-item .page-link,.pagination-control .page-item,.pagination-control .page-link{background:var(--box-bg-lighten);color:#09430c;color:var(--box-fg)}.page-item .active .page-link,.pagination .active .page-link,.pagination.active:hover .page-link{background:#09430c;background:var(--box-fg);color:#dfe;color:var(--box-bg)}.pagination.active:hover .page-link{border-color:#09430c;border-color:var(--box-fg)}.refresh{padding-bottom:15pt;padding-left:2.8pt}.refresh,.refreshing{background:#fff;border:1px solid #09430c;border:1px solid var(--box-fg);border-radius:4pt;color:#09430c;color:var(--box-fg);cursor:pointer;height:16pt;max-height:16pt;max-width:16pt;user-select:none;-khtml-user-select:none;-moz-user-select:none;-ms-user-select:none;-webkit-user-select:none;width:16pt}.refreshing{padding-bottom:13.2pt;padding-left:.4pt;padding-top:1.6pt}.refresh:hover{background:#09430c;background:var(--box-fg);border:1px solid #dfe;border:1px solid var(--box-bg);color:#fff}.refresh:active{background:#ff0;border:1px solid red;color:red}.pointer{cursor:pointer}.signin-as-button{background:#ffffe0;border:1px solid #a9a9a9;border-radius:2pt;padding:8pt 0 8pt 10pt;text-align:left;white-space:nowrap;width:100%}.signin-as-button:hover{background:var(--box-bg-lighten)}.signin-as-button:active{background:#ff0}.border{border:1px solid}.border-thick{border:2px solid var(--box-fg)}.lightened{-webkit-filter:brightness(1.1);filter:brightness(1.1)}.darkened{-webkit-filter:brightness(.9);filter:brightness(.9)}.vspace-tiny{margin-top:.1em}.vspace-small{margin-top:.2em}.vspace-normal{margin-top:.3em}.vspace-medium{margin-top:.5em}.vspace-large{margin-top:1em}.padding-medium{padding:.5em!important}.padding-small{padding:.2em .5em!important}.mono{font-family:monospace;font-size:.9em}.hline{border-top:1px solid var(--box-fg);height:1px;margin-bottom:.4em;margin-top:.4em}.cursor-hand{cursor:pointer}body{-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;font-family:tahoma,-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Oxygen,Ubuntu,Cantarell,Fira Sans,Droid Sans,Helvetica Neue,sans-serif;font-size:12pt;margin:0}code{font-family:source-code-pro,Menlo,Monaco,Consolas,Courier New,monospace}:root{--rt-color-white:#fff;--rt-color-dark:#222;--rt-color-success:#8dc572;--rt-color-error:#be6464;--rt-color-warning:#f0ad4e;--rt-color-info:#337ab7;--rt-opacity:0.9}.styles-module_tooltip__mnnfp{border-radius:3px;font-size:90%;left:0;opacity:0;padding:8px 16px;pointer-events:none;position:absolute;top:0;transition:opacity .3s ease-out;visibility:hidden;width:-webkit-max-content;width:max-content;will-change:opacity,visibility}.styles-module_fixed__7ciUi{position:fixed}.styles-module_arrow__K0L3T{background:inherit;height:8px;position:absolute;-webkit-transform:rotate(45deg);transform:rotate(45deg);width:8px}.styles-module_no-arrow__KcFZN{display:none}.styles-module_show__2NboJ{opacity:.9;opacity:var(--rt-opacity);visibility:visible}.styles-module_dark__xNqje{background:#222;background:var(--rt-color-dark);color:#fff;color:var(--rt-color-white)}.styles-module_light__Z6W-X{background-color:#fff;background-color:var(--rt-color-white);color:#222;color:var(--rt-color-dark)}.styles-module_success__A2AKt{background-color:#8dc572;background-color:var(--rt-color-success);color:#fff;color:var(--rt-color-white)}.styles-module_warning__SCK0X{background-color:#f0ad4e;background-color:var(--rt-color-warning);color:#fff;color:var(--rt-color-white)}.styles-module_error__JvumD{background-color:#be6464;background-color:var(--rt-color-error);color:#fff;color:var(--rt-color-white)}.styles-module_info__BWdHW{background-color:#337ab7;background-color:var(--rt-color-info);color:#fff;color:var(--rt-color-white)} \ No newline at end of file +.html-scroll{overflow-y:scroll}.container{max-width:1900px;padding-top:10px}.control-form{display:inline;margin-right:20px;margin-top:-8px}.boxstyle{padding:2px 10px}.boxstyle,.group-boxstyle{border:1px solid #ccc;border-radius:8px;margin-bottom:5px}.group-boxstyle{background-color:#f8f8f8;padding:0}.group-boxstyle:hover{background-color:#f2f2f2}.login-w-hover{background-color:#f8f8f8;border:1px solid #ccc;border-radius:8px;font-weight:350}.login-w-hover:hover{background-color:#d9d9d9}.commonstyle{margin:0 10px 5px}.collapse-div{clear:both;overflow:hidden}.own-line{display:block}.action-icon,.in-line{display:inline-block}.action-icon{border-radius:50%;height:11px;width:11px}.assc-action-done{background-color:#55aa57}.assc-action-fail{background-color:#b84947}.assc-action-pend{background-color:#e7c418}.assc-action-ready{background-color:#b6b5b5}.info{background-color:#d6eaf8;color:#263a48}.check-done,.check-pass{background-color:#dff0d8;color:#3c763d}.check-pend,.check-warn{background-color:#fcf8e3;color:#8a6d3b}.check-fail{background-color:#f2dede;color:#a94442}.check-error{background-color:#fbdcbd;color:#b75c00}.check-ignore{display:none}.center-element{text-align:center}.opacity-transition{transition:opacity .5s}.title-image-hover,.title-image-hover:active,.title-image-hover:visited{opacity:.7;text-decoration:none}.title-image-hover:focus,.title-image-hover:hover{opacity:1;text-decoration:none}.title-hover,.title-hover:active,.title-hover:visited{color:inherit}.title-hover:focus,.title-hover:hover{color:#000;text-decoration:none}.top-level-list{padding:0}.no-border{border:none}dl{margin-bottom:0}dd{margin-bottom:5px;margin-left:20px}.dropdown-button{background-color:inherit;border:none;color:inherit;cursor:pointer}.dropdown{display:inline-block;position:relative}.dropdown-content{background-color:inherit;box-shadow:10px 10px 10px #476f86;display:none;min-width:160px;position:absolute;width:-webkit-fit-content;width:-moz-fit-content;width:fit-content;z-index:1}.dropdown-content a{background-color:inherit;color:inherit}.dropdown-content a,.dropdown-content span{display:block;padding:4px 80px 4px 8px;text-align:left;text-decoration:none}.dropdown-content span{color:#000;cursor:default}.dropdown-content a:hover{background-color:#365e75;color:#ff0;cursor:pointer}.dropdown-content span:hover{color:blue}.dropdown:hover .dropdown-content{display:block}.dropdown:hover .dropdown-button{color:#000}.check-box{background-color:#dff0d8;color:#3c763d;-webkit-filter:brightness(.95);filter:brightness(.95)}.check-box:hover{-webkit-filter:brightness(1.05);filter:brightness(1.05)}.check-run-button{background:#09430c;background:var(--box-fg);border:1px solid var(--box-fg-darken);border-radius:12px;color:#fff;cursor:pointer;padding:2pt 12pt 3pt 8pt;-webkit-user-select:none;user-select:none}.check-run-button.red,.check-run-button.red:hover{background:red}.check-run-button.red:active{background:#ff0;color:red}.check-action-confirm-button{background:#dfe;background:var(--box-bg);border:1px solid red;border-radius:12px;color:red;cursor:pointer;padding:2pt 12pt 3pt 8pt;-webkit-user-select:none;user-select:none}.check-run-button:disabled{background:gray;color:#fff}.check-run-button.disabled{cursor:not-allowed}.check-run-button.disabled,.check-run-button.disabled:hover{background:gray;color:#fff!important}.check-run-button.disabled:active{background:gray;color:#fff}.check-run-button:hover{background:#09430c;background:var(--box-fg);color:#ff0}.check-run-button:active{background:#ff0;color:darkred!important}.check-run-wait-button{background:#09430c;background:var(--box-fg);border-radius:12px;color:#ff0;cursor:not-allowed;padding:2pt 12pt 3pt 8pt;-webkit-user-select:none;user-select:none}.check-config-button{border:1px solid #006400;border-radius:14px;cursor:pointer}.check-config-button,.check-config-wait-button{background:inherit;color:inherit;padding:2pt 12pt 3pt 8pt;-webkit-user-select:none;user-select:none}.check-config-wait-button{border:1px solid #006400;border-radius:12px;cursor:not-allowed}.tool-tip{position:relative}.tool-tip:before{background:#000;border-radius:10px;color:#fff;content:attr(data-text);display:none;font-family:tahoma;font-size:10pt;font-style:italic;font-weight:400;left:100%;margin-left:15px;min-width:200px;padding:8px 10px 8px 15px;position:absolute;text-align:left;top:50%;-webkit-transform:translateY(-50%);transform:translateY(-50%);width:-webkit-fit-content;width:-moz-fit-content;width:fit-content;z-index:99}.tool-tip:hover:before{display:block;z-index:99}.tool-tip.left:before{left:auto;margin:initial;margin-right:15px;right:100%;z-index:99}.tool-tip:after{border:10px solid transparent;border-right-color:#000;content:"";display:none;left:100%;margin-left:-2px;position:absolute;top:50%;-webkit-transform:translateY(-50%);transform:translateY(-50%);z-index:99}.tool-tip:hover:after,.tool-tip:hover:before{display:block}.App{text-align:center}.App-logo{height:40vmin;pointer-events:none}@media (prefers-reduced-motion:no-preference){.App-logo{-webkit-animation:App-logo-spin 20s linear infinite;animation:App-logo-spin 20s linear infinite}}.App-header{align-items:center;background-color:#282c34;color:#fff;display:flex;flex-direction:column;font-size:calc(10px + 2vmin);justify-content:center;min-height:100vh}.App-link{color:#61dafb}@-webkit-keyframes App-logo-spin{0%{-webkit-transform:rotate(0deg);transform:rotate(0deg)}to{-webkit-transform:rotate(1turn);transform:rotate(1turn)}}@keyframes App-logo-spin{0%{-webkit-transform:rotate(0deg);transform:rotate(0deg)}to{-webkit-transform:rotate(1turn);transform:rotate(1turn)}}@font-face{font-family:Sansation Bold;src:url(https://allfont.ru/cache/fonts/sansation-bold_1ed7ffb329f73655e972f658a6514075.ttf)}.title-font{font-family:Sansation Bold,Arial}:root{--foursight-fourfront-box-bg:#dfe;--foursight-fourfront-box-fg:#09430c;--foursight-cgap-box-bg:#def;--foursight-cgap-box-fg:#000069;--box-fg:var(--foursight-fourfront-box-fg);--box-bg:var(--foursight-fourfront-box-bg)}.box{background:#dfe;background:var(--box-bg);border:1px solid #09430c;border:1px solid var(--box-fg);border-radius:0 10px 10px 10px;color:#09430c;color:var(--box-fg);padding:.6em .8em;vertical-align:middle}.box.margin{margin-top:1.8pt}.box.bigmargin{margin-top:3.6pt}.box.smallpadding{padding:.4em .4em 0}.box.noborder{border:0}.box.thickborder{border:2px solid #09430c;border:2px solid var(--box-fg)}.box.lighten{background:var(--box-bg-lighten)}.box.darken{background:var(--box-bg-darken)}.box.nobackground{background:inherit}.box.warning{background-color:#fcf8e3;color:#8a6d3b}.box.error{background-color:#ffeeeb;border-color:darkred;color:darkred}.bg{background:#dfe;background:var(--box-bg)}.fgbg{background:#09430c;background:var(--box-fg)}.fg{color:#09430c;color:var(--box-fg)}.td{color:inherit;padding-bottom:4pt;padding-right:8pt;vertical-align:top}.td.thin{width:1%}ul{padding-left:12pt}.input{background:var(--box-bg-lighten);border:1px solid gray;border-radius:4px;height:14pt;margin-left:0;padding:.7em .3em;width:30em}.input:focus{border:1px solid #09430c;border:1px solid var(--box-fg);box-shadow:0 0 2px #09430c;box-shadow:0 0 2px var(--box-fg);outline:none}.input::-webkit-input-placeholder{font-style:italic;opacity:.4}.input::placeholder{font-style:italic;opacity:.4}.input:read-only{background:#dfe;background:var(--box-bg);border:0;box-shadow:0 0 1px #09430c;box-shadow:0 0 1px var(--box-fg);outline:none}.button{background:#09430c;background:var(--box-fg);border:1px solid #09430c;border:1px solid var(--box-fg);border-radius:6px;color:#dfe;color:var(--box-bg);min-width:4em;padding:.1em .4em .25em}.button:active{background:#ff0;color:red}.button:disabled{background:gray;color:#fff;cursor:not-allowed}.button.cancel{background:#dfe;background:var(--box-bg);color:#09430c;color:var(--box-fg);-webkit-filter:brightness(1.02);filter:brightness(1.02)}.button.cancel:active{background:#ff0;color:red}.button.delete{background:red;color:#ff0}.button.delete:active{background:#ff0;color:red}.select{background:var(--box-bg-lighten);border-radius:3px}form{display:inline}.pagination-control *{margin:0}.page-item .page-link,.pagination-control .page-item,.pagination-control .page-link{background:var(--box-bg-lighten);color:#09430c;color:var(--box-fg)}.page-item .active .page-link,.pagination .active .page-link,.pagination.active:hover .page-link{background:#09430c;background:var(--box-fg);color:#dfe;color:var(--box-bg)}.pagination.active:hover .page-link{border-color:#09430c;border-color:var(--box-fg)}.refresh{padding-bottom:15pt;padding-left:2.8pt}.refresh,.refreshing{background:#fff;border:1px solid #09430c;border:1px solid var(--box-fg);border-radius:4pt;color:#09430c;color:var(--box-fg);cursor:pointer;height:16pt;max-height:16pt;max-width:16pt;user-select:none;-khtml-user-select:none;-moz-user-select:none;-ms-user-select:none;-webkit-user-select:none;width:16pt}.refreshing{padding-bottom:13.2pt;padding-left:.4pt;padding-top:1.6pt}.refresh:hover{background:#09430c;background:var(--box-fg);border:1px solid #dfe;border:1px solid var(--box-bg);color:#fff}.refresh:active{background:#ff0;border:1px solid red;color:red}.pointer{cursor:pointer}.signin-as-button{background:#ffffe0;border:1px solid #a9a9a9;border-radius:2pt;padding:8pt 0 8pt 10pt;text-align:left;white-space:nowrap;width:100%}.signin-as-button:hover{background:var(--box-bg-lighten)}.signin-as-button:active{background:#ff0}#accounts-file-upload{display:none}.border{border:1px solid}.border-thick{border:2px solid var(--box-fg)}.lightened{-webkit-filter:brightness(1.1);filter:brightness(1.1)}.darkened{-webkit-filter:brightness(.9);filter:brightness(.9)}.vspace-tiny{margin-top:.1em}.vspace-small{margin-top:.2em}.vspace-normal{margin-top:.3em}.vspace-medium{margin-top:.5em}.vspace-large{margin-top:1em}.padding-medium{padding:.5em!important}.padding-small{padding:.2em .5em!important}.mono{font-family:monospace;font-size:.9em}.hline{border-top:1px solid var(--box-fg);height:1px;margin-bottom:.4em;margin-top:.4em}.cursor-hand{cursor:pointer}body{-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;font-family:tahoma,-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Oxygen,Ubuntu,Cantarell,Fira Sans,Droid Sans,Helvetica Neue,sans-serif;font-size:12pt;margin:0}code{font-family:source-code-pro,Menlo,Monaco,Consolas,Courier New,monospace}:root{--rt-color-white:#fff;--rt-color-dark:#222;--rt-color-success:#8dc572;--rt-color-error:#be6464;--rt-color-warning:#f0ad4e;--rt-color-info:#337ab7;--rt-opacity:0.9}.core-styles-module_tooltip__3vRRp{left:0;opacity:0;pointer-events:none;position:absolute;top:0;transition:opacity .3s ease-out;visibility:hidden;will-change:opacity,visibility}.core-styles-module_fixed__pcSol{position:fixed}.core-styles-module_arrow__cvMwQ{background:inherit;position:absolute}.core-styles-module_noArrow__xock6{display:none}.core-styles-module_clickable__ZuTTB{pointer-events:auto}.core-styles-module_show__Nt9eE{opacity:.9;opacity:var(--rt-opacity);visibility:visible}.styles-module_tooltip__mnnfp{border-radius:3px;font-size:90%;padding:8px 16px;width:-webkit-max-content;width:max-content}.styles-module_arrow__K0L3T{height:8px;-webkit-transform:rotate(45deg);transform:rotate(45deg);width:8px}.styles-module_dark__xNqje{background:#222;background:var(--rt-color-dark);color:#fff;color:var(--rt-color-white)}.styles-module_light__Z6W-X{background-color:#fff;background-color:var(--rt-color-white);color:#222;color:var(--rt-color-dark)}.styles-module_success__A2AKt{background-color:#8dc572;background-color:var(--rt-color-success);color:#fff;color:var(--rt-color-white)}.styles-module_warning__SCK0X{background-color:#f0ad4e;background-color:var(--rt-color-warning);color:#fff;color:var(--rt-color-white)}.styles-module_error__JvumD{background-color:#be6464;background-color:var(--rt-color-error);color:#fff;color:var(--rt-color-white)}.styles-module_info__BWdHW{background-color:#337ab7;background-color:var(--rt-color-info);color:#fff;color:var(--rt-color-white)} \ No newline at end of file diff --git a/foursight_core/react/ui/static/js/main.js b/foursight_core/react/ui/static/js/main.js index 2052b709c..5fe100c31 100644 --- a/foursight_core/react/ui/static/js/main.js +++ b/foursight_core/react/ui/static/js/main.js @@ -1,2 +1,2 @@ -/*! For license information please see main.b90e06b3.js.LICENSE.txt */ -(function(){var __webpack_modules__={4189:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0})},9014:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0})},1851:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0})},4834:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0})},4092:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.isMsWindow=void 0;var n=["decrypt","digest","encrypt","exportKey","generateKey","importKey","sign","verify"];t.isMsWindow=function(e){if(function(e){return"MSInputMethodContext"in e&&"msCrypto"in e}(e)&&void 0!==e.msCrypto.subtle){var t=e.msCrypto,r=t.getRandomValues,o=t.subtle;return n.map((function(e){return o[e]})).concat(r).every((function(e){return"function"===typeof e}))}return!1}},5047:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(7665);r.__exportStar(n(4189),t),r.__exportStar(n(9014),t),r.__exportStar(n(1851),t),r.__exportStar(n(4834),t),r.__exportStar(n(4092),t)},7665:function(e,t,n){"use strict";n.r(t),n.d(t,{__assign:function(){return i},__asyncDelegator:function(){return b},__asyncGenerator:function(){return M},__asyncValues:function(){return j},__await:function(){return v},__awaiter:function(){return c},__classPrivateFieldGet:function(){return I},__classPrivateFieldSet:function(){return D},__createBinding:function(){return f},__decorate:function(){return s},__exportStar:function(){return p},__extends:function(){return o},__generator:function(){return d},__importDefault:function(){return N},__importStar:function(){return x},__makeTemplateObject:function(){return w},__metadata:function(){return l},__param:function(){return u},__read:function(){return g},__rest:function(){return a},__spread:function(){return y},__spreadArrays:function(){return m},__values:function(){return h}});var r=function(e,t){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])},r(e,t)};function o(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}var i=function(){return i=Object.assign||function(e){for(var t,n=1,r=arguments.length;n=0;s--)(o=e[s])&&(a=(i<3?o(a):i>3?o(t,n,a):o(t,n))||a);return i>3&&a&&Object.defineProperty(t,n,a),a}function u(e,t){return function(n,r){t(n,r,e)}}function l(e,t){if("object"===typeof Reflect&&"function"===typeof Reflect.metadata)return Reflect.metadata(e,t)}function c(e,t,n,r){return new(n||(n=Promise))((function(o,i){function a(e){try{u(r.next(e))}catch(t){i(t)}}function s(e){try{u(r.throw(e))}catch(t){i(t)}}function u(e){var t;e.done?o(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}u((r=r.apply(e,t||[])).next())}))}function d(e,t){var n,r,o,i,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:s(0),throw:s(1),return:s(2)},"function"===typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function s(i){return function(s){return function(i){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(o=2&i[0]?r.return:i[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,i[1])).done)return o;switch(r=0,o&&(i=[2&i[0],o.value]),i[0]){case 0:case 1:o=i;break;case 4:return a.label++,{value:i[1],done:!1};case 5:a.label++,r=i[1],i=[0];continue;case 7:i=a.ops.pop(),a.trys.pop();continue;default:if(!(o=(o=a.trys).length>0&&o[o.length-1])&&(6===i[0]||2===i[0])){a=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]=e.length&&(e=void 0),{value:e&&e[r++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")}function g(e,t){var n="function"===typeof Symbol&&e[Symbol.iterator];if(!n)return e;var r,o,i=n.call(e),a=[];try{for(;(void 0===t||t-- >0)&&!(r=i.next()).done;)a.push(r.value)}catch(s){o={error:s}}finally{try{r&&!r.done&&(n=i.return)&&n.call(i)}finally{if(o)throw o.error}}return a}function y(){for(var e=[],t=0;t1||s(e,t)}))})}function s(e,t){try{!function(e){e.value instanceof v?Promise.resolve(e.value.v).then(u,l):c(i[0][2],e)}(o[e](t))}catch(n){c(i[0][3],n)}}function u(e){s("next",e)}function l(e){s("throw",e)}function c(e,t){e(t),i.shift(),i.length&&s(i[0][0],i[0][1])}}function b(e){var t,n;return t={},r("next"),r("throw",(function(e){throw e})),r("return"),t[Symbol.iterator]=function(){return this},t;function r(r,o){t[r]=e[r]?function(t){return(n=!n)?{value:v(e[r](t)),done:"return"===r}:o?o(t):t}:o}}function j(e){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var t,n=e[Symbol.asyncIterator];return n?n.call(e):(e=h(e),t={},r("next"),r("throw"),r("return"),t[Symbol.asyncIterator]=function(){return this},t);function r(n){t[n]=e[n]&&function(t){return new Promise((function(r,o){(function(e,t,n,r){Promise.resolve(r).then((function(t){e({value:t,done:n})}),t)})(r,o,(t=e[n](t)).done,t.value)}))}}}function w(e,t){return Object.defineProperty?Object.defineProperty(e,"raw",{value:t}):e.raw=t,e}function x(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)Object.hasOwnProperty.call(e,n)&&(t[n]=e[n]);return t.default=e,t}function N(e){return e&&e.__esModule?e:{default:e}}function I(e,t){if(!t.has(e))throw new TypeError("attempted to get private field on non-instance");return t.get(e)}function D(e,t,n){if(!t.has(e))throw new TypeError("attempted to set private field on non-instance");return t.set(e,n),n}},1814:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.EMPTY_DATA_SHA_256=t.SHA_256_HMAC_ALGO=t.SHA_256_HASH=void 0,t.SHA_256_HASH={name:"SHA-256"},t.SHA_256_HMAC_ALGO={name:"HMAC",hash:t.SHA_256_HASH},t.EMPTY_DATA_SHA_256=new Uint8Array([227,176,196,66,152,252,28,20,154,251,244,200,153,111,185,36,39,174,65,228,100,155,147,76,164,149,153,27,120,82,184,85])},3620:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Sha256=void 0;var r=n(5664),o=n(5469),i=n(6915),a=n(7918),s=n(5047),u=n(314),l=function(){function e(e){(0,a.supportsWebCrypto)((0,u.locateWindow)())?this.hash=new o.Sha256(e):(0,s.isMsWindow)((0,u.locateWindow)())?this.hash=new r.Sha256(e):this.hash=new i.Sha256(e)}return e.prototype.update=function(e,t){this.hash.update(e,t)},e.prototype.digest=function(){return this.hash.digest()},e}();t.Sha256=l},5664:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Sha256=void 0;var r=n(9018),o=n(1814),i=n(5863),a=n(314),s=function(){function e(e){e?(this.operation=function(e){return new Promise((function(t,n){var r=(0,a.locateWindow)().msCrypto.subtle.importKey("raw",u(e),o.SHA_256_HMAC_ALGO,!1,["sign"]);r.oncomplete=function(){r.result&&t(r.result),n(new Error("ImportKey completed without importing key."))},r.onerror=function(){n(new Error("ImportKey failed to import key."))}}))}(e).then((function(e){return(0,a.locateWindow)().msCrypto.subtle.sign(o.SHA_256_HMAC_ALGO,e)})),this.operation.catch((function(){}))):this.operation=Promise.resolve((0,a.locateWindow)().msCrypto.subtle.digest("SHA-256"))}return e.prototype.update=function(e){var t=this;(0,r.isEmptyData)(e)||(this.operation=this.operation.then((function(n){return n.onerror=function(){t.operation=Promise.reject(new Error("Error encountered updating hash"))},n.process(u(e)),n})),this.operation.catch((function(){})))},e.prototype.digest=function(){return this.operation.then((function(e){return new Promise((function(t,n){e.onerror=function(){n(new Error("Error encountered finalizing hash"))},e.oncomplete=function(){e.result&&t(new Uint8Array(e.result)),n(new Error("Error encountered finalizing hash"))},e.finish()}))}))},e}();function u(e){return"string"===typeof e?(0,i.fromUtf8)(e):ArrayBuffer.isView(e)?new Uint8Array(e.buffer,e.byteOffset,e.byteLength/Uint8Array.BYTES_PER_ELEMENT):new Uint8Array(e)}t.Sha256=s},3219:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.WebCryptoSha256=t.Ie11Sha256=void 0,(0,n(9443).__exportStar)(n(3620),t);var r=n(5664);Object.defineProperty(t,"Ie11Sha256",{enumerable:!0,get:function(){return r.Sha256}});var o=n(5469);Object.defineProperty(t,"WebCryptoSha256",{enumerable:!0,get:function(){return o.Sha256}})},9018:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.isEmptyData=void 0,t.isEmptyData=function(e){return"string"===typeof e?0===e.length:0===e.byteLength}},5469:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Sha256=void 0;var r=n(5302),o=n(1814),i=n(314),a=function(){function e(e){this.toHash=new Uint8Array(0),void 0!==e&&(this.key=new Promise((function(t,n){(0,i.locateWindow)().crypto.subtle.importKey("raw",(0,r.convertToBuffer)(e),o.SHA_256_HMAC_ALGO,!1,["sign"]).then(t,n)})),this.key.catch((function(){})))}return e.prototype.update=function(e){if(!(0,r.isEmptyData)(e)){var t=(0,r.convertToBuffer)(e),n=new Uint8Array(this.toHash.byteLength+t.byteLength);n.set(this.toHash,0),n.set(t,this.toHash.byteLength),this.toHash=n}},e.prototype.digest=function(){var e=this;return this.key?this.key.then((function(t){return(0,i.locateWindow)().crypto.subtle.sign(o.SHA_256_HMAC_ALGO,t,e.toHash).then((function(e){return new Uint8Array(e)}))})):(0,r.isEmptyData)(this.toHash)?Promise.resolve(o.EMPTY_DATA_SHA_256):Promise.resolve().then((function(){return(0,i.locateWindow)().crypto.subtle.digest(o.SHA_256_HASH,e.toHash)})).then((function(e){return Promise.resolve(new Uint8Array(e))}))},e}();t.Sha256=a},9443:function(e,t,n){"use strict";n.r(t),n.d(t,{__assign:function(){return i},__asyncDelegator:function(){return b},__asyncGenerator:function(){return M},__asyncValues:function(){return j},__await:function(){return v},__awaiter:function(){return c},__classPrivateFieldGet:function(){return I},__classPrivateFieldSet:function(){return D},__createBinding:function(){return f},__decorate:function(){return s},__exportStar:function(){return p},__extends:function(){return o},__generator:function(){return d},__importDefault:function(){return N},__importStar:function(){return x},__makeTemplateObject:function(){return w},__metadata:function(){return l},__param:function(){return u},__read:function(){return g},__rest:function(){return a},__spread:function(){return y},__spreadArrays:function(){return m},__values:function(){return h}});var r=function(e,t){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])},r(e,t)};function o(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}var i=function(){return i=Object.assign||function(e){for(var t,n=1,r=arguments.length;n=0;s--)(o=e[s])&&(a=(i<3?o(a):i>3?o(t,n,a):o(t,n))||a);return i>3&&a&&Object.defineProperty(t,n,a),a}function u(e,t){return function(n,r){t(n,r,e)}}function l(e,t){if("object"===typeof Reflect&&"function"===typeof Reflect.metadata)return Reflect.metadata(e,t)}function c(e,t,n,r){return new(n||(n=Promise))((function(o,i){function a(e){try{u(r.next(e))}catch(t){i(t)}}function s(e){try{u(r.throw(e))}catch(t){i(t)}}function u(e){var t;e.done?o(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}u((r=r.apply(e,t||[])).next())}))}function d(e,t){var n,r,o,i,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:s(0),throw:s(1),return:s(2)},"function"===typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function s(i){return function(s){return function(i){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(o=2&i[0]?r.return:i[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,i[1])).done)return o;switch(r=0,o&&(i=[2&i[0],o.value]),i[0]){case 0:case 1:o=i;break;case 4:return a.label++,{value:i[1],done:!1};case 5:a.label++,r=i[1],i=[0];continue;case 7:i=a.ops.pop(),a.trys.pop();continue;default:if(!(o=(o=a.trys).length>0&&o[o.length-1])&&(6===i[0]||2===i[0])){a=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]=e.length&&(e=void 0),{value:e&&e[r++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")}function g(e,t){var n="function"===typeof Symbol&&e[Symbol.iterator];if(!n)return e;var r,o,i=n.call(e),a=[];try{for(;(void 0===t||t-- >0)&&!(r=i.next()).done;)a.push(r.value)}catch(s){o={error:s}}finally{try{r&&!r.done&&(n=i.return)&&n.call(i)}finally{if(o)throw o.error}}return a}function y(){for(var e=[],t=0;t1||s(e,t)}))})}function s(e,t){try{!function(e){e.value instanceof v?Promise.resolve(e.value.v).then(u,l):c(i[0][2],e)}(o[e](t))}catch(n){c(i[0][3],n)}}function u(e){s("next",e)}function l(e){s("throw",e)}function c(e,t){e(t),i.shift(),i.length&&s(i[0][0],i[0][1])}}function b(e){var t,n;return t={},r("next"),r("throw",(function(e){throw e})),r("return"),t[Symbol.iterator]=function(){return this},t;function r(r,o){t[r]=e[r]?function(t){return(n=!n)?{value:v(e[r](t)),done:"return"===r}:o?o(t):t}:o}}function j(e){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var t,n=e[Symbol.asyncIterator];return n?n.call(e):(e=h(e),t={},r("next"),r("throw"),r("return"),t[Symbol.asyncIterator]=function(){return this},t);function r(n){t[n]=e[n]&&function(t){return new Promise((function(r,o){(function(e,t,n,r){Promise.resolve(r).then((function(t){e({value:t,done:n})}),t)})(r,o,(t=e[n](t)).done,t.value)}))}}}function w(e,t){return Object.defineProperty?Object.defineProperty(e,"raw",{value:t}):e.raw=t,e}function x(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)Object.hasOwnProperty.call(e,n)&&(t[n]=e[n]);return t.default=e,t}function N(e){return e&&e.__esModule?e:{default:e}}function I(e,t){if(!t.has(e))throw new TypeError("attempted to get private field on non-instance");return t.get(e)}function D(e,t,n){if(!t.has(e))throw new TypeError("attempted to set private field on non-instance");return t.set(e,n),n}},3339:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.RawSha256=void 0;var r=n(3277),o=function(){function e(){this.state=Int32Array.from(r.INIT),this.temp=new Int32Array(64),this.buffer=new Uint8Array(64),this.bufferLength=0,this.bytesHashed=0,this.finished=!1}return e.prototype.update=function(e){if(this.finished)throw new Error("Attempted to update an already finished hash.");var t=0,n=e.byteLength;if(this.bytesHashed+=n,8*this.bytesHashed>r.MAX_HASHABLE_LENGTH)throw new Error("Cannot hash more than 2^53 - 1 bits");for(;n>0;)this.buffer[this.bufferLength++]=e[t++],n--,this.bufferLength===r.BLOCK_SIZE&&(this.hashBuffer(),this.bufferLength=0)},e.prototype.digest=function(){if(!this.finished){var e=8*this.bytesHashed,t=new DataView(this.buffer.buffer,this.buffer.byteOffset,this.buffer.byteLength),n=this.bufferLength;if(t.setUint8(this.bufferLength++,128),n%r.BLOCK_SIZE>=r.BLOCK_SIZE-8){for(var o=this.bufferLength;o>>24&255,i[4*o+1]=this.state[o]>>>16&255,i[4*o+2]=this.state[o]>>>8&255,i[4*o+3]=this.state[o]>>>0&255;return i},e.prototype.hashBuffer=function(){for(var e=this.buffer,t=this.state,n=t[0],o=t[1],i=t[2],a=t[3],s=t[4],u=t[5],l=t[6],c=t[7],d=0;d>>17|f<<15)^(f>>>19|f<<13)^f>>>10,h=((f=this.temp[d-15])>>>7|f<<25)^(f>>>18|f<<14)^f>>>3;this.temp[d]=(p+this.temp[d-7]|0)+(h+this.temp[d-16]|0)}var g=(((s>>>6|s<<26)^(s>>>11|s<<21)^(s>>>25|s<<7))+(s&u^~s&l)|0)+(c+(r.KEY[d]+this.temp[d]|0)|0)|0,y=((n>>>2|n<<30)^(n>>>13|n<<19)^(n>>>22|n<<10))+(n&o^n&i^o&i)|0;c=l,l=u,u=s,s=a+g|0,a=i,i=o,o=n,n=g+y|0}t[0]+=n,t[1]+=o,t[2]+=i,t[3]+=a,t[4]+=s,t[5]+=u,t[6]+=l,t[7]+=c},e}();t.RawSha256=o},3277:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.MAX_HASHABLE_LENGTH=t.INIT=t.KEY=t.DIGEST_LENGTH=t.BLOCK_SIZE=void 0,t.BLOCK_SIZE=64,t.DIGEST_LENGTH=32,t.KEY=new Uint32Array([1116352408,1899447441,3049323471,3921009573,961987163,1508970993,2453635748,2870763221,3624381080,310598401,607225278,1426881987,1925078388,2162078206,2614888103,3248222580,3835390401,4022224774,264347078,604807628,770255983,1249150122,1555081692,1996064986,2554220882,2821834349,2952996808,3210313671,3336571891,3584528711,113926993,338241895,666307205,773529912,1294757372,1396182291,1695183700,1986661051,2177026350,2456956037,2730485921,2820302411,3259730800,3345764771,3516065817,3600352804,4094571909,275423344,430227734,506948616,659060556,883997877,958139571,1322822218,1537002063,1747873779,1955562222,2024104815,2227730452,2361852424,2428436474,2756734187,3204031479,3329325298]),t.INIT=[1779033703,3144134277,1013904242,2773480762,1359893119,2600822924,528734635,1541459225],t.MAX_HASHABLE_LENGTH=Math.pow(2,53)-1},6915:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),(0,n(2676).__exportStar)(n(9853),t)},9853:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Sha256=void 0;var r=n(2676),o=n(3277),i=n(3339),a=n(5302),s=function(){function e(e){if(this.hash=new i.RawSha256,e){this.outer=new i.RawSha256;var t=function(e){var t=(0,a.convertToBuffer)(e);if(t.byteLength>o.BLOCK_SIZE){var n=new i.RawSha256;n.update(t),t=n.digest()}var r=new Uint8Array(o.BLOCK_SIZE);return r.set(t),r}(e),n=new Uint8Array(o.BLOCK_SIZE);n.set(t);for(var r=0;r=0;s--)(o=e[s])&&(a=(i<3?o(a):i>3?o(t,n,a):o(t,n))||a);return i>3&&a&&Object.defineProperty(t,n,a),a}function u(e,t){return function(n,r){t(n,r,e)}}function l(e,t){if("object"===typeof Reflect&&"function"===typeof Reflect.metadata)return Reflect.metadata(e,t)}function c(e,t,n,r){return new(n||(n=Promise))((function(o,i){function a(e){try{u(r.next(e))}catch(t){i(t)}}function s(e){try{u(r.throw(e))}catch(t){i(t)}}function u(e){var t;e.done?o(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}u((r=r.apply(e,t||[])).next())}))}function d(e,t){var n,r,o,i,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:s(0),throw:s(1),return:s(2)},"function"===typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function s(i){return function(s){return function(i){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(o=2&i[0]?r.return:i[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,i[1])).done)return o;switch(r=0,o&&(i=[2&i[0],o.value]),i[0]){case 0:case 1:o=i;break;case 4:return a.label++,{value:i[1],done:!1};case 5:a.label++,r=i[1],i=[0];continue;case 7:i=a.ops.pop(),a.trys.pop();continue;default:if(!(o=(o=a.trys).length>0&&o[o.length-1])&&(6===i[0]||2===i[0])){a=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]=e.length&&(e=void 0),{value:e&&e[r++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")}function g(e,t){var n="function"===typeof Symbol&&e[Symbol.iterator];if(!n)return e;var r,o,i=n.call(e),a=[];try{for(;(void 0===t||t-- >0)&&!(r=i.next()).done;)a.push(r.value)}catch(s){o={error:s}}finally{try{r&&!r.done&&(n=i.return)&&n.call(i)}finally{if(o)throw o.error}}return a}function y(){for(var e=[],t=0;t1||s(e,t)}))})}function s(e,t){try{!function(e){e.value instanceof v?Promise.resolve(e.value.v).then(u,l):c(i[0][2],e)}(o[e](t))}catch(n){c(i[0][3],n)}}function u(e){s("next",e)}function l(e){s("throw",e)}function c(e,t){e(t),i.shift(),i.length&&s(i[0][0],i[0][1])}}function b(e){var t,n;return t={},r("next"),r("throw",(function(e){throw e})),r("return"),t[Symbol.iterator]=function(){return this},t;function r(r,o){t[r]=e[r]?function(t){return(n=!n)?{value:v(e[r](t)),done:"return"===r}:o?o(t):t}:o}}function j(e){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var t,n=e[Symbol.asyncIterator];return n?n.call(e):(e=h(e),t={},r("next"),r("throw"),r("return"),t[Symbol.asyncIterator]=function(){return this},t);function r(n){t[n]=e[n]&&function(t){return new Promise((function(r,o){(function(e,t,n,r){Promise.resolve(r).then((function(t){e({value:t,done:n})}),t)})(r,o,(t=e[n](t)).done,t.value)}))}}}function w(e,t){return Object.defineProperty?Object.defineProperty(e,"raw",{value:t}):e.raw=t,e}function x(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)Object.hasOwnProperty.call(e,n)&&(t[n]=e[n]);return t.default=e,t}function N(e){return e&&e.__esModule?e:{default:e}}function I(e,t){if(!t.has(e))throw new TypeError("attempted to get private field on non-instance");return t.get(e)}function D(e,t,n){if(!t.has(e))throw new TypeError("attempted to set private field on non-instance");return t.set(e,n),n}},7918:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),n(8679).__exportStar(n(5524),t)},5524:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.supportsZeroByteGCM=t.supportsSubtleCrypto=t.supportsSecureRandom=t.supportsWebCrypto=void 0;var r=n(8679),o=["decrypt","digest","encrypt","exportKey","generateKey","importKey","sign","verify"];function i(e){return"object"===typeof e&&"object"===typeof e.crypto&&"function"===typeof e.crypto.getRandomValues}function a(e){return e&&o.every((function(t){return"function"===typeof e[t]}))}t.supportsWebCrypto=function(e){return!(!i(e)||"object"!==typeof e.crypto.subtle)&&a(e.crypto.subtle)},t.supportsSecureRandom=i,t.supportsSubtleCrypto=a,t.supportsZeroByteGCM=function(e){return r.__awaiter(this,void 0,void 0,(function(){var t;return r.__generator(this,(function(n){switch(n.label){case 0:if(!a(e))return[2,!1];n.label=1;case 1:return n.trys.push([1,4,,5]),[4,e.generateKey({name:"AES-GCM",length:128},!1,["encrypt"])];case 2:return t=n.sent(),[4,e.encrypt({name:"AES-GCM",iv:new Uint8Array(Array(12)),additionalData:new Uint8Array(Array(16)),tagLength:128},t,new Uint8Array(0))];case 3:return[2,16===n.sent().byteLength];case 4:return n.sent(),[2,!1];case 5:return[2]}}))}))}},8679:function(e,t,n){"use strict";n.r(t),n.d(t,{__assign:function(){return i},__asyncDelegator:function(){return b},__asyncGenerator:function(){return M},__asyncValues:function(){return j},__await:function(){return v},__awaiter:function(){return c},__classPrivateFieldGet:function(){return I},__classPrivateFieldSet:function(){return D},__createBinding:function(){return f},__decorate:function(){return s},__exportStar:function(){return p},__extends:function(){return o},__generator:function(){return d},__importDefault:function(){return N},__importStar:function(){return x},__makeTemplateObject:function(){return w},__metadata:function(){return l},__param:function(){return u},__read:function(){return g},__rest:function(){return a},__spread:function(){return y},__spreadArrays:function(){return m},__values:function(){return h}});var r=function(e,t){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])},r(e,t)};function o(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}var i=function(){return i=Object.assign||function(e){for(var t,n=1,r=arguments.length;n=0;s--)(o=e[s])&&(a=(i<3?o(a):i>3?o(t,n,a):o(t,n))||a);return i>3&&a&&Object.defineProperty(t,n,a),a}function u(e,t){return function(n,r){t(n,r,e)}}function l(e,t){if("object"===typeof Reflect&&"function"===typeof Reflect.metadata)return Reflect.metadata(e,t)}function c(e,t,n,r){return new(n||(n=Promise))((function(o,i){function a(e){try{u(r.next(e))}catch(t){i(t)}}function s(e){try{u(r.throw(e))}catch(t){i(t)}}function u(e){var t;e.done?o(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}u((r=r.apply(e,t||[])).next())}))}function d(e,t){var n,r,o,i,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:s(0),throw:s(1),return:s(2)},"function"===typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function s(i){return function(s){return function(i){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(o=2&i[0]?r.return:i[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,i[1])).done)return o;switch(r=0,o&&(i=[2&i[0],o.value]),i[0]){case 0:case 1:o=i;break;case 4:return a.label++,{value:i[1],done:!1};case 5:a.label++,r=i[1],i=[0];continue;case 7:i=a.ops.pop(),a.trys.pop();continue;default:if(!(o=(o=a.trys).length>0&&o[o.length-1])&&(6===i[0]||2===i[0])){a=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]=e.length&&(e=void 0),{value:e&&e[r++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")}function g(e,t){var n="function"===typeof Symbol&&e[Symbol.iterator];if(!n)return e;var r,o,i=n.call(e),a=[];try{for(;(void 0===t||t-- >0)&&!(r=i.next()).done;)a.push(r.value)}catch(s){o={error:s}}finally{try{r&&!r.done&&(n=i.return)&&n.call(i)}finally{if(o)throw o.error}}return a}function y(){for(var e=[],t=0;t1||s(e,t)}))})}function s(e,t){try{!function(e){e.value instanceof v?Promise.resolve(e.value.v).then(u,l):c(i[0][2],e)}(o[e](t))}catch(n){c(i[0][3],n)}}function u(e){s("next",e)}function l(e){s("throw",e)}function c(e,t){e(t),i.shift(),i.length&&s(i[0][0],i[0][1])}}function b(e){var t,n;return t={},r("next"),r("throw",(function(e){throw e})),r("return"),t[Symbol.iterator]=function(){return this},t;function r(r,o){t[r]=e[r]?function(t){return(n=!n)?{value:v(e[r](t)),done:"return"===r}:o?o(t):t}:o}}function j(e){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var t,n=e[Symbol.asyncIterator];return n?n.call(e):(e=h(e),t={},r("next"),r("throw"),r("return"),t[Symbol.asyncIterator]=function(){return this},t);function r(n){t[n]=e[n]&&function(t){return new Promise((function(r,o){(function(e,t,n,r){Promise.resolve(r).then((function(t){e({value:t,done:n})}),t)})(r,o,(t=e[n](t)).done,t.value)}))}}}function w(e,t){return Object.defineProperty?Object.defineProperty(e,"raw",{value:t}):e.raw=t,e}function x(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)Object.hasOwnProperty.call(e,n)&&(t[n]=e[n]);return t.default=e,t}function N(e){return e&&e.__esModule?e:{default:e}}function I(e,t){if(!t.has(e))throw new TypeError("attempted to get private field on non-instance");return t.get(e)}function D(e,t,n){if(!t.has(e))throw new TypeError("attempted to set private field on non-instance");return t.set(e,n),n}},1885:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.convertToBuffer=void 0;var r=n(5863),o="undefined"!==typeof Buffer&&Buffer.from?function(e){return Buffer.from(e,"utf8")}:r.fromUtf8;t.convertToBuffer=function(e){return e instanceof Uint8Array?e:"string"===typeof e?o(e):ArrayBuffer.isView(e)?new Uint8Array(e.buffer,e.byteOffset,e.byteLength/Uint8Array.BYTES_PER_ELEMENT):new Uint8Array(e)}},5302:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.uint32ArrayFrom=t.numToUint8=t.isEmptyData=t.convertToBuffer=void 0;var r=n(1885);Object.defineProperty(t,"convertToBuffer",{enumerable:!0,get:function(){return r.convertToBuffer}});var o=n(4596);Object.defineProperty(t,"isEmptyData",{enumerable:!0,get:function(){return o.isEmptyData}});var i=n(5675);Object.defineProperty(t,"numToUint8",{enumerable:!0,get:function(){return i.numToUint8}});var a=n(2857);Object.defineProperty(t,"uint32ArrayFrom",{enumerable:!0,get:function(){return a.uint32ArrayFrom}})},4596:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.isEmptyData=void 0,t.isEmptyData=function(e){return"string"===typeof e?0===e.length:0===e.byteLength}},5675:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.numToUint8=void 0,t.numToUint8=function(e){return new Uint8Array([(4278190080&e)>>24,(16711680&e)>>16,(65280&e)>>8,255&e])}},2857:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.uint32ArrayFrom=void 0,t.uint32ArrayFrom=function(e){if(!Array.from){for(var t=new Uint32Array(e.length);0>6|192,63&o|128);else if(n+1>18|240,i>>12&63|128,i>>6&63|128,63&i|128)}else t.push(o>>12|224,o>>6&63|128,63&o|128)}return Uint8Array.from(t)}(e)},o=function(e){return"function"===typeof TextDecoder?function(e){return new TextDecoder("utf-8").decode(e)}(e):function(e){for(var t="",n=0,r=e.length;n=a())throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+a().toString(16)+" bytes");return 0|e}function h(e,t){if(u.isBuffer(e))return e.length;if("undefined"!==typeof ArrayBuffer&&"function"===typeof ArrayBuffer.isView&&(ArrayBuffer.isView(e)||e instanceof ArrayBuffer))return e.byteLength;"string"!==typeof e&&(e=""+e);var n=e.length;if(0===n)return 0;for(var r=!1;;)switch(t){case"ascii":case"latin1":case"binary":return n;case"utf8":case"utf-8":case void 0:return F(e).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*n;case"hex":return n>>>1;case"base64":return Y(e).length;default:if(r)return F(e).length;t=(""+t).toLowerCase(),r=!0}}function g(e,t,n){var r=!1;if((void 0===t||t<0)&&(t=0),t>this.length)return"";if((void 0===n||n>this.length)&&(n=this.length),n<=0)return"";if((n>>>=0)<=(t>>>=0))return"";for(e||(e="utf8");;)switch(e){case"hex":return C(this,t,n);case"utf8":case"utf-8":return D(this,t,n);case"ascii":return L(this,t,n);case"latin1":case"binary":return k(this,t,n);case"base64":return I(this,t,n);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return E(this,t,n);default:if(r)throw new TypeError("Unknown encoding: "+e);e=(e+"").toLowerCase(),r=!0}}function y(e,t,n){var r=e[t];e[t]=e[n],e[n]=r}function m(e,t,n,r,o){if(0===e.length)return-1;if("string"===typeof n?(r=n,n=0):n>2147483647?n=2147483647:n<-2147483648&&(n=-2147483648),n=+n,isNaN(n)&&(n=o?0:e.length-1),n<0&&(n=e.length+n),n>=e.length){if(o)return-1;n=e.length-1}else if(n<0){if(!o)return-1;n=0}if("string"===typeof t&&(t=u.from(t,r)),u.isBuffer(t))return 0===t.length?-1:v(e,t,n,r,o);if("number"===typeof t)return t&=255,u.TYPED_ARRAY_SUPPORT&&"function"===typeof Uint8Array.prototype.indexOf?o?Uint8Array.prototype.indexOf.call(e,t,n):Uint8Array.prototype.lastIndexOf.call(e,t,n):v(e,[t],n,r,o);throw new TypeError("val must be string, number or Buffer")}function v(e,t,n,r,o){var i,a=1,s=e.length,u=t.length;if(void 0!==r&&("ucs2"===(r=String(r).toLowerCase())||"ucs-2"===r||"utf16le"===r||"utf-16le"===r)){if(e.length<2||t.length<2)return-1;a=2,s/=2,u/=2,n/=2}function l(e,t){return 1===a?e[t]:e.readUInt16BE(t*a)}if(o){var c=-1;for(i=n;is&&(n=s-u),i=n;i>=0;i--){for(var d=!0,f=0;fo&&(r=o):r=o;var i=t.length;if(i%2!==0)throw new TypeError("Invalid hex string");r>i/2&&(r=i/2);for(var a=0;a>8,o=n%256,i.push(o),i.push(r);return i}(t,e.length-n),e,n,r)}function I(e,t,n){return 0===t&&n===e.length?r.fromByteArray(e):r.fromByteArray(e.slice(t,n))}function D(e,t,n){n=Math.min(e.length,n);for(var r=[],o=t;o239?4:l>223?3:l>191?2:1;if(o+d<=n)switch(d){case 1:l<128&&(c=l);break;case 2:128===(192&(i=e[o+1]))&&(u=(31&l)<<6|63&i)>127&&(c=u);break;case 3:i=e[o+1],a=e[o+2],128===(192&i)&&128===(192&a)&&(u=(15&l)<<12|(63&i)<<6|63&a)>2047&&(u<55296||u>57343)&&(c=u);break;case 4:i=e[o+1],a=e[o+2],s=e[o+3],128===(192&i)&&128===(192&a)&&128===(192&s)&&(u=(15&l)<<18|(63&i)<<12|(63&a)<<6|63&s)>65535&&u<1114112&&(c=u)}null===c?(c=65533,d=1):c>65535&&(c-=65536,r.push(c>>>10&1023|55296),c=56320|1023&c),r.push(c),o+=d}return function(e){var t=e.length;if(t<=S)return String.fromCharCode.apply(String,e);var n="",r=0;for(;r0&&(e=this.toString("hex",0,n).match(/.{2}/g).join(" "),this.length>n&&(e+=" ... ")),""},u.prototype.compare=function(e,t,n,r,o){if(!u.isBuffer(e))throw new TypeError("Argument must be a Buffer");if(void 0===t&&(t=0),void 0===n&&(n=e?e.length:0),void 0===r&&(r=0),void 0===o&&(o=this.length),t<0||n>e.length||r<0||o>this.length)throw new RangeError("out of range index");if(r>=o&&t>=n)return 0;if(r>=o)return-1;if(t>=n)return 1;if(this===e)return 0;for(var i=(o>>>=0)-(r>>>=0),a=(n>>>=0)-(t>>>=0),s=Math.min(i,a),l=this.slice(r,o),c=e.slice(t,n),d=0;do)&&(n=o),e.length>0&&(n<0||t<0)||t>this.length)throw new RangeError("Attempt to write outside buffer bounds");r||(r="utf8");for(var i=!1;;)switch(r){case"hex":return M(this,e,t,n);case"utf8":case"utf-8":return b(this,e,t,n);case"ascii":return j(this,e,t,n);case"latin1":case"binary":return w(this,e,t,n);case"base64":return x(this,e,t,n);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return N(this,e,t,n);default:if(i)throw new TypeError("Unknown encoding: "+r);r=(""+r).toLowerCase(),i=!0}},u.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};var S=4096;function L(e,t,n){var r="";n=Math.min(e.length,n);for(var o=t;or)&&(n=r);for(var o="",i=t;in)throw new RangeError("Trying to access beyond buffer length")}function T(e,t,n,r,o,i){if(!u.isBuffer(e))throw new TypeError('"buffer" argument must be a Buffer instance');if(t>o||te.length)throw new RangeError("Index out of range")}function A(e,t,n,r){t<0&&(t=65535+t+1);for(var o=0,i=Math.min(e.length-n,2);o>>8*(r?o:1-o)}function O(e,t,n,r){t<0&&(t=4294967295+t+1);for(var o=0,i=Math.min(e.length-n,4);o>>8*(r?o:3-o)&255}function z(e,t,n,r,o,i){if(n+r>e.length)throw new RangeError("Index out of range");if(n<0)throw new RangeError("Index out of range")}function U(e,t,n,r,i){return i||z(e,0,n,4),o.write(e,t,n,r,23,4),n+4}function P(e,t,n,r,i){return i||z(e,0,n,8),o.write(e,t,n,r,52,8),n+8}u.prototype.slice=function(e,t){var n,r=this.length;if((e=~~e)<0?(e+=r)<0&&(e=0):e>r&&(e=r),(t=void 0===t?r:~~t)<0?(t+=r)<0&&(t=0):t>r&&(t=r),t0&&(o*=256);)r+=this[e+--t]*o;return r},u.prototype.readUInt8=function(e,t){return t||_(e,1,this.length),this[e]},u.prototype.readUInt16LE=function(e,t){return t||_(e,2,this.length),this[e]|this[e+1]<<8},u.prototype.readUInt16BE=function(e,t){return t||_(e,2,this.length),this[e]<<8|this[e+1]},u.prototype.readUInt32LE=function(e,t){return t||_(e,4,this.length),(this[e]|this[e+1]<<8|this[e+2]<<16)+16777216*this[e+3]},u.prototype.readUInt32BE=function(e,t){return t||_(e,4,this.length),16777216*this[e]+(this[e+1]<<16|this[e+2]<<8|this[e+3])},u.prototype.readIntLE=function(e,t,n){e|=0,t|=0,n||_(e,t,this.length);for(var r=this[e],o=1,i=0;++i=(o*=128)&&(r-=Math.pow(2,8*t)),r},u.prototype.readIntBE=function(e,t,n){e|=0,t|=0,n||_(e,t,this.length);for(var r=t,o=1,i=this[e+--r];r>0&&(o*=256);)i+=this[e+--r]*o;return i>=(o*=128)&&(i-=Math.pow(2,8*t)),i},u.prototype.readInt8=function(e,t){return t||_(e,1,this.length),128&this[e]?-1*(255-this[e]+1):this[e]},u.prototype.readInt16LE=function(e,t){t||_(e,2,this.length);var n=this[e]|this[e+1]<<8;return 32768&n?4294901760|n:n},u.prototype.readInt16BE=function(e,t){t||_(e,2,this.length);var n=this[e+1]|this[e]<<8;return 32768&n?4294901760|n:n},u.prototype.readInt32LE=function(e,t){return t||_(e,4,this.length),this[e]|this[e+1]<<8|this[e+2]<<16|this[e+3]<<24},u.prototype.readInt32BE=function(e,t){return t||_(e,4,this.length),this[e]<<24|this[e+1]<<16|this[e+2]<<8|this[e+3]},u.prototype.readFloatLE=function(e,t){return t||_(e,4,this.length),o.read(this,e,!0,23,4)},u.prototype.readFloatBE=function(e,t){return t||_(e,4,this.length),o.read(this,e,!1,23,4)},u.prototype.readDoubleLE=function(e,t){return t||_(e,8,this.length),o.read(this,e,!0,52,8)},u.prototype.readDoubleBE=function(e,t){return t||_(e,8,this.length),o.read(this,e,!1,52,8)},u.prototype.writeUIntLE=function(e,t,n,r){(e=+e,t|=0,n|=0,r)||T(this,e,t,n,Math.pow(2,8*n)-1,0);var o=1,i=0;for(this[t]=255&e;++i=0&&(i*=256);)this[t+o]=e/i&255;return t+n},u.prototype.writeUInt8=function(e,t,n){return e=+e,t|=0,n||T(this,e,t,1,255,0),u.TYPED_ARRAY_SUPPORT||(e=Math.floor(e)),this[t]=255&e,t+1},u.prototype.writeUInt16LE=function(e,t,n){return e=+e,t|=0,n||T(this,e,t,2,65535,0),u.TYPED_ARRAY_SUPPORT?(this[t]=255&e,this[t+1]=e>>>8):A(this,e,t,!0),t+2},u.prototype.writeUInt16BE=function(e,t,n){return e=+e,t|=0,n||T(this,e,t,2,65535,0),u.TYPED_ARRAY_SUPPORT?(this[t]=e>>>8,this[t+1]=255&e):A(this,e,t,!1),t+2},u.prototype.writeUInt32LE=function(e,t,n){return e=+e,t|=0,n||T(this,e,t,4,4294967295,0),u.TYPED_ARRAY_SUPPORT?(this[t+3]=e>>>24,this[t+2]=e>>>16,this[t+1]=e>>>8,this[t]=255&e):O(this,e,t,!0),t+4},u.prototype.writeUInt32BE=function(e,t,n){return e=+e,t|=0,n||T(this,e,t,4,4294967295,0),u.TYPED_ARRAY_SUPPORT?(this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e):O(this,e,t,!1),t+4},u.prototype.writeIntLE=function(e,t,n,r){if(e=+e,t|=0,!r){var o=Math.pow(2,8*n-1);T(this,e,t,n,o-1,-o)}var i=0,a=1,s=0;for(this[t]=255&e;++i>0)-s&255;return t+n},u.prototype.writeIntBE=function(e,t,n,r){if(e=+e,t|=0,!r){var o=Math.pow(2,8*n-1);T(this,e,t,n,o-1,-o)}var i=n-1,a=1,s=0;for(this[t+i]=255&e;--i>=0&&(a*=256);)e<0&&0===s&&0!==this[t+i+1]&&(s=1),this[t+i]=(e/a>>0)-s&255;return t+n},u.prototype.writeInt8=function(e,t,n){return e=+e,t|=0,n||T(this,e,t,1,127,-128),u.TYPED_ARRAY_SUPPORT||(e=Math.floor(e)),e<0&&(e=255+e+1),this[t]=255&e,t+1},u.prototype.writeInt16LE=function(e,t,n){return e=+e,t|=0,n||T(this,e,t,2,32767,-32768),u.TYPED_ARRAY_SUPPORT?(this[t]=255&e,this[t+1]=e>>>8):A(this,e,t,!0),t+2},u.prototype.writeInt16BE=function(e,t,n){return e=+e,t|=0,n||T(this,e,t,2,32767,-32768),u.TYPED_ARRAY_SUPPORT?(this[t]=e>>>8,this[t+1]=255&e):A(this,e,t,!1),t+2},u.prototype.writeInt32LE=function(e,t,n){return e=+e,t|=0,n||T(this,e,t,4,2147483647,-2147483648),u.TYPED_ARRAY_SUPPORT?(this[t]=255&e,this[t+1]=e>>>8,this[t+2]=e>>>16,this[t+3]=e>>>24):O(this,e,t,!0),t+4},u.prototype.writeInt32BE=function(e,t,n){return e=+e,t|=0,n||T(this,e,t,4,2147483647,-2147483648),e<0&&(e=4294967295+e+1),u.TYPED_ARRAY_SUPPORT?(this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e):O(this,e,t,!1),t+4},u.prototype.writeFloatLE=function(e,t,n){return U(this,e,t,!0,n)},u.prototype.writeFloatBE=function(e,t,n){return U(this,e,t,!1,n)},u.prototype.writeDoubleLE=function(e,t,n){return P(this,e,t,!0,n)},u.prototype.writeDoubleBE=function(e,t,n){return P(this,e,t,!1,n)},u.prototype.copy=function(e,t,n,r){if(n||(n=0),r||0===r||(r=this.length),t>=e.length&&(t=e.length),t||(t=0),r>0&&r=this.length)throw new RangeError("sourceStart out of bounds");if(r<0)throw new RangeError("sourceEnd out of bounds");r>this.length&&(r=this.length),e.length-t=0;--o)e[o+t]=this[o+n];else if(i<1e3||!u.TYPED_ARRAY_SUPPORT)for(o=0;o>>=0,n=void 0===n?this.length:n>>>0,e||(e=0),"number"===typeof e)for(i=t;i55295&&n<57344){if(!o){if(n>56319){(t-=3)>-1&&i.push(239,191,189);continue}if(a+1===r){(t-=3)>-1&&i.push(239,191,189);continue}o=n;continue}if(n<56320){(t-=3)>-1&&i.push(239,191,189),o=n;continue}n=65536+(o-55296<<10|n-56320)}else o&&(t-=3)>-1&&i.push(239,191,189);if(o=null,n<128){if((t-=1)<0)break;i.push(n)}else if(n<2048){if((t-=2)<0)break;i.push(n>>6|192,63&n|128)}else if(n<65536){if((t-=3)<0)break;i.push(n>>12|224,n>>6&63|128,63&n|128)}else{if(!(n<1114112))throw new Error("Invalid code point");if((t-=4)<0)break;i.push(n>>18|240,n>>12&63|128,n>>6&63|128,63&n|128)}}return i}function Y(e){return r.toByteArray(function(e){if((e=function(e){return e.trim?e.trim():e.replace(/^\s+|\s+$/g,"")}(e).replace(R,"")).length<2)return"";for(;e.length%4!==0;)e+="=";return e}(e))}function Q(e,t,n,r){for(var o=0;o=t.length||o>=e.length);++o)t[o+n]=e[o];return o}},9566:function(e,t,n){"use strict";n.r(t),n.d(t,{Authentication:function(){return Er},Management:function(){return _r},WebAuth:function(){return Lr},version:function(){return Jt}});var r="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof n.g?n.g:"undefined"!=typeof self?self:{};function o(e,t){return e(t={exports:{}},t.exports),t.exports}var i=o((function(e){var t,n;t=r,n=function(){function e(e){var t=[];if(0===e.length)return"";if("string"!=typeof e[0])throw new TypeError("Url must be a string. Received "+e[0]);if(e[0].match(/^[^/:]+:\/*$/)&&e.length>1){var n=e.shift();e[0]=n+e[0]}e[0].match(/^file:\/\/\//)?e[0]=e[0].replace(/^([^/:]+):\/*/,"$1:///"):e[0]=e[0].replace(/^([^/:]+):\/*/,"$1://");for(var r=0;r0&&(o=o.replace(/^[\/]+/,"")),o=r0?"?":"")+a.join("&")}return function(){return e("object"==typeof arguments[0]?arguments[0]:[].slice.call(arguments))}},e.exports?e.exports=n():t.urljoin=n()})),a="undefined"!=typeof Symbol&&Symbol,s="Function.prototype.bind called on incompatible ",u=Array.prototype.slice,l=Object.prototype.toString,c=Function.prototype.bind||function(e){var t=this;if("function"!=typeof t||"[object Function]"!==l.call(t))throw new TypeError(s+t);for(var n,r=u.call(arguments,1),o=function(){if(this instanceof n){var o=t.apply(this,r.concat(u.call(arguments)));return Object(o)===o?o:this}return t.apply(e,r.concat(u.call(arguments)))},i=Math.max(0,t.length-r.length),a=[],c=0;c1&&"boolean"!=typeof t)throw new h('"allowMissing" argument must be a boolean');if(null===k(/^%?[^%]*%?$/g,e))throw new f("`%` may not be present anywhere but at the beginning and end of the intrinsic name");var n=_(e),r=n.length>0?n[0]:"",o=T("%"+r+"%",t),i=o.name,a=o.value,s=!1,u=o.alias;u&&(r=u[0],D(n,I([0,1],u)));for(var l=1,c=!0;l=n.length){var v=y(a,p);a=(c=!!v)&&"get"in v&&!("originalValue"in v.get)?v.get:a[p]}else c=d(a,p),a=a[p];c&&!s&&(x[i]=a)}}return a},O=o((function(e){var t=A("%Function.prototype.apply%"),n=A("%Function.prototype.call%"),r=A("%Reflect.apply%",!0)||c.call(n,t),o=A("%Object.getOwnPropertyDescriptor%",!0),i=A("%Object.defineProperty%",!0),a=A("%Math.max%");if(i)try{i({},"a",{value:1})}catch(_n){i=null}e.exports=function(e){var t=r(c,n,arguments);if(o&&i){var s=o(t,"length");s.configurable&&i(t,"length",{value:1+a(0,e.length-(arguments.length-1))})}return t};var s=function(){return r(c,t,arguments)};i?i(e.exports,"apply",{value:s}):e.exports.apply=s})),z=(O.apply,O(A("String.prototype.indexOf"))),U=function(e,t){var n=A(e,!!t);return"function"==typeof n&&z(e,".prototype.")>-1?O(n):n},P=function(e){return e&&e.default||e}(Object.freeze({__proto__:null,default:{}})),R="function"==typeof Map&&Map.prototype,B=Object.getOwnPropertyDescriptor&&R?Object.getOwnPropertyDescriptor(Map.prototype,"size"):null,F=R&&B&&"function"==typeof B.get?B.get:null,Y=R&&Map.prototype.forEach,Q="function"==typeof Set&&Set.prototype,G=Object.getOwnPropertyDescriptor&&Q?Object.getOwnPropertyDescriptor(Set.prototype,"size"):null,W=Q&&G&&"function"==typeof G.get?G.get:null,H=Q&&Set.prototype.forEach,Z="function"==typeof WeakMap&&WeakMap.prototype?WeakMap.prototype.has:null,V="function"==typeof WeakSet&&WeakSet.prototype?WeakSet.prototype.has:null,q="function"==typeof WeakRef&&WeakRef.prototype?WeakRef.prototype.deref:null,J=Boolean.prototype.valueOf,K=Object.prototype.toString,X=Function.prototype.toString,$=String.prototype.match,ee=String.prototype.slice,te=String.prototype.replace,ne=String.prototype.toUpperCase,re=String.prototype.toLowerCase,oe=RegExp.prototype.test,ie=Array.prototype.concat,ae=Array.prototype.join,se=Array.prototype.slice,ue=Math.floor,le="function"==typeof BigInt?BigInt.prototype.valueOf:null,ce=Object.getOwnPropertySymbols,de="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?Symbol.prototype.toString:null,fe="function"==typeof Symbol&&"object"==typeof Symbol.iterator,pe="function"==typeof Symbol&&Symbol.toStringTag&&(Symbol.toStringTag,1)?Symbol.toStringTag:null,he=Object.prototype.propertyIsEnumerable,ge=("function"==typeof Reflect?Reflect.getPrototypeOf:Object.getPrototypeOf)||([].__proto__===Array.prototype?function(e){return e.__proto__}:null);function ye(e,t){if(e===1/0||e===-1/0||e!=e||e&&e>-1e3&&e<1e3||oe.call(/e/,t))return t;var n=/[0-9](?=(?:[0-9]{3})+(?![0-9]))/g;if("number"==typeof e){var r=e<0?-ue(-e):ue(e);if(r!==e){var o=String(r),i=ee.call(t,o.length+1);return te.call(o,n,"$&_")+"."+te.call(te.call(i,/([0-9]{3})/g,"$&_"),/_$/,"")}}return te.call(t,n,"$&_")}var me=P.custom,ve=Ne(me)?me:null,Me=function e(t,n,r,o){var i=n||{};if(De(i,"quoteStyle")&&"single"!==i.quoteStyle&&"double"!==i.quoteStyle)throw new TypeError('option "quoteStyle" must be "single" or "double"');if(De(i,"maxStringLength")&&("number"==typeof i.maxStringLength?i.maxStringLength<0&&i.maxStringLength!==1/0:null!==i.maxStringLength))throw new TypeError('option "maxStringLength", if provided, must be a positive integer, Infinity, or `null`');var a=!De(i,"customInspect")||i.customInspect;if("boolean"!=typeof a&&"symbol"!==a)throw new TypeError("option \"customInspect\", if provided, must be `true`, `false`, or `'symbol'`");if(De(i,"indent")&&null!==i.indent&&"\t"!==i.indent&&!(parseInt(i.indent,10)===i.indent&&i.indent>0))throw new TypeError('option "indent" must be "\\t", an integer > 0, or `null`');if(De(i,"numericSeparator")&&"boolean"!=typeof i.numericSeparator)throw new TypeError('option "numericSeparator", if provided, must be `true` or `false`');var s=i.numericSeparator;if(void 0===t)return"undefined";if(null===t)return"null";if("boolean"==typeof t)return t?"true":"false";if("string"==typeof t)return function e(t,n){if(t.length>n.maxStringLength){var r=t.length-n.maxStringLength,o="... "+r+" more character"+(r>1?"s":"");return e(ee.call(t,0,n.maxStringLength),n)+o}return be(te.call(te.call(t,/(['\\])/g,"\\$1"),/[\x00-\x1f]/g,ke),"single",n)}(t,i);if("number"==typeof t){if(0===t)return 1/0/t>0?"0":"-0";var u=String(t);return s?ye(t,u):u}if("bigint"==typeof t){var l=String(t)+"n";return s?ye(t,l):l}var c=void 0===i.depth?5:i.depth;if(void 0===r&&(r=0),r>=c&&c>0&&"object"==typeof t)return we(t)?"[Array]":"[Object]";var d=function(e,t){var n;if("\t"===e.indent)n="\t";else{if(!("number"==typeof e.indent&&e.indent>0))return null;n=ae.call(Array(e.indent+1)," ")}return{base:n,prev:ae.call(Array(t+1),n)}}(i,r);if(void 0===o)o=[];else if(Le(o,t)>=0)return"[Circular]";function f(t,n,a){if(n&&(o=se.call(o)).push(n),a){var s={depth:i.depth};return De(i,"quoteStyle")&&(s.quoteStyle=i.quoteStyle),e(t,s,r+1,o)}return e(t,i,r+1,o)}if("function"==typeof t&&!xe(t)){var p=function(e){if(e.name)return e.name;var t=$.call(X.call(e),/^function\s*([\w$]+)/);return t?t[1]:null}(t),h=Ae(t,f);return"[Function"+(p?": "+p:" (anonymous)")+"]"+(h.length>0?" { "+ae.call(h,", ")+" }":"")}if(Ne(t)){var g=fe?te.call(String(t),/^(Symbol\(.*\))_[^)]*$/,"$1"):de.call(t);return"object"!=typeof t||fe?g:Ce(g)}if(function(e){return!(!e||"object"!=typeof e)&&("undefined"!=typeof HTMLElement&&e instanceof HTMLElement||"string"==typeof e.nodeName&&"function"==typeof e.getAttribute)}(t)){for(var y="<"+re.call(String(t.nodeName)),m=t.attributes||[],v=0;v"}if(we(t)){if(0===t.length)return"[]";var M=Ae(t,f);return d&&!function(e){for(var t=0;t=0)return!1;return!0}(M)?"["+Te(M,d)+"]":"[ "+ae.call(M,", ")+" ]"}if(function(e){return!("[object Error]"!==Se(e)||pe&&"object"==typeof e&&pe in e)}(t)){var b=Ae(t,f);return"cause"in Error.prototype||!("cause"in t)||he.call(t,"cause")?0===b.length?"["+String(t)+"]":"{ ["+String(t)+"] "+ae.call(b,", ")+" }":"{ ["+String(t)+"] "+ae.call(ie.call("[cause]: "+f(t.cause),b),", ")+" }"}if("object"==typeof t&&a){if(ve&&"function"==typeof t[ve]&&P)return P(t,{depth:c-r});if("symbol"!==a&&"function"==typeof t.inspect)return t.inspect()}if(function(e){if(!F||!e||"object"!=typeof e)return!1;try{F.call(e);try{W.call(e)}catch(y){return!0}return e instanceof Map}catch(_n){}return!1}(t)){var j=[];return Y.call(t,(function(e,n){j.push(f(n,t,!0)+" => "+f(e,t))})),_e("Map",F.call(t),j,d)}if(function(e){if(!W||!e||"object"!=typeof e)return!1;try{W.call(e);try{F.call(e)}catch(Hn){return!0}return e instanceof Set}catch(_n){}return!1}(t)){var w=[];return H.call(t,(function(e){w.push(f(e,t))})),_e("Set",W.call(t),w,d)}if(function(e){if(!Z||!e||"object"!=typeof e)return!1;try{Z.call(e,Z);try{V.call(e,V)}catch(y){return!0}return e instanceof WeakMap}catch(_n){}return!1}(t))return Ee("WeakMap");if(function(e){if(!V||!e||"object"!=typeof e)return!1;try{V.call(e,V);try{Z.call(e,Z)}catch(y){return!0}return e instanceof WeakSet}catch(_n){}return!1}(t))return Ee("WeakSet");if(function(e){if(!q||!e||"object"!=typeof e)return!1;try{return q.call(e),!0}catch(_n){}return!1}(t))return Ee("WeakRef");if(function(e){return!("[object Number]"!==Se(e)||pe&&"object"==typeof e&&pe in e)}(t))return Ce(f(Number(t)));if(function(e){if(!e||"object"!=typeof e||!le)return!1;try{return le.call(e),!0}catch(_n){}return!1}(t))return Ce(f(le.call(t)));if(function(e){return!("[object Boolean]"!==Se(e)||pe&&"object"==typeof e&&pe in e)}(t))return Ce(J.call(t));if(function(e){return!("[object String]"!==Se(e)||pe&&"object"==typeof e&&pe in e)}(t))return Ce(f(String(t)));if(!function(e){return!("[object Date]"!==Se(e)||pe&&"object"==typeof e&&pe in e)}(t)&&!xe(t)){var x=Ae(t,f),N=ge?ge(t)===Object.prototype:t instanceof Object||t.constructor===Object,I=t instanceof Object?"":"null prototype",D=!N&&pe&&Object(t)===t&&pe in t?ee.call(Se(t),8,-1):I?"Object":"",S=(N||"function"!=typeof t.constructor?"":t.constructor.name?t.constructor.name+" ":"")+(D||I?"["+ae.call(ie.call([],D||[],I||[]),": ")+"] ":"");return 0===x.length?S+"{}":d?S+"{"+Te(x,d)+"}":S+"{ "+ae.call(x,", ")+" }"}return String(t)};function be(e,t,n){var r="double"===(n.quoteStyle||t)?'"':"'";return r+e+r}function je(e){return te.call(String(e),/"/g,""")}function we(e){return!("[object Array]"!==Se(e)||pe&&"object"==typeof e&&pe in e)}function xe(e){return!("[object RegExp]"!==Se(e)||pe&&"object"==typeof e&&pe in e)}function Ne(e){if(fe)return e&&"object"==typeof e&&e instanceof Symbol;if("symbol"==typeof e)return!0;if(!e||"object"!=typeof e||!de)return!1;try{return de.call(e),!0}catch(_n){}return!1}var Ie=Object.prototype.hasOwnProperty||function(e){return e in this};function De(e,t){return Ie.call(e,t)}function Se(e){return K.call(e)}function Le(e,t){if(e.indexOf)return e.indexOf(t);for(var n=0,r=e.length;n1;){var t=e.pop(),n=t.obj[t.prop];if(Ke(n)){for(var r=[],o=0;o=48&&u<=57||u>=65&&u<=90||u>=97&&u<=122||o===qe.RFC1738&&(40===u||41===u)?a+=i.charAt(s):u<128?a+=Xe[u]:u<2048?a+=Xe[192|u>>6]+Xe[128|63&u]:u<55296||u>=57344?a+=Xe[224|u>>12]+Xe[128|u>>6&63]+Xe[128|63&u]:(s+=1,u=65536+((1023&u)<<10|1023&i.charCodeAt(s)),a+=Xe[240|u>>18]+Xe[128|u>>12&63]+Xe[128|u>>6&63]+Xe[128|63&u])}return a},isBuffer:function(e){return!(!e||"object"!=typeof e)&&!!(e.constructor&&e.constructor.isBuffer&&e.constructor.isBuffer(e))},isRegExp:function(e){return"[object RegExp]"===Object.prototype.toString.call(e)},maybeMap:function(e,t){if(Ke(e)){for(var n=[],r=0;r0?m.join(",")||null:void 0}];else if(rt(u))D=u;else{var L=Object.keys(m);D=l?L.sort(l):L}for(var k=o&&rt(m)&&1===m.length?n+"[]":n,C=0;C-1?e.split(","):e},mt=function(e,t,n,r){if(e){var o=n.allowDots?e.replace(/\.([^.[]+)/g,"[$1]"):e,i=/(\[[^[\]]*])/g,a=n.depth>0&&/(\[[^[\]]*])/.exec(o),s=a?o.slice(0,a.index):o,u=[];if(s){if(!n.plainObjects&&ft.call(Object.prototype,s)&&!n.allowPrototypes)return;u.push(s)}for(var l=0;n.depth>0&&null!==(a=i.exec(o))&&l=0;--i){var a,s=e[i];if("[]"===s&&n.parseArrays)a=[].concat(o);else{a=n.plainObjects?Object.create(null):{};var u="["===s.charAt(0)&&"]"===s.charAt(s.length-1)?s.slice(1,-1):s,l=parseInt(u,10);n.parseArrays||""!==u?!isNaN(l)&&s!==u&&String(l)===u&&l>=0&&n.parseArrays&&l<=n.arrayLimit?(a=[])[l]=o:"__proto__"!==u&&(a[u]=o):a={0:o}}o=a}return o}(u,t,n,r)}},vt=function(e,t){var n,r=e,o=function(e){if(!e)return lt;if(null!==e.encoder&&void 0!==e.encoder&&"function"!=typeof e.encoder)throw new TypeError("Encoder has to be a function.");var t=e.charset||lt.charset;if(void 0!==e.charset&&"utf-8"!==e.charset&&"iso-8859-1"!==e.charset)throw new TypeError("The charset option must be either utf-8, iso-8859-1, or undefined");var n=qe.default;if(void 0!==e.format){if(!tt.call(qe.formatters,e.format))throw new TypeError("Unknown format option provided.");n=e.format}var r=qe.formatters[n],o=lt.filter;return("function"==typeof e.filter||rt(e.filter))&&(o=e.filter),{addQueryPrefix:"boolean"==typeof e.addQueryPrefix?e.addQueryPrefix:lt.addQueryPrefix,allowDots:void 0===e.allowDots?lt.allowDots:!!e.allowDots,charset:t,charsetSentinel:"boolean"==typeof e.charsetSentinel?e.charsetSentinel:lt.charsetSentinel,delimiter:void 0===e.delimiter?lt.delimiter:e.delimiter,encode:"boolean"==typeof e.encode?e.encode:lt.encode,encoder:"function"==typeof e.encoder?e.encoder:lt.encoder,encodeValuesOnly:"boolean"==typeof e.encodeValuesOnly?e.encodeValuesOnly:lt.encodeValuesOnly,filter:o,format:n,formatter:r,serializeDate:"function"==typeof e.serializeDate?e.serializeDate:lt.serializeDate,skipNulls:"boolean"==typeof e.skipNulls?e.skipNulls:lt.skipNulls,sort:"function"==typeof e.sort?e.sort:null,strictNullHandling:"boolean"==typeof e.strictNullHandling?e.strictNullHandling:lt.strictNullHandling}}(t);"function"==typeof o.filter?r=(0,o.filter)("",r):rt(o.filter)&&(n=o.filter);var i,a=[];if("object"!=typeof r||null===r)return"";i=t&&t.arrayFormat in nt?t.arrayFormat:t&&"indices"in t?t.indices?"indices":"repeat":"indices";var s=nt[i];if(t&&"commaRoundTrip"in t&&"boolean"!=typeof t.commaRoundTrip)throw new TypeError("`commaRoundTrip` must be a boolean, or absent");var u="comma"===s&&t&&t.commaRoundTrip;n||(n=Object.keys(r)),o.sort&&n.sort(o.sort);for(var l=We(),c=0;c0?p+f:""},Mt=o((function(e){function t(e){if(e)return function(e){for(var n in t.prototype)e[n]=t.prototype[n];return e}(e)}e.exports=t,t.prototype.on=t.prototype.addEventListener=function(e,t){return this._callbacks=this._callbacks||{},(this._callbacks["$"+e]=this._callbacks["$"+e]||[]).push(t),this},t.prototype.once=function(e,t){function n(){this.off(e,n),t.apply(this,arguments)}return n.fn=t,this.on(e,n),this},t.prototype.off=t.prototype.removeListener=t.prototype.removeAllListeners=t.prototype.removeEventListener=function(e,t){if(this._callbacks=this._callbacks||{},0==arguments.length)return this._callbacks={},this;var n,r=this._callbacks["$"+e];if(!r)return this;if(1==arguments.length)return delete this._callbacks["$"+e],this;for(var o=0;os.depthLimit)return void It("[...]",t,n,i);if(void 0!==s.edgesLimit&&r+1>s.edgesLimit)return void It("[...]",t,n,i);if(o.push(t),Array.isArray(t))for(u=0;ut?1:0}function St(e,t,n,r){void 0===r&&(r=xt());var o,i=function e(t,n,r,o,i,a,s){var u;if(a+=1,"object"==typeof t&&null!==t){for(u=0;us.depthLimit)return void It("[...]",t,n,i);if(void 0!==s.edgesLimit&&r+1>s.edgesLimit)return void It("[...]",t,n,i);if(o.push(t),Array.isArray(t))for(u=0;u0)for(var r=0;r=this._maxRetries)return!1;if(this._retryCallback)try{var n=this._retryCallback(e,t);if(!0===n)return!0;if(!1===n)return!1}catch(r){console.error(r)}if(t&&t.status&&t.status>=500&&501!==t.status)return!0;if(e){if(e.code&&At.includes(e.code))return!0;if(e.timeout&&"ECONNABORTED"===e.code)return!0;if(e.crossDomain)return!0}return!1},Tt.prototype._retry=function(){return this.clearTimeout(),this.req&&(this.req=null,this.req=this.request()),this._aborted=!1,this.timedout=!1,this.timedoutError=null,this._end()},Tt.prototype.then=function(e,t){var n=this;if(!this._fullfilledPromise){var r=this;this._endCalled&&console.warn("Warning: superagent request was sent twice, because both .end() and .then() were called. Never call .end() if you use promises"),this._fullfilledPromise=new Promise((function(e,t){r.on("abort",(function(){if(!(n._maxRetries&&n._maxRetries>n._retries))if(n.timedout&&n.timedoutError)t(n.timedoutError);else{var e=new Error("Aborted");e.code="ABORTED",e.status=n.status,e.method=n.method,e.url=n.url,t(e)}})),r.end((function(n,r){n?t(n):e(r)}))}))}return this._fullfilledPromise.then(e,t)},Tt.prototype.catch=function(e){return this.then(void 0,e)},Tt.prototype.use=function(e){return e(this),this},Tt.prototype.ok=function(e){if("function"!=typeof e)throw new Error("Callback required");return this._okCallback=e,this},Tt.prototype._isResponseOK=function(e){return!!e&&(this._okCallback?this._okCallback(e):e.status>=200&&e.status<300)},Tt.prototype.get=function(e){return this._header[e.toLowerCase()]},Tt.prototype.getHeader=Tt.prototype.get,Tt.prototype.set=function(e,t){if(Ct(e)){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&this.set(n,e[n]);return this}return this._header[e.toLowerCase()]=t,this.header[e]=t,this},Tt.prototype.unset=function(e){return delete this._header[e.toLowerCase()],delete this.header[e],this},Tt.prototype.field=function(e,t){if(null==e)throw new Error(".field(name, val) name can not be empty");if(this._data)throw new Error(".field() can't be used if .send() is used. Please use only .send() or only .field() & .attach()");if(Ct(e)){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&this.field(n,e[n]);return this}if(Array.isArray(t)){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&this.field(e,t[r]);return this}if(null==t)throw new Error(".field(name, val) val can not be empty");return"boolean"==typeof t&&(t=String(t)),this._getFormData().append(e,t),this},Tt.prototype.abort=function(){return this._aborted||(this._aborted=!0,this.xhr&&this.xhr.abort(),this.req&&this.req.abort(),this.clearTimeout(),this.emit("abort")),this},Tt.prototype._auth=function(e,t,n,r){switch(n.type){case"basic":this.set("Authorization","Basic ".concat(r("".concat(e,":").concat(t))));break;case"auto":this.username=e,this.password=t;break;case"bearer":this.set("Authorization","Bearer ".concat(e))}return this},Tt.prototype.withCredentials=function(e){return void 0===e&&(e=!0),this._withCredentials=e,this},Tt.prototype.redirects=function(e){return this._maxRedirects=e,this},Tt.prototype.maxResponseSize=function(e){if("number"!=typeof e)throw new TypeError("Invalid argument");return this._maxResponseSize=e,this},Tt.prototype.toJSON=function(){return{method:this.method,url:this.url,data:this._data,headers:this._header}},Tt.prototype.send=function(e){var t=Ct(e),n=this._header["content-type"];if(this._formData)throw new Error(".send() can't be used if .attach() or .field() is used. Please use only .send() or only .field() & .attach()");if(t&&!this._data)Array.isArray(e)?this._data=[]:this._isHost(e)||(this._data={});else if(e&&this._data&&this._isHost(this._data))throw new Error("Can't merge these send calls");if(t&&Ct(this._data))for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(this._data[r]=e[r]);else"string"==typeof e?(n||this.type("form"),n=this._header["content-type"],this._data="application/x-www-form-urlencoded"===n?this._data?"".concat(this._data,"&").concat(e):e:(this._data||"")+e):this._data=e;return!t||this._isHost(e)||n||this.type("json"),this},Tt.prototype.sortQuery=function(e){return this._sort=void 0===e||e,this},Tt.prototype._finalizeQueryString=function(){var e=this._query.join("&");if(e&&(this.url+=(this.url.includes("?")?"&":"?")+e),this._query.length=0,this._sort){var t=this.url.indexOf("?");if(t>=0){var n=this.url.slice(t+1).split("&");"function"==typeof this._sort?n.sort(this._sort):n.sort(),this.url=this.url.slice(0,t)+"?"+n.join("&")}}},Tt.prototype._appendQueryString=function(){console.warn("Unsupported")},Tt.prototype._timeoutError=function(e,t,n){if(!this._aborted){var r=new Error("".concat(e+t,"ms exceeded"));r.timeout=t,r.code="ECONNABORTED",r.errno=n,this.timedout=!0,this.timedoutError=r,this.abort(),this.callback(r)}},Tt.prototype._setTimeouts=function(){var e=this;this._timeout&&!this._timer&&(this._timer=setTimeout((function(){e._timeoutError("Timeout of ",e._timeout,"ETIME")}),this._timeout)),this._responseTimeout&&!this._responseTimeoutTimer&&(this._responseTimeoutTimer=setTimeout((function(){e._timeoutError("Response timeout of ",e._responseTimeout,"ETIMEDOUT")}),this._responseTimeout))};var Ot=zt;function zt(e){if(e)return function(e){for(var t in zt.prototype)Object.prototype.hasOwnProperty.call(zt.prototype,t)&&(e[t]=zt.prototype[t]);return e}(e)}function Ut(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n0||e instanceof Object)?t(e):null)},d.prototype.toError=function(){var e=this.req,t=e.method,n=e.url,r="cannot ".concat(t," ").concat(n," (").concat(this.status,")"),o=new Error(r);return o.status=this.status,o.method=t,o.url=n,o},i.Response=d,Mt(f.prototype),_t(f.prototype),f.prototype.type=function(e){return this.set("Content-Type",i.types[e]||e),this},f.prototype.accept=function(e){return this.set("Accept",i.types[e]||e),this},f.prototype.auth=function(e,t,r){1===arguments.length&&(t=""),"object"===n(t)&&null!==t&&(r=t,t=""),r||(r={type:"function"==typeof btoa?"basic":"auto"});var o=function(e){if("function"==typeof btoa)return btoa(e);throw new Error("Cannot use basic auth, btoa is not a function")};return this._auth(e,t,r,o)},f.prototype.query=function(e){return"string"!=typeof e&&(e=s(e)),e&&this._query.push(e),this},f.prototype.attach=function(e,t,n){if(t){if(this._data)throw new Error("superagent can't mix .send() and .attach()");this._getFormData().append(e,t,n||t.name)}return this},f.prototype._getFormData=function(){return this._formData||(this._formData=new r.FormData),this._formData},f.prototype.callback=function(e,t){if(this._shouldRetry(e,t))return this._retry();var n=this._callback;this.clearTimeout(),e&&(this._maxRetries&&(e.retries=this._retries-1),this.emit("error",e)),n(e,t)},f.prototype.crossDomainError=function(){var e=new Error("Request has been terminated\nPossible causes: the network is offline, Origin is not allowed by Access-Control-Allow-Origin, the page is being unloaded, etc.");e.crossDomain=!0,e.status=this.status,e.method=this.method,e.url=this.url,this.callback(e)},f.prototype.agent=function(){return console.warn("This is not supported in browser version of superagent"),this},f.prototype.ca=f.prototype.agent,f.prototype.buffer=f.prototype.ca,f.prototype.write=function(){throw new Error("Streaming is not supported in browser version of superagent")},f.prototype.pipe=f.prototype.write,f.prototype._isHost=function(e){return e&&"object"===n(e)&&!Array.isArray(e)&&"[object Object]"!==Object.prototype.toString.call(e)},f.prototype.end=function(e){this._endCalled&&console.warn("Warning: .end() was called twice. This is not supported in superagent"),this._endCalled=!0,this._callback=e||o,this._finalizeQueryString(),this._end()},f.prototype._setUploadTimeout=function(){var e=this;this._uploadTimeout&&!this._uploadTimeoutTimer&&(this._uploadTimeoutTimer=setTimeout((function(){e._timeoutError("Upload timeout of ",e._uploadTimeout,"ETIMEDOUT")}),this._uploadTimeout))},f.prototype._end=function(){if(this._aborted)return this.callback(new Error("The request has been aborted even before .end() was called"));var e=this;this.xhr=i.getXHR();var t=this.xhr,n=this._formData||this._data;this._setTimeouts(),t.onreadystatechange=function(){var n=t.readyState;if(n>=2&&e._responseTimeoutTimer&&clearTimeout(e._responseTimeoutTimer),4===n){var r;try{r=t.status}catch(o){r=0}if(!r){if(e.timedout||e._aborted)return;return e.crossDomainError()}e.emit("end")}};var r=function(t,n){n.total>0&&(n.percent=n.loaded/n.total*100,100===n.percent&&clearTimeout(e._uploadTimeoutTimer)),n.direction=t,e.emit("progress",n)};if(this.hasListeners("progress"))try{t.addEventListener("progress",r.bind(null,"download")),t.upload&&t.upload.addEventListener("progress",r.bind(null,"upload"))}catch(u){}t.upload&&this._setUploadTimeout();try{this.username&&this.password?t.open(this.method,this.url,!0,this.username,this.password):t.open(this.method,this.url,!0)}catch(l){return this.callback(l)}if(this._withCredentials&&(t.withCredentials=!0),!this._formData&&"GET"!==this.method&&"HEAD"!==this.method&&"string"!=typeof n&&!this._isHost(n)){var o=this._header["content-type"],a=this._serializer||i.serialize[o?o.split(";")[0]:""];!a&&c(o)&&(a=i.serialize["application/json"]),a&&(n=a(n))}for(var s in this.header)null!==this.header[s]&&Object.prototype.hasOwnProperty.call(this.header,s)&&t.setRequestHeader(s,this.header[s]);this._responseType&&(t.responseType=this._responseType),this.emit("request",this),t.send(void 0===n?null:n)},i.agent=function(){return new Rt},["GET","POST","OPTIONS","PATCH","PUT","DELETE"].forEach((function(e){Rt.prototype[e.toLowerCase()]=function(t,n){var r=new i.Request(e,t);return this._setDefaults(r),n&&r.end(n),r}})),Rt.prototype.del=Rt.prototype.delete,i.get=function(e,t,n){var r=i("GET",e);return"function"==typeof t&&(n=t,t=null),t&&r.query(t),n&&r.end(n),r},i.head=function(e,t,n){var r=i("HEAD",e);return"function"==typeof t&&(n=t,t=null),t&&r.query(t),n&&r.end(n),r},i.options=function(e,t,n){var r=i("OPTIONS",e);return"function"==typeof t&&(n=t,t=null),t&&r.send(t),n&&r.end(n),r},i.del=p,i.delete=p,i.patch=function(e,t,n){var r=i("PATCH",e);return"function"==typeof t&&(n=t,t=null),t&&r.send(t),n&&r.end(n),r},i.post=function(e,t,n){var r=i("POST",e);return"function"==typeof t&&(n=t,t=null),t&&r.send(t),n&&r.end(n),r},i.put=function(e,t,n){var r=i("PUT",e);return"function"==typeof t&&(n=t,t=null),t&&r.send(t),n&&r.end(n),r}})),Ft=(Bt.Request,[]),Yt=[],Qt=("undefined"!=typeof Uint8Array&&Uint8Array,"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/"),Gt=0,Wt=Qt.length;Gt0)throw new Error("Invalid string. Length must be a multiple of 4");var n=e.indexOf("=");return-1===n&&(n=t),[n,n===t?0:4-n%4]}function Zt(e,t,n){for(var r,o,i=[],a=t;a>18&63]+Ft[o>>12&63]+Ft[o>>6&63]+Ft[63&o]);return i.join("")}Yt["-".charCodeAt(0)]=62,Yt["_".charCodeAt(0)]=63;var Vt=function(e){for(var t,n=e.length,r=n%3,o=[],i=0,a=n-r;ia?a:i+16383));return 1===r?(t=e[n-1],o.push(Ft[t>>2]+Ft[t<<4&63]+"==")):2===r&&(t=(e[n-2]<<8)+e[n-1],o.push(Ft[t>>10]+Ft[t>>4&63]+Ft[t<<2&63]+"=")),o.join("")},qt=function(e){return Vt(function(e){for(var t=new Array(e.length),n=0;n=65&&t<=90||!o&&t>=48&&t<=57?(n+="_",n+=e[r].toLowerCase()):n+=e[r].toLowerCase(),o=t>=48&&t<=57,i=t>=65&&t<=90,r++;return n}(o):o]=e(t[o]),r}),{}))},toCamelCase:function e(t,n,r){return"object"!=typeof t||tn.isArray(t)||null===t?t:(n=n||[],r=r||{},Object.keys(t).reduce((function(o,i){var a,s=-1===n.indexOf(i)?(a=i.split("_")).reduce((function(e,t){return e+t.charAt(0).toUpperCase()+t.slice(1)}),a.shift()):i;return o[s]=e(t[s]||t[i],[],r),r.keepOriginal&&(o[i]=e(t[i],[],r)),o}),{}))},blacklist:function(e,t){return Object.keys(e).reduce((function(n,r){return-1===t.indexOf(r)&&(n[r]=e[r]),n}),{})},merge:function(e,t){return{base:t?on(e,t):e,with:function(e,t){return e=t?on(e,t):e,sn(this.base,e)}}},pick:on,getKeysNotIn:function(e,t){var n=[];for(var r in e)-1===t.indexOf(r)&&n.push(r);return n},extend:sn,getOriginFromUrl:function(e){if(e){var t=un(e);if(!t)return null;var n=t.protocol+"//"+t.hostname;return t.port&&(n+=":"+t.port),n}},getLocationFromUrl:un,trimUserDetails:function(e){return function(e,t){return["username","email","phoneNumber"].reduce(ln,e)}(e)},updatePropertyOn:function e(t,n,r){"string"==typeof n&&(n=n.split("."));var o=n[0];t.hasOwnProperty(o)&&(1===n.length?t[o]=r:e(t[o],n.slice(1),r))}};function dn(e){this.request=e,this.method=e.method,this.url=e.url,this.body=e._data,this.headers=e._header}function fn(e){this.request=e}function pn(e){this._sendTelemetry=!1!==e._sendTelemetry||e._sendTelemetry,this._telemetryInfo=e._telemetryInfo||null,this._timesToRetryFailedRequests=e._timesToRetryFailedRequests,this.headers=e.headers||{},this._universalLoginPage=e.universalLoginPage}function hn(){return window}dn.prototype.abort=function(){this.request.abort()},dn.prototype.getMethod=function(){return this.method},dn.prototype.getBody=function(){return this.body},dn.prototype.getUrl=function(){return this.url},dn.prototype.getHeaders=function(){return this.headers},fn.prototype.set=function(e,t){return this.request=this.request.set(e,t),this},fn.prototype.send=function(e){return this.request=this.request.send(cn.trimUserDetails(e)),this},fn.prototype.withCredentials=function(){return this.request=this.request.withCredentials(),this},fn.prototype.end=function(e){return this.request.end(e),new dn(this.request)},pn.prototype.setCommonConfiguration=function(e,t){if(t=t||{},this._timesToRetryFailedRequests>0&&(e=e.retry(this._timesToRetryFailedRequests)),t.noHeaders)return e;var n=this.headers;e=e.set("Content-Type","application/json"),t.xRequestLanguage&&(e=e.set("X-Request-Language",t.xRequestLanguage));for(var r=Object.keys(this.headers),o=0;o0&&e.warning("Following parameters are not allowed on the `/authorize` endpoint: ["+n.join(",")+"]"),t},En="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof n.g?n.g:"undefined"!=typeof self?self:{};function _n(e){var t={exports:{}};return e(t,t.exports),t.exports}var Tn=_n((function(e,t){e.exports=function(){function e(e){return"function"==typeof e}var t=Array.isArray?Array.isArray:function(e){return"[object Array]"===Object.prototype.toString.call(e)},n=0,r=void 0,o=void 0,i=function(e,t){f[n]=e,f[n+1]=t,2===(n+=2)&&(o?o(p):v())},a="undefined"!=typeof window?window:void 0,s=a||{},u=s.MutationObserver||s.WebKitMutationObserver,l="undefined"==typeof self&&"undefined"!=typeof process&&"[object process]"==={}.toString.call(process),c="undefined"!=typeof Uint8ClampedArray&&"undefined"!=typeof importScripts&&"undefined"!=typeof MessageChannel;function d(){var e=setTimeout;return function(){return e(p,1)}}var f=new Array(1e3);function p(){for(var e=0;e>>2]|=(n[i>>>2]>>>24-i%4*8&255)<<24-(r+i)%4*8;else for(var a=0;a>>2]=n[a>>>2];return this.sigBytes+=o,this},clamp:function(){var t=this.words,n=this.sigBytes;t[n>>>2]&=4294967295<<32-n%4*8,t.length=e.ceil(n/4)},clone:function(){var e=s.clone.call(this);return e.words=this.words.slice(0),e},random:function(e){for(var t=[],n=0;n>>2]>>>24-o%4*8&255;r.push((i>>>4).toString(16)),r.push((15&i).toString(16))}return r.join("")},parse:function(e){for(var t=e.length,n=[],r=0;r>>3]|=parseInt(e.substr(r,2),16)<<24-r%8*4;return new u.init(n,t/2)}},d=l.Latin1={stringify:function(e){for(var t=e.words,n=e.sigBytes,r=[],o=0;o>>2]>>>24-o%4*8&255));return r.join("")},parse:function(e){for(var t=e.length,n=[],r=0;r>>2]|=(255&e.charCodeAt(r))<<24-r%4*8;return new u.init(n,t)}},f=l.Utf8={stringify:function(e){try{return decodeURIComponent(escape(d.stringify(e)))}catch(e){throw new Error("Malformed UTF-8 data")}},parse:function(e){return d.parse(unescape(encodeURIComponent(e)))}},p=a.BufferedBlockAlgorithm=s.extend({reset:function(){this._data=new u.init,this._nDataBytes=0},_append:function(e){"string"==typeof e&&(e=f.parse(e)),this._data.concat(e),this._nDataBytes+=e.sigBytes},_process:function(t){var n,r=this._data,o=r.words,i=r.sigBytes,a=this.blockSize,s=i/(4*a),l=(s=t?e.ceil(s):e.max((0|s)-this._minBufferSize,0))*a,c=e.min(4*l,i);if(l){for(var d=0;d>>7)^(h<<14|h>>>18)^h>>>3)+l[p-7]+((g<<15|g>>>17)^(g<<13|g>>>19)^g>>>10)+l[p-16]}var y=r&o^r&i^o&i,m=f+((s<<26|s>>>6)^(s<<21|s>>>11)^(s<<7|s>>>25))+(s&c^~s&d)+u[p]+l[p];f=d,d=c,c=s,s=a+m|0,a=i,i=o,o=r,r=m+(((r<<30|r>>>2)^(r<<19|r>>>13)^(r<<10|r>>>22))+y)|0}n[0]=n[0]+r|0,n[1]=n[1]+o|0,n[2]=n[2]+i|0,n[3]=n[3]+a|0,n[4]=n[4]+s|0,n[5]=n[5]+c|0,n[6]=n[6]+d|0,n[7]=n[7]+f|0},_doFinalize:function(){var t=this._data,n=t.words,r=8*this._nDataBytes,o=8*t.sigBytes;return n[o>>>5]|=128<<24-o%32,n[14+(o+64>>>9<<4)]=e.floor(r/4294967296),n[15+(o+64>>>9<<4)]=r,t.sigBytes=4*n.length,this._process(),this._hash},clone:function(){var e=i.clone.call(this);return e._hash=this._hash.clone(),e}});t.SHA256=i._createHelper(c),t.HmacSHA256=i._createHmacHelper(c)}(Math),n.SHA256)})),Un=_n((function(e,t){var n,r;e.exports=(r=(n=On).lib.WordArray,n.enc.Base64={stringify:function(e){var t=e.words,n=e.sigBytes,r=this._map;e.clamp();for(var o=[],i=0;i>>2]>>>24-i%4*8&255)<<16|(t[i+1>>>2]>>>24-(i+1)%4*8&255)<<8|t[i+2>>>2]>>>24-(i+2)%4*8&255,s=0;s<4&&i+.75*s>>6*(3-s)&63));var u=r.charAt(64);if(u)for(;o.length%4;)o.push(u);return o.join("")},parse:function(e){var t=e.length,n=this._map,o=this._reverseMap;if(!o){o=this._reverseMap=[];for(var i=0;i>>6-a%4*2;o[i>>>2]|=(s|u)<<24-i%4*8,i++}return r.create(o,i)}(e,t,o)},_map:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/="},n.enc.Base64)})),Pn=_n((function(e,t){e.exports=On.enc.Hex})),Rn=_n((function(e,t){(function(){var t;function n(e,t,n){null!=e&&("number"==typeof e?this.fromNumber(e,t,n):this.fromString(e,null==t&&"string"!=typeof e?256:t))}function r(){return new n(null)}var o="undefined"!=typeof navigator;o&&"Microsoft Internet Explorer"==navigator.appName?(n.prototype.am=function(e,t,n,r,o,i){for(var a=32767&t,s=t>>15;--i>=0;){var u=32767&this[e],l=this[e++]>>15,c=s*u+l*a;o=((u=a*u+((32767&c)<<15)+n[r]+(1073741823&o))>>>30)+(c>>>15)+s*l+(o>>>30),n[r++]=1073741823&u}return o},t=30):o&&"Netscape"!=navigator.appName?(n.prototype.am=function(e,t,n,r,o,i){for(;--i>=0;){var a=t*this[e++]+n[r]+o;o=Math.floor(a/67108864),n[r++]=67108863&a}return o},t=26):(n.prototype.am=function(e,t,n,r,o,i){for(var a=16383&t,s=t>>14;--i>=0;){var u=16383&this[e],l=this[e++]>>14,c=s*u+l*a;o=((u=a*u+((16383&c)<<14)+n[r]+o)>>28)+(c>>14)+s*l,n[r++]=268435455&u}return o},t=28),n.prototype.DB=t,n.prototype.DM=(1<>>16)&&(e=t,n+=16),0!=(t=e>>8)&&(e=t,n+=8),0!=(t=e>>4)&&(e=t,n+=4),0!=(t=e>>2)&&(e=t,n+=2),0!=(t=e>>1)&&(e=t,n+=1),n}function f(e){this.m=e}function p(e){this.m=e,this.mp=e.invDigit(),this.mpl=32767&this.mp,this.mph=this.mp>>15,this.um=(1<>=16,t+=16),0==(255&e)&&(e>>=8,t+=8),0==(15&e)&&(e>>=4,t+=4),0==(3&e)&&(e>>=2,t+=2),0==(1&e)&&++t,t}function M(e){for(var t=0;0!=e;)e&=e-1,++t;return t}function b(){}function j(e){return e}function w(e){this.r2=r(),this.q3=r(),n.ONE.dlShiftTo(2*e.t,this.r2),this.mu=this.r2.divide(e),this.m=e}f.prototype.convert=function(e){return e.s<0||e.compareTo(this.m)>=0?e.mod(this.m):e},f.prototype.revert=function(e){return e},f.prototype.reduce=function(e){e.divRemTo(this.m,null,e)},f.prototype.mulTo=function(e,t,n){e.multiplyTo(t,n),this.reduce(n)},f.prototype.sqrTo=function(e,t){e.squareTo(t),this.reduce(t)},p.prototype.convert=function(e){var t=r();return e.abs().dlShiftTo(this.m.t,t),t.divRemTo(this.m,null,t),e.s<0&&t.compareTo(n.ZERO)>0&&this.m.subTo(t,t),t},p.prototype.revert=function(e){var t=r();return e.copyTo(t),this.reduce(t),t},p.prototype.reduce=function(e){for(;e.t<=this.mt2;)e[e.t++]=0;for(var t=0;t>15)*this.mpl&this.um)<<15)&e.DM;for(e[n=t+this.m.t]+=this.m.am(0,r,e,t,0,this.m.t);e[n]>=e.DV;)e[n]-=e.DV,e[++n]++}e.clamp(),e.drShiftTo(this.m.t,e),e.compareTo(this.m)>=0&&e.subTo(this.m,e)},p.prototype.mulTo=function(e,t,n){e.multiplyTo(t,n),this.reduce(n)},p.prototype.sqrTo=function(e,t){e.squareTo(t),this.reduce(t)},n.prototype.copyTo=function(e){for(var t=this.t-1;t>=0;--t)e[t]=this[t];e.t=this.t,e.s=this.s},n.prototype.fromInt=function(e){this.t=1,this.s=e<0?-1:0,e>0?this[0]=e:e<-1?this[0]=e+this.DV:this.t=0},n.prototype.fromString=function(e,t){var r;if(16==t)r=4;else if(8==t)r=3;else if(256==t)r=8;else if(2==t)r=1;else if(32==t)r=5;else{if(4!=t)return void this.fromRadix(e,t);r=2}this.t=0,this.s=0;for(var o=e.length,i=!1,a=0;--o>=0;){var s=8==r?255&e[o]:l(e,o);s<0?"-"==e.charAt(o)&&(i=!0):(i=!1,0==a?this[this.t++]=s:a+r>this.DB?(this[this.t-1]|=(s&(1<>this.DB-a):this[this.t-1]|=s<=this.DB&&(a-=this.DB))}8==r&&0!=(128&e[0])&&(this.s=-1,a>0&&(this[this.t-1]|=(1<0&&this[this.t-1]==e;)--this.t},n.prototype.dlShiftTo=function(e,t){var n;for(n=this.t-1;n>=0;--n)t[n+e]=this[n];for(n=e-1;n>=0;--n)t[n]=0;t.t=this.t+e,t.s=this.s},n.prototype.drShiftTo=function(e,t){for(var n=e;n=0;--n)t[n+a+1]=this[n]>>o|s,s=(this[n]&i)<=0;--n)t[n]=0;t[a]=s,t.t=this.t+a+1,t.s=this.s,t.clamp()},n.prototype.rShiftTo=function(e,t){t.s=this.s;var n=Math.floor(e/this.DB);if(n>=this.t)t.t=0;else{var r=e%this.DB,o=this.DB-r,i=(1<>r;for(var a=n+1;a>r;r>0&&(t[this.t-n-1]|=(this.s&i)<>=this.DB;if(e.t>=this.DB;r+=this.s}else{for(r+=this.s;n>=this.DB;r-=e.s}t.s=r<0?-1:0,r<-1?t[n++]=this.DV+r:r>0&&(t[n++]=r),t.t=n,t.clamp()},n.prototype.multiplyTo=function(e,t){var r=this.abs(),o=e.abs(),i=r.t;for(t.t=i+o.t;--i>=0;)t[i]=0;for(i=0;i=0;)e[n]=0;for(n=0;n=t.DV&&(e[n+t.t]-=t.DV,e[n+t.t+1]=1)}e.t>0&&(e[e.t-1]+=t.am(n,t[n],e,2*n,0,1)),e.s=0,e.clamp()},n.prototype.divRemTo=function(e,t,o){var i=e.abs();if(!(i.t<=0)){var a=this.abs();if(a.t0?(i.lShiftTo(c,s),a.lShiftTo(c,o)):(i.copyTo(s),a.copyTo(o));var f=s.t,p=s[f-1];if(0!=p){var h=p*(1<1?s[f-2]>>this.F2:0),g=this.FV/h,y=(1<=0&&(o[o.t++]=1,o.subTo(b,o)),n.ONE.dlShiftTo(f,b),b.subTo(s,s);s.t=0;){var j=o[--v]==p?this.DM:Math.floor(o[v]*g+(o[v-1]+m)*y);if((o[v]+=s.am(0,j,o,M,0,f))0&&o.rShiftTo(c,o),u<0&&n.ZERO.subTo(o,o)}}},n.prototype.invDigit=function(){if(this.t<1)return 0;var e=this[0];if(0==(1&e))return 0;var t=3&e;return(t=(t=(t=(t=t*(2-(15&e)*t)&15)*(2-(255&e)*t)&255)*(2-((65535&e)*t&65535))&65535)*(2-e*t%this.DV)%this.DV)>0?this.DV-t:-t},n.prototype.isEven=function(){return 0==(this.t>0?1&this[0]:this.s)},n.prototype.exp=function(e,t){if(e>4294967295||e<1)return n.ONE;var o=r(),i=r(),a=t.convert(this),s=d(e)-1;for(a.copyTo(o);--s>=0;)if(t.sqrTo(o,i),(e&1<0)t.mulTo(i,a,o);else{var u=o;o=i,i=u}return t.revert(o)},n.prototype.toString=function(e){if(this.s<0)return"-"+this.negate().toString(e);var t;if(16==e)t=4;else if(8==e)t=3;else if(2==e)t=1;else if(32==e)t=5;else{if(4!=e)return this.toRadix(e);t=2}var n,r=(1<0)for(s>s)>0&&(o=!0,i=u(n));a>=0;)s>(s+=this.DB-t)):(n=this[a]>>(s-=t)&r,s<=0&&(s+=this.DB,--a)),n>0&&(o=!0),o&&(i+=u(n));return o?i:"0"},n.prototype.negate=function(){var e=r();return n.ZERO.subTo(this,e),e},n.prototype.abs=function(){return this.s<0?this.negate():this},n.prototype.compareTo=function(e){var t=this.s-e.s;if(0!=t)return t;var n=this.t;if(0!=(t=n-e.t))return this.s<0?-t:t;for(;--n>=0;)if(0!=(t=this[n]-e[n]))return t;return 0},n.prototype.bitLength=function(){return this.t<=0?0:this.DB*(this.t-1)+d(this[this.t-1]^this.s&this.DM)},n.prototype.mod=function(e){var t=r();return this.abs().divRemTo(e,null,t),this.s<0&&t.compareTo(n.ZERO)>0&&e.subTo(t,t),t},n.prototype.modPowInt=function(e,t){var n;return n=e<256||t.isEven()?new f(t):new p(t),this.exp(e,n)},n.ZERO=c(0),n.ONE=c(1),b.prototype.convert=j,b.prototype.revert=j,b.prototype.mulTo=function(e,t,n){e.multiplyTo(t,n)},b.prototype.sqrTo=function(e,t){e.squareTo(t)},w.prototype.convert=function(e){if(e.s<0||e.t>2*this.m.t)return e.mod(this.m);if(e.compareTo(this.m)<0)return e;var t=r();return e.copyTo(t),this.reduce(t),t},w.prototype.revert=function(e){return e},w.prototype.reduce=function(e){for(e.drShiftTo(this.m.t-1,this.r2),e.t>this.m.t+1&&(e.t=this.m.t+1,e.clamp()),this.mu.multiplyUpperTo(this.r2,this.m.t+1,this.q3),this.m.multiplyLowerTo(this.q3,this.m.t+1,this.r2);e.compareTo(this.r2)<0;)e.dAddOffset(1,this.m.t+1);for(e.subTo(this.r2,e);e.compareTo(this.m)>=0;)e.subTo(this.m,e)},w.prototype.mulTo=function(e,t,n){e.multiplyTo(t,n),this.reduce(n)},w.prototype.sqrTo=function(e,t){e.squareTo(t),this.reduce(t)};var x,N,I,D=[2,3,5,7,11,13,17,19,23,29,31,37,41,43,47,53,59,61,67,71,73,79,83,89,97,101,103,107,109,113,127,131,137,139,149,151,157,163,167,173,179,181,191,193,197,199,211,223,227,229,233,239,241,251,257,263,269,271,277,281,283,293,307,311,313,317,331,337,347,349,353,359,367,373,379,383,389,397,401,409,419,421,431,433,439,443,449,457,461,463,467,479,487,491,499,503,509,521,523,541,547,557,563,569,571,577,587,593,599,601,607,613,617,619,631,641,643,647,653,659,661,673,677,683,691,701,709,719,727,733,739,743,751,757,761,769,773,787,797,809,811,821,823,827,829,839,853,857,859,863,877,881,883,887,907,911,919,929,937,941,947,953,967,971,977,983,991,997],S=(1<<26)/D[D.length-1];function L(){var e;e=(new Date).getTime(),N[I++]^=255&e,N[I++]^=e>>8&255,N[I++]^=e>>16&255,N[I++]^=e>>24&255,I>=O&&(I-=O)}if(n.prototype.chunkSize=function(e){return Math.floor(Math.LN2*this.DB/Math.log(e))},n.prototype.toRadix=function(e){if(null==e&&(e=10),0==this.signum()||e<2||e>36)return"0";var t=this.chunkSize(e),n=Math.pow(e,t),o=c(n),i=r(),a=r(),s="";for(this.divRemTo(o,i,a);i.signum()>0;)s=(n+a.intValue()).toString(e).substr(1)+s,i.divRemTo(o,i,a);return a.intValue().toString(e)+s},n.prototype.fromRadix=function(e,t){this.fromInt(0),null==t&&(t=10);for(var r=this.chunkSize(t),o=Math.pow(t,r),i=!1,a=0,s=0,u=0;u=r&&(this.dMultiply(o),this.dAddOffset(s,0),a=0,s=0))}a>0&&(this.dMultiply(Math.pow(t,a)),this.dAddOffset(s,0)),i&&n.ZERO.subTo(this,this)},n.prototype.fromNumber=function(e,t,r){if("number"==typeof t)if(e<2)this.fromInt(1);else for(this.fromNumber(e,r),this.testBit(e-1)||this.bitwiseTo(n.ONE.shiftLeft(e-1),g,this),this.isEven()&&this.dAddOffset(1,0);!this.isProbablePrime(t);)this.dAddOffset(2,0),this.bitLength()>e&&this.subTo(n.ONE.shiftLeft(e-1),this);else{var o=new Array,i=7&e;o.length=1+(e>>3),t.nextBytes(o),i>0?o[0]&=(1<>=this.DB;if(e.t>=this.DB;r+=this.s}else{for(r+=this.s;n>=this.DB;r+=e.s}t.s=r<0?-1:0,r>0?t[n++]=r:r<-1&&(t[n++]=this.DV+r),t.t=n,t.clamp()},n.prototype.dMultiply=function(e){this[this.t]=this.am(0,e-1,this,0,0,this.t),++this.t,this.clamp()},n.prototype.dAddOffset=function(e,t){if(0!=e){for(;this.t<=t;)this[this.t++]=0;for(this[t]+=e;this[t]>=this.DV;)this[t]-=this.DV,++t>=this.t&&(this[this.t++]=0),++this[t]}},n.prototype.multiplyLowerTo=function(e,t,n){var r,o=Math.min(this.t+e.t,t);for(n.s=0,n.t=o;o>0;)n[--o]=0;for(r=n.t-this.t;o=0;)n[r]=0;for(r=Math.max(t-this.t,0);r0)if(0==t)n=this[0]%e;else for(var r=this.t-1;r>=0;--r)n=(t*n+this[r])%e;return n},n.prototype.millerRabin=function(e){var t=this.subtract(n.ONE),o=t.getLowestSetBit();if(o<=0)return!1;var i=t.shiftRight(o);(e=e+1>>1)>D.length&&(e=D.length);for(var a=r(),s=0;s>24},n.prototype.shortValue=function(){return 0==this.t?this.s:this[0]<<16>>16},n.prototype.signum=function(){return this.s<0?-1:this.t<=0||1==this.t&&this[0]<=0?0:1},n.prototype.toByteArray=function(){var e=this.t,t=new Array;t[0]=this.s;var n,r=this.DB-e*this.DB%8,o=0;if(e-- >0)for(r>r)!=(this.s&this.DM)>>r&&(t[o++]=n|this.s<=0;)r<8?(n=(this[e]&(1<>(r+=this.DB-8)):(n=this[e]>>(r-=8)&255,r<=0&&(r+=this.DB,--e)),0!=(128&n)&&(n|=-256),0==o&&(128&this.s)!=(128&n)&&++o,(o>0||n!=this.s)&&(t[o++]=n);return t},n.prototype.equals=function(e){return 0==this.compareTo(e)},n.prototype.min=function(e){return this.compareTo(e)<0?this:e},n.prototype.max=function(e){return this.compareTo(e)>0?this:e},n.prototype.and=function(e){var t=r();return this.bitwiseTo(e,h,t),t},n.prototype.or=function(e){var t=r();return this.bitwiseTo(e,g,t),t},n.prototype.xor=function(e){var t=r();return this.bitwiseTo(e,y,t),t},n.prototype.andNot=function(e){var t=r();return this.bitwiseTo(e,m,t),t},n.prototype.not=function(){for(var e=r(),t=0;t=this.t?0!=this.s:0!=(this[t]&1<1){var g=r();for(o.sqrTo(s[1],g);u<=h;)s[u]=r(),o.mulTo(g,s[u-2],s[u]),u+=2}var y,m,v=e.t-1,M=!0,b=r();for(i=d(e[v])-1;v>=0;){for(i>=l?y=e[v]>>i-l&h:(y=(e[v]&(1<0&&(y|=e[v-1]>>this.DB+i-l)),u=n;0==(1&y);)y>>=1,--u;if((i-=u)<0&&(i+=this.DB,--v),M)s[y].copyTo(a),M=!1;else{for(;u>1;)o.sqrTo(a,b),o.sqrTo(b,a),u-=2;u>0?o.sqrTo(a,b):(m=a,a=b,b=m),o.mulTo(b,s[y],a)}for(;v>=0&&0==(e[v]&1<=0?(r.subTo(o,r),t&&i.subTo(s,i),a.subTo(u,a)):(o.subTo(r,o),t&&s.subTo(i,s),u.subTo(a,u))}return 0!=o.compareTo(n.ONE)?n.ZERO:u.compareTo(e)>=0?u.subtract(e):u.signum()<0?(u.addTo(e,u),u.signum()<0?u.add(e):u):u},n.prototype.pow=function(e){return this.exp(e,new b)},n.prototype.gcd=function(e){var t=this.s<0?this.negate():this.clone(),n=e.s<0?e.negate():e.clone();if(t.compareTo(n)<0){var r=t;t=n,n=r}var o=t.getLowestSetBit(),i=n.getLowestSetBit();if(i<0)return t;for(o0&&(t.rShiftTo(i,t),n.rShiftTo(i,n));t.signum()>0;)(o=t.getLowestSetBit())>0&&t.rShiftTo(o,t),(o=n.getLowestSetBit())>0&&n.rShiftTo(o,n),t.compareTo(n)>=0?(t.subTo(n,t),t.rShiftTo(1,t)):(n.subTo(t,n),n.rShiftTo(1,n));return i>0&&n.lShiftTo(i,n),n},n.prototype.isProbablePrime=function(e){var t,n=this.abs();if(1==n.t&&n[0]<=D[D.length-1]){for(t=0;t>>8,N[I++]=255&k;I=0,L()}function _(){if(null==x){for(L(),(x=new A).init(N),I=0;I0&&t.length>0))throw new Error("Invalid key data");this.n=new Rn.BigInteger(e,16),this.e=parseInt(t,16)}Yn.prototype.verify=function(e,t){t=t.replace(/[^0-9a-f]|[\s\n]]/gi,"");var n=new Rn.BigInteger(t,16);if(n.bitLength()>this.n.bitLength())throw new Error("Signature does not match with the key modulus.");var r=function(e){for(var t in Bn){var n=Bn[t],r=n.length;if(e.substring(0,r)===n)return{alg:t,hash:e.substring(r)}}return[]}(n.modPowInt(this.e,this.n).toString(16).replace(/^1f+00/,""));if(0===r.length)return!1;if(!Fn.hasOwnProperty(r.alg))throw new Error("Hashing algorithm is not supported.");var o=Fn[r.alg](e).toString();return r.hash===o};for(var Qn=[],Gn=[],Wn="undefined"!=typeof Uint8Array?Uint8Array:Array,Hn="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",Zn=0,Vn=Hn.length;Zn0)throw new Error("Invalid string. Length must be a multiple of 4");var n=e.indexOf("=");return-1===n&&(n=t),[n,n===t?0:4-n%4]}(e),o=r[0],i=r[1],a=new Wn(function(e,t,n){return 3*(t+n)/4-n}(0,o,i)),s=0,u=i>0?o-4:o;for(n=0;n>16&255,a[s++]=t>>8&255,a[s++]=255&t;return 2===i&&(t=Gn[e.charCodeAt(n)]<<2|Gn[e.charCodeAt(n+1)]>>4,a[s++]=255&t),1===i&&(t=Gn[e.charCodeAt(n)]<<10|Gn[e.charCodeAt(n+1)]<<4|Gn[e.charCodeAt(n+2)]>>2,a[s++]=t>>8&255,a[s++]=255&t),a};function Jn(e){var t=e.length%4;return 0===t?e:e+new Array(4-t+1).join("=")}function Kn(e){return e=Jn(e).replace(/\-/g,"+").replace(/_/g,"/"),decodeURIComponent(function(e){for(var t="",n=0;n1){var n=e.shift();e[0]=n+e[0]}e[0]=e[0].match(/^file:\/\/\//)?e[0].replace(/^([^/:]+):\/*/,"$1:///"):e[0].replace(/^([^/:]+):\/*/,"$1://");for(var r=0;r0&&(o=o.replace(/^[\/]+/,"")),o=o.replace(/[\/]+$/,r0?"?":"")+a.join("&")}return function(){return e("object"==typeof arguments[0]?arguments[0]:[].slice.call(arguments))}},e.exports?e.exports=n():t.urljoin=n()}));function er(e,t){return t=t||{},new Promise((function(n,r){var o=new XMLHttpRequest,i=[],a=[],s={},u=function e(){return{ok:2==(o.status/100|0),statusText:o.statusText,status:o.status,url:o.responseURL,text:function(){return Promise.resolve(o.responseText)},json:function(){return Promise.resolve(o.responseText).then(JSON.parse)},blob:function(){return Promise.resolve(new Blob([o.response]))},clone:e,headers:{keys:function(){return i},entries:function(){return a},get:function(e){return s[e.toLowerCase()]},has:function(e){return e.toLowerCase()in s}}}};for(var l in o.open(t.method||"get",e,!0),o.onload=function(){o.getAllResponseHeaders().replace(/^(.*?):[^\S\n]*([\s\S]*?)$/gm,(function(e,t,n){i.push(t=t.toLowerCase()),a.push([t,n]),s[t]=s[t]?s[t]+","+n:n})),n(u())},o.onerror=r,o.withCredentials="include"==t.credentials,t.headers)o.setRequestHeader(l,t.headers[l]);o.send(t.body||null)}))}function tr(e){if(e.ok)return e.json();var t=new Error(e.statusText);return t.response=e,Promise.reject(t)}function nr(e){this.name="ConfigurationError",this.message=e||""}function rr(e){this.name="TokenValidationError",this.message=e||""}nr.prototype=Error.prototype,rr.prototype=Error.prototype;var or=function(){function e(){}var t=e.prototype;return t.get=function(){return null},t.has=function(){return null},t.set=function(){return null},e}();Tn.polyfill();var ir=function(e){return"number"==typeof e},ar=function(){return new Date};function sr(e){var t=e||{};if(this.jwksCache=t.jwksCache||new or,this.expectedAlg=t.expectedAlg||"RS256",this.issuer=t.issuer,this.audience=t.audience,this.leeway=0===t.leeway?0:t.leeway||60,this.jwksURI=t.jwksURI,this.maxAge=t.maxAge,this.__clock="function"==typeof t.__clock?t.__clock:ar,this.leeway<0||this.leeway>300)throw new nr("The leeway should be positive and lower than five minutes.");if("RS256"!==this.expectedAlg)throw new nr('Signature algorithm of "'+this.expectedAlg+'" is not supported. Expected the ID token to be signed with "RS256".')}function ur(e,t){this.plugins=t;for(var n=0;n1){if(!h||"string"!=typeof h)return n(new rr("Authorized Party (azp) claim must be a string present in the ID token when Audience (aud) claim has multiple values"),null);if(h!==v.audience)return n(new rr('Authorized Party (azp) claim mismatch in the ID token; expected "'+v.audience+'", found "'+h+'"'),null)}if(!d||!ir(d))return n(new rr("Expiration Time (exp) claim must be a number present in the ID token"),null);if(!p||!ir(p))return n(new rr("Issued At (iat) claim must be a number present in the ID token"),null);var s=d+v.leeway,M=new Date(0);if(M.setUTCSeconds(s),m>M)return n(new rr('Expiration Time (exp) claim error in the ID token; current time "'+m+'" is after expiration time "'+M+'"'),null);if(f&&ir(f)){var b=f-v.leeway,j=new Date(0);if(j.setUTCSeconds(b),mx)return n(new rr('Authentication Time (auth_time) claim in the ID token indicates that too much time has passed since the last end-user authentication. Current time "'+m+'" is after last auth time at "'+x+'"'),null)}return n(null,r.payload)}))},sr.prototype.getRsaVerifier=function(e,t,n){var r=this,o=e+t;Promise.resolve(this.jwksCache.has(o)).then((function(n){return n?r.jwksCache.get(o):(i={jwksURI:r.jwksURI,iss:e,kid:t},("undefined"==typeof fetch?er:fetch)(i.jwksURI||$n(i.iss,".well-known","jwks.json")).then(tr).then((function(e){var t,n,r,o=null;for(t=0;t-1&&null!==new RegExp("rv:([0-9]{2,2}[.0-9]{0,})").exec(t)&&(e=parseFloat(RegExp.$1)),e>=8}();return"undefined"!=typeof window&&window.JSON&&window.JSON.stringify&&window.JSON.parse&&window.postMessage?{open:function(o,i){if(!i)throw"missing required callback argument";var a,s;o.url||(a="missing required 'url' parameter"),o.relay_url||(a="missing required 'relay_url' parameter"),a&&setTimeout((function(){i(a)}),0),o.window_name||(o.window_name=null),o.window_features&&!function(){try{var e=navigator.userAgent;return-1!=e.indexOf("Fennec/")||-1!=e.indexOf("Firefox/")&&-1!=e.indexOf("Android")}catch(_n){}return!1}()||(o.window_features=void 0);var u,l=o.origin||n(o.url);if(l!==n(o.relay_url))return setTimeout((function(){i("invalid arguments: origin of url and relay_url must match")}),0);r&&((s=document.createElement("iframe")).setAttribute("src",o.relay_url),s.style.display="none",s.setAttribute("name","__winchan_relay_frame"),document.body.appendChild(s),u=s.contentWindow);var c=o.popup||window.open(o.url,o.window_name,o.window_features);o.popup&&(c.location.href=o.url),u||(u=c);var d=setInterval((function(){c&&c.closed&&(p(),i&&(i("User closed the popup window"),i=null))}),500),f=JSON.stringify({a:"request",d:o.params});function p(){if(s&&document.body.removeChild(s),s=void 0,d&&(d=clearInterval(d)),t(window,"message",h),t(window,"unload",p),c)try{c.close()}catch(e){u.postMessage("die",l)}c=u=void 0}function h(e){if(e.origin===l){try{var t=JSON.parse(e.data)}catch(a){if(i)return i(a);throw a}"ready"===t.a?u.postMessage(f,l):"error"===t.a?(p(),i&&(i(t.d),i=null)):"response"===t.a&&(p(),i&&(i(null,t.d),i=null))}}return e(window,"unload",p),e(window,"message",h),{originalPopup:c,close:p,focus:function(){if(c)try{c.focus()}catch(_n){}}}},onOpen:function(n){var o="*",i=r?function(){for(var e=window.opener.frames,t=e.length-1;t>=0;t--)try{if(e[t].location.protocol===window.location.protocol&&e[t].location.host===window.location.host&&"__winchan_relay_frame"===e[t].name)return e[t]}catch(_n){}}():window.opener;if(!i)throw"can't find relay frame";function a(e){e=JSON.stringify(e),r?i.doPost(e,o):i.postMessage(e,o)}function s(e){if("die"===e.data)try{window.close()}catch(t){}}e(r?i:window,"message",(function e(r){var i;try{i=JSON.parse(r.data)}catch(s){}i&&"request"===i.a&&(t(window,"message",e),o=r.origin,n&&setTimeout((function(){n(o,i.d,(function(e){n=void 0,a({a:"response",d:e})}))}),0))})),e(r?i:window,"message",s);try{a({a:"ready"})}catch(_n){e(i,"load",(function(e){a({a:"ready"})}))}var u=function(){try{t(r?i:window,"message",s)}catch(e){}n&&a({a:"error",d:"client closed window"}),n=void 0;try{window.close()}catch(_n){}};return e(window,"unload",u),{detach:function(){t(window,"unload",u)}}}}:{open:function(e,t,n,r){setTimeout((function(){r("unsupported browser")}),0)},onOpen:function(e){setTimeout((function(){e("unsupported browser")}),0)}}}();e.exports&&(e.exports=t)})),mr=function(e){/^https?:\/\//.test(e)||(e=window.location.href);var t=/^(https?:\/\/[-_a-zA-Z.0-9:]+)/.exec(e);return t?t[1]:e};function vr(){this._current_popup=null}function Mr(e,t){this.baseOptions=t,this.baseOptions.popupOrigin=t.popupOrigin,this.client=e.client,this.webAuth=e,this.transactionManager=new cr(this.baseOptions),this.crossOriginAuthentication=new pr(e,this.baseOptions),this.warn=new bn({disableWarnings:!!t._disableDeprecationWarnings})}function br(e){this.authenticationUrl=e.authenticationUrl,this.timeout=e.timeout||6e4,this.handler=null,this.postMessageDataType=e.postMessageDataType||!1,this.postMessageOrigin=e.postMessageOrigin||gn.getWindow().location.origin||gn.getWindow().location.protocol+"//"+gn.getWindow().location.hostname+(gn.getWindow().location.port?":"+gn.getWindow().location.port:"")}function jr(e){this.baseOptions=e,this.request=new pn(e),this.transactionManager=new cr(this.baseOptions)}function wr(e,t){this.baseOptions=t,this.client=e,this.baseOptions.universalLoginPage=!0,this.request=new pn(this.baseOptions),this.warn=new bn({disableWarnings:!!t._disableDeprecationWarnings})}vr.prototype.calculatePosition=function(e){var t=e.width||500,n=e.height||600,r=gn.getWindow(),o=void 0!==r.screenX?r.screenX:r.screenLeft,i=void 0!==r.screenY?r.screenY:r.screenTop,a=void 0!==r.outerWidth?r.outerWidth:r.document.body.clientWidth,s=void 0!==r.outerHeight?r.outerHeight:r.document.body.clientHeight;return{width:t,height:n,left:e.left||o+(a-t)/2,top:e.top||i+(s-n)/2}},vr.prototype.preload=function(e){var t=this,n=gn.getWindow(),r=this.calculatePosition(e.popupOptions||{}),o=cn.merge(r).with(e.popupOptions),i=e.url||"about:blank",a=vt(o,{encode:!1,delimiter:","});return this._current_popup&&!this._current_popup.closed||(this._current_popup=n.open(i,"auth0_signup_popup",a),this._current_popup.kill=function(){this.close(),t._current_popup=null}),this._current_popup},vr.prototype.load=function(e,t,n,r){var o=this,i=this.calculatePosition(n.popupOptions||{}),a=cn.merge(i).with(n.popupOptions),s=cn.merge({url:e,relay_url:t,window_features:vt(a,{delimiter:",",encode:!1}),popup:this._current_popup}).with(n),u=yr.open(s,(function(e,t){if(!e||"SyntaxError"!==e.name)return o._current_popup=null,r(e,t)}));return u.focus(),u},Mr.prototype.buildPopupHandler=function(){var e=this.baseOptions.plugins.get("popup.getPopupHandler");return e?e.getPopupHandler():new vr},Mr.prototype.preload=function(e){e=e||{};var t=this.buildPopupHandler();return t.preload(e),t},Mr.prototype.getPopupHandler=function(e,t){return e.popupHandler?e.popupHandler:t?this.preload(e):this.buildPopupHandler()},Mr.prototype.callback=function(e){var t=this,n=gn.getWindow(),r=(e=e||{}).popupOrigin||this.baseOptions.popupOrigin||gn.getOrigin();n.opener?yr.onOpen((function(n,o,i){if(n!==r)return i({error:"origin_mismatch",error_description:"The popup's origin ("+n+") should match the `popupOrigin` parameter ("+r+")."});t.webAuth.parseHash(e||{},(function(e,t){return i(e||t)}))})):n.doPost=function(e){n.parent&&n.parent.postMessage(e,r)}},Mr.prototype.authorize=function(e,t){var n,r,o={},a=this.baseOptions.plugins.get("popup.authorize"),s=cn.merge(this.baseOptions,["clientID","scope","domain","audience","tenant","responseType","redirectUri","_csrf","state","_intstate","nonce","organization","invitation"]).with(cn.blacklist(e,["popupHandler"]));return tn.check(s,{type:"object",message:"options parameter is not valid"},{responseType:{type:"string",message:"responseType option is required"}}),r=i(this.baseOptions.rootUrl,"relay.html"),e.owp?s.owp=!0:(o.origin=mr(s.redirectUri),r=s.redirectUri),e.popupOptions&&(o.popupOptions=cn.pick(e.popupOptions,["width","height","top","left"])),a&&(s=a.processParams(s)),(s=this.transactionManager.process(s)).scope=s.scope||"openid profile email",delete s.domain,n=this.client.buildAuthorizeUrl(s),this.getPopupHandler(e).load(n,r,o,Dn(t,{keepOriginalCasing:!0}))},Mr.prototype.loginWithCredentials=function(e,t){e.realm=e.realm||e.connection,e.popup=!0,e=cn.merge(this.baseOptions,["redirectUri","responseType","state","nonce"]).with(cn.blacklist(e,["popupHandler","connection"])),e=this.transactionManager.process(e),this.crossOriginAuthentication.login(e,t)},Mr.prototype.passwordlessVerify=function(e,t){var n=this;return this.client.passwordless.verify(cn.blacklist(e,["popupHandler"]),(function(r){if(r)return t(r);e.username=e.phoneNumber||e.email,e.password=e.verificationCode,delete e.email,delete e.phoneNumber,delete e.verificationCode,delete e.type,n.client.loginWithResourceOwner(e,t)}))},Mr.prototype.signupAndLogin=function(e,t){var n=this;return this.client.dbConnection.signup(e,(function(r){if(r)return t(r);n.loginWithCredentials(e,t)}))},br.create=function(e){return new br(e)},br.prototype.login=function(e,t){this.handler=new dr({auth0:this.auth0,url:this.authenticationUrl,eventListenerType:e?"message":"load",callback:this.getCallbackHandler(t,e),timeout:this.timeout,eventValidator:this.getEventValidator(),timeoutCallback:function(){t(null,"#error=timeout&error_description=Timeout+during+authentication+renew.")},usePostMessage:e||!1}),this.handler.init()},br.prototype.getEventValidator=function(){var e=this;return{isValid:function(t){switch(t.event.type){case"message":return t.event.origin===e.postMessageOrigin&&t.event.source===e.handler.iframe.contentWindow&&(!1===e.postMessageDataType||t.event.data.type&&t.event.data.type===e.postMessageDataType);case"load":if("about:"===t.sourceObject.contentWindow.location.protocol)return!1;default:return!0}}}},br.prototype.getCallbackHandler=function(e,t){return function(n){var r;r=t?"object"==typeof n.event.data&&n.event.data.hash?n.event.data.hash:n.event.data:n.sourceObject.contentWindow.location.hash,e(null,r)}},jr.prototype.login=function(e,t){var n,r;return n=i(this.baseOptions.rootUrl,"usernamepassword","login"),e.username=e.username||e.email,e=cn.blacklist(e,["email","onRedirecting"]),r=cn.merge(this.baseOptions,["clientID","redirectUri","tenant","responseType","responseMode","scope","audience"]).with(e),r=this.transactionManager.process(r),r=cn.toSnakeCase(r,["auth0Client"]),this.request.post(n).send(r).end(Dn(t))},jr.prototype.callback=function(e){var t,n=gn.getDocument();(t=n.createElement("div")).innerHTML=e,n.body.appendChild(t).children[0].submit()},wr.prototype.login=function(e,t){if(gn.getWindow().location.host!==this.baseOptions.domain)throw new Error("This method is meant to be used only inside the Universal Login Page.");var n,r=cn.merge(this.baseOptions,["clientID","redirectUri","tenant","responseType","responseMode","scope","audience","_csrf","state","_intstate","nonce"]).with(e);return tn.check(r,{type:"object",message:"options parameter is not valid"},{responseType:{type:"string",message:"responseType option is required"}}),(n=new jr(this.baseOptions)).login(r,(function(r,o){if(r)return t(r);function i(){n.callback(o)}if("function"==typeof e.onRedirecting)return e.onRedirecting((function(){i()}));i()}))},wr.prototype.signupAndLogin=function(e,t){var n=this;return n.client.client.dbConnection.signup(e,(function(r){return r?t(r):n.login(e,t)}))},wr.prototype.getSSOData=function(e,t){var n,r="";return"function"==typeof e&&(t=e,e=!1),tn.check(e,{type:"boolean",message:"withActiveDirectories parameter is not valid"}),tn.check(t,{type:"function",message:"cb parameter is not valid"}),e&&(r="?"+vt({ldaps:1,client_id:this.baseOptions.clientID})),n=i(this.baseOptions.rootUrl,"user","ssodata",r),this.request.get(n,{noHeaders:!0}).withCredentials().end(Dn(t))};var xr=function(){},Nr={lang:"en",templates:{auth0:function(e){var t="code"===e.type?"Enter the code shown above":"Solve the formula shown above";return'
\n \n \n
\n'},recaptcha_v2:function(){return'
'},recaptcha_enterprise:function(){return'
'},error:function(){return'
Error getting the bot detection challenge. Please contact the system administrator.
'}}};function Ir(e){switch(e){case"recaptcha_v2":return window.grecaptcha;case"recaptcha_enterprise":return window.grecaptcha.enterprise;default:throw new Error("Unknown captcha provider")}}var Dr=function(e,t,n,r){function o(r){r=r||xr,e.getChallenge((function(e,i){return e?(t.innerHTML=n.templates.error(e),r(e)):i.required?(t.style.display="","auth0"===i.provider?function(e,t,n,r){e.innerHTML=t.templates[n.provider](n),e.querySelector(".captcha-reload").addEventListener("click",(function(e){e.preventDefault(),r()}))}(t,n,i,o):"recaptcha_v2"!==i.provider&&"recaptcha_enterprise"!==i.provider||function(e,t,n){var r=e.hasAttribute("data-wid")&&e.getAttribute("data-wid");function o(t){e.querySelector('input[name="captcha"]').value=t||""}if(r)return o(),void Ir(n.provider).reset(r);e.innerHTML=t.templates[n.provider](n);var i=e.querySelector(".recaptcha");!function(e,t,n){var r="recaptchaCallback_"+Math.floor(1000001*Math.random());window[r]=function(){delete window[r],n()};var o=window.document.createElement("script");o.src=function(e,t,n){switch(e){case"recaptcha_v2":return"https://www.recaptcha.net/recaptcha/api.js?hl="+t+"&onload="+n;case"recaptcha_enterprise":return"https://www.recaptcha.net/recaptcha/enterprise.js?render=explicit&hl="+t+"&onload="+n;default:throw new Error("Unknown captcha provider")}}(t.provider,t.lang,r),o.async=!0,window.document.body.appendChild(o)}(0,{lang:t.lang,provider:n.provider},(function(){var t=Ir(n.provider);r=t.render(i,{callback:o,"expired-callback":function(){o()},"error-callback":function(){o()},sitekey:n.siteKey}),e.setAttribute("data-wid",r)}))}(t,n,i),void r()):(t.style.display="none",void(t.innerHTML=""))}))}return n=cn.merge(Nr).with(n||{}),o(r),{reload:o,getValue:function(){var e=t.querySelector('input[name="captcha"]');if(e)return e.value}}};function Sr(){return new Date}function Lr(e){tn.check(e,{type:"object",message:"options parameter is not valid"},{domain:{type:"string",message:"domain option is required"},clientID:{type:"string",message:"clientID option is required"},responseType:{optional:!0,type:"string",message:"responseType is not valid"},responseMode:{optional:!0,type:"string",message:"responseMode is not valid"},redirectUri:{optional:!0,type:"string",message:"redirectUri is not valid"},scope:{optional:!0,type:"string",message:"scope is not valid"},audience:{optional:!0,type:"string",message:"audience is not valid"},popupOrigin:{optional:!0,type:"string",message:"popupOrigin is not valid"},leeway:{optional:!0,type:"number",message:"leeway is not valid"},plugins:{optional:!0,type:"array",message:"plugins is not valid"},maxAge:{optional:!0,type:"number",message:"maxAge is not valid"},stateExpiration:{optional:!0,type:"number",message:"stateExpiration is not valid"},legacySameSiteCookie:{optional:!0,type:"boolean",message:"legacySameSiteCookie option is not valid"},_disableDeprecationWarnings:{optional:!0,type:"boolean",message:"_disableDeprecationWarnings option is not valid"},_sendTelemetry:{optional:!0,type:"boolean",message:"_sendTelemetry option is not valid"},_telemetryInfo:{optional:!0,type:"object",message:"_telemetryInfo option is not valid"},_timesToRetryFailedRequests:{optional:!0,type:"number",message:"_timesToRetryFailedRequests option is not valid"}}),e.overrides&&tn.check(e.overrides,{type:"object",message:"overrides option is not valid"},{__tenant:{optional:!0,type:"string",message:"__tenant option is required"},__token_issuer:{optional:!0,type:"string",message:"__token_issuer option is required"},__jwks_uri:{optional:!0,type:"string",message:"__jwks_uri is required"}}),this.baseOptions=e,this.baseOptions.plugins=new ur(this,this.baseOptions.plugins||[]),this.baseOptions._sendTelemetry=!1!==this.baseOptions._sendTelemetry||this.baseOptions._sendTelemetry,this.baseOptions._timesToRetryFailedRequests=e._timesToRetryFailedRequests?parseInt(e._timesToRetryFailedRequests):0,this.baseOptions.tenant=this.baseOptions.overrides&&this.baseOptions.overrides.__tenant||this.baseOptions.domain.split(".")[0],this.baseOptions.token_issuer=this.baseOptions.overrides&&this.baseOptions.overrides.__token_issuer||"https://"+this.baseOptions.domain+"/",this.baseOptions.jwksURI=this.baseOptions.overrides&&this.baseOptions.overrides.__jwks_uri,!1!==e.legacySameSiteCookie&&(this.baseOptions.legacySameSiteCookie=!0),this.transactionManager=new cr(this.baseOptions),this.client=new Er(this.baseOptions),this.redirect=new gr(this,this.baseOptions),this.popup=new Mr(this,this.baseOptions),this.crossOriginAuthentication=new pr(this,this.baseOptions),this.webMessageHandler=new fr(this),this._universalLogin=new wr(this,this.baseOptions),this.ssodataStorage=new xn(this.baseOptions)}function kr(e,t){this.baseOptions=t,this.request=e}function Cr(e,t){this.baseOptions=t,this.request=e}function Er(e,t){2===arguments.length?this.auth0=e:t=e,tn.check(t,{type:"object",message:"options parameter is not valid"},{domain:{type:"string",message:"domain option is required"},clientID:{type:"string",message:"clientID option is required"},responseType:{optional:!0,type:"string",message:"responseType is not valid"},responseMode:{optional:!0,type:"string",message:"responseMode is not valid"},redirectUri:{optional:!0,type:"string",message:"redirectUri is not valid"},scope:{optional:!0,type:"string",message:"scope is not valid"},audience:{optional:!0,type:"string",message:"audience is not valid"},_disableDeprecationWarnings:{optional:!0,type:"boolean",message:"_disableDeprecationWarnings option is not valid"},_sendTelemetry:{optional:!0,type:"boolean",message:"_sendTelemetry option is not valid"},_telemetryInfo:{optional:!0,type:"object",message:"_telemetryInfo option is not valid"}}),this.baseOptions=t,this.baseOptions._sendTelemetry=!1!==this.baseOptions._sendTelemetry||this.baseOptions._sendTelemetry,this.baseOptions.rootUrl=this.baseOptions.domain&&0===this.baseOptions.domain.toLowerCase().indexOf("http")?this.baseOptions.domain:"https://"+this.baseOptions.domain,this.request=new pn(this.baseOptions),this.passwordless=new kr(this.request,this.baseOptions),this.dbConnection=new Cr(this.request,this.baseOptions),this.warn=new bn({disableWarnings:!!t._disableDeprecationWarnings}),this.ssodataStorage=new xn(this.baseOptions)}function _r(e){tn.check(e,{type:"object",message:"options parameter is not valid"},{domain:{type:"string",message:"domain option is required"},token:{type:"string",message:"token option is required"},_sendTelemetry:{optional:!0,type:"boolean",message:"_sendTelemetry option is not valid"},_telemetryInfo:{optional:!0,type:"object",message:"_telemetryInfo option is not valid"}}),this.baseOptions=e,this.baseOptions.headers={Authorization:"Bearer "+this.baseOptions.token},this.request=new pn(this.baseOptions),this.baseOptions.rootUrl=i("https://"+this.baseOptions.domain,"api","v2")}Lr.prototype.parseHash=function(e,t){var n,r;t||"function"!=typeof e?e=e||{}:(t=e,e={});var o=void 0===e.hash?gn.getWindow().location.hash:e.hash;if((n=function(e,t){var n=function(e){if(!e)return ht;if(null!==e.decoder&&void 0!==e.decoder&&"function"!=typeof e.decoder)throw new TypeError("Decoder has to be a function.");if(void 0!==e.charset&&"utf-8"!==e.charset&&"iso-8859-1"!==e.charset)throw new TypeError("The charset option must be either utf-8, iso-8859-1, or undefined");var t=void 0===e.charset?ht.charset:e.charset;return{allowDots:void 0===e.allowDots?ht.allowDots:!!e.allowDots,allowPrototypes:"boolean"==typeof e.allowPrototypes?e.allowPrototypes:ht.allowPrototypes,allowSparse:"boolean"==typeof e.allowSparse?e.allowSparse:ht.allowSparse,arrayLimit:"number"==typeof e.arrayLimit?e.arrayLimit:ht.arrayLimit,charset:t,charsetSentinel:"boolean"==typeof e.charsetSentinel?e.charsetSentinel:ht.charsetSentinel,comma:"boolean"==typeof e.comma?e.comma:ht.comma,decoder:"function"==typeof e.decoder?e.decoder:ht.decoder,delimiter:"string"==typeof e.delimiter||et.isRegExp(e.delimiter)?e.delimiter:ht.delimiter,depth:"number"==typeof e.depth||!1===e.depth?+e.depth:ht.depth,ignoreQueryPrefix:!0===e.ignoreQueryPrefix,interpretNumericEntities:"boolean"==typeof e.interpretNumericEntities?e.interpretNumericEntities:ht.interpretNumericEntities,parameterLimit:"number"==typeof e.parameterLimit?e.parameterLimit:ht.parameterLimit,parseArrays:!1!==e.parseArrays,plainObjects:"boolean"==typeof e.plainObjects?e.plainObjects:ht.plainObjects,strictNullHandling:"boolean"==typeof e.strictNullHandling?e.strictNullHandling:ht.strictNullHandling}}(t);if(""===e||null==e)return n.plainObjects?Object.create(null):{};for(var r="string"==typeof e?function(e,t){var n,r={},o=t.ignoreQueryPrefix?e.replace(/^\?/,""):e,i=t.parameterLimit===1/0?void 0:t.parameterLimit,a=o.split(t.delimiter,i),s=-1,u=t.charset;if(t.charsetSentinel)for(n=0;n-1&&(c=pt(c)?[c]:c),ft.call(r,l)?r[l]=et.combine(r[l],c):r[l]=c}return r}(e,n):e,o=n.plainObjects?Object.create(null):{},i=Object.keys(r),a=0;a0&&-1!==i.indexOf("token")&&!n.hasOwnProperty("access_token")?t(In.buildResponse("invalid_hash","response_type contains `token`, but the parsed hash does not contain an `access_token` property")):i.length>0&&-1!==i.indexOf("id_token")&&!n.hasOwnProperty("id_token")?t(In.buildResponse("invalid_hash","response_type contains `id_token`, but the parsed hash does not contain an `id_token` property")):this.validateAuthenticationResponse(e,n,t)},Lr.prototype.validateAuthenticationResponse=function(e,t,n){var r=this;e.__enableIdPInitiatedLogin=e.__enableIdPInitiatedLogin||e.__enableImpersonation;var o=t.state,i=this.transactionManager.getStoredTransaction(o),a=e.state||i&&i.state||null,s=a===o;if((o||a||!e.__enableIdPInitiatedLogin)&&!s)return n({error:"invalid_token",errorDescription:"`state` does not match."});var u=e.nonce||i&&i.nonce||null,l=i&&i.organization,c=e.state||i&&i.appState||null,d=function(e,o){return e?n(e):(i&&i.lastUsedConnection&&(o&&(a=o.sub),r.ssodataStorage.set(i.lastUsedConnection,a)),n(null,function(e,t,n){return{accessToken:e.access_token||null,idToken:e.id_token||null,idTokenPayload:n||null,appState:t||null,refreshToken:e.refresh_token||null,state:e.state||null,expiresIn:e.expires_in?parseInt(e.expires_in,10):null,tokenType:e.token_type||null,scope:e.scope||null}}(t,c,o)));var a};return t.id_token?this.validateToken(t.id_token,u,(function(e,n){if(!e){if(l){if(!n.org_id)return d(In.invalidToken("Organization Id (org_id) claim must be a string present in the ID token"));if(n.org_id!==l)return d(In.invalidToken('Organization Id (org_id) claim value mismatch in the ID token; expected "'+l+'", found "'+n.org_id+'"'))}return t.access_token&&n.at_hash?(new sr).validateAccessToken(t.access_token,"RS256",n.at_hash,(function(e){return e?d(In.invalidToken(e.message)):d(null,n)})):d(null,n)}if("invalid_token"!==e.error||e.errorDescription&&e.errorDescription.indexOf("Nonce (nonce) claim value mismatch in the ID token")>-1)return d(e);var o=(new sr).decode(t.id_token);return"HS256"!==o.header.alg?d(e):(o.payload.nonce||null)!==u?d({error:"invalid_token",errorDescription:'Nonce (nonce) claim value mismatch in the ID token; expected "'+u+'", found "'+o.payload.nonce+'"'}):t.access_token?r.client.userInfo(t.access_token,(function(e,t){return e?d(e):d(null,t)})):d({error:"invalid_token",description:"The id_token cannot be validated because it was signed with the HS256 algorithm and public clients (like a browser) can\u2019t store secrets. Please read the associated doc for possible ways to fix this. Read more: https://auth0.com/docs/errors/libraries/auth0-js/invalid-token#parsing-an-hs256-signed-id-token-without-an-access-token"})})):d(null,null)},Lr.prototype.validateToken=function(e,t,n){new sr({issuer:this.baseOptions.token_issuer,jwksURI:this.baseOptions.jwksURI,audience:this.baseOptions.clientID,leeway:this.baseOptions.leeway||60,maxAge:this.baseOptions.maxAge,__clock:this.baseOptions.__clock||Sr}).verify(e,t,(function(e,t){if(e)return n(In.invalidToken(e.message));n(null,t)}))},Lr.prototype.renewAuth=function(e,t){var n=!!e.usePostMessage,r=e.postMessageDataType||!1,o=e.postMessageOrigin||gn.getWindow().origin,i=e.timeout,a=this,s=cn.merge(this.baseOptions,["clientID","redirectUri","responseType","scope","audience","_csrf","state","_intstate","nonce"]).with(e);s.responseType=s.responseType||"token",s.responseMode=s.responseMode||"fragment",s=this.transactionManager.process(s),tn.check(s,{type:"object",message:"options parameter is not valid"}),tn.check(t,{type:"function",message:"cb parameter is not valid"}),s.prompt="none",s=cn.blacklist(s,["usePostMessage","tenant","postMessageDataType","postMessageOrigin"]),br.create({authenticationUrl:this.client.buildAuthorizeUrl(s),postMessageDataType:r,postMessageOrigin:o,timeout:i}).login(n,(function(e,n){if("object"==typeof n)return t(e,n);a.parseHash({hash:n},t)}))},Lr.prototype.checkSession=function(e,t){var n=cn.merge(this.baseOptions,["clientID","responseType","redirectUri","scope","audience","_csrf","state","_intstate","nonce"]).with(e);return"code"===n.responseType?t({error:"error",error_description:"responseType can't be `code`"}):(e.nonce||(n=this.transactionManager.process(n)),n.redirectUri?(tn.check(n,{type:"object",message:"options parameter is not valid"}),tn.check(t,{type:"function",message:"cb parameter is not valid"}),n=cn.blacklist(n,["usePostMessage","tenant","postMessageDataType"]),void this.webMessageHandler.run(n,Dn(t,{forceLegacyError:!0,ignoreCasing:!0}))):t({error:"error",error_description:"redirectUri can't be empty"}))},Lr.prototype.changePassword=function(e,t){return this.client.dbConnection.changePassword(e,t)},Lr.prototype.passwordlessStart=function(e,t){var n=cn.merge(this.baseOptions,["responseType","responseMode","redirectUri","scope","audience","_csrf","state","_intstate","nonce"]).with(e.authParams);return e.authParams=this.transactionManager.process(n),this.client.passwordless.start(e,t)},Lr.prototype.signup=function(e,t){return this.client.dbConnection.signup(e,t)},Lr.prototype.authorize=function(e){var t=cn.merge(this.baseOptions,["clientID","responseType","responseMode","redirectUri","scope","audience","_csrf","state","_intstate","nonce","organization","invitation"]).with(e);tn.check(t,{type:"object",message:"options parameter is not valid"},{responseType:{type:"string",message:"responseType option is required"}}),(t=this.transactionManager.process(t)).scope=t.scope||"openid profile email",gn.redirect(this.client.buildAuthorizeUrl(t))},Lr.prototype.signupAndAuthorize=function(e,t){var n=this;return this.client.dbConnection.signup(cn.blacklist(e,["popupHandler"]),(function(r){if(r)return t(r);e.realm=e.connection,e.username||(e.username=e.email),n.client.login(e,t)}))},Lr.prototype.login=function(e,t){var n=cn.merge(this.baseOptions,["clientID","responseType","redirectUri","scope","audience","_csrf","state","_intstate","nonce","onRedirecting","organization","invitation"]).with(e);n=this.transactionManager.process(n),gn.getWindow().location.host===this.baseOptions.domain?(n.connection=n.realm,delete n.realm,this._universalLogin.login(n,t)):this.crossOriginAuthentication.login(n,t)},Lr.prototype.passwordlessLogin=function(e,t){var n=cn.merge(this.baseOptions,["clientID","responseType","redirectUri","scope","audience","_csrf","state","_intstate","nonce","onRedirecting"]).with(e);if(n=this.transactionManager.process(n),gn.getWindow().location.host===this.baseOptions.domain)this.passwordlessVerify(n,t);else{var r=cn.extend({credentialType:"http://auth0.com/oauth/grant-type/passwordless/otp",realm:n.connection,username:n.email||n.phoneNumber,otp:n.verificationCode},cn.blacklist(n,["connection","email","phoneNumber","verificationCode"]));this.crossOriginAuthentication.login(r,t)}},Lr.prototype.crossOriginAuthenticationCallback=function(){this.crossOriginVerification()},Lr.prototype.crossOriginVerification=function(){this.crossOriginAuthentication.callback()},Lr.prototype.logout=function(e){gn.redirect(this.client.buildLogoutUrl(e))},Lr.prototype.passwordlessVerify=function(e,t){var n=this,r=cn.merge(this.baseOptions,["clientID","responseType","responseMode","redirectUri","scope","audience","_csrf","state","_intstate","nonce","onRedirecting"]).with(e);return tn.check(r,{type:"object",message:"options parameter is not valid"},{responseType:{type:"string",message:"responseType option is required"}}),r=this.transactionManager.process(r),this.client.passwordless.verify(r,(function(o){if(o)return t(o);function i(){gn.redirect(n.client.passwordless.buildVerifyUrl(r))}if("function"==typeof e.onRedirecting)return e.onRedirecting((function(){i()}));i()}))},Lr.prototype.renderCaptcha=function(e,t,n){return Dr(this.client,e,t,n)},kr.prototype.buildVerifyUrl=function(e){var t,n;return tn.check(e,{type:"object",message:"options parameter is not valid"},{connection:{type:"string",message:"connection option is required"},verificationCode:{type:"string",message:"verificationCode option is required"},phoneNumber:{optional:!1,type:"string",message:"phoneNumber option is required",condition:function(e){return!e.email}},email:{optional:!1,type:"string",message:"email option is required",condition:function(e){return!e.phoneNumber}}}),t=cn.merge(this.baseOptions,["clientID","responseType","responseMode","redirectUri","scope","audience","_csrf","state","_intstate","protocol","nonce"]).with(e),this.baseOptions._sendTelemetry&&(t.auth0Client=this.request.getTelemetryData()),t=cn.toSnakeCase(t,["auth0Client"]),n=vt(t),i(this.baseOptions.rootUrl,"passwordless","verify_redirect","?"+n)},kr.prototype.start=function(e,t){var n,r;tn.check(e,{type:"object",message:"options parameter is not valid"},{connection:{type:"string",message:"connection option is required"},send:{type:"string",message:"send option is required",values:["link","code"],value_message:"send is not valid ([link, code])"},phoneNumber:{optional:!0,type:"string",message:"phoneNumber option is required",condition:function(e){return"code"===e.send||!e.email}},email:{optional:!0,type:"string",message:"email option is required",condition:function(e){return"link"===e.send||!e.phoneNumber}},authParams:{optional:!0,type:"object",message:"authParams option is required"}}),tn.check(t,{type:"function",message:"cb parameter is not valid"}),n=i(this.baseOptions.rootUrl,"passwordless","start");var o=e.xRequestLanguage;delete e.xRequestLanguage,(r=cn.merge(this.baseOptions,["clientID","responseType","redirectUri","scope"]).with(e)).scope&&(r.authParams=r.authParams||{},r.authParams.scope=r.authParams.scope||r.scope),r.redirectUri&&(r.authParams=r.authParams||{},r.authParams.redirect_uri=r.authParams.redirectUri||r.redirectUri),r.responseType&&(r.authParams=r.authParams||{},r.authParams.response_type=r.authParams.responseType||r.responseType),delete r.redirectUri,delete r.responseType,delete r.scope,r=cn.toSnakeCase(r,["auth0Client","authParams"]);var a=o?{xRequestLanguage:o}:void 0;return this.request.post(n,a).send(r).end(Dn(t))},kr.prototype.verify=function(e,t){var n,r;return tn.check(e,{type:"object",message:"options parameter is not valid"},{connection:{type:"string",message:"connection option is required"},verificationCode:{type:"string",message:"verificationCode option is required"},phoneNumber:{optional:!1,type:"string",message:"phoneNumber option is required",condition:function(e){return!e.email}},email:{optional:!1,type:"string",message:"email option is required",condition:function(e){return!e.phoneNumber}}}),tn.check(t,{type:"function",message:"cb parameter is not valid"}),r=cn.pick(e,["connection","verificationCode","phoneNumber","email","auth0Client","clientID"]),r=cn.toSnakeCase(r,["auth0Client"]),n=i(this.baseOptions.rootUrl,"passwordless","verify"),this.request.post(n).send(r).end(Dn(t))},Cr.prototype.signup=function(e,t){var n,r,o;return tn.check(e,{type:"object",message:"options parameter is not valid"},{connection:{type:"string",message:"connection option is required"},email:{type:"string",message:"email option is required"},password:{type:"string",message:"password option is required"}}),tn.check(t,{type:"function",message:"cb parameter is not valid"}),n=i(this.baseOptions.rootUrl,"dbconnections","signup"),o=(r=cn.merge(this.baseOptions,["clientID","state"]).with(e)).user_metadata||r.userMetadata,r=cn.blacklist(r,["scope","userMetadata","user_metadata"]),r=cn.toSnakeCase(r,["auth0Client"]),o&&(r.user_metadata=o),this.request.post(n).send(r).end(Dn(t))},Cr.prototype.changePassword=function(e,t){var n,r;return tn.check(e,{type:"object",message:"options parameter is not valid"},{connection:{type:"string",message:"connection option is required"},email:{type:"string",message:"email option is required"}}),tn.check(t,{type:"function",message:"cb parameter is not valid"}),n=i(this.baseOptions.rootUrl,"dbconnections","change_password"),r=cn.merge(this.baseOptions,["clientID"]).with(e,["email","connection"]),r=cn.toSnakeCase(r,["auth0Client"]),this.request.post(n).send(r).end(Dn(t))},Er.prototype.buildAuthorizeUrl=function(e){var t,n;return tn.check(e,{type:"object",message:"options parameter is not valid"}),t=cn.merge(this.baseOptions,["clientID","responseType","responseMode","redirectUri","scope","audience"]).with(e),tn.check(t,{type:"object",message:"options parameter is not valid"},{clientID:{type:"string",message:"clientID option is required"},redirectUri:{optional:!0,type:"string",message:"redirectUri option is required"},responseType:{type:"string",message:"responseType option is required"},nonce:{type:"string",message:"nonce option is required",condition:function(e){return-1===e.responseType.indexOf("code")&&-1!==e.responseType.indexOf("id_token")}},scope:{optional:!0,type:"string",message:"scope option is required"},audience:{optional:!0,type:"string",message:"audience option is required"}}),this.baseOptions._sendTelemetry&&(t.auth0Client=this.request.getTelemetryData()),t.connection_scope&&tn.isArray(t.connection_scope)&&(t.connection_scope=t.connection_scope.join(",")),t=cn.blacklist(t,["username","popupOptions","domain","tenant","timeout","appState"]),t=cn.toSnakeCase(t,["auth0Client"]),t=Cn(this.warn,t),n=vt(t),i(this.baseOptions.rootUrl,"authorize","?"+n)},Er.prototype.buildLogoutUrl=function(e){var t,n;return tn.check(e,{optional:!0,type:"object",message:"options parameter is not valid"}),t=cn.merge(this.baseOptions,["clientID"]).with(e||{}),this.baseOptions._sendTelemetry&&(t.auth0Client=this.request.getTelemetryData()),t=cn.toSnakeCase(t,["auth0Client","returnTo"]),n=vt(cn.blacklist(t,["federated"])),e&&void 0!==e.federated&&!1!==e.federated&&"false"!==e.federated&&(n+="&federated"),i(this.baseOptions.rootUrl,"v2","logout","?"+n)},Er.prototype.loginWithDefaultDirectory=function(e,t){return tn.check(e,{type:"object",message:"options parameter is not valid"},{username:{type:"string",message:"username option is required"},password:{type:"string",message:"password option is required"},scope:{optional:!0,type:"string",message:"scope option is required"},audience:{optional:!0,type:"string",message:"audience option is required"}}),e.grantType="password",this.oauthToken(e,t)},Er.prototype.login=function(e,t){return tn.check(e,{type:"object",message:"options parameter is not valid"},{username:{type:"string",message:"username option is required"},password:{type:"string",message:"password option is required"},realm:{type:"string",message:"realm option is required"},scope:{optional:!0,type:"string",message:"scope option is required"},audience:{optional:!0,type:"string",message:"audience option is required"}}),e.grantType="http://auth0.com/oauth/grant-type/password-realm",this.oauthToken(e,t)},Er.prototype.oauthToken=function(e,t){var n,r;return tn.check(e,{type:"object",message:"options parameter is not valid"}),tn.check(t,{type:"function",message:"cb parameter is not valid"}),n=i(this.baseOptions.rootUrl,"oauth","token"),r=cn.merge(this.baseOptions,["clientID","scope","audience"]).with(e),tn.check(r,{type:"object",message:"options parameter is not valid"},{clientID:{type:"string",message:"clientID option is required"},grantType:{type:"string",message:"grantType option is required"},scope:{optional:!0,type:"string",message:"scope option is required"},audience:{optional:!0,type:"string",message:"audience option is required"}}),r=cn.toSnakeCase(r,["auth0Client"]),r=kn(this.warn,r),this.request.post(n).send(r).end(Dn(t))},Er.prototype.loginWithResourceOwner=function(e,t){var n,r;return tn.check(e,{type:"object",message:"options parameter is not valid"},{username:{type:"string",message:"username option is required"},password:{type:"string",message:"password option is required"},connection:{type:"string",message:"connection option is required"},scope:{optional:!0,type:"string",message:"scope option is required"}}),tn.check(t,{type:"function",message:"cb parameter is not valid"}),n=i(this.baseOptions.rootUrl,"oauth","ro"),r=cn.merge(this.baseOptions,["clientID","scope"]).with(e,["username","password","scope","connection","device"]),(r=cn.toSnakeCase(r,["auth0Client"])).grant_type=r.grant_type||"password",this.request.post(n).send(r).end(Dn(t))},Er.prototype.getSSOData=function(e,t){if(this.auth0||(this.auth0=new Lr(this.baseOptions)),gn.getWindow().location.host===this.baseOptions.domain)return this.auth0._universalLogin.getSSOData(e,t);"function"==typeof e&&(t=e),tn.check(t,{type:"function",message:"cb parameter is not valid"});var n=this.baseOptions.clientID,r=this.ssodataStorage.get()||{};this.auth0.checkSession({responseType:"token id_token",scope:"openid profile email",connection:r.lastUsedConnection,timeout:5e3},(function(e,o){return e?"login_required"===e.error?t(null,{sso:!1}):("consent_required"===e.error&&(e.error_description="Consent required. When using `getSSOData`, the user has to be authenticated with the following scope: `openid profile email`."),t(e,{sso:!1})):r.lastUsedSub&&r.lastUsedSub!==o.idTokenPayload.sub?t(e,{sso:!1}):t(null,{lastUsedConnection:{name:r.lastUsedConnection},lastUsedUserID:o.idTokenPayload.sub,lastUsedUsername:o.idTokenPayload.email||o.idTokenPayload.name,lastUsedClientID:n,sessionClients:[n],sso:!0})}))},Er.prototype.userInfo=function(e,t){var n;return tn.check(e,{type:"string",message:"accessToken parameter is not valid"}),tn.check(t,{type:"function",message:"cb parameter is not valid"}),n=i(this.baseOptions.rootUrl,"userinfo"),this.request.get(n).set("Authorization","Bearer "+e).end(Dn(t,{ignoreCasing:!0}))},Er.prototype.getChallenge=function(e){if(tn.check(e,{type:"function",message:"cb parameter is not valid"}),!this.baseOptions.state)return e();var t=i(this.baseOptions.rootUrl,"usernamepassword","challenge");return this.request.post(t).send({state:this.baseOptions.state}).end(Dn(e,{ignoreCasing:!0}))},Er.prototype.delegation=function(e,t){var n,r;return tn.check(e,{type:"object",message:"options parameter is not valid"},{grant_type:{type:"string",message:"grant_type option is required"}}),tn.check(t,{type:"function",message:"cb parameter is not valid"}),n=i(this.baseOptions.rootUrl,"delegation"),r=cn.merge(this.baseOptions,["clientID"]).with(e),r=cn.toSnakeCase(r,["auth0Client"]),this.request.post(n).send(r).end(Dn(t))},Er.prototype.getUserCountry=function(e){var t;return tn.check(e,{type:"function",message:"cb parameter is not valid"}),t=i(this.baseOptions.rootUrl,"user","geoloc","country"),this.request.get(t).end(Dn(e))},_r.prototype.getUser=function(e,t){var n;return tn.check(e,{type:"string",message:"userId parameter is not valid"}),tn.check(t,{type:"function",message:"cb parameter is not valid"}),n=i(this.baseOptions.rootUrl,"users",e),this.request.get(n).end(Dn(t,{ignoreCasing:!0}))},_r.prototype.patchUserMetadata=function(e,t,n){var r;return tn.check(e,{type:"string",message:"userId parameter is not valid"}),tn.check(t,{type:"object",message:"userMetadata parameter is not valid"}),tn.check(n,{type:"function",message:"cb parameter is not valid"}),r=i(this.baseOptions.rootUrl,"users",e),this.request.patch(r).send({user_metadata:t}).end(Dn(n,{ignoreCasing:!0}))},_r.prototype.patchUserAttributes=function(e,t,n){var r;return tn.check(e,{type:"string",message:"userId parameter is not valid"}),tn.check(t,{type:"object",message:"user parameter is not valid"}),tn.check(n,{type:"function",message:"cb parameter is not valid"}),r=i(this.baseOptions.rootUrl,"users",e),this.request.patch(r).send(t).end(Dn(n,{ignoreCasing:!0}))},_r.prototype.linkUser=function(e,t,n){var r;return tn.check(e,{type:"string",message:"userId parameter is not valid"}),tn.check(t,{type:"string",message:"secondaryUserToken parameter is not valid"}),tn.check(n,{type:"function",message:"cb parameter is not valid"}),r=i(this.baseOptions.rootUrl,"users",e,"identities"),this.request.post(r).send({link_with:t}).end(Dn(n,{ignoreCasing:!0}))};var Tr={Authentication:Er,Management:_r,WebAuth:Lr,version:Jt};t.default=Tr},1445:function(e,t,n){e.exports=function(){"use strict";var e="9.19.1",t=Object.prototype.toString;function r(e,t,n,r){if(n="array"===n?"object":n,e&&typeof e[t]!==n)throw new Error(r)}function o(e,t,n){if(typeof e!==t)throw new Error(n)}function i(e,t,n){if(-1===t.indexOf(e))throw new Error(n)}var a={check:function(e,t,n){if(t.optional&&!e||o(e,t.type,t.message),"object"===t.type&&n)for(var a=Object.keys(n),s=0;s=65&&t<=90||!o&&t>=48&&t<=57?(n+="_",n+=e[r].toLowerCase()):n+=e[r].toLowerCase(),o=t>=48&&t<=57,i=t>=65&&t<=90,r++;return n}(o):o]=e(t[o]),r}),{}))},toCamelCase:function e(t,n,r){return"object"!=typeof t||a.isArray(t)||null===t?t:(n=n||[],r=r||{},Object.keys(t).reduce((function(o,i){var a,s=-1===n.indexOf(i)?(a=i.split("_")).reduce((function(e,t){return e+t.charAt(0).toUpperCase()+t.slice(1)}),a.shift()):i;return o[s]=e(t[s]||t[i],[],r),r.keepOriginal&&(o[i]=e(t[i],[],r)),o}),{}))},blacklist:function(e,t){return Object.keys(e).reduce((function(n,r){return-1===t.indexOf(r)&&(n[r]=e[r]),n}),{})},merge:function(e,t){return{base:t?l(e,t):e,with:function(e,t){return e=t?l(e,t):e,d(this.base,e)}}},pick:l,getKeysNotIn:function(e,t){var n=[];for(var r in e)-1===t.indexOf(r)&&n.push(r);return n},extend:d,getOriginFromUrl:function(e){if(e){var t=f(e);if(!t)return null;var n=t.protocol+"//"+t.hostname;return t.port&&(n+=":"+t.port),n}},getLocationFromUrl:f,trimUserDetails:function(e){return function(e,t){return["username","email","phoneNumber"].reduce(p,e)}(e)},updatePropertyOn:function e(t,n,r){"string"==typeof n&&(n=n.split("."));var o=n[0];t.hasOwnProperty(o)&&(1===n.length?t[o]=r:e(t[o],n.slice(1),r))}};function g(){return window}var y={redirect:function(e){g().location=e},getDocument:function(){return g().document},getWindow:g,getOrigin:function(){var e=g().location,t=e.origin;return t||(t=h.getOriginFromUrl(e.href)),t}},m="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof n.g?n.g:"undefined"!=typeof self?self:{};function v(e,t){return e(t={exports:{}},t.exports),t.exports}var M=v((function(e){var t,n;t=m,n=function(){function e(e){var t=[];if(0===e.length)return"";if("string"!=typeof e[0])throw new TypeError("Url must be a string. Received "+e[0]);if(e[0].match(/^[^/:]+:\/*$/)&&e.length>1){var n=e.shift();e[0]=n+e[0]}e[0].match(/^file:\/\/\//)?e[0]=e[0].replace(/^([^/:]+):\/*/,"$1:///"):e[0]=e[0].replace(/^([^/:]+):\/*/,"$1://");for(var r=0;r0&&(o=o.replace(/^[\/]+/,"")),o=r0?"?":"")+a.join("&")}return function(){return e("object"==typeof arguments[0]?arguments[0]:[].slice.call(arguments))}},e.exports?e.exports=n():t.urljoin=n()})),b="undefined"!=typeof Symbol&&Symbol,j="Function.prototype.bind called on incompatible ",w=Array.prototype.slice,x=Object.prototype.toString,N=Function.prototype.bind||function(e){var t=this;if("function"!=typeof t||"[object Function]"!==x.call(t))throw new TypeError(j+t);for(var n,r=w.call(arguments,1),o=function(){if(this instanceof n){var o=t.apply(this,r.concat(w.call(arguments)));return Object(o)===o?o:this}return t.apply(e,r.concat(w.call(arguments)))},i=Math.max(0,t.length-r.length),a=[],s=0;s1&&"boolean"!=typeof t)throw new L('"allowMissing" argument must be a boolean');if(null===G(/^%?[^%]*%?$/g,e))throw new D("`%` may not be present anywhere but at the beginning and end of the intrinsic name");var n=Z(e),r=n.length>0?n[0]:"",o=V("%"+r+"%",t),i=o.name,a=o.value,s=!1,u=o.alias;u&&(r=u[0],F(n,B([0,1],u)));for(var l=1,c=!0;l=n.length){var h=C(a,d);a=(c=!!h)&&"get"in h&&!("originalValue"in h.get)?h.get:a[d]}else c=I(a,d),a=a[d];c&&!s&&(P[i]=a)}}return a},J=v((function(e){var t=q("%Function.prototype.apply%"),n=q("%Function.prototype.call%"),r=q("%Reflect.apply%",!0)||N.call(n,t),o=q("%Object.getOwnPropertyDescriptor%",!0),i=q("%Object.defineProperty%",!0),a=q("%Math.max%");if(i)try{i({},"a",{value:1})}catch(Et){i=null}e.exports=function(e){var t=r(N,n,arguments);return o&&i&&o(t,"length").configurable&&i(t,"length",{value:1+a(0,e.length-(arguments.length-1))}),t};var s=function(){return r(N,t,arguments)};i?i(e.exports,"apply",{value:s}):e.exports.apply=s})),K=(J.apply,J(q("String.prototype.indexOf"))),X=function(e,t){var n=q(e,!!t);return"function"==typeof n&&K(e,".prototype.")>-1?J(n):n},$=(E=Object.freeze({__proto__:null,default:{}}))&&E.default||E,ee="function"==typeof Map&&Map.prototype,te=Object.getOwnPropertyDescriptor&&ee?Object.getOwnPropertyDescriptor(Map.prototype,"size"):null,ne=ee&&te&&"function"==typeof te.get?te.get:null,re=ee&&Map.prototype.forEach,oe="function"==typeof Set&&Set.prototype,ie=Object.getOwnPropertyDescriptor&&oe?Object.getOwnPropertyDescriptor(Set.prototype,"size"):null,ae=oe&&ie&&"function"==typeof ie.get?ie.get:null,se=oe&&Set.prototype.forEach,ue="function"==typeof WeakMap&&WeakMap.prototype?WeakMap.prototype.has:null,le="function"==typeof WeakSet&&WeakSet.prototype?WeakSet.prototype.has:null,ce="function"==typeof WeakRef&&WeakRef.prototype?WeakRef.prototype.deref:null,de=Boolean.prototype.valueOf,fe=Object.prototype.toString,pe=Function.prototype.toString,he=String.prototype.match,ge=String.prototype.slice,ye=String.prototype.replace,me=String.prototype.toUpperCase,ve=String.prototype.toLowerCase,Me=RegExp.prototype.test,be=Array.prototype.concat,je=Array.prototype.join,we=Array.prototype.slice,xe=Math.floor,Ne="function"==typeof BigInt?BigInt.prototype.valueOf:null,Ie=Object.getOwnPropertySymbols,De="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?Symbol.prototype.toString:null,Se="function"==typeof Symbol&&"object"==typeof Symbol.iterator,Le="function"==typeof Symbol&&Symbol.toStringTag&&(Symbol.toStringTag,1)?Symbol.toStringTag:null,ke=Object.prototype.propertyIsEnumerable,Ce=("function"==typeof Reflect?Reflect.getPrototypeOf:Object.getPrototypeOf)||([].__proto__===Array.prototype?function(e){return e.__proto__}:null);function Ee(e,t){if(e===1/0||e===-1/0||e!=e||e&&e>-1e3&&e<1e3||Me.call(/e/,t))return t;var n=/[0-9](?=(?:[0-9]{3})+(?![0-9]))/g;if("number"==typeof e){var r=e<0?-xe(-e):xe(e);if(r!==e){var o=String(r),i=ge.call(t,o.length+1);return ye.call(o,n,"$&_")+"."+ye.call(ye.call(i,/([0-9]{3})/g,"$&_"),/_$/,"")}}return ye.call(t,n,"$&_")}var _e=$.custom,Te=Re(_e)?_e:null,Ae=function e(t,n,r,o){var i=n||{};if(Fe(i,"quoteStyle")&&"single"!==i.quoteStyle&&"double"!==i.quoteStyle)throw new TypeError('option "quoteStyle" must be "single" or "double"');if(Fe(i,"maxStringLength")&&("number"==typeof i.maxStringLength?i.maxStringLength<0&&i.maxStringLength!==1/0:null!==i.maxStringLength))throw new TypeError('option "maxStringLength", if provided, must be a positive integer, Infinity, or `null`');var a=!Fe(i,"customInspect")||i.customInspect;if("boolean"!=typeof a&&"symbol"!==a)throw new TypeError("option \"customInspect\", if provided, must be `true`, `false`, or `'symbol'`");if(Fe(i,"indent")&&null!==i.indent&&"\t"!==i.indent&&!(parseInt(i.indent,10)===i.indent&&i.indent>0))throw new TypeError('option "indent" must be "\\t", an integer > 0, or `null`');if(Fe(i,"numericSeparator")&&"boolean"!=typeof i.numericSeparator)throw new TypeError('option "numericSeparator", if provided, must be `true` or `false`');var s=i.numericSeparator;if(void 0===t)return"undefined";if(null===t)return"null";if("boolean"==typeof t)return t?"true":"false";if("string"==typeof t)return function e(t,n){if(t.length>n.maxStringLength){var r=t.length-n.maxStringLength,o="... "+r+" more character"+(r>1?"s":"");return e(ge.call(t,0,n.maxStringLength),n)+o}return Oe(ye.call(ye.call(t,/(['\\])/g,"\\$1"),/[\x00-\x1f]/g,Ge),"single",n)}(t,i);if("number"==typeof t){if(0===t)return 1/0/t>0?"0":"-0";var u=String(t);return s?Ee(t,u):u}if("bigint"==typeof t){var l=String(t)+"n";return s?Ee(t,l):l}var c=void 0===i.depth?5:i.depth;if(void 0===r&&(r=0),r>=c&&c>0&&"object"==typeof t)return Ue(t)?"[Array]":"[Object]";var d,f=function(e,t){var n;if("\t"===e.indent)n="\t";else{if(!("number"==typeof e.indent&&e.indent>0))return null;n=je.call(Array(e.indent+1)," ")}return{base:n,prev:je.call(Array(t+1),n)}}(i,r);if(void 0===o)o=[];else if(Qe(o,t)>=0)return"[Circular]";function p(t,n,a){if(n&&(o=we.call(o)).push(n),a){var s={depth:i.depth};return Fe(i,"quoteStyle")&&(s.quoteStyle=i.quoteStyle),e(t,s,r+1,o)}return e(t,i,r+1,o)}if("function"==typeof t&&!Pe(t)){var h=function(e){if(e.name)return e.name;var t=he.call(pe.call(e),/^function\s*([\w$]+)/);return t?t[1]:null}(t),g=qe(t,p);return"[Function"+(h?": "+h:" (anonymous)")+"]"+(g.length>0?" { "+je.call(g,", ")+" }":"")}if(Re(t)){var y=Se?ye.call(String(t),/^(Symbol\(.*\))_[^)]*$/,"$1"):De.call(t);return"object"!=typeof t||Se?y:We(y)}if((d=t)&&"object"==typeof d&&("undefined"!=typeof HTMLElement&&d instanceof HTMLElement||"string"==typeof d.nodeName&&"function"==typeof d.getAttribute)){for(var m="<"+ve.call(String(t.nodeName)),v=t.attributes||[],M=0;M"}if(Ue(t)){if(0===t.length)return"[]";var b=qe(t,p);return f&&!function(e){for(var t=0;t=0)return!1;return!0}(b)?"["+Ve(b,f)+"]":"[ "+je.call(b,", ")+" ]"}if(function(e){return!("[object Error]"!==Ye(e)||Le&&"object"==typeof e&&Le in e)}(t)){var j=qe(t,p);return"cause"in Error.prototype||!("cause"in t)||ke.call(t,"cause")?0===j.length?"["+String(t)+"]":"{ ["+String(t)+"] "+je.call(j,", ")+" }":"{ ["+String(t)+"] "+je.call(be.call("[cause]: "+p(t.cause),j),", ")+" }"}if("object"==typeof t&&a){if(Te&&"function"==typeof t[Te]&&$)return $(t,{depth:c-r});if("symbol"!==a&&"function"==typeof t.inspect)return t.inspect()}if(function(e){if(!ne||!e||"object"!=typeof e)return!1;try{ne.call(e);try{ae.call(e)}catch(m){return!0}return e instanceof Map}catch(Et){}return!1}(t)){var w=[];return re.call(t,(function(e,n){w.push(p(n,t,!0)+" => "+p(e,t))})),Ze("Map",ne.call(t),w,f)}if(function(e){if(!ae||!e||"object"!=typeof e)return!1;try{ae.call(e);try{ne.call(e)}catch(t){return!0}return e instanceof Set}catch(Et){}return!1}(t)){var x=[];return se.call(t,(function(e){x.push(p(e,t))})),Ze("Set",ae.call(t),x,f)}if(function(e){if(!ue||!e||"object"!=typeof e)return!1;try{ue.call(e,ue);try{le.call(e,le)}catch(m){return!0}return e instanceof WeakMap}catch(Et){}return!1}(t))return He("WeakMap");if(function(e){if(!le||!e||"object"!=typeof e)return!1;try{le.call(e,le);try{ue.call(e,ue)}catch(m){return!0}return e instanceof WeakSet}catch(Et){}return!1}(t))return He("WeakSet");if(function(e){if(!ce||!e||"object"!=typeof e)return!1;try{return ce.call(e),!0}catch(Et){}return!1}(t))return He("WeakRef");if(function(e){return!("[object Number]"!==Ye(e)||Le&&"object"==typeof e&&Le in e)}(t))return We(p(Number(t)));if(function(e){if(!e||"object"!=typeof e||!Ne)return!1;try{return Ne.call(e),!0}catch(Et){}return!1}(t))return We(p(Ne.call(t)));if(function(e){return!("[object Boolean]"!==Ye(e)||Le&&"object"==typeof e&&Le in e)}(t))return We(de.call(t));if(function(e){return!("[object String]"!==Ye(e)||Le&&"object"==typeof e&&Le in e)}(t))return We(p(String(t)));if(!function(e){return!("[object Date]"!==Ye(e)||Le&&"object"==typeof e&&Le in e)}(t)&&!Pe(t)){var N=qe(t,p),I=Ce?Ce(t)===Object.prototype:t instanceof Object||t.constructor===Object,D=t instanceof Object?"":"null prototype",S=!I&&Le&&Object(t)===t&&Le in t?ge.call(Ye(t),8,-1):D?"Object":"",L=(I||"function"!=typeof t.constructor?"":t.constructor.name?t.constructor.name+" ":"")+(S||D?"["+je.call(be.call([],S||[],D||[]),": ")+"] ":"");return 0===N.length?L+"{}":f?L+"{"+Ve(N,f)+"}":L+"{ "+je.call(N,", ")+" }"}return String(t)};function Oe(e,t,n){var r="double"===(n.quoteStyle||t)?'"':"'";return r+e+r}function ze(e){return ye.call(String(e),/"/g,""")}function Ue(e){return!("[object Array]"!==Ye(e)||Le&&"object"==typeof e&&Le in e)}function Pe(e){return!("[object RegExp]"!==Ye(e)||Le&&"object"==typeof e&&Le in e)}function Re(e){if(Se)return e&&"object"==typeof e&&e instanceof Symbol;if("symbol"==typeof e)return!0;if(!e||"object"!=typeof e||!De)return!1;try{return De.call(e),!0}catch(Et){}return!1}var Be=Object.prototype.hasOwnProperty||function(e){return e in this};function Fe(e,t){return Be.call(e,t)}function Ye(e){return fe.call(e)}function Qe(e,t){if(e.indexOf)return e.indexOf(t);for(var n=0,r=e.length;n1;){var t=e.pop(),n=t.obj[t.prop];if(ft(n)){for(var r=[],o=0;o=48&&u<=57||u>=65&&u<=90||u>=97&&u<=122||o===ct.RFC1738&&(40===u||41===u)?a+=i.charAt(s):u<128?a+=pt[u]:u<2048?a+=pt[192|u>>6]+pt[128|63&u]:u<55296||u>=57344?a+=pt[224|u>>12]+pt[128|u>>6&63]+pt[128|63&u]:(s+=1,u=65536+((1023&u)<<10|1023&i.charCodeAt(s)),a+=pt[240|u>>18]+pt[128|u>>12&63]+pt[128|u>>6&63]+pt[128|63&u])}return a},isBuffer:function(e){return!(!e||"object"!=typeof e)&&!!(e.constructor&&e.constructor.isBuffer&&e.constructor.isBuffer(e))},isRegExp:function(e){return"[object RegExp]"===Object.prototype.toString.call(e)},maybeMap:function(e,t){if(ft(e)){for(var n=[],r=0;r0?v.join(",")||null:void 0}];else if(vt(u))S=u;else{var k=Object.keys(v);S=l?k.sort(l):k}for(var C=o&&vt(v)&&1===v.length?n+"[]":n,E=0;E0?p+f:""});function Lt(e){this.webAuth=e,this._current_popup=null,this.options=null}function kt(e){this.webAuth=e}function Ct(){this.webAuth=null,this.version=e,this.extensibilityPoints=["popup.authorize","popup.getPopupHandler"]}return Lt.prototype.preload=function(e){var t=this,n=y.getWindow(),r=e.url||"about:blank",o=e.popupOptions||{};o.location="yes",delete o.width,delete o.height;var i=St(o,{encode:!1,delimiter:","});return this._current_popup&&!this._current_popup.closed||(this._current_popup=n.open(r,"_blank",i),this._current_popup.kill=function(e){t._current_popup.success=e,this.close(),t._current_popup=null}),this._current_popup},Lt.prototype.load=function(e,t,n,r){var o=this;this.url=e,this.options=n,this._current_popup?this._current_popup.location.href=e:(n.url=e,this.preload(n)),this.transientErrorHandler=function(e){o.errorHandler(e,r)},this.transientStartHandler=function(e){o.startHandler(e,r)},this.transientExitHandler=function(){o.exitHandler(r)},this._current_popup.addEventListener("loaderror",this.transientErrorHandler),this._current_popup.addEventListener("loadstart",this.transientStartHandler),this._current_popup.addEventListener("exit",this.transientExitHandler)},Lt.prototype.errorHandler=function(e,t){this._current_popup&&(this._current_popup.kill(!0),t({error:"window_error",errorDescription:e.message}))},Lt.prototype.unhook=function(){this._current_popup.removeEventListener("loaderror",this.transientErrorHandler),this._current_popup.removeEventListener("loadstart",this.transientStartHandler),this._current_popup.removeEventListener("exit",this.transientExitHandler)},Lt.prototype.exitHandler=function(e){this._current_popup&&(this.unhook(),this._current_popup.success||e({error:"window_closed",errorDescription:"Browser window closed"}))},Lt.prototype.startHandler=function(e,t){var n=this;if(this._current_popup){var r=M("https:",this.webAuth.baseOptions.domain,"/mobile");if(!e.url||0===e.url.indexOf(r+"#")){var o=e.url.split("#");if(1!==o.length){var i={hash:o.pop()};this.options.nonce&&(i.nonce=this.options.nonce),this.webAuth.parseHash(i,(function(e,r){(e||r)&&(n._current_popup.kill(!0),t(e,r))}))}}}},kt.prototype.processParams=function(e){return e.redirectUri=M("https://"+e.domain,"mobile"),delete e.owp,e},kt.prototype.getPopupHandler=function(){return new Lt(this.webAuth)},Ct.prototype.setWebAuth=function(e){this.webAuth=e},Ct.prototype.supports=function(e){var t=y.getWindow();return(!!t.cordova||!!t.electron)&&this.extensibilityPoints.indexOf(e)>-1},Ct.prototype.init=function(){return new kt(this.webAuth)},Ct}()},8738:function(e){"use strict";var t={addClass:function(e,n){return n&&(e.classList?e.classList.add(n):t.hasClass(e,n)||(e.className=e.className+" "+n)),e},removeClass:function(e,n){return n&&(e.classList?e.classList.remove(n):t.hasClass(e,n)&&(e.className=e.className.replace(new RegExp("(^|\\s)"+n+"(?:\\s|$)","g"),"$1").replace(/\s+/g," ").replace(/^\s*|\s*$/g,""))),e},hasClass:function(e,t){return e.classList?!!t&&e.classList.contains(t):(" "+e.className+" ").indexOf(" "+t+" ")>-1}};e.exports=t},8837:function(e,t,n){"use strict";t.__esModule=!0,t.debouncedRequestAvatar=void 0,t.requestAvatar=p;var r=n(5831),o=n(2982),i=u(n(6753)),a=u(n(3559)),s=u(n(1181));function u(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n]);return t.default=e,t}var l=(0,o.dataFns)(["avatar"]),c=l.tget,d=l.tset,f={};function p(e,t){if(f[t])return g(e,t,f[t].url,f[t].displayName,!0);var n=s.ui.avatarProvider((0,r.read)(r.getEntity,"lock",e)).toJS();(0,r.swap)(r.updateEntity,"lock",e,(function(e){return e=d(e,"syncStatus","loading"),e=d(e,"src",t)}));var o=void 0,a=void 0;n.url(t,(function(n,r){if(n)return y(e,t);i.img(r,(function(n,r){if(n)return y(e,t);o=r.src,void 0!==a&&h(e,t,o,a)}))})),n.displayName(t,(function(n,r){if(n)return y(e);a=r,void 0!==o&&h(e,t,o,a)}))}t.debouncedRequestAvatar=a.debounce(p,300);function h(e,t,n,r){f[t]={url:n,displayName:r},g(e,t,n,r)}function g(e,t,n,o){var i=arguments.length>4&&void 0!==arguments[4]&&arguments[4];(0,r.swap)(r.updateEntity,"lock",e,(function(e){return(i||c(e,"src")===t)&&(e=d(e,"syncStatus","ok"),e=d(e,"url",n),e=d(e,"src",t),e=d(e,"displayName",o)),e}))}function y(e,t){(0,r.swap)(r.updateEntity,"lock",e,(function(e){return"src"===c(e,"src")?d(e,"syncStatus","error"):e}))}},817:function(e,t,n){"use strict";t.__esModule=!0,t.displayName=function(e,t){if(e=l(e),!(0,a.validateEmail)(e))return t({});var n="https://secure.gravatar.com/"+u(e)+".json";i.default.get(n,(function(e,n){!e&&n&&n.entry&&n.entry[0]?t(null,n.entry[0].displayName):t({})}))},t.url=function(e,t){if(e=l(e),!(0,a.validateEmail)(e))return t({});t(null,"https://secure.gravatar.com/avatar/"+u(e)+"?d=404&s=160")};var r=s(n(8839)),o=s(n(6070)),i=s(n(1558)),a=n(183);function s(e){return e&&e.__esModule?e:{default:e}}var u=r.default.md5||r.default;function l(e){return"string"===typeof e?(0,o.default)(e.toLowerCase()):""}},2496:function(e,t,n){"use strict";t.__esModule=!0,t.showMissingCaptcha=function(e,t){var n="recaptcha_v2"===o.captcha(e).get("provider")?"invalid_recaptcha":"invalid_captcha",r=a.html(e,["error","login",n]);return(0,s.swap)(s.updateEntity,"lock",t,(function(e){return e=o.setSubmitting(e,!1,r),i.showInvalidField(e,"captcha")})),e},t.setCaptchaParams=function(e,t,n){if(!o.captcha(e)||!o.captcha(e).get("required"))return!0;var r=i.getFieldValue(e,"captcha");if(!r)return!1;return t.captcha=r,n.push("captcha"),!0},t.swapCaptcha=function(e,t,n){return l.default.getChallenge(e,(function(r,i){!r&&i&&(0,s.swap)(s.updateEntity,"lock",e,o.setCaptcha,i,t),n&&n()}))};var r,o=c(n(1181)),i=c(n(6782)),a=c(n(2454)),s=n(5831),u=n(3564),l=(r=u)&&r.__esModule?r:{default:r};function c(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n]);return t.default=e,t}},427:function(e,t,n){"use strict";t.__esModule=!0,t.logIn=function(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1],n=(0,o.read)(o.getEntity,"lock",e),r=(0,d.databaseLogInWithEmail)(n)?"email":"username",i=l.getFieldValue(n,r),a={connection:(0,d.databaseConnectionName)(n),username:i,password:l.getFieldValue(n,"password")},u=[r,"password"],c=(0,p.setCaptchaParams)(n,a,u);if(!c)return(0,p.showMissingCaptcha)(n,e);var f=l.getFieldValue(n,"mfa_code");t&&(a.mfa_code=f,u.push("mfa_code"));(0,s.logIn)(e,u,a,(function(e,t,n,r){if("a0.mfa_required"===t.error)return M(e);if(t){var o=t&&"invalid_captcha"===t.code;return(0,p.swapCaptcha)(e,o,r)}r()}))},t.signUp=function(e){var t=(0,o.read)(o.getEntity,"lock",e),n=["email","password"];(0,d.databaseConnectionRequiresUsername)(t)&&!(0,d.signUpHideUsernameField)(t)&&n.push("username");(0,d.additionalSignUpFields)(t).forEach((function(e){return n.push(e.get("name"))})),(0,s.validateAndSubmit)(e,n,(function(t){var r={connection:(0,d.databaseConnectionName)(t),email:l.getFieldValue(t,"email"),password:l.getFieldValue(t,"password"),autoLogin:(0,d.shouldAutoLogin)(t)};if(!(0,p.setCaptchaParams)(t,r,n))return(0,p.showMissingCaptcha)(t,e);if((0,d.databaseConnectionRequiresUsername)(t))if((0,d.signUpHideUsernameField)(t)){var o=(0,d.databaseConnection)(t).getIn(["validation","username"]),i=o?o.toJS():{max:15};r.username=function(e){for(var t="",n="abcdefghijklmnopqrstuvwxyz0123456789",r=n.length,o=0;o3?o-3:0),a=3;a1&&void 0!==arguments[1]?arguments[1]:["password"];(0,o.swap)(o.updateEntity,"lock",e,d.setScreen,"signUp",t)},t.showResetPasswordActivity=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:["password"];(0,o.swap)(o.updateEntity,"lock",e,d.setScreen,"forgotPassword",t)},t.cancelResetPassword=function(e){return v(e)},t.cancelMFALogin=function(e){return v(e)},t.toggleTermsAcceptance=function(e){(0,o.swap)(o.updateEntity,"lock",e,d.toggleTermsAcceptance)},t.showLoginMFAActivity=M;var r,o=n(5831),i=n(3564),a=(r=i)&&r.__esModule?r:{default:r},s=n(4137),u=h(n(1181)),l=h(n(6782)),c=n(313),d=n(5037),f=h(n(2454)),p=n(2496);function h(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n]);return t.default=e,t}function g(e,t,n){var r=(0,o.read)(o.getEntity,"lock",e);if(u.emitEvent(r,"signup success",t),(0,d.shouldAutoLogin)(r)){(0,o.swap)(o.updateEntity,"lock",e,(function(e){return e.set("signedUp",!0)}));var i={connection:(0,d.databaseConnectionName)(r),username:l.email(r),password:l.password(r)};return n&&(i.popupHandler=n),a.default.logIn(e,i,u.auth.params(r).toJS(),(function(t){for(var n=arguments.length,r=Array(n>1?n-1:0),o=1;o1&&void 0!==arguments[1]?arguments[1]:["password"];(0,o.swap)(o.updateEntity,"lock",e,d.setScreen,"login",t)}function M(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:["mfa_code"];(0,o.swap)(o.updateEntity,"lock",e,d.setScreen,"mfaLogin",t)}},5037:function(e,t,n){"use strict";t.__esModule=!0,t.initDatabase=function(e,t){return e=g(e,o.default.fromJS(function(e){var t=e.additionalSignUpFields,n=e.defaultDatabaseConnection,a=e.forgotPasswordLink,s=e.loginAfterSignUp,u=e.mustAcceptTerms,l=e.showTerms,c=e.signUpLink,d=e.usernameStyle,f=e.signUpFieldsStrictValidation,p=e.signUpHideUsernameField,h=j(e),g=h.initialScreen,y=h.screens;M(e,"usernameStyle",["email","username"])||(d=void 0);b(e,"defaultDatabaseConnection")||(n=void 0);b(e,"forgotPasswordLink")||(a=void 0);b(e,"signUpLink")||(c=void 0);v(e,"mustAcceptTerms")||(u=void 0);v(e,"showTerms")||(l=!0);v(e,"signUpFieldsStrictValidation")||(f=!1);v(e,"signUpHideUsernameField")||(p=!1);!function(e,t){var n=void 0===e[t]||window.Array.isArray(e[t]);n||i.warn(e,"The `"+t+"` option will be ignored, because it is not an array.");return n}(e,"additionalSignUpFields")?t=void 0:t&&(t=t.reduce((function(t,n){var r=n.icon,o=n.name,a=n.options,s=n.placeholder,u=n.placeholderHTML,l=n.prefill,c=n.type,d=n.validator,f=n.value,p=n.storage,h=!0,g=["email","username","password"];("string"!=typeof o||!o.match(/^[a-zA-Z0-9_]+$/)||g.indexOf(o)>-1)&&(i.warn(e,"Ignoring an element of `additionalSignUpFields` because it does not contain valid `name` property. Every element of `additionalSignUpFields` must be an object with a `name` property that is a non-empty string consisting of letters, numbers and underscores. The following names are reserved, and therefore, cannot be used: "+g.join(", ")+"."),h=!1),"hidden"===c||"string"==typeof s&&s||"string"==typeof u&&u||(i.warn(e,"Ignoring an element of `additionalSignUpFields` ("+o+") because it does not contain a valid `placeholder` or `placeholderHTML` property. Every element of `additionalSignUpFields` must have a `placeholder` or `placeholderHTML` property that is a non-empty string."),h=!1),u&&s&&i.warn(e,"When provided, the `placeholderHTML` property of an element of `additionalSignUpFields` will override the `placeholder` property of that element"),void 0==r||"string"==typeof r&&r||(i.warn(e,"When provided, the `icon` property of an element of `additionalSignUpFields` must be a non-empty string."),r=void 0),void 0==l||"string"==typeof l&&l||"function"==typeof l||(i.warn(e,"When provided, the `prefill` property of an element of `additionalSignUpFields` must be a non-empty string or a function."),l=void 0);var y=["select","text","checkbox","hidden"];return void 0==c||"string"==typeof c&&-1!==y.indexOf(c)||(i.warn(e,'When provided, the `type` property of an element of `additionalSignUpFields` must be one of the following strings: "'+y.join('", "')+'".'),c=void 0),void 0!=d&&"select"===c&&(i.warn(e,'Elements of `additionalSignUpFields` with a "select" `type` cannot specify a `validator` function, all of its `options` are assumed to be valid.'),d=void 0),void 0!=d&&"function"!=typeof d&&(i.warn(e,"When provided, the `validator` property of an element of `additionalSignUpFields` must be a function."),d=void 0),void 0!=a&&"select"!=c&&(i.warn(e,'The `options` property can only by provided for an element of `additionalSignUpFields` when its `type` equals to "select"'),a=void 0),(void 0!=a&&!window.Array.isArray(a)&&"function"!=typeof a||"select"===c&&void 0===a)&&(i.warn(e,"Ignoring an element of `additionalSignUpFields` ("+o+') because it has a "select" `type` but does not specify an `options` property that is an Array or a function.'),h=!1),"hidden"!==c||f||(i.warn(e,"Ignoring an element of `additionalSignUpFields` ("+o+') because it has a "hidden" `type` but does not specify a `value` string.'),h=!1),h?t.concat([{icon:r,name:o,options:a,placeholder:s,placeholderHTML:u,prefill:l,type:c,validator:d,value:f,storage:p}]):t}),[]),t=o.default.fromJS(t).map((function(e){return e.filter((function(e){return void 0!==e}))})));return s=!1!==s,(0,r.Map)({additionalSignUpFields:t,defaultConnectionName:n,forgotPasswordLink:a,initialScreen:g,loginAfterSignUp:s,mustAcceptTerms:u,showTerms:l,screens:y,signUpLink:c,usernameStyle:d,signUpFieldsStrictValidation:f,signUpHideUsernameField:p}).filter((function(e){return"undefined"!==typeof e})).toJS()}(t))),e=A(e)},t.overrideDatabaseOptions=function(e,t){var n=j(t,{allowLogin:I(e).contains("login"),allowSignUp:I(e).contains("signUp"),allowForgotPassword:I(e).contains("forgotPassword"),initialScreen:h(e,"initialScreen")}),r=n.initialScreen,o=n.screens;return e=m(e,"initialScreen",r),e=m(e,"screens",o)},t.defaultDatabaseConnection=w,t.defaultDatabaseConnectionName=x,t.databaseConnection=N,t.databaseConnectionName=function(e){return(N(e)||(0,r.Map)()).get("name")},t.forgotPasswordLink=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"";return h(e,"forgotPasswordLink",t)},t.signUpLink=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"";return h(e,"signUpLink",t)},t.setScreen=function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:[];return e=i.clearGlobalError(e),e=i.clearGlobalSuccess(e),e=(0,a.hideInvalidFields)(e,n),e=(0,a.clearFields)(e,n),m(e,"screen",t)},t.getScreen=function(e){var t=y(e,"screen"),n=D(e);return[t,n,"login","signUp","forgotPassword","mfaLogin"].filter((function(t){return C(e,t)}))[0]},t.availableScreens=I,t.getInitialScreen=D,t.hasInitialScreen=function(e,t){return D(e)===t},t.databaseConnectionRequiresUsername=S,t.databaseUsernameStyle=L,t.databaseLogInWithEmail=k,t.databaseUsernameValue=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=k(e);if(n)return(0,a.getFieldValue)(e,"email");if(t.emailFirst)return(0,a.getFieldValue)(e,"email")||(0,a.getFieldValue)(e,"username");return(0,a.getFieldValue)(e,"username")||(0,a.getFieldValue)(e,"email")},t.authWithUsername=function(e){return S(e)||"username"===h(e,"usernameStyle","email")},t.hasScreen=C,t.shouldAutoLogin=function(e){return h(e,"loginAfterSignUp")},t.passwordStrengthPolicy=function(e){return(N(e)||(0,r.Map)()).get("passwordPolicy","none")},t.additionalSignUpFields=E,t.showTerms=function(e){return h(e,"showTerms",!0)},t.signUpFieldsStrictValidation=function(e){return h(e,"signUpFieldsStrictValidation",!1)},t.signUpHideUsernameField=function(e){return h(e,"signUpHideUsernameField",!1)},t.mustAcceptTerms=_,t.termsAccepted=T,t.toggleTermsAcceptance=function(e){return m(e,"termsAccepted",!T(e))},t.resolveAdditionalSignUpFields=A;var r=n(5986),o=f(r),i=function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n]);return t.default=e,t}(n(1181)),a=n(6782),s=n(2982),u=f(n(3927)),l=f(n(6070)),c=n(4496),d=n(2006);function f(e){return e&&e.__esModule?e:{default:e}}var p=(0,s.dataFns)(["database"]),h=p.get,g=p.initNS,y=p.tget,m=p.tset;function v(e,t){var n=void 0===e[t]||"boolean"===typeof e[t];return n||i.warn(e,"The `"+t+"` option will be ignored, because it is not a booelan."),n}function M(e,t,n){var r=void 0===e[t]||n.indexOf(e[t])>-1;return r||i.warn(e,"The `"+t+"` option will be ignored, because it is not one of the following allowed values: "+n.map((function(e){return JSON.stringify(e)})).join(", ")+"."),r}function b(e,t){var n=void 0===e[t]||"string"===typeof e[t]&&(0,l.default)(e[t]).length>0;return n||i.warn(e,"The `"+t+"` option will be ignored, because it is not a non-empty string."),n}function j(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{allowLogin:!0,allowSignUp:!0,allowForgotPassword:!0,initialScreen:void 0},n=e.allowForgotPassword,o=e.allowLogin,i=e.allowSignUp,a=e.initialScreen,s=[];return(!0===o||!v(e,"allowLogin")&&t.allowLogin||void 0===o&&t.allowLogin)&&s.push("login"),(!0===i||!v(e,"allowSignUp")&&t.allowSignUp||void 0===i&&t.allowSignUp)&&s.push("signUp"),(!0===n||!v(e,"allowForgotPassword")&&t.allowForgotPassword||void 0===n&&t.allowForgotPassword)&&s.push("forgotPassword"),s.push("mfaLogin"),M(e,"initialScreen",s)||(a=void 0),void 0===a&&(a=t.initialScreen||s[0]),{initialScreen:a,screens:new r.List(s)}}function w(e){var t=x(e);return t&&i.findConnection(e,t)}function x(e){return h(e,"defaultConnectionName")}function N(e){return i.resolvedConnection(e)||(0,c.defaultDirectory)(e)||w(e)||i.connection(e,"database")}function I(e){return y(e,"screens")||h(e,"screens",new r.List)}function D(e){return y(e,"initialScreen")||h(e,"initialScreen")}function S(e){return(N(e)||(0,r.Map)()).toJS().requireUsername}function L(e){return i.hasSomeConnections(e,"database")?i.connectionResolver(e)?"username":S(e)?h(e,"usernameStyle","any"):"email":i.hasSomeConnections(e,"enterprise")&&(0,d.findADConnectionWithoutDomain)(e)?"username":"email"}function k(e){return"email"===L(e)}function C(e,t){var n=(N(e)||(0,r.Map)()).toJS(),o=n.allowForgot,i=n.allowSignup;return!(!1===o&&"forgotPassword"===t)&&!(!1===i&&"signUp"===t)&&I(e).contains(t)}function E(e){return h(e,"additionalSignUpFields",(0,r.List)())}function _(e){return h(e,"mustAcceptTerms",!1)}function T(e){return!_(e)||y(e,"termsAccepted",!1)}function A(e){return E(e).reduce((function(e,t){switch(t.get("type")){case"select":return function(e,t){var n=t.get("name"),r=["additionalSignUpField",n],i=t.get("prefill"),s=t.get("options"),l="function"===typeof i?void 0:i||"",c="function"===typeof s?void 0:s,d=function(e){return void 0!==l&&void 0!==c?(0,a.registerOptionField)(e,n,o.default.fromJS(c),l):e};void 0===l&&(e=(0,u.default)(e,r.concat("prefill"),{recoverResult:"",successFn:function(e,t){return l=t,d(e)},syncFn:function(e,t){return i(t)}}));void 0===c&&(e=(0,u.default)(e,r.concat("options"),{successFn:function(e,t){return c=t,d(e)},syncFn:function(e,t){return s(t)}}));void 0!==l&&void 0!==c&&(e=(0,a.registerOptionField)(e,n,o.default.fromJS(c),l));return e}(e,t);case"hidden":return function(e,t){return(0,a.setField)(e,t.get("name"),t.get("value"))}(e,t);default:return function(e,t){var n=t.get("name"),r=["additionalSignUpField",n,"prefill"],o=t.get("prefill"),i=t.get("validator"),s="function"===typeof o?void 0:o||"";e=void 0===s?(0,u.default)(e,r,{recoverResult:"",successFn:function(e,t){return(0,a.setField)(e,n,t,i)},syncFn:function(e,t){return o(t)}}):(0,a.setField)(e,n,s,i);return e}(e,t)}}),e)}},6731:function(e,t,n){"use strict";t.__esModule=!0;var r=y(n(5192)),o=y(n(7215)),i=y(n(2764)),a=y(n(6674)),s=y(n(2977)),u=n(427),l=n(2496),c=n(5037),d=function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n]);return t.default=e,t}(n(1181)),f=y(n(1407)),p=n(9344),h=n(2006),g=n(5037);function y(e){return e&&e.__esModule?e:{default:e}}function m(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function v(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!==typeof t&&"function"!==typeof t?e:t}var M=function(e){function t(){var n,r;m(this,t);for(var o=arguments.length,i=Array(o),a=0;a1&&void 0!==arguments[1]?arguments[1]:{};return t.closeHandler=a.closeLock,t.key="auxiliarypane",t.lock=e,e.get("passwordResetted")?o.default.createElement(p,t):null};var r=c(n(5192)),o=c(n(7215)),i=c(n(2432)),a=n(4137),s=l(n(1181)),u=l(n(2454));function l(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n]);return t.default=e,t}function c(e){return e&&e.__esModule?e:{default:e}}function d(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function f(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!==typeof t&&"function"!==typeof t?e:t}var p=function(e){function t(){return d(this,t),f(this,e.apply(this,arguments))}return function(e,t){if("function"!==typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,e),t.prototype.handleClose=function(){var e=this.props,t=e.closeHandler,n=e.lock;t(s.id(n))},t.prototype.render=function(){var e=this.props.lock,t=s.ui.closable(e)?this.handleClose.bind(this):void 0;return o.default.createElement(i.default,{lock:e,closeHandler:t},o.default.createElement("p",null,u.html(this.props.lock,["success","forgotPassword"])))},t}(o.default.Component);t.default=p,p.propTypes={closeHandler:r.default.func.isRequired,lock:r.default.object.isRequired}},9130:function(e,t,n){"use strict";t.__esModule=!0;var r=m(n(7215)),o=m(n(4937)),i=m(n(4368)),a=n(5037),s=n(427),u=n(7021),l=n(5037),c=n(2006),d=y(n(2454)),f=y(n(1181)),p=n(5831),h=n(183),g=n(6782);function y(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n]);return t.default=e,t}function m(e){return e&&e.__esModule?e:{default:e}}function v(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function M(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!==typeof t&&"function"!==typeof t?e:t}function b(e,t){if("function"!==typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}var j=function(e){function t(){return v(this,t),M(this,e.apply(this,arguments))}return b(t,e),t.prototype.componentDidMount=function(){var e=this.props.model;if(f.connectionResolver(e)){var t=(0,g.getField)(e,"username").get("value","");(0,p.swap)(p.updateEntity,"lock",f.id(e),h.setEmail,(0,h.isEmail)(t,!1)?t:"",!1)}},t.prototype.render=function(){var e=this.props,t=e.i18n,n=e.model,o=t.html("forgotPasswordInstructions")||null,a=o&&r.default.createElement("p",null,o);return r.default.createElement(i.default,{emailInputPlaceholder:t.str("emailInputPlaceholder"),header:a,i18n:t,lock:n})},t}(r.default.Component),w=function(e){function t(){return v(this,t),M(this,e.call(this,"forgotPassword"))}return b(t,e),t.prototype.backHandler=function(e){return(0,a.hasScreen)(e,"login")?s.cancelResetPassword:void 0},t.prototype.submitButtonLabel=function(e){return d.str(e,["forgotPasswordSubmitLabel"])},t.prototype.getScreenTitle=function(e){return d.str(e,"forgotPasswordTitle")},t.prototype.isSubmitDisabled=function(e){var t=(0,c.isEnterpriseDomain)(e,(0,l.databaseUsernameValue)(e,{emailFirst:!0}));return t?setTimeout((function(){(0,p.swap)(p.updateEntity,"lock",f.id(e),f.setGlobalError,d.str(e,["error","forgotPassword","enterprise_email"]))}),50):(0,p.swap)(p.updateEntity,"lock",f.id(e),f.clearGlobalError),t},t.prototype.submitHandler=function(){return s.resetPassword},t.prototype.renderAuxiliaryPane=function(e){return(0,u.renderPasswordResetConfirmation)(e)},t.prototype.render=function(){return j},t}(o.default);t.default=w},4368:function(e,t,n){"use strict";t.__esModule=!0;var r=a(n(5192)),o=a(n(7215)),i=a(n(2764));!function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n]);t.default=e}(n(1181));function a(e){return e&&e.__esModule?e:{default:e}}function s(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function u(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!==typeof t&&"function"!==typeof t?e:t}var l=function(e){function t(){return s(this,t),u(this,e.apply(this,arguments))}return function(e,t){if("function"!==typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,e),t.prototype.render=function(){var e=this.props,t=e.emailInputPlaceholder,n=e.header,r=e.i18n,a=e.lock;return o.default.createElement("div",null,n,o.default.createElement(i.default,{i18n:r,lock:a,placeholder:t,strictValidation:!1}))},t}(o.default.Component);l.propTypes={emailInputPlaceholder:r.default.string.isRequired,lock:r.default.object.isRequired},t.default=l},415:function(e,t,n){"use strict";t.__esModule=!0;var r,o=n(7215),i=(r=o)&&r.__esModule?r:{default:r};t.default=function(e){var t=e.checkHandler,n=e.checked,r=e.children,o=e.showCheckbox;return t?i.default.createElement("span",{className:"auth0-lock-sign-up-terms-agreement"},i.default.createElement("label",null,o&&i.default.createElement("input",{type:"checkbox",onChange:t,checked:n}),r)):r}},7944:function(e,t,n){"use strict";t.__esModule=!0,t.renderSignedUpConfirmation=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return t.closeHandler=a.closeLock,t.key="auxiliarypane",t.lock=e,e.get("signedUp")&&!(0,u.shouldAutoLogin)(e)?o.default.createElement(h,t):null};var r=d(n(5192)),o=d(n(7215)),i=d(n(2432)),a=n(4137),s=c(n(1181)),u=n(5037),l=c(n(2454));function c(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n]);return t.default=e,t}function d(e){return e&&e.__esModule?e:{default:e}}function f(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function p(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!==typeof t&&"function"!==typeof t?e:t}var h=function(e){function t(){return f(this,t),p(this,e.apply(this,arguments))}return function(e,t){if("function"!==typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,e),t.prototype.handleClose=function(){var e=this.props,t=e.closeHandler,n=e.lock;t(s.id(n))},t.prototype.render=function(){var e=this.props.lock,t=s.ui.closable(e)?this.handleClose.bind(this):void 0;return o.default.createElement(i.default,{lock:e,closeHandler:t},o.default.createElement("p",null,l.html(e,["success","signUp"])))},t}(o.default.Component);t.default=h,h.propTypes={closeHandler:r.default.func.isRequired,lock:r.default.object.isRequired}},2006:function(e,t,n){"use strict";t.__esModule=!0,t.STRATEGIES=void 0,t.initEnterprise=function(e,t){return h(e,i.default.fromJS(function(e){var t=e.defaultEnterpriseConnection;void 0!=t&&"string"!==typeof t&&(a.warn(e,"The `defaultEnterpriseConnection` option will be ignored, because it is not a string."),t=void 0);return void 0===t?{}:{defaultConnectionName:t}}(t)))},t.defaultEnterpriseConnection=M,t.defaultEnterpriseConnectionName=b,t.enterpriseActiveFlowConnection=function(e){if(S(e)){var t=g(e,"hrdEmail","");return j(e,t)||function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:void 0;return a.connections(e,"enterprise","ad","auth0-adldap").find((function(e){return!t||e.get("name")===t}))}(e)}return M(e)||N(e)},t.matchConnection=j,t.isEnterpriseDomain=w,t.enterpriseDomain=function(e){return D(e)?a.connections(e,"enterprise").getIn([0,"domains",0]):(0,u.emailDomain)(g(e,"hrdEmail"))},t.quickAuthConnection=function(e){return!x(e)&&a.hasOneConnection(e,"enterprise")?a.connections(e,"enterprise").get(0):null},t.isADEnabled=x,t.findADConnectionWithoutDomain=N,t.isInCorpNetwork=function(e){return void 0!==I(e)},t.corpNetworkConnection=I,t.isSingleHRDConnection=D,t.isHRDDomain=function(e,t){return w(e,t,["ad","auth0-adldap"])},t.toggleHRD=function(e,t){if(t){var n=a.defaultADUsernameFromEmailPrefix(e)?(0,u.emailLocalPart)(t):t;e=(0,l.setUsername)(e,n,"username",!1),e=m(e,"hrdEmail",t)}else{var r=g(e,"hrdEmail");r&&(e=(0,l.setUsername)(e,r,"email",!1)),e=y(e,"hrdEmail")}return m(e,"hrd",!!t)},t.isHRDActive=S,t.isHRDEmailValid=function(e,t){if((0,u.isEmail)(t)&&!a.hasSomeConnections(e,"database")&&!a.hasSomeConnections(e,"passwordless")&&!N(e)&&!(0,c.matchesEnterpriseConnection)(e,t))return!1;return!0};var r,o=n(5986),i=(r=o)&&r.__esModule?r:{default:r},a=d(n(1181)),s=(d(n(6782)),n(2982)),u=n(183),l=n(7601),c=n(9344);n(5037),n(5831);function d(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n]);return t.default=e,t}var f=(0,s.dataFns)(["enterprise"]),p=f.get,h=f.initNS,g=f.tget,y=f.tremove,m=f.tset,v=(0,s.dataFns)(["core"]);v.tremove,v.tset,v.tget,t.STRATEGIES={ad:"AD / LDAP",adfs:"ADFS","auth0-adldap":"AD/LDAP","auth0-oidc":"Auth0 OpenID Connect",custom:"Custom Auth","google-apps":"Google Apps",ip:"IP Address",mscrm:"Dynamics CRM",office365:"Office365",pingfederate:"Ping Federate",samlp:"SAML",sharepoint:"SharePoint Apps",waad:"Windows Azure AD",oidc:"OpenID Connect",okta:"Okta Workforce"};function M(e){var t=b(e);return t&&N(e,t)}function b(e){return p(e,"defaultConnectionName")}function j(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:[],r=(0,u.emailDomain)(t);return!!r&&a.connections.apply(a,[e,"enterprise"].concat(n)).find((function(e){return e.get("domains").contains(r)}))}function w(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:[];return!!j(e,t,n)}function x(e){return a.hasSomeConnections(e,"enterprise","ad","auth0-adldap")}function N(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:void 0;return a.connections(e,"enterprise","ad","auth0-adldap").find((function(e){return e.get("domains").isEmpty()&&(!t||e.get("name")===t)}))}function I(e){var t=e.getIn(["sso","connection"]),n=e.getIn(["sso","strategy"]);return t&&n&&i.default.Map({name:t,strategy:n})}function D(e){return x(e)&&1===a.connections(e).count()}function S(e){return g(e,"hrd",D(e))}},7241:function(e,t,n){"use strict";t.__esModule=!0;var r=Object.assign||function(e){for(var t=1;t-1&&(n="bad.phone_number"),p.html(e,["error","passwordless",n])||p.html(e,["error","passwordless","lock.fallback"])}function y(e){(0,i.swap)(i.updateEntity,"lock",e,(function(e){return e=c.setSubmitting(e,!1),(0,d.setPasswordlessStarted)(e,!0)}))}function m(e,t){var n=g((0,i.read)(i.getEntity,"lock",e),t);return(0,i.swap)(i.updateEntity,"lock",e,c.setSubmitting,!1,n)}function v(e){(0,i.swap)(i.updateEntity,"lock",e,d.setResendSuccess)}function M(e,t){(0,i.swap)(i.updateEntity,"lock",e,d.setResendFailed)}function b(e,t){var n=c.connections(e,"passwordless",t);return n.size>0&&c.useCustomPasswordlessConnection(e)?n.first().get("name"):t}function j(e,t,n){var r={connection:b(e,"email"),email:l.getFieldValue(e,"email"),send:(0,d.send)(e)};(0,d.isSendLink)(e)&&!c.auth.params(e).isEmpty()&&(r.authParams=c.auth.params(e).toJS()),u.default.startPasswordless(c.id(e),r,(function(r){r?setTimeout((function(){return n(c.id(e),r)}),250):t(c.id(e))}))}},1235:function(e,t,n){"use strict";t.__esModule=!0;var r=d(n(7215)),o=d(n(4937)),i=d(n(8499)),a=n(3302),s=n(2041),u=n(5537),l=n(6782),c=n(2180);function d(e){return e&&e.__esModule?e:{default:e}}var f=function(e){var t=e.i18n,n=e.model,o=(0,a.isEmail)(n)?t.str("passwordlessEmailCodeInstructions",(0,l.getFieldValue)(n,"email")):t.str("passwordlessSMSCodeInstructions",(0,c.humanPhoneNumberWithDiallingCode)(n));return r.default.createElement(i.default,{instructions:o,lock:n,placeholder:t.str("codeInputPlaceholder"),resendLabel:t.str("resendCodeAction"),onRestart:s.restart})},p=function(e){function t(){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!==typeof t&&"function"!==typeof t?e:t}(this,e.call(this,"vcode"))}return function(e,t){if("function"!==typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,e),t.prototype.backHandler=function(){return s.restart},t.prototype.submitHandler=function(){return s.logIn},t.prototype.renderAuxiliaryPane=function(e){return(0,u.renderSignedInConfirmation)(e)},t.prototype.render=function(){return f},t}(o.default);t.default=p},4381:function(e,t,n){"use strict";t.__esModule=!0,t.renderEmailSentConfirmation=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return t.key="auxiliarypane",t.lock=e,l.passwordlessStarted(e)?r.default.createElement(M,t):null};var r=f(n(7215)),o=f(n(2432)),i=n(4137),a=d(n(1181)),s=d(n(6782)),u=n(2041),l=d(n(3302)),c=d(n(2454));function d(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n]);return t.default=e,t}function f(e){return e&&e.__esModule?e:{default:e}}function p(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function h(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!==typeof t&&"function"!==typeof t?e:t}function g(e,t){if("function"!==typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}var y=r.default.createElement("svg",{focusable:"false",height:"32px",style:{enableBackground:"new 0 0 32 32"},version:"1.1",viewBox:"0 0 32 32",width:"32px",xmlSpace:"preserve",xmlns:"http://www.w3.org/2000/svg",xmlnsXlink:"http://www.w3.org/1999/xlink"}," ",r.default.createElement("path",{d:"M27.877,19.662c0.385-1.23,0.607-2.531,0.607-3.884c0-7.222-5.83-13.101-13.029-13.194v4.238 c4.863,0.093,8.793,4.071,8.793,8.956c0,0.678-0.088,1.332-0.232,1.966l-3.963-1.966l2.76,8.199l8.197-2.762L27.877,19.662z"}),r.default.createElement("path",{d:"M7.752,16.222c0-0.678,0.088-1.332,0.232-1.967l3.963,1.967l-2.76-8.199L0.99,10.785l3.133,1.553 c-0.384,1.23-0.607,2.531-0.607,3.885c0,7.223,5.83,13.1,13.03,13.194v-4.238C11.682,25.086,7.752,21.107,7.752,16.222z"})),m=function(e){function t(){return p(this,t),h(this,e.apply(this,arguments))}return g(t,e),t.prototype.render=function(){var e=this.props,t=e.label,n=e.onClick;return r.default.createElement("a",{className:"auth0-lock-resend-link",href:"#",onClick:n},t," ",r.default.createElement("span",null,y))},t}(r.default.Component),v=function(e){function t(){var n,r;p(this,t);for(var o=arguments.length,i=Array(o),s=0;s * { display: none; } html.auth0-lock-html body .auth0-lock-container { background: #fff; display: block !important; } } .auto-height { height: auto !important; } .auth0-lock.auth0-lock, .auth0-lock.auth0-lock * { box-sizing: initial; } .auth0-lock.auth0-lock svg { background-color: transparent; } .auth0-lock.auth0-lock .auth0-global-message { color: #fff; text-align: center; padding: 10px; line-height: 1.8; font-size: 11px; font-weight: 600; text-transform: uppercase; } .auth0-lock.auth0-lock .auth0-global-message.auth0-global-message-error { background: #ff3e00; } .auth0-lock.auth0-lock .auth0-global-message.auth0-global-message-success { background: #7ed321; } .auth0-lock.auth0-lock .auth0-global-message.auth0-global-message-info { background: #44c7f4; } .auth0-lock.auth0-lock .auth0-global-message.global-message-enter { height: 0; paddingTop: 0; paddingBottom: 0; } .auth0-lock.auth0-lock .auth0-global-message.global-message-enter.global-message-enter-active { transition: all 0.2s; height: auto; paddingTop: 10px; paddingBottom: 10px; } .auth0-lock.auth0-lock .auth0-global-message.global-message-exit { transition: all 0.2s; height: 0; paddingTop: 0; paddingBottom: 0; } .auth0-lock.auth0-lock .auth0-global-message span { animation-delay: 0.2s; } .auth0-lock.auth0-lock { font-family: "Avenir Next", Avenir, -apple-system, BlinkMacSystemFont, Roboto, Helvetica, sans-serif; text-rendering: optimizeLegibility; pointer-events: none; position: fixed; bottom: 0; left: 0; width: 100%; height: 100%; right: 0; z-index: 1000000; } .auth0-lock.auth0-lock a { text-decoration: none; } .auth0-lock.auth0-lock a:active, .auth0-lock.auth0-lock a:focus { outline: none; } .auth0-lock.auth0-lock input:focus, .auth0-lock.auth0-lock button:focus { outline: none; } .auth0-lock.auth0-lock .auth0-lock-overlay { background: radial-gradient(#40404b, #111118) rgba(34,34,40,0.94); position: fixed; top: 0; bottom: 0; right: 0; left: 0; z-index: -1; opacity: 0; transition: opacity 0.2s ease-in 0.4s; } .auth0-lock.auth0-lock .auth0-lock-center { box-sizing: border-box; } @media (min-width: 481px) { .auth0-lock.auth0-lock .auth0-lock-center { padding: 40px; height: 100%; display: -ms-flexbox; display: flex; } } .auth0-lock.auth0-lock .auth0-lock-widget { width: 300px; opacity: 0; transform: translateY(100%) scale(0.8); transition-timing-function: cubic-bezier(0.3, 0, 0, 1.4); margin: auto; border-radius: 5px; } @media (min-width: 481px) { .auth0-lock.auth0-lock .auth0-lock-widget { transition: transform 0.4s, opacity 0.3s; } } .auth0-lock.auth0-lock .auth0-lock-widget-container { position: relative; } .auth0-lock.auth0-lock .auth0-lock-cred-pane { background: #fff; border-radius: 6px; position: relative; display: -ms-flexbox; display: flex; -ms-flex-direction: column; flex-direction: column; height: 100%; min-height: 100%; } .auth0-lock.auth0-lock .auth0-lock-cred-pane.horizontal-fade-exit .auth0-lock-content, .auth0-lock.auth0-lock .auth0-lock-cred-pane.horizontal-fade-exit .auth0-lock-terms { opacity: 0.3; pointer-events: none; } .auth0-lock.auth0-lock .auth0-lock-cred-pane.auth0-lock-moving { overflow: hidden; } .auth0-lock.auth0-lock .auth0-lock-cred-pane-internal-wrapper { display: -ms-flexbox; display: flex; -ms-flex-direction: column; flex-direction: column; height: 100vh; height: calc(var(--vh, 1vh) * 100); max-height: auto; } @media (min-width: 481px) { .auth0-lock.auth0-lock .auth0-lock-cred-pane-internal-wrapper { min-height: auto; height: auto; } } .auth0-lock.auth0-lock .auth0-lock-header { text-align: center; padding: 11px; color: #333; position: relative; background: #fff; border-radius: 5px 5px 0 0; overflow: hidden; box-sizing: border-box; display: -ms-flexbox; display: flex; -ms-flex-direction: column; flex-direction: column; -ms-flex-pack: center; justify-content: center; -ms-flex-negative: 0; flex-shrink: 0; -ms-flex-positive: 0; flex-grow: 0; -ms-flex-preferred-size: auto; flex-basis: auto; } .auth0-lock.auth0-lock .auth0-lock-content-wrapper { -ms-flex-positive: 1; flex-grow: 1; -ms-flex-negative: 1; flex-shrink: 1; -ms-flex-preferred-size: auto; flex-basis: auto; -webkit-overflow-scrolling: touch; overflow-x: auto; } @media (min-width: 481px) { .auth0-lock.auth0-lock .auth0-lock-content-wrapper { overflow-x: inherit; } } .auth0-lock.auth0-lock .auth0-lock-close-button, .auth0-lock.auth0-lock .auth0-lock-back-button { box-sizing: content-box !important; background: #fff; border-radius: 100px; height: 10px; width: 10px; padding: 0; position: absolute; top: 14px; right: 14px; box-shadow: 0 1px 3px rgba(0,0,0,0.1); color: #333; z-index: 100; border: 6px solid #fff; cursor: pointer; line-height: 0; } .auth0-lock.auth0-lock .auth0-lock-close-button:focus, .auth0-lock.auth0-lock .auth0-lock-back-button:focus { outline: none; box-shadow: 0 3px 3px rgba(0,0,0,0.3); } .auth0-lock.auth0-lock .auth0-lock-close-button svg, .auth0-lock.auth0-lock .auth0-lock-back-button svg { box-sizing: content-box; } .auth0-lock.auth0-lock .auth0-lock-close-button polygon, .auth0-lock.auth0-lock .auth0-lock-back-button polygon { fill: #373737; } .auth0-lock.auth0-lock .auth0-lock-back-button { left: 14px; } .auth0-lock.auth0-lock .auth0-lock-header-avatar { height: 80px; width: 80px; display: block; border-radius: 100px; margin: -16px auto 0; position: absolute; left: 0; right: 0; z-index: 1000; box-shadow: 0 1px 2px rgba(0,0,0,0.4); animation: fadeIn 0.75s both; } @media (min-width: 768px) { .auth0-lock.auth0-lock .auth0-lock-header-avatar { animation: fadeInDown 0.75s both; } } .auth0-lock.auth0-lock .auth0-lock-header-bg { position: absolute; height: 100%; width: 100%; overflow: hidden; top: 0; left: 0; pointer-events: none; } @media (min-width: 481px) { .auth0-lock.auth0-lock .auth0-lock-header-bg { background: rgba(241,241,241,0.8); } } .auth0-lock.auth0-lock .auth0-lock-header-bg .auth0-lock-header-bg-blur { display: none; height: 100%; width: 100%; border-top-left-radius: 5px; border-top-right-radius: 5px; -ms-filter: blur(40px) grayscale(1); filter: blur(40px) grayscale(1); -webkit-backdrop-filter: blur(0); background-color: #fff; background-position: center; background-repeat: no-repeat; background-size: 300px; opacity: 0; transition: 0s ease 0s; } .auth0-lock.auth0-lock .auth0-lock-header-bg .auth0-lock-header-bg-blur.auth0-lock-no-grayscale { -ms-filter: blur(30px); filter: blur(30px); -webkit-backdrop-filter: blur(0); background-position: center; background-size: 800px; } @media (min-width: 481px) { .auth0-lock.auth0-lock .auth0-lock-header-bg.auth0-lock-blur-support .auth0-lock-header-bg-blur { display: block; } } .auth0-lock.auth0-lock .auth0-lock-header-bg .auth0-lock-header-bg-solid { height: 100%; opacity: 0.08; } .auth0-lock.auth0-lock .auth0-lock-header-welcome { font-size: 18px; position: relative; } .auth0-lock.auth0-lock .auth0-lock-header-logo { width: auto; height: 58px; display: inline-block; margin: 0 0 11px; vertical-align: middle; } .auth0-lock.auth0-lock .auth0-lock-header-logo.centered { margin-top: 20px; } .auth0-lock.auth0-lock .auth0-lock-firstname { font-size: 18px; margin-top: 64px; text-overflow: ellipsis; white-space: nowrap; overflow: hidden; padding: 0 10px; } .auth0-lock.auth0-lock .auth0-lock-name { font-size: 22px; padding: 0 10px; line-height: 30px; } .auth0-lock.auth0-lock .auth0-lock-content { box-sizing: border-box; } .auth0-lock.auth0-lock .auth0-lock-form { padding: 20px; } .auth0-lock.auth0-lock .auth0-lock-form h2 { font-size: 22px; font-weight: normal; text-align: center; margin: 0 0 15px; color: #000; } .auth0-lock.auth0-lock .auth0-lock-form p { font-size: 13px; line-height: 1.8; text-align: center; margin-top: 0; margin-bottom: 15px; color: rgba(0,0,0,0.54); } .auth0-lock.auth0-lock .auth0-lock-form .auth0-lock-alternative { margin-top: 20px; margin-bottom: 0; } .auth0-lock.auth0-lock .auth0-lock-form .auth0-lock-alternative .auth0-lock-alternative-link { font-size: 13px; color: rgba(0,0,0,0.87); cursor: pointer; margin-bottom: 0; } .auth0-lock.auth0-lock .auth0-lock-form .auth0-lock-alternative .auth0-lock-alternative-link:focus { text-decoration: underline; } .auth0-lock.auth0-lock .auth0-lock-input-block { position: relative; margin-bottom: 15px; } @media (min-width: 481px) { .auth0-lock.auth0-lock .auth0-lock-input-block { margin-bottom: 10px; } } .auth0-lock.auth0-lock .auth0-lock-input-block:last-child { margin-bottom: 0; } .auth0-lock.auth0-lock .auth0-lock-captcha { position: relative; height: 72px; margin-bottom: 10px; background: #fff; border: 1px solid #eee; border-radius: 3px; margin-top: 24px; } .auth0-lock.auth0-lock .auth0-lock-captcha .auth0-lock-captcha-image { position: absolute; width: 120px; height: 40px; left: 16px; top: 16px; background-size: contain; } .auth0-lock.auth0-lock .auth0-lock-captcha .auth0-lock-captcha-refresh { position: absolute; width: 40px; height: 40px; right: 16px; top: 16px; border: 1px solid #eee; border-radius: 3px; padding: 0; } .auth0-lock.auth0-lock .auth0-lock-captcha .auth0-lock-captcha-refresh svg, .auth0-lock.auth0-lock .auth0-lock-captcha .auth0-lock-captcha-refresh .test-titi { position: absolute; top: 12.5px; left: 12.5px; width: 15px; height: 15px; margin: 0; padding: 0; background-color: transparent; } .auth0-lock.auth0-lock .auth0-lock-captcha .auth0-lock-captcha-refresh svg path, .auth0-lock.auth0-lock .auth0-lock-captcha .auth0-lock-captcha-refresh .test-titi path { fill: #888; } .auth0-lock.auth0-lock .auth0-lock-input-block.auth0-lock-input-captcha svg.auth0-lock-icon { width: 20px; height: 20px; top: 10px; left: 9.5px; } .auth0-lock.auth0-lock .auth0-lock-input-wrap { border-radius: 3px; border: 1px solid #f1f1f1; position: relative; background: #f1f1f1; transition: border-color 0.8s; } .auth0-lock.auth0-lock .auth0-lock-input-wrap.auth0-lock-input-wrap-with-icon { padding-left: 40px; } .auth0-lock.auth0-lock .auth0-lock-input-wrap .auth0-lock-icon-arrow { position: absolute; top: 14px; width: 12px; height: 14px; right: 14px; pointer-events: none; } .auth0-lock.auth0-lock .auth0-lock-input-wrap .auth0-lock-icon, .auth0-lock.auth0-lock .auth0-lock-input-wrap .auth0-lock-custom-icon { position: absolute; font-size: 12px; top: 13px; left: 14px; } .auth0-lock.auth0-lock .auth0-lock-input-wrap .auth0-lock-icon path, .auth0-lock.auth0-lock .auth0-lock-input-wrap .auth0-lock-custom-icon path { fill: #888; } .auth0-lock.auth0-lock .auth0-lock-input-wrap .auth0-lock-icon.auth0-lock-icon-mobile, .auth0-lock.auth0-lock .auth0-lock-input-wrap .auth0-lock-custom-icon.auth0-lock-icon-mobile { width: 9px; height: 14px; top: 14px; left: 16px; } .auth0-lock.auth0-lock .auth0-lock-input-wrap .auth0-lock-icon.auth0-lock-icon-box, .auth0-lock.auth0-lock .auth0-lock-input-wrap .auth0-lock-custom-icon.auth0-lock-icon-box { width: 12px; height: 14px; top: auto; bottom: 14px; left: 14px; } .auth0-lock.auth0-lock .auth0-lock-input-wrap.auth0-lock-focused { border-color: #a0a0a0; } .auth0-lock.auth0-lock .auth0-lock-input-wrap .auth0-lock-input { border: 0; padding: 0 14px; right: 0; height: 40px; font-size: 13px; width: 100%; border-radius: 0 2px 2px 0; box-sizing: border-box; position: relative; color: rgba(0,0,0,0.87); } .auth0-lock.auth0-lock .auth0-lock-input-wrap .auth0-lock-input.animated { animation-duration: 0.5s; } .auth0-lock.auth0-lock .auth0-lock-input-wrap .auth0-lock-input.auth0-lock-input-location { background-color: #f9f9f9; text-align: left; } .auth0-lock.auth0-lock .auth0-lock-input-wrap .auth0-lock-input.auth0-lock-input-location.auth0-lock-input-with-placeholder { color: rgba(0,0,0,0.54); } .auth0-lock.auth0-lock .auth0-lock-error .auth0-lock-input-wrap { border-color: #f00; transition: 0.3s ease-in-out; } .auth0-lock.auth0-lock .auth0-lock-input-checkbox { text-align: left; display: block; font-size: 12px; color: rgba(0,0,0,0.54); line-height: 22px; position: relative; } .auth0-lock.auth0-lock .auth0-lock-input-checkbox label input { float: left; margin-top: 5px; } .auth0-lock.auth0-lock .auth0-lock-input-checkbox span { display: block; margin-left: 20px; } .auth0-lock.auth0-lock .auth-lock-social-buttons-pane, .auth0-lock.auth0-lock .auth0-lock-last-login-pane { position: relative; } .auth0-lock.auth0-lock .auth-lock-social-buttons-pane .auth0-loading-container, .auth0-lock.auth0-lock .auth0-lock-last-login-pane .auth0-loading-container { animation: fadeIn 0.75s ease-in-out !important; position: absolute; width: 54px; height: 54px; top: 50%; left: 50%; transform: translate(-50%, -50%); } .auth0-lock.auth0-lock .auth-lock-social-buttons-pane .auth0-loading-container .auth0-loading, .auth0-lock.auth0-lock .auth0-lock-last-login-pane .auth0-loading-container .auth0-loading { width: 50px; height: 50px; border-radius: 50%; top: 0; left: 0; opacity: 1; } .auth0-lock.auth0-lock .auth0-lock-social-buttons-container { text-align: center; } .auth0-lock.auth0-lock .auth0-lock-social-button { border: 0; padding: 0; display: inline-block; box-sizing: border-box; overflow: hidden; border-radius: 3px; margin: 4px; position: relative; width: 40px; height: 40px; transition: background-color 0.2s ease-in-out; cursor: pointer; -webkit-appearance: none !important; -moz-appearance: none !important; appearance: none !important; } .auth0-lock.auth0-lock .auth0-lock-social-button[data-provider^=google] .auth0-lock-social-button-text { color: #333 !important; } .auth0-lock.auth0-lock .auth0-lock-social-button[data-provider^=google] .auth0-lock-social-button-icon { height: 36px; width: 36px; } .auth0-lock.auth0-lock .auth0-lock-social-button[data-provider^=google]:hover:not([disabled]) .auth0-lock-social-button-icon, .auth0-lock.auth0-lock .auth0-lock-social-button[data-provider^=google]:focus:not([disabled]) .auth0-lock-social-button-icon, .auth0-lock.auth0-lock .auth0-lock-social-button[data-provider^=google]:hover:not([disabled]) .auth0-lock-social-button-text, .auth0-lock.auth0-lock .auth0-lock-social-button[data-provider^=google]:focus:not([disabled]) .auth0-lock-social-button-text { background-color: #f0f0f0 !important; } .auth0-lock.auth0-lock .auth0-lock-social-button[data-provider^=google].auth0-lock-social-big-button { background-color: #fff; border: 1px solid #dee0e2; } .auth0-lock.auth0-lock .auth0-lock-social-button[data-provider^=google].auth0-lock-social-big-button .auth0-lock-social-button-icon { width: 38px; } .auth0-lock.auth0-lock .auth0-lock-social-button .auth0-lock-social-button-icon { box-sizing: content-box; width: 40px; height: 40px; position: absolute; top: 0; left: 0; transition: background-color 0.3s, border 0.2s ease-in-out; -webkit-transition: background-color 0.3s, border 0.2s ease-in-out; } .auth0-lock.auth0-lock .auth0-lock-social-button .auth0-lock-social-button-text { display: none; } .auth0-lock.auth0-lock .auth0-lock-social-button.auth0-lock-social-big-button { display: block; margin: 10px 0 0; width: 100%; } .auth0-lock.auth0-lock .auth0-lock-social-button.auth0-lock-social-big-button:first-child { margin-top: 0; } .auth0-lock.auth0-lock .auth0-lock-social-button.auth0-lock-social-big-button[data-provider=""], .auth0-lock.auth0-lock .auth0-lock-social-button.auth0-lock-social-big-button[data-provider="auth0"] { background-color: #c0c0c0; } .auth0-lock.auth0-lock .auth0-lock-social-button.auth0-lock-social-big-button[data-provider=""] .auth0-lock-social-button-icon, .auth0-lock.auth0-lock .auth0-lock-social-button.auth0-lock-social-big-button[data-provider="auth0"] .auth0-lock-social-button-icon { background-image: url("data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiIHN0YW5kYWxvbmU9Im5vIj8+PHN2ZyB3aWR0aD0iNTNweCIgaGVpZ2h0PSI2NXB4IiB2aWV3Qm94PSIwIDAgNTMgNjUiIHZlcnNpb249IjEuMSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiB4bWxuczp4bGluaz0iaHR0cDovL3d3dy53My5vcmcvMTk5OS94bGluayI+ICAgICAgICA8dGl0bGU+U2hhcGU8L3RpdGxlPiAgICA8ZGVzYz5DcmVhdGVkIHdpdGggU2tldGNoLjwvZGVzYz4gICAgPGRlZnM+PC9kZWZzPiAgICA8ZyBpZD0iUGFnZS0xIiBzdHJva2U9Im5vbmUiIHN0cm9rZS13aWR0aD0iMSIgZmlsbD0ibm9uZSIgZmlsbC1ydWxlPSJldmVub2RkIj4gICAgICAgIDxnIGlkPSI2NHB4IiB0cmFuc2Zvcm09InRyYW5zbGF0ZSgtMTE1My4wMDAwMDAsIC02MDMzLjAwMDAwMCkiIGZpbGw9IiNGRkZGRkYiPiAgICAgICAgICAgIDxwYXRoIGQ9Ik0xMTYxLjEyNSw2MDk4IEMxMTU2LjYzNzk3LDYwOTggMTE1Myw2MDk0LjM2MTg2IDExNTMsNjA4OS44NzU2MyBMMTE1Myw2MDY1LjQ5OTQ5IEMxMTUzLDYwNjEuMDEyMjUgMTE1Ni42Mzc5Nyw2MDU3LjM3MzEgMTE2MS4xMjUsNjA1Ny4zNzMxIEwxMTYxLjEyNSw2MDUxLjI4MjExIEMxMTYxLjEyNSw2MDQxLjE4NjMyIDExNjkuMzA5OTIsNjAzMyAxMTc5LjQwNjI1LDYwMzMgQzExODkuNTAyNTgsNjAzMyAxMTk3LjY4NzUsNjA0MS4xODYzMiAxMTk3LjY4NzUsNjA1MS4yODIxMSBMMTE5Ny42ODc1LDYwNTcuMzc0MTEgQzEyMDIuMTc0NTMsNjA1Ny4zNzQxMSAxMjA1LjgxMjUsNjA2MS4wMTIyNSAxMjA1LjgxMjUsNjA2NS40OTk0OSBMMTIwNS44MTI1LDYwODkuODc1NjMgQzEyMDUuODEyNSw2MDk0LjM2MTg2IDEyMDIuMTc0NTMsNjA5OCAxMTk3LjY4NzUsNjA5OCBMMTE2MS4xMjUsNjA5OCBaIE0xMTkzLjYyNjAyLDYwNTEuMjgyMTEgQzExOTMuNjI2MDIsNjA0My40Mjk5NCAxMTg3LjI1OTA2LDYwMzcuMDYyNjkgMTE3OS40MDcyNyw2MDM3LjA2MjY5IEMxMTcxLjU1NTQ3LDYwMzcuMDYyNjkgMTE2NS4xODg1Miw2MDQzLjQyOTk0IDExNjUuMTg4NTIsNjA1MS4yODIxMSBMMTE2NS4xODg1Miw2MDU3LjM3MzEgTDExOTMuNjI2MDIsNjA1Ny4zNzMxIEwxMTkzLjYyNjAyLDYwNTEuMjgyMTEgTDExOTMuNjI2MDIsNjA1MS4yODIxMSBaIE0xMjAxLjc1LDYwNjUuNDk5NDkgQzEyMDEuNzUsNjA2My4yNTQ4NiAxMTk5LjkzMTAyLDYwNjEuNDM1NzkgMTE5Ny42ODc1LDYwNjEuNDM1NzkgTDExNjEuMTI1LDYwNjEuNDM1NzkgQzExNTguODgxNDgsNjA2MS40MzU3OSAxMTU3LjA2MjUsNjA2My4yNTQ4NiAxMTU3LjA2MjUsNjA2NS40OTk0OSBMMTE1Ny4wNjI1LDYwODkuODc1NjMgQzExNTcuMDYyNSw2MDkyLjExNjIxIDExNTguODgxNDgsNjA5My45MzUyOCAxMTYxLjEyNSw2MDkzLjkzNTI4IEwxMTk3LjY4NzUsNjA5My45MzUyOCBDMTE5OS45MzEwMiw2MDkzLjkzNTI4IDEyMDEuNzUsNjA5Mi4xMTYyMSAxMjAxLjc1LDYwODkuODc1NjMgTDEyMDEuNzUsNjA2NS40OTk0OSBMMTIwMS43NSw2MDY1LjQ5OTQ5IFogTTExNzcuMzc1LDYwODMuNzgwNTggTDExNzcuMzc1LDYwNzEuNTkyNTEgQzExNzcuMzc1LDYwNzAuNDcxMjEgMTE3OC4yODM5OCw2MDY5LjU2MTE3IDExNzkuNDA2MjUsNjA2OS41NjExNyBDMTE4MC41Mjg1Miw2MDY5LjU2MTE3IDExODEuNDM3NSw2MDcwLjQ3MTIxIDExODEuNDM3NSw2MDcxLjU5MjUxIEwxMTgxLjQzNzUsNjA4My43ODA1OCBDMTE4MS40Mzc1LDYwODQuOTAwODcgMTE4MC41Mjg1Miw2MDg1LjgxMDkxIDExNzkuNDA2MjUsNjA4NS44MTA5MSBDMTE3OC4yODUsNjA4NS44MTA5MSAxMTc3LjM3NSw2MDg0LjkwMDg3IDExNzcuMzc1LDYwODMuNzgwNTggWiIgaWQ9IlNoYXBlIj48L3BhdGg+ICAgICAgICA8L2c+ICAgIDwvZz48L3N2Zz4="); background-size: 38%; } .auth0-lock.auth0-lock .auth0-lock-social-button.auth0-lock-social-big-button .auth0-lock-social-button-text { box-sizing: border-box; display: block; overflow: hidden; width: 100%; padding-left: 50px; padding-right: 15px; line-height: 40px; text-align: left; text-overflow: ellipsis; font-size: 14px; font-weight: 500; color: #fff; white-space: nowrap; transition: background 0.3s; -webkit-transition: background 0.3s; } @media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi) { .auth0-lock.auth0-lock .auth0-lock-social-button.auth0-lock-social-big-button .auth0-lock-social-button-text { font-weight: 600; } } .auth0-lock.auth0-lock .auth0-lock-social-button.auth0-lock-social-big-button:hover:not([disabled]) .auth0-lock-social-button-text, .auth0-lock.auth0-lock .auth0-lock-social-button.auth0-lock-social-big-button:focus:not([disabled]) .auth0-lock-social-button-text { background-color: rgba(0,0,0,0.3); } .auth0-lock.auth0-lock .auth0-lock-social-button[disabled] { background-color: #9b9b9b !important; } .auth0-lock.auth0-lock .auth0-lock-terms { background: #eee; text-align: center; display: block; font-size: 12px; color: rgba(0,0,0,0.54); line-height: 22px; padding: 10px; position: relative; } .auth0-lock.auth0-lock .auth0-lock-terms a { color: rgba(0,0,0,0.87); } .auth0-lock.auth0-lock .auth0-lock-submit { border: 0; padding: 14px; display: block; box-sizing: border-box; width: 100%; overflow: hidden; border-radius: 0 0 5px 5px; transition: 0.2s ease-in-out; color: #fff; letter-spacing: 1px; font-size: 14px; text-transform: uppercase; -ms-flex-negative: 0; flex-shrink: 0; -ms-flex-positive: 0; flex-grow: 0; -ms-flex-preferred-size: auto; flex-basis: auto; /*submit button animation*/ } .auth0-lock.auth0-lock .auth0-lock-submit span { display: inline-block; transition: 0.2s ease-in-out; } .auth0-lock.auth0-lock .auth0-lock-submit span svg { vertical-align: middle; display: inline; } .auth0-lock.auth0-lock .auth0-lock-submit span svg.icon-text { margin: -4px 0 0 5px; } .auth0-lock.auth0-lock .auth0-lock-submit .auth0-label-submit { height: 42px; line-height: 42px; } @media (min-width: 481px) { .auth0-lock.auth0-lock .auth0-lock-submit:hover:not([disabled]) span { transform: scale(1.05); } } .auth0-lock.auth0-lock .auth0-lock-submit:focus { box-shadow: inset 0 0 100px 20px rgba(0,0,0,0.2); } .auth0-lock.auth0-lock .auth0-lock-submit[disabled] { background-color: #9b9b9b !important; } .auth0-lock.auth0-lock .auth0-lock-submit[disabled] span svg circle, .auth0-lock.auth0-lock .auth0-lock-submit[disabled] span svg path { stroke: rgba(255,255,255,0.6); transition: 0.2s ease-in-out; } .auth0-lock.auth0-lock .auth0-lock-submit[disabled] span svg path { fill: rgba(255,255,255,0.6); } .auth0-lock.auth0-lock .auth0-lock-submit.vslide-enter { opacity: 0; } .auth0-lock.auth0-lock .auth0-lock-submit.vslide-enter.vslide-enter-active { opacity: 1; transition-duration: 0.5s; } .auth0-lock.auth0-lock .auth0-lock-submit-container { -ms-flex-negative: 0; flex-shrink: 0; } .auth0-lock.auth0-lock .auth0-loading-container { position: relative; display: none; } .auth0-lock.auth0-lock .auth0-loading-container .auth0-loading { position: absolute; top: 4px; left: 44%; width: 30px; height: 30px; border-width: 2px; border-style: solid; border-color: rgba(0,0,0,0.4) rgba(0,0,0,0.4) rgba(0,0,0,0.2) rgba(0,0,0,0.2); opacity: 0.9; border-radius: 20px; animation: rotate 1s linear infinite; } .auth0-lock.auth0-lock.auth0-lock-mode-loading .auth0-lock-content, .auth0-lock.auth0-lock.auth0-lock-mode-loading .auth0-lock-terms { opacity: 0.3; pointer-events: none; } .auth0-lock.auth0-lock.auth0-lock-mode-loading .auth0-lock-submit { background-color: #eee !important; transition: background 0.5s ease; cursor: initial; pointer-events: none; } .auth0-lock.auth0-lock.auth0-lock-mode-loading .auth0-lock-submit span { animation: fadeOutDownBig 1s both; } .auth0-lock.auth0-lock.auth0-lock-mode-loading .auth0-loading-container { animation: fadeInDownBig 1s both; display: block; } .auth0-lock.auth0-lock.auth0-lock-mode-loading .auth0-lock-back-button { opacity: 0; visibility: hidden; transition: 0.25s; } .auth0-lock.auth0-lock.auth0-lock-auxiliary .auth0-lock-header-avatar { animation: fadeOut 0.3s both; } .auth0-lock.auth0-lock.auth0-lock-auxiliary .auth0-lock-content, .auth0-lock.auth0-lock.auth0-lock-auxiliary .auth0-lock-terms, .auth0-lock.auth0-lock.auth0-lock-auxiliary .auth0-lock-submit { opacity: 0.3; pointer-events: none; } .auth0-lock.auth0-lock.auth0-lock-auxiliary .auth0-lock-back-button { opacity: 0; visibility: hidden; transition: 0.25s; } .auth0-lock.auth0-lock .auth0-lock-select-country { background-color: #fff; position: absolute; padding: 0; font-size: 14px; color: #666; bottom: 0; top: 0; right: 0; left: 0; border-radius: 5px; overflow: hidden; z-index: 200; } .auth0-lock.auth0-lock .auth0-lock-select-country .auth0-lock-back-button { opacity: 1; visibility: visible; top: 19px; } .auth0-lock.auth0-lock .auth0-lock-select-country .auth0-lock-search { background-color: #e3e5e9; padding: 10px; } .auth0-lock.auth0-lock .auth0-lock-select-country .auth0-lock-input-wrap { margin: 0; border: none; margin-left: 40px; overflow: hidden; } .auth0-lock.auth0-lock .auth0-lock-select-country .auth0-lock-icon { width: 16px; height: 16px; top: 12px; left: 9px; z-index: 1; } .auth0-lock.auth0-lock .auth0-lock-select-country .auth0-lock-input-search { border: none; } .auth0-lock.auth0-lock .auth0-lock-select-country .auth0-lock-list-code { position: relative; height: calc(100% - 60px); overflow-y: scroll; } .auth0-lock.auth0-lock .auth0-lock-select-country .auth0-lock-list-code ul { margin: 0; padding: 0; } .auth0-lock.auth0-lock .auth0-lock-select-country .auth0-lock-list-code li { list-style: none; text-align: left; border-bottom: 1px solid #eee; cursor: pointer; color: #000; font-size: 14px; padding: 15px 20px; margin: 0; text-overflow: ellipsis; width: 100%; white-space: nowrap; overflow: hidden; box-sizing: border-box; } @media (min-width: 481px) { .auth0-lock.auth0-lock .auth0-lock-select-country .auth0-lock-list-code li { padding: 10px 20px; } } .auth0-lock.auth0-lock .auth0-lock-select-country .auth0-lock-list-code li.auth0-lock-list-code-highlighted { background-color: #2eb5ff; color: #fff; } .auth0-lock.auth0-lock .auth0-lock-confirmation { background-color: #fff; position: absolute; text-align: center; line-height: 2; font-size: 14px; color: #666; width: 100%; height: 100%; top: 0; left: 0; z-index: 200; border-radius: 5px; } .auth0-lock.auth0-lock .auth0-lock-confirmation .auth0-lock-confirmation-content { width: 100%; top: 50%; left: 50%; transform: translate(-50%, -50%); position: absolute; } .auth0-lock.auth0-lock .auth0-lock-confirmation p { padding: 0 14px; margin-bottom: 6px; } .auth0-lock.auth0-lock .auth0-lock-confirmation a { display: block; font-weight: 500; color: #09c; } .auth0-lock.auth0-lock .auth0-lock-confirmation a svg { width: 15px; height: 16px; margin-bottom: -4px; margin-left: 0px; display: inline-block; transition: transform 1s ease; transform: rotate(120deg); } .auth0-lock.auth0-lock .auth0-lock-confirmation a svg path { fill: #09c; } .auth0-lock.auth0-lock .auth0-lock-confirmation a:hover svg { transform: rotate(490deg); } .auth0-lock.auth0-lock .auth0-lock-confirmation .auth0-lock-sent-label { color: #008000; animation: fadeIn 1s both; font-weight: 600; } .auth0-lock.auth0-lock .auth0-lock-confirmation .auth0-lock-sent-failed-label { color: #f00; animation: fadeIn 1s both; font-weight: 600; } .auth0-lock.auth0-lock .auth0-lock-confirmation .checkmark__circle { stroke-dasharray: 166; stroke-dashoffset: 166; stroke-width: 2; stroke-miterlimit: 10; stroke: #7ac142; fill: none; animation: stroke 0.6s 0.4s cubic-bezier(0.65, 0, 0.45, 1) forwards; } .auth0-lock.auth0-lock .auth0-lock-confirmation .checkmark { width: 56px; height: 56px; border-radius: 50%; display: block; stroke-width: 2; stroke: #fff; stroke-miterlimit: 10; margin: 0 auto; box-shadow: inset 0px 0px 0px #7ac142; animation: fill 0.4s ease-in-out 0.7s forwards, scale 0.3s ease-in-out 1.1s both; } .auth0-lock.auth0-lock .auth0-lock-confirmation .checkmark__check { transform-origin: 50% 50%; } .auth0-lock.auth0-lock .auth0-lock-confirmation .auth0-lock-back-button { opacity: 1; visibility: visible; } .auth0-lock.auth0-lock .auth0-lock-forgot-link { font-size: 12px; display: block; text-align: center; margin: 30px 0 0 0; color: #5c666f; } .auth0-lock.auth0-lock .auth0-lock-badge-bottom { position: absolute; bottom: 15px; left: 15px; z-index: -1; text-align: center; padding: 6px 10px; border-radius: 3px; background: rgba(255,255,255,0.1); } .auth0-lock.auth0-lock .auth0-lock-badge-bottom .auth0-lock-badge { display: inline-block; color: rgba(255,255,255,0.7); font-size: 14px; } .auth0-lock.auth0-lock .auth0-lock-badge-bottom .auth0-lock-badge svg { vertical-align: middle; margin: 0 4px; } .auth0-lock.auth0-lock .auth0-lock-badge-bottom .auth0-lock-badge:hover svg g#LogoBadge { fill: #eb5424; fill-opacity: 1; } .auth0-lock.auth0-lock.auth0-lock-opened { opacity: 1; pointer-events: auto; } @media (min-width: 481px) { .auth0-lock.auth0-lock.auth0-lock-opened .auth0-lock-center { overflow-y: auto; } } @media screen and (max-width: 480px) { .auth0-lock.auth0-lock.auth0-lock-opened { position: absolute; } } .auth0-lock.auth0-lock.auth0-lock-opened .auth0-lock-overlay { opacity: 0.9; transition: opacity 0.3s ease-in 0s; } @media screen and (max-width: 480px) { .auth0-lock.auth0-lock.auth0-lock-opened .auth0-lock-overlay { display: none; } } @media screen and (max-width: 480px) { .auth0-lock.auth0-lock.auth0-lock-opened .auth0-lock-header { border-radius: 0; } } .auth0-lock.auth0-lock.auth0-lock-opened .auth0-lock-header-bg .auth0-lock-header-bg-blur { opacity: 0.4; transition: 1s ease 1s; } @media screen and (max-width: 480px) { .auth0-lock.auth0-lock.auth0-lock-opened .auth0-lock-header-avatar { width: 70px; height: 70px; margin: 10px auto 0; } } @media screen and (max-width: 480px) { .auth0-lock.auth0-lock.auth0-lock-opened .auth0-lock-firstname { margin-top: 72px; } } .auth0-lock.auth0-lock.auth0-lock-opened .auth0-lock-widget { opacity: 1; transform: translateY(0%) scale(1); } @media (min-width: 481px) { .auth0-lock.auth0-lock.auth0-lock-opened .auth0-lock-widget { transition: transform 0.6s, opacity 0.6s; transition-delay: 0.5s; box-shadow: 0 0 40px 4px #111118; } } @media screen and (max-width: 480px) { .auth0-lock.auth0-lock.auth0-lock-opened .auth0-lock-widget { width: 100%; height: 100%; position: absolute; top: 0; bottom: 0; border-radius: 0; } } @media screen and (max-width: 480px) { .auth0-lock.auth0-lock.auth0-lock-opened .auth0-lock-widget-container { height: 100vh; height: calc(var(--vh, 1vh) * 100); } } @media screen and (max-width: 480px) { .auth0-lock.auth0-lock.auth0-lock-opened .auth0-lock-cred-pane { border-radius: 0; } } @media screen and (max-width: 480px) { .auth0-lock.auth0-lock.auth0-lock-opened .auth0-lock-body-content { background: #fff; display: table; width: 100%; } } @media screen and (max-width: 480px) { .auth0-lock.auth0-lock.auth0-lock-opened .auth0-lock-content { width: 100%; vertical-align: middle; } } @media screen and (max-width: 480px) { .auth0-lock.auth0-lock.auth0-lock-opened .auth0-lock-content .auth0-lock-form p { font-size: 14px; } } @media screen and (max-width: 480px) { .auth0-lock.auth0-lock.auth0-lock-opened .auth0-lock-terms { position: absolute; width: 100%; left: 0; box-sizing: border-box; } } @media screen and (max-width: 480px) { .auth0-lock.auth0-lock.auth0-lock-opened .auth0-lock-sign-up-terms-agreement label input { top: 2px; } } @media screen and (max-width: 480px) { .auth0-lock.auth0-lock.auth0-lock-opened .auth0-lock-submit { border-radius: 0; } } @media screen and (max-width: 480px) { .auth0-lock.auth0-lock.auth0-lock-opened .auth0-lock-badge-bottom { display: none; } } @media screen and (max-width: 480px) { .auth0-lock.auth0-lock.auth0-lock-opened .auth0-lock-confirmation { border-radius: 0; } } @media screen and (max-width: 480px) { .auth0-lock.auth0-lock.auth0-lock-opened.auth0-lock-with-terms .auth0-lock-body-content { margin-bottom: 42px; } } .auth0-lock.auth0-lock.auth0-lock-opened-in-frame { opacity: 1; pointer-events: auto; position: relative; width: auto; margin-left: auto; margin-right: auto; } .auth0-lock.auth0-lock.auth0-lock-opened-in-frame .auth0-lock-header-bg .auth0-lock-header-bg-blur { opacity: 0.4; transition: 1s ease 1s; } .auth0-lock.auth0-lock.auth0-lock-opened-in-frame .auth0-lock-header-bg .auth0-lock-header-bg-blur.auth0-lock-no-grayscale { opacity: 0.5; } .auth0-lock.auth0-lock.auth0-lock-opened-in-frame .auth0-lock-widget { opacity: 1; transform: translateY(0%) scale(1); transition: transform 0.6s, opacity 0.6s; transition-delay: 0.5s; margin: auto; } .auth0-lock.auth0-lock.auth0-lock-opened-in-frame .global-error { position: absolute; display: none; } .auth0-lock .auth0-lock-form div.auth0-lock-pane-separator { padding-top: 15px; } #social-container.lock-container .auth0-lock-mode-loading .auth0-lock-content { opacity: 1; } #social-container.lock-container .auth0-lock-mode-loading .auth0-lock-content .auth0-lock-social-buttons-container { opacity: 0.3; } .auth0-lock.auth0-lock .auth0-lock-tabs-container { margin-left: -20px; margin-right: -20px; margin-top: -20px; margin-bottom: 20px; } .auth0-lock.auth0-lock .auth0-lock-tabs { background: #fff; padding: 0; margin: 0; font-size: 13px; letter-spacing: 0.7px; box-shadow: 0 1px 0 0 rgba(92,102,111,0.2); display: -ms-flexbox; display: flex; -ms-flex-direction: row; flex-direction: row; -ms-flex-wrap: wrap; flex-wrap: wrap; -ms-flex-pack: center; justify-content: center; -ms-flex-line-pack: center; align-content: center; -ms-flex-align: stretch; align-items: stretch; } .auth0-lock.auth0-lock .auth0-lock-tabs:after { content: ""; display: table; clear: both; } .auth0-lock.auth0-lock .auth0-lock-tabs li { width: 50%; display: block; list-style: none; float: left; padding: 0; margin: 0; text-align: center; cursor: pointer; } .auth0-lock.auth0-lock .auth0-lock-tabs li a, .auth0-lock.auth0-lock .auth0-lock-tabs li span { padding: 11px 10px; display: block; text-decoration: none; color: rgba(92,102,111,0.6); font-weight: 500; } .auth0-lock.auth0-lock .auth0-lock-tabs li a:focus { color: rgba(92,102,111,0.9); } .auth0-lock.auth0-lock .auth0-lock-tabs li.auth0-lock-tabs-current { box-shadow: 0 1px 0 0 #5c666f; cursor: default; } .auth0-lock.auth0-lock .auth0-lock-tabs li.auth0-lock-tabs-current span { color: #5c666f; } .auth0-lock-password-strength { width: 100%; bottom: 41px; left: 0; display: block; text-align: left; padding-top: 0; animation-duration: 0.3s; transition: height 0.3s ease; } @media (min-width: 481px) { .auth0-lock-password-strength { position: absolute; background: #1f242e; box-shadow: 0 0 20px 0 rgba(0,0,0,0.5); transition: none; width: 100%; border-radius: 3px; z-index: 1000; } .auth0-lock-password-strength:after { top: 100%; left: 21px; border: solid transparent; content: " "; height: 0; width: 0; position: absolute; pointer-events: none; border-top-color: #1f242e; border-width: 9px; margin-left: -9px; } } .auth0-lock-password-strength.fadeOut { opacity: 0; transition: 0.3s 0.3s ease; visibility: hidden; } .auth0-lock-password-strength.fadeIn ul { animation: fadeIn 0.3s 0.1s both; } .auth0-lock-password-strength li, .auth0-lock-password-strength ul { margin: 0; padding: 0; list-style: none; color: #dd4b39; } .auth0-lock-password-strength > ul { padding: 15px; padding-top: 0; } @media (min-width: 481px) { .auth0-lock-password-strength > ul { padding-top: 12px; } } .auth0-lock-password-strength li span { background-image: url("data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiIHN0YW5kYWxvbmU9Im5vIj8+PHN2ZyB3aWR0aD0iMTJweCIgaGVpZ2h0PSIxMnB4IiB2aWV3Qm94PSIwIDAgMTIgMTIiIHZlcnNpb249IjEuMSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiB4bWxuczp4bGluaz0iaHR0cDovL3d3dy53My5vcmcvMTk5OS94bGluayI+ICAgICAgICA8dGl0bGU+RXJyb3I8L3RpdGxlPiAgICA8ZGVzYz5DcmVhdGVkIHdpdGggU2tldGNoLjwvZGVzYz4gICAgPGRlZnM+PC9kZWZzPiAgICA8ZyBpZD0iUGFzc3dvcmQtUG9saWN5IiBzdHJva2U9Im5vbmUiIHN0cm9rZS13aWR0aD0iMSIgZmlsbD0ibm9uZSIgZmlsbC1ydWxlPSJldmVub2RkIj4gICAgICAgIDxnIGlkPSJBcnRib2FyZC0xIiB0cmFuc2Zvcm09InRyYW5zbGF0ZSgtMjAwLjAwMDAwMCwgLTE0OC4wMDAwMDApIj4gICAgICAgICAgICA8ZyBpZD0iR3JvdXAtMiIgdHJhbnNmb3JtPSJ0cmFuc2xhdGUoMTUwLjAwMDAwMCwgNzUuMDAwMDAwKSI+ICAgICAgICAgICAgICAgIDxnIGlkPSJHcm91cC1Db3B5IiB0cmFuc2Zvcm09InRyYW5zbGF0ZSgzNS4wMDAwMDAsIDM2LjAwMDAwMCkiPiAgICAgICAgICAgICAgICAgICAgPGcgaWQ9IkVycm9yIiB0cmFuc2Zvcm09InRyYW5zbGF0ZSgxNS4wMDAwMDAsIDM3LjAwMDAwMCkiPiAgICAgICAgICAgICAgICAgICAgICAgIDxlbGxpcHNlIGlkPSJPdmFsLTkwIiBmaWxsPSIjQkU0NTI3IiBjeD0iNiIgY3k9IjYiIHJ4PSI2IiByeT0iNiI+PC9lbGxpcHNlPiAgICAgICAgICAgICAgICAgICAgICAgIDxwYXRoIGQ9Ik05LDMuNjA0Mjg1NzEgTDguMzk1NzE0MjksMyBMNiw1LjM5NTcxNDI5IEwzLjYwNDI4NTcxLDMgTDMsMy42MDQyODU3MSBMNS4zOTU3MTQyOSw2IEwzLDguMzk1NzE0MjkgTDMuNjA0Mjg1NzEsOSBMNiw2LjYwNDI4NTcxIEw4LjM5NTcxNDI5LDkgTDksOC4zOTU3MTQyOSBMNi42MDQyODU3MSw2IEw5LDMuNjA0Mjg1NzEgWiIgaWQ9IlNoYXBlIiBmaWxsPSIjRkZGRkZGIj48L3BhdGg+ICAgICAgICAgICAgICAgICAgICA8L2c+ICAgICAgICAgICAgICAgIDwvZz4gICAgICAgICAgICA8L2c+ICAgICAgICA8L2c+ICAgIDwvZz48L3N2Zz4="); background-position: left center; background-repeat: no-repeat; padding-left: 20px; } .auth0-lock-password-strength ul li ul { margin-left: 20px; } .auth0-lock-password-strength ul li ul li { color: #000; } @media (min-width: 481px) { .auth0-lock-password-strength ul li ul li { color: #fff; } } .auth0-lock-password-strength ul li ul li span { background-image: url("data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiIHN0YW5kYWxvbmU9Im5vIj8+PHN2ZyB3aWR0aD0iMTNweCIgaGVpZ2h0PSIxMnB4IiB2aWV3Qm94PSIwIDAgMTMgMTIiIHZlcnNpb249IjEuMSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiB4bWxuczp4bGluaz0iaHR0cDovL3d3dy53My5vcmcvMTk5OS94bGluayI+ICAgICAgICA8dGl0bGU+T3ZhbCAxPC90aXRsZT4gICAgPGRlc2M+Q3JlYXRlZCB3aXRoIFNrZXRjaC48L2Rlc2M+ICAgIDxkZWZzPjwvZGVmcz4gICAgPGcgaWQ9IlBhZ2UtMSIgc3Ryb2tlPSJub25lIiBzdHJva2Utd2lkdGg9IjEiIGZpbGw9Im5vbmUiIGZpbGwtcnVsZT0iZXZlbm9kZCI+ICAgICAgICA8ZyBpZD0iSXBob25lLTYtLS1OYXRpdmUiIHRyYW5zZm9ybT0idHJhbnNsYXRlKC00NC4wMDAwMDAsIC0yMTQuMDAwMDAwKSIgZmlsbD0iI0QwRDJEMyI+ICAgICAgICAgICAgPHBhdGggZD0iTTUwLjExNDk3MzMsMjI2IEM1My40Mjg2ODE4LDIyNiA1Ni4xMTQ5NzMzLDIyMy4zMTM3MDggNTYuMTE0OTczMywyMjAgQzU2LjExNDk3MzMsMjE2LjY4NjI5MiA1My40Mjg2ODE4LDIxNCA1MC4xMTQ5NzMzLDIxNCBDNDYuODAxMjY0OCwyMTQgNDQuMTE0OTczMywyMTYuNjg2MjkyIDQ0LjExNDk3MzMsMjIwIEM0NC4xMTQ5NzMzLDIyMy4zMTM3MDggNDYuODAxMjY0OCwyMjYgNTAuMTE0OTczMywyMjYgWiIgaWQ9Ik92YWwtMSI+PC9wYXRoPiAgICAgICAgPC9nPiAgICA8L2c+PC9zdmc+"); } .auth0-lock-password-strength li { line-height: 1.5; margin-top: 5px; font-size: 13px; transition: color 0.3s ease-in; position: relative; } .auth0-lock-password-strength li.auth0-lock-checked { color: #7ed321; } .auth0-lock-password-strength li.auth0-lock-checked > span { background-image: url("data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiIHN0YW5kYWxvbmU9Im5vIj8+PHN2ZyB3aWR0aD0iMTNweCIgaGVpZ2h0PSIxMnB4IiB2aWV3Qm94PSIwIDAgMTMgMTIiIHZlcnNpb249IjEuMSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiB4bWxuczp4bGluaz0iaHR0cDovL3d3dy53My5vcmcvMTk5OS94bGluayI+ICAgICAgICA8dGl0bGU+R3JvdXAgNDwvdGl0bGU+ICAgIDxkZXNjPkNyZWF0ZWQgd2l0aCBTa2V0Y2guPC9kZXNjPiAgICA8ZGVmcz48L2RlZnM+ICAgIDxnIGlkPSJQYWdlLTEiIHN0cm9rZT0ibm9uZSIgc3Ryb2tlLXdpZHRoPSIxIiBmaWxsPSJub25lIiBmaWxsLXJ1bGU9ImV2ZW5vZGQiPiAgICAgICAgPGcgaWQ9IklwaG9uZS02LS0tTmF0aXZlIiB0cmFuc2Zvcm09InRyYW5zbGF0ZSgtNDQuMDAwMDAwLCAtMjQwLjAwMDAwMCkiPiAgICAgICAgICAgIDxnIGlkPSJHcm91cC00IiB0cmFuc2Zvcm09InRyYW5zbGF0ZSg0NC4xMTQ5NzMsIDI0MC4wMDAwMDApIj4gICAgICAgICAgICAgICAgPGVsbGlwc2UgaWQ9Ik92YWwtOTAiIGZpbGw9IiM4MEQxMzUiIGN4PSI2IiBjeT0iNiIgcng9IjYiIHJ5PSI2Ij48L2VsbGlwc2U+ICAgICAgICAgICAgICAgIDxwYXRoIGQ9Ik00LjU0MjM1MzYxLDcuNzMzNzgwNzYgTDIuNjQ1ODIxNDksNS44NjgwMDg5NSBMMiw2LjQ5ODg4MTQzIEw0LjU0MjM1MzYxLDkgTDEwLDMuNjMwODcyNDggTDkuMzU4NzI2NTUsMyBMNC41NDIzNTM2MSw3LjczMzc4MDc2IFoiIGlkPSJTaGFwZSIgZmlsbD0iI0ZGRkZGRiI+PC9wYXRoPiAgICAgICAgICAgIDwvZz4gICAgICAgIDwvZz4gICAgPC9nPjwvc3ZnPg=="); } .auth0-lock-error-msg { color: #f00; font-size: 12px; margin-top: 5px; white-space: nowrap; } .auth0-lock .auth0-loading-screen { min-height: 42px; box-sizing: border-box; } @media screen and (max-width: 480px) { .auth0-lock .auth0-loading-screen { position: absolute; top: calc(50vh - 100%); left: calc(50vw - 15px); padding: 0; } } .auth0-lock .auth0-loading-screen .auth0-loading-container { display: block; } .auth0-lock .auth0-sso-notice-container { background: rgba(0,0,0,0.03); color: rgba(0,0,0,0.54); padding: 10px 0; margin: -20px -20px 20px; text-align: center; font-size: 10px; text-transform: uppercase; letter-spacing: 1px; } .auth0-lock .auth0-sso-notice-container .auth0-lock-icon { width: 12px; height: 14px; position: relative; top: 2px; right: 2px; } .auth0-lock .auth0-lock-last-login-pane .auth0-lock-social-button.auth0-lock-social-big-button { margin-top: 0; } .auth0-lock .auth0-lock-last-login-pane .auth0-lock-social-button[data-provider="auth0"] .auth0-lock-social-button-text { text-transform: none; font-size: 12px; font-weight: normal; } .auth0-lock .auth0-lock-sign-up-terms-agreement label input { margin-right: 5px; position: relative; } .auth0-lock-input-show-password { position: relative; } .auth0-lock-input-show-password .auth0-lock-show-password { position: absolute; top: 14px; right: 12px; width: 20px; height: 14px; } .auth0-lock-input-show-password .auth0-lock-show-password input[type=checkbox] { display: none; } .auth0-lock-input-show-password .auth0-lock-show-password input[type=checkbox] + label { background-image: url("data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiPz48c3ZnIHdpZHRoPSIyMHB4IiBoZWlnaHQ9IjE0cHgiIHZpZXdCb3g9IjAgMCAyMCAxNCIgdmVyc2lvbj0iMS4xIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHhtbG5zOnhsaW5rPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5L3hsaW5rIj4gICAgICAgIDx0aXRsZT5zaG93X3Bhc3N3b3JkX2luYWN0aXZlPC90aXRsZT4gICAgPGRlc2M+Q3JlYXRlZCB3aXRoIFNrZXRjaC48L2Rlc2M+ICAgIDxkZWZzPjwvZGVmcz4gICAgPGcgaWQ9IlBhZ2UtMSIgc3Ryb2tlPSJub25lIiBzdHJva2Utd2lkdGg9IjEiIGZpbGw9Im5vbmUiIGZpbGwtcnVsZT0iZXZlbm9kZCI+ICAgICAgICA8ZyBpZD0ic2hvd19wYXNzd29yZF9pbmFjdGl2ZSIgZmlsbC1ydWxlPSJub256ZXJvIiBmaWxsPSIjQ0NDQ0NDIj4gICAgICAgICAgICA8cGF0aCBkPSJNMjAsNy4xNDY0NjA3MSBDMjAsNy4zMjQ1NTU5MyAxOS44OTM4NzQ5LDcuNTA0OTY0MDcgMTkuNzg5NzkwNiw3LjYyMjkyMzI5IEMxOS41Nzk1ODExLDcuOTIxMjkwNjQgMTkuMzY5MzcxNiw4LjE1OTUyMTkzIDE5LjEwNjA5OTYsOC40NTc4ODkyMSBDMTcuODQyODAyMSw5Ljg4OTU4OTkzIDE2LjQyMDMxNjksMTEuMTQzMTk1NCAxNC44NDA2ODQ3LDEyLjA5ODQzMzUgQzEzLjg0MDY1OTIsMTIuNjk1MTY4MSAxMi43ODc1NzExLDEzLjE3Mzk0MzcgMTEuNjgxNDIwNCwxMy40MTIxNzUgQzEwLjQ2OTE0NDYsMTMuNjUwNDA2MyA5LjI1ODkwOTY0LDEzLjY1MDQwNjMgOC4wNDY2MzM4NiwxMy4zNTIwMzg5IEM1LjkzODQxNjgxLDEyLjgxNTQ0MDMgNC4wNDI0NTAwNCwxMS41NjE4MzQ5IDIuMzU2NjkyNzcsMTAuMDA5ODYyMSBDMS41NjY4NzY3MSw5LjI5Mjg1NTI5IDAuODMwMTIzMjE0LDguNTE4MDI1MjkgMC4xOTc0NTQwMTYsNy42MjI5MjMyOSBDLTAuMDY1ODE4MDA1Myw3LjI2NDQxOTg2IC0wLjA2NTgxODAwNTMsNi43ODc5NTczIDAuMTk3NDU0MDE2LDYuNDI5NDUzODcgQzAuNDA3NjYzNDU5LDYuMTMxMDg2NTUgMC42MTc4NzI5MDYsNS44OTI4NTUyNiAwLjg4MTE0NDkyOSw1LjU5NDQ4NzkgQzIuMTQ0NDQyNDYsNC4xNjI3ODcyMSAzLjU2NjkyNzczLDIuOTA5MTgxNzcgNS4xNDY1NTk4NSwxLjk1Mzk0MzY4IEM2LjE0NjU4NTM2LDEuMzU3MjA4OTkgNy4xOTk2NzM0MywwLjg3ODQzMzQ3MSA4LjMwNTgyNDE0LDAuNjQwMjAyMTgxIEM5LjUxODEsMC40MDE5NzA4ODkgMTAuNzI4MzM0OSwwLjQwMTk3MDg4OSAxMS45NDA2MTA3LDAuNzAwMzM4MjM2IEMxNC4wNDY3ODY5LDEuMjM2OTM2ODggMTUuOTQyNzUzNiwyLjQ5MDU0MjMxIDE3LjYyODUxMDksNC4wNDI1MTUxMSBDMTguNDE4MzI3LDQuNzU5NTIxOTEgMTkuMTU1MDgwNSw1LjUzNDM1MTgzIDE5Ljc4Nzc0OTYsNi40Mjk0NTM4NyBDMTkuODkzODc0OSw2LjU0OTcyNjAxIDE5Ljk5Nzk1OTEsNi43Mjc4MjEyMyAxOS45OTc5NTkxLDYuOTA1OTE2NDUgQzIwLDcuMDI2MTg4NTkgMjAsNy4wMjYxODg1OSAyMCw3LjA4NjMyNDYyIEMyMCw3LjE0NjQ2MDcxIDIwLDcuMTQ2NDYwNzEgMjAsNy4xNDY0NjA3MSBaIE05Ljk5MTk0NjA3LDIuMjkyOTUyNDIgQzcuNDk4OTQzMTQsMi4yOTI5NTI0MiA1LjQ1MjAwNDM4LDQuMzM5ODkxMiA1LjQ1MjAwNDM4LDYuODMyODk0MTMgQzUuNDUyMDA0MzgsOS4zMjU4OTcgNy40OTg5NDMxNCwxMS4zNzI4MzU5IDkuOTkxOTQ2MDcsMTEuMzcyODM1OSBDMTIuNDg0OTQ5LDExLjM3MjgzNTkgMTQuNTMxODg3Nyw5LjMyNTg5NyAxNC41MzE4ODc3LDYuODMyODk0MTMgQzE0LjUzMTg4NzcsNC4zMzk4OTEyIDEyLjQ4NDk0OSwyLjI5Mjk1MjQyIDkuOTkxOTQ2MDcsMi4yOTI5NTI0MiBaIE05Ljk5MTk0NjA3LDkuMTM3NTU4NzkgQzguNzEzMjI4ODYsOS4xMzc1NTg3OSA3LjY4OTc1OTQzLDguMTE0MDg5NDMgNy42ODk3NTk0Myw2LjgzNTM3MjI0IEM3LjY4OTc1OTQzLDUuNTU2NjU1MDcgOC43MTMyMjg4Niw0LjUzMzE4NTY2IDkuOTkxOTQ2MDcsNC41MzMxODU2NiBDMTEuMjcwNjYzMyw0LjUzMzE4NTY2IDEyLjI5NDEzMjYsNS41NTY2NTUwNyAxMi4yOTQxMzI2LDYuODM1MzcyMjQgQzEyLjI5NDEzMjYsOC4xMTQwODk0MyAxMS4yNzA2NjMzLDkuMTM3NTU4NzkgOS45OTE5NDYwNyw5LjEzNzU1ODc5IFoiIGlkPSJTaGFwZSI+PC9wYXRoPiAgICAgICAgPC9nPiAgICA8L2c+PC9zdmc+"); width: 20px; height: 14px; display: inline-block; cursor: pointer; vertical-align: top; } .auth0-lock-input-show-password .auth0-lock-show-password input[type=checkbox]:checked + label { background-image: url("data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiPz48c3ZnIHdpZHRoPSIyMHB4IiBoZWlnaHQ9IjE0cHgiIHZpZXdCb3g9IjAgMCAyMCAxNCIgdmVyc2lvbj0iMS4xIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHhtbG5zOnhsaW5rPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5L3hsaW5rIj4gICAgICAgIDx0aXRsZT5zaG93X3Bhc3N3b3JkX2FjdGl2ZTwvdGl0bGU+ICAgIDxkZXNjPkNyZWF0ZWQgd2l0aCBTa2V0Y2guPC9kZXNjPiAgICA8ZGVmcz48L2RlZnM+ICAgIDxnIGlkPSJQYWdlLTEiIHN0cm9rZT0ibm9uZSIgc3Ryb2tlLXdpZHRoPSIxIiBmaWxsPSJub25lIiBmaWxsLXJ1bGU9ImV2ZW5vZGQiPiAgICAgICAgPGcgaWQ9InNob3dfcGFzc3dvcmRfYWN0aXZlIiBmaWxsLXJ1bGU9Im5vbnplcm8iIGZpbGw9IiMyMEI0RkYiPiAgICAgICAgICAgIDxwYXRoIGQ9Ik0yMCw3LjE0NjQ2MDcxIEMyMCw3LjMyNDU1NTkzIDE5Ljg5Mzg3NDksNy41MDQ5NjQwNyAxOS43ODk3OTA2LDcuNjIyOTIzMjkgQzE5LjU3OTU4MTEsNy45MjEyOTA2NCAxOS4zNjkzNzE2LDguMTU5NTIxOTMgMTkuMTA2MDk5Niw4LjQ1Nzg4OTIxIEMxNy44NDI4MDIxLDkuODg5NTg5OTMgMTYuNDIwMzE2OSwxMS4xNDMxOTU0IDE0Ljg0MDY4NDcsMTIuMDk4NDMzNSBDMTMuODQwNjU5MiwxMi42OTUxNjgxIDEyLjc4NzU3MTEsMTMuMTczOTQzNyAxMS42ODE0MjA0LDEzLjQxMjE3NSBDMTAuNDY5MTQ0NiwxMy42NTA0MDYzIDkuMjU4OTA5NjQsMTMuNjUwNDA2MyA4LjA0NjYzMzg2LDEzLjM1MjAzODkgQzUuOTM4NDE2ODEsMTIuODE1NDQwMyA0LjA0MjQ1MDA0LDExLjU2MTgzNDkgMi4zNTY2OTI3NywxMC4wMDk4NjIxIEMxLjU2Njg3NjcxLDkuMjkyODU1MjkgMC44MzAxMjMyMTQsOC41MTgwMjUyOSAwLjE5NzQ1NDAxNiw3LjYyMjkyMzI5IEMtMC4wNjU4MTgwMDUzLDcuMjY0NDE5ODYgLTAuMDY1ODE4MDA1Myw2Ljc4Nzk1NzMgMC4xOTc0NTQwMTYsNi40Mjk0NTM4NyBDMC40MDc2NjM0NTksNi4xMzEwODY1NSAwLjYxNzg3MjkwNiw1Ljg5Mjg1NTI2IDAuODgxMTQ0OTI5LDUuNTk0NDg3OSBDMi4xNDQ0NDI0Niw0LjE2Mjc4NzIxIDMuNTY2OTI3NzMsMi45MDkxODE3NyA1LjE0NjU1OTg1LDEuOTUzOTQzNjggQzYuMTQ2NTg1MzYsMS4zNTcyMDg5OSA3LjE5OTY3MzQzLDAuODc4NDMzNDcxIDguMzA1ODI0MTQsMC42NDAyMDIxODEgQzkuNTE4MSwwLjQwMTk3MDg4OSAxMC43MjgzMzQ5LDAuNDAxOTcwODg5IDExLjk0MDYxMDcsMC43MDAzMzgyMzYgQzE0LjA0Njc4NjksMS4yMzY5MzY4OCAxNS45NDI3NTM2LDIuNDkwNTQyMzEgMTcuNjI4NTEwOSw0LjA0MjUxNTExIEMxOC40MTgzMjcsNC43NTk1MjE5MSAxOS4xNTUwODA1LDUuNTM0MzUxODMgMTkuNzg3NzQ5Niw2LjQyOTQ1Mzg3IEMxOS44OTM4NzQ5LDYuNTQ5NzI2MDEgMTkuOTk3OTU5MSw2LjcyNzgyMTIzIDE5Ljk5Nzk1OTEsNi45MDU5MTY0NSBDMjAsNy4wMjYxODg1OSAyMCw3LjAyNjE4ODU5IDIwLDcuMDg2MzI0NjIgQzIwLDcuMTQ2NDYwNzEgMjAsNy4xNDY0NjA3MSAyMCw3LjE0NjQ2MDcxIFogTTkuOTkxOTQ2MDcsMi4yOTI5NTI0MiBDNy40OTg5NDMxNCwyLjI5Mjk1MjQyIDUuNDUyMDA0MzgsNC4zMzk4OTEyIDUuNDUyMDA0MzgsNi44MzI4OTQxMyBDNS40NTIwMDQzOCw5LjMyNTg5NyA3LjQ5ODk0MzE0LDExLjM3MjgzNTkgOS45OTE5NDYwNywxMS4zNzI4MzU5IEMxMi40ODQ5NDksMTEuMzcyODM1OSAxNC41MzE4ODc3LDkuMzI1ODk3IDE0LjUzMTg4NzcsNi44MzI4OTQxMyBDMTQuNTMxODg3Nyw0LjMzOTg5MTIgMTIuNDg0OTQ5LDIuMjkyOTUyNDIgOS45OTE5NDYwNywyLjI5Mjk1MjQyIFogTTkuOTkxOTQ2MDcsOS4xMzc1NTg3OSBDOC43MTMyMjg4Niw5LjEzNzU1ODc5IDcuNjg5NzU5NDMsOC4xMTQwODk0MyA3LjY4OTc1OTQzLDYuODM1MzcyMjQgQzcuNjg5NzU5NDMsNS41NTY2NTUwNyA4LjcxMzIyODg2LDQuNTMzMTg1NjYgOS45OTE5NDYwNyw0LjUzMzE4NTY2IEMxMS4yNzA2NjMzLDQuNTMzMTg1NjYgMTIuMjk0MTMyNiw1LjU1NjY1NTA3IDEyLjI5NDEzMjYsNi44MzUzNzIyNCBDMTIuMjk0MTMyNiw4LjExNDA4OTQzIDExLjI3MDY2MzMsOS4xMzc1NTg3OSA5Ljk5MTk0NjA3LDkuMTM3NTU4NzkgWiIgaWQ9IlNoYXBlIj48L3BhdGg+ICAgICAgICA8L2c+ICAgIDwvZz48L3N2Zz4="); } .auth0-lock-recaptcha-block { border-radius: 4px; height: 65px; } .auth0-lock-recaptcha-block.auth0-lock-recaptcha-block-error { border: 1px solid #f00; } .auth0-lock-recaptcha-block .auth0-lock-recaptchav2 { transform: scale(0.855); transform-origin: 0px 0px; position: relative; } input[type="button"] { cursor: pointer; } .auth0-lock-hidden { display: none; } _:-ms-fullscreen, :root .auth0-lock.auth0-lock .auth0-lock-content-wrapper { -ms-flex-preferred-size: auto !important; flex-basis: auto !important; max-height: 70vh; } ',b=function(e){function t(n,o){var i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},u=arguments[3];if(m(this,t),"string"!=typeof n)throw new Error("A `clientID` string must be provided as first argument.");if("string"!=typeof o)throw new Error("A `domain` string must be provided as second argument.");if("object"!=("undefined"===typeof i?"undefined":r(i)))throw new Error("When provided, the third argument must be an `options` object.");var l=v(this,e.call(this));l.validEvents=["show","hide","unrecoverable_error","authenticated","authorization_error","hash_parsed","signin ready","signup ready","socialOrPhoneNumber ready","socialOrEmail ready","vcode ready","forgot_password ready","forgot_password submit","signin submit","signup submit","signup success","signup error","socialOrPhoneNumber submit","socialOrEmail submit","vcode submit","federated login","ssodata fetched","sso login"],l.id=p.incremental(),l.engine=u;var y=l.runHook.bind(l),M=l.emit.bind(l),b=l.on.bind(l);(0,g.go)(l.id),(0,c.initSanitizer)();var j=(0,d.setupLock)(l.id,n,o,i,y,M,b);return l.on("newListener",(function(e){-1===l.validEvents.indexOf(e)&&f.emitUnrecoverableErrorEvent(j,'Invalid event "'+e+'".')})),f.auth.autoParseHash(j)&&!t.hasScheduledAuthCallback&&(t.hasScheduledAuthCallback=!0,setTimeout(d.handleAuthCallback,0)),(0,a.observe)("render",l.id,(function(e){var t=function(t,n){var r=t[n](e);return r?function(){for(var t=arguments.length,n=Array(t),o=0;o1?n-1:0),o=1;o1?n-1:0),o=1;o0&&void 0!==arguments[0]?arguments[0]:{};(0,d.openLock)(this.id,e)},t.prototype.hide=function(){(0,d.closeLock)(this.id,!0)},t.prototype.destroy=function(){(0,d.removeLock)(this.id)},t.prototype.getProfile=function(e,t){return this.getUserInfo(e,t)},t.prototype.getUserInfo=function(e,t){return l.default.getUserInfo(this.id,e,t)},t.prototype.checkSession=function(e,t){return l.default.checkSession(this.id,e,t)},t.prototype.logout=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};l.default.logout(this.id,e)},t.prototype.update=function(e){return(0,d.updateLock)(this.id,e)},t.prototype.setModel=function(e){return this.update((function(){return e}))},t.prototype.runHook=function(e,t){for(var n,r=f.hooks(t).toJS(),o=arguments.length,i=Array(o>2?o-2:0),a=2;a0,t=window.location.href.split("#")[0];f(window.location.hash,(function(n,r){(n||r)&&!e&&window.history.replaceState(null,"",t)}))},t.resumeAuth=f,t.openLock=function(e,t){var n=(0,i.read)(i.getEntity,"lock",e);if(!n)throw new Error("The Lock can't be opened again after it has been destroyed");if(s.rendering(n))return!1;if(t.flashMessage){if(!t.flashMessage.type||-1===["error","success","info"].indexOf(t.flashMessage.type))return s.emitUnrecoverableErrorEvent(n,"'flashMessage' must provide a valid type ['error','success','info']");if(!t.flashMessage.text)return s.emitUnrecoverableErrorEvent(n,"'flashMessage' must provide a text")}return s.emitEvent(n,"show"),(0,i.swap)(i.updateEntity,"lock",e,(function(e){return e=s.overrideOptions(e,t),e=s.filterConnections(e),e=s.runHook(e,"willShow",t),s.render(e)})),!0},t.closeLock=p,t.removeLock=function(e){(0,i.swap)(i.updateEntity,"lock",e,s.stopRendering),(0,i.swap)(i.removeEntity,"lock",e)},t.updateLock=function(e,t){return(0,i.swap)(i.updateEntity,"lock",e,t)},t.pinLoadingPane=function(e){(0,i.read)(i.getEntity,"lock",e).get("isLoadingPanePinned")||(0,i.swap)(i.updateEntity,"lock",e,(function(e){return e.set("isLoadingPanePinned",!0)}))},t.unpinLoadingPane=function(e){(0,i.swap)(i.updateEntity,"lock",e,(function(e){return e.set("isLoadingPanePinned",!1)}))},t.validateAndSubmit=h,t.logIn=function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:function(e,t,n,r){return r()};h(e,t,(function(i){try{s.runHook(i,"loggingIn",null,(function(){o.default.logIn(e,n,s.auth.params(i).toJS(),(function(n,o){n?setTimeout((function(){return y(e,t,n,r)}),250):g(e,o)}))}))}catch(a){setTimeout((function(){return y(e,t,a,r)}),250)}}))},t.checkSession=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};(0,i.read)(i.getEntity,"lock",e);(0,i.swap)(i.updateEntity,"lock",e,(function(e){return s.setSubmitting(e,!0)})),o.default.checkSession(e,t,(function(t,n){return t?y(e,[],t):g(e,n)}))},t.logInSuccess=g;d(n(5986));var o=d(n(3564)),i=n(5831),a=n(6975),s=function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n]);return t.default=e,t}(n(1181)),u=n(6753),l=n(7471),c=n(6782);function d(e){return e&&e.__esModule?e:{default:e}}function f(e,t){(0,i.read)(i.getCollection,"lock").forEach((function(n){return s.auth.redirect(n)&&function(e,t,n){o.default.parseHash(s.id(e),t,(function(t,r){t?s.emitHashParsedEvent(e,t):s.emitHashParsedEvent(e,r),t?s.emitAuthorizationErrorEvent(e,t):r&&s.emitAuthenticatedEvent(e,r),n(t,r)}))}(n,e,t)}))}function p(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1],n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:function(){},r=(0,i.read)(i.getEntity,"lock",e);(s.ui.closable(r)||t)&&s.rendering(r)&&(s.emitEvent(r,"hide"),s.ui.appendContainer(r)?((0,i.swap)(i.updateEntity,"lock",e,s.stopRendering),setTimeout((function(){(0,i.swap)(i.updateEntity,"lock",e,(function(e){return e=(0,c.hideInvalidFields)(e),e=s.reset(e),e=(0,c.clearFields)(e)})),r=(0,i.read)(i.getEntity,"lock",e),n(r)}),1e3)):((0,i.swap)(i.updateEntity,"lock",e,(function(e){return e=(0,c.hideInvalidFields)(e),e=s.reset(e),e=(0,c.clearFields)(e)})),n(r)))}function h(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[],n=arguments[2];(0,i.swap)(i.updateEntity,"lock",e,(function(e){return t.reduce((function(t,n){return t&&(0,c.isFieldValid)(e,n)}),!0)?s.setSubmitting(e,!0):t.reduce((function(e,t){return(0,c.showInvalidField)(e,t)}),e)}));var r=(0,i.read)(i.getEntity,"lock",e);s.submitting(r)&&n(r)}function g(e,t){var n=(0,i.read)(i.getEntity,"lock",e);s.ui.autoclose(n)?p(e,!1,(function(e){return s.emitAuthenticatedEvent(e,t)})):((0,i.swap)(i.updateEntity,"lock",e,(function(e){return e=s.setSubmitting(e,!1),s.setLoggedIn(e,!0)})),s.emitAuthenticatedEvent(n,t))}function y(e,t,n){var r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:function(e,t,n,r){return r()},o=n.error||n.code;r(e,n,t,(function(){return setTimeout((function(){var r=(0,i.read)(i.getEntity,"lock",e),a=s.loginErrorMessage(r,n,m(t));["blocked_user","rule_error","lock.unauthorized","invalid_user_password","login_required"].indexOf(o)>-1&&s.emitAuthorizationErrorEvent(r,n),(0,i.swap)(i.updateEntity,"lock",e,s.setSubmitting,!1,a)}),0)})),(0,i.swap)(i.updateEntity,"lock",e,s.setSubmitting,!1)}function m(e){if(e)return~e.indexOf("vcode")?"code":~e.indexOf("username")?"username":~e.indexOf("email")?"email":void 0}},2617:function(e,t,n){"use strict";t.__esModule=!0;var r=Object.assign||function(e){for(var t=1;t-1},t.connection=function(e,t,n){return function(e,t){return e.getIn(["client","strategies"],(0,o.List)()).find(g(t))||(0,o.Map)()}(e,t).get("connections",(0,o.List)()).find(g(n))||(0,o.Map)()},t.initClient=function(e,t){return f(e,function(e){return new i.default.fromJS({id:e.id,tenant:{name:e.tenant,subscription:e.subscription},connections:m(e)})}(t))},t.clientConnections=function(e){return p(e,"connections",y)};var o=n(5986),i=c(o),a=c(n(7135)),s=n(2982),u=n(3908),l=n(2006);function c(e){return e&&e.__esModule?e:{default:e}}var d=(0,s.dataFns)(["client"]),f=d.initNS,p=d.get,h={username:{min:1,max:15}};function g(e){return function(t){return t.get("name")===e}}var y=i.default.fromJS({database:[],enterprise:[],passwordless:[],social:[],unknown:[]});function m(e){for(var t=y.toJS(),n=function(){var n,i,s=e.strategies[o],c="auth0"===(i=s.name)?"database":"email"===i||"sms"===i?"passwordless":u.STRATEGIES[i]?"social":l.STRATEGIES[i]?"enterprise":-1!==["oauth1","oauth2"].indexOf(i)?"social":"unknown",d=s.connections.map((function(e){return function(e,t,n){var o={name:n.name,strategy:t,type:e,displayName:n.display_name};"database"===e&&(o.passwordPolicy=a.default[n.passwordPolicy||"none"],n.password_complexity_options&&n.password_complexity_options.min_length&&(o.passwordPolicy.length.minLength=n.password_complexity_options.min_length),o.allowSignup="boolean"!==typeof n.showSignup||n.showSignup,o.allowForgot="boolean"!==typeof n.showForgot||n.showForgot,o.requireUsername="boolean"===typeof n.requires_username&&n.requires_username,o.validation=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};if(null==e.username)return null;var t=r({},h,e),n=h.username.min,o=h.username.max;return t.username.min=parseInt(t.username.min,10)||n,t.username.max=parseInt(t.username.max,10)||o,t.username.min>t.username.max&&(t.username.min=n,t.username.max=o),t}(n.validation));if("enterprise"===e){var i=n.domain_aliases||[];n.domain&&i.unshift(n.domain),o.domains=i}return o}(c,s.name,e)}));(n=t[c]).push.apply(n,d)},o=0;o<(e.strategies||[]).length;o++)n();return t}},7502:function(e,t,n){"use strict";t.__esModule=!0,t.fetchClientSettings=function(e,t,n){(0,a.load)({method:"setClient",url:(0,i.default)(t,"client",e+".js?t"+ +new Date),check:function(t){return t&&t.id===e},cb:n})},t.syncClientSettingsSuccess=function(e,t){return e=(0,u.initClient)(e,t),e=s.filterConnections(e),e=s.runHook(e,"didReceiveClientSettings")};var r,o=n(3766),i=(r=o)&&r.__esModule?r:{default:r},a=n(3253),s=function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n]);return t.default=e,t}(n(1181)),u=n(2617)},9426:function(e,t,n){"use strict";t.__esModule=!0;var r=a(n(5192)),o=a(n(7215)),i=a(n(4937));!function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n]);t.default=e}(n(1181));function a(e){return e&&e.__esModule?e:{default:e}}var s=function(e){function t(){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!==typeof t&&"function"!==typeof t?e:t}(this,e.call(this,"error"))}return function(e,t){if("function"!==typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,e),t.prototype.render=function(){return u},t}(i.default);t.default=s;var u=function(e){var t=e.i18n;return o.default.createElement("div",{className:"auth0-lock-error-pane"},o.default.createElement("p",null,t.html("unrecoverableError")))};u.propTypes={i18n:r.default.object.isRequired}},1181:function(e,t,n){"use strict";t.__esModule=!0,t.reset=t.auth=t.ui=t.validPublicHooks=void 0;var r="function"===typeof Symbol&&"symbol"===typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"===typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e};t.setup=function(e,t,n,r,o,i,s){var u=b(e,a.default.fromJS({clientBaseUrl:B(r,n),tenantBaseUrl:F(r,n),languageBaseUrl:Y(r,n),auth:R(r),clientID:t,domain:n,emitEventFn:i,hookRunner:o,useTenantInfo:r.__useTenantInfo||!1,hashCleanup:!1!==r.hashCleanup,allowedConnections:a.default.fromJS(r.allowedConnections||[]),useCustomPasswordlessConnection:!0===r.useCustomPasswordlessConnection,ui:C(e,r),defaultADUsernameFromEmailPrefix:!1!==r.defaultADUsernameFromEmailPrefix,prefill:r.prefill||{},connectionResolver:r.connectionResolver,handleEventFn:s,hooks:E(r)}));return u=c.initI18n(u)},t.id=function(e){return e.get("id")},t.clientID=function(e){return M(e,"clientID")},t.domain=function(e){return M(e,"domain")},t.clientBaseUrl=function(e){return M(e,"clientBaseUrl")},t.tenantBaseUrl=function(e){return M(e,"tenantBaseUrl")},t.useTenantInfo=function(e){return M(e,"useTenantInfo")},t.connectionResolver=function(e){return M(e,"connectionResolver")},t.setResolvedConnection=function(e,t){if(!t)return w(e,"resolvedConnection",void 0);if(!t.type||!t.name)throw new Error('Invalid connection object. The resolved connection must look like: `{ type: "database", name: "connection name" }`.');if("database"!==t.type)throw new Error("Invalid connection type. Only database connections can be resolved with a custom resolver.");return w(e,"resolvedConnection",a.default.fromJS(t))},t.resolvedConnection=function(e){var t=M(e,"resolvedConnection");if(!t)return;return H(e,t.get("name"))},t.languageBaseUrl=function(e){return M(e,"languageBaseUrl")},t.setSubmitting=function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"";return e=k(e=N(e,"submitting",t)),e=n&&!t?S(e,n):L(e)},t.submitting=function(e){return x(e,"submitting",!1)},t.setGlobalError=S,t.globalError=function(e){return x(e,"globalError","")},t.clearGlobalError=L,t.setGlobalSuccess=function(e,t){return N(e,"globalSuccess",t)},t.globalSuccess=function(e){return x(e,"globalSuccess","")},t.clearGlobalSuccess=k,t.setGlobalInfo=function(e,t){return N(e,"globalInfo",t)},t.globalInfo=function(e){return x(e,"globalInfo","")},t.clearGlobalInfo=function(e){return I(e,"globalInfo")},t.rendering=function(e){return x(e,"render",!1)},t.stopRendering=function(e){return I(e,"render")},t.setSupressSubmitOverlay=function(e,t){return w(e,"suppressSubmitOverlay",t)},t.suppressSubmitOverlay=function(e){return M(e,"suppressSubmitOverlay")},t.hooks=function(e){return M(e,"hooks")},t.withAuthOptions=function(e,t){return a.default.fromJS(t).merge(M(e,"auth")).toJS()},t.extractTenantBaseUrlOption=F,t.render=function(e){return N(e,"render",!0)},t.setLoggedIn=function(e,t){return N(e,"loggedIn",t)},t.loggedIn=function(e){return x(e,"loggedIn",!1)},t.defaultADUsernameFromEmailPrefix=function(e){return M(e,"defaultADUsernameFromEmailPrefix",!0)},t.setCaptcha=function(e,t,n){return e=g.reset(e,n),w(e,"captcha",a.default.fromJS(t))},t.captcha=function(e){if("object"!==("undefined"===typeof e?"undefined":r(e)))return;return M(e,"captcha")},t.prefill=function(e){return M(e,"prefill",{})},t.warn=function(e,t){(i.Map.isMap(e)?!U.disableWarnings(e):!e.disableWarnings)&&console&&console.warn&&console.warn(t)},t.error=function(e,t){(i.Map.isMap(e)?!U.disableWarnings(e):!e.disableWarnings)&&console&&console.error&&console.error(t)},t.allowedConnections=Q,t.connections=G,t.connection=function(e){for(var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:void 0,n=arguments.length,r=Array(n>2?n-2:0),o=2;o1&&void 0!==arguments[1]?arguments[1]:void 0,n=G(e);return 1===n.count()&&(!t||n.getIn([0,"type"])===t)},t.hasOnlyConnections=function(e){for(var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:void 0,n=G(e).count(),r=arguments.length,o=Array(r>2?r-2:0),i=2;i0&&n===a},t.hasSomeConnections=function(e){for(var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:void 0,n=arguments.length,r=Array(n>2?n-2:0),o=2;o0},t.countConnections=W,t.findConnection=H,t.hasConnection=function(e,t){return!!H(e,t)},t.filterConnections=function(e){var t=Q(e),n=0===t.count()?function(e){return 0}:function(e){return t.indexOf(e.get("name"))};return N(e,"connections",(0,h.clientConnections)(e).map((function(e){return e.filter((function(e){return n(e)>=0})).sort((function(e,t){return n(e)-n(t)}))})))},t.useCustomPasswordlessConnection=function(e){return M(e,"useCustomPasswordlessConnection")},t.runHook=function(e,t){for(var n=arguments.length,r=Array(n>2?n-2:0),o=2;o2?r-2:0),i=2;i2?t-2:0),r=2;r1&&void 0!==arguments[1]?arguments[1]:void 0;if(1===arguments.length)return x(e,"connections",(0,i.Map)()).filter((function(e,t){return"unknown"!==t})).valueSeq().flatten(!0);var a=x(e,["connections",o],(0,i.List)());return n.length>0?a.filter((function(e){return~n.indexOf(e.get("strategy"))})):a}function W(e){for(var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:void 0,n=arguments.length,r=Array(n>2?n-2:0),o=2;o2?n-2:0),o=2;o1&&void 0!==arguments[1]?arguments[1]:{};return t.closeHandler=a.closeLock,t.key="auxiliarypane",t.lock=e,s.loggedIn(e)?o.default.createElement(p,t):null};var r=c(n(5192)),o=c(n(7215)),i=c(n(2432)),a=n(4137),s=l(n(1181)),u=l(n(2454));function l(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n]);return t.default=e,t}function c(e){return e&&e.__esModule?e:{default:e}}function d(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function f(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!==typeof t&&"function"!==typeof t?e:t}var p=function(e){function t(){return d(this,t),f(this,e.apply(this,arguments))}return function(e,t){if("function"!==typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,e),t.prototype.handleClose=function(){var e=this.props,t=e.closeHandler,n=e.lock;t(s.id(n))},t.prototype.render=function(){var e=this.props.lock,t=s.ui.closable(e)?this.handleClose.bind(this):void 0;return o.default.createElement(i.default,{lock:e,closeHandler:t},o.default.createElement("p",null,u.html(e,["success","logIn"])))},t}(o.default.Component);t.default=p,p.propTypes={closeHandler:r.default.func.isRequired,lock:r.default.object.isRequired}},6292:function(e,t,n){"use strict";t.__esModule=!0,t.fetchSSOData=function(e){for(var t=arguments.length,n=Array(t>1?t-1:0),r=1;r0&&void 0!==arguments[0]?arguments[0]:{};if(null==e.username)return null;var t=r({},f,e),n=f.username.min,o=f.username.max;return t.username.min=parseInt(t.username.min,10)||n,t.username.max=parseInt(t.username.max,10)||o,t.username.min>t.username.max&&(t.username.min=n,t.username.max=o),t}(t.validation));"enterprise"===e&&(n.domains=t.domains);return n}(e,t)})).filter((function(e){return null===a||a.includes(e.name)}));(o=n[e]).push.apply(o,s)})),n}function g(e){return d(e,"defaultDirectory",null)}},6081:function(e,t,n){"use strict";t.__esModule=!0,t.fetchTenantSettings=function(e,t){(0,r.load)({method:"setTenant",url:e+"?t"+ +new Date,check:function(){return!0},cb:t})},t.syncTenantSettingsSuccess=function(e,t,n){return e=(0,i.initTenant)(e,t,n),e=o.filterConnections(e),e=o.runHook(e,"didReceiveClientSettings")};var r=n(3253),o=function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n]);return t.default=e,t}(n(1181)),i=n(4496)},3564:function(e,t,n){"use strict";t.__esModule=!0;var r,o=n(402),i=(r=o)&&r.__esModule?r:{default:r};var a=function(){function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.clients={}}return e.prototype.setupClient=function(e,t,n,r){var o=window.location.host===n;r.redirect=!!o||r.redirect,!o&&window&&(window.cordova||window.electron)&&(r.redirect=!1,r.sso=!1),this.clients[e]=new i.default(e,t,n,r)},e.prototype.logIn=function(e,t,n,r){this.clients[e].logIn(t,n,r)},e.prototype.logout=function(e,t){this.clients[e].logout(t)},e.prototype.signUp=function(e,t,n){this.clients[e].signUp(t,n)},e.prototype.resetPassword=function(e,t,n){this.clients[e].resetPassword(t,n)},e.prototype.startPasswordless=function(e,t,n){this.clients[e].passwordlessStart(t,n)},e.prototype.passwordlessVerify=function(e,t,n){this.clients[e].passwordlessVerify(t,n)},e.prototype.parseHash=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",n=arguments[2];return this.clients[e].parseHash(t,n)},e.prototype.getUserInfo=function(e,t,n){return this.clients[e].getUserInfo(t,n)},e.prototype.getProfile=function(e,t,n){return this.clients[e].getProfile(t,n)},e.prototype.getChallenge=function(e,t){return this.clients[e].getChallenge(t)},e.prototype.getSSOData=function(e){for(var t,n=arguments.length,r=Array(n>1?n-1:0),o=1;o=0||Object.prototype.hasOwnProperty.call(e,r)&&(n[r]=e[r]);return n}function r(e,t){if(!e)return e;if("User closed the popup window"===e.status)return{code:"lock.popup_closed",error:"lock.popup_closed",description:"Popup window closed."};if("unauthorized"===e.code)return e.description&&"access_denied"!==e.description?"user is blocked"===e.description?{code:"blocked_user",error:"blocked_user",description:e.description}:{code:"rule_error",error:"rule_error",description:e.description}:{code:"lock.unauthorized",error:"lock.unauthorized",description:e.description||"Permissions were not granted."};if(window.location.host!==t&&("access_denied"===e.error||"access_denied"===e.code))return{code:"invalid_user_password",error:"invalid_user_password",description:e.description};var n;if("invalid_captcha"===e.code)return(n={code:"invalid_captcha"}).code="invalid_captcha",n.description=e.description,n;var r={error:e.code?e.code:e.statusCode||e.error,description:e.description||e.code};return void 0===r.error&&void 0===r.description?e:r}t.__esModule=!0,t.normalizeError=r,t.loginCallback=function(e,t,n){return e?function(e){return n(r(e,t))}:function(e,o){return n(r(e,t),o)}},t.normalizeAuthParams=function(e){e.popup;return n(e,["popup"])},t.webAuthOverrides=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.__tenant,n=e.__token_issuer,r=e.__jwks_uri;if(t||n||r)return{__tenant:t,__token_issuer:n,__jwks_uri:r};return null},t.trimAuthParams=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=n(e,[]);return["username","email","phoneNumber","mfa_code"].forEach((function(e){"string"===typeof t[e]&&(t[e]=t[e].trim())})),t},t.getVersion=function(){return"11.34.1"}},402:function(e,t,n){"use strict";t.__esModule=!0;var r=Object.assign||function(e){for(var t=1;t0&&void 0!==arguments[0]?arguments[0]:"",t=arguments[1];return this.client.parseHash({__enableIdPInitiatedLogin:this._enableIdPInitiatedLogin,hash:e,nonce:this.authOpt.nonce,state:this.authOpt.state},t)},e.prototype.getUserInfo=function(e,t){return this.client.client.userInfo(e,t)},e.prototype.getProfile=function(e,t){this.getUserInfo(e,t)},e.prototype.getSSOData=function(){var e;return(e=this.client.client).getSSOData.apply(e,arguments)},e.prototype.getChallenge=function(){var e;return(e=this.client.client).getChallenge.apply(e,arguments)},e.prototype.getUserCountry=function(e){return this.client.client.getUserCountry(e)},e.prototype.checkSession=function(e,t){return this.client.checkSession(e,t)},e}();t.default=l},9344:function(e,t,n){"use strict";t.__esModule=!0,t.isSSOEnabled=function(e,t){return I(e,(0,u.databaseUsernameValue)(e,t))},t.matchesEnterpriseConnection=I,t.usernameStyle=function(e){return(0,u.authWithUsername)(e)&&!(0,l.isADEnabled)(e)?"username":"email"},t.hasOnlyClassicConnections=function(e){for(var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:void 0,n=arguments.length,r=Array(n>2?n-2:0),o=2;o1?"usernameOrEmailInputPlaceholder":"usernameInputPlaceholder",w=(0,u.databaseUsernameStyle)(n),x=(o||f.hasSomeConnections(n,"database")||f.hasSomeConnections(n,"enterprise"))&&r.default.createElement(a.default,{emailInputPlaceholder:t.str("emailInputPlaceholder"),forgotPasswordAction:t.str("forgotPasswordAction"),i18n:t,instructions:t.html(M),lock:n,passwordInputPlaceholder:t.str("passwordInputPlaceholder"),showForgotPasswordLink:v,showPassword:m,usernameInputPlaceholder:t.str(j),usernameStyle:w}),N=o&&r.default.createElement(g.default,null,t.str("ssoEnabled")),I=p&&x&&r.default.createElement(s.default,null);return r.default.createElement("div",null,N,c,r.default.createElement("div",null,p,I,x))},w=function(e){function t(){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!==typeof t&&"function"!==typeof t?e:t}(this,e.call(this,"main.login"))}return function(e,t){if("function"!==typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,e),t.prototype.renderAuxiliaryPane=function(e){return(0,c.renderSignedInConfirmation)(e)},t.prototype.renderTabs=function(e){return b(e)},t.prototype.submitButtonLabel=function(e){return m.str(e,["loginSubmitLabel"])},t.prototype.isSubmitDisabled=function(e){return!f.hasSomeConnections(e,"database")&&!(0,h.findADConnectionWithoutDomain)(e)&&!(0,y.isSSOEnabled)(e)},t.prototype.submitHandler=function(e){return(0,y.hasOnlyClassicConnections)(e,"social")?null:(0,h.isHRDDomain)(e,(0,u.databaseUsernameValue)(e))?function(t){return(0,p.startHRD)(t,(0,u.databaseUsernameValue)(e))}:!(0,y.isSSOEnabled)(e)&&(0,u.databaseConnection)(e)&&((0,u.defaultDatabaseConnection)(e)||!(0,h.defaultEnterpriseConnection)(e))?l.logIn:p.logIn},t.prototype.render=function(){return j},t}(o.default);t.default=w},2673:function(e,t,n){"use strict";t.__esModule=!0;var r=c(n(7215)),o=c(n(4937)),i=c(n(9327)),a=function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n]);return t.default=e,t}(n(2454)),s=n(427),u=n(5037),l=n(5537);function c(e){return e&&e.__esModule?e:{default:e}}var d=function(e){var t=e.i18n,n=e.model;return r.default.createElement(i.default,{mfaInputPlaceholder:t.str("mfaInputPlaceholder"),i18n:t,instructions:t.str("mfaLoginInstructions"),lock:n,title:t.str("mfaLoginTitle")})},f=function(e){function t(){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!==typeof t&&"function"!==typeof t?e:t}(this,e.call(this,"mfa.mfaCode"))}return function(e,t){if("function"!==typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,e),t.prototype.renderAuxiliaryPane=function(e){return(0,l.renderSignedInConfirmation)(e)},t.prototype.submitButtonLabel=function(e){return a.str(e,["mfaSubmitLabel"])},t.prototype.submitHandler=function(e){return function(e){return(0,s.logIn)(e,!0)}},t.prototype.render=function(){return d},t.prototype.backHandler=function(e){return(0,u.hasScreen)(e,"login")?s.cancelMFALogin:void 0},t}(o.default);t.default=f},7499:function(e,t,n){"use strict";t.__esModule=!0;var r=h(n(7215)),o=h(n(2764)),i=h(n(2977)),a=h(n(6674)),s=h(n(6280)),u=n(5037),l=h(n(1407)),c=function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n]);return t.default=e,t}(n(1181)),d=n(2496),f=n(2006),p=n(9344);function h(e){return e&&e.__esModule?e:{default:e}}function g(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function y(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!==typeof t&&"function"!==typeof t?e:t}var m=function(e){function t(){return g(this,t),y(this,e.apply(this,arguments))}return function(e,t){if("function"!==typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,e),t.prototype.render=function(){var e=this.props,t=e.emailInputPlaceholder,n=e.instructions,h=e.i18n,g=e.model,y=e.onlyEmail,m=e.passwordInputPlaceholder,v=e.passwordStrengthMessages,M=e.usernameInputPlaceholder,b=n||null,j=b&&r.default.createElement("p",null,b),w=(0,p.isSSOEnabled)(g),x=y||!(0,u.databaseConnectionRequiresUsername)(g)||(0,u.signUpHideUsernameField)(g)?null:r.default.createElement(a.default,{i18n:h,lock:g,placeholder:M,validateFormat:!0,strictValidation:(0,u.signUpFieldsStrictValidation)(g)}),N=!y&&(0,u.additionalSignUpFields)(g).map((function(e){return r.default.createElement(s.default,{iconUrl:e.get("icon"),key:e.get("name"),model:g,name:e.get("name"),ariaLabel:e.get("ariaLabel"),options:e.get("options"),placeholder:e.get("placeholder"),placeholderHTML:e.get("placeholderHTML"),type:e.get("type"),validator:e.get("validator"),value:e.get("value")})})),I=c.captcha(g)&&c.captcha(g).get("required")&&((0,f.isHRDDomain)(g,(0,u.databaseUsernameValue)(g))||!w)?r.default.createElement(l.default,{i18n:h,lock:g,onReload:function(){return(0,d.swapCaptcha)(c.id(g),!1)}}):null,D=!y&&r.default.createElement(i.default,{i18n:h,lock:g,placeholder:m,policy:(0,u.passwordStrengthPolicy)(g),strengthMessages:v});return r.default.createElement("div",null,j,r.default.createElement(o.default,{i18n:h,lock:g,placeholder:t,strictValidation:(0,u.signUpFieldsStrictValidation)(g)}),x,D,N,I)},t}(r.default.Component);t.default=m},5264:function(e,t,n){"use strict";t.__esModule=!0;var r=w(n(7215)),o=w(n(4937)),i=n(5037),a=n(427),s=n(9344),u=n(5537),l=n(7944),c=n(6782),d=n(7241),f=n(2006),p=j(n(1181)),h=j(n(2454)),g=w(n(7499)),y=w(n(6942)),m=w(n(415)),v=w(n(939)),M=w(n(5945)),b=w(n(7864));function j(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n]);return t.default=e,t}function w(e){return e&&e.__esModule?e:{default:e}}var x=function(e){var t=e.i18n,n=e.model,o=(0,s.isSSOEnabled)(n,{emailFirst:!0})&&(0,i.hasScreen)(n,"login"),a=o&&r.default.createElement(b.default,null,t.str("ssoEnabled")),u=!o&&(0,i.hasScreen)(n,"login")&&r.default.createElement(M.default,{key:"loginsignup",lock:n,loginLabel:t.str("loginLabel"),signUpLabel:t.str("signUpLabel")}),l=p.hasSomeConnections(n,"social")&&r.default.createElement(v.default,{instructions:t.html("socialSignUpInstructions"),labelFn:t.str,lock:n,signUp:!0}),c=l?"databaseAlternativeSignUpInstructions":"databaseSignUpInstructions",d=(p.hasSomeConnections(n,"database")||p.hasSomeConnections(n,"enterprise"))&&r.default.createElement(g.default,{emailInputPlaceholder:t.str("emailInputPlaceholder"),i18n:t,instructions:t.html(c),model:n,onlyEmail:o,passwordInputPlaceholder:t.str("passwordInputPlaceholder"),passwordStrengthMessages:t.group("passwordStrength"),usernameInputPlaceholder:t.str("usernameInputPlaceholder")}),f=l&&d&&r.default.createElement(y.default,null);return r.default.createElement("div",null,a,u,r.default.createElement("div",null,l,f,d))},N=function(e){function t(){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!==typeof t&&"function"!==typeof t?e:t}(this,e.call(this,"main.signUp"))}return function(e,t){if("function"!==typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,e),t.prototype.submitButtonLabel=function(e){return h.str(e,["signUpSubmitLabel"])},t.prototype.submitHandler=function(e){if((0,s.hasOnlyClassicConnections)(e,"social"))return null;var t=(0,i.databaseUsernameValue)(e,{emailFirst:!0});return(0,f.isHRDDomain)(e,t)?function(e){return(0,d.startHRD)(e,t)}:(0,s.isSSOEnabled)(e,{emailFirst:!0})?d.logIn:a.signUp},t.prototype.isSubmitDisabled=function(e){return!(0,i.termsAccepted)(e)},t.prototype.renderAuxiliaryPane=function(e){return(0,u.renderSignedInConfirmation)(e)||(0,l.renderSignedUpConfirmation)(e)||(0,c.renderOptionSelection)(e)},t.prototype.renderTabs=function(){return!0},t.prototype.getScreenTitle=function(e){return h.str(e,"signUpTitle")||h.str(e,"signupTitle")},t.prototype.renderTerms=function(e,t){var n=(0,i.mustAcceptTerms)(e)?function(){return(0,a.toggleTermsAcceptance)(p.id(e))}:void 0;return t&&(0,i.showTerms)(e)?r.default.createElement(m.default,{showCheckbox:(0,i.mustAcceptTerms)(e),checkHandler:n,checked:(0,i.termsAccepted)(e)},t):null},t.prototype.render=function(){return x},t}(o.default);t.default=N},8619:function(e,t,n){"use strict";t.__esModule=!0;n(5831);var r=m(n(9426)),o=m(n(8372)),i=m(n(9909)),a=m(n(9267)),s=m(n(1235)),u=m(n(8987)),l=n(3302),c=n(3927),d=y(n(1181)),f=n(367),p=y(n(3568)),h=n(183),g=n(2180);function y(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n]);return t.default=e,t}function m(e){return e&&e.__esModule?e:{default:e}}var v=function(){function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e)}return e.prototype.didInitialize=function(e,t){return e=(0,l.initPasswordless)(e,t)},e.prototype.didReceiveClientSettings=function(e){var t=d.hasSomeConnections(e,"social"),n=d.hasSomeConnections(e,"passwordless");if(!t&&!n){var r=new Error("At least one email, sms or social connection needs to be available.");r.code="no_connection",e=d.stop(e,r)}return e=function(e){var t=d.prefill(e).toJS(),n=t.email,r=t.phoneNumber;return"string"===typeof n&&(e=(0,h.setEmail)(e,n)),"string"===typeof r&&(e=(0,g.setPhoneNumber)(e,r)),e}(e)},e.prototype.render=function(e){if(d.hasStopped(e))return new r.default;if(!(0,c.isDone)(e)||e.get("isLoadingPanePinned"))return new o.default;if(!(0,f.hasSkippedQuickAuth)(e)&&d.ui.rememberLastLogin(e)){var t=p.lastUsedConnection(e);p.lastUsedUsername(e);if(t&&(0,c.isSuccess)(e,"sso")&&d.hasConnection(e,t.get("name"))&&["passwordless","social"].indexOf(d.findConnection(e,t.get("name")).get("type"))>=0){var n=d.findConnection(e,t.get("name")).get("type");if("passwordless"===n||"social"===n)return new u.default}}return(0,l.isEmail)(e)?(0,l.isSendLink)(e)||!(0,l.passwordlessStarted)(e)?new i.default:new s.default:(0,l.passwordlessStarted)(e)?new s.default:new a.default},e}();t.default=new v},9909:function(e,t,n){"use strict";t.__esModule=!0;var r=h(n(7215)),o=h(n(4937)),i=h(n(2764)),a=h(n(939)),s=h(n(6942)),u=n(3302),l=n(2041),c=n(4381),d=n(5537),f=function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n]);return t.default=e,t}(n(1181)),p=h(n(415));function h(e){return e&&e.__esModule?e:{default:e}}var g=function(e){var t=e.i18n,n=e.model,o=f.hasSomeConnections(n,"social")?r.default.createElement(a.default,{instructions:t.html("socialLoginInstructions"),labelFn:t.str,lock:n,signUp:!0}):null,u=f.hasSomeConnections(n,"passwordless","email")?r.default.createElement(i.default,{i18n:t,lock:n,placeholder:t.str("emailInputPlaceholder"),strictValidation:!1}):null,l=o?"passwordlessEmailAlternativeInstructions":"passwordlessEmailInstructions",c=t.html(l)||null,d=u&&c&&r.default.createElement("p",null,c),p=o&&u?r.default.createElement(s.default,null):null;return r.default.createElement("div",null,o,p,d,u)},y=function(e){function t(){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!==typeof t&&"function"!==typeof t?e:t}(this,e.call(this,"socialOrEmail"))}return function(e,t){if("function"!==typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,e),t.prototype.submitHandler=function(e){return f.hasSomeConnections(e,"passwordless","email")?l.requestPasswordlessEmail:null},t.prototype.renderAuxiliaryPane=function(e){return(0,c.renderEmailSentConfirmation)(e)||(0,d.renderSignedInConfirmation)(e)},t.prototype.render=function(){return g},t.prototype.isSubmitDisabled=function(e){return!(0,u.termsAccepted)(e)},t.prototype.renderTerms=function(e,t){var n=(0,u.mustAcceptTerms)(e)?function(){return(0,l.toggleTermsAcceptance)(f.id(e))}:void 0;return t&&(0,u.showTerms)(e)?r.default.createElement(p.default,{showCheckbox:(0,u.mustAcceptTerms)(e),checkHandler:n,checked:(0,u.termsAccepted)(e)},t):null},t}(o.default);t.default=y},9267:function(e,t,n){"use strict";t.__esModule=!0;var r=h(n(7215)),o=h(n(4937)),i=n(2041),a=h(n(7386)),s=h(n(939)),u=n(5537),l=h(n(6942)),c=function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n]);return t.default=e,t}(n(1181)),d=n(6782),f=n(3302),p=h(n(415));function h(e){return e&&e.__esModule?e:{default:e}}var g=function(e){var t=e.i18n,n=e.model,o=c.hasSomeConnections(n,"social")?r.default.createElement(s.default,{instructions:t.html("socialLoginInstructions"),labelFn:t.str,lock:n,signUp:!0}):null,i=o?"passwordlessSMSAlternativeInstructions":"passwordlessSMSInstructions",u=c.hasSomeConnections(n,"passwordless","sms")?r.default.createElement(a.default,{instructions:t.html(i),lock:n,placeholder:t.str("phoneNumberInputPlaceholder"),invalidHint:t.str("phoneNumberInputInvalidHint")}):null,d=o&&u?r.default.createElement(l.default,null):null;return r.default.createElement("div",null,o,d,u)},y=function(e){function t(){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!==typeof t&&"function"!==typeof t?e:t}(this,e.call(this,"socialOrPhoneNumber"))}return function(e,t){if("function"!==typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,e),t.prototype.submitHandler=function(e){return c.hasSomeConnections(e,"passwordless","sms")?i.sendSMS:null},t.prototype.renderAuxiliaryPane=function(e){return(0,u.renderSignedInConfirmation)(e)||(0,d.renderOptionSelection)(e)},t.prototype.render=function(){return g},t.prototype.isSubmitDisabled=function(e){return!(0,f.termsAccepted)(e)},t.prototype.renderTerms=function(e,t){var n=(0,f.mustAcceptTerms)(e)?function(){return(0,i.toggleTermsAcceptance)(c.id(e))}:void 0;return t&&(0,f.showTerms)(e)?r.default.createElement(p.default,{showCheckbox:(0,f.mustAcceptTerms)(e),checkHandler:n,checked:(0,f.termsAccepted)(e)},t):null},t}(o.default);t.default=y},9063:function(e,t,n){"use strict";t.__esModule=!0,t.changeField=function(e,t,n,i){for(var a=arguments.length,s=Array(a>4?a-4:0),u=4;u1&&void 0!==arguments[1]?arguments[1]:document.body,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:s,r="recatpchaCallback_"+Math.floor(1000001*Math.random()),o=d(e.provider,e.hl,r),i=document.createElement("script");window[r]=function(){delete window[r],n(null,i)},i.src=o,i.async=!0,t.appendChild(i)},t.prototype.componentWillUnmount=function(){this.scriptNode&&document.body.removeChild(this.scriptNode)},t.prototype.componentDidMount=function(){var e=this;t.loadScript(this.props,document.body,(function(t,n){e.scriptNode=n;var r=c(e.props.provider);e.widgetId=r.render(e.ref.current,{callback:e.changeHandler,"expired-callback":e.expiredHandler,"error-callback":e.erroredHandler,sitekey:e.props.sitekey})}))},t.prototype.reset=function(){c(this.props.provider).reset(this.widgetId)},t.prototype.render=function(){var e=setInterval((function(){var t=Array.from(document.querySelectorAll('iframe[src*="recaptcha"]')).map((function(e){return e.parentNode.parentNode})).filter((function(e){return e&&e.parentNode===document.body&&"block"!==e.style.display}));0!==t.length&&(t.forEach((function(e){e.style.display="block"})),clearInterval(e))}),300);return o.default.createElement("div",{className:this.props.isValid?"auth0-lock-recaptcha-block":"auth0-lock-recaptcha-block auth0-lock-recaptcha-block-error"},o.default.createElement("div",{className:"auth0-lock-recaptchav2",ref:this.ref}))},t.getDerivedStateFromProps=function(e,t){return e.value!==t.value?{value:e.value}:null},t.prototype.componentDidUpdate=function(e,t){e.value!==this.props.value&&""===this.props.value&&this.reset()},t}(o.default.Component);f.displayName="ReCAPTCHA",f.propTypes={provider:i.default.string.isRequired,sitekey:i.default.string.isRequired,onChange:i.default.func,onExpired:i.default.func,onErrored:i.default.func,hl:i.default.string,value:i.default.string,isValid:i.default.bool},f.defaultProps={onChange:s,onExpired:s,onErrored:s}},6280:function(e,t,n){"use strict";t.__esModule=!0;var r=Object.assign||function(e){for(var t=1;t2&&void 0!==arguments[2]&&arguments[2];return(0,i.setField)(e,"email",t,(function(t){var r=(0,a.isHRDEmailValid)(e,t);return{valid:l(t,n)&&r,hint:r?void 0:s.html(e,["error","login","hrd.not_matching_email"])}}))},t.emailDomain=d,t.emailLocalPart=function(e){var t=d(e);return t?e.slice(0,-1-t.length):e};var r=u(n(6070)),o=u(n(5363)),i=n(6782),a=n(2006),s=function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n]);return t.default=e,t}(n(2454));function u(e){return e&&e.__esModule?e:{default:e}}function l(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];return c(e,t)}function c(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];if("string"!==typeof e)return!1;var n=(0,r.default)(e);return t?(0,o.default)(e):n.indexOf("@")>=0&&n.indexOf(".")>=0&&-1===n.indexOf(" ")}function d(e){return c(e)?e.split("@")[1].toLowerCase():""}},2764:function(e,t,n){"use strict";t.__esModule=!0;var r=f(n(5192)),o=f(n(7215)),i=f(n(2123)),a=d(n(6782)),s=n(5831),u=d(n(1181)),l=n(183),c=n(8837);function d(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n]);return t.default=e,t}function f(e){return e&&e.__esModule?e:{default:e}}function p(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function h(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!==typeof t&&"function"!==typeof t?e:t}var g=function(e){function t(){return p(this,t),h(this,e.apply(this,arguments))}return function(e,t){if("function"!==typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,e),t.prototype.componentDidMount=function(){var e=this.props,t=e.lock,n=e.strictValidation;u.ui.avatar(t)&&a.email(t)&&(0,c.requestAvatar)(u.id(t),a.email(t)),(0,s.swap)(s.updateEntity,"lock",u.id(t),l.setEmail,a.email(t),n)},t.prototype.handleChange=function(e){var t=this.props,n=t.lock,r=t.strictValidation;u.ui.avatar(n)&&(0,c.debouncedRequestAvatar)(u.id(n),e.target.value),(0,s.swap)(s.updateEntity,"lock",u.id(n),l.setEmail,e.target.value,r)},t.prototype.render=function(){var e=this.props,t=e.i18n,n=e.lock,r=e.placeholder,s=e.forceInvalidVisibility,l=void 0!==s&&s,c=u.ui.allowAutocomplete(n),d=a.getField(n,"email"),f=d.get("value",""),p=d.get("valid",!0),h=f?t.str("invalidErrorHint")||t.str("invalidEmailErrorHint"):t.str("blankErrorHint")||t.str("blankEmailErrorHint"),g=d.get("invalidHint")||h,y=(!l||p)&&!a.isFieldVisiblyInvalid(n,"email");return y=!(!l||""!==f)||y,o.default.createElement(i.default,{lockId:u.id(n),value:f,invalidHint:g,isValid:y,onChange:this.handleChange.bind(this),placeholder:r,autoComplete:c,disabled:u.submitting(n)})},t}(o.default.Component);t.default=g,g.propTypes={i18n:r.default.object.isRequired,lock:r.default.object.isRequired,placeholder:r.default.string.isRequired,strictValidation:r.default.bool.isRequired}},6782:function(e,t,n){"use strict";t.__esModule=!0;var r="function"===typeof Symbol&&"symbol"===typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"===typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e};t.setField=function(e,t,n){for(var r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:d(t),o=e.getIn(["field",t,"value"]),i=e.getIn(["field",t,"showInvalid"],!1),a=arguments.length,s=Array(a>4?a-4:0),u=4;u2&&void 0!==arguments[2]?arguments[2]:"";return h(e,t).get("label",n)},t.phoneNumber=function(e){return e.getIn(["field","phoneNumber","value"],"")},t.email=function(e){return g(e,"email")},t.vcode=function(e){return g(e,"vcode")},t.password=function(e){return g(e,"password")},t.username=function(e){return g(e,"username")},t.mfaCode=function(e){return g(e,"mfa_code")},t.isSelecting=y,t.renderOptionSelection=function(e){var t=e.getIn(["field","selecting","name"]);return y(e)?o.default.createElement(s.default,{model:e,name:t,icon:e.getIn(["field","selecting","icon"]),iconUrl:e.getIn(["field","selecting","iconUrl"]),items:e.getIn(["field",t,"options"])}):null};var o=l(n(7215)),i=n(5986),a=l(n(6070)),s=l(n(5110)),u=function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n]);return t.default=e,t}(n(1181));function l(e){return e&&e.__esModule?e:{default:e}}var c=function(e,t,n){return e.length>=t&&e.length<=n},d=function(e){switch(e){case"family_name":case"given_name":return function(e){return c((0,a.default)(e),1,150)};case"name":case"nickname":return function(e){return c((0,a.default)(e),1,300)};default:return function(e){return(0,a.default)(e).length>0}}};function f(e,t){if("function"!=typeof e)return(0,i.Map)({valid:!0});for(var n=arguments.length,o=Array(n>2?n-2:0),a=2;a2&&void 0!==arguments[2]?arguments[2]:new i.Map({});return e.getIn(["field",t],n)}function g(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"";return h(e,t).get("value",n)}function y(e){return!!e.getIn(["field","selecting"])}},2154:function(e,t,n){"use strict";t.__esModule=!0;var r=d(n(5192)),o=d(n(7215)),i=d(n(1395)),a=c(n(6782)),s=n(5831),u=c(n(1181)),l=n(5014);function c(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n]);return t.default=e,t}function d(e){return e&&e.__esModule?e:{default:e}}function f(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function p(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!==typeof t&&"function"!==typeof t?e:t}var h=function(e){function t(){return f(this,t),p(this,e.apply(this,arguments))}return function(e,t){if("function"!==typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,e),t.prototype.handleChange=function(e){var t=this.props.lock;(0,s.swap)(s.updateEntity,"lock",u.id(t),l.setMFACode,e.target.value)},t.prototype.render=function(){var e=this.props,t=e.i18n,n=e.lock,r=e.placeholder;return o.default.createElement(i.default,{lockId:u.id(n),value:a.getFieldValue(n,"mfa_code"),invalidHint:t.str("mfaCodeErrorHint",(0,l.getMFACodeValidation)().length),isValid:!a.isFieldVisiblyInvalid(n,"mfa_code"),onChange:this.handleChange.bind(this),placeholder:r})},t}(o.default.Component);t.default=h,h.propTypes={i18n:r.default.object.isRequired,lock:r.default.object.isRequired,placeholder:r.default.string.isRequired}},5014:function(e,t,n){"use strict";t.__esModule=!0,t.setMFACode=function(e,t){return(0,o.setField)(e,"mfa_code",t,l)},t.getMFACodeValidation=function(e){return s.mfa_code};var r,o=n(6782),i=(n(183),n(5037),n(6070)),a=(r=i)&&r.__esModule?r:{default:r};var s={mfa_code:{length:6}},u=/^[0-9]+$/;function l(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:s.mfa_code,n=(0,a.default)(e);if(n.lengtht.length)return!1;var r=u.exec(n);return r&&r[0]}},5110:function(e,t,n){"use strict";t.__esModule=!0;var r=a(n(7215)),o=a(n(948)),i=n(9063);function a(e){return e&&e.__esModule?e:{default:e}}t.default=function(e){var t=e.icon,n=e.iconUrl,a=e.model,s=e.name,u=e.items;return r.default.createElement(o.default,{model:a,icon:t,iconUrl:n,items:u,onSelect:function(e){return(0,i.selectOption)(a.get("id"),s,e)},onCancel:function(){return(0,i.cancelOptionSelection)(a.get("id"))}})}},3596:function(e,t,n){"use strict";t.__esModule=!0,t.validatePassword=s,t.setPassword=function(e,t,n){return(0,a.setField)(e,"password",t,s,n)},t.setShowPassword=function(e,t){return(0,a.setField)(e,"showPassword",t,(function(){return!0}))};var r,o=n(9798),i=(r=o)&&r.__esModule?r:{default:r},a=n(6782);function s(e,t){return!!e&&(!t||new i.default(t.toJS()).check(e))}},2977:function(e,t,n){"use strict";t.__esModule=!0;var r=d(n(5192)),o=d(n(7215)),i=d(n(149)),a=c(n(6782)),s=n(5831),u=c(n(1181)),l=n(3596);function c(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n]);return t.default=e,t}function d(e){return e&&e.__esModule?e:{default:e}}function f(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function p(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!==typeof t&&"function"!==typeof t?e:t}var h=function(e){function t(){var n,r;f(this,t);for(var o=arguments.length,i=Array(o),a=0;a2&&void 0!==arguments[2]?arguments[2]:"username",r=!(arguments.length>3&&void 0!==arguments[3])||arguments[3],a=arguments.length>4&&void 0!==arguments[4]&&arguments[4],s=r?f(e):null,u=function(e){switch(n){case"email":return(0,i.validateEmail)(e);case"username":return d(e,r,s,a);default:return p(e)?(0,i.validateEmail)(e):d(e,r,s,a)}};return(0,o.setField)(e,"username",t,u)},t.usernameLooksLikeEmail=p;var r,o=n(6782),i=n(183),a=n(5037),s=n(6070),u=(r=s)&&r.__esModule?r:{default:r};var l={username:{min:1,max:15}},c=/^[a-zA-Z0-9_+\-.!#\$\^`~@']*$/;function d(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:l.username,r=arguments.length>3&&void 0!==arguments[3]&&arguments[3];if(!t||null==n)return(0,u.default)(e).length>0;var o=(0,u.default)(e.toLowerCase());if(o.lengthn.max)return!1;if(r&&!0===(0,i.validateEmail)(e))return!1;var a=c.exec(o);return!(!a||!a[0])}function f(e){var t=(0,a.databaseConnection)(e).getIn(["validation","username"]);return t?t.toJS():null}function p(e){return e.indexOf("@")>-1&&e.indexOf(".")>-1}},6674:function(e,t,n){"use strict";t.__esModule=!0;var r=f(n(5192)),o=f(n(7215)),i=f(n(5141)),a=d(n(6782)),s=n(5831),u=d(n(1181)),l=n(7601),c=n(8837);function d(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n]);return t.default=e,t}function f(e){return e&&e.__esModule?e:{default:e}}function p(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function h(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!==typeof t&&"function"!==typeof t?e:t}var g=function(e){function t(){return p(this,t),h(this,e.apply(this,arguments))}return function(e,t){if("function"!==typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,e),t.prototype.componentDidMount=function(e){var t=this.props,n=t.lock,r=t.validateFormat,o=t.usernameStyle,i=t.strictValidation;u.ui.avatar(n)&&a.username(n)&&(0,c.requestAvatar)(u.id(n),a.username(n)),(0,s.swap)(s.updateEntity,"lock",u.id(n),l.setUsername,a.username(n),o,r,i)},t.prototype.handleChange=function(e){var t=this.props,n=t.lock,r=t.validateFormat,o=t.usernameStyle,i=t.strictValidation;u.ui.avatar(n)&&(0,c.debouncedRequestAvatar)(u.id(n),e.target.value),(0,s.swap)(s.updateEntity,"lock",u.id(n),l.setUsername,e.target.value,o,r,i)},t.prototype.render=function(){var e=this.props,t=e.i18n,n=e.lock,r=e.placeholder,s=e.validateFormat,c=u.ui.allowAutocomplete(n),d=a.getFieldValue(n,"username"),f=s?(0,l.getUsernameValidation)(n):{};return o.default.createElement(i.default,{value:d,invalidHint:function(e){var n=function(e){return e?(0,l.usernameLooksLikeEmail)(e)||!s?t.str("invalidErrorHint")?"invalidErrorHint":"invalidUsernameErrorHint":"usernameFormatErrorHint":t.str("blankErrorHint")?"blankErrorHint":"blankUsernameErrorHint"}(e);return"usernameFormatErrorHint"===n&&s&&null!=f?t.str(n,f.min,f.max):t.str(n)}(d),isValid:!a.isFieldVisiblyInvalid(n,"username"),onChange:this.handleChange.bind(this),placeholder:r,autoComplete:c,disabled:u.submitting(n)})},t}(o.default.Component);t.default=g,g.propTypes={i18n:r.default.object.isRequired,lock:r.default.object.isRequired,placeholder:r.default.string.isRequired,validateFormat:r.default.bool.isRequired,usernameStyle:r.default.oneOf(["any","email","username"]),strictValidation:r.default.bool.isRequired},g.defaultProps={validateFormat:!1,usernameStyle:"username"}},573:function(e,t,n){"use strict";t.__esModule=!0,t.setVcode=function(e,t){return(0,r.setField)(e,"vcode",t.replace(/[\s-]+/g,""))};var r=n(6782)},8499:function(e,t,n){"use strict";t.__esModule=!0;var r=f(n(5192)),o=f(n(7215)),i=f(n(3714)),a=d(n(1181)),s=d(n(6782)),u=n(3208),l=n(5831),c=n(573);function d(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n]);return t.default=e,t}function f(e){return e&&e.__esModule?e:{default:e}}function p(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function h(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!==typeof t&&"function"!==typeof t?e:t}var g=function(e){function t(){var n,r;p(this,t);for(var o=arguments.length,i=Array(o),s=0;s2?n-2:0),i=2;i2?n-2:0),o=2;o3&&void 0!==arguments[3]?arguments[3]:"";Object.keys(n).forEach((function(i){t.hasOwnProperty(i)?"object"===r(n[i])&&M(e,t[i],n[i],""+o+i+"."):c.warn(e,"language does not have property "+o+i)}))}var b=[];function j(e,t){b[e]=a.default.fromJS(t)}"undefined"!==typeof window&&(0,p.preload)({method:"registerLanguageDictionary",cb:j})},4600:function(e,t){"use strict";t.__esModule=!0,t.default={error:{forgotPassword:{too_many_requests:"You have reached the limit on password change attempts. Please wait before trying again.","lock.fallback":"We're sorry, something went wrong when requesting the password change.",enterprise_email:"Your email's domain is part of an Enterprise identity provider. To reset your password, please see your security administrator."},login:{blocked_user:"The user is blocked.",invalid_user_password:"Wrong credentials.",invalid_captcha:"Solve the challenge question to verify you are not a robot.",invalid_recaptcha:"Select the checkbox to verify you are not a robot.","lock.fallback":"We're sorry, something went wrong when attempting to log in.","lock.invalid_code":"Wrong code.","lock.invalid_email_password":"Wrong email or password.","lock.invalid_username_password":"Wrong username or password.","lock.network":"We could not reach the server. Please check your connection and try again.","lock.popup_closed":"Popup window closed. Try again.","lock.unauthorized":"Permissions were not granted. Try again.","lock.mfa_registration_required":"Multifactor authentication is required but your device is not enrolled. Please enroll it before moving on.","lock.mfa_invalid_code":"Wrong code. Please try again.",password_change_required:"You need to update your password because this is the first time you are logging in, or because your password has expired.",password_leaked:"We have detected a potential security issue with this account. To protect your account, we have blocked this login. An email was sent with instruction on how to unblock your account.",too_many_attempts:"Your account has been blocked after multiple consecutive login attempts.",too_many_requests:"We're sorry. There are too many requests right now. Please reload the page and try again. If this persists, please try again later.",session_missing:"Couldn't complete your authentication request. Please try again after closing all open dialogs","hrd.not_matching_email":"Please use your corporate email to login."},passwordless:{"bad.email":"The email is invalid","bad.phone_number":"The phone number is invalid","lock.fallback":"We're sorry, something went wrong"},signUp:{invalid_password:"Password is invalid.","lock.fallback":"We're sorry, something went wrong when attempting to sign up.",password_dictionary_error:"Password is too common.",password_leaked:"This combination of credentials was detected in a public data breach on another website. Before your account is created, please use a different password to keep it secure.",password_no_user_info_error:"Password is based on user information.",password_strength_error:"Password is too weak.",user_exists:"The user already exists.",username_exists:"The username already exists.",social_signup_needs_terms_acception:"Please agree to the Terms of Service below to continue."}},success:{logIn:"Thanks for logging in.",forgotPassword:"We've just sent you an email to reset your password.",magicLink:"We sent you a link to log in
to %s.",signUp:"Thanks for signing up."},blankErrorHint:"",blankPasswordErrorHint:"Password can't be blank",blankEmailErrorHint:"Email can't be blank",blankUsernameErrorHint:"Username can't be blank",blankCaptchaErrorHint:"Can't be blank",codeInputPlaceholder:"your code",databaseEnterpriseLoginInstructions:"",databaseEnterpriseAlternativeLoginInstructions:"or",databaseSignUpInstructions:"",databaseAlternativeSignUpInstructions:"or",emailInputPlaceholder:"yours@example.com",captchaCodeInputPlaceholder:"Enter the code shown above",captchaMathInputPlaceholder:"Solve the formula shown above",enterpriseLoginIntructions:"Login with your corporate credentials.",enterpriseActiveLoginInstructions:"Please enter your corporate credentials at %s.",failedLabel:"Failed!",forgotPasswordTitle:"Reset your password",forgotPasswordAction:"Don't remember your password?",forgotPasswordInstructions:"Please enter your email address. We will send you an email to reset your password.",forgotPasswordSubmitLabel:"Send email",invalidErrorHint:"",invalidPasswordErrorHint:"Password is invalid",invalidEmailErrorHint:"Email is invalid",invalidUsernameErrorHint:"Username is invalid",lastLoginInstructions:"Last time you logged in with",loginAtLabel:"Log in at %s",loginLabel:"Log In",loginSubmitLabel:"Log In",loginWithLabel:"Sign in with %s",notYourAccountAction:"Not your account?",passwordInputPlaceholder:"your password",passwordStrength:{containsAtLeast:"Contain at least %d of the following %d types of characters:",identicalChars:'No more than %d identical characters in a row (e.g., "%s" not allowed)',nonEmpty:"Non-empty password required",numbers:"Numbers (i.e. 0-9)",lengthAtLeast:"At least %d characters in length",lowerCase:"Lower case letters (a-z)",shouldContain:"Should contain:",specialCharacters:"Special characters (e.g. !@#$%^&*)",upperCase:"Upper case letters (A-Z)"},passwordlessEmailAlternativeInstructions:"Otherwise, enter your email to sign in
or create an account",passwordlessEmailCodeInstructions:"An email with the code has been sent to %s.",passwordlessEmailInstructions:"Enter your email to sign in
or create an account",passwordlessSMSAlternativeInstructions:"Otherwise, enter your phone to sign in
or create an account",passwordlessSMSCodeInstructions:"An SMS with the code has been sent to %s.",passwordlessSMSInstructions:"Enter your phone to sign in
or create an account",phoneNumberInputPlaceholder:"your phone number",resendCodeAction:"Did not get the code?",resendLabel:"Resend",resendingLabel:"Resending...",retryLabel:"Retry",sentLabel:"Sent!",showPassword:"Show password",signUpTitle:"Sign Up",signUpLabel:"Sign Up",signUpSubmitLabel:"Sign Up",signUpTerms:"By signing up, you agree to our terms of service and privacy policy.",signUpWithLabel:"Sign up with %s",socialLoginInstructions:"",socialSignUpInstructions:"",ssoEnabled:"Single Sign-On enabled",submitLabel:"Submit",unrecoverableError:"Something went wrong.
Please contact technical support.",usernameFormatErrorHint:'Use %d-%d letters, numbers and the following characters: "_", ".", "+", "-"',usernameInputPlaceholder:"your username",usernameOrEmailInputPlaceholder:"username/email",title:"Auth0",welcome:"Welcome %s!",windowsAuthInstructions:"You are connected from your corporate network…",windowsAuthLabel:"Windows Authentication",mfaInputPlaceholder:"Code",mfaLoginTitle:"2-Step Verification",mfaLoginInstructions:"Please enter the verification code generated by your mobile application.",mfaSubmitLabel:"Log In",mfaCodeErrorHint:"Use %d numbers"}},9712:function(e,t,n){"use strict";t.__esModule=!0,t.Auth0Lock=t.Auth0LockPasswordless=void 0;var r=i(n(2755)),o=i(n(3716));function i(e){return e&&e.__esModule?e:{default:e}}t.Auth0LockPasswordless=o.default,t.Auth0Lock=r.default;t.default=r.default},2755:function(e,t,n){"use strict";t.__esModule=!0;var r=n(6276),o=a(r),i=a(n(9344));function a(e){return e&&e.__esModule?e:{default:e}}var s=function(e){function t(n,o,a){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t);var s=function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!==typeof t&&"function"!==typeof t?e:t}(this,e.call(this,n,o,a,i.default));return(0,r.injectStyles)(),(0,r.setWindowHeightStyle)(),window.addEventListener("resize",(function(){(0,r.setWindowHeightStyle)()})),s}return function(e,t){if("function"!==typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,e),t}(o.default);t.default=s,s.version="11.34.1"},3716:function(e,t,n){"use strict";t.__esModule=!0;var r=n(6276),o=a(r),i=a(n(8619));function a(e){return e&&e.__esModule?e:{default:e}}var s=function(e){function t(n,o,a){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t);var s=function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!==typeof t&&"function"!==typeof t?e:t}(this,e.call(this,n,o,a,i.default));return(0,r.injectStyles)(),(0,r.setWindowHeightStyle)(),window.addEventListener("resize",(function(){(0,r.setWindowHeightStyle)()})),s}return function(e,t){if("function"!==typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,e),t}(o.default);t.default=s,s.version="11.34.1"},9525:function(e,t,n){"use strict";t.__esModule=!0;var r=Object.assign||function(e){for(var t=1;t=0)return u(e,t,n,"none");s.auth.connectionScopes(o).get(t.get("name"));var l=r({},s.auth.params(o).toJS(),{connection:t.get("name")});(0,a.checkSession)(e,l)};var o=n(367),i=n(5831),a=n(4137),s=function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n]);return t.default=e,t}(n(1181));function u(e,t,n,r){var o=(0,i.read)(i.getEntity,"lock",e),u=s.auth.connectionScopes(o).get(t.get("name")),l={connection:t.get("name"),connection_scope:u?u.toJS():void 0};s.auth.redirect(o)||"facebook"!==t.get("strategy")||(l.display="popup"),n&&(l.login_hint=n),r&&(l.prompt=r),"apple"===t.get("strategy")?(0,i.swap)(i.updateEntity,"lock",s.id(o),s.setSupressSubmitOverlay,!0):(0,i.swap)(i.updateEntity,"lock",s.id(o),s.setSupressSubmitOverlay,!1),l.isSubmitting=!1,(0,a.logIn)(e,[],l)}},367:function(e,t,n){"use strict";t.__esModule=!0,t.skipQuickAuth=function(e,t){return i(e,"skipped",t)},t.hasSkippedQuickAuth=function(e){return o(e,"skipped",!1)};var r=(0,n(2982).dataFns)(["quickAuth"]),o=r.tget,i=r.tset},9947:function(e,t,n){"use strict";t.__esModule=!0,t.initSanitizer=function(){(0,r.addHook)("afterSanitizeAttributes",(function(e){"target"in e&&(e.setAttribute("target","_blank"),e.setAttribute("rel","noopener noreferrer")),e.hasAttribute("target")||!e.hasAttribute("xlink:href")&&!e.hasAttribute("href")||e.setAttribute("xlink:show","new")}))};var r=n(313)},5831:function(e,t,n){"use strict";t.__esModule=!0,t.observe=function(e,t,n){u(e+"-"+t,(function(e,r,o){var i=l(o,"lock",t),a=l(r,"lock",t);i&&!i.equals(a)&&n(i)}))},t.subscribe=u,t.unsubscribe=function(e){s.removeWatch(e)},t.swap=function(){return s.swap.apply(s,arguments)},t.updateEntity=function(e,t,n,r){for(var o=arguments.length,i=Array(o>4?o-4:0),s=4;s1?t-1:0),r=1;r2&&void 0!==arguments[2]?arguments[2]:0;return e.removeIn([t,n])},t.getCollection=function(e,t){return e.get(t,(0,a.Map)()).toList()},t.updateCollection=function(e,t,n){for(var r=arguments.length,o=Array(r>3?r-3:0),i=3;i2&&void 0!==arguments[2]?arguments[2]:0;return e.getIn([t,n])}},3927:function(e,t,n){"use strict";t.__esModule=!0,t.go=void 0,t.isSuccess=function(e,t){return"ok"===d(e,t)},t.isDone=function(e){var t=h(u(e,[],(0,r.Map)()));return t.length>0&&t.reduce((function(t,n){return t&&!function(e,t){return["loading","pending","waiting"].indexOf(d(e,t))>-1}(e,n)}),!0)},t.hasError=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[],n=h(g(u(e,[],(0,r.Map)()),t));return n.length>0&&n.reduce((function(t,n){return t||"error"===d(e,n)}),!1)};var r=n(5986),o=n(2982),i=function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n]);return t.default=e,t}(n(1181)),a=n(5831);var s=(0,o.dataFns)(["sync"]),u=s.get,l=s.set;t.default=function(e,t,n){if(void 0!==u(e,t))return e;var o=n.waitFn?"waiting":!n.conditionFn||n.conditionFn(e)?"pending":"no";return l(e,t,(0,r.Map)({conditionFn:n.conditionFn,errorFn:n.errorFn,recoverResult:n.recoverResult,syncStatus:o,successFn:n.successFn,syncFn:n.syncFn,timeout:n.timeout||6e3,waitFn:n.waitFn}))};var c=function(e){return(window.Array.isArray(e)?e:[e]).concat(["syncStatus"])},d=function(e,t){return u(e,c(t))},f=function(e,t,n){return l(e,c(t),n)},p=function(e,t,n){return u(e,t).get(n)},h=function e(t){return t.reduce((function(t,n,o){var i=r.Map.isMap(n)&&n.has("syncStatus")?[o]:[],a=r.Map.isMap(n)?e(n).map((function(e){return[o].concat(e)})):[];return t.concat.apply(t,[i].concat([a]))}),[])};function g(e,t){return t.reduce((function(e,t){return e.deleteIn(c(t))}),e)}var y=function(e,t){return h(u(e,[],(0,r.Map)())).reduce((function(e,n){if("function"!=typeof p(e,n,"syncFn"))return e;if("pending"===d(e,n)){e=f(e,n,"loading");var r=!1;p(e,n,"syncFn")(e,(function(o,s){r||(r=!0,setTimeout((function(){(0,a.swap)(a.updateEntity,"lock",t,(function(t){var r=p(e,n,"errorFn");o&&"function"===typeof r&&setTimeout((function(){return r(t,o)}),0);var a=p(t,n,"recoverResult");return o&&void 0===a?function(e,t,n){var r=f(e,t,"error");if("sso"!==t){var o=new Error("An error occurred when fetching "+t+" data for Lock: "+n.message);o.code="sync",o.origin=n,r=i.stop(r,o)}return r}(t,n,o):(t=f(t,n,"ok"),p(t,n,"successFn")(t,o?a:s))}))}),0))}))}else if("waiting"===d(e,n)&&p(e,n,"waitFn")(e)){var o=p(e,n,"conditionFn");e=f(e,n,!o||o(e)?"pending":"no")}return e}),e)};t.go=function(e){(0,a.observe)("sync",e,(function(t){setTimeout((function(){return(0,a.swap)(a.updateEntity,"lock",e,y,e)}),0)}))}},5886:function(e,t,n){"use strict";t.__esModule=!0,t.remove=t.render=void 0;var r=s(n(7215)),o=s(n(1033)),i=s(n(8738)),a=s(n(7471));function s(e){return e&&e.__esModule?e:{default:e}}function u(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}var l=function(){function e(){u(this,e)}return e.prototype.ensure=function(e,t){var n=window.document.getElementById(e);if(!n&&t&&((n=window.document.createElement("main")).id=e,n.className="auth0-lock-container",window.document.body.appendChild(n)),!n)throw new Error("Can't find element with id "+e);return n},e}(),c=new(function(){function e(){u(this,e),this.containerManager=new l,this.modals={}}return e.prototype.render=function(e,t){var n=t.isModal,s=this.containerManager.ensure(e,n);n&&!this.modals[e]&&i.default.addClass(window.document.getElementsByTagName("html")[0],"auth0-lock-html");var u=o.default.render(r.default.createElement(a.default,t),s);return n&&(this.modals[e]=u),u},e.prototype.remove=function(e){var t=this;this.modals[e]?(this.modals[e].hide(),setTimeout((function(){return t.unmount(e)}),1e3)):this.unmount(e)},e.prototype.unmount=function(e){try{var t=this.containerManager.ensure(e);t&&o.default.unmountComponentAtNode(t)}catch(n){}this.modals[e]&&(delete this.modals[e],i.default.removeClass(window.document.getElementsByTagName("html")[0],"auth0-lock-html"))},e}());t.render=function(){return c.render.apply(c,arguments)},t.remove=function(){return c.remove.apply(c,arguments)}},6563:function(e,t,n){"use strict";t.__esModule=!0,t.BackButton=t.CloseButton=void 0;var r=i(n(5192)),o=i(n(7215));function i(e){return e&&e.__esModule?e:{default:e}}var a=function(){return o.default.createElement("svg",{"aria-hidden":"true",focusable:"false",enableBackground:"new 0 0 24 24",version:"1.0",viewBox:"0 0 24 24",xmlSpace:"preserve",xmlns:"http://www.w3.org/2000/svg",xmlnsXlink:"http://www.w3.org/1999/xlink"}," ",o.default.createElement("polyline",{fill:"none",points:"12.5,21 3.5,12 12.5,3 ",stroke:"#000000",strokeMiterlimit:"10",strokeWidth:"2"})," ",o.default.createElement("line",{fill:"none",stroke:"#000000",strokeMiterlimit:"10",strokeWidth:"2",x1:"22",x2:"3.5",y1:"12",y2:"12"})," ")},s=function(){return o.default.createElement("svg",{"aria-hidden":"true",focusable:"false",enableBackground:"new 0 0 128 128",version:"1.1",viewBox:"0 0 128 128",xmlSpace:"preserve",xmlns:"http://www.w3.org/2000/svg",xmlnsXlink:"http://www.w3.org/1999/xlink"},o.default.createElement("g",null,o.default.createElement("polygon",{fill:"#373737",points:"123.5429688,11.59375 116.4765625,4.5185547 64.0019531,56.9306641 11.5595703,4.4882813 4.4882813,11.5595703 56.9272461,63.9970703 4.4570313,116.4052734 11.5244141,123.4814453 63.9985352,71.0683594 116.4423828,123.5117188 123.5126953,116.4414063 71.0732422,64.0019531 "})))},u=function(e){var t=e.lockId,n=e.name,r=e.onClick,i=e.svg;return o.default.createElement("span",{id:t+"-"+n+"-button",role:"button",tabIndex:0,className:"auth0-lock-"+n+"-button",onClick:function(e){e.preventDefault(),r()},onKeyPress:function(e){"Enter"===e.key&&(e.preventDefault(),r())},"aria-label":n},i)};u.propTypes={name:r.default.string.isRequired,onClick:r.default.func.isRequired,svg:r.default.element.isRequired},(t.CloseButton=function(e){var t=e.lockId,n=e.onClick;return o.default.createElement(u,{lockId:t,name:"close",onClick:n,svg:o.default.createElement(s,null)})}).propTypes={onClick:r.default.func.isRequired},(t.BackButton=function(e){var t=e.lockId,n=e.onClick;return o.default.createElement(u,{lockId:t,name:"back",onClick:n,svg:o.default.createElement(a,null)})}).propTypes={onClick:r.default.func.isRequired}},4240:function(e,t,n){"use strict";t.__esModule=!0;var r=Object.assign||function(e){for(var t=1;t9)}}(),g=function(e){function t(){return u(this,t),l(this,e.apply(this,arguments))}return c(t,e),t.prototype.render=function(){var e=this.props,t=e.backgroundColor,n=e.imageUrl,r=e.grayScale,i={className:"auth0-lock-header-bg"};h&&(i.className+=" auth0-lock-blur-support");var a={className:"auth0-lock-header-bg-blur",style:{backgroundImage:"url('"+n+"')"}};r&&(a.className+=" auth0-lock-no-grayscale");var s={className:"auth0-lock-header-bg-solid",style:{backgroundColor:t}};return o.default.createElement("div",i,o.default.createElement("div",a),o.default.createElement("div",s))},t}(o.default.Component);g.propTypes={backgorundColor:r.default.string,grayScale:r.default.bool,imageUrl:r.default.string}},7171:function(e,t,n){"use strict";t.__esModule=!0;var r=s(n(5192)),o=s(n(7215)),i=s(n(1033)),a=s(n(8738));function s(e){return e&&e.__esModule?e:{default:e}}function u(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function l(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!==typeof t&&"function"!==typeof t?e:t}function c(e,t){if("function"!==typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}var d=function(e){function t(n){u(this,t);var r=l(this,e.call(this,n));return r.state={children:{current:n.children}},r}return c(t,e),t.prototype.componentWillReceiveProps=function(e){this.state.children.current.key!=e.children.key?(this.setState({children:{current:e.children,prev:this.state.children.current},transitionName:this.props.transitionName}),this.animate=!0):this.timeout||this.setState({children:{current:e.children},transitionName:e.transitionName})},t.prototype.componentDidUpdate=function(){var e=this;if(this.animate){this.animate=!1;var t=this.state.transitionName,n=this.state.children,r=n.current,o=n.prev,s=this.props.reverse,u=this.refs[r.key],l=this.refs[o.key],c=function(e,t,n){var r=i.default.findDOMNode(e),o=t+"-active";a.default.addClass(r,t),setTimeout((function(){return a.default.addClass(r,o)}),17),n&&setTimeout((function(){a.default.removeClass(r,t),a.default.removeClass(r,o)}),n)};this.props.onWillSlide(),l.componentWillSlideOut((function(n){u.componentWillSlideIn(n);var r=s?"reverse-":"";c(u,""+r+t+"-enter",e.props.delay),c(l,""+r+t+"-exit"),e.timeout=setTimeout((function(){var t;e.setState({children:{current:e.state.children.current},transitionName:e.props.transitionName}),u.componentDidSlideIn((t=e.props).onDidAppear.bind(t)),e.props.onDidSlide(),e.timeout=null}),e.props.delay)}))}},t.prototype.componentWillUnmount=function(){this.timeout&&clearTimeout(this.timeout)},t.prototype.render=function(){var e=this.state.children,t=e.current,n=e.prev,r=(n?[t,n]:[t]).map((function(e){return o.default.cloneElement(o.default.createElement(f,{},e),{ref:e.key,key:e.key})}));return o.default.createElement(this.props.component,{},r)},t}(o.default.Component);t.default=d,d.propTypes={children:r.default.node.isRequired,component:r.default.string,delay:r.default.number.isRequired,onDidAppear:r.default.func.isRequired,onDidSlide:r.default.func.isRequired,onWillSlide:r.default.func.isRequired,reverse:r.default.bool.isRequired,transitionName:r.default.string.isRequired},d.defaultProps={component:"span",onDidAppear:function(){},onDidSlide:function(){},onWillSlide:function(){},reverse:!1};var f=function(e){function t(n){u(this,t);var r=l(this,e.call(this,n));return r.state={height:"",originalHeight:"",show:!0},r}return c(t,e),t.prototype.componentWillSlideIn=function(e){this.setState({height:e.height,originalHeight:parseInt(window.getComputedStyle(this.node,null).height,10),show:!1})},t.prototype.componentDidSlideIn=function(e){var t=this,n=this.state,r=n.height,o=n.originalHeight;if(r===o)this.setState({show:!0,height:""}),e();else{this.cb=e;var i=0,a=r,s=o,u=Math.abs(a-s)/10*(a=0||Object.prototype.hasOwnProperty.call(e,r)&&(n[r]=e[r]);return n}(e,["lockId","image","value","placeholder","onReload","invalidHint","isValid"]),p=this.state.focused;return o.default.createElement("div",null,o.default.createElement("div",{className:"auth0-lock-captcha"},o.default.createElement("div",{className:"auth0-lock-captcha-image",style:{backgroundImage:"url("+n+")"}}),o.default.createElement("button",{type:"button",onClick:this.handleReload.bind(this),className:"auth0-lock-captcha-refresh"},o.default.createElement(u,null))),o.default.createElement(i.default,{focused:p,invalidHint:"",isValid:d,name:"captcha",icon:s},o.default.createElement("input",r({id:t+"-captcha",ref:"input",type:"text",inputMode:"text",name:"captcha",className:"auth0-lock-input",placeholder:l,autoComplete:"off",autoCapitalize:"off",autoCorrect:"off",spellCheck:"false",onChange:this.handleOnChange.bind(this),onFocus:this.handleFocus.bind(this),onBlur:this.handleBlur.bind(this),"aria-label":"Email","aria-invalid":!d,"aria-describedby":!d&&c?"auth0-lock-error-msg-email":void 0,value:a},f))))},t.prototype.handleOnChange=function(e){this.props.onChange&&this.props.onChange(e)},t.prototype.handleReload=function(e){this.props.onReload&&(e.preventDefault(),this.props.onReload(e))},t.prototype.handleFocus=function(){this.setState({focused:!0})},t.prototype.handleBlur=function(){this.setState({focused:!1})},t}(o.default.Component);t.default=l},1225:function(e,t,n){"use strict";t.__esModule=!0;var r,o=n(7215),i=(r=o)&&r.__esModule?r:{default:r};function a(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function s(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!==typeof t&&"function"!==typeof t?e:t}var u=function(e){function t(){return a(this,t),s(this,e.apply(this,arguments))}return function(e,t){if("function"!==typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,e),t.prototype.render=function(){var e=this.props,t=e.lockId,n=e.name,r=e.ariaLabel,o=e.placeholder,a=e.checked,s=e.placeholderHTML;return i.default.createElement("div",{className:"auth0-lock-input-checkbox"},i.default.createElement("label",null,i.default.createElement("input",{id:t+"-"+n,type:"checkbox",checked:"true"===a,onChange:this.handleOnChange.bind(this),name:n,"aria-label":r||n}),s?i.default.createElement("span",{dangerouslySetInnerHTML:{__html:s}}):i.default.createElement("span",null,o)))},t.prototype.handleOnChange=function(e){this.props.onChange&&this.props.onChange(e)},t}(i.default.Component);t.default=u},2123:function(e,t,n){"use strict";t.__esModule=!0;var r=Object.assign||function(e){for(var t=1;t=0||Object.prototype.hasOwnProperty.call(e,r)&&(n[r]=e[r]);return n}(e,["lockId","invalidHint","isValid","autoComplete"]),c=this.state.focused;return o.default.createElement(i.default,{focused:c,invalidHint:n,isValid:a,name:"email",icon:s},o.default.createElement("input",r({id:t+"-email",ref:"input",type:"email",inputMode:"email",name:"email",className:"auth0-lock-input",placeholder:"yours@example.com",autoComplete:u?"on":"off",autoCapitalize:"off",autoCorrect:"off",spellCheck:"false",onChange:this.handleOnChange.bind(this),onFocus:this.handleFocus.bind(this),onBlur:this.handleBlur.bind(this),"aria-label":"Email","aria-invalid":!a,"aria-describedby":!a&&n?"auth0-lock-error-msg-email":void 0},l)))},t.prototype.handleOnChange=function(e){this.props.onChange&&this.props.onChange(e)},t.prototype.handleFocus=function(){this.setState({focused:!0})},t.prototype.handleBlur=function(){this.setState({focused:!1})},t}(o.default.Component);t.default=u},4997:function(e,t,n){"use strict";t.__esModule=!0;var r=i(n(5192)),o=i(n(7215));function i(e){return e&&e.__esModule?e:{default:e}}function a(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function s(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!==typeof t&&"function"!==typeof t?e:t}var u=function(e){function t(){return a(this,t),s(this,e.apply(this,arguments))}return function(e,t){if("function"!==typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,e),t.prototype.render=function(){var e=this.props,t=e.after,n=e.focused,r=e.invalidHint,i=e.isValid,a=e.name,s=e.icon,u="auth0-lock-input-block auth0-lock-input-"+a;i||(u+=" auth0-lock-error");var l="auth0-lock-input-wrap";n&&i&&(l+=" auth0-lock-focused"),s&&(l+=" auth0-lock-input-wrap-with-icon");var c=!i&&r?o.default.createElement("div",{role:"alert",id:"auth0-lock-error-msg-"+a,className:"auth0-lock-error-msg"},o.default.createElement("div",{className:"auth0-lock-error-invalid-hint"},r)):null;return o.default.createElement("div",{className:u},o.default.createElement("div",{className:l},s,this.props.children,t),c)},t}(o.default.Component);t.default=u,u.propTypes={after:r.default.element,children:r.default.oneOfType([r.default.element.isRequired,r.default.arrayOf(r.default.element).isRequired]),focused:r.default.bool,invalidHint:r.default.node,isValid:r.default.bool.isRequired,name:r.default.string.isRequired,icon:r.default.object}},1395:function(e,t,n){"use strict";t.__esModule=!0;var r=Object.assign||function(e){for(var t=1;t=0||Object.prototype.hasOwnProperty.call(e,r)&&(n[r]=e[r]);return n}(e,["lockId","invalidHint","isValid","onChange","value"]),c=this.state.focused;return i.default.createElement(a.default,{focused:c,invalidHint:n,isValid:o,name:"mfa_code",icon:s.IconSvg},i.default.createElement("input",r({id:t+"-mfa_code",ref:"input",type:"text",name:"mfa_code",className:"auth0-lock-input",autoComplete:"off",autoCapitalize:"off",autoCorrect:"off",spellCheck:"false",onChange:this.handleOnChange.bind(this),onFocus:this.handleFocus.bind(this),onBlur:this.handleBlur.bind(this),value:u,"aria-label":"Multi factor authentication code","aria-invalid":!o,"aria-describedby":!o&&n?"auth0-lock-error-msg-mfa_code":void 0},l)))},t.prototype.handleOnChange=function(e){this.props.onChange&&this.props.onChange(e)},t.prototype.handleFocus=function(){this.setState({focused:!0})},t.prototype.handleBlur=function(){this.setState({focused:!1})},t}(i.default.Component);l.propTypes={invalidHint:o.default.string.isRequired,isValid:o.default.bool.isRequired,onChange:o.default.func,placeholder:o.default.string,value:o.default.string.isRequired},t.default=l},6181:function(e,t,n){"use strict";t.__esModule=!0;var r=Object.assign||function(e){for(var t=1;t=0||Object.prototype.hasOwnProperty.call(e,r)&&(n[r]=e[r]);return n}(e,["invalidHint","showPasswordStrengthMessage","isValid","onChange","policy","strengthMessages","value","showPassword","lock"]),y=this.state,m=y.focused,v=y.changing,M=u.ui.allowPasswordAutocomplete(h),b=l&&m&&v&&n?i.default.createElement(s.default,{messages:d,password:f,policy:l}):null;return i.default.createElement(a.default,{after:b,focused:m,invalidHint:t,isValid:o,name:"password",icon:c},i.default.createElement("input",r({ref:"input",type:p?"text":"password",id:u.id(h)+"-password",name:"password",className:"auth0-lock-input",autoComplete:M?"on":"off",autoCapitalize:"off",autoCorrect:"off",spellCheck:"false",onChange:this.handleOnChange.bind(this),onFocus:this.handleFocus.bind(this),onBlur:this.handleBlur.bind(this),value:f,"aria-label":"Password","aria-invalid":!o,"aria-describedby":o||l||!t?void 0:"auth0-lock-error-msg-password"},g)))},t.prototype.handleOnChange=function(e){var t=this.state;t.changing=!0,this.setState(t),this.props.onChange&&this.props.onChange(e)},t.prototype.handleFocus=function(){this.setState({focused:!0})},t.prototype.handleBlur=function(){this.setState({focused:!1})},t}(i.default.Component);d.propTypes={invalidHint:o.default.string.isRequired,showPasswordStrengthMessage:o.default.bool.isRequired,isValid:o.default.bool.isRequired,onChange:o.default.func.isRequired,placeholder:o.default.string,policy:o.default.object,strengthMessages:o.default.object,value:o.default.string.isRequired,showPassword:o.default.bool.isRequired,lock:o.default.object.isRequired},t.default=d},5410:function(e,t,n){"use strict";t.__esModule=!0;var r=Object.assign||function(e){for(var t=1;t=0||Object.prototype.hasOwnProperty.call(e,r)&&(n[r]=e[r]);return n}(e,["isValid","invalidHint"]),u=this.state.focused;return o.default.createElement(i.default,{focused:u,isValid:t,invalidHint:n,name:"phone-number",icon:s},o.default.createElement("input",r({ref:"input",type:"tel",name:"phoneNumber",className:"auth0-lock-input auth0-lock-input-number",autoComplete:"off",autoCorrect:"off",spellCheck:"false",onFocus:this.handleFocus.bind(this),onBlur:this.handleBlur.bind(this),"aria-label":"Telephone number","aria-invalid":!t,"aria-describedby":!t&&n?"auth0-lock-error-msg-phone-number":void 0},a)))},t.prototype.focus=function(){this.refs.input&&(this.refs.input.focus(),this.handleFocus())},t.prototype.handleFocus=function(){this.setState({focused:!0})},t.prototype.handleBlur=function(){this.setState({focused:!1})},t}(o.default.Component);t.default=u},4271:function(e,t,n){"use strict";t.__esModule=!0;var r=i(n(7215)),o=i(n(4997));function i(e){return e&&e.__esModule?e:{default:e}}var a=function(){return r.default.createElement("svg",{"aria-hidden":"true",focusable:"false",width:"5px",height:"10px",viewBox:"0 0 5 10",version:"1.1",xmlns:"http://www.w3.org/2000/svg",xmlnsXlink:"http://www.w3.org/1999/xlink",className:"auth0-lock-icon-arrow"},r.default.createElement("g",{stroke:"none",strokeWidth:"1",fill:"none",fillRule:"evenodd"},r.default.createElement("g",{id:"Lock",transform:"translate(-396.000000, -3521.000000)",fill:"#000000",opacity:"0.539999962"},r.default.createElement("g",{id:"SMS",transform:"translate(153.000000, 3207.000000)"},r.default.createElement("g",{transform:"translate(35.000000, 299.000000)"},r.default.createElement("g",{transform:"translate(210.000000, 20.000000) rotate(-90.000000) translate(-210.000000, -20.000000) translate(198.000000, 8.000000)"},r.default.createElement("path",{id:"Shape",d:"M7,10 L12,15 L17,10 L7,10 Z"})))))))},s=function(e){function t(n){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t);var r=function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!==typeof t&&"function"!==typeof t?e:t}(this,e.call(this,n));return r.state={},r}return function(e,t){if("function"!==typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,e),t.prototype.render=function(){var e=this.props,t=e.lockId,n=e.iconUrl,i=e.isValid,s=e.label,u=e.ariaLabel,l=e.name,c=e.onClick,d=e.placeholder,f=this.props.icon,p=this.state.focused,h=s||d;h.length>23&&(h=h.substr(0,20)+"..."),!f&&"string"===typeof n&&n&&(f=r.default.createElement("img",{className:"auth0-lock-custom-icon",alt:u||l,src:n}));var g="auth0-lock-input auth0-lock-input-location";return s||(g+=" auth0-lock-input-with-placeholder"),r.default.createElement(o.default,{focused:p,isValid:i,name:"location",icon:f},r.default.createElement("input",{id:t+"-"+l,type:"button",name:l,className:g,value:h,onFocus:this.handleFocus.bind(this),onBlur:this.handleBlur.bind(this),onKeyDown:this.handleKeyDown.bind(this),onClick:c,"aria-label":u||l,"aria-invalid":!i}),r.default.createElement("span",null,r.default.createElement(a,null)))},t.prototype.handleFocus=function(){this.setState({focused:!0})},t.prototype.handleBlur=function(){this.setState({focused:!1})},t.prototype.handleKeyDown=function(e){return"Tab"!==e.key&&e.preventDefault(),"ArrowDown"===e.key?this.props.onClick():e.keyCode>=65&&e.keyCode<=90?this.props.onClick(String.fromCharCode(e.keyCode).toLowerCase()):void 0},t}(r.default.Component);t.default=s},846:function(e,t,n){"use strict";t.__esModule=!0;var r=Object.assign||function(e){for(var t=1;t=0||Object.prototype.hasOwnProperty.call(e,r)&&(n[r]=e[r]);return n}(e,["lockId","iconUrl","invalidHint","isValid","name","ariaLabel","onChange","value"]),f=this.props.icon,p=this.state.focused;return!f&&"string"===typeof n&&n&&(f=o.default.createElement("img",{className:"auth0-lock-custom-icon",alt:l||u,src:n})),o.default.createElement(i.default,{focused:p,invalidHint:a,isValid:s,name:u,icon:f},o.default.createElement("input",r({id:t+"-"+u,ref:"input",type:"text",name:u,className:"auth0-lock-input",autoComplete:"off",autoCapitalize:"off",onChange:this.handleOnChange.bind(this),onFocus:this.handleFocus.bind(this),onBlur:this.handleBlur.bind(this),value:c,"aria-label":l||u,"aria-invalid":!s,"aria-describedby":!s&&a?"auth0-lock-error-msg-"+u:void 0},d)))},t.prototype.handleOnChange=function(e){this.props.onChange&&this.props.onChange(e)},t.prototype.handleFocus=function(){this.setState({focused:!0})},t.prototype.handleBlur=function(){this.setState({focused:!1})},t}(o.default.Component);t.default=s},5141:function(e,t,n){"use strict";t.__esModule=!0;var r=Object.assign||function(e){for(var t=1;t=0||Object.prototype.hasOwnProperty.call(e,r)&&(n[r]=e[r]);return n}(e,["invalidHint","isValid","onChange","autoComplete"]),l=this.state.focused;return o.default.createElement(i.default,{focused:l,invalidHint:t,isValid:n,name:"username",icon:s},o.default.createElement("input",r({ref:"input",type:"text",name:"username",className:"auth0-lock-input",placeholder:"username",autoComplete:a?"on":"off",autoCapitalize:"off",spellCheck:"false",autoCorrect:"off",onChange:this.handleOnChange.bind(this),onFocus:this.handleFocus.bind(this),onBlur:this.handleBlur.bind(this),"aria-label":"User name","aria-invalid":!n,"aria-describedby":!n&&t?"auth0-lock-error-msg-username":void 0},u)))},t.prototype.handleOnChange=function(e){this.props.onChange&&this.props.onChange(e)},t.prototype.handleFocus=function(){this.setState({focused:!0})},t.prototype.handleBlur=function(){this.setState({focused:!1})},t}(o.default.Component);t.default=u},3714:function(e,t,n){"use strict";t.__esModule=!0;var r=Object.assign||function(e){for(var t=1;t=0||Object.prototype.hasOwnProperty.call(e,r)&&(n[r]=e[r]);return n}(e,["lockId","isValid"]),s=this.state.focused;return o.default.createElement(i.default,{focused:s,isValid:n,name:"vcode",icon:u},o.default.createElement("input",r({id:t+"-vcode",ref:"input",type:"tel",name:"vcode",className:"auth0-lock-input auth0-lock-input-code",autoComplete:"off",autoCapitalize:"off",autoCorrect:"off",spellCheck:"false",onFocus:this.handleFocus.bind(this),onBlur:this.handleBlur.bind(this),"aria-label":"vcode","aria-invalid":!n},a)))},t.prototype.handleFocus=function(){this.setState({focused:!0})},t.prototype.handleBlur=function(){this.setState({focused:!1})},t}(o.default.Component);t.default=l},948:function(e,t,n){"use strict";t.__esModule=!0;var r=Object.assign||function(e){for(var t=1;tn.clientHeight?i=o+r.offsetHeight-n.clientHeight:o<0&&(i=o),i&&(this.preventHighlight=!0,n.scrollTop+=i,this.timeout&&clearTimeout(this.timeout),this.timeout=setTimeout((function(){return e.preventHighlight=!1}),100))}},t.prototype.mouseMoveHandler=function(e){!this.preventHighlight&&this.props.onMouseMove(e)},t.prototype.mouseLeaveHandler=function(){},t.prototype.render=function(){var e=this,t=this.props.items.map((function(t){var n=t===e.props.highlighted,o={highlighted:n,label:t.get("label"),onClick:function(){return e.props.onClick(t)},onMouseMove:function(){return e.mouseMoveHandler(t)}};return n&&(o.ref="highlighted"),i.default.createElement(M,r({key:t.get("label")},o))}));return i.default.createElement("div",{className:"auth0-lock-list-code",onMouseLeave:this.mouseLeaveHandler.bind(this)},i.default.createElement("ul",null,t))},t}(i.default.Component),M=function(e){function t(){return p(this,t),h(this,e.apply(this,arguments))}return g(t,e),t.prototype.shouldComponentUpdate=function(e){return this.props.highlighted!=e.highlighted},t.prototype.render=function(){var e=this.props,t=e.highlighted,n=e.label,r=e.onClick,o=e.onMouseMove,a=t?"auth0-lock-list-code-highlighted":"";return i.default.createElement("li",{className:a,onClick:r,onMouseMove:o},n)},t}(i.default.Component);M.propTypes={highlighted:o.default.bool.isRequired,label:o.default.string.isRequired,onClick:o.default.func.isRequired,onMouseMove:o.default.func.isRequired}},575:function(e,t,n){"use strict";t.__esModule=!0;var r=a(n(5192)),o=a(n(7215)),i=a(n(5724));function a(e){return e&&e.__esModule?e:{default:e}}var s=function(e){var t=e.alternativeLabel,n=e.alternativeClickHandler,r=e.buttonLabel,a=e.buttonClickHandler,s=e.header,u=e.strategy,l=e.buttonIcon,c=e.primaryColor,d=e.foregroundColor,f=t?o.default.createElement("p",{className:"auth0-lock-alternative"},o.default.createElement("a",{className:"auth0-lock-alternative-link",href:"#",onClick:function(e){e.preventDefault(),n(e)}},t)):null;return o.default.createElement("div",{className:"auth0-lock-last-login-pane"},s,o.default.createElement(i.default,{label:r,onClick:function(e){e.preventDefault(),a(e)},strategy:u,primaryColor:c,foregroundColor:d,icon:l}),f,o.default.createElement("div",{className:"auth0-loading-container"},o.default.createElement("div",{className:"auth0-loading"})))};s.propTypes={alternativeLabel:r.default.string,alternativeClickHandler:function(e,t,n){for(var o=arguments.length,i=Array(o>3?o-3:0),a=3;a1?t-1:0),r=1;r1||this.fetch(o,t)},e.prototype.fetch=function(e,t){var n=this;this.fetchFn.apply(this,t.concat([function(t,r){t||(n.cache[e]=r),n.execCallbacks(e,t,r)}]))},e.prototype.registerCallback=function(e,t){return this.cbs[e]=this.cbs[e]||[],this.cbs[e].push(t),this.cbs[e].length},e.prototype.execCallbacks=function(e){for(var t=arguments.length,n=Array(t>1?t-1:0),r=1;r1)return;var a=window.document.createElement("script");a.src=o,window.document.getElementsByTagName("head")[0].appendChild(a);var s=function(e){i[r]=i[r].filter((function(t){return t.url!==o||(setTimeout((function(){return t.cb(e)}),0),!1)}))},u=setTimeout((function(){return s(new Error(o+" timed out"))}),2e4);a.addEventListener("load",(function(){return clearTimeout(u)})),a.addEventListener("error",(function(){clearTimeout(u),s(new Error(o+" could not be loaded."))}))},t.preload=function(e){var t=e.method,n=e.cb;window.Auth0[t]=n};var r,o=n(9566);(r=o)&&r.__esModule;"undefined"===typeof window||window.Auth0||(window.Auth0={});var i={}},2437:function(e,t){"use strict";t.__esModule=!0,t.createRef=function(){return function e(t){e.current=t}}},2982:function(e,t,n){"use strict";t.__esModule=!0;var r="function"===typeof Symbol&&"symbol"===typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"===typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e};t.dataFns=function(e){function t(e,t){return e.concat("object"===("undefined"===typeof t?"undefined":r(t))?t:[t])}function n(e){return function(n,r){var o=arguments.length>2&&void 0!==arguments[2]?arguments[2]:void 0;return n.getIn(t(e,r),o)}}function i(e){return function(n,r,o){return n.setIn(t(e,r),o)}}function a(e){return function(n,r){return n.removeIn(t(e,r))}}var s=e.concat(["transient"]);return{get:n(e),set:i(e),remove:a(e),tget:n(s),tset:i(s),tremove:a(s),reset:function(e){return e.map((function(e){return o.Map.isMap(e)?e.remove("transient"):e}))},init:function(t,n){return new o.Map({id:t}).setIn(e,n)},initNS:function(t,n){return t.setIn(e,n)}}};var o=n(5986)},3559:function(e,t){"use strict";t.__esModule=!0,t.debounce=function(e,t){var n=void 0;return function(){for(var r=arguments.length,o=Array(r),i=0;i=i)return e;switch(e){case"%s":return String(n[t++]);case"%d":return Number(n[t++]);case"%j":try{return JSON.stringify(n[t++])}catch(r){return"[Circular]"}default:return e}})),s=n[t];t1&&void 0!==arguments[1]?arguments[1]:function(){},n=document.createElement("img");return n.addEventListener("load",(function(){t(null,n)})),n.addEventListener("error",(function(e){t(e)})),n.src=e,n}},3827:function(e,t){"use strict";t.__esModule=!0,t.matches=function(e,t){return t.toLowerCase().indexOf(e.toLowerCase())>-1},t.startsWith=function(e,t){return 0===e.indexOf(t)},t.endsWith=function(e,t){return-1!==e.indexOf(t,e.length-t.length)}},3542:function(e,t){"use strict";function n(e){var t=e.match(/^(https?:|chrome-extension:)\/\/(([^:/?#]*)(?::([0-9]+))?)([/]{0,1}[^?#]*)(\?[^#]*|)(#.*|)$/);return t&&{href:e,protocol:t[1],host:t[2],hostname:t[3],port:t[4],pathname:t[5],search:t[6],hash:t[7]}}t.__esModule=!0,t.getLocationFromUrl=n,t.getOriginFromUrl=function(e){if(!e)return;var t=n(e);if(!t)return null;var r=t.protocol+"//"+t.hostname;t.port&&(r+=":"+t.port);return r}},1033:function(e,t,n){"use strict";e.exports=n(1006)},7544:function(e){"use strict";e.exports={Properties:{"aria-current":0,"aria-details":0,"aria-disabled":0,"aria-hidden":0,"aria-invalid":0,"aria-keyshortcuts":0,"aria-label":0,"aria-roledescription":0,"aria-autocomplete":0,"aria-checked":0,"aria-expanded":0,"aria-haspopup":0,"aria-level":0,"aria-modal":0,"aria-multiline":0,"aria-multiselectable":0,"aria-orientation":0,"aria-placeholder":0,"aria-pressed":0,"aria-readonly":0,"aria-required":0,"aria-selected":0,"aria-sort":0,"aria-valuemax":0,"aria-valuemin":0,"aria-valuenow":0,"aria-valuetext":0,"aria-atomic":0,"aria-busy":0,"aria-live":0,"aria-relevant":0,"aria-dropeffect":0,"aria-grabbed":0,"aria-activedescendant":0,"aria-colcount":0,"aria-colindex":0,"aria-colspan":0,"aria-controls":0,"aria-describedby":0,"aria-errormessage":0,"aria-flowto":0,"aria-labelledby":0,"aria-owns":0,"aria-posinset":0,"aria-rowcount":0,"aria-rowindex":0,"aria-rowspan":0,"aria-setsize":0},DOMAttributeNames:{},DOMPropertyNames:{}}},339:function(e,t,n){"use strict";var r=n(889),o=n(9285),i={focusDOMComponent:function(){o(r.getNodeFromInstance(this))}};e.exports=i},6222:function(e,t,n){"use strict";var r=n(3608),o=n(7940),i=n(1290),a=n(9376),s=n(2657),u=[9,13,27,32],l=o.canUseDOM&&"CompositionEvent"in window,c=null;o.canUseDOM&&"documentMode"in document&&(c=document.documentMode);var d=o.canUseDOM&&"TextEvent"in window&&!c&&!function(){var e=window.opera;return"object"===typeof e&&"function"===typeof e.version&&parseInt(e.version(),10)<=12}(),f=o.canUseDOM&&(!l||c&&c>8&&c<=11);var p=String.fromCharCode(32),h={beforeInput:{phasedRegistrationNames:{bubbled:"onBeforeInput",captured:"onBeforeInputCapture"},dependencies:["topCompositionEnd","topKeyPress","topTextInput","topPaste"]},compositionEnd:{phasedRegistrationNames:{bubbled:"onCompositionEnd",captured:"onCompositionEndCapture"},dependencies:["topBlur","topCompositionEnd","topKeyDown","topKeyPress","topKeyUp","topMouseDown"]},compositionStart:{phasedRegistrationNames:{bubbled:"onCompositionStart",captured:"onCompositionStartCapture"},dependencies:["topBlur","topCompositionStart","topKeyDown","topKeyPress","topKeyUp","topMouseDown"]},compositionUpdate:{phasedRegistrationNames:{bubbled:"onCompositionUpdate",captured:"onCompositionUpdateCapture"},dependencies:["topBlur","topCompositionUpdate","topKeyDown","topKeyPress","topKeyUp","topMouseDown"]}},g=!1;function y(e,t){switch(e){case"topKeyUp":return-1!==u.indexOf(t.keyCode);case"topKeyDown":return 229!==t.keyCode;case"topKeyPress":case"topMouseDown":case"topBlur":return!0;default:return!1}}function m(e){var t=e.detail;return"object"===typeof t&&"data"in t?t.data:null}var v=null;function M(e,t,n,o){var s,u;if(l?s=function(e){switch(e){case"topCompositionStart":return h.compositionStart;case"topCompositionEnd":return h.compositionEnd;case"topCompositionUpdate":return h.compositionUpdate}}(e):v?y(e,n)&&(s=h.compositionEnd):function(e,t){return"topKeyDown"===e&&229===t.keyCode}(e,n)&&(s=h.compositionStart),!s)return null;f&&(v||s!==h.compositionStart?s===h.compositionEnd&&v&&(u=v.getData()):v=i.getPooled(o));var c=a.getPooled(s,t,n,o);if(u)c.data=u;else{var d=m(n);null!==d&&(c.data=d)}return r.accumulateTwoPhaseDispatches(c),c}function b(e,t,n,o){var a;if(a=d?function(e,t){switch(e){case"topCompositionEnd":return m(t);case"topKeyPress":return 32!==t.which?null:(g=!0,p);case"topTextInput":var n=t.data;return n===p&&g?null:n;default:return null}}(e,n):function(e,t){if(v){if("topCompositionEnd"===e||!l&&y(e,t)){var n=v.getData();return i.release(v),v=null,n}return null}switch(e){case"topPaste":default:return null;case"topKeyPress":return t.which&&!function(e){return(e.ctrlKey||e.altKey||e.metaKey)&&!(e.ctrlKey&&e.altKey)}(t)?String.fromCharCode(t.which):null;case"topCompositionEnd":return f?null:t.data}}(e,n),!a)return null;var u=s.getPooled(h.beforeInput,t,n,o);return u.data=a,r.accumulateTwoPhaseDispatches(u),u}var j={eventTypes:h,extractEvents:function(e,t,n,r){return[M(e,t,n,r),b(e,t,n,r)]}};e.exports=j},4536:function(e){"use strict";var t={animationIterationCount:!0,borderImageOutset:!0,borderImageSlice:!0,borderImageWidth:!0,boxFlex:!0,boxFlexGroup:!0,boxOrdinalGroup:!0,columnCount:!0,columns:!0,flex:!0,flexGrow:!0,flexPositive:!0,flexShrink:!0,flexNegative:!0,flexOrder:!0,gridRow:!0,gridRowEnd:!0,gridRowSpan:!0,gridRowStart:!0,gridColumn:!0,gridColumnEnd:!0,gridColumnSpan:!0,gridColumnStart:!0,fontWeight:!0,lineClamp:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,tabSize:!0,widows:!0,zIndex:!0,zoom:!0,fillOpacity:!0,floodOpacity:!0,stopOpacity:!0,strokeDasharray:!0,strokeDashoffset:!0,strokeMiterlimit:!0,strokeOpacity:!0,strokeWidth:!0};var n=["Webkit","ms","Moz","O"];Object.keys(t).forEach((function(e){n.forEach((function(n){t[function(e,t){return e+t.charAt(0).toUpperCase()+t.substring(1)}(n,e)]=t[e]}))}));var r={isUnitlessNumber:t,shorthandPropertyExpansions:{background:{backgroundAttachment:!0,backgroundColor:!0,backgroundImage:!0,backgroundPositionX:!0,backgroundPositionY:!0,backgroundRepeat:!0},backgroundPosition:{backgroundPositionX:!0,backgroundPositionY:!0},border:{borderWidth:!0,borderStyle:!0,borderColor:!0},borderBottom:{borderBottomWidth:!0,borderBottomStyle:!0,borderBottomColor:!0},borderLeft:{borderLeftWidth:!0,borderLeftStyle:!0,borderLeftColor:!0},borderRight:{borderRightWidth:!0,borderRightStyle:!0,borderRightColor:!0},borderTop:{borderTopWidth:!0,borderTopStyle:!0,borderTopColor:!0},font:{fontStyle:!0,fontVariant:!0,fontWeight:!0,fontSize:!0,lineHeight:!0,fontFamily:!0},outline:{outlineWidth:!0,outlineStyle:!0,outlineColor:!0}}};e.exports=r},8176:function(e,t,n){"use strict";var r=n(4536),o=n(7940),i=(n(6141),n(7100),n(2777)),a=n(8214),s=n(3786),u=(n(4265),s((function(e){return a(e)}))),l=!1,c="cssFloat";if(o.canUseDOM){var d=document.createElement("div").style;try{d.font=""}catch(p){l=!0}void 0===document.documentElement.style.cssFloat&&(c="styleFloat")}var f={createMarkupForStyles:function(e,t){var n="";for(var r in e)if(e.hasOwnProperty(r)){var o=0===r.indexOf("--"),a=e[r];0,null!=a&&(n+=u(r)+":",n+=i(r,a,t,o)+";")}return n||null},setValueForStyles:function(e,t,n){var o=e.style;for(var a in t)if(t.hasOwnProperty(a)){var s=0===a.indexOf("--");0;var u=i(a,t[a],n,s);if("float"!==a&&"cssFloat"!==a||(a=c),s)o.setProperty(a,u);else if(u)o[a]=u;else{var d=l&&r.shorthandPropertyExpansions[a];if(d)for(var f in d)o[f]="";else o[a]=""}}}};e.exports=f},3484:function(e,t,n){"use strict";var r=n(8027);var o=n(2926),i=(n(7405),function(){function e(t){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this._callbacks=null,this._contexts=null,this._arg=t}return e.prototype.enqueue=function(e,t){this._callbacks=this._callbacks||[],this._callbacks.push(e),this._contexts=this._contexts||[],this._contexts.push(t)},e.prototype.notifyAll=function(){var e=this._callbacks,t=this._contexts,n=this._arg;if(e&&t){e.length!==t.length&&r("24"),this._callbacks=null,this._contexts=null;for(var o=0;o8));var N=!1;function I(){g&&(g.detachEvent("onpropertychange",D),g=null,y=null)}function D(e){"value"===e.propertyName&&j(y,e)&&v(e)}function S(e,t,n){"topFocus"===e?(I(),function(e,t){y=t,(g=e).attachEvent("onpropertychange",D)}(t,n)):"topBlur"===e&&I()}function L(e,t,n){if("topSelectionChange"===e||"topKeyUp"===e||"topKeyDown"===e)return j(y,n)}function k(e,t,n){if("topClick"===e)return j(t,n)}function C(e,t,n){if("topInput"===e||"topChange"===e)return j(t,n)}i.canUseDOM&&(N=d("input")&&(!document.documentMode||document.documentMode>9));var E={eventTypes:p,_allowSimulatedPassThrough:!0,_isInputEventSupported:N,extractEvents:function(e,t,n,r){var o,i,s=t?a.getNodeFromInstance(t):window;if(!function(e){var t=e.nodeName&&e.nodeName.toLowerCase();return"select"===t||"input"===t&&"file"===e.type}(s)?f(s)?N?o=C:(o=L,i=S):function(e){var t=e.nodeName;return t&&"input"===t.toLowerCase()&&("checkbox"===e.type||"radio"===e.type)}(s)&&(o=k):m?o=w:i=x,o){var u=o(e,t,n);if(u)return h(u,n,r)}i&&i(e,s,t),"topBlur"===e&&function(e,t){if(null!=e){var n=e._wrapperState||t._wrapperState;if(n&&n.controlled&&"number"===t.type){var r=""+t.value;t.getAttribute("value")!==r&&t.setAttribute("value",r)}}}(t,s)}};e.exports=E},9682:function(e,t,n){"use strict";var r=n(6056),o=n(5385),i=(n(889),n(6141),n(5997)),a=n(936),s=n(9260);function u(e,t){return Array.isArray(t)&&(t=t[1]),t?t.nextSibling:e.firstChild}var l=i((function(e,t,n){e.insertBefore(t,n)}));function c(e,t,n){r.insertTreeBefore(e,t,n)}function d(e,t,n){Array.isArray(t)?function(e,t,n,r){var o=t;for(;;){var i=o.nextSibling;if(l(e,o,r),o===n)break;o=i}}(e,t[0],t[1],n):l(e,t,n)}function f(e,t){if(Array.isArray(t)){var n=t[1];p(e,t=t[0],n),e.removeChild(n)}e.removeChild(t)}function p(e,t,n){for(;;){var r=t.nextSibling;if(r===n)break;e.removeChild(r)}}var h={dangerouslyReplaceNodeWithMarkup:o.dangerouslyReplaceNodeWithMarkup,replaceDelimitedText:function(e,t,n){var r=e.parentNode,o=e.nextSibling;o===t?n&&l(r,document.createTextNode(n),o):n?(s(o,n),p(r,o,t)):p(r,e,t)},processUpdates:function(e,t){for(var n=0;n-1||r("96",e),!l.plugins[n]){t.extractEvents||r("97",e),l.plugins[n]=t;var a=t.eventTypes;for(var u in a)s(a[u],t,u)||r("98",u,e)}}}function s(e,t,n){l.eventNameDispatchConfigs.hasOwnProperty(n)&&r("99",n),l.eventNameDispatchConfigs[n]=e;var o=e.phasedRegistrationNames;if(o){for(var i in o){if(o.hasOwnProperty(i))u(o[i],t,n)}return!0}return!!e.registrationName&&(u(e.registrationName,t,n),!0)}function u(e,t,n){l.registrationNameModules[e]&&r("100",e),l.registrationNameModules[e]=t,l.registrationNameDependencies[e]=t.eventTypes[n].dependencies}var l={plugins:[],eventNameDispatchConfigs:{},registrationNameModules:{},registrationNameDependencies:{},possibleRegistrationNames:null,injectEventPluginOrder:function(e){o&&r("101"),o=Array.prototype.slice.call(e),a()},injectEventPluginsByName:function(e){var t=!1;for(var n in e)if(e.hasOwnProperty(n)){var o=e[n];i.hasOwnProperty(n)&&i[n]===o||(i[n]&&r("102",n),i[n]=o,t=!0)}t&&a()},getPluginModuleForEvent:function(e){var t=e.dispatchConfig;if(t.registrationName)return l.registrationNameModules[t.registrationName]||null;if(void 0!==t.phasedRegistrationNames){var n=t.phasedRegistrationNames;for(var r in n)if(n.hasOwnProperty(r)){var o=l.registrationNameModules[n[r]];if(o)return o}}return null},_resetEventPlugins:function(){for(var e in o=null,i)i.hasOwnProperty(e)&&delete i[e];l.plugins.length=0;var t=l.eventNameDispatchConfigs;for(var n in t)t.hasOwnProperty(n)&&delete t[n];var r=l.registrationNameModules;for(var a in r)r.hasOwnProperty(a)&&delete r[a]}};e.exports=l},9133:function(e,t,n){"use strict";var r,o,i=n(8027),a=n(9925);n(7405),n(4265);function s(e,t,n,r){var o=e.type||"unknown-event";e.currentTarget=u.getNodeFromInstance(r),t?a.invokeGuardedCallbackWithCatch(o,n,e):a.invokeGuardedCallback(o,n,e),e.currentTarget=null}var u={isEndish:function(e){return"topMouseUp"===e||"topTouchEnd"===e||"topTouchCancel"===e},isMoveish:function(e){return"topMouseMove"===e||"topTouchMove"===e},isStartish:function(e){return"topMouseDown"===e||"topTouchStart"===e},executeDirectDispatch:function(e){var t=e._dispatchListeners,n=e._dispatchInstances;Array.isArray(t)&&i("103"),e.currentTarget=t?u.getNodeFromInstance(n):null;var r=t?t(e):null;return e.currentTarget=null,e._dispatchListeners=null,e._dispatchInstances=null,r},executeDispatchesInOrder:function(e,t){var n=e._dispatchListeners,r=e._dispatchInstances;if(Array.isArray(n))for(var o=0;o1?1-t:void 0;return this._fallbackText=o.slice(e,s),this._fallbackText}}),o.addPoolingTo(a),e.exports=a},9451:function(e,t,n){"use strict";var r=n(5596),o=r.injection.MUST_USE_PROPERTY,i=r.injection.HAS_BOOLEAN_VALUE,a=r.injection.HAS_NUMERIC_VALUE,s=r.injection.HAS_POSITIVE_NUMERIC_VALUE,u=r.injection.HAS_OVERLOADED_BOOLEAN_VALUE,l={isCustomAttribute:RegExp.prototype.test.bind(new RegExp("^(data|aria)-["+r.ATTRIBUTE_NAME_CHAR+"]*$")),Properties:{accept:0,acceptCharset:0,accessKey:0,action:0,allowFullScreen:i,allowTransparency:0,alt:0,as:0,async:i,autoComplete:0,autoPlay:i,capture:i,cellPadding:0,cellSpacing:0,charSet:0,challenge:0,checked:o|i,cite:0,classID:0,className:0,cols:s,colSpan:0,content:0,contentEditable:0,contextMenu:0,controls:i,controlsList:0,coords:0,crossOrigin:0,data:0,dateTime:0,default:i,defer:i,dir:0,disabled:i,download:u,draggable:0,encType:0,form:0,formAction:0,formEncType:0,formMethod:0,formNoValidate:i,formTarget:0,frameBorder:0,headers:0,height:0,hidden:i,high:0,href:0,hrefLang:0,htmlFor:0,httpEquiv:0,icon:0,id:0,inputMode:0,integrity:0,is:0,keyParams:0,keyType:0,kind:0,label:0,lang:0,list:0,loop:i,low:0,manifest:0,marginHeight:0,marginWidth:0,max:0,maxLength:0,media:0,mediaGroup:0,method:0,min:0,minLength:0,multiple:o|i,muted:o|i,name:0,nonce:0,noValidate:i,open:i,optimum:0,pattern:0,placeholder:0,playsInline:i,poster:0,preload:0,profile:0,radioGroup:0,readOnly:i,referrerPolicy:0,rel:0,required:i,reversed:i,role:0,rows:s,rowSpan:a,sandbox:0,scope:0,scoped:i,scrolling:0,seamless:i,selected:o|i,shape:0,size:s,sizes:0,span:s,spellCheck:0,src:0,srcDoc:0,srcLang:0,srcSet:0,start:a,step:0,style:0,summary:0,tabIndex:0,target:0,title:0,type:0,useMap:0,value:0,width:0,wmode:0,wrap:0,about:0,datatype:0,inlist:0,prefix:0,property:0,resource:0,typeof:0,vocab:0,autoCapitalize:0,autoCorrect:0,autoSave:0,color:0,itemProp:0,itemScope:i,itemType:0,itemID:0,itemRef:0,results:0,security:0,unselectable:0},DOMAttributeNames:{acceptCharset:"accept-charset",className:"class",htmlFor:"for",httpEquiv:"http-equiv"},DOMPropertyNames:{},DOMMutationMethods:{value:function(e,t){if(null==t)return e.removeAttribute("value");("number"!==e.type||!1===e.hasAttribute("value")||e.validity&&!e.validity.badInput&&e.ownerDocument.activeElement!==e)&&e.setAttribute("value",""+t)}}};e.exports=l},8293:function(e){"use strict";var t={escape:function(e){var t={"=":"=0",":":"=2"};return"$"+(""+e).replace(/[=:]/g,(function(e){return t[e]}))},unescape:function(e){var t={"=0":"=","=2":":"};return(""+("."===e[0]&&"$"===e[1]?e.substring(2):e.substring(1))).replace(/(=0|=2)/g,(function(e){return t[e]}))}};e.exports=t},8053:function(e,t,n){"use strict";var r=n(8027),o=n(5137),i=n(2906)(n(8952).isValidElement),a=(n(7405),n(4265),{button:!0,checkbox:!0,image:!0,hidden:!0,radio:!0,reset:!0,submit:!0});function s(e){null!=e.checkedLink&&null!=e.valueLink&&r("87")}function u(e){s(e),(null!=e.value||null!=e.onChange)&&r("88")}function l(e){s(e),(null!=e.checked||null!=e.onChange)&&r("89")}var c={value:function(e,t,n){return!e[t]||a[e.type]||e.onChange||e.readOnly||e.disabled?null:new Error("You provided a `value` prop to a form field without an `onChange` handler. This will render a read-only field. If the field should be mutable use `defaultValue`. Otherwise, set either `onChange` or `readOnly`.")},checked:function(e,t,n){return!e[t]||e.onChange||e.readOnly||e.disabled?null:new Error("You provided a `checked` prop to a form field without an `onChange` handler. This will render a read-only field. If the field should be mutable use `defaultChecked`. Otherwise, set either `onChange` or `readOnly`.")},onChange:i.func},d={};function f(e){if(e){var t=e.getName();if(t)return" Check the render method of `"+t+"`."}return""}var p={checkPropTypes:function(e,t,n){for(var r in c){if(c.hasOwnProperty(r))var i=c[r](t,r,e,"prop",null,o);if(i instanceof Error&&!(i.message in d)){d[i.message]=!0;f(n)}}},getValue:function(e){return e.valueLink?(u(e),e.valueLink.value):e.value},getChecked:function(e){return e.checkedLink?(l(e),e.checkedLink.value):e.checked},executeOnChange:function(e,t){return e.valueLink?(u(e),e.valueLink.requestChange(t.target.value)):e.checkedLink?(l(e),e.checkedLink.requestChange(t.target.checked)):e.onChange?e.onChange.call(void 0,t):void 0}};e.exports=p},2926:function(e,t,n){"use strict";var r=n(8027),o=(n(7405),function(e){var t=this;if(t.instancePool.length){var n=t.instancePool.pop();return t.call(n,e),n}return new t(e)}),i=function(e){var t=this;e instanceof t||r("25"),e.destructor(),t.instancePool.length=0||null!=t.is}var q=1;function J(e){var t=e.type;!function(e){Z.call(H,e)||(W.test(e)||r("65",e),H[e]=!0)}(t),this._currentElement=e,this._tag=t.toLowerCase(),this._namespaceURI=null,this._renderedChildren=null,this._previousStyle=null,this._previousStyleCopy=null,this._hostNode=null,this._hostParent=null,this._rootNodeID=0,this._domID=0,this._hostContainerInfo=null,this._wrapperState=null,this._topLevelWrapper=null,this._flags=0}J.displayName="ReactDOMComponent",J.Mixin={mountComponent:function(e,t,n,r){this._rootNodeID=q++,this._domID=n._idCounter++,this._hostParent=t,this._hostContainerInfo=n;var o,a,l,d=this._currentElement.props;switch(this._tag){case"audio":case"form":case"iframe":case"img":case"link":case"object":case"source":case"video":this._wrapperState={listeners:null},e.getReactMountReady().enqueue(B,this);break;case"input":y.mountWrapper(this,d,t),d=y.getHostProps(this,d),e.getReactMountReady().enqueue(R,this),e.getReactMountReady().enqueue(B,this);break;case"option":m.mountWrapper(this,d,t),d=m.getHostProps(this,d);break;case"select":v.mountWrapper(this,d,t),d=v.getHostProps(this,d),e.getReactMountReady().enqueue(B,this);break;case"textarea":M.mountWrapper(this,d,t),d=M.getHostProps(this,d),e.getReactMountReady().enqueue(R,this),e.getReactMountReady().enqueue(B,this)}if(_(this,d),null!=t?(o=t._namespaceURI,a=t._tag):n._tag&&(o=n._namespaceURI,a=n._tag),(null==o||o===u.svg&&"foreignobject"===a)&&(o=u.html),o===u.html&&("svg"===this._tag?o=u.svg:"math"===this._tag&&(o=u.mathml)),this._namespaceURI=o,e.useCreateElement){var f,p=n._ownerDocument;if(o===u.html)if("script"===this._tag){var h=p.createElement("div"),b=this._currentElement.type;h.innerHTML="<"+b+">",f=h.removeChild(h.firstChild)}else f=d.is?p.createElement(this._currentElement.type,d.is):p.createElement(this._currentElement.type);else f=p.createElementNS(o,this._currentElement.type);g.precacheNode(this,f),this._flags|=N.hasCachedChildNodes,this._hostParent||c.setAttributeForRoot(f),this._updateDOMProperties(null,d,e);var j=s(f);this._createInitialChildren(e,d,r,j),l=j}else{var w=this._createOpenTagMarkupAndPutListeners(e,d),x=this._createContentMarkup(e,d,r);l=!x&&Y[this._tag]?w+"/>":w+">"+x+""}switch(this._tag){case"input":e.getReactMountReady().enqueue(O,this),d.autoFocus&&e.getReactMountReady().enqueue(i.focusDOMComponent,this);break;case"textarea":e.getReactMountReady().enqueue(z,this),d.autoFocus&&e.getReactMountReady().enqueue(i.focusDOMComponent,this);break;case"select":case"button":d.autoFocus&&e.getReactMountReady().enqueue(i.focusDOMComponent,this);break;case"option":e.getReactMountReady().enqueue(U,this)}return l},_createOpenTagMarkupAndPutListeners:function(e,t){var n="<"+this._currentElement.type;for(var r in t)if(t.hasOwnProperty(r)){var i=t[r];if(null!=i)if(L.hasOwnProperty(r))i&&T(this,r,i,e);else{r===C&&(i&&(i=this._previousStyleCopy=o({},t.style)),i=a.createMarkupForStyles(i,this));var s=null;null!=this._tag&&V(this._tag,t)?E.hasOwnProperty(r)||(s=c.createMarkupForCustomAttribute(r,i)):s=c.createMarkupForProperty(r,i),s&&(n+=" "+s)}}return e.renderToStaticMarkup?n:(this._hostParent||(n+=" "+c.createMarkupForRoot()),n+=" "+c.createMarkupForID(this._domID))},_createContentMarkup:function(e,t,n){var r="",o=t.dangerouslySetInnerHTML;if(null!=o)null!=o.__html&&(r=o.__html);else{var i=k[typeof t.children]?t.children:null,a=null!=i?null:t.children;if(null!=i)r=w(i);else if(null!=a){r=this.mountChildren(a,e,n).join("")}}return Q[this._tag]&&"\n"===r.charAt(0)?"\n"+r:r},_createInitialChildren:function(e,t,n,r){var o=t.dangerouslySetInnerHTML;if(null!=o)null!=o.__html&&s.queueHTML(r,o.__html);else{var i=k[typeof t.children]?t.children:null,a=null!=i?null:t.children;if(null!=i)""!==i&&s.queueText(r,i);else if(null!=a)for(var u=this.mountChildren(a,e,n),l=0;lt.end?(n=t.end,r=t.start):(n=t.start,r=t.end),o.moveToElementText(e),o.moveStart("character",n),o.setEndPoint("EndToStart",o),o.moveEnd("character",r-n),o.select()}:function(e,t){if(window.getSelection){var n=window.getSelection(),r=e[i()].length,a=Math.min(t.start,r),s=void 0===t.end?a:Math.min(t.end,r);if(!n.extend&&a>s){var u=s;s=a,a=u}var l=o(e,a),c=o(e,s);if(l&&c){var d=document.createRange();d.setStart(l.node,l.offset),n.removeAllRanges(),a>s?(n.addRange(d),n.extend(c.node,c.offset)):(d.setEnd(c.node,c.offset),n.addRange(d))}}}};e.exports=u},1628:function(e,t,n){"use strict";var r=n(8027),o=n(1843),i=n(9682),a=n(6056),s=n(889),u=n(5261),l=(n(7405),n(4644),function(e){this._currentElement=e,this._stringText=""+e,this._hostNode=null,this._hostParent=null,this._domID=0,this._mountIndex=0,this._closingComment=null,this._commentNodes=null});o(l.prototype,{mountComponent:function(e,t,n,r){var o=n._idCounter++,i=" react-text: "+o+" ",l=" /react-text ";if(this._domID=o,this._hostParent=t,e.useCreateElement){var c=n._ownerDocument,d=c.createComment(i),f=c.createComment(l),p=a(c.createDocumentFragment());return a.queueChild(p,a(d)),this._stringText&&a.queueChild(p,a(c.createTextNode(this._stringText))),a.queueChild(p,a(f)),s.precacheNode(this,d),this._closingComment=f,p}var h=u(this._stringText);return e.renderToStaticMarkup?h:"\x3c!--"+i+"--\x3e"+h+"\x3c!--"+" /react-text --\x3e"},receiveComponent:function(e,t){if(e!==this._currentElement){this._currentElement=e;var n=""+e;if(n!==this._stringText){this._stringText=n;var r=this.getHostNode();i.replaceDelimitedText(r[0],r[1],n)}}},getHostNode:function(){var e=this._commentNodes;if(e)return e;if(!this._closingComment)for(var t=s.getNodeFromInstance(this).nextSibling;;){if(null==t&&r("67",this._domID),8===t.nodeType&&" /react-text "===t.nodeValue){this._closingComment=t;break}t=t.nextSibling}return e=[this._hostNode,this._closingComment],this._commentNodes=e,e},unmountComponent:function(){this._closingComment=null,this._commentNodes=null,s.uncacheNode(this)}}),e.exports=l},302:function(e,t,n){"use strict";var r=n(8027),o=n(1843),i=n(8053),a=n(889),s=n(1688);n(7405),n(4265);function u(){this._rootNodeID&&l.updateWrapper(this)}var l={getHostProps:function(e,t){return null!=t.dangerouslySetInnerHTML&&r("91"),o({},t,{value:void 0,defaultValue:void 0,children:""+e._wrapperState.initialValue,onChange:e._wrapperState.onChange})},mountWrapper:function(e,t){var n=i.getValue(t),o=n;if(null==n){var a=t.defaultValue,s=t.children;null!=s&&(null!=a&&r("92"),Array.isArray(s)&&(s.length<=1||r("93"),s=s[0]),a=""+s),null==a&&(a=""),o=a}e._wrapperState={initialValue:""+o,listeners:null,onChange:c.bind(e)}},updateWrapper:function(e){var t=e._currentElement.props,n=a.getNodeFromInstance(e),r=i.getValue(t);if(null!=r){var o=""+r;o!==n.value&&(n.value=o),null==t.defaultValue&&(n.defaultValue=o)}null!=t.defaultValue&&(n.defaultValue=t.defaultValue)},postMountWrapper:function(e){var t=a.getNodeFromInstance(e),n=t.textContent;n===e._wrapperState.initialValue&&(t.value=n)}};function c(e){var t=this._currentElement.props,n=i.executeOnChange(t,e);return s.asap(u,this),n}e.exports=l},4749:function(e,t,n){"use strict";var r=n(8027);n(7405);function o(e,t){"_hostNode"in e||r("33"),"_hostNode"in t||r("33");for(var n=0,o=e;o;o=o._hostParent)n++;for(var i=0,a=t;a;a=a._hostParent)i++;for(;n-i>0;)e=e._hostParent,n--;for(;i-n>0;)t=t._hostParent,i--;for(var s=n;s--;){if(e===t)return e;e=e._hostParent,t=t._hostParent}return null}e.exports={isAncestor:function(e,t){"_hostNode"in e||r("35"),"_hostNode"in t||r("35");for(;t;){if(t===e)return!0;t=t._hostParent}return!1},getLowestCommonAncestor:o,getParentInstance:function(e){return"_hostNode"in e||r("36"),e._hostParent},traverseTwoPhase:function(e,t,n){for(var r,o=[];e;)o.push(e),e=e._hostParent;for(r=o.length;r-- >0;)t(o[r],"captured",n);for(r=0;r0;)n(l[u],"captured",i)}}},308:function(e,t,n){"use strict";var r=n(1843),o=n(1688),i=n(5571),a=n(840),s={initialize:a,close:function(){d.isBatchingUpdates=!1}},u=[{initialize:a,close:o.flushBatchedUpdates.bind(o)},s];function l(){this.reinitializeTransaction()}r(l.prototype,i,{getTransactionWrappers:function(){return u}});var c=new l,d={isBatchingUpdates:!1,batchedUpdates:function(e,t,n,r,o,i){var a=d.isBatchingUpdates;return d.isBatchingUpdates=!0,a?e(t,n,r,o,i):c.perform(e,null,t,n,r,o,i)}};e.exports=d},2043:function(e,t,n){"use strict";var r=n(7544),o=n(6222),i=n(3922),a=n(1614),s=n(5912),u=n(9451),l=n(8397),c=n(7725),d=n(889),f=n(7053),p=n(4749),h=n(1628),g=n(308),y=n(2179),m=n(9843),v=n(9420),M=n(3895),b=n(5076),j=n(8467),w=!1;e.exports={inject:function(){w||(w=!0,m.EventEmitter.injectReactEventListener(y),m.EventPluginHub.injectEventPluginOrder(a),m.EventPluginUtils.injectComponentTree(d),m.EventPluginUtils.injectTreeTraversal(p),m.EventPluginHub.injectEventPluginsByName({SimpleEventPlugin:j,EnterLeaveEventPlugin:s,ChangeEventPlugin:i,SelectEventPlugin:b,BeforeInputEventPlugin:o}),m.HostComponent.injectGenericComponentClass(c),m.HostComponent.injectTextComponentClass(h),m.DOMProperty.injectDOMPropertyConfig(r),m.DOMProperty.injectDOMPropertyConfig(u),m.DOMProperty.injectDOMPropertyConfig(M),m.EmptyComponent.injectEmptyComponentFactory((function(e){return new f(e)})),m.Updates.injectReconcileTransaction(v),m.Updates.injectBatchingStrategy(g),m.Component.injectEnvironment(l))}}},6478:function(e){"use strict";var t="function"===typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103;e.exports=t},7795:function(e){"use strict";var t,n={injectEmptyComponentFactory:function(e){t=e}},r={create:function(e){return t(e)}};r.injection=n,e.exports=r},9925:function(e){"use strict";var t=null;function n(e,n,r){try{n(r)}catch(o){null===t&&(t=o)}}var r={invokeGuardedCallback:n,invokeGuardedCallbackWithCatch:n,rethrowCaughtError:function(){if(t){var e=t;throw t=null,e}}};e.exports=r},8765:function(e,t,n){"use strict";var r=n(1989);var o={handleTopLevel:function(e,t,n,o){!function(e){r.enqueueEvents(e),r.processEventQueue(!1)}(r.extractEvents(e,t,n,o))}};e.exports=o},2179:function(e,t,n){"use strict";var r=n(1843),o=n(5075),i=n(7940),a=n(2926),s=n(889),u=n(1688),l=n(6514),c=n(207);function d(e){for(;e._hostParent;)e=e._hostParent;var t=s.getNodeFromInstance(e).parentNode;return s.getClosestInstanceFromNode(t)}function f(e,t){this.topLevelType=e,this.nativeEvent=t,this.ancestors=[]}function p(e){var t=l(e.nativeEvent),n=s.getClosestInstanceFromNode(t),r=n;do{e.ancestors.push(r),r=r&&d(r)}while(r);for(var o=0;o/,i=/^<\!\-\-/,a={CHECKSUM_ATTR_NAME:"data-react-checksum",addChecksumToMarkup:function(e){var t=r(e);return i.test(e)?e:e.replace(o," "+a.CHECKSUM_ATTR_NAME+'="'+t+'"$&')},canReuseMarkup:function(e,t){var n=t.getAttribute(a.CHECKSUM_ATTR_NAME);return n=n&&parseInt(n,10),r(e)===n}};e.exports=a},5322:function(e,t,n){"use strict";var r=n(8027),o=n(6056),i=n(5596),a=n(8952),s=n(3392),u=(n(1211),n(889)),l=n(4050),c=n(7411),d=n(4364),f=n(8930),p=(n(6141),n(9992)),h=n(6271),g=n(9049),y=n(1688),m=n(1024),v=n(8240),M=(n(7405),n(936)),b=n(1537),j=(n(4265),i.ID_ATTRIBUTE_NAME),w=i.ROOT_ATTRIBUTE_NAME,x={};function N(e){return e?9===e.nodeType?e.documentElement:e.firstChild:null}function I(e,t,n,r,o){var i;if(d.logTopLevelRenders){var a=e._currentElement.props.child.type;i="React mount: "+("string"===typeof a?a:a.displayName||a.name),console.time(i)}var s=h.mountComponent(e,n,null,l(e,t),o,0);i&&console.timeEnd(i),e._renderedComponent._topLevelWrapper=e,T._mountImageIntoNode(s,t,e,r,n)}function D(e,t,n,r){var o=y.ReactReconcileTransaction.getPooled(!n&&c.useCreateElement);o.perform(I,null,e,t,o,n,r),y.ReactReconcileTransaction.release(o)}function S(e,t,n){for(0,h.unmountComponent(e,n),9===t.nodeType&&(t=t.documentElement);t.lastChild;)t.removeChild(t.lastChild)}function L(e){var t=N(e);if(t){var n=u.getInstanceFromNode(t);return!(!n||!n._hostParent)}}function k(e){return!(!e||1!==e.nodeType&&9!==e.nodeType&&11!==e.nodeType)}function C(e){var t=function(e){var t=N(e),n=t&&u.getInstanceFromNode(t);return n&&!n._hostParent?n:null}(e);return t?t._hostContainerInfo._topLevelWrapper:null}var E=1,_=function(){this.rootID=E++};_.prototype.isReactComponent={},_.prototype.render=function(){return this.props.child},_.isReactTopLevelWrapper=!0;var T={TopLevelWrapper:_,_instancesByReactRootID:x,scrollMonitor:function(e,t){t()},_updateRootComponent:function(e,t,n,r,o){return T.scrollMonitor(r,(function(){g.enqueueElementInternal(e,t,n),o&&g.enqueueCallbackInternal(e,o)})),e},_renderNewRootComponent:function(e,t,n,o){k(t)||r("37"),s.ensureScrollValueMonitoring();var i=v(e,!1);y.batchedUpdates(D,i,t,n,o);var a=i._instance.rootID;return x[a]=i,i},renderSubtreeIntoContainer:function(e,t,n,o){return null!=e&&f.has(e)||r("38"),T._renderSubtreeIntoContainer(e,t,n,o)},_renderSubtreeIntoContainer:function(e,t,n,o){g.validateCallback(o,"ReactDOM.render"),a.isValidElement(t)||r("39","string"===typeof t?" Instead of passing a string like 'div', pass React.createElement('div') or
.":"function"===typeof t?" Instead of passing a class like Foo, pass React.createElement(Foo) or .":null!=t&&void 0!==t.props?" This may be caused by unintentionally loading two independent copies of React.":"");var i,s=a.createElement(_,{child:t});if(e){var u=f.get(e);i=u._processChildContext(u._context)}else i=m;var l=C(n);if(l){var c=l._currentElement.props.child;if(b(c,t)){var d=l._renderedComponent.getPublicInstance(),p=o&&function(){o.call(d)};return T._updateRootComponent(l,s,i,n,p),d}T.unmountComponentAtNode(n)}var h,y=N(n),v=y&&!(!(h=y).getAttribute||!h.getAttribute(j)),M=L(n),w=v&&!l&&!M,x=T._renderNewRootComponent(s,n,w,i)._renderedComponent.getPublicInstance();return o&&o.call(x),x},render:function(e,t,n){return T._renderSubtreeIntoContainer(null,e,t,n)},unmountComponentAtNode:function(e){k(e)||r("40");var t=C(e);if(!t){L(e),1===e.nodeType&&e.hasAttribute(w);return!1}return delete x[t._instance.rootID],y.batchedUpdates(S,t,e,!1),!0},_mountImageIntoNode:function(e,t,n,i,a){if(k(t)||r("41"),i){var s=N(t);if(p.canReuseMarkup(e,s))return void u.precacheNode(n,s);var l=s.getAttribute(p.CHECKSUM_ATTR_NAME);s.removeAttribute(p.CHECKSUM_ATTR_NAME);var c=s.outerHTML;s.setAttribute(p.CHECKSUM_ATTR_NAME,l);var d=e,f=function(e,t){for(var n=Math.min(e.length,t.length),r=0;r0&&r.length<20?n+" (keys: "+r.join(", ")+")":n}(e))}};e.exports=u},1688:function(e,t,n){"use strict";var r=n(8027),o=n(1843),i=n(3484),a=n(2926),s=n(4364),u=n(6271),l=n(5571),c=n(7405),d=[],f=0,p=i.getPooled(),h=!1,g=null;function y(){w.ReactReconcileTransaction&&g||r("123")}var m=[{initialize:function(){this.dirtyComponentsLength=d.length},close:function(){this.dirtyComponentsLength!==d.length?(d.splice(0,this.dirtyComponentsLength),j()):d.length=0}},{initialize:function(){this.callbackQueue.reset()},close:function(){this.callbackQueue.notifyAll()}}];function v(){this.reinitializeTransaction(),this.dirtyComponentsLength=null,this.callbackQueue=i.getPooled(),this.reconcileTransaction=w.ReactReconcileTransaction.getPooled(!0)}function M(e,t){return e._mountOrder-t._mountOrder}function b(e){var t=e.dirtyComponentsLength;t!==d.length&&r("124",t,d.length),d.sort(M),f++;for(var n=0;n]/;e.exports=function(e){return"boolean"===typeof e||"number"===typeof e?""+e:function(e){var n,r=""+e,o=t.exec(r);if(!o)return r;var i="",a=0,s=0;for(a=o.index;a=32||13===t?t:0}},4319:function(e,t,n){"use strict";var r=n(2905),o={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},i={8:"Backspace",9:"Tab",12:"Clear",13:"Enter",16:"Shift",17:"Control",18:"Alt",19:"Pause",20:"CapsLock",27:"Escape",32:" ",33:"PageUp",34:"PageDown",35:"End",36:"Home",37:"ArrowLeft",38:"ArrowUp",39:"ArrowRight",40:"ArrowDown",45:"Insert",46:"Delete",112:"F1",113:"F2",114:"F3",115:"F4",116:"F5",117:"F6",118:"F7",119:"F8",120:"F9",121:"F10",122:"F11",123:"F12",144:"NumLock",145:"ScrollLock",224:"Meta"};e.exports=function(e){if(e.key){var t=o[e.key]||e.key;if("Unidentified"!==t)return t}if("keypress"===e.type){var n=r(e);return 13===n?"Enter":String.fromCharCode(n)}return"keydown"===e.type||"keyup"===e.type?i[e.keyCode]||"Unidentified":""}},1371:function(e){"use strict";var t={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function n(e){var n=this.nativeEvent;if(n.getModifierState)return n.getModifierState(e);var r=t[e];return!!r&&!!n[r]}e.exports=function(e){return n}},6514:function(e){"use strict";e.exports=function(e){var t=e.target||e.srcElement||window;return t.correspondingUseElement&&(t=t.correspondingUseElement),3===t.nodeType?t.parentNode:t}},8642:function(e,t,n){"use strict";var r=n(2543);e.exports=function(e){for(var t;(t=e._renderedNodeType)===r.COMPOSITE;)e=e._renderedComponent;return t===r.HOST?e._renderedComponent:t===r.EMPTY?null:void 0}},7642:function(e){"use strict";var t="function"===typeof Symbol&&Symbol.iterator;e.exports=function(e){var n=e&&(t&&e[t]||e["@@iterator"]);if("function"===typeof n)return n}},8961:function(e){"use strict";function t(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function n(e){for(;e;){if(e.nextSibling)return e.nextSibling;e=e.parentNode}}e.exports=function(e,r){for(var o=t(e),i=0,a=0;o;){if(3===o.nodeType){if(a=i+o.textContent.length,i<=r&&a>=r)return{node:o,offset:r-i};i=a}o=t(n(o))}}},7228:function(e,t,n){"use strict";var r=n(7940),o=null;e.exports=function(){return!o&&r.canUseDOM&&(o="textContent"in document.documentElement?"textContent":"innerText"),o}},4445:function(e,t,n){"use strict";var r=n(7940);function o(e,t){var n={};return n[e.toLowerCase()]=t.toLowerCase(),n["Webkit"+e]="webkit"+t,n["Moz"+e]="moz"+t,n["ms"+e]="MS"+t,n["O"+e]="o"+t.toLowerCase(),n}var i={animationend:o("Animation","AnimationEnd"),animationiteration:o("Animation","AnimationIteration"),animationstart:o("Animation","AnimationStart"),transitionend:o("Transition","TransitionEnd")},a={},s={};r.canUseDOM&&(s=document.createElement("div").style,"AnimationEvent"in window||(delete i.animationend.animation,delete i.animationiteration.animation,delete i.animationstart.animation),"TransitionEvent"in window||delete i.transitionend.transition),e.exports=function(e){if(a[e])return a[e];if(!i[e])return e;var t=i[e];for(var n in t)if(t.hasOwnProperty(n)&&n in s)return a[e]=t[n];return""}},6351:function(e,t,n){"use strict";var r=n(889);function o(e){var t=e.type,n=e.nodeName;return n&&"input"===n.toLowerCase()&&("checkbox"===t||"radio"===t)}function i(e){return e._wrapperState.valueTracker}var a={_getTrackerFromNode:function(e){return i(r.getInstanceFromNode(e))},track:function(e){if(!i(e)){var t=r.getNodeFromInstance(e),n=o(t)?"checked":"value",a=Object.getOwnPropertyDescriptor(t.constructor.prototype,n),s=""+t[n];t.hasOwnProperty(n)||"function"!==typeof a.get||"function"!==typeof a.set||(Object.defineProperty(t,n,{enumerable:a.enumerable,configurable:!0,get:function(){return a.get.call(this)},set:function(e){s=""+e,a.set.call(this,e)}}),function(e,t){e._wrapperState.valueTracker=t}(e,{getValue:function(){return s},setValue:function(e){s=""+e},stopTracking:function(){!function(e){e._wrapperState.valueTracker=null}(e),delete t[n]}}))}},updateValueIfChanged:function(e){if(!e)return!1;var t=i(e);if(!t)return a.track(e),!0;var n=t.getValue(),s=function(e){var t;return e&&(t=o(e)?""+e.checked:e.value),t}(r.getNodeFromInstance(e));return s!==n&&(t.setValue(s),!0)},stopTracking:function(e){var t=i(e);t&&t.stopTracking()}};e.exports=a},8240:function(e,t,n){"use strict";var r=n(8027),o=n(1843),i=n(4900),a=n(7795),s=n(5759),u=(n(3035),n(7405),n(4265),function(e){this.construct(e)});function l(e,t){var n;if(null===e||!1===e)n=a.create(l);else if("object"===typeof e){var o=e,i=o.type;if("function"!==typeof i&&"string"!==typeof i){var c="";0,c+=function(e){if(e){var t=e.getName();if(t)return" Check the render method of `"+t+"`."}return""}(o._owner),r("130",null==i?i:typeof i,c)}"string"===typeof o.type?n=s.createInternalComponent(o):!function(e){return"function"===typeof e&&"undefined"!==typeof e.prototype&&"function"===typeof e.prototype.mountComponent&&"function"===typeof e.prototype.receiveComponent}(o.type)?n=new u(o):(n=new o.type(o)).getHostNode||(n.getHostNode=n.getNativeNode)}else"string"===typeof e||"number"===typeof e?n=s.createInstanceForText(e):r("131",typeof e);return n._mountIndex=0,n._mountImage=null,n}o(u.prototype,i,{_instantiateReactComponent:l}),e.exports=l},2382:function(e,t,n){"use strict";var r,o=n(7940);o.canUseDOM&&(r=document.implementation&&document.implementation.hasFeature&&!0!==document.implementation.hasFeature("","")),e.exports=function(e,t){if(!o.canUseDOM||t&&!("addEventListener"in document))return!1;var n="on"+e,i=n in document;if(!i){var a=document.createElement("div");a.setAttribute(n,"return;"),i="function"===typeof a[n]}return!i&&r&&"wheel"===e&&(i=document.implementation.hasFeature("Events.wheel","3.0")),i}},5427:function(e){"use strict";var t={color:!0,date:!0,datetime:!0,"datetime-local":!0,email:!0,month:!0,number:!0,password:!0,range:!0,search:!0,tel:!0,text:!0,time:!0,url:!0,week:!0};e.exports=function(e){var n=e&&e.nodeName&&e.nodeName.toLowerCase();return"input"===n?!!t[e.type]:"textarea"===n}},4773:function(e,t,n){"use strict";var r=n(5261);e.exports=function(e){return'"'+r(e)+'"'}},8027:function(e){"use strict";e.exports=function(e){for(var t=arguments.length-1,n="Minified React error #"+e+"; visit http://facebook.github.io/react/docs/error-decoder.html?invariant="+e,r=0;r]/,u=n(5997)((function(e,t){if(e.namespaceURI!==i.svg||"innerHTML"in e)e.innerHTML=t;else{(r=r||document.createElement("div")).innerHTML=""+t+"";for(var n=r.firstChild;n.firstChild;)e.appendChild(n.firstChild)}}));if(o.canUseDOM){var l=document.createElement("div");l.innerHTML=" ",""===l.innerHTML&&(u=function(e,t){if(e.parentNode&&e.parentNode.replaceChild(e,e),a.test(t)||"<"===t[0]&&s.test(t)){e.innerHTML=String.fromCharCode(65279)+t;var n=e.firstChild;1===n.data.length?e.removeChild(n):n.deleteData(0,1)}else e.innerHTML=t}),l=null}e.exports=u},9260:function(e,t,n){"use strict";var r=n(7940),o=n(5261),i=n(936),a=function(e,t){if(t){var n=e.firstChild;if(n&&n===e.lastChild&&3===n.nodeType)return void(n.nodeValue=t)}e.textContent=t};r.canUseDOM&&("textContent"in document.documentElement||(a=function(e,t){3!==e.nodeType?i(e,o(t)):e.nodeValue=t})),e.exports=a},1537:function(e){"use strict";e.exports=function(e,t){var n=null===e||!1===e,r=null===t||!1===t;if(n||r)return n===r;var o=typeof e,i=typeof t;return"string"===o||"number"===o?"string"===i||"number"===i:"object"===i&&e.type===t.type&&e.key===t.key}},7843:function(e,t,n){"use strict";var r=n(8027),o=(n(1211),n(6478)),i=n(7642),a=(n(7405),n(8293));n(4265);function s(e,t){return e&&"object"===typeof e&&null!=e.key?a.escape(e.key):t.toString(36)}function u(e,t,n,l){var c,d=typeof e;if("undefined"!==d&&"boolean"!==d||(e=null),null===e||"string"===d||"number"===d||"object"===d&&e.$$typeof===o)return n(l,e,""===t?"."+s(e,0):t),1;var f=0,p=""===t?".":t+":";if(Array.isArray(e))for(var h=0;h1){for(var h=Array(p),g=0;g1){for(var m=Array(y),v=0;v0?a-4:a;for(n=0;n>16&255,l[c++]=t>>8&255,l[c++]=255&t;2===s&&(t=r[e.charCodeAt(n)]<<2|r[e.charCodeAt(n+1)]>>4,l[c++]=255&t);1===s&&(t=r[e.charCodeAt(n)]<<10|r[e.charCodeAt(n+1)]<<4|r[e.charCodeAt(n+2)]>>2,l[c++]=t>>8&255,l[c++]=255&t);return l},t.fromByteArray=function(e){for(var t,r=e.length,o=r%3,i=[],a=16383,s=0,u=r-o;su?u:s+a));1===o?(t=e[r-1],i.push(n[t>>2]+n[t<<4&63]+"==")):2===o&&(t=(e[r-2]<<8)+e[r-1],i.push(n[t>>10]+n[t>>4&63]+n[t<<2&63]+"="));return i.join("")};for(var n=[],r=[],o="undefined"!==typeof Uint8Array?Uint8Array:Array,i="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",a=0,s=i.length;a0)throw new Error("Invalid string. Length must be a multiple of 4");var n=e.indexOf("=");return-1===n&&(n=t),[n,n===t?0:4-n%4]}function l(e,t,r){for(var o,i,a=[],s=t;s>18&63]+n[i>>12&63]+n[i>>6&63]+n[63&i]);return a.join("")}r["-".charCodeAt(0)]=62,r["_".charCodeAt(0)]=63},8839:function(e,t,n){var r;!function(o){"use strict";function i(e,t){var n=(65535&e)+(65535&t);return(e>>16)+(t>>16)+(n>>16)<<16|65535&n}function a(e,t,n,r,o,a){return i((s=i(i(t,e),i(r,a)))<<(u=o)|s>>>32-u,n);var s,u}function s(e,t,n,r,o,i,s){return a(t&n|~t&r,e,t,o,i,s)}function u(e,t,n,r,o,i,s){return a(t&r|n&~r,e,t,o,i,s)}function l(e,t,n,r,o,i,s){return a(t^n^r,e,t,o,i,s)}function c(e,t,n,r,o,i,s){return a(n^(t|~r),e,t,o,i,s)}function d(e,t){var n,r,o,a,d;e[t>>5]|=128<>>9<<4)]=t;var f=1732584193,p=-271733879,h=-1732584194,g=271733878;for(n=0;n>5]>>>t%32&255);return n}function p(e){var t,n=[];for(n[(e.length>>2)-1]=void 0,t=0;t>5]|=(255&e.charCodeAt(t/8))<>>4&15)+r.charAt(15&t);return o}function g(e){return unescape(encodeURIComponent(e))}function y(e){return function(e){return f(d(p(e),8*e.length))}(g(e))}function m(e,t){return function(e,t){var n,r,o=p(e),i=[],a=[];for(i[15]=a[15]=void 0,o.length>16&&(o=d(o,8*e.length)),n=0;n<16;n+=1)i[n]=909522486^o[n],a[n]=1549556828^o[n];return r=d(i.concat(p(t)),512+8*t.length),f(d(a.concat(r),640))}(g(e),g(t))}function v(e,t,n){return t?n?m(t,e):h(m(t,e)):n?y(e):function(e){return h(y(e))}(e)}void 0===(r=function(){return v}.call(t,n,t,e))||(e.exports=r)}()},984:function(e){e.exports=function(e){var t={};function n(r){if(t[r])return t[r].exports;var o=t[r]={i:r,l:!1,exports:{}};return e[r].call(o.exports,o,o.exports,n),o.l=!0,o.exports}return n.m=e,n.c=t,n.d=function(e,t,r){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:r})},n.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.t=function(e,t){if(1&t&&(e=n(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var r=Object.create(null);if(n.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var o in e)n.d(r,o,function(t){return e[t]}.bind(null,o));return r},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="",n(n.s=90)}({17:function(e,t,n){"use strict";t.__esModule=!0,t.default=void 0;var r=n(18),o=function(){function e(){}return e.getFirstMatch=function(e,t){var n=t.match(e);return n&&n.length>0&&n[1]||""},e.getSecondMatch=function(e,t){var n=t.match(e);return n&&n.length>1&&n[2]||""},e.matchAndReturnConst=function(e,t,n){if(e.test(t))return n},e.getWindowsVersionName=function(e){switch(e){case"NT":return"NT";case"XP":case"NT 5.1":return"XP";case"NT 5.0":return"2000";case"NT 5.2":return"2003";case"NT 6.0":return"Vista";case"NT 6.1":return"7";case"NT 6.2":return"8";case"NT 6.3":return"8.1";case"NT 10.0":return"10";default:return}},e.getMacOSVersionName=function(e){var t=e.split(".").splice(0,2).map((function(e){return parseInt(e,10)||0}));if(t.push(0),10===t[0])switch(t[1]){case 5:return"Leopard";case 6:return"Snow Leopard";case 7:return"Lion";case 8:return"Mountain Lion";case 9:return"Mavericks";case 10:return"Yosemite";case 11:return"El Capitan";case 12:return"Sierra";case 13:return"High Sierra";case 14:return"Mojave";case 15:return"Catalina";default:return}},e.getAndroidVersionName=function(e){var t=e.split(".").splice(0,2).map((function(e){return parseInt(e,10)||0}));if(t.push(0),!(1===t[0]&&t[1]<5))return 1===t[0]&&t[1]<6?"Cupcake":1===t[0]&&t[1]>=6?"Donut":2===t[0]&&t[1]<2?"Eclair":2===t[0]&&2===t[1]?"Froyo":2===t[0]&&t[1]>2?"Gingerbread":3===t[0]?"Honeycomb":4===t[0]&&t[1]<1?"Ice Cream Sandwich":4===t[0]&&t[1]<4?"Jelly Bean":4===t[0]&&t[1]>=4?"KitKat":5===t[0]?"Lollipop":6===t[0]?"Marshmallow":7===t[0]?"Nougat":8===t[0]?"Oreo":9===t[0]?"Pie":void 0},e.getVersionPrecision=function(e){return e.split(".").length},e.compareVersions=function(t,n,r){void 0===r&&(r=!1);var o=e.getVersionPrecision(t),i=e.getVersionPrecision(n),a=Math.max(o,i),s=0,u=e.map([t,n],(function(t){var n=a-e.getVersionPrecision(t),r=t+new Array(n+1).join(".0");return e.map(r.split("."),(function(e){return new Array(20-e.length).join("0")+e})).reverse()}));for(r&&(s=a-Math.min(o,i)),a-=1;a>=s;){if(u[0][a]>u[1][a])return 1;if(u[0][a]===u[1][a]){if(a===s)return 0;a-=1}else if(u[0][a]1?o-1:0),a=1;a0){var a=Object.keys(n),u=s.default.find(a,(function(e){return t.isOS(e)}));if(u){var l=this.satisfies(n[u]);if(void 0!==l)return l}var c=s.default.find(a,(function(e){return t.isPlatform(e)}));if(c){var d=this.satisfies(n[c]);if(void 0!==d)return d}}if(i>0){var f=Object.keys(o),p=s.default.find(f,(function(e){return t.isBrowser(e,!0)}));if(void 0!==p)return this.compareVersion(o[p])}},t.isBrowser=function(e,t){void 0===t&&(t=!1);var n=this.getBrowserName().toLowerCase(),r=e.toLowerCase(),o=s.default.getBrowserTypeByAlias(r);return t&&o&&(r=o.toLowerCase()),r===n},t.compareVersion=function(e){var t=[0],n=e,r=!1,o=this.getBrowserVersion();if("string"==typeof o)return">"===e[0]||"<"===e[0]?(n=e.substr(1),"="===e[1]?(r=!0,n=e.substr(2)):t=[],">"===e[0]?t.push(1):t.push(-1)):"="===e[0]?n=e.substr(1):"~"===e[0]&&(r=!0,n=e.substr(1)),t.indexOf(s.default.compareVersions(o,n,r))>-1},t.isOS=function(e){return this.getOSName(!0)===String(e).toLowerCase()},t.isPlatform=function(e){return this.getPlatformType(!0)===String(e).toLowerCase()},t.isEngine=function(e){return this.getEngineName(!0)===String(e).toLowerCase()},t.is=function(e,t){return void 0===t&&(t=!1),this.isBrowser(e,t)||this.isOS(e)||this.isPlatform(e)},t.some=function(e){var t=this;return void 0===e&&(e=[]),e.some((function(e){return t.is(e)}))},e}();t.default=l,e.exports=t.default},92:function(e,t,n){"use strict";t.__esModule=!0,t.default=void 0;var r,o=(r=n(17))&&r.__esModule?r:{default:r},i=/version\/(\d+(\.?_?\d+)+)/i,a=[{test:[/googlebot/i],describe:function(e){var t={name:"Googlebot"},n=o.default.getFirstMatch(/googlebot\/(\d+(\.\d+))/i,e)||o.default.getFirstMatch(i,e);return n&&(t.version=n),t}},{test:[/opera/i],describe:function(e){var t={name:"Opera"},n=o.default.getFirstMatch(i,e)||o.default.getFirstMatch(/(?:opera)[\s/](\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/opr\/|opios/i],describe:function(e){var t={name:"Opera"},n=o.default.getFirstMatch(/(?:opr|opios)[\s/](\S+)/i,e)||o.default.getFirstMatch(i,e);return n&&(t.version=n),t}},{test:[/SamsungBrowser/i],describe:function(e){var t={name:"Samsung Internet for Android"},n=o.default.getFirstMatch(i,e)||o.default.getFirstMatch(/(?:SamsungBrowser)[\s/](\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/Whale/i],describe:function(e){var t={name:"NAVER Whale Browser"},n=o.default.getFirstMatch(i,e)||o.default.getFirstMatch(/(?:whale)[\s/](\d+(?:\.\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/MZBrowser/i],describe:function(e){var t={name:"MZ Browser"},n=o.default.getFirstMatch(/(?:MZBrowser)[\s/](\d+(?:\.\d+)+)/i,e)||o.default.getFirstMatch(i,e);return n&&(t.version=n),t}},{test:[/focus/i],describe:function(e){var t={name:"Focus"},n=o.default.getFirstMatch(/(?:focus)[\s/](\d+(?:\.\d+)+)/i,e)||o.default.getFirstMatch(i,e);return n&&(t.version=n),t}},{test:[/swing/i],describe:function(e){var t={name:"Swing"},n=o.default.getFirstMatch(/(?:swing)[\s/](\d+(?:\.\d+)+)/i,e)||o.default.getFirstMatch(i,e);return n&&(t.version=n),t}},{test:[/coast/i],describe:function(e){var t={name:"Opera Coast"},n=o.default.getFirstMatch(i,e)||o.default.getFirstMatch(/(?:coast)[\s/](\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/opt\/\d+(?:.?_?\d+)+/i],describe:function(e){var t={name:"Opera Touch"},n=o.default.getFirstMatch(/(?:opt)[\s/](\d+(\.?_?\d+)+)/i,e)||o.default.getFirstMatch(i,e);return n&&(t.version=n),t}},{test:[/yabrowser/i],describe:function(e){var t={name:"Yandex Browser"},n=o.default.getFirstMatch(/(?:yabrowser)[\s/](\d+(\.?_?\d+)+)/i,e)||o.default.getFirstMatch(i,e);return n&&(t.version=n),t}},{test:[/ucbrowser/i],describe:function(e){var t={name:"UC Browser"},n=o.default.getFirstMatch(i,e)||o.default.getFirstMatch(/(?:ucbrowser)[\s/](\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/Maxthon|mxios/i],describe:function(e){var t={name:"Maxthon"},n=o.default.getFirstMatch(i,e)||o.default.getFirstMatch(/(?:Maxthon|mxios)[\s/](\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/epiphany/i],describe:function(e){var t={name:"Epiphany"},n=o.default.getFirstMatch(i,e)||o.default.getFirstMatch(/(?:epiphany)[\s/](\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/puffin/i],describe:function(e){var t={name:"Puffin"},n=o.default.getFirstMatch(i,e)||o.default.getFirstMatch(/(?:puffin)[\s/](\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/sleipnir/i],describe:function(e){var t={name:"Sleipnir"},n=o.default.getFirstMatch(i,e)||o.default.getFirstMatch(/(?:sleipnir)[\s/](\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/k-meleon/i],describe:function(e){var t={name:"K-Meleon"},n=o.default.getFirstMatch(i,e)||o.default.getFirstMatch(/(?:k-meleon)[\s/](\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/micromessenger/i],describe:function(e){var t={name:"WeChat"},n=o.default.getFirstMatch(/(?:micromessenger)[\s/](\d+(\.?_?\d+)+)/i,e)||o.default.getFirstMatch(i,e);return n&&(t.version=n),t}},{test:[/qqbrowser/i],describe:function(e){var t={name:/qqbrowserlite/i.test(e)?"QQ Browser Lite":"QQ Browser"},n=o.default.getFirstMatch(/(?:qqbrowserlite|qqbrowser)[/](\d+(\.?_?\d+)+)/i,e)||o.default.getFirstMatch(i,e);return n&&(t.version=n),t}},{test:[/msie|trident/i],describe:function(e){var t={name:"Internet Explorer"},n=o.default.getFirstMatch(/(?:msie |rv:)(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/\sedg\//i],describe:function(e){var t={name:"Microsoft Edge"},n=o.default.getFirstMatch(/\sedg\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/edg([ea]|ios)/i],describe:function(e){var t={name:"Microsoft Edge"},n=o.default.getSecondMatch(/edg([ea]|ios)\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/vivaldi/i],describe:function(e){var t={name:"Vivaldi"},n=o.default.getFirstMatch(/vivaldi\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/seamonkey/i],describe:function(e){var t={name:"SeaMonkey"},n=o.default.getFirstMatch(/seamonkey\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/sailfish/i],describe:function(e){var t={name:"Sailfish"},n=o.default.getFirstMatch(/sailfish\s?browser\/(\d+(\.\d+)?)/i,e);return n&&(t.version=n),t}},{test:[/silk/i],describe:function(e){var t={name:"Amazon Silk"},n=o.default.getFirstMatch(/silk\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/phantom/i],describe:function(e){var t={name:"PhantomJS"},n=o.default.getFirstMatch(/phantomjs\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/slimerjs/i],describe:function(e){var t={name:"SlimerJS"},n=o.default.getFirstMatch(/slimerjs\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/blackberry|\bbb\d+/i,/rim\stablet/i],describe:function(e){var t={name:"BlackBerry"},n=o.default.getFirstMatch(i,e)||o.default.getFirstMatch(/blackberry[\d]+\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/(web|hpw)[o0]s/i],describe:function(e){var t={name:"WebOS Browser"},n=o.default.getFirstMatch(i,e)||o.default.getFirstMatch(/w(?:eb)?[o0]sbrowser\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/bada/i],describe:function(e){var t={name:"Bada"},n=o.default.getFirstMatch(/dolfin\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/tizen/i],describe:function(e){var t={name:"Tizen"},n=o.default.getFirstMatch(/(?:tizen\s?)?browser\/(\d+(\.?_?\d+)+)/i,e)||o.default.getFirstMatch(i,e);return n&&(t.version=n),t}},{test:[/qupzilla/i],describe:function(e){var t={name:"QupZilla"},n=o.default.getFirstMatch(/(?:qupzilla)[\s/](\d+(\.?_?\d+)+)/i,e)||o.default.getFirstMatch(i,e);return n&&(t.version=n),t}},{test:[/firefox|iceweasel|fxios/i],describe:function(e){var t={name:"Firefox"},n=o.default.getFirstMatch(/(?:firefox|iceweasel|fxios)[\s/](\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/electron/i],describe:function(e){var t={name:"Electron"},n=o.default.getFirstMatch(/(?:electron)\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/MiuiBrowser/i],describe:function(e){var t={name:"Miui"},n=o.default.getFirstMatch(/(?:MiuiBrowser)[\s/](\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/chromium/i],describe:function(e){var t={name:"Chromium"},n=o.default.getFirstMatch(/(?:chromium)[\s/](\d+(\.?_?\d+)+)/i,e)||o.default.getFirstMatch(i,e);return n&&(t.version=n),t}},{test:[/chrome|crios|crmo/i],describe:function(e){var t={name:"Chrome"},n=o.default.getFirstMatch(/(?:chrome|crios|crmo)\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/GSA/i],describe:function(e){var t={name:"Google Search"},n=o.default.getFirstMatch(/(?:GSA)\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:function(e){var t=!e.test(/like android/i),n=e.test(/android/i);return t&&n},describe:function(e){var t={name:"Android Browser"},n=o.default.getFirstMatch(i,e);return n&&(t.version=n),t}},{test:[/playstation 4/i],describe:function(e){var t={name:"PlayStation 4"},n=o.default.getFirstMatch(i,e);return n&&(t.version=n),t}},{test:[/safari|applewebkit/i],describe:function(e){var t={name:"Safari"},n=o.default.getFirstMatch(i,e);return n&&(t.version=n),t}},{test:[/.*/i],describe:function(e){var t=-1!==e.search("\\(")?/^(.*)\/(.*)[ \t]\((.*)/:/^(.*)\/(.*) /;return{name:o.default.getFirstMatch(t,e),version:o.default.getSecondMatch(t,e)}}}];t.default=a,e.exports=t.default},93:function(e,t,n){"use strict";t.__esModule=!0,t.default=void 0;var r,o=(r=n(17))&&r.__esModule?r:{default:r},i=n(18),a=[{test:[/Roku\/DVP/],describe:function(e){var t=o.default.getFirstMatch(/Roku\/DVP-(\d+\.\d+)/i,e);return{name:i.OS_MAP.Roku,version:t}}},{test:[/windows phone/i],describe:function(e){var t=o.default.getFirstMatch(/windows phone (?:os)?\s?(\d+(\.\d+)*)/i,e);return{name:i.OS_MAP.WindowsPhone,version:t}}},{test:[/windows /i],describe:function(e){var t=o.default.getFirstMatch(/Windows ((NT|XP)( \d\d?.\d)?)/i,e),n=o.default.getWindowsVersionName(t);return{name:i.OS_MAP.Windows,version:t,versionName:n}}},{test:[/Macintosh(.*?) FxiOS(.*?)\//],describe:function(e){var t={name:i.OS_MAP.iOS},n=o.default.getSecondMatch(/(Version\/)(\d[\d.]+)/,e);return n&&(t.version=n),t}},{test:[/macintosh/i],describe:function(e){var t=o.default.getFirstMatch(/mac os x (\d+(\.?_?\d+)+)/i,e).replace(/[_\s]/g,"."),n=o.default.getMacOSVersionName(t),r={name:i.OS_MAP.MacOS,version:t};return n&&(r.versionName=n),r}},{test:[/(ipod|iphone|ipad)/i],describe:function(e){var t=o.default.getFirstMatch(/os (\d+([_\s]\d+)*) like mac os x/i,e).replace(/[_\s]/g,".");return{name:i.OS_MAP.iOS,version:t}}},{test:function(e){var t=!e.test(/like android/i),n=e.test(/android/i);return t&&n},describe:function(e){var t=o.default.getFirstMatch(/android[\s/-](\d+(\.\d+)*)/i,e),n=o.default.getAndroidVersionName(t),r={name:i.OS_MAP.Android,version:t};return n&&(r.versionName=n),r}},{test:[/(web|hpw)[o0]s/i],describe:function(e){var t=o.default.getFirstMatch(/(?:web|hpw)[o0]s\/(\d+(\.\d+)*)/i,e),n={name:i.OS_MAP.WebOS};return t&&t.length&&(n.version=t),n}},{test:[/blackberry|\bbb\d+/i,/rim\stablet/i],describe:function(e){var t=o.default.getFirstMatch(/rim\stablet\sos\s(\d+(\.\d+)*)/i,e)||o.default.getFirstMatch(/blackberry\d+\/(\d+([_\s]\d+)*)/i,e)||o.default.getFirstMatch(/\bbb(\d+)/i,e);return{name:i.OS_MAP.BlackBerry,version:t}}},{test:[/bada/i],describe:function(e){var t=o.default.getFirstMatch(/bada\/(\d+(\.\d+)*)/i,e);return{name:i.OS_MAP.Bada,version:t}}},{test:[/tizen/i],describe:function(e){var t=o.default.getFirstMatch(/tizen[/\s](\d+(\.\d+)*)/i,e);return{name:i.OS_MAP.Tizen,version:t}}},{test:[/linux/i],describe:function(){return{name:i.OS_MAP.Linux}}},{test:[/CrOS/],describe:function(){return{name:i.OS_MAP.ChromeOS}}},{test:[/PlayStation 4/],describe:function(e){var t=o.default.getFirstMatch(/PlayStation 4[/\s](\d+(\.\d+)*)/i,e);return{name:i.OS_MAP.PlayStation4,version:t}}}];t.default=a,e.exports=t.default},94:function(e,t,n){"use strict";t.__esModule=!0,t.default=void 0;var r,o=(r=n(17))&&r.__esModule?r:{default:r},i=n(18),a=[{test:[/googlebot/i],describe:function(){return{type:"bot",vendor:"Google"}}},{test:[/huawei/i],describe:function(e){var t=o.default.getFirstMatch(/(can-l01)/i,e)&&"Nova",n={type:i.PLATFORMS_MAP.mobile,vendor:"Huawei"};return t&&(n.model=t),n}},{test:[/nexus\s*(?:7|8|9|10).*/i],describe:function(){return{type:i.PLATFORMS_MAP.tablet,vendor:"Nexus"}}},{test:[/ipad/i],describe:function(){return{type:i.PLATFORMS_MAP.tablet,vendor:"Apple",model:"iPad"}}},{test:[/Macintosh(.*?) FxiOS(.*?)\//],describe:function(){return{type:i.PLATFORMS_MAP.tablet,vendor:"Apple",model:"iPad"}}},{test:[/kftt build/i],describe:function(){return{type:i.PLATFORMS_MAP.tablet,vendor:"Amazon",model:"Kindle Fire HD 7"}}},{test:[/silk/i],describe:function(){return{type:i.PLATFORMS_MAP.tablet,vendor:"Amazon"}}},{test:[/tablet(?! pc)/i],describe:function(){return{type:i.PLATFORMS_MAP.tablet}}},{test:function(e){var t=e.test(/ipod|iphone/i),n=e.test(/like (ipod|iphone)/i);return t&&!n},describe:function(e){var t=o.default.getFirstMatch(/(ipod|iphone)/i,e);return{type:i.PLATFORMS_MAP.mobile,vendor:"Apple",model:t}}},{test:[/nexus\s*[0-6].*/i,/galaxy nexus/i],describe:function(){return{type:i.PLATFORMS_MAP.mobile,vendor:"Nexus"}}},{test:[/[^-]mobi/i],describe:function(){return{type:i.PLATFORMS_MAP.mobile}}},{test:function(e){return"blackberry"===e.getBrowserName(!0)},describe:function(){return{type:i.PLATFORMS_MAP.mobile,vendor:"BlackBerry"}}},{test:function(e){return"bada"===e.getBrowserName(!0)},describe:function(){return{type:i.PLATFORMS_MAP.mobile}}},{test:function(e){return"windows phone"===e.getBrowserName()},describe:function(){return{type:i.PLATFORMS_MAP.mobile,vendor:"Microsoft"}}},{test:function(e){var t=Number(String(e.getOSVersion()).split(".")[0]);return"android"===e.getOSName(!0)&&t>=3},describe:function(){return{type:i.PLATFORMS_MAP.tablet}}},{test:function(e){return"android"===e.getOSName(!0)},describe:function(){return{type:i.PLATFORMS_MAP.mobile}}},{test:function(e){return"macos"===e.getOSName(!0)},describe:function(){return{type:i.PLATFORMS_MAP.desktop,vendor:"Apple"}}},{test:function(e){return"windows"===e.getOSName(!0)},describe:function(){return{type:i.PLATFORMS_MAP.desktop}}},{test:function(e){return"linux"===e.getOSName(!0)},describe:function(){return{type:i.PLATFORMS_MAP.desktop}}},{test:function(e){return"playstation 4"===e.getOSName(!0)},describe:function(){return{type:i.PLATFORMS_MAP.tv}}},{test:function(e){return"roku"===e.getOSName(!0)},describe:function(){return{type:i.PLATFORMS_MAP.tv}}}];t.default=a,e.exports=t.default},95:function(e,t,n){"use strict";t.__esModule=!0,t.default=void 0;var r,o=(r=n(17))&&r.__esModule?r:{default:r},i=n(18),a=[{test:function(e){return"microsoft edge"===e.getBrowserName(!0)},describe:function(e){if(/\sedg\//i.test(e))return{name:i.ENGINE_MAP.Blink};var t=o.default.getFirstMatch(/edge\/(\d+(\.?_?\d+)+)/i,e);return{name:i.ENGINE_MAP.EdgeHTML,version:t}}},{test:[/trident/i],describe:function(e){var t={name:i.ENGINE_MAP.Trident},n=o.default.getFirstMatch(/trident\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:function(e){return e.test(/presto/i)},describe:function(e){var t={name:i.ENGINE_MAP.Presto},n=o.default.getFirstMatch(/presto\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:function(e){var t=e.test(/gecko/i),n=e.test(/like gecko/i);return t&&!n},describe:function(e){var t={name:i.ENGINE_MAP.Gecko},n=o.default.getFirstMatch(/gecko\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/(apple)?webkit\/537\.36/i],describe:function(){return{name:i.ENGINE_MAP.Blink}}},{test:[/(apple)?webkit/i],describe:function(e){var t={name:i.ENGINE_MAP.WebKit},n=o.default.getFirstMatch(/webkit\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}}];t.default=a,e.exports=t.default}})},918:function(e,t,n){"use strict";var r=n(6690).default,o=n(9728).default,i=n(6115).default,a=n(1655).default,s=n(6389).default,u=n(2470),l=n(545),c="function"===typeof Symbol&&"function"===typeof Symbol.for?Symbol.for("nodejs.util.inspect.custom"):null;t.lW=p,t.h2=50;var d=2147483647;function f(e){if(e>d)throw new RangeError('The value "'+e+'" is invalid for option "size"');var t=new Uint8Array(e);return Object.setPrototypeOf(t,p.prototype),t}function p(e,t,n){if("number"===typeof e){if("string"===typeof t)throw new TypeError('The "string" argument must be of type string. Received type number');return y(e)}return h(e,t,n)}function h(e,t,n){if("string"===typeof e)return function(e,t){"string"===typeof t&&""!==t||(t="utf8");if(!p.isEncoding(t))throw new TypeError("Unknown encoding: "+t);var n=0|b(e,t),r=f(n),o=r.write(e,t);o!==n&&(r=r.slice(0,o));return r}(e,t);if(ArrayBuffer.isView(e))return function(e){if(ee(e,Uint8Array)){var t=new Uint8Array(e);return v(t.buffer,t.byteOffset,t.byteLength)}return m(e)}(e);if(null==e)throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof e);if(ee(e,ArrayBuffer)||e&&ee(e.buffer,ArrayBuffer))return v(e,t,n);if("undefined"!==typeof SharedArrayBuffer&&(ee(e,SharedArrayBuffer)||e&&ee(e.buffer,SharedArrayBuffer)))return v(e,t,n);if("number"===typeof e)throw new TypeError('The "value" argument must not be of type number. Received type number');var r=e.valueOf&&e.valueOf();if(null!=r&&r!==e)return p.from(r,t,n);var o=function(e){if(p.isBuffer(e)){var t=0|M(e.length),n=f(t);return 0===n.length||e.copy(n,0,0,t),n}if(void 0!==e.length)return"number"!==typeof e.length||te(e.length)?f(0):m(e);if("Buffer"===e.type&&Array.isArray(e.data))return m(e.data)}(e);if(o)return o;if("undefined"!==typeof Symbol&&null!=Symbol.toPrimitive&&"function"===typeof e[Symbol.toPrimitive])return p.from(e[Symbol.toPrimitive]("string"),t,n);throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof e)}function g(e){if("number"!==typeof e)throw new TypeError('"size" argument must be of type number');if(e<0)throw new RangeError('The value "'+e+'" is invalid for option "size"')}function y(e){return g(e),f(e<0?0:0|M(e))}function m(e){for(var t=e.length<0?0:0|M(e.length),n=f(t),r=0;r=d)throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+d.toString(16)+" bytes");return 0|e}function b(e,t){if(p.isBuffer(e))return e.length;if(ArrayBuffer.isView(e)||ee(e,ArrayBuffer))return e.byteLength;if("string"!==typeof e)throw new TypeError('The "string" argument must be one of type string, Buffer, or ArrayBuffer. Received type '+typeof e);var n=e.length,r=arguments.length>2&&!0===arguments[2];if(!r&&0===n)return 0;for(var o=!1;;)switch(t){case"ascii":case"latin1":case"binary":return n;case"utf8":case"utf-8":return K(e).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*n;case"hex":return n>>>1;case"base64":return X(e).length;default:if(o)return r?-1:K(e).length;t=(""+t).toLowerCase(),o=!0}}function j(e,t,n){var r=!1;if((void 0===t||t<0)&&(t=0),t>this.length)return"";if((void 0===n||n>this.length)&&(n=this.length),n<=0)return"";if((n>>>=0)<=(t>>>=0))return"";for(e||(e="utf8");;)switch(e){case"hex":return O(this,t,n);case"utf8":case"utf-8":return E(this,t,n);case"ascii":return T(this,t,n);case"latin1":case"binary":return A(this,t,n);case"base64":return C(this,t,n);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return z(this,t,n);default:if(r)throw new TypeError("Unknown encoding: "+e);e=(e+"").toLowerCase(),r=!0}}function w(e,t,n){var r=e[t];e[t]=e[n],e[n]=r}function x(e,t,n,r,o){if(0===e.length)return-1;if("string"===typeof n?(r=n,n=0):n>2147483647?n=2147483647:n<-2147483648&&(n=-2147483648),te(n=+n)&&(n=o?0:e.length-1),n<0&&(n=e.length+n),n>=e.length){if(o)return-1;n=e.length-1}else if(n<0){if(!o)return-1;n=0}if("string"===typeof t&&(t=p.from(t,r)),p.isBuffer(t))return 0===t.length?-1:N(e,t,n,r,o);if("number"===typeof t)return t&=255,"function"===typeof Uint8Array.prototype.indexOf?o?Uint8Array.prototype.indexOf.call(e,t,n):Uint8Array.prototype.lastIndexOf.call(e,t,n):N(e,[t],n,r,o);throw new TypeError("val must be string, number or Buffer")}function N(e,t,n,r,o){var i,a=1,s=e.length,u=t.length;if(void 0!==r&&("ucs2"===(r=String(r).toLowerCase())||"ucs-2"===r||"utf16le"===r||"utf-16le"===r)){if(e.length<2||t.length<2)return-1;a=2,s/=2,u/=2,n/=2}function l(e,t){return 1===a?e[t]:e.readUInt16BE(t*a)}if(o){var c=-1;for(i=n;is&&(n=s-u),i=n;i>=0;i--){for(var d=!0,f=0;fo&&(r=o):r=o;var i,a=t.length;for(r>a/2&&(r=a/2),i=0;i>8,o=n%256,i.push(o),i.push(r);return i}(t,e.length-n),e,n,r)}function C(e,t,n){return 0===t&&n===e.length?u.fromByteArray(e):u.fromByteArray(e.slice(t,n))}function E(e,t,n){n=Math.min(e.length,n);for(var r=[],o=t;o239?4:i>223?3:i>191?2:1;if(o+s<=n){var u=void 0,l=void 0,c=void 0,d=void 0;switch(s){case 1:i<128&&(a=i);break;case 2:128===(192&(u=e[o+1]))&&(d=(31&i)<<6|63&u)>127&&(a=d);break;case 3:u=e[o+1],l=e[o+2],128===(192&u)&&128===(192&l)&&(d=(15&i)<<12|(63&u)<<6|63&l)>2047&&(d<55296||d>57343)&&(a=d);break;case 4:u=e[o+1],l=e[o+2],c=e[o+3],128===(192&u)&&128===(192&l)&&128===(192&c)&&(d=(15&i)<<18|(63&u)<<12|(63&l)<<6|63&c)>65535&&d<1114112&&(a=d)}}null===a?(a=65533,s=1):a>65535&&(a-=65536,r.push(a>>>10&1023|55296),a=56320|1023&a),r.push(a),o+=s}return function(e){var t=e.length;if(t<=_)return String.fromCharCode.apply(String,e);var n="",r=0;for(;rr.length?(p.isBuffer(i)||(i=p.from(i)),i.copy(r,o)):Uint8Array.prototype.set.call(r,i,o);else{if(!p.isBuffer(i))throw new TypeError('"list" argument must be an Array of Buffers');i.copy(r,o)}o+=i.length}return r},p.byteLength=b,p.prototype._isBuffer=!0,p.prototype.swap16=function(){var e=this.length;if(e%2!==0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(var t=0;tn&&(e+=" ... "),""},c&&(p.prototype[c]=p.prototype.inspect),p.prototype.compare=function(e,t,n,r,o){if(ee(e,Uint8Array)&&(e=p.from(e,e.offset,e.byteLength)),!p.isBuffer(e))throw new TypeError('The "target" argument must be one of type Buffer or Uint8Array. Received type '+typeof e);if(void 0===t&&(t=0),void 0===n&&(n=e?e.length:0),void 0===r&&(r=0),void 0===o&&(o=this.length),t<0||n>e.length||r<0||o>this.length)throw new RangeError("out of range index");if(r>=o&&t>=n)return 0;if(r>=o)return-1;if(t>=n)return 1;if(this===e)return 0;for(var i=(o>>>=0)-(r>>>=0),a=(n>>>=0)-(t>>>=0),s=Math.min(i,a),u=this.slice(r,o),l=e.slice(t,n),c=0;c>>=0,isFinite(n)?(n>>>=0,void 0===r&&(r="utf8")):(r=n,n=void 0)}var o=this.length-t;if((void 0===n||n>o)&&(n=o),e.length>0&&(n<0||t<0)||t>this.length)throw new RangeError("Attempt to write outside buffer bounds");r||(r="utf8");for(var i=!1;;)switch(r){case"hex":return I(this,e,t,n);case"utf8":case"utf-8":return D(this,e,t,n);case"ascii":case"latin1":case"binary":return S(this,e,t,n);case"base64":return L(this,e,t,n);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return k(this,e,t,n);default:if(i)throw new TypeError("Unknown encoding: "+r);r=(""+r).toLowerCase(),i=!0}},p.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};var _=4096;function T(e,t,n){var r="";n=Math.min(e.length,n);for(var o=t;or)&&(n=r);for(var o="",i=t;in)throw new RangeError("Trying to access beyond buffer length")}function P(e,t,n,r,o,i){if(!p.isBuffer(e))throw new TypeError('"buffer" argument must be a Buffer instance');if(t>o||te.length)throw new RangeError("Index out of range")}function R(e,t,n,r,o){Z(t,r,o,e,n,7);var i=Number(t&BigInt(4294967295));e[n++]=i,i>>=8,e[n++]=i,i>>=8,e[n++]=i,i>>=8,e[n++]=i;var a=Number(t>>BigInt(32)&BigInt(4294967295));return e[n++]=a,a>>=8,e[n++]=a,a>>=8,e[n++]=a,a>>=8,e[n++]=a,n}function B(e,t,n,r,o){Z(t,r,o,e,n,7);var i=Number(t&BigInt(4294967295));e[n+7]=i,i>>=8,e[n+6]=i,i>>=8,e[n+5]=i,i>>=8,e[n+4]=i;var a=Number(t>>BigInt(32)&BigInt(4294967295));return e[n+3]=a,a>>=8,e[n+2]=a,a>>=8,e[n+1]=a,a>>=8,e[n]=a,n+8}function F(e,t,n,r,o,i){if(n+r>e.length)throw new RangeError("Index out of range");if(n<0)throw new RangeError("Index out of range")}function Y(e,t,n,r,o){return t=+t,n>>>=0,o||F(e,0,n,4),l.write(e,t,n,r,23,4),n+4}function Q(e,t,n,r,o){return t=+t,n>>>=0,o||F(e,0,n,8),l.write(e,t,n,r,52,8),n+8}p.prototype.slice=function(e,t){var n=this.length;(e=~~e)<0?(e+=n)<0&&(e=0):e>n&&(e=n),(t=void 0===t?n:~~t)<0?(t+=n)<0&&(t=0):t>n&&(t=n),t>>=0,t>>>=0,n||U(e,t,this.length);for(var r=this[e],o=1,i=0;++i>>=0,t>>>=0,n||U(e,t,this.length);for(var r=this[e+--t],o=1;t>0&&(o*=256);)r+=this[e+--t]*o;return r},p.prototype.readUint8=p.prototype.readUInt8=function(e,t){return e>>>=0,t||U(e,1,this.length),this[e]},p.prototype.readUint16LE=p.prototype.readUInt16LE=function(e,t){return e>>>=0,t||U(e,2,this.length),this[e]|this[e+1]<<8},p.prototype.readUint16BE=p.prototype.readUInt16BE=function(e,t){return e>>>=0,t||U(e,2,this.length),this[e]<<8|this[e+1]},p.prototype.readUint32LE=p.prototype.readUInt32LE=function(e,t){return e>>>=0,t||U(e,4,this.length),(this[e]|this[e+1]<<8|this[e+2]<<16)+16777216*this[e+3]},p.prototype.readUint32BE=p.prototype.readUInt32BE=function(e,t){return e>>>=0,t||U(e,4,this.length),16777216*this[e]+(this[e+1]<<16|this[e+2]<<8|this[e+3])},p.prototype.readBigUInt64LE=re((function(e){V(e>>>=0,"offset");var t=this[e],n=this[e+7];void 0!==t&&void 0!==n||q(e,this.length-8);var r=t+this[++e]*Math.pow(2,8)+this[++e]*Math.pow(2,16)+this[++e]*Math.pow(2,24),o=this[++e]+this[++e]*Math.pow(2,8)+this[++e]*Math.pow(2,16)+n*Math.pow(2,24);return BigInt(r)+(BigInt(o)<>>=0,"offset");var t=this[e],n=this[e+7];void 0!==t&&void 0!==n||q(e,this.length-8);var r=t*Math.pow(2,24)+this[++e]*Math.pow(2,16)+this[++e]*Math.pow(2,8)+this[++e],o=this[++e]*Math.pow(2,24)+this[++e]*Math.pow(2,16)+this[++e]*Math.pow(2,8)+n;return(BigInt(r)<>>=0,t>>>=0,n||U(e,t,this.length);for(var r=this[e],o=1,i=0;++i=(o*=128)&&(r-=Math.pow(2,8*t)),r},p.prototype.readIntBE=function(e,t,n){e>>>=0,t>>>=0,n||U(e,t,this.length);for(var r=t,o=1,i=this[e+--r];r>0&&(o*=256);)i+=this[e+--r]*o;return i>=(o*=128)&&(i-=Math.pow(2,8*t)),i},p.prototype.readInt8=function(e,t){return e>>>=0,t||U(e,1,this.length),128&this[e]?-1*(255-this[e]+1):this[e]},p.prototype.readInt16LE=function(e,t){e>>>=0,t||U(e,2,this.length);var n=this[e]|this[e+1]<<8;return 32768&n?4294901760|n:n},p.prototype.readInt16BE=function(e,t){e>>>=0,t||U(e,2,this.length);var n=this[e+1]|this[e]<<8;return 32768&n?4294901760|n:n},p.prototype.readInt32LE=function(e,t){return e>>>=0,t||U(e,4,this.length),this[e]|this[e+1]<<8|this[e+2]<<16|this[e+3]<<24},p.prototype.readInt32BE=function(e,t){return e>>>=0,t||U(e,4,this.length),this[e]<<24|this[e+1]<<16|this[e+2]<<8|this[e+3]},p.prototype.readBigInt64LE=re((function(e){V(e>>>=0,"offset");var t=this[e],n=this[e+7];void 0!==t&&void 0!==n||q(e,this.length-8);var r=this[e+4]+this[e+5]*Math.pow(2,8)+this[e+6]*Math.pow(2,16)+(n<<24);return(BigInt(r)<>>=0,"offset");var t=this[e],n=this[e+7];void 0!==t&&void 0!==n||q(e,this.length-8);var r=(t<<24)+this[++e]*Math.pow(2,16)+this[++e]*Math.pow(2,8)+this[++e];return(BigInt(r)<>>=0,t||U(e,4,this.length),l.read(this,e,!0,23,4)},p.prototype.readFloatBE=function(e,t){return e>>>=0,t||U(e,4,this.length),l.read(this,e,!1,23,4)},p.prototype.readDoubleLE=function(e,t){return e>>>=0,t||U(e,8,this.length),l.read(this,e,!0,52,8)},p.prototype.readDoubleBE=function(e,t){return e>>>=0,t||U(e,8,this.length),l.read(this,e,!1,52,8)},p.prototype.writeUintLE=p.prototype.writeUIntLE=function(e,t,n,r){(e=+e,t>>>=0,n>>>=0,r)||P(this,e,t,n,Math.pow(2,8*n)-1,0);var o=1,i=0;for(this[t]=255&e;++i>>=0,n>>>=0,r)||P(this,e,t,n,Math.pow(2,8*n)-1,0);var o=n-1,i=1;for(this[t+o]=255&e;--o>=0&&(i*=256);)this[t+o]=e/i&255;return t+n},p.prototype.writeUint8=p.prototype.writeUInt8=function(e,t,n){return e=+e,t>>>=0,n||P(this,e,t,1,255,0),this[t]=255&e,t+1},p.prototype.writeUint16LE=p.prototype.writeUInt16LE=function(e,t,n){return e=+e,t>>>=0,n||P(this,e,t,2,65535,0),this[t]=255&e,this[t+1]=e>>>8,t+2},p.prototype.writeUint16BE=p.prototype.writeUInt16BE=function(e,t,n){return e=+e,t>>>=0,n||P(this,e,t,2,65535,0),this[t]=e>>>8,this[t+1]=255&e,t+2},p.prototype.writeUint32LE=p.prototype.writeUInt32LE=function(e,t,n){return e=+e,t>>>=0,n||P(this,e,t,4,4294967295,0),this[t+3]=e>>>24,this[t+2]=e>>>16,this[t+1]=e>>>8,this[t]=255&e,t+4},p.prototype.writeUint32BE=p.prototype.writeUInt32BE=function(e,t,n){return e=+e,t>>>=0,n||P(this,e,t,4,4294967295,0),this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e,t+4},p.prototype.writeBigUInt64LE=re((function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;return R(this,e,t,BigInt(0),BigInt("0xffffffffffffffff"))})),p.prototype.writeBigUInt64BE=re((function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;return B(this,e,t,BigInt(0),BigInt("0xffffffffffffffff"))})),p.prototype.writeIntLE=function(e,t,n,r){if(e=+e,t>>>=0,!r){var o=Math.pow(2,8*n-1);P(this,e,t,n,o-1,-o)}var i=0,a=1,s=0;for(this[t]=255&e;++i>0)-s&255;return t+n},p.prototype.writeIntBE=function(e,t,n,r){if(e=+e,t>>>=0,!r){var o=Math.pow(2,8*n-1);P(this,e,t,n,o-1,-o)}var i=n-1,a=1,s=0;for(this[t+i]=255&e;--i>=0&&(a*=256);)e<0&&0===s&&0!==this[t+i+1]&&(s=1),this[t+i]=(e/a>>0)-s&255;return t+n},p.prototype.writeInt8=function(e,t,n){return e=+e,t>>>=0,n||P(this,e,t,1,127,-128),e<0&&(e=255+e+1),this[t]=255&e,t+1},p.prototype.writeInt16LE=function(e,t,n){return e=+e,t>>>=0,n||P(this,e,t,2,32767,-32768),this[t]=255&e,this[t+1]=e>>>8,t+2},p.prototype.writeInt16BE=function(e,t,n){return e=+e,t>>>=0,n||P(this,e,t,2,32767,-32768),this[t]=e>>>8,this[t+1]=255&e,t+2},p.prototype.writeInt32LE=function(e,t,n){return e=+e,t>>>=0,n||P(this,e,t,4,2147483647,-2147483648),this[t]=255&e,this[t+1]=e>>>8,this[t+2]=e>>>16,this[t+3]=e>>>24,t+4},p.prototype.writeInt32BE=function(e,t,n){return e=+e,t>>>=0,n||P(this,e,t,4,2147483647,-2147483648),e<0&&(e=4294967295+e+1),this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e,t+4},p.prototype.writeBigInt64LE=re((function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;return R(this,e,t,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))})),p.prototype.writeBigInt64BE=re((function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;return B(this,e,t,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))})),p.prototype.writeFloatLE=function(e,t,n){return Y(this,e,t,!0,n)},p.prototype.writeFloatBE=function(e,t,n){return Y(this,e,t,!1,n)},p.prototype.writeDoubleLE=function(e,t,n){return Q(this,e,t,!0,n)},p.prototype.writeDoubleBE=function(e,t,n){return Q(this,e,t,!1,n)},p.prototype.copy=function(e,t,n,r){if(!p.isBuffer(e))throw new TypeError("argument should be a Buffer");if(n||(n=0),r||0===r||(r=this.length),t>=e.length&&(t=e.length),t||(t=0),r>0&&r=this.length)throw new RangeError("Index out of range");if(r<0)throw new RangeError("sourceEnd out of bounds");r>this.length&&(r=this.length),e.length-t>>=0,n=void 0===n?this.length:n>>>0,e||(e=0),"number"===typeof e)for(i=t;i=r+4;n-=3)t="_".concat(e.slice(n-3,n)).concat(t);return"".concat(e.slice(0,n)).concat(t)}function Z(e,t,n,r,o,i){if(e>n||e3?0===t||t===BigInt(0)?">= 0".concat(s," and < 2").concat(s," ** ").concat(8*(i+1)).concat(s):">= -(2".concat(s," ** ").concat(8*(i+1)-1).concat(s,") and < 2 ** ")+"".concat(8*(i+1)-1).concat(s):">= ".concat(t).concat(s," and <= ").concat(n).concat(s),new G.ERR_OUT_OF_RANGE("value",a,e)}!function(e,t,n){V(t,"offset"),void 0!==e[t]&&void 0!==e[t+n]||q(t,e.length-(n+1))}(r,o,i)}function V(e,t){if("number"!==typeof e)throw new G.ERR_INVALID_ARG_TYPE(t,"number",e)}function q(e,t,n){if(Math.floor(e)!==e)throw V(e,n),new G.ERR_OUT_OF_RANGE(n||"offset","an integer",e);if(t<0)throw new G.ERR_BUFFER_OUT_OF_BOUNDS;throw new G.ERR_OUT_OF_RANGE(n||"offset",">= ".concat(n?1:0," and <= ").concat(t),e)}W("ERR_BUFFER_OUT_OF_BOUNDS",(function(e){return e?"".concat(e," is outside of buffer bounds"):"Attempt to access memory outside buffer bounds"}),RangeError),W("ERR_INVALID_ARG_TYPE",(function(e,t){return'The "'.concat(e,'" argument must be of type number. Received type ').concat(typeof t)}),TypeError),W("ERR_OUT_OF_RANGE",(function(e,t,n){var r='The value of "'.concat(e,'" is out of range.'),o=n;return Number.isInteger(n)&&Math.abs(n)>Math.pow(2,32)?o=H(String(n)):"bigint"===typeof n&&(o=String(n),(n>Math.pow(BigInt(2),BigInt(32))||n<-Math.pow(BigInt(2),BigInt(32)))&&(o=H(o)),o+="n"),r+=" It must be ".concat(t,". Received ").concat(o)}),RangeError);var J=/[^+/0-9A-Za-z-_]/g;function K(e,t){var n;t=t||1/0;for(var r=e.length,o=null,i=[],a=0;a55295&&n<57344){if(!o){if(n>56319){(t-=3)>-1&&i.push(239,191,189);continue}if(a+1===r){(t-=3)>-1&&i.push(239,191,189);continue}o=n;continue}if(n<56320){(t-=3)>-1&&i.push(239,191,189),o=n;continue}n=65536+(o-55296<<10|n-56320)}else o&&(t-=3)>-1&&i.push(239,191,189);if(o=null,n<128){if((t-=1)<0)break;i.push(n)}else if(n<2048){if((t-=2)<0)break;i.push(n>>6|192,63&n|128)}else if(n<65536){if((t-=3)<0)break;i.push(n>>12|224,n>>6&63|128,63&n|128)}else{if(!(n<1114112))throw new Error("Invalid code point");if((t-=4)<0)break;i.push(n>>18|240,n>>12&63|128,n>>6&63|128,63&n|128)}}return i}function X(e){return u.toByteArray(function(e){if((e=(e=e.split("=")[0]).trim().replace(J,"")).length<2)return"";for(;e.length%4!==0;)e+="=";return e}(e))}function $(e,t,n,r){var o;for(o=0;o=t.length||o>=e.length);++o)t[o+n]=e[o];return o}function ee(e,t){return e instanceof t||null!=e&&null!=e.constructor&&null!=e.constructor.name&&e.constructor.name===t.name}function te(e){return e!==e}var ne=function(){for(var e="0123456789abcdef",t=new Array(256),n=0;n<16;++n)for(var r=16*n,o=0;o<16;++o)t[r+o]=e[n]+e[o];return t}();function re(e){return"undefined"===typeof BigInt?oe:e}function oe(){throw new Error("BigInt not supported")}},4680:function(e,t,n){"use strict";var r=n(8476),o=n(9962),i=o(r("String.prototype.indexOf"));e.exports=function(e,t){var n=r(e,!!t);return"function"===typeof n&&i(e,".prototype.")>-1?o(n):n}},9962:function(e,t,n){"use strict";var r=n(1199),o=n(8476),i=o("%Function.prototype.apply%"),a=o("%Function.prototype.call%"),s=o("%Reflect.apply%",!0)||r.call(a,i),u=o("%Object.getOwnPropertyDescriptor%",!0),l=o("%Object.defineProperty%",!0),c=o("%Math.max%");if(l)try{l({},"a",{value:1})}catch(f){l=null}e.exports=function(e){var t=s(r,a,arguments);if(u&&l){var n=u(t,"length");n.configurable&&l(t,"length",{value:1+c(0,e.length-(arguments.length-1))})}return t};var d=function(){return s(r,i,arguments)};l?l(e.exports,"apply",{value:d}):e.exports.apply=d},6123:function(e,t){var n;!function(){"use strict";var r={}.hasOwnProperty;function o(){for(var e=[],t=0;t=31||"undefined"!==typeof navigator&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/applewebkit\/(\d+)/)},t.storage="undefined"!=typeof chrome&&"undefined"!=typeof chrome.storage?chrome.storage.local:function(){try{return window.localStorage}catch(e){}}(),t.colors=["lightseagreen","forestgreen","goldenrod","dodgerblue","darkorchid","crimson"],t.formatters.j=function(e){try{return JSON.stringify(e)}catch(t){return"[UnexpectedJSONParseError]: "+t.message}},t.enable(r())},9382:function(e,t,n){var r;function o(e){function n(){if(n.enabled){var e=n,o=+new Date,i=o-(r||o);e.diff=i,e.prev=r,e.curr=o,r=o;for(var a=new Array(arguments.length),s=0;se.length)&&(t=e.length);for(var n=0,r=new Array(t);n1?n-1:0),o=1;o/gm),q=y(/^data-[\-\w.\u00B7-\uFFFF]/),J=y(/^aria-[\-\w]+$/),K=y(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|cid|xmpp):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i),X=y(/^(?:\w+script|data):/i),$=y(/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g),ee=y(/^html$/i),te=function(){return"undefined"===typeof window?null:window},ne=function(t,n){if("object"!==e(t)||"function"!==typeof t.createPolicy)return null;var r=null,o="data-tt-policy-suffix";n.currentScript&&n.currentScript.hasAttribute(o)&&(r=n.currentScript.getAttribute(o));var i="dompurify"+(r?"#"+r:"");try{return t.createPolicy(i,{createHTML:function(e){return e},createScriptURL:function(e){return e}})}catch(a){return console.warn("TrustedTypes policy "+i+" could not be created."),null}};function re(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:te(),n=function(e){return re(e)};if(n.version="2.4.0",n.removed=[],!t||!t.document||9!==t.document.nodeType)return n.isSupported=!1,n;var r=t.document,i=t.document,a=t.DocumentFragment,s=t.HTMLTemplateElement,u=t.Node,l=t.Element,c=t.NodeFilter,d=t.NamedNodeMap,f=void 0===d?t.NamedNodeMap||t.MozNamedAttrMap:d,p=t.HTMLFormElement,h=t.DOMParser,y=t.trustedTypes,m=l.prototype,v=O(m,"cloneNode"),M=O(m,"nextSibling"),b=O(m,"childNodes"),E=O(m,"parentNode");if("function"===typeof s){var _=i.createElement("template");_.content&&_.content.ownerDocument&&(i=_.content.ownerDocument)}var oe=ne(y,r),ie=oe?oe.createHTML(""):"",ae=i,se=ae.implementation,ue=ae.createNodeIterator,le=ae.createDocumentFragment,ce=ae.getElementsByTagName,de=r.importNode,fe={};try{fe=A(i).documentMode?i.documentMode:{}}catch(St){}var pe={};n.isSupported="function"===typeof E&&se&&"undefined"!==typeof se.createHTMLDocument&&9!==fe;var he,ge,ye=Z,me=V,ve=q,Me=J,be=X,je=$,we=K,xe=null,Ne=T({},[].concat(o(z),o(U),o(P),o(B),o(Y))),Ie=null,De=T({},[].concat(o(Q),o(G),o(W),o(H))),Se=Object.seal(Object.create(null,{tagNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},attributeNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},allowCustomizedBuiltInElements:{writable:!0,configurable:!1,enumerable:!0,value:!1}})),Le=null,ke=null,Ce=!0,Ee=!0,_e=!1,Te=!1,Ae=!1,Oe=!1,ze=!1,Ue=!1,Pe=!1,Re=!1,Be=!0,Fe=!1,Ye="user-content-",Qe=!0,Ge=!1,We={},He=null,Ze=T({},["annotation-xml","audio","colgroup","desc","foreignobject","head","iframe","math","mi","mn","mo","ms","mtext","noembed","noframes","noscript","plaintext","script","style","svg","template","thead","title","video","xmp"]),Ve=null,qe=T({},["audio","video","img","source","image","track"]),Je=null,Ke=T({},["alt","class","for","id","label","name","pattern","placeholder","role","summary","title","value","style","xmlns"]),Xe="http://www.w3.org/1998/Math/MathML",$e="http://www.w3.org/2000/svg",et="http://www.w3.org/1999/xhtml",tt=et,nt=!1,rt=["application/xhtml+xml","text/html"],ot="text/html",it=null,at=i.createElement("form"),st=function(e){return e instanceof RegExp||e instanceof Function},ut=function(t){it&&it===t||(t&&"object"===e(t)||(t={}),t=A(t),he=he=-1===rt.indexOf(t.PARSER_MEDIA_TYPE)?ot:t.PARSER_MEDIA_TYPE,ge="application/xhtml+xml"===he?function(e){return e}:N,xe="ALLOWED_TAGS"in t?T({},t.ALLOWED_TAGS,ge):Ne,Ie="ALLOWED_ATTR"in t?T({},t.ALLOWED_ATTR,ge):De,Je="ADD_URI_SAFE_ATTR"in t?T(A(Ke),t.ADD_URI_SAFE_ATTR,ge):Ke,Ve="ADD_DATA_URI_TAGS"in t?T(A(qe),t.ADD_DATA_URI_TAGS,ge):qe,He="FORBID_CONTENTS"in t?T({},t.FORBID_CONTENTS,ge):Ze,Le="FORBID_TAGS"in t?T({},t.FORBID_TAGS,ge):{},ke="FORBID_ATTR"in t?T({},t.FORBID_ATTR,ge):{},We="USE_PROFILES"in t&&t.USE_PROFILES,Ce=!1!==t.ALLOW_ARIA_ATTR,Ee=!1!==t.ALLOW_DATA_ATTR,_e=t.ALLOW_UNKNOWN_PROTOCOLS||!1,Te=t.SAFE_FOR_TEMPLATES||!1,Ae=t.WHOLE_DOCUMENT||!1,Ue=t.RETURN_DOM||!1,Pe=t.RETURN_DOM_FRAGMENT||!1,Re=t.RETURN_TRUSTED_TYPE||!1,ze=t.FORCE_BODY||!1,Be=!1!==t.SANITIZE_DOM,Fe=t.SANITIZE_NAMED_PROPS||!1,Qe=!1!==t.KEEP_CONTENT,Ge=t.IN_PLACE||!1,we=t.ALLOWED_URI_REGEXP||we,tt=t.NAMESPACE||et,t.CUSTOM_ELEMENT_HANDLING&&st(t.CUSTOM_ELEMENT_HANDLING.tagNameCheck)&&(Se.tagNameCheck=t.CUSTOM_ELEMENT_HANDLING.tagNameCheck),t.CUSTOM_ELEMENT_HANDLING&&st(t.CUSTOM_ELEMENT_HANDLING.attributeNameCheck)&&(Se.attributeNameCheck=t.CUSTOM_ELEMENT_HANDLING.attributeNameCheck),t.CUSTOM_ELEMENT_HANDLING&&"boolean"===typeof t.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements&&(Se.allowCustomizedBuiltInElements=t.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements),Te&&(Ee=!1),Pe&&(Ue=!0),We&&(xe=T({},o(Y)),Ie=[],!0===We.html&&(T(xe,z),T(Ie,Q)),!0===We.svg&&(T(xe,U),T(Ie,G),T(Ie,H)),!0===We.svgFilters&&(T(xe,P),T(Ie,G),T(Ie,H)),!0===We.mathMl&&(T(xe,B),T(Ie,W),T(Ie,H))),t.ADD_TAGS&&(xe===Ne&&(xe=A(xe)),T(xe,t.ADD_TAGS,ge)),t.ADD_ATTR&&(Ie===De&&(Ie=A(Ie)),T(Ie,t.ADD_ATTR,ge)),t.ADD_URI_SAFE_ATTR&&T(Je,t.ADD_URI_SAFE_ATTR,ge),t.FORBID_CONTENTS&&(He===Ze&&(He=A(He)),T(He,t.FORBID_CONTENTS,ge)),Qe&&(xe["#text"]=!0),Ae&&T(xe,["html","head","body"]),xe.table&&(T(xe,["tbody"]),delete Le.tbody),g&&g(t),it=t)},lt=T({},["mi","mo","mn","ms","mtext"]),ct=T({},["foreignobject","desc","title","annotation-xml"]),dt=T({},["title","style","font","a","script"]),ft=T({},U);T(ft,P),T(ft,R);var pt=T({},B);T(pt,F);var ht=function(e){var t=E(e);t&&t.tagName||(t={namespaceURI:et,tagName:"template"});var n=N(e.tagName),r=N(t.tagName);return e.namespaceURI===$e?t.namespaceURI===et?"svg"===n:t.namespaceURI===Xe?"svg"===n&&("annotation-xml"===r||lt[r]):Boolean(ft[n]):e.namespaceURI===Xe?t.namespaceURI===et?"math"===n:t.namespaceURI===$e?"math"===n&&ct[r]:Boolean(pt[n]):e.namespaceURI===et&&!(t.namespaceURI===$e&&!ct[r])&&!(t.namespaceURI===Xe&&!lt[r])&&!pt[n]&&(dt[n]||!ft[n])},gt=function(e){x(n.removed,{element:e});try{e.parentNode.removeChild(e)}catch(St){try{e.outerHTML=ie}catch(St){e.remove()}}},yt=function(e,t){try{x(n.removed,{attribute:t.getAttributeNode(e),from:t})}catch(St){x(n.removed,{attribute:null,from:t})}if(t.removeAttribute(e),"is"===e&&!Ie[e])if(Ue||Pe)try{gt(t)}catch(St){}else try{t.setAttribute(e,"")}catch(St){}},mt=function(e){var t,n;if(ze)e=""+e;else{var r=I(e,/^[\r\n\t ]+/);n=r&&r[0]}"application/xhtml+xml"===he&&(e=''+e+"");var o=oe?oe.createHTML(e):e;if(tt===et)try{t=(new h).parseFromString(o,he)}catch(St){}if(!t||!t.documentElement){t=se.createDocument(tt,"template",null);try{t.documentElement.innerHTML=nt?"":o}catch(St){}}var a=t.body||t.documentElement;return e&&n&&a.insertBefore(i.createTextNode(n),a.childNodes[0]||null),tt===et?ce.call(t,Ae?"html":"body")[0]:Ae?t.documentElement:a},vt=function(e){return ue.call(e.ownerDocument||e,e,c.SHOW_ELEMENT|c.SHOW_COMMENT|c.SHOW_TEXT,null,!1)},Mt=function(e){return e instanceof p&&("string"!==typeof e.nodeName||"string"!==typeof e.textContent||"function"!==typeof e.removeChild||!(e.attributes instanceof f)||"function"!==typeof e.removeAttribute||"function"!==typeof e.setAttribute||"string"!==typeof e.namespaceURI||"function"!==typeof e.insertBefore)},bt=function(t){return"object"===e(u)?t instanceof u:t&&"object"===e(t)&&"number"===typeof t.nodeType&&"string"===typeof t.nodeName},jt=function(e,t,r){pe[e]&&j(pe[e],(function(e){e.call(n,t,r,it)}))},wt=function(e){var t;if(jt("beforeSanitizeElements",e,null),Mt(e))return gt(e),!0;if(k(/[\u0080-\uFFFF]/,e.nodeName))return gt(e),!0;var r=ge(e.nodeName);if(jt("uponSanitizeElement",e,{tagName:r,allowedTags:xe}),e.hasChildNodes()&&!bt(e.firstElementChild)&&(!bt(e.content)||!bt(e.content.firstElementChild))&&k(/<[/\w]/g,e.innerHTML)&&k(/<[/\w]/g,e.textContent))return gt(e),!0;if("select"===r&&k(/