PageSourceSearch

https://neenus.com/webman/sds/dist/dsm.sds.bundle.js?v=1780907689

js neenus.com collected 2026-09-25 22:42:43 UTC 42,597 bytes, 1 lines download raw bytes

1!function(){var e={692:function(){SYNO.SDS.AppUtil={systemApps:["SYNO.SDS.PkgManApp.Instance","SYNO.SDS.AdminCenter.Application","SYNO.SDS.App.FileStation3.Instance","SYNO.SDS.StorageManager.Instance","SYNO.SDS.Backup.Application","SYNO.SDS.ResourceMonitor.Instance","SYNO.SDS.SecurityScan.Instance","SYNO.SDS.LogCenter.BuiltIn","SYNO.SDS.HelpBrowser.Application","SYNO.SDS.SupportForm.Application"],sofsApps:["SYNO.SDS.ClusterManager.Instance","SYNO.SDS.AdminCenter.Application","SYNO.SDS.App.FileStation3.Instance","SYNO.SDS.Backup.Application","SYNO.SDS.Virtualization.Application","SYNO.SDS.ActiveInsight.Application","SYNO.Finder.Application","SYNO.SDS.LogCenter.BuiltIn","SYNO.SDS.HelpBrowser.Application","SYNO.SDS.SupportForm.Application"],getDefaultSystemApps(){return"yes"===_D("support_hyper_converged")?this.sofsApps:this.systemApps},shouldShowStatusIcon:function(e){return"doing"===e||"error"===e},clearNewApp:function(){SYNO.SDS.UserSettings.setProperty("Desktop","new_app_list",[])},isNewApp:function(e){var t=SYNO.SDS.UserSettings.getProperty("Desktop","new_app_list")||[];return!(!SYNO.SDS.isArray(t)||-1===t.indexOf(e))},isApp:function(e){var t=SYNO.SDS.Config.FnMap[e];return!(!t||"app"!==t.config.type&&"standalone"!==t.config.type&&"url"!==t.config.type&&"legacy"!==t.config.type||!0===t.config.hidden)},isValidApp:function(e){return!(!SYNO.SDS.AppUtil.isApp(e)||!SYNO.SDS.StatusNotifier.isAppValid(e))},getApps:function(){const e=SYNO.SDS.UserSettings.getProperty("Desktop","appview_order")||SYNO.SDS.UserSettings.getProperty("Desktop","valid_appview_order")||[],t=[],n=this.getAppsByDefaultOrder();for(const n of e)this.isValidApp(n)&&t.push(n);for(const e of n)0>t.indexOf(e)&&t.push(e);return SYNO.SDS.UserSettings.setProperty("Desktop","valid_appview_order",t),t},getAppsByDefaultOrder:function(){let e=[],t=[];const n=this.getDefaultSystemApps();for(const a of Object.keys(SYNO.SDS.Config.FnMap))if(SYNO.SDS.Config.FnMap.hasOwnProperty(a)){if(!this.isValidApp(a))continue;const s=n.indexOf(a);s>=0?e[s]=a:t.push(a)}return e=e.filter((e=>e)),e.concat(t)}}},220:function(){SYNO.ns("SYNO.SDS.DesktopStyleParser"),SYNO.SDS.DesktopStyleParser=class{constructor(){this.isRetina=SYNO.SDS.UIFeatures.IconSizeManager.isRetinaMode()}getWallpaperCfg(e){var t=this.getDefaultWallpaperCfg(),n=SYNO.SDS.copy(SYNO.SDS.UserSettings.getProperty("Desktop","wallpaper"))||{};if(Object.assign(n,e),SYNO.SDS.isEmpty(n))return t;this.isBottomWallpaper=n.isBottomWallpaper;let a={};if(n.version&&2===n.version){if(a={type:n.wallpaper_position||t.type,imgSrc:SYNO.SDS.GetBlankImageUrl(),bgColor:"transparent"},n.customize_background&&(a.bgColor=n.background_color?n.background_color:"#FFFFFF",a.imgSrc=SYNO.SDS.GetBlankImageUrl(),"image"===n.customize_background_type)){let e=n.wallpaper_hd_path?n.wallpaper_hd_path:n.wallpaper_path;a.imgSrc=this.getWallpaperURL(e,n.wallpaper,n.useRetina)}}else{let e=n.wallpaper_hd_path?n.wallpaper_hd_path:n.wallpaper_path;a={type:n.wallpaper_position||t.type,imgSrc:n.customize_wallpaper?this.getWallpaperURL(e,n.wallpaper,n.useRetina):SYNO.SDS.GetBlankImageUrl(),bgColor:n.customize_color?n.background_color:n.customize_wallpaper?t.bgColor:"transparent"}}return n.wallpaper_width&&n.wallpaper_height&&(a.imgW=n.wallpaper_width,a.imgH=n.wallpaper_height),a.isBottomWallpaper=!!n.isBottomWallpaper&&n.isBottomWallpaper,a}getWallpaperURL(e,t,n){var a;return a=!0===(n=n||!1)||!!this.isBottomWallpaper&&this.isBottomWallpaper,SYNO.SDS.urlAppend("webapi/entry.cgi",SYNO.SDS.urlEncode({api:"SYNO.Core.PersonalSettings",method:"wallpaper",version:1,path:JSON.stringify(SYNO.SDS.Utils.bin2hex(e)),retina:a,id:t}))}getDefaultWallpaperCfg(){return{type:"fill",imgSrc:this.getDefaultWallpaperPath(),bgColor:"#FFFFFF"}}getDefaultWallpaperPath(){return SYNO.SDS.formatString("webman/resources/images/2x/default_wallpaper/dsm7_01.jpg?v={0}",_S("version"))}}},81:function(){SYNO.namespace("SYNO.SDS"),window._S=function(e){return SYNO.SDS.Session[e]},window._TT=function(e,t,n){try{if(SYNO.SDS.Strings&&SYNO.SDS.Strings[e]&&SYNO.SDS.Strings[e][t]&&SYNO.SDS.Strings[e][t][n])return SYNO.SDS.Strings[e][t][n]||"";if(SYNO.SDS.Packages)return e=SYNO.SDS.Packages.getJsId(e),SYNO.SDS.Strings[e][t][n]||""}catch(e){return""}},SYNO.ns("SYNO.SDS.Timeout"),SYNO.SDS.Timeout.Task=new class{constructor(){this.isHalt=!1,this.interval=6e4}setHalt(e){this.isHalt=e,this.isHalt||this.run()}run(){_S("isLogined")&&!this.isHalt&&SYNO.API.RequestPromise({api:"SYNO.Core.Desktop.Timeout",version:1,method:"check"}).then((()=>{window.setTimeout((()=>{this.run()}),this.interval)}))}},SYNO.SDS.iFrameAppToFront=function(e){var t=SYNO.SDS.AppMgr.getByAppName(e);t.length&&Ext.each(t,(function(e){if(e.window)return e.window.toFront(),!1}))},SYNO.SDS.restoreLogoutTrigger=function(){SYNO.SDS.Utils.Logout.logoutTriggered=!1},SYNO.SDS.onBasicBeforeUnload=function(){var e,t;if(Ext.isChrome&&SYNO.SDS.DragToDesktop.destroy(),!_S("standalone")&&(e=SYNO.SDS.AppMgr.getByAppName("SYNO.SDS.App.WelcomeAp
1p.Instance"))&&e[0]&&e[0].$options&&e[0].$options.parent&&!e[0].$options.parent.canReload())return _T("welcome","unload_hint");if(!_S("standalone")&&(e=SYNO.SDS.AppMgr.getByAppName("SYNO.SDS.PkgManApp.Instance"))&&e[0]&&e[0].window.isUpdating())return _T("pkgmgr","close_updateall_confirm");if((e=_S("standalone")?SYNO.SDS.AppMgr.getByAppName("SYNO.SDS.App.FileStation3.Instance"):SYNO.SDS.AppMgr.getByAppName("SYNO.SDS.App.FileTaskMonitor.Instance"))&&e[0]){t=_S("standalone")?e[0].window.panelObj.monitorPanel:e[0].window;var n="",a=_S("standalone")?_T("tree","leaf_filebrowser"):_D("os_name")||"DSM";if(t&&(t.uploadGrid&&t.uploadGrid.isProcessing()?n+=SYNO.SDS.formatString(_T("filebrowser","upload_confirm_unload"),a):t.localGrid&&t.localGrid.isProcessing()?n+=SYNO.SDS.formatString(_T("filebrowser","local_confirm_unload"),a):t.downloadGrid&&t.downloadGrid.isProcessing()&&(n+=SYNO.SDS.formatString(_T("filebrowser","download_confirm_unload"),a))),""!==n)return SYNO.SDS.restoreLogoutTrigger.defer(10),n}},SYNO.SDS.getMsgBeforeUnload=function(){var e=SYNO.SDS.onBasicBeforeUnload();return!1===SYNO.SDS.StatusNotifier.fireEvent("beforeunload")?(SYNO.SDS.restoreLogoutTrigger.defer(10),_T("desktop","confirm_leave")):e?(SYNO.SDS.restoreLogoutTrigger.defer(10),e):void 0},SYNO.SDS.onBeforeUnload=function(){return SYNO.SDS.getMsgBeforeUnload()},SYNO.SDS.onBeforeUnloadForApplication=function(){return SYNO.SDS.getMsgBeforeUnload()},SYNO.SDS.initData=function(t,n=0){var a,s=SYNO.SDS.urlDecode(window.location.search.substr(1));if(window.sessionStorage&&window.sessionStorage.getItem("errCode")&&window.sessionStorage.removeItem("errCode"),n>=2)return void SYNO.SDS.ToggleBusyPage(!0);if(SYNO.SDS.isNumber(t)&&t>0)return void SYNO.SDS.initData.defer(t,this,[0,n]);if(!SYNO.API.Manager)return SYNO.API.Manager=SYNO.API.currentManager=new SYNO.API._Manager,void SYNO.API.Manager.queryAPI("all").then((()=>SYNO.SDS.initData()));SYNO.Debug.mark("Desktop initialization");var i=s.launchApp;!i&&SYNO.SDS.Session&&(i=SYNO.SDS.Session.rewriteApp),a=s.jsDebug?{action:"debug",launch_app:i}:{launch_app:i};let o=[],r=function(e,t){window.loginLang&&t.Session.lang!==window.loginLang?SYNO.SDS.UIString.LoadLanguage(t.Session.lang,t.Session.fullversion,e):e()},S=new Promise((function(e,t){SYNO.API.Request({api:"SYNO.Core.Desktop.Initdata",method:"get_user_service",httpMethod:"GET",params:a,timeout:3e5,version:1,callback:function(n,a){if(!n){let e=new Error("Failed: SYNO.Core.Desktop.Initdata::get_user_service");return e.initDataAPI=!0,void t(e)}o[0]=a,SYNO.SDS.Session.lang=a.Session.lang,SYNO.SDS.UrlTag=a.UrlTag;var s=document.documentElement;switch(a.Session.lang){case"cht":s.setAttribute("lang","zh-TW"),SYNO.SDS.Element.addClass(document.body,"syno-cjk");break;case"chs":s.setAttribute("lang","zh-CN"),SYNO.SDS.Element.addClass(document.body,"syno-cjk");break;case"jpn":s.setAttribute("lang","ja"),SYNO.SDS.Element.addClass(document.body,"syno-cjk");break;case"krn":s.setAttribute("lang","ko"),SYNO.SDS.Element.addClass(document.body,"syno-cjk")}!0===a.Session.is_admin?Promise.all([new Promise((e=>r(e,a))),new Promise((e=>function(e,t){SYNO.API.Request({api:"SYNO.Core.QuickStart.Info",method:"load_ds_info",version:3,callback:function(n,a,s,i){if(!n)return t.Session.qckFailed=!0,void e();SYNO.SDS.isObject(a)&&(SYNO.SDS.CopyTo(t.Session,a,["welcome_hide","promote_ew","admin_configured","myds_unified","found_myds_account","udc_check_state","udc_enabled","privacy_agreement","first_admin_login","quickstart_wizard_step","welcome_upgrade_step"]),t.Session.ew20_website_url=a.ew20_website_url),e()}})}(e,a)))]).then((()=>{e()})):r(e,a)}})})),p=new Promise((function(e,t){let n=(e,t)=>{SYNO.API.Request({api:"SYNO.Core.Desktop.Initdata",method:"get_ui_config",httpMethod:"GET",version:1,disableCaching:"script"===SYNO.SDS.isDebug(),params:{lang:SYNO.SDS.Session.lang,debug:s.jsDebug,launch_app:s.launchApp},callback:function(n,a){if(!n){let e=new Error("Failed: SYNO.Core.Desktop.Initdata::get_ui_config");return e.initDataAPI=!0,void t(e)}o[1]=a,e()}})};SYNO.SDS.Session.lang?n(e,t):SYNO.API.Request({api:"SYNO.Core.Desktop.Initdata",method:"get_user_lang",httpMethod:"GET",version:1,
1callback:function(a,s){if(!a){let e=new Error("Failed: SYNO.Core.Desktop.Initdata::get_user_lang");return e.initDataAPI=!0,void t(e)}SYNO.SDS.Session.lang=s.lang,n(e,t)}})}));Promise.all([p,S,e(),(SYNO.SDS.Packages=new SYNO.SDS._Packages,SYNO.SDS.Packages.getSketchData({checkServerError:!1}))]).then((()=>{SYNO.SDS.isDefined(window._loadSynoLang)&&window._loadSynoLang(),SYNO.SDS.Config.JSConfig=o[1].JSConfig,SYNO.SDS.Strings=o[1].Strings,o[0].Session.SynoToken=_S("SynoToken"),SYNO.SDS.Session=o[0].Session,SYNO.SDS.initUserSettings=o[0].UserSettings,SYNO.SDS.initGroupSettings=o[0].GroupSettings,SYNO.SDS.AppPrivilege=o[0].AppPrivilege,SYNO.SDS.ServiceStatus=o[0].ServiceStatus,SYNO.SDS.ActionPrivilege.AllowList=o[0].ActionPrivilege,SYNO.SDS.Timeout.Task.run(),SYNO.SDS.init(),SYNO.SDS.modifyCSSFiles(o[1].CSSFiles),window.loginLang&&_S("lang")!==window.loginLang&&SYNO.API.AssignErrorStr(),SYNO.SDS.Packages.getData().then((()=>{SYNO.SDS.modifyCSSFiles(o[1].CSSFiles)})),SYNO.WebRTC&&(SYNO.WebRTC.Enable=SYNO.WebRTC.IsRelay)})).catch((e=>{if(e.initDataAPI)return SYNO.Debug.error("SYNO.SDS.initData fail",e),void SYNO.SDS.initData(3e3,n+1);SYNO.Debug.error(e)}))},SYNO.SDS.getDisableAppCssFiles=function(e){if(!SYNO.SDS.Packages)return{files:e,disableFiles:[]};const t=SYNO.SDS.Packages.getAllPackages();let n=SYNO.SDS.Config.FnMap,a=[],s=[];for(const e of Object.keys(t)){if(SYNO.SDS.Packages.isEnable(e))continue;const t=n[e];if(t&&t.config&&t.config.jsBaseURL){const e=t.config.jsBaseURL+"/style.css";s.includes(e)||s.push(e)}}for(const t of e)s.every((e=>!t.includes(e)))&&a.push(t);return{files:a,disableFiles:s}},SYNO.SDS.filterStandaloneCSSFiles=function(e){if(!_S("standalone"))return e;var t,n,a,s,i=_S("standaloneAppName"),o=SYNO.SDS.Config.FnMap,r=[],S=function(t){e.forEach((e=>{if(e.indexOf(t)>=0)return r.push(e),!1}))};return(t=o[i]?o[i].config:null)&&(s=t.white_pkg_list)?(s.forEach((e=>{(n=o[e]?o[e].config:null)&&(a=n.jsBaseURL,S(a))})),S(t.jsBaseURL),r):e},SYNO.SDS.modifyCSSFiles=function(e){var t=-1,n="";const a=function(e){[...document.getElementsByTagName("link")].forEach((t=>{if(0<t.href.indexOf(e))return t.parentNode.removeChild(t),!1}))};e=SYNO.SDS.filterStandaloneCSSFiles(e);const{files:s,disableFiles:i}=SYNO.SDS.getDisableAppCssFiles(e);s.forEach((e=>{var a=!1;[...document.getElementsByTagName("link")].forEach((t=>{if(0<=t.href.indexOf(e))return a=!0,!1})),a||(function(e){[...document.getElementsByTagName("link")].forEach((a=>{if(-1!==(t=e.indexOf("?"))&&(n=e.substring(0,t),0<a.href.indexOf(n)))return a.parentNode.removeChild(a),!1}))}(e),function(e){var t=document.createElement("link");t.setAttribute("rel","stylesheet"),t.setAttribute("type","text/css"),t.setAttribute("href",e),document.getElementsByTagName("head")[0].appendChild(t)}(e))}));for(const e of i)a(e)},SYNO.SDS.AutoLaunchPromise=new Promise((e=>{SYNO.SDS.AutoLaunchPromiseResolve=e})),SYNO.SDS.AutoLaunch=async function(){let e=[];const t=function(t,n=(()=>{})){const a=new Promise(((e,a)=>{let s,i,o=(SYNO.SDS.Config.FnMap[t]&&SYNO.SDS.Config.FnMap[t].config?SYNO.SDS.Config.FnMap[t].config:{}).canLaunch,r=(...a)=>{e(t),n(...a)};if(SYNO.SDS.isObject(o))for(s in o)if(!!_S(s)!==o[s])return r(null);i=SYNO.SDS.AppMgr.getByAppName(t),0===i.length?SYNO.SDS.AppLaunch(t,{autoCenter:!0},!1,r):r(i[0])}));return e.push(a),a};for(const e of SYNO.SDS.Config.AutoLaunchFnList)if(e.autoLaunchSync)try{const n=await new Promise(((n,a)=>{const s=(e,t)=>t?a(t):n(e);e.dependName?t(e.dependName,(()=>t(e.appName,s))):t(e.appName,s)}));n&&(SYNO&&SYNO.SDS&&SYNO.SDS.AppInstance&&n instanceof SYNO.SDS.AppInstance&&n.isFinished&&await n.isFinished(),n._isVue&&n.$root&&n.$root.isFinished&&await n.$root.isFinished())}catch(e){SYNO.Debug.error(e)}else e.dependName?t(e.dependName,(()=>t(e.appName))):t(e.appName);return await Promise.all(e)},SYNO.SDS.SortLaunchListComp=function(e,t){var n=[],a=n.indexOf(e);-1===a&&(a=n.length);var s=n.indexOf(t);return-1===s&&(s=n.length),a-s},SYNO.SDS.LaunchPromotion=async function(){const e="SYNO.SDS.App.PromotionApp.Instance";return new Promise(((t,n)=>SYNO.SDS.JSLoad(e,(()=>SYNO.SDS.AppLaunch(e,{autoCenter:!0},!1,t)),null,n))).catch((e=>SYNO.Debug.error("Failed to load promotion js",e))).finally((()=>SYNO.SDS.App.PromotionApp.Promise))},SYNO.SDS.reloadJSConfig=function(e){if(SYNO.SDS.isNumber(e)&&e>0)return void SYNO.SDS.reloadJSConfig.defer(e,this);var t=function(){var e=[];SYNO.SDS.AppMgr.eachMissingApps((function(t){e.push(t)}));for(const t of e)t.destroy&&t.destroy()},n=SYNO.SDS.urlDecode(location.search.substring(1));let a=new Promise(((e,a)=>{SYNO.API.Request({api:"SYNO.Core.Desktop.Initdata",method:"get",version:1,params:{action:"jsconfig",launch_app:n.launchApp},callback:function(n,s,i,o){if(!n)return SYNO.Debug("SYNO.SDS.reloadJSConfig fail",arguments),a("Failed: SYNO.Core.Desktop.Initdata::get"),void SYNO.SDS.reloadJSConfig(3e3);SYNO.SDS.Config.JSConfig=s.JSConfig,SYNO.SDS.Strings=SYNO.SDS.Utils.mergeDeep(SYNO.SDS.Strings,s.Strings),SYNO.SDS.ServiceStatus=s.ServiceStatus,SYNO.SDS.AppPrivilege=s.AppPrivilege,SYNO.SDS.UrlTag=s.UrlTag,SYNO.SDS.JSLoad.init(),SYNO.SDS.ActionPrivilege.AllowList=s.ActionPrivilege,t(),!SYNO.SDS.LaunchFullSizeApps.finished||SYNO.SDS.ExecuteAfterFirstTime&&!SYNO.SDS.ExecuteAfterFirstTime.finished||(SYNO.SDS.AutoLaunchPromise=SYNO.SDS.AutoLaunch()),e(s)}})}));Promise.all([SYNO.SDS.Packages.getData(),a]).then((e=>
1{SYNO.SDS.AppView.refresh(),e&&e[1]&&e[1].CSSFiles&&SYNO.SDS.modifyCSSFiles(e[1].CSSFiles),SYNO.SDS.StatusNotifier&&SYNO.SDS.StatusNotifier.fireEvent("jsconfigLoaded")})),SYNO.API.currentManager||(SYNO.API.currentManager=new SYNO.API.Manager),SYNO.API.currentManager.queryAPI("all")},SYNO.SDS.CheckAndNotifyPackageStarting=function(){SYNO.API.Request({api:"SYNO.Core.Package",method:"list",version:2,params:{additional:["status"]},callback:function(e,t){var n=t.packages;if(e&&void 0!==n)for(var a={installing:!0,starting:!1,upgrading:!0,repairing:!0},s=0;s<n.length;s++){var i=n[s].additional;if(void 0!==i&&void 0!==i.status&&!0===a[i.status]){var o=_T("notification","pkg_still_enabling_title"),r=_T("notification","pkg_still_enabling_info");return void SYNO.SDS.NotifyMgr.notifyVueMsg(null,o,r,0,!0)}}}})},SYNO.SDS.checkBeforeAutoStart=async function(){var e;SYNO.SDS.ExecuteAfterFirstTime=new SYNO.SDS._ExecuteAfterFirstTime,await SYNO.SDS.LaunchPromotion(),_S("is_admin")&&(_S("first_admin_login")||await SYNO.SDS.ExecuteAfterFirstTime.LoadJs(),_S("welcome_hide")&&_S("first_admin_login")||SYNO.API.Request({api:"SYNO.Core.QuickStart.Info",method:"hide_welcome",version:1,callback:SYNO.SDS.emptyFn}),!0===SYNO.SDS.Session.admin_first_login_after_upgrade&&SYNO.SDS.CheckAndNotifyPackageStarting()),null===(e=SYNO.SDS.ExecuteAfterFirstTime)||void 0===e||e.done(),SYNO.SDS.autoStart()},SYNO.SDS.autoStart=function(){var e=SYNO.SDS.UserSettings.getProperty("Desktop","restoreParams")||[],t=SYNO.SDS.UserSettings.getLocalStorageRestoreParams();!SYNO.SDS.isEmpty(t)&&SYNO.SDS.UserSettings.getProperty("Desktop","rememberWindowState")&&(e=t),SYNO.SDS.isArray(e)||(e=[e]),SYNO.SDS.AutoLaunch().then((e=>SYNO.SDS.AutoLaunchPromiseResolve(e))),e.forEach((e=>{SYNO.SDS.AppLaunch(e.className,Object.assign({fromRestore:!0,autoCenter:!0,autoStart:!0},e.params),!0)})),SYNO.SDS.UserSettings.removeProperty("Desktop","restoreParams"),SYNO.SDS.UserSettings.removeLocalStorageRestoreParams()},SYNO.SDS.CheckBadge=function(){!function(){SYNO.API.Request({compound:{api:"SYNO.Entry.Request",version:1,method:"request",stopwhenerror:!1,params:[{api:"SYNO.Core.Upgrade.Server",method:"check",version:1,params:{need_auto_smallupdate:!0}},{api:"SYNO.Core.Package.Server",method:"check",version:1}]},scope:this,callback:SYNO.SDS.emptyFn})}()};const e=function(){return new Promise((function(e,t){if(_D&&"function"==typeof _D&&"yes"===_D("$__all_defs__"))e();else{var n="webapi/entry.cgi?api=SYNO.Core.Desktop.Defs&version=1&method=getjs";n=SYNO.SDS.urlAppend(n,""),SYNO.SDS.JSLoader.requestJSFileByScript(n,e,t)}}))};var t,n,a,s,i,o,r;SYNO.SDS.init=function(){var e,t,n=SYNO.SDS.urlDecode(location.search.substr(1)),a=n.launchApp,s=n.launchParam,i=n.jsDebug,o=n.report,r=SYNO.SDS.Session.rewriteApp,S=SYNO.SDS.uuid();if(SYNO.SDS.isDefined(o))window.location=SYNO.SDS.urlAppend(window.escape(o));else if(SYNO.SDS.isDefined(i)&&(SYNO.SDS.JSDebug=i),SYNO.SDS.initFramework(),SYNO.SDS.isDefined(n.eulaMode)&&n.packageId)SYNO.SDS.initEulaMode(n.packageId);else{var p=SYNO.SDS.Config.FnMap[a],l=!1;if(p&&p.config){var c=p.config;"standalone"!==c.type&&!0!==c.allowStandalone&&"url"!==c.type&&"legacy"!==c.type||(l=!0)}if(SYNO.SDS.SocketInst=new SYNO.SDS.Socket({isGuest:SYNO.SDS.Session.isPublic,standaloneMode:l||!!r}),SYNO.SDS.Packages&&SYNO.SDS.Packages.registerSocketPackageStatus(),SYNO.SDS.JSDebug&&SYNO.SDS.JSLoader.launchHotReloadMode(),l)SYNO.SDS.StatusNotifier.isAppEnabled(a)?SYNO.SDS.initStandaloneDesktop(a,s,c):window.location="/";else if(r){var g,u=SYNO.SDS.Config.FnMap[r];if(u&&u.config&&(g=u.config),!SYNO.SDS.StatusNotifier.isAppEnabled(r))return SYNO.SDS.StatusNotifier.fireEvent("logout"),window.alert(_JSLIBSTR("uicommon","error_noprivilege")),void SYNO.SDS.Utils.Logout.action(!0);SYNO.SDS.Session.rewrite_mode=!0,SYNO.SDS.initStandaloneDesktop(r,s,g)}else{if(!SYNO.SDS.StatusNotifier.isAppEnabled("SYNO.Desktop"))return SYNO.SDS.StatusNotifier.fireEvent("logout"),window.alert(_JSLIBSTR("uicommon","error_noprivilege")),void SYNO.SDS.Utils.Logout.action(!0);if(SYNO.SDS.initDesktop(a),SYNO.SDS.StatusNotifier.isAppEnabled(a)&&SYNO.SDS.AppLaunch(a,s),window.Notification&&SYNO.SDS.UserSettings.getProperty("Desktop","enableDesktopNotification")&&"default"===window.Notification.permission&&SYNO.SDS.isSecure()){e=SYNO.SDS.formatString('<span id={0} class="blue-status" style="cursor:pointer;">{1}</span>',S,_T("common","here")),e=SYNO.SDS.formatString(_T("common","click_to_enable_notification"),e),t=SYNO.SDS.NotifyMgr.notifyVueMsg("",_T("common","desktop"),e,0,!1);const n=document.querySelector(`#${CSS.escape(S)}`);n&&n.addEventListener&&n.addEventListener("click",(()=>{t.close(),window.Notification.requestPermission()}))}_S("is_admin")?SYNO.SDS.CheckBadge():SYNO.SDS.ActionPrivilege.AllowList.includes("SYNO.SDS.PkgManApp.Instance")&&SYNO.API.Request({api:"SYNO.Core.Package.Server",method:"check",version:1,stopwhenerror:!1,scope:this,callback:SYNO.SDS.emptyFn})}_S("isLogined")&&SYNO.API.Request({api:"SYNO.Core.Desktop.Initdata",method:"get",httpMethod:"GET",version:1,params:{action:"external_ip"},callback:function(e,t,n,a){e?(SYNO.SDS.Session.external_ip=t.external_ip,SYNO.SDS.Session.ddns_hostname=t.ddns_hostname):SYNO.Debug("SYNO.SDS.GetExternalIP fail",arguments)}})}},SYNO.SDS.initAccesibilityPlugin=function(){var e=SYNO.SDS.UserSettings.getProperty("Desktop","disableAccessibility")||!1;setARIAPluginsDisabled(e)},SYNO.SDS.initFramework=function(){if(SYNO.SDS.LaunchTime=(new Date).getTime(),SYNO.SDS.JSLoad.init(),SYNO.SDS.StatusNotifier=new SYNO.SDS._StatusNotifier({}),SYNO.SDS.UserSettings=new SYNO.SDS._UserSettings,SYNO.SDS.GroupSettings=new SYNO.SDS._GroupSettings,SYNO.SDS.WindowMgr=window.Vue&&Vue.prototype.$windowManager,SYNO.SDS.FocusMgr=new SYNO.SDS._FocusMgr,SYNO.SDS.AppMgr=new SYNO.SDS._AppMgr,SYNO.SDS.isDebug()&&(SYNO.Debug("JS Loading Caching Disabled. (append _dc to js link)"),"all"===SYNO.SDS.JSDebug)){var e=SYNO.SDS.Config.FnMap;for(var t in SYNO.Debug("JS Dynamic Loading Disabled."),e)e.hasOwnProperty(t)&&SYNO.SDS.JSLoad(t)}},SYNO.SDS.initStandaloneDesktop=function(e,t,n){n&&n.pureEnv?SYNO.SDS.Desktop=SYNO.SDS.CreatePureDesktop():(_S("isLogined")&&(SYNO.SDS.Backgroun
1dTaskMgr=new SYNO.SDS._BackgroundTaskMgr,SYNO.SDS.UploadTaskMgr=new SYNO.SDS._UploadBackgroundTaskMgr,SYNO.SDS.MailTaskMgr=new SYNO.SDS._MailBackgroundTaskMgr,SYNO.SDS.NotifyMgr=new SYNO.SDS._NotifyMgr),SYNO.SDS.Desktop=SYNO.SDS.CreateStandaloneDesktop(),SYNO.SDS.WindowMgr.setContainerEl(SYNO.SDS.Desktop.getElement())),SYNO.SDS.Session.standalone=!0,SYNO.SDS.Session.standaloneAppName=e,SYNO.SDS.AppLaunch(e,t),window.onbeforeunload=SYNO.SDS.onBeforeUnload,SYNO.SDS.DestroyLoginInstance()},SYNO.SDS.HideDesktop=function(){SYNO.SDS.TaskBar.hide(),SYNO.SDS.Desktop.hide()},SYNO.SDS.ShowDesktop=function(){SYNO.SDS.Desktop.show(),SYNO.SDS.TaskBar.show()},SYNO.SDS.LaunchFullSizeApps={appList:["SYNO.SDS.App.WelcomeApp.Instance"],index:0,finish:function(){return this.index>=this.appList.length},finished:!1,launchNextApp:function(){SYNO.SDS.AppLaunch(this.appList[this.index],{},!1,(function(e){e?e._isVue?e.$on("hook:destroyed",(()=>this.start())):e.on("destroy",(()=>this.start())):this.start()}),this),this.index++},start:function(){this.finish()&&!this.finished&&(SYNO.SDS.ShowDesktop(),SYNO.SDS.Desktop.showWallpaper(),SYNO.SDS.checkBeforeAutoStart(),this.finished=!0),this.index<this.appList.length&&this.launchNextApp()}},SYNO.SDS.initDesktop=function(e){var t=!e&&!_S("qckFailed")&&_S("is_admin");
1if(SYNO.SDS.BackgroundTaskMgr=new SYNO.SDS._BackgroundTaskMgr,SYNO.SDS.UploadTaskMgr=new SYNO.SDS._UploadBackgroundTaskMgr,SYNO.SDS.MailTaskMgr=new SYNO.SDS._MailBackgroundTaskMgr,SYNO.SDS.PackageTaskMgr=new SYNO.SDS._PackageBackgroundTaskMgr,SYNO.SDS.TaskBar=SYNO.SDS.CreateTaskBar(),SYNO.SDS.BackgroundTrayMgr=SYNO.SDS.CreateBackgroundTrayMgr(),SYNO.SDS.NotifyMgr=new SYNO.SDS._NotifyMgr,SYNO.SDS.Desktop=SYNO.SDS.CreateDesktop(),SYNO.SDS.WindowMgr.setContainerEl(SYNO.SDS.Desktop.getElement()),SYNO.SDS.AppView=SYNO.SDS.CreateActiveAppView(null),SYNO.SDS.System=new SYNO.SDS._System,SYNO.SDS.DesktopMgr.show(SYNO.SDS.Desktop),SYNO.SDS.SocketInst.registerSDKEvent("update_session",(e=>{for(const[t,n]of Object.entries(e))SYNO.SDS.Session[t]=n})),_S("is_system_recovering"))return"ABB"==_S("is_system_recovering_type")?SYNO.SDS.AppLaunch("SYNO.SDS.App.BRM.Restore.Instance"):"HBED"==_S("is_system_recovering_type")&&SYNO.SDS.AppLaunch("SYNO.SDS.App.HyperBackup.ED.Restore.Instance"),void SYNO.SDS.HideDesktop();if(!1!==SYNO.SDS.Session.boot_done){if(_S("is_upgrading")&&(!_S("ha_running")||_S("is_ha_empty_passive")))return SYNO.SDS.AppLaunch("SYNO.SDS.App.UpdateMaskApp.Instance",{},!1),void SYNO.SDS.HideDesktop();t&&(SYNO.SDS.HideDesktop(),SYNO.SDS.Desktop.hideWallpaper(),SYNO.SDS.LaunchFullSizeApps.start()),window.onbeforeunload=SYNO.SDS.onBeforeUnload,SYNO.SDS.StatusNotifier.on("thirdpartychanged",SYNO.SDS.reloadJSConfig),SYNO.SDS.StatusNotifier.on("halt",(function(){var e=Ext.getClassByName("SYNO.API.Request.Polling.Instance");SYNO.SDS.TaskMgr.setHalt(!0),SYNO.SDS.Timeout.Task.setHalt(!0),SYNO.SDS.Packages.stopNotifyThirdPartyChanged(),Ext.isObject(e)&&Ext.isFunction(e.endPolling)&&e.endPolling("halt")})),SYNO.SDS.StatusNotifier.on("resumehalt",(function(){var e=Ext.getClassByName("SYNO.API.Request.Polling.Instance");SYNO.SDS.TaskMgr.setHalt(!1),SYNO.SDS.Timeout.Task.setHalt(!1),SYNO.SDS.Packages.startNotifyThirdPartyChanged(),Ext.isObject(e)&&Ext.isFunction(e.beginPolling)&&e.beginPolling("halt")})),t||SYNO.SDS.checkBeforeAutoStart();var n=-1;SYNO.SDS.StatusNotifier.on("wallpaperLoaded",(function(e){SYNO.SDS.DestroyLoginInstance(),-1!==n&&clearTimeout(n)})),n=window.setTimeout(SYNO.SDS.DestroyLoginInstance,3e3),SYNO.Debug.measure("Desktop initialization")}else SYNO.SDS.System.WaitForBootUp()},SYNO.SDS.DragToDesktop=(t=!1,n=[".syno-sds-fs-win",".welcomedragable-url"],a=function(e){var t=!1;Ext.each(n,(function(n){if(e.within(e.getTarget(n)))return t=!0,!1}),this),t||e.preventDefault()},s=function(e){e.preventDefault();var t=this.timeStamp||(this.timeStamp=e.browserEvent.timeStamp);Math.abs(e.browserEvent.timeStamp-t)<100||(this.timeStamp=e.browserEvent.timeStamp,this.handleMouseMove(e))},i=function(e){this.handleMouseUp(e),e.stopPropagation(),e.preventDefault()},o=function(e){this.dragCurrent&&this.handleMouseUp.defer(150,this,[e])},r=function(e){e.preventDefault()},{init:function(){Ext.dd.DragDropMgr.preventDefault=!1,Ext.EventManager.on(document,"dragstart",a,this,!0),Ext.EventManager.on(document,"dragenter",r,Ext.dd.DragDropMgr,!0),Ext.EventManager.on(document,"dragover",s,Ext.dd.DragDropMgr,!0),Ext.EventManager.on(document,"drop",i,Ext.dd.DragDropMgr,{preventDefault:!0}),Ext.EventManager.on(document,"dragend",o,Ext.dd.DragDropMgr,!0),t=!0},destroy:function(){Ext.dd.DragDropMgr.preventDefault=!0,Ext.EventManager.un(document,"dragstart",a,this,!0),Ext.EventManager.un(document,"dragover",s,Ext.dd.DragDropMgr,!0),Ext.EventManager.un(document,"dragenter",r,Ext.dd.DragDropMgr,!0),Ext.EventManager.un(document,"drop",i,Ext.dd.DragDropMgr),Ext.EventManager.un(document,"dragend",o,Ext.dd.DragDropMgr),t=!1},isEnable:function(){return t}}),SYNO.SDS.initEulaMode=async function(e){SYNO.SDS.WindowMgr.setContainerEl(document.body);const t=window.location.origin,n=window.opener;if(!n||n.closed||window.name!=SYNO.SDS.EULA_WINDOW_NAME)return SYNO.Debug.warn("[EULA] No opener window found"),void(window.location.href=window.location.origin+window.location.pathname);try{const a=5e3,s=await new Promise(((s,i)=>{const o=setTimeout((()=>{window.removeEventListener("message",S),i(new Error("Timeout waiting for EULA data"))}),a),r=()=>{clearTimeout(o),window.removeEventListener("message",S)},S=e=>{e.source===n&&e.origin===t?SYNO.SDS.isEulaMessage(e.data)&&(e.data.type===SYNO.SDS.EULA_MESSAGE_TYPES.DATA&&(r(),s({content:e.data.content,contentHash:e.data.contentHash})),e.data.type===SYNO.SDS.EULA_MESSAGE_TYPES.DATA_ERROR&&(SYNO.Debug.warn("[EULA] Error from opener:",e.data.error),r(),i(new Error(e.data.error)))):SYNO.Debug.warn("[EULA] Origin mismatch or expected source mismatch, ignoring")};window.addEventListener("message",S);try{n.postMessage({type:SYNO.SDS.EULA_MESSAGE_TYPES.DATA_REQUEST,packageId:e},t)}catch(e){r(),i(e)}})),i=setInterval((()=>{n&&!n.closed||(clearInterval(i),window.close())}),1e3),o=await SYNO.SDS.createEulaWindow(e,{standalone:!0,maskContainer:!1,content:s.content,contentHash:s.contentHash,closeHook:e=>{clearInterval(i),n&&!n.closed&&n.postMessage({type:SYNO.SDS.EULA_MESSAGE_TYPES.RESPONSE,agreed:e,contentHash:s.contentHash},t),window.close()}});if(!o)return SYNO.Debug.error("[EULA] Failed to create EulaWindow"),void window.close();await o.popup()}catch(e){SYNO.Debug.error("[EULA] Failed to initialize EULA mode:",e),n&&
1!n.closed&&n.postMessage({type:SYNO.SDS.EULA_MESSAGE_TYPES.RESPONSE,agreed:!1},t),window.close()}}},726:function(){Object.defineProperty(SYNO.SDS,"isNVR",{get:function(){return"yes"===_D("nvr")}}),Object.defineProperty(SYNO.SDS,"isBusinessModel",{get:function(){return SYNO.Remind("SYNO.SDS.isBusinessModel is deprecated, there is no business model anymore"),!1},set:function(){throw"cannot change readonly value"},configurable:!1})},450:function(){SYNO.SDS._ExecuteAfterFirstTime=class{constructor(){this._FnMap=SYNO.SDS.Config.FnMap,this._fnNameList=[],this._fnDependency=Object.create(null,{}),this._fnNameMap=Object.create(null,{}),this._executeOrderList=[],this._hasLoop=!1,this._finished=!1,this.getFnList(),this.sortFnList()}register(e,t){this._fnNameMap[e]||(this._fnNameMap[e]=[]),Array.isArray(t)?this._fnNameMap[e]=this._fnNameMap[e].concat(t):this._fnNameMap[e].push(t)}getFnList(){for(const e in this._FnMap)this._FnMap.hasOwnProperty(e)&&"firstAdmin"===this._FnMap[e].config.type&&(this._fnDependency[e]=this._FnMap[e].config.firstAdminDepend||[],this._fnNameList.push(e))}sortFnList(){let e=JSON.parse(JSON.stringify(this._fnDependency));for(;!this._hasLoop&&e&&0!==Object.keys(e).length;){let t=[];for(const n in e)0===e[n].length&&(t.push(n),delete e[n]);if(0===t.length){this._hasLoop=!0,SYNO.Debug.warn("Dependency loop detected");break}for(const n in e)for(const a of t){let t=e[n].indexOf(a);t>-1&&e[n].splice(t,1)}this._executeOrderList.push(t)}}async LoadJs(){if(this._hasLoop)return;this._finished=!1;const e=this._fnNameList.map((e=>new Promise(((t,n)=>SYNO.SDS.JSLoad(e,t,this,n)))));await Promise.allSettled(e),await this.execFnList()}get finished(){return this._finished}done(){this._finished=!0}async execFnList(){const e=Object.create(null);for(const t of this._executeOrderList){const n=[],a=[];for(const s of t)for(const t of this._fnNameMap[s]){const i=Object.create(null);for(const t of this._fnDependency[s])i[t]=e[t];n.push(t(i)),a.push(s)}await Promise.allSettled(n).then((t=>{for(let n=0;n<t.length;n++){const s=a[n];e[s]||(e[s]=[]),e[s].push(t[n])}}))}await this.SetFirstAdminDone()}async SetFirstAdminDone(){try{await synowebapi.promises.request({api:"SYNO.Core.QuickStart.Info",method:"hide_welcome",version:1,params:{hide_first_admin:!0}})}catch(e){SYNO.Debug(e)}}}},218:function(){SYNO.namespace("SYNO.SDS");const e={running:()=>({statusTitle:_T("pkgmgr","pkgmgr_pkg_running"),statusDescription:void 0,statusDesktop:"start"}),installing:()=>({statusTitle:_T("pkgmgr","installing"),statusDescription:void 0,statusDesktop:"doing"}),upgrading:()=>({statusTitle:_T("pkgmgr","upgrading"),statusDescription:void 0,statusDesktop:"upgrade"}),repairing:()=>({statusTitle:_T("pkgmgr","repairing"),statusDescription:void 0,statusDesktop:"doing"}),starting:()=>({statusTitle:_T("pkgmgr","starting"),statusDescription:void 0,statusDesktop:"doing"}),stopping:()=>({statusTitle:_T("pkgmgr","stopping"),statusDescription:void 0,statusDesktop:"doing"}),restarting:()=>({statusTitle:_T("pkgmgr","starting"),statusDescription:void 0,statusDesktop:"doing"}),uninstalling:()=>({statusTitle:_T("pkg_detail_status","uninstalling"),statusDescription:void 0,statusDesktop:"doing"}),downloading:e=>{const t=e.additional.progress;return t<=1e-5?{statusTitle:_T("vpnc","waiting"),statusDescription:void 0,statusDesktop:"doing"}:{statusTitle:Math.floor(100*t)+"% "+_T("download","download_task_downloading")+"...",statusDescription:void 0,statusDesktop:"doing"}},queueing:e=>"repair"===e.additional.queue_type?{statusTitle:_T("pkgmgr","pkg_waiting_auto_repair_status"),statusDescription:_T("pkgmgr","pkg_waiting_auto_repair_desc"),statusDesktop:"doing"}:{statusTitle:_T("pkgmgr","pkg_waiting_auto_repair_status"),statusDescription:_T("pkgmgr","pkg_waiting_auto_update_desc"),statusDesktop:"doing"},stop:()=>({statusTitle:_T("pkgmgr","pkgmgr_pkg_manually_stopped"),statusDescription:_T("pkgmgr","pkgmgr_pkg_manually_stopped"),statusDesktop:"stop"}),NA:()=>({statusTitle:_T("pkgmgr","loading"),statusDescription:_T("pkgmgr","system_error"),statusDesktop:"stop"}),non_installed:()=>({statusTitle:_T("pkgmgr","pkgmgr_pkg_not_available"),statusDescription:_T("pkgmgr","pkgmgr_pkg_uninstall_success"),statusDesktop:"stop"}),broken:e=>e.additional.pkgtarget&&e.additional.pkgtarget.is_broken?{statusTitle:_T("pkgmgr","pkgmgr_pkg_broken"),statusDescription:SYNO.SDS.formatString(_T("pkgmgr","pkg_volume_broken_desc"),_T("volume","storage_manager")),statusDesktop:"error"}:{statusTitle:_T("pkgmgr","pkgmgr_pkg_broken"),statusDescription:_T("pkgmgr","broken_desc"),statusDesktop:"error"},broken_by_other:(e,t)=>({statusTitle:_T("pkgmgr","pkgmgr_pkg_broken"),statusDescription:SYNO.SDS.formatString(_T("pkgmgr","broken_by_pkg_desc"),e.additional.broken_by.map((e=>t.getPackageDisplayName(e))).join(", ")),statusDesktop:"error"}),volume_unmounted:()=>({statusTitle:_T("pkgmgr","pkgmgr_pkg_stopped"),statusDescription:_T("pkgmgr","stopped_desc")+" "+_T("pkgmgr","stopped_by_volume_unmount_desc"),statusDesktop:"error"}),license_error:()=>({statusTitle:_T("pkgmgr","pkgmgr_pkg_broken"),statusDescription:_T("pkgmgr","license_err_desc"),statusDesktop:"error"}),version_limit:e=>{switch(e.additional.limit_type){case"non":return{statusTitle:_T("pkgmgr","pkg_no_longer_support_status"),statusDescription:_T("pkgmgr","pkg_no_longer_support_desc"),statusDesktop:"error"};case"system":return{statusTitle:_T("pkgmgr","pkg_no_longer_support_status"),statusDescription:SYNO.SDS.formatString(_T("pkgmgr","pkg_become_builtin_desc"),e.name),statusDesktop:"error"};default:return{statusTitle:_T("pkgmgr","pkgmgr_pkg_stopped"),statusDescription:_T("pkgmgr","broken_version_
1wo_update_desc"),statusDesktop:"error"}}},start_failed:e=>({statusTitle:_T("pkgmgr","pkgmgr_pkg_stopped"),statusDescription:SYNO.SDS.formatString(_T("pkgmgr","start_pkg_fail"),e.name,_T("pkgmgr","contact_developer_or_try_again")),statusDesktop:"error"}),stopped_by_dep_limit:()=>({statusTitle:_T("pkgmgr","stopped_by_dep_limit"),statusDescription:_T("pkgmgr","stopped_by_dep_limit_desc"),statusDesktop:"error"})};SYNO.SDS._Packages=class{constructor(){this._pkgByPkgId=new Map,this._pkgByAppId=new Map,this._onStatusChangeCallbacks=[],this._onAllPackagesChangeCallbacks=[],this._stopNotifyPkgChanged=!1,this.anonymous=void 0}clear(){this._clearPackages()}_clearPackages(){this._pkgByPkgId=new Map,this._pkgByAppId=new Map}registerSocketPackageStatus(){SYNO.SDS.SocketInst.registerSDKEvent("package_status_changed",(e=>{try{this._onPackageStatusChange.apply(this,[e])}catch(t){SYNO.Debug.error(t,e)}})),SYNO.SDS.SocketInst.registerSDKEvent("package_progress_changed",(()=>{this.getData()}))}_onPackageStatusChange(e){const t=this._pkgByPkgId.get(e.package),n=this._toPackageFromMessage(e,t);t&&t.status===n.status||"start"!==n.status&&"stop"!==n.status&&"upgrade"!==n.status&&"error"!==n.status||this._stopNotifyPkgChanged||SYNO.SDS.StatusNotifier.fireEvent("thirdpartychanged"),"non_installed"===e.status?this._removePackage(n):this._updatePackage(n),this._notifyPackageStatusChange(e,n.statusDesktop)}_toPackageFromMessage(e,t){if(!t||e.timestamp>t.timestamp){let n=Object.assign({},t);return n.id=e.package,n.timestamp=e.timestamp,n.additional=n.additional||{},Object.assign(n.additional,e),this._toPackageFromInfo(n)}return t}_toPackageFromInfo(t,n){if(!n||t.timestamp>n.timestamp){let a=Object.assign({},t);return n&&(a.additional=Object.assign({},n.additional,t.additional)),Object.assign(a,e[a.additional.status](a,this)),void 0===a.statusDescription&&a.additional.status_origin&&(a.statusDescription=e[a.additional.status_origin](a,this).statusDescription),a.pkgId=a.id,a.status=a.statusDesktop,a.additional.dsm_apps=a.additional.dsm_apps||"",a.dsmApps=a.additional.dsm_apps.trim().split(" ").filter((e=>""!==e)),a}return n}_removePackage(e){for(const t of e.dsmApps)this._pkgByAppId.delete(t);this._pkgByPkgId.delete(e.id)}_updatePackage(e){for(const t of e.dsmApps)this._pkgByAppId.set(t,e);this._pkgByPkgId.set(e.id,e)}_notifyPackageStatusChange(e,t){for(const{callback:n,context:a,pkgId:s}of this._onStatusChangeCallbacks)"_all"!==s&&s!==e.package||n.apply(a||this,[t,e])}getSketchData({checkServerError:e=!0}={}){return this.isAnonymous()?Promise.resolve():SYNO.API.RequestPromise({api:"SYNO.Core.Package",method:"list",version:2,suppressError:!e,params:{additional:["status_sketch","dsm_apps","install_type"],ignore_hidden:!1}}).then((e=>(this._onAllPackagesChange(e,!1,["status_sketch","dsm_apps"]),this.getAllPackages()))).catch((e=>{SYNO.Debug.error(e)}))}getData(e=["status","dsm_apps"]){return this.isAnonymous()?Promise.resolve():SYNO.API.RequestPromise({api:"SYNO.Core.Package",method:"list",version:2,params:{additional:[...e,"install_type"],ignore_hidden:!1}}).then((t=>(this._onAllPackagesChange(t,!0,e),this.getAllPackages()))).catch((e=>{SYNO.Debug.error(e)}))}getPackage(e,t=["status","dsm_apps"]){return SYNO.API.RequestPromise({api:"SYNO.Core.Package",method:"get",version:1,params:{id:e,additional:t}}).then((e=>{this._onAllPackagesChange({packages:[e]},!1,t)})).catch((e=>{SYNO.Debug.error(e)}))}_onAllPackagesChange(e,t,n){const a=e.packages.map((e=>this._toPackageFromInfo(e,this._pkgByPkgId.get(e.id))));t&&this._clearPackages();for(const e of a)this._updatePackage(e);this._notifyAllPackagesChanged(n)}_notifyAllPackagesChanged(e){for(const{callback:t,context:n}of this._onAllPackagesChangeCallbacks)t.apply(n||this,[e])}registerAllPackagesChange(e,t){this._onAllPackagesChangeCallbacks.push({callback:e,context:t||this})}registerPackageStatusChange(e,t,n="_all"){this._onStatusChangeCallbacks.push({callback:e,context:t||this,pkgId:n})}unregisterPackageStatusChange(e,t){this._onStatusChangeCallbacks=this._onStatusChangeCallbacks.filter((({callback:n,context:a})=>n!==e||a!==t))}unregisterAllPackagesChange(e,t){this._onAllPackagesChangeCallbacks=this._onAllPackagesChangeCallbacks.filter((({callback:n,context:a})=>n!==e||a!==t))}isAnonymous(){return _S("isPublic")}isPackage(e){return!!this._pkgByAppId.get(e)}isStop(e){const t=this._pkgByAppId.get(e);return!!t&&"stop"===t.status}isStart(e){const t=this._pkgByAppId.get(e);return!!t&&"start"===t.status}isEnable(e){return!!this.isAnonymous()||this.isStart(e)}shouldLaunchPkgCenter(e){return"doing"===e||"stop"===e||"error"===e}getPkgId(e){return this._pkgByAppId.get(e).id}getJsId(e){const t=this._pkgByPkgId.get(e);return t&&t.dsmApps?t.dsmApps[0]:null}getPackageTip(e){const t=this._pkgByPkgId.get(e);return t?t.statusTitle:null}getPackageDisplayName(e){const t=this._pkgByPkgId.get(e);return t?t.name:e}
1getInfo(e,t="appId"){if("appId"===t){return this._pkgByAppId.get(e)||null}const n=this._pkgByPkgId.get(e);return n?n.dsmApps.map((e=>this._pkgByAppId.get(e))):null}getInfoByPkgId(e){return this._pkgByPkgId.get(e)}getPackages({by:e="appId",allowHidden:t=!1}={}){const n="appId"===e?Object.fromEntries(this._pkgByAppId):Object.fromEntries(this._pkgByPkgId);return t?n:Object.entries(n).reduce(((e,[t,n])=>(function(e){const t=e.additional.install_type,n=e.id;return!!["HyperBackup-ED","SynoOnlinePack_v2","SupportService"].includes(n)||"hidden"===t||"system_hidden"===t}(n)||(e[t]=n),e)),{})}getAllPackages({allowHidden:e=!1}={}){return this.getPackages({by:"appId",allowHidden:e})}getAllPackagesGroupByPkgId({allowHidden:e=!1}={}){return this.getPackages({by:"pkgId",allowHidden:e})}getInstalledPackageIconPath(e){const t=this.getInfoByPkgId(e);return t?Ext.urlAppend(SYNO.API.currentManager.getBaseURL("SYNO.Core.Package.Thumb","get",1),Ext.urlEncode(SYNO.API.EncodeParams({name:t.id,ver:t.version,size:SYNO.SDS.UIFeatures.test("isRetina")?128:64}))):""}stopNotifyThirdPartyChanged(){this._stopNotifyPkgChanged=!0}startNotifyThirdPartyChanged(){this._stopNotifyPkgChanged=!1}}},186:function(){SYNO.namespace("SYNO.SDS.QuickConnect"),SYNO.SDS.QuickConnect.Main=class{constructor(){this.DOMAIN="QuickConnect.to",this.DOMAIN_PATTERN=/^.+\.quickconnect\.[^.]+$/,this.DOMAIN_SMART_DNS_PATTERN=/^.+\.direct\.quickconnect\.[^.]+$/,this.TYPES={NORMAL:"NORMAL",DIRECT:"DIRECT",TUNNEL:"TUNNEL"},this.SUB_DOMAIN_MAPPING={NORMAL:"",DIRECT:"/direct/",TUNNEL:"/tunnel/"}}aliasToPortalUrl(e,t=this.DOMAIN){return this.generatePortalUrl(this.TYPES.NORMAL,e,t)}getPortalUrl(e,t,n){if(void 0===this.SUB_DOMAIN_MAPPING[e])return!1;if("function"!=typeof t)return!1;if(void 0===this.callback_queue){this.callback_queue=[];var a={api:"SYNO.Core.QuickConnect",method:"get",version:1,scope:this,callback:this.processReturnData};SYNO.API.Request(a)}return this.callback_queue.push({callback:t,scope:n,type:e}),!0}isInTunnel(){return!this.isSmartDNS()&&this.DOMAIN_PATTERN.test(window.location.hostname.toLowerCase())}isSmartDNS(){return this.DOMAIN_SMART_DNS_PATTERN.test(window.location.hostname.toLowerCase())}processReturnData(e,t,n){for(var a=e&&void 0!==t.server_alias&&void 0!==t.region&&void 0!==t.enabled&&!0===t.enabled,s=0;s<this.callback_queue.length;++s){var i="",o=this.callback_queue[s].callback,r=this.callback_queue[s].scope;if(a){var S=this.callback_queue[s].type;i=this.generatePortalUrl(S,t.server_alias,t.domain,t.region)}else i=void 0===t.error||void 0===t.error.code?"":t.error.code;o.apply(r,[a,i])}delete this.callback_queue}generatePortalUrl(e,t,n,a){var s=this.SUB_DOMAIN_MAPPING[e],i=e==this.TYPES.NORMAL,o=i?"http":"https";return n=n.replace(/quickconnect/i,"QuickConnect"),i?o+"://"+n+"/"+t:o+"://"+t+"."+a+"."+n+s}},SYNO.SDS.QuickConnect.Utils=new SYNO.SDS.QuickConnect.Main}},t={};function n(a){var s=t[a];if(void 0!==s)return s.exports;var i=t[a]={exports:{}};return e[a](i,i.exports,n),i.exports}!function(){"use strict";n(220),n(218),n(692),n(81),n(726),n(450),n(186);var e=function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("div",{staticClass:"syno-sds-busy-page"},[n("div",{staticClass:"busy-page-title"},[e._v(e._s(e.T("system","system_busy_try_later")))]),e._v(" "),n("div",{staticClass:"busy-page-content"},[e._v(e._s(e.T("system","system_resource_not_enough_desc")))]),e._v(" "),n("v-button",{staticClass:"busy-page-refresh-btn",attrs:{type:"footbar"},on:{click:e.onClickRefresh}},[e._v("\n\t\t"+e._s(e.T("common","refresh"))+"\n\t")]),e._v(" "),e._m(0)],1)};e._withStripped=!0;var t=function(e,t,n,a,s,i,o,r){var S,p="function"==typeof e?e.options:e;if(t&&(p.render=t,p.staticRenderFns=[function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("div",{staticClass:"busy-page-footer"},[n("div",{staticClass:"copyright"},[e._v("© 2019 Synology Inc.")]),e._v(" "),n("div",{staticClass:"cover"})])}],p._compiled=!0),S)if(p.functional){p._injectStyles=S;var l=p.render;p.render=function(e,t){return S.call(t),l(e,t)}}else{var c=p.beforeCreate;p.beforeCreate=c?[].concat(c,S):[S]}return{exports:e,options:p}}({mixins:[{methods:{T(e,t){let n=_T(e,t);return n&&""!==n?n:`${e}:${t}`}}}],data(){return{}},methods:{onClickRefresh(){location.reload()}}},e);t.options.__file="BusyPage/src/App.vue";var a=t.exports;SYNO.namespace("SYNO.SDS.BusyPage.Vue");let s=null;SYNO.SDS.ToggleBusyPage=function(e){if(e){const e=document.createElement("div");document.body.appendChild(e);const t=window.Vue.extend(a);s=new t,s.$mount(e)}else s&&(s.$destroy(),s.$el.parentNode.removeChild(s.$el),s=null)}}()}();

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.