From fac154ac7616bdb35c8da0e24bb87e11a5173e0f Mon Sep 17 00:00:00 2001 From: Ylian Saint-Hilaire Date: Tue, 6 Apr 2021 11:59:55 -0700 Subject: [PATCH] Version 0.8.3 --- package.json | 16 ++-------------- public/scripts/amt-0.2.0-min.js | 2 +- public/scripts/amt-desktop-0.0.2-min.js | 2 +- public/scripts/amt-terminal-0.0.2-min.js | 2 +- public/scripts/amt-wsman-0.2.0-min.js | 2 +- public/scripts/charts-min.js | 2 +- public/scripts/common-0.0.1-min.js | 2 +- public/scripts/ol-min.js | 2 +- public/scripts/ol3-contextmenu-min.js | 2 +- public/scripts/xterm-min.js | 2 +- public/scripts/zlib-inflate-min.js | 2 +- 11 files changed, 12 insertions(+), 24 deletions(-) diff --git a/package.json b/package.json index c18d3dd1..7d7ea5f8 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "meshcentral", - "version": "0.8.2", + "version": "0.8.3", "keywords": [ "Remote Device Management", "Remote Device Monitoring", @@ -36,9 +36,6 @@ "sample-config-advanced.json" ], "dependencies": { - "aedes": "^0.45.0", - "archiver": "^4.0.2", - "archiver-zip-encrypted": "^1.0.8", "body-parser": "^1.19.0", "cbor": "~5.2.0", "compression": "^1.7.4", @@ -47,23 +44,14 @@ "express": "^4.17.0", "express-handlebars": "^3.1.0", "express-ws": "^4.0.0", - "image-size": "^0.9.7", "ipcheck": "^0.1.0", - "loadavg-windows": "^1.1.1", "minimist": "^1.2.0", - "mongodb": "^3.6.5", "multiparty": "^4.2.1", "nedb": "^1.8.0", "node-forge": "^0.10.0", - "node-rdpjs-2": "^0.3.5", - "node-windows": "^1.0.0-beta.5", - "otplib": "^10.2.3", - "saslprep": "^1.0.3", - "web-push": "^3.4.4", "ws": "^6.2.1", "xmldom": "^0.5.0", - "yauzl": "^2.10.0", - "yubikeyotp": "^0.2.0" + "yauzl": "^2.10.0" }, "repository": { "type": "git", diff --git a/public/scripts/amt-0.2.0-min.js b/public/scripts/amt-0.2.0-min.js index 7ddc0570..1e7b8a8b 100644 --- a/public/scripts/amt-0.2.0-min.js +++ b/public/scripts/amt-0.2.0-min.js @@ -1 +1 @@ -function AmtStackCreateService(e){var C=new Object;C.wsman=e,C.pfx=["http://intel.com/wbem/wscim/1/amt-schema/1/","http://schemas.dmtf.org/wbem/wscim/1/cim-schema/2/","http://intel.com/wbem/wscim/1/ips-schema/1/"],C.PendingEnums=[],C.PendingBatchOperations=0,C.ActiveEnumsCount=0,C.MaxActiveEnumsCount=1,C.onProcessChanged=null;var t=0,n=0;function A(){var e=C.GetPendingActions();t=C.MaxActiveEnumsCount||0==C.PendingEnums.length||(e=C.PendingEnums.shift(),C.Enum(e[0],e[1],e[2]),_(0))}function c(r){r.names.length<=r.current?r.callback(C,r.name,r.responses,200,r.tag):(C.wsman.ExecGet(C.CompleteName(r.names[r.current]),function(e,t,n,i){var o;o=r,i=i,null==(n=n)||200!=i?o.callback(C,o.name,null,i,o.tag):(o.responses[n.Header.Method]=n,c(o))},r.pri),r.current++),A()}function i(e,t,n,i,o){200==i&&"0"==n.Body.ReturnValue?C.AMT_MessageLog_GetRecords(n.Body.IterationIdentifier,390,m,o):o[0](C,null,o[2])}function m(e,t,n,i,o){if(200==i&&"0"==n.Body.ReturnValue){var r,c,a,s,u,d,S,A,_=o[2],l=new Date,E=n.Body.RecordArray;for(r in"string"==typeof E&&(n.Body.RecordArray=[n.Body.RecordArray]),E){s=null;try{s=window.atob(E[r])}catch(e){}if(null!=s&&0<(u=ReadIntX(s,0))&&u<4294967295){for(a={DeviceAddress:s.charCodeAt(4),EventSensorType:s.charCodeAt(5),EventType:s.charCodeAt(6),EventOffset:s.charCodeAt(7),EventSourceType:s.charCodeAt(8),EventSeverity:s.charCodeAt(9),SensorNumber:s.charCodeAt(10),Entity:s.charCodeAt(11),EntityInstance:s.charCodeAt(12),EventData:[],Time:new Date(1e3*(u+60*l.getTimezoneOffset()))},c=13;c<21;c++)a.EventData.push(s.charCodeAt(c));a.EntityStr=I[a.Entity],a.Desc=(d=a.EventSensorType,S=a.EventOffset,A=a.EventData,a.Entity,15!=d?18!=d||170!=A[0]?6==d?"Authentication failed "+(A[1]+(A[2]<<8))+" times. The system may be under attack.":30==d?"No bootable media":32==d?"Operating system lockup or power interrupt":35==d?"System boot failure":37==d?"System firmware started (at least one CPU is properly executing).":"Unknown Sensor Type #"+d:"Agent watchdog "+char2hex(A[4])+char2hex(A[3])+char2hex(A[2])+char2hex(A[1])+"-"+char2hex(A[6])+char2hex(A[5])+"-... changed to "+C.WatchdogCurrentStates[A[7]]:235==A[0]?"Invalid Data":(0==S?g:M)[A[1]]),a.EntityStr||(a.EntityStr="Unknown"),_.push(a)}}1!=n.Body.NoMoreRecords?C.AMT_MessageLog_GetRecords(n.Body.IterationIdentifier,390,m,[o[0],_,o[2]]):o[0](C,_,o[2])}else o[0](C,null,o[2])}C.GetPendingActions=function(){return 2*C.PendingEnums.length+C.ActiveEnumsCount+C.wsman.comm.PendingAjax.length+C.wsman.comm.ActiveAjaxCount+C.PendingBatchOperations},C.Subscribe=function(o,e,t,r,c,n,i,a,s,u){C.wsman.ExecSubscribe(C.CompleteName(o),e,t,function(e,t,n,i){A(),r(C,o,n,i,c)},0,n,i,a,s,u),A()},C.UnSubscribe=function(o,r,c,e,t){C.wsman.ExecUnSubscribe(C.CompleteName(o),function(e,t,n,i){A(),r(C,o,n,i,c)},0,e,t),A()},C.Get=function(o,r,c,e){C.wsman.ExecGet(C.CompleteName(o),function(e,t,n,i){A(),r(C,o,n,i,c)},0,e),A()},C.Put=function(o,e,r,c,t,n){C.wsman.ExecPut(C.CompleteName(o),e,function(e,t,n,i){A(),r(C,o,n,i,c)},0,t,n),A()},C.Create=function(o,e,r,c,t){C.wsman.ExecCreate(C.CompleteName(o),e,function(e,t,n,i){A(),r(C,o,n,i,c)},0,t),A()},C.Delete=function(o,e,r,c,t){C.wsman.ExecDelete(C.CompleteName(o),e,function(e,t,n,i){A(),r(C,o,n,i,c)},0,t),A()},C.Exec=function(o,e,t,r,c,n,i){C.wsman.ExecMethod(C.CompleteName(o),e,t,function(e,t,n,i){A(),r(C,o,C.CompleteExecResponse(n),i,c)},0,n,i),A()},C.ExecWithXml=function(o,e,t,r,c,n,i){C.wsman.ExecMethodXml(C.CompleteName(o),e,execArgumentsToXml(t),function(e,t,n,i){A(),r(C,o,C.CompleteExecResponse(n),i,c)},0,n,i),A()},C.Enum=function(r,c,e,t){C.ActiveEnumsCounthttp://schemas.xmlsoap.org/ws/2004/08/addressinghttp://schemas.dmtf.org/wbem/wscim/1/cim-schema/2/CIM_ComputerSystemCIM_ComputerSystemManagedSystem',null,null,t)},C.SetBootConfigRole=function(e,t){C.CIM_BootService_SetBootConfigRole('
http://schemas.xmlsoap.org/ws/2004/08/addressing
http://schemas.dmtf.org/wbem/wscim/1/cim-schema/2/CIM_BootConfigSettingIntel(r) AMT: Boot Configuration 0',e,t)},C.CancelAllQueries=function(e){C.wsman.CancelAllQueries(e)},C.AMT_AgentPresenceWatchdog_RegisterAgent=function(e){C.Exec("AMT_AgentPresenceWatchdog","RegisterAgent",{},e)},C.AMT_AgentPresenceWatchdog_AssertPresence=function(e,t){C.Exec("AMT_AgentPresenceWatchdog","AssertPresence",{SequenceNumber:e},t)},C.AMT_AgentPresenceWatchdog_AssertShutdown=function(e,t){C.Exec("AMT_AgentPresenceWatchdog","AssertShutdown",{SequenceNumber:e},t)},C.AMT_AgentPresenceWatchdog_AddAction=function(e,t,n,i,o,r,c,a,s){C.Exec("AMT_AgentPresenceWatchdog","AddAction",{OldState:e,NewState:t,EventOnTransition:n,ActionSd:i,ActionEac:o},r,c,a,s)},C.AMT_AgentPresenceWatchdog_DeleteAllActions=function(e,t,n,i){C.Exec("AMT_AgentPresenceWatchdog","DeleteAllActions",{},e,t,n,i)},C.AMT_AgentPresenceWatchdogAction_GetActionEac=function(e){C.Exec("AMT_AgentPresenceWatchdogAction","GetActionEac",{},e)},C.AMT_AgentPresenceWatchdogVA_RegisterAgent=function(e){C.Exec("AMT_AgentPresenceWatchdogVA","RegisterAgent",{},e)},C.AMT_AgentPresenceWatchdogVA_AssertPresence=function(e,t){C.Exec("AMT_AgentPresenceWatchdogVA","AssertPresence",{SequenceNumber:e},t)},C.AMT_AgentPresenceWatchdogVA_AssertShutdown=function(e,t){C.Exec("AMT_AgentPresenceWatchdogVA","AssertShutdown",{SequenceNumber:e},t)},C.AMT_AgentPresenceWatchdogVA_AddAction=function(e,t,n,i,o,r){C.Exec("AMT_AgentPresenceWatchdogVA","AddAction",{OldState:e,NewState:t,EventOnTransition:n,ActionSd:i,ActionEac:o},r)},C.AMT_AgentPresenceWatchdogVA_DeleteAllActions=function(e,t){C.Exec("AMT_AgentPresenceWatchdogVA","DeleteAllActions",{_method_dummy:e},t)},C.AMT_AuditLog_ClearLog=function(e){C.Exec("AMT_AuditLog","ClearLog",{},e)},C.AMT_AuditLog_RequestStateChange=function(e,t,n){C.Exec("AMT_AuditLog","RequestStateChange",{RequestedState:e,TimeoutPeriod:t},n)},C.AMT_AuditLog_ReadRecords=function(e,t,n){C.Exec("AMT_AuditLog","ReadRecords",{StartIndex:e},t,n)},C.AMT_AuditLog_SetAuditLock=function(e,t,n,i){C.Exec("AMT_AuditLog","SetAuditLock",{LockTimeoutInSeconds:e,Flag:t,Handle:n},i)},C.AMT_AuditLog_ExportAuditLogSignature=function(e,t){C.Exec("AMT_AuditLog","ExportAuditLogSignature",{SigningMechanism:e},t)},C.AMT_AuditLog_SetSigningKeyMaterial=function(e,t,n,i,o){C.Exec("AMT_AuditLog","SetSigningKeyMaterial",{SigningMechanismType:e,SigningKey:t,LengthOfCertificates:n,Certificates:i},o)},C.AMT_AuditPolicyRule_SetAuditPolicy=function(e,t,n,i,o){C.Exec("AMT_AuditPolicyRule","SetAuditPolicy",{Enable:e,AuditedAppID:t,EventID:n,PolicyType:i},o)},C.AMT_AuditPolicyRule_SetAuditPolicyBulk=function(e,t,n,i,o){C.Exec("AMT_AuditPolicyRule","SetAuditPolicyBulk",{Enable:e,AuditedAppID:t,EventID:n,PolicyType:i},o)},C.AMT_AuthorizationService_AddUserAclEntryEx=function(e,t,n,i,o,r){C.Exec("AMT_AuthorizationService","AddUserAclEntryEx",{DigestUsername:e,DigestPassword:t,KerberosUserSid:n,AccessPermission:i,Realms:o},r)},C.AMT_AuthorizationService_EnumerateUserAclEntries=function(e,t){C.Exec("AMT_AuthorizationService","EnumerateUserAclEntries",{StartIndex:e},t)},C.AMT_AuthorizationService_GetUserAclEntryEx=function(e,t,n){C.Exec("AMT_AuthorizationService","GetUserAclEntryEx",{Handle:e},t,n)},C.AMT_AuthorizationService_UpdateUserAclEntryEx=function(e,t,n,i,o,r,c){C.Exec("AMT_AuthorizationService","UpdateUserAclEntryEx",{Handle:e,DigestUsername:t,DigestPassword:n,KerberosUserSid:i,AccessPermission:o,Realms:r},c)},C.AMT_AuthorizationService_RemoveUserAclEntry=function(e,t){C.Exec("AMT_AuthorizationService","RemoveUserAclEntry",{Handle:e},t)},C.AMT_AuthorizationService_SetAdminAclEntryEx=function(e,t,n){C.Exec("AMT_AuthorizationService","SetAdminAclEntryEx",{Username:e,DigestPassword:t},n)},C.AMT_AuthorizationService_GetAdminAclEntry=function(e){C.Exec("AMT_AuthorizationService","GetAdminAclEntry",{},e)},C.AMT_AuthorizationService_GetAdminAclEntryStatus=function(e){C.Exec("AMT_AuthorizationService","GetAdminAclEntryStatus",{},e)},C.AMT_AuthorizationService_GetAdminNetAclEntryStatus=function(e){C.Exec("AMT_AuthorizationService","GetAdminNetAclEntryStatus",{},e)},C.AMT_AuthorizationService_SetAclEnabledState=function(e,t,n,i){C.Exec("AMT_AuthorizationService","SetAclEnabledState",{Handle:e,Enabled:t},n,i)},C.AMT_AuthorizationService_GetAclEnabledState=function(e,t,n){C.Exec("AMT_AuthorizationService","GetAclEnabledState",{Handle:e},t,n)},C.AMT_EndpointAccessControlService_RequestStateChange=function(e,t,n){C.Exec("AMT_EndpointAccessControlService","RequestStateChange",{RequestedState:e,TimeoutPeriod:t},n)},C.AMT_EndpointAccessControlService_GetPosture=function(e,t){C.Exec("AMT_EndpointAccessControlService","GetPosture",{PostureType:e},t)},C.AMT_EndpointAccessControlService_GetPostureHash=function(e,t){C.Exec("AMT_EndpointAccessControlService","GetPostureHash",{PostureType:e},t)},C.AMT_EndpointAccessControlService_UpdatePostureState=function(e,t){C.Exec("AMT_EndpointAccessControlService","UpdatePostureState",{UpdateType:e},t)},C.AMT_EndpointAccessControlService_GetEacOptions=function(e){C.Exec("AMT_EndpointAccessControlService","GetEacOptions",{},e)},C.AMT_EndpointAccessControlService_SetEacOptions=function(e,t,n){C.Exec("AMT_EndpointAccessControlService","SetEacOptions",{EacVendors:e,PostureHashAlgorithm:t},n)},C.AMT_EnvironmentDetectionSettingData_SetSystemDefensePolicy=function(e,t){C.Exec("AMT_EnvironmentDetectionSettingData","SetSystemDefensePolicy",{Policy:e},t)},C.AMT_EnvironmentDetectionSettingData_EnableVpnRouting=function(e,t){C.Exec("AMT_EnvironmentDetectionSettingData","EnableVpnRouting",{Enable:e},t)},C.AMT_EthernetPortSettings_SetLinkPreference=function(e,t,n){C.Exec("AMT_EthernetPortSettings","SetLinkPreference",{LinkPreference:e,Timeout:t},n)},C.AMT_HeuristicPacketFilterStatistics_ResetSelectedStats=function(e,t){C.Exec("AMT_HeuristicPacketFilterStatistics","ResetSelectedStats",{SelectedStatistics:e},t)},C.AMT_KerberosSettingData_GetCredentialCacheState=function(e){C.Exec("AMT_KerberosSettingData","GetCredentialCacheState",{},e)},C.AMT_KerberosSettingData_SetCredentialCacheState=function(e,t){C.Exec("AMT_KerberosSettingData","SetCredentialCacheState",{Enable:e},t)},C.AMT_MessageLog_CancelIteration=function(e,t){C.Exec("AMT_MessageLog","CancelIteration",{IterationIdentifier:e},t)},C.AMT_MessageLog_RequestStateChange=function(e,t,n){C.Exec("AMT_MessageLog","RequestStateChange",{RequestedState:e,TimeoutPeriod:t},n)},C.AMT_MessageLog_ClearLog=function(e){C.Exec("AMT_MessageLog","ClearLog",{},e)},C.AMT_MessageLog_GetRecords=function(e,t,n,i){C.Exec("AMT_MessageLog","GetRecords",{IterationIdentifier:e,MaxReadRecords:t},n,i)},C.AMT_MessageLog_GetRecord=function(e,t,n){C.Exec("AMT_MessageLog","GetRecord",{IterationIdentifier:e,PositionToNext:t},n)},C.AMT_MessageLog_PositionAtRecord=function(e,t,n,i){C.Exec("AMT_MessageLog","PositionAtRecord",{IterationIdentifier:e,MoveAbsolute:t,RecordNumber:n},i)},C.AMT_MessageLog_PositionToFirstRecord=function(e,t){C.Exec("AMT_MessageLog","PositionToFirstRecord",{},e,t)},C.AMT_MessageLog_FreezeLog=function(e,t){C.Exec("AMT_MessageLog","FreezeLog",{Freeze:e},t)},C.AMT_PublicKeyManagementService_AddCRL=function(e,t,n){C.Exec("AMT_PublicKeyManagementService","AddCRL",{Url:e,SerialNumbers:t},n)},C.AMT_PublicKeyManagementService_ResetCRLList=function(e,t){C.Exec("AMT_PublicKeyManagementService","ResetCRLList",{_method_dummy:e},t)},C.AMT_PublicKeyManagementService_AddCertificate=function(e,t){C.Exec("AMT_PublicKeyManagementService","AddCertificate",{CertificateBlob:e},t)},C.AMT_PublicKeyManagementService_AddTrustedRootCertificate=function(e,t){C.Exec("AMT_PublicKeyManagementService","AddTrustedRootCertificate",{CertificateBlob:e},t)},C.AMT_PublicKeyManagementService_AddKey=function(e,t){C.Exec("AMT_PublicKeyManagementService","AddKey",{KeyBlob:e},t)},C.AMT_PublicKeyManagementService_GeneratePKCS10Request=function(e,t,n,i){C.Exec("AMT_PublicKeyManagementService","GeneratePKCS10Request",{KeyPair:e,DNName:t,Usage:n},i)},C.AMT_PublicKeyManagementService_GeneratePKCS10RequestEx=function(e,t,n,i){C.Exec("AMT_PublicKeyManagementService","GeneratePKCS10RequestEx",{KeyPair:e,SigningAlgorithm:t,NullSignedCertificateRequest:n},i)},C.AMT_PublicKeyManagementService_GenerateKeyPair=function(e,t,n){C.Exec("AMT_PublicKeyManagementService","GenerateKeyPair",{KeyAlgorithm:e,KeyLength:t},n)},C.AMT_RedirectionService_RequestStateChange=function(e,t){C.Exec("AMT_RedirectionService","RequestStateChange",{RequestedState:e},t)},C.AMT_RedirectionService_TerminateSession=function(e,t){C.Exec("AMT_RedirectionService","TerminateSession",{SessionType:e},t)},C.AMT_RemoteAccessService_AddMpServer=function(e,t,n,i,o,r,c,a,s){C.Exec("AMT_RemoteAccessService","AddMpServer",{AccessInfo:e,InfoFormat:t,Port:n,AuthMethod:i,Certificate:o,Username:r,Password:c,CN:a},s)},C.AMT_RemoteAccessService_AddRemoteAccessPolicyRule=function(e,t,n,i,o){C.Exec("AMT_RemoteAccessService","AddRemoteAccessPolicyRule",{Trigger:e,TunnelLifeTime:t,ExtendedData:n,MpServer:i},o)},C.AMT_RemoteAccessService_CloseRemoteAccessConnection=function(e,t){C.Exec("AMT_RemoteAccessService","CloseRemoteAccessConnection",{_method_dummy:e},t)},C.AMT_SetupAndConfigurationService_CommitChanges=function(e,t){C.Exec("AMT_SetupAndConfigurationService","CommitChanges",{_method_dummy:e},t)},C.AMT_SetupAndConfigurationService_Unprovision=function(e,t){C.Exec("AMT_SetupAndConfigurationService","Unprovision",{ProvisioningMode:e},t)},C.AMT_SetupAndConfigurationService_PartialUnprovision=function(e,t){C.Exec("AMT_SetupAndConfigurationService","PartialUnprovision",{_method_dummy:e},t)},C.AMT_SetupAndConfigurationService_ResetFlashWearOutProtection=function(e,t){C.Exec("AMT_SetupAndConfigurationService","ResetFlashWearOutProtection",{_method_dummy:e},t)},C.AMT_SetupAndConfigurationService_ExtendProvisioningPeriod=function(e,t){C.Exec("AMT_SetupAndConfigurationService","ExtendProvisioningPeriod",{Duration:e},t)},C.AMT_SetupAndConfigurationService_SetMEBxPassword=function(e,t){C.Exec("AMT_SetupAndConfigurationService","SetMEBxPassword",{Password:e},t)},C.AMT_SetupAndConfigurationService_SetTLSPSK=function(e,t,n){C.Exec("AMT_SetupAndConfigurationService","SetTLSPSK",{PID:e,PPS:t},n)},C.AMT_SetupAndConfigurationService_GetProvisioningAuditRecord=function(e){C.Exec("AMT_SetupAndConfigurationService","GetProvisioningAuditRecord",{},e)},C.AMT_SetupAndConfigurationService_GetUuid=function(e){C.Exec("AMT_SetupAndConfigurationService","GetUuid",{},e)},C.AMT_SetupAndConfigurationService_GetUnprovisionBlockingComponents=function(e){C.Exec("AMT_SetupAndConfigurationService","GetUnprovisionBlockingComponents",{},e)},C.AMT_SetupAndConfigurationService_GetProvisioningAuditRecordV2=function(e){C.Exec("AMT_SetupAndConfigurationService","GetProvisioningAuditRecordV2",{},e)},C.AMT_SystemDefensePolicy_GetTimeout=function(e){C.Exec("AMT_SystemDefensePolicy","GetTimeout",{},e)},C.AMT_SystemDefensePolicy_SetTimeout=function(e,t){C.Exec("AMT_SystemDefensePolicy","SetTimeout",{Timeout:e},t)},C.AMT_SystemDefensePolicy_UpdateStatistics=function(e,t,n,i,o,r){C.Exec("AMT_SystemDefensePolicy","UpdateStatistics",{NetworkInterface:e,ResetOnRead:t},n,i,o,r)},C.AMT_SystemPowerScheme_SetPowerScheme=function(e,t,n){C.Exec("AMT_SystemPowerScheme","SetPowerScheme",{},e,n,0,{InstanceID:t})},C.AMT_TimeSynchronizationService_GetLowAccuracyTimeSynch=function(e,t){C.Exec("AMT_TimeSynchronizationService","GetLowAccuracyTimeSynch",{},e,t)},C.AMT_TimeSynchronizationService_SetHighAccuracyTimeSynch=function(e,t,n,i,o){C.Exec("AMT_TimeSynchronizationService","SetHighAccuracyTimeSynch",{Ta0:e,Tm1:t,Tm2:n},i,o)},C.AMT_UserInitiatedConnectionService_RequestStateChange=function(e,t,n){C.Exec("AMT_UserInitiatedConnectionService","RequestStateChange",{RequestedState:e,TimeoutPeriod:t},n)},C.AMT_WebUIService_RequestStateChange=function(e,t,n){C.Exec("AMT_WebUIService","RequestStateChange",{RequestedState:e,TimeoutPeriod:t},n)},C.AMT_WiFiPortConfigurationService_AddWiFiSettings=function(e,t,n,i,o,r){C.ExecWithXml("AMT_WiFiPortConfigurationService","AddWiFiSettings",{WiFiEndpoint:e,WiFiEndpointSettingsInput:t,IEEE8021xSettingsInput:n,ClientCredential:i,CACredential:o},r)},C.AMT_WiFiPortConfigurationService_UpdateWiFiSettings=function(e,t,n,i,o,r){C.ExecWithXml("AMT_WiFiPortConfigurationService","UpdateWiFiSettings",{WiFiEndpointSettings:e,WiFiEndpointSettingsInput:t,IEEE8021xSettingsInput:n,ClientCredential:i,CACredential:o},r)},C.AMT_WiFiPortConfigurationService_DeleteAllITProfiles=function(e,t){C.Exec("AMT_WiFiPortConfigurationService","DeleteAllITProfiles",{_method_dummy:e},t)},C.AMT_WiFiPortConfigurationService_DeleteAllUserProfiles=function(e,t){C.Exec("AMT_WiFiPortConfigurationService","DeleteAllUserProfiles",{_method_dummy:e},t)},C.CIM_Account_RequestStateChange=function(e,t,n){C.Exec("CIM_Account","RequestStateChange",{RequestedState:e,TimeoutPeriod:t},n)},C.CIM_AccountManagementService_CreateAccount=function(e,t,n){C.Exec("CIM_AccountManagementService","CreateAccount",{System:e,AccountTemplate:t},n)},C.CIM_BootConfigSetting_ChangeBootOrder=function(e,t){C.Exec("CIM_BootConfigSetting","ChangeBootOrder",{Source:e},t)},C.CIM_BootService_SetBootConfigRole=function(e,t,n){C.Exec("CIM_BootService","SetBootConfigRole",{BootConfigSetting:e,Role:t},n,0,1)},C.CIM_Card_ConnectorPower=function(e,t,n){C.Exec("CIM_Card","ConnectorPower",{Connector:e,PoweredOn:t},n)},C.CIM_Card_IsCompatible=function(e,t){C.Exec("CIM_Card","IsCompatible",{ElementToCheck:e},t)},C.CIM_Chassis_IsCompatible=function(e,t){C.Exec("CIM_Chassis","IsCompatible",{ElementToCheck:e},t)},C.CIM_Fan_SetSpeed=function(e,t){C.Exec("CIM_Fan","SetSpeed",{DesiredSpeed:e},t)},C.CIM_KVMRedirectionSAP_RequestStateChange=function(e,t,n){C.Exec("CIM_KVMRedirectionSAP","RequestStateChange",{RequestedState:e},n)},C.CIM_MediaAccessDevice_LockMedia=function(e,t){C.Exec("CIM_MediaAccessDevice","LockMedia",{Lock:e},t)},C.CIM_MediaAccessDevice_SetPowerState=function(e,t,n){C.Exec("CIM_MediaAccessDevice","SetPowerState",{PowerState:e,Time:t},n)},C.CIM_MediaAccessDevice_Reset=function(e){C.Exec("CIM_MediaAccessDevice","Reset",{},e)},C.CIM_MediaAccessDevice_EnableDevice=function(e,t){C.Exec("CIM_MediaAccessDevice","EnableDevice",{Enabled:e},t)},C.CIM_MediaAccessDevice_OnlineDevice=function(e,t){C.Exec("CIM_MediaAccessDevice","OnlineDevice",{Online:e},t)},C.CIM_MediaAccessDevice_QuiesceDevice=function(e,t){C.Exec("CIM_MediaAccessDevice","QuiesceDevice",{Quiesce:e},t)},C.CIM_MediaAccessDevice_SaveProperties=function(e){C.Exec("CIM_MediaAccessDevice","SaveProperties",{},e)},C.CIM_MediaAccessDevice_RestoreProperties=function(e){C.Exec("CIM_MediaAccessDevice","RestoreProperties",{},e)},C.CIM_MediaAccessDevice_RequestStateChange=function(e,t,n){C.Exec("CIM_MediaAccessDevice","RequestStateChange",{RequestedState:e,TimeoutPeriod:t},n)},C.CIM_PhysicalFrame_IsCompatible=function(e,t){C.Exec("CIM_PhysicalFrame","IsCompatible",{ElementToCheck:e},t)},C.CIM_PhysicalPackage_IsCompatible=function(e,t){C.Exec("CIM_PhysicalPackage","IsCompatible",{ElementToCheck:e},t)},C.CIM_PowerManagementService_RequestPowerStateChange=function(e,t,n,i,o){C.Exec("CIM_PowerManagementService","RequestPowerStateChange",{PowerState:e,ManagedElement:t,Time:n,TimeoutPeriod:i},o,0,1)},C.CIM_PowerSupply_SetPowerState=function(e,t,n){C.Exec("CIM_PowerSupply","SetPowerState",{PowerState:e,Time:t},n)},C.CIM_PowerSupply_Reset=function(e){C.Exec("CIM_PowerSupply","Reset",{},e)},C.CIM_PowerSupply_EnableDevice=function(e,t){C.Exec("CIM_PowerSupply","EnableDevice",{Enabled:e},t)},C.CIM_PowerSupply_OnlineDevice=function(e,t){C.Exec("CIM_PowerSupply","OnlineDevice",{Online:e},t)},C.CIM_PowerSupply_QuiesceDevice=function(e,t){C.Exec("CIM_PowerSupply","QuiesceDevice",{Quiesce:e},t)},C.CIM_PowerSupply_SaveProperties=function(e){C.Exec("CIM_PowerSupply","SaveProperties",{},e)},C.CIM_PowerSupply_RestoreProperties=function(e){C.Exec("CIM_PowerSupply","RestoreProperties",{},e)},C.CIM_PowerSupply_RequestStateChange=function(e,t,n){C.Exec("CIM_PowerSupply","RequestStateChange",{RequestedState:e,TimeoutPeriod:t},n)},C.CIM_Processor_SetPowerState=function(e,t,n){C.Exec("CIM_Processor","SetPowerState",{PowerState:e,Time:t},n)},C.CIM_Processor_Reset=function(e){C.Exec("CIM_Processor","Reset",{},e)},C.CIM_Processor_EnableDevice=function(e,t){C.Exec("CIM_Processor","EnableDevice",{Enabled:e},t)},C.CIM_Processor_OnlineDevice=function(e,t){C.Exec("CIM_Processor","OnlineDevice",{Online:e},t)},C.CIM_Processor_QuiesceDevice=function(e,t){C.Exec("CIM_Processor","QuiesceDevice",{Quiesce:e},t)},C.CIM_Processor_SaveProperties=function(e){C.Exec("CIM_Processor","SaveProperties",{},e)},C.CIM_Processor_RestoreProperties=function(e){C.Exec("CIM_Processor","RestoreProperties",{},e)},C.CIM_Processor_RequestStateChange=function(e,t,n){C.Exec("CIM_Processor","RequestStateChange",{RequestedState:e,TimeoutPeriod:t},n)},C.CIM_RecordLog_ClearLog=function(e){C.Exec("CIM_RecordLog","ClearLog",{},e)},C.CIM_RecordLog_RequestStateChange=function(e,t,n){C.Exec("CIM_RecordLog","RequestStateChange",{RequestedState:e,TimeoutPeriod:t},n)},C.CIM_RedirectionService_RequestStateChange=function(e,t,n){C.Exec("CIM_RedirectionService","RequestStateChange",{RequestedState:e,TimeoutPeriod:t},n)},C.CIM_Sensor_SetPowerState=function(e,t,n){C.Exec("CIM_Sensor","SetPowerState",{PowerState:e,Time:t},n)},C.CIM_Sensor_Reset=function(e){C.Exec("CIM_Sensor","Reset",{},e)},C.CIM_Sensor_EnableDevice=function(e,t){C.Exec("CIM_Sensor","EnableDevice",{Enabled:e},t)},C.CIM_Sensor_OnlineDevice=function(e,t){C.Exec("CIM_Sensor","OnlineDevice",{Online:e},t)},C.CIM_Sensor_QuiesceDevice=function(e,t){C.Exec("CIM_Sensor","QuiesceDevice",{Quiesce:e},t)},C.CIM_Sensor_SaveProperties=function(e){C.Exec("CIM_Sensor","SaveProperties",{},e)},C.CIM_Sensor_RestoreProperties=function(e){C.Exec("CIM_Sensor","RestoreProperties",{},e)},C.CIM_Sensor_RequestStateChange=function(e,t,n){C.Exec("CIM_Sensor","RequestStateChange",{RequestedState:e,TimeoutPeriod:t},n)},C.CIM_StatisticalData_ResetSelectedStats=function(e,t){C.Exec("CIM_StatisticalData","ResetSelectedStats",{SelectedStatistics:e},t)},C.CIM_Watchdog_KeepAlive=function(e){C.Exec("CIM_Watchdog","KeepAlive",{},e)},C.CIM_Watchdog_SetPowerState=function(e,t,n){C.Exec("CIM_Watchdog","SetPowerState",{PowerState:e,Time:t},n)},C.CIM_Watchdog_Reset=function(e){C.Exec("CIM_Watchdog","Reset",{},e)},C.CIM_Watchdog_EnableDevice=function(e,t){C.Exec("CIM_Watchdog","EnableDevice",{Enabled:e},t)},C.CIM_Watchdog_OnlineDevice=function(e,t){C.Exec("CIM_Watchdog","OnlineDevice",{Online:e},t)},C.CIM_Watchdog_QuiesceDevice=function(e,t){C.Exec("CIM_Watchdog","QuiesceDevice",{Quiesce:e},t)},C.CIM_Watchdog_SaveProperties=function(e){C.Exec("CIM_Watchdog","SaveProperties",{},e)},C.CIM_Watchdog_RestoreProperties=function(e){C.Exec("CIM_Watchdog","RestoreProperties",{},e)},C.CIM_Watchdog_RequestStateChange=function(e,t,n){C.Exec("CIM_Watchdog","RequestStateChange",{RequestedState:e,TimeoutPeriod:t},n)},C.CIM_WiFiPort_SetPowerState=function(e,t,n){C.Exec("CIM_WiFiPort","SetPowerState",{PowerState:e,Time:t},n)},C.CIM_WiFiPort_Reset=function(e){C.Exec("CIM_WiFiPort","Reset",{},e)},C.CIM_WiFiPort_EnableDevice=function(e,t){C.Exec("CIM_WiFiPort","EnableDevice",{Enabled:e},t)},C.CIM_WiFiPort_OnlineDevice=function(e,t){C.Exec("CIM_WiFiPort","OnlineDevice",{Online:e},t)},C.CIM_WiFiPort_QuiesceDevice=function(e,t){C.Exec("CIM_WiFiPort","QuiesceDevice",{Quiesce:e},t)},C.CIM_WiFiPort_SaveProperties=function(e){C.Exec("CIM_WiFiPort","SaveProperties",{},e)},C.CIM_WiFiPort_RestoreProperties=function(e){C.Exec("CIM_WiFiPort","RestoreProperties",{},e)},C.CIM_WiFiPort_RequestStateChange=function(e,t,n){C.Exec("CIM_WiFiPort","RequestStateChange",{RequestedState:e,TimeoutPeriod:t},n)},C.IPS_HostBasedSetupService_Setup=function(e,t,n,i,o,r,c){C.Exec("IPS_HostBasedSetupService","Setup",{NetAdminPassEncryptionType:e,NetworkAdminPassword:t,McNonce:n,Certificate:i,SigningAlgorithm:o,DigitalSignature:r},c)},C.IPS_HostBasedSetupService_AddNextCertInChain=function(e,t,n,i){C.Exec("IPS_HostBasedSetupService","AddNextCertInChain",{NextCertificate:e,IsLeafCertificate:t,IsRootCertificate:n},i)},C.IPS_HostBasedSetupService_AdminSetup=function(e,t,n,i,o,r){C.Exec("IPS_HostBasedSetupService","AdminSetup",{NetAdminPassEncryptionType:e,NetworkAdminPassword:t,McNonce:n,SigningAlgorithm:i,DigitalSignature:o},r)},C.IPS_HostBasedSetupService_UpgradeClientToAdmin=function(e,t,n,i){C.Exec("IPS_HostBasedSetupService","UpgradeClientToAdmin",{McNonce:e,SigningAlgorithm:t,DigitalSignature:n},i)},C.IPS_HostBasedSetupService_DisableClientControlMode=function(e,t){C.Exec("IPS_HostBasedSetupService","DisableClientControlMode",{_method_dummy:e},t)},C.IPS_KVMRedirectionSettingData_TerminateSession=function(e){C.Exec("IPS_KVMRedirectionSettingData","TerminateSession",{},e)},C.IPS_OptInService_StartOptIn=function(e){C.Exec("IPS_OptInService","StartOptIn",{},e)},C.IPS_OptInService_CancelOptIn=function(e){C.Exec("IPS_OptInService","CancelOptIn",{},e)},C.IPS_OptInService_SendOptInCode=function(e,t){C.Exec("IPS_OptInService","SendOptInCode",{OptInCode:e},t)},C.IPS_OptInService_StartService=function(e){C.Exec("IPS_OptInService","StartService",{},e)},C.IPS_OptInService_StopService=function(e){C.Exec("IPS_OptInService","StopService",{},e)},C.IPS_OptInService_RequestStateChange=function(e,t,n){C.Exec("IPS_OptInService","RequestStateChange",{RequestedState:e,TimeoutPeriod:t},n)},C.IPS_ProvisioningRecordLog_RequestStateChange=function(e,t,n){C.Exec("IPS_ProvisioningRecordLog","RequestStateChange",{RequestedState:e,TimeoutPeriod:t},n)},C.IPS_ProvisioningRecordLog_ClearLog=function(e,t){C.Exec("IPS_ProvisioningRecordLog","ClearLog",{_method_dummy:e},t)},C.IPS_SecIOService_RequestStateChange=function(e,t,n){C.Exec("IPS_SecIOService","RequestStateChange",{RequestedState:e,TimeoutPeriod:t},n)},C.AmtStatusToStr=function(e){return C.AmtStatusCodes[e]||"UNKNOWN_ERROR"},C.AmtStatusCodes={0:"SUCCESS",1:"INTERNAL_ERROR",2:"NOT_READY",3:"INVALID_PT_MODE",4:"INVALID_MESSAGE_LENGTH",5:"TABLE_FINGERPRINT_NOT_AVAILABLE",6:"INTEGRITY_CHECK_FAILED",7:"UNSUPPORTED_ISVS_VERSION",8:"APPLICATION_NOT_REGISTERED",9:"INVALID_REGISTRATION_DATA",10:"APPLICATION_DOES_NOT_EXIST",11:"NOT_ENOUGH_STORAGE",12:"INVALID_NAME",13:"BLOCK_DOES_NOT_EXIST",14:"INVALID_BYTE_OFFSET",15:"INVALID_BYTE_COUNT",16:"NOT_PERMITTED",17:"NOT_OWNER",18:"BLOCK_LOCKED_BY_OTHER",19:"BLOCK_NOT_LOCKED",20:"INVALID_GROUP_PERMISSIONS",21:"GROUP_DOES_NOT_EXIST",22:"INVALID_MEMBER_COUNT",23:"MAX_LIMIT_REACHED",24:"INVALID_AUTH_TYPE",25:"AUTHENTICATION_FAILED",26:"INVALID_DHCP_MODE",27:"INVALID_IP_ADDRESS",28:"INVALID_DOMAIN_NAME",29:"UNSUPPORTED_VERSION",30:"REQUEST_UNEXPECTED",31:"INVALID_TABLE_TYPE",32:"INVALID_PROVISIONING_STATE",33:"UNSUPPORTED_OBJECT",34:"INVALID_TIME",35:"INVALID_INDEX",36:"INVALID_PARAMETER",37:"INVALID_NETMASK",38:"FLASH_WRITE_LIMIT_EXCEEDED",39:"INVALID_IMAGE_LENGTH",40:"INVALID_IMAGE_SIGNATURE",41:"PROPOSE_ANOTHER_VERSION",42:"INVALID_PID_FORMAT",43:"INVALID_PPS_FORMAT",44:"BIST_COMMAND_BLOCKED",45:"CONNECTION_FAILED",46:"CONNECTION_TOO_MANY",47:"RNG_GENERATION_IN_PROGRESS",48:"RNG_NOT_READY",49:"CERTIFICATE_NOT_READY",1024:"DISABLED_BY_POLICY",2048:"NETWORK_IF_ERROR_BASE",2049:"UNSUPPORTED_OEM_NUMBER",2050:"UNSUPPORTED_BOOT_OPTION",2051:"INVALID_COMMAND",2052:"INVALID_SPECIAL_COMMAND",2053:"INVALID_HANDLE",2054:"INVALID_PASSWORD",2055:"INVALID_REALM",2056:"STORAGE_ACL_ENTRY_IN_USE",2057:"DATA_MISSING",2058:"DUPLICATE",2059:"EVENTLOG_FROZEN",2060:"PKI_MISSING_KEYS",2061:"PKI_GENERATING_KEYS",2062:"INVALID_KEY",2063:"INVALID_CERT",2064:"CERT_KEY_NOT_MATCH",2065:"MAX_KERB_DOMAIN_REACHED",2066:"UNSUPPORTED",2067:"INVALID_PRIORITY",2068:"NOT_FOUND",2069:"INVALID_CREDENTIALS",2070:"INVALID_PASSPHRASE",2072:"NO_ASSOCIATION",2075:"AUDIT_FAIL",2076:"BLOCKING_COMPONENT",2081:"USER_CONSENT_REQUIRED",4096:"APP_INTERNAL_ERROR",4097:"NOT_INITIALIZED",4098:"LIB_VERSION_UNSUPPORTED",4099:"INVALID_PARAM",4100:"RESOURCES",4101:"HARDWARE_ACCESS_ERROR",4102:"REQUESTOR_NOT_REGISTERED",4103:"NETWORK_ERROR",4104:"PARAM_BUFFER_TOO_SHORT",4105:"COM_NOT_INITIALIZED_IN_THREAD",4106:"URL_REQUIRED"},C.GetMessageLog=function(e,t){C.AMT_MessageLog_PositionToFirstRecord(i,[e,t,[]])};"Platform firmware (e.g. BIOS)|SMI handler|ISV system management software|Alert ASIC|IPMI|BIOS vendor|System board set vendor|System integrator|Third party add-in|OSV|NIC|System management card".split("|");var g="Unspecified.|No system memory is physically installed in the system.|No usable system memory, all installed memory has experienced an unrecoverable failure.|Unrecoverable hard-disk/ATAPI/IDE device failure.|Unrecoverable system-board failure.|Unrecoverable diskette subsystem failure.|Unrecoverable hard-disk controller failure.|Unrecoverable PS/2 or USB keyboard failure.|Removable boot media not found.|Unrecoverable video controller failure.|No video device detected.|Firmware (BIOS) ROM corruption detected.|CPU voltage mismatch (processors that share same supply have mismatched voltage requirements)|CPU speed matching failure".split("|"),M="Unspecified.|Memory initialization.|Starting hard-disk initialization and test|Secondary processor(s) initialization|User authentication|User-initiated system setup|USB resource configuration|PCI resource configuration|Option ROM initialization|Video initialization|Cache initialization|SM Bus initialization|Keyboard controller initialization|Embedded controller/management controller initialization|Docking station attachment|Enabling docking station|Docking station ejection|Disabling docking station|Calling operating system wake-up vector|Starting operating system boot process|Baseboard or motherboard initialization|reserved|Floppy initialization|Keyboard test|Pointing device test|Primary processor initialization".split("|"),I="Unspecified|Other|Unknown|Processor|Disk|Peripheral|System management module|System board|Memory module|Processor module|Power supply|Add in card|Front panel board|Back panel board|Power system board|Drive backplane|System internal expansion board|Other system board|Processor board|Power unit|Power module|Power management board|Chassis back panel board|System chassis|Sub chassis|Other chassis board|Disk drive bay|Peripheral bay|Device bay|Fan cooling|Cooling unit|Cable interconnect|Memory device|System management software|BIOS|Intel(r) ME|System bus|Group|Intel(r) ME|External environment|Battery|Processing blade|Connectivity switch|Processor/memory module|I/O module|Processor I/O module|Management controller firmware|IPMI channel|PCI bus|PCI express bus|SCSI bus|SATA/SAS bus|Processor front side bus".split("|");C.RealmNames="||Redirection|PT Administration|Hardware Asset|Remote Control|Storage|Event Manager|Storage Admin|Agent Presence Local|Agent Presence Remote|Circuit Breaker|Network Time|General Information|Firmware Update|EIT|LocalUN|Endpoint Access Control|Endpoint Access Control Admin|Event Log Reader|Audit Log|ACL Realm|||Local System".split("|"),C.WatchdogCurrentStates={1:"Not Started",2:"Stopped",4:"Running",8:"Expired",16:"Suspended"};var l={16:"Security Admin",17:"RCO",18:"Redirection Manager",19:"Firmware Update Manager",20:"Security Audit Log",21:"Network Time",22:"Network Administration",23:"Storage Administration",24:"Event Manager",25:"Circuit Breaker Manager",26:"Agent Presence Manager",27:"Wireless Configuration",28:"EAC",29:"KVM",30:"User Opt-In Events",32:"Screen Blanking",33:"Watchdog Events",1600:"Provisioning Started",1601:"Provisioning Completed",1602:"ACL Entry Added",1603:"ACL Entry Modified",1604:"ACL Entry Removed",1605:"ACL Access with Invalid Credentials",1606:"ACL Entry State",1607:"TLS State Changed",1608:"TLS Server Certificate Set",1609:"TLS Server Certificate Remove",1610:"TLS Trusted Root Certificate Added",1611:"TLS Trusted Root Certificate Removed",1612:"TLS Preshared Key Set",1613:"Kerberos Settings Modified",1614:"Kerberos Main Key Modified",1615:"Flash Wear out Counters Reset",1616:"Power Package Modified",1617:"Set Realm Authentication Mode",1618:"Upgrade Client to Admin Control Mode",1619:"Unprovisioning Started",1700:"Performed Power Up",1701:"Performed Power Down",1702:"Performed Power Cycle",1703:"Performed Reset",1704:"Set Boot Options",1800:"IDER Session Opened",1801:"IDER Session Closed",1802:"IDER Enabled",1803:"IDER Disabled",1804:"SoL Session Opened",1805:"SoL Session Closed",1806:"SoL Enabled",1807:"SoL Disabled",1808:"KVM Session Started",1809:"KVM Session Ended",1810:"KVM Enabled",1811:"KVM Disabled",1812:"VNC Password Failed 3 Times",1900:"Firmware Updated",1901:"Firmware Update Failed",2e3:"Security Audit Log Cleared",2001:"Security Audit Policy Modified",2002:"Security Audit Log Disabled",2003:"Security Audit Log Enabled",2004:"Security Audit Log Exported",2005:"Security Audit Log Recovered",2100:"Intel® ME Time Set",2200:"TCPIP Parameters Set",2201:"Host Name Set",2202:"Domain Name Set",2203:"VLAN Parameters Set",2204:"Link Policy Set",2205:"IPv6 Parameters Set",2300:"Global Storage Attributes Set",2301:"Storage EACL Modified",2302:"Storage FPACL Modified",2303:"Storage Write Operation",2400:"Alert Subscribed",2401:"Alert Unsubscribed",2402:"Event Log Cleared",2403:"Event Log Frozen",2500:"CB Filter Added",2501:"CB Filter Removed",2502:"CB Policy Added",2503:"CB Policy Removed",2504:"CB Default Policy Set",2505:"CB Heuristics Option Set",2506:"CB Heuristics State Cleared",2600:"Agent Watchdog Added",2601:"Agent Watchdog Removed",2602:"Agent Watchdog Action Set",2700:"Wireless Profile Added",2701:"Wireless Profile Removed",2702:"Wireless Profile Updated",2800:"EAC Posture Signer SET",2801:"EAC Enabled",2802:"EAC Disabled",2803:"EAC Posture State",2804:"EAC Set Options",2900:"KVM Opt-in Enabled",2901:"KVM Opt-in Disabled",2902:"KVM Password Changed",2903:"KVM Consent Succeeded",2904:"KVM Consent Failed",3e3:"Opt-In Policy Change",3001:"Send Consent Code Event",3002:"Start Opt-In Blocked Event"};function E(e,t,n,i,o){if(200==i){var r,c,a,s,u,d=o[1],S=new Date;if(0Local",r=5),3==u.InitiatorType&&(u.Initiator="KVM Default Port",r=5),A=ReadInt(a,r),u.Time=new Date(1e3*(A+60*S.getTimezoneOffset())),r+=4,u.MCLocationType=a.charCodeAt(r++);var A=a.charCodeAt(r++);u.NetAddress=a.substring(r,r+A),r+=A;A=a.charCodeAt(r++);u.Ex=a.substring(r,r+A),u.ExStr=C.GetAuditLogExtendedDataStr(100*u.AuditAppID+u.EventID,u.Ex),d.push(u)}n.Body.TotalRecordCount>d.length?C.AMT_AuditLog_ReadRecords(d.length+1,E,[o[0],d]):o[0](C,d,i)}else o[0](C,[],i)}return C.GetAuditLogExtendedDataStr=function(e,t){if((1602==e||1604==e)&&0==t.charCodeAt(0))return t.substring(2,2+t.charCodeAt(1));if(1603==e)return 0==t.charCodeAt(1)?t.substring(3):null;if(1605==e)return["Invalid ME access","Invalid MEBx access"][t.charCodeAt(0)];if(1606==e){var n=["Disabled","Enabled"][t.charCodeAt(0)];return 0==t.charCodeAt(1)&&(n+=", "+t.substring(3)),n}if(1607==e)return"Remote "+["NoAuth","ServerAuth","MutualAuth"][t.charCodeAt(0)]+", Local "+["NoAuth","ServerAuth","MutualAuth"][t.charCodeAt(1)];if(1617==e)return C.RealmNames[ReadInt(t,0)]+", "+["NoAuth","Auth","Disabled"][t.charCodeAt(4)];if(1619==e)return["BIOS","MEBx","Local MEI","Local WSMAN","Remote WSAMN"][t.charCodeAt(0)];if(1900==e)return"From "+ReadShort(t,0)+"."+ReadShort(t,2)+"."+ReadShort(t,4)+"."+ReadShort(t,6)+" to "+ReadShort(t,8)+"."+ReadShort(t,10)+"."+ReadShort(t,12)+"."+ReadShort(t,14);if(2100!=e)return 3e3==e?"From "+["None","KVM","All"][t.charCodeAt(0)]+" to "+["None","KVM","All"][t.charCodeAt(1)]:3001==e?["Success","Failed 3 times"][t.charCodeAt(0)]:null;e=new Date;return e.setTime(1e3*ReadInt(t,0)+6e4*(new Date).getTimezoneOffset()),e.toLocaleString()},C.GetAuditLog=function(e){C.AMT_AuditLog_ReadRecords(1,E,[e,[]])},C}function hex_md5(e){return null==e&&(e=""),forge.md.md5.create().update(e).digest().toHex()}for(var md5_k=[],i=0;i<64;)md5_k[i]=0|4294967296*Math.abs(Math.sin(++i));function hex_md5(e){null==e&&(e="");for(var t,n,i,o,r=[],c=unescape(encodeURI(e)),a=c.length,s=[1732584193,-271733879,-1732584194,271733878],u=0;u<=a;)r[u>>2]|=(c.charCodeAt(u)||128)<>6)+14]=8*a,u=0;u>4]+(md5_k[o]+(0|r[[o,5*o+1,3*o+5,7*o][a]%16+u])))<<(a=[7,12,17,22,5,9,14,20,4,11,16,23,6,10,15,21][4*a+o++%4])|i>>>32-a),t,n];for(o=4;o;)s[--o]=s[o]+a[o]}for(e="";o<32;)e+=(s[o>>3]>>4*(1^7&o++)&15).toString(16);return e}function rstr_md5(e){return hex2rstr(hex_md5(e))}function execArgumentsToXml(e){if(null==e)return null;var t,n="";for(t in e){var i=e[t];i&&("reference"===i.__parameterType?n+=referenceToXml(t,i):n+=instanceToXml(t,i))}return n}function instanceToXml(e,t){if(null==t)return null;var n,i=!!t.__namespace,o=i?"";for(n in t)t.hasOwnProperty(n)&&0!==n.indexOf("__")&&("function"==typeof t[n]||Array.isArray(t[n])||("object"==typeof t[n]?console.error("only convert one level down..."):c+=o+n+">"+t[n].toString()+r+n+">"));return c+=""}function referenceToXml(e,t){if(null==t)return null;var n,i="/wsman"+t.__resourceUri+"";for(n in t)t.hasOwnProperty(n)&&0!==n.indexOf("__")&&("function"==typeof t[n]||"object"==typeof t[n]||Array.isArray(t[n])||(i+=''+t[n].toString()+""));return i+=""}function GetSidString(e){for(var t="S-"+e.charCodeAt(0)+"-"+e.charCodeAt(7),n=2;n=C.MaxActiveEnumsCount||0==C.PendingEnums.length||(e=C.PendingEnums.shift(),C.Enum(e[0],e[1],e[2]),_(0))}function c(r){r.names.length<=r.current?r.callback(C,r.name,r.responses,200,r.tag):(C.wsman.ExecGet(C.CompleteName(r.names[r.current]),function(e,t,n,i){var o;o=r,i=i,null==(n=n)||200!=i?o.callback(C,o.name,null,i,o.tag):(o.responses[n.Header.Method]=n,c(o))},r.pri),r.current++),A()}function i(e,t,n,i,o){200==i&&"0"==n.Body.ReturnValue?C.AMT_MessageLog_GetRecords(n.Body.IterationIdentifier,390,m,o):o[0](C,null,o[2])}function m(e,t,n,i,o){if(200==i&&"0"==n.Body.ReturnValue){var r,c,a,s,u,d,S,A,_=o[2],l=new Date,E=n.Body.RecordArray;for(r in"string"==typeof E&&(n.Body.RecordArray=[n.Body.RecordArray]),E){s=null;try{s=window.atob(E[r])}catch(e){}if(null!=s&&0<(u=ReadIntX(s,0))&&u<4294967295){for(a={DeviceAddress:s.charCodeAt(4),EventSensorType:s.charCodeAt(5),EventType:s.charCodeAt(6),EventOffset:s.charCodeAt(7),EventSourceType:s.charCodeAt(8),EventSeverity:s.charCodeAt(9),SensorNumber:s.charCodeAt(10),Entity:s.charCodeAt(11),EntityInstance:s.charCodeAt(12),EventData:[],Time:new Date(1e3*(u+60*l.getTimezoneOffset()))},c=13;c<21;c++)a.EventData.push(s.charCodeAt(c));a.EntityStr=I[a.Entity],a.Desc=(d=a.EventSensorType,S=a.EventOffset,A=a.EventData,a.Entity,15!=d?18!=d||170!=A[0]?6==d?"Authentication failed "+(A[1]+(A[2]<<8))+" times. The system may be under attack.":30==d?"No bootable media":32==d?"Operating system lockup or power interrupt":35==d?"System boot failure":37==d?"System firmware started (at least one CPU is properly executing).":"Unknown Sensor Type #"+d:"Agent watchdog "+char2hex(A[4])+char2hex(A[3])+char2hex(A[2])+char2hex(A[1])+"-"+char2hex(A[6])+char2hex(A[5])+"-... changed to "+C.WatchdogCurrentStates[A[7]]:235==A[0]?"Invalid Data":(0==S?g:M)[A[1]]),a.EntityStr||(a.EntityStr="Unknown"),_.push(a)}}1!=n.Body.NoMoreRecords?C.AMT_MessageLog_GetRecords(n.Body.IterationIdentifier,390,m,[o[0],_,o[2]]):o[0](C,_,o[2])}else o[0](C,null,o[2])}C.GetPendingActions=function(){return 2*C.PendingEnums.length+C.ActiveEnumsCount+C.wsman.comm.PendingAjax.length+C.wsman.comm.ActiveAjaxCount+C.PendingBatchOperations},C.Subscribe=function(o,e,t,r,c,n,i,a,s,u){C.wsman.ExecSubscribe(C.CompleteName(o),e,t,function(e,t,n,i){A(),r(C,o,n,i,c)},0,n,i,a,s,u),A()},C.UnSubscribe=function(o,r,c,e,t){C.wsman.ExecUnSubscribe(C.CompleteName(o),function(e,t,n,i){A(),r(C,o,n,i,c)},0,e,t),A()},C.Get=function(o,r,c,e){C.wsman.ExecGet(C.CompleteName(o),function(e,t,n,i){A(),r(C,o,n,i,c)},0,e),A()},C.Put=function(o,e,r,c,t,n){C.wsman.ExecPut(C.CompleteName(o),e,function(e,t,n,i){A(),r(C,o,n,i,c)},0,t,n),A()},C.Create=function(o,e,r,c,t){C.wsman.ExecCreate(C.CompleteName(o),e,function(e,t,n,i){A(),r(C,o,n,i,c)},0,t),A()},C.Delete=function(o,e,r,c,t){C.wsman.ExecDelete(C.CompleteName(o),e,function(e,t,n,i){A(),r(C,o,n,i,c)},0,t),A()},C.Exec=function(o,e,t,r,c,n,i){C.wsman.ExecMethod(C.CompleteName(o),e,t,function(e,t,n,i){A(),r(C,o,C.CompleteExecResponse(n),i,c)},0,n,i),A()},C.ExecWithXml=function(o,e,t,r,c,n,i){C.wsman.ExecMethodXml(C.CompleteName(o),e,execArgumentsToXml(t),function(e,t,n,i){A(),r(C,o,C.CompleteExecResponse(n),i,c)},0,n,i),A()},C.Enum=function(s,u,e,t){C.ActiveEnumsCounthttp://schemas.xmlsoap.org/ws/2004/08/addressinghttp://schemas.dmtf.org/wbem/wscim/1/cim-schema/2/CIM_ComputerSystemCIM_ComputerSystemManagedSystem',null,null,t)},C.SetBootConfigRole=function(e,t){C.CIM_BootService_SetBootConfigRole('
http://schemas.xmlsoap.org/ws/2004/08/addressing
http://schemas.dmtf.org/wbem/wscim/1/cim-schema/2/CIM_BootConfigSettingIntel(r) AMT: Boot Configuration 0',e,t)},C.CancelAllQueries=function(e){C.wsman.CancelAllQueries(e)},C.AMT_AgentPresenceWatchdog_RegisterAgent=function(e){C.Exec("AMT_AgentPresenceWatchdog","RegisterAgent",{},e)},C.AMT_AgentPresenceWatchdog_AssertPresence=function(e,t){C.Exec("AMT_AgentPresenceWatchdog","AssertPresence",{SequenceNumber:e},t)},C.AMT_AgentPresenceWatchdog_AssertShutdown=function(e,t){C.Exec("AMT_AgentPresenceWatchdog","AssertShutdown",{SequenceNumber:e},t)},C.AMT_AgentPresenceWatchdog_AddAction=function(e,t,n,i,o,r,c,a,s){C.Exec("AMT_AgentPresenceWatchdog","AddAction",{OldState:e,NewState:t,EventOnTransition:n,ActionSd:i,ActionEac:o},r,c,a,s)},C.AMT_AgentPresenceWatchdog_DeleteAllActions=function(e,t,n,i){C.Exec("AMT_AgentPresenceWatchdog","DeleteAllActions",{},e,t,n,i)},C.AMT_AgentPresenceWatchdogAction_GetActionEac=function(e){C.Exec("AMT_AgentPresenceWatchdogAction","GetActionEac",{},e)},C.AMT_AgentPresenceWatchdogVA_RegisterAgent=function(e){C.Exec("AMT_AgentPresenceWatchdogVA","RegisterAgent",{},e)},C.AMT_AgentPresenceWatchdogVA_AssertPresence=function(e,t){C.Exec("AMT_AgentPresenceWatchdogVA","AssertPresence",{SequenceNumber:e},t)},C.AMT_AgentPresenceWatchdogVA_AssertShutdown=function(e,t){C.Exec("AMT_AgentPresenceWatchdogVA","AssertShutdown",{SequenceNumber:e},t)},C.AMT_AgentPresenceWatchdogVA_AddAction=function(e,t,n,i,o,r){C.Exec("AMT_AgentPresenceWatchdogVA","AddAction",{OldState:e,NewState:t,EventOnTransition:n,ActionSd:i,ActionEac:o},r)},C.AMT_AgentPresenceWatchdogVA_DeleteAllActions=function(e,t){C.Exec("AMT_AgentPresenceWatchdogVA","DeleteAllActions",{_method_dummy:e},t)},C.AMT_AuditLog_ClearLog=function(e){C.Exec("AMT_AuditLog","ClearLog",{},e)},C.AMT_AuditLog_RequestStateChange=function(e,t,n){C.Exec("AMT_AuditLog","RequestStateChange",{RequestedState:e,TimeoutPeriod:t},n)},C.AMT_AuditLog_ReadRecords=function(e,t,n){C.Exec("AMT_AuditLog","ReadRecords",{StartIndex:e},t,n)},C.AMT_AuditLog_SetAuditLock=function(e,t,n,i){C.Exec("AMT_AuditLog","SetAuditLock",{LockTimeoutInSeconds:e,Flag:t,Handle:n},i)},C.AMT_AuditLog_ExportAuditLogSignature=function(e,t){C.Exec("AMT_AuditLog","ExportAuditLogSignature",{SigningMechanism:e},t)},C.AMT_AuditLog_SetSigningKeyMaterial=function(e,t,n,i,o){C.Exec("AMT_AuditLog","SetSigningKeyMaterial",{SigningMechanismType:e,SigningKey:t,LengthOfCertificates:n,Certificates:i},o)},C.AMT_AuditPolicyRule_SetAuditPolicy=function(e,t,n,i,o){C.Exec("AMT_AuditPolicyRule","SetAuditPolicy",{Enable:e,AuditedAppID:t,EventID:n,PolicyType:i},o)},C.AMT_AuditPolicyRule_SetAuditPolicyBulk=function(e,t,n,i,o){C.Exec("AMT_AuditPolicyRule","SetAuditPolicyBulk",{Enable:e,AuditedAppID:t,EventID:n,PolicyType:i},o)},C.AMT_AuthorizationService_AddUserAclEntryEx=function(e,t,n,i,o,r){C.Exec("AMT_AuthorizationService","AddUserAclEntryEx",{DigestUsername:e,DigestPassword:t,KerberosUserSid:n,AccessPermission:i,Realms:o},r)},C.AMT_AuthorizationService_EnumerateUserAclEntries=function(e,t){C.Exec("AMT_AuthorizationService","EnumerateUserAclEntries",{StartIndex:e},t)},C.AMT_AuthorizationService_GetUserAclEntryEx=function(e,t,n){C.Exec("AMT_AuthorizationService","GetUserAclEntryEx",{Handle:e},t,n)},C.AMT_AuthorizationService_UpdateUserAclEntryEx=function(e,t,n,i,o,r,c){C.Exec("AMT_AuthorizationService","UpdateUserAclEntryEx",{Handle:e,DigestUsername:t,DigestPassword:n,KerberosUserSid:i,AccessPermission:o,Realms:r},c)},C.AMT_AuthorizationService_RemoveUserAclEntry=function(e,t){C.Exec("AMT_AuthorizationService","RemoveUserAclEntry",{Handle:e},t)},C.AMT_AuthorizationService_SetAdminAclEntryEx=function(e,t,n){C.Exec("AMT_AuthorizationService","SetAdminAclEntryEx",{Username:e,DigestPassword:t},n)},C.AMT_AuthorizationService_GetAdminAclEntry=function(e){C.Exec("AMT_AuthorizationService","GetAdminAclEntry",{},e)},C.AMT_AuthorizationService_GetAdminAclEntryStatus=function(e){C.Exec("AMT_AuthorizationService","GetAdminAclEntryStatus",{},e)},C.AMT_AuthorizationService_GetAdminNetAclEntryStatus=function(e){C.Exec("AMT_AuthorizationService","GetAdminNetAclEntryStatus",{},e)},C.AMT_AuthorizationService_SetAclEnabledState=function(e,t,n,i){C.Exec("AMT_AuthorizationService","SetAclEnabledState",{Handle:e,Enabled:t},n,i)},C.AMT_AuthorizationService_GetAclEnabledState=function(e,t,n){C.Exec("AMT_AuthorizationService","GetAclEnabledState",{Handle:e},t,n)},C.AMT_EndpointAccessControlService_RequestStateChange=function(e,t,n){C.Exec("AMT_EndpointAccessControlService","RequestStateChange",{RequestedState:e,TimeoutPeriod:t},n)},C.AMT_EndpointAccessControlService_GetPosture=function(e,t){C.Exec("AMT_EndpointAccessControlService","GetPosture",{PostureType:e},t)},C.AMT_EndpointAccessControlService_GetPostureHash=function(e,t){C.Exec("AMT_EndpointAccessControlService","GetPostureHash",{PostureType:e},t)},C.AMT_EndpointAccessControlService_UpdatePostureState=function(e,t){C.Exec("AMT_EndpointAccessControlService","UpdatePostureState",{UpdateType:e},t)},C.AMT_EndpointAccessControlService_GetEacOptions=function(e){C.Exec("AMT_EndpointAccessControlService","GetEacOptions",{},e)},C.AMT_EndpointAccessControlService_SetEacOptions=function(e,t,n){C.Exec("AMT_EndpointAccessControlService","SetEacOptions",{EacVendors:e,PostureHashAlgorithm:t},n)},C.AMT_EnvironmentDetectionSettingData_SetSystemDefensePolicy=function(e,t){C.Exec("AMT_EnvironmentDetectionSettingData","SetSystemDefensePolicy",{Policy:e},t)},C.AMT_EnvironmentDetectionSettingData_EnableVpnRouting=function(e,t){C.Exec("AMT_EnvironmentDetectionSettingData","EnableVpnRouting",{Enable:e},t)},C.AMT_EthernetPortSettings_SetLinkPreference=function(e,t,n){C.Exec("AMT_EthernetPortSettings","SetLinkPreference",{LinkPreference:e,Timeout:t},n)},C.AMT_HeuristicPacketFilterStatistics_ResetSelectedStats=function(e,t){C.Exec("AMT_HeuristicPacketFilterStatistics","ResetSelectedStats",{SelectedStatistics:e},t)},C.AMT_KerberosSettingData_GetCredentialCacheState=function(e){C.Exec("AMT_KerberosSettingData","GetCredentialCacheState",{},e)},C.AMT_KerberosSettingData_SetCredentialCacheState=function(e,t){C.Exec("AMT_KerberosSettingData","SetCredentialCacheState",{Enable:e},t)},C.AMT_MessageLog_CancelIteration=function(e,t){C.Exec("AMT_MessageLog","CancelIteration",{IterationIdentifier:e},t)},C.AMT_MessageLog_RequestStateChange=function(e,t,n){C.Exec("AMT_MessageLog","RequestStateChange",{RequestedState:e,TimeoutPeriod:t},n)},C.AMT_MessageLog_ClearLog=function(e){C.Exec("AMT_MessageLog","ClearLog",{},e)},C.AMT_MessageLog_GetRecords=function(e,t,n,i){C.Exec("AMT_MessageLog","GetRecords",{IterationIdentifier:e,MaxReadRecords:t},n,i)},C.AMT_MessageLog_GetRecord=function(e,t,n){C.Exec("AMT_MessageLog","GetRecord",{IterationIdentifier:e,PositionToNext:t},n)},C.AMT_MessageLog_PositionAtRecord=function(e,t,n,i){C.Exec("AMT_MessageLog","PositionAtRecord",{IterationIdentifier:e,MoveAbsolute:t,RecordNumber:n},i)},C.AMT_MessageLog_PositionToFirstRecord=function(e,t){C.Exec("AMT_MessageLog","PositionToFirstRecord",{},e,t)},C.AMT_MessageLog_FreezeLog=function(e,t){C.Exec("AMT_MessageLog","FreezeLog",{Freeze:e},t)},C.AMT_PublicKeyManagementService_AddCRL=function(e,t,n){C.Exec("AMT_PublicKeyManagementService","AddCRL",{Url:e,SerialNumbers:t},n)},C.AMT_PublicKeyManagementService_ResetCRLList=function(e,t){C.Exec("AMT_PublicKeyManagementService","ResetCRLList",{_method_dummy:e},t)},C.AMT_PublicKeyManagementService_AddCertificate=function(e,t){C.Exec("AMT_PublicKeyManagementService","AddCertificate",{CertificateBlob:e},t)},C.AMT_PublicKeyManagementService_AddTrustedRootCertificate=function(e,t){C.Exec("AMT_PublicKeyManagementService","AddTrustedRootCertificate",{CertificateBlob:e},t)},C.AMT_PublicKeyManagementService_AddKey=function(e,t){C.Exec("AMT_PublicKeyManagementService","AddKey",{KeyBlob:e},t)},C.AMT_PublicKeyManagementService_GeneratePKCS10Request=function(e,t,n,i){C.Exec("AMT_PublicKeyManagementService","GeneratePKCS10Request",{KeyPair:e,DNName:t,Usage:n},i)},C.AMT_PublicKeyManagementService_GeneratePKCS10RequestEx=function(e,t,n,i){C.Exec("AMT_PublicKeyManagementService","GeneratePKCS10RequestEx",{KeyPair:e,SigningAlgorithm:t,NullSignedCertificateRequest:n},i)},C.AMT_PublicKeyManagementService_GenerateKeyPair=function(e,t,n){C.Exec("AMT_PublicKeyManagementService","GenerateKeyPair",{KeyAlgorithm:e,KeyLength:t},n)},C.AMT_RedirectionService_RequestStateChange=function(e,t){C.Exec("AMT_RedirectionService","RequestStateChange",{RequestedState:e},t)},C.AMT_RedirectionService_TerminateSession=function(e,t){C.Exec("AMT_RedirectionService","TerminateSession",{SessionType:e},t)},C.AMT_RemoteAccessService_AddMpServer=function(e,t,n,i,o,r,c,a,s){C.Exec("AMT_RemoteAccessService","AddMpServer",{AccessInfo:e,InfoFormat:t,Port:n,AuthMethod:i,Certificate:o,Username:r,Password:c,CN:a},s)},C.AMT_RemoteAccessService_AddRemoteAccessPolicyRule=function(e,t,n,i,o){C.Exec("AMT_RemoteAccessService","AddRemoteAccessPolicyRule",{Trigger:e,TunnelLifeTime:t,ExtendedData:n,MpServer:i},o)},C.AMT_RemoteAccessService_CloseRemoteAccessConnection=function(e,t){C.Exec("AMT_RemoteAccessService","CloseRemoteAccessConnection",{_method_dummy:e},t)},C.AMT_SetupAndConfigurationService_CommitChanges=function(e,t){C.Exec("AMT_SetupAndConfigurationService","CommitChanges",{_method_dummy:e},t)},C.AMT_SetupAndConfigurationService_Unprovision=function(e,t){C.Exec("AMT_SetupAndConfigurationService","Unprovision",{ProvisioningMode:e},t)},C.AMT_SetupAndConfigurationService_PartialUnprovision=function(e,t){C.Exec("AMT_SetupAndConfigurationService","PartialUnprovision",{_method_dummy:e},t)},C.AMT_SetupAndConfigurationService_ResetFlashWearOutProtection=function(e,t){C.Exec("AMT_SetupAndConfigurationService","ResetFlashWearOutProtection",{_method_dummy:e},t)},C.AMT_SetupAndConfigurationService_ExtendProvisioningPeriod=function(e,t){C.Exec("AMT_SetupAndConfigurationService","ExtendProvisioningPeriod",{Duration:e},t)},C.AMT_SetupAndConfigurationService_SetMEBxPassword=function(e,t){C.Exec("AMT_SetupAndConfigurationService","SetMEBxPassword",{Password:e},t)},C.AMT_SetupAndConfigurationService_SetTLSPSK=function(e,t,n){C.Exec("AMT_SetupAndConfigurationService","SetTLSPSK",{PID:e,PPS:t},n)},C.AMT_SetupAndConfigurationService_GetProvisioningAuditRecord=function(e){C.Exec("AMT_SetupAndConfigurationService","GetProvisioningAuditRecord",{},e)},C.AMT_SetupAndConfigurationService_GetUuid=function(e){C.Exec("AMT_SetupAndConfigurationService","GetUuid",{},e)},C.AMT_SetupAndConfigurationService_GetUnprovisionBlockingComponents=function(e){C.Exec("AMT_SetupAndConfigurationService","GetUnprovisionBlockingComponents",{},e)},C.AMT_SetupAndConfigurationService_GetProvisioningAuditRecordV2=function(e){C.Exec("AMT_SetupAndConfigurationService","GetProvisioningAuditRecordV2",{},e)},C.AMT_SystemDefensePolicy_GetTimeout=function(e){C.Exec("AMT_SystemDefensePolicy","GetTimeout",{},e)},C.AMT_SystemDefensePolicy_SetTimeout=function(e,t){C.Exec("AMT_SystemDefensePolicy","SetTimeout",{Timeout:e},t)},C.AMT_SystemDefensePolicy_UpdateStatistics=function(e,t,n,i,o,r){C.Exec("AMT_SystemDefensePolicy","UpdateStatistics",{NetworkInterface:e,ResetOnRead:t},n,i,o,r)},C.AMT_SystemPowerScheme_SetPowerScheme=function(e,t,n){C.Exec("AMT_SystemPowerScheme","SetPowerScheme",{},e,n,0,{InstanceID:t})},C.AMT_TimeSynchronizationService_GetLowAccuracyTimeSynch=function(e,t){C.Exec("AMT_TimeSynchronizationService","GetLowAccuracyTimeSynch",{},e,t)},C.AMT_TimeSynchronizationService_SetHighAccuracyTimeSynch=function(e,t,n,i,o){C.Exec("AMT_TimeSynchronizationService","SetHighAccuracyTimeSynch",{Ta0:e,Tm1:t,Tm2:n},i,o)},C.AMT_UserInitiatedConnectionService_RequestStateChange=function(e,t,n){C.Exec("AMT_UserInitiatedConnectionService","RequestStateChange",{RequestedState:e,TimeoutPeriod:t},n)},C.AMT_WebUIService_RequestStateChange=function(e,t,n){C.Exec("AMT_WebUIService","RequestStateChange",{RequestedState:e,TimeoutPeriod:t},n)},C.AMT_WiFiPortConfigurationService_AddWiFiSettings=function(e,t,n,i,o,r){C.ExecWithXml("AMT_WiFiPortConfigurationService","AddWiFiSettings",{WiFiEndpoint:e,WiFiEndpointSettingsInput:t,IEEE8021xSettingsInput:n,ClientCredential:i,CACredential:o},r)},C.AMT_WiFiPortConfigurationService_UpdateWiFiSettings=function(e,t,n,i,o,r){C.ExecWithXml("AMT_WiFiPortConfigurationService","UpdateWiFiSettings",{WiFiEndpointSettings:e,WiFiEndpointSettingsInput:t,IEEE8021xSettingsInput:n,ClientCredential:i,CACredential:o},r)},C.AMT_WiFiPortConfigurationService_DeleteAllITProfiles=function(e,t){C.Exec("AMT_WiFiPortConfigurationService","DeleteAllITProfiles",{_method_dummy:e},t)},C.AMT_WiFiPortConfigurationService_DeleteAllUserProfiles=function(e,t){C.Exec("AMT_WiFiPortConfigurationService","DeleteAllUserProfiles",{_method_dummy:e},t)},C.CIM_Account_RequestStateChange=function(e,t,n){C.Exec("CIM_Account","RequestStateChange",{RequestedState:e,TimeoutPeriod:t},n)},C.CIM_AccountManagementService_CreateAccount=function(e,t,n){C.Exec("CIM_AccountManagementService","CreateAccount",{System:e,AccountTemplate:t},n)},C.CIM_BootConfigSetting_ChangeBootOrder=function(e,t){C.Exec("CIM_BootConfigSetting","ChangeBootOrder",{Source:e},t)},C.CIM_BootService_SetBootConfigRole=function(e,t,n){C.Exec("CIM_BootService","SetBootConfigRole",{BootConfigSetting:e,Role:t},n,0,1)},C.CIM_Card_ConnectorPower=function(e,t,n){C.Exec("CIM_Card","ConnectorPower",{Connector:e,PoweredOn:t},n)},C.CIM_Card_IsCompatible=function(e,t){C.Exec("CIM_Card","IsCompatible",{ElementToCheck:e},t)},C.CIM_Chassis_IsCompatible=function(e,t){C.Exec("CIM_Chassis","IsCompatible",{ElementToCheck:e},t)},C.CIM_Fan_SetSpeed=function(e,t){C.Exec("CIM_Fan","SetSpeed",{DesiredSpeed:e},t)},C.CIM_KVMRedirectionSAP_RequestStateChange=function(e,t,n){C.Exec("CIM_KVMRedirectionSAP","RequestStateChange",{RequestedState:e},n)},C.CIM_MediaAccessDevice_LockMedia=function(e,t){C.Exec("CIM_MediaAccessDevice","LockMedia",{Lock:e},t)},C.CIM_MediaAccessDevice_SetPowerState=function(e,t,n){C.Exec("CIM_MediaAccessDevice","SetPowerState",{PowerState:e,Time:t},n)},C.CIM_MediaAccessDevice_Reset=function(e){C.Exec("CIM_MediaAccessDevice","Reset",{},e)},C.CIM_MediaAccessDevice_EnableDevice=function(e,t){C.Exec("CIM_MediaAccessDevice","EnableDevice",{Enabled:e},t)},C.CIM_MediaAccessDevice_OnlineDevice=function(e,t){C.Exec("CIM_MediaAccessDevice","OnlineDevice",{Online:e},t)},C.CIM_MediaAccessDevice_QuiesceDevice=function(e,t){C.Exec("CIM_MediaAccessDevice","QuiesceDevice",{Quiesce:e},t)},C.CIM_MediaAccessDevice_SaveProperties=function(e){C.Exec("CIM_MediaAccessDevice","SaveProperties",{},e)},C.CIM_MediaAccessDevice_RestoreProperties=function(e){C.Exec("CIM_MediaAccessDevice","RestoreProperties",{},e)},C.CIM_MediaAccessDevice_RequestStateChange=function(e,t,n){C.Exec("CIM_MediaAccessDevice","RequestStateChange",{RequestedState:e,TimeoutPeriod:t},n)},C.CIM_PhysicalFrame_IsCompatible=function(e,t){C.Exec("CIM_PhysicalFrame","IsCompatible",{ElementToCheck:e},t)},C.CIM_PhysicalPackage_IsCompatible=function(e,t){C.Exec("CIM_PhysicalPackage","IsCompatible",{ElementToCheck:e},t)},C.CIM_PowerManagementService_RequestPowerStateChange=function(e,t,n,i,o){C.Exec("CIM_PowerManagementService","RequestPowerStateChange",{PowerState:e,ManagedElement:t,Time:n,TimeoutPeriod:i},o,0,1)},C.CIM_PowerSupply_SetPowerState=function(e,t,n){C.Exec("CIM_PowerSupply","SetPowerState",{PowerState:e,Time:t},n)},C.CIM_PowerSupply_Reset=function(e){C.Exec("CIM_PowerSupply","Reset",{},e)},C.CIM_PowerSupply_EnableDevice=function(e,t){C.Exec("CIM_PowerSupply","EnableDevice",{Enabled:e},t)},C.CIM_PowerSupply_OnlineDevice=function(e,t){C.Exec("CIM_PowerSupply","OnlineDevice",{Online:e},t)},C.CIM_PowerSupply_QuiesceDevice=function(e,t){C.Exec("CIM_PowerSupply","QuiesceDevice",{Quiesce:e},t)},C.CIM_PowerSupply_SaveProperties=function(e){C.Exec("CIM_PowerSupply","SaveProperties",{},e)},C.CIM_PowerSupply_RestoreProperties=function(e){C.Exec("CIM_PowerSupply","RestoreProperties",{},e)},C.CIM_PowerSupply_RequestStateChange=function(e,t,n){C.Exec("CIM_PowerSupply","RequestStateChange",{RequestedState:e,TimeoutPeriod:t},n)},C.CIM_Processor_SetPowerState=function(e,t,n){C.Exec("CIM_Processor","SetPowerState",{PowerState:e,Time:t},n)},C.CIM_Processor_Reset=function(e){C.Exec("CIM_Processor","Reset",{},e)},C.CIM_Processor_EnableDevice=function(e,t){C.Exec("CIM_Processor","EnableDevice",{Enabled:e},t)},C.CIM_Processor_OnlineDevice=function(e,t){C.Exec("CIM_Processor","OnlineDevice",{Online:e},t)},C.CIM_Processor_QuiesceDevice=function(e,t){C.Exec("CIM_Processor","QuiesceDevice",{Quiesce:e},t)},C.CIM_Processor_SaveProperties=function(e){C.Exec("CIM_Processor","SaveProperties",{},e)},C.CIM_Processor_RestoreProperties=function(e){C.Exec("CIM_Processor","RestoreProperties",{},e)},C.CIM_Processor_RequestStateChange=function(e,t,n){C.Exec("CIM_Processor","RequestStateChange",{RequestedState:e,TimeoutPeriod:t},n)},C.CIM_RecordLog_ClearLog=function(e){C.Exec("CIM_RecordLog","ClearLog",{},e)},C.CIM_RecordLog_RequestStateChange=function(e,t,n){C.Exec("CIM_RecordLog","RequestStateChange",{RequestedState:e,TimeoutPeriod:t},n)},C.CIM_RedirectionService_RequestStateChange=function(e,t,n){C.Exec("CIM_RedirectionService","RequestStateChange",{RequestedState:e,TimeoutPeriod:t},n)},C.CIM_Sensor_SetPowerState=function(e,t,n){C.Exec("CIM_Sensor","SetPowerState",{PowerState:e,Time:t},n)},C.CIM_Sensor_Reset=function(e){C.Exec("CIM_Sensor","Reset",{},e)},C.CIM_Sensor_EnableDevice=function(e,t){C.Exec("CIM_Sensor","EnableDevice",{Enabled:e},t)},C.CIM_Sensor_OnlineDevice=function(e,t){C.Exec("CIM_Sensor","OnlineDevice",{Online:e},t)},C.CIM_Sensor_QuiesceDevice=function(e,t){C.Exec("CIM_Sensor","QuiesceDevice",{Quiesce:e},t)},C.CIM_Sensor_SaveProperties=function(e){C.Exec("CIM_Sensor","SaveProperties",{},e)},C.CIM_Sensor_RestoreProperties=function(e){C.Exec("CIM_Sensor","RestoreProperties",{},e)},C.CIM_Sensor_RequestStateChange=function(e,t,n){C.Exec("CIM_Sensor","RequestStateChange",{RequestedState:e,TimeoutPeriod:t},n)},C.CIM_StatisticalData_ResetSelectedStats=function(e,t){C.Exec("CIM_StatisticalData","ResetSelectedStats",{SelectedStatistics:e},t)},C.CIM_Watchdog_KeepAlive=function(e){C.Exec("CIM_Watchdog","KeepAlive",{},e)},C.CIM_Watchdog_SetPowerState=function(e,t,n){C.Exec("CIM_Watchdog","SetPowerState",{PowerState:e,Time:t},n)},C.CIM_Watchdog_Reset=function(e){C.Exec("CIM_Watchdog","Reset",{},e)},C.CIM_Watchdog_EnableDevice=function(e,t){C.Exec("CIM_Watchdog","EnableDevice",{Enabled:e},t)},C.CIM_Watchdog_OnlineDevice=function(e,t){C.Exec("CIM_Watchdog","OnlineDevice",{Online:e},t)},C.CIM_Watchdog_QuiesceDevice=function(e,t){C.Exec("CIM_Watchdog","QuiesceDevice",{Quiesce:e},t)},C.CIM_Watchdog_SaveProperties=function(e){C.Exec("CIM_Watchdog","SaveProperties",{},e)},C.CIM_Watchdog_RestoreProperties=function(e){C.Exec("CIM_Watchdog","RestoreProperties",{},e)},C.CIM_Watchdog_RequestStateChange=function(e,t,n){C.Exec("CIM_Watchdog","RequestStateChange",{RequestedState:e,TimeoutPeriod:t},n)},C.CIM_WiFiPort_SetPowerState=function(e,t,n){C.Exec("CIM_WiFiPort","SetPowerState",{PowerState:e,Time:t},n)},C.CIM_WiFiPort_Reset=function(e){C.Exec("CIM_WiFiPort","Reset",{},e)},C.CIM_WiFiPort_EnableDevice=function(e,t){C.Exec("CIM_WiFiPort","EnableDevice",{Enabled:e},t)},C.CIM_WiFiPort_OnlineDevice=function(e,t){C.Exec("CIM_WiFiPort","OnlineDevice",{Online:e},t)},C.CIM_WiFiPort_QuiesceDevice=function(e,t){C.Exec("CIM_WiFiPort","QuiesceDevice",{Quiesce:e},t)},C.CIM_WiFiPort_SaveProperties=function(e){C.Exec("CIM_WiFiPort","SaveProperties",{},e)},C.CIM_WiFiPort_RestoreProperties=function(e){C.Exec("CIM_WiFiPort","RestoreProperties",{},e)},C.CIM_WiFiPort_RequestStateChange=function(e,t,n){C.Exec("CIM_WiFiPort","RequestStateChange",{RequestedState:e,TimeoutPeriod:t},n)},C.IPS_HostBasedSetupService_Setup=function(e,t,n,i,o,r,c){C.Exec("IPS_HostBasedSetupService","Setup",{NetAdminPassEncryptionType:e,NetworkAdminPassword:t,McNonce:n,Certificate:i,SigningAlgorithm:o,DigitalSignature:r},c)},C.IPS_HostBasedSetupService_AddNextCertInChain=function(e,t,n,i){C.Exec("IPS_HostBasedSetupService","AddNextCertInChain",{NextCertificate:e,IsLeafCertificate:t,IsRootCertificate:n},i)},C.IPS_HostBasedSetupService_AdminSetup=function(e,t,n,i,o,r){C.Exec("IPS_HostBasedSetupService","AdminSetup",{NetAdminPassEncryptionType:e,NetworkAdminPassword:t,McNonce:n,SigningAlgorithm:i,DigitalSignature:o},r)},C.IPS_HostBasedSetupService_UpgradeClientToAdmin=function(e,t,n,i){C.Exec("IPS_HostBasedSetupService","UpgradeClientToAdmin",{McNonce:e,SigningAlgorithm:t,DigitalSignature:n},i)},C.IPS_HostBasedSetupService_DisableClientControlMode=function(e,t){C.Exec("IPS_HostBasedSetupService","DisableClientControlMode",{_method_dummy:e},t)},C.IPS_KVMRedirectionSettingData_TerminateSession=function(e){C.Exec("IPS_KVMRedirectionSettingData","TerminateSession",{},e)},C.IPS_OptInService_StartOptIn=function(e){C.Exec("IPS_OptInService","StartOptIn",{},e)},C.IPS_OptInService_CancelOptIn=function(e){C.Exec("IPS_OptInService","CancelOptIn",{},e)},C.IPS_OptInService_SendOptInCode=function(e,t){C.Exec("IPS_OptInService","SendOptInCode",{OptInCode:e},t)},C.IPS_OptInService_StartService=function(e){C.Exec("IPS_OptInService","StartService",{},e)},C.IPS_OptInService_StopService=function(e){C.Exec("IPS_OptInService","StopService",{},e)},C.IPS_OptInService_RequestStateChange=function(e,t,n){C.Exec("IPS_OptInService","RequestStateChange",{RequestedState:e,TimeoutPeriod:t},n)},C.IPS_ProvisioningRecordLog_RequestStateChange=function(e,t,n){C.Exec("IPS_ProvisioningRecordLog","RequestStateChange",{RequestedState:e,TimeoutPeriod:t},n)},C.IPS_ProvisioningRecordLog_ClearLog=function(e,t){C.Exec("IPS_ProvisioningRecordLog","ClearLog",{_method_dummy:e},t)},C.IPS_SecIOService_RequestStateChange=function(e,t,n){C.Exec("IPS_SecIOService","RequestStateChange",{RequestedState:e,TimeoutPeriod:t},n)},C.AmtStatusToStr=function(e){return C.AmtStatusCodes[e]||"UNKNOWN_ERROR"},C.AmtStatusCodes={0:"SUCCESS",1:"INTERNAL_ERROR",2:"NOT_READY",3:"INVALID_PT_MODE",4:"INVALID_MESSAGE_LENGTH",5:"TABLE_FINGERPRINT_NOT_AVAILABLE",6:"INTEGRITY_CHECK_FAILED",7:"UNSUPPORTED_ISVS_VERSION",8:"APPLICATION_NOT_REGISTERED",9:"INVALID_REGISTRATION_DATA",10:"APPLICATION_DOES_NOT_EXIST",11:"NOT_ENOUGH_STORAGE",12:"INVALID_NAME",13:"BLOCK_DOES_NOT_EXIST",14:"INVALID_BYTE_OFFSET",15:"INVALID_BYTE_COUNT",16:"NOT_PERMITTED",17:"NOT_OWNER",18:"BLOCK_LOCKED_BY_OTHER",19:"BLOCK_NOT_LOCKED",20:"INVALID_GROUP_PERMISSIONS",21:"GROUP_DOES_NOT_EXIST",22:"INVALID_MEMBER_COUNT",23:"MAX_LIMIT_REACHED",24:"INVALID_AUTH_TYPE",25:"AUTHENTICATION_FAILED",26:"INVALID_DHCP_MODE",27:"INVALID_IP_ADDRESS",28:"INVALID_DOMAIN_NAME",29:"UNSUPPORTED_VERSION",30:"REQUEST_UNEXPECTED",31:"INVALID_TABLE_TYPE",32:"INVALID_PROVISIONING_STATE",33:"UNSUPPORTED_OBJECT",34:"INVALID_TIME",35:"INVALID_INDEX",36:"INVALID_PARAMETER",37:"INVALID_NETMASK",38:"FLASH_WRITE_LIMIT_EXCEEDED",39:"INVALID_IMAGE_LENGTH",40:"INVALID_IMAGE_SIGNATURE",41:"PROPOSE_ANOTHER_VERSION",42:"INVALID_PID_FORMAT",43:"INVALID_PPS_FORMAT",44:"BIST_COMMAND_BLOCKED",45:"CONNECTION_FAILED",46:"CONNECTION_TOO_MANY",47:"RNG_GENERATION_IN_PROGRESS",48:"RNG_NOT_READY",49:"CERTIFICATE_NOT_READY",1024:"DISABLED_BY_POLICY",2048:"NETWORK_IF_ERROR_BASE",2049:"UNSUPPORTED_OEM_NUMBER",2050:"UNSUPPORTED_BOOT_OPTION",2051:"INVALID_COMMAND",2052:"INVALID_SPECIAL_COMMAND",2053:"INVALID_HANDLE",2054:"INVALID_PASSWORD",2055:"INVALID_REALM",2056:"STORAGE_ACL_ENTRY_IN_USE",2057:"DATA_MISSING",2058:"DUPLICATE",2059:"EVENTLOG_FROZEN",2060:"PKI_MISSING_KEYS",2061:"PKI_GENERATING_KEYS",2062:"INVALID_KEY",2063:"INVALID_CERT",2064:"CERT_KEY_NOT_MATCH",2065:"MAX_KERB_DOMAIN_REACHED",2066:"UNSUPPORTED",2067:"INVALID_PRIORITY",2068:"NOT_FOUND",2069:"INVALID_CREDENTIALS",2070:"INVALID_PASSPHRASE",2072:"NO_ASSOCIATION",2075:"AUDIT_FAIL",2076:"BLOCKING_COMPONENT",2081:"USER_CONSENT_REQUIRED",4096:"APP_INTERNAL_ERROR",4097:"NOT_INITIALIZED",4098:"LIB_VERSION_UNSUPPORTED",4099:"INVALID_PARAM",4100:"RESOURCES",4101:"HARDWARE_ACCESS_ERROR",4102:"REQUESTOR_NOT_REGISTERED",4103:"NETWORK_ERROR",4104:"PARAM_BUFFER_TOO_SHORT",4105:"COM_NOT_INITIALIZED_IN_THREAD",4106:"URL_REQUIRED"},C.GetMessageLog=function(e,t){C.AMT_MessageLog_PositionToFirstRecord(i,[e,t,[]])};"Platform firmware (e.g. BIOS)|SMI handler|ISV system management software|Alert ASIC|IPMI|BIOS vendor|System board set vendor|System integrator|Third party add-in|OSV|NIC|System management card".split("|");var g="Unspecified.|No system memory is physically installed in the system.|No usable system memory, all installed memory has experienced an unrecoverable failure.|Unrecoverable hard-disk/ATAPI/IDE device failure.|Unrecoverable system-board failure.|Unrecoverable diskette subsystem failure.|Unrecoverable hard-disk controller failure.|Unrecoverable PS/2 or USB keyboard failure.|Removable boot media not found.|Unrecoverable video controller failure.|No video device detected.|Firmware (BIOS) ROM corruption detected.|CPU voltage mismatch (processors that share same supply have mismatched voltage requirements)|CPU speed matching failure".split("|"),M="Unspecified.|Memory initialization.|Starting hard-disk initialization and test|Secondary processor(s) initialization|User authentication|User-initiated system setup|USB resource configuration|PCI resource configuration|Option ROM initialization|Video initialization|Cache initialization|SM Bus initialization|Keyboard controller initialization|Embedded controller/management controller initialization|Docking station attachment|Enabling docking station|Docking station ejection|Disabling docking station|Calling operating system wake-up vector|Starting operating system boot process|Baseboard or motherboard initialization|reserved|Floppy initialization|Keyboard test|Pointing device test|Primary processor initialization".split("|"),I="Unspecified|Other|Unknown|Processor|Disk|Peripheral|System management module|System board|Memory module|Processor module|Power supply|Add in card|Front panel board|Back panel board|Power system board|Drive backplane|System internal expansion board|Other system board|Processor board|Power unit|Power module|Power management board|Chassis back panel board|System chassis|Sub chassis|Other chassis board|Disk drive bay|Peripheral bay|Device bay|Fan cooling|Cooling unit|Cable interconnect|Memory device|System management software|BIOS|Intel(r) ME|System bus|Group|Intel(r) ME|External environment|Battery|Processing blade|Connectivity switch|Processor/memory module|I/O module|Processor I/O module|Management controller firmware|IPMI channel|PCI bus|PCI express bus|SCSI bus|SATA/SAS bus|Processor front side bus".split("|");C.RealmNames="||Redirection|PT Administration|Hardware Asset|Remote Control|Storage|Event Manager|Storage Admin|Agent Presence Local|Agent Presence Remote|Circuit Breaker|Network Time|General Information|Firmware Update|EIT|LocalUN|Endpoint Access Control|Endpoint Access Control Admin|Event Log Reader|Audit Log|ACL Realm|||Local System".split("|"),C.WatchdogCurrentStates={1:"Not Started",2:"Stopped",4:"Running",8:"Expired",16:"Suspended"};var l={16:"Security Admin",17:"RCO",18:"Redirection Manager",19:"Firmware Update Manager",20:"Security Audit Log",21:"Network Time",22:"Network Administration",23:"Storage Administration",24:"Event Manager",25:"Circuit Breaker Manager",26:"Agent Presence Manager",27:"Wireless Configuration",28:"EAC",29:"KVM",30:"User Opt-In Events",32:"Screen Blanking",33:"Watchdog Events",1600:"Provisioning Started",1601:"Provisioning Completed",1602:"ACL Entry Added",1603:"ACL Entry Modified",1604:"ACL Entry Removed",1605:"ACL Access with Invalid Credentials",1606:"ACL Entry State",1607:"TLS State Changed",1608:"TLS Server Certificate Set",1609:"TLS Server Certificate Remove",1610:"TLS Trusted Root Certificate Added",1611:"TLS Trusted Root Certificate Removed",1612:"TLS Preshared Key Set",1613:"Kerberos Settings Modified",1614:"Kerberos Main Key Modified",1615:"Flash Wear out Counters Reset",1616:"Power Package Modified",1617:"Set Realm Authentication Mode",1618:"Upgrade Client to Admin Control Mode",1619:"Unprovisioning Started",1700:"Performed Power Up",1701:"Performed Power Down",1702:"Performed Power Cycle",1703:"Performed Reset",1704:"Set Boot Options",1800:"IDER Session Opened",1801:"IDER Session Closed",1802:"IDER Enabled",1803:"IDER Disabled",1804:"SoL Session Opened",1805:"SoL Session Closed",1806:"SoL Enabled",1807:"SoL Disabled",1808:"KVM Session Started",1809:"KVM Session Ended",1810:"KVM Enabled",1811:"KVM Disabled",1812:"VNC Password Failed 3 Times",1900:"Firmware Updated",1901:"Firmware Update Failed",2e3:"Security Audit Log Cleared",2001:"Security Audit Policy Modified",2002:"Security Audit Log Disabled",2003:"Security Audit Log Enabled",2004:"Security Audit Log Exported",2005:"Security Audit Log Recovered",2100:"Intel® ME Time Set",2200:"TCPIP Parameters Set",2201:"Host Name Set",2202:"Domain Name Set",2203:"VLAN Parameters Set",2204:"Link Policy Set",2205:"IPv6 Parameters Set",2300:"Global Storage Attributes Set",2301:"Storage EACL Modified",2302:"Storage FPACL Modified",2303:"Storage Write Operation",2400:"Alert Subscribed",2401:"Alert Unsubscribed",2402:"Event Log Cleared",2403:"Event Log Frozen",2500:"CB Filter Added",2501:"CB Filter Removed",2502:"CB Policy Added",2503:"CB Policy Removed",2504:"CB Default Policy Set",2505:"CB Heuristics Option Set",2506:"CB Heuristics State Cleared",2600:"Agent Watchdog Added",2601:"Agent Watchdog Removed",2602:"Agent Watchdog Action Set",2700:"Wireless Profile Added",2701:"Wireless Profile Removed",2702:"Wireless Profile Updated",2800:"EAC Posture Signer SET",2801:"EAC Enabled",2802:"EAC Disabled",2803:"EAC Posture State",2804:"EAC Set Options",2900:"KVM Opt-in Enabled",2901:"KVM Opt-in Disabled",2902:"KVM Password Changed",2903:"KVM Consent Succeeded",2904:"KVM Consent Failed",3e3:"Opt-In Policy Change",3001:"Send Consent Code Event",3002:"Start Opt-In Blocked Event"};function E(e,t,n,i,o){if(200==i){var r,c,a,s,u,d=o[1],S=new Date;if(0Local",r=5),3==u.InitiatorType&&(u.Initiator="KVM Default Port",r=5),A=ReadInt(a,r),u.Time=new Date(1e3*(A+60*S.getTimezoneOffset())),r+=4,u.MCLocationType=a.charCodeAt(r++);var A=a.charCodeAt(r++);u.NetAddress=a.substring(r,r+A),r+=A;A=a.charCodeAt(r++);u.Ex=a.substring(r,r+A),u.ExStr=C.GetAuditLogExtendedDataStr(100*u.AuditAppID+u.EventID,u.Ex),d.push(u)}n.Body.TotalRecordCount>d.length?C.AMT_AuditLog_ReadRecords(d.length+1,E,[o[0],d]):o[0](C,d,i)}else o[0](C,[],i)}return C.GetAuditLogExtendedDataStr=function(e,t){if((1602==e||1604==e)&&0==t.charCodeAt(0))return t.substring(2,2+t.charCodeAt(1));if(1603==e)return 0==t.charCodeAt(1)?t.substring(3):null;if(1605==e)return["Invalid ME access","Invalid MEBx access"][t.charCodeAt(0)];if(1606==e){var n=["Disabled","Enabled"][t.charCodeAt(0)];return 0==t.charCodeAt(1)&&(n+=", "+t.substring(3)),n}if(1607==e)return"Remote "+["NoAuth","ServerAuth","MutualAuth"][t.charCodeAt(0)]+", Local "+["NoAuth","ServerAuth","MutualAuth"][t.charCodeAt(1)];if(1617==e)return C.RealmNames[ReadInt(t,0)]+", "+["NoAuth","Auth","Disabled"][t.charCodeAt(4)];if(1619==e)return["BIOS","MEBx","Local MEI","Local WSMAN","Remote WSAMN"][t.charCodeAt(0)];if(1900==e)return"From "+ReadShort(t,0)+"."+ReadShort(t,2)+"."+ReadShort(t,4)+"."+ReadShort(t,6)+" to "+ReadShort(t,8)+"."+ReadShort(t,10)+"."+ReadShort(t,12)+"."+ReadShort(t,14);if(2100!=e)return 3e3==e?"From "+["None","KVM","All"][t.charCodeAt(0)]+" to "+["None","KVM","All"][t.charCodeAt(1)]:3001==e?["Success","Failed 3 times"][t.charCodeAt(0)]:null;e=new Date;return e.setTime(1e3*ReadInt(t,0)+6e4*(new Date).getTimezoneOffset()),e.toLocaleString()},C.GetAuditLog=function(e){C.AMT_AuditLog_ReadRecords(1,E,[e,[]])},C}function hex_md5(e){return null==e&&(e=""),forge.md.md5.create().update(e).digest().toHex()}for(var md5_k=[],i=0;i<64;)md5_k[i]=0|4294967296*Math.abs(Math.sin(++i));function hex_md5(e){null==e&&(e="");for(var t,n,i,o,r=[],c=unescape(encodeURI(e)),a=c.length,s=[1732584193,-271733879,-1732584194,271733878],u=0;u<=a;)r[u>>2]|=(c.charCodeAt(u)||128)<>6)+14]=8*a,u=0;u>4]+(md5_k[o]+(0|r[[o,5*o+1,3*o+5,7*o][a]%16+u])))<<(a=[7,12,17,22,5,9,14,20,4,11,16,23,6,10,15,21][4*a+o++%4])|i>>>32-a),t,n];for(o=4;o;)s[--o]=s[o]+a[o]}for(e="";o<32;)e+=(s[o>>3]>>4*(1^7&o++)&15).toString(16);return e}function rstr_md5(e){return hex2rstr(hex_md5(e))}function execArgumentsToXml(e){if(null==e)return null;var t,n="";for(t in e){var i=e[t];i&&("reference"===i.__parameterType?n+=referenceToXml(t,i):n+=instanceToXml(t,i))}return n}function instanceToXml(e,t){if(null==t)return null;var n,i=!!t.__namespace,o=i?"";for(n in t)t.hasOwnProperty(n)&&0!==n.indexOf("__")&&("function"==typeof t[n]||Array.isArray(t[n])||("object"==typeof t[n]?console.error("only convert one level down..."):c+=o+n+">"+t[n].toString()+r+n+">"));return c+=""}function referenceToXml(e,t){if(null==t)return null;var n,i="/wsman"+t.__resourceUri+"";for(n in t)t.hasOwnProperty(n)&&0!==n.indexOf("__")&&("function"==typeof t[n]||"object"==typeof t[n]||Array.isArray(t[n])||(i+=''+t[n].toString()+""));return i+=""}function GetSidString(e){for(var t="S-"+e.charCodeAt(0)+"-"+e.charCodeAt(7),n=2;n>8&248)+","+(c>>3&252)+","+((31&c)<<3))+")";var p=k(e);n=K(0,n),e=p,S.canvas.fillRect(e,n,o,r)}else if(1>d&m],u++)}else{for(d=0;d>d&m],u++)}w(S.spare,e,n)}else if(128==v){if(2==S.bpp)for(;u>8&248,S.spare.data[o+1]=a>>3&252,S.spare.data[o+2]=(31&a)<<3}function C(a,t,e){for(var n=t<<2,o=224&a,r=(28&a)<<3,s=L((3&a)<<6);0<=--e;)S.spare.data[n]=o,S.spare.data[n+1]=r,S.spare.data[n+2]=s,n+=4}function D(a,t,e){for(var n=t<<2,o=a>>8&248,r=a>>3&252,s=(31&a)<<3;0<=--e;)S.spare.data[n]=o,S.spare.data[n+1]=r,S.spare.data[n+2]=s,n+=4}function k(a){return 0==S.rotation||1==S.rotation?a:2==S.rotation?a-S.canvas.canvas.width:3==S.rotation?a-S.canvas.canvas.height:0}function K(a,t){return 0==S.rotation?t:1==S.rotation?t-S.canvas.canvas.width:2==S.rotation?t-S.canvas.canvas.height:3==S.rotation?t:0}function L(a){return 127>8&248)+","+(c>>3&252)+","+((31&c)<<3))+")";var p=k(e);n=K(0,n),S.canvas.fillRect(e=p,n,o,r)}else if(1>d&m],u++)}else{for(d=0;d>d&m],u++)}w(S.spare,e,n)}else if(128==v){if(2==S.bpp)for(;u>8&248,S.spare.data[o+1]=a>>3&252,S.spare.data[o+2]=(31&a)<<3}function C(a,t,e){for(var n=t<<2,o=224&a,r=(28&a)<<3,s=L((3&a)<<6);0<=--e;)S.spare.data[n]=o,S.spare.data[n+1]=r,S.spare.data[n+2]=s,n+=4}function D(a,t,e){for(var n=t<<2,o=a>>8&248,r=a>>3&252,s=(31&a)<<3;0<=--e;)S.spare.data[n]=o,S.spare.data[n+1]=r,S.spare.data[n+2]=s,n+=4}function k(a){return 0==S.rotation||1==S.rotation?a:2==S.rotation?a-S.canvas.canvas.width:3==S.rotation?a-S.canvas.canvas.height:0}function K(a,t){return 0==S.rotation?t:1==S.rotation?t-S.canvas.canvas.width:2==S.rotation?t-S.canvas.canvas.height:3==S.rotation?t:0}function L(a){return 127":p=!1,o=0;break;case"7":a=S,h=T,o=0;break;case"8":S=a,T=h,o=0;break;case"M":for(var t=m[1];t>=m[0]+1;t--)for(var i=0;im[0]-1;t--)for(i=0;il.height&&(T=l.height));break;case"C":1==t&&(0==r[0]?S++:S+=r[0],S>l.width&&(S=l.width));break;case"D":1==t&&(0==r[0]?S--:S-=r[0],S<0&&(S=0));break;case"d":1==t&&(T=(T=r[0]-1)>l.height?l.height:T)<0&&(T=0);break;case"G":1==t&&(S=(S=r[0]-1)<0?0:S)>l.width-1&&(S=l.width-1);break;case"P":var h=1;for(1==t&&(h=r[0]),n=S;nl.height&&(r[0]=l.height),r[1]>l.width&&(r[1]=l.width),T=r[0]-1,r[1]-1):T=0;break;case"m":for(n=0;nl.height-1&&(m[0]=l.height-1),m[1]<0&&(m[1]=0),m[1]>l.height-1&&(m[1]=l.height-1),m[0]>m[1]&&(m[0]=m[1]);break;case"S":h=1;1==t&&(h=r[0]);for(var c=m[0];c<=m[1]-h;c++)for(var f=0;fm[0]+h;c--)for(f=0;fm[0];c--)for(f=0;f=l.width&&(s=0,d++);break;default:console.log("Unknown terminal code",e,r,i)}}}(e,c,s+1,d),o=0;break;case 4:case 5:o=0;break;case 6:var n=e.charCodeAt(0);";"==e?s++:7==n?(function(e){if(0==e.length)return;var r=parseInt(e[0]);(0==r||2==r)&&1l.width&&(S=l.width),T>l.height-1&&(T=l.height-1),e){case"\b":0m[1]&&(l.recordLineTobackBuffer(0),P(1),T=m[1]),l.lineFeed="\r",S=0;break;case"\r":S=0;break;default:S>=l.width&&(S=0,C&&T++,T>=l.height-1&&(P(1),T=l.height-1)),F(e),S++}}}function F(e){k[T][S]=e,b[T][S]=(g<<6)+(w<<12)+u}function E(){for(var e=(g<<6)+(w<<12)+u,r=S;r")},l.TermDrawLine=function(e,r,t){for(var i,n,a,h,o=1,c=0;c>h&63],1&i&&(e+=";text-decoration:underline"),e+=';">',t=""+(t=""),o=i),n=k[r][c]){case"&":e+="&";break;case"<":e+="<";break;case">":e+=">";break;case" ":e+=" ";break;default:e+=n}return[e,t]},l.TermDraw=function(){for(var e="",r="",t=0;t")}var n=(y=800"+n+r+e+"",l.DivElement.scrollTop=l.DivElement.scrollHeight,0==l.heightLock&&setTimeout(l.TermLockHeight,10)},l.TermLockHeight=function(){l.heightLock=l.DivElement.clientHeight,l.DivElement.style.height=l.DivElement.parentNode.style.height=l.heightLock+"px",l.DivElement.style["overflow-y"]="scroll"},l.TermInit=function(){l.TermResetScreen()},l.heightLock=0,l.DivElement.style.height="",null!=r&&null!=r.cols&&null!=r.rows?l.Init(r.cols,r.rows):l.Init(),l} \ No newline at end of file +var CreateAmtRemoteTerminal=function(e,r){var l={};l.DivId=e,l.DivElement=document.getElementById(e),l.protocol=1,r.protocol&&(l.protocol=r.protocol),l.terminalEmulation=1,l.fxEmulation=0,l.lineFeed="\r\n",l.debugmode=0,l.width=80,l.height=25,l.heightLock=0;var m,f=["000000","BB0000","00BB00","BBBB00","0000BB","BB00BB","00BBBB","BBBBBB","555555","FF5555","55FF55","FFFF55","5555FF","FF55FF","55FFFF","FFFFFF"],u=0,g=7,w=0,C=!0,S=0,T=0,a=0,h=0,o=0,c=[],s=0,d=0,b=[],k=[],n=!1,v=!0,p=!1,y=[],t="";l.title=null,l.onTitleChange=null,l.Start=function(){},l.Init=function(e,r){l.width=e||80,l.height=r||25;for(var t=0;t":p=!1,o=0;break;case"7":a=S,h=T,o=0;break;case"8":S=a,T=h,o=0;break;case"M":for(var t=m[1];t>=m[0]+1;t--)for(var i=0;im[0]-1;t--)for(i=0;il.height&&(T=l.height));break;case"C":1==t&&(0==r[0]?S++:S+=r[0],S>l.width&&(S=l.width));break;case"D":1==t&&(0==r[0]?S--:S-=r[0],S<0&&(S=0));break;case"d":1==t&&(T=(T=r[0]-1)>l.height?l.height:T)<0&&(T=0);break;case"G":1==t&&(S=(S=r[0]-1)<0?0:S)>l.width-1&&(S=l.width-1);break;case"P":var h=1;for(1==t&&(h=r[0]),n=S;nl.height&&(r[0]=l.height),r[1]>l.width&&(r[1]=l.width),T=r[0]-1,r[1]-1):T=0;break;case"m":for(n=0;nl.height-1&&(m[0]=l.height-1),m[1]<0&&(m[1]=0),m[1]>l.height-1&&(m[1]=l.height-1),m[0]>m[1]&&(m[0]=m[1]);break;case"S":h=1;1==t&&(h=r[0]);for(var c=m[0];c<=m[1]-h;c++)for(var f=0;fm[0]+h;c--)for(f=0;fm[0];c--)for(f=0;f=l.width&&(s=0,d++);break;default:console.log("Unknown terminal code",e,r,i)}}}(e,c,s+1,d),o=0;break;case 4:case 5:o=0;break;case 6:var n=e.charCodeAt(0);";"==e?s++:7==n?(function(e){var r;0==e.length||(0==(r=parseInt(e[0]))||2==r)&&1l.width&&(S=l.width),T>l.height-1&&(T=l.height-1),e){case"\b":0m[1]&&(l.recordLineTobackBuffer(0),P(1),T=m[1]),l.lineFeed="\r",S=0;break;case"\r":S=0;break;default:S>=l.width&&(S=0,C&&T++,T>=l.height-1&&(P(1),T=l.height-1)),F(e),S++}}}function F(e){k[T][S]=e,b[T][S]=(g<<6)+(w<<12)+u}function E(){for(var e=(g<<6)+(w<<12)+u,r=S;r")},l.TermDrawLine=function(e,r,t){for(var i,n,a,h,o=1,c=0;c>h&63],1&i&&(e+=";text-decoration:underline"),e+=';">',t=""+(t=""),o=i),n=k[r][c]){case"&":e+="&";break;case"<":e+="<";break;case">":e+=">";break;case" ":e+=" ";break;default:e+=n}return[e,t]},l.TermDraw=function(){for(var e="",r="",t=0;t")}var n=(y=800"+n+r+e+"",l.DivElement.scrollTop=l.DivElement.scrollHeight,0==l.heightLock&&setTimeout(l.TermLockHeight,10)},l.TermLockHeight=function(){l.heightLock=l.DivElement.clientHeight,l.DivElement.style.height=l.DivElement.parentNode.style.height=l.heightLock+"px",l.DivElement.style["overflow-y"]="scroll"},l.TermInit=function(){l.TermResetScreen()},l.heightLock=0,l.DivElement.style.height="",null!=r&&null!=r.cols&&null!=r.rows?l.Init(r.cols,r.rows):l.Init(),l} \ No newline at end of file diff --git a/public/scripts/amt-wsman-0.2.0-min.js b/public/scripts/amt-wsman-0.2.0-min.js index 159fd00e..9dafbfdf 100644 --- a/public/scripts/amt-wsman-0.2.0-min.js +++ b/public/scripts/amt-wsman-0.2.0-min.js @@ -1 +1 @@ -var WsmanStackCreateService=function(e,s,r,a,o,t){var u={};function l(e){if(!e)return"";var s,r=" ";for(s in e)e.hasOwnProperty(s)&&0===s.indexOf("@")&&(r+=s.substring(1)+'="'+e[s]+'" ');return r}function p(e){if(!e)return"";if("string"==typeof e)return e;if(e.InstanceID)return''+e.InstanceID+"";var s,r="";for(s in e)if(e.hasOwnProperty(s)){if(r+='',e[s].ReferenceParameters){r+="",r+=""+e[s].Address+""+e[s].ReferenceParameters.ResourceURI+"";var a=e[s].ReferenceParameters.SelectorSet.Selector;if(Array.isArray(a))for(var o=0;o"+a[o].Value+"";else r+=""+a.Value+"";r+=""}else r+=e[s];r+=""}return r+=""}return u.NextMessageId=1,u.Address="/wsman",u.comm=CreateWsmanComm(e,s,r,a,o,t),u.PerformAjax=function(e,a,s,r,o){null==o&&(o=""),u.comm.PerformAjax('
"+e,function(e,s,r){200==s?(e=u.ParseWsman(e))&&null!=e?a(u,e.Header.ResourceURI,e,200,r):a(u,null,{Header:{HttpError:s}},601,r):a(u,null,{Header:{HttpError:s}},s,r)},s,r)},u.CancelAllQueries=function(e){u.comm.CancelAllQueries(e)},u.GetNameFromUrl=function(e){var s=e.lastIndexOf("/");return-1==s?e:e.substring(s+1)},u.ExecSubscribe=function(e,s,r,a,o,t,n,l,d,c){var m="",i="";null!=d&&null!=c&&(m="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-username-token-profile-1.0#UsernameToken"+d+''+c+"",i='');i="http://schemas.xmlsoap.org/ws/2004/08/eventing/Subscribe"+u.Address+""+e+""+u.NextMessageId+++"http://schemas.xmlsoap.org/ws/2004/08/addressing/role/anonymous"+p(n)+m+'
'+r+""+i+"PT0.000000S";u.PerformAjax(i+"
",a,o,t,'xmlns:e="http://schemas.xmlsoap.org/ws/2004/08/eventing" xmlns:t="http://schemas.xmlsoap.org/ws/2005/02/trust" xmlns:se="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd" xmlns:m="http://x.com"')},u.ExecUnSubscribe=function(e,s,r,a,o){o="http://schemas.xmlsoap.org/ws/2004/08/eventing/Unsubscribe"+u.Address+""+e+""+u.NextMessageId+++"http://schemas.xmlsoap.org/ws/2004/08/addressing/role/anonymous"+p(o)+"";u.PerformAjax(o+"",s,r,a,'xmlns:e="http://schemas.xmlsoap.org/ws/2004/08/eventing"')},u.ExecPut=function(e,s,r,a,o,t){s="http://schemas.xmlsoap.org/ws/2004/09/transfer/Put"+u.Address+""+e+""+u.NextMessageId+++"http://schemas.xmlsoap.org/ws/2004/08/addressing/role/anonymousPT60.000S"+p(t)+""+function(e,s){if(!e||null==s)return"";var r,a=u.GetNameFromUrl(e),o="';for(r in s)if(s.hasOwnProperty(r)&&0!==r.indexOf("__")&&0!==r.indexOf("@")&&void 0!==s[r]&&null!==s[r]&&"function"!=typeof s[r])if("object"==typeof s[r]&&s[r].ReferenceParameters){o+=""+s[r].Address+""+s[r].ReferenceParameters.ResourceURI+"";var t=s[r].ReferenceParameters.SelectorSet.Selector;if(Array.isArray(t))for(var n=0;n"+t[n].Value+"";else o+=""+t.Value+"";o+=""}else if(Array.isArray(s[r]))for(n=0;n"+s[r][n].toString()+"";else o+=""+s[r].toString()+"";return o+=""}(e,s);u.PerformAjax(s+"",r,a,o)},u.ExecCreate=function(e,s,r,a,o,t){var n,l=u.GetNameFromUrl(e),d="http://schemas.xmlsoap.org/ws/2004/09/transfer/Create"+u.Address+""+e+""+u.NextMessageId+++"http://schemas.xmlsoap.org/ws/2004/08/addressing/role/anonymousPT60S"+p(t)+"';for(n in s)d+=""+s[n]+"";u.PerformAjax(d+"",r,a,o)},u.ExecCreateXml=function(e,s,r,a,o){var t=u.GetNameFromUrl(e);u.PerformAjax("http://schemas.xmlsoap.org/ws/2004/09/transfer/Create"+u.Address+""+e+""+u.NextMessageId+++"http://schemas.xmlsoap.org/ws/2004/08/addressing/role/anonymousPT60.000S'+s+"",r,a,o)},u.ExecDelete=function(e,s,r,a,o){s="http://schemas.xmlsoap.org/ws/2004/09/transfer/Delete"+u.Address+""+e+""+u.NextMessageId+++"http://schemas.xmlsoap.org/ws/2004/08/addressing/role/anonymousPT60S"+p(s)+"";u.PerformAjax(s,r,a,o)},u.ExecGet=function(e,s,r,a){u.PerformAjax("http://schemas.xmlsoap.org/ws/2004/09/transfer/Get"+u.Address+""+e+""+u.NextMessageId+++"http://schemas.xmlsoap.org/ws/2004/08/addressing/role/anonymousPT60S",s,r,a)},u.ExecMethod=function(e,s,r,a,o,t,n){var l,d="";for(l in r)if(null!=r[l])if(Array.isArray(r[l]))for(var c in r[l])d+=""+r[l][c]+"";else d+=""+r[l]+"";u.ExecMethodXml(e,s,d,a,o,t,n)},u.ExecMethodXml=function(e,s,r,a,o,t,n){u.PerformAjax(e+"/"+s+""+u.Address+""+e+""+u.NextMessageId+++"http://schemas.xmlsoap.org/ws/2004/08/addressing/role/anonymousPT60S"+p(n)+"'+r+"",a,o,t)},u.ExecEnum=function(e,s,r,a){u.PerformAjax("http://schemas.xmlsoap.org/ws/2004/09/enumeration/Enumerate"+u.Address+""+e+""+u.NextMessageId+++'http://schemas.xmlsoap.org/ws/2004/08/addressing/role/anonymousPT60S',s,r,a)},u.ExecPull=function(e,s,r,a,o){u.PerformAjax("http://schemas.xmlsoap.org/ws/2004/09/enumeration/Pull"+u.Address+""+e+""+u.NextMessageId+++'http://schemas.xmlsoap.org/ws/2004/08/addressing/role/anonymousPT60S'+s+"99999999",r,a,o)},u.ParseWsman=function(s){try{s.childNodes||(s=function(e){{if(window.DOMParser)return(new DOMParser).parseFromString(e,"text/xml");var s=new ActiveXObject("Microsoft.XMLDOM");return s.async=!1,s.loadXML(e),s}}(s));var e={Header:{}},r=s.getElementsByTagName("Header")[0];if(!(r=r||s.getElementsByTagName("a:Header")[0]))return null;for(var a=0;a'+e.InstanceID+"";var s,r="";for(s in e)if(e.hasOwnProperty(s)){if(r+='',e[s].ReferenceParameters){r+="",r+=""+e[s].Address+""+e[s].ReferenceParameters.ResourceURI+"";var a=e[s].ReferenceParameters.SelectorSet.Selector;if(Array.isArray(a))for(var o=0;o"+a[o].Value+"";else r+=""+a.Value+"";r+=""}else r+=e[s];r+=""}return r+=""}return u.NextMessageId=1,u.Address="/wsman",u.comm=CreateWsmanComm(e,s,r,a,o,t),u.PerformAjax=function(e,a,s,r,o){u.comm.PerformAjax('
"+e,function(e,s,r){200==s?(e=u.ParseWsman(e))&&null!=e?a(u,e.Header.ResourceURI,e,200,r):a(u,null,{Header:{HttpError:s}},601,r):a(u,null,{Header:{HttpError:s}},s,r)},s,r)},u.CancelAllQueries=function(e){u.comm.CancelAllQueries(e)},u.GetNameFromUrl=function(e){var s=e.lastIndexOf("/");return-1==s?e:e.substring(s+1)},u.ExecSubscribe=function(e,s,r,a,o,t,n,l,d,c){var m="",i="";null!=d&&null!=c&&(m="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-username-token-profile-1.0#UsernameToken"+d+''+c+"",i='');i="http://schemas.xmlsoap.org/ws/2004/08/eventing/Subscribe"+u.Address+""+e+""+u.NextMessageId+++"http://schemas.xmlsoap.org/ws/2004/08/addressing/role/anonymous"+p(n)+m+'
'+r+""+i+"PT0.000000S";u.PerformAjax(i+"
",a,o,t,'xmlns:e="http://schemas.xmlsoap.org/ws/2004/08/eventing" xmlns:t="http://schemas.xmlsoap.org/ws/2005/02/trust" xmlns:se="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd" xmlns:m="http://x.com"')},u.ExecUnSubscribe=function(e,s,r,a,o){o="http://schemas.xmlsoap.org/ws/2004/08/eventing/Unsubscribe"+u.Address+""+e+""+u.NextMessageId+++"http://schemas.xmlsoap.org/ws/2004/08/addressing/role/anonymous"+p(o)+"";u.PerformAjax(o+"",s,r,a,'xmlns:e="http://schemas.xmlsoap.org/ws/2004/08/eventing"')},u.ExecPut=function(e,s,r,a,o,t){s="http://schemas.xmlsoap.org/ws/2004/09/transfer/Put"+u.Address+""+e+""+u.NextMessageId+++"http://schemas.xmlsoap.org/ws/2004/08/addressing/role/anonymousPT60.000S"+p(t)+""+function(e,s){if(!e||null==s)return"";var r,a=u.GetNameFromUrl(e),o="';for(r in s)if(s.hasOwnProperty(r)&&0!==r.indexOf("__")&&0!==r.indexOf("@")&&void 0!==s[r]&&null!==s[r]&&"function"!=typeof s[r])if("object"==typeof s[r]&&s[r].ReferenceParameters){o+=""+s[r].Address+""+s[r].ReferenceParameters.ResourceURI+"";var t=s[r].ReferenceParameters.SelectorSet.Selector;if(Array.isArray(t))for(var n=0;n"+t[n].Value+"";else o+=""+t.Value+"";o+=""}else if(Array.isArray(s[r]))for(n=0;n"+s[r][n].toString()+"";else o+=""+s[r].toString()+"";return o+=""}(e,s);u.PerformAjax(s+"",r,a,o)},u.ExecCreate=function(e,s,r,a,o,t){var n,l=u.GetNameFromUrl(e),d="http://schemas.xmlsoap.org/ws/2004/09/transfer/Create"+u.Address+""+e+""+u.NextMessageId+++"http://schemas.xmlsoap.org/ws/2004/08/addressing/role/anonymousPT60S"+p(t)+"';for(n in s)d+=""+s[n]+"";u.PerformAjax(d+"",r,a,o)},u.ExecCreateXml=function(e,s,r,a,o){var t=u.GetNameFromUrl(e);u.PerformAjax("http://schemas.xmlsoap.org/ws/2004/09/transfer/Create"+u.Address+""+e+""+u.NextMessageId+++"http://schemas.xmlsoap.org/ws/2004/08/addressing/role/anonymousPT60.000S'+s+"",r,a,o)},u.ExecDelete=function(e,s,r,a,o){s="http://schemas.xmlsoap.org/ws/2004/09/transfer/Delete"+u.Address+""+e+""+u.NextMessageId+++"http://schemas.xmlsoap.org/ws/2004/08/addressing/role/anonymousPT60S"+p(s)+"";u.PerformAjax(s,r,a,o)},u.ExecGet=function(e,s,r,a){u.PerformAjax("http://schemas.xmlsoap.org/ws/2004/09/transfer/Get"+u.Address+""+e+""+u.NextMessageId+++"http://schemas.xmlsoap.org/ws/2004/08/addressing/role/anonymousPT60S",s,r,a)},u.ExecMethod=function(e,s,r,a,o,t,n){var l,d="";for(l in r)if(null!=r[l])if(Array.isArray(r[l]))for(var c in r[l])d+=""+r[l][c]+"";else d+=""+r[l]+"";u.ExecMethodXml(e,s,d,a,o,t,n)},u.ExecMethodXml=function(e,s,r,a,o,t,n){u.PerformAjax(e+"/"+s+""+u.Address+""+e+""+u.NextMessageId+++"http://schemas.xmlsoap.org/ws/2004/08/addressing/role/anonymousPT60S"+p(n)+"'+r+"",a,o,t)},u.ExecEnum=function(e,s,r,a){u.PerformAjax("http://schemas.xmlsoap.org/ws/2004/09/enumeration/Enumerate"+u.Address+""+e+""+u.NextMessageId+++'http://schemas.xmlsoap.org/ws/2004/08/addressing/role/anonymousPT60S',s,r,a)},u.ExecPull=function(e,s,r,a,o){u.PerformAjax("http://schemas.xmlsoap.org/ws/2004/09/enumeration/Pull"+u.Address+""+e+""+u.NextMessageId+++'http://schemas.xmlsoap.org/ws/2004/08/addressing/role/anonymousPT60S'+s+"99999999",r,a,o)},u.ParseWsman=function(s){try{s.childNodes||(s=function(e){{if(window.DOMParser)return(new DOMParser).parseFromString(e,"text/xml");var s=new ActiveXObject("Microsoft.XMLDOM");return s.async=!1,s.loadXML(e),s}}(s));var e={Header:{}},r=s.getElementsByTagName("Header")[0];if(!(r=r||s.getElementsByTagName("a:Header")[0]))return null;for(var a=0;a>>0,i=0;iwt(t)?(r=t+1,a-wt(t)):(r=t,a);return{year:r,dayOfYear:a}}function Et(t,e,n){var i,a,r=Vt(t.year(),e,n),r=Math.floor((t.dayOfYear()-r-1)/7)+1;return r<1?i=r+jt(a=t.year()-1,e,n):r>jt(t.year(),e,n)?(i=r-jt(t.year(),e,n),a=t.year()+1):(a=t.year(),i=r),{week:i,year:a}}function jt(t,e,n){var i=Vt(t,e,n),n=Vt(t+1,e,n);return(wt(t)-i+n)/7}B("w",["ww",2],"wo","week"),B("W",["WW",2],"Wo","isoWeek"),A("week","w"),A("isoWeek","W"),Y("week",5),Y("isoWeek",5),lt("w",J),lt("ww",J,q),lt("W",J),lt("WW",J,q),ft(["w","ww","W","WW"],function(t,e,n,i){e[i.substr(0,1)]=k(t)});B("d",0,"do","day"),B("dd",0,0,function(t){return this.localeData().weekdaysMin(this,t)}),B("ddd",0,0,function(t){return this.localeData().weekdaysShort(this,t)}),B("dddd",0,0,function(t){return this.localeData().weekdays(this,t)}),B("e",0,0,"weekday"),B("E",0,0,"isoWeekday"),A("day","d"),A("weekday","e"),A("isoWeekday","E"),Y("day",11),Y("weekday",11),Y("isoWeekday",11),lt("d",J),lt("e",J),lt("E",J),lt("dd",function(t,e){return e.weekdaysMinRegex(t)}),lt("ddd",function(t,e){return e.weekdaysShortRegex(t)}),lt("dddd",function(t,e){return e.weekdaysRegex(t)}),ft(["dd","ddd","dddd"],function(t,e,n,i){i=n._locale.weekdaysParse(t,i,n._strict);null!=i?e.d=i:f(n).invalidWeekday=t}),ft(["d","e","E"],function(t,e,n,i){e[i]=k(t)});var Ut="Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_");var qt="Sun_Mon_Tue_Wed_Thu_Fri_Sat".split("_");var Gt="Su_Mo_Tu_We_Th_Fr_Sa".split("_");var Zt=ot;var Xt=ot;var Jt=ot;function Kt(){function t(t,e){return e.length-t.length}for(var e,n,i,a=[],r=[],o=[],s=[],l=0;l<7;l++)i=d([2e3,1]).day(l),e=this.weekdaysMin(i,""),n=this.weekdaysShort(i,""),i=this.weekdays(i,""),a.push(e),r.push(n),o.push(i),s.push(e),s.push(n),s.push(i);for(a.sort(t),r.sort(t),o.sort(t),s.sort(t),l=0;l<7;l++)r[l]=dt(r[l]),o[l]=dt(o[l]),s[l]=dt(s[l]);this._weekdaysRegex=new RegExp("^("+s.join("|")+")","i"),this._weekdaysShortRegex=this._weekdaysRegex,this._weekdaysMinRegex=this._weekdaysRegex,this._weekdaysStrictRegex=new RegExp("^("+o.join("|")+")","i"),this._weekdaysShortStrictRegex=new RegExp("^("+r.join("|")+")","i"),this._weekdaysMinStrictRegex=new RegExp("^("+a.join("|")+")","i")}function $t(){return this.hours()%12||12}function Qt(t,e){B(t,0,0,function(){return this.localeData().meridiem(this.hours(),this.minutes(),e)})}function te(t,e){return e._meridiemParse}B("H",["HH",2],0,"hour"),B("h",["hh",2],0,$t),B("k",["kk",2],0,function(){return this.hours()||24}),B("hmm",0,0,function(){return""+$t.apply(this)+W(this.minutes(),2)}),B("hmmss",0,0,function(){return""+$t.apply(this)+W(this.minutes(),2)+W(this.seconds(),2)}),B("Hmm",0,0,function(){return""+this.hours()+W(this.minutes(),2)}),B("Hmmss",0,0,function(){return""+this.hours()+W(this.minutes(),2)+W(this.seconds(),2)}),Qt("a",!0),Qt("A",!1),A("hour","h"),Y("hour",13),lt("a",te),lt("A",te),lt("H",J),lt("h",J),lt("k",J),lt("HH",J,q),lt("hh",J,q),lt("kk",J,q),lt("hmm",K),lt("hmmss",$),lt("Hmm",K),lt("Hmmss",$),ct(["H","HH"],vt),ct(["k","kk"],function(t,e,n){t=k(t);e[vt]=24===t?0:t}),ct(["a","A"],function(t,e,n){n._isPm=n._locale.isPM(t),n._meridiem=t}),ct(["h","hh"],function(t,e,n){e[vt]=k(t),f(n).bigHour=!0}),ct("hmm",function(t,e,n){var i=t.length-2;e[vt]=k(t.substr(0,i)),e[yt]=k(t.substr(i)),f(n).bigHour=!0}),ct("hmmss",function(t,e,n){var i=t.length-4,a=t.length-2;e[vt]=k(t.substr(0,i)),e[yt]=k(t.substr(i,2)),e[bt]=k(t.substr(a)),f(n).bigHour=!0}),ct("Hmm",function(t,e,n){var i=t.length-2;e[vt]=k(t.substr(0,i)),e[yt]=k(t.substr(i))}),ct("Hmmss",function(t,e,n){var i=t.length-4,a=t.length-2;e[vt]=k(t.substr(0,i)),e[yt]=k(t.substr(i,2)),e[bt]=k(t.substr(a))});var ee,ne=Ct("Hours",!0),ie={calendar:{sameDay:"[Today at] LT",nextDay:"[Tomorrow at] LT",nextWeek:"dddd [at] LT",lastDay:"[Yesterday at] LT",lastWeek:"[Last] dddd [at] LT",sameElse:"L"},longDateFormat:{LTS:"h:mm:ss A",LT:"h:mm A",L:"MM/DD/YYYY",LL:"MMMM D, YYYY",LLL:"MMMM D, YYYY h:mm A",LLLL:"dddd, MMMM D, YYYY h:mm A"},invalidDate:"Invalid date",ordinal:"%d",dayOfMonthOrdinalParse:/\d{1,2}/,relativeTime:{future:"in %s",past:"%s ago",s:"a few seconds",ss:"%d seconds",m:"a minute",mm:"%d minutes",h:"an hour",hh:"%d hours",d:"a day",dd:"%d days",M:"a month",MM:"%d months",y:"a year",yy:"%d years"},months:At,monthsShort:Ft,week:{dow:0,doy:6},weekdays:Ut,weekdaysMin:Gt,weekdaysShort:qt,meridiemParse:/[ap]\.?m?\.?/i},ae={},re={};function oe(t){return t&&t.toLowerCase().replace("_","-")}function se(t){if(!ae[t]&&void 0!==_n&&_n&&_n.exports)try{var e=ee._abbr;xn("./locale/"+t),le(e)}catch(t){}return ae[t]}function le(t,e){var n;return(ee=t&&(n=r(e)?de(t):ue(t,e))?n:ee)._abbr}function ue(t,e){if(null===e)return delete ae[t],null;var n=ie;if(e.abbr=t,null!=ae[t])D("defineLocaleOverride","use moment.updateLocale(localeName, config) to change an existing locale. moment.defineLocale(localeName, config) should only be used for creating a new locale See http://momentjs.com/guides/#/warnings/define-locale/ for more info."),n=ae[t]._config;else if(null!=e.parentLocale){if(null==ae[e.parentLocale])return re[e.parentLocale]||(re[e.parentLocale]=[]),re[e.parentLocale].push({name:t,config:e}),null;n=ae[e.parentLocale]._config}return ae[t]=new T(P(n,e)),re[t]&&re[t].forEach(function(t){ue(t.name,t.config)}),le(t),ae[t]}function de(t){var e;if(!(t=t&&t._locale&&t._locale._abbr?t._locale._abbr:t))return ee;if(!o(t)){if(e=se(t))return e;t=[t]}return function(t){for(var e,n,i,a,r=0;r=e&&w(a,n,!0)>=e-1)break;e--}r++}return null}(t)}function he(t){var e=t._a;return e&&-2===f(t).overflow&&(e=e[mt]<0||11Ot(e[gt],e[mt])?pt:e[vt]<0||24jt(n,r,o)?f(t)._overflowWeeks=!0:null!=s?f(t)._overflowWeekday=!0:(o=Bt(n,i,a,r,o),t._a[gt]=o.year,t._dayOfYear=o.dayOfYear)}(t),null!=t._dayOfYear&&(i=ce(t._a[gt],n[gt]),(t._dayOfYear>wt(i)||0===t._dayOfYear)&&(f(t)._overflowDayOfYear=!0),i=Ht(i,0,t._dayOfYear),t._a[mt]=i.getUTCMonth(),t._a[pt]=i.getUTCDate()),e=0;e<3&&null==t._a[e];++e)t._a[e]=o[e]=n[e];for(;e<7;e++)t._a[e]=o[e]=null==t._a[e]?2===e?1:0:t._a[e];24===t._a[vt]&&0===t._a[yt]&&0===t._a[bt]&&0===t._a[xt]&&(t._nextDay=!0,t._a[vt]=0),t._d=(t._useUTC?Ht:zt).apply(null,o),i=t._useUTC?t._d.getUTCDay():t._d.getDay(),null!=t._tzm&&t._d.setUTCMinutes(t._d.getUTCMinutes()-t._tzm),t._nextDay&&(t._a[vt]=24),t._w&&void 0!==t._w.d&&t._w.d!==i&&(f(t).weekdayMismatch=!0)}}var ge=/^\s*((?:[+-]\d{6}|\d{4})-(?:\d\d-\d\d|W\d\d-\d|W\d\d|\d\d\d|\d\d))(?:(T| )(\d\d(?::\d\d(?::\d\d(?:[.,]\d+)?)?)?)([\+\-]\d\d(?::?\d\d)?|\s*Z)?)?$/,me=/^\s*((?:[+-]\d{6}|\d{4})(?:\d\d\d\d|W\d\d\d|W\d\d|\d\d\d|\d\d))(?:(T| )(\d\d(?:\d\d(?:\d\d(?:[.,]\d+)?)?)?)([\+\-]\d\d(?::?\d\d)?|\s*Z)?)?$/,pe=/Z|[+-]\d\d(?::?\d\d)?/,ve=[["YYYYYY-MM-DD",/[+-]\d{6}-\d\d-\d\d/],["YYYY-MM-DD",/\d{4}-\d\d-\d\d/],["GGGG-[W]WW-E",/\d{4}-W\d\d-\d/],["GGGG-[W]WW",/\d{4}-W\d\d/,!1],["YYYY-DDD",/\d{4}-\d{3}/],["YYYY-MM",/\d{4}-\d\d/,!1],["YYYYYYMMDD",/[+-]\d{10}/],["YYYYMMDD",/\d{8}/],["GGGG[W]WWE",/\d{4}W\d{3}/],["GGGG[W]WW",/\d{4}W\d{2}/,!1],["YYYYDDD",/\d{7}/]],ye=[["HH:mm:ss.SSSS",/\d\d:\d\d:\d\d\.\d+/],["HH:mm:ss,SSSS",/\d\d:\d\d:\d\d,\d+/],["HH:mm:ss",/\d\d:\d\d:\d\d/],["HH:mm",/\d\d:\d\d/],["HHmmss.SSSS",/\d\d\d\d\d\d\.\d+/],["HHmmss,SSSS",/\d\d\d\d\d\d,\d+/],["HHmmss",/\d\d\d\d\d\d/],["HHmm",/\d\d\d\d/],["HH",/\d\d/]],be=/^\/?Date\((\-?\d+)/i;function xe(t){var e,n,i,a,r,o,s=t._i,l=ge.exec(s)||me.exec(s);if(l){for(f(t).iso=!0,e=0,n=ve.length;et.valueOf():t.valueOf()this.clone().month(0).utcOffset()||this.utcOffset()>this.clone().month(5).utcOffset()},Z.isLocal=function(){return!!this.isValid()&&!this._isUTC},Z.isUtcOffset=function(){return!!this.isValid()&&this._isUTC},Z.isUtc=Ve,Z.isUTC=Ve,Z.zoneAbbr=function(){return this._isUTC?"UTC":""},Z.zoneName=function(){return this._isUTC?"Coordinated Universal Time":""},Z.dates=n("dates accessor is deprecated. Use date instead.",At),Z.months=n("months accessor is deprecated. Use month instead",Lt),Z.years=n("years accessor is deprecated. Use year instead",Dt),Z.zone=n("moment().zone is deprecated, use moment().utcOffset instead. http://momentjs.com/guides/#/warnings/zone/",function(t,e){return null!=t?("string"!=typeof t&&(t=-t),this.utcOffset(t,e),this):-this.utcOffset()}),Z.isDSTShifted=n("isDSTShifted is deprecated. See http://momentjs.com/guides/#/warnings/dst-shifted/ for more information",function(){if(!r(this._isDSTShifted))return this._isDSTShifted;var t,e={};return y(e,this),(e=De(e))._a?(t=(e._isUTC?d:Pe)(e._a),this._isDSTShifted=this.isValid()&&0');var t=t.data,n=t.datasets,i=t.labels;if(n.length)for(var a=0;a'),i[a]&&e.push(i[a]),e.push("");return e.push(""),e.join("")},legend:{labels:{generateLabels:function(s){var l=s.data;return l.labels.length&&l.datasets.length?l.labels.map(function(t,e){var n=s.getDatasetMeta(0),i=l.datasets[0],a=n.data[e],r=a&&a.custom||{},o=y.valueAtIndexOrDefault,a=s.options.elements.arc;return{text:t,fillStyle:r.backgroundColor||o(i.backgroundColor,e,a.backgroundColor),strokeStyle:r.borderColor||o(i.borderColor,e,a.borderColor),lineWidth:r.borderWidth||o(i.borderWidth,e,a.borderWidth),hidden:isNaN(i.data[e])||n.data[e].hidden,index:e}}):[]}},onClick:function(t,e){for(var n,i=e.index,a=this.chart,r=0,o=(a.data.datasets||[]).length;r=Math.PI?-1:e<-Math.PI?1:0))+v,i=Math.cos(e),t=Math.sin(e),a=Math.cos(r),l=Math.sin(r),d=e<=0&&0<=r||e<=2*Math.PI&&2*Math.PI<=r,u=e<=.5*Math.PI&&.5*Math.PI<=r||e<=2.5*Math.PI&&2.5*Math.PI<=r,v=e<=-Math.PI&&-Math.PI<=r||e<=Math.PI&&Math.PI<=r,e=e<=.5*-Math.PI&&.5*-Math.PI<=r||e<=1.5*Math.PI&&1.5*Math.PI<=r,r=p/100,v=v?-1:Math.min(i*(i<0?1:r),a*(a<0?1:r)),e=e?-1:Math.min(t*(t<0?1:r),l*(l<0?1:r)),a=.5*((i=d?1:Math.max(i*(0');var t=t.data,n=t.datasets,i=t.labels;if(n.length)for(var a=0;a'),i[a]&&e.push(i[a]),e.push("");return e.push(""),e.join("")},legend:{labels:{generateLabels:function(s){var l=s.data;return l.labels.length&&l.datasets.length?l.labels.map(function(t,e){var n=s.getDatasetMeta(0),i=l.datasets[0],a=n.data[e].custom||{},r=y.valueAtIndexOrDefault,o=s.options.elements.arc;return{text:t,fillStyle:a.backgroundColor||r(i.backgroundColor,e,o.backgroundColor),strokeStyle:a.borderColor||r(i.borderColor,e,o.borderColor),lineWidth:a.borderWidth||r(i.borderWidth,e,o.borderWidth),hidden:isNaN(i.data[e])||n.data[e].hidden,index:e}}):[]}},onClick:function(t,e){for(var n,i=e.index,a=this.chart,r=0,o=(a.data.datasets||[]).length;r=e.numSteps?(r.callback(e.onAnimationComplete,[e],n),n.animating=!1,i.splice(a,1)):++a}},Object.defineProperty(t.Animation.prototype,"animationObject",{get:function(){return this}}),Object.defineProperty(t.Animation.prototype,"chartInstance",{get:function(){return this.chart},set:function(t){this.chart=t}})}},{25:25,26:26,45:45}],23:[function(t,e,n){"use strict";var o=t(25),h=t(45),i=t(28),a=t(30),s=t(48),l=t(31);e.exports=function(u){function d(t){return"top"===t||"bottom"===t}u.types={},u.instances={},u.controllers={},h.extend(u.prototype,{construct:function(t,e){var n=this;(a=(r=(r=e)||{}).data=r.data||{}).datasets=a.datasets||[],a.labels=a.labels||[],r.options=h.configMerge(o.global,o[r.type],r.options||{}),e=r;var i=s.acquireContext(t,e),a=i&&i.canvas,r=a&&a.height,t=a&&a.width;n.id=h.uid(),n.ctx=i,n.canvas=a,n.config=e,n.width=t,n.height=r,n.aspectRatio=r?t/r:null,n.options=e.options,n._bufferedRender=!1,(n.chart=n).controller=n,u.instances[n.id]=n,Object.defineProperty(n,"data",{get:function(){return n.config.data},set:function(t){n.config.data=t}}),i&&a?(n.initialize(),n.update()):console.error("Failed to create chart: can't acquire context from the given item")},initialize:function(){var t=this;return l.notify(t,"beforeInit"),h.retinaScale(t,t.options.devicePixelRatio),t.bindEvents(),t.options.responsive&&t.resize(!0),t.ensureScalesHaveIDs(),t.buildOrUpdateScales(),t.initToolTip(),l.notify(t,"afterInit"),t},clear:function(){return h.canvas.clear(this),this},stop:function(){return u.animationService.cancelAnimation(this),this},resize:function(t){var e=this,n=e.options,i=e.canvas,a=n.maintainAspectRatio&&e.aspectRatio||null,r=Math.max(0,Math.floor(h.getMaximumWidth(i))),a=Math.max(0,Math.floor(a?r/a:h.getMaximumHeight(i)));e.width===r&&e.height===a||(i.width=e.width=r,i.height=e.height=a,i.style.width=r+"px",i.style.height=a+"px",h.retinaScale(e,n.devicePixelRatio),t||(a={width:r,height:a},l.notify(e,"resize",[a]),e.options.onResize&&e.options.onResize(e,a),e.stop(),e.update(e.options.responsiveAnimationDuration)))},ensureScalesHaveIDs:function(){var t=this.options,e=t.scales||{},t=t.scale;h.each(e.xAxes,function(t,e){t.id=t.id||"x-axis-"+e}),h.each(e.yAxes,function(t,e){t.id=t.id||"y-axis-"+e}),t&&(t.id=t.id||"scale")},buildOrUpdateScales:function(){var o=this,t=o.options,s=o.scales||{},e=[],l=Object.keys(s).reduce(function(t,e){return t[e]=!1,t},{});t.scales&&(e=e.concat((t.scales.xAxes||[]).map(function(t){return{options:t,dtype:"category",dposition:"bottom"}}),(t.scales.yAxes||[]).map(function(t){return{options:t,dtype:"linear",dposition:"left"}}))),t.scale&&e.push({options:t.scale,dtype:"radialLinear",isDefault:!0,dposition:"chartArea"}),h.each(e,function(t){var e=t.options,n=e.id,i=h.valueOrDefault(e.type,t.dtype);d(e.position)!==d(t.dposition)&&(e.position=t.dposition),l[n]=!0;var a=null;if(n in s&&s[n].type===i)(a=s[n]).options=e,a.ctx=o.ctx,a.chart=o;else{var r=u.scaleService.getScaleConstructor(i);if(!r)return;a=new r({id:n,type:i,options:e,ctx:o.ctx,chart:o}),s[a.id]=a}a.mergeTicksOptions(),t.isDefault&&(o.scale=a)}),h.each(l,function(t,e){t||delete s[e]}),o.scales=s,u.scaleService.addScalesToLayout(this)},buildOrUpdateControllers:function(){var i=this,a=[],r=[];return h.each(i.data.datasets,function(t,e){var n=i.getDatasetMeta(e),t=t.type||i.config.type;if(n.type&&n.type!==t&&(i.destroyDatasetMeta(e),n=i.getDatasetMeta(e)),n.type=t,a.push(n.type),n.controller)n.controller.updateIndex(e),n.controller.linkScales();else{t=u.controllers[n.type];if(void 0===t)throw new Error('"'+n.type+'" is not a chart type.');n.controller=new t(i,e),r.push(n.controller)}},i),r},resetElements:function(){var n=this;h.each(n.data.datasets,function(t,e){n.getDatasetMeta(e).controller.reset()},n)},reset:function(){this.resetElements(),this.tooltip.initialize()},update:function(t){var e,n,i=this;t&&"object"==typeof t||(t={duration:t,lazy:arguments[1]}),n=(e=i).options,h.each(e.scales,function(t){a.removeBox(e,t)}),n=h.configMerge(u.defaults.global,u.defaults[e.config.type],n),e.options=e.config.options=n,e.ensureScalesHaveIDs(),e.buildOrUpdateScales(),e.tooltip._options=n.tooltips,e.tooltip.initialize(),l._invalidate(i),!1!==l.notify(i,"beforeUpdate")&&(i.tooltip._data=i.data,n=i.buildOrUpdateControllers(),h.each(i.data.datasets,function(t,e){i.getDatasetMeta(e).controller.buildOrUpdateElements()},i),i.updateLayout(),i.options.animation&&i.options.animation.duration&&h.each(n,function(t){t.reset()}),i.updateDatasets(),i.tooltip.initialize(),i.lastActive=[],l.notify(i,"afterUpdate"),i._bufferedRender?i._bufferedRequest={duration:t.duration,easing:t.easing,lazy:t.lazy}:i.render(t))},updateLayout:function(){!1!==l.notify(this,"beforeLayout")&&(a.update(this,this.width,this.height),l.notify(this,"afterScaleUpdate"),l.notify(this,"afterLayout"))},updateDatasets:function(){if(!1!==l.notify(this,"beforeDatasetsUpdate")){for(var t=0,e=this.data.datasets.length;t=e[t].length&&e[t].push({}),!e[t][a].type||o.type&&o.type!==e[t][a].type?c.merge(e[t][a],[l.scaleService.getScaleDefaults(r),o]):c.merge(e[t][a],o)}else c._merger(t,e,n,i)}})},c.where=function(t,e){if(c.isArray(t)&&Array.prototype.filter)return t.filter(e);var n=[];return c.each(t,function(t){e(t)&&n.push(t)}),n},c.findIndex=Array.prototype.findIndex?function(t,e,n){return t.findIndex(e,n)}:function(t,e,n){n=void 0===n?t:n;for(var i=0,a=t.length;i=t.length-1?t[0]:t[e+1]:e>=t.length-1?t[t.length-1]:t[e+1]},c.previousItem=function(t,e,n){return n?e<=0?t[t.length-1]:t[e-1]:e<=0?t[0]:t[e-1]},c.niceNum=function(t,e){var n=Math.floor(c.log10(t)),t=t/Math.pow(10,n),t=e?t<1.5?1:t<3?2:t<7?5:10:t<=1?1:t<=2?2:t<=5?5:10;return t*Math.pow(10,n)},c.requestAnimFrame="undefined"==typeof window?function(t){t()}:window.requestAnimationFrame||window.webkitRequestAnimationFrame||window.mozRequestAnimationFrame||window.oRequestAnimationFrame||window.msRequestAnimationFrame||function(t){return window.setTimeout(t,1e3/60)},c.getRelativePosition=function(t,e){var n=t.originalEvent||t,i=t.currentTarget||t.srcElement,a=i.getBoundingClientRect(),r=n.touches,o=r&&0n.length){for(var l=0;le&&(e=t.length)}),e},c.color=i?function(t){return t instanceof CanvasGradient&&(t=a.global.defaultColor),i(t)}:function(t){return console.error("Color.js not found!"),t},c.getHoverColor=function(t){return t instanceof CanvasPattern?t:c.color(t).saturate(.5).darken(.1).rgbString()}}},{2:2,25:25,45:45}],28:[function(t,e,n){"use strict";var i=t(45);function o(t,e){return t.native?{x:t.x,y:t.y}:i.getRelativePosition(t,e)}function s(t,e){for(var n,i,a,r=0,o=t.data.datasets.length;rt.maxHeight){r--;break}r++,s=d*o}t.labelRotation=r},afterCalculateTickRotation:function(){N.callback(this.options.afterCalculateTickRotation,[this])},beforeFit:function(){N.callback(this.options.beforeFit,[this])},fit:function(){var t,e=this,n=e.minSize={width:0,height:0},i=f(e._ticks),a=e.options,r=a.ticks,o=a.scaleLabel,s=a.gridLines,l=a.display,u=e.isHorizontal(),d=g(r),h=a.gridLines.tickMarkLength;n.width=u?e.isFullWidth()?e.maxWidth-e.margins.left-e.margins.right:e.maxWidth:l&&s.drawTicks?h:0,n.height=u?l&&s.drawTicks?h:0:e.maxHeight,o.display&&l&&(t=m(o)+N.options.toPadding(o.padding).height,u?n.height+=t:n.width+=t),r.display&&l&&(s=N.longestText(e.ctx,d.font,i,e.longestTextCache),h=N.numberOfLabelLines(i),o=.5*d.size,t=e.options.ticks.padding,u?(e.longestLabelWidth=s,l=N.toRadians(e.labelRotation),u=Math.cos(l),h=Math.sin(l)*s+d.size*h+o*(h-1)+o,n.height=Math.min(e.maxHeight,n.height+h+t),e.ctx.font=d.font,h=c(e.ctx,i[0],d.font),i=c(e.ctx,i[i.length-1],d.font),0!==e.labelRotation?(e.paddingLeft="bottom"===a.position?u*h+3:u*o+3,e.paddingRight="bottom"===a.position?u*o+3:u*i+3):(e.paddingLeft=h/2+3,e.paddingRight=i/2+3)):(r.mirror?s=0:s+=t+o,n.width=Math.min(e.maxWidth,n.width+s),e.paddingTop=d.size/2,e.paddingBottom=d.size/2)),e.handleMargins(),e.width=n.width,e.height=n.height},handleMargins:function(){var t=this;t.margins&&(t.paddingLeft=Math.max(t.paddingLeft-t.margins.left,0),t.paddingTop=Math.max(t.paddingTop-t.margins.top,0),t.paddingRight=Math.max(t.paddingRight-t.margins.right,0),t.paddingBottom=Math.max(t.paddingBottom-t.margins.bottom,0))},afterFit:function(){N.callback(this.options.afterFit,[this])},isHorizontal:function(){return"top"===this.options.position||"bottom"===this.options.position},isFullWidth:function(){return this.options.fullWidth},getRightValue:function(t){if(N.isNullOrUndef(t))return NaN;if("number"==typeof t&&!isFinite(t))return NaN;if(t)if(this.isHorizontal()){if(void 0!==t.x)return this.getRightValue(t.x)}else if(void 0!==t.y)return this.getRightValue(t.y);return t},getLabelForIndex:N.noop,getPixelForValue:N.noop,getValueForPixel:N.noop,getPixelForTick:function(t){var e=this,n=e.options.offset;if(e.isHorizontal()){var i=(e.width-(e.paddingLeft+e.paddingRight))/Math.max(e._ticks.length-(n?0:1),1),a=i*t+e.paddingLeft;n&&(a+=i/2);a=e.left+Math.round(a);return a+=e.isFullWidth()?e.margins.left:0}a=e.height-(e.paddingTop+e.paddingBottom);return e.top+t*(a/(e._ticks.length-1))},getPixelForDecimal:function(t){var e=this;if(e.isHorizontal()){var n=(e.width-(e.paddingLeft+e.paddingRight))*t+e.paddingLeft,n=e.left+Math.round(n);return n+=e.isFullWidth()?e.margins.left:0}return e.top+t*e.height},getBasePixel:function(){return this.getPixelForValue(this.getBaseValue())},getBaseValue:function(){var t=this.min,e=this.max;return this.beginAtZero?0:t<0&&e<0?e:0r.width-(r.paddingLeft+r.paddingRight)&&(e=1+Math.floor((u+s.autoSkipPadding)*l/(r.width-(r.paddingLeft+r.paddingRight)))),a&&aa.height-e.height&&(s="bottom");var l=(r.left+r.right)/2,u=(r.top+r.bottom)/2,d="center"===s?(n=function(t){return t<=l},function(t){return l=a.width-e.width/2}),h=function(t){return t+e.width+i.caretSize+i.caretPadding>a.width},c=function(t){return t-e.width-i.caretSize-i.caretPadding<0},r=function(t){return t<=u?"top":"bottom"};return n(i.x)?(o="left",h(i.x)&&(o="center",s=r(i.y))):d(i.x)&&(o="right",c(i.x)&&(o="center",s=r(i.y))),{xAlign:(t=t._options).xAlign||o,yAlign:t.yAlign||s}}(this,k=I(this,v)),e=v,n=k,i=x,a=g._chart,r=e.x,o=e.y,s=e.caretSize,l=e.caretPadding,p=e.cornerRadius,e=i.xAlign,i=i.yAlign,s+=l,l=p+l,"right"===e?r-=n.width:"center"===e&&(r=(r-=n.width/2)+n.width>a.width?a.width-n.width:r)<0&&(r=0),"top"===i?o+=s:o-="bottom"===i?n.height+s:n.height/2,"center"===i?"left"===e?r+=s:"right"===e&&(r-=s):"left"===e?r-=l:"right"===e&&(r+=l),_={x:r,y:o}}else v.opacity=0;return v.xAlign=x.xAlign,v.yAlign=x.yAlign,v.x=_.x,v.y=_.y,v.width=k.width,v.height=k.height,v.caretX=w.x,v.caretY=w.y,g._model=v,t&&m.custom&&m.custom.call(g,v),g},drawCaret:function(t,e){var n=this._chart.ctx,i=this._view,i=this.getCaretPosition(t,e,i);n.lineTo(i.x1,i.y1),n.lineTo(i.x2,i.y2),n.lineTo(i.x3,i.y3)},getCaretPosition:function(t,e,n){var i,a,r,o,s,l,u=n.caretSize,d=n.cornerRadius,h=n.xAlign,c=n.yAlign,f=t.x,g=t.y,t=e.width,e=e.height;return"center"===c?(r=g+e/2,o="left"===h?(i=(l=f)-u,s=l,a=r+u,r-u):(i=(l=f+t)+u,s=l,a=r-u,r+u)):(s=(l="left"===h?(i=f+d+u)-u:"right"===h?(i=f+t-d-u)-u:(i=n.caretX)-u,i+u),"top"===c?(r=(a=g)-u,o=a):(r=(a=g+e)+u,o=a,u=s,s=l,l=u)),{x1:l,x2:i,x3:s,y1:a,y2:r,y3:o}},drawTitle:function(t,e,n,i){var a=e.title;if(a.length){n.textAlign=e._titleAlign,n.textBaseline="top";var r,o,s=e.titleFontSize,l=e.titleSpacing;for(n.fillStyle=h(e.titleFontColor,i),n.font=A.fontString(s,e._titleFontStyle,e._titleFontFamily),r=0,o=a.length;r=n.innerRadius&&e<=n.outerRadius;return t&&n}return!1},getCenterPoint:function(){var t=this._view,e=(t.startAngle+t.endAngle)/2,n=(t.innerRadius+t.outerRadius)/2;return{x:t.x+Math.cos(e)*n,y:t.y+Math.sin(e)*n}},getArea:function(){var t=this._view;return Math.PI*((t.endAngle-t.startAngle)/(2*Math.PI))*(Math.pow(t.outerRadius,2)-Math.pow(t.innerRadius,2))},tooltipPosition:function(){var t=this._view,e=t.startAngle+(t.endAngle-t.startAngle)/2,n=(t.outerRadius-t.innerRadius)/2+t.innerRadius;return{x:t.x+Math.cos(e)*n,y:t.y+Math.sin(e)*n}},draw:function(){var t=this._chart.ctx,e=this._view,n=e.startAngle,i=e.endAngle;t.beginPath(),t.arc(e.x,e.y,e.outerRadius,n,i),t.arc(e.x,e.y,e.innerRadius,i,n,!0),t.closePath(),t.strokeStyle=e.borderColor,t.lineWidth=e.borderWidth,t.fillStyle=e.backgroundColor,t.fill(),t.lineJoin="bevel",e.borderWidth&&t.stroke()}})},{25:25,26:26,45:45}],37:[function(t,e,n){"use strict";var i=t(25),a=t(26),d=t(45),h=i.global;i._set("global",{elements:{line:{tension:.4,backgroundColor:h.defaultColor,borderWidth:3,borderColor:h.defaultColor,borderCapStyle:"butt",borderDash:[],borderDashOffset:0,borderJoinStyle:"miter",capBezierPoints:!0,fill:!0}}}),e.exports=a.extend({draw:function(){var t,e,n,i,a=this._view,r=this._chart.ctx,o=a.spanGaps,s=this._children.slice(),l=h.elements.line,u=-1;for(this._loop&&s.length&&s.push(s[0]),r.save(),r.lineCap=a.borderCapStyle||l.borderCapStyle,r.setLineDash&&r.setLineDash(a.borderDash||l.borderDash),r.lineDashOffset=a.borderDashOffset||l.borderDashOffset,r.lineJoin=a.borderJoinStyle||l.borderJoinStyle,r.lineWidth=a.borderWidth||l.borderWidth,r.strokeStyle=a.borderColor||h.defaultColor,r.beginPath(),u=-1,t=0;t=(n=a(this)).left&&t<=n.right&&e>=n.top&&e<=n.bottom:i},inLabelRange:function(t,e){if(!this._view)return!1;var n=a(this);return o(this)?t>=n.left&&t<=n.right:e>=n.top&&e<=n.bottom},inXRange:function(t){var e=a(this);return t>=e.left&&t<=e.right},inYRange:function(t){var e=a(this);return t>=e.top&&t<=e.bottom},getCenterPoint:function(){var t,e=this._view,e=o(this)?(t=e.x,(e.y+e.base)/2):(t=(e.x+e.base)/2,e.y);return{x:t,y:e}},getArea:function(){var t=this._view;return t.width*Math.abs(t.y-t.base)},tooltipPosition:function(){var t=this._view;return{x:t.x,y:t.y}}})},{25:25,26:26}],40:[function(t,e,n){"use strict";e.exports={},e.exports.Arc=t(36),e.exports.Line=t(37),e.exports.Point=t(38),e.exports.Rectangle=t(39)},{36:36,37:37,38:38,39:39}],41:[function(t,e,n){"use strict";t=t(42),n=e.exports={clear:function(t){t.ctx.clearRect(0,0,t.width,t.height)},roundedRect:function(t,e,n,i,a,r){var o;r?(o=Math.min(r,i/2),r=Math.min(r,a/2),t.moveTo(e+o,n),t.lineTo(e+i-o,n),t.quadraticCurveTo(e+i,n,e+i,n+r),t.lineTo(e+i,n+a-r),t.quadraticCurveTo(e+i,n+a,e+i-o,n+a),t.lineTo(e+o,n+a),t.quadraticCurveTo(e,n+a,e,n+a-r),t.lineTo(e,n+r),t.quadraticCurveTo(e,n,e+o,n)):t.rect(e,n,i,a)},drawPoint:function(t,e,n,i,a){var r,o,s,l;if(!e||"object"!=typeof e||"[object HTMLImageElement]"!==(r=e.toString())&&"[object HTMLCanvasElement]"!==r){if(!(isNaN(n)||n<=0)){switch(e){default:t.beginPath(),t.arc(i,a,n,0,2*Math.PI),t.closePath(),t.fill();break;case"triangle":t.beginPath(),h=(d=3*n/Math.sqrt(3))*Math.sqrt(3)/2,t.moveTo(i-d/2,a+h/3),t.lineTo(i+d/2,a+h/3),t.lineTo(i,a-2*h/3),t.closePath(),t.fill();break;case"rect":l=1/Math.SQRT2*n,t.beginPath(),t.fillRect(i-l,a-l,2*l,2*l),t.strokeRect(i-l,a-l,2*l,2*l);break;case"rectRounded":var u=n/Math.SQRT2,d=i-u,h=a-u,u=Math.SQRT2*n;t.beginPath(),this.roundedRect(t,d,h,u,u,n/2),t.closePath(),t.fill();break;case"rectRot":l=1/Math.SQRT2*n,t.beginPath(),t.moveTo(i-l,a),t.lineTo(i,a+l),t.lineTo(i+l,a),t.lineTo(i,a-l),t.closePath(),t.fill();break;case"cross":t.beginPath(),t.moveTo(i,a+n),t.lineTo(i,a-n),t.moveTo(i-n,a),t.lineTo(i+n,a),t.closePath();break;case"crossRot":t.beginPath(),o=Math.cos(Math.PI/4)*n,s=Math.sin(Math.PI/4)*n,t.moveTo(i-o,a-s),t.lineTo(i+o,a+s),t.moveTo(i-o,a+s),t.lineTo(i+o,a-s),t.closePath();break;case"star":t.beginPath(),t.moveTo(i,a+n),t.lineTo(i,a-n),t.moveTo(i-n,a),t.lineTo(i+n,a),o=Math.cos(Math.PI/4)*n,s=Math.sin(Math.PI/4)*n,t.moveTo(i-o,a-s),t.lineTo(i+o,a+s),t.moveTo(i-o,a+s),t.lineTo(i+o,a-s),t.closePath();break;case"line":t.beginPath(),t.moveTo(i-n,a),t.lineTo(i+n,a),t.closePath();break;case"dash":t.beginPath(),t.moveTo(i,a),t.lineTo(i+n,a),t.closePath()}t.stroke()}}else t.drawImage(e,i-e.width/2,a-e.height/2,e.width,e.height)},clipArea:function(t,e){t.save(),t.beginPath(),t.rect(e.left,e.top,e.right-e.left,e.bottom-e.top),t.clip()},unclipArea:function(t){t.restore()},lineTo:function(t,e,n,i){if(n.steppedLine)return"after"===n.steppedLine&&!i||"after"!==n.steppedLine&&i?t.lineTo(e.x,n.y):t.lineTo(n.x,e.y),void t.lineTo(n.x,n.y);n.tension?t.bezierCurveTo(i?e.controlPointPreviousX:e.controlPointNextX,i?e.controlPointPreviousY:e.controlPointNextY,i?n.controlPointNextX:n.controlPointPreviousX,i?n.controlPointNextY:n.controlPointPreviousY,n.x,n.y):t.lineTo(n.x,n.y)}};t.clear=n.clear,t.drawRoundedRectangle=function(t){t.beginPath(),n.roundedRect.apply(n,arguments),t.closePath()}},{42:42}],42:[function(t,e,n){"use strict";var i,d={noop:function(){},uid:(i=0,function(){return i++}),isNullOrUndef:function(t){return null==t},isArray:Array.isArray||function(t){return"[object Array]"===Object.prototype.toString.call(t)},isObject:function(t){return null!==t&&"[object Object]"===Object.prototype.toString.call(t)},valueOrDefault:function(t,e){return void 0===t?e:t},valueAtIndexOrDefault:function(t,e,n){return d.valueOrDefault(d.isArray(t)?t[e]:t,n)},callback:function(t,e,n){if(t&&"function"==typeof t.call)return t.apply(n,e)},each:function(t,e,n,i){var a,r,o;if(d.isArray(t))if(r=t.length,i)for(a=r-1;0<=a;a--)e.call(n,t[a],a);else for(a=0;a
';var a=e.childNodes[0],r=e.childNodes[1];return e._reset=function(){a.scrollLeft=1e6,a.scrollTop=1e6,r.scrollLeft=1e6,r.scrollTop=1e6},b(a,"scroll",(i=function(){e._reset(),t()}).bind(a,"expand")),b(r,"scroll",i.bind(r,"shrink")),e}((i=function(){if(h.resizer)return t(x("resize",n))},o=!1,function(){r=Array.prototype.slice.call(arguments),a=a||this,o||(o=!0,f.requestAnimFrame.call(window,function(){o=!1,i.apply(a,r)}))}));l=function(){var t;h.resizer&&((t=e.parentNode)&&t!==c.parentNode&&t.insertBefore(c,t.firstChild),c._reset())},u=(s=e)[g]||(s[g]={}),d=u.renderProxy=function(t){t.animationName===v&&l()},f.each(y,function(t){b(s,t,d)}),u.reflow=!!s.offsetParent,s.classList.add(p)}function a(t){var e,n,i=t[g]||{},a=i.resizer;delete i.resizer,t=(e=t)[g]||{},(n=t.renderProxy)&&(f.each(y,function(t){r(e,t,n)}),delete t.renderProxy),e.classList.remove(p),a&&a.parentNode&&a.parentNode.removeChild(a)}e.exports={_enabled:"undefined"!=typeof window&&"undefined"!=typeof document,initialize:function(){var t,e,n="from{opacity:0.99}to{opacity:1}";e="@-webkit-keyframes "+v+"{"+n+"}@keyframes "+v+"{"+n+"}."+p+"{-webkit-animation:"+v+" 0.001s;animation:"+v+" 0.001s;}",n=(t=this)._style||document.createElement("style"),t._style||(e="/* Chart.js */\n"+e,(t._style=n).setAttribute("type","text/css"),document.getElementsByTagName("head")[0].appendChild(n)),n.appendChild(document.createTextNode(e))},acquireContext:function(t,e){"string"==typeof t?t=document.getElementById(t):t.length&&(t=t[0]);var n,i,a,r,o=(t=t&&t.canvas?t.canvas:t)&&t.getContext&&t.getContext("2d");return o&&o.canvas===t?(i=e,r=(n=t).style,e=n.getAttribute("height"),t=n.getAttribute("width"),n[g]={initial:{height:e,width:t,style:{display:r.display,height:r.height,width:r.width}}},r.display=r.display||"block",null!==t&&""!==t||void 0!==(a=s(n,"width"))&&(n.width=a),null!==e&&""!==e||(""===n.style.height?n.height=n.width/(i.options.aspectRatio||2):(i=s(n,"height"),void 0!==a&&(n.height=i))),o):null},releaseContext:function(t){var n,i=t.canvas;i[g]&&(n=i[g].initial,["height","width"].forEach(function(t){var e=n[t];f.isNullOrUndef(e)?i.removeAttribute(t):i.setAttribute(t,e)}),f.each(n.style||{},function(t,e){i.style[e]=t}),i.width=i.width,delete i[g])},addEventListener:function(a,t,r){var e,n=a.canvas;"resize"!==t?b(n,t,((e=r[g]||(r[g]={})).proxies||(e.proxies={}))[a.id+"_"+t]=function(t){var e,n,i;r((n=a,i=o[(e=t).type]||e.type,t=f.getRelativePosition(e,n),x(i,n,t.x,t.y,e)))}):l(n,r,a)},removeEventListener:function(t,e,n){var i=t.canvas;"resize"!==e?(t=((n[g]||{}).proxies||{})[t.id+"_"+e])&&r(i,e,t):a(i)}},f.addEvent=b,f.removeEvent=r},{45:45}],48:[function(t,e,n){"use strict";var i=t(45),a=t(46),t=t(47),a=t._enabled?t:a;e.exports=i.extend({initialize:function(){},acquireContext:function(){},releaseContext:function(){},addEventListener:function(){},removeEventListener:function(){}},a)},{45:45,46:46,47:47}],49:[function(t,e,n){"use strict";e.exports={},e.exports.filler=t(50),e.exports.legend=t(51),e.exports.title=t(52)},{50:50,51:51,52:52}],50:[function(t,e,n){"use strict";var s=t(25),c=t(40),l=t(45);s._set("global",{plugins:{filler:{propagate:!0}}});var f={dataset:function(t){var e=t.fill,n=t.chart,t=n.getDatasetMeta(e),i=t&&n.isDatasetVisible(e)&&t.dataset._children||[],a=i.length||0;return a?function(t,e){return e');for(var n=0;n'),t.data.datasets[n].label&&e.push(t.data.datasets[n].label),e.push("");return e.push(""),e.join("")}});var r=i.extend({initialize:function(t){T.extend(this,t),this.legendHitBoxes=[],this.doughnutMode=!1},beforeUpdate:t,update:function(t,e,n){var i=this;return i.beforeUpdate(),i.maxWidth=t,i.maxHeight=e,i.margins=n,i.beforeSetDimensions(),i.setDimensions(),i.afterSetDimensions(),i.beforeBuildLabels(),i.buildLabels(),i.afterBuildLabels(),i.beforeFit(),i.fit(),i.afterFit(),i.afterUpdate(),i.minSize},afterUpdate:t,beforeSetDimensions:t,setDimensions:function(){var t=this;t.isHorizontal()?(t.width=t.maxWidth,t.left=0,t.right=t.width):(t.height=t.maxHeight,t.top=0,t.bottom=t.height),t.paddingLeft=0,t.paddingTop=0,t.paddingRight=0,t.paddingBottom=0,t.minSize={width:0,height:0}},afterSetDimensions:t,beforeBuildLabels:t,buildLabels:function(){var e=this,n=e.options.labels||{},t=T.callback(n.generateLabels,[e.chart],e)||[];n.filter&&(t=t.filter(function(t){return n.filter(t,e.chart.data)})),e.options.reverse&&t.reverse(),e.legendItems=t},afterBuildLabels:t,beforeFit:t,fit:function(){var n,i,a,r,o,s,l,u=this,t=u.options,d=t.labels,e=t.display,h=u.ctx,c=P.global,f=T.valueOrDefault,g=f(d.fontSize,c.defaultFontSize),t=f(d.fontStyle,c.defaultFontStyle),c=f(d.fontFamily,c.defaultFontFamily),t=T.fontString(g,t,c),m=u.legendHitBoxes=[],p=u.minSize,c=u.isHorizontal();c?(p.width=u.maxWidth,p.height=e?10:0):(p.width=e?10:0,p.height=u.maxHeight),e&&(h.font=t,c?(n=u.lineWidths=[0],i=u.legendItems.length?g+d.padding:0,h.textAlign="left",h.textBaseline="top",T.each(u.legendItems,function(t,e){t=O(d,g)+g/2+h.measureText(t.text).width;n[n.length-1]+t+d.padding>=u.width&&(i+=g+d.padding,n[n.length]=u.left),m[e]={left:0,top:0,width:t,height:g},n[n.length-1]+=t+d.padding}),p.height+=i):(c=d.padding,a=u.columnWidths=[],r=d.padding,s=o=0,l=g+c,T.each(u.legendItems,function(t,e){t=O(d,g)+g/2+h.measureText(t.text).width;s+l>p.height&&(r+=o+d.padding,a.push(o),s=o=0),o=Math.max(o,t),s+=l,m[e]={left:0,top:0,width:t,height:g}}),r+=o,a.push(o),p.width+=r)),u.width=p.width,u.height=p.height},afterFit:t,isHorizontal:function(){return"top"===this.options.position||"bottom"===this.options.position},draw:function(){var f,g,t,m,e,n,p,v,y,b,x,_=this,k=_.options,w=k.labels,M=P.global,S=M.elements.line,D=_.width,C=_.lineWidths;k.display&&(f=_.ctx,t=(g=T.valueOrDefault)(w.fontColor,M.defaultFontColor),m=g(w.fontSize,M.defaultFontSize),e=g(w.fontStyle,M.defaultFontStyle),n=g(w.fontFamily,M.defaultFontFamily),n=T.fontString(m,e,n),f.textAlign="left",f.textBaseline="middle",f.lineWidth=.5,f.strokeStyle=t,f.fillStyle=t,f.font=n,p=O(w,m),v=_.legendHitBoxes,y=_.isHorizontal(),b=y?{x:_.left+(D-C[0])/2,y:_.top+w.padding,line:0}:{x:_.left+w.padding,y:_.top+w.padding,line:0},x=m+w.padding,T.each(_.legendItems,function(t,e){var n,i,a,r,o,s,l,u=f.measureText(t.text).width,d=p+m/2+u,h=b.x,c=b.y;y?D<=h+d&&(c=b.y+=x,b.line++,h=b.x=_.left+(D-C[b.line])/2):c+x>_.bottom&&(h=b.x=h+_.columnWidths[b.line]+w.padding,c=b.y=_.top+w.padding,b.line++),n=h,i=c,a=t,isNaN(p)||p<=0||(f.save(),f.fillStyle=g(a.fillStyle,M.defaultColor),f.lineCap=g(a.lineCap,S.borderCapStyle),f.lineDashOffset=g(a.lineDashOffset,S.borderDashOffset),f.lineJoin=g(a.lineJoin,S.borderJoinStyle),f.lineWidth=g(a.lineWidth,S.borderWidth),f.strokeStyle=g(a.strokeStyle,M.defaultColor),r=0===g(a.lineWidth,S.borderWidth),f.setLineDash&&f.setLineDash(g(a.lineDash,S.borderDash)),k.labels&&k.labels.usePointStyle?(s=n+(l=(o=m*Math.SQRT2/2)/Math.SQRT2),l=i+l,T.canvas.drawPoint(f,a.pointStyle,o,s,l)):(r||f.strokeRect(n,i,p,m),f.fillRect(n,i,p,m)),f.restore()),v[e].left=h,v[e].top=c,e=t,t=u,h=p+(u=m/2)+(h=h),u=c+u,f.fillText(e.text,h,u),e.hidden&&(f.beginPath(),f.lineWidth=2,f.moveTo(h,u),f.lineTo(h+t,u),f.stroke()),y?b.x+=d+w.padding:b.y+=x}))},handleEvent:function(t){var e=this,n=e.options,i="mouseup"===t.type?"click":t.type,a=!1;if("mousemove"===i){if(!n.onHover)return}else{if("click"!==i)return;if(!n.onClick)return}var r=t.x,o=t.y;if(r>=e.left&&r<=e.right&&o>=e.top&&o<=e.bottom)for(var s=e.legendHitBoxes,l=0;l=u.left&&r<=u.left+u.width&&o>=u.top&&o<=u.top+u.height){if("click"===i){n.onClick.call(e,t.native,e.legendItems[l]),a=!0;break}if("mousemove"===i){n.onHover.call(e,t.native,e.legendItems[l]),a=!0;break}}}return a}});function o(t,e){var n=new r({ctx:t.ctx,options:e,chart:t});a.configure(t,n,e),a.addBox(t,n),t.legend=n}e.exports={id:"legend",_element:r,beforeInit:function(t){var e=t.options.legend;e&&o(t,e)},beforeUpdate:function(t){var e=t.options.legend,n=t.legend;e?(T.mergeIf(e,P.global.legend),n?(a.configure(t,n,e),n.options=e):o(t,e)):n&&(a.removeBox(t,n),delete t.legend)},afterEvent:function(t,e){t=t.legend;t&&t.handleEvent(e)}}},{25:25,26:26,30:30,45:45}],52:[function(t,e,n){"use strict";var y=t(25),i=t(26),b=t(45),a=t(30),t=b.noop;y._set("global",{title:{display:!1,fontStyle:"bold",fullWidth:!0,lineHeight:1.2,padding:10,position:"top",text:"",weight:2e3}});var r=i.extend({initialize:function(t){b.extend(this,t),this.legendHitBoxes=[]},beforeUpdate:t,update:function(t,e,n){var i=this;return i.beforeUpdate(),i.maxWidth=t,i.maxHeight=e,i.margins=n,i.beforeSetDimensions(),i.setDimensions(),i.afterSetDimensions(),i.beforeBuildLabels(),i.buildLabels(),i.afterBuildLabels(),i.beforeFit(),i.fit(),i.afterFit(),i.afterUpdate(),i.minSize},afterUpdate:t,beforeSetDimensions:t,setDimensions:function(){var t=this;t.isHorizontal()?(t.width=t.maxWidth,t.left=0,t.right=t.width):(t.height=t.maxHeight,t.top=0,t.bottom=t.height),t.paddingLeft=0,t.paddingTop=0,t.paddingRight=0,t.paddingBottom=0,t.minSize={width:0,height:0}},afterSetDimensions:t,beforeBuildLabels:t,buildLabels:t,afterBuildLabels:t,beforeFit:t,fit:function(){var t=b.valueOrDefault,e=this.options,n=e.display,i=t(e.fontSize,y.global.defaultFontSize),a=this.minSize,t=b.isArray(e.text)?e.text.length:1,i=b.options.toLineHeight(e.lineHeight,i),e=n?t*i+2*e.padding:0;this.isHorizontal()?(a.width=this.maxWidth,a.height=e):(a.width=e,a.height=this.maxHeight),this.width=a.width,this.height=a.height},afterFit:t,isHorizontal:function(){var t=this.options.position;return"top"===t||"bottom"===t},draw:function(){var t=this.ctx,e=b.valueOrDefault,n=this.options,i=y.global;if(n.display){var a,r,o,s=e(n.fontSize,i.defaultFontSize),l=e(n.fontStyle,i.defaultFontStyle),u=e(n.fontFamily,i.defaultFontFamily),d=b.fontString(s,l,u),h=b.options.toLineHeight(n.lineHeight,s),c=h/2+n.padding,f=0,g=this.top,l=this.left,u=this.bottom,s=this.right;t.fillStyle=e(n.fontColor,i.defaultFontColor),t.font=d,this.isHorizontal()?(r=l+(s-l)/2,o=g+c,a=s-l):(r="left"===n.position?l+c:s-c,o=g+(u-g)/2,a=u-g,f=Math.PI*("left"===n.position?-.5:.5)),t.save(),t.translate(r,o),t.rotate(f),t.textAlign="center",t.textBaseline="middle";var m=n.text;if(b.isArray(m))for(var p=0,v=0;vo.max)&&(o.max=t))})}),o.min=isFinite(o.min)&&!isNaN(o.min)?o.min:0,o.max=isFinite(o.max)&&!isNaN(o.max)?o.max:1,this.handleTickRangeOptions()},getTickLimit:function(){var t,e=this.options.ticks;return this.isHorizontal()?Math.min(e.maxTicksLimit||11,Math.ceil(this.width/50)):(t=h.valueOrDefault(e.fontSize,i.global.defaultFontSize),Math.min(e.maxTicksLimit||11,Math.ceil(this.height/(2*t))))},handleDirectionalChanges:function(){this.isHorizontal()||this.ticks.reverse()},getLabelForIndex:function(t,e){return+this.getRightValue(this.chart.data.datasets[e].data[t])},getPixelForValue:function(t){var e=this.start,n=+this.getRightValue(t),t=this.end-e,e=this.isHorizontal()?this.left+this.width/t*(n-e):this.bottom-this.height/t*(n-e);return e},getValueForPixel:function(t){var e=this.isHorizontal(),n=e?this.width:this.height,n=(e?t-this.left:this.bottom-t)/n;return this.start+(this.end-this.start)*n},getPixelForTick:function(t){return this.getPixelForValue(this.ticksAsNumbers[t])}});t.scaleService.registerScaleType("linear",n,e)}},{25:25,34:34,45:45}],55:[function(t,e,n){"use strict";var u=t(45);e.exports=function(e){var t=u.noop;e.LinearScaleBase=e.Scale.extend({getRightValue:function(t){return"string"==typeof t?+t:e.Scale.prototype.getRightValue.call(this,t)},handleTickRangeOptions:function(){var t=this,e=t.options.ticks;e.beginAtZero&&(n=u.sign(t.min),i=u.sign(t.max),n<0&&i<0?t.max=0:0=t.max&&(n?t.max=t.min+1:t.min=t.max-1),t.min===t.max&&(t.max++,e.beginAtZero||t.min--)},getTickLimit:t,handleDirectionalChanges:t,buildTicks:function(){var t=this,e=t.options.ticks,n=t.getTickLimit(),n={maxTicks:n=Math.max(2,n),min:e.min,max:e.max,stepSize:u.valueOrDefault(e.fixedStepSize,e.stepSize)},n=t.ticks=function(t,e){var n,i,a=[];i=t.stepSize&&0r.max)&&(r.max=t),0!=t&&(null===r.minNotZero||ta.r&&(a.r=d.end,r.r=l),h.starta.b&&(a.b=h.end,r.b=l)}t.setReductions(i,a,r)}function i(t){var e=t.ctx,n=t.options,i=n.angleLines,a=n.pointLabels;e.lineWidth=i.lineWidth,e.strokeStyle=i.color;var r=t.getDistanceFromCenterForValue(n.ticks.reverse?t.min:t.max),o=g(t);e.textBaseline="top";for(var s,l,u,d,h=f(t)-1;0<=h;h--)i.display&&(u=t.getPointPosition(h,r),e.beginPath(),e.moveTo(t.xCenter,t.yCenter),e.lineTo(u.x,u.y),e.stroke(),e.closePath()),a.display&&(s=t.getPointPosition(h,r+5),d=p.valueAtIndexOrDefault(a.fontColor,h,c.defaultFontColor),e.font=o.font,e.fillStyle=d,l=t.getIndexAngle(h),u=p.toDegrees(l),e.textAlign=0===(d=u)||180===d?"center":d<180?"left":"right",l=u,d=t._pointLabelSizes[h],u=s,90===l||270===l?u.y-=d.h/2:(270>1)-1]||null,r=t[i],!a)return{lo:null,hi:r};if(r[e]n))return{lo:a,hi:r};s=i-1}}return{lo:r,hi:null}}(t,e,n),r=a.lo?a.hi?a.lo:t[t.length-2]:t[0],a=a.lo?a.hi||t[t.length-1]:t[1],t=a[e]-r[e],t=t?(n-r[e])/t:0,t=(a[i]-r[i])*t;return r[i]+t}function M(t,e){var n=e.parser,e=e.parser||e.format;return"function"==typeof n?n(t):"string"==typeof t&&"string"==typeof e?b(t,e):!(t=!(t instanceof b)?b(t):t).isValid()&&"function"==typeof e?e(t):t}function S(t,e){if(m.isNullOrUndef(t))return null;var n=e.options.time,t=M(e.getRightValue(t),n);return t.isValid()?(n.round&&t.startOf(n.round),t.valueOf()):null}function D(t){for(var e=_.indexOf(t)+1,n=_.length;e=_.indexOf(e);o--)if(a=_[o],x[a].common&&r.as(a)>=t.length)return a;return _[e?_.indexOf(e):0]}(y,p.minUnit,c.min,c.max),c._majorUnit=D(c._unit),c._table=function(t,e,n,i){if("linear"===i||!t.length)return[{time:e,pos:0},{time:n,pos:1}];for(var a,r,o,s=[],l=[e],u=0,d=t.length;u>>0,i=0;iwt(t)?(r=t+1,a-wt(t)):(r=t,a);return{year:r,dayOfYear:a}}function Et(t,e,n){var i,a,r=Vt(t.year(),e,n),r=Math.floor((t.dayOfYear()-r-1)/7)+1;return r<1?i=r+jt(a=t.year()-1,e,n):r>jt(t.year(),e,n)?(i=r-jt(t.year(),e,n),a=t.year()+1):(a=t.year(),i=r),{week:i,year:a}}function jt(t,e,n){var i=Vt(t,e,n),n=Vt(t+1,e,n);return(wt(t)-i+n)/7}B("w",["ww",2],"wo","week"),B("W",["WW",2],"Wo","isoWeek"),A("week","w"),A("isoWeek","W"),Y("week",5),Y("isoWeek",5),lt("w",J),lt("ww",J,q),lt("W",J),lt("WW",J,q),ft(["w","ww","W","WW"],function(t,e,n,i){e[i.substr(0,1)]=k(t)});B("d",0,"do","day"),B("dd",0,0,function(t){return this.localeData().weekdaysMin(this,t)}),B("ddd",0,0,function(t){return this.localeData().weekdaysShort(this,t)}),B("dddd",0,0,function(t){return this.localeData().weekdays(this,t)}),B("e",0,0,"weekday"),B("E",0,0,"isoWeekday"),A("day","d"),A("weekday","e"),A("isoWeekday","E"),Y("day",11),Y("weekday",11),Y("isoWeekday",11),lt("d",J),lt("e",J),lt("E",J),lt("dd",function(t,e){return e.weekdaysMinRegex(t)}),lt("ddd",function(t,e){return e.weekdaysShortRegex(t)}),lt("dddd",function(t,e){return e.weekdaysRegex(t)}),ft(["dd","ddd","dddd"],function(t,e,n,i){i=n._locale.weekdaysParse(t,i,n._strict);null!=i?e.d=i:f(n).invalidWeekday=t}),ft(["d","e","E"],function(t,e,n,i){e[i]=k(t)});var Ut="Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_");var qt="Sun_Mon_Tue_Wed_Thu_Fri_Sat".split("_");var Gt="Su_Mo_Tu_We_Th_Fr_Sa".split("_");var Zt=ot;var Xt=ot;var Jt=ot;function Kt(){function t(t,e){return e.length-t.length}for(var e,n,i,a=[],r=[],o=[],s=[],l=0;l<7;l++)i=d([2e3,1]).day(l),e=this.weekdaysMin(i,""),n=this.weekdaysShort(i,""),i=this.weekdays(i,""),a.push(e),r.push(n),o.push(i),s.push(e),s.push(n),s.push(i);for(a.sort(t),r.sort(t),o.sort(t),s.sort(t),l=0;l<7;l++)r[l]=dt(r[l]),o[l]=dt(o[l]),s[l]=dt(s[l]);this._weekdaysRegex=new RegExp("^("+s.join("|")+")","i"),this._weekdaysShortRegex=this._weekdaysRegex,this._weekdaysMinRegex=this._weekdaysRegex,this._weekdaysStrictRegex=new RegExp("^("+o.join("|")+")","i"),this._weekdaysShortStrictRegex=new RegExp("^("+r.join("|")+")","i"),this._weekdaysMinStrictRegex=new RegExp("^("+a.join("|")+")","i")}function $t(){return this.hours()%12||12}function Qt(t,e){B(t,0,0,function(){return this.localeData().meridiem(this.hours(),this.minutes(),e)})}function te(t,e){return e._meridiemParse}B("H",["HH",2],0,"hour"),B("h",["hh",2],0,$t),B("k",["kk",2],0,function(){return this.hours()||24}),B("hmm",0,0,function(){return""+$t.apply(this)+W(this.minutes(),2)}),B("hmmss",0,0,function(){return""+$t.apply(this)+W(this.minutes(),2)+W(this.seconds(),2)}),B("Hmm",0,0,function(){return""+this.hours()+W(this.minutes(),2)}),B("Hmmss",0,0,function(){return""+this.hours()+W(this.minutes(),2)+W(this.seconds(),2)}),Qt("a",!0),Qt("A",!1),A("hour","h"),Y("hour",13),lt("a",te),lt("A",te),lt("H",J),lt("h",J),lt("k",J),lt("HH",J,q),lt("hh",J,q),lt("kk",J,q),lt("hmm",K),lt("hmmss",$),lt("Hmm",K),lt("Hmmss",$),ct(["H","HH"],vt),ct(["k","kk"],function(t,e,n){t=k(t);e[vt]=24===t?0:t}),ct(["a","A"],function(t,e,n){n._isPm=n._locale.isPM(t),n._meridiem=t}),ct(["h","hh"],function(t,e,n){e[vt]=k(t),f(n).bigHour=!0}),ct("hmm",function(t,e,n){var i=t.length-2;e[vt]=k(t.substr(0,i)),e[yt]=k(t.substr(i)),f(n).bigHour=!0}),ct("hmmss",function(t,e,n){var i=t.length-4,a=t.length-2;e[vt]=k(t.substr(0,i)),e[yt]=k(t.substr(i,2)),e[bt]=k(t.substr(a)),f(n).bigHour=!0}),ct("Hmm",function(t,e,n){var i=t.length-2;e[vt]=k(t.substr(0,i)),e[yt]=k(t.substr(i))}),ct("Hmmss",function(t,e,n){var i=t.length-4,a=t.length-2;e[vt]=k(t.substr(0,i)),e[yt]=k(t.substr(i,2)),e[bt]=k(t.substr(a))});var ee,ne=Ct("Hours",!0),ie={calendar:{sameDay:"[Today at] LT",nextDay:"[Tomorrow at] LT",nextWeek:"dddd [at] LT",lastDay:"[Yesterday at] LT",lastWeek:"[Last] dddd [at] LT",sameElse:"L"},longDateFormat:{LTS:"h:mm:ss A",LT:"h:mm A",L:"MM/DD/YYYY",LL:"MMMM D, YYYY",LLL:"MMMM D, YYYY h:mm A",LLLL:"dddd, MMMM D, YYYY h:mm A"},invalidDate:"Invalid date",ordinal:"%d",dayOfMonthOrdinalParse:/\d{1,2}/,relativeTime:{future:"in %s",past:"%s ago",s:"a few seconds",ss:"%d seconds",m:"a minute",mm:"%d minutes",h:"an hour",hh:"%d hours",d:"a day",dd:"%d days",M:"a month",MM:"%d months",y:"a year",yy:"%d years"},months:At,monthsShort:Ft,week:{dow:0,doy:6},weekdays:Ut,weekdaysMin:Gt,weekdaysShort:qt,meridiemParse:/[ap]\.?m?\.?/i},ae={},re={};function oe(t){return t&&t.toLowerCase().replace("_","-")}function se(t){if(!ae[t]&&void 0!==_n&&_n&&_n.exports)try{var e=ee._abbr;xn("./locale/"+t),le(e)}catch(t){}return ae[t]}function le(t,e){var n;return(ee=t&&(n=r(e)?de(t):ue(t,e))?n:ee)._abbr}function ue(t,e){if(null===e)return delete ae[t],null;var n=ie;if(e.abbr=t,null!=ae[t])D("defineLocaleOverride","use moment.updateLocale(localeName, config) to change an existing locale. moment.defineLocale(localeName, config) should only be used for creating a new locale See http://momentjs.com/guides/#/warnings/define-locale/ for more info."),n=ae[t]._config;else if(null!=e.parentLocale){if(null==ae[e.parentLocale])return re[e.parentLocale]||(re[e.parentLocale]=[]),re[e.parentLocale].push({name:t,config:e}),null;n=ae[e.parentLocale]._config}return ae[t]=new T(P(n,e)),re[t]&&re[t].forEach(function(t){ue(t.name,t.config)}),le(t),ae[t]}function de(t){var e;if(!(t=t&&t._locale&&t._locale._abbr?t._locale._abbr:t))return ee;if(!o(t)){if(e=se(t))return e;t=[t]}return function(t){for(var e,n,i,a,r=0;r=e&&w(a,n,!0)>=e-1)break;e--}r++}return null}(t)}function he(t){var e=t._a;return e&&-2===f(t).overflow&&(e=e[mt]<0||11Ot(e[gt],e[mt])?pt:e[vt]<0||24jt(n,r,o)?f(t)._overflowWeeks=!0:null!=s?f(t)._overflowWeekday=!0:(o=Bt(n,i,a,r,o),t._a[gt]=o.year,t._dayOfYear=o.dayOfYear)}(t),null!=t._dayOfYear&&(i=ce(t._a[gt],n[gt]),(t._dayOfYear>wt(i)||0===t._dayOfYear)&&(f(t)._overflowDayOfYear=!0),i=Ht(i,0,t._dayOfYear),t._a[mt]=i.getUTCMonth(),t._a[pt]=i.getUTCDate()),e=0;e<3&&null==t._a[e];++e)t._a[e]=o[e]=n[e];for(;e<7;e++)t._a[e]=o[e]=null==t._a[e]?2===e?1:0:t._a[e];24===t._a[vt]&&0===t._a[yt]&&0===t._a[bt]&&0===t._a[xt]&&(t._nextDay=!0,t._a[vt]=0),t._d=(t._useUTC?Ht:zt).apply(null,o),i=t._useUTC?t._d.getUTCDay():t._d.getDay(),null!=t._tzm&&t._d.setUTCMinutes(t._d.getUTCMinutes()-t._tzm),t._nextDay&&(t._a[vt]=24),t._w&&void 0!==t._w.d&&t._w.d!==i&&(f(t).weekdayMismatch=!0)}}var ge=/^\s*((?:[+-]\d{6}|\d{4})-(?:\d\d-\d\d|W\d\d-\d|W\d\d|\d\d\d|\d\d))(?:(T| )(\d\d(?::\d\d(?::\d\d(?:[.,]\d+)?)?)?)([\+\-]\d\d(?::?\d\d)?|\s*Z)?)?$/,me=/^\s*((?:[+-]\d{6}|\d{4})(?:\d\d\d\d|W\d\d\d|W\d\d|\d\d\d|\d\d))(?:(T| )(\d\d(?:\d\d(?:\d\d(?:[.,]\d+)?)?)?)([\+\-]\d\d(?::?\d\d)?|\s*Z)?)?$/,pe=/Z|[+-]\d\d(?::?\d\d)?/,ve=[["YYYYYY-MM-DD",/[+-]\d{6}-\d\d-\d\d/],["YYYY-MM-DD",/\d{4}-\d\d-\d\d/],["GGGG-[W]WW-E",/\d{4}-W\d\d-\d/],["GGGG-[W]WW",/\d{4}-W\d\d/,!1],["YYYY-DDD",/\d{4}-\d{3}/],["YYYY-MM",/\d{4}-\d\d/,!1],["YYYYYYMMDD",/[+-]\d{10}/],["YYYYMMDD",/\d{8}/],["GGGG[W]WWE",/\d{4}W\d{3}/],["GGGG[W]WW",/\d{4}W\d{2}/,!1],["YYYYDDD",/\d{7}/]],ye=[["HH:mm:ss.SSSS",/\d\d:\d\d:\d\d\.\d+/],["HH:mm:ss,SSSS",/\d\d:\d\d:\d\d,\d+/],["HH:mm:ss",/\d\d:\d\d:\d\d/],["HH:mm",/\d\d:\d\d/],["HHmmss.SSSS",/\d\d\d\d\d\d\.\d+/],["HHmmss,SSSS",/\d\d\d\d\d\d,\d+/],["HHmmss",/\d\d\d\d\d\d/],["HHmm",/\d\d\d\d/],["HH",/\d\d/]],be=/^\/?Date\((\-?\d+)/i;function xe(t){var e,n,i,a,r,o,s=t._i,l=ge.exec(s)||me.exec(s);if(l){for(f(t).iso=!0,e=0,n=ve.length;et.valueOf():t.valueOf()this.clone().month(0).utcOffset()||this.utcOffset()>this.clone().month(5).utcOffset()},Z.isLocal=function(){return!!this.isValid()&&!this._isUTC},Z.isUtcOffset=function(){return!!this.isValid()&&this._isUTC},Z.isUtc=Ve,Z.isUTC=Ve,Z.zoneAbbr=function(){return this._isUTC?"UTC":""},Z.zoneName=function(){return this._isUTC?"Coordinated Universal Time":""},Z.dates=n("dates accessor is deprecated. Use date instead.",At),Z.months=n("months accessor is deprecated. Use month instead",Lt),Z.years=n("years accessor is deprecated. Use year instead",Dt),Z.zone=n("moment().zone is deprecated, use moment().utcOffset instead. http://momentjs.com/guides/#/warnings/zone/",function(t,e){return null!=t?(this.utcOffset(t="string"!=typeof t?-t:t,e),this):-this.utcOffset()}),Z.isDSTShifted=n("isDSTShifted is deprecated. See http://momentjs.com/guides/#/warnings/dst-shifted/ for more information",function(){if(!r(this._isDSTShifted))return this._isDSTShifted;var t,e={};return y(e,this),(e=De(e))._a?(t=(e._isUTC?d:Pe)(e._a),this._isDSTShifted=this.isValid()&&0');var t=t.data,n=t.datasets,i=t.labels;if(n.length)for(var a=0;a'),i[a]&&e.push(i[a]),e.push("");return e.push(""),e.join("")},legend:{labels:{generateLabels:function(s){var l=s.data;return l.labels.length&&l.datasets.length?l.labels.map(function(t,e){var n=s.getDatasetMeta(0),i=l.datasets[0],a=n.data[e],r=a&&a.custom||{},o=y.valueAtIndexOrDefault,a=s.options.elements.arc;return{text:t,fillStyle:r.backgroundColor||o(i.backgroundColor,e,a.backgroundColor),strokeStyle:r.borderColor||o(i.borderColor,e,a.borderColor),lineWidth:r.borderWidth||o(i.borderWidth,e,a.borderWidth),hidden:isNaN(i.data[e])||n.data[e].hidden,index:e}}):[]}},onClick:function(t,e){for(var n,i=e.index,a=this.chart,r=0,o=(a.data.datasets||[]).length;r=Math.PI?-1:i<-Math.PI?1:0))+v,t=Math.cos(i),e=Math.sin(i),a=Math.cos(r),l=Math.sin(r),d=i<=0&&0<=r||i<=2*Math.PI&&2*Math.PI<=r,u=i<=.5*Math.PI&&.5*Math.PI<=r||i<=2.5*Math.PI&&2.5*Math.PI<=r,v=i<=-Math.PI&&-Math.PI<=r||i<=Math.PI&&Math.PI<=r,i=i<=.5*-Math.PI&&.5*-Math.PI<=r||i<=1.5*Math.PI&&1.5*Math.PI<=r,r=p/100,v=v?-1:Math.min(t*(t<0?1:r),a*(a<0?1:r)),i=i?-1:Math.min(e*(e<0?1:r),l*(l<0?1:r)),a=d?1:Math.max(t*(0');var t=t.data,n=t.datasets,i=t.labels;if(n.length)for(var a=0;a'),i[a]&&e.push(i[a]),e.push("");return e.push(""),e.join("")},legend:{labels:{generateLabels:function(s){var l=s.data;return l.labels.length&&l.datasets.length?l.labels.map(function(t,e){var n=s.getDatasetMeta(0),i=l.datasets[0],a=n.data[e].custom||{},r=y.valueAtIndexOrDefault,o=s.options.elements.arc;return{text:t,fillStyle:a.backgroundColor||r(i.backgroundColor,e,o.backgroundColor),strokeStyle:a.borderColor||r(i.borderColor,e,o.borderColor),lineWidth:a.borderWidth||r(i.borderWidth,e,o.borderWidth),hidden:isNaN(i.data[e])||n.data[e].hidden,index:e}}):[]}},onClick:function(t,e){for(var n,i=e.index,a=this.chart,r=0,o=(a.data.datasets||[]).length;r=e.numSteps?(r.callback(e.onAnimationComplete,[e],n),n.animating=!1,i.splice(a,1)):++a}},Object.defineProperty(t.Animation.prototype,"animationObject",{get:function(){return this}}),Object.defineProperty(t.Animation.prototype,"chartInstance",{get:function(){return this.chart},set:function(t){this.chart=t}})}},{25:25,26:26,45:45}],23:[function(t,e,n){"use strict";var o=t(25),h=t(45),i=t(28),a=t(30),s=t(48),l=t(31);e.exports=function(u){function d(t){return"top"===t||"bottom"===t}u.types={},u.instances={},u.controllers={},h.extend(u.prototype,{construct:function(t,e){var n=this;(a=(r=(r=e)||{}).data=r.data||{}).datasets=a.datasets||[],a.labels=a.labels||[],r.options=h.configMerge(o.global,o[r.type],r.options||{});var i=s.acquireContext(t,e=r),a=i&&i.canvas,t=a&&a.height,r=a&&a.width;n.id=h.uid(),n.ctx=i,n.canvas=a,n.config=e,n.width=r,n.height=t,n.aspectRatio=t?r/t:null,n.options=e.options,n._bufferedRender=!1,(n.chart=n).controller=n,u.instances[n.id]=n,Object.defineProperty(n,"data",{get:function(){return n.config.data},set:function(t){n.config.data=t}}),i&&a?(n.initialize(),n.update()):console.error("Failed to create chart: can't acquire context from the given item")},initialize:function(){var t=this;return l.notify(t,"beforeInit"),h.retinaScale(t,t.options.devicePixelRatio),t.bindEvents(),t.options.responsive&&t.resize(!0),t.ensureScalesHaveIDs(),t.buildOrUpdateScales(),t.initToolTip(),l.notify(t,"afterInit"),t},clear:function(){return h.canvas.clear(this),this},stop:function(){return u.animationService.cancelAnimation(this),this},resize:function(t){var e=this,n=e.options,i=e.canvas,a=n.maintainAspectRatio&&e.aspectRatio||null,r=Math.max(0,Math.floor(h.getMaximumWidth(i))),a=Math.max(0,Math.floor(a?r/a:h.getMaximumHeight(i)));e.width===r&&e.height===a||(i.width=e.width=r,i.height=e.height=a,i.style.width=r+"px",i.style.height=a+"px",h.retinaScale(e,n.devicePixelRatio),t||(l.notify(e,"resize",[a={width:r,height:a}]),e.options.onResize&&e.options.onResize(e,a),e.stop(),e.update(e.options.responsiveAnimationDuration)))},ensureScalesHaveIDs:function(){var t=this.options,e=t.scales||{},t=t.scale;h.each(e.xAxes,function(t,e){t.id=t.id||"x-axis-"+e}),h.each(e.yAxes,function(t,e){t.id=t.id||"y-axis-"+e}),t&&(t.id=t.id||"scale")},buildOrUpdateScales:function(){var o=this,t=o.options,s=o.scales||{},e=[],l=Object.keys(s).reduce(function(t,e){return t[e]=!1,t},{});t.scales&&(e=e.concat((t.scales.xAxes||[]).map(function(t){return{options:t,dtype:"category",dposition:"bottom"}}),(t.scales.yAxes||[]).map(function(t){return{options:t,dtype:"linear",dposition:"left"}}))),t.scale&&e.push({options:t.scale,dtype:"radialLinear",isDefault:!0,dposition:"chartArea"}),h.each(e,function(t){var e=t.options,n=e.id,i=h.valueOrDefault(e.type,t.dtype);d(e.position)!==d(t.dposition)&&(e.position=t.dposition),l[n]=!0;var a=null;if(n in s&&s[n].type===i)(a=s[n]).options=e,a.ctx=o.ctx,a.chart=o;else{var r=u.scaleService.getScaleConstructor(i);if(!r)return;a=new r({id:n,type:i,options:e,ctx:o.ctx,chart:o}),s[a.id]=a}a.mergeTicksOptions(),t.isDefault&&(o.scale=a)}),h.each(l,function(t,e){t||delete s[e]}),o.scales=s,u.scaleService.addScalesToLayout(this)},buildOrUpdateControllers:function(){var i=this,a=[],r=[];return h.each(i.data.datasets,function(t,e){var n=i.getDatasetMeta(e),t=t.type||i.config.type;if(n.type&&n.type!==t&&(i.destroyDatasetMeta(e),n=i.getDatasetMeta(e)),n.type=t,a.push(n.type),n.controller)n.controller.updateIndex(e),n.controller.linkScales();else{t=u.controllers[n.type];if(void 0===t)throw new Error('"'+n.type+'" is not a chart type.');n.controller=new t(i,e),r.push(n.controller)}},i),r},resetElements:function(){var n=this;h.each(n.data.datasets,function(t,e){n.getDatasetMeta(e).controller.reset()},n)},reset:function(){this.resetElements(),this.tooltip.initialize()},update:function(t){var e,n,i=this;t&&"object"==typeof t||(t={duration:t,lazy:arguments[1]}),n=(e=i).options,h.each(e.scales,function(t){a.removeBox(e,t)}),n=h.configMerge(u.defaults.global,u.defaults[e.config.type],n),e.options=e.config.options=n,e.ensureScalesHaveIDs(),e.buildOrUpdateScales(),e.tooltip._options=n.tooltips,e.tooltip.initialize(),l._invalidate(i),!1!==l.notify(i,"beforeUpdate")&&(i.tooltip._data=i.data,n=i.buildOrUpdateControllers(),h.each(i.data.datasets,function(t,e){i.getDatasetMeta(e).controller.buildOrUpdateElements()},i),i.updateLayout(),i.options.animation&&i.options.animation.duration&&h.each(n,function(t){t.reset()}),i.updateDatasets(),i.tooltip.initialize(),i.lastActive=[],l.notify(i,"afterUpdate"),i._bufferedRender?i._bufferedRequest={duration:t.duration,easing:t.easing,lazy:t.lazy}:i.render(t))},updateLayout:function(){!1!==l.notify(this,"beforeLayout")&&(a.update(this,this.width,this.height),l.notify(this,"afterScaleUpdate"),l.notify(this,"afterLayout"))},updateDatasets:function(){if(!1!==l.notify(this,"beforeDatasetsUpdate")){for(var t=0,e=this.data.datasets.length;t=e[t].length&&e[t].push({}),!e[t][a].type||o.type&&o.type!==e[t][a].type?c.merge(e[t][a],[l.scaleService.getScaleDefaults(r),o]):c.merge(e[t][a],o)}else c._merger(t,e,n,i)}})},c.where=function(t,e){if(c.isArray(t)&&Array.prototype.filter)return t.filter(e);var n=[];return c.each(t,function(t){e(t)&&n.push(t)}),n},c.findIndex=Array.prototype.findIndex?function(t,e,n){return t.findIndex(e,n)}:function(t,e,n){n=void 0===n?t:n;for(var i=0,a=t.length;i=t.length-1?t[0]:t[e+1]:e>=t.length-1?t[t.length-1]:t[e+1]},c.previousItem=function(t,e,n){return n?e<=0?t[t.length-1]:t[e-1]:e<=0?t[0]:t[e-1]},c.niceNum=function(t,e){var n=Math.floor(c.log10(t)),t=t/Math.pow(10,n),t=e?t<1.5?1:t<3?2:t<7?5:10:t<=1?1:t<=2?2:t<=5?5:10;return t*Math.pow(10,n)},c.requestAnimFrame="undefined"==typeof window?function(t){t()}:window.requestAnimationFrame||window.webkitRequestAnimationFrame||window.mozRequestAnimationFrame||window.oRequestAnimationFrame||window.msRequestAnimationFrame||function(t){return window.setTimeout(t,1e3/60)},c.getRelativePosition=function(t,e){var n=t.originalEvent||t,i=t.currentTarget||t.srcElement,a=i.getBoundingClientRect(),r=n.touches,o=r&&0n.length){for(var l=0;le&&(e=t.length)}),e},c.color=i?function(t){return t instanceof CanvasGradient&&(t=a.global.defaultColor),i(t)}:function(t){return console.error("Color.js not found!"),t},c.getHoverColor=function(t){return t instanceof CanvasPattern?t:c.color(t).saturate(.5).darken(.1).rgbString()}}},{2:2,25:25,45:45}],28:[function(t,e,n){"use strict";var i=t(45);function o(t,e){return t.native?{x:t.x,y:t.y}:i.getRelativePosition(t,e)}function s(t,e){for(var n,i,a,r=0,o=t.data.datasets.length;rt.maxHeight){r--;break}r++,s=d*o}t.labelRotation=r},afterCalculateTickRotation:function(){N.callback(this.options.afterCalculateTickRotation,[this])},beforeFit:function(){N.callback(this.options.beforeFit,[this])},fit:function(){var t,e=this,n=e.minSize={width:0,height:0},i=f(e._ticks),a=e.options,r=a.ticks,o=a.scaleLabel,s=a.gridLines,l=a.display,u=e.isHorizontal(),d=g(r),h=a.gridLines.tickMarkLength;n.width=u?e.isFullWidth()?e.maxWidth-e.margins.left-e.margins.right:e.maxWidth:l&&s.drawTicks?h:0,n.height=u?l&&s.drawTicks?h:0:e.maxHeight,o.display&&l&&(t=m(o)+N.options.toPadding(o.padding).height,u?n.height+=t:n.width+=t),r.display&&l&&(s=N.longestText(e.ctx,d.font,i,e.longestTextCache),h=N.numberOfLabelLines(i),o=.5*d.size,t=e.options.ticks.padding,u?(e.longestLabelWidth=s,l=N.toRadians(e.labelRotation),u=Math.cos(l),h=Math.sin(l)*s+d.size*h+o*(h-1)+o,n.height=Math.min(e.maxHeight,n.height+h+t),e.ctx.font=d.font,h=c(e.ctx,i[0],d.font),i=c(e.ctx,i[i.length-1],d.font),0!==e.labelRotation?(e.paddingLeft="bottom"===a.position?u*h+3:u*o+3,e.paddingRight="bottom"===a.position?u*o+3:u*i+3):(e.paddingLeft=h/2+3,e.paddingRight=i/2+3)):(r.mirror?s=0:s+=t+o,n.width=Math.min(e.maxWidth,n.width+s),e.paddingTop=d.size/2,e.paddingBottom=d.size/2)),e.handleMargins(),e.width=n.width,e.height=n.height},handleMargins:function(){var t=this;t.margins&&(t.paddingLeft=Math.max(t.paddingLeft-t.margins.left,0),t.paddingTop=Math.max(t.paddingTop-t.margins.top,0),t.paddingRight=Math.max(t.paddingRight-t.margins.right,0),t.paddingBottom=Math.max(t.paddingBottom-t.margins.bottom,0))},afterFit:function(){N.callback(this.options.afterFit,[this])},isHorizontal:function(){return"top"===this.options.position||"bottom"===this.options.position},isFullWidth:function(){return this.options.fullWidth},getRightValue:function(t){if(N.isNullOrUndef(t))return NaN;if("number"==typeof t&&!isFinite(t))return NaN;if(t)if(this.isHorizontal()){if(void 0!==t.x)return this.getRightValue(t.x)}else if(void 0!==t.y)return this.getRightValue(t.y);return t},getLabelForIndex:N.noop,getPixelForValue:N.noop,getValueForPixel:N.noop,getPixelForTick:function(t){var e=this,n=e.options.offset;if(e.isHorizontal()){var i=(e.width-(e.paddingLeft+e.paddingRight))/Math.max(e._ticks.length-(n?0:1),1),a=i*t+e.paddingLeft;n&&(a+=i/2);a=e.left+Math.round(a);return a+=e.isFullWidth()?e.margins.left:0}a=e.height-(e.paddingTop+e.paddingBottom);return e.top+t*(a/(e._ticks.length-1))},getPixelForDecimal:function(t){var e=this;if(e.isHorizontal()){var n=(e.width-(e.paddingLeft+e.paddingRight))*t+e.paddingLeft,n=e.left+Math.round(n);return n+=e.isFullWidth()?e.margins.left:0}return e.top+t*e.height},getBasePixel:function(){return this.getPixelForValue(this.getBaseValue())},getBaseValue:function(){var t=this.min,e=this.max;return this.beginAtZero?0:t<0&&e<0?e:0r.width-(r.paddingLeft+r.paddingRight)&&(e=1+Math.floor((u+s.autoSkipPadding)*l/(r.width-(r.paddingLeft+r.paddingRight)))),a&&aa.height-e.height&&(s="bottom");var l=(r.left+r.right)/2,u=(r.top+r.bottom)/2,d="center"===s?(n=function(t){return t<=l},function(t){return l=a.width-e.width/2}),h=function(t){return t+e.width+i.caretSize+i.caretPadding>a.width},c=function(t){return t-e.width-i.caretSize-i.caretPadding<0},r=function(t){return t<=u?"top":"bottom"};return n(i.x)?(o="left",h(i.x)&&(o="center",s=r(i.y))):d(i.x)&&(o="right",c(i.x)&&(o="center",s=r(i.y))),{xAlign:(t=t._options).xAlign||o,yAlign:t.yAlign||s}}(this,k=I(this,v)),e=v,n=k,i=x,a=g._chart,r=e.x,o=e.y,s=e.caretSize,l=e.caretPadding,p=e.cornerRadius,e=i.xAlign,i=i.yAlign,s+=l,l=p+l,"right"===e?r-=n.width:"center"===e&&(r=(r-=n.width/2)+n.width>a.width?a.width-n.width:r)<0&&(r=0),"top"===i?o+=s:o-="bottom"===i?n.height+s:n.height/2,"center"===i?"left"===e?r+=s:"right"===e&&(r-=s):"left"===e?r-=l:"right"===e&&(r+=l),_={x:r,y:o}}else v.opacity=0;return v.xAlign=x.xAlign,v.yAlign=x.yAlign,v.x=_.x,v.y=_.y,v.width=k.width,v.height=k.height,v.caretX=w.x,v.caretY=w.y,g._model=v,t&&m.custom&&m.custom.call(g,v),g},drawCaret:function(t,e){var n=this._chart.ctx,i=this._view,i=this.getCaretPosition(t,e,i);n.lineTo(i.x1,i.y1),n.lineTo(i.x2,i.y2),n.lineTo(i.x3,i.y3)},getCaretPosition:function(t,e,n){var i,a,r,o,s,l,u=n.caretSize,d=n.cornerRadius,h=n.xAlign,c=n.yAlign,f=t.x,g=t.y,t=e.width,e=e.height;return"center"===c?(r=g+e/2,o="left"===h?(i=(l=f)-u,s=l,a=r+u,r-u):(i=(l=f+t)+u,s=l,a=r-u,r+u)):(s=(l="left"===h?(i=f+d+u)-u:"right"===h?(i=f+t-d-u)-u:(i=n.caretX)-u,i+u),"top"===c?(r=(a=g)-u,o=a):(r=(a=g+e)+u,o=a,u=s,s=l,l=u)),{x1:l,x2:i,x3:s,y1:a,y2:r,y3:o}},drawTitle:function(t,e,n,i){var a=e.title;if(a.length){n.textAlign=e._titleAlign,n.textBaseline="top";var r,o,s=e.titleFontSize,l=e.titleSpacing;for(n.fillStyle=h(e.titleFontColor,i),n.font=A.fontString(s,e._titleFontStyle,e._titleFontFamily),r=0,o=a.length;r=n.innerRadius&&e<=n.outerRadius;return a<=i&&i<=r&&n}return!1},getCenterPoint:function(){var t=this._view,e=(t.startAngle+t.endAngle)/2,n=(t.innerRadius+t.outerRadius)/2;return{x:t.x+Math.cos(e)*n,y:t.y+Math.sin(e)*n}},getArea:function(){var t=this._view;return Math.PI*((t.endAngle-t.startAngle)/(2*Math.PI))*(Math.pow(t.outerRadius,2)-Math.pow(t.innerRadius,2))},tooltipPosition:function(){var t=this._view,e=t.startAngle+(t.endAngle-t.startAngle)/2,n=(t.outerRadius-t.innerRadius)/2+t.innerRadius;return{x:t.x+Math.cos(e)*n,y:t.y+Math.sin(e)*n}},draw:function(){var t=this._chart.ctx,e=this._view,n=e.startAngle,i=e.endAngle;t.beginPath(),t.arc(e.x,e.y,e.outerRadius,n,i),t.arc(e.x,e.y,e.innerRadius,i,n,!0),t.closePath(),t.strokeStyle=e.borderColor,t.lineWidth=e.borderWidth,t.fillStyle=e.backgroundColor,t.fill(),t.lineJoin="bevel",e.borderWidth&&t.stroke()}})},{25:25,26:26,45:45}],37:[function(t,e,n){"use strict";var i=t(25),a=t(26),d=t(45),h=i.global;i._set("global",{elements:{line:{tension:.4,backgroundColor:h.defaultColor,borderWidth:3,borderColor:h.defaultColor,borderCapStyle:"butt",borderDash:[],borderDashOffset:0,borderJoinStyle:"miter",capBezierPoints:!0,fill:!0}}}),e.exports=a.extend({draw:function(){var t,e,n,i,a=this._view,r=this._chart.ctx,o=a.spanGaps,s=this._children.slice(),l=h.elements.line,u=-1;for(this._loop&&s.length&&s.push(s[0]),r.save(),r.lineCap=a.borderCapStyle||l.borderCapStyle,r.setLineDash&&r.setLineDash(a.borderDash||l.borderDash),r.lineDashOffset=a.borderDashOffset||l.borderDashOffset,r.lineJoin=a.borderJoinStyle||l.borderJoinStyle,r.lineWidth=a.borderWidth||l.borderWidth,r.strokeStyle=a.borderColor||h.defaultColor,r.beginPath(),u=-1,t=0;t=(n=a(this)).left&&t<=n.right&&e>=n.top&&e<=n.bottom:i},inLabelRange:function(t,e){if(!this._view)return!1;var n=a(this);return o(this)?t>=n.left&&t<=n.right:e>=n.top&&e<=n.bottom},inXRange:function(t){var e=a(this);return t>=e.left&&t<=e.right},inYRange:function(t){var e=a(this);return t>=e.top&&t<=e.bottom},getCenterPoint:function(){var t,e=this._view,e=o(this)?(t=e.x,(e.y+e.base)/2):(t=(e.x+e.base)/2,e.y);return{x:t,y:e}},getArea:function(){var t=this._view;return t.width*Math.abs(t.y-t.base)},tooltipPosition:function(){var t=this._view;return{x:t.x,y:t.y}}})},{25:25,26:26}],40:[function(t,e,n){"use strict";e.exports={},e.exports.Arc=t(36),e.exports.Line=t(37),e.exports.Point=t(38),e.exports.Rectangle=t(39)},{36:36,37:37,38:38,39:39}],41:[function(t,e,n){"use strict";t=t(42),n=e.exports={clear:function(t){t.ctx.clearRect(0,0,t.width,t.height)},roundedRect:function(t,e,n,i,a,r){var o;r?(o=Math.min(r,i/2),r=Math.min(r,a/2),t.moveTo(e+o,n),t.lineTo(e+i-o,n),t.quadraticCurveTo(e+i,n,e+i,n+r),t.lineTo(e+i,n+a-r),t.quadraticCurveTo(e+i,n+a,e+i-o,n+a),t.lineTo(e+o,n+a),t.quadraticCurveTo(e,n+a,e,n+a-r),t.lineTo(e,n+r),t.quadraticCurveTo(e,n,e+o,n)):t.rect(e,n,i,a)},drawPoint:function(t,e,n,i,a){var r,o,s,l;if(!e||"object"!=typeof e||"[object HTMLImageElement]"!==(r=e.toString())&&"[object HTMLCanvasElement]"!==r){if(!(isNaN(n)||n<=0)){switch(e){default:t.beginPath(),t.arc(i,a,n,0,2*Math.PI),t.closePath(),t.fill();break;case"triangle":t.beginPath(),h=(d=3*n/Math.sqrt(3))*Math.sqrt(3)/2,t.moveTo(i-d/2,a+h/3),t.lineTo(i+d/2,a+h/3),t.lineTo(i,a-2*h/3),t.closePath(),t.fill();break;case"rect":l=1/Math.SQRT2*n,t.beginPath(),t.fillRect(i-l,a-l,2*l,2*l),t.strokeRect(i-l,a-l,2*l,2*l);break;case"rectRounded":var u=n/Math.SQRT2,d=i-u,h=a-u,u=Math.SQRT2*n;t.beginPath(),this.roundedRect(t,d,h,u,u,n/2),t.closePath(),t.fill();break;case"rectRot":l=1/Math.SQRT2*n,t.beginPath(),t.moveTo(i-l,a),t.lineTo(i,a+l),t.lineTo(i+l,a),t.lineTo(i,a-l),t.closePath(),t.fill();break;case"cross":t.beginPath(),t.moveTo(i,a+n),t.lineTo(i,a-n),t.moveTo(i-n,a),t.lineTo(i+n,a),t.closePath();break;case"crossRot":t.beginPath(),o=Math.cos(Math.PI/4)*n,s=Math.sin(Math.PI/4)*n,t.moveTo(i-o,a-s),t.lineTo(i+o,a+s),t.moveTo(i-o,a+s),t.lineTo(i+o,a-s),t.closePath();break;case"star":t.beginPath(),t.moveTo(i,a+n),t.lineTo(i,a-n),t.moveTo(i-n,a),t.lineTo(i+n,a),o=Math.cos(Math.PI/4)*n,s=Math.sin(Math.PI/4)*n,t.moveTo(i-o,a-s),t.lineTo(i+o,a+s),t.moveTo(i-o,a+s),t.lineTo(i+o,a-s),t.closePath();break;case"line":t.beginPath(),t.moveTo(i-n,a),t.lineTo(i+n,a),t.closePath();break;case"dash":t.beginPath(),t.moveTo(i,a),t.lineTo(i+n,a),t.closePath()}t.stroke()}}else t.drawImage(e,i-e.width/2,a-e.height/2,e.width,e.height)},clipArea:function(t,e){t.save(),t.beginPath(),t.rect(e.left,e.top,e.right-e.left,e.bottom-e.top),t.clip()},unclipArea:function(t){t.restore()},lineTo:function(t,e,n,i){if(n.steppedLine)return"after"===n.steppedLine&&!i||"after"!==n.steppedLine&&i?t.lineTo(e.x,n.y):t.lineTo(n.x,e.y),void t.lineTo(n.x,n.y);n.tension?t.bezierCurveTo(i?e.controlPointPreviousX:e.controlPointNextX,i?e.controlPointPreviousY:e.controlPointNextY,i?n.controlPointNextX:n.controlPointPreviousX,i?n.controlPointNextY:n.controlPointPreviousY,n.x,n.y):t.lineTo(n.x,n.y)}};t.clear=n.clear,t.drawRoundedRectangle=function(t){t.beginPath(),n.roundedRect.apply(n,arguments),t.closePath()}},{42:42}],42:[function(t,e,n){"use strict";var i,d={noop:function(){},uid:(i=0,function(){return i++}),isNullOrUndef:function(t){return null==t},isArray:Array.isArray||function(t){return"[object Array]"===Object.prototype.toString.call(t)},isObject:function(t){return null!==t&&"[object Object]"===Object.prototype.toString.call(t)},valueOrDefault:function(t,e){return void 0===t?e:t},valueAtIndexOrDefault:function(t,e,n){return d.valueOrDefault(d.isArray(t)?t[e]:t,n)},callback:function(t,e,n){if(t&&"function"==typeof t.call)return t.apply(n,e)},each:function(t,e,n,i){var a,r,o;if(d.isArray(t))if(r=t.length,i)for(a=r-1;0<=a;a--)e.call(n,t[a],a);else for(a=0;a
';var a=e.childNodes[0],r=e.childNodes[1];return e._reset=function(){a.scrollLeft=1e6,a.scrollTop=1e6,r.scrollLeft=1e6,r.scrollTop=1e6},b(a,"scroll",(i=function(){e._reset(),t()}).bind(a,"expand")),b(r,"scroll",i.bind(r,"shrink")),e}((i=function(){if(h.resizer)return t(x("resize",n))},o=!1,function(){r=Array.prototype.slice.call(arguments),a=a||this,o||(o=!0,f.requestAnimFrame.call(window,function(){o=!1,i.apply(a,r)}))}));l=function(){var t;h.resizer&&((t=e.parentNode)&&t!==c.parentNode&&t.insertBefore(c,t.firstChild),c._reset())},u=(s=e)[g]||(s[g]={}),d=u.renderProxy=function(t){t.animationName===v&&l()},f.each(y,function(t){b(s,t,d)}),u.reflow=!!s.offsetParent,s.classList.add(p)}function a(t){var e,n,i=t[g]||{},a=i.resizer;delete i.resizer,t=(e=t)[g]||{},(n=t.renderProxy)&&(f.each(y,function(t){r(e,t,n)}),delete t.renderProxy),e.classList.remove(p),a&&a.parentNode&&a.parentNode.removeChild(a)}e.exports={_enabled:"undefined"!=typeof window&&"undefined"!=typeof document,initialize:function(){var t,e,n="from{opacity:0.99}to{opacity:1}";e="@-webkit-keyframes "+v+"{"+n+"}@keyframes "+v+"{"+n+"}."+p+"{-webkit-animation:"+v+" 0.001s;animation:"+v+" 0.001s;}",n=(t=this)._style||document.createElement("style"),t._style||(e="/* Chart.js */\n"+e,(t._style=n).setAttribute("type","text/css"),document.getElementsByTagName("head")[0].appendChild(n)),n.appendChild(document.createTextNode(e))},acquireContext:function(t,e){"string"==typeof t?t=document.getElementById(t):t.length&&(t=t[0]);var n,i,a,r,o=(t=t&&t.canvas?t.canvas:t)&&t.getContext&&t.getContext("2d");return o&&o.canvas===t?(i=e,r=(n=t).style,e=n.getAttribute("height"),t=n.getAttribute("width"),n[g]={initial:{height:e,width:t,style:{display:r.display,height:r.height,width:r.width}}},r.display=r.display||"block",null!==t&&""!==t||void 0!==(a=s(n,"width"))&&(n.width=a),null!==e&&""!==e||(""===n.style.height?n.height=n.width/(i.options.aspectRatio||2):(i=s(n,"height"),void 0!==a&&(n.height=i))),o):null},releaseContext:function(t){var n,i=t.canvas;i[g]&&(n=i[g].initial,["height","width"].forEach(function(t){var e=n[t];f.isNullOrUndef(e)?i.removeAttribute(t):i.setAttribute(t,e)}),f.each(n.style||{},function(t,e){i.style[e]=t}),i.width=i.width,delete i[g])},addEventListener:function(a,t,r){var e,n=a.canvas;"resize"!==t?b(n,t,((e=r[g]||(r[g]={})).proxies||(e.proxies={}))[a.id+"_"+t]=function(t){var e,n,i;r((n=a,i=o[(e=t).type]||e.type,t=f.getRelativePosition(e,n),x(i,n,t.x,t.y,e)))}):l(n,r,a)},removeEventListener:function(t,e,n){var i=t.canvas;"resize"!==e?(t=((n[g]||{}).proxies||{})[t.id+"_"+e])&&r(i,e,t):a(i)}},f.addEvent=b,f.removeEvent=r},{45:45}],48:[function(t,e,n){"use strict";var i=t(45),a=t(46),t=t(47),a=t._enabled?t:a;e.exports=i.extend({initialize:function(){},acquireContext:function(){},releaseContext:function(){},addEventListener:function(){},removeEventListener:function(){}},a)},{45:45,46:46,47:47}],49:[function(t,e,n){"use strict";e.exports={},e.exports.filler=t(50),e.exports.legend=t(51),e.exports.title=t(52)},{50:50,51:51,52:52}],50:[function(t,e,n){"use strict";var s=t(25),c=t(40),l=t(45);s._set("global",{plugins:{filler:{propagate:!0}}});var f={dataset:function(t){var e=t.fill,n=t.chart,t=n.getDatasetMeta(e),i=t&&n.isDatasetVisible(e)&&t.dataset._children||[],a=i.length||0;return a?function(t,e){return e');for(var n=0;n'),t.data.datasets[n].label&&e.push(t.data.datasets[n].label),e.push("");return e.push(""),e.join("")}});var r=i.extend({initialize:function(t){P.extend(this,t),this.legendHitBoxes=[],this.doughnutMode=!1},beforeUpdate:t,update:function(t,e,n){var i=this;return i.beforeUpdate(),i.maxWidth=t,i.maxHeight=e,i.margins=n,i.beforeSetDimensions(),i.setDimensions(),i.afterSetDimensions(),i.beforeBuildLabels(),i.buildLabels(),i.afterBuildLabels(),i.beforeFit(),i.fit(),i.afterFit(),i.afterUpdate(),i.minSize},afterUpdate:t,beforeSetDimensions:t,setDimensions:function(){var t=this;t.isHorizontal()?(t.width=t.maxWidth,t.left=0,t.right=t.width):(t.height=t.maxHeight,t.top=0,t.bottom=t.height),t.paddingLeft=0,t.paddingTop=0,t.paddingRight=0,t.paddingBottom=0,t.minSize={width:0,height:0}},afterSetDimensions:t,beforeBuildLabels:t,buildLabels:function(){var e=this,n=e.options.labels||{},t=P.callback(n.generateLabels,[e.chart],e)||[];n.filter&&(t=t.filter(function(t){return n.filter(t,e.chart.data)})),e.options.reverse&&t.reverse(),e.legendItems=t},afterBuildLabels:t,beforeFit:t,fit:function(){var n,i,a,r,o,s,l,u=this,t=u.options,d=t.labels,e=t.display,h=u.ctx,c=C.global,f=P.valueOrDefault,g=f(d.fontSize,c.defaultFontSize),t=f(d.fontStyle,c.defaultFontStyle),c=f(d.fontFamily,c.defaultFontFamily),t=P.fontString(g,t,c),m=u.legendHitBoxes=[],p=u.minSize,c=u.isHorizontal();c?(p.width=u.maxWidth,p.height=e?10:0):(p.width=e?10:0,p.height=u.maxHeight),e&&(h.font=t,c?(n=u.lineWidths=[0],i=u.legendItems.length?g+d.padding:0,h.textAlign="left",h.textBaseline="top",P.each(u.legendItems,function(t,e){t=T(d,g)+g/2+h.measureText(t.text).width;n[n.length-1]+t+d.padding>=u.width&&(i+=g+d.padding,n[n.length]=u.left),m[e]={left:0,top:0,width:t,height:g},n[n.length-1]+=t+d.padding}),p.height+=i):(c=d.padding,a=u.columnWidths=[],r=d.padding,s=o=0,l=g+c,P.each(u.legendItems,function(t,e){t=T(d,g)+g/2+h.measureText(t.text).width;s+l>p.height&&(r+=o+d.padding,a.push(o),s=o=0),o=Math.max(o,t),s+=l,m[e]={left:0,top:0,width:t,height:g}}),r+=o,a.push(o),p.width+=r)),u.width=p.width,u.height=p.height},afterFit:t,isHorizontal:function(){return"top"===this.options.position||"bottom"===this.options.position},draw:function(){var c,f,t,g,e,n,m,p,v,y,b,x=this,_=x.options,k=_.labels,w=C.global,M=w.elements.line,S=x.width,D=x.lineWidths;_.display&&(c=x.ctx,t=(f=P.valueOrDefault)(k.fontColor,w.defaultFontColor),g=f(k.fontSize,w.defaultFontSize),e=f(k.fontStyle,w.defaultFontStyle),n=f(k.fontFamily,w.defaultFontFamily),n=P.fontString(g,e,n),c.textAlign="left",c.textBaseline="middle",c.lineWidth=.5,c.strokeStyle=t,c.fillStyle=t,c.font=n,m=T(k,g),p=x.legendHitBoxes,v=x.isHorizontal(),y=v?{x:x.left+(S-D[0])/2,y:x.top+k.padding,line:0}:{x:x.left+k.padding,y:x.top+k.padding,line:0},b=g+k.padding,P.each(x.legendItems,function(t,e){var n,i,a,r,o,s,l=c.measureText(t.text).width,u=m+g/2+l,d=y.x,h=y.y;v?S<=d+u&&(h=y.y+=b,y.line++,d=y.x=x.left+(S-D[y.line])/2):h+b>x.bottom&&(d=y.x=d+x.columnWidths[y.line]+k.padding,h=y.y=x.top+k.padding,y.line++),n=d,i=h,a=t,isNaN(m)||m<=0||(c.save(),c.fillStyle=f(a.fillStyle,w.defaultColor),c.lineCap=f(a.lineCap,M.borderCapStyle),c.lineDashOffset=f(a.lineDashOffset,M.borderDashOffset),c.lineJoin=f(a.lineJoin,M.borderJoinStyle),c.lineWidth=f(a.lineWidth,M.borderWidth),c.strokeStyle=f(a.strokeStyle,w.defaultColor),r=0===f(a.lineWidth,M.borderWidth),c.setLineDash&&c.setLineDash(f(a.lineDash,M.borderDash)),_.labels&&_.labels.usePointStyle?(s=(o=g*Math.SQRT2/2)/Math.SQRT2,P.canvas.drawPoint(c,a.pointStyle,o,n+s,i+s)):(r||c.strokeRect(n,i,m,g),c.fillRect(n,i,m,g)),c.restore()),p[e].left=d,p[e].top=h,e=t,t=l,d=m+(l=g/2)+(d=d),l=h+l,c.fillText(e.text,d,l),e.hidden&&(c.beginPath(),c.lineWidth=2,c.moveTo(d,l),c.lineTo(d+t,l),c.stroke()),v?y.x+=u+k.padding:y.y+=b}))},handleEvent:function(t){var e=this,n=e.options,i="mouseup"===t.type?"click":t.type,a=!1;if("mousemove"===i){if(!n.onHover)return}else{if("click"!==i)return;if(!n.onClick)return}var r=t.x,o=t.y;if(r>=e.left&&r<=e.right&&o>=e.top&&o<=e.bottom)for(var s=e.legendHitBoxes,l=0;l=u.left&&r<=u.left+u.width&&o>=u.top&&o<=u.top+u.height){if("click"===i){n.onClick.call(e,t.native,e.legendItems[l]),a=!0;break}if("mousemove"===i){n.onHover.call(e,t.native,e.legendItems[l]),a=!0;break}}}return a}});function o(t,e){var n=new r({ctx:t.ctx,options:e,chart:t});a.configure(t,n,e),a.addBox(t,n),t.legend=n}e.exports={id:"legend",_element:r,beforeInit:function(t){var e=t.options.legend;e&&o(t,e)},beforeUpdate:function(t){var e=t.options.legend,n=t.legend;e?(P.mergeIf(e,C.global.legend),n?(a.configure(t,n,e),n.options=e):o(t,e)):n&&(a.removeBox(t,n),delete t.legend)},afterEvent:function(t,e){t=t.legend;t&&t.handleEvent(e)}}},{25:25,26:26,30:30,45:45}],52:[function(t,e,n){"use strict";var y=t(25),i=t(26),b=t(45),a=t(30),t=b.noop;y._set("global",{title:{display:!1,fontStyle:"bold",fullWidth:!0,lineHeight:1.2,padding:10,position:"top",text:"",weight:2e3}});var r=i.extend({initialize:function(t){b.extend(this,t),this.legendHitBoxes=[]},beforeUpdate:t,update:function(t,e,n){var i=this;return i.beforeUpdate(),i.maxWidth=t,i.maxHeight=e,i.margins=n,i.beforeSetDimensions(),i.setDimensions(),i.afterSetDimensions(),i.beforeBuildLabels(),i.buildLabels(),i.afterBuildLabels(),i.beforeFit(),i.fit(),i.afterFit(),i.afterUpdate(),i.minSize},afterUpdate:t,beforeSetDimensions:t,setDimensions:function(){var t=this;t.isHorizontal()?(t.width=t.maxWidth,t.left=0,t.right=t.width):(t.height=t.maxHeight,t.top=0,t.bottom=t.height),t.paddingLeft=0,t.paddingTop=0,t.paddingRight=0,t.paddingBottom=0,t.minSize={width:0,height:0}},afterSetDimensions:t,beforeBuildLabels:t,buildLabels:t,afterBuildLabels:t,beforeFit:t,fit:function(){var t=b.valueOrDefault,e=this.options,n=e.display,i=t(e.fontSize,y.global.defaultFontSize),a=this.minSize,t=b.isArray(e.text)?e.text.length:1,i=b.options.toLineHeight(e.lineHeight,i),e=n?t*i+2*e.padding:0;this.isHorizontal()?(a.width=this.maxWidth,a.height=e):(a.width=e,a.height=this.maxHeight),this.width=a.width,this.height=a.height},afterFit:t,isHorizontal:function(){var t=this.options.position;return"top"===t||"bottom"===t},draw:function(){var t=this.ctx,e=b.valueOrDefault,n=this.options,i=y.global;if(n.display){var a,r,o,s=e(n.fontSize,i.defaultFontSize),l=e(n.fontStyle,i.defaultFontStyle),u=e(n.fontFamily,i.defaultFontFamily),d=b.fontString(s,l,u),h=b.options.toLineHeight(n.lineHeight,s),c=h/2+n.padding,f=0,g=this.top,l=this.left,u=this.bottom,s=this.right;t.fillStyle=e(n.fontColor,i.defaultFontColor),t.font=d,this.isHorizontal()?(r=l+(s-l)/2,o=g+c,a=s-l):(r="left"===n.position?l+c:s-c,o=g+(u-g)/2,a=u-g,f=Math.PI*("left"===n.position?-.5:.5)),t.save(),t.translate(r,o),t.rotate(f),t.textAlign="center",t.textBaseline="middle";var m=n.text;if(b.isArray(m))for(var p=0,v=0;vo.max)&&(o.max=t))})}),o.min=isFinite(o.min)&&!isNaN(o.min)?o.min:0,o.max=isFinite(o.max)&&!isNaN(o.max)?o.max:1,this.handleTickRangeOptions()},getTickLimit:function(){var t,e=this.options.ticks;return this.isHorizontal()?Math.min(e.maxTicksLimit||11,Math.ceil(this.width/50)):(t=h.valueOrDefault(e.fontSize,i.global.defaultFontSize),Math.min(e.maxTicksLimit||11,Math.ceil(this.height/(2*t))))},handleDirectionalChanges:function(){this.isHorizontal()||this.ticks.reverse()},getLabelForIndex:function(t,e){return+this.getRightValue(this.chart.data.datasets[e].data[t])},getPixelForValue:function(t){var e=this.start,n=+this.getRightValue(t),t=this.end-e,e=this.isHorizontal()?this.left+this.width/t*(n-e):this.bottom-this.height/t*(n-e);return e},getValueForPixel:function(t){var e=this.isHorizontal(),n=e?this.width:this.height,n=(e?t-this.left:this.bottom-t)/n;return this.start+(this.end-this.start)*n},getPixelForTick:function(t){return this.getPixelForValue(this.ticksAsNumbers[t])}});t.scaleService.registerScaleType("linear",n,e)}},{25:25,34:34,45:45}],55:[function(t,e,n){"use strict";var u=t(45);e.exports=function(e){var t=u.noop;e.LinearScaleBase=e.Scale.extend({getRightValue:function(t){return"string"==typeof t?+t:e.Scale.prototype.getRightValue.call(this,t)},handleTickRangeOptions:function(){var t=this,e=t.options.ticks;e.beginAtZero&&(n=u.sign(t.min),i=u.sign(t.max),n<0&&i<0?t.max=0:0=t.max&&(n?t.max=t.min+1:t.min=t.max-1),t.min===t.max&&(t.max++,e.beginAtZero||t.min--)},getTickLimit:t,handleDirectionalChanges:t,buildTicks:function(){var t=this,e=t.options.ticks,n=t.getTickLimit(),n={maxTicks:n=Math.max(2,n),min:e.min,max:e.max,stepSize:u.valueOrDefault(e.fixedStepSize,e.stepSize)},n=t.ticks=function(t,e){var n,i,a=[];i=t.stepSize&&0r.max)&&(r.max=t),0!=t&&(null===r.minNotZero||ta.r&&(a.r=d.end,r.r=l),h.starta.b&&(a.b=h.end,r.b=l)}t.setReductions(i,a,r)}function i(t){var e=t.ctx,n=t.options,i=n.angleLines,a=n.pointLabels;e.lineWidth=i.lineWidth,e.strokeStyle=i.color;var r=t.getDistanceFromCenterForValue(n.ticks.reverse?t.min:t.max),o=g(t);e.textBaseline="top";for(var s,l,u,d,h=f(t)-1;0<=h;h--)i.display&&(u=t.getPointPosition(h,r),e.beginPath(),e.moveTo(t.xCenter,t.yCenter),e.lineTo(u.x,u.y),e.stroke(),e.closePath()),a.display&&(s=t.getPointPosition(h,r+5),d=p.valueAtIndexOrDefault(a.fontColor,h,c.defaultFontColor),e.font=o.font,e.fillStyle=d,l=t.getIndexAngle(h),u=p.toDegrees(l),e.textAlign=0===(d=u)||180===d?"center":d<180?"left":"right",l=u,d=t._pointLabelSizes[h],u=s,90===l||270===l?u.y-=d.h/2:(270>1)-1]||null,r=t[i],!a)return{lo:null,hi:r};if(r[e]n))return{lo:a,hi:r};s=i-1}}return{lo:r,hi:null}}(t,e,n),r=a.lo?a.hi?a.lo:t[t.length-2]:t[0],a=a.lo?a.hi||t[t.length-1]:t[1],t=a[e]-r[e],t=t?(n-r[e])/t:0,t=(a[i]-r[i])*t;return r[i]+t}function M(t,e){var n=e.parser,e=e.parser||e.format;return"function"==typeof n?n(t):"string"==typeof t&&"string"==typeof e?b(t,e):!(t=!(t instanceof b)?b(t):t).isValid()&&"function"==typeof e?e(t):t}function S(t,e){if(m.isNullOrUndef(t))return null;var n=e.options.time,t=M(e.getRightValue(t),n);return t.isValid()?(n.round&&t.startOf(n.round),t.valueOf()):null}function D(t){for(var e=_.indexOf(t)+1,n=_.length;e=_.indexOf(e);o--)if(a=_[o],x[a].common&&r.as(a)>=t.length)return a;return _[e?_.indexOf(e):0]}(y,p.minUnit,c.min,c.max),c._majorUnit=D(c._unit),c._table=function(t,e,n,i){if("linear"===i||!t.length)return[{time:e,pos:0},{time:n,pos:1}];for(var a,r,o,s=[],l=[e],u=0,d=t.length;u>8&255,255&n)}function ShortToStrX(n){return String.fromCharCode(255&n,n>>8&255)}function IntToStr(n){return String.fromCharCode(n>>24&255,n>>16&255,n>>8&255,255&n)}function IntToStrX(n){return String.fromCharCode(255&n,n>>8&255,n>>16&255,n>>24&255)}function MakeToArray(n){return n&&null!=n&&"object"!=typeof n?[n]:n}function SplitArray(n){return n.split(",")}function Clone(n){return JSON.parse(JSON.stringify(n))}function EscapeHtml(n){return"string"==typeof n?n.replace(/&/g,"&").replace(/>/g,">").replace(//g,">").replace(/").replace(/\n/g,"").replace(/\t/g,"  "):"boolean"==typeof n||"number"==typeof n?n:void 0}function ArrayElementMove(n,t,r){n.splice(r,0,n.splice(t,1)[0])}function ObjectToStringEx(n,t){var r="";if(0!=n&&(!n||null==n))return"(Null)";if(n instanceof Array)for(var e in n)r+="
"+gap(t)+"Item #"+e+": "+ObjectToStringEx(n[e],t+1);else if(n instanceof Object)for(var e in n)r+="
"+gap(t)+e+" = "+ObjectToStringEx(n[e],t+1);else r+=EscapeHtml(n);return r}function ObjectToStringEx2(n,t){var r="";if(0!=n&&(!n||null==n))return"(Null)";if(n instanceof Array)for(var e in n)r+="\r\n"+gap2(t)+"Item #"+e+": "+ObjectToStringEx2(n[e],t+1);else if(n instanceof Object)for(var e in n)r+="\r\n"+gap2(t)+e+" = "+ObjectToStringEx2(n[e],t+1);else r+=EscapeHtml(n);return r}function gap(n){for(var t="",r=0;r<4*n;r++)t+=" ";return t}function gap2(n){for(var t="",r=0;r<4*n;r++)t+=" ";return t}function ObjectToString(n){return ObjectToStringEx(n,0)}function ObjectToString2(n){return ObjectToStringEx2(n,0)}function hex2rstr(n){if("string"!=typeof n||0==n.length)return"";for(var t,r="",e=(""+n).match(/../g);t=e.shift();)r+=String.fromCharCode("0x"+t);return r}function char2hex(n){return(n+256).toString(16).substr(-2).toUpperCase()}function rstr2hex(n){for(var t="",r=0;r")&&-1==n.indexOf("&")&&-1==n.indexOf('"')&&-1==n.indexOf("'")&&-1==n.indexOf("+")&&-1==n.indexOf("(")&&-1==n.indexOf(")")&&-1==n.indexOf("#")&&-1==n.indexOf("%")&&-1==n.indexOf(":")}function isSafeString2(n){return"string"==typeof n&&-1==n.indexOf("<")&&-1==n.indexOf(">")&&-1==n.indexOf("&")&&-1==n.indexOf('"')&&-1==n.indexOf("'")&&-1==n.indexOf("+")&&-1==n.indexOf("(")&&-1==n.indexOf(")")&&-1==n.indexOf("#")&&-1==n.indexOf("%")}function parseUriArgs(){var n,t=window.document.location.href,r={},e=(t=t.endsWith("#")?t.substring(0,t.length-1):t).split(/[\?&|]/);for(n in e.splice(0,1),e){var o,i=e[n],c=i.indexOf("=");r[o=i.substring(0,c)]=i.substring(c+1),isSafeString(r[o])?(c=parseInt(r[o]))==r[o]&&(r[o]=c):delete r[o]}return r}String.prototype.startsWith||(String.prototype.startsWith=function(n){return 0===this.lastIndexOf(n,0)}),String.prototype.endsWith||(String.prototype.endsWith=function(n){return-1!==this.indexOf(n,this.length-n.length)}) \ No newline at end of file +function Q(n){return document.getElementById(n)}function QS(n){try{return Q(n).style}catch(n){}}function QE(n,t){try{Q(n).disabled=!t}catch(n){}}function QV(n,t){try{QS(n).display=t?"":"none"}catch(n){}}function QA(n,t){Q(n).innerHTML+=t}function QH(n,t){Q(n).innerHTML=t}function QC(n){try{return Q(n).classList}catch(n){}}function inputBoxFocus(n){Q(n).focus();var t=Q(n).value;Q(n).value="",Q(n).value=t}function ReadShort(n,t){return(n.charCodeAt(t)<<8)+n.charCodeAt(t+1)}function ReadShortX(n,t){return(n.charCodeAt(t+1)<<8)+n.charCodeAt(t)}function ReadInt(n,t){return 16777216*n.charCodeAt(t)+(n.charCodeAt(t+1)<<16)+(n.charCodeAt(t+2)<<8)+n.charCodeAt(t+3)}function ReadSInt(n,t){return(n.charCodeAt(t)<<24)+(n.charCodeAt(t+1)<<16)+(n.charCodeAt(t+2)<<8)+n.charCodeAt(t+3)}function ReadIntX(n,t){return 16777216*n.charCodeAt(t+3)+(n.charCodeAt(t+2)<<16)+(n.charCodeAt(t+1)<<8)+n.charCodeAt(t)}function ShortToStr(n){return String.fromCharCode(n>>8&255,255&n)}function ShortToStrX(n){return String.fromCharCode(255&n,n>>8&255)}function IntToStr(n){return String.fromCharCode(n>>24&255,n>>16&255,n>>8&255,255&n)}function IntToStrX(n){return String.fromCharCode(255&n,n>>8&255,n>>16&255,n>>24&255)}function MakeToArray(n){return n&&null!=n&&"object"!=typeof n?[n]:n}function SplitArray(n){return n.split(",")}function Clone(n){return JSON.parse(JSON.stringify(n))}function EscapeHtml(n){return"string"==typeof n?n.replace(/&/g,"&").replace(/>/g,">").replace(//g,">").replace(/").replace(/\n/g,"").replace(/\t/g,"  "):"boolean"==typeof n||"number"==typeof n?n:void 0}function ArrayElementMove(n,t,r){n.splice(r,0,n.splice(t,1)[0])}function ObjectToStringEx(n,t){var r="";if(0!=n&&(!n||null==n))return"(Null)";if(n instanceof Array)for(var e in n)r+="
"+gap(t)+"Item #"+e+": "+ObjectToStringEx(n[e],t+1);else if(n instanceof Object)for(var e in n)r+="
"+gap(t)+e+" = "+ObjectToStringEx(n[e],t+1);else r+=EscapeHtml(n);return r}function ObjectToStringEx2(n,t){var r="";if(0!=n&&(!n||null==n))return"(Null)";if(n instanceof Array)for(var e in n)r+="\r\n"+gap2(t)+"Item #"+e+": "+ObjectToStringEx2(n[e],t+1);else if(n instanceof Object)for(var e in n)r+="\r\n"+gap2(t)+e+" = "+ObjectToStringEx2(n[e],t+1);else r+=EscapeHtml(n);return r}function gap(n){for(var t="",r=0;r<4*n;r++)t+=" ";return t}function gap2(n){for(var t="",r=0;r<4*n;r++)t+=" ";return t}function ObjectToString(n){return ObjectToStringEx(n,0)}function ObjectToString2(n){return ObjectToStringEx2(n,0)}function hex2rstr(n){if("string"!=typeof n||0==n.length)return"";for(var t,r="",e=(""+n).match(/../g);t=e.shift();)r+=String.fromCharCode("0x"+t);return r}function char2hex(n){return(n+256).toString(16).substr(-2).toUpperCase()}function rstr2hex(n){for(var t="",r=0;r")&&-1==n.indexOf("&")&&-1==n.indexOf('"')&&-1==n.indexOf("'")&&-1==n.indexOf("+")&&-1==n.indexOf("(")&&-1==n.indexOf(")")&&-1==n.indexOf("#")&&-1==n.indexOf("%")&&-1==n.indexOf(":")}function isSafeString2(n){return"string"==typeof n&&-1==n.indexOf("<")&&-1==n.indexOf(">")&&-1==n.indexOf("&")&&-1==n.indexOf('"')&&-1==n.indexOf("'")&&-1==n.indexOf("+")&&-1==n.indexOf("(")&&-1==n.indexOf(")")&&-1==n.indexOf("#")&&-1==n.indexOf("%")}function parseUriArgs(){var n,t=window.document.location.href,r={},e=(t=t.endsWith("#")?t.substring(0,t.length-1):t).split(/[\?&|]/);for(n in e.splice(0,1),e){var o,i=e[n],c=i.indexOf("=");r[o=i.substring(0,c)]=i.substring(c+1),isSafeString(r[o])?(c=parseInt(r[o]))==r[o]&&(r[o]=c):delete r[o]}return r}String.prototype.startsWith||(String.prototype.startsWith=function(n){return 0===this.lastIndexOf(n,0)}),String.prototype.endsWith||(String.prototype.endsWith=function(n){return-1!==this.indexOf(n,this.length-n.length)}) \ No newline at end of file diff --git a/public/scripts/ol-min.js b/public/scripts/ol-min.js index 4cd7b2a1..877ef87f 100644 --- a/public/scripts/ol-min.js +++ b/public/scripts/ol-min.js @@ -1 +1 @@ -!function(t,e){"object"==typeof exports?module.exports=e():"function"==typeof define&&define.amd?define([],e):t.ol=e()}(this,function(){var r={},n=this;function t(t,e){var o,i=r;t=t.split("."),i=i||n,t[0]in i||!i.execScript||i.execScript("var "+t[0]);for(;t.length&&(o=t.shift());)t.length||void 0===e?i=i[o]&&i[o]!==Object.prototype[o]?i[o]:i[o]={}:i[o]=e}function D(t,e){return e>>0,r=0;r=e.ca&&t.da<=e.ia&&t.ia>=e.da}function x(t,e,o){return Math.min(Math.max(t,e),o)}e(a,Error);var i="cosh"in Math?Math.cosh:function(t){return((t=Math.exp(t))+1/t)/2};function S(t,e,o,i,r,n){var s,a=r-o,p=n-i;return(a||p)&&(1<(s=((t-o)*a+(e-i)*p)/(a*a+p*p))?(o=r,i=n):0t[2]&&(t[2]=e[2]),e[1]t[3]&&(t[3]=e[3]),t}function z(t,e){e[0]t[2]&&(t[2]=e[0]),e[1]t[3]&&(t[3]=e[1])}function Y(t,e,o,i,r){for(;oe[0]?t:e)[0],o[1]=(t[1]>e[1]?t:e)[1],o[2]=(t[2]=e[0]&&t[1]<=e[3]&&t[3]>=e[1]}function st(t){return t[2]=t.minZoom;){if(o.call(null,e,ee(t,r,e,i)))return!0;--e}return!1}function Qt(t,e,o,i){return e[0]T.$)&&(C(E,new B(L(M.ca,j),L(M.$,j),M.da,M.ia))||M.$-M.ca+1>j&&C(E,T))){m=!0;break t}}m=!1}else m=!0}else m=!1;m?(b in l&&delete l[b],(m=v.b)in u||(u[m]=!0,h[b]=v)):l[b]=v}}}for(r in f=(a=[h,l])[0],a=a[1],this.l)r in f?(this.j[r]||(this.l[r].style.display="",this.j[r]=!0),delete f[r]):r in a?(this.j[r]&&(this.l[r].style.display="none",delete this.j[r]),delete a[r]):(qe(this.l[r]),delete this.l[r],delete this.j[r]);for(r in f)g=document.createElement("LI"),g.innerHTML=f[r].b,this.I.appendChild(g),this.l[r]=g,this.j[r]=!0;for(r in a)g=document.createElement("LI"),g.innerHTML=a[r].b,g.style.display="none",this.I.appendChild(g),this.l[r]=g;for(s in r=!ct(this.j)||!ct(t.logos),this.B!=r&&(this.element.style.display=r?"":"none",this.B=r),r&&ct(this.j)?this.element.classList.add("ol-logo-only"):this.element.classList.remove("ol-logo-only"),t=t.logos,r=this.T)s in t||(qe(r[s]),delete r[s]);for(n in t)(a=t[n])instanceof HTMLElement&&(this.u.appendChild(a),r[n]=a),n in r||((s=new Image).src=n,""===a?f=s:((f=document.createElement("a")).href=a,f.appendChild(s)),this.u.appendChild(f),r[n]=f);this.u.style.display=ct(t)?"none":""}else this.B&&(this.element.style.display="none",this.B=!1)}function Qe(t){t.element.classList.toggle("ol-collapsed"),t.c?He(t.D,t.C):He(t.C,t.D),t.c=!t.c}function to(t){return Math.pow(t,3)}function eo(t){return 1-to(1-t)}function oo(t){return 3*t*t-2*t*t*t}function io(t){return t}function ro(t){var e=void 0!==(t=t||{}).className?t.className:"ol-rotate",o=void 0!==t.label?t.label:"⇧";this.c=null,"string"==typeof o?(this.c=document.createElement("span"),this.c.className="ol-compass",this.c.textContent=o):(this.c=o,this.c.classList.add("ol-compass"));var i=t.tipLabel||"Reset rotation";(o=document.createElement("button")).className=e+"-reset",o.setAttribute("type","button"),o.title=i,o.appendChild(this.c),de(o,"click",ro.prototype.D,this),(i=document.createElement("div")).className=e+" ol-unselectable ol-control",i.appendChild(o),e=t.render||no,this.o=t.resetNorth||void 0,Je.call(this,{element:i,render:e,target:t.target}),this.l=void 0!==t.duration?t.duration:250,this.j=void 0===t.autoHide||t.autoHide,this.u=void 0,this.j&&this.element.classList.add("ol-hidden")}function no(t){var e,o;(t=t.frameState)&&((t=t.viewState.rotation)!=this.u&&(e="rotate("+t+"rad)",this.j&&((o=this.element.classList.contains("ol-hidden"))||t?o&&t&&this.element.classList.remove("ol-hidden"):this.element.classList.add("ol-hidden")),this.c.style.msTransform=e,this.c.style.webkitTransform=e,this.c.style.transform=e),this.u=t)}function so(t){var e=void 0!==(t=t||{}).className?t.className:"ol-zoom",o=void 0!==t.delta?t.delta:1,i=void 0!==t.zoomInLabel?t.zoomInLabel:"+",r=void 0!==t.zoomOutLabel?t.zoomOutLabel:"−",n=void 0!==t.zoomInTipLabel?t.zoomInTipLabel:"Zoom in",s=void 0!==t.zoomOutTipLabel?t.zoomOutTipLabel:"Zoom out",a=document.createElement("button");a.className=e+"-in",a.setAttribute("type","button"),a.title=n,a.appendChild("string"==typeof i?document.createTextNode(i):i),de(a,"click",so.prototype.j.bind(this,o)),(i=document.createElement("button")).className=e+"-out",i.setAttribute("type","button"),i.title=s,i.appendChild("string"==typeof r?document.createTextNode(r):r),de(i,"click",so.prototype.j.bind(this,-o)),(o=document.createElement("div")).className=e+" ol-unselectable ol-control",o.appendChild(a),o.appendChild(i),Je.call(this,{element:o,target:t.target}),this.c=void 0!==t.duration?t.duration:250}function ao(t){t=t||{};var e=new Ne;return void 0!==t.zoom&&!t.zoom||e.push(new so(t.zoomOptions)),void 0!==t.rotate&&!t.rotate||e.push(new ro(t.rotateOptions)),void 0!==t.attribution&&!t.attribution||e.push(new _e(t.attributionOptions)),e}function po(t){t=t||{},this.c=void 0!==t.className?t.className:"ol-full-screen";var e=void 0!==t.label?t.label:"⤢";this.o="string"==typeof e?document.createTextNode(e):e,e=void 0!==t.labelActive?t.labelActive:"×",this.l="string"==typeof e?document.createTextNode(e):e;var o=t.tipLabel||"Toggle full-screen";(e=document.createElement("button")).className=this.c+"-"+lo(),e.setAttribute("type","button"),e.title=o,e.appendChild(this.o),de(e,"click",this.C,this),(o=document.createElement("div")).className=this.c+" ol-unselectable ol-control "+(ho()?"":"ol-unsupported"),o.appendChild(e),Je.call(this,{element:o,target:t.target}),this.D=void 0!==t.keys&&t.keys,this.j=t.source}function ho(){var t=document.body;return t.webkitRequestFullscreen||t.mozRequestFullScreen&&document.mozFullScreenEnabled||t.msRequestFullscreen&&document.msFullscreenEnabled||t.requestFullscreen&&document.fullscreenEnabled}function lo(){return!!(document.webkitIsFullScreen||document.mozFullScreen||document.msFullscreenElement||document.fullscreenElement)}function uo(t){t.requestFullscreen?t.requestFullscreen():t.msRequestFullscreen?t.msRequestFullscreen():t.mozRequestFullScreen?t.mozRequestFullScreen():t.webkitRequestFullscreen&&t.webkitRequestFullscreen()}e(Je,je),Je.prototype.ka=function(){qe(this.element),je.prototype.ka.call(this)},Je.prototype.g=function(){return this.a},Je.prototype.setMap=function(t){this.a&&qe(this.element);for(var e=0,o=this.v.length;e=e.length){for(var r=[],n=0;nt.D||Math.abs(e.clientY-t.c.clientY)>t.D}function di(t,e){this.l=t,this.c=e,this.b=[],this.i=[],this.a={}}function vi(t){var e=t.b,o=t.i,i=e[0];return 1==e.length?(e.length=0,o.length=0):(e[0]=e.pop(),o[0]=o.pop(),bi(t,0)),e=t.c(i),delete t.a[e],i}function bi(t,e){for(var o=t.b,i=t.i,r=o.length,n=o[e],s=i[e],a=e;e>1;){var p=2*e+1,h=2*e+2,p=h>1;if(!(t[s]>n))break;i[o]=i[s],t[o]=t[s],o=s}i[o]=r,t[o]=n}function wi(t){for(var e=t.l,o=t.b,i=t.i,r=0,n=o.length,s=0;s>1)-1;0<=e;e--)bi(t,e)}function xi(e,t){di.call(this,function(t){return e.apply(null,t)},function(t){return t[0].bb()}),this.v=t,this.j=0,this.g={}}function Si(t,e,o){for(var i,r,n=0;t.j=l[0]&&r[2]<=l[2]||r[1]>=l[1]&&r[3]<=l[3])||fr(t,e,o,i,function(t,e){var o,i,r,n,s,a=!1,p=R(l,t),h=R(l,e);return 1===p||1===h?a=!0:(o=l[0],i=l[1],r=l[2],n=l[3],s=e[0],t=((e=e[1])-t[1])/(s-t[0]),(a=!(a=!(a=2&h&&!(2&p)?o<=(a=s-(e-n)/t)&&a<=r:a)&&4&h&&!(4&p)?i<=(a=e-(s-r)*t)&&a<=n:a)&&8&h&&!(8&p)?o<=(a=s-(e-i)/t)&&a<=r:a)||!(16&h)||16&p||(a=i<=(a=e-(s-o)*t)&&a<=n)),a}))}function gr(t,e,o,i,r){var n=o[0];if(!(yr(t,e,n,i,r)||lr(t,e,n,i,r[0],r[1])||lr(t,e,n,i,r[0],r[3])||lr(t,e,n,i,r[2],r[1])||lr(t,e,n,i,r[2],r[3])))return!1;if(1===o.length)return!0;for(e=1,n=o.length;ee;)i-=3;if(!((e=t.b[2+o]-t.b[i+2])<1e3/60)){var r=t.b[o]-t.b[i],o=t.b[1+o]-t.b[i+1];return t.i=Math.atan2(o,r),t.a=Math.sqrt(r*r+o*o)/e,t.a>t.c}}}}(this.a)&&(e=((e=this.a).c-e.a)/e.f,o=this.a.i,i=t.wa(),i=r.Ja(i),r=r.Wa([i[0]-e*Math.cos(o),i[1]-e*Math.sin(o)]),t.animate({center:t.Ec(r),duration:500,easing:eo})),Fr(t,1,-1),!1)}function nn(t){if(0=this.u}function gn(t){var e,o;Jr(t)&&(e=this.a,o=t.pixel,e.c=this.g,e.i=o,cn(e),un(e),this.b(new xn(mn,t.coordinate,t)))}function dn(t){return!Jr(t)||(this.a.setMap(null),this.l(t,this.g,t.pixel)&&(this.j(t),this.b(new xn(wn,t.coordinate,t))),!1)}function vn(t){if(Jr(t)&&Zr(t)&&this.C(t)){this.g=t.pixel,this.a.setMap(t.map);var e=this.a,o=this.g;return e.c=this.g,e.i=o,cn(e),un(e),this.b(new xn(bn,t.coordinate,t)),!0}return!1}e(fi,Ae),(Au=fi.prototype).Jh=function(t){yi(this,t);var e,o=new Ko("pointerup",this.i,t);this.b(o),this.o||t.button||(e=(o=this).c,t=new Ko("click",o.i,e),o.b(t),o.j?(clearTimeout(o.j),o.j=0,t=new Ko("dblclick",o.i,e),o.b(t)):o.j=setTimeout(function(){this.j=0;var t=new Ko("singleclick",this.i,e);this.b(t)}.bind(o),250)),this.S||(this.f.forEach(me),this.f.length=0,this.o=!1,this.c=null,Se(this.a),this.a=null)},Au.Ol=function(t){yi(this,t);var e=new Ko("pointerdown",this.i,t);this.b(e),this.c=t,this.f.length||(this.a=new ri(document),this.f.push(de(this.a,"pointermove",this.Hm,this),de(this.a,"pointerup",this.Jh,this),de(this.g,"pointercancel",this.Jh,this)))},Au.Hm=function(t){var e;gi(this,t)&&(this.o=!0,e=new Ko("pointerdrag",this.i,t,this.o),this.b(e)),t.preventDefault()},Au.Lp=function(t){this.b(new Ko(t.type,this.i,t,!(!this.c||!gi(this,t))))},Au.ka=function(){this.v&&(me(this.v),this.v=null),this.l&&(me(this.l),this.l=null),this.f.forEach(me),this.f.length=0,this.a&&(Se(this.a),this.a=null),this.g&&(Se(this.g),this.g=null),Ae.prototype.ka.call(this)},di.prototype.clear=function(){this.b.length=0,this.i.length=0,lt(this.a)},di.prototype.f=function(t){O(!(this.c(t)in this.a),31);var e=this.l(t);return 1/0!=e&&(this.b.push(t),this.i.push(e),this.a[this.c(t)]=!0,mi(this,0,this.b.length-1),!0)},e(xi,di),xi.prototype.f=function(t){var e=di.prototype.f.call(this,t);return e&&de(t[0],"change",this.o,this),e},xi.prototype.o=function(t){var e=(t=t.target).getState();2!==e&&3!==e&&4!==e&&5!==e||(be(t,"change",this.o,this),(t=t.bb())in this.g&&(delete this.g[t],--this.j),this.v())},e(Bi,je),(Au=Bi.prototype).Ab=function(t,e){return e=e||[NaN,NaN],this.Kb(t[0],t[1],e,1/0),e},Au.sb=function(t){return this.Mc(t[0],t[1])},Au.Mc=Gi,Au.G=function(t){this.v!=this.i&&(this.l=this.se(this.l),this.v=this.i);var e=this.l;return t?(t[0]=e[0],t[1]=e[1],t[2]=e[2],t[3]=e[3]):t=e,t},Au.Rb=function(t){return this.Vd(t*t)},Au.tb=function(t,e){return this.Dc(Vt(t,e)),this},e(Wi,Bi),(Au=Wi.prototype).Mc=Gi,Au.se=function(t){return W(this.A,0,this.A.length,this.a,t)},Au.ac=function(){return this.A.slice(0,this.a)},Au.ga=function(){return this.A},Au.bc=function(){return this.A.slice(this.A.length-this.a)},Au.cc=function(){return this.ja},Au.Vd=function(t){if(this.o!=this.i&&(lt(this.f),this.g=0,this.o=this.i),t<0||this.g&&t<=this.g)return this;var e=t.toString();if(this.f.hasOwnProperty(e))return this.f[e];var o=this.hd(t);return o.ga().length=this.f&&t<=this.a){var e=this.l||0;if(this.j){if(e+=i=v(this.j,t,1),i==this.j.length-1)return e;var o=this.j[i],i=o/this.j[i+1]}else o=this.a,i=this.C;e+=Math.log(o/t)/Math.log(i)}return e},Au.Qf=function(t,e){var o=(o=(e=e||{}).size)||Rr(this);t instanceof Wi?"Circle"===t.U()?(f=Mr(t=t.G())).rotate(this.Qa(),$(t)):f=t:(O(Array.isArray(t),24),O(!st(t),25),f=Mr(t));var i=e.padding||[0,0,0,0],r=void 0===e.constrainResolution||e.constrainResolution,n=void 0!==e.nearest&&e.nearest,s=void 0!==e.minResolution?e.minResolution:void 0!==e.maxZoom?this.constrainResolution(this.a,e.maxZoom-this.l,0):0,a=f.ga(),p=this.Qa();t=Math.cos(-p);for(var p=Math.sin(-p),h=1/0,l=1/0,u=-1/0,c=-1/0,f=f.qa(),y=0,g=a.length;ythis.C&&(this.a=!0)),this.j=i,(i=(t=t.map).Z()).g.rotation!==Mi&&(r=t.a.getBoundingClientRect(),(e=Qr(this.o))[0]-=r.left,e[1]-=r.top,this.g=t.Wa(e),this.a&&(r=i.Qa(),t.render(),Ur(i,r+o,this.g)))}function Nn(t){var e,o,i;return!(this.o.length<2)||(Fr(t=t.map.Z(),1,-1),this.a&&(i=t.Qa(),e=this.g,o=this.u,i=t.constrainRotation(i,0),Ur(t,i,e,o)),!1)}function Fn(t){return 2<=this.o.length&&(t=t.map,this.g=null,this.j=void 0,this.a=!1,this.l=0,this.D||Fr(t.Z(),1,1),!0)}function kn(t){$r.call(this,{handleDownEvent:Un,handleDragEvent:Dn,handleUpEvent:On}),t=t||{},this.l=t.constrainResolution||!1,this.g=null,this.u=void 0!==t.duration?t.duration:400,this.a=void 0,this.j=1}function Dn(t){var e=1,o=this.o[0],i=this.o[1],r=o.clientX-i.clientX,o=o.clientY-i.clientY,r=Math.sqrt(r*r+o*o);void 0!==this.a&&(e=this.a/r),this.a=r;var i=(r=(t=t.map).Z()).Pa(),n=r.a,s=r.f;n<(o=i*e)?(e=n/i,o=n):ot.a)&&(e=this.g,o=this.u,i=t.constrainResolution(i,0,this.j-1),Br(t,i,e,o)),!1}return!0}function Un(t){return 2<=this.o.length&&(t=t.map,this.g=null,this.a=void 0,this.j=1,this.D||Fr(t.Z(),1,1),!0)}function Gn(t){t=t||{};var e=new Ne,o=new kr(-.005,.05,100);return void 0!==t.altShiftDragRotate&&!t.altShiftDragRotate||e.push(new sn),void 0!==t.doubleClickZoom&&!t.doubleClickZoom||e.push(new Xr({delta:t.zoomDelta,duration:t.zoomDuration})),void 0!==t.dragPan&&!t.dragPan||e.push(new en({kinetic:o})),void 0!==t.pinchRotate&&!t.pinchRotate||e.push(new Rn),void 0!==t.pinchZoom&&!t.pinchZoom||e.push(new kn({constrainResolution:t.constrainResolution,duration:t.zoomDuration})),void 0!==t.keyboard&&!t.keyboard||(e.push(new Mn),e.push(new An({delta:t.zoomDelta,duration:t.zoomDuration}))),void 0!==t.mouseWheelZoom&&!t.mouseWheelZoom||e.push(new Tn({constrainResolution:t.constrainResolution,duration:t.zoomDuration})),void 0!==t.shiftDragZoom&&!t.shiftDragZoom||e.push(new Sn({duration:t.zoomDuration})),e}function Bn(t){je.call(this);var e=ht({},t);e.opacity=void 0!==t.opacity?t.opacity:1,e.visible=void 0===t.visible||t.visible,e.zIndex=void 0!==t.zIndex?t.zIndex:0,e.maxResolution=void 0!==t.maxResolution?t.maxResolution:1/0,e.minResolution=void 0!==t.minResolution?t.minResolution:0,this.H(e),this.a={layer:this,Je:!0}}function Xn(t){return t.a.opacity=x(t.hc(),0,1),t.a.yj=t.$f(),t.a.visible=t.Mb(),t.a.extent=t.G(),t.a.zIndex=t.Ba(),t.a.maxResolution=t.fc(),t.a.minResolution=Math.max(t.gc(),0),t.a}function Vn(t){var e=t||{};delete(t=ht({},e)).layers,e=e.layers,Bn.call(this,t),this.f=[],this.c={},de(this,Le(Wn),this.Hl,this),e?Array.isArray(e)?e=new Ne(e.slice(),{unique:!0}):O(e instanceof Ne,43):e=new Ne(void 0,{unique:!0}),this.xi(e)}e(Rn,$r),Rn.prototype.Xc=Gi,e(kn,$r),kn.prototype.Xc=Gi,e(Bn,je),(Au=Bn.prototype).G=function(){return this.get("extent")},Au.fc=function(){return this.get("maxResolution")},Au.gc=function(){return this.get("minResolution")},Au.hc=function(){return this.get("opacity")},Au.Mb=function(){return this.get("visible")},Au.Ba=function(){return this.get("zIndex")},Au.vc=function(t){this.set("extent",t)},Au.Ac=function(t){this.set("maxResolution",t)},Au.Bc=function(t){this.set("minResolution",t)},Au.wc=function(t){this.set("opacity",t)},Au.xc=function(t){this.set("visible",t)},Au.Vb=function(t){this.set("zIndex",t)},e(Vn,Bn),(Au=Vn.prototype).Fd=function(){},Au.Fe=function(){this.Mb()&&this.s()},Au.Hl=function(){this.f.forEach(me),this.f.length=0;var t=this.qd();for(e in this.f.push(de(t,"add",this.Gl,this),de(t,"remove",this.Il,this)),this.c)this.c[e].forEach(me);lt(this.c);for(var e=0,o=(t=t.a).length;e=t.minResolution&&eu[2])&&(c=[y+h*Math.ceil((u[0]-y)/h),t[1]])),h=(u=r.layerStatesArray).length-1;0<=h;--h){var f=u[h],y=f.layer;if(Kn(f,l)&&o.call(i,y)&&(f=hs(this,y),p=y.ha()?f.Ea(y.ha().u?c:t,r,e,a,s):p))return p}},Au.Ei=function(t,e,o,i,r){return void 0!==this.Ea(t,e,o,Ui,this,i,r)},Au.Fl=function(){this.o.render()},Au.Jg=w,Au.Rp=function(t,e){for(var o in this.c)e&&o in e.layerStates||(t=o,o=this.c[t],delete this.c[t],me(this.v[t]),delete this.v[t],Se(o))},e(cs,Me);var fs=[0,0,0,1],ys=[],gs=[0,0,0,1];function ds(t,e,o,i){e&&(t.translate(o,i),t.rotate(e),t.translate(-o,-i))}function vs(){}function bs(t,e,o,i,r){this.i=t,this.u=e,this.c=o,this.S=i,this.Yb=r,this.M=this.b=this.a=this.Ua=this.R=this.I=null,this.na=this.T=this.l=this.B=this.C=this.D=0,this.fa=!1,this.f=this.fb=0,this.pa=!1,this.oa=0,this.Ia="",this.va=this.Jb=0,this.Sa=!1,this.j=this.$a=0,this.ra=this.o=this.g=null,this.v=[],this.xb=qn()}function ms(t,e,o){if(t.M){e=Xi(e,0,o,2,t.S,t.v),o=t.i;var i=t.xb,r=o.globalAlpha;1!=t.l&&(o.globalAlpha=r*t.l);var n=t.fb;t.fa&&(n+=t.Yb);for(var s=0,a=e.length;s=a;){var p=this.i[s];o[G(this.f[s]).toString()]&&(i!==n&&Bs(t,e,i,n),n=p),s--,i=p}i!==n&&Bs(t,e,i,n),i=n=a}},Au.ve=function(t,e,o,i,r){for(var n,s=this.i.length-2,a=this.i[s+1],p=this.u.length-1;0<=p;--p){var h=this.j[p];for(t.uniform4fv(this.v.B,h[0]),qs(this,t,h[1],h[2]),n=this.u[p];0<=s&&this.i[s]>=n;){var h=this.i[s],l=this.f[s];if(void 0===o[G(l).toString()]&&l.V()&&(void 0===r||nt(r,l.V().G()))&&(t.clear(t.COLOR_BUFFER_BIT|t.DEPTH_BUFFER_BIT),Bs(t,e,h,a),a=i(l)))return a;s--,a=h}}},Au.Ma=function(t,e){var o;e=e?(o=e.i,this.c.lineDash=o||Vs,o=e.g,this.c.lineDashOffset=o||0,o=!((o=e.a)instanceof CanvasGradient||o instanceof CanvasPattern)&&Be(o).map(function(t,e){return 3!=e?t/255:t})||Ws,void 0!==(e=e.c)?e:1):(o=[0,0,0,0],0),t=!((t=t?t.b:[0,0,0,0])instanceof CanvasGradient||t instanceof CanvasPattern)&&Be(t).map(function(t,e){return 3!=e?t/255:t})||Xs,this.c.strokeColor&&U(this.c.strokeColor,o)&&this.c.fillColor&&U(this.c.fillColor,t)&&this.c.lineWidth===e||(this.c.s=!0,this.c.fillColor=t,this.c.strokeColor=o,this.c.lineWidth=e,this.j.push([t,o,e]))},e(Js,Ls);var _s=new Js;function $s(){this.b="varying vec2 a;varying float b;attribute vec2 c;attribute vec2 d;attribute vec2 e;attribute float f;attribute float g;uniform mat4 h;uniform mat4 i;uniform mat4 j;void main(void){mat4 offsetMatrix=i;if(g==1.0){offsetMatrix=i*j;}vec4 offsets=offsetMatrix*vec4(e,0.0,0.0);gl_Position=h*vec4(c,0.0,1.0)+offsets;a=d;b=f;}"}e($s,Rs);var Qs=new $s;function ta(t,e){this.c=t.getUniformLocation(e,"j"),this.f=t.getUniformLocation(e,"i"),this.a=t.getUniformLocation(e,"k"),this.i=t.getUniformLocation(e,"h"),this.v=t.getAttribLocation(e,"e"),this.u=t.getAttribLocation(e,"f"),this.b=t.getAttribLocation(e,"c"),this.D=t.getAttribLocation(e,"g"),this.C=t.getAttribLocation(e,"d")}function ea(t,e){this.j=t,this.b=e,this.a={},this.c={},this.i={},this.l=this.v=this.f=this.o=null,(this.g=d(Vo,"OES_element_index_uint"))&&e.getExtension("OES_element_index_uint"),de(this.j,"webglcontextlost",this.Xo,this),de(this.j,"webglcontextrestored",this.Yo,this)}function oa(t,e,o){var i,r,n=t.b,s=o.b,a=String(G(o));a in t.a?n.bindBuffer(e,t.a[a].buffer):(i=n.createBuffer(),n.bindBuffer(e,i),34962==e?r=new Float32Array(s):34963==e&&(r=new(t.g?Uint32Array:Uint16Array)(s)),n.bufferData(e,r,o.a),t.a[a]={lc:o,buffer:i})}function ia(t,e){var o=t.b;e=String(G(e));var i=t.a[e];o.isContextLost()||o.deleteBuffer(i.buffer),delete t.a[e]}function ra(t){var e,o,i,r;return t.f||(o=(e=t.b).createFramebuffer(),e.bindFramebuffer(e.FRAMEBUFFER,o),i=pa(e,1,1),r=e.createRenderbuffer(),e.bindRenderbuffer(e.RENDERBUFFER,r),e.renderbufferStorage(e.RENDERBUFFER,e.DEPTH_COMPONENT16,1,1),e.framebufferTexture2D(e.FRAMEBUFFER,e.COLOR_ATTACHMENT0,e.TEXTURE_2D,i,0),e.framebufferRenderbuffer(e.FRAMEBUFFER,e.DEPTH_ATTACHMENT,e.RENDERBUFFER,r),e.bindTexture(e.TEXTURE_2D,null),e.bindRenderbuffer(e.RENDERBUFFER,null),e.bindFramebuffer(e.FRAMEBUFFER,null),t.f=o,t.v=i,t.l=r),t.f}function na(t,e){var o=String(G(e));if(o in t.c)return t.c[o];var i=t.b,r=i.createShader(e.U());return i.shaderSource(r,e.b),i.compileShader(r),t.c[o]=r}function sa(t,e,o){var i=G(e)+"/"+G(o);if(i in t.i)return t.i[i];var r=t.b,n=r.createProgram();return r.attachShader(n,na(t,e)),r.attachShader(n,na(t,o)),r.linkProgram(n),t.i[i]=n}function aa(t,e,o){var i=t.createTexture();return t.bindTexture(t.TEXTURE_2D,i),t.texParameteri(t.TEXTURE_2D,t.TEXTURE_MAG_FILTER,t.LINEAR),t.texParameteri(t.TEXTURE_2D,t.TEXTURE_MIN_FILTER,t.LINEAR),void 0!==e&&t.texParameteri(3553,10242,e),void 0!==o&&t.texParameteri(3553,10243,o),i}function pa(t,e,o){var i=aa(t,void 0,void 0);return t.texImage2D(t.TEXTURE_2D,0,t.RGBA,e,o,0,t.RGBA,t.UNSIGNED_BYTE,null),i}function ha(t,e){var o=aa(t,33071,33071);return t.texImage2D(t.TEXTURE_2D,0,t.RGBA,t.RGBA,t.UNSIGNED_BYTE,e),o}function la(t,e){Gs.call(this,0,e),this.C=this.D=void 0,this.S=[],this.v=[],this.oa=void 0,this.j=[],this.c=[],this.I=this.ra=void 0,this.B=null,this.fb=this.fa=this.na=this.T=this.Ua=this.R=void 0,this.va=[],this.u=[],this.pa=void 0}function ua(t,e,o,i){for(var r=t.D,n=t.C,s=t.oa,a=t.ra,p=t.I,h=t.R,l=t.Ua,u=t.T,c=t.na?1:0,f=-t.fa,y=t.fb,g=t.pa,d=Math.cos(f),f=Math.sin(f),v=t.b.length,b=t.a.length,m=0;m=a;){var h=this.i[n],l=this.f[n];if(void 0===o[G(l).toString()]&&l.V()&&(void 0===r||nt(r,l.V().G()))&&(t.clear(t.COLOR_BUFFER_BIT|t.DEPTH_BUFFER_BIT),Bs(t,e,h,p),p=i(l)))return p;p=h,n--}}},Au.Ub=function(t){var e=t.Hc(),o=t.Y(1),i=t.ye(),r=t.qg(1),n=t.f,s=t.Oc(),a=t.l,p=t.g,h=t.ic();t=t.a,this.j.length?G(this.j[this.j.length-1])!=G(o)&&(this.S.push(this.b.length),this.j.push(o)):this.j.push(o),this.c.length?G(this.c[this.c.length-1])!=G(r)&&(this.v.push(this.b.length),this.c.push(r)):this.c.push(r),this.D=e[0],this.C=e[1],this.oa=h[1],this.ra=i[1],this.I=i[0],this.R=n,this.Ua=s[0],this.T=s[1],this.fa=p,this.na=a,this.fb=t,this.pa=h[0]},e(ya,Ls);var ga=new ya;function da(){this.b="varying float a;varying vec2 b;varying float c;attribute vec2 d;attribute vec2 e;attribute vec2 f;attribute float g;uniform mat4 h;uniform mat4 i;uniform mat4 j;uniform float k;uniform float l;bool nearlyEquals(in float value,in float ref){float epsilon=0.000000000001;return value>=ref-epsilon&&value<=ref+epsilon;}void alongNormal(out vec2 offset,in vec2 nextP,in float turnDir,in float direction){vec2 dirVect=nextP-e;vec2 normal=normalize(vec2(-turnDir*dirVect.y,turnDir*dirVect.x));offset=k/2.0*normal*direction;}void miterUp(out vec2 offset,out float round,in bool isRound,in float direction){float halfWidth=k/2.0;vec2 tangent=normalize(normalize(f-e)+normalize(e-d));vec2 normal=vec2(-tangent.y,tangent.x);vec2 dirVect=f-e;vec2 tmpNormal=normalize(vec2(-dirVect.y,dirVect.x));float miterLength=abs(halfWidth/dot(normal,tmpNormal));offset=normal*direction*miterLength;round=0.0;if(isRound){round=1.0;}else if(miterLength>l+k){offset=halfWidth*tmpNormal*direction;}} bool miterDown(out vec2 offset,in vec4 projPos,in mat4 offsetMatrix,in float direction){bool degenerate=false;vec2 tangent=normalize(normalize(f-e)+normalize(e-d));vec2 normal=vec2(-tangent.y,tangent.x);vec2 dirVect=d-e;vec2 tmpNormal=normalize(vec2(-dirVect.y,dirVect.x));vec2 longOffset,shortOffset,longVertex;vec4 shortProjVertex;float halfWidth=k/2.0;if(length(f-e)>length(d-e)){longOffset=tmpNormal*direction*halfWidth;shortOffset=normalize(vec2(dirVect.y,-dirVect.x))*direction*halfWidth;longVertex=f;shortProjVertex=h*vec4(d,0.0,1.0);}else{shortOffset=tmpNormal*direction*halfWidth;longOffset=normalize(vec2(dirVect.y,-dirVect.x))*direction*halfWidth;longVertex=d;shortProjVertex=h*vec4(f,0.0,1.0);}vec4 p1=h*vec4(longVertex,0.0,1.0)+offsetMatrix*vec4(longOffset,0.0,0.0);vec4 p2=projPos+offsetMatrix*vec4(longOffset,0.0,0.0);vec4 p3=shortProjVertex+offsetMatrix*vec4(-shortOffset,0.0,0.0);vec4 p4=shortProjVertex+offsetMatrix*vec4(shortOffset,0.0,0.0);float denom=(p4.y-p3.y)*(p2.x-p1.x)-(p4.x-p3.x)*(p2.y-p1.y);float firstU=((p4.x-p3.x)*(p1.y-p3.y)-(p4.y-p3.y)*(p1.x-p3.x))/denom;float secondU=((p2.x-p1.x)*(p1.y-p3.y)-(p2.y-p1.y)*(p1.x-p3.x))/denom;float epsilon=0.000000000001;if(firstU>epsilon&&firstU<1.0-epsilon&&secondU>epsilon&&secondU<1.0-epsilon){shortProjVertex.x=p1.x+firstU*(p2.x-p1.x);shortProjVertex.y=p1.y+firstU*(p2.y-p1.y);offset=shortProjVertex.xy;degenerate=true;}else{float miterLength=abs(halfWidth/dot(normal,tmpNormal));offset=normal*direction*miterLength;}return degenerate;}void squareCap(out vec2 offset,out float round,in bool isRound,in vec2 nextP,in float turnDir,in float direction){round=0.0;vec2 dirVect=e-nextP;vec2 firstNormal=normalize(dirVect);vec2 secondNormal=vec2(turnDir*firstNormal.y*direction,-turnDir*firstNormal.x*direction);vec2 hypotenuse=normalize(firstNormal-secondNormal);vec2 normal=vec2(turnDir*hypotenuse.y*direction,-turnDir*hypotenuse.x*direction);float length=sqrt(c*c*2.0);offset=normal*length;if(isRound){round=1.0;}} void main(void){bool degenerate=false;float direction=float(sign(g));mat4 offsetMatrix=i*j;vec2 offset;vec4 projPos=h*vec4(e,0.0,1.0);bool round=nearlyEquals(mod(g,2.0),0.0);a=0.0;c=k/2.0;b=projPos.xy;if(nearlyEquals(mod(g,3.0),0.0)||nearlyEquals(mod(g,17.0),0.0)){alongNormal(offset,f,1.0,direction);}else if(nearlyEquals(mod(g,5.0),0.0)||nearlyEquals(mod(g,13.0),0.0)){alongNormal(offset,d,-1.0,direction);}else if(nearlyEquals(mod(g,23.0),0.0)){miterUp(offset,a,round,direction);}else if(nearlyEquals(mod(g,19.0),0.0)){degenerate=miterDown(offset,projPos,offsetMatrix,direction);}else if(nearlyEquals(mod(g,7.0),0.0)){squareCap(offset,a,round,f,1.0,direction);}else if(nearlyEquals(mod(g,11.0),0.0)){squareCap(offset,a,round,d,-1.0,direction);}if(!degenerate){vec4 offsets=offsetMatrix*vec4(offset,0.0,0.0);gl_Position=projPos+offsets;}else{gl_Position=vec4(offset,0.0,1.0);}}"}e(da,Rs);var va=new da;function ba(t,e){this.B=t.getUniformLocation(e,"n"),this.oa=t.getUniformLocation(e,"k"),this.R=t.getUniformLocation(e,"l"),this.c=t.getUniformLocation(e,"j"),this.f=t.getUniformLocation(e,"i"),this.a=t.getUniformLocation(e,"m"),this.ra=t.getUniformLocation(e,"p"),this.i=t.getUniformLocation(e,"h"),this.I=t.getUniformLocation(e,"o"),this.g=t.getAttribLocation(e,"g"),this.o=t.getAttribLocation(e,"d"),this.l=t.getAttribLocation(e,"f"),this.b=t.getAttribLocation(e,"e")}function ma(t,e){Gs.call(this,0,e),this.v=null,this.u=[],this.j=[],this.c={strokeColor:null,lineCap:void 0,lineDash:null,lineDashOffset:void 0,lineJoin:void 0,lineWidth:void 0,miterLimit:void 0,s:!1}}function wa(t,e,o,i){for(var r=t.a.length,n=t.b.length,s="bevel"===t.c.lineJoin?0:"miter"===t.c.lineJoin?1:2,a="butt"===t.c.lineCap?0:"square"===t.c.lineCap?1:2,p=fa(e,o,i),h=n,l=1,u=0;uo&&(this.i.push(o),this.f.push(e),this.c.s&&(this.j.push(o),this.c.s=!1))},Au.Db=function(){this.l=new zs(this.a),this.o=new zs(this.b),this.i.push(this.b.length),!this.j.length&&0=l;){var u=this.i[h];o[G(this.f[h]).toString()]&&(s!==p&&(Bs(t,e,s,p),t.clear(t.DEPTH_BUFFER_BIT)),p=u),h--,s=u}s!==p&&(Bs(t,e,s,p),t.clear(t.DEPTH_BUFFER_BIT)),s=p=l}i||(t.disable(t.DEPTH_TEST),t.clear(t.DEPTH_BUFFER_BIT),t.depthMask(n),t.depthFunc(r))},Au.ve=function(t,e,o,i,r){for(var n,s=this.i.length-2,a=this.i[s+1],p=this.j.length-1;0<=p;--p)for(Aa(this,t,(h=this.u[p])[0],h[1],h[2]),n=this.j[p];0<=s&&this.i[s]>=n;){var h=this.i[s],l=this.f[s];if(void 0===o[G(l).toString()]&&l.V()&&(void 0===r||nt(r,l.V().G()))&&(t.clear(t.COLOR_BUFFER_BIT|t.DEPTH_BUFFER_BIT),Bs(t,e,h,a),a=i(l)))return a;s--,a=h}},Au.Ma=function(t,e){t=e.f,this.c.lineCap=void 0!==t?t:"round",t=e.i,this.c.lineDash=t||Vs,t=e.g,this.c.lineDashOffset=t||0,t=e.j,this.c.lineJoin=void 0!==t?t:"round",t=!((t=e.a)instanceof CanvasGradient||t instanceof CanvasPattern)&&Be(t).map(function(t,e){return 3!=e?t/255:t})||Ws;var o=void 0!==(o=e.c)?o:1;e=void 0!==(e=e.o)?e:10,this.c.strokeColor&&U(this.c.strokeColor,t)&&this.c.lineWidth===o&&this.c.miterLimit===e||(this.c.s=!0,this.c.strokeColor=t,this.c.lineWidth=o,this.c.miterLimit=e,this.u.push([t,o,e]))};var Ea=3,Ta=5,ja=7,Ca=11,La=13,Ra=17,Ia=19,Na=23;function Fa(){this.b="precision mediump float;uniform vec4 e;uniform float f;void main(void){gl_FragColor=e;float alpha=e.a*f;if(alpha==0.0){discard;}gl_FragColor.a=alpha;}"}e(Fa,Ls);var ka=new Fa;function Da(){this.b="attribute vec2 a;uniform mat4 b;uniform mat4 c;uniform mat4 d;void main(void){gl_Position=b*vec4(a,0.0,1.0);}"}e(Da,Rs);var Oa=new Da;function Ua(t,e){this.B=t.getUniformLocation(e,"e"),this.c=t.getUniformLocation(e,"d"),this.f=t.getUniformLocation(e,"c"),this.a=t.getUniformLocation(e,"f"),this.i=t.getUniformLocation(e,"b"),this.b=t.getAttribLocation(e,"a")}function Ga(t){t=t||{},this.a=void 0!==t.color?t.color:null,this.f=t.lineCap,this.i=void 0!==t.lineDash?t.lineDash:null,this.g=t.lineDashOffset,this.j=t.lineJoin,this.o=t.miterLimit,this.c=t.width,this.b=void 0}function Ba(t){this.b=this.a=this.i=void 0,this.f=void 0===t||t,this.c=0}function Xa(t){var e,o,i=t.b;i&&(e=i.next,o=i.ub,e&&(e.ub=o),o&&(o.next=e),t.b=e||o,t.i===t.a?(t.b=void 0,t.i=void 0,t.a=void 0):t.i===i?t.i=t.b:t.a===i&&(t.a=o?t.b.ub:t.b),t.c--)}function Va(t){if(t.b=t.i,t.b)return t.b.data}function Wa(t){if(t.b&&t.b.next)return t.b=t.b.next,t.b.data}function Za(t){if(t.b&&t.b.next)return t.b.next.data}function Ka(t){if(t.b&&t.b.ub)return t.b=t.b.ub,t.b.data}function za(t){if(t.b&&t.b.ub)return t.b.ub.data}function Ya(t){if(t.b)return t.b.data}(Au=Ga.prototype).clone=function(){var t=this.a;return new Ga({color:t&&t.slice?t.slice():t||void 0,lineCap:this.f,lineDash:this.i?this.i.slice():void 0,lineDashOffset:this.g,lineJoin:this.j,miterLimit:this.o,width:this.c})},Au.No=function(){return this.a},Au.Vk=function(){return this.f},Au.Oo=function(){return this.i},Au.Wk=function(){return this.g},Au.Xk=function(){return this.j},Au.bl=function(){return this.o},Au.Po=function(){return this.c},Au.Qo=function(t){this.a=t,this.b=void 0},Au.aq=function(t){this.f=t,this.b=void 0},Au.setLineDash=function(t){this.i=t,this.b=void 0},Au.bq=function(t){this.g=t,this.b=void 0},Au.cq=function(t){this.j=t,this.b=void 0},Au.gq=function(t){this.o=t,this.b=void 0},Au.jq=function(t){this.c=t,this.b=void 0},Ba.prototype.concat=function(t){var e;t.b&&(this.b?(e=this.b.next,this.b.next=t.i,t.i.ub=this.b,e.ub=t.a,t.a.next=e,this.c+=t.c):(this.b=t.b,this.i=t.i,this.a=t.a,this.c=t.c),t.b=void 0,t.i=void 0,t.a=void 0,t.c=0)};var Ha,qa={$d:function(){}};function Ja(t,e,o){var i=t[e];t[e]=t[o],t[o]=i}function _a(t,e){return t=t.ca&&e.ia>=t.da}function pp(t){return{children:t,height:1,ib:!0,ca:1/0,da:1/0,$:-1/0,ia:-1/0}}function hp(t,e,o,i,r){for(var n,s=[e,o];s.length;)(o=s.pop())-(e=s.pop())<=i||(n=e+Math.ceil((o-e)/i/2)*i,Ha(t,n,e,o,r),s.push(e,n,n,o))}function lp(t){this.a=qa.$d(t),this.b={}}function up(t,e,o){var i=t.b[G(o)];Z([i.ca,i.da,i.$,i.ia],e)||(t.remove(o),t.Ca(e,o))}function cp(t){return t.a.all().map(function(t){return t.value})}function fp(t,e){return t.a.search({ca:e[0],da:e[1],$:e[2],ia:e[3]}).map(function(t){return t.value})}function yp(t,e,o,i){return gp(fp(t,e),o,i)}function gp(t,e,o){for(var i,r=0,n=t.length;rn&&(n=e[c],u=e[c+1]),l=y}}else for(l=s=Mp(t,e[c=e.length-o],e[c+1],a++),n=e[c],u=e[c+1],c-=o,f=0;f<=c;c-=o)y=Mp(t,e[c],e[c+1],a++),h.push(Pp(l,y,i)),p.push([Math.min(l.x,y.x),Math.min(l.y,y.y),Math.max(l.x,y.x),Math.max(l.y,y.y)]),e[c]>n&&(n=e[c],u=e[c+1]),l=y;return h.push(Pp(y,s,i)),p.push([Math.min(l.x,y.x),Math.min(l.y,y.y),Math.max(l.x,y.x),Math.max(l.y,y.y)]),r.load(p,h),[n,u]}function mp(t,e,o){var i=Va(t),r=i,n=Wa(t),s=!1;do{var a=o?Zs(n.W.x,n.W.y,r.W.x,r.W.y,r.aa.x,r.aa.y):Zs(r.aa.x,r.aa.y,r.W.x,r.W.y,n.W.x,n.W.y)}while(void 0===a?(Ap(r,n,t,e),s=!0,n===i&&(i=Za(t)),n=r,Ka(t)):r.W.Fb!==a&&(r.W.Fb=a,s=!0),r=n,n=Wa(t),r!==i);return s}function wp(t,e,o,i,r){var n=t.b.length,s=Va(e),a=za(e),p=s,h=Wa(e),l=Za(e),u=!1;do{var c,f=p.aa,y=p.W,g=h.W}while(!1===y.Fb&&(c=r?Cp(l.W,g,y,f,a.aa):Cp(a.aa,f,y,g,l.W),!i&&Tp({aa:f,W:g},o).length||!c||Ep(f,y,g,o,!0).length||!i&&!1!==f.Fb&&!1!==g.Fb&&dr([a.aa.x,a.aa.y,f.x,f.y,y.x,y.y,g.x,g.y,l.W.x,l.W.y],0,10,2)!==!r||(t.b[n++]=f.hb,t.b[n++]=y.hb,t.b[n++]=g.hb,Ap(p,h,e,o),h===s&&(s=l),u=!0)),a=za(e),p=Ya(e),h=Wa(e),l=Za(e),p!==s&&3(o.y-i.y)*(e.x-i.x);return r=(r.x-i.x)*(e.y-i.y)<(r.y-i.y)*(e.x-i.x),t=(t.x-e.x)*(i.y-e.y)>(t.y-e.y)*(i.x-e.x),o=(o.x-e.x)*(i.y-e.y)<(o.y-e.y)*(i.x-e.x),e=e.Fb?o||t:o&&t,(i.Fb?r||n:r&&n)&&e}function Lp(){}function Rp(t,e,o){this.f=e,this.g=t,this.c=o,this.a={}}function Ip(t,e){var o,i=[];for(o in t.a){var r,n=t.a[o];for(r in n)i.push(n[r].Eb(e))}return function(){for(var t,e=i.length,o=0;othis.Hf;)this.jk(i,e),e--;this.Zj(o,i,e)},jk:function(t,e){var o=t[e],i=o.children.length,r=this.fh;this.$j(o,r,i),i=this.ak(o,r,i),(i=pp(o.children.splice(i,o.children.length-i))).height=o.height,i.ib=o.ib,Qa(o,this.wb),Qa(i,this.wb),e?t[e-1].children.push(i):this.hh(o,i)},hh:function(t,e){this.data=pp([t,e]),this.data.height=t.height+1,this.data.ib=!1,Qa(this.data,this.wb)},ak:function(t,e,o){for(var i=s=1/0,r=e;r<=o-e;r++){var n,s,a=tp(t,0,r,this.wb),p=tp(t,r,o,this.wb),h=Math.max(0,Math.min(a.$,p.$)-Math.max(a.ca,p.ca))*Math.max(0,Math.min(a.ia,p.ia)-Math.max(a.da,p.da)),a=rp(a)+rp(p);hr&&(this.i.push(r),this.f.push(e),this.j.s&&(this.c.push(r),this.j.s=!1)),this.g.b.length>n&&Pa(this.g,e,n)},Au.rc=function(t,e){var o=t.Bb(),i=t.qa();if(0=l;){var u=this.i[h];o[G(this.f[h]).toString()]&&(s!==p&&(Bs(t,e,s,p),t.clear(t.DEPTH_BUFFER_BIT)),p=u),h--,s=u}s!==p&&(Bs(t,e,s,p),t.clear(t.DEPTH_BUFFER_BIT)),s=p=l}i||(t.disable(t.DEPTH_TEST),t.clear(t.DEPTH_BUFFER_BIT),t.depthMask(n),t.depthFunc(r))},Au.ve=function(t,e,o,i,r){for(var n,s=this.i.length-2,a=this.i[s+1],p=this.c.length-1;0<=p;--p){var h=this.u[p];for(t.uniform4fv(this.v.B,h),n=this.c[p];0<=s&&this.i[s]>=n;){var h=this.i[s],l=this.f[s];if(void 0===o[G(l).toString()]&&l.V()&&(void 0===r||nt(r,l.V().G()))&&(t.clear(t.COLOR_BUFFER_BIT|t.DEPTH_BUFFER_BIT),Bs(t,e,h,a),a=i(l)))return a;s--,a=h}}},Au.Ma=function(t,e){t=!((t=t?t.b:[0,0,0,0])instanceof CanvasGradient||t instanceof CanvasPattern)&&Be(t).map(function(t,e){return 3!=e?t/255:t})||Xs,this.j.fillColor&&U(t,this.j.fillColor)||(this.j.fillColor=t,this.j.s=!0,this.u.push(t)),e?this.g.Ma(null,e):this.g.Ma(null,new Ga({color:[0,0,0,0],lineWidth:0}))},Lp.prototype.La=function(){},e(Rp,js),Rp.prototype.b=function(t,e){var o=void 0!==t?t.toString():"0";return void 0===(t=this.a[o])&&(t={},this.a[o]=t),void 0===(o=t[e])&&(o=new kp[e](this.g,this.f),t[e]=o),o},Rp.prototype.i=function(){return ct(this.a)},Rp.prototype.La=function(t,e,o,i,r,n,s,a){var p=Object.keys(this.a).map(Number);p.sort(D);for(var h=0,l=p.length;h=t.l)break;++n}o=r+" "+i,t.D!=o&&(t.o.innerHTML=o,t.D=o),t.B!=e&&(t.o.style.width=e+"px",t.B=e),t.j||(t.c.style.display="",t.j=!0)}else t.j&&(t.c.style.display="none",t.j=!1)}rh.prototype.C=function(){return this.get(ph)},rh.prototype.T=function(){ah(this)},rh.prototype.I=function(t){this.set(ph,t)};var ph="units";function hh(t){t=t||{},this.c=void 0,this.j=lh,this.D=this.l=0,this.I=null,this.na=!1,this.T=void 0!==t.duration?t.duration:200;var e=void 0!==t.className?t.className:"ol-zoomslider",o=document.createElement("button");o.setAttribute("type","button"),o.className=e+"-thumb ol-unselectable";var i=document.createElement("div");i.className=e+" ol-unselectable ol-control",i.appendChild(o),this.o=new ri(i),de(this.o,"pointerdown",this.yl,this),de(this.o,"pointermove",this.wl,this),de(this.o,"pointerup",this.xl,this),de(i,"click",this.vl,this),de(o,"click",Pe),Je.call(this,{element:i,render:t.render||uh})}e(hh,Je),hh.prototype.ka=function(){Se(this.o),Je.prototype.ka.call(this)};var lh=0;function uh(t){var e,o,i,r,n;t.frameState&&(this.na||(e=(r=this.element).offsetWidth,o=r.offsetHeight,n=r.firstElementChild,i=getComputedStyle(n),r=n.offsetWidth+parseFloat(i.marginRight)+parseFloat(i.marginLeft),n=n.offsetHeight+parseFloat(i.marginTop)+parseFloat(i.marginBottom),this.I=[r,n],o>1)],o))<0?p=r+1:(h=r,l=!a);a=(r=l?p:~p)<0?(o=(o-s[-r-2])/(s[-r-1]-s[-r-2]),s=f(t[e+=(-r-2)*i],t[e+i],o),f(t[e+1],t[e+i+1],o)):(s=t[e+r*i],t[e+r*i+1])}return n?(n[0]=s,n[1]=a,n):[s,a]}function hl(t,e,o,i,r,n){if(o==e)return null;if(r>1)+1)*i-1]?o=n:e=n+1;if(r==(o=t[e*i-1]))return t.slice((e-1)*i,(e-1)*i+i);var s;for(n=(r-o)/(t[(e+1)*i-1]-o),o=[],s=0;s>>0):4294967296*(e>>>0)+(t>>>0)}var o=function(t,e,o,i,r){var n=8*r-i-1,s=(1<>1,p=-7,h=o?-1:1,l=t[e+(r=o?r-1:0)];for(r+=h,o=l&(1<<-p)-1,l>>=-p,p+=n;0>=-p,p+=i;0>3,n=this.ea;this.type=7&i,t(r,e,this),this.ea===n&&this.mq(i)}return e},yp:function(){var t=o(this.lc,this.ea,!0,23,4);return this.ea+=4,t},up:function(){var t=o(this.lc,this.ea,!0,52,8);return this.ea+=8,t},Ka:function(t){var e=this.lc,o=e[this.ea++],i=127&o;return o<128?i:(i|=(127&(o=e[this.ea++]))<<7,o<128?i:(i|=(127&(o=e[this.ea++]))<<14,o<128?i:(i|=(127&(o=e[this.ea++]))<<21,o<128?i:function(t,e,o){var i=o.lc,r=i[o.ea++],n=(112&r)>>4;if(r<128)return s(t,n,e);if(n|=(127&(r=i[o.ea++]))<<3,r<128)return s(t,n,e);if(n|=(127&(r=i[o.ea++]))<<10,r<128)return s(t,n,e);if(n|=(127&(r=i[o.ea++]))<<17,r<128)return s(t,n,e);if(n|=(127&(r=i[o.ea++]))<<24,r<128)return s(t,n,e);if((r=i[o.ea++])<128)return s(t,n|(1&r)<<31,e);throw Error("Expected varint not more than 10 bytes")}(i|(15&e[this.ea])<<28,t,this))))},Kp:function(){return this.Ka(!0)},ce:function(){var t=this.Ka();return 1==t%2?(t+1)/-2:t/2},sp:function(){return!!this.Ka()},Gg:function(){for(var t=this.Ka()+this.ea,e=this.lc,o="",i=this.ea;i>>10&1023|55296),p=56320|1023&p),o+=String.fromCharCode(p),i+=h}return this.ea=t,o},mq:function(t){if((t&=7)===e.c)for(;127>3)?t.Gg():2===e?t.yp():3===e?t.up():4===e?t.Kp():5===e?t.Ka():6===e?t.ce():7===e?t.sp():null;return e}(o))}function s(t,e,o){3===t&&((t=new a(o,o.Ka()+o.ea)).length&&(e[t.name]=t))}p.prototype={clone:function(){return new p(this.x,this.y)},add:function(t){return this.clone().Yj(t)},rotate:function(t){return this.clone().hk(t)},round:function(){return this.clone().ik()},angle:function(){return Math.atan2(this.y,this.x)},Yj:function(t){return this.x+=t.x,this.y+=t.y,this},hk:function(t){var e=Math.cos(t),o=(t=Math.sin(t))*this.x+e*this.y;return this.x=e*this.x-t*this.y,this.y=o,this},ik:function(){return this.x=Math.round(this.x),this.y=Math.round(this.y),this}},p.Kq=function(t){return!(t instanceof p)&&Array.isArray(t)?new p(t[0],t[1]):t},o.b=["Unknown","Point","LineString","Polygon"],o.prototype.Oh=function(){var t=this.Cc;t.ea=this.Ef;for(var e,o=t.Ka()+t.ea,i=1,r=0,n=0,s=0,a=[];t.ea>=3),r--,1===i||2===i)n+=t.ce(),s+=t.ce(),1===i&&(e&&a.push(e),e=[]),e.push(new p(n,s));else{if(7!==i)throw Error("unknown command "+i);e&&e.push(e[0].clone())}return e&&a.push(e),a},o.prototype.bbox=function(){var t=this.Cc;t.ea=this.Ef;for(var e=t.Ka()+t.ea,o=1,i=0,r=0,n=0,s=1/0,a=-1/0,p=1/0,h=-1/0;t.ea>=3),i--,1===o||2===o)(r+=t.ce())=this.me.length)throw Error("feature index out of bounds");return this.Cc.ea=this.me[t],t=this.Cc.Ka()+this.Cc.ea,new o(this.Cc,t,this.extent,this.ne,this.pe)};var h=a;t.default={Bf:e,Wj:o,Xj:h},t.Bf=e,t.Wj=o,t.Xj=h}(qa.xf=qa.xf||{}),(Au=Uy.prototype).get=function(t){return this.c[t]},Au.Bb=function(){return this.f},Au.G=function(){return this.a||(this.a="Point"===this.i?k(this.b):W(this.b,0,this.b.length,2)),this.a},Au.Wn=function(){return this.g},Au.ec=function(){return this.b},Au.ga=Uy.prototype.ec,Au.V=function(){return this},Au.Xn=function(){return this.c},Au.Vd=Uy.prototype.V,Au.qa=function(){return 2},Au.Lc=w,Au.U=function(){return this.i},e(Gy,ol),(Au=Gy.prototype).U=function(){return"arraybuffer"},Au.Oa=function(t,e){var o=this.c;t=new qa.Dd(t),t=new qa.xf.Bf(t);var i,r=[],n=this.b;for(i in t.layers)if(!o||-1!=o.indexOf(i))for(var s,a,p,h,l,u,c,f,y,g=t.layers[i],d=0,v=g.length;d>=5;e+=s+=String.fromCharCode(n+63)}return e}function gg(t,e){e=e||1e5;for(var o=[],i=0,r=0,n=0,s=t.length;n>1):r>>1;for(t=0,i=o.length;t=e[0]||t[1]<=e[1]&&t[3]>=e[1]||H(t,this.sb,this))},Au.ob=function(t){var e,o=this.a,i=t.slice();for(i[o]=i[0]+(this.A[o]-this.A[0]),e=1;eg[2])&&(c=e*Math.ceil((g[0]-c)/e),f=[f[0]+c,f[1],f[2]+c,f[3]]),c=this.S[0],g=this.S[1],e=-1,i=Math.pow(this.Jb*d,2),r=[],n=[],d=0,o=Yd.length;dx.width?x.width-E:I,D=P+T>x.height?x.height-T:P;e.drawImage(x,E,T,k,D,F,j,k*o,D*o),1!=A&&(e.globalAlpha=N),1==L&&!C||e.setTransform.apply(e,d)}++c;break;case 5:for(y=F[1],w=F[2],M=F[3],P=F[4]*o,A=F[5]*o,C=F[6],L=F[7]*o,x=F[8],S=F[9],(j=F[10])&&(C+=r);ythis.c&&(this.c=this.i.lineWidth,this.f=null)},e(Ev,dv),(Au=Ev.prototype).Zb=function(t,e){var o,i=this.i,r=i.strokeStyle;void 0===i.fillStyle&&void 0===r||(jv(this,t),bv(this,e),this.b.push([9,Xe(fs)]),void 0!==i.strokeStyle&&this.b.push([10,i.strokeStyle,i.lineWidth,i.lineCap,i.lineJoin,i.miterLimit,i.lineDash,i.lineDashOffset,!0,1]),o=t.ga(),r=this.coordinates.length,vv(this,o,0,o.length,t.qa(),!1,!1),t=[1],r=[2,r],this.a.push(t,r),this.b.push(t,r),t=[7],this.b.push(t),void 0!==i.fillStyle&&this.a.push(t),void 0!==i.strokeStyle&&(i=[12],this.a.push(i),this.b.push(i)),xv(this,e))},Au.rc=function(t,e){var o=this.i;jv(this,t),bv(this,e),this.b.push([9,Xe(fs)]),void 0!==o.strokeStyle&&this.b.push([10,o.strokeStyle,o.lineWidth,o.lineCap,o.lineJoin,o.miterLimit,o.lineDash,o.lineDashOffset,!0,1]);o=t.Bb();Tv(this,t.ec(),0,o,t.qa()),xv(this,e)},Au.pc=function(t,e){var o=this.i,i=o.strokeStyle;if(void 0!==o.fillStyle||void 0!==i){jv(this,t),bv(this,e),this.b.push([9,Xe(fs)]),void 0!==o.strokeStyle&&this.b.push([10,o.strokeStyle,o.lineWidth,o.lineCap,o.lineJoin,o.miterLimit,o.lineDash,o.lineDashOffset,!0,1]),o=t.c,i=bl(t),t=t.qa();for(var r=0,n=0,s=o.length;nthis.c&&(this.c=o.lineWidth,this.f=null)):(o.strokeStyle=void 0,o.lineCap=void 0,o.lineDash=null,o.lineDashOffset=void 0,o.lineJoin=void 0,o.lineWidth=void 0,o.miterLimit=void 0)},e(Cv,dv),Cv.prototype.yc=function(t,e,o,i,r,n){var s,a;""!==this.Ia&&this.g&&(this.i||this.f)&&(this.i&&(r=this.i,(s=this.S)&&s.fillStyle==r.fillStyle||(a=[9,r.fillStyle],this.a.push(a),this.b.push(a),s?s.fillStyle=r.fillStyle:this.S={fillStyle:r.fillStyle})),this.f&&(r=this.f,(s=this.D)&&s.lineCap==r.lineCap&&s.lineDash==r.lineDash&&s.lineDashOffset==r.lineDashOffset&&s.lineJoin==r.lineJoin&&s.lineWidth==r.lineWidth&&s.miterLimit==r.miterLimit&&s.strokeStyle==r.strokeStyle||(a=[10,r.strokeStyle,r.lineWidth,r.lineCap,r.lineJoin,r.miterLimit,r.lineDash,r.lineDashOffset,!1,1],this.a.push(a),this.b.push(a),s?(s.lineCap=r.lineCap,s.lineDash=r.lineDash,s.lineDashOffset=r.lineDashOffset,s.lineJoin=r.lineJoin,s.lineWidth=r.lineWidth,s.miterLimit=r.miterLimit,s.strokeStyle=r.strokeStyle):this.D={lineCap:r.lineCap,lineDash:r.lineDash,lineDashOffset:r.lineDashOffset,lineJoin:r.lineJoin,lineWidth:r.lineWidth,miterLimit:r.miterLimit,strokeStyle:r.strokeStyle})),r=this.g,(s=this.C)&&s.font==r.font&&s.textAlign==r.textAlign&&s.textBaseline==r.textBaseline||(a=[11,r.font,r.textAlign,r.textBaseline],this.a.push(a),this.b.push(a),s?(s.font=r.font,s.textAlign=r.textAlign,s.textBaseline=r.textBaseline):this.C={font:r.font,textAlign:r.textAlign,textBaseline:r.textBaseline}),bv(this,n),t=[5,r=this.coordinates.length,t=vv(this,t,e,o,i,!1,!1),this.Ia,this.j,this.o,this.v,this.u,!!this.i,!!this.f,this.l],this.a.push(t),this.b.push(t),xv(this,n))},Cv.prototype.Cb=function(t){var e,o,i,r,n,s,a,p,h;t?((o=t.Fa())?(o=ze((o=o.b)||fs),this.i?this.i.fillStyle=o:this.i={fillStyle:o}):this.i=null,(s=t.Ga())?(o=s.a,i=s.f,r=s.i,a=s.g,p=s.j,n=s.c,s=s.o,i=void 0!==i?i:"round",r=r?r.slice():ys,a=void 0!==a?a:0,p=void 0!==p?p:"round",n=void 0!==n?n:1,s=void 0!==s?s:10,o=ze(o||gs),this.f?((h=this.f).lineCap=i,h.lineDash=r,h.lineDashOffset=a,h.lineJoin=p,h.lineWidth=n,h.miterLimit=s,h.strokeStyle=o):this.f={lineCap:i,lineDash:r,lineDashOffset:a,lineJoin:p,lineWidth:n,miterLimit:s,strokeStyle:o}):this.f=null,e=t.a,o=t.i,i=t.c,r=t.o,n=t.f,s=t.b,a=t.Na(),p=t.g,h=t.j,t=void 0!==e?e:"10px sans-serif",p=void 0!==p?p:"center",h=void 0!==h?h:"middle",this.g?((e=this.g).font=t,e.textAlign=p,e.textBaseline=h):this.g={font:t,textAlign:p,textBaseline:h},this.Ia=void 0!==a?a:"",this.j=void 0!==o?o:0,this.o=void 0!==i?i:0,this.l=void 0!==r&&r,this.v=void 0!==n?n:0,this.u=void 0!==s?s:1):this.Ia=""},e(Lv,js);var Rv={0:[[!0]]};function Iv(t,e,o){var i,r=Math.floor(t.length/2);if(r<=e)for(i=r;it.$&&(t.$=i.$),i.dat.ia&&(t.ia=i.ia)):t[e][o]=i:(t[e]={},t[e][o]=i)}function Wv(t,e,o,i,r,n,s,a,p,h){var l=G(e).toString();l in t.wantedTiles||(t.wantedTiles[l]={});var u=t.wantedTiles[l];t=t.tileQueue;for(var c,f=o.minZoom,y=s;f<=y;--y)for(var g,d=ee(o,n,y,d),v=o.Da(y),b=d.ca;b<=d.$;++b)for(c=d.da;c<=d.ia;++c)s-y<=a?(0==(g=e.Nc(y,b,c,i,r)).getState()&&(u[g.bb()]=!0,g.bb()in t.a||t.f([g,l,oe(o,g.ta),v])),p&&p.call(h,g)):e.Ug(y,b,c,r)}function Zv(t){Dv.call(this,t),this.fa=qn()}function Kv(t,e,o){var i=e.pixelRatio,r=e.size[0]*i,n=e.size[1]*i,s=e.viewState.rotation,a=ot(o),p=it(o),h=_(o);o=J(o),ts(e.coordinateToPixelTransform,a),ts(e.coordinateToPixelTransform,p),ts(e.coordinateToPixelTransform,h),ts(e.coordinateToPixelTransform,o),t.save(),ds(t,-s,r/2,n/2),t.beginPath(),t.moveTo(a[0]*i,a[1]*i),t.lineTo(p[0]*i,p[1]*i),t.lineTo(h[0]*i,h[1]*i),t.lineTo(o[0]*i,o[1]*i),t.clip(),ds(t,s,r/2,n/2)}function zv(t,e,o,i,r){var n,s,a,p=t.a;Ee(p,e)&&(n=i.size[0]*i.pixelRatio,s=i.size[1]*i.pixelRatio,ds(o,-(a=i.viewState.rotation),n/2,s/2),t=r||Yv(t,i,0),p.b(new cs(e,new bs(o,i.pixelRatio,i.extent,t,i.viewState.rotation),i,o,null)),ds(o,a,n/2,s/2))}function Yv(t,e,o){var i=e.viewState,r=e.pixelRatio,n=r/i.resolution;return rs(t.fa,r*e.size[0]/2,r*e.size[1]/2,n,-n,-i.rotation,-i.center[0]+o,-i.center[1])}function Hv(t,e){return G(t)-G(e)}function qv(t,e){return(t=.5*t/e)*t}function Jv(t,e,o,i,r,n){var s,a,p=!1;return(s=o.Y())&&(2==(a=s.Ye())||3==a?s.Bj(r,n):(0==a&&s.load(),s.Nh(r,n),p=!0)),(r=(0,o.Za)(e))&&(i=r.Vd(i),(0,_v[i.U()])(t,i,o,e)),p}e(Dv,Te),Dv.prototype.Ea=w,Dv.prototype.Ue=Gi,Dv.prototype.Nf=function(o,i,r){return function(e,t){return fw(o,i,e,t,function(t){r[e]||(r[e]={}),r[e][t.ta.toString()]=t})}},Dv.prototype.na=function(t){2===t.target.getState()&&Uv(this)},e(Zv,Dv),Zv.prototype.u=function(t,e,o,i){if(this.Ea(t,e,0,Ui,this))return o.call(i,this.a,null)},Zv.prototype.ef=function(t,e,o,i){zv(this,"postcompose",t,e,i)};var _v={Point:function(t,e,o,i){var r=o.Y();if(r){if(2!=r.Ye())return;var n=t.b(o.Ba(),"Image");n.Ub(r),n.qc(e,i)}(r=o.Na())&&((t=t.b(o.Ba(),"Text")).Cb(r),t.yc(e.ga(),0,2,2,e,i))},LineString:function(t,e,o,i){var r,n=o.Ga();n&&((r=t.b(o.Ba(),"LineString")).Ma(null,n),r.mc(e,i)),(n=o.Na())&&((t=t.b(o.Ba(),"Text")).Cb(n),t.yc(ul(e),0,2,2,e,i))},Polygon:function(t,e,o,i){var r,n=o.Fa(),s=o.Ga();(n||s)&&((r=t.b(o.Ba(),"Polygon")).Ma(n,s),r.rc(e,i)),(n=o.Na())&&((t=t.b(o.Ba(),"Text")).Cb(n),t.yc(xr(e),0,2,2,e,i))},MultiPoint:function(t,e,o,i){var r=o.Y();if(r){if(2!=r.Ye())return;var n=t.b(o.Ba(),"Image");n.Ub(r),n.oc(e,i)}(r=o.Na())&&((t=t.b(o.Ba(),"Text")).Cb(r),o=e.ga(),t.yc(o,0,o.length,e.qa(),e,i))},MultiLineString:function(t,e,o,i){var r,n=o.Ga();n&&((r=t.b(o.Ba(),"LineString")).Ma(null,n),r.nc(e,i)),(n=o.Na())&&((t=t.b(o.Ba(),"Text")).Cb(n),o=fl(e),t.yc(o,0,o.length,2,e,i))},MultiPolygon:function(t,e,o,i){var r,n=o.Fa(),s=o.Ga();(s||n)&&((r=t.b(o.Ba(),"Polygon")).Ma(n,s),r.pc(e,i)),(n=o.Na())&&((t=t.b(o.Ba(),"Text")).Cb(n),o=vl(e),t.yc(o,0,o.length,2,e,i))},GeometryCollection:function(t,e,o,i){for(var r=0,n=(e=e.a).length;rp[2];)l=Yv(this,t,l=h*++m),u.La(f,r,l,a,n),s-=h;l=Yv(this,t,0)}ds(f,a,v/2,b/2),f!=o&&(zv(this,"render",f,t,l),o.drawImage(f.canvas,-y,-g),f.translate(-y,-g)),f.globalAlpha=d}c&&o.restore(),this.ef(o,t,e,l)},$v.prototype.Ea=function(t,e,o,i,r){if(this.f){var n=this.a,s={};return this.f.Ea(t,e.viewState.resolution,e.viewState.rotation,o,{},function(t){var e=G(t).toString();if(!(e in s))return s[e]=!0,i.call(r,t,n)})}},$v.prototype.D=function(){Uv(this)},$v.prototype.sd=function(t){function e(t){var e,o=t.Lc();if(o?e=o.call(t,h):(o=n.f)&&(e=o(t,h)),e){if(e){if(o=!1,Array.isArray(e))for(var i=0,r=e.length;it.ad:r<=t.ad),t.l?(r=e.coordinate,i=t.j.V(),t.g===Cb?o=t.a:t.g===Rb?(o=(o=t.a[0])[o.length-1],Pb(t,e)&&(r=t.l.slice())):o=(o=t.a)[o.length-1],o[0]=r[0],o[1]=r[1],t.Za(t.a,i),t.B&&t.B.V().ma(r),i instanceof wr&&t.g!==Rb?(t.C||(t.C=new Ih(new ll(null))),r=i.Ch(0),(e=t.C.V()).ba(r.ja,r.ga())):t.I&&(e=t.C.V()).ma(t.I),jb(t)):(e=e.coordinate.slice(),t.B?t.B.V().ma(e):(t.B=new Ih(new hr(e)),jb(t))),!0}function Pb(t,e){var o=!1;if(t.j){var i=!1,r=[t.l];if(t.g===Lb?i=t.a.length>t.Sa:t.g===Rb&&(i=t.a[0].length>t.Sa,r=[t.a[0][0],t.a[0][t.a[0].length-2]]),i)for(var i=e.map,n=0,s=r.length;n=t.va&&(t.u?i.pop():o=!0),i.push(e.slice()),t.Za(i,r)):t.g===Rb&&((i=t.a[0]).length>=t.va&&(t.u?i.pop():o=!0),i.push(e.slice()),o&&(t.l=i[0]),t.Za(t.a,r)),jb(t),o&&t.Pd()}function Tb(t){t.l=null;var e=t.j;return e&&(t.j=null,t.B=null,t.C=null,t.pa.ha().clear(!0)),e}function jb(t){var e=[];t.j&&e.push(t.j),t.C&&e.push(t.C),t.B&&e.push(t.B),(t=t.pa.ha()).clear(!0),t.cd(e)}e(lb,je),(Au=lb.prototype).Ea=w,Au.ya=function(){return this.j},Au.xa=function(){return this.D},Au.za=function(){return this.c},Au.getState=function(){return this.na},Au.sa=function(){this.s()},Au.ua=function(t){this.j=ub(t),this.s()},e(fb,lb),(Au=fb.prototype).yb=function(t){var e,o=G(t).toString();gb(this,o,t)&&(yb(this,o,t),(e=t.V())?(o=e.G(),this.a&&this.a.Ca(o,t)):this.g[o]=t,this.b(new bb("addfeature",t))),this.s()},Au.cd=function(t){db(this,t),this.s()},Au.clear=function(t){if(t){for(var e in this.v)this.v[e].forEach(me);this.f||(this.v={},this.o={},this.l={})}else if(this.a)for(var o in this.a.forEach(this.Ig,this),this.g)this.Ig(this.g[o]);this.f&&this.f.clear(),this.a&&this.a.clear(),this.R.clear(),this.g={},this.b(new bb("clear")),this.s()},Au.sh=function(t,e){return this.a?this.a.forEach(t,e):this.f?this.f.forEach(t,e):void 0},Au.$b=function(t,e,o){return this.a?yp(this.a,t,e,o):this.f?this.f.forEach(e,o):void 0},Au.th=function(e,o,i){return this.$b(e,function(t){if(t.V().Xa(e)&&(t=o.call(i,t)))return t})},Au.Ah=function(){return this.f},Au.Xe=function(){var t;return this.f?t=this.f.a:this.a&&(t=cp(this.a),ct(this.g)||c(t,ut(this.g))),t},Au.zh=function(t){var e,o,i=[];return e=t,o=function(t){i.push(t)},this.$b([e[0],e[1],e[0],e[1]],function(t){if(t.V().sb(e))return o.call(void 0,t)}),i},Au.Uf=function(t){return fp(this.a,t)},Au.vh=function(t,e){var i=t[0],r=t[1],n=null,s=[NaN,NaN],a=1/0,p=[-1/0,-1/0,1/0,1/0],h=e||Ui;return yp(this.a,p,function(t){var e,o;h(t)&&(e=t.V(),o=a,(a=e.Kb(i,r,s,a))o&&(t.index+=r)})}function rm(t,e,o){Me.call(this,t),this.features=e,this.mapBrowserEvent=o}function nm(t){var e,o;Or.call(this,{handleEvent:sm}),t=t||{},this.C=t.condition||zr,this.D=t.addCondition||Gi,this.B=t.removeCondition||Gi,this.I=t.toggleCondition||Hr,this.l=t.multi||!1,this.o=t.filter||Ui,this.j=t.hitTolerance||0,this.g=new ab({source:new fb({useSpatialIndex:!1,features:t.features,wrapX:t.wrapX}),style:t.style||(c((e=Lh()).Polygon,e.LineString),c(e.GeometryCollection,e.LineString),function(t){return t.V()?e[t.V().U()]:null}),updateWhileAnimating:!0,updateWhileInteracting:!0}),t=t.layers?"function"==typeof t.layers?t.layers:(o=t.layers,function(t){return d(o,t)}):Ui,this.u=t,this.a={},de(t=this.g.ha().f,"add",this.Fn,this),de(t,"remove",this.Jn,this)}function sm(t){if(!this.C(t))return!0;var o=this.D(t),i=this.B(t),r=this.I(t),e=!o&&!i&&!r,n=t.map,s=this.g.ha().f,a=[],p=[];if(e){for(lt(this.a),n.we(t.pixel,function(t,e){if(this.o(t,e))return p.push(t),t=G(t),this.a[t]=e,!this.l}.bind(this),{layerFilter:this.u,hitTolerance:this.j}),e=s.dc()-1;0<=e;--e){var n=s.item(e),h=p.indexOf(n);-1e.v),g))Math.abs(o[0]-r[0])<=Math.abs(o[1]-r[1])?(y=[(i[0]+r[0])/2,(i[1]+r[1])/2],f=e.a(y),u=[(n[0]+o[0])/2,(n[1]+o[1])/2],c=e.a(u),t(e,o,i,y,u,s,a,f,c,l-1),t(e,u,y,r,n,c,f,p,h,l-1)):(y=[(o[0]+i[0])/2,(o[1]+i[1])/2],f=e.a(y),u=[(r[0]+n[0])/2,(r[1]+n[1])/2],c=e.a(u),t(e,o,y,u,n,s,f,c,h,l-1),t(e,y,i,r,u,f,a,p,c,l-1));else{if(y){if(!e.l)return;e.o=!0}e.c.push({source:[s,p,h],target:[o,r,n]}),e.c.push({source:[s,a,p],target:[o,i,r]})}}}(this,t,e,i,o,r,p,h,l,10),this.o&&(a=1/0,this.c.forEach(function(t){a=Math.min(a,t.source[0][0],t.source[1][0],t.source[2][0])}),this.c.forEach(function(t){var e;Math.max(t.source[0][0],t.source[1][0],t.source[2][0])-a>this.b/2&&((e=[[t.source[0][0],t.source[0][1]],[t.source[1][0],t.source[1][1]],[t.source[2][0],t.source[2][1]]])[0][0]-a>this.b/2&&(e[0][0]-=this.b),e[1][0]-a>this.b/2&&(e[1][0]-=this.b),e[2][0]-a>this.b/2&&(e[2][0]-=this.b),Math.max(e[0][0],e[1][0],e[2][0])-Math.min(e[0][0],e[1][0],e[2][0])r[0]||t[1]<0||t[1]>r[1])&&(this.f||(this.f=Ye(1,1)),this.f.clearRect(0,0,1,1),this.f.drawImage(this.M.Y(),t[0],t[1],1,1,0,0,1,1),0<(r=this.f.getImageData(0,0,1,1).data)[3]))return o.call(i,this.a,r)}},e(Zm,Zn),Zm.prototype.Fd=function(t){var e=null,o=t.U();return"canvas"===o?e=new Tm(this):"webgl"===o&&(e=new Wm(t,this)),e},e(Km,Em),Km.prototype.sd=function(t,e){var o=t.pixelRatio,i=t.size,r=(s=t.viewState).projection,n=s.resolution,s=s.center,a=this.a,p=a.ha(),h=p.i,l=p.Ta(r),u=l.tc(n,this.T),c=l.Da(u),f=Math.round(n/c)||1,y=t.extent;if(st(y=void 0!==e.extent?et(y,e.extent):y))return!1;var g=te(l,y,c),d=l.Pc(u),v=l.Da(u),b=X(l.gb(u),l.j),d=F(d[0]+g.ca*b[0]*v,d[1]+g.da*b[1]*v,d[0]+(g.$+1)*b[0]*v,d[1]+(g.ia+1)*b[1]*v,void 0),v=p.nb(o);(b={})[u]={};var m=this.Nf(p,r,b),w=this.l,x=this.va,S=!1;for(C=g.ca;C<=g.$;++C)for(L=g.da;L<=g.ia;++L){var M=p.Nc(u,C,L,o,r);3!=M.getState()||this.a.kd()||ev(M,2),zm(this,M)||(M=tv(M)),zm(this,M)?2==M.getState()&&(b[u][M.ta.toString()]=M,S||-1!=this.g.indexOf(M)||(S=!0)):$t(l,M.ta,m,x,w)||(M=Qt(l,M.ta,x,w))&&m(u+1,M)}if(C=(C=t.viewHints)[0]||C[1],!(this.f&&16t.highWaterMark}function cw(t){lb.call(this,{attributions:t.attributions,extent:t.extent,logo:t.logo,projection:t.projection,state:t.state,wrapX:t.wrapX}),this.va=void 0!==t.opaque&&t.opaque,this.$a=void 0!==t.tilePixelRatio?t.tilePixelRatio:1,this.tileGrid=void 0!==t.tileGrid?t.tileGrid:null,this.a=new lw(t.cacheSize),this.o=[0,0],this.uc=""}function fw(t,e,o,i,r){if(!(e=t.Wd(e)))return!1;for(var n,s,a=!0,p=i.ca;p<=i.$;++p)for(var h=i.da;h<=i.ia;++h)n=t.Sb(o,p,h),s=!1,e.b.hasOwnProperty(n)&&((s=2===(n=e.get(n)).getState())&&(s=!1!==r(n))),s||(a=!1);return a}function yw(t,e){t.uc!==e&&(t.uc=e,t.s())}function gw(t,e,o){var i,r,n=void 0!==o?o:t.c;return o=t.Ta(n),t.u&&n.c&&(e=(i=e)[0],t=oe(o,i),e=T(n=pe(n),t)?i:(i=rt(n),t[0]+=i*Math.ceil((n[0]-t[0])/i),o.bg(t,e))),i=e[0],n=e[1],t=e[2],(o=!(o.minZoom>i||i>o.maxZoom)&&(!(o=(r=o.G())?ee(o,r,i):o.a?o.a[i]:null)||p(o,n,t)))?e:null}function dw(t,e){Me.call(this,t),this.tile=e}function vw(t){cw.call(this,{attributions:t.attributions,cacheSize:t.cacheSize,extent:t.extent,logo:t.logo,opaque:t.opaque,projection:t.projection,state:t.state,tileGrid:t.tileGrid,tilePixelRatio:t.tilePixelRatio,wrapX:t.wrapX}),this.tileLoadFunction=t.tileLoadFunction,this.tileUrlFunction=this.Fc?this.Fc.bind(this):pw,this.urls=null,t.urls?this.eb(t.urls):t.url&&this.jb(t.url),t.tileUrlFunction&&this.cb(t.tileUrlFunction)}function bw(t){vw.call(this,{attributions:t.attributions,cacheSize:t.cacheSize,extent:t.extent,logo:t.logo,opaque:t.opaque,projection:t.projection,state:t.state,tileGrid:t.tileGrid,tileLoadFunction:t.tileLoadFunction||xw,tilePixelRatio:t.tilePixelRatio,tileUrlFunction:t.tileUrlFunction,url:t.url,urls:t.urls,wrapX:t.wrapX}),this.crossOrigin=void 0!==t.crossOrigin?t.crossOrigin:null,this.tileClass=t.tileClass||ov,this.g={},this.v={},this.Sa=t.reprojectionErrorThreshold,this.I=!1}function mw(t,e,o,i,r,n,s){return r=(o=gw(t,e=[e,o,i],n))?t.tileUrlFunction(o,r,n):void 0,(r=new t.tileClass(e,void 0!==r?0:4,void 0!==r?r:"",t.crossOrigin,t.tileLoadFunction)).key=s,de(r,"change",t.Li,t),r}function ww(t,e,o,i,r,n){var s=t.Sb(e,o,i),a=t.uc;if(t.a.b.hasOwnProperty(s)){if((h=t.a.get(s)).key!=a){var p=h,h=mw(t,e,o,i,r,n,a);if(0==p.getState()?h.i=p.i:h.i=p,h.i){e=h.i,o=h;do{if(2==e.getState()){e.i=null;break}}while(1!=e.getState()&&0==e.getState()?o.i=e.i:o=e,e=o.i)}t.a.replace(s,h)}}else h=mw(t,e,o,i,r,n,a),t.a.set(s,h);return h}function xw(t,e){t.Y().src=e}function Sw(t){this.B=void 0!==t.hidpi&&t.hidpi,bw.call(this,{cacheSize:t.cacheSize,crossOrigin:"anonymous",opaque:!0,projection:Bt("EPSG:3857"),reprojectionErrorThreshold:t.reprojectionErrorThreshold,state:"loading",tileLoadFunction:t.tileLoadFunction,tilePixelRatio:this.B?2:1,wrapX:void 0===t.wrapX||t.wrapX}),this.R=void 0!==t.culture?t.culture:"en-us",this.C=void 0!==t.maxZoom?t.maxZoom:-1,this.f=t.key,this.l=t.imagerySet,rw("https://dev.virtualearth.net/REST/v1/Imagery/Metadata/"+this.l+"?uriScheme=https&include=ImageryProviders&key="+this.f,this.pa.bind(this),void 0,"jsonp")}(Au=tw.prototype).sd=function(t,e){var o=this.a,i=o.i;return this.pa!=i&&(this.g.length=0,o=o.j,this.c||"vector"==o||(this.c=Ye()),this.c&&"vector"==o&&(this.c=null)),this.pa=i,Km.prototype.sd.apply(this,arguments)},Au.Of=function(t,e,o,i,r,n,s,a){var p=t,h=this.a,l=e.pixelRatio,u=e.viewState.projection,c=h.i,f=h.get(pb)||null,y=p.o;if(y.Nd||y.mf!=c||y.Kg!=f){for(var g=0,d=p.a.length;gTerms of Use'});function Pw(t){var e=void 0!==(t=t||{}).projection?t.projection:"EPSG:3857",o=void 0!==t.tileGrid?t.tileGrid:ne({extent:pe(e),maxZoom:t.maxZoom,minZoom:t.minZoom,tileSize:t.tileSize});bw.call(this,{attributions:t.attributions,cacheSize:t.cacheSize,crossOrigin:t.crossOrigin,logo:t.logo,opaque:t.opaque,projection:e,reprojectionErrorThreshold:t.reprojectionErrorThreshold,tileGrid:o,tileLoadFunction:t.tileLoadFunction,tilePixelRatio:t.tilePixelRatio,tileUrlFunction:t.tileUrlFunction,url:t.url,urls:t.urls,wrapX:void 0===t.wrapX||t.wrapX})}function Aw(t){this.C=t.account,this.B=t.map||"",this.f=t.config||{},this.l={},Pw.call(this,{attributions:t.attributions,cacheSize:t.cacheSize,crossOrigin:t.crossOrigin,logo:t.logo,maxZoom:void 0!==t.maxZoom?t.maxZoom:18,minZoom:t.minZoom,projection:t.projection,state:"loading",wrapX:t.wrapX}),Ew(this)}function Ew(t){var e,o,i=JSON.stringify(t.f);t.l[i]?Tw(t,t.l[i]):(e="https://"+t.C+".cartodb.com/api/v1/map",t.B&&(e+="/named/"+t.B),(o=new XMLHttpRequest).addEventListener("load",t.Dl.bind(t,i)),o.addEventListener("error",t.Cl.bind(t)),o.open("POST",e),o.setRequestHeader("Content-type","application/json"),o.send(JSON.stringify(t.f)))}function Tw(t,e){t.jb("https://"+e.cdn_url.https+"/"+t.C+"/api/v1/map/"+e.layergroupid+"/{z}/{x}/{y}.png")}function jw(t){fb.call(this,{attributions:t.attributions,extent:t.extent,logo:t.logo,projection:t.projection,wrapX:t.wrapX}),this.resolution=void 0,this.distance=void 0!==t.distance?t.distance:20,this.features=[],this.geometryFunction=t.geometryFunction||function(t){return O((t=t.V())instanceof hr,10),t},this.source=t.source,this.source.J("change",jw.prototype.sa,this)}function Cw(t){if(void 0!==t.resolution){t.features.length=0;for(var e=V(),o=t.distance*t.resolution,i=t.source.Xe(),r={},n=0,s=i.length;n>=1}return o.join("")}(e))}})),i.imageryProviders&&(p=Wt(Bt("EPSG:4326"),this.c),(t=i.imageryProviders.map(function(t){var e=t.attribution,n={};return t.coverageAreas.forEach(function(t){var e,o=t.zoomMin,i=Math.min(t.zoomMax,s);for(t=pt([(t=t.bbox)[1],t[0],t[3],t[2]],p),e=o;e<=i;++e){var r=e.toString(),o=ee(a,t,e);r in n?n[r].push(o):n[r]=[o]}}),new he({html:e,tileRanges:n})})).push(Mw),this.ua(t)),this.D=e,cb(this,"ready"))},e(Pw,bw),e(Aw,Pw),(Au=Aw.prototype).Kk=function(){return this.f},Au.tq=function(t){ht(this.f,t),Ew(this)},Au.Xp=function(t){this.f=t||{},Ew(this)},Au.Dl=function(t,e){if(!(e=e.target).status||200<=e.status&&e.status<300){try{var o=JSON.parse(e.responseText)}catch(t){return void cb(this,"error")}Tw(this,o),this.l[t]=o,cb(this,"ready")}else cb(this,"error")},Au.Cl=function(){cb(this,"error")},e(jw,fb),(Au=jw.prototype).$n=function(){return this.distance},Au.ao=function(){return this.source},Au.Yd=function(t,e,o){this.source.Yd(t,e,o),e!==this.resolution&&(this.clear(),this.resolution=e,Cw(this),this.cd(this.features))},Au.Yp=function(t){this.distance=t,this.sa()},Au.sa=function(){this.clear(),Cw(this),this.cd(this.features),fb.prototype.sa.call(this)},e(Rw,Fm),(Au=Rw.prototype).co=function(){return this.v},Au.Jc=function(t,e,o,i){if(void 0===this.f)return null;e=km(this,e),o=this.T?o:1;var r=this.M;if(r&&this.I==this.i&&r.resolution==e&&r.a==o&&N(r.G(),t))return r;ht(r={F:"image",FORMAT:"PNG32",TRANSPARENT:!0},this.v);var n=((t=t.slice())[0]+t[2])/2,s=(t[1]+t[3])/2;1!=this.B&&(a=this.B*rt(t)/2,p=this.B*tt(t)/2,t[0]=n-a,t[1]=s-p,t[2]=n+a,t[3]=s+p);var a=e/o,p=Math.ceil(rt(t)/a),h=Math.ceil(tt(t)/a);return t[0]=n-a*p/2,t[2]=n+a*p/2,t[1]=s-a*h/2,t[3]=s+a*h/2,this.l[0]=p,this.l[1]=h,n=t,s=this.l,a=o,i=i.mb.split(":").pop(),r.SIZE=s[0]+","+s[1],r.BBOX=n.join(","),r.BBOXSR=i,r.IMAGESR=i,r.DPI=Math.round(90*a),(n=(i=this.f).replace(/MapServer\/?$/,"MapServer/export").replace(/ImageServer\/?$/,"ImageServer/exportImage"))==i&&O(!1,50),r=Lw(n,r),this.M=new _d(t,e,o,this.j,r,this.R,this.g),this.I=this.i,de(this.M,"change",this.o,this),this.M},Au.bo=function(){return this.g},Au.eo=function(){return this.f},Au.fo=function(t){this.M=null,this.g=t,this.s()},Au.ho=function(t){t!=this.f&&(this.f=t,this.M=null,this.s())},Au.io=function(t){ht(this.v,t),this.M=null,this.s()},e(Iw,Fm),(Au=Iw.prototype).ko=function(){return this.g},Au.Jc=function(t,e,o){e=km(this,e),o=this.T?o:1;var i=this.M;if(i&&this.B==this.i&&i.resolution==e&&i.a==o&&N(i.G(),t))return i;1!=this.v&&at(t=t.slice(),this.v);var r,n,s,a,p,h,l,u=[rt(t)/e*o,tt(t)/e*o];return void 0!==this.I?(i=this.I,r=$(t),n=this.pa,s=rt(t),a=tt(t),p=u[0],h=u[1],l=.0254/this.l,u={OPERATION:this.va?"GETDYNAMICMAPOVERLAYIMAGE":"GETMAPIMAGE",VERSION:"2.0.0",LOCALE:"en",CLIENTAGENT:"ol.source.ImageMapGuide source",CLIP:"1",SETDISPLAYDPI:this.l,SETDISPLAYWIDTH:Math.round(u[0]),SETDISPLAYHEIGHT:Math.round(u[1]),SETVIEWSCALE:p*aOpenStreetMap contributors.'});function Bw(t){this.B=null,this.va=void 0!==t.operationType?t.operationType:"pixel",this.Sa=void 0!==t.threads?t.threads:1,this.g=function(t){for(var e=t.length,o=Array(e),i=0;ithis.fk;)this.Ed.shift().callback(null,null)},e.prototype.dh=function(){if(0===this.oe&&0Stamen Design, under CC BY 3.0.'}),Gw],Yw={terrain:{Lb:"jpg",opaque:!0},"terrain-background":{Lb:"jpg",opaque:!0},"terrain-labels":{Lb:"png",opaque:!1},"terrain-lines":{Lb:"png",opaque:!1},"toner-background":{Lb:"png",opaque:!0},toner:{Lb:"png",opaque:!0},"toner-hybrid":{Lb:"png",opaque:!1},"toner-labels":{Lb:"png",opaque:!1},"toner-lines":{Lb:"png",opaque:!1},"toner-lite":{Lb:"png",opaque:!0},watercolor:{Lb:"jpg",opaque:!0}},Hw={terrain:{minZoom:4,maxZoom:18},toner:{minZoom:0,maxZoom:20},watercolor:{minZoom:1,maxZoom:16}};function qw(t){bw.call(this,{attributions:(t=t||{}).attributions,cacheSize:t.cacheSize,crossOrigin:t.crossOrigin,logo:t.logo,projection:t.projection,reprojectionErrorThreshold:t.reprojectionErrorThreshold,tileGrid:t.tileGrid,tileLoadFunction:t.tileLoadFunction,url:t.url,urls:t.urls,wrapX:void 0===t.wrapX||t.wrapX}),this.f=t.params||{},this.l=V(),yw(this,Jw(this))}function Jw(t){var e,o=0,i=[];for(e in t.f)i[o++]=e+"-"+t.f[e];return i.join("/")}function _w(t){cw.call(this,{opaque:!1,projection:t.projection,tileGrid:t.tileGrid,wrapX:void 0===t.wrapX||t.wrapX})}function $w(t,e,o){Qd.call(this,t,2),this.c=e,this.Ia=o,this.a=null}function Qw(t){var e;this.f=null,bw.call(this,{attributions:t.attributions,cacheSize:t.cacheSize,crossOrigin:t.crossOrigin,projection:Bt("EPSG:3857"),reprojectionErrorThreshold:t.reprojectionErrorThreshold,state:"loading",tileLoadFunction:t.tileLoadFunction,wrapX:void 0===t.wrapX||t.wrapX}),t.url?t.jsonp?rw(t.url,this.og.bind(this),this.Ve.bind(this)):((e=new XMLHttpRequest).addEventListener("load",this.Ao.bind(this)),e.addEventListener("error",this.zo.bind(this)),e.open("GET",t.url),e.send()):t.tileJSON?this.og(t.tileJSON):O(!1,51)}function tx(t){var e;cw.call(this,{projection:Bt("EPSG:3857"),state:"loading"}),this.v=void 0===t.preemptive||t.preemptive,this.l=pw,this.g=void 0,this.f=t.jsonp||!1,t.url?this.f?rw(t.url,this.pg.bind(this),this.We.bind(this)):((e=new XMLHttpRequest).addEventListener("load",this.Eo.bind(this)),e.addEventListener("error",this.Do.bind(this)),e.open("GET",t.url),e.send()):t.tileJSON?this.pg(t.tileJSON):O(!1,51)}function ex(t,e,o,i,r,n){Qd.call(this,t,e),this.o=o,this.a=i,this.v=r,this.c=this.j=this.g=null,this.l=n}function ox(t){var e;0==t.state&&(t.state=1,t.l?rw(t.o,t.Ji.bind(t),t.De.bind(t)):((e=new XMLHttpRequest).addEventListener("load",t.Co.bind(t)),e.addEventListener("error",t.Bo.bind(t)),e.open("GET",t.o),e.send()))}function ix(t){var e=(t=t||{}).params||{};bw.call(this,{attributions:t.attributions,cacheSize:t.cacheSize,crossOrigin:t.crossOrigin,logo:t.logo,opaque:!(!("TRANSPARENT"in e)||e.TRANSPARENT),projection:t.projection,reprojectionErrorThreshold:t.reprojectionErrorThreshold,tileGrid:t.tileGrid,tileLoadFunction:t.tileLoadFunction,url:t.url,urls:t.urls,wrapX:void 0===t.wrapX||t.wrapX}),this.C=void 0!==t.gutter?t.gutter:0,this.f=e,this.l=!0,this.B=t.serverType,this.T=void 0===t.hidpi||t.hidpi,this.R="",nx(this),this.fa=V(),ax(this),yw(this,sx(this))}function rx(t,e,o,i,r,n,s){var a=t.urls;if(a){if(s.WIDTH=o[0],s.HEIGHT=o[1],s[t.l?"CRS":"SRS"]=n.mb,"STYLES"in t.f||(s.STYLES=""),1!=r)switch(t.B){case"geoserver":o=90*r+.5|0,s.FORMAT_OPTIONS="FORMAT_OPTIONS"in s?s.FORMAT_OPTIONS+";dpi:"+o:"dpi:"+o;break;case"mapserver":s.MAP_RESOLUTION=90*r;break;case"carmentaserver":case"qgis":s.DPI=90*r;break;default:O(!1,52)}return n=n.b,t.l&&"ne"==n.substr(0,2)&&(t=i[0],i[0]=i[1],i[1]=t,t=i[2],i[2]=i[3],i[3]=t),s.BBOX=i.join(","),Lw(1==a.length?a[0]:a[L((e[1]<>=1,i>>=1;break;default:O(!1,53)}n.push([1,1]),n.reverse();for(var r=[1],s=[0],i=1,o=n.length;i=e+this.b&&a.height>=o+this.b)return s={offsetX:a.x+this.b,offsetY:a.y+this.b,image:this.f},this.c[t]=s,i.call(r,this.i,a.x+this.b,a.y+this.b),t=n,e+=this.b,i=o+this.b,e=a.width-e>a.height-i?(o={x:a.x+e,y:a.y,width:a.width-e,height:a.height},{x:a.x,y:a.y+i,width:e,height:a.height-i}):(o={x:a.x+e,y:a.y,width:a.width-e,height:i},{x:a.x,y:a.y+i,width:a.width,height:a.height-i}),xx(this,t,o,e),s}return null},Sx.prototype.add=function(t,e,o,i,r,n){return!(e+this.b>this.i||o+this.b>this.i)&&(i=Mx(this,!1,t,e,o,i,n))?(t=Mx(this,!0,t,e,o,r||w,n),{offsetX:i.offsetX,offsetY:i.offsetY,image:i.image,Zl:t.image}):null},t("ol.Attribution",he),he.prototype.getHTML=he.prototype.i,t("ol.Collection",Ne),Ne.prototype.extend=Ne.prototype.fg,Ne.prototype.getArray=Ne.prototype.tm,Ne.prototype.getLength=Ne.prototype.dc,Ne.prototype.insertAt=Ne.prototype.He,Ne.prototype.removeAt=Ne.prototype.Hg,Ne.prototype.setAt=Ne.prototype.Wp,t("ol.color.asArray",Be),t("ol.color.asString",Xe),t("ol.colorlike.asColorLike",ze),t("ol.control.defaults",ao),t("ol.coordinate.add",Ti),t("ol.coordinate.createStringXY",function(e){return function(t){return Oi(t,e)}}),t("ol.coordinate.format",Li),t("ol.coordinate.rotate",Ii),t("ol.coordinate.toStringHDMS",function(t,e){return t?Ci("NS",t[1],e)+" "+Ci("EW",t[0],e):""}),t("ol.coordinate.toStringXY",Oi),t("ol.DeviceOrientation",gh),gh.prototype.getAlpha=gh.prototype.Fk,gh.prototype.getBeta=gh.prototype.Ik,gh.prototype.getGamma=gh.prototype.Ok,gh.prototype.getHeading=gh.prototype.um,gh.prototype.getTracking=gh.prototype.Th,gh.prototype.setTracking=gh.prototype.gg,t("ol.easing.easeIn",to),t("ol.easing.easeOut",eo),t("ol.easing.inAndOut",oo),t("ol.easing.linear",io),t("ol.easing.upAndDown",function(t){return t<.5?oo(2*t):1-oo(2*(t-.5))}),t("ol.extent.boundingExtent",P),t("ol.extent.buffer",A),t("ol.extent.containsCoordinate",T),t("ol.extent.containsExtent",N),t("ol.extent.containsXY",j),t("ol.extent.createEmpty",V),t("ol.extent.equals",Z),t("ol.extent.extend",K),t("ol.extent.getArea",q),t("ol.extent.getBottomLeft",J),t("ol.extent.getBottomRight",_),t("ol.extent.getCenter",$),t("ol.extent.getHeight",tt),t("ol.extent.getIntersection",et),t("ol.extent.getSize",function(t){return[t[2]-t[0],t[3]-t[1]]}),t("ol.extent.getTopLeft",ot),t("ol.extent.getTopRight",it),t("ol.extent.getWidth",rt),t("ol.extent.intersects",nt),t("ol.extent.isEmpty",st),t("ol.extent.applyTransform",pt),t("ol.Feature",Ih),Ih.prototype.getGeometry=Ih.prototype.V,Ih.prototype.getId=Ih.prototype.wm,Ih.prototype.getGeometryName=Ih.prototype.Qk,Ih.prototype.getStyle=Ih.prototype.xm,Ih.prototype.getStyleFunction=Ih.prototype.Lc,Ih.prototype.setGeometry=Ih.prototype.Ra,Ih.prototype.setStyle=Ih.prototype.hg,Ih.prototype.setId=Ih.prototype.jc,Ih.prototype.setGeometryName=Ih.prototype.Tc,t("ol.featureloader.xhr",el),t("ol.Geolocation",Xd),Xd.prototype.getAccuracy=Xd.prototype.Dk,Xd.prototype.getAccuracyGeometry=Xd.prototype.Ek,Xd.prototype.getAltitude=Xd.prototype.Gk,Xd.prototype.getAltitudeAccuracy=Xd.prototype.Hk,Xd.prototype.getHeading=Xd.prototype.ym,Xd.prototype.getPosition=Xd.prototype.zm,Xd.prototype.getProjection=Xd.prototype.Uh,Xd.prototype.getSpeed=Xd.prototype.ll,Xd.prototype.getTracking=Xd.prototype.Vh,Xd.prototype.getTrackingOptions=Xd.prototype.Gh,Xd.prototype.setProjection=Xd.prototype.Wh,Xd.prototype.setTracking=Xd.prototype.Ke,Xd.prototype.setTrackingOptions=Xd.prototype.wj,t("ol.Graticule",Kd),Kd.prototype.getMap=Kd.prototype.Cm,Kd.prototype.getMeridians=Kd.prototype.al,Kd.prototype.getParallels=Kd.prototype.hl,t("ol.has.DEVICE_PIXEL_RATIO",Lo),t("ol.has.CANVAS",Io),t("ol.has.DEVICE_ORIENTATION",No),t("ol.has.GEOLOCATION",Fo),t("ol.has.TOUCH",ko),t("ol.has.WEBGL",Xo),_d.prototype.getImage=_d.prototype.Y,ov.prototype.getImage=ov.prototype.Y,t("ol.inherits",e),t("ol.interaction.defaults",Gn),t("ol.Kinetic",kr),t("ol.loadingstrategy.all",hb),t("ol.loadingstrategy.bbox",function(t){return[t]}),t("ol.loadingstrategy.tile",function(i){return function(t,e){e=i.tc(e),t=ee(i,t,e);var o=[];for((e=[e,0,0])[1]=t.ca;e[1]<=t.$;++e[1])for(e[2]=t.da;e[2]<=t.ia;++e[2])o.push(i.Aa(e));return o}}),t("ol.Map",Wp),Wp.prototype.addControl=Wp.prototype.kk,Wp.prototype.addInteraction=Wp.prototype.lk,Wp.prototype.addLayer=Wp.prototype.ih,Wp.prototype.addOverlay=Wp.prototype.jh,Wp.prototype.forEachFeatureAtPixel=Wp.prototype.we,Wp.prototype.forEachLayerAtPixel=Wp.prototype.Im,Wp.prototype.hasFeatureAtPixel=Wp.prototype.Yl,Wp.prototype.getEventCoordinate=Wp.prototype.Tf,Wp.prototype.getEventPixel=Wp.prototype.xe,Wp.prototype.getTarget=Wp.prototype.ag,Wp.prototype.getTargetElement=Wp.prototype.jd,Wp.prototype.getCoordinateFromPixel=Wp.prototype.Wa,Wp.prototype.getControls=Wp.prototype.Lk,Wp.prototype.getOverlays=Wp.prototype.fl,Wp.prototype.getOverlayById=Wp.prototype.el,Wp.prototype.getInteractions=Wp.prototype.Sk,Wp.prototype.getLayerGroup=Wp.prototype.Kc,Wp.prototype.getLayers=Wp.prototype.Xh,Wp.prototype.getPixelFromCoordinate=Wp.prototype.Ja,Wp.prototype.getSize=Wp.prototype.Ob,Wp.prototype.getView=Wp.prototype.Z,Wp.prototype.getViewport=Wp.prototype.sl,Wp.prototype.renderSync=Wp.prototype.Tp,Wp.prototype.removeControl=Wp.prototype.Mp,Wp.prototype.removeInteraction=Wp.prototype.Np,Wp.prototype.removeLayer=Wp.prototype.Pp,Wp.prototype.removeOverlay=Wp.prototype.Qp,Wp.prototype.setLayerGroup=Wp.prototype.qj,Wp.prototype.setSize=Wp.prototype.Qg,Wp.prototype.setTarget=Wp.prototype.Le,Wp.prototype.setView=Wp.prototype.iq,Wp.prototype.updateSize=Wp.prototype.Ad,t("ol.Object",je),je.prototype.getKeys=je.prototype.O,je.prototype.getProperties=je.prototype.N,je.prototype.setProperties=je.prototype.H,je.prototype.unset=je.prototype.P,t("ol.Observable",Te),t("ol.Observable.unByKey",function(t){if(Array.isArray(t))for(var e=0,o=t.length;e>>0,r=0;r=e.ca&&t.da<=e.ia&&t.ia>=e.da}function x(t,e,o){return Math.min(Math.max(t,e),o)}e(a,Error);var i="cosh"in Math?Math.cosh:function(t){return((t=Math.exp(t))+1/t)/2};function S(t,e,o,i,r,n){var s,a=r-o,p=n-i;return(a||p)&&(1<(s=((t-o)*a+(e-i)*p)/(a*a+p*p))?(o=r,i=n):0t[2]&&(t[2]=e[2]),e[1]t[3]&&(t[3]=e[3]),t}function z(t,e){e[0]t[2]&&(t[2]=e[0]),e[1]t[3]&&(t[3]=e[1])}function Y(t,e,o,i,r){for(;oe[0]?t:e)[0],o[1]=(t[1]>e[1]?t:e)[1],o[2]=(t[2]=e[0]&&t[1]<=e[3]&&t[3]>=e[1]}function st(t){return t[2]=t.minZoom;){if(o.call(null,e,ee(t,r,e,i)))return!0;--e}return!1}function Qt(t,e,o,i){return e[0]T.$)&&(C(E,new B(L(M.ca,j),L(M.$,j),M.da,M.ia))||M.$-M.ca+1>j&&C(E,T))){m=!0;break t}}m=!1}else m=!0}else m=!1;m?(b in l&&delete l[b],(m=v.b)in u||(u[m]=!0,h[b]=v)):l[b]=v}}}for(r in f=(a=[h,l])[0],a=a[1],this.l)r in f?(this.j[r]||(this.l[r].style.display="",this.j[r]=!0),delete f[r]):r in a?(this.j[r]&&(this.l[r].style.display="none",delete this.j[r]),delete a[r]):(qe(this.l[r]),delete this.l[r],delete this.j[r]);for(r in f)g=document.createElement("LI"),g.innerHTML=f[r].b,this.I.appendChild(g),this.l[r]=g,this.j[r]=!0;for(r in a)g=document.createElement("LI"),g.innerHTML=a[r].b,g.style.display="none",this.I.appendChild(g),this.l[r]=g;for(s in r=!ct(this.j)||!ct(t.logos),this.B!=r&&(this.element.style.display=r?"":"none",this.B=r),r&&ct(this.j)?this.element.classList.add("ol-logo-only"):this.element.classList.remove("ol-logo-only"),t=t.logos,r=this.T)s in t||(qe(r[s]),delete r[s]);for(n in t)(a=t[n])instanceof HTMLElement&&(this.u.appendChild(a),r[n]=a),n in r||((s=new Image).src=n,""===a?f=s:((f=document.createElement("a")).href=a,f.appendChild(s)),this.u.appendChild(f),r[n]=f);this.u.style.display=ct(t)?"none":""}else this.B&&(this.element.style.display="none",this.B=!1)}function Qe(t){t.element.classList.toggle("ol-collapsed"),t.c?He(t.D,t.C):He(t.C,t.D),t.c=!t.c}function to(t){return Math.pow(t,3)}function eo(t){return 1-to(1-t)}function oo(t){return 3*t*t-2*t*t*t}function io(t){return t}function ro(t){var e=void 0!==(t=t||{}).className?t.className:"ol-rotate",o=void 0!==t.label?t.label:"⇧";this.c=null,"string"==typeof o?(this.c=document.createElement("span"),this.c.className="ol-compass",this.c.textContent=o):(this.c=o,this.c.classList.add("ol-compass"));var i=t.tipLabel||"Reset rotation";(o=document.createElement("button")).className=e+"-reset",o.setAttribute("type","button"),o.title=i,o.appendChild(this.c),de(o,"click",ro.prototype.D,this),(i=document.createElement("div")).className=e+" ol-unselectable ol-control",i.appendChild(o),e=t.render||no,this.o=t.resetNorth||void 0,Je.call(this,{element:i,render:e,target:t.target}),this.l=void 0!==t.duration?t.duration:250,this.j=void 0===t.autoHide||t.autoHide,this.u=void 0,this.j&&this.element.classList.add("ol-hidden")}function no(t){var e,o;(t=t.frameState)&&((t=t.viewState.rotation)!=this.u&&(e="rotate("+t+"rad)",this.j&&((o=this.element.classList.contains("ol-hidden"))||t?o&&t&&this.element.classList.remove("ol-hidden"):this.element.classList.add("ol-hidden")),this.c.style.msTransform=e,this.c.style.webkitTransform=e,this.c.style.transform=e),this.u=t)}function so(t){var e=void 0!==(t=t||{}).className?t.className:"ol-zoom",o=void 0!==t.delta?t.delta:1,i=void 0!==t.zoomInLabel?t.zoomInLabel:"+",r=void 0!==t.zoomOutLabel?t.zoomOutLabel:"−",n=void 0!==t.zoomInTipLabel?t.zoomInTipLabel:"Zoom in",s=void 0!==t.zoomOutTipLabel?t.zoomOutTipLabel:"Zoom out",a=document.createElement("button");a.className=e+"-in",a.setAttribute("type","button"),a.title=n,a.appendChild("string"==typeof i?document.createTextNode(i):i),de(a,"click",so.prototype.j.bind(this,o)),(i=document.createElement("button")).className=e+"-out",i.setAttribute("type","button"),i.title=s,i.appendChild("string"==typeof r?document.createTextNode(r):r),de(i,"click",so.prototype.j.bind(this,-o)),(o=document.createElement("div")).className=e+" ol-unselectable ol-control",o.appendChild(a),o.appendChild(i),Je.call(this,{element:o,target:t.target}),this.c=void 0!==t.duration?t.duration:250}function ao(t){t=t||{};var e=new Ne;return void 0!==t.zoom&&!t.zoom||e.push(new so(t.zoomOptions)),void 0!==t.rotate&&!t.rotate||e.push(new ro(t.rotateOptions)),void 0!==t.attribution&&!t.attribution||e.push(new _e(t.attributionOptions)),e}function po(t){this.c=void 0!==(t=t||{}).className?t.className:"ol-full-screen";var e=void 0!==t.label?t.label:"⤢";this.o="string"==typeof e?document.createTextNode(e):e,e=void 0!==t.labelActive?t.labelActive:"×",this.l="string"==typeof e?document.createTextNode(e):e;var o=t.tipLabel||"Toggle full-screen";(e=document.createElement("button")).className=this.c+"-"+lo(),e.setAttribute("type","button"),e.title=o,e.appendChild(this.o),de(e,"click",this.C,this),(o=document.createElement("div")).className=this.c+" ol-unselectable ol-control "+(ho()?"":"ol-unsupported"),o.appendChild(e),Je.call(this,{element:o,target:t.target}),this.D=void 0!==t.keys&&t.keys,this.j=t.source}function ho(){var t=document.body;return t.webkitRequestFullscreen||t.mozRequestFullScreen&&document.mozFullScreenEnabled||t.msRequestFullscreen&&document.msFullscreenEnabled||t.requestFullscreen&&document.fullscreenEnabled}function lo(){return!!(document.webkitIsFullScreen||document.mozFullScreen||document.msFullscreenElement||document.fullscreenElement)}function uo(t){t.requestFullscreen?t.requestFullscreen():t.msRequestFullscreen?t.msRequestFullscreen():t.mozRequestFullScreen?t.mozRequestFullScreen():t.webkitRequestFullscreen&&t.webkitRequestFullscreen()}e(Je,je),Je.prototype.ka=function(){qe(this.element),je.prototype.ka.call(this)},Je.prototype.g=function(){return this.a},Je.prototype.setMap=function(t){this.a&&qe(this.element);for(var e=0,o=this.v.length;e=e.length){for(var r=[],n=0;nt.D||Math.abs(e.clientY-t.c.clientY)>t.D}function yi(t,e){this.l=t,this.c=e,this.b=[],this.i=[],this.a={}}function gi(t){var e=t.b,o=t.i,i=e[0];return 1==e.length?(e.length=0,o.length=0):(e[0]=e.pop(),o[0]=o.pop(),di(t,0)),e=t.c(i),delete t.a[e],i}function di(t,e){for(var o=t.b,i=t.i,r=o.length,n=o[e],s=i[e],a=e;e>1;){var p=2*e+1,h=2*e+2,p=h>1;if(!(t[s]>n))break;i[o]=i[s],t[o]=t[s],o=s}i[o]=r,t[o]=n}function bi(t){for(var e=t.l,o=t.b,i=t.i,r=0,n=o.length,s=0;s>1)-1;0<=e;e--)di(t,e)}function mi(e,t){yi.call(this,function(t){return e.apply(null,t)},function(t){return t[0].bb()}),this.v=t,this.j=0,this.g={}}function wi(t,e,o){for(var i,r,n=0;t.j=l[0]&&r[2]<=l[2]||r[1]>=l[1]&&r[3]<=l[3])||ur(t,e,o,i,function(t,e){var o,i,r,n,s,a=!1,p=R(l,t),h=R(l,e);return 1===p||1===h?a=!0:(o=l[0],i=l[1],r=l[2],n=l[3],s=e[0],t=((e=e[1])-t[1])/(s-t[0]),(a=!(a=!(a=2&h&&!(2&p)?o<=(a=s-(e-n)/t)&&a<=r:a)&&4&h&&!(4&p)?i<=(a=e-(s-r)*t)&&a<=n:a)&&8&h&&!(8&p)?o<=(a=s-(e-i)/t)&&a<=r:a)||!(16&h)||16&p||(a=i<=(a=e-(s-o)*t)&&a<=n)),a}))}function fr(t,e,o,i,r){var n=o[0];if(!(cr(t,e,n,i,r)||pr(t,e,n,i,r[0],r[1])||pr(t,e,n,i,r[0],r[3])||pr(t,e,n,i,r[2],r[1])||pr(t,e,n,i,r[2],r[3])))return!1;if(1===o.length)return!0;for(e=1,n=o.length;ee;)i-=3;if(!((e=t.b[2+o]-t.b[i+2])<1e3/60)){var r=t.b[o]-t.b[i],o=t.b[1+o]-t.b[i+1];return t.i=Math.atan2(o,r),t.a=Math.sqrt(r*r+o*o)/e,t.a>t.c}}}}(this.a)&&(e=((e=this.a).c-e.a)/e.f,o=this.a.i,i=t.wa(),i=r.Ja(i),r=r.Wa([i[0]-e*Math.cos(o),i[1]-e*Math.sin(o)]),t.animate({center:t.Ec(r),duration:500,easing:eo})),Ir(t,1,-1),!1)}function on(t){if(0=this.u}function fn(t){var e,o;Hr(t)&&(e=this.a,o=t.pixel,e.c=this.g,e.i=o,ln(e),hn(e),this.b(new mn(vn,t.coordinate,t)))}function yn(t){return!Hr(t)||(this.a.setMap(null),this.l(t,this.g,t.pixel)&&(this.j(t),this.b(new mn(bn,t.coordinate,t))),!1)}function gn(t){if(Hr(t)&&Vr(t)&&this.C(t)){this.g=t.pixel,this.a.setMap(t.map);var e=this.a,o=this.g;return e.c=this.g,e.i=o,ln(e),hn(e),this.b(new mn(dn,t.coordinate,t)),!0}return!1}e(ui,Ae),(Mu=ui.prototype).Jh=function(t){ci(this,t);var e,o=new Wo("pointerup",this.i,t);this.b(o),this.o||t.button||(e=(o=this).c,t=new Wo("click",o.i,e),o.b(t),o.j?(clearTimeout(o.j),o.j=0,t=new Wo("dblclick",o.i,e),o.b(t)):o.j=setTimeout(function(){this.j=0;var t=new Wo("singleclick",this.i,e);this.b(t)}.bind(o),250)),this.S||(this.f.forEach(me),this.f.length=0,this.o=!1,this.c=null,Se(this.a),this.a=null)},Mu.Ol=function(t){ci(this,t);var e=new Wo("pointerdown",this.i,t);this.b(e),this.c=t,this.f.length||(this.a=new oi(document),this.f.push(de(this.a,"pointermove",this.Hm,this),de(this.a,"pointerup",this.Jh,this),de(this.g,"pointercancel",this.Jh,this)))},Mu.Hm=function(t){var e;fi(this,t)&&(this.o=!0,e=new Wo("pointerdrag",this.i,t,this.o),this.b(e)),t.preventDefault()},Mu.Lp=function(t){this.b(new Wo(t.type,this.i,t,!(!this.c||!fi(this,t))))},Mu.ka=function(){this.v&&(me(this.v),this.v=null),this.l&&(me(this.l),this.l=null),this.f.forEach(me),this.f.length=0,this.a&&(Se(this.a),this.a=null),this.g&&(Se(this.g),this.g=null),Ae.prototype.ka.call(this)},yi.prototype.clear=function(){this.b.length=0,this.i.length=0,lt(this.a)},yi.prototype.f=function(t){O(!(this.c(t)in this.a),31);var e=this.l(t);return 1/0!=e&&(this.b.push(t),this.i.push(e),this.a[this.c(t)]=!0,vi(this,0,this.b.length-1),!0)},e(mi,yi),mi.prototype.f=function(t){var e=yi.prototype.f.call(this,t);return e&&de(t[0],"change",this.o,this),e},mi.prototype.o=function(t){var e=(t=t.target).getState();2!==e&&3!==e&&4!==e&&5!==e||(be(t,"change",this.o,this),(t=t.bb())in this.g&&(delete this.g[t],--this.j),this.v())},e(Ui,je),(Mu=Ui.prototype).Ab=function(t,e){return this.Kb(t[0],t[1],e=e||[NaN,NaN],1/0),e},Mu.sb=function(t){return this.Mc(t[0],t[1])},Mu.Mc=Oi,Mu.G=function(t){this.v!=this.i&&(this.l=this.se(this.l),this.v=this.i);var e=this.l;return t?(t[0]=e[0],t[1]=e[1],t[2]=e[2],t[3]=e[3]):t=e,t},Mu.Rb=function(t){return this.Vd(t*t)},Mu.tb=function(t,e){return this.Dc(Vt(t,e)),this},e(Xi,Ui),(Mu=Xi.prototype).Mc=Oi,Mu.se=function(t){return W(this.A,0,this.A.length,this.a,t)},Mu.ac=function(){return this.A.slice(0,this.a)},Mu.ga=function(){return this.A},Mu.bc=function(){return this.A.slice(this.A.length-this.a)},Mu.cc=function(){return this.ja},Mu.Vd=function(t){if(this.o!=this.i&&(lt(this.f),this.g=0,this.o=this.i),t<0||this.g&&t<=this.g)return this;var e=t.toString();if(this.f.hasOwnProperty(e))return this.f[e];var o=this.hd(t);return o.ga().length=this.f&&t<=this.a){var e=this.l||0;if(this.j){if(e+=i=v(this.j,t,1),i==this.j.length-1)return e;var o=this.j[i],i=o/this.j[i+1]}else o=this.a,i=this.C;e+=Math.log(o/t)/Math.log(i)}return e},Mu.Qf=function(t,e){var o=(o=(e=e||{}).size)||Cr(this);t instanceof Xi?"Circle"===t.U()?(f=xr(t=t.G())).rotate(this.Qa(),$(t)):f=t:(O(Array.isArray(t),24),O(!st(t),25),f=xr(t));var i=e.padding||[0,0,0,0],r=void 0===e.constrainResolution||e.constrainResolution,n=void 0!==e.nearest&&e.nearest,s=void 0!==e.minResolution?e.minResolution:void 0!==e.maxZoom?this.constrainResolution(this.a,e.maxZoom-this.l,0):0,a=f.ga(),p=this.Qa();t=Math.cos(-p);for(var p=Math.sin(-p),h=1/0,l=1/0,u=-1/0,c=-1/0,f=f.qa(),y=0,g=a.length;ythis.C&&(this.a=!0)),this.j=i,(i=(t=t.map).Z()).g.rotation!==xi&&(r=t.a.getBoundingClientRect(),(e=_r(this.o))[0]-=r.left,e[1]-=r.top,this.g=t.Wa(e),this.a&&(r=i.Qa(),t.render(),Dr(i,r+o,this.g)))}function Rn(t){var e,o,i;return!(this.o.length<2)||(Ir(t=t.map.Z(),1,-1),this.a&&(i=t.Qa(),e=this.g,o=this.u,i=t.constrainRotation(i,0),Dr(t,i,e,o)),!1)}function In(t){return 2<=this.o.length&&(t=t.map,this.g=null,this.j=void 0,this.a=!1,this.l=0,this.D||Ir(t.Z(),1,1),!0)}function Nn(t){Jr.call(this,{handleDownEvent:Dn,handleDragEvent:Fn,handleUpEvent:kn}),this.l=(t=t||{}).constrainResolution||!1,this.g=null,this.u=void 0!==t.duration?t.duration:400,this.a=void 0,this.j=1}function Fn(t){var e=1,o=this.o[0],i=this.o[1],r=o.clientX-i.clientX,o=o.clientY-i.clientY,r=Math.sqrt(r*r+o*o);void 0!==this.a&&(e=this.a/r),this.a=r;var i=(r=(t=t.map).Z()).Pa(),n=r.a,s=r.f;n<(o=i*e)?(e=n/i,o=n):ot.a)&&(e=this.g,o=this.u,i=t.constrainResolution(i,0,this.j-1),Ur(t,i,e,o)),!1}return!0}function Dn(t){return 2<=this.o.length&&(t=t.map,this.g=null,this.a=void 0,this.j=1,this.D||Ir(t.Z(),1,1),!0)}function On(t){t=t||{};var e=new Ne,o=new Nr(-.005,.05,100);return void 0!==t.altShiftDragRotate&&!t.altShiftDragRotate||e.push(new rn),void 0!==t.doubleClickZoom&&!t.doubleClickZoom||e.push(new Gr({delta:t.zoomDelta,duration:t.zoomDuration})),void 0!==t.dragPan&&!t.dragPan||e.push(new Qr({kinetic:o})),void 0!==t.pinchRotate&&!t.pinchRotate||e.push(new Cn),void 0!==t.pinchZoom&&!t.pinchZoom||e.push(new Nn({constrainResolution:t.constrainResolution,duration:t.zoomDuration})),void 0!==t.keyboard&&!t.keyboard||(e.push(new xn),e.push(new Mn({delta:t.zoomDelta,duration:t.zoomDuration}))),void 0!==t.mouseWheelZoom&&!t.mouseWheelZoom||e.push(new An({constrainResolution:t.constrainResolution,duration:t.zoomDuration})),void 0!==t.shiftDragZoom&&!t.shiftDragZoom||e.push(new wn({duration:t.zoomDuration})),e}function Un(t){je.call(this);var e=ht({},t);e.opacity=void 0!==t.opacity?t.opacity:1,e.visible=void 0===t.visible||t.visible,e.zIndex=void 0!==t.zIndex?t.zIndex:0,e.maxResolution=void 0!==t.maxResolution?t.maxResolution:1/0,e.minResolution=void 0!==t.minResolution?t.minResolution:0,this.H(e),this.a={layer:this,Je:!0}}function Gn(t){return t.a.opacity=x(t.hc(),0,1),t.a.yj=t.$f(),t.a.visible=t.Mb(),t.a.extent=t.G(),t.a.zIndex=t.Ba(),t.a.maxResolution=t.fc(),t.a.minResolution=Math.max(t.gc(),0),t.a}function Bn(t){var e=t||{};delete(t=ht({},e)).layers,e=e.layers,Un.call(this,t),this.f=[],this.c={},de(this,Le(Xn),this.Hl,this),e?Array.isArray(e)?e=new Ne(e.slice(),{unique:!0}):O(e instanceof Ne,43):e=new Ne(void 0,{unique:!0}),this.xi(e)}e(Cn,Jr),Cn.prototype.Xc=Oi,e(Nn,Jr),Nn.prototype.Xc=Oi,e(Un,je),(Mu=Un.prototype).G=function(){return this.get("extent")},Mu.fc=function(){return this.get("maxResolution")},Mu.gc=function(){return this.get("minResolution")},Mu.hc=function(){return this.get("opacity")},Mu.Mb=function(){return this.get("visible")},Mu.Ba=function(){return this.get("zIndex")},Mu.vc=function(t){this.set("extent",t)},Mu.Ac=function(t){this.set("maxResolution",t)},Mu.Bc=function(t){this.set("minResolution",t)},Mu.wc=function(t){this.set("opacity",t)},Mu.xc=function(t){this.set("visible",t)},Mu.Vb=function(t){this.set("zIndex",t)},e(Bn,Un),(Mu=Bn.prototype).Fd=function(){},Mu.Fe=function(){this.Mb()&&this.s()},Mu.Hl=function(){this.f.forEach(me),this.f.length=0;var t=this.qd();for(e in this.f.push(de(t,"add",this.Gl,this),de(t,"remove",this.Il,this)),this.c)this.c[e].forEach(me);lt(this.c);for(var e=0,o=(t=t.a).length;e=t.minResolution&&eu[2])&&(c=[y+h*Math.ceil((u[0]-y)/h),t[1]])),h=(u=r.layerStatesArray).length-1;0<=h;--h){var f=u[h],y=f.layer;if(Wn(f,l)&&o.call(i,y)&&(f=as(this,y),p=y.ha()?f.Ea(y.ha().u?c:t,r,e,a,s):p))return p}},Mu.Ei=function(t,e,o,i,r){return void 0!==this.Ea(t,e,o,Di,this,i,r)},Mu.Fl=function(){this.o.render()},Mu.Jg=w,Mu.Rp=function(t,e){for(var o in this.c)e&&o in e.layerStates||(o=this.c[t=o],delete this.c[t],me(this.v[t]),delete this.v[t],Se(o))},e(ls,Me);var us=[0,0,0,1],cs=[],fs=[0,0,0,1];function ys(t,e,o,i){e&&(t.translate(o,i),t.rotate(e),t.translate(-o,-i))}function gs(){}function ds(t,e,o,i,r){this.i=t,this.u=e,this.c=o,this.S=i,this.Yb=r,this.M=this.b=this.a=this.Ua=this.R=this.I=null,this.na=this.T=this.l=this.B=this.C=this.D=0,this.fa=!1,this.f=this.fb=0,this.pa=!1,this.oa=0,this.Ia="",this.va=this.Jb=0,this.Sa=!1,this.j=this.$a=0,this.ra=this.o=this.g=null,this.v=[],this.xb=Yn()}function vs(t,e,o){if(t.M){e=Gi(e,0,o,2,t.S,t.v),o=t.i;var i=t.xb,r=o.globalAlpha;1!=t.l&&(o.globalAlpha=r*t.l);var n=t.fb;t.fa&&(n+=t.Yb);for(var s=0,a=e.length;s=a;){var p=this.i[s];o[G(this.f[s]).toString()]&&(i!==n&&Us(t,e,i,n),n=p),s--,i=p}i!==n&&Us(t,e,i,n),i=n=a}},Mu.ve=function(t,e,o,i,r){for(var n,s=this.i.length-2,a=this.i[s+1],p=this.u.length-1;0<=p;--p){var h=this.j[p];for(t.uniform4fv(this.v.B,h[0]),Ys(this,t,h[1],h[2]),n=this.u[p];0<=s&&this.i[s]>=n;){var h=this.i[s],l=this.f[s];if(void 0===o[G(l).toString()]&&l.V()&&(void 0===r||nt(r,l.V().G()))&&(t.clear(t.COLOR_BUFFER_BIT|t.DEPTH_BUFFER_BIT),Us(t,e,h,a),a=i(l)))return a;s--,a=h}}},Mu.Ma=function(t,e){var o;e=e?(o=e.i,this.c.lineDash=o||Bs,o=e.g,this.c.lineDashOffset=o||0,o=!((o=e.a)instanceof CanvasGradient||o instanceof CanvasPattern)&&Be(o).map(function(t,e){return 3!=e?t/255:t})||Xs,void 0!==(e=e.c)?e:1):(o=[0,0,0,0],0),t=!((t=t?t.b:[0,0,0,0])instanceof CanvasGradient||t instanceof CanvasPattern)&&Be(t).map(function(t,e){return 3!=e?t/255:t})||Gs,this.c.strokeColor&&U(this.c.strokeColor,o)&&this.c.fillColor&&U(this.c.fillColor,t)&&this.c.lineWidth===e||(this.c.s=!0,this.c.fillColor=t,this.c.strokeColor=o,this.c.lineWidth=e,this.j.push([t,o,e]))},e(Hs,js);var qs=new Hs;function Js(){this.b="varying vec2 a;varying float b;attribute vec2 c;attribute vec2 d;attribute vec2 e;attribute float f;attribute float g;uniform mat4 h;uniform mat4 i;uniform mat4 j;void main(void){mat4 offsetMatrix=i;if(g==1.0){offsetMatrix=i*j;}vec4 offsets=offsetMatrix*vec4(e,0.0,0.0);gl_Position=h*vec4(c,0.0,1.0)+offsets;a=d;b=f;}"}e(Js,Cs);var _s=new Js;function $s(t,e){this.c=t.getUniformLocation(e,"j"),this.f=t.getUniformLocation(e,"i"),this.a=t.getUniformLocation(e,"k"),this.i=t.getUniformLocation(e,"h"),this.v=t.getAttribLocation(e,"e"),this.u=t.getAttribLocation(e,"f"),this.b=t.getAttribLocation(e,"c"),this.D=t.getAttribLocation(e,"g"),this.C=t.getAttribLocation(e,"d")}function Qs(t,e){this.j=t,this.b=e,this.a={},this.c={},this.i={},this.l=this.v=this.f=this.o=null,(this.g=d(Bo,"OES_element_index_uint"))&&e.getExtension("OES_element_index_uint"),de(this.j,"webglcontextlost",this.Xo,this),de(this.j,"webglcontextrestored",this.Yo,this)}function ta(t,e,o){var i,r,n=t.b,s=o.b,a=String(G(o));a in t.a?n.bindBuffer(e,t.a[a].buffer):(i=n.createBuffer(),n.bindBuffer(e,i),34962==e?r=new Float32Array(s):34963==e&&(r=new(t.g?Uint32Array:Uint16Array)(s)),n.bufferData(e,r,o.a),t.a[a]={lc:o,buffer:i})}function ea(t,e){var o=t.b;e=String(G(e));var i=t.a[e];o.isContextLost()||o.deleteBuffer(i.buffer),delete t.a[e]}function oa(t){var e,o,i,r;return t.f||(o=(e=t.b).createFramebuffer(),e.bindFramebuffer(e.FRAMEBUFFER,o),i=sa(e,1,1),r=e.createRenderbuffer(),e.bindRenderbuffer(e.RENDERBUFFER,r),e.renderbufferStorage(e.RENDERBUFFER,e.DEPTH_COMPONENT16,1,1),e.framebufferTexture2D(e.FRAMEBUFFER,e.COLOR_ATTACHMENT0,e.TEXTURE_2D,i,0),e.framebufferRenderbuffer(e.FRAMEBUFFER,e.DEPTH_ATTACHMENT,e.RENDERBUFFER,r),e.bindTexture(e.TEXTURE_2D,null),e.bindRenderbuffer(e.RENDERBUFFER,null),e.bindFramebuffer(e.FRAMEBUFFER,null),t.f=o,t.v=i,t.l=r),t.f}function ia(t,e){var o=String(G(e));if(o in t.c)return t.c[o];var i=t.b,r=i.createShader(e.U());return i.shaderSource(r,e.b),i.compileShader(r),t.c[o]=r}function ra(t,e,o){var i=G(e)+"/"+G(o);if(i in t.i)return t.i[i];var r=t.b,n=r.createProgram();return r.attachShader(n,ia(t,e)),r.attachShader(n,ia(t,o)),r.linkProgram(n),t.i[i]=n}function na(t,e,o){var i=t.createTexture();return t.bindTexture(t.TEXTURE_2D,i),t.texParameteri(t.TEXTURE_2D,t.TEXTURE_MAG_FILTER,t.LINEAR),t.texParameteri(t.TEXTURE_2D,t.TEXTURE_MIN_FILTER,t.LINEAR),void 0!==e&&t.texParameteri(3553,10242,e),void 0!==o&&t.texParameteri(3553,10243,o),i}function sa(t,e,o){var i=na(t,void 0,void 0);return t.texImage2D(t.TEXTURE_2D,0,t.RGBA,e,o,0,t.RGBA,t.UNSIGNED_BYTE,null),i}function aa(t,e){var o=na(t,33071,33071);return t.texImage2D(t.TEXTURE_2D,0,t.RGBA,t.RGBA,t.UNSIGNED_BYTE,e),o}function pa(t,e){Os.call(this,0,e),this.C=this.D=void 0,this.S=[],this.v=[],this.oa=void 0,this.j=[],this.c=[],this.I=this.ra=void 0,this.B=null,this.fb=this.fa=this.na=this.T=this.Ua=this.R=void 0,this.va=[],this.u=[],this.pa=void 0}function ha(t,e,o,i){for(var r=t.D,n=t.C,s=t.oa,a=t.ra,p=t.I,h=t.R,l=t.Ua,u=t.T,c=t.na?1:0,f=-t.fa,y=t.fb,g=t.pa,d=Math.cos(f),f=Math.sin(f),v=t.b.length,b=t.a.length,m=0;m=a;){var h=this.i[n],l=this.f[n];if(void 0===o[G(l).toString()]&&l.V()&&(void 0===r||nt(r,l.V().G()))&&(t.clear(t.COLOR_BUFFER_BIT|t.DEPTH_BUFFER_BIT),Us(t,e,h,p),p=i(l)))return p;p=h,n--}}},Mu.Ub=function(t){var e=t.Hc(),o=t.Y(1),i=t.ye(),r=t.qg(1),n=t.f,s=t.Oc(),a=t.l,p=t.g,h=t.ic();t=t.a,this.j.length?G(this.j[this.j.length-1])!=G(o)&&(this.S.push(this.b.length),this.j.push(o)):this.j.push(o),this.c.length?G(this.c[this.c.length-1])!=G(r)&&(this.v.push(this.b.length),this.c.push(r)):this.c.push(r),this.D=e[0],this.C=e[1],this.oa=h[1],this.ra=i[1],this.I=i[0],this.R=n,this.Ua=s[0],this.T=s[1],this.fa=p,this.na=a,this.fb=t,this.pa=h[0]},e(ca,js);var fa=new ca;function ya(){this.b="varying float a;varying vec2 b;varying float c;attribute vec2 d;attribute vec2 e;attribute vec2 f;attribute float g;uniform mat4 h;uniform mat4 i;uniform mat4 j;uniform float k;uniform float l;bool nearlyEquals(in float value,in float ref){float epsilon=0.000000000001;return value>=ref-epsilon&&value<=ref+epsilon;}void alongNormal(out vec2 offset,in vec2 nextP,in float turnDir,in float direction){vec2 dirVect=nextP-e;vec2 normal=normalize(vec2(-turnDir*dirVect.y,turnDir*dirVect.x));offset=k/2.0*normal*direction;}void miterUp(out vec2 offset,out float round,in bool isRound,in float direction){float halfWidth=k/2.0;vec2 tangent=normalize(normalize(f-e)+normalize(e-d));vec2 normal=vec2(-tangent.y,tangent.x);vec2 dirVect=f-e;vec2 tmpNormal=normalize(vec2(-dirVect.y,dirVect.x));float miterLength=abs(halfWidth/dot(normal,tmpNormal));offset=normal*direction*miterLength;round=0.0;if(isRound){round=1.0;}else if(miterLength>l+k){offset=halfWidth*tmpNormal*direction;}} bool miterDown(out vec2 offset,in vec4 projPos,in mat4 offsetMatrix,in float direction){bool degenerate=false;vec2 tangent=normalize(normalize(f-e)+normalize(e-d));vec2 normal=vec2(-tangent.y,tangent.x);vec2 dirVect=d-e;vec2 tmpNormal=normalize(vec2(-dirVect.y,dirVect.x));vec2 longOffset,shortOffset,longVertex;vec4 shortProjVertex;float halfWidth=k/2.0;if(length(f-e)>length(d-e)){longOffset=tmpNormal*direction*halfWidth;shortOffset=normalize(vec2(dirVect.y,-dirVect.x))*direction*halfWidth;longVertex=f;shortProjVertex=h*vec4(d,0.0,1.0);}else{shortOffset=tmpNormal*direction*halfWidth;longOffset=normalize(vec2(dirVect.y,-dirVect.x))*direction*halfWidth;longVertex=d;shortProjVertex=h*vec4(f,0.0,1.0);}vec4 p1=h*vec4(longVertex,0.0,1.0)+offsetMatrix*vec4(longOffset,0.0,0.0);vec4 p2=projPos+offsetMatrix*vec4(longOffset,0.0,0.0);vec4 p3=shortProjVertex+offsetMatrix*vec4(-shortOffset,0.0,0.0);vec4 p4=shortProjVertex+offsetMatrix*vec4(shortOffset,0.0,0.0);float denom=(p4.y-p3.y)*(p2.x-p1.x)-(p4.x-p3.x)*(p2.y-p1.y);float firstU=((p4.x-p3.x)*(p1.y-p3.y)-(p4.y-p3.y)*(p1.x-p3.x))/denom;float secondU=((p2.x-p1.x)*(p1.y-p3.y)-(p2.y-p1.y)*(p1.x-p3.x))/denom;float epsilon=0.000000000001;if(firstU>epsilon&&firstU<1.0-epsilon&&secondU>epsilon&&secondU<1.0-epsilon){shortProjVertex.x=p1.x+firstU*(p2.x-p1.x);shortProjVertex.y=p1.y+firstU*(p2.y-p1.y);offset=shortProjVertex.xy;degenerate=true;}else{float miterLength=abs(halfWidth/dot(normal,tmpNormal));offset=normal*direction*miterLength;}return degenerate;}void squareCap(out vec2 offset,out float round,in bool isRound,in vec2 nextP,in float turnDir,in float direction){round=0.0;vec2 dirVect=e-nextP;vec2 firstNormal=normalize(dirVect);vec2 secondNormal=vec2(turnDir*firstNormal.y*direction,-turnDir*firstNormal.x*direction);vec2 hypotenuse=normalize(firstNormal-secondNormal);vec2 normal=vec2(turnDir*hypotenuse.y*direction,-turnDir*hypotenuse.x*direction);float length=sqrt(c*c*2.0);offset=normal*length;if(isRound){round=1.0;}} void main(void){bool degenerate=false;float direction=float(sign(g));mat4 offsetMatrix=i*j;vec2 offset;vec4 projPos=h*vec4(e,0.0,1.0);bool round=nearlyEquals(mod(g,2.0),0.0);a=0.0;c=k/2.0;b=projPos.xy;if(nearlyEquals(mod(g,3.0),0.0)||nearlyEquals(mod(g,17.0),0.0)){alongNormal(offset,f,1.0,direction);}else if(nearlyEquals(mod(g,5.0),0.0)||nearlyEquals(mod(g,13.0),0.0)){alongNormal(offset,d,-1.0,direction);}else if(nearlyEquals(mod(g,23.0),0.0)){miterUp(offset,a,round,direction);}else if(nearlyEquals(mod(g,19.0),0.0)){degenerate=miterDown(offset,projPos,offsetMatrix,direction);}else if(nearlyEquals(mod(g,7.0),0.0)){squareCap(offset,a,round,f,1.0,direction);}else if(nearlyEquals(mod(g,11.0),0.0)){squareCap(offset,a,round,d,-1.0,direction);}if(!degenerate){vec4 offsets=offsetMatrix*vec4(offset,0.0,0.0);gl_Position=projPos+offsets;}else{gl_Position=vec4(offset,0.0,1.0);}}"}e(ya,Cs);var ga=new ya;function da(t,e){this.B=t.getUniformLocation(e,"n"),this.oa=t.getUniformLocation(e,"k"),this.R=t.getUniformLocation(e,"l"),this.c=t.getUniformLocation(e,"j"),this.f=t.getUniformLocation(e,"i"),this.a=t.getUniformLocation(e,"m"),this.ra=t.getUniformLocation(e,"p"),this.i=t.getUniformLocation(e,"h"),this.I=t.getUniformLocation(e,"o"),this.g=t.getAttribLocation(e,"g"),this.o=t.getAttribLocation(e,"d"),this.l=t.getAttribLocation(e,"f"),this.b=t.getAttribLocation(e,"e")}function va(t,e){Os.call(this,0,e),this.v=null,this.u=[],this.j=[],this.c={strokeColor:null,lineCap:void 0,lineDash:null,lineDashOffset:void 0,lineJoin:void 0,lineWidth:void 0,miterLimit:void 0,s:!1}}function ba(t,e,o,i){for(var r=t.a.length,n=t.b.length,s="bevel"===t.c.lineJoin?0:"miter"===t.c.lineJoin?1:2,a="butt"===t.c.lineCap?0:"square"===t.c.lineCap?1:2,p=ua(e,o,i),h=n,l=1,u=0;uo&&(this.i.push(o),this.f.push(e),this.c.s&&(this.j.push(o),this.c.s=!1))},Mu.Db=function(){this.l=new Zs(this.a),this.o=new Zs(this.b),this.i.push(this.b.length),!this.j.length&&0=l;){var u=this.i[h];o[G(this.f[h]).toString()]&&(s!==p&&(Us(t,e,s,p),t.clear(t.DEPTH_BUFFER_BIT)),p=u),h--,s=u}s!==p&&(Us(t,e,s,p),t.clear(t.DEPTH_BUFFER_BIT)),s=p=l}i||(t.disable(t.DEPTH_TEST),t.clear(t.DEPTH_BUFFER_BIT),t.depthMask(n),t.depthFunc(r))},Mu.ve=function(t,e,o,i,r){for(var n,s=this.i.length-2,a=this.i[s+1],p=this.j.length-1;0<=p;--p)for(Ma(this,t,(h=this.u[p])[0],h[1],h[2]),n=this.j[p];0<=s&&this.i[s]>=n;){var h=this.i[s],l=this.f[s];if(void 0===o[G(l).toString()]&&l.V()&&(void 0===r||nt(r,l.V().G()))&&(t.clear(t.COLOR_BUFFER_BIT|t.DEPTH_BUFFER_BIT),Us(t,e,h,a),a=i(l)))return a;s--,a=h}},Mu.Ma=function(t,e){t=e.f,this.c.lineCap=void 0!==t?t:"round",t=e.i,this.c.lineDash=t||Bs,t=e.g,this.c.lineDashOffset=t||0,t=e.j,this.c.lineJoin=void 0!==t?t:"round",t=!((t=e.a)instanceof CanvasGradient||t instanceof CanvasPattern)&&Be(t).map(function(t,e){return 3!=e?t/255:t})||Xs;var o=void 0!==(o=e.c)?o:1;e=void 0!==(e=e.o)?e:10,this.c.strokeColor&&U(this.c.strokeColor,t)&&this.c.lineWidth===o&&this.c.miterLimit===e||(this.c.s=!0,this.c.strokeColor=t,this.c.lineWidth=o,this.c.miterLimit=e,this.u.push([t,o,e]))};var Pa=3,Aa=5,Ea=7,Ta=11,ja=13,Ca=17,La=19,Ra=23;function Ia(){this.b="precision mediump float;uniform vec4 e;uniform float f;void main(void){gl_FragColor=e;float alpha=e.a*f;if(alpha==0.0){discard;}gl_FragColor.a=alpha;}"}e(Ia,js);var Na=new Ia;function Fa(){this.b="attribute vec2 a;uniform mat4 b;uniform mat4 c;uniform mat4 d;void main(void){gl_Position=b*vec4(a,0.0,1.0);}"}e(Fa,Cs);var ka=new Fa;function Da(t,e){this.B=t.getUniformLocation(e,"e"),this.c=t.getUniformLocation(e,"d"),this.f=t.getUniformLocation(e,"c"),this.a=t.getUniformLocation(e,"f"),this.i=t.getUniformLocation(e,"b"),this.b=t.getAttribLocation(e,"a")}function Oa(t){this.a=void 0!==(t=t||{}).color?t.color:null,this.f=t.lineCap,this.i=void 0!==t.lineDash?t.lineDash:null,this.g=t.lineDashOffset,this.j=t.lineJoin,this.o=t.miterLimit,this.c=t.width,this.b=void 0}function Ua(t){this.b=this.a=this.i=void 0,this.f=void 0===t||t,this.c=0}function Ga(t){var e,o,i=t.b;i&&(e=i.next,o=i.ub,e&&(e.ub=o),o&&(o.next=e),t.b=e||o,t.i===t.a?(t.b=void 0,t.i=void 0,t.a=void 0):t.i===i?t.i=t.b:t.a===i&&(t.a=o?t.b.ub:t.b),t.c--)}function Ba(t){if(t.b=t.i,t.b)return t.b.data}function Xa(t){if(t.b&&t.b.next)return t.b=t.b.next,t.b.data}function Va(t){if(t.b&&t.b.next)return t.b.next.data}function Wa(t){if(t.b&&t.b.ub)return t.b=t.b.ub,t.b.data}function Za(t){if(t.b&&t.b.ub)return t.b.ub.data}function Ka(t){if(t.b)return t.b.data}(Mu=Oa.prototype).clone=function(){var t=this.a;return new Oa({color:t&&t.slice?t.slice():t||void 0,lineCap:this.f,lineDash:this.i?this.i.slice():void 0,lineDashOffset:this.g,lineJoin:this.j,miterLimit:this.o,width:this.c})},Mu.No=function(){return this.a},Mu.Vk=function(){return this.f},Mu.Oo=function(){return this.i},Mu.Wk=function(){return this.g},Mu.Xk=function(){return this.j},Mu.bl=function(){return this.o},Mu.Po=function(){return this.c},Mu.Qo=function(t){this.a=t,this.b=void 0},Mu.aq=function(t){this.f=t,this.b=void 0},Mu.setLineDash=function(t){this.i=t,this.b=void 0},Mu.bq=function(t){this.g=t,this.b=void 0},Mu.cq=function(t){this.j=t,this.b=void 0},Mu.gq=function(t){this.o=t,this.b=void 0},Mu.jq=function(t){this.c=t,this.b=void 0},Ua.prototype.concat=function(t){var e;t.b&&(this.b?(e=this.b.next,this.b.next=t.i,t.i.ub=this.b,e.ub=t.a,t.a.next=e,this.c+=t.c):(this.b=t.b,this.i=t.i,this.a=t.a,this.c=t.c),t.b=void 0,t.i=void 0,t.a=void 0,t.c=0)};var za,Ya={$d:function(){}};function Ha(t,e,o){var i=t[e];t[e]=t[o],t[o]=i}function qa(t,e){return t=t.ca&&e.ia>=t.da}function sp(t){return{children:t,height:1,ib:!0,ca:1/0,da:1/0,$:-1/0,ia:-1/0}}function ap(t,e,o,i,r){for(var n,s=[e,o];s.length;)(o=s.pop())-(e=s.pop())<=i||(n=e+Math.ceil((o-e)/i/2)*i,za(t,n,e,o,r),s.push(e,n,n,o))}function pp(t){this.a=Ya.$d(t),this.b={}}function hp(t,e,o){var i=t.b[G(o)];Z([i.ca,i.da,i.$,i.ia],e)||(t.remove(o),t.Ca(e,o))}function lp(t){return t.a.all().map(function(t){return t.value})}function up(t,e){return t.a.search({ca:e[0],da:e[1],$:e[2],ia:e[3]}).map(function(t){return t.value})}function cp(t,e,o,i){return fp(up(t,e),o,i)}function fp(t,e,o){for(var i,r=0,n=t.length;rn&&(n=e[c],u=e[c+1]),l=y}}else for(l=s=xp(t,e[c=e.length-o],e[c+1],a++),n=e[c],u=e[c+1],c-=o,f=0;f<=c;c-=o)y=xp(t,e[c],e[c+1],a++),h.push(Sp(l,y,i)),p.push([Math.min(l.x,y.x),Math.min(l.y,y.y),Math.max(l.x,y.x),Math.max(l.y,y.y)]),e[c]>n&&(n=e[c],u=e[c+1]),l=y;return h.push(Sp(y,s,i)),p.push([Math.min(l.x,y.x),Math.min(l.y,y.y),Math.max(l.x,y.x),Math.max(l.y,y.y)]),r.load(p,h),[n,u]}function vp(t,e,o){var i=Ba(t),r=i,n=Xa(t),s=!1;do{var a=o?Vs(n.W.x,n.W.y,r.W.x,r.W.y,r.aa.x,r.aa.y):Vs(r.aa.x,r.aa.y,r.W.x,r.W.y,n.W.x,n.W.y)}while(void 0===a?(Mp(r,n,t,e),s=!0,n===i&&(i=Va(t)),n=r,Wa(t)):r.W.Fb!==a&&(r.W.Fb=a,s=!0),r=n,n=Xa(t),r!==i);return s}function bp(t,e,o,i,r){var n=t.b.length,s=Ba(e),a=Za(e),p=s,h=Xa(e),l=Va(e),u=!1;do{var c,f=p.aa,y=p.W,g=h.W}while(!1===y.Fb&&(c=r?Tp(l.W,g,y,f,a.aa):Tp(a.aa,f,y,g,l.W),!i&&Ap({aa:f,W:g},o).length||!c||Pp(f,y,g,o,!0).length||!i&&!1!==f.Fb&&!1!==g.Fb&&yr([a.aa.x,a.aa.y,f.x,f.y,y.x,y.y,g.x,g.y,l.W.x,l.W.y],0,10,2)!==!r||(t.b[n++]=f.hb,t.b[n++]=y.hb,t.b[n++]=g.hb,Mp(p,h,e,o),h===s&&(s=l),u=!0)),a=Za(e),p=Ka(e),h=Xa(e),l=Va(e),p!==s&&3(o.y-i.y)*(e.x-i.x);return r=(r.x-i.x)*(e.y-i.y)<(r.y-i.y)*(e.x-i.x),t=(t.x-e.x)*(i.y-e.y)>(t.y-e.y)*(i.x-e.x),o=(o.x-e.x)*(i.y-e.y)<(o.y-e.y)*(i.x-e.x),e=e.Fb?o||t:o&&t,(i.Fb?r||n:r&&n)&&e}function jp(){}function Cp(t,e,o){this.f=e,this.g=t,this.c=o,this.a={}}function Lp(t,e){var o,i=[];for(o in t.a){var r,n=t.a[o];for(r in n)i.push(n[r].Eb(e))}return function(){for(var t,e=i.length,o=0;othis.Hf;)this.jk(i,e),e--;this.Zj(o,i,e)},jk:function(t,e){var o=t[e],i=o.children.length,r=this.fh;this.$j(o,r,i),i=this.ak(o,r,i),(i=sp(o.children.splice(i,o.children.length-i))).height=o.height,i.ib=o.ib,_a(o,this.wb),_a(i,this.wb),e?t[e-1].children.push(i):this.hh(o,i)},hh:function(t,e){this.data=sp([t,e]),this.data.height=t.height+1,this.data.ib=!1,_a(this.data,this.wb)},ak:function(t,e,o){for(var i=s=1/0,r=e;r<=o-e;r++){var n,s,a=$a(t,0,r,this.wb),p=$a(t,r,o,this.wb),h=Math.max(0,Math.min(a.$,p.$)-Math.max(a.ca,p.ca))*Math.max(0,Math.min(a.ia,p.ia)-Math.max(a.da,p.da)),a=op(a)+op(p);hr&&(this.i.push(r),this.f.push(e),this.j.s&&(this.c.push(r),this.j.s=!1)),this.g.b.length>n&&Sa(this.g,e,n)},Mu.rc=function(t,e){var o=t.Bb(),i=t.qa();if(0=l;){var u=this.i[h];o[G(this.f[h]).toString()]&&(s!==p&&(Us(t,e,s,p),t.clear(t.DEPTH_BUFFER_BIT)),p=u),h--,s=u}s!==p&&(Us(t,e,s,p),t.clear(t.DEPTH_BUFFER_BIT)),s=p=l}i||(t.disable(t.DEPTH_TEST),t.clear(t.DEPTH_BUFFER_BIT),t.depthMask(n),t.depthFunc(r))},Mu.ve=function(t,e,o,i,r){for(var n,s=this.i.length-2,a=this.i[s+1],p=this.c.length-1;0<=p;--p){var h=this.u[p];for(t.uniform4fv(this.v.B,h),n=this.c[p];0<=s&&this.i[s]>=n;){var h=this.i[s],l=this.f[s];if(void 0===o[G(l).toString()]&&l.V()&&(void 0===r||nt(r,l.V().G()))&&(t.clear(t.COLOR_BUFFER_BIT|t.DEPTH_BUFFER_BIT),Us(t,e,h,a),a=i(l)))return a;s--,a=h}}},Mu.Ma=function(t,e){t=!((t=t?t.b:[0,0,0,0])instanceof CanvasGradient||t instanceof CanvasPattern)&&Be(t).map(function(t,e){return 3!=e?t/255:t})||Gs,this.j.fillColor&&U(t,this.j.fillColor)||(this.j.fillColor=t,this.j.s=!0,this.u.push(t)),e?this.g.Ma(null,e):this.g.Ma(null,new Oa({color:[0,0,0,0],lineWidth:0}))},jp.prototype.La=function(){},e(Cp,Es),Cp.prototype.b=function(t,e){var o=void 0!==t?t.toString():"0";return void 0===(t=this.a[o])&&(this.a[o]=t={}),void 0===(o=t[e])&&(o=new Np[e](this.g,this.f),t[e]=o),o},Cp.prototype.i=function(){return ct(this.a)},Cp.prototype.La=function(t,e,o,i,r,n,s,a){var p=Object.keys(this.a).map(Number);p.sort(D);for(var h=0,l=p.length;h=t.l)break;++n}t.D!=(o=r+" "+i)&&(t.o.innerHTML=o,t.D=o),t.B!=e&&(t.o.style.width=e+"px",t.B=e),t.j||(t.c.style.display="",t.j=!0)}else t.j&&(t.c.style.display="none",t.j=!1)}oh.prototype.C=function(){return this.get(sh)},oh.prototype.T=function(){nh(this)},oh.prototype.I=function(t){this.set(sh,t)};var sh="units";function ah(t){t=t||{},this.c=void 0,this.j=ph,this.D=this.l=0,this.I=null,this.na=!1,this.T=void 0!==t.duration?t.duration:200;var e=void 0!==t.className?t.className:"ol-zoomslider",o=document.createElement("button");o.setAttribute("type","button"),o.className=e+"-thumb ol-unselectable";var i=document.createElement("div");i.className=e+" ol-unselectable ol-control",i.appendChild(o),this.o=new oi(i),de(this.o,"pointerdown",this.yl,this),de(this.o,"pointermove",this.wl,this),de(this.o,"pointerup",this.xl,this),de(i,"click",this.vl,this),de(o,"click",Pe),Je.call(this,{element:i,render:t.render||hh})}e(ah,Je),ah.prototype.ka=function(){Se(this.o),Je.prototype.ka.call(this)};var ph=0;function hh(t){var e,o,i,r,n;t.frameState&&(this.na||(e=(r=this.element).offsetWidth,o=r.offsetHeight,n=r.firstElementChild,i=getComputedStyle(n),r=n.offsetWidth+parseFloat(i.marginRight)+parseFloat(i.marginLeft),n=n.offsetHeight+parseFloat(i.marginTop)+parseFloat(i.marginBottom),this.I=[r,n],o>1)],o))<0?p=r+1:(h=r,l=!a);a=(r=l?p:~p)<0?(o=(o-s[-r-2])/(s[-r-1]-s[-r-2]),s=f(t[e+=(-r-2)*i],t[e+i],o),f(t[e+1],t[e+i+1],o)):(s=t[e+r*i],t[e+r*i+1])}return n?(n[0]=s,n[1]=a,n):[s,a]}function al(t,e,o,i,r,n){if(o==e)return null;if(r>1)+1)*i-1]?o=n:e=n+1;if(r==(o=t[e*i-1]))return t.slice((e-1)*i,(e-1)*i+i);var s;for(n=(r-o)/(t[(e+1)*i-1]-o),o=[],s=0;s>>0):4294967296*(e>>>0)+(t>>>0)}var o=function(t,e,o,i,r){var n=8*r-i-1,s=(1<>1,p=-7,h=o?-1:1,l=t[e+(r=o?r-1:0)];for(r+=h,o=l&(1<<-p)-1,l>>=-p,p+=n;0>=-p,p+=i;0>3,n=this.ea;this.type=7&i,t(r,e,this),this.ea===n&&this.mq(i)}return e},yp:function(){var t=o(this.lc,this.ea,!0,23,4);return this.ea+=4,t},up:function(){var t=o(this.lc,this.ea,!0,52,8);return this.ea+=8,t},Ka:function(t){var e=this.lc,o=e[this.ea++],i=127&o;return o<128?i:(i|=(127&(o=e[this.ea++]))<<7,o<128?i:(i|=(127&(o=e[this.ea++]))<<14,o<128?i:(i|=(127&(o=e[this.ea++]))<<21,o<128?i:function(t,e,o){var i=o.lc,r=i[o.ea++],n=(112&r)>>4;if(r<128)return s(t,n,e);if(n|=(127&(r=i[o.ea++]))<<3,r<128)return s(t,n,e);if(n|=(127&(r=i[o.ea++]))<<10,r<128)return s(t,n,e);if(n|=(127&(r=i[o.ea++]))<<17,r<128)return s(t,n,e);if(n|=(127&(r=i[o.ea++]))<<24,r<128)return s(t,n,e);if((r=i[o.ea++])<128)return s(t,n|(1&r)<<31,e);throw Error("Expected varint not more than 10 bytes")}(i|(15&e[this.ea])<<28,t,this))))},Kp:function(){return this.Ka(!0)},ce:function(){var t=this.Ka();return 1==t%2?(t+1)/-2:t/2},sp:function(){return!!this.Ka()},Gg:function(){for(var t=this.Ka()+this.ea,e=this.lc,o="",i=this.ea;i>>10&1023|55296),p=56320|1023&p),o+=String.fromCharCode(p),i+=h}return this.ea=t,o},mq:function(t){if((t&=7)===e.c)for(;127>3)?t.Gg():2===e?t.yp():3===e?t.up():4===e?t.Kp():5===e?t.Ka():6===e?t.ce():7===e?t.sp():null;return e}(o))}function s(t,e,o){3===t&&((t=new a(o,o.Ka()+o.ea)).length&&(e[t.name]=t))}p.prototype={clone:function(){return new p(this.x,this.y)},add:function(t){return this.clone().Yj(t)},rotate:function(t){return this.clone().hk(t)},round:function(){return this.clone().ik()},angle:function(){return Math.atan2(this.y,this.x)},Yj:function(t){return this.x+=t.x,this.y+=t.y,this},hk:function(t){var e=Math.cos(t),o=(t=Math.sin(t))*this.x+e*this.y;return this.x=e*this.x-t*this.y,this.y=o,this},ik:function(){return this.x=Math.round(this.x),this.y=Math.round(this.y),this}},p.Kq=function(t){return!(t instanceof p)&&Array.isArray(t)?new p(t[0],t[1]):t},o.b=["Unknown","Point","LineString","Polygon"],o.prototype.Oh=function(){var t=this.Cc;t.ea=this.Ef;for(var e,o=t.Ka()+t.ea,i=1,r=0,n=0,s=0,a=[];t.ea>=3),r--,1===i||2===i)n+=t.ce(),s+=t.ce(),1===i&&(e&&a.push(e),e=[]),e.push(new p(n,s));else{if(7!==i)throw Error("unknown command "+i);e&&e.push(e[0].clone())}return e&&a.push(e),a},o.prototype.bbox=function(){var t=this.Cc;t.ea=this.Ef;for(var e=t.Ka()+t.ea,o=1,i=0,r=0,n=0,s=1/0,a=-1/0,p=1/0,h=-1/0;t.ea>=3),i--,1===o||2===o)(r+=t.ce())=this.me.length)throw Error("feature index out of bounds");return this.Cc.ea=this.me[t],t=this.Cc.Ka()+this.Cc.ea,new o(this.Cc,t,this.extent,this.ne,this.pe)};var h=a;t.default={Bf:e,Wj:o,Xj:h},t.Bf=e,t.Wj=o,t.Xj=h}(Ya.xf=Ya.xf||{}),(Mu=Dy.prototype).get=function(t){return this.c[t]},Mu.Bb=function(){return this.f},Mu.G=function(){return this.a||(this.a="Point"===this.i?k(this.b):W(this.b,0,this.b.length,2)),this.a},Mu.Wn=function(){return this.g},Mu.ec=function(){return this.b},Mu.ga=Dy.prototype.ec,Mu.V=function(){return this},Mu.Xn=function(){return this.c},Mu.Vd=Dy.prototype.V,Mu.qa=function(){return 2},Mu.Lc=w,Mu.U=function(){return this.i},e(Oy,tl),(Mu=Oy.prototype).U=function(){return"arraybuffer"},Mu.Oa=function(t,e){var o=this.c;t=new Ya.Dd(t),t=new Ya.xf.Bf(t);var i,r=[],n=this.b;for(i in t.layers)if(!o||-1!=o.indexOf(i))for(var s,a,p,h,l,u,c,f,y,g=t.layers[i],d=0,v=g.length;d>=5;e+=n+=String.fromCharCode(r+63)}return e}function fg(t,e){e=e||1e5;for(var o=[],i=0,r=0,n=0,s=t.length;n>1):r>>1;for(t=0,i=o.length;t=e[0]||t[1]<=e[1]&&t[3]>=e[1]||H(t,this.sb,this))},Mu.ob=function(t){var e,o=this.a,i=t.slice();for(i[o]=i[0]+(this.A[o]-this.A[0]),e=1;eg[2])&&(c=e*Math.ceil((g[0]-c)/e),f=[f[0]+c,f[1],f[2]+c,f[3]]),c=this.S[0],g=this.S[1],e=-1,i=Math.pow(this.Jb*d,2),r=[],n=[],d=0,o=Kd.length;dx.width?x.width-E:I,D=P+T>x.height?x.height-T:P;e.drawImage(x,E,T,k,D,F,j,k*o,D*o),1!=A&&(e.globalAlpha=N),1==L&&!C||e.setTransform.apply(e,d)}++c;break;case 5:for(y=F[1],w=F[2],M=F[3],P=F[4]*o,A=F[5]*o,C=F[6],L=F[7]*o,x=F[8],S=F[9],(j=F[10])&&(C+=r);ythis.c&&(this.c=this.i.lineWidth,this.f=null)},e(Pv,yv),(Mu=Pv.prototype).Zb=function(t,e){var o,i=this.i,r=i.strokeStyle;void 0===i.fillStyle&&void 0===r||(Ev(this,t),dv(this,e),this.b.push([9,Xe(us)]),void 0!==i.strokeStyle&&this.b.push([10,i.strokeStyle,i.lineWidth,i.lineCap,i.lineJoin,i.miterLimit,i.lineDash,i.lineDashOffset,!0,1]),o=t.ga(),r=this.coordinates.length,gv(this,o,0,o.length,t.qa(),!1,!1),this.a.push(t=[1],r=[2,r]),this.b.push(t,r),this.b.push(t=[7]),void 0!==i.fillStyle&&this.a.push(t),void 0!==i.strokeStyle&&(this.a.push(i=[12]),this.b.push(i)),mv(this,e))},Mu.rc=function(t,e){var o=this.i;Ev(this,t),dv(this,e),this.b.push([9,Xe(us)]),void 0!==o.strokeStyle&&this.b.push([10,o.strokeStyle,o.lineWidth,o.lineCap,o.lineJoin,o.miterLimit,o.lineDash,o.lineDashOffset,!0,1]);o=t.Bb();Av(this,t.ec(),0,o,t.qa()),mv(this,e)},Mu.pc=function(t,e){var o=this.i,i=o.strokeStyle;if(void 0!==o.fillStyle||void 0!==i){Ev(this,t),dv(this,e),this.b.push([9,Xe(us)]),void 0!==o.strokeStyle&&this.b.push([10,o.strokeStyle,o.lineWidth,o.lineCap,o.lineJoin,o.miterLimit,o.lineDash,o.lineDashOffset,!0,1]),o=t.c,i=dl(t),t=t.qa();for(var r=0,n=0,s=o.length;nthis.c&&(this.c=o.lineWidth,this.f=null)):(o.strokeStyle=void 0,o.lineCap=void 0,o.lineDash=null,o.lineDashOffset=void 0,o.lineJoin=void 0,o.lineWidth=void 0,o.miterLimit=void 0)},e(Tv,yv),Tv.prototype.yc=function(t,e,o,i,r,n){var s,a;""!==this.Ia&&this.g&&(this.i||this.f)&&(this.i&&(r=this.i,(s=this.S)&&s.fillStyle==r.fillStyle||(a=[9,r.fillStyle],this.a.push(a),this.b.push(a),s?s.fillStyle=r.fillStyle:this.S={fillStyle:r.fillStyle})),this.f&&(r=this.f,(s=this.D)&&s.lineCap==r.lineCap&&s.lineDash==r.lineDash&&s.lineDashOffset==r.lineDashOffset&&s.lineJoin==r.lineJoin&&s.lineWidth==r.lineWidth&&s.miterLimit==r.miterLimit&&s.strokeStyle==r.strokeStyle||(a=[10,r.strokeStyle,r.lineWidth,r.lineCap,r.lineJoin,r.miterLimit,r.lineDash,r.lineDashOffset,!1,1],this.a.push(a),this.b.push(a),s?(s.lineCap=r.lineCap,s.lineDash=r.lineDash,s.lineDashOffset=r.lineDashOffset,s.lineJoin=r.lineJoin,s.lineWidth=r.lineWidth,s.miterLimit=r.miterLimit,s.strokeStyle=r.strokeStyle):this.D={lineCap:r.lineCap,lineDash:r.lineDash,lineDashOffset:r.lineDashOffset,lineJoin:r.lineJoin,lineWidth:r.lineWidth,miterLimit:r.miterLimit,strokeStyle:r.strokeStyle})),r=this.g,(s=this.C)&&s.font==r.font&&s.textAlign==r.textAlign&&s.textBaseline==r.textBaseline||(a=[11,r.font,r.textAlign,r.textBaseline],this.a.push(a),this.b.push(a),s?(s.font=r.font,s.textAlign=r.textAlign,s.textBaseline=r.textBaseline):this.C={font:r.font,textAlign:r.textAlign,textBaseline:r.textBaseline}),dv(this,n),t=[5,r=this.coordinates.length,t=gv(this,t,e,o,i,!1,!1),this.Ia,this.j,this.o,this.v,this.u,!!this.i,!!this.f,this.l],this.a.push(t),this.b.push(t),mv(this,n))},Tv.prototype.Cb=function(t){var e,o,i,r,n,s,a,p,h;t?((o=t.Fa())?(o=ze((o=o.b)||us),this.i?this.i.fillStyle=o:this.i={fillStyle:o}):this.i=null,(s=t.Ga())?(o=s.a,i=s.f,r=s.i,a=s.g,p=s.j,n=s.c,s=s.o,i=void 0!==i?i:"round",r=r?r.slice():cs,a=void 0!==a?a:0,p=void 0!==p?p:"round",n=void 0!==n?n:1,s=void 0!==s?s:10,o=ze(o||fs),this.f?((h=this.f).lineCap=i,h.lineDash=r,h.lineDashOffset=a,h.lineJoin=p,h.lineWidth=n,h.miterLimit=s,h.strokeStyle=o):this.f={lineCap:i,lineDash:r,lineDashOffset:a,lineJoin:p,lineWidth:n,miterLimit:s,strokeStyle:o}):this.f=null,e=t.a,o=t.i,i=t.c,r=t.o,n=t.f,s=t.b,a=t.Na(),p=t.g,h=t.j,t=void 0!==e?e:"10px sans-serif",p=void 0!==p?p:"center",h=void 0!==h?h:"middle",this.g?((e=this.g).font=t,e.textAlign=p,e.textBaseline=h):this.g={font:t,textAlign:p,textBaseline:h},this.Ia=void 0!==a?a:"",this.j=void 0!==o?o:0,this.o=void 0!==i?i:0,this.l=void 0!==r&&r,this.v=void 0!==n?n:0,this.u=void 0!==s?s:1):this.Ia=""},e(jv,Es);var Cv={0:[[!0]]};function Lv(t,e,o){var i,r=Math.floor(t.length/2);if(r<=e)for(i=r;it.$&&(t.$=i.$),i.dat.ia&&(t.ia=i.ia)):t[e][o]=i:(t[e]={},t[e][o]=i)}function Xv(t,e,o,i,r,n,s,a,p,h){var l=G(e).toString();l in t.wantedTiles||(t.wantedTiles[l]={});var u=t.wantedTiles[l];t=t.tileQueue;for(var c,f=o.minZoom,y=s;f<=y;--y)for(var g,d=ee(o,n,y,d),v=o.Da(y),b=d.ca;b<=d.$;++b)for(c=d.da;c<=d.ia;++c)s-y<=a?(0==(g=e.Nc(y,b,c,i,r)).getState()&&(u[g.bb()]=!0,g.bb()in t.a||t.f([g,l,oe(o,g.ta),v])),p&&p.call(h,g)):e.Ug(y,b,c,r)}function Vv(t){Fv.call(this,t),this.fa=Yn()}function Wv(t,e,o){var i=e.pixelRatio,r=e.size[0]*i,n=e.size[1]*i,s=e.viewState.rotation,a=ot(o),p=it(o),h=_(o);o=J(o),$n(e.coordinateToPixelTransform,a),$n(e.coordinateToPixelTransform,p),$n(e.coordinateToPixelTransform,h),$n(e.coordinateToPixelTransform,o),t.save(),ys(t,-s,r/2,n/2),t.beginPath(),t.moveTo(a[0]*i,a[1]*i),t.lineTo(p[0]*i,p[1]*i),t.lineTo(h[0]*i,h[1]*i),t.lineTo(o[0]*i,o[1]*i),t.clip(),ys(t,s,r/2,n/2)}function Zv(t,e,o,i,r){var n,s,a,p=t.a;Ee(p,e)&&(n=i.size[0]*i.pixelRatio,s=i.size[1]*i.pixelRatio,ys(o,-(a=i.viewState.rotation),n/2,s/2),t=r||Kv(t,i,0),p.b(new ls(e,new ds(o,i.pixelRatio,i.extent,t,i.viewState.rotation),i,o,null)),ys(o,a,n/2,s/2))}function Kv(t,e,o){var i=e.viewState,r=e.pixelRatio,n=r/i.resolution;return os(t.fa,r*e.size[0]/2,r*e.size[1]/2,n,-n,-i.rotation,-i.center[0]+o,-i.center[1])}function zv(t,e){return G(t)-G(e)}function Yv(t,e){return(t=.5*t/e)*t}function Hv(t,e,o,i,r,n){var s,a,p=!1;return(s=o.Y())&&(2==(a=s.Ye())||3==a?s.Bj(r,n):(0==a&&s.load(),s.Nh(r,n),p=!0)),(r=(0,o.Za)(e))&&(i=r.Vd(i),(0,qv[i.U()])(t,i,o,e)),p}e(Fv,Te),Fv.prototype.Ea=w,Fv.prototype.Ue=Oi,Fv.prototype.Nf=function(o,i,r){return function(e,t){return uw(o,i,e,t,function(t){r[e]||(r[e]={}),r[e][t.ta.toString()]=t})}},Fv.prototype.na=function(t){2===t.target.getState()&&Dv(this)},e(Vv,Fv),Vv.prototype.u=function(t,e,o,i){if(this.Ea(t,e,0,Di,this))return o.call(i,this.a,null)},Vv.prototype.ef=function(t,e,o,i){Zv(this,"postcompose",t,e,i)};var qv={Point:function(t,e,o,i){var r=o.Y();if(r){if(2!=r.Ye())return;var n=t.b(o.Ba(),"Image");n.Ub(r),n.qc(e,i)}(r=o.Na())&&((t=t.b(o.Ba(),"Text")).Cb(r),t.yc(e.ga(),0,2,2,e,i))},LineString:function(t,e,o,i){var r,n=o.Ga();n&&((r=t.b(o.Ba(),"LineString")).Ma(null,n),r.mc(e,i)),(n=o.Na())&&((t=t.b(o.Ba(),"Text")).Cb(n),t.yc(hl(e),0,2,2,e,i))},Polygon:function(t,e,o,i){var r,n=o.Fa(),s=o.Ga();(n||s)&&((r=t.b(o.Ba(),"Polygon")).Ma(n,s),r.rc(e,i)),(n=o.Na())&&((t=t.b(o.Ba(),"Text")).Cb(n),t.yc(mr(e),0,2,2,e,i))},MultiPoint:function(t,e,o,i){var r=o.Y();if(r){if(2!=r.Ye())return;var n=t.b(o.Ba(),"Image");n.Ub(r),n.oc(e,i)}(r=o.Na())&&((t=t.b(o.Ba(),"Text")).Cb(r),o=e.ga(),t.yc(o,0,o.length,e.qa(),e,i))},MultiLineString:function(t,e,o,i){var r,n=o.Ga();n&&((r=t.b(o.Ba(),"LineString")).Ma(null,n),r.nc(e,i)),(n=o.Na())&&((t=t.b(o.Ba(),"Text")).Cb(n),o=ul(e),t.yc(o,0,o.length,2,e,i))},MultiPolygon:function(t,e,o,i){var r,n=o.Fa(),s=o.Ga();(s||n)&&((r=t.b(o.Ba(),"Polygon")).Ma(n,s),r.pc(e,i)),(n=o.Na())&&((t=t.b(o.Ba(),"Text")).Cb(n),o=gl(e),t.yc(o,0,o.length,2,e,i))},GeometryCollection:function(t,e,o,i){for(var r=0,n=(e=e.a).length;rp[2];)l=Kv(this,t,l=h*++m),u.La(f,r,l,a,n),s-=h;l=Kv(this,t,0)}ys(f,a,v/2,b/2),f!=o&&(Zv(this,"render",f,t,l),o.drawImage(f.canvas,-y,-g),f.translate(-y,-g)),f.globalAlpha=d}c&&o.restore(),this.ef(o,t,e,l)},Jv.prototype.Ea=function(t,e,o,i,r){if(this.f){var n=this.a,s={};return this.f.Ea(t,e.viewState.resolution,e.viewState.rotation,o,{},function(t){var e=G(t).toString();if(!(e in s))return s[e]=!0,i.call(r,t,n)})}},Jv.prototype.D=function(){Dv(this)},Jv.prototype.sd=function(t){function e(t){var e,o=t.Lc();if(o?e=o.call(t,h):(o=n.f)&&(e=o(t,h)),e){if(e){if(o=!1,Array.isArray(e))for(var i=0,r=e.length;it.ad:r<=t.ad),t.l?(r=e.coordinate,i=t.j.V(),t.g===Tb?o=t.a:t.g===Cb?(o=(o=t.a[0])[o.length-1],Sb(t,e)&&(r=t.l.slice())):o=(o=t.a)[o.length-1],o[0]=r[0],o[1]=r[1],t.Za(t.a,i),t.B&&t.B.V().ma(r),i instanceof br&&t.g!==Cb?(t.C||(t.C=new Lh(new pl(null))),r=i.Ch(0),(e=t.C.V()).ba(r.ja,r.ga())):t.I&&(e=t.C.V()).ma(t.I),Eb(t)):(e=e.coordinate.slice(),t.B?t.B.V().ma(e):(t.B=new Lh(new ar(e)),Eb(t))),!0}function Sb(t,e){var o=!1;if(t.j){var i=!1,r=[t.l];if(t.g===jb?i=t.a.length>t.Sa:t.g===Cb&&(i=t.a[0].length>t.Sa,r=[t.a[0][0],t.a[0][t.a[0].length-2]]),i)for(var i=e.map,n=0,s=r.length;n=t.va&&(t.u?i.pop():o=!0),i.push(e.slice()),t.Za(i,r)):t.g===Cb&&((i=t.a[0]).length>=t.va&&(t.u?i.pop():o=!0),i.push(e.slice()),o&&(t.l=i[0]),t.Za(t.a,r)),Eb(t),o&&t.Pd()}function Ab(t){t.l=null;var e=t.j;return e&&(t.j=null,t.B=null,t.C=null,t.pa.ha().clear(!0)),e}function Eb(t){var e=[];t.j&&e.push(t.j),t.C&&e.push(t.C),t.B&&e.push(t.B),(t=t.pa.ha()).clear(!0),t.cd(e)}e(pb,je),(Mu=pb.prototype).Ea=w,Mu.ya=function(){return this.j},Mu.xa=function(){return this.D},Mu.za=function(){return this.c},Mu.getState=function(){return this.na},Mu.sa=function(){this.s()},Mu.ua=function(t){this.j=hb(t),this.s()},e(ub,pb),(Mu=ub.prototype).yb=function(t){var e,o=G(t).toString();fb(this,o,t)&&(cb(this,o,t),(e=t.V())?(o=e.G(),this.a&&this.a.Ca(o,t)):this.g[o]=t,this.b(new db("addfeature",t))),this.s()},Mu.cd=function(t){yb(this,t),this.s()},Mu.clear=function(t){if(t){for(var e in this.v)this.v[e].forEach(me);this.f||(this.v={},this.o={},this.l={})}else if(this.a)for(var o in this.a.forEach(this.Ig,this),this.g)this.Ig(this.g[o]);this.f&&this.f.clear(),this.a&&this.a.clear(),this.R.clear(),this.g={},this.b(new db("clear")),this.s()},Mu.sh=function(t,e){return this.a?this.a.forEach(t,e):this.f?this.f.forEach(t,e):void 0},Mu.$b=function(t,e,o){return this.a?cp(this.a,t,e,o):this.f?this.f.forEach(e,o):void 0},Mu.th=function(e,o,i){return this.$b(e,function(t){if(t.V().Xa(e)&&(t=o.call(i,t)))return t})},Mu.Ah=function(){return this.f},Mu.Xe=function(){var t;return this.f?t=this.f.a:this.a&&(t=lp(this.a),ct(this.g)||c(t,ut(this.g))),t},Mu.zh=function(t){var e,o,i=[];return e=t,o=function(t){i.push(t)},this.$b([e[0],e[1],e[0],e[1]],function(t){if(t.V().sb(e))return o.call(void 0,t)}),i},Mu.Uf=function(t){return up(this.a,t)},Mu.vh=function(t,e){var o=t[0],i=t[1],r=null,n=[NaN,NaN],s=1/0,a=[-1/0,-1/0,1/0,1/0],p=e||Di;return cp(this.a,a,function(t){var e;p(t)&&(e=t.V(),(s=e.Kb(o,i,n,e=s))o&&(t.index+=r)})}function om(t,e,o){Me.call(this,t),this.features=e,this.mapBrowserEvent=o}function im(t){var e,o;kr.call(this,{handleEvent:rm}),this.C=(t=t||{}).condition||Zr,this.D=t.addCondition||Oi,this.B=t.removeCondition||Oi,this.I=t.toggleCondition||zr,this.l=t.multi||!1,this.o=t.filter||Di,this.j=t.hitTolerance||0,this.g=new nb({source:new ub({useSpatialIndex:!1,features:t.features,wrapX:t.wrapX}),style:t.style||(c((e=jh()).Polygon,e.LineString),c(e.GeometryCollection,e.LineString),function(t){return t.V()?e[t.V().U()]:null}),updateWhileAnimating:!0,updateWhileInteracting:!0}),t=t.layers?"function"==typeof t.layers?t.layers:(o=t.layers,function(t){return d(o,t)}):Di,this.u=t,this.a={},de(t=this.g.ha().f,"add",this.Fn,this),de(t,"remove",this.Jn,this)}function rm(t){if(!this.C(t))return!0;var o=this.D(t),i=this.B(t),r=this.I(t),e=!o&&!i&&!r,n=t.map,s=this.g.ha().f,a=[],p=[];if(e){for(lt(this.a),n.we(t.pixel,function(t,e){if(this.o(t,e))return p.push(t),t=G(t),this.a[t]=e,!this.l}.bind(this),{layerFilter:this.u,hitTolerance:this.j}),e=s.dc()-1;0<=e;--e){var n=s.item(e),h=p.indexOf(n);-1e.v),g))Math.abs(o[0]-r[0])<=Math.abs(o[1]-r[1])?(y=[(i[0]+r[0])/2,(i[1]+r[1])/2],f=e.a(y),u=[(n[0]+o[0])/2,(n[1]+o[1])/2],c=e.a(u),t(e,o,i,y,u,s,a,f,c,l-1),t(e,u,y,r,n,c,f,p,h,l-1)):(y=[(o[0]+i[0])/2,(o[1]+i[1])/2],f=e.a(y),u=[(r[0]+n[0])/2,(r[1]+n[1])/2],c=e.a(u),t(e,o,y,u,n,s,f,c,h,l-1),t(e,y,i,r,u,f,a,p,c,l-1));else{if(y){if(!e.l)return;e.o=!0}e.c.push({source:[s,p,h],target:[o,r,n]}),e.c.push({source:[s,a,p],target:[o,i,r]})}}}(this,t,e,i,o,r,p,h,l,10),this.o&&(a=1/0,this.c.forEach(function(t){a=Math.min(a,t.source[0][0],t.source[1][0],t.source[2][0])}),this.c.forEach(function(t){var e;Math.max(t.source[0][0],t.source[1][0],t.source[2][0])-a>this.b/2&&((e=[[t.source[0][0],t.source[0][1]],[t.source[1][0],t.source[1][1]],[t.source[2][0],t.source[2][1]]])[0][0]-a>this.b/2&&(e[0][0]-=this.b),e[1][0]-a>this.b/2&&(e[1][0]-=this.b),e[2][0]-a>this.b/2&&(e[2][0]-=this.b),Math.max(e[0][0],e[1][0],e[2][0])-Math.min(e[0][0],e[1][0],e[2][0])r[0]||t[1]<0||t[1]>r[1])&&(this.f||(this.f=Ye(1,1)),this.f.clearRect(0,0,1,1),this.f.drawImage(this.M.Y(),t[0],t[1],1,1,0,0,1,1),0<(r=this.f.getImageData(0,0,1,1).data)[3]))return o.call(i,this.a,r)}},e(Vm,Vn),Vm.prototype.Fd=function(t){var e=null,o=t.U();return"canvas"===o?e=new Am(this):"webgl"===o&&(e=new Xm(t,this)),e},e(Wm,Pm),Wm.prototype.sd=function(t,e){var o=t.pixelRatio,i=t.size,r=(s=t.viewState).projection,n=s.resolution,s=s.center,a=this.a,p=a.ha(),h=p.i,l=p.Ta(r),u=l.tc(n,this.T),c=l.Da(u),f=Math.round(n/c)||1,y=t.extent;if(st(y=void 0!==e.extent?et(y,e.extent):y))return!1;var g=te(l,y,c),d=l.Pc(u),v=l.Da(u),b=X(l.gb(u),l.j),d=F(d[0]+g.ca*b[0]*v,d[1]+g.da*b[1]*v,d[0]+(g.$+1)*b[0]*v,d[1]+(g.ia+1)*b[1]*v,void 0),v=p.nb(o);(b={})[u]={};var m=this.Nf(p,r,b),w=this.l,x=this.va,S=!1;for(C=g.ca;C<=g.$;++C)for(L=g.da;L<=g.ia;++L){var M=p.Nc(u,C,L,o,r);3!=M.getState()||this.a.kd()||Qd(M,2),Zm(this,M)||(M=$d(M)),Zm(this,M)?2==M.getState()&&(b[u][M.ta.toString()]=M,S||-1!=this.g.indexOf(M)||(S=!0)):$t(l,M.ta,m,x,w)||(M=Qt(l,M.ta,x,w))&&m(u+1,M)}if(C=(C=t.viewHints)[0]||C[1],!(this.f&&16t.highWaterMark}function lw(t){pb.call(this,{attributions:t.attributions,extent:t.extent,logo:t.logo,projection:t.projection,state:t.state,wrapX:t.wrapX}),this.va=void 0!==t.opaque&&t.opaque,this.$a=void 0!==t.tilePixelRatio?t.tilePixelRatio:1,this.tileGrid=void 0!==t.tileGrid?t.tileGrid:null,this.a=new pw(t.cacheSize),this.o=[0,0],this.uc=""}function uw(t,e,o,i,r){if(!(e=t.Wd(e)))return!1;for(var n,s,a=!0,p=i.ca;p<=i.$;++p)for(var h=i.da;h<=i.ia;++h)n=t.Sb(o,p,h),s=!1,e.b.hasOwnProperty(n)&&((s=2===(n=e.get(n)).getState())&&(s=!1!==r(n))),s||(a=!1);return a}function cw(t,e){t.uc!==e&&(t.uc=e,t.s())}function fw(t,e,o){var i,r,n=void 0!==o?o:t.c;return o=t.Ta(n),t.u&&n.c&&(e=(i=e)[0],t=oe(o,i),e=T(n=pe(n),t)?i:(i=rt(n),t[0]+=i*Math.ceil((n[0]-t[0])/i),o.bg(t,e))),i=e[0],n=e[1],t=e[2],(o=!(o.minZoom>i||i>o.maxZoom)&&(!(o=(r=o.G())?ee(o,r,i):o.a?o.a[i]:null)||p(o,n,t)))?e:null}function yw(t,e){Me.call(this,t),this.tile=e}function gw(t){lw.call(this,{attributions:t.attributions,cacheSize:t.cacheSize,extent:t.extent,logo:t.logo,opaque:t.opaque,projection:t.projection,state:t.state,tileGrid:t.tileGrid,tilePixelRatio:t.tilePixelRatio,wrapX:t.wrapX}),this.tileLoadFunction=t.tileLoadFunction,this.tileUrlFunction=this.Fc?this.Fc.bind(this):sw,this.urls=null,t.urls?this.eb(t.urls):t.url&&this.jb(t.url),t.tileUrlFunction&&this.cb(t.tileUrlFunction)}function dw(t){gw.call(this,{attributions:t.attributions,cacheSize:t.cacheSize,extent:t.extent,logo:t.logo,opaque:t.opaque,projection:t.projection,state:t.state,tileGrid:t.tileGrid,tileLoadFunction:t.tileLoadFunction||mw,tilePixelRatio:t.tilePixelRatio,tileUrlFunction:t.tileUrlFunction,url:t.url,urls:t.urls,wrapX:t.wrapX}),this.crossOrigin=void 0!==t.crossOrigin?t.crossOrigin:null,this.tileClass=t.tileClass||tv,this.g={},this.v={},this.Sa=t.reprojectionErrorThreshold,this.I=!1}function vw(t,e,o,i,r,n,s){return r=(o=fw(t,e=[e,o,i],n))?t.tileUrlFunction(o,r,n):void 0,(r=new t.tileClass(e,void 0!==r?0:4,void 0!==r?r:"",t.crossOrigin,t.tileLoadFunction)).key=s,de(r,"change",t.Li,t),r}function bw(t,e,o,i,r,n){var s=t.Sb(e,o,i),a=t.uc;if(t.a.b.hasOwnProperty(s)){if((h=t.a.get(s)).key!=a){var p=h,h=vw(t,e,o,i,r,n,a);if(0==p.getState()?h.i=p.i:h.i=p,h.i){e=h.i,o=h;do{if(2==e.getState()){e.i=null;break}}while(1!=e.getState()&&0==e.getState()?o.i=e.i:o=e,e=o.i)}t.a.replace(s,h)}}else h=vw(t,e,o,i,r,n,a),t.a.set(s,h);return h}function mw(t,e){t.Y().src=e}function ww(t){this.B=void 0!==t.hidpi&&t.hidpi,dw.call(this,{cacheSize:t.cacheSize,crossOrigin:"anonymous",opaque:!0,projection:Bt("EPSG:3857"),reprojectionErrorThreshold:t.reprojectionErrorThreshold,state:"loading",tileLoadFunction:t.tileLoadFunction,tilePixelRatio:this.B?2:1,wrapX:void 0===t.wrapX||t.wrapX}),this.R=void 0!==t.culture?t.culture:"en-us",this.C=void 0!==t.maxZoom?t.maxZoom:-1,this.f=t.key,this.l=t.imagerySet,ow("https://dev.virtualearth.net/REST/v1/Imagery/Metadata/"+this.l+"?uriScheme=https&include=ImageryProviders&key="+this.f,this.pa.bind(this),void 0,"jsonp")}(Mu=$m.prototype).sd=function(t,e){var o=this.a,i=o.i;return this.pa!=i&&(this.g.length=0,o=o.j,this.c||"vector"==o||(this.c=Ye()),this.c&&"vector"==o&&(this.c=null)),this.pa=i,Wm.prototype.sd.apply(this,arguments)},Mu.Of=function(t,e,o,i,r,n,s,a){var p=t,h=this.a,l=e.pixelRatio,u=e.viewState.projection,c=h.i,f=h.get(sb)||null,y=p.o;if(y.Nd||y.mf!=c||y.Kg!=f){for(var g=0,d=p.a.length;gTerms of Use'});function Sw(t){var e=void 0!==(t=t||{}).projection?t.projection:"EPSG:3857",o=void 0!==t.tileGrid?t.tileGrid:ne({extent:pe(e),maxZoom:t.maxZoom,minZoom:t.minZoom,tileSize:t.tileSize});dw.call(this,{attributions:t.attributions,cacheSize:t.cacheSize,crossOrigin:t.crossOrigin,logo:t.logo,opaque:t.opaque,projection:e,reprojectionErrorThreshold:t.reprojectionErrorThreshold,tileGrid:o,tileLoadFunction:t.tileLoadFunction,tilePixelRatio:t.tilePixelRatio,tileUrlFunction:t.tileUrlFunction,url:t.url,urls:t.urls,wrapX:void 0===t.wrapX||t.wrapX})}function Mw(t){this.C=t.account,this.B=t.map||"",this.f=t.config||{},this.l={},Sw.call(this,{attributions:t.attributions,cacheSize:t.cacheSize,crossOrigin:t.crossOrigin,logo:t.logo,maxZoom:void 0!==t.maxZoom?t.maxZoom:18,minZoom:t.minZoom,projection:t.projection,state:"loading",wrapX:t.wrapX}),Pw(this)}function Pw(t){var e,o,i=JSON.stringify(t.f);t.l[i]?Aw(t,t.l[i]):(e="https://"+t.C+".cartodb.com/api/v1/map",t.B&&(e+="/named/"+t.B),(o=new XMLHttpRequest).addEventListener("load",t.Dl.bind(t,i)),o.addEventListener("error",t.Cl.bind(t)),o.open("POST",e),o.setRequestHeader("Content-type","application/json"),o.send(JSON.stringify(t.f)))}function Aw(t,e){t.jb("https://"+e.cdn_url.https+"/"+t.C+"/api/v1/map/"+e.layergroupid+"/{z}/{x}/{y}.png")}function Ew(t){ub.call(this,{attributions:t.attributions,extent:t.extent,logo:t.logo,projection:t.projection,wrapX:t.wrapX}),this.resolution=void 0,this.distance=void 0!==t.distance?t.distance:20,this.features=[],this.geometryFunction=t.geometryFunction||function(t){return O((t=t.V())instanceof ar,10),t},this.source=t.source,this.source.J("change",Ew.prototype.sa,this)}function Tw(t){if(void 0!==t.resolution){t.features.length=0;for(var e=V(),o=t.distance*t.resolution,i=t.source.Xe(),r={},n=0,s=i.length;n>=1}return o.join("")}(e))}})),i.imageryProviders&&(p=Wt(Bt("EPSG:4326"),this.c),(t=i.imageryProviders.map(function(t){var e=t.attribution,n={};return t.coverageAreas.forEach(function(t){var e,o=t.zoomMin,i=Math.min(t.zoomMax,s);for(t=pt([(t=t.bbox)[1],t[0],t[3],t[2]],p),e=o;e<=i;++e){var r=e.toString(),o=ee(a,t,e);r in n?n[r].push(o):n[r]=[o]}}),new he({html:e,tileRanges:n})})).push(xw),this.ua(t)),this.D=e,lb(this,"ready"))},e(Sw,dw),e(Mw,Sw),(Mu=Mw.prototype).Kk=function(){return this.f},Mu.tq=function(t){ht(this.f,t),Pw(this)},Mu.Xp=function(t){this.f=t||{},Pw(this)},Mu.Dl=function(t,e){if(!(e=e.target).status||200<=e.status&&e.status<300){try{var o=JSON.parse(e.responseText)}catch(t){return void lb(this,"error")}Aw(this,o),this.l[t]=o,lb(this,"ready")}else lb(this,"error")},Mu.Cl=function(){lb(this,"error")},e(Ew,ub),(Mu=Ew.prototype).$n=function(){return this.distance},Mu.ao=function(){return this.source},Mu.Yd=function(t,e,o){this.source.Yd(t,e,o),e!==this.resolution&&(this.clear(),this.resolution=e,Tw(this),this.cd(this.features))},Mu.Yp=function(t){this.distance=t,this.sa()},Mu.sa=function(){this.clear(),Tw(this),this.cd(this.features),ub.prototype.sa.call(this)},e(Cw,Im),(Mu=Cw.prototype).co=function(){return this.v},Mu.Jc=function(t,e,o,i){if(void 0===this.f)return null;e=Nm(this,e),o=this.T?o:1;var r=this.M;if(r&&this.I==this.i&&r.resolution==e&&r.a==o&&N(r.G(),t))return r;ht(r={F:"image",FORMAT:"PNG32",TRANSPARENT:!0},this.v);var n=((t=t.slice())[0]+t[2])/2,s=(t[1]+t[3])/2;1!=this.B&&(a=this.B*rt(t)/2,p=this.B*tt(t)/2,t[0]=n-a,t[1]=s-p,t[2]=n+a,t[3]=s+p);var a=e/o,p=Math.ceil(rt(t)/a),h=Math.ceil(tt(t)/a);return t[0]=n-a*p/2,t[2]=n+a*p/2,t[1]=s-a*h/2,t[3]=s+a*h/2,this.l[0]=p,this.l[1]=h,n=t,s=this.l,a=o,i=i.mb.split(":").pop(),r.SIZE=s[0]+","+s[1],r.BBOX=n.join(","),r.BBOXSR=i,r.IMAGESR=i,r.DPI=Math.round(90*a),(n=(i=this.f).replace(/MapServer\/?$/,"MapServer/export").replace(/ImageServer\/?$/,"ImageServer/exportImage"))==i&&O(!1,50),r=jw(n,r),this.M=new qd(t,e,o,this.j,r,this.R,this.g),this.I=this.i,de(this.M,"change",this.o,this),this.M},Mu.bo=function(){return this.g},Mu.eo=function(){return this.f},Mu.fo=function(t){this.M=null,this.g=t,this.s()},Mu.ho=function(t){t!=this.f&&(this.f=t,this.M=null,this.s())},Mu.io=function(t){ht(this.v,t),this.M=null,this.s()},e(Lw,Im),(Mu=Lw.prototype).ko=function(){return this.g},Mu.Jc=function(t,e,o){e=Nm(this,e),o=this.T?o:1;var i=this.M;if(i&&this.B==this.i&&i.resolution==e&&i.a==o&&N(i.G(),t))return i;1!=this.v&&at(t=t.slice(),this.v);var r,n,s,a,p,h,l,u=[rt(t)/e*o,tt(t)/e*o];return void 0!==this.I?(i=this.I,r=$(t),n=this.pa,s=rt(t),a=tt(t),p=u[0],h=u[1],l=.0254/this.l,u={OPERATION:this.va?"GETDYNAMICMAPOVERLAYIMAGE":"GETMAPIMAGE",VERSION:"2.0.0",LOCALE:"en",CLIENTAGENT:"ol.source.ImageMapGuide source",CLIP:"1",SETDISPLAYDPI:this.l,SETDISPLAYWIDTH:Math.round(u[0]),SETDISPLAYHEIGHT:Math.round(u[1]),SETVIEWSCALE:p*aOpenStreetMap contributors.'});function Uw(t){this.B=null,this.va=void 0!==t.operationType?t.operationType:"pixel",this.Sa=void 0!==t.threads?t.threads:1,this.g=function(t){for(var e=t.length,o=Array(e),i=0;ithis.fk;)this.Ed.shift().callback(null,null)},e.prototype.dh=function(){if(0===this.oe&&0Stamen Design, under CC BY 3.0.'}),Ow],Kw={terrain:{Lb:"jpg",opaque:!0},"terrain-background":{Lb:"jpg",opaque:!0},"terrain-labels":{Lb:"png",opaque:!1},"terrain-lines":{Lb:"png",opaque:!1},"toner-background":{Lb:"png",opaque:!0},toner:{Lb:"png",opaque:!0},"toner-hybrid":{Lb:"png",opaque:!1},"toner-labels":{Lb:"png",opaque:!1},"toner-lines":{Lb:"png",opaque:!1},"toner-lite":{Lb:"png",opaque:!0},watercolor:{Lb:"jpg",opaque:!0}},zw={terrain:{minZoom:4,maxZoom:18},toner:{minZoom:0,maxZoom:20},watercolor:{minZoom:1,maxZoom:16}};function Yw(t){dw.call(this,{attributions:(t=t||{}).attributions,cacheSize:t.cacheSize,crossOrigin:t.crossOrigin,logo:t.logo,projection:t.projection,reprojectionErrorThreshold:t.reprojectionErrorThreshold,tileGrid:t.tileGrid,tileLoadFunction:t.tileLoadFunction,url:t.url,urls:t.urls,wrapX:void 0===t.wrapX||t.wrapX}),this.f=t.params||{},this.l=V(),cw(this,Hw(this))}function Hw(t){var e,o=0,i=[];for(e in t.f)i[o++]=e+"-"+t.f[e];return i.join("/")}function qw(t){lw.call(this,{opaque:!1,projection:t.projection,tileGrid:t.tileGrid,wrapX:void 0===t.wrapX||t.wrapX})}function Jw(t,e,o){_d.call(this,t,2),this.c=e,this.Ia=o,this.a=null}function _w(t){var e;this.f=null,dw.call(this,{attributions:t.attributions,cacheSize:t.cacheSize,crossOrigin:t.crossOrigin,projection:Bt("EPSG:3857"),reprojectionErrorThreshold:t.reprojectionErrorThreshold,state:"loading",tileLoadFunction:t.tileLoadFunction,wrapX:void 0===t.wrapX||t.wrapX}),t.url?t.jsonp?ow(t.url,this.og.bind(this),this.Ve.bind(this)):((e=new XMLHttpRequest).addEventListener("load",this.Ao.bind(this)),e.addEventListener("error",this.zo.bind(this)),e.open("GET",t.url),e.send()):t.tileJSON?this.og(t.tileJSON):O(!1,51)}function $w(t){var e;lw.call(this,{projection:Bt("EPSG:3857"),state:"loading"}),this.v=void 0===t.preemptive||t.preemptive,this.l=sw,this.g=void 0,this.f=t.jsonp||!1,t.url?this.f?ow(t.url,this.pg.bind(this),this.We.bind(this)):((e=new XMLHttpRequest).addEventListener("load",this.Eo.bind(this)),e.addEventListener("error",this.Do.bind(this)),e.open("GET",t.url),e.send()):t.tileJSON?this.pg(t.tileJSON):O(!1,51)}function Qw(t,e,o,i,r,n){_d.call(this,t,e),this.o=o,this.a=i,this.v=r,this.c=this.j=this.g=null,this.l=n}function tx(t){var e;0==t.state&&(t.state=1,t.l?ow(t.o,t.Ji.bind(t),t.De.bind(t)):((e=new XMLHttpRequest).addEventListener("load",t.Co.bind(t)),e.addEventListener("error",t.Bo.bind(t)),e.open("GET",t.o),e.send()))}function ex(t){var e=(t=t||{}).params||{};dw.call(this,{attributions:t.attributions,cacheSize:t.cacheSize,crossOrigin:t.crossOrigin,logo:t.logo,opaque:!(!("TRANSPARENT"in e)||e.TRANSPARENT),projection:t.projection,reprojectionErrorThreshold:t.reprojectionErrorThreshold,tileGrid:t.tileGrid,tileLoadFunction:t.tileLoadFunction,url:t.url,urls:t.urls,wrapX:void 0===t.wrapX||t.wrapX}),this.C=void 0!==t.gutter?t.gutter:0,this.f=e,this.l=!0,this.B=t.serverType,this.T=void 0===t.hidpi||t.hidpi,this.R="",ix(this),this.fa=V(),nx(this),cw(this,rx(this))}function ox(t,e,o,i,r,n,s){var a=t.urls;if(a){if(s.WIDTH=o[0],s.HEIGHT=o[1],s[t.l?"CRS":"SRS"]=n.mb,"STYLES"in t.f||(s.STYLES=""),1!=r)switch(t.B){case"geoserver":o=90*r+.5|0,s.FORMAT_OPTIONS="FORMAT_OPTIONS"in s?s.FORMAT_OPTIONS+";dpi:"+o:"dpi:"+o;break;case"mapserver":s.MAP_RESOLUTION=90*r;break;case"carmentaserver":case"qgis":s.DPI=90*r;break;default:O(!1,52)}return n=n.b,t.l&&"ne"==n.substr(0,2)&&(t=i[0],i[0]=i[1],i[1]=t,t=i[2],i[2]=i[3],i[3]=t),s.BBOX=i.join(","),jw(1==a.length?a[0]:a[L((e[1]<>=1,i>>=1;break;default:O(!1,53)}n.push([1,1]),n.reverse();for(var r=[1],s=[0],i=1,o=n.length;i=e+this.b&&a.height>=o+this.b)return s={offsetX:a.x+this.b,offsetY:a.y+this.b,image:this.f},this.c[t]=s,i.call(r,this.i,a.x+this.b,a.y+this.b),e+=this.b,i=o+this.b,e=a.width-e>a.height-i?(o={x:a.x+e,y:a.y,width:a.width-e,height:a.height},{x:a.x,y:a.y+i,width:e,height:a.height-i}):(o={x:a.x+e,y:a.y,width:a.width-e,height:i},{x:a.x,y:a.y+i,width:a.width,height:a.height-i}),mx(this,t=n,o,e),s}return null},wx.prototype.add=function(t,e,o,i,r,n){return!(e+this.b>this.i||o+this.b>this.i)&&(i=xx(this,!1,t,e,o,i,n))?(t=xx(this,!0,t,e,o,r||w,n),{offsetX:i.offsetX,offsetY:i.offsetY,image:i.image,Zl:t.image}):null},t("ol.Attribution",he),he.prototype.getHTML=he.prototype.i,t("ol.Collection",Ne),Ne.prototype.extend=Ne.prototype.fg,Ne.prototype.getArray=Ne.prototype.tm,Ne.prototype.getLength=Ne.prototype.dc,Ne.prototype.insertAt=Ne.prototype.He,Ne.prototype.removeAt=Ne.prototype.Hg,Ne.prototype.setAt=Ne.prototype.Wp,t("ol.color.asArray",Be),t("ol.color.asString",Xe),t("ol.colorlike.asColorLike",ze),t("ol.control.defaults",ao),t("ol.coordinate.add",Ai),t("ol.coordinate.createStringXY",function(e){return function(t){return ki(t,e)}}),t("ol.coordinate.format",ji),t("ol.coordinate.rotate",Li),t("ol.coordinate.toStringHDMS",function(t,e){return t?Ti("NS",t[1],e)+" "+Ti("EW",t[0],e):""}),t("ol.coordinate.toStringXY",ki),t("ol.DeviceOrientation",fh),fh.prototype.getAlpha=fh.prototype.Fk,fh.prototype.getBeta=fh.prototype.Ik,fh.prototype.getGamma=fh.prototype.Ok,fh.prototype.getHeading=fh.prototype.um,fh.prototype.getTracking=fh.prototype.Th,fh.prototype.setTracking=fh.prototype.gg,t("ol.easing.easeIn",to),t("ol.easing.easeOut",eo),t("ol.easing.inAndOut",oo),t("ol.easing.linear",io),t("ol.easing.upAndDown",function(t){return t<.5?oo(2*t):1-oo(2*(t-.5))}),t("ol.extent.boundingExtent",P),t("ol.extent.buffer",A),t("ol.extent.containsCoordinate",T),t("ol.extent.containsExtent",N),t("ol.extent.containsXY",j),t("ol.extent.createEmpty",V),t("ol.extent.equals",Z),t("ol.extent.extend",K),t("ol.extent.getArea",q),t("ol.extent.getBottomLeft",J),t("ol.extent.getBottomRight",_),t("ol.extent.getCenter",$),t("ol.extent.getHeight",tt),t("ol.extent.getIntersection",et),t("ol.extent.getSize",function(t){return[t[2]-t[0],t[3]-t[1]]}),t("ol.extent.getTopLeft",ot),t("ol.extent.getTopRight",it),t("ol.extent.getWidth",rt),t("ol.extent.intersects",nt),t("ol.extent.isEmpty",st),t("ol.extent.applyTransform",pt),t("ol.Feature",Lh),Lh.prototype.getGeometry=Lh.prototype.V,Lh.prototype.getId=Lh.prototype.wm,Lh.prototype.getGeometryName=Lh.prototype.Qk,Lh.prototype.getStyle=Lh.prototype.xm,Lh.prototype.getStyleFunction=Lh.prototype.Lc,Lh.prototype.setGeometry=Lh.prototype.Ra,Lh.prototype.setStyle=Lh.prototype.hg,Lh.prototype.setId=Lh.prototype.jc,Lh.prototype.setGeometryName=Lh.prototype.Tc,t("ol.featureloader.xhr",Qh),t("ol.Geolocation",Gd),Gd.prototype.getAccuracy=Gd.prototype.Dk,Gd.prototype.getAccuracyGeometry=Gd.prototype.Ek,Gd.prototype.getAltitude=Gd.prototype.Gk,Gd.prototype.getAltitudeAccuracy=Gd.prototype.Hk,Gd.prototype.getHeading=Gd.prototype.ym,Gd.prototype.getPosition=Gd.prototype.zm,Gd.prototype.getProjection=Gd.prototype.Uh,Gd.prototype.getSpeed=Gd.prototype.ll,Gd.prototype.getTracking=Gd.prototype.Vh,Gd.prototype.getTrackingOptions=Gd.prototype.Gh,Gd.prototype.setProjection=Gd.prototype.Wh,Gd.prototype.setTracking=Gd.prototype.Ke,Gd.prototype.setTrackingOptions=Gd.prototype.wj,t("ol.Graticule",Wd),Wd.prototype.getMap=Wd.prototype.Cm,Wd.prototype.getMeridians=Wd.prototype.al,Wd.prototype.getParallels=Wd.prototype.hl,t("ol.has.DEVICE_PIXEL_RATIO",Co),t("ol.has.CANVAS",Ro),t("ol.has.DEVICE_ORIENTATION",Io),t("ol.has.GEOLOCATION",No),t("ol.has.TOUCH",Fo),t("ol.has.WEBGL",Go),qd.prototype.getImage=qd.prototype.Y,tv.prototype.getImage=tv.prototype.Y,t("ol.inherits",e),t("ol.interaction.defaults",On),t("ol.Kinetic",Nr),t("ol.loadingstrategy.all",ab),t("ol.loadingstrategy.bbox",function(t){return[t]}),t("ol.loadingstrategy.tile",function(i){return function(t,e){e=i.tc(e),t=ee(i,t,e);var o=[];for((e=[e,0,0])[1]=t.ca;e[1]<=t.$;++e[1])for(e[2]=t.da;e[2]<=t.ia;++e[2])o.push(i.Aa(e));return o}}),t("ol.Map",Xp),Xp.prototype.addControl=Xp.prototype.kk,Xp.prototype.addInteraction=Xp.prototype.lk,Xp.prototype.addLayer=Xp.prototype.ih,Xp.prototype.addOverlay=Xp.prototype.jh,Xp.prototype.forEachFeatureAtPixel=Xp.prototype.we,Xp.prototype.forEachLayerAtPixel=Xp.prototype.Im,Xp.prototype.hasFeatureAtPixel=Xp.prototype.Yl,Xp.prototype.getEventCoordinate=Xp.prototype.Tf,Xp.prototype.getEventPixel=Xp.prototype.xe,Xp.prototype.getTarget=Xp.prototype.ag,Xp.prototype.getTargetElement=Xp.prototype.jd,Xp.prototype.getCoordinateFromPixel=Xp.prototype.Wa,Xp.prototype.getControls=Xp.prototype.Lk,Xp.prototype.getOverlays=Xp.prototype.fl,Xp.prototype.getOverlayById=Xp.prototype.el,Xp.prototype.getInteractions=Xp.prototype.Sk,Xp.prototype.getLayerGroup=Xp.prototype.Kc,Xp.prototype.getLayers=Xp.prototype.Xh,Xp.prototype.getPixelFromCoordinate=Xp.prototype.Ja,Xp.prototype.getSize=Xp.prototype.Ob,Xp.prototype.getView=Xp.prototype.Z,Xp.prototype.getViewport=Xp.prototype.sl,Xp.prototype.renderSync=Xp.prototype.Tp,Xp.prototype.removeControl=Xp.prototype.Mp,Xp.prototype.removeInteraction=Xp.prototype.Np,Xp.prototype.removeLayer=Xp.prototype.Pp,Xp.prototype.removeOverlay=Xp.prototype.Qp,Xp.prototype.setLayerGroup=Xp.prototype.qj,Xp.prototype.setSize=Xp.prototype.Qg,Xp.prototype.setTarget=Xp.prototype.Le,Xp.prototype.setView=Xp.prototype.iq,Xp.prototype.updateSize=Xp.prototype.Ad,t("ol.Object",je),je.prototype.getKeys=je.prototype.O,je.prototype.getProperties=je.prototype.N,je.prototype.setProperties=je.prototype.H,je.prototype.unset=je.prototype.P,t("ol.Observable",Te),t("ol.Observable.unByKey",function(t){if(Array.isArray(t))for(var e=0,o=t.length;e div",this.Base.container,!0);s<=i?(this.Base.container.style.right="auto",this.Base.container.style.left=t[0]+5+"px"):(this.Base.container.style.left="auto",this.Base.container.style.right="15px"),e<=a?(this.Base.container.style.bottom="auto",this.Base.container.style.top=t[1]-10+"px"):(this.Base.container.style.top="auto",this.Base.container.style.bottom=0),c.removeClass(this.Base.container,l.hidden),n.length&&(this.submenu.lastLeft=i<2*s?"-"+s+"px":this.submenu.left,n.forEach(function(t){var e=c.getViewportSize(),n=c.offset(t),i=n.height,s=a-i;s<0&&(s=i-(e.h-n.top),t.style.top="-"+s+"px"),t.style.left=o.submenu.lastLeft}))},e.prototype.openMenu=function(t,e){this.Base.dispatchEvent({type:n,pixel:t,coordinate:e}),this.opened=!0,this.positionContainer(t)},e.prototype.closeMenu=function(){this.opened=!1,c.addClass(this.Base.container,l.hidden),this.Base.dispatchEvent({type:s})},e.prototype.setListeners=function(){this.viewport.addEventListener(this.Base.options.eventType,this.eventHandler,!1)},e.prototype.removeListeners=function(){this.viewport.removeEventListener(this.Base.options.eventType,this.eventHandler,!1)},e.prototype.handleEvent=function(e){var n=this;this.coordinateClicked=this.map.getEventCoordinate(e),this.pixelClicked=this.map.getEventPixel(e),this.Base.dispatchEvent({type:i,pixel:this.pixelClicked,coordinate:this.coordinateClicked}),this.Base.disabled||(this.Base.options.eventType===o&&(e.stopPropagation(),e.preventDefault()),this.openMenu(this.pixelClicked,this.coordinateClicked),e.target.addEventListener("mousedown",{handleEvent:function(t){n.closeMenu(),e.target.removeEventListener(t.type,this,!1)}},!1))},e.prototype.setItemListener=function(t,e){var n,i=this;t&&"function"==typeof this.items[e].callback&&(n=this.items[e].callback,t.addEventListener("click",function(t){t.preventDefault();t={coordinate:i.getCoordinateClicked(),data:i.items[e].data||null};i.closeMenu(),n(t,i.map)},!1))};function h(t){return this.Base=t,this.Base.container=this.container=this.createContainer(),this}var d;function u(t){void 0===t&&(t={}),c.assert("object"==typeof t,"@param `opt_options` should be object type!"),"default_items"in t&&(a.defaultItems=t.default_items),this.options=c.mergeOptions(a,t),this.disabled=!1,this.Internal=new e(this),this.Html=new h(this),d.call(this,{element:this.container})}return h.prototype.createContainer=function(t){var e=document.createElement("div"),n=document.createElement("ul"),i=[l.container,l.OL_unselectable];return t&&i.push(l.hidden),e.className=i.join(" "),e.style.width=parseInt(this.Base.options.width,10)+"px",e.appendChild(n),e},h.prototype.createMenu=function(){var t=[];return"items"in this.Base.options?t=this.Base.options.defaultItems?this.Base.options.items.concat(r):this.Base.options.items:this.Base.options.defaultItems&&(t=r),0!==t.length&&void t.forEach(this.addMenuEntry,this)},h.prototype.addMenuEntry=function(t){var e,n,i=this;t.items&&Array.isArray(t.items)?(t.classname=t.classname||"",c.contains(l.submenu,t.classname)||(t.classname=t.classname.length?" "+l.submenu:l.submenu),e=this.generateHtmlAndPublish(this.container,t),(n=this.createContainer()).style.left=this.Base.Internal.submenu.lastLeft||this.Base.Internal.submenu.left,e.appendChild(n),t.items.forEach(function(t){i.generateHtmlAndPublish(n,t,!0)})):this.generateHtmlAndPublish(this.container,t)},h.prototype.generateHtmlAndPublish=function(t,e,n){var i,s,o,a=!1,r=c.getUniqueId();return"string"==typeof e&&"-"===e.trim()?(i=['
  • ',"
  • "].join(""),s=c.createFragment(i),o=[].slice.call(s.childNodes,0)[0],t.firstChild.appendChild(s),a=!0):(e.classname=e.classname||"",i=""+e.text+"",s=c.createFragment(i),o=document.createElement("li"),e.icon&&(""===e.classname?e.classname=l.icon:-1===e.classname.indexOf(l.icon)&&(e.classname+=" "+l.icon),o.setAttribute("style","background-image:url("+e.icon+")")),o.id=r,o.className=e.classname,o.appendChild(s),t.firstChild.appendChild(o)),this.Base.Internal.items[r]={id:r,submenu:n||0,separator:a,callback:e.callback,data:e.data||null},this.Base.Internal.setItemListener(o,r),o},h.prototype.removeMenuEntry=function(t){var e=c.find("#"+t,this.container.firstChild);e&&this.container.firstChild.removeChild(e),delete this.Base.Internal.items[t]},h.prototype.cloneAndGetLineHeight=function(){var t=this.container.cloneNode(),e=c.createFragment("Foo"),n=c.createFragment("Foo"),i=document.createElement("li"),s=document.createElement("li");i.appendChild(e),s.appendChild(n),t.appendChild(i),t.appendChild(s),this.container.parentNode.appendChild(t);s=t.offsetHeight/2;return this.container.parentNode.removeChild(t),s},(d=ol.control.Control)&&(u.__proto__=d),((u.prototype=Object.create(d&&d.prototype)).constructor=u).prototype.clear=function(){var e=this;Object.keys(this.Internal.items).forEach(function(t){e.Html.removeMenuEntry(t)})},u.prototype.close=function(){this.Internal.closeMenu()},u.prototype.enable=function(){this.disabled=!1},u.prototype.disable=function(){this.disabled=!0},u.prototype.getDefaultItems=function(){return r},u.prototype.extend=function(t){c.assert(Array.isArray(t),"@param `arr` should be an Array."),t.forEach(this.push,this)},u.prototype.isOpened=function(){return this.isOpen()},u.prototype.isOpen=function(){return this.Internal.opened},u.prototype.updatePosition=function(t){c.assert(Array.isArray(t),"@param `pixel` should be an Array."),this.isOpen()&&this.Internal.positionContainer(t)},u.prototype.pop=function(){var t=Object.keys(this.Internal.items);this.Html.removeMenuEntry(t[t.length-1])},u.prototype.push=function(t){c.assert(c.isDefAndNotNull(t),"@param `item` must be informed."),this.Html.addMenuEntry(t)},u.prototype.shift=function(){this.Html.removeMenuEntry(Object.keys(this.Internal.items)[0])},u.prototype.setMap=function(t){ol.control.Control.prototype.setMap.call(this,t),t?this.Internal.init(t,this):this.Internal.removeListeners()},u}) \ No newline at end of file +!function(t,e){"object"==typeof exports&&"undefined"!=typeof module?module.exports=e():"function"==typeof define&&define.amd?define(e):t.ContextMenu=e()}(this,function(){"use strict";function e(t){return this.Base=t,this.map=void 0,this.viewport=void 0,this.coordinateClicked=void 0,this.pixelClicked=void 0,this.lineHeight=0,this.items={},this.opened=!1,this.submenu={left:t.options.width-15+"px",lastLeft:""},this.eventHandler=this.handleEvent.bind(this),this}var t="ol-ctx-menu",i="beforeopen",n="open",s="close",o="contextmenu",l={container:t+"-container",separator:t+"-separator",submenu:t+"-submenu",hidden:t+"-hidden",icon:t+"-icon",zoomIn:t+"-zoom-in",zoomOut:t+"-zoom-out",OL_unselectable:"ol-unselectable"},a={width:150,scrollAt:4,eventType:o,defaultItems:!0},r=[{text:"Zoom In",classname:[l.zoomIn,l.icon].join(" "),callback:function(t,e){e=e.getView();e.animate({zoom:+e.getZoom()+1,duration:700,center:t.coordinate})}},{text:"Zoom Out",classname:[l.zoomOut,l.icon].join(" "),callback:function(t,e){e=e.getView();e.animate({zoom:+e.getZoom()-1,duration:700,center:t.coordinate})}}],c={isNumeric:function(t){return/^\d+$/.test(t)},classRegex:function(t){return new RegExp("(^|\\s+) "+t+" (\\s+|$)")},addClass:function(t,e,n){var i=this;if(Array.isArray(t))t.forEach(function(t){i.addClass(t,e)});else for(var s=Array.isArray(e)?e:e.split(/\s+/),o=s.length;o--;)i.hasClass(t,s[o])||i._addClass(t,s[o],n)},_addClass:function(t,e,n){var i=this;t.classList?t.classList.add(e):t.className=(t.className+" "+e).trim(),n&&this.isNumeric(n)&&window.setTimeout(function(){i._removeClass(t,e)},n)},removeClass:function(t,e,n){var i=this;if(Array.isArray(t))t.forEach(function(t){i.removeClass(t,e,n)});else for(var s=Array.isArray(e)?e:e.split(/\s+/),o=s.length;o--;)i.hasClass(t,s[o])&&i._removeClass(t,s[o],n)},_removeClass:function(t,e,n){var i=this;t.classList?t.classList.remove(e):t.className=t.className.replace(this.classRegex(e)," ").trim(),n&&this.isNumeric(n)&&window.setTimeout(function(){i._addClass(t,e)},n)},hasClass:function(t,e){return t.classList?t.classList.contains(e):this.classRegex(e).test(t.className)},toggleClass:function(t,e){var n=this;return Array.isArray(t)?void t.forEach(function(t){n.toggleClass(t,e)}):void(t.classList?t.classList.toggle(e):this.hasClass(t,e)?this._removeClass(t,e):this._addClass(t,e))},$:function(t){return t="#"===t[0]?t.substr(1,t.length):t,document.getElementById(t)},isElement:function(t){return"HTMLElement"in window?!!t&&t instanceof HTMLElement:!!t&&"object"==typeof t&&1===t.nodeType&&!!t.nodeName},find:function(t,e,n){void 0===e&&(e=window.document);var i=Array.prototype.slice,s=[];if(/^(#?[\w-]+|\.[\w-.]+)$/.test(t))switch(t[0]){case"#":s=[this.$(t.substr(1))];break;case".":s=i.call(e.getElementsByClassName(t.substr(1).replace(/\./g," ")));break;default:s=i.call(e.getElementsByTagName(t))}else s=i.call(e.querySelectorAll(t));return n?s:s[0]},offset:function(t){var e=t.getBoundingClientRect(),n=document.documentElement;return{left:e.left+window.pageXOffset-n.clientLeft,top:e.top+window.pageYOffset-n.clientTop,width:t.offsetWidth,height:t.offsetHeight}},getViewportSize:function(){return{w:window.innerWidth||document.documentElement.clientWidth,h:window.innerHeight||document.documentElement.clientHeight}},getAllChildren:function(t,e){return[].slice.call(t.getElementsByTagName(e))},isEmpty:function(t){return!t||0===t.length},emptyArray:function(t){for(;t.length;)t.pop()},removeAllChildren:function(t){for(;t.firstChild;)t.removeChild(t.firstChild)},mergeOptions:function(t,e){var n,i,s={};for(n in t)s[n]=t[n];for(i in e)s[i]=e[i];return s},createFragment:function(t){var e=document.createDocumentFragment(),n=document.createElement("div");for(n.innerHTML=t;n.firstChild;)e.appendChild(n.firstChild);return e},contains:function(t,e){return!!~e.indexOf(t)},getUniqueId:function(){return"_"+Math.random().toString(36).substr(2,9)},isDefAndNotNull:function(t){return null!=t},assertEqual:function(t,e,n){if(t!==e)throw new Error(n+" mismatch: "+t+" != "+e)},assert:function(t,e){if(void 0===e&&(e="Assertion failed"),!t){if("undefined"!=typeof Error)throw new Error(e);throw e}}};e.prototype.init=function(t){this.map=t,this.viewport=t.getViewport(),this.setListeners(),this.Base.Html.createMenu(),this.lineHeight=0 div",this.Base.container,!0);s<=i?(this.Base.container.style.right="auto",this.Base.container.style.left=t[0]+5+"px"):(this.Base.container.style.left="auto",this.Base.container.style.right="15px"),e<=a?(this.Base.container.style.bottom="auto",this.Base.container.style.top=t[1]-10+"px"):(this.Base.container.style.top="auto",this.Base.container.style.bottom=0),c.removeClass(this.Base.container,l.hidden),n.length&&(this.submenu.lastLeft=i<2*s?"-"+s+"px":this.submenu.left,n.forEach(function(t){var e=c.getViewportSize(),n=c.offset(t),i=n.height,s=a-i;s<0&&(s=i-(e.h-n.top),t.style.top="-"+s+"px"),t.style.left=o.submenu.lastLeft}))},e.prototype.openMenu=function(t,e){this.Base.dispatchEvent({type:n,pixel:t,coordinate:e}),this.opened=!0,this.positionContainer(t)},e.prototype.closeMenu=function(){this.opened=!1,c.addClass(this.Base.container,l.hidden),this.Base.dispatchEvent({type:s})},e.prototype.setListeners=function(){this.viewport.addEventListener(this.Base.options.eventType,this.eventHandler,!1)},e.prototype.removeListeners=function(){this.viewport.removeEventListener(this.Base.options.eventType,this.eventHandler,!1)},e.prototype.handleEvent=function(e){var n=this;this.coordinateClicked=this.map.getEventCoordinate(e),this.pixelClicked=this.map.getEventPixel(e),this.Base.dispatchEvent({type:i,pixel:this.pixelClicked,coordinate:this.coordinateClicked}),this.Base.disabled||(this.Base.options.eventType===o&&(e.stopPropagation(),e.preventDefault()),this.openMenu(this.pixelClicked,this.coordinateClicked),e.target.addEventListener("mousedown",{handleEvent:function(t){n.closeMenu(),e.target.removeEventListener(t.type,this,!1)}},!1))},e.prototype.setItemListener=function(t,e){var n,i=this;t&&"function"==typeof this.items[e].callback&&(n=this.items[e].callback,t.addEventListener("click",function(t){t.preventDefault();t={coordinate:i.getCoordinateClicked(),data:i.items[e].data||null};i.closeMenu(),n(t,i.map)},!1))};function h(t){return this.Base=t,this.Base.container=this.container=this.createContainer(),this}var d;function u(t){c.assert("object"==typeof(t=void 0===t?{}:t),"@param `opt_options` should be object type!"),"default_items"in t&&(a.defaultItems=t.default_items),this.options=c.mergeOptions(a,t),this.disabled=!1,this.Internal=new e(this),this.Html=new h(this),d.call(this,{element:this.container})}return h.prototype.createContainer=function(t){var e=document.createElement("div"),n=document.createElement("ul"),i=[l.container,l.OL_unselectable];return t&&i.push(l.hidden),e.className=i.join(" "),e.style.width=parseInt(this.Base.options.width,10)+"px",e.appendChild(n),e},h.prototype.createMenu=function(){var t=[];return"items"in this.Base.options?t=this.Base.options.defaultItems?this.Base.options.items.concat(r):this.Base.options.items:this.Base.options.defaultItems&&(t=r),0!==t.length&&void t.forEach(this.addMenuEntry,this)},h.prototype.addMenuEntry=function(t){var e,n,i=this;t.items&&Array.isArray(t.items)?(t.classname=t.classname||"",c.contains(l.submenu,t.classname)||(t.classname=t.classname.length?" "+l.submenu:l.submenu),e=this.generateHtmlAndPublish(this.container,t),(n=this.createContainer()).style.left=this.Base.Internal.submenu.lastLeft||this.Base.Internal.submenu.left,e.appendChild(n),t.items.forEach(function(t){i.generateHtmlAndPublish(n,t,!0)})):this.generateHtmlAndPublish(this.container,t)},h.prototype.generateHtmlAndPublish=function(t,e,n){var i,s,o,a=!1,r=c.getUniqueId();return"string"==typeof e&&"-"===e.trim()?(i=['
  • ',"
  • "].join(""),s=c.createFragment(i),o=[].slice.call(s.childNodes,0)[0],t.firstChild.appendChild(s),a=!0):(e.classname=e.classname||"",i=""+e.text+"",s=c.createFragment(i),o=document.createElement("li"),e.icon&&(""===e.classname?e.classname=l.icon:-1===e.classname.indexOf(l.icon)&&(e.classname+=" "+l.icon),o.setAttribute("style","background-image:url("+e.icon+")")),o.id=r,o.className=e.classname,o.appendChild(s),t.firstChild.appendChild(o)),this.Base.Internal.items[r]={id:r,submenu:n||0,separator:a,callback:e.callback,data:e.data||null},this.Base.Internal.setItemListener(o,r),o},h.prototype.removeMenuEntry=function(t){var e=c.find("#"+t,this.container.firstChild);e&&this.container.firstChild.removeChild(e),delete this.Base.Internal.items[t]},h.prototype.cloneAndGetLineHeight=function(){var t=this.container.cloneNode(),e=c.createFragment("Foo"),n=c.createFragment("Foo"),i=document.createElement("li"),s=document.createElement("li");i.appendChild(e),s.appendChild(n),t.appendChild(i),t.appendChild(s),this.container.parentNode.appendChild(t);s=t.offsetHeight/2;return this.container.parentNode.removeChild(t),s},(d=ol.control.Control)&&(u.__proto__=d),((u.prototype=Object.create(d&&d.prototype)).constructor=u).prototype.clear=function(){var e=this;Object.keys(this.Internal.items).forEach(function(t){e.Html.removeMenuEntry(t)})},u.prototype.close=function(){this.Internal.closeMenu()},u.prototype.enable=function(){this.disabled=!1},u.prototype.disable=function(){this.disabled=!0},u.prototype.getDefaultItems=function(){return r},u.prototype.extend=function(t){c.assert(Array.isArray(t),"@param `arr` should be an Array."),t.forEach(this.push,this)},u.prototype.isOpened=function(){return this.isOpen()},u.prototype.isOpen=function(){return this.Internal.opened},u.prototype.updatePosition=function(t){c.assert(Array.isArray(t),"@param `pixel` should be an Array."),this.isOpen()&&this.Internal.positionContainer(t)},u.prototype.pop=function(){var t=Object.keys(this.Internal.items);this.Html.removeMenuEntry(t[t.length-1])},u.prototype.push=function(t){c.assert(c.isDefAndNotNull(t),"@param `item` must be informed."),this.Html.addMenuEntry(t)},u.prototype.shift=function(){this.Html.removeMenuEntry(Object.keys(this.Internal.items)[0])},u.prototype.setMap=function(t){ol.control.Control.prototype.setMap.call(this,t),t?this.Internal.init(t,this):this.Internal.removeListeners()},u}) \ No newline at end of file diff --git a/public/scripts/xterm-min.js b/public/scripts/xterm-min.js index 268747a7..fc6c66b9 100644 --- a/public/scripts/xterm-min.js +++ b/public/scripts/xterm-min.js @@ -1 +1 @@ -!function(e,t){if("object"==typeof exports&&"object"==typeof module)module.exports=t();else if("function"==typeof define&&define.amd)define([],t);else{var i,r=t();for(i in r)("object"==typeof exports?exports:e)[i]=r[i]}}(window,function(){return r={},n.m=i=[function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0});i=i(14);t.IBufferService=i.createDecorator("BufferService"),t.ICoreMouseService=i.createDecorator("CoreMouseService"),t.ICoreService=i.createDecorator("CoreService"),t.ICharsetService=i.createDecorator("CharsetService"),t.IDirtyRowService=i.createDecorator("DirtyRowService"),t.IInstantiationService=i.createDecorator("InstantiationService"),t.ILogService=i.createDecorator("LogService"),t.IOptionsService=i.createDecorator("OptionsService"),t.IUnicodeService=i.createDecorator("UnicodeService")},function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=(Object.defineProperty(n.prototype,"event",{get:function(){var i=this;return this._event||(this._event=function(t){return i._listeners.push(t),{dispose:function(){if(!i._disposed)for(var e=0;e>22},c.prototype.getChars=function(){return 2097152&this.content?this.combinedData:2097151&this.content?s.stringFromCodePoint(2097151&this.content):""},c.prototype.getCode=function(){return this.isCombined()?this.combinedData.charCodeAt(this.combinedData.length-1):2097151&this.content},c.prototype.setFromCharData=function(e){this.fg=e[a.CHAR_DATA_ATTR_INDEX],this.bg=0;var t,i,r=!1;2>>16&255,e>>>8&255,255&e]},n.fromColorRGB=function(e){return(255&e[0])<<16|(255&e[1])<<8|255&e[2]},n.prototype.clone=function(){var e=new n;return e.fg=this.fg,e.bg=this.bg,e},n.prototype.isInverse=function(){return 67108864&this.fg},n.prototype.isBold=function(){return 134217728&this.fg},n.prototype.isUnderline=function(){return 268435456&this.fg},n.prototype.isBlink=function(){return 536870912&this.fg},n.prototype.isInvisible=function(){return 1073741824&this.fg},n.prototype.isItalic=function(){return 67108864&this.bg},n.prototype.isDim=function(){return 134217728&this.bg},n.prototype.getFgColorMode=function(){return 50331648&this.fg},n.prototype.getBgColorMode=function(){return 50331648&this.bg},n.prototype.isFgRGB=function(){return 50331648==(50331648&this.fg)},n.prototype.isBgRGB=function(){return 50331648==(50331648&this.bg)},n.prototype.isFgPalette=function(){return 16777216==(50331648&this.fg)||33554432==(50331648&this.fg)},n.prototype.isBgPalette=function(){return 16777216==(50331648&this.bg)||33554432==(50331648&this.bg)},n.prototype.isFgDefault=function(){return 0==(50331648&this.fg)},n.prototype.isBgDefault=function(){return 0==(50331648&this.bg)},n.prototype.isAttributeDefault=function(){return 0===this.fg&&0===this.bg},n.prototype.getFgColor=function(){switch(50331648&this.fg){case 16777216:case 33554432:return 255&this.fg;case 50331648:return 16777215&this.fg;default:return-1}},n.prototype.getBgColor=function(){switch(50331648&this.bg){case 16777216:case 33554432:return 255&this.bg;case 50331648:return 16777215&this.bg;default:return-1}},n);function n(){this.fg=0,this.bg=0}t.AttributeData=r},function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.stringFromCodePoint=function(e){return 65535>10))+String.fromCharCode(e%1024+56320)):String.fromCharCode(e)},t.utf32ToString=function(e,t,i){void 0===t&&(t=0),void 0===i&&(i=e.length);for(var r="",n=t;n>10))+String.fromCharCode(o%1024+56320)):r+=String.fromCharCode(o)}return r};var r=(n.prototype.clear=function(){this._interim=0},n.prototype.decode=function(e,t){var i=e.length;if(!i)return 0;var r=0,n=0;this._interim&&(56320<=(s=e.charCodeAt(n++))&&s<=57343?t[r++]=1024*(this._interim-55296)+s-56320+65536:(t[r++]=this._interim,t[r++]=s),this._interim=0);for(var o=n;o=i)return this._interim=a,r;56320<=(s=e.charCodeAt(o))&&s<=57343?t[r++]=1024*(a-55296)+s-56320+65536:(t[r++]=a,t[r++]=s)}else t[r++]=a}return r},n);function n(){this._interim=0}t.StringToUtf32=r;o.prototype.clear=function(){this.interim.fill(0)},o.prototype.decode=function(e,t){var i=e.length;if(!i)return 0;var r,n,o,s,a=0,c=0,l=0;if(this.interim[0]){var h=!1,u=this.interim[0];u&=192==(224&u)?31:224==(240&u)?15:7;for(var f=0,_=void 0;(_=63&this.interim[++f])&&f<4;)u<<=6,u|=_;for(var d=192==(224&this.interim[0])?2:224==(240&this.interim[0])?3:4,p=d-f;l>24&255,n=e>>16&255,o=e>>8&255,s=t>>24&255,a=t>>16&255,c=t>>8&255,l=u(h.relativeLuminance2(s,c,a),h.relativeLuminance2(r,n,o));l>>0}function c(e,t,i){for(var r=e>>24&255,n=e>>16&255,o=e>>8&255,s=t>>24&255,a=t>>16&255,c=t>>8&255,l=u(h.relativeLuminance2(s,c,a),h.relativeLuminance2(r,n,o));l>>0}function l(e,t,i){e/=255,t/=255,i/=255;return.2126*(e<=.03928?e/12.92:Math.pow((.055+e)/1.055,2.4))+.7152*(t<=.03928?t/12.92:Math.pow((.055+t)/1.055,2.4))+.0722*(i<=.03928?i/12.92:Math.pow((.055+i)/1.055,2.4))}Object.defineProperty(t,"__esModule",{value:!0}),(r=a=t.channels||(t.channels={})).toCss=function(e,t,i,r){return void 0!==r?"#"+o(e)+o(t)+o(i)+o(r):"#"+o(e)+o(t)+o(i)},r.toRgba=function(e,t,i,r){return(e<<24|t<<16|i<<8|(r=void 0===r?255:r))>>>0},(r=t.color||(t.color={})).blend=function(e,t){var i=(255&t.rgba)/255;if(1==i)return{css:t.css,rgba:t.rgba};var r=t.rgba>>24&255,n=t.rgba>>16&255,o=t.rgba>>8&255,s=e.rgba>>24&255,t=e.rgba>>16&255,e=e.rgba>>8&255,s=s+Math.round((r-s)*i),t=t+Math.round((n-t)*i),i=e+Math.round((o-e)*i);return{css:a.toCss(s,t,i),rgba:a.toRgba(s,t,i)}},r.ensureContrastRatio=function(e,t,i){i=n.ensureContrastRatio(e.rgba,t.rgba,i);if(i)return n.toColor(i>>24&255,i>>16&255,i>>8&255)},r.opaque=function(e){var t=(255|e.rgba)>>>0,i=n.toChannels(t),r=i[0],e=i[1],i=i[2];return{css:a.toCss(r,e,i),rgba:t}},(t.css||(t.css={})).toColor=function(e){return{css:e,rgba:(parseInt(e.slice(1),16)<<8|255)>>>0}},(r=h=t.rgb||(t.rgb={})).relativeLuminance=function(e){return l(e>>16&255,e>>8&255,255&e)},r.relativeLuminance2=l,(r=n=t.rgba||(t.rgba={})).ensureContrastRatio=function(e,t,i){var r=h.relativeLuminance(e>>8),n=h.relativeLuminance(t>>8);if(u(r,n)>24&255,e>>16&255,e>>8&255,255&e]},r.toColor=function(e,t,i){return{css:a.toCss(e,t,i),rgba:a.toRgba(e,t,i)}},t.toPaddedHex=o,t.contrastRatio=u},function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r="undefined"==typeof navigator,n=r?"node":navigator.userAgent,r=r?"node":navigator.platform;function o(e,t){return 0<=e.indexOf(t)}t.isFirefox=!!~n.indexOf("Firefox"),t.isSafari=/^((?!chrome|android).)*safari/i.test(n),t.isMac=o(["Macintosh","MacIntel","MacPPC","Mac68K"],r),t.isIpad="iPad"===r,t.isIphone="iPhone"===r,t.isWindows=o(["Windows","Win16","Win32","WinCE"],r),t.isLinux=0<=r.indexOf("Linux")},function(e,t,i){"use strict";var r;Object.defineProperty(t,"__esModule",{value:!0}),(r=t.C0||(t.C0={})).NUL="\0",r.SOH="",r.STX="",r.ETX="",r.EOT="",r.ENQ="",r.ACK="",r.BEL="",r.BS="\b",r.HT="\t",r.LF="\n",r.VT="\v",r.FF="\f",r.CR="\r",r.SO="",r.SI="",r.DLE="",r.DC1="",r.DC2="",r.DC3="",r.DC4="",r.NAK="",r.SYN="",r.ETB="",r.CAN="",r.EM="",r.SUB="",r.ESC="",r.FS="",r.GS="",r.RS="",r.US="",r.SP=" ",r.DEL="",(t=t.C1||(t.C1={})).PAD="€",t.HOP="",t.BPH="‚",t.NBH="ƒ",t.IND="„",t.NEL="…",t.SSA="†",t.ESA="‡",t.HTS="ˆ",t.HTJ="‰",t.VTS="Š",t.PLD="‹",t.PLU="Œ",t.RI="",t.SS2="Ž",t.SS3="",t.DCS="",t.PU1="‘",t.PU2="’",t.STS="“",t.CCH="”",t.MW="•",t.SPA="–",t.EPA="—",t.SOS="˜",t.SGCI="™",t.SCI="š",t.CSI="›",t.ST="œ",t.OSC="",t.PM="ž",t.APC="Ÿ"},function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var s=i(3),a=i(9),r=i(23),o=i(6),n=i(26),c=i(10),i=(l.prototype.dispose=function(){var e;this._container.removeChild(this._canvas),null===(e=this._charAtlas)||void 0===e||e.dispose()},l.prototype._initCanvas=function(){this._ctx=n.throwIfFalsy(this._canvas.getContext("2d",{alpha:this._alpha})),this._alpha||this._clearAll()},l.prototype.onOptionsChanged=function(){},l.prototype.onBlur=function(){},l.prototype.onFocus=function(){},l.prototype.onCursorMove=function(){},l.prototype.onGridChanged=function(e,t){},l.prototype.onSelectionChanged=function(e,t,i){void 0===i&&(i=!1)},l.prototype.setColors=function(e){this._refreshCharAtlas(e)},l.prototype._setTransparency=function(e){var t;e!==this._alpha&&(t=this._canvas,this._alpha=e,this._canvas=this._canvas.cloneNode(),this._initCanvas(),this._container.replaceChild(this._canvas,t),this._refreshCharAtlas(this._colors),this.onGridChanged(0,this._bufferService.rows-1))},l.prototype._refreshCharAtlas=function(e){this._scaledCharWidth<=0&&this._scaledCharHeight<=0||(this._charAtlas=r.acquireCharAtlas(this._optionsService.options,this._rendererId,e,this._scaledCharWidth,this._scaledCharHeight),this._charAtlas.warmUp())},l.prototype.resize=function(e){this._scaledCellWidth=e.scaledCellWidth,this._scaledCellHeight=e.scaledCellHeight,this._scaledCharWidth=e.scaledCharWidth,this._scaledCharHeight=e.scaledCharHeight,this._scaledCharLeft=e.scaledCharLeft,this._scaledCharTop=e.scaledCharTop,this._canvas.width=e.scaledCanvasWidth,this._canvas.height=e.scaledCanvasHeight,this._canvas.style.width=e.canvasWidth+"px",this._canvas.style.height=e.canvasHeight+"px",this._alpha||this._clearAll(),this._refreshCharAtlas(this._colors)},l.prototype._fillCells=function(e,t,i,r){this._ctx.fillRect(e*this._scaledCellWidth,t*this._scaledCellHeight,i*this._scaledCellWidth,r*this._scaledCellHeight)},l.prototype._fillBottomLineAtCells=function(e,t,i){void 0===i&&(i=1),this._ctx.fillRect(e*this._scaledCellWidth,(t+1)*this._scaledCellHeight-window.devicePixelRatio-1,i*this._scaledCellWidth,window.devicePixelRatio)},l.prototype._fillLeftLineAtCell=function(e,t,i){this._ctx.fillRect(e*this._scaledCellWidth,t*this._scaledCellHeight,window.devicePixelRatio*i,this._scaledCellHeight)},l.prototype._strokeRectAtCell=function(e,t,i,r){this._ctx.lineWidth=window.devicePixelRatio,this._ctx.strokeRect(e*this._scaledCellWidth+window.devicePixelRatio/2,t*this._scaledCellHeight+window.devicePixelRatio/2,i*this._scaledCellWidth-window.devicePixelRatio,r*this._scaledCellHeight-window.devicePixelRatio)},l.prototype._clearAll=function(){this._alpha?this._ctx.clearRect(0,0,this._canvas.width,this._canvas.height):(this._ctx.fillStyle=this._colors.background.css,this._ctx.fillRect(0,0,this._canvas.width,this._canvas.height))},l.prototype._clearCells=function(e,t,i,r){this._alpha?this._ctx.clearRect(e*this._scaledCellWidth,t*this._scaledCellHeight,i*this._scaledCellWidth,r*this._scaledCellHeight):(this._ctx.fillStyle=this._colors.background.css,this._ctx.fillRect(e*this._scaledCellWidth,t*this._scaledCellHeight,i*this._scaledCellWidth,r*this._scaledCellHeight))},l.prototype._fillCharTrueColor=function(e,t,i){this._ctx.font=this._getFont(!1,!1),this._ctx.textBaseline="middle",this._clipRow(i),this._ctx.fillText(e.getChars(),t*this._scaledCellWidth+this._scaledCharLeft,i*this._scaledCellHeight+this._scaledCharTop+this._scaledCharHeight/2)},l.prototype._drawChars=function(e,t,i){var r,n,o=this._getContrastColor(e);o||e.isFgRGB()||e.isBgRGB()?this._drawUncachedChars(e,t,i,o):(e.isInverse()?(r=e.isBgDefault()?a.INVERTED_DEFAULT_COLOR:e.getBgColor(),n=e.isFgDefault()?a.INVERTED_DEFAULT_COLOR:e.getFgColor()):(n=e.isBgDefault()?s.DEFAULT_COLOR:e.getBgColor(),r=e.isFgDefault()?s.DEFAULT_COLOR:e.getFgColor()),r+=this._optionsService.options.drawBoldTextInBrightColors&&e.isBold()&&r<8?8:0,this._currentGlyphIdentifier.chars=e.getChars()||s.WHITESPACE_CELL_CHAR,this._currentGlyphIdentifier.code=e.getCode()||s.WHITESPACE_CELL_CODE,this._currentGlyphIdentifier.bg=n,this._currentGlyphIdentifier.fg=r,this._currentGlyphIdentifier.bold=!!e.isBold(),this._currentGlyphIdentifier.dim=!!e.isDim(),this._currentGlyphIdentifier.italic=!!e.isItalic(),this._charAtlas&&this._charAtlas.draw(this._ctx,this._currentGlyphIdentifier,t*this._scaledCellWidth+this._scaledCharLeft,i*this._scaledCellHeight+this._scaledCharTop)||this._drawUncachedChars(e,t,i))},l.prototype._drawUncachedChars=function(e,t,i,r){var n;this._ctx.save(),this._ctx.font=this._getFont(!!e.isBold(),!!e.isItalic()),this._ctx.textBaseline="middle",e.isInverse()?r?this._ctx.fillStyle=r.css:e.isBgDefault()?this._ctx.fillStyle=c.color.opaque(this._colors.background).css:e.isBgRGB()?this._ctx.fillStyle="rgb("+o.AttributeData.toColorRGB(e.getBgColor()).join(",")+")":(n=e.getBgColor(),this._optionsService.options.drawBoldTextInBrightColors&&e.isBold()&&n<8&&(n+=8),this._ctx.fillStyle=this._colors.ansi[n].css):r?this._ctx.fillStyle=r.css:e.isFgDefault()?this._ctx.fillStyle=this._colors.foreground.css:e.isFgRGB()?this._ctx.fillStyle="rgb("+o.AttributeData.toColorRGB(e.getFgColor()).join(",")+")":(r=e.getFgColor(),this._optionsService.options.drawBoldTextInBrightColors&&e.isBold()&&r<8&&(r+=8),this._ctx.fillStyle=this._colors.ansi[r].css),this._clipRow(i),e.isDim()&&(this._ctx.globalAlpha=a.DIM_OPACITY),this._ctx.fillText(e.getChars(),t*this._scaledCellWidth+this._scaledCharLeft,i*this._scaledCellHeight+this._scaledCharTop+this._scaledCharHeight/2),this._ctx.restore()},l.prototype._clipRow=function(e){this._ctx.beginPath(),this._ctx.rect(0,e*this._scaledCellHeight,this._bufferService.cols*this._scaledCellWidth,this._scaledCellHeight),this._ctx.clip()},l.prototype._getFont=function(e,t){return(t?"italic":"")+" "+(e?this._optionsService.options.fontWeightBold:this._optionsService.options.fontWeight)+" "+this._optionsService.options.fontSize*window.devicePixelRatio+"px "+this._optionsService.options.fontFamily},l.prototype._getContrastColor=function(e){if(1!==this._optionsService.options.minimumContrastRatio){var t=this._colors.contrastCache.getColor(e.bg,e.fg);if(void 0!==t)return t||void 0;var i=e.getFgColor(),r=e.getFgColorMode(),n=e.getBgColor(),o=e.getBgColorMode(),s=!!e.isInverse(),a=!!e.isInverse();s&&(t=i,i=n,n=t,t=r,r=o,o=t);n=this._resolveBackgroundRgba(o,n,s),a=this._resolveForegroundRgba(r,i,s,a),a=c.rgba.ensureContrastRatio(n,a,this._optionsService.options.minimumContrastRatio);if(a){a={css:c.channels.toCss(a>>24&255,a>>16&255,a>>8&255),rgba:a};return this._colors.contrastCache.setColor(e.bg,e.fg,a),a}this._colors.contrastCache.setColor(e.bg,e.fg,null)}},l.prototype._resolveBackgroundRgba=function(e,t,i){switch(e){case 16777216:case 33554432:return this._colors.ansi[t].rgba;case 50331648:return t<<8;case 0:default:return(i?this._colors.foreground:this._colors.background).rgba}},l.prototype._resolveForegroundRgba=function(e,t,i,r){switch(e){case 16777216:case 33554432:return this._optionsService.options.drawBoldTextInBrightColors&&r&&t<8&&(t+=8),this._colors.ansi[t].rgba;case 50331648:return t<<8;case 0:default:return(i?this._colors.background:this._colors.foreground).rgba}},l);function l(e,t,i,r,n,o,s,a){this._container=e,this._alpha=r,this._colors=n,this._rendererId=o,this._bufferService=s,this._optionsService=a,this._scaledCharWidth=0,this._scaledCharHeight=0,this._scaledCellWidth=0,this._scaledCellHeight=0,this._scaledCharLeft=0,this._scaledCharTop=0,this._currentGlyphIdentifier={chars:"",code:0,bg:0,fg:0,bold:!1,dim:!1,italic:!1},this._canvas=document.createElement("canvas"),this._canvas.classList.add("xterm-"+t+"-layer"),this._canvas.style.zIndex=i.toString(),this._initCanvas(),this._container.appendChild(this._canvas)}t.BaseRenderLayer=i},function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var o="di$target",s="di$dependencies";t.serviceRegistry=new Map,t.getServiceDependencies=function(e){return e[s]||[]},t.createDecorator=function(e){if(t.serviceRegistry.has(e))return t.serviceRegistry.get(e);var n=function(e,t,i){if(3!==arguments.length)throw new Error("@IServiceName-decorator can only be used to decorate a parameter");var r;r=n,i=i,(e=e)[o]===e?e[s].push({id:r,index:i}):(e[s]=[{id:r,index:i}],e[o]=e)};return n.toString=function(){return e},t.serviceRegistry.set(e,n),n}},function(e,t,i){"use strict";function n(e,t,i,r){if(void 0===i&&(i=0),void 0===r&&(r=e.length),i>=e.length)return e;i=(e.length+i)%e.length,r=r>=e.length?e.length:(e.length+r)%e.length;for(var n=i;n>22,2097152&t?this._combined[e].charCodeAt(this._combined[e].length-1):i]},r.prototype.set=function(e,t){this._data[3*e+1]=t[a.CHAR_DATA_ATTR_INDEX],1>22},r.prototype.hasWidth=function(e){return 12582912&this._data[3*e+0]},r.prototype.getFg=function(e){return this._data[3*e+1]},r.prototype.getBg=function(e){return this._data[3*e+2]},r.prototype.hasContent=function(e){return 4194303&this._data[3*e+0]},r.prototype.getCodePoint=function(e){var t=this._data[3*e+0];return 2097152&t?this._combined[e].charCodeAt(this._combined[e].length-1):2097151&t},r.prototype.isCombined=function(e){return 2097152&this._data[3*e+0]},r.prototype.getString=function(e){var t=this._data[3*e+0];return 2097152&t?this._combined[e]:2097151&t?s.stringFromCodePoint(2097151&t):""},r.prototype.loadCell=function(e,t){var i=3*e;return t.content=this._data[0+i],t.fg=this._data[1+i],t.bg=this._data[2+i],2097152&t.content&&(t.combinedData=this._combined[e]),t},r.prototype.setCell=function(e,t){2097152&t.content&&(this._combined[e]=t.combinedData),this._data[3*e+0]=t.content,this._data[3*e+1]=t.fg,this._data[3*e+2]=t.bg},r.prototype.setCellFromCodePoint=function(e,t,i,r,n){this._data[3*e+0]=t|i<<22,this._data[3*e+1]=r,this._data[3*e+2]=n},r.prototype.addCodepointToCell=function(e,t){var i=this._data[3*e+0];2097152&i?this._combined[e]+=s.stringFromCodePoint(t):(2097151&i?(this._combined[e]=s.stringFromCodePoint(2097151&i)+s.stringFromCodePoint(t),i&=-2097152,i|=2097152):i=t|1<<22,this._data[3*e+0]=i)},r.prototype.insertCells=function(e,t,i,r){if((e%=this.length)&&2===this.getWidth(e-1)&&this.setCellFromCodePoint(e-1,0,1,(null===r||void 0===r?void 0:r.fg)||0,(null===r||void 0===r?void 0:r.bg)||0),tthis.length){var i=new Uint32Array(3*e);this.length&&(3*e>22);return 0},r.prototype.copyCellsFrom=function(e,t,i,r,n){var o=e._data;if(n)for(var s=r-1;0<=s;s--)for(var a=0;a<3;a++)this._data[3*(i+s)+a]=o[3*(t+s)+a];else for(s=0;s>22||1}return r},i=r;function r(e,t,i){void 0===i&&(i=!1),this.isWrapped=i,this._combined={},this._data=new Uint32Array(3*e);for(var r=t||c.CellData.fromCharData([0,a.NULL_CELL_CHAR,a.NULL_CELL_WIDTH,a.NULL_CELL_CODE]),n=0;n>8,r=255&this._subParamsIdx[t];0=this.maxLength)this._rejectDigits=!0;else{if(e<-1)throw new Error("values lesser than -1 are not allowed");this._subParamsIdx[this.length]=this._subParamsLength<<8|this._subParamsLength,this.params[this.length++]=2147483647=this.maxSubParamsLength)this._rejectSubDigits=!0;else{if(e<-1)throw new Error("values lesser than -1 are not allowed");this._subParams[this._subParamsLength++]=2147483647>8)},o.prototype.getSubParams=function(e){var t=this._subParamsIdx[e]>>8,e=255&this._subParamsIdx[e];return 0>8,r=255&this._subParamsIdx[t];0r.PAYLOAD_LIMIT&&(this._data="",this._hitLimit=!0))},s.prototype.end=function(e){var t;return this._hitLimit?t=!1:e&&(t=this._handler(this._data)),this._data="",this._hitLimit=!1,t},i=s;function s(e){this._handler=e,this._data="",this._hitLimit=!1}t.OscHandler=i},function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.PAYLOAD_LIMIT=1e7},function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=i(7),r=i(19),o=i(21),s=[],i=(a.prototype.dispose=function(){this._handlers=Object.create(null),this._handlerFb=function(){}},a.prototype.addHandler=function(e,t){void 0===this._handlers[e]&&(this._handlers[e]=[]);var i=this._handlers[e];return i.push(t),{dispose:function(){var e=i.indexOf(t);-1!==e&&i.splice(e,1)}}},a.prototype.setHandler=function(e,t){this._handlers[e]=[t]},a.prototype.clearHandler=function(e){this._handlers[e]&&delete this._handlers[e]},a.prototype.setHandlerFallback=function(e){this._handlerFb=e},a.prototype.reset=function(){this._active.length&&this.unhook(!1),this._active=s,this._ident=0},a.prototype.hook=function(e,t){if(this.reset(),this._ident=e,this._active=this._handlers[e]||s,this._active.length)for(var i=this._active.length-1;0<=i;i--)this._active[i].hook(t);else this._handlerFb(this._ident,"HOOK",t)},a.prototype.put=function(e,t,i){if(this._active.length)for(var r=this._active.length-1;0<=r;r--)this._active[r].put(e,t,i);else this._handlerFb(this._ident,"PUT",n.utf32ToString(e,t,i))},a.prototype.unhook=function(e){if(this._active.length){for(var t=this._active.length-1;0<=t&&!1===this._active[t].unhook(e);t--);for(t--;0<=t;t--)this._active[t].unhook(!1)}else this._handlerFb(this._ident,"UNHOOK",e);this._active=s,this._ident=0},a);function a(){this._handlers=Object.create(null),this._active=s,this._ident=0,this._handlerFb=function(){}}t.DcsParser=i;c.prototype.hook=function(e){this._params=e.clone(),this._data="",this._hitLimit=!1},c.prototype.put=function(e,t,i){this._hitLimit||(this._data+=n.utf32ToString(e,t,i),this._data.length>o.PAYLOAD_LIMIT&&(this._data="",this._hitLimit=!0))},c.prototype.unhook=function(e){var t;return this._hitLimit?t=!1:e&&(t=this._handler(this._data,this._params||new r.Params)),this._params=void 0,this._data="",this._hitLimit=!1,t},i=c;function c(e){this._handler=e,this._data="",this._hitLimit=!1}t.DcsHandler=i},function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var l=i(24),h=i(42),u=[];t.acquireCharAtlas=function(e,t,i,r,n){for(var o=l.generateConfig(r,n,e,i),s=0;s=this._line.length))return t?(this._line.loadCell(e,t),t):this._line.loadCell(e,new r.CellData)},d.prototype.translateToString=function(e,t,i){return this._line.translateToString(e,t,i)},d),h=(_.prototype.registerCsiHandler=function(e,t){return this._core.addCsiHandler(e,function(e){return t(e.toArray())})},_.prototype.addCsiHandler=function(e,t){return this.registerCsiHandler(e,t)},_.prototype.registerDcsHandler=function(e,i){return this._core.addDcsHandler(e,function(e,t){return i(e,t.toArray())})},_.prototype.addDcsHandler=function(e,t){return this.registerDcsHandler(e,t)},_.prototype.registerEscHandler=function(e,t){return this._core.addEscHandler(e,t)},_.prototype.addEscHandler=function(e,t){return this.registerEscHandler(e,t)},_.prototype.registerOscHandler=function(e,t){return this._core.addOscHandler(e,t)},_.prototype.addOscHandler=function(e,t){return this.registerOscHandler(e,t)},_),u=(f.prototype.register=function(e){this._core.unicodeService.register(e)},Object.defineProperty(f.prototype,"versions",{get:function(){return this._core.unicodeService.versions},enumerable:!0,configurable:!0}),Object.defineProperty(f.prototype,"activeVersion",{get:function(){return this._core.unicodeService.activeVersion},set:function(e){this._core.unicodeService.activeVersion=e},enumerable:!0,configurable:!0}),f);function f(e){this._core=e}function _(e){this._core=e}function d(e){this._line=e}function p(e){this._buffer=e}},function(e,t,i){"use strict";var r,n=this&&this.__extends||(r=function(e,t){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var i in t)t.hasOwnProperty(i)&&(e[i]=t[i])})(e,t)},function(e,t){function i(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(i.prototype=t.prototype,new i)});Object.defineProperty(t,"__esModule",{value:!0});var o,s=i(34),a=i(35),c=i(36),h=i(12),l=i(37),u=i(39),f=i(49),_=i(50),d=i(11),p=i(8),v=i(17),g=i(53),y=i(54),b=i(55),m=i(56),S=i(58),C=i(1),w=i(16),E=i(59),L=i(25),A=i(60),R=i(0),x=i(61),k=i(4),D=i(62),T=i(63),O=i(2),M=i(69),P=i(70),H=i(71),I=i(72),B=i(73),F=i(74),j=i(75),W=i(76),q=i(77),U=i(79),N="undefined"!=typeof window?window.document:null,n=(o=O.Disposable,n(z,o),Object.defineProperty(z.prototype,"options",{get:function(){return this.optionsService.options},enumerable:!0,configurable:!0}),Object.defineProperty(z.prototype,"cols",{get:function(){return this._bufferService.cols},enumerable:!0,configurable:!0}),Object.defineProperty(z.prototype,"rows",{get:function(){return this._bufferService.rows},enumerable:!0,configurable:!0}),Object.defineProperty(z.prototype,"onCursorMove",{get:function(){return this._onCursorMove.event},enumerable:!0,configurable:!0}),Object.defineProperty(z.prototype,"onData",{get:function(){return this._onData.event},enumerable:!0,configurable:!0}),Object.defineProperty(z.prototype,"onBinary",{get:function(){return this._onBinary.event},enumerable:!0,configurable:!0}),Object.defineProperty(z.prototype,"onKey",{get:function(){return this._onKey.event},enumerable:!0,configurable:!0}),Object.defineProperty(z.prototype,"onLineFeed",{get:function(){return this._onLineFeed.event},enumerable:!0,configurable:!0}),Object.defineProperty(z.prototype,"onRender",{get:function(){return this._onRender.event},enumerable:!0,configurable:!0}),Object.defineProperty(z.prototype,"onResize",{get:function(){return this._onResize.event},enumerable:!0,configurable:!0}),Object.defineProperty(z.prototype,"onScroll",{get:function(){return this._onScroll.event},enumerable:!0,configurable:!0}),Object.defineProperty(z.prototype,"onSelectionChange",{get:function(){return this._onSelectionChange.event},enumerable:!0,configurable:!0}),Object.defineProperty(z.prototype,"onTitleChange",{get:function(){return this._onTitleChange.event},enumerable:!0,configurable:!0}),Object.defineProperty(z.prototype,"onFocus",{get:function(){return this._onFocus.event},enumerable:!0,configurable:!0}),Object.defineProperty(z.prototype,"onBlur",{get:function(){return this._onBlur.event},enumerable:!0,configurable:!0}),Object.defineProperty(z.prototype,"onA11yChar",{get:function(){return this.onA11yCharEmitter.event},enumerable:!0,configurable:!0}),Object.defineProperty(z.prototype,"onA11yTab",{get:function(){return this.onA11yTabEmitter.event},enumerable:!0,configurable:!0}),z.prototype.dispose=function(){var e;this._isDisposed||(o.prototype.dispose.call(this),null===(e=this._windowsMode)||void 0===e||e.dispose(),this._windowsMode=void 0,null===(e=this._renderService)||void 0===e||e.dispose(),this._customKeyEventHandler=null,this.write=function(){},null===(e=null===(e=this.element)||void 0===e?void 0:e.parentNode)||void 0===e||e.removeChild(this.element))},z.prototype._setup=function(){var i=this;this._customKeyEventHandler=null,this.insertMode=!1,this.bracketedPasteMode=!1,this._userScrolling=!1,this._inputHandler?this._inputHandler.reset():(this._inputHandler=new l.InputHandler(this,this._bufferService,this._charsetService,this._coreService,this._dirtyRowService,this._logService,this.optionsService,this._coreMouseService,this.unicodeService,this._instantiationService),this._inputHandler.onRequestBell(function(){return i.bell()}),this._inputHandler.onRequestRefreshRows(function(e,t){return i.refresh(e,t)}),this._inputHandler.onRequestReset(function(){return i.reset()}),this._inputHandler.onCursorMove(function(){return i._onCursorMove.fire()}),this._inputHandler.onLineFeed(function(){return i._onLineFeed.fire()}),this.register(this._inputHandler)),this.linkifier||(this.linkifier=new f.Linkifier(this._bufferService,this._logService,this.optionsService,this.unicodeService)),this.options.windowsMode&&this._enableWindowsMode()},z.prototype._enableWindowsMode=function(){var e,t=this;this._windowsMode||((e=[]).push(this.onLineFeed(E.updateWindowsModeWrappedState.bind(null,this._bufferService))),e.push(this.addCsiHandler({final:"H"},function(){return E.updateWindowsModeWrappedState(t._bufferService),!1})),this._windowsMode={dispose:function(){e.forEach(function(e){return e.dispose()})}})},Object.defineProperty(z.prototype,"buffer",{get:function(){return this.buffers.active},enumerable:!0,configurable:!0}),Object.defineProperty(z.prototype,"buffers",{get:function(){return this._bufferService.buffers},enumerable:!0,configurable:!0}),z.prototype.focus=function(){this.textarea&&this.textarea.focus({preventScroll:!0})},z.prototype._setupOptionsListeners=function(){var r=this;this.optionsService.onOptionChange(function(e){var t,i;switch(e){case"fontFamily":case"fontSize":null===(t=r._renderService)||void 0===t||t.clear(),null===(t=r._charSizeService)||void 0===t||t.measure();break;case"cursorBlink":case"cursorStyle":r.refresh(r.buffer.y,r.buffer.y);break;case"drawBoldTextInBrightColors":case"letterSpacing":case"lineHeight":case"fontWeight":case"fontWeightBold":case"minimumContrastRatio":r._renderService&&(r._renderService.clear(),r._renderService.onResize(r.cols,r.rows),r.refresh(0,r.rows-1));break;case"rendererType":r._renderService&&(r._renderService.setRenderer(r._createRenderer()),r._renderService.onResize(r.cols,r.rows));break;case"scrollback":r.buffers.resize(r.cols,r.rows),null===(t=r.viewport)||void 0===t||t.syncScrollArea();break;case"screenReaderMode":r.optionsService.options.screenReaderMode?!r._accessibilityManager&&r._renderService&&(r._accessibilityManager=new b.AccessibilityManager(r,r._renderService)):(null===(i=r._accessibilityManager)||void 0===i||i.dispose(),r._accessibilityManager=null);break;case"tabStopWidth":r.buffers.setupTabStops();break;case"theme":r._setTheme(r.optionsService.options.theme);break;case"windowsMode":r.optionsService.options.windowsMode?r._enableWindowsMode():(null===(i=r._windowsMode)||void 0===i||i.dispose(),r._windowsMode=void 0)}})},z.prototype._onTextAreaFocus=function(e){this.sendFocus&&this._coreService.triggerDataEvent(h.C0.ESC+"[I"),this.updateCursorStyle(e),this.element.classList.add("focus"),this.showCursor(),this._onFocus.fire()},z.prototype.blur=function(){return this.textarea.blur()},z.prototype._onTextAreaBlur=function(){this.textarea.value="",this.refresh(this.buffer.y,this.buffer.y),this.sendFocus&&this._coreService.triggerDataEvent(h.C0.ESC+"[O"),this.element.classList.remove("focus"),this._onBlur.fire()},z.prototype._initGlobal=function(){var t=this;this._bindKeys(),this.register(p.addDisposableDomListener(this.element,"copy",function(e){t.hasSelection()&&c.copyHandler(e,t._selectionService)}));function e(e){return c.handlePasteEvent(e,t.textarea,t.bracketedPasteMode,t._coreService)}this.register(p.addDisposableDomListener(this.textarea,"paste",e)),this.register(p.addDisposableDomListener(this.element,"paste",e)),d.isFirefox?this.register(p.addDisposableDomListener(this.element,"mousedown",function(e){2===e.button&&c.rightClickHandler(e,t.textarea,t.screenElement,t._selectionService,t.options.rightClickSelectsWord)})):this.register(p.addDisposableDomListener(this.element,"contextmenu",function(e){c.rightClickHandler(e,t.textarea,t.screenElement,t._selectionService,t.options.rightClickSelectsWord)})),d.isLinux&&this.register(p.addDisposableDomListener(this.element,"auxclick",function(e){1===e.button&&c.moveTextAreaUnderMouseCursor(e,t.textarea,t.screenElement)}))},z.prototype._bindKeys=function(){var t=this;this.register(p.addDisposableDomListener(this.textarea,"keyup",function(e){return t._keyUp(e)},!0)),this.register(p.addDisposableDomListener(this.textarea,"keydown",function(e){return t._keyDown(e)},!0)),this.register(p.addDisposableDomListener(this.textarea,"keypress",function(e){return t._keyPress(e)},!0)),this.register(p.addDisposableDomListener(this.textarea,"compositionstart",function(){return t._compositionHelper.compositionstart()})),this.register(p.addDisposableDomListener(this.textarea,"compositionupdate",function(e){return t._compositionHelper.compositionupdate(e)})),this.register(p.addDisposableDomListener(this.textarea,"compositionend",function(){return t._compositionHelper.compositionend()})),this.register(this.onRender(function(){return t._compositionHelper.updateCompositionElements()})),this.register(this.onRender(function(e){return t._queueLinkification(e.start,e.end)}))},z.prototype.open=function(e){var i=this;if(!e)throw new Error("Terminal requires a parent element.");N.body.contains(e)||this._logService.warn("Terminal.open was called on an element that was not attached to the DOM"),this._document=e.ownerDocument,this.element=this._document.createElement("div"),this.element.dir="ltr",this.element.classList.add("terminal"),this.element.classList.add("xterm"),this.element.setAttribute("tabindex","0"),e.appendChild(this.element);var t=N.createDocumentFragment();this._viewportElement=N.createElement("div"),this._viewportElement.classList.add("xterm-viewport"),t.appendChild(this._viewportElement),this._viewportScrollArea=N.createElement("div"),this._viewportScrollArea.classList.add("xterm-scroll-area"),this._viewportElement.appendChild(this._viewportScrollArea),this.screenElement=N.createElement("div"),this.screenElement.classList.add("xterm-screen"),this._helperContainer=N.createElement("div"),this._helperContainer.classList.add("xterm-helpers"),this.screenElement.appendChild(this._helperContainer),t.appendChild(this.screenElement),this.textarea=N.createElement("textarea"),this.textarea.classList.add("xterm-helper-textarea"),this.textarea.setAttribute("aria-label",v.promptLabel),this.textarea.setAttribute("aria-multiline","false"),this.textarea.setAttribute("autocorrect","off"),this.textarea.setAttribute("autocapitalize","off"),this.textarea.setAttribute("spellcheck","false"),this.textarea.tabIndex=0,this.register(p.addDisposableDomListener(this.textarea,"focus",function(e){return i._onTextAreaFocus(e)})),this.register(p.addDisposableDomListener(this.textarea,"blur",function(){return i._onTextAreaBlur()})),this._helperContainer.appendChild(this.textarea);e=this._instantiationService.createInstance(W.CoreBrowserService,this.textarea);this._instantiationService.setService(k.ICoreBrowserService,e),this._charSizeService=this._instantiationService.createInstance(D.CharSizeService,this._document,this._helperContainer),this._instantiationService.setService(k.ICharSizeService,this._charSizeService),this._compositionView=N.createElement("div"),this._compositionView.classList.add("composition-view"),this._compositionHelper=this._instantiationService.createInstance(s.CompositionHelper,this.textarea,this._compositionView),this._helperContainer.appendChild(this._compositionView),this.element.appendChild(t),this._theme=this.options.theme||this._theme,this.options.theme=void 0,this._colorManager=new L.ColorManager(N,this.options.allowTransparency),this.optionsService.onOptionChange(function(e){return i._colorManager.onOptionsChange(e)}),this._colorManager.setTheme(this._theme);t=this._createRenderer();this._renderService=this._instantiationService.createInstance(A.RenderService,t,this.rows,this.screenElement),this._instantiationService.setService(k.IRenderService,this._renderService),this._renderService.onRender(function(e){return i._onRender.fire(e)}),this.onResize(function(e){return i._renderService.resize(e.cols,e.rows)}),this._soundService=this._instantiationService.createInstance(g.SoundService),this._instantiationService.setService(k.ISoundService,this._soundService),this._mouseService=this._instantiationService.createInstance(M.MouseService),this._instantiationService.setService(k.IMouseService,this._mouseService),this.viewport=this._instantiationService.createInstance(a.Viewport,function(e,t){return i.scrollLines(e,t)},this._viewportElement,this._viewportScrollArea),this.viewport.onThemeChange(this._colorManager.colors),this.register(this.viewport),this.register(this.onCursorMove(function(){return i._renderService.onCursorMove()})),this.register(this.onResize(function(){return i._renderService.onResize(i.cols,i.rows)})),this.register(this.onBlur(function(){return i._renderService.onBlur()})),this.register(this.onFocus(function(){return i._renderService.onFocus()})),this.register(this._renderService.onDimensionsChange(function(){return i.viewport.syncScrollArea()})),this._selectionService=this._instantiationService.createInstance(_.SelectionService,function(e,t){return i.scrollLines(e,t)},this.element,this.screenElement),this._instantiationService.setService(k.ISelectionService,this._selectionService),this.register(this._selectionService.onSelectionChange(function(){return i._onSelectionChange.fire()})),this.register(this._selectionService.onRedrawRequest(function(e){return i._renderService.onSelectionChanged(e.start,e.end,e.columnSelectMode)})),this.register(this._selectionService.onLinuxMouseSelection(function(e){i.textarea.value=e,i.textarea.focus(),i.textarea.select()})),this.register(this.onScroll(function(){i.viewport.syncScrollArea(),i._selectionService.refresh()})),this.register(p.addDisposableDomListener(this._viewportElement,"scroll",function(){return i._selectionService.refresh()})),this._mouseZoneManager=this._instantiationService.createInstance(y.MouseZoneManager,this.element,this.screenElement),this.register(this._mouseZoneManager),this.register(this.onScroll(function(){return i._mouseZoneManager.clearAll()})),this.linkifier.attachToDom(this.element,this._mouseZoneManager),this.register(p.addDisposableDomListener(this.element,"mousedown",function(e){return i._selectionService.onMouseDown(e)})),this.mouseEvents?(this._selectionService.disable(),this.element.classList.add("enable-mouse-events")):this._selectionService.enable(),this.options.screenReaderMode&&(this._accessibilityManager=new b.AccessibilityManager(this,this._renderService)),this._charSizeService.measure(),this.refresh(0,this.rows-1),this._initGlobal(),this.bindMouse()},z.prototype._createRenderer=function(){switch(this.options.rendererType){case"canvas":return this._instantiationService.createInstance(u.Renderer,this._colorManager.colors,this.screenElement,this.linkifier);case"dom":return this._instantiationService.createInstance(m.DomRenderer,this._colorManager.colors,this.element,this.screenElement,this._viewportElement,this.linkifier);default:throw new Error('Unrecognized rendererType "'+this.options.rendererType+'"')}},z.prototype._setTheme=function(e){var t;this._theme=e,null===(t=this._colorManager)||void 0===t||t.setTheme(e),null===(e=this._renderService)||void 0===e||e.setColors(this._colorManager.colors),null===(e=this.viewport)||void 0===e||e.onThemeChange(this._colorManager.colors)},z.prototype.bindMouse=function(){var o=this,n=this,t=this.element;function i(e){var t,i,r;if(t=n._mouseService.getRawByteCoords(e,n.screenElement,n.cols,n.rows)){switch(e.overrideType||e.type){case"mousemove":r=32,void 0===e.buttons?(i=3,void 0!==e.button&&(i=e.button<3?e.button:3)):i=1&e.buttons?0:4&e.buttons?1:2&e.buttons?2:3;break;case"mouseup":r=0,i=e.button<3?e.button:3;break;case"mousedown":r=1,i=e.button<3?e.button:3;break;case"wheel":0!==e.deltaY&&(r=e.deltaY<0?0:1),i=4;break;default:return}return!(void 0===r||void 0===i||4=this.buffer.ybase&&(this._userScrolling=!1);var i=this.buffer.ydisp;this.buffer.ydisp=Math.max(Math.min(this.buffer.ydisp+e,this.buffer.ybase),0),i!==this.buffer.ydisp&&(t||this._onScroll.fire(this.buffer.ydisp),this.refresh(0,this.rows-1))},z.prototype.scrollPages=function(e){this.scrollLines(e*(this.rows-1))},z.prototype.scrollToTop=function(){this.scrollLines(-this.buffer.ydisp)},z.prototype.scrollToBottom=function(){this.scrollLines(this.buffer.ybase-this.buffer.ydisp)},z.prototype.scrollToLine=function(e){e-=this.buffer.ydisp;0!=e&&this.scrollLines(e)},z.prototype.paste=function(e){c.paste(e,this.textarea,this.bracketedPasteMode,this._coreService)},z.prototype.attachCustomKeyEventHandler=function(e){this._customKeyEventHandler=e},z.prototype.addEscHandler=function(e,t){return this._inputHandler.addEscHandler(e,t)},z.prototype.addDcsHandler=function(e,t){return this._inputHandler.addDcsHandler(e,t)},z.prototype.addCsiHandler=function(e,t){return this._inputHandler.addCsiHandler(e,t)},z.prototype.addOscHandler=function(e,t){return this._inputHandler.addOscHandler(e,t)},z.prototype.registerLinkMatcher=function(e,t,i){i=this.linkifier.registerLinkMatcher(e,t,i);return this.refresh(0,this.rows-1),i},z.prototype.deregisterLinkMatcher=function(e){this.linkifier.deregisterLinkMatcher(e)&&this.refresh(0,this.rows-1)},z.prototype.registerCharacterJoiner=function(e){e=this._renderService.registerCharacterJoiner(e);return this.refresh(0,this.rows-1),e},z.prototype.deregisterCharacterJoiner=function(e){this._renderService.deregisterCharacterJoiner(e)&&this.refresh(0,this.rows-1)},Object.defineProperty(z.prototype,"markers",{get:function(){return this.buffer.markers},enumerable:!0,configurable:!0}),z.prototype.addMarker=function(e){if(this.buffer===this.buffers.normal)return this.buffer.addMarker(this.buffer.ybase+this.buffer.y+e)},z.prototype.hasSelection=function(){return!!this._selectionService&&this._selectionService.hasSelection},z.prototype.select=function(e,t,i){this._selectionService.setSelection(e,t,i)},z.prototype.getSelection=function(){return this._selectionService?this._selectionService.selectionText:""},z.prototype.getSelectionPosition=function(){if(this._selectionService.hasSelection)return{startColumn:this._selectionService.selectionStart[0],startRow:this._selectionService.selectionStart[1],endColumn:this._selectionService.selectionEnd[0],endRow:this._selectionService.selectionEnd[1]}},z.prototype.clearSelection=function(){var e;null===(e=this._selectionService)||void 0===e||e.clearSelection()},z.prototype.selectAll=function(){var e;null===(e=this._selectionService)||void 0===e||e.selectAll()},z.prototype.selectLines=function(e,t){var i;null===(i=this._selectionService)||void 0===i||i.selectLines(e,t)},z.prototype._keyDown=function(e){if(this._keyDownHandled=!1,this._customKeyEventHandler&&!1===this._customKeyEventHandler(e))return!1;if(!this._compositionHelper.keydown(e))return this.buffer.ybase!==this.buffer.ydisp&&this.scrollToBottom(),!1;var t=S.evaluateKeyboardEvent(e,this._coreService.decPrivateModes.applicationCursorKeys,this.browser.isMac,this.options.macOptionIsMeta);if(this.updateCursorStyle(e),3!==t.type&&2!==t.type)return 1===t.type&&this.selectAll(),!!this._isThirdLevelShift(this.browser,e)||(t.cancel&&this.cancel(e,!0),!t.key||(t.key!==h.C0.ETX&&t.key!==h.C0.CR||(this.textarea.value=""),this._onKey.fire({key:t.key,domEvent:e}),this.showCursor(),this._coreService.triggerDataEvent(t.key,!0),this.optionsService.options.screenReaderMode?void(this._keyDownHandled=!0):this.cancel(e,!0)));var i=this.rows-1;return this.scrollLines(2===t.type?-i:i),this.cancel(e,!0)},z.prototype._isThirdLevelShift=function(e,t){e=e.isMac&&!this.options.macOptionIsMeta&&t.altKey&&!t.ctrlKey&&!t.metaKey||e.isWindows&&t.altKey&&t.ctrlKey&&!t.metaKey;return"keypress"===t.type?e:e&&(!t.keyCode||47=s)if(a)r.x=0,r.y++,r.y===r.scrollBottom+1?(r.y--,this._terminal.scroll(this._eraseAttrData(),!0)):(r.y>=this._bufferService.rows&&(r.y=this._bufferService.rows-1),r.lines.get(r.y).isWrapped=!0),h=r.lines.get(r.y+r.ybase);else if(r.x=s-1,2===d)continue;if(c&&(h.insertCells(r.x,d,r.getNullCell(l),l),2===h.getWidth(s-1)&&h.setCellFromCodePoint(s-1,m.NULL_CELL_CODE,m.NULL_CELL_WIDTH,l.fg,l.bg)),h.setCellFromCodePoint(r.x++,_,d,l.fg,l.bg),0=this._bufferService.rows&&(e.y=this._bufferService.rows-1),e.x>=this._bufferService.cols&&e.x--,this._dirtyRowService.markDirty(e.y),this._onLineFeed.fire()},f.prototype.carriageReturn=function(){this._bufferService.buffer.x=0},f.prototype.backspace=function(){this._restrictCursor(),0=this._bufferService.cols||(e=this._bufferService.buffer.x,this._bufferService.buffer.x=this._bufferService.buffer.nextStop(),this._optionsService.options.screenReaderMode&&this._terminal.onA11yTabEmitter.fire(this._bufferService.buffer.x-e))},f.prototype.shiftOut=function(){this._charsetService.setgLevel(1)},f.prototype.shiftIn=function(){this._charsetService.setgLevel(0)},f.prototype._restrictCursor=function(){this._bufferService.buffer.x=Math.min(this._bufferService.cols-1,Math.max(0,this._bufferService.buffer.x)),this._bufferService.buffer.y=this._coreService.decPrivateModes.origin?Math.min(this._bufferService.buffer.scrollBottom,Math.max(this._bufferService.buffer.scrollTop,this._bufferService.buffer.y)):Math.min(this._bufferService.rows-1,Math.max(0,this._bufferService.buffer.y)),this._dirtyRowService.markDirty(this._bufferService.buffer.y)},f.prototype._setCursor=function(e,t){this._dirtyRowService.markDirty(this._bufferService.buffer.y),this._coreService.decPrivateModes.origin?(this._bufferService.buffer.x=e,this._bufferService.buffer.y=this._bufferService.buffer.scrollTop+t):(this._bufferService.buffer.x=e,this._bufferService.buffer.y=t),this._restrictCursor(),this._dirtyRowService.markDirty(this._bufferService.buffer.y)},f.prototype._moveCursor=function(e,t){this._restrictCursor(),this._setCursor(this._bufferService.buffer.x+e,this._bufferService.buffer.y+t)},f.prototype.cursorUp=function(e){var t=this._bufferService.buffer.y-this._bufferService.buffer.scrollTop;0<=t?this._moveCursor(0,-Math.min(t,e.params[0]||1)):this._moveCursor(0,-(e.params[0]||1))},f.prototype.cursorDown=function(e){var t=this._bufferService.buffer.scrollBottom-this._bufferService.buffer.y;0<=t?this._moveCursor(0,Math.min(t,e.params[0]||1)):this._moveCursor(0,e.params[0]||1)},f.prototype.cursorForward=function(e){this._moveCursor(e.params[0]||1,0)},f.prototype.cursorBackward=function(e){this._moveCursor(-(e.params[0]||1),0)},f.prototype.cursorNextLine=function(e){this.cursorDown(e),this._bufferService.buffer.x=0},f.prototype.cursorPrecedingLine=function(e){this.cursorUp(e),this._bufferService.buffer.x=0},f.prototype.cursorCharAbsolute=function(e){this._setCursor((e.params[0]||1)-1,this._bufferService.buffer.y)},f.prototype.cursorPosition=function(e){this._setCursor(2<=e.length?(e.params[1]||1)-1:0,(e.params[0]||1)-1)},f.prototype.charPosAbsolute=function(e){this._setCursor((e.params[0]||1)-1,this._bufferService.buffer.y)},f.prototype.hPositionRelative=function(e){this._moveCursor(e.params[0]||1,0)},f.prototype.linePosAbsolute=function(e){this._setCursor(this._bufferService.buffer.x,(e.params[0]||1)-1)},f.prototype.vPositionRelative=function(e){this._moveCursor(0,e.params[0]||1)},f.prototype.hVPosition=function(e){this.cursorPosition(e)},f.prototype.tabClear=function(e){e=e.params[0];0===e?delete this._bufferService.buffer.tabs[this._bufferService.buffer.x]:3===e&&(this._bufferService.buffer.tabs={})},f.prototype.cursorForwardTab=function(e){if(!(this._bufferService.buffer.x>=this._bufferService.cols))for(var t=e.params[0]||1;t--;)this._bufferService.buffer.x=this._bufferService.buffer.nextStop()},f.prototype.cursorBackwardTab=function(e){if(!(this._bufferService.buffer.x>=this._bufferService.cols))for(var t=e.params[0]||1,i=this._bufferService.buffer;t--;)i.x=i.prevStop()},f.prototype._eraseInBufferLine=function(e,t,i,r){void 0===r&&(r=!1);e=this._bufferService.buffer.lines.get(this._bufferService.buffer.ybase+e);e.replaceCells(t,i,this._bufferService.buffer.getNullCell(this._eraseAttrData()),this._eraseAttrData()),r&&(e.isWrapped=!1)},f.prototype._resetBufferLine=function(e){e=this._bufferService.buffer.lines.get(this._bufferService.buffer.ybase+e);e.fill(this._bufferService.buffer.getNullCell(this._eraseAttrData())),e.isWrapped=!1},f.prototype.eraseInDisplay=function(e){var t;switch(this._restrictCursor(),e.params[0]){case 0:for(t=this._bufferService.buffer.y,this._dirtyRowService.markDirty(t),this._eraseInBufferLine(t++,this._bufferService.buffer.x,this._bufferService.cols,0===this._bufferService.buffer.x);t=this._bufferService.cols&&(this._bufferService.buffer.lines.get(t+1).isWrapped=!1);t--;)this._resetBufferLine(t);this._dirtyRowService.markDirty(0);break;case 2:for(t=this._bufferService.rows,this._dirtyRowService.markDirty(t-1);t--;)this._resetBufferLine(t);this._dirtyRowService.markDirty(0);break;case 3:var i=this._bufferService.buffer.lines.length-this._bufferService.rows;0i.scrollBottom||i.yi.scrollBottom||i.yt.scrollBottom||t.yt.scrollBottom||t.yt.scrollBottom||t.yt.scrollBottom||t.y0;276;0c"):this._terminal.is("rxvt-unicode")?this._coreService.triggerDataEvent(d.C0.ESC+"[>85;95;0c"):this._terminal.is("linux")?this._coreService.triggerDataEvent(e.params[0]+"c"):this._terminal.is("screen")&&this._coreService.triggerDataEvent(d.C0.ESC+"[>83;40003;0c"))},f.prototype.setMode=function(e){for(var t=0;tthis._bufferService.rows||0===t?this._bufferService.rows:t)&&(this._bufferService.buffer.scrollTop=i-1,this._bufferService.buffer.scrollBottom=t-1,this._setCursor(0,0))},f.prototype.windowOptions=function(e){if(u(e.params[0],this._optionsService.options.windowOptions)){var t,i,r=1=this._bufferService.rows&&(e.y=this._bufferService.rows-1),this._restrictCursor()},f.prototype.tabSet=function(){this._bufferService.buffer.tabs[this._bufferService.buffer.x]=!0},f.prototype.reverseIndex=function(){this._restrictCursor();var e,t=this._bufferService.buffer;t.y===t.scrollTop?(e=t.scrollBottom-t.scrollTop,t.lines.shiftElements(t.y+t.ybase,e,1),t.lines.set(t.y+t.ybase,t.getBlankLine(this._eraseAttrData())),this._dirtyRowService.markRangeDirty(t.scrollTop,t.scrollBottom)):(t.y--,this._restrictCursor())},f.prototype.fullReset=function(){this._parser.reset(),this._onRequestReset.fire()},f.prototype.reset=function(){this._curAttrData=y.DEFAULT_ATTR_DATA.clone(),this._eraseAttrDataInternal=y.DEFAULT_ATTR_DATA.clone()},f.prototype._eraseAttrData=function(){return this._eraseAttrDataInternal.bg&=-67108864,this._eraseAttrDataInternal.bg|=67108863&this._curAttrData.bg,this._eraseAttrDataInternal},f.prototype.setgLevel=function(e){this._charsetService.setgLevel(e)},f.prototype.screenAlignmentPattern=function(){var e=new S.CellData;e.content=1<<22|"E".charCodeAt(0),e.fg=this._curAttrData.fg,e.bg=this._curAttrData.bg;var t=this._bufferService.buffer;this._setCursor(0,0);for(var i=0;i",final:"c"},function(e){return u.sendDeviceAttributesSecondary(e)}),u._parser.setCsiHandler({final:"d"},function(e){return u.linePosAbsolute(e)}),u._parser.setCsiHandler({final:"e"},function(e){return u.vPositionRelative(e)}),u._parser.setCsiHandler({final:"f"},function(e){return u.hVPosition(e)}),u._parser.setCsiHandler({final:"g"},function(e){return u.tabClear(e)}),u._parser.setCsiHandler({final:"h"},function(e){return u.setMode(e)}),u._parser.setCsiHandler({prefix:"?",final:"h"},function(e){return u.setModePrivate(e)}),u._parser.setCsiHandler({final:"l"},function(e){return u.resetMode(e)}),u._parser.setCsiHandler({prefix:"?",final:"l"},function(e){return u.resetModePrivate(e)}),u._parser.setCsiHandler({final:"m"},function(e){return u.charAttributes(e)}),u._parser.setCsiHandler({final:"n"},function(e){return u.deviceStatus(e)}),u._parser.setCsiHandler({prefix:"?",final:"n"},function(e){return u.deviceStatusPrivate(e)}),u._parser.setCsiHandler({intermediates:"!",final:"p"},function(e){return u.softReset(e)}),u._parser.setCsiHandler({intermediates:" ",final:"q"},function(e){return u.setCursorStyle(e)}),u._parser.setCsiHandler({final:"r"},function(e){return u.setScrollRegion(e)}),u._parser.setCsiHandler({final:"s"},function(e){return u.saveCursor(e)}),u._parser.setCsiHandler({final:"t"},function(e){return u.windowOptions(e)}),u._parser.setCsiHandler({final:"u"},function(e){return u.restoreCursor(e)}),u._parser.setCsiHandler({intermediates:"'",final:"}"},function(e){return u.insertColumns(e)}),u._parser.setCsiHandler({intermediates:"'",final:"~"},function(e){return u.deleteColumns(e)}),u._parser.setExecuteHandler(d.C0.BEL,function(){return u.bell()}),u._parser.setExecuteHandler(d.C0.LF,function(){return u.lineFeed()}),u._parser.setExecuteHandler(d.C0.VT,function(){return u.lineFeed()}),u._parser.setExecuteHandler(d.C0.FF,function(){return u.lineFeed()}),u._parser.setExecuteHandler(d.C0.CR,function(){return u.carriageReturn()}),u._parser.setExecuteHandler(d.C0.BS,function(){return u.backspace()}),u._parser.setExecuteHandler(d.C0.HT,function(){return u.tab()}),u._parser.setExecuteHandler(d.C0.SO,function(){return u.shiftOut()}),u._parser.setExecuteHandler(d.C0.SI,function(){return u.shiftIn()}),u._parser.setExecuteHandler(d.C1.IND,function(){return u.index()}),u._parser.setExecuteHandler(d.C1.NEL,function(){return u.nextLine()}),u._parser.setExecuteHandler(d.C1.HTS,function(){return u.tabSet()}),u._parser.setOscHandler(0,new C.OscHandler(function(e){u.setTitle(e),u.setIconName(e)})),u._parser.setOscHandler(1,new C.OscHandler(function(e){return u.setIconName(e)})),u._parser.setOscHandler(2,new C.OscHandler(function(e){return u.setTitle(e)})),u._parser.setEscHandler({final:"7"},function(){return u.saveCursor()}),u._parser.setEscHandler({final:"8"},function(){return u.restoreCursor()}),u._parser.setEscHandler({final:"D"},function(){return u.index()}),u._parser.setEscHandler({final:"E"},function(){return u.nextLine()}),u._parser.setEscHandler({final:"H"},function(){return u.tabSet()}),u._parser.setEscHandler({final:"M"},function(){return u.reverseIndex()}),u._parser.setEscHandler({final:"="},function(){return u.keypadApplicationMode()}),u._parser.setEscHandler({final:">"},function(){return u.keypadNumericMode()}),u._parser.setEscHandler({final:"c"},function(){return u.fullReset()}),u._parser.setEscHandler({final:"n"},function(){return u.setgLevel(2)}),u._parser.setEscHandler({final:"o"},function(){return u.setgLevel(3)}),u._parser.setEscHandler({final:"|"},function(){return u.setgLevel(3)}),u._parser.setEscHandler({final:"}"},function(){return u.setgLevel(2)}),u._parser.setEscHandler({final:"~"},function(){return u.setgLevel(1)}),u._parser.setEscHandler({intermediates:"%",final:"@"},function(){return u.selectDefaultCharset()}),u._parser.setEscHandler({intermediates:"%",final:"G"},function(){return u.selectDefaultCharset()});var f,_=this;for(f in p.CHARSETS)!function(e){_._parser.setEscHandler({intermediates:"(",final:e},function(){return u.selectCharset("("+e)}),_._parser.setEscHandler({intermediates:")",final:e},function(){return u.selectCharset(")"+e)}),_._parser.setEscHandler({intermediates:"*",final:e},function(){return u.selectCharset("*"+e)}),_._parser.setEscHandler({intermediates:"+",final:e},function(){return u.selectCharset("+"+e)}),_._parser.setEscHandler({intermediates:"-",final:e},function(){return u.selectCharset("-"+e)}),_._parser.setEscHandler({intermediates:".",final:e},function(){return u.selectCharset("."+e)}),_._parser.setEscHandler({intermediates:"/",final:e},function(){return u.selectCharset("/"+e)})}(f);return u._parser.setEscHandler({intermediates:"#",final:"8"},function(){return u.screenAlignmentPattern()}),u._parser.setErrorHandler(function(e){return u._logService.error("Parsing error: ",e),e}),u._parser.setDcsHandler({intermediates:"$",final:"q"},new E(u._bufferService,u._coreService,u._logService,u._optionsService)),u}function _(e,t,i,r){this._bufferService=e,this._coreService=t,this._logService=i,this._optionsService=r,this._data=new Uint32Array(0)}t.InputHandler=n},function(e,i,t){"use strict";var r,n=this&&this.__extends||(r=function(e,t){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var i in t)t.hasOwnProperty(i)&&(e[i]=t[i])})(e,t)},function(e,t){function i(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(i.prototype=t.prototype,new i)});Object.defineProperty(i,"__esModule",{value:!0});var o=t(2),s=t(15),a=t(19),c=t(20),l=t(22),h=(u.prototype.setDefault=function(e,t){s.fill(this.table,e<<4|t)},u.prototype.add=function(e,t,i,r){this.table[t<<8|e]=i<<4|r},u.prototype.addMany=function(e,t,i,r){for(var n=0;no||o>t[1])throw new Error("final must be in range "+t[0]+" .. "+t[1]);return(i<<=8)|o},_.prototype.identToString=function(e){for(var t=[];e;)t.push(String.fromCharCode(255&e)),e>>=8;return t.reverse().join("")},_.prototype.dispose=function(){this._csiHandlers=Object.create(null),this._executeHandlers=Object.create(null),this._escHandlers=Object.create(null),this._oscParser.dispose(),this._dcsParser.dispose()},_.prototype.setPrintHandler=function(e){this._printHandler=e},_.prototype.clearPrintHandler=function(){this._printHandler=this._printHandlerFb},_.prototype.addEscHandler=function(e,t){e=this._identifier(e,[48,126]);void 0===this._escHandlers[e]&&(this._escHandlers[e]=[]);var i=this._escHandlers[e];return i.push(t),{dispose:function(){var e=i.indexOf(t);-1!==e&&i.splice(e,1)}}},_.prototype.setEscHandler=function(e,t){this._escHandlers[this._identifier(e,[48,126])]=[t]},_.prototype.clearEscHandler=function(e){this._escHandlers[this._identifier(e,[48,126])]&&delete this._escHandlers[this._identifier(e,[48,126])]},_.prototype.setEscHandlerFallback=function(e){this._escHandlerFb=e},_.prototype.setExecuteHandler=function(e,t){this._executeHandlers[e.charCodeAt(0)]=t},_.prototype.clearExecuteHandler=function(e){this._executeHandlers[e.charCodeAt(0)]&&delete this._executeHandlers[e.charCodeAt(0)]},_.prototype.setExecuteHandlerFallback=function(e){this._executeHandlerFb=e},_.prototype.addCsiHandler=function(e,t){e=this._identifier(e);void 0===this._csiHandlers[e]&&(this._csiHandlers[e]=[]);var i=this._csiHandlers[e];return i.push(t),{dispose:function(){var e=i.indexOf(t);-1!==e&&i.splice(e,1)}}},_.prototype.setCsiHandler=function(e,t){this._csiHandlers[this._identifier(e)]=[t]},_.prototype.clearCsiHandler=function(e){this._csiHandlers[this._identifier(e)]&&delete this._csiHandlers[this._identifier(e)]},_.prototype.setCsiHandlerFallback=function(e){this._csiHandlerFb=e},_.prototype.addDcsHandler=function(e,t){return this._dcsParser.addHandler(this._identifier(e),t)},_.prototype.setDcsHandler=function(e,t){this._dcsParser.setHandler(this._identifier(e),t)},_.prototype.clearDcsHandler=function(e){this._dcsParser.clearHandler(this._identifier(e))},_.prototype.setDcsHandlerFallback=function(e){this._dcsParser.setHandlerFallback(e)},_.prototype.addOscHandler=function(e,t){return this._oscParser.addHandler(e,t)},_.prototype.setOscHandler=function(e,t){this._oscParser.setHandler(e,t)},_.prototype.clearOscHandler=function(e){this._oscParser.clearHandler(e)},_.prototype.setOscHandlerFallback=function(e){this._oscParser.setHandlerFallback(e)},_.prototype.setErrorHandler=function(e){this._errorHandler=e},_.prototype.clearErrorHandler=function(){this._errorHandler=this._errorHandlerFb},_.prototype.reset=function(){this.currentState=this.initialState,this._oscParser.reset(),this._dcsParser.reset(),this._params.reset(),this._params.addParam(0),this._collect=0,this.precedingCodepoint=0},_.prototype.parse=function(e,t){for(var i=0,r=0,n=this.currentState,o=this._oscParser,s=this._dcsParser,a=this._collect,c=this._params,l=this.TRANSITIONS.table,h=0;h>4){case 2:for(var u=h+1;;++u){if(t<=u||(i=e[u])<32||126=t||(i=e[u])<32||126=t||(i=e[u])<32||126=t||(i=e[u])<32||126this._characterWidth;return this._ctx.restore(),this._characterOverlapCache[t]=e},s);function s(e,t,i,r,n,o,s,a){o=c.call(this,e,"text",t,n,i,o,s,a)||this;return o.bufferService=s,o.optionsService=a,o._characterWidth=0,o._characterFont="",o._characterOverlapCache={},o._workCell=new u.CellData,o._state=new l.GridCache,o._characterJoinerRegistry=r,o}t.TextRenderLayer=n},function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=(n.prototype.resize=function(e,t){for(var i=0;i>>24,r=s.rgba>>>16&255,n=s.rgba>>>8&255,o=0;o=this.capacity?(r=this._head,this._unlinkNode(r),delete this._map[r.key],r.key=e,r.value=t,this._map[e]=r):(0<(i=this._nodePool).length?((r=i.pop()).key=e,r.value=t):r={prev:null,next:null,key:e,value:t},this._map[e]=r,this.size++),this._appendNode(r)},n);function n(e){this.capacity=e,this._map={},this._head=null,this._tail=null,this._nodePool=[],this.size=0}t.LRUMap=r},function(e,t,i){"use strict";var r,n=this&&this.__extends||(r=function(e,t){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var i in t)t.hasOwnProperty(i)&&(e[i]=t[i])})(e,t)},function(e,t){function i(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(i.prototype=t.prototype,new i)});Object.defineProperty(t,"__esModule",{value:!0});var s,n=(s=i(13).BaseRenderLayer,n(o,s),o.prototype._clearState=function(){this._state={start:void 0,end:void 0,columnSelectMode:void 0,ydisp:void 0}},o.prototype.resize=function(e){s.prototype.resize.call(this,e),this._clearState()},o.prototype.reset=function(){this._state.start&&this._state.end&&(this._clearState(),this._clearAll())},o.prototype.onSelectionChanged=function(e,t,i){var r,n,o,s,a,c,l;this._didStateChange(e,t,i,this._bufferService.buffer.ydisp)&&(this._clearAll(),e&&t?(a=e[1]-this._bufferService.buffer.ydisp,l=t[1]-this._bufferService.buffer.ydisp,r=Math.max(a,0),n=Math.min(l,this._bufferService.rows-1),r>=this._bufferService.rows||n<0||(this._ctx.fillStyle=this._colors.selection.css,i?(c=e[0],o=t[0]-c,s=n-r+1,this._fillCells(c,r,o,s)):(c=a===r?e[0]:0,a=r===n?t[0]:this._bufferService.cols,this._fillCells(c,r,a-c,1),c=Math.max(n-r-1,0),this._fillCells(0,r+1,this._bufferService.cols,c),r!==n&&(l=l===n?t[0]:this._bufferService.cols,this._fillCells(0,n,l,1))),this._state.start=[e[0],e[1]],this._state.end=[t[0],t[1]],this._state.columnSelectMode=i,this._state.ydisp=this._bufferService.buffer.ydisp)):this._clearState())},o.prototype._didStateChange=function(e,t,i,r){return!this._areCoordinatesEqual(e,this._state.start)||!this._areCoordinatesEqual(t,this._state.end)||i!==this._state.columnSelectMode||r!==this._state.ydisp},o.prototype._areCoordinatesEqual=function(e,t){return!(!e||!t)&&e[0]===t[0]&&e[1]===t[1]},o);function o(e,t,i,r,n,o){r=s.call(this,e,"selection",t,!0,i,r,n,o)||this;return r.bufferService=n,r.optionsService=o,r._clearState(),r}t.SelectionRenderLayer=n},function(e,t,i){"use strict";var r,n=this&&this.__extends||(r=function(e,t){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var i in t)t.hasOwnProperty(i)&&(e[i]=t[i])})(e,t)},function(e,t){function i(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(i.prototype=t.prototype,new i)});Object.defineProperty(t,"__esModule",{value:!0});var l,o=i(13),h=i(5),n=(l=o.BaseRenderLayer,n(s,l),s.prototype.resize=function(e){l.prototype.resize.call(this,e),this._state={x:0,y:0,isFocused:!1,style:"",width:0}},s.prototype.reset=function(){this._clearCursor(),this._cursorBlinkStateManager&&(this._cursorBlinkStateManager.dispose(),this._cursorBlinkStateManager=void 0,this.onOptionsChanged())},s.prototype.onBlur=function(){this._cursorBlinkStateManager&&this._cursorBlinkStateManager.pause(),this._onRequestRefreshRowsEvent.fire({start:this._bufferService.buffer.y,end:this._bufferService.buffer.y})},s.prototype.onFocus=function(){this._cursorBlinkStateManager?this._cursorBlinkStateManager.resume():this._onRequestRefreshRowsEvent.fire({start:this._bufferService.buffer.y,end:this._bufferService.buffer.y})},s.prototype.onOptionsChanged=function(){var e,t=this;this._optionsService.options.cursorBlink?this._cursorBlinkStateManager||(this._cursorBlinkStateManager=new a(this._coreBrowserService.isFocused,function(){t._render(!0)})):(null===(e=this._cursorBlinkStateManager)||void 0===e||e.dispose(),this._cursorBlinkStateManager=void 0),this._onRequestRefreshRowsEvent.fire({start:this._bufferService.buffer.y,end:this._bufferService.buffer.y})},s.prototype.onCursorMove=function(){this._cursorBlinkStateManager&&this._cursorBlinkStateManager.restartBlinkAnimation()},s.prototype.onGridChanged=function(e,t){!this._cursorBlinkStateManager||this._cursorBlinkStateManager.isPaused?this._render(!1):this._cursorBlinkStateManager.restartBlinkAnimation()},s.prototype._render=function(e){if(this._coreService.isCursorInitialized&&!this._coreService.isCursorHidden){var t=this._bufferService.buffer.ybase+this._bufferService.buffer.y,i=t-this._bufferService.buffer.ydisp;if(i<0||i>=this._bufferService.rows)this._clearCursor();else if(this._bufferService.buffer.lines.get(t).loadCell(this._bufferService.buffer.x,this._cell),void 0!==this._cell.content){if(!this._coreBrowserService.isFocused){this._clearCursor(),this._ctx.save(),this._ctx.fillStyle=this._colors.cursor.css;t=this._optionsService.options.cursorStyle;return t&&"block"!==t?this._cursorRenderers[t](this._bufferService.buffer.x,i,this._cell):this._renderBlurCursor(this._bufferService.buffer.x,i,this._cell),this._ctx.restore(),this._state.x=this._bufferService.buffer.x,this._state.y=i,this._state.isFocused=!1,this._state.style=t,void(this._state.width=this._cell.getWidth())}if(!this._cursorBlinkStateManager||this._cursorBlinkStateManager.isCursorVisible){if(this._state){if(this._state.x===this._bufferService.buffer.x&&this._state.y===i&&this._state.isFocused===this._coreBrowserService.isFocused&&this._state.style===this._optionsService.options.cursorStyle&&this._state.width===this._cell.getWidth())return;this._clearCursor()}this._ctx.save(),this._cursorRenderers[this._optionsService.options.cursorStyle||"block"](this._bufferService.buffer.x,i,this._cell),this._ctx.restore(),this._state.x=this._bufferService.buffer.x,this._state.y=i,this._state.isFocused=!1,this._state.style=this._optionsService.options.cursorStyle,this._state.width=this._cell.getWidth()}else this._clearCursor()}}else this._clearCursor()},s.prototype._clearCursor=function(){this._state&&(this._clearCells(this._state.x,this._state.y,this._state.width,1),this._state={x:0,y:0,isFocused:!1,style:"",width:0})},s.prototype._renderBarCursor=function(e,t,i){this._ctx.save(),this._ctx.fillStyle=this._colors.cursor.css,this._fillLeftLineAtCell(e,t,this._optionsService.options.cursorWidth),this._ctx.restore()},s.prototype._renderBlockCursor=function(e,t,i){this._ctx.save(),this._ctx.fillStyle=this._colors.cursor.css,this._fillCells(e,t,i.getWidth(),1),this._ctx.fillStyle=this._colors.cursorAccent.css,this._fillCharTrueColor(i,e,t),this._ctx.restore()},s.prototype._renderUnderlineCursor=function(e,t,i){this._ctx.save(),this._ctx.fillStyle=this._colors.cursor.css,this._fillBottomLineAtCells(e,t),this._ctx.restore()},s.prototype._renderBlurCursor=function(e,t,i){this._ctx.save(),this._ctx.strokeStyle=this._colors.cursor.css,this._strokeRectAtCell(e,t,i.getWidth(),1),this._ctx.restore()},s);function s(e,t,i,r,n,o,s,a,c){r=l.call(this,e,"cursor",t,!0,i,r,o,s)||this;return r._onRequestRefreshRowsEvent=n,r.bufferService=o,r.optionsService=s,r._coreService=a,r._coreBrowserService=c,r._cell=new h.CellData,r._state={x:0,y:0,isFocused:!1,style:"",width:0},r._cursorRenderers={bar:r._renderBarCursor.bind(r),block:r._renderBlockCursor.bind(r),underline:r._renderUnderlineCursor.bind(r)},r}t.CursorRenderLayer=n;var a=(Object.defineProperty(c.prototype,"isPaused",{get:function(){return!(this._blinkStartTimeout||this._blinkInterval)},enumerable:!0,configurable:!0}),c.prototype.dispose=function(){this._blinkInterval&&(window.clearInterval(this._blinkInterval),this._blinkInterval=void 0),this._blinkStartTimeout&&(window.clearTimeout(this._blinkStartTimeout),this._blinkStartTimeout=void 0),this._animationFrame&&(window.cancelAnimationFrame(this._animationFrame),this._animationFrame=void 0)},c.prototype.restartBlinkAnimation=function(){var e=this;this.isPaused||(this._animationTimeRestarted=Date.now(),this.isCursorVisible=!0,this._animationFrame||(this._animationFrame=window.requestAnimationFrame(function(){e._renderCallback(),e._animationFrame=void 0})))},c.prototype._restartInterval=function(e){var t=this;void 0===e&&(e=600),this._blinkInterval&&window.clearInterval(this._blinkInterval),this._blinkStartTimeout=setTimeout(function(){if(t._animationTimeRestarted){var e=600-(Date.now()-t._animationTimeRestarted);if(t._animationTimeRestarted=void 0,0=e.lines.length)){for(var i=e.ydisp+Math.min(this._rowsToLinkify.end,this._bufferService.rows)+1,e=Math.ceil(2e3/this._bufferService.cols),r=this._bufferService.buffer.iterator(!1,t,i,e,e);r.hasNext();)for(var n=r.next(),o=0;o>9&511:void 0;s.validationCallback?s.validationCallback(t,function(e){c._rowsTimeoutId||e&&c._addLink(i[1],i[0]-c._bufferService.buffer.ydisp,t,s,r)}):u._addLink(i[1],i[0]-u._bufferService.buffer.ydisp,t,s,r)}(););},r.prototype._addLink=function(e,t,i,r,n){var o,s,a,c,l,h=this;this._mouseZoneManager&&this._element&&(o=this._unicodeService.getStringCellWidth(i),s=e%this._bufferService.cols,a=t+Math.floor(e/this._bufferService.cols),c=(s+o)%this._bufferService.cols,l=a+Math.floor((s+o)/this._bufferService.cols),0===c&&(c=this._bufferService.cols,l--),this._mouseZoneManager.add(new u(1+s,a+1,c+1,l+1,function(e){if(r.handler)return r.handler(e,i);e=window.open();e?(e.opener=null,e.location.href=i):console.warn("Opening link blocked as opener could not be cleared")},function(){h._onLinkHover.fire(h._createLinkHoverEvent(s,a,c,l,n)),h._element.classList.add("xterm-cursor-pointer")},function(e){h._onLinkTooltip.fire(h._createLinkHoverEvent(s,a,c,l,n)),r.hoverTooltipCallback&&r.hoverTooltipCallback(e,i,{start:{x:s,y:a},end:{x:c,y:l}})},function(){h._onLinkLeave.fire(h._createLinkHoverEvent(s,a,c,l,n)),h._element.classList.remove("xterm-cursor-pointer"),r.hoverLeaveCallback&&r.hoverLeaveCallback()},function(e){return!r.willLinkActivate||r.willLinkActivate(e,i)})))},r.prototype._createLinkHoverEvent=function(e,t,i,r,n){return{x1:e,y1:t,x2:i,y2:r,cols:this._bufferService.cols,fg:n}},r._timeBeforeLatency=200,r);function r(e,t,i,r){this._bufferService=e,this._logService=t,this._optionsService=i,this._unicodeService=r,this._linkMatchers=[],this._nextLinkMatcherId=0,this._onLinkHover=new n.EventEmitter,this._onLinkLeave=new n.EventEmitter,this._onLinkTooltip=new n.EventEmitter,this._rowsToLinkify={start:void 0,end:void 0}}t.Linkifier=i;var u=function(e,t,i,r,n,o,s,a,c){this.x1=e,this.y1=t,this.x2=i,this.y2=r,this.clickCallback=n,this.hoverCallback=o,this.tooltipCallback=s,this.leaveCallback=a,this.willLinkActivate=c};t.MouseZone=u},function(e,t,i){"use strict";var r=this&&this.__decorate||function(e,t,i,r){var n,o=arguments.length,s=o<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,i):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,i,r);else for(var a=e.length-1;0<=a;a--)(n=e[a])&&(s=(o<3?n(s):3t[1]&&e[1]=t[0]&&e[0]=t[0]},d.prototype.selectWordAtCursor=function(e){e=this._getMouseBufferCoords(e);e&&(this._selectWordAt(e,!1),this._model.selectionEnd=void 0,this.refresh(!0))},d.prototype.selectAll=function(){this._model.isSelectAllActive=!0,this.refresh(),this._onSelectionChange.fire()},d.prototype.selectLines=function(e,t){this._model.clearSelection(),e=Math.max(e,0),t=Math.min(t,this._bufferService.buffer.lines.length-1),this._model.selectionStart=[0,e],this._model.selectionEnd=[this._bufferService.cols,t],this.refresh(),this._onSelectionChange.fire()},d.prototype._onTrim=function(e){this._model.onTrim(e)&&this.refresh()},d.prototype._getMouseBufferCoords=function(e){e=this._mouseService.getCoords(e,this._screenElement,this._bufferService.cols,this._bufferService.rows,!0);if(e)return e[0]--,e[1]--,e[1]+=this._bufferService.buffer.ydisp,e},d.prototype._getMouseEventScrollAmount=function(e){var t=a.getCoordsRelativeToElement(e,this._screenElement)[1],e=this._bufferService.rows*Math.ceil(this._charSizeService.height*this._optionsService.options.lineHeight);return 0<=t&&t<=e?0:(e=r;r++){var n=e.loadCell(r,this._workCell).getChars().length;0===this._workCell.getWidth()?i--:1=this._bufferService.cols)){var n=this._bufferService.buffer,o=n.lines.get(e[1]);if(o){var s=n.translateBufferLineToString(e[1],!1),a=this._convertViewportColToCharacterIndex(o,e),c=a,l=e[0]-a,h=0,u=0,f=0,_=0;if(" "===s.charAt(a)){for(;0this._bufferService.cols;)t.length-=this._bufferService.cols,i++;this._model.selectionEnd=[this._model.areSelectionValuesReversed()?t.start:t.start+t.length,i]}},d.prototype._isCharWordSeparator=function(e){return 0!==e.getWidth()&&0<=this._optionsService.options.wordSeparator.indexOf(e.getChars())},d.prototype._selectLineAt=function(e){e=this._bufferService.buffer.getWrappedRangeForLine(e);this._model.selectionStart=[0,e.first],this._model.selectionEnd=[this._bufferService.cols,e.last],this._model.selectionStartLength=0},r([n(3,o.ICharSizeService),n(4,s.IBufferService),n(5,s.ICoreService),n(6,o.IMouseService),n(7,s.IOptionsService)],d));function d(e,t,i,r,n,o,s,a){var c=this;this._scrollLines=e,this._element=t,this._screenElement=i,this._charSizeService=r,this._bufferService=n,this._coreService=o,this._mouseService=s,this._optionsService=a,this._dragScrollAmount=0,this._enabled=!0,this._workCell=new h.CellData,this._mouseDownTimeStamp=0,this._onLinuxMouseSelection=new u.EventEmitter,this._onRedrawRequest=new u.EventEmitter,this._onSelectionChange=new u.EventEmitter,this._mouseMoveListener=function(e){return c._onMouseMove(e)},this._mouseUpListener=function(e){return c._onMouseUp(e)},this._coreService.onUserInput(function(){c.hasSelection&&c.clearSelection()}),this._trimListener=this._bufferService.buffer.lines.onTrim(function(e){return c._onTrim(e)}),this._bufferService.buffers.onBufferActivate(function(e){return c._onBufferActivate(e)}),this.enable(),this._model=new l.SelectionModel(this._bufferService),this._activeSelectionMode=0}t.SelectionService=s},function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=(n.prototype.clearSelection=function(){this.selectionStart=void 0,this.selectionEnd=void 0,this.isSelectAllActive=!1,this.selectionStartLength=0},Object.defineProperty(n.prototype,"finalSelectionStart",{get:function(){return this.isSelectAllActive?[0,0]:this.selectionEnd&&this.selectionStart&&this.areSelectionValuesReversed()?this.selectionEnd:this.selectionStart},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"finalSelectionEnd",{get:function(){if(this.isSelectAllActive)return[this._bufferService.cols,this._bufferService.buffer.ybase+this._bufferService.rows-1];if(this.selectionStart){if(this.selectionEnd&&!this.areSelectionValuesReversed())return this.selectionStartLength&&this.selectionEnd[1]===this.selectionStart[1]?[Math.max(this.selectionStart[0]+this.selectionStartLength,this.selectionEnd[0]),this.selectionEnd[1]]:this.selectionEnd;var e=this.selectionStart[0]+this.selectionStartLength;return e>this._bufferService.cols?[e%this._bufferService.cols,this.selectionStart[1]+Math.floor(e/this._bufferService.cols)]:[e,this.selectionStart[1]]}},enumerable:!0,configurable:!0}),n.prototype.areSelectionValuesReversed=function(){var e=this.selectionStart,t=this.selectionEnd;return!(!e||!t)&&(e[1]>t[1]||e[1]===t[1]&&e[0]>t[0])},n.prototype.onTrim=function(e){return this.selectionStart&&(this.selectionStart[1]-=e),this.selectionEnd&&(this.selectionEnd[1]-=e),this.selectionEnd&&this.selectionEnd[1]<0?(this.clearSelection(),!0):(this.selectionStart&&this.selectionStart[1]<0&&(this.selectionStart[1]=0),!1)},n);function n(e){this._bufferService=e,this.isSelectAllActive=!1,this.selectionStartLength=0}t.SelectionModel=r},function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=i(12);function y(e,t,i,r){var n=e-b(i,e),o=t-b(i,t);return C(Math.abs(n-o)-function(e,t,i){for(var r=0,n=e-b(i,e),o=t-b(i,t),s=0;so.cols-1?(c+=o.buffer.translateBufferLineToString(a,!1,e,s),e=s=0,a++):!n&&s<0&&(c+=o.buffer.translateBufferLineToString(a,!1,0,e+1),e=s=o.cols-1,a--);return c+o.buffer.translateBufferLineToString(a,!1,e,s)}function S(e,t){t=t?"O":"[";return r.C0.ESC+t+e}function C(e,t){e=Math.floor(e);for(var i="",r=0;re&&r.y1<=t+1||r.y2>e&&r.y2<=t+1||r.y1t+1)&&(this._currentZone&&this._currentZone===r&&(this._currentZone.leaveCallback(),this._currentZone=void 0),this._zones.splice(i--,1))}0===this._zones.length&&this._deactivate()}},u.prototype._activate=function(){this._areZonesActive||(this._areZonesActive=!0,this._element.addEventListener("mousemove",this._mouseMoveListener),this._element.addEventListener("mouseleave",this._mouseLeaveListener),this._element.addEventListener("click",this._clickListener))},u.prototype._deactivate=function(){this._areZonesActive&&(this._areZonesActive=!1,this._element.removeEventListener("mousemove",this._mouseMoveListener),this._element.removeEventListener("mouseleave",this._mouseLeaveListener),this._element.removeEventListener("click",this._clickListener))},u.prototype._onMouseMove=function(e){this._lastHoverCoords[0]===e.pageX&&this._lastHoverCoords[1]===e.pageY||(this._onHover(e),this._lastHoverCoords=[e.pageX,e.pageY])},u.prototype._onHover=function(e){var t=this,i=this._findZoneEventAt(e);i!==this._currentZone&&(this._currentZone&&(this._currentZone.leaveCallback(),this._currentZone=void 0,this._tooltipTimeout&&clearTimeout(this._tooltipTimeout)),i&&((this._currentZone=i).hoverCallback&&i.hoverCallback(e),this._tooltipTimeout=setTimeout(function(){return t._onTooltip(e)},500)))},u.prototype._onTooltip=function(e){this._tooltipTimeout=void 0;var t=this._findZoneEventAt(e);t&&t.tooltipCallback&&t.tooltipCallback(e)},u.prototype._onMouseDown=function(e){var t;this._initialSelectionLength=this._getSelectionLength(),this._areZonesActive&&null!==(t=this._findZoneEventAt(e))&&void 0!==t&&t.willLinkActivate(e)&&(e.preventDefault(),e.stopImmediatePropagation())},u.prototype._onMouseLeave=function(e){this._currentZone&&(this._currentZone.leaveCallback(),this._currentZone=void 0,this._tooltipTimeout&&clearTimeout(this._tooltipTimeout))},u.prototype._onClick=function(e){var t=this._findZoneEventAt(e),i=this._getSelectionLength();t&&i===this._initialSelectionLength&&(t.clickCallback(e),e.preventDefault(),e.stopImmediatePropagation())},u.prototype._getSelectionLength=function(){var e=this._selectionService.selectionText;return e?e.length:0},u.prototype._findZoneEventAt=function(e){e=this._mouseService.getCoords(e,this._screenElement,this._bufferService.cols,this._bufferService.rows);if(e)for(var t=e[0],i=e[1],r=0;r=n.x1&&t=n.x1||i===n.y2&&tn.y1&&ie;)this._rowContainer.removeChild(this._rowElements.pop());this._rowElements[this._rowElements.length-1].addEventListener("focus",this._bottomBoundaryFocusListener),this._refreshRowsDimensions()},f.prototype._createAccessibilityTreeNode=function(){var e=document.createElement("div");return e.setAttribute("role","listitem"),e.tabIndex=-1,this._refreshRowDimensions(e),e},f.prototype._onTab=function(e){for(var t=0;tt;)this._rowContainer.removeChild(this._rowElements.pop())},b.prototype.onResize=function(e,t){this._refreshRowElements(e,t),this._updateDimensions()},b.prototype.onCharSizeChanged=function(){this._updateDimensions()},b.prototype.onBlur=function(){this._rowContainer.classList.remove("xterm-focus")},b.prototype.onFocus=function(){this._rowContainer.classList.add("xterm-focus")},b.prototype.onSelectionChanged=function(e,t,i){for(;this._selectionContainer.children.length;)this._selectionContainer.removeChild(this._selectionContainer.children[0]);var r,n,o,s,a;e&&t&&(a=e[1]-this._bufferService.buffer.ydisp,r=t[1]-this._bufferService.buffer.ydisp,n=Math.max(a,0),o=Math.min(r,this._bufferService.rows-1),n>=this._bufferService.rows||o<0||(s=document.createDocumentFragment(),i?s.appendChild(this._createSelectionElement(n,e[0],t[0],o-n+1)):(a=a===n?e[0]:0,e=n===o?t[0]:this._bufferService.cols,s.appendChild(this._createSelectionElement(n,a,e)),e=o-n-1,s.appendChild(this._createSelectionElement(n+1,0,this._bufferService.cols,e)),n!==o&&(t=r===o?t[0]:this._bufferService.cols,s.appendChild(this._createSelectionElement(o,0,t)))),this._selectionContainer.appendChild(s)))},b.prototype._createSelectionElement=function(e,t,i,r){void 0===r&&(r=1);var n=document.createElement("div");return n.style.height=r*this.dimensions.actualCellHeight+"px",n.style.top=e*this.dimensions.actualCellHeight+"px",n.style.left=t*this.dimensions.actualCellWidth+"px",n.style.width=this.dimensions.actualCellWidth*(i-t)+"px",n},b.prototype.onCursorMove=function(){},b.prototype.onOptionsChanged=function(){this._updateDimensions(),this._injectCss()},b.prototype.clear=function(){this._rowElements.forEach(function(e){return e.innerHTML=""})},b.prototype.renderRows=function(e,t){for(var i=this._bufferService.buffer.ybase+this._bufferService.buffer.y,r=this._bufferService.buffer.x,n=this._optionsService.options.cursorBlink,o=e;o<=t;o++){var s=this._rowElements[o];s.innerHTML="";var a=o+this._bufferService.buffer.ydisp,c=this._bufferService.buffer.lines.get(a),l=this._optionsService.options.cursorStyle;s.appendChild(this._rowFactory.createRow(c,a===i,l,r,n,this.dimensions.actualCellWidth,this._bufferService.cols))}},Object.defineProperty(b.prototype,"_terminalSelector",{get:function(){return"."+p+this._terminalClass},enumerable:!0,configurable:!0}),b.prototype.registerCharacterJoiner=function(e){return-1},b.prototype.deregisterCharacterJoiner=function(e){return!1},b.prototype._onLinkHover=function(e){this._setCellUnderline(e.x1,e.x2,e.y1,e.y2,e.cols,!0)},b.prototype._onLinkLeave=function(e){this._setCellUnderline(e.x1,e.x2,e.y1,e.y2,e.cols,!1)},b.prototype._setCellUnderline=function(e,t,i,r,n,o){for(;e!==t||i!==r;){var s=this._rowElements[i];if(!s)return;s=s.children[e];s&&(s.style.textDecoration=o?"underline":"none"),++e>=n&&(e=0,i++)}},o([s(5,u.ICharSizeService),s(6,f.IOptionsService),s(7,f.IBufferService)],b));function b(e,t,i,r,n,o,s,a){var c=l.call(this)||this;return c._colors=e,c._element=t,c._screenElement=i,c._viewportElement=r,c._linkifier=n,c._charSizeService=o,c._optionsService=s,c._bufferService=a,c._terminalClass=y++,c._rowElements=[],c._onRequestRefreshRows=new _.EventEmitter,c._rowContainer=document.createElement("div"),c._rowContainer.classList.add(v),c._rowContainer.style.lineHeight="normal",c._rowContainer.setAttribute("aria-hidden","true"),c._refreshRowElements(c._bufferService.cols,c._bufferService.rows),c._selectionContainer=document.createElement("div"),c._selectionContainer.classList.add(g),c._selectionContainer.setAttribute("aria-hidden","true"),c.dimensions={scaledCharWidth:0,scaledCharHeight:0,scaledCellWidth:0,scaledCellHeight:0,scaledCharLeft:0,scaledCharTop:0,scaledCanvasWidth:0,scaledCanvasHeight:0,canvasWidth:0,canvasHeight:0,actualCellWidth:0,actualCellHeight:0},c._updateDimensions(),c._injectCss(),c._rowFactory=new h.DomRendererRowFactory(document,c._optionsService,c._colors),c._element.classList.add(p+c._terminalClass),c._screenElement.appendChild(c._rowContainer),c._screenElement.appendChild(c._selectionContainer),c._linkifier.onLinkHover(function(e){return c._onLinkHover(e)}),c._linkifier.onLinkLeave(function(e){return c._onLinkLeave(e)}),c}t.DomRenderer=f},function(e,y,t){"use strict";Object.defineProperty(y,"__esModule",{value:!0});var b=t(9),m=t(3),r=t(5),S=t(10);y.BOLD_CLASS="xterm-bold",y.DIM_CLASS="xterm-dim",y.ITALIC_CLASS="xterm-italic",y.UNDERLINE_CLASS="xterm-underline",y.CURSOR_CLASS="xterm-cursor",y.CURSOR_BLINK_CLASS="xterm-cursor-blink",y.CURSOR_STYLE_BLOCK_CLASS="xterm-cursor-block",y.CURSOR_STYLE_BAR_CLASS="xterm-cursor-bar",y.CURSOR_STYLE_UNDERLINE_CLASS="xterm-cursor-underline";i.prototype.setColors=function(e){this._colors=e},i.prototype.createRow=function(e,t,i,r,n,o,s){for(var a=this._document.createDocumentFragment(),c=0,l=Math.min(e.length,s)-1;0<=l;l--)if(e.loadCell(l,this._workCell).getCode()!==m.NULL_CELL_CODE||t&&l===r){c=l+1;break}for(l=0;l>16&255,f>>8&255,255&f);this._applyMinimumContrast(u,this._colors.background,g)||this._addStyle(u,"color:#"+C(f.toString(16),"0",6));break;case 0:default:this._applyMinimumContrast(u,this._colors.background,this._colors.foreground)||v&&u.classList.add("xterm-fg-"+b.INVERTED_DEFAULT_COLOR)}switch(p){case 16777216:case 33554432:u.classList.add("xterm-bg-"+d);break;case 50331648:this._addStyle(u,"background-color:#"+C(d.toString(16),"0",6));break;case 0:default:v&&u.classList.add("xterm-bg-"+b.INVERTED_DEFAULT_COLOR)}a.appendChild(u)}}return a},i.prototype._applyMinimumContrast=function(e,t,i){if(1===this._optionsService.options.minimumContrastRatio)return!1;var r=this._colors.contrastCache.getColor(this._workCell.bg,this._workCell.fg);return void 0===r&&(r=S.color.ensureContrastRatio(t,i,this._optionsService.options.minimumContrastRatio),this._colors.contrastCache.setColor(this._workCell.bg,this._workCell.fg,null!=r?r:null)),!!r&&(this._addStyle(e,"color:"+r.css),!0)},i.prototype._addStyle=function(e,t){e.setAttribute("style",""+(e.getAttribute("style")||"")+t+";")},t=i;function i(e,t,i){this._document=e,this._optionsService=t,this._colors=i,this._workCell=new r.CellData}function C(e,t,i){for(;e.length"],191:["/","?"],192:["`","~"],219:["[","{"],220:["\\","|"],221:["]","}"],222:["'",'"']};t.evaluateKeyboardEvent=function(e,t,i,r){var n,o={type:0,cancel:!1,key:void 0},s=(e.shiftKey?1:0)|(e.altKey?2:0)|(e.ctrlKey?4:0)|(e.metaKey?8:0);switch(e.keyCode){case 0:"UIKeyInputUpArrow"===e.key?o.key=t?a.C0.ESC+"OA":a.C0.ESC+"[A":"UIKeyInputLeftArrow"===e.key?o.key=t?a.C0.ESC+"OD":a.C0.ESC+"[D":"UIKeyInputRightArrow"===e.key?o.key=t?a.C0.ESC+"OC":a.C0.ESC+"[C":"UIKeyInputDownArrow"===e.key&&(o.key=t?a.C0.ESC+"OB":a.C0.ESC+"[B");break;case 8:if(e.shiftKey){o.key=a.C0.BS;break}if(e.altKey){o.key=a.C0.ESC+a.C0.DEL;break}o.key=a.C0.DEL;break;case 9:if(e.shiftKey){o.key=a.C0.ESC+"[Z";break}o.key=a.C0.HT,o.cancel=!0;break;case 13:o.key=a.C0.CR,o.cancel=!0;break;case 27:o.key=a.C0.ESC,o.cancel=!0;break;case 37:if(e.metaKey)break;s?(o.key=a.C0.ESC+"[1;"+(1+s)+"D",o.key===a.C0.ESC+"[1;3D"&&(o.key=a.C0.ESC+(i?"b":"[1;5D"))):o.key=t?a.C0.ESC+"OD":a.C0.ESC+"[D";break;case 39:if(e.metaKey)break;s?(o.key=a.C0.ESC+"[1;"+(1+s)+"C",o.key===a.C0.ESC+"[1;3C"&&(o.key=a.C0.ESC+(i?"f":"[1;5C"))):o.key=t?a.C0.ESC+"OC":a.C0.ESC+"[C";break;case 38:if(e.metaKey)break;s?(o.key=a.C0.ESC+"[1;"+(1+s)+"A",i||o.key!==a.C0.ESC+"[1;3A"||(o.key=a.C0.ESC+"[1;5A")):o.key=t?a.C0.ESC+"OA":a.C0.ESC+"[A";break;case 40:if(e.metaKey)break;s?(o.key=a.C0.ESC+"[1;"+(1+s)+"B",i||o.key!==a.C0.ESC+"[1;3B"||(o.key=a.C0.ESC+"[1;5B")):o.key=t?a.C0.ESC+"OB":a.C0.ESC+"[B";break;case 45:e.shiftKey||e.ctrlKey||(o.key=a.C0.ESC+"[2~");break;case 46:o.key=s?a.C0.ESC+"[3;"+(1+s)+"~":a.C0.ESC+"[3~";break;case 36:o.key=s?a.C0.ESC+"[1;"+(1+s)+"H":t?a.C0.ESC+"OH":a.C0.ESC+"[H";break;case 35:o.key=s?a.C0.ESC+"[1;"+(1+s)+"F":t?a.C0.ESC+"OF":a.C0.ESC+"[F";break;case 33:e.shiftKey?o.type=2:o.key=a.C0.ESC+"[5~";break;case 34:e.shiftKey?o.type=3:o.key=a.C0.ESC+"[6~";break;case 112:o.key=s?a.C0.ESC+"[1;"+(1+s)+"P":a.C0.ESC+"OP";break;case 113:o.key=s?a.C0.ESC+"[1;"+(1+s)+"Q":a.C0.ESC+"OQ";break;case 114:o.key=s?a.C0.ESC+"[1;"+(1+s)+"R":a.C0.ESC+"OR";break;case 115:o.key=s?a.C0.ESC+"[1;"+(1+s)+"S":a.C0.ESC+"OS";break;case 116:o.key=s?a.C0.ESC+"[15;"+(1+s)+"~":a.C0.ESC+"[15~";break;case 117:o.key=s?a.C0.ESC+"[17;"+(1+s)+"~":a.C0.ESC+"[17~";break;case 118:o.key=s?a.C0.ESC+"[18;"+(1+s)+"~":a.C0.ESC+"[18~";break;case 119:o.key=s?a.C0.ESC+"[19;"+(1+s)+"~":a.C0.ESC+"[19~";break;case 120:o.key=s?a.C0.ESC+"[20;"+(1+s)+"~":a.C0.ESC+"[20~";break;case 121:o.key=s?a.C0.ESC+"[21;"+(1+s)+"~":a.C0.ESC+"[21~";break;case 122:o.key=s?a.C0.ESC+"[23;"+(1+s)+"~":a.C0.ESC+"[23~";break;case 123:o.key=s?a.C0.ESC+"[24;"+(1+s)+"~":a.C0.ESC+"[24~";break;default:!e.ctrlKey||e.shiftKey||e.altKey||e.metaKey?i&&!r||!e.altKey||e.metaKey?i&&!e.altKey&&!e.ctrlKey&&e.metaKey?65===e.keyCode&&(o.type=1):e.key&&!e.ctrlKey&&!e.altKey&&!e.metaKey&&48<=e.keyCode&&1===e.key.length?o.key=e.key:e.key&&e.ctrlKey&&"_"===e.key&&(o.key=a.C0.US):(n=(n=c[e.keyCode])&&n[e.shiftKey?1:0])?o.key=a.C0.ESC+n:65<=e.keyCode&&e.keyCode<=90&&(n=e.ctrlKey?e.keyCode-64:e.keyCode+32,o.key=a.C0.ESC+String.fromCharCode(n)):65<=e.keyCode&&e.keyCode<=90?o.key=String.fromCharCode(e.keyCode-64):32===e.keyCode?o.key=a.C0.NUL:51<=e.keyCode&&e.keyCode<=55?o.key=String.fromCharCode(e.keyCode-51+27):56===e.keyCode?o.key=a.C0.DEL:219===e.keyCode?o.key=a.C0.ESC:220===e.keyCode?o.key=a.C0.FS:221===e.keyCode&&(o.key=a.C0.GS)}return o}},function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=i(3);t.updateWindowsModeWrappedState=function(e){var t=null===(t=e.buffer.lines.get(e.buffer.ybase+e.buffer.y-1))||void 0===t?void 0:t.get(e.cols-1),e=e.buffer.lines.get(e.buffer.ybase+e.buffer.y);e&&t&&(e.isWrapped=t[r.CHAR_DATA_CODE_INDEX]!==r.NULL_CELL_CODE&&t[r.CHAR_DATA_CODE_INDEX]!==r.WHITESPACE_CELL_CODE)}},function(e,t,i){"use strict";var r,n=this&&this.__extends||(r=function(e,t){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var i in t)t.hasOwnProperty(i)&&(e[i]=t[i])})(e,t)},function(e,t){function i(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(i.prototype=t.prototype,new i)}),o=this&&this.__decorate||function(e,t,i,r){var n,o=arguments.length,s=o<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,i):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,i,r);else for(var a=e.length-1;0<=a;a--)(n=e[a])&&(s=(o<3?n(s):3this._rows},enumerable:!0,configurable:!0}),Object.defineProperty(c.prototype,"isCursorInViewport",{get:function(){var e=this.ybase+this.y-this.ydisp;return 0<=e&&et.MAX_BUFFER_SIZE?t.MAX_BUFFER_SIZE:e},c.prototype.fillViewportRows=function(e){if(0===this.lines.length){void 0===e&&(e=D.DEFAULT_ATTR_DATA);for(var t=this._rows;t--;)this.lines.push(this.getBlankLine(e))}},c.prototype.clear=function(){this.ydisp=0,this.ybase=0,this.y=0,this.x=0,this.lines=new r.CircularList(this._getCorrectBufferLength(this._rows)),this.scrollTop=0,this.scrollBottom=this._rows-1,this.setupTabStops()},c.prototype.resize=function(e,t){var i=this.getNullCell(D.DEFAULT_ATTR_DATA),r=this._getCorrectBufferLength(t);if(r>this.lines.maxLength&&(this.lines.maxLength=r),0t+this.ybase&&(this.lines.length>this.ybase+this.y+1?this.lines.pop():(this.ybase++,this.ydisp++));re))for(n=0;nthis._cols?this._reflowLarger(e,t):this._reflowSmaller(e,t))},c.prototype._reflowLarger=function(e,t){var i=T.reflowLargerGetLinesToRemove(this.lines,this._cols,e,this.ybase+this.y,this.getNullCell(D.DEFAULT_ATTR_DATA));0E+R){for(var x=A.newLines.length-1;0<=x;x--)this.lines.set(_--,A.newLines[x]);_++,S.push({index:E+1,amount:A.newLines.length}),R+=A.newLines.length,A=r[++L]}else this.lines.set(_,C[E--]);var k=0;for(_=S.length-1;0<=_;_--)S[_].index+=k,this.lines.onInsertEmitter.fire(S[_]),k+=S[_].amount;w=Math.max(0,w+n-this.lines.maxLength);0=this._cols?this._cols-1:e<0?0:e},c.prototype.nextStop=function(e){for(null==e&&(e=this.x);!this.tabs[++e]&&e=this._cols?this._cols-1:e<0?0:e},c.prototype.addMarker=function(e){var t=this,i=new o.Marker(e);return this.markers.push(i),i.register(this.lines.onTrim(function(e){i.line-=e,i.line<0&&i.dispose()})),i.register(this.lines.onInsert(function(e){i.line>=e.index&&(i.line+=e.amount)})),i.register(this.lines.onDelete(function(e){i.line>=e.index&&i.linee.index&&(i.line-=e.amount)})),i.register(i.onDispose(function(){return t._removeMarker(i)})),i},c.prototype._removeMarker=function(e){this.markers.splice(this.markers.indexOf(e),1)},c.prototype.iterator=function(e,t,i,r,n){return new l(this,e,t,i,r,n)},i=c;function c(e,t,i){this._hasScrollback=e,this._optionsService=t,this._bufferService=i,this.ydisp=0,this.ybase=0,this.y=0,this.x=0,this.savedY=0,this.savedX=0,this.savedCurAttrData=D.DEFAULT_ATTR_DATA.clone(),this.savedCharset=a.DEFAULT_CHARSET,this.markers=[],this._nullCell=n.CellData.fromCharData([0,s.NULL_CELL_CHAR,s.NULL_CELL_WIDTH,s.NULL_CELL_CODE]),this._whitespaceCell=n.CellData.fromCharData([0,s.WHITESPACE_CELL_CHAR,s.WHITESPACE_CELL_WIDTH,s.WHITESPACE_CELL_CODE]),this._cols=this._bufferService.cols,this._rows=this._bufferService.rows,this.lines=new r.CircularList(this._getCorrectBufferLength(this._rows)),this.scrollTop=0,this.scrollBottom=this._rows-1,this.setupTabStops()}t.Buffer=i;var l=(h.prototype.hasNext=function(){return this._currentthis._endIndex+this._endOverscan&&(e.last=this._endIndex+this._endOverscan),e.first=Math.max(e.first,0),e.last=Math.min(e.last,this._buffer.lines.length);for(var t="",i=e.first;i<=e.last;++i)t+=this._buffer.translateBufferLineToString(i,this._trimRight);return this._current=e.last+1,{range:e,content:t}},h);function h(e,t,i,r,n,o){void 0===i&&(i=0),void 0===r&&(r=e.lines.length),void 0===n&&(n=0),void 0===o&&(o=0),this._buffer=e,this._trimRight=t,this._startIndex=i,this._endIndex=r,this._startOverscan=n,this._endOverscan=o,this._startIndex<0&&(this._startIndex=0),this._endIndex>this._buffer.lines.length&&(this._endIndex=this._buffer.lines.length),this._current=this._startIndex}t.BufferStringIterator=l},function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=i(1),i=(Object.defineProperty(n.prototype,"onDelete",{get:function(){return this.onDeleteEmitter.event},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"onInsert",{get:function(){return this.onInsertEmitter.event},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"onTrim",{get:function(){return this.onTrimEmitter.event},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"maxLength",{get:function(){return this._maxLength},set:function(e){if(this._maxLength!==e){for(var t=new Array(e),i=0;ithis._length)for(var t=this._length;tthis._maxLength?(i=this._length+r.length-this._maxLength,this._startIndex+=i,this._length=this._maxLength,this.onTrimEmitter.fire(i)):this._length+=r.length},n.prototype.trimStart=function(e){e>this._length&&(e=this._length),this._startIndex+=e,this._length-=e,this.onTrimEmitter.fire(e)},n.prototype.shiftElements=function(e,t,i){if(!(t<=0)){if(e<0||e>=this._length)throw new Error("start argument out of range");if(e+i<0)throw new Error("Cannot shift elements in list beyond index 0");if(0this._maxLength;)this._length--,this._startIndex++,this.onTrimEmitter.fire(1)}else for(r=0;rthis._end&&(this._end=e)},o.prototype.markRangeDirty=function(e,t){var i;tthis._end&&(this._end=t)},o.prototype.markAllDirty=function(){this.markRangeDirty(0,this._bufferService.rows-1)},i=r([n(0,i.IBufferService)],o);function o(e){this._bufferService=e,this.clearRange()}t.DirtyRowService=i},function(e,t,i){"use strict";var l=this&&this.__spreadArrays||function(){for(var e=0,t=0,i=arguments.length;t=this._bufferService.cols||e.row<0||e.row>=this._bufferService.rows)return!1;if(4===e.button&&32===e.action)return!1;if(3===e.button&&32!==e.action)return!1;if(4!==e.button&&(2===e.action||3===e.action))return!1;if(e.col++,e.row++,32===e.action&&this._lastEvent&&this._compareEvents(this._lastEvent,e))return!1;if(!this._protocols[this._activeProtocol].restrict(e))return!1;var t=this._encodings[this._activeEncoding](e);return t&&("DEFAULT"===this._activeEncoding?this._coreService.triggerBinaryEvent(t):this._coreService.triggerDataEvent(t,!0)),this._lastEvent=e,!0},u.prototype.explainEvents=function(e){return{DOWN:!!(1&e),UP:!!(2&e),DRAG:!!(4&e),MOVE:!!(8&e),WHEEL:!!(16&e)}},u.prototype._compareEvents=function(e,t){return e.col===t.col&&e.row===t.row&&e.button===t.button&&e.action===t.action&&e.ctrl===t.ctrl&&e.alt===t.alt&&e.shift===t.shift},r([n(0,o.IBufferService),n(1,o.ICoreService)],u));function u(e,t){var i=this;this._bufferService=e,this._coreService=t,this._protocols={},this._encodings={},this._activeProtocol="",this._activeEncoding="",this._onProtocolChange=new s.EventEmitter,this._lastEvent=null,Object.keys(a).forEach(function(e){return i.addProtocol(e,a[e])}),Object.keys(h).forEach(function(e){return i.addEncoding(e,h[e])}),this.reset()}t.CoreMouseService=o},function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=(n.prototype.writeSync=function(e){if(this._writeBuffer.length){for(var t=this._bufferOffset;tthis._bufferOffset;){var i=this._writeBuffer[this._bufferOffset],r=this._callbacks[this._bufferOffset];if(this._bufferOffset++,this._action(i),this._pendingData-=i.length,r&&r(),12<=Date.now()-t)break}this._writeBuffer.length>this._bufferOffset?(50=i)return t+this.wcwidth(n);var o=e.charCodeAt(r);56320<=o&&o<=57343?n=1024*(n-55296)+o-56320+65536:t+=this.wcwidth(o)}t+=this.wcwidth(n)}return t},o);function o(){this._providers=Object.create(null),this._active="",this._onChange=new r.EventEmitter;var e=new n.UnicodeV6;this.register(e),this._active=e.version,this._activeProvider=e}t.UnicodeService=i},function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r,n=i(15),o=[[768,879],[1155,1158],[1160,1161],[1425,1469],[1471,1471],[1473,1474],[1476,1477],[1479,1479],[1536,1539],[1552,1557],[1611,1630],[1648,1648],[1750,1764],[1767,1768],[1770,1773],[1807,1807],[1809,1809],[1840,1866],[1958,1968],[2027,2035],[2305,2306],[2364,2364],[2369,2376],[2381,2381],[2385,2388],[2402,2403],[2433,2433],[2492,2492],[2497,2500],[2509,2509],[2530,2531],[2561,2562],[2620,2620],[2625,2626],[2631,2632],[2635,2637],[2672,2673],[2689,2690],[2748,2748],[2753,2757],[2759,2760],[2765,2765],[2786,2787],[2817,2817],[2876,2876],[2879,2879],[2881,2883],[2893,2893],[2902,2902],[2946,2946],[3008,3008],[3021,3021],[3134,3136],[3142,3144],[3146,3149],[3157,3158],[3260,3260],[3263,3263],[3270,3270],[3276,3277],[3298,3299],[3393,3395],[3405,3405],[3530,3530],[3538,3540],[3542,3542],[3633,3633],[3636,3642],[3655,3662],[3761,3761],[3764,3769],[3771,3772],[3784,3789],[3864,3865],[3893,3893],[3895,3895],[3897,3897],[3953,3966],[3968,3972],[3974,3975],[3984,3991],[3993,4028],[4038,4038],[4141,4144],[4146,4146],[4150,4151],[4153,4153],[4184,4185],[4448,4607],[4959,4959],[5906,5908],[5938,5940],[5970,5971],[6002,6003],[6068,6069],[6071,6077],[6086,6086],[6089,6099],[6109,6109],[6155,6157],[6313,6313],[6432,6434],[6439,6440],[6450,6450],[6457,6459],[6679,6680],[6912,6915],[6964,6964],[6966,6970],[6972,6972],[6978,6978],[7019,7027],[7616,7626],[7678,7679],[8203,8207],[8234,8238],[8288,8291],[8298,8303],[8400,8431],[12330,12335],[12441,12442],[43014,43014],[43019,43019],[43045,43046],[64286,64286],[65024,65039],[65056,65059],[65279,65279],[65529,65531]],s=[[68097,68099],[68101,68102],[68108,68111],[68152,68154],[68159,68159],[119143,119145],[119155,119170],[119173,119179],[119210,119213],[119362,119364],[917505,917505],[917536,917631],[917760,917999]],i=(a.prototype.wcwidth=function(e){return e<32?0:e<127?1:e<65536?r[e]:function(e,t){var i,r=0,n=t.length-1;if(!(et[n][1]))for(;r<=n;)if(e>t[i=r+n>>1][1])r=1+i;else{if(!(e>22},c.prototype.getChars=function(){return 2097152&this.content?this.combinedData:2097151&this.content?s.stringFromCodePoint(2097151&this.content):""},c.prototype.getCode=function(){return this.isCombined()?this.combinedData.charCodeAt(this.combinedData.length-1):2097151&this.content},c.prototype.setFromCharData=function(e){this.fg=e[a.CHAR_DATA_ATTR_INDEX],this.bg=0;var t,i,r=!1;2>>16&255,e>>>8&255,255&e]},n.fromColorRGB=function(e){return(255&e[0])<<16|(255&e[1])<<8|255&e[2]},n.prototype.clone=function(){var e=new n;return e.fg=this.fg,e.bg=this.bg,e},n.prototype.isInverse=function(){return 67108864&this.fg},n.prototype.isBold=function(){return 134217728&this.fg},n.prototype.isUnderline=function(){return 268435456&this.fg},n.prototype.isBlink=function(){return 536870912&this.fg},n.prototype.isInvisible=function(){return 1073741824&this.fg},n.prototype.isItalic=function(){return 67108864&this.bg},n.prototype.isDim=function(){return 134217728&this.bg},n.prototype.getFgColorMode=function(){return 50331648&this.fg},n.prototype.getBgColorMode=function(){return 50331648&this.bg},n.prototype.isFgRGB=function(){return 50331648==(50331648&this.fg)},n.prototype.isBgRGB=function(){return 50331648==(50331648&this.bg)},n.prototype.isFgPalette=function(){return 16777216==(50331648&this.fg)||33554432==(50331648&this.fg)},n.prototype.isBgPalette=function(){return 16777216==(50331648&this.bg)||33554432==(50331648&this.bg)},n.prototype.isFgDefault=function(){return 0==(50331648&this.fg)},n.prototype.isBgDefault=function(){return 0==(50331648&this.bg)},n.prototype.isAttributeDefault=function(){return 0===this.fg&&0===this.bg},n.prototype.getFgColor=function(){switch(50331648&this.fg){case 16777216:case 33554432:return 255&this.fg;case 50331648:return 16777215&this.fg;default:return-1}},n.prototype.getBgColor=function(){switch(50331648&this.bg){case 16777216:case 33554432:return 255&this.bg;case 50331648:return 16777215&this.bg;default:return-1}},n);function n(){this.fg=0,this.bg=0}t.AttributeData=r},function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.stringFromCodePoint=function(e){return 65535>10))+String.fromCharCode(e%1024+56320)):String.fromCharCode(e)},t.utf32ToString=function(e,t,i){void 0===i&&(i=e.length);for(var r="",n=t=void 0===t?0:t;n>10))+String.fromCharCode(o%1024+56320)):r+=String.fromCharCode(o)}return r};var r=(n.prototype.clear=function(){this._interim=0},n.prototype.decode=function(e,t){var i=e.length;if(!i)return 0;var r=0,n=0;this._interim&&(56320<=(s=e.charCodeAt(n++))&&s<=57343?t[r++]=1024*(this._interim-55296)+s-56320+65536:(t[r++]=this._interim,t[r++]=s),this._interim=0);for(var o=n;o=i)return this._interim=a,r;56320<=(s=e.charCodeAt(o))&&s<=57343?t[r++]=1024*(a-55296)+s-56320+65536:(t[r++]=a,t[r++]=s)}else t[r++]=a}return r},n);function n(){this._interim=0}t.StringToUtf32=r;o.prototype.clear=function(){this.interim.fill(0)},o.prototype.decode=function(e,t){var i=e.length;if(!i)return 0;var r,n,o,s,a=0,c=0,l=0;if(this.interim[0]){var h=!1,u=this.interim[0];u&=192==(224&u)?31:224==(240&u)?15:7;for(var f=0,_=void 0;(_=63&this.interim[++f])&&f<4;)u<<=6,u|=_;for(var d=192==(224&this.interim[0])?2:224==(240&this.interim[0])?3:4,p=d-f;l>24&255,n=e>>16&255,o=e>>8&255,s=t>>24&255,a=t>>16&255,c=t>>8&255,l=u(h.relativeLuminance2(s,c,a),h.relativeLuminance2(r,n,o));l>>0}function c(e,t,i){for(var r=e>>24&255,n=e>>16&255,o=e>>8&255,s=t>>24&255,a=t>>16&255,c=t>>8&255,l=u(h.relativeLuminance2(s,c,a),h.relativeLuminance2(r,n,o));l>>0}function l(e,t,i){e/=255,t/=255,i/=255;return.2126*(e<=.03928?e/12.92:Math.pow((.055+e)/1.055,2.4))+.7152*(t<=.03928?t/12.92:Math.pow((.055+t)/1.055,2.4))+.0722*(i<=.03928?i/12.92:Math.pow((.055+i)/1.055,2.4))}Object.defineProperty(t,"__esModule",{value:!0}),(r=a=t.channels||(t.channels={})).toCss=function(e,t,i,r){return void 0!==r?"#"+o(e)+o(t)+o(i)+o(r):"#"+o(e)+o(t)+o(i)},r.toRgba=function(e,t,i,r){return(e<<24|t<<16|i<<8|(r=void 0===r?255:r))>>>0},(r=t.color||(t.color={})).blend=function(e,t){var i=(255&t.rgba)/255;if(1==i)return{css:t.css,rgba:t.rgba};var r=t.rgba>>24&255,n=t.rgba>>16&255,o=t.rgba>>8&255,s=e.rgba>>24&255,t=e.rgba>>16&255,e=e.rgba>>8&255,s=s+Math.round((r-s)*i),t=t+Math.round((n-t)*i),i=e+Math.round((o-e)*i);return{css:a.toCss(s,t,i),rgba:a.toRgba(s,t,i)}},r.ensureContrastRatio=function(e,t,i){i=n.ensureContrastRatio(e.rgba,t.rgba,i);if(i)return n.toColor(i>>24&255,i>>16&255,i>>8&255)},r.opaque=function(e){var t=(255|e.rgba)>>>0,i=n.toChannels(t),r=i[0],e=i[1],i=i[2];return{css:a.toCss(r,e,i),rgba:t}},(t.css||(t.css={})).toColor=function(e){return{css:e,rgba:(parseInt(e.slice(1),16)<<8|255)>>>0}},(r=h=t.rgb||(t.rgb={})).relativeLuminance=function(e){return l(e>>16&255,e>>8&255,255&e)},r.relativeLuminance2=l,(r=n=t.rgba||(t.rgba={})).ensureContrastRatio=function(e,t,i){var r=h.relativeLuminance(e>>8),n=h.relativeLuminance(t>>8);if(u(r,n)>24&255,e>>16&255,e>>8&255,255&e]},r.toColor=function(e,t,i){return{css:a.toCss(e,t,i),rgba:a.toRgba(e,t,i)}},t.toPaddedHex=o,t.contrastRatio=u},function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r="undefined"==typeof navigator,n=r?"node":navigator.userAgent,r=r?"node":navigator.platform;function o(e,t){return 0<=e.indexOf(t)}t.isFirefox=!!~n.indexOf("Firefox"),t.isSafari=/^((?!chrome|android).)*safari/i.test(n),t.isMac=o(["Macintosh","MacIntel","MacPPC","Mac68K"],r),t.isIpad="iPad"===r,t.isIphone="iPhone"===r,t.isWindows=o(["Windows","Win16","Win32","WinCE"],r),t.isLinux=0<=r.indexOf("Linux")},function(e,t,i){"use strict";var r;Object.defineProperty(t,"__esModule",{value:!0}),(r=t.C0||(t.C0={})).NUL="\0",r.SOH="",r.STX="",r.ETX="",r.EOT="",r.ENQ="",r.ACK="",r.BEL="",r.BS="\b",r.HT="\t",r.LF="\n",r.VT="\v",r.FF="\f",r.CR="\r",r.SO="",r.SI="",r.DLE="",r.DC1="",r.DC2="",r.DC3="",r.DC4="",r.NAK="",r.SYN="",r.ETB="",r.CAN="",r.EM="",r.SUB="",r.ESC="",r.FS="",r.GS="",r.RS="",r.US="",r.SP=" ",r.DEL="",(t=t.C1||(t.C1={})).PAD="€",t.HOP="",t.BPH="‚",t.NBH="ƒ",t.IND="„",t.NEL="…",t.SSA="†",t.ESA="‡",t.HTS="ˆ",t.HTJ="‰",t.VTS="Š",t.PLD="‹",t.PLU="Œ",t.RI="",t.SS2="Ž",t.SS3="",t.DCS="",t.PU1="‘",t.PU2="’",t.STS="“",t.CCH="”",t.MW="•",t.SPA="–",t.EPA="—",t.SOS="˜",t.SGCI="™",t.SCI="š",t.CSI="›",t.ST="œ",t.OSC="",t.PM="ž",t.APC="Ÿ"},function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var s=i(3),a=i(9),r=i(23),o=i(6),n=i(26),c=i(10),i=(l.prototype.dispose=function(){var e;this._container.removeChild(this._canvas),null===(e=this._charAtlas)||void 0===e||e.dispose()},l.prototype._initCanvas=function(){this._ctx=n.throwIfFalsy(this._canvas.getContext("2d",{alpha:this._alpha})),this._alpha||this._clearAll()},l.prototype.onOptionsChanged=function(){},l.prototype.onBlur=function(){},l.prototype.onFocus=function(){},l.prototype.onCursorMove=function(){},l.prototype.onGridChanged=function(e,t){},l.prototype.onSelectionChanged=function(e,t,i){void 0===i&&(i=!1)},l.prototype.setColors=function(e){this._refreshCharAtlas(e)},l.prototype._setTransparency=function(e){var t;e!==this._alpha&&(t=this._canvas,this._alpha=e,this._canvas=this._canvas.cloneNode(),this._initCanvas(),this._container.replaceChild(this._canvas,t),this._refreshCharAtlas(this._colors),this.onGridChanged(0,this._bufferService.rows-1))},l.prototype._refreshCharAtlas=function(e){this._scaledCharWidth<=0&&this._scaledCharHeight<=0||(this._charAtlas=r.acquireCharAtlas(this._optionsService.options,this._rendererId,e,this._scaledCharWidth,this._scaledCharHeight),this._charAtlas.warmUp())},l.prototype.resize=function(e){this._scaledCellWidth=e.scaledCellWidth,this._scaledCellHeight=e.scaledCellHeight,this._scaledCharWidth=e.scaledCharWidth,this._scaledCharHeight=e.scaledCharHeight,this._scaledCharLeft=e.scaledCharLeft,this._scaledCharTop=e.scaledCharTop,this._canvas.width=e.scaledCanvasWidth,this._canvas.height=e.scaledCanvasHeight,this._canvas.style.width=e.canvasWidth+"px",this._canvas.style.height=e.canvasHeight+"px",this._alpha||this._clearAll(),this._refreshCharAtlas(this._colors)},l.prototype._fillCells=function(e,t,i,r){this._ctx.fillRect(e*this._scaledCellWidth,t*this._scaledCellHeight,i*this._scaledCellWidth,r*this._scaledCellHeight)},l.prototype._fillBottomLineAtCells=function(e,t,i){void 0===i&&(i=1),this._ctx.fillRect(e*this._scaledCellWidth,(t+1)*this._scaledCellHeight-window.devicePixelRatio-1,i*this._scaledCellWidth,window.devicePixelRatio)},l.prototype._fillLeftLineAtCell=function(e,t,i){this._ctx.fillRect(e*this._scaledCellWidth,t*this._scaledCellHeight,window.devicePixelRatio*i,this._scaledCellHeight)},l.prototype._strokeRectAtCell=function(e,t,i,r){this._ctx.lineWidth=window.devicePixelRatio,this._ctx.strokeRect(e*this._scaledCellWidth+window.devicePixelRatio/2,t*this._scaledCellHeight+window.devicePixelRatio/2,i*this._scaledCellWidth-window.devicePixelRatio,r*this._scaledCellHeight-window.devicePixelRatio)},l.prototype._clearAll=function(){this._alpha?this._ctx.clearRect(0,0,this._canvas.width,this._canvas.height):(this._ctx.fillStyle=this._colors.background.css,this._ctx.fillRect(0,0,this._canvas.width,this._canvas.height))},l.prototype._clearCells=function(e,t,i,r){this._alpha?this._ctx.clearRect(e*this._scaledCellWidth,t*this._scaledCellHeight,i*this._scaledCellWidth,r*this._scaledCellHeight):(this._ctx.fillStyle=this._colors.background.css,this._ctx.fillRect(e*this._scaledCellWidth,t*this._scaledCellHeight,i*this._scaledCellWidth,r*this._scaledCellHeight))},l.prototype._fillCharTrueColor=function(e,t,i){this._ctx.font=this._getFont(!1,!1),this._ctx.textBaseline="middle",this._clipRow(i),this._ctx.fillText(e.getChars(),t*this._scaledCellWidth+this._scaledCharLeft,i*this._scaledCellHeight+this._scaledCharTop+this._scaledCharHeight/2)},l.prototype._drawChars=function(e,t,i){var r,n,o=this._getContrastColor(e);o||e.isFgRGB()||e.isBgRGB()?this._drawUncachedChars(e,t,i,o):(e.isInverse()?(r=e.isBgDefault()?a.INVERTED_DEFAULT_COLOR:e.getBgColor(),n=e.isFgDefault()?a.INVERTED_DEFAULT_COLOR:e.getFgColor()):(n=e.isBgDefault()?s.DEFAULT_COLOR:e.getBgColor(),r=e.isFgDefault()?s.DEFAULT_COLOR:e.getFgColor()),r+=this._optionsService.options.drawBoldTextInBrightColors&&e.isBold()&&r<8?8:0,this._currentGlyphIdentifier.chars=e.getChars()||s.WHITESPACE_CELL_CHAR,this._currentGlyphIdentifier.code=e.getCode()||s.WHITESPACE_CELL_CODE,this._currentGlyphIdentifier.bg=n,this._currentGlyphIdentifier.fg=r,this._currentGlyphIdentifier.bold=!!e.isBold(),this._currentGlyphIdentifier.dim=!!e.isDim(),this._currentGlyphIdentifier.italic=!!e.isItalic(),this._charAtlas&&this._charAtlas.draw(this._ctx,this._currentGlyphIdentifier,t*this._scaledCellWidth+this._scaledCharLeft,i*this._scaledCellHeight+this._scaledCharTop)||this._drawUncachedChars(e,t,i))},l.prototype._drawUncachedChars=function(e,t,i,r){var n;this._ctx.save(),this._ctx.font=this._getFont(!!e.isBold(),!!e.isItalic()),this._ctx.textBaseline="middle",e.isInverse()?r?this._ctx.fillStyle=r.css:e.isBgDefault()?this._ctx.fillStyle=c.color.opaque(this._colors.background).css:e.isBgRGB()?this._ctx.fillStyle="rgb("+o.AttributeData.toColorRGB(e.getBgColor()).join(",")+")":(n=e.getBgColor(),this._optionsService.options.drawBoldTextInBrightColors&&e.isBold()&&n<8&&(n+=8),this._ctx.fillStyle=this._colors.ansi[n].css):r?this._ctx.fillStyle=r.css:e.isFgDefault()?this._ctx.fillStyle=this._colors.foreground.css:e.isFgRGB()?this._ctx.fillStyle="rgb("+o.AttributeData.toColorRGB(e.getFgColor()).join(",")+")":(r=e.getFgColor(),this._optionsService.options.drawBoldTextInBrightColors&&e.isBold()&&r<8&&(r+=8),this._ctx.fillStyle=this._colors.ansi[r].css),this._clipRow(i),e.isDim()&&(this._ctx.globalAlpha=a.DIM_OPACITY),this._ctx.fillText(e.getChars(),t*this._scaledCellWidth+this._scaledCharLeft,i*this._scaledCellHeight+this._scaledCharTop+this._scaledCharHeight/2),this._ctx.restore()},l.prototype._clipRow=function(e){this._ctx.beginPath(),this._ctx.rect(0,e*this._scaledCellHeight,this._bufferService.cols*this._scaledCellWidth,this._scaledCellHeight),this._ctx.clip()},l.prototype._getFont=function(e,t){return(t?"italic":"")+" "+(e?this._optionsService.options.fontWeightBold:this._optionsService.options.fontWeight)+" "+this._optionsService.options.fontSize*window.devicePixelRatio+"px "+this._optionsService.options.fontFamily},l.prototype._getContrastColor=function(e){if(1!==this._optionsService.options.minimumContrastRatio){var t=this._colors.contrastCache.getColor(e.bg,e.fg);if(void 0!==t)return t||void 0;var i=e.getFgColor(),r=e.getFgColorMode(),n=e.getBgColor(),o=e.getBgColorMode(),s=!!e.isInverse(),a=!!e.isInverse();s&&(t=i,i=n,n=t,t=r,r=o,o=t);n=this._resolveBackgroundRgba(o,n,s),a=this._resolveForegroundRgba(r,i,s,a),a=c.rgba.ensureContrastRatio(n,a,this._optionsService.options.minimumContrastRatio);if(a){a={css:c.channels.toCss(a>>24&255,a>>16&255,a>>8&255),rgba:a};return this._colors.contrastCache.setColor(e.bg,e.fg,a),a}this._colors.contrastCache.setColor(e.bg,e.fg,null)}},l.prototype._resolveBackgroundRgba=function(e,t,i){switch(e){case 16777216:case 33554432:return this._colors.ansi[t].rgba;case 50331648:return t<<8;case 0:default:return(i?this._colors.foreground:this._colors.background).rgba}},l.prototype._resolveForegroundRgba=function(e,t,i,r){switch(e){case 16777216:case 33554432:return this._optionsService.options.drawBoldTextInBrightColors&&r&&t<8&&(t+=8),this._colors.ansi[t].rgba;case 50331648:return t<<8;case 0:default:return(i?this._colors.background:this._colors.foreground).rgba}},l);function l(e,t,i,r,n,o,s,a){this._container=e,this._alpha=r,this._colors=n,this._rendererId=o,this._bufferService=s,this._optionsService=a,this._scaledCharWidth=0,this._scaledCharHeight=0,this._scaledCellWidth=0,this._scaledCellHeight=0,this._scaledCharLeft=0,this._scaledCharTop=0,this._currentGlyphIdentifier={chars:"",code:0,bg:0,fg:0,bold:!1,dim:!1,italic:!1},this._canvas=document.createElement("canvas"),this._canvas.classList.add("xterm-"+t+"-layer"),this._canvas.style.zIndex=i.toString(),this._initCanvas(),this._container.appendChild(this._canvas)}t.BaseRenderLayer=i},function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var o="di$target",s="di$dependencies";t.serviceRegistry=new Map,t.getServiceDependencies=function(e){return e[s]||[]},t.createDecorator=function(e){if(t.serviceRegistry.has(e))return t.serviceRegistry.get(e);var n=function(e,t,i){if(3!==arguments.length)throw new Error("@IServiceName-decorator can only be used to decorate a parameter");var r;r=n,i=i,(e=e)[o]===e?e[s].push({id:r,index:i}):(e[s]=[{id:r,index:i}],e[o]=e)};return n.toString=function(){return e},t.serviceRegistry.set(e,n),n}},function(e,t,i){"use strict";function n(e,t,i,r){if(void 0===r&&(r=e.length),(i=void 0===i?0:i)>=e.length)return e;i=(e.length+i)%e.length,r=r>=e.length?e.length:(e.length+r)%e.length;for(var n=i;n>22,2097152&t?this._combined[e].charCodeAt(this._combined[e].length-1):i]},r.prototype.set=function(e,t){this._data[3*e+1]=t[a.CHAR_DATA_ATTR_INDEX],1>22},r.prototype.hasWidth=function(e){return 12582912&this._data[3*e+0]},r.prototype.getFg=function(e){return this._data[3*e+1]},r.prototype.getBg=function(e){return this._data[3*e+2]},r.prototype.hasContent=function(e){return 4194303&this._data[3*e+0]},r.prototype.getCodePoint=function(e){var t=this._data[3*e+0];return 2097152&t?this._combined[e].charCodeAt(this._combined[e].length-1):2097151&t},r.prototype.isCombined=function(e){return 2097152&this._data[3*e+0]},r.prototype.getString=function(e){var t=this._data[3*e+0];return 2097152&t?this._combined[e]:2097151&t?s.stringFromCodePoint(2097151&t):""},r.prototype.loadCell=function(e,t){var i=3*e;return t.content=this._data[0+i],t.fg=this._data[1+i],t.bg=this._data[2+i],2097152&t.content&&(t.combinedData=this._combined[e]),t},r.prototype.setCell=function(e,t){2097152&t.content&&(this._combined[e]=t.combinedData),this._data[3*e+0]=t.content,this._data[3*e+1]=t.fg,this._data[3*e+2]=t.bg},r.prototype.setCellFromCodePoint=function(e,t,i,r,n){this._data[3*e+0]=t|i<<22,this._data[3*e+1]=r,this._data[3*e+2]=n},r.prototype.addCodepointToCell=function(e,t){var i=this._data[3*e+0];2097152&i?this._combined[e]+=s.stringFromCodePoint(t):(2097151&i?(this._combined[e]=s.stringFromCodePoint(2097151&i)+s.stringFromCodePoint(t),i&=-2097152,i|=2097152):i=t|1<<22,this._data[3*e+0]=i)},r.prototype.insertCells=function(e,t,i,r){if((e%=this.length)&&2===this.getWidth(e-1)&&this.setCellFromCodePoint(e-1,0,1,(null===r||void 0===r?void 0:r.fg)||0,(null===r||void 0===r?void 0:r.bg)||0),tthis.length){var i=new Uint32Array(3*e);this.length&&(3*e>22);return 0},r.prototype.copyCellsFrom=function(e,t,i,r,n){var o=e._data;if(n)for(var s=r-1;0<=s;s--)for(var a=0;a<3;a++)this._data[3*(i+s)+a]=o[3*(t+s)+a];else for(s=0;s>22||1}return r},i=r;function r(e,t,i){this.isWrapped=i=void 0===i?!1:i,this._combined={},this._data=new Uint32Array(3*e);for(var r=t||c.CellData.fromCharData([0,a.NULL_CELL_CHAR,a.NULL_CELL_WIDTH,a.NULL_CELL_CODE]),n=0;n>8,r=255&this._subParamsIdx[t];0=this.maxLength)this._rejectDigits=!0;else{if(e<-1)throw new Error("values lesser than -1 are not allowed");this._subParamsIdx[this.length]=this._subParamsLength<<8|this._subParamsLength,this.params[this.length++]=2147483647=this.maxSubParamsLength)this._rejectSubDigits=!0;else{if(e<-1)throw new Error("values lesser than -1 are not allowed");this._subParams[this._subParamsLength++]=2147483647>8)},o.prototype.getSubParams=function(e){var t=this._subParamsIdx[e]>>8,e=255&this._subParamsIdx[e];return 0>8,r=255&this._subParamsIdx[t];0r.PAYLOAD_LIMIT&&(this._data="",this._hitLimit=!0))},s.prototype.end=function(e){var t;return this._hitLimit?t=!1:e&&(t=this._handler(this._data)),this._data="",this._hitLimit=!1,t},i=s;function s(e){this._handler=e,this._data="",this._hitLimit=!1}t.OscHandler=i},function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.PAYLOAD_LIMIT=1e7},function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=i(7),r=i(19),o=i(21),s=[],i=(a.prototype.dispose=function(){this._handlers=Object.create(null),this._handlerFb=function(){}},a.prototype.addHandler=function(e,t){void 0===this._handlers[e]&&(this._handlers[e]=[]);var i=this._handlers[e];return i.push(t),{dispose:function(){var e=i.indexOf(t);-1!==e&&i.splice(e,1)}}},a.prototype.setHandler=function(e,t){this._handlers[e]=[t]},a.prototype.clearHandler=function(e){this._handlers[e]&&delete this._handlers[e]},a.prototype.setHandlerFallback=function(e){this._handlerFb=e},a.prototype.reset=function(){this._active.length&&this.unhook(!1),this._active=s,this._ident=0},a.prototype.hook=function(e,t){if(this.reset(),this._ident=e,this._active=this._handlers[e]||s,this._active.length)for(var i=this._active.length-1;0<=i;i--)this._active[i].hook(t);else this._handlerFb(this._ident,"HOOK",t)},a.prototype.put=function(e,t,i){if(this._active.length)for(var r=this._active.length-1;0<=r;r--)this._active[r].put(e,t,i);else this._handlerFb(this._ident,"PUT",n.utf32ToString(e,t,i))},a.prototype.unhook=function(e){if(this._active.length){for(var t=this._active.length-1;0<=t&&!1===this._active[t].unhook(e);t--);for(t--;0<=t;t--)this._active[t].unhook(!1)}else this._handlerFb(this._ident,"UNHOOK",e);this._active=s,this._ident=0},a);function a(){this._handlers=Object.create(null),this._active=s,this._ident=0,this._handlerFb=function(){}}t.DcsParser=i;c.prototype.hook=function(e){this._params=e.clone(),this._data="",this._hitLimit=!1},c.prototype.put=function(e,t,i){this._hitLimit||(this._data+=n.utf32ToString(e,t,i),this._data.length>o.PAYLOAD_LIMIT&&(this._data="",this._hitLimit=!0))},c.prototype.unhook=function(e){var t;return this._hitLimit?t=!1:e&&(t=this._handler(this._data,this._params||new r.Params)),this._params=void 0,this._data="",this._hitLimit=!1,t},i=c;function c(e){this._handler=e,this._data="",this._hitLimit=!1}t.DcsHandler=i},function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var l=i(24),h=i(42),u=[];t.acquireCharAtlas=function(e,t,i,r,n){for(var o=l.generateConfig(r,n,e,i),s=0;s=this._line.length))return t?(this._line.loadCell(e,t),t):this._line.loadCell(e,new r.CellData)},d.prototype.translateToString=function(e,t,i){return this._line.translateToString(e,t,i)},d),h=(_.prototype.registerCsiHandler=function(e,t){return this._core.addCsiHandler(e,function(e){return t(e.toArray())})},_.prototype.addCsiHandler=function(e,t){return this.registerCsiHandler(e,t)},_.prototype.registerDcsHandler=function(e,i){return this._core.addDcsHandler(e,function(e,t){return i(e,t.toArray())})},_.prototype.addDcsHandler=function(e,t){return this.registerDcsHandler(e,t)},_.prototype.registerEscHandler=function(e,t){return this._core.addEscHandler(e,t)},_.prototype.addEscHandler=function(e,t){return this.registerEscHandler(e,t)},_.prototype.registerOscHandler=function(e,t){return this._core.addOscHandler(e,t)},_.prototype.addOscHandler=function(e,t){return this.registerOscHandler(e,t)},_),u=(f.prototype.register=function(e){this._core.unicodeService.register(e)},Object.defineProperty(f.prototype,"versions",{get:function(){return this._core.unicodeService.versions},enumerable:!0,configurable:!0}),Object.defineProperty(f.prototype,"activeVersion",{get:function(){return this._core.unicodeService.activeVersion},set:function(e){this._core.unicodeService.activeVersion=e},enumerable:!0,configurable:!0}),f);function f(e){this._core=e}function _(e){this._core=e}function d(e){this._line=e}function p(e){this._buffer=e}},function(e,t,i){"use strict";var r,n=this&&this.__extends||(r=function(e,t){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var i in t)t.hasOwnProperty(i)&&(e[i]=t[i])})(e,t)},function(e,t){function i(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(i.prototype=t.prototype,new i)});Object.defineProperty(t,"__esModule",{value:!0});var o,s=i(34),a=i(35),c=i(36),h=i(12),l=i(37),u=i(39),f=i(49),_=i(50),d=i(11),p=i(8),v=i(17),g=i(53),y=i(54),b=i(55),m=i(56),S=i(58),C=i(1),w=i(16),E=i(59),L=i(25),A=i(60),R=i(0),x=i(61),k=i(4),D=i(62),T=i(63),O=i(2),M=i(69),P=i(70),H=i(71),I=i(72),B=i(73),F=i(74),j=i(75),W=i(76),q=i(77),U=i(79),N="undefined"!=typeof window?window.document:null,n=(o=O.Disposable,n(z,o),Object.defineProperty(z.prototype,"options",{get:function(){return this.optionsService.options},enumerable:!0,configurable:!0}),Object.defineProperty(z.prototype,"cols",{get:function(){return this._bufferService.cols},enumerable:!0,configurable:!0}),Object.defineProperty(z.prototype,"rows",{get:function(){return this._bufferService.rows},enumerable:!0,configurable:!0}),Object.defineProperty(z.prototype,"onCursorMove",{get:function(){return this._onCursorMove.event},enumerable:!0,configurable:!0}),Object.defineProperty(z.prototype,"onData",{get:function(){return this._onData.event},enumerable:!0,configurable:!0}),Object.defineProperty(z.prototype,"onBinary",{get:function(){return this._onBinary.event},enumerable:!0,configurable:!0}),Object.defineProperty(z.prototype,"onKey",{get:function(){return this._onKey.event},enumerable:!0,configurable:!0}),Object.defineProperty(z.prototype,"onLineFeed",{get:function(){return this._onLineFeed.event},enumerable:!0,configurable:!0}),Object.defineProperty(z.prototype,"onRender",{get:function(){return this._onRender.event},enumerable:!0,configurable:!0}),Object.defineProperty(z.prototype,"onResize",{get:function(){return this._onResize.event},enumerable:!0,configurable:!0}),Object.defineProperty(z.prototype,"onScroll",{get:function(){return this._onScroll.event},enumerable:!0,configurable:!0}),Object.defineProperty(z.prototype,"onSelectionChange",{get:function(){return this._onSelectionChange.event},enumerable:!0,configurable:!0}),Object.defineProperty(z.prototype,"onTitleChange",{get:function(){return this._onTitleChange.event},enumerable:!0,configurable:!0}),Object.defineProperty(z.prototype,"onFocus",{get:function(){return this._onFocus.event},enumerable:!0,configurable:!0}),Object.defineProperty(z.prototype,"onBlur",{get:function(){return this._onBlur.event},enumerable:!0,configurable:!0}),Object.defineProperty(z.prototype,"onA11yChar",{get:function(){return this.onA11yCharEmitter.event},enumerable:!0,configurable:!0}),Object.defineProperty(z.prototype,"onA11yTab",{get:function(){return this.onA11yTabEmitter.event},enumerable:!0,configurable:!0}),z.prototype.dispose=function(){var e;this._isDisposed||(o.prototype.dispose.call(this),null===(e=this._windowsMode)||void 0===e||e.dispose(),this._windowsMode=void 0,null===(e=this._renderService)||void 0===e||e.dispose(),this._customKeyEventHandler=null,this.write=function(){},null===(e=null===(e=this.element)||void 0===e?void 0:e.parentNode)||void 0===e||e.removeChild(this.element))},z.prototype._setup=function(){var i=this;this._customKeyEventHandler=null,this.insertMode=!1,this.bracketedPasteMode=!1,this._userScrolling=!1,this._inputHandler?this._inputHandler.reset():(this._inputHandler=new l.InputHandler(this,this._bufferService,this._charsetService,this._coreService,this._dirtyRowService,this._logService,this.optionsService,this._coreMouseService,this.unicodeService,this._instantiationService),this._inputHandler.onRequestBell(function(){return i.bell()}),this._inputHandler.onRequestRefreshRows(function(e,t){return i.refresh(e,t)}),this._inputHandler.onRequestReset(function(){return i.reset()}),this._inputHandler.onCursorMove(function(){return i._onCursorMove.fire()}),this._inputHandler.onLineFeed(function(){return i._onLineFeed.fire()}),this.register(this._inputHandler)),this.linkifier||(this.linkifier=new f.Linkifier(this._bufferService,this._logService,this.optionsService,this.unicodeService)),this.options.windowsMode&&this._enableWindowsMode()},z.prototype._enableWindowsMode=function(){var e,t=this;this._windowsMode||((e=[]).push(this.onLineFeed(E.updateWindowsModeWrappedState.bind(null,this._bufferService))),e.push(this.addCsiHandler({final:"H"},function(){return E.updateWindowsModeWrappedState(t._bufferService),!1})),this._windowsMode={dispose:function(){e.forEach(function(e){return e.dispose()})}})},Object.defineProperty(z.prototype,"buffer",{get:function(){return this.buffers.active},enumerable:!0,configurable:!0}),Object.defineProperty(z.prototype,"buffers",{get:function(){return this._bufferService.buffers},enumerable:!0,configurable:!0}),z.prototype.focus=function(){this.textarea&&this.textarea.focus({preventScroll:!0})},z.prototype._setupOptionsListeners=function(){var r=this;this.optionsService.onOptionChange(function(e){var t,i;switch(e){case"fontFamily":case"fontSize":null===(t=r._renderService)||void 0===t||t.clear(),null===(t=r._charSizeService)||void 0===t||t.measure();break;case"cursorBlink":case"cursorStyle":r.refresh(r.buffer.y,r.buffer.y);break;case"drawBoldTextInBrightColors":case"letterSpacing":case"lineHeight":case"fontWeight":case"fontWeightBold":case"minimumContrastRatio":r._renderService&&(r._renderService.clear(),r._renderService.onResize(r.cols,r.rows),r.refresh(0,r.rows-1));break;case"rendererType":r._renderService&&(r._renderService.setRenderer(r._createRenderer()),r._renderService.onResize(r.cols,r.rows));break;case"scrollback":r.buffers.resize(r.cols,r.rows),null===(t=r.viewport)||void 0===t||t.syncScrollArea();break;case"screenReaderMode":r.optionsService.options.screenReaderMode?!r._accessibilityManager&&r._renderService&&(r._accessibilityManager=new b.AccessibilityManager(r,r._renderService)):(null===(i=r._accessibilityManager)||void 0===i||i.dispose(),r._accessibilityManager=null);break;case"tabStopWidth":r.buffers.setupTabStops();break;case"theme":r._setTheme(r.optionsService.options.theme);break;case"windowsMode":r.optionsService.options.windowsMode?r._enableWindowsMode():(null===(i=r._windowsMode)||void 0===i||i.dispose(),r._windowsMode=void 0)}})},z.prototype._onTextAreaFocus=function(e){this.sendFocus&&this._coreService.triggerDataEvent(h.C0.ESC+"[I"),this.updateCursorStyle(e),this.element.classList.add("focus"),this.showCursor(),this._onFocus.fire()},z.prototype.blur=function(){return this.textarea.blur()},z.prototype._onTextAreaBlur=function(){this.textarea.value="",this.refresh(this.buffer.y,this.buffer.y),this.sendFocus&&this._coreService.triggerDataEvent(h.C0.ESC+"[O"),this.element.classList.remove("focus"),this._onBlur.fire()},z.prototype._initGlobal=function(){var t=this;this._bindKeys(),this.register(p.addDisposableDomListener(this.element,"copy",function(e){t.hasSelection()&&c.copyHandler(e,t._selectionService)}));function e(e){return c.handlePasteEvent(e,t.textarea,t.bracketedPasteMode,t._coreService)}this.register(p.addDisposableDomListener(this.textarea,"paste",e)),this.register(p.addDisposableDomListener(this.element,"paste",e)),d.isFirefox?this.register(p.addDisposableDomListener(this.element,"mousedown",function(e){2===e.button&&c.rightClickHandler(e,t.textarea,t.screenElement,t._selectionService,t.options.rightClickSelectsWord)})):this.register(p.addDisposableDomListener(this.element,"contextmenu",function(e){c.rightClickHandler(e,t.textarea,t.screenElement,t._selectionService,t.options.rightClickSelectsWord)})),d.isLinux&&this.register(p.addDisposableDomListener(this.element,"auxclick",function(e){1===e.button&&c.moveTextAreaUnderMouseCursor(e,t.textarea,t.screenElement)}))},z.prototype._bindKeys=function(){var t=this;this.register(p.addDisposableDomListener(this.textarea,"keyup",function(e){return t._keyUp(e)},!0)),this.register(p.addDisposableDomListener(this.textarea,"keydown",function(e){return t._keyDown(e)},!0)),this.register(p.addDisposableDomListener(this.textarea,"keypress",function(e){return t._keyPress(e)},!0)),this.register(p.addDisposableDomListener(this.textarea,"compositionstart",function(){return t._compositionHelper.compositionstart()})),this.register(p.addDisposableDomListener(this.textarea,"compositionupdate",function(e){return t._compositionHelper.compositionupdate(e)})),this.register(p.addDisposableDomListener(this.textarea,"compositionend",function(){return t._compositionHelper.compositionend()})),this.register(this.onRender(function(){return t._compositionHelper.updateCompositionElements()})),this.register(this.onRender(function(e){return t._queueLinkification(e.start,e.end)}))},z.prototype.open=function(e){var i=this;if(!e)throw new Error("Terminal requires a parent element.");N.body.contains(e)||this._logService.warn("Terminal.open was called on an element that was not attached to the DOM"),this._document=e.ownerDocument,this.element=this._document.createElement("div"),this.element.dir="ltr",this.element.classList.add("terminal"),this.element.classList.add("xterm"),this.element.setAttribute("tabindex","0"),e.appendChild(this.element);var t=N.createDocumentFragment();this._viewportElement=N.createElement("div"),this._viewportElement.classList.add("xterm-viewport"),t.appendChild(this._viewportElement),this._viewportScrollArea=N.createElement("div"),this._viewportScrollArea.classList.add("xterm-scroll-area"),this._viewportElement.appendChild(this._viewportScrollArea),this.screenElement=N.createElement("div"),this.screenElement.classList.add("xterm-screen"),this._helperContainer=N.createElement("div"),this._helperContainer.classList.add("xterm-helpers"),this.screenElement.appendChild(this._helperContainer),t.appendChild(this.screenElement),this.textarea=N.createElement("textarea"),this.textarea.classList.add("xterm-helper-textarea"),this.textarea.setAttribute("aria-label",v.promptLabel),this.textarea.setAttribute("aria-multiline","false"),this.textarea.setAttribute("autocorrect","off"),this.textarea.setAttribute("autocapitalize","off"),this.textarea.setAttribute("spellcheck","false"),this.textarea.tabIndex=0,this.register(p.addDisposableDomListener(this.textarea,"focus",function(e){return i._onTextAreaFocus(e)})),this.register(p.addDisposableDomListener(this.textarea,"blur",function(){return i._onTextAreaBlur()})),this._helperContainer.appendChild(this.textarea);e=this._instantiationService.createInstance(W.CoreBrowserService,this.textarea);this._instantiationService.setService(k.ICoreBrowserService,e),this._charSizeService=this._instantiationService.createInstance(D.CharSizeService,this._document,this._helperContainer),this._instantiationService.setService(k.ICharSizeService,this._charSizeService),this._compositionView=N.createElement("div"),this._compositionView.classList.add("composition-view"),this._compositionHelper=this._instantiationService.createInstance(s.CompositionHelper,this.textarea,this._compositionView),this._helperContainer.appendChild(this._compositionView),this.element.appendChild(t),this._theme=this.options.theme||this._theme,this.options.theme=void 0,this._colorManager=new L.ColorManager(N,this.options.allowTransparency),this.optionsService.onOptionChange(function(e){return i._colorManager.onOptionsChange(e)}),this._colorManager.setTheme(this._theme);t=this._createRenderer();this._renderService=this._instantiationService.createInstance(A.RenderService,t,this.rows,this.screenElement),this._instantiationService.setService(k.IRenderService,this._renderService),this._renderService.onRender(function(e){return i._onRender.fire(e)}),this.onResize(function(e){return i._renderService.resize(e.cols,e.rows)}),this._soundService=this._instantiationService.createInstance(g.SoundService),this._instantiationService.setService(k.ISoundService,this._soundService),this._mouseService=this._instantiationService.createInstance(M.MouseService),this._instantiationService.setService(k.IMouseService,this._mouseService),this.viewport=this._instantiationService.createInstance(a.Viewport,function(e,t){return i.scrollLines(e,t)},this._viewportElement,this._viewportScrollArea),this.viewport.onThemeChange(this._colorManager.colors),this.register(this.viewport),this.register(this.onCursorMove(function(){return i._renderService.onCursorMove()})),this.register(this.onResize(function(){return i._renderService.onResize(i.cols,i.rows)})),this.register(this.onBlur(function(){return i._renderService.onBlur()})),this.register(this.onFocus(function(){return i._renderService.onFocus()})),this.register(this._renderService.onDimensionsChange(function(){return i.viewport.syncScrollArea()})),this._selectionService=this._instantiationService.createInstance(_.SelectionService,function(e,t){return i.scrollLines(e,t)},this.element,this.screenElement),this._instantiationService.setService(k.ISelectionService,this._selectionService),this.register(this._selectionService.onSelectionChange(function(){return i._onSelectionChange.fire()})),this.register(this._selectionService.onRedrawRequest(function(e){return i._renderService.onSelectionChanged(e.start,e.end,e.columnSelectMode)})),this.register(this._selectionService.onLinuxMouseSelection(function(e){i.textarea.value=e,i.textarea.focus(),i.textarea.select()})),this.register(this.onScroll(function(){i.viewport.syncScrollArea(),i._selectionService.refresh()})),this.register(p.addDisposableDomListener(this._viewportElement,"scroll",function(){return i._selectionService.refresh()})),this._mouseZoneManager=this._instantiationService.createInstance(y.MouseZoneManager,this.element,this.screenElement),this.register(this._mouseZoneManager),this.register(this.onScroll(function(){return i._mouseZoneManager.clearAll()})),this.linkifier.attachToDom(this.element,this._mouseZoneManager),this.register(p.addDisposableDomListener(this.element,"mousedown",function(e){return i._selectionService.onMouseDown(e)})),this.mouseEvents?(this._selectionService.disable(),this.element.classList.add("enable-mouse-events")):this._selectionService.enable(),this.options.screenReaderMode&&(this._accessibilityManager=new b.AccessibilityManager(this,this._renderService)),this._charSizeService.measure(),this.refresh(0,this.rows-1),this._initGlobal(),this.bindMouse()},z.prototype._createRenderer=function(){switch(this.options.rendererType){case"canvas":return this._instantiationService.createInstance(u.Renderer,this._colorManager.colors,this.screenElement,this.linkifier);case"dom":return this._instantiationService.createInstance(m.DomRenderer,this._colorManager.colors,this.element,this.screenElement,this._viewportElement,this.linkifier);default:throw new Error('Unrecognized rendererType "'+this.options.rendererType+'"')}},z.prototype._setTheme=function(e){var t;this._theme=e,null===(t=this._colorManager)||void 0===t||t.setTheme(e),null===(e=this._renderService)||void 0===e||e.setColors(this._colorManager.colors),null===(e=this.viewport)||void 0===e||e.onThemeChange(this._colorManager.colors)},z.prototype.bindMouse=function(){var o=this,n=this,t=this.element;function i(e){var t,i,r;if(t=n._mouseService.getRawByteCoords(e,n.screenElement,n.cols,n.rows)){switch(e.overrideType||e.type){case"mousemove":r=32,void 0===e.buttons?(i=3,void 0!==e.button&&(i=e.button<3?e.button:3)):i=1&e.buttons?0:4&e.buttons?1:2&e.buttons?2:3;break;case"mouseup":r=0,i=e.button<3?e.button:3;break;case"mousedown":r=1,i=e.button<3?e.button:3;break;case"wheel":0!==e.deltaY&&(r=e.deltaY<0?0:1),i=4;break;default:return}return!(void 0===r||void 0===i||4=this.buffer.ybase&&(this._userScrolling=!1);var i=this.buffer.ydisp;this.buffer.ydisp=Math.max(Math.min(this.buffer.ydisp+e,this.buffer.ybase),0),i!==this.buffer.ydisp&&(t||this._onScroll.fire(this.buffer.ydisp),this.refresh(0,this.rows-1))},z.prototype.scrollPages=function(e){this.scrollLines(e*(this.rows-1))},z.prototype.scrollToTop=function(){this.scrollLines(-this.buffer.ydisp)},z.prototype.scrollToBottom=function(){this.scrollLines(this.buffer.ybase-this.buffer.ydisp)},z.prototype.scrollToLine=function(e){e-=this.buffer.ydisp;0!=e&&this.scrollLines(e)},z.prototype.paste=function(e){c.paste(e,this.textarea,this.bracketedPasteMode,this._coreService)},z.prototype.attachCustomKeyEventHandler=function(e){this._customKeyEventHandler=e},z.prototype.addEscHandler=function(e,t){return this._inputHandler.addEscHandler(e,t)},z.prototype.addDcsHandler=function(e,t){return this._inputHandler.addDcsHandler(e,t)},z.prototype.addCsiHandler=function(e,t){return this._inputHandler.addCsiHandler(e,t)},z.prototype.addOscHandler=function(e,t){return this._inputHandler.addOscHandler(e,t)},z.prototype.registerLinkMatcher=function(e,t,i){i=this.linkifier.registerLinkMatcher(e,t,i);return this.refresh(0,this.rows-1),i},z.prototype.deregisterLinkMatcher=function(e){this.linkifier.deregisterLinkMatcher(e)&&this.refresh(0,this.rows-1)},z.prototype.registerCharacterJoiner=function(e){e=this._renderService.registerCharacterJoiner(e);return this.refresh(0,this.rows-1),e},z.prototype.deregisterCharacterJoiner=function(e){this._renderService.deregisterCharacterJoiner(e)&&this.refresh(0,this.rows-1)},Object.defineProperty(z.prototype,"markers",{get:function(){return this.buffer.markers},enumerable:!0,configurable:!0}),z.prototype.addMarker=function(e){if(this.buffer===this.buffers.normal)return this.buffer.addMarker(this.buffer.ybase+this.buffer.y+e)},z.prototype.hasSelection=function(){return!!this._selectionService&&this._selectionService.hasSelection},z.prototype.select=function(e,t,i){this._selectionService.setSelection(e,t,i)},z.prototype.getSelection=function(){return this._selectionService?this._selectionService.selectionText:""},z.prototype.getSelectionPosition=function(){if(this._selectionService.hasSelection)return{startColumn:this._selectionService.selectionStart[0],startRow:this._selectionService.selectionStart[1],endColumn:this._selectionService.selectionEnd[0],endRow:this._selectionService.selectionEnd[1]}},z.prototype.clearSelection=function(){var e;null===(e=this._selectionService)||void 0===e||e.clearSelection()},z.prototype.selectAll=function(){var e;null===(e=this._selectionService)||void 0===e||e.selectAll()},z.prototype.selectLines=function(e,t){var i;null===(i=this._selectionService)||void 0===i||i.selectLines(e,t)},z.prototype._keyDown=function(e){if(this._keyDownHandled=!1,this._customKeyEventHandler&&!1===this._customKeyEventHandler(e))return!1;if(!this._compositionHelper.keydown(e))return this.buffer.ybase!==this.buffer.ydisp&&this.scrollToBottom(),!1;var t=S.evaluateKeyboardEvent(e,this._coreService.decPrivateModes.applicationCursorKeys,this.browser.isMac,this.options.macOptionIsMeta);if(this.updateCursorStyle(e),3!==t.type&&2!==t.type)return 1===t.type&&this.selectAll(),!!this._isThirdLevelShift(this.browser,e)||(t.cancel&&this.cancel(e,!0),!t.key||(t.key!==h.C0.ETX&&t.key!==h.C0.CR||(this.textarea.value=""),this._onKey.fire({key:t.key,domEvent:e}),this.showCursor(),this._coreService.triggerDataEvent(t.key,!0),this.optionsService.options.screenReaderMode?void(this._keyDownHandled=!0):this.cancel(e,!0)));var i=this.rows-1;return this.scrollLines(2===t.type?-i:i),this.cancel(e,!0)},z.prototype._isThirdLevelShift=function(e,t){e=e.isMac&&!this.options.macOptionIsMeta&&t.altKey&&!t.ctrlKey&&!t.metaKey||e.isWindows&&t.altKey&&t.ctrlKey&&!t.metaKey;return"keypress"===t.type?e:e&&(!t.keyCode||47=s)if(a)r.x=0,r.y++,r.y===r.scrollBottom+1?(r.y--,this._terminal.scroll(this._eraseAttrData(),!0)):(r.y>=this._bufferService.rows&&(r.y=this._bufferService.rows-1),r.lines.get(r.y).isWrapped=!0),h=r.lines.get(r.y+r.ybase);else if(r.x=s-1,2===d)continue;if(c&&(h.insertCells(r.x,d,r.getNullCell(l),l),2===h.getWidth(s-1)&&h.setCellFromCodePoint(s-1,m.NULL_CELL_CODE,m.NULL_CELL_WIDTH,l.fg,l.bg)),h.setCellFromCodePoint(r.x++,_,d,l.fg,l.bg),0=this._bufferService.rows&&(e.y=this._bufferService.rows-1),e.x>=this._bufferService.cols&&e.x--,this._dirtyRowService.markDirty(e.y),this._onLineFeed.fire()},f.prototype.carriageReturn=function(){this._bufferService.buffer.x=0},f.prototype.backspace=function(){this._restrictCursor(),0=this._bufferService.cols||(e=this._bufferService.buffer.x,this._bufferService.buffer.x=this._bufferService.buffer.nextStop(),this._optionsService.options.screenReaderMode&&this._terminal.onA11yTabEmitter.fire(this._bufferService.buffer.x-e))},f.prototype.shiftOut=function(){this._charsetService.setgLevel(1)},f.prototype.shiftIn=function(){this._charsetService.setgLevel(0)},f.prototype._restrictCursor=function(){this._bufferService.buffer.x=Math.min(this._bufferService.cols-1,Math.max(0,this._bufferService.buffer.x)),this._bufferService.buffer.y=this._coreService.decPrivateModes.origin?Math.min(this._bufferService.buffer.scrollBottom,Math.max(this._bufferService.buffer.scrollTop,this._bufferService.buffer.y)):Math.min(this._bufferService.rows-1,Math.max(0,this._bufferService.buffer.y)),this._dirtyRowService.markDirty(this._bufferService.buffer.y)},f.prototype._setCursor=function(e,t){this._dirtyRowService.markDirty(this._bufferService.buffer.y),this._coreService.decPrivateModes.origin?(this._bufferService.buffer.x=e,this._bufferService.buffer.y=this._bufferService.buffer.scrollTop+t):(this._bufferService.buffer.x=e,this._bufferService.buffer.y=t),this._restrictCursor(),this._dirtyRowService.markDirty(this._bufferService.buffer.y)},f.prototype._moveCursor=function(e,t){this._restrictCursor(),this._setCursor(this._bufferService.buffer.x+e,this._bufferService.buffer.y+t)},f.prototype.cursorUp=function(e){var t=this._bufferService.buffer.y-this._bufferService.buffer.scrollTop;0<=t?this._moveCursor(0,-Math.min(t,e.params[0]||1)):this._moveCursor(0,-(e.params[0]||1))},f.prototype.cursorDown=function(e){var t=this._bufferService.buffer.scrollBottom-this._bufferService.buffer.y;0<=t?this._moveCursor(0,Math.min(t,e.params[0]||1)):this._moveCursor(0,e.params[0]||1)},f.prototype.cursorForward=function(e){this._moveCursor(e.params[0]||1,0)},f.prototype.cursorBackward=function(e){this._moveCursor(-(e.params[0]||1),0)},f.prototype.cursorNextLine=function(e){this.cursorDown(e),this._bufferService.buffer.x=0},f.prototype.cursorPrecedingLine=function(e){this.cursorUp(e),this._bufferService.buffer.x=0},f.prototype.cursorCharAbsolute=function(e){this._setCursor((e.params[0]||1)-1,this._bufferService.buffer.y)},f.prototype.cursorPosition=function(e){this._setCursor(2<=e.length?(e.params[1]||1)-1:0,(e.params[0]||1)-1)},f.prototype.charPosAbsolute=function(e){this._setCursor((e.params[0]||1)-1,this._bufferService.buffer.y)},f.prototype.hPositionRelative=function(e){this._moveCursor(e.params[0]||1,0)},f.prototype.linePosAbsolute=function(e){this._setCursor(this._bufferService.buffer.x,(e.params[0]||1)-1)},f.prototype.vPositionRelative=function(e){this._moveCursor(0,e.params[0]||1)},f.prototype.hVPosition=function(e){this.cursorPosition(e)},f.prototype.tabClear=function(e){e=e.params[0];0===e?delete this._bufferService.buffer.tabs[this._bufferService.buffer.x]:3===e&&(this._bufferService.buffer.tabs={})},f.prototype.cursorForwardTab=function(e){if(!(this._bufferService.buffer.x>=this._bufferService.cols))for(var t=e.params[0]||1;t--;)this._bufferService.buffer.x=this._bufferService.buffer.nextStop()},f.prototype.cursorBackwardTab=function(e){if(!(this._bufferService.buffer.x>=this._bufferService.cols))for(var t=e.params[0]||1,i=this._bufferService.buffer;t--;)i.x=i.prevStop()},f.prototype._eraseInBufferLine=function(e,t,i,r){void 0===r&&(r=!1);e=this._bufferService.buffer.lines.get(this._bufferService.buffer.ybase+e);e.replaceCells(t,i,this._bufferService.buffer.getNullCell(this._eraseAttrData()),this._eraseAttrData()),r&&(e.isWrapped=!1)},f.prototype._resetBufferLine=function(e){e=this._bufferService.buffer.lines.get(this._bufferService.buffer.ybase+e);e.fill(this._bufferService.buffer.getNullCell(this._eraseAttrData())),e.isWrapped=!1},f.prototype.eraseInDisplay=function(e){var t;switch(this._restrictCursor(),e.params[0]){case 0:for(t=this._bufferService.buffer.y,this._dirtyRowService.markDirty(t),this._eraseInBufferLine(t++,this._bufferService.buffer.x,this._bufferService.cols,0===this._bufferService.buffer.x);t=this._bufferService.cols&&(this._bufferService.buffer.lines.get(t+1).isWrapped=!1);t--;)this._resetBufferLine(t);this._dirtyRowService.markDirty(0);break;case 2:for(t=this._bufferService.rows,this._dirtyRowService.markDirty(t-1);t--;)this._resetBufferLine(t);this._dirtyRowService.markDirty(0);break;case 3:var i=this._bufferService.buffer.lines.length-this._bufferService.rows;0i.scrollBottom||i.yi.scrollBottom||i.yt.scrollBottom||t.yt.scrollBottom||t.yt.scrollBottom||t.yt.scrollBottom||t.y0;276;0c"):this._terminal.is("rxvt-unicode")?this._coreService.triggerDataEvent(d.C0.ESC+"[>85;95;0c"):this._terminal.is("linux")?this._coreService.triggerDataEvent(e.params[0]+"c"):this._terminal.is("screen")&&this._coreService.triggerDataEvent(d.C0.ESC+"[>83;40003;0c"))},f.prototype.setMode=function(e){for(var t=0;tthis._bufferService.rows||0===t?this._bufferService.rows:t)&&(this._bufferService.buffer.scrollTop=i-1,this._bufferService.buffer.scrollBottom=t-1,this._setCursor(0,0))},f.prototype.windowOptions=function(e){if(u(e.params[0],this._optionsService.options.windowOptions)){var t,i,r=1=this._bufferService.rows&&(e.y=this._bufferService.rows-1),this._restrictCursor()},f.prototype.tabSet=function(){this._bufferService.buffer.tabs[this._bufferService.buffer.x]=!0},f.prototype.reverseIndex=function(){this._restrictCursor();var e,t=this._bufferService.buffer;t.y===t.scrollTop?(e=t.scrollBottom-t.scrollTop,t.lines.shiftElements(t.y+t.ybase,e,1),t.lines.set(t.y+t.ybase,t.getBlankLine(this._eraseAttrData())),this._dirtyRowService.markRangeDirty(t.scrollTop,t.scrollBottom)):(t.y--,this._restrictCursor())},f.prototype.fullReset=function(){this._parser.reset(),this._onRequestReset.fire()},f.prototype.reset=function(){this._curAttrData=y.DEFAULT_ATTR_DATA.clone(),this._eraseAttrDataInternal=y.DEFAULT_ATTR_DATA.clone()},f.prototype._eraseAttrData=function(){return this._eraseAttrDataInternal.bg&=-67108864,this._eraseAttrDataInternal.bg|=67108863&this._curAttrData.bg,this._eraseAttrDataInternal},f.prototype.setgLevel=function(e){this._charsetService.setgLevel(e)},f.prototype.screenAlignmentPattern=function(){var e=new S.CellData;e.content=1<<22|"E".charCodeAt(0),e.fg=this._curAttrData.fg,e.bg=this._curAttrData.bg;var t=this._bufferService.buffer;this._setCursor(0,0);for(var i=0;i",final:"c"},function(e){return u.sendDeviceAttributesSecondary(e)}),u._parser.setCsiHandler({final:"d"},function(e){return u.linePosAbsolute(e)}),u._parser.setCsiHandler({final:"e"},function(e){return u.vPositionRelative(e)}),u._parser.setCsiHandler({final:"f"},function(e){return u.hVPosition(e)}),u._parser.setCsiHandler({final:"g"},function(e){return u.tabClear(e)}),u._parser.setCsiHandler({final:"h"},function(e){return u.setMode(e)}),u._parser.setCsiHandler({prefix:"?",final:"h"},function(e){return u.setModePrivate(e)}),u._parser.setCsiHandler({final:"l"},function(e){return u.resetMode(e)}),u._parser.setCsiHandler({prefix:"?",final:"l"},function(e){return u.resetModePrivate(e)}),u._parser.setCsiHandler({final:"m"},function(e){return u.charAttributes(e)}),u._parser.setCsiHandler({final:"n"},function(e){return u.deviceStatus(e)}),u._parser.setCsiHandler({prefix:"?",final:"n"},function(e){return u.deviceStatusPrivate(e)}),u._parser.setCsiHandler({intermediates:"!",final:"p"},function(e){return u.softReset(e)}),u._parser.setCsiHandler({intermediates:" ",final:"q"},function(e){return u.setCursorStyle(e)}),u._parser.setCsiHandler({final:"r"},function(e){return u.setScrollRegion(e)}),u._parser.setCsiHandler({final:"s"},function(e){return u.saveCursor(e)}),u._parser.setCsiHandler({final:"t"},function(e){return u.windowOptions(e)}),u._parser.setCsiHandler({final:"u"},function(e){return u.restoreCursor(e)}),u._parser.setCsiHandler({intermediates:"'",final:"}"},function(e){return u.insertColumns(e)}),u._parser.setCsiHandler({intermediates:"'",final:"~"},function(e){return u.deleteColumns(e)}),u._parser.setExecuteHandler(d.C0.BEL,function(){return u.bell()}),u._parser.setExecuteHandler(d.C0.LF,function(){return u.lineFeed()}),u._parser.setExecuteHandler(d.C0.VT,function(){return u.lineFeed()}),u._parser.setExecuteHandler(d.C0.FF,function(){return u.lineFeed()}),u._parser.setExecuteHandler(d.C0.CR,function(){return u.carriageReturn()}),u._parser.setExecuteHandler(d.C0.BS,function(){return u.backspace()}),u._parser.setExecuteHandler(d.C0.HT,function(){return u.tab()}),u._parser.setExecuteHandler(d.C0.SO,function(){return u.shiftOut()}),u._parser.setExecuteHandler(d.C0.SI,function(){return u.shiftIn()}),u._parser.setExecuteHandler(d.C1.IND,function(){return u.index()}),u._parser.setExecuteHandler(d.C1.NEL,function(){return u.nextLine()}),u._parser.setExecuteHandler(d.C1.HTS,function(){return u.tabSet()}),u._parser.setOscHandler(0,new C.OscHandler(function(e){u.setTitle(e),u.setIconName(e)})),u._parser.setOscHandler(1,new C.OscHandler(function(e){return u.setIconName(e)})),u._parser.setOscHandler(2,new C.OscHandler(function(e){return u.setTitle(e)})),u._parser.setEscHandler({final:"7"},function(){return u.saveCursor()}),u._parser.setEscHandler({final:"8"},function(){return u.restoreCursor()}),u._parser.setEscHandler({final:"D"},function(){return u.index()}),u._parser.setEscHandler({final:"E"},function(){return u.nextLine()}),u._parser.setEscHandler({final:"H"},function(){return u.tabSet()}),u._parser.setEscHandler({final:"M"},function(){return u.reverseIndex()}),u._parser.setEscHandler({final:"="},function(){return u.keypadApplicationMode()}),u._parser.setEscHandler({final:">"},function(){return u.keypadNumericMode()}),u._parser.setEscHandler({final:"c"},function(){return u.fullReset()}),u._parser.setEscHandler({final:"n"},function(){return u.setgLevel(2)}),u._parser.setEscHandler({final:"o"},function(){return u.setgLevel(3)}),u._parser.setEscHandler({final:"|"},function(){return u.setgLevel(3)}),u._parser.setEscHandler({final:"}"},function(){return u.setgLevel(2)}),u._parser.setEscHandler({final:"~"},function(){return u.setgLevel(1)}),u._parser.setEscHandler({intermediates:"%",final:"@"},function(){return u.selectDefaultCharset()}),u._parser.setEscHandler({intermediates:"%",final:"G"},function(){return u.selectDefaultCharset()});var f,_=this;for(f in p.CHARSETS)!function(e){_._parser.setEscHandler({intermediates:"(",final:e},function(){return u.selectCharset("("+e)}),_._parser.setEscHandler({intermediates:")",final:e},function(){return u.selectCharset(")"+e)}),_._parser.setEscHandler({intermediates:"*",final:e},function(){return u.selectCharset("*"+e)}),_._parser.setEscHandler({intermediates:"+",final:e},function(){return u.selectCharset("+"+e)}),_._parser.setEscHandler({intermediates:"-",final:e},function(){return u.selectCharset("-"+e)}),_._parser.setEscHandler({intermediates:".",final:e},function(){return u.selectCharset("."+e)}),_._parser.setEscHandler({intermediates:"/",final:e},function(){return u.selectCharset("/"+e)})}(f);return u._parser.setEscHandler({intermediates:"#",final:"8"},function(){return u.screenAlignmentPattern()}),u._parser.setErrorHandler(function(e){return u._logService.error("Parsing error: ",e),e}),u._parser.setDcsHandler({intermediates:"$",final:"q"},new E(u._bufferService,u._coreService,u._logService,u._optionsService)),u}function _(e,t,i,r){this._bufferService=e,this._coreService=t,this._logService=i,this._optionsService=r,this._data=new Uint32Array(0)}t.InputHandler=n},function(e,i,t){"use strict";var r,n=this&&this.__extends||(r=function(e,t){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var i in t)t.hasOwnProperty(i)&&(e[i]=t[i])})(e,t)},function(e,t){function i(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(i.prototype=t.prototype,new i)});Object.defineProperty(i,"__esModule",{value:!0});var o=t(2),s=t(15),a=t(19),c=t(20),l=t(22),h=(u.prototype.setDefault=function(e,t){s.fill(this.table,e<<4|t)},u.prototype.add=function(e,t,i,r){this.table[t<<8|e]=i<<4|r},u.prototype.addMany=function(e,t,i,r){for(var n=0;no||o>t[1])throw new Error("final must be in range "+t[0]+" .. "+t[1]);return(i<<=8)|o},_.prototype.identToString=function(e){for(var t=[];e;)t.push(String.fromCharCode(255&e)),e>>=8;return t.reverse().join("")},_.prototype.dispose=function(){this._csiHandlers=Object.create(null),this._executeHandlers=Object.create(null),this._escHandlers=Object.create(null),this._oscParser.dispose(),this._dcsParser.dispose()},_.prototype.setPrintHandler=function(e){this._printHandler=e},_.prototype.clearPrintHandler=function(){this._printHandler=this._printHandlerFb},_.prototype.addEscHandler=function(e,t){e=this._identifier(e,[48,126]);void 0===this._escHandlers[e]&&(this._escHandlers[e]=[]);var i=this._escHandlers[e];return i.push(t),{dispose:function(){var e=i.indexOf(t);-1!==e&&i.splice(e,1)}}},_.prototype.setEscHandler=function(e,t){this._escHandlers[this._identifier(e,[48,126])]=[t]},_.prototype.clearEscHandler=function(e){this._escHandlers[this._identifier(e,[48,126])]&&delete this._escHandlers[this._identifier(e,[48,126])]},_.prototype.setEscHandlerFallback=function(e){this._escHandlerFb=e},_.prototype.setExecuteHandler=function(e,t){this._executeHandlers[e.charCodeAt(0)]=t},_.prototype.clearExecuteHandler=function(e){this._executeHandlers[e.charCodeAt(0)]&&delete this._executeHandlers[e.charCodeAt(0)]},_.prototype.setExecuteHandlerFallback=function(e){this._executeHandlerFb=e},_.prototype.addCsiHandler=function(e,t){e=this._identifier(e);void 0===this._csiHandlers[e]&&(this._csiHandlers[e]=[]);var i=this._csiHandlers[e];return i.push(t),{dispose:function(){var e=i.indexOf(t);-1!==e&&i.splice(e,1)}}},_.prototype.setCsiHandler=function(e,t){this._csiHandlers[this._identifier(e)]=[t]},_.prototype.clearCsiHandler=function(e){this._csiHandlers[this._identifier(e)]&&delete this._csiHandlers[this._identifier(e)]},_.prototype.setCsiHandlerFallback=function(e){this._csiHandlerFb=e},_.prototype.addDcsHandler=function(e,t){return this._dcsParser.addHandler(this._identifier(e),t)},_.prototype.setDcsHandler=function(e,t){this._dcsParser.setHandler(this._identifier(e),t)},_.prototype.clearDcsHandler=function(e){this._dcsParser.clearHandler(this._identifier(e))},_.prototype.setDcsHandlerFallback=function(e){this._dcsParser.setHandlerFallback(e)},_.prototype.addOscHandler=function(e,t){return this._oscParser.addHandler(e,t)},_.prototype.setOscHandler=function(e,t){this._oscParser.setHandler(e,t)},_.prototype.clearOscHandler=function(e){this._oscParser.clearHandler(e)},_.prototype.setOscHandlerFallback=function(e){this._oscParser.setHandlerFallback(e)},_.prototype.setErrorHandler=function(e){this._errorHandler=e},_.prototype.clearErrorHandler=function(){this._errorHandler=this._errorHandlerFb},_.prototype.reset=function(){this.currentState=this.initialState,this._oscParser.reset(),this._dcsParser.reset(),this._params.reset(),this._params.addParam(0),this._collect=0,this.precedingCodepoint=0},_.prototype.parse=function(e,t){for(var i=0,r=0,n=this.currentState,o=this._oscParser,s=this._dcsParser,a=this._collect,c=this._params,l=this.TRANSITIONS.table,h=0;h>4){case 2:for(var u=h+1;;++u){if(t<=u||(i=e[u])<32||126=t||(i=e[u])<32||126=t||(i=e[u])<32||126=t||(i=e[u])<32||126this._characterWidth;return this._ctx.restore(),this._characterOverlapCache[t]=e},s);function s(e,t,i,r,n,o,s,a){o=c.call(this,e,"text",t,n,i,o,s,a)||this;return o.bufferService=s,o.optionsService=a,o._characterWidth=0,o._characterFont="",o._characterOverlapCache={},o._workCell=new u.CellData,o._state=new l.GridCache,o._characterJoinerRegistry=r,o}t.TextRenderLayer=n},function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=(n.prototype.resize=function(e,t){for(var i=0;i>>24,r=s.rgba>>>16&255,n=s.rgba>>>8&255,o=0;o=this.capacity?(r=this._head,this._unlinkNode(r),delete this._map[r.key],r.key=e,r.value=t,this._map[e]=r):(0<(i=this._nodePool).length?((r=i.pop()).key=e,r.value=t):r={prev:null,next:null,key:e,value:t},this._map[e]=r,this.size++),this._appendNode(r)},n);function n(e){this.capacity=e,this._map={},this._head=null,this._tail=null,this._nodePool=[],this.size=0}t.LRUMap=r},function(e,t,i){"use strict";var r,n=this&&this.__extends||(r=function(e,t){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var i in t)t.hasOwnProperty(i)&&(e[i]=t[i])})(e,t)},function(e,t){function i(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(i.prototype=t.prototype,new i)});Object.defineProperty(t,"__esModule",{value:!0});var s,n=(s=i(13).BaseRenderLayer,n(o,s),o.prototype._clearState=function(){this._state={start:void 0,end:void 0,columnSelectMode:void 0,ydisp:void 0}},o.prototype.resize=function(e){s.prototype.resize.call(this,e),this._clearState()},o.prototype.reset=function(){this._state.start&&this._state.end&&(this._clearState(),this._clearAll())},o.prototype.onSelectionChanged=function(e,t,i){var r,n,o,s,a,c;this._didStateChange(e,t,i,this._bufferService.buffer.ydisp)&&(this._clearAll(),e&&t?(s=e[1]-this._bufferService.buffer.ydisp,c=t[1]-this._bufferService.buffer.ydisp,r=Math.max(s,0),n=Math.min(c,this._bufferService.rows-1),r>=this._bufferService.rows||n<0||(this._ctx.fillStyle=this._colors.selection.css,i?(a=e[0],o=t[0]-a,this._fillCells(a,r,o,n-r+1)):(a=s===r?e[0]:0,s=r===n?t[0]:this._bufferService.cols,this._fillCells(a,r,s-a,1),a=Math.max(n-r-1,0),this._fillCells(0,r+1,this._bufferService.cols,a),r!==n&&(c=c===n?t[0]:this._bufferService.cols,this._fillCells(0,n,c,1))),this._state.start=[e[0],e[1]],this._state.end=[t[0],t[1]],this._state.columnSelectMode=i,this._state.ydisp=this._bufferService.buffer.ydisp)):this._clearState())},o.prototype._didStateChange=function(e,t,i,r){return!this._areCoordinatesEqual(e,this._state.start)||!this._areCoordinatesEqual(t,this._state.end)||i!==this._state.columnSelectMode||r!==this._state.ydisp},o.prototype._areCoordinatesEqual=function(e,t){return!(!e||!t)&&e[0]===t[0]&&e[1]===t[1]},o);function o(e,t,i,r,n,o){r=s.call(this,e,"selection",t,!0,i,r,n,o)||this;return r.bufferService=n,r.optionsService=o,r._clearState(),r}t.SelectionRenderLayer=n},function(e,t,i){"use strict";var r,n=this&&this.__extends||(r=function(e,t){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var i in t)t.hasOwnProperty(i)&&(e[i]=t[i])})(e,t)},function(e,t){function i(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(i.prototype=t.prototype,new i)});Object.defineProperty(t,"__esModule",{value:!0});var l,o=i(13),h=i(5),n=(l=o.BaseRenderLayer,n(s,l),s.prototype.resize=function(e){l.prototype.resize.call(this,e),this._state={x:0,y:0,isFocused:!1,style:"",width:0}},s.prototype.reset=function(){this._clearCursor(),this._cursorBlinkStateManager&&(this._cursorBlinkStateManager.dispose(),this._cursorBlinkStateManager=void 0,this.onOptionsChanged())},s.prototype.onBlur=function(){this._cursorBlinkStateManager&&this._cursorBlinkStateManager.pause(),this._onRequestRefreshRowsEvent.fire({start:this._bufferService.buffer.y,end:this._bufferService.buffer.y})},s.prototype.onFocus=function(){this._cursorBlinkStateManager?this._cursorBlinkStateManager.resume():this._onRequestRefreshRowsEvent.fire({start:this._bufferService.buffer.y,end:this._bufferService.buffer.y})},s.prototype.onOptionsChanged=function(){var e,t=this;this._optionsService.options.cursorBlink?this._cursorBlinkStateManager||(this._cursorBlinkStateManager=new a(this._coreBrowserService.isFocused,function(){t._render(!0)})):(null===(e=this._cursorBlinkStateManager)||void 0===e||e.dispose(),this._cursorBlinkStateManager=void 0),this._onRequestRefreshRowsEvent.fire({start:this._bufferService.buffer.y,end:this._bufferService.buffer.y})},s.prototype.onCursorMove=function(){this._cursorBlinkStateManager&&this._cursorBlinkStateManager.restartBlinkAnimation()},s.prototype.onGridChanged=function(e,t){!this._cursorBlinkStateManager||this._cursorBlinkStateManager.isPaused?this._render(!1):this._cursorBlinkStateManager.restartBlinkAnimation()},s.prototype._render=function(e){if(this._coreService.isCursorInitialized&&!this._coreService.isCursorHidden){var t=this._bufferService.buffer.ybase+this._bufferService.buffer.y,i=t-this._bufferService.buffer.ydisp;if(i<0||i>=this._bufferService.rows)this._clearCursor();else if(this._bufferService.buffer.lines.get(t).loadCell(this._bufferService.buffer.x,this._cell),void 0!==this._cell.content){if(!this._coreBrowserService.isFocused){this._clearCursor(),this._ctx.save(),this._ctx.fillStyle=this._colors.cursor.css;t=this._optionsService.options.cursorStyle;return t&&"block"!==t?this._cursorRenderers[t](this._bufferService.buffer.x,i,this._cell):this._renderBlurCursor(this._bufferService.buffer.x,i,this._cell),this._ctx.restore(),this._state.x=this._bufferService.buffer.x,this._state.y=i,this._state.isFocused=!1,this._state.style=t,void(this._state.width=this._cell.getWidth())}if(!this._cursorBlinkStateManager||this._cursorBlinkStateManager.isCursorVisible){if(this._state){if(this._state.x===this._bufferService.buffer.x&&this._state.y===i&&this._state.isFocused===this._coreBrowserService.isFocused&&this._state.style===this._optionsService.options.cursorStyle&&this._state.width===this._cell.getWidth())return;this._clearCursor()}this._ctx.save(),this._cursorRenderers[this._optionsService.options.cursorStyle||"block"](this._bufferService.buffer.x,i,this._cell),this._ctx.restore(),this._state.x=this._bufferService.buffer.x,this._state.y=i,this._state.isFocused=!1,this._state.style=this._optionsService.options.cursorStyle,this._state.width=this._cell.getWidth()}else this._clearCursor()}}else this._clearCursor()},s.prototype._clearCursor=function(){this._state&&(this._clearCells(this._state.x,this._state.y,this._state.width,1),this._state={x:0,y:0,isFocused:!1,style:"",width:0})},s.prototype._renderBarCursor=function(e,t,i){this._ctx.save(),this._ctx.fillStyle=this._colors.cursor.css,this._fillLeftLineAtCell(e,t,this._optionsService.options.cursorWidth),this._ctx.restore()},s.prototype._renderBlockCursor=function(e,t,i){this._ctx.save(),this._ctx.fillStyle=this._colors.cursor.css,this._fillCells(e,t,i.getWidth(),1),this._ctx.fillStyle=this._colors.cursorAccent.css,this._fillCharTrueColor(i,e,t),this._ctx.restore()},s.prototype._renderUnderlineCursor=function(e,t,i){this._ctx.save(),this._ctx.fillStyle=this._colors.cursor.css,this._fillBottomLineAtCells(e,t),this._ctx.restore()},s.prototype._renderBlurCursor=function(e,t,i){this._ctx.save(),this._ctx.strokeStyle=this._colors.cursor.css,this._strokeRectAtCell(e,t,i.getWidth(),1),this._ctx.restore()},s);function s(e,t,i,r,n,o,s,a,c){r=l.call(this,e,"cursor",t,!0,i,r,o,s)||this;return r._onRequestRefreshRowsEvent=n,r.bufferService=o,r.optionsService=s,r._coreService=a,r._coreBrowserService=c,r._cell=new h.CellData,r._state={x:0,y:0,isFocused:!1,style:"",width:0},r._cursorRenderers={bar:r._renderBarCursor.bind(r),block:r._renderBlockCursor.bind(r),underline:r._renderUnderlineCursor.bind(r)},r}t.CursorRenderLayer=n;var a=(Object.defineProperty(c.prototype,"isPaused",{get:function(){return!(this._blinkStartTimeout||this._blinkInterval)},enumerable:!0,configurable:!0}),c.prototype.dispose=function(){this._blinkInterval&&(window.clearInterval(this._blinkInterval),this._blinkInterval=void 0),this._blinkStartTimeout&&(window.clearTimeout(this._blinkStartTimeout),this._blinkStartTimeout=void 0),this._animationFrame&&(window.cancelAnimationFrame(this._animationFrame),this._animationFrame=void 0)},c.prototype.restartBlinkAnimation=function(){var e=this;this.isPaused||(this._animationTimeRestarted=Date.now(),this.isCursorVisible=!0,this._animationFrame||(this._animationFrame=window.requestAnimationFrame(function(){e._renderCallback(),e._animationFrame=void 0})))},c.prototype._restartInterval=function(e){var t=this;void 0===e&&(e=600),this._blinkInterval&&window.clearInterval(this._blinkInterval),this._blinkStartTimeout=setTimeout(function(){if(t._animationTimeRestarted){var e=600-(Date.now()-t._animationTimeRestarted);if(t._animationTimeRestarted=void 0,0=e.lines.length)){for(var i=e.ydisp+Math.min(this._rowsToLinkify.end,this._bufferService.rows)+1,e=Math.ceil(2e3/this._bufferService.cols),r=this._bufferService.buffer.iterator(!1,t,i,e,e);r.hasNext();)for(var n=r.next(),o=0;o>9&511:void 0;s.validationCallback?s.validationCallback(t,function(e){c._rowsTimeoutId||e&&c._addLink(i[1],i[0]-c._bufferService.buffer.ydisp,t,s,r)}):u._addLink(i[1],i[0]-u._bufferService.buffer.ydisp,t,s,r)}(););},r.prototype._addLink=function(e,t,i,r,n){var o,s,a,c,l,h=this;this._mouseZoneManager&&this._element&&(o=this._unicodeService.getStringCellWidth(i),s=e%this._bufferService.cols,a=t+Math.floor(e/this._bufferService.cols),c=(s+o)%this._bufferService.cols,l=a+Math.floor((s+o)/this._bufferService.cols),0===c&&(c=this._bufferService.cols,l--),this._mouseZoneManager.add(new u(1+s,a+1,c+1,l+1,function(e){if(r.handler)return r.handler(e,i);e=window.open();e?(e.opener=null,e.location.href=i):console.warn("Opening link blocked as opener could not be cleared")},function(){h._onLinkHover.fire(h._createLinkHoverEvent(s,a,c,l,n)),h._element.classList.add("xterm-cursor-pointer")},function(e){h._onLinkTooltip.fire(h._createLinkHoverEvent(s,a,c,l,n)),r.hoverTooltipCallback&&r.hoverTooltipCallback(e,i,{start:{x:s,y:a},end:{x:c,y:l}})},function(){h._onLinkLeave.fire(h._createLinkHoverEvent(s,a,c,l,n)),h._element.classList.remove("xterm-cursor-pointer"),r.hoverLeaveCallback&&r.hoverLeaveCallback()},function(e){return!r.willLinkActivate||r.willLinkActivate(e,i)})))},r.prototype._createLinkHoverEvent=function(e,t,i,r,n){return{x1:e,y1:t,x2:i,y2:r,cols:this._bufferService.cols,fg:n}},r._timeBeforeLatency=200,r);function r(e,t,i,r){this._bufferService=e,this._logService=t,this._optionsService=i,this._unicodeService=r,this._linkMatchers=[],this._nextLinkMatcherId=0,this._onLinkHover=new n.EventEmitter,this._onLinkLeave=new n.EventEmitter,this._onLinkTooltip=new n.EventEmitter,this._rowsToLinkify={start:void 0,end:void 0}}t.Linkifier=i;var u=function(e,t,i,r,n,o,s,a,c){this.x1=e,this.y1=t,this.x2=i,this.y2=r,this.clickCallback=n,this.hoverCallback=o,this.tooltipCallback=s,this.leaveCallback=a,this.willLinkActivate=c};t.MouseZone=u},function(e,t,i){"use strict";var r=this&&this.__decorate||function(e,t,i,r){var n,o=arguments.length,s=o<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,i):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,i,r);else for(var a=e.length-1;0<=a;a--)(n=e[a])&&(s=(o<3?n(s):3t[1]&&e[1]=t[0]&&e[0]=t[0]},d.prototype.selectWordAtCursor=function(e){e=this._getMouseBufferCoords(e);e&&(this._selectWordAt(e,!1),this._model.selectionEnd=void 0,this.refresh(!0))},d.prototype.selectAll=function(){this._model.isSelectAllActive=!0,this.refresh(),this._onSelectionChange.fire()},d.prototype.selectLines=function(e,t){this._model.clearSelection(),e=Math.max(e,0),t=Math.min(t,this._bufferService.buffer.lines.length-1),this._model.selectionStart=[0,e],this._model.selectionEnd=[this._bufferService.cols,t],this.refresh(),this._onSelectionChange.fire()},d.prototype._onTrim=function(e){this._model.onTrim(e)&&this.refresh()},d.prototype._getMouseBufferCoords=function(e){e=this._mouseService.getCoords(e,this._screenElement,this._bufferService.cols,this._bufferService.rows,!0);if(e)return e[0]--,e[1]--,e[1]+=this._bufferService.buffer.ydisp,e},d.prototype._getMouseEventScrollAmount=function(e){var t=a.getCoordsRelativeToElement(e,this._screenElement)[1],e=this._bufferService.rows*Math.ceil(this._charSizeService.height*this._optionsService.options.lineHeight);return 0<=t&&t<=e?0:(e=r;r++){var n=e.loadCell(r,this._workCell).getChars().length;0===this._workCell.getWidth()?i--:1=this._bufferService.cols)){var n=this._bufferService.buffer,o=n.lines.get(e[1]);if(o){var s=n.translateBufferLineToString(e[1],!1),a=this._convertViewportColToCharacterIndex(o,e),c=a,l=e[0]-a,h=0,u=0,f=0,_=0;if(" "===s.charAt(a)){for(;0this._bufferService.cols;)t.length-=this._bufferService.cols,i++;this._model.selectionEnd=[this._model.areSelectionValuesReversed()?t.start:t.start+t.length,i]}},d.prototype._isCharWordSeparator=function(e){return 0!==e.getWidth()&&0<=this._optionsService.options.wordSeparator.indexOf(e.getChars())},d.prototype._selectLineAt=function(e){e=this._bufferService.buffer.getWrappedRangeForLine(e);this._model.selectionStart=[0,e.first],this._model.selectionEnd=[this._bufferService.cols,e.last],this._model.selectionStartLength=0},r([n(3,o.ICharSizeService),n(4,s.IBufferService),n(5,s.ICoreService),n(6,o.IMouseService),n(7,s.IOptionsService)],d));function d(e,t,i,r,n,o,s,a){var c=this;this._scrollLines=e,this._element=t,this._screenElement=i,this._charSizeService=r,this._bufferService=n,this._coreService=o,this._mouseService=s,this._optionsService=a,this._dragScrollAmount=0,this._enabled=!0,this._workCell=new h.CellData,this._mouseDownTimeStamp=0,this._onLinuxMouseSelection=new u.EventEmitter,this._onRedrawRequest=new u.EventEmitter,this._onSelectionChange=new u.EventEmitter,this._mouseMoveListener=function(e){return c._onMouseMove(e)},this._mouseUpListener=function(e){return c._onMouseUp(e)},this._coreService.onUserInput(function(){c.hasSelection&&c.clearSelection()}),this._trimListener=this._bufferService.buffer.lines.onTrim(function(e){return c._onTrim(e)}),this._bufferService.buffers.onBufferActivate(function(e){return c._onBufferActivate(e)}),this.enable(),this._model=new l.SelectionModel(this._bufferService),this._activeSelectionMode=0}t.SelectionService=s},function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=(n.prototype.clearSelection=function(){this.selectionStart=void 0,this.selectionEnd=void 0,this.isSelectAllActive=!1,this.selectionStartLength=0},Object.defineProperty(n.prototype,"finalSelectionStart",{get:function(){return this.isSelectAllActive?[0,0]:this.selectionEnd&&this.selectionStart&&this.areSelectionValuesReversed()?this.selectionEnd:this.selectionStart},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"finalSelectionEnd",{get:function(){if(this.isSelectAllActive)return[this._bufferService.cols,this._bufferService.buffer.ybase+this._bufferService.rows-1];if(this.selectionStart){if(this.selectionEnd&&!this.areSelectionValuesReversed())return this.selectionStartLength&&this.selectionEnd[1]===this.selectionStart[1]?[Math.max(this.selectionStart[0]+this.selectionStartLength,this.selectionEnd[0]),this.selectionEnd[1]]:this.selectionEnd;var e=this.selectionStart[0]+this.selectionStartLength;return e>this._bufferService.cols?[e%this._bufferService.cols,this.selectionStart[1]+Math.floor(e/this._bufferService.cols)]:[e,this.selectionStart[1]]}},enumerable:!0,configurable:!0}),n.prototype.areSelectionValuesReversed=function(){var e=this.selectionStart,t=this.selectionEnd;return!(!e||!t)&&(e[1]>t[1]||e[1]===t[1]&&e[0]>t[0])},n.prototype.onTrim=function(e){return this.selectionStart&&(this.selectionStart[1]-=e),this.selectionEnd&&(this.selectionEnd[1]-=e),this.selectionEnd&&this.selectionEnd[1]<0?(this.clearSelection(),!0):(this.selectionStart&&this.selectionStart[1]<0&&(this.selectionStart[1]=0),!1)},n);function n(e){this._bufferService=e,this.isSelectAllActive=!1,this.selectionStartLength=0}t.SelectionModel=r},function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=i(12);function y(e,t,i,r){var n=e-b(i,e),o=t-b(i,t);return C(Math.abs(n-o)-function(e,t,i){for(var r=0,n=e-b(i,e),o=t-b(i,t),s=0;so.cols-1?(c+=o.buffer.translateBufferLineToString(a,!1,e,s),e=s=0,a++):!n&&s<0&&(c+=o.buffer.translateBufferLineToString(a,!1,0,e+1),e=s=o.cols-1,a--);return c+o.buffer.translateBufferLineToString(a,!1,e,s)}function S(e,t){return r.C0.ESC+(t?"O":"[")+e}function C(e,t){e=Math.floor(e);for(var i="",r=0;re&&r.y1<=t+1||r.y2>e&&r.y2<=t+1||r.y1t+1)&&(this._currentZone&&this._currentZone===r&&(this._currentZone.leaveCallback(),this._currentZone=void 0),this._zones.splice(i--,1))}0===this._zones.length&&this._deactivate()}},u.prototype._activate=function(){this._areZonesActive||(this._areZonesActive=!0,this._element.addEventListener("mousemove",this._mouseMoveListener),this._element.addEventListener("mouseleave",this._mouseLeaveListener),this._element.addEventListener("click",this._clickListener))},u.prototype._deactivate=function(){this._areZonesActive&&(this._areZonesActive=!1,this._element.removeEventListener("mousemove",this._mouseMoveListener),this._element.removeEventListener("mouseleave",this._mouseLeaveListener),this._element.removeEventListener("click",this._clickListener))},u.prototype._onMouseMove=function(e){this._lastHoverCoords[0]===e.pageX&&this._lastHoverCoords[1]===e.pageY||(this._onHover(e),this._lastHoverCoords=[e.pageX,e.pageY])},u.prototype._onHover=function(e){var t=this,i=this._findZoneEventAt(e);i!==this._currentZone&&(this._currentZone&&(this._currentZone.leaveCallback(),this._currentZone=void 0,this._tooltipTimeout&&clearTimeout(this._tooltipTimeout)),i&&((this._currentZone=i).hoverCallback&&i.hoverCallback(e),this._tooltipTimeout=setTimeout(function(){return t._onTooltip(e)},500)))},u.prototype._onTooltip=function(e){this._tooltipTimeout=void 0;var t=this._findZoneEventAt(e);t&&t.tooltipCallback&&t.tooltipCallback(e)},u.prototype._onMouseDown=function(e){var t;this._initialSelectionLength=this._getSelectionLength(),this._areZonesActive&&null!==(t=this._findZoneEventAt(e))&&void 0!==t&&t.willLinkActivate(e)&&(e.preventDefault(),e.stopImmediatePropagation())},u.prototype._onMouseLeave=function(e){this._currentZone&&(this._currentZone.leaveCallback(),this._currentZone=void 0,this._tooltipTimeout&&clearTimeout(this._tooltipTimeout))},u.prototype._onClick=function(e){var t=this._findZoneEventAt(e),i=this._getSelectionLength();t&&i===this._initialSelectionLength&&(t.clickCallback(e),e.preventDefault(),e.stopImmediatePropagation())},u.prototype._getSelectionLength=function(){var e=this._selectionService.selectionText;return e?e.length:0},u.prototype._findZoneEventAt=function(e){e=this._mouseService.getCoords(e,this._screenElement,this._bufferService.cols,this._bufferService.rows);if(e)for(var t=e[0],i=e[1],r=0;r=n.x1&&t=n.x1||i===n.y2&&tn.y1&&ie;)this._rowContainer.removeChild(this._rowElements.pop());this._rowElements[this._rowElements.length-1].addEventListener("focus",this._bottomBoundaryFocusListener),this._refreshRowsDimensions()},f.prototype._createAccessibilityTreeNode=function(){var e=document.createElement("div");return e.setAttribute("role","listitem"),e.tabIndex=-1,this._refreshRowDimensions(e),e},f.prototype._onTab=function(e){for(var t=0;tt;)this._rowContainer.removeChild(this._rowElements.pop())},b.prototype.onResize=function(e,t){this._refreshRowElements(e,t),this._updateDimensions()},b.prototype.onCharSizeChanged=function(){this._updateDimensions()},b.prototype.onBlur=function(){this._rowContainer.classList.remove("xterm-focus")},b.prototype.onFocus=function(){this._rowContainer.classList.add("xterm-focus")},b.prototype.onSelectionChanged=function(e,t,i){for(;this._selectionContainer.children.length;)this._selectionContainer.removeChild(this._selectionContainer.children[0]);var r,n,o,s,a;e&&t&&(a=e[1]-this._bufferService.buffer.ydisp,r=t[1]-this._bufferService.buffer.ydisp,n=Math.max(a,0),o=Math.min(r,this._bufferService.rows-1),n>=this._bufferService.rows||o<0||(s=document.createDocumentFragment(),i?s.appendChild(this._createSelectionElement(n,e[0],t[0],o-n+1)):(a=a===n?e[0]:0,e=n===o?t[0]:this._bufferService.cols,s.appendChild(this._createSelectionElement(n,a,e)),s.appendChild(this._createSelectionElement(n+1,0,this._bufferService.cols,o-n-1)),n!==o&&(t=r===o?t[0]:this._bufferService.cols,s.appendChild(this._createSelectionElement(o,0,t)))),this._selectionContainer.appendChild(s)))},b.prototype._createSelectionElement=function(e,t,i,r){void 0===r&&(r=1);var n=document.createElement("div");return n.style.height=r*this.dimensions.actualCellHeight+"px",n.style.top=e*this.dimensions.actualCellHeight+"px",n.style.left=t*this.dimensions.actualCellWidth+"px",n.style.width=this.dimensions.actualCellWidth*(i-t)+"px",n},b.prototype.onCursorMove=function(){},b.prototype.onOptionsChanged=function(){this._updateDimensions(),this._injectCss()},b.prototype.clear=function(){this._rowElements.forEach(function(e){return e.innerHTML=""})},b.prototype.renderRows=function(e,t){for(var i=this._bufferService.buffer.ybase+this._bufferService.buffer.y,r=this._bufferService.buffer.x,n=this._optionsService.options.cursorBlink,o=e;o<=t;o++){var s=this._rowElements[o];s.innerHTML="";var a=o+this._bufferService.buffer.ydisp,c=this._bufferService.buffer.lines.get(a),l=this._optionsService.options.cursorStyle;s.appendChild(this._rowFactory.createRow(c,a===i,l,r,n,this.dimensions.actualCellWidth,this._bufferService.cols))}},Object.defineProperty(b.prototype,"_terminalSelector",{get:function(){return"."+p+this._terminalClass},enumerable:!0,configurable:!0}),b.prototype.registerCharacterJoiner=function(e){return-1},b.prototype.deregisterCharacterJoiner=function(e){return!1},b.prototype._onLinkHover=function(e){this._setCellUnderline(e.x1,e.x2,e.y1,e.y2,e.cols,!0)},b.prototype._onLinkLeave=function(e){this._setCellUnderline(e.x1,e.x2,e.y1,e.y2,e.cols,!1)},b.prototype._setCellUnderline=function(e,t,i,r,n,o){for(;e!==t||i!==r;){var s=this._rowElements[i];if(!s)return;s=s.children[e];s&&(s.style.textDecoration=o?"underline":"none"),++e>=n&&(e=0,i++)}},o([s(5,u.ICharSizeService),s(6,f.IOptionsService),s(7,f.IBufferService)],b));function b(e,t,i,r,n,o,s,a){var c=l.call(this)||this;return c._colors=e,c._element=t,c._screenElement=i,c._viewportElement=r,c._linkifier=n,c._charSizeService=o,c._optionsService=s,c._bufferService=a,c._terminalClass=y++,c._rowElements=[],c._onRequestRefreshRows=new _.EventEmitter,c._rowContainer=document.createElement("div"),c._rowContainer.classList.add(v),c._rowContainer.style.lineHeight="normal",c._rowContainer.setAttribute("aria-hidden","true"),c._refreshRowElements(c._bufferService.cols,c._bufferService.rows),c._selectionContainer=document.createElement("div"),c._selectionContainer.classList.add(g),c._selectionContainer.setAttribute("aria-hidden","true"),c.dimensions={scaledCharWidth:0,scaledCharHeight:0,scaledCellWidth:0,scaledCellHeight:0,scaledCharLeft:0,scaledCharTop:0,scaledCanvasWidth:0,scaledCanvasHeight:0,canvasWidth:0,canvasHeight:0,actualCellWidth:0,actualCellHeight:0},c._updateDimensions(),c._injectCss(),c._rowFactory=new h.DomRendererRowFactory(document,c._optionsService,c._colors),c._element.classList.add(p+c._terminalClass),c._screenElement.appendChild(c._rowContainer),c._screenElement.appendChild(c._selectionContainer),c._linkifier.onLinkHover(function(e){return c._onLinkHover(e)}),c._linkifier.onLinkLeave(function(e){return c._onLinkLeave(e)}),c}t.DomRenderer=f},function(e,y,t){"use strict";Object.defineProperty(y,"__esModule",{value:!0});var b=t(9),m=t(3),r=t(5),S=t(10);y.BOLD_CLASS="xterm-bold",y.DIM_CLASS="xterm-dim",y.ITALIC_CLASS="xterm-italic",y.UNDERLINE_CLASS="xterm-underline",y.CURSOR_CLASS="xterm-cursor",y.CURSOR_BLINK_CLASS="xterm-cursor-blink",y.CURSOR_STYLE_BLOCK_CLASS="xterm-cursor-block",y.CURSOR_STYLE_BAR_CLASS="xterm-cursor-bar",y.CURSOR_STYLE_UNDERLINE_CLASS="xterm-cursor-underline";i.prototype.setColors=function(e){this._colors=e},i.prototype.createRow=function(e,t,i,r,n,o,s){for(var a=this._document.createDocumentFragment(),c=0,l=Math.min(e.length,s)-1;0<=l;l--)if(e.loadCell(l,this._workCell).getCode()!==m.NULL_CELL_CODE||t&&l===r){c=l+1;break}for(l=0;l>16&255,f>>8&255,255&f);this._applyMinimumContrast(u,this._colors.background,g)||this._addStyle(u,"color:#"+C(f.toString(16),"0",6));break;case 0:default:this._applyMinimumContrast(u,this._colors.background,this._colors.foreground)||v&&u.classList.add("xterm-fg-"+b.INVERTED_DEFAULT_COLOR)}switch(p){case 16777216:case 33554432:u.classList.add("xterm-bg-"+d);break;case 50331648:this._addStyle(u,"background-color:#"+C(d.toString(16),"0",6));break;case 0:default:v&&u.classList.add("xterm-bg-"+b.INVERTED_DEFAULT_COLOR)}a.appendChild(u)}}return a},i.prototype._applyMinimumContrast=function(e,t,i){if(1===this._optionsService.options.minimumContrastRatio)return!1;var r=this._colors.contrastCache.getColor(this._workCell.bg,this._workCell.fg);return void 0===r&&(r=S.color.ensureContrastRatio(t,i,this._optionsService.options.minimumContrastRatio),this._colors.contrastCache.setColor(this._workCell.bg,this._workCell.fg,null!=r?r:null)),!!r&&(this._addStyle(e,"color:"+r.css),!0)},i.prototype._addStyle=function(e,t){e.setAttribute("style",""+(e.getAttribute("style")||"")+t+";")},t=i;function i(e,t,i){this._document=e,this._optionsService=t,this._colors=i,this._workCell=new r.CellData}function C(e,t,i){for(;e.length"],191:["/","?"],192:["`","~"],219:["[","{"],220:["\\","|"],221:["]","}"],222:["'",'"']};t.evaluateKeyboardEvent=function(e,t,i,r){var n,o={type:0,cancel:!1,key:void 0},s=(e.shiftKey?1:0)|(e.altKey?2:0)|(e.ctrlKey?4:0)|(e.metaKey?8:0);switch(e.keyCode){case 0:"UIKeyInputUpArrow"===e.key?o.key=t?a.C0.ESC+"OA":a.C0.ESC+"[A":"UIKeyInputLeftArrow"===e.key?o.key=t?a.C0.ESC+"OD":a.C0.ESC+"[D":"UIKeyInputRightArrow"===e.key?o.key=t?a.C0.ESC+"OC":a.C0.ESC+"[C":"UIKeyInputDownArrow"===e.key&&(o.key=t?a.C0.ESC+"OB":a.C0.ESC+"[B");break;case 8:if(e.shiftKey){o.key=a.C0.BS;break}if(e.altKey){o.key=a.C0.ESC+a.C0.DEL;break}o.key=a.C0.DEL;break;case 9:if(e.shiftKey){o.key=a.C0.ESC+"[Z";break}o.key=a.C0.HT,o.cancel=!0;break;case 13:o.key=a.C0.CR,o.cancel=!0;break;case 27:o.key=a.C0.ESC,o.cancel=!0;break;case 37:if(e.metaKey)break;s?(o.key=a.C0.ESC+"[1;"+(1+s)+"D",o.key===a.C0.ESC+"[1;3D"&&(o.key=a.C0.ESC+(i?"b":"[1;5D"))):o.key=t?a.C0.ESC+"OD":a.C0.ESC+"[D";break;case 39:if(e.metaKey)break;s?(o.key=a.C0.ESC+"[1;"+(1+s)+"C",o.key===a.C0.ESC+"[1;3C"&&(o.key=a.C0.ESC+(i?"f":"[1;5C"))):o.key=t?a.C0.ESC+"OC":a.C0.ESC+"[C";break;case 38:if(e.metaKey)break;s?(o.key=a.C0.ESC+"[1;"+(1+s)+"A",i||o.key!==a.C0.ESC+"[1;3A"||(o.key=a.C0.ESC+"[1;5A")):o.key=t?a.C0.ESC+"OA":a.C0.ESC+"[A";break;case 40:if(e.metaKey)break;s?(o.key=a.C0.ESC+"[1;"+(1+s)+"B",i||o.key!==a.C0.ESC+"[1;3B"||(o.key=a.C0.ESC+"[1;5B")):o.key=t?a.C0.ESC+"OB":a.C0.ESC+"[B";break;case 45:e.shiftKey||e.ctrlKey||(o.key=a.C0.ESC+"[2~");break;case 46:o.key=s?a.C0.ESC+"[3;"+(1+s)+"~":a.C0.ESC+"[3~";break;case 36:o.key=s?a.C0.ESC+"[1;"+(1+s)+"H":t?a.C0.ESC+"OH":a.C0.ESC+"[H";break;case 35:o.key=s?a.C0.ESC+"[1;"+(1+s)+"F":t?a.C0.ESC+"OF":a.C0.ESC+"[F";break;case 33:e.shiftKey?o.type=2:o.key=a.C0.ESC+"[5~";break;case 34:e.shiftKey?o.type=3:o.key=a.C0.ESC+"[6~";break;case 112:o.key=s?a.C0.ESC+"[1;"+(1+s)+"P":a.C0.ESC+"OP";break;case 113:o.key=s?a.C0.ESC+"[1;"+(1+s)+"Q":a.C0.ESC+"OQ";break;case 114:o.key=s?a.C0.ESC+"[1;"+(1+s)+"R":a.C0.ESC+"OR";break;case 115:o.key=s?a.C0.ESC+"[1;"+(1+s)+"S":a.C0.ESC+"OS";break;case 116:o.key=s?a.C0.ESC+"[15;"+(1+s)+"~":a.C0.ESC+"[15~";break;case 117:o.key=s?a.C0.ESC+"[17;"+(1+s)+"~":a.C0.ESC+"[17~";break;case 118:o.key=s?a.C0.ESC+"[18;"+(1+s)+"~":a.C0.ESC+"[18~";break;case 119:o.key=s?a.C0.ESC+"[19;"+(1+s)+"~":a.C0.ESC+"[19~";break;case 120:o.key=s?a.C0.ESC+"[20;"+(1+s)+"~":a.C0.ESC+"[20~";break;case 121:o.key=s?a.C0.ESC+"[21;"+(1+s)+"~":a.C0.ESC+"[21~";break;case 122:o.key=s?a.C0.ESC+"[23;"+(1+s)+"~":a.C0.ESC+"[23~";break;case 123:o.key=s?a.C0.ESC+"[24;"+(1+s)+"~":a.C0.ESC+"[24~";break;default:!e.ctrlKey||e.shiftKey||e.altKey||e.metaKey?i&&!r||!e.altKey||e.metaKey?i&&!e.altKey&&!e.ctrlKey&&e.metaKey?65===e.keyCode&&(o.type=1):e.key&&!e.ctrlKey&&!e.altKey&&!e.metaKey&&48<=e.keyCode&&1===e.key.length?o.key=e.key:e.key&&e.ctrlKey&&"_"===e.key&&(o.key=a.C0.US):(n=(n=c[e.keyCode])&&n[e.shiftKey?1:0])?o.key=a.C0.ESC+n:65<=e.keyCode&&e.keyCode<=90&&(n=e.ctrlKey?e.keyCode-64:e.keyCode+32,o.key=a.C0.ESC+String.fromCharCode(n)):65<=e.keyCode&&e.keyCode<=90?o.key=String.fromCharCode(e.keyCode-64):32===e.keyCode?o.key=a.C0.NUL:51<=e.keyCode&&e.keyCode<=55?o.key=String.fromCharCode(e.keyCode-51+27):56===e.keyCode?o.key=a.C0.DEL:219===e.keyCode?o.key=a.C0.ESC:220===e.keyCode?o.key=a.C0.FS:221===e.keyCode&&(o.key=a.C0.GS)}return o}},function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=i(3);t.updateWindowsModeWrappedState=function(e){var t=null===(t=e.buffer.lines.get(e.buffer.ybase+e.buffer.y-1))||void 0===t?void 0:t.get(e.cols-1),e=e.buffer.lines.get(e.buffer.ybase+e.buffer.y);e&&t&&(e.isWrapped=t[r.CHAR_DATA_CODE_INDEX]!==r.NULL_CELL_CODE&&t[r.CHAR_DATA_CODE_INDEX]!==r.WHITESPACE_CELL_CODE)}},function(e,t,i){"use strict";var r,n=this&&this.__extends||(r=function(e,t){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var i in t)t.hasOwnProperty(i)&&(e[i]=t[i])})(e,t)},function(e,t){function i(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(i.prototype=t.prototype,new i)}),o=this&&this.__decorate||function(e,t,i,r){var n,o=arguments.length,s=o<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,i):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,i,r);else for(var a=e.length-1;0<=a;a--)(n=e[a])&&(s=(o<3?n(s):3this._rows},enumerable:!0,configurable:!0}),Object.defineProperty(c.prototype,"isCursorInViewport",{get:function(){var e=this.ybase+this.y-this.ydisp;return 0<=e&&et.MAX_BUFFER_SIZE?t.MAX_BUFFER_SIZE:e},c.prototype.fillViewportRows=function(e){if(0===this.lines.length){void 0===e&&(e=D.DEFAULT_ATTR_DATA);for(var t=this._rows;t--;)this.lines.push(this.getBlankLine(e))}},c.prototype.clear=function(){this.ydisp=0,this.ybase=0,this.y=0,this.x=0,this.lines=new r.CircularList(this._getCorrectBufferLength(this._rows)),this.scrollTop=0,this.scrollBottom=this._rows-1,this.setupTabStops()},c.prototype.resize=function(e,t){var i=this.getNullCell(D.DEFAULT_ATTR_DATA),r=this._getCorrectBufferLength(t);if(r>this.lines.maxLength&&(this.lines.maxLength=r),0t+this.ybase&&(this.lines.length>this.ybase+this.y+1?this.lines.pop():(this.ybase++,this.ydisp++));re))for(n=0;nthis._cols?this._reflowLarger(e,t):this._reflowSmaller(e,t))},c.prototype._reflowLarger=function(e,t){var i=T.reflowLargerGetLinesToRemove(this.lines,this._cols,e,this.ybase+this.y,this.getNullCell(D.DEFAULT_ATTR_DATA));0E+R){for(var x=A.newLines.length-1;0<=x;x--)this.lines.set(_--,A.newLines[x]);_++,S.push({index:E+1,amount:A.newLines.length}),R+=A.newLines.length,A=r[++L]}else this.lines.set(_,C[E--]);var k=0;for(_=S.length-1;0<=_;_--)S[_].index+=k,this.lines.onInsertEmitter.fire(S[_]),k+=S[_].amount;w=Math.max(0,w+n-this.lines.maxLength);0=this._cols?this._cols-1:e<0?0:e},c.prototype.nextStop=function(e){for(null==e&&(e=this.x);!this.tabs[++e]&&e=this._cols?this._cols-1:e<0?0:e},c.prototype.addMarker=function(e){var t=this,i=new o.Marker(e);return this.markers.push(i),i.register(this.lines.onTrim(function(e){i.line-=e,i.line<0&&i.dispose()})),i.register(this.lines.onInsert(function(e){i.line>=e.index&&(i.line+=e.amount)})),i.register(this.lines.onDelete(function(e){i.line>=e.index&&i.linee.index&&(i.line-=e.amount)})),i.register(i.onDispose(function(){return t._removeMarker(i)})),i},c.prototype._removeMarker=function(e){this.markers.splice(this.markers.indexOf(e),1)},c.prototype.iterator=function(e,t,i,r,n){return new l(this,e,t,i,r,n)},i=c;function c(e,t,i){this._hasScrollback=e,this._optionsService=t,this._bufferService=i,this.ydisp=0,this.ybase=0,this.y=0,this.x=0,this.savedY=0,this.savedX=0,this.savedCurAttrData=D.DEFAULT_ATTR_DATA.clone(),this.savedCharset=a.DEFAULT_CHARSET,this.markers=[],this._nullCell=n.CellData.fromCharData([0,s.NULL_CELL_CHAR,s.NULL_CELL_WIDTH,s.NULL_CELL_CODE]),this._whitespaceCell=n.CellData.fromCharData([0,s.WHITESPACE_CELL_CHAR,s.WHITESPACE_CELL_WIDTH,s.WHITESPACE_CELL_CODE]),this._cols=this._bufferService.cols,this._rows=this._bufferService.rows,this.lines=new r.CircularList(this._getCorrectBufferLength(this._rows)),this.scrollTop=0,this.scrollBottom=this._rows-1,this.setupTabStops()}t.Buffer=i;var l=(h.prototype.hasNext=function(){return this._currentthis._endIndex+this._endOverscan&&(e.last=this._endIndex+this._endOverscan),e.first=Math.max(e.first,0),e.last=Math.min(e.last,this._buffer.lines.length);for(var t="",i=e.first;i<=e.last;++i)t+=this._buffer.translateBufferLineToString(i,this._trimRight);return this._current=e.last+1,{range:e,content:t}},h);function h(e,t,i,r,n,o){void 0===i&&(i=0),void 0===r&&(r=e.lines.length),void 0===n&&(n=0),void 0===o&&(o=0),this._buffer=e,this._trimRight=t,this._startIndex=i,this._endIndex=r,this._startOverscan=n,this._endOverscan=o,this._startIndex<0&&(this._startIndex=0),this._endIndex>this._buffer.lines.length&&(this._endIndex=this._buffer.lines.length),this._current=this._startIndex}t.BufferStringIterator=l},function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=i(1),i=(Object.defineProperty(n.prototype,"onDelete",{get:function(){return this.onDeleteEmitter.event},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"onInsert",{get:function(){return this.onInsertEmitter.event},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"onTrim",{get:function(){return this.onTrimEmitter.event},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"maxLength",{get:function(){return this._maxLength},set:function(e){if(this._maxLength!==e){for(var t=new Array(e),i=0;ithis._length)for(var t=this._length;tthis._maxLength?(i=this._length+r.length-this._maxLength,this._startIndex+=i,this._length=this._maxLength,this.onTrimEmitter.fire(i)):this._length+=r.length},n.prototype.trimStart=function(e){e>this._length&&(e=this._length),this._startIndex+=e,this._length-=e,this.onTrimEmitter.fire(e)},n.prototype.shiftElements=function(e,t,i){if(!(t<=0)){if(e<0||e>=this._length)throw new Error("start argument out of range");if(e+i<0)throw new Error("Cannot shift elements in list beyond index 0");if(0this._maxLength;)this._length--,this._startIndex++,this.onTrimEmitter.fire(1)}else for(r=0;rthis._end&&(this._end=e)},o.prototype.markRangeDirty=function(e,t){var i;tthis._end&&(this._end=t)},o.prototype.markAllDirty=function(){this.markRangeDirty(0,this._bufferService.rows-1)},i=r([n(0,i.IBufferService)],o);function o(e){this._bufferService=e,this.clearRange()}t.DirtyRowService=i},function(e,t,i){"use strict";var l=this&&this.__spreadArrays||function(){for(var e=0,t=0,i=arguments.length;t=this._bufferService.cols||e.row<0||e.row>=this._bufferService.rows)return!1;if(4===e.button&&32===e.action)return!1;if(3===e.button&&32!==e.action)return!1;if(4!==e.button&&(2===e.action||3===e.action))return!1;if(e.col++,e.row++,32===e.action&&this._lastEvent&&this._compareEvents(this._lastEvent,e))return!1;if(!this._protocols[this._activeProtocol].restrict(e))return!1;var t=this._encodings[this._activeEncoding](e);return t&&("DEFAULT"===this._activeEncoding?this._coreService.triggerBinaryEvent(t):this._coreService.triggerDataEvent(t,!0)),this._lastEvent=e,!0},u.prototype.explainEvents=function(e){return{DOWN:!!(1&e),UP:!!(2&e),DRAG:!!(4&e),MOVE:!!(8&e),WHEEL:!!(16&e)}},u.prototype._compareEvents=function(e,t){return e.col===t.col&&e.row===t.row&&e.button===t.button&&e.action===t.action&&e.ctrl===t.ctrl&&e.alt===t.alt&&e.shift===t.shift},r([n(0,o.IBufferService),n(1,o.ICoreService)],u));function u(e,t){var i=this;this._bufferService=e,this._coreService=t,this._protocols={},this._encodings={},this._activeProtocol="",this._activeEncoding="",this._onProtocolChange=new s.EventEmitter,this._lastEvent=null,Object.keys(a).forEach(function(e){return i.addProtocol(e,a[e])}),Object.keys(h).forEach(function(e){return i.addEncoding(e,h[e])}),this.reset()}t.CoreMouseService=o},function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=(n.prototype.writeSync=function(e){if(this._writeBuffer.length){for(var t=this._bufferOffset;tthis._bufferOffset;){var i=this._writeBuffer[this._bufferOffset],r=this._callbacks[this._bufferOffset];if(this._bufferOffset++,this._action(i),this._pendingData-=i.length,r&&r(),12<=Date.now()-t)break}this._writeBuffer.length>this._bufferOffset?(50=i)return t+this.wcwidth(n);var o=e.charCodeAt(r);56320<=o&&o<=57343?n=1024*(n-55296)+o-56320+65536:t+=this.wcwidth(o)}t+=this.wcwidth(n)}return t},o);function o(){this._providers=Object.create(null),this._active="",this._onChange=new r.EventEmitter;var e=new n.UnicodeV6;this.register(e),this._active=e.version,this._activeProvider=e}t.UnicodeService=i},function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r,n=i(15),o=[[768,879],[1155,1158],[1160,1161],[1425,1469],[1471,1471],[1473,1474],[1476,1477],[1479,1479],[1536,1539],[1552,1557],[1611,1630],[1648,1648],[1750,1764],[1767,1768],[1770,1773],[1807,1807],[1809,1809],[1840,1866],[1958,1968],[2027,2035],[2305,2306],[2364,2364],[2369,2376],[2381,2381],[2385,2388],[2402,2403],[2433,2433],[2492,2492],[2497,2500],[2509,2509],[2530,2531],[2561,2562],[2620,2620],[2625,2626],[2631,2632],[2635,2637],[2672,2673],[2689,2690],[2748,2748],[2753,2757],[2759,2760],[2765,2765],[2786,2787],[2817,2817],[2876,2876],[2879,2879],[2881,2883],[2893,2893],[2902,2902],[2946,2946],[3008,3008],[3021,3021],[3134,3136],[3142,3144],[3146,3149],[3157,3158],[3260,3260],[3263,3263],[3270,3270],[3276,3277],[3298,3299],[3393,3395],[3405,3405],[3530,3530],[3538,3540],[3542,3542],[3633,3633],[3636,3642],[3655,3662],[3761,3761],[3764,3769],[3771,3772],[3784,3789],[3864,3865],[3893,3893],[3895,3895],[3897,3897],[3953,3966],[3968,3972],[3974,3975],[3984,3991],[3993,4028],[4038,4038],[4141,4144],[4146,4146],[4150,4151],[4153,4153],[4184,4185],[4448,4607],[4959,4959],[5906,5908],[5938,5940],[5970,5971],[6002,6003],[6068,6069],[6071,6077],[6086,6086],[6089,6099],[6109,6109],[6155,6157],[6313,6313],[6432,6434],[6439,6440],[6450,6450],[6457,6459],[6679,6680],[6912,6915],[6964,6964],[6966,6970],[6972,6972],[6978,6978],[7019,7027],[7616,7626],[7678,7679],[8203,8207],[8234,8238],[8288,8291],[8298,8303],[8400,8431],[12330,12335],[12441,12442],[43014,43014],[43019,43019],[43045,43046],[64286,64286],[65024,65039],[65056,65059],[65279,65279],[65529,65531]],s=[[68097,68099],[68101,68102],[68108,68111],[68152,68154],[68159,68159],[119143,119145],[119155,119170],[119173,119179],[119210,119213],[119362,119364],[917505,917505],[917536,917631],[917760,917999]],i=(a.prototype.wcwidth=function(e){return e<32?0:e<127?1:e<65536?r[e]:function(e,t){var i,r=0,n=t.length-1;if(!(et[n][1]))for(;r<=n;)if(e>t[i=r+n>>1][1])r=1+i;else{if(!(ew?(f.op=k[g+I[i]],f.val=_[m+I[i]]):f.op=96,d=1<>>e)+(r-=d)]=f,0!=r;);for(d=1<>>=1;if(0!=d?(n&=d-1,n+=d):n=0,i++,0==--A[O]){if(O==o)break;O=L[R+I[i]]}if(l>>4),a<48&&(a&=15)),1==i&&"function"==typeof ZLIB.adler32?t.checksum_function=ZLIB.adler32:2==i&&"function"==typeof ZLIB.crc32?t.checksum_function=ZLIB.crc32:t.checksum_function=o,a&&(a<8||15>>8&255];t.state.check=t.checksum_function(t.state.check,a,0,2)}function Z(t,a){return a.strm=t,a.left=t.avail_out,a.next=t.next_in,a.have=t.avail_in,a.hold=t.state.hold,a.bits=t.state.bits,a}function I(t){var a=t.strm;a.next_in=t.next,a.avail_out=t.left,a.avail_in=t.have,a.state.hold=t.hold,a.state.bits=t.bits}function L(t){t.hold=0,t.bits=0}function E(t){return 0!=t.have&&(t.have--,t.hold+=(255&t.strm.input_data.charCodeAt(t.next++))<>>=a,t.bits-=a}function H(t){t.hold>>>=7&t.bits,t.bits-=7&t.bits}function j(t){return(t>>>24&255)+(t>>>8&65280)+((65280&t)<<8)+((255&t)<<24)}var U=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15];ZLIB.inflate=function(t,a){var i,s,o,l,b,e,v,p,n,d,r,h,c,f,u=-1,_=-1;if(!t||!t.state||!t.input_data&&0!=t.avail_in)return ZLIB.Z_STREAM_ERROR;(i=t.state).mode==R&&(i.mode=12),Z(t,s={}),o=s.have,l=s.left,n=ZLIB.Z_OK;t:for(;;)switch(i.mode){case 0:if(0==i.wrap){i.mode=12;break}if(!A(s,16))break t;if(2&i.wrap&&35615==s.hold){i.check=t.checksum_function(0,null,0,0),x(t,s.hold),L(s),i.mode=1;break}if(i.flags=0,null!==i.head&&(i.head.done=-1),!(1&i.wrap)||((S(s,8)<<8)+(s.hold>>>8))%31){t.msg="incorrect header check",i.mode=B;break}if(S(s,4)!=ZLIB.Z_DEFLATED){t.msg="unknown compression method",i.mode=B;break}if(O(s,4),p=S(s,4)+8,0==i.wbits)i.wbits=p;else if(p>i.wbits){t.msg="invalid window size",i.mode=B;break}i.dmax=1<>>8&1),512&i.flags&&x(t,s.hold),L(s),i.mode=2;case 2:if(!A(s,32))break t;null!==i.head&&(i.head.time=s.hold),512&i.flags&&(d=t,r=[255&(r=s.hold),r>>>8&255,r>>>16&255,r>>>24&255],d.state.check=d.checksum_function(d.state.check,r,0,4)),L(s),i.mode=3;case 3:if(!A(s,16))break t;null!==i.head&&(i.head.xflags=255&s.hold,i.head.os=s.hold>>>8),512&i.flags&&x(t,s.hold),L(s),i.mode=4;case 4:if(1024&i.flags){if(!A(s,16))break t;i.length=s.hold,null!==i.head&&(i.head.extra_len=s.hold),512&i.flags&&x(t,s.hold),L(s),i.head.extra=""}else null!==i.head&&(i.head.extra=null);i.mode=5;case 5:if(1024&i.flags&&((b=(b=i.length)>s.have?s.have:b)&&(null!==i.head&&null!==i.head.extra&&(p=i.head.extra_len-i.length,i.head.extra+=t.input_data.substring(s.next,s.next+(p+b>i.head.extra_max?i.head.extra_max-p:b))),512&i.flags&&(i.check=t.checksum_function(i.check,t.input_data,s.next,b)),s.have-=b,s.next+=b,i.length-=b),i.length))break t;i.length=0,i.mode=6;case 6:if(2048&i.flags){if(0==s.have)break t;for(null!==i.head&&null===i.head.name&&(i.head.name=""),b=0;p=t.input_data.charAt(s.next+b),b++,"\0"!==p&&(null!==i.head&&i.length>>9&1,i.head.done=1),t.adler=i.check=t.checksum_function(0,null,0,0),i.mode=R;break;case 9:if(!A(s,32))break t;t.adler=i.check=j(s.hold),L(s),i.mode=10;case 10:if(0==i.havedict)return I(s),ZLIB.Z_NEED_DICT;t.adler=i.check=t.checksum_function(0,null,0,0),i.mode=R;case R:if(a==ZLIB.Z_BLOCK||a==ZLIB.Z_TREES)break t;case 12:if(i.last){H(s),i.mode=26;break}if(!A(s,3))break t;switch(i.last=S(s,1),O(s,1),S(s,2)){case 0:i.mode=13;break;case 1:if(!function(t){var a;for(g=g||[{op:96,bits:7,val:0},{op:0,bits:8,val:80},{op:0,bits:8,val:16},{op:20,bits:8,val:115},{op:18,bits:7,val:31},{op:0,bits:8,val:112},{op:0,bits:8,val:48},{op:0,bits:9,val:192},{op:16,bits:7,val:10},{op:0,bits:8,val:96},{op:0,bits:8,val:32},{op:0,bits:9,val:160},{op:0,bits:8,val:0},{op:0,bits:8,val:128},{op:0,bits:8,val:64},{op:0,bits:9,val:224},{op:16,bits:7,val:6},{op:0,bits:8,val:88},{op:0,bits:8,val:24},{op:0,bits:9,val:144},{op:19,bits:7,val:59},{op:0,bits:8,val:120},{op:0,bits:8,val:56},{op:0,bits:9,val:208},{op:17,bits:7,val:17},{op:0,bits:8,val:104},{op:0,bits:8,val:40},{op:0,bits:9,val:176},{op:0,bits:8,val:8},{op:0,bits:8,val:136},{op:0,bits:8,val:72},{op:0,bits:9,val:240},{op:16,bits:7,val:4},{op:0,bits:8,val:84},{op:0,bits:8,val:20},{op:21,bits:8,val:227},{op:19,bits:7,val:43},{op:0,bits:8,val:116},{op:0,bits:8,val:52},{op:0,bits:9,val:200},{op:17,bits:7,val:13},{op:0,bits:8,val:100},{op:0,bits:8,val:36},{op:0,bits:9,val:168},{op:0,bits:8,val:4},{op:0,bits:8,val:132},{op:0,bits:8,val:68},{op:0,bits:9,val:232},{op:16,bits:7,val:8},{op:0,bits:8,val:92},{op:0,bits:8,val:28},{op:0,bits:9,val:152},{op:20,bits:7,val:83},{op:0,bits:8,val:124},{op:0,bits:8,val:60},{op:0,bits:9,val:216},{op:18,bits:7,val:23},{op:0,bits:8,val:108},{op:0,bits:8,val:44},{op:0,bits:9,val:184},{op:0,bits:8,val:12},{op:0,bits:8,val:140},{op:0,bits:8,val:76},{op:0,bits:9,val:248},{op:16,bits:7,val:3},{op:0,bits:8,val:82},{op:0,bits:8,val:18},{op:21,bits:8,val:163},{op:19,bits:7,val:35},{op:0,bits:8,val:114},{op:0,bits:8,val:50},{op:0,bits:9,val:196},{op:17,bits:7,val:11},{op:0,bits:8,val:98},{op:0,bits:8,val:34},{op:0,bits:9,val:164},{op:0,bits:8,val:2},{op:0,bits:8,val:130},{op:0,bits:8,val:66},{op:0,bits:9,val:228},{op:16,bits:7,val:7},{op:0,bits:8,val:90},{op:0,bits:8,val:26},{op:0,bits:9,val:148},{op:20,bits:7,val:67},{op:0,bits:8,val:122},{op:0,bits:8,val:58},{op:0,bits:9,val:212},{op:18,bits:7,val:19},{op:0,bits:8,val:106},{op:0,bits:8,val:42},{op:0,bits:9,val:180},{op:0,bits:8,val:10},{op:0,bits:8,val:138},{op:0,bits:8,val:74},{op:0,bits:9,val:244},{op:16,bits:7,val:5},{op:0,bits:8,val:86},{op:0,bits:8,val:22},{op:64,bits:8,val:0},{op:19,bits:7,val:51},{op:0,bits:8,val:118},{op:0,bits:8,val:54},{op:0,bits:9,val:204},{op:17,bits:7,val:15},{op:0,bits:8,val:102},{op:0,bits:8,val:38},{op:0,bits:9,val:172},{op:0,bits:8,val:6},{op:0,bits:8,val:134},{op:0,bits:8,val:70},{op:0,bits:9,val:236},{op:16,bits:7,val:9},{op:0,bits:8,val:94},{op:0,bits:8,val:30},{op:0,bits:9,val:156},{op:20,bits:7,val:99},{op:0,bits:8,val:126},{op:0,bits:8,val:62},{op:0,bits:9,val:220},{op:18,bits:7,val:27},{op:0,bits:8,val:110},{op:0,bits:8,val:46},{op:0,bits:9,val:188},{op:0,bits:8,val:14},{op:0,bits:8,val:142},{op:0,bits:8,val:78},{op:0,bits:9,val:252},{op:96,bits:7,val:0},{op:0,bits:8,val:81},{op:0,bits:8,val:17},{op:21,bits:8,val:131},{op:18,bits:7,val:31},{op:0,bits:8,val:113},{op:0,bits:8,val:49},{op:0,bits:9,val:194},{op:16,bits:7,val:10},{op:0,bits:8,val:97},{op:0,bits:8,val:33},{op:0,bits:9,val:162},{op:0,bits:8,val:1},{op:0,bits:8,val:129},{op:0,bits:8,val:65},{op:0,bits:9,val:226},{op:16,bits:7,val:6},{op:0,bits:8,val:89},{op:0,bits:8,val:25},{op:0,bits:9,val:146},{op:19,bits:7,val:59},{op:0,bits:8,val:121},{op:0,bits:8,val:57},{op:0,bits:9,val:210},{op:17,bits:7,val:17},{op:0,bits:8,val:105},{op:0,bits:8,val:41},{op:0,bits:9,val:178},{op:0,bits:8,val:9},{op:0,bits:8,val:137},{op:0,bits:8,val:73},{op:0,bits:9,val:242},{op:16,bits:7,val:4},{op:0,bits:8,val:85},{op:0,bits:8,val:21},{op:16,bits:8,val:258},{op:19,bits:7,val:43},{op:0,bits:8,val:117},{op:0,bits:8,val:53},{op:0,bits:9,val:202},{op:17,bits:7,val:13},{op:0,bits:8,val:101},{op:0,bits:8,val:37},{op:0,bits:9,val:170},{op:0,bits:8,val:5},{op:0,bits:8,val:133},{op:0,bits:8,val:69},{op:0,bits:9,val:234},{op:16,bits:7,val:8},{op:0,bits:8,val:93},{op:0,bits:8,val:29},{op:0,bits:9,val:154},{op:20,bits:7,val:83},{op:0,bits:8,val:125},{op:0,bits:8,val:61},{op:0,bits:9,val:218},{op:18,bits:7,val:23},{op:0,bits:8,val:109},{op:0,bits:8,val:45},{op:0,bits:9,val:186},{op:0,bits:8,val:13},{op:0,bits:8,val:141},{op:0,bits:8,val:77},{op:0,bits:9,val:250},{op:16,bits:7,val:3},{op:0,bits:8,val:83},{op:0,bits:8,val:19},{op:21,bits:8,val:195},{op:19,bits:7,val:35},{op:0,bits:8,val:115},{op:0,bits:8,val:51},{op:0,bits:9,val:198},{op:17,bits:7,val:11},{op:0,bits:8,val:99},{op:0,bits:8,val:35},{op:0,bits:9,val:166},{op:0,bits:8,val:3},{op:0,bits:8,val:131},{op:0,bits:8,val:67},{op:0,bits:9,val:230},{op:16,bits:7,val:7},{op:0,bits:8,val:91},{op:0,bits:8,val:27},{op:0,bits:9,val:150},{op:20,bits:7,val:67},{op:0,bits:8,val:123},{op:0,bits:8,val:59},{op:0,bits:9,val:214},{op:18,bits:7,val:19},{op:0,bits:8,val:107},{op:0,bits:8,val:43},{op:0,bits:9,val:182},{op:0,bits:8,val:11},{op:0,bits:8,val:139},{op:0,bits:8,val:75},{op:0,bits:9,val:246},{op:16,bits:7,val:5},{op:0,bits:8,val:87},{op:0,bits:8,val:23},{op:64,bits:8,val:0},{op:19,bits:7,val:51},{op:0,bits:8,val:119},{op:0,bits:8,val:55},{op:0,bits:9,val:206},{op:17,bits:7,val:15},{op:0,bits:8,val:103},{op:0,bits:8,val:39},{op:0,bits:9,val:174},{op:0,bits:8,val:7},{op:0,bits:8,val:135},{op:0,bits:8,val:71},{op:0,bits:9,val:238},{op:16,bits:7,val:9},{op:0,bits:8,val:95},{op:0,bits:8,val:31},{op:0,bits:9,val:158},{op:20,bits:7,val:99},{op:0,bits:8,val:127},{op:0,bits:8,val:63},{op:0,bits:9,val:222},{op:18,bits:7,val:27},{op:0,bits:8,val:111},{op:0,bits:8,val:47},{op:0,bits:9,val:190},{op:0,bits:8,val:15},{op:0,bits:8,val:143},{op:0,bits:8,val:79},{op:0,bits:9,val:254},{op:96,bits:7,val:0},{op:0,bits:8,val:80},{op:0,bits:8,val:16},{op:20,bits:8,val:115},{op:18,bits:7,val:31},{op:0,bits:8,val:112},{op:0,bits:8,val:48},{op:0,bits:9,val:193},{op:16,bits:7,val:10},{op:0,bits:8,val:96},{op:0,bits:8,val:32},{op:0,bits:9,val:161},{op:0,bits:8,val:0},{op:0,bits:8,val:128},{op:0,bits:8,val:64},{op:0,bits:9,val:225},{op:16,bits:7,val:6},{op:0,bits:8,val:88},{op:0,bits:8,val:24},{op:0,bits:9,val:145},{op:19,bits:7,val:59},{op:0,bits:8,val:120},{op:0,bits:8,val:56},{op:0,bits:9,val:209},{op:17,bits:7,val:17},{op:0,bits:8,val:104},{op:0,bits:8,val:40},{op:0,bits:9,val:177},{op:0,bits:8,val:8},{op:0,bits:8,val:136},{op:0,bits:8,val:72},{op:0,bits:9,val:241},{op:16,bits:7,val:4},{op:0,bits:8,val:84},{op:0,bits:8,val:20},{op:21,bits:8,val:227},{op:19,bits:7,val:43},{op:0,bits:8,val:116},{op:0,bits:8,val:52},{op:0,bits:9,val:201},{op:17,bits:7,val:13},{op:0,bits:8,val:100},{op:0,bits:8,val:36},{op:0,bits:9,val:169},{op:0,bits:8,val:4},{op:0,bits:8,val:132},{op:0,bits:8,val:68},{op:0,bits:9,val:233},{op:16,bits:7,val:8},{op:0,bits:8,val:92},{op:0,bits:8,val:28},{op:0,bits:9,val:153},{op:20,bits:7,val:83},{op:0,bits:8,val:124},{op:0,bits:8,val:60},{op:0,bits:9,val:217},{op:18,bits:7,val:23},{op:0,bits:8,val:108},{op:0,bits:8,val:44},{op:0,bits:9,val:185},{op:0,bits:8,val:12},{op:0,bits:8,val:140},{op:0,bits:8,val:76},{op:0,bits:9,val:249},{op:16,bits:7,val:3},{op:0,bits:8,val:82},{op:0,bits:8,val:18},{op:21,bits:8,val:163},{op:19,bits:7,val:35},{op:0,bits:8,val:114},{op:0,bits:8,val:50},{op:0,bits:9,val:197},{op:17,bits:7,val:11},{op:0,bits:8,val:98},{op:0,bits:8,val:34},{op:0,bits:9,val:165},{op:0,bits:8,val:2},{op:0,bits:8,val:130},{op:0,bits:8,val:66},{op:0,bits:9,val:229},{op:16,bits:7,val:7},{op:0,bits:8,val:90},{op:0,bits:8,val:26},{op:0,bits:9,val:149},{op:20,bits:7,val:67},{op:0,bits:8,val:122},{op:0,bits:8,val:58},{op:0,bits:9,val:213},{op:18,bits:7,val:19},{op:0,bits:8,val:106},{op:0,bits:8,val:42},{op:0,bits:9,val:181},{op:0,bits:8,val:10},{op:0,bits:8,val:138},{op:0,bits:8,val:74},{op:0,bits:9,val:245},{op:16,bits:7,val:5},{op:0,bits:8,val:86},{op:0,bits:8,val:22},{op:64,bits:8,val:0},{op:19,bits:7,val:51},{op:0,bits:8,val:118},{op:0,bits:8,val:54},{op:0,bits:9,val:205},{op:17,bits:7,val:15},{op:0,bits:8,val:102},{op:0,bits:8,val:38},{op:0,bits:9,val:173},{op:0,bits:8,val:6},{op:0,bits:8,val:134},{op:0,bits:8,val:70},{op:0,bits:9,val:237},{op:16,bits:7,val:9},{op:0,bits:8,val:94},{op:0,bits:8,val:30},{op:0,bits:9,val:157},{op:20,bits:7,val:99},{op:0,bits:8,val:126},{op:0,bits:8,val:62},{op:0,bits:9,val:221},{op:18,bits:7,val:27},{op:0,bits:8,val:110},{op:0,bits:8,val:46},{op:0,bits:9,val:189},{op:0,bits:8,val:14},{op:0,bits:8,val:142},{op:0,bits:8,val:78},{op:0,bits:9,val:253},{op:96,bits:7,val:0},{op:0,bits:8,val:81},{op:0,bits:8,val:17},{op:21,bits:8,val:131},{op:18,bits:7,val:31},{op:0,bits:8,val:113},{op:0,bits:8,val:49},{op:0,bits:9,val:195},{op:16,bits:7,val:10},{op:0,bits:8,val:97},{op:0,bits:8,val:33},{op:0,bits:9,val:163},{op:0,bits:8,val:1},{op:0,bits:8,val:129},{op:0,bits:8,val:65},{op:0,bits:9,val:227},{op:16,bits:7,val:6},{op:0,bits:8,val:89},{op:0,bits:8,val:25},{op:0,bits:9,val:147},{op:19,bits:7,val:59},{op:0,bits:8,val:121},{op:0,bits:8,val:57},{op:0,bits:9,val:211},{op:17,bits:7,val:17},{op:0,bits:8,val:105},{op:0,bits:8,val:41},{op:0,bits:9,val:179},{op:0,bits:8,val:9},{op:0,bits:8,val:137},{op:0,bits:8,val:73},{op:0,bits:9,val:243},{op:16,bits:7,val:4},{op:0,bits:8,val:85},{op:0,bits:8,val:21},{op:16,bits:8,val:258},{op:19,bits:7,val:43},{op:0,bits:8,val:117},{op:0,bits:8,val:53},{op:0,bits:9,val:203},{op:17,bits:7,val:13},{op:0,bits:8,val:101},{op:0,bits:8,val:37},{op:0,bits:9,val:171},{op:0,bits:8,val:5},{op:0,bits:8,val:133},{op:0,bits:8,val:69},{op:0,bits:9,val:235},{op:16,bits:7,val:8},{op:0,bits:8,val:93},{op:0,bits:8,val:29},{op:0,bits:9,val:155},{op:20,bits:7,val:83},{op:0,bits:8,val:125},{op:0,bits:8,val:61},{op:0,bits:9,val:219},{op:18,bits:7,val:23},{op:0,bits:8,val:109},{op:0,bits:8,val:45},{op:0,bits:9,val:187},{op:0,bits:8,val:13},{op:0,bits:8,val:141},{op:0,bits:8,val:77},{op:0,bits:9,val:251},{op:16,bits:7,val:3},{op:0,bits:8,val:83},{op:0,bits:8,val:19},{op:21,bits:8,val:195},{op:19,bits:7,val:35},{op:0,bits:8,val:115},{op:0,bits:8,val:51},{op:0,bits:9,val:199},{op:17,bits:7,val:11},{op:0,bits:8,val:99},{op:0,bits:8,val:35},{op:0,bits:9,val:167},{op:0,bits:8,val:3},{op:0,bits:8,val:131},{op:0,bits:8,val:67},{op:0,bits:9,val:231},{op:16,bits:7,val:7},{op:0,bits:8,val:91},{op:0,bits:8,val:27},{op:0,bits:9,val:151},{op:20,bits:7,val:67},{op:0,bits:8,val:123},{op:0,bits:8,val:59},{op:0,bits:9,val:215},{op:18,bits:7,val:19},{op:0,bits:8,val:107},{op:0,bits:8,val:43},{op:0,bits:9,val:183},{op:0,bits:8,val:11},{op:0,bits:8,val:139},{op:0,bits:8,val:75},{op:0,bits:9,val:247},{op:16,bits:7,val:5},{op:0,bits:8,val:87},{op:0,bits:8,val:23},{op:64,bits:8,val:0},{op:19,bits:7,val:51},{op:0,bits:8,val:119},{op:0,bits:8,val:55},{op:0,bits:9,val:207},{op:17,bits:7,val:15},{op:0,bits:8,val:103},{op:0,bits:8,val:39},{op:0,bits:9,val:175},{op:0,bits:8,val:7},{op:0,bits:8,val:135},{op:0,bits:8,val:71},{op:0,bits:9,val:239},{op:16,bits:7,val:9},{op:0,bits:8,val:95},{op:0,bits:8,val:31},{op:0,bits:9,val:159},{op:20,bits:7,val:99},{op:0,bits:8,val:127},{op:0,bits:8,val:63},{op:0,bits:9,val:223},{op:18,bits:7,val:27},{op:0,bits:8,val:111},{op:0,bits:8,val:47},{op:0,bits:9,val:191},{op:0,bits:8,val:15},{op:0,bits:8,val:143},{op:0,bits:8,val:79},{op:0,bits:9,val:255}],w=w||[{op:16,bits:5,val:1},{op:23,bits:5,val:257},{op:19,bits:5,val:17},{op:27,bits:5,val:4097},{op:17,bits:5,val:5},{op:25,bits:5,val:1025},{op:21,bits:5,val:65},{op:29,bits:5,val:16385},{op:16,bits:5,val:3},{op:24,bits:5,val:513},{op:20,bits:5,val:33},{op:28,bits:5,val:8193},{op:18,bits:5,val:9},{op:26,bits:5,val:2049},{op:22,bits:5,val:129},{op:64,bits:5,val:0},{op:16,bits:5,val:2},{op:23,bits:5,val:385},{op:19,bits:5,val:25},{op:27,bits:5,val:6145},{op:17,bits:5,val:7},{op:25,bits:5,val:1537},{op:21,bits:5,val:97},{op:29,bits:5,val:24577},{op:16,bits:5,val:4},{op:24,bits:5,val:769},{op:20,bits:5,val:49},{op:28,bits:5,val:12289},{op:18,bits:5,val:13},{op:26,bits:5,val:3073},{op:22,bits:5,val:193},{op:64,bits:5,val:0}],t.lencode=0,t.distcode=512,a=0;a<512;a++)t.codes[a]=g[a];for(a=0;a<32;a++)t.codes[a+512]=w[a];t.lenbits=9,t.distbits=5}(i),i.mode=19,a!=ZLIB.Z_TREES)break;O(s,2);break t;case 2:i.mode=16;break;case 3:t.msg="invalid block type",i.mode=B}O(s,2);break;case 13:if(H(s),!A(s,32))break t;if((65535&s.hold)!=(s.hold>>>16&65535^65535)){t.msg="invalid stored block lengths",i.mode=B;break}if(i.length=65535&s.hold,L(s),i.mode=14,a==ZLIB.Z_TREES)break t;case 14:i.mode=15;case 15:if(b=i.length){if(0==(b=(b=b>s.have?s.have:b)>s.left?s.left:b))break t;t.output_data+=t.input_data.substring(s.next,s.next+b),t.next_out+=b,s.have-=b,s.next+=b,s.left-=b,i.length-=b;break}i.mode=R;break;case 16:if(!A(s,14))break t;if(i.nlen=S(s,5)+257,O(s,5),i.ndist=S(s,5)+1,O(s,5),i.ncode=S(s,4)+4,O(s,4),286i.nlen+i.ndist){t.msg="invalid bit length repeat",i.mode=B;break}for(;b--;)i.lens[i.have++]=p}}if(i.mode==B)break;if(0==i.lens[256]){t.msg="invalid code -- missing end-of-block",i.mode=B;break}if(i.next=0,i.lencode=i.next,i.lenbits=9,n=k(i,y)){t.msg="invalid literal/lengths set",i.mode=B;break}if(i.distcode=i.next,i.distbits=6,n=k(i,M)){t.msg="invalid distances set",i.mode=B;break}if(i.mode=19,a==ZLIB.Z_TREES)break t;case 19:i.mode=20;case 20:if(6<=s.have&&258<=s.left){I(s),function(t,a){var i,s,o,l=-1,b=-1,e=t.state,v=t.input_data,p=t.next_in,n=p+t.avail_in-5,d=t.next_out,r=d-(a-t.avail_out),h=d+(t.avail_out-257),c=e.wsize,f=e.whave,u=e.wnext,_=e.window,m=e.hold,k=e.bits,g=e.codes,w=e.lencode,x=e.distcode,Z=(1<>>=s=i.bits,k-=s,0==(s=i.op))t.output_data+=String.fromCharCode(i.val),d++;else{if(!(16&s)){if(0==(64&s)){i=g[w+(i.val+(m&(1<>>=s,k-=s),k<15&&(m+=(255&v.charCodeAt(p++))<>>=s=i.bits,k-=s,!(16&(s=i.op))){if(0==(64&s)){i=g[x+(i.val+(m&(1<>>=s,k-=s,(s=d-r)>>3,m&=(1<<(k-=o<<3))-1,t.next_in=p,t.next_out=d,t.avail_in=p>>v.bits)],!(v.bits+e.bits<=s.bits);)if(!E(s))break t;O(s,v.bits),i.back+=v.bits}if(O(s,e.bits),i.back+=e.bits,i.length=e.val,0==e.op){i.mode=25;break}if(32&e.op){i.back=-1,i.mode=R;break}if(64&e.op){t.msg="invalid literal/length code",i.mode=B;break}i.extra=15&e.op,i.mode=21;case 21:if(i.extra){if(!A(s,i.extra))break t;i.length+=S(s,i.extra),O(s,i.extra),i.back+=i.extra}i.was=i.length,i.mode=22;case 22:for(;!((e=i.codes[i.distcode+S(s,i.distbits)]).bits<=s.bits);)if(!E(s))break t;if(0==(240&e.op)){for(v=e;e=i.codes[i.distcode+v.val+(S(s,v.bits+v.op)>>>v.bits)],!(v.bits+e.bits<=s.bits);)if(!E(s))break t;O(s,v.bits),i.back+=v.bits}if(O(s,e.bits),i.back+=e.bits,64&e.op){t.msg="invalid distance code",i.mode=B;break}i.offset=e.val,i.extra=15&e.op,i.mode=23;case 23:if(i.extra){if(!A(s,i.extra))break t;i.offset+=S(s,i.extra),O(s,i.extra),i.back+=i.extra}i.mode=24;case 24:if(0==s.left)break t;if(b=l-s.left,i.offset>b){if(b=i.offset-b,b>i.whave&&i.sane){t.msg="invalid distance too far back",i.mode=B;break}_=(u=b>i.wnext?(b-=i.wnext,i.wsize-b):i.wnext-b,-1),b>i.length&&(b=i.length)}else u=-1,_=t.next_out-i.offset,b=i.length;if(b>s.left&&(b=s.left),s.left-=b,i.length-=b,0<=u)t.output_data+=i.window.substring(u,u+b),t.next_out+=b,b=0;else for(t.next_out+=b;t.output_data+=t.output_data.charAt(_++),--b;);0==i.length&&(i.mode=20);break;case 25:if(0==s.left)break t;t.output_data+=String.fromCharCode(i.length),t.next_out++,s.left--,i.mode=20;break;case 26:if(i.wrap){if(!A(s,32))break t;if(l-=s.left,t.total_out+=l,i.total+=l,l&&(t.adler=i.check=t.checksum_function(i.check,t.output_data,t.output_data.length-l,l)),l=s.left,(i.flags?s.hold:j(s.hold))!=i.check){t.msg="incorrect data check",i.mode=B;break}L(s)}i.mode=27;case 27:if(i.wrap&&i.flags){if(!A(s,32))break t;if(s.hold!=(4294967295&i.total)){t.msg="incorrect length check",i.mode=B;break}L(s)}i.mode=28;case 28:n=ZLIB.Z_STREAM_END;break t;case B:n=ZLIB.Z_DATA_ERROR;break t;case 30:return ZLIB.Z_MEM_ERROR;case 31:default:return ZLIB.Z_STREAM_ERROR}return I(s),(i.wsize||l!=t.avail_out&&i.mode=c.wsize?c.window=h.output_data.substring(f-c.wsize):c.whave+fw?(f.op=k[g+I[i]],f.val=_[m+I[i]]):f.op=96,d=1<>>e)+(r-=d)]=f,0!=r;);for(d=1<>>=1;if(0!=d?(n&=d-1,n+=d):n=0,i++,0==--A[O]){if(O==o)break;O=L[R+I[i]]}if(l>>4),a<48&&(a&=15)),1==i&&"function"==typeof ZLIB.adler32?t.checksum_function=ZLIB.adler32:2==i&&"function"==typeof ZLIB.crc32?t.checksum_function=ZLIB.crc32:t.checksum_function=o,a&&(a<8||15>>8&255],0,2)}function Z(t,a){return a.strm=t,a.left=t.avail_out,a.next=t.next_in,a.have=t.avail_in,a.hold=t.state.hold,a.bits=t.state.bits,a}function I(t){var a=t.strm;a.next_in=t.next,a.avail_out=t.left,a.avail_in=t.have,a.state.hold=t.hold,a.state.bits=t.bits}function L(t){t.hold=0,t.bits=0}function E(t){return 0!=t.have&&(t.have--,t.hold+=(255&t.strm.input_data.charCodeAt(t.next++))<>>=a,t.bits-=a}function H(t){t.hold>>>=7&t.bits,t.bits-=7&t.bits}function j(t){return(t>>>24&255)+(t>>>8&65280)+((65280&t)<<8)+((255&t)<<24)}var U=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15];ZLIB.inflate=function(t,a){var i,s,o,l,b,e,v,p,n,d,r,h,c,f,u=-1,_=-1;if(!t||!t.state||!t.input_data&&0!=t.avail_in)return ZLIB.Z_STREAM_ERROR;(i=t.state).mode==R&&(i.mode=12),Z(t,s={}),o=s.have,l=s.left,n=ZLIB.Z_OK;t:for(;;)switch(i.mode){case 0:if(0==i.wrap){i.mode=12;break}if(!A(s,16))break t;if(2&i.wrap&&35615==s.hold){i.check=t.checksum_function(0,null,0,0),x(t,s.hold),L(s),i.mode=1;break}if(i.flags=0,null!==i.head&&(i.head.done=-1),!(1&i.wrap)||((S(s,8)<<8)+(s.hold>>>8))%31){t.msg="incorrect header check",i.mode=B;break}if(S(s,4)!=ZLIB.Z_DEFLATED){t.msg="unknown compression method",i.mode=B;break}if(O(s,4),p=S(s,4)+8,0==i.wbits)i.wbits=p;else if(p>i.wbits){t.msg="invalid window size",i.mode=B;break}i.dmax=1<>>8&1),512&i.flags&&x(t,s.hold),L(s),i.mode=2;case 2:if(!A(s,32))break t;null!==i.head&&(i.head.time=s.hold),512&i.flags&&(d=t,r=s.hold,d.state.check=d.checksum_function(d.state.check,[255&r,r>>>8&255,r>>>16&255,r>>>24&255],0,4)),L(s),i.mode=3;case 3:if(!A(s,16))break t;null!==i.head&&(i.head.xflags=255&s.hold,i.head.os=s.hold>>>8),512&i.flags&&x(t,s.hold),L(s),i.mode=4;case 4:if(1024&i.flags){if(!A(s,16))break t;i.length=s.hold,null!==i.head&&(i.head.extra_len=s.hold),512&i.flags&&x(t,s.hold),L(s),i.head.extra=""}else null!==i.head&&(i.head.extra=null);i.mode=5;case 5:if(1024&i.flags&&((b=(b=i.length)>s.have?s.have:b)&&(null!==i.head&&null!==i.head.extra&&(p=i.head.extra_len-i.length,i.head.extra+=t.input_data.substring(s.next,s.next+(p+b>i.head.extra_max?i.head.extra_max-p:b))),512&i.flags&&(i.check=t.checksum_function(i.check,t.input_data,s.next,b)),s.have-=b,s.next+=b,i.length-=b),i.length))break t;i.length=0,i.mode=6;case 6:if(2048&i.flags){if(0==s.have)break t;for(null!==i.head&&null===i.head.name&&(i.head.name=""),b=0;p=t.input_data.charAt(s.next+b),b++,"\0"!==p&&(null!==i.head&&i.length>>9&1,i.head.done=1),t.adler=i.check=t.checksum_function(0,null,0,0),i.mode=R;break;case 9:if(!A(s,32))break t;t.adler=i.check=j(s.hold),L(s),i.mode=10;case 10:if(0==i.havedict)return I(s),ZLIB.Z_NEED_DICT;t.adler=i.check=t.checksum_function(0,null,0,0),i.mode=R;case R:if(a==ZLIB.Z_BLOCK||a==ZLIB.Z_TREES)break t;case 12:if(i.last){H(s),i.mode=26;break}if(!A(s,3))break t;switch(i.last=S(s,1),O(s,1),S(s,2)){case 0:i.mode=13;break;case 1:if(!function(t){var a;for(g=g||[{op:96,bits:7,val:0},{op:0,bits:8,val:80},{op:0,bits:8,val:16},{op:20,bits:8,val:115},{op:18,bits:7,val:31},{op:0,bits:8,val:112},{op:0,bits:8,val:48},{op:0,bits:9,val:192},{op:16,bits:7,val:10},{op:0,bits:8,val:96},{op:0,bits:8,val:32},{op:0,bits:9,val:160},{op:0,bits:8,val:0},{op:0,bits:8,val:128},{op:0,bits:8,val:64},{op:0,bits:9,val:224},{op:16,bits:7,val:6},{op:0,bits:8,val:88},{op:0,bits:8,val:24},{op:0,bits:9,val:144},{op:19,bits:7,val:59},{op:0,bits:8,val:120},{op:0,bits:8,val:56},{op:0,bits:9,val:208},{op:17,bits:7,val:17},{op:0,bits:8,val:104},{op:0,bits:8,val:40},{op:0,bits:9,val:176},{op:0,bits:8,val:8},{op:0,bits:8,val:136},{op:0,bits:8,val:72},{op:0,bits:9,val:240},{op:16,bits:7,val:4},{op:0,bits:8,val:84},{op:0,bits:8,val:20},{op:21,bits:8,val:227},{op:19,bits:7,val:43},{op:0,bits:8,val:116},{op:0,bits:8,val:52},{op:0,bits:9,val:200},{op:17,bits:7,val:13},{op:0,bits:8,val:100},{op:0,bits:8,val:36},{op:0,bits:9,val:168},{op:0,bits:8,val:4},{op:0,bits:8,val:132},{op:0,bits:8,val:68},{op:0,bits:9,val:232},{op:16,bits:7,val:8},{op:0,bits:8,val:92},{op:0,bits:8,val:28},{op:0,bits:9,val:152},{op:20,bits:7,val:83},{op:0,bits:8,val:124},{op:0,bits:8,val:60},{op:0,bits:9,val:216},{op:18,bits:7,val:23},{op:0,bits:8,val:108},{op:0,bits:8,val:44},{op:0,bits:9,val:184},{op:0,bits:8,val:12},{op:0,bits:8,val:140},{op:0,bits:8,val:76},{op:0,bits:9,val:248},{op:16,bits:7,val:3},{op:0,bits:8,val:82},{op:0,bits:8,val:18},{op:21,bits:8,val:163},{op:19,bits:7,val:35},{op:0,bits:8,val:114},{op:0,bits:8,val:50},{op:0,bits:9,val:196},{op:17,bits:7,val:11},{op:0,bits:8,val:98},{op:0,bits:8,val:34},{op:0,bits:9,val:164},{op:0,bits:8,val:2},{op:0,bits:8,val:130},{op:0,bits:8,val:66},{op:0,bits:9,val:228},{op:16,bits:7,val:7},{op:0,bits:8,val:90},{op:0,bits:8,val:26},{op:0,bits:9,val:148},{op:20,bits:7,val:67},{op:0,bits:8,val:122},{op:0,bits:8,val:58},{op:0,bits:9,val:212},{op:18,bits:7,val:19},{op:0,bits:8,val:106},{op:0,bits:8,val:42},{op:0,bits:9,val:180},{op:0,bits:8,val:10},{op:0,bits:8,val:138},{op:0,bits:8,val:74},{op:0,bits:9,val:244},{op:16,bits:7,val:5},{op:0,bits:8,val:86},{op:0,bits:8,val:22},{op:64,bits:8,val:0},{op:19,bits:7,val:51},{op:0,bits:8,val:118},{op:0,bits:8,val:54},{op:0,bits:9,val:204},{op:17,bits:7,val:15},{op:0,bits:8,val:102},{op:0,bits:8,val:38},{op:0,bits:9,val:172},{op:0,bits:8,val:6},{op:0,bits:8,val:134},{op:0,bits:8,val:70},{op:0,bits:9,val:236},{op:16,bits:7,val:9},{op:0,bits:8,val:94},{op:0,bits:8,val:30},{op:0,bits:9,val:156},{op:20,bits:7,val:99},{op:0,bits:8,val:126},{op:0,bits:8,val:62},{op:0,bits:9,val:220},{op:18,bits:7,val:27},{op:0,bits:8,val:110},{op:0,bits:8,val:46},{op:0,bits:9,val:188},{op:0,bits:8,val:14},{op:0,bits:8,val:142},{op:0,bits:8,val:78},{op:0,bits:9,val:252},{op:96,bits:7,val:0},{op:0,bits:8,val:81},{op:0,bits:8,val:17},{op:21,bits:8,val:131},{op:18,bits:7,val:31},{op:0,bits:8,val:113},{op:0,bits:8,val:49},{op:0,bits:9,val:194},{op:16,bits:7,val:10},{op:0,bits:8,val:97},{op:0,bits:8,val:33},{op:0,bits:9,val:162},{op:0,bits:8,val:1},{op:0,bits:8,val:129},{op:0,bits:8,val:65},{op:0,bits:9,val:226},{op:16,bits:7,val:6},{op:0,bits:8,val:89},{op:0,bits:8,val:25},{op:0,bits:9,val:146},{op:19,bits:7,val:59},{op:0,bits:8,val:121},{op:0,bits:8,val:57},{op:0,bits:9,val:210},{op:17,bits:7,val:17},{op:0,bits:8,val:105},{op:0,bits:8,val:41},{op:0,bits:9,val:178},{op:0,bits:8,val:9},{op:0,bits:8,val:137},{op:0,bits:8,val:73},{op:0,bits:9,val:242},{op:16,bits:7,val:4},{op:0,bits:8,val:85},{op:0,bits:8,val:21},{op:16,bits:8,val:258},{op:19,bits:7,val:43},{op:0,bits:8,val:117},{op:0,bits:8,val:53},{op:0,bits:9,val:202},{op:17,bits:7,val:13},{op:0,bits:8,val:101},{op:0,bits:8,val:37},{op:0,bits:9,val:170},{op:0,bits:8,val:5},{op:0,bits:8,val:133},{op:0,bits:8,val:69},{op:0,bits:9,val:234},{op:16,bits:7,val:8},{op:0,bits:8,val:93},{op:0,bits:8,val:29},{op:0,bits:9,val:154},{op:20,bits:7,val:83},{op:0,bits:8,val:125},{op:0,bits:8,val:61},{op:0,bits:9,val:218},{op:18,bits:7,val:23},{op:0,bits:8,val:109},{op:0,bits:8,val:45},{op:0,bits:9,val:186},{op:0,bits:8,val:13},{op:0,bits:8,val:141},{op:0,bits:8,val:77},{op:0,bits:9,val:250},{op:16,bits:7,val:3},{op:0,bits:8,val:83},{op:0,bits:8,val:19},{op:21,bits:8,val:195},{op:19,bits:7,val:35},{op:0,bits:8,val:115},{op:0,bits:8,val:51},{op:0,bits:9,val:198},{op:17,bits:7,val:11},{op:0,bits:8,val:99},{op:0,bits:8,val:35},{op:0,bits:9,val:166},{op:0,bits:8,val:3},{op:0,bits:8,val:131},{op:0,bits:8,val:67},{op:0,bits:9,val:230},{op:16,bits:7,val:7},{op:0,bits:8,val:91},{op:0,bits:8,val:27},{op:0,bits:9,val:150},{op:20,bits:7,val:67},{op:0,bits:8,val:123},{op:0,bits:8,val:59},{op:0,bits:9,val:214},{op:18,bits:7,val:19},{op:0,bits:8,val:107},{op:0,bits:8,val:43},{op:0,bits:9,val:182},{op:0,bits:8,val:11},{op:0,bits:8,val:139},{op:0,bits:8,val:75},{op:0,bits:9,val:246},{op:16,bits:7,val:5},{op:0,bits:8,val:87},{op:0,bits:8,val:23},{op:64,bits:8,val:0},{op:19,bits:7,val:51},{op:0,bits:8,val:119},{op:0,bits:8,val:55},{op:0,bits:9,val:206},{op:17,bits:7,val:15},{op:0,bits:8,val:103},{op:0,bits:8,val:39},{op:0,bits:9,val:174},{op:0,bits:8,val:7},{op:0,bits:8,val:135},{op:0,bits:8,val:71},{op:0,bits:9,val:238},{op:16,bits:7,val:9},{op:0,bits:8,val:95},{op:0,bits:8,val:31},{op:0,bits:9,val:158},{op:20,bits:7,val:99},{op:0,bits:8,val:127},{op:0,bits:8,val:63},{op:0,bits:9,val:222},{op:18,bits:7,val:27},{op:0,bits:8,val:111},{op:0,bits:8,val:47},{op:0,bits:9,val:190},{op:0,bits:8,val:15},{op:0,bits:8,val:143},{op:0,bits:8,val:79},{op:0,bits:9,val:254},{op:96,bits:7,val:0},{op:0,bits:8,val:80},{op:0,bits:8,val:16},{op:20,bits:8,val:115},{op:18,bits:7,val:31},{op:0,bits:8,val:112},{op:0,bits:8,val:48},{op:0,bits:9,val:193},{op:16,bits:7,val:10},{op:0,bits:8,val:96},{op:0,bits:8,val:32},{op:0,bits:9,val:161},{op:0,bits:8,val:0},{op:0,bits:8,val:128},{op:0,bits:8,val:64},{op:0,bits:9,val:225},{op:16,bits:7,val:6},{op:0,bits:8,val:88},{op:0,bits:8,val:24},{op:0,bits:9,val:145},{op:19,bits:7,val:59},{op:0,bits:8,val:120},{op:0,bits:8,val:56},{op:0,bits:9,val:209},{op:17,bits:7,val:17},{op:0,bits:8,val:104},{op:0,bits:8,val:40},{op:0,bits:9,val:177},{op:0,bits:8,val:8},{op:0,bits:8,val:136},{op:0,bits:8,val:72},{op:0,bits:9,val:241},{op:16,bits:7,val:4},{op:0,bits:8,val:84},{op:0,bits:8,val:20},{op:21,bits:8,val:227},{op:19,bits:7,val:43},{op:0,bits:8,val:116},{op:0,bits:8,val:52},{op:0,bits:9,val:201},{op:17,bits:7,val:13},{op:0,bits:8,val:100},{op:0,bits:8,val:36},{op:0,bits:9,val:169},{op:0,bits:8,val:4},{op:0,bits:8,val:132},{op:0,bits:8,val:68},{op:0,bits:9,val:233},{op:16,bits:7,val:8},{op:0,bits:8,val:92},{op:0,bits:8,val:28},{op:0,bits:9,val:153},{op:20,bits:7,val:83},{op:0,bits:8,val:124},{op:0,bits:8,val:60},{op:0,bits:9,val:217},{op:18,bits:7,val:23},{op:0,bits:8,val:108},{op:0,bits:8,val:44},{op:0,bits:9,val:185},{op:0,bits:8,val:12},{op:0,bits:8,val:140},{op:0,bits:8,val:76},{op:0,bits:9,val:249},{op:16,bits:7,val:3},{op:0,bits:8,val:82},{op:0,bits:8,val:18},{op:21,bits:8,val:163},{op:19,bits:7,val:35},{op:0,bits:8,val:114},{op:0,bits:8,val:50},{op:0,bits:9,val:197},{op:17,bits:7,val:11},{op:0,bits:8,val:98},{op:0,bits:8,val:34},{op:0,bits:9,val:165},{op:0,bits:8,val:2},{op:0,bits:8,val:130},{op:0,bits:8,val:66},{op:0,bits:9,val:229},{op:16,bits:7,val:7},{op:0,bits:8,val:90},{op:0,bits:8,val:26},{op:0,bits:9,val:149},{op:20,bits:7,val:67},{op:0,bits:8,val:122},{op:0,bits:8,val:58},{op:0,bits:9,val:213},{op:18,bits:7,val:19},{op:0,bits:8,val:106},{op:0,bits:8,val:42},{op:0,bits:9,val:181},{op:0,bits:8,val:10},{op:0,bits:8,val:138},{op:0,bits:8,val:74},{op:0,bits:9,val:245},{op:16,bits:7,val:5},{op:0,bits:8,val:86},{op:0,bits:8,val:22},{op:64,bits:8,val:0},{op:19,bits:7,val:51},{op:0,bits:8,val:118},{op:0,bits:8,val:54},{op:0,bits:9,val:205},{op:17,bits:7,val:15},{op:0,bits:8,val:102},{op:0,bits:8,val:38},{op:0,bits:9,val:173},{op:0,bits:8,val:6},{op:0,bits:8,val:134},{op:0,bits:8,val:70},{op:0,bits:9,val:237},{op:16,bits:7,val:9},{op:0,bits:8,val:94},{op:0,bits:8,val:30},{op:0,bits:9,val:157},{op:20,bits:7,val:99},{op:0,bits:8,val:126},{op:0,bits:8,val:62},{op:0,bits:9,val:221},{op:18,bits:7,val:27},{op:0,bits:8,val:110},{op:0,bits:8,val:46},{op:0,bits:9,val:189},{op:0,bits:8,val:14},{op:0,bits:8,val:142},{op:0,bits:8,val:78},{op:0,bits:9,val:253},{op:96,bits:7,val:0},{op:0,bits:8,val:81},{op:0,bits:8,val:17},{op:21,bits:8,val:131},{op:18,bits:7,val:31},{op:0,bits:8,val:113},{op:0,bits:8,val:49},{op:0,bits:9,val:195},{op:16,bits:7,val:10},{op:0,bits:8,val:97},{op:0,bits:8,val:33},{op:0,bits:9,val:163},{op:0,bits:8,val:1},{op:0,bits:8,val:129},{op:0,bits:8,val:65},{op:0,bits:9,val:227},{op:16,bits:7,val:6},{op:0,bits:8,val:89},{op:0,bits:8,val:25},{op:0,bits:9,val:147},{op:19,bits:7,val:59},{op:0,bits:8,val:121},{op:0,bits:8,val:57},{op:0,bits:9,val:211},{op:17,bits:7,val:17},{op:0,bits:8,val:105},{op:0,bits:8,val:41},{op:0,bits:9,val:179},{op:0,bits:8,val:9},{op:0,bits:8,val:137},{op:0,bits:8,val:73},{op:0,bits:9,val:243},{op:16,bits:7,val:4},{op:0,bits:8,val:85},{op:0,bits:8,val:21},{op:16,bits:8,val:258},{op:19,bits:7,val:43},{op:0,bits:8,val:117},{op:0,bits:8,val:53},{op:0,bits:9,val:203},{op:17,bits:7,val:13},{op:0,bits:8,val:101},{op:0,bits:8,val:37},{op:0,bits:9,val:171},{op:0,bits:8,val:5},{op:0,bits:8,val:133},{op:0,bits:8,val:69},{op:0,bits:9,val:235},{op:16,bits:7,val:8},{op:0,bits:8,val:93},{op:0,bits:8,val:29},{op:0,bits:9,val:155},{op:20,bits:7,val:83},{op:0,bits:8,val:125},{op:0,bits:8,val:61},{op:0,bits:9,val:219},{op:18,bits:7,val:23},{op:0,bits:8,val:109},{op:0,bits:8,val:45},{op:0,bits:9,val:187},{op:0,bits:8,val:13},{op:0,bits:8,val:141},{op:0,bits:8,val:77},{op:0,bits:9,val:251},{op:16,bits:7,val:3},{op:0,bits:8,val:83},{op:0,bits:8,val:19},{op:21,bits:8,val:195},{op:19,bits:7,val:35},{op:0,bits:8,val:115},{op:0,bits:8,val:51},{op:0,bits:9,val:199},{op:17,bits:7,val:11},{op:0,bits:8,val:99},{op:0,bits:8,val:35},{op:0,bits:9,val:167},{op:0,bits:8,val:3},{op:0,bits:8,val:131},{op:0,bits:8,val:67},{op:0,bits:9,val:231},{op:16,bits:7,val:7},{op:0,bits:8,val:91},{op:0,bits:8,val:27},{op:0,bits:9,val:151},{op:20,bits:7,val:67},{op:0,bits:8,val:123},{op:0,bits:8,val:59},{op:0,bits:9,val:215},{op:18,bits:7,val:19},{op:0,bits:8,val:107},{op:0,bits:8,val:43},{op:0,bits:9,val:183},{op:0,bits:8,val:11},{op:0,bits:8,val:139},{op:0,bits:8,val:75},{op:0,bits:9,val:247},{op:16,bits:7,val:5},{op:0,bits:8,val:87},{op:0,bits:8,val:23},{op:64,bits:8,val:0},{op:19,bits:7,val:51},{op:0,bits:8,val:119},{op:0,bits:8,val:55},{op:0,bits:9,val:207},{op:17,bits:7,val:15},{op:0,bits:8,val:103},{op:0,bits:8,val:39},{op:0,bits:9,val:175},{op:0,bits:8,val:7},{op:0,bits:8,val:135},{op:0,bits:8,val:71},{op:0,bits:9,val:239},{op:16,bits:7,val:9},{op:0,bits:8,val:95},{op:0,bits:8,val:31},{op:0,bits:9,val:159},{op:20,bits:7,val:99},{op:0,bits:8,val:127},{op:0,bits:8,val:63},{op:0,bits:9,val:223},{op:18,bits:7,val:27},{op:0,bits:8,val:111},{op:0,bits:8,val:47},{op:0,bits:9,val:191},{op:0,bits:8,val:15},{op:0,bits:8,val:143},{op:0,bits:8,val:79},{op:0,bits:9,val:255}],w=w||[{op:16,bits:5,val:1},{op:23,bits:5,val:257},{op:19,bits:5,val:17},{op:27,bits:5,val:4097},{op:17,bits:5,val:5},{op:25,bits:5,val:1025},{op:21,bits:5,val:65},{op:29,bits:5,val:16385},{op:16,bits:5,val:3},{op:24,bits:5,val:513},{op:20,bits:5,val:33},{op:28,bits:5,val:8193},{op:18,bits:5,val:9},{op:26,bits:5,val:2049},{op:22,bits:5,val:129},{op:64,bits:5,val:0},{op:16,bits:5,val:2},{op:23,bits:5,val:385},{op:19,bits:5,val:25},{op:27,bits:5,val:6145},{op:17,bits:5,val:7},{op:25,bits:5,val:1537},{op:21,bits:5,val:97},{op:29,bits:5,val:24577},{op:16,bits:5,val:4},{op:24,bits:5,val:769},{op:20,bits:5,val:49},{op:28,bits:5,val:12289},{op:18,bits:5,val:13},{op:26,bits:5,val:3073},{op:22,bits:5,val:193},{op:64,bits:5,val:0}],t.lencode=0,t.distcode=512,a=0;a<512;a++)t.codes[a]=g[a];for(a=0;a<32;a++)t.codes[a+512]=w[a];t.lenbits=9,t.distbits=5}(i),i.mode=19,a!=ZLIB.Z_TREES)break;O(s,2);break t;case 2:i.mode=16;break;case 3:t.msg="invalid block type",i.mode=B}O(s,2);break;case 13:if(H(s),!A(s,32))break t;if((65535&s.hold)!=(s.hold>>>16&65535^65535)){t.msg="invalid stored block lengths",i.mode=B;break}if(i.length=65535&s.hold,L(s),i.mode=14,a==ZLIB.Z_TREES)break t;case 14:i.mode=15;case 15:if(b=i.length){if(0==(b=(b=b>s.have?s.have:b)>s.left?s.left:b))break t;t.output_data+=t.input_data.substring(s.next,s.next+b),t.next_out+=b,s.have-=b,s.next+=b,s.left-=b,i.length-=b;break}i.mode=R;break;case 16:if(!A(s,14))break t;if(i.nlen=S(s,5)+257,O(s,5),i.ndist=S(s,5)+1,O(s,5),i.ncode=S(s,4)+4,O(s,4),286i.nlen+i.ndist){t.msg="invalid bit length repeat",i.mode=B;break}for(;b--;)i.lens[i.have++]=p}}if(i.mode==B)break;if(0==i.lens[256]){t.msg="invalid code -- missing end-of-block",i.mode=B;break}if(i.next=0,i.lencode=i.next,i.lenbits=9,n=k(i,y)){t.msg="invalid literal/lengths set",i.mode=B;break}if(i.distcode=i.next,i.distbits=6,n=k(i,M)){t.msg="invalid distances set",i.mode=B;break}if(i.mode=19,a==ZLIB.Z_TREES)break t;case 19:i.mode=20;case 20:if(6<=s.have&&258<=s.left){I(s),function(t,a){var i,s,o,l=-1,b=-1,e=t.state,v=t.input_data,p=t.next_in,n=p+t.avail_in-5,d=t.next_out,r=d-(a-t.avail_out),h=d+(t.avail_out-257),c=e.wsize,f=e.whave,u=e.wnext,_=e.window,m=e.hold,k=e.bits,g=e.codes,w=e.lencode,x=e.distcode,Z=(1<>>=s=i.bits,k-=s,0==(s=i.op))t.output_data+=String.fromCharCode(i.val),d++;else{if(!(16&s)){if(0==(64&s)){i=g[w+(i.val+(m&(1<>>=s,k-=s),k<15&&(m+=(255&v.charCodeAt(p++))<>>=s=i.bits,k-=s,!(16&(s=i.op))){if(0==(64&s)){i=g[x+(i.val+(m&(1<>>=s,k-=s,(s=d-r)>>3)<<3))-1,t.next_in=p-=o,t.next_out=d,t.avail_in=p>>v.bits)],!(v.bits+e.bits<=s.bits);)if(!E(s))break t;O(s,v.bits),i.back+=v.bits}if(O(s,e.bits),i.back+=e.bits,i.length=e.val,0==e.op){i.mode=25;break}if(32&e.op){i.back=-1,i.mode=R;break}if(64&e.op){t.msg="invalid literal/length code",i.mode=B;break}i.extra=15&e.op,i.mode=21;case 21:if(i.extra){if(!A(s,i.extra))break t;i.length+=S(s,i.extra),O(s,i.extra),i.back+=i.extra}i.was=i.length,i.mode=22;case 22:for(;!((e=i.codes[i.distcode+S(s,i.distbits)]).bits<=s.bits);)if(!E(s))break t;if(0==(240&e.op)){for(v=e;e=i.codes[i.distcode+v.val+(S(s,v.bits+v.op)>>>v.bits)],!(v.bits+e.bits<=s.bits);)if(!E(s))break t;O(s,v.bits),i.back+=v.bits}if(O(s,e.bits),i.back+=e.bits,64&e.op){t.msg="invalid distance code",i.mode=B;break}i.offset=e.val,i.extra=15&e.op,i.mode=23;case 23:if(i.extra){if(!A(s,i.extra))break t;i.offset+=S(s,i.extra),O(s,i.extra),i.back+=i.extra}i.mode=24;case 24:if(0==s.left)break t;if(b=l-s.left,i.offset>b){if((b=i.offset-b)>i.whave&&i.sane){t.msg="invalid distance too far back",i.mode=B;break}_=(u=b>i.wnext?(b-=i.wnext,i.wsize-b):i.wnext-b,-1),b>i.length&&(b=i.length)}else u=-1,_=t.next_out-i.offset,b=i.length;if(b>s.left&&(b=s.left),s.left-=b,i.length-=b,0<=u)t.output_data+=i.window.substring(u,u+b),t.next_out+=b,b=0;else for(t.next_out+=b;t.output_data+=t.output_data.charAt(_++),--b;);0==i.length&&(i.mode=20);break;case 25:if(0==s.left)break t;t.output_data+=String.fromCharCode(i.length),t.next_out++,s.left--,i.mode=20;break;case 26:if(i.wrap){if(!A(s,32))break t;if(l-=s.left,t.total_out+=l,i.total+=l,l&&(t.adler=i.check=t.checksum_function(i.check,t.output_data,t.output_data.length-l,l)),l=s.left,(i.flags?s.hold:j(s.hold))!=i.check){t.msg="incorrect data check",i.mode=B;break}L(s)}i.mode=27;case 27:if(i.wrap&&i.flags){if(!A(s,32))break t;if(s.hold!=(4294967295&i.total)){t.msg="incorrect length check",i.mode=B;break}L(s)}i.mode=28;case 28:n=ZLIB.Z_STREAM_END;break t;case B:n=ZLIB.Z_DATA_ERROR;break t;case 30:return ZLIB.Z_MEM_ERROR;case 31:default:return ZLIB.Z_STREAM_ERROR}return I(s),(i.wsize||l!=t.avail_out&&i.mode=c.wsize?c.window=h.output_data.substring(f-c.wsize):c.whave+f