@openremote/or-attribute-input 1.13.0-snapshot.20251223090643 → 1.13.0-snapshot.20251224151500

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -67,7 +67,7 @@ ${c.shaderPreludeCode.vertexSource}`,define:c.shaderDefine},defaultProjectionDat
67
67
  :host([hidden]) {
68
68
  display: none;
69
69
  }
70
- `,tH([eO({type:String})],tU.prototype,"value",void 0),tH([eO({type:Object})],tU.prototype,"options",void 0),tU=tH([ez("or-translate")],tU),function(t){t.CREATE="CREATE",t.UPDATE="UPDATE",t.DELETE="DELETE"}(aT||(aT={})),function(t){t.LOW="LOW",t.MEDIUM="MEDIUM",t.HIGH="HIGH"}(aR||(aR={})),function(t){t.MANUAL="MANUAL",t.CLIENT="CLIENT",t.GLOBAL_RULESET="GLOBAL_RULESET",t.REALM_RULESET="REALM_RULESET",t.ASSET_RULESET="ASSET_RULESET",t.AGENT="AGENT"}(aW||(aW={})),function(t){t.OPEN="OPEN",t.ACKNOWLEDGED="ACKNOWLEDGED",t.IN_PROGRESS="IN_PROGRESS",t.RESOLVED="RESOLVED",t.CLOSED="CLOSED"}(aC||(aC={})),function(t){t.BOTTOM_LEFT="BOTTOM_LEFT",t.BOTTOM_RIGHT="BOTTOM_RIGHT",t.TOP_LEFT="TOP_LEFT",t.TOP_RIGHT="TOP_RIGHT"}(aS||(aS={})),function(t){t.CREATE="CREATE",t.READ="READ",t.UPDATE="UPDATE",t.DELETE="DELETE"}(aD||(aD={})),function(t){t.NONE="NONE",t.FORECAST="FORECAST",t.SETPOINT="SETPOINT"}(aI||(aI={})),function(t){t.DISCONNECTED="DISCONNECTED",t.CONNECTING="CONNECTING",t.DISCONNECTING="DISCONNECTING",t.CONNECTED="CONNECTED",t.DISABLED="DISABLED",t.WAITING="WAITING",t.ERROR="ERROR",t.STOPPED="STOPPED"}(aN||(aN={})),function(t){t.EV="EV",t.PHEV="PHEV"}(aB||(aB={})),function(t){t.YAZAKI="YAZAKI",t.MENNEKES="MENNEKES",t.LE_GRAND="LE_GRAND",t.CHADEMO="CHADEMO",t.COMBO="COMBO",t.SCHUKO="SCHUKO",t.ENERGYLOCK="ENERGYLOCK"}(aP||(aP={})),function(t){t.SOUTH="SOUTH",t.EAST_WEST="EAST_WEST"}(a$||(a$={})),function(t){t.REQUEST_START="REQUEST_START",t.REQUEST_REPEATING="REQUEST_REPEATING",t.REQUEST_CANCEL="REQUEST_CANCEL",t.READY="READY",t.COMPLETED="COMPLETED",t.RUNNING="RUNNING",t.CANCELLED="CANCELLED"}(aj||(aj={})),function(t){t.TOGGLE="TOGGLE",t.INCREMENT="INCREMENT",t.DECREMENT="DECREMENT",t.NEGATE="NEGATE"}(aY||(aY={})),function(t){t.ASSET_NOT_FOUND="ASSET_NOT_FOUND",t.ATTRIBUTE_NOT_FOUND="ATTRIBUTE_NOT_FOUND",t.INSUFFICIENT_ACCESS="INSUFFICIENT_ACCESS",t.INVALID_VALUE="INVALID_VALUE",t.INTERCEPTOR_FAILURE="INTERCEPTOR_FAILURE",t.STATE_STORAGE_FAILED="STATE_STORAGE_FAILED",t.CANNOT_PROCESS="CANNOT_PROCESS",t.QUEUE_FULL="QUEUE_FULL",t.UNKNOWN="UNKNOWN",t.ASSET_ID_MISSING="ASSET_ID_MISSING",t.ATTRIBUTE_NAME_MISSING="ATTRIBUTE_NAME_MISSING"}(aX||(aX={})),function(t){t.PUBLIC="PUBLIC",t.SHARED="SHARED",t.PRIVATE="PRIVATE"}(aH||(aH={})),function(t){t.OFF="OFF",t.ONE_MIN="ONE_MIN",t.FIVE_MIN="FIVE_MIN",t.QUARTER="QUARTER",t.ONE_HOUR="ONE_HOUR"}(aU||(aU={})),function(t){t.WRAP_TO_SINGLE_COLUMN="WRAP_TO_SINGLE_COLUMN",t.KEEP_LAYOUT="KEEP_LAYOUT",t.REDIRECT="REDIRECT",t.BLOCK_DEVICE="BLOCK_DEVICE"}(aV||(aV={})),function(t){t.MINUTE="MINUTE",t.HOUR="HOUR",t.DAY="DAY",t.WEEK="WEEK",t.MONTH="MONTH",t.YEAR="YEAR"}(aG||(aG={})),function(t){t.MIN="MIN",t.AVG="AVG",t.MAX="MAX",t.DIFFERENCE="DIFFERENCE",t.COUNT="COUNT",t.SUM="SUM",t.MODE="MODE",t.MEDIAN="MEDIAN"}(aK||(aK={})),function(t){t.TERMINATING="TERMINATING",t.DISABLED="DISABLED",t.ALREADY_CONNECTED="ALREADY_CONNECTED",t.UNRECOGNISED="UNRECOGNISED",t.PERMANENT_ERROR="PERMANENT_ERROR",t.SYNC_ERROR="SYNC_ERROR"}(aZ||(aZ={})),function(t){t.HTTPS="HTTPS",t.HTTP="HTTP",t.TCP="TCP"}(aJ||(aJ={})),function(t){t.GET="GET",t.POST="POST",t.PUT="PUT",t.DELETE="DELETE",t.OPTIONS="OPTIONS",t.PATCH="PATCH"}(aQ||(aQ={})),function(t){t.KEYCLOAK="KEYCLOAK",t.BASIC="BASIC",t.NONE="NONE"}(a0||(a0={})),function(t){t.WEBSOCKET="WEBSOCKET",t.POLLING="POLLING"}(a1||(a1={})),function(t){t.VECTOR="VECTOR",t.RASTER="RASTER"}(a2||(a2={})),function(t){t.INTERNAL="INTERNAL",t.CLIENT="CLIENT",t.GLOBAL_RULESET="GLOBAL_RULESET",t.REALM_RULESET="REALM_RULESET",t.ASSET_RULESET="ASSET_RULESET"}(a3||(a3={})),function(t){t.REALM="REALM",t.USER="USER",t.ASSET="ASSET",t.CUSTOM="CUSTOM"}(a4||(a4={})),function(t){t.NORMAL="NORMAL",t.HIGH="HIGH"}(a5||(a5={})),function(t){t.DEVICE="DEVICE",t.TOPIC="TOPIC",t.CONDITION="CONDITION"}(a6||(a6={})),function(t){t.ALWAYS="ALWAYS",t.ONCE="ONCE",t.HOURLY="HOURLY",t.DAILY="DAILY",t.WEEKLY="WEEKLY",t.MONTHLY="MONTHLY",t.ANNUALLY="ANNUALLY"}(a8||(a8={})),function(t){t.MESSAGE_INVALID="MESSAGE_INVALID",t.CERTIFICATE_INVALID="CERTIFICATE_INVALID",t.UNAUTHORIZED="UNAUTHORIZED",t.FORBIDDEN="FORBIDDEN",t.UNIQUE_ID_MISMATCH="UNIQUE_ID_MISMATCH",t.CONFIG_DISABLED="CONFIG_DISABLED",t.USER_DISABLED="USER_DISABLED",t.SERVER_ERROR="SERVER_ERROR",t.ASSET_ERROR="ASSET_ERROR",t.SERVER_BUSY="SERVER_BUSY"}(a7||(a7={})),function(t){t.PRIVATE="PRIVATE",t.PROTECTED="PROTECTED",t.PUBLIC="PUBLIC"}(a9||(a9={})),function(t){t.EXACT="EXACT",t.BEGIN="BEGIN",t.END="END",t.CONTAINS="CONTAINS"}(se||(se={})),function(t){t.EQUALS="EQUALS",t.GREATER_THAN="GREATER_THAN",t.GREATER_EQUALS="GREATER_EQUALS",t.LESS_THAN="LESS_THAN",t.LESS_EQUALS="LESS_EQUALS",t.BETWEEN="BETWEEN"}(st||(st={})),function(t){t.CREATED_ON="CREATED_ON",t.NAME="NAME",t.ASSET_TYPE="ASSET_TYPE",t.PARENT_ID="PARENT_ID",t.REALM="REALM"}(sn||(sn={})),function(t){t.RESTRICTED="RESTRICTED",t.LINKED="LINKED",t.REALM="REALM"}(si||(si={})),function(t){t.AT_LEAST_ONE="AT_LEAST_ONE",t.ALL="ALL",t.NONE="NONE"}(so||(so={})),function(t){t.AND="AND",t.OR="OR"}(sr||(sr={})),function(t){t.CREATED_ON="CREATED_ON",t.FIRST_NAME="FIRST_NAME",t.LAST_NAME="LAST_NAME",t.USERNAME="USERNAME",t.EMAIL="EMAIL"}(sa||(sa={})),function(t){t.STOPPED="STOPPED",t.RUNNING="RUNNING",t.ERROR="ERROR"}(ss||(ss={})),function(t){t.JAVASCRIPT="JAVASCRIPT",t.GROOVY="GROOVY",t.JSON="JSON",t.FLOW="FLOW"}(sc||(sc={})),function(t){t.READY="READY",t.DEPLOYED="DEPLOYED",t.COMPILATION_ERROR="COMPILATION_ERROR",t.VALIDITY_PERIOD_ERROR="VALIDITY_PERIOD_ERROR",t.EXECUTION_ERROR="EXECUTION_ERROR",t.LOOP_ERROR="LOOP_ERROR",t.DISABLED="DISABLED",t.PAUSED="PAUSED",t.EXPIRED="EXPIRED",t.REMOVED="REMOVED",t.EMPTY="EMPTY"}(sl||(sl={})),function(t){t.SUNRISE="SUNRISE",t.SUNSET="SUNSET",t.TWILIGHT_MORNING_VISUAL="TWILIGHT_MORNING_VISUAL",t.TWILIGHT_MORNING_VISUAL_LOWER="TWILIGHT_MORNING_VISUAL_LOWER",t.TWILIGHT_MORNING_HORIZON="TWILIGHT_MORNING_HORIZON",t.TWILIGHT_MORNING_CIVIL="TWILIGHT_MORNING_CIVIL",t.TWILIGHT_MORNING_NAUTICAL="TWILIGHT_MORNING_NAUTICAL",t.TWILIGHT_MORNING_ASTRONOMICAL="TWILIGHT_MORNING_ASTRONOMICAL",t.TWILIGHT_MORNING_GOLDEN_HOUR="TWILIGHT_MORNING_GOLDEN_HOUR",t.TWILIGHT_MORNING_BLUE_HOUR="TWILIGHT_MORNING_BLUE_HOUR",t.TWILIGHT_MORNING_NIGHT_HOUR="TWILIGHT_MORNING_NIGHT_HOUR",t.TWILIGHT_EVENING_VISUAL="TWILIGHT_EVENING_VISUAL",t.TWILIGHT_EVENING_VISUAL_LOWER="TWILIGHT_EVENING_VISUAL_LOWER",t.TWILIGHT_EVENING_HORIZON="TWILIGHT_EVENING_HORIZON",t.TWILIGHT_EVENING_CIVIL="TWILIGHT_EVENING_CIVIL",t.TWILIGHT_EVENING_NAUTICAL="TWILIGHT_EVENING_NAUTICAL",t.TWILIGHT_EVENING_ASTRONOMICAL="TWILIGHT_EVENING_ASTRONOMICAL",t.TWILIGHT_EVENING_GOLDEN_HOUR="TWILIGHT_EVENING_GOLDEN_HOUR",t.TWILIGHT_EVENING_BLUE_HOUR="TWILIGHT_EVENING_BLUE_HOUR",t.TWILIGHT_EVENING_NIGHT_HOUR="TWILIGHT_EVENING_NIGHT_HOUR"}(sd||(sd={})),function(t){t.NUMBER="NUMBER",t.NUMBER_ARRAY="NUMBER_ARRAY",t.STRING="STRING",t.BOOLEAN="BOOLEAN",t.TRIGGER="TRIGGER",t.COLOR="COLOR",t.ANY="ANY"}(sp||(sp={})),function(t){t.NEW_LINE="NEW_LINE",t.SPACER="SPACER"}(su||(su={})),function(t){t.INPUT="INPUT",t.PROCESSOR="PROCESSOR",t.OUTPUT="OUTPUT",t.THEN="THEN"}(sh||(sh={})),function(t){t.TEXT="TEXT",t.MULTILINE="MULTILINE",t.NUMBER="NUMBER",t.DROPDOWN="DROPDOWN",t.DOUBLE_DROPDOWN="DOUBLE_DROPDOWN",t.CHECKBOX="CHECKBOX",t.ASSET_ATTRIBUTE="ASSET_ATTRIBUTE",t.COLOR="COLOR",t.DATE="DATE"}(sb||(sb={})),function(t){t.ADD="ADD",t.ADD_OR_REPLACE="ADD_OR_REPLACE",t.REPLACE="REPLACE",t.DELETE="DELETE",t.CLEAR="CLEAR"}(sf||(sf={})),function(t){t.PER_ASSET="PER_ASSET",t.GLOBAL="GLOBAL"}(sm||(sm={})),function(t){t.READ_ADMIN="read:admin",t.READ_LOGS="read:logs",t.READ_USERS="read:users",t.READ_MAP="read:map",t.READ_ASSETS="read:assets",t.READ_RULES="read:rules",t.READ_INSIGHTS="read:insights",t.READ_ALARMS="read:alarms",t.READ_SERVICES="read:services",t.WRITE_SERVICES="write:services",t.WRITE_USER="write:user",t.WRITE_ADMIN="write:admin",t.WRITE_LOGS="write:logs",t.WRITE_ASSETS="write:assets",t.WRITE_ATTRIBUTES="write:attributes",t.WRITE_RULES="write:rules",t.WRITE_INSIGHTS="write:insights",t.WRITE_ALARMS="write:alarms",t.READ="read",t.WRITE="write"}(sM||(sM={})),function(t){t.REGISTER="REGISTER",t.UPDATE="UPDATE",t.DEREGISTER="DEREGISTER"}(sg||(sg={})),function(t){t.AVAILABLE="AVAILABLE",t.UNAVAILABLE="UNAVAILABLE"}(sz||(sz={})),function(t){t.ASSET="ASSET",t.AGENT="AGENT",t.NOTIFICATION="NOTIFICATION",t.ALARM="ALARM",t.RULES="RULES",t.PROTOCOL="PROTOCOL",t.GATEWAY="GATEWAY",t.MODEL_AND_VALUES="MODEL_AND_VALUES",t.API="API",t.DATA="DATA"}(s_||(s_={})),function(t){t.INFO="INFO",t.WARN="WARN",t.ERROR="ERROR"}(sO||(sO={})),function(t){t.NUMERIC="numeric",t.DIGIT_2="2-digit",t.FULL="full",t.LONG="long",t.MEDIUM="medium",t.SHORT="short",t.NARROW="narrow"}(sy||(sy={})),function(t){t.SECONDLY="SECONDLY",t.MINUTELY="MINUTELY",t.HOURLY="HOURLY",t.DAILY="DAILY",t.WEEKLY="WEEKLY",t.MONTHLY="MONTHLY",t.YEARLY="YEARLY"}(sA||(sA={})),function(t){t.OMIT="OMIT",t.BACKWARD="BACKWARD",t.FORWARD="FORWARD"}(sv||(sv={})),function(t){t.JAPANESE="JAPANESE",t.BUDDHIST="BUDDHIST",t.ROC="ROC",t.ISLAMIC="ISLAMIC",t.ISO8601="ISO8601",t.CHINESE="CHINESE",t.ETHIOPIC="ETHIOPIC",t.HEBREW="HEBREW",t.GREGORIAN="GREGORIAN"}(sx||(sx={})),function(t){t.SU="SU",t.MO="MO",t.TU="TU",t.WE="WE",t.TH="TH",t.FR="FR",t.SA="SA"}(sw||(sw={})),function(t){t.PEOPLECOUNTERASSET="PeopleCounterAsset",t.STORAGESIMULATORAGENT="StorageSimulatorAgent",t.CITYASSET="CityAsset",t.ELECTRICITYCONSUMERASSET="ElectricityConsumerAsset",t.ELECTRICVEHICLEASSET="ElectricVehicleAsset",t.CONSOLEASSET="ConsoleAsset",t.PRESENCESENSORASSET="PresenceSensorAsset",t.LIGHTASSET="LightAsset",t.THETHINGSSTACKAGENT="TheThingsStackAgent",t.PLUGASSET="PlugAsset",t.ELECTRICITYCHARGERASSET="ElectricityChargerAsset",t.ELECTRICITYBATTERYASSET="ElectricityBatteryAsset",t.ELECTRICITYSUPPLIERASSET="ElectricitySupplierAsset",t.TCPAGENT="TCPAgent",t.SERIALAGENT="SerialAgent",t.BLUETOOTHMESHAGENT="BluetoothMeshAgent",t.SNMPAGENT="SNMPAgent",t.GROUPASSET="GroupAsset",t.BUILDINGASSET="BuildingAsset",t.ELECTRICITYPRODUCERWINDASSET="ElectricityProducerWindAsset",t.ENVIRONMENTSENSORASSET="EnvironmentSensorAsset",t.MQTTAGENT="MQTTAgent",t.MICROPHONEASSET="MicrophoneAsset",t.MODBUSTCPAGENT="ModbusTcpAgent",t.HTTPAGENT="HTTPAgent",t.DOORASSET="DoorAsset",t.ELECTRICITYPRODUCERASSET="ElectricityProducerAsset",t.MAILAGENT="MailAgent",t.UDPAGENT="UDPAgent",t.ROOMASSET="RoomAsset",t.VENTILATIONASSET="VentilationAsset",t.TRADFRILIGHTASSET="TradfriLightAsset",t.KNXAGENT="KNXAgent",t.OPENWEATHERMAPAGENT="OpenWeatherMapAgent",t.CHIRPSTACKAGENT="ChirpStackAgent",t.WEATHERASSET="WeatherAsset",t.THINGASSET="ThingAsset",t.WEBSOCKETAGENT="WebsocketAgent",t.GATEWAYASSET="GatewayAsset",t.PARKINGASSET="ParkingAsset",t.TRADFRIPLUGASSET="TradfriPlugAsset",t.SIMULATORAGENT="SimulatorAgent",t.MODBUSSERIALAGENT="ModbusSerialAgent",t.ELECTRICVEHICLEFLEETGROUPASSET="ElectricVehicleFleetGroupAsset",t.VELBUSTCPAGENT="VelbusTCPAgent",t.ARTNETLIGHTASSET="ArtnetLightAsset",t.VELBUSSERIALAGENT="VelbusSerialAgent",t.GROUNDWATERSENSORASSET="GroundwaterSensorAsset",t.ELECTRICITYPRODUCERSOLARASSET="ElectricityProducerSolarAsset",t.ENERGYOPTIMISATIONASSET="EnergyOptimisationAsset",t.ZWAVEAGENT="ZWaveAgent",t.THERMOSTATASSET="ThermostatAsset",t.SHIPASSET="ShipAsset"}(sq||(sq={})),function(t){t.SUPPORTSEXPORT="supportsExport",t.MQTTPORT="MQTTPort",t.ENERGYSELFCONSUMPTION="energySelfConsumption",t.LASTACCESS="lastAccess",t.CHARGERID="chargerID",t.POSITION="position",t.CARBONSAVING="carbonSaving",t.ROUTINGMODE="routingMode",t.LASTWILLRETAIN="lastWillRetain",t.LASTWILLTOPIC="lastWillTopic",t.SERIALBAUDRATE="serialBaudrate",t.BASEURL="baseURL",t.REQUIREDVALUES="requiredValues",t.FINANCIALSAVING="financialSaving",t.FLEETCATEGORY="fleetCategory",t.GATEWAYSTATUS="gatewayStatus",t.NO2LEVEL="NO2Level",t.ATMOSPHERICPRESSURE="atmosphericPressure",t.TAGS="tags",t.UNLOCK="unlock",t.MILEAGEMIN="mileageMin",t.CHECKINTERVALSECONDS="checkIntervalSeconds",t.LOCATION="location",t.CLIENTSECRET="clientSecret",t.WINDDIRECTION="windDirection",t.WINDSPEED="windSpeed",t.PARTICLESPM10="particlesPM10",t.APPLICATIONKEY="applicationKey",t.POWEREXPORTMAX="powerExportMax",t.SETWINDACTUALVALUEWITHFORECAST="setWindActualValueWithForecast",t.WATERLEVEL="waterLevel",t.CONSOLENAME="consoleName",t.CONNECTHEADERS="connectHeaders",t.WEBSOCKETQUERY="websocketQuery",t.PREFERHTML="preferHTML",t.COOLING="cooling",t.POLLINGMILLIS="pollingMillis",t.SOILTEMPERATURE="soilTemperature",t.SUNIRRADIANCE="sunIrradiance",t.ODOMETER="odometer",t.SUPPORTSIMPORT="supportsImport",t.MESSAGEMAXLENGTH="messageMaxLength",t.WINDGUSTSPEED="windGustSpeed",t.ENERGYLEVELPERCENTAGEMIN="energyLevelPercentageMin",t.LIGHTID="lightId",t.POWER="power",t.STREET="street",t.DELETEPROCESSEDMAIL="deleteProcessedMail",t.WINDSPEEDMIN="windSpeedMin",t.POWERSETPOINT="powerSetpoint",t.PRESENCE="presence",t.SPACESOCCUPIED="spacesOccupied",t.STARTTLS="startTLS",t.AGENTSTATUS="agentStatus",t.MESSAGECHARSET="messageCharset",t.CERTIFICATEALIAS="certificateAlias",t.PANELPITCH="panelPitch",t.EMAIL="email",t.BINDPORT="bindPort",t.PARTICLESPM1="particlesPM1",t.SPEED="speed",t.ENERGYLEVELPERCENTAGEMAX="energyLevelPercentageMax",t.MESSAGESTRIPDELIMITER="messageStripDelimiter",t.AREA="area",t.COUNTRY="country",t.SHIPTYPE="shipType",t.CONNECTSUBSCRIPTIONS="connectSubscriptions",t.RELATIVEHUMIDITY="relativeHumidity",t.INCLUDEFORECASTWINDSERVICE="includeForecastWindService",t.SOURCEADDRESS="sourceAddress",t.RAINFALL="rainfall",t.ENERGYIMPORTTOTAL="energyImportTotal",t.OAUTHGRANT="oAuthGrant",t.OZONELEVEL="ozoneLevel",t.COUNTINMINUTE="countInMinute",t.PORT="port",t.TUNNELINGSUPPORTED="tunnelingSupported",t.ENINUMBER="ENINumber",t.AGENTDISABLED="agentDisabled",t.DISABLED="disabled",t.FORCECHARGE="forceCharge",t.TIMEINJECTIONINTERVAL="timeInjectionInterval",t.FINANCIALWEIGHTING="financialWeighting",t.ENERGYLEVELPERCENTAGE="energyLevelPercentage",t.SPACESBUFFER="spacesBuffer",t.VEHICLECATEGORY="vehicleCategory",t.FANSPEED="fanSpeed",t.FINANCIALCOST="financialCost",t.NOTES="notes",t.MAILFOLDERNAME="mailFolderName",t.TEMPERATURE="temperature",t.AVAILABLECHARGINGSPACES="availableChargingSpaces",t.ENERGYCAPACITY="energyCapacity",t.POWERIMPORTMIN="powerImportMin",t.INTERVALSIZE="intervalSize",t.SNMPVERSIONVALUE="SNMPVersionValue",t.SOUNDLEVEL="soundLevel",t.UNITID="unitId",t.STOPBITS="stopBits",t.CONNECTURL="connectURL",t.CLIENTID="clientId",t.VEHICLEID="vehicleID",t.SUNAZIMUTH="sunAzimuth",t.AVAILABLEDISCHARGINGSPACES="availableDischargingSpaces",t.WEBSOCKETMODE="websocketMode",t.COLOURTEMPERATURE="colourTemperature",t.VEHICLECONNECTED="vehicleConnected",t.DATABITS="dataBits",t.MILEAGEMINIMUM="mileageMinimum",t.COLOURRGB="colourRGB",t.CARBONIMPORT="carbonImport",t.WILDCARDSUBSCRIPTIONTOPICS="wildcardSubscriptionTopics",t.PRICEHOURLY="priceHourly",t.WINDSPEEDMAX="windSpeedMax",t.PINGDISABLED="pingDisabled",t.FLOW="flow",t.CHILDASSETTYPE="childAssetType",t.NETWORKKEY="networkKey",t.UNIVERSE="universe",t.MSSINUMBER="MSSINumber",t.SUBSCRIBEQOS="subscribeQos",t.LEDCOUNT="lEDCount",t.LOCKED="locked",t.CLOUDCOVERAGE="cloudCoverage",t.PROTOCOL="protocol",t.TARIFFIMPORT="tariffImport",t.ENERGYRENEWABLESHARE="energyRenewableShare",t.REGION="region",t.CONSOLEPLATFORM="consolePlatform",t.POWEREXPORTMIN="powerExportMin",t.EFFICIENCYEXPORT="efficiencyExport",t.CHARGECYCLES="chargeCycles",t.SERIALPORT="serialPort",t.APPLICATIONID="applicationId",t.PANELORIENTATION="panelOrientation",t.LENGTH="length",t.PROBABILITYOFPRECIPITATION="probabilityOfPrecipitation",t.USERNAMEPASSWORD="usernamePassword",t.POWERFORECAST="powerForecast",t.SETACTUALSOLARVALUEWITHFORECAST="setActualSolarValueWithForecast",t.REQUESTQUERYPARAMETERS="requestQueryParameters",t.PROXYADDRESS="proxyAddress",t.MQTTHOST="MQTTHost",t.ENERGYLOCAL="energyLocal",t.ENERGYAUTARKY="energyAutarky",t.MODEL="model",t.MANUFACTURER="manufacturer",t.ONOFF="onOff",t.RESUMESESSION="resumeSession",t.TARIFFEXPORT="tariffExport",t.APIKEY="ApiKey",t.CITY="city",t.CONNECTORTYPE="connectorType",t.ENERGYEXPORTTOTAL="energyExportTotal",t.CARBONEXPORT="carbonExport",t.REQUESTTIMEOUTMILLIS="requestTimeoutMillis",t.ENERGYLEVEL="energyLevel",t.OPTIMISATIONDISABLED="optimisationDisabled",t.WEBSOCKETPATH="websocketPath",t.WINDSPEEDREFERENCE="windSpeedReference",t.PRICEDAILY="priceDaily",t.COUNTGROWTHMINUTE="countGrowthMinute",t.IMONUMBER="IMONumber",t.ATTRIBUTION="Attribution",t.INCLUDEFORECASTSOLARSERVICE="includeForecastSolarService",t.REQUESTHEADERS="requestHeaders",t.TENANTID="tenantId",t.HOST="host",t.COUNTOUTMINUTE="countOutMinute",t.ENERGYTYPE="energyType",t.CONSOLEVERSION="consoleVersion",t.MTU="mtu",t.PANELAZIMUTH="panelAzimuth",t.SEQUENCENUMBER="sequenceNumber",t.SUNALTITUDE="sunAltitude",t.COUNTOUT="countOut",t.CHARGERCONNECTED="chargerConnected",t.ROOMNUMBER="roomNumber",t.PARTICLESPM2_5="particlesPM2_5",t.MESSAGESOURCEADDRESS="messageSourceAddress",t.COUNTIN="countIn",t.MILEAGECHARGED="mileageCharged",t.PROVISIONWEATHERASSET="ProvisionWeatherAsset",t.TEMPERATURESETPOINT="temperatureSetpoint",t.CONSOLEPROVIDERS="consoleProviders",t.POWERIMPORTMAX="powerImportMax",t.COUNTTOTAL="countTotal",t.SPACESTOTAL="spacesTotal",t.BINDHOST="bindHost",t.MESSAGECONVERTBINARY="messageConvertBinary",t.MESSAGEDELIMITERS="messageDelimiters",t.EFFICIENCYIMPORT="efficiencyImport",t.SUNZENITH="sunZenith",t.BRIGHTNESS="brightness",t.POSTALCODE="postalCode",t.SPACESOPEN="spacesOpen",t.HUMIDITY="humidity",t.SECUREMODE="secureMode",t.MILEAGECAPACITY="mileageCapacity",t.DIRECTION="direction",t.ENERGYLEVELSCHEDULE="energyLevelSchedule",t.UVINDEX="uVIndex",t.NATMODE="NATMode",t.UPDATEONWRITE="updateOnWrite",t.LASTWILLPAYLOAD="lastWillPayload",t.GROUPID="groupId",t.FOLLOWREDIRECTS="followRedirects",t.CARBONCOST="carbonCost",t.MESSAGECONVERTHEX="messageConvertHex",t.PUBLISHQOS="publishQos"}(sL||(sL={})),function(t){t.FORMAT="format",t.RULESTATE="ruleState",t.HASPREDICTEDDATAPOINTS="hasPredictedDataPoints",t.STOREDATAPOINTS="storeDataPoints",t.LABEL="label",t.CONSTRAINTS="constraints",t.SHOWONDASHBOARD="showOnDashboard",t.READONLY="readOnly",t.MULTILINE="multiline",t.ACCESSPUBLICWRITE="accessPublicWrite",t.MOMENTARY="momentary",t.AGENTLINK="agentLink",t.ACCESSRESTRICTEDREAD="accessRestrictedRead",t.DATAPOINTSMAXAGEDAYS="dataPointsMaxAgeDays",t.ACCESSRESTRICTEDWRITE="accessRestrictedWrite",t.SECRET="secret",t.ATTRIBUTELINKS="attributeLinks",t.RULERESETIMMEDIATE="ruleResetImmediate",t.AGENTLINKCONFIG="agentLinkConfig",t.FORECAST="forecast",t.UNITS="units",t.USERCONNECTED="userConnected",t.ACCESSPUBLICREAD="accessPublicRead"}(sF||(sF={})),function(t){t.WSURL="WS_URL",t.POSITIVENUMBER="positiveNumber",t.VALUEDESCRIPTOR="valueDescriptor",t.LONG="long",t.BOOLEANMAP="booleanMap",t.MQTTQOS="MQTTQos",t.GEOJSONPOINT="GEO_JSONPoint",t.SNMPVERSION="SNMPVersion",t.ASSETTYPE="assetType",t.JSONOBJECT="JSONObject",t.BIGNUMBER="bigNumber",t.IPADDRESS="IPAddress",t.EMAIL="email",t.KNXMESSAGESOURCEADDRESS="kNXMessageSourceAddress",t.ATTRIBUTEREFERENCE="attributeReference",t.INTEGER="integer",t.OAUTHGRANT="oAuthGrant",t.NUMBER="number",t.TEXTMAP="textMap",t.WEBSOCKETSUBSCRIPTION="websocketSubscription",t.BOOLEAN="boolean",t.TIMEANDPERIODDURATIONISO8601="timeAndPeriodDurationISO8601",t.TIMESTAMPISO8601="timestampISO8601",t.MULTIVALUEDTEXTMAP="multivaluedTextMap",t.JSON="JSON",t.INTEGERBYTE="integerByte",t.AGENTLINK="agentLink",t.CALENDAREVENT="calendarEvent",t.CONNECTIONSTATUS="connectionStatus",t.VALUECONSTRAINT="valueConstraint",t.ASSETQUERY="assetQuery",t.COLOURRGB="colourRGB",t.VALUEFORMAT="valueFormat",t.TEXT="text",t.BYTE="byte",t.USERNAMEANDPASSWORD="usernameAndPassword",t.HTTPURL="HTTP_URL",t.ATTRIBUTELINK="attributeLink",t.ASSETID="assetID",t.NUMBERMAP="numberMap",t.HTTPMETHOD="HTTPMethod",t.PANELORIENTATION="panelOrientation",t.ATTRIBUTESTATE="attributeState",t.POSITIVEINTEGER="positiveInteger",t.EXECUTIONSTATUS="executionStatus",t.BIGINTEGER="bigInteger",t.PERIODDURATIONISO8601="periodDurationISO8601",t.DATEANDTIME="dateAndTime",t.CONNECTORTYPE="connectorType",t.NEGATIVEINTEGER="negativeInteger",t.TCPIPPORTNUMBER="TCP_IPPortNumber",t.INTEGERMAP="integerMap",t.ENERGYTYPE="energyType",t.TIMESTAMP="timestamp",t.UUID="UUID",t.FORECASTCONFIGURATION="forecastConfiguration",t.TIMEDURATIONISO8601="timeDurationISO8601",t.CONSOLEPROVIDERS="consoleProviders",t.NEGATIVENUMBER="negativeNumber",t.CRONEXPRESSION="CRONExpression",t.DIRECTION="direction",t.HOSTORIPADDRESS="hostOrIPAddress"}(sk||(sk={})),function(t){t.MONTH="month",t.MILE_SCANDINAVIAN="mile_scandinavian",t.YEAR="year",t.VOLT="volt",t.HERTZ="hertz",t.MILE="mile",t.BTU="btu",t.FOOT="foot",t.MEGA="mega",t.INCH="inch",t.IN_HG="inch_mercury",t.CENTI="centi",t.GRAM="gram",t.KNOT="knot",t.METRE="metre",t.LITRE="litre",t.FLUID_OUNCE="fluid_ounce",t.CELSIUS="celsius",t.DECIBEL="decibel",t.FAHRENHEIT="fahrenheit",t.WATT="watt",t.PEAK="peak",t.MICRO="micro",t.PER="per",t.STONE="stone",t.VAR="var",t.OUNCE="ounce",t.HECTARE="hectare",t.YARD="yard",t.JOULE="joule",t.DEGREE="degree",t.KILO="kilo",t.KELVIN="kelvin",t.CARBON="carbon",t.DECIBEL_ATTENUATED="decibel_attenuated",t.SQUARED="squared",t.PERCENTAGE="percentage",t.CUBED="cubed",t.DAY="day",t.RADIAN="radian",t.OHM="ohm",t.MINUTE="minute",t.PART_PER_MILLION="ppm",t.AMP="amp",t.MASS_POUND="pound",t.HOUR="hour",t.ACRE="acre",t.RPM="rpm",t.PASCAL="pascal",t.LUMEN="lumen",t.WEEK="week",t.GALLON="gallon",t.LUX="lux",t.MILLI="milli",t.BAR="bar",t.HECTO="hecto",t.SECOND="second"}(sE||(sE={})),sT||(sT={});class tV{static getAssetDescriptors(){return tV._assetTypeInfos.map(t=>t.assetDescriptor)}static getMetaItemDescriptors(){return[...this._metaItemDescriptors]}static getValueDescriptors(){return[...this._valueDescriptors]}static getAssetTypeInfos(){return[...this._assetTypeInfos]}static getAssetTypeInfo(t){if(t)return t.assetDescriptor?t:("string"!=typeof t&&(t=t.name),this._assetTypeInfos.find(n=>n.assetDescriptor.name===t))}static getAssetDescriptor(t){if(!t)return;if(t.assetDescriptor)return t.assetDescriptor;if("string"!=typeof t)return t;let n=this._assetTypeInfos.find(n=>n.assetDescriptor.name===t);return n?n.assetDescriptor:void 0}static getAttributeDescriptor(t,n){if(!t)return;let i=this.getAssetTypeInfo(n||"ThingAsset");if(i&&i.attributeDescriptors)return i.attributeDescriptors.find(n=>n.name===t)}static getValueDescriptor(t){let n;if(!t)return;if(t.endsWith("[]"))for(n=0;t.endsWith("[]");)t=t.substring(0,t.length-2),n++;let i=this._valueDescriptors.find(n=>n.name===t);return i&&n&&(i=Object.assign(Object.assign({},i),{arrayDimensions:n})),i}static resolveValueDescriptor(t,n){let i;return n&&("string"==typeof n&&(i=tV.getValueDescriptor(n)),i=n.jsonType?n:tV.getValueDescriptor(n.type)),!i&&t&&(i=tV.getValueDescriptor("JSON")),i}static resolveValueTypeFromValue(t){if(null!=t){if("number"==typeof t)return"number";if("string"==typeof t)return"text";if("boolean"==typeof t)return"boolean";if(Array.isArray(t)){let n=1,i=t.find(t=>null!=t);for(;Array.isArray(i);)i=i.find(t=>null!=t),n++;let o=this.resolveValueTypeFromValue(i);if(!o)return;for(;n>0;)o+="[]",n--;return o}if(t instanceof Date)return"dateAndTime"}}static getAttributeAndValueDescriptors(t,n,i){let o,r;if(n&&"string"!=typeof n)o=n;else{let r=this.getAssetTypeInfo(t||"ThingAsset");if(!r)return[void 0,void 0];"string"==typeof n&&(o=this.getAttributeDescriptor(n,r)),!o&&i&&(o={type:i.type,name:i.name,meta:i.meta})}return o&&(r=this.getValueDescriptor(o.type)),[o,r]}static getMetaItemDescriptor(t){if(t)return this._metaItemDescriptors.find(n=>n.name===t)}static getAssetDescriptorColour(t,n){let i=this.getAssetDescriptor(t);return i&&i.colour?i.colour:n}static getAssetDescriptorIcon(t,n){let i=this.getAssetDescriptor(t);return i&&i.icon?i.icon:n}}tV._assetTypeInfos=[],tV._metaItemDescriptors=[],tV._valueDescriptors=[],i(50488);var tG=i(33348),tK=i.n(tG),tZ=i(53806),tJ=i.n(tZ),tQ=i(92891);class t0{get resolve(){return this._resolve}get reject(){return this._reject}get promise(){return this._promise}constructor(){this._promise=new Promise((t,n)=>{this._resolve=t,this._reject=n}),Object.freeze(this)}}function t1(t,n,i=!0){if(null==t||null==n)return t===n;if(t.constructor!==n.constructor)return!1;if(t instanceof Function||t instanceof RegExp)return t===n;if(t===n||t.valueOf()===n.valueOf())return!0;if(Array.isArray(t)&&t.length!==n.length||t instanceof Date||!(t instanceof Object)||!(n instanceof Object))return!1;if(i){let i=Object.keys(t);return Object.keys(n).every(t=>-1!==i.indexOf(t))&&i.every(i=>t1(t[i],n[i]))}return!1}function t2(t){if(null==t)return"";let n=!1;return t.split(/([A-Z]|\d)/).map((t,i,o)=>{if(!t)return t;if(!n)return n=!0,t.charAt(0).toUpperCase()+t.slice(1);if("_"===t)return" ";if(1===t.length&&t===t.toUpperCase()){let n=!o[i-1]||"_"===o[i-1],r=i+1<o.length&&o[i+1]&&"_"!==o[i+1],a=i+3>o.length||!o[i+1]&&!o[i+3];(!n||r)&&(t=" "+t),!r&&(n||a)||(t=t.toLowerCase())}return t}).join("").trim()}function t3(t,n,i){let o="string"==typeof t?t:t.name;return n&&n.meta&&n.meta.hasOwnProperty(o)?n.meta[o]:i&&i.meta?i.meta[o]:void 0}function t4(t,n){let i="string"==typeof t?tV.getMetaItemDescriptor(t):t;return i?{name:i.name,type:i.type,value:n}:{name:typeof t,type:tV.resolveValueTypeFromValue(n),value:n}}function t5(t,n,i,o,r,a){let s=ne("label",t,n,i,r),c="";if(s||(s=t3("label",t,n&&n.meta?n:void 0)),o&&(c=t7(t9("units",t,n,i,r))),!s){let i=t?t.name:n?"string"==typeof n?n:n.name:void 0;s=a||(i?t2(i):void 0)}return s?s+(c?" ("+c+")":""):c}function t6(t,n,i,o,r,a){let s=t8(t?t.value:void 0,()=>t9("format",t,n,i,r),void 0,a),c=t9("units",t,n,i,!0);return o&&c&&c.length&&(s=t7(t9("units",t,n,i,r),s)),s}function t8(t,n,i,o){let r="";if(null==t)r=o||"";else if("string"==typeof t)r=t;else if("number"==typeof t||"boolean"==typeof t||t instanceof Date){let o=n&&n();if(o&&0!==Object.keys(o).length)switch("number"==typeof t?o.asBoolean?t=!!t:o.asDate&&(t=new Date(t)):"boolean"==typeof t&&o.asNumber&&(t=+!!t),typeof t){case"number":r=new Intl.NumberFormat(i||tX.language,o).format(t);break;case"boolean":o.asOnOff&&(r=t?tX.t("on"):tX.t("off")),o.asOpenClosed&&(r=t?tX.t("open"):tX.t("closed")),o.asPressedReleased&&(r=t?tX.t("pressed"):tX.t("released"));break;case"object":if(o.momentJsFormat)r=tJ()(t).format(o.momentJsFormat);else if(o.iso8601)r=t.toISOString();else if(o.week){var a;let n,i=((a=new Date(Date.UTC((a=t).getFullYear(),a.getMonth(),a.getDate()))).setUTCDate(a.getUTCDate()+4-(a.getUTCDay()||7)),n=new Date(Date.UTC(a.getUTCFullYear(),0,1)),Math.ceil(((a.getTime()-n.getTime())/864e5+1)/7));r="2-digit"===o.week?String(i).padStart(2,"0"):Number(i).toString(10)}else r=new Intl.DateTimeFormat(i||tX.language,o).format(t)}else r=Object(t).toString()}return r}function t7(t,n){if(!t)return"";n||(n="");let i=t.map((t,i)=>{if(3!==t.length||t.toUpperCase()!==t)return tX.t(["units."+t,"or:units."+t]);{let o=new Intl.NumberFormat(tX.language,{currency:t,style:"currency"}).formatToParts();if(0!==i||"currency"!==o[0].type)return"currency"===o[0].type?o[0].value:o[o.length-1].value;if(!n)return o[0].value;n=o[0].value+n}}).join("");return n.length>0?n+" "+i:i}function t9(t,n,i,o,r){let a,s=[],c=ne(t,n&&"string"==typeof n?n:n?n.name:i?"string"==typeof i?i:i.name:void 0,i,o,r);if(c&&(a=JSON.parse(c)))if("format"!==t)return a;else s.push(a);if(n&&n.meta&&(a=t3(t,n,i)))if("format"!==t)return a;else s.push(a);if(i&&"string"!=typeof i&&i.hasOwnProperty(t)){if(a=i[t],"format"!==t)return a;s.push(a)}if(i&&i.type){if(a=tV.getValueDescriptor(i.type)[t],"format"!==t)return a;s.push(a)}if("format"!==t||0===s.length)return a;let l={};return s.reverse().forEach(t=>{l=Object.assign(Object.assign({},l),t)}),l}function ne(t,n,i,o,r,a){let s;if(n?s="string"==typeof n?n:n.name:i&&(s="string"==typeof i?i:i.name),!s)return;let c=[],l=t+"."+(r?"attribute":"meta")+".";if(o&&c.push(l+o+"."+s),i&&"string"!=typeof i&&(c.push(l+i.type+"."+s),c.push(l+i.type)),c.push(l+s),c.length>0)return tX.t(c,{defaultValue:a||""})}function nt(t,n){let i=n.ref.name;if(t.attributes)if(n.deleted)delete t.attributes[i];else{let o=t.attributes[i];o&&(o.value=n.value,o.timestamp=n.timestamp)}return Object.assign({},t)}var nn=function(t,n,i,o){return new(i||(i=Promise))(function(r,a){function s(t){try{l(o.next(t))}catch(t){a(t)}}function c(t){try{l(o.throw(t))}catch(t){a(t)}}function l(t){var n;t.done?r(t.value):((n=t.value)instanceof i?n:new i(function(t){t(n)})).then(s,c)}l((o=o.apply(t,n||[])).next())})};let ni=i(89916);class no{constructor(t,n,i){this._autoEnable=!1,this._initialised=!1,this._initialiseInProgress=!1,this._pendingProviderPromises={},this._providerMessageListeners={},this._pendingProviderEnables=[],this._registrationTimer=null,this._realm=t,this._autoEnable=n,this._enableCompleteCallback=i,window.OpenRemoteConsole=this;let o=new URLSearchParams(window.location.search),r=o.get("consoleName"),a=o.get("consoleVersion"),s=o.get("consolePlatform"),c=o.get("consoleProviders"),l=o.get("consoleAutoEnable"),d=c&&c.length>0?c.split(" "):["push"];this._pendingProviderEnables=d;let p=no._createConsoleRegistration(),u=window.localStorage.getItem("OpenRemoteConsole:"+t);if(u)try{let t=JSON.parse(u);t.id&&(p.id=t.id),t.name&&(p.name=t.name),t.providers&&(p.providers=t.providers),t.apps&&(p.apps=t.apps)}catch(t){console.error("Failed to deserialise console registration")}let h=p.providers;for(let t of(p.providers={},d)){let n=h&&h.hasOwnProperty(t)?h[t]:{enabled:!1,disabled:!1};p.providers[t]=n}let b=i$.getAppName();b.length>0&&0>p.apps.indexOf(b)&&p.apps.push(b),this._registration=p,r&&(p.name=r),a&&(p.version=a),s&&(p.platform=s),l&&(this._autoEnable="TRUE"===l||"true"===l)}get registration(){return this._registration}get autoEnable(){return this._autoEnable}get pendingProviderEnables(){return this._pendingProviderEnables.slice(0)}get shellApple(){let t=navigator.userAgentData&&navigator.userAgentData.platform?navigator.userAgentData.platform:navigator.platform;return t&&("iP"===t.substring(0,2)||"Mac"===t.substring(0,3))&&window.webkit&&window.webkit.messageHandlers}get shellAndroid(){return!!window.MobileInterface}get isMobile(){return this.shellApple||this.shellAndroid}initialise(){return nn(this,void 0,void 0,function*(){if(!this._initialised&&!this._initialiseInProgress){console.debug("Console: initialising"),this._initialiseInProgress=!0;try{if(this._registration.providers)for(let t of Object.keys(this._registration.providers))yield this._initialiseProvider(t);this._registration.id||(yield this.sendRegistration(0)),this._initialised=!0,this._initialiseInProgress=!1,0===this._pendingProviderEnables.length?(yield this.sendRegistration(),this._callCompletedCallback()):this._autoEnable&&(yield this.enableProviders())}catch(t){console.error(t)}finally{this._initialiseInProgress=!1}}})}enableProviders(){return nn(this,void 0,void 0,function*(){if(!this._initialised)throw Error("Console must be initialised before enabling providers");for(let t=this._pendingProviderEnables.length-1;t>-1;t--){let n=this._pendingProviderEnables[t];yield this.enableProvider(n)}})}enableProvider(t,n){return nn(this,void 0,void 0,function*(){if(!this._initialised)throw console.debug("Console must be initialised before disabling providers"),Error("Console must be initialised before enabling providers");if(!this._registration.providers.hasOwnProperty(t))throw console.debug("Invalid console provider '"+t+"'"),Error("Invalid console provider '"+t+"'");console.debug("Console: enabling provider '"+t+"'");let i={provider:t,action:"PROVIDER_ENABLE",consoleId:this._registration.id,data:n},o=yield this.sendProviderMessage(i,!0);this._registration.providers[t].hasPermission=o.hasPermission,this._registration.providers[t].success=o.success,this._registration.providers[t].enabled=o.success,this._registration.providers[t].data=o.data;let r=this._pendingProviderEnables.indexOf(t);return r>=0&&(this._pendingProviderEnables.splice(r,1),0===this._pendingProviderEnables.length&&(this.sendRegistration(),this._callCompletedCallback())),o})}disableProvider(t){return nn(this,void 0,void 0,function*(){if(!this._initialised)throw console.debug("Console must be initialised before disabling providers"),Error("Console must be initialised before disabling providers");if(!this._registration.providers.hasOwnProperty(t))throw console.debug("Invalid console provider '"+t+"'"),Error("Invalid console provider '"+t+"'");console.debug("Console: disabling provider '"+t+"'");let n=yield this.sendProviderMessage({provider:t,action:"PROVIDER_DISABLE"},!0);return this._registration.providers[t].disabled=!0,this._registration.providers[t].enabled=!1,n})}getProvider(t){return this._registration&&this._registration.providers?this._registration.providers[t]:void 0}sendProviderMessage(t,n){return nn(this,void 0,void 0,function*(){if("storage"!==t.provider&&!this._registration.providers.hasOwnProperty(t.provider))throw console.debug("Invalid console provider '"+t.provider+"'"),Error("Invalid console provider '"+t.provider+"'");if(!n)return void this._doSendProviderMessage(t);let i=t.provider+t.action;if(this._pendingProviderPromises[i])throw Error("Message already pending for provider '"+t.provider+"' with action '"+t.action+"'");let o=new t0,r=()=>{delete this._pendingProviderPromises[i],o.reject("No response from provider")};return this._pendingProviderPromises[i]=[o,window.setTimeout(r,5e3)],this._doSendProviderMessage(t),o.promise})}sendRegistration(t){return this._registrationTimer&&(window.clearTimeout(this._registrationTimer),this._registrationTimer=null),console.debug("Sending registration in: "+(t=void 0!==t?t:2e3)+"ms"),new Promise((t,n)=>{this._registrationTimer=window.setTimeout(()=>{this._registrationTimer=null,console.debug("Console: updating registration");try{this._registration.name||(this._registration.name="Console"),this._registration.platform||(this._registration.platform="N/A"),this._registration.version||(this._registration.version="N/A"),this._registration.providers||(this._registration.providers={}),i$.rest.api.ConsoleResource.register(this._registration).then(n=>{if(200!==n.status)throw Error("Failed to register console");this._registration=n.data,console.debug("Console: registration successful"),console.debug("Console: updating locally stored registration"),window.localStorage.setItem("OpenRemoteConsole:"+this._realm,JSON.stringify(this._registration)),t()})}catch(t){console.error("Failed to register console"),n("Failed to register console")}})})}storeData(t,n){this.sendProviderMessage({provider:"storage",action:"STORE",key:t,value:n},!1)}retrieveData(t){return nn(this,void 0,void 0,function*(){let n=this.sendProviderMessage({provider:"storage",action:"RETRIEVE",key:t},!0);try{let t=yield Promise.race([n,new Promise((t,n)=>setTimeout(n,2e3))]);if(t&&t.value){let n=t.value;return"null"===n?void 0:n}}catch(t){console.log("Failed to retrieve data from storage provider")}})}addProviderMessageListener(t,n){this._providerMessageListeners[t.provider+t.action]=n}removeProviderMessageListener(t){delete this._providerMessageListeners[t.provider+t.action]}_postNativeShellMessage(t){try{if(this.shellAndroid)return window.MobileInterface.postMessage(JSON.stringify(t));if(this.shellApple)return window.webkit.messageHandlers.int.postMessage(t)}catch(t){console.error("Failed to send shell message towards console",t)}}_doSendGenericMessage(t,n){let i={type:t,data:n};this.isMobile?this._postNativeShellMessage(i):console.warn("Failed to send generic message to console.",i)}_doSendProviderMessage(t){if(this.isMobile)this._postNativeShellMessage({type:"provider",data:t});else{if(!t.provider||!t.action)return;switch(t.provider.trim().toUpperCase()){case"PUSH":switch(t.action.trim().toUpperCase()){case"PROVIDER_INIT":this._handleProviderResponse(JSON.stringify({action:"PROVIDER_INIT",provider:"push",version:"web",enabled:!0,disabled:!1,hasPermission:!0,requiresPermission:!1,success:!0}));break;case"PROVIDER_ENABLE":this._handleProviderResponse(JSON.stringify({action:"PROVIDER_ENABLE",provider:"push",hasPermission:!0,success:!0}));break;default:throw Error("Unsupported provider '"+t.provider+"' and action '"+t.action+"'")}break;case"STORAGE":switch(t.action){case"PROVIDER_INIT":this._handleProviderResponse(JSON.stringify({action:"PROVIDER_INIT",provider:"storage",version:"1.0.0",disabled:!1,enabled:!0,hasPermission:!0,requiresPermission:!1,success:!0}));break;case"PROVIDER_ENABLE":this._handleProviderResponse(JSON.stringify({action:"PROVIDER_ENABLE",provider:"storage",hasPermission:!0,success:!0}));break;case"STORE":{let n=t.key?t.key.trim():null;if(!n||0===n.length)throw Error("Storage provider 'store' action requires a `key`");null===t.value?window.localStorage.removeItem(n):window.localStorage.setItem(n,JSON.stringify(t.value))}break;case"RETRIEVE":{let n=t.key?t.key.trim():null;if(!n||0===n.length)throw Error("Storage provider 'retrieve' action requires a `key`");let i=window.localStorage.getItem(n);if(null!==i)try{i=JSON.parse(i)}catch(t){}this._handleProviderResponse(JSON.stringify({action:"RETRIEVE",provider:"storage",key:n,value:i}))}break;default:throw Error("Unsupported provider '"+t.provider+"' and action '"+t.action+"'")}break;default:console.error("Unsupported provider: "+t.provider)}}}_handleProviderResponse(t){if(!t)return;let n=JSON.parse(t),i=n.provider,o=n.action,r=this._pendingProviderPromises[i+o];r&&(window.clearTimeout(r[1]),delete this._pendingProviderPromises[i+o],r[0].resolve(n));let a=this._providerMessageListeners[i+o];a&&a(n)}_callCompletedCallback(){let t=this._enableCompleteCallback;this._enableCompleteCallback=null,t&&window.setTimeout(()=>{t()},0)}static _createConsoleRegistration(){return{name:ni.name,version:ni.version,platform:ni.os.toString(),apps:[],model:((ni.manufacturer?ni.manufacturer+" ":"")+(ni.product?ni.product:"")).trim()}}_initialiseProvider(t){return nn(this,void 0,void 0,function*(){let n;console.debug("Console: initialising provider '"+t+"'");try{n=yield this.sendProviderMessage({provider:t,action:"PROVIDER_INIT"},!0),this._registration.providers[t].version=n.version,this._registration.providers[t].requiresPermission=n.requiresPermission,this._registration.providers[t].hasPermission=n.hasPermission,this._registration.providers[t].success=n.success,this._registration.providers[t].enabled=n.enabled,this._registration.providers[t].disabled=n.disabled,this._registration.providers[t].data=n.data}catch(t){console.error(t),n={action:"",disabled:!1,enabled:!1,hasPermission:!1,provider:"",requiresPermission:!1,version:"",success:!1}}if(n.success||(console.debug("Provider initialisation failed: '"+t+"'"),n.disabled=!0,this._registration.providers[t].disabled=!0),n.disabled||n.enabled){let n=this._pendingProviderEnables.indexOf(t);n>=0&&this._pendingProviderEnables.splice(n,1)}})}}var nr=i(43653),na=i.n(nr);class ns{constructor(t){this.httpClient=t}deleteConnections(t,n){return this.httpClient.request({method:"DELETE",url:nF`gateway/connection`,queryParams:t,options:n})}getConnections(t){return this.httpClient.request({method:"GET",url:nF`gateway/connection`,options:t})}deleteConnection(t,n){return this.httpClient.request({method:"DELETE",url:nF`gateway/connection/${t}`,options:n})}getConnection(t,n){return this.httpClient.request({method:"GET",url:nF`gateway/connection/${t}`,options:n})}setConnection(t,n,i){return this.httpClient.request({method:"PUT",url:nF`gateway/connection/${t}`,data:n,options:i})}getConnectionStatus(t,n){return this.httpClient.request({method:"GET",url:nF`gateway/status/${t}`,options:n})}}class nc{constructor(t){this.httpClient=t}create(t,n){return this.httpClient.request({method:"POST",url:nF`asset`,data:t,options:n})}delete(t,n){return this.httpClient.request({method:"DELETE",url:nF`asset`,queryParams:t,options:n})}writeAttributeValues(t,n){return this.httpClient.request({method:"PUT",url:nF`asset/attributes`,data:t,options:n})}writeAttributeEvents(t,n){return this.httpClient.request({method:"PUT",url:nF`asset/attributes/timestamp`,data:t,options:n})}updateNoneParent(t,n){return this.httpClient.request({method:"DELETE",url:nF`asset/parent`,queryParams:t,options:n})}getPartial(t,n){return this.httpClient.request({method:"GET",url:nF`asset/partial/${t}`,options:n})}queryAssets(t,n){return this.httpClient.request({method:"POST",url:nF`asset/query`,data:t,options:n})}queryAssetTree(t,n){return this.httpClient.request({method:"POST",url:nF`asset/tree`,data:t,options:n})}getCurrentUserAssets(t){return this.httpClient.request({method:"GET",url:nF`asset/user/current`,options:t})}createUserAssetLinks(t,n){return this.httpClient.request({method:"POST",url:nF`asset/user/link`,data:t,options:n})}getUserAssetLinks(t,n){return this.httpClient.request({method:"GET",url:nF`asset/user/link`,queryParams:t,options:n})}deleteUserAssetLinks(t,n){return this.httpClient.request({method:"POST",url:nF`asset/user/link/delete`,data:t,options:n})}deleteAllUserAssetLinks(t,n,i){return this.httpClient.request({method:"DELETE",url:nF`asset/user/link/${t}/${n}`,options:i})}deleteUserAssetLink(t,n,i,o){return this.httpClient.request({method:"DELETE",url:nF`asset/user/link/${t}/${n}/${i}`,options:o})}get(t,n){return this.httpClient.request({method:"GET",url:nF`asset/${t}`,options:n})}update(t,n,i){return this.httpClient.request({method:"PUT",url:nF`asset/${t}`,data:n,options:i})}writeAttributeValue$PUT$asset_assetId_attribute_attributeName(t,n,i,o){return this.httpClient.request({method:"PUT",url:nF`asset/${t}/attribute/${n}`,data:i,options:o})}writeAttributeValue$PUT$asset_assetId_attribute_attributeName_timestamp(t,n,i,o,r){return this.httpClient.request({method:"PUT",url:nF`asset/${t}/attribute/${n}/${i}`,data:o,options:r})}updateParent(t,n,i){return this.httpClient.request({method:"PUT",url:nF`asset/${t}/child`,queryParams:n,options:i})}}class nl{constructor(t){this.httpClient=t}getAllNodeDefinitions(t){return this.httpClient.request({method:"GET",url:nF`flow`,options:t})}getNodeDefinition(t,n){return this.httpClient.request({method:"GET",url:nF`flow/${t}`,options:n})}getAllNodeDefinitionsByType(t,n){return this.httpClient.request({method:"GET",url:nF`flow/${t}`,options:n})}}class nd{constructor(t){this.httpClient=t}createProvisioningConfig(t,n){return this.httpClient.request({method:"POST",url:nF`provisioning`,data:t,options:n})}getProvisioningConfigs(t){return this.httpClient.request({method:"GET",url:nF`provisioning`,options:t})}deleteProvisioningConfig(t,n){return this.httpClient.request({method:"DELETE",url:nF`provisioning/${t}`,options:n})}updateProvisioningConfig(t,n,i){return this.httpClient.request({method:"PUT",url:nF`provisioning/${t}`,data:n,options:i})}}class np{constructor(t){this.httpClient=t}getAssetDescriptors(t,n){return this.httpClient.request({method:"GET",url:nF`model/assetDescriptors`,queryParams:t,options:n})}getAssetInfo(t,n,i){return this.httpClient.request({method:"GET",url:nF`model/assetInfo/${t}`,queryParams:n,options:i})}getAssetInfos(t,n){return this.httpClient.request({method:"GET",url:nF`model/assetInfos`,queryParams:t,options:n})}getValueDescriptorSchema(t,n){return this.httpClient.request({method:"GET",url:nF`model/getValueDescriptorSchema`,queryParams:t,options:n})}getMetaItemDescriptors(t,n){return this.httpClient.request({method:"GET",url:nF`model/metaItemDescriptors`,queryParams:t,options:n})}getValueDescriptors(t,n){return this.httpClient.request({method:"GET",url:nF`model/valueDescriptors`,queryParams:t,options:n})}}class nu{constructor(t){this.httpClient=t}getSettings(t){return this.httpClient.request({method:"GET",url:nF`map`,options:t})}saveSettings(t,n){return this.httpClient.request({method:"PUT",url:nF`map`,data:t,options:n})}deleteMap(t){return this.httpClient.request({method:"DELETE",url:nF`map/deleteMap`,options:t})}getCustomMapInfo(t){return this.httpClient.request({method:"GET",url:nF`map/getCustomMapInfo`,options:t})}getSettingsJs(t){return this.httpClient.request({method:"GET",url:nF`map/js`,options:t})}getTile(t,n,i,o){return this.httpClient.request({method:"GET",url:nF`map/tile/${t}/${n}/${i}`,options:o})}uploadMap(t,n){return this.httpClient.request({method:"POST",url:nF`map/upload`,queryParams:t,options:n})}}class nh{constructor(t){this.httpClient=t}register(t,n){return this.httpClient.request({method:"POST",url:nF`console/register`,data:t,options:n})}}class nb{constructor(t){this.httpClient=t}getApps(t){return this.httpClient.request({method:"GET",url:nF`apps`,options:t})}getConsoleConfig(t){return this.httpClient.request({method:"GET",url:nF`apps/consoleConfig`,options:t})}getAppInfos(t){return this.httpClient.request({method:"GET",url:nF`apps/info`,options:t})}}class nf{constructor(t){this.httpClient=t}getHealthStatus(t){return this.httpClient.request({method:"GET",url:nF`health`,options:t})}getInfo(t){return this.httpClient.request({method:"GET",url:nF`info`,options:t})}}class nm{constructor(t){this.httpClient=t}create(t,n){return this.httpClient.request({method:"POST",url:nF`realm`,data:t,options:n})}getAll(t){return this.httpClient.request({method:"GET",url:nF`realm`,options:t})}getAccessible(t){return this.httpClient.request({method:"GET",url:nF`realm/accessible`,options:t})}delete(t,n){return this.httpClient.request({method:"DELETE",url:nF`realm/${t}`,options:n})}get(t,n){return this.httpClient.request({method:"GET",url:nF`realm/${t}`,options:n})}update(t,n,i){return this.httpClient.request({method:"PUT",url:nF`realm/${t}`,data:n,options:i})}}class nM{constructor(t){this.httpClient=t}getNotifications(t,n){return this.httpClient.request({method:"GET",url:nF`notification`,queryParams:t,options:n})}removeNotifications(t,n){return this.httpClient.request({method:"DELETE",url:nF`notification`,queryParams:t,options:n})}sendNotification(t,n){return this.httpClient.request({method:"POST",url:nF`notification/alert`,data:t,options:n})}removeNotification(t,n){return this.httpClient.request({method:"DELETE",url:nF`notification/${t}`,options:n})}notificationAcknowledged(t,n,i,o){return this.httpClient.request({method:"PUT",url:nF`notification/${t}/acknowledged`,queryParams:i,data:n,options:o})}notificationDelivered(t,n,i){return this.httpClient.request({method:"PUT",url:nF`notification/${t}/delivered`,queryParams:n,options:i})}}class ng{constructor(t){this.httpClient=t}doProtocolAssetDiscovery(t,n,i){return this.httpClient.request({method:"GET",url:nF`agent/assetDiscovery/${t}`,queryParams:n,options:i})}doProtocolAssetImport(t,n,i,o){return this.httpClient.request({method:"POST",url:nF`agent/assetImport/${t}`,queryParams:i,data:n,options:o})}doProtocolInstanceDiscovery(t,n,i){return this.httpClient.request({method:"GET",url:nF`agent/instanceDiscovery/${t}`,queryParams:n,options:i})}}class nz{constructor(t){this.httpClient=t}getConfig(t){return this.httpClient.request({method:"GET",url:nF`syslog/config`,options:t})}updateConfig(t,n){return this.httpClient.request({method:"PUT",url:nF`syslog/config`,data:t,options:n})}clearEvents(t){return this.httpClient.request({method:"DELETE",url:nF`syslog/event`,options:t})}getEvents(t,n){return this.httpClient.request({method:"GET",url:nF`syslog/event`,queryParams:t,options:n})}}class n_{constructor(t){this.httpClient=t}startTunnel(t,n){return this.httpClient.request({method:"POST",url:nF`gateway/tunnel`,data:t,options:n})}stopTunnel(t,n){return this.httpClient.request({method:"DELETE",url:nF`gateway/tunnel`,data:t,options:n})}getAllActiveTunnelInfos(t,n){return this.httpClient.request({method:"GET",url:nF`gateway/tunnel/${t}`,options:n})}getGatewayActiveTunnelInfos(t,n,i){return this.httpClient.request({method:"GET",url:nF`gateway/tunnel/${t}/${n}`,options:i})}getActiveTunnelInfo(t,n,i,o,r){return this.httpClient.request({method:"GET",url:nF`gateway/tunnel/${t}/${n}/${i}/${o}`,options:r})}}class nO{constructor(t){this.httpClient=t}getPredictedDatapoints(t,n,i,o){return this.httpClient.request({method:"POST",url:nF`asset/predicted/${t}/${n}`,data:i,options:o})}writePredictedDatapoints(t,n,i,o){return this.httpClient.request({method:"PUT",url:nF`asset/predicted/${t}/${n}`,data:i,options:o})}}class ny{constructor(t){this.httpClient=t}getDatapointExport(t,n){return this.httpClient.request({method:"GET",url:nF`asset/datapoint/export`,queryParams:t,options:n})}getDatapointPeriod(t,n){return this.httpClient.request({method:"GET",url:nF`asset/datapoint/periods`,queryParams:t,options:n})}getDatapoints(t,n,i,o){return this.httpClient.request({method:"POST",url:nF`asset/datapoint/${t}/${n}`,data:i,options:o})}}class nA{constructor(t){this.httpClient=t}create(t,n){return this.httpClient.request({method:"POST",url:nF`dashboard`,data:t,options:n})}update(t,n){return this.httpClient.request({method:"PUT",url:nF`dashboard`,data:t,options:n})}getAllRealmDashboards(t,n){return this.httpClient.request({method:"GET",url:nF`dashboard/all/${t}`,options:n})}query(t,n){return this.httpClient.request({method:"POST",url:nF`dashboard/query`,data:t,options:n})}delete(t,n,i){return this.httpClient.request({method:"DELETE",url:nF`dashboard/${t}/${n}`,options:i})}get(t,n,i){return this.httpClient.request({method:"GET",url:nF`dashboard/${t}/${n}`,options:i})}}class nv{constructor(t){this.httpClient=t}createGlobalRuleset(t,n){return this.httpClient.request({method:"POST",url:nF`rules`,data:t,options:n})}getGlobalRulesets(t,n){return this.httpClient.request({method:"GET",url:nF`rules`,queryParams:t,options:n})}createAssetRuleset(t,n){return this.httpClient.request({method:"POST",url:nF`rules/asset`,data:t,options:n})}getAssetRulesets(t,n,i){return this.httpClient.request({method:"GET",url:nF`rules/asset/for/${t}`,queryParams:n,options:i})}deleteAssetRuleset(t,n){return this.httpClient.request({method:"DELETE",url:nF`rules/asset/${t}`,options:n})}getAssetRuleset(t,n){return this.httpClient.request({method:"GET",url:nF`rules/asset/${t}`,options:n})}updateAssetRuleset(t,n,i){return this.httpClient.request({method:"PUT",url:nF`rules/asset/${t}`,data:n,options:i})}getAssetGeofences(t,n){return this.httpClient.request({method:"GET",url:nF`rules/geofences/${t}`,options:n})}getAssetEngineInfo(t,n){return this.httpClient.request({method:"GET",url:nF`rules/info/asset/${t}`,options:n})}getGlobalEngineInfo(t){return this.httpClient.request({method:"GET",url:nF`rules/info/global`,options:t})}getRealmEngineInfo(t,n){return this.httpClient.request({method:"GET",url:nF`rules/info/realm/${t}`,options:n})}createRealmRuleset(t,n){return this.httpClient.request({method:"POST",url:nF`rules/realm`,data:t,options:n})}getRealmRulesets(t,n,i){return this.httpClient.request({method:"GET",url:nF`rules/realm/for/${t}`,queryParams:n,options:i})}deleteRealmRuleset(t,n){return this.httpClient.request({method:"DELETE",url:nF`rules/realm/${t}`,options:n})}getRealmRuleset(t,n){return this.httpClient.request({method:"GET",url:nF`rules/realm/${t}`,options:n})}updateRealmRuleset(t,n,i){return this.httpClient.request({method:"PUT",url:nF`rules/realm/${t}`,data:n,options:i})}deleteGlobalRuleset(t,n){return this.httpClient.request({method:"DELETE",url:nF`rules/${t}`,options:n})}getGlobalRuleset(t,n){return this.httpClient.request({method:"GET",url:nF`rules/${t}`,options:n})}updateGlobalRuleset(t,n,i){return this.httpClient.request({method:"PUT",url:nF`rules/${t}`,data:n,options:i})}}class nx{constructor(t){this.httpClient=t}createAlarm(t,n,i){return this.httpClient.request({method:"POST",url:nF`alarm`,queryParams:n,data:t,options:i})}getAlarms(t,n){return this.httpClient.request({method:"GET",url:nF`alarm`,queryParams:t,options:n})}removeAlarms(t,n){return this.httpClient.request({method:"DELETE",url:nF`alarm`,data:t,options:n})}setAssetLinks(t,n){return this.httpClient.request({method:"PUT",url:nF`alarm/assets`,data:t,options:n})}getAlarm(t,n){return this.httpClient.request({method:"GET",url:nF`alarm/${t}`,options:n})}removeAlarm(t,n){return this.httpClient.request({method:"DELETE",url:nF`alarm/${t}`,options:n})}updateAlarm(t,n,i){return this.httpClient.request({method:"PUT",url:nF`alarm/${t}`,data:n,options:i})}getAssetLinks(t,n,i){return this.httpClient.request({method:"GET",url:nF`alarm/${t}/assets`,queryParams:n,options:i})}}class nw{constructor(t){this.httpClient=t}getServices(t,n){return this.httpClient.request({method:"GET",url:nF`service`,queryParams:t,options:n})}registerService(t,n){return this.httpClient.request({method:"POST",url:nF`service`,data:t,options:n})}getGlobalServices(t){return this.httpClient.request({method:"GET",url:nF`service/global`,options:t})}registerGlobalService(t,n){return this.httpClient.request({method:"POST",url:nF`service/global`,data:t,options:n})}deregisterService(t,n,i){return this.httpClient.request({method:"DELETE",url:nF`service/${t}/${n}`,options:i})}getService(t,n,i){return this.httpClient.request({method:"GET",url:nF`service/${t}/${n}`,options:i})}heartbeat(t,n,i){return this.httpClient.request({method:"PUT",url:nF`service/${t}/${n}`,options:i})}}class nq{constructor(t){this.httpClient=t}updateCurrentUserLocale(t,n){return this.httpClient.request({method:"PUT",url:nF`user/locale`,data:t,options:n})}query(t,n){return this.httpClient.request({method:"POST",url:nF`user/query`,data:t,options:n})}requestPasswordResetCurrent(t){return this.httpClient.request({method:"PUT",url:nF`user/request-password-reset`,options:t})}updatePasswordCurrent(t,n){return this.httpClient.request({method:"PUT",url:nF`user/reset-password`,data:t,options:n})}updateCurrent(t,n){return this.httpClient.request({method:"PUT",url:nF`user/update`,data:t,options:n})}getCurrent(t){return this.httpClient.request({method:"GET",url:nF`user/user`,options:t})}getCurrentUserRealmRoles(t){return this.httpClient.request({method:"GET",url:nF`user/userRealmRoles`,options:t})}getCurrentUserClientRoles(t,n){return this.httpClient.request({method:"GET",url:nF`user/userRoles/${t}`,options:n})}disconnectUserSession(t,n,i){return this.httpClient.request({method:"GET",url:nF`user/${t}/disconnect/${n}`,options:i})}requestPasswordReset(t,n,i){return this.httpClient.request({method:"PUT",url:nF`user/${t}/request-password-reset/${n}`,options:i})}updatePassword(t,n,i,o){return this.httpClient.request({method:"PUT",url:nF`user/${t}/reset-password/${n}`,data:i,options:o})}resetSecret(t,n,i){return this.httpClient.request({method:"GET",url:nF`user/${t}/reset-secret/${n}`,options:i})}updateRoles(t,n,i){return this.httpClient.request({method:"PUT",url:nF`user/${t}/roles`,data:n,options:i})}getUserRealmRoles(t,n,i){return this.httpClient.request({method:"GET",url:nF`user/${t}/userRealmRoles/${n}`,options:i})}updateUserRealmRoles(t,n,i,o){return this.httpClient.request({method:"PUT",url:nF`user/${t}/userRealmRoles/${n}`,data:i,options:o})}getUserClientRoles(t,n,i,o){return this.httpClient.request({method:"GET",url:nF`user/${t}/userRoles/${n}/${i}`,options:o})}updateUserClientRoles(t,n,i,o,r){return this.httpClient.request({method:"PUT",url:nF`user/${t}/userRoles/${n}/${i}`,data:o,options:r})}getUserSessions(t,n,i){return this.httpClient.request({method:"GET",url:nF`user/${t}/userSessions/${n}`,options:i})}create(t,n,i){return this.httpClient.request({method:"POST",url:nF`user/${t}/users`,data:n,options:i})}update(t,n,i){return this.httpClient.request({method:"PUT",url:nF`user/${t}/users`,data:n,options:i})}delete(t,n,i){return this.httpClient.request({method:"DELETE",url:nF`user/${t}/users/${n}`,options:i})}getClientRoles(t,n,i){return this.httpClient.request({method:"GET",url:nF`user/${t}/${n}/roles`,options:i})}updateClientRoles(t,n,i,o){return this.httpClient.request({method:"PUT",url:nF`user/${t}/${n}/roles`,data:i,options:o})}get(t,n,i){return this.httpClient.request({method:"GET",url:nF`user/${t}/${n}`,options:i})}}class nL{constructor(t){this.httpClient=t}getManagerConfig(t){return this.httpClient.request({method:"GET",url:nF`configuration/manager`,options:t})}update(t,n){return this.httpClient.request({method:"PUT",url:nF`configuration/manager`,data:t,options:n})}fileUpload(t,n,i){return this.httpClient.request({method:"POST",url:nF`configuration/manager/file`,queryParams:n,data:t,options:i})}getManagerConfigImage(t,n){return this.httpClient.request({method:"GET",url:nF`configuration/manager/image/${t}`,options:n})}}function nF(t,...n){let i="";for(let o=0;o<n.length;o++)i+=t[o],i+=encodeURIComponent(n[o]);return i+t[t.length-1]}class nk{constructor(t,n=na().create()){this._gatewayClientResource=new nT(t,n),this._assetResource=new nR(t,n),this._flowResource=new nW(t,n),this._provisioningResource=new nC(t,n),this._assetModelResource=new nS(t,n),this._mapResource=new nD(t,n),this._consoleResource=new nI(t,n),this._appResource=new nN(t,n),this._statusResource=new nB(t,n),this._realmResource=new nP(t,n),this._notificationResource=new n$(t,n),this._agentResource=new nj(t,n),this._syslogResource=new nY(t,n),this._gatewayServiceResource=new nX(t,n),this._assetPredictedDatapointResource=new nH(t,n),this._assetDatapointResource=new nU(t,n),this._dashboardResource=new nV(t,n),this._rulesResource=new nG(t,n),this._alarmResource=new nK(t,n),this._externalServiceResource=new nZ(t,n),this._userResource=new nJ(t,n),this._configurationResource=new nQ(t,n),this._assetResource=new nR(t,n)}get GatewayClientResource(){return this._gatewayClientResource}get AssetResource(){return this._assetResource}get FlowResource(){return this._flowResource}get ProvisioningResource(){return this._provisioningResource}get AssetModelResource(){return this._assetModelResource}get MapResource(){return this._mapResource}get ConsoleResource(){return this._consoleResource}get AppResource(){return this._appResource}get StatusResource(){return this._statusResource}get RealmResource(){return this._realmResource}get NotificationResource(){return this._notificationResource}get AgentResource(){return this._agentResource}get SyslogResource(){return this._syslogResource}get GatewayServiceResource(){return this._gatewayServiceResource}get AssetPredictedDatapointResource(){return this._assetPredictedDatapointResource}get AssetDatapointResource(){return this._assetDatapointResource}get DashboardResource(){return this._dashboardResource}get RulesResource(){return this._rulesResource}get AlarmResource(){return this._alarmResource}get ExternalServiceResource(){return this._externalServiceResource}get UserResource(){return this._userResource}get ConfigurationResource(){return this._configurationResource}}class nE{constructor(t){this.axios=t}request(t){let n={};n.method=t.method,n.url=t.url,n.params=t.queryParams,n.data=t.data,function(t,n){if(void 0!=n)for(let i in n)n.hasOwnProperty(i)&&(t[i]=n[i])}(n,t.options);let i=t.copyFn;return this.axios.request(n).then(t=>(i&&t.data&&(t.originalData=t.data,t.data=i(t.data)),t))}}class nT extends ns{constructor(t,n=na().create()){n.defaults.baseURL=t,super(new nE(n))}}class nR extends nc{constructor(t,n=na().create()){n.defaults.baseURL=t,super(new nE(n))}}class nW extends nl{constructor(t,n=na().create()){n.defaults.baseURL=t,super(new nE(n))}}class nC extends nd{constructor(t,n=na().create()){n.defaults.baseURL=t,super(new nE(n))}}class nS extends np{constructor(t,n=na().create()){n.defaults.baseURL=t,super(new nE(n))}}class nD extends nu{constructor(t,n=na().create()){n.defaults.baseURL=t,super(new nE(n))}}class nI extends nh{constructor(t,n=na().create()){n.defaults.baseURL=t,super(new nE(n))}}class nN extends nb{constructor(t,n=na().create()){n.defaults.baseURL=t,super(new nE(n))}}class nB extends nf{constructor(t,n=na().create()){n.defaults.baseURL=t,super(new nE(n))}}class nP extends nm{constructor(t,n=na().create()){n.defaults.baseURL=t,super(new nE(n))}}class n$ extends nM{constructor(t,n=na().create()){n.defaults.baseURL=t,super(new nE(n))}}class nj extends ng{constructor(t,n=na().create()){n.defaults.baseURL=t,super(new nE(n))}}class nY extends nz{constructor(t,n=na().create()){n.defaults.baseURL=t,super(new nE(n))}}class nX extends n_{constructor(t,n=na().create()){n.defaults.baseURL=t,super(new nE(n))}}class nH extends nO{constructor(t,n=na().create()){n.defaults.baseURL=t,super(new nE(n))}}class nU extends ny{constructor(t,n=na().create()){n.defaults.baseURL=t,super(new nE(n))}}class nV extends nA{constructor(t,n=na().create()){n.defaults.baseURL=t,super(new nE(n))}}class nG extends nv{constructor(t,n=na().create()){n.defaults.baseURL=t,super(new nE(n))}}class nK extends nx{constructor(t,n=na().create()){n.defaults.baseURL=t,super(new nE(n))}}class nZ extends nw{constructor(t,n=na().create()){n.defaults.baseURL=t,super(new nE(n))}}class nJ extends nq{constructor(t,n=na().create()){n.defaults.baseURL=t,super(new nE(n))}}class nQ extends nL{constructor(t,n=na().create()){n.defaults.baseURL=t,super(new nE(n))}}na().isAxiosError;let n0=new class{get api(){return this._client}constructor(){this._axiosInstance=na().create(),this._axiosInstance.defaults.headers.common["Content-Type"]="application/json",this._axiosInstance.interceptors.request.use(t=>(t.paramsSerializer=t=>tK().stringify(t,{arrayFormat:"repeat"}),t))}get axiosInstance(){return this._axiosInstance}get baseUrl(){return this._baseUrl}setTimeout(t){this._axiosInstance.defaults.timeout=t}addRequestInterceptor(t){this._axiosInstance.interceptors.request.use(t)}initialise(t){this._baseUrl=t,this._client=new nk(t,this._axiosInstance)}};var n1=function(t,n,i,o){return new(i||(i=Promise))(function(r,a){function s(t){try{l(o.next(t))}catch(t){a(t)}}function c(t){try{l(o.throw(t))}catch(t){a(t)}}function l(t){var n;t.done?r(t.value):((n=t.value)instanceof i?n:new i(function(t){t(n)})).then(s,c)}l((o=o.apply(t,n||[])).next())})};!function(t){t.DISCONNECTED="DISCONNECTED",t.CONNECTED="CONNECTED",t.CONNECTING="CONNECTING"}(sR||(sR={}));let n2="SUBSCRIBED:",n3="UNAUTHORIZED:",n4="TRIGGERED:",n5="EVENT:";class n6{constructor(){this._disconnectRequested=!1,this._reconnectDelayMillis=n8.MIN_RECONNECT_DELAY,this._reconnectTimer=null,this._status=sR.DISCONNECTED,this._connectingDeferred=null,this._statusCallbacks=[],this._pendingSubscription=null,this._queuedSubscriptions=[],this._subscriptionMap=new Map,this._assetEventCallbackMap=new Map,this._attributeEventCallbackMap=new Map,this._unloading=!1}get status(){return this._status}subscribeStatusChange(t){this._statusCallbacks.push(t)}unsubscribeStatusChange(t){!function(t,n){if(0===t.length)return;let i=t.indexOf(n);i>=0&&t.splice(i,1)}(this._statusCallbacks,t)}connect(){return(this._reconnectTimer&&(window.clearTimeout(this._reconnectTimer),this._reconnectTimer=null),this._status===sR.CONNECTED)?Promise.resolve(!0):(this._disconnectRequested=!1,this._connectingDeferred||(this._onStatusChanged(sR.CONNECTING),this._connectingDeferred=new t0,this._doConnect().then(t=>{if(this._connectingDeferred){let n=this._connectingDeferred;this._connectingDeferred=null,t?(console.debug("Connected to event service: "+this.endpointUrl),this._reconnectDelayMillis=n8.MIN_RECONNECT_DELAY,this._onStatusChanged(sR.CONNECTED),window.setTimeout(()=>{this._onConnect()},0)):(console.debug("Failed to connect to event service: "+this.endpointUrl),this._scheduleReconnect()),n.resolve(t)}})),this._connectingDeferred.promise)}disconnect(){console.debug("Disconnecting from event service: "+this.endpointUrl),this._disconnectRequested||(this._disconnectRequested=!0,this._reconnectTimer&&(window.clearTimeout(this._reconnectTimer),this._reconnectTimer=null),this.status!==sR.DISCONNECTED&&this._doDisconnect())}subscribe(t,n){let i={eventSubscription:t,callback:n,deferred:new t0};return null!=this._pendingSubscription||this._status!==sR.CONNECTED?(this._queuedSubscriptions.push(i),i.deferred.promise):(this._pendingSubscription=i,this._doSubscribe(t).then(t=>{if(this._pendingSubscription){let n=this._pendingSubscription;this._pendingSubscription=null,this._subscriptionMap.set(t,n),this._processNextSubscription();let i=n.deferred;n.deferred=null,i&&i.resolve(t)}},t=>{if(this._pendingSubscription){let n=this._pendingSubscription;this._pendingSubscription=null,this._processNextSubscription();let i=n.deferred;n.deferred=null,i&&i.reject(t)}}),this._pendingSubscription.deferred.promise)}unsubscribe(t){return n1(this,void 0,void 0,function*(){if(this._subscriptionMap.delete(t))return void this._doUnsubscribe(t);if(this._assetEventCallbackMap.delete(t)){if(this._assetEventPromise&&0===this._assetEventCallbackMap.size){let t=yield this._assetEventPromise;this._assetEventPromise=void 0,this.unsubscribe(t)}return}if(this._attributeEventCallbackMap.delete(t)){if(this._attributeEventPromise&&0===this._attributeEventCallbackMap.size){let t=yield this._attributeEventPromise;this._attributeEventPromise=void 0,this.unsubscribe(t)}return}})}sendEvent(t){this._status===sR.CONNECTED&&this._doSend(t)}sendEventWithReply(t){return this._status!==sR.CONNECTED?Promise.reject("Not connected"):this._doSendWithReply(t)}subscribeAssetEvents(t,n,i){return n1(this,void 0,void 0,function*(){let o=t&&"string"!=typeof t[0]?t.map(t=>t.id):t,r="AssetEvent"+n6._subscriptionCounter++;if(!this._assetEventPromise){let t;i$.authenticated||(t={filterType:"asset",realm:i$.displayRealm});let n={eventType:"asset",filter:t};this._assetEventPromise=this.subscribe(n,t=>{this._assetEventCallbackMap.forEach(n=>n(t))})}return this._assetEventCallbackMap.set(r,t=>{let n=t.asset.id;o?o.find(t=>n===t)&&i(t):t.asset.realm===i$.displayRealm&&i(t)}),this._assetEventPromise.then(()=>{try{if(o&&n){let t={messageID:"read-assets:"+o.join(",")+":"+r,eventType:"read-assets",assetQuery:{ids:o}};this.sendEventWithReply(t).then(t=>{t.assets&&this._assetEventCallbackMap.has(r)&&t.assets.forEach(t=>{i({eventType:"asset",asset:t,cause:"READ"})})})}}catch(n){throw console.error("Failed to subscribe to asset events for assets: "+t),r&&this.unsubscribe(r),n}return r})})}subscribeAttributeEvents(t,n,i){return n1(this,void 0,void 0,function*(){let o=t&&"string"!=typeof t[0],r=o?t.map(t=>t.id):t,a=o?t:void 0,s="AttributeEvent"+n6._subscriptionCounter++;if(!this._attributeEventPromise){let t;i$.authenticated||(t={filterType:"asset",realm:i$.displayRealm});let n={eventType:"attribute",filter:t};this._attributeEventPromise=this.subscribe(n,t=>{this._attributeEventCallbackMap.forEach(n=>n(t))})}let c=n=>{let a=n.ref;o?t.forEach(t=>{a.id===t.id&&a.name===t.name&&i(n)}):r?r.find(t=>a.id===t)&&i(n):n.realm===i$.displayRealm&&i(n)};return this._attributeEventCallbackMap.set(s,c),this._attributeEventPromise.then(()=>{try{if(n&&r){let t={messageID:"read-assets:"+r.join(",")+":"+s,eventType:"read-assets",assetQuery:{ids:r}};this.sendEventWithReply(t).then(t=>{t.assets&&this._attributeEventCallbackMap.has(s)&&t.assets.forEach(t=>{t.attributes&&Object.entries(t.attributes).forEach(([n,i])=>{(!a||a.find(i=>i.id===t.id&&i.name===n))&&c({eventType:"attribute",timestamp:i.timestamp,value:i.value,ref:{id:t.id,name:n}})})})})}}catch(n){throw console.error("Failed to subscribe to asset events for assets: "+t),s&&this.unsubscribe(s),n}return s})})}_processNextSubscription(){this._status===sR.CONNECTED&&0!==this._queuedSubscriptions.length&&setTimeout(()=>{let t=this._queuedSubscriptions.shift();t&&this.subscribe(t.eventSubscription,t.callback).then(n=>{let i=t.deferred;t.deferred=null,i&&i.resolve(n)},n=>{let i=t.deferred;t.deferred=null,i&&i.reject(n)})},0)}_onStatusChanged(t){t!==this._status&&(console.debug("Event provider status changed: "+t),this._status=t,this._unloading||window.setTimeout(()=>{this._statusCallbacks.forEach(n=>n(t))},0))}_onMessageReceived(t,n){let i=this._subscriptionMap.get(t);i&&i.callback(n)}_onConnect(){if(Object.keys(this._subscriptionMap).length>0){for(let t in this._subscriptionMap)this._subscriptionMap.has(t)&&this._queuedSubscriptions.unshift(this._subscriptionMap.get(t));this._subscriptionMap.clear()}this._processNextSubscription()}_onDisconnect(){this._status===sR.CONNECTED&&this._onStatusChanged(sR.DISCONNECTED),this._pendingSubscription&&(this._queuedSubscriptions.unshift(this._pendingSubscription),this._pendingSubscription=null),this._onStatusChanged(sR.CONNECTING),this._scheduleReconnect()}_scheduleReconnect(){this._reconnectTimer||!this._disconnectRequested&&(console.debug("Event provider scheduling reconnect in "+this._reconnectDelayMillis+"ms"),this._reconnectTimer=window.setTimeout(()=>{this._disconnectRequested||this.connect()},this._reconnectDelayMillis),this._reconnectDelayMillis<n8.MAX_RECONNECT_DELAY&&(this._reconnectDelayMillis=Math.min(n8.MAX_RECONNECT_DELAY,this._reconnectDelayMillis+3e3)))}}n6.MIN_RECONNECT_DELAY=0,n6.MAX_RECONNECT_DELAY=3e4,n6._subscriptionCounter=0;class n8 extends n6{get endpointUrl(){return this._endpointUrl}constructor(t){super(),this._webSocket=void 0,this._connectDeferred=null,this._subscribeDeferred=null,this._repliesDeferred=new Map,this._endpointUrl=(t.startsWith("https:")?"wss":"ws")+"://"+t.substr(t.indexOf("://")+3)+"/websocket/events",window.addEventListener("beforeunload",()=>{this._unloading=!0,this.disconnect()})}_doConnect(){let t=this._endpointUrl+"?Realm="+i$.config.realm;return i$.authenticated&&(t+="&Authorization="+i$.getAuthorizationHeader()),this._webSocket=new WebSocket(t),this._connectDeferred=new t0,this._webSocket.onopen=()=>{if(this._connectDeferred){let t=this._connectDeferred;this._connectDeferred=null,t.resolve(!0)}},this._webSocket.onerror=t=>{if(this._connectDeferred){let t=this._connectDeferred;this._connectDeferred=null,t.resolve(!1)}else console.debug("Event provider error"),this._beforeDisconnect()},this._webSocket.onclose=()=>{if(this._webSocket=void 0,this._connectDeferred){let t=this._connectDeferred;this._connectDeferred=null,t.resolve(!1)}else this._beforeDisconnect()},this._webSocket.onmessage=t=>{let n=t.data;if(n&&n.startsWith(n2)){let t=JSON.parse(n.substring(n2.length)),i=this._subscribeDeferred;this._subscribeDeferred=null,i&&i.resolve(t.subscriptionId)}else if(n.startsWith(n3)){let t=JSON.parse(n.substring(n3.length)),i=this._subscribeDeferred;this._subscribeDeferred=null,i&&(console.warn("Unauthorized event subscription: "+JSON.stringify(t,null,2)),i.reject("Unauthorized"))}else if(n.startsWith(n4)){let t=JSON.parse(n.substring(n4.length));t.events&&t.events.forEach(n=>{this._onMessageReceived(t.subscriptionId,n)})}else if(n.startsWith(n5)){let t=JSON.parse(n.substring(n5.length));if(t.messageID){let n=this._repliesDeferred.get(t.messageID);this._repliesDeferred.delete(t.messageID),n&&n.resolve(t)}}},this._connectDeferred.promise}_beforeDisconnect(){this._onDisconnect()}_doDisconnect(){var t;null==(t=this._webSocket)||t.close(),this._subscribeDeferred=null,this._repliesDeferred.clear()}_doSubscribe(t){return this._webSocket?this._subscribeDeferred?Promise.reject("There's already a pending subscription"):(this._subscribeDeferred=new t0,t.subscriptionId||(t.subscriptionId=n8._subscriptionCounter+++""),this._webSocket.send("SUBSCRIBE:"+JSON.stringify(t)),this._subscribeDeferred.promise):Promise.reject("Not connected")}_doUnsubscribe(t){this._webSocket&&this._webSocket.send("UNSUBSCRIBE:"+JSON.stringify({subscriptionId:t}))}_doSend(t){let n=n5+JSON.stringify(t);this._webSocket.send(n)}_doSendWithReply(t){if(t.messageID||(t.messageID=(new Date().getTime()+10*Math.random()).toString(10)),this._repliesDeferred.has(t.messageID))return Promise.reject("There's already a pending send and reply with this ID");let n=new t0;return this._repliesDeferred.set(t.messageID,n),this._webSocket.send(n5+JSON.stringify(t)),n.promise}}function n7(t){return(n7="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}n8._subscriptionCounter=1;var n9=[],ie=n9.forEach,it=n9.slice;function ii(t){return ie.call(it.call(arguments,1),function(n){if(n)for(var i in n)void 0===t[i]&&(t[i]=n[i])}),t}function io(){return"function"==typeof XMLHttpRequest||("undefined"==typeof XMLHttpRequest?"undefined":n7(XMLHttpRequest))==="object"}var ir=i(46850),ia=i.t(ir,2);function is(t){return(is="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}"function"==typeof fetch&&(sW="undefined"!=typeof global&&global.fetch?global.fetch:"undefined"!=typeof window&&window.fetch?window.fetch:fetch),io()&&("undefined"!=typeof global&&global.XMLHttpRequest?sC=global.XMLHttpRequest:"undefined"!=typeof window&&window.XMLHttpRequest&&(sC=window.XMLHttpRequest)),"function"==typeof ActiveXObject&&("undefined"!=typeof global&&global.ActiveXObject?sS=global.ActiveXObject:"undefined"!=typeof window&&window.ActiveXObject&&(sS=window.ActiveXObject)),sW||!ia||sC||sS||(sW=ir||ia),"function"!=typeof sW&&(sW=void 0);var ic=function(t,n){if(n&&"object"===is(n)){var i="";for(var o in n)i+="&"+encodeURIComponent(o)+"="+encodeURIComponent(n[o]);if(!i)return t;t=t+(-1!==t.indexOf("?")?"&":"?")+i.slice(1)}return t},il=function(t,n,i){sW(t,n).then(function(t){if(!t.ok)return i(t.statusText||"Error",{status:t.status});t.text().then(function(n){i(null,{status:t.status,data:n})}).catch(i)}).catch(i)},id=!1,ip=function(t,n,i,o){t.queryStringParams&&(n=ic(n,t.queryStringParams));var r=ii({},"function"==typeof t.customHeaders?t.customHeaders():t.customHeaders);i&&(r["Content-Type"]="application/json");var a="function"==typeof t.requestOptions?t.requestOptions(i):t.requestOptions,s=ii({method:i?"POST":"GET",body:i?t.stringify(i):void 0,headers:r},id?{}:a);try{il(n,s,o)}catch(t){if(!a||0===Object.keys(a).length||!t.message||0>t.message.indexOf("not implemented"))return o(t);try{Object.keys(a).forEach(function(t){delete s[t]}),il(n,s,o),id=!0}catch(t){o(t)}}},iu=function(t,n,i,o){i&&"object"===is(i)&&(i=ic("",i).slice(1)),t.queryStringParams&&(n=ic(n,t.queryStringParams));try{(r=sC?new sC:new sS("MSXML2.XMLHTTP.3.0")).open(i?"POST":"GET",n,1),t.crossDomain||r.setRequestHeader("X-Requested-With","XMLHttpRequest"),r.withCredentials=!!t.withCredentials,i&&r.setRequestHeader("Content-Type","application/x-www-form-urlencoded"),r.overrideMimeType&&r.overrideMimeType("application/json");var r,a=t.customHeaders;if(a="function"==typeof a?a():a)for(var s in a)r.setRequestHeader(s,a[s]);r.onreadystatechange=function(){r.readyState>3&&o(r.status>=400?r.statusText:null,{status:r.status,data:r.responseText})},r.send(i)}catch(t){console&&console.log(t)}};let ih=function(t,n,i,o){return("function"==typeof i&&(o=i,i=void 0),o=o||function(){},sW)?ip(t,n,i,o):io()||"function"==typeof ActiveXObject?iu(t,n,i,o):void o(Error("No fetch and no xhr implementation found!"))};var ib=function(){var t;function n(t){var i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},o=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};if(!(this instanceof n))throw TypeError("Cannot call a class as a function");this.services=t,this.options=i,this.allOptions=o,this.type="backend",this.init(t,i,o)}return t=[{key:"init",value:function(t){var n=this,i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},o=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};this.services=t,this.options=ii(i,this.options||{},{loadPath:"/locales/{{lng}}/{{ns}}.json",addPath:"/locales/add/{{lng}}/{{ns}}",allowMultiLoading:!1,parse:function(t){return JSON.parse(t)},stringify:JSON.stringify,parsePayload:function(t,n,i){var o,r;return o={},r=i||"",n in o?Object.defineProperty(o,n,{value:r,enumerable:!0,configurable:!0,writable:!0}):o[n]=r,o},request:ih,reloadInterval:"undefined"==typeof window&&36e5,customHeaders:{},queryStringParams:{},crossDomain:!1,withCredentials:!1,overrideMimeType:!1,requestOptions:{mode:"cors",credentials:"same-origin",cache:"default"}}),this.allOptions=o,this.services&&this.options.reloadInterval&&setInterval(function(){return n.reload()},this.options.reloadInterval)}},{key:"readMulti",value:function(t,n,i){this._readAny(t,t,n,n,i)}},{key:"read",value:function(t,n,i){this._readAny([t],t,[n],n,i)}},{key:"_readAny",value:function(t,n,i,o,r){var a,s,c=this,l=this.options.loadPath;"function"==typeof this.options.loadPath&&(l=this.options.loadPath(t,i)),(l=(s=a=l)&&"function"==typeof s.then?a:Promise.resolve(a)).then(function(a){if(!a)return r(null,{});var s=c.services.interpolator.interpolate(a,{lng:t.join("+"),ns:i.join("+")});c.loadUrl(s,r,n,o)})}},{key:"loadUrl",value:function(t,n,i,o){var r=this;this.options.request(this.options,t,void 0,function(a,s){var c,l;if(s&&(s.status>=500&&s.status<600||!s.status))return n("failed loading "+t+"; status code: "+s.status,!0);if(s&&s.status>=400&&s.status<500)return n("failed loading "+t+"; status code: "+s.status,!1);if(!s&&a&&a.message&&a.message.indexOf("Failed to fetch")>-1)return n("failed loading "+t+": "+a.message,!0);if(a)return n(a,!1);try{c="string"==typeof s.data?r.options.parse(s.data,i,o):s.data}catch(n){l="failed parsing "+t+" to json"}if(l)return n(l,!1);n(null,c)})}},{key:"create",value:function(t,n,i,o,r){var a=this;if(this.options.addPath){"string"==typeof t&&(t=[t]);var s=this.options.parsePayload(n,i,o),c=0,l=[],d=[];t.forEach(function(i){var o=a.options.addPath;"function"==typeof a.options.addPath&&(o=a.options.addPath(i,n));var p=a.services.interpolator.interpolate(o,{lng:i,ns:n});a.options.request(a.options,p,s,function(n,i){c+=1,l.push(n),d.push(i),c===t.length&&r&&r(l,d)})})}}},{key:"reload",value:function(){var t=this,n=this.services,i=n.backendConnector,o=n.languageUtils,r=n.logger,a=i.language;if(!a||"cimode"!==a.toLowerCase()){var s=[],c=function(t){o.toResolveHierarchy(t).forEach(function(t){0>s.indexOf(t)&&s.push(t)})};c(a),this.allOptions.preload&&this.allOptions.preload.forEach(function(t){return c(t)}),s.forEach(function(n){t.allOptions.ns.forEach(function(t){i.read(n,t,"read",null,null,function(o,a){o&&r.warn("loading namespace ".concat(t," for language ").concat(n," failed"),o),!o&&a&&r.log("loaded namespace ".concat(t," for language ").concat(n),a),i.loaded("".concat(n,"|").concat(t),o,a)})})})}}}],function(t,n){for(var i=0;i<n.length;i++){var o=n[i];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(t,o.key,o)}}(n.prototype,t),Object.defineProperty(n,"prototype",{writable:!1}),n}();ib.type="backend";class im extends eL{constructor(t){if(super(t),this.it=et,t.type!==ew.CHILD)throw Error(this.constructor.directiveName+"() can only be used in child bindings")}render(t){if(t===et||null==t)return this._t=void 0,this.it=t;if(t===ee)return t;if("string"!=typeof t)throw Error(this.constructor.directiveName+"() called with a non-string value");if(t===this.it)return this._t;this.it=t;let n=[t];return n.raw=n,this._t={_$litType$:this.constructor.resultType,strings:n,values:[]}}}im.directiveName="unsafeHTML",im.resultType=1,eq(im);class iM extends im{}iM.directiveName="unsafeSVG",iM.resultType=2;let ig=eq(iM),iz={size:24,icons:{logo:'<path style=\'pointer-events: var(--or-icon-pointer-events, none);\' fill="#C4D600" d="m11.96125,23.85096c-6.56773,0 -11.90971,-5.34202 -11.90971,-11.90862l2.49411,0c0,5.19176 4.22389,9.41568 9.41561,9.41568c5.19053,0 9.41561,-4.22392 9.41561,-9.41568c0,-5.19176 -4.22389,-9.41568 -9.41561,-9.41568l0,-2.49413c6.56655,0 11.90971,5.34439 11.90971,11.9098c0,6.5666 -5.34316,11.90862 -11.90971,11.90862l0,0z" /><path fill="#4E9D2D" d="m10.25094,20.38647c-2.26848,-0.47231 -4.21822,-1.80199 -5.48741,-3.74009s-1.70892,-4.25777 -1.23545,-6.52625c0.47347,-2.26965 1.80315,-4.21822 3.74242,-5.48857c1.93926,-1.27035 4.25661,-1.70892 6.52625,-1.23545c4.68471,0.97719 7.70121,5.5828 6.72286,10.26635l-2.39994,-0.49907c0.70149,-3.36085 -1.4623,-6.66585 -4.82431,-7.36734c-1.62866,-0.33969 -3.29105,-0.02559 -4.68238,0.88645c-1.39134,0.91088 -2.34526,2.3092 -2.68495,3.93786c-0.33853,1.62633 -0.02443,3.28988 0.88645,4.68122c0.91088,1.39134 2.3092,2.34526 3.93786,2.68379l-0.50139,2.4011l0,0z"/><path fill="#1D5632"d="m12.03064,17.49616c-0.09524,0 -0.19048,-0.00116 -0.28457,-0.00465c-1.49833,-0.0755 -2.87818,-0.72942 -3.88636,-1.84097c-1.00818,-1.11271 -1.52156,-2.54948 -1.44722,-4.05013l2.44378,0.12196c-0.04181,0.84557 0.24856,1.65745 0.81769,2.28466c0.56681,0.62721 1.34733,0.99656 2.1929,1.03838c0.84208,0.03833 1.65629,-0.2474 2.2835,-0.81653c0.62837,-0.56797 0.99656,-1.34617 1.03954,-2.19174c0.08711,-1.74573 -1.26371,-3.23708 -3.00943,-3.3242l0.12196,-2.44378c3.09422,0.15332 5.4869,2.79455 5.33358,5.88877c-0.07434,1.49949 -0.72942,2.87818 -1.84097,3.8852c-1.04186,0.94313 -2.36945,1.45303 -3.7644,1.45303l0,0z"/>',"logo-plain":"m11.9925,23.91349c-6.58498,0 -11.94099,-5.35605 -11.94099,-11.9399l2.50066,0c0,5.20539 4.23498,9.44041 9.44033,9.44041c5.20416,0 9.44033,-4.23502 9.44033,-9.44041c0,-5.20539 -4.23498,-9.44041 -9.44033,-9.44041l0,-2.50068c6.5838,0 11.94099,5.35842 11.94099,11.94108c0,6.58385 -5.35719,11.9399 -11.94099,11.9399l0,0zm-1.80787,-3.27769c-2.31323,-0.48163 -4.30141,-1.83755 -5.59563,-3.81389s-1.74263,-4.34178 -1.25982,-6.65502c0.48281,-2.31443 1.83872,-4.30145 3.81623,-5.59686c1.97751,-1.29542 4.34056,-1.74264 6.65497,-1.25983c4.77711,0.99647 7.8531,5.69295 6.85545,10.46891l-2.44727,-0.50891c0.71532,-3.42716 -1.49114,-6.79738 -4.91946,-7.5127c-1.66078,-0.34639 -3.35596,-0.0261 -4.77474,0.90394c-1.41878,0.92886 -2.39152,2.35476 -2.73791,4.01555c-0.3452,1.65842 -0.02491,3.3548 0.90394,4.77359c0.92885,1.41879 2.35475,2.39154 4.01552,2.73675l-0.51128,2.44848l0,0zm1.81499,-2.92536c-0.09727,0 -0.19455,-0.00119 -0.29064,-0.00475c-1.53029,-0.07711 -2.93958,-0.74498 -3.96926,-1.88025c-1.02968,-1.13646 -1.55401,-2.60388 -1.47809,-4.13655l2.49591,0.12456c-0.04271,0.86361 0.25386,1.69282 0.83513,2.33341c0.5789,0.64059 1.37607,1.01783 2.23968,1.06053c0.86005,0.03915 1.69162,-0.25268 2.33221,-0.83395c0.64177,-0.58009 1.01782,-1.3749 1.06171,-2.23851c0.08897,-1.78298 -1.29066,-3.30616 -3.07362,-3.39513l0.12456,-2.49593c3.16022,0.15659 5.60394,2.85419 5.44735,6.01443c-0.07592,1.53149 -0.74498,2.9396 -1.88024,3.9681c-1.06408,0.96326 -2.41999,1.48403 -3.8447,1.48403l0,0z",marker:'<ellipse fill="#000" opacity="0.2" ry="1.5" rx="4" cy="22.5" cx="12" /><path style=\'pointer-events: var(--or-icon-pointer-events, none);\' d="m11.999999,0a8.437501,8.344057 0 0 1 8.437501,8.344057c0,6.500779 -5.798864,6.280799 -8.437501,14.412461c-2.638637,-8.131662 -8.437501,-7.911683 -8.437501,-14.412461a8.437501,8.344057 0 0 1 8.437501,-8.344057z" />'}};var i_=function(t,n,i,o){var r,a=arguments.length,s=a<3?n:null===o?o=Object.getOwnPropertyDescriptor(n,i):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(t,n,i,o);else for(var c=t.length-1;c>=0;c--)(r=t[c])&&(s=(a<3?r(s):a>3?r(n,i,s):r(n,i))||s);return a>3&&s&&Object.defineProperty(n,i,s),s};let iO=i(7319);class iy extends CustomEvent{constructor(){super(iy.NAME,{bubbles:!0,composed:!0})}}iy.NAME="or-iconset-added";let iA=new class{constructor(){this._icons={}}addIconSet(t,n){this._icons[t]=n,this._defaultIconSet||(this._defaultIconSet=n),n.onAdd&&n.onAdd(),window.dispatchEvent(new iy)}getIconSet(t){return this._icons[t]}getIconTemplate(t){if(!t)return J``;let n=(t||"").split(":"),i=n.pop(),o=n.pop(),r=this._defaultIconSet;return(o&&(r=this.getIconSet(o)),i&&r)?r.getIconTemplate(i):J``}},iv=class extends eM{constructor(){super(...arguments),this._handler=t=>{this._updateIcon()}}static get styles(){return[b`
70
+ `,tH([eO({type:String})],tU.prototype,"value",void 0),tH([eO({type:Object})],tU.prototype,"options",void 0),tU=tH([ez("or-translate")],tU),function(t){t.CREATE="CREATE",t.UPDATE="UPDATE",t.DELETE="DELETE"}(aT||(aT={})),function(t){t.LOW="LOW",t.MEDIUM="MEDIUM",t.HIGH="HIGH"}(aR||(aR={})),function(t){t.MANUAL="MANUAL",t.CLIENT="CLIENT",t.GLOBAL_RULESET="GLOBAL_RULESET",t.REALM_RULESET="REALM_RULESET",t.ASSET_RULESET="ASSET_RULESET",t.AGENT="AGENT"}(aW||(aW={})),function(t){t.OPEN="OPEN",t.ACKNOWLEDGED="ACKNOWLEDGED",t.IN_PROGRESS="IN_PROGRESS",t.RESOLVED="RESOLVED",t.CLOSED="CLOSED"}(aC||(aC={})),function(t){t.BOTTOM_LEFT="BOTTOM_LEFT",t.BOTTOM_RIGHT="BOTTOM_RIGHT",t.TOP_LEFT="TOP_LEFT",t.TOP_RIGHT="TOP_RIGHT"}(aS||(aS={})),function(t){t.CREATE="CREATE",t.READ="READ",t.UPDATE="UPDATE",t.DELETE="DELETE"}(aD||(aD={})),function(t){t.NONE="NONE",t.FORECAST="FORECAST",t.SETPOINT="SETPOINT"}(aI||(aI={})),function(t){t.DISCONNECTED="DISCONNECTED",t.CONNECTING="CONNECTING",t.DISCONNECTING="DISCONNECTING",t.CONNECTED="CONNECTED",t.DISABLED="DISABLED",t.WAITING="WAITING",t.ERROR="ERROR",t.STOPPED="STOPPED"}(aN||(aN={})),function(t){t.EV="EV",t.PHEV="PHEV"}(aB||(aB={})),function(t){t.YAZAKI="YAZAKI",t.MENNEKES="MENNEKES",t.LE_GRAND="LE_GRAND",t.CHADEMO="CHADEMO",t.COMBO="COMBO",t.SCHUKO="SCHUKO",t.ENERGYLOCK="ENERGYLOCK"}(aP||(aP={})),function(t){t.SOUTH="SOUTH",t.EAST_WEST="EAST_WEST"}(a$||(a$={})),function(t){t.REQUEST_START="REQUEST_START",t.REQUEST_REPEATING="REQUEST_REPEATING",t.REQUEST_CANCEL="REQUEST_CANCEL",t.READY="READY",t.COMPLETED="COMPLETED",t.RUNNING="RUNNING",t.CANCELLED="CANCELLED"}(aj||(aj={})),function(t){t.TOGGLE="TOGGLE",t.INCREMENT="INCREMENT",t.DECREMENT="DECREMENT",t.NEGATE="NEGATE"}(aY||(aY={})),function(t){t.ASSET_NOT_FOUND="ASSET_NOT_FOUND",t.ATTRIBUTE_NOT_FOUND="ATTRIBUTE_NOT_FOUND",t.INSUFFICIENT_ACCESS="INSUFFICIENT_ACCESS",t.INVALID_VALUE="INVALID_VALUE",t.INTERCEPTOR_FAILURE="INTERCEPTOR_FAILURE",t.STATE_STORAGE_FAILED="STATE_STORAGE_FAILED",t.CANNOT_PROCESS="CANNOT_PROCESS",t.QUEUE_FULL="QUEUE_FULL",t.UNKNOWN="UNKNOWN",t.ASSET_ID_MISSING="ASSET_ID_MISSING",t.ATTRIBUTE_NAME_MISSING="ATTRIBUTE_NAME_MISSING"}(aX||(aX={})),function(t){t.PUBLIC="PUBLIC",t.SHARED="SHARED",t.PRIVATE="PRIVATE"}(aH||(aH={})),function(t){t.OFF="OFF",t.ONE_MIN="ONE_MIN",t.FIVE_MIN="FIVE_MIN",t.QUARTER="QUARTER",t.ONE_HOUR="ONE_HOUR"}(aU||(aU={})),function(t){t.WRAP_TO_SINGLE_COLUMN="WRAP_TO_SINGLE_COLUMN",t.KEEP_LAYOUT="KEEP_LAYOUT",t.REDIRECT="REDIRECT",t.BLOCK_DEVICE="BLOCK_DEVICE"}(aV||(aV={})),function(t){t.MINUTE="MINUTE",t.HOUR="HOUR",t.DAY="DAY",t.WEEK="WEEK",t.MONTH="MONTH",t.YEAR="YEAR"}(aG||(aG={})),function(t){t.MIN="MIN",t.AVG="AVG",t.MAX="MAX",t.DIFFERENCE="DIFFERENCE",t.COUNT="COUNT",t.SUM="SUM",t.MODE="MODE",t.MEDIAN="MEDIAN"}(aK||(aK={})),function(t){t.TERMINATING="TERMINATING",t.DISABLED="DISABLED",t.ALREADY_CONNECTED="ALREADY_CONNECTED",t.UNRECOGNISED="UNRECOGNISED",t.PERMANENT_ERROR="PERMANENT_ERROR",t.SYNC_ERROR="SYNC_ERROR"}(aZ||(aZ={})),function(t){t.HTTPS="HTTPS",t.HTTP="HTTP",t.TCP="TCP"}(aJ||(aJ={})),function(t){t.GET="GET",t.POST="POST",t.PUT="PUT",t.DELETE="DELETE",t.OPTIONS="OPTIONS",t.PATCH="PATCH"}(aQ||(aQ={})),function(t){t.KEYCLOAK="KEYCLOAK",t.BASIC="BASIC",t.NONE="NONE"}(a0||(a0={})),function(t){t.WEBSOCKET="WEBSOCKET",t.POLLING="POLLING"}(a1||(a1={})),function(t){t.VECTOR="VECTOR",t.RASTER="RASTER"}(a2||(a2={})),function(t){t.INTERNAL="INTERNAL",t.CLIENT="CLIENT",t.GLOBAL_RULESET="GLOBAL_RULESET",t.REALM_RULESET="REALM_RULESET",t.ASSET_RULESET="ASSET_RULESET"}(a3||(a3={})),function(t){t.REALM="REALM",t.USER="USER",t.ASSET="ASSET",t.CUSTOM="CUSTOM"}(a4||(a4={})),function(t){t.NORMAL="NORMAL",t.HIGH="HIGH"}(a5||(a5={})),function(t){t.DEVICE="DEVICE",t.TOPIC="TOPIC",t.CONDITION="CONDITION"}(a6||(a6={})),function(t){t.ALWAYS="ALWAYS",t.ONCE="ONCE",t.HOURLY="HOURLY",t.DAILY="DAILY",t.WEEKLY="WEEKLY",t.MONTHLY="MONTHLY",t.ANNUALLY="ANNUALLY"}(a8||(a8={})),function(t){t.MESSAGE_INVALID="MESSAGE_INVALID",t.CERTIFICATE_INVALID="CERTIFICATE_INVALID",t.UNAUTHORIZED="UNAUTHORIZED",t.FORBIDDEN="FORBIDDEN",t.UNIQUE_ID_MISMATCH="UNIQUE_ID_MISMATCH",t.CONFIG_DISABLED="CONFIG_DISABLED",t.USER_DISABLED="USER_DISABLED",t.SERVER_ERROR="SERVER_ERROR",t.ASSET_ERROR="ASSET_ERROR",t.SERVER_BUSY="SERVER_BUSY"}(a7||(a7={})),function(t){t.PRIVATE="PRIVATE",t.PROTECTED="PROTECTED",t.PUBLIC="PUBLIC"}(a9||(a9={})),function(t){t.EXACT="EXACT",t.BEGIN="BEGIN",t.END="END",t.CONTAINS="CONTAINS"}(se||(se={})),function(t){t.EQUALS="EQUALS",t.GREATER_THAN="GREATER_THAN",t.GREATER_EQUALS="GREATER_EQUALS",t.LESS_THAN="LESS_THAN",t.LESS_EQUALS="LESS_EQUALS",t.BETWEEN="BETWEEN"}(st||(st={})),function(t){t.CREATED_ON="CREATED_ON",t.NAME="NAME",t.ASSET_TYPE="ASSET_TYPE",t.PARENT_ID="PARENT_ID",t.REALM="REALM"}(sn||(sn={})),function(t){t.RESTRICTED="RESTRICTED",t.LINKED="LINKED",t.REALM="REALM"}(si||(si={})),function(t){t.AT_LEAST_ONE="AT_LEAST_ONE",t.ALL="ALL",t.NONE="NONE"}(so||(so={})),function(t){t.AND="AND",t.OR="OR"}(sr||(sr={})),function(t){t.CREATED_ON="CREATED_ON",t.FIRST_NAME="FIRST_NAME",t.LAST_NAME="LAST_NAME",t.USERNAME="USERNAME",t.EMAIL="EMAIL"}(sa||(sa={})),function(t){t.STOPPED="STOPPED",t.RUNNING="RUNNING",t.ERROR="ERROR"}(ss||(ss={})),function(t){t.JAVASCRIPT="JAVASCRIPT",t.GROOVY="GROOVY",t.JSON="JSON",t.FLOW="FLOW"}(sc||(sc={})),function(t){t.READY="READY",t.DEPLOYED="DEPLOYED",t.COMPILATION_ERROR="COMPILATION_ERROR",t.VALIDITY_PERIOD_ERROR="VALIDITY_PERIOD_ERROR",t.EXECUTION_ERROR="EXECUTION_ERROR",t.LOOP_ERROR="LOOP_ERROR",t.DISABLED="DISABLED",t.PAUSED="PAUSED",t.EXPIRED="EXPIRED",t.REMOVED="REMOVED",t.EMPTY="EMPTY"}(sl||(sl={})),function(t){t.SUNRISE="SUNRISE",t.SUNSET="SUNSET",t.TWILIGHT_MORNING_VISUAL="TWILIGHT_MORNING_VISUAL",t.TWILIGHT_MORNING_VISUAL_LOWER="TWILIGHT_MORNING_VISUAL_LOWER",t.TWILIGHT_MORNING_HORIZON="TWILIGHT_MORNING_HORIZON",t.TWILIGHT_MORNING_CIVIL="TWILIGHT_MORNING_CIVIL",t.TWILIGHT_MORNING_NAUTICAL="TWILIGHT_MORNING_NAUTICAL",t.TWILIGHT_MORNING_ASTRONOMICAL="TWILIGHT_MORNING_ASTRONOMICAL",t.TWILIGHT_MORNING_GOLDEN_HOUR="TWILIGHT_MORNING_GOLDEN_HOUR",t.TWILIGHT_MORNING_BLUE_HOUR="TWILIGHT_MORNING_BLUE_HOUR",t.TWILIGHT_MORNING_NIGHT_HOUR="TWILIGHT_MORNING_NIGHT_HOUR",t.TWILIGHT_EVENING_VISUAL="TWILIGHT_EVENING_VISUAL",t.TWILIGHT_EVENING_VISUAL_LOWER="TWILIGHT_EVENING_VISUAL_LOWER",t.TWILIGHT_EVENING_HORIZON="TWILIGHT_EVENING_HORIZON",t.TWILIGHT_EVENING_CIVIL="TWILIGHT_EVENING_CIVIL",t.TWILIGHT_EVENING_NAUTICAL="TWILIGHT_EVENING_NAUTICAL",t.TWILIGHT_EVENING_ASTRONOMICAL="TWILIGHT_EVENING_ASTRONOMICAL",t.TWILIGHT_EVENING_GOLDEN_HOUR="TWILIGHT_EVENING_GOLDEN_HOUR",t.TWILIGHT_EVENING_BLUE_HOUR="TWILIGHT_EVENING_BLUE_HOUR",t.TWILIGHT_EVENING_NIGHT_HOUR="TWILIGHT_EVENING_NIGHT_HOUR"}(sd||(sd={})),function(t){t.NUMBER="NUMBER",t.NUMBER_ARRAY="NUMBER_ARRAY",t.STRING="STRING",t.BOOLEAN="BOOLEAN",t.TRIGGER="TRIGGER",t.COLOR="COLOR",t.ANY="ANY"}(sp||(sp={})),function(t){t.NEW_LINE="NEW_LINE",t.SPACER="SPACER"}(su||(su={})),function(t){t.INPUT="INPUT",t.PROCESSOR="PROCESSOR",t.OUTPUT="OUTPUT",t.THEN="THEN"}(sh||(sh={})),function(t){t.TEXT="TEXT",t.MULTILINE="MULTILINE",t.NUMBER="NUMBER",t.DROPDOWN="DROPDOWN",t.DOUBLE_DROPDOWN="DOUBLE_DROPDOWN",t.CHECKBOX="CHECKBOX",t.ASSET_ATTRIBUTE="ASSET_ATTRIBUTE",t.COLOR="COLOR",t.DATE="DATE"}(sb||(sb={})),function(t){t.ADD="ADD",t.ADD_OR_REPLACE="ADD_OR_REPLACE",t.REPLACE="REPLACE",t.DELETE="DELETE",t.CLEAR="CLEAR"}(sf||(sf={})),function(t){t.PER_ASSET="PER_ASSET",t.GLOBAL="GLOBAL"}(sm||(sm={})),function(t){t.READ_ADMIN="read:admin",t.READ_LOGS="read:logs",t.READ_USERS="read:users",t.READ_MAP="read:map",t.READ_ASSETS="read:assets",t.READ_RULES="read:rules",t.READ_INSIGHTS="read:insights",t.READ_ALARMS="read:alarms",t.READ_SERVICES="read:services",t.WRITE_SERVICES="write:services",t.WRITE_USER="write:user",t.WRITE_ADMIN="write:admin",t.WRITE_LOGS="write:logs",t.WRITE_ASSETS="write:assets",t.WRITE_ATTRIBUTES="write:attributes",t.WRITE_RULES="write:rules",t.WRITE_INSIGHTS="write:insights",t.WRITE_ALARMS="write:alarms",t.READ="read",t.WRITE="write"}(sM||(sM={})),function(t){t.REGISTER="REGISTER",t.UPDATE="UPDATE",t.DEREGISTER="DEREGISTER"}(sg||(sg={})),function(t){t.AVAILABLE="AVAILABLE",t.UNAVAILABLE="UNAVAILABLE"}(sz||(sz={})),function(t){t.ASSET="ASSET",t.AGENT="AGENT",t.NOTIFICATION="NOTIFICATION",t.ALARM="ALARM",t.RULES="RULES",t.PROTOCOL="PROTOCOL",t.GATEWAY="GATEWAY",t.MODEL_AND_VALUES="MODEL_AND_VALUES",t.API="API",t.DATA="DATA"}(s_||(s_={})),function(t){t.INFO="INFO",t.WARN="WARN",t.ERROR="ERROR"}(sO||(sO={})),function(t){t.NUMERIC="numeric",t.DIGIT_2="2-digit",t.FULL="full",t.LONG="long",t.MEDIUM="medium",t.SHORT="short",t.NARROW="narrow"}(sy||(sy={})),function(t){t.SECONDLY="SECONDLY",t.MINUTELY="MINUTELY",t.HOURLY="HOURLY",t.DAILY="DAILY",t.WEEKLY="WEEKLY",t.MONTHLY="MONTHLY",t.YEARLY="YEARLY"}(sA||(sA={})),function(t){t.OMIT="OMIT",t.BACKWARD="BACKWARD",t.FORWARD="FORWARD"}(sv||(sv={})),function(t){t.JAPANESE="JAPANESE",t.BUDDHIST="BUDDHIST",t.ROC="ROC",t.ISLAMIC="ISLAMIC",t.ISO8601="ISO8601",t.CHINESE="CHINESE",t.ETHIOPIC="ETHIOPIC",t.HEBREW="HEBREW",t.GREGORIAN="GREGORIAN"}(sx||(sx={})),function(t){t.SU="SU",t.MO="MO",t.TU="TU",t.WE="WE",t.TH="TH",t.FR="FR",t.SA="SA"}(sw||(sw={})),function(t){t.PEOPLECOUNTERASSET="PeopleCounterAsset",t.STORAGESIMULATORAGENT="StorageSimulatorAgent",t.CITYASSET="CityAsset",t.ELECTRICITYCONSUMERASSET="ElectricityConsumerAsset",t.ELECTRICVEHICLEASSET="ElectricVehicleAsset",t.CONSOLEASSET="ConsoleAsset",t.PRESENCESENSORASSET="PresenceSensorAsset",t.LIGHTASSET="LightAsset",t.THETHINGSSTACKAGENT="TheThingsStackAgent",t.PLUGASSET="PlugAsset",t.ELECTRICITYCHARGERASSET="ElectricityChargerAsset",t.ELECTRICITYBATTERYASSET="ElectricityBatteryAsset",t.ELECTRICITYSUPPLIERASSET="ElectricitySupplierAsset",t.TCPAGENT="TCPAgent",t.SERIALAGENT="SerialAgent",t.BLUETOOTHMESHAGENT="BluetoothMeshAgent",t.SNMPAGENT="SNMPAgent",t.GROUPASSET="GroupAsset",t.BUILDINGASSET="BuildingAsset",t.ELECTRICITYPRODUCERWINDASSET="ElectricityProducerWindAsset",t.ENVIRONMENTSENSORASSET="EnvironmentSensorAsset",t.MQTTAGENT="MQTTAgent",t.MICROPHONEASSET="MicrophoneAsset",t.MODBUSTCPAGENT="ModbusTcpAgent",t.HTTPAGENT="HTTPAgent",t.DOORASSET="DoorAsset",t.ELECTRICITYPRODUCERASSET="ElectricityProducerAsset",t.MAILAGENT="MailAgent",t.UDPAGENT="UDPAgent",t.ROOMASSET="RoomAsset",t.VENTILATIONASSET="VentilationAsset",t.TRADFRILIGHTASSET="TradfriLightAsset",t.KNXAGENT="KNXAgent",t.OPENWEATHERMAPAGENT="OpenWeatherMapAgent",t.CHIRPSTACKAGENT="ChirpStackAgent",t.WEATHERASSET="WeatherAsset",t.THINGASSET="ThingAsset",t.WEBSOCKETAGENT="WebsocketAgent",t.GATEWAYASSET="GatewayAsset",t.PARKINGASSET="ParkingAsset",t.TRADFRIPLUGASSET="TradfriPlugAsset",t.SIMULATORAGENT="SimulatorAgent",t.MODBUSSERIALAGENT="ModbusSerialAgent",t.ELECTRICVEHICLEFLEETGROUPASSET="ElectricVehicleFleetGroupAsset",t.VELBUSTCPAGENT="VelbusTCPAgent",t.ARTNETLIGHTASSET="ArtnetLightAsset",t.VELBUSSERIALAGENT="VelbusSerialAgent",t.GROUNDWATERSENSORASSET="GroundwaterSensorAsset",t.ELECTRICITYPRODUCERSOLARASSET="ElectricityProducerSolarAsset",t.ENERGYOPTIMISATIONASSET="EnergyOptimisationAsset",t.ZWAVEAGENT="ZWaveAgent",t.THERMOSTATASSET="ThermostatAsset",t.SHIPASSET="ShipAsset"}(sq||(sq={})),function(t){t.SUPPORTSEXPORT="supportsExport",t.MQTTPORT="MQTTPort",t.ENERGYSELFCONSUMPTION="energySelfConsumption",t.LASTACCESS="lastAccess",t.CHARGERID="chargerID",t.POSITION="position",t.CARBONSAVING="carbonSaving",t.ROUTINGMODE="routingMode",t.LASTWILLRETAIN="lastWillRetain",t.LASTWILLTOPIC="lastWillTopic",t.SERIALBAUDRATE="serialBaudrate",t.BASEURL="baseURL",t.REQUIREDVALUES="requiredValues",t.FINANCIALSAVING="financialSaving",t.FLEETCATEGORY="fleetCategory",t.GATEWAYSTATUS="gatewayStatus",t.NO2LEVEL="NO2Level",t.ATMOSPHERICPRESSURE="atmosphericPressure",t.TAGS="tags",t.UNLOCK="unlock",t.MILEAGEMIN="mileageMin",t.CHECKINTERVALSECONDS="checkIntervalSeconds",t.LOCATION="location",t.CLIENTSECRET="clientSecret",t.WINDDIRECTION="windDirection",t.WINDSPEED="windSpeed",t.PARTICLESPM10="particlesPM10",t.APPLICATIONKEY="applicationKey",t.POWEREXPORTMAX="powerExportMax",t.SETWINDACTUALVALUEWITHFORECAST="setWindActualValueWithForecast",t.WATERLEVEL="waterLevel",t.CONSOLENAME="consoleName",t.CONNECTHEADERS="connectHeaders",t.WEBSOCKETQUERY="websocketQuery",t.PREFERHTML="preferHTML",t.COOLING="cooling",t.POLLINGMILLIS="pollingMillis",t.SOILTEMPERATURE="soilTemperature",t.SUNIRRADIANCE="sunIrradiance",t.ODOMETER="odometer",t.SUPPORTSIMPORT="supportsImport",t.MESSAGEMAXLENGTH="messageMaxLength",t.WINDGUSTSPEED="windGustSpeed",t.ENERGYLEVELPERCENTAGEMIN="energyLevelPercentageMin",t.LIGHTID="lightId",t.POWER="power",t.STREET="street",t.DELETEPROCESSEDMAIL="deleteProcessedMail",t.WINDSPEEDMIN="windSpeedMin",t.POWERSETPOINT="powerSetpoint",t.PRESENCE="presence",t.SPACESOCCUPIED="spacesOccupied",t.STARTTLS="startTLS",t.AGENTSTATUS="agentStatus",t.MESSAGECHARSET="messageCharset",t.CERTIFICATEALIAS="certificateAlias",t.PANELPITCH="panelPitch",t.EMAIL="email",t.BINDPORT="bindPort",t.PARTICLESPM1="particlesPM1",t.SPEED="speed",t.ENERGYLEVELPERCENTAGEMAX="energyLevelPercentageMax",t.MESSAGESTRIPDELIMITER="messageStripDelimiter",t.AREA="area",t.COUNTRY="country",t.SHIPTYPE="shipType",t.CONNECTSUBSCRIPTIONS="connectSubscriptions",t.RELATIVEHUMIDITY="relativeHumidity",t.INCLUDEFORECASTWINDSERVICE="includeForecastWindService",t.SOURCEADDRESS="sourceAddress",t.RAINFALL="rainfall",t.ENERGYIMPORTTOTAL="energyImportTotal",t.OAUTHGRANT="oAuthGrant",t.OZONELEVEL="ozoneLevel",t.COUNTINMINUTE="countInMinute",t.PORT="port",t.TUNNELINGSUPPORTED="tunnelingSupported",t.ENINUMBER="ENINumber",t.AGENTDISABLED="agentDisabled",t.DISABLED="disabled",t.FORCECHARGE="forceCharge",t.TIMEINJECTIONINTERVAL="timeInjectionInterval",t.FINANCIALWEIGHTING="financialWeighting",t.ENERGYLEVELPERCENTAGE="energyLevelPercentage",t.SPACESBUFFER="spacesBuffer",t.VEHICLECATEGORY="vehicleCategory",t.FANSPEED="fanSpeed",t.FINANCIALCOST="financialCost",t.NOTES="notes",t.MAILFOLDERNAME="mailFolderName",t.TEMPERATURE="temperature",t.AVAILABLECHARGINGSPACES="availableChargingSpaces",t.ENERGYCAPACITY="energyCapacity",t.POWERIMPORTMIN="powerImportMin",t.INTERVALSIZE="intervalSize",t.SNMPVERSIONVALUE="SNMPVersionValue",t.SOUNDLEVEL="soundLevel",t.UNITID="unitId",t.STOPBITS="stopBits",t.CONNECTURL="connectURL",t.CLIENTID="clientId",t.VEHICLEID="vehicleID",t.SUNAZIMUTH="sunAzimuth",t.AVAILABLEDISCHARGINGSPACES="availableDischargingSpaces",t.WEBSOCKETMODE="websocketMode",t.COLOURTEMPERATURE="colourTemperature",t.VEHICLECONNECTED="vehicleConnected",t.DATABITS="dataBits",t.MILEAGEMINIMUM="mileageMinimum",t.COLOURRGB="colourRGB",t.CARBONIMPORT="carbonImport",t.WILDCARDSUBSCRIPTIONTOPICS="wildcardSubscriptionTopics",t.PRICEHOURLY="priceHourly",t.WINDSPEEDMAX="windSpeedMax",t.PINGDISABLED="pingDisabled",t.FLOW="flow",t.CHILDASSETTYPE="childAssetType",t.NETWORKKEY="networkKey",t.UNIVERSE="universe",t.MSSINUMBER="MSSINumber",t.SUBSCRIBEQOS="subscribeQos",t.LEDCOUNT="lEDCount",t.LOCKED="locked",t.CLOUDCOVERAGE="cloudCoverage",t.PROTOCOL="protocol",t.TARIFFIMPORT="tariffImport",t.ENERGYRENEWABLESHARE="energyRenewableShare",t.REGION="region",t.CONSOLEPLATFORM="consolePlatform",t.POWEREXPORTMIN="powerExportMin",t.EFFICIENCYEXPORT="efficiencyExport",t.CHARGECYCLES="chargeCycles",t.SERIALPORT="serialPort",t.APPLICATIONID="applicationId",t.PANELORIENTATION="panelOrientation",t.LENGTH="length",t.PROBABILITYOFPRECIPITATION="probabilityOfPrecipitation",t.USERNAMEPASSWORD="usernamePassword",t.POWERFORECAST="powerForecast",t.SETACTUALSOLARVALUEWITHFORECAST="setActualSolarValueWithForecast",t.REQUESTQUERYPARAMETERS="requestQueryParameters",t.PROXYADDRESS="proxyAddress",t.MQTTHOST="MQTTHost",t.ENERGYLOCAL="energyLocal",t.ENERGYAUTARKY="energyAutarky",t.MODEL="model",t.MANUFACTURER="manufacturer",t.ONOFF="onOff",t.RESUMESESSION="resumeSession",t.TARIFFEXPORT="tariffExport",t.APIKEY="ApiKey",t.CITY="city",t.CONNECTORTYPE="connectorType",t.ENERGYEXPORTTOTAL="energyExportTotal",t.CARBONEXPORT="carbonExport",t.REQUESTTIMEOUTMILLIS="requestTimeoutMillis",t.ENERGYLEVEL="energyLevel",t.OPTIMISATIONDISABLED="optimisationDisabled",t.WEBSOCKETPATH="websocketPath",t.WINDSPEEDREFERENCE="windSpeedReference",t.PRICEDAILY="priceDaily",t.COUNTGROWTHMINUTE="countGrowthMinute",t.IMONUMBER="IMONumber",t.ATTRIBUTION="Attribution",t.INCLUDEFORECASTSOLARSERVICE="includeForecastSolarService",t.REQUESTHEADERS="requestHeaders",t.TENANTID="tenantId",t.HOST="host",t.COUNTOUTMINUTE="countOutMinute",t.ENERGYTYPE="energyType",t.CONSOLEVERSION="consoleVersion",t.MTU="mtu",t.PANELAZIMUTH="panelAzimuth",t.SEQUENCENUMBER="sequenceNumber",t.SUNALTITUDE="sunAltitude",t.COUNTOUT="countOut",t.CHARGERCONNECTED="chargerConnected",t.ROOMNUMBER="roomNumber",t.PARTICLESPM2_5="particlesPM2_5",t.MESSAGESOURCEADDRESS="messageSourceAddress",t.COUNTIN="countIn",t.MILEAGECHARGED="mileageCharged",t.PROVISIONWEATHERASSET="ProvisionWeatherAsset",t.TEMPERATURESETPOINT="temperatureSetpoint",t.CONSOLEPROVIDERS="consoleProviders",t.POWERIMPORTMAX="powerImportMax",t.COUNTTOTAL="countTotal",t.SPACESTOTAL="spacesTotal",t.BINDHOST="bindHost",t.MESSAGECONVERTBINARY="messageConvertBinary",t.MESSAGEDELIMITERS="messageDelimiters",t.EFFICIENCYIMPORT="efficiencyImport",t.SUNZENITH="sunZenith",t.BRIGHTNESS="brightness",t.POSTALCODE="postalCode",t.SPACESOPEN="spacesOpen",t.HUMIDITY="humidity",t.SECUREMODE="secureMode",t.MILEAGECAPACITY="mileageCapacity",t.DIRECTION="direction",t.ENERGYLEVELSCHEDULE="energyLevelSchedule",t.UVINDEX="uVIndex",t.NATMODE="NATMode",t.UPDATEONWRITE="updateOnWrite",t.LASTWILLPAYLOAD="lastWillPayload",t.GROUPID="groupId",t.FOLLOWREDIRECTS="followRedirects",t.CARBONCOST="carbonCost",t.MESSAGECONVERTHEX="messageConvertHex",t.PUBLISHQOS="publishQos"}(sL||(sL={})),function(t){t.FORMAT="format",t.RULESTATE="ruleState",t.HASPREDICTEDDATAPOINTS="hasPredictedDataPoints",t.STOREDATAPOINTS="storeDataPoints",t.LABEL="label",t.CONSTRAINTS="constraints",t.SHOWONDASHBOARD="showOnDashboard",t.READONLY="readOnly",t.MULTILINE="multiline",t.ACCESSPUBLICWRITE="accessPublicWrite",t.MOMENTARY="momentary",t.AGENTLINK="agentLink",t.ACCESSRESTRICTEDREAD="accessRestrictedRead",t.DATAPOINTSMAXAGEDAYS="dataPointsMaxAgeDays",t.ACCESSRESTRICTEDWRITE="accessRestrictedWrite",t.SECRET="secret",t.ATTRIBUTELINKS="attributeLinks",t.RULERESETIMMEDIATE="ruleResetImmediate",t.AGENTLINKCONFIG="agentLinkConfig",t.FORECAST="forecast",t.UNITS="units",t.USERCONNECTED="userConnected",t.ACCESSPUBLICREAD="accessPublicRead"}(sF||(sF={})),function(t){t.WSURL="WS_URL",t.POSITIVENUMBER="positiveNumber",t.VALUEDESCRIPTOR="valueDescriptor",t.LONG="long",t.BOOLEANMAP="booleanMap",t.MQTTQOS="MQTTQos",t.GEOJSONPOINT="GEO_JSONPoint",t.SNMPVERSION="SNMPVersion",t.ASSETTYPE="assetType",t.JSONOBJECT="JSONObject",t.BIGNUMBER="bigNumber",t.IPADDRESS="IPAddress",t.EMAIL="email",t.KNXMESSAGESOURCEADDRESS="kNXMessageSourceAddress",t.ATTRIBUTEREFERENCE="attributeReference",t.INTEGER="integer",t.OAUTHGRANT="oAuthGrant",t.NUMBER="number",t.TEXTMAP="textMap",t.WEBSOCKETSUBSCRIPTION="websocketSubscription",t.BOOLEAN="boolean",t.TIMEANDPERIODDURATIONISO8601="timeAndPeriodDurationISO8601",t.TIMESTAMPISO8601="timestampISO8601",t.MULTIVALUEDTEXTMAP="multivaluedTextMap",t.JSON="JSON",t.INTEGERBYTE="integerByte",t.AGENTLINK="agentLink",t.CALENDAREVENT="calendarEvent",t.CONNECTIONSTATUS="connectionStatus",t.VALUECONSTRAINT="valueConstraint",t.ASSETQUERY="assetQuery",t.COLOURRGB="colourRGB",t.VALUEFORMAT="valueFormat",t.TEXT="text",t.BYTE="byte",t.USERNAMEANDPASSWORD="usernameAndPassword",t.HTTPURL="HTTP_URL",t.ATTRIBUTELINK="attributeLink",t.ASSETID="assetID",t.NUMBERMAP="numberMap",t.HTTPMETHOD="HTTPMethod",t.PANELORIENTATION="panelOrientation",t.ATTRIBUTESTATE="attributeState",t.POSITIVEINTEGER="positiveInteger",t.EXECUTIONSTATUS="executionStatus",t.BIGINTEGER="bigInteger",t.PERIODDURATIONISO8601="periodDurationISO8601",t.DATEANDTIME="dateAndTime",t.CONNECTORTYPE="connectorType",t.NEGATIVEINTEGER="negativeInteger",t.TCPIPPORTNUMBER="TCP_IPPortNumber",t.INTEGERMAP="integerMap",t.ENERGYTYPE="energyType",t.TIMESTAMP="timestamp",t.UUID="UUID",t.FORECASTCONFIGURATION="forecastConfiguration",t.TIMEDURATIONISO8601="timeDurationISO8601",t.CONSOLEPROVIDERS="consoleProviders",t.NEGATIVENUMBER="negativeNumber",t.CRONEXPRESSION="CRONExpression",t.DIRECTION="direction",t.HOSTORIPADDRESS="hostOrIPAddress"}(sk||(sk={})),function(t){t.MONTH="month",t.MILE_SCANDINAVIAN="mile_scandinavian",t.YEAR="year",t.VOLT="volt",t.HERTZ="hertz",t.MILE="mile",t.BTU="btu",t.FOOT="foot",t.MEGA="mega",t.INCH="inch",t.IN_HG="inch_mercury",t.CENTI="centi",t.GRAM="gram",t.KNOT="knot",t.METRE="metre",t.LITRE="litre",t.FLUID_OUNCE="fluid_ounce",t.CELSIUS="celsius",t.DECIBEL="decibel",t.FAHRENHEIT="fahrenheit",t.WATT="watt",t.PEAK="peak",t.MICRO="micro",t.PER="per",t.STONE="stone",t.VAR="var",t.OUNCE="ounce",t.HECTARE="hectare",t.YARD="yard",t.JOULE="joule",t.DEGREE="degree",t.KILO="kilo",t.KELVIN="kelvin",t.CARBON="carbon",t.DECIBEL_ATTENUATED="decibel_attenuated",t.SQUARED="squared",t.PERCENTAGE="percentage",t.CUBED="cubed",t.DAY="day",t.RADIAN="radian",t.OHM="ohm",t.MINUTE="minute",t.PART_PER_MILLION="ppm",t.AMP="amp",t.MASS_POUND="pound",t.HOUR="hour",t.ACRE="acre",t.RPM="rpm",t.PASCAL="pascal",t.LUMEN="lumen",t.WEEK="week",t.GALLON="gallon",t.LUX="lux",t.MILLI="milli",t.BAR="bar",t.HECTO="hecto",t.SECOND="second"}(sE||(sE={})),sT||(sT={});class tV{static getAssetDescriptors(){return tV._assetTypeInfos.map(t=>t.assetDescriptor)}static getMetaItemDescriptors(){return[...this._metaItemDescriptors]}static getValueDescriptors(){return[...this._valueDescriptors]}static getAssetTypeInfos(){return[...this._assetTypeInfos]}static getAssetTypeInfo(t){if(t)return t.assetDescriptor?t:("string"!=typeof t&&(t=t.name),this._assetTypeInfos.find(n=>n.assetDescriptor.name===t))}static getAssetDescriptor(t){if(!t)return;if(t.assetDescriptor)return t.assetDescriptor;if("string"!=typeof t)return t;let n=this._assetTypeInfos.find(n=>n.assetDescriptor.name===t);return n?n.assetDescriptor:void 0}static getAttributeDescriptor(t,n){if(!t)return;let i=this.getAssetTypeInfo(n||"ThingAsset");if(i&&i.attributeDescriptors)return i.attributeDescriptors.find(n=>n.name===t)}static getValueDescriptor(t){let n;if(!t)return;if(t.endsWith("[]"))for(n=0;t.endsWith("[]");)t=t.substring(0,t.length-2),n++;let i=this._valueDescriptors.find(n=>n.name===t);return i&&n&&(i=Object.assign(Object.assign({},i),{arrayDimensions:n})),i}static resolveValueDescriptor(t,n){let i;return n&&("string"==typeof n&&(i=tV.getValueDescriptor(n)),i=n.jsonType?n:tV.getValueDescriptor(n.type)),!i&&t&&(i=tV.getValueDescriptor("JSON")),i}static resolveValueTypeFromValue(t){if(null!=t){if("number"==typeof t)return"number";if("string"==typeof t)return"text";if("boolean"==typeof t)return"boolean";if(Array.isArray(t)){let n=1,i=t.find(t=>null!=t);for(;Array.isArray(i);)i=i.find(t=>null!=t),n++;let o=this.resolveValueTypeFromValue(i);if(!o)return;for(;n>0;)o+="[]",n--;return o}if(t instanceof Date)return"dateAndTime"}}static getAttributeAndValueDescriptors(t,n,i){let o,r;if(n&&"string"!=typeof n)o=n;else{let r=this.getAssetTypeInfo(t||"ThingAsset");if(!r)return[void 0,void 0];"string"==typeof n&&(o=this.getAttributeDescriptor(n,r)),!o&&i&&(o={type:i.type,name:i.name,meta:i.meta})}return o&&(r=this.getValueDescriptor(o.type)),[o,r]}static getMetaItemDescriptor(t){if(t)return this._metaItemDescriptors.find(n=>n.name===t)}static getAssetDescriptorColour(t,n){let i=this.getAssetDescriptor(t);return i&&i.colour?i.colour:n}static getAssetDescriptorIcon(t,n){let i=this.getAssetDescriptor(t);return i&&i.icon?i.icon:n}}tV._assetTypeInfos=[],tV._metaItemDescriptors=[],tV._valueDescriptors=[],i(50488);var tG=i(33348),tK=i.n(tG),tZ=i(53806),tJ=i.n(tZ),tQ=i(92891);class t0{get resolve(){return this._resolve}get reject(){return this._reject}get promise(){return this._promise}constructor(){this._promise=new Promise((t,n)=>{this._resolve=t,this._reject=n}),Object.freeze(this)}}function t1(t,n,i=!0){if(null==t||null==n)return t===n;if(t.constructor!==n.constructor)return!1;if(t instanceof Function||t instanceof RegExp)return t===n;if(t===n||t.valueOf()===n.valueOf())return!0;if(Array.isArray(t)&&t.length!==n.length||t instanceof Date||!(t instanceof Object)||!(n instanceof Object))return!1;if(i){let i=Object.keys(t);return Object.keys(n).every(t=>-1!==i.indexOf(t))&&i.every(i=>t1(t[i],n[i]))}return!1}function t2(t){if(null==t)return"";let n=!1;return t.split(/([A-Z]|\d)/).map((t,i,o)=>{if(!t)return t;if(!n)return n=!0,t.charAt(0).toUpperCase()+t.slice(1);if("_"===t)return" ";if(1===t.length&&t===t.toUpperCase()){let n=!o[i-1]||"_"===o[i-1],r=i+1<o.length&&o[i+1]&&"_"!==o[i+1],a=i+3>o.length||!o[i+1]&&!o[i+3];(!n||r)&&(t=" "+t),!r&&(n||a)||(t=t.toLowerCase())}return t}).join("").trim()}function t3(t,n,i){let o="string"==typeof t?t:t.name;return n&&n.meta&&n.meta.hasOwnProperty(o)?n.meta[o]:i&&i.meta?i.meta[o]:void 0}function t4(t,n){let i="string"==typeof t?tV.getMetaItemDescriptor(t):t;return i?{name:i.name,type:i.type,value:n}:{name:typeof t,type:tV.resolveValueTypeFromValue(n),value:n}}function t5(t,n,i,o,r,a){let s=ne("label",t,n,i,r),c="";if(s||(s=t3("label",t,n&&n.meta?n:void 0)),o&&(c=t7(t9("units",t,n,i,r))),!s){let i=t?t.name:n?"string"==typeof n?n:n.name:void 0;s=a||(i?t2(i):void 0)}return s?s+(c?" ("+c+")":""):c}function t6(t,n,i,o,r,a){let s=t8(t?t.value:void 0,()=>t9("format",t,n,i,r),void 0,a),c=t9("units",t,n,i,!0);return o&&c&&c.length&&(s=t7(t9("units",t,n,i,r),s)),s}function t8(t,n,i,o){let r="";if(null==t)r=o||"";else if("string"==typeof t)r=t;else if("number"==typeof t||"boolean"==typeof t||t instanceof Date){let o=n&&n();if(o&&0!==Object.keys(o).length)switch("number"==typeof t?o.asBoolean?t=!!t:o.asDate&&(t=new Date(t)):"boolean"==typeof t&&o.asNumber&&(t=+!!t),typeof t){case"number":r=new Intl.NumberFormat(i||tX.language,o).format(t);break;case"boolean":o.asOnOff&&(r=t?tX.t("on"):tX.t("off")),o.asOpenClosed&&(r=t?tX.t("open"):tX.t("closed")),o.asPressedReleased&&(r=t?tX.t("pressed"):tX.t("released"));break;case"object":if(o.momentJsFormat)r=tJ()(t).format(o.momentJsFormat);else if(o.iso8601)r=t.toISOString();else if(o.week){var a;let n,i=((a=new Date(Date.UTC((a=t).getFullYear(),a.getMonth(),a.getDate()))).setUTCDate(a.getUTCDate()+4-(a.getUTCDay()||7)),n=new Date(Date.UTC(a.getUTCFullYear(),0,1)),Math.ceil(((a.getTime()-n.getTime())/864e5+1)/7));r="2-digit"===o.week?String(i).padStart(2,"0"):Number(i).toString(10)}else r=new Intl.DateTimeFormat(i||tX.language,o).format(t)}else r=Object(t).toString()}return r}function t7(t,n){if(!t)return"";n||(n="");let i=t.map((t,i)=>{if(3!==t.length||t.toUpperCase()!==t)return tX.t(["units."+t,"or:units."+t]);{let o=new Intl.NumberFormat(tX.language,{currency:t,style:"currency"}).formatToParts();if(0!==i||"currency"!==o[0].type)return"currency"===o[0].type?o[0].value:o[o.length-1].value;if(!n)return o[0].value;n=o[0].value+n}}).join("");return n.length>0?n+" "+i:i}function t9(t,n,i,o,r){let a,s=[],c=ne(t,n&&"string"==typeof n?n:n?n.name:i?"string"==typeof i?i:i.name:void 0,i,o,r);if(c&&(a=JSON.parse(c)))if("format"!==t)return a;else s.push(a);if(n&&n.meta&&(a=t3(t,n,i)))if("format"!==t)return a;else s.push(a);if(i&&"string"!=typeof i&&i.hasOwnProperty(t)){if(a=i[t],"format"!==t)return a;s.push(a)}if(i&&i.type){if(a=tV.getValueDescriptor(i.type)[t],"format"!==t)return a;s.push(a)}if("format"!==t||0===s.length)return a;let l={};return s.reverse().forEach(t=>{l=Object.assign(Object.assign({},l),t)}),l}function ne(t,n,i,o,r,a){let s;if(n?s="string"==typeof n?n:n.name:i&&(s="string"==typeof i?i:i.name),!s)return;let c=[],l=t+"."+(r?"attribute":"meta")+".";if(o&&c.push(l+o+"."+s),i&&"string"!=typeof i&&(c.push(l+i.type+"."+s),c.push(l+i.type)),c.push(l+s),c.length>0)return tX.t(c,{defaultValue:a||""})}function nt(t,n){let i=n.ref.name;if(t.attributes)if(n.deleted)delete t.attributes[i];else{let o=t.attributes[i];o&&(o.value=n.value,o.timestamp=n.timestamp)}return Object.assign({},t)}var nn=function(t,n,i,o){return new(i||(i=Promise))(function(r,a){function s(t){try{l(o.next(t))}catch(t){a(t)}}function c(t){try{l(o.throw(t))}catch(t){a(t)}}function l(t){var n;t.done?r(t.value):((n=t.value)instanceof i?n:new i(function(t){t(n)})).then(s,c)}l((o=o.apply(t,n||[])).next())})};let ni=i(89916);class no{constructor(t,n,i){this._autoEnable=!1,this._initialised=!1,this._initialiseInProgress=!1,this._pendingProviderPromises={},this._providerMessageListeners={},this._pendingProviderEnables=[],this._registrationTimer=null,this._realm=t,this._autoEnable=n,this._enableCompleteCallback=i,window.OpenRemoteConsole=this;let o=new URLSearchParams(window.location.search),r=o.get("consoleName"),a=o.get("consoleVersion"),s=o.get("consolePlatform"),c=o.get("consoleProviders"),l=o.get("consoleAutoEnable"),d=c&&c.length>0?c.split(" "):["push"];this._pendingProviderEnables=d;let p=no._createConsoleRegistration(),u=window.localStorage.getItem("OpenRemoteConsole:"+t);if(u)try{let t=JSON.parse(u);t.id&&(p.id=t.id),t.name&&(p.name=t.name),t.providers&&(p.providers=t.providers),t.apps&&(p.apps=t.apps)}catch(t){console.error("Failed to deserialise console registration")}let h=p.providers;for(let t of(p.providers={},d)){let n=h&&h.hasOwnProperty(t)?h[t]:{enabled:!1,disabled:!1};p.providers[t]=n}let b=i$.getAppName();b.length>0&&0>p.apps.indexOf(b)&&p.apps.push(b),this._registration=p,r&&(p.name=r),a&&(p.version=a),s&&(p.platform=s),l&&(this._autoEnable="TRUE"===l||"true"===l)}get registration(){return this._registration}get autoEnable(){return this._autoEnable}get pendingProviderEnables(){return this._pendingProviderEnables.slice(0)}get shellApple(){let t=navigator.userAgentData&&navigator.userAgentData.platform?navigator.userAgentData.platform:navigator.platform;return t&&("iP"===t.substring(0,2)||"Mac"===t.substring(0,3))&&window.webkit&&window.webkit.messageHandlers}get shellAndroid(){return!!window.MobileInterface}get isMobile(){return this.shellApple||this.shellAndroid}initialise(){return nn(this,void 0,void 0,function*(){if(!this._initialised&&!this._initialiseInProgress){console.debug("Console: initialising"),this._initialiseInProgress=!0;try{if(this._registration.providers)for(let t of Object.keys(this._registration.providers))yield this._initialiseProvider(t);this._registration.id||(yield this.sendRegistration(0)),this._initialised=!0,this._initialiseInProgress=!1,0===this._pendingProviderEnables.length?(yield this.sendRegistration(),this._callCompletedCallback()):this._autoEnable&&(yield this.enableProviders())}catch(t){console.error(t)}finally{this._initialiseInProgress=!1}}})}enableProviders(){return nn(this,void 0,void 0,function*(){if(!this._initialised)throw Error("Console must be initialised before enabling providers");for(let t=this._pendingProviderEnables.length-1;t>-1;t--){let n=this._pendingProviderEnables[t];yield this.enableProvider(n)}})}enableProvider(t,n){return nn(this,void 0,void 0,function*(){if(!this._initialised)throw console.debug("Console must be initialised before disabling providers"),Error("Console must be initialised before enabling providers");if(!this._registration.providers.hasOwnProperty(t))throw console.debug("Invalid console provider '"+t+"'"),Error("Invalid console provider '"+t+"'");console.debug("Console: enabling provider '"+t+"'");let i={provider:t,action:"PROVIDER_ENABLE",consoleId:this._registration.id,data:n},o=yield this.sendProviderMessage(i,!0);this._registration.providers[t].hasPermission=o.hasPermission,this._registration.providers[t].success=o.success,this._registration.providers[t].enabled=o.success,this._registration.providers[t].data=o.data;let r=this._pendingProviderEnables.indexOf(t);return r>=0&&(this._pendingProviderEnables.splice(r,1),0===this._pendingProviderEnables.length&&(this.sendRegistration(),this._callCompletedCallback())),o})}disableProvider(t){return nn(this,void 0,void 0,function*(){if(!this._initialised)throw console.debug("Console must be initialised before disabling providers"),Error("Console must be initialised before disabling providers");if(!this._registration.providers.hasOwnProperty(t))throw console.debug("Invalid console provider '"+t+"'"),Error("Invalid console provider '"+t+"'");console.debug("Console: disabling provider '"+t+"'");let n=yield this.sendProviderMessage({provider:t,action:"PROVIDER_DISABLE"},!0);return this._registration.providers[t].disabled=!0,this._registration.providers[t].enabled=!1,n})}getProvider(t){return this._registration&&this._registration.providers?this._registration.providers[t]:void 0}sendProviderMessage(t,n){return nn(this,void 0,void 0,function*(){if("storage"!==t.provider&&!this._registration.providers.hasOwnProperty(t.provider))throw console.debug("Invalid console provider '"+t.provider+"'"),Error("Invalid console provider '"+t.provider+"'");if(!n)return void this._doSendProviderMessage(t);let i=t.provider+t.action;if(this._pendingProviderPromises[i])throw Error("Message already pending for provider '"+t.provider+"' with action '"+t.action+"'");let o=new t0,r=()=>{delete this._pendingProviderPromises[i],o.reject("No response from provider")};return this._pendingProviderPromises[i]=[o,window.setTimeout(r,5e3)],this._doSendProviderMessage(t),o.promise})}sendRegistration(t){return this._registrationTimer&&(window.clearTimeout(this._registrationTimer),this._registrationTimer=null),console.debug("Sending registration in: "+(t=void 0!==t?t:2e3)+"ms"),new Promise((t,n)=>{this._registrationTimer=window.setTimeout(()=>{this._registrationTimer=null,console.debug("Console: updating registration");try{this._registration.name||(this._registration.name="Console"),this._registration.platform||(this._registration.platform="N/A"),this._registration.version||(this._registration.version="N/A"),this._registration.providers||(this._registration.providers={}),i$.rest.api.ConsoleResource.register(this._registration).then(n=>{if(200!==n.status)throw Error("Failed to register console");this._registration=n.data,console.debug("Console: registration successful"),console.debug("Console: updating locally stored registration"),window.localStorage.setItem("OpenRemoteConsole:"+this._realm,JSON.stringify(this._registration)),t()})}catch(t){console.error("Failed to register console"),n("Failed to register console")}})})}storeData(t,n){this.sendProviderMessage({provider:"storage",action:"STORE",key:t,value:n},!1)}retrieveData(t){return nn(this,void 0,void 0,function*(){let n=this.sendProviderMessage({provider:"storage",action:"RETRIEVE",key:t},!0);try{let t=yield Promise.race([n,new Promise((t,n)=>setTimeout(n,2e3))]);if(t&&t.value){let n=t.value;return"null"===n?void 0:n}}catch(t){console.log("Failed to retrieve data from storage provider")}})}addProviderMessageListener(t,n){this._providerMessageListeners[t.provider+t.action]=n}removeProviderMessageListener(t){delete this._providerMessageListeners[t.provider+t.action]}_postNativeShellMessage(t){try{if(this.shellAndroid)return window.MobileInterface.postMessage(JSON.stringify(t));if(this.shellApple)return window.webkit.messageHandlers.int.postMessage(t)}catch(t){console.error("Failed to send shell message towards console",t)}}_doSendGenericMessage(t,n){let i={type:t,data:n};this.isMobile?this._postNativeShellMessage(i):console.warn("Failed to send generic message to console.",i)}_doSendProviderMessage(t){if(this.isMobile)this._postNativeShellMessage({type:"provider",data:t});else{if(!t.provider||!t.action)return;switch(t.provider.trim().toUpperCase()){case"PUSH":switch(t.action.trim().toUpperCase()){case"PROVIDER_INIT":this._handleProviderResponse(JSON.stringify({action:"PROVIDER_INIT",provider:"push",version:"web",enabled:!0,disabled:!1,hasPermission:!0,requiresPermission:!1,success:!0}));break;case"PROVIDER_ENABLE":this._handleProviderResponse(JSON.stringify({action:"PROVIDER_ENABLE",provider:"push",hasPermission:!0,success:!0}));break;default:throw Error("Unsupported provider '"+t.provider+"' and action '"+t.action+"'")}break;case"STORAGE":switch(t.action){case"PROVIDER_INIT":this._handleProviderResponse(JSON.stringify({action:"PROVIDER_INIT",provider:"storage",version:"1.0.0",disabled:!1,enabled:!0,hasPermission:!0,requiresPermission:!1,success:!0}));break;case"PROVIDER_ENABLE":this._handleProviderResponse(JSON.stringify({action:"PROVIDER_ENABLE",provider:"storage",hasPermission:!0,success:!0}));break;case"STORE":{let n=t.key?t.key.trim():null;if(!n||0===n.length)throw Error("Storage provider 'store' action requires a `key`");null===t.value?window.localStorage.removeItem(n):window.localStorage.setItem(n,JSON.stringify(t.value))}break;case"RETRIEVE":{let n=t.key?t.key.trim():null;if(!n||0===n.length)throw Error("Storage provider 'retrieve' action requires a `key`");let i=window.localStorage.getItem(n);if(null!==i)try{i=JSON.parse(i)}catch(t){}this._handleProviderResponse(JSON.stringify({action:"RETRIEVE",provider:"storage",key:n,value:i}))}break;default:throw Error("Unsupported provider '"+t.provider+"' and action '"+t.action+"'")}break;default:console.error("Unsupported provider: "+t.provider)}}}_handleProviderResponse(t){if(!t)return;let n=JSON.parse(t),i=n.provider,o=n.action,r=this._pendingProviderPromises[i+o];r&&(window.clearTimeout(r[1]),delete this._pendingProviderPromises[i+o],r[0].resolve(n));let a=this._providerMessageListeners[i+o];a&&a(n)}_callCompletedCallback(){let t=this._enableCompleteCallback;this._enableCompleteCallback=null,t&&window.setTimeout(()=>{t()},0)}static _createConsoleRegistration(){return{name:ni.name,version:ni.version,platform:ni.os.toString(),apps:[],model:((ni.manufacturer?ni.manufacturer+" ":"")+(ni.product?ni.product:"")).trim()}}_initialiseProvider(t){return nn(this,void 0,void 0,function*(){let n;console.debug("Console: initialising provider '"+t+"'");try{n=yield this.sendProviderMessage({provider:t,action:"PROVIDER_INIT"},!0),this._registration.providers[t].version=n.version,this._registration.providers[t].requiresPermission=n.requiresPermission,this._registration.providers[t].hasPermission=n.hasPermission,this._registration.providers[t].success=n.success,this._registration.providers[t].enabled=n.enabled,this._registration.providers[t].disabled=n.disabled,this._registration.providers[t].data=n.data}catch(t){console.error(t),n={action:"",disabled:!1,enabled:!1,hasPermission:!1,provider:"",requiresPermission:!1,version:"",success:!1}}if(n.success||(console.debug("Provider initialisation failed: '"+t+"'"),n.disabled=!0,this._registration.providers[t].disabled=!0),n.disabled||n.enabled){let n=this._pendingProviderEnables.indexOf(t);n>=0&&this._pendingProviderEnables.splice(n,1)}})}}var nr=i(43653),na=i.n(nr);class ns{constructor(t){this.httpClient=t}getPredictedDatapoints(t,n,i,o){return this.httpClient.request({method:"POST",url:nF`asset/predicted/${t}/${n}`,data:i,options:o})}writePredictedDatapoints(t,n,i,o){return this.httpClient.request({method:"PUT",url:nF`asset/predicted/${t}/${n}`,data:i,options:o})}}class nc{constructor(t){this.httpClient=t}createGlobalRuleset(t,n){return this.httpClient.request({method:"POST",url:nF`rules`,data:t,options:n})}getGlobalRulesets(t,n){return this.httpClient.request({method:"GET",url:nF`rules`,queryParams:t,options:n})}createAssetRuleset(t,n){return this.httpClient.request({method:"POST",url:nF`rules/asset`,data:t,options:n})}getAssetRulesets(t,n,i){return this.httpClient.request({method:"GET",url:nF`rules/asset/for/${t}`,queryParams:n,options:i})}deleteAssetRuleset(t,n){return this.httpClient.request({method:"DELETE",url:nF`rules/asset/${t}`,options:n})}getAssetRuleset(t,n){return this.httpClient.request({method:"GET",url:nF`rules/asset/${t}`,options:n})}updateAssetRuleset(t,n,i){return this.httpClient.request({method:"PUT",url:nF`rules/asset/${t}`,data:n,options:i})}getAssetGeofences(t,n){return this.httpClient.request({method:"GET",url:nF`rules/geofences/${t}`,options:n})}getAssetEngineInfo(t,n){return this.httpClient.request({method:"GET",url:nF`rules/info/asset/${t}`,options:n})}getGlobalEngineInfo(t){return this.httpClient.request({method:"GET",url:nF`rules/info/global`,options:t})}getRealmEngineInfo(t,n){return this.httpClient.request({method:"GET",url:nF`rules/info/realm/${t}`,options:n})}createRealmRuleset(t,n){return this.httpClient.request({method:"POST",url:nF`rules/realm`,data:t,options:n})}getRealmRulesets(t,n,i){return this.httpClient.request({method:"GET",url:nF`rules/realm/for/${t}`,queryParams:n,options:i})}deleteRealmRuleset(t,n){return this.httpClient.request({method:"DELETE",url:nF`rules/realm/${t}`,options:n})}getRealmRuleset(t,n){return this.httpClient.request({method:"GET",url:nF`rules/realm/${t}`,options:n})}updateRealmRuleset(t,n,i){return this.httpClient.request({method:"PUT",url:nF`rules/realm/${t}`,data:n,options:i})}deleteGlobalRuleset(t,n){return this.httpClient.request({method:"DELETE",url:nF`rules/${t}`,options:n})}getGlobalRuleset(t,n){return this.httpClient.request({method:"GET",url:nF`rules/${t}`,options:n})}updateGlobalRuleset(t,n,i){return this.httpClient.request({method:"PUT",url:nF`rules/${t}`,data:n,options:i})}}class nl{constructor(t){this.httpClient=t}updateCurrentUserLocale(t,n){return this.httpClient.request({method:"PUT",url:nF`user/locale`,data:t,options:n})}query(t,n){return this.httpClient.request({method:"POST",url:nF`user/query`,data:t,options:n})}requestPasswordResetCurrent(t){return this.httpClient.request({method:"PUT",url:nF`user/request-password-reset`,options:t})}updatePasswordCurrent(t,n){return this.httpClient.request({method:"PUT",url:nF`user/reset-password`,data:t,options:n})}updateCurrent(t,n){return this.httpClient.request({method:"PUT",url:nF`user/update`,data:t,options:n})}getCurrent(t){return this.httpClient.request({method:"GET",url:nF`user/user`,options:t})}getCurrentUserRealmRoles(t){return this.httpClient.request({method:"GET",url:nF`user/userRealmRoles`,options:t})}getCurrentUserClientRoles(t,n){return this.httpClient.request({method:"GET",url:nF`user/userRoles/${t}`,options:n})}disconnectUserSession(t,n,i){return this.httpClient.request({method:"GET",url:nF`user/${t}/disconnect/${n}`,options:i})}requestPasswordReset(t,n,i){return this.httpClient.request({method:"PUT",url:nF`user/${t}/request-password-reset/${n}`,options:i})}updatePassword(t,n,i,o){return this.httpClient.request({method:"PUT",url:nF`user/${t}/reset-password/${n}`,data:i,options:o})}resetSecret(t,n,i){return this.httpClient.request({method:"GET",url:nF`user/${t}/reset-secret/${n}`,options:i})}updateRoles(t,n,i){return this.httpClient.request({method:"PUT",url:nF`user/${t}/roles`,data:n,options:i})}getUserRealmRoles(t,n,i){return this.httpClient.request({method:"GET",url:nF`user/${t}/userRealmRoles/${n}`,options:i})}updateUserRealmRoles(t,n,i,o){return this.httpClient.request({method:"PUT",url:nF`user/${t}/userRealmRoles/${n}`,data:i,options:o})}getUserClientRoles(t,n,i,o){return this.httpClient.request({method:"GET",url:nF`user/${t}/userRoles/${n}/${i}`,options:o})}updateUserClientRoles(t,n,i,o,r){return this.httpClient.request({method:"PUT",url:nF`user/${t}/userRoles/${n}/${i}`,data:o,options:r})}getUserSessions(t,n,i){return this.httpClient.request({method:"GET",url:nF`user/${t}/userSessions/${n}`,options:i})}create(t,n,i){return this.httpClient.request({method:"POST",url:nF`user/${t}/users`,data:n,options:i})}update(t,n,i){return this.httpClient.request({method:"PUT",url:nF`user/${t}/users`,data:n,options:i})}delete(t,n,i){return this.httpClient.request({method:"DELETE",url:nF`user/${t}/users/${n}`,options:i})}getClientRoles(t,n,i){return this.httpClient.request({method:"GET",url:nF`user/${t}/${n}/roles`,options:i})}updateClientRoles(t,n,i,o){return this.httpClient.request({method:"PUT",url:nF`user/${t}/${n}/roles`,data:i,options:o})}get(t,n,i){return this.httpClient.request({method:"GET",url:nF`user/${t}/${n}`,options:i})}}class nd{constructor(t){this.httpClient=t}getSettings(t){return this.httpClient.request({method:"GET",url:nF`map`,options:t})}saveSettings(t,n){return this.httpClient.request({method:"PUT",url:nF`map`,data:t,options:n})}deleteMap(t){return this.httpClient.request({method:"DELETE",url:nF`map/deleteMap`,options:t})}getCustomMapInfo(t){return this.httpClient.request({method:"GET",url:nF`map/getCustomMapInfo`,options:t})}getSettingsJs(t){return this.httpClient.request({method:"GET",url:nF`map/js`,options:t})}getTile(t,n,i,o){return this.httpClient.request({method:"GET",url:nF`map/tile/${t}/${n}/${i}`,options:o})}uploadMap(t,n){return this.httpClient.request({method:"POST",url:nF`map/upload`,queryParams:t,options:n})}}class np{constructor(t){this.httpClient=t}getManagerConfig(t){return this.httpClient.request({method:"GET",url:nF`configuration/manager`,options:t})}update(t,n){return this.httpClient.request({method:"PUT",url:nF`configuration/manager`,data:t,options:n})}fileUpload(t,n,i){return this.httpClient.request({method:"POST",url:nF`configuration/manager/file`,queryParams:n,data:t,options:i})}getManagerConfigImage(t,n){return this.httpClient.request({method:"GET",url:nF`configuration/manager/image/${t}`,options:n})}}class nu{constructor(t){this.httpClient=t}getHealthStatus(t){return this.httpClient.request({method:"GET",url:nF`health`,options:t})}getInfo(t){return this.httpClient.request({method:"GET",url:nF`info`,options:t})}}class nh{constructor(t){this.httpClient=t}getServices(t,n){return this.httpClient.request({method:"GET",url:nF`service`,queryParams:t,options:n})}registerService(t,n){return this.httpClient.request({method:"POST",url:nF`service`,data:t,options:n})}getGlobalServices(t){return this.httpClient.request({method:"GET",url:nF`service/global`,options:t})}registerGlobalService(t,n){return this.httpClient.request({method:"POST",url:nF`service/global`,data:t,options:n})}deregisterService(t,n,i){return this.httpClient.request({method:"DELETE",url:nF`service/${t}/${n}`,options:i})}getService(t,n,i){return this.httpClient.request({method:"GET",url:nF`service/${t}/${n}`,options:i})}heartbeat(t,n,i){return this.httpClient.request({method:"PUT",url:nF`service/${t}/${n}`,options:i})}}class nb{constructor(t){this.httpClient=t}register(t,n){return this.httpClient.request({method:"POST",url:nF`console/register`,data:t,options:n})}}class nf{constructor(t){this.httpClient=t}getApps(t){return this.httpClient.request({method:"GET",url:nF`apps`,options:t})}getConsoleConfig(t){return this.httpClient.request({method:"GET",url:nF`apps/consoleConfig`,options:t})}getAppInfos(t){return this.httpClient.request({method:"GET",url:nF`apps/info`,options:t})}}class nm{constructor(t){this.httpClient=t}startTunnel(t,n){return this.httpClient.request({method:"POST",url:nF`gateway/tunnel`,data:t,options:n})}stopTunnel(t,n){return this.httpClient.request({method:"DELETE",url:nF`gateway/tunnel`,data:t,options:n})}getAllActiveTunnelInfos(t,n){return this.httpClient.request({method:"GET",url:nF`gateway/tunnel/${t}`,options:n})}getGatewayActiveTunnelInfos(t,n,i){return this.httpClient.request({method:"GET",url:nF`gateway/tunnel/${t}/${n}`,options:i})}getActiveTunnelInfo(t,n,i,o,r){return this.httpClient.request({method:"GET",url:nF`gateway/tunnel/${t}/${n}/${i}/${o}`,options:r})}}class nM{constructor(t){this.httpClient=t}deleteConnections(t,n){return this.httpClient.request({method:"DELETE",url:nF`gateway/connection`,queryParams:t,options:n})}getConnections(t){return this.httpClient.request({method:"GET",url:nF`gateway/connection`,options:t})}deleteConnection(t,n){return this.httpClient.request({method:"DELETE",url:nF`gateway/connection/${t}`,options:n})}getConnection(t,n){return this.httpClient.request({method:"GET",url:nF`gateway/connection/${t}`,options:n})}setConnection(t,n,i){return this.httpClient.request({method:"PUT",url:nF`gateway/connection/${t}`,data:n,options:i})}getConnectionStatus(t,n){return this.httpClient.request({method:"GET",url:nF`gateway/status/${t}`,options:n})}}class ng{constructor(t){this.httpClient=t}getConfig(t){return this.httpClient.request({method:"GET",url:nF`syslog/config`,options:t})}updateConfig(t,n){return this.httpClient.request({method:"PUT",url:nF`syslog/config`,data:t,options:n})}clearEvents(t){return this.httpClient.request({method:"DELETE",url:nF`syslog/event`,options:t})}getEvents(t,n){return this.httpClient.request({method:"GET",url:nF`syslog/event`,queryParams:t,options:n})}}class nz{constructor(t){this.httpClient=t}getAssetDescriptors(t,n){return this.httpClient.request({method:"GET",url:nF`model/assetDescriptors`,queryParams:t,options:n})}getAssetInfo(t,n,i){return this.httpClient.request({method:"GET",url:nF`model/assetInfo/${t}`,queryParams:n,options:i})}getAssetInfos(t,n){return this.httpClient.request({method:"GET",url:nF`model/assetInfos`,queryParams:t,options:n})}getValueDescriptorSchema(t,n){return this.httpClient.request({method:"GET",url:nF`model/getValueDescriptorSchema`,queryParams:t,options:n})}getMetaItemDescriptors(t,n){return this.httpClient.request({method:"GET",url:nF`model/metaItemDescriptors`,queryParams:t,options:n})}getValueDescriptors(t,n){return this.httpClient.request({method:"GET",url:nF`model/valueDescriptors`,queryParams:t,options:n})}}class n_{constructor(t){this.httpClient=t}create(t,n){return this.httpClient.request({method:"POST",url:nF`asset`,data:t,options:n})}delete(t,n){return this.httpClient.request({method:"DELETE",url:nF`asset`,queryParams:t,options:n})}writeAttributeValues(t,n){return this.httpClient.request({method:"PUT",url:nF`asset/attributes`,data:t,options:n})}writeAttributeEvents(t,n){return this.httpClient.request({method:"PUT",url:nF`asset/attributes/timestamp`,data:t,options:n})}updateNoneParent(t,n){return this.httpClient.request({method:"DELETE",url:nF`asset/parent`,queryParams:t,options:n})}getPartial(t,n){return this.httpClient.request({method:"GET",url:nF`asset/partial/${t}`,options:n})}queryAssets(t,n){return this.httpClient.request({method:"POST",url:nF`asset/query`,data:t,options:n})}queryAssetTree(t,n){return this.httpClient.request({method:"POST",url:nF`asset/tree`,data:t,options:n})}getCurrentUserAssets(t){return this.httpClient.request({method:"GET",url:nF`asset/user/current`,options:t})}createUserAssetLinks(t,n){return this.httpClient.request({method:"POST",url:nF`asset/user/link`,data:t,options:n})}getUserAssetLinks(t,n){return this.httpClient.request({method:"GET",url:nF`asset/user/link`,queryParams:t,options:n})}deleteUserAssetLinks(t,n){return this.httpClient.request({method:"POST",url:nF`asset/user/link/delete`,data:t,options:n})}deleteAllUserAssetLinks(t,n,i){return this.httpClient.request({method:"DELETE",url:nF`asset/user/link/${t}/${n}`,options:i})}deleteUserAssetLink(t,n,i,o){return this.httpClient.request({method:"DELETE",url:nF`asset/user/link/${t}/${n}/${i}`,options:o})}get(t,n){return this.httpClient.request({method:"GET",url:nF`asset/${t}`,options:n})}update(t,n,i){return this.httpClient.request({method:"PUT",url:nF`asset/${t}`,data:n,options:i})}writeAttributeValue$PUT$asset_assetId_attribute_attributeName(t,n,i,o){return this.httpClient.request({method:"PUT",url:nF`asset/${t}/attribute/${n}`,data:i,options:o})}writeAttributeValue$PUT$asset_assetId_attribute_attributeName_timestamp(t,n,i,o,r){return this.httpClient.request({method:"PUT",url:nF`asset/${t}/attribute/${n}/${i}`,data:o,options:r})}updateParent(t,n,i){return this.httpClient.request({method:"PUT",url:nF`asset/${t}/child`,queryParams:n,options:i})}}class nO{constructor(t){this.httpClient=t}create(t,n){return this.httpClient.request({method:"POST",url:nF`realm`,data:t,options:n})}getAll(t){return this.httpClient.request({method:"GET",url:nF`realm`,options:t})}getAccessible(t){return this.httpClient.request({method:"GET",url:nF`realm/accessible`,options:t})}delete(t,n){return this.httpClient.request({method:"DELETE",url:nF`realm/${t}`,options:n})}get(t,n){return this.httpClient.request({method:"GET",url:nF`realm/${t}`,options:n})}update(t,n,i){return this.httpClient.request({method:"PUT",url:nF`realm/${t}`,data:n,options:i})}}class ny{constructor(t){this.httpClient=t}getAllNodeDefinitions(t){return this.httpClient.request({method:"GET",url:nF`flow`,options:t})}getNodeDefinition(t,n){return this.httpClient.request({method:"GET",url:nF`flow/${t}`,options:n})}getAllNodeDefinitionsByType(t,n){return this.httpClient.request({method:"GET",url:nF`flow/${t}`,options:n})}}class nA{constructor(t){this.httpClient=t}create(t,n){return this.httpClient.request({method:"POST",url:nF`dashboard`,data:t,options:n})}update(t,n){return this.httpClient.request({method:"PUT",url:nF`dashboard`,data:t,options:n})}getAllRealmDashboards(t,n){return this.httpClient.request({method:"GET",url:nF`dashboard/all/${t}`,options:n})}query(t,n){return this.httpClient.request({method:"POST",url:nF`dashboard/query`,data:t,options:n})}delete(t,n,i){return this.httpClient.request({method:"DELETE",url:nF`dashboard/${t}/${n}`,options:i})}get(t,n,i){return this.httpClient.request({method:"GET",url:nF`dashboard/${t}/${n}`,options:i})}}class nv{constructor(t){this.httpClient=t}getNotifications(t,n){return this.httpClient.request({method:"GET",url:nF`notification`,queryParams:t,options:n})}removeNotifications(t,n){return this.httpClient.request({method:"DELETE",url:nF`notification`,queryParams:t,options:n})}sendNotification(t,n){return this.httpClient.request({method:"POST",url:nF`notification/alert`,data:t,options:n})}removeNotification(t,n){return this.httpClient.request({method:"DELETE",url:nF`notification/${t}`,options:n})}notificationAcknowledged(t,n,i,o){return this.httpClient.request({method:"PUT",url:nF`notification/${t}/acknowledged`,queryParams:i,data:n,options:o})}notificationDelivered(t,n,i){return this.httpClient.request({method:"PUT",url:nF`notification/${t}/delivered`,queryParams:n,options:i})}}class nx{constructor(t){this.httpClient=t}createProvisioningConfig(t,n){return this.httpClient.request({method:"POST",url:nF`provisioning`,data:t,options:n})}getProvisioningConfigs(t){return this.httpClient.request({method:"GET",url:nF`provisioning`,options:t})}deleteProvisioningConfig(t,n){return this.httpClient.request({method:"DELETE",url:nF`provisioning/${t}`,options:n})}updateProvisioningConfig(t,n,i){return this.httpClient.request({method:"PUT",url:nF`provisioning/${t}`,data:n,options:i})}}class nw{constructor(t){this.httpClient=t}getDatapointExport(t,n){return this.httpClient.request({method:"GET",url:nF`asset/datapoint/export`,queryParams:t,options:n})}getDatapointPeriod(t,n){return this.httpClient.request({method:"GET",url:nF`asset/datapoint/periods`,queryParams:t,options:n})}getDatapoints(t,n,i,o){return this.httpClient.request({method:"POST",url:nF`asset/datapoint/${t}/${n}`,data:i,options:o})}}class nq{constructor(t){this.httpClient=t}doProtocolAssetDiscovery(t,n,i){return this.httpClient.request({method:"GET",url:nF`agent/assetDiscovery/${t}`,queryParams:n,options:i})}doProtocolAssetImport(t,n,i,o){return this.httpClient.request({method:"POST",url:nF`agent/assetImport/${t}`,queryParams:i,data:n,options:o})}doProtocolInstanceDiscovery(t,n,i){return this.httpClient.request({method:"GET",url:nF`agent/instanceDiscovery/${t}`,queryParams:n,options:i})}}class nL{constructor(t){this.httpClient=t}createAlarm(t,n,i){return this.httpClient.request({method:"POST",url:nF`alarm`,queryParams:n,data:t,options:i})}getAlarms(t,n){return this.httpClient.request({method:"GET",url:nF`alarm`,queryParams:t,options:n})}removeAlarms(t,n){return this.httpClient.request({method:"DELETE",url:nF`alarm`,data:t,options:n})}setAssetLinks(t,n){return this.httpClient.request({method:"PUT",url:nF`alarm/assets`,data:t,options:n})}getAlarm(t,n){return this.httpClient.request({method:"GET",url:nF`alarm/${t}`,options:n})}removeAlarm(t,n){return this.httpClient.request({method:"DELETE",url:nF`alarm/${t}`,options:n})}updateAlarm(t,n,i){return this.httpClient.request({method:"PUT",url:nF`alarm/${t}`,data:n,options:i})}getAssetLinks(t,n,i){return this.httpClient.request({method:"GET",url:nF`alarm/${t}/assets`,queryParams:n,options:i})}}function nF(t,...n){let i="";for(let o=0;o<n.length;o++)i+=t[o],i+=encodeURIComponent(n[o]);return i+t[t.length-1]}class nk{constructor(t,n=na().create()){this._assetPredictedDatapointResource=new nT(t,n),this._rulesResource=new nR(t,n),this._userResource=new nW(t,n),this._mapResource=new nC(t,n),this._configurationResource=new nS(t,n),this._statusResource=new nD(t,n),this._externalServiceResource=new nI(t,n),this._consoleResource=new nN(t,n),this._appResource=new nB(t,n),this._gatewayServiceResource=new nP(t,n),this._gatewayClientResource=new n$(t,n),this._syslogResource=new nj(t,n),this._assetModelResource=new nY(t,n),this._assetResource=new nX(t,n),this._realmResource=new nH(t,n),this._flowResource=new nU(t,n),this._dashboardResource=new nV(t,n),this._notificationResource=new nG(t,n),this._provisioningResource=new nK(t,n),this._assetDatapointResource=new nZ(t,n),this._agentResource=new nJ(t,n),this._alarmResource=new nQ(t,n),this._assetResource=new nX(t,n)}get AssetPredictedDatapointResource(){return this._assetPredictedDatapointResource}get RulesResource(){return this._rulesResource}get UserResource(){return this._userResource}get MapResource(){return this._mapResource}get ConfigurationResource(){return this._configurationResource}get StatusResource(){return this._statusResource}get ExternalServiceResource(){return this._externalServiceResource}get ConsoleResource(){return this._consoleResource}get AppResource(){return this._appResource}get GatewayServiceResource(){return this._gatewayServiceResource}get GatewayClientResource(){return this._gatewayClientResource}get SyslogResource(){return this._syslogResource}get AssetModelResource(){return this._assetModelResource}get AssetResource(){return this._assetResource}get RealmResource(){return this._realmResource}get FlowResource(){return this._flowResource}get DashboardResource(){return this._dashboardResource}get NotificationResource(){return this._notificationResource}get ProvisioningResource(){return this._provisioningResource}get AssetDatapointResource(){return this._assetDatapointResource}get AgentResource(){return this._agentResource}get AlarmResource(){return this._alarmResource}}class nE{constructor(t){this.axios=t}request(t){let n={};n.method=t.method,n.url=t.url,n.params=t.queryParams,n.data=t.data,function(t,n){if(void 0!=n)for(let i in n)n.hasOwnProperty(i)&&(t[i]=n[i])}(n,t.options);let i=t.copyFn;return this.axios.request(n).then(t=>(i&&t.data&&(t.originalData=t.data,t.data=i(t.data)),t))}}class nT extends ns{constructor(t,n=na().create()){n.defaults.baseURL=t,super(new nE(n))}}class nR extends nc{constructor(t,n=na().create()){n.defaults.baseURL=t,super(new nE(n))}}class nW extends nl{constructor(t,n=na().create()){n.defaults.baseURL=t,super(new nE(n))}}class nC extends nd{constructor(t,n=na().create()){n.defaults.baseURL=t,super(new nE(n))}}class nS extends np{constructor(t,n=na().create()){n.defaults.baseURL=t,super(new nE(n))}}class nD extends nu{constructor(t,n=na().create()){n.defaults.baseURL=t,super(new nE(n))}}class nI extends nh{constructor(t,n=na().create()){n.defaults.baseURL=t,super(new nE(n))}}class nN extends nb{constructor(t,n=na().create()){n.defaults.baseURL=t,super(new nE(n))}}class nB extends nf{constructor(t,n=na().create()){n.defaults.baseURL=t,super(new nE(n))}}class nP extends nm{constructor(t,n=na().create()){n.defaults.baseURL=t,super(new nE(n))}}class n$ extends nM{constructor(t,n=na().create()){n.defaults.baseURL=t,super(new nE(n))}}class nj extends ng{constructor(t,n=na().create()){n.defaults.baseURL=t,super(new nE(n))}}class nY extends nz{constructor(t,n=na().create()){n.defaults.baseURL=t,super(new nE(n))}}class nX extends n_{constructor(t,n=na().create()){n.defaults.baseURL=t,super(new nE(n))}}class nH extends nO{constructor(t,n=na().create()){n.defaults.baseURL=t,super(new nE(n))}}class nU extends ny{constructor(t,n=na().create()){n.defaults.baseURL=t,super(new nE(n))}}class nV extends nA{constructor(t,n=na().create()){n.defaults.baseURL=t,super(new nE(n))}}class nG extends nv{constructor(t,n=na().create()){n.defaults.baseURL=t,super(new nE(n))}}class nK extends nx{constructor(t,n=na().create()){n.defaults.baseURL=t,super(new nE(n))}}class nZ extends nw{constructor(t,n=na().create()){n.defaults.baseURL=t,super(new nE(n))}}class nJ extends nq{constructor(t,n=na().create()){n.defaults.baseURL=t,super(new nE(n))}}class nQ extends nL{constructor(t,n=na().create()){n.defaults.baseURL=t,super(new nE(n))}}na().isAxiosError;let n0=new class{get api(){return this._client}constructor(){this._axiosInstance=na().create(),this._axiosInstance.defaults.headers.common["Content-Type"]="application/json",this._axiosInstance.interceptors.request.use(t=>(t.paramsSerializer=t=>tK().stringify(t,{arrayFormat:"repeat"}),t))}get axiosInstance(){return this._axiosInstance}get baseUrl(){return this._baseUrl}setTimeout(t){this._axiosInstance.defaults.timeout=t}addRequestInterceptor(t){this._axiosInstance.interceptors.request.use(t)}initialise(t){this._baseUrl=t,this._client=new nk(t,this._axiosInstance)}};var n1=function(t,n,i,o){return new(i||(i=Promise))(function(r,a){function s(t){try{l(o.next(t))}catch(t){a(t)}}function c(t){try{l(o.throw(t))}catch(t){a(t)}}function l(t){var n;t.done?r(t.value):((n=t.value)instanceof i?n:new i(function(t){t(n)})).then(s,c)}l((o=o.apply(t,n||[])).next())})};!function(t){t.DISCONNECTED="DISCONNECTED",t.CONNECTED="CONNECTED",t.CONNECTING="CONNECTING"}(sR||(sR={}));let n2="SUBSCRIBED:",n3="UNAUTHORIZED:",n4="TRIGGERED:",n5="EVENT:";class n6{constructor(){this._disconnectRequested=!1,this._reconnectDelayMillis=n8.MIN_RECONNECT_DELAY,this._reconnectTimer=null,this._status=sR.DISCONNECTED,this._connectingDeferred=null,this._statusCallbacks=[],this._pendingSubscription=null,this._queuedSubscriptions=[],this._subscriptionMap=new Map,this._assetEventCallbackMap=new Map,this._attributeEventCallbackMap=new Map,this._unloading=!1}get status(){return this._status}subscribeStatusChange(t){this._statusCallbacks.push(t)}unsubscribeStatusChange(t){!function(t,n){if(0===t.length)return;let i=t.indexOf(n);i>=0&&t.splice(i,1)}(this._statusCallbacks,t)}connect(){return(this._reconnectTimer&&(window.clearTimeout(this._reconnectTimer),this._reconnectTimer=null),this._status===sR.CONNECTED)?Promise.resolve(!0):(this._disconnectRequested=!1,this._connectingDeferred||(this._onStatusChanged(sR.CONNECTING),this._connectingDeferred=new t0,this._doConnect().then(t=>{if(this._connectingDeferred){let n=this._connectingDeferred;this._connectingDeferred=null,t?(console.debug("Connected to event service: "+this.endpointUrl),this._reconnectDelayMillis=n8.MIN_RECONNECT_DELAY,this._onStatusChanged(sR.CONNECTED),window.setTimeout(()=>{this._onConnect()},0)):(console.debug("Failed to connect to event service: "+this.endpointUrl),this._scheduleReconnect()),n.resolve(t)}})),this._connectingDeferred.promise)}disconnect(){console.debug("Disconnecting from event service: "+this.endpointUrl),this._disconnectRequested||(this._disconnectRequested=!0,this._reconnectTimer&&(window.clearTimeout(this._reconnectTimer),this._reconnectTimer=null),this.status!==sR.DISCONNECTED&&this._doDisconnect())}subscribe(t,n){let i={eventSubscription:t,callback:n,deferred:new t0};return null!=this._pendingSubscription||this._status!==sR.CONNECTED?(this._queuedSubscriptions.push(i),i.deferred.promise):(this._pendingSubscription=i,this._doSubscribe(t).then(t=>{if(this._pendingSubscription){let n=this._pendingSubscription;this._pendingSubscription=null,this._subscriptionMap.set(t,n),this._processNextSubscription();let i=n.deferred;n.deferred=null,i&&i.resolve(t)}},t=>{if(this._pendingSubscription){let n=this._pendingSubscription;this._pendingSubscription=null,this._processNextSubscription();let i=n.deferred;n.deferred=null,i&&i.reject(t)}}),this._pendingSubscription.deferred.promise)}unsubscribe(t){return n1(this,void 0,void 0,function*(){if(this._subscriptionMap.delete(t))return void this._doUnsubscribe(t);if(this._assetEventCallbackMap.delete(t)){if(this._assetEventPromise&&0===this._assetEventCallbackMap.size){let t=yield this._assetEventPromise;this._assetEventPromise=void 0,this.unsubscribe(t)}return}if(this._attributeEventCallbackMap.delete(t)){if(this._attributeEventPromise&&0===this._attributeEventCallbackMap.size){let t=yield this._attributeEventPromise;this._attributeEventPromise=void 0,this.unsubscribe(t)}return}})}sendEvent(t){this._status===sR.CONNECTED&&this._doSend(t)}sendEventWithReply(t){return this._status!==sR.CONNECTED?Promise.reject("Not connected"):this._doSendWithReply(t)}subscribeAssetEvents(t,n,i){return n1(this,void 0,void 0,function*(){let o=t&&"string"!=typeof t[0]?t.map(t=>t.id):t,r="AssetEvent"+n6._subscriptionCounter++;if(!this._assetEventPromise){let t;i$.authenticated||(t={filterType:"asset",realm:i$.displayRealm});let n={eventType:"asset",filter:t};this._assetEventPromise=this.subscribe(n,t=>{this._assetEventCallbackMap.forEach(n=>n(t))})}return this._assetEventCallbackMap.set(r,t=>{let n=t.asset.id;o?o.find(t=>n===t)&&i(t):t.asset.realm===i$.displayRealm&&i(t)}),this._assetEventPromise.then(()=>{try{if(o&&n){let t={messageID:"read-assets:"+o.join(",")+":"+r,eventType:"read-assets",assetQuery:{ids:o}};this.sendEventWithReply(t).then(t=>{t.assets&&this._assetEventCallbackMap.has(r)&&t.assets.forEach(t=>{i({eventType:"asset",asset:t,cause:"READ"})})})}}catch(n){throw console.error("Failed to subscribe to asset events for assets: "+t),r&&this.unsubscribe(r),n}return r})})}subscribeAttributeEvents(t,n,i){return n1(this,void 0,void 0,function*(){let o=t&&"string"!=typeof t[0],r=o?t.map(t=>t.id):t,a=o?t:void 0,s="AttributeEvent"+n6._subscriptionCounter++;if(!this._attributeEventPromise){let t;i$.authenticated||(t={filterType:"asset",realm:i$.displayRealm});let n={eventType:"attribute",filter:t};this._attributeEventPromise=this.subscribe(n,t=>{this._attributeEventCallbackMap.forEach(n=>n(t))})}let c=n=>{let a=n.ref;o?t.forEach(t=>{a.id===t.id&&a.name===t.name&&i(n)}):r?r.find(t=>a.id===t)&&i(n):n.realm===i$.displayRealm&&i(n)};return this._attributeEventCallbackMap.set(s,c),this._attributeEventPromise.then(()=>{try{if(n&&r){let t={messageID:"read-assets:"+r.join(",")+":"+s,eventType:"read-assets",assetQuery:{ids:r}};this.sendEventWithReply(t).then(t=>{t.assets&&this._attributeEventCallbackMap.has(s)&&t.assets.forEach(t=>{t.attributes&&Object.entries(t.attributes).forEach(([n,i])=>{(!a||a.find(i=>i.id===t.id&&i.name===n))&&c({eventType:"attribute",timestamp:i.timestamp,value:i.value,ref:{id:t.id,name:n}})})})})}}catch(n){throw console.error("Failed to subscribe to asset events for assets: "+t),s&&this.unsubscribe(s),n}return s})})}_processNextSubscription(){this._status===sR.CONNECTED&&0!==this._queuedSubscriptions.length&&setTimeout(()=>{let t=this._queuedSubscriptions.shift();t&&this.subscribe(t.eventSubscription,t.callback).then(n=>{let i=t.deferred;t.deferred=null,i&&i.resolve(n)},n=>{let i=t.deferred;t.deferred=null,i&&i.reject(n)})},0)}_onStatusChanged(t){t!==this._status&&(console.debug("Event provider status changed: "+t),this._status=t,this._unloading||window.setTimeout(()=>{this._statusCallbacks.forEach(n=>n(t))},0))}_onMessageReceived(t,n){let i=this._subscriptionMap.get(t);i&&i.callback(n)}_onConnect(){if(Object.keys(this._subscriptionMap).length>0){for(let t in this._subscriptionMap)this._subscriptionMap.has(t)&&this._queuedSubscriptions.unshift(this._subscriptionMap.get(t));this._subscriptionMap.clear()}this._processNextSubscription()}_onDisconnect(){this._status===sR.CONNECTED&&this._onStatusChanged(sR.DISCONNECTED),this._pendingSubscription&&(this._queuedSubscriptions.unshift(this._pendingSubscription),this._pendingSubscription=null),this._onStatusChanged(sR.CONNECTING),this._scheduleReconnect()}_scheduleReconnect(){this._reconnectTimer||!this._disconnectRequested&&(console.debug("Event provider scheduling reconnect in "+this._reconnectDelayMillis+"ms"),this._reconnectTimer=window.setTimeout(()=>{this._disconnectRequested||this.connect()},this._reconnectDelayMillis),this._reconnectDelayMillis<n8.MAX_RECONNECT_DELAY&&(this._reconnectDelayMillis=Math.min(n8.MAX_RECONNECT_DELAY,this._reconnectDelayMillis+3e3)))}}n6.MIN_RECONNECT_DELAY=0,n6.MAX_RECONNECT_DELAY=3e4,n6._subscriptionCounter=0;class n8 extends n6{get endpointUrl(){return this._endpointUrl}constructor(t){super(),this._webSocket=void 0,this._connectDeferred=null,this._subscribeDeferred=null,this._repliesDeferred=new Map,this._endpointUrl=(t.startsWith("https:")?"wss":"ws")+"://"+t.substr(t.indexOf("://")+3)+"/websocket/events",window.addEventListener("beforeunload",()=>{this._unloading=!0,this.disconnect()})}_doConnect(){let t=this._endpointUrl+"?Realm="+i$.config.realm;return i$.authenticated&&(t+="&Authorization="+i$.getAuthorizationHeader()),this._webSocket=new WebSocket(t),this._connectDeferred=new t0,this._webSocket.onopen=()=>{if(this._connectDeferred){let t=this._connectDeferred;this._connectDeferred=null,t.resolve(!0)}},this._webSocket.onerror=t=>{if(this._connectDeferred){let t=this._connectDeferred;this._connectDeferred=null,t.resolve(!1)}else console.debug("Event provider error"),this._beforeDisconnect()},this._webSocket.onclose=()=>{if(this._webSocket=void 0,this._connectDeferred){let t=this._connectDeferred;this._connectDeferred=null,t.resolve(!1)}else this._beforeDisconnect()},this._webSocket.onmessage=t=>{let n=t.data;if(n&&n.startsWith(n2)){let t=JSON.parse(n.substring(n2.length)),i=this._subscribeDeferred;this._subscribeDeferred=null,i&&i.resolve(t.subscriptionId)}else if(n.startsWith(n3)){let t=JSON.parse(n.substring(n3.length)),i=this._subscribeDeferred;this._subscribeDeferred=null,i&&(console.warn("Unauthorized event subscription: "+JSON.stringify(t,null,2)),i.reject("Unauthorized"))}else if(n.startsWith(n4)){let t=JSON.parse(n.substring(n4.length));t.events&&t.events.forEach(n=>{this._onMessageReceived(t.subscriptionId,n)})}else if(n.startsWith(n5)){let t=JSON.parse(n.substring(n5.length));if(t.messageID){let n=this._repliesDeferred.get(t.messageID);this._repliesDeferred.delete(t.messageID),n&&n.resolve(t)}}},this._connectDeferred.promise}_beforeDisconnect(){this._onDisconnect()}_doDisconnect(){var t;null==(t=this._webSocket)||t.close(),this._subscribeDeferred=null,this._repliesDeferred.clear()}_doSubscribe(t){return this._webSocket?this._subscribeDeferred?Promise.reject("There's already a pending subscription"):(this._subscribeDeferred=new t0,t.subscriptionId||(t.subscriptionId=n8._subscriptionCounter+++""),this._webSocket.send("SUBSCRIBE:"+JSON.stringify(t)),this._subscribeDeferred.promise):Promise.reject("Not connected")}_doUnsubscribe(t){this._webSocket&&this._webSocket.send("UNSUBSCRIBE:"+JSON.stringify({subscriptionId:t}))}_doSend(t){let n=n5+JSON.stringify(t);this._webSocket.send(n)}_doSendWithReply(t){if(t.messageID||(t.messageID=(new Date().getTime()+10*Math.random()).toString(10)),this._repliesDeferred.has(t.messageID))return Promise.reject("There's already a pending send and reply with this ID");let n=new t0;return this._repliesDeferred.set(t.messageID,n),this._webSocket.send(n5+JSON.stringify(t)),n.promise}}function n7(t){return(n7="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}n8._subscriptionCounter=1;var n9=[],ie=n9.forEach,it=n9.slice;function ii(t){return ie.call(it.call(arguments,1),function(n){if(n)for(var i in n)void 0===t[i]&&(t[i]=n[i])}),t}function io(){return"function"==typeof XMLHttpRequest||("undefined"==typeof XMLHttpRequest?"undefined":n7(XMLHttpRequest))==="object"}var ir=i(46850),ia=i.t(ir,2);function is(t){return(is="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}"function"==typeof fetch&&(sW="undefined"!=typeof global&&global.fetch?global.fetch:"undefined"!=typeof window&&window.fetch?window.fetch:fetch),io()&&("undefined"!=typeof global&&global.XMLHttpRequest?sC=global.XMLHttpRequest:"undefined"!=typeof window&&window.XMLHttpRequest&&(sC=window.XMLHttpRequest)),"function"==typeof ActiveXObject&&("undefined"!=typeof global&&global.ActiveXObject?sS=global.ActiveXObject:"undefined"!=typeof window&&window.ActiveXObject&&(sS=window.ActiveXObject)),sW||!ia||sC||sS||(sW=ir||ia),"function"!=typeof sW&&(sW=void 0);var ic=function(t,n){if(n&&"object"===is(n)){var i="";for(var o in n)i+="&"+encodeURIComponent(o)+"="+encodeURIComponent(n[o]);if(!i)return t;t=t+(-1!==t.indexOf("?")?"&":"?")+i.slice(1)}return t},il=function(t,n,i){sW(t,n).then(function(t){if(!t.ok)return i(t.statusText||"Error",{status:t.status});t.text().then(function(n){i(null,{status:t.status,data:n})}).catch(i)}).catch(i)},id=!1,ip=function(t,n,i,o){t.queryStringParams&&(n=ic(n,t.queryStringParams));var r=ii({},"function"==typeof t.customHeaders?t.customHeaders():t.customHeaders);i&&(r["Content-Type"]="application/json");var a="function"==typeof t.requestOptions?t.requestOptions(i):t.requestOptions,s=ii({method:i?"POST":"GET",body:i?t.stringify(i):void 0,headers:r},id?{}:a);try{il(n,s,o)}catch(t){if(!a||0===Object.keys(a).length||!t.message||0>t.message.indexOf("not implemented"))return o(t);try{Object.keys(a).forEach(function(t){delete s[t]}),il(n,s,o),id=!0}catch(t){o(t)}}},iu=function(t,n,i,o){i&&"object"===is(i)&&(i=ic("",i).slice(1)),t.queryStringParams&&(n=ic(n,t.queryStringParams));try{(r=sC?new sC:new sS("MSXML2.XMLHTTP.3.0")).open(i?"POST":"GET",n,1),t.crossDomain||r.setRequestHeader("X-Requested-With","XMLHttpRequest"),r.withCredentials=!!t.withCredentials,i&&r.setRequestHeader("Content-Type","application/x-www-form-urlencoded"),r.overrideMimeType&&r.overrideMimeType("application/json");var r,a=t.customHeaders;if(a="function"==typeof a?a():a)for(var s in a)r.setRequestHeader(s,a[s]);r.onreadystatechange=function(){r.readyState>3&&o(r.status>=400?r.statusText:null,{status:r.status,data:r.responseText})},r.send(i)}catch(t){console&&console.log(t)}};let ih=function(t,n,i,o){return("function"==typeof i&&(o=i,i=void 0),o=o||function(){},sW)?ip(t,n,i,o):io()||"function"==typeof ActiveXObject?iu(t,n,i,o):void o(Error("No fetch and no xhr implementation found!"))};var ib=function(){var t;function n(t){var i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},o=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};if(!(this instanceof n))throw TypeError("Cannot call a class as a function");this.services=t,this.options=i,this.allOptions=o,this.type="backend",this.init(t,i,o)}return t=[{key:"init",value:function(t){var n=this,i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},o=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};this.services=t,this.options=ii(i,this.options||{},{loadPath:"/locales/{{lng}}/{{ns}}.json",addPath:"/locales/add/{{lng}}/{{ns}}",allowMultiLoading:!1,parse:function(t){return JSON.parse(t)},stringify:JSON.stringify,parsePayload:function(t,n,i){var o,r;return o={},r=i||"",n in o?Object.defineProperty(o,n,{value:r,enumerable:!0,configurable:!0,writable:!0}):o[n]=r,o},request:ih,reloadInterval:"undefined"==typeof window&&36e5,customHeaders:{},queryStringParams:{},crossDomain:!1,withCredentials:!1,overrideMimeType:!1,requestOptions:{mode:"cors",credentials:"same-origin",cache:"default"}}),this.allOptions=o,this.services&&this.options.reloadInterval&&setInterval(function(){return n.reload()},this.options.reloadInterval)}},{key:"readMulti",value:function(t,n,i){this._readAny(t,t,n,n,i)}},{key:"read",value:function(t,n,i){this._readAny([t],t,[n],n,i)}},{key:"_readAny",value:function(t,n,i,o,r){var a,s,c=this,l=this.options.loadPath;"function"==typeof this.options.loadPath&&(l=this.options.loadPath(t,i)),(l=(s=a=l)&&"function"==typeof s.then?a:Promise.resolve(a)).then(function(a){if(!a)return r(null,{});var s=c.services.interpolator.interpolate(a,{lng:t.join("+"),ns:i.join("+")});c.loadUrl(s,r,n,o)})}},{key:"loadUrl",value:function(t,n,i,o){var r=this;this.options.request(this.options,t,void 0,function(a,s){var c,l;if(s&&(s.status>=500&&s.status<600||!s.status))return n("failed loading "+t+"; status code: "+s.status,!0);if(s&&s.status>=400&&s.status<500)return n("failed loading "+t+"; status code: "+s.status,!1);if(!s&&a&&a.message&&a.message.indexOf("Failed to fetch")>-1)return n("failed loading "+t+": "+a.message,!0);if(a)return n(a,!1);try{c="string"==typeof s.data?r.options.parse(s.data,i,o):s.data}catch(n){l="failed parsing "+t+" to json"}if(l)return n(l,!1);n(null,c)})}},{key:"create",value:function(t,n,i,o,r){var a=this;if(this.options.addPath){"string"==typeof t&&(t=[t]);var s=this.options.parsePayload(n,i,o),c=0,l=[],d=[];t.forEach(function(i){var o=a.options.addPath;"function"==typeof a.options.addPath&&(o=a.options.addPath(i,n));var p=a.services.interpolator.interpolate(o,{lng:i,ns:n});a.options.request(a.options,p,s,function(n,i){c+=1,l.push(n),d.push(i),c===t.length&&r&&r(l,d)})})}}},{key:"reload",value:function(){var t=this,n=this.services,i=n.backendConnector,o=n.languageUtils,r=n.logger,a=i.language;if(!a||"cimode"!==a.toLowerCase()){var s=[],c=function(t){o.toResolveHierarchy(t).forEach(function(t){0>s.indexOf(t)&&s.push(t)})};c(a),this.allOptions.preload&&this.allOptions.preload.forEach(function(t){return c(t)}),s.forEach(function(n){t.allOptions.ns.forEach(function(t){i.read(n,t,"read",null,null,function(o,a){o&&r.warn("loading namespace ".concat(t," for language ").concat(n," failed"),o),!o&&a&&r.log("loaded namespace ".concat(t," for language ").concat(n),a),i.loaded("".concat(n,"|").concat(t),o,a)})})})}}}],function(t,n){for(var i=0;i<n.length;i++){var o=n[i];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(t,o.key,o)}}(n.prototype,t),Object.defineProperty(n,"prototype",{writable:!1}),n}();ib.type="backend";class im extends eL{constructor(t){if(super(t),this.it=et,t.type!==ew.CHILD)throw Error(this.constructor.directiveName+"() can only be used in child bindings")}render(t){if(t===et||null==t)return this._t=void 0,this.it=t;if(t===ee)return t;if("string"!=typeof t)throw Error(this.constructor.directiveName+"() called with a non-string value");if(t===this.it)return this._t;this.it=t;let n=[t];return n.raw=n,this._t={_$litType$:this.constructor.resultType,strings:n,values:[]}}}im.directiveName="unsafeHTML",im.resultType=1,eq(im);class iM extends im{}iM.directiveName="unsafeSVG",iM.resultType=2;let ig=eq(iM),iz={size:24,icons:{logo:'<path style=\'pointer-events: var(--or-icon-pointer-events, none);\' fill="#C4D600" d="m11.96125,23.85096c-6.56773,0 -11.90971,-5.34202 -11.90971,-11.90862l2.49411,0c0,5.19176 4.22389,9.41568 9.41561,9.41568c5.19053,0 9.41561,-4.22392 9.41561,-9.41568c0,-5.19176 -4.22389,-9.41568 -9.41561,-9.41568l0,-2.49413c6.56655,0 11.90971,5.34439 11.90971,11.9098c0,6.5666 -5.34316,11.90862 -11.90971,11.90862l0,0z" /><path fill="#4E9D2D" d="m10.25094,20.38647c-2.26848,-0.47231 -4.21822,-1.80199 -5.48741,-3.74009s-1.70892,-4.25777 -1.23545,-6.52625c0.47347,-2.26965 1.80315,-4.21822 3.74242,-5.48857c1.93926,-1.27035 4.25661,-1.70892 6.52625,-1.23545c4.68471,0.97719 7.70121,5.5828 6.72286,10.26635l-2.39994,-0.49907c0.70149,-3.36085 -1.4623,-6.66585 -4.82431,-7.36734c-1.62866,-0.33969 -3.29105,-0.02559 -4.68238,0.88645c-1.39134,0.91088 -2.34526,2.3092 -2.68495,3.93786c-0.33853,1.62633 -0.02443,3.28988 0.88645,4.68122c0.91088,1.39134 2.3092,2.34526 3.93786,2.68379l-0.50139,2.4011l0,0z"/><path fill="#1D5632"d="m12.03064,17.49616c-0.09524,0 -0.19048,-0.00116 -0.28457,-0.00465c-1.49833,-0.0755 -2.87818,-0.72942 -3.88636,-1.84097c-1.00818,-1.11271 -1.52156,-2.54948 -1.44722,-4.05013l2.44378,0.12196c-0.04181,0.84557 0.24856,1.65745 0.81769,2.28466c0.56681,0.62721 1.34733,0.99656 2.1929,1.03838c0.84208,0.03833 1.65629,-0.2474 2.2835,-0.81653c0.62837,-0.56797 0.99656,-1.34617 1.03954,-2.19174c0.08711,-1.74573 -1.26371,-3.23708 -3.00943,-3.3242l0.12196,-2.44378c3.09422,0.15332 5.4869,2.79455 5.33358,5.88877c-0.07434,1.49949 -0.72942,2.87818 -1.84097,3.8852c-1.04186,0.94313 -2.36945,1.45303 -3.7644,1.45303l0,0z"/>',"logo-plain":"m11.9925,23.91349c-6.58498,0 -11.94099,-5.35605 -11.94099,-11.9399l2.50066,0c0,5.20539 4.23498,9.44041 9.44033,9.44041c5.20416,0 9.44033,-4.23502 9.44033,-9.44041c0,-5.20539 -4.23498,-9.44041 -9.44033,-9.44041l0,-2.50068c6.5838,0 11.94099,5.35842 11.94099,11.94108c0,6.58385 -5.35719,11.9399 -11.94099,11.9399l0,0zm-1.80787,-3.27769c-2.31323,-0.48163 -4.30141,-1.83755 -5.59563,-3.81389s-1.74263,-4.34178 -1.25982,-6.65502c0.48281,-2.31443 1.83872,-4.30145 3.81623,-5.59686c1.97751,-1.29542 4.34056,-1.74264 6.65497,-1.25983c4.77711,0.99647 7.8531,5.69295 6.85545,10.46891l-2.44727,-0.50891c0.71532,-3.42716 -1.49114,-6.79738 -4.91946,-7.5127c-1.66078,-0.34639 -3.35596,-0.0261 -4.77474,0.90394c-1.41878,0.92886 -2.39152,2.35476 -2.73791,4.01555c-0.3452,1.65842 -0.02491,3.3548 0.90394,4.77359c0.92885,1.41879 2.35475,2.39154 4.01552,2.73675l-0.51128,2.44848l0,0zm1.81499,-2.92536c-0.09727,0 -0.19455,-0.00119 -0.29064,-0.00475c-1.53029,-0.07711 -2.93958,-0.74498 -3.96926,-1.88025c-1.02968,-1.13646 -1.55401,-2.60388 -1.47809,-4.13655l2.49591,0.12456c-0.04271,0.86361 0.25386,1.69282 0.83513,2.33341c0.5789,0.64059 1.37607,1.01783 2.23968,1.06053c0.86005,0.03915 1.69162,-0.25268 2.33221,-0.83395c0.64177,-0.58009 1.01782,-1.3749 1.06171,-2.23851c0.08897,-1.78298 -1.29066,-3.30616 -3.07362,-3.39513l0.12456,-2.49593c3.16022,0.15659 5.60394,2.85419 5.44735,6.01443c-0.07592,1.53149 -0.74498,2.9396 -1.88024,3.9681c-1.06408,0.96326 -2.41999,1.48403 -3.8447,1.48403l0,0z",marker:'<ellipse fill="#000" opacity="0.2" ry="1.5" rx="4" cy="22.5" cx="12" /><path style=\'pointer-events: var(--or-icon-pointer-events, none);\' d="m11.999999,0a8.437501,8.344057 0 0 1 8.437501,8.344057c0,6.500779 -5.798864,6.280799 -8.437501,14.412461c-2.638637,-8.131662 -8.437501,-7.911683 -8.437501,-14.412461a8.437501,8.344057 0 0 1 8.437501,-8.344057z" />'}};var i_=function(t,n,i,o){var r,a=arguments.length,s=a<3?n:null===o?o=Object.getOwnPropertyDescriptor(n,i):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(t,n,i,o);else for(var c=t.length-1;c>=0;c--)(r=t[c])&&(s=(a<3?r(s):a>3?r(n,i,s):r(n,i))||s);return a>3&&s&&Object.defineProperty(n,i,s),s};let iO=i(7319);class iy extends CustomEvent{constructor(){super(iy.NAME,{bubbles:!0,composed:!0})}}iy.NAME="or-iconset-added";let iA=new class{constructor(){this._icons={}}addIconSet(t,n){this._icons[t]=n,this._defaultIconSet||(this._defaultIconSet=n),n.onAdd&&n.onAdd(),window.dispatchEvent(new iy)}getIconSet(t){return this._icons[t]}getIconTemplate(t){if(!t)return J``;let n=(t||"").split(":"),i=n.pop(),o=n.pop(),r=this._defaultIconSet;return(o&&(r=this.getIconSet(o)),i&&r)?r.getIconTemplate(i):J``}},iv=class extends eM{constructor(){super(...arguments),this._handler=t=>{this._updateIcon()}}static get styles(){return[b`
71
71
  :host {
72
72
  --internal-or-icon-width: var(--or-icon-width, 24px);
73
73
  --internal-or-icon-height: var(--or-icon-height, 24px);