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AI,EAAoB,SAAS,eAAe,YAC5C,GACH,EAAkB,UAAU,IAAI,cAEjC,EAAkB,WA9Dd,EAAkB,iBADI,EA+De,IA9DO,iBAAiB,GAC7D,EAAiB,EAAQ,UAAY,EAAQ,SAAS,GACtD,EAAW,WAAW,CAAC,EAAG,EAAiB,GAuB3C,EArBiB,CACpB,IACC,MACA,EAAS,OAAO,KACf,EAAS,IACT,oDACA,EAAS,IACT,KACA,EAAS,aACT,OACG,IACJ,OACD,WACC,MACA,EAAS,OAAO,WAChB,sHACA,EAAS,aACT,WACD,SAAU,MAAQ,EAAS,OAAO,GAAgB,QAGhB,GAE/B,EAAwB,EAAS,UACjC,GAAwB,EAAS,cACpC,EAAwB,EAAS,aAIjC,oCACA,EACA,QACA,EACA,oEACA,EAAS,MACT,2BA7EG,EAAc,SAAS,eAAe,4BACtC,EAAe,SAAS,eAAe,uBAG3C,EAAW,MAAM,gBAAkB,EAEnC,EAAW,MAAM,MAAQ,EACzB,EAAW,SAAS,GAAG,SAAS,GAAG,MAAM,MAAQ,EACjD,EAAW,SAAS,GAAG,SAAS,GAAG,MAAM,MAAQ,EAG7C,IACH,EAAa,MAAM,MAAQ,EACvB,EAAa,MAAM,cACtB,EAAa,MAAM,YAAc,GAIlC,EAAa,YAAc,WAC1B,KAAK,MAAM,MAAQ,EACnB,KAAK,MAAM,gBAAkB,CAC9B,EAEA,EAAa,WAAa,WACzB,KAAK,MAAM,MAAQ,EACnB,KAAK,MAAM,gBAAkB,CAC9B,GAGD,EAAY,MAAM,MAAQ,EAE1B,EAAY,YAAc,WAEzB,OADA,EAAW,MAAM,QAAU,QACpB,CACR,CAoED,CACD,EAGI,EAAY,OAAO,OACM,mBAAlB,OAAO,OACjB,OAAO,OAAS,EAEhB,OAAO,OAAS,WACX,GACH,IAED,GACD,CAEF","file":"/npm/outdated-browser-rework@3.0.1/index.js","sourceRoot":"","sourcesContent":["/**\n * Minified by jsDelivr using Terser v5.39.0.\n * Original file: /npm/outdated-browser-rework@3.0.1/index.js\n *\n * Do NOT use SRI with dynamically generated files! More information: https://www.jsdelivr.com/using-sri-with-dynamic-files\n */\n","var evaluateBrowser = require(\"./evaluateBrowser\")\nvar languageMessages = require(\"./languages.json\")\nvar deepExtend = require(\"./extend\")\nvar UserAgentParser = require(\"ua-parser-js\")\n\nvar COLORS = {\n\tsalmon: \"#f25648\",\n\twhite: \"white\"\n}\n\nmodule.exports = function(options) {\n\tvar main = function() {\n\t\t// Despite the docs, UA needs to be provided to constructor explicitly:\n\t\t// https://github.com/faisalman/ua-parser-js/issues/90\n\t\tvar parsedUserAgent = new UserAgentParser(navigator.userAgent).getResult()\n\n\t\t// Variable definition (before ajax)\n\t\tvar outdatedUI = document.getElementById(\"outdated\")\n\n\t\t// Set default options\n\t\toptions = options || {}\n\n\t\tvar browserLocale = window.navigator.language || window.navigator.userLanguage // Everyone else, IE\n\t\t// CSS property to check for. You may also like 'borderSpacing', 'boxShadow', 'transform', 'borderImage';\n\t\tvar backgroundColor = options.backgroundColor || COLORS.salmon\n\t\tvar textColor = options.textColor || COLORS.white\n\t\tvar fullscreen = options.fullscreen || false\n\t\tvar language = options.language || browserLocale.slice(0, 2) // Language code\n\n\t\tvar updateSource = \"web\" // Other possible values are 'googlePlay' or 'appStore'. Determines where we tell users to go for upgrades.\n\n\t\t// Chrome mobile is still Chrome (unlike Safari which is 'Mobile Safari')\n\t\tvar isAndroid = parsedUserAgent.os.name === \"Android\"\n\t\tif (isAndroid) {\n\t\t\tupdateSource = \"googlePlay\"\n\t\t} else if  (parsedUserAgent.os.name === \"iOS\") {\n\t\t\tupdateSource = \"appStore\"\n\t\t}\n\n\t\tvar isBrowserUnsupported = false // set later after browser evaluation\n\n\t\tvar done = true\n\n\t\tvar changeOpacity = function (opacityValue) {\n\t\t\toutdatedUI.style.opacity = opacityValue / 100\n\t\t\toutdatedUI.style.filter = \"alpha(opacity=\" + opacityValue + \")\"\n\t\t}\n\t\n\t\tvar fadeIn = function (opacityValue) {\n\t\t\tchangeOpacity(opacityValue)\n\t\t\tif (opacityValue === 1) {\n\t\t\t\toutdatedUI.style.display = \"table\"\n\t\t\t}\n\t\t\tif (opacityValue === 100) {\n\t\t\t\tdone = true\n\t\t\t}\n\t\t}\n\t\n\t\tvar makeFadeInFunction = function (opacityValue) {\n\t\t\treturn function () {\n\t\t\t\tfadeIn(opacityValue)\n\t\t\t}\n\t\t}\n\t\n\t\t// Style element explicitly - TODO: investigate and delete if not needed\n\t\tvar startStylesAndEvents = function () {\n\t\t\tvar buttonClose = document.getElementById(\"buttonCloseUpdateBrowser\")\n\t\t\tvar buttonUpdate = document.getElementById(\"buttonUpdateBrowser\")\n\t\n\t\t\t//check settings attributes\n\t\t\toutdatedUI.style.backgroundColor = backgroundColor\n\t\t\t//way too hard to put !important on IE6\n\t\t\toutdatedUI.style.color = textColor\n\t\t\toutdatedUI.children[0].children[0].style.color = textColor\n\t\t\toutdatedUI.children[0].children[1].style.color = textColor\n\t\n\t\t\t// Update button is desktop only\n\t\t\tif (buttonUpdate) {\n\t\t\t\tbuttonUpdate.style.color = textColor\n\t\t\t\tif (buttonUpdate.style.borderColor) {\n\t\t\t\t\tbuttonUpdate.style.borderColor = textColor\n\t\t\t\t}\n\t\n\t\t\t\t// Override the update button color to match the background color\n\t\t\t\tbuttonUpdate.onmouseover = function () {\n\t\t\t\t\tthis.style.color = backgroundColor\n\t\t\t\t\tthis.style.backgroundColor = textColor\n\t\t\t\t}\n\t\n\t\t\t\tbuttonUpdate.onmouseout = function () {\n\t\t\t\t\tthis.style.color = textColor\n\t\t\t\t\tthis.style.backgroundColor = backgroundColor\n\t\t\t\t}\n\t\t\t}\n\t\n\t\t\tbuttonClose.style.color = textColor\n\t\n\t\t\tbuttonClose.onmousedown = function () {\n\t\t\t\toutdatedUI.style.display = \"none\"\n\t\t\t\treturn false\n\t\t\t}\n\t\t}\n\t\n\t\tvar getMessage = function (lang) {\n\t\t\tvar defaultMessages = languageMessages[lang] || languageMessages.en\n\t\t\tvar customMessages = options.messages && options.messages[lang]\n\t\t\tvar messages = deepExtend({}, defaultMessages, customMessages)\n\t\n\t\t\tvar updateMessages = {\n\t\t\t\tweb:\n\t\t\t\t\t\"<p>\" +\n\t\t\t\t\tmessages.update.web +\n\t\t\t\t\t(messages.url ? (\n\t\t\t\t\t\t'<a id=\"buttonUpdateBrowser\" rel=\"nofollow\" href=\"' +\n\t\t\t\t\t\tmessages.url +\n\t\t\t\t\t\t'\">' +\n\t\t\t\t\t\tmessages.callToAction +\n\t\t\t\t\t\t\"</a>\"\n\t\t\t\t\t) : '') +\n\t\t\t\t\t\"</p>\",\n\t\t\t\tgooglePlay:\n\t\t\t\t\t\"<p>\" +\n\t\t\t\t\tmessages.update.googlePlay +\n\t\t\t\t\t'<a id=\"buttonUpdateBrowser\" rel=\"nofollow\" href=\"https://play.google.com/store/apps/details?id=com.android.chrome\">' +\n\t\t\t\t\tmessages.callToAction +\n\t\t\t\t\t\"</a></p>\",\n\t\t\t\tappStore: \"<p>\" + messages.update[updateSource] + \"</p>\"\n\t\t\t}\n\t\n\t\t\tvar updateMessage = updateMessages[updateSource]\n\t\n\t\t\tvar browserSupportMessage = messages.outOfDate;\n\t\t\tif (isBrowserUnsupported && messages.unsupported) {\n\t\t\t\tbrowserSupportMessage = messages.unsupported;\n\t\t\t}\n\t\n\t\t\treturn (\n\t\t\t\t'<div class=\"vertical-center\"><h6>' +\n\t\t\t\tbrowserSupportMessage +\n\t\t\t\t\"</h6>\" +\n\t\t\t\tupdateMessage +\n\t\t\t\t'<p class=\"last\"><a href=\"#\" id=\"buttonCloseUpdateBrowser\" title=\"' +\n\t\t\t\tmessages.close +\n\t\t\t\t'\">&times;</a></p></div>'\n\t\t\t)\n\t\t}\n\n\t\tvar result = evaluateBrowser(parsedUserAgent, options);\n\t\tif (result.isAndroidButNotChrome || result.isBrowserOutOfDate || !result.isPropertySupported) {\n\t\t\t// This is an outdated browser and the banner needs to show\n\n\t\t\t// Set this flag with the result for `getMessage`\n\t\t\tisBrowserUnsupported = result.isBrowserUnsupported\n\n\t\t\tif (done && outdatedUI.style.opacity !== \"1\") {\n\t\t\t\tdone = false\n\t\n\t\t\t\tfor (var opacity = 1; opacity <= 100; opacity++) {\n\t\t\t\t\tsetTimeout(makeFadeInFunction(opacity), opacity * 8)\n\t\t\t\t}\n\t\t\t}\n\t\n\t\t\tvar insertContentHere = document.getElementById(\"outdated\")\n\t\t\tif (fullscreen) {\n\t\t\t\tinsertContentHere.classList.add(\"fullscreen\")\n\t\t\t}\n\t\t\tinsertContentHere.innerHTML = getMessage(language)\n\t\t\tstartStylesAndEvents()\n\t\t}\n\t}\n\n\t// Load main when DOM ready.\n\tvar oldOnload = window.onload\n\tif (typeof window.onload !== \"function\") {\n\t\twindow.onload = main\n\t} else {\n\t\twindow.onload = function() {\n\t\t\tif (oldOnload) {\n\t\t\t\toldOnload()\n\t\t\t}\n\t\t\tmain()\n\t\t}\n\t}\n}\n"]}