@zklogic/draw.io
Version:
Draw.IO - Graph Editor integration in Angular-cli
1 lines • 14.1 kB
JavaScript
!function(e,t){var r,a=function(e){return MathJax.Localization._.apply(MathJax.Localization,[["MathML",e]].concat([].slice.call(arguments,1)))};e.Parse=MathJax.Object.Subclass({Init:function(e,t){this.Parse(e,t)},Parse:function(t,r){var a;"string"!=typeof t?a=t.parentNode:null==(a=e.ParseXML(this.preProcessMath.call(this,t)))&&e.Error(["ErrorParsingMathML","Error parsing MathML"]);var i=a.getElementsByTagName("parsererror")[0];if(i&&e.Error(["ParsingError","Error parsing MathML: %1",i.textContent.replace(/This page.*?errors:|XML Parsing Error: |Below is a rendering of the page.*/g,"")]),1!==a.childNodes.length&&e.Error(["MathMLSingleElement","MathML must be formed by a single element"]),"html"===a.firstChild.nodeName.toLowerCase()){var o=a.getElementsByTagName("h1")[0];o&&"XML parsing error"===o.textContent&&o.nextSibling&&e.Error(["ParsingError","Error parsing MathML: %1",String(o.nextSibling.nodeValue).replace(/fatal parsing error: /,"")])}"math"!==a.firstChild.nodeName.toLowerCase().replace(/^[a-z]+:/,"")&&e.Error(["MathMLRootElement","MathML must be formed by a <math> element, not %1","<"+a.firstChild.nodeName+">"]);var n={math:a.firstChild,script:r};e.DOMfilterHooks.Execute(n),this.mml=this.MakeMML(n.math)},MakeMML:function(t){var i,o=String(t.getAttribute("class")||""),n=t.nodeName.toLowerCase().replace(/^[a-z]+:/,""),s=o.match(/(^| )MJX-TeXAtom-([^ ]*)/);if(s)i=this.TeXAtom(s[2],"OP"===s[2]&&!o.match(/MJX-fixedlimits/));else{if(!(r[n]&&r[n].isa&&r[n].isa(r.mbase)))return MathJax.Hub.signal.Post(["MathML Jax - unknown node type",n]),r.Error(a("UnknownNodeType","Unknown node type: %1",n));i=r[n]()}return this.AddAttributes(i,t),this.CheckClass(i,i.class),this.AddChildren(i,t),e.config.useMathMLspacing&&(i.useMMLspacing=8),i},TeXAtom:function(e,t){var a=r.TeXAtom().With({texClass:r.TEXCLASS[e]});return t&&(a.movesupsub=a.movablelimits=!0),a},CheckClass:function(e,t){for(var a=[],i=0,o=(t=(t||"").split(/ /)).length;i<o;i++)"MJX-"===t[i].substr(0,4)?"MJX-arrow"===t[i]?e.notation.match("/"+r.NOTATION.UPDIAGONALARROW+"/")||(e.notation+=" "+r.NOTATION.UPDIAGONALARROW):"MJX-variant"===t[i]?(e.variantForm=!0,MathJax.Extension["TeX/AMSsymbols"]||MathJax.Hub.RestartAfter(MathJax.Ajax.Require("[MathJax]/extensions/TeX/AMSsymbols.js"))):"MJX-TeXAtom"!==t[i].substr(0,11)&&(e.mathvariant=t[i].substr(3),"-tex-caligraphic-bold"!==e.mathvariant&&"-tex-oldstyle-bold"!==e.mathvariant||MathJax.Extension["TeX/boldsymbol"]||MathJax.Hub.RestartAfter(MathJax.Ajax.Require("[MathJax]/extensions/TeX/boldsymbol.js"))):a.push(t[i]);a.length?e.class=a.join(" "):delete e.class},AddAttributes:function(e,t){e.attr={},e.attrNames=[];for(var a=0,i=t.attributes.length;a<i;a++){var o=t.attributes[a].name;if("xlink:href"==o&&(o="href"),!o.match(/:/)&&!o.match(/^_moz-math-((column|row)(align|line)|font-style)$/)){var n=t.attributes[a].value;n=this.filterAttribute(o,n);var s="mstyle"===e.type?r.math.prototype.defaults:e.defaults;if(null!=n){var l=n.toLowerCase();"true"!==l&&"false"!==l||"boolean"!=typeof s[o]&&s[o]!==r.INHERIT&&"math"!==e.type&&"mstyle"!==e.type&&(s[o]!==r.AUTO||null!=e.defaultDef&&"boolean"!=typeof e.defaultDef[o])||(n="true"===l),null!=s[o]||r.copyAttributes[o]?e[o]=n:e.attr[o]=n,e.attrNames.push(o)}}}},filterAttribute:function(e,t){return t},AddChildren:function(t,a){for(var i=0,o=a.childNodes.length;i<o;i++){var n=a.childNodes[i];if("#comment"!==n.nodeName)if("#text"===n.nodeName)if(!t.isToken&&!t.isChars||t.mmlSelfClosing)n.nodeValue.match(/\S/)&&e.Error(["UnexpectedTextNode","Unexpected text node: %1","'"+n.nodeValue+"'"]);else{var s=n.nodeValue;t.isToken&&(s=s.replace(/&([a-z][a-z0-9]*);/gi,this.replaceEntity),s=this.trimSpace(s)),t.Append(r.chars(s))}else if("annotation-xml"===t.type)t.Append(r.xml(n));else{var l=this.MakeMML(n);t.Append(l),l.mmlSelfClosing&&l.data.length&&(t.Append.apply(t,l.data),l.data=[])}}if("mrow"===t.type&&t.data.length>=2){var h=t.data[0],c=t.data[t.data.length-1];"mo"===h.type&&h.Get("fence")&&"mo"===c.type&&c.Get("fence")&&(h.data[0]&&(t.open=h.data.join("")),c.data[0]&&(t.close=c.data.join("")))}},preProcessMath:function(e){e.match(/^<[a-z]+:/i)&&!e.match(/^<[^<>]* xmlns:/)&&(e=e.replace(/^<([a-z]+)(:math)/i,'<$1$2 xmlns:$1="http://www.w3.org/1998/Math/MathML"'));var t=e.match(/^(<math( ('.*?'|".*?"|[^>])+)>)/i);return t&&t[2].match(/ (?!xmlns=)[a-z]+=\"http:/i)&&(e=t[1].replace(/ (?!xmlns=)([a-z]+=(['"])http:.*?\2)/gi," xmlns:$1 $1")+e.substr(t[0].length)),e.match(/^<math[ >]/i)&&!e.match(/^<[^<>]* xmlns=/)&&(e=e.replace(/^<(math)/i,'<math xmlns="http://www.w3.org/1998/Math/MathML"')),(e=e.replace(/^\s*(?:\/\/)?<!(--)?\[CDATA\[((.|\n)*)(\/\/)?\]\]\1>\s*$/,"$2")).replace(/&([a-z][a-z0-9]*);/gi,this.replaceEntity)},trimSpace:function(e){return e.replace(/[\t\n\r]/g," ").replace(/^ +/,"").replace(/ +$/,"").replace(/ +/g," ")},replaceEntity:function(t,r){if(r.match(/^(lt|amp|quot)$/))return t;if(e.Parse.Entity[r])return e.Parse.Entity[r];var a=r.charAt(0).toLowerCase(),i=r.match(/^[a-zA-Z](fr|scr|opf)$/);return i&&(a=i[1]),e.Parse.loaded[a]||(e.Parse.loaded[a]=!0,MathJax.Hub.RestartAfter(MathJax.Ajax.Require(e.entityDir+"/"+a+".js"))),t}},{loaded:[]}),e.Augment({sourceMenuTitle:["OriginalMathML","Original MathML"],prefilterHooks:MathJax.Callback.Hooks(!0),DOMfilterHooks:MathJax.Callback.Hooks(!0),postfilterHooks:MathJax.Callback.Hooks(!0),Translate:function(a){this.ParseXML||(this.ParseXML=this.createParser());var i,o,n={script:a};a.firstChild&&"math"===a.firstChild.nodeName.toLowerCase().replace(/^[a-z]+:/,"")?n.math=a.firstChild:(o=MathJax.HTML.getScript(a),t.isMSIE&&(o=o.replace(/( )+$/,"")),n.math=o);var s=this.prefilterHooks.Execute(n);if(s)return s;o=n.math;try{i=e.Parse(o,a).mml}catch(e){if(!e.mathmlError)throw e;i=this.formatError(e,o,a)}return n.math=r(i),this.postfilterHooks.Execute(n)||n.math},prefilterMath:function(e,t){return e},prefilterMathML:function(e,t){return e},formatError:function(e,t,a){var i=e.message.replace(/\n.*/,"");return MathJax.Hub.signal.Post(["MathML Jax - parse error",i,t,a]),r.Error(i)},Error:function(e){throw MathJax.Object.isArray(e)&&(e=a.apply(a,e)),MathJax.Hub.Insert(Error(e),{mathmlError:!0})},parseDOM:function(e){return this.parser.parseFromString(e,"text/xml")},parseMS:function(e){return this.parser.loadXML(e)?this.parser:null},parseDIV:function(e){this.div.innerHTML="<div>"+e.replace(/<([a-z]+)([^>]*)\/>/g,"<$1$2></$1>")+"</div>";var t=this.div.firstChild;return this.div.innerHTML="",t},parseError:function(e){return null},createMSParser:function(){for(var e=null,t=["MSXML2.DOMDocument.6.0","MSXML2.DOMDocument.5.0","MSXML2.DOMDocument.4.0","MSXML2.DOMDocument.3.0","MSXML2.DOMDocument.2.0","Microsoft.XMLDOM"],r=0,a=t.length;r<a&&!e;r++)try{e=new ActiveXObject(t[r])}catch(e){}return e},createParser:function(){return window.DOMParser?(this.parser=new DOMParser,this.parseDOM):window.ActiveXObject?(this.parser=this.createMSParser(),this.parser?(this.parser.async=!1,this.parseMS):(MathJax.Localization.Try(this.parserCreationError),this.parseError)):(this.div=MathJax.Hub.Insert(document.createElement("div"),{style:{visibility:"hidden",overflow:"hidden",height:"1px",position:"absolute",top:0}}),document.body.firstChild?document.body.insertBefore(this.div,document.body.firstChild):document.body.appendChild(this.div),this.parseDIV)},parserCreationError:function(){alert(a("CantCreateXMLParser","MathJax can't create an XML parser for MathML. Check that\nthe 'Script ActiveX controls marked safe for scripting' security\nsetting is enabled (use the Internet Options item in the Tools\nmenu, and select the Security panel, then press the Custom Level\nbutton to check this).\n\nMathML equations will not be able to be processed by MathJax."))},Startup:function(){(r=MathJax.ElementJax.mml).mspace.Augment({mmlSelfClosing:!0}),r.none.Augment({mmlSelfClosing:!0}),r.mprescripts.Augment({mmlSelfClosing:!0}),r.maligngroup.Augment({mmlSelfClosing:!0}),r.malignmark.Augment({mmlSelfClosing:!0})}}),e.prefilterHooks.Add((function(t){t.math="string"==typeof t.math?e.prefilterMath(t.math,t.script):e.prefilterMathML(t.math,t.script)})),e.Parse.Entity={ApplyFunction:"",Backslash:"∖",Because:"∵",Breve:"˘",Cap:"⋒",CenterDot:"·",CircleDot:"⊙",CircleMinus:"⊖",CirclePlus:"⊕",CircleTimes:"⊗",Congruent:"≡",ContourIntegral:"∮",Coproduct:"∐",Cross:"⨯",Cup:"⋓",CupCap:"≍",Dagger:"‡",Del:"∇",Delta:"Δ",Diamond:"⋄",DifferentialD:"ⅆ",DotEqual:"≐",DoubleDot:"¨",DoubleRightTee:"⊨",DoubleVerticalBar:"∥",DownArrow:"↓",DownLeftVector:"↽",DownRightVector:"⇁",DownTee:"⊤",Downarrow:"⇓",Element:"∈",EqualTilde:"≂",Equilibrium:"⇌",Exists:"∃",ExponentialE:"ⅇ",FilledVerySmallSquare:"▪",ForAll:"∀",Gamma:"Γ",Gg:"⋙",GreaterEqual:"≥",GreaterEqualLess:"⋛",GreaterFullEqual:"≧",GreaterLess:"≷",GreaterSlantEqual:"⩾",GreaterTilde:"≳",Hacek:"ˇ",Hat:"^",HumpDownHump:"≎",HumpEqual:"≏",Im:"ℑ",ImaginaryI:"ⅈ",Integral:"∫",Intersection:"⋂",InvisibleComma:"",InvisibleTimes:"",Lambda:"Λ",Larr:"↞",LeftAngleBracket:"⟨",LeftArrow:"←",LeftArrowRightArrow:"⇆",LeftCeiling:"⌈",LeftDownVector:"⇃",LeftFloor:"⌊",LeftRightArrow:"↔",LeftTee:"⊣",LeftTriangle:"⊲",LeftTriangleEqual:"⊴",LeftUpVector:"↿",LeftVector:"↼",Leftarrow:"⇐",Leftrightarrow:"⇔",LessEqualGreater:"⋚",LessFullEqual:"≦",LessGreater:"≶",LessSlantEqual:"⩽",LessTilde:"≲",Ll:"⋘",Lleftarrow:"⇚",LongLeftArrow:"⟵",LongLeftRightArrow:"⟷",LongRightArrow:"⟶",Longleftarrow:"⟸",Longleftrightarrow:"⟺",Longrightarrow:"⟹",Lsh:"↰",MinusPlus:"∓",NestedGreaterGreater:"≫",NestedLessLess:"≪",NotDoubleVerticalBar:"∦",NotElement:"∉",NotEqual:"≠",NotExists:"∄",NotGreater:"≯",NotGreaterEqual:"≱",NotLeftTriangle:"⋪",NotLeftTriangleEqual:"⋬",NotLess:"≮",NotLessEqual:"≰",NotPrecedes:"⊀",NotPrecedesSlantEqual:"⋠",NotRightTriangle:"⋫",NotRightTriangleEqual:"⋭",NotSubsetEqual:"⊈",NotSucceeds:"⊁",NotSucceedsSlantEqual:"⋡",NotSupersetEqual:"⊉",NotTilde:"≁",NotVerticalBar:"∤",Omega:"Ω",OverBar:"‾",OverBrace:"⏞",PartialD:"∂",Phi:"Φ",Pi:"Π",PlusMinus:"±",Precedes:"≺",PrecedesEqual:"⪯",PrecedesSlantEqual:"≼",PrecedesTilde:"≾",Product:"∏",Proportional:"∝",Psi:"Ψ",Rarr:"↠",Re:"ℜ",ReverseEquilibrium:"⇋",RightAngleBracket:"⟩",RightArrow:"→",RightArrowLeftArrow:"⇄",RightCeiling:"⌉",RightDownVector:"⇂",RightFloor:"⌋",RightTee:"⊢",RightTeeArrow:"↦",RightTriangle:"⊳",RightTriangleEqual:"⊵",RightUpVector:"↾",RightVector:"⇀",Rightarrow:"⇒",Rrightarrow:"⇛",Rsh:"↱",Sigma:"Σ",SmallCircle:"∘",Sqrt:"√",Square:"□",SquareIntersection:"⊓",SquareSubset:"⊏",SquareSubsetEqual:"⊑",SquareSuperset:"⊐",SquareSupersetEqual:"⊒",SquareUnion:"⊔",Star:"⋆",Subset:"⋐",SubsetEqual:"⊆",Succeeds:"≻",SucceedsEqual:"⪰",SucceedsSlantEqual:"≽",SucceedsTilde:"≿",SuchThat:"∋",Sum:"∑",Superset:"⊃",SupersetEqual:"⊇",Supset:"⋑",Therefore:"∴",Theta:"Θ",Tilde:"∼",TildeEqual:"≃",TildeFullEqual:"≅",TildeTilde:"≈",UnderBar:"_",UnderBrace:"⏟",Union:"⋃",UnionPlus:"⊎",UpArrow:"↑",UpDownArrow:"↕",UpTee:"⊥",Uparrow:"⇑",Updownarrow:"⇕",Upsilon:"Υ",Vdash:"⊩",Vee:"⋁",VerticalBar:"∣",VerticalTilde:"≀",Vvdash:"⊪",Wedge:"⋀",Xi:"Ξ",acute:"´",aleph:"ℵ",alpha:"α",amalg:"⨿",and:"∧",ang:"∠",angmsd:"∡",angsph:"∢",ape:"≊",backprime:"‵",backsim:"∽",backsimeq:"⋍",beta:"β",beth:"ℶ",between:"≬",bigcirc:"◯",bigodot:"⨀",bigoplus:"⨁",bigotimes:"⨂",bigsqcup:"⨆",bigstar:"★",bigtriangledown:"▽",bigtriangleup:"△",biguplus:"⨄",blacklozenge:"⧫",blacktriangle:"▴",blacktriangledown:"▾",blacktriangleleft:"◂",bowtie:"⋈",boxdl:"┐",boxdr:"┌",boxminus:"⊟",boxplus:"⊞",boxtimes:"⊠",boxul:"┘",boxur:"└",bsol:"\\",bull:"•",cap:"∩",check:"✓",chi:"χ",circ:"ˆ",circeq:"≗",circlearrowleft:"↺",circlearrowright:"↻",circledR:"®",circledS:"Ⓢ",circledast:"⊛",circledcirc:"⊚",circleddash:"⊝",clubs:"♣",colon:":",comp:"∁",ctdot:"⋯",cuepr:"⋞",cuesc:"⋟",cularr:"↶",cup:"∪",curarr:"↷",curlyvee:"⋎",curlywedge:"⋏",dagger:"†",daleth:"ℸ",ddarr:"⇊",deg:"°",delta:"δ",digamma:"ϝ",div:"÷",divideontimes:"⋇",dot:"˙",doteqdot:"≑",dotplus:"∔",dotsquare:"⊡",dtdot:"⋱",ecir:"≖",efDot:"≒",egs:"⪖",ell:"ℓ",els:"⪕",empty:"∅",epsi:"ε",epsiv:"ϵ",erDot:"≓",eta:"η",eth:"ð",flat:"♭",fork:"⋔",frown:"⌢",gEl:"⪌",gamma:"γ",gap:"⪆",gimel:"ℷ",gnE:"≩",gnap:"⪊",gne:"⪈",gnsim:"⋧",gt:">",gtdot:"⋗",harrw:"↭",hbar:"ℏ",hellip:"…",hookleftarrow:"↩",hookrightarrow:"↪",imath:"ı",infin:"∞",intcal:"⊺",iota:"ι",jmath:"ȷ",kappa:"κ",kappav:"ϰ",lEg:"⪋",lambda:"λ",lap:"⪅",larrlp:"↫",larrtl:"↢",lbrace:"{",lbrack:"[",le:"≤",leftleftarrows:"⇇",leftthreetimes:"⋋",lessdot:"⋖",lmoust:"⎰",lnE:"≨",lnap:"⪉",lne:"⪇",lnsim:"⋦",longmapsto:"⟼",looparrowright:"↬",lowast:"∗",loz:"◊",lt:"<",ltimes:"⋉",ltri:"◃",macr:"¯",malt:"✠",mho:"℧",mu:"μ",multimap:"⊸",nLeftarrow:"⇍",nLeftrightarrow:"⇎",nRightarrow:"⇏",nVDash:"⊯",nVdash:"⊮",natur:"♮",nearr:"↗",nharr:"↮",nlarr:"↚",not:"¬",nrarr:"↛",nu:"ν",nvDash:"⊭",nvdash:"⊬",nwarr:"↖",omega:"ω",omicron:"ο",or:"∨",osol:"⊘",period:".",phi:"φ",phiv:"ϕ",pi:"π",piv:"ϖ",prap:"⪷",precnapprox:"⪹",precneqq:"⪵",precnsim:"⋨",prime:"′",psi:"ψ",rarrtl:"↣",rbrace:"}",rbrack:"]",rho:"ρ",rhov:"ϱ",rightrightarrows:"⇉",rightthreetimes:"⋌",ring:"˚",rmoust:"⎱",rtimes:"⋊",rtri:"▹",scap:"⪸",scnE:"⪶",scnap:"⪺",scnsim:"⋩",sdot:"⋅",searr:"↘",sect:"§",sharp:"♯",sigma:"σ",sigmav:"ς",simne:"≆",smile:"⌣",spades:"♠",sub:"⊂",subE:"⫅",subnE:"⫋",subne:"⊊",supE:"⫆",supnE:"⫌",supne:"⊋",swarr:"↙",tau:"τ",theta:"θ",thetav:"ϑ",tilde:"˜",times:"×",triangle:"▵",triangleq:"≜",upsi:"υ",upuparrows:"⇈",veebar:"⊻",vellip:"⋮",weierp:"℘",xi:"ξ",yen:"¥",zeta:"ζ",zigrarr:"⇝"},e.loadComplete("jax.js")}(MathJax.InputJax.MathML,MathJax.Hub.Browser);