2023-02-25 07:08:05 +00:00
/*! NoSleep.min.js v0.12.0 - git.io/vfn01 - Rich Tibbett - MIT license */
//@ts-ignore
! function ( A , e ) { "object" == typeof exports && "object" == typeof module ? module . exports = e ( ) : "function" == typeof define && define . amd ? define ( [ ] , e ) : "object" == typeof exports ? exports . NoSleep = e ( ) : A . NoSleep = e ( ) ; } ( this , ( function ( ) { return function ( A ) { var e = { } ; function B ( g ) { if ( e [ g ] )
return e [ g ] . exports ; var o = e [ g ] = { i : g , l : ! 1 , exports : { } } ; return A [ g ] . call ( o . exports , o , o . exports , B ) , o . l = ! 0 , o . exports ; } return B . m = A , B . c = e , B . d = function ( A , e , g ) { B . o ( A , e ) || Object . defineProperty ( A , e , { enumerable : ! 0 , get : g } ) ; } , B . r = function ( A ) { "undefined" != typeof Symbol && Symbol . toStringTag && Object . defineProperty ( A , Symbol . toStringTag , { value : "Module" } ) , Object . defineProperty ( A , "__esModule" , { value : ! 0 } ) ; } , B . t = function ( A , e ) { if ( 1 & e && ( A = B ( A ) ) , 8 & e )
return A ; if ( 4 & e && "object" == typeof A && A && A . _ _esModule )
return A ; var g = Object . create ( null ) ; if ( B . r ( g ) , Object . defineProperty ( g , "default" , { enumerable : ! 0 , value : A } ) , 2 & e && "string" != typeof A )
for ( var o in A )
B . d ( g , o , function ( e ) { return A [ e ] ; } . bind ( null , o ) ) ; return g ; } , B . n = function ( A ) { var e = A && A . _ _esModule ? function ( ) { return A . default ; } : function ( ) { return A ; } ; return B . d ( e , "a" , e ) , e ; } , B . o = function ( A , e ) { return Object . prototype . hasOwnProperty . call ( A , e ) ; } , B . p = "" , B ( B . s = 0 ) ; } ( [ function ( A , e , B ) {
"use strict" ;
var g = function ( ) { function A ( A , e ) { for ( var B = 0 ; B < e . length ; B ++ ) {
var g = e [ B ] ;
g . enumerable = g . enumerable || ! 1 , g . configurable = ! 0 , "value" in g && ( g . writable = ! 0 ) , Object . defineProperty ( A , g . key , g ) ;
} } return function ( e , B , g ) { return B && A ( e . prototype , B ) , g && A ( e , g ) , e ; } ; } ( ) ;
var o = B ( 1 ) , E = o . webm , n = o . mp4 , C = function ( ) { return "undefined" != typeof navigator && parseFloat ( ( "" + ( /CPU.*OS ([0-9_]{3,4})[0-9_]{0,1}|(CPU like).*AppleWebKit.*Mobile/i . exec ( navigator . userAgent ) || [ 0 , "" ] ) [ 1 ] ) . replace ( "undefined" , "3_2" ) . replace ( "_" , "." ) . replace ( "_" , "" ) ) < 10 && ! window . MSStream ; } , Q = function ( ) { return "wakeLock" in navigator ; } , i = function ( ) { function A ( ) { var e = this ; if ( function ( A , e ) { if ( ! ( A instanceof e ) )
throw new TypeError ( "Cannot call a class as a function" ) ; } ( this , A ) , this . enabled = ! 1 , Q ( ) ) {
this . _wakeLock = null ;
var B = function ( ) { null !== e . _wakeLock && "visible" === document . visibilityState && e . enable ( ) ; } ;
document . addEventListener ( "visibilitychange" , B ) , document . addEventListener ( "fullscreenchange" , B ) ;
}
else
C ( ) ? this . noSleepTimer = null : ( this . noSleepVideo = document . createElement ( "video" ) , this . noSleepVideo . setAttribute ( "title" , "No Sleep" ) , this . noSleepVideo . setAttribute ( "playsinline" , "" ) , this . _addSourceToVideo ( this . noSleepVideo , "webm" , E ) , this . _addSourceToVideo ( this . noSleepVideo , "mp4" , n ) , this . noSleepVideo . addEventListener ( "loadedmetadata" , ( function ( ) { e . noSleepVideo . duration <= 1 ? e . noSleepVideo . setAttribute ( "loop" , "" ) : e . noSleepVideo . addEventListener ( "timeupdate" , ( function ( ) { e . noSleepVideo . currentTime > . 5 && ( e . noSleepVideo . currentTime = Math . random ( ) ) ; } ) ) ; } ) ) ) ; } return g ( A , [ { key : "_addSourceToVideo" , value : function ( A , e , B ) { var g = document . createElement ( "source" ) ; g . src = B , g . type = "video/" + e , A . appendChild ( g ) ; } } , { key : "enable" , value : function ( ) { var A = this ; return Q ( ) ? navigator . wakeLock . request ( "screen" ) . then ( ( function ( e ) { A . _wakeLock = e , A . enabled = ! 0 , console . log ( "Wake Lock active." ) , A . _wakeLock . addEventListener ( "release" , ( function ( ) { console . log ( "Wake Lock released." ) ; } ) ) ; } ) ) . catch ( ( function ( e ) { throw A . enabled = ! 1 , console . error ( e . name + ", " + e . message ) , e ; } ) ) : C ( ) ? ( this . disable ( ) , console . warn ( "\n NoSleep enabled for older iOS devices. This can interrupt\n active or long-running network requests from completing successfully.\n See https://github.com/richtr/NoSleep.js/issues/15 for more details.\n " ) , this . noSleepTimer = window . setInterval ( ( function ( ) { document . hidden || ( window . location . href = window . location . href . split ( "#" ) [ 0 ] , window . setTimeout ( window . stop , 0 ) ) ; } ) , 15e3 ) , this . enabled = ! 0 , Promise . resolve ( ) ) : this . noSleepVideo . play ( ) . then ( ( function ( e ) { return A . enabled = ! 0 , e ; } ) ) . catch ( ( function ( e ) { throw A . enabled = ! 1 , e ; } ) ) ; } } , { key : "disable" , value : function ( ) { Q ( ) ? ( this . _wakeLock && this . _wakeLock . release ( ) , this . _wakeLock = null ) : C ( ) ? this . noSleepTimer && ( console . warn ( "\n NoSleep now disabled for older iOS devices.\n " ) , window . clearInterval ( this . noSleepTimer ) , this . noSleepTimer = null ) : this . noSleepVideo . pause ( ) , this . enabled = ! 1 ; } } , { key : "isEnabled" , get : function ( ) { return this . enabled ; } } ] ) , A ; } ( ) ;
A . exports = i ;
} , function ( A , e , B ) {
"use strict" ;
A . exports = { webm : " data : video / webm ; base64 , GkXfowEAAAAAAAAfQoaBAUL3gQFC8oEEQvOBCEKChHdlYm1Ch4EEQoWBAhhTgGcBAAAAAAAVkhFNm3RALE27i1OrhBVJqWZTrIHfTbuMU6uEFlSua1OsggEwTbuMU6uEHFO7a1OsghV17AEAAAAAAACkAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA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ABAAACAGEoOogmtOd + c46BZDppKsTkdnEi1eZKbirk555xzzsnmnDHOOeecopxZDJoJrTnnnMSgWQqaCa0555wnsXnQmiqtOeeccc7pYJwRxjnnnCateZCajbU555wFrWmOmkuxOeecSLl5UptLtTnnnHPOOeecc84555zqxekcnBPOOeecqL25lpvQxTnnnE / G6d6cEM4555xzzjnnnHPOOeecIDRkFQAABABAEIaNYdwpCNLnaCBGEWIaMulB9 + gwCRqDnELq0ehopJQ6CCWVcVJKJwgNWQUAAAIAQAghhRRSSCGFFFJIIYUUYoghhhhyyimnoIJKKqmooowyyyyzzDLLLLPMOuyssw47DDHEEEMrrcRSU2011lhr7jnnmoO0VlprrbVSSimllFIKQkNWAQAgAAAEQgYZZJBRSCGFFGKIKaeccgoqqIDQkFUAACAAgAAAAABP8hzRER3RER3RER3RER3R8RzPESVREiVREi3TMjXTU0VVdWXXlnVZt31b2IVd933d933d + HVhWJZlWZZlWZZlWZZlWZZlWZYgNGQVAAACAAAghBBCSCGFFFJIKcYYc8w56CSUEAgNWQUAAAIACAAAAHAUR3EcyZEcSbIkS9IkzdIsT / M0TxM9URRF0zRV0RVdUTdtUTZl0zVdUzZdVVZtV5ZtW7Z125dl2 / d93 / d93 / d93 / d93 / d9XQdCQ1YBABIAADqSIymSIimS4ziOJElAaMgqAEAGAEAAAIriKI7jOJIkSZIlaZJneZaomZrpmZ4qqkBoyCoAABAAQAAAAAAAAIqmeIqpeIqoeI7oiJJomZaoqZoryqbsuq7ruq7ruq7ruq7ruq7ruq7ruq7ruq7ruq7ruq7ruq7ruq4LhIasAgAkAAB0JEdyJEdSJEVSJEdygNCQVQCADACAAAAcwzEkRXIsy9I0T / M0TxM90RM901NFV3SB0JBVAAAgAIAAAAAAAAAMybAUy9EcTRIl1VItVVMt1VJF1VNVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVN0zRNEwgNWQkAkAEAkBBTLS3GmgmLJGLSaqugYwxS7KWxSCpntbfKMYUYtV4ah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AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAEAAAEOAAABBgIRQasiIAiBMAcEgSJAmSBM0DSJYFTYOmwTQBkmVB06BpME0AAAAAAAAAAAAAJE2DpkHTIIoASdOgadA0iCIAAAAAAAAAAAAAkqZB06BpEEWApGnQNGgaRBEAAAAAAAAAAAAAzzQhihBFmCbAM02IIkQRpgkAAAAAAAAAAAAAAAAAAAAAAAAAAAAACAAAGHAAAAgwoQwUGrIiAIgTAHA4imUBAIDjOJYFAACO41gWAABYliWKAABgWZooAgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
} ] ) ; } ) ) ;
2023-02-25 05:24:07 +00:00
const webSocket = new WebSocket ( 'ws://localhost:{{PORT}}/' ) ;
webSocket . onmessage = ( event ) => {
const data = JSON . parse ( event . data ) ;
console . log ( data ) ;
} ;
2023-02-25 07:08:05 +00:00
function preventSleep ( ) {
//@ts-ignore
var noSleep = new NoSleep ( ) ;
document . addEventListener ( 'click' , function enableNoSleep ( ) {
document . removeEventListener ( 'click' , enableNoSleep , false ) ;
document . getElementById ( 'nosleep' ) . remove ( ) ;
noSleep . enable ( ) ;
} , false ) ;
}
( function main ( ) {
preventSleep ( ) ;
} ) ( ) ;
2023-02-25 05:24:07 +00:00
//# sourceMappingURL=index.js.map