(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"),m=RegExp("\\\\(?:(?:[0-9a-fA-F]{1,6}[\\t\\n\\f ]?|[\\u0020-\\u007e\\u0080-\\ud7ff\\ue000\\ufffd]|[\\ud800-\\udbff][\\udc00-\\udfff])|[\\n\\f])","g"),l=RegExp("^url\\([\\t\\n\\f ]*[\"']?|[\"']?[\\t\\n\\f ]*\\)$","gi");k=function(b){return b.replace(m,a)};h=function(a){a=(""+a).replace(/\r\n?/g,"\n").match(g)||[];for(var e=0,f=" ",h=0,m=a.length;h=q?" ":/url\(/i.test(n)?"url("+b(n.replace(l,""),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 m=function(){function a(b){b=(""+b).match(l);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(m,"");else if(d=!!g){if(47!==h.charCodeAt(0))var h=e(c.g||"").replace(m,""),k=h.lastIndexOf("/")+1,h=e((k?h.substring(0,k):"")+e(g)).replace(m,"")}else h=h&&h.replace(m,""),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,H={"\n":"%0a","\f":"%0c","\r":"%0d",'"':"%22","'":"%27","(":"%28",")":"%29","*":"%2a", "\x3c":"%3c","\x3e":"%3e"},B=/^(?:([^:/?# ]+):)?/,A=/^(?:https?|mailto|data)$/i;l=function(){var a={};return function T(b,c,d,g,m){b=K(b);var l=f[b];if(!l||"object"!==typeof l)c.length=0;else{for(var n=l.cssPropBits,D=n&80,p=n&1536,q=NaN,r=0,B=0;r=u)A=n&1?A:"";else if(J=A.charCodeAt(1),z=A.charCodeAt(2),H=48<=J&&57>=J,S=48<=z&&57>=z,43===u&&(H||46===J&&S))A=n&1?(H?"":"0")+A.substring(1):"";else if(45===u&&(H||46===J&&S))A=n&4?(H?"-":"-0")+A.substring(1):n&1?"0":"";else if(46===u&&H)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:{L=c;ca=r;A=1;U=ca+1;for(u=L.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();fm)return m=~m,m===h?m+1:m;var l=a[m];if("{"!==l)return m===h?m+1:m;c=m+1;m>h&&" "===a[m-1]&&--m;for(g.startRuleset&&g.startRuleset(a.slice(h,m));cl)l=~l;else{for(var n=[],p=0,q=b;q])/g;f=a+"";if(fa)f=f.split(g);else{for(var h=[],k=0,m;(m=g.exec(f))!==c;)h.push(f.substring(k,m.index)),h.push(m[0]),k=m.index+m[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,m,l=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,S=/\"/g,L=/^\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=l;Z.ta=Z.makeTagPolicy=aa;Z.wa=Z.normalizeRCData=k;Z.xa=Z.sanitize= function(a,b,c,d){return w(a,aa(b,c,d))};Z.ya=Z.sanitizeAttribs=V;Z.za=Z.sanitizeWithPolicy=w;Z.Ba=Z.unescapeEntities=g;return Z}(u);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,m=0;for(null!=b&&b||(a=Base64._utf8_encode(a));m>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,m){if(!d[h]){if(!c[h]){var l="function"==typeof require&&require;if(!m&&l)return l(h,!0);if(g)return g(h,!0);l=Error("Cannot find module '"+h+"'");throw l.code="MODULE_NOT_FOUND",l;}l=d[h]={exports:{}}; c[h][0].call(l.exports,function(b){var d=c[h][1][b];return f(d?d:b)},l,l.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 l;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(m[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(m[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"),m=b("./zlib/messages"),l=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,m=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(m),f.next_out=0,f.avail_out=m),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!==m.Z_OK)throw Error(l[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"),m=b("./zlib/constants"),l=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,l,n,p,F=this.strm,H=this.options.chunkSize,B=this.options.dictionary,A=!1;if(this.ended)return!1;e=c===~~c?c:!0===c?m.Z_FINISH:m.Z_NO_FLUSH; "string"==typeof b?F.input=k.binstring2buf(b):"[object ArrayBuffer]"===r.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(H),F.next_out=0,F.avail_out=H),d=g.inflate(F,m.Z_NO_FLUSH),d===m.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===m.Z_BUF_ERROR&&!0===A&&(d=m.Z_OK,A=!1),d!==m.Z_STREAM_END&&d!==m.Z_OK)return this.onEnd(d), this.ended=!0,!1;F.next_out&&(0!==F.avail_out&&d!==m.Z_STREAM_END&&(0!==F.avail_in||e!==m.Z_FINISH&&e!==m.Z_SYNC_FLUSH)||("string"===this.options.to?(f=k.utf8border(F.output,F.next_out),l=F.next_out-f,n=k.buf2string(F.output,f),F.next_out=l,F.avail_out=H-l,l&&h.arraySet(F.output,F.output,f,l,0),this.onData(n)):this.onData(h.shrinkBuf(F.output,F.next_out))));0===F.avail_in&&0===F.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++)l[b]=252<=b?6:248<=b?5:240<=b?4:224<=b?3:192<=b?2:1;l[254]=l[254]=1;d.string2buf=function(b){var c,d,e,g,h,k=b.length,m=0;for(g=0;gd?1:2048>d?2:65536>d?3:4;c=new f.Buf8(m);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)m[f++]=g;else if(h=l[g],4g?m[f++]=g:(g-=65536,m[f++]=55296|g>>10&1023,m[f++]=56320|1023&g)}return e(m,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+l[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 m=0;0!==d;){m=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){K._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 m(b,c){b.pending_buf[b.pending++]=c>>>8&255;b.pending_buf[b.pending++]=255&c}function l(b,c){var d,e,f=b.max_chain_length,g=b.strstart,h=b.prev_length,k=b.nice_match,m=b.strstart>b.w_size-R?b.strstart-(b.w_size-R):0,l=b.window,n=b.w_mask,D=b.prev,p=b.strstart+M,G=l[g+h-1],q=l[g+h];b.prev_length>=b.good_match&& (f>>=2);k>b.lookahead&&(k=b.lookahead);do if(d=c,l[d+h]===q&&l[d+h-1]===G&&l[d]===l[g]&&l[++d]===l[g+1]){g+=2;d++;do;while(l[++g]===l[++d]&&l[++g]===l[++d]&&l[++g]===l[++d]&&l[++g]===l[++d]&&l[++g]===l[++d]&&l[++g]===l[++d]&&l[++g]===l[++d]&&l[++g]===l[++d]&&gh){if(b.match_start=c,h=e,e>=k)break;G=l[g+h-1];q=l[g+h]}}while((c=D[c&n])>m&&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=F(c.adler,e,k,h):2===c.state.wrap&&(c.adler=H(c.adler,e,k,h)),c.next_in+=k,c.total_in+=k,k)), b.lookahead+=d,b.lookahead+b.insert>=E){f=b.strstart-b.insert;b.ins_h=b.window[f];for(b.ins_h=(b.ins_h<=E&&(b.ins_h=(b.ins_h<< b.hash_shift^b.window[b.strstart+E-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=l(b,d)),b.match_length>=E)if(e=K._tr_tally(b,b.strstart-b.match_start,b.match_length-E),b.lookahead-=b.match_length,b.match_length<=b.max_lazy_match&&b.lookahead>=E){b.match_length--;do b.strstart++,b.ins_h=(b.ins_h<=E&&(b.ins_h=(b.ins_h<=b.match_length&&(b.strategy===T||b.match_length===E&&4096= E&&b.match_length<=b.prev_length){f=b.strstart+b.lookahead-E;e=K._tr_tally(b,b.strstart-1-b.prev_match,b.prev_length-E);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?$:Y,b.adler=2===c.wrap?0:1,c.last_flush=A,K._tr_init(c),J):e(b,P)}function t(b){var c=u(b);c===J&&(b=b.state,b.window_size=2*b.w_size,f(b.head),b.max_lazy_match=y[b.level].max_lazy,b.good_match=y[b.level].good_length,b.nice_match=y[b.level].nice_length,b.max_chain_length=y[b.level].max_chain,b.strstart=0,b.block_start= 0,b.lookahead=0,b.insert=0,b.match_length=b.prev_length=E-1,b.match_available=0,b.ins_h=0);return c}function z(b,c,d,f,g,h){if(!b)return P;var k=1;if(c===O&&(c=6),0>f?(k=0,f=-f):15g||g>x||d!==w||8>f||15c||9h||h>V)return e(b,P);8===f&&(f=9);var m=new s;return b.state=m,m.strm=b,m.wrap=k,m.gzhead=null,m.w_bits=f,m.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===D?(h(b,!0),0===b.strm.avail_out?X:S):(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 z(b,c,w,15,8,0)};d.deflateInit2=z;d.deflateReset=t;d.deflateResetKeep=u;d.deflateSetHeader=function(b,c){return b&&b.state?2!==b.state.wrap?P:(b.state.gzhead=c,J):P};d.deflate=function(b,c){var d,l,p,G;if(!b||!b.state||5c)return b?e(b,P):P;if(l=b.state,!b.output||!b.input&&0!==b.avail_in|| 666===l.status&&c!==D)return e(b,0===b.avail_out?-5:P);if(l.strm=b,d=l.last_flush,l.last_flush=c,l.status===$)2===l.wrap?(b.adler=0,k(l,31),k(l,139),k(l,8),l.gzhead?(k(l,(l.gzhead.text?1:0)+(l.gzhead.hcrc?2:0)+(l.gzhead.extra?4:0)+(l.gzhead.name?8:0)+(l.gzhead.comment?16:0)),k(l,255&l.gzhead.time),k(l,l.gzhead.time>>8&255),k(l,l.gzhead.time>>16&255),k(l,l.gzhead.time>>24&255),k(l,9===l.level?2:2<=l.strategy||2>l.level?4:0),k(l,255&l.gzhead.os),l.gzhead.extra&&l.gzhead.extra.length&&(k(l,255&l.gzhead.extra.length), k(l,l.gzhead.extra.length>>8&255)),l.gzhead.hcrc&&(b.adler=H(b.adler,l.pending_buf,l.pending,0)),l.gzindex=0,l.status=69):(k(l,0),k(l,0),k(l,0),k(l,0),k(l,0),k(l,9===l.level?2:2<=l.strategy||2>l.level?4:0),k(l,3),l.status=Y)):(p=w+(l.w_bits-8<<4)<<8,G=-1,G=2<=l.strategy||2>l.level?0:6>l.level?1:6===l.level?2:3,p|=G<<6,0!==l.strstart&&(p|=32),l.status=Y,m(l,p+(31-p%31)),0!==l.strstart&&(m(l,b.adler>>>16),m(l,65535&b.adler)),b.adler=1);if(69===l.status)if(l.gzhead.extra){for(p=l.pending;l.gzindex<(65535& l.gzhead.extra.length)&&(l.pending!==l.pending_buf_size||(l.gzhead.hcrc&&l.pending>p&&(b.adler=H(b.adler,l.pending_buf,l.pending-p,p)),g(b),p=l.pending,l.pending!==l.pending_buf_size));)k(l,255&l.gzhead.extra[l.gzindex]),l.gzindex++;l.gzhead.hcrc&&l.pending>p&&(b.adler=H(b.adler,l.pending_buf,l.pending-p,p));l.gzindex===l.gzhead.extra.length&&(l.gzindex=0,l.status=73)}else l.status=73;if(73===l.status)if(l.gzhead.name){p=l.pending;do{if(l.pending===l.pending_buf_size&&(l.gzhead.hcrc&&l.pending>p&& (b.adler=H(b.adler,l.pending_buf,l.pending-p,p)),g(b),p=l.pending,l.pending===l.pending_buf_size)){G=1;break}G=l.gzindexp&&(b.adler=H(b.adler,l.pending_buf,l.pending-p,p));0===G&&(l.gzindex=0,l.status=91)}else l.status=91;if(91===l.status)if(l.gzhead.comment){p=l.pending;do{if(l.pending===l.pending_buf_size&&(l.gzhead.hcrc&&l.pending>p&&(b.adler=H(b.adler,l.pending_buf,l.pending-p,p)),g(b), p=l.pending,l.pending===l.pending_buf_size)){G=1;break}G=l.gzindexp&&(b.adler=H(b.adler,l.pending_buf,l.pending-p,p));0===G&&(l.status=103)}else l.status=103;if(103===l.status&&(l.gzhead.hcrc?(l.pending+2>l.pending_buf_size&&g(b),l.pending+2<=l.pending_buf_size&&(k(l,255&b.adler),k(l,b.adler>>8&255),b.adler=0,l.status=Y)):l.status=Y),0!==l.pending){if(g(b),0===b.avail_out)return l.last_flush= -1,J}else if(0===b.avail_in&&(c<<1)-(4=E&&0l.lookahead&&(l.match_length=l.lookahead)}if(l.match_length>= E?(q=K._tr_tally(l,1,l.match_length-E),l.lookahead-=l.match_length,l.strstart+=l.match_length,l.match_length=0):(q=K._tr_tally(l,0,l.window[l.strstart]),l.lookahead--,l.strstart++),q&&(h(l,!1),0===l.strm.avail_out)){q=Q;break a}}q=(l.insert=0,c===D?(h(l,!0),0===l.strm.avail_out?X:S):l.last_lit&&(h(l,!1),0===l.strm.avail_out)?Q:W)}else q=y[l.level].func(l,c);if(q!==X&&q!==S||(l.status=666),q===Q||q===X)return 0===b.avail_out&&(l.last_flush=-1),J;if(q===W&&(1===c?K._tr_align(l):5!==c&&(K._tr_stored_block(l, 0,0,!1),3===c&&(f(l.head),0===l.lookahead&&(l.strstart=0,l.block_start=0,l.insert=0))),g(b),0===b.avail_out))return l.last_flush=-1,J}return c!==D?J:0>=l.wrap?1:(2===l.wrap?(k(l,255&b.adler),k(l,b.adler>>8&255),k(l,b.adler>>16&255),k(l,b.adler>>24&255),k(l,255&b.total_in),k(l,b.total_in>>8&255),k(l,b.total_in>>16&255),k(l,b.total_in>>24&255)):(m(l,b.adler>>>16),m(l,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;l=b.next_in;m=b.input;b.avail_in=e;b.next_in= 0;b.input=c;for(n(d);d.lookahead>=E;){e=d.strstart;g=d.lookahead-(E-1);do d.ins_h=(d.ins_h<z&&(t+=P[h++]<>>24,t>>>=B,z-=B,B=H>>>16&255,0===B)O[m++]=65535&H;else{if(!(16&B)){if(0===(64&B)){H=y[(65535&H)+(t&(1<>>=B,z-=B);15>z&&(t+=P[h++]<>>24,t>>>=B,z-=B,B=H>>>16&255, !(16&B)){if(0===(64&B)){H=v[(65535&H)+(t&(1<p){b.msg="invalid distance too far back";d.mode=30;break a}if(t>>>=B,z-=B,B=m-l,D>B){if(B=D-B,B>q&&d.sane){b.msg="invalid distance too far back";d.mode=30;break a}if(H=0,J=u,0===s){if(H+=r-B,B>3;h-=A;z-=A<<3;b.next_in=h;b.next_out=m;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(K),c.distcode=c.distdyn=new r.Buf32(F),c.sane=1,c.back=-1,z):y}function h(b){var c;return b&&b.state?(c=b.state,c.wsize=0,c.whave=0,c.wnext=0,g(b)):y}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.whavex;){if(0===m)break a;m--;w+=f[h++]<>>8&255;d.check=s(d.check,L,2,0);x=w=0;d.mode=2;break}if(d.flags=0,d.head&&(d.head.done=!1),!(1& d.wrap)||(((255&w)<<8)+(w>>8))%31){b.msg="incorrect header check";d.mode=30;break}if(8!==(15&w)){b.msg="unknown compression method";d.mode=30;break}if(w>>>=4,x-=4,Q=(15&w)+8,0===d.wbits)d.wbits=Q;else if(Q>d.wbits){b.msg="invalid window size";d.mode=30;break}d.dmax=1<x;){if(0===m)break a;m--;w+=f[h++]<>8&1);512&d.flags&&(L[0]=255&w,L[1]=w>>>8&255,d.check=s(d.check,L,2,0));x=w=0;d.mode=3;case 3:for(;32>x;){if(0===m)break a;m--;w+=f[h++]<>>8&255,L[2]=w>>>16&255,L[3]=w>>>24&255,d.check=s(d.check,L,4,0));x=w=0;d.mode=4;case 4:for(;16>x;){if(0===m)break a;m--;w+=f[h++]<>8);512&d.flags&&(L[0]=255&w,L[1]=w>>>8&255,d.check=s(d.check,L,2,0));x=w=0;d.mode= 5;case 5:if(1024&d.flags){for(;16>x;){if(0===m)break a;m--;w+=f[h++]<>>8&255,d.check=s(d.check,L,2,0));x=w=0}else d.head&&(d.head.extra=null);d.mode=6;case 6:if(1024&d.flags&&(I=d.length,I>m&&(I=m),I&&(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,I,Q)),512&d.flags&&(d.check=s(d.check,f,I,h)),m-=I,h+=I,d.length-=I),d.length))break a;d.length=0;d.mode= 7;case 7:if(2048&d.flags){if(0===m)break a;I=0;do Q=f[h+I++],d.head&&Q&&65536>d.length&&(d.head.name+=String.fromCharCode(Q));while(Q&&Id.length&&(d.head.comment+=String.fromCharCode(Q));while(Q&&Ix;){if(0===m)break a;m--;w+=f[h++]<>9&1,d.head.done=!0);b.adler=d.check=0;d.mode=12;break;case 10:for(;32>x;){if(0===m)break a;m--;w+=f[h++]<>>= 7&x;x-=7&x;d.mode=27;break}for(;3>x;){if(0===m)break a;m--;w+=f[h++]<>>=1,x-=1,3&w){case 0:d.mode=14;break;case 1:C=d;if(H){M=void 0;n=new r.Buf32(512);p=new r.Buf32(32);for(M=0;144>M;)C.lens[M++]=8;for(;256>M;)C.lens[M++]=9;for(;280>M;)C.lens[M++]=7;for(;288>M;)C.lens[M++]=8;t(1,C.lens,0,288,n,0,C.work,{bits:9});for(M=0;32>M;)C.lens[M++]=5;t(2,C.lens,0,32,p,0,C.work,{bits:5});H=!1}C.lencode=n;C.lenbits=9;C.distcode=p;C.distbits=5;if(d.mode=20,6===c){w>>>=2;x-=2;break a}break; case 2:d.mode=17;break;case 3:b.msg="invalid block type",d.mode=30}w>>>=2;x-=2;break;case 14:w>>>=7&x;for(x-=7&x;32>x;){if(0===m)break a;m--;w+=f[h++]<>>16^65535)){b.msg="invalid stored block lengths";d.mode=30;break}if(d.length=65535&w,w=0,x=0,d.mode=15,6===c)break a;case 15:d.mode=16;case 16:if(I=d.length){if(I>m&&(I=m),I>F&&(I=F),0===I)break a;r.arraySet(g,f,h,I,k);m-=I;h+=I;F-=I;k+=I;d.length-=I;break}d.mode=12;break;case 17:for(;14>x;){if(0===m)break a;m--;w+=f[h++]<< x;x+=8}if(d.nlen=(31&w)+257,w>>>=5,x-=5,d.ndist=(31&w)+1,w>>>=5,x-=5,d.ncode=(15&w)+4,w>>>=4,x-=4,286x;){if(0===m)break a;m--;w+=f[h++]<>>=3;x-=3}for(;19>d.have;)d.lens[fa[d.have++]]=0;if(d.lencode=d.lendyn,d.lenbits=7,X={bits:d.lenbits},W=t(0,d.lens,0,19,d.lencode,0,d.work,X),d.lenbits=X.bits,W){b.msg="invalid code lengths set"; d.mode=30;break}d.have=0;d.mode=19;case 19:for(;d.have>>24,M=65535&S,!(E<=x);){if(0===m)break a;m--;w+=f[h++]<M)w>>>=E,x-=E,d.lens[d.have++]=M;else{if(16===M){for(C=E+2;x>>=E,x-=E,0===d.have){b.msg="invalid bit length repeat";d.mode=30;break}Q=d.lens[d.have-1];I=3+(3&w);w>>>=2;x-=2}else if(17===M){for(C=E+3;x>>=E;x-=E;Q=0;I=3+(7&w); w>>>=3;x-=3}else{for(C=E+7;x>>=E;x-=E;Q=0;I=11+(127&w);w>>>=7;x-=7}if(d.have+I>d.nlen+d.ndist){b.msg="invalid bit length repeat";d.mode=30;break}for(;I--;)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,X={bits:d.lenbits},W=t(1,d.lens,0,d.nlen,d.lencode,0,d.work,X),d.lenbits=X.bits,W){b.msg="invalid literal/lengths set";d.mode=30;break}if(d.distbits=6,d.distcode=d.distdyn, X={bits:d.distbits},W=t(2,d.lens,d.nlen,d.ndist,d.distcode,0,d.work,X),d.distbits=X.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<=m&&258<=F){b.next_out=k;b.avail_out=F;b.next_in=h;b.avail_in=m;d.hold=w;d.bits=x;u(b,N);k=b.next_out;g=b.output;F=b.avail_out;h=b.next_in;f=b.input;m=b.avail_in;w=d.hold;x=d.bits;12===d.mode&&(d.back=-1);break}for(d.back=0;S=d.lencode[w&(1<>>24,C=S>>>16&255,M=65535&S,!(E<=x);){if(0=== m)break a;m--;w+=f[h++]<>R)],E=S>>>24,C=S>>>16&255,M=65535&S,!(R+E<=x);){if(0===m)break a;m--;w+=f[h++]<>>=R;x-=R;d.back+=R}if(w>>>=E,x-=E,d.back+=E,d.length=M,0===C){d.mode=26;break}if(32&C){d.back=-1;d.mode=12;break}if(64&C){b.msg="invalid literal/length code";d.mode=30;break}d.extra=15&C;d.mode=22;case 22:if(d.extra){for(C=d.extra;x>>=d.extra; x-=d.extra;d.back+=d.extra}d.was=d.length;d.mode=23;case 23:for(;S=d.distcode[w&(1<>>24,C=S>>>16&255,M=65535&S,!(E<=x);){if(0===m)break a;m--;w+=f[h++]<>R)],E=S>>>24,C=S>>>16&255,M=65535&S,!(R+E<=x);){if(0===m)break a;m--;w+=f[h++]<>>=R;x-=R;d.back+=R}if(w>>>=E,x-=E,d.back+=E,64&C){b.msg="invalid distance code";d.mode=30;break}d.offset=M;d.extra=15&C;d.mode=24;case 24:if(d.extra){for(C=d.extra;x>>=d.extra;x-=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===F)break a;if(I=N-F,d.offset>I){if(I=d.offset-I,I>d.whave&&d.sane){b.msg="invalid distance too far back";d.mode=30;break}I>d.wnext?(I-=d.wnext,G=d.wsize-I):G=d.wnext-I;I>d.length&&(I=d.length);C=d.window}else C=g,G=k-d.offset,I=d.length;I>F&&(I=F);F-=I;d.length-=I;do g[k++]=C[G++];while(--I);0===d.length&& (d.mode=21);break;case 26:if(0===F)break a;g[k++]=d.length;F--;d.mode=21;break;case 27:if(d.wrap){for(;32>x;){if(0===m)break a;m--;w|=f[h++]<x;){if(0===m)break a;m--;w+=f[h++]<d.mode&&(27>d.mode||4!==c))&&l(b,b.output,b.next_out,N-b.avail_out)?(d.mode=31,-4):(K-=b.avail_in,N-=b.avail_out,b.total_in+=K,b.total_out+=N,d.total+=N,d.wrap&&N&&(b.adler=d.check=d.flags?s(d.check,g,N,b.next_out-N):q(d.check,g,N,b.next_out-N)),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===N||4===c)&&W===z&&(W=-5),W)};d.inflateEnd=function(b){if(!b||!b.state)return y;var c=b.state;return c.window&&(c.window=null),b.state=null,z};d.inflateGetHeader=function(b,c){var d;return b&&b.state?(d=b.state,0===(2&d.wrap)?y:(d.head=c,c.done=!1,z)):y};d.inflateSetDictionary=function(b,c){var d,e,f=c.length;return b&&b.state?(d=b.state,0!==d.wrap&&11!==d.mode?y:11===d.mode&&(e=1,e=q(e,c,f,0),e!==d.check)?-3:l(b,c,f,f)?(d.mode=31,-4):(d.havedict=1,z)):y};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,u){var t,z,y,v,K,F,H,B;v=u.bits;for(var A=0,D=0,J=0,P=0,O=0,T=0,V=0,aa=t=0,w=0,x=null,ba=0,N=new e.Buf16(16),T=new e.Buf16(16),I=null,G=0,A=0;15>=A;A++)N[A]=0;for(D=0;DP&&(O=P),0===P)return r[q++]=20971520,r[q++]=20971520,u.bits=1,0;for(J=1;J=A;A++)if(t<<=1,t-=N[A],0>t)return-1;if(0A;A++)T[A+1]=T[A]+N[A];for(D=0;DK?(H=I[G+s[D]],B=x[ba+s[D]]):(H=96,B=0);t=1<>V)+z]=F<<24|H<<16|B|0;while(0!==z);for(t=1<>=1;if(0!==t?(w&=t-1,w+=t):w=0,D++,0===--N[A]){if(A===P)break;A=c[d+ s[D]]}if(A>O&&(w&p)!==y){0===V&&(V=O);v+=J;T=A-V;for(t=1<=t));)T++,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]=l(f[e]++,e))}function p(b){var c;for(c=0;ce?$[e]:$[256+(e>>>7)],m(b,g,d),h=G[g],0!==h&&(e-=W[g],k(b,e,h)));while(lb.heap_len;)f=b.heap[++b.heap_len]=2>m?++m:0,g[2*f]=1,b.depth[f]=0,b.opt_len--,h&&(b.static_len-=e[2*f+1]);c.max_code=m;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 l,p,h=c.dyn_tree,k=c.max_code,G=c.stat_desc.static_tree,q=c.stat_desc.has_stree,r=c.stat_desc.extra_bits,C=c.stat_desc.extra_base,E=c.stat_desc.max_length,t=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;dE&&(e=E,t++),h[2*f+1]=e,f>k||(b.bl_count[e]++,l=0,f>=C&&(l=r[f-C]),p=h[2*f],b.opt_len+=p*(e+l),q&&(b.static_len+=p*(G[2*f+1]+l)));if(0!==t){do{for(e=E-1;0===b.bl_count[e];)e--;b.bl_count[e]--;b.bl_count[e+1]+=2;b.bl_count[E]--;t-=2}while(0k||(h[2*l+1]!==e&&(b.opt_len+=(e-h[2*l+1])*h[2*l],h[2*l+1]=e),f--)}n(g,m,b.bl_count)}function z(b,c,d){var e,f,g=-1,h=c[1],k=0,m=7,l=4;0===h&& (m=138,l=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*ba]++:b.bl_tree[2*N]++,k=0,g=f,0===h?(m=138,l=3):f===h?(m=6,l=3):(m=7,l=4))}function y(b,c,d){var e,f,g=-1,h=c[1],l=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],!(++l=l?(m(b,ba,b.bl_tree), k(b,l-3,3)):(m(b,N,b.bl_tree),k(b,l-11,7));l=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 H;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;)M[2*c+1]=8,c++,h[8]++;for(;255>=c;)M[2*c+1]=9,c++,h[9]++;for(;279>=c;)M[2*c+1]=7,c++,h[7]++;for(;287>=c;)M[2*c+1]=8,c++,h[8]++;n(M,J+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)K(b,c,d,e);else if(4===b.strategy||g=== f)k(b,2+(e?1:0),3),u(b,M,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*(Y[d]+ D+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);m(b,w,M);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,u,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;u=[];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"ISO-8859-1" type\x3d"text/css"/\x3e');else{var d=c.createElement("link");d.setAttribute("rel", a);d.setAttribute("href",b);d.setAttribute("charset","ISO-8859-1");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){for(var b= !1,c=[],d=0;a[d];d++){var e=a[d];if(3===e.nodeType||4===e.nodeType){if(11==document.documentMode&&d==a.length-1&&0==e.nodeValue.length)break;c.push(e.nodeValue+(null==e.nextSibling||3!=e.nextSibling.nodeType?"\n":""));b=!0}else 8!==e.nodeType&&((mxClient.IS_IE||mxClient.IS_IE11)&&"P"==e.nodeName&&0==e.innerHTML.length||!b&&"BR"==e.nodeName||"DIV"==e.nodeName&&"\x3cbr\x3e"==e.innerHTML?c.push("\n"):c.push(mxUtils.extractTextWithWhitespace(e.childNodes)),b=!1)}return c.join("")},replaceTrailingNewlines:function(a, b){for(var c="";0h&&(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;m=8/3*Math.sin(e/4)*Math.sin(e/4)/Math.sin(e/2);l=n*c;n*=d;c*=p;d*=p;for(var t=Math.cos(f),z=Math.sin(f),r=-m*(l*z+d*t),q=-m*(c*z-n*t),u=s=0,p=[],y=0;yc&&(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,m=b.y,e=e+k,f=f+m,c=c+ g,d=d+h;return(eg)&&(fh)&&(ck)&&(dm)},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,m=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 l=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= l,f.canvas.removeChild(f.drawPane),f.canvas.removeChild(f.overlayPane),f.drawPane=k,f.overlayPane=m,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)&&m.setAttribute("opacity",k.alpha*k.fillAlpha);e=this.state.transform||"";if(g||h){var l=f=1,n=0,p=0;g&&(f=-1,n=-c-2*a);h&&(l=-1,p=-d-2*b);e+="scale("+f+","+l+")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,m,l){if(null!=l&&null!=l.firstChild&&null!=l.firstChild.firstChild&&null!=l.firstChild.firstChild.firstChild){l=l.firstChild;var n=l.firstChild,p=n.firstChild;m=null!=m?m: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 u=this.createElement("foreignObject");u.setAttribute("style","overflow:visible;");u.setAttribute("pointer-events","all");q=this.createDiv(e,f,g,q,m);if(null!=q){null!=p&&q.setAttribute("dir",p);s.appendChild(u);this.root.appendChild(s);var t=0,z=0;p=t=2;if(mxClient.IS_IE&&(9==document.documentMode||!mxClient.IS_SVG)){var y= document.createElement("div");y.style.cssText=q.getAttribute("style");y.style.display=mxClient.IS_QUIRKS?"inline":"inline-block";y.style.position="absolute";y.style.visibility="hidden";z=document.createElement("div");z.style.display=mxClient.IS_QUIRKS?"inline":"inline-block";z.style.wordWrap=mxConstants.WORD_WRAP;z.innerHTML=mxUtils.isNode(e)?e.outerHTML:e;y.appendChild(z);document.body.appendChild(y);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"!=m&&(mxClient.IS_FF&&mxClient.IS_WIN)&&(p-=2);b+=p;y=1!=r.scale?"scale("+r.scale+")":"";0!=r.rotation&&this.rotateHtml?(y+="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&&(y+="rotate("+n+","+-q+","+-p+")");s.setAttribute("transform","translate("+(Math.round(a)+this.foOffset)+","+(Math.round(b)+this.foOffset)+ ")"+y);u.setAttribute("width",Math.round(Math.max(1,c)));u.setAttribute("height",Math.round(Math.max(1,d)));this.root.ownerDocument!=document&&(a=this.createAlternateContent(u,a,b,c,d,e,f,g,h,k,m,l,n),null!=a&&(u.setAttribute("requiredFeatures","http://www.w3.org/TR/SVG11/feature#Extensibility"),c=this.createElement("switch"),c.appendChild(u),c.appendChild(a),s.appendChild(c)))}}else this.plainText(a,b,c,d,e,f,g,h,m,l,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,m,l,n){l=null!=l?l:0;h=this.state;var p=h.fontSize,r=this.createElement("g"),q=h.transform||"";this.updateFont(r);0!=l&&(q+="rotate("+l+","+this.format(a*h.scale)+","+this.format(b*h.scale)+")");null!=n&&r.setAttribute("direction",n);m&&(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;l=b+p-1;g==mxConstants.ALIGN_MIDDLE?"fill"==k?l-=d/2:(m=(this.matchHtmlAlignment&&m&&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,m,l,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"!=m&&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),u=s.x,s=s.y;e=this.createDiv(e,f,g,m);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 z=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;l?(c=Math.min(c,t), q=Math.min(q,d)):c=t;h&&(e.style.width=c+"px");if(mxClient.IS_QUIRKS&&(l||"width"==m)&&q>d)q=d,e.style.height=q+"px";d=q;l=(d-d*g+c*-z)/2-p*c*(u+0.5)+n*d*(s+0.5);h=(c-c*g+d*-z)/2+n*c*(u+0.5)+p*d*(s+0.5);"group"==k.nodeName&&"DIV"==this.root.nodeName?(m=this.createElement("div"),m.style.display="inline-block",m.style.position="absolute",m.style.left=this.format(a+(h-c/2)*r.scale)+"px",m.style.top=this.format(b+(l-d/2)*r.scale)+"px",k.parentNode.appendChild(m),m.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+(l-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&&(l&&q>d)&&(q=d,e.style.height=q+"px"),d=q,e.style.visibility="",r.appendChild(e),k.style.left=this.format(a+c*u*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* u+"%",q.style.top=100*s+"%")}else this.plainText(a,b,c,d,mxUtils.htmlEntities(e,!1),f,g,h,k,m,l,n,p)}}; mxVmlCanvas2D.prototype.plainText=function(a,b,c,d,e,f,g,h,k,m,l,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.valign=this.align="";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.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&&0m&&(m+=2*Math.PI);m%=Math.PI;m>Math.PI/2&&(m=Math.PI-m);var h=Math.cos(m),l=Math.sin(-m),b=k*-(b+0.5),n=g*-(c+0.5),p=(g-g*h+k*l)/2+f*b-e*n;0!=m&&(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,m=0,l=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 u=this.graph.getCellStyle(r),s=mxUtils.getNumber(u,mxConstants.STYLE_STROKEWIDTH,1);null!=h?c?q.x=m+this.spacing+Math.floor(s/2):q.y=m+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);l=r;h=q;m=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!=l)&&(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(l,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),m=0;mmxUtils.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=m.length){for(var k=new mxGraphHierarchyEdge(m),l=0;lmxUtils.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;fl&&(l=k);h[l]=m}for(var n=l=m=null,p=null,r=null,q=null,s=null,u=null,t=null,z=null,k=0;ks[F]&&v++,r[y]u[F]&&v++,q[y]a.medianValue?-1:b.medianValueu+1&&(m==d[k].length-1?(e.setGeneralPurposeVariable(k,t),n=!0):(m=d[k][m+1],u=m.getGeneralPurposeVariable(k),u=u-m.width/2-this.intraCellSpacing-e.width/2,u>t?(e.setGeneralPurposeVariable(k, t),n=!0):u>e.getGeneralPurposeVariable(k)+1&&(e.setGeneralPurposeVariable(k,u),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(m=0;me.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?(l[k-e.minRank-2]=n,g++):this.repositionValid(b,e,k-1,n)?(l[k-e.minRank-2]=n,g++):(l[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,l[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&&(l+=this.prefHozEdgeSep,n-=this.prefHozEdgeSep);k=(n-l)/f;l+=k/2;n=this.minEdgeJetty-this.prefVertEdgeOff;for(m=p=0;mf/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(l,b,m[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(a):!1};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,m=Math.atan2(a.height,a.width);f<-h+m||f>h-m?(g.x=a.x,g.y=e-a.width* Math.tan(f)/2):f<-m?(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,m=f+h;b=c.x;c=c.y;var l=parseInt(b-k),n=parseInt(c-m);if(0==l&&0!=n)return new mxPoint(k, m+h*n/Math.abs(n));if(0==l&&0==n)return new mxPoint(b,c);if(d){if(c>=f&&c<=f+a.height)return a=c-m,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,m+a)}e=n/l;m-=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+m;m=e*h+m;e=Math.sqrt(Math.pow(g-b,2)+Math.pow(k-c,2));b=Math.sqrt(Math.pow(h-b,2)+Math.pow(m-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 m=g,l=h;d&&(k>=b&&k<=b+f?m=k:c>=e&&c<=e+a&&(l=c));return k-s&&rMath.PI-s,s=null;q?s=d&&(e&&c.x>=l.x&&c.x<=p.x||!e&&c.y>=l.y&&c.y<=p.y)?e?new mxPoint(c.x,l.y):new mxPoint(l.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,m),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?m:b==mxConstants.DIRECTION_NORTH?g+a:g),k=d.x,m=d.y),s=e&&c.x<=f+h/2||!e&&c.y<=g+a/2?mxUtils.intersection(c.x,c.y,k,m,l.x,l.y,n.x,n.y):mxUtils.intersection(c.x,c.y,k,m,n.x,n.y,p.x,p.y));null==s&&(s=new mxPoint(k,m));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 m=c.x,l=c.y,n= -Math.atan2(l-a,m-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(mf+h||m>e+g&&le+g&&l>f+h)d=!1;if(d){if(s){if(m==k){if(l<=f)return new mxPoint(k,f);if(l>=f+h)return new mxPoint(k,f+h)}else if(me+g){if(l==f+h/4)return new mxPoint(e+g,f+h/4);if(l==f+3*h/4)return new mxPoint(e+g,f+3*h/4)}else if(m==e){if(la)return new mxPoint(e,f+3*h/4)}else if(m==e+g){if(la)return new mxPoint(e+g,f+3*h/4)}if(l==f)return new mxPoint(k,f);if(l==f+h)return new mxPoint(k,f+h);mf+h/4&&lf+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))):m>k&&(l>f+h/4&&lf+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(l==a){if(m<=e)return new mxPoint(e,f+h/2);if(m>=e+g)return new mxPoint(e+g,f+h/ 2)}else if(lf+h){if(m==e+g/4)return new mxPoint(e+g/4,f+h);if(m==e+3*g/4)return new mxPoint(e+3*g/4,f+h)}else if(l==f){if(mk)return new mxPoint(e+3*g/4,f)}else if(l==f+h){if(ma)return new mxPoint(e+3*g/4,f+h)}if(m==e)return new mxPoint(e,a);if(m==e+g)return new mxPoint(e+g,a);le+g/4&&me+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)):l>a&&(m>e+g/4&&me+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;m>=e&&m<=e+g?(d=m,n=l=f&&l<=f+h&&(n=l,d=m-m?(b=new mxPoint(e+g,f), q=new mxPoint(e+g,f+h)):n>m&&nr&&np-m&&n<=p||n<-p+m&&n>=-p?(b=new mxPoint(e,f),q=new mxPoint(e,f+h)):n<-m&&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+m&&(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{m=Math.atan2(h/2,g/4);if(n==m)return new mxPoint(e+Math.floor(0.75*g),f);if(n==p-m)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==-m)return new mxPoint(e+Math.floor(0.75*g),f+h);if(n==-p+m)return new mxPoint(e+Math.floor(0.25*g),f+h);0m&&np-m&&nn&&n>-m?(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<-m&&n>-p+m?(b=new mxPoint(e,f+h),q=new mxPoint(e+g,f+h)):n<-p+m&&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){null==this.textarea&&this.init();null!=this.graph.tooltipHandler&&this.graph.tooltipHandler.hideTooltip();this.stopEditing(!0);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,m=(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=m?"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,m=Math.max(Math.abs(k-c.y),m)):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*m:b.x+b.width+2*m:null!=c&&(d=f.getRoutingCenterX(b),h=Math.max(Math.abs(d-c.x),m),k=c.y,m=0);e.push(new mxPoint(d-h,k-m));e.push(new mxPoint(d+h,k+m))}},ElbowConnector:function(a,b,c,d,e){var f=null!=d&&0l,h=f.xm;else k=Math.max(b.x,c.x),m=Math.min(b.x+b.width,c.x+c.width),g=k==m,g||(h=Math.max(b.y,c.y),l=Math.min(b.y+b.height,c.y+c.height),h=h==l);!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 y=null!=u&&u.x==t.x,v=null!=u&&u.y==t.y,K=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==u&&K,z=y||null==u&&s;if(!(0==r&&(t&&z||y&&v))){if(null!=u&&!v&&!y&&(K||s)){m=K?!1:!0;break}if(z||t){m=t;1==r&&(m=0==d.length%2?t:z);break}}s=c;u=g[p];null!=u&&(u.x=Math.round(u.x),u.y=Math.round(u.y),s=null);t=d[d.length-1];y&&v&&(d=d.slice(1))}m&&(null!=g[0]&&g[0].y!=l.y||null==g[0]&&null!=b&&(l.yb.y+b.height))?f(new mxPoint(n.x,l.y)):!m&&(null!=g[0]&&g[0].x!=l.x||null==g[0]&&null!=b&&(l.xb.x+b.width))&&f(new mxPoint(l.x, n.y));m?n.y=l.y:n.x=l.x;for(r=0;rc.y+c.height))?f(new mxPoint(n.x,l.y)):!m&&(null!=g[p]&&g[p].x!=l.x||null==g[p]&&null!=c&&(l.xc.x+c.width))&&f(new mxPoint(l.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]=l[v][0]-z[v],mxEdgeStyle.limits[v][2]=l[v][1]-z[v],mxEdgeStyle.limits[v][4]=l[v][0]+l[v][2]+z[v],mxEdgeStyle.limits[v][8]=l[v][1]+l[v][3]+z[v];z=l[0][1]+l[0][3]/2;n=l[1][1]+l[1][3]/2;v=l[0][0]+l[0][2]/2-(l[1][0]+l[1][2]/2);K=z-n;z=0;0>v?z=0>K?2:1:0>=K&&(z=3,0==v&&(z=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-l[v][0])/l[v][2],1>=Math.abs(n.x-l[v][0])?a[v]=mxConstants.DIRECTION_MASK_WEST:1>=Math.abs(n.x-l[v][0]-l[v][2])&&(a[v]= mxConstants.DIRECTION_MASK_EAST),b[v][1]=(n.y-l[v][1])/l[v][3],1>=Math.abs(n.y-l[v][1])?a[v]=mxConstants.DIRECTION_MASK_NORTH:1>=Math.abs(n.y-l[v][1]-l[v][3])&&(a[v]=mxConstants.DIRECTION_MASK_SOUTH)),n=null,null!=c&&(n=m);v=l[0][1]-(l[1][1]+l[1][3]);m=l[0][0]-(l[1][0]+l[1][2]);n=l[1][1]-(l[0][1]+l[0][3]);p=l[1][0]-(l[0][0]+l[0][2]);mxEdgeStyle.vertexSeperations[1]=Math.max(m-y,0);mxEdgeStyle.vertexSeperations[2]=Math.max(v-y,0);mxEdgeStyle.vertexSeperations[4]=Math.max(n-y,0);mxEdgeStyle.vertexSeperations[3]= Math.max(p-y,0);y=[];c=[];k=[];c[0]=m>=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]);m=m>=p?m: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]),y[v]=p[v][0]&d[v],y[v]|=(p[v][1]&d[v])<<8,y[v]|=(p[1-v][v]&d[v])<<16,y[v]|=(p[1-v][1-v]&d[v])<<24,0==(y[v]&15)&&(y[v]<<=8),0==(y[v]&3840)&&(y[v]= y[v]&15|y[v]>>8),0==(y[v]&983040)&&(y[v]=y[v]&65535|(y[v]&251658240)>>8),a[v]=y[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];y=a[1]==mxConstants.DIRECTION_MASK_EAST?3:a[1];d-=z;y-=z;1>d&&(d+=4);1>y&&(y+=4);d=mxEdgeStyle.routePatterns[d-1][y-1];mxEdgeStyle.wayPoints1[0][0]=l[0][0];mxEdgeStyle.wayPoints1[0][1]=l[0][1];switch(a[0]){case mxConstants.DIRECTION_MASK_WEST:mxEdgeStyle.wayPoints1[0][0]-= f;mxEdgeStyle.wayPoints1[0][1]+=b[0][1]*l[0][3];break;case mxConstants.DIRECTION_MASK_SOUTH:mxEdgeStyle.wayPoints1[0][0]+=b[0][0]*l[0][2];mxEdgeStyle.wayPoints1[0][1]+=l[0][3]+f;break;case mxConstants.DIRECTION_MASK_EAST:mxEdgeStyle.wayPoints1[0][0]+=l[0][2]+f;mxEdgeStyle.wayPoints1[0][1]+=b[0][1]*l[0][3];break;case mxConstants.DIRECTION_MASK_NORTH:mxEdgeStyle.wayPoints1[0][0]+=b[0][0]*l[0][2],mxEdgeStyle.wayPoints1[0][1]-=f}f=0;c=y=0<(a[0]&(mxConstants.DIRECTION_MASK_EAST|mxConstants.DIRECTION_MASK_WEST))? 0:1;for(v=k=0;v>5,n<<=z,15>=4),p=0<(d[v]&mxEdgeStyle.CENTER_MASK),(r||s)&&9>n?(q=0,r=r?0:1,q=p&&0==k?l[r][0]+b[r][0]*l[r][2]:p?l[r][1]+b[r][1]* l[r][3]:mxEdgeStyle.limits[r][n],0==k?(n=(q-mxEdgeStyle.wayPoints1[f][0])*m[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+m*m));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,m=(g-1)*f.height;null==this.horizontalPageBreaks&&0this.model.getChildCount(b)&&c--;this.model.add(b,a[h],c+h);this.autoSizeCellsOnAdd&&this.autoSizeCell(a[h],!0);this.isExtendParentsOnAdd(a[h])&&this.isExtendParent(a[h])&&this.extendParent(a[h]);(null==g||g)&&this.constrainChild(a[h]);null!=d&&this.cellConnected(a[h],d,!0);null!=e&&this.cellConnected(a[h],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&&(l=0),b>g&&(n=0),this.view.setTranslate(Math.floor(l/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*m+l*c/m):k.x,b?Math.floor(k.y-h.y*m+n*d/m):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||m.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=l,g=m)}}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);b.consume();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&&b.consume();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);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 null!=a&&!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 K=this.graphHandler.shouldRemoveCellsFromParent;this.graphHandler.shouldRemoveCellsFromParent=function(a,b,c){return this.graph.isCellSelected(a)?!1:K.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 F=null;this.addListener(mxEvent.FIRE_MOUSE_EVENT,mxUtils.bind(this,function(a,b){if("mouseDown"==b.getProperty("eventName")){var c=b.getProperty("event").getState();F=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!=F?this.addSelectionCells(F):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?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,m=this.getCellGeometry(a);null!=m&&m.relative;)h= this.getModel().getParent(h),m=this.getCellGeometry(h);var l=this.view.getState(h),n=null!=l?l.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];m=this.getCellGeometry(k);m.x=f.x-m.width/2;m.y=f.y-m.height/2}m=null;null!=this.layoutManager&&(m=this.layoutManager.getLayout(this.model.getParent(a)));var r=mxEvent.isControlDown(d)&&e||null==c&&null!=m&&m.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!=m&&null!=a.parent&&m.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.convertValueToString=function(a){if(null!=a.value&&"object"==typeof a.value){if(this.isReplacePlaceholders(a)&&null!=a.getAttribute("placeholder")){for(var b=a.getAttribute("placeholder"),c=a,d=null;null==d&&null!=c;)null!=c.value&&"object"==typeof c.value&&(d=c.hasAttribute(b)?null!=c.getAttribute(b)?c.getAttribute(b):"":null),c=this.model.getParent(c);return d||""}return a.value.getAttribute("label")}return mxGraph.prototype.convertValueToString.apply(this,arguments)}; Graph.prototype.getLinkForCell=function(a){return null!=a.value&&"object"==typeof a.value?(a=a.value.getAttribute("link"),null!=a&&"javascript:"===a.toLowerCase().substring(0,11)&&(a=a.substring(11)),a):null}; Graph.prototype.getCellStyle=function(a){var b=mxGraph.prototype.getCellStyle.apply(this,arguments);if(null!=a&&null!=this.layoutManager){var c=this.model.getParent(a);this.model.isVertex(c)&&this.isCellCollapsed(a)&&(c=this.layoutManager.getLayout(c),null!=c&&c.constructor==mxStackLayout&&(b[mxConstants.STYLE_HORIZONTAL]=!c.horizontal))}return b}; Graph.prototype.updateAlternateBounds=function(a,b,c){if(null!=a&&null!=b&&null!=this.layoutManager&&null!=b.alternateBounds){var d=this.layoutManager.getLayout(this.model.getParent(a));null!=d&&d.constructor==mxStackLayout&&(d.horizontal?b.alternateBounds.height=0:b.alternateBounds.width=0)}mxGraph.prototype.updateAlternateBounds.apply(this,arguments)};Graph.prototype.isMoveCellsEvent=function(a){return mxEvent.isShiftDown(a)}; Graph.prototype.foldCells=function(a,b,c,d,e){b=null!=b?b:!1;null==c&&(c=this.getFoldableCells(this.getSelectionCells(),a));if(null!=c){this.model.beginUpdate();try{if(mxGraph.prototype.foldCells.apply(this,arguments),null!=this.layoutManager)for(var f=0;fthis.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"];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),m=mxUtils.toRadians(Number(c.style[mxConstants.STYLE_ROTATION]||"0")),l=new mxPoint(c.getCenterX(),c.getCenterY());if(0!=m)var n=Math.cos(-m),p=Math.sin(-m),h=mxUtils.getRotatedPoint(h,n,p,l);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==m&&k,n);0!=m&&(n=Math.cos(m),p=Math.sin(m),h=mxUtils.getRotatedPoint(h,n,p,l));if(null!=c){m=this.graph.getAllConnectionConstraints(c);k=l=null;for(n=0;nf||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){var e=d.getSource(),h=this.currentLink;this.clear();if("a"!=e.nodeName.toLowerCase()&&!d.isConsumed()&&(null==d.getState()||!d.isSource(d.getState().control))&&(mxEvent.isLeftMouseButton(d.getEvent())||mxEvent.isTouchEvent(d.getEvent())))null!=h?(g.isBlankLink(h)?window.open(h):(null!=b&&b(d.getEvent()),"#"== h.charAt(0)?window!=window.top?window.open(g.baseUrl+h,"_top"):window.location.hash=h:window!=window.top?window.open(g.getAbsoluteUrl(h),"_top"):window.location=h),d.consume()):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;bk||Math.abs(h)>k)null==this.div&&(this.div=this.createShape()),mxUtils.clearSelection(),this.update(e, f),this.isSpaceEvent(b)?(e=this.x+this.width,f=this.y+this.height,g=this.graph.view.scale,mxEvent.isAltDown(b.getEvent())||(this.width=this.graph.snap(this.width/g)*g,this.height=this.graph.snap(this.height/g)*g,this.x=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 H=mxVertexHandler.prototype.createSizerShape;mxVertexHandler.prototype.createSizerShape=function(a,b,c){this.handleImage=b==mxEvent.ROTATION_HANDLE?u:b==mxEvent.LABEL_HANDLE?this.secondaryHandleImage:this.handleImage;return H.apply(this,arguments)};var B=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 B.apply(this,arguments)};var A=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))):A.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;eH||e>H)&&this.clear()}}else null!=this.currentState&&(f.getState()==this.currentState||null==f.getState())&& b.intersects(this.currentState,f.getGraphX(),f.getGraphY())||(c=b.view.getState(f.getCell()),c!=this.currentState&&(null!=this.currentState&&this.clear(),this.currentState=c,null!=this.currentState&&this.activate(this.currentState)))},mouseUp:function(b,a){var c=this.currentLink;this.clear();null!=c&&("#"==c.charAt(0)?window.location.hash=c:window.open(c))},activate:function(G){this.currentLink=b.getLinkForCell(G.cell);null!=this.currentLink&&(a.style.cursor="pointer",null!=this.highlight&&this.highlight.highlight(G))}, clear:function(){a.style.cursor=N;this.currentLink=this.currentState=null;null!=this.highlight&&this.highlight.hide()}})}var O=Number(e.getAttribute("x0")||0),P=Number(e.getAttribute("y0")||0);b.view.translate.x=-O+u;b.view.translate.y=-P+u;var I=function(a){a=a.getAttribute("backgroundImage");null!=a&&(a=JSON.parse(a),b.setBackgroundImage(new mxImage(a.src,a.width,a.height)),b.view.validateBackgroundImage());"0"!=C&&b.fit(u);"1"==A&&M(b);a=b.container.getElementsByTagName("a");if(null!=a)for(var f= 0;f');