(function(){var a=void 0,b=!0,c=null,d=!1,e=["aliceblue antiquewhite aqua aquamarine azure beige bisque black blanchedalmond blue blueviolet brown burlywood cadetblue chartreuse chocolate coral cornflowerblue cornsilk crimson cyan darkblue darkcyan darkgoldenrod darkgray darkgreen darkkhaki darkmagenta darkolivegreen darkorange darkorchid darkred darksalmon darkseagreen darkslateblue darkslategray darkturquoise darkviolet deeppink deepskyblue dimgray dodgerblue firebrick floralwhite forestgreen fuchsia gainsboro ghostwhite gold goldenrod gray green greenyellow honeydew hotpink indianred indigo ivory khaki lavender lavenderblush lawngreen lemonchiffon lightblue lightcoral lightcyan lightgoldenrodyellow lightgreen lightgrey lightpink lightsalmon lightseagreen lightskyblue lightslategray lightsteelblue lightyellow lime limegreen linen magenta maroon mediumaquamarine mediumblue mediumorchid mediumpurple mediumseagreen mediumslateblue mediumspringgreen mediumturquoise mediumvioletred midnightblue mintcream mistyrose moccasin navajowhite navy oldlace olive olivedrab orange orangered orchid palegoldenrod palegreen paleturquoise palevioletred papayawhip peachpuff peru pink plum powderblue purple red rosybrown royalblue saddlebrown salmon sandybrown seagreen seashell sienna silver skyblue slateblue slategray snow springgreen steelblue tan teal thistle tomato transparent turquoise violet wheat white whitesmoke yellow yellowgreen".split(" "), "all-scroll col-resize crosshair default e-resize hand help move n-resize ne-resize no-drop not-allowed nw-resize pointer progress row-resize s-resize se-resize sw-resize text vertical-text w-resize wait".split(" "),"armenian decimal decimal-leading-zero disc georgian lower-alpha lower-greek lower-latin lower-roman square upper-alpha upper-latin upper-roman".split(" "),"100 200 300 400 500 600 700 800 900 bold bolder lighter".split(" "),"block-level inline-level table-caption table-cell table-column table-column-group table-footer-group table-header-group table-row table-row-group".split(" "), "condensed expanded extra-condensed extra-expanded narrower semi-condensed semi-expanded ultra-condensed ultra-expanded wider".split(" "),"inherit inline inline-block inline-box inline-flex inline-grid inline-list-item inline-stack inline-table run-in".split(" "),"behind center-left center-right far-left far-right left-side leftwards right-side rightwards".split(" "),"large larger small smaller x-large x-small xx-large xx-small".split(" "),"dashed dotted double groove outset ridge solid".split(" "), "ease ease-in ease-in-out ease-out linear step-end step-start".split(" "),"at closest-corner closest-side ellipse farthest-corner farthest-side".split(" "),"baseline middle sub super text-bottom text-top".split(" "),"caption icon menu message-box small-caption status-bar".split(" "),"fast faster slow slower x-fast x-slow".split(" "),["above","below","higher","level","lower"],["cursive","fantasy","monospace","sans-serif","serif"],["loud","silent","soft","x-loud","x-soft"],["no-repeat","repeat-x","repeat-y", "round","space"],["blink","line-through","overline","underline"],["block","flex","grid","table"],["high","low","x-high","x-low"],["nowrap","pre","pre-line","pre-wrap"],["absolute","relative","static"],["alternate","alternate-reverse","reverse"],["border-box","content-box","padding-box"],["capitalize","lowercase","uppercase"],["child","female","male"],["\x3d","opacity"],["backwards","forwards"],["bidi-override","embed"],["bottom","top"],["break-all","keep-all"],["clip","ellipsis"],["contain","cover"], ["continuous","digits"],["end","start"],["flat","preserve-3d"],["hide","show"],["horizontal","vertical"],["inside","outside"],["italic","oblique"],["left","right"],["ltr","rtl"],["no-content","no-display"],["paused","running"],["suppress","unrestricted"],["thick","thin"],[","],["/"],["all"],["always"],["auto"],["avoid"],["both"],["break-word"],["center"],["circle"],["code"],["collapse"],["contents"],["fixed"],["hidden"],["infinite"],["inset"],["invert"],["justify"],["list-item"],["local"],["medium"], ["mix"],["none"],["normal"],["once"],["repeat"],["scroll"],["separate"],["small-caps"],["spell-out"],["to"],["visible"]],f={animation:{cssPropBits:517,cssLitGroup:[e[10],e[24],e[29],e[45],e[48],e[54],e[63],e[71],e[72]],cssFns:["cubic-bezier()","steps()"]},"animation-delay":{cssPropBits:5,cssLitGroup:[e[48]],cssFns:[]},"animation-direction":{cssPropBits:0,cssLitGroup:[e[24],e[48],e[72]],cssFns:[]},"animation-duration":"animation-delay","animation-fill-mode":{cssPropBits:0,cssLitGroup:[e[29],e[48], e[54],e[71]],cssFns:[]},"animation-iteration-count":{cssPropBits:5,cssLitGroup:[e[48],e[63]],cssFns:[]},"animation-name":{cssPropBits:512,cssLitGroup:[e[48],e[71]],cssFns:[]},"animation-play-state":{cssPropBits:0,cssLitGroup:[e[45],e[48]],cssFns:[]},"animation-timing-function":{cssPropBits:0,cssLitGroup:[e[10],e[48]],cssFns:["cubic-bezier()","steps()"]},appearance:{cssPropBits:0,cssLitGroup:[e[71]],cssFns:[]},azimuth:{cssPropBits:5,cssLitGroup:[e[7],e[42],e[56]],cssFns:[]},"backface-visibility":{cssPropBits:0, cssLitGroup:[e[59],e[62],e[80]],cssFns:[]},background:{cssPropBits:23,cssLitGroup:[e[0],e[18],e[25],e[31],e[34],e[42],e[48],e[49],e[52],e[56],e[61],e[68],e[71],e[74],e[75]],cssFns:"image() linear-gradient() radial-gradient() repeating-linear-gradient() repeating-radial-gradient() rgb() rgba()".split(" ")},"background-attachment":{cssPropBits:0,cssLitGroup:[e[48],e[61],e[68],e[75]],cssFns:[]},"background-color":{cssPropBits:2,cssLitGroup:[e[0]],cssFns:["rgb()","rgba()"]},"background-image":{cssPropBits:16, cssLitGroup:[e[48],e[71]],cssFns:["image()","linear-gradient()","radial-gradient()","repeating-linear-gradient()","repeating-radial-gradient()"]},"background-position":{cssPropBits:5,cssLitGroup:[e[31],e[42],e[48],e[56]],cssFns:[]},"background-repeat":{cssPropBits:0,cssLitGroup:[e[18],e[48],e[74]],cssFns:[]},"background-size":{cssPropBits:5,cssLitGroup:[e[34],e[48],e[52]],cssFns:[]},border:{cssPropBits:7,cssLitGroup:[e[0],e[9],e[47],e[62],e[64],e[69],e[71]],cssFns:["rgb()","rgba()"]},"border-bottom":"border", "border-bottom-color":"background-color","border-bottom-left-radius":{cssPropBits:5,cssFns:[]},"border-bottom-right-radius":"border-bottom-left-radius","border-bottom-style":{cssPropBits:0,cssLitGroup:[e[9],e[62],e[64],e[71]],cssFns:[]},"border-bottom-width":{cssPropBits:5,cssLitGroup:[e[47],e[69]],cssFns:[]},"border-collapse":{cssPropBits:0,cssLitGroup:[e[59],e[76]],cssFns:[]},"border-color":"background-color","border-left":"border","border-left-color":"background-color","border-left-style":"border-bottom-style", "border-left-width":"border-bottom-width","border-radius":{cssPropBits:5,cssLitGroup:[e[49]],cssFns:[]},"border-right":"border","border-right-color":"background-color","border-right-style":"border-bottom-style","border-right-width":"border-bottom-width","border-spacing":"border-bottom-left-radius","border-style":"border-bottom-style","border-top":"border","border-top-color":"background-color","border-top-left-radius":"border-bottom-left-radius","border-top-right-radius":"border-bottom-left-radius", "border-top-style":"border-bottom-style","border-top-width":"border-bottom-width","border-width":"border-bottom-width",bottom:{cssPropBits:5,cssLitGroup:[e[52]],cssFns:[]},box:{cssPropBits:0,cssLitGroup:[e[60],e[71],e[72]],cssFns:[]},"box-shadow":{cssPropBits:7,cssLitGroup:[e[0],e[48],e[64],e[71]],cssFns:["rgb()","rgba()"]},"box-sizing":{cssPropBits:0,cssLitGroup:[e[25]],cssFns:[]},"caption-side":{cssPropBits:0,cssLitGroup:[e[31]],cssFns:[]},clear:{cssPropBits:0,cssLitGroup:[e[42],e[54],e[71]],cssFns:[]}, clip:{cssPropBits:0,cssLitGroup:[e[52]],cssFns:["rect()"]},color:"background-color",content:{cssPropBits:8,cssLitGroup:[e[71],e[72]],cssFns:[]},cue:{cssPropBits:16,cssLitGroup:[e[71]],cssFns:[]},"cue-after":"cue","cue-before":"cue",cursor:{cssPropBits:16,cssLitGroup:[e[1],e[48],e[52]],cssFns:[]},direction:{cssPropBits:0,cssLitGroup:[e[43]],cssFns:[]},display:{cssPropBits:0,cssLitGroup:[e[4],e[6],e[20],e[52],e[67],e[71]],cssFns:[]},"display-extras":{cssPropBits:0,cssLitGroup:[e[67],e[71]],cssFns:[]}, "display-inside":{cssPropBits:0,cssLitGroup:[e[20],e[52]],cssFns:[]},"display-outside":{cssPropBits:0,cssLitGroup:[e[4],e[71]],cssFns:[]},elevation:{cssPropBits:5,cssLitGroup:[e[15]],cssFns:[]},"empty-cells":{cssPropBits:0,cssLitGroup:[e[38]],cssFns:[]},filter:{cssPropBits:0,cssFns:["alpha()"]},"float":{cssPropBits:0,cssLitGroup:[e[42],e[71]],cssFns:[]},font:{cssPropBits:73,cssLitGroup:[e[3],e[8],e[13],e[16],e[41],e[48],e[49],e[69],e[72],e[77]],cssFns:[]},"font-family":{cssPropBits:72,cssLitGroup:[e[16], e[48]],cssFns:[]},"font-size":{cssPropBits:1,cssLitGroup:[e[8],e[69]],cssFns:[]},"font-stretch":{cssPropBits:0,cssLitGroup:[e[5],e[72]],cssFns:[]},"font-style":{cssPropBits:0,cssLitGroup:[e[41],e[72]],cssFns:[]},"font-variant":{cssPropBits:0,cssLitGroup:[e[72],e[77]],cssFns:[]},"font-weight":{cssPropBits:0,cssLitGroup:[e[3],e[72]],cssFns:[]},height:"bottom",left:"bottom","letter-spacing":{cssPropBits:5,cssLitGroup:[e[72]],cssFns:[]},"line-height":{cssPropBits:1,cssLitGroup:[e[72]],cssFns:[]},"list-style":{cssPropBits:16, cssLitGroup:[e[2],e[40],e[57],e[71]],cssFns:["image()","linear-gradient()","radial-gradient()","repeating-linear-gradient()","repeating-radial-gradient()"]},"list-style-image":{cssPropBits:16,cssLitGroup:[e[71]],cssFns:["image()","linear-gradient()","radial-gradient()","repeating-linear-gradient()","repeating-radial-gradient()"]},"list-style-position":{cssPropBits:0,cssLitGroup:[e[40]],cssFns:[]},"list-style-type":{cssPropBits:0,cssLitGroup:[e[2],e[57],e[71]],cssFns:[]},margin:"bottom","margin-bottom":"bottom", "margin-left":"bottom","margin-right":"bottom","margin-top":"bottom","max-height":{cssPropBits:1,cssLitGroup:[e[52],e[71]],cssFns:[]},"max-width":"max-height","min-height":{cssPropBits:1,cssLitGroup:[e[52]],cssFns:[]},"min-width":"min-height",opacity:{cssPropBits:1,cssFns:[]},outline:{cssPropBits:7,cssLitGroup:[e[0],e[9],e[47],e[62],e[64],e[65],e[69],e[71]],cssFns:["rgb()","rgba()"]},"outline-color":{cssPropBits:2,cssLitGroup:[e[0],e[65]],cssFns:["rgb()","rgba()"]},"outline-style":"border-bottom-style", "outline-width":"border-bottom-width",overflow:{cssPropBits:0,cssLitGroup:[e[52],e[62],e[75],e[80]],cssFns:[]},"overflow-wrap":{cssPropBits:0,cssLitGroup:[e[55],e[72]],cssFns:[]},"overflow-x":{cssPropBits:0,cssLitGroup:[e[44],e[52],e[62],e[75],e[80]],cssFns:[]},"overflow-y":"overflow-x",padding:"opacity","padding-bottom":"opacity","padding-left":"opacity","padding-right":"opacity","padding-top":"opacity","page-break-after":{cssPropBits:0,cssLitGroup:[e[42],e[51],e[52],e[53]],cssFns:[]},"page-break-before":"page-break-after", "page-break-inside":{cssPropBits:0,cssLitGroup:[e[52],e[53]],cssFns:[]},pause:"border-bottom-left-radius","pause-after":"border-bottom-left-radius","pause-before":"border-bottom-left-radius",perspective:{cssPropBits:5,cssLitGroup:[e[71]],cssFns:[]},"perspective-origin":{cssPropBits:5,cssLitGroup:[e[31],e[42],e[56]],cssFns:[]},pitch:{cssPropBits:5,cssLitGroup:[e[21],e[69]],cssFns:[]},"pitch-range":"border-bottom-left-radius","play-during":{cssPropBits:16,cssLitGroup:[e[52],e[70],e[71],e[74]],cssFns:[]}, position:{cssPropBits:0,cssLitGroup:[e[23]],cssFns:[]},quotes:{cssPropBits:8,cssLitGroup:[e[71]],cssFns:[]},resize:{cssPropBits:0,cssLitGroup:[e[39],e[54],e[71]],cssFns:[]},richness:"border-bottom-left-radius",right:"bottom",speak:{cssPropBits:0,cssLitGroup:[e[71],e[72],e[78]],cssFns:[]},"speak-header":{cssPropBits:0,cssLitGroup:[e[51],e[73]],cssFns:[]},"speak-numeral":{cssPropBits:0,cssLitGroup:[e[35]],cssFns:[]},"speak-punctuation":{cssPropBits:0,cssLitGroup:[e[58],e[71]],cssFns:[]},"speech-rate":{cssPropBits:5, cssLitGroup:[e[14],e[69]],cssFns:[]},stress:"border-bottom-left-radius","table-layout":{cssPropBits:0,cssLitGroup:[e[52],e[61]],cssFns:[]},"text-align":{cssPropBits:0,cssLitGroup:[e[42],e[56],e[66]],cssFns:[]},"text-decoration":{cssPropBits:0,cssLitGroup:[e[19],e[71]],cssFns:[]},"text-indent":"border-bottom-left-radius","text-overflow":{cssPropBits:8,cssLitGroup:[e[33]],cssFns:[]},"text-shadow":"box-shadow","text-transform":{cssPropBits:0,cssLitGroup:[e[26],e[71]],cssFns:[]},"text-wrap":{cssPropBits:0, cssLitGroup:[e[46],e[71],e[72]],cssFns:[]},top:"bottom",transform:{cssPropBits:0,cssLitGroup:[e[71]],cssFns:"matrix() perspective() rotate() rotate3d() rotatex() rotatey() rotatez() scale() scale3d() scalex() scaley() scalez() skew() skewx() skewy() translate() translate3d() translatex() translatey() translatez()".split(" ")},"transform-origin":"perspective-origin","transform-style":{cssPropBits:0,cssLitGroup:[e[37]],cssFns:[]},transition:{cssPropBits:1029,cssLitGroup:[e[10],e[48],e[50],e[71]],cssFns:["cubic-bezier()", "steps()"]},"transition-delay":"animation-delay","transition-duration":"animation-delay","transition-property":{cssPropBits:1024,cssLitGroup:[e[48],e[50]],cssFns:[]},"transition-timing-function":"animation-timing-function","unicode-bidi":{cssPropBits:0,cssLitGroup:[e[30],e[72]],cssFns:[]},"vertical-align":{cssPropBits:5,cssLitGroup:[e[12],e[31]],cssFns:[]},visibility:"backface-visibility","voice-family":{cssPropBits:8,cssLitGroup:[e[27],e[48]],cssFns:[]},volume:{cssPropBits:1,cssLitGroup:[e[17],e[69]], cssFns:[]},"white-space":{cssPropBits:0,cssLitGroup:[e[22],e[72]],cssFns:[]},width:"min-height","word-break":{cssPropBits:0,cssLitGroup:[e[32],e[72]],cssFns:[]},"word-spacing":"letter-spacing","word-wrap":"overflow-wrap","z-index":"bottom",zoom:"line-height","cubic-bezier()":"animation-delay","steps()":{cssPropBits:5,cssLitGroup:[e[36],e[48]],cssFns:[]},"image()":{cssPropBits:18,cssLitGroup:[e[0],e[48]],cssFns:["rgb()","rgba()"]},"linear-gradient()":{cssPropBits:7,cssLitGroup:[e[0],e[31],e[42],e[48], e[79]],cssFns:["rgb()","rgba()"]},"radial-gradient()":{cssPropBits:7,cssLitGroup:[e[0],e[11],e[31],e[42],e[48],e[56],e[57]],cssFns:["rgb()","rgba()"]},"repeating-linear-gradient()":"linear-gradient()","repeating-radial-gradient()":"radial-gradient()","rgb()":{cssPropBits:1,cssLitGroup:[e[48]],cssFns:[]},"rgba()":"rgb()","rect()":{cssPropBits:5,cssLitGroup:[e[48],e[52]],cssFns:[]},"alpha()":{cssPropBits:1,cssLitGroup:[e[28]],cssFns:[]},"matrix()":"animation-delay","perspective()":"border-bottom-left-radius", "rotate()":"border-bottom-left-radius","rotate3d()":"animation-delay","rotatex()":"border-bottom-left-radius","rotatey()":"border-bottom-left-radius","rotatez()":"border-bottom-left-radius","scale()":"animation-delay","scale3d()":"animation-delay","scalex()":"border-bottom-left-radius","scaley()":"border-bottom-left-radius","scalez()":"border-bottom-left-radius","skew()":"animation-delay","skewx()":"border-bottom-left-radius","skewy()":"border-bottom-left-radius","translate()":"animation-delay","translate3d()":"animation-delay", "translatex()":"border-bottom-left-radius","translatey()":"border-bottom-left-radius","translatez()":"border-bottom-left-radius"},g;for(g in f)"string"===typeof f[g]&&Object.hasOwnProperty.call(f,g)&&(f[g]=f[f[g]]);"undefined"!==typeof window&&(window.cssSchema=f);var h,k;(function(){function a(b){var c=parseInt(b.substring(1),16);return 65535>10),56320+(c&1023))):c==c?String.fromCharCode(c):" ">b[1]?"":b[1]}function b(a,c){return'"'+a.replace(/[\u0000-\u001f\\\"<>]/g, c)+'"'}function c(a){return e[a]||(e[a]="\\"+a.charCodeAt(0).toString(16)+" ")}function d(a){return f[a]||(f[a]=("\u0010">a?"%0":"%")+a.charCodeAt(0).toString(16))}var e={"\\":"\\\\"},f={"\\":"%5c"},g=RegExp("\\uFEFF|U[+][0-9A-F?]{1,6}(?:-[0-9A-F]{1,6})?|url[(][\\t\\n\\f ]*(?:\"(?:'|[^'\"\\n\\f\\\\]|\\\\[\\s\\S])*\"|'(?:\"|[^'\"\\n\\f\\\\]|\\\\[\\s\\S])*'|(?:[\\t\\x21\\x23-\\x26\\x28-\\x5b\\x5d-\\x7e]|[\\u0080-\\ud7ff\\ue000-\\ufffd]|[\\ud800-\\udbff][\\udc00-\\udfff]|\\\\(?:[0-9a-fA-F]{1,6}[\\t\\n\\f ]?|[\\u0020-\\u007e\\u0080-\\ud7ff\\ue000\\ufffd]|[\\ud800-\\udbff][\\udc00-\\udfff]))*)[\\t\\n\\f ]*[)]|(?!url[(])-?(?:[a-zA-Z_]|[\\u0080-\\ud7ff\\ue000-\\ufffd]|[\\ud800-\\udbff][\\udc00-\\udfff]|\\\\(?:[0-9a-fA-F]{1,6}[\\t\\n\\f ]?|[\\u0020-\\u007e\\u0080-\\ud7ff\\ue000\\ufffd]|[\\ud800-\\udbff][\\udc00-\\udfff]))(?:[a-zA-Z0-9_-]|[\\u0080-\\ud7ff\\ue000-\\ufffd]|[\\ud800-\\udbff][\\udc00-\\udfff]|\\\\(?:[0-9a-fA-F]{1,6}[\\t\\n\\f ]?|[\\u0020-\\u007e\\u0080-\\ud7ff\\ue000\\ufffd]|[\\ud800-\\udbff][\\udc00-\\udfff]))*[(]|(?:@?-?(?:[a-zA-Z_]|[\\u0080-\\ud7ff\\ue000-\\ufffd]|[\\ud800-\\udbff][\\udc00-\\udfff]|\\\\(?:[0-9a-fA-F]{1,6}[\\t\\n\\f ]?|[\\u0020-\\u007e\\u0080-\\ud7ff\\ue000\\ufffd]|[\\ud800-\\udbff][\\udc00-\\udfff]))|#)(?:[a-zA-Z0-9_-]|[\\u0080-\\ud7ff\\ue000-\\ufffd]|[\\ud800-\\udbff][\\udc00-\\udfff]|\\\\(?:[0-9a-fA-F]{1,6}[\\t\\n\\f ]?|[\\u0020-\\u007e\\u0080-\\ud7ff\\ue000\\ufffd]|[\\ud800-\\udbff][\\udc00-\\udfff]))*|\"(?:'|[^'\"\\n\\f\\\\]|\\\\[\\s\\S])*\"|'(?:\"|[^'\"\\n\\f\\\\]|\\\\[\\s\\S])*'|[-+]?(?:[0-9]+(?:[.][0-9]+)?|[.][0-9]+)(?:%|-?(?:[a-zA-Z_]|[\\u0080-\\ud7ff\\ue000-\\ufffd]|[\\ud800-\\udbff][\\udc00-\\udfff]|\\\\(?:[0-9a-fA-F]{1,6}[\\t\\n\\f ]?|[\\u0020-\\u007e\\u0080-\\ud7ff\\ue000\\ufffd]|[\\ud800-\\udbff][\\udc00-\\udfff]))(?:[a-zA-Z0-9_-]|[\\u0080-\\ud7ff\\ue000-\\ufffd]|[\\ud800-\\udbff][\\udc00-\\udfff]|\\\\(?:[0-9a-fA-F]{1,6}[\\t\\n\\f ]?|[\\u0020-\\u007e\\u0080-\\ud7ff\\ue000\\ufffd]|[\\ud800-\\udbff][\\udc00-\\udfff]))*)?|\x3c!--|--\x3e|[\\t\\n\\f ]+|/(?:[*][^*]*[*]+(?:[^/][^*]*[*]+)*/|/[^\\n\\f]*)|[~|^$*]\x3d|[^\"'\\\\/]|/(?![/*])", "gi"),l=RegExp("\\\\(?:(?:[0-9a-fA-F]{1,6}[\\t\\n\\f ]?|[\\u0020-\\u007e\\u0080-\\ud7ff\\ue000\\ufffd]|[\\ud800-\\udbff][\\udc00-\\udfff])|[\\n\\f])","g"),m=RegExp("^url\\([\\t\\n\\f ]*[\"']?|[\"']?[\\t\\n\\f ]*\\)$","gi");k=function(b){return b.replace(l,a)};h=function(a){a=(""+a).replace(/\r\n?/g,"\n").match(g)||[];for(var e=0,f=" ",h=0,l=a.length;h=q?" ":/url\(/i.test(n)?"url("+b(n.replace(m,""),d)+")":n;if(f!=n||" "!=n)a[e++]=f=n}a.length=e;return a}})();"undefined"!==typeof window&&(window.lexCss=h,window.decodeCss=k);var l=function(){function a(b){b=(""+b).match(m);return!b?c:new g(h(b[1]),h(b[2]),h(b[3]),h(b[4]),h(b[5]),h(b[6]),h(b[7]))}function b(a,e){return"string"==typeof a?encodeURI(a).replace(e,d):c}function d(a){a=a.charCodeAt(0);return"%"+"0123456789ABCDEF".charAt(a>>4&15)+"0123456789ABCDEF".charAt(a&15)}function e(a){if(a=== c)return c;a=a.replace(/(^|\/)\.(?:\/|$)/g,"$1").replace(/\/{2,}/g,"/");for(var b=k,d;(d=a.replace(b,"$1"))!=a;a=d);return a}function f(a,b){var c=a.T(),d=b.K();d?c.ga(b.j):d=b.X();d?c.da(b.n):d=b.Y();d?c.ea(b.k):d=b.$();var g=b.g,h=e(g);if(d)c.ca(b.V()),h=h&&h.replace(l,"");else if(d=!!g){if(47!==h.charCodeAt(0))var h=e(c.g||"").replace(l,""),k=h.lastIndexOf("/")+1,h=e((k?h.substring(0,k):"")+e(g)).replace(l,"")}else h=h&&h.replace(l,""),h!==g&&c.G(h);d?c.G(h):d=b.aa();d?c.O(b.l):d=b.Z();d&&c.fa(b.o); return c}function g(a,b,c,d,e,f,h){this.j=a;this.n=b;this.k=c;this.h=d;this.g=e;this.l=f;this.o=h}function h(a){return"string"==typeof a&&0]/g,E={"\n":"%0a","\f":"%0c","\r":"%0d",'"':"%22","'":"%27","(":"%28",")":"%29","*":"%2a", "\x3c":"%3c","\x3e":"%3e"},B=/^(?:([^:/?# ]+):)?/,A=/^(?:https?|mailto|data)$/i;m=function(){var a={};return function S(b,c,d,g,l){b=J(b);var m=f[b];if(!m||"object"!==typeof m)c.length=0;else{for(var n=m.cssPropBits,C=n&80,p=n&1536,q=NaN,r=0,B=0;r=w)A=n&1?A:"";else if(F=A.charCodeAt(1),y=A.charCodeAt(2),E=48<=F&&57>=F,D=48<=y&&57>=y,43===w&&(E||46===F&&D))A=n&1?(E?"":"0")+A.substring(1):"";else if(45===w&&(E||46===F&&D))A=n&4?(E?"-":"-0")+A.substring(1):n&1?"0":"";else if(46===w&&E)A=n&1?"0"+A:"";else if('url("'===A.substring(0,5))A= d&&n&16?e(s(h(g,c[r].substring(5,A.length-2)),b,d)):"";else if("("===A.charAt(A.length-1))a:{M=c;ca=r;A=1;U=ca+1;for(w=M.length;Ug&&" "===b[k-1]&&--k;f.startAtrule&&f.startAtrule(b[h].toLowerCase(),b.slice(g,k));d="{"===b[d]?c(b,d,e,f):d+1;f.endAtrule&&f.endAtrule()}return d}function c(b,f,g,h){++f;for(h.startBlock&&h.startBlock();fl)return l=~l,l===h?l+1:l;var m=a[l];if("{"!==m)return l===h?l+1:l;c=l+1;l>h&&" "===a[l-1]&&--l;for(g.startRuleset&&g.startRuleset(a.slice(h,l));cm)m=~m;else{for(var n=[],p=0,q=b;q])/g;f=a+"";if(fa)f=f.split(g);else{for(var h=[],k=0,l;(l=g.exec(f))!==c;)h.push(f.substring(k,l.index)),h.push(l[0]),k=l.index+l[0].length;h.push(f.substring(k));f=h}p(b,f,0,{r:d,C:d},e)}}function n(a,b,c,d,e){return function(){p(a,b,c,d,e)}}function p(a,c,d,f,g){try{a.H&&0==d&&a.H(g);for(var h,k,l,m=c.length;dc)){for(f=g.length;--f>c;){var h=g[f].v;e.f[h]&e.c.OPTIONAL_ENDTAG||b.push("\x3c/",h,"\x3e")}c/g,T=/\"/g,M=/^\s*([-.:\w]+)(?:\s*(=)\s*((")[^"]*("|$)|(')[^']*('|$)|(?=[a-z][-\w]*\s*=)|[^"'\s]*))?/i,fa=3==="a,b".split(/(,)/).length,ca=e.c.CDATA|e.c.RCDATA,U={},ea={},ia=/^(?:https?|mailto|data)$/i,Z={};Z.pa=Z.escapeAttrib=h;Z.ra=Z.makeHtmlSanitizer=r;Z.sa=Z.makeSaxParser=m;Z.ta=Z.makeTagPolicy=aa;Z.wa=Z.normalizeRCData=k;Z.xa=Z.sanitize= function(a,b,c,d){return x(a,aa(b,c,d))};Z.ya=Z.sanitizeAttribs=V;Z.za=Z.sanitizeWithPolicy=x;Z.Ba=Z.unescapeEntities=g;return Z}(w);g=e.sanitize;"undefined"!==typeof window&&(window.html=e,window.html_sanitize=g)})();var Base64={_keyStr:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/\x3d",encode:function(a,b){var c="",d,e,f,g,h,k,l=0;for(null!=b&&b||(a=Base64._utf8_encode(a));l>2,d=(d&3)<<4|e>>4,h=(e&15)<<2|f>>6,k=f&63,isNaN(e)?h=k=64:isNaN(f)&&(k=64),c=c+this._keyStr.charAt(g)+this._keyStr.charAt(d)+this._keyStr.charAt(h)+this._keyStr.charAt(k);return c},decode:function(a,b){b=null!=b?b:!1;var c="",d,e,f,g,h,k=0;for(a= a.replace(/[^A-Za-z0-9\+\/\=]/g,"");k>4,e=(e&15)<<4|g>>2,f=(g&3)<<6|h,c+=String.fromCharCode(d),64!=g&&(c+=String.fromCharCode(e)),64!=h&&(c+=String.fromCharCode(f));b||(c=Base64._utf8_decode(c));return c},_utf8_encode:function(a){a=a.replace(/\r\n/g,"\n");for(var b="",c=0;cd?b+=String.fromCharCode(d): (127d?b+=String.fromCharCode(d>>6|192):(b+=String.fromCharCode(d>>12|224),b+=String.fromCharCode(d>>6&63|128)),b+=String.fromCharCode(d&63|128))}return b},_utf8_decode:function(a){for(var b="",c=0,d=c1=c2=0;cd?(b+=String.fromCharCode(d),c++):191d?(c2=a.charCodeAt(c+1),b+=String.fromCharCode((d&31)<<6|c2&63),c+=2):(c2=a.charCodeAt(c+1),c3=a.charCodeAt(c+2),b+=String.fromCharCode((d&15)<<12|(c2&63)<<6|c3&63),c+=3);return b}};!function(a){"object"==typeof exports&&"undefined"!=typeof module?module.exports=a():"function"==typeof define&&define.amd?define([],a):("undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:this).pako=a()}(function(){return function b(c,d,e){function f(h,l){if(!d[h]){if(!c[h]){var m="function"==typeof require&&require;if(!l&&m)return m(h,!0);if(g)return g(h,!0);m=Error("Cannot find module '"+h+"'");throw m.code="MODULE_NOT_FOUND",m;}m=d[h]={exports:{}}; c[h][0].call(m.exports,function(b){var d=c[h][1][b];return f(d?d:b)},m,m.exports,b,c,d,e)}return d[h].exports}for(var g="function"==typeof require&&require,h=0;hb.windowBits&&(b.windowBits+=16);this.err=0;this.msg= "";this.ended=!1;this.chunks=[];this.strm=new m;this.strm.avail_out=0;var c=g.deflateInit2(this.strm,b.level,b.method,b.windowBits,b.memLevel,b.strategy);if(c!==p)throw Error(l[c]);if(b.header&&g.deflateSetHeader(this.strm,b.header),b.dictionary){var d;if(d="string"==typeof b.dictionary?k.string2buf(b.dictionary):"[object ArrayBuffer]"===n.call(b.dictionary)?new Uint8Array(b.dictionary):b.dictionary,c=g.deflateSetDictionary(this.strm,d),c!==p)throw Error(l[c]);this._dict_set=!0}}function f(b,c){var d= new e(c);if(d.push(b,!0),d.err)throw d.msg;return d.result}var g=b("./zlib/deflate"),h=b("./utils/common"),k=b("./utils/strings"),l=b("./zlib/messages"),m=b("./zlib/zstream"),n=Object.prototype.toString,p=0,r=-1,q=0,s=8;e.prototype.push=function(b,c){var d,e,f=this.strm,l=this.options.chunkSize;if(this.ended)return!1;e=c===~~c?c:!0===c?4:0;"string"==typeof b?f.input=k.string2buf(b):"[object ArrayBuffer]"===n.call(b)?f.input=new Uint8Array(b):f.input=b;f.next_in=0;f.avail_in=f.input.length;do{if(0=== f.avail_out&&(f.output=new h.Buf8(l),f.next_out=0,f.avail_out=l),d=g.deflate(f,e),1!==d&&d!==p)return this.onEnd(d),this.ended=!0,!1;0!==f.avail_out&&(0!==f.avail_in||4!==e&&2!==e)||("string"===this.options.to?this.onData(k.buf2binstring(h.shrinkBuf(f.output,f.next_out))):this.onData(h.shrinkBuf(f.output,f.next_out)))}while((0c.windowBits&&(c.windowBits=-c.windowBits,0===c.windowBits&&(c.windowBits=-15));!(0<=c.windowBits&&16>c.windowBits)||b&&b.windowBits||(c.windowBits+=32);15c.windowBits&&0===(15&c.windowBits)&&(c.windowBits|=15);this.err=0;this.msg="";this.ended=!1;this.chunks=[];this.strm=new n;this.strm.avail_out=0;b=g.inflateInit2(this.strm,c.windowBits);if(b!==l.Z_OK)throw Error(m[b]); this.header=new p;g.inflateGetHeader(this.strm,this.header)}function f(b,c){var d=new e(c);if(d.push(b,!0),d.err)throw d.msg;return d.result}var g=b("./zlib/inflate"),h=b("./utils/common"),k=b("./utils/strings"),l=b("./zlib/constants"),m=b("./zlib/messages"),n=b("./zlib/zstream"),p=b("./zlib/gzheader"),r=Object.prototype.toString;e.prototype.push=function(b,c){var d,e,f,m,n,p,D=this.strm,E=this.options.chunkSize,B=this.options.dictionary,A=!1;if(this.ended)return!1;e=c===~~c?c:!0===c?l.Z_FINISH:l.Z_NO_FLUSH; "string"==typeof b?D.input=k.binstring2buf(b):"[object ArrayBuffer]"===r.call(b)?D.input=new Uint8Array(b):D.input=b;D.next_in=0;D.avail_in=D.input.length;do{if(0===D.avail_out&&(D.output=new h.Buf8(E),D.next_out=0,D.avail_out=E),d=g.inflate(D,l.Z_NO_FLUSH),d===l.Z_NEED_DICT&&B&&(p="string"==typeof B?k.string2buf(B):"[object ArrayBuffer]"===r.call(B)?new Uint8Array(B):B,d=g.inflateSetDictionary(this.strm,p)),d===l.Z_BUF_ERROR&&!0===A&&(d=l.Z_OK,A=!1),d!==l.Z_STREAM_END&&d!==l.Z_OK)return this.onEnd(d), this.ended=!0,!1;D.next_out&&(0!==D.avail_out&&d!==l.Z_STREAM_END&&(0!==D.avail_in||e!==l.Z_FINISH&&e!==l.Z_SYNC_FLUSH)||("string"===this.options.to?(f=k.utf8border(D.output,D.next_out),m=D.next_out-f,n=k.buf2string(D.output,f),D.next_out=m,D.avail_out=E-m,m&&h.arraySet(D.output,D.output,f,m,0),this.onData(n)):this.onData(h.shrinkBuf(D.output,D.next_out))));0===D.avail_in&&0===D.avail_out&&(A=!0)}while((0c&&(b.subarray&&h||!b.subarray&&g))return String.fromCharCode.apply(null,f.shrinkBuf(b,c));for(var d="",e=0;eb;b++)m[b]=252<=b?6:248<=b?5:240<=b?4:224<=b?3:192<=b?2:1;m[254]=m[254]=1;d.string2buf=function(b){var c,d,e,g,h,k=b.length,l=0;for(g=0;gd?1:2048>d?2:65536>d?3:4;c=new f.Buf8(l);for(g=h=0;hd?c[h++]=d:2048> d?(c[h++]=192|d>>>6,c[h++]=128|63&d):65536>d?(c[h++]=224|d>>>12,c[h++]=128|d>>>6&63,c[h++]=128|63&d):(c[h++]=240|d>>>18,c[h++]=128|d>>>12&63,c[h++]=128|d>>>6&63,c[h++]=128|63&d);return c};d.buf2binstring=function(b){return e(b,b.length)};d.binstring2buf=function(b){for(var c=new f.Buf8(b.length),d=0,e=c.length;dg)l[f++]=g;else if(h=m[g],4g?l[f++]=g:(g-=65536,l[f++]=55296|g>>10&1023,l[f++]=56320|1023&g)}return e(l,f)};d.utf8border=function(b,c){var d;c=c||b.length;c>b.length&&(c=b.length);for(d=c-1;0<=d&&128===(192&b[d]);)d--;return 0>d?c:0===d?c:d+m[b[d]]>c?d:c}},{"./common":3}],5:[function(b,c,d){c.exports=function(b,c,d,h){var k=65535&b|0;b=b>>>16&65535|0;for(var l=0;0!==d;){l=2E3d;d++){b=d; for(var e=0;8>e;e++)b=1&b?3988292384^b>>>1:b>>>1;c[d]=b}return c}();c.exports=function(b,c,d,k){d=k+d;for(b^=-1;k>>8^e[255&(b^c[k])];return b^-1}},{}],8:[function(b,c,d){function e(b,c){return b.msg=B[c],c}function f(b){for(var c=b.length;0<=--c;)b[c]=0}function g(b){var c=b.state,d=c.pending;d>b.avail_out&&(d=b.avail_out);0!==d&&(v.arraySet(b.output,c.pending_buf,c.pending_out,d,b.next_out),b.next_out+=d,c.pending_out+=d,b.total_out+=d,b.avail_out-=d,c.pending-=d,0===c.pending&&(c.pending_out= 0))}function h(b,c){J._tr_flush_block(b,0<=b.block_start?b.block_start:-1,b.strstart-b.block_start,c);b.block_start=b.strstart;g(b.strm)}function k(b,c){b.pending_buf[b.pending++]=c}function l(b,c){b.pending_buf[b.pending++]=c>>>8&255;b.pending_buf[b.pending++]=255&c}function m(b,c){var d,e,f=b.max_chain_length,g=b.strstart,h=b.prev_length,k=b.nice_match,l=b.strstart>b.w_size-R?b.strstart-(b.w_size-R):0,m=b.window,n=b.w_mask,u=b.prev,C=b.strstart+O,p=m[g+h-1],q=m[g+h];b.prev_length>=b.good_match&& (f>>=2);k>b.lookahead&&(k=b.lookahead);do if(d=c,m[d+h]===q&&m[d+h-1]===p&&m[d]===m[g]&&m[++d]===m[g+1]){g+=2;d++;do;while(m[++g]===m[++d]&&m[++g]===m[++d]&&m[++g]===m[++d]&&m[++g]===m[++d]&&m[++g]===m[++d]&&m[++g]===m[++d]&&m[++g]===m[++d]&&m[++g]===m[++d]&&gh){if(b.match_start=c,h=e,e>=k)break;p=m[g+h-1];q=m[g+h]}}while((c=u[c&n])>l&&0!==--f);return h<=b.lookahead?h:b.lookahead}function n(b){var c,d,e,f,g=b.w_size;do{if(f=b.window_size-b.lookahead-b.strstart,b.strstart>= g+(g-R)){v.arraySet(b.window,b.window,g,g,0);b.match_start-=g;b.strstart-=g;b.block_start-=g;c=d=b.hash_size;do e=b.head[--c],b.head[c]=e>=g?e-g:0;while(--d);c=d=g;do e=b.prev[--c],b.prev[c]=e>=g?e-g:0;while(--d);f+=g}if(0===b.strm.avail_in)break;c=b.strm;e=b.window;var h=b.strstart+b.lookahead,k=c.avail_in;if(d=(k>f&&(k=f),0===k?0:(c.avail_in-=k,v.arraySet(e,c.input,c.next_in,k,h),1===c.state.wrap?c.adler=D(c.adler,e,k,h):2===c.state.wrap&&(c.adler=E(c.adler,e,k,h)),c.next_in+=k,c.total_in+=k,k)), b.lookahead+=d,b.lookahead+b.insert>=I){f=b.strstart-b.insert;b.ins_h=b.window[f];for(b.ins_h=(b.ins_h<=I&&(b.ins_h=(b.ins_h<< b.hash_shift^b.window[b.strstart+I-1])&b.hash_mask,d=b.prev[b.strstart&b.w_mask]=b.head[b.ins_h],b.head[b.ins_h]=b.strstart),0!==d&&b.strstart-d<=b.w_size-R&&(b.match_length=m(b,d)),b.match_length>=I)if(e=J._tr_tally(b,b.strstart-b.match_start,b.match_length-I),b.lookahead-=b.match_length,b.match_length<=b.max_lazy_match&&b.lookahead>=I){b.match_length--;do b.strstart++,b.ins_h=(b.ins_h<=I&&(b.ins_h=(b.ins_h<=b.match_length&&(b.strategy===S||b.match_length===I&&4096= I&&b.match_length<=b.prev_length){f=b.strstart+b.lookahead-I;e=J._tr_tally(b,b.strstart-1-b.prev_match,b.prev_length-I);b.lookahead-=b.prev_length-1;b.prev_length-=2;do++b.strstart<=f&&(b.ins_h=(b.ins_h<c.wrap&&(c.wrap=-c.wrap),c.status=c.wrap?$:ba,b.adler=2===c.wrap?0:1,c.last_flush=A,J._tr_init(c),F):e(b,P)}function t(b){var c=w(b);c===F&&(b=b.state,b.window_size=2*b.w_size,f(b.head),b.max_lazy_match=z[b.level].max_lazy,b.good_match=z[b.level].good_length,b.nice_match=z[b.level].nice_length,b.max_chain_length=z[b.level].max_chain,b.strstart=0,b.block_start= 0,b.lookahead=0,b.insert=0,b.match_length=b.prev_length=I-1,b.match_available=0,b.ins_h=0);return c}function y(b,c,d,f,g,h){if(!b)return P;var k=1;if(c===N&&(c=6),0>f?(k=0,f=-f):15g||g>u||d!==x||8>f||15c||9h||h>V)return e(b,P);8===f&&(f=9);var l=new s;return b.state=l,l.strm=b,l.wrap=k,l.gzhead=null,l.w_bits=f,l.w_size=1<b.pending_buf_size-5&&(d=b.pending_buf_size-5);;){if(1>=b.lookahead){if(n(b),0===b.lookahead&&c===A)return Q;if(0===b.lookahead)break}b.strstart+=b.lookahead;b.lookahead=0;var e=b.block_start+d;if((0===b.strstart||b.strstart>=e)&&(b.lookahead=b.strstart-e,b.strstart=e,h(b,!1),0===b.strm.avail_out)||b.strstart-b.block_start>=b.w_size-R&&(h(b,!1),0===b.strm.avail_out))return Q}return b.insert=0,c===C?(h(b,!0),0===b.strm.avail_out?Y:T):(b.strstart>b.block_start&&h(b,!1),Q)}),new q(4,4,8, 4,p),new q(4,5,16,8,p),new q(4,6,32,32,p),new q(4,4,16,16,r),new q(8,16,32,32,r),new q(8,16,128,128,r),new q(8,32,128,256,r),new q(32,128,258,1024,r),new q(32,258,258,4096,r)];d.deflateInit=function(b,c){return y(b,c,x,15,8,0)};d.deflateInit2=y;d.deflateReset=t;d.deflateResetKeep=w;d.deflateSetHeader=function(b,c){return b&&b.state?2!==b.state.wrap?P:(b.state.gzhead=c,F):P};d.deflate=function(b,c){var d,m,u,p;if(!b||!b.state||5c)return b?e(b,P):P;if(m=b.state,!b.output||!b.input&&0!==b.avail_in|| 666===m.status&&c!==C)return e(b,0===b.avail_out?-5:P);if(m.strm=b,d=m.last_flush,m.last_flush=c,m.status===$)2===m.wrap?(b.adler=0,k(m,31),k(m,139),k(m,8),m.gzhead?(k(m,(m.gzhead.text?1:0)+(m.gzhead.hcrc?2:0)+(m.gzhead.extra?4:0)+(m.gzhead.name?8:0)+(m.gzhead.comment?16:0)),k(m,255&m.gzhead.time),k(m,m.gzhead.time>>8&255),k(m,m.gzhead.time>>16&255),k(m,m.gzhead.time>>24&255),k(m,9===m.level?2:2<=m.strategy||2>m.level?4:0),k(m,255&m.gzhead.os),m.gzhead.extra&&m.gzhead.extra.length&&(k(m,255&m.gzhead.extra.length), k(m,m.gzhead.extra.length>>8&255)),m.gzhead.hcrc&&(b.adler=E(b.adler,m.pending_buf,m.pending,0)),m.gzindex=0,m.status=69):(k(m,0),k(m,0),k(m,0),k(m,0),k(m,0),k(m,9===m.level?2:2<=m.strategy||2>m.level?4:0),k(m,3),m.status=ba)):(u=x+(m.w_bits-8<<4)<<8,p=-1,p=2<=m.strategy||2>m.level?0:6>m.level?1:6===m.level?2:3,u|=p<<6,0!==m.strstart&&(u|=32),m.status=ba,l(m,u+(31-u%31)),0!==m.strstart&&(l(m,b.adler>>>16),l(m,65535&b.adler)),b.adler=1);if(69===m.status)if(m.gzhead.extra){for(u=m.pending;m.gzindex< (65535&m.gzhead.extra.length)&&(m.pending!==m.pending_buf_size||(m.gzhead.hcrc&&m.pending>u&&(b.adler=E(b.adler,m.pending_buf,m.pending-u,u)),g(b),u=m.pending,m.pending!==m.pending_buf_size));)k(m,255&m.gzhead.extra[m.gzindex]),m.gzindex++;m.gzhead.hcrc&&m.pending>u&&(b.adler=E(b.adler,m.pending_buf,m.pending-u,u));m.gzindex===m.gzhead.extra.length&&(m.gzindex=0,m.status=73)}else m.status=73;if(73===m.status)if(m.gzhead.name){u=m.pending;do{if(m.pending===m.pending_buf_size&&(m.gzhead.hcrc&&m.pending> u&&(b.adler=E(b.adler,m.pending_buf,m.pending-u,u)),g(b),u=m.pending,m.pending===m.pending_buf_size)){p=1;break}p=m.gzindexu&&(b.adler=E(b.adler,m.pending_buf,m.pending-u,u));0===p&&(m.gzindex=0,m.status=91)}else m.status=91;if(91===m.status)if(m.gzhead.comment){u=m.pending;do{if(m.pending===m.pending_buf_size&&(m.gzhead.hcrc&&m.pending>u&&(b.adler=E(b.adler,m.pending_buf,m.pending-u,u)), g(b),u=m.pending,m.pending===m.pending_buf_size)){p=1;break}p=m.gzindexu&&(b.adler=E(b.adler,m.pending_buf,m.pending-u,u));0===p&&(m.status=103)}else m.status=103;if(103===m.status&&(m.gzhead.hcrc?(m.pending+2>m.pending_buf_size&&g(b),m.pending+2<=m.pending_buf_size&&(k(m,255&b.adler),k(m,b.adler>>8&255),b.adler=0,m.status=ba)):m.status=ba),0!==m.pending){if(g(b),0===b.avail_out)return m.last_flush= -1,F}else if(0===b.avail_in&&(c<<1)-(4=I&&0m.lookahead&&(m.match_length=m.lookahead)}if(m.match_length>= I?(q=J._tr_tally(m,1,m.match_length-I),m.lookahead-=m.match_length,m.strstart+=m.match_length,m.match_length=0):(q=J._tr_tally(m,0,m.window[m.strstart]),m.lookahead--,m.strstart++),q&&(h(m,!1),0===m.strm.avail_out)){q=Q;break a}}q=(m.insert=0,c===C?(h(m,!0),0===m.strm.avail_out?Y:T):m.last_lit&&(h(m,!1),0===m.strm.avail_out)?Q:W)}else q=z[m.level].func(m,c);if(q!==Y&&q!==T||(m.status=666),q===Q||q===Y)return 0===b.avail_out&&(m.last_flush=-1),F;if(q===W&&(1===c?J._tr_align(m):5!==c&&(J._tr_stored_block(m, 0,0,!1),3===c&&(f(m.head),0===m.lookahead&&(m.strstart=0,m.block_start=0,m.insert=0))),g(b),0===b.avail_out))return m.last_flush=-1,F}return c!==C?F:0>=m.wrap?1:(2===m.wrap?(k(m,255&b.adler),k(m,b.adler>>8&255),k(m,b.adler>>16&255),k(m,b.adler>>24&255),k(m,255&b.total_in),k(m,b.total_in>>8&255),k(m,b.total_in>>16&255),k(m,b.total_in>>24&255)):(l(m,b.adler>>>16),l(m,65535&b.adler)),g(b),0=d.w_size&&(0===h&&(f(d.head),d.strstart=0,d.block_start=0,d.insert=0),k=new v.Buf8(d.w_size),v.arraySet(k,c,e-d.w_size,d.w_size,0),c=k,e=d.w_size);k=b.avail_in;m=b.next_in;l=b.input;b.avail_in=e;b.next_in= 0;b.input=c;for(n(d);d.lookahead>=I;){e=d.strstart;g=d.lookahead-(I-1);do d.ins_h=(d.ins_h<y&&(t+=P[h++]<>>24,t>>>=B,y-=B,B=E>>>16&255,0===B)N[l++]=65535&E;else{if(!(16&B)){if(0===(64&B)){E=z[(65535&E)+(t&(1<>>=B,y-=B);15>y&&(t+=P[h++]<>>24,t>>>=B,y-=B,B=E>>>16&255, !(16&B)){if(0===(64&B)){E=v[(65535&E)+(t&(1<p){b.msg="invalid distance too far back";d.mode=30;break a}if(t>>>=B,y-=B,B=l-m,C>B){if(B=C-B,B>q&&d.sane){b.msg="invalid distance too far back";d.mode=30;break a}if(E=0,F=w,0===s){if(E+=r-B,B>3;h-=A;y-=A<<3;b.next_in=h;b.next_out=l;b.avail_in=h>>24&255)+(b>>>8&65280)+((65280&b)<<8)+((255&b)<<24)}function f(){this.mode=0;this.last=!1;this.wrap=0;this.havedict=!1;this.total=this.check=this.dmax=this.flags=0;this.head=null;this.wnext=this.whave=this.wsize=this.wbits=0;this.window=null;this.extra=this.offset=this.length=this.bits=this.hold=0;this.distcode=this.lencode=null;this.have=this.ndist=this.nlen=this.ncode=this.distbits=this.lenbits=0;this.next=null;this.lens=new r.Buf16(320);this.work= new r.Buf16(288);this.distdyn=this.lendyn=null;this.was=this.back=this.sane=0}function g(b){var c;return b&&b.state?(c=b.state,b.total_in=b.total_out=c.total=0,b.msg="",c.wrap&&(b.adler=1&c.wrap),c.mode=v,c.last=0,c.havedict=0,c.dmax=32768,c.head=null,c.hold=0,c.bits=0,c.lencode=c.lendyn=new r.Buf32(J),c.distcode=c.distdyn=new r.Buf32(D),c.sane=1,c.back=-1,y):z}function h(b){var c;return b&&b.state?(c=b.state,c.wsize=0,c.whave=0,c.wnext=0,g(b)):z}function k(b,c){var d,e;return b&&b.state?(e=b.state, 0>c?(d=0,c=-c):(d=(c>>4)+1,48>c&&(c&=15)),c&&(8>c||15=b.wsize?(r.arraySet(b.window,c,d-b.wsize,b.wsize,0),b.wnext=0,b.whave=b.wsize):(f=b.wsize-b.wnext,f>e&&(f=e),r.arraySet(b.window,c,d- e,f,b.wnext),e-=f,e?(r.arraySet(b.window,c,d-e,e,0),b.wnext=e,b.whave=b.wsize):(b.wnext+=f,b.wnext===b.wsize&&(b.wnext=0),b.whaveu;){if(0===l)break a;l--;x+=f[h++]<>>8&255;d.check=s(d.check,M,2,0);u=x=0;d.mode=2;break}if(d.flags=0,d.head&&(d.head.done=!1),!(1& d.wrap)||(((255&x)<<8)+(x>>8))%31){b.msg="incorrect header check";d.mode=30;break}if(8!==(15&x)){b.msg="unknown compression method";d.mode=30;break}if(x>>>=4,u-=4,Q=(15&x)+8,0===d.wbits)d.wbits=Q;else if(Q>d.wbits){b.msg="invalid window size";d.mode=30;break}d.dmax=1<u;){if(0===l)break a;l--;x+=f[h++]<>8&1);512&d.flags&&(M[0]=255&x,M[1]=x>>>8&255,d.check=s(d.check,M,2,0));u=x=0;d.mode=3;case 3:for(;32>u;){if(0===l)break a;l--;x+=f[h++]<>>8&255,M[2]=x>>>16&255,M[3]=x>>>24&255,d.check=s(d.check,M,4,0));u=x=0;d.mode=4;case 4:for(;16>u;){if(0===l)break a;l--;x+=f[h++]<>8);512&d.flags&&(M[0]=255&x,M[1]=x>>>8&255,d.check=s(d.check,M,2,0));u=x=0;d.mode= 5;case 5:if(1024&d.flags){for(;16>u;){if(0===l)break a;l--;x+=f[h++]<>>8&255,d.check=s(d.check,M,2,0));u=x=0}else d.head&&(d.head.extra=null);d.mode=6;case 6:if(1024&d.flags&&(G=d.length,G>l&&(G=l),G&&(d.head&&(Q=d.head.extra_len-d.length,d.head.extra||(d.head.extra=Array(d.head.extra_len)),r.arraySet(d.head.extra,f,h,G,Q)),512&d.flags&&(d.check=s(d.check,f,G,h)),l-=G,h+=G,d.length-=G),d.length))break a;d.length=0;d.mode= 7;case 7:if(2048&d.flags){if(0===l)break a;G=0;do Q=f[h+G++],d.head&&Q&&65536>d.length&&(d.head.name+=String.fromCharCode(Q));while(Q&&Gd.length&&(d.head.comment+=String.fromCharCode(Q));while(Q&&Gu;){if(0===l)break a;l--;x+=f[h++]<>9&1,d.head.done=!0);b.adler=d.check=0;d.mode=12;break;case 10:for(;32>u;){if(0===l)break a;l--;x+=f[h++]<>>= 7&u;u-=7&u;d.mode=27;break}for(;3>u;){if(0===l)break a;l--;x+=f[h++]<>>=1,u-=1,3&x){case 0:d.mode=14;break;case 1:L=d;if(E){O=void 0;n=new r.Buf32(512);p=new r.Buf32(32);for(O=0;144>O;)L.lens[O++]=8;for(;256>O;)L.lens[O++]=9;for(;280>O;)L.lens[O++]=7;for(;288>O;)L.lens[O++]=8;t(1,L.lens,0,288,n,0,L.work,{bits:9});for(O=0;32>O;)L.lens[O++]=5;t(2,L.lens,0,32,p,0,L.work,{bits:5});E=!1}L.lencode=n;L.lenbits=9;L.distcode=p;L.distbits=5;if(d.mode=20,6===c){x>>>=2;u-=2;break a}break; case 2:d.mode=17;break;case 3:b.msg="invalid block type",d.mode=30}x>>>=2;u-=2;break;case 14:x>>>=7&u;for(u-=7&u;32>u;){if(0===l)break a;l--;x+=f[h++]<>>16^65535)){b.msg="invalid stored block lengths";d.mode=30;break}if(d.length=65535&x,x=0,u=0,d.mode=15,6===c)break a;case 15:d.mode=16;case 16:if(G=d.length){if(G>l&&(G=l),G>D&&(G=D),0===G)break a;r.arraySet(g,f,h,G,k);l-=G;h+=G;D-=G;k+=G;d.length-=G;break}d.mode=12;break;case 17:for(;14>u;){if(0===l)break a;l--;x+=f[h++]<< u;u+=8}if(d.nlen=(31&x)+257,x>>>=5,u-=5,d.ndist=(31&x)+1,x>>>=5,u-=5,d.ncode=(15&x)+4,x>>>=4,u-=4,286u;){if(0===l)break a;l--;x+=f[h++]<>>=3;u-=3}for(;19>d.have;)d.lens[fa[d.have++]]=0;if(d.lencode=d.lendyn,d.lenbits=7,Y={bits:d.lenbits},W=t(0,d.lens,0,19,d.lencode,0,d.work,Y),d.lenbits=Y.bits,W){b.msg="invalid code lengths set"; d.mode=30;break}d.have=0;d.mode=19;case 19:for(;d.have>>24,O=65535&T,!(I<=u);){if(0===l)break a;l--;x+=f[h++]<O)x>>>=I,u-=I,d.lens[d.have++]=O;else{if(16===O){for(L=I+2;u>>=I,u-=I,0===d.have){b.msg="invalid bit length repeat";d.mode=30;break}Q=d.lens[d.have-1];G=3+(3&x);x>>>=2;u-=2}else if(17===O){for(L=I+3;u>>=I;u-=I;Q=0;G=3+(7&x); x>>>=3;u-=3}else{for(L=I+7;u>>=I;u-=I;Q=0;G=11+(127&x);x>>>=7;u-=7}if(d.have+G>d.nlen+d.ndist){b.msg="invalid bit length repeat";d.mode=30;break}for(;G--;)d.lens[d.have++]=Q}}if(30===d.mode)break;if(0===d.lens[256]){b.msg="invalid code -- missing end-of-block";d.mode=30;break}if(d.lenbits=9,Y={bits:d.lenbits},W=t(1,d.lens,0,d.nlen,d.lencode,0,d.work,Y),d.lenbits=Y.bits,W){b.msg="invalid literal/lengths set";d.mode=30;break}if(d.distbits=6,d.distcode=d.distdyn, Y={bits:d.distbits},W=t(2,d.lens,d.nlen,d.ndist,d.distcode,0,d.work,Y),d.distbits=Y.bits,W){b.msg="invalid distances set";d.mode=30;break}if(d.mode=20,6===c)break a;case 20:d.mode=21;case 21:if(6<=l&&258<=D){b.next_out=k;b.avail_out=D;b.next_in=h;b.avail_in=l;d.hold=x;d.bits=u;w(b,H);k=b.next_out;g=b.output;D=b.avail_out;h=b.next_in;f=b.input;l=b.avail_in;x=d.hold;u=d.bits;12===d.mode&&(d.back=-1);break}for(d.back=0;T=d.lencode[x&(1<>>24,L=T>>>16&255,O=65535&T,!(I<=u);){if(0=== l)break a;l--;x+=f[h++]<>R)],I=T>>>24,L=T>>>16&255,O=65535&T,!(R+I<=u);){if(0===l)break a;l--;x+=f[h++]<>>=R;u-=R;d.back+=R}if(x>>>=I,u-=I,d.back+=I,d.length=O,0===L){d.mode=26;break}if(32&L){d.back=-1;d.mode=12;break}if(64&L){b.msg="invalid literal/length code";d.mode=30;break}d.extra=15&L;d.mode=22;case 22:if(d.extra){for(L=d.extra;u>>=d.extra; u-=d.extra;d.back+=d.extra}d.was=d.length;d.mode=23;case 23:for(;T=d.distcode[x&(1<>>24,L=T>>>16&255,O=65535&T,!(I<=u);){if(0===l)break a;l--;x+=f[h++]<>R)],I=T>>>24,L=T>>>16&255,O=65535&T,!(R+I<=u);){if(0===l)break a;l--;x+=f[h++]<>>=R;u-=R;d.back+=R}if(x>>>=I,u-=I,d.back+=I,64&L){b.msg="invalid distance code";d.mode=30;break}d.offset=O;d.extra=15&L;d.mode=24;case 24:if(d.extra){for(L=d.extra;u>>=d.extra;u-=d.extra;d.back+=d.extra}if(d.offset>d.dmax){b.msg="invalid distance too far back";d.mode=30;break}d.mode=25;case 25:if(0===D)break a;if(G=H-D,d.offset>G){if(G=d.offset-G,G>d.whave&&d.sane){b.msg="invalid distance too far back";d.mode=30;break}G>d.wnext?(G-=d.wnext,X=d.wsize-G):X=d.wnext-G;G>d.length&&(G=d.length);L=d.window}else L=g,X=k-d.offset,G=d.length;G>D&&(G=D);D-=G;d.length-=G;do g[k++]=L[X++];while(--G);0===d.length&& (d.mode=21);break;case 26:if(0===D)break a;g[k++]=d.length;D--;d.mode=21;break;case 27:if(d.wrap){for(;32>u;){if(0===l)break a;l--;x|=f[h++]<u;){if(0===l)break a;l--;x+=f[h++]<d.mode&&(27>d.mode||4!==c))&&m(b,b.output,b.next_out,H-b.avail_out)?(d.mode=31,-4):(K-=b.avail_in,H-=b.avail_out,b.total_in+=K,b.total_out+=H,d.total+=H,d.wrap&&H&&(b.adler=d.check=d.flags?s(d.check,g,H,b.next_out-H):q(d.check,g,H,b.next_out-H)),b.data_type=d.bits+(d.last?64:0)+(12===d.mode?128:0)+(20===d.mode|| 15===d.mode?256:0),(0===K&&0===H||4===c)&&W===y&&(W=-5),W)};d.inflateEnd=function(b){if(!b||!b.state)return z;var c=b.state;return c.window&&(c.window=null),b.state=null,y};d.inflateGetHeader=function(b,c){var d;return b&&b.state?(d=b.state,0===(2&d.wrap)?z:(d.head=c,c.done=!1,y)):z};d.inflateSetDictionary=function(b,c){var d,e,f=c.length;return b&&b.state?(d=b.state,0!==d.wrap&&11!==d.mode?z:11===d.mode&&(e=1,e=q(e,c,f,0),e!==d.check)?-3:m(b,c,f,f)?(d.mode=31,-4):(d.havedict=1,y)):z};d.inflateInfo= "pako inflate (from Nodeca project)"},{"../utils/common":3,"./adler32":5,"./crc32":7,"./inffast":10,"./inftrees":12}],12:[function(b,c,d){var e=b("../utils/common"),f=[3,4,5,6,7,8,9,10,11,13,15,17,19,23,27,31,35,43,51,59,67,83,99,115,131,163,195,227,258,0,0],g=[16,16,16,16,16,16,16,16,17,17,17,17,18,18,18,18,19,19,19,19,20,20,20,20,21,21,21,21,16,72,78],h=[1,2,3,4,5,7,9,13,17,25,33,49,65,97,129,193,257,385,513,769,1025,1537,2049,3073,4097,6145,8193,12289,16385,24577,0,0],k=[16,16,16,16,17,17,18,18, 19,19,20,20,21,21,22,22,23,23,24,24,25,25,26,26,27,27,28,28,29,29,64,64];c.exports=function(b,c,d,p,r,q,s,w){var t,y,z,v,J,D,E,B;v=w.bits;for(var A=0,C=0,F=0,P=0,N=0,S=0,V=0,aa=t=0,x=0,u=null,K=0,H=new e.Buf16(16),S=new e.Buf16(16),G=null,X=0,A=0;15>=A;A++)H[A]=0;for(C=0;CP&&(N=P),0===P)return r[q++]=20971520,r[q++]=20971520,w.bits=1,0;for(F=1;F=A;A++)if(t<<=1,t-=H[A],0>t)return-1;if(0A;A++)S[A+1]=S[A]+H[A];for(C=0;CJ?(E=G[X+s[C]],B=u[K+s[C]]):(E=96,B=0);t=1<>V)+y]=D<<24|E<<16|B|0;while(0!==y);for(t=1<>=1;if(0!==t?(x&=t-1,x+=t):x=0,C++,0===--H[A]){if(A===P)break;A=c[d+ s[C]]}if(A>N&&(x&p)!==z){0===V&&(V=N);v+=F;S=A-V;for(t=1<=t));)S++,t<<=1;if(aa+=1<>>8&255}function k(b,c,d){b.bi_valid>aa-d?(b.bi_buf|=c<>aa-b.bi_valid,b.bi_valid+=d-aa):(b.bi_buf|=c<>>=1,d<<=1;while(0<--c);return d>>>1}function n(b,c,d){var e,f=Array(V+1),g=0;for(e=1;e<=V;e++)f[e]=g=g+d[e-1]<<1;for(d=0;d<=c;d++)e=b[2*d+1],0!==e&&(b[2*d]=m(f[e]++,e))}function p(b){var c;for(c=0;ce?$[e]:$[256+(e>>>7)],l(b,g,d),h=X[g],0!==h&&(e-=W[g],k(b,e,h)));while(mb.heap_len;)f=b.heap[++b.heap_len]=2>l?++l:0,g[2*f]=1,b.depth[f]=0,b.opt_len--,h&&(b.static_len-=e[2*f+1]);c.max_code=l;for(d=b.heap_len>>1;1<=d;d--)s(b,g,d);f=k;do d= b.heap[1],b.heap[1]=b.heap[b.heap_len--],s(b,g,1),e=b.heap[1],b.heap[--b.heap_max]=d,b.heap[--b.heap_max]=e,g[2*f]=g[2*d]+g[2*e],b.depth[f]=(b.depth[d]>=b.depth[e]?b.depth[d]:b.depth[e])+1,g[2*d+1]=g[2*e+1]=f,b.heap[1]=f++,s(b,g,1);while(2<=b.heap_len);b.heap[--b.heap_max]=b.heap[1];var m,u,h=c.dyn_tree,k=c.max_code,p=c.stat_desc.static_tree,q=c.stat_desc.has_stree,r=c.stat_desc.extra_bits,K=c.stat_desc.extra_base,H=c.stat_desc.max_length,G=0;for(e=0;e<=V;e++)b.bl_count[e]=0;h[2*b.heap[b.heap_max]+ 1]=0;for(d=b.heap_max+1;dH&&(e=H,G++),h[2*f+1]=e,f>k||(b.bl_count[e]++,m=0,f>=K&&(m=r[f-K]),u=h[2*f],b.opt_len+=u*(e+m),q&&(b.static_len+=u*(p[2*f+1]+m)));if(0!==G){do{for(e=H-1;0===b.bl_count[e];)e--;b.bl_count[e]--;b.bl_count[e+1]+=2;b.bl_count[H]--;G-=2}while(0k||(h[2*m+1]!==e&&(b.opt_len+=(e-h[2*m+1])*h[2*m],h[2*m+1]=e),f--)}n(g,l,b.bl_count)}function y(b,c,d){var e,f,g=-1,h=c[1],k=0,l=7, m=4;0===h&&(l=138,m=3);c[2*(d+1)+1]=65535;for(e=0;e<=d;e++)f=h,h=c[2*(e+1)+1],++k=k?b.bl_tree[2*K]++:b.bl_tree[2*H]++,k=0,g=f,0===h?(l=138,m=3):f===h?(l=6,m=3):(l=7,m=4))}function z(b,c,d){var e,f,g=-1,h=c[1],m=0,n=7,p=4;0===h&&(n=138,p=3);for(e=0;e<=d;e++)if(f=h,h=c[2*(e+1)+1],!(++m=m? (l(b,K,b.bl_tree),k(b,m-3,3)):(l(b,H,b.bl_tree),k(b,m-11,7));m=0;g=f;0===h?(n=138,p=3):f===h?(n=6,p=3):(n=7,p=4)}}function v(b){var c,d=4093624447;for(c=0;31>=c;c++,d>>>=1)if(1&d&&0!==b.dyn_ltree[2*c])return E;if(0!==b.dyn_ltree[18]||0!==b.dyn_ltree[20]||0!==b.dyn_ltree[26])return B;for(c=32;ce;e++){Q[e]=d;for(c=0;c<1<e;e++){W[e]=d;for(c=0;c<1<>=7;e=c;)O[2*c+1]=8,c++,h[8]++;for(;255>=c;)O[2*c+1]=9,c++,h[9]++;for(;279>=c;)O[2*c+1]=7,c++,h[7]++;for(;287>=c;)O[2*c+1]=8,c++,h[8]++;n(O,F+1,h);for(c=0;c>>3;g=b.static_len+3+7>>>3;g<=f&&(f=g)}else f=g=d+5;if(d+4<=f&&-1!==c)J(b,c,d,e); else if(4===b.strategy||g===f)k(b,2+(e?1:0),3),w(b,O,R);else{k(b,4+(e?1:0),3);c=b.l_desc.max_code+1;d=b.d_desc.max_code+1;h+=1;k(b,c-257,5);k(b,d-1,5);k(b,h-4,4);for(f=0;f>>8&255,b.pending_buf[b.d_buf+2*b.last_lit+1]=255&c,b.pending_buf[b.l_buf+b.last_lit]=255&d,b.last_lit++,0===c?b.dyn_ltree[2*d]++:(b.matches++, c--,b.dyn_ltree[2*(ba[d]+C+1)]++,b.dyn_dtree[2*(256>c?$[c]:$[256+(c>>>7)])]++),b.last_lit===b.lit_bufsize-1};d._tr_align=function(b){k(b,2,3);l(b,x,O);16===b.bi_valid?(h(b,b.bi_buf),b.bi_buf=0,b.bi_valid=0):8<=b.bi_valid&&(b.pending_buf[b.pending++]=255&b.bi_buf,b.bi_buf>>=8,b.bi_valid-=8)}},{"../utils/common":3}],15:[function(b,c,d){c.exports=function(){this.input=null;this.total_in=this.avail_in=this.next_in=0;this.output=null;this.total_out=this.avail_out=this.next_out=0;this.msg="";this.state= null;this.data_type=2;this.adler=0}},{}],"/":[function(b,c,d){d=b("./lib/utils/common").assign;var e=b("./lib/deflate"),f=b("./lib/inflate");b=b("./lib/zlib/constants");var g={};d(g,e,f,b);c.exports=g},{"./lib/deflate":1,"./lib/inflate":2,"./lib/utils/common":3,"./lib/zlib/constants":6}]},{},[])("/")});var JSON;JSON||(JSON={}); (function(){function a(a){return 10>a?"0"+a:a}function b(a){e.lastIndex=0;return e.test(a)?'"'+a.replace(e,function(a){var b=h[a];return"string"===typeof b?b:"\\u"+("0000"+a.charCodeAt(0).toString(16)).slice(-4)})+'"':'"'+a+'"'}function c(a,d){var e,h,r,q,s=f,w,t=d[a];t&&"object"===typeof t&&"function"===typeof t.toJSON&&(t=t.toJSON(a));"function"===typeof k&&(t=k.call(d,a,t));switch(typeof t){case "string":return b(t);case "number":return isFinite(t)?""+t:"null";case "boolean":case "null":return""+t; case "object":if(!t)return"null";f+=g;w=[];if("[object Array]"===Object.prototype.toString.apply(t)){q=t.length;for(e=0;enavigator.userAgent.indexOf("MSIE")&& 0>navigator.userAgent.indexOf("Edge/"),IS_OP:0<=navigator.userAgent.indexOf("Opera/")||0<=navigator.userAgent.indexOf("OPR/"),IS_OT:0<=navigator.userAgent.indexOf("Presto/")&&0>navigator.userAgent.indexOf("Presto/2.4.")&&0>navigator.userAgent.indexOf("Presto/2.3.")&&0>navigator.userAgent.indexOf("Presto/2.2.")&&0>navigator.userAgent.indexOf("Presto/2.1.")&&0>navigator.userAgent.indexOf("Presto/2.0.")&&0>navigator.userAgent.indexOf("Presto/1."),IS_SF:0<=navigator.userAgent.indexOf("AppleWebKit/")&& 0>navigator.userAgent.indexOf("Chrome/")&&0>navigator.userAgent.indexOf("Edge/"),IS_IOS:navigator.userAgent.match(/(iPad|iPhone|iPod)/g)?!0:!1,IS_GC:0<=navigator.userAgent.indexOf("Chrome/")&&0>navigator.userAgent.indexOf("Edge/"),IS_CHROMEAPP:null!=window.chrome&&null!=chrome.app&&null!=chrome.app.runtime,IS_FF:0<=navigator.userAgent.indexOf("Firefox/"),IS_MT:0<=navigator.userAgent.indexOf("Firefox/")&&0>navigator.userAgent.indexOf("Firefox/1.")&&0>navigator.userAgent.indexOf("Firefox/2.")||0<=navigator.userAgent.indexOf("Iceweasel/")&& 0>navigator.userAgent.indexOf("Iceweasel/1.")&&0>navigator.userAgent.indexOf("Iceweasel/2.")||0<=navigator.userAgent.indexOf("SeaMonkey/")&&0>navigator.userAgent.indexOf("SeaMonkey/1.")||0<=navigator.userAgent.indexOf("Iceape/")&&0>navigator.userAgent.indexOf("Iceape/1."),IS_SVG:0<=navigator.userAgent.indexOf("Firefox/")||0<=navigator.userAgent.indexOf("Iceweasel/")||0<=navigator.userAgent.indexOf("Seamonkey/")||0<=navigator.userAgent.indexOf("Iceape/")||0<=navigator.userAgent.indexOf("Galeon/")|| 0<=navigator.userAgent.indexOf("Epiphany/")||0<=navigator.userAgent.indexOf("AppleWebKit/")||0<=navigator.userAgent.indexOf("Gecko/")||0<=navigator.userAgent.indexOf("Opera/")||null!=document.documentMode&&9<=document.documentMode,NO_FO:!document.createElementNS||"[object SVGForeignObjectElement]"!=document.createElementNS("http://www.w3.org/2000/svg","foreignObject")||0<=navigator.userAgent.indexOf("Opera/"),IS_VML:"MICROSOFT INTERNET EXPLORER"==navigator.appName.toUpperCase(),IS_WIN:0document.location.href.indexOf("http://")&&0>document.location.href.indexOf("https://"),isBrowserSupported:function(){return mxClient.IS_VML||mxClient.IS_SVG},link:function(a,b,c){c=c||document;if(mxClient.IS_IE6)c.write('\x3clink rel\x3d"'+a+'" href\x3d"'+b+'" charset\x3d"UTF-8" type\x3d"text/css"/\x3e');else{var d= c.createElement("link");d.setAttribute("rel",a);d.setAttribute("href",b);d.setAttribute("charset","UTF-8");d.setAttribute("type","text/css");c.getElementsByTagName("head")[0].appendChild(d)}},include:function(a){document.write('\x3cscript src\x3d"'+a+'"\x3e\x3c/script\x3e')},dispose:function(){for(var a=0;adocument.documentMode)&&(a="ms");return function(b,c,d){b[c]=d;null!=a&&0document.documentMode))switch(b.nodeType){case 1:var d=a.createElement(b.nodeName);if(b.attributes&&0/g,"\x26gt;");if(null==b||b)a=a.replace(/\n/g,"\x26#xa;");return a},isVml:function(a){return null!=a&&"urn:schemas-microsoft-com:vml"==a.tagUrn},getXml:function(a,b){var c="";null!=window.XMLSerializer?c=(new XMLSerializer).serializeToString(a):null!=a.xml&&(c=a.xml.replace(/\r\n\t[\t]*/g,"").replace(/>\r\n/g,"\x3e").replace(/\r\n/g,"\n"));return c=c.replace(/\n/g,b|| "\x26#xa;")},extractTextWithWhitespace:function(a){function b(a){if(!(1==a.length&&("BR"==a[0].nodeName||"\n"==a[0].innerHTML)))for(var f=0;fh&&(a.style.left=Math.max(e,h-c)+"px");b=parseInt(a.offsetTop);c=parseInt(a.offsetHeight);f=d+Math.max(f.clientHeight||0,g.clientHeight);b+c>f&&(a.style.top=Math.max(d,f-c)+"px")},load:function(a){a=new mxXmlRequest(a,null,"GET",!1);a.send();return a},get:function(a,b,c,d,e,f){a=new mxXmlRequest(a,null,"GET");null!=d&&a.setBinary(d);a.send(b,c,e,f);return a},getAll:function(a,b,c){for(var d=a.length,e=[],f=0,g=function(){0==f&&null!=c&&c();f++},h=0;hf||299mxUtils.indexOf(b,e)))d[e]=!c&&"object"==typeof a[e]?mxUtils.clone(a[e]):a[e]}return d},equalPoints:function(a,b){if(null==a&&null!=b||null!=a&&null==b||null!=a&&null!=b&&a.length!=b.length)return!1;if(null!= a&&null!=b)for(var c=0;ce&&(e+=2*Math.PI);g=2*e/Math.PI;g=Math.ceil(0>g?-1*g:g);e/=g;l=8/3*Math.sin(e/4)*Math.sin(e/4)/Math.sin(e/2);m=n*c;n*=d;c*=p;d*=p;for(var t=Math.cos(f),y=Math.sin(f),r=-l*(m*y+d*t),q=-l*(c*y-n*t),w=s=0,p=[],z=0;zc&&(a=3,-135>=c&&(a=2));if(0<=d.indexOf(mxConstants.DIRECTION_NORTH))switch(a){case 0:b|=mxConstants.DIRECTION_MASK_NORTH;break;case 1:b|=mxConstants.DIRECTION_MASK_EAST;break;case 2:b|=mxConstants.DIRECTION_MASK_SOUTH;break;case 3:b|=mxConstants.DIRECTION_MASK_WEST}if(0<=d.indexOf(mxConstants.DIRECTION_WEST))switch(a){case 0:b|=mxConstants.DIRECTION_MASK_WEST;break;case 1:b|=mxConstants.DIRECTION_MASK_NORTH;break;case 2:b|=mxConstants.DIRECTION_MASK_EAST;break; case 3:b|=mxConstants.DIRECTION_MASK_SOUTH}if(0<=d.indexOf(mxConstants.DIRECTION_SOUTH))switch(a){case 0:b|=mxConstants.DIRECTION_MASK_SOUTH;break;case 1:b|=mxConstants.DIRECTION_MASK_WEST;break;case 2:b|=mxConstants.DIRECTION_MASK_NORTH;break;case 3:b|=mxConstants.DIRECTION_MASK_EAST}if(0<=d.indexOf(mxConstants.DIRECTION_EAST))switch(a){case 0:b|=mxConstants.DIRECTION_MASK_EAST;break;case 1:b|=mxConstants.DIRECTION_MASK_SOUTH;break;case 2:b|=mxConstants.DIRECTION_MASK_WEST;break;case 3:b|=mxConstants.DIRECTION_MASK_NORTH}return b}, reversePortConstraints:function(a){var b=0,b=(a&mxConstants.DIRECTION_MASK_WEST)<<3,b=b|(a&mxConstants.DIRECTION_MASK_NORTH)<<1,b=b|(a&mxConstants.DIRECTION_MASK_SOUTH)>>1;return b|=(a&mxConstants.DIRECTION_MASK_EAST)>>3},findNearestSegment:function(a,b,c){var d=-1;if(0c.x&&(a=c.x,h=b.x);h>g&&(h=g);ah)return!1;var e=b.y,g=c.y,k=c.x-b.x;1E-7g&&(b=g,g=e,e=b);g>f&&(g=f);eg?!1:!0},contains:function(a,b,c){return a.x<=b&&a.x+a.width>=b&&a.y<=c&&a.y+a.height>=c},intersects:function(a,b){var c=a.width,d=a.height,e=b.width,f=b.height;if(0>=e||0>=f||0>=c||0>=d)return!1;var g=a.x,h=a.y,k=b.x,l=b.y,e=e+k,f=f+l,c=c+ g,d=d+h;return(eg)&&(fh)&&(ck)&&(dl)},intersectsHotspot:function(a,b,c,d,e,f){d=null!=d?d:1;e=null!=e?e:0;f=null!=f?f:0;if(0a.toLowerCase().indexOf("0x"))},isInteger:function(a){return String(parseInt(a))===String(a)},mod:function(a,b){return(a%b+b)%b},intersection:function(a,b,c,d,e,f,g,h){var k=(h-f)*(c-a)-(g-e)*(d-b);g=((g-e)*(b-f)-(h-f)*(a-e))/k;e=((c-a)*(b-f)-(d-b)*(a-e))/k;return 0<=g&&1>=g&&0<=e&&1>=e?new mxPoint(a+g*(c-a),b+g*(d-b)):null},ptSegDistSq:function(a,b,c,d,e,f){c-=a;d-=b;e-=a;f-=b;0>=e*c+f*d?c=0:(e=c-e,f=d-f,a=e*c+f*d,c=0>=a?0:a*a/(c*c+d*d));e=e*e+f*f-c;0>e&&(e=0); return e},ptLineDist:function(a,b,c,d,e,f){return Math.abs((d-b)*e-(c-a)*f+c*b-d*a)/Math.sqrt((d-b)*(d-b)+(c-a)*(c-a))},relativeCcw:function(a,b,c,d,e,f){c-=a;d-=b;e-=a;f-=b;a=e*d-f*c;0==a&&(a=e*c+f*d,0a&&(a=0)));return 0>a?-1:0document.documentMode)?a.style.filter=100<=b?"":"alpha(opacity\x3d"+b+")":a.style.opacity=b/100},createImage:function(a){var b=null;mxClient.IS_IE6&&"CSS1Compat"!=document.compatMode?(b=document.createElement(mxClient.VML_PREFIX+":image"),b.setAttribute("src",a),b.style.borderStyle="none"):(b=document.createElement("img"),b.setAttribute("src",a),b.setAttribute("border", "0"));return b},sortCells:function(a,b){b=null!=b?b:!0;var c=new mxDictionary;a.sort(function(a,e){var f=c.get(a);null==f&&(f=mxCellPath.create(a).split(mxCellPath.PATH_SEPARATOR),c.put(a,f));var g=c.get(e);null==g&&(g=mxCellPath.create(e).split(mxCellPath.PATH_SEPARATOR),c.put(e,g));f=mxCellPath.compare(f,g);return 0==f?0:0a.indexOf("\x3d"))?a:""},getStylenames:function(a){var b=[];if(null!=a){a=a.split(";");for(var c= 0;ca[c].indexOf("\x3d")&&b.push(a[c])}return b},indexOfStylename:function(a,b){if(null!=a&&null!=b)for(var c=a.split(";"),d=0,e=0;emxUtils.indexOfStylename(a,b)&&(null==a?a="":0e?";":a.substring(e)):0>e||e==a.length-1?"":a.substring(e+1)}else{var f=a.indexOf(";"+b+"\x3d");0>f?d&&(d=";"==a.charAt(a.length-1)?"":";",a=a+d+b+"\x3d"+c+";"):(e=a.indexOf(";",f+1),a=d?a.substring(0,f+1)+b+"\x3d"+c+(0>e?";":a.substring(e)):a.substring(0,f)+(0>e?";":a.substring(e)))}return a},setCellStyleFlags:function(a,b,c,d,e){if(null!=b&&0e)e=";"==a.charAt(a.length-1)?"":";",a=d||null==d?a+e+b+"\x3d"+c:a+e+b+"\x3d0";else{var f=a.indexOf(";",e),g="",g=0>f?a.substring(e+b.length+1):a.substring(e+b.length+1,f),g=null==d?parseInt(g)^c:d?parseInt(g)|c:parseInt(g)&~c;a=a.substring(0,e)+b+"\x3d"+g+(0<=f?a.substring(f):"")}}return a},getAlignmentAsPoint:function(a,b){var c= 0,d=0;a==mxConstants.ALIGN_CENTER?c=-0.5:a==mxConstants.ALIGN_RIGHT&&(c=-1);b==mxConstants.ALIGN_MIDDLE?d=-0.5:b==mxConstants.ALIGN_BOTTOM&&(d=-1);return new mxPoint(c,d)},getSizeForString:function(a,b,c,d){b=null!=b?b:mxConstants.DEFAULT_FONTSIZE;c=null!=c?c:mxConstants.DEFAULT_FONTFAMILY;var e=document.createElement("div");e.style.fontFamily=c;e.style.fontSize=Math.round(b)+"px";e.style.lineHeight=Math.round(b*mxConstants.LINE_HEIGHT)+"px";e.style.position="absolute";e.style.visibility="hidden"; e.style.display=mxClient.IS_QUIRKS?"inline":"inline-block";e.style.zoom="1";null!=d?(e.style.width=d+"px",e.style.whiteSpace="normal"):e.style.whiteSpace="nowrap";e.innerHTML=a;document.body.appendChild(e);a=new mxRectangle(0,0,e.offsetWidth,e.offsetHeight);document.body.removeChild(e);return a},getViewXml:function(a,b,c,d,e){d=null!=d?d:0;e=null!=e?e:0;b=null!=b?b:1;null==c&&(c=[a.getModel().getRoot()]);var f=a.getView(),g=null,h=f.isEventsEnabled();f.setEventsEnabled(!1);var k=f.drawPane,l=f.overlayPane; a.dialect==mxConstants.DIALECT_SVG?(f.drawPane=document.createElementNS(mxConstants.NS_SVG,"g"),f.canvas.appendChild(f.drawPane),f.overlayPane=document.createElementNS(mxConstants.NS_SVG,"g")):(f.drawPane=f.drawPane.cloneNode(!1),f.canvas.appendChild(f.drawPane),f.overlayPane=f.overlayPane.cloneNode(!1));f.canvas.appendChild(f.overlayPane);var m=f.getTranslate();f.translate=new mxPoint(d,e);b=new mxTemporaryCellStates(a.getView(),b,c);try{g=(new mxCodec).encode(a.getView())}finally{b.destroy(),f.translate= m,f.canvas.removeChild(f.drawPane),f.canvas.removeChild(f.overlayPane),f.drawPane=k,f.overlayPane=l,f.setEventsEnabled(h)}return g},getScaleForPageCount:function(a,b,c,d){if(1>a)return 1;c=null!=c?c:mxConstants.PAGE_FORMAT_A4_PORTRAIT;d=null!=d?d:0;var e=c.width-2*d;c=c.height-2*d;d=b.getGraphBounds().clone();b=b.getView().getScale();d.width/=b;d.height/=b;b=d.width;c=b/d.height/(e/c);d=Math.sqrt(a);var f=Math.sqrt(c);c=d*f;d/=f;if(1>c&&d>a){var g=d/a;d=a;c/=g}1>d&&c>a&&(g=c/a,c=a,d/=g);g=Math.ceil(c)* Math.ceil(d);for(f=0;g>a;){var g=Math.floor(c)/c,h=Math.floor(d)/d;1==g&&(g=Math.floor(c-1)/c);1==h&&(h=Math.floor(d-1)/d);g=g>h?g:h;c*=g;d*=g;g=Math.ceil(c)*Math.ceil(d);f++;if(10document.documentMode)?function(a){mxEvent.addListener(a, "contextmenu",function(){return!1})}:function(a){a.setAttribute("oncontextmenu","return false;")}}(),getSource:function(a){return null!=a.srcElement?a.srcElement:a.target},isConsumed:function(a){return null!=a.isConsumed&&a.isConsumed},isTouchEvent:function(a){return null!=a.pointerType?"touch"==a.pointerType||a.pointerType===a.MSPOINTER_TYPE_TOUCH:null!=a.mozInputSource?5==a.mozInputSource:0==a.type.indexOf("touch")},isMultiTouchEvent:function(a){return null!=a.type&&0==a.type.indexOf("touch")&& null!=a.touches&&1this.dx&&Math.abs(this.dx)this.dy&&Math.abs(this.dy)e.x+(document.body.clientWidth||f.clientWidth))b.div.style.left=a.div.offsetLeft-d+(mxClient.IS_IE?6:-6)+"px";mxUtils.fit(b.div)}}; mxPopupMenu.prototype.addSeparator=function(a,b){a=a||this;if(this.smartSeparators&&!b)a.willAddSeparator=!0;else if(null!=a.tbody){a.willAddSeparator=!1;var c=document.createElement("tr"),d=document.createElement("td");d.className="mxPopupMenuIcon";d.style.padding="0 0 0 0px";c.appendChild(d);d=document.createElement("td");d.style.padding="0 0 0 0px";d.setAttribute("colSpan","2");var e=document.createElement("hr");e.setAttribute("size","1");d.appendChild(e);c.appendChild(d);a.tbody.appendChild(c)}}; mxPopupMenu.prototype.popup=function(a,b,c,d){if(null!=this.div&&null!=this.tbody&&null!=this.factoryMethod){this.div.style.left=a+"px";for(this.div.style.top=b+"px";null!=this.tbody.firstChild;)mxEvent.release(this.tbody.firstChild),this.tbody.removeChild(this.tbody.firstChild);this.itemCount=0;this.factoryMethod(this,c,d);0c?";stop-opacity:"+c:"";e=this.createElement("stop"); e.setAttribute("offset","0%");e.setAttribute("style","stop-color:"+a+c);f.appendChild(e);c=1>d?";stop-opacity:"+d:"";e=this.createElement("stop");e.setAttribute("offset","100%");e.setAttribute("style","stop-color:"+b+c);f.appendChild(e);return f}; mxSvgCanvas2D.prototype.addNode=function(a,b){var c=this.node,d=this.state;if(null!=c){if("path"==c.nodeName)if(null!=this.path&&0a.alpha||1>a.fillAlpha)&&this.node.setAttribute("fill-opacity",a.alpha*a.fillAlpha);if(null!=a.fillColor)if(null!=a.gradientColor)if(a=this.getSvgGradient(a.fillColor,a.gradientColor,a.gradientFillAlpha,a.gradientAlpha,a.gradientDirection),!mxClient.IS_CHROME_APP&&!mxClient.IS_IE&&!mxClient.IS_IE11&&!mxClient.IS_EDGE&&this.root.ownerDocument==document){var b=this.getBaseUrl().replace(/([\(\)])/g,"\\$1");this.node.setAttribute("fill", "url("+b+"#"+a+")")}else this.node.setAttribute("fill","url(#"+a+")");else this.node.setAttribute("fill",a.fillColor.toLowerCase())};mxSvgCanvas2D.prototype.getCurrentStrokeWidth=function(){return Math.max(1,this.format(this.state.strokeWidth*this.state.scale))}; mxSvgCanvas2D.prototype.updateStroke=function(){var a=this.state;this.node.setAttribute("stroke",a.strokeColor.toLowerCase());(1>a.alpha||1>a.strokeAlpha)&&this.node.setAttribute("stroke-opacity",a.alpha*a.strokeAlpha);var b=this.getCurrentStrokeWidth();1!=b&&this.node.setAttribute("stroke-width",b);"path"==this.node.nodeName&&this.updateStrokeAttributes();a.dashed&&this.node.setAttribute("stroke-dasharray",this.createDashPattern(a.strokeWidth*a.scale))}; mxSvgCanvas2D.prototype.updateStrokeAttributes=function(){var a=this.state;null!=a.lineJoin&&"miter"!=a.lineJoin&&this.node.setAttribute("stroke-linejoin",a.lineJoin);if(null!=a.lineCap){var b=a.lineCap;"flat"==b&&(b="butt");"butt"!=b&&this.node.setAttribute("stroke-linecap",b)}null!=a.miterLimit&&(!this.styleEnabled||10!=a.miterLimit)&&this.node.setAttribute("stroke-miterlimit",a.miterLimit)}; mxSvgCanvas2D.prototype.createDashPattern=function(a){var b=[];if("string"===typeof this.state.dashPattern){var c=this.state.dashPattern.split(" ");if(0k.alpha||1>k.fillAlpha)&&l.setAttribute("opacity",k.alpha*k.fillAlpha);e=this.state.transform||"";if(g||h){var m=f=1,n=0,p=0;g&&(f=-1,n=-c-2*a);h&&(m=-1,p=-d-2*b);e+="scale("+f+","+m+")translate("+n*k.scale+","+p*k.scale+")"}0/g,"\x26gt;");a=b.value.replace(/&/g,"\x26amp;").replace(/&lt;/g, "\x26lt;").replace(/&gt;/g,"\x26gt;").replace(/&amp;/g,"\x26amp;").replace(/
/g,"\x3cbr /\x3e").replace(/
/g,"\x3chr /\x3e").replace(/(]+)>/gm,"$1 /\x3e")}return a}; mxSvgCanvas2D.prototype.createDiv=function(a,b,c,d,e){c=this.state;d="display:inline-block;font-size:"+c.fontSize+"px;font-family:"+c.fontFamily+";color:"+c.fontColor+";line-height:"+(mxConstants.ABSOLUTE_LINE_HEIGHT?c.fontSize*mxConstants.LINE_HEIGHT+"px":mxConstants.LINE_HEIGHT*this.lineHeightCorrection)+";"+d;(c.fontStyle&mxConstants.FONT_BOLD)==mxConstants.FONT_BOLD&&(d+="font-weight:bold;");(c.fontStyle&mxConstants.FONT_ITALIC)==mxConstants.FONT_ITALIC&&(d+="font-style:italic;");(c.fontStyle& mxConstants.FONT_UNDERLINE)==mxConstants.FONT_UNDERLINE&&(d+="text-decoration:underline;");b==mxConstants.ALIGN_CENTER?d+="text-align:center;":b==mxConstants.ALIGN_RIGHT&&(d+="text-align:right;");b="";null!=c.fontBackgroundColor&&(b+="background-color:"+c.fontBackgroundColor+";");null!=c.fontBorderColor&&(b+="border:1px solid "+c.fontBorderColor+";");mxUtils.isNode(a)||(a=this.convertHtml(a),"fill"!=e&&"width"!=e?a='\x3cdiv xmlns\x3d"http://www.w3.org/1999/xhtml" style\x3d"display:inline-block;text-align:inherit;text-decoration:inherit;'+ b+'"\x3e'+a+"\x3c/div\x3e":d+=b);if(!mxClient.IS_IE&&document.createElementNS)return e=document.createElementNS("http://www.w3.org/1999/xhtml","div"),e.setAttribute("style",d),mxUtils.isNode(a)?this.root.ownerDocument!=document?e.appendChild(a.cloneNode(!0)):e.appendChild(a):e.innerHTML=a,e;mxUtils.isNode(a)&&this.root.ownerDocument!=document&&(a=a.outerHTML);return mxUtils.parseXml('\x3cdiv xmlns\x3d"http://www.w3.org/1999/xhtml" style\x3d"'+d+'"\x3e'+a+"\x3c/div\x3e").documentElement}; mxSvgCanvas2D.prototype.invalidateCachedOffsetSize=function(a){delete a.firstChild.mxCachedOffsetWidth;delete a.firstChild.mxCachedFinalOffsetWidth;delete a.firstChild.mxCachedFinalOffsetHeight}; mxSvgCanvas2D.prototype.updateText=function(a,b,c,d,e,f,g,h,k,l,m){if(null!=m&&null!=m.firstChild&&null!=m.firstChild.firstChild&&null!=m.firstChild.firstChild.firstChild){m=m.firstChild;var n=m.firstChild,p=n.firstChild;l=null!=l?l:0;var r=this.state;a+=r.dx;b+=r.dy;k?(p.style.maxHeight=Math.round(d)+"px",p.style.maxWidth=Math.round(c)+"px"):"fill"==h?(p.style.width=Math.round(c+1)+"px",p.style.height=Math.round(d+1)+"px"):"width"==h&&(p.style.width=Math.round(c+1)+"px",0r.alpha&&s.setAttribute("opacity",r.alpha);var w=this.createElement("foreignObject");w.setAttribute("style","overflow:visible;");w.setAttribute("pointer-events","all");q=this.createDiv(e,f,g,q,l);if(null!=q){null!=p&&q.setAttribute("dir",p);s.appendChild(w);this.root.appendChild(s);var t=0,y=0;p=t=2;if(mxClient.IS_IE&&(9==document.documentMode||!mxClient.IS_SVG)){var z= document.createElement("div");z.style.cssText=q.getAttribute("style");z.style.display=mxClient.IS_QUIRKS?"inline":"inline-block";z.style.position="absolute";z.style.visibility="hidden";y=document.createElement("div");y.style.display=mxClient.IS_QUIRKS?"inline":"inline-block";y.style.wordWrap=mxConstants.WORD_WRAP;y.innerHTML=mxUtils.isNode(e)?e.outerHTML:e;z.appendChild(y);document.body.appendChild(z);8!=document.documentMode&&(9!=document.documentMode&&null!=r.fontBorderColor)&&(t+=2,p+=2);if(h&& 0r.alpha&&s.setAttribute("opacity",r.alpha);p=q=0;f==mxConstants.ALIGN_CENTER?q-=c/2:f==mxConstants.ALIGN_RIGHT&&(q-=c);a+=q;g==mxConstants.ALIGN_MIDDLE? p-=d/2:g==mxConstants.ALIGN_BOTTOM&&(p-=d);"fill"!=l&&(mxClient.IS_FF&&mxClient.IS_WIN)&&(p-=2);b+=p;z=1!=r.scale?"scale("+r.scale+")":"";0!=r.rotation&&this.rotateHtml?(z+="rotate("+r.rotation+","+c/2+","+d/2+")",b=this.rotatePoint((a+c/2)*r.scale,(b+d/2)*r.scale,r.rotation,r.rotationCx,r.rotationCy),a=b.x-c*r.scale/2,b=b.y-d*r.scale/2):(a*=r.scale,b*=r.scale);0!=n&&(z+="rotate("+n+","+-q+","+-p+")");s.setAttribute("transform","translate("+(Math.round(a)+this.foOffset)+","+(Math.round(b)+this.foOffset)+ ")"+z);w.setAttribute("width",Math.round(Math.max(1,c)));w.setAttribute("height",Math.round(Math.max(1,d)));this.root.ownerDocument!=document&&(a=this.createAlternateContent(w,a,b,c,d,e,f,g,h,k,l,m,n),null!=a&&(w.setAttribute("requiredFeatures","http://www.w3.org/TR/SVG11/feature#Extensibility"),c=this.createElement("switch"),c.appendChild(w),c.appendChild(a),s.appendChild(c)))}}else this.plainText(a,b,c,d,e,f,g,h,l,m,n,p)}}; mxSvgCanvas2D.prototype.createClip=function(a,b,c,d){a=Math.round(a);b=Math.round(b);c=Math.round(c);d=Math.round(d);for(var e="mx-clip-"+a+"-"+b+"-"+c+"-"+d,f=0,g=e+"-"+f;null!=document.getElementById(g);)g=e+"-"+ ++f;clip=this.createElement("clipPath");clip.setAttribute("id",g);e=this.createElement("rect");e.setAttribute("x",a);e.setAttribute("y",b);e.setAttribute("width",c);e.setAttribute("height",d);clip.appendChild(e);return clip}; mxSvgCanvas2D.prototype.plainText=function(a,b,c,d,e,f,g,h,k,l,m,n){m=null!=m?m:0;h=this.state;var p=h.fontSize,r=this.createElement("g"),q=h.transform||"";this.updateFont(r);0!=m&&(q+="rotate("+m+","+this.format(a*h.scale)+","+this.format(b*h.scale)+")");null!=n&&r.setAttribute("direction",n);l&&(0h.alpha&&r.setAttribute("opacity",h.alpha);q=e.split("\n");n=Math.round(p*mxConstants.LINE_HEIGHT);var s=p+(q.length-1)*n;m=b+p-1;g==mxConstants.ALIGN_MIDDLE?"fill"==k?m-=d/2:(l=(this.matchHtmlAlignment&&l&&0a.alpha||1>a.fillAlpha)b.opacity=100*a.alpha*a.fillAlpha+"%";return b}; mxVmlCanvas2D.prototype.createStroke=function(){var a=this.state,b=this.createVmlElement("stroke");b.endcap=a.lineCap||"flat";b.joinstyle=a.lineJoin||"miter";b.miterlimit=a.miterLimit||"10";if(1>a.alpha||1>a.strokeAlpha)b.opacity=100*a.alpha*a.strokeAlpha+"%";a.dashed&&(b.dashstyle=this.getVmlDashStyle());return b};mxVmlCanvas2D.prototype.getVmlDashStyle=function(){var a="dash";if("string"===typeof this.state.dashPattern){var b=this.state.dashPattern.split(" ");0this.state.alpha||1>this.state.fillAlpha)k.style.filter+="alpha(opacity\x3d"+100*this.state.alpha*this.state.fillAlpha+")";this.root.appendChild(k)}; mxVmlCanvas2D.prototype.createDiv=function(a,b,c,d){c=this.createElement("div");var e=this.state,f="";null!=e.fontBackgroundColor&&(f+="background-color:"+e.fontBackgroundColor+";");null!=e.fontBorderColor&&(f+="border:1px solid "+e.fontBorderColor+";");mxUtils.isNode(a)?c.appendChild(a):"fill"!=d&&"width"!=d?(d=this.createElement("div"),d.style.cssText=f,d.style.display=mxClient.IS_QUIRKS?"inline":"inline-block",d.style.zoom="1",d.style.textDecoration="inherit",d.innerHTML=a,c.appendChild(d)):(c.style.cssText= f,c.innerHTML=a);a=c.style;a.fontSize=e.fontSize/this.vmlScale+"px";a.fontFamily=e.fontFamily;a.color=e.fontColor;a.verticalAlign="top";a.textAlign=b||"left";a.lineHeight=mxConstants.ABSOLUTE_LINE_HEIGHT?e.fontSize*mxConstants.LINE_HEIGHT/this.vmlScale+"px":mxConstants.LINE_HEIGHT;(e.fontStyle&mxConstants.FONT_BOLD)==mxConstants.FONT_BOLD&&(a.fontWeight="bold");(e.fontStyle&mxConstants.FONT_ITALIC)==mxConstants.FONT_ITALIC&&(a.fontStyle="italic");(e.fontStyle&mxConstants.FONT_UNDERLINE)==mxConstants.FONT_UNDERLINE&& (a.textDecoration="underline");return c}; mxVmlCanvas2D.prototype.text=function(a,b,c,d,e,f,g,h,k,l,m,n,p){if(this.textEnabled&&null!=e){var r=this.state;if("html"==k){null!=r.rotation&&(b=this.rotatePoint(a,b,r.rotation,r.rotationCx,r.rotationCy),a=b.x,b=b.y);8==document.documentMode&&!mxClient.IS_EM?(a+=r.dx,b+=r.dy,"fill"!=l&&g==mxConstants.ALIGN_TOP&&(b-=1)):(a*=r.scale,b*=r.scale);k=8==document.documentMode&&!mxClient.IS_EM?this.createVmlElement("group"):this.createElement("div");k.style.position="absolute";k.style.display="inline"; k.style.left=this.format(a)+"px";k.style.top=this.format(b)+"px";k.style.zoom=r.scale;var q=this.createElement("div");q.style.position="relative";q.style.display="inline";var s=mxUtils.getAlignmentAsPoint(f,g),w=s.x,s=s.y;e=this.createDiv(e,f,g,l);f=this.createElement("div");null!=p&&e.setAttribute("dir",p);if(h&&0t&&(t+=2*Math.PI);t%=Math.PI;t>Math.PI/2&&(t=Math.PI-t);g=Math.cos(t);var y=Math.sin(t);8==document.documentMode&&!mxClient.IS_EM&&(e.style.display="inline-block",f.style.display="inline-block",q.style.display="inline-block");e.style.visibility="hidden";e.style.position="absolute";document.body.appendChild(e);q=e;null!=q.firstChild&&"DIV"==q.firstChild.nodeName&&(q=q.firstChild);t=q.offsetWidth+3;q=q.offsetHeight;m?(c=Math.min(c,t), q=Math.min(q,d)):c=t;h&&(e.style.width=c+"px");if(mxClient.IS_QUIRKS&&(m||"width"==l)&&q>d)q=d,e.style.height=q+"px";d=q;m=(d-d*g+c*-y)/2-p*c*(w+0.5)+n*d*(s+0.5);h=(c-c*g+d*-y)/2+n*c*(w+0.5)+p*d*(s+0.5);"group"==k.nodeName&&"DIV"==this.root.nodeName?(l=this.createElement("div"),l.style.display="inline-block",l.style.position="absolute",l.style.left=this.format(a+(h-c/2)*r.scale)+"px",l.style.top=this.format(b+(m-d/2)*r.scale)+"px",k.parentNode.appendChild(l),l.appendChild(k)):(r=8==document.documentMode&& !mxClient.IS_EM?1:r.scale,k.style.left=this.format(a+(h-c/2)*r)+"px",k.style.top=this.format(b+(m-d/2)*r)+"px");f.style.filter="progid:DXImageTransform.Microsoft.Matrix(M11\x3d"+n+", M12\x3d"+p+", M21\x3d"+-p+", M22\x3d"+n+", sizingMethod\x3d'auto expand')";f.style.backgroundColor=this.rotatedHtmlBackground;1>this.state.alpha&&(f.style.filter+="alpha(opacity\x3d"+100*this.state.alpha+")");f.appendChild(e);e.style.position="";e.style.visibility=""}else 8!=document.documentMode||mxClient.IS_EM?(e.style.verticalAlign= "top",1>this.state.alpha&&(k.style.filter="alpha(opacity\x3d"+100*this.state.alpha+")"),r=e.parentNode,e.style.visibility="hidden",document.body.appendChild(e),c=e.offsetWidth,q=e.offsetHeight,mxClient.IS_QUIRKS&&(m&&q>d)&&(q=d,e.style.height=q+"px"),d=q,e.style.visibility="",r.appendChild(e),k.style.left=this.format(a+c*w*this.state.scale)+"px",k.style.top=this.format(b+d*s*this.state.scale)+"px"):(1>this.state.alpha&&(e.style.filter="alpha(opacity\x3d"+100*this.state.alpha+")"),q.style.left=100* w+"%",q.style.top=100*s+"%")}else this.plainText(a,b,c,d,mxUtils.htmlEntities(e,!1),f,g,h,k,l,m,n,p)}}; mxVmlCanvas2D.prototype.plainText=function(a,b,c,d,e,f,g,h,k,l,m,n,p){h=this.state;a=(a+h.dx)*h.scale;b=(b+h.dy)*h.scale;c=this.createVmlElement("shape");c.style.width="1px";c.style.height="1px";c.stroked="false";d=this.createVmlElement("fill");d.color=h.fontColor;d.opacity=100*h.alpha+"%";c.appendChild(d);d=this.createVmlElement("path");d.textpathok="true";d.v="m "+this.format(0)+" "+this.format(0)+" l "+this.format(1)+" "+this.format(0);c.appendChild(d);d=this.createVmlElement("textpath");d.style.cssText= "v-text-align:"+f;d.style.align=f;d.style.fontFamily=h.fontFamily;d.string=e;d.on="true";f=h.fontSize*h.scale/this.vmlScale;d.style.fontSize=f+"px";(h.fontStyle&mxConstants.FONT_BOLD)==mxConstants.FONT_BOLD&&(d.style.fontWeight="bold");(h.fontStyle&mxConstants.FONT_ITALIC)==mxConstants.FONT_ITALIC&&(d.style.fontStyle="italic");(h.fontStyle&mxConstants.FONT_UNDERLINE)==mxConstants.FONT_UNDERLINE&&(d.style.textDecoration="underline");e=e.split("\n");h=f+(e.length-1)*f*mxConstants.LINE_HEIGHT;f=e=0; g==mxConstants.ALIGN_BOTTOM?f=-h/2:g!=mxConstants.ALIGN_MIDDLE&&(f=h/2);null!=n&&(c.style.rotation=n,g=n*(Math.PI/180),e=Math.sin(g)*f,f*=Math.cos(g));c.appendChild(d);c.style.left=this.format(a-e)+"px";c.style.top=this.format(b+f)+"px";this.root.appendChild(c)};mxVmlCanvas2D.prototype.stroke=function(){this.addNode(!1,!0)};mxVmlCanvas2D.prototype.fill=function(){this.addNode(!0,!1)};mxVmlCanvas2D.prototype.fillAndStroke=function(){this.addNode(!0,!0)}; function mxStencil(a){this.desc=a;this.parseDescription();this.parseConstraints()}mxStencil.defaultLocalized=!1;mxStencil.allowEval=!1;mxStencil.prototype.desc=null;mxStencil.prototype.constraints=null;mxStencil.prototype.aspect=null;mxStencil.prototype.w0=null;mxStencil.prototype.h0=null;mxStencil.prototype.bgNode=null;mxStencil.prototype.fgNode=null;mxStencil.prototype.strokewidth=null; mxStencil.prototype.parseDescription=function(){this.fgNode=this.desc.getElementsByTagName("foreground")[0];this.bgNode=this.desc.getElementsByTagName("background")[0];this.w0=Number(this.desc.getAttribute("w")||100);this.h0=Number(this.desc.getAttribute("h")||100);var a=this.desc.getAttribute("aspect");this.aspect=null!=a?a:"variable";a=this.desc.getAttribute("strokewidth");this.strokewidth=null!=a?a:"1"}; mxStencil.prototype.parseConstraints=function(){var a=this.desc.getElementsByTagName("connections")[0];if(null!=a&&(a=mxUtils.getChildNodes(a),null!=a&&0this.opacity&&(b+="alpha(opacity\x3d"+this.opacity+")");this.isShadow&&(b+="progid:DXImageTransform.Microsoft.dropShadow (OffX\x3d'"+Math.round(mxConstants.SHADOW_OFFSET_X*this.scale)+"', OffY\x3d'"+Math.round(mxConstants.SHADOW_OFFSET_Y*this.scale)+"', Color\x3d'"+mxConstants.VML_SHADOWCOLOR+"')");if(null!=this.fill&&this.fill!=mxConstants.NONE&&this.gradient&&this.gradient!=mxConstants.NONE){var c=this.fill,d=this.gradient,e="0",f={east:0, south:1,west:2,north:3},g=null!=this.direction?f[this.direction]:0;null!=this.gradientDirection&&(g=mxUtils.mod(g+f[this.gradientDirection]-1,4));1==g?(e="1",f=c,c=d,d=f):2==g?(f=c,c=d,d=f):3==g&&(e="1");b+="progid:DXImageTransform.Microsoft.gradient(startColorStr\x3d'"+c+"', endColorStr\x3d'"+d+"', gradientType\x3d'"+e+"')"}a.style.filter=b}; mxShape.prototype.updateHtmlColors=function(a){var b=this.stroke;null!=b&&b!=mxConstants.NONE?(a.style.borderColor=b,this.isDashed?a.style.borderStyle="dashed":0=document.documentMode)?this.updateHtmlFilter():this.updateHtmlTransform(),this.updateBoundingBox();else{var a=this.createCanvas(); null!=a&&null!=a.updateText&&null!=a.invalidateCachedOffsetSize?(this.paint(a,!0),this.destroyCanvas(a),this.updateBoundingBox()):mxShape.prototype.redraw.apply(this,arguments)}else mxShape.prototype.redraw.apply(this,arguments),mxUtils.isNode(this.value)||this.dialect==mxConstants.DIALECT_STRICTHTML?this.lastValue=this.value:this.lastValue=null}; mxText.prototype.resetStyles=function(){mxShape.prototype.resetStyles.apply(this,arguments);this.color="black";this.align=mxConstants.ALIGN_CENTER;this.valign=mxConstants.ALIGN_MIDDLE;this.family=mxConstants.DEFAULT_FONTFAMILY;this.size=mxConstants.DEFAULT_FONTSIZE;this.fontStyle=mxConstants.DEFAULT_FONTSTYLE;this.spacing=2;this.spacingLeft=this.spacingBottom=this.spacingRight=this.spacingTop=0;this.horizontal=!0;delete this.background;delete this.border;this.textDirection=mxConstants.DEFAULT_TEXT_DIRECTION; delete this.margin}; mxText.prototype.apply=function(a){mxShape.prototype.apply.apply(this,arguments);null!=this.style&&(this.fontStyle=mxUtils.getValue(this.style,mxConstants.STYLE_FONTSTYLE,this.fontStyle),this.family=mxUtils.getValue(this.style,mxConstants.STYLE_FONTFAMILY,this.family),this.size=mxUtils.getValue(this.style,mxConstants.STYLE_FONTSIZE,this.size),this.color=mxUtils.getValue(this.style,mxConstants.STYLE_FONTCOLOR,this.color),this.align=mxUtils.getValue(this.style,mxConstants.STYLE_ALIGN,this.align),this.valign= mxUtils.getValue(this.style,mxConstants.STYLE_VERTICAL_ALIGN,this.valign),this.spacing=mxUtils.getValue(this.style,mxConstants.STYLE_SPACING,this.spacing),this.spacingTop=mxUtils.getValue(this.style,mxConstants.STYLE_SPACING_TOP,this.spacingTop)+this.spacing,this.spacingRight=mxUtils.getValue(this.style,mxConstants.STYLE_SPACING_RIGHT,this.spacingRight)+this.spacing,this.spacingBottom=mxUtils.getValue(this.style,mxConstants.STYLE_SPACING_BOTTOM,this.spacingBottom)+this.spacing,this.spacingLeft=mxUtils.getValue(this.style, mxConstants.STYLE_SPACING_LEFT,this.spacingLeft)+this.spacing,this.horizontal=mxUtils.getValue(this.style,mxConstants.STYLE_HORIZONTAL,this.horizontal),this.background=mxUtils.getValue(this.style,mxConstants.STYLE_LABEL_BACKGROUNDCOLOR,this.background),this.border=mxUtils.getValue(this.style,mxConstants.STYLE_LABEL_BORDERCOLOR,this.border),this.textDirection=mxUtils.getValue(this.style,mxConstants.STYLE_TEXT_DIRECTION,mxConstants.DEFAULT_TEXT_DIRECTION),this.opacity=mxUtils.getValue(this.style,mxConstants.STYLE_TEXT_OPACITY, 100),this.updateMargin());this.flipH=this.flipV=null};mxText.prototype.getAutoDirection=function(){var a=/[A-Za-z\u05d0-\u065f\u066a-\u06ef\u06fa-\u07ff\ufb1d-\ufdff\ufe70-\ufefc]/.exec(this.value);return null!=a&&0=document.documentMode)?this.updateHtmlFilter():this.updateHtmlTransform()}; mxText.prototype.updateHtmlTransform=function(){var a=this.getTextRotation(),b=this.node.style,c=this.margin.x,d=this.margin.y;0!=a?(mxUtils.setPrefixedStyle(b,"transformOrigin",100*-c+"% "+100*-d+"%"),mxUtils.setPrefixedStyle(b,"transform","translate("+100*c+"%,"+100*d+"%)scale("+this.scale+") rotate("+a+"deg)")):(mxUtils.setPrefixedStyle(b,"transformOrigin","0% 0%"),mxUtils.setPrefixedStyle(b,"transform","scale("+this.scale+")translate("+100*c+"%,"+100*d+"%)"));b.left=Math.round(this.bounds.x-Math.ceil(c* ("fill"!=this.overflow&&"width"!=this.overflow?3:1)))+"px";b.top=Math.round(this.bounds.y-d*("fill"!=this.overflow?3:1))+"px";b.opacity=100>this.opacity?this.opacity/100:""}; mxText.prototype.updateInnerHtml=function(a){if(mxUtils.isNode(this.value))a.innerHTML=this.value.outerHTML;else{var b=this.value;this.dialect!=mxConstants.DIALECT_STRICTHTML&&(b=mxUtils.htmlEntities(b,!1));b=mxUtils.replaceTrailingNewlines(b,"\x3cdiv\x3e\x26nbsp;\x3c/div\x3e");b=this.replaceLinefeeds?b.replace(/\n/g,"\x3cbr/\x3e"):b;a.innerHTML='\x3cdiv style\x3d"display:inline-block;_display:inline;"\x3e'+b+"\x3c/div\x3e"}}; mxText.prototype.updateHtmlFilter=function(){var a=this.node.style,b=this.margin.x,c=this.margin.y,d=this.scale;mxUtils.setOpacity(this.node,this.opacity);var e=0,f=0,g=null!=this.state?this.state.view.textDiv:null,h=this.node;if(null!=g){g.style.overflow="";g.style.height="";g.style.width="";this.updateFont(g);this.updateSize(g,!1);this.updateInnerHtml(g);var k=Math.round(this.bounds.width/this.scale);this.wrap&&0l&&(l+=2*Math.PI);l%=Math.PI;l>Math.PI/2&&(l=Math.PI-l);var h=Math.cos(l),m=Math.sin(-l),b=k*-(b+0.5),n=g*-(c+0.5),p=(g-g*h+k*m)/2+f*b-e*n;0!=l&&(c="progid:DXImageTransform.Microsoft.Matrix(M11\x3d"+e+", M12\x3d"+f+", M21\x3d"+-f+", M22\x3d"+e+", sizingMethod\x3d'auto expand')",a.filter=null!=a.filter&&0=document.documentMode)&&0!=this.rotation?mxClient.VML_PREFIX+":image":"img");a.setAttribute("border","0");a.style.position="absolute";a.src=this.image;b=100>this.opacity?"alpha(opacity\x3d"+this.opacity+")":"";this.node.style.filter=b;this.flipH&&this.flipV?b+="progid:DXImageTransform.Microsoft.BasicImage(rotation\x3d2)":this.flipH?b+="progid:DXImageTransform.Microsoft.BasicImage(mirror\x3d1)": this.flipV&&(b+="progid:DXImageTransform.Microsoft.BasicImage(rotation\x3d2, mirror\x3d1)");a.style.filter!=b&&(a.style.filter=b);"image"==a.nodeName?a.style.rotation=this.rotation:0!=this.rotation?mxUtils.setPrefixedStyle(a.style,"transform","rotate("+this.rotation+"deg)"):mxUtils.setPrefixedStyle(a.style,"transform","");a.style.width=this.node.style.width;a.style.height=this.node.style.height;this.node.style.backgroundImage="";this.node.appendChild(a)}else this.setTransparentBackgroundImage(this.node)}; function mxLabel(a,b,c,d){mxRectangleShape.call(this,a,b,c,d)}mxUtils.extend(mxLabel,mxRectangleShape);mxLabel.prototype.imageSize=mxConstants.DEFAULT_IMAGESIZE;mxLabel.prototype.spacing=2;mxLabel.prototype.indicatorSize=10;mxLabel.prototype.indicatorSpacing=2;mxLabel.prototype.init=function(a){mxShape.prototype.init.apply(this,arguments);null!=this.indicatorShape&&(this.indicator=new this.indicatorShape,this.indicator.dialect=this.dialect,this.indicator.init(this.node))}; mxLabel.prototype.redraw=function(){null!=this.indicator&&(this.indicator.fill=this.indicatorColor,this.indicator.stroke=this.indicatorStrokeColor,this.indicator.gradient=this.indicatorGradientColor,this.indicator.direction=this.indicatorDirection);mxShape.prototype.redraw.apply(this,arguments)};mxLabel.prototype.isHtmlAllowed=function(){return mxRectangleShape.prototype.isHtmlAllowed.apply(this,arguments)&&null==this.indicatorColor&&null==this.indicatorShape}; mxLabel.prototype.paintForeground=function(a,b,c,d,e){this.paintImage(a,b,c,d,e);this.paintIndicator(a,b,c,d,e);mxRectangleShape.prototype.paintForeground.apply(this,arguments)};mxLabel.prototype.paintImage=function(a,b,c,d,e){null!=this.image&&(b=this.getImageBounds(b,c,d,e),a.image(b.x,b.y,b.width,b.height,this.image,!1,!1,!1))}; mxLabel.prototype.getImageBounds=function(a,b,c,d){var e=mxUtils.getValue(this.style,mxConstants.STYLE_IMAGE_ALIGN,mxConstants.ALIGN_LEFT),f=mxUtils.getValue(this.style,mxConstants.STYLE_IMAGE_VERTICAL_ALIGN,mxConstants.ALIGN_MIDDLE),g=mxUtils.getNumber(this.style,mxConstants.STYLE_IMAGE_WIDTH,mxConstants.DEFAULT_IMAGESIZE),h=mxUtils.getNumber(this.style,mxConstants.STYLE_IMAGE_HEIGHT,mxConstants.DEFAULT_IMAGESIZE),k=mxUtils.getNumber(this.style,mxConstants.STYLE_SPACING,this.spacing)+5;a=e==mxConstants.ALIGN_CENTER? a+(c-g)/2:e==mxConstants.ALIGN_RIGHT?a+(c-g-k):a+k;b=f==mxConstants.ALIGN_TOP?b+k:f==mxConstants.ALIGN_BOTTOM?b+(d-h-k):b+(d-h)/2;return new mxRectangle(a,b,g,h)};mxLabel.prototype.paintIndicator=function(a,b,c,d,e){null!=this.indicator?(this.indicator.bounds=this.getIndicatorBounds(b,c,d,e),this.indicator.paint(a)):null!=this.indicatorImage&&(b=this.getIndicatorBounds(b,c,d,e),a.image(b.x,b.y,b.width,b.height,this.indicatorImage,!1,!1,!1))}; mxLabel.prototype.getIndicatorBounds=function(a,b,c,d){var e=mxUtils.getValue(this.style,mxConstants.STYLE_IMAGE_ALIGN,mxConstants.ALIGN_LEFT),f=mxUtils.getValue(this.style,mxConstants.STYLE_IMAGE_VERTICAL_ALIGN,mxConstants.ALIGN_MIDDLE),g=mxUtils.getNumber(this.style,mxConstants.STYLE_INDICATOR_WIDTH,this.indicatorSize),h=mxUtils.getNumber(this.style,mxConstants.STYLE_INDICATOR_HEIGHT,this.indicatorSize),k=this.spacing+5;a=e==mxConstants.ALIGN_RIGHT?a+(c-g-k):e==mxConstants.ALIGN_CENTER?a+(c-g)/ 2:a+k;b=f==mxConstants.ALIGN_BOTTOM?b+(d-h-k):f==mxConstants.ALIGN_TOP?b+k:b+(d-h)/2;return new mxRectangle(a,b,g,h)}; mxLabel.prototype.redrawHtmlShape=function(){for(mxRectangleShape.prototype.redrawHtmlShape.apply(this,arguments);this.node.hasChildNodes();)this.node.removeChild(this.node.lastChild);if(null!=this.image){var a=document.createElement("img");a.style.position="relative";a.setAttribute("border","0");var b=this.getImageBounds(this.bounds.x,this.bounds.y,this.bounds.width,this.bounds.height);b.x-=this.bounds.x;b.y-=this.bounds.y;a.style.left=Math.round(b.x)+"px";a.style.top=Math.round(b.y)+"px";a.style.width= Math.round(b.width)+"px";a.style.height=Math.round(b.height)+"px";a.src=this.image;this.node.appendChild(a)}};function mxCylinder(a,b,c,d){mxShape.call(this);this.bounds=a;this.fill=b;this.stroke=c;this.strokewidth=null!=d?d:1}mxUtils.extend(mxCylinder,mxShape);mxCylinder.prototype.maxHeight=40;mxCylinder.prototype.svgStrokeTolerance=0; mxCylinder.prototype.paintVertexShape=function(a,b,c,d,e){a.translate(b,c);a.begin();this.redrawPath(a,b,c,d,e,!1);a.fillAndStroke();a.setShadow(!1);a.begin();this.redrawPath(a,b,c,d,e,!0);a.stroke()}; mxCylinder.prototype.redrawPath=function(a,b,c,d,e,f){b=Math.min(this.maxHeight,Math.round(e/5));if(f&&null!=this.fill||!f&&null==this.fill)a.moveTo(0,b),a.curveTo(0,2*b,d,2*b,d,b),f||(a.stroke(),a.begin());f||(a.moveTo(0,b),a.curveTo(0,-b/3,d,-b/3,d,b),a.lineTo(d,e-b),a.curveTo(d,e+b/3,0,e+b/3,0,e-b),a.close())};function mxConnector(a,b,c){mxPolyline.call(this,a,b,c)}mxUtils.extend(mxConnector,mxPolyline); mxConnector.prototype.updateBoundingBox=function(){this.useSvgBoundingBox=null!=this.style&&1==this.style[mxConstants.STYLE_CURVED];mxShape.prototype.updateBoundingBox.apply(this,arguments)};mxConnector.prototype.paintEdgeShape=function(a,b){var c=this.createMarker(a,b,!0),d=this.createMarker(a,b,!1);mxPolyline.prototype.paintEdgeShape.apply(this,arguments);a.setFillColor(this.stroke);a.setShadow(!1);a.setDashed(!1);null!=c&&c();null!=d&&d()}; mxConnector.prototype.createMarker=function(a,b,c){var d=null,e=b.length,f=mxUtils.getValue(this.style,c?mxConstants.STYLE_STARTARROW:mxConstants.STYLE_ENDARROW),g=c?b[1]:b[e-2],h=c?b[0]:b[e-1];if(null!=f&&null!=g&&null!=h){for(d=1;d=e)&&a.close(),a.fillAndStroke(),f=d)&&a.close(), a.fillAndStroke(),f=e)&&a.close(),a.fillAndStroke(),f=d)&&a.close(),a.fillAndStroke(),fb)break;h=c}f=e.getIndex(a);f=Math.max(0,g-(g>f?1:0));d.add(e,a,f)}}; mxStackLayout.prototype.getParentSize=function(a){var b=this.graph.getModel(),c=b.getGeometry(a);if(null!=this.graph.container&&(null==c&&b.isLayer(a)||a==this.graph.getView().currentRoot))c=new mxRectangle(0,0,this.graph.container.offsetWidth-1,this.graph.container.offsetHeight-1);return c}; mxStackLayout.prototype.execute=function(a){if(null!=a){var b=this.getParentSize(a),c=this.isHorizontal(),d=this.graph.getModel(),e=null;null!=b&&(e=c?b.height-this.marginTop-this.marginBottom:b.width-this.marginLeft-this.marginRight);var e=e-(2*this.spacing+2*this.border),f=this.x0+this.border+this.marginLeft,g=this.y0+this.border+this.marginTop;if(this.graph.isSwimlane(a)){var h=this.graph.getCellStyle(a),k=mxUtils.getNumber(h,mxConstants.STYLE_STARTSIZE,mxConstants.DEFAULT_STARTSIZE),h=1==mxUtils.getValue(h, mxConstants.STYLE_HORIZONTAL,!0);null!=b&&(k=h?Math.min(k,b.height):Math.min(k,b.width));c==h&&(e-=k);h?g+=k:f+=k}d.beginUpdate();try{for(var k=0,h=null,l=0,m=null,n=d.getChildCount(a),p=0;pthis.wrap||!c&&h.y+h.height+q.height+2*this.spacing>this.wrap))h=null,c?g+=k+this.spacing:f+=k+this.spacing,k= 0;var k=Math.max(k,c?q.height:q.width),s=0;if(!this.borderCollapse)var w=this.graph.getCellStyle(r),s=mxUtils.getNumber(w,mxConstants.STYLE_STROKEWIDTH,1);null!=h?c?q.x=l+this.spacing+Math.floor(s/2):q.y=l+this.spacing+Math.floor(s/2):this.keepFirstLocation||(c?q.x=f:q.y=g);c?q.y=g:q.x=f;this.fill&&null!=e&&(c?q.height=e:q.width=e);this.setChildGeometry(r,q);m=r;h=q;l=c?h.x+h.width+Math.floor(s/2):h.y+h.height+Math.floor(s/2)}}}this.resizeParent&&null!=b&&null!=h&&!this.graph.isCellCollapsed(a)?this.updateParentGeometry(a, b,h):this.resizeLast&&(null!=b&&null!=h&&null!=m)&&(c?h.width=b.width-h.x-this.spacing-this.marginRight-this.marginLeft:h.height=b.height-h.y-this.spacing-this.marginBottom,this.setChildGeometry(m,h))}finally{d.endUpdate()}}};mxStackLayout.prototype.setChildGeometry=function(a,b){var c=this.graph.getCellGeometry(a);(null==c||b.x!=c.x||b.y!=c.y||b.width!=c.width||b.height!=c.height)&&this.graph.getModel().setGeometry(a,b)}; mxStackLayout.prototype.updateParentGeometry=function(a,b,c){var d=this.isHorizontal(),e=this.graph.getModel(),f=b.clone();d?(c=c.x+c.width+this.spacing+this.marginRight,f.width=this.resizeParentMax?Math.max(f.width,c):c):(c=c.y+c.height+this.spacing+this.marginBottom,f.height=this.resizeParentMax?Math.max(f.height,c):c);(b.x!=f.x||b.y!=f.y||b.width!=f.width||b.height!=f.height)&&e.setGeometry(a,f)}; function mxPartitionLayout(a,b,c,d){mxGraphLayout.call(this,a);this.horizontal=null!=b?b:!0;this.spacing=c||0;this.border=d||0}mxPartitionLayout.prototype=new mxGraphLayout;mxPartitionLayout.prototype.constructor=mxPartitionLayout;mxPartitionLayout.prototype.horizontal=null;mxPartitionLayout.prototype.spacing=null;mxPartitionLayout.prototype.border=null;mxPartitionLayout.prototype.resizeVertices=!0;mxPartitionLayout.prototype.isHorizontal=function(){return this.horizontal}; mxPartitionLayout.prototype.moveCell=function(a,b,c){c=this.graph.getModel();var d=c.getParent(a);if(null!=a&&null!=d){for(var e=0,f=0,g=c.getChildCount(d),e=0;eb)break;f=h}}b=d.getIndex(a);b=Math.max(0,e-(e>b?1:0));c.add(d,a,b)}}; mxPartitionLayout.prototype.execute=function(a){var b=this.isHorizontal(),c=this.graph.getModel(),d=c.getGeometry(a);if(null!=this.graph.container&&(null==d&&c.isLayer(a)||a==this.graph.getView().currentRoot))d=new mxRectangle(0,0,this.graph.container.offsetWidth-1,this.graph.container.offsetHeight-1);if(null!=d){for(var e=[],f=c.getChildCount(a),g=0;gh.x&&(e=Math.abs(g-h.x));0>h.y&&(k=Math.abs(d-h.y));(0!=e||0!=k)&&this.moveNode(this.node,e,k);this.resizeParent&&this.adjustParents();this.edgeRouting&&this.localEdgeProcessing(this.node)}null!=this.parentX&&null!=this.parentY&&(f=this.graph.getCellGeometry(a),null!=f&&(f=f.clone(),f.x=this.parentX,f.y=this.parentY,c.setGeometry(a,f)))}}finally{c.endUpdate()}}}; mxCompactTreeLayout.prototype.moveNode=function(a,b,c){a.x+=b;a.y+=c;this.apply(a);for(a=a.child;null!=a;)this.moveNode(a,b,c),a=a.next}; mxCompactTreeLayout.prototype.sortOutgoingEdges=function(a,b){var c=new mxDictionary;b.sort(function(b,e){var f=b.getTerminal(b.getTerminal(!1)==a),g=c.get(f);null==g&&(g=mxCellPath.create(f).split(mxCellPath.PATH_SEPARATOR),c.put(f,g));var f=e.getTerminal(e.getTerminal(!1)==a),h=c.get(f);null==h&&(h=mxCellPath.create(f).split(mxCellPath.PATH_SEPARATOR),c.put(f,h));return mxCellPath.compare(g,h)})}; mxCompactTreeLayout.prototype.findRankHeights=function(a,b){if(null==this.maxRankHeight[b]||this.maxRankHeight[b]a.height&&(a.height=this.maxRankHeight[b]);for(var c=a.child;null!=c;)this.setCellHeights(c,b+1),c=c.next}; mxCompactTreeLayout.prototype.dfs=function(a,b){var c=mxCellPath.create(a),d=null;if(null!=a&&null==this.visited[c]&&!this.isVertexIgnored(a)){this.visited[c]=a;var d=this.createNode(a),c=this.graph.getModel(),e=null,f=this.graph.getEdges(a,b,this.invert,!this.invert,!1,!0),g=this.graph.getView();this.sortEdges&&this.sortOutgoingEdges(a,f);for(var h=0;h=a+c)return 0;g=0a?a*d/c-b:0a+c?(c+a)*f/e-(b+d):f-(b+d);return 0g+2*this.prefHozEdgeSep&&(f-=2*this.prefHozEdgeSep);a=f/d;b=a/2;f>g+2*this.prefHozEdgeSep&&(b+=this.prefHozEdgeSep);for(var f=this.minEdgeJetty-this.prefVertEdgeOff,g=0,h=this.getVertexBounds(c),k=0;kd/2&&(f-=this.prefVertEdgeOff);b+=a;g=Math.max(g,f)}}; function WeightedCellSorter(a,b){this.cell=a;this.weightedValue=b}WeightedCellSorter.prototype.weightedValue=0;WeightedCellSorter.prototype.nudge=!1;WeightedCellSorter.prototype.visited=!1;WeightedCellSorter.prototype.rankIndex=null;WeightedCellSorter.prototype.cell=null;WeightedCellSorter.prototype.compare=function(a,b){return null!=a&&null!=b?b.weightedValue>a.weightedValue?1:b.weightedValued.theta&&ethis.forceConstant&&(this.forceConstant= 0.001);this.forceConstantSquared=this.forceConstant*this.forceConstant;for(d=0;db&&(b=0.001);var c=this.dispX[a]/b*Math.min(b,this.temperature),b=this.dispY[a]/b*Math.min(b,this.temperature);this.dispX[a]=0;this.dispY[a]=0;this.cellLocation[a][0]+=c;this.cellLocation[a][1]+=b}}; mxFastOrganicLayout.prototype.calcAttraction=function(){for(var a=0;athis.maxDistanceLimit||(ga?a+"-"+c:c+"-"+a):null}; mxParallelEdgeLayout.prototype.layout=function(a){var b=a[0],c=this.graph.getView(),d=this.graph.getModel(),e=d.getGeometry(c.getVisibleTerminal(b,!0)),d=d.getGeometry(c.getVisibleTerminal(b,!1));if(e==d)for(var b=e.x+e.width+this.spacing,c=e.y+e.height/2,f=0;fmxUtils.indexOf(k.connectsAsTarget,g)&&k.connectsAsTarget.push(g))}}c[d].temp[0]=1}}mxGraphHierarchyModel.prototype.maxRank=null;mxGraphHierarchyModel.prototype.vertexMapper=null;mxGraphHierarchyModel.prototype.edgeMapper=null;mxGraphHierarchyModel.prototype.ranks=null;mxGraphHierarchyModel.prototype.roots=null;mxGraphHierarchyModel.prototype.parent=null; mxGraphHierarchyModel.prototype.dfsCount=0;mxGraphHierarchyModel.prototype.SOURCESCANSTARTRANK=1E8;mxGraphHierarchyModel.prototype.tightenToSource=!1; mxGraphHierarchyModel.prototype.createInternalCells=function(a,b,c){for(var d=a.getGraph(),e=0;e=k.length){for(var h= new mxGraphHierarchyEdge(k),l=0;lmxUtils.indexOf(c[e].connectsAsSource,h)&&c[e].connectsAsSource.push(h)}}}c[e].temp[0]=0}}; mxGraphHierarchyModel.prototype.initialRank=function(){var a=[];if(null!=this.roots)for(var b=0;bc.maxRank&&0>c.minRank)&&(a[c.temp[0]].push(c),c.maxRank=c.temp[0],c.minRank=c.temp[0],c.temp[0]=a[c.maxRank].length-1);if(null!=b&&null!=d&&1mxUtils.indexOf(k.connectsAsTarget,g)&&k.connectsAsTarget.push(g))}}c[d].temp[0]=1}}mxSwimlaneModel.prototype.maxRank=null;mxSwimlaneModel.prototype.vertexMapper=null;mxSwimlaneModel.prototype.edgeMapper=null;mxSwimlaneModel.prototype.ranks=null;mxSwimlaneModel.prototype.roots=null;mxSwimlaneModel.prototype.parent=null;mxSwimlaneModel.prototype.dfsCount=0; mxSwimlaneModel.prototype.SOURCESCANSTARTRANK=1E8;mxGraphHierarchyModel.prototype.tightenToSource=!1;mxSwimlaneModel.prototype.ranksPerGroup=null; mxSwimlaneModel.prototype.createInternalCells=function(a,b,c){for(var d=a.getGraph(),e=a.swimlanes,f=0;f=l.length){for(var k=new mxGraphHierarchyEdge(l),m=0;mmxUtils.indexOf(c[f].connectsAsSource,k)&&c[f].connectsAsSource.push(k)}}}c[f].temp[0]=0}}; mxSwimlaneModel.prototype.initialRank=function(){this.ranksPerGroup=[];var a=[],b={};if(null!=this.roots)for(var c=0;cb[d.swimlaneIndex]&&(h=b[d.swimlaneIndex]);d.temp[0]=h;if(null!=f)for(c=0;cc.maxRank&&0>c.minRank)&&(a[c.temp[0]].push(c),c.maxRank=c.temp[0],c.minRank=c.temp[0],c.temp[0]=a[c.maxRank].length-1);if(null!=b&&null!=d&&1>1,++e[k]}return c}; mxMedianHybridCrossingReduction.prototype.transpose=function(a,b){for(var c=!0,d=0;c&&10>d++;)for(var e=1==a%2&&1==d%2,c=!1,f=0;fm&&(m=k);h[m]=l}for(var n=m=l=null,p=null,r=null,q=null,s=null,w=null,t=null,y=null,k=0;ks[D]&&v++,r[z]w[D]&&v++,q[z]a.medianValue?-1:b.medianValuew+1&&(l==d[k].length-1?(e.setGeneralPurposeVariable(k,t),n=!0):(l=d[k][l+1],w=l.getGeneralPurposeVariable(k),w=w-l.width/2-this.intraCellSpacing-e.width/2,w>t?(e.setGeneralPurposeVariable(k, t),n=!0):w>e.getGeneralPurposeVariable(k)+1&&(e.setGeneralPurposeVariable(k,w),n=!0)));if(n){for(e=0;e=h&&k<=p?g.setGeneralPurposeVariable(a,k):kp&&(g.setGeneralPurposeVariable(a,p),this.currentXDelta+=k-p);d[f].visited=!0}};mxCoordinateAssignment.prototype.calculatedWeightedValue=function(a,b){for(var c=0,d=0;dthis.widestRankValue&&(this.widestRankValue=h,this.widestRank=e);this.rankWidths[e]=h}!0==k&&mxLog.warn("At least one cell has no bounds");this.rankY[e]=c;h=f/2+d/2+this.interRankCellSpacing;d=f;c=this.orientation==mxConstants.DIRECTION_NORTH||this.orientation==mxConstants.DIRECTION_WEST?c+h:c- h;for(l=0;le.maxRank-e.minRank-1)){for(var f=e.getGeneralPurposeVariable(e.minRank+1),g=!0,h=0,k=e.minRank+2;ke.minRank+1;k--)p=e.getX(k-1),n==p?(m[k-e.minRank-2]=n,g++):this.repositionValid(b,e,k-1,n)?(m[k-e.minRank-2]=n,g++):(m[k-e.minRank-2]=e.getX(k-1),n=p);if(g>h||f>h)if(g>=f)for(k=e.maxRank-2;k>e.minRank;k--)e.setX(k,m[k-e.minRank-1]);else if(f>g)for(k=e.minRank+2;ke)return!1;f=b.getGeneralPurposeVariable(c);if(df){if(e==a.length-1)return!0;a=a[e+1];c=a.getGeneralPurposeVariable(c);c=c-a.width/2-this.intraCellSpacing-b.width/2;if(!(c>=d))return!1}return!0}; mxCoordinateAssignment.prototype.setCellLocations=function(a,b){this.rankTopY=[];this.rankBottomY=[];for(var c=0;ch;h++){if(-1(f+1)*this.prefHozEdgeSep+2*this.prefHozEdgeSep&&(m+=this.prefHozEdgeSep,n-=this.prefHozEdgeSep);k=(n-m)/f;m+=k/2;n=this.minEdgeJetty-this.prefVertEdgeOff;for(l=p=0;lf/2&&(n-=this.prefVertEdgeOff);for(s=0;sa.weightedValue?-1:b.weightedValuef&&(f=k,e=h)}}0==c.length&&null!=e&&c.push(e)}return c}; mxHierarchicalLayout.prototype.getEdges=function(a){var b=this.edgesCache.get(a);if(null!=b)return b;for(var c=this.graph.model,b=[],d=this.graph.isCellCollapsed(a),e=c.getChildCount(a),f=0;fb.length)){null==a&&(a=c.getParent(b[0]));this.parentY=this.parentX=null;if(a!=this.root&&null!=c.isVertex(a)&&this.maintainParentLocation){var d=this.graph.getCellGeometry(a);null!=d&&(this.parentX=d.x,this.parentY=d.y)}this.swimlanes=b;this.dummyVertices=[];for(var e=0;ef&&(f=k,e=h)}}0==c.length&&null!=e&&c.push(e)}return c}; mxSwimlaneLayout.prototype.getEdges=function(a){var b=this.edgesCache.get(a);if(null!=b)return b;for(var c=this.graph.model,b=[],d=this.graph.isCellCollapsed(a),e=c.getChildCount(a),f=0;f=this.swimlanes.length)&&(p>h||(!b||n)&&p==h))e= this.traverse(m,b,l[c],d,e,f,g,p)}}else if(null==e[k])for(c=0;cmxUtils.indexOf(this.edges,a)))null==this.edges&&(this.edges=[]),this.edges.push(a);return a};mxCell.prototype.removeEdge=function(a,b){if(null!=a){if(a.getTerminal(!b)!=this&&null!=this.edges){var c=this.getEdgeIndex(a);0<=c&&this.edges.splice(c,1)}a.setTerminal(null,b)}return a}; mxCell.prototype.removeFromTerminal=function(a){var b=this.getTerminal(a);null!=b&&b.removeEdge(this,a)};mxCell.prototype.hasAttribute=function(a){var b=this.getValue();return null!=b&&b.nodeType==mxConstants.NODETYPE_ELEMENT&&b.hasAttribute?b.hasAttribute(a):null!=b.getAttribute(a)};mxCell.prototype.getAttribute=function(a,b){var c=this.getValue();return(null!=c&&c.nodeType==mxConstants.NODETYPE_ELEMENT?c.getAttribute(a):null)||b}; mxCell.prototype.setAttribute=function(a,b){var c=this.getValue();null!=c&&c.nodeType==mxConstants.NODETYPE_ELEMENT&&c.setAttribute(a,b)};mxCell.prototype.clone=function(){var a=mxUtils.clone(this,this.mxTransient);a.setValue(this.cloneValue());return a};mxCell.prototype.cloneValue=function(){var a=this.getValue();null!=a&&("function"==typeof a.clone?a=a.clone():isNaN(a.nodeType)||(a=a.cloneNode(!0)));return a};function mxGeometry(a,b,c,d){mxRectangle.call(this,a,b,c,d)}mxGeometry.prototype=new mxRectangle; mxGeometry.prototype.constructor=mxGeometry;mxGeometry.prototype.TRANSLATE_CONTROL_POINTS=!0;mxGeometry.prototype.alternateBounds=null;mxGeometry.prototype.sourcePoint=null;mxGeometry.prototype.targetPoint=null;mxGeometry.prototype.points=null;mxGeometry.prototype.offset=null;mxGeometry.prototype.relative=!1; mxGeometry.prototype.swap=function(){if(null!=this.alternateBounds){var a=new mxRectangle(this.x,this.y,this.width,this.height);this.x=this.alternateBounds.x;this.y=this.alternateBounds.y;this.width=this.alternateBounds.width;this.height=this.alternateBounds.height;this.alternateBounds=a}};mxGeometry.prototype.getTerminalPoint=function(a){return a?this.sourcePoint:this.targetPoint};mxGeometry.prototype.setTerminalPoint=function(a,b){b?this.sourcePoint=a:this.targetPoint=a;return a}; mxGeometry.prototype.rotate=function(a,b){var c=mxUtils.toRadians(a),d=Math.cos(c),c=Math.sin(c);if(!this.relative){var e=new mxPoint(this.getCenterX(),this.getCenterY()),e=mxUtils.getRotatedPoint(e,d,c,b);this.x=Math.round(e.x-this.width/2);this.y=Math.round(e.y-this.height/2)}null!=this.sourcePoint&&(e=mxUtils.getRotatedPoint(this.sourcePoint,d,c,b),this.sourcePoint.x=Math.round(e.x),this.sourcePoint.y=Math.round(e.y));null!=this.targetPoint&&(e=mxUtils.getRotatedPoint(this.targetPoint,d,c,b),this.targetPoint.x= Math.round(e.x),this.targetPoint.y=Math.round(e.y));if(null!=this.points)for(var f=0;fb[e]?1:-1:(c=parseInt(a[e]),e=parseInt(b[e]),d=c==e?0:c>e?1:-1);break}0==d&&(c=a.length,e=b.length,c!=e&&(d=c>e?1:-1));return d}},mxPerimeter={RectanglePerimeter:function(a,b,c,d){b=a.getCenterX();var e=a.getCenterY(),f=Math.atan2(c.y-e,c.x-b),g=new mxPoint(0,0),h=Math.PI,k=Math.PI/2-f,l=Math.atan2(a.height,a.width);f<-h+l||f>h-l?(g.x=a.x,g.y=e-a.width* Math.tan(f)/2):f<-l?(g.y=a.y,g.x=b-a.height*Math.tan(k)/2):f=a.x&&c.x<=a.x+a.width?g.x=c.x:c.y>=a.y&&c.y<=a.y+a.height&&(g.y=c.y),c.xa.x+a.width&&(g.x=a.x+a.width),c.ya.y+a.height&&(g.y=a.y+a.height));return g},EllipsePerimeter:function(a,b,c,d){var e=a.x,f=a.y,g=a.width/2,h=a.height/2,k=e+g,l=f+h;b=c.x;c=c.y;var m=parseInt(b-k),n=parseInt(c-l);if(0==m&&0!=n)return new mxPoint(k, l+h*n/Math.abs(n));if(0==m&&0==n)return new mxPoint(b,c);if(d){if(c>=f&&c<=f+a.height)return a=c-l,a=Math.sqrt(g*g*(1-a*a/(h*h)))||0,b<=e&&(a=-a),new mxPoint(k+a,c);if(b>=e&&b<=e+a.width)return a=b-k,a=Math.sqrt(h*h*(1-a*a/(g*g)))||0,c<=f&&(a=-a),new mxPoint(b,l+a)}e=n/m;l-=e*k;f=g*g*e*e+h*h;a=-2*k*f;h=Math.sqrt(a*a-4*f*(g*g*e*e*k*k+h*h*k*k-g*g*h*h));g=(-a+h)/(2*f);h=(-a-h)/(2*f);k=e*g+l;l=e*h+l;e=Math.sqrt(Math.pow(g-b,2)+Math.pow(k-c,2));b=Math.sqrt(Math.pow(h-b,2)+Math.pow(l-c,2));f=c=0;ec?new mxPoint(g,e):new mxPoint(g,e+a);if(h==c)return g>k?new mxPoint(b,h):new mxPoint(b+f,h);var l=g,m=h;d&&(k>=b&&k<=b+f?l=k:c>=e&&c<=e+a&&(m=c));return k-s&&rMath.PI-s,s=null;q?s=d&&(e&&c.x>=m.x&&c.x<=p.x||!e&&c.y>=m.y&&c.y<=p.y)?e?new mxPoint(c.x,m.y):new mxPoint(m.x,c.y):b==mxConstants.DIRECTION_NORTH?new mxPoint(f+h/2+a*Math.tan(r)/2,g+a):b==mxConstants.DIRECTION_SOUTH?new mxPoint(f+h/2-a*Math.tan(r)/2,g):b==mxConstants.DIRECTION_WEST?new mxPoint(f+h,g+a/2+h*Math.tan(r)/2):new mxPoint(f, g+a/2-h*Math.tan(r)/2):(d&&(d=new mxPoint(k,l),c.y>=g&&c.y<=g+a?(d.x=e?k:b==mxConstants.DIRECTION_WEST?f+h:f,d.y=c.y):c.x>=f&&c.x<=f+h&&(d.x=c.x,d.y=!e?l:b==mxConstants.DIRECTION_NORTH?g+a:g),k=d.x,l=d.y),s=e&&c.x<=f+h/2||!e&&c.y<=g+a/2?mxUtils.intersection(c.x,c.y,k,l,m.x,m.y,n.x,n.y):mxUtils.intersection(c.x,c.y,k,l,n.x,n.y,p.x,p.y));null==s&&(s=new mxPoint(k,l));return s},HexagonPerimeter:function(a,b,c,d){var e=a.x,f=a.y,g=a.width,h=a.height,k=a.getCenterX();a=a.getCenterY();var l=c.x,m=c.y,n= -Math.atan2(m-a,l-k),p=Math.PI,r=Math.PI/2,q=new mxPoint(k,a);b=null!=b?mxUtils.getValue(b.style,mxConstants.STYLE_DIRECTION,mxConstants.DIRECTION_EAST):mxConstants.DIRECTION_EAST;var s=b==mxConstants.DIRECTION_NORTH||b==mxConstants.DIRECTION_SOUTH;b=new mxPoint;q=new mxPoint;if(lf+h||l>e+g&&me+g&&m>f+h)d=!1;if(d){if(s){if(l==k){if(m<=f)return new mxPoint(k,f);if(m>=f+h)return new mxPoint(k,f+h)}else if(le+g){if(m==f+h/4)return new mxPoint(e+g,f+h/4);if(m==f+3*h/4)return new mxPoint(e+g,f+3*h/4)}else if(l==e){if(ma)return new mxPoint(e,f+3*h/4)}else if(l==e+g){if(ma)return new mxPoint(e+g,f+3*h/4)}if(m==f)return new mxPoint(k,f);if(m==f+h)return new mxPoint(k,f+h);lf+h/4&&mf+3*h/4&&(b=new mxPoint(e-Math.floor(0.5*g),f+Math.floor(0.5*h)),q=new mxPoint(e+g,f+Math.floor(1.25*h))):l>k&&(m>f+h/4&&mf+3*h/4&&(b=new mxPoint(e+Math.floor(1.5*g),f+Math.floor(0.5*h)),q=new mxPoint(e,f+Math.floor(1.25*h))))}else{if(m==a){if(l<=e)return new mxPoint(e,f+h/2);if(l>=e+g)return new mxPoint(e+g,f+h/ 2)}else if(mf+h){if(l==e+g/4)return new mxPoint(e+g/4,f+h);if(l==e+3*g/4)return new mxPoint(e+3*g/4,f+h)}else if(m==f){if(lk)return new mxPoint(e+3*g/4,f)}else if(m==f+h){if(la)return new mxPoint(e+3*g/4,f+h)}if(l==e)return new mxPoint(e,a);if(l==e+g)return new mxPoint(e+g,a);me+g/4&&le+3*g/4&&(b=new mxPoint(e+Math.floor(0.5*g),f-Math.floor(0.5*h)),q=new mxPoint(e+Math.floor(1.25*g),f+h)):m>a&&(l>e+g/4&&le+3*g/4&&(b=new mxPoint(e+Math.floor(0.5*g),f+Math.floor(1.5*h)),q=new mxPoint(e+Math.floor(1.25*g),f)))}d= k;n=a;l>=e&&l<=e+g?(d=l,n=m=f&&m<=f+h&&(n=m,d=l-l?(b=new mxPoint(e+g,f), q=new mxPoint(e+g,f+h)):n>l&&nr&&np-l&&n<=p||n<-p+l&&n>=-p?(b=new mxPoint(e,f),q=new mxPoint(e,f+h)):n<-l&&n>-r?(b=new mxPoint(e+Math.floor(1.5*g),f+Math.floor(0.5*h)),q=new mxPoint(e,f+Math.floor(1.25*h))):n<-r&&n>-p+l&&(b=new mxPoint(e-Math.floor(0.5*g),f+Math.floor(0.5*h)),q=new mxPoint(e+g,f+ Math.floor(1.25*h)))}else{l=Math.atan2(h/2,g/4);if(n==l)return new mxPoint(e+Math.floor(0.75*g),f);if(n==p-l)return new mxPoint(e+Math.floor(0.25*g),f);if(n==p||n==-p)return new mxPoint(e,f+Math.floor(0.5*h));if(0==n)return new mxPoint(e+g,f+Math.floor(0.5*h));if(n==-l)return new mxPoint(e+Math.floor(0.75*g),f+h);if(n==-p+l)return new mxPoint(e+Math.floor(0.25*g),f+h);0l&&np-l&&nn&&n>-l?(b=new mxPoint(e+Math.floor(0.5*g),f+Math.floor(1.5*h)),q=new mxPoint(e+Math.floor(1.25*g),f)):n<-l&&n>-p+l?(b=new mxPoint(e,f+h),q=new mxPoint(e+g,f+h)):n<-p+l&&n>-p&&(b=new mxPoint(e-Math.floor(0.25*g),f),q=new mxPoint(e+Math.floor(0.5*g),f+Math.floor(1.5*h)))}q=mxUtils.intersection(k,a,c.x,c.y,b.x,b.y,q.x,q.y)}return null==q?new mxPoint(k,a):q}}; function mxStylesheet(){this.styles={};this.putDefaultVertexStyle(this.createDefaultVertexStyle());this.putDefaultEdgeStyle(this.createDefaultEdgeStyle())} mxStylesheet.prototype.createDefaultVertexStyle=function(){var a={};a[mxConstants.STYLE_SHAPE]=mxConstants.SHAPE_RECTANGLE;a[mxConstants.STYLE_PERIMETER]=mxPerimeter.RectanglePerimeter;a[mxConstants.STYLE_VERTICAL_ALIGN]=mxConstants.ALIGN_MIDDLE;a[mxConstants.STYLE_ALIGN]=mxConstants.ALIGN_CENTER;a[mxConstants.STYLE_FILLCOLOR]="#C3D9FF";a[mxConstants.STYLE_STROKECOLOR]="#6482B9";a[mxConstants.STYLE_FONTCOLOR]="#774400";return a}; mxStylesheet.prototype.createDefaultEdgeStyle=function(){var a={};a[mxConstants.STYLE_SHAPE]=mxConstants.SHAPE_CONNECTOR;a[mxConstants.STYLE_ENDARROW]=mxConstants.ARROW_CLASSIC;a[mxConstants.STYLE_VERTICAL_ALIGN]=mxConstants.ALIGN_MIDDLE;a[mxConstants.STYLE_ALIGN]=mxConstants.ALIGN_CENTER;a[mxConstants.STYLE_STROKECOLOR]="#6482B9";a[mxConstants.STYLE_FONTCOLOR]="#446299";return a};mxStylesheet.prototype.putDefaultVertexStyle=function(a){this.putCellStyle("defaultVertex",a)}; mxStylesheet.prototype.putDefaultEdgeStyle=function(a){this.putCellStyle("defaultEdge",a)};mxStylesheet.prototype.getDefaultVertexStyle=function(){return this.styles.defaultVertex};mxStylesheet.prototype.getDefaultEdgeStyle=function(){return this.styles.defaultEdge};mxStylesheet.prototype.putCellStyle=function(a,b){this.styles[a]=b}; mxStylesheet.prototype.getCellStyle=function(a,b){var c=b;if(null!=a&&0e&&(this.textarea.style.width=this.textarea.scrollWidth+"px")):(this.textarea.style.whiteSpace="nowrap",this.textarea.style.width="");8==document.documentMode&&(this.textarea.style.zoom="1",this.textarea.style.height="auto");a=this.textarea.scrollWidth;e=this.textarea.scrollHeight; 8==document.documentMode?(this.textarea.style.left=Math.max(0,Math.ceil((this.bounds.x-d.x*(this.bounds.width-(a+1)*c)+0*a*(c-1)+2*(d.x+0.5))/c))+"px",this.textarea.style.top=Math.max(0,Math.ceil((this.bounds.y-d.y*(this.bounds.height-(e+0.5)*c)+0*e*(c-1)+1*Math.abs(d.y+0.5))/c))+"px",this.textarea.style.width=Math.round(a*c)+"px",this.textarea.style.height=Math.round(e*c)+"px"):mxClient.IS_QUIRKS?(this.textarea.style.left=Math.max(0,Math.ceil(this.bounds.x-d.x*(this.bounds.width-(a+1)*c)+0*a*(c- 1)+2*(d.x+0.5)))+"px",this.textarea.style.top=Math.max(0,Math.ceil(this.bounds.y-d.y*(this.bounds.height-(e+0.5)*c)+0*e*(c-1)+1*Math.abs(d.y+0.5)))+"px"):(this.textarea.style.left=Math.max(0,Math.round(this.bounds.x-d.x*(this.bounds.width-2))+1)+"px",this.textarea.style.top=Math.max(0,Math.round(this.bounds.y-d.y*(this.bounds.height-4)+(-1==d.y?3:0))+1)+"px")}mxClient.IS_VML?this.textarea.style.zoom=c:(mxUtils.setPrefixedStyle(this.textarea.style,"transformOrigin","0px 0px"),mxUtils.setPrefixedStyle(this.textarea.style, "transform","scale("+c+","+c+")"+(null==d?"":" translate("+100*d.x+"%,"+100*d.y+"%)")))}};mxCellEditor.prototype.focusLost=function(){this.stopEditing(!this.graph.isInvokesStopCellEditing())};mxCellEditor.prototype.getBackgroundColor=function(a){return null}; mxCellEditor.prototype.startEditing=function(a,b){this.stopEditing(!0);null==this.textarea&&this.init();null!=this.graph.tooltipHandler&&this.graph.tooltipHandler.hideTooltip();var c=this.graph.getView().getState(a);if(null!=c){this.graph.getView();var d=mxUtils.getValue(c.style,mxConstants.STYLE_FONTSIZE,mxConstants.DEFAULT_FONTSIZE),e=mxUtils.getValue(c.style,mxConstants.STYLE_FONTFAMILY,mxConstants.DEFAULT_FONTFAMILY),f=mxUtils.getValue(c.style,mxConstants.STYLE_FONTCOLOR,"black"),g=mxUtils.getValue(c.style, mxConstants.STYLE_ALIGN,mxConstants.ALIGN_LEFT),h=(mxUtils.getValue(c.style,mxConstants.STYLE_FONTSTYLE,0)&mxConstants.FONT_BOLD)==mxConstants.FONT_BOLD,k=(mxUtils.getValue(c.style,mxConstants.STYLE_FONTSTYLE,0)&mxConstants.FONT_ITALIC)==mxConstants.FONT_ITALIC,l=(mxUtils.getValue(c.style,mxConstants.STYLE_FONTSTYLE,0)&mxConstants.FONT_UNDERLINE)==mxConstants.FONT_UNDERLINE;this.textarea.style.lineHeight=mxConstants.ABSOLUTE_LINE_HEIGHT?Math.round(d*mxConstants.LINE_HEIGHT)+"px":mxConstants.LINE_HEIGHT; this.textarea.style.backgroundColor=this.getBackgroundColor(c);this.textarea.style.textDecoration=l?"underline":"";this.textarea.style.fontWeight=h?"bold":"normal";this.textarea.style.fontStyle=k?"italic":"";this.textarea.style.fontSize=Math.round(d)+"px";this.textarea.style.zIndex=this.zIndex;this.textarea.style.fontFamily=e;this.textarea.style.textAlign=g;this.textarea.style.outline="none";this.textarea.style.color=f;d=this.textDirection=mxUtils.getValue(c.style,mxConstants.STYLE_TEXT_DIRECTION, mxConstants.DEFAULT_TEXT_DIRECTION);d==mxConstants.TEXT_DIRECTION_AUTO&&null!=c&&(null!=c.text&&c.text.dialect!=mxConstants.DIALECT_STRICTHTML&&!mxUtils.isNode(c.text.value))&&(d=c.text.getAutoDirection());d==mxConstants.TEXT_DIRECTION_LTR||d==mxConstants.TEXT_DIRECTION_RTL?this.textarea.setAttribute("dir",d):this.textarea.removeAttribute("dir");this.textarea.innerHTML=this.getInitialValue(c,b)||"";this.initialValue=this.textarea.innerHTML;0==this.textarea.innerHTML.length||"\x3cbr\x3e"==this.textarea.innerHTML? (this.textarea.innerHTML=this.getEmptyLabelText(),this.clearOnChange=!0):this.clearOnChange=this.textarea.innerHTML==this.getEmptyLabelText();this.graph.container.appendChild(this.textarea);this.editingCell=a;this.trigger=b;this.textNode=null;null!=c.text&&this.isHideLabel(c)&&(this.textNode=c.text.node,this.textNode.style.visibility="hidden");this.autoSize&&(this.graph.model.isEdge(c.cell)||"fill"!=c.style[mxConstants.STYLE_OVERFLOW])&&window.setTimeout(mxUtils.bind(this,function(){this.resize()}), 0);this.resize();try{this.textarea.focus(),this.isSelectText()&&(0=k.x:null!=c&&(h=c.x+c.width=a.x:null!=b&&(k=b.x+b.widthb.x+b.width?null!=c?(d=c.x,l=Math.max(Math.abs(k-c.y),l)):a==mxConstants.DIRECTION_NORTH? k=b.y-2*h:a==mxConstants.DIRECTION_SOUTH?k=b.y+b.height+2*h:d=a==mxConstants.DIRECTION_EAST?b.x-2*l:b.x+b.width+2*l:null!=c&&(d=f.getRoutingCenterX(b),h=Math.max(Math.abs(d-c.x),l),k=c.y,l=0);e.push(new mxPoint(d-h,k-l));e.push(new mxPoint(d+h,k+l))}},ElbowConnector:function(a,b,c,d,e){var f=null!=d&&0m,h=f.xl;else k=Math.max(b.x,c.x),l=Math.min(b.x+b.width,c.x+c.width),g=k==l,g||(h=Math.max(b.y,c.y),m=Math.min(b.y+b.height,c.y+c.height),h=h==m);!h&&(g||a.style[mxConstants.STYLE_ELBOW]==mxConstants.ELBOW_VERTICAL)?mxEdgeStyle.TopToBottom(a,b,c,d,e):mxEdgeStyle.SideToSide(a,b,c,d,e)},SideToSide:function(a,b,c,d,e){var f=a.view;d=null!=d&&0=b.y&&d.y<=b.y+b.height&&(h=d.y),d.y>=c.y&&d.y<=c.y+c.height&&(f=d.y)),!mxUtils.contains(c,a,h)&&!mxUtils.contains(b,a,h)&&e.push(new mxPoint(a,h)),!mxUtils.contains(c,a,f)&&!mxUtils.contains(b,a,f)&&e.push(new mxPoint(a,f)),1==e.length&&(null!=d?!mxUtils.contains(c, a,d.y)&&!mxUtils.contains(b,a,d.y)&&e.push(new mxPoint(a,d.y)):(f=Math.max(b.y,c.y),b=Math.min(b.y+b.height,c.y+c.height),e.push(new mxPoint(a,f+(b-f)/2)))))},TopToBottom:function(a,b,c,d,e){var f=a.view;d=null!=d&&0=b.x&&d.x<=b.x+b.width)&&(a=d.x),h=null!=d?d.y:Math.round(g+(h-g)/2),!mxUtils.contains(c,a,h)&&!mxUtils.contains(b,a,h)&&e.push(new mxPoint(a,h)),a=null!=d&&d.x>=c.x&&d.x<=c.x+c.width?d.x:f.getRoutingCenterX(c),!mxUtils.contains(c,a,h)&&!mxUtils.contains(b,a,h)&&e.push(new mxPoint(a,h)),1==e.length&&(null!=d&&1==e.length?!mxUtils.contains(c,d.x,h)&&!mxUtils.contains(b,d.x,h)&&e.push(new mxPoint(d.x,h)):(f=Math.max(b.x,c.x),b=Math.min(b.x+b.width,c.x+c.width),e.push(new mxPoint(f+(b- f)/2,h)))))},SegmentConnector:function(a,b,c,d,e){function f(a){if(null==k||Math.abs(k.x-a.x)>=h||Math.abs(k.y-a.y)>=h)e.push(a),k=a;return k}var g=a.absolutePoints,h=Math.max(1,a.view.scale),k=0r;r++){var z=null!=w&&w.x==t.x,v=null!=w&&w.y==t.y,J=null!=s&&t.y>= s.y&&t.y<=s.y+s.height,s=null!=s&&t.x>=s.x&&t.x<=s.x+s.width,t=v||null==w&&J,y=z||null==w&&s;if(!(0==r&&(t&&y||z&&v))){if(null!=w&&!v&&!z&&(J||s)){l=J?!1:!0;break}if(y||t){l=t;1==r&&(l=0==d.length%2?t:y);break}}s=c;w=g[p];null!=w&&(w.x=Math.round(w.x),w.y=Math.round(w.y),s=null);t=d[d.length-1];z&&v&&(d=d.slice(1))}l&&(null!=g[0]&&g[0].y!=m.y||null==g[0]&&null!=b&&(m.yb.y+b.height))?f(new mxPoint(n.x,m.y)):!l&&(null!=g[0]&&g[0].x!=m.x||null==g[0]&&null!=b&&(m.xb.x+b.width))&&f(new mxPoint(m.x, n.y));l?n.y=m.y:n.x=m.x;for(r=0;rc.y+c.height))?f(new mxPoint(n.x,m.y)):!l&&(null!=g[p]&&g[p].x!=m.x||null==g[p]&&null!=c&&(m.xc.x+c.width))&&f(new mxPoint(m.x,n.y))));if(null==g[0]&&null!=b)for(;1< e.length&&null!=e[1]&&mxUtils.contains(b,e[1].x,e[1].y);)e.splice(1,1);if(null==g[p]&&null!=c)for(;1 v;v++)mxEdgeStyle.limits[v][1]=m[v][0]-y[v],mxEdgeStyle.limits[v][2]=m[v][1]-y[v],mxEdgeStyle.limits[v][4]=m[v][0]+m[v][2]+y[v],mxEdgeStyle.limits[v][8]=m[v][1]+m[v][3]+y[v];y=m[0][1]+m[0][3]/2;n=m[1][1]+m[1][3]/2;v=m[0][0]+m[0][2]/2-(m[1][0]+m[1][2]/2);J=y-n;y=0;0>v?y=0>J?2:1:0>=J&&(y=3,0==v&&(y=2));n=null;null!=b&&(n=k);b=[[0.5,0.5],[0.5,0.5]];for(v=0;2>v;v++)null!=n&&(b[v][0]=(n.x-m[v][0])/m[v][2],1>=Math.abs(n.x-m[v][0])?a[v]=mxConstants.DIRECTION_MASK_WEST:1>=Math.abs(n.x-m[v][0]-m[v][2])&&(a[v]= mxConstants.DIRECTION_MASK_EAST),b[v][1]=(n.y-m[v][1])/m[v][3],1>=Math.abs(n.y-m[v][1])?a[v]=mxConstants.DIRECTION_MASK_NORTH:1>=Math.abs(n.y-m[v][1]-m[v][3])&&(a[v]=mxConstants.DIRECTION_MASK_SOUTH)),n=null,null!=c&&(n=l);v=m[0][1]-(m[1][1]+m[1][3]);l=m[0][0]-(m[1][0]+m[1][2]);n=m[1][1]-(m[0][1]+m[0][3]);p=m[1][0]-(m[0][0]+m[0][2]);mxEdgeStyle.vertexSeperations[1]=Math.max(l-z,0);mxEdgeStyle.vertexSeperations[2]=Math.max(v-z,0);mxEdgeStyle.vertexSeperations[4]=Math.max(n-z,0);mxEdgeStyle.vertexSeperations[3]= Math.max(p-z,0);z=[];c=[];k=[];c[0]=l>=p?mxConstants.DIRECTION_MASK_WEST:mxConstants.DIRECTION_MASK_EAST;k[0]=v>=n?mxConstants.DIRECTION_MASK_NORTH:mxConstants.DIRECTION_MASK_SOUTH;c[1]=mxUtils.reversePortConstraints(c[0]);k[1]=mxUtils.reversePortConstraints(k[0]);l=l>=p?l:p;n=v>=n?v:n;p=[[0,0],[0,0]];r=!1;for(v=0;2>v;v++)0==a[v]&&(0==(c[v]&d[v])&&(c[v]=mxUtils.reversePortConstraints(c[v])),0==(k[v]&d[v])&&(k[v]=mxUtils.reversePortConstraints(k[v])),p[v][0]=k[v],p[v][1]=c[v]);0v;v++)if(0==a[v]&&(0==(p[v][0]&d[v])&&(p[v][0]=p[v][1]),z[v]=p[v][0]&d[v],z[v]|=(p[v][1]&d[v])<<8,z[v]|=(p[1-v][v]&d[v])<<16,z[v]|=(p[1-v][1-v]&d[v])<<24,0==(z[v]&15)&&(z[v]<<=8),0==(z[v]&3840)&&(z[v]= z[v]&15|z[v]>>8),0==(z[v]&983040)&&(z[v]=z[v]&65535|(z[v]&251658240)>>8),a[v]=z[v]&15,d[v]==mxConstants.DIRECTION_MASK_WEST||d[v]==mxConstants.DIRECTION_MASK_NORTH||d[v]==mxConstants.DIRECTION_MASK_EAST||d[v]==mxConstants.DIRECTION_MASK_SOUTH))a[v]=d[v];d=a[0]==mxConstants.DIRECTION_MASK_EAST?3:a[0];z=a[1]==mxConstants.DIRECTION_MASK_EAST?3:a[1];d-=y;z-=y;1>d&&(d+=4);1>z&&(z+=4);d=mxEdgeStyle.routePatterns[d-1][z-1];mxEdgeStyle.wayPoints1[0][0]=m[0][0];mxEdgeStyle.wayPoints1[0][1]=m[0][1];switch(a[0]){case mxConstants.DIRECTION_MASK_WEST:mxEdgeStyle.wayPoints1[0][0]-= f;mxEdgeStyle.wayPoints1[0][1]+=b[0][1]*m[0][3];break;case mxConstants.DIRECTION_MASK_SOUTH:mxEdgeStyle.wayPoints1[0][0]+=b[0][0]*m[0][2];mxEdgeStyle.wayPoints1[0][1]+=m[0][3]+f;break;case mxConstants.DIRECTION_MASK_EAST:mxEdgeStyle.wayPoints1[0][0]+=m[0][2]+f;mxEdgeStyle.wayPoints1[0][1]+=b[0][1]*m[0][3];break;case mxConstants.DIRECTION_MASK_NORTH:mxEdgeStyle.wayPoints1[0][0]+=b[0][0]*m[0][2],mxEdgeStyle.wayPoints1[0][1]-=f}f=0;c=z=0<(a[0]&(mxConstants.DIRECTION_MASK_EAST|mxConstants.DIRECTION_MASK_WEST))? 0:1;for(v=k=0;v>5,n<<=y,15>=4),p=0<(d[v]&mxEdgeStyle.CENTER_MASK),(r||s)&&9>n?(q=0,r=r?0:1,q=p&&0==k?m[r][0]+b[r][0]*m[r][2]:p?m[r][1]+b[r][1]* m[r][3]:mxEdgeStyle.limits[r][n],0==k?(n=(q-mxEdgeStyle.wayPoints1[f][0])*l[0],0e&&(e+=4);1>a&&(a+=4);b=routePatterns[e-1][a-1];if(0==c||0==d)null!=inlineRoutePatterns[e-1][a- 1]&&(b=inlineRoutePatterns[e-1][a-1]);return b}},mxStyleRegistry={values:[],putValue:function(a,b){mxStyleRegistry.values[a]=b},getValue:function(a){return mxStyleRegistry.values[a]},getName:function(a){for(var b in mxStyleRegistry.values)if(mxStyleRegistry.values[b]==a)return b;return null}};mxStyleRegistry.putValue(mxConstants.EDGESTYLE_ELBOW,mxEdgeStyle.ElbowConnector);mxStyleRegistry.putValue(mxConstants.EDGESTYLE_ENTITY_RELATION,mxEdgeStyle.EntityRelation); mxStyleRegistry.putValue(mxConstants.EDGESTYLE_LOOP,mxEdgeStyle.Loop);mxStyleRegistry.putValue(mxConstants.EDGESTYLE_SIDETOSIDE,mxEdgeStyle.SideToSide);mxStyleRegistry.putValue(mxConstants.EDGESTYLE_TOPTOBOTTOM,mxEdgeStyle.TopToBottom);mxStyleRegistry.putValue(mxConstants.EDGESTYLE_ORTHOGONAL,mxEdgeStyle.OrthConnector);mxStyleRegistry.putValue(mxConstants.EDGESTYLE_SEGMENT,mxEdgeStyle.SegmentConnector);mxStyleRegistry.putValue(mxConstants.PERIMETER_ELLIPSE,mxPerimeter.EllipsePerimeter); mxStyleRegistry.putValue(mxConstants.PERIMETER_RECTANGLE,mxPerimeter.RectanglePerimeter);mxStyleRegistry.putValue(mxConstants.PERIMETER_RHOMBUS,mxPerimeter.RhombusPerimeter);mxStyleRegistry.putValue(mxConstants.PERIMETER_TRIANGLE,mxPerimeter.TrianglePerimeter);mxStyleRegistry.putValue(mxConstants.PERIMETER_HEXAGON,mxPerimeter.HexagonPerimeter);function mxGraphView(a){this.graph=a;this.translate=new mxPoint;this.graphBounds=new mxRectangle;this.states=new mxDictionary}mxGraphView.prototype=new mxEventSource; mxGraphView.prototype.constructor=mxGraphView;mxGraphView.prototype.EMPTY_POINT=new mxPoint;mxGraphView.prototype.doneResource="none"!=mxClient.language?"done":"";mxGraphView.prototype.updatingDocumentResource="none"!=mxClient.language?"updatingDocument":"";mxGraphView.prototype.allowEval=!1;mxGraphView.prototype.captureDocumentGesture=!0;mxGraphView.prototype.optimizeVmlReflows=!0;mxGraphView.prototype.rendering=!0;mxGraphView.prototype.graph=null;mxGraphView.prototype.currentRoot=null; mxGraphView.prototype.graphBounds=null;mxGraphView.prototype.scale=1;mxGraphView.prototype.translate=null;mxGraphView.prototype.states=null;mxGraphView.prototype.updateStyle=!1;mxGraphView.prototype.lastNode=null;mxGraphView.prototype.lastHtmlNode=null;mxGraphView.prototype.lastForegroundNode=null;mxGraphView.prototype.lastForegroundHtmlNode=null;mxGraphView.prototype.getGraphBounds=function(){return this.graphBounds};mxGraphView.prototype.setGraphBounds=function(a){this.graphBounds=a}; mxGraphView.prototype.getBounds=function(a){var b=null;if(null!=a&&0 c.length||null==c[0]||null==c[c.length-1])?this.clear(a.cell,!0):(this.updateEdgeBounds(a),this.updateEdgeLabelOffset(a)))}; mxGraphView.prototype.updateVertexLabelOffset=function(a){var b=mxUtils.getValue(a.style,mxConstants.STYLE_LABEL_POSITION,mxConstants.ALIGN_CENTER);if(b==mxConstants.ALIGN_LEFT)b=mxUtils.getValue(a.style,mxConstants.STYLE_LABEL_WIDTH,null),b=null!=b?b*this.scale:a.width,a.absoluteOffset.x-=b;else if(b==mxConstants.ALIGN_RIGHT)a.absoluteOffset.x+=a.width;else if(b==mxConstants.ALIGN_CENTER&&(b=mxUtils.getValue(a.style,mxConstants.STYLE_LABEL_WIDTH,null),null!=b)){var c=mxUtils.getValue(a.style,mxConstants.STYLE_ALIGN, mxConstants.ALIGN_CENTER),d=0;c==mxConstants.ALIGN_CENTER?d=0.5:c==mxConstants.ALIGN_RIGHT&&(d=1);0!=d&&(a.absoluteOffset.x-=(b*this.scale-a.width)*d)}b=mxUtils.getValue(a.style,mxConstants.STYLE_VERTICAL_LABEL_POSITION,mxConstants.ALIGN_MIDDLE);b==mxConstants.ALIGN_TOP?a.absoluteOffset.y-=a.height:b==mxConstants.ALIGN_BOTTOM&&(a.absoluteOffset.y+=a.height)};mxGraphView.prototype.resetValidationState=function(){this.lastForegroundHtmlNode=this.lastForegroundNode=this.lastHtmlNode=this.lastNode=null}; mxGraphView.prototype.stateValidated=function(a){var b=this.graph.getModel().isEdge(a.cell)&&this.graph.keepEdgesInForeground||this.graph.getModel().isVertex(a.cell)&&this.graph.keepEdgesInBackground;a=this.graph.cellRenderer.insertStateAfter(a,b?this.lastForegroundNode||this.lastNode:this.lastNode,b?this.lastForegroundHtmlNode||this.lastHtmlNode:this.lastHtmlNode);b?(this.lastForegroundHtmlNode=a[1],this.lastForegroundNode=a[0]):(this.lastHtmlNode=a[1],this.lastNode=a[0])}; mxGraphView.prototype.updateFixedTerminalPoints=function(a,b,c){this.updateFixedTerminalPoint(a,b,!0,this.graph.getConnectionConstraint(a,b,!0));this.updateFixedTerminalPoint(a,c,!1,this.graph.getConnectionConstraint(a,c,!1))};mxGraphView.prototype.updateFixedTerminalPoint=function(a,b,c,d){a.setAbsoluteTerminalPoint(this.getFixedTerminalPoint(a,b,c,d),c)}; mxGraphView.prototype.getFixedTerminalPoint=function(a,b,c,d){var e=null;null!=d&&(e=this.graph.getConnectionPoint(b,d));if(null==e&&null==b){b=this.scale;d=this.translate;var f=a.origin,e=this.graph.getCellGeometry(a.cell).getTerminalPoint(c);null!=e&&(e=new mxPoint(b*(d.x+e.x+f.x),b*(d.y+e.y+f.y)))}return e}; mxGraphView.prototype.updateBoundsFromStencil=function(a){var b=null;if(null!=a&&null!=a.shape&&null!=a.shape.stencil&&"fixed"==a.shape.stencil.aspect){var b=mxRectangle.fromRectangle(a),c=a.shape.stencil.computeAspect(a.style,a.x,a.y,a.width,a.height);a.setRect(c.x,c.y,a.shape.stencil.w0*c.width,a.shape.stencil.h0*c.height)}return b}; mxGraphView.prototype.updatePoints=function(a,b,c,d){if(null!=a){var e=[];e.push(a.absolutePoints[0]);var f=this.getEdgeStyle(a,b,c,d);if(null!=f){c=this.getTerminalPort(a,c,!0);d=this.getTerminalPort(a,d,!1);var g=this.updateBoundsFromStencil(c),h=this.updateBoundsFromStencil(d);f(a,c,d,b,e);null!=g&&c.setRect(g.x,g.y,g.width,g.height);null!=h&&d.setRect(h.x,h.y,h.width,h.height)}else if(null!=b)for(f=0;f=Math.round(h+g)&&k=f?0:f*f/(a*a+l*l));a>e&&(a=e);e=Math.sqrt(mxUtils.ptSegDistSq(g.x,g.y,h.x,h.y,b,c));-1==mxUtils.relativeCcw(g.x,g.y,h.x,h.y,b,c)&&(e=-e);return new mxPoint(-2*((d/2-n-a)/d),e/this.scale)}}return new mxPoint}; mxGraphView.prototype.updateEdgeLabelOffset=function(a){var b=a.absolutePoints;a.absoluteOffset.x=a.getCenterX();a.absoluteOffset.y=a.getCenterY();if(null!=b&&0c&&a.x>c+2&&a.x<=b)return!0;b=this.graph.container.offsetHeight;c=this.graph.container.clientHeight;return b>c&&a.y>c+2&&a.y<=b?!0:!1}; mxGraphView.prototype.init=function(){this.installListeners();var a=this.graph;a.dialect==mxConstants.DIALECT_SVG?this.createSvg():a.dialect==mxConstants.DIALECT_VML?this.createVml():this.createHtml()}; mxGraphView.prototype.installListeners=function(){var a=this.graph,b=a.container;if(null!=b){mxClient.IS_TOUCH&&(mxEvent.addListener(b,"gesturestart",mxUtils.bind(this,function(b){a.fireGestureEvent(b);mxEvent.consume(b)})),mxEvent.addListener(b,"gesturechange",mxUtils.bind(this,function(b){a.fireGestureEvent(b);mxEvent.consume(b)})),mxEvent.addListener(b,"gestureend",mxUtils.bind(this,function(b){a.fireGestureEvent(b);mxEvent.consume(b)})));mxEvent.addGestureListeners(b,mxUtils.bind(this,function(b){this.isContainerEvent(b)&& (!mxClient.IS_IE&&!mxClient.IS_IE11&&!mxClient.IS_GC&&!mxClient.IS_OP&&!mxClient.IS_SF||!this.isScrollEvent(b))&&a.fireMouseEvent(mxEvent.MOUSE_DOWN,new mxMouseEvent(b))}),mxUtils.bind(this,function(b){this.isContainerEvent(b)&&a.fireMouseEvent(mxEvent.MOUSE_MOVE,new mxMouseEvent(b))}),mxUtils.bind(this,function(b){this.isContainerEvent(b)&&a.fireMouseEvent(mxEvent.MOUSE_UP,new mxMouseEvent(b))}));mxEvent.addListener(b,"dblclick",mxUtils.bind(this,function(b){this.isContainerEvent(b)&&a.dblClick(b)})); var c=function(c){var e=null;mxClient.IS_TOUCH&&(e=mxEvent.getClientX(c),c=mxEvent.getClientY(c),c=mxUtils.convertPoint(b,e,c),e=a.view.getState(a.getCellAt(c.x,c.y)));return e};a.addMouseListener({mouseDown:function(b,c){a.popupMenuHandler.hideMenu()},mouseMove:function(){},mouseUp:function(){}});this.moveHandler=mxUtils.bind(this,function(b){null!=a.tooltipHandler&&a.tooltipHandler.isHideOnHover()&&a.tooltipHandler.hide();this.captureDocumentGesture&&(a.isMouseDown&&null!=a.container&&!this.isContainerEvent(b)&& "none"!=a.container.style.display&&"hidden"!=a.container.style.visibility&&!mxEvent.isConsumed(b))&&a.fireMouseEvent(mxEvent.MOUSE_MOVE,new mxMouseEvent(b,c(b)))});this.endHandler=mxUtils.bind(this,function(b){this.captureDocumentGesture&&(a.isMouseDown&&null!=a.container&&!this.isContainerEvent(b)&&"none"!=a.container.style.display&&"hidden"!=a.container.style.visibility)&&a.fireMouseEvent(mxEvent.MOUSE_UP,new mxMouseEvent(b))});mxEvent.addGestureListeners(document,null,this.moveHandler,this.endHandler)}}; mxGraphView.prototype.createHtml=function(){var a=this.graph.container;null!=a&&(this.canvas=this.createHtmlPane("100%","100%"),this.canvas.style.overflow="hidden",this.backgroundPane=this.createHtmlPane("1px","1px"),this.drawPane=this.createHtmlPane("1px","1px"),this.overlayPane=this.createHtmlPane("1px","1px"),this.decoratorPane=this.createHtmlPane("1px","1px"),this.canvas.appendChild(this.backgroundPane),this.canvas.appendChild(this.drawPane),this.canvas.appendChild(this.overlayPane),this.canvas.appendChild(this.decoratorPane), a.appendChild(this.canvas),this.updateContainerStyle(a),mxClient.IS_QUIRKS&&(a=mxUtils.bind(this,function(a){a=this.getGraphBounds();this.updateHtmlCanvasSize(a.x+a.width+this.graph.border,a.y+a.height+this.graph.border)}),mxEvent.addListener(window,"resize",a)))}; mxGraphView.prototype.updateHtmlCanvasSize=function(a,b){if(null!=this.graph.container){var c=this.graph.container.offsetHeight;this.canvas.style.width=this.graph.container.offsetWidthmxUtils.indexOf(b,e)&&b.push(e)}}return this.getModel().getTopmostCells(b)}; mxGraph.prototype.graphModelChanged=function(a){for(var b=0;b=e.scrollLeft&&b>=e.scrollTop&&a<=e.scrollLeft+e.clientWidth&&b<=e.scrollTop+e.clientHeight){var f=e.scrollLeft+e.clientWidth-a;if(fthis.minPageBreakDist)?Math.ceil(d.height/f.height)+1:0,h=a?Math.ceil(d.width/f.width)+1:0,k=(h-1)*f.width,l=(g-1)*f.height;null==this.horizontalPageBreaks&&0this.model.getChildCount(b)&&c--;this.model.add(b,a[k],c+k);this.autoSizeCellsOnAdd&&this.autoSizeCell(a[k],!0);(null==h||h)&&(this.isExtendParentsOnAdd(a[k])&&this.isExtendParent(a[k]))&&this.extendParent(a[k]);(null==g||g)&&this.constrainChild(a[k]);null!=d&&this.cellConnected(a[k],d,!0);null!=e&&this.cellConnected(a[k],e,!1)}this.fireEvent(new mxEventObject(mxEvent.CELLS_ADDED,"cells",a,"parent",b,"index",c,"source", d,"target",e,"absolute",f))}finally{this.model.endUpdate()}}};mxGraph.prototype.autoSizeCell=function(a,b){if(null!=b?b:1)for(var c=this.model.getChildCount(a),d=0;de.width&&(f=c.width-e.width,c.width-=f);d.x+d.width>e.x+e.width&&(f-=d.x+d.width-e.x-e.width-f);g=0;c.height>e.height&&(g=c.height-e.height,c.height-=g);d.y+d.height> e.y+e.height&&(g-=d.y+d.height-e.y-e.height-g);d.xf&&(m=0),b>g&&(n=0),this.view.setTranslate(Math.floor(m/2-h.x),Math.floor(n/2-h.y)),this.container.scrollLeft=(a-f)/ 2,this.container.scrollTop=(b-g)/2):this.view.setTranslate(a?Math.floor(k.x-h.x*l+m*c/l):k.x,b?Math.floor(k.y-h.y*l+n*d/l):k.y)}; mxGraph.prototype.zoom=function(a,b){b=null!=b?b:this.centerZoom;var c=Math.round(100*this.view.scale*a)/100,d=this.view.getState(this.getSelectionCell());a=c/this.view.scale;if(this.keepSelectionVisibleOnZoom&&null!=d)d=new mxRectangle(d.x*a,d.y*a,d.width*a,d.height*a),this.view.scale=c,this.scrollRectToVisible(d)||(this.view.revalidate(),this.view.setScale(c));else if(d=mxUtils.hasScrollbars(this.container),b&&!d){var d=this.container.offsetWidth,e=this.container.offsetHeight;if(1b?(b=a.height/b,c=(b-a.height)/2,a.height=b,b=Math.min(a.y,c),a.y-=b,d=Math.min(this.container.scrollHeight,a.y+a.height),a.height=d-a.y):(b*=a.width,c=(b-a.width)/2,a.width=b,b=Math.min(a.x,c),a.x-=b, c=Math.min(this.container.scrollWidth,a.x+a.width),a.width=c-a.x);b=this.container.clientWidth/a.width;c=this.view.scale*b;mxUtils.hasScrollbars(this.container)?(this.view.setScale(c),this.container.scrollLeft=Math.round(a.x*b),this.container.scrollTop=Math.round(a.y*b)):this.view.scaleAndTranslate(c,this.view.translate.x-a.x/this.view.scale,this.view.translate.y-a.y/this.view.scale)}; mxGraph.prototype.scrollCellToVisible=function(a,b){var c=-this.view.translate.x,d=-this.view.translate.y,e=this.view.getState(a);null!=e&&(c=new mxRectangle(c+e.x,d+e.y,e.width,e.height),b&&null!=this.container&&(d=this.container.clientWidth,e=this.container.clientHeight,c.x=c.getCenterX()-d/2,c.width=d,c.y=c.getCenterY()-e/2,c.height=e),d=new mxPoint(this.view.translate.x,this.view.translate.y),this.scrollRectToVisible(c)&&(c=new mxPoint(this.view.translate.x,this.view.translate.y),this.view.translate.x= d.x,this.view.translate.y=d.y,this.view.setTranslate(c.x,c.y)))}; mxGraph.prototype.scrollRectToVisible=function(a){var b=!1;if(null!=a){var c=this.container.offsetWidth,d=this.container.offsetHeight,e=Math.min(c,a.width),f=Math.min(d,a.height);if(mxUtils.hasScrollbars(this.container)){c=this.container;a.x+=this.view.translate.x;a.y+=this.view.translate.y;var g=c.scrollLeft-a.x,d=Math.max(g-c.scrollLeft,0);0g+c&&(this.view.translate.x-=(a.x+e-c-g)/k,b=!0);a.y+f>h+d&&(this.view.translate.y-=(a.y+f-d-h)/k,b=!0);a.xmxUtils.indexOf(a,g);)g=this.model.getParent(g);return!this.model.isLayer(c)&&null==g?c:null};mxGraph.prototype.getDefaultParent=function(){var a=this.getCurrentRoot();null==a&&(a=this.defaultParent,null==a&&(a=this.model.getRoot(),a=this.model.getChildAt(a,0)));return a};mxGraph.prototype.setDefaultParent=function(a){this.defaultParent=a};mxGraph.prototype.getSwimlane=function(a){for(;null!=a&&!this.isSwimlane(a);)a=this.model.getParent(a);return a}; mxGraph.prototype.getSwimlaneAt=function(a,b,c){c=c||this.getDefaultParent();if(null!=c)for(var d=this.model.getChildCount(c),e=0;ea.width*e||0a.height*e)return!0}return!1};mxGraph.prototype.getChildVertices=function(a){return this.getChildCells(a,!0,!1)};mxGraph.prototype.getChildEdges=function(a){return this.getChildCells(a,!1,!0)}; mxGraph.prototype.getChildCells=function(a,b,c){a=null!=a?a:this.getDefaultParent();a=this.model.getChildCells(a,null!=b?b:!1,null!=c?c:!1);b=[];for(c=0;c=a&&p.y+p.height<=k&&p.y>=b&&p.x+p.width<=h?f.push(n):this.getCells(a, b,c,d,n,f)}}}return f};mxGraph.prototype.getCellsBeyond=function(a,b,c,d,e){var f=[];if(d||e)if(null==c&&(c=this.getDefaultParent()),null!=c)for(var g=this.model.getChildCount(c),h=0;h=a)&&(!e||l.y>=b)&&f.push(k)}return f}; mxGraph.prototype.findTreeRoots=function(a,b,c){b=null!=b?b:!1;c=null!=c?c:!1;var d=[];if(null!=a){for(var e=this.getModel(),f=e.getChildCount(a),g=null,h=0,k=0;kh&&(h=m,g=l)}}0==d.length&&null!=g&&d.push(g)}return d}; mxGraph.prototype.traverse=function(a,b,c,d,e){if(null!=c&&null!=a&&(b=null!=b?b:!0,e=e||new mxDictionary,!e.get(a)&&(e.put(a,!0),d=c(a,d),null==d||d)))if(d=this.model.getEdgeCount(a),0b?f-1:b)),this.setSelectionCell(a))};mxGraph.prototype.selectAll=function(a,b){a=a||this.getDefaultParent();var c=b?this.model.filterDescendants(function(b){return b!=a},a):this.model.getChildren(a);null!=c&&this.setSelectionCells(c)};mxGraph.prototype.selectVertices=function(a){this.selectCells(!0,!1,a)};mxGraph.prototype.selectEdges=function(a){this.selectCells(!1,!0,a)}; mxGraph.prototype.selectCells=function(a,b,c){c=c||this.getDefaultParent();var d=mxUtils.bind(this,function(c){return null!=this.view.getState(c)&&(0==this.model.getChildCount(c)&&this.model.isVertex(c)&&a&&!this.model.isEdge(this.model.getParent(c))||this.model.isEdge(c)&&b)});c=this.model.filterDescendants(d,c);this.setSelectionCells(c)}; mxGraph.prototype.selectCellForEvent=function(a,b){var c=this.isCellSelected(a);this.isToggleEvent(b)?c?this.removeSelectionCell(a):this.addSelectionCell(a):(!c||1!=this.getSelectionCount())&&this.setSelectionCell(a)};mxGraph.prototype.selectCellsForEvent=function(a,b){this.isToggleEvent(b)?this.addSelectionCells(a):this.setSelectionCells(a)}; mxGraph.prototype.createHandler=function(a){var b=null;if(null!=a)if(this.model.isEdge(a.cell))var b=a.getVisibleTerminalState(!0),c=a.getVisibleTerminalState(!1),d=this.getCellGeometry(a.cell),b=this.view.getEdgeStyle(a,null!=d?d.points:null,b,c),b=this.createEdgeHandler(a,b);else b=this.createVertexHandler(a);return b};mxGraph.prototype.createVertexHandler=function(a){return new mxVertexHandler(a)}; mxGraph.prototype.createEdgeHandler=function(a,b){var c=null;return c=b==mxEdgeStyle.Loop||b==mxEdgeStyle.ElbowConnector||b==mxEdgeStyle.SideToSide||b==mxEdgeStyle.TopToBottom?this.createElbowEdgeHandler(a):b==mxEdgeStyle.SegmentConnector||b==mxEdgeStyle.OrthConnector?this.createEdgeSegmentHandler(a):new mxEdgeHandler(a)};mxGraph.prototype.createEdgeSegmentHandler=function(a){return new mxEdgeSegmentHandler(a)};mxGraph.prototype.createElbowEdgeHandler=function(a){return new mxElbowEdgeHandler(a)}; mxGraph.prototype.addMouseListener=function(a){null==this.mouseListeners&&(this.mouseListeners=[]);this.mouseListeners.push(a)};mxGraph.prototype.removeMouseListener=function(a){if(null!=this.mouseListeners)for(var b=0;bthis.doubleClickCounter){if(this.doubleClickCounter++,d=!1,a==mxEvent.MOUSE_UP?b.getCell()==this.lastTouchCell&&null!=this.lastTouchCell&&(this.lastTouchTime=0,d=this.lastTouchCell,this.lastTouchCell=null,mxClient.IS_QUIRKS&&b.getSource().fireEvent("ondblclick"),this.dblClick(b.getEvent(),d),d=!0):(this.fireDoubleClick= !0,this.lastTouchTime=0),!mxClient.IS_QUIRKS||d){mxEvent.consume(b.getEvent());return}}else{if(null==this.lastTouchEvent||this.lastTouchEvent!=b.getEvent())this.lastTouchCell=b.getCell(),this.lastTouchX=b.getX(),this.lastTouchY=b.getY(),this.lastTouchTime=d,this.lastTouchEvent=b.getEvent(),this.doubleClickCounter=0}else if((this.isMouseDown||a==mxEvent.MOUSE_UP)&&this.fireDoubleClick){this.fireDoubleClick=!1;d=this.lastTouchCell;this.lastTouchCell=null;this.isMouseDown=!1;(null!=d||mxEvent.isTouchEvent(b.getEvent())&& (mxClient.IS_GC||mxClient.IS_SF))&&Math.abs(this.lastTouchX-b.getX())mxUtils.indexOf(a,f)&&(f=this.getLayout(f),null!=f&&f.moveCell(a[e],c.x,c.y))}}; mxLayoutManager.prototype.getCellsForChanges=function(a){for(var b=new mxDictionary,c=[],d=0;df||Math.abs(d)>f){null==this.highlight&&(this.highlight=new mxCellHighlight(this.graph,mxConstants.DROP_TARGET_COLOR,3));null==this.shape&&(this.shape=this.createPreviewShape(this.bounds));var g=c.isGridEnabledEvent(b.getEvent()), f=!0;if(null!=this.guide&&this.useGuidesForEvent(b))d=this.guide.move(this.bounds,new mxPoint(e,d),g),f=!1,e=d.x,d=d.y;else if(g)var h=c.getView().translate,k=c.getView().scale,g=this.bounds.x-(c.snap(this.bounds.x/k-h.x)+h.x)*k,h=this.bounds.y-(c.snap(this.bounds.y/k-h.y)+h.y)*k,d=this.snap(new mxPoint(e,d)),e=d.x-g,d=d.y-h;null!=this.guide&&f&&this.guide.hide();c.isConstrainedEvent(b.getEvent())&&(Math.abs(e)>Math.abs(d)?d=0:e=0);this.currentDx=e;this.currentDy=d;this.updatePreviewShape();f=null; d=b.getCell();g=c.isCloneEvent(b.getEvent())&&c.isCellsCloneable()&&this.isCloneEnabled();c.isDropEnabled()&&this.highlightEnabled&&(f=c.getDropTarget(this.cells,b.getEvent(),d,g));e=c.getView().getState(f);h=!1;null!=e&&(c.model.getParent(this.cell)!=f||g)?(this.target!=f&&(this.target=f,this.setHighlightColor(mxConstants.DROP_TARGET_COLOR)),h=!0):(this.target=null,this.connectOnDrop&&(null!=d&&1==this.cells.length&&c.getModel().isVertex(d)&&c.isCellConnectable(d))&&(e=c.getView().getState(d),null!= e&&(c=null==c.getEdgeValidationError(null,this.cell,d)?mxConstants.VALID_COLOR:mxConstants.INVALID_CONNECT_TARGET_COLOR,this.setHighlightColor(c),h=!0)));null!=e&&h?this.highlight.highlight(e):this.highlight.hide()}this.updateHint(b);this.consumeMouseEvent(mxEvent.MOUSE_MOVE,b);mxEvent.consume(b.getEvent())}else if((this.isMoveEnabled()||this.isCloneEnabled())&&this.updateCursor&&!b.isConsumed()&&null!=b.getState()&&!c.isMouseDown)e=c.getCursorForMouseEvent(b),null==e&&(c.isEnabled()&&c.isCellMovable(b.getCell()))&& (e=c.getModel().isEdge(b.getCell())?mxConstants.CURSOR_MOVABLE_EDGE:mxConstants.CURSOR_MOVABLE_VERTEX),null!=b.sourceState&&b.sourceState.setCursor(e)};mxGraphHandler.prototype.updatePreviewShape=function(){null!=this.shape&&(this.shape.bounds=new mxRectangle(Math.round(this.pBounds.x+this.currentDx-this.graph.panDx),Math.round(this.pBounds.y+this.currentDy-this.graph.panDy),this.pBounds.width,this.pBounds.height),this.shape.redraw())}; mxGraphHandler.prototype.setHighlightColor=function(a){null!=this.highlight&&this.highlight.setHighlightColor(a)}; mxGraphHandler.prototype.mouseUp=function(a,b){if(!b.isConsumed()){var c=this.graph;if(null!=this.cell&&null!=this.first&&null!=this.shape&&null!=this.currentDx&&null!=this.currentDy){var d=b.getCell();if(this.connectOnDrop&&null==this.target&&null!=d&&c.getModel().isVertex(d)&&c.isCellConnectable(d)&&c.isEdgeValid(null,this.cell,d))c.connectionHandler.connect(this.cell,d,b.getEvent());else{var d=c.isCloneEvent(b.getEvent())&&c.isCellsCloneable()&&this.isCloneEnabled(),e=c.getView().scale,f=this.roundLength(this.currentDx/ e),e=this.roundLength(this.currentDy/e),g=this.target;c.isSplitEnabled()&&c.isSplitTarget(g,this.cells,b.getEvent())?c.splitEdge(g,this.cells,null,f,e):this.moveCells(this.cells,f,e,d,this.target,b.getEvent())}}else this.isSelectEnabled()&&(this.delayedSelection&&null!=this.cell)&&this.selectDelayed(b)}this.cellWasClicked&&this.consumeMouseEvent(mxEvent.MOUSE_UP,b);this.reset()}; mxGraphHandler.prototype.selectDelayed=function(a){(!this.graph.isCellSelected(this.cell)||!this.graph.popupMenuHandler.isPopupTrigger(a))&&this.graph.selectCellForEvent(this.cell,a.getEvent())};mxGraphHandler.prototype.reset=function(){this.destroyShapes();this.removeHint();this.delayedSelection=this.cellWasClicked=!1;this.target=this.cell=this.first=this.guides=this.currentDy=this.currentDx=null}; mxGraphHandler.prototype.shouldRemoveCellsFromParent=function(a,b,c){if(this.graph.getModel().isVertex(a)&&(a=this.graph.getView().getState(a),null!=a)){c=mxUtils.convertPoint(this.graph.container,mxEvent.getClientX(c),mxEvent.getClientY(c));var d=mxUtils.toRadians(mxUtils.getValue(a.style,mxConstants.STYLE_ROTATION)||0);if(0!=d){b=Math.cos(-d);var d=Math.sin(-d),e=new mxPoint(a.getCenterX(),a.getCenterY());c=mxUtils.getRotatedPoint(c,b,d,e)}return!mxUtils.contains(a,c.x,c.y)}return!1}; mxGraphHandler.prototype.moveCells=function(a,b,c,d,e,f){d&&(a=this.graph.getCloneableCells(a));null==e&&(this.isRemoveCellsFromParent()&&this.shouldRemoveCellsFromParent(this.graph.getModel().getParent(this.cell),a,f))&&(e=this.graph.getDefaultParent());a=this.graph.moveCells(a,b-this.graph.panDx/this.graph.view.scale,c-this.graph.panDy/this.graph.view.scale,d,e,f);this.isSelectEnabled()&&this.scrollOnMove&&this.graph.scrollCellToVisible(a[0]);d&&this.graph.setSelectionCells(a)}; mxGraphHandler.prototype.destroyShapes=function(){null!=this.shape&&(this.shape.destroy(),this.shape=null);null!=this.guide&&(this.guide.destroy(),this.guide=null);null!=this.highlight&&(this.highlight.destroy(),this.highlight=null)};mxGraphHandler.prototype.destroy=function(){this.graph.removeMouseListener(this);this.graph.removeListener(this.panHandler);null!=this.escapeHandler&&(this.graph.removeListener(this.escapeHandler),this.escapeHandler=null);this.destroyShapes();this.removeHint()}; function mxPanningHandler(a){null!=a&&(this.graph=a,this.graph.addMouseListener(this),this.forcePanningHandler=mxUtils.bind(this,function(a,c){var d=c.getProperty("eventName"),e=c.getProperty("event");d==mxEvent.MOUSE_DOWN&&this.isForcePanningEvent(e)&&(this.start(e),this.active=!0,this.fireEvent(new mxEventObject(mxEvent.PAN_START,"event",e)),e.consume())}),this.graph.addListener(mxEvent.FIRE_MOUSE_EVENT,this.forcePanningHandler),this.gestureHandler=mxUtils.bind(this,function(a,c){if(this.isPinchEnabled()){var d= c.getProperty("event");!mxEvent.isConsumed(d)&&"gesturestart"==d.type?(this.initialScale=this.graph.view.scale,!this.active&&null!=this.mouseDownEvent&&(this.start(this.mouseDownEvent),this.mouseDownEvent=null)):"gestureend"==d.type&&null==this.initialScale&&(this.initialScale=null);if(null!=this.initialScale){var e=Math.round(100*this.initialScale*d.scale)/100;null!=this.minScale&&(e=Math.max(this.minScale,e));null!=this.maxScale&&(e=Math.min(this.maxScale,e));this.graph.view.scale!=e&&(this.graph.zoomTo(e), mxEvent.consume(d))}}}),this.graph.addListener(mxEvent.GESTURE,this.gestureHandler))}mxPanningHandler.prototype=new mxEventSource;mxPanningHandler.prototype.constructor=mxPanningHandler;mxPanningHandler.prototype.graph=null;mxPanningHandler.prototype.useLeftButtonForPanning=!1;mxPanningHandler.prototype.usePopupTrigger=!0;mxPanningHandler.prototype.ignoreCell=!1;mxPanningHandler.prototype.previewEnabled=!0;mxPanningHandler.prototype.useGrid=!1;mxPanningHandler.prototype.panningEnabled=!0; mxPanningHandler.prototype.pinchEnabled=!0;mxPanningHandler.prototype.maxScale=8;mxPanningHandler.prototype.minScale=0.01;mxPanningHandler.prototype.dx=null;mxPanningHandler.prototype.dy=null;mxPanningHandler.prototype.startX=0;mxPanningHandler.prototype.startY=0;mxPanningHandler.prototype.isActive=function(){return this.active||null!=this.initialScale};mxPanningHandler.prototype.isPanningEnabled=function(){return this.panningEnabled}; mxPanningHandler.prototype.setPanningEnabled=function(a){this.panningEnabled=a};mxPanningHandler.prototype.isPinchEnabled=function(){return this.pinchEnabled};mxPanningHandler.prototype.setPinchEnabled=function(a){this.pinchEnabled=a};mxPanningHandler.prototype.isPanningTrigger=function(a){var b=a.getEvent();return this.useLeftButtonForPanning&&null==a.getState()&&mxEvent.isLeftMouseButton(b)||mxEvent.isControlDown(b)&&mxEvent.isShiftDown(b)||this.usePopupTrigger&&mxEvent.isPopupTrigger(b)}; mxPanningHandler.prototype.isForcePanningEvent=function(a){return this.ignoreCell||mxEvent.isMultiTouchEvent(a.getEvent())};mxPanningHandler.prototype.mouseDown=function(a,b){this.mouseDownEvent=b;!b.isConsumed()&&(this.isPanningEnabled()&&!this.active&&this.isPanningTrigger(b))&&(this.start(b),this.consumePanningTrigger(b))}; mxPanningHandler.prototype.start=function(a){this.dx0=-this.graph.container.scrollLeft;this.dy0=-this.graph.container.scrollTop;this.startX=a.getX();this.startY=a.getY();this.dy=this.dx=null;this.panningTrigger=!0};mxPanningHandler.prototype.consumePanningTrigger=function(a){a.consume()}; mxPanningHandler.prototype.mouseMove=function(a,b){this.dx=b.getX()-this.startX;this.dy=b.getY()-this.startY;if(this.active)this.previewEnabled&&(this.useGrid&&(this.dx=this.graph.snap(this.dx),this.dy=this.graph.snap(this.dy)),this.graph.panGraph(this.dx+this.dx0,this.dy+this.dy0)),this.fireEvent(new mxEventObject(mxEvent.PAN,"event",b));else if(this.panningTrigger){var c=this.active;this.active=Math.abs(this.dx)>this.graph.tolerance||Math.abs(this.dy)>this.graph.tolerance;!c&&this.active&&this.fireEvent(new mxEventObject(mxEvent.PAN_START, "event",b))}(this.active||this.panningTrigger)&&b.consume()}; mxPanningHandler.prototype.mouseUp=function(a,b){if(this.active){if(null!=this.dx&&null!=this.dy){if(!this.graph.useScrollbarsForPanning||!mxUtils.hasScrollbars(this.graph.container)){var c=this.graph.getView().scale,d=this.graph.getView().translate;this.graph.panGraph(0,0);this.panGraph(d.x+this.dx/c,d.y+this.dy/c)}b.consume()}this.fireEvent(new mxEventObject(mxEvent.PAN_END,"event",b))}this.panningTrigger=!1;this.mouseDownEvent=null;this.active=!1;this.dy=this.dx=null}; mxPanningHandler.prototype.panGraph=function(a,b){this.graph.getView().setTranslate(a,b)};mxPanningHandler.prototype.destroy=function(){this.graph.removeMouseListener(this);this.graph.removeListener(this.forcePanningHandler);this.graph.removeListener(this.gestureHandler)}; function mxPopupMenuHandler(a,b){null!=a&&(this.graph=a,this.factoryMethod=b,this.graph.addMouseListener(this),this.gestureHandler=mxUtils.bind(this,function(a,b){this.inTolerance=!1}),this.graph.addListener(mxEvent.GESTURE,this.gestureHandler),this.init())}mxPopupMenuHandler.prototype=new mxPopupMenu;mxPopupMenuHandler.prototype.constructor=mxPopupMenuHandler;mxPopupMenuHandler.prototype.graph=null;mxPopupMenuHandler.prototype.selectOnPopup=!0; mxPopupMenuHandler.prototype.clearSelectionOnBackground=!0;mxPopupMenuHandler.prototype.triggerX=null;mxPopupMenuHandler.prototype.triggerY=null;mxPopupMenuHandler.prototype.screenX=null;mxPopupMenuHandler.prototype.screenY=null;mxPopupMenuHandler.prototype.init=function(){mxPopupMenu.prototype.init.apply(this);mxEvent.addGestureListeners(this.div,mxUtils.bind(this,function(a){this.graph.tooltipHandler.hide()}))};mxPopupMenuHandler.prototype.isSelectOnPopup=function(a){return this.selectOnPopup}; mxPopupMenuHandler.prototype.mouseDown=function(a,b){this.isEnabled()&&!mxEvent.isMultiTouchEvent(b.getEvent())&&(this.hideMenu(),this.triggerX=b.getGraphX(),this.triggerY=b.getGraphY(),this.screenX=mxEvent.getMainEvent(b.getEvent()).screenX,this.screenY=mxEvent.getMainEvent(b.getEvent()).screenY,this.popupTrigger=this.isPopupTrigger(b),this.inTolerance=!0)}; mxPopupMenuHandler.prototype.mouseMove=function(a,b){if(this.inTolerance&&(null!=this.screenX&&null!=this.screenY)&&(Math.abs(mxEvent.getMainEvent(b.getEvent()).screenX-this.screenX)>this.graph.tolerance||Math.abs(mxEvent.getMainEvent(b.getEvent()).screenY-this.screenY)>this.graph.tolerance))this.inTolerance=!1}; mxPopupMenuHandler.prototype.mouseUp=function(a,b){if(this.popupTrigger&&this.inTolerance&&null!=this.triggerX&&null!=this.triggerY){var c=this.getCellForPopupEvent(b);this.graph.isEnabled()&&this.isSelectOnPopup(b)&&null!=c&&!this.graph.isCellSelected(c)?this.graph.setSelectionCell(c):this.clearSelectionOnBackground&&null==c&&this.graph.clearSelection();this.graph.tooltipHandler.hide();var d=mxUtils.getScrollOrigin();this.popup(b.getX()+d.x+1,b.getY()+d.y+1,c,b.getEvent());b.consume()}this.inTolerance= this.popupTrigger=!1};mxPopupMenuHandler.prototype.getCellForPopupEvent=function(a){return a.getCell()};mxPopupMenuHandler.prototype.destroy=function(){this.graph.removeMouseListener(this);this.graph.removeListener(this.gestureHandler);mxPopupMenu.prototype.destroy.apply(this)}; function mxCellMarker(a,b,c,d){mxEventSource.call(this);null!=a&&(this.graph=a,this.validColor=null!=b?b:mxConstants.DEFAULT_VALID_COLOR,this.invalidColor=null!=b?c:mxConstants.DEFAULT_INVALID_COLOR,this.hotspot=null!=d?d:mxConstants.DEFAULT_HOTSPOT,this.highlight=new mxCellHighlight(a))}mxUtils.extend(mxCellMarker,mxEventSource);mxCellMarker.prototype.graph=null;mxCellMarker.prototype.enabled=!0;mxCellMarker.prototype.hotspot=mxConstants.DEFAULT_HOTSPOT;mxCellMarker.prototype.hotspotEnabled=!1; mxCellMarker.prototype.validColor=null;mxCellMarker.prototype.invalidColor=null;mxCellMarker.prototype.currentColor=null;mxCellMarker.prototype.validState=null;mxCellMarker.prototype.markedState=null;mxCellMarker.prototype.setEnabled=function(a){this.enabled=a};mxCellMarker.prototype.isEnabled=function(){return this.enabled};mxCellMarker.prototype.setHotspot=function(a){this.hotspot=a};mxCellMarker.prototype.getHotspot=function(){return this.hotspot}; mxCellMarker.prototype.setHotspotEnabled=function(a){this.hotspotEnabled=a};mxCellMarker.prototype.isHotspotEnabled=function(){return this.hotspotEnabled};mxCellMarker.prototype.hasValidState=function(){return null!=this.validState};mxCellMarker.prototype.getValidState=function(){return this.validState};mxCellMarker.prototype.getMarkedState=function(){return this.markedState};mxCellMarker.prototype.reset=function(){this.validState=null;null!=this.markedState&&(this.markedState=null,this.unmark())}; mxCellMarker.prototype.process=function(a){var b=null;this.isEnabled()&&(b=this.getState(a),this.setCurrentState(b,a));return b};mxCellMarker.prototype.setCurrentState=function(a,b,c){var d=null!=a?this.isValidState(a):!1;c=null!=c?c:this.getMarkerColor(b.getEvent(),a,d);this.validState=d?a:null;if(a!=this.markedState||c!=this.currentColor)this.currentColor=c,null!=a&&null!=this.currentColor?(this.markedState=a,this.mark()):null!=this.markedState&&(this.markedState=null,this.unmark())}; mxCellMarker.prototype.markCell=function(a,b){var c=this.graph.getView().getState(a);null!=c&&(this.currentColor=null!=b?b:this.validColor,this.markedState=c,this.mark())};mxCellMarker.prototype.mark=function(){this.highlight.setHighlightColor(this.currentColor);this.highlight.highlight(this.markedState);this.fireEvent(new mxEventObject(mxEvent.MARK,"state",this.markedState))};mxCellMarker.prototype.unmark=function(){this.mark()};mxCellMarker.prototype.isValidState=function(a){return!0}; mxCellMarker.prototype.getMarkerColor=function(a,b,c){return c?this.validColor:this.invalidColor};mxCellMarker.prototype.getState=function(a){var b=this.graph.getView();cell=this.getCell(a);b=this.getStateToMark(b.getState(cell));return null!=b&&this.intersects(b,a)?b:null};mxCellMarker.prototype.getCell=function(a){return a.getCell()};mxCellMarker.prototype.getStateToMark=function(a){return a}; mxCellMarker.prototype.intersects=function(a,b){return this.hotspotEnabled?mxUtils.intersectsHotspot(a,b.getGraphX(),b.getGraphY(),this.hotspot,mxConstants.MIN_HOTSPOT_SIZE,mxConstants.MAX_HOTSPOT_SIZE):!0};mxCellMarker.prototype.destroy=function(){this.graph.getView().removeListener(this.resetHandler);this.graph.getModel().removeListener(this.resetHandler);this.highlight.destroy()}; function mxSelectionCellsHandler(a){mxEventSource.call(this);this.graph=a;this.handlers=new mxDictionary;this.graph.addMouseListener(this);this.refreshHandler=mxUtils.bind(this,function(a,c){this.isEnabled()&&this.refresh()});this.graph.getSelectionModel().addListener(mxEvent.CHANGE,this.refreshHandler);this.graph.getModel().addListener(mxEvent.CHANGE,this.refreshHandler);this.graph.getView().addListener(mxEvent.SCALE,this.refreshHandler);this.graph.getView().addListener(mxEvent.TRANSLATE,this.refreshHandler); this.graph.getView().addListener(mxEvent.SCALE_AND_TRANSLATE,this.refreshHandler);this.graph.getView().addListener(mxEvent.DOWN,this.refreshHandler);this.graph.getView().addListener(mxEvent.UP,this.refreshHandler)}mxUtils.extend(mxSelectionCellsHandler,mxEventSource);mxSelectionCellsHandler.prototype.graph=null;mxSelectionCellsHandler.prototype.enabled=!0;mxSelectionCellsHandler.prototype.refreshHandler=null;mxSelectionCellsHandler.prototype.maxHandlers=100; mxSelectionCellsHandler.prototype.handlers=null;mxSelectionCellsHandler.prototype.isEnabled=function(){return this.enabled};mxSelectionCellsHandler.prototype.setEnabled=function(a){this.enabled=a};mxSelectionCellsHandler.prototype.getHandler=function(a){return this.handlers.get(a)};mxSelectionCellsHandler.prototype.reset=function(){this.handlers.visit(function(a,b){b.reset.apply(b)})}; mxSelectionCellsHandler.prototype.refresh=function(){var a=this.handlers;this.handlers=new mxDictionary;for(var b=this.graph.getSelectionCells(),c=0;cthis.graph.tolerance||g>this.graph.tolerance))this.shape=this.createShape(), null!=this.edgeState&&this.shape.apply(this.edgeState),this.updateCurrentState(b,c);null!=this.shape&&(null!=this.edgeState?this.shape.points=this.edgeState.absolutePoints:(c=[e],null!=this.waypoints&&(c=c.concat(this.waypoints)),c.push(d),this.shape.points=c),this.drawPreview());null!=this.cursor&&(this.graph.container.style.cursor=this.cursor);mxEvent.consume(b.getEvent());b.consume()}else!this.isEnabled()||!this.graph.isEnabled()?this.constraintHandler.reset():this.previous!=this.currentState&& null==this.edgeState?(this.destroyIcons(),null!=this.currentState&&(null==this.error&&null==this.constraintHandler.currentConstraint)&&(this.icons=this.createIcons(this.currentState),null==this.icons&&(this.currentState.setCursor(mxConstants.CURSOR_CONNECT),b.consume())),this.previous=this.currentState):this.previous==this.currentState&&(null!=this.currentState&&null==this.icons&&!this.graph.isMouseDown)&&b.consume();if(!this.graph.isMouseDown&&null!=this.currentState&&null!=this.icons){c=!1;d=b.getSource(); for(e=0;ethis.graph.tolerance||b>this.graph.tolerance))null==this.waypoints&&(this.waypoints=[]),c=this.graph.view.scale,b=new mxPoint(this.graph.snap(a.getGraphX()/c)*c,this.graph.snap(a.getGraphY()/c)*c),this.waypoints.push(b)}; mxConnectionHandler.prototype.mouseUp=function(a,b){if(!b.isConsumed()&&this.isConnecting()){if(this.waypointsEnabled&&!this.isStopEvent(b)){this.addWaypointForEvent(b);b.consume();return}if(null==this.error){var c=null!=this.previous?this.previous.cell:null,d=null;null!=this.constraintHandler.currentConstraint&&null!=this.constraintHandler.currentFocus&&(d=this.constraintHandler.currentFocus.cell);null==d&&null!=this.currentState&&(d=this.currentState.cell);this.connect(c,d,b.getEvent(),b.getCell())}else null!= this.previous&&(null!=this.marker.validState&&this.previous.cell==this.marker.validState.cell)&&this.graph.selectCellForEvent(this.marker.source,evt),0c*this.view.scale||Math.abs(f.y- b.getGraphY())>c*this.view.scale){this.isCellSelected(d.cell)||this.setSelectionCell(d.cell);var e=this.selectionCellsHandler.getHandler(d.cell);if(null!=e&&null!=e.bends&&0mxUtils.indexOf(b,e)&&c.push(e)): c.push(b[d])}return c};this.connectionHandler.createTargetVertex=function(a,b){var c=this.graph.view.getState(b),c=null!=c?c.style:this.graph.getCellStyle(b);mxUtils.getValue(c,"part",!1)&&(c=this.graph.model.getParent(b),this.graph.model.isVertex(c)&&(b=c));return mxConnectionHandler.prototype.createTargetVertex.apply(this,arguments)};var n=new mxRubberband(this);this.getRubberband=function(){return n};var p=(new Date).getTime(),r=0,q=this.connectionHandler.mouseMove;this.connectionHandler.mouseMove= function(){var a=this.currentState;q.apply(this,arguments);a!=this.currentState?(p=(new Date).getTime(),r=0):r=(new Date).getTime()-p};var s=this.connectionHandler.isOutlineConnectEvent;this.connectionHandler.isOutlineConnectEvent=function(a){return null!=this.currentState&&a.getState()==this.currentState&&2E3=a&&p.y+p.height<=k&&p.y>=b&&p.x+p.width<=h)&&f.push(n);this.getAllCells(a,b,c,d,n,f)}}}return f};var J=this.graphHandler.shouldRemoveCellsFromParent;this.graphHandler.shouldRemoveCellsFromParent=function(a,b,c){return this.graph.isCellSelected(a)?!1:J.apply(this,arguments)};this.isCellLocked=function(a){for(a=this.view.getState(a);null!=a;){if("1"==mxUtils.getValue(a.style, "locked","0"))return!0;a=this.view.getState(this.model.getParent(a.cell))}return!1};var D=null;this.addListener(mxEvent.FIRE_MOUSE_EVENT,mxUtils.bind(this,function(a,b){if("mouseDown"==b.getProperty("eventName")){var c=b.getProperty("event").getState();D=null!=c&&!this.isSelectionEmpty()&&!this.isCellSelected(c.cell)?this.getSelectionCells():null}}));this.addListener(mxEvent.TAP_AND_HOLD,mxUtils.bind(this,function(a,b){if(!mxEvent.isMultiTouchEvent(b)){var c=b.getProperty("event"),d=b.getProperty("cell"); null==d?(c=mxUtils.convertPoint(this.container,mxEvent.getClientX(c),mxEvent.getClientY(c)),n.start(c.x,c.y)):null!=D?this.addSelectionCells(D):1p?"a":"p",tt:12>p?"am":"pm",T:12>p?"A":"P",TT:12>p?"AM":"PM",Z:c?"UTC":(String(a).match(e)||[""]).pop().replace(f,""),o:(0d&&"%"==b.charAt(match.index-1))f=e.substring(1);else{var g=e.substring(1,e.length-1);if(0>g.indexOf("{"))for(var h=a;null==f&&null!=h;)null!=h.value&&"object"==typeof h.value&&(f=h.hasAttribute(g)?null!=h.getAttribute(g)?h.getAttribute(g):"":null),h=this.model.getParent(h);null==f&&(f=this.getGlobalVariable(g))}c.push(b.substring(d, match.index)+(null!=f?f:e));d=match.index+e.length}}c.push(b.substring(d));return c.join("")};Graph.prototype.selectCellsForConnectVertex=function(a,b,c){2==a.length&&this.model.isVertex(a[1])?(this.setSelectionCell(a[1]),null!=c&&(mxEvent.isTouchEvent(b)?c.update(c.getState(this.view.getState(a[1]))):c.reset()),this.scrollCellToVisible(a[1])):this.setSelectionCells(a)}; Graph.prototype.connectVertex=function(a,b,c,d,e){var f=a.geometry.relative&&null!=a.parent.geometry?new mxPoint(a.parent.geometry.width*a.geometry.x,a.parent.geometry.height*a.geometry.y):new mxPoint(a.geometry.x,a.geometry.y);b==mxConstants.DIRECTION_NORTH?(f.x+=a.geometry.width/2,f.y-=c):b==mxConstants.DIRECTION_SOUTH?(f.x+=a.geometry.width/2,f.y+=a.geometry.height+c):(f.x=b==mxConstants.DIRECTION_WEST?f.x-c:f.x+(a.geometry.width+c),f.y+=a.geometry.height/2);c=this.view.getState(this.model.getParent(a)); var g=this.view.scale,h=this.view.translate,k=h.x*g,h=h.y*g;this.model.isVertex(c.cell)&&(k=c.x,h=c.y);this.model.isVertex(a.parent)&&a.geometry.relative&&(f.x+=a.parent.geometry.x,f.y+=a.parent.geometry.y);c=mxEvent.isControlDown(d)&&!e?null:this.getCellAt(k+f.x*g,h+f.y*g);this.model.isAncestor(c,a)&&(c=null);for(g=c;null!=g;){if(this.isCellLocked(g)){c=null;break}g=this.model.getParent(g)}null!=c&&(g=this.view.getState(a),k=this.view.getState(c),null!=g&&(null!=k&&mxUtils.intersects(g,k))&&(c=null)); if(e=!mxEvent.isShiftDown(d)||e)b==mxConstants.DIRECTION_NORTH?f.y-=a.geometry.height/2:b==mxConstants.DIRECTION_SOUTH?f.y+=a.geometry.height/2:f.x=b==mxConstants.DIRECTION_WEST?f.x-a.geometry.width/2:f.x+a.geometry.width/2;null!=c&&!this.isCellConnectable(c)&&(g=this.getModel().getParent(c),this.getModel().isVertex(g)&&this.isCellConnectable(g)&&(c=g));if(c==a||this.model.isEdge(c)||!this.isCellConnectable(c))c=null;g=[];this.model.beginUpdate();try{k=c;if(null==k&&e){for(var h=a,l=this.getCellGeometry(a);null!= l&&l.relative;)h=this.getModel().getParent(h),l=this.getCellGeometry(h);var m=this.view.getState(h),n=null!=m?m.style:this.getCellStyle(h);if(mxUtils.getValue(n,"part",!1)){var p=this.model.getParent(h);this.model.isVertex(p)&&(h=p)}k=this.duplicateCells([h],!1)[0];l=this.getCellGeometry(k);null!=l&&(l.x=f.x-l.width/2,l.y=f.y-l.height/2)}l=null;null!=this.layoutManager&&(l=this.layoutManager.getLayout(this.model.getParent(a)));var r=mxEvent.isControlDown(d)&&e||null==c&&null!=l&&l.constructor==mxStackLayout? null:this.insertEdge(this.model.getParent(a),null,"",a,k,this.createCurrentEdgeStyle());if(null!=r&&this.connectionHandler.insertBeforeSource){var q=null;for(d=a;null!=d.parent&&null!=d.geometry&&d.geometry.relative&&d.parent!=r.parent;)d=this.model.getParent(d);null!=d&&(null!=d.parent&&d.parent==r.parent)&&(q=d.parent.getIndex(d),d.parent.insert(r,q))}null==c&&(null!=k&&null!=l&&null!=a.parent&&l.constructor==mxStackLayout&&b==mxConstants.DIRECTION_WEST)&&(q=a.parent.getIndex(a),a.parent.insert(k, q));null!=r&&g.push(r);null==c&&null!=k&&g.push(k);null==k&&null!=r&&r.geometry.setTerminalPoint(f,!1);null!=r&&this.fireEvent(new mxEventObject("cellsInserted","cells",[r]))}finally{this.model.endUpdate()}return g}; Graph.prototype.getIndexableText=function(){var a=document.createElement("div"),b=[],c="",d;for(d in this.model.cells)if(c=this.model.cells[d],this.model.isVertex(c)||this.model.isEdge(c))this.isHtmlLabel(c)?(a.innerHTML=this.getLabel(c),c=mxUtils.extractTextWithWhitespace([a])):c=this.getLabel(c),c=mxUtils.trim(c.replace(/[\x00-\x1F\x7F-\x9F]|\s+/g," ")),0this.view.scale?this.zoom((this.view.scale+0.01)/this.view.scale):this.zoom(Math.round(20*this.view.scale*this.zoomFactor)/20/this.view.scale)};Graph.prototype.zoomOut=function(){0.15>=this.view.scale?this.zoom((this.view.scale-0.01)/this.view.scale):this.zoom(Math.round(20*this.view.scale*(1/this.zoomFactor))/20/this.view.scale)}; Graph.prototype.getTooltipForCell=function(a){var b="";if(mxUtils.isNode(a.value)){var c=a.value.getAttribute("tooltip");if(null!=c)null!=c&&this.isReplacePlaceholders(a)&&(c=this.replacePlaceholders(a,c)),b=this.sanitizeHtml(c);else{c=["label","tooltip","placeholders","placeholder"];a=a.value.attributes;this.isEnabled()&&c.push("link");for(var d=0;dmxUtils.indexOf(c,a[d].nodeName)&&0this.activationDelay)if(this.currentState!=a&&(d>this.updateDelay&&null!=a||null==this.bbox||null==b||null==c||!mxUtils.contains(this.bbox,b,c)))null!=a&&this.graph.isEnabled()?(this.removeNodes(),this.setCurrentState(a),this.repaint(),this.graph.connectionHandler.constraintHandler.currentFocus!= a&&this.graph.connectionHandler.constraintHandler.reset()):this.reset()}else this.reset()};HoverIcons.prototype.setCurrentState=function(a){"eastwest"!=a.style.portConstraint&&(this.graph.container.appendChild(this.arrowUp),this.graph.container.appendChild(this.arrowDown));this.graph.container.appendChild(this.arrowRight);this.graph.container.appendChild(this.arrowLeft);this.currentState=a}; (function(){var a=mxGraphView.prototype.updateFloatingTerminalPoint;mxGraphView.prototype.updateFloatingTerminalPoint=function(b,c,f,g){if(null!=c&&null!=b&&("1"==c.style.snapToPoint||"1"==b.style.snapToPoint)){c=this.getTerminalPort(b,c,g);var h=this.getNextPoint(b,f,g),k=this.graph.isOrthogonal(b),l=mxUtils.toRadians(Number(c.style[mxConstants.STYLE_ROTATION]||"0")),m=new mxPoint(c.getCenterX(),c.getCenterY());if(0!=l)var n=Math.cos(-l),p=Math.sin(-l),h=mxUtils.getRotatedPoint(h,n,p,m);n=parseFloat(b.style[mxConstants.STYLE_PERIMETER_SPACING]|| 0);n+=parseFloat(b.style[g?mxConstants.STYLE_SOURCE_PERIMETER_SPACING:mxConstants.STYLE_TARGET_PERIMETER_SPACING]||0);h=this.getPerimeterPoint(c,h,0==l&&k,n);0!=l&&(n=Math.cos(l),p=Math.sin(l),h=mxUtils.getRotatedPoint(h,n,p,m));if(null!=c){l=this.graph.getAllConnectionConstraints(c);k=m=null;for(n=0;n=e.getStatus())&&eval.call(window,e.getText())}catch(f){null!=window.console&&console.log("error in getStencil:",d,f)}}}}else c=c.replace("_-_","_"),mxStencilRegistry.loadStencilSet(STENCIL_PATH+"/"+c+".xml",null);b=mxStencilRegistry.stencils[a]}}return b};mxStencilRegistry.getBasenameForStencil=function(a){var b=null;if(null!=a&&(a=a.split("."),0=c.getStatus()&&(e=c.getXml(),mxStencilRegistry.packages[a]=e,f=!0,null!=e&&null!=e.documentElement&&mxStencilRegistry.parseStencilSet(e.documentElement,b,f))}));return}g=mxUtils.load(a);e=g.getXml();mxStencilRegistry.packages[a]=e;f=!0}catch(h){null!=window.console&&console.log("error in loadStencilSet:", a,h)}null!=e&&null!=e.documentElement&&mxStencilRegistry.parseStencilSet(e.documentElement,b,f)}};mxStencilRegistry.parseStencilSets=function(a){for(var b=0;bf||d>f)&&this.clear()}}else"a"==b.getSource().nodeName.toLowerCase()?this.clear():null!=this.currentState&&(b.getState()==this.currentState||null==b.getState())&&g.intersects(this.currentState,b.getGraphX(),b.getGraphY())||this.updateCurrentState(b)},mouseUp:function(a, d){if("a"!=d.getSource().nodeName.toLowerCase()&&!d.isConsumed()&&(null==d.getState()||!d.isSource(d.getState().control))&&(mxEvent.isLeftMouseButton(d.getEvent())||mxEvent.isTouchEvent(d.getEvent())))if(null!=this.currentLink){var e=g.isBlankLink(this.currentLink);!e&&null!=b&&b(d.getEvent());window.open(this.currentLink,e?g.linkTarget:"_top");d.consume()}else null!=c&&(!d.isConsumed()&&Math.abs(this.scrollLeft-g.container.scrollLeft)b&&c[d].deleteCell(b)};Graph.prototype.pasteHtmlAtCaret=function(a){var b;if(window.getSelection){if(b=window.getSelection(),b.getRangeAt&&b.rangeCount){b=b.getRangeAt(0);b.deleteContents();var c=document.createElement("div");c.innerHTML=a;a=document.createDocumentFragment();for(var d;d=c.firstChild;)lastNode=a.appendChild(d);b.insertNode(a)}}else(b=document.selection)&&"Control"!=b.type&& b.createRange().pasteHTML(a)};Graph.prototype.initTouch=function(){this.connectionHandler.marker.isEnabled=function(){return null!=this.graph.connectionHandler.first};this.addListener(mxEvent.START_EDITING,function(a,b){this.popupMenuHandler.hideMenu()});var a=this.updateMouseEvent;this.updateMouseEvent=function(b){b=a.apply(this,arguments);if(mxEvent.isTouchEvent(b.getEvent())&&null==b.getState()){var c=this.getCellAt(b.graphX,b.graphY);null!=c&&this.isSwimlane(c)&&this.hitsSwimlaneContent(c,b.graphX, b.graphY)||(b.state=this.view.getState(c),null!=b.state&&null!=b.state.shape&&(this.container.style.cursor=b.state.shape.node.style.cursor))}null==b.getState()&&this.isEnabled()&&(this.container.style.cursor="default");return b};var b=!1,c=!1,d=!1,e=this.fireMouseEvent;this.fireMouseEvent=function(a,f,g){a==mxEvent.MOUSE_DOWN&&(f=this.updateMouseEvent(f),b=this.isCellSelected(f.getCell()),c=this.isSelectionEmpty(),d=this.popupMenuHandler.isMenuShowing());e.apply(this,arguments)};this.popupMenuHandler.mouseUp= mxUtils.bind(this,function(a,e){this.popupMenuHandler.popupTrigger=!this.isEditing()&&this.isEnabled()&&(null==e.getState()||!e.isSource(e.getState().control))&&(this.popupMenuHandler.popupTrigger||!d&&!mxEvent.isMouseEvent(e.getEvent())&&(c&&null==e.getCell()&&this.isSelectionEmpty()||b&&this.isCellSelected(e.getCell())));mxPopupMenuHandler.prototype.mouseUp.apply(this.popupMenuHandler,arguments)})};mxCellEditor.prototype.isContentEditing=function(){var a=this.graph.view.getState(this.editingCell); return null!=a&&1==a.style.html};mxCellEditor.prototype.saveSelection=function(){if(window.getSelection){if(sel=window.getSelection(),sel.getRangeAt&&sel.rangeCount){for(var a=[],b=0,c=sel.rangeCount;bg||Math.abs(f)>g)null==this.div&&(this.div=this.createShape()),mxUtils.clearSelection(),this.update(d,c),this.isSpaceEvent(b)?(d=this.x+this.width,c=this.y+this.height,e=this.graph.view.scale,mxEvent.isAltDown(b.getEvent())||(this.width=this.graph.snap(this.width/e)*e,this.height=this.graph.snap(this.height/e)*e,this.graph.isGridEnabled()||(this.width=this.width?"0px 1px 0px 0px":"0px 1px 0px 1px",null==this.secondDiv&&(this.secondDiv= this.div.cloneNode(!0),this.div.parentNode.appendChild(this.secondDiv)),this.secondDiv.style.left=this.x+"px",this.secondDiv.style.top=this.y+"px",this.secondDiv.style.width=this.graph.container.clientWidth+"px",this.secondDiv.style.height=Math.max(0,this.height)+"px",this.secondDiv.style.borderWidth=0>=this.height?"1px 0px 0px 0px":"1px 0px 1px 0px"):(this.div.style.backgroundColor="",this.div.style.borderWidth="",this.div.style.borderStyle="",null!=this.secondDiv&&(this.secondDiv.parentNode.removeChild(this.secondDiv), this.secondDiv=null)),b.consume()}};var q=mxRubberband.prototype.reset;mxRubberband.prototype.reset=function(){null!=this.secondDiv&&(this.secondDiv.parentNode.removeChild(this.secondDiv),this.secondDiv=null);q.apply(this,arguments)};var s=(new Date).getTime(),w=0,t=mxEdgeHandler.prototype.updatePreviewState;mxEdgeHandler.prototype.updatePreviewState=function(a,b,c,d){t.apply(this,arguments);c!=this.currentTerminalState?(s=(new Date).getTime(),w=0):w=(new Date).getTime()-s;this.currentTerminalState= c};var y=mxEdgeHandler.prototype.isOutlineConnectEvent;mxEdgeHandler.prototype.isOutlineConnectEvent=function(a){return null!=this.currentTerminalState&&a.getState()==this.currentTerminalState&&2E3=this.state.absolutePoints.length-1||this.constructor==mxElbowEdgeHandler&&2==a)?this.graph.getConnectionConstraint(this.state,d,c):null,c=null!=(null!=e?this.graph.getConnectionPoint(this.state.getVisibleTerminalState(c),e):null)?this.fixedHandleImage:null!=e&&null!=d?this.terminalHandleImage:this.handleImage;if(null!=c)return c=new mxImageShape(new mxRectangle(0,0,c.width,c.height),c.src),c.preserveImageAspect=!1,c;c=mxConstants.HANDLE_SIZE; this.preferHtml&&(c-=1);return new mxRectangleShape(new mxRectangle(0,0,c,c),mxConstants.HANDLE_FILLCOLOR,mxConstants.HANDLE_STROKECOLOR)};var z=mxVertexHandler.prototype.createSizerShape;mxVertexHandler.prototype.createSizerShape=function(a,b,c){this.handleImage=b==mxEvent.ROTATION_HANDLE?HoverIcons.prototype.rotationHandle:b==mxEvent.LABEL_HANDLE?this.secondaryHandleImage:this.handleImage;return z.apply(this,arguments)};var v=mxGraphHandler.prototype.getBoundingBox;mxGraphHandler.prototype.getBoundingBox= function(a){if(null!=a&&1==a.length){var b=this.graph.getModel(),c=b.getParent(a[0]),d=this.graph.getCellGeometry(a[0]);if(b.isEdge(c)&&(null!=d&&d.relative)&&(b=this.graph.view.getState(a[0]),null!=b&&2>b.width&&2>b.height&&null!=b.text&&null!=b.text.boundingBox))return mxRectangle.fromRectangle(b.text.boundingBox)}return v.apply(this,arguments)};var J=mxVertexHandler.prototype.getSelectionBounds;mxVertexHandler.prototype.getSelectionBounds=function(a){var b=this.graph.getModel(),c=b.getParent(a.cell), d=this.graph.getCellGeometry(a.cell);return b.isEdge(c)&&null!=d&&d.relative&&2>a.width&&2>a.height&&null!=a.text&&null!=a.text.boundingBox?(b=a.text.unrotatedBoundingBox||a.text.boundingBox,new mxRectangle(Math.round(b.x),Math.round(b.y),Math.round(b.width),Math.round(b.height))):J.apply(this,arguments)};var D=mxVertexHandler.prototype.mouseDown;mxVertexHandler.prototype.mouseDown=function(a,b){var c=this.graph.getModel(),d=c.getParent(this.state.cell),e=this.graph.getCellGeometry(this.state.cell); (this.getHandleForEvent(b)==mxEvent.ROTATION_HANDLE||!c.isEdge(d)||null==e||!e.relative||null==this.state||2<=this.state.width||2<=this.state.height)&&D.apply(this,arguments)};mxVertexHandler.prototype.isRotationHandleVisible=function(){return this.graph.isEnabled()&&this.rotationEnabled&&this.graph.isCellRotatable(this.state.cell)&&(0>=mxGraphHandler.prototype.maxCells||this.graph.getSelectionCount()e)this.originalLineTo.apply(this.canvas,arguments);else{var f=Math.round(e/10),g=this.defaultVariation;5>f&&(f=5,g/=3);for(var h=function(a){return"number"===typeof a?a?0>a?-1:1:a===a?0:NaN:NaN}, k=h(a-this.lastX)*c/f,h=h(b-this.lastY)*d/f,c=c/e,d=d/e,e=0;e