{"version":3,"file":"NavigationClient.js","sources":["../../src/navigation/NavigationClient.ts"],"sourcesContent":["/*\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License.\n */\n\nimport { INavigationClient } from \"./INavigationClient\";\nimport { NavigationOptions } from \"./NavigationOptions\";\n\nexport class NavigationClient implements INavigationClient {\n /**\n * Navigates to other pages within the same web application\n * @param url \n * @param options \n */\n navigateInternal(url: string, options: NavigationOptions): Promise{\n return NavigationClient.defaultNavigateWindow(url, options);\n }\n\n /**\n * Navigates to other pages outside the web application i.e. the Identity Provider\n * @param url \n * @param options \n */\n navigateExternal(url: string, options: NavigationOptions): Promise {\n return NavigationClient.defaultNavigateWindow(url, options);\n }\n\n /**\n * Default navigation implementation invoked by the internal and external functions\n * @param url \n * @param options \n */\n private static defaultNavigateWindow(url: string, options: NavigationOptions): Promise {\n if (options.noHistory) {\n window.location.replace(url);\n } else {\n window.location.assign(url);\n }\n\n return new Promise((resolve) => {\n setTimeout(() => {\n resolve(true);\n }, options.timeout);\n });\n }\n}\n"],"names":[],"mappings":";;AAAA;;;;;IAQA;KAqCC;;;;;;IA/BG,2CAAgB,GAAhB,UAAiB,GAAW,EAAE,OAA0B;QACpD,OAAO,gBAAgB,CAAC,qBAAqB,CAAC,GAAG,EAAE,OAAO,CAAC,CAAC;KAC/D;;;;;;IAOD,2CAAgB,GAAhB,UAAiB,GAAW,EAAE,OAA0B;QACpD,OAAO,gBAAgB,CAAC,qBAAqB,CAAC,GAAG,EAAE,OAAO,CAAC,CAAC;KAC/D;;;;;;IAOc,sCAAqB,GAApC,UAAqC,GAAW,EAAE,OAA0B;QACxE,IAAI,OAAO,CAAC,SAAS,EAAE;YACnB,MAAM,CAAC,QAAQ,CAAC,OAAO,CAAC,GAAG,CAAC,CAAC;SAChC;aAAM;YACH,MAAM,CAAC,QAAQ,CAAC,MAAM,CAAC,GAAG,CAAC,CAAC;SAC/B;QAED,OAAO,IAAI,OAAO,CAAC,UAAC,OAAO;YACvB,UAAU,CAAC;gBACP,OAAO,CAAC,IAAI,CAAC,CAAC;aACjB,EAAE,OAAO,CAAC,OAAO,CAAC,CAAC;SACvB,CAAC,CAAC;KACN;IACL,uBAAC;AAAD,CAAC;;;;"}