function Login(){function r(){i()}function i(){e=!1}function s(){n=!0,t=0;var e=DEVICE_SIMULATOR||location.href.split("?").length>1;kilo?funcObj.UIMain.handleKilo(kilo):funcObj.appcomm.appSend({method:"getConstant",params:{name:"kilo"},id:null},funcObj.UIMain.handleKilo),!isAndroid&&!isQT&&!isIOS&&e?f(!1):(isA4V&&funcObj.devCon.addTestingDevice(),funcObj.margeComm.getCreds(),funcObj.margeComm.getCachedMargeURL(),funcObj.UIUpdate.getCachedUpdateURL())}function o(){t++,t>=4&&u()}function u(){aID=funcObj.margeComm.getAccountID(),token=funcObj.margeComm.getAuthToken(),funcObj.wrkr_tools.handleMargeToken(token),aID!=null&&aID.match(/\S/)&&token!=null&&token.match(/\S/)?l(aID,!1):(funcObj.margeComm.checkOverrideMargeURL()&&(funcObj.margeComm.setMargeURL("",!1,!0,!0),funcObj.UIUpdate.setUpdateURL("",!1,!0,!0)),funcObj.autoLogin.setup())}function a(){e||(e=!0,ble_capable==="true"?funcObj.appcomm.appSend({method:"htmlReady",params:{version:gui_version,keepawake:!1,ble:!1},id:null}):funcObj.appcomm.appSend({method:"htmlReady",params:{version:gui_version,keepawake:!1},id:null}),isQT&&(funcObj.appcomm.appSend({method:"getUsbDeviceList",params:null,id:null}),funcObj.appcomm.appSend({method:"getMediaServerUuid",params:null},function(e){RMS_UUID=e.rms_uuid.split("/")[0]})),funcObj.pageCon.getLegalDocs())}function f(e){funcObj.margeComm.setAccountID(accOverrideObj.boseServerID),funcObj.margeComm.setAuthToken(accOverrideObj.boseServerToken),guid="8053"+funcObj.margeComm.getAccountID(),funcObj.UIMain.handleKilo(accOverrideObj.kilo),funcObj.wrkr_tools.handleMargeToken(accOverrideObj.boseServerToken),l(accOverrideObj.boseServerID,e)}function l(e,t){funcObj.devCon.setAccountID(e),funcObj.discovery.setAccountID(e),funcObj.devCon.checkDeviceMsg(!0);var n=DEVICE_SIMULATOR||location.href.split("?").length>1;funcObj.appcomm.appSend({method:"setData",params:{name:"startupPage",value:"index.html"}}),funcObj.groupCon.groupFrameController.fetchFrameGroups(),accOverrideObj.bypassMode?(funcObj.tips.setTipsEnabled(!1),!isAndroid&&!isQT&&!isIOS&&n?funcObj.devCon.addTestingDevice():funcObj.discovery.updateLanStatus()):!isAndroid&&!isQT&&!isIOS?funcObj.discovery.requestDevices():funcObj.discovery.updateLanStatus(),funcObj.autoLogin.cleanUp(),funcObj.sources.requestMargeSources(function(e,t){funcObj.sources.handleSourcesFromMarge(e,t,{type:"new"},!0)}),funcObj.sources.getIsQPlayAvailable(),a(),setTimeout(function(){funcObj.tips.showOnBoarding()},1e3)}var e,t,n;this.init=i,this.setup=s,this.checkLoginInfo=o,this.sendHTMLReady=a,r()};