UNPKG

@zklogic/draw.io

Version:

Draw.IO - Graph Editor integration in Angular-cli

1 lines 3.35 kB
!function(){var t={"cdnjs.cloudflare.com":{api:"https://api.cdnjs.com/libraries/mathjax?fields=version",key:"version",base:"https://cdnjs.cloudflare.com/ajax/libs/mathjax/"},"rawcdn.githack.com":{api:"https://api.github.com/repos/mathjax/mathjax/releases/latest",key:"tag_name",base:"https://rawcdn.githack.com/mathjax/MathJax/"},"gitcdn.xyz":{api:"https://api.github.com/repos/mathjax/mathjax/releases/latest",key:"tag_name",base:"https://gitcdn.xyz/mathjax/MathJax/"},"cdn.statically.io":{api:"https://api.github.com/repos/mathjax/mathjax/releases/latest",key:"tag_name",base:"https://cdn.statically.io/gh/mathjax/MathJax/"},"unpkg.com":{api:"https://api.github.com/repos/mathjax/mathjax/releases/latest",key:"tag_name",base:"https://unpkg.com/mathjax@"},"cdn.jsdelivr.net":{api:"https://api.github.com/repos/mathjax/mathjax/releases/latest",key:"tag_name",base:"https://cdn.jsdelivr.net/npm/mathjax@"}},e={api:"https://api.github.com/repos/mathjax/mathjax/releases",key:"tag_name"},a="mjx-latest-version2",n=null;function r(t){console&&console.error&&console.error("MathJax(latest.js): "+t)}function s(t,e){t.parentNode.removeChild(t);var a=t.src,n=a.replace(/.*?\/latest\.js(\?|$)/,"$1"),r=a.match(/(\d+\.\d+\.\d+)(\/unpacked)?\/latest.js\?/)||["","",""];return{tag:t,src:a,id:t.id,version:r[1],unpacked:r[2]||"",config:n,cdn:e}}function c(e){for(var a=Object.keys(t),n=0,r=a.length;n<r;n++){var c=t[a[n]],i=c.base,o=e.src;if(o&&o.substr(0,i.length)===i&&o.match(/\/latest\.js(\?|$)/))return s(e,c)}return null}function i(t,e){var a=document.createElement("script");a.type="text/javascript",a.async=!0,a.src=t,e&&(a.id=e);var n=document.head||document.getElementsByTagName("head")[0]||document.body;n?n.appendChild(a):r("Can't find the document <head> element")}function o(){n?i(n.src.replace(/\/latest\.js/,"/MathJax.js"),n.id):r("Can't determine the URL for loading MathJax")}function h(t){var e="MathJax.js"+n.config;n.version&&n.version!==t&&(e="latest.js"+n.config),i(n.cdn.base+t+n.unpacked+"/"+e,n.id)}function u(t){return 2===parseInt(t.split(/\./)[0])&&!t.match(/-(beta|rc)/)&&(function(t){try{var e=t+" "+Date.now();localStorage.setItem(a,e)}catch(t){}}(t),h(t),!0)}function l(t,e,a){var n=function(){if(window.XMLHttpRequest)return new XMLHttpRequest;if(window.ActiveXObject){try{return new window.ActiveXObject("Msxml2.XMLHTTP")}catch(t){}try{return new window.ActiveXObject("Microsoft.XMLHTTP")}catch(t){}}}();n?(n.onreadystatechange=function(){4===n.readyState&&(200===n.status?!e(JSON.parse(n.responseText))&&a():(r("Problem acquiring MathJax version: status = "+n.status),a()))},n.open("GET",t.api,!0),n.send(null)):(r("Can't create XMLHttpRequest object"),a())}if((n=function(){if(document.currentScript)return s(document.currentScript);var t=document.getElementById("MathJax-script");if(t&&"script"===t.nodeName.toLowerCase())return c(t);for(var e=document.getElementsByTagName("script"),a=0,n=e.length;a<n;a++){var r=c(e[a]);if(r)return r}return null}())&&n.cdn){var m=function(){try{var t=localStorage.getItem(a).split(/ /),e=t[0],n=t[0];if(n&&Date.now()-parseInt(n)<6048e5)return e}catch(t){}return null}();m?h(m):l(n.cdn,(function(t){return t instanceof Array&&(t=t[0]),u(t[n.cdn.key])||l(e,(function(t){if(t instanceof Array){for(var a=0,n=t.length;a<n;a++)if(u(t[a][e.key]))return!0;return!1}}),o),!0}),o)}else o()}();