diff --git a/README.md b/README.md index 95f2796..3e1ed11 100644 --- a/README.md +++ b/README.md @@ -2,9 +2,16 @@ ## WORK IN PROGRESS -Component is working very well so far with Kobra 3 Combos and Kobra 2s but will still have bugs that I'll need help ironing out. +Component is working very well so far with: +- Kobra 3 Combo +- Kobra 2 +- Photon Mono M5s (Basic support still) -Should also work with multiple printers but untested until someone buys me a second printer :) +If you have success with other printers please report it :) + +It will still have bugs that I'll need help ironing out. + +Should also work with multiple printers now, although I can't test this myself :) ## Gallery diff --git a/Version b/Version index a60f4fc..f7466cc 100644 --- a/Version +++ b/Version @@ -7,3 +7,4 @@ Version: 0.0.9 20240807 - Minor bug fixes Version: 0.0.10 20240811 - Bug fix for config flow, add more frontend buttons / option modals Version: 0.0.11 20240813 - Frontend improvements to panel print pages, data refactor, work on Resin printer bugs Version: 0.0.12 20240816 - Minor bug fix in MQTT reconnect, untested support for multiple ACE units, frontend refactoring +Version: 0.0.13 20240825 - Bug fixes for multiple printers, HomeAssistant 2024.8 and Resin printers diff --git a/custom_components/anycubic_cloud/anycubic_cloud_api/anycubic_api.py b/custom_components/anycubic_cloud/anycubic_cloud_api/anycubic_api.py index 91f4e56..6eb46e5 100644 --- a/custom_components/anycubic_cloud/anycubic_cloud_api/anycubic_api.py +++ b/custom_components/anycubic_cloud/anycubic_cloud_api/anycubic_api.py @@ -2013,16 +2013,30 @@ async def list_all_projects( data = list([AnycubicProject.from_list_json(self, x) for x in resp['data']]) return data - async def project_info_for_id(self, project_id): + async def project_info_for_id( + self, + project_id, + ): query = { 'id': str(project_id) } resp = await self._fetch_api_resp(endpoint=API_ENDPOINT.project_info, query=query) return resp['data'] - async def get_latest_project(self): + async def get_latest_project( + self, + printer_id=None, + ): projects = await self.list_all_projects() - latest_project = projects[0] if projects and len(projects) > 0 else None + + latest_project = None + + if projects and len(projects) > 0: + for proj in projects: + if printer_id is None or proj.printer_id == printer_id: + latest_project = proj + break + if latest_project: extra_proj_data = await self.project_info_for_id(latest_project.id) latest_project.update_extra_data(extra_proj_data) diff --git a/custom_components/anycubic_cloud/anycubic_cloud_api/anycubic_api_mqtt.py b/custom_components/anycubic_cloud/anycubic_cloud_api/anycubic_api_mqtt.py index eed5742..eebb3b5 100644 --- a/custom_components/anycubic_cloud/anycubic_cloud_api/anycubic_api_mqtt.py +++ b/custom_components/anycubic_cloud/anycubic_cloud_api/anycubic_api_mqtt.py @@ -41,6 +41,7 @@ def __init__( self, *args, mqtt_callback_printer_update=None, + mqtt_callback_printer_busy=None, **kwargs, ): self._api_username = None @@ -53,6 +54,7 @@ def __init__( self._mqtt_connected: asyncio.Event | None = None self._mqtt_disconnected: asyncio.Event | None = None self._mqtt_callback_printer_update = mqtt_callback_printer_update + self._mqtt_callback_printer_busy = mqtt_callback_printer_busy super().__init__(*args, **kwargs) @property @@ -144,11 +146,20 @@ def _mqtt_message_router(self, message): printer = self._mqtt_subscribed_printers[printer_key] + printer_was_available = printer.is_available + try: printer.process_mqtt_update(topic, payload) if self._mqtt_callback_printer_update: self._mqtt_callback_printer_update() + + if ( + self._mqtt_callback_printer_busy and + printer_was_available and printer.is_busy + ): + self._mqtt_callback_printer_busy() + except Exception as e: tb = traceback.format_exc() self._log_to_error(f"Anycubic MQTT Message error: {e}\n on MQTT topic: {topic}\n {payload}\n{tb}") diff --git a/custom_components/anycubic_cloud/anycubic_cloud_api/anycubic_data_model_files.py b/custom_components/anycubic_cloud/anycubic_cloud_api/anycubic_data_model_files.py index 5c0e5a8..8fb2d5d 100644 --- a/custom_components/anycubic_cloud/anycubic_cloud_api/anycubic_data_model_files.py +++ b/custom_components/anycubic_cloud/anycubic_cloud_api/anycubic_data_model_files.py @@ -303,8 +303,8 @@ def __init__( is_dir, ): self._filename = str(filename) - self._timestamp = int(timestamp) - self._size = int(size) + self._timestamp = int(timestamp) if timestamp is not None else 0 + self._size = int(size) if size is not None else 0 self._is_dir = bool(is_dir) @classmethod @@ -314,8 +314,8 @@ def from_json(cls, data): return cls( filename=data['filename'], - timestamp=data['timestamp'], - size=data['size'], + timestamp=data.get('timestamp'), + size=data.get('size'), is_dir=data['is_dir'], ) diff --git a/custom_components/anycubic_cloud/anycubic_cloud_api/anycubic_data_model_printer.py b/custom_components/anycubic_cloud/anycubic_cloud_api/anycubic_data_model_printer.py index 576a03e..33b3556 100644 --- a/custom_components/anycubic_cloud/anycubic_cloud_api/anycubic_data_model_printer.py +++ b/custom_components/anycubic_cloud/anycubic_cloud_api/anycubic_data_model_printer.py @@ -23,6 +23,7 @@ from .anycubic_enums import ( AnycubicFunctionID, + AnycubicPrinterMaterialType, AnycubicPrintStatus, ) @@ -112,7 +113,7 @@ def __init__( self._last_update_time = last_update_time self._set_machine_data(machine_data) self._set_type_function_ids(type_function_ids) - self._material_type = material_type + self._set_material_type(material_type) self._set_parameter(parameter) self._set_fw_version(fw_version) self._available = available @@ -151,6 +152,17 @@ def _set_type_function_ids(self, type_function_ids): else: self._type_function_ids = list() + def _set_material_type(self, material_type): + if material_type and isinstance(material_type, str): + try: + self._material_type = AnycubicPrinterMaterialType(material_type.title()) + + except ValueError: + self._material_type = material_type + + else: + self._material_type = None + def _set_local_file_list(self, file_list): if file_list is None: return @@ -413,7 +425,7 @@ def update_from_info_json(self, data): self._create_time = extra_data.get('create_time') self._set_machine_data(data.get('machine_data')) self._set_type_function_ids(data['type_function_ids']) - self._material_type = extra_data.get('material_type') + self._set_material_type(extra_data.get('material_type')) self._set_parameter(data.get('parameter')) self._update_fw_version_from_json(data['version']) self._set_tools(data.get('tools')) @@ -1600,6 +1612,69 @@ def latest_project_available_print_speed_modes_data_object(self): return None + @property + def latest_project_print_model_height(self): + if self.latest_project: + return self.latest_project.print_model_height + + return None + + @property + def latest_project_print_anti_alias_count(self): + if self.latest_project: + return self.latest_project.print_anti_alias_count + + return None + + @property + def latest_project_print_on_time(self): + if self.latest_project: + return self.latest_project.print_on_time + + return None + + @property + def latest_project_print_off_time(self): + if self.latest_project: + return self.latest_project.print_off_time + + return None + + @property + def latest_project_print_bottom_time(self): + if self.latest_project: + return self.latest_project.print_bottom_time + + return None + + @property + def latest_project_print_bottom_layers(self): + if self.latest_project: + return self.latest_project.print_bottom_layers + + return None + + @property + def latest_project_print_z_up_height(self): + if self.latest_project: + return self.latest_project.print_z_up_height + + return None + + @property + def latest_project_print_z_up_speed(self): + if self.latest_project: + return self.latest_project.print_z_up_speed + + return None + + @property + def latest_project_print_z_down_speed(self): + if self.latest_project: + return self.latest_project.print_z_down_speed + + return None + @property def curr_nozzle_temp(self): if self.parameter: @@ -1646,7 +1721,7 @@ async def update_info_from_api(self, with_project=True): await self._api_parent.printer_info_for_id(self._id, self) if with_project: - self._latest_project = await self._api_parent.get_latest_project() + self._latest_project = await self._api_parent.get_latest_project(self.id) async def request_local_file_list( self, diff --git a/custom_components/anycubic_cloud/anycubic_cloud_api/anycubic_data_model_project.py b/custom_components/anycubic_cloud/anycubic_cloud_api/anycubic_data_model_project.py index b29dcdf..58d61c4 100644 --- a/custom_components/anycubic_cloud/anycubic_cloud_api/anycubic_data_model_project.py +++ b/custom_components/anycubic_cloud/anycubic_cloud_api/anycubic_data_model_project.py @@ -10,6 +10,7 @@ ) from .anycubic_exceptions import ( + AnycubicDataParsingError, AnycubicInvalidValue, AnycubicPropertiesNotLoaded, ) @@ -112,13 +113,13 @@ def __init__( self._slice_start_time = int(slice_start_time) if slice_start_time is not None else None self._slice_end_time = int(slice_end_time) if slice_end_time is not None else None self._total_time = str(total_time) if total_time is not None else None - self._print_time = str(print_time) if print_time is not None else None + self._print_time = int(print_time) if print_time is not None else None self._slice_param = slice_param self._delete = int(delete) if delete is not None else None self._auto_operation = auto_operation self._monitor = monitor self._last_update_time = int(last_update_time) if last_update_time is not None else None - self._settings = settings + self._set_settings(settings) self._localtask = str(localtask) if localtask is not None else None self._source = str(source) if source is not None else None self._device_message = device_message @@ -156,11 +157,6 @@ def __init__( self._slice_param = json.loads(str(self._slice_param)) except Exception as e: print(f"Error in json parsing slice_param: {e}\n{self._slice_param}") - if self._settings and isinstance(self._settings, str): - try: - self._settings = json.loads(str(self._settings)) - except Exception as e: - print(f"Error in json parsing settings: {e}\n{self._settings}") if self._slice_result and isinstance(self._slice_result, str): try: self._slice_result = json.loads(str(self._slice_result)) @@ -363,16 +359,74 @@ def update_slice_param( ): self._slice_param = new_slice_param - def update_settings( + def _set_settings( self, new_settings, ): - self._settings = new_settings + self._settings = {} + + if new_settings and isinstance(new_settings, str): + try: + self._settings.update(json.loads(new_settings)) + except Exception as e: + raise AnycubicDataParsingError( + f"Error parsing project settings json: {e}\n{new_settings}" + ) + + elif new_settings and isinstance(new_settings, dict): + self._settings.update(new_settings) + + elif new_settings: + raise AnycubicDataParsingError( + f"Unexpected data for project settings: {new_settings}" + ) + + def _get_print_setting(self, key): + return self._settings.get(key) + + def _get_inner_print_setting(self, key): + return self._settings.get('settings', {}).get(key) + + def _get_print_setting_as_int(self, key): + val = self._get_print_setting(key) + + if val is not None: + return int(val) + + return None + + def _get_print_setting_as_float(self, key): + val = self._get_print_setting(key) + + if val is not None: + return float(val) + + return None + + def _get_inner_print_setting_as_int(self, key): + val = self._get_inner_print_setting(key) + + if val is not None: + return int(val) + + return None + + def _get_inner_print_setting_as_float(self, key): + val = self._get_inner_print_setting(key) + + if val is not None: + return float(val) + + return None @property def id(self): return self._id + @property + def printer_id(self): + return self._printer_id + @property def name(self): return self._gcode_name @@ -441,17 +495,47 @@ def print_is_paused(self): @property def print_current_layer(self): - if not self._settings: - return None - - return self._settings.get('curr_layer') + return self._get_print_setting_as_int('curr_layer') @property def print_total_layers(self): - if not self._settings: - return None + return self._get_print_setting_as_int('total_layers') + + @property + def print_model_height(self): + return self._get_print_setting_as_float('model_hight') - return self._settings.get('total_layers') + @property + def print_anti_alias_count(self): + return self._get_print_setting_as_int('anti_count') + + @property + def print_on_time(self): + return self._get_inner_print_setting_as_float('on_time') + + @property + def print_off_time(self): + return self._get_inner_print_setting_as_float('off_time') + + @property + def print_bottom_time(self): + return self._get_inner_print_setting_as_float('bottom_time') + + @property + def print_bottom_layers(self): + return self._get_inner_print_setting_as_int('bottom_layers') + + @property + def print_z_up_height(self): + return self._get_inner_print_setting_as_float('z_up_height') + + @property + def print_z_up_speed(self): + return self._get_inner_print_setting_as_int('z_up_speed') + + @property + def print_z_down_speed(self): + return self._get_inner_print_setting_as_int('z_down_speed') @property def print_status(self): @@ -641,7 +725,7 @@ def validate_new_print_settings( def __repr__(self): return ( - f"AnycubicProject(id={self._id}, name={self.name},\n " + f"AnycubicProject(id={self._id}, name={self.name}, printer_id={self.printer_id},\n " f"progress_percentage={self.progress_percentage}, print_time_elapsed_minutes={self.print_time_elapsed_minutes}, " f"print_time_remaining_minutes={self.print_time_remaining_minutes}, pause={self._pause}, progress={self._progress}, " f"create_time={self._create_time}, total_time={self._total_time},\n " diff --git a/custom_components/anycubic_cloud/anycubic_cloud_api/anycubic_enums.py b/custom_components/anycubic_cloud/anycubic_cloud_api/anycubic_enums.py index 9ec9b8b..0f23e47 100644 --- a/custom_components/anycubic_cloud/anycubic_cloud_api/anycubic_enums.py +++ b/custom_components/anycubic_cloud/anycubic_cloud_api/anycubic_enums.py @@ -1,4 +1,4 @@ -from enum import IntEnum +from enum import IntEnum, StrEnum class AnycubicFeedType(IntEnum): @@ -90,3 +90,8 @@ class AnycubicFunctionID(IntEnum): VIDEO_LIGHT = 40 BOX_LIGHT = 41 MULTI_COLOR_BOX = 2006 + + +class AnycubicPrinterMaterialType(StrEnum): + FILAMENT = "Filament" + RESIN = "Resin" diff --git a/custom_components/anycubic_cloud/anycubic_cloud_api/anycubic_exceptions.py b/custom_components/anycubic_cloud/anycubic_cloud_api/anycubic_exceptions.py index 3119cda..a4e5d5f 100644 --- a/custom_components/anycubic_cloud/anycubic_cloud_api/anycubic_exceptions.py +++ b/custom_components/anycubic_cloud/anycubic_cloud_api/anycubic_exceptions.py @@ -22,6 +22,10 @@ class AnycubicInvalidValue(AnycubicAPIError): pass +class AnycubicDataParsingError(AnycubicAPIError): + pass + + class AnycubicErrorMessage: no_printer_to_print = AnycubicAPIError('No printer to print with.') no_multi_color_box_for_map = AnycubicAPIError('No multi color box found for supplied box mapping.') diff --git a/custom_components/anycubic_cloud/coordinator.py b/custom_components/anycubic_cloud/coordinator.py index 1c863bc..ec0e382 100644 --- a/custom_components/anycubic_cloud/coordinator.py +++ b/custom_components/anycubic_cloud/coordinator.py @@ -251,6 +251,15 @@ def _build_printer_dict(self, printer) -> dict[str, Any]: "print_speed_pct": printer.latest_project_print_speed_pct, "print_z_thick": printer.latest_project_z_thick, "fan_speed_pct": printer.latest_project_fan_speed_pct, + "print_model_height": printer.latest_project_print_model_height, + "print_anti_alias_count": printer.latest_project_print_anti_alias_count, + "print_on_time": printer.latest_project_print_on_time, + "print_off_time": printer.latest_project_print_off_time, + "print_bottom_time": printer.latest_project_print_bottom_time, + "print_bottom_layers": printer.latest_project_print_bottom_layers, + "print_z_up_height": printer.latest_project_print_z_up_height, + "print_z_up_speed": printer.latest_project_print_z_up_speed, + "print_z_down_speed": printer.latest_project_print_z_down_speed, "raw_print_status": printer.latest_project_raw_print_status, "manual_mqtt_connection_enabled": self._mqtt_manually_connected, "mqtt_connection_active": self._anycubic_api.mqtt_is_started, @@ -287,6 +296,7 @@ def _build_printer_dict(self, printer) -> dict[str, Any]: "model": printer.model, "machine_type": printer.machine_type, "supported_functions": printer.supported_function_strings, + "material_type": printer.material_type, }, "fw_version": { "latest_version": printer.fw_version.available_version, @@ -345,6 +355,9 @@ async def _async_update_data(self) -> dict[str, Any]: async def _async_force_data_refresh(self): self.async_set_updated_data(self._build_coordinator_data()) + async def _async_print_job_started(self): + await self.force_state_update() + @callback def _mqtt_callback_data_updated(self): self.hass.create_task( @@ -352,6 +365,15 @@ def _mqtt_callback_data_updated(self): f"Anycubic coordinator {self.entry.entry_id} data refresh", ) + @callback + def _mqtt_callback_print_job_started( + self, + ): + self.hass.create_task( + self._async_print_job_started(), + f"Anycubic coordinator {self.entry.entry_id} print job started", + ) + def _anycubic_mqtt_connection_should_start(self): return ( @@ -445,7 +467,8 @@ async def _setup_anycubic_api_connection(self, start_up: bool = False): session=websession, cookie_jar=cookie_jar, debug_logger=LOGGER, - mqtt_callback_printer_update=self._mqtt_callback_data_updated + mqtt_callback_printer_update=self._mqtt_callback_data_updated, + mqtt_callback_printer_busy=self._mqtt_callback_print_job_started, ) self._anycubic_api.set_mqtt_log_all_messages(self.entry.options.get(CONF_DEBUG)) diff --git a/custom_components/anycubic_cloud/diagnostics.py b/custom_components/anycubic_cloud/diagnostics.py index 66b1747..7672b19 100644 --- a/custom_components/anycubic_cloud/diagnostics.py +++ b/custom_components/anycubic_cloud/diagnostics.py @@ -24,16 +24,15 @@ "ip_city", "create_time", "create_day_time", - "id", "last_login_time", } PRINTER_TO_REDACT = { - "id", - "user_id", - "key", "machine_mac", } PROJECT_TO_REDACT = { +} + +TO_TAGGED_REDACT = { "id", "taskid", "user_id", @@ -43,6 +42,45 @@ } +class TaggedRedacter: + def __init__(self): + self.redacted_values = dict() + + def _get_redacted_name(self, value): + if value not in self.redacted_values: + num = len(self.redacted_values) + 1 + self.redacted_values[value] = f"**REDACTED_{num}**" + + return self.redacted_values[value] + + def redact_data( + self, + data, + to_redact, + ): + if not isinstance(data, (dict, list)): + return data + + if isinstance(data, list): + return list([self.redact_data(val, to_redact) for val in data]) + + redacted = {**data} + + for key, value in redacted.items(): + if value is None: + continue + if isinstance(value, str) and not value: + continue + if key in to_redact: + redacted[key] = self._get_redacted_name(value) + elif isinstance(value, dict): + redacted[key] = self.redact_data(value, to_redact) + elif isinstance(value, list): + redacted[key] = list([self.redact_data(item, to_redact) for item in value]) + + return redacted + + async def async_get_config_entry_diagnostics( hass: HomeAssistant, entry: ConfigEntry ) -> dict[str, Any]: @@ -51,10 +89,19 @@ async def async_get_config_entry_diagnostics( COORDINATOR ] + tRedacter = TaggedRedacter() + assert coordinator.anycubic_api user_info = await coordinator.anycubic_api.get_user_info(raw_data=True) printer_info = await coordinator.anycubic_api.list_my_printers(raw_data=True) projects_info = await coordinator.anycubic_api.list_all_projects(raw_data=True) + latest_project_info = {} + + if projects_info['data'] and len(projects_info['data']) > 0: + latest_project_info = await coordinator.anycubic_api.project_info_for_id( + project_id=projects_info['data'][0]['id'], + ) + detailed_printer_info = list() if printer_info.get('data') is not None: for printer in printer_info['data']: @@ -66,14 +113,32 @@ async def async_get_config_entry_diagnostics( ) ) return { - "user_info": async_redact_data(user_info, USER_TO_REDACT), + "user_info": tRedacter.redact_data( + async_redact_data(user_info, USER_TO_REDACT), + TO_TAGGED_REDACT + ), "printer_info": { **printer_info, - 'data': async_redact_data(printer_info['data'], PRINTER_TO_REDACT), + 'data': tRedacter.redact_data( + async_redact_data(printer_info['data'], PRINTER_TO_REDACT), + TO_TAGGED_REDACT + ), }, "projects_info": { **projects_info, - 'data': [async_redact_data(x, PROJECT_TO_REDACT) for x in projects_info['data']], + 'data': [ + tRedacter.redact_data( + async_redact_data(x, PROJECT_TO_REDACT), + TO_TAGGED_REDACT + ) for x in projects_info['data'] + ], }, - "detailed_printer_info": async_redact_data(detailed_printer_info, PRINTER_TO_REDACT), + "detailed_printer_info": tRedacter.redact_data( + async_redact_data(detailed_printer_info, PRINTER_TO_REDACT), + TO_TAGGED_REDACT + ), + "latest_project_info": tRedacter.redact_data( + async_redact_data(latest_project_info, PROJECT_TO_REDACT), + TO_TAGGED_REDACT + ), } diff --git a/custom_components/anycubic_cloud/frontend_panel/dist/anycubic-card.js b/custom_components/anycubic_cloud/frontend_panel/dist/anycubic-card.js index c1a0c30..e73a7e0 100644 --- a/custom_components/anycubic_cloud/frontend_panel/dist/anycubic-card.js +++ b/custom_components/anycubic_cloud/frontend_panel/dist/anycubic-card.js @@ -124,13 +124,13 @@ return i; } }, - C = (t, e) => !m(t, e), - $ = { + $ = (t, e) => !m(t, e), + C = { attribute: !0, type: String, converter: A, reflect: !1, - hasChanged: C + hasChanged: $ }; Symbol.metadata ??= Symbol("metadata"), v.litPropertyMetadata ??= new WeakMap(); class P extends HTMLElement { @@ -140,7 +140,7 @@ static get observedAttributes() { return this.finalize(), this._$Eh && [...this._$Eh.keys()]; } - static createProperty(t, e = $) { + static createProperty(t, e = C) { if (e.state && (e.attribute = !1), this._$Ei(), this.elementProperties.set(t, e), !e.noAccessor) { const i = Symbol(), r = this.getPropertyDescriptor(t, i, e); @@ -172,7 +172,7 @@ }; } static getPropertyOptions(t) { - return this.elementProperties.get(t) ?? $; + return this.elementProperties.get(t) ?? C; } static _$Ei() { if (this.hasOwnProperty(S("elementProperties"))) return; @@ -269,7 +269,7 @@ } requestUpdate(t, e, i) { if (void 0 !== t) { - if (i ??= this.constructor.getPropertyOptions(t), !(i.hasChanged ?? C)(this[t], e)) return; + if (i ??= this.constructor.getPropertyOptions(t), !(i.hasChanged ?? $)(this[t], e)) return; this.P(t, e, i); } !1 === this.isUpdatePending && (this._$ES = this._$ET()); @@ -346,12 +346,12 @@ M = T ? T.createPolicy("lit-html", { createHTML: t => t }) : void 0, - H = "$lit$", - D = `lit$${Math.random().toFixed(9).slice(2)}$`, - O = "?" + D, + D = "$lit$", + H = `lit$${Math.random().toFixed(9).slice(2)}$`, + O = "?" + H, I = `<${O}>`, - N = document, - F = () => N.createComment(""), + F = document, + N = () => F.createComment(""), B = t => null === t || "object" != typeof t && "function" != typeof t, L = Array.isArray, U = t => L(t) || "function" == typeof t?.[Symbol.iterator], @@ -362,8 +362,8 @@ G = RegExp(`>|${R}(?:([^\\s"'>=/]+)(${R}*=${R}*(?:[^ \t\n\f\r"'\`<>=]|("|')|))|$)`, "g"), V = /'/g, W = /"/g, - X = /^(?:script|style|textarea|title)$/i, - Z = (t => (e, ...i) => ({ + Z = /^(?:script|style|textarea|title)$/i, + X = (t => (e, ...i) => ({ _$litType$: t, strings: e, values: i @@ -371,7 +371,7 @@ K = Symbol.for("lit-noChange"), q = Symbol.for("lit-nothing"), J = new WeakMap(), - Q = N.createTreeWalker(N, 129); + Q = F.createTreeWalker(F, 129); function tt(t, e) { if (!Array.isArray(t) || !t.hasOwnProperty("raw")) throw Error("invalid template strings array"); return void 0 !== M ? M.createHTML(e) : e; @@ -388,9 +388,9 @@ h, l = -1, c = 0; - for (; c < i.length && (o.lastIndex = c, h = o.exec(i), null !== h);) c = o.lastIndex, o === Y ? "!--" === h[1] ? o = z : void 0 !== h[1] ? o = j : void 0 !== h[2] ? (X.test(h[2]) && (s = RegExp("" + h[2], "g")), o = G) : void 0 !== h[3] && (o = G) : o === G ? ">" === h[0] ? (o = s ?? Y, l = -1) : void 0 === h[1] ? l = -2 : (l = o.lastIndex - h[2].length, a = h[1], o = void 0 === h[3] ? G : '"' === h[3] ? W : V) : o === W || o === V ? o = G : o === z || o === j ? o = Y : (o = G, s = void 0); + for (; c < i.length && (o.lastIndex = c, h = o.exec(i), null !== h);) c = o.lastIndex, o === Y ? "!--" === h[1] ? o = z : void 0 !== h[1] ? o = j : void 0 !== h[2] ? (Z.test(h[2]) && (s = RegExp("" + h[2], "g")), o = G) : void 0 !== h[3] && (o = G) : o === G ? ">" === h[0] ? (o = s ?? Y, l = -1) : void 0 === h[1] ? l = -2 : (l = o.lastIndex - h[2].length, a = h[1], o = void 0 === h[3] ? G : '"' === h[3] ? W : V) : o === W || o === V ? o = G : o === z || o === j ? o = Y : (o = G, s = void 0); const d = o === G && t[e + 1].startsWith("/>") ? " " : ""; - n += o === Y ? i + I : l >= 0 ? (r.push(a), i.slice(0, l) + H + i.slice(l) + D + d) : i + D + (-2 === l ? e : d); + n += o === Y ? i + I : l >= 0 ? (r.push(a), i.slice(0, l) + D + i.slice(l) + H + d) : i + H + (-2 === l ? e : d); } return [tt(t, n + (t[i] || ">") + (2 === e ? "" : "")), r]; }; @@ -412,9 +412,9 @@ } for (; null !== (r = Q.nextNode()) && a.length < o;) { if (1 === r.nodeType) { - if (r.hasAttributes()) for (const t of r.getAttributeNames()) if (t.endsWith(H)) { + if (r.hasAttributes()) for (const t of r.getAttributeNames()) if (t.endsWith(D)) { const e = l[n++], - i = r.getAttribute(t).split(D), + i = r.getAttribute(t).split(H), o = /([.?@])?(.*)/.exec(e); a.push({ type: 1, @@ -423,20 +423,20 @@ strings: i, ctor: "." === o[1] ? at : "?" === o[1] ? ht : "@" === o[1] ? lt : ot }), r.removeAttribute(t); - } else t.startsWith(D) && (a.push({ + } else t.startsWith(H) && (a.push({ type: 6, index: s }), r.removeAttribute(t)); - if (X.test(r.tagName)) { - const t = r.textContent.split(D), + if (Z.test(r.tagName)) { + const t = r.textContent.split(H), e = t.length - 1; if (e > 0) { r.textContent = T ? T.emptyScript : ""; - for (let i = 0; i < e; i++) r.append(t[i], F()), Q.nextNode(), a.push({ + for (let i = 0; i < e; i++) r.append(t[i], N()), Q.nextNode(), a.push({ type: 2, index: ++s }); - r.append(t[e], F()); + r.append(t[e], N()); } } } else if (8 === r.nodeType) if (r.data === O) a.push({ @@ -444,16 +444,16 @@ index: s });else { let t = -1; - for (; -1 !== (t = r.data.indexOf(D, t + 1));) a.push({ + for (; -1 !== (t = r.data.indexOf(H, t + 1));) a.push({ type: 7, index: s - }), t += D.length - 1; + }), t += H.length - 1; } s++; } } static createElement(t, e) { - const i = N.createElement("template"); + const i = F.createElement("template"); return i.innerHTML = t, i; } } @@ -480,7 +480,7 @@ }, parts: i } = this._$AD, - r = (t?.creationScope ?? N).importNode(e, !0); + r = (t?.creationScope ?? F).importNode(e, !0); Q.currentNode = r; let s = Q.nextNode(), n = 0, @@ -493,7 +493,7 @@ } n !== a?.index && (s = Q.nextNode(), n++); } - return Q.currentNode = N, r; + return Q.currentNode = F, r; } p(t) { let e = 0; @@ -528,7 +528,7 @@ this._$AH !== t && (this._$AR(), this._$AH = this.S(t)); } _(t) { - this._$AH !== q && B(this._$AH) ? this._$AA.nextSibling.data = t : this.T(N.createTextNode(t)), this._$AH = t; + this._$AH !== q && B(this._$AH) ? this._$AA.nextSibling.data = t : this.T(F.createTextNode(t)), this._$AH = t; } $(t) { const { @@ -551,7 +551,7 @@ const e = this._$AH; let i, r = 0; - for (const s of t) r === e.length ? e.push(i = new nt(this.S(F()), this.S(F()), this, this.options)) : i = e[r], i._$AI(s), r++; + for (const s of t) r === e.length ? e.push(i = new nt(this.S(N()), this.S(N()), this, this.options)) : i = e[r], i._$AI(s), r++; r < e.length && (this._$AR(i && i._$AB.nextSibling, r), e.length = r); } _$AR(t = this._$AA.nextSibling, e) { @@ -631,8 +631,8 @@ } } const dt = { - P: H, - A: D, + P: D, + A: H, C: O, M: 1, L: et, @@ -670,7 +670,7 @@ let s = r._$litPart$; if (void 0 === s) { const t = i?.renderBefore ?? null; - r._$litPart$ = s = new nt(e.insertBefore(F(), t), t, void 0, i ?? {}); + r._$litPart$ = s = new nt(e.insertBefore(N(), t), t, void 0, i ?? {}); } return s._$AI(t), s; })(e, this.renderRoot, this.renderOptions); @@ -712,7 +712,7 @@ type: String, converter: A, reflect: !1, - hasChanged: C + hasChanged: $ }, yt = (t = ft, e, i) => { const { @@ -864,7 +864,7 @@ return o(e, "toString") && (t.toString = e.toString), o(e, "valueOf") && (t.valueOf = e.valueOf), t; } function p(t, e, i, r) { - return Xi(t, e, i, r, !0).utc(); + return Zi(t, e, i, r, !0).utc(); } function m() { return { @@ -949,9 +949,9 @@ }, e); } var A, - C = {}; - function $(t, e) { - null != i.deprecationHandler && i.deprecationHandler(t, e), C[t] || (E(e), C[t] = !0); + $ = {}; + function C(t, e) { + null != i.deprecationHandler && i.deprecationHandler(t, e), $[t] || (E(e), $[t] = !0); } function P(t) { return "undefined" != typeof Function && t instanceof Function || "[object Function]" === Object.prototype.toString.call(t); @@ -977,7 +977,7 @@ for (e in t) o(t, e) && i.push(e); return i; }; - var H = { + var D = { sameDay: "[Today at] LT", nextDay: "[Tomorrow at] LT", nextWeek: "dddd [at] LT", @@ -985,7 +985,7 @@ lastWeek: "[Last] dddd [at] LT", sameElse: "L" }; - function D(t, e, i) { + function H(t, e, i) { var r = this._calendar[t] || this._calendar.sameElse; return P(r) ? r.call(e, i) : r; } @@ -995,8 +995,8 @@ return (t >= 0 ? i ? "+" : "" : "-") + Math.pow(10, Math.max(0, s)).toString().substr(1) + r; } var I = /(\[[^\[]*\])|(\\)?([Hh]mm(ss)?|Mo|MM?M?M?|Do|DDDo|DD?D?D?|ddd?d?|do?|w[o|w]?|W[o|W]?|Qo?|N{1,5}|YYYYYY|YYYYY|YYYY|YY|y{2,4}|yo?|gg(ggg?)?|GG(GGG?)?|e|E|a|A|hh?|HH?|kk?|mm?|ss?|S{1,9}|x|X|zz?|ZZ?|.)/g, - N = /(\[[^\[]*\])|(\\)?(LTS|LT|LL?L?L?|l{1,4})/g, - F = {}, + F = /(\[[^\[]*\])|(\\)?(LTS|LT|LL?L?L?|l{1,4})/g, + N = {}, B = {}; function L(t, e, i, r) { var s = r; @@ -1024,14 +1024,14 @@ }; } function Y(t, e) { - return t.isValid() ? (e = z(e, t.localeData()), F[e] = F[e] || R(e), F[e](t)) : t.localeData().invalidDate(); + return t.isValid() ? (e = z(e, t.localeData()), N[e] = N[e] || R(e), N[e](t)) : t.localeData().invalidDate(); } function z(t, e) { var i = 5; function r(t) { return e.longDateFormat(t) || t; } - for (N.lastIndex = 0; i >= 0 && N.test(t);) t = t.replace(N, r), N.lastIndex = 0, i -= 1; + for (F.lastIndex = 0; i >= 0 && F.test(t);) t = t.replace(F, r), F.lastIndex = 0, i -= 1; return t; } var j = { @@ -1053,8 +1053,8 @@ function W() { return this._invalidDate; } - var X = "%d", - Z = /\d{1,2}/; + var Z = "%d", + X = /\d{1,2}/; function K(t) { return this._ordinal.replace("%d", t); } @@ -1192,8 +1192,8 @@ xt = /[+-]?\d+(\.\d{1,3})?/, wt = /[0-9]{0,256}['a-z\u00A0-\u05FF\u0700-\uD7FF\uF900-\uFDCF\uFDF0-\uFF07\uFF10-\uFFEF]{1,256}|[\u0600-\u06FF\/]{1,256}(\s*?[\u0600-\u06FF]{1,256}){1,2}/i, At = /^[1-9]\d?/, - Ct = /^([1-9]\d|\d)/; - function $t(t, e, i) { + $t = /^([1-9]\d|\d)/; + function Ct(t, e, i) { nt[t] = P(e) ? e : function (t, r) { return t && i ? i : e; }; @@ -1212,30 +1212,30 @@ function Mt(t) { return t < 0 ? Math.ceil(t) || 0 : Math.floor(t); } - function Ht(t) { + function Dt(t) { var e = +t, i = 0; return 0 !== e && isFinite(e) && (i = Mt(e)), i; } nt = {}; - var Dt = {}; + var Ht = {}; function Ot(t, e) { var i, r, s = e; for ("string" == typeof t && (t = [t]), l(e) && (s = function (t, i) { - i[e] = Ht(t); - }), r = t.length, i = 0; i < r; i++) Dt[t[i]] = s; + i[e] = Dt(t); + }), r = t.length, i = 0; i < r; i++) Ht[t[i]] = s; } function It(t, e) { Ot(t, function (t, i, r, s) { r._w = r._w || {}, e(t, r._w, r, s); }); } - function Nt(t, e, i) { - null != e && o(Dt, t) && Dt[t](e, i._a, i, t); + function Ft(t, e, i) { + null != e && o(Ht, t) && Ht[t](e, i._a, i, t); } - function Ft(t) { + function Nt(t) { return t % 4 == 0 && t % 100 != 0 || t % 400 == 0; } var Bt = 0, @@ -1248,26 +1248,26 @@ Gt = 7, Vt = 8; function Wt(t) { - return Ft(t) ? 366 : 365; + return Nt(t) ? 366 : 365; } L("Y", 0, 0, function () { var t = this.year(); return t <= 9999 ? O(t, 4) : "+" + t; }), L(0, ["YY", 2], 0, function () { return this.year() % 100; - }), L(0, ["YYYY", 4], 0, "year"), L(0, ["YYYYY", 5], 0, "year"), L(0, ["YYYYYY", 6, !0], 0, "year"), $t("Y", bt), $t("YY", dt, at), $t("YYYY", gt, lt), $t("YYYYY", ft, ct), $t("YYYYYY", ft, ct), Ot(["YYYYY", "YYYYYY"], Bt), Ot("YYYY", function (t, e) { - e[Bt] = 2 === t.length ? i.parseTwoDigitYear(t) : Ht(t); + }), L(0, ["YYYY", 4], 0, "year"), L(0, ["YYYYY", 5], 0, "year"), L(0, ["YYYYYY", 6, !0], 0, "year"), Ct("Y", bt), Ct("YY", dt, at), Ct("YYYY", gt, lt), Ct("YYYYY", ft, ct), Ct("YYYYYY", ft, ct), Ot(["YYYYY", "YYYYYY"], Bt), Ot("YYYY", function (t, e) { + e[Bt] = 2 === t.length ? i.parseTwoDigitYear(t) : Dt(t); }), Ot("YY", function (t, e) { e[Bt] = i.parseTwoDigitYear(t); }), Ot("Y", function (t, e) { e[Bt] = parseInt(t, 10); }), i.parseTwoDigitYear = function (t) { - return Ht(t) + (Ht(t) > 68 ? 1900 : 2e3); + return Dt(t) + (Dt(t) > 68 ? 1900 : 2e3); }; - var Xt, - Zt = qt("FullYear", !0); + var Zt, + Xt = qt("FullYear", !0); function Kt() { - return Ft(this.year()); + return Nt(this.year()); } function qt(t, e) { return function (r) { @@ -1318,7 +1318,7 @@ default: return; } - n = i, o = t.month(), a = 29 !== (a = t.date()) || 1 !== o || Ft(n) ? a : 28, s ? r.setUTCFullYear(n, o, a) : r.setFullYear(n, o, a); + n = i, o = t.month(), a = 29 !== (a = t.date()) || 1 !== o || Nt(n) ? a : 28, s ? r.setUTCFullYear(n, o, a) : r.setFullYear(n, o, a); } } function te(t) { @@ -1339,9 +1339,9 @@ function re(t, e) { if (isNaN(t) || isNaN(e)) return NaN; var i = ie(e, 12); - return t += (e - i) / 12, 1 === i ? Ft(t) ? 29 : 28 : 31 - i % 7 % 2; + return t += (e - i) / 12, 1 === i ? Nt(t) ? 29 : 28 : 31 - i % 7 % 2; } - Xt = Array.prototype.indexOf ? Array.prototype.indexOf : function (t) { + Zt = Array.prototype.indexOf ? Array.prototype.indexOf : function (t) { var e; for (e = 0; e < this.length; ++e) if (this[e] === t) return e; return -1; @@ -1351,12 +1351,12 @@ return this.localeData().monthsShort(this, t); }), L("MMMM", 0, 0, function (t) { return this.localeData().months(this, t); - }), $t("M", dt, At), $t("MM", dt, at), $t("MMM", function (t, e) { + }), Ct("M", dt, At), Ct("MM", dt, at), Ct("MMM", function (t, e) { return e.monthsShortRegex(t); - }), $t("MMMM", function (t, e) { + }), Ct("MMMM", function (t, e) { return e.monthsRegex(t); }), Ot(["M", "MM"], function (t, e) { - e[Lt] = Ht(t) - 1; + e[Lt] = Dt(t) - 1; }), Ot(["MMM", "MMMM"], function (t, e, i, r) { var s = i._locale.monthsParse(t, r, i._strict); null != s ? e[Lt] = s : g(i).invalidMonth = t; @@ -1378,7 +1378,7 @@ n, o = t.toLocaleLowerCase(); if (!this._monthsParse) for (this._monthsParse = [], this._longMonthsParse = [], this._shortMonthsParse = [], r = 0; r < 12; ++r) n = p([2e3, r]), this._shortMonthsParse[r] = this.monthsShort(n, "").toLocaleLowerCase(), this._longMonthsParse[r] = this.months(n, "").toLocaleLowerCase(); - return i ? "MMM" === e ? -1 !== (s = Xt.call(this._shortMonthsParse, o)) ? s : null : -1 !== (s = Xt.call(this._longMonthsParse, o)) ? s : null : "MMM" === e ? -1 !== (s = Xt.call(this._shortMonthsParse, o)) || -1 !== (s = Xt.call(this._longMonthsParse, o)) ? s : null : -1 !== (s = Xt.call(this._longMonthsParse, o)) || -1 !== (s = Xt.call(this._shortMonthsParse, o)) ? s : null; + return i ? "MMM" === e ? -1 !== (s = Zt.call(this._shortMonthsParse, o)) ? s : null : -1 !== (s = Zt.call(this._longMonthsParse, o)) ? s : null : "MMM" === e ? -1 !== (s = Zt.call(this._shortMonthsParse, o)) || -1 !== (s = Zt.call(this._longMonthsParse, o)) ? s : null : -1 !== (s = Zt.call(this._longMonthsParse, o)) || -1 !== (s = Zt.call(this._shortMonthsParse, o)) ? s : null; } function ue(t, e, i) { var r, s, n; @@ -1391,7 +1391,7 @@ } function pe(t, e) { if (!t.isValid()) return t; - if ("string" == typeof e) if (/^\d+$/.test(e)) e = Ht(e);else if (!l(e = t.localeData().monthsParse(e))) return t; + if ("string" == typeof e) if (/^\d+$/.test(e)) e = Dt(e);else if (!l(e = t.localeData().monthsParse(e))) return t; var i = e, r = t.date(); return r = r < 29 ? r : Math.min(r, re(t.year(), i)), t._isUTC ? t._d.setUTCMonth(i, r) : t._d.setMonth(i, r), t; @@ -1461,14 +1461,14 @@ function Ae(t) { return Ee(t, this._week.dow, this._week.doy).week; } - L("w", ["ww", 2], "wo", "week"), L("W", ["WW", 2], "Wo", "isoWeek"), $t("w", dt, At), $t("ww", dt, at), $t("W", dt, At), $t("WW", dt, at), It(["w", "ww", "W", "WW"], function (t, e, i, r) { - e[r.substr(0, 1)] = Ht(t); + L("w", ["ww", 2], "wo", "week"), L("W", ["WW", 2], "Wo", "isoWeek"), Ct("w", dt, At), Ct("ww", dt, at), Ct("W", dt, At), Ct("WW", dt, at), It(["w", "ww", "W", "WW"], function (t, e, i, r) { + e[r.substr(0, 1)] = Dt(t); }); - var Ce = { + var $e = { dow: 0, doy: 6 }; - function $e() { + function Ce() { return this._week.dow; } function Pe() { @@ -1485,10 +1485,10 @@ function Me(t, e) { return "string" != typeof t ? t : isNaN(t) ? "number" == typeof (t = e.weekdaysParse(t)) ? t : null : parseInt(t, 10); } - function He(t, e) { + function De(t, e) { return "string" == typeof t ? e.weekdaysParse(t) % 7 || 7 : isNaN(t) ? null : t; } - function De(t, e) { + function He(t, e) { return t.slice(e, 7).concat(t.slice(0, e)); } L("d", 0, "do", "day"), L("dd", 0, 0, function (t) { @@ -1497,33 +1497,33 @@ return this.localeData().weekdaysShort(this, t); }), L("dddd", 0, 0, function (t) { return this.localeData().weekdays(this, t); - }), L("e", 0, 0, "weekday"), L("E", 0, 0, "isoWeekday"), $t("d", dt), $t("e", dt), $t("E", dt), $t("dd", function (t, e) { + }), L("e", 0, 0, "weekday"), L("E", 0, 0, "isoWeekday"), Ct("d", dt), Ct("e", dt), Ct("E", dt), Ct("dd", function (t, e) { return e.weekdaysMinRegex(t); - }), $t("ddd", function (t, e) { + }), Ct("ddd", function (t, e) { return e.weekdaysShortRegex(t); - }), $t("dddd", function (t, e) { + }), Ct("dddd", function (t, e) { return e.weekdaysRegex(t); }), It(["dd", "ddd", "dddd"], function (t, e, i, r) { var s = i._locale.weekdaysParse(t, r, i._strict); null != s ? e.d = s : g(i).invalidWeekday = t; }), It(["d", "e", "E"], function (t, e, i, r) { - e[r] = Ht(t); + e[r] = Dt(t); }); var Oe = "Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"), Ie = "Sun_Mon_Tue_Wed_Thu_Fri_Sat".split("_"), - Ne = "Su_Mo_Tu_We_Th_Fr_Sa".split("_"), - Fe = wt, + Fe = "Su_Mo_Tu_We_Th_Fr_Sa".split("_"), + Ne = wt, Be = wt, Le = wt; function Ue(t, e) { var i = s(this._weekdays) ? this._weekdays : this._weekdays[t && !0 !== t && this._weekdays.isFormat.test(e) ? "format" : "standalone"]; - return !0 === t ? De(i, this._week.dow) : t ? i[t.day()] : i; + return !0 === t ? He(i, this._week.dow) : t ? i[t.day()] : i; } function Re(t) { - return !0 === t ? De(this._weekdaysShort, this._week.dow) : t ? this._weekdaysShort[t.day()] : this._weekdaysShort; + return !0 === t ? He(this._weekdaysShort, this._week.dow) : t ? this._weekdaysShort[t.day()] : this._weekdaysShort; } function Ye(t) { - return !0 === t ? De(this._weekdaysMin, this._week.dow) : t ? this._weekdaysMin[t.day()] : this._weekdaysMin; + return !0 === t ? He(this._weekdaysMin, this._week.dow) : t ? this._weekdaysMin[t.day()] : this._weekdaysMin; } function ze(t, e, i) { var r, @@ -1531,7 +1531,7 @@ n, o = t.toLocaleLowerCase(); if (!this._weekdaysParse) for (this._weekdaysParse = [], this._shortWeekdaysParse = [], this._minWeekdaysParse = [], r = 0; r < 7; ++r) n = p([2e3, 1]).day(r), this._minWeekdaysParse[r] = this.weekdaysMin(n, "").toLocaleLowerCase(), this._shortWeekdaysParse[r] = this.weekdaysShort(n, "").toLocaleLowerCase(), this._weekdaysParse[r] = this.weekdays(n, "").toLocaleLowerCase(); - return i ? "dddd" === e ? -1 !== (s = Xt.call(this._weekdaysParse, o)) ? s : null : "ddd" === e ? -1 !== (s = Xt.call(this._shortWeekdaysParse, o)) ? s : null : -1 !== (s = Xt.call(this._minWeekdaysParse, o)) ? s : null : "dddd" === e ? -1 !== (s = Xt.call(this._weekdaysParse, o)) || -1 !== (s = Xt.call(this._shortWeekdaysParse, o)) || -1 !== (s = Xt.call(this._minWeekdaysParse, o)) ? s : null : "ddd" === e ? -1 !== (s = Xt.call(this._shortWeekdaysParse, o)) || -1 !== (s = Xt.call(this._weekdaysParse, o)) || -1 !== (s = Xt.call(this._minWeekdaysParse, o)) ? s : null : -1 !== (s = Xt.call(this._minWeekdaysParse, o)) || -1 !== (s = Xt.call(this._weekdaysParse, o)) || -1 !== (s = Xt.call(this._shortWeekdaysParse, o)) ? s : null; + return i ? "dddd" === e ? -1 !== (s = Zt.call(this._weekdaysParse, o)) ? s : null : "ddd" === e ? -1 !== (s = Zt.call(this._shortWeekdaysParse, o)) ? s : null : -1 !== (s = Zt.call(this._minWeekdaysParse, o)) ? s : null : "dddd" === e ? -1 !== (s = Zt.call(this._weekdaysParse, o)) || -1 !== (s = Zt.call(this._shortWeekdaysParse, o)) || -1 !== (s = Zt.call(this._minWeekdaysParse, o)) ? s : null : "ddd" === e ? -1 !== (s = Zt.call(this._shortWeekdaysParse, o)) || -1 !== (s = Zt.call(this._weekdaysParse, o)) || -1 !== (s = Zt.call(this._minWeekdaysParse, o)) ? s : null : -1 !== (s = Zt.call(this._minWeekdaysParse, o)) || -1 !== (s = Zt.call(this._weekdaysParse, o)) || -1 !== (s = Zt.call(this._shortWeekdaysParse, o)) ? s : null; } function je(t, e, i) { var r, s, n; @@ -1556,15 +1556,15 @@ function We(t) { if (!this.isValid()) return null != t ? this : NaN; if (null != t) { - var e = He(t, this.localeData()); + var e = De(t, this.localeData()); return this.day(this.day() % 7 ? e : e - 7); } return this.day() || 7; } - function Xe(t) { - return this._weekdaysParseExact ? (o(this, "_weekdaysRegex") || qe.call(this), t ? this._weekdaysStrictRegex : this._weekdaysRegex) : (o(this, "_weekdaysRegex") || (this._weekdaysRegex = Fe), this._weekdaysStrictRegex && t ? this._weekdaysStrictRegex : this._weekdaysRegex); - } function Ze(t) { + return this._weekdaysParseExact ? (o(this, "_weekdaysRegex") || qe.call(this), t ? this._weekdaysStrictRegex : this._weekdaysRegex) : (o(this, "_weekdaysRegex") || (this._weekdaysRegex = Ne), this._weekdaysStrictRegex && t ? this._weekdaysStrictRegex : this._weekdaysRegex); + } + function Xe(t) { return this._weekdaysParseExact ? (o(this, "_weekdaysRegex") || qe.call(this), t ? this._weekdaysShortStrictRegex : this._weekdaysShortRegex) : (o(this, "_weekdaysShortRegex") || (this._weekdaysShortRegex = Be), this._weekdaysShortStrictRegex && t ? this._weekdaysShortStrictRegex : this._weekdaysShortRegex); } function Ke(t) { @@ -1611,27 +1611,27 @@ return "" + this.hours() + O(this.minutes(), 2); }), L("Hmmss", 0, 0, function () { return "" + this.hours() + O(this.minutes(), 2) + O(this.seconds(), 2); - }), ti("a", !0), ti("A", !1), $t("a", ei), $t("A", ei), $t("H", dt, Ct), $t("h", dt, At), $t("k", dt, At), $t("HH", dt, at), $t("hh", dt, at), $t("kk", dt, at), $t("hmm", ut), $t("hmmss", pt), $t("Hmm", ut), $t("Hmmss", pt), Ot(["H", "HH"], Rt), Ot(["k", "kk"], function (t, e, i) { - var r = Ht(t); + }), ti("a", !0), ti("A", !1), Ct("a", ei), Ct("A", ei), Ct("H", dt, $t), Ct("h", dt, At), Ct("k", dt, At), Ct("HH", dt, at), Ct("hh", dt, at), Ct("kk", dt, at), Ct("hmm", ut), Ct("hmmss", pt), Ct("Hmm", ut), Ct("Hmmss", pt), Ot(["H", "HH"], Rt), Ot(["k", "kk"], function (t, e, i) { + var r = Dt(t); e[Rt] = 24 === r ? 0 : r; }), Ot(["a", "A"], function (t, e, i) { i._isPm = i._locale.isPM(t), i._meridiem = t; }), Ot(["h", "hh"], function (t, e, i) { - e[Rt] = Ht(t), g(i).bigHour = !0; + e[Rt] = Dt(t), g(i).bigHour = !0; }), Ot("hmm", function (t, e, i) { var r = t.length - 2; - e[Rt] = Ht(t.substr(0, r)), e[Yt] = Ht(t.substr(r)), g(i).bigHour = !0; + e[Rt] = Dt(t.substr(0, r)), e[Yt] = Dt(t.substr(r)), g(i).bigHour = !0; }), Ot("hmmss", function (t, e, i) { var r = t.length - 4, s = t.length - 2; - e[Rt] = Ht(t.substr(0, r)), e[Yt] = Ht(t.substr(r, 2)), e[zt] = Ht(t.substr(s)), g(i).bigHour = !0; + e[Rt] = Dt(t.substr(0, r)), e[Yt] = Dt(t.substr(r, 2)), e[zt] = Dt(t.substr(s)), g(i).bigHour = !0; }), Ot("Hmm", function (t, e, i) { var r = t.length - 2; - e[Rt] = Ht(t.substr(0, r)), e[Yt] = Ht(t.substr(r)); + e[Rt] = Dt(t.substr(0, r)), e[Yt] = Dt(t.substr(r)); }), Ot("Hmmss", function (t, e, i) { var r = t.length - 4, s = t.length - 2; - e[Rt] = Ht(t.substr(0, r)), e[Yt] = Ht(t.substr(r, 2)), e[zt] = Ht(t.substr(s)); + e[Rt] = Dt(t.substr(0, r)), e[Yt] = Dt(t.substr(r, 2)), e[zt] = Dt(t.substr(s)); }); var ri = /[ap]\.?m?\.?/i, si = qt("Hours", !0); @@ -1640,17 +1640,17 @@ } var oi, ai = { - calendar: H, + calendar: D, longDateFormat: j, invalidDate: V, - ordinal: X, - dayOfMonthOrdinalParse: Z, + ordinal: Z, + dayOfMonthOrdinalParse: X, relativeTime: q, months: se, monthsShort: ne, - week: Ce, + week: $e, weekdays: Oe, - weekdaysMin: Ne, + weekdaysMin: Fe, weekdaysShort: Ie, meridiemParse: ri }, @@ -1696,7 +1696,7 @@ if (null !== e) { var i, r = ai; - if (e.abbr = t, null != hi[t]) $("defineLocaleOverride", "use moment.updateLocale(localeName, config) to change an existing locale. moment.defineLocale(localeName, config) should only be used for creating a new locale See http://momentjs.com/guides/#/warnings/define-locale/ for more info."), r = hi[t]._config;else if (null != e.parentLocale) if (null != hi[e.parentLocale]) r = hi[e.parentLocale]._config;else { + if (e.abbr = t, null != hi[t]) C("defineLocaleOverride", "use moment.updateLocale(localeName, config) to change an existing locale. moment.defineLocale(localeName, config) should only be used for creating a new locale See http://momentjs.com/guides/#/warnings/define-locale/ for more info."), r = hi[t]._config;else if (null != e.parentLocale) if (null != hi[e.parentLocale]) r = hi[e.parentLocale]._config;else { if (null == (i = mi(e.parentLocale))) return li[e.parentLocale] || (li[e.parentLocale] = []), li[e.parentLocale].push({ name: t, config: e @@ -1740,8 +1740,8 @@ Ei = /Z|[+-]\d\d(?::?\d\d)?/, Si = [["YYYYYY-MM-DD", /[+-]\d{6}-\d\d-\d\d/], ["YYYY-MM-DD", /\d{4}-\d\d-\d\d/], ["GGGG-[W]WW-E", /\d{4}-W\d\d-\d/], ["GGGG-[W]WW", /\d{4}-W\d\d/, !1], ["YYYY-DDD", /\d{4}-\d{3}/], ["YYYY-MM", /\d{4}-\d\d/, !1], ["YYYYYYMMDD", /[+-]\d{10}/], ["YYYYMMDD", /\d{8}/], ["GGGG[W]WWE", /\d{4}W\d{3}/], ["GGGG[W]WW", /\d{4}W\d{2}/, !1], ["YYYYDDD", /\d{7}/], ["YYYYMM", /\d{6}/, !1], ["YYYY", /\d{4}/, !1]], Ai = [["HH:mm:ss.SSSS", /\d\d:\d\d:\d\d\.\d+/], ["HH:mm:ss,SSSS", /\d\d:\d\d:\d\d,\d+/], ["HH:mm:ss", /\d\d:\d\d:\d\d/], ["HH:mm", /\d\d:\d\d/], ["HHmmss.SSSS", /\d\d\d\d\d\d\.\d+/], ["HHmmss,SSSS", /\d\d\d\d\d\d,\d+/], ["HHmmss", /\d\d\d\d\d\d/], ["HHmm", /\d\d\d\d/], ["HH", /\d\d/]], - Ci = /^\/?Date\((-?\d+)/i, - $i = /^(?:(Mon|Tue|Wed|Thu|Fri|Sat|Sun),?\s)?(\d{1,2})\s(Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec)\s(\d{2,4})\s(\d\d):(\d\d)(?::(\d\d))?\s(?:(UT|GMT|[ECMP][SD]T)|([Zz])|([+-]\d{4}))$/, + $i = /^\/?Date\((-?\d+)/i, + Ci = /^(?:(Mon|Tue|Wed|Thu|Fri|Sat|Sun),?\s)?(\d{1,2})\s(Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec)\s(\d{2,4})\s(\d\d):(\d\d)(?::(\d\d))?\s(?:(UT|GMT|[ECMP][SD]T)|([Zz])|([+-]\d{4}))$/, Pi = { UT: 0, GMT: 0, @@ -1794,10 +1794,10 @@ var e = parseInt(t, 10); return e <= 49 ? 2e3 + e : e <= 999 ? 1900 + e : e; } - function Hi(t) { + function Di(t) { return t.replace(/\([^()]*\)|[\n\t]/g, " ").replace(/(\s\s+)/g, " ").replace(/^\s\s*/, "").replace(/\s\s*$/, ""); } - function Di(t, e, i) { + function Hi(t, e, i) { return !t || Ie.indexOf(t) === new Date(e[0], e[1], e[2]).getDay() || (g(i).weekdayMismatch = !0, i._isValid = !1, !1); } function Oi(t, e, i) { @@ -1809,17 +1809,17 @@ } function Ii(t) { var e, - i = $i.exec(Hi(t._i)); + i = Ci.exec(Di(t._i)); if (i) { - if (e = Ti(i[4], i[3], i[2], i[5], i[6], i[7]), !Di(i[1], e, t)) return; + if (e = Ti(i[4], i[3], i[2], i[5], i[6], i[7]), !Hi(i[1], e, t)) return; t._a = e, t._tzm = Oi(i[8], i[9], i[10]), t._d = ve.apply(null, t._a), t._d.setUTCMinutes(t._d.getUTCMinutes() - t._tzm), g(t).rfc2822 = !0; } else t._isValid = !1; } - function Ni(t) { - var e = Ci.exec(t._i); + function Fi(t) { + var e = $i.exec(t._i); null === e ? (ki(t), !1 === t._isValid && (delete t._isValid, Ii(t), !1 === t._isValid && (delete t._isValid, t._strict ? t._isValid = !1 : i.createFromInputFallback(t)))) : t._d = new Date(+e[1]); } - function Fi(t, e, i) { + function Ni(t, e, i) { return null != t ? t : null != e ? e : i; } function Bi(t) { @@ -1834,14 +1834,14 @@ n, o = []; if (!t._d) { - for (r = Bi(t), t._w && null == t._a[Ut] && null == t._a[Lt] && Ui(t), null != t._dayOfYear && (n = Fi(t._a[Bt], r[Bt]), (t._dayOfYear > Wt(n) || 0 === t._dayOfYear) && (g(t)._overflowDayOfYear = !0), i = ve(n, 0, t._dayOfYear), t._a[Lt] = i.getUTCMonth(), t._a[Ut] = i.getUTCDate()), e = 0; e < 3 && null == t._a[e]; ++e) t._a[e] = o[e] = r[e]; + for (r = Bi(t), t._w && null == t._a[Ut] && null == t._a[Lt] && Ui(t), null != t._dayOfYear && (n = Ni(t._a[Bt], r[Bt]), (t._dayOfYear > Wt(n) || 0 === t._dayOfYear) && (g(t)._overflowDayOfYear = !0), i = ve(n, 0, t._dayOfYear), t._a[Lt] = i.getUTCMonth(), t._a[Ut] = i.getUTCDate()), e = 0; e < 3 && null == t._a[e]; ++e) t._a[e] = o[e] = r[e]; for (; e < 7; e++) t._a[e] = o[e] = null == t._a[e] ? 2 === e ? 1 : 0 : t._a[e]; 24 === t._a[Rt] && 0 === t._a[Yt] && 0 === t._a[zt] && 0 === t._a[jt] && (t._nextDay = !0, t._a[Rt] = 0), t._d = (t._useUTC ? ve : _e).apply(null, o), s = t._useUTC ? t._d.getUTCDay() : t._d.getDay(), null != t._tzm && t._d.setUTCMinutes(t._d.getUTCMinutes() - t._tzm), t._nextDay && (t._a[Rt] = 24), t._w && void 0 !== t._w.d && t._w.d !== s && (g(t).weekdayMismatch = !0); } } function Ui(t) { var e, i, r, s, n, o, a, h, l; - null != (e = t._w).GG || null != e.W || null != e.E ? (n = 1, o = 4, i = Fi(e.GG, t._a[Bt], Ee(Zi(), 1, 4).year), r = Fi(e.W, 1), ((s = Fi(e.E, 1)) < 1 || s > 7) && (h = !0)) : (n = t._locale._week.dow, o = t._locale._week.doy, l = Ee(Zi(), n, o), i = Fi(e.gg, t._a[Bt], l.year), r = Fi(e.w, l.week), null != e.d ? ((s = e.d) < 0 || s > 6) && (h = !0) : null != e.e ? (s = e.e + n, (e.e < 0 || e.e > 6) && (h = !0)) : s = n), r < 1 || r > Se(i, n, o) ? g(t)._overflowWeeks = !0 : null != h ? g(t)._overflowWeekday = !0 : (a = we(i, r, s, n, o), t._a[Bt] = a.year, t._dayOfYear = a.dayOfYear); + null != (e = t._w).GG || null != e.W || null != e.E ? (n = 1, o = 4, i = Ni(e.GG, t._a[Bt], Ee(Xi(), 1, 4).year), r = Ni(e.W, 1), ((s = Ni(e.E, 1)) < 1 || s > 7) && (h = !0)) : (n = t._locale._week.dow, o = t._locale._week.doy, l = Ee(Xi(), n, o), i = Ni(e.gg, t._a[Bt], l.year), r = Ni(e.w, l.week), null != e.d ? ((s = e.d) < 0 || s > 6) && (h = !0) : null != e.e ? (s = e.e + n, (e.e < 0 || e.e > 6) && (h = !0)) : s = n), r < 1 || r > Se(i, n, o) ? g(t)._overflowWeeks = !0 : null != h ? g(t)._overflowWeekday = !0 : (a = we(i, r, s, n, o), t._a[Bt] = a.year, t._dayOfYear = a.dayOfYear); } function Ri(t) { if (t._f !== i.ISO_8601) { @@ -1857,7 +1857,7 @@ l = "" + t._i, c = l.length, d = 0; - for (h = (s = z(t._f, t._locale).match(I) || []).length, e = 0; e < h; e++) n = s[e], (r = (l.match(Pt(n, t)) || [])[0]) && ((o = l.substr(0, l.indexOf(r))).length > 0 && g(t).unusedInput.push(o), l = l.slice(l.indexOf(r) + r.length), d += r.length), B[n] ? (r ? g(t).empty = !1 : g(t).unusedTokens.push(n), Nt(n, r, t)) : t._strict && !r && g(t).unusedTokens.push(n); + for (h = (s = z(t._f, t._locale).match(I) || []).length, e = 0; e < h; e++) n = s[e], (r = (l.match(Pt(n, t)) || [])[0]) && ((o = l.substr(0, l.indexOf(r))).length > 0 && g(t).unusedInput.push(o), l = l.slice(l.indexOf(r) + r.length), d += r.length), B[n] ? (r ? g(t).empty = !1 : g(t).unusedTokens.push(n), Ft(n, r, t)) : t._strict && !r && g(t).unusedTokens.push(n); g(t).charsLeftOver = c - d, l.length > 0 && g(t).unusedInput.push(l), t._a[Rt] <= 12 && !0 === g(t).bigHour && t._a[Rt] > 0 && (g(t).bigHour = void 0), g(t).parsedDateParts = t._a.slice(0), g(t).meridiem = t._meridiem, t._a[Rt] = Yi(t._locale, t._a[Rt], t._meridiem), null !== (a = g(t).era) && (t._a[Bt] = t._locale.erasConvertYear(a, t._a[Bt])), Li(t), vi(t); } else Ii(t); } else ki(t); @@ -1901,31 +1901,31 @@ } function Wi(t) { var e = t._i; - h(e) ? t._d = new Date(i.now()) : c(e) ? t._d = new Date(e.valueOf()) : "string" == typeof e ? Ni(t) : s(e) ? (t._a = d(e.slice(0), function (t) { + h(e) ? t._d = new Date(i.now()) : c(e) ? t._d = new Date(e.valueOf()) : "string" == typeof e ? Fi(t) : s(e) ? (t._a = d(e.slice(0), function (t) { return parseInt(t, 10); }), Li(t)) : n(e) ? ji(t) : l(e) ? t._d = new Date(e) : i.createFromInputFallback(t); } - function Xi(t, e, i, r, o) { + function Zi(t, e, i, r, o) { var h = {}; return !0 !== e && !1 !== e || (r = e, e = void 0), !0 !== i && !1 !== i || (r = i, i = void 0), (n(t) && a(t) || s(t) && 0 === t.length) && (t = void 0), h._isAMomentObject = !0, h._useUTC = h._isUTC = o, h._l = i, h._i = t, h._f = e, h._strict = r, Gi(h); } - function Zi(t, e, i, r) { - return Xi(t, e, i, r, !1); + function Xi(t, e, i, r) { + return Zi(t, e, i, r, !1); } i.createFromInputFallback = S("value provided is not in a recognized RFC2822 or ISO format. moment construction falls back to js Date(), which is not reliable across all browsers and versions. Non RFC2822/ISO date formats are discouraged. Please refer to http://momentjs.com/guides/#/warnings/js-date/ for more info.", function (t) { t._d = new Date(t._i + (t._useUTC ? " UTC" : "")); }), i.ISO_8601 = function () {}, i.RFC_2822 = function () {}; var Ki = S("moment().min is deprecated, use moment.max instead. http://momentjs.com/guides/#/warnings/min-max/", function () { - var t = Zi.apply(null, arguments); + var t = Xi.apply(null, arguments); return this.isValid() && t.isValid() ? t < this ? this : t : y(); }), qi = S("moment().max is deprecated, use moment.min instead. http://momentjs.com/guides/#/warnings/min-max/", function () { - var t = Zi.apply(null, arguments); + var t = Xi.apply(null, arguments); return this.isValid() && t.isValid() ? t > this ? this : t : y(); }); function Ji(t, e) { var i, r; - if (1 === e.length && s(e[0]) && (e = e[0]), !e.length) return Zi(); + if (1 === e.length && s(e[0]) && (e = e[0]), !e.length) return Xi(); for (i = e[0], r = 1; r < e.length; ++r) e[r].isValid() && !e[r][t](i) || (i = e[r]); return i; } @@ -1944,10 +1944,10 @@ i, r = !1, s = ir.length; - for (e in t) if (o(t, e) && (-1 === Xt.call(ir, e) || null != t[e] && isNaN(t[e]))) return !1; + for (e in t) if (o(t, e) && (-1 === Zt.call(ir, e) || null != t[e] && isNaN(t[e]))) return !1; for (i = 0; i < s; ++i) if (t[ir[i]]) { if (r) return !1; - parseFloat(t[ir[i]]) !== Ht(t[ir[i]]) && (r = !0); + parseFloat(t[ir[i]]) !== Dt(t[ir[i]]) && (r = !0); } return !0; } @@ -1981,7 +1981,7 @@ s = Math.min(t.length, e.length), n = Math.abs(t.length - e.length), o = 0; - for (r = 0; r < s; r++) (i && t[r] !== e[r] || !i && Ht(t[r]) !== Ht(e[r])) && o++; + for (r = 0; r < s; r++) (i && t[r] !== e[r] || !i && Dt(t[r]) !== Dt(e[r])) && o++; return o + n; } function cr(t, e) { @@ -1991,7 +1991,7 @@ return t < 0 && (t = -t, i = "-"), i + O(~~(t / 60), 2) + e + O(~~t % 60, 2); }); } - cr("Z", ":"), cr("ZZ", ""), $t("Z", vt), $t("ZZ", vt), Ot(["Z", "ZZ"], function (t, e, i) { + cr("Z", ":"), cr("ZZ", ""), Ct("Z", vt), Ct("ZZ", vt), Ot(["Z", "ZZ"], function (t, e, i) { i._useUTC = !0, i._tzm = ur(vt, t); }); var dr = /([\+\-]|\d\d)/gi; @@ -1999,11 +1999,11 @@ var i, r, s = (e || "").match(t); - return null === s ? null : 0 === (r = 60 * (i = ((s[s.length - 1] || []) + "").match(dr) || ["-", 0, 0])[1] + Ht(i[2])) ? 0 : "+" === i[0] ? r : -r; + return null === s ? null : 0 === (r = 60 * (i = ((s[s.length - 1] || []) + "").match(dr) || ["-", 0, 0])[1] + Dt(i[2])) ? 0 : "+" === i[0] ? r : -r; } function pr(t, e) { var r, s; - return e._isUTC ? (r = e.clone(), s = (w(t) || c(t) ? t.valueOf() : Zi(t).valueOf()) - r.valueOf(), r._d.setTime(r._d.valueOf() + s), i.updateOffset(r, !1), r) : Zi(t).local(); + return e._isUTC ? (r = e.clone(), s = (w(t) || c(t) ? t.valueOf() : Xi(t).valueOf()) - r.valueOf(), r._d.setTime(r._d.valueOf() + s), i.updateOffset(r, !1), r) : Xi(t).local(); } function mr(t) { return -Math.round(t._d.getTimezoneOffset()); @@ -2016,7 +2016,7 @@ if ("string" == typeof t) { if (null === (t = ur(vt, t))) return this; } else Math.abs(t) < 16 && !r && (t *= 60); - return !this._isUTC && e && (s = mr(this)), this._offset = t, this._isUTC = !0, null != s && this.add(s, "m"), n !== t && (!e || this._changeInProgress ? Dr(this, Pr(t - n, "m"), 1, !1) : this._changeInProgress || (this._changeInProgress = !0, i.updateOffset(this, !0), this._changeInProgress = null)), this; + return !this._isUTC && e && (s = mr(this)), this._offset = t, this._isUTC = !0, null != s && this.add(s, "m"), n !== t && (!e || this._changeInProgress ? Hr(this, Pr(t - n, "m"), 1, !1) : this._changeInProgress || (this._changeInProgress = !0, i.updateOffset(this, !0), this._changeInProgress = null)), this; } return this._isUTC ? n : mr(this); } @@ -2037,7 +2037,7 @@ return this; } function vr(t) { - return !!this.isValid() && (t = t ? Zi(t).utcOffset() : 0, (this.utcOffset() - t) % 60 == 0); + return !!this.isValid() && (t = t ? Xi(t).utcOffset() : 0, (this.utcOffset() - t) % 60 == 0); } function xr() { return this.utcOffset() > this.clone().month(0).utcOffset() || this.utcOffset() > this.clone().month(5).utcOffset(); @@ -2046,7 +2046,7 @@ if (!h(this._isDSTShifted)) return this._isDSTShifted; var t, e = {}; - return v(e, this), (e = Vi(e))._a ? (t = e._isUTC ? p(e._a) : Zi(e._a), this._isDSTShifted = this.isValid() && lr(e._a, t.toArray()) > 0) : this._isDSTShifted = !1, this._isDSTShifted; + return v(e, this), (e = Vi(e))._a ? (t = e._isUTC ? p(e._a) : Xi(e._a), this._isDSTShifted = this.isValid() && lr(e._a, t.toArray()) > 0) : this._isDSTShifted = !1, this._isDSTShifted; } function Er() { return !!this.isValid() && !this._isUTC; @@ -2058,8 +2058,8 @@ return !!this.isValid() && this._isUTC && 0 === this._offset; } i.updateOffset = function () {}; - var Cr = /^(-|\+)?(?:(\d*)[. ])?(\d+):(\d+)(?::(\d+)(\.\d*)?)?$/, - $r = /^(-|\+)?P(?:([-+]?[0-9,.]*)Y)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)W)?(?:([-+]?[0-9,.]*)D)?(?:T(?:([-+]?[0-9,.]*)H)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)S)?)?$/; + var $r = /^(-|\+)?(?:(\d*)[. ])?(\d+):(\d+)(?::(\d+)(\.\d*)?)?$/, + Cr = /^(-|\+)?P(?:([-+]?[0-9,.]*)Y)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)W)?(?:([-+]?[0-9,.]*)D)?(?:T(?:([-+]?[0-9,.]*)H)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)S)?)?$/; function Pr(t, e) { var i, r, @@ -2070,14 +2070,14 @@ ms: t._milliseconds, d: t._days, M: t._months - } : l(t) || !isNaN(+t) ? (n = {}, e ? n[e] = +t : n.milliseconds = +t) : (a = Cr.exec(t)) ? (i = "-" === a[1] ? -1 : 1, n = { + } : l(t) || !isNaN(+t) ? (n = {}, e ? n[e] = +t : n.milliseconds = +t) : (a = $r.exec(t)) ? (i = "-" === a[1] ? -1 : 1, n = { y: 0, - d: Ht(a[Ut]) * i, - h: Ht(a[Rt]) * i, - m: Ht(a[Yt]) * i, - s: Ht(a[zt]) * i, - ms: Ht(hr(1e3 * a[jt])) * i - }) : (a = $r.exec(t)) ? (i = "-" === a[1] ? -1 : 1, n = { + d: Dt(a[Ut]) * i, + h: Dt(a[Rt]) * i, + m: Dt(a[Yt]) * i, + s: Dt(a[zt]) * i, + ms: Dt(hr(1e3 * a[jt])) * i + }) : (a = Cr.exec(t)) ? (i = "-" === a[1] ? -1 : 1, n = { y: kr(a[2], i), M: kr(a[3], i), w: kr(a[4], i), @@ -2085,7 +2085,7 @@ h: kr(a[6], i), m: kr(a[7], i), s: kr(a[8], i) - }) : null == n ? n = {} : "object" == typeof n && ("from" in n || "to" in n) && (s = Mr(Zi(n.from), Zi(n.to)), (n = {}).ms = s.milliseconds, n.M = s.months), r = new or(n), ar(t) && o(t, "_locale") && (r._locale = t._locale), ar(t) && o(t, "_isValid") && (r._isValid = t._isValid), r; + }) : null == n ? n = {} : "object" == typeof n && ("from" in n || "to" in n) && (s = Mr(Xi(n.from), Xi(n.to)), (n = {}).ms = s.milliseconds, n.M = s.months), r = new or(n), ar(t) && o(t, "_locale") && (r._locale = t._locale), ar(t) && o(t, "_isValid") && (r._isValid = t._isValid), r; } function kr(t, e) { var i = t && parseFloat(t.replace(",", ".")); @@ -2102,26 +2102,26 @@ months: 0 }; } - function Hr(t, e) { + function Dr(t, e) { return function (i, r) { var s; - return null === r || isNaN(+r) || ($(e, "moment()." + e + "(period, number) is deprecated. Please use moment()." + e + "(number, period). See http://momentjs.com/guides/#/warnings/add-inverted-param/ for more info."), s = i, i = r, r = s), Dr(this, Pr(i, r), t), this; + return null === r || isNaN(+r) || (C(e, "moment()." + e + "(period, number) is deprecated. Please use moment()." + e + "(number, period). See http://momentjs.com/guides/#/warnings/add-inverted-param/ for more info."), s = i, i = r, r = s), Hr(this, Pr(i, r), t), this; }; } - function Dr(t, e, r, s) { + function Hr(t, e, r, s) { var n = e._milliseconds, o = hr(e._days), a = hr(e._months); t.isValid() && (s = s ?? !0, a && pe(t, Jt(t, "Month") + a * r), o && Qt(t, "Date", Jt(t, "Date") + o * r), n && t._d.setTime(t._d.valueOf() + n * r), s && i.updateOffset(t, o || a)); } Pr.fn = or.prototype, Pr.invalid = nr; - var Or = Hr(1, "add"), - Ir = Hr(-1, "subtract"); - function Nr(t) { + var Or = Dr(1, "add"), + Ir = Dr(-1, "subtract"); + function Fr(t) { return "string" == typeof t || t instanceof String; } - function Fr(t) { - return w(t) || c(t) || Nr(t) || l(t) || Lr(t) || Br(t) || null == t; + function Nr(t) { + return w(t) || c(t) || Fr(t) || l(t) || Lr(t) || Br(t) || null == t; } function Br(t) { var e, @@ -2137,7 +2137,7 @@ var e = s(t), i = !1; return e && (i = 0 === t.filter(function (e) { - return !l(e) && Nr(t); + return !l(e) && Fr(t); }).length), e && i; } function Ur(t) { @@ -2154,38 +2154,38 @@ return i < -6 ? "sameElse" : i < -1 ? "lastWeek" : i < 0 ? "lastDay" : i < 1 ? "sameDay" : i < 2 ? "nextDay" : i < 7 ? "nextWeek" : "sameElse"; } function Yr(t, e) { - 1 === arguments.length && (arguments[0] ? Fr(arguments[0]) ? (t = arguments[0], e = void 0) : Ur(arguments[0]) && (e = arguments[0], t = void 0) : (t = void 0, e = void 0)); - var r = t || Zi(), + 1 === arguments.length && (arguments[0] ? Nr(arguments[0]) ? (t = arguments[0], e = void 0) : Ur(arguments[0]) && (e = arguments[0], t = void 0) : (t = void 0, e = void 0)); + var r = t || Xi(), s = pr(r, this).startOf("day"), n = i.calendarFormat(this, s) || "sameElse", o = e && (P(e[n]) ? e[n].call(this, r) : e[n]); - return this.format(o || this.localeData().calendar(n, this, Zi(r))); + return this.format(o || this.localeData().calendar(n, this, Xi(r))); } function zr() { return new x(this); } function jr(t, e) { - var i = w(t) ? t : Zi(t); + var i = w(t) ? t : Xi(t); return !(!this.isValid() || !i.isValid()) && ("millisecond" === (e = et(e) || "millisecond") ? this.valueOf() > i.valueOf() : i.valueOf() < this.clone().startOf(e).valueOf()); } function Gr(t, e) { - var i = w(t) ? t : Zi(t); + var i = w(t) ? t : Xi(t); return !(!this.isValid() || !i.isValid()) && ("millisecond" === (e = et(e) || "millisecond") ? this.valueOf() < i.valueOf() : this.clone().endOf(e).valueOf() < i.valueOf()); } function Vr(t, e, i, r) { - var s = w(t) ? t : Zi(t), - n = w(e) ? e : Zi(e); + var s = w(t) ? t : Xi(t), + n = w(e) ? e : Xi(e); return !!(this.isValid() && s.isValid() && n.isValid()) && ("(" === (r = r || "()")[0] ? this.isAfter(s, i) : !this.isBefore(s, i)) && (")" === r[1] ? this.isBefore(n, i) : !this.isAfter(n, i)); } function Wr(t, e) { var i, - r = w(t) ? t : Zi(t); + r = w(t) ? t : Xi(t); return !(!this.isValid() || !r.isValid()) && ("millisecond" === (e = et(e) || "millisecond") ? this.valueOf() === r.valueOf() : (i = r.valueOf(), this.clone().startOf(e).valueOf() <= i && i <= this.clone().endOf(e).valueOf())); } - function Xr(t, e) { + function Zr(t, e) { return this.isSame(t, e) || this.isAfter(t, e); } - function Zr(t, e) { + function Xr(t, e) { return this.isSame(t, e) || this.isBefore(t, e); } function Kr(t, e, i) { @@ -2253,22 +2253,22 @@ return this.localeData().postformat(e); } function is(t, e) { - return this.isValid() && (w(t) && t.isValid() || Zi(t).isValid()) ? Pr({ + return this.isValid() && (w(t) && t.isValid() || Xi(t).isValid()) ? Pr({ to: this, from: t }).locale(this.locale()).humanize(!e) : this.localeData().invalidDate(); } function rs(t) { - return this.from(Zi(), t); + return this.from(Xi(), t); } function ss(t, e) { - return this.isValid() && (w(t) && t.isValid() || Zi(t).isValid()) ? Pr({ + return this.isValid() && (w(t) && t.isValid() || Xi(t).isValid()) ? Pr({ from: this, to: t }).locale(this.locale()).humanize(!e) : this.localeData().invalidDate(); } function ns(t) { - return this.to(Zi(), t); + return this.to(Xi(), t); } function os(t) { var e; @@ -2396,10 +2396,10 @@ function As() { return u({}, g(this)); } - function Cs() { + function $s() { return g(this).overflow; } - function $s() { + function Cs() { return { input: this._i, format: this._f, @@ -2457,7 +2457,7 @@ } return ""; } - function Hs() { + function Ds() { var t, e, i, @@ -2468,7 +2468,7 @@ } return ""; } - function Ds() { + function Hs() { var t, e, i, @@ -2491,10 +2491,10 @@ function Is(t) { return o(this, "_erasNameRegex") || Ys.call(this), t ? this._erasNameRegex : this._erasRegex; } - function Ns(t) { + function Fs(t) { return o(this, "_erasAbbrRegex") || Ys.call(this), t ? this._erasAbbrRegex : this._erasRegex; } - function Fs(t) { + function Ns(t) { return o(this, "_erasNarrowRegex") || Ys.call(this), t ? this._erasNarrowRegex : this._erasRegex; } function Bs(t, e) { @@ -2538,11 +2538,11 @@ function Ws() { return Se(this.isoWeekYear(), 1, 4); } - function Xs() { + function Zs() { var t = this.localeData()._week; return Se(this.year(), t.dow, t.doy); } - function Zs() { + function Xs() { var t = this.localeData()._week; return Se(this.weekYear(), t.dow, t.doy); } @@ -2558,37 +2558,37 @@ function Js(t) { return null == t ? Math.ceil((this.month() + 1) / 3) : this.month(3 * (t - 1) + this.month() % 3); } - L("N", 0, 0, "eraAbbr"), L("NN", 0, 0, "eraAbbr"), L("NNN", 0, 0, "eraAbbr"), L("NNNN", 0, 0, "eraName"), L("NNNNN", 0, 0, "eraNarrow"), L("y", ["y", 1], "yo", "eraYear"), L("y", ["yy", 2], 0, "eraYear"), L("y", ["yyy", 3], 0, "eraYear"), L("y", ["yyyy", 4], 0, "eraYear"), $t("N", Bs), $t("NN", Bs), $t("NNN", Bs), $t("NNNN", Ls), $t("NNNNN", Us), Ot(["N", "NN", "NNN", "NNNN", "NNNNN"], function (t, e, i, r) { + L("N", 0, 0, "eraAbbr"), L("NN", 0, 0, "eraAbbr"), L("NNN", 0, 0, "eraAbbr"), L("NNNN", 0, 0, "eraName"), L("NNNNN", 0, 0, "eraNarrow"), L("y", ["y", 1], "yo", "eraYear"), L("y", ["yy", 2], 0, "eraYear"), L("y", ["yyy", 3], 0, "eraYear"), L("y", ["yyyy", 4], 0, "eraYear"), Ct("N", Bs), Ct("NN", Bs), Ct("NNN", Bs), Ct("NNNN", Ls), Ct("NNNNN", Us), Ot(["N", "NN", "NNN", "NNNN", "NNNNN"], function (t, e, i, r) { var s = i._locale.erasParse(t, r, i._strict); s ? g(i).era = s : g(i).invalidEra = t; - }), $t("y", yt), $t("yy", yt), $t("yyy", yt), $t("yyyy", yt), $t("yo", Rs), Ot(["y", "yy", "yyy", "yyyy"], Bt), Ot(["yo"], function (t, e, i, r) { + }), Ct("y", yt), Ct("yy", yt), Ct("yyy", yt), Ct("yyyy", yt), Ct("yo", Rs), Ot(["y", "yy", "yyy", "yyyy"], Bt), Ot(["yo"], function (t, e, i, r) { var s; i._locale._eraYearOrdinalRegex && (s = t.match(i._locale._eraYearOrdinalRegex)), i._locale.eraYearOrdinalParse ? e[Bt] = i._locale.eraYearOrdinalParse(t, s) : e[Bt] = parseInt(t, 10); }), L(0, ["gg", 2], 0, function () { return this.weekYear() % 100; }), L(0, ["GG", 2], 0, function () { return this.isoWeekYear() % 100; - }), zs("gggg", "weekYear"), zs("ggggg", "weekYear"), zs("GGGG", "isoWeekYear"), zs("GGGGG", "isoWeekYear"), $t("G", bt), $t("g", bt), $t("GG", dt, at), $t("gg", dt, at), $t("GGGG", gt, lt), $t("gggg", gt, lt), $t("GGGGG", ft, ct), $t("ggggg", ft, ct), It(["gggg", "ggggg", "GGGG", "GGGGG"], function (t, e, i, r) { - e[r.substr(0, 2)] = Ht(t); + }), zs("gggg", "weekYear"), zs("ggggg", "weekYear"), zs("GGGG", "isoWeekYear"), zs("GGGGG", "isoWeekYear"), Ct("G", bt), Ct("g", bt), Ct("GG", dt, at), Ct("gg", dt, at), Ct("GGGG", gt, lt), Ct("gggg", gt, lt), Ct("GGGGG", ft, ct), Ct("ggggg", ft, ct), It(["gggg", "ggggg", "GGGG", "GGGGG"], function (t, e, i, r) { + e[r.substr(0, 2)] = Dt(t); }), It(["gg", "GG"], function (t, e, r, s) { e[s] = i.parseTwoDigitYear(t); - }), L("Q", 0, "Qo", "quarter"), $t("Q", ot), Ot("Q", function (t, e) { - e[Lt] = 3 * (Ht(t) - 1); - }), L("D", ["DD", 2], "Do", "date"), $t("D", dt, At), $t("DD", dt, at), $t("Do", function (t, e) { + }), L("Q", 0, "Qo", "quarter"), Ct("Q", ot), Ot("Q", function (t, e) { + e[Lt] = 3 * (Dt(t) - 1); + }), L("D", ["DD", 2], "Do", "date"), Ct("D", dt, At), Ct("DD", dt, at), Ct("Do", function (t, e) { return t ? e._dayOfMonthOrdinalParse || e._ordinalParse : e._dayOfMonthOrdinalParseLenient; }), Ot(["D", "DD"], Ut), Ot("Do", function (t, e) { - e[Ut] = Ht(t.match(dt)[0]); + e[Ut] = Dt(t.match(dt)[0]); }); var Qs = qt("Date", !0); function tn(t) { var e = Math.round((this.clone().startOf("day") - this.clone().startOf("year")) / 864e5) + 1; return null == t ? e : this.add(t - e, "d"); } - L("DDD", ["DDDD", 3], "DDDo", "dayOfYear"), $t("DDD", mt), $t("DDDD", ht), Ot(["DDD", "DDDD"], function (t, e, i) { - i._dayOfYear = Ht(t); - }), L("m", ["mm", 2], 0, "minute"), $t("m", dt, Ct), $t("mm", dt, at), Ot(["m", "mm"], Yt); + L("DDD", ["DDDD", 3], "DDDo", "dayOfYear"), Ct("DDD", mt), Ct("DDDD", ht), Ot(["DDD", "DDDD"], function (t, e, i) { + i._dayOfYear = Dt(t); + }), L("m", ["mm", 2], 0, "minute"), Ct("m", dt, $t), Ct("mm", dt, at), Ot(["m", "mm"], Yt); var en = qt("Minutes", !1); - L("s", ["ss", 2], 0, "second"), $t("s", dt, Ct), $t("ss", dt, at), Ot(["s", "ss"], zt); + L("s", ["ss", 2], 0, "second"), Ct("s", dt, $t), Ct("ss", dt, at), Ot(["s", "ss"], zt); var rn, sn, nn = qt("Seconds", !1); @@ -2608,9 +2608,9 @@ return 1e5 * this.millisecond(); }), L(0, ["SSSSSSSSS", 9], 0, function () { return 1e6 * this.millisecond(); - }), $t("S", mt, ot), $t("SS", mt, at), $t("SSS", mt, ht), rn = "SSSS"; rn.length <= 9; rn += "S") $t(rn, yt); + }), Ct("S", mt, ot), Ct("SS", mt, at), Ct("SSS", mt, ht), rn = "SSSS"; rn.length <= 9; rn += "S") Ct(rn, yt); function on(t, e) { - e[jt] = Ht(1e3 * ("0." + t)); + e[jt] = Dt(1e3 * ("0." + t)); } for (rn = "S"; rn.length <= 9; rn += "S") Ot(rn, on); function an() { @@ -2622,17 +2622,17 @@ sn = qt("Milliseconds", !1), L("z", 0, 0, "zoneAbbr"), L("zz", 0, 0, "zoneName"); var ln = x.prototype; function cn(t) { - return Zi(1e3 * t); + return Xi(1e3 * t); } function dn() { - return Zi.apply(null, arguments).parseZone(); + return Xi.apply(null, arguments).parseZone(); } function un(t) { return t; } - ln.add = Or, ln.calendar = Yr, ln.clone = zr, ln.diff = Kr, ln.endOf = ys, ln.format = es, ln.from = is, ln.fromNow = rs, ln.to = ss, ln.toNow = ns, ln.get = te, ln.invalidAt = Cs, ln.isAfter = jr, ln.isBefore = Gr, ln.isBetween = Vr, ln.isSame = Wr, ln.isSameOrAfter = Xr, ln.isSameOrBefore = Zr, ln.isValid = Ss, ln.lang = as, ln.locale = os, ln.localeData = hs, ln.max = qi, ln.min = Ki, ln.parsingFlags = As, ln.set = ee, ln.startOf = fs, ln.subtract = Ir, ln.toArray = xs, ln.toObject = ws, ln.toDate = vs, ln.toISOString = Qr, ln.inspect = ts, "undefined" != typeof Symbol && null != Symbol.for && (ln[Symbol.for("nodejs.util.inspect.custom")] = function () { + ln.add = Or, ln.calendar = Yr, ln.clone = zr, ln.diff = Kr, ln.endOf = ys, ln.format = es, ln.from = is, ln.fromNow = rs, ln.to = ss, ln.toNow = ns, ln.get = te, ln.invalidAt = $s, ln.isAfter = jr, ln.isBefore = Gr, ln.isBetween = Vr, ln.isSame = Wr, ln.isSameOrAfter = Zr, ln.isSameOrBefore = Xr, ln.isValid = Ss, ln.lang = as, ln.locale = os, ln.localeData = hs, ln.max = qi, ln.min = Ki, ln.parsingFlags = As, ln.set = ee, ln.startOf = fs, ln.subtract = Ir, ln.toArray = xs, ln.toObject = ws, ln.toDate = vs, ln.toISOString = Qr, ln.inspect = ts, "undefined" != typeof Symbol && null != Symbol.for && (ln[Symbol.for("nodejs.util.inspect.custom")] = function () { return "Moment<" + this.format() + ">"; - }), ln.toJSON = Es, ln.toString = Jr, ln.unix = _s, ln.valueOf = bs, ln.creationData = $s, ln.eraName = Ms, ln.eraNarrow = Hs, ln.eraAbbr = Ds, ln.eraYear = Os, ln.year = Zt, ln.isLeapYear = Kt, ln.weekYear = js, ln.isoWeekYear = Gs, ln.quarter = ln.quarters = Js, ln.month = me, ln.daysInMonth = ge, ln.week = ln.weeks = ke, ln.isoWeek = ln.isoWeeks = Te, ln.weeksInYear = Xs, ln.weeksInWeekYear = Zs, ln.isoWeeksInYear = Vs, ln.isoWeeksInISOWeekYear = Ws, ln.date = Qs, ln.day = ln.days = Ge, ln.weekday = Ve, ln.isoWeekday = We, ln.dayOfYear = tn, ln.hour = ln.hours = si, ln.minute = ln.minutes = en, ln.second = ln.seconds = nn, ln.millisecond = ln.milliseconds = sn, ln.utcOffset = gr, ln.utc = yr, ln.local = br, ln.parseZone = _r, ln.hasAlignedHourOffset = vr, ln.isDST = xr, ln.isLocal = Er, ln.isUtcOffset = Sr, ln.isUtc = Ar, ln.isUTC = Ar, ln.zoneAbbr = an, ln.zoneName = hn, ln.dates = S("dates accessor is deprecated. Use date instead.", Qs), ln.months = S("months accessor is deprecated. Use month instead", me), ln.years = S("years accessor is deprecated. Use year instead", Zt), ln.zone = S("moment().zone is deprecated, use moment().utcOffset instead. http://momentjs.com/guides/#/warnings/zone/", fr), ln.isDSTShifted = S("isDSTShifted is deprecated. See http://momentjs.com/guides/#/warnings/dst-shifted/ for more information", wr); + }), ln.toJSON = Es, ln.toString = Jr, ln.unix = _s, ln.valueOf = bs, ln.creationData = Cs, ln.eraName = Ms, ln.eraNarrow = Ds, ln.eraAbbr = Hs, ln.eraYear = Os, ln.year = Xt, ln.isLeapYear = Kt, ln.weekYear = js, ln.isoWeekYear = Gs, ln.quarter = ln.quarters = Js, ln.month = me, ln.daysInMonth = ge, ln.week = ln.weeks = ke, ln.isoWeek = ln.isoWeeks = Te, ln.weeksInYear = Zs, ln.weeksInWeekYear = Xs, ln.isoWeeksInYear = Vs, ln.isoWeeksInISOWeekYear = Ws, ln.date = Qs, ln.day = ln.days = Ge, ln.weekday = Ve, ln.isoWeekday = We, ln.dayOfYear = tn, ln.hour = ln.hours = si, ln.minute = ln.minutes = en, ln.second = ln.seconds = nn, ln.millisecond = ln.milliseconds = sn, ln.utcOffset = gr, ln.utc = yr, ln.local = br, ln.parseZone = _r, ln.hasAlignedHourOffset = vr, ln.isDST = xr, ln.isLocal = Er, ln.isUtcOffset = Sr, ln.isUtc = Ar, ln.isUTC = Ar, ln.zoneAbbr = an, ln.zoneName = hn, ln.dates = S("dates accessor is deprecated. Use date instead.", Qs), ln.months = S("months accessor is deprecated. Use month instead", me), ln.years = S("years accessor is deprecated. Use year instead", Xt), ln.zone = S("moment().zone is deprecated, use moment().utcOffset instead. http://momentjs.com/guides/#/warnings/zone/", fr), ln.isDSTShifted = S("isDSTShifted is deprecated. See http://momentjs.com/guides/#/warnings/dst-shifted/ for more information", wr); var pn = M.prototype; function mn(t, e, i, r) { var s = bi(), @@ -2671,7 +2671,7 @@ function xn(t, e, i) { return fn(t, e, i, "weekdaysMin"); } - pn.calendar = D, pn.longDateFormat = G, pn.invalidDate = W, pn.ordinal = K, pn.preparse = un, pn.postformat = un, pn.relativeTime = J, pn.pastFuture = Q, pn.set = k, pn.eras = Ps, pn.erasParse = ks, pn.erasConvertYear = Ts, pn.erasAbbrRegex = Ns, pn.erasNameRegex = Is, pn.erasNarrowRegex = Fs, pn.months = le, pn.monthsShort = ce, pn.monthsParse = ue, pn.monthsRegex = ye, pn.monthsShortRegex = fe, pn.week = Ae, pn.firstDayOfYear = Pe, pn.firstDayOfWeek = $e, pn.weekdays = Ue, pn.weekdaysMin = Ye, pn.weekdaysShort = Re, pn.weekdaysParse = je, pn.weekdaysRegex = Xe, pn.weekdaysShortRegex = Ze, pn.weekdaysMinRegex = Ke, pn.isPM = ii, pn.meridiem = ni, gi("en", { + pn.calendar = H, pn.longDateFormat = G, pn.invalidDate = W, pn.ordinal = K, pn.preparse = un, pn.postformat = un, pn.relativeTime = J, pn.pastFuture = Q, pn.set = k, pn.eras = Ps, pn.erasParse = ks, pn.erasConvertYear = Ts, pn.erasAbbrRegex = Fs, pn.erasNameRegex = Is, pn.erasNarrowRegex = Ns, pn.months = le, pn.monthsShort = ce, pn.monthsParse = ue, pn.monthsRegex = ye, pn.monthsShortRegex = fe, pn.week = Ae, pn.firstDayOfYear = Pe, pn.firstDayOfWeek = Ce, pn.weekdays = Ue, pn.weekdaysMin = Ye, pn.weekdaysShort = Re, pn.weekdaysParse = je, pn.weekdaysRegex = Ze, pn.weekdaysShortRegex = Xe, pn.weekdaysMinRegex = Ke, pn.isPM = ii, pn.meridiem = ni, gi("en", { eras: [{ since: "0001-01-01", until: 1 / 0, @@ -2690,7 +2690,7 @@ dayOfMonthOrdinalParse: /\d{1,2}(th|st|nd|rd)/, ordinal: function (t) { var e = t % 10; - return t + (1 === Ht(t % 100 / 10) ? "th" : 1 === e ? "st" : 2 === e ? "nd" : 3 === e ? "rd" : "th"); + return t + (1 === Dt(t % 100 / 10) ? "th" : 1 === e ? "st" : 2 === e ? "nd" : 3 === e ? "rd" : "th"); } }), i.lang = S("moment.lang is deprecated. Use moment.locale instead.", gi), i.langData = S("moment.langData is deprecated. Use moment.localeData instead.", bi); var wn = Math.abs; @@ -2705,10 +2705,10 @@ function An(t, e) { return Sn(this, t, e, 1); } - function Cn(t, e) { + function $n(t, e) { return Sn(this, t, e, -1); } - function $n(t) { + function Cn(t) { return t < 0 ? Math.floor(t) : Math.ceil(t); } function Pn() { @@ -2721,7 +2721,7 @@ o = this._days, a = this._months, h = this._data; - return n >= 0 && o >= 0 && a >= 0 || n <= 0 && o <= 0 && a <= 0 || (n += 864e5 * $n(Tn(a) + o), o = 0, a = 0), h.milliseconds = n % 1e3, t = Mt(n / 1e3), h.seconds = t % 60, e = Mt(t / 60), h.minutes = e % 60, i = Mt(e / 60), h.hours = i % 24, o += Mt(i / 24), a += s = Mt(kn(o)), o -= $n(Tn(s)), r = Mt(a / 12), a %= 12, h.days = o, h.months = a, h.years = r, this; + return n >= 0 && o >= 0 && a >= 0 || n <= 0 && o <= 0 && a <= 0 || (n += 864e5 * Cn(Tn(a) + o), o = 0, a = 0), h.milliseconds = n % 1e3, t = Mt(n / 1e3), h.seconds = t % 60, e = Mt(t / 60), h.minutes = e % 60, i = Mt(e / 60), h.hours = i % 24, o += Mt(i / 24), a += s = Mt(kn(o)), o -= Cn(Tn(s)), r = Mt(a / 12), a %= 12, h.days = o, h.months = a, h.years = r, this; } function kn(t) { return 4800 * t / 146097; @@ -2758,21 +2758,21 @@ throw new Error("Unknown unit " + t); } } - function Hn(t) { + function Dn(t) { return function () { return this.as(t); }; } - var Dn = Hn("ms"), - On = Hn("s"), - In = Hn("m"), - Nn = Hn("h"), - Fn = Hn("d"), - Bn = Hn("w"), - Ln = Hn("M"), - Un = Hn("Q"), - Rn = Hn("y"), - Yn = Dn; + var Hn = Dn("ms"), + On = Dn("s"), + In = Dn("m"), + Fn = Dn("h"), + Nn = Dn("d"), + Bn = Dn("w"), + Ln = Dn("M"), + Un = Dn("Q"), + Rn = Dn("y"), + Yn = Hn; function zn() { return Pr(this); } @@ -2786,8 +2786,8 @@ } var Vn = Gn("milliseconds"), Wn = Gn("seconds"), - Xn = Gn("minutes"), - Zn = Gn("hours"), + Zn = Gn("minutes"), + Xn = Gn("hours"), Kn = Gn("days"), qn = Gn("months"), Jn = Gn("years"); @@ -2854,13 +2854,13 @@ return d ? (t = Mt(h / 60), e = Mt(t / 60), h %= 60, t %= 60, i = Mt(c / 12), c %= 12, r = h ? h.toFixed(3).replace(/\.?0+$/, "") : "", s = d < 0 ? "-" : "", n = ho(this._months) !== ho(d) ? "-" : "", o = ho(this._days) !== ho(d) ? "-" : "", a = ho(this._milliseconds) !== ho(d) ? "-" : "", s + "P" + (i ? n + i + "Y" : "") + (c ? n + c + "M" : "") + (l ? o + l + "D" : "") + (e || t || h ? "T" : "") + (e ? a + e + "H" : "") + (t ? a + t + "M" : "") + (h ? a + r + "S" : "")) : "P0D"; } var co = or.prototype; - return co.isValid = sr, co.abs = En, co.add = An, co.subtract = Cn, co.as = Mn, co.asMilliseconds = Dn, co.asSeconds = On, co.asMinutes = In, co.asHours = Nn, co.asDays = Fn, co.asWeeks = Bn, co.asMonths = Ln, co.asQuarters = Un, co.asYears = Rn, co.valueOf = Yn, co._bubble = Pn, co.clone = zn, co.get = jn, co.milliseconds = Vn, co.seconds = Wn, co.minutes = Xn, co.hours = Zn, co.days = Kn, co.weeks = Qn, co.months = qn, co.years = Jn, co.humanize = oo, co.toISOString = lo, co.toString = lo, co.toJSON = lo, co.locale = os, co.localeData = hs, co.toIsoString = S("toIsoString() is deprecated. Please use toISOString() instead (notice the capitals)", lo), co.lang = as, L("X", 0, 0, "unix"), L("x", 0, 0, "valueOf"), $t("x", bt), $t("X", xt), Ot("X", function (t, e, i) { + return co.isValid = sr, co.abs = En, co.add = An, co.subtract = $n, co.as = Mn, co.asMilliseconds = Hn, co.asSeconds = On, co.asMinutes = In, co.asHours = Fn, co.asDays = Nn, co.asWeeks = Bn, co.asMonths = Ln, co.asQuarters = Un, co.asYears = Rn, co.valueOf = Yn, co._bubble = Pn, co.clone = zn, co.get = jn, co.milliseconds = Vn, co.seconds = Wn, co.minutes = Zn, co.hours = Xn, co.days = Kn, co.weeks = Qn, co.months = qn, co.years = Jn, co.humanize = oo, co.toISOString = lo, co.toString = lo, co.toJSON = lo, co.locale = os, co.localeData = hs, co.toIsoString = S("toIsoString() is deprecated. Please use toISOString() instead (notice the capitals)", lo), co.lang = as, L("X", 0, 0, "unix"), L("x", 0, 0, "valueOf"), Ct("x", bt), Ct("X", xt), Ot("X", function (t, e, i) { i._d = new Date(1e3 * parseFloat(t)); }), Ot("x", function (t, e, i) { - i._d = new Date(Ht(t)); + i._d = new Date(Dt(t)); }), //! moment.js - i.version = "2.30.1", r(Zi), i.fn = ln, i.min = Qi, i.max = tr, i.now = er, i.utc = p, i.unix = cn, i.months = yn, i.isDate = c, i.locale = gi, i.invalid = y, i.duration = Pr, i.isMoment = w, i.weekdays = _n, i.parseZone = dn, i.localeData = bi, i.isDuration = ar, i.monthsShort = bn, i.weekdaysMin = xn, i.defineLocale = fi, i.updateLocale = yi, i.locales = _i, i.weekdaysShort = vn, i.normalizeUnits = et, i.relativeTimeRounding = so, i.relativeTimeThreshold = no, i.calendarFormat = Rr, i.prototype = ln, i.HTML5_FMT = { + i.version = "2.30.1", r(Xi), i.fn = ln, i.min = Qi, i.max = tr, i.now = er, i.utc = p, i.unix = cn, i.months = yn, i.isDate = c, i.locale = gi, i.invalid = y, i.duration = Pr, i.isMoment = w, i.weekdays = _n, i.parseZone = dn, i.localeData = bi, i.isDuration = ar, i.monthsShort = bn, i.weekdaysMin = xn, i.defineLocale = fi, i.updateLocale = yi, i.locales = _i, i.weekdaysShort = vn, i.normalizeUnits = et, i.relativeTimeRounding = so, i.relativeTimeThreshold = no, i.calendarFormat = Rr, i.prototype = ln, i.HTML5_FMT = { DATETIME_LOCAL: "YYYY-MM-DDTHH:mm", DATETIME_LOCAL_SECONDS: "YYYY-MM-DDTHH:mm:ss", DATETIME_LOCAL_MS: "YYYY-MM-DDTHH:mm:ss.SSS", @@ -2872,8 +2872,8 @@ MONTH: "YYYY-MM" }, i; }(); - var Ct = wt(At.exports); - const $t = (t, e, i, r) => { + var $t = wt(At.exports); + const Ct = (t, e, i, r) => { r = r || {}, i = i ?? {}; const s = new Event(e, { bubbles: void 0 === r.bubbles || r.bubbles, @@ -2888,30 +2888,30 @@ }(Pt || (Pt = {})), function (t) { t.F = "F", t.C = "C"; }(kt || (kt = {})), function (t) { - t.Status = "Status", t.HotendCurrent = "Hotend", t.BedCurrent = "Bed", t.HotendTarget = "T Hotend", t.BedTarget = "T Bed", t.PrinterOnline = "Online", t.Availability = "Availability", t.ProjectName = "Project", t.CurrentLayer = "Layer", t.DryingStatus = "Dry Status", t.DryingTime = "Dry Time", t.SpeedMode = "Speed Mode", t.FanSpeed = "Fan Speed"; + t.Status = "Status", t.HotendCurrent = "Hotend", t.BedCurrent = "Bed", t.HotendTarget = "T Hotend", t.BedTarget = "T Bed", t.PrinterOnline = "Online", t.Availability = "Availability", t.ProjectName = "Project", t.CurrentLayer = "Layer", t.DryingStatus = "Dry Status", t.DryingTime = "Dry Time", t.SpeedMode = "Speed Mode", t.FanSpeed = "Fan Speed", t.OnTime = "On Time", t.OffTime = "Off Time", t.BottomTime = "Bottom Time", t.ModelHeight = "Model Height", t.BottomLayers = "Bottom Layers", t.ZUpHeight = "Z Up Height", t.ZUpSpeed = "Z Up Speed", t.ZDownSpeed = "Z Down Speed"; }(Tt || (Tt = {})); const Mt = Object.assign(Object.assign({}, Pt), Tt); - var Ht, Dt; + var Dt, Ht; !function (t) { t.PLA = "PLA", t.PETG = "PETG", t.ABS = "ABS", t.PACF = "PACF", t.PC = "PC", t.ASA = "ASA", t.HIPS = "HIPS", t.PA = "PA", t.PLA_SE = "PLA_SE"; - }(Ht || (Ht = {})), function (t) { + }(Dt || (Dt = {})), function (t) { t.PAUSE = "Pause", t.RESUME = "Resume", t.CANCEL = "Cancel"; - }(Dt || (Dt = {})); + }(Ht || (Ht = {})); const Ot = ["width", "height", "left", "top"]; function It(t, e) { Object.keys(e).forEach(t => { Ot.includes(t) && !isNaN(e[t]) && (e[t] = e[t].toString() + "px"); }), t && Object.assign(t.style, e); } - function Nt(t) { + function Ft(t) { return t.toLowerCase().split(" ").map(t => t.charAt(0).toUpperCase() + t.slice(1)).join(" "); } - function Ft(t, e) { + function Nt(t, e) { return e ? t.states[e.entity_id] : void 0; } function Bt(t, e, i, r) { const s = function (t, e) { - const i = Ft(t, e); + const i = Nt(t, e); return i ? String(i.state) : ""; }(t, e); return "on" === s ? i : r; @@ -2938,7 +2938,7 @@ } function Yt(t, e, i, r) { return function (t, e, i, r, s = "unavailable", n = {}) { - return Ft(t, Rt(e, i, "button", r)) || { + return Nt(t, Rt(e, i, "button", r)) || { state: s, attributes: n }; @@ -2951,7 +2951,7 @@ return !["unavailable"].includes(t.state); } function jt(t, e, i, r, s = "unavailable", n = {}) { - return Ft(t, Rt(e, i, "sensor", r)) || { + return Nt(t, Rt(e, i, "sensor", r)) || { state: s, attributes: n }; @@ -2963,15 +2963,15 @@ function Vt(t) { return ["printing", "preheating"].includes(t); } - const Wt = (t, e) => e ? Ct.duration(t, "seconds").humanize() : (() => { - const e = Ct.duration(t, "seconds"), + const Wt = (t, e) => e ? $t.duration(t, "seconds").humanize() : (() => { + const e = $t.duration(t, "seconds"), i = e.days(), r = e.hours(), s = e.minutes(), n = e.seconds(); return `${i > 0 ? `${i}d` : ""}${r > 0 ? ` ${r}h` : ""}${s > 0 ? ` ${s}m` : ""}${n > 0 ? ` ${n}s` : ""}`; })(); - const Xt = { + const Zt = { [kt.C]: { [kt.C]: t => t, [kt.F]: t => 9 * t / 5 + 32 @@ -2981,7 +2981,7 @@ [kt.F]: t => t } }, - Zt = (t, e, i = !1) => { + Xt = (t, e, i = !1) => { const r = parseFloat(t.state), s = (t => { var e; @@ -2993,12 +2993,12 @@ return kt.F; } })(t), - n = (o = r, h = e || s, Xt[a = s] && Xt[a][h] ? Xt[a][h](o) : -1); + n = (o = r, h = e || s, Zt[a = s] && Zt[a][h] ? Zt[a][h](o) : -1); var o, a, h; return `${i ? Math.round(n) : n.toFixed(2)}°${e || s}`; }; function Kt() { - return [Mt.Status, Mt.ETA, Mt.Elapsed, Mt.HotendCurrent, Mt.BedCurrent, Mt.Remaining, Mt.HotendTarget, Mt.BedTarget]; + return [Mt.Status, Mt.ETA, Mt.Elapsed, Mt.Remaining]; } function qt(t, e) { return void 0 === t ? e : t; @@ -3193,24 +3193,24 @@ const Ee = new Map(), Se = new WeakSet(), Ae = () => new Promise(t => requestAnimationFrame(t)), - Ce = (t, e) => { + $e = (t, e) => { const i = t - e; return 0 === i ? void 0 : i; }, - $e = (t, e) => { + Ce = (t, e) => { const i = t / e; return 1 === i ? void 0 : i; }, Pe = { left: (t, e) => { - const i = Ce(t, e); + const i = $e(t, e); return { value: i, transform: null == i || isNaN(i) ? void 0 : `translateX(${i}px)` }; }, top: (t, e) => { - const i = Ce(t, e); + const i = $e(t, e); return { value: i, transform: null == i || isNaN(i) ? void 0 : `translateY(${i}px)` @@ -3221,7 +3221,7 @@ 0 === e && (e = 1, i = { width: "1px" }); - const r = $e(t, e); + const r = Ce(t, e); return { value: r, overrideFrom: i, @@ -3233,7 +3233,7 @@ 0 === e && (e = 1, i = { height: "1px" }); - const r = $e(t, e); + const r = Ce(t, e); return { value: r, overrideFrom: i, @@ -3247,7 +3247,7 @@ }, Te = ["left", "top", "width", "height", "opacity", "color", "background"], Me = new WeakMap(); - const He = ie(class extends ve { + const De = ie(class extends ve { constructor(t) { if (super(t), this.t = !1, this.i = null, this.o = null, this.h = !0, this.shouldLog = !1, t.type === ee) throw Error("The `animate` directive must be used in attribute position."); this.createFinished(); @@ -3442,11 +3442,11 @@ this.shouldLog && !this.isDisabled() && console.log(t, this.options.id, e); } }); - var De, + var He, Oe, Ie, - Ne = "Anycubic Cloud", - Fe = { + Fe = "Anycubic Cloud", + Ne = { actions: { print: "Print", yes: "Yes", @@ -3575,15 +3575,15 @@ } }, Ue = { - title: Ne, - common: Fe, + title: Fe, + common: Ne, card: Be, panels: Le }, Re = Object.freeze({ __proto__: null, - title: Ne, - common: Fe, + title: Fe, + common: Ne, card: Be, panels: Le, default: Ue @@ -3606,10 +3606,10 @@ function We(t) { return t.type === Oe.select; } - function Xe(t) { + function Ze(t) { return t.type === Oe.plural; } - function Ze(t) { + function Xe(t) { return t.type === Oe.pound; } function Ke(t) { @@ -3623,7 +3623,7 @@ } !function (t) { t[t.EXPECT_ARGUMENT_CLOSING_BRACE = 1] = "EXPECT_ARGUMENT_CLOSING_BRACE", t[t.EMPTY_ARGUMENT = 2] = "EMPTY_ARGUMENT", t[t.MALFORMED_ARGUMENT = 3] = "MALFORMED_ARGUMENT", t[t.EXPECT_ARGUMENT_TYPE = 4] = "EXPECT_ARGUMENT_TYPE", t[t.INVALID_ARGUMENT_TYPE = 5] = "INVALID_ARGUMENT_TYPE", t[t.EXPECT_ARGUMENT_STYLE = 6] = "EXPECT_ARGUMENT_STYLE", t[t.INVALID_NUMBER_SKELETON = 7] = "INVALID_NUMBER_SKELETON", t[t.INVALID_DATE_TIME_SKELETON = 8] = "INVALID_DATE_TIME_SKELETON", t[t.EXPECT_NUMBER_SKELETON = 9] = "EXPECT_NUMBER_SKELETON", t[t.EXPECT_DATE_TIME_SKELETON = 10] = "EXPECT_DATE_TIME_SKELETON", t[t.UNCLOSED_QUOTE_IN_ARGUMENT_STYLE = 11] = "UNCLOSED_QUOTE_IN_ARGUMENT_STYLE", t[t.EXPECT_SELECT_ARGUMENT_OPTIONS = 12] = "EXPECT_SELECT_ARGUMENT_OPTIONS", t[t.EXPECT_PLURAL_ARGUMENT_OFFSET_VALUE = 13] = "EXPECT_PLURAL_ARGUMENT_OFFSET_VALUE", t[t.INVALID_PLURAL_ARGUMENT_OFFSET_VALUE = 14] = "INVALID_PLURAL_ARGUMENT_OFFSET_VALUE", t[t.EXPECT_SELECT_ARGUMENT_SELECTOR = 15] = "EXPECT_SELECT_ARGUMENT_SELECTOR", t[t.EXPECT_PLURAL_ARGUMENT_SELECTOR = 16] = "EXPECT_PLURAL_ARGUMENT_SELECTOR", t[t.EXPECT_SELECT_ARGUMENT_SELECTOR_FRAGMENT = 17] = "EXPECT_SELECT_ARGUMENT_SELECTOR_FRAGMENT", t[t.EXPECT_PLURAL_ARGUMENT_SELECTOR_FRAGMENT = 18] = "EXPECT_PLURAL_ARGUMENT_SELECTOR_FRAGMENT", t[t.INVALID_PLURAL_ARGUMENT_SELECTOR = 19] = "INVALID_PLURAL_ARGUMENT_SELECTOR", t[t.DUPLICATE_PLURAL_ARGUMENT_SELECTOR = 20] = "DUPLICATE_PLURAL_ARGUMENT_SELECTOR", t[t.DUPLICATE_SELECT_ARGUMENT_SELECTOR = 21] = "DUPLICATE_SELECT_ARGUMENT_SELECTOR", t[t.MISSING_OTHER_CLAUSE = 22] = "MISSING_OTHER_CLAUSE", t[t.INVALID_TAG = 23] = "INVALID_TAG", t[t.INVALID_TAG_NAME = 25] = "INVALID_TAG_NAME", t[t.UNMATCHED_CLOSING_TAG = 26] = "UNMATCHED_CLOSING_TAG", t[t.UNCLOSED_TAG = 27] = "UNCLOSED_TAG"; - }(De || (De = {})), function (t) { + }(He || (He = {})), function (t) { t[t.literal = 0] = "literal", t[t.argument = 1] = "argument", t[t.number = 2] = "number", t[t.date = 3] = "date", t[t.time = 4] = "time", t[t.select = 5] = "select", t[t.plural = 6] = "plural", t[t.pound = 7] = "pound", t[t.tag = 8] = "tag"; }(Oe || (Oe = {})), function (t) { t[t.number = 0] = "number", t[t.dateTime = 1] = "dateTime"; @@ -4216,12 +4216,12 @@ }, Ai = !0; try { - Ai = "a" === (null === (ui = Di("([^\\p{White_Space}\\p{Pattern_Syntax}]*)", "yu").exec("a")) || void 0 === ui ? void 0 : ui[0]); + Ai = "a" === (null === (ui = Hi("([^\\p{White_Space}\\p{Pattern_Syntax}]*)", "yu").exec("a")) || void 0 === ui ? void 0 : ui[0]); } catch (j) { Ai = !1; } - var Ci, - $i = bi ? function (t, e, i) { + var $i, + Ci = bi ? function (t, e, i) { return t.startsWith(e, i); } : function (t, e, i) { return t.slice(i, i + e.length) === e; @@ -4258,21 +4258,21 @@ } : function (t) { return t.replace(gi, ""); }, - Hi = Ei ? function (t) { + Di = Ei ? function (t) { return t.trimEnd(); } : function (t) { return t.replace(fi, ""); }; - function Di(t, e) { + function Hi(t, e) { return new RegExp(t, e); } if (Ai) { - var Oi = Di("([^\\p{White_Space}\\p{Pattern_Syntax}]*)", "yu"); - Ci = function (t, e) { + var Oi = Hi("([^\\p{White_Space}\\p{Pattern_Syntax}]*)", "yu"); + $i = function (t, e) { var i; return Oi.lastIndex = e, null !== (i = Oi.exec(t)[1]) && void 0 !== i ? i : ""; }; - } else Ci = function (t, e) { + } else $i = function (t, e) { for (var i = [];;) { var r = Ti(t, e); if (void 0 === r || Bi(r) || Li(r)) break; @@ -4302,9 +4302,9 @@ if (35 !== s || "plural" !== e && "selectordinal" !== e) { if (60 === s && !this.ignoreTag && 47 === this.peek()) { if (i) break; - return this.error(De.UNMATCHED_CLOSING_TAG, yi(this.clonePosition(), this.clonePosition())); + return this.error(He.UNMATCHED_CLOSING_TAG, yi(this.clonePosition(), this.clonePosition())); } - if (60 === s && !this.ignoreTag && Ni(this.peek() || 0)) { + if (60 === s && !this.ignoreTag && Fi(this.peek() || 0)) { if ((n = this.parseTag(t, e)).err) return n; r.push(n.val); } else { @@ -4343,9 +4343,9 @@ var n = s.val, o = this.clonePosition(); if (this.bumpIf("")) { - if (this.isEOF() || !Ni(this.char())) return this.error(De.INVALID_TAG, yi(o, this.clonePosition())); + if (this.isEOF() || !Fi(this.char())) return this.error(He.INVALID_TAG, yi(o, this.clonePosition())); var a = this.clonePosition(); - return r !== this.parseTagName() ? this.error(De.UNMATCHED_CLOSING_TAG, yi(a, this.clonePosition())) : (this.bumpSpace(), this.bumpIf(">") ? { + return r !== this.parseTagName() ? this.error(He.UNMATCHED_CLOSING_TAG, yi(a, this.clonePosition())) : (this.bumpSpace(), this.bumpIf(">") ? { val: { type: Oe.tag, value: r, @@ -4353,14 +4353,14 @@ location: yi(i, this.clonePosition()) }, err: null - } : this.error(De.INVALID_TAG, yi(o, this.clonePosition()))); + } : this.error(He.INVALID_TAG, yi(o, this.clonePosition()))); } - return this.error(De.UNCLOSED_TAG, yi(i, this.clonePosition())); + return this.error(He.UNCLOSED_TAG, yi(i, this.clonePosition())); } - return this.error(De.INVALID_TAG, yi(i, this.clonePosition())); + return this.error(He.INVALID_TAG, yi(i, this.clonePosition())); }, t.prototype.parseTagName = function () { var t = this.offset(); - for (this.bump(); !this.isEOF() && Fi(this.char());) this.bump(); + for (this.bump(); !this.isEOF() && Ni(this.char());) this.bump(); return this.message.slice(t, this.offset()); }, t.prototype.parseLiteral = function (t, e) { for (var i = this.clonePosition(), r = "";;) { @@ -4384,7 +4384,7 @@ err: null }; }, t.prototype.tryParseLeftAngleBracket = function () { - return this.isEOF() || 60 !== this.char() || !this.ignoreTag && (Ni(t = this.peek() || 0) || 47 === t) ? null : (this.bump(), "<"); + return this.isEOF() || 60 !== this.char() || !this.ignoreTag && (Fi(t = this.peek() || 0) || 47 === t) ? null : (this.bump(), "<"); var t; }, t.prototype.tryParseQuote = function (t) { if (this.isEOF() || 39 !== this.char()) return null; @@ -4422,11 +4422,11 @@ return 60 === i || 123 === i || 35 === i && ("plural" === e || "selectordinal" === e) || 125 === i && t > 0 ? null : (this.bump(), Pi(i)); }, t.prototype.parseArgument = function (t, e) { var i = this.clonePosition(); - if (this.bump(), this.bumpSpace(), this.isEOF()) return this.error(De.EXPECT_ARGUMENT_CLOSING_BRACE, yi(i, this.clonePosition())); - if (125 === this.char()) return this.bump(), this.error(De.EMPTY_ARGUMENT, yi(i, this.clonePosition())); + if (this.bump(), this.bumpSpace(), this.isEOF()) return this.error(He.EXPECT_ARGUMENT_CLOSING_BRACE, yi(i, this.clonePosition())); + if (125 === this.char()) return this.bump(), this.error(He.EMPTY_ARGUMENT, yi(i, this.clonePosition())); var r = this.parseIdentifierIfPossible().value; - if (!r) return this.error(De.MALFORMED_ARGUMENT, yi(i, this.clonePosition())); - if (this.bumpSpace(), this.isEOF()) return this.error(De.EXPECT_ARGUMENT_CLOSING_BRACE, yi(i, this.clonePosition())); + if (!r) return this.error(He.MALFORMED_ARGUMENT, yi(i, this.clonePosition())); + if (this.bumpSpace(), this.isEOF()) return this.error(He.EXPECT_ARGUMENT_CLOSING_BRACE, yi(i, this.clonePosition())); switch (this.char()) { case 125: return this.bump(), { @@ -4438,14 +4438,14 @@ err: null }; case 44: - return this.bump(), this.bumpSpace(), this.isEOF() ? this.error(De.EXPECT_ARGUMENT_CLOSING_BRACE, yi(i, this.clonePosition())) : this.parseArgumentOptions(t, e, r, i); + return this.bump(), this.bumpSpace(), this.isEOF() ? this.error(He.EXPECT_ARGUMENT_CLOSING_BRACE, yi(i, this.clonePosition())) : this.parseArgumentOptions(t, e, r, i); default: - return this.error(De.MALFORMED_ARGUMENT, yi(i, this.clonePosition())); + return this.error(He.MALFORMED_ARGUMENT, yi(i, this.clonePosition())); } }, t.prototype.parseIdentifierIfPossible = function () { var t = this.clonePosition(), e = this.offset(), - i = Ci(this.message, e), + i = $i(this.message, e), r = e + i.length; return this.bumpTo(r), { value: i, @@ -4458,7 +4458,7 @@ h = this.clonePosition(); switch (a) { case "": - return this.error(De.EXPECT_ARGUMENT_TYPE, yi(o, h)); + return this.error(He.EXPECT_ARGUMENT_TYPE, yi(o, h)); case "number": case "date": case "time": @@ -4468,7 +4468,7 @@ this.bumpSpace(); var c = this.clonePosition(); if ((b = this.parseSimpleArgStyleIfPossible()).err) return b; - if (0 === (m = Hi(b.val)).length) return this.error(De.EXPECT_ARGUMENT_STYLE, yi(this.clonePosition(), this.clonePosition())); + if (0 === (m = Di(b.val)).length) return this.error(He.EXPECT_ARGUMENT_STYLE, yi(this.clonePosition(), this.clonePosition())); l = { style: m, styleLocation: yi(c, this.clonePosition()) @@ -4476,7 +4476,7 @@ } if ((_ = this.tryParseArgumentClose(s)).err) return _; var d = yi(s, this.clonePosition()); - if (l && $i(null == l ? void 0 : l.style, "::", 0)) { + if (l && Ci(null == l ? void 0 : l.style, "::", 0)) { var u = Mi(l.style.slice(2)); if ("number" === a) return (b = this.parseNumberSkeletonFromString(u, l.styleLocation)).err ? b : { val: { @@ -4487,7 +4487,7 @@ }, err: null }; - if (0 === u.length) return this.error(De.EXPECT_DATE_TIME_SKELETON, d); + if (0 === u.length) return this.error(He.EXPECT_DATE_TIME_SKELETON, d); var p = u; this.locale && (p = function (t, e) { for (var i = "", r = 0; r < t.length; r++) { @@ -4532,14 +4532,14 @@ case "selectordinal": case "select": var g = this.clonePosition(); - if (this.bumpSpace(), !this.bumpIf(",")) return this.error(De.EXPECT_SELECT_ARGUMENT_OPTIONS, yi(g, r({}, g))); + if (this.bumpSpace(), !this.bumpIf(",")) return this.error(He.EXPECT_SELECT_ARGUMENT_OPTIONS, yi(g, r({}, g))); this.bumpSpace(); var f = this.parseIdentifierIfPossible(), y = 0; if ("select" !== a && "offset" === f.value) { - if (!this.bumpIf(":")) return this.error(De.EXPECT_PLURAL_ARGUMENT_OFFSET_VALUE, yi(this.clonePosition(), this.clonePosition())); + if (!this.bumpIf(":")) return this.error(He.EXPECT_PLURAL_ARGUMENT_OFFSET_VALUE, yi(this.clonePosition(), this.clonePosition())); var b; - if (this.bumpSpace(), (b = this.tryParseDecimalInteger(De.EXPECT_PLURAL_ARGUMENT_OFFSET_VALUE, De.INVALID_PLURAL_ARGUMENT_OFFSET_VALUE)).err) return b; + if (this.bumpSpace(), (b = this.tryParseDecimalInteger(He.EXPECT_PLURAL_ARGUMENT_OFFSET_VALUE, He.INVALID_PLURAL_ARGUMENT_OFFSET_VALUE)).err) return b; this.bumpSpace(), f = this.parseIdentifierIfPossible(), y = b.val; } var _, @@ -4567,10 +4567,10 @@ err: null }; default: - return this.error(De.INVALID_ARGUMENT_TYPE, yi(o, h)); + return this.error(He.INVALID_ARGUMENT_TYPE, yi(o, h)); } }, t.prototype.tryParseArgumentClose = function (t) { - return this.isEOF() || 125 !== this.char() ? this.error(De.EXPECT_ARGUMENT_CLOSING_BRACE, yi(t, this.clonePosition())) : (this.bump(), { + return this.isEOF() || 125 !== this.char() ? this.error(He.EXPECT_ARGUMENT_CLOSING_BRACE, yi(t, this.clonePosition())) : (this.bump(), { val: !0, err: null }); @@ -4580,7 +4580,7 @@ case 39: this.bump(); var i = this.clonePosition(); - if (!this.bumpUntil("'")) return this.error(De.UNCLOSED_QUOTE_IN_ARGUMENT_STYLE, yi(i, this.clonePosition())); + if (!this.bumpUntil("'")) return this.error(He.UNCLOSED_QUOTE_IN_ARGUMENT_STYLE, yi(i, this.clonePosition())); this.bump(); break; case 123: @@ -4620,7 +4620,7 @@ return i; }(t); } catch (t) { - return this.error(De.INVALID_NUMBER_SKELETON, e); + return this.error(He.INVALID_NUMBER_SKELETON, e); } return { val: { @@ -4636,14 +4636,14 @@ if (0 === h.length) { var c = this.clonePosition(); if ("select" === e || !this.bumpIf("=")) break; - var d = this.tryParseDecimalInteger(De.EXPECT_PLURAL_ARGUMENT_SELECTOR, De.INVALID_PLURAL_ARGUMENT_SELECTOR); + var d = this.tryParseDecimalInteger(He.EXPECT_PLURAL_ARGUMENT_SELECTOR, He.INVALID_PLURAL_ARGUMENT_SELECTOR); if (d.err) return d; l = yi(c, this.clonePosition()), h = this.message.slice(c.offset, this.offset()); } - if (a.has(h)) return this.error("select" === e ? De.DUPLICATE_SELECT_ARGUMENT_SELECTOR : De.DUPLICATE_PLURAL_ARGUMENT_SELECTOR, l); + if (a.has(h)) return this.error("select" === e ? He.DUPLICATE_SELECT_ARGUMENT_SELECTOR : He.DUPLICATE_PLURAL_ARGUMENT_SELECTOR, l); "other" === h && (n = !0), this.bumpSpace(); var u = this.clonePosition(); - if (!this.bumpIf("{")) return this.error("select" === e ? De.EXPECT_SELECT_ARGUMENT_SELECTOR_FRAGMENT : De.EXPECT_PLURAL_ARGUMENT_SELECTOR_FRAGMENT, yi(this.clonePosition(), this.clonePosition())); + if (!this.bumpIf("{")) return this.error("select" === e ? He.EXPECT_SELECT_ARGUMENT_SELECTOR_FRAGMENT : He.EXPECT_PLURAL_ARGUMENT_SELECTOR_FRAGMENT, yi(this.clonePosition(), this.clonePosition())); var p = this.parseMessage(t + 1, e, i); if (p.err) return p; var m = this.tryParseArgumentClose(u); @@ -4653,7 +4653,7 @@ location: yi(u, this.clonePosition()) }]), a.add(h), this.bumpSpace(), h = (s = this.parseIdentifierIfPossible()).value, l = s.location; } - return 0 === o.length ? this.error("select" === e ? De.EXPECT_SELECT_ARGUMENT_SELECTOR : De.EXPECT_PLURAL_ARGUMENT_SELECTOR, yi(this.clonePosition(), this.clonePosition())) : this.requiresOtherClause && !n ? this.error(De.MISSING_OTHER_CLAUSE, yi(this.clonePosition(), this.clonePosition())) : { + return 0 === o.length ? this.error("select" === e ? He.EXPECT_SELECT_ARGUMENT_SELECTOR : He.EXPECT_PLURAL_ARGUMENT_SELECTOR, yi(this.clonePosition(), this.clonePosition())) : this.requiresOtherClause && !n ? this.error(He.MISSING_OTHER_CLAUSE, yi(this.clonePosition(), this.clonePosition())) : { val: o, err: null }; @@ -4702,7 +4702,7 @@ 10 === t ? (this.position.line += 1, this.position.column = 1, this.position.offset += 1) : (this.position.column += 1, this.position.offset += t < 65536 ? 1 : 2); } }, t.prototype.bumpIf = function (t) { - if ($i(this.message, t, this.offset())) { + if (Ci(this.message, t, this.offset())) { for (var e = 0; e < t.length; e++) this.bump(); return !0; } @@ -4729,10 +4729,10 @@ return null != i ? i : null; }, t; }(); - function Ni(t) { + function Fi(t) { return t >= 97 && t <= 122 || t >= 65 && t <= 90; } - function Fi(t) { + function Ni(t) { return 45 === t || 46 === t || t >= 48 && t <= 57 || 95 === t || t >= 97 && t <= 122 || t >= 65 && t <= 90 || 183 == t || t >= 192 && t <= 214 || t >= 216 && t <= 246 || t >= 248 && t <= 893 || t >= 895 && t <= 8191 || t >= 8204 && t <= 8205 || t >= 8255 && t <= 8256 || t >= 8304 && t <= 8591 || t >= 11264 && t <= 12271 || t >= 12289 && t <= 55295 || t >= 63744 && t <= 64975 || t >= 65008 && t <= 65533 || t >= 65536 && t <= 983039; } function Bi(t) { @@ -4743,7 +4743,7 @@ } function Ui(t) { t.forEach(function (t) { - if (delete t.location, We(t) || Xe(t)) for (var e in t.options) delete t.options[e].location, Ui(t.options[e].value);else je(t) && qe(t.style) || (Ge(t) || Ve(t)) && Je(t.style) ? delete t.style.location : Ke(t) && Ui(t.children); + if (delete t.location, We(t) || Ze(t)) for (var e in t.options) delete t.options[e].location, Ui(t.options[e].value);else je(t) && qe(t.style) || (Ge(t) || Ve(t)) && Je(t.style) ? delete t.style.location : Ke(t) && Ui(t.children); }); } function Ri(t, e) { @@ -4753,7 +4753,7 @@ }, e); var i = new Ii(t, e).parse(); if (i.err) { - var s = SyntaxError(De[i.err.kind]); + var s = SyntaxError(He[i.err.kind]); throw s.location = i.err.location, s.originalMessage = i.err.message, s; } return (null == e ? void 0 : e.captureLocation) || Ui(i.val), i.val; @@ -4787,18 +4787,18 @@ var Wi = function () { return JSON.stringify(arguments); }; - function Xi() { + function Zi() { this.cache = Object.create(null); } - Xi.prototype.get = function (t) { + Zi.prototype.get = function (t) { return this.cache[t]; - }, Xi.prototype.set = function (t, e) { + }, Zi.prototype.set = function (t, e) { this.cache[t] = e; }; - var Zi, + var Xi, Ki = { create: function () { - return new Xi(); + return new Zi(); } }, qi = { @@ -4811,7 +4811,7 @@ }; !function (t) { t.MISSING_VALUE = "MISSING_VALUE", t.INVALID_VALUE = "INVALID_VALUE", t.MISSING_INTL_API = "MISSING_INTL_API"; - }(Zi || (Zi = {})); + }(Xi || (Xi = {})); var Ji, Qi = function (t) { function e(e, i, r) { @@ -4824,19 +4824,19 @@ }(Error), tr = function (t) { function e(e, i, r, s) { - return t.call(this, 'Invalid values for "'.concat(e, '": "').concat(i, '". Options are "').concat(Object.keys(r).join('", "'), '"'), Zi.INVALID_VALUE, s) || this; + return t.call(this, 'Invalid values for "'.concat(e, '": "').concat(i, '". Options are "').concat(Object.keys(r).join('", "'), '"'), Xi.INVALID_VALUE, s) || this; } return i(e, t), e; }(Qi), er = function (t) { function e(e, i, r) { - return t.call(this, 'Value for "'.concat(e, '" must be of type ').concat(i), Zi.INVALID_VALUE, r) || this; + return t.call(this, 'Value for "'.concat(e, '" must be of type ').concat(i), Xi.INVALID_VALUE, r) || this; } return i(e, t), e; }(Qi), ir = function (t) { function e(e, i) { - return t.call(this, 'The intl string context variable "'.concat(e, '" was not provided to the string "').concat(i, '"'), Zi.MISSING_VALUE, i) || this; + return t.call(this, 'The intl string context variable "'.concat(e, '" was not provided to the string "').concat(i, '"'), Xi.MISSING_VALUE, i) || this; } return i(e, t), e; }(Qi); @@ -4853,7 +4853,7 @@ if (Ye(c)) a.push({ type: Ji.literal, value: c.value - });else if (Ze(c)) "number" == typeof n && a.push({ + });else if (Xe(c)) "number" == typeof n && a.push({ type: Ji.literal, value: i.getNumberFormat(e).format(n) });else { @@ -4899,10 +4899,10 @@ if (We(c)) { if (!(b = c.options[u] || c.options.other)) throw new tr(c.value, u, Object.keys(c.options), o); a.push.apply(a, sr(b.value, e, i, r, s)); - } else if (Xe(c)) { + } else if (Ze(c)) { var b; if (!(b = c.options["=".concat(u)])) { - if (!Intl.PluralRules) throw new Qi('Intl.PluralRules is not available in this environment.\nTry polyfilling it using "@formatjs/intl-pluralrules"\n', Zi.MISSING_INTL_API, o); + if (!Intl.PluralRules) throw new Qi('Intl.PluralRules is not available in this environment.\nTry polyfilling it using "@formatjs/intl-pluralrules"\n', Xi.MISSING_INTL_API, o); var _ = i.getPluralRules(e, { type: c.pluralType }).select(u - (c.offset || 0)); @@ -5135,7 +5135,7 @@ const t = { display: this.showVideo ? "block" : "none" }; - return Z` + return X`
`; @@ -5217,10 +5217,10 @@ var e, i, r, s; super.willUpdate(t), t.has("hass") && this.hass.language !== this.language && (this.language = this.hass.language), t.has("box_id") && (1 === this.box_id ? (this._runoutRefillId = fr, this._spoolsEntityId = br) : (this._runoutRefillId = gr, this._spoolsEntityId = yr)), (t.has("hass") || t.has("printerEntities") || t.has("printerEntityIdPart")) && (this.spoolList = jt(this.hass, this.printerEntities, this.printerEntityIdPart, this._spoolsEntityId, "not loaded", { spool_info: [] - }).attributes.spool_info, this._runoutRefillState = (e = this.hass, i = this.printerEntities, r = this.printerEntityIdPart, s = this._runoutRefillId, Ft(e, Rt(i, r, "switch", s)))); + }).attributes.spool_info, this._runoutRefillState = (e = this.hass, i = this.printerEntities, r = this.printerEntityIdPart, s = this._runoutRefillId, Nt(e, Rt(i, r, "switch", s)))); } render() { - return Z` + return X`