mirror of
https://github.com/squidfunk/mkdocs-material.git
synced 2024-06-14 11:52:32 +03:00
1 line
11 KiB
JavaScript
1 line
11 KiB
JavaScript
|
!function(e,t,n){function r(e,t){return typeof e===t}function o(){var e,t,n,o,i,a,s;for(var c in S)if(S.hasOwnProperty(c)){if(e=[],t=S[c],t.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(o=r(t.fn,"function")?t.fn():t.fn,i=0;i<e.length;i++)a=e[i],s=a.split("."),1===s.length?E[s[0]]=o:(!E[s[0]]||E[s[0]]instanceof Boolean||(E[s[0]]=new Boolean(E[s[0]])),E[s[0]][s[1]]=o),x.push((o?"":"no-")+s.join("-"))}}function i(e){var t=C.className,n=E._config.classPrefix||"";if(T&&(t=t.baseVal),E._config.enableJSClass){var r=new RegExp("(^|\\s)"+n+"no-js(\\s|$)");t=t.replace(r,"$1"+n+"js$2")}E._config.enableClasses&&(t+=" "+n+e.join(" "+n),T?C.className.baseVal=t:C.className=t)}function a(e,t){if("object"==typeof e)for(var n in e)w(e,n)&&a(n,e[n]);else{e=e.toLowerCase();var r=e.split("."),o=E[r[0]];if(2==r.length&&(o=o[r[1]]),"undefined"!=typeof o)return E;t="function"==typeof t?t():t,1==r.length?E[r[0]]=t:(!E[r[0]]||E[r[0]]instanceof Boolean||(E[r[0]]=new Boolean(E[r[0]])),E[r[0]][r[1]]=t),i([(t&&0!=t?"":"no-")+r.join("-")]),E._trigger(e,t)}return E}function s(e,t){return function(){return e.apply(t,arguments)}}function c(e,t){return!!~(""+e).indexOf(t)}function l(){return"function"!=typeof t.createElement?t.createElement(arguments[0]):T?t.createElementNS.call(t,"http://www.w3.org/2000/svg",arguments[0]):t.createElement.apply(t,arguments)}function u(){var e=t.body;return e||(e=l(T?"svg":"body"),e.fake=!0),e}function f(e,n,r,o){var i,a,s,c,f="modernizr",d=l("div"),p=u();if(parseInt(r,10))for(;r--;)s=l("div"),s.id=o?o[r]:f+(r+1),d.appendChild(s);return i=l("style"),i.type="text/css",i.id="s"+f,(p.fake?p:d).appendChild(i),p.appendChild(d),i.styleSheet?i.styleSheet.cssText=e:i.appendChild(t.createTextNode(e)),d.id=f,p.fake&&(p.style.background="",p.style.overflow="hidden",c=C.style.overflow,C.style.overflow="hidden",C.appendChild(p)),a=n(d,e),p.fake?(p.parentNode.removeChild(p),C.style.overflow=c,C.offsetHeight):d.parentNode.removeChild(d),!!a}function d(e){return e.replace(/([A-Z])/g,function(e,t){return"-"+t.toLowerCase()}).replace(/^ms-/,"-ms-")}function p(t,r){var o=t.length;if("CSS"in e&&"supports"in e.CSS){for(;o--;)if(e.CSS.supports(d(t[o]),r))return!0;return!1}if("CSSSupportsRule"in e){for(var i=[];o--;)i.push("("+d(t[o])+":"+r+")");return i=i.join(" or "),f("@supports ("+i+") { #modernizr { position: absolute; } }",function(e){return"absolute"==getComputedStyle(e,null).position})}return n}function m(e){return e.replace(/([a-z])-([a-z])/g,function(e,t,n){return t+n.toUpperCase()}).replace(/^-/,"")}function h(e,t,o,i){function a(){u&&(delete N.style,delete N.modElem)}if(i=!r(i,"undefined")&&i,!r(o,"undefined")){var s=p(e,o);if(!r(s,"undefined"))return s}for(var u,f,d,h,v,g=["modernizr","tspan"];!N.style;)u=!0,N.modElem=l(g.shift()),N.style=N.modElem.style;for(d=e.length,f=0;f<d;f++)if(h=e[f],v=N.style[h],c(h,"-")&&(h=m(h)),N.style[h]!==n){if(i||r(o,"undefined"))return a(),"pfx"!=t||h;try{N.style[h]=o}catch(y){}if(N.style[h]!=v)return a(),"pfx"!=t||h}return a(),!1}function v(e,t,n){var o;for(var i in e)if(e[i]in t)return n===!1?e[i]:(o=t[e[i]],r(o,"function")?s(o,n||t):o);return!1}function g(e,t,n,o,i){var a=e.charAt(0).toUpperCase()+e.slice(1),s=(e+" "+A.join(a+" ")+a).split(" ");return r(t,"string")||r(t,"undefined")?h(s,t,o,i):(s=(e+" "+P.join(a+" ")+a).split(" "),v(s,t,n))}function y(e,t,r){return g(e,n,n,t,r)}var S=[],b={_version:"3.3.1",_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){S.push({name:e,fn:t,options:n})},addAsyncTest:function(e){S.push({name:null,fn:e})}},E=function(){};E.prototype=b,E=new E;var w,x=[],C=t.documentElement,T="svg"===C.nodeName.toLowerCase();!function(){var e={}.hasOwnProperty;w=r(e,"undefined")||r(e.call,"undefined")?function(e,t){return t in e&&r(e.constructor.prototype[t],"undefined")}:function(t,n){return e.call(t,n)}}(),b._l={},b.on=function(e,t){thi
|