{"version":3,"file":"window-manager.js","names":["window","windowManager","declareTopLocal","win","topLevelList","forEach","name","topWindow","toString","version"],"sources":["../../../scripts/leanforms/window-manager.js"],"sourcesContent":["// #region: Class definition *********************************************************************/\r\n/**\r\n * Manages window objects (iFrame) within the system.\r\n */\r\nwindow.windowManager = new class {\r\n\r\n    /**\r\n     * Declare top level application classes and variables as local variables in another (nested) window/iframe.\r\n     * This way, authors can address e.g. leanformsNext.onAjaxError as such instead of top.leanformsNext.onAjaxError\r\n     * @param {DocumentView} win                The Window (iframe) to add the top reference to.\r\n     */\r\n    // eslint-disable-next-line class-methods-use-this -- Cannot use/access static methods within an anonymous class expression.\r\n    declareTopLocal(win) {\r\n        const topLevelList = [\r\n            \"application\",\r\n            \"applicationHub\",\r\n            \"broadcasts\",\r\n            \"confirm\",\r\n            \"confirmToast\",\r\n            \"core\",\r\n            \"dating\",\r\n            \"eventBroadcaster\",\r\n            \"leanformsNext\",\r\n            \"menu\",\r\n            \"messages\",\r\n            \"resources\",\r\n            \"signalR\",\r\n            \"tabstrip\",\r\n            \"toast\",\r\n            \"topWindow\",\r\n            \"validation\",\r\n            \"validator\",\r\n            \"windowManager\"\r\n        ];\r\n\r\n        topLevelList.forEach((name) => {\r\n            if (topWindow[name]) {\r\n                win[name] = topWindow[name];\r\n            }\r\n        });\r\n    }\r\n\r\n    // #region: Build ****************************************************************************/\r\n    /**\r\n     * Identifies class.\r\n     * @returns {String}                        The string representation of this class.\r\n     */\r\n    toString() {\r\n        return \"[windowManager]\";\r\n    }\r\n\r\n    static toString() {\r\n        return \"[windowManager]\";\r\n    }\r\n\r\n    /** \r\n     * Identifies the version.\r\n     * @returns {String}                        The version number of this class.\r\n     */\r\n    static version() {\r\n        return \"1.0.0\";\r\n    }\r\n    // #endregion ********************************************************************************/\r\n}();\r\n// #endregion ************************************************************************************/"],"mappings":"AAIAA,OAAOC,cAAgB,IAAI,MAQvB,eAAAC,CAAgBC,KACZ,MAAMC,aAAe,CACjB,cACA,iBACA,aACA,UACA,eACA,OACA,SACA,mBACA,gBACA,OACA,WACA,YACA,UACA,WACA,QACA,YACA,aACA,YACA,iBAGJA,aAAaC,SAASC,OAClB,GAAIC,UAAUD,MAAO,CACjBH,IAAIG,MAAQC,UAAUD,KAC1B,IAER,CAOA,QAAAE,GACI,MAAO,iBACX,CAEA,eAAOA,GACH,MAAO,iBACX,CAMA,cAAOC,GACH,MAAO,OACX","ignoreList":[]}