Files
SteamTools/Web/js/compatibilitytesting.min.js
2021-12-22 12:32:29 +08:00

3 lines
9.6 KiB
JavaScript
Raw Permalink Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
/*! modernizr 3.6.0 (Custom Build) | MIT *
* https://modernizr.com/download/?-arrow-borderradius-boxshadow-boxsizing-canvas-csscalc-cssfilters-csstransforms-fetch-fontface-json-opacity-rgba-svg-video-setclasses !*/
!function(window,document,undefined){function is(e,t){return typeof e===t}function testRunner(){var e,t,n,r,o,s;for(var i in tests)if(tests.hasOwnProperty(i)){if(e=[],(t=tests[i]).name&&(e.push(t.name.toLowerCase()),t.options&&t.options.aliases&&t.options.aliases.length))for(n=0;n<t.options.aliases.length;n++)e.push(t.options.aliases[n].toLowerCase());for(r=is(t.fn,"function")?t.fn():t.fn,o=0;o<e.length;o++)1===(s=e[o].split(".")).length?Modernizr[s[0]]=r:(!Modernizr[s[0]]||Modernizr[s[0]]instanceof Boolean||(Modernizr[s[0]]=new Boolean(Modernizr[s[0]])),Modernizr[s[0]][s[1]]=r),classes.push((r?"":"no-")+s.join("-"))}}function setClasses(e){var t=docElement.className,n=Modernizr._config.classPrefix||"";if(isSVG&&(t=t.baseVal),Modernizr._config.enableJSClass){var r=new RegExp("(^|\\s)"+n+"no-js(\\s|$)");t=t.replace(r,"$1"+n+"js$2")}Modernizr._config.enableClasses&&(t+=" "+n+e.join(" "+n),isSVG?docElement.className.baseVal=t:docElement.className=t)}function createElement(){return"function"!=typeof document.createElement?document.createElement(arguments[0]):isSVG?document.createElementNS.call(document,"http://www.w3.org/2000/svg",arguments[0]):document.createElement.apply(document,arguments)}function getBody(){var e=document.body;return e||((e=createElement(isSVG?"svg":"body")).fake=!0),e}function injectElementWithStyles(e,t,n,r){var o,s,i,d,a="modernizr",l=createElement("div"),c=getBody();if(parseInt(n,10))for(;n--;)(i=createElement("div")).id=r?r[n]:a+(n+1),l.appendChild(i);return(o=createElement("style")).type="text/css",o.id="s"+a,(c.fake?c:l).appendChild(o),c.appendChild(l),o.styleSheet?o.styleSheet.cssText=e:o.appendChild(document.createTextNode(e)),l.id=a,c.fake&&(c.style.background="",c.style.overflow="hidden",d=docElement.style.overflow,docElement.style.overflow="hidden",docElement.appendChild(c)),s=t(l,e),c.fake?(c.parentNode.removeChild(c),docElement.style.overflow=d,docElement.offsetHeight):l.parentNode.removeChild(l),!!s}function contains(e,t){return!!~(""+e).indexOf(t)}function cssToDOM(e){return e.replace(/([a-z])-([a-z])/g,(function(e,t,n){return t+n.toUpperCase()})).replace(/^-/,"")}function fnBind(e,t){return function(){return e.apply(t,arguments)}}function testDOMProps(e,t,n){var r;for(var o in e)if(e[o]in t)return!1===n?e[o]:is(r=t[e[o]],"function")?fnBind(r,n||t):r;return!1}function domToCSS(e){return e.replace(/([A-Z])/g,(function(e,t){return"-"+t.toLowerCase()})).replace(/^ms-/,"-ms-")}function computedStyle(e,t,n){var r;if("getComputedStyle"in window){r=getComputedStyle.call(window,e,t);var o=window.console;if(null!==r)n&&(r=r.getPropertyValue(n));else if(o){o[o.error?"error":"log"].call(o,"getComputedStyle returning null, its possible modernizr test results are inaccurate")}}else r=!t&&e.currentStyle&&e.currentStyle[n];return r}function nativeTestProps(e,t){var n=e.length;if("CSS"in window&&"supports"in window.CSS){for(;n--;)if(window.CSS.supports(domToCSS(e[n]),t))return!0;return!1}if("CSSSupportsRule"in window){for(var r=[];n--;)r.push("("+domToCSS(e[n])+":"+t+")");return injectElementWithStyles("@supports ("+(r=r.join(" or "))+") { #modernizr { position: absolute; } }",(function(e){return"absolute"==computedStyle(e,null,"position")}))}return undefined}function testProps(e,t,n,r){function o(){i&&(delete mStyle.style,delete mStyle.modElem)}if(r=!is(r,"undefined")&&r,!is(n,"undefined")){var s=nativeTestProps(e,n);if(!is(s,"undefined"))return s}for(var i,d,a,l,c,u=["modernizr","tspan","samp"];!mStyle.style&&u.length;)i=!0,mStyle.modElem=createElement(u.shift()),mStyle.style=mStyle.modElem.style;for(a=e.length,d=0;a>d;d++)if(l=e[d],c=mStyle.style[l],contains(l,"-")&&(l=cssToDOM(l)),mStyle.style[l]!==undefined){if(r||is(n,"undefined"))return o(),"pfx"!=t||l;try{mStyle.style[l]=n}catch(e){}if(mStyle.style[l]!=c)return o(),"pfx"!=t||l}return o(),!1}function testPropsAll(e,t,n,r,o){var s=e.charAt(0).toUpperCase()+e.slice(1),i=(e+" "+cssomPrefixes.join(s+" ")+s).split(" ");return is(t,"string")||is(t,"undefined")?testProps(i,t,r,o):testDOMProps(i=(e+" "+domPrefixes.join(s+" ")+s).split(" "),t,n)}function testAllProps(e,t,n){return testPropsAll(e,undefined,undefined,t,n)}var classes=[],tests=[],ModernizrProto={_version:"3.6.0",_config:{classPrefix:"",enableClasses:!0,enableJSClass:!0,usePrefixes:!0},_q:[],on:function(e,t){var n=this;setTimeout((function(){t(n[e])}),0)},addTest:function(e,t,n){tests.push({name:e,fn:t,options:n})},addAsyncTest:function(e){tests.push({name:null,fn:e})}},Modernizr=function(){};Modernizr.prototype=ModernizrProto,Modernizr=new Modernizr,Modernizr.addTest("svg",!!document.createElementNS&&!!document.createElementNS("http://www.w3.org/2000/svg","svg").createSVGRect),Modernizr.addTest("json","JSON"in window&&"parse"in JSON&&"stringify"in JSON),Modernizr.addTest("arrow",(function(){try{eval("()=>{}")}catch(e){return!1}return!0})),Modernizr.addTest("fetch","fetch"in window);var docElement=document.documentElement,isSVG="svg"===docElement.nodeName.toLowerCase();Modernizr.addTest("video",(function(){var e=createElement("video"),t=!1;try{(t=!!e.canPlayType)&&((t=new Boolean(t)).ogg=e.canPlayType('video/ogg; codecs="theora"').replace(/^no$/,""),t.h264=e.canPlayType('video/mp4; codecs="avc1.42E01E"').replace(/^no$/,""),t.webm=e.canPlayType('video/webm; codecs="vp8, vorbis"').replace(/^no$/,""),t.vp9=e.canPlayType('video/webm; codecs="vp9"').replace(/^no$/,""),t.hls=e.canPlayType('application/x-mpegURL; codecs="avc1.42E01E"').replace(/^no$/,""))}catch(e){}return t})),Modernizr.addTest("canvas",(function(){var e=createElement("canvas");return!(!e.getContext||!e.getContext("2d"))})),Modernizr.addTest("rgba",(function(){var e=createElement("a").style;return e.cssText="background-color:rgba(150,255,150,.5)",(""+e.backgroundColor).indexOf("rgba")>-1}));var prefixes=ModernizrProto._config.usePrefixes?" -webkit- -moz- -o- -ms- ".split(" "):["",""];ModernizrProto._prefixes=prefixes,Modernizr.addTest("csscalc",(function(){var e="width:",t=createElement("a");return t.style.cssText=e+prefixes.join("calc(10px);"+e),!!t.style.length})),Modernizr.addTest("opacity",(function(){var e=createElement("a").style;return e.cssText=prefixes.join("opacity:.55;"),/^0.55$/.test(e.opacity)}));var newSyntax="CSS"in window&&"supports"in window.CSS,oldSyntax="supportsCSS"in window;Modernizr.addTest("supports",newSyntax||oldSyntax);var testStyles=ModernizrProto.testStyles=injectElementWithStyles,blacklist=(e=navigator.userAgent,t=e.match(/w(eb)?osbrowser/gi),n=e.match(/windows phone/gi)&&e.match(/iemobile\/([0-9])+/gi)&&parseFloat(RegExp.$1)>=9,t||n),e,t,n;blacklist?Modernizr.addTest("fontface",!1):testStyles('@font-face {font-family:"font";src:url("https://")}',(function(e,t){var n=document.getElementById("smodernizr"),r=n.sheet||n.styleSheet,o=r?r.cssRules&&r.cssRules[0]?r.cssRules[0].cssText:r.cssText||"":"",s=/src/i.test(o)&&0===o.indexOf(t.split(" ")[0]);Modernizr.addTest("fontface",s)}));var omPrefixes="Moz O ms Webkit",cssomPrefixes=ModernizrProto._config.usePrefixes?omPrefixes.split(" "):[];ModernizrProto._cssomPrefixes=cssomPrefixes;var domPrefixes=ModernizrProto._config.usePrefixes?omPrefixes.toLowerCase().split(" "):[];ModernizrProto._domPrefixes=domPrefixes;var modElem={elem:createElement("modernizr")};Modernizr._q.push((function(){delete modElem.elem}));var mStyle={style:modElem.elem.style};Modernizr._q.unshift((function(){delete mStyle.style})),ModernizrProto.testAllProps=testPropsAll,ModernizrProto.testAllProps=testAllProps,Modernizr.addTest("borderradius",testAllProps("borderRadius","0px",!0)),Modernizr.addTest("boxshadow",testAllProps("boxShadow","1px 1px",!0)),Modernizr.addTest("boxsizing",testAllProps("boxSizing","border-box",!0)&&(document.documentMode===undefined||document.documentMode>7)),Modernizr.addTest("cssfilters",(function(){if(Modernizr.supports)return testAllProps("filter","blur(2px)");var e=createElement("a");return e.style.cssText=prefixes.join("filter:blur(2px); "),!!e.style.length&&(document.documentMode===undefined||document.documentMode>9)})),Modernizr.addTest("csstransforms",(function(){return-1===navigator.userAgent.indexOf("Android 2.")&&testAllProps("transform","scale(1)",!0)})),testRunner(),setClasses(classes),delete ModernizrProto.addTest,delete ModernizrProto.addAsyncTest;for(var i=0;i<Modernizr._q.length;i++)Modernizr._q[i]();window.Modernizr=Modernizr}(window,document),function(){if(function(){try{for(var e in Modernizr)if("boolean"==typeof Modernizr[e]&&!Modernizr[e])return 1}catch(e){return 1}}()){var e=document.createElement("div");e.appendChild(document.createTextNode("很抱歉,您正在使用一个过时的浏览器。建议升级您的浏览器或使用 ")),e.style.fontSize="22px",e.setAttribute("id","low-ver-browser");var t=document.createElement("a");t.appendChild(document.createTextNode("Edge")),t.setAttribute("href","https://www.microsoft.com/zh-cn/edge"),t.setAttribute("target","_blank"),e.appendChild(t),e.appendChild(document.createTextNode(",")),(t=document.createElement("a")).appendChild(document.createTextNode("Chrome")),t.setAttribute("href","https://www.google.cn/chrome/browser/desktop"),t.setAttribute("target","_blank"),e.appendChild(t),e.appendChild(document.createTextNode(",")),(t=document.createElement("a")).appendChild(document.createTextNode("Firefox")),t.setAttribute("href","https://www.mozilla.org/zh-CN/firefox"),t.setAttribute("target","_blank"),e.appendChild(t),e.appendChild(document.createTextNode(" 等其他现代浏览器,以提高您的体验。")),document.body.innerHTML="",document.body.insertBefore(e),document.body.style.padding="22px"}}();