text: /*
   * GoJS v1.4.20 JavaScript Library for HTML Canvas Diagrams
   * Northwoods Software, http://www.nwoods.com/
   * GoJS and Northwoods Software are registered trademarks of Northwoods Software Corporation.
   * Copyright (C) 1998-2015 by Northwoods Software Corporation.  All Rights Reserved.
   * THIS SOFTWARE IS LICENSED.  THE LICENSE AGREEMENT IS AT: http://www.gojs.net/1.4.20/doc/license.html.
   */
  (function(window) { var aa,ca={};if(void 0===document.createElement("canvas").getContext)throw window.console&&window.console.log("The HTML Canvas element is not supported in this browser,or this browser is in Compatibility mode."),Error("The HTML Canvas element is not supported in this browser,or this browser is in Compatibility mode.");if(!Object.prototype.__defineGetter__&&!Object.defineProperty)throw Error("GoJS requires a newer version of JavaScript");
  Object.prototype.__defineGetter__&&!Object.defineProperty&&(Object.defineProperty=function(a,b,c){c.get&&a.__defineGetter__(b,c.get);c.set&&a.__defineSetter__(b,c.set)});Object.prototype.__lookupGetter__&&!Object.getOwnPropertyDescriptor&&(Object.getOwnPropertyDescriptor=function(a,b){return{get:a.__lookupGetter__(b),set:a.__lookupSetter__(b)}});Object.getPrototypeOf||(Object.getPrototypeOf=function(a){return a.__proto__});Object.isFrozen||(Object.isFrozen=function(a){return!0===a.qH});
  Object.freeze||(Object.freeze=function(a){a.qH=!0});Array.isArray||(Array.isArray=function(a){return"[object Array]"===Object.prototype.toString.call(a)});Function.prototype.bind||(Function.prototype.bind=function(a){function b(){return g.apply(a,f.concat(d.call(arguments)))}function c(){}var d=Array.prototype.slice,f=d.call(arguments,1),g=this;c.prototype=this.prototype;b.prototype=new c;return b});
  (function(){for(var a=0,b=["ms","moz","webkit","o"],c=0;c<b.length&&!window.requestAnimationFrame;++c)window.requestAnimationFrame=window[b[c]+"RequestAnimationFrame"],window.cancelAnimationFrame=window[b[c]+"CancelAnimationFrame"]||window[b[c]+"CancelRequestAnimationFrame"];window.requestAnimationFrame||(window.requestAnimationFrame=function(b){var c=(new Date).getTime(),g=Math.max(8,16-(c-a)),h=window.setTimeout(function(){b(c+g)},g);a=c+g;return h});window.cancelAnimationFrame||(window.cancelAnimationFrame=
  function(a){clearTimeout(a)})})();var e={Sz:!1,wK:!1,GF:!1,RE:!1,$H:!1,assert:!1,jK:null,mK:function(){},oK:function(){},nK:function(){},lK:function(){},tK:function(){},pK:function(){},rK:function(){},qK:function(){},kK:!1,QK:!1,NK:!1,OK:!1,CI:!1,sK:function(){}},e=null;ca.Debug=null;
  var t={ji:Object.freeze([]),hA:{},EE:0,Gw:{},gA:0,Zs:"...",jt:{},Mw:0,nB:[],lx:null,kn:document.createElement("canvas").getContext("2d"),Tp:"",hK:document.createElement("img"),aA:[],iB:"ontouchstart"in window,TK:"ongesturestart"in window,nE:!1,Ts:null,Us:null,Ss:null,kw:"",Tm:window.navigator&&0<window.navigator.userAgent.indexOf("534.30")&&0<window.navigator.userAgent.indexOf("Android"),Rw:window.navigator&&0<window.navigator.userAgent.indexOf("MSIE 10.0"),uA:window.navigator&&0<window.navigator.userAgent.indexOf("Trident/7"),
  Um:0<=navigator.platform.toUpperCase().indexOf("MAC"),XI:navigator.platform.match(/(iPhone|iPod|iPad)/i),UG:!1,XG:!1,WG:!1,VG:!1,oE:null,Zp:!1,SG:!1,TG:!1,kE:function(a,b,c){var d;return function(){var f=this,g=arguments;clearTimeout(d);d=setTimeout(function(){d=null;c||a.apply(f,g)},b);c&&!d&&a.apply(f,g)}},m:function(a){e&&e.$H&&alert(a);throw Error(a);},L:function(a,b){if(a.ob){var c="The object is frozen, so its properties cannot be set: "+a.toString();void 0!==b&&(c+="  to value: "+b);t.m(c)}},
  l:function(a,b,c,d){a instanceof b||(c=t.ai(c),void 0!==d&&(c+="."+d),t.bc(a,b,c))},i:function(a,b,c,d){typeof a!==b&&(c=t.ai(c),void 0!==d&&(c+="."+d),t.bc(a,b,c))},q:function(a,b,c){"number"===typeof a&&isFinite(a)||(b=t.ai(b),void 0!==c&&(b+="."+c),t.m(b+" must be a real number type, and not NaN or Infinity: "+a))},Aa:function(a,b,c,d){a instanceof da&&a.Re===b||(c=t.ai(c),void 0!==d&&(c+="."+d),t.bc(a,"a constant of class "+t.xg(b),c))},To:function(a,b){"string"===typeof a?ea(a)||t.m('Color "'+
  a+'" is not a valid color string for '+b):a instanceof fa||t.m("Value for "+b+" must be a color string or a Brush, not "+a)},bc:function(a,b,c,d){b=t.ai(b);c=t.ai(c);void 0!==d&&(c+="."+d);"string"===typeof a?t.m(c+" value is not an instance of "+b+': "'+a+'"'):t.m(c+" value is not an instance of "+b+": "+a)},la:function(a,b,c,d){c=t.ai(c);void 0!==d&&(c+="."+d);t.m(c+" is not in the range "+b+": "+a)},ad:function(a){t.m(t.xg(a)+" constructor cannot take any arguments.")},Pb:function(a){t.m("Collection was modified during iteration: "+
  a.toString()+"\n  Perhaps you should iterate over a copy of the collection,\n  or you could collect items to be removed from the collection after the iteration.")},trace:function(a){window&&window.console&&window.console.log(a)},rb:function(a){return"object"===typeof a&&null!==a},zc:null,Xm:function(a,b,c,d){for(b=0;b<a.length;b++){var f=a[b];t.rb(f)&&(f=t.yf(f,c,d));a[b]=f}return d||t.zc(a)?a:window.ko.observableArray(a)},yf:function(a,b,c){if(a)for(var d in a)"__gohashid"!==d&&(a[d]=t.iJ(a,d,b,
  c));return a},iJ:function(a,b,c,d){var f=a[b],g;g=t.zc(f)?f:Array.isArray(f)?t.Xm(f,b,c,d):window.ko.observable(f);if(d){if(d=g.FB){h=c.__gohashid;d[h]&&(d[h].dispose(),delete d[h]);var h=!1,k;for(k in d){h=!0;break}}!h&&g.ou&&(g.ou.dispose(),delete g.ou)}else{g.ou||(g.ou=g.subscribe(function(a){g.to=a},null,"beforeChange"));d=g.FB;d||(g.FB=d={});var h=c.__gohashid;d[h]||(d[h]=g.subscribe(function(d){c.mx(a,b,g.to,d)}))}return g},isArray:function(a){return Array.isArray(a)||t.zc&&t.zc(a)||a instanceof
  NodeList||a instanceof HTMLCollection},ZI:function(a){return Array.isArray(a)||t.zc&&t.zc(a)},Rs:function(a,b,c){t.isArray(a)||t.bc(a,"Array or NodeList or HTMLCollection",b,c)},vb:function(a){t.zc&&t.zc(a)&&(a=a());return a.length},mb:function(a,b){t.zc&&t.zc(a)&&(a=a());Array.isArray(a);return a[b]},OD:function(a,b,c){t.zc&&t.zc(a)&&(a=a());Array.isArray(a)?a[b]=c:t.m("Cannot replace an object in an HTMLCollection or NodeList at "+b)},Qz:function(a,b){t.zc&&t.zc(a)&&(a=a());if(Array.isArray(a))return a.indexOf(b);
  for(var c=a.length,d=0;d<c;d++)if(a[d]===b)return d;return-1},Ti:function(a,b,c){t.zc&&t.zc(a)&&(a=a());Array.isArray(a)?b>=a.length?a.push(c):a.splice(b,0,c):t.m("Cannot insert an object into an HTMLCollection or NodeList: "+c+" at "+b)},Ui:function(a,b){t.zc&&t.zc(a)&&(a=a());Array.isArray(a)?b>=a.length?a.pop():a.splice(b,1):t.m("Cannot remove an object from an HTMLCollection or NodeList at "+b)},by:[],K:function(){var a=t.by.pop();return void 0===a?new w:a},lc:function(a,b){var c=t.by.pop();if(void 0===
  c)return new w(a,b);c.x=a;c.y=b;return c},B:function(a){t.by.push(a)},BB:[],Al:function(){var a=t.BB.pop();return void 0===a?new ga:a},bk:function(a){t.BB.push(a)},ey:[],Gf:function(){var a=t.ey.pop();return void 0===a?new x:a},hk:function(a,b,c,d){var f=t.ey.pop();if(void 0===f)return new x(a,b,c,d);f.x=a;f.y=b;f.width=c;f.height=d;return f},hc:function(a){t.ey.push(a)},CB:[],ph:function(){var a=t.CB.pop();return void 0===a?new ha:a},We:function(a){t.CB.push(a)},gy:null,u:function(){var a=t.gy;return null!==
  a?(t.gy=null,a):new ia},v:function(a){a.reset();t.gy=a},AB:[],Cb:function(){var a=t.AB.pop();return void 0===a?[]:a},ya:function(a){a.length=0;t.AB.push(a)},DB:1,Ac:function(a){a.__gohashid=t.DB++},it:function(a){var b=a.__gohashid;void 0===b&&(b=t.DB++,a.__gohashid=b);return b},od:function(a){return a.__gohashid},g:function(a,b,c){"name"!==b&&"length"!==b&&(a[b]=c)},ga:function(a,b){b.oy=a;ca[a]=b},Ka:function(a,b){function c(){}c.prototype=b.prototype;a.prototype=new c;a.prototype.constructor=a},
  Yh:function(a){a.uH=!0},defineProperty:function(a,b,c,d,f){t.i(a,"function","Util.defineProperty:classfunc");t.i(b,"object","Util.defineProperty:propobj");t.i(c,"function","Util.defineProperty:getter");t.i(d,"function","Util.defineProperty:setter");for(var g in b){var h=b[g];b={get:c,set:d};if(void 0!==f)for(var k in f)b[k]=f[k];Object.defineProperty(a.prototype,g,b);f=Object.getOwnPropertyDescriptor(a.prototype,g);h&&f&&Object.defineProperty(a.prototype,h,f);if(e&&h){var l=h.charAt(0).toUpperCase()+
  h.slice(1);h===l&&t.m('Defining capitalized property "'+l+'"!?');Object.defineProperty(a.prototype,l,{get:function(){t.Rw||t.uA||t.trace('Getting the property "'+l+'" is probably not what you intended: it is capitalized but should be spelled "'+h+'"')},set:function(){t.m('Setting the property "'+l+'" is probably not what you intended: it is capitalized but should be spelled "'+h+'"')}})}break}},A:function(a,b,c,d){t.i(a,"function","Util.defineReadOnlyProperty:classfunc");t.i(b,"object","Util.defineReadOnlyProperty:propobj");
  t.i(c,"function","Util.defineReadOnlyProperty:getter");for(var f in b){var g=b[f];b={get:c,set:function(a){t.m('The property "'+g+'" is read-only and cannot be set to '+a)}};if(void 0!==d)for(var h in d)b[h]=d[h];Object.defineProperty(a.prototype,f,b);d=Object.getOwnPropertyDescriptor(a.prototype,f);g&&d&&Object.defineProperty(a.prototype,g,d);if(e&&g){var k=g.charAt(0).toUpperCase()+g.slice(1);Object.defineProperty(a.prototype,k,{get:function(){t.Rw||t.uA||t.trace('Getting the property "'+k+'" is probably not what you intended: it is capitalized but should be spelled "'+
  g+'"')},set:function(){t.m('Setting the read-only property "'+k+'" is probably not what you intended: it is capitalized but should be spelled "'+g+'", and cannot be set anyway')}})}break}},Vd:function(a,b){for(var c in b)b[c]=!0;a.prototype.YC=b},ai:function(a){return void 0===a?"":"string"===typeof a?a:"function"===typeof a?t.xg(a):null===a?"*":""},xg:function(a){if("function"===typeof a){if(a.oy)return a.oy;if(a.name)return a.name;var b=a.toString(),c=b.indexOf("(");if(b=b.substring(9,c).trim())return a.oy=
  b}else if("object"===typeof a&&a.constructor)return t.xg(a.constructor);return typeof a},w:function(a,b,c){t.i(a,"function","Util.defineEnumValue:classfunc");t.i(b,"string","Util.defineEnumValue:name");t.i(c,"number","Util.defineEnumValue:num");c=new da(a,b,c);Object.freeze(c);a[b]=c;var d=a.bu;d||(d=new ja("string",da),a.bu=d);d.add(b,c);return c},Om:function(a,b){if(!b)return null;t.i(a,"function","Util.findEnumValueForName:classfunc");t.i(b,"string","Util.findEnumValueForName:name");var c=a.bu;
  return c?c.za(b):null},hI:function(a,b,c,d){var f={},g;for(g in a){for(var h=!1,k=1;k<arguments.length;k++)if(arguments[k]===g){h=!0;break}h||(f[g]=a[g])}return f},hb:function(a,b){if(!a||!b)return null;var c=void 0;try{"function"===typeof b?c=b(a):"function"===typeof a.getAttribute?(c=a.getAttribute(b),null===c&&(c=void 0)):(c=a[b],t.zc&&t.zc(c)&&(c=c()))}catch(d){e&&t.trace("property get error: "+d.toString())}return c},Sa:function(a,b,c){if(a&&b)try{if("function"===typeof b)b(a,c);else if("function"===
  typeof a.setAttribute)a.setAttribute(b,c);else if(t.zc){var d=a[b];t.zc(d)?d(c):a[b]=c}else a[b]=c}catch(f){e&&t.trace("property set error: "+f.toString())}},ux:function(a,b){t.i(a,"object","Setting properties requires Objects as arguments");t.i(b,"object","Setting properties requires Objects as arguments");var c=e;c||(e=t);var d=a instanceof y,f=a instanceof z,g;for(g in b){g||t.m("Setting properties requires non-empty property names");var h=a,k=g;if(d||f){var l=g.indexOf(".");if(0<l){var m=g.substring(0,
  l);d?h=a.oe(m):(h=a[m])||(h=a.wb[m]);h?k=g.substr(l+1):t.m("Unable to find object named: "+m+" in "+a.toString()+" when trying to set property: "+g)}}if("_"!==k[0]&&!t.Kw(h,k))if(f&&t.Kw(a.wb,k))h=a.wb;else if(f&&ma(a,k)){a.Kz(k,b[k]);continue}else t.m('Trying to set undefined property "'+k+'" on object: '+h.toString());h[k]=b[g];"_"===k[0]&&(l=h.Kl,l||(l=[],h.Kl=l),l.push(k))}e=c;return a},Kw:function(a,b){for(var c=Object.getPrototypeOf(a);c&&c!==Function;){if(c.hasOwnProperty(b))return!0;var d=
  c.YC;if(d&&d[b])return!0;c=Object.getPrototypeOf(c)}return!1},UD:function(a,b){if(!t.rb(b)||b instanceof Element||b instanceof CanvasRenderingContext2D)return"";var c="",d;for(d in b)if("string"!==typeof d)""===c&&(c=b+"\n"),c+="  "+d+" is not a string property\n";else if("_"!==d.charAt(0)&&!(2>=d.length)){var f=t.hb(b,d);null===f||"function"===typeof f||t.Kw(b,d)||(""===c&&(c=b+"\n"),c+='  unknown property "'+d+'" has value: '+f+" at "+a+"\n")}return c},iw:function(a,b){if(b&&"number"!==typeof b&&
  "string"!==typeof b&&"boolean"!==typeof b&&"function"!==typeof b)if(void 0!==t.od(b)){if(!t.Fv.contains(b))if(t.Fv.add(b),t.fv.add(t.UD(a,b)),b instanceof B||b instanceof C||b instanceof ja)for(var c=b.k;c.next();)t.iw(a+"["+c.key+"]",c.value);else for(c in b){var d=t.hb(b,c);if(void 0!==d&&null!==d&&t.rb(d)&&d!==b.YC){if(b instanceof na){if(d===b.no)continue}else if(b instanceof y){if("data"===c||d===b.Ml)continue;if("itemArray"===c||d===b.yi)continue;if(b instanceof E&&d===b.Gj)continue}else if(!(b instanceof
  z))if(b instanceof oa){if("archetypeGroupData"===c||d===b.jy)continue}else if(b instanceof pa){if("archetypeLinkData"===c||d===b.ly)continue;if("archetypeLabelNodeData"===c||d===b.ky)continue}else if(b instanceof qa){if("archetypeNodeData"===c||d===b.wk)continue}else if(b instanceof F){if("nodeDataArray"===c||d===b.Me)continue;if("linkDataArray"===c||d===b.Xg||d===b.cm)continue;if(d===b.Bc)continue;if(d===b.yh)continue}else if(b instanceof ra||b instanceof sa||b instanceof ua)continue;t.iw(a+"."+
  c,d)}}}else if(Array.isArray(b))for(c=0;c<b.length;c++)t.iw(a+"["+c+"]",b[c]);else t.fv.add(t.UD(a,b))},cI:function(a){void 0===t.Fv?t.Fv=new C:t.Fv.clear();t.fv=new wa;t.iw("",a);a=t.fv.toString();t.fv=null;return a},FJ:function(a){for(var b=[],c=0;256>c;c++)b[c]=c;for(var d=0,f,c=0;256>c;c++)d=(d+b[c]+119)%256,f=b[c],b[c]=b[d],b[d]=f;for(var d=c=0,g="",h=0;h<a.length;h++)c=(c+1)%256,d=(d+b[c])%256,f=b[c],b[c]=b[d],b[d]=f,g+=String.fromCharCode(a.charCodeAt(h)^b[(b[c]+b[d])%256]);return g},QI:function(a){for(var b=
  [],c=0;256>c;c++)b["0123456789abcdef".charAt(c>>4)+"0123456789abcdef".charAt(c&15)]=String.fromCharCode(c);a.length%2&&(a="0"+a);for(var d=[],f=0,c=0;c<a.length;c+=2)d[f++]=b[a.substr(c,2)];a=d.join("");return""===a?"0":a},Ha:function(a){return t.FJ(t.QI(a))},El:null,cw:"7da71ca0ad381e90",dI:"@COLOR1",eI:"@COLOR2"};
  t.El=function(){var a=document.createElement("canvas"),b=a.getContext("2d");b[t.Ha("7ca11abfd022028846")]=t.Ha("398c3597c01238");for(var c=["5da73c80a3330d854f9e5e671d6633","32ab5ff3b26f42dc0ed90f22402913b54ae6247590da4bb21c324ba3a84e385776","54a702f3e53909c447824c6706603faf4cfb236cdfda5de14c134ba1a95a2d4c7cc6f93c1387","74bf19bce72555874c86"],d=1;5>d;d++)b[t.Ha("7ca11abfd7330390")](t.Ha(c[d-1]),10,15*d+0);b[t.Ha("7ca11abfd022028846")]=t.Ha("39f046ebb36e4b");for(d=1;5>d;d++)b[t.Ha("7ca11abfd7330390")](t.Ha(c[d-
  1]),10,15*d+0);if(4!==c.length||"5"!==c[0][0]||"7"!==c[3][0])t.w=function(a,b){var c=new da(a,b,2);Object.freeze(c);a[b]=c;var d=a.bu;d||(d=new ja("string",da),a.bu=d);d.add(b,c);return c};return a}();function da(a,b,c){t.Ac(this);this.LB=a;this.Yb=b;this.zH=c}da.prototype.toString=function(){return t.xg(this.LB)+"."+this.Yb};t.A(da,{Re:"classType"},function(){return this.LB});t.A(da,{name:"name"},function(){return this.Yb});t.A(da,{value:"value"},function(){return this.zH});
  function wa(){this.KB=[]}wa.prototype.toString=function(){return this.KB.join("")};wa.prototype.add=function(a){a&&this.KB.push(a)};function ya(){}t.A(ya,{k:"iterator"},function(){return this});ya.prototype.reset=ya.prototype.reset=function(){};ya.prototype.next=ya.prototype.hasNext=ya.prototype.next=function(){return!1};ya.prototype.first=ya.prototype.$a=function(){return null};ya.prototype.any=function(){return!1};ya.prototype.all=function(){return!0};ya.prototype.each=function(){};
  t.A(ya,{count:"count"},function(){return 0});ya.prototype.cg=function(){};ya.prototype.toString=function(){return"EmptyIterator"};t.ag=new ya;function Aa(a){this.key=-1;this.value=a}t.Vd(Aa,{key:!0,value:!0});t.A(Aa,{k:"iterator"},function(){return this});Aa.prototype.reset=Aa.prototype.reset=function(){this.key=-1};Aa.prototype.next=Aa.prototype.hasNext=Aa.prototype.next=function(){return-1===this.key?(this.key=0,!0):!1};Aa.prototype.first=Aa.prototype.$a=function(){this.key=0;return this.value};
  Aa.prototype.any=function(a){this.key=-1;return a(this.value)};Aa.prototype.all=function(a){this.key=-1;return a(this.value)};Aa.prototype.each=function(a){this.key=-1;a(this.value)};t.A(Aa,{count:"count"},function(){return 1});Aa.prototype.cg=function(){this.value=null};Aa.prototype.toString=function(){return"SingletonIterator("+this.value+")"};function Ba(a){this.Bd=a;this.Jj=null;this.reset()}t.Vd(Ba,{key:!0,value:!0});t.A(Ba,{k:"iterator"},function(){return this});t.g(Ba,"predicate",Ba.prototype.sl);
  t.defineProperty(Ba,{sl:"predicate"},function(){return this.Jj},function(a){this.Jj=a});Ba.prototype.reset=Ba.prototype.reset=function(){var a=this.Bd;a.Ad=null;this.Ya=a.V;this.Vc=-1};Ba.prototype.next=Ba.prototype.hasNext=Ba.prototype.next=function(){var a=this.Bd;a.V!==this.Ya&&t.Pb(a);var a=a.n,b=a.length,c=++this.Vc,d=this.Jj;if(null!==d)for(;c<b;){var f=a[c];if(d(f))return this.key=this.Vc=c,this.value=f,!0;c++}else{if(c<b)return this.key=c,this.value=a[c],!0;this.cg()}return!1};
  Ba.prototype.first=Ba.prototype.$a=function(){var a=this.Bd;this.Ya=a.V;this.Vc=0;var a=a.n,b=a.length,c=this.Jj;if(null!==c){for(var d=0;d<b;){var f=a[d];if(c(f))return this.key=this.Vc=d,this.value=f;d++}return null}return 0<b?(f=a[0],this.key=0,this.value=f):null};Ba.prototype.any=function(a){var b=this.Bd;b.Ad=null;var c=b.V;this.Vc=-1;for(var d=b.n,f=d.length,g=this.Jj,h=0;h<f;h++){var k=d[h];if(null===g||g(k)){if(a(k))return!0;b.V!==c&&t.Pb(b)}}return!1};
  Ba.prototype.all=function(a){var b=this.Bd;b.Ad=null;var c=b.V;this.Vc=-1;for(var d=b.n,f=d.length,g=this.Jj,h=0;h<f;h++){var k=d[h];if(null===g||g(k)){if(!a(k))return!1;b.V!==c&&t.Pb(b)}}return!0};Ba.prototype.each=function(a){var b=this.Bd;b.Ad=null;var c=b.V;this.Vc=-1;for(var d=b.n,f=d.length,g=this.Jj,h=0;h<f;h++){var k=d[h];if(null===g||g(k))a(k),b.V!==c&&t.Pb(b)}};t.A(Ba,{count:"count"},function(){var a=this.Jj;if(null!==a){for(var b=0,c=this.Bd.n,d=c.length,f=0;f<d;f++)a(c[f])&&b++;return b}return this.Bd.n.length});
  Ba.prototype.cg=function(){this.key=-1;this.value=null;this.Ya=-1;this.Jj=null;this.Bd.Ad=this};Ba.prototype.toString=function(){return"ListIterator@"+this.Vc+"/"+this.Bd.count};function Ca(a){this.Bd=a;this.reset()}t.Vd(Ca,{key:!0,value:!0});t.A(Ca,{k:"iterator"},function(){return this});Ca.prototype.reset=Ca.prototype.reset=function(){var a=this.Bd;a.fo=null;this.Ya=a.V;this.Vc=a.n.length};
  Ca.prototype.next=Ca.prototype.hasNext=Ca.prototype.next=function(){var a=this.Bd;a.V!==this.Ya&&t.Pb(a);var b=--this.Vc;if(0<=b)return this.key=b,this.value=a.n[b],!0;this.cg();return!1};Ca.prototype.first=Ca.prototype.$a=function(){var a=this.Bd;this.Ya=a.V;var b=a.n;this.Vc=a=b.length-1;return 0<=a?(b=b[a],this.key=a,this.value=b):null};Ca.prototype.any=function(a){var b=this.Bd;b.fo=null;var c=b.V,d=b.n,f=d.length;this.Vc=f;for(f-=1;0<=f;f++){if(a(d[f]))return!0;b.V!==c&&t.Pb(b)}return!1};
  Ca.prototype.all=function(a){var b=this.Bd;b.fo=null;var c=b.V,d=b.n,f=d.length;this.Vc=f;for(f-=1;0<=f;f++){if(!a(d[f]))return!1;b.V!==c&&t.Pb(b)}return!0};Ca.prototype.each=function(a){var b=this.Bd;b.fo=null;var c=b.V,d=b.n,f=d.length;this.Vc=f;for(f-=1;0<=f;f++)a(d[f]),b.V!==c&&t.Pb(b)};t.A(Ca,{count:"count"},function(){return this.Bd.n.length});Ca.prototype.cg=function(){this.key=-1;this.value=null;this.Ya=-1;this.Bd.fo=this};
  Ca.prototype.toString=function(){return"ListIteratorBackwards("+this.Vc+"/"+this.Bd.count+")"};
  function B(a){t.Ac(this);this.ob=!1;this.n=[];this.V=0;this.fo=this.Ad=null;void 0===a||null===a?this.da=null:"string"===typeof a?"object"===a||"string"===a||"number"===a||"boolean"===a||"function"===a?this.da=a:t.la(a,"the string 'object', 'number', 'string', 'boolean', or 'function'","List constructor: type"):"function"===typeof a?this.da=a===Object?"object":a===String?"string":a===Number?"number":a===Boolean?"boolean":a===Function?"function":a:t.la(a,"null, a primitive type name, or a class type",
  "List constructor: type")}t.ga("List",B);B.prototype.Pg=function(a){null!==this.da&&("string"===typeof this.da?typeof a===this.da&&null!==a||t.bc(a,this.da):a instanceof this.da||t.bc(a,this.da))};B.prototype.Qd=function(){var a=this.V;a++;999999999<a&&(a=0);this.V=a};B.prototype.freeze=B.prototype.freeze=function(){this.ob=!0;return this};B.prototype.thaw=B.prototype.La=function(){this.ob=!1;return this};B.prototype.toString=function(){return"List("+t.ai(this.da)+")#"+t.od(this)};
  B.prototype.add=B.prototype.add=function(a){null!==a&&(e&&this.Pg(a),t.L(this,a),this.n.push(a),this.Qd())};B.prototype.addAll=B.prototype.Oe=function(a){if(null===a)return this;t.L(this);var b=this.n;if(t.isArray(a))for(var c=t.vb(a),d=0;d<c;d++){var f=t.mb(a,d);e&&this.Pg(f);b.push(f)}else for(a=a.k;a.next();)f=a.value,e&&this.Pg(f),b.push(f);this.Qd();return this};B.prototype.clear=B.prototype.clear=function(){t.L(this);this.n.length=0;this.Qd()};
  B.prototype.contains=B.prototype.has=B.prototype.contains=function(a){if(null===a)return!1;e&&this.Pg(a);return-1!==this.n.indexOf(a)};B.prototype.indexOf=B.prototype.indexOf=function(a){if(null===a)return-1;e&&this.Pg(a);return this.n.indexOf(a)};B.prototype.elt=B.prototype.get=B.prototype.wa=function(a){e&&t.q(a,B,"elt:i");var b=this.n;(0>a||a>=b.length)&&t.la(a,"0 <= i < length",B,"elt:i");return b[a]};
  B.prototype.setElt=B.prototype.set=B.prototype.Mg=function(a,b){e&&(this.Pg(b),t.q(a,B,"setElt:i"));var c=this.n;(0>a||a>=c.length)&&t.la(a,"0 <= i < length",B,"setElt:i");t.L(this,a);c[a]=b};B.prototype.first=B.prototype.$a=function(){var a=this.n;return 0===a.length?null:a[0]};B.prototype.any=function(a){for(var b=this.n,c=this.V,d=b.length,f=0;f<d;f++){if(a(b[f]))return!0;this.V!==c&&t.Pb(this)}return!1};
  B.prototype.all=function(a){for(var b=this.n,c=this.V,d=b.length,f=0;f<d;f++){if(!a(b[f]))return!1;this.V!==c&&t.Pb(this)}return!0};B.prototype.each=function(a){for(var b=this.n,c=this.V,d=b.length,f=0;f<d;f++)a(b[f]),this.V!==c&&t.Pb(this)};B.prototype.insertAt=B.prototype.Jd=function(a,b){e&&(this.Pg(b),t.q(a,B,"insertAt:i"));0>a&&t.la(a,">= 0",B,"insertAt:i");t.L(this,a);var c=this.n;a>=c.length?c.push(b):c.splice(a,0,b);this.Qd();return!0};
  B.prototype.remove=B.prototype["delete"]=B.prototype.remove=function(a){if(null===a)return!1;e&&this.Pg(a);t.L(this,a);var b=this.n;a=b.indexOf(a);if(-1===a)return!1;a===b.length-1?b.pop():b.splice(a,1);this.Qd();return!0};B.prototype.removeAt=B.prototype.qd=function(a){e&&t.q(a,B,"removeAt:i");var b=this.n;(0>a||a>=b.length)&&t.la(a,"0 <= i < length",B,"removeAt:i");t.L(this,a);a===b.length-1?b.pop():b.splice(a,1);this.Qd()};
  B.prototype.removeRange=B.prototype.removeRange=function(a,b){e&&(t.q(a,B,"removeRange:from"),t.q(b,B,"removeRange:to"));var c=this.n;(0>a||a>=c.length)&&t.la(a,"0 <= from < length",B,"elt:from");(0>b||b>=c.length)&&t.la(b,"0 <= to < length",B,"elt:to");t.L(this,a);var d=c.slice((b||a)+1||c.length);c.length=0>a?c.length+a:a;c.push.apply(c,d);this.Qd()};B.prototype.copy=function(){for(var a=new B(this.da),b=this.n,c=this.count,d=0;d<c;d++)a.add(b[d]);return a};
  B.prototype.toArray=B.prototype.Ie=function(){for(var a=this.n,b=this.count,c=Array(b),d=0;d<b;d++)c[d]=a[d];return c};B.prototype.toSet=function(){for(var a=new C(this.da),b=this.n,c=this.count,d=0;d<c;d++)a.add(b[d]);return a};B.prototype.sort=B.prototype.sort=function(a){e&&t.i(a,"function",B,"sort:sortfunc");t.L(this);this.n.sort(a);this.Qd();return this};
  B.prototype.sortRange=B.prototype.Up=function(a,b,c){var d=this.n,f=d.length;void 0===b&&(b=0);void 0===c&&(c=f);e&&(t.i(a,"function",B,"sortRange:sortfunc"),t.q(b,B,"sortRange:from"),t.q(c,B,"sortRange:to"));t.L(this);var g=c-b;if(1>=g)return this;(0>b||b>=f-1)&&t.la(b,"0 <= from < length",B,"sortRange:from");if(2===g)return c=d[b],f=d[b+1],0<a(c,f)&&(d[b]=f,d[b+1]=c,this.Qd()),this;if(0===b)if(c>=f)d.sort(a);else for(g=d.slice(0,c),g.sort(a),a=0;a<c;a++)d[a]=g[a];else if(c>=f)for(g=d.slice(b),g.sort(a),
  a=b;a<f;a++)d[a]=g[a-b];else for(g=d.slice(b,c),g.sort(a),a=b;a<c;a++)d[a]=g[a-b];this.Qd();return this};B.prototype.reverse=B.prototype.reverse=function(){t.L(this);this.n.reverse();this.Qd();return this};t.A(B,{count:"count"},function(){return this.n.length});t.A(B,{size:"size"},function(){return this.n.length});t.A(B,{length:"length"},function(){return this.n.length});t.A(B,{k:"iterator"},function(){if(0>=this.n.length)return t.ag;var a=this.Ad;return null!==a?(a.reset(),a):new Ba(this)});
  t.A(B,{Wm:"iteratorBackwards"},function(){if(0>=this.n.length)return t.ag;var a=this.fo;return null!==a?(a.reset(),a):new Ca(this)});function Da(a){this.p=a;this.reset()}t.Vd(Da,{key:!0,value:!0});t.A(Da,{k:"iterator"},function(){return this});Da.prototype.reset=Da.prototype.reset=function(){var a=this.p;a.Ad=null;this.Ya=a.V;this.yb=null};
  Da.prototype.next=Da.prototype.hasNext=Da.prototype.next=function(){var a=this.p;a.V!==this.Ya&&t.Pb(a);var b=this.yb,b=null===b?a.cb:b.Tb;if(null!==b)return this.yb=b,this.value=b.value,this.key=b.key,!0;this.cg();return!1};Da.prototype.first=Da.prototype.$a=function(){var a=this.p;this.Ya=a.V;a=a.cb;if(null!==a){this.yb=a;var b=a.value;this.key=a.key;return this.value=b}return null};
  Da.prototype.any=function(a){var b=this.p;b.Ad=null;var c=b.V;this.yb=null;for(var d=b.cb;null!==d;){if(a(d.value))return!0;b.V!==c&&t.Pb(b);d=d.Tb}return!1};Da.prototype.all=function(a){var b=this.p;b.Ad=null;var c=b.V;this.yb=null;for(var d=b.cb;null!==d;){if(!a(d.value))return!1;b.V!==c&&t.Pb(b);d=d.Tb}return!0};Da.prototype.each=function(a){var b=this.p;b.Ad=null;var c=b.V;this.yb=null;for(var d=b.cb;null!==d;)a(d.value),b.V!==c&&t.Pb(b),d=d.Tb};t.A(Da,{count:"count"},function(){return this.p.ed});
  Da.prototype.cg=function(){this.value=this.key=null;this.Ya=-1;this.p.Ad=this};Da.prototype.toString=function(){return null!==this.yb?"SetIterator@"+this.yb.value:"SetIterator"};
  function C(a){t.Ac(this);this.ob=!1;void 0===a||null===a?this.da=null:"string"===typeof a?"object"===a||"string"===a||"number"===a?this.da=a:t.la(a,"the string 'object', 'number' or 'string'","Set constructor: type"):"function"===typeof a?this.da=a===Object?"object":a===String?"string":a===Number?"number":a:t.la(a,"null, a primitive type name, or a class type","Set constructor: type");this.fd={};this.ed=0;this.Ad=null;this.V=0;this.Jh=this.cb=null}t.ga("Set",C);
  C.prototype.Pg=function(a){null!==this.da&&("string"===typeof this.da?typeof a===this.da&&null!==a||t.bc(a,this.da):a instanceof this.da||t.bc(a,this.da))};C.prototype.Qd=function(){var a=this.V;a++;999999999<a&&(a=0);this.V=a};C.prototype.freeze=C.prototype.freeze=function(){this.ob=!0;return this};C.prototype.thaw=C.prototype.La=function(){this.ob=!1;return this};C.prototype.toString=function(){return"Set("+t.ai(this.da)+")#"+t.od(this)};
  C.prototype.add=C.prototype.add=function(a){if(null===a)return!1;e&&this.Pg(a);t.L(this,a);var b=a;t.rb(a)&&(b=t.it(a));return void 0===this.fd[b]?(this.ed++,a=new Ea(a,a),this.fd[b]=a,b=this.Jh,null===b?this.cb=a:(a.uo=b,b.Tb=a),this.Jh=a,this.Qd(),!0):!1};C.prototype.addAll=C.prototype.Oe=function(a){if(null===a)return this;t.L(this);if(t.isArray(a))for(var b=t.vb(a),c=0;c<b;c++)this.add(t.mb(a,c));else for(a=a.k;a.next();)this.add(a.value);return this};
  C.prototype.contains=C.prototype.has=C.prototype.contains=function(a){if(null===a)return!1;e&&this.Pg(a);var b=a;return t.rb(a)&&(b=t.od(a),void 0===b)?!1:void 0!==this.fd[b]};C.prototype.containsAll=function(a){if(null===a)return!0;for(a=a.k;a.next();)if(!this.contains(a.value))return!1;return!0};C.prototype.containsAny=function(a){if(null===a)return!0;for(a=a.k;a.next();)if(this.contains(a.value))return!0;return!1};C.prototype.first=C.prototype.$a=function(){var a=this.cb;return null===a?null:a.value};
  C.prototype.any=function(a){for(var b=this.V,c=this.cb;null!==c;){if(a(c.value))return!0;this.V!==b&&t.Pb(this);c=c.Tb}return!1};C.prototype.all=function(a){for(var b=this.V,c=this.cb;null!==c;){if(!a(c.value))return!1;this.V!==b&&t.Pb(this);c=c.Tb}return!0};C.prototype.each=function(a){for(var b=this.V,c=this.cb;null!==c;)a(c.value),this.V!==b&&t.Pb(this),c=c.Tb};
  C.prototype.remove=C.prototype["delete"]=C.prototype.remove=function(a){if(null===a)return!1;e&&this.Pg(a);t.L(this,a);var b=a;if(t.rb(a)&&(b=t.od(a),void 0===b))return!1;a=this.fd[b];if(void 0===a)return!1;var c=a.Tb,d=a.uo;null!==c&&(c.uo=d);null!==d&&(d.Tb=c);this.cb===a&&(this.cb=c);this.Jh===a&&(this.Jh=d);delete this.fd[b];this.ed--;this.Qd();return!0};
  C.prototype.removeAll=function(a){if(null===a)return this;t.L(this);if(t.isArray(a))for(var b=t.vb(a),c=0;c<b;c++)this.remove(t.mb(a,c));else for(a=a.k;a.next();)this.remove(a.value);return this};C.prototype.retainAll=function(a){if(null===a||0===this.count)return this;t.L(this);var b=new C(this.da);b.Oe(a);a=new B(this.da);for(var c=this.k;c.next();)b.contains(c.value)||a.add(c.value);for(b=a.k;b.next();)this.remove(b.value);return this};
  C.prototype.clear=C.prototype.clear=function(){t.L(this);this.fd={};this.ed=0;this.Jh=this.cb=null;this.Qd()};C.prototype.copy=function(){var a=new C(this.da),b=this.fd,c;for(c in b)a.add(b[c].value);return a};C.prototype.toArray=C.prototype.Ie=function(){var a=Array(this.ed),b=this.fd,c=0,d;for(d in b)a[c]=b[d].value,c++;return a};C.prototype.toList=function(){var a=new B(this.da),b=this.fd,c;for(c in b)a.add(b[c].value);return a};t.A(C,{count:"count"},function(){return this.ed});
  t.A(C,{size:"size"},function(){return this.ed});t.A(C,{k:"iterator"},function(){if(0>=this.ed)return t.ag;var a=this.Ad;return null!==a?(a.reset(),a):new Da(this)});function Fa(a){this.Xa=a;this.reset()}t.Vd(Fa,{key:!0,value:!0});t.A(Fa,{k:"iterator"},function(){return this});Fa.prototype.reset=Fa.prototype.reset=function(){this.Ya=this.Xa.V;this.yb=null};
  Fa.prototype.next=Fa.prototype.hasNext=Fa.prototype.next=function(){var a=this.Xa;a.V!==this.Ya&&t.Pb(a);var b=this.yb,b=null===b?a.cb:b.Tb;if(null!==b)return this.yb=b,this.value=this.key=a=b.key,!0;this.cg();return!1};Fa.prototype.first=Fa.prototype.$a=function(){var a=this.Xa;this.Ya=a.V;a=a.cb;return null!==a?(this.yb=a,this.value=this.key=a=a.key):null};Fa.prototype.any=function(a){var b=this.Xa,c=b.V;this.yb=null;for(var d=b.cb;null!==d;){if(a(d.key))return!0;b.V!==c&&t.Pb(b);d=d.Tb}return!1};
  Fa.prototype.all=function(a){var b=this.Xa,c=b.V;this.yb=null;for(var d=b.cb;null!==d;){if(!a(d.key))return!1;b.V!==c&&t.Pb(b);d=d.Tb}return!0};Fa.prototype.each=function(a){var b=this.Xa,c=b.V;this.yb=null;for(var d=b.cb;null!==d;)a(d.key),b.V!==c&&t.Pb(b),d=d.Tb};t.A(Fa,{count:"count"},function(){return this.Xa.ed});Fa.prototype.cg=function(){this.value=this.key=null;this.Ya=-1};Fa.prototype.toString=function(){return null!==this.yb?"MapKeySetIterator@"+this.yb.value:"MapKeySetIterator"};
  function Ha(a){t.Ac(this);this.ob=!0;this.Xa=a}t.Ka(Ha,C);Ha.prototype.freeze=function(){return this};Ha.prototype.La=function(){return this};Ha.prototype.toString=function(){return"MapKeySet("+this.Xa.toString()+")"};Ha.prototype.add=Ha.prototype.set=Ha.prototype.add=function(){t.m("This Set is read-only: "+this.toString());return!1};Ha.prototype.contains=Ha.prototype.has=Ha.prototype.contains=function(a){return this.Xa.contains(a)};
  Ha.prototype.remove=Ha.prototype["delete"]=Ha.prototype.remove=function(){t.m("This Set is read-only: "+this.toString());return!1};Ha.prototype.clear=Ha.prototype.clear=function(){t.m("This Set is read-only: "+this.toString())};Ha.prototype.first=Ha.prototype.$a=function(){var a=this.Xa.cb;return null!==a?a.key:null};Ha.prototype.any=function(a){for(var b=this.Xa.cb;null!==b;){if(a(b.key))return!0;b=b.Tb}return!1};
  Ha.prototype.all=function(a){for(var b=this.Xa.cb;null!==b;){if(!a(b.key))return!1;b=b.Tb}return!0};Ha.prototype.each=function(a){for(var b=this.Xa.cb;null!==b;)a(b.key),b=b.Tb};Ha.prototype.copy=function(){return new Ha(this.Xa)};Ha.prototype.toSet=function(){var a=new C(this.Xa.Ih),b=this.Xa.fd,c;for(c in b)a.add(b[c].key);return a};Ha.prototype.toArray=Ha.prototype.Ie=function(){var a=this.Xa.fd,b=Array(this.Xa.ed),c=0,d;for(d in a)b[c]=a[d].key,c++;return b};
  Ha.prototype.toList=function(){var a=new B(this.da),b=this.Xa.fd,c;for(c in b)a.add(b[c].key);return a};t.A(Ha,{count:"count"},function(){return this.Xa.ed});t.A(Ha,{size:"size"},function(){return this.Xa.ed});t.A(Ha,{k:"iterator"},function(){return 0>=this.Xa.ed?t.ag:new Fa(this.Xa)});function Ka(a){this.Xa=a;this.reset()}t.Vd(Ka,{key:!0,value:!0});t.A(Ka,{k:"iterator"},function(){return this});Ka.prototype.reset=Ka.prototype.reset=function(){var a=this.Xa;a.ho=null;this.Ya=a.V;this.yb=null};
  Ka.prototype.next=Ka.prototype.hasNext=Ka.prototype.next=function(){var a=this.Xa;a.V!==this.Ya&&t.Pb(a);var b=this.yb,b=null===b?a.cb:b.Tb;if(null!==b)return this.yb=b,this.value=b.value,this.key=b.key,!0;this.cg();return!1};Ka.prototype.first=Ka.prototype.$a=function(){var a=this.Xa;this.Ya=a.V;a=a.cb;if(null!==a){this.yb=a;var b=a.value;this.key=a.key;return this.value=b}return null};
  Ka.prototype.any=function(a){var b=this.Xa;b.ho=null;var c=b.V;this.yb=null;for(var d=b.cb;null!==d;){if(a(d.value))return!0;b.V!==c&&t.Pb(b);d=d.Tb}return!1};Ka.prototype.all=function(a){var b=this.Xa;b.ho=null;var c=b.V;this.yb=null;for(var d=b.cb;null!==d;){if(!a(d.value))return!1;b.V!==c&&t.Pb(b);d=d.Tb}return!0};Ka.prototype.each=function(a){var b=this.Xa;b.ho=null;var c=b.V;this.yb=null;for(var d=b.cb;null!==d;)a(d.value),b.V!==c&&t.Pb(b),d=d.Tb};t.A(Ka,{count:"count"},function(){return this.Xa.ed});
  Ka.prototype.cg=function(){this.value=this.key=null;this.Ya=-1;this.Xa.ho=this};Ka.prototype.toString=function(){return null!==this.yb?"MapValueSetIterator@"+this.yb.value:"MapValueSetIterator"};function Ea(a,b){this.key=a;this.value=b;this.uo=this.Tb=null}t.Vd(Ea,{key:!0,value:!0});Ea.prototype.toString=function(){return"{"+this.key+":"+this.value+"}"};function La(a){this.Xa=a;this.reset()}t.Vd(La,{key:!0,value:!0});t.A(La,{k:"iterator"},function(){return this});
  La.prototype.reset=La.prototype.reset=function(){var a=this.Xa;a.Ad=null;this.Ya=a.V;this.yb=null};La.prototype.next=La.prototype.hasNext=La.prototype.next=function(){var a=this.Xa;a.V!==this.Ya&&t.Pb(a);var b=this.yb,b=null===b?a.cb:b.Tb;if(null!==b)return this.yb=b,this.key=b.key,this.value=b.value,!0;this.cg();return!1};La.prototype.first=La.prototype.$a=function(){var a=this.Xa;this.Ya=a.V;a=a.cb;return null!==a?(this.yb=a,this.key=a.key,this.value=a.value,a):null};
  La.prototype.any=function(a){var b=this.Xa;b.Ad=null;var c=b.V;this.yb=null;for(var d=b.cb;null!==d;){if(a(d))return!0;b.V!==c&&t.Pb(b);d=d.Tb}return!1};La.prototype.all=function(a){var b=this.Xa;b.Ad=null;var c=b.V;this.yb=null;for(var d=b.cb;null!==d;){if(!a(d))return!1;b.V!==c&&t.Pb(b);d=d.Tb}return!0};La.prototype.each=function(a){var b=this.Xa;b.Ad=null;var c=b.V;this.yb=null;for(var d=b.cb;null!==d;)a(d),b.V!==c&&t.Pb(b),d=d.Tb};t.A(La,{count:"count"},function(){return this.Xa.ed});
  La.prototype.cg=function(){this.value=this.key=null;this.Ya=-1;this.Xa.Ad=this};La.prototype.toString=function(){return null!==this.yb?"MapIterator@"+this.yb:"MapIterator"};
  function ja(a,b){t.Ac(this);this.ob=!1;void 0===a||null===a?this.Ih=null:"string"===typeof a?"object"===a||"string"===a||"number"===a?this.Ih=a:t.la(a,"the string 'object', 'number' or 'string'","Map constructor: keytype"):"function"===typeof a?this.Ih=a===Object?"object":a===String?"string":a===Number?"number":a:t.la(a,"null, a primitive type name, or a class type","Map constructor: keytype");void 0===b||null===b?this.Ri=null:"string"===typeof b?"object"===b||"string"===b||"boolean"===b||"number"===
  b||"function"===b?this.Ri=b:t.la(b,"the string 'object', 'number', 'string', 'boolean', or 'function'","Map constructor: valtype"):"function"===typeof b?this.Ri=b===Object?"object":b===String?"string":b===Number?"number":b===Boolean?"boolean":b===Function?"function":b:t.la(b,"null, a primitive type name, or a class type","Map constructor: valtype");this.fd={};this.ed=0;this.ho=this.Ad=null;this.V=0;this.Jh=this.cb=null}t.ga("Map",ja);
  function Ma(a,b){null!==a.Ih&&("string"===typeof a.Ih?typeof b===a.Ih&&null!==b||t.bc(b,a.Ih):b instanceof a.Ih||t.bc(b,a.Ih))}ja.prototype.Qd=function(){var a=this.V;a++;999999999<a&&(a=0);this.V=a};ja.prototype.freeze=ja.prototype.freeze=function(){this.ob=!0;return this};ja.prototype.thaw=ja.prototype.La=function(){this.ob=!1;return this};ja.prototype.toString=function(){return"Map("+t.ai(this.Ih)+","+t.ai(this.Ri)+")#"+t.od(this)};
  ja.prototype.add=ja.prototype.set=ja.prototype.add=function(a,b){e&&(Ma(this,a),null!==this.Ri&&("string"===typeof this.Ri?typeof b===this.Ri&&null!==b||t.bc(b,this.Ri):b instanceof this.Ri||t.bc(b,this.Ri)));t.L(this,a);var c=a;t.rb(a)&&(c=t.it(a));var d=this.fd[c];if(void 0===d)return this.ed++,d=new Ea(a,b),this.fd[c]=d,c=this.Jh,null===c?this.cb=d:(d.uo=c,c.Tb=d),this.Jh=d,this.Qd(),!0;d.value=b;return!1};
  ja.prototype.addAll=ja.prototype.Oe=function(a){if(null===a)return this;if(t.isArray(a))for(var b=t.vb(a),c=0;c<b;c++){var d=t.mb(a,c);this.add(d.key,d.value)}else for(e&&t.l(a,ja,ja,"addAll:map"),a=a.k;a.next();)this.add(a.key,a.value);return this};ja.prototype.first=ja.prototype.$a=function(){return this.cb};ja.prototype.any=function(a){for(var b=this.V,c=this.cb;null!==c;){if(a(c))return!0;this.V!==b&&t.Pb(this);c=c.Tb}return!1};
  ja.prototype.all=function(a){for(var b=this.V,c=this.cb;null!==c;){if(!a(c))return!1;this.V!==b&&t.Pb(this);c=c.Tb}return!0};ja.prototype.each=function(a){for(var b=this.V,c=this.cb;null!==c;)a(c),this.V!==b&&t.Pb(this),c=c.Tb};ja.prototype.contains=ja.prototype.has=ja.prototype.contains=function(a){e&&Ma(this,a);var b=a;return t.rb(a)&&(b=t.od(a),void 0===b)?!1:void 0!==this.fd[b]};
  ja.prototype.getValue=ja.prototype.get=ja.prototype.za=function(a){e&&Ma(this,a);var b=a;if(t.rb(a)&&(b=t.od(a),void 0===b))return null;a=this.fd[b];return void 0===a?null:a.value};
  ja.prototype.remove=ja.prototype["delete"]=ja.prototype.remove=function(a){if(null===a)return!1;e&&Ma(this,a);t.L(this,a);var b=a;if(t.rb(a)&&(b=t.od(a),void 0===b))return!1;a=this.fd[b];if(void 0===a)return!1;var c=a.Tb,d=a.uo;null!==c&&(c.uo=d);null!==d&&(d.Tb=c);this.cb===a&&(this.cb=c);this.Jh===a&&(this.Jh=d);delete this.fd[b];this.ed--;this.Qd();return!0};ja.prototype.clear=ja.prototype.clear=function(){t.L(this);this.fd={};this.ed=0;this.Jh=this.cb=null;this.Qd()};
  ja.prototype.copy=function(){var a=new ja(this.Ih,this.Ri),b=this.fd,c;for(c in b){var d=b[c];a.add(d.key,d.value)}return a};ja.prototype.toArray=ja.prototype.Ie=function(){var a=this.fd,b=Array(this.ed),c=0,d;for(d in a){var f=a[d];b[c]=new Ea(f.key,f.value);c++}return b};ja.prototype.toKeySet=ja.prototype.Dl=function(){return new Ha(this)};t.A(ja,{count:"count"},function(){return this.ed});t.A(ja,{size:"size"},function(){return this.ed});
  t.A(ja,{k:"iterator"},function(){if(0>=this.count)return t.ag;var a=this.Ad;return null!==a?(a.reset(),a):new La(this)});t.A(ja,{DK:"iteratorKeys"},function(){return 0>=this.count?t.ag:new Fa(this)});t.A(ja,{kF:"iteratorValues"},function(){if(0>=this.count)return t.ag;var a=this.ho;return null!==a?(a.reset(),a):new Ka(this)});function w(a,b){void 0===a||void 0===b?this.y=this.x=0:!e||"number"===typeof a&&"number"===typeof b?(this.x=a,this.y=b):t.m("Invalid arguments to Point constructor")}
  t.ga("Point",w);t.Yh(w);t.Vd(w,{x:!0,y:!0});w.prototype.assign=function(a){this.x=a.x;this.y=a.y};w.prototype.p=function(a,b){this.x=a;this.y=b};w.prototype.setTo=w.prototype.Sp=function(a,b){e&&(t.i(a,"number",w,"setTo:x"),t.i(b,"number",w,"setTo:y"));t.L(this);this.x=a;this.y=b;return this};w.prototype.set=w.prototype.set=function(a){e&&t.l(a,w,w,"set:p");t.L(this);this.x=a.x;this.y=a.y;return this};w.prototype.copy=function(){var a=new w;a.x=this.x;a.y=this.y;return a};
  w.prototype.Ja=function(){this.ob=!0;Object.freeze(this);return this};w.prototype.Z=function(){return Object.isFrozen(this)?this:this.copy().freeze()};w.prototype.freeze=function(){this.ob=!0;return this};w.prototype.La=function(){Object.isFrozen(this)&&t.m("cannot thaw constant: "+this);this.ob=!1;return this};
  w.parse=function(a){if("string"===typeof a){a=a.split(" ");for(var b=0,c=0;""===a[b];)b++;var d=a[b++];d&&(c=parseFloat(d));for(var f=0;""===a[b];)b++;(d=a[b++])&&(f=parseFloat(d));return new w(c,f)}return new w};w.stringify=function(a){return a instanceof w?a.x.toString()+" "+a.y.toString():a.toString()};w.prototype.toString=function(){return"Point("+this.x+","+this.y+")"};w.prototype.equals=w.prototype.M=function(a){return a instanceof w?this.x===a.x&&this.y===a.y:!1};
  w.prototype.equalTo=function(a,b){return this.x===a&&this.y===b};w.prototype.equalsApprox=w.prototype.tf=function(a){return H.I(this.x,a.x)&&H.I(this.y,a.y)};w.prototype.add=w.prototype.add=function(a){e&&t.l(a,w,w,"add:p");t.L(this);this.x+=a.x;this.y+=a.y;return this};w.prototype.subtract=w.prototype.Tt=function(a){e&&t.l(a,w,w,"subtract:p");t.L(this);this.x-=a.x;this.y-=a.y;return this};
  w.prototype.offset=w.prototype.offset=function(a,b){e&&(t.q(a,w,"offset:dx"),t.q(b,w,"offset:dy"));t.L(this);this.x+=a;this.y+=b;return this};w.prototype.rotate=w.prototype.rotate=function(a){e&&t.q(a,w,"rotate:angle");t.L(this);if(0===a)return this;var b=this.x,c=this.y;if(0===b&&0===c)return this;var d;90===a?(a=0,d=1):180===a?(a=-1,d=0):270===a?(a=0,d=-1):(d=a*Math.PI/180,a=Math.cos(d),d=Math.sin(d));this.x=a*b-d*c;this.y=d*b+a*c;return this};
  w.prototype.scale=w.prototype.scale=function(a,b){e&&(t.q(a,w,"scale:sx"),t.q(b,w,"scale:sy"));this.x*=a;this.y*=b;return this};w.prototype.distanceSquaredPoint=w.prototype.Zj=function(a){e&&t.l(a,w,w,"distanceSquaredPoint:p");var b=a.x-this.x;a=a.y-this.y;return b*b+a*a};w.prototype.distanceSquared=w.prototype.Ys=function(a,b){e&&(t.q(a,w,"distanceSquared:px"),t.q(b,w,"distanceSquared:py"));var c=a-this.x,d=b-this.y;return c*c+d*d};
  w.prototype.normalize=w.prototype.normalize=function(){t.L(this);var a=this.x,b=this.y,c=Math.sqrt(a*a+b*b);0<c&&(this.x=a/c,this.y=b/c);return this};w.prototype.directionPoint=w.prototype.$i=function(a){e&&t.l(a,w,w,"directionPoint:p");return Oa(a.x-this.x,a.y-this.y)};w.prototype.direction=w.prototype.direction=function(a,b){e&&(t.q(a,w,"direction:px"),t.q(b,w,"direction:py"));return Oa(a-this.x,b-this.y)};
  function Oa(a,b){if(0===a)return 0<b?90:0>b?270:0;if(0===b)return 0<a?0:180;if(isNaN(a)||isNaN(b))return 0;var c=180*Math.atan(Math.abs(b/a))/Math.PI;0>a?c=0>b?c+180:180-c:0>b&&(c=360-c);return c}w.prototype.projectOntoLineSegment=function(a,b,c,d){e&&(t.q(a,w,"projectOntoLineSegment:px"),t.q(b,w,"projectOntoLineSegment:py"),t.q(c,w,"projectOntoLineSegment:qx"),t.q(d,w,"projectOntoLineSegment:qy"));H.cn(a,b,c,d,this.x,this.y,this);return this};
  w.prototype.projectOntoLineSegmentPoint=function(a,b){e&&(t.l(a,w,w,"projectOntoLineSegmentPoint:p"),t.l(b,w,w,"projectOntoLineSegmentPoint:q"));H.cn(a.x,a.y,b.x,b.y,this.x,this.y,this);return this};w.prototype.snapToGrid=function(a,b,c,d){e&&(t.q(a,w,"snapToGrid:originx"),t.q(b,w,"snapToGrid:originy"),t.q(c,w,"snapToGrid:cellwidth"),t.q(d,w,"snapToGrid:cellheight"));H.ct(this.x,this.y,a,b,c,d,this);return this};
  w.prototype.snapToGridPoint=function(a,b){e&&(t.l(a,w,w,"snapToGridPoint:p"),t.l(b,ga,w,"snapToGridPoint:q"));H.ct(this.x,this.y,a.x,a.y,b.width,b.height,this);return this};w.prototype.setRectSpot=w.prototype.Ot=function(a,b){e&&(t.l(a,x,w,"setRectSpot:r"),t.l(b,I,w,"setRectSpot:spot"));t.L(this);this.x=a.x+b.x*a.width+b.offsetX;this.y=a.y+b.y*a.height+b.offsetY;return this};
  w.prototype.setSpot=w.prototype.Pt=function(a,b,c,d,f){e&&(t.q(a,w,"setSpot:x"),t.q(b,w,"setSpot:y"),t.q(c,w,"setSpot:w"),t.q(d,w,"setSpot:h"),(0>c||0>d)&&t.m("Point.setSpot:Width and height cannot be negative"),t.l(f,I,w,"setSpot:spot"));t.L(this);this.x=a+f.x*c+f.offsetX;this.y=b+f.y*d+f.offsetY;return this};w.prototype.transform=function(a){e&&t.l(a,ha,w,"transform:t");a.Ta(this);return this};function Qa(a,b){e&&t.l(b,ha,w,"transformInverted:t");b.bi(a);return a}var Ra;
  w.distanceLineSegmentSquared=Ra=function(a,b,c,d,f,g){e&&(t.q(a,w,"distanceLineSegmentSquared:px"),t.q(b,w,"distanceLineSegmentSquared:py"),t.q(c,w,"distanceLineSegmentSquared:ax"),t.q(d,w,"distanceLineSegmentSquared:ay"),t.q(f,w,"distanceLineSegmentSquared:bx"),t.q(g,w,"distanceLineSegmentSquared:by"));var h=f-c,k=g-d,l=h*h+k*k;c-=a;d-=b;var m=-c*h-d*k;if(0>=m||m>=l)return h=f-a,k=g-b,Math.min(c*c+d*d,h*h+k*k);a=h*d-k*c;return a*a/l};var Sa;
  w.distanceSquared=Sa=function(a,b,c,d){e&&(t.q(a,w,"distanceSquared:px"),t.q(b,w,"distanceSquared:py"),t.q(c,w,"distanceSquared:qx"),t.q(d,w,"distanceSquared:qy"));a=c-a;b=d-b;return a*a+b*b};var Ua;
  w.direction=Ua=function(a,b,c,d){e&&(t.q(a,w,"direction:px"),t.q(b,w,"direction:py"),t.q(c,w,"direction:qx"),t.q(d,w,"direction:qy"));a=c-a;b=d-b;if(0===a)return 0<b?90:0>b?270:0;if(0===b)return 0<a?0:180;if(isNaN(a)||isNaN(b))return 0;d=180*Math.atan(Math.abs(b/a))/Math.PI;0>a?d=0>b?d+180:180-d:0>b&&(d=360-d);return d};w.prototype.isReal=w.prototype.N=function(){return isFinite(this.x)&&isFinite(this.y)};
  function ga(a,b){void 0===a||void 0===b?this.height=this.width=0:!e||"number"===typeof a&&(0<=a||isNaN(a))&&"number"===typeof b&&(0<=b||isNaN(b))?(this.width=a,this.height=b):t.m("Invalid arguments to Size constructor")}t.ga("Size",ga);t.Yh(ga);t.Vd(ga,{width:!0,height:!0});ga.prototype.assign=function(a){this.width=a.width;this.height=a.height};ga.prototype.p=function(a,b){this.width=a;this.height=b};
  ga.prototype.setTo=ga.prototype.Sp=function(a,b){e&&(t.i(a,"number",ga,"setTo:w"),t.i(b,"number",ga,"setTo:h"));0>a&&t.la(a,">= 0",ga,"setTo:w");0>b&&t.la(b,">= 0",ga,"setTo:h");t.L(this);this.width=a;this.height=b;return this};ga.prototype.set=ga.prototype.set=function(a){e&&t.l(a,ga,ga,"set:s");t.L(this);this.width=a.width;this.height=a.height;return this};ga.prototype.copy=function(){var a=new ga;a.width=this.width;a.height=this.height;return a};
  ga.prototype.Ja=function(){this.ob=!0;Object.freeze(this);return this};ga.prototype.Z=function(){return Object.isFrozen(this)?this:this.copy().freeze()};ga.prototype.freeze=function(){this.ob=!0;return this};ga.prototype.La=function(){Object.isFrozen(this)&&t.m("cannot thaw constant: "+this);this.ob=!1;return this};
  ga.parse=function(a){if("string"===typeof a){a=a.split(" ");for(var b=0,c=0;""===a[b];)b++;var d=a[b++];d&&(c=parseFloat(d));for(var f=0;""===a[b];)b++;(d=a[b++])&&(f=parseFloat(d));return new ga(c,f)}return new ga};ga.stringify=function(a){return a instanceof ga?a.width.toString()+" "+a.height.toString():a.toString()};ga.prototype.toString=function(){return"Size("+this.width+","+this.height+")"};
  ga.prototype.equals=ga.prototype.M=function(a){return a instanceof ga?this.width===a.width&&this.height===a.height:!1};ga.prototype.equalTo=function(a,b){return this.width===a&&this.height===b};ga.prototype.equalsApprox=ga.prototype.tf=function(a){return H.I(this.width,a.width)&&H.I(this.height,a.height)};ga.prototype.isReal=ga.prototype.N=function(){return isFinite(this.width)&&isFinite(this.height)};
  function x(a,b,c,d){void 0===a?this.height=this.width=this.y=this.x=0:a instanceof w?b instanceof w?(this.x=Math.min(a.x,b.x),this.y=Math.min(a.y,b.y),this.width=Math.abs(a.x-b.x),this.height=Math.abs(a.y-b.y)):b instanceof ga?(this.x=a.x,this.y=a.y,this.width=b.width,this.height=b.height):t.m("Incorrect arguments supplied"):!e||"number"===typeof a&&"number"===typeof b&&"number"===typeof c&&(0<=c||isNaN(c))&&"number"===typeof d&&(0<=d||isNaN(d))?(this.x=a,this.y=b,this.width=c,this.height=d):t.m("Invalid arguments to Rect constructor")}
  t.ga("Rect",x);t.Yh(x);t.Vd(x,{x:!0,y:!0,width:!0,height:!0});x.prototype.assign=function(a){this.x=a.x;this.y=a.y;this.width=a.width;this.height=a.height};x.prototype.p=function(a,b,c,d){this.x=a;this.y=b;this.width=c;this.height=d};function Va(a,b,c){a.width=b;a.height=c}
  x.prototype.setTo=x.prototype.Sp=function(a,b,c,d){e&&(t.i(a,"number",x,"setTo:x"),t.i(b,"number",x,"setTo:y"),t.i(c,"number",x,"setTo:w"),t.i(d,"number",x,"setTo:h"));0>c&&t.la(c,">= 0",x,"setTo:w");0>d&&t.la(d,">= 0",x,"setTo:h");t.L(this);this.x=a;this.y=b;this.width=c;this.height=d;return this};x.prototype.set=x.prototype.set=function(a){e&&t.l(a,x,x,"set:r");t.L(this);this.x=a.x;this.y=a.y;this.width=a.width;this.height=a.height;return this};
  x.prototype.setPoint=x.prototype.Ef=function(a){e&&t.l(a,w,x,"setPoint:p");t.L(this);this.x=a.x;this.y=a.y;return this};x.prototype.setSize=function(a){e&&t.l(a,ga,x,"setSize:s");t.L(this);this.width=a.width;this.height=a.height;return this};x.prototype.copy=function(){var a=new x;a.x=this.x;a.y=this.y;a.width=this.width;a.height=this.height;return a};x.prototype.Ja=function(){this.ob=!0;Object.freeze(this);return this};x.prototype.Z=function(){return Object.isFrozen(this)?this:this.copy().freeze()};
  x.prototype.freeze=function(){this.ob=!0;return this};x.prototype.La=function(){Object.isFrozen(this)&&t.m("cannot thaw constant: "+this);this.ob=!1;return this};x.parse=function(a){if("string"===typeof a){a=a.split(" ");for(var b=0,c=0;""===a[b];)b++;var d=a[b++];d&&(c=parseFloat(d));for(var f=0;""===a[b];)b++;(d=a[b++])&&(f=parseFloat(d));for(var g=0;""===a[b];)b++;(d=a[b++])&&(g=parseFloat(d));for(var h=0;""===a[b];)b++;(d=a[b++])&&(h=parseFloat(d));return new x(c,f,g,h)}return new x};
  x.stringify=function(a){return a instanceof x?a.x.toString()+" "+a.y.toString()+" "+a.width.toString()+" "+a.height.toString():a.toString()};x.prototype.toString=function(){return"Rect("+this.x+","+this.y+","+this.width+","+this.height+")"};x.prototype.equals=x.prototype.M=function(a){return a instanceof x?this.x===a.x&&this.y===a.y&&this.width===a.width&&this.height===a.height:!1};x.prototype.equalTo=function(a,b,c,d){return this.x===a&&this.y===b&&this.width===c&&this.height===d};
  x.prototype.equalsApprox=x.prototype.tf=function(a){return H.I(this.x,a.x)&&H.I(this.y,a.y)&&H.I(this.width,a.width)&&H.I(this.height,a.height)};x.prototype.containsPoint=x.prototype.Ga=function(a){e&&t.l(a,w,x,"containsPoint:p");return this.x<=a.x&&this.x+this.width>=a.x&&this.y<=a.y&&this.y+this.height>=a.y};x.prototype.containsRect=x.prototype.Wj=function(a){e&&t.l(a,x,x,"containsRect:r");return this.x<=a.x&&a.x+a.width<=this.x+this.width&&this.y<=a.y&&a.y+a.height<=this.y+this.height};
  x.prototype.contains=x.prototype.contains=function(a,b,c,d){e?(t.q(a,x,"contains:x"),t.q(b,x,"contains:y"),void 0===c?c=0:t.q(c,x,"contains:w"),void 0===d?d=0:t.q(d,x,"contains:h"),(0>c||0>d)&&t.m("Rect.contains:Width and height cannot be negative")):(void 0===c&&(c=0),void 0===d&&(d=0));return this.x<=a&&a+c<=this.x+this.width&&this.y<=b&&b+d<=this.y+this.height};x.prototype.reset=function(){t.L(this);this.height=this.width=this.y=this.x=0};
  x.prototype.offset=x.prototype.offset=function(a,b){e&&(t.q(a,x,"offset:dx"),t.q(b,x,"offset:dy"));t.L(this);this.x+=a;this.y+=b;return this};x.prototype.inflate=x.prototype.Sf=function(a,b){e&&(t.q(a,x,"inflate:w"),t.q(b,x,"inflate:h"));return Wa(this,b,a,b,a)};x.prototype.addMargin=x.prototype.aw=function(a){e&&t.l(a,ab,x,"addMargin:m");return Wa(this,a.top,a.right,a.bottom,a.left)};
  x.prototype.subtractMargin=x.prototype.ZJ=function(a){e&&t.l(a,ab,x,"subtractMargin:m");return Wa(this,-a.top,-a.right,-a.bottom,-a.left)};x.prototype.grow=function(a,b,c,d){e&&(t.q(a,x,"grow:t"),t.q(b,x,"grow:r"),t.q(c,x,"grow:b"),t.q(d,x,"grow:l"));return Wa(this,a,b,c,d)};function Wa(a,b,c,d,f){t.L(a);var g=a.width;c+f<=-g?(a.x+=g/2,a.width=0):(a.x-=f,a.width+=c+f);c=a.height;b+d<=-c?(a.y+=c/2,a.height=0):(a.y-=b,a.height+=b+d);return a}
  x.prototype.intersectRect=function(a){e&&t.l(a,x,x,"intersectRect:r");return cb(this,a.x,a.y,a.width,a.height)};x.prototype.intersect=function(a,b,c,d){e&&(t.q(a,x,"intersect:x"),t.q(b,x,"intersect:y"),t.q(c,x,"intersect:w"),t.q(d,x,"intersect:h"),(0>c||0>d)&&t.m("Rect.intersect:Width and height cannot be negative"));return cb(this,a,b,c,d)};
  function cb(a,b,c,d,f){t.L(a);var g=Math.max(a.x,b),h=Math.max(a.y,c);b=Math.min(a.x+a.width,b+d);c=Math.min(a.y+a.height,c+f);a.x=g;a.y=h;a.width=Math.max(0,b-g);a.height=Math.max(0,c-h);return a}x.prototype.intersectsRect=x.prototype.Tf=function(a){e&&t.l(a,x,x,"intersectsRect:r");return this.aF(a.x,a.y,a.width,a.height)};
  x.prototype.intersects=x.prototype.aF=function(a,b,c,d){e&&(t.q(a,x,"intersects:x"),t.q(b,x,"intersects:y"),t.q(a,x,"intersects:w"),t.q(b,x,"intersects:h"),(0>c||0>d)&&t.m("Rect.intersects:Width and height cannot be negative"));var f=this.width,g=this.x;if(Infinity!==f&&Infinity!==c&&(f+=g,c+=a,isNaN(c)||isNaN(f)||g>c||a>f))return!1;a=this.height;c=this.y;return Infinity!==a&&Infinity!==d&&(a+=c,d+=b,isNaN(d)||isNaN(a)||c>d||b>a)?!1:!0};
  function eb(a,b){var c=a.width,d=b.width+10+10,f=a.x,g=b.x-10;if(f>d+g||g>c+f)return!1;c=a.height;d=b.height+10+10;f=a.y;g=b.y-10;return f>d+g||g>c+f?!1:!0}x.prototype.unionPoint=x.prototype.kj=function(a){e&&t.l(a,w,x,"unionPoint:p");return hb(this,a.x,a.y,0,0)};x.prototype.unionRect=x.prototype.lj=function(a){e&&t.l(a,x,x,"unionRect:r");return hb(this,a.x,a.y,a.width,a.height)};
  x.prototype.union=x.prototype.PG=function(a,b,c,d){t.L(this);e?(t.q(a,x,"union:x"),t.q(b,x,"union:y"),void 0===c?c=0:t.q(c,x,"union:w"),void 0===d?d=0:t.q(d,x,"union:h"),(0>c||0>d)&&t.m("Rect.union:Width and height cannot be negative")):(void 0===c&&(c=0),void 0===d&&(d=0));return hb(this,a,b,c,d)};function hb(a,b,c,d,f){var g=Math.min(a.x,b),h=Math.min(a.y,c);b=Math.max(a.x+a.width,b+d);c=Math.max(a.y+a.height,c+f);a.x=g;a.y=h;a.width=b-g;a.height=c-h;return a}
  x.prototype.setSpot=x.prototype.Pt=function(a,b,c){e&&(t.q(a,x,"setSpot:x"),t.q(b,x,"setSpot:y"),t.l(c,I,x,"setSpot:spot"));t.L(this);this.x=a-c.offsetX-c.x*this.width;this.y=b-c.offsetY-c.y*this.height;return this};var mb;
  x.contains=mb=function(a,b,c,d,f,g,h,k){e?(t.q(a,x,"contains:rx"),t.q(b,x,"contains:ry"),t.q(c,x,"contains:rw"),t.q(d,x,"contains:rh"),t.q(f,x,"contains:x"),t.q(g,x,"contains:y"),void 0===h?h=0:t.q(h,x,"contains:w"),void 0===k?k=0:t.q(k,x,"contains:h"),(0>c||0>d||0>h||0>k)&&t.m("Rect.contains:Width and height cannot be negative")):(void 0===h&&(h=0),void 0===k&&(k=0));return a<=f&&f+h<=a+c&&b<=g&&g+k<=b+d};
  x.intersects=function(a,b,c,d,f,g,h,k){e&&(t.q(a,x,"intersects:rx"),t.q(b,x,"intersects:ry"),t.q(c,x,"intersects:rw"),t.q(d,x,"intersects:rh"),t.q(f,x,"intersects:x"),t.q(g,x,"intersects:y"),t.q(h,x,"intersects:w"),t.q(k,x,"intersects:h"),(0>c||0>d||0>h||0>k)&&t.m("Rect.intersects:Width and height cannot be negative"));c+=a;h+=f;if(a>h||f>c)return!1;a=d+b;k+=g;return b>k||g>a?!1:!0};t.g(x,"left",x.prototype.left);
  t.defineProperty(x,{left:"left"},function(){return this.x},function(a){t.L(this,a);e&&t.i(a,"number",x,"left");this.x=a});t.g(x,"top",x.prototype.top);t.defineProperty(x,{top:"top"},function(){return this.y},function(a){t.L(this,a);e&&t.i(a,"number",x,"top");this.y=a});t.g(x,"right",x.prototype.right);t.defineProperty(x,{right:"right"},function(){return this.x+this.width},function(a){t.L(this,a);e&&t.q(a,x,"right");this.x+=a-(this.x+this.width)});t.g(x,"bottom",x.prototype.bottom);
  t.defineProperty(x,{bottom:"bottom"},function(){return this.y+this.height},function(a){t.L(this,a);e&&t.q(a,x,"top");this.y+=a-(this.y+this.height)});t.g(x,"position",x.prototype.position);t.defineProperty(x,{position:"position"},function(){return new w(this.x,this.y)},function(a){t.L(this,a);e&&t.l(a,w,x,"position");this.x=a.x;this.y=a.y});t.g(x,"size",x.prototype.size);
  t.defineProperty(x,{size:"size"},function(){return new ga(this.width,this.height)},function(a){t.L(this,a);e&&t.l(a,ga,x,"size");this.width=a.width;this.height=a.height});t.g(x,"center",x.prototype.Tz);t.defineProperty(x,{Tz:"center"},function(){return new w(this.x+this.width/2,this.y+this.height/2)},function(a){t.L(this,a);e&&t.l(a,w,x,"center");this.x=a.x-this.width/2;this.y=a.y-this.height/2});t.g(x,"centerX",x.prototype.Da);
  t.defineProperty(x,{Da:"centerX"},function(){return this.x+this.width/2},function(a){t.L(this,a);e&&t.q(a,x,"centerX");this.x=a-this.width/2});t.g(x,"centerY",x.prototype.Pa);t.defineProperty(x,{Pa:"centerY"},function(){return this.y+this.height/2},function(a){t.L(this,a);e&&t.q(a,x,"centerY");this.y=a-this.height/2});x.prototype.isReal=x.prototype.N=function(){return isFinite(this.x)&&isFinite(this.y)&&isFinite(this.width)&&isFinite(this.height)};
  x.prototype.isEmpty=function(){return 0===this.width&&0===this.height};function ab(a,b,c,d){void 0===a?this.left=this.bottom=this.right=this.top=0:void 0===b?this.left=this.bottom=this.right=this.top=a:void 0===c?(d=b,this.top=a,this.right=b,this.bottom=a,this.left=d):void 0!==d?(this.top=a,this.right=b,this.bottom=c,this.left=d):t.m("Invalid arguments to Margin constructor")}t.ga("Margin",ab);t.Yh(ab);t.Vd(ab,{top:!0,right:!0,bottom:!0,left:!0});
  ab.prototype.assign=function(a){this.top=a.top;this.right=a.right;this.bottom=a.bottom;this.left=a.left};ab.prototype.setTo=ab.prototype.Sp=function(a,b,c,d){e&&(t.i(a,"number",ab,"setTo:t"),t.i(b,"number",ab,"setTo:r"),t.i(c,"number",ab,"setTo:b"),t.i(d,"number",ab,"setTo:l"));t.L(this);this.top=a;this.right=b;this.bottom=c;this.left=d;return this};
  ab.prototype.set=ab.prototype.set=function(a){e&&t.l(a,ab,ab,"assign:m");t.L(this);this.top=a.top;this.right=a.right;this.bottom=a.bottom;this.left=a.left;return this};ab.prototype.copy=function(){var a=new ab;a.top=this.top;a.right=this.right;a.bottom=this.bottom;a.left=this.left;return a};ab.prototype.Ja=function(){this.ob=!0;Object.freeze(this);return this};ab.prototype.Z=function(){return Object.isFrozen(this)?this:this.copy().freeze()};ab.prototype.freeze=function(){this.ob=!0;return this};
  ab.prototype.La=function(){Object.isFrozen(this)&&t.m("cannot thaw constant: "+this);this.ob=!1;return this};ab.parse=function(a){if("string"===typeof a){a=a.split(" ");for(var b=0,c=0;""===a[b];)b++;var d=a[b++];d&&(c=parseFloat(d));for(var f=void 0;""===a[b];)b++;(d=a[b++])&&(f=parseFloat(d));for(var g=void 0;""===a[b];)b++;(d=a[b++])&&(g=parseFloat(d));for(var h=void 0;""===a[b];)b++;(d=a[b++])&&(h=parseFloat(d));return new ab(c,f,g,h)}return new ab};
  ab.stringify=function(a){return a instanceof ab?a.top.toString()+" "+a.right.toString()+" "+a.bottom.toString()+" "+a.left.toString():a.toString()};ab.prototype.toString=function(){return"Margin("+this.top+","+this.right+","+this.bottom+","+this.left+")"};ab.prototype.equals=ab.prototype.M=function(a){return a instanceof ab?this.top===a.top&&this.right===a.right&&this.bottom===a.bottom&&this.left===a.left:!1};
  ab.prototype.equalTo=function(a,b,c,d){return this.top===a&&this.right===b&&this.bottom===c&&this.left===d};ab.prototype.equalsApprox=ab.prototype.tf=function(a){return H.I(this.top,a.top)&&H.I(this.right,a.right)&&H.I(this.bottom,a.bottom)&&H.I(this.left,a.left)};ab.prototype.isReal=ab.prototype.N=function(){return isFinite(this.top)&&isFinite(this.right)&&isFinite(this.bottom)&&isFinite(this.left)};function ha(){this.m11=1;this.m21=this.m12=0;this.m22=1;this.dy=this.dx=0}t.Yh(ha);
  t.Vd(ha,{m11:!0,m12:!0,m21:!0,m22:!0,dx:!0,dy:!0});ha.prototype.set=ha.prototype.set=function(a){e&&t.l(a,ha,ha,"set:t");this.m11=a.m11;this.m12=a.m12;this.m21=a.m21;this.m22=a.m22;this.dx=a.dx;this.dy=a.dy;return this};ha.prototype.copy=function(){var a=new ha;a.m11=this.m11;a.m12=this.m12;a.m21=this.m21;a.m22=this.m22;a.dx=this.dx;a.dy=this.dy;return a};ha.prototype.toString=function(){return"Transform("+this.m11+","+this.m12+","+this.m21+","+this.m22+","+this.dx+","+this.dy+")"};
  ha.prototype.equals=ha.prototype.M=function(a){return a instanceof ha?this.m11===a.m11&&this.m12===a.m12&&this.m21===a.m21&&this.m22===a.m22&&this.dx===a.dx&&this.dy===a.dy:!1};ha.prototype.reset=ha.prototype.reset=function(){this.m11=1;this.m21=this.m12=0;this.m22=1;this.dy=this.dx=0};
  ha.prototype.multiply=ha.prototype.multiply=function(a){e&&t.l(a,ha,ha,"multiply:matrix");var b=this.m12*a.m11+this.m22*a.m12,c=this.m11*a.m21+this.m21*a.m22,d=this.m12*a.m21+this.m22*a.m22,f=this.m11*a.dx+this.m21*a.dy+this.dx,g=this.m12*a.dx+this.m22*a.dy+this.dy;this.m11=this.m11*a.m11+this.m21*a.m12;this.m12=b;this.m21=c;this.m22=d;this.dx=f;this.dy=g;return this};
  ha.prototype.multiplyInverted=ha.prototype.EF=function(a){e&&t.l(a,ha,ha,"multiplyInverted:matrix");var b=1/(a.m11*a.m22-a.m12*a.m21),c=a.m22*b,d=-a.m12*b,f=-a.m21*b,g=a.m11*b,h=b*(a.m21*a.dy-a.m22*a.dx),k=b*(a.m12*a.dx-a.m11*a.dy);a=this.m12*c+this.m22*d;b=this.m11*f+this.m21*g;f=this.m12*f+this.m22*g;g=this.m11*h+this.m21*k+this.dx;h=this.m12*h+this.m22*k+this.dy;this.m11=this.m11*c+this.m21*d;this.m12=a;this.m21=b;this.m22=f;this.dx=g;this.dy=h;return this};
  ha.prototype.invert=ha.prototype.oA=function(){var a=1/(this.m11*this.m22-this.m12*this.m21),b=-this.m12*a,c=-this.m21*a,d=this.m11*a,f=a*(this.m21*this.dy-this.m22*this.dx),g=a*(this.m12*this.dx-this.m11*this.dy);this.m11=this.m22*a;this.m12=b;this.m21=c;this.m22=d;this.dx=f;this.dy=g};
  ha.prototype.rotate=ha.prototype.rotate=function(a,b,c){e&&(t.q(a,ha,"rotate:angle"),t.q(b,ha,"rotate:rx"),t.q(c,ha,"rotate:ry"));this.translate(b,c);var d;0===a?(a=1,d=0):90===a?(a=0,d=1):180===a?(a=-1,d=0):270===a?(a=0,d=-1):(d=a*Math.PI/180,a=Math.cos(d),d=Math.sin(d));var f=this.m12*a+this.m22*d,g=this.m11*-d+this.m21*a,h=this.m12*-d+this.m22*a;this.m11=this.m11*a+this.m21*d;this.m12=f;this.m21=g;this.m22=h;this.translate(-b,-c)};
  ha.prototype.translate=ha.prototype.translate=function(a,b){e&&(t.q(a,ha,"translate:x"),t.q(b,ha,"translate:y"));this.dx+=this.m11*a+this.m21*b;this.dy+=this.m12*a+this.m22*b};ha.prototype.scale=ha.prototype.scale=function(a,b){void 0===b&&(b=a);e&&(t.q(a,ha,"translate:sx"),t.q(b,ha,"translate:sy"));this.m11*=a;this.m12*=a;this.m21*=b;this.m22*=b};
  ha.prototype.transformPoint=ha.prototype.Ta=function(a){e&&t.l(a,w,ha,"transformPoint:p");var b=a.x,c=a.y;a.x=b*this.m11+c*this.m21+this.dx;a.y=b*this.m12+c*this.m22+this.dy;return a};ha.prototype.invertedTransformPoint=ha.prototype.bi=function(a){e&&t.l(a,w,ha,"invertedTransformPoint:p");var b=1/(this.m11*this.m22-this.m12*this.m21),c=-this.m12*b,d=this.m11*b,f=b*(this.m12*this.dx-this.m11*this.dy),g=a.x,h=a.y;a.x=g*this.m22*b+h*-this.m21*b+b*(this.m21*this.dy-this.m22*this.dx);a.y=g*c+h*d+f;return a};
  ha.prototype.transformRect=ha.prototype.KG=function(a){e&&t.l(a,x,ha,"transformRect:rect");var b=a.x,c=a.y,d=b+a.width,f=c+a.height,g=this.m11,h=this.m12,k=this.m21,l=this.m22,m=this.dx,n=this.dy,p=b*g+c*k+m,q=b*h+c*l+n,r=d*g+c*k+m,c=d*h+c*l+n,s=b*g+f*k+m,b=b*h+f*l+n,g=d*g+f*k+m,d=d*h+f*l+n,f=p,h=q,p=Math.min(p,r),f=Math.max(f,r),h=Math.min(h,c),q=Math.max(q,c),p=Math.min(p,s),f=Math.max(f,s),h=Math.min(h,b),q=Math.max(q,b),p=Math.min(p,g),f=Math.max(f,g),h=Math.min(h,d),q=Math.max(q,d);a.x=p;a.y=
  h;a.width=f-p;a.height=q-h};ha.prototype.isIdentity=ha.prototype.pt=function(){return 1===this.m11&&0===this.m12&&0===this.m21&&1===this.m22&&0===this.dx&&0===this.dy};function I(a,b,c,d){void 0===a?this.offsetY=this.offsetX=this.y=this.x=0:(void 0===b&&(b=0),void 0===c&&(c=0),void 0===d&&(d=0),this.x=a,this.y=b,this.offsetX=c,this.offsetY=d)}t.ga("Spot",I);t.Yh(I);t.Vd(I,{x:!0,y:!0,offsetX:!0,offsetY:!0});I.prototype.assign=function(a){this.x=a.x;this.y=a.y;this.offsetX=a.offsetX;this.offsetY=a.offsetY};
  I.prototype.setTo=I.prototype.Sp=function(a,b,c,d){e&&(ob(a,"setTo:x"),ob(b,"setTo:y"),pb(c,"setTo:offx"),pb(d,"setTo:offy"));t.L(this);this.x=a;this.y=b;this.offsetX=c;this.offsetY=d;return this};I.prototype.set=I.prototype.set=function(a){e&&t.l(a,I,I,"set:s");t.L(this);this.x=a.x;this.y=a.y;this.offsetX=a.offsetX;this.offsetY=a.offsetY;return this};I.prototype.copy=function(){var a=new I;a.x=this.x;a.y=this.y;a.offsetX=this.offsetX;a.offsetY=this.offsetY;return a};
  I.prototype.Ja=function(){this.ob=!0;Object.freeze(this);return this};I.prototype.Z=function(){return Object.isFrozen(this)?this:this.copy().freeze()};I.prototype.freeze=function(){this.ob=!0;return this};I.prototype.La=function(){Object.isFrozen(this)&&t.m("cannot thaw constant: "+this);this.ob=!1;return this};function ub(a,b){a.x=NaN;a.y=NaN;a.offsetX=b;return a}function ob(a,b){(isNaN(a)||1<a||0>a)&&t.la(a,"0 <= "+b+" <= 1",I,b)}
  function pb(a,b){(isNaN(a)||Infinity===a||-Infinity===a)&&t.la(a,"real number, not NaN or Infinity",I,b)}var vb;
  I.parse=vb=function(a){if("string"===typeof a){a=a.trim();if("None"===a)return t.NONE;if("TopLeft"===a)return t.Xx;if("Top"===a||"TopCenter"===a||"MiddleTop"===a)return t.eq;if("TopRight"===a)return t.Zx;if("Left"===a||"LeftCenter"===a||"MiddleLeft"===a)return t.bq;if("Center"===a)return t.Lx;if("Right"===a||"RightCenter"===a||"MiddleRight"===a)return t.cq;if("BottomLeft"===a)return t.Gx;if("Bottom"===a||"BottomCenter"===a||"MiddleBottom"===a)return t.aq;if("BottomRight"===a)return t.Ix;if("TopSide"===
  a)return t.ay;if("LeftSide"===a)return t.Px;if("RightSide"===a)return t.Vx;if("BottomSide"===a)return t.Kx;if("TopBottomSides"===a)return t.Wx;if("LeftRightSides"===a)return t.Ox;if("TopLeftSides"===a)return t.Yx;if("TopRightSides"===a)return t.$x;if("BottomLeftSides"===a)return t.Hx;if("BottomRightSides"===a)return t.Jx;if("NotTopSide"===a)return t.Tx;if("NotLeftSide"===a)return t.Rx;if("NotRightSide"===a)return t.Sx;if("NotBottomSide"===a)return t.Qx;if("AllSides"===a)return t.Fx;if("Default"===
  a)return t.Mx;a=a.split(" ");for(var b=0,c=0;""===a[b];)b++;var d=a[b++];d&&(c=parseFloat(d));for(var f=0;""===a[b];)b++;(d=a[b++])&&(f=parseFloat(d));for(var g=0;""===a[b];)b++;(d=a[b++])&&(g=parseFloat(d));for(var h=0;""===a[b];)b++;(d=a[b++])&&(h=parseFloat(d));return new I(c,f,g,h)}return new I};I.stringify=function(a){return a instanceof I?a.vd()?a.x.toString()+" "+a.y.toString()+" "+a.offsetX.toString()+" "+a.offsetY.toString():a.toString():a.toString()};
  I.prototype.toString=function(){return this.vd()?0===this.offsetX&&0===this.offsetY?"Spot("+this.x+","+this.y+")":"Spot("+this.x+","+this.y+","+this.offsetX+","+this.offsetY+")":this.M(t.NONE)?"None":this.M(t.Xx)?"TopLeft":this.M(t.eq)?"Top":this.M(t.Zx)?"TopRight":this.M(t.bq)?"Left":this.M(t.Lx)?"Center":this.M(t.cq)?"Right":this.M(t.Gx)?"BottomLeft":this.M(t.aq)?"Bottom":this.M(t.Ix)?"BottomRight":this.M(t.ay)?"TopSide":this.M(t.Px)?"LeftSide":this.M(t.Vx)?"RightSide":this.M(t.Kx)?"BottomSide":
  this.M(t.Wx)?"TopBottomSides":this.M(t.Ox)?"LeftRightSides":this.M(t.Yx)?"TopLeftSides":this.M(t.$x)?"TopRightSides":this.M(t.Hx)?"BottomLeftSides":this.M(t.Jx)?"BottomRightSides":this.M(t.Tx)?"NotTopSide":this.M(t.Rx)?"NotLeftSide":this.M(t.Sx)?"NotRightSide":this.M(t.Qx)?"NotBottomSide":this.M(t.Fx)?"AllSides":this.M(t.Mx)?"Default":"None"};
  I.prototype.equals=I.prototype.M=function(a){return a instanceof I?(this.x===a.x||isNaN(this.x)&&isNaN(a.x))&&(this.y===a.y||isNaN(this.y)&&isNaN(a.y))&&this.offsetX===a.offsetX&&this.offsetY===a.offsetY:!1};I.prototype.opposite=function(){return new I(0.5-(this.x-0.5),0.5-(this.y-0.5),-this.offsetX,-this.offsetY)};I.prototype.includesSide=function(a){if(!this.rp()||!a.rp())return!1;a=a.offsetY;return(this.offsetY&a)===a};I.prototype.isSpot=I.prototype.vd=function(){return!isNaN(this.x)&&!isNaN(this.y)};
  I.prototype.isNoSpot=I.prototype.Ge=function(){return isNaN(this.x)||isNaN(this.y)};I.prototype.isSide=I.prototype.rp=function(){return this.Ge()&&1===this.offsetX&&0!==this.offsetY};I.prototype.isDefault=I.prototype.Pc=function(){return isNaN(this.x)&&isNaN(this.y)&&-1===this.offsetX&&0===this.offsetY};t.bd=1;t.Jc=2;t.Tc=4;t.Sc=8;t.NONE=ub(new I(0,0,0,0),0).Ja();t.Mx=ub(new I(0,0,-1,0),-1).Ja();t.Xx=(new I(0,0,0,0)).Ja();t.eq=(new I(0.5,0,0,0)).Ja();t.Zx=(new I(1,0,0,0)).Ja();
  t.bq=(new I(0,0.5,0,0)).Ja();t.Lx=(new I(0.5,0.5,0,0)).Ja();t.cq=(new I(1,0.5,0,0)).Ja();t.Gx=(new I(0,1,0,0)).Ja();t.aq=(new I(0.5,1,0,0)).Ja();t.Ix=(new I(1,1,0,0)).Ja();t.ay=ub(new I(0,0,1,t.bd),1).Ja();t.Px=ub(new I(0,0,1,t.Jc),1).Ja();t.Vx=ub(new I(0,0,1,t.Tc),1).Ja();t.Kx=ub(new I(0,0,1,t.Sc),1).Ja();t.Wx=ub(new I(0,0,1,t.bd|t.Sc),1).Ja();t.Ox=ub(new I(0,0,1,t.Jc|t.Tc),1).Ja();t.Yx=ub(new I(0,0,1,t.bd|t.Jc),1).Ja();t.$x=ub(new I(0,0,1,t.bd|t.Tc),1).Ja();t.Hx=ub(new I(0,0,1,t.Sc|t.Jc),1).Ja();
  t.Jx=ub(new I(0,0,1,t.Sc|t.Tc),1).Ja();t.Tx=ub(new I(0,0,1,t.Jc|t.Tc|t.Sc),1).Ja();t.Rx=ub(new I(0,0,1,t.bd|t.Tc|t.Sc),1).Ja();t.Sx=ub(new I(0,0,1,t.bd|t.Jc|t.Sc),1).Ja();t.Qx=ub(new I(0,0,1,t.bd|t.Jc|t.Tc),1).Ja();t.Fx=ub(new I(0,0,1,t.bd|t.Jc|t.Tc|t.Sc),1).Ja();var wb;I.None=wb=t.NONE;var xb;I.Default=xb=t.Mx;var Eb;I.TopLeft=Eb=t.Xx;var Fb;I.TopCenter=Fb=t.eq;var Gb;I.TopRight=Gb=t.Zx;I.LeftCenter=t.bq;var Kb;I.Center=Kb=t.Lx;I.RightCenter=t.cq;var Lb;I.BottomLeft=Lb=t.Gx;var Mb;
  I.BottomCenter=Mb=t.aq;var Pb;I.BottomRight=Pb=t.Ix;var Qb;I.MiddleTop=Qb=t.eq;var Ub;I.MiddleLeft=Ub=t.bq;var Vb;I.MiddleRight=Vb=t.cq;var Wb;I.MiddleBottom=Wb=t.aq;I.Top=t.eq;var Xb;I.Left=Xb=t.bq;var Yb;I.Right=Yb=t.cq;I.Bottom=t.aq;var $b;I.TopSide=$b=t.ay;var ac;I.LeftSide=ac=t.Px;var bc;I.RightSide=bc=t.Vx;var cc;I.BottomSide=cc=t.Kx;I.TopBottomSides=t.Wx;I.LeftRightSides=t.Ox;I.TopLeftSides=t.Yx;I.TopRightSides=t.$x;I.BottomLeftSides=t.Hx;I.BottomRightSides=t.Jx;I.NotTopSide=t.Tx;
  I.NotLeftSide=t.Rx;I.NotRightSide=t.Sx;I.NotBottomSide=t.Qx;var gc;I.AllSides=gc=t.Fx;function hc(){this.cf=[1,0,0,1,0,0]}hc.prototype.copy=function(){var a=new hc;a.cf[0]=this.cf[0];a.cf[1]=this.cf[1];a.cf[2]=this.cf[2];a.cf[3]=this.cf[3];a.cf[4]=this.cf[4];a.cf[5]=this.cf[5];return a};function mc(a){this.type=a;this.r2=this.y2=this.x2=this.r1=this.y1=this.x1=0;this.ZD=[]}mc.prototype.addColorStop=function(a,b){this.ZD.push({offset:a,color:b})};
  function nc(a,b,c){this.fillStyle="#000000";this.font="10px sans-serif";this.globalAlpha=1;this.lineCap="butt";this.Zw=0;this.lineJoin="miter";this.lineWidth=1;this.miterLimit=10;this.shadowBlur=0;this.shadowColor="rgba(0, 0, 0, 0)";this.shadowOffsetY=this.shadowOffsetX=0;this.strokeStyle="#000000";this.textAlign="start";this.document=b||document;this.yE=c;this.Vw=null;this.path=[];this.Zi=new hc;this.stack=[];this.vf=[];this.rG=this.LE=this.lw=0;this.zw=a;this.uJ="http://www.w3.org/2000/svg";this.width=
  this.zw.width;this.height=this.zw.height;this.zl=oc(this,"svg",{width:this.width+"px",height:this.height+"px",VK:"0 0 "+this.zw.width+" "+this.zw.height});this.zl.setAttributeNS("http://www.w3.org/2000/xmlns/","xmlns","http://www.w3.org/2000/svg");this.zl.setAttributeNS("http://www.w3.org/2000/xmlns/","xmlns:xlink","http://www.w3.org/1999/xlink");rc(this,1,0,0,1,0,0);a=oc(this,"clipPath",{id:"mainClip"});a.appendChild(oc(this,"rect",{x:0,y:0,width:this.width,height:this.height}));this.zl.appendChild(a);
  this.vf[0].setAttributeNS(null,"clip-path","url(#mainClip)")}aa=nc.prototype;aa.arc=function(a,b,c,d,f,g){sc(this,a,b,c,d,f,g)};aa.beginPath=function(){this.path=[]};aa.bezierCurveTo=function(a,b,c,d,f,g){this.path.push(["C",a,b,c,d,f,g])};aa.clearRect=function(){};aa.clip=function(){tc(this,"clipPath",this.path,new hc)};aa.closePath=function(){this.path.push(["z"])};aa.createLinearGradient=function(a,b,c,d){var f=new mc("linear");f.x1=a;f.y1=b;f.x2=c;f.y2=d;return f};aa.createPattern=function(){};
  aa.createRadialGradient=function(a,b,c,d,f,g){var h=new mc("radial");h.x1=a;h.y1=b;h.r1=c;h.x2=d;h.y2=f;h.r2=g;return h};
  aa.drawImage=function(a,b,c,d,f,g,h,k,l){a=[b,c,d,f,g,h,k,l,a];b=this.Zi;f=a[8];c={x:0,y:0,width:f.naturalWidth,height:f.naturalHeight,href:f.src};d="";g=a[6]/a[2];h=a[7]/a[3];if(0!==a[4]||0!==a[5])d+=" translate("+a[4]+", "+a[5]+")";if(1!==g||1!==h)d+=" scale("+g+", "+h+")";if(0!==a[0]||0!==a[1])d+=" translate("+-a[0]+", "+-a[1]+")";if(0!==a[0]||0!==a[1]||a[2]!==f.naturalWidth||a[3]!==f.naturalHeight)f="CLIP"+this.lw,this.lw++,g=oc(this,"clipPath",{id:f}),g.appendChild(oc(this,"rect",{x:a[0],y:a[1],
  width:a[2],height:a[3]})),this.zl.appendChild(g),c["clip-path"]="url(#"+f+")";uc(this,"image",c,b,d);this.addElement("image",c)};aa.fill=function(){tc(this,"fill",this.path,this.Zi)};aa.fillRect=function(a,b,c,d){vc(this,"fill",[a,b,c,d],this.Zi)};aa.fillText=function(a,b,c){a=[a,b,c];b=this.textAlign;"left"===b?b="start":"right"===b?b="end":"center"===b&&(b="middle");b={x:a[1],y:a[2],style:"font: "+this.font,"text-anchor":b};uc(this,"fill",b,this.Zi);this.addElement("text",b,a[0])};
  aa.lineTo=function(a,b){this.path.push(["L",a,b])};aa.moveTo=function(a,b){this.path.push(["M",a,b])};aa.quadraticCurveTo=function(a,b,c,d){this.path.push(["Q",a,b,c,d])};aa.rect=function(a,b,c,d){this.path.push(["M",a,b],["L",a+c,b],["L",a+c,b+d],["L",a,b+d],["z"])};
  aa.restore=function(){this.Zi=this.stack.pop();this.path=this.stack.pop();var a=this.stack.pop();this.fillStyle=a.fillStyle;this.font=a.font;this.globalAlpha=a.globalAlpha;this.lineCap=a.lineCap;this.Zw=a.Zw;this.lineJoin=a.lineJoin;this.lineWidth=a.lineWidth;this.miterLimit=a.miterLimit;this.shadowBlur=a.shadowBlur;this.shadowColor=a.shadowColor;this.shadowOffsetX=a.shadowOffsetX;this.shadowOffsetY=a.shadowOffsetY;this.strokeStyle=a.strokeStyle;this.textAlign=a.textAlign};
  aa.save=function(){this.stack.push({fillStyle:this.fillStyle,font:this.font,globalAlpha:this.globalAlpha,lineCap:this.lineCap,Zw:this.Zw,lineJoin:this.lineJoin,lineWidth:this.lineWidth,miterLimit:this.miterLimit,shadowBlur:this.shadowBlur,shadowColor:this.shadowColor,shadowOffsetX:this.shadowOffsetX,shadowOffsetY:this.shadowOffsetY,strokeStyle:this.strokeStyle,textAlign:this.textAlign});for(var a=[],b=0;b<this.path.length;b++)a.push(this.path[b]);this.stack.push(a);this.stack.push(this.Zi.copy())};
  aa.setTransform=function(a,b,c,d,f,g){1===a&&0===b&&0===c&&1===d&&0===f&&0===g||rc(this,a,b,c,d,f,g)};aa.scale=function(){};aa.stroke=function(){tc(this,"stroke",this.path,this.Zi)};aa.strokeRect=function(a,b,c,d){vc(this,"stroke",[a,b,c,d],this.Zi)};function oc(a,b,c,d){a=a.document.createElementNS(a.uJ,b);if(c)for(var f in c)a.setAttributeNS("href"===f?"http://www.w3.org/1999/xlink":"",f,c[f]);d&&(a.textContent=d);return a}
  aa.addElement=function(a,b,c){a=oc(this,a,b,c);0<this.vf.length?this.vf[this.vf.length-1].appendChild(a):this.zl.appendChild(a);return this.Vw=a};
  function uc(a,b,c,d,f){1!==a.globalAlpha&&(c.opacity=a.globalAlpha);"fill"==b?(/^rgba\(/.test(a.fillStyle)?(a=/^\s*rgba\s*\(([^,\s]+)\s*,\s*([^,\s]+)\s*,\s*([^,\s]+)\s*,\s*([^,\s]+)\)\s*$/i.exec(a.fillStyle),c.fill="rgb("+a[1]+","+a[2]+","+a[3]+")",c["fill-opacity"]=a[4]):c.fill=a.fillStyle instanceof mc?wc(a,a.fillStyle):a.fillStyle,c.stroke="none"):"stroke"==b&&(c.fill="none",/^rgba\(/.test(a.strokeStyle)?(b=/^\s*rgba\s*\(([^,\s]+)\s*,\s*([^,\s]+)\s*,\s*([^,\s]+)\s*,\s*([^,\s]+)\)\s*$/i.exec(a.strokeStyle),
  c.stroke="rgb("+b[1]+","+b[2]+","+b[3]+")",c["stroke-opacity"]=b[4]):c.stroke=a.strokeStyle instanceof mc?wc(a,a.strokeStyle):a.strokeStyle,c["stroke-width"]=a.lineWidth,c["stroke-linecap"]=a.lineCap,c["stroke-linejoin"]=a.lineJoin,c["stroke-miterlimit"]=a.miterLimit);d=d.cf;d="matrix("+d[0]+", "+d[1]+", "+d[2]+", "+d[3]+", "+d[4]+", "+d[5]+")";void 0!==f&&(d+=f);c.transform=d}
  function wc(a,b){var c="GRAD"+a.LE;a.LE++;var d;if("linear"===b.type)d={x1:b.x1,x2:b.x2,y1:b.y1,y2:b.y2,id:c,gradientUnits:"userSpaceOnUse"},d=oc(a,"linearGradient",d);else if("radial"===b.type)d={x1:b.x1,x2:b.x2,y1:b.y1,y2:b.y2,r1:b.r1,r2:b.r2,id:c},d=oc(a,"radialGradient",d);else throw Error("invalid gradient");for(var f=b.ZD,g=f.length,h=[],k=0;k<g;k++){var l=f[k],m=l.color,l={offset:l.offset,"stop-color":m};/^rgba\(/.test(m)&&(m=/^\s*rgba\s*\(([^,\s]+)\s*,\s*([^,\s]+)\s*,\s*([^,\s]+)\s*,\s*([^,\s]+)\)\s*$/i.exec(m),
  l["stop-color"]="rgb("+m[1]+","+m[2]+","+m[3]+")",l["stop-opacity"]=m[4]);h.push(l)}h.sort(function(a,b){return a.offset>b.offset?1:-1});for(k=0;k<g;k++)d.appendChild(oc(a,"stop",h[k]));a.zl.appendChild(d);return"url(#"+c+")"}function vc(a,b,c,d){c={x:c[0],y:c[1],width:c[2],height:c[3]};uc(a,b,c,d);a.addElement("rect",c)}
  function tc(a,b,c,d){for(var f=[],g=0;g<c.length;g++){var h=Array.prototype.slice.call(c[g]),k=[h.shift()];if("A"==k[0])k.push(h.shift()+","+h.shift(),h.shift(),h.shift()+","+h.shift(),h.shift()+","+h.shift());else for(;h.length;)k.push(h.shift()+","+h.shift());f.push(k.join(" "))}c={d:f.join(" ")};uc(a,b,c,d);"clipPath"===b?(b="CLIP"+a.lw,a.lw++,d=oc(a,"clipPath",{id:b}),d.appendChild(oc(a,"path",c)),a.zl.appendChild(d),0<a.vf.length&&a.vf[a.vf.length-1].setAttributeNS(null,"clip-path","url(#"+b+
  ")")):a.addElement("path",c)}function sc(a,b,c,d,f,g,h){var k=Math.abs(f-g);if(f!=g){var l=b+d*Math.cos(g);g=c+d*Math.sin(g);k>=2*Math.PI?(sc(a,b,c,d,f,f+Math.PI,h),sc(a,b,c,d,f+Math.PI,f+2*Math.PI,h),a.path.push(["M",l,g])):(b+=d*Math.cos(f),c+=d*Math.sin(f),k=180*k/Math.PI,f=h?0:1,h=180<=k==!!h?0:1,0!==a.path.length?a.path.push(["L",b,c]):a.path.push(["M",b,c]),a.path.push(["A",d,d,k,h,f,l,g]))}}
  function rc(a,b,c,d,f,g,h){var k=new hc;k.cf=[b,c,d,f,g,h];b={};uc(a,"g",b,k);k=a.addElement("g",b);a.vf.push(k)}
  aa.bb=function(){var a="SHADOW"+this.rG;this.rG++;var b=this.addElement("filter",{id:a,width:"250%",height:"250%"},null),c,d,f,g,h;if(0!==this.shadowOffsetX||0!==this.shadowOffsetY)c=oc(this,"feGaussianBlur",{"in":"SourceAlpha",result:"blur",SK:this.shadowBlur/2}),d=oc(this,"feFlood",{"in":"blur",result:"flood","flood-color":this.shadowColor}),f=oc(this,"feComposite",{"in":"flood",in2:"blur",operator:"in",result:"comp"}),g=oc(this,"feOffset",{"in":"comp",result:"offsetBlur",dx:this.shadowOffsetX,
  dy:this.shadowOffsetY}),h=oc(this,"feMerge",{}),h.appendChild(oc(this,"feMergeNode",{"in":"offsetBlur"})),h.appendChild(oc(this,"feMergeNode",{"in":"SourceGraphic"})),b.appendChild(c),b.appendChild(d),b.appendChild(f),b.appendChild(g),b.appendChild(h);0<this.vf.length&&this.vf[this.vf.length-1].setAttributeNS(null,"filter","url(#"+a+")")};
  var H={va:4*((Math.sqrt(2)-1)/3),nj:(new w(0,0)).Ja(),hH:(new x(0,0,0,0)).Ja(),fq:(new ab(0,0,0,0)).Ja(),fH:(new ab(2,2,2,2)).Ja(),gH:(new ga(Infinity,Infinity)).Ja(),dH:(new w(-Infinity,-Infinity)).Ja(),cH:(new w(Infinity,Infinity)).Ja(),gq:(new ga(0,0)).Ja(),Ux:(new ga(1,1)).Ja(),dq:(new ga(6,6)).Ja(),Nx:(new ga(8,8)).Ja(),eH:(new w(NaN,NaN)).Ja(),yB:null,sqrt:function(a){if(0>=a)return 0;var b=H.yB;if(null===b){for(var b=[],c=0;2E3>=c;c++)b[c]=Math.sqrt(c);H.yB=b}return 1>a?(c=1/a,2E3>=c?1/b[c|
  0]:Math.sqrt(a)):2E3>=a?b[a|0]:Math.sqrt(a)},I:function(a,b){var c=a-b;return 0.5>c&&-0.5<c},nb:function(a,b){var c=a-b;return 5E-8>c&&-5E-8<c},Md:function(a,b,c,d,f,g,h){0>=f&&(f=1E-6);var k,l,m,n;a<c?(l=a,k=c):(l=c,k=a);b<d?(n=b,m=d):(n=d,m=b);if(a===c)return n<=h&&h<=m&&a-f<=g&&g<=a+f;if(b===d)return l<=g&&g<=k&&b-f<=h&&h<=b+f;k+=f;l-=f;if(l<=g&&g<=k&&(m+=f,n-=f,n<=h&&h<=m))if(k-l>m-n)if(a-c>f||c-a>f){if(g=(d-b)/(c-a)*(g-a)+b,g-f<=h&&h<=g+f)return!0}else return!0;else if(b-d>f||d-b>f){if(h=(c-
  a)/(d-b)*(h-b)+a,h-f<=g&&g<=h+f)return!0}else return!0;return!1},gw:function(a,b,c,d,f,g,h,k,l,m,n,p){if(H.Md(a,b,h,k,p,c,d)&&H.Md(a,b,h,k,p,f,g))return H.Md(a,b,h,k,p,m,n);var q=(a+c)/2,r=(b+d)/2,s=(c+f)/2,u=(d+g)/2;f=(f+h)/2;g=(g+k)/2;d=(q+s)/2;c=(r+u)/2;var s=(s+f)/2,u=(u+g)/2,v=(d+s)/2,D=(c+u)/2;return H.gw(a,b,q,r,d,c,v,D,l,m,n,p)||H.gw(v,D,s,u,f,g,h,k,l,m,n,p)},bI:function(a,b,c,d,f,g,h,k,l){var m=(c+f)/2,n=(d+g)/2;l.x=(((a+c)/2+m)/2+(m+(f+h)/2)/2)/2;l.y=(((b+d)/2+n)/2+(n+(g+k)/2)/2)/2;return l},
  aI:function(a,b,c,d,f,g,h,k){var l=(c+f)/2,m=(d+g)/2;return Ua(((a+c)/2+l)/2,((b+d)/2+m)/2,(l+(f+h)/2)/2,(m+(g+k)/2)/2)},So:function(a,b,c,d,f,g,h,k,l,m){if(H.Md(a,b,h,k,l,c,d)&&H.Md(a,b,h,k,l,f,g))hb(m,a,b,0,0),hb(m,h,k,0,0);else{var n=(a+c)/2,p=(b+d)/2,q=(c+f)/2,r=(d+g)/2;f=(f+h)/2;g=(g+k)/2;d=(n+q)/2;c=(p+r)/2;var q=(q+f)/2,r=(r+g)/2,s=(d+q)/2,u=(c+r)/2;H.So(a,b,n,p,d,c,s,u,l,m);H.So(s,u,q,r,f,g,h,k,l,m)}return m},ze:function(a,b,c,d,f,g,h,k,l,m){if(H.Md(a,b,h,k,l,c,d)&&H.Md(a,b,h,k,l,f,g))0===
  m.length&&m.push([a,b]),m.push([h,k]);else{var n=(a+c)/2,p=(b+d)/2,q=(c+f)/2,r=(d+g)/2;f=(f+h)/2;g=(g+k)/2;d=(n+q)/2;c=(p+r)/2;var q=(q+f)/2,r=(r+g)/2,s=(d+q)/2,u=(c+r)/2;H.ze(a,b,n,p,d,c,s,u,l,m);H.ze(s,u,q,r,f,g,h,k,l,m)}return m},QA:function(a,b,c,d,f,g,h,k,l,m){if(H.Md(a,b,f,g,m,c,d))return H.Md(a,b,f,g,m,k,l);var n=(a+c)/2,p=(b+d)/2;c=(c+f)/2;d=(d+g)/2;var q=(n+c)/2,r=(p+d)/2;return H.QA(a,b,n,p,q,r,h,k,l,m)||H.QA(q,r,c,d,f,g,h,k,l,m)},RK:function(a,b,c,d,f,g,h){h.x=((a+c)/2+(c+f)/2)/2;h.y=((b+
  d)/2+(d+g)/2)/2;return h},PA:function(a,b,c,d,f,g,h,k){if(H.Md(a,b,f,g,h,c,d))hb(k,a,b,0,0),hb(k,f,g,0,0);else{var l=(a+c)/2,m=(b+d)/2;c=(c+f)/2;d=(d+g)/2;var n=(l+c)/2,p=(m+d)/2;H.PA(a,b,l,m,n,p,h,k);H.PA(n,p,c,d,f,g,h,k)}return k},Jp:function(a,b,c,d,f,g,h,k){if(H.Md(a,b,f,g,h,c,d))0===k.length&&k.push([a,b]),k.push([f,g]);else{var l=(a+c)/2,m=(b+d)/2;c=(c+f)/2;d=(d+g)/2;var n=(l+c)/2,p=(m+d)/2;H.Jp(a,b,l,m,n,p,h,k);H.Jp(n,p,c,d,f,g,h,k)}return k},Ps:function(a,b,c,d,f,g,h,k,l,m,n,p,q,r){0>=q&&
  (q=1E-6);if(H.Md(a,b,h,k,q,c,d)&&H.Md(a,b,h,k,q,f,g)){var s=(a-h)*(m-p)-(b-k)*(l-n);if(!s)return!1;q=((a*k-b*h)*(l-n)-(a-h)*(l*p-m*n))/s;s=((a*k-b*h)*(m-p)-(b-k)*(l*p-m*n))/s;if((l>n?l-n:n-l)<(m>p?m-p:p-m)){if(b<k?(l=b,h=k):(l=k,h=b),s<l||s>h)return!1}else if(a<h?l=a:(l=h,h=a),q<l||q>h)return!1;r.x=q;r.y=s;return!0}var s=(a+c)/2,u=(b+d)/2;c=(c+f)/2;d=(d+g)/2;f=(f+h)/2;g=(g+k)/2;var v=(s+c)/2,D=(u+d)/2;c=(c+f)/2;d=(d+g)/2;var A=(v+c)/2,G=(D+d)/2,L=(n-l)*(n-l)+(p-m)*(p-m),N=!1;H.Ps(a,b,s,u,v,D,A,G,
  l,m,n,p,q,r)&&(a=(r.x-l)*(r.x-l)+(r.y-m)*(r.y-m),a<L&&(L=a,N=!0));b=r.x;s=r.y;H.Ps(A,G,c,d,f,g,h,k,l,m,n,p,q,r)&&(a=(r.x-l)*(r.x-l)+(r.y-m)*(r.y-m),a<L?N=!0:(r.x=b,r.y=s));return N},Qs:function(a,b,c,d,f,g,h,k,l,m,n,p,q){var r=0;0>=q&&(q=1E-6);if(H.Md(a,b,h,k,q,c,d)&&H.Md(a,b,h,k,q,f,g)){q=(a-h)*(m-p)-(b-k)*(l-n);if(!q)return r;var s=((a*k-b*h)*(l-n)-(a-h)*(l*p-m*n))/q,u=((a*k-b*h)*(m-p)-(b-k)*(l*p-m*n))/q;if(s>=n)return r;if((l>n?l-n:n-l)<(m>p?m-p:p-m)){if(b<k?(l=b,a=k):(l=k,a=b),u<l||u>a)return r}else if(a<
  h?(l=a,a=h):l=h,s<l||s>a)return r;0<q?r++:0>q&&r--}else{var s=(a+c)/2,u=(b+d)/2,v=(c+f)/2,D=(d+g)/2;f=(f+h)/2;g=(g+k)/2;d=(s+v)/2;c=(u+D)/2;var v=(v+f)/2,D=(D+g)/2,A=(d+v)/2,G=(c+D)/2,r=r+H.Qs(a,b,s,u,d,c,A,G,l,m,n,p,q),r=r+H.Qs(A,G,v,D,f,g,h,k,l,m,n,p,q)}return r},cn:function(a,b,c,d,f,g,h){if(H.nb(a,c)){var k;b<d?(k=b,c=d):(k=d,c=b);d=g;if(d<k)return h.x=a,h.y=k,!1;if(d>c)return h.x=a,h.y=c,!1;h.x=a;h.y=d;return!0}if(H.nb(b,d)){a<c?k=a:(k=c,c=a);d=f;if(d<k)return h.x=k,h.y=b,!1;if(d>c)return h.x=
  c,h.y=b,!1;h.x=d;h.y=b;return!0}k=((a-f)*(a-c)+(b-g)*(b-d))/((c-a)*(c-a)+(d-b)*(d-b));if(-5E-6>k)return h.x=a,h.y=b,!1;if(1.000005<k)return h.x=c,h.y=d,!1;h.x=a+k*(c-a);h.y=b+k*(d-b);return!0},jh:function(a,b,c,d,f,g,h,k,l){if(H.I(a,c)&&H.I(b,d))return l.x=a,l.y=b,!1;if(H.nb(f,h)){if(H.nb(a,c))return H.cn(a,b,c,d,f,g,l),!1;g=(d-b)/(c-a)*(f-a)+b;return H.cn(a,b,c,d,f,g,l)}k=(k-g)/(h-f);if(H.nb(a,c)){g=k*(a-f)+g;b<d?(h=b,c=d):(h=d,c=b);if(g<h)return l.x=a,l.y=h,!1;if(g>c)return l.x=a,l.y=c,!1;l.x=a;
  l.y=g;return!0}h=(d-b)/(c-a);if(H.nb(k,h))return H.cn(a,b,c,d,f,g,l),!1;f=(h*a-k*f+g-b)/(h-k);if(H.nb(h,0)){a<c?h=a:(h=c,c=a);if(f<h)return l.x=h,l.y=b,!1;if(f>c)return l.x=c,l.y=b,!1;l.x=f;l.y=b;return!0}g=h*(f-a)+b;return H.cn(a,b,c,d,f,g,l)},EK:function(a,b,c,d,f){return H.jh(c.x,c.y,d.x,d.y,a.x,a.y,b.x,b.y,f)},AK:function(a,b,c,d,f,g,h,k,l,m){function n(c,d){var f=(c-a)*(c-a)+(d-b)*(d-b);f<p&&(p=f,l.x=c,l.y=d)}var p=Infinity;n(l.x,l.y);var q,r,s,u;f<h?(q=f,r=h):(q=h,r=f);g<k?(s=f,u=h):(s=h,u=
  f);q=(r-q)/2+m;m=(u-s)/2+m;f=(f+h)/2;g=(g+k)/2;if(0===q||0===m)return l;if(0.5>(c>a?c-a:a-c)){q=1-(c-f)*(c-f)/(q*q);if(0>q)return l;q=Math.sqrt(q);d=-m*q+g;n(c,m*q+g);n(c,d)}else{c=(d-b)/(c-a);d=1/(q*q)+c*c/(m*m);k=2*c*(b-c*a)/(m*m)-2*c*g/(m*m)-2*f/(q*q);q=k*k-4*d*(2*c*a*g/(m*m)-2*b*g/(m*m)+g*g/(m*m)+f*f/(q*q)-1+(b-c*a)*(b-c*a)/(m*m));if(0>q)return l;q=Math.sqrt(q);m=(-k+q)/(2*d);n(m,c*m-c*a+b);q=(-k-q)/(2*d);n(q,c*q-c*a+b)}return l},kl:function(a,b,c,d,f,g,h,k,l){var m=1E21,n=a,p=b;if(H.jh(a,b,a,
  d,f,g,h,k,l)){var q=(l.x-f)*(l.x-f)+(l.y-g)*(l.y-g);q<m&&(m=q,n=l.x,p=l.y)}H.jh(c,b,c,d,f,g,h,k,l)&&(q=(l.x-f)*(l.x-f)+(l.y-g)*(l.y-g),q<m&&(m=q,n=l.x,p=l.y));H.jh(a,b,c,b,f,g,h,k,l)&&(q=(l.x-f)*(l.x-f)+(l.y-g)*(l.y-g),q<m&&(m=q,n=l.x,p=l.y));H.jh(a,d,c,d,f,g,h,k,l)&&(q=(l.x-f)*(l.x-f)+(l.y-g)*(l.y-g),q<m&&(m=q,n=l.x,p=l.y));l.x=n;l.y=p;return 1E21>m},Ow:function(a,b,c){var d=b.x,f=b.y,g=c.x,h=c.y,k=a.left,l=a.right,m=a.top,n=a.bottom;return d===g?(f<h?(a=f,g=h):(a=h,g=f),k<=d&&d<=l&&a<=n&&g>=m):
  f===h?(d<g?a=d:(a=g,g=d),m<=f&&f<=n&&a<=l&&g>=k):a.Ga(b)||a.Ga(c)||H.Nw(k,m,l,m,d,f,g,h)||H.Nw(l,m,l,n,d,f,g,h)||H.Nw(l,n,k,n,d,f,g,h)||H.Nw(k,n,k,m,d,f,g,h)?!0:!1},Nw:function(a,b,c,d,f,g,h,k){return 0>=H.nw(a,b,c,d,f,g)*H.nw(a,b,c,d,h,k)&&0>=H.nw(f,g,h,k,a,b)*H.nw(f,g,h,k,c,d)},nw:function(a,b,c,d,f,g){c-=a;d-=b;a=f-a;b=g-b;g=a*d-b*c;0===g&&(g=a*c+b*d,0<g&&(g=(a-c)*c+(b-d)*d,0>g&&(g=0)));return 0>g?-1:0<g?1:0},Ct:function(a){0>a&&(a+=360);360<=a&&(a-=360);return a},iE:function(a,b,c,d,f,g){var h=
  Math.PI;g||(d*=h/180,f*=h/180);g=d<f?1:-1;var k=[],l=h/2,m=d;for(d=Math.min(2*h+1E-5,Math.abs(f-d));1E-5<d;)f=m+g*Math.min(d,l),k.push(H.kI(c,m,f,a,b)),d-=Math.abs(f-m),m=f;return k},kI:function(a,b,c,d,f){var g=(c-b)/2,h=a*Math.cos(g),k=a*Math.sin(g),l=0.5522847498*Math.tan(g),m=h+l*k,h=-k+l*h,k=-h,l=g+b,g=Math.cos(l),l=Math.sin(l);return{x1:d+a*Math.cos(b),y1:f+a*Math.sin(b),x2:d+m*g-h*l,y2:f+m*l+h*g,ge:d+m*g-k*l,he:f+m*l+k*g,Ub:d+a*Math.cos(c),Vb:f+a*Math.sin(c)}},ct:function(a,b,c,d,f,g,h){c=
  Math.floor((a-c)/f)*f+c;d=Math.floor((b-d)/g)*g+d;var k=c;c+f-a<f/2&&(k=c+f);a=d;d+g-b<g/2&&(a=d+g);h.p(k,a);return h},IE:function(a,b){var c=Math.max(a,b),d=Math.min(a,b),f=1,g=1;do f=c%d,c=g=d,d=f;while(0<f);return g},zI:function(a,b,c,d){var f=0>c,g=0>d,h,k;a<b?(h=1,k=0):(h=0,k=1);var l,m;l=0===h?a:b;m=0===h?c:d;if(0===h?f:g)m=-m;h=k;c=0===h?c:d;if(0===h?f:g)c=-c;return H.AI(l,0===h?a:b,m,c,0,0)},AI:function(a,b,c,d,f,g){if(0<d)if(0<c){g=a*a;f=b*b;a*=c;var h=b*d,k=-f+h,l=-f+Math.sqrt(a*a+h*h);
  b=k;for(var m=0;9999999999>m;++m){b=0.5*(k+l);if(b===k||b===l)break;var n=a/(b+g),p=h/(b+f),n=n*n+p*p-1;if(0<n)k=b;else if(0>n)l=b;else break}c=g*c/(b+g)-c;d=f*d/(b+f)-d;c=Math.sqrt(c*c+d*d)}else c=Math.abs(d-b);else d=a*a-b*b,f=a*c,f<d?(d=f/d,f=a*d,g=b*Math.sqrt(Math.abs(1-d*d)),c=f-c,c=Math.sqrt(c*c+g*g)):c=Math.abs(c-a);return c}};
  function zc(a){1<arguments.length&&t.m("Geometry constructor can take at most one optional argument, the Geometry type.");t.Ac(this);void 0===a?a=Ac:e&&t.Aa(a,zc,zc,"constructor:type");this.da=a;this.ub=this.kb=this.xc=this.nc=0;this.Bk=new B(Bc);this.Hu=this.Bk.V;this.su=(new x).freeze();this.Va=!0;this.Mi=Eb;this.Ni=Pb;this.Zn=this.$n=NaN;this.vc=Cc}t.ga("Geometry",zc);t.Yh(zc);
  zc.prototype.copy=function(){var a=new zc;a.da=this.da;a.nc=this.nc;a.xc=this.xc;a.kb=this.kb;a.ub=this.ub;for(var b=this.Bk,c=b.length,d=a.Bk,f=0;f<c;f++){var g=b.n[f].copy();d.add(g)}a.Hu=this.Hu;a.su.assign(this.su);a.Va=this.Va;a.Mi=this.Mi.Z();a.Ni=this.Ni.Z();a.$n=this.$n;a.Zn=this.Zn;a.vc=this.vc;return a};var Dc;zc.Line=Dc=t.w(zc,"Line",0);var Ec;zc.Rectangle=Ec=t.w(zc,"Rectangle",1);var Mc;zc.Ellipse=Mc=t.w(zc,"Ellipse",2);var Ac;zc.Path=Ac=t.w(zc,"Path",3);
  zc.prototype.Ja=function(){this.freeze();Object.freeze(this);return this};zc.prototype.freeze=function(){this.ob=!0;var a=this.Ab;a.freeze();for(var b=a.length,c=0;c<b;c++)a.n[c].freeze();return this};zc.prototype.La=function(){Object.isFrozen(this)&&t.m("cannot thaw constant: "+this);this.ob=!1;var a=this.Ab;a.La();for(var b=a.length,c=0;c<b;c++)a.n[c].La();return this};
  zc.prototype.equalsApprox=zc.prototype.tf=function(a){if(!(a instanceof zc))return!1;if(this.type!==a.type)return this.type===Dc&&a.type===Ac?Nc(this,a):a.type===Dc&&this.type===Ac?Nc(a,this):!1;if(this.type===Ac){var b=this.Ab;a=a.Ab;var c=b.length;if(c!==a.length)return!1;for(var d=0;d<c;d++)if(!b.n[d].tf(a.n[d]))return!1;return!0}return H.I(this.qa,a.qa)&&H.I(this.ra,a.ra)&&H.I(this.D,a.D)&&H.I(this.F,a.F)};
  function Nc(a,b){if(a.type!==Dc||b.type!==Ac)return!1;if(1===b.Ab.count){var c=b.Ab.wa(0);if(1===c.Fa.count&&H.I(a.qa,c.qa)&&H.I(a.ra,c.ra)&&(c=c.Fa.wa(0),c.type===Oc&&H.I(a.D,c.D)&&H.I(a.F,c.F)))return!0}return!1}var Pc;zc.stringify=Pc=function(a){return a.toString()};
  zc.prototype.toString=function(a){switch(this.type){case Dc:return void 0===a?"M"+this.qa.toString()+" "+this.ra.toString()+"L"+this.D.toString()+" "+this.F.toString():"M"+this.qa.toFixed(a)+" "+this.ra.toFixed(a)+"L"+this.D.toFixed(a)+" "+this.F.toFixed(a);case Ec:var b=new x(this.qa,this.ra,0,0);b.PG(this.D,this.F,0,0);return void 0===a?"M"+b.x.toString()+" "+b.y.toString()+"H"+b.right.toString()+"V"+b.bottom.toString()+"H"+b.left.toString()+"z":"M"+b.x.toFixed(a)+" "+b.y.toFixed(a)+"H"+b.right.toFixed(a)+
  "V"+b.bottom.toFixed(a)+"H"+b.left.toFixed(a)+"z";case Mc:b=new x(this.qa,this.ra,0,0);b.PG(this.D,this.F,0,0);if(void 0===a){var c=b.left.toString()+" "+(b.y+b.height/2).toString(),d=b.right.toString()+" "+(b.y+b.height/2).toString();return"M"+c+"A"+(b.width/2).toString()+" "+(b.height/2).toString()+" 0 0 1 "+d+"A"+(b.width/2).toString()+" "+(b.height/2).toString()+" 0 0 1 "+c}c=b.left.toFixed(a)+" "+(b.y+b.height/2).toFixed(a);d=b.right.toFixed(a)+" "+(b.y+b.height/2).toFixed(a);return"M"+c+"A"+
  (b.width/2).toFixed(a)+" "+(b.height/2).toFixed(a)+" 0 0 1 "+d+"A"+(b.width/2).toFixed(a)+" "+(b.height/2).toFixed(a)+" 0 0 1 "+c;case Ac:for(var b="",c=this.Ab,d=c.length,f=0;f<d;f++){var g=c.n[f];0<f&&(b+=" x ");g.pp&&(b+="F ");b+=g.toString(a)}return b;default:return this.type.toString()}};var Qc;
  zc.fillPath=Qc=function(a){"string"!==typeof a&&t.bc(a,"string",zc,"fillPath:str");a=a.split(/[Xx]/);for(var b=a.length,c="",d=0;d<b;d++)var f=a[d],c=null!==f.match(/[Ff]/)?0===d?c+f:c+("X"+(" "===f[0]?"":" ")+f):c+((0===d?"":"X ")+"F"+(" "===f[0]?"":" ")+f);return c};var Rc;
  zc.parse=Rc=function(a,b){function c(){return n>=v-1?!0:null!==m[n+1].match(/[A-Za-z]/)}function d(){n++;return m[n]}function f(){var a=new w(parseFloat(d()),parseFloat(d()));p===p.toLowerCase()&&(a.x=u.x+a.x,a.y=u.y+a.y);return a}function g(){return u=f()}function h(){return s=f()}function k(){var a=[parseFloat(d()),parseFloat(d()),parseFloat(d()),parseFloat(d()),parseFloat(d())];c()||(a.push(parseFloat(d())),c()||a.push(parseFloat(d())));p===p.toLowerCase()&&(a[2]+=u.x,a[3]+=u.y);return a}function l(){return"c"!==
  q.toLowerCase()&&"s"!==q.toLowerCase()?u:new w(2*u.x-s.x,2*u.y-s.y)}void 0===b&&(b=!1);"string"!==typeof a&&t.bc(a,"string",zc,"parse:str");a=a.replace(/,/gm," ");a=a.replace(/([UuBbMmZzLlHhVvCcSsQqTtAaFf])([UuBbMmZzLlHhVvCcSsQqTtAaFf])/gm,"$1 $2");a=a.replace(/([UuBbMmZzLlHhVvCcSsQqTtAaFf])([UuBbMmZzLlHhVvCcSsQqTtAaFf])/gm,"$1 $2");a=a.replace(/([UuBbMmZzLlHhVvCcSsQqTtAaFf])([^\s])/gm,"$1 $2");a=a.replace(/([^\s])([UuBbMmZzLlHhVvCcSsQqTtAaFf])/gm,"$1 $2");a=a.replace(/([0-9])([+\-])/gm,"$1 $2");
  a=a.replace(/(\.[0-9]*)(\.)/gm,"$1 $2");a=a.replace(/([Aa](\s+[0-9]+){3})\s+([01])\s*([01])/gm,"$1 $3 $4 ");a=a.replace(/[\s\r\t\n]+/gm," ");a=a.replace(/^\s+|\s+$/g,"");for(var m=a.split(" "),n=-1,p="",q="",r=new w(0,0),s=new w(0,0),u=new w(0,0),v=m.length,D=t.u(),A,G=!1,L=!1,N=!0;!(n>=v-1);)if(q=p,p=d(),""!==p)switch(p.toUpperCase()){case "X":N=!0;L=G=!1;break;case "M":A=g();null===D.Wb||!0===N?(J(D,A.x,A.y,G,!1,!L),N=!1):D.moveTo(A.x,A.y);for(r=u;!c();)A=g(),D.lineTo(A.x,A.y);break;case "L":for(;!c();)A=
  g(),D.lineTo(A.x,A.y);break;case "H":for(;!c();)u=A=new w((p===p.toLowerCase()?u.x:0)+parseFloat(d()),u.y),D.lineTo(u.x,u.y);break;case "V":for(;!c();)u=A=new w(u.x,(p===p.toLowerCase()?u.y:0)+parseFloat(d())),D.lineTo(u.x,u.y);break;case "C":for(;!c();){var O=f(),U=h();A=g();K(D,O.x,O.y,U.x,U.y,A.x,A.y)}break;case "S":for(;!c();)O=l(),U=h(),A=g(),K(D,O.x,O.y,U.x,U.y,A.x,A.y);break;case "Q":for(;!c();)U=h(),A=g(),Sc(D,U.x,U.y,A.x,A.y);break;case "T":for(;!c();)s=U=l(),A=g(),Sc(D,U.x,U.y,A.x,A.y);
  break;case "B":for(;!c();)A=k(),D.arcTo(A[0],A[1],A[2],A[3],A[4],A[5],A[6]);break;case "A":for(;!c();){var O=Math.abs(parseFloat(d())),U=Math.abs(parseFloat(d())),Y=parseFloat(d()),ba=!!parseFloat(d()),R=!!parseFloat(d());A=g();Tc(D,O,U,Y,ba,R,A.x,A.y)}break;case "Z":M(D);u=r;break;case "F":A=null;for(O=1;m[n+O];)if(null!==m[n+O].match(/[Uu]/))O++;else if(null===m[n+O].match(/[A-Za-z]/))O++;else{A=m[n+O];break}A.match(/[Mm]/)?G=!0:Zc(D);break;case "U":A=null;for(O=1;m[n+O];)if(null!==m[n+O].match(/[Ff]/))O++;
  else if(null===m[n+O].match(/[A-Za-z]/))O++;else{A=m[n+O];break}A.match(/[Mm]/)?L=!0:D.bb(!1)}r=D.s;t.v(D);if(b)for(D=r.Ab.k;D.next();)D.value.pp=!0;return r};function $c(a,b){for(var c=a.length,d=t.K(),f=0;f<c;f++){var g=a[f];d.x=g.x1;d.y=g.y1;b.Ta(d);g.x1=d.x;g.y1=d.y;d.x=g.x2;d.y=g.y2;b.Ta(d);g.x2=d.x;g.y2=d.y;d.x=g.ge;d.y=g.he;b.Ta(d);g.ge=d.x;g.he=d.y;d.x=g.Ub;d.y=g.Vb;b.Ta(d);g.Ub=d.x;g.Vb=d.y}t.B(d)}
  zc.prototype.wA=function(){if(this.Va)return!0;var a=this.Ab;if(this.Hu!==a.V)return!0;for(var b=a.length,c=0;c<b;c++)if(a.n[c].wA())return!0;return!1};zc.prototype.qB=function(){this.Va=!1;var a=this.Ab;this.Hu=a.V;for(var b=a.length,c=0;c<b;c++)a.n[c].qB()};zc.prototype.qf=function(){var a=this.su;a.La();isNaN(this.$n)||isNaN(this.Zn)?a.p(0,0,0,0):a.p(0,0,this.$n,this.Zn);ad(this,a,!1);hb(a,0,0,0,0);a.freeze()};
  zc.prototype.computeBoundsWithoutOrigin=zc.prototype.gI=function(){var a=new x;ad(this,a,!0);return a};
  function ad(a,b,c){switch(a.type){case Dc:case Ec:case Mc:c?b.p(a.nc,a.xc,0,0):hb(b,a.nc,a.xc,0,0);hb(b,a.kb,a.ub,0,0);break;case Ac:a=a.Ab;for(var d=a.length,f=0;f<d;f++){var g=a.n[f];c&&0===f?b.p(g.qa,g.ra,0,0):hb(b,g.qa,g.ra,0,0);for(var h=g.Fa,k=h.length,l=g.qa,m=g.ra,n=0;n<k;n++){var p=h.n[n];switch(p.type){case Oc:case bd:l=p.D;m=p.F;hb(b,l,m,0,0);break;case cd:H.So(l,m,p.Bb,p.Rb,p.re,p.se,p.D,p.F,0.5,b);l=p.D;m=p.F;break;case dd:H.PA(l,m,p.Bb,p.Rb,p.D,p.F,0.5,b);l=p.D;m=p.F;break;case ed:case fd:for(var p=
  p.type===ed?gd(p,g):hd(p,g,l,m),q=p.length,r=null,s=0;s<q;s++)r=p[s],H.So(r.x1,r.y1,r.x2,r.y2,r.ge,r.he,r.Ub,r.Vb,0.5,b);null!==r&&(l=r.Ub,m=r.Vb);break;default:t.m("Unknown Segment type: "+p.type)}}}break;default:t.m("Unknown Geometry type: "+a.type)}}zc.prototype.normalize=zc.prototype.normalize=function(){t.L(this);var a=this.gI();this.offset(-a.x,-a.y);return new w(-a.x,-a.y)};
  zc.prototype.offset=zc.prototype.offset=function(a,b){t.L(this);e&&(t.q(a,zc,"offset"),t.q(b,zc,"offset"));this.transform(1,0,0,1,a,b)};zc.prototype.scale=zc.prototype.scale=function(a,b){t.L(this);e&&(t.q(a,zc,"scale:x"),t.q(b,zc,"scale:y"),0>=a&&t.la(a,"scale must be greater than zero",zc,"scale:x"),0>=b&&t.la(b,"scale must be greater than zero",zc,"scale:y"));this.transform(a,0,0,b,0,0)};
  zc.prototype.rotate=zc.prototype.rotate=function(a,b,c){t.L(this);void 0===b&&(b=0);void 0===c&&(c=0);e&&(t.q(a,zc,"rotate:angle"),t.q(b,zc,"rotate:x"),t.q(c,zc,"rotate:y"));var d=t.ph();d.reset();d.rotate(a,b,c);this.transform(d.m11,d.m12,d.m21,d.m22,d.dx,d.dy);t.We(d)};
  zc.prototype.transform=zc.prototype.transform=function(a,b,c,d,f,g){var h,k;switch(this.type){case Dc:case Ec:case Mc:h=this.nc;k=this.xc;this.nc=h*a+k*c+f;this.xc=h*b+k*d+g;h=this.kb;k=this.ub;this.kb=h*a+k*c+f;this.ub=h*b+k*d+g;break;case Ac:for(var l=this.Ab,m=l.length,n=0;n<m;n++){var p=l.n[n];h=p.qa;k=p.ra;p.qa=h*a+k*c+f;p.ra=h*b+k*d+g;for(var p=p.Fa,q=p.length,r=0;r<q;r++){var s=p.n[r];switch(s.type){case Oc:case bd:h=s.D;k=s.F;s.D=h*a+k*c+f;s.F=h*b+k*d+g;break;case cd:h=s.Bb;k=s.Rb;s.Bb=h*
  a+k*c+f;s.Rb=h*b+k*d+g;h=s.re;k=s.se;s.re=h*a+k*c+f;s.se=h*b+k*d+g;h=s.D;k=s.F;s.D=h*a+k*c+f;s.F=h*b+k*d+g;break;case dd:h=s.Bb;k=s.Rb;s.Bb=h*a+k*c+f;s.Rb=h*b+k*d+g;h=s.D;k=s.F;s.D=h*a+k*c+f;s.F=h*b+k*d+g;break;case ed:h=s.Da;k=s.Pa;s.Da=h*a+k*c+f;s.Pa=h*b+k*d+g;s.radiusX*=Math.sqrt(a*a+c*c);void 0!==s.radiusY&&(s.radiusY*=Math.sqrt(b*b+d*d));break;case fd:h=s.D;k=s.F;s.D=h*a+k*c+f;s.F=h*b+k*d+g;s.radiusX*=Math.sqrt(a*a+c*c);s.radiusY*=Math.sqrt(b*b+d*d);break;default:t.m("Unknown Segment type: "+
  s.type)}}}}this.Va=!0};zc.prototype.Ds=function(a,b){var c=this.nc,d=this.xc,f=this.kb,g=this.ub,h=Math.min(c,f),k=Math.min(d,g),c=Math.abs(f-c),d=Math.abs(g-d),g=t.K();g.x=h;g.y=k;b.Ta(g);f=new Bc(g.x,g.y);g.x=h+c;g.y=k;b.Ta(g);f.Fa.add(new id(Oc,g.x,g.y));g.x=h+c;g.y=k+d;b.Ta(g);f.Fa.add(new id(Oc,g.x,g.y));g.x=h;g.y=k+d;b.Ta(g);f.Fa.add((new id(Oc,g.x,g.y)).close());t.B(g);a.type=Ac;a.Ab.add(f);return a};
  zc.prototype.Ga=function(a,b,c,d){var f=a.x,g=a.y,h=this.Ob.x-20;a=a.y;for(var k=0,l,m,n,p,q,r,s,u=this.Ab.n,v=u.length,D=0;D<v;D++){var A=u[D];if(A.pp){if(c&&A.Ga(f,g,b))return!0;var G=A.Fa;l=A.qa;m=A.ra;for(var L=l,N=m,O=0;O<=G.length;O++){O!==G.length?(n=G.n[O],p=n.type,r=n.D,s=n.F):(p=Oc,r=L,s=N);switch(p){case bd:q=jd(f,g,h,a,l,m,L,N);if(!0===q)return!0;k+=q;L=r;N=s;break;case Oc:q=jd(f,g,h,a,l,m,r,s);if(!0===q)return!0;k+=q;break;case cd:q=H.Qs(l,m,n.Bb,n.Rb,n.re,n.se,r,s,h,a,f,g,0.5);k+=q;
  break;case dd:q=H.Qs(l,m,(l+2*n.Bb)/3,(m+2*n.Rb)/3,(n.Bb+2*r)/3,(n.Bb+2*r)/3,r,s,h,a,f,g,0.5);k+=q;break;case ed:case fd:p=n.type===ed?gd(n,A):hd(n,A,l,m);for(var U=p.length,Y=null,ba=0;ba<U;ba++){Y=p[ba];if(0===ba){q=jd(f,g,h,a,l,m,Y.x1,Y.y1);if(!0===q)return!0;k+=q}q=H.Qs(Y.x1,Y.y1,Y.x2,Y.y2,Y.ge,Y.he,Y.Ub,Y.Vb,h,a,f,g,0.5);k+=q}null!==Y&&(r=Y.Ub,s=Y.Vb);break;default:t.m("Unknown Segment type: "+n.type)}l=r;m=s}if(0!==k)return!0;k=0}else if(A.Ga(f,g,d?b:b+2))return!0}return 0!==k};
  function jd(a,b,c,d,f,g,h,k){if(H.Md(f,g,h,k,0.05,a,b))return!0;var l=(a-c)*(g-k);if(0===l)return 0;var m=((a*d-b*c)*(f-h)-(a-c)*(f*k-g*h))/l;b=(a*d-b*c)*(g-k)/l;if(m>=a)return 0;if((f>h?f-h:h-f)<(g>k?g-k:k-g)){if(g<k?(a=g,f=k):(a=k,f=g),b<a||b>f)return 0}else if(f<h?(a=f,f=h):a=h,m<a||m>f)return 0;return 0<l?1:-1}function kd(a,b,c,d){for(var f=a.Ab.length,g=0;g<f;g++)if(a.Ab.n[g].Ga(b,c,d))return!0;return!1}
  zc.prototype.getPointAlongPath=function(a){(0>a||1<a)&&t.la(a,"0 <= fraction <= 1",zc,"getPointAlongPath:fraction");var b=this.Ab.$a(),c=t.Cb(),d=[];d.push([b.qa,b.ra]);for(var f=b.qa,g=b.ra,h=f,k=g,l=b.Fa.n,m=l.length,n=0;n<m;n++){var p=l[n];switch(p.da){case bd:c.push(d);d=[];d.push([p.D,p.F]);f=p.D;g=p.F;h=f;k=g;break;case Oc:d.push([p.D,p.F]);f=p.D;g=p.F;break;case cd:H.ze(f,g,p.jd,p.ye,p.ng,p.og,p.kb,p.ub,0.5,d);f=p.D;g=p.F;break;case dd:H.Jp(f,g,p.jd,p.ye,p.kb,p.ub,0.5,d);f=p.D;g=p.F;break;
  case ed:for(var q=gd(p,b),r=q.length,s=0;s<r;s++){var u=q[s];H.ze(f,g,u.x2,u.y2,u.ge,u.he,u.Ub,u.Vb,0.5,d);f=u.Ub;g=u.Vb}break;case fd:q=hd(p,b,f,g);r=q.length;for(s=0;s<r;s++)u=q[s],H.ze(f,g,u.x2,u.y2,u.ge,u.he,u.Ub,u.Vb,0.5,d),f=u.Ub,g=u.Vb;break;default:t.m("Segment not of valid type")}p.Hh&&d.push([h,k])}c.push(d);m=0;f=c.length;b=null;for(g=0;g<f;g++)for(h=c[g],k=h.length,n=0;n<k;n++)d=h[n],0!==n&&(l=Math.sqrt(Sa(b[0],b[1],d[0],d[1])),m+=l),b=d;a*=m;for(g=m=0;g<f;g++)for(h=c[g],k=h.length,n=
  0;n<k;n++){d=h[n];if(0!==n){l=Math.sqrt(Sa(b[0],b[1],d[0],d[1]));if(m+l>a)return n=(a-m)/l,t.ya(c),new w(b[0]+(d[0]-b[0])*n,b[1]+(d[1]-b[1])*n);m+=l}b=d}t.ya(c);return null};t.g(zc,"type",zc.prototype.type);t.defineProperty(zc,{type:"type"},function(){return this.da},function(a){this.da!==a&&(e&&t.Aa(a,zc,zc,"type"),t.L(this,a),this.da=a,this.Va=!0)});t.g(zc,"startX",zc.prototype.qa);
  t.defineProperty(zc,{qa:"startX"},function(){return this.nc},function(a){this.nc!==a&&(e&&t.q(a,zc,"startX"),t.L(this,a),this.nc=a,this.Va=!0)});t.g(zc,"startY",zc.prototype.ra);t.defineProperty(zc,{ra:"startY"},function(){return this.xc},function(a){this.xc!==a&&(e&&t.q(a,zc,"startY"),t.L(this,a),this.xc=a,this.Va=!0)});t.g(zc,"endX",zc.prototype.D);t.defineProperty(zc,{D:"endX"},function(){return this.kb},function(a){this.kb!==a&&(e&&t.q(a,zc,"endX"),t.L(this,a),this.kb=a,this.Va=!0)});
  t.g(zc,"endY",zc.prototype.F);t.defineProperty(zc,{F:"endY"},function(){return this.ub},function(a){this.ub!==a&&(e&&t.q(a,zc,"endY"),t.L(this,a),this.ub=a,this.Va=!0)});t.g(zc,"figures",zc.prototype.Ab);t.defineProperty(zc,{Ab:"figures"},function(){return this.Bk},function(a){this.Bk!==a&&(e&&t.l(a,B,zc,"figures"),t.L(this,a),this.Bk=a,this.Va=!0)});t.defineProperty(zc,{G:"spot1"},function(){return this.Mi},function(a){e&&t.l(a,I,zc,"spot1");t.L(this,a);this.Mi=a.Z()});
  t.defineProperty(zc,{H:"spot2"},function(){return this.Ni},function(a){e&&t.l(a,I,zc,"spot2");t.L(this,a);this.Ni=a.Z()});t.A(zc,{Ob:"bounds"},function(){this.wA()&&(this.qB(),this.qf());return this.su});function Bc(a,b,c){t.Ac(this);void 0===c&&(c=!0);this.Ul=c;this.bo=!0;void 0!==a?(e&&t.q(a,Bc,"sx"),this.nc=a):this.nc=0;void 0!==b?(e&&t.q(b,Bc,"sy"),this.xc=b):this.xc=0;this.hs=new B(id);this.Gv=this.hs.V;this.Va=!0}t.ga("PathFigure",Bc);t.Yh(Bc);
  Bc.prototype.copy=function(){var a=new Bc;a.Ul=this.Ul;a.bo=this.bo;a.nc=this.nc;a.xc=this.xc;for(var b=this.hs,c=b.length,d=a.hs,f=0;f<c;f++){var g=b.n[f].copy();d.add(g)}a.Gv=this.Gv;a.Va=this.Va;return a};Bc.prototype.equalsApprox=Bc.prototype.tf=function(a){if(!(a instanceof Bc&&H.I(this.qa,a.qa)&&H.I(this.ra,a.ra)))return!1;var b=this.Fa;a=a.Fa;var c=b.length;if(c!==a.length)return!1;for(var d=0;d<c;d++)if(!b.n[d].tf(a.n[d]))return!1;return!0};aa=Bc.prototype;
  aa.toString=function(a){for(var b=void 0===a?"M"+this.qa.toString()+" "+this.ra.toString():"M"+this.qa.toFixed(a)+" "+this.ra.toFixed(a),c=this.Fa,d=c.length,f=0;f<d;f++)b+=" "+c.n[f].toString(a);return b};aa.freeze=function(){this.ob=!0;var a=this.Fa;a.freeze();for(var b=a.length,c=0;c<b;c++)a.n[c].freeze();return this};aa.La=function(){this.ob=!1;var a=this.Fa;a.La();for(var b=a.length,c=0;c<b;c++)a.n[c].La();return this};
  aa.wA=function(){if(this.Va)return!0;var a=this.Fa;if(this.Gv!==a.V)return!0;for(var b=a.length,c=0;c<b;c++)if(a.n[c].Va)return!0;return!1};aa.qB=function(){this.Va=!1;var a=this.Fa;this.Gv=a.V;for(var b=a.length,c=0;c<b;c++){var d=a.n[c];d.Va=!1;d.oj=null}};t.g(Bc,"isFilled",Bc.prototype.pp);t.defineProperty(Bc,{pp:"isFilled"},function(){return this.Ul},function(a){e&&t.i(a,"boolean",Bc,"isFilled");t.L(this,a);this.Ul=a});t.g(Bc,"isShadowed",Bc.prototype.gj);
  t.defineProperty(Bc,{gj:"isShadowed"},function(){return this.bo},function(a){e&&t.i(a,"boolean",Bc,"isShadowed");t.L(this,a);this.bo=a});t.g(Bc,"startX",Bc.prototype.qa);t.defineProperty(Bc,{qa:"startX"},function(){return this.nc},function(a){e&&t.q(a,Bc,"startX");t.L(this,a);this.nc=a;this.Va=!0});t.g(Bc,"startY",Bc.prototype.ra);t.defineProperty(Bc,{ra:"startY"},function(){return this.xc},function(a){e&&t.q(a,Bc,"startY");t.L(this,a);this.xc=a;this.Va=!0});t.g(Bc,"segments",Bc.prototype.Fa);
  t.defineProperty(Bc,{Fa:"segments"},function(){return this.hs},function(a){e&&t.l(a,B,Bc,"segments");t.L(this,a);this.hs=a;this.Va=!0});
  Bc.prototype.Ga=function(a,b,c){for(var d=this.qa,f=this.ra,g=d,h=f,k=this.Fa.n,l=k.length,m=0;m<l;m++){var n=k[m];switch(n.type){case bd:g=n.D;h=n.F;d=n.D;f=n.F;break;case Oc:if(H.Md(d,f,n.D,n.F,c,a,b))return!0;d=n.D;f=n.F;break;case cd:if(H.gw(d,f,n.Bb,n.Rb,n.re,n.se,n.D,n.F,0.5,a,b,c))return!0;d=n.D;f=n.F;break;case dd:if(H.QA(d,f,n.Bb,n.Rb,n.D,n.F,0.5,a,b,c))return!0;d=n.D;f=n.F;break;case ed:case fd:for(var p=n.type===ed?gd(n,this):hd(n,this,d,f),q=p.length,r=null,s=0;s<q;s++)if(r=p[s],0===s&&
  H.Md(d,f,r.x1,r.y1,c,a,b)||H.gw(r.x1,r.y1,r.x2,r.y2,r.ge,r.he,r.Ub,r.Vb,0.5,a,b,c))return!0;null!==r&&(d=r.Ub,f=r.Vb);break;default:t.m("Unknown Segment type: "+n.type)}if(n.nt&&(d!==g||f!==h)&&H.Md(d,f,g,h,c,a,b))return!0}return!1};
  function id(a,b,c,d,f,g,h,k){t.Ac(this);void 0===a?a=Oc:e&&t.Aa(a,id,id,"constructor:type");this.da=a;void 0!==b?(e&&t.q(b,id,"ex"),this.kb=b):this.kb=0;void 0!==c?(e&&t.q(c,id,"ey"),this.ub=c):this.ub=0;a===fd?(void 0!==g&&(a=g%360,0>a&&(a+=360),this.jd=a),void 0!==d&&(e&&t.q(d,id,"x1"),this.ng=Math.max(d,0)),void 0!==f&&(e&&t.q(f,id,"y1"),this.og=Math.max(f,0)),this.jo=!!h,this.yn=!!k):(void 0!==d&&(e&&t.q(d,id,"x1"),this.jd=d),void 0!==f&&(e&&t.q(f,id,"y1"),this.ye=f),void 0!==g&&(e&&t.q(g,id,
  "x2"),a===ed&&(g=Math.max(g,0)),this.ng=g),void 0!==h&&"number"===typeof h&&(e&&t.q(h,id,"y2"),a===ed&&(h=Math.max(h,0)),this.og=h));this.Hh=!1;this.Va=!0;this.oj=null}t.ga("PathSegment",id);t.Yh(id);
  id.prototype.copy=function(){var a=new id;a.da=this.da;a.kb=this.kb;a.ub=this.ub;void 0!==this.jd&&(a.jd=this.jd);void 0!==this.ye&&(a.ye=this.ye);void 0!==this.ng&&(a.ng=this.ng);void 0!==this.og&&(a.og=this.og);void 0!==this.jo&&(a.jo=this.jo);void 0!==this.yn&&(a.yn=this.yn);a.Hh=this.Hh;a.Va=this.Va;return a};
  id.prototype.equalsApprox=id.prototype.tf=function(a){if(!(a instanceof id)||this.type!==a.type||this.nt!==a.nt)return!1;switch(this.type){case bd:case Oc:return H.I(this.D,a.D)&&H.I(this.F,a.F);case cd:return H.I(this.D,a.D)&&H.I(this.F,a.F)&&H.I(this.Bb,a.Bb)&&H.I(this.Rb,a.Rb)&&H.I(this.re,a.re)&&H.I(this.se,a.se);case dd:return H.I(this.D,a.D)&&H.I(this.F,a.F)&&H.I(this.Bb,a.Bb)&&H.I(this.Rb,a.Rb);case ed:return H.I(this.nh,a.nh)&&H.I(this.hi,a.hi)&&H.I(this.Da,a.Da)&&H.I(this.Pa,a.Pa)&&H.I(this.radiusX,
  a.radiusX)&&H.I(this.radiusY,a.radiusY);case fd:return this.Qw===a.Qw&&this.Sw===a.Sw&&H.I(this.Ex,a.Ex)&&H.I(this.D,a.D)&&H.I(this.F,a.F)&&H.I(this.radiusX,a.radiusX)&&H.I(this.radiusY,a.radiusY);default:return!1}};
  id.prototype.toString=function(a){switch(this.type){case bd:a=void 0===a?"M"+this.D.toString()+" "+this.F.toString():"M"+this.D.toFixed(a)+" "+this.F.toFixed(a);break;case Oc:a=void 0===a?"L"+this.D.toString()+" "+this.F.toString():"L"+this.D.toFixed(a)+" "+this.F.toFixed(a);break;case cd:a=void 0===a?"C"+this.Bb.toString()+" "+this.Rb.toString()+" "+this.re.toString()+" "+this.se.toString()+" "+this.D.toString()+" "+this.F.toString():"C"+this.Bb.toFixed(a)+" "+this.Rb.toFixed(a)+" "+this.re.toFixed(a)+
  " "+this.se.toFixed(a)+" "+this.D.toFixed(a)+" "+this.F.toFixed(a);break;case dd:a=void 0===a?"Q"+this.Bb.toString()+" "+this.Rb.toString()+" "+this.D.toString()+" "+this.F.toString():"Q"+this.Bb.toFixed(a)+" "+this.Rb.toFixed(a)+" "+this.D.toFixed(a)+" "+this.F.toFixed(a);break;case ed:a=void 0===a?"B"+this.nh.toString()+" "+this.hi.toString()+" "+this.Da.toString()+" "+this.Pa.toString()+" "+this.radiusX:"B"+this.nh.toFixed(a)+" "+this.hi.toFixed(a)+" "+this.Da.toFixed(a)+" "+this.Pa.toFixed(a)+
  " "+this.radiusX;break;case fd:a=void 0===a?"A"+this.radiusX.toString()+" "+this.radiusY.toString()+" "+this.Ex.toString()+" "+(this.Sw?1:0)+" "+(this.Qw?1:0)+" "+this.D.toString()+" "+this.F.toString():"A"+this.radiusX.toFixed(a)+" "+this.radiusY.toFixed(a)+" "+this.Ex.toFixed(a)+" "+(this.Sw?1:0)+" "+(this.Qw?1:0)+" "+this.D.toFixed(a)+" "+this.F.toFixed(a);break;default:a=this.type.toString()}return a+(this.Hh?"z":"")};var bd;id.Move=bd=t.w(id,"Move",0);var Oc;id.Line=Oc=t.w(id,"Line",1);var cd;
  id.Bezier=cd=t.w(id,"Bezier",2);var dd;id.QuadraticBezier=dd=t.w(id,"QuadraticBezier",3);var ed;id.Arc=ed=t.w(id,"Arc",4);var fd;id.SvgArc=fd=t.w(id,"SvgArc",4);id.prototype.freeze=function(){this.ob=!0;return this};id.prototype.La=function(){this.ob=!1;return this};id.prototype.close=id.prototype.close=function(){this.Hh=!0;return this};
  function gd(a,b){if(null!==a.oj&&!1===b.Va)return a.oj;var c=a.radiusX,d=a.radiusY;void 0===d&&(d=c);var f=a.jd,g=a.ye,h=H.iE(0,0,c<d?c:d,a.nh,a.nh+a.hi);if(c!==d){var k=t.ph();k.reset();c<d?k.scale(1,d/c):k.scale(c/d,1);for(var c=h.length,d=t.K(),l=0;l<c;l++){var m=h[l];d.x=m.x1;d.y=m.y1;k.Ta(d);m.x1=d.x;m.y1=d.y;d.x=m.x2;d.y=m.y2;k.Ta(d);m.x2=d.x;m.y2=d.y;d.x=m.ge;d.y=m.he;k.Ta(d);m.ge=d.x;m.he=d.y;d.x=m.Ub;d.y=m.Vb;k.Ta(d);m.Ub=d.x;m.Vb=d.y}t.B(d);t.We(k)}k=h.length;for(c=0;c<k;c++)d=h[c],d.x1+=
  f,d.y1+=g,d.x2+=f,d.y2+=g,d.ge+=f,d.he+=g,d.Ub+=f,d.Vb+=g;a.oj=h;return a.oj}
  function hd(a,b,c,d){function f(a,b){return(a[0]*b[1]<a[1]*b[0]?-1:1)*Math.acos(g(a,b))}function g(a,b){return(a[0]*b[0]+a[1]*b[1])/(Math.sqrt(Math.pow(a[0],2)+Math.pow(a[1],2))*Math.sqrt(Math.pow(b[0],2)+Math.pow(b[1],2)))}if(null!==a.oj&&!1===b.Va)return a.oj;b=a.ng;var h=a.og,k=Math.PI/180*a.jd,l=a.jo,m=a.yn,n=a.kb,p=a.ub,q=Math.cos(k)*(c-n)/2+Math.sin(k)*(d-p)/2,r=-Math.sin(k)*(c-n)/2+Math.cos(k)*(d-p)/2,s=Math.pow(q,2)/Math.pow(b,2)+Math.pow(r,2)/Math.pow(h,2);1<s&&(b*=Math.sqrt(s),h*=Math.sqrt(s));
  s=(l===m?-1:1)*Math.sqrt((Math.pow(b,2)*Math.pow(h,2)-Math.pow(b,2)*Math.pow(r,2)-Math.pow(h,2)*Math.pow(q,2))/(Math.pow(b,2)*Math.pow(r,2)+Math.pow(h,2)*Math.pow(q,2)));isNaN(s)&&(s=0);l=s*b*r/h;s=s*-h*q/b;isNaN(l)&&(l=0);isNaN(s)&&(s=0);c=(c+n)/2+Math.cos(k)*l-Math.sin(k)*s;d=(d+p)/2+Math.sin(k)*l+Math.cos(k)*s;k=f([1,0],[(q-l)/b,(r-s)/h]);p=[(q-l)/b,(r-s)/h];r=[(-q-l)/b,(-r-s)/h];q=f(p,r);-1>=g(p,r)&&(q=Math.PI);1<=g(p,r)&&(q=0);!m&&0<q&&(q-=2*Math.PI);m&&0>q&&(q+=2*Math.PI);m=b>h?1:b/h;r=b>h?
  h/b:1;b=H.iE(0,0,b>h?b:h,k,k+q,!0);h=t.ph();h.reset();h.translate(c,d);h.rotate(a.jd,0,0);h.scale(m,r);$c(b,h);t.We(h);a.oj=b;return a.oj}t.g(id,"isClosed",id.prototype.nt);t.defineProperty(id,{nt:"isClosed"},function(){return this.Hh},function(a){this.Hh!==a&&(this.Hh=a,this.Va=!0)});t.g(id,"type",id.prototype.type);t.defineProperty(id,{type:"type"},function(){return this.da},function(a){e&&t.Aa(a,id,id,"type");t.L(this,a);this.da=a;this.Va=!0});t.g(id,"endX",id.prototype.D);
  t.defineProperty(id,{D:"endX"},function(){return this.kb},function(a){e&&t.q(a,id,"endX");t.L(this,a);this.kb=a;this.Va=!0});t.g(id,"endY",id.prototype.F);t.defineProperty(id,{F:"endY"},function(){return this.ub},function(a){e&&t.q(a,id,"endY");t.L(this,a);this.ub=a;this.Va=!0});t.defineProperty(id,{Bb:"point1X"},function(){return this.jd},function(a){e&&t.q(a,id,"point1X");t.L(this,a);this.jd=a;this.Va=!0});
  t.defineProperty(id,{Rb:"point1Y"},function(){return this.ye},function(a){e&&t.q(a,id,"point1Y");t.L(this,a);this.ye=a;this.Va=!0});t.defineProperty(id,{re:"point2X"},function(){return this.ng},function(a){e&&t.q(a,id,"point2X");t.L(this,a);this.ng=a;this.Va=!0});t.defineProperty(id,{se:"point2Y"},function(){return this.og},function(a){e&&t.q(a,id,"point2Y");t.L(this,a);this.og=a;this.Va=!0});
  t.defineProperty(id,{Da:"centerX"},function(){return this.jd},function(a){e&&t.q(a,id,"centerX");t.L(this,a);this.jd=a;this.Va=!0});t.defineProperty(id,{Pa:"centerY"},function(){return this.ye},function(a){e&&t.q(a,id,"centerY");t.L(this,a);this.ye=a;this.Va=!0});t.defineProperty(id,{radiusX:"radiusX"},function(){return this.ng},function(a){e&&t.q(a,id,"radiusX");0>a&&t.la(a,">= zero",id,"radiusX");t.L(this,a);this.ng=a;this.Va=!0});
  t.defineProperty(id,{radiusY:"radiusY"},function(){return this.og},function(a){e&&t.q(a,id,"radiusY");0>a&&t.la(a,">= zero",id,"radiusY");t.L(this,a);this.og=a;this.Va=!0});t.defineProperty(id,{nh:"startAngle"},function(){return this.kb},function(a){this.kb!==a&&(t.L(this,a),e&&t.q(a,id,"startAngle"),a%=360,0>a&&(a+=360),this.kb=a,this.Va=!0)});
  t.defineProperty(id,{hi:"sweepAngle"},function(){return this.ub},function(a){e&&t.q(a,id,"sweepAngle");t.L(this,a);360<a&&(a=360);-360>a&&(a=-360);this.ub=a;this.Va=!0});t.defineProperty(id,{Qw:"isClockwiseArc"},function(){return this.yn},function(a){t.L(this,a);this.yn=a;this.Va=!0});t.defineProperty(id,{Sw:"isLargeArc"},function(){return this.jo},function(a){t.L(this,a);this.jo=a;this.Va=!0});
  t.defineProperty(id,{Ex:"xAxisRotation"},function(){return this.jd},function(a){e&&t.q(a,id,"xAxisRotation");a%=360;0>a&&(a+=360);t.L(this,a);this.jd=a;this.Va=!0});function ld(){this.U=null;this.Dz=(new w(0,0)).freeze();this.Jy=(new w(0,0)).freeze();this.pu=this.iv=0;this.Xu="";this.Uv=this.Eu=!1;this.Bu=this.ru=0;this.pj=this.Mu=!1;this.Mq=null;this.Sv=0;this.pg=this.Qv=null}t.ga("InputEvent",ld);
  ld.prototype.copy=function(){var a=new ld;a.U=this.U;a.Dz.assign(this.Ke);a.Jy.assign(this.ea);a.iv=this.iv;a.pu=this.pu;a.Xu=this.Xu;a.Eu=this.Eu;a.Uv=this.Uv;a.ru=this.ru;a.Bu=this.Bu;a.Mu=this.Mu;a.pj=this.pj;a.Mq=this.Mq;a.Sv=this.Sv;a.Qv=this.Qv;a.pg=this.pg;return a};
  ld.prototype.toString=function(){var a="^";this.$c&&(a+="M:"+this.$c);this.button&&(a+="B:"+this.button);this.key&&(a+="K:"+this.key);this.Ae&&(a+="C:"+this.Ae);this.Yj&&(a+="D:"+this.Yj);this.Ee&&(a+="h");this.bubbles&&(a+="b");null!==this.ea&&(a+="@"+this.ea.toString());return a};t.g(ld,"diagram",ld.prototype.h);t.defineProperty(ld,{h:"diagram"},function(){return this.U},function(a){this.U=a});t.g(ld,"viewPoint",ld.prototype.Ke);
  t.defineProperty(ld,{Ke:"viewPoint"},function(){return this.Dz},function(a){t.l(a,w,ld,"viewPoint");this.Dz.assign(a)});t.g(ld,"documentPoint",ld.prototype.ea);t.defineProperty(ld,{ea:"documentPoint"},function(){return this.Jy},function(a){t.l(a,w,ld,"documentPoint");this.Jy.assign(a)});t.g(ld,"modifiers",ld.prototype.$c);t.defineProperty(ld,{$c:"modifiers"},function(){return this.iv},function(a){this.iv=a});t.g(ld,"button",ld.prototype.button);
  t.defineProperty(ld,{button:"button"},function(){return this.pu},function(a){this.pu=a});t.g(ld,"key",ld.prototype.key);t.defineProperty(ld,{key:"key"},function(){return this.Xu},function(a){this.Xu=a});t.g(ld,"down",ld.prototype.$j);t.defineProperty(ld,{$j:"down"},function(){return this.Eu},function(a){this.Eu=a});t.g(ld,"up",ld.prototype.mj);t.defineProperty(ld,{mj:"up"},function(){return this.Uv},function(a){this.Uv=a});t.g(ld,"clickCount",ld.prototype.Ae);
  t.defineProperty(ld,{Ae:"clickCount"},function(){return this.ru},function(a){this.ru=a});t.g(ld,"delta",ld.prototype.Yj);t.defineProperty(ld,{Yj:"delta"},function(){return this.Bu},function(a){this.Bu=a});t.g(ld,"handled",ld.prototype.Ee);t.defineProperty(ld,{Ee:"handled"},function(){return this.Mu},function(a){this.Mu=a});t.g(ld,"bubbles",ld.prototype.bubbles);t.defineProperty(ld,{bubbles:"bubbles"},function(){return this.pj},function(a){this.pj=a});t.g(ld,"event",ld.prototype.event);
  t.defineProperty(ld,{event:"event"},function(){return this.Mq},function(a){this.Mq=a});t.A(ld,{Uw:"isTouchEvent"},function(){var a=window.TouchEvent;return a&&this.event instanceof a});t.g(ld,"timestamp",ld.prototype.timestamp);t.defineProperty(ld,{timestamp:"timestamp"},function(){return this.Sv},function(a){this.Sv=a});t.g(ld,"targetDiagram",ld.prototype.oh);t.defineProperty(ld,{oh:"targetDiagram"},function(){return this.Qv},function(a){this.Qv=a});t.g(ld,"targetObject",ld.prototype.ce);
  t.defineProperty(ld,{ce:"targetObject"},function(){return this.pg},function(a){this.pg=a});t.g(ld,"control",ld.prototype.control);t.defineProperty(ld,{control:"control"},function(){return 0!==(this.$c&1)},function(a){this.$c=a?this.$c|1:this.$c&-2});t.g(ld,"shift",ld.prototype.shift);t.defineProperty(ld,{shift:"shift"},function(){return 0!==(this.$c&4)},function(a){this.$c=a?this.$c|4:this.$c&-5});t.g(ld,"alt",ld.prototype.alt);
  t.defineProperty(ld,{alt:"alt"},function(){return 0!==(this.$c&2)},function(a){this.$c=a?this.$c|2:this.$c&-3});t.g(ld,"meta",ld.prototype.Bp);t.defineProperty(ld,{Bp:"meta"},function(){return 0!==(this.$c&8)},function(a){this.$c=a?this.$c|8:this.$c&-9});t.g(ld,"left",ld.prototype.left);t.defineProperty(ld,{left:"left"},function(){return 0===this.button},function(a){this.button=a?0:2});t.g(ld,"middle",ld.prototype.qJ);
  t.defineProperty(ld,{qJ:"middle"},function(){return 1===this.button},function(a){this.button=a?1:0});t.g(ld,"right",ld.prototype.right);t.defineProperty(ld,{right:"right"},function(){return 2===this.button},function(a){this.button=a?2:0});function rd(){this.U=null;this.Yb="";this.wv=this.Mv=null;this.qu=!1}t.ga("DiagramEvent",rd);rd.prototype.copy=function(){var a=new rd;a.U=this.U;a.Yb=this.Yb;a.Mv=this.Mv;a.wv=this.wv;a.qu=this.qu;return a};
  rd.prototype.toString=function(){var a="*"+this.name;this.cancel&&(a+="x");null!==this.Bx&&(a+=":"+this.Bx.toString());null!==this.kx&&(a+="("+this.kx.toString()+")");return a};t.g(rd,"diagram",rd.prototype.h);t.defineProperty(rd,{h:"diagram"},function(){return this.U},function(a){this.U=a});t.g(rd,"name",rd.prototype.name);t.defineProperty(rd,{name:"name"},function(){return this.Yb},function(a){this.Yb=a});t.g(rd,"subject",rd.prototype.Bx);
  t.defineProperty(rd,{Bx:"subject"},function(){return this.Mv},function(a){this.Mv=a});t.g(rd,"parameter",rd.prototype.kx);t.defineProperty(rd,{kx:"parameter"},function(){return this.wv},function(a){this.wv=a});t.g(rd,"cancel",rd.prototype.cancel);t.defineProperty(rd,{cancel:"cancel"},function(){return this.qu},function(a){this.qu=a});function td(){this.clear()}t.ga("ChangedEvent",td);var ud;td.Transaction=ud=t.w(td,"Transaction",-1);var vd;td.Property=vd=t.w(td,"Property",0);var wd;
  td.Insert=wd=t.w(td,"Insert",1);var xd;td.Remove=xd=t.w(td,"Remove",2);td.prototype.clear=td.prototype.clear=function(){this.sq=vd;this.mm=this.hv="";this.lv=this.mv=this.sv=this.to=this.rv=this.U=this.ke=null};
  td.prototype.copy=function(){var a=new td;a.ke=this.ke;a.U=this.U;a.sq=this.sq;a.hv=this.hv;a.mm=this.mm;a.rv=this.rv;var b=this.to;a.to=t.rb(b)&&"function"===typeof b.Z?b.Z():b;b=this.sv;a.sv=t.rb(b)&&"function"===typeof b.Z?b.Z():b;b=this.mv;a.mv=t.rb(b)&&"function"===typeof b.Z?b.Z():b;b=this.lv;a.lv=t.rb(b)&&"function"===typeof b.Z?b.Z():b;return a};
  td.prototype.toString=function(){var a="",a=this.td===ud?a+"* ":this.td===vd?a+(null!==this.ba?"!m":"!d"):a+((null!==this.ba?"!m":"!d")+this.td);this.propertyName&&"string"===typeof this.propertyName&&(a+=" "+this.propertyName);this.Af&&this.Af!==this.propertyName&&(a+=" "+this.Af);a+=": ";this.td===ud?null!==this.oldValue&&(a+=" "+this.oldValue):(null!==this.object&&(a+=yd(this.object)),null!==this.oldValue&&(a+="  old: "+yd(this.oldValue)),null!==this.Yf&&(a+=" "+this.Yf),null!==this.newValue&&
  (a+="  new: "+yd(this.newValue)),null!==this.Wf&&(a+=" "+this.Wf));return a};td.prototype.getValue=td.prototype.za=function(a){return a?this.oldValue:this.newValue};td.prototype.getParam=function(a){return a?this.Yf:this.Wf};td.prototype.canUndo=td.prototype.canUndo=function(){return null!==this.ba||null!==this.h?!0:!1};td.prototype.undo=td.prototype.undo=function(){this.canUndo()&&(null!==this.ba?this.ba.changeState(this,!0):null!==this.h&&this.h.changeState(this,!0))};
  td.prototype.canRedo=td.prototype.canRedo=function(){return null!==this.ba||null!==this.h?!0:!1};td.prototype.redo=td.prototype.redo=function(){this.canRedo()&&(null!==this.ba?this.ba.changeState(this,!1):null!==this.h&&this.h.changeState(this,!1))};t.g(td,"model",td.prototype.ba);t.defineProperty(td,{ba:"model"},function(){return this.ke},function(a){this.ke=a});t.g(td,"diagram",td.prototype.h);t.defineProperty(td,{h:"diagram"},function(){return this.U},function(a){this.U=a});t.g(td,"change",td.prototype.td);
  t.defineProperty(td,{td:"change"},function(){return this.sq},function(a){e&&t.Aa(a,td,td,"change");this.sq=a});t.g(td,"modelChange",td.prototype.Af);t.defineProperty(td,{Af:"modelChange"},function(){return this.hv},function(a){e&&t.i(a,"string",td,"modelChange");this.hv=a});t.g(td,"propertyName",td.prototype.propertyName);t.defineProperty(td,{propertyName:"propertyName"},function(){return this.mm},function(a){e&&"string"!==typeof a&&t.l(a,Function,td,"propertyName");this.mm=a});
  t.g(td,"isTransactionFinished",td.prototype.bJ);t.A(td,{bJ:"isTransactionFinished"},function(){return this.sq===ud&&("CommittedTransaction"===this.mm||"FinishedUndo"===this.mm||"FinishedRedo"===this.mm)});t.g(td,"object",td.prototype.object);t.defineProperty(td,{object:"object"},function(){return this.rv},function(a){this.rv=a});t.g(td,"oldValue",td.prototype.oldValue);t.defineProperty(td,{oldValue:"oldValue"},function(){return this.to},function(a){this.to=a});t.g(td,"oldParam",td.prototype.Yf);
  t.defineProperty(td,{Yf:"oldParam"},function(){return this.sv},function(a){this.sv=a});t.g(td,"newValue",td.prototype.newValue);t.defineProperty(td,{newValue:"newValue"},function(){return this.mv},function(a){this.mv=a});t.g(td,"newParam",td.prototype.Wf);t.defineProperty(td,{Wf:"newParam"},function(){return this.lv},function(a){this.lv=a});
  function F(a){1<arguments.length&&t.m("Model constructor can only take one optional argument, the Array of node data.");t.Ac(this);this.Dy=this.Yb="";this.Ik=this.AC=!1;this.iz={};this.Me=[];this.Bc=new ja(null,Object);this.hm="key";this.vu=this.av=null;this.vy=this.wy=!1;this.Hr="category";this.yh=new ja(null,C);this.Cj=null;this.Li=!1;this.Cz=null;this.ja=new zd;void 0!==a&&(this.Gg=a)}t.ga("Model",F);
  F.prototype.clear=F.prototype.clear=function(){this.Zd&&t.Xm(this.Me,"nodeDataArray",this,!0);this.Me=[];this.Bc.clear();this.yh.clear();this.ja.clear()};aa=F.prototype;
  aa.Zt=function(){var a="";""!==this.name&&(a+=',\n  "name": '+this.quote(this.name));""!==this.Lm&&(a+=',\n  "dataFormat": '+this.quote(this.Lm));this.ab&&(a+=',\n  "isReadOnly": '+this.ab);"key"!==this.ij&&"string"===typeof this.ij&&(a+=',\n  "nodeKeyProperty": '+this.quote(this.ij));this.rw&&(a+=',\n  "copiesArrays": true');this.qw&&(a+=',\n  "copiesArrayObjects": true');"category"!==this.ql&&"string"===typeof this.ql&&(a+=',\n  "nodeCategoryProperty": '+this.quote(this.ql));return a};
  aa.tB=function(){var a="",b=this.DA,c=!1,d;for(d in b)if(!Ad(d,b[d])){c=!0;break}c&&(a=',\n  "modelData": '+Bd(this,b));return a+',\n  "nodeDataArray": '+Cd(this,this.Gg,!0)};aa.Gt=function(a){a.name&&(this.name=a.name);a.dataFormat&&(this.Lm=a.dataFormat);a.isReadOnly&&(this.ab=a.isReadOnly);a.nodeKeyProperty&&(this.ij=a.nodeKeyProperty);a.copiesArrays&&(this.rw=a.copiesArrays);a.copiesArrayObjects&&(this.qw=a.copiesArrayObjects);a.nodeCategoryProperty&&(this.ql=a.nodeCategoryProperty)};
  aa.RA=function(a){var b=a.modelData;b&&(this.It(b),this.DA=b);if(a=a.nodeDataArray)this.It(a),this.Gg=a};aa.toString=function(a){void 0===a&&(a=0);if(1<a)return this.kB();var b=(""!==this.name?this.name:"")+" Model";if(0<a){b+="\n node data:";a=this.Gg;var c=t.vb(a),d;for(d=0;d<c;d++)var f=t.mb(a,d),b=b+(" "+this.Hb(f)+":"+yd(f))}return b};
  F.prototype.toJson=F.prototype.toJSON=F.prototype.kB=function(a){void 0===a&&(a=this.constructor===F?"go.Model":this.constructor===P?"go.GraphLinksModel":this.constructor===Kd?"go.TreeModel":t.xg(this));return'{ "class": '+this.quote(a)+this.Zt()+this.tB()+"}"};
  F.fromJson=F.fromJSON=function(a,b){void 0===b&&(b=null);b&&t.l(b,F,F,"fromJson:model");var c=null;if("string"===typeof a)if(window&&window.JSON&&window.JSON.parse)try{c=window.JSON.parse(a)}catch(d){e&&t.trace("JSON.parse error: "+d.toString())}else t.trace("WARNING: no JSON.parse available");else"object"===typeof a?c=a:t.m("Unable to construct a Model from: "+a);if(null===b){var f;f=null;var g=c["class"];if("string"===typeof g)try{var h=null;0===g.indexOf("go.")?(g=g.substr(3),h=ca[g]):(h=ca[g])||
  (h=window[g]);"function"===typeof h&&(f=new h)}catch(k){}null===f||f instanceof F?b=f:t.m("Unable to construct a Model of declared class: "+c["class"])}null===b&&(b=new P);b.Gt(c);b.RA(c);return b};
  F.prototype.replaceJsonObjects=F.prototype.It=function(a){if(t.isArray(a))for(var b=t.vb(a),c=0;c<b;c++){var d=t.mb(a,c);t.rb(d)&&t.OD(a,c,this.It(d))}else if(t.rb(a)){for(c in a)if(d=a[c],t.rb(d)&&(d=this.It(d),a[c]=d,"points"===c&&Array.isArray(d))){for(var f=0===d.length%2,g=0;g<d.length;g++)if("number"!==typeof d[g]){f=!1;break}if(f){f=new B(w);for(g=0;g<d.length/2;g++){var h=new w(d[2*g],d[2*g+1]);f.add(h)}f.freeze();a[c]=f}}if("object"===typeof a){c=a;d=a["class"];if("NaN"===d)c=NaN;else if("Date"===
  d)c=new Date(a.value);else if("go.Point"===d)c=new w(Ld(a.x),Ld(a.y));else if("go.Size"===d)c=new ga(Ld(a.width),Ld(a.height));else if("go.Rect"===d)c=new x(Ld(a.x),Ld(a.y),Ld(a.width),Ld(a.height));else if("go.Margin"===d)c=new ab(Ld(a.top),Ld(a.right),Ld(a.bottom),Ld(a.left));else if("go.Spot"===d)c="string"===typeof a["enum"]?vb(a["enum"]):new I(Ld(a.x),Ld(a.y),Ld(a.offsetX),Ld(a.offsetY));else if("go.Brush"===d){if(c=new fa,c.type=t.Om(fa,a.type),a.start instanceof I&&(c.start=a.start),a.end instanceof
  I&&(c.end=a.end),"number"===typeof a.startRadius&&(c.Vp=Ld(a.startRadius)),"number"===typeof a.endRadius&&(c.ap=Ld(a.endRadius)),a=a.colorStops)for(b in a)c.addColorStop(parseFloat(b),a[b])}else"go.Geometry"===d&&(c="string"===typeof a.path?Rc(a.path):new zc,c.type=t.Om(zc,a.type),"number"===typeof a.startX&&(c.qa=Ld(a.startX)),"number"===typeof a.startY&&(c.ra=Ld(a.startY)),"number"===typeof a.endX&&(c.D=Ld(a.endX)),"number"===typeof a.endY&&(c.F=Ld(a.endY)),a.spot1 instanceof I&&(c.G=a.spot1),a.spot2 instanceof
  I&&(c.H=a.spot2));a=c}}return a};F.prototype.quote=function(a){for(var b="",c=a.length,d=0;d<c;d++)var f=a[d],b='"'===f||"\\"===f?b+("\\"+f):"\b"===f?b+"\\b":"\f"===f?b+"\\f":"\n"===f?b+"\\n":"\r"===f?b+"\\r":"\t"===f?b+"\\t":b+f;return'"'+b+'"'};
  F.prototype.writeJsonValue=F.prototype.$t=function(a){return void 0===a?"undefined":null===a?"null":!0===a?"true":!1===a?"false":"string"===typeof a?this.quote(a):"number"===typeof a?Infinity===a?"9e9999":-Infinity===a?"-9e9999":isNaN(a)?'{"class":"NaN"}':a.toString():a instanceof Date?'{"class":"Date", "value":"'+a.toJSON()+'"}':a instanceof Number?this.$t(a.valueOf()):t.isArray(a)?Cd(this,a):t.rb(a)?Bd(this,a):"function"===typeof a?"null":a.toString()};
  function Cd(a,b,c){var d=t.vb(b),f="[ ";c&&1<d&&(f+="\n");for(var g=0;g<d;g++){var h=t.mb(b,g);void 0!==h&&(0<g&&(f+=",",c&&(f+="\n")),f+=a.$t(h))}c&&1<d&&(f+="\n");return f+" ]"}function Ad(a,b){return void 0===b||"__gohashid"===a||"_"===a[0]||"function"===typeof b?!0:!1}function Md(a){return isNaN(a)?"NaN":Infinity===a?"9e9999":-Infinity===a?"-9e9999":a}
  function Bd(a,b){var c=b;if(c instanceof w)b={"class":"go.Point",x:Md(c.x),y:Md(c.y)};else if(c instanceof ga)b={"class":"go.Size",width:Md(c.width),height:Md(c.height)};else if(c instanceof x)b={"class":"go.Rect",x:Md(c.x),y:Md(c.y),width:Md(c.width),height:Md(c.height)};else if(c instanceof ab)b={"class":"go.Margin",top:Md(c.top),right:Md(c.right),bottom:Md(c.bottom),left:Md(c.left)};else if(c instanceof I)b=c.vd()?{"class":"go.Spot",x:Md(c.x),y:Md(c.y),offsetX:Md(c.offsetX),offsetY:Md(c.offsetY)}:
  {"class":"go.Spot","enum":c.toString()};else if(c instanceof fa){b={"class":"go.Brush",type:c.type.name};if(c.type===Nd)b.color=c.color;else if(c.type===Od||c.type===Zd)b.start=c.start,b.end=c.end,c.type===Zd&&(0!==c.Vp&&(b.startRadius=Md(c.Vp)),isNaN(c.ap)||(b.endRadius=Md(c.ap)));if(null!==c.Vo){for(var d={},c=c.Vo.k;c.next();)d[c.key.toString()]=c.value;b.colorStops=d}}else if(c instanceof zc)b={"class":"go.Geometry",type:c.type.name},0!==c.qa&&(b.startX=Md(c.qa)),0!==c.ra&&(b.startY=Md(c.ra)),
  0!==c.D&&(b.endX=Md(c.D)),0!==c.F&&(b.endY=Md(c.F)),c.G.M(Eb)||(b.spot1=c.G),c.H.M(Pb)||(b.spot2=c.H),c.type===Ac&&(b.path=Pc(c));else if(c instanceof Q||c instanceof z||c instanceof $d||c instanceof F||c instanceof ae||c instanceof oa||c instanceof be||c instanceof ra||c instanceof zd||c instanceof ce)return t.trace("ERROR: trying to convert a GraphObject or Diagram or Model or Tool or Layout or UndoManager into JSON text: "+c.toString()),"{}";var d="{",f=!0,g;for(g in b)if(c=t.hb(b,g),!Ad(g,c))if(f?
  f=!1:d+=", ",d+='"'+g+'":',"points"===g&&c instanceof B&&c.da===w){for(var h="[",c=c.k;c.next();){var k=c.value;1<h.length&&(h+=",");h+=a.$t(k.x);h+=",";h+=a.$t(k.y)}h+="]";d+=h}else d+=a.$t(c);return d+"}"}function Ld(a){return"number"===typeof a?a:"NaN"===a?NaN:"9e9999"===a?Infinity:"-9e9999"===a?-Infinity:parseFloat(a)}t.g(F,"name",F.prototype.name);t.defineProperty(F,{name:"name"},function(){return this.Yb},function(a){var b=this.Yb;b!==a&&(t.i(a,"string",F,"name"),this.Yb=a,this.j("name",b,a))});
  t.g(F,"dataFormat",F.prototype.Lm);t.defineProperty(F,{Lm:"dataFormat"},function(){return this.Dy},function(a){var b=this.Dy;b!==a&&(t.i(a,"string",F,"dataFormat"),this.Dy=a,this.j("dataFormat",b,a))});t.g(F,"knockoutJS",F.prototype.Zd);t.defineProperty(F,{Zd:"knockoutJS"},function(){return this.AC},function(a){this.AC=a;t.zc||(t.zc="object"===typeof window.ko&&"function"===typeof window.ko.isObservable?window.ko.isObservable:null,a&&null===t.zc&&t.trace("No value for ko.isObservable: is KnockoutJS library not loaded?"))});
  t.g(F,"isReadOnly",F.prototype.ab);t.defineProperty(F,{ab:"isReadOnly"},function(){return this.Ik},function(a){var b=this.Ik;b!==a&&(t.i(a,"boolean",F,"isReadOnly"),this.Ik=a,this.j("isReadOnly",b,a))});t.g(F,"modelData",F.prototype.DA);t.defineProperty(F,{DA:"modelData"},function(){return this.iz},function(a){var b=this.iz;b!==a&&(t.i(a,"object",F,"modelData"),this.iz=a,this.j("modelData",b,a))});
  F.prototype.addChangedListener=F.prototype.Jz=function(a){t.i(a,"function",F,"addChangedListener:listener");null===this.Cj&&(this.Cj=new B("function"));this.Cj.add(a)};F.prototype.removeChangedListener=F.prototype.VA=function(a){t.i(a,"function",F,"removeChangedListener:listener");null!==this.Cj&&(this.Cj.remove(a),0===this.Cj.count&&(this.Cj=null))};
  F.prototype.hw=function(a){this.Wa||this.ja.QE(a);if(null!==this.Cj){var b=this.Cj,c=b.length;if(1===c)b=b.wa(0),b(a);else if(0!==c)for(var d=b.Ie(),f=0;f<c;f++)b=d[f],b(a)}};F.prototype.raiseChangedEvent=F.prototype.Ic=function(a,b,c,d,f,g,h){de(this,"",a,b,c,d,f,g,h)};F.prototype.raiseChanged=F.prototype.j=function(a,b,c,d,f){de(this,"",vd,a,this,b,c,d,f)};F.prototype.raiseDataChanged=F.prototype.mx=function(a,b,c,d,f,g){de(this,"",vd,b,a,c,d,f,g)};
  function de(a,b,c,d,f,g,h,k,l){void 0===k&&(k=null);void 0===l&&(l=null);var m=new td;m.ba=a;m.td=c;m.Af=b;m.propertyName=d;m.object=f;m.oldValue=g;m.Yf=k;m.newValue=h;m.Wf=l;a.hw(m)}t.g(F,"undoManager",F.prototype.ja);t.defineProperty(F,{ja:"undoManager"},function(){return this.Cz},function(a){var b=this.Cz;b!==a&&(t.l(a,zd,F,"undoManager"),null!==b&&b.KJ(this),this.Cz=a,null!==a&&a.FH(this))});t.g(F,"skipsUndoManager",F.prototype.Wa);
  t.defineProperty(F,{Wa:"skipsUndoManager"},function(){return this.Li},function(a){t.i(a,"boolean",F,"skipsUndoManager");this.Li=a});
  F.prototype.changeState=function(a,b){if(null!==a&&a.ba===this)if(a.td===vd){var c=a.object,d=a.propertyName,f=a.za(b);t.Sa(c,d,f)}else a.td===wd?"nodeDataArray"===a.Af?(c=a.newValue,t.rb(c)&&(d=this.Hb(c),void 0!==d&&(b?(this.Zd&&t.yf(c,this,!0),t.Ui(this.Me,a.Wf),this.Bc.remove(d)):(this.Zd&&t.yf(c,this,!1),t.Ti(this.Me,a.Wf,c),this.Bc.add(d,c))))):""===a.Af?(c=a.object,!t.isArray(c)&&a.propertyName&&(c=t.hb(a.object,a.propertyName)),t.isArray(c)&&(d=a.newValue,f=a.Wf,b?t.Ui(c,f):t.Ti(c,f,d))):
  t.m("unknown ChangedEvent.Insert object: "+a.toString()):a.td===xd?"nodeDataArray"===a.Af?(c=a.oldValue,t.rb(c)&&(d=this.Hb(c),void 0!==d&&(b?(this.Zd&&t.yf(c,this,!1),t.Ti(this.Me,a.Yf,c),this.Bc.add(d,c)):(this.Zd&&t.yf(c,this,!0),t.Ui(this.Me,a.Yf),this.Bc.remove(d))))):""===a.Af?(c=a.object,!t.isArray(c)&&a.propertyName&&(c=t.hb(a.object,a.propertyName)),t.isArray(c)&&(d=a.oldValue,f=a.Yf,b?t.Ti(c,f,d):t.Ui(c,f))):t.m("unknown ChangedEvent.Remove object: "+a.toString()):a.td!==ud&&t.m("unknown ChangedEvent: "+
  a.toString())};F.prototype.startTransaction=F.prototype.sc=function(a){return this.ja.sc(a)};F.prototype.commitTransaction=F.prototype.Ce=function(a){return this.ja.Ce(a)};F.prototype.rollbackTransaction=F.prototype.Np=function(){return this.ja.Np()};F.prototype.updateTargetBindings=F.prototype.Qb=function(a,b){void 0===b&&(b="");de(this,"SourceChanged",ud,b,a,null,null)};t.g(F,"nodeKeyProperty",F.prototype.ij);
  t.defineProperty(F,{ij:"nodeKeyProperty"},function(){return this.hm},function(a){var b=this.hm;b!==a&&(ne(a,F,"nodeKeyProperty"),0<this.Bc.count&&t.m("Cannot set Model.nodeKeyProperty when there is existing node data"),this.hm=a,this.j("nodeKeyProperty",b,a))});function ne(a,b,c){"string"!==typeof a&&"function"!==typeof a&&t.bc(a,"string or function",b,c)}
  F.prototype.getKeyForNodeData=F.prototype.Hb=function(a){if(null!==a){var b=this.hm;if(""!==b&&(b=t.hb(a,b),void 0!==b)){if(oe(b))return b;t.m("Key value for node data "+a+" is not a number or a string: "+b)}}};
  F.prototype.setKeyForNodeData=F.prototype.cB=function(a,b){null===b&&(b=void 0);void 0===b||oe(b)||t.bc(b,"number or string",F,"setKeyForNodeData:key");if(null!==a){var c=this.hm;if(""!==c)if(this.ne(a)){var d=t.hb(a,c);d!==b&&null===this.uf(b)&&(t.Sa(a,c,b),this.Bc.remove(d),this.Bc.add(b,a),de(this,"nodeKey",vd,c,a,d,b),"string"===typeof c&&this.Qb(a,c),this.Ht(d,b))}else t.Sa(a,c,b)}};t.g(F,"makeUniqueKeyFunction",F.prototype.mJ);
  t.defineProperty(F,{mJ:"makeUniqueKeyFunction"},function(){return this.av},function(a){var b=this.av;b!==a&&(null!==a&&t.i(a,"function",F,"makeUniqueKeyFunction"),this.av=a,this.j("makeUniqueKeyFunction",b,a))});function oe(a){return"number"===typeof a||"string"===typeof a}F.prototype.containsNodeData=F.prototype.ne=function(a){a=this.Hb(a);return void 0===a?!1:this.Bc.contains(a)};
  F.prototype.findNodeDataForKey=F.prototype.uf=function(a){null===a&&t.m("Model.findNodeDataForKey:key must not be null");return void 0!==a&&oe(a)?this.Bc.za(a):null};t.g(F,"nodeDataArray",F.prototype.Gg);
  t.defineProperty(F,{Gg:"nodeDataArray"},function(){return this.Me},function(a){var b=this.Me;if(b!==a){t.Rs(a,F,"nodeDataArray");this.Zd&&t.zc&&(null!==b&&t.Xm(b,"nodeDataArray",this,!0),a=t.Xm(a,"nodeDataArray",this,!1));this.Bc.clear();this.oB();for(var c=t.vb(a),d=0;d<c;d++){var f=t.mb(a,d);if(!t.rb(f)){t.m("Model.nodeDataArray must only contain Objects, not: "+f);return}t.it(f)}this.Me=a;for(var g=new B(Object),d=0;d<c;d++){var f=t.mb(a,d),h=this.Hb(f);void 0===h?g.add(f):null!==this.Bc.za(h)?
  g.add(f):this.Bc.add(h,f)}for(d=g.k;d.next();)f=d.value,this.tF(f),g=this.Hb(f),this.Bc.add(g,f);de(this,"nodeDataArray",vd,"nodeDataArray",this,b,a);for(d=0;d<c;d++)f=t.mb(a,d),this.Mp(f),this.Lp(f);this.WD();t.ZI(a)||(this.ab=!0)}});
  F.prototype.makeNodeDataKeyUnique=F.prototype.tF=function(a){if(null!==a){var b=this.hm;if(""!==b){var c=this.Hb(a);if(void 0===c||this.Bc.contains(c)){var d=this.av;if(null!==d&&(c=d(this,a),void 0!==c&&null!==c&&!this.Bc.contains(c))){t.Sa(a,b,c);return}if("string"===typeof c){for(d=2;this.Bc.contains(c+d);)d++;t.Sa(a,b,c+d)}else if(void 0===c||"number"===typeof c){for(d=-this.Bc.count-1;this.Bc.contains(d);)d--;t.Sa(a,b,d)}else t.m("Model.getKeyForNodeData returned something other than a string or a number: "+
  c)}}}};F.prototype.addNodeData=F.prototype.ym=function(a){if(null!==a){this.Zd&&t.yf(a,this,!1);t.it(a);var b=this.Hb(a);if(void 0===b||this.Bc.za(b)!==a)this.tF(a),b=this.Hb(a),this.Bc.add(b,a),b=t.vb(this.Me),t.Ti(this.Me,b,a),de(this,"nodeDataArray",wd,"nodeDataArray",this,null,a,null,b),this.Mp(a),this.Lp(a)}};F.prototype.addNodeDataCollection=function(a){if(t.isArray(a))for(var b=t.vb(a),c=0;c<b;c++)this.ym(t.mb(a,c));else for(a=a.k;a.next();)this.ym(a.value)};
  F.prototype.removeNodeData=F.prototype.nx=function(a){if(null!==a){var b=this.Hb(a);void 0!==b&&this.Bc.contains(b)&&(this.Zd&&t.yf(a,this,!0),this.Bc.remove(b),b=t.Qz(this.Me,a),0>b||(t.Ui(this.Me,b),de(this,"nodeDataArray",xd,"nodeDataArray",this,a,null,b,null),this.Xt(a)))}};F.prototype.removeNodeDataCollection=function(a){if(t.isArray(a))for(var b=t.vb(a),c=0;c<b;c++)this.nx(t.mb(a,c));else for(a=a.k;a.next();)this.nx(a.value)};aa=F.prototype;
  aa.Ht=function(a,b){var c=pe(this,a);c instanceof C&&this.yh.add(b,c)};aa.oB=function(){};aa.Mp=function(){};aa.Lp=function(){};aa.Xt=function(){};function qe(a,b,c){if(void 0!==b){var d=a.yh.za(b);null===d&&(d=new C,a.yh.add(b,d));d.add(c)}}function re(a,b,c){if(void 0!==b){var d=a.yh.za(b);d instanceof C&&(void 0===c||null===c?a.yh.remove(b):(d.remove(c),0===d.count&&a.yh.remove(b)))}}function pe(a,b){if(void 0===b)return null;var c=a.yh.za(b);return c instanceof C?c:null}
  F.prototype.clearUnresolvedReferences=F.prototype.WD=function(a){void 0===a?this.yh.clear():this.yh.remove(a)};t.g(F,"copyNodeDataFunction",F.prototype.jI);t.defineProperty(F,{jI:"copyNodeDataFunction"},function(){return this.vu},function(a){var b=this.vu;b!==a&&(null!==a&&t.i(a,"function",F,"copyNodeDataFunction"),this.vu=a,this.j("copyNodeDataFunction",b,a))});t.g(F,"copiesArrays",F.prototype.rw);
  t.defineProperty(F,{rw:"copiesArrays"},function(){return this.wy},function(a){var b=this.wy;b!==a&&(null!==a&&t.i(a,"boolean",F,"copiesArrays"),this.wy=a,this.j("copiesArrays",b,a))});t.g(F,"copiesArrayObjects",F.prototype.qw);t.defineProperty(F,{qw:"copiesArrayObjects"},function(){return this.vy},function(a){var b=this.vy;b!==a&&(null!==a&&t.i(a,"boolean",F,"copiesArrayObjects"),this.vy=a,this.j("copiesArrayObjects",b,a))});
  F.prototype.copyNodeData=function(a){if(null===a)return null;var b=null,b=this.vu;if(null!==b)b=b(a,this);else{var b=new a.constructor,c;for(c in a){var d=t.hb(a,c);if((!e||!ze(a,c,d))&&this.rw&&Array.isArray(d)){for(var f=[],g=0;g<d.length;g++){var h=d[g];if(this.qw&&t.rb(h)){var k=new h.constructor,l;for(l in h){var m=t.hb(h,l);e&&ze(h,l,m);t.Sa(k,l,m)}h=k}f.push(h)}d=f}t.Sa(b,c,d)}this.Zd&&t.yf(b,this,!1)}b&&t.Ac(b);return b};
  function ze(a,b,c){return c instanceof Q||c instanceof z||c instanceof $d||c instanceof Ae||c instanceof Be||c instanceof ae||c instanceof oa||c instanceof be||c instanceof ld||c instanceof rd?("_"!==b[0]&&t.trace("Warning: found GraphObject or Diagram reference when copying model data on property '"+b+"' of data object: "+a.toString()+"  \nModel data should not have any references to a Diagram or any part of a diagram, such as: "+c.toString()),!0):c instanceof F||c instanceof zd||c instanceof ce||
  c instanceof td?!0:!1}
  F.prototype.setDataProperty=function(a,b,c){e&&(t.i(a,"object",F,"setDataProperty:data"),t.i(b,"string",F,"setDataProperty:propname"),""===b&&t.m("Model.setDataProperty: property name must not be an empty string when setting "+a+" to "+c));if(this.ne(a))if(b===this.ij)this.cB(a,c);else{if(b===this.ql){this.tx(a,c);return}}else!t.Zp&&a instanceof Q&&(t.Zp=!0,t.trace('Model.setDataProperty is modifying a GraphObject, "'+a.toString()+'"'),t.trace("  Is that really your intent?"));var d=t.hb(a,b);d!==
  c&&(t.Sa(a,b,c),this.mx(a,b,d,c))};F.prototype.addArrayItem=function(a,b){this.VI(a,-1,b)};F.prototype.insertArrayItem=F.prototype.VI=function(a,b,c){e&&(t.Rs(a,F,"insertArrayItem:arr"),t.q(b,F,"insertArrayItem:idx"));a===this.Me&&t.m("Model.insertArrayItem or Model.addArrayItem should not be called on the Model.nodeDataArray");0>b&&(b=t.vb(a));t.Ti(a,b,c);de(this,"",wd,"",a,null,c,null,b)};
  F.prototype.removeArrayItem=function(a,b){void 0===b&&(b=-1);e&&(t.Rs(a,F,"removeArrayItem:arr"),t.q(b,F,"removeArrayItem:idx"));a===this.Me&&t.m("Model.removeArrayItem should not be called on the Model.nodeDataArray");-1===b&&(b=t.vb(a)-1);var c=t.mb(a,b);t.Ui(a,b);de(this,"",xd,"",a,c,null,b,null)};t.g(F,"nodeCategoryProperty",F.prototype.ql);
  t.defineProperty(F,{ql:"nodeCategoryProperty"},function(){return this.Hr},function(a){var b=this.Hr;b!==a&&(ne(a,F,"nodeCategoryProperty"),this.Hr=a,this.j("nodeCategoryProperty",b,a))});F.prototype.getCategoryForNodeData=F.prototype.getCategoryForNodeData=function(a){if(null===a)return"";var b=this.Hr;if(""===b)return"";b=t.hb(a,b);if(void 0===b)return"";if("string"===typeof b)return b;t.m("getCategoryForNodeData found a non-string category for "+a+": "+b);return""};
  F.prototype.setCategoryForNodeData=F.prototype.tx=function(a,b){t.i(b,"string",F,"setCategoryForNodeData:cat");if(null!==a){var c=this.Hr;if(""!==c)if(this.ne(a)){var d=t.hb(a,c);void 0===d&&(d="");d!==b&&(t.Sa(a,c,b),de(this,"nodeCategory",vd,c,a,d,b))}else t.Sa(a,c,b)}};
  function P(a,b){2<arguments.length&&t.m("GraphLinksModel constructor can only take two optional arguments, the Array of node data and the Array of link data.");F.call(this);this.Xg=[];this.cm=new C(Object);this.wk=this.uu=null;this.yj="from";this.Bj="to";this.pr=this.or="";this.lr="category";this.Kh=this.ov="";this.nv="isGroup";this.Hj="group";this.xy=!1;void 0!==a&&(this.Gg=a);void 0!==b&&(this.hj=b)}t.ga("GraphLinksModel",P);t.Ka(P,F);
  P.prototype.clear=P.prototype.clear=function(){F.prototype.clear.call(this);this.Zd&&t.Xm(this.Xg,"linkDataArray",this,!0);this.Xg=[];this.cm.clear()};aa=P.prototype;aa.toString=function(a){void 0===a&&(a=0);if(2<=a)return this.kB();var b=(""!==this.name?this.name:"")+" GraphLinksModel";if(0<a){b+="\n node data:";a=this.Gg;var c=t.vb(a),d;for(d=0;d<c;d++)var f=t.mb(a,d),b=b+(" "+this.Hb(f)+":"+yd(f));b+="\n link data:";a=this.hj;c=t.vb(a);for(d=0;d<c;d++)f=t.mb(a,d),b+=" "+this.hl(f)+"--\x3e"+this.ll(f)}return b};
  aa.Zt=function(){var a=F.prototype.Zt.call(this),b="";"category"!==this.up&&"string"===typeof this.up&&(b+=',\n  "linkCategoryProperty": '+this.quote(this.up));"from"!==this.Ym&&"string"===typeof this.Ym&&(b+=',\n  "linkFromKeyProperty": '+this.quote(this.Ym));"to"!==this.Zm&&"string"===typeof this.Zm&&(b+=',\n  "linkToKeyProperty": '+this.quote(this.Zm));""!==this.vp&&"string"===typeof this.vp&&(b+=',\n  "linkFromPortIdProperty": '+this.quote(this.vp));""!==this.zp&&"string"===typeof this.zp&&(b+=
  ',\n  "linkToPortIdProperty": '+this.quote(this.zp));""!==this.Bt&&"string"===typeof this.Bt&&(b+=',\n  "nodeIsLinkLabelProperty": '+this.quote(this.Bt));""!==this.wp&&"string"===typeof this.wp&&(b+=',\n  "linkLabelKeysProperty": '+this.quote(this.wp));"isGroup"!==this.Ip&&"string"===typeof this.Ip&&(b+=',\n  "nodeIsGroupProperty": '+this.quote(this.Ip));"group"!==this.dn&&"string"===typeof this.dn&&(b+=',\n  "nodeGroupKeyProperty": '+this.quote(this.dn));return a+b};
  aa.tB=function(){var a=F.prototype.tB.call(this),b=',\n  "linkDataArray": '+Cd(this,this.hj,!0);return a+b};
  aa.Gt=function(a){F.prototype.Gt.call(this,a);a.linkFromKeyProperty&&(this.Ym=a.linkFromKeyProperty);a.linkToKeyProperty&&(this.Zm=a.linkToKeyProperty);a.linkFromPortIdProperty&&(this.vp=a.linkFromPortIdProperty);a.linkToPortIdProperty&&(this.zp=a.linkToPortIdProperty);a.linkCategoryProperty&&(this.up=a.linkCategoryProperty);a.nodeIsLinkLabelProperty&&(this.Bt=a.nodeIsLinkLabelProperty);a.linkLabelKeysProperty&&(this.wp=a.linkLabelKeysProperty);a.nodeIsGroupProperty&&(this.Ip=a.nodeIsGroupProperty);
  a.nodeGroupKeyProperty&&(this.dn=a.nodeGroupKeyProperty)};aa.RA=function(a){F.prototype.RA.call(this,a);if(a=a.linkDataArray)this.It(a),this.hj=a};
  P.prototype.changeState=function(a,b){if(a.td===wd){var c=null;"linkDataArray"===a.Af?c=this.Xg:"linkLabelKeys"===a.Af&&(c=this.jl(a.object));if(t.isArray(c)){b?(this.Zd&&t.rb(a.newValue)&&t.yf(a.newValue,this,!0),t.Ui(c,a.Wf)):(this.Zd&&t.rb(a.newValue)&&t.yf(a.newValue,this,!1),t.Ti(c,a.Wf,a.newValue));return}}else if(a.td===xd&&(c=null,"linkDataArray"===a.Af?c=this.Xg:"linkLabelKeys"===a.Af&&(c=this.jl(a.object)),t.isArray(c))){b?(this.Zd&&t.rb(a.oldValue)&&t.yf(a.oldValue,this,!1),t.Ti(c,a.Yf,
  a.oldValue)):(this.Zd&&t.rb(a.oldValue)&&t.yf(a.oldValue,this,!0),t.Ui(c,a.Yf));return}F.prototype.changeState.call(this,a,b)};t.g(P,"archetypeNodeData",P.prototype.Os);t.defineProperty(P,{Os:"archetypeNodeData"},function(){return this.wk},function(a){var b=this.wk;b!==a&&(null!==a&&t.l(a,Object,P,"archetypeNodeData"),this.wk=a,this.j("archetypeNodeData",b,a))});
  P.prototype.an=function(a){if(void 0!==a){var b=this.wk;if(null!==b){var c=this.uf(a);null===c&&(c=this.copyNodeData(b),t.Sa(c,this.hm,a),this.ym(c))}return a}};t.g(P,"linkFromKeyProperty",P.prototype.Ym);t.defineProperty(P,{Ym:"linkFromKeyProperty"},function(){return this.yj},function(a){var b=this.yj;b!==a&&(ne(a,P,"linkFromKeyProperty"),this.yj=a,this.j("linkFromKeyProperty",b,a))});
  P.prototype.getFromKeyForLinkData=P.prototype.hl=function(a){if(null!==a){var b=this.yj;if(""!==b&&(b=t.hb(a,b),void 0!==b)){if(oe(b))return b;t.m("FromKey value for link data "+a+" is not a number or a string: "+b)}}};
  P.prototype.setFromKeyForLinkData=P.prototype.vx=function(a,b){null===b&&(b=void 0);void 0===b||oe(b)||t.bc(b,"number or string",P,"setFromKeyForLinkData:key");if(null!==a){var c=this.yj;if(""!==c)if(b=this.an(b),this.Xi(a)){var d=t.hb(a,c);d!==b&&(re(this,d,a),t.Sa(a,c,b),null===this.uf(b)&&qe(this,b,a),de(this,"linkFromKey",vd,c,a,d,b),"string"===typeof c&&this.Qb(a,c))}else t.Sa(a,c,b)}};t.g(P,"linkToKeyProperty",P.prototype.Zm);
  t.defineProperty(P,{Zm:"linkToKeyProperty"},function(){return this.Bj},function(a){var b=this.Bj;b!==a&&(ne(a,P,"linkToKeyProperty"),this.Bj=a,this.j("linkToKeyProperty",b,a))});P.prototype.getToKeyForLinkData=P.prototype.ll=function(a){if(null!==a){var b=this.Bj;if(""!==b&&(b=t.hb(a,b),void 0!==b)){if(oe(b))return b;t.m("ToKey value for link data "+a+" is not a number or a string: "+b)}}};
  P.prototype.setToKeyForLinkData=P.prototype.xx=function(a,b){null===b&&(b=void 0);void 0===b||oe(b)||t.bc(b,"number or string",P,"setToKeyForLinkData:key");if(null!==a){var c=this.Bj;if(""!==c)if(b=this.an(b),this.Xi(a)){var d=t.hb(a,c);d!==b&&(re(this,d,a),t.Sa(a,c,b),null===this.uf(b)&&qe(this,b,a),de(this,"linkToKey",vd,c,a,d,b),"string"===typeof c&&this.Qb(a,c))}else t.Sa(a,c,b)}};t.g(P,"linkFromPortIdProperty",P.prototype.vp);
  t.defineProperty(P,{vp:"linkFromPortIdProperty"},function(){return this.or},function(a){var b=this.or;b!==a&&(ne(a,P,"linkFromPortIdProperty"),this.or=a,this.j("linkFromPortIdProperty",b,a))});P.prototype.getFromPortIdForLinkData=P.prototype.II=function(a){if(null===a)return"";var b=this.or;if(""===b)return"";a=t.hb(a,b);return void 0===a?"":a};
  P.prototype.setFromPortIdForLinkData=P.prototype.bB=function(a,b){t.i(b,"string",P,"setFromPortIdForLinkData:portname");if(null!==a){var c=this.or;if(""!==c)if(this.Xi(a)){var d=t.hb(a,c);void 0===d&&(d="");d!==b&&(t.Sa(a,c,b),de(this,"linkFromPortId",vd,c,a,d,b),"string"===typeof c&&this.Qb(a,c))}else t.Sa(a,c,b)}};t.g(P,"linkToPortIdProperty",P.prototype.zp);
  t.defineProperty(P,{zp:"linkToPortIdProperty"},function(){return this.pr},function(a){var b=this.pr;b!==a&&(ne(a,P,"linkToPortIdProperty"),this.pr=a,this.j("linkToPortIdProperty",b,a))});P.prototype.getToPortIdForLinkData=P.prototype.LI=function(a){if(null===a)return"";var b=this.pr;if(""===b)return"";a=t.hb(a,b);return void 0===a?"":a};
  P.prototype.setToPortIdForLinkData=P.prototype.eB=function(a,b){t.i(b,"string",P,"setToPortIdForLinkData:portname");if(null!==a){var c=this.pr;if(""!==c)if(this.Xi(a)){var d=t.hb(a,c);void 0===d&&(d="");d!==b&&(t.Sa(a,c,b),de(this,"linkToPortId",vd,c,a,d,b),"string"===typeof c&&this.Qb(a,c))}else t.Sa(a,c,b)}};t.g(P,"nodeIsLinkLabelProperty",P.prototype.Bt);
  t.defineProperty(P,{Bt:"nodeIsLinkLabelProperty"},function(){return this.ov},function(a){var b=this.ov;b!==a&&(ne(a,P,"nodeIsLinkLabelProperty"),this.ov=a,this.j("nodeIsLinkLabelProperty",b,a))});P.prototype.isLinkLabelForNodeData=P.prototype.YI=function(a){if(null===a)return!1;var b=this.ov;return""===b?!1:t.hb(a,b)?!0:!1};t.g(P,"linkLabelKeysProperty",P.prototype.wp);
  t.defineProperty(P,{wp:"linkLabelKeysProperty"},function(){return this.Kh},function(a){var b=this.Kh;b!==a&&(ne(a,P,"linkLabelKeysProperty"),this.Kh=a,this.j("linkLabelKeysProperty",b,a))});P.prototype.getLabelKeysForLinkData=P.prototype.jl=function(a){if(null===a)return t.ji;var b=this.Kh;if(""===b)return t.ji;a=t.hb(a,b);return void 0===a?t.ji:a};
  P.prototype.setLabelKeysForLinkData=P.prototype.nG=function(a,b){t.Rs(b,P,"setLabelKeysForLinkData:arr");if(null!==a){var c=this.Kh;if(""!==c)if(this.Xi(a)){var d=t.hb(a,c);void 0===d&&(d=t.ji);if(d!==b){for(var f=t.vb(d),g=0;g<f;g++){var h=t.mb(d,g);re(this,h,a)}t.Sa(a,c,b);f=t.vb(b);for(g=0;g<f;g++)h=t.mb(b,g),null===this.uf(h)&&qe(this,h,a);de(this,"linkLabelKeys",vd,c,a,d,b);"string"===typeof c&&this.Qb(a,c)}}else t.Sa(a,c,b)}};
  P.prototype.addLabelKeyForLinkData=P.prototype.JD=function(a,b){if(null!==b&&void 0!==b&&(oe(b)||t.bc(b,"number or string",P,"addLabelKeyForLinkData:key"),null!==a)){var c=this.Kh;if(""!==c){var d=t.hb(a,c);void 0===d?this.nG(a,[b]):t.isArray(d)?0<=t.Qz(d,b)||(t.Ti(d,Infinity,b),this.Xi(a)&&(null===this.uf(b)&&qe(this,b,a),de(this,"linkLabelKeys",wd,c,a,null,b))):t.m(c+" property is not an Array; cannot addLabelKeyForLinkData: "+a)}}};
  P.prototype.removeLabelKeyForLinkData=P.prototype.JJ=function(a,b){if(null!==b&&void 0!==b&&(oe(b)||t.bc(b,"number or string",P,"removeLabelKeyForLinkData:key"),null!==a)){var c=this.Kh;if(""!==c){var d=t.hb(a,c);if(t.isArray(d)){var f=t.Qz(d,b);0>f||(t.Ui(d,f),this.Xi(a)&&(re(this,b,a),de(this,"linkLabelKeys",xd,c,a,b,null)))}else void 0!==d&&t.m(c+" property is not an Array; cannot removeLabelKeyforLinkData: "+a)}}};t.g(P,"linkDataArray",P.prototype.hj);
  t.defineProperty(P,{hj:"linkDataArray"},function(){return this.Xg},function(a){var b=this.Xg;if(b!==a){t.Rs(a,P,"linkDataArray");this.Zd&&t.zc&&(null!==b&&t.Xm(b,"linkDataArray",this,!0),a=t.Xm(a,"linkDataArray",this,!1));for(var c=t.vb(a),d=0;d<c;d++){var f=t.mb(a,d);if(!t.rb(f)){t.m("GraphLinksModel.linkDataArray must only contain Objects, not: "+f);return}t.it(f)}this.Xg=a;for(var g=new C(Object),d=0;d<c;d++)f=t.mb(a,d),g.add(f);this.cm=g;de(this,"linkDataArray",vd,"linkDataArray",this,b,a);for(d=
  0;d<c;d++)f=t.mb(a,d),Ce(this,f)}});P.prototype.containsLinkData=P.prototype.Xi=function(a){return null===a?!1:this.cm.contains(a)};P.prototype.addLinkData=P.prototype.$v=function(a){if(null!==a){this.Zd&&t.yf(a,this,!1);if(void 0===t.od(a))t.Ac(a);else if(this.Xi(a))return;this.cm.add(a);var b=t.vb(this.Xg);t.Ti(this.Xg,b,a);de(this,"linkDataArray",wd,"linkDataArray",this,null,a,null,b);Ce(this,a)}};
  P.prototype.addLinkDataCollection=function(a){if(t.isArray(a))for(var b=t.vb(a),c=0;c<b;c++)this.$v(t.mb(a,c));else for(a=a.k;a.next();)this.$v(a.value)};
  P.prototype.removeLinkData=P.prototype.WA=function(a){if(null!==a){this.Zd&&t.yf(a,this,!0);this.cm.remove(a);var b=this.Xg.indexOf(a);if(!(0>b)){t.Ui(this.Xg,b);de(this,"linkDataArray",xd,"linkDataArray",this,a,null,b,null);b=this.hl(a);re(this,b,a);b=this.ll(a);re(this,b,a);var c=this.jl(a);if(t.isArray(c))for(var d=t.vb(c),f=0;f<d;f++)b=t.mb(c,f),re(this,b,a)}}};P.prototype.removeLinkDataCollection=function(a){if(t.isArray(a))for(var b=t.vb(a),c=0;c<b;c++)this.WA(t.mb(a,c));else for(a=a.k;a.next();)this.WA(a.value)};
  function Ce(a,b){var c=a.hl(b),c=a.an(c);null===a.uf(c)&&qe(a,c,b);c=a.ll(b);c=a.an(c);null===a.uf(c)&&qe(a,c,b);var d=a.jl(b);if(t.isArray(d))for(var f=t.vb(d),g=0;g<f;g++)c=t.mb(d,g),null===a.uf(c)&&qe(a,c,b)}t.g(P,"copyLinkDataFunction",P.prototype.iI);t.defineProperty(P,{iI:"copyLinkDataFunction"},function(){return this.uu},function(a){var b=this.uu;b!==a&&(null!==a&&t.i(a,"function",P,"copyLinkDataFunction"),this.uu=a,this.j("copyLinkDataFunction",b,a))});
  P.prototype.copyLinkData=P.prototype.gE=function(a){if(null===a)return null;var b=null,b=this.uu;if(null!==b)b=b(a,this);else{var b=new a.constructor,c;for(c in a){var d=t.hb(a,c);e&&ze(a,c,d);t.Sa(b,c,d)}this.Zd&&t.yf(b,this,!1)}b&&(t.Ac(b),""!==this.yj&&t.Sa(b,this.yj,void 0),""!==this.Bj&&t.Sa(b,this.Bj,void 0),""!==this.Kh&&t.Sa(b,this.Kh,[]));return b};t.g(P,"nodeIsGroupProperty",P.prototype.Ip);
  t.defineProperty(P,{Ip:"nodeIsGroupProperty"},function(){return this.nv},function(a){var b=this.nv;b!==a&&(ne(a,P,"nodeIsGroupProperty"),this.nv=a,this.j("nodeIsGroupProperty",b,a))});P.prototype.isGroupForNodeData=P.prototype.tA=function(a){if(null===a)return!1;var b=this.nv;return""===b?!1:t.hb(a,b)?!0:!1};t.g(P,"nodeGroupKeyProperty",P.prototype.dn);
  t.defineProperty(P,{dn:"nodeGroupKeyProperty"},function(){return this.Hj},function(a){var b=this.Hj;b!==a&&(ne(a,P,"nodeGroupKeyProperty"),this.Hj=a,this.j("nodeGroupKeyProperty",b,a))});t.g(P,"copiesGroupKeyOfNodeData",P.prototype.al);t.defineProperty(P,{al:"copiesGroupKeyOfNodeData"},function(){return this.xy},function(a){this.xy!==a&&(t.i(a,"boolean",P,"copiesGroupKeyOfNodeData"),this.xy=a)});
  P.prototype.getGroupKeyForNodeData=P.prototype.Rm=function(a){if(null!==a){var b=this.Hj;if(""!==b&&(b=t.hb(a,b),void 0!==b)){if(oe(b))return b;t.m("GroupKey value for node data "+a+" is not a number or a string: "+b)}}};
  P.prototype.setGroupKeyForNodeData=P.prototype.wx=function(a,b){null===b&&(b=void 0);void 0===b||oe(b)||t.bc(b,"number or string",P,"setGroupKeyForNodeData:key");if(null!==a){var c=this.Hj;if(""!==c)if(this.ne(a)){var d=t.hb(a,c);d!==b&&(re(this,d,a),t.Sa(a,c,b),null===this.uf(b)&&qe(this,b,a),de(this,"nodeGroupKey",vd,c,a,d,b),"string"===typeof c&&this.Qb(a,c))}else t.Sa(a,c,b)}};
  P.prototype.copyNodeData=function(a){if(null===a)return null;a=F.prototype.copyNodeData.call(this,a);this.al||""===this.Hj||t.Sa(a,this.Hj,void 0);return a};
  P.prototype.setDataProperty=function(a,b,c){e&&(t.i(a,"object",P,"setDataProperty:data"),t.i(b,"string",P,"setDataProperty:propname"),""===b&&t.m("GraphLinksModel.setDataProperty: property name must not be an empty string when setting "+a+" to "+c));if(this.ne(a))if(b===this.ij)this.cB(a,c);else{if(b===this.ql){this.tx(a,c);return}if(b===this.dn){this.wx(a,c);return}b===this.Ip&&t.m("GraphLinksModel.setDataProperty: property name must not be the nodeIsGroupProperty: "+b)}else if(this.Xi(a)){if(b===
  this.Ym){this.vx(a,c);return}if(b===this.Zm){this.xx(a,c);return}if(b===this.vp){this.bB(a,c);return}if(b===this.zp){this.eB(a,c);return}if(b===this.up){this.mG(a,c);return}if(b===this.wp){this.nG(a,c);return}}else!t.Zp&&a instanceof Q&&(t.Zp=!0,t.trace('GraphLinksModel.setDataProperty is modifying a GraphObject, "'+a.toString()+'"'),t.trace("  Is that really your intent?"));var d=t.hb(a,b);d!==c&&(t.Sa(a,b,c),this.mx(a,b,d,c))};aa=P.prototype;
  aa.Ht=function(a,b){F.prototype.Ht.call(this,a,b);for(var c=this.Bc.k;c.next();)this.YA(c.value,a,b);for(c=this.cm.k;c.next();){var d=c.value,f=a,g=b;if(this.hl(d)===f){var h=this.yj;t.Sa(d,h,g);de(this,"linkFromKey",vd,h,d,f,g);"string"===typeof h&&this.Qb(d,h)}this.ll(d)===f&&(h=this.Bj,t.Sa(d,h,g),de(this,"linkToKey",vd,h,d,f,g),"string"===typeof h&&this.Qb(d,h));var k=this.jl(d);if(t.isArray(k))for(var l=t.vb(k),h=this.Kh,m=0;m<l;m++)t.mb(k,m)===f&&(t.OD(k,m,g),de(this,"linkLabelKeys",wd,h,d,
  f,g))}};aa.YA=function(a,b,c){if(this.Rm(a)===b){var d=this.Hj;t.Sa(a,d,c);de(this,"nodeGroupKey",vd,d,a,b,c);"string"===typeof d&&this.Qb(a,d)}};aa.oB=function(){F.prototype.oB.call(this);for(var a=this.hj,b=t.vb(a),c=0;c<b;c++){var d=t.mb(a,c);Ce(this,d)}};
  aa.Mp=function(a){F.prototype.Mp.call(this,a);a=this.Hb(a);var b=pe(this,a);if(null!==b){for(var c=new B(Object),b=b.k;b.next();){var d=b.value;if(this.ne(d)){if(this.Rm(d)===a){var f=this.Hj;de(this,"nodeGroupKey",vd,f,d,a,a);"string"===typeof f&&this.Qb(d,f);c.add(d)}}else{this.hl(d)===a&&(f=this.yj,de(this,"linkFromKey",vd,f,d,a,a),"string"===typeof f&&this.Qb(d,f),c.add(d));this.ll(d)===a&&(f=this.Bj,de(this,"linkToKey",vd,f,d,a,a),"string"===typeof f&&this.Qb(d,f),c.add(d));var g=this.jl(d);
  if(t.isArray(g))for(var h=t.vb(g),f=this.Kh,k=0;k<h;k++)t.mb(g,k)===a&&(de(this,"linkLabelKeys",wd,f,d,a,a),c.add(d))}}for(c=c.k;c.next();)re(this,a,c.value)}};aa.Lp=function(a){F.prototype.Lp.call(this,a);var b=this.Rm(a);null===this.uf(b)&&qe(this,b,a)};aa.Xt=function(a){F.prototype.Xt.call(this,a);var b=this.Rm(a);re(this,b,a)};t.g(P,"linkCategoryProperty",P.prototype.up);
  t.defineProperty(P,{up:"linkCategoryProperty"},function(){return this.lr},function(a){var b=this.lr;b!==a&&(ne(a,P,"linkCategoryProperty"),this.lr=a,this.j("linkCategoryProperty",b,a))});P.prototype.getCategoryForLinkData=P.prototype.getCategoryForLinkData=function(a){if(null===a)return"";var b=this.lr;if(""===b)return"";b=t.hb(a,b);if(void 0===b)return"";if("string"===typeof b)return b;t.m("getCategoryForLinkData found a non-string category for "+a+": "+b);return""};
  P.prototype.setCategoryForLinkData=P.prototype.mG=function(a,b){t.i(b,"string",P,"setCategoryForLinkData:cat");if(null!==a){var c=this.lr;if(""===c)return"";if(this.Xi(a)){var d=t.hb(a,c);void 0===d&&(d="");d!==b&&(t.Sa(a,c,b),de(this,"linkCategory",vd,c,a,d,b),"string"===typeof c&&this.Qb(a,c))}else t.Sa(a,c,b)}};
  function Kd(a){1<arguments.length&&t.m("TreeModel constructor can only take one optional argument, the Array of node data.");F.call(this);this.Ij="parent";this.yy=!1;this.Lr="parentLinkCategory";void 0!==a&&(this.Gg=a)}t.ga("TreeModel",Kd);t.Ka(Kd,F);Kd.prototype.toString=function(a){void 0===a&&(a=0);if(2<=a)return this.kB();var b=(""!==this.name?this.name:"")+" TreeModel";if(0<a){b+="\n node data:";a=this.Gg;var c=t.vb(a),d;for(d=0;d<c;d++)var f=t.mb(a,d),b=b+(" "+this.Hb(f)+":"+yd(f))}return b};
  Kd.prototype.Zt=function(){var a=F.prototype.Zt.call(this),b="";"parent"!==this.en&&"string"===typeof this.en&&(b+=',\n  "nodeParentKeyProperty": '+this.quote(this.en));return a+b};Kd.prototype.Gt=function(a){F.prototype.Gt.call(this,a);a.nodeParentKeyProperty&&(this.en=a.nodeParentKeyProperty)};Kd.prototype.an=function(a){return a};t.g(Kd,"nodeParentKeyProperty",Kd.prototype.en);
  t.defineProperty(Kd,{en:"nodeParentKeyProperty"},function(){return this.Ij},function(a){var b=this.Ij;b!==a&&(ne(a,Kd,"nodeParentKeyProperty"),this.Ij=a,this.j("nodeParentKeyProperty",b,a))});t.g(Kd,"copiesParentKeyOfNodeData",Kd.prototype.bl);t.defineProperty(Kd,{bl:"copiesParentKeyOfNodeData"},function(){return this.yy},function(a){this.yy!==a&&(t.i(a,"boolean",Kd,"copiesParentKeyOfNodeData"),this.yy=a)});
  Kd.prototype.getParentKeyForNodeData=Kd.prototype.Sm=function(a){if(null!==a){var b=this.Ij;if(""!==b&&(b=t.hb(a,b),void 0!==b)){if(oe(b))return b;t.m("ParentKey value for node data "+a+" is not a number or a string: "+b)}}};
  Kd.prototype.setParentKeyForNodeData=Kd.prototype.mh=function(a,b){null===b&&(b=void 0);void 0===b||oe(b)||t.bc(b,"number or string",Kd,"setParentKeyForNodeData:key");if(null!==a){var c=this.Ij;if(""!==c)if(b=this.an(b),this.ne(a)){var d=t.hb(a,c);d!==b&&(re(this,d,a),t.Sa(a,c,b),null===this.uf(b)&&qe(this,b,a),de(this,"nodeParentKey",vd,c,a,d,b),"string"===typeof c&&this.Qb(a,c))}else t.Sa(a,c,b)}};t.g(Kd,"parentLinkCategoryProperty",Kd.prototype.DJ);
  t.defineProperty(Kd,{DJ:"parentLinkCategoryProperty"},function(){return this.Lr},function(a){var b=this.Lr;b!==a&&(ne(a,Kd,"parentLinkCategoryProperty"),this.Lr=a,this.j("parentLinkCategoryProperty",b,a))});Kd.prototype.getParentLinkCategoryForNodeData=Kd.prototype.KI=function(a){if(null===a)return"";var b=this.Lr;if(""===b)return"";b=t.hb(a,b);if(void 0===b)return"";if("string"===typeof b)return b;t.m("getParentLinkCategoryForNodeData found a non-string category for "+a+": "+b);return""};
  Kd.prototype.setParentLinkCategoryForNodeData=Kd.prototype.PJ=function(a,b){t.i(b,"string",Kd,"setParentLinkCategoryForNodeData:cat");if(null!==a){var c=this.Lr;if(""===c)return"";if(this.ne(a)){var d=t.hb(a,c);void 0===d&&(d="");d!==b&&(t.Sa(a,c,b),de(this,"parentLinkCategory",vd,c,a,d,b),"string"===typeof c&&this.Qb(a,c))}else t.Sa(a,c,b)}};Kd.prototype.copyNodeData=function(a){if(null===a)return null;a=F.prototype.copyNodeData.call(this,a);this.bl||""===this.Ij||t.Sa(a,this.Ij,void 0);return a};
  Kd.prototype.setDataProperty=function(a,b,c){e&&(t.i(a,"object",Kd,"setDataProperty:data"),t.i(b,"string",Kd,"setDataProperty:propname"),""===b&&t.m("TreeModel.setDataProperty: property name must not be an empty string when setting "+a+" to "+c));if(this.ne(a))if(b===this.ij)this.cB(a,c);else{if(b===this.ql){this.tx(a,c);return}if(b===this.en){this.mh(a,c);return}}else!t.Zp&&a instanceof Q&&(t.Zp=!0,t.trace('TreeModel.setDataProperty is modifying a GraphObject, "'+a.toString()+'"'),t.trace("  Is that really your intent?"));
  var d=t.hb(a,b);d!==c&&(t.Sa(a,b,c),this.mx(a,b,d,c))};aa=Kd.prototype;aa.Ht=function(a,b){F.prototype.Ht.call(this,a,b);for(var c=this.Bc.k;c.next();)this.YA(c.value,a,b)};aa.YA=function(a,b,c){if(this.Sm(a)===b){var d=this.Ij;t.Sa(a,d,c);de(this,"nodeParentKey",vd,d,a,b,c);"string"===typeof d&&this.Qb(a,d)}};
  aa.Mp=function(a){F.prototype.Mp.call(this,a);a=this.Hb(a);var b=pe(this,a);if(null!==b){for(var c=new B(Object),b=b.k;b.next();){var d=b.value;if(this.ne(d)&&this.Sm(d)===a){var f=this.Ij;de(this,"nodeParentKey",vd,f,d,a,a);"string"===typeof f&&this.Qb(d,f);c.add(d)}}for(c=c.k;c.next();)re(this,a,c.value)}};aa.Lp=function(a){F.prototype.Lp.call(this,a);var b=this.Sm(a),b=this.an(b);null===this.uf(b)&&qe(this,b,a)};aa.Xt=function(a){F.prototype.Xt.call(this,a);var b=this.Sm(a);re(this,b,a)};
  function De(a,b,c){t.Ac(this);void 0===a?a="":t.i(a,"string",De,"constructor:targetprop");void 0===b?b=a:t.i(b,"string",De,"constructor:sourceprop");void 0===c?c=null:null!==c&&t.i(c,"function",De,"constructor:conv");this.mD="";this.pg=null;this.Rv=a;this.Pv=this.yz=0;this.hD=null;this.Jv=b;this.uy=c;this.hz=Ee;this.my=null}t.ga("Binding",De);var Ee;De.OneWay=Ee=t.w(De,"OneWay",1);var Fe;De.TwoWay=Fe=t.w(De,"TwoWay",2);
  De.parseEnum=function(a,b){t.i(a,"function",De,"parseEnum:ctor");t.Aa(b,a,De,"parseEnum:defval");return function(c){return t.Om(a,c)||b}};var yd;De.toString=yd=function(a){var b=a;t.rb(a)&&(a.text?b=a.text:a.name?b=a.name:void 0!==a.key?b=a.key:void 0!==a.id?b=a.id:a.constructor===Object&&(a.Text?b=a.Text:a.Name?b=a.Name:void 0!==a.Key?b=a.Key:void 0!==a.Id?b=a.Id:void 0!==a.ID&&(b=a.ID)));return void 0===b?"undefined":null===b?"null":b.toString()};
  De.prototype.toString=function(){return"Binding("+this.nn+" "+this.Ut+":"+this.gB+")"};De.prototype.freeze=function(){this.ob=!0;return this};De.prototype.La=function(){this.ob=!1;return this};t.g(De,"targetId",De.prototype.nn);t.defineProperty(De,{nn:null},function(){return this.mD},function(a){t.L(this);t.i(a,"string",De,"targetId");this.mD=a});t.g(De,"targetProperty",De.prototype.Ut);
  t.defineProperty(De,{Ut:"targetProperty"},function(){return this.Rv},function(a){t.L(this);t.i(a,"string",De,"targetProperty");this.Rv=a});t.g(De,"sourceName",De.prototype.St);t.defineProperty(De,{St:"sourceName"},function(){return this.hD},function(a){t.L(this);t.i(a,"string",De,"sourceName");this.hD=a});t.g(De,"sourceProperty",De.prototype.gB);t.defineProperty(De,{gB:"sourceProperty"},function(){return this.Jv},function(a){t.L(this);t.i(a,"string",De,"sourceProperty");this.Jv=a});
  t.g(De,"converter",De.prototype.dE);t.defineProperty(De,{dE:"converter"},function(){return this.uy},function(a){t.L(this);null!==a&&t.i(a,"function",De,"converter");this.uy=a});t.g(De,"backConverter",De.prototype.SD);t.defineProperty(De,{SD:"backConverter"},function(){return this.my},function(a){t.L(this);null!==a&&t.i(a,"function",De,"backConverter");this.my=a});t.g(De,"mode",De.prototype.mode);
  t.defineProperty(De,{mode:"mode"},function(){return this.hz},function(a){t.L(this);t.Aa(a,De,De,"mode");this.hz=a});De.prototype.makeTwoWay=function(a){void 0===a&&(a=null);null!==a&&t.i(a,"function",De,"makeTwoWay");this.mode=Fe;this.SD=a;return this};De.prototype.ofObject=De.prototype.LA=function(a){void 0===a&&(a="");e&&t.i(a,"string",De,"ofObject:srcname");this.St=a;return this};
  De.prototype.updateTarget=De.prototype.QG=function(a,b,c){var d=this.Jv;if(!c||d===c){c=this.Rv;var f=this.uy;if(null===f&&""===c)t.trace("Binding error: target property is the empty string: "+this.toString());else{e&&"string"===typeof c&&("function"!==typeof a.setAttribute&&0<c.length&&"_"!==c[0]&&!t.Kw(a,c)?t.trace("Binding error: undefined target property: "+c+" on "+a.toString()):"name"===c&&a instanceof Q&&t.trace("Binding error: cannot modify GraphObject.name on "+a.toString()));var g=b;""!==
  d&&(g=t.hb(b,d));if(void 0!==g)if(null===f)""!==c&&t.Sa(a,c,g);else try{if(""!==c){var h=f(g,a);e&&void 0===h&&t.trace('Binding warning: conversion function returned undefined when setting target property "'+c+'" on '+a.toString()+", function is: "+f);t.Sa(a,c,h)}else f(g,a)}catch(k){e&&t.trace("Binding error: "+k.toString()+' setting target property "'+c+'" on '+a.toString()+" with conversion function: "+f)}}}};
  De.prototype.updateSource=De.prototype.pB=function(a,b,c,d){if(this.hz===Fe){var f=this.Rv;if(!c||f===c){c=this.Jv;var g=this.my;if(null!==g||""!==c){var h=a;""!==f&&(h=t.hb(a,f));if(void 0!==h)if(null===g)d&&d.ba?(e&&d.ba.ij===c&&d.ba.ne(b)&&t.trace("Binding error: cannot have TwoWay Binding on node data key property: "+this.toString()),d.ba.setDataProperty(b,c,h)):t.Sa(b,c,h);else try{if(""!==c){var k=g(h,b);d&&d.ba?(e&&(d.ba.ij===c&&d.ba.ne(b)&&t.trace("Binding error: cannot have TwoWay Binding on node data key property: "+
  this.toString()),void 0===k&&t.trace('Binding warning: conversion function returned undefined when setting source property "'+c+'" on '+b.toString()+", function is: "+g)),d.ba.setDataProperty(b,c,k)):t.Sa(b,c,k)}else g(h,b)}catch(l){e&&t.trace("Binding error: "+l.toString()+' setting source property "'+c+'" on '+b.toString()+" with conversion function: "+g)}}}}};function ce(){this.jH=(new B(td)).freeze();this.Yb="";this.pC=!1}t.ga("Transaction",ce);
  ce.prototype.toString=function(a){var b="Transaction: "+this.name+" "+this.dh.count.toString()+(this.op?"":", incomplete");if(void 0!==a&&0<a)for(var c=this.dh.count,d=0;d<c;d++){var f=this.dh.wa(d);null!==f&&(b+="\n  "+f.toString(a-1))}return b};ce.prototype.clear=ce.prototype.clear=function(){var a=this.dh;a.La();for(var b=a.count-1;0<=b;b--){var c=a.wa(b);null!==c&&c.clear()}a.clear();a.freeze()};ce.prototype.canUndo=ce.prototype.canUndo=function(){return this.op};
  ce.prototype.undo=ce.prototype.undo=function(){if(this.canUndo())for(var a=this.dh.count-1;0<=a;a--){var b=this.dh.wa(a);null!==b&&b.undo()}};ce.prototype.canRedo=ce.prototype.canRedo=function(){return this.op};ce.prototype.redo=ce.prototype.redo=function(){if(this.canRedo())for(var a=this.dh.count,b=0;b<a;b++){var c=this.dh.wa(b);null!==c&&c.redo()}};t.A(ce,{dh:"changes"},function(){return this.jH});t.g(ce,"name",ce.prototype.name);
  t.defineProperty(ce,{name:"name"},function(){return this.Yb},function(a){this.Yb=a});t.g(ce,"isComplete",ce.prototype.op);t.defineProperty(ce,{op:"isComplete"},function(){return this.pC},function(a){this.pC=a});function zd(){this.jz=new C(F);this.Le=!1;this.pH=(new B(ce)).freeze();this.Ug=-1;this.EC=999;this.xi=!1;this.Au=null;this.Uk=0;this.ny=!1;e&&(this.ny=!0);this.$g=(new B("string")).freeze();this.ro=new B("number");this.Ry=!0;this.dz=!1}t.ga("UndoManager",zd);
  zd.prototype.toString=function(a){for(var b="UndoManager "+this.cj+"<"+this.history.count+"<="+this.CA,b=b+"[",c=this.FF.count,d=0;d<c;d++)0<d&&(b+=" "),b+=this.FF.wa(d);b+="]";if(void 0!==a&&0<a)for(c=this.history.count,d=0;d<c;d++)b+="\n "+this.history.wa(d).toString(a-1);return b};
  zd.prototype.clear=zd.prototype.clear=function(){var a=this.history;a.La();for(var b=a.count-1;0<=b;b--){var c=a.wa(b);null!==c&&c.clear()}a.clear();this.Ug=-1;a.freeze();this.xi=!1;this.Au=null;this.Uk=0;this.$g.La();this.$g.clear();this.$g.freeze();this.ro.clear()};zd.prototype.addModel=zd.prototype.FH=function(a){this.jz.add(a)};zd.prototype.removeModel=zd.prototype.KJ=function(a){this.jz.remove(a)};
  zd.prototype.startTransaction=zd.prototype.sc=function(a){void 0===a&&(a="");null===a&&(a="");if(this.sb)return!1;!0===this.Ry&&(this.Ry=!1,this.Uk++,this.Xc("StartingFirstTransaction",a,this.Yi),0<this.Uk&&this.Uk--);this.isEnabled&&(this.$g.La(),this.$g.add(a),this.$g.freeze(),null===this.Yi?this.ro.add(0):this.ro.add(this.Yi.dh.count));this.Uk++;var b=1===this.Je;b&&this.Xc("StartedTransaction",a,this.Yi);return b};zd.prototype.commitTransaction=zd.prototype.Ce=function(a){return Ge(this,!0,a)};
  zd.prototype.rollbackTransaction=zd.prototype.Np=function(){return Ge(this,!1,"")};
  function Ge(a,b,c){if(a.sb)return!1;a.Uz&&1>a.Je&&t.trace("Ending transaction without having started a transaction: "+c);var d=1===a.Je;d&&b&&a.isEnabled&&a.Xc("CommittingTransaction",c,a.Yi);var f=0;if(0<a.Je&&(a.Uk--,a.isEnabled)){var g=a.$g.count;0<g&&(""===c&&(c=a.$g.wa(0)),a.$g.La(),a.$g.qd(g-1),a.$g.freeze());g=a.ro.count;0<g&&(f=a.ro.wa(g-1),a.ro.qd(g-1))}g=a.Yi;if(d){if(b){a.dz=!1;if(a.isEnabled&&null!==g){b=g;b.op=!0;b.name=c;d=a.history;d.La();for(f=d.count-1;f>a.cj;f--)g=d.wa(f),null!==
  g&&g.clear(),d.qd(f),a.dz=!0;f=a.CA;0===f&&(f=1);0<f&&d.count>=f&&(g=d.wa(0),null!==g&&g.clear(),d.qd(0),a.Ug--);d.add(b);a.Ug++;d.freeze();g=b}a.Xc("CommittedTransaction",c,g)}else{a.xi=!0;try{a.isEnabled&&null!==g&&(g.op=!0,g.undo())}finally{a.Xc("RolledBackTransaction",c,g),a.xi=!1}null!==g&&g.clear()}a.Au=null;return!0}if(a.isEnabled&&!b&&null!==g){a=f;c=g.dh;for(b=c.count-1;b>=a;b--)d=c.wa(b),null!==d&&d.undo(),c.La(),c.qd(b);c.freeze()}return!1}
  zd.prototype.canUndo=zd.prototype.canUndo=function(){if(!this.isEnabled||0<this.Je||this.sb)return!1;var a=this.IG;return null!==a&&a.canUndo()?!0:!1};zd.prototype.undo=zd.prototype.undo=function(){if(this.canUndo()){var a=this.IG;try{this.Xc("StartingUndo","Undo",a),this.xi=!0,this.Ug--,a.undo()}catch(b){t.trace("undo error: "+b.toString())}finally{this.xi=!1,this.Xc("FinishedUndo","Undo",a)}}};
  zd.prototype.canRedo=zd.prototype.canRedo=function(){if(!this.isEnabled||0<this.Je||this.sb)return!1;var a=this.HG;return null!==a&&a.canRedo()?!0:!1};zd.prototype.redo=zd.prototype.redo=function(){if(this.canRedo()){var a=this.HG;try{this.Xc("StartingRedo","Redo",a),this.xi=!0,this.Ug++,a.redo()}catch(b){t.trace("redo error: "+b.toString())}finally{this.xi=!1,this.Xc("FinishedRedo","Redo",a)}}};
  zd.prototype.Xc=function(a,b,c){void 0===c&&(c=null);var d=new td;d.td=ud;d.propertyName=a;d.object=c;d.oldValue=b;for(a=this.rJ;a.next();)b=a.value,d.ba=b,b.hw(d)};zd.prototype.handleChanged=zd.prototype.QE=function(a){if(this.isEnabled&&!this.sb&&!this.skipsEvent(a)){var b=this.Yi;null===b&&(this.Au=b=new ce);var c=a.copy(),b=b.dh;b.La();b.add(c);b.freeze();this.Uz&&0>=this.Je&&!this.Ry&&(a=a.h,null!==a&&!1===a.lf||t.trace("Change not within a transaction: "+c.toString()))}};
  zd.prototype.skipsEvent=function(a){if(null===a||0>a.td.value)return!0;a=a.object;if(a instanceof Q){if(a=a.layer,null!==a&&a.yc)return!0}else if(a instanceof $d&&a.yc)return!0;return!1};t.A(zd,{rJ:"models"},function(){return this.jz.k});t.g(zd,"isEnabled",zd.prototype.isEnabled);t.defineProperty(zd,{isEnabled:"isEnabled"},function(){return this.Le},function(a){this.Le=a});t.A(zd,{IG:"transactionToUndo"},function(){return 0<=this.cj&&this.cj<=this.history.count-1?this.history.wa(this.cj):null});
  t.A(zd,{HG:"transactionToRedo"},function(){return this.cj<this.history.count-1?this.history.wa(this.cj+1):null});t.A(zd,{sb:"isUndoingRedoing"},function(){return this.xi});t.A(zd,{history:"history"},function(){return this.pH});t.g(zd,"maxHistoryLength",zd.prototype.CA);t.defineProperty(zd,{CA:"maxHistoryLength"},function(){return this.EC},function(a){this.EC=a});t.A(zd,{cj:"historyIndex"},function(){return this.Ug});t.A(zd,{Yi:"currentTransaction"},function(){return this.Au});
  t.A(zd,{Je:"transactionLevel"},function(){return this.Uk});t.A(zd,{eF:"isInTransaction"},function(){return 0<this.Uk});t.defineProperty(zd,{Uz:"checksTransactionLevel"},function(){return this.ny},function(a){this.ny=a});t.A(zd,{FF:"nestedTransactionNames"},function(){return this.$g});function oa(){0<arguments.length&&t.ad(oa);t.Ac(this);this.U=null;this.OB=this.PB=this.$B=this.QB=!1;this.Nk=this.jy=null;this.ED=1.05;this.YB=1;this.ez=NaN;this.BC=null;this.FD=NaN}t.ga("CommandHandler",oa);
  oa.prototype.toString=function(){return"CommandHandler"};t.A(oa,{h:"diagram"},function(){return this.U});oa.prototype.wd=function(a){e&&null!==a&&t.l(a,z,oa,"setDiagram");this.U=a};
  oa.prototype.doKeyDown=function(){var a=this.h;if(null!==a){var b=a.R,c=t.Um?b.Bp:b.control,d=b.shift,f=b.alt,g=b.key;!c||"C"!==g&&"Insert"!==g?c&&"X"===g||d&&"Del"===g?this.canCutSelection()&&this.cutSelection():"Del"===g?this.canDeleteSelection()&&this.deleteSelection():c&&"V"===g||d&&"Insert"===g?this.canPasteSelection()&&this.pasteSelection():c&&"Y"===g||f&&d&&"Backspace"===g?this.canRedo()&&this.redo():c&&"Z"===g||f&&"Backspace"===g?this.canUndo()&&this.undo():c&&"A"===g?this.canSelectAll()&&
  this.selectAll():"Esc"===g?this.canStopCommand()&&this.stopCommand():"Up"===g?a.pf&&(c?a.scroll("pixel","up"):a.scroll("line","up")):"Down"===g?a.pf&&(c?a.scroll("pixel","down"):a.scroll("line","down")):"Left"===g?a.of&&(c?a.scroll("pixel","left"):a.scroll("line","left")):"Right"===g?a.of&&(c?a.scroll("pixel","right"):a.scroll("line","right")):"PageUp"===g?d&&a.of?a.scroll("page","left"):a.pf&&a.scroll("page","up"):"PageDown"===g?d&&a.of?a.scroll("page","right"):a.pf&&a.scroll("page","down"):"Home"===
  g?(b=a.Ed,c&&a.pf?a.position=new w(a.position.x,b.y):!c&&a.of&&(a.position=new w(b.x,a.position.y))):"End"===g?(b=a.Ed,d=a.xb,c&&a.pf?a.position=new w(d.x,b.bottom-d.height):!c&&a.of&&(a.position=new w(b.right-d.width,d.y))):"Subtract"===g?this.canDecreaseZoom()&&this.decreaseZoom():"Add"===g?this.canIncreaseZoom()&&this.increaseZoom():c&&"0"===g?this.canResetZoom()&&this.resetZoom():d&&"Z"===g?this.canZoomToFit()&&this.zoomToFit():c&&!d&&"G"===g?this.canGroupSelection()&&this.groupSelection():c&&
  d&&"G"===g?this.canUngroupSelection()&&this.ungroupSelection():b.event&&113===b.event.which?this.canEditTextBlock()&&this.editTextBlock():b.event&&93===b.event.which?this.canShowContextMenu()&&this.showContextMenu():b.bubbles=!0:this.canCopySelection()&&this.copySelection()}};oa.prototype.doKeyUp=function(){var a=this.h;null!==a&&(a.R.bubbles=!0)};oa.prototype.stopCommand=function(){var a=this.h;if(null!==a){var b=a.Ua;b instanceof He&&a.Pe&&a.jw();null!==b&&b.doCancel()}};
  oa.prototype.canStopCommand=function(){return!0};oa.prototype.selectAll=function(){var a=this.h;if(null!==a){a.ka();try{a.$b="wait";a.Ba("ChangingSelection");for(var b=a.rl;b.next();)b.value.eb=!0;for(b=a.kh;b.next();)b.value.eb=!0;for(b=a.links;b.next();)b.value.eb=!0}finally{a.Ba("ChangedSelection"),a.$b=""}}};oa.prototype.canSelectAll=function(){var a=this.h;return null!==a&&a.Pe};
  oa.prototype.deleteSelection=function(){var a=this.h;if(null!==a&&!a.Ba("SelectionDeleting",a.selection))try{a.$b="wait";a.sc("Delete");a.Ba("ChangingSelection");for(var b=new C(E),c=a.selection.k;c.next();)Ie(b,c.value,!0,this.uE?Infinity:0,function(a){return a.canDelete()});a.XA(b,!0);a.Ba("SelectionDeleted",b)}finally{a.Ba("ChangedSelection"),a.Ce("Delete"),a.$b=""}};oa.prototype.canDeleteSelection=function(){var a=this.h;return null===a||a.ab||a.Ze||!a.Yk||0===a.selection.count?!1:!0};
  function Ie(a,b,c,d,f){if(!(a.contains(b)||(void 0===f&&(f=null),null!==f&&!f(b)||b instanceof Je)))if(a.add(b),b instanceof S){if(c&&b instanceof T)for(var g=b.Rc;g.next();){var h=g.value;Ie(a,h,c,d,f)}for(h=b.qe;h.next();)if(g=h.value,!a.contains(g)){var k=g.aa,l=g.ca;null!==k&&a.contains(k)&&null!==l&&a.contains(l)?Ie(a,g,c,d,f):null!==k&&null!==l||Ie(a,g,c,d,f)}if(1<d)for(b=b.DE();b.next();)h=b.value,Ie(a,h,c,d-1,f)}else if(b instanceof V)for(h=b.ek;h.next();)Ie(a,h.value,c,d,f)}
  oa.prototype.Wo=function(a,b,c){var d=new ja(E,E);for(a=a.k;a.next();){var f=a.value;Ke(this,f,b,d,c)}if(null!==b){c=b.ba;a=!1;null!==b.wb.Fd&&(a=b.wb.Fd.$h);for(var g=new C(V),h=new ja(V,V),k=d.k;k.next();)if(f=k.value,f instanceof V)a||null!==f.aa&&null!==f.ca||g.add(f);else if(c instanceof Kd&&f instanceof S&&null!==f.data){var l=f,f=k.key,m=f.eA();null!==m&&((m=d.za(m))?(c.mh(l.data,c.Hb(m.data)),l=b.Qf(l.data),f=f.et(),null!==f&&null!==l&&h.add(f,l)):c.mh(l.data,void 0))}0<g.count&&b.XA(g,!1);
  if(0<h.count)for(b=h.k;b.next();)d.add(b.key,b.value)}for(b=d.k;b.next();)b.value.Qb();return d};
  function Ke(a,b,c,d,f){if(null===b||f&&!b.canCopy())return null;if(d.contains(b))return a=d.za(b),a instanceof E?a:null;var g=null,h=b.data;if(null!==h&&null!==c){var k=c.ba;b instanceof V?k instanceof P&&(h=k.gE(h),t.rb(h)&&(k.$v(h),g=c.Qf(h))):(h=k.copyNodeData(h),t.rb(h)&&(k.ym(h),g=c.gh(h)))}else Le(b),g=b.copy(),null!==c&&g instanceof E&&c.add(g);if(!(g instanceof E))return null;g.eb=!1;g.zg=!1;d.add(b,g);if(b instanceof S){for(k=b.qe;k.next();){h=k.value;if(h.aa===b){var l=d.za(h);null!==l&&
  (l.aa=g)}h.ca===b&&(l=d.za(h),null!==l&&(l.ca=g))}if(b instanceof T&&g instanceof T)for(b=b.Rc;b.next();)k=Ke(a,b.value,c,d,f),k instanceof V||null===k||(k.gb=g)}else if(b instanceof V)for(k=b.aa,null!==k&&(k=d.za(k),null!==k&&(g.aa=k)),k=b.ca,null!==k&&(k=d.za(k),null!==k&&(g.ca=k)),b=b.ek;b.next();)k=Ke(a,b.value,c,d,f),null!==k&&(k.$d=g);return g}
  oa.prototype.copySelection=function(){var a=this.h;if(null!==a){for(var b=new C(E),a=a.selection.k;a.next();)Ie(b,a.value,!0,this.fE?Infinity:0,function(a){return a.canCopy()});this.copyToClipboard(b)}};oa.prototype.canCopySelection=function(){var a=this.h;return null!==a&&a.Si&&a.dw&&0!==a.selection.count?!0:!1};oa.prototype.cutSelection=function(){this.copySelection();this.deleteSelection()};
  oa.prototype.canCutSelection=function(){var a=this.h;return null!==a&&!a.ab&&!a.Ze&&a.Si&&a.Yk&&a.dw&&0!==a.selection.count?!0:!1};oa.prototype.copyToClipboard=function(a){var b=this.h;if(null!==b){var c=null;if(null===a)t.Ss=null,t.kw="";else{var c=b.ba,d=!1,f=!1,g=null;try{c instanceof Kd&&(d=c.bl,c.bl=this.Zz),c instanceof P&&(f=c.al,c.al=this.Yz),g=b.Wo(a,null,!0)}finally{c instanceof Kd&&(c.bl=d),c instanceof P&&(c.al=f),c=new B(E),c.Oe(g),t.Ss=c,t.kw=b.ba.Lm}}b.Ba("ClipboardChanged",c)}};
  oa.prototype.pasteFromClipboard=function(){var a=new C(E),b=t.Ss;if(null===b)return a;var c=this.h;if(null===c||t.kw!==c.ba.Lm)return a;var d=c.ba,f=!1,g=!1,h=null;try{d instanceof Kd&&(f=d.bl,d.bl=this.Zz),d instanceof P&&(g=d.al,d.al=this.Yz),h=c.Wo(b,c,!1)}finally{for(d instanceof Kd&&(d.bl=f),d instanceof P&&(d.al=g),b=h.k;b.next();)c=b.value,d=b.key,c.location.N()||(d.location.N()?c.location=d.location:!c.position.N()&&d.position.N()&&(c.position=d.position)),a.add(c)}return a};
  oa.prototype.pasteSelection=function(a){var b=this.h;if(null!==b)try{b.$b="wait";b.sc("Paste");b.Ba("ChangingSelection");var c=this.pasteFromClipboard();0<c.count&&Me(b);for(var d=c.k;d.next();)d.value.eb=!0;b.Ba("ChangedSelection");if(a instanceof w){var f=b.computePartsBounds(b.selection);if(f){var g=b.wb.Fd,h=g.computeEffectiveCollection(b.selection);g.moveParts(h,new w(a.x-f.Da,a.y-f.Pa),!1)}}b.Ba("ClipboardPasted",c)}finally{b.Ce("Paste"),b.$b=""}};
  oa.prototype.canPasteSelection=function(){var a=this.h;return null===a||a.ab||a.Ze||!a.zm||!a.dw||null===t.Ss||t.kw!==a.ba.Lm?!1:!0};oa.prototype.undo=function(){var a=this.h;null!==a&&a.ja.undo()};oa.prototype.canUndo=function(){var a=this.h;return null===a||a.ab||a.Ze?!1:a.Mz&&a.ja.canUndo()};oa.prototype.redo=function(){var a=this.h;null!==a&&a.ja.redo()};oa.prototype.canRedo=function(){var a=this.h;return null===a||a.ab||a.Ze?!1:a.Mz&&a.ja.canRedo()};
  oa.prototype.decreaseZoom=function(a){void 0===a&&(a=1/this.au);t.q(a,oa,"decreaseZoom:factor");var b=this.h;null!==b&&b.Dm===Xe&&(a*=b.scale,a<b.Cg||a>b.Bg||(b.scale=a))};oa.prototype.canDecreaseZoom=function(a){void 0===a&&(a=1/this.au);t.q(a,oa,"canDecreaseZoom:factor");var b=this.h;if(null===b||b.Dm!==Xe)return!1;a*=b.scale;return a<b.Cg||a>b.Bg?!1:b.Ns};
  oa.prototype.increaseZoom=function(a){void 0===a&&(a=this.au);t.q(a,oa,"increaseZoom:factor");var b=this.h;null!==b&&b.Dm===Xe&&(a*=b.scale,a<b.Cg||a>b.Bg||(b.scale=a))};oa.prototype.canIncreaseZoom=function(a){void 0===a&&(a=this.au);t.q(a,oa,"canIncreaseZoom:factor");var b=this.h;if(null===b||b.Dm!==Xe)return!1;a*=b.scale;return a<b.Cg||a>b.Bg?!1:b.Ns};oa.prototype.resetZoom=function(a){void 0===a&&(a=this.Xs);t.q(a,oa,"resetZoom:newscale");var b=this.h;null===b||a<b.Cg||a>b.Bg||(b.scale=a)};
  oa.prototype.canResetZoom=function(a){void 0===a&&(a=this.Xs);t.q(a,oa,"canResetZoom:newscale");var b=this.h;return null===b||a<b.Cg||a>b.Bg?!1:b.Ns};oa.prototype.zoomToFit=function(){var a=this.h;if(null!==a){var b=a.scale,c=a.position;b!==this.FD||isNaN(this.ez)?(this.ez=b,this.BC=c.copy(),a.zoomToFit(),a.Uf(),this.FD=a.scale):(a.scale=this.ez,a.position=this.BC)}};oa.prototype.canZoomToFit=function(){var a=this.h;return null===a?!1:a.Ns};
  oa.prototype.collapseTree=function(a){void 0===a&&(a=null);var b=this.h;if(null===b)return!1;b.sc("Collapse Tree");var c=new B(S);if(a instanceof S&&a.Qc)a.collapseTree(),c.add(a);else for(a=b.selection.k;a.next();){var d=a.value;d instanceof S&&d.Qc&&(d.collapseTree(),c.add(d))}b.Ba("TreeCollapsed",c);b.Ce("Collapse Tree")};
  oa.prototype.canCollapseTree=function(a){void 0===a&&(a=null);var b=this.h;if(null===b||b.ab)return!1;if(a instanceof S){if(!a.Qc)return!1;if(0<a.Fw().count)return!0}else for(a=b.selection.k;a.next();)if(b=a.value,b instanceof S&&b.Qc&&0<b.Fw().count)return!0;return!1};
  oa.prototype.expandTree=function(a){void 0===a&&(a=null);var b=this.h;if(null===b)return!1;b.sc("Expand Tree");var c=new B(S);if(a instanceof S&&!a.Qc)a.expandTree(),c.add(a);else for(a=b.selection.k;a.next();){var d=a.value;d instanceof S&&!d.Qc&&(d.expandTree(),c.add(d))}b.Ba("TreeExpanded",c);b.Ce("Expand Tree")};
  oa.prototype.canExpandTree=function(a){void 0===a&&(a=null);var b=this.h;if(null===b||b.ab)return!1;if(a instanceof S){if(a.Qc)return!1;if(0<a.Fw().count)return!0}else for(a=b.selection.k;a.next();)if(b=a.value,b instanceof S&&!b.Qc&&0<b.Fw().count)return!0;return!1};
  oa.prototype.groupSelection=function(){var a=this.h;if(null!==a){var b=a.ba;if(null!==b&&b instanceof P){var c=this.Oz;if(null!==c){var d=null;try{a.$b="wait";a.sc("Group");a.Ba("ChangingSelection");for(var f=new B(E),g=a.selection.k;g.next();){var h=g.value;h.Ld()&&h.canGroup()&&f.add(h)}for(var k=new B(E),l=f.k;l.next();){for(var m=l.value,h=!1,g=f.k;g.next();)if(m.ml(g.value)){h=!0;break}h||k.add(m)}if(0<k.count){g=k.k;g.next();var n=g.value.gb;if(null!==n)for(;null!==n;){g=k.k;g.next();for(f=
  !1;g.next();)if(m=g.value,!m.ml(n)){f=!0;break}if(f)n=n.gb;else break}if(c instanceof T)Le(c),d=c.copy(),d instanceof T&&a.add(d);else if(b.tA(c)){var p=b.copyNodeData(c);t.rb(p)&&(b.ym(p),d=a.Ew(p))}if(d instanceof T){null!==n&&this.isValidMember(n,d)&&(d.gb=n);for(g=k.k;g.next();)m=g.value,this.isValidMember(d,m)&&(m.gb=d);a.select(d)}}a.Ba("ChangedSelection");a.Ba("SelectionGrouped",d)}finally{a.Ce("Group"),a.$b=""}}}}};
  oa.prototype.canGroupSelection=function(){var a=this.h;if(null===a||a.ab||a.Ze||!a.zm||!a.Mo)return!1;var b=a.ba;if(null===b||!(b instanceof P)||null===this.Oz)return!1;for(a=a.selection.k;a.next();)if(b=a.value,b.Ld()&&b.canGroup())return!0;return!1};function Ye(a){var b=t.Cb();for(a=a.k;a.next();){var c=a.value;c instanceof V||b.push(c)}a=new C(E);for(var c=b.length,d=0;d<c;d++){for(var f=b[d],g=!0,h=0;h<c;h++)if(f.ml(b[h])){g=!1;break}g&&a.add(f)}t.ya(b);return a}
  oa.prototype.isValidMember=function(a,b){if(null===b||a===b||b instanceof V)return!1;if(null!==a){if(a===b||a.ml(b))return!1;var c=a.ut;if(null!==c&&!c(a,b)||null===a.data&&null!==b.data||null!==a.data&&null===b.data)return!1}c=this.ut;return null!==c?c(a,b):!0};
  oa.prototype.ungroupSelection=function(a){void 0===a&&(a=null);var b=this.h;if(null!==b){var c=b.ba;if(null!==c&&c instanceof P)try{b.$b="wait";b.sc("Ungroup");b.Ba("ChangingSelection");var d=new B(T);if(a instanceof T)d.add(a);else for(var f=b.selection.k;f.next();){var g=f.value;g instanceof T&&g.canUngroup()&&d.add(g)}if(0<d.count)for(b.jw(),f=d.k;f.next();){var h=f.value;h.expandSubGraph();var k=h.data,l=h.gb,m=null!==l&&null!==l.data?c.Hb(l.data):void 0,n=new B(E);n.Oe(h.Rc);for(var p=n.k;p.next();){var q=
  p.value;if(!(q instanceof V)){var r=q.data;null!==r?c.wx(r,m):q.gb=l;q.eb=!0}}null!==k?c.nx(k):b.remove(h)}b.Ba("ChangedSelection");b.Ba("SelectionUngrouped",d,n)}finally{b.Ce("Ungroup"),b.$b=""}}};
  oa.prototype.canUngroupSelection=function(a){void 0===a&&(a=null);var b=this.h;if(null===b||b.ab||b.Ze||!b.Yk||!b.Ro)return!1;var c=b.ba;if(null===c||!(c instanceof P))return!1;if(a instanceof T){if(a.canUngroup())return!0}else for(a=b.selection.k;a.next();)if(b=a.value,b instanceof T&&b.canUngroup())return!0;return!1};oa.prototype.addTopLevelParts=function(a,b){for(var c=!0,d=Ye(a).k;d.next();){var f=d.value;null!==f.gb&&(!b||this.isValidMember(null,f)?f.gb=null:c=!1)}return c};
  oa.prototype.collapseSubGraph=function(a){void 0===a&&(a=null);var b=this.h;if(null===b)return!1;b.sc("Collapse SubGraph");var c=new B(T);if(a instanceof T&&a.Yd)a.collapseSubGraph(),c.add(a);else for(a=b.selection.k;a.next();){var d=a.value;d instanceof T&&d.Yd&&(d.collapseSubGraph(),c.add(d))}b.Ba("SubGraphCollapsed",c);b.Ce("Collapse SubGraph")};
  oa.prototype.canCollapseSubGraph=function(a){void 0===a&&(a=null);var b=this.h;if(null===b||b.ab)return!1;if(a instanceof T)return a.Yd?!0:!1;for(a=b.selection.k;a.next();)if(b=a.value,b instanceof T&&b.Yd)return!0;return!1};
  oa.prototype.expandSubGraph=function(a){void 0===a&&(a=null);var b=this.h;if(null===b)return!1;b.sc("Expand SubGraph");var c=new B(T);if(a instanceof T&&!a.Yd)a.expandSubGraph(),c.add(a);else for(a=b.selection.k;a.next();){var d=a.value;d instanceof T&&!d.Yd&&(d.expandSubGraph(),c.add(d))}b.Ba("SubGraphExpanded",c);b.Ce("Expand SubGraph")};
  oa.prototype.canExpandSubGraph=function(a){void 0===a&&(a=null);var b=this.h;if(null===b||b.ab)return!1;if(a instanceof T)return a.Yd?!1:!0;for(a=b.selection.k;a.next();)if(b=a.value,b instanceof T&&!b.Yd)return!0;return!1};
  oa.prototype.editTextBlock=function(a){void 0===a&&(a=null);var b=this.h;if(null!==b){var c=b.wb.Cx;if(null!==c){if(null===a){a=b.selection.k;for(var d=null;a.next();){var f=a.value;if(f.canEdit()){d=f;break}}if(null===d)return;a=d.at(function(a){return a instanceof na&&a.yw})}null!==a&&a instanceof na&&(c.Ng=a,b.Ua=c)}}};
  oa.prototype.canEditTextBlock=function(a){void 0===a&&(a=null);var b=this.h;if(null===b||b.ab||b.Ze||!b.Qo||null===b.wb.Cx)return!1;if(a instanceof na){if(a=a.S,null!==a&&a.canEdit())return!0}else for(b=b.selection.k;b.next();)if(a=b.value,a.canEdit()&&(a=a.at(function(a){return a instanceof na&&a.yw}),null!==a))return!0;return!1};
  oa.prototype.showContextMenu=function(a){var b=this.h;if(null!==b){var c=b.wb.pw;if(null!==c&&(void 0===a&&(a=0<b.selection.count?b.selection.$a():b),a=c.findObjectWithContextMenu(a),null!==a)){var d=new ld,f=null;a instanceof Q?f=a.qb(Kb):b.ao||(f=b.xb,f=new w(f.x+f.width/2,f.y+f.height/2));null!==f&&(d.Ke=b.JG(f),d.ea=f,b.ec=d);b.Ua=c;Ze(c,!1,a)}}};
  oa.prototype.canShowContextMenu=function(a){var b=this.h;if(null===b)return!1;var c=b.wb.pw;if(null===c)return!1;void 0===a&&(a=0<b.selection.count?b.selection.$a():b);return null===c.findObjectWithContextMenu(a)?!1:!0};t.g(oa,"copiesTree",oa.prototype.fE);t.defineProperty(oa,{fE:"copiesTree"},function(){return this.QB},function(a){t.i(a,"boolean",oa,"copiesTree");this.QB=a});t.g(oa,"deletesTree",oa.prototype.uE);
  t.defineProperty(oa,{uE:"deletesTree"},function(){return this.$B},function(a){t.i(a,"boolean",oa,"deletesTree");this.$B=a});t.g(oa,"copiesParentKey",oa.prototype.Zz);t.defineProperty(oa,{Zz:"copiesParentKey"},function(){return this.PB},function(a){t.i(a,"boolean",oa,"copiesParentKey");this.PB=a});t.g(oa,"copiesGroupKey",oa.prototype.Yz);t.defineProperty(oa,{Yz:"copiesGroupKey"},function(){return this.OB},function(a){t.i(a,"boolean",oa,"copiesGroupKey");this.OB=a});t.g(oa,"archetypeGroupData",oa.prototype.Oz);
  t.defineProperty(oa,{Oz:"archetypeGroupData"},function(){return this.jy},function(a){null!==a&&t.l(a,Object,oa,"archetypeGroupData");var b=this.h;null!==b&&(b=b.ba,b instanceof P&&(a instanceof T||b.tA(a)||t.m("CommandHandler.archetypeGroupData must be either a Group or a data object for which GraphLinksModel.isGroupForNodeData is true: "+a)));this.jy=a});t.g(oa,"memberValidation",oa.prototype.ut);
  t.defineProperty(oa,{ut:"memberValidation"},function(){return this.Nk},function(a){null!==a&&t.i(a,"function",oa,"memberValidation");this.Nk=a});t.g(oa,"defaultScale",oa.prototype.Xs);t.defineProperty(oa,{Xs:"defaultScale"},function(){return this.YB},function(a){t.q(a,oa,"defaultScale");0<a||t.m("defaultScale must be larger than zero, not: "+a);this.YB=a});t.g(oa,"zoomFactor",oa.prototype.au);
  t.defineProperty(oa,{au:"zoomFactor"},function(){return this.ED},function(a){t.q(a,oa,"zoomFactor");1<a||t.m("zoomFactor must be larger than 1.0, not: "+a);this.ED=a});function ae(){0<arguments.length&&t.ad(ae);t.Ac(this);this.U=null;this.Yb="";this.Le=!0;this.nC=!1;this.AD=null;this.Yv=-1}t.ga("Tool",ae);ae.prototype.wd=function(a){e&&null!==a&&t.l(a,z,ae,"setDiagram");this.U=a};ae.prototype.toString=function(){return""!==this.name?this.name+" Tool":t.xg(Object.getPrototypeOf(this))};
  ae.prototype.updateAdornments=function(){};ae.prototype.canStart=function(){return this.isEnabled};ae.prototype.doStart=function(){};ae.prototype.doActivate=function(){this.ha=!0};ae.prototype.doDeactivate=function(){this.ha=!1};ae.prototype.doStop=function(){};ae.prototype.doCancel=function(){this.stopTool()};ae.prototype.stopTool=function(){var a=this.h;null!==a&&a.Ua===this&&(a.Ua=null,a.$b="")};ae.prototype.doMouseDown=function(){!this.ha&&this.canStart()&&this.doActivate()};
  ae.prototype.doMouseMove=function(){};ae.prototype.doMouseUp=function(){this.stopTool()};ae.prototype.doMouseWheel=function(){};ae.prototype.doKeyDown=function(){var a=this.h;null!==a&&"Esc"===a.R.key&&this.doCancel()};ae.prototype.doKeyUp=function(){};ae.prototype.startTransaction=ae.prototype.sc=function(a){this.gf=null;var b=this.h;return null===b?!1:b.sc(a)};ae.prototype.stopTransaction=ae.prototype.gk=function(){var a=this.h;return null===a?!1:null===this.gf?a.Np():a.Ce(this.gf)};
  ae.prototype.standardMouseSelect=function(){var a=this.h;if(null!==a&&a.Pe){var b=a.R,c=a.dt(b.ea,!1);if(null!==c)if(t.Um?b.Bp:b.control){a.Ba("ChangingSelection");for(b=c;null!==b&&!b.canSelect();)b=b.gb;null!==b&&(b.eb=!b.eb);a.Ba("ChangedSelection")}else if(b.shift){if(!c.eb){a.Ba("ChangingSelection");for(b=c;null!==b&&!b.canSelect();)b=b.gb;null!==b&&(b.eb=!0);a.Ba("ChangedSelection")}}else{if(!c.eb){for(b=c;null!==b&&!b.canSelect();)b=b.gb;null!==b&&a.select(b)}}else!b.left||(t.Um?b.Bp:b.control)||
  b.shift||a.jw()}};ae.prototype.standardMouseClick=function(a,b){void 0===a&&(a=null);void 0===b&&(b=function(a){return!a.layer.yc});var c=this.h;if(null!==c){var d=c.R,f=c.pe(d.ea,a,b);d.ce=f;$e(f,d,c)}};
  function $e(a,b,c){var d=0;b.left?d=1===b.Ae?1:2===b.Ae?2:1:b.right&&1===b.Ae&&(d=3);var f="";if(null!==a){switch(d){case 1:f="ObjectSingleClicked";break;case 2:f="ObjectDoubleClicked";break;case 3:f="ObjectContextClicked"}0!==d&&c.Ba(f,a)}else{switch(d){case 1:f="BackgroundSingleClicked";break;case 2:f="BackgroundDoubleClicked";break;case 3:f="BackgroundContextClicked"}0!==d&&c.Ba(f)}if(null!==a)for(;null!==a;){f=null;switch(d){case 1:f=a.click;break;case 2:f=a.Nm?a.Nm:a.click;break;case 3:f=a.Vs}if(null!==
  f&&(f(b,a),b.Ee))break;a=a.ia}else{f=null;switch(d){case 1:f=c.click;break;case 2:f=c.Nm?c.Nm:c.click;break;case 3:f=c.Vs}null!==f&&f(b)}}
  ae.prototype.standardMouseOver=function(){var a=this.h;if(null!==a){var b=a.R;if(null!==b.h&&!0!==a.Zb.sd){var c=a.Wa;a.Wa=!0;var d=a.pe(b.ea,null,null);b.ce=d;var f=!1;if(d!==a.Bn){var g=a.Bn,h=g;a.Bn=d;for(this.doCurrentObjectChanged(g,d);null!==g;){var k=g.GA;if(null!==k){if(d===g)break;if(null!==d&&d.ej(g))break;k(b,g,d);f=!0;if(b.Ee)break}g=g.ia}for(g=h;null!==d;){k=d.FA;if(null!==k){if(g===d)break;if(null!==g&&g.ej(d))break;k(b,d,g);f=!0;if(b.Ee)break}d=d.ia}d=a.Bn}if(null!==d){g=d;for(k="";null!==
  g;){k=g.cursor;if(""!==k)break;g=g.ia}a.$b=k;for(g=d;null!==g;){k=g.yt;if(null!==k&&(k(b,g),f=!0,b.Ee))break;g=g.ia}}else a.$b="",k=a.yt,null!==k&&(k(b),f=!0);f&&a.te();a.Wa=c}}};ae.prototype.doCurrentObjectChanged=function(){};
  ae.prototype.standardMouseWheel=function(){var a=this.h;if(null!==a){var b=a.R,c=b.Yj;if(0!==c&&a.Ed.N()){var d=a.Se,f=a.wb.bn;if((f===af&&!b.shift||f===bf&&b.control)&&(0<c?d.canIncreaseZoom():d.canDecreaseZoom()))f=a.$f,a.$f=b.Ke,0<c?d.increaseZoom():d.decreaseZoom(),a.$f=f,b.bubbles=!1;else if(f===af&&b.shift||f===bf&&!b.control){d=a.position.copy();f=0<c?c:-c;if(!b.shift&&a.pf){var g=a.Rp,f=f/40*g;0<c?a.scroll("pixel","up",f):a.scroll("pixel","down",f)}else b.shift&&a.of&&(g=a.Qp,f=f/40*g,0<c?
  a.scroll("pixel","left",f):a.scroll("pixel","right",f));a.position.M(d)||(b.bubbles=!1)}}}};ae.prototype.standardWaitAfter=function(a){t.i(a,"number",ae,"standardWaitAfter:delay");this.cancelWaitAfter();var b=this;this.Yv=window.setTimeout(function(){b.doWaitAfter()},a)};ae.prototype.cancelWaitAfter=function(){-1!==this.Yv&&window.clearTimeout(this.Yv);this.Yv=-1};ae.prototype.doWaitAfter=function(){};
  ae.prototype.findToolHandleAt=function(a,b){var c=this.h;if(null===c)return null;c=c.pe(a,null,function(a){a=a.S;return null===a?!1:null!==a.oc});if(null===c)return null;var d=c.S;return null===d||d.Zc!==b?null:c};ae.prototype.isBeyondDragSize=function(a,b){var c=this.h;if(null===c)return!1;void 0===a&&(a=c.Nc.Ke);void 0===b&&(b=c.R.Ke);var d=c.wb.wE,c=d.width,d=d.height;t.iB&&(c+=6,d+=6);return Math.abs(b.x-a.x)>c||Math.abs(b.y-a.y)>d};t.A(ae,{h:"diagram"},function(){return this.U});
  t.g(ae,"name",ae.prototype.name);t.defineProperty(ae,{name:"name"},function(){return this.Yb},function(a){t.i(a,"string",ae,"name");this.Yb=a});t.g(ae,"isEnabled",ae.prototype.isEnabled);t.defineProperty(ae,{isEnabled:"isEnabled"},function(){return this.Le},function(a){t.i(a,"boolean",ae,"isEnabled");this.Le=a});t.g(ae,"isActive",ae.prototype.ha);t.defineProperty(ae,{ha:"isActive"},function(){return this.nC},function(a){t.i(a,"boolean",ae,"isActive");this.nC=a});t.g(ae,"transactionResult",ae.prototype.gf);
  t.defineProperty(ae,{gf:"transactionResult"},function(){return this.AD},function(a){null!==a&&t.i(a,"string",ae,"transactionResult");this.AD=a});
  function cf(){0<arguments.length&&t.ad(cf);ae.call(this);this.name="Dragging";this.NB=this.rC=!0;this.Wq=this.eC=!1;this.vC=!0;this.Ty=(new ga(NaN,NaN)).freeze();this.Uy=Eb;this.Vy=(new w(NaN,NaN)).freeze();this.dC=!1;this.bC=this.MB=this.cC=this.TB=this.Ki=null;this.Iq=this.tC=!1;this.Bo=new w(NaN,NaN);this.Kv=new w;this.Nv=!1;this.Iv=this.qC=!0;this.Ln=100;this.Ll=this.yv=null}t.ga("DraggingTool",cf);t.Ka(cf,ae);t.g(cf,"isCopyEnabled",cf.prototype.rA);
  t.defineProperty(cf,{rA:"isCopyEnabled"},function(){return this.rC},function(a){t.i(a,"boolean",cf,"isCopyEnabled");this.rC=a});t.g(cf,"copiesEffectiveCollection",cf.prototype.eE);t.defineProperty(cf,{eE:"copiesEffectiveCollection"},function(){return this.NB},function(a){t.i(a,"boolean",cf,"copiesEffectiveCollection");this.NB=a});t.g(cf,"dragsTree",cf.prototype.xE);t.defineProperty(cf,{xE:"dragsTree"},function(){return this.eC},function(a){t.i(a,"boolean",cf,"dragsTree");this.eC=a});
  t.g(cf,"isGridSnapEnabled",cf.prototype.qp);t.defineProperty(cf,{qp:"isGridSnapEnabled"},function(){return this.Wq},function(a){t.i(a,"boolean",cf,"isGridSnapEnabled");this.Wq=a});t.g(cf,"isComplexRoutingRealtime",cf.prototype.bF);t.defineProperty(cf,{bF:"isComplexRoutingRealtime"},function(){return this.qC},function(a){t.i(a,"boolean",cf,"isComplexRoutingRealtime");this.qC=a});t.g(cf,"isGridSnapRealtime",cf.prototype.dF);
  t.defineProperty(cf,{dF:"isGridSnapRealtime"},function(){return this.vC},function(a){t.i(a,"boolean",cf,"isGridSnapRealtime");this.vC=a});t.g(cf,"gridSnapCellSize",cf.prototype.mA);t.defineProperty(cf,{mA:"gridSnapCellSize"},function(){return this.Ty},function(a){t.l(a,ga,cf,"gridSnapCellSize");this.Ty.M(a)||(this.Ty=a=a.Z())});t.g(cf,"gridSnapCellSpot",cf.prototype.ME);
  t.defineProperty(cf,{ME:"gridSnapCellSpot"},function(){return this.Uy},function(a){t.l(a,I,cf,"gridSnapCellSpot");this.Uy.M(a)||(this.Uy=a=a.Z())});t.g(cf,"gridSnapOrigin",cf.prototype.NE);t.defineProperty(cf,{NE:"gridSnapOrigin"},function(){return this.Vy},function(a){t.l(a,w,cf,"gridSnapOrigin");this.Vy.M(a)||(this.Vy=a=a.Z())});t.g(cf,"dragsLink",cf.prototype.$h);t.defineProperty(cf,{$h:"dragsLink"},function(){return this.dC},function(a){t.i(a,"boolean",cf,"dragsLink");this.dC=a});
  t.g(cf,"currentPart",cf.prototype.Yo);t.defineProperty(cf,{Yo:"currentPart"},function(){return this.TB},function(a){null!==a&&t.l(a,E,cf,"currentPart");this.TB=a});t.g(cf,"copiedParts",cf.prototype.Dc);t.defineProperty(cf,{Dc:"copiedParts"},function(){return this.MB},function(a){this.MB=a});t.g(cf,"draggedParts",cf.prototype.Ec);t.defineProperty(cf,{Ec:"draggedParts"},function(){return this.cC},function(a){this.cC=a});t.g(cf,"draggedLink",cf.prototype.Mc);
  t.defineProperty(cf,{Mc:"draggedLink"},function(){return this.bC},function(a){null!==a&&t.l(a,V,cf,"draggedLink");this.bC=a});t.g(cf,"isDragOutStarted",cf.prototype.ot);t.defineProperty(cf,{ot:"isDragOutStarted"},function(){return this.tC},function(a){this.tC=a});t.g(cf,"startPoint",cf.prototype.jj);t.defineProperty(cf,{jj:"startPoint"},function(){return this.Kv},function(a){t.l(a,w,cf,"startPoint");this.Kv.M(a)||(this.Kv=a=a.Z())});t.g(cf,"delay",cf.prototype.vw);
  t.defineProperty(cf,{vw:"delay"},function(){return this.Ln},function(a){t.i(a,"number",cf,"delay");this.Ln=a});cf.prototype.canStart=function(){if(!this.isEnabled)return!1;var a=this.h;if(null===a||!a.Sj&&!a.Si&&!a.Ms||!a.Pe)return!1;var b=a.R;return!b.left||a.Ua!==this&&(!this.isBeyondDragSize()||b.Uw&&b.timestamp-a.Nc.timestamp<this.Ln)?!1:null!==this.findDraggablePart()};
  cf.prototype.findDraggablePart=function(){var a=this.h;if(null===a)return null;a=a.dt(a.Nc.ea,!1);if(null===a)return null;for(;null!==a&&!a.canSelect();)a=a.gb;return null!==a&&(a.canMove()||a.canCopy())?a:null};cf.prototype.standardMouseSelect=function(){var a=this.h;if(null!==a&&a.Pe){var b=a.dt(a.Nc.ea,!1);if(null!==b){for(;null!==b&&!b.canSelect();)b=b.gb;this.Yo=b;this.Yo.eb||(a.Ba("ChangingSelection"),b=a.R,(t.Um?b.Bp:b.control)||b.shift||Me(a),this.Yo.eb=!0,a.Ba("ChangedSelection"))}}};
  cf.prototype.doActivate=function(){var a=this.h;if(null!==a){this.standardMouseSelect();var b=this.Yo;null!==b&&(b.canMove()||b.canCopy())&&(this.ha=!0,this.Bo.set(a.position),df(this,a.selection),this.Ll=this.yv=null,this.Ec=this.computeEffectiveCollection(a.selection),a.yo=!0,ef(this,this.Ec),this.sc("Drag"),this.jj=a.Nc.ea,a.Kd=!0,a.Ms&&(this.ot=!0,this.Iq=!1,ff=this,gf=this.h,this.doSimulatedDragOut()))}};
  function df(a,b){if(a.$h){var c=a.h;null!==c&&c.Tj&&(c.ba instanceof P&&1===b.count&&b.$a()instanceof V?(a.Mc=b.$a(),a.Mc.canRelinkFrom()&&a.Mc.canRelinkTo()&&a.Mc.Pf(),a.Ki=c.wb.UA,null===a.Ki&&(a.Ki=new hf,a.Ki.h=c)):(a.Mc=null,a.Ki=null))}}
  cf.prototype.computeEffectiveCollection=function(a){var b=null!==this.h&&this.h.Ua===this,c=new ja(E,Object);if(null===a)return c;for(var d=a.k;d.next();){var f=d.value;jf(this,c,f,b)}if(null!==this.Mc&&this.$h)return c;for(d=a.k;d.next();)f=d.value,f instanceof V&&(a=f,b=a.aa,null===b||c.contains(b)?(b=a.ca,null===b||c.contains(b)||c.remove(a)):c.remove(a));return c};function kf(a){return void 0===a?{point:H.nj,uz:H.nj}:{point:a.copy(),uz:H.nj}}
  function jf(a,b,c,d){if(!b.contains(c)&&(!d||c.canMove()||c.canCopy()))if(c instanceof S){b.add(c,kf(c.location));if(c instanceof T)for(var f=c.Rc;f.next();){var g=f.value;jf(a,b,g,d)}for(g=c.qe;g.next();)if(f=g.value,!b.contains(f)){var h=f.aa,k=f.ca;null!==h&&b.contains(h)&&null!==k&&b.contains(k)&&jf(a,b,f,d)}if(a.xE)for(c=c.DE();c.next();)g=c.value,jf(a,b,g,d)}else if(c instanceof V)for(f=c,b.add(f,kf()),g=f.ek;g.next();)jf(a,b,g.value,d);else c instanceof Je||b.add(c,kf(c.location))}
  cf.prototype.doDeactivate=function(){this.ha=!1;var a=this.h;null!==a&&tf(a);uf(this);vf(this,this.Ec);this.Ec=null;this.Iq=this.ot=!1;if(0<wf.count){for(var b=wf.length,c=0;c<b;c++){var d=wf.n[c];xf(d);yf(d);uf(d);null!==d.h&&tf(d.h)}wf.clear()}xf(this);this.Bo.Sp(NaN,NaN);ff=gf=null;yf(this);a.Kd=!1;a.$b="";a.yo=!1;this.gk()};
  function uf(a){var b=a.h;if(null!==b){var c=b.Wa;b.Wa=!0;for(var d=b.R,f=a.Ll;null!==f;){var g=f.EA;if(null!==g&&(g(d,f,null),d.Ee))break;f=f.ia}b.Wa=c}a.yv=null;a.Ll=null}function zf(){var a=ff;yf(a);Af(a);var b=a.h;null!==b&&a.Bo.N()&&(b.position=a.Bo);null!==b&&tf(b)}cf.prototype.doCancel=function(){yf(this);Af(this);var a=this.h;null!==a&&this.Bo.N()&&(a.position=this.Bo);this.stopTool()};function ef(a,b){if(null!==b){a.Nv=!0;for(var c=b.k;c.next();){var d=c.key;d instanceof V&&(d.Wp=!0)}}}
  function vf(a,b){if(null!==b){for(var c=b.k;c.next();){var d=c.key;d instanceof V&&(d.Wp=!1,d.dj&&Bf(d)&&d.ac())}a.Nv=!1}}cf.prototype.doKeyDown=function(){var a=this.h;null!==a&&(a=a.R,null!==a&&this.ha&&("Esc"===a.key?this.doCancel():this.doMouseMove()))};cf.prototype.doKeyUp=function(){var a=this.h;null!==a&&null!==a.R&&this.ha&&this.doMouseMove()};
  function Cf(a,b){for(var c=Infinity,d=Infinity,f=-Infinity,g=-Infinity,h=a.k;h.next();){var k=h.value;if(k.Ld()&&k.Qa()){var l=k.location,k=l.x,l=l.y;isNaN(k)||isNaN(l)||(k<c&&(c=k),l<d&&(d=l),k>f&&(f=k),l>g&&(g=l))}}Infinity===c?b.p(0,0,0,0):b.p(c,d,f-c,g-d)}
  function Df(a,b){if(null===a.Dc){var c=a.h;if(!(null===c||b&&(c.ab||c.Ze))&&null!==a.Ec){var d=c.ja;d.isEnabled&&d.eF?null!==d.Yi&&0<d.Yi.dh.count&&(c.ja.Np(),c.sc("Drag")):Af(a);c.Wa=!b;c.un=!b;a.jj=c.Nc.ea;d=a.eE?a.Ec.Dl():c.selection;c=c.Wo(d,c,!0);for(d=c.k;d.next();)d.value.location=d.key.location;d=t.Gf();Cf(c,d);t.hc(d);for(var d=new ja(E,Object),f=a.Ec.k;f.next();){var g=f.key;g.Ld()&&g.canCopy()&&(g=c.za(g),null!==g&&(g.sf(),d.add(g,kf(g.location))))}for(c=c.k;c.next();)f=c.value,f instanceof
  V&&f.canCopy()&&d.add(f,kf());a.Dc=d;df(a,d.Dl());null!==a.Mc&&(c=a.Mc,d=c.vj(),c.pl(a.jj.x-(d.x+d.width/2),a.jj.y-(d.y+d.height/2)))}}}function yf(a){var b=a.h;null!==b&&(null!==a.Dc&&(b.XA(a.Dc.Dl(),!1),a.Dc=null),b.Wa=!1,b.un=!1,a.jj=b.Nc.ea)}function xf(a){if(null!==a.Mc){if(a.$h&&null!==a.Ki){var b=a.Ki;b.h.remove(b.de);b.h.remove(b.ee)}a.Mc=null;a.Ki=null}}function Ef(a,b,c){var d=a.h;if(null!==d){var f=a.jj,g=t.K();g.assign(d.R.ea);a.moveParts(b,g.Tt(f),c);t.B(g)}}
  cf.prototype.moveParts=function(a,b,c){if(null!==a&&(t.l(a,ja,cf,"moveParts:parts"),0!==a.count)){var d=t.K(),f=t.K();f.assign(b);isNaN(f.x)&&(f.x=0);isNaN(f.y)&&(f.y=0);var g=this.Nv;g||ef(this,a);for(var h=new B,k=new B(Ea),l=a.k;l.next();){var m=l.key;if(m.Ld()){var n=Ff(this,m,a);if(null!==n)h.add({Gc:m,info:l.value,MI:n});else if(!c||m.canMove()){n=l.value.point;d.assign(n);var p=t.K();this.computeMove(m,d.add(f),a,p);m.location=p;t.B(p);l.value.uz=p.Tt(n)}}else l.key instanceof V&&k.add(l.yb)}for(c=
  h.k;c.next();)h=c.value,n=h.info.point,d.assign(n),h.Gc.location=d.add(h.MI.uz);n=t.K();c=t.K();for(k=k.k;k.next();)if(p=k.value,h=p.key,h instanceof V)if(h.Wp)if(l=h.aa,m=h.ca,null!==this.Mc&&this.$h)p=p.value.point,a.add(h,kf(f)),l=b.x-p.x,m=b.y-p.y,h.pl(l,m);else{if(null!==l){n.assign(l.location);var q=a.za(l);null!==q&&n.Tt(q.point)}null!==m&&(c.assign(m.location),q=a.za(m),null!==q&&c.Tt(q.point));null!==l&&null!==m?n.tf(c)?(p=p.value.point,l=d,l.assign(n),l.Tt(p),a.add(h,kf(n)),h.pl(l.x,l.y)):
  (h.Wp=!1,h.ac()):(p=p.value.point,a.add(h,kf(null!==l?n:null!==m?c:b)),l=f.x-p.x,m=f.y-p.y,h.pl(l,m))}else if(null===h.aa||null===h.ca)p=p.value.point,a.add(h,kf(b)),l=f.x-p.x,m=f.y-p.y,h.pl(l,m);t.B(d);t.B(f);t.B(n);t.B(c);g||vf(this,a)}};function Ff(a,b,c){b=b.gb;if(null!==b){a=Ff(a,b,c);if(null!==a)return a;a=c.za(b);if(null!==a)return a}return null}
  function Af(a){if(null!==a.Ec){for(var b=a.h,c=a.Ec.k;c.next();){var d=c.key;d.Ld()&&(d.location=c.value.point)}for(c=a.Ec.k;c.next();)if(d=c.key,d instanceof V&&d.Wp){var f=c.value.point;a.Ec.add(d,kf());d.pl(-f.x,-f.y)}b.Uf()}}
  cf.prototype.computeMove=function(a,b,c,d){void 0===d&&(d=new w);d.assign(b);if(null===a)return d;void 0===c&&(c=null);var f=b;if(this.qp&&(this.dF||null===c||this.h.R.mj)&&(f=t.K(),c=f,c.assign(b),null!==a)){var g=this.h;if(null!==g){var h=g.lp,k=this.mA,g=k.width,k=k.height,l=this.NE,m=l.x,l=l.y,n=this.ME;if(null!==h){var p=h.gt;isNaN(g)&&(g=p.width);isNaN(k)&&(k=p.height);h=h.lA;isNaN(m)&&(m=h.x);isNaN(l)&&(l=h.y)}h=t.lc(0,0);h.Pt(0,0,g,k,n);H.ct(b.x,b.y,m+h.x,l+h.y,g,k,c);t.B(h)}}c=null!==a.bA?
  a.bA(a,b,f):f;k=a.AF;g=k.x;isNaN(g)&&(g=a.location.x);k=k.y;isNaN(k)&&(k=a.location.y);h=a.uF;m=h.x;isNaN(m)&&(m=a.location.x);h=h.y;isNaN(h)&&(h=a.location.y);d.p(Math.max(g,Math.min(c.x,m)),Math.max(k,Math.min(c.y,h)));f!==b&&t.B(f);return d};function Gf(a,b){if(null===b)return!0;var c=b.S;return null===c||c instanceof Je||c.layer.yc||a.Ec&&a.Ec.contains(c)||a.Dc&&a.Dc.contains(c)?!0:!1}
  function Hf(a,b,c,d){var f=a.h;if(null!==f){a.$h&&(null!==a.Mc&&(a.Mc.aa=null,a.Mc.ca=null),If(a,!1));var g=!1;!1===a.Iv&&(g=f.Wa,f.Wa=!0);var h=!1,k=Tf(f,b,null,function(b){return!Gf(a,b)}),l=f.R;l.ce=k;var m=f.Wa;f.Wa=!0;if(k!==a.Ll){var n=a.Ll;a.yv=n;for(a.Ll=k;null!==n;){var p=n.EA;if(null!==p){if(k===n)break;if(null!==k&&k.ej(n))break;p(l,n,k);h=!0;if(l.Ee)break}n=n.ia}n=a.yv;if(!a.ha&&null===ff)return;for(;null!==k;){p=k.BF;if(null!==p){if(n===k)break;if(null!==n&&n.ej(k))break;p(l,k,n);h=!0;
  if(l.Ee)break}k=k.ia}k=a.Ll;if(!a.ha&&null===ff)return}null===k&&(p=f.CF,null!==p&&(p(l),h=!0));if(a.ha||null!==ff)if(a.doDragOver(b,k),a.ha||null!==ff)f.Wa=m,h&&f.Uf(),!1===a.Iv&&(f.Wa=g),(f.of||f.pf)&&(c||d)&&Uf(f,l.Ke)}}function Vf(a,b,c){var d=a.Ki;if(null===d)return null;var f=a.h.Pm(b,d.NA,function(a){return d.findValidLinkablePort(a,c)});a=t.K();for(var g=Infinity,h=null,f=f.k;f.next();){var k=f.value;if(null!==k.S){var l=k.qb(Kb,a),l=b.Zj(l);l<g&&(h=k,g=l)}}t.B(a);return h}
  function If(a,b){var c=a.Mc;if(null!==c&&!(2>c.oa)){var d=a.h;if(null!==d&&!d.ab&&(d=a.Ki,null!==d)){var f=null,g=null;null===c.aa&&(f=Vf(a,c.o(0),!1),null!==f&&(g=f.S));var h=null,k=null;null===c.ca&&(h=Vf(a,c.o(c.oa-1),!0),null!==h&&(k=h.S));if((null===g||g instanceof S)&&(null===k||k instanceof S)){var l=d.isValidLink(g,f,k,h);b?(c.Fn=c.o(0).copy(),c.Jn=c.o(c.oa-1).copy(),c.Wp=!1,c.aa=g,null!==f&&(c.Rf=f.Nd),c.ca=k,null!==h&&(c.Og=h.Nd)):l?Wf(d,g,f,k,h):Wf(d,null,null,null,null)}}}}
  cf.prototype.doDragOver=function(){};function Xf(a,b){var c=a.h;if(null!==c&&null!==c.ba){a.$h&&If(a,!0);uf(a);var d=Tf(c,b,null,function(b){return!Gf(a,b)}),f=c.R;f.ce=d;if(null!==d)for(var g=d;null!==g;){var h=g.vt;if(null!==h&&(h(f,g),f.Ee))break;g=g.ia}else h=c.vt,null!==h&&h(f);if(a.ha||null!==ff)if(a.doDropOnto(b,d),a.ha||null!==ff)for(d=c.selection.k;d.next();)f=d.value,f instanceof S&&Yf(c,f.pa)}}cf.prototype.doDropOnto=function(){};
  cf.prototype.doMouseMove=function(){if(this.ha){var a=this.h;if(null!==a&&null!==this.Yo&&null!==this.Ec){var b=!1,c=!1;this.mayCopy()?(b=!0,a.$b="copy",Df(this,!1),ef(this,this.Dc),Ef(this,this.Dc,!1),vf(this,this.Dc)):this.mayMove()?(c=!0,a.$b="default",yf(this),Ef(this,this.Ec,!0)):this.mayDragOut()?(a.$b="no-drop",Df(this,!1),Ef(this,this.Dc,!1)):yf(this);Hf(this,a.R.ea,c,b)}}};
  cf.prototype.doMouseUp=function(){if(this.ha){var a=this.h;if(null!==a){var b=!1,c=this.mayCopy();c&&null!==this.Dc?(yf(this),Df(this,!0),ef(this,this.Dc),Ef(this,this.Dc,!1),vf(this,this.Dc),null!==this.Dc&&a.hG(this.Dc.Dl())):(b=!0,yf(this),this.mayMove()&&(Ef(this,this.Ec,!0),this.Iv=!1,Hf(this,a.R.ea,!0,!1),this.Iv=!0));this.Iq=!0;Xf(this,a.R.ea);if(this.ha){this.Dc=null;if(b&&null!==this.Ec)for(b=this.Ec.k;b.next();){var d=b.key;d instanceof S&&(d=d.gb,null===d||null===d.placeholder||this.Ec.contains(d)||
  d.Wz&&d.fa())}a.Oc();vf(this,this.Ec);this.gf=c?"Copy":"Move";a.Ba(c?"SelectionCopied":"SelectionMoved",a.selection)}this.stopTool()}}};cf.prototype.mayCopy=function(){if(!this.rA)return!1;var a=this.h;if(null===a||a.ab||a.Ze||!a.zm||!a.Si||(t.Um?!a.R.alt:!a.R.control))return!1;for(a=a.selection.k;a.next();){var b=a.value;if(b.Ld()&&b.canCopy())return!0}return null!==this.Mc&&this.$h&&this.Mc.canCopy()?!0:!1};
  cf.prototype.mayDragOut=function(){if(!this.rA)return!1;var a=this.h;if(null===a||!a.Ms||!a.Si||a.Sj)return!1;for(a=a.selection.k;a.next();){var b=a.value;if(b.Ld()&&b.canCopy())return!0}return null!==this.Mc&&this.$h&&this.Mc.canCopy()?!0:!1};cf.prototype.mayMove=function(){var a=this.h;if(null===a||a.ab||!a.Sj)return!1;for(a=a.selection.k;a.next();){var b=a.value;if(b.Ld()&&b.canMove())return!0}return null!==this.Mc&&this.$h&&this.Mc.canMove()?!0:!1};var wf=new B(cf),ff=null,gf=null;
  cf.prototype.mayDragIn=function(){var a=this.h;return null===a||!a.Lz||a.ab||a.Ze||!a.zm||null===a.ba?!1:!0};cf.prototype.doSimulatedDragEnter=function(){if(this.mayDragIn()){var a=ff;null!==a&&(a.h.$b="copy")}};cf.prototype.doSimulatedDragLeave=function(){var a=ff;null!==a&&a.doSimulatedDragOut();this.doCancel()};
  cf.prototype.doSimulatedDragOver=function(){var a=this.h;if(null!==a){var b=ff;null!==b&&null!==b.Ec&&this.mayDragIn()&&(a.$b="copy",Zf(this,b.Ec.Dl(),!1),Ef(this,this.Dc,!1),Hf(this,a.R.ea,!1,!0))}};
  cf.prototype.doSimulatedDrop=function(){var a=this.h;if(null!==a){var b=ff;null!==b&&(b.Iq=!0,yf(this),this.mayDragIn()&&(this.sc("Drop"),Zf(this,b.Ec.Dl(),!0),Ef(this,this.Dc,!1),null!==this.Dc&&a.hG(this.Dc.Dl()),this.gf="ExternalCopy",Xf(this,a.R.ea),a.Oc(),this.Dc=null,a.Ba("ExternalObjectsDropped",a.selection),this.gk()))}};
  function Zf(a,b,c){if(null===a.Dc){var d=a.h;if(null!==d&&!d.ab&&!d.Ze&&null!==d.ba){d.Wa=!c;d.un=!c;a.jj=d.R.ea;d=d.Wo(b,d,!0);c=t.Gf();Cf(b,c);var f=c.x+c.width/2,g=c.y+c.height/2;t.hc(c);var h=a.Kv;c=new ja(E,Object);var k=t.K();for(b=b.k;b.next();){var l=b.value;if(l.Ld()&&l.canCopy()){var m=l.location,l=d.za(l);k.p(h.x-(f-m.x),h.y-(g-m.y));l.location=k;l.sf();c.add(l,kf(k))}}t.B(k);for(d=d.k;d.next();)f=d.value,f instanceof V&&f.canCopy()&&c.add(f,kf());a.Dc=c;df(a,c.Dl());null!==a.Mc&&(c=a.Mc,
  d=c.vj(),c.pl(a.jj.x-(d.x+d.width/2),a.jj.y-(d.y+d.height/2)))}}}cf.prototype.doSimulatedDragOut=function(){var a=this.h;null!==a&&(this.mayCopy()||this.mayMove()?a.$b="":a.$b="no-drop")};
  function $f(){0<arguments.length&&t.ad($f);ae.call(this);this.ZC=100;this.yC=!1;var a=new V,b=new W;b.fj=!0;b.stroke="blue";a.add(b);b=new W;b.on="Standard";b.fill="blue";b.stroke="blue";a.add(b);a.af="Tool";this.tD=a;a=new S;b=new W;b.Nd="";b.zb="Rectangle";b.fill=null;b.stroke="magenta";b.fb=2;b.Ca=H.Ux;a.add(b);a.vl=!1;a.af="Tool";this.rD=a;this.sD=b;a=new S;b=new W;b.Nd="";b.zb="Rectangle";b.fill=null;b.stroke="magenta";b.fb=2;b.Ca=H.Ux;a.add(b);a.vl=!1;a.af="Tool";this.uD=a;this.vD=b;this.XC=
  this.WC=this.SC=this.RC=this.TC=null;this.uC=!0;this.yH=new ja(Q,"boolean");this.$C=this.Kk=this.nD=null}t.ga("LinkingBaseTool",$f);t.Ka($f,ae);$f.prototype.doStop=function(){var a=this.h;null!==a&&tf(a);this.Kg=this.Jg=this.Ig=this.Hg=this.pc=null;this.Dx.clear();this.Ff=null};t.g($f,"portGravity",$f.prototype.NA);t.defineProperty($f,{NA:"portGravity"},function(){return this.ZC},function(a){t.i(a,"number",$f,"portGravity");0<=a&&(this.ZC=a)});t.g($f,"isUnconnectedLinkValid",$f.prototype.Vm);
  t.defineProperty($f,{Vm:"isUnconnectedLinkValid"},function(){return this.yC},function(a){t.i(a,"boolean",$f,"isUnconnectedLinkValid");this.yC=a});t.g($f,"temporaryLink",$f.prototype.Zf);t.defineProperty($f,{Zf:"temporaryLink"},function(){return this.tD},function(a){t.l(a,V,$f,"temporaryLink");this.tD=a});t.g($f,"temporaryFromNode",$f.prototype.de);t.defineProperty($f,{de:"temporaryFromNode"},function(){return this.rD},function(a){t.l(a,S,$f,"temporaryFromNode");this.rD=a});
  t.g($f,"temporaryFromPort",$f.prototype.Bl);t.defineProperty($f,{Bl:"temporaryFromPort"},function(){return this.sD},function(a){t.l(a,Q,$f,"temporaryFromPort");this.sD=a});t.g($f,"temporaryToNode",$f.prototype.ee);t.defineProperty($f,{ee:"temporaryToNode"},function(){return this.uD},function(a){t.l(a,S,$f,"temporaryToNode");this.uD=a});t.g($f,"temporaryToPort",$f.prototype.Cl);t.defineProperty($f,{Cl:"temporaryToPort"},function(){return this.vD},function(a){t.l(a,Q,$f,"temporaryToPort");this.vD=a});
  t.g($f,"originalLink",$f.prototype.pc);t.defineProperty($f,{pc:"originalLink"},function(){return this.TC},function(a){null!==a&&t.l(a,V,$f,"originalLink");this.TC=a});t.g($f,"originalFromNode",$f.prototype.Hg);t.defineProperty($f,{Hg:"originalFromNode"},function(){return this.RC},function(a){null!==a&&t.l(a,S,$f,"originalFromNode");this.RC=a});t.g($f,"originalFromPort",$f.prototype.Ig);
  t.defineProperty($f,{Ig:"originalFromPort"},function(){return this.SC},function(a){null!==a&&t.l(a,Q,$f,"originalFromPort");this.SC=a});t.g($f,"originalToNode",$f.prototype.Jg);t.defineProperty($f,{Jg:"originalToNode"},function(){return this.WC},function(a){null!==a&&t.l(a,S,$f,"originalToNode");this.WC=a});t.g($f,"originalToPort",$f.prototype.Kg);t.defineProperty($f,{Kg:"originalToPort"},function(){return this.XC},function(a){null!==a&&t.l(a,Q,$f,"originalToPort");this.XC=a});
  t.defineProperty($f,{Xd:"isForwards"},function(){return this.uC},function(a){t.i(a,"boolean",$f,"isForwards");this.uC=a});t.A($f,{Dx:"validPortsCache"},function(){return this.yH});t.g($f,"targetPort",$f.prototype.Ff);t.defineProperty($f,{Ff:"targetPort"},function(){return this.nD},function(a){null!==a&&t.l(a,Q,$f,"targetPort");this.nD=a});
  $f.prototype.copyPortProperties=function(a,b,c,d,f){if(null!==a&&null!==b&&null!==c&&null!==d){d.Ca=b.pa.size;f?(d.tb=b.tb,d.ik=b.ik):(d.pb=b.pb,d.ck=b.ck);c.bf=Kb;var g=t.K();c.location=b.qb(Kb,g);t.B(g);d.angle=b.gl();null!==this.Ft&&this.Ft(a,b,c,d,f)}};$f.prototype.setNoTargetPortProperties=function(a,b,c){null!==b&&(b.Ca=H.Ux,b.pb=wb,b.tb=wb);null!==a&&(a.location=this.h.R.ea);null!==this.Ft&&this.Ft(null,null,a,b,c)};$f.prototype.doMouseDown=function(){this.ha&&this.doMouseMove()};
  $f.prototype.doMouseMove=function(){if(this.ha){var a=this.h;if(null!==a){this.Ff=this.findTargetPort(this.Xd);if(null!==this.Ff){var b=this.Ff.S;if(b instanceof S){this.Xd?this.copyPortProperties(b,this.Ff,this.ee,this.Cl,!0):this.copyPortProperties(b,this.Ff,this.de,this.Bl,!1);return}}this.Xd?this.setNoTargetPortProperties(this.ee,this.Cl,!0):this.setNoTargetPortProperties(this.de,this.Bl,!1);(a.of||a.pf)&&Uf(a,a.R.Ke)}}};
  $f.prototype.findValidLinkablePort=function(a,b){if(null===a)return null;var c=a.S;if(!(c instanceof S))return null;for(;null!==a;){var d=b?a.lB:a.iA;if(!0===d&&(null!==a.Nd||a instanceof S)&&(b?this.isValidTo(c,a):this.isValidFrom(c,a)))return a;if(!1===d)break;a=a.ia}return null};
  $f.prototype.findTargetPort=function(a){var b=this.h,c=b.R.ea,d=this.NA;0>=d&&(d=0.1);for(var f=this,g=b.Pm(c,d,function(b){return f.findValidLinkablePort(b,a)},null,!0),d=Infinity,b=null,g=g.k;g.next();){var h=g.value,k=h.S;if(k instanceof S){var l=h.qb(Kb,t.K()),m=c.x-l.x,n=c.y-l.y;t.B(l);l=m*m+n*n;l<d&&(m=this.Dx.za(h),null!==m?m&&(b=h,d=l):a&&this.isValidLink(this.Hg,this.Ig,k,h)||!a&&this.isValidLink(k,h,this.Jg,this.Kg)?(this.Dx.add(h,!0),b=h,d=l):this.Dx.add(h,!1))}}return null!==b&&(c=b.S,
  c instanceof S&&(null===c.layer||c.layer.Am))?b:null};$f.prototype.isValidFrom=function(a,b){if(null===a||null===b)return this.Vm;if(this.h.Ua===this&&(null!==a.layer&&!a.layer.Am||!0!==b.iA))return!1;var c=b.HE;if(Infinity>c){if(null!==this.pc&&a===this.Hg&&b===this.Ig)return!0;var d=b.Nd;null===d&&(d="");if(a.Cw(d).count>=c)return!1}return!0};
  $f.prototype.isValidTo=function(a,b){if(null===a||null===b)return this.Vm;if(this.h.Ua===this&&(null!==a.layer&&!a.layer.Am||!0!==b.lB))return!1;var c=b.DG;if(Infinity>c){if(null!==this.pc&&a===this.Jg&&b===this.Kg)return!0;var d=b.Nd;null===d&&(d="");if(a.wg(d).count>=c)return!1}return!0};$f.prototype.isInSameNode=function(a,b){if(null===a||null===b)return!1;if(a===b)return!0;var c=a.S,d=b.S;return null!==c&&c===d};
  $f.prototype.isLinked=function(a,b){if(null===a||null===b)return!1;var c=a.S;if(!(c instanceof S))return!1;var d=a.Nd;null===d&&(d="");var f=b.S;if(!(f instanceof S))return!1;var g=b.Nd;null===g&&(g="");for(f=f.wg(g);f.next();)if(g=f.value,g.aa===c&&g.Rf===d)return!0;return!1};
  $f.prototype.isValidLink=function(a,b,c,d){if(!this.isValidFrom(a,b)||!this.isValidTo(c,d)||!(null===b||null===d||(b.GE&&d.CG||!this.isInSameNode(b,d))&&(b.FE&&d.BG||!this.isLinked(b,d)))||null!==this.pc&&(null!==a&&ag(this,a,this.pc)||null!==c&&ag(this,c,this.pc))||null!==a&&null!==c&&(null===a.data&&null!==c.data||null!==a.data&&null===c.data)||!bg(this,a,c,this.pc))return!1;if(null!==a){var f=a.Ap;if(null!==f&&!f(a,b,c,d,this.pc))return!1}if(null!==c&&(f=c.Ap,null!==f&&!f(a,b,c,d,this.pc)))return!1;
  f=this.Ap;return null!==f?f(a,b,c,d,this.pc):!0};function ag(a,b,c){if(null===b)return!1;var d=b.$d;if(null===d)return!1;if(d===c)return!0;var f=new C(S);f.add(b);return cg(a,d,c,f)}function cg(a,b,c,d){if(b===c)return!0;var f=b.aa;if(null!==f&&f.ci&&(d.add(f),cg(a,f.$d,c,d)))return!0;b=b.ca;return null!==b&&b.ci&&(d.add(b),cg(a,b.$d,c,d))?!0:!1}
  function bg(a,b,c,d){if(null===b||null===c)return a.Vm;var f=a.h.RG;if(f!==dg){if(f===eg){if(null!==d&&!d.Fc)return!0;for(f=c.qe;f.next();){var g=f.value;if(g!==d&&g.Fc&&g.ca===c)return!1}return!lg(a,b,c,d,!0)}if(f===mg){if(null!==d&&!d.Fc)return!0;for(f=b.qe;f.next();)if(g=f.value,g!==d&&g.Fc&&g.aa===b)return!1;return!lg(a,b,c,d,!0)}if(f===ng)return b===c?a=!0:(f=new C(S),f.add(c),a=og(a,f,b,c,d)),!a;if(f===pg)return!lg(a,b,c,d,!1);if(f===qg)return b===c?a=!0:(f=new C(S),f.add(c),a=rg(a,f,b,c,d)),
  !a}return!0}function lg(a,b,c,d,f){if(b===c)return!0;if(null===b||null===c)return!1;for(var g=b.qe;g.next();){var h=g.value;if(h!==d&&(!f||h.Fc)&&h.ca===b&&(h=h.aa,h!==b&&lg(a,h,c,d,f)))return!0}return!1}function og(a,b,c,d,f){if(c===d)return!0;if(null===c||null===d||b.contains(c))return!1;b.add(c);for(var g=c.qe;g.next();){var h=g.value;if(h!==f&&h.ca===c&&(h=h.aa,h!==c&&og(a,b,h,d,f)))return!0}return!1}
  function rg(a,b,c,d,f){if(c===d)return!0;if(null===c||null===d||b.contains(c))return!1;b.add(c);for(var g=c.qe;g.next();){var h=g.value;if(h!==f){var k=h.aa,h=h.ca,k=k===c?h:k;if(k!==c&&rg(a,b,k,d,f))return!0}}return!1}t.g($f,"linkValidation",$f.prototype.Ap);t.defineProperty($f,{Ap:"linkValidation"},function(){return this.Kk},function(a){null!==a&&t.i(a,"function",$f,"linkValidation");this.Kk=a});t.g($f,"portTargeted",$f.prototype.Ft);
  t.defineProperty($f,{Ft:"portTargeted"},function(){return this.$C},function(a){null!==a&&t.i(a,"function",$f,"portTargeted");this.$C=a});function pa(){0<arguments.length&&t.ad(pa);$f.call(this);this.name="Linking";this.ly={};this.ky=null;this.sa=sg;this.vz=this.jD=null}t.ga("LinkingTool",pa);t.Ka(pa,$f);var sg;pa.Either=sg=t.w(pa,"Either",0);var tg;pa.ForwardsOnly=tg=t.w(pa,"ForwardsOnly",0);var ug;pa.BackwardsOnly=ug=t.w(pa,"BackwardsOnly",0);t.g(pa,"archetypeLinkData",pa.prototype.MD);
  t.defineProperty(pa,{MD:"archetypeLinkData"},function(){return this.ly},function(a){null!==a&&t.l(a,Object,pa,"archetypeLinkData");a instanceof Q&&t.l(a,V,pa,"archetypeLinkData");this.ly=a});t.g(pa,"archetypeLabelNodeData",pa.prototype.Pz);t.defineProperty(pa,{Pz:"archetypeLabelNodeData"},function(){return this.ky},function(a){null!==a&&t.l(a,Object,pa,"archetypeLabelNodeData");a instanceof Q&&t.l(a,S,pa,"archetypeLabelNodeData");this.ky=a});t.g(pa,"direction",pa.prototype.direction);
  t.defineProperty(pa,{direction:"direction"},function(){return this.sa},function(a){t.Aa(a,pa,pa,"direction");this.sa=a});t.g(pa,"startObject",pa.prototype.hB);t.defineProperty(pa,{hB:"startObject"},function(){return this.jD},function(a){null!==a&&t.l(a,Q,pa,"startObject");this.jD=a});t.A(pa,{zx:"startPort"},function(){return this.vz});
  pa.prototype.canStart=function(){if(!this.isEnabled)return!1;var a=this.h;if(null===a||a.ab||a.Ze||!a.Am)return!1;var b=a.ba;return null!==b&&(b instanceof P||b instanceof Kd)&&a.R.left&&(a.Ua===this||this.isBeyondDragSize())?null!==this.findLinkablePort():!1};
  pa.prototype.findLinkablePort=function(){var a=this.h;if(null===a)return null;var b=this.hB;null===b&&(b=a.pe(a.Nc.ea,null,null));if(null===b||!(b.S instanceof S))return null;var c=this.direction;if(c===sg||c===tg)if(a=this.findValidLinkablePort(b,!1),null!==a)return this.Xd=!0,a;if(c===sg||c===ug)if(a=this.findValidLinkablePort(b,!0),null!==a)return this.Xd=!1,a;return null};
  pa.prototype.doActivate=function(){var a=this.h;if(null!==a&&(null===this.zx&&(this.vz=this.findLinkablePort()),null!==this.zx)){this.sc(this.name);a.Kd=!0;a.$b="pointer";if(this.Xd){this.Ig=this.zx;var b=this.Ig.S;b instanceof S&&(this.Hg=b);this.copyPortProperties(this.Hg,this.Ig,this.de,this.Bl,!1)}else this.Kg=this.zx,b=this.Kg.S,b instanceof S&&(this.Jg=b),this.copyPortProperties(this.Jg,this.Kg,this.ee,this.Cl,!0);a.add(this.de);a.add(this.ee);null!==this.Zf&&(null!==this.de&&(this.Zf.aa=this.de),
  null!==this.ee&&(this.Zf.ca=this.ee),this.Zf.ac(),a.add(this.Zf));this.ha=!0}};pa.prototype.doDeactivate=function(){this.ha=!1;var a=this.h;null!==a&&(a.remove(this.Zf),a.remove(this.de),a.remove(this.ee),a.Kd=!1,a.$b="",this.gk())};pa.prototype.doStop=function(){$f.prototype.doStop.call(this);this.hB=this.vz=null};
  pa.prototype.doMouseUp=function(){if(this.ha){var a=this.h;if(null===a)return;var b=this.gf=null,c=null,d=null,f=null,g=this.Ff=this.findTargetPort(this.Xd),h=null;null!==g?(h=g.S,h instanceof S&&(this.Xd?(null!==this.Hg&&(b=this.Hg,c=this.Ig),d=h,f=g):(b=h,c=g,null!==this.Jg&&(d=this.Jg,f=this.Kg)))):this.Xd?null!==this.Hg&&this.Vm&&(b=this.Hg,c=this.Ig):null!==this.Jg&&this.Vm&&(d=this.Jg,f=this.Kg);if(null!==b||null!==d)b=this.insertLink(b,c,d,f),null!==b?(null===g&&(this.Xd?b.Jn=a.R.ea.copy():
  b.Fn=a.R.ea.copy()),a.Pe&&a.select(b),this.gf=this.name,a.Ba("LinkDrawn",b)):a.ba.WD()}this.stopTool()};
  pa.prototype.insertLink=function(a,b,c,d){var f=this.h;if(null===f)return null;var g=f.ba;if(null===g)return null;if(g instanceof Kd){var h=a;b=c;f.pd||(h=c,b=a);if(null!==h&&null!==b)return g.mh(b.data,g.Hb(h.data)),b.et()}else if(g instanceof P)if(h="",null!==a&&(null===b&&(b=a),h=b.Nd,null===h&&(h="")),b="",null!==c&&(null===d&&(d=c),b=d.Nd,null===b&&(b="")),d=this.MD,d instanceof V){if(Le(d),g=d.copy(),g instanceof V)return g.aa=a,g.Rf=h,g.ca=c,g.Og=b,f.add(g),a=this.Pz,a instanceof S&&(Le(a),
  a=a.copy(),a instanceof S&&(a.$d=g,f.add(a))),g}else if(null!==d&&(d=g.gE(d),t.rb(d)))return null!==a&&g.vx(d,g.Hb(a.data)),g.bB(d,h),null!==c&&g.xx(d,g.Hb(c.data)),g.eB(d,b),g.$v(d),a=this.Pz,null===a||a instanceof S||(a=g.copyNodeData(a),t.rb(a)&&(g.ym(a),a=g.Hb(a),void 0!==a&&g.JD(d,a))),g=f.Qf(d);return null};
  function hf(){0<arguments.length&&t.ad(hf);$f.call(this);this.name="Relinking";var a=new W;a.zb="Diamond";a.Ca=H.Nx;a.fill="lightblue";a.stroke="dodgerblue";a.cursor="pointer";a.Cf=0;this.jC=a;a=new W;a.zb="Diamond";a.Ca=H.Nx;a.fill="lightblue";a.stroke="dodgerblue";a.cursor="pointer";a.Cf=-1;this.wD=a;this.dc=null;this.UC=new x}t.ga("RelinkingTool",hf);t.Ka(hf,$f);
  hf.prototype.updateAdornments=function(a){if(null!==a&&a instanceof V){var b="RelinkFrom",c=null;if(a.eb&&!this.h.ab){var d=a.Nt;null!==d&&a.canRelinkFrom()&&a.pa.N()&&a.Qa()&&d.pa.N()&&d.ol()&&(c=a.bp(b),null===c&&(c=this.makeAdornment(d,!1),c.Zc=b,a.Vk(b,c)))}null===c&&a.ul(b);b="RelinkTo";c=null;a.eb&&!this.h.ab&&(d=a.Nt,null!==d&&a.canRelinkTo()&&a.pa.N()&&a.Qa()&&d.pa.N()&&d.ol()&&(c=a.bp(b),null===c&&(c=this.makeAdornment(d,!0),c.Zc=b,a.Vk(b,c))));null===c&&a.ul(b)}};
  hf.prototype.makeAdornment=function(a,b){var c=new Je;c.type=vg;var d=b?this.cK:this.HI;null!==d&&c.add(d.copy());c.oc=a;return c};t.defineProperty(hf,{HI:"fromHandleArchetype"},function(){return this.jC},function(a){null!==a&&t.l(a,Q,hf,"fromHandleArchetype");this.jC=a});t.defineProperty(hf,{cK:"toHandleArchetype"},function(){return this.wD},function(a){null!==a&&t.l(a,Q,hf,"toHandleArchetype");this.wD=a});t.A(hf,{handle:"handle"},function(){return this.dc});
  hf.prototype.canStart=function(){if(!this.isEnabled)return!1;var a=this.h;if(null===a||a.ab||a.Ze||!a.Tj)return!1;var b=a.ba;if(null===b||!(b instanceof P||b instanceof Kd)||!a.R.left)return!1;b=this.findToolHandleAt(a.Nc.ea,"RelinkFrom");null===b&&(b=this.findToolHandleAt(a.Nc.ea,"RelinkTo"));return null!==b};
  hf.prototype.doActivate=function(){var a=this.h;if(null!==a){if(null===this.pc){var b=this.findToolHandleAt(a.Nc.ea,"RelinkFrom");null===b&&(b=this.findToolHandleAt(a.Nc.ea,"RelinkTo"));if(null===b)return;var c=b.S;if(!(c instanceof Je&&c.Xh instanceof V))return;this.dc=b;this.Xd=null===c||"RelinkTo"===c.Zc;this.pc=c.Xh}this.sc(this.name);a.Kd=!0;a.$b="pointer";this.Ig=this.pc.ud;this.Hg=this.pc.aa;this.Kg=this.pc.fe;this.Jg=this.pc.ca;this.UC.set(this.pc.pa);null!==this.pc&&0<this.pc.oa&&(null===
  this.pc.aa&&(null!==this.Bl&&(this.Bl.Ca=H.gq),null!==this.de&&(this.de.location=this.pc.o(0))),null===this.pc.ca&&(null!==this.Cl&&(this.Cl.Ca=H.gq),null!==this.ee&&(this.ee.location=this.pc.o(this.pc.oa-1))));this.copyPortProperties(this.Hg,this.Ig,this.de,this.Bl,!1);this.copyPortProperties(this.Jg,this.Kg,this.ee,this.Cl,!0);a.add(this.de);a.add(this.ee);null!==this.Zf&&(null!==this.de&&(this.Zf.aa=this.de),null!==this.ee&&(this.Zf.ca=this.ee),this.copyLinkProperties(this.pc,this.Zf),this.Zf.ac(),
  a.add(this.Zf));this.ha=!0}};hf.prototype.copyLinkProperties=function(a,b){if(null!==a&&null!==b){b.Lo=a.Lo;b.sw=a.sw;var c=a.De;if(c===wg||c===xg)c=yg;b.De=c;b.Ws=a.Ws;b.Kt=a.Kt;b.ln=a.ln;b.pb=a.pb;b.ck=a.ck;b.hp=a.hp;b.ip=a.ip;b.tb=a.tb;b.ik=a.ik;b.Xp=a.Xp;b.Yp=a.Yp}};hf.prototype.doDeactivate=function(){this.ha=!1;var a=this.h;null!==a&&(a.remove(this.Zf),a.remove(this.de),a.remove(this.ee),a.Kd=!1,a.$b="",this.gk())};hf.prototype.doStop=function(){$f.prototype.doStop.call(this);this.dc=null};
  hf.prototype.doMouseUp=function(){if(this.ha){var a=this.h;if(null===a)return;this.gf=null;var b=this.Hg,c=this.Ig,d=this.Jg,f=this.Kg,g=this.pc;this.Ff=this.findTargetPort(this.Xd);if(null!==this.Ff){var h=this.Ff.S;h instanceof S&&(this.Xd?(d=h,f=this.Ff):(b=h,c=this.Ff))}else this.Vm?this.Xd?f=d=null:c=b=null:g=null;null!==g&&(this.reconnectLink(g,this.Xd?d:b,this.Xd?f:c,this.Xd),null===this.Ff&&(this.Xd?g.Jn=a.R.ea.copy():g.Fn=a.R.ea.copy(),g.ac()),a.Pe&&(g.eb=!0),this.gf=this.name,a.Ba("LinkRelinked",
  g,this.Xd?this.Kg:this.Ig));zg(this.pc,this.UC)}this.stopTool()};hf.prototype.reconnectLink=function(a,b,c,d){if(null===this.h)return!1;c=null!==c&&null!==c.Nd?c.Nd:"";d?(a.ca=b,a.Og=c):(a.aa=b,a.Rf=c);return!0};function Wf(a,b,c,d,f){null!==b?(a.copyPortProperties(b,c,a.de,a.Bl,!1),a.h.add(a.de)):a.h.remove(a.de);null!==d?(a.copyPortProperties(d,f,a.ee,a.Cl,!0),a.h.add(a.ee)):a.h.remove(a.ee)}
  function Ag(){0<arguments.length&&t.ad(Ag);ae.call(this);this.name="LinkReshaping";var a=new W;a.zb="Rectangle";a.Ca=H.dq;a.fill="lightblue";a.stroke="dodgerblue";this.Ek=a;a=new W;a.zb="Diamond";a.Ca=H.dq;a.fill="lightblue";a.stroke="dodgerblue";this.FC=a;this.aD=3;this.iy=this.dc=null;this.VC=new w;this.nz=null}t.ga("LinkReshapingTool",Ag);t.Ka(Ag,ae);var Ig;Ag.None=Ig=t.w(Ag,"None",0);var Kg;Ag.Horizontal=Kg=t.w(Ag,"Horizontal",1);var Lg;Ag.Vertical=Lg=t.w(Ag,"Vertical",2);var Mg;
  Ag.All=Mg=t.w(Ag,"All",3);function Ng(a,b){t.l(a,Q,Ag,"setReshapingBehavior:obj");t.Aa(b,Ag,Ag,"setReshapingBehavior:behavior");a.zv=b}Ag.prototype.updateAdornments=function(a){if(null!==a&&a instanceof V){if(a.eb&&!this.h.ab){var b=a.path;if(null!==b&&a.canReshape()&&a.pa.N()&&a.Qa()&&b.pa.N()&&b.ol()){var c=a.bp(this.name);if(null===c||c.rH!==a.oa||c.AH!==a.Kp)c=this.makeAdornment(b),c.rH=a.oa,c.AH=a.Kp,a.Vk(this.name,c);if(null!==c){c.location=a.position;return}}}a.ul(this.name)}};
  Ag.prototype.makeAdornment=function(a){var b=a.S,c=b.oa,d=b.ic,f=null;if(null!==b.points&&1<c){f=new Je;f.type=vg;var c=b.ft,g=b.Ww,h=d?1:0;if(b.Kp&&b.De!==Og)for(var k=c+h;k<g-h;k++){var l=this.makeResegmentHandle(a,k);null!==l&&(l.Cf=k,l.Lt=0.5,f.add(l))}for(k=c+1;k<g;k++)if(l=this.makeHandle(a,k),null!==l){l.Cf=k;if(k!==c)if(k===c+1&&d){var h=b.o(c),m=b.o(c+1);H.I(h.x,m.x)&&H.I(h.y,m.y)&&(m=b.o(c-1));H.I(h.x,m.x)?(Ng(l,Lg),l.cursor="n-resize"):H.I(h.y,m.y)&&(Ng(l,Kg),l.cursor="w-resize")}else k===
  g-1&&d?(h=b.o(g-1),m=b.o(g),H.I(h.x,m.x)&&H.I(h.y,m.y)&&(h=b.o(g+1)),H.I(h.x,m.x)?(Ng(l,Lg),l.cursor="n-resize"):H.I(h.y,m.y)&&(Ng(l,Kg),l.cursor="w-resize")):k!==g&&(Ng(l,Mg),l.cursor="move");f.add(l)}f.Zc=this.name;f.oc=a}return f};Ag.prototype.makeHandle=function(){var a=this.ht;return null===a?null:a.copy()};t.defineProperty(Ag,{ht:"handleArchetype"},function(){return this.Ek},function(a){null!==a&&t.l(a,Q,Ag,"handleArchetype");this.Ek=a});
  Ag.prototype.makeResegmentHandle=function(){var a=this.pJ;return null===a?null:a.copy()};t.defineProperty(Ag,{pJ:"midHandleArchetype"},function(){return this.FC},function(a){null!==a&&t.l(a,Q,Ag,"midHandleArchetype");this.FC=a});t.A(Ag,{handle:"handle"},function(){return this.dc});t.A(Ag,{Ls:"adornedLink"},function(){return this.iy});Ag.prototype.canStart=function(){if(!this.isEnabled)return!1;var a=this.h;return null!==a&&!a.ab&&a.No&&a.R.left?null!==this.findToolHandleAt(a.Nc.ea,this.name):!1};
  Ag.prototype.doActivate=function(){var a=this.h;if(null!==a&&(this.dc=this.findToolHandleAt(a.Nc.ea,this.name),null!==this.dc)){var b=this.dc.S.Xh;if(b instanceof V){this.iy=b;a.Kd=!0;this.sc(this.name);if(b.Kp&&0.5===this.dc.Lt){var c=b.points.copy(),d=this.dc.qb(Kb);c.Jd(this.dc.Cf+1,d);b.ic&&c.Jd(this.dc.Cf+1,d);b.points=c;b.Pf();b.updateAdornments();this.dc=this.findToolHandleAt(a.Nc.ea,this.name)}this.VC=b.o(this.dc.Cf);this.nz=b.points.copy();this.ha=!0}}};
  Ag.prototype.doDeactivate=function(){this.gk();this.iy=this.dc=null;var a=this.h;null!==a&&(a.Kd=!1);this.ha=!1};Ag.prototype.doCancel=function(){var a=this.Ls;null!==a&&(a.points=this.nz);this.stopTool()};Ag.prototype.doMouseMove=function(){var a=this.h;this.ha&&null!==a&&(a=this.computeReshape(a.R.ea),this.reshape(a))};
  Ag.prototype.doMouseUp=function(){var a=this.h;if(this.ha&&null!==a){var b=this.computeReshape(a.R.ea);this.reshape(b);b=this.Ls;if(null!==b&&b.Kp){var c=this.handle.Cf,d=b.o(c-1),f=b.o(c),g=b.o(c+1);if(b.ic){if(c>b.ft+1&&c<b.Ww-1){var h=b.o(c-2);if(Math.abs(d.x-f.x)<this.Lg&&Math.abs(d.y-f.y)<this.Lg&&(Pg(this,h,d,f,g,!0)||Pg(this,h,d,f,g,!1))){var k=b.points.copy();Pg(this,h,d,f,g,!0)?(k.Mg(c-2,new w(h.x,(g.y+h.y)/2)),k.Mg(c+1,new w(g.x,(g.y+h.y)/2))):(k.Mg(c-2,new w((g.x+h.x)/2,h.y)),k.Mg(c+1,
  new w((g.x+h.x)/2,g.y)));k.qd(c);k.qd(c-1);b.points=k;b.Pf();b.updateAdornments()}else h=b.o(c+2),Math.abs(f.x-g.x)<this.Lg&&Math.abs(f.y-g.y)<this.Lg&&(Pg(this,d,f,g,h,!0)||Pg(this,d,f,g,h,!1))&&(k=b.points.copy(),Pg(this,d,f,g,h,!0)?(k.Mg(c-1,new w(d.x,(d.y+h.y)/2)),k.Mg(c+2,new w(h.x,(d.y+h.y)/2))):(k.Mg(c-1,new w((d.x+h.x)/2,d.y)),k.Mg(c+2,new w((d.x+h.x)/2,h.y))),k.qd(c+1),k.qd(c),b.points=k,b.Pf(),b.updateAdornments())}}else h=t.K(),H.cn(d.x,d.y,g.x,g.y,f.x,f.y,h)&&h.Zj(f)<this.Lg*this.Lg&&
  (k=b.points.copy(),k.qd(c),b.points=k,b.Pf(),b.updateAdornments()),t.B(h)}a.Oc();this.gf=this.name;a.Ba("LinkReshaped",this.Ls)}this.stopTool()};function Pg(a,b,c,d,f,g){return g?Math.abs(b.y-c.y)<a.Lg&&Math.abs(c.y-d.y)<a.Lg&&Math.abs(d.y-f.y)<a.Lg:Math.abs(b.x-c.x)<a.Lg&&Math.abs(c.x-d.x)<a.Lg&&Math.abs(d.x-f.x)<a.Lg}t.g(Ag,"resegmentingDistance",Ag.prototype.Lg);
  t.defineProperty(Ag,{Lg:"resegmentingDistance"},function(){return this.aD},function(a){t.i(a,"number",Ag,"resegmentingDistance");this.aD=a});
  Ag.prototype.reshape=function(a){var b=this.Ls;b.yl();var c=this.handle.Cf,d=this.handle&&this.handle.zv?this.handle.zv:Ig;if(b.ic)if(c===b.ft+1)c=b.ft+1,d===Lg?(b.Y(c,b.o(c-1).x,a.y),b.Y(c+1,b.o(c+2).x,a.y)):d===Kg&&(b.Y(c,a.x,b.o(c-1).y),b.Y(c+1,a.x,b.o(c+2).y));else if(c===b.Ww-1)c=b.Ww-1,d===Lg?(b.Y(c-1,b.o(c-2).x,a.y),b.Y(c,b.o(c+1).x,a.y)):d===Kg&&(b.Y(c-1,a.x,b.o(c-2).y),b.Y(c,a.x,b.o(c+1).y));else{var d=c,f=b.o(d),g=b.o(d-1),h=b.o(d+1);H.I(g.x,f.x)&&H.I(f.y,h.y)?(H.I(g.x,b.o(d-2).x)&&!H.I(g.y,
  b.o(d-2).y)?(b.C(d,a.x,g.y),c++,d++):b.Y(d-1,a.x,g.y),H.I(h.y,b.o(d+2).y)&&!H.I(h.x,b.o(d+2).x)?b.C(d+1,h.x,a.y):b.Y(d+1,h.x,a.y)):H.I(g.y,f.y)&&H.I(f.x,h.x)?(H.I(g.y,b.o(d-2).y)&&!H.I(g.x,b.o(d-2).x)?(b.C(d,g.x,a.y),c++,d++):b.Y(d-1,g.x,a.y),H.I(h.x,b.o(d+2).x)&&!H.I(h.y,b.o(d+2).y)?b.C(d+1,a.x,h.y):b.Y(d+1,a.x,h.y)):H.I(g.x,f.x)&&H.I(f.x,h.x)?(H.I(g.x,b.o(d-2).x)&&!H.I(g.y,b.o(d-2).y)?(b.C(d,a.x,g.y),c++,d++):b.Y(d-1,a.x,g.y),H.I(h.x,b.o(d+2).x)&&!H.I(h.y,b.o(d+2).y)?b.C(d+1,a.x,h.y):b.Y(d+1,a.x,
  h.y)):H.I(g.y,f.y)&&H.I(f.y,h.y)&&(H.I(g.y,b.o(d-2).y)&&!H.I(g.x,b.o(d-2).x)?(b.C(d,g.x,a.y),c++,d++):b.Y(d-1,g.x,a.y),H.I(h.y,b.o(d+2).y)&&!H.I(h.x,b.o(d+2).x)?b.C(d+1,h.x,a.y):b.Y(d+1,h.x,a.y));b.Y(c,a.x,a.y)}else b.Y(c,a.x,a.y),1===c&&b.computeSpot(!0).Ge()&&(f=b.aa,g=b.ud,null===f||f.Qa()||(f=f.findVisibleNode(),f!==b.aa&&(g=f.fl(""))),d=g.qb(Kb,t.K()),f=b.getLinkPointFromPoint(f,g,d,a,!0,t.K()),b.Y(0,f.x,f.y),t.B(d),t.B(f)),c===b.oa-2&&b.computeSpot(!1).Ge()&&(c=b.ca,f=b.fe,null===c||c.Qa()||
  (c=c.findVisibleNode(),c!==b.ca&&(f=c.fl(""))),d=f.qb(Kb,t.K()),f=b.getLinkPointFromPoint(c,f,d,a,!1,t.K()),b.Y(b.oa-1,f.x,f.y),t.B(d),t.B(f));b.Wi()};Ag.prototype.computeReshape=function(a){var b=this.Ls,c=this.handle.Cf;switch(this.handle&&this.handle.zv?this.handle.zv:Ig){case Mg:return a;case Lg:return b=b.o(c),new w(b.x,a.y);case Kg:return b=b.o(c),new w(a.x,b.y);default:case Ig:return b.o(c)}};t.g(Ag,"originalPoint",Ag.prototype.zJ);t.A(Ag,{zJ:"originalPoint"},function(){return this.VC});
  t.g(Ag,"originalPoints",Ag.prototype.AJ);t.A(Ag,{AJ:"originalPoints"},function(){return this.nz});
  function Qg(){0<arguments.length&&t.ad(Qg);ae.call(this);this.name="Resizing";this.Fj=(new ga(1,1)).freeze();this.Ej=(new ga(9999,9999)).freeze();this.qj=(new ga(NaN,NaN)).freeze();this.Wq=!1;this.ib=null;var a=new W;a.Rj=Kb;a.zb="Rectangle";a.Ca=H.dq;a.fill="lightblue";a.stroke="dodgerblue";a.fb=1;a.cursor="pointer";this.Ek=a;this.dc=null;this.uv=new ga;this.mz=new w;this.Qy=new ga(0,0);this.Py=new ga(Infinity,Infinity);this.Oy=new ga(1,1);this.OC=!0}t.ga("ResizingTool",Qg);t.Ka(Qg,ae);
  Qg.prototype.updateAdornments=function(a){if(!(null===a||a instanceof V)){if(a.eb&&!this.h.ab){var b=a.XF;if(null!==b&&a.canResize()&&a.pa.N()&&a.Qa()&&b.pa.N()&&b.ol()){var c=a.bp(this.name);null===c&&(c=this.makeAdornment(b));if(null!==c){var d=b.gl();c.angle=d;var f=b.qb(c.bf,t.K()),g=b.dk();c.location=f;t.B(f);f=c.placeholder;if(null!==f){var b=b.Ra,h=t.Al();h.p(b.width*g,b.height*g);f.Ca=h;t.bk(h)}Rg(this,c,d);a.Vk(this.name,c);return}}}a.ul(this.name)}};
  Qg.prototype.makeAdornment=function(a){var b=null,b=a.S.VF;if(null===b){b=new Je;b.type=Sg;b.bf=Kb;var c=new Tg;c.fj=!0;b.add(c);b.add(this.makeHandle(a,Eb));b.add(this.makeHandle(a,Gb));b.add(this.makeHandle(a,Pb));b.add(this.makeHandle(a,Lb));b.add(this.makeHandle(a,Qb));b.add(this.makeHandle(a,Vb));b.add(this.makeHandle(a,Wb));b.add(this.makeHandle(a,Ub))}else if(Le(b),b=b.copy(),!(b instanceof Je))return null;b.Zc=this.name;b.oc=a;return b};
  Qg.prototype.makeHandle=function(a,b){var c=this.ht;if(null===c)return null;c=c.copy();c.alignment=b;return c};
  function Rg(a,b,c){if(null!==b)if(!b.alignment.Pc()&&""!==b.cursor)a:{a=b.alignment;a.Ge()&&(a=Kb);if(0>=a.x)c=0>=a.y?c+225:1<=a.y?c+135:c+180;else if(1<=a.x)0>=a.y?c+=315:1<=a.y&&(c+=45);else if(0>=a.y)c+=270;else if(1<=a.y)c+=90;else break a;0>c?c+=360:360<=c&&(c-=360);b.cursor=22.5>c?"e-resize":67.5>c?"se-resize":112.5>c?"s-resize":157.5>c?"sw-resize":202.5>c?"w-resize":247.5>c?"nw-resize":292.5>c?"n-resize":337.5>c?"ne-resize":"e-resize"}else if(b instanceof y)for(b=b.elements;b.next();)Rg(a,
  b.value,c)}t.defineProperty(Qg,{ht:"handleArchetype"},function(){return this.Ek},function(a){null!==a&&t.l(a,Q,Qg,"handleArchetype");this.Ek=a});t.A(Qg,{handle:"handle"},function(){return this.dc});t.defineProperty(Qg,{oc:"adornedObject"},function(){return this.ib},function(a){null!==a&&t.l(a,Q,Qg,"adornedObject");this.ib=a});Qg.prototype.canStart=function(){if(!this.isEnabled)return!1;var a=this.h;return null!==a&&!a.ab&&a.Oo&&a.R.left?null!==this.findToolHandleAt(a.Nc.ea,this.name)?!0:!1:!1};
  Qg.prototype.doActivate=function(){var a=this.h;null!==a&&(this.dc=this.findToolHandleAt(a.Nc.ea,this.name),null!==this.dc&&(this.ib=this.dc.S.oc,this.mz.set(this.ib.S.location),this.uv.set(this.ib.Ca),this.Oy=this.computeCellSize(),this.Qy=this.computeMinSize(),this.Py=this.computeMaxSize(),a.Kd=!0,this.OC=a.Zb.isEnabled,a.Zb.isEnabled=!1,this.sc(this.name),this.ha=!0))};Qg.prototype.doDeactivate=function(){var a=this.h;null!==a&&(this.gk(),this.ib=this.dc=null,this.ha=a.Kd=!1,a.Zb.isEnabled=this.OC)};
  Qg.prototype.doCancel=function(){this.ib.Ca=this.uv;this.ib.S.location=this.mz;this.stopTool()};Qg.prototype.doMouseMove=function(){var a=this.h;if(this.ha&&null!==a){var b=this.Qy,c=this.Py,d=this.Oy,f=this.ib.KE(a.R.ea,t.K()),g=Ug;this.ib instanceof W&&(g=this.ib.Iw,g===Vg&&(g=this.ib.Oa.vc));b=this.computeResize(f,this.dc.alignment,b,c,d,!(g===Wg||g===Xg||a.R.shift));this.resize(b);a.Uf();t.B(f)}};
  Qg.prototype.doMouseUp=function(){var a=this.h;if(this.ha&&null!==a){var b=this.Qy,c=this.Py,d=this.Oy,f=this.ib.KE(a.R.ea,t.K()),g=Ug;this.ib instanceof W&&(g=this.ib.Iw,g===Vg&&(g=this.ib.Oa.vc));b=this.computeResize(f,this.dc.alignment,b,c,d,!(g===Wg||g===Xg||a.R.shift));this.resize(b);t.B(f);a.Oc();this.gf=this.name;a.Ba("PartResized",this.ib,this.uv)}this.stopTool()};
  Qg.prototype.resize=function(a){if(null!==this.h){var b=this.oc,c=b.S,d=b.gl(),f=b.dk(),g=Math.PI*d/180,h=Math.cos(g),g=Math.sin(g),k=0<d&&180>d?1:0,l=90<d&&270>d?1:0,d=180<d&&360>d?1:0,m=a.width-b.Ra.width,n=a.height-b.Ra.height,p=c.position.copy();p.x+=f*((a.x+m*l)*h-(a.y+n*k)*g);p.y+=f*((a.x+m*d)*g+(a.y+n*l)*h);b.Ca=a.size;c.sf();c.move(p)}};
  Qg.prototype.computeResize=function(a,b,c,d,f,g){b.Ge()&&(b=Kb);var h=this.oc.Ra,k=h.x,l=h.y,m=h.x+h.width,n=h.y+h.height,p=1;if(!g){var p=h.width,q=h.height;0>=p&&(p=1);0>=q&&(q=1);p=q/p}q=t.K();H.ct(a.x,a.y,k,l,f.width,f.height,q);a=h.copy();0>=b.x?0>=b.y?(a.x=Math.max(q.x,m-d.width),a.x=Math.min(a.x,m-c.width),a.width=Math.max(m-a.x,c.width),a.y=Math.max(q.y,n-d.height),a.y=Math.min(a.y,n-c.height),a.height=Math.max(n-a.y,c.height),g||(b=a.height/a.width,p<b?(a.height=p*a.width,a.y=n-a.height):
  (a.width=a.height/p,a.x=m-a.width))):1<=b.y?(a.x=Math.max(q.x,m-d.width),a.x=Math.min(a.x,m-c.width),a.width=Math.max(m-a.x,c.width),a.height=Math.max(Math.min(q.y-l,d.height),c.height),g||(b=a.height/a.width,p<b?a.height=p*a.width:(a.width=a.height/p,a.x=m-a.width))):(a.x=Math.max(q.x,m-d.width),a.x=Math.min(a.x,m-c.width),a.width=m-a.x,g||(a.height=p*a.width,a.y=l+0.5*(n-l-a.height))):1<=b.x?0>=b.y?(a.width=Math.max(Math.min(q.x-k,d.width),c.width),a.y=Math.max(q.y,n-d.height),a.y=Math.min(a.y,
  n-c.height),a.height=Math.max(n-a.y,c.height),g||(b=a.height/a.width,p<b?(a.height=p*a.width,a.y=n-a.height):a.width=a.height/p)):1<=b.y?(a.width=Math.max(Math.min(q.x-k,d.width),c.width),a.height=Math.max(Math.min(q.y-l,d.height),c.height),g||(b=a.height/a.width,p<b?a.height=p*a.width:a.width=a.height/p)):(a.width=Math.max(Math.min(q.x-k,d.width),c.width),g||(a.height=p*a.width,a.y=l+0.5*(n-l-a.height))):0>=b.y?(a.y=Math.max(q.y,n-d.height),a.y=Math.min(a.y,n-c.height),a.height=n-a.y,g||(a.width=
  a.height/p,a.x=k+0.5*(m-k-a.width))):1<=b.y&&(a.height=Math.max(Math.min(q.y-l,d.height),c.height),g||(a.width=a.height/p,a.x=k+0.5*(m-k-a.width)));t.B(q);return a};Qg.prototype.computeMinSize=function(){var a=this.oc.Vf.copy(),b=this.Vf;!isNaN(b.width)&&b.width>a.width&&(a.width=b.width);!isNaN(b.height)&&b.height>a.height&&(a.height=b.height);return a};
  Qg.prototype.computeMaxSize=function(){var a=this.oc.He.copy(),b=this.He;!isNaN(b.width)&&b.width<a.width&&(a.width=b.width);!isNaN(b.height)&&b.height<a.height&&(a.height=b.height);return a};
  Qg.prototype.computeCellSize=function(){var a=new ga(NaN,NaN),b=this.oc.S;if(b){var c=b.WF;!isNaN(c.width)&&0<c.width&&(a.width=c.width);!isNaN(c.height)&&0<c.height&&(a.height=c.height)}c=this.$k;isNaN(a.width)&&!isNaN(c.width)&&0<c.width&&(a.width=c.width);isNaN(a.height)&&!isNaN(c.height)&&0<c.height&&(a.height=c.height);b=this.h;(isNaN(a.width)||isNaN(a.height))&&b&&(c=b.wb.Fd,null!==c&&c.qp&&(c=c.mA,isNaN(a.width)&&!isNaN(c.width)&&0<c.width&&(a.width=c.width),isNaN(a.height)&&!isNaN(c.height)&&
  0<c.height&&(a.height=c.height)),b=b.lp,null!==b&&b.visible&&this.qp&&(c=b.gt,isNaN(a.width)&&!isNaN(c.width)&&0<c.width&&(a.width=c.width),isNaN(a.height)&&!isNaN(c.height)&&0<c.height&&(a.height=c.height)));if(isNaN(a.width)||0===a.width||Infinity===a.width)a.width=1;if(isNaN(a.height)||0===a.height||Infinity===a.height)a.height=1;return a};t.g(Qg,"minSize",Qg.prototype.Vf);
  t.defineProperty(Qg,{Vf:"minSize"},function(){return this.Fj},function(a){t.l(a,ga,Qg,"minSize");if(!this.Fj.M(a)){var b=a.width;isNaN(b)&&(b=0);a=a.height;isNaN(a)&&(a=0);this.Fj.p(b,a)}});t.g(Qg,"maxSize",Qg.prototype.He);t.defineProperty(Qg,{He:"maxSize"},function(){return this.Ej},function(a){t.l(a,ga,Qg,"maxSize");if(!this.Ej.M(a)){var b=a.width;isNaN(b)&&(b=Infinity);a=a.height;isNaN(a)&&(a=Infinity);this.Ej.p(b,a)}});t.g(Qg,"cellSize",Qg.prototype.$k);
  t.defineProperty(Qg,{$k:"cellSize"},function(){return this.qj},function(a){t.l(a,ga,Qg,"cellSize");this.qj.M(a)||this.qj.assign(a)});t.g(Qg,"isGridSnapEnabled",Qg.prototype.qp);t.defineProperty(Qg,{qp:"isGridSnapEnabled"},function(){return this.Wq},function(a){t.i(a,"boolean",Qg,"isGridSnapEnabled");this.Wq=a});t.g(Qg,"originalDesiredSize",Qg.prototype.xJ);t.A(Qg,{xJ:"originalDesiredSize"},function(){return this.uv});t.g(Qg,"originalLocation",Qg.prototype.yJ);t.A(Qg,{yJ:"originalLocation"},function(){return this.mz});
  function Yg(){0<arguments.length&&t.ad(Yg);ae.call(this);this.name="Rotating";this.gD=45;this.fD=2;this.ib=null;var a=new W;a.zb="Ellipse";a.Ca=H.Nx;a.fill="lightblue";a.stroke="dodgerblue";a.fb=1;a.cursor="pointer";this.Ek=a;this.dc=null;this.tv=0;this.bD=new w}t.ga("RotatingTool",Yg);t.Ka(Yg,ae);
  Yg.prototype.updateAdornments=function(a){if(!(null===a||a instanceof V)){if(a.eb&&!this.h.ab){var b=a.bG;if(null!==b&&a.canRotate()&&a.pa.N()&&a.Qa()&&b.pa.N()&&b.ol()){var c=a.bp(this.name);null===c&&(c=this.makeAdornment(b));if(null!==c){c.angle=b.gl();var d=null,f=null;b===a||b===a.kc?(d=a.kc,f=a.bf):(d=b,f=Kb);for(var g=d.Ra,f=t.lc(g.width*f.x+f.offsetX,g.height*f.y+f.offsetY);null!==d&&d!==b;)d.transform.Ta(f),d=d.ia;var d=f.y,g=Math.max(f.x-b.Ra.width,0),h=t.K();c.location=b.qb(new I(1,0,50+
  g,d),h);t.B(h);t.B(f);a.Vk(this.name,c);return}}}a.ul(this.name)}};Yg.prototype.makeAdornment=function(a){var b=null,b=a.S.aG;if(null===b){b=new Je;b.type=Zg;b.bf=Kb;var c=this.ht;null!==c&&b.add(c.copy())}else if(Le(b),b=b.copy(),!(b instanceof Je))return null;b.Zc=this.name;b.oc=a;return b};t.defineProperty(Yg,{ht:"handleArchetype"},function(){return this.Ek},function(a){null!==a&&t.l(a,Q,Yg,"handleArchetype");this.Ek=a});t.A(Yg,{handle:"handle"},function(){return this.dc});
  t.defineProperty(Yg,{oc:"adornedObject"},function(){return this.ib},function(a){null!==a&&t.l(a,Q,Yg,"adornedObject");this.ib=a});Yg.prototype.canStart=function(){if(!this.isEnabled)return!1;var a=this.h;return null!==a&&!a.ab&&a.Po&&a.R.left?null!==this.findToolHandleAt(a.Nc.ea,this.name)?!0:!1:!1};
  Yg.prototype.doActivate=function(){var a=this.h;if(null!==a&&(this.dc=this.findToolHandleAt(a.Nc.ea,this.name),null!==this.dc)){this.ib=this.dc.S.oc;var b=this.ib.S,c=b.kc;this.bD=this.ib===b||this.ib===c?c.qb(b.bf):this.ib.qb(Kb);this.tv=this.ib.angle;a.Kd=!0;a.ww=!0;this.sc(this.name);this.ha=!0}};Yg.prototype.doDeactivate=function(){var a=this.h;null!==a&&(this.gk(),this.ib=this.dc=null,this.ha=a.Kd=!1)};Yg.prototype.doCancel=function(){var a=this.h;a&&(a.ww=!1);this.rotate(this.tv);this.stopTool()};
  Yg.prototype.doMouseMove=function(){var a=this.h;this.ha&&null!==a&&(a=this.computeRotate(a.R.ea),this.rotate(a))};Yg.prototype.doMouseUp=function(){var a=this.h;if(this.ha&&null!==a){a.ww=!1;var b=this.computeRotate(a.R.ea);this.rotate(b);a.Oc();this.gf=this.name;a.Ba("PartRotated",this.ib,this.tv)}this.stopTool()};Yg.prototype.rotate=function(a){e&&t.q(a,Yg,"rotate:newangle");null!==this.ib&&(this.ib.angle=a)};
  Yg.prototype.computeRotate=function(a){a=this.bD.$i(a);var b=this.ib.ia;b&&(a-=b.gl(),360<=a?a-=360:0>a&&(a+=360));var b=Math.min(Math.abs(this.vG),180),c=Math.min(Math.abs(this.uG),b/2);!this.h.R.shift&&0<b&&0<c&&(a%b<c?a=Math.floor(a/b)*b:a%b>b-c&&(a=(Math.floor(a/b)+1)*b));360<=a?a-=360:0>a&&(a+=360);return a};t.g(Yg,"snapAngleMultiple",Yg.prototype.vG);t.defineProperty(Yg,{vG:"snapAngleMultiple"},function(){return this.gD},function(a){t.i(a,"number",Yg,"snapAngleMultiple");this.gD=a});
  t.g(Yg,"snapAngleEpsilon",Yg.prototype.uG);t.defineProperty(Yg,{uG:"snapAngleEpsilon"},function(){return this.fD},function(a){t.i(a,"number",Yg,"snapAngleEpsilon");this.fD=a});t.g(Yg,"originalAngle",Yg.prototype.wJ);t.A(Yg,{wJ:"originalAngle"},function(){return this.tv});function $g(){0<arguments.length&&t.ad($g);ae.call(this);this.name="ClickSelecting"}t.ga("ClickSelectingTool",$g);t.Ka($g,ae);$g.prototype.canStart=function(){return!this.isEnabled||null===this.h||this.isBeyondDragSize()?!1:!0};
  $g.prototype.doMouseUp=function(){this.ha&&(this.standardMouseSelect(),this.standardMouseClick());this.stopTool()};function ah(){0<arguments.length&&t.ad(ah);ae.call(this);this.name="Action";this.tn=null}t.ga("ActionTool",ah);t.Ka(ah,ae);ah.prototype.canStart=function(){if(!this.isEnabled)return!1;var a=this.h;if(null===a)return!1;var b=a.R,c=a.pe(b.ea,function(a){for(;null!==a.ia&&!a.Pw;)a=a.ia;return a},function(a){return a.Pw});return null!==c?(this.tn=c,a.Bn=a.pe(b.ea,null,null),!0):!1};
  ah.prototype.doMouseDown=function(){if(this.ha){var a=this.h.R,b=this.tn;null!==b&&(a.ce=b,null!==b.Gz&&b.Gz(a,b))}else this.canStart()&&this.doActivate()};ah.prototype.doMouseMove=function(){if(this.ha){var a=this.h.R,b=this.tn;null!==b&&(a.ce=b,null!==b.Hz&&b.Hz(a,b))}};ah.prototype.doMouseUp=function(){if(this.ha){var a=this.h,b=a.R,c=this.tn;if(null===c)return;b.ce=c;null!==c.Iz&&c.Iz(b,c);this.isBeyondDragSize()||$e(c,b,a)}this.stopTool()};
  ah.prototype.doCancel=function(){var a=this.h;if(null!==a){var a=a.R,b=this.tn;if(null===b)return;a.ce=b;null!==b.Fz&&b.Fz(a,b)}this.stopTool()};ah.prototype.doStop=function(){this.tn=null};function qa(){0<arguments.length&&t.ad(qa);ae.call(this);this.name="ClickCreating";this.wk=null;this.sC=!0;this.iC=new w(0,0)}t.ga("ClickCreatingTool",qa);t.Ka(qa,ae);
  qa.prototype.canStart=function(){if(!this.isEnabled||null===this.Os)return!1;var a=this.h;if(null===a||a.ab||a.Ze||!a.zm||!a.R.left||this.isBeyondDragSize())return!1;if(this.cF){if(1===a.R.Ae&&(this.iC=a.R.Ke.copy()),2!==a.R.Ae||this.isBeyondDragSize(this.iC))return!1}else if(1!==a.R.Ae)return!1;return a.Ua!==this&&null!==a.dt(a.R.ea,!0)?!1:!0};qa.prototype.doMouseUp=function(){var a=this.h;this.ha&&null!==a&&this.insertPart(a.R.ea);this.stopTool()};
  qa.prototype.insertPart=function(a){var b=this.h;if(null===b)return null;var c=this.Os;if(null===c)return null;this.sc(this.name);var d=null;c instanceof E?c.Ld()&&(Le(c),d=c.copy(),d instanceof E&&b.add(d)):null!==c&&(c=b.ba.copyNodeData(c),t.rb(c)&&(b.ba.ym(c),d=b.gh(c)));d instanceof E&&(d.location=a,b.Pe&&b.select(d));b.Oc();this.gf=this.name;b.Ba("PartCreated",d);this.gk();return d instanceof E?d:null};t.g(qa,"archetypeNodeData",qa.prototype.Os);
  t.defineProperty(qa,{Os:"archetypeNodeData"},function(){return this.wk},function(a){null!==a&&t.l(a,Object,qa,"archetypeNodeData");this.wk=a});t.g(qa,"isDoubleClick",qa.prototype.cF);t.defineProperty(qa,{cF:"isDoubleClick"},function(){return this.sC},function(a){t.i(a,"boolean",qa,"isDoubleClick");this.sC=a});
  function bh(){0<arguments.length&&t.ad(bh);ae.call(this);this.name="ContextMenu";this.Cn=this.RB=null;this.IC=new w;this.Kn=null;if(!0===t.iB){this.Kn=new Je;this.Ey=null;var a=this;this.xD=function(){a.stopTool()};if(!1===t.nE){var b=document.createElement("div"),c=document.createElement("div");b.style.cssText="top: 0px;z-index:300;position: fixed;display: none;text-align: center;left: 25%;width: 50%;background-color: #F5F5F5;padding: 16px;border: 16px solid #444;border-radius: 10px;margin-top: 10px";
  c.style.cssText="z-index:299;position: fixed;display: none;top: 0;left: 0;width: 100%;height: 100%;background-color: black;-moz-opacity: 0.8;opacity:.80;filter: alpha(opacity=80);";var d=document.createElement("style");document.getElementsByTagName("head")[0].appendChild(d);d.sheet.insertRule(".defaultCXul { list-style: none; }",0);d.sheet.insertRule(".defaultCXli {font:700 1.5em Helvetica, Arial, sans-serif;position: relative;min-width: 60px; }",0);d.sheet.insertRule(".defaultCXa {color: #444;display: inline-block;padding: 4px;text-decoration: none;margin: 2px;border: 1px solid gray;border-radius: 10px; }",
  0);b.addEventListener("contextmenu",function(a){a.preventDefault();return!1},!1);b.addEventListener("selectstart",function(a){a.preventDefault();return!1},!1);c.addEventListener("contextmenu",function(a){a.preventDefault();return!1},!1);document.body&&(document.body.appendChild(b),document.body.appendChild(c));t.Us=b;t.Ts=c;t.nE=!0}}}t.ga("ContextMenuTool",bh);t.Ka(bh,ae);
  bh.prototype.canStart=function(){if(!this.isEnabled)return!1;var a=this.h;return null===a||this.isBeyondDragSize()||!a.R.right?!1:(null===this.Kn||a.R.event instanceof MouseEvent)&&null===this.findObjectWithContextMenu()?!1:!0};bh.prototype.doStart=function(){var a=this.h;null!==a&&this.IC.set(a.Nc.ea)};bh.prototype.doStop=function(){this.hideDefaultContextMenu();this.hideContextMenu();this.Cn=null};
  bh.prototype.findObjectWithContextMenu=function(a){var b=this.h;if(null===b)return null;var c=b.R,d=null,d=void 0!==a?a:b.pe(c.ea,null,function(a){return!a.layer.yc});if(null!==d){for(a=d;null!==a;){c=a.contextMenu;if(null!==c)return a;a=a.ia}if(null!==this.Kn&&!(b.R.event instanceof MouseEvent))return d.S}else if(c=b.contextMenu,null!==c)return b;return null};bh.prototype.doActivate=function(){};
  bh.prototype.doMouseDown=function(){if(this.ha){var a=this.h;if(null!==a&&null!==this.rf){var b=a.pe(a.R.ea,null,null);null!==b&&b.ej(this.rf)?(this.standardMouseClick(null,null),this.stopTool()):(this.stopTool(),a.Ua.doMouseDown())}}};bh.prototype.doMouseUp=function(){this.ha||this.canStart()&&Ze(this,!0)};
  function Ze(a,b,c){a.ha=!0;b&&a.standardMouseSelect();a.standardMouseClick();a.Cn=null;void 0===c&&(c=a.findObjectWithContextMenu());null!==c?(b=c.contextMenu,null!==b?(a.Cn=c instanceof Q?c:null,a.showContextMenu(b,a.Cn)):a.showDefaultContextMenu()):a.showDefaultContextMenu()}bh.prototype.doMouseMove=function(){this.ha&&this.standardMouseOver()};
  bh.prototype.showContextMenu=function(a,b){t.l(a,Je,bh,"showContextMenu:contextmenu");null!==b&&t.l(b,Q,bh,"showContextMenu:obj");var c=this.h;if(null!==c){a!==this.rf&&this.hideContextMenu();a.af="Tool";a.vl=!1;a.scale=1/c.scale;a.Zc=this.name;c.add(a);if(null!==b){var c=null,d=b.ep();null!==d&&(c=d.data);a.oc=b;a.data=c}else a.data=c.ba;a.sf();this.positionContextMenu(a,b);this.rf=a}};
  bh.prototype.positionContextMenu=function(a){var b=this.h;if(null!==b){var c=b.R.ea.copy(),d=a.Ea,f=b.xb;b.R.Uw&&(c.x-=d.width);c.x+d.width>f.right&&(c.x-=d.width+5);c.x<f.x&&(c.x=f.x);c.y+d.height>f.bottom&&(c.y-=d.height+5);c.y<f.y&&(c.y=f.y);a.position=c}};bh.prototype.hideContextMenu=function(){var a=this.h;null!==a&&null!==this.rf&&(this.rf.data=null,this.rf.oc=null,a.remove(this.rf),this.rf=null,this.standardMouseOver())};
  bh.prototype.initializeDefaultButtons=function(){if(null===this.h)return null;var a=new B,b=this.h.Se;a.add({text:"Copy",eh:function(){b.copySelection()},visible:function(){return b.canCopySelection()}});a.add({text:"Cut",eh:function(){b.cutSelection()},visible:function(){return b.canCutSelection()}});a.add({text:"Delete",eh:function(){b.deleteSelection()},visible:function(){return b.canDeleteSelection()}});a.add({text:"Paste",eh:function(a){b.pasteSelection(a.R.ea)},visible:function(){return b.canPasteSelection()}});
  a.add({text:"Select All",eh:function(){b.selectAll()},visible:function(){return b.canSelectAll()}});a.add({text:"Undo",eh:function(){b.undo()},visible:function(){return b.canUndo()}});a.add({text:"Redo",eh:function(){b.redo()},visible:function(){return b.canRedo()}});a.add({text:"Zoom To Fit",eh:function(){b.zoomToFit()},visible:function(){return b.canZoomToFit()}});a.add({text:"Reset Zoom",eh:function(){b.resetZoom()},visible:function(){return b.canResetZoom()}});a.add({text:"Group Selection",eh:function(){b.groupSelection()},
  visible:function(){return b.canGroupSelection()}});a.add({text:"Ungroup Selection",eh:function(){b.ungroupSelection()},visible:function(){return b.canUngroupSelection()}});a.add({text:"Edit Text",eh:function(){b.editTextBlock()},visible:function(){return b.canEditTextBlock()}});return a};
  bh.prototype.showDefaultContextMenu=function(){var a=this.h;if(null!==a){null===this.Ey&&(this.Ey=this.initializeDefaultButtons());this.Kn!==this.rf&&this.hideContextMenu();t.Us.innerHTML="";t.Ts.addEventListener("click",this.xD,!1);var b=this,c=document.createElement("ul");c.className="defaultCXul";t.Us.appendChild(c);c.innerHTML="";for(var d=this.Ey.k;d.next();){var f=d.value,g=f.text,h=f.visible;if("function"!==typeof h||h()){h=document.createElement("li");h.className="defaultCXli";var k=document.createElement("a");
  k.className="defaultCXa";k.href="#";k.kH=f.eh;k.addEventListener("click",function(c){this.kH(a);b.stopTool();c.preventDefault();return!1},!1);k.textContent=g;h.appendChild(k);c.appendChild(h)}}t.Us.style.display="block";t.Ts.style.display="block";this.rf=this.Kn}};bh.prototype.hideDefaultContextMenu=function(){null!==this.rf&&this.rf===this.Kn&&(t.Us.style.display="none",t.Ts.style.display="none",t.Ts.removeEventListener("click",this.xD,!1),this.rf=null)};t.g(bh,"currentContextMenu",bh.prototype.rf);
  t.defineProperty(bh,{rf:"currentContextMenu"},function(){return this.RB},function(a){null!==a&&t.l(a,Je,bh,"currentContextMenu");this.RB=a});t.g(bh,"currentObject",bh.prototype.lI);t.defineProperty(bh,{lI:"currentObject"},function(){return this.Cn},function(a){null!==a&&t.l(a,Q,bh,"currentObject");this.Cn=a});t.A(bh,{JK:"mouseDownPoint"},function(){return this.IC});
  function ch(){0<arguments.length&&t.ad(ch);ae.call(this);this.name="DragSelecting";this.Ln=175;this.xC=!1;var a=new E;a.af="Tool";a.vl=!1;var b=new W;b.name="SHAPE";b.zb="Rectangle";b.fill=null;b.stroke="magenta";a.add(b);this.Il=a}t.ga("DragSelectingTool",ch);t.Ka(ch,ae);
  ch.prototype.canStart=function(){if(!this.isEnabled)return!1;var a=this.h;if(null===a||!a.Pe)return!1;var b=a.R;return!b.left||a.Ua!==this&&(!this.isBeyondDragSize()||b.timestamp-a.Nc.timestamp<this.vw||null!==a.dt(b.ea,!0))?!1:!0};ch.prototype.doActivate=function(){var a=this.h;null!==a&&(this.ha=!0,a.Kd=!0,a.Wa=!0,a.add(this.vg),this.doMouseMove())};ch.prototype.doDeactivate=function(){var a=this.h;null!==a&&(a.remove(this.vg),a.Wa=!1,this.ha=a.Kd=!1)};
  ch.prototype.doMouseMove=function(){if(null!==this.h&&this.ha&&null!==this.vg){var a=this.computeBoxBounds(),b=this.vg.oe("SHAPE");null===b&&(b=this.vg.Dw());b.Ca=a.size;this.vg.position=a.position}};ch.prototype.doMouseUp=function(){if(this.ha){var a=this.h;a.remove(this.vg);try{a.$b="wait",this.selectInRect(this.computeBoxBounds())}finally{a.$b=""}}this.stopTool()};ch.prototype.computeBoxBounds=function(){var a=this.h;return null===a?new x(0,0,0,0):new x(a.Nc.ea,a.R.ea)};
  ch.prototype.selectInRect=function(a){var b=this.h;if(null!==b){var c=b.R;b.Ba("ChangingSelection");a=b.ak(a,null,function(a){return a instanceof E&&a.canSelect()},this.hF);if(t.Um?c.Bp:c.control)if(c.shift)for(a=a.k;a.next();)c=a.value,c.eb&&(c.eb=!1);else for(a=a.k;a.next();)c=a.value,c.eb=!c.eb;else{if(!c.shift){for(var d=new B(E),f=b.selection.k;f.next();)c=f.value,a.contains(c)||d.add(c);for(d=d.k;d.next();)c=d.value,c.eb=!1}for(a=a.k;a.next();)c=a.value,c.eb||(c.eb=!0)}b.Ba("ChangedSelection")}};
  t.g(ch,"delay",ch.prototype.vw);t.defineProperty(ch,{vw:"delay"},function(){return this.Ln},function(a){t.i(a,"number",ch,"delay");this.Ln=a});t.g(ch,"isPartialInclusion",ch.prototype.hF);t.defineProperty(ch,{hF:"isPartialInclusion"},function(){return this.xC},function(a){t.i(a,"boolean",ch,"isPartialInclusion");this.xC=a});t.g(ch,"box",ch.prototype.vg);t.defineProperty(ch,{vg:"box"},function(){return this.Il},function(a){null!==a&&t.l(a,E,ch,"box");this.Il=a});
  function dh(){0<arguments.length&&t.ad(dh);ae.call(this);this.name="Panning";this.oz=new w;this.pj=!1;var a=this;this.lD=function(){document.removeEventListener("scroll",a.lD,!1);a.stopTool()}}t.ga("PanningTool",dh);t.Ka(dh,ae);dh.prototype.canStart=function(){if(!this.isEnabled)return!1;var a=this.h;return null===a||!a.of&&!a.pf||!a.R.left||a.Ua!==this&&!this.isBeyondDragSize()?!1:!0};
  dh.prototype.doActivate=function(){var a=this.h;null!==a&&(this.pj?(a.R.bubbles=!0,document.addEventListener("scroll",this.lD,!1)):(a.$b="move",a.Kd=!0,this.oz=a.position.copy()),this.ha=!0)};dh.prototype.doDeactivate=function(){var a=this.h;null!==a&&(a.$b="",this.ha=a.Kd=!1)};dh.prototype.doCancel=function(){var a=this.h;null!==a&&(a.position=this.oz,a.Kd=!1);this.stopTool()};dh.prototype.doMouseMove=function(){this.move()};dh.prototype.doMouseUp=function(){this.move();this.stopTool()};
  dh.prototype.move=function(){var a=this.h;if(this.ha&&a)if(this.pj)a.R.bubbles=!0;else{var b=a.position,c=a.Nc.ea,d=a.R.ea,f=b.x+c.x-d.x,c=b.y+c.y-d.y;a.of||(f=b.x);a.pf||(c=b.y);a.position=new w(f,c)}};t.g(dh,"bubbles",dh.prototype.bubbles);t.defineProperty(dh,{bubbles:"bubbles"},function(){return this.pj},function(a){t.i(a,"boolean",dh,"bubbles");this.pj=a});t.g(dh,"originalPosition",dh.prototype.BJ);t.A(dh,{BJ:"originalPosition"},function(){return this.oz});
  function eh(){0<arguments.length&&t.ad(eh);ae.call(this);this.name="TextEditing";this.UB=this.Bz=this.pD=null;this.kD=fh;this.Sk=null;this.Ya=gh;this.Ok=null;var a=document.createElement("textarea");a.EB=!0;this.ZB=a;a.addEventListener("input",function(){var a=this.textEditingTool.pD;a.text=this.value;hh(a,Infinity,Infinity);this.style.width=20+a.Ea.width*this.bK+"px";this.rows=a.oF},!1);a.addEventListener("keydown",function(a){var c=a.which,d=this.textEditingTool;if(null!==d)if(13===c)d.acceptText(ih);
  else{if(9===c)return d.acceptText(jh),a.preventDefault(),!1;27===c&&(d.doCancel(),d.h&&d.h.focus())}},!1);a.addEventListener("focus",function(){var a=this.textEditingTool;a.Ya===kh?a.Ya=lh:a.Ya===mh?a.Ya=vh:a.Ya===vh&&(a.Ya=lh);this.select()},!1);a.addEventListener("blur",function(){this.focus();this.select()},!1)}t.ga("TextEditingTool",eh);t.Ka(eh,ae);var wh;eh.LostFocus=wh=t.w(eh,"LostFocus",0);var xh;eh.MouseDown=xh=t.w(eh,"MouseDown",1);var jh;eh.Tab=jh=t.w(eh,"Tab",2);var ih;
  eh.Enter=ih=t.w(eh,"Enter",3);eh.SingleClick=t.w(eh,"SingleClick",0);var fh;eh.SingleClickSelected=fh=t.w(eh,"SingleClickSelected",1);var gh=t.w(eh,"StateNone",0),kh=t.w(eh,"StateActive",1),lh=t.w(eh,"StateEditing",2),vh=t.w(eh,"StateEditing2",3),yh=t.w(eh,"StateValidating",4),mh=t.w(eh,"StateValidated",5);t.g(eh,"textBlock",eh.prototype.Ng);t.defineProperty(eh,{Ng:"textBlock"},function(){return this.Bz},function(a){null!==a&&t.l(a,na,eh,"textBlock");this.Bz=a});t.g(eh,"currentTextEditor",eh.prototype.fh);
  t.defineProperty(eh,{fh:"currentTextEditor"},function(){return this.UB},function(a){this.UB=a});t.g(eh,"defaultTextEditor",eh.prototype.pE);t.defineProperty(eh,{pE:"defaultTextEditor"},function(){return this.ZB},function(a){this.ZB=a});t.g(eh,"starting",eh.prototype.wG);t.defineProperty(eh,{wG:"starting"},function(){return this.kD},function(a){t.Aa(a,eh,eh,"starting");this.kD=a});
  eh.prototype.canStart=function(){if(!this.isEnabled)return!1;var a=this.h;if(null===a||a.ab||!a.R.left||this.isBeyondDragSize())return!1;a=a.pe(a.R.ea,null,function(a){return a instanceof na});if(!(a instanceof na&&a.yw&&a.S.canEdit()))return!1;a=a.S;return null===a||this.wG===fh&&!a.eb?!1:!0};eh.prototype.doStart=function(){this.ha||null===this.Ng||this.doActivate()};
  eh.prototype.doActivate=function(){if(!this.ha){var a=this.h;if(null!==a){var b=this.Ng;null===b&&(b=a.pe(a.R.ea,function(a){return a instanceof na?a:null}),b=b instanceof na?b:null);if(null!==b&&(this.Ng=b,null!==b.S)){this.ha=!0;this.Ya=kh;var c=this.pE,d=!1;null!==b.jB&&(c=b.jB);null===c||c.EB||(d=!0);this.pD=this.Ng.copy();if(c.EB){var f=b.qb(Kb),g=a.position,h=a.scale,k=b.dk()*h,l=b.Ra.width*k;zh(b);var m=(f.x-g.x)*h,f=(f.y-g.y)*h;c.value=b.text;a.aj.style.font=b.font;c.style.font="inherit";
  c.style.fontSize=100*k+"%";c.style.lineHeight="normal";l=20+l;c.style.width=l+"px";c.style.height="";c.rows=b.oF;a.aj.appendChild(c);c.style.left=(m-l/2|0)+"px";c.style.top=(f-c.clientHeight/2|0)+"px";c.style.textAlign=b.textAlign}else a.aj.appendChild(c);c.style.position="absolute";c.style.zIndex=100;c.className="start";c.textEditingTool=this;c.bK=k;if(d&&void 0!==c.onActivate)c.onActivate();this.fh=c;c.focus();c.select()}}}};
  eh.prototype.doCancel=function(){null!==this.Ok&&(this.fh.style.border=this.Ok,this.Ok=null);this.stopTool()};eh.prototype.doMouseUp=function(){!this.ha&&this.canStart()&&this.doActivate()};eh.prototype.doMouseDown=function(){this.ha&&this.acceptText(xh)};
  eh.prototype.acceptText=function(a){switch(a){case xh:if(this.Ya===mh||this.Ya===vh)this.fh.focus();else if(this.Ya===kh||this.Ya===lh)this.Ya=yh,Ah(this);break;case wh:case ih:case jh:if(ih===a&&!0===this.Bz.Tw)break;if(this.Ya===kh||this.Ya===lh)this.Ya=yh,Ah(this)}};
  function Ah(a){if(null!==a.Ng&&null!==a.fh){var b=a.Ng,c=a.Ng.text,d=a.fh.value,f="",f="function"===typeof d?d():d;if(!a.isValidText(a.Ng,c,f)){a.Ya=lh;null!==b.$s&&b.$s(a,c,f);null===a.Ok&&(a.Ok=a.fh.style.border,a.fh.style.border="3px solid red");a.fh.focus();return}a.sc(a.name);a.Ya=mh;c!==f&&(a.Ng.text=f);a.gf=a.name;b=a.h;null!==b&&b.Ba("TextEdited",a.Ng,c);a.gk();a.stopTool();null!==b&&b.focus()}null!==a.Ok&&(a.fh.style.border=a.Ok,a.Ok=null)}
  eh.prototype.doDeactivate=function(){var a=this.h;if(null!==a){this.Ya=gh;this.Ng=null;if(null!==this.fh){var b=this.fh;if(void 0!==b.onDeactivate)b.onDeactivate();null!==b&&a.aj.removeChild(b)}this.ha=!1}};eh.prototype.isValidText=function(a,b,c){t.l(a,na,eh,"isValidText:textblock");var d=this.Vt;if(null!==d&&!d(a,b,c))return!1;d=a.Vt;return null===d||d(a,b,c)?!0:!1};t.g(eh,"textValidation",eh.prototype.Vt);
  t.defineProperty(eh,{Vt:"textValidation"},function(){return this.Sk},function(a){null!==a&&t.i(a,"function",eh,"textValidation");this.Sk=a});function He(){ae.call(this);this.name="ToolManager";this.JC=new B(ae);this.KC=new B(ae);this.LC=new B(ae);this.lC=this.mC=1E3;this.aC=(new ga(2,2)).Ja();this.zu=this.Cy=null;this.MC=bf}t.ga("ToolManager",He);t.Ka(He,ae);var bf;He.WheelScroll=bf=t.w(He,"WheelScroll",0);var af;He.WheelZoom=af=t.w(He,"WheelZoom",1);He.WheelNone=t.w(He,"WheelNone",2);
  t.g(He,"mouseWheelBehavior",He.prototype.bn);t.defineProperty(He,{bn:"mouseWheelBehavior"},function(){return this.MC},function(a){t.Aa(a,He,He,"mouseWheelBehavior");this.MC=a});He.prototype.initializeStandardTools=function(){this.GD=new ah;this.UA=new hf;this.rF=new Ag;this.ZF=new Qg;this.dG=new Yg;this.BA=new pa;this.Fd=new cf;this.vE=new ch;this.KF=new dh;this.pw=new bh;this.Cx=new eh;this.XD=new qa;this.YD=new $g};
  He.prototype.doMouseDown=function(){var a=this.h;if(null!==a){var b=a.ja;b.Uz&&0!==b.Je&&t.trace("WARNING: In ToolManager.doMouseDown: UndoManager.transactionLevel is not zero");for(var b=this.ef.length,c=0;c<b;c++){var d=this.ef.wa(c);null===d.h&&d.wd(this.h);if(d.canStart()){a.Ua=d;a.Ua===d&&(d.ha||d.doActivate(),d.doMouseDown());return}}1===a.R.button&&(this.bn===bf?this.bn=af:this.bn===af&&(this.bn=bf));this.doActivate();this.standardWaitAfter(this.nA)}};
  He.prototype.doMouseMove=function(){var a=this.h;if(null!==a){if(this.ha)for(var b=this.Dg.length,c=0;c<b;c++){var d=this.Dg.wa(c);null===d.h&&d.wd(this.h);if(d.canStart()){a.Ua=d;a.Ua===d&&(d.ha||d.doActivate(),d.doMouseMove());return}}this.standardMouseOver();this.isBeyondDragSize()&&this.standardWaitAfter(this.ha?this.nA:this.UE)}};He.prototype.doCurrentObjectChanged=function(a,b){var c=this.dl;null===c||null!==b&&(b===c||b.ej(c))||this.hideToolTip()};
  He.prototype.doWaitAfter=function(){this.h&&this.h.jb&&(this.doMouseHover(),this.ha||this.doToolTip())};He.prototype.doMouseHover=function(){var a=this.h;if(null!==a){var b=a.R;null===b.ce&&(b.ce=a.pe(b.ea,null,null));var c=b.ce;if(null!==c)for(;null!==c;){a=this.ha?c.wt:c.xt;if(null!==a&&(a(b,c),b.Ee))break;c=c.ia}else a=this.ha?a.wt:a.xt,null!==a&&a(b)}};
  He.prototype.doToolTip=function(){var a=this.h;if(null!==a){var b=a.R;null===b.ce&&(b.ce=a.pe(b.ea,null,null));b=b.ce;if(null!==b){if(b!==this.dl&&!b.ej(this.dl)){for(;null!==b;){a=b.Wt;if(null!==a){this.showToolTip(a,b);return}b=b.ia}this.hideToolTip()}}else a=a.Wt,null!==a?this.showToolTip(a,null):this.hideToolTip()}};
  He.prototype.showToolTip=function(a,b){t.l(a,Je,He,"showToolTip:tooltip");null!==b&&t.l(b,Q,He,"showToolTip:obj");var c=this.h;if(null!==c){a!==this.dl&&this.hideToolTip();a.af="Tool";a.vl=!1;a.scale=1/c.scale;c.add(a);if(null!==b&&b!==this.zu){var c=null,d=b.ep();null!==d&&(c=d.data);a.oc=b;a.data=c}else null===b&&(a.data=c.ba);if(null===b||b!==this.zu)a.sf(),this.positionToolTip(a,b);this.Cy=a;this.zu=b}};
  He.prototype.positionToolTip=function(a){var b=this.h;if(null!==b){var c=b.R.ea.copy(),d=a.Ea,f=b.xb;b.R.Uw&&(c.x-=d.width);c.x+d.width>f.right&&(c.x-=d.width+5);c.x<f.x&&(c.x=f.x);c.y=c.y+20+d.height>f.bottom?c.y-(d.height+5):c.y+20;c.y<f.y&&(c.y=f.y);a.position=c}};He.prototype.hideToolTip=function(){if(null!==this.dl){var a=this.h;null!==a&&(this.dl.data=null,this.dl.oc=null,a.remove(this.dl),this.zu=this.Cy=null)}};t.A(He,{dl:"currentToolTip"},function(){return this.Cy});
  He.prototype.doMouseUp=function(){this.cancelWaitAfter();if(this.ha){var a=this.h;if(null===a)return;for(var b=this.Eg.length,c=0;c<b;c++){var d=this.Eg.wa(c);null===d.h&&d.wd(this.h);if(d.canStart()){a.Ua=d;a.Ua===d&&(d.ha||d.doActivate(),d.doMouseUp());return}}}this.doDeactivate()};He.prototype.doMouseWheel=function(){this.standardMouseWheel()};He.prototype.doKeyDown=function(){var a=this.h;null!==a&&a.Se.doKeyDown()};He.prototype.doKeyUp=function(){var a=this.h;null!==a&&a.Se.doKeyUp()};
  He.prototype.doCancel=function(){null!==ff&&ff.doCancel();ae.prototype.doCancel.call(this)};He.prototype.findTool=function(a){t.i(a,"string",He,"findTool:name");for(var b=this.ef.length,c=0;c<b;c++){var d=this.ef.wa(c);if(d.name===a)return d}b=this.Dg.length;for(c=0;c<b;c++)if(d=this.Dg.wa(c),d.name===a)return d;b=this.Eg.length;for(c=0;c<b;c++)if(d=this.Eg.wa(c),d.name===a)return d;return null};
  He.prototype.replaceTool=function(a,b){t.i(a,"string",He,"replaceTool:name");null!==b&&(t.l(b,ae,He,"replaceTool:newtool"),b.h&&b.h!==this.h&&t.m("Cannot share tools between Diagrams: "+b.toString()),b.wd(this.h));for(var c=this.ef.length,d=0;d<c;d++){var f=this.ef.wa(d);if(f.name===a)return null!==b?this.ef.Mg(d,b):this.ef.qd(d),f}c=this.Dg.length;for(d=0;d<c;d++)if(f=this.Dg.wa(d),f.name===a)return null!==b?this.Dg.Mg(d,b):this.Dg.qd(d),f;c=this.Eg.length;for(d=0;d<c;d++)if(f=this.Eg.wa(d),f.name===
  a)return null!==b?this.Eg.Mg(d,b):this.Eg.qd(d),f;return null};function Bh(a,b,c,d){t.i(b,"string",He,"replaceStandardTool:name");t.l(d,B,He,"replaceStandardTool:list");null!==c&&(t.l(c,ae,He,"replaceStandardTool:newtool"),c.h&&c.h!==a.h&&t.m("Cannot share tools between Diagrams: "+c.toString()),c.name=b,c.wd(a.h));a.findTool(b)?a.replaceTool(b,c):null!==c&&d.add(c)}t.A(He,{ef:"mouseDownTools"},function(){return this.JC});t.A(He,{Dg:"mouseMoveTools"},function(){return this.KC});
  t.A(He,{Eg:"mouseUpTools"},function(){return this.LC});t.g(He,"hoverDelay",He.prototype.UE);t.defineProperty(He,{UE:"hoverDelay"},function(){return this.mC},function(a){t.i(a,"number",He,"hoverDelay");this.mC=a});t.g(He,"holdDelay",He.prototype.nA);t.defineProperty(He,{nA:"holdDelay"},function(){return this.lC},function(a){t.i(a,"number",He,"holdDelay");this.lC=a});t.g(He,"dragSize",He.prototype.wE);
  t.defineProperty(He,{wE:"dragSize"},function(){return this.aC},function(a){t.l(a,ga,He,"dragSize");this.aC=a.Z()});t.g(He,"actionTool",He.prototype.GD);t.defineProperty(He,{GD:"actionTool"},function(){return this.findTool("Action")},function(a){Bh(this,"Action",a,this.ef)});t.g(He,"relinkingTool",He.prototype.UA);t.defineProperty(He,{UA:"relinkingTool"},function(){return this.findTool("Relinking")},function(a){Bh(this,"Relinking",a,this.ef)});t.g(He,"linkReshapingTool",He.prototype.rF);
  t.defineProperty(He,{rF:"linkReshapingTool"},function(){return this.findTool("LinkReshaping")},function(a){Bh(this,"LinkReshaping",a,this.ef)});t.g(He,"resizingTool",He.prototype.ZF);t.defineProperty(He,{ZF:"resizingTool"},function(){return this.findTool("Resizing")},function(a){Bh(this,"Resizing",a,this.ef)});t.g(He,"rotatingTool",He.prototype.dG);t.defineProperty(He,{dG:"rotatingTool"},function(){return this.findTool("Rotating")},function(a){Bh(this,"Rotating",a,this.ef)});
  t.g(He,"linkingTool",He.prototype.BA);t.defineProperty(He,{BA:"linkingTool"},function(){return this.findTool("Linking")},function(a){Bh(this,"Linking",a,this.Dg)});t.g(He,"draggingTool",He.prototype.Fd);t.defineProperty(He,{Fd:"draggingTool"},function(){return this.findTool("Dragging")},function(a){Bh(this,"Dragging",a,this.Dg)});t.g(He,"dragSelectingTool",He.prototype.vE);
  t.defineProperty(He,{vE:"dragSelectingTool"},function(){return this.findTool("DragSelecting")},function(a){Bh(this,"DragSelecting",a,this.Dg)});t.g(He,"panningTool",He.prototype.KF);t.defineProperty(He,{KF:"panningTool"},function(){return this.findTool("Panning")},function(a){Bh(this,"Panning",a,this.Dg)});t.g(He,"contextMenuTool",He.prototype.pw);t.defineProperty(He,{pw:"contextMenuTool"},function(){return this.findTool("ContextMenu")},function(a){Bh(this,"ContextMenu",a,this.Eg)});
  t.g(He,"textEditingTool",He.prototype.Cx);t.defineProperty(He,{Cx:"textEditingTool"},function(){return this.findTool("TextEditing")},function(a){Bh(this,"TextEditing",a,this.Eg)});t.g(He,"clickCreatingTool",He.prototype.XD);t.defineProperty(He,{XD:"clickCreatingTool"},function(){return this.findTool("ClickCreating")},function(a){Bh(this,"ClickCreating",a,this.Eg)});t.g(He,"clickSelectingTool",He.prototype.YD);
  t.defineProperty(He,{YD:"clickSelectingTool"},function(){return this.findTool("ClickSelecting")},function(a){Bh(this,"ClickSelecting",a,this.Eg)});function Be(){this.mH=Ch;this.U=null;new ja;this.Ql=this.Rl=null;this.HB=this.sd=this.cr=this.xj=!1;this.Le=!0;this.yu=this.xu=this.SB=null;this.Ay=0;this.Ly=600;this.sH=new w(0,0);this.JB=this.IB=this.BD=!1;this.so=new ja}function Ch(a,b,c,d){a/=d/2;return 1>a?c/2*a*a+b:-c/2*(--a*(a-2)-1)+b}
  Be.prototype.prepareAnimation=Be.prototype.tl=function(){this.Le&&(this.xj&&this.mn(),this.sd=!0,this.HB=!1)};function Dh(a){a.Le&&requestAnimationFrame(function(){!1===a.sd||a.xj||(a.sd=!1,a.U.Ba("AnimationStarting"),Eh(a))})}
  function Fh(a,b,c,d){if(a.sd&&(e&&(b instanceof Q||t.m("addToAnimation:object must be a GraphObject.")),!(b instanceof E)||b.pA)){var f=a.so,g;f.contains(b)?(b=f.za(b),a=b[0],g=b[1],void 0===a.position&&(a.position=Gh(c)),g.position=Gh(d)):(a={},g={},a.position=Gh(c),g.position=Gh(d),f.add(b,[a,g]))}}function Gh(a){return a instanceof w?a.copy():a instanceof ga?a.copy():a}
  function Eh(a){var b,c=a.U;if(null!==c)if(0===a.so.count)a.xj=!1,c.Uf();else{a.xj=!0;b||(b={});var d=b.zK||a.mH,f=b.LK||null,g=b.MK||null,h=b.duration||a.Ly;b=a.so.k;for(var k=a.sH;b.next();){var l=b.value[0].position;l&&!l.N()&&l.assign(k)}a.SB=d;a.xu=f;a.yu=g;a.Ay=h;var m=a.lH=a.so;Hh(a);Ih(a,c,m,d,0,h,null!==a.Rl&&null!==a.Ql);Jh(a.U);Kh(a);requestAnimationFrame(function(b){var f=b||+new Date,g=f+h,k;(function u(b){!1!==a.xj&&(k=b||+new Date,b=k>g?h:k-f,Hh(a),Ih(a,c,m,d,b,h,null!==a.Rl&&null!==
  a.Ql),a.xu&&a.xu(),Jh(c),Kh(a),k>g?Lh(a):requestAnimationFrame(u))})(f)})}}var Mh={opacity:function(a,b,c,d,f,g){a.opacity=d(f,b,c-b,g)},position:function(a,b,c,d,f,g){f!==g?a.pG(d(f,b.x,c.x-b.x,g),d(f,b.y,c.y-b.y,g)):a.position=new w(d(f,b.x,c.x-b.x,g),d(f,b.y,c.y-b.y,g))},scale:function(a,b,c,d,f,g){a.scale=d(f,b,c-b,g)},visible:function(a,b,c,d,f,g){a.visible=f!==g?b:c}};function Hh(a){if(!a.cr){var b=a.U;a.BD=b.Wa;a.IB=b.Rt;a.JB=b.yo;b.Wa=!0;b.Rt=!0;b.yo=!0;a.cr=!0}}
  function Kh(a){var b=a.U;b.Wa=a.BD;b.Rt=a.IB;b.yo=a.JB;a.cr=!1}function Ih(a,b,c,d,f,g,h){for(c=c.k;c.next();){var k=c.key,l=c.value,m=l[0],l=l[1],n;for(n in l)if(void 0!==Mh[n])Mh[n](k,m[n],l[n],d,f,g)}h&&(h=a.Rl,a=a.Ql,n=a.y-h.y,a=d(f,h.x,a.x-h.x,g),d=d(f,h.y,n,g),f=b.Xb,b.Xb=!0,b.position=new w(a,d),b.Xb=f)}
  Be.prototype.stopAnimation=Be.prototype.mn=function(){!0===this.sd&&(this.sd=!1,this.HB&&this.U.te());this.xj&&this.Le&&(Hh(this),Ih(this,this.U,this.lH,this.SB,this.Ay,this.Ay,null!==this.Rl&&null!==this.Ql),Kh(this),Lh(this))};function Lh(a){a.xj=!1;a.Rl=null;a.Ql=null;a.so=new ja;Hh(a);for(var b=a.U.links;b.next();){var c=b.value;null!==c.xo&&(c.points=c.xo,c.xo=null)}b=a.U;b.Oc();b.Uf();Kh(a);a.yu&&a.yu();a.yu=null;a.xu=null;b.Ba("AnimationFinished")}
  function Nh(a,b,c){var d=b.pa,f=c.pa;c instanceof T&&c.placeholder?(c=c.placeholder,d=c.qb(Eb),d.x+=c.padding.left,d.y+=c.padding.top,Fh(a,b,d,b.position)):Fh(a,b,new w(f.x+f.width/2-d.width/2,f.y+f.height/2-d.height/2),b.position)}function Oh(a,b,c){a.sd&&(null===a.Rl&&b.N()&&null===a.Ql&&(a.Rl=b.copy()),a.Ql=c.copy())}t.g(Be,"isEnabled",Be.prototype.isEnabled);t.defineProperty(Be,{isEnabled:"isEnabled"},function(){return this.Le},function(a){t.i(a,"boolean",Be,"isEnabled");this.Le=a});
  t.g(Be,"duration",Be.prototype.duration);t.defineProperty(Be,{duration:"duration"},function(){return this.Ly},function(a){t.i(a,"number",Be,"duration");1>a&&t.la(a,">= 1",Be,"duration");this.Ly=a});t.A(Be,{yg:"isAnimating"},function(){return this.xj});t.A(Be,{CK:"isTicking"},function(){return this.cr});
  function $d(){0<arguments.length&&t.ad($d);t.Ac(this);this.U=null;this.Fb=new B(E);this.Yb="";this.Lf=1;this.cz=!1;this.Qk=this.Ez=this.tk=this.sk=this.rk=this.qk=this.ok=this.pk=this.nk=this.vk=this.mk=this.uk=this.lk=this.kk=!0;this.$y=!1;this.vv=[]}t.ga("Layer",$d);$d.prototype.wd=function(a){this.U=a};
  $d.prototype.toString=function(a){void 0===a&&(a=0);var b='Layer "'+this.name+'"';if(0>=a)return b;for(var c=0,d=0,f=0,g=0,h=0,k=this.Fb.k;k.next();){var l=k.value;l instanceof T?f++:l instanceof S?d++:l instanceof V?g++:l instanceof Je?h++:c++}k="";0<c&&(k+=c+" Parts ");0<d&&(k+=d+" Nodes ");0<f&&(k+=f+" Groups ");0<g&&(k+=g+" Links ");0<h&&(k+=h+" Adornments ");if(1<a)for(c=this.Fb.k;c.next();)d=c.value,k+="\n    "+d.toString(a-1),(f=d.data)&&t.od(f)&&(k+=" #"+t.od(f)),d instanceof S?k+=" "+yd(f):
  d instanceof V&&(k+=" "+yd(d.aa)+" "+yd(d.ca));return b+" "+this.Fb.count+": "+k};
  $d.prototype.findObjectAt=$d.prototype.pe=function(a,b,c){void 0===b&&(b=null);void 0===c&&(c=null);if(!1===this.Qk)return null;e&&!a.N()&&t.m("findObjectAt: Point must have a real value.");var d=this.Fb,f=!1;this.h.xb.Ga(a)&&(f=!0);for(var g=t.K(),h=d.length;h--;){var k=d.wa(h);if((!0!==f||!1!==Ph(k))&&k.Qa()&&(g.assign(a),Qa(g,k.me),k=k.pe(g,b,c),null!==k&&(null!==b&&(k=b(k)),k&&(null===c||c(k)))))return t.B(g),k}t.B(g);return null};
  $d.prototype.findObjectsAt=$d.prototype.cp=function(a,b,c,d){void 0===b&&(b=null);void 0===c&&(c=null);d instanceof B||d instanceof C||(d=new C(Q));if(!1===this.Qk)return d;e&&!a.N()&&t.m("findObjectsAt: Point must have a real value.");var f=this.Fb,g=!1;this.h.xb.Ga(a)&&(g=!0);for(var h=t.K(),k=f.length;k--;){var l=f.wa(k);!0===g&&!1===Ph(l)||!l.Qa()||(h.assign(a),Qa(h,l.me),l.cp(h,b,c,d)&&(null!==b&&(l=b(l)),l&&(null===c||c(l))&&d.add(l)))}t.B(h);return d};
  $d.prototype.findObjectsIn=$d.prototype.ak=function(a,b,c,d,f){void 0===b&&(b=null);void 0===c&&(c=null);void 0===d&&(d=!1);f instanceof B||f instanceof C||(f=new C(Q));if(!1===this.Qk)return f;e&&!a.N()&&t.m("findObjectsIn: Rect must have a real value.");var g=this.Fb,h=!1;this.h.xb.Wj(a)&&(h=!0);for(var k=g.length,g=g.n;k--;){var l=g[k];(!0!==h||!1!==Ph(l))&&l.Qa()&&l.ak(a,b,c,d,f)&&(null!==b&&(l=b(l)),l&&(null===c||c(l))&&f.add(l))}return f};
  $d.prototype.dA=function(a,b,c,d,f,g,h){if(!1===this.Qk)return f;for(var k=this.Fb,l=k.length,k=k.n;l--;){var m=k[l];(!0!==h||!1!==Ph(m))&&g(m)&&m.Qa()&&m.ak(a,b,c,d,f)&&(null!==b&&(m=b(m)),m&&(null===c||c(m))&&f.add(m))}return f};
  $d.prototype.findObjectsNear=$d.prototype.Pm=function(a,b,c,d,f,g){void 0===c&&(c=null);void 0===d&&(d=null);void 0===f&&(f=!0);if(!1!==f&&!0!==f){if(f instanceof B||f instanceof C)g=f;f=!0}g instanceof B||g instanceof C||(g=new C(Q));if(!1===this.Qk)return g;e&&!a.N()&&t.m("findObjectsNear: Point must have a real value.");var h=this.Fb,k=!1;this.h.xb.Ga(a)&&(k=!0);for(var l=t.K(),m=t.K(),n=h.length;n--;){var p=h.n[n];!0===k&&!1===Ph(p)||!p.Qa()||(l.assign(a),Qa(l,p.me),m.p(a.x+b,a.y),Qa(m,p.me),
  p.Pm(l,m,c,d,f,g)&&(null!==c&&(p=c(p)),p&&(null===d||d(p))&&g.add(p)))}t.B(l);t.B(m);return g};aa=$d.prototype;aa.Df=function(a,b){if(this.visible){var c=this.Fb,d;d=b?b:a.xb;for(var f=c.length,g=0;g<f;g++){var h=c.n[g];h.DC=g;if(!(h instanceof V&&!1===h.rg||h instanceof Je&&null!==h.Xh))if(eb(h.pa,d))for(h.Df(!0),Qh(h),h=h.bw;h.next();){var k=h.value;hh(k,Infinity,Infinity);k.Lc();k.Df(!0)}else h.Df(!1),null!==h.bw&&0<h.bw.count&&Qh(h)}}};
  aa.Ue=function(a,b,c,d){if(this.visible&&(void 0===d&&(d=!0),d||!this.yc)){1!==this.Lf&&(a.globalAlpha=this.Lf);c=this.Fb;d=this.vv;d.length=0;for(var f=b.scale,g=c.length,h=0;h<g;h++){var k=c.n[h];if(Ph(k)){if(k instanceof V&&(k.ic&&d.push(k),!1===k.rg))continue;var l=k.pa;1<l.width*f||1<l.height*f?k.Ue(a,b):Rh(k,a)}}a.globalAlpha=1}};
  function Sh(a,b,c,d){if(a.visible){b.globalAlpha=a.Lf;var f=a.Fb;a=a.vv;a.length=0;for(var g=c.scale,h=f.length,k=d.length,l=0;l<h;l++){var m=f.n[l];if(Ph(m)){if(m instanceof V&&(m.ic&&a.push(m),!1===m.rg))continue;var n=Th(m,m.pa),p;a:{p=n;for(var q=d,r=k,s=2/g,u=4/g,v=0;v<r;v++){var D=q[v];if(0!==D[2]&&0!==D[3]&&p.aF(D[0]-s,D[1]-s,D[2]+u,D[3]+u)){p=!0;break a}}p=!1}p&&(1<n.width*g||1<n.height*g?m.Ue(b,c):Rh(m,b))}}b.globalAlpha=1}}
  aa.j=function(a,b,c,d,f){var g=this.h;null!==g&&g.Ic(vd,a,this,b,c,d,f)};aa.np=function(a,b,c){var d=this.Fb;b.lo=this;if(a>=d.count)a=d.count;else if(d.wa(a)===b)return-1;d.Jd(a,b);b.kt(c);d=this.h;null!==d&&(c?d.ka():d.np(b));b instanceof T&&this.yx(b);return a};aa.Xe=function(a,b,c){var d=this.Fb;if(0>a||a>=d.length){if(a=d.indexOf(b),0>a)return-1}else if(d.wa(a)!==b&&(a=d.indexOf(b),0>a))return-1;b.lt(c);d.qd(a);d=this.h;null!==d&&(c?d.ka():d.Xe(b));b.lo=null;return a};
  aa.yx=function(a){for(;null!==a;){if(a.layer===this){var b=a;if(b.Rc.next()){for(var c=-1,d=-1,f=this.Fb.n,g=f.length,h=0;h<g;h++){var k=f[h];if(k===b&&(c=h,0<=d))break;if(0>d&&k.gb===b&&(d=h,0<=c))break}!(0>d)&&d<c&&(f=this.Fb,f.qd(c),f.Jd(d,b))}}a=a.gb}};aa.clear=function(){for(var a=this.Fb.Ie(),b=a.length,c=0;c<b;c++)a[c].Df(!1),this.Xe(-1,a[c],!1)};t.A($d,{rl:"parts"},function(){return this.Fb.k});t.A($d,{PK:"partsBackwards"},function(){return this.Fb.Wm});t.A($d,{h:"diagram"},function(){return this.U});
  t.g($d,"name",$d.prototype.name);t.defineProperty($d,{name:"name"},function(){return this.Yb},function(a){t.i(a,"string",$d,"name");var b=this.Yb;if(b!==a){var c=this.h;if(null!==c)for(""===b&&t.m("Cannot rename default Layer to: "+a),c=c.Yw;c.next();)c.value.name===a&&t.m("Layer.name is already present in this diagram: "+a);this.Yb=a;this.j("name",b,a);for(a=this.Fb.k;a.next();)a.value.af=this.Yb}});t.g($d,"opacity",$d.prototype.opacity);
  t.defineProperty($d,{opacity:"opacity"},function(){return this.Lf},function(a){var b=this.Lf;b!==a&&(t.i(a,"number",$d,"opacity"),(0>a||1<a)&&t.la(a,"0 <= val <= 1",$d,"opacity"),this.Lf=a,this.j("opacity",b,a),a=this.h,null!==a&&a.ka())});t.g($d,"isTemporary",$d.prototype.yc);t.defineProperty($d,{yc:"isTemporary"},function(){return this.cz},function(a){var b=this.cz;b!==a&&(t.i(a,"boolean",$d,"isTemporary"),this.cz=a,this.j("isTemporary",b,a))});t.g($d,"visible",$d.prototype.visible);
  t.defineProperty($d,{visible:"visible"},function(){return this.Ez},function(a){var b=this.Ez;if(b!==a){t.i(a,"boolean",$d,"visible");this.Ez=a;this.j("visible",b,a);for(b=this.Fb.k;b.next();)b.value.df(a);a=this.h;null!==a&&a.ka()}});t.g($d,"pickable",$d.prototype.Bf);t.defineProperty($d,{Bf:"pickable"},function(){return this.Qk},function(a){var b=this.Qk;b!==a&&(t.i(a,"boolean",$d,"pickable"),this.Qk=a,this.j("pickable",b,a))});t.g($d,"isBoundsIncluded",$d.prototype.qA);
  t.defineProperty($d,{qA:"isBoundsIncluded"},function(){return this.$y},function(a){this.$y!==a&&(this.$y=a,null!==this.h&&this.h.Oc())});t.g($d,"allowCopy",$d.prototype.Si);t.defineProperty($d,{Si:"allowCopy"},function(){return this.kk},function(a){var b=this.kk;b!==a&&(t.i(a,"boolean",$d,"allowCopy"),this.kk=a,this.j("allowCopy",b,a))});t.g($d,"allowDelete",$d.prototype.Yk);
  t.defineProperty($d,{Yk:"allowDelete"},function(){return this.lk},function(a){var b=this.lk;b!==a&&(t.i(a,"boolean",$d,"allowDelete"),this.lk=a,this.j("allowDelete",b,a))});t.g($d,"allowTextEdit",$d.prototype.Qo);t.defineProperty($d,{Qo:"allowTextEdit"},function(){return this.uk},function(a){var b=this.uk;b!==a&&(t.i(a,"boolean",$d,"allowTextEdit"),this.uk=a,this.j("allowTextEdit",b,a))});t.g($d,"allowGroup",$d.prototype.Mo);
  t.defineProperty($d,{Mo:"allowGroup"},function(){return this.mk},function(a){var b=this.mk;b!==a&&(t.i(a,"boolean",$d,"allowGroup"),this.mk=a,this.j("allowGroup",b,a))});t.g($d,"allowUngroup",$d.prototype.Ro);t.defineProperty($d,{Ro:"allowUngroup"},function(){return this.vk},function(a){var b=this.vk;b!==a&&(t.i(a,"boolean",$d,"allowUngroup"),this.vk=a,this.j("allowUngroup",b,a))});t.g($d,"allowLink",$d.prototype.Am);
  t.defineProperty($d,{Am:"allowLink"},function(){return this.nk},function(a){var b=this.nk;b!==a&&(t.i(a,"boolean",$d,"allowLink"),this.nk=a,this.j("allowLink",b,a))});t.g($d,"allowRelink",$d.prototype.Tj);t.defineProperty($d,{Tj:"allowRelink"},function(){return this.pk},function(a){var b=this.pk;b!==a&&(t.i(a,"boolean",$d,"allowRelink"),this.pk=a,this.j("allowRelink",b,a))});t.g($d,"allowMove",$d.prototype.Sj);
  t.defineProperty($d,{Sj:"allowMove"},function(){return this.ok},function(a){var b=this.ok;b!==a&&(t.i(a,"boolean",$d,"allowMove"),this.ok=a,this.j("allowMove",b,a))});t.g($d,"allowReshape",$d.prototype.No);t.defineProperty($d,{No:"allowReshape"},function(){return this.qk},function(a){var b=this.qk;b!==a&&(t.i(a,"boolean",$d,"allowReshape"),this.qk=a,this.j("allowReshape",b,a))});t.g($d,"allowResize",$d.prototype.Oo);
  t.defineProperty($d,{Oo:"allowResize"},function(){return this.rk},function(a){var b=this.rk;b!==a&&(t.i(a,"boolean",$d,"allowResize"),this.rk=a,this.j("allowResize",b,a))});t.g($d,"allowRotate",$d.prototype.Po);t.defineProperty($d,{Po:"allowRotate"},function(){return this.sk},function(a){var b=this.sk;b!==a&&(t.i(a,"boolean",$d,"allowRotate"),this.sk=a,this.j("allowRotate",b,a))});t.g($d,"allowSelect",$d.prototype.Pe);
  t.defineProperty($d,{Pe:"allowSelect"},function(){return this.tk},function(a){var b=this.tk;b!==a&&(t.i(a,"boolean",$d,"allowSelect"),this.tk=a,this.j("allowSelect",b,a))});
  function z(a){function b(){document.removeEventListener("DOMContentLoaded",b,!1);Uh(c)}1<arguments.length&&t.m("Diagram constructor can only take one optional argument, the DIV HTML element or its id.");t.Ac(this);t.aA=[];this.Xb=!0;this.li=new Be;this.li.U=this;this.nf=17;var c=this;null!==document.body?Uh(this):document.addEventListener("DOMContentLoaded",b,!1);this.Sb=new B($d);this.Db=this.Eb=0;this.Mb=this.Sg=this.jb=null;this.Rk={};this.SF();this.Zy={};this.Zy.twoTouchPan=!0;this.Ma=(new w(NaN,
  NaN)).freeze();this.wc=1;this.Ru=(new w(NaN,NaN)).freeze();this.Su=NaN;this.gv=1E-4;this.dv=100;this.md=new ha;this.Zv=(new w(NaN,NaN)).freeze();this.Iu=(new x(NaN,NaN,NaN,NaN)).freeze();this.Fl=Xe;this.An=xb;this.Gk=Xe;this.Xn=xb;this.Tu=this.Qu=Eb;this.fg=new C(Q);this.ve=!0;this.Pl=new ja(V,x);this.Mn=!0;this.iH=250;this.Gl=null;this.nu=(new ab(16,16,16,16)).freeze();this.Cu=this.Nf=!1;this.Qn=!0;this.Ck=new ld;this.Cd=new ld;this.ec=new ld;this.rj=null;this.Ov=-1;this.xz=!1;this.Iy=new ja("string",
  B);this.Hy=new ja("string","string");Vh(this);this.qv=new C(S);this.Tk=new C(T);this.$u=new C(V);this.Fb=new C(E);this.Vu=!0;this.oC=!1;this.Vv=dg;this.zj=10;this.By=this.Fy=this.Tv=null;this.zy="";this.Gq="auto";this.qi=this.Oi=this.Bi=this.jv=this.Ci=this.Di=this.Ei=this.pi=this.ti=this.ni=null;this.vi=!0;this.kz=!1;this.py=null;this.Wu=this.un=this.Gy=this.yo=this.eD=this.Li=!1;this.zC=!0;this.zd=!1;this.ke=null;var d=this;this.GC=function(a){if(a.ba===d.ba&&d.Na){d.Na=!1;try{var b=a.td;""===a.Af&&
  b===vd&&Wh(d,a.object,a.propertyName)}finally{d.Na=!0}}};this.HC=function(a){Xh(d,a)};this.DD=!0;this.Ug=-2;this.ri=new ja(Object,E);this.zk=new ja(Object,V);this.Yl=new ja(Object,Array);this.Ik=!1;this.lk=this.kk=this.du=this.Le=!0;this.fu=this.eu=!1;this.ku=this.iu=this.tk=this.sk=this.rk=this.qk=this.ok=this.pk=this.nk=this.hu=this.vk=this.mk=this.uk=!0;this.ao=this.wC=!1;this.ju=this.gu=this.Ou=this.Nu=!0;this.Ev=this.Dv=16;this.rz=this.Cv=!1;this.tz=this.sz=this.Mj=this.Lj=null;this.Ne=(new ab(5)).freeze();
  this.Hv=(new C(E)).freeze();this.ev=999999999;this.Pu=(new C(E)).freeze();this.Hk=this.wj=this.wi=!0;this.Tl=this.Sl=!1;this.Yy=this.Xy=0;this.Pd=null;this.lu=!0;this.lf=!1;this.Sd=null;this.im=1;this.Tn=!1;this.iD=0;this.po=null;this.CD=(new x(NaN,NaN,NaN,NaN)).freeze();this.Du=(new x(NaN,NaN,NaN,NaN)).freeze();this.jm=new C;Yh(this);this.Zu=this.Ku=this.pv=this.WB=this.VB=this.XB=this.Aj=this.Dk=this.Fi=null;Zh(this);this.gd=null;this.Ju=!1;this.Bn=null;this.wb=new He;this.wb.initializeStandardTools();
  this.Ua=this.uw=this.wb;this.Se=new oa;this.ba=new P;this.Li=!0;this.jc=new be;this.Li=!1;void 0===a&&(a=document.createElement("div"));this.fC=this.Ky=null;this.Xv=!0;t.XI&&(this.Xv=!1);this.qz=!1;this.uj=null;this.mg=1;this.Fk=new $h;ai(this,a);this.$l=1;this.am=0;this.CC=new w;this.zD=500;this.mu=new w;this.ns=null;this.Xb=!1}t.ga("Diagram",z);
  function Zh(a){a.Fi=new ja("string",E);var b=new S,c=new na;c.bind(new De("text","",yd));b.add(c);a.XB=b;a.Fi.add("",b);b=new S;c=new na;c.stroke="brown";c.bind(new De("text","",yd));b.add(c);a.Fi.add("Comment",b);b=new S;b.vl=!1;b.Rz=!1;c=new W;c.zb="Ellipse";c.fill="black";c.stroke=null;c.Ca=(new ga(3,3)).Ja();b.add(c);a.Fi.add("LinkLabel",b);a.Dk=new ja("string",T);b=new T;b.sx="GROUPPANEL";b.type=bi;c=new na;c.font="bold 12pt sans-serif";c.bind(new De("text","",yd));b.add(c);c=new y(ci);c.name=
  "GROUPPANEL";var d=new W;d.zb="Rectangle";d.fill="rgba(128,128,128,0.2)";d.stroke="black";c.add(d);d=new Tg;d.padding=(new ab(5,5,5,5)).Ja();c.add(d);b.add(c);a.VB=b;a.Dk.add("",b);a.Aj=new ja("string",V);b=new V;c=new W;c.fj=!0;b.add(c);c=new W;c.on="Standard";c.fill="black";c.stroke=null;c.fb=0;b.add(c);a.WB=b;a.Aj.add("",b);b=new V;c=new W;c.fj=!0;c.stroke="brown";b.add(c);a.Aj.add("Comment",b);b=new Je;b.type=ci;c=new W;c.fill=null;c.stroke="dodgerblue";c.fb=3;b.add(c);c=new Tg;c.margin=(new ab(1.5,
  1.5,1.5,1.5)).Ja();b.add(c);a.pv=b;a.Ku=b;b=new Je;b.type=vg;c=new W;c.fj=!0;c.fill=null;c.stroke="dodgerblue";c.fb=3;b.add(c);a.Zu=b}
  function Uh(a){var b=document.createElement("p");b.style.width="100%";b.style.height="200px";b.style.boxSizing="content-box";var c=document.createElement("div");c.style.position="absolute";c.style.visibility="hidden";c.style.width="200px";c.style.height="150px";c.style.overflow="hidden";c.style.boxSizing="content-box";c.appendChild(b);document.body.appendChild(c);var d=b.offsetWidth;c.style.overflow="scroll";b=b.offsetWidth;d===b&&(b=c.clientWidth);document.body.removeChild(c);a.nf=d-b}
  z.prototype.toString=function(a){void 0===a&&(a=0);var b="";this.id&&(b=this.id);this.aj&&this.aj.id&&(b=this.aj.id);b='Diagram "'+b+'"';if(0>=a)return b;for(var c=this.Sb.k;c.next();)b+="\n  "+c.value.toString(a-1);return b};z.prototype.checkProperties=function(){return t.cI(this)};z.fromDiv=function(a){var b=a;"string"===typeof a&&(b=document.getElementById(a));return b instanceof HTMLDivElement&&b.U instanceof z?b.U:null};t.g(z,"div",z.prototype.aj);
  t.defineProperty(z,{aj:"div"},function(){return this.Mb},function(a){null!==a&&t.l(a,HTMLDivElement,z,"div");if(this.Mb!==a){t.aA=[];var b=this.Mb;if(null!==b){b.U=void 0;b.innerHTML="";null!==this.jb&&(this.jb.U=null,this.jb.removeEventListener("touchstart",this.GG,!1),this.jb.removeEventListener("touchmove",this.FG,!1),this.jb.removeEventListener("touchend",this.EG,!1));b=this.Tv;if(null!==b){for(var c=b.JC.n,d=c.length,f=0;f<d;f++)c[f].cancelWaitAfter();c=b.KC.n;d=c.length;for(f=0;f<d;f++)c[f].cancelWaitAfter();
  c=b.LC.n;d=c.length;for(f=0;f<d;f++)c[f].cancelWaitAfter()}b.cancelWaitAfter();this.Sg=this.jb=null;window.removeEventListener("resize",this.ZG,!1);window.removeEventListener("mousemove",this.Dp,!0);window.removeEventListener("mousedown",this.Cp,!0);window.removeEventListener("mouseup",this.Fp,!0);window.removeEventListener("mousewheel",this.ih,!0);window.removeEventListener("DOMMouseScroll",this.ih,!0);window.removeEventListener("mouseout",this.Ep,!0);null!==this.po&&(this.po=this.po.target=null)}else this.lf=
  !1;this.Mb=null;if(null!==a){if(b=a.U)b.aj=null;ai(this,a);this.TA()}}});function $h(){this.xH="63ad05bbe23a1786468a4c741b6d2";this.xH===this._tk?this.zh=!0:di(this,!1)}
  function di(a,b){var c="p",d=window[t.Ha("76a715b2f73f148a")][t.Ha("72ba13b5")];if(t.Ha("77bb5bb2f32603de")===window[t.Ha("76a715b2f73f148a")][t.Ha("6aba19a7ec351488")])try{a.zh=!window[t.Ha("4da118b7ec2108")]([t.Ha("5bb806bfea351a904a84515e1b6d38b6")])([t.Ha("49bc19a1e6")])([t.Ha("59bd04a1e6380fa5539b")])([t.Ha("7bb8069ae7")]===t.Ha(t.cw));if(!1===a.zh)return;a.zh=!window[t.Ha("4da118b7ec2108")]([t.Ha("5bb806bfea351a904a84515e1b6d38b6")])([t.Ha("49bc19a1e6")])([t.Ha("59bd04a1e6380fa5539b6c7a197c31bb4cfd3e")])([t.Ha("7bb8069ae7")]===
  t.Ha(t.cw));if(!1===a.zh)return}catch(f){}for(var g=d[t.Ha("76ad18b4f73e")],h=d[t.Ha("73a612b6fb191d")](t.Ha("35e7"))+2;h<g;h++)c+=d[h];d=c[t.Ha("73a612b6fb191d")](t.Ha(t.cw));0>=d&&t.Ha(t.cw)!==t.Ha("7da71ca0ad381e90")&&(d=c[t.Ha("73a612b6fb191d")](t.Ha("76a715b2ef3e149757")));a.zh=!(0<d&&d<c[t.Ha("73a612b6fb191d")](t.Ha("35")));a.zh&&(c=document[t.Ha("79ba13b2f7333e8846865a7d00")]("div"),d=t.Ha("02cncncn"),"."===d[0]&&(d=d[t.Ha("69bd14a0f724128a44")](1)),c[t.Ha("79a417a0f0181a8946")]=d,document[t.Ha("78a712aa")]?
  (document[t.Ha("78a712aa")][t.Ha("7bb806b6ed32388c4a875b")](c),d=window[t.Ha("7dad0290ec3b0b91578e5b40007031bf")](c)[t.Ha("7dad0283f1390b81519f4645156528bf")](t.Ha("78a704b7e62456904c9b12701b6532a8")),document[t.Ha("78a712aa")][t.Ha('"68ad1bbcf533388c4a875b')](c),d&&-1!==d.indexOf(t.Ha(t.dI))&&-1!==d.indexOf(t.Ha(t.eI))&&(a.zh=!1)):(a.zh=null,b&&(a.zh=!1)))}$h.prototype.El=function(a){a.Sg.setTransform(a.mg,0,0,a.mg,0,0);null===this.zh&&di(this,!0);return 0<this.zh&&this!==this.vH?!0:!1};
  $h.prototype.t=function(){this.vH=null};
  function ai(a,b){void 0!==b&&null!==b||t.m("Diagram setup requires an argument DIV.");null!==a.Mb&&t.m("Diagram has already completed setup.");"string"===typeof b?a.Mb=document.getElementById(b):b instanceof HTMLDivElement?a.Mb=b:t.m("No DIV or DIV id supplied: "+b);null===a.Mb&&t.m("Invalid DIV id; could not get element with id: "+b);void 0!==a.Mb.U&&t.m("Invalid div id; div already has a Diagram associated with it.");"static"===window.getComputedStyle(a.Mb,null).position&&(a.Mb.style.position="relative");
  a.Mb.style["-webkit-tap-highlight-color"]="rgba(255, 255, 255, 0)";a.Mb.style["-ms-touch-action"]="none";a.Mb.innerHTML="";a.Mb.U=a;var c=document.createElement("canvas");if(c.getContext&&c.getContext("2d")){c.innerHTML="This text is displayed if your browser does not support the Canvas HTML element.";void 0!==c.style&&(c.style.position="absolute",c.style.top="0px",c.style.left="0px",c.style.zIndex="2",c.style.UK="none",c.style.webkitUserSelect="none",c.style.MozUserSelect="none");a.Eb=a.Mb.clientWidth||
  1;a.Db=a.Mb.clientHeight||1;a.jb=c;a.Sg=c.getContext("2d");var d=a.Sg;a.mg=a.computePixelRatio();ei(a,a.Eb,a.Db);a.Yy=0;a.Xy=0;if(document.body){var f=document.body.parentNode;a.Yy=f.offsetTop||0;a.Xy=f.offsetLeft||0}else document.addEventListener("load",function(){if(document.body){var b=document.body.parentNode;a.Yy=b.offsetTop||0;a.Xy=b.offsetLeft||0}},!1);c.U=a;a.hy=d[t.Ha("7eba17a4ca3b1a8346")][t.Ha("78a118b7")](d,t.El,4,4);a.Mb.insertBefore(c,a.Mb.firstChild);d=document.createElement("canvas");
  d.width=1;d.height=1;a.Ky=d;a.fC=d.getContext("2d");var f=document.createElement("div"),g=document.createElement("div"),h=document.createElement("div"),k=document.createElement("div");f.style.position="absolute";f.style.overflow="auto";f.style.width=a.Eb+"px";f.style.height=a.Db+"px";f.style.zIndex="1";g.style.position="absolute";g.style.overflow="auto";g.style.width=a.Eb+"px";g.style.height=a.Db+"px";g.style.zIndex="1";h.style.position="absolute";h.style.width="1px";h.style.height="1px";k.style.position=
  "absolute";k.style.width="1px";k.style.height="1px";a.Mb.appendChild(f);a.Mb.appendChild(g);f.appendChild(h);g.appendChild(k);f.onscroll=a.PC;f.onmousedown=a.QC;f.U=a;f.cD=!0;g.onscroll=a.PC;g.onmousedown=a.QC;g.U=a;g.dD=!0;a.Lj=f;a.Mj=g;a.sz=h;a.tz=k;a.GJ=t.kE(function(){a.ka()},300,!1);a.ZG=t.kE(function(){fi(a)},250,!1);a.preventDefault=function(a){a.preventDefault();return!1};a.Dp=function(b){if(a.isEnabled){a.ao=!0;var c=a.Cd;t.Tm&&c.Uw?(b.preventDefault(),b.simulated=!0,a.ns=b):(a.Cd=a.ec,a.ec=
  c,gi(a,a,b,c,!0),a.fB(b,null,b.target.U)||(a.doMouseMove(),a.Ua.isBeyondDragSize()&&(qi(a),a.$l=0)))}};a.Cp=function(b){if(a.isEnabled){a.ao=!0;var c=a.Cd;if(t.Tm&&null!==a.ns)a.ns=b,b.preventDefault();else if(t.Tm&&400>b.timeStamp-a.am)b.preventDefault();else if(a.Cd=a.ec,a.ec=c,gi(a,a,b,c,!0),c.$j=!0,c.Ae=b.detail,a.Ck=c.copy(),!0===c.Mq.simulated)b.preventDefault(),b.simulated=!0;else if(e&&e.GF&&(window.GF=a.cp(c.ea)),ff=null,a.doMouseDown(),1===b.button)return b.preventDefault(),!1}};a.Fp=function(b){if(a.isEnabled){a.ao=
  !0;var c=a.Cd;if(t.Tm){if(400>b.timeStamp-a.am){b.preventDefault();return}a.am=b.timeStamp}if(t.Tm&&null!==a.ns)a.ns=null,b.preventDefault();else{a.Cd=a.ec;a.ec=c;gi(a,a,b,c,!0);c.mj=!0;c.Ae=b.detail;if(t.Rw||t.uA)b.timeStamp-a.am<a.zD&&!a.Ua.isBeyondDragSize()?a.$l++:a.$l=1,a.am=b.timeStamp,c.Ae=a.$l;c.bubbles=b.bubbles;b.target.U&&(c.oh=b.target.U);a.sG(b,null,new w,c.oh)||(a.doMouseUp(),tf(a),ri(a,c,b))}}};a.ih=function(b){if(a.isEnabled){var c=a.Cd;a.Cd=a.ec;a.ec=c;gi(a,a,b,c,!0);c.bubbles=!0;
  c.Yj=void 0!==b.wheelDelta?b.wheelDelta:-40*b.detail;a.doMouseWheel();ri(a,c,b)}};a.Ep=function(){if(a.isEnabled){a.ao=!1;var b=a.Ua;b.cancelWaitAfter();b instanceof He&&b.hideToolTip()}};a.GG=function(b){if(a.isEnabled){a.xz=!1;if(1<b.touches.length){a.Ua.doCancel();if(a.vi){a.Tn=!0;a.im=a.scale;var c=a.Eb,d=a.Db,f=a.jb.getBoundingClientRect(),g=b.targetTouches[0],h=g.clientX-c/f.width*f.left,k=g.clientY-d/f.height*f.top,g=b.targetTouches[1],c=g.clientX-c/f.width*f.left-h,d=g.clientY-d/f.height*
  f.top-k,d=Math.sqrt(c*c+d*d);a.iD=d;b.preventDefault();b.cancelBubble=!0;return!1}qi(a);b.cancelBubble=!1;return!0}d=a.Cd;a.Cd=a.ec;a.ec=d;d.h=a;si(a,b.targetTouches[0],d);d.$c=0;d.button=0;d.$j=!0;d.mj=!1;d.Ae=1;d.Yj=0;d.Ee=!1;d.bubbles=!1;d.event=b;d.timestamp=Date.now();d.oh=b.target.U?b.target.U:null;d.ce=null;a.Ck=d.copy();ff=null;a.doMouseDown();ti(a,d);ri(a,d,b)}};a.FG=function(b){if(a.isEnabled){if(1<b.touches.length){a.Ua.doCancel();qi(a);if(a.vi&&a.Tn&&1<b.targetTouches.length){var c=a.Eb,
  d=a.Db,f=a.jb.getBoundingClientRect(),g=b.targetTouches[0],h=g.clientX-c/f.width*f.left,k=g.clientY-d/f.height*f.top,g=b.targetTouches[1],c=g.clientX-c/f.width*f.left,g=g.clientY-d/f.height*f.top,d=c-h,f=g-k,d=Math.sqrt(d*d+f*f)/a.iD,g=new w((Math.min(c,h)+Math.max(c,h))/2,(Math.min(g,k)+Math.max(g,k))/2),h=a.im*d,k=a.Se;h!==a.scale&&k.canResetZoom(h)&&(c=a.$f,a.$f=g,k.resetZoom(h),a.$f=c);b.preventDefault();b.cancelBubble=!0;return!1}b.cancelBubble=!1;return!0}h=a.Cd;a.Cd=a.ec;a.ec=h;g=k=null;0<
  b.changedTouches.length?g=b.changedTouches[0]:0<b.targetTouches.length&&(g=b.targetTouches[0]);h.h=a;g?((k=document.elementFromPoint(g.clientX,g.clientY))&&k.U?(d=g,c=k.U):(d=b.changedTouches[0],c=a),si(c,d,h)):null!==a.Cd?(h.ea=a.Cd.ea,h.Ke=a.Cd.Ke,k=a.Cd.oh):null!==a.Ck&&(h.ea=a.Ck.ea,h.Ke=a.Ck.Ke,k=a.Ck.oh);h.$c=0;h.button=0;h.$j=!1;h.mj=!1;h.Ae=1;h.Yj=0;h.Ee=!1;h.bubbles=!1;h.event=b;h.timestamp=Date.now();h.oh=null===k?b.target.U:k.U?k.U:null;h.ce=null;a.Ua.isBeyondDragSize()&&qi(a);a.fB(g?g:
  b,null,h.oh)||(a.doMouseMove(),ri(a,h,b))}};a.EG=function(b){if(a.isEnabled){qi(a);if(a.xz)return b.preventDefault(),!1;var c=a.Cd;a.Cd=a.ec;a.ec=c;if(1<b.touches.length)a.vi&&(a.Tn=!1);else{var d=null,f=null;0<b.changedTouches.length?f=b.changedTouches[0]:0<b.targetTouches.length&&(f=b.targetTouches[0]);c.h=a;c.Ae=1;if(f){var d=document.elementFromPoint(f.clientX,f.clientY),g,h;d&&d.U?(h=f,g=d.U):(h=b.changedTouches[0],g=a);si(g,h,c);g=f.screenX;h=f.screenY;var k=a.CC;b.timeStamp-a.am<a.zD&&!(25<
  Math.abs(k.x-g)||25<Math.abs(k.y-h))?a.$l++:a.$l=1;c.Ae=a.$l;a.am=b.timeStamp;a.CC.p(g,h)}else d=c.oh;c.$c=0;c.button=0;c.$j=!1;c.mj=!0;c.Yj=0;c.Ee=!1;c.bubbles=!1;c.event=b;c.timestamp=Date.now();c.oh=null===d?b.target.U:d.U?d.U:null;c.ce=null;a.sG(f?f:b,null,new w,c.oh)||(a.doMouseUp(),ri(a,c,b))}}};c.addEventListener("touchstart",a.GG,!1);c.addEventListener("touchmove",a.FG,!1);c.addEventListener("touchend",a.EG,!1);c.addEventListener("gesturestart",function(){!1!==a.vi&&(a.im=a.scale,a.Ua.doCancel(),
  a.kC=0)},!1);c.addEventListener("gesturechange",function(b){if(!1!==a.vi){var c=b.scale;a.kC++;if(a.Zy.twoTouchPan){if(1===a.kC)if(1.02<c||0.98>c)b.preventDefault();else{a.im=null;return}}else b.preventDefault();if(null!==a.im){var d=a.Eb,f=a.Db,g=a.jb.getBoundingClientRect();b=new w(b.pageX-window.scrollX-d/g.width*g.left,b.pageY-window.scrollY-f/g.height*g.top);c*=a.im;d=a.Se;c!==a.scale&&d.canResetZoom(c)&&(f=a.$f,a.$f=b,d.resetZoom(c),a.$f=f)}}},!1);window.MSGesture&&(a.po=new window.MSGesture,
  a.po.target=d,c.addEventListener("pointerdown",function(b){a.po.addPointer(b.pointerId)},!1),c.addEventListener("MSGestureStart",function(b){!1!==a.vi&&(a.im=a.scale,a.Tn=!0,b.preventDefault())},!1),c.addEventListener("MSGestureChange",function(b){if(!1!==a.vi){var c=b.scale;if(1===c)b.gestureObject.stop(),b.preventDefault();else{a.Tn&&(a.Ua.doCancel(),a.Tn=!1);b=a.JG(a.Un(b));var c=a.scale*c,d=a.Se;if(c!==a.scale&&d.canResetZoom(c)){var f=a.$f;a.$f=b;d.resetZoom(c);a.$f=f}}}},!1));c.addEventListener("mousemove",
  a.Dp,!1);c.addEventListener("mousedown",a.Cp,!1);c.addEventListener("mouseup",a.Fp,!1);c.addEventListener("mousewheel",a.ih,!1);c.addEventListener("DOMMouseScroll",a.ih,!1);c.addEventListener("mouseout",a.Ep,!1);c.addEventListener("keydown",a.gJ,!1);c.addEventListener("keyup",a.hJ,!1);c.addEventListener("selectstart",function(a){a.preventDefault();return!1},!1);c.addEventListener("contextmenu",function(a){a.preventDefault();return!1},!1);window.addEventListener("resize",a.ZG,!1);c.tabIndex=0;ui(a)}else a.Mb.innerHTML=
  "This text is displayed if your browser does not support the Canvas HTML element."}z.prototype.computePixelRatio=function(){var a=this.Sg;return Math.round((window.devicePixelRatio||1)/(a.webkitBackingStorePixelRatio||a.mozBackingStorePixelRatio||a.msBackingStorePixelRatio||a.oBackingStorePixelRatio||a.backingStorePixelRatio||1))};z.prototype.doMouseMove=function(){this.Ua.doMouseMove()};z.prototype.doMouseDown=function(){this.Ua.doMouseDown()};z.prototype.doMouseUp=function(){this.Ua.doMouseUp()};
  z.prototype.doMouseWheel=function(){this.Ua.doMouseWheel()};z.prototype.doKeyDown=function(){this.Ua.doKeyDown()};z.prototype.doKeyUp=function(){this.Ua.doKeyUp()};function fi(a){if(null!==a.jb){var b=a.Mb;if(0!==b.clientWidth&&0!==b.clientHeight){var c=a.Tl?a.nf:0,d=a.Sl?a.nf:0,f=a.mg;a.mg=a.computePixelRatio();a.mg!==f&&(ei(a,a.Eb,a.Db),ui(a),a.te());if(b.clientWidth!==a.Eb+c||b.clientHeight!==a.Db+d)a.wj=!0,a.ve=!0,b=a.jc,null!==b&&b.rt&&b.J(),a.zd||a.te()}}}
  z.prototype.focus=z.prototype.focus=function(){this.jb&&this.jb.focus()};function ui(a,b,c){void 0===b&&(b=a.Sg);void 0===c&&(c=!0);c&&(b.cu="");b.sn="";b.rn=""}function Yh(a){var b=new $d;b.name="Background";a.Js(b);b=new $d;b.name="";a.Js(b);b=new $d;b.name="Foreground";a.Js(b);b=new $d;b.name="Adornment";b.yc=!0;a.Js(b);b=new $d;b.name="Tool";b.yc=!0;b.qA=!0;a.Js(b);b=new $d;b.name="Grid";b.Pe=!1;b.Bf=!1;b.yc=!0;a.EH(b,a.bt("Background"))}
  function vi(a){a.gd=new y(wi);a.gd.name="GRID";var b=new W;b.zb="LineH";b.stroke="lightgray";b.fb=0.5;b.interval=1;a.gd.add(b);b=new W;b.zb="LineH";b.stroke="gray";b.fb=0.5;b.interval=5;a.gd.add(b);b=new W;b.zb="LineH";b.stroke="gray";b.fb=1;b.interval=10;a.gd.add(b);b=new W;b.zb="LineV";b.stroke="lightgray";b.fb=0.5;b.interval=1;a.gd.add(b);b=new W;b.zb="LineV";b.stroke="gray";b.fb=0.5;b.interval=5;a.gd.add(b);b=new W;b.zb="LineV";b.stroke="gray";b.fb=1;b.interval=10;a.gd.add(b);b=new E;b.add(a.gd);
  b.af="Grid";b.vA=!1;b.pA=!1;b.Bf=!1;b.ax="GRID";a.add(b);a.Fb.remove(b);a.gd.visible=!1}
  z.prototype.PC=function(){if(this.U.isEnabled){var a=this.U;if(a.rz&&null!==a.jb){a.Cv=!0;var b=a.Ed,c=a.xb,d=b.width,f=c.width,g=b.height,h=c.height,k=b.right,l=c.right,m=b.bottom,n=c.bottom,p=b.x,q=c.x,b=b.y,c=c.y,r=a.scale;if(f<d||h<g){var s=t.K();this.cD&&a.of?(s.p(this.scrollLeft/r+p,a.position.y),a.position=s):this.dD&&a.pf&&(s.p(a.position.x,this.scrollTop/r+b),a.position=s);t.B(s);a.Cv=!1;a.wj=!1}else s=t.K(),this.cD&&a.of&&(p<q&&(a.position=new w(this.scrollLeft+p,a.position.y)),k>l&&(a.position=
  new w(-(a.Lj.scrollWidth-a.Eb)+this.scrollLeft-a.Eb/r+a.Ed.right,a.position.y))),this.dD&&a.pf&&(b<c&&(a.position=new w(a.position.x,this.scrollTop+b)),m>n&&(a.position=new w(a.position.x,-(a.Mj.scrollHeight-a.Db)+this.scrollTop-a.Db/r+a.Ed.bottom))),t.B(s),xi(a),a.Cv=!1,a.wj=!1,b=a.Ed,c=a.xb,k=b.right,l=c.right,m=b.bottom,n=c.bottom,p=b.x,q=c.x,b=b.y,c=c.y,f>=d&&p>=q&&k<=l&&(a.sz.style.width="1px"),h>=g&&b>=c&&m<=n&&(a.tz.style.height="1px")}}else yi(this.U)};
  z.prototype.QC=function(){this.U.isEnabled?this.U.rz=!0:yi(this.U)};z.prototype.computeBounds=z.prototype.qf=function(){0<this.fg.count&&zi(this);return Ai(this)};function Ai(a){if(a.fA.N()){var b=a.fA.copy();b.aw(a.padding);return b}for(var c=!0,d=a.Sb.n,f=d.length,g=0;g<f;g++){var h=d[g];if(h.visible&&(!h.yc||h.qA))for(var h=h.Fb.n,k=h.length,l=0;l<k;l++){var m=h[l];m.vA&&m.Qa()&&(m=m.pa,m.N()&&(c?(c=!1,b=m.copy()):b.lj(m)))}}c&&(b=new x(0,0,0,0));b.aw(a.padding);return b}
  z.prototype.computePartsBounds=function(a){var b=null;for(a=a.k;a.next();){var c=a.value;c instanceof V||(c.sf(),null===b?b=c.pa.copy():b.lj(c.pa))}return null===b?new x(NaN,NaN,0,0):b};
  function Bi(a,b){if(!a.Zb.yg&&(void 0===b&&(b=!1),(b||a.lf)&&!a.Xb&&a.Ed.N()&&null!==a.jb)){a.Xb=!0;var c=a.Fl;b&&a.Gk!==Xe&&(c=a.Gk);var d=c!==Xe?Ci(a,c):a.scale,c=a.xb.copy(),f=a.Eb/d,g=a.Db/d,h=null,k=a.Zb;k.sd&&(h=a.Ma.copy());a.position.La();var l=a.An;b&&a.Xn.vd()&&(l=a.Xn);Di(a,a.Ma,a.Ed,f,g,l);a.position.freeze();null!==h&&Oh(k,h,a.Ma);a.scale=d;a.Xb=!1;d=a.xb;d.tf(c)||a.Dt(c,d)}}
  function Ci(a,b){if(null!==a.jb){a.wi&&Ei(a,a.qf());var c=a.Se.Xs,d=a.Ed;if(!d.N())return c;var f=d.width,d=d.height,g=a.Eb,h=a.Db,k=g/f,l=h/d;return b===Fi?(f=Math.min(l,k),f>c&&(f=c),f<a.Cg&&(f=a.Cg),f>a.Bg&&(f=a.Bg),f):b===Gi?(f=l>k?(h-a.nf)/d:(g-a.nf)/f,f>c&&(f=c),f<a.Cg&&(f=a.Cg),f>a.Bg&&(f=a.Bg),f):a.scale}}z.prototype.zoomToFit=z.prototype.zoomToFit=function(){this.scale=Ci(this,Fi)};
  z.prototype.zoomToRect=function(a,b){void 0===b&&(b=Fi);var c=a.width,d=a.height;if(!(0===c||0===d||isNaN(c)&&isNaN(d))){var f=1;if(b===Fi||b===Gi)if(isNaN(c))f=this.xb.height*this.scale/d;else if(isNaN(d))f=this.xb.width*this.scale/c;else var f=this.Eb,g=this.Db,f=b===Gi?g/d>f/c?(g-(this.Sl?this.nf:0))/d:(f-(this.Tl?this.nf:0))/c:Math.min(g/d,f/c);this.scale=f;this.position=new w(a.x,a.y)}};
  z.prototype.alignDocument=function(a,b){this.wi&&Ei(this,this.qf());var c=this.Ed,d=this.xb,f=this.Xb;this.Xb=!0;this.position=new w(c.x+(a.x*c.width+a.offsetX)-(b.x*d.width-b.offsetX),c.y+(a.y*c.height+a.offsetY)-(b.y*d.height-b.offsetY));this.Xb=f;this.ka()};
  function Di(a,b,c,d,f,g){var h;h=b.x;var k=b.y;g.vd()&&(d>c.width&&(h=c.x+(g.x*c.width+g.offsetX)-(g.x*d-g.offsetX)),f>c.height&&(k=c.y+(g.y*c.height+g.offsetY)-(g.y*f-g.offsetY)));d<c.width?(h=Math.min(h+d/2,c.right-d/2),h=Math.max(h,c.left+d/2),h-=d/2):h>c.left?h=c.left:h<c.right-d&&(h=c.right-d);f<c.height?(d=Math.min(k+f/2,c.bottom-f/2),d=Math.max(d,c.top+f/2),k=d-f/2):k>c.top?k=c.top:k<c.bottom-f&&(k=c.bottom-f);b.x=isFinite(h)?h:-a.padding.left;b.y=isFinite(k)?k:-a.padding.top}
  z.prototype.findPartAt=z.prototype.dt=function(a,b){var c=b?Tf(this,a,function(a){return a.S},function(a){return a.canSelect()}):Tf(this,a,function(a){return a.S});return c instanceof E?c:null};z.prototype.findObjectAt=z.prototype.pe=function(a,b,c){void 0===b&&(b=null);void 0===c&&(c=null);var d=this.Sb.Wm;for(zi(this);d.next();){var f=d.value;if(f.visible&&(f=f.pe(a,b,c),null!==f))return f}return null};
  function Tf(a,b,c,d){void 0===c&&(c=null);void 0===d&&(d=null);var f=a.Sb.Wm;for(zi(a);f.next();)if(a=f.value,a.visible&&!a.yc&&(a=a.pe(b,c,d),null!==a))return a;return null}z.prototype.findObjectsAt=z.prototype.cp=function(a,b,c,d){void 0===b&&(b=null);void 0===c&&(c=null);d instanceof B||d instanceof C||(d=new C(Q));zi(this);for(var f=this.Sb.Wm;f.next();){var g=f.value;g.visible&&g.cp(a,b,c,d)}return d};
  z.prototype.findObjectsIn=z.prototype.ak=function(a,b,c,d,f){void 0===b&&(b=null);void 0===c&&(c=null);void 0===d&&(d=!1);f instanceof B||f instanceof C||(f=new C(Q));zi(this);for(var g=this.Sb.Wm;g.next();){var h=g.value;h.visible&&h.ak(a,b,c,d,f)}return f};z.prototype.dA=function(a,b,c,d,f,g){var h=new C(Q);zi(this);for(var k=this.Sb.Wm;k.next();){var l=k.value;l.visible&&l.dA(a,b,c,d,h,f,g)}return h};
  z.prototype.findObjectsNear=z.prototype.Pm=function(a,b,c,d,f,g){void 0===c&&(c=null);void 0===d&&(d=null);void 0===f&&(f=!0);if(!1!==f&&!0!==f){if(f instanceof B||f instanceof C)g=f;f=!0}g instanceof B||g instanceof C||(g=new C(Q));zi(this);for(var h=this.Sb.Wm;h.next();){var k=h.value;k.visible&&k.Pm(a,b,c,d,f,g)}return g};function qi(a){-1!==a.Ov&&(clearTimeout(a.Ov),a.Ov=-1)}function ti(a,b){var c=b.copy();a.Ov=setTimeout(function(){c.button=2;a.R=c;a.xz=!0;a.doMouseUp()},850)}
  z.prototype.acceptEvent=function(a){var b=this.Cd;this.Cd=this.ec;this.ec=b;gi(this,this,a,b,a instanceof MouseEvent);return b};function gi(a,b,c,d,f){d.h=b;f?si(a,c,d):(d.Ke=b.ec.Ke,d.ea=b.ec.ea);a=0;c.ctrlKey&&(a+=1);c.altKey&&(a+=2);c.shiftKey&&(a+=4);c.metaKey&&(a+=8);d.$c=a;d.button=c.button;t.Um&&0===c.button&&c.ctrlKey&&(d.button=2);d.$j=!1;d.mj=!1;d.Ae=1;d.Yj=0;d.Ee=!1;d.bubbles=!1;d.event=c;d.timestamp=Date.now();d.oh=c.target.U?c.target.U:null;d.ce=null}
  function ri(a,b,c){if(b.bubbles)return e&&e.RE&&t.trace("NOT handled "+c.type+" "+b.toString()),!0;e&&e.RE&&t.trace("handled "+c.type+" "+a.Ua.name+" "+b.toString());void 0!==c.stopPropagation&&c.stopPropagation();(void 0===c.touches||2>c.touches.length)&&c.preventDefault();c.cancelBubble=!0;return!1}
  z.prototype.gJ=function(a){if(this.U.isEnabled){var b=this.U.ec;gi(this.U,this.U,a,b,!1);b.key=String.fromCharCode(a.which);b.$j=!0;switch(a.which){case 33:b.key="PageUp";break;case 34:b.key="PageDown";break;case 35:b.key="End";break;case 36:b.key="Home";break;case 37:b.key="Left";break;case 38:b.key="Up";break;case 39:b.key="Right";break;case 40:b.key="Down";break;case 45:b.key="Insert";break;case 46:b.key="Del";break;case 48:b.key="0";break;case 187:case 61:case 107:b.key="Add";break;case 189:case 173:case 109:b.key=
  "Subtract";break;case 27:b.key="Esc"}this.U.doKeyDown();return 187!==a.which&&189!==a.which&&48!==a.which&&107!==a.which&&109!==a.which&&61!==a.which&&173!==a.which||!0!==a.ctrlKey?ri(this.U,b,a):(a.cancelBubble=!0,a.preventDefault(),a.stopPropagation(),!1)}};
  z.prototype.hJ=function(a){if(this.U.isEnabled){var b=this.U.ec;gi(this.U,this.U,a,b,!1);b.key=String.fromCharCode(a.which);b.mj=!0;switch(a.which){case 33:b.key="PageUp";break;case 34:b.key="PageDown";break;case 35:b.key="End";break;case 36:b.key="Home";break;case 37:b.key="Left";break;case 38:b.key="Up";break;case 39:b.key="Right";break;case 40:b.key="Down";break;case 45:b.key="Insert";break;case 46:b.key="Del"}this.U.doKeyUp();return ri(this.U,b,a)}};
  z.prototype.Un=function(a){var b=this.jb;if(null===b)return new w(0,0);var c=this.Eb,d=this.Db,b=b.getBoundingClientRect(),c=a.clientX-c/b.width*b.left;a=a.clientY-d/b.height*b.top;return null!==this.md?(a=new w(c,a),Qa(a,this.md),a):new w(c,a)};function si(a,b,c){var d=a.jb,f=a.Eb,g=a.Db,h=0,k=0;null!==d&&(d=d.getBoundingClientRect(),h=b.clientX-f/d.width*d.left,k=b.clientY-g/d.height*d.top);c.Ke.p(h,k);null!==a.md?(b=t.lc(h,k),a.md.bi(b),c.ea.assign(b),t.B(b)):c.ea.p(h,k)}
  z.prototype.invalidateDocumentBounds=z.prototype.Oc=function(){this.wi||(this.wi=!0,this.te())};function Hi(a){a.zd||zi(a);a.wi&&Ei(a,a.qf());Bi(a);for(a=a.jm.k;a.next();)Hi(a.value)}z.prototype.redraw=z.prototype.TA=function(){this.Xb||this.zd||(this.ka(),Ii(this),xi(this),this.Oc(),this.Uf())};z.prototype.isUpdateRequested=function(){return this.Nf};z.prototype.delayInitialization=function(a){var b=this.Zb,c=b.isEnabled;b.isEnabled=!1;Jh(this);this.lf=!1;b.isEnabled=c;a&&setTimeout(a,1)};
  z.prototype.requestUpdate=z.prototype.te=function(a){void 0===a&&(a=!1);if(!0!==this.Nf&&!(this.Xb||!1===a&&this.zd)){this.Nf=!0;var b=this;requestAnimationFrame(function(){b.Nf&&b.Uf()})}};z.prototype.maybeUpdate=z.prototype.Uf=function(){if(!this.Qn||this.Nf)this.Qn&&(this.Qn=!1),Jh(this)};
  function Jh(a){if(!a.zd&&(a.Nf=!1,null!==a.Mb)){a.zd=!0;var b=a.li,c=!1,d=!1;b.yg?(d=!0,c=a.Wa,a.Wa=!0):b.sd||fi(a);a.Xb||b.yg||!a.wj||yi(a)||yi(a);null!==a.gd&&(a.gd.visible&&!a.Ju&&(Ji(a),a.Ju=!0),!a.gd.visible&&a.Ju&&(a.Ju=!1));zi(a);0!==a.Pl.count&&(Ki(a),zi(a));var f=!1;if(!a.lf||a.lu)a.lf?Li(a,!a.Cu):(a.sc("Initial Layout"),!1===b.isEnabled&&b.mn(),Li(a,!1)),f=!0;a.Cu=!1;zi(a);a.yo||b.yg||Hi(a);if(f){if(!a.lf){var g=a.Sb.n;a.Df(g,g.length,a);Mi(a);Ji(a)}a.Ba("LayoutCompleted")}zi(a);a.Xb||b.yg||
  !a.wj||yi(a)||(yi(a),zi(a));f&&!a.lf&&(a.lf=!0,a.Ce("Initial Layout"),a.Wa||a.ja.clear(),setTimeout(function(){a.hh=!1},1));a.Ue();d&&(a.Wa=c);a.zd=!1}}
  function Mi(a){if(a.Gk!==Xe)a.scale=Ci(a,a.Gk);else if(a.Fl!==Xe)a.scale=Ci(a,a.Fl);else{var b=a.YE;isFinite(b)&&0<b&&(a.scale=b)}a.wi&&Ei(a,a.qf());b=a.XE;if(b.N())a.position=b;else{b=t.K();b.Ot(a.Ed,a.WE);var c=a.xb,c=t.hk(0,0,c.width,c.height),d=t.K();d.Ot(c,a.ZE);a.position=new w(b.x-d.x,b.y-d.y);t.hc(c);t.B(d);t.B(b);Bi(a,!0)}a.Ba("InitialLayoutCompleted")}
  function zi(a){if((a.zd||!a.Zb.yg)&&0!==a.fg.count)for(var b=0;23>b;b++){var c=a.fg.k;if(null===c||0===a.fg.count)break;a.fg=new C(Q);var d=a,f=a.fg;for(c.reset();c.next();){var g=c.value;!g.Ld()||g instanceof T||(g.nl()?(hh(g,Infinity,Infinity),g.Lc()):f.add(g))}for(c.reset();c.next();)g=c.value,g instanceof T&&Ni(d,g);for(c.reset();c.next();)d=c.value,d instanceof V&&(d.nl()?(hh(d,Infinity,Infinity),d.Lc(),d.bx()):f.add(d));for(c.reset();c.next();)d=c.value,d instanceof Je&&(d.nl()?(hh(d,Infinity,
  Infinity),d.Lc()):f.add(d))}}function Ni(a,b){for(var c=b.Rc,d=t.Cb();c.next();){var f=c.value;f.Qa()&&(f instanceof T?(Oi(f)||Pi(f)||Qi(f))&&Ni(a,f):f instanceof V?d.push(f):(hh(f,Infinity,Infinity),f.Lc()))}c=d.length;for(f=0;f<c;f++){var g=d[f];hh(g,Infinity,Infinity);g.Lc()}t.ya(d);hh(b,Infinity,Infinity);b.Lc()}z.prototype.Df=function(a,b,c,d){var f=this.li;if(this.Hk||f.yg)for(f=0;f<b;f++)a[f].Df(c,d)};
  z.prototype.Ue=function(a,b){null===this.Mb&&t.m("No div specified");var c=this.jb;null===c&&t.m("No canvas specified");if(this.li.sd)0===this.ja.Je&&this.te(!0);else{a||(a=this.Sg);var d=a!==this.Sg,f=this.Sb.n,g=f.length,h=this;this.Df(f,g,h);if(d)ui(this,a),xi(this);else if(!this.ve&&void 0===b)return;var k=this.Ma,g=this.wc,l=Math.round(k.x*g)/g,m=Math.round(k.y*g)/g,n=this.md;n.reset();1!==g&&n.scale(g);0===k.x&&0===k.y||n.translate(-l,-m);var p=this.uj;if(k=null!==p&&0<p.length&&!0===this.qz){m=
  t.Rw;a.save();a.beginPath();g=p.length;for(l=0;l<g;l++){var q=p[l];if(0!==q[2]||0!==q[3])q=Ri(this,q),a.rect(Math.floor(q[0])-1,Math.floor(q[1])-1,Math.ceil(q[2])+2,Math.ceil(q[3])+2),m&&a.clearRect(Math.floor(q[0])-1,Math.floor(q[1])-1,Math.ceil(q[2])+2,Math.ceil(q[3])+2)}a.clip()}g=this.mg;t.Tm?(c.width=c.width,k=!1,ui(this,a),a.scale(g,g)):(a.setTransform(1,0,0,1,0,0),a.scale(g,g),a.clearRect(0,0,this.Eb,this.Db));a.miterLimit=9;a.setTransform(1,0,0,1,0,0);a.scale(g,g);a.transform(n.m11,n.m12,
  n.m21,n.m22,n.dx,n.dy);e&&e.Sz&&e.BI(this,a);c=b?function(c){var d=a;if(c.visible){d.globalAlpha=c.Lf;var f=c.Fb;c=c.vv;c.length=0;for(var g=h.scale,k=f.length,l=0;l<k;l++){var m=f.n[l];if(Ph(m)&&!b.contains(m)){if(m instanceof V&&(m.ic&&c.push(m),!1===m.rg))continue;var n=m.pa;1<n.width*g||1<n.height*g?m.Ue(d,h):Rh(m,d)}}d.globalAlpha=1}}:k?function(b){Sh(b,a,h,p)}:function(b){b.Ue(a,h)};Si(this,a);g=f.length;for(l=0;l<g;l++)c(f[l]);this.uj=[];this.Fk?this.Fk.El(this)&&this.hy():this.Un=function(){};
  k&&(a.restore(),ui(this,a),e&&e.yK&&e.xK(p,a,this));d?(ui(this),xi(this)):this.ve=this.Hk=!1}};
  function Ti(a,b,c,d,f){null===a.Mb&&t.m("No div specified");var g=a.jb;null===g&&t.m("No canvas specified");var h=a.Sg;if(a.ve){var k=a.mg;t.Tm?(g.width=g.width,ui(a,h)):(h.setTransform(1,0,0,1,0,0),h.clearRect(0,0,a.Eb*k,a.Db*k));h.VE=!1;h.drawImage(a.Ky,0<d?0:Math.round(-d),0<f?0:Math.round(-f));f=a.Ma;var g=a.wc,l=Math.round(f.x*g)/g,m=Math.round(f.y*g)/g;d=a.md;d.reset();1!==g&&d.scale(g);0===f.x&&0===f.y||d.translate(-l,-m);h.save();h.beginPath();f=c.length;for(g=0;g<f;g++)l=c[g],0!==l[2]&&0!==
  l[3]&&h.rect(Math.floor(l[0]),Math.floor(l[1]),Math.ceil(l[2]),Math.ceil(l[3]));h.clip();h.setTransform(1,0,0,1,0,0);h.scale(k,k);h.transform(d.m11,d.m12,d.m21,d.m22,d.dx,d.dy);e&&e.Sz&&e.BI(a,h);c=a.Sb.n;f=c.length;a.Df(c,f,a);Si(a,h);for(g=0;g<f;g++)Sh(c[g],h,a,b);h.restore();ui(a);a.Fk?a.Fk.El(a)&&a.hy():a.Un=function(){};a.Hk=!1;a.ve=!1;a.GJ()}}
  function Ui(a,b,c,d,f,g,h,k,l,m){null===a.Mb&&t.m("No div specified");null===a.jb&&t.m("No canvas specified");ui(a);xi(a);var n=void 0;g&&d&&f&&(n=new x(g.x,g.y,d.width/f,d.height/f));var p=n.copy();p.aw(c);Ji(a,p);zi(a);var p=a.Sb.n,q=p.length;a.Df(p,q,a,n);var r=a.mg;b.setTransform(1,0,0,1,0,0);b.scale(r,r);b.clearRect(0,0,d.width,d.height);k&&(b.fillStyle=k,b.fillRect(0,0,d.width,d.height));d=t.ph();d.reset();d.translate(c.left,c.top);d.scale(f);0===g.x&&0===g.y||d.translate(-g.x,-g.y);b.setTransform(d.m11,
  d.m12,d.m21,d.m22,d.dx,d.dy);t.We(d);Si(a,b);if(h){var s=new C;c=h.k;for(c.reset();c.next();)f=c.value.S,!1===m&&"Grid"===f.layer.name||null===f||s.add(f);c=function(c){var d=l;if(c.visible&&(void 0===d&&(d=!0),d||!c.yc)){b.globalAlpha=c.Lf;d=c.Fb;c=c.vv;c.length=0;for(var f=a.scale,g=d.length,h=0;h<g;h++){var k=d.n[h];if(Ph(k)&&s.contains(k)){if(k instanceof V&&(k.ic&&c.push(k),!1===k.rg))continue;var m=k.pa;1<m.width*f||1<m.height*f?k.Ue(b,a):Rh(k,b)}}b.globalAlpha=1}}}else if(!l&&m){var u=a.lp.S,
  v=u.layer;c=function(c){c===v?u.Ue(b,a):c.Ue(b,a,n,l,m)}}else c=function(c){c.Ue(b,a,n,l,m)};for(f=0;f<q;f++)c(p[f]);a.Fk?a.Fk.El(a)&&a.hy():a.Un=function(){};ui(a);xi(a);a.Df(p,q,a);Ji(a)}z.prototype.getRenderingHint=function(a){return this.Rk[a]};z.prototype.setRenderingHint=z.prototype.QJ=function(a,b){this.Rk[a]=b;this.TA()};z.prototype.resetRenderingHints=z.prototype.SF=function(){this.Rk={drawShadows:!0}};
  function Si(a,b){var c=a.Rk;if(null!==c){if(void 0!==c.imageSmoothingEnabled){var d=!!c.imageSmoothingEnabled;b.VE=d;b.KK=d}c=c.defaultFont;void 0!==c&&null!==c&&(b.font=c,b.cu=c)}}z.prototype.setInputOption=function(a,b){this.Zy[a]=b};function Ki(a){if(0===a.ja.Je){for(var b=a.Pl.k;b.next();){var c=b.key,d=b.value;c.Ye();zg(c,d)}a.Pl.clear()}}
  z.prototype.ka=function(a,b){if(this.qz&&void 0!==a&&null!==this.uj){var c=this.xb;if(a&&c.Tf(a)||b&&c.Tf(b))null!==this.uj&&(a&&a.N()&&Vi(this,a.x-2,a.y-2,a.width+4,a.height+4),b&&b.N()&&Vi(this,b.x-2,b.y-2,b.width+4,b.height+4)),this.ve=!0,this.te()}else this.uj=null,this.ve=!0,this.te();for(c=this.jm.k;c.next();)c.value.ka(a,b)};t.g(z,"viewportOptimizations",z.prototype.fK);
  t.defineProperty(z,{fK:null},function(){return this.Xv},function(a){t.i(a,"boolean",z,"viewportOptimizations");this.uj=null;this.Xv=a});
  function Vi(a,b,c,d,f){b=Math.floor(b);c=Math.floor(c);d=Math.ceil(d);f=Math.ceil(f);for(var g=a.uj,h=g.length,k=0;k<h;k++){var l=g[k];if(b>=l[0]&&c>=l[1]&&b+d<=l[0]+l[2]&&c+f<=l[1]+l[3])return!1;b<=l[0]&&c<=l[1]&&b+d>=l[0]+l[2]&&c+f>=l[1]+l[3]?(g[k][2]=0,g[k][3]=0):b>=l[0]&&b<l[0]+l[2]&&c>=l[1]&&c+f<=l[1]+l[3]?(d=b+d-(l[0]+l[2]),b=l[0]+l[2],k=-1):b+d>l[0]&&b+d<=l[0]+l[2]&&c>=l[1]&&c+f<=l[1]+l[3]?(d=l[0]-b,k=-1):b>=l[0]&&b+d<=l[0]+l[2]&&c>=l[1]&&c<l[1]+l[3]?(f=c+f-(l[1]+l[3]),c=l[1]+l[3],k=-1):b>=
  l[0]&&b+d<=l[0]+l[2]&&c+f>l[1]&&c+f<=l[1]+l[3]?(f=l[1]-c,k=-1):g[k][0]>=b&&g[k][0]<b+d&&g[k][1]>=c&&g[k][1]+g[k][3]<=c+f?(g[k][2]-=b+d-g[k][0],g[k][0]=b+d,k=-1):g[k][0]+g[k][2]>b&&g[k][0]+g[k][2]<=b+d&&g[k][1]>=c&&g[k][1]+g[k][3]<=c+f?(g[k][2]=b-g[k][0],k=-1):g[k][0]>=b&&g[k][0]+g[k][2]<=b+d&&g[k][1]>=c&&g[k][1]<c+f?(g[k][3]-=c+f-g[k][1],g[k][1]=c+f,k=-1):g[k][0]>=b&&g[k][0]+g[k][2]<=b+d&&g[k][1]+g[k][3]>c&&g[k][1]+g[k][3]<=c+f&&(g[k][3]=c-g[k][1],k=-1)}for(k=0;k<h;k++)if(l=g[k],0<d&&0<f&&0<l[2]&&
  0<l[3]&&(Math.max(b+d,l[0]+l[2])-Math.min(b,l[0]))*(Math.max(c+f,l[1]+l[3])-Math.min(c,l[1]))<d*f+l[2]*l[3]+50){var h=Math.min(l[0],b),m=Math.min(l[1],c);b=Math.max(b+d,l[0]+l[2])-Math.min(l[0],b);c=Math.max(c+f,l[1]+l[3])-Math.min(l[1],c);g[k][2]=0;g[k][3]=0;return Vi(a,h,m,b,c)}g.push([b,c,d,f]);return!0}
  function Wi(a,b,c){if(!0!==a.ve){a.ve=!0;if(a instanceof Xi)Yi(a);else if(!0===a.Xv&&c.width===b.width&&c.height===b.height){var d=a.scale,f=t.Gf(),g=Math.max(b.x,c.x),h=Math.max(b.y,c.y),k=Math.min(b.x+b.width,c.x+c.width),l=Math.min(b.y+b.height,c.y+c.height);f.x=g;f.y=h;f.width=Math.max(0,k-g)*d;f.height=Math.max(0,l-h)*d;if(0<f.width&&0<f.height){if(!a.zd&&(a.Nf=!1,null!==a.Mb)){a.zd=!0;zi(a);0!==a.Pl.count&&(Ki(a),zi(a));a.Ed.N()||Ei(a,a.qf());var m=a.jb;if(null!==m){k=a.mg;g=a.Eb*k;h=a.Db*k;
  l=a.scale*k;d=Math.round(Math.round(c.x*l)-Math.round(b.x*l));b=Math.round(Math.round(c.y*l)-Math.round(b.y*l));c=a.Ky;var n=a.fC;c.width!==g&&(c.width=g);c.height!==h&&(c.height=h);n.clearRect(0,0,g,h);c=190*a.mg;var l=70*a.mg,p=Math.max(d,0),q=Math.max(b,0),r=g-p,s=h-q;n.VE=!1;n.drawImage(m,p,q,r,s,0,0,r,s);a.Fk.El(a)&&n.clearRect(0,0,c,l);var m=t.Cb(),n=t.Cb(),s=Math.abs(d),r=Math.abs(b),u=0===p?0:g-s,p=t.lc(u,0),s=t.lc(s+u,h);n.push([Math.min(p.x,s.x),Math.min(p.y,s.y),Math.abs(p.x-s.x),Math.abs(p.y-
  s.y)]);var v=a.md;v.reset();v.scale(k,k);1!==a.wc&&v.scale(a.wc);k=a.Ma;(0!==k.x||0!==k.y)&&isFinite(k.x)&&isFinite(k.y)&&v.translate(-k.x,-k.y);Qa(p,v);Qa(s,v);m.push([Math.min(p.x,s.x),Math.min(p.y,s.y),Math.abs(p.x-s.x),Math.abs(p.y-s.y)]);u=0===q?0:h-r;p.p(0,u);s.p(g,r+u);n.push([Math.min(p.x,s.x),Math.min(p.y,s.y),Math.abs(p.x-s.x),Math.abs(p.y-s.y)]);Qa(p,v);Qa(s,v);m.push([Math.min(p.x,s.x),Math.min(p.y,s.y),Math.abs(p.x-s.x),Math.abs(p.y-s.y)]);a.Fk.El(a)&&(g=0<d?0:-d,h=0<b?0:-b,p.p(g,h),
  s.p(c+g,l+h),n.push([Math.min(p.x,s.x),Math.min(p.y,s.y),Math.abs(p.x-s.x),Math.abs(p.y-s.y)]),Qa(p,v),Qa(s,v),m.push([Math.min(p.x,s.x),Math.min(p.y,s.y),Math.abs(p.x-s.x),Math.abs(p.y-s.y)]));t.B(p);t.B(s);!a.Xb&&a.wj&&(yi(a)||yi(a));Ti(a,m,n,d,b);t.ya(m);t.ya(n);a.zd=!1}}}else a.Uf();t.hc(f)}else a.Uf();for(a=a.jm.k;a.next();)Wi(a.value)}}function Ii(a){!1===a.wj&&(a.wj=!0)}function xi(a){!1===a.Hk&&(a.Hk=!0)}
  function ei(a,b,c){var d=a.jb,f=a.mg,g=b*f,f=c*f;if(d.width!==g||d.height!==f)d.width=g,d.height=f,d.style.width=b+"px",d.style.height=c+"px",a.ve=!0}
  function yi(a){if(null!==a.jb&&!a.Zb.sd){var b=a.Mb,c=a.Eb,d=a.Db,f=a.CD.copy(),g=!1,h=a.Tl?a.nf:0,k=a.Sl?a.nf:0,l=b.clientWidth||c+h,b=b.clientHeight||d+k;if(l!==c+h||b!==d+k)a.Tl=!1,a.Sl=!1,a.Eb=l,a.Db=b,ei(a,l,b),g=!0;a.wj=!1;if(a.Cv)c===a.Eb&&d===a.Db||a.Uf();else{var m=a.xb,n=a.Ed,h=n.width,k=n.height,p=m.width,q=m.height,r=n.x,s=m.x,u=n.right,v=m.right,D=n.y,A=m.y,G=n.bottom,L=m.bottom,n=m="1px",N=a.scale;l/N>h&&b/N>k||(a.SE&&a.of&&(p+1<h?(m=(h-p)*N+a.Eb+"px",a.Lj.scrollLeft=(a.position.x-r)*
  N):r+1<s?(m=(s-r)*N+a.Eb+"px",a.Lj.scrollLeft=a.Lj.scrollWidth-a.Lj.clientWidth):u>v+1&&(m=(u-v)*N+a.Eb+"px",a.Lj.scrollLeft=a.position.x*N)),a.TE&&a.pf&&(q+1<k?(n=(k-q)*N+a.Db+"px",a.Mj.scrollTop=(a.position.y-D)*N):D+1<A?(n=(A-D)*N+a.Db+"px",a.Mj.scrollTop=a.Mj.scrollHeight-a.Mj.clientHeight):G>L+1&&(n=(G-L)*N+a.Db+"px",a.Mj.scrollTop=a.position.y*N)));l="1px"!==m;b="1px"!==n;l!==a.Sl&&(a.Db="1px"===m?a.Db+a.nf:Math.max(a.Db-a.nf,1),g=!0);a.Sl=l;a.sz.style.width=m;b!==a.Tl&&(a.Eb="1px"===n?a.Eb+
  a.nf:Math.max(a.Eb-a.nf,1),g=!0);a.Tl=b;a.tz.style.height=n;g&&(ei(a,a.Eb,a.Db),ui(a));l=a.Eb;b=a.Db;a.Mj.style.height=b+"px";a.Mj.style.width=l+(a.Tl?a.nf:0)+"px";a.Lj.style.width=l+"px";a.Lj.style.height=b+(a.Sl?a.nf:0)+"px";a.rz=!1;return c!==l||d!==b?(m=a.xb,a.Dt(f,m,g?!0:void 0),!1):!0}}}
  z.prototype.add=z.prototype.add=function(a){t.l(a,E,z,"add:part");var b=a.h;if(b!==this){null!==b&&t.m("Cannot add part "+a.toString()+" to "+this.toString()+". It is already a part of "+b.toString());this.un&&(a.Jk="Tool");var c=a.af,b=this.bt(c);null===b&&(b=this.bt(""));null===b&&t.m('Cannot add a Part when unable find a Layer named "'+c+'" and there is no default Layer');a.layer!==b&&(c=b.np(99999999,a,a.h===this),0<=c&&this.Ic(wd,"parts",b,null,a,null,c),b.yc||this.Oc(),a.J(Zi),c=a.tp,null!==
  c&&c(a,null,b))}};
  z.prototype.np=function(a){if(a instanceof S){if(this.qv.add(a),a instanceof T){var b=a.gb;null===b?this.Tk.add(a):b.qo.add(a);b=a.jc;null!==b&&(b.h=this)}}else a instanceof V?this.$u.add(a):a instanceof Je||this.Fb.add(a);a.Jb&&a.fa();if(b=a.data){a instanceof Je||(a instanceof V?this.zk.add(b,a):this.ri.add(b,a));var c=this;$i(a,function(a){aj(c,a)})}!0!==Pi(a)&&!0!==Qi(a)||this.fg.add(a);bj(a,!0,this);cj(a)?(a.pa.N()&&this.ka(Th(a,a.pa)),this.Oc()):a.Qa()&&a.pa.N()&&this.ka(Th(a,a.pa));this.te()};
  z.prototype.Xe=function(a){a.Pf();if(a instanceof S){if(this.qv.remove(a),a instanceof T){var b=a.gb;null===b?this.Tk.remove(a):b.qo.remove(a);b=a.jc;null!==b&&(b.h=null)}}else a instanceof V?this.$u.remove(a):a instanceof Je||this.Fb.remove(a);if(b=a.data){a instanceof Je||(a instanceof V?this.zk.remove(b):this.ri.remove(b));var c=this;$i(a,function(a){dj(c,a)})}this.fg.remove(a);cj(a)?(a.pa.N()&&this.ka(Th(a,a.pa)),this.Oc()):a.Qa()&&a.pa.N()&&this.ka(Th(a,a.pa));this.te()};
  z.prototype.remove=z.prototype.remove=function(a){t.l(a,E,z,"remove:part");a.eb=!1;a.zg=!1;var b=a.layer;if(null!==b&&b.h===this){a.J(ej);a.Mm();var c=b.Xe(-1,a,!1);0<=c&&this.Ic(xd,"parts",b,a,null,c,null);c=a.tp;null!==c&&c(a,b,null)}};z.prototype.removeParts=z.prototype.XA=function(a,b){if(a===this.selection){var c=new C;c.Oe(a);a=c}for(c=a.k;c.next();){var d=c.value;d.h===this&&(b&&!d.canDelete()||this.remove(d))}};z.prototype.copyParts=z.prototype.Wo=function(a,b,c){return this.Se.Wo(a,b,c)};
  z.prototype.moveParts=z.prototype.moveParts=function(a,b,c){t.l(b,w,z,"moveParts:offset");var d=this.wb;if(null!==d){d=d.Fd;null===d&&(d=new cf,d.h=this);var f=new ja(E,Object);if(a)a=a.k;else{for(a=this.rl;a.next();)jf(d,f,a.value,c);for(a=this.kh;a.next();)jf(d,f,a.value,c);a=this.links}for(;a.next();)jf(d,f,a.value,c);d.moveParts(f,b,c)}};
  function fj(a,b,c){t.l(b,$d,z,"addLayer:layer");null!==b.h&&b.h!==a&&t.m("Cannot share a Layer with another Diagram: "+b+" of "+b.h);null===c?null!==b.h&&t.m("Cannot add an existing Layer to this Diagram again: "+b):(t.l(c,$d,z,"addLayer:existingLayer"),c.h!==a&&t.m("Existing Layer must be in this Diagram: "+c+" not in "+c.h),b===c&&t.m("Cannot move a Layer before or after itself: "+b));if(b.h!==a){b=b.name;a=a.Sb;c=a.count;for(var d=0;d<c;d++)a.wa(d).name===b&&t.m("Cannot add Layer with the name '"+
  b+"'; a Layer with the same name is already present in this Diagram.")}}z.prototype.addLayer=z.prototype.Js=function(a){fj(this,a,null);a.wd(this);var b=this.Sb,c=b.count-1;if(!a.yc)for(;0<=c&&b.wa(c).yc;)c--;b.Jd(c+1,a);null!==this.ke&&this.Ic(wd,"layers",this,null,a,null,c+1);this.ka();this.Oc()};
  z.prototype.addLayerBefore=z.prototype.EH=function(a,b){fj(this,a,b);a.wd(this);var c=this.Sb,d=c.indexOf(a);0<=d&&(c.remove(a),null!==this.ke&&this.Ic(xd,"layers",this,a,null,d,null));for(var f=c.count,g=0;g<f;g++)if(c.wa(g)===b){c.Jd(g,a);break}null!==this.ke&&this.Ic(wd,"layers",this,null,a,null,g);this.ka();0>d&&this.Oc()};
  z.prototype.addLayerAfter=function(a,b){fj(this,a,b);a.wd(this);var c=this.Sb,d=c.indexOf(a);0<=d&&(c.remove(a),null!==this.ke&&this.Ic(xd,"layers",this,a,null,d,null));for(var f=c.count,g=0;g<f;g++)if(c.wa(g)===b){c.Jd(g+1,a);break}null!==this.ke&&this.Ic(wd,"layers",this,null,a,null,g+1);this.ka();0>d&&this.Oc()};
  z.prototype.removeLayer=function(a){t.l(a,$d,z,"removeLayer:layer");a.h!==this&&t.m("Cannot remove a Layer from another Diagram: "+a+" of "+a.h);if(""!==a.name){var b=this.Sb,c=b.indexOf(a);if(b.remove(a)){for(b=a.Fb.copy().k;b.next();){var d=b.value,f=d.af;d.af=f!==a.name?f:""}null!==this.ke&&this.Ic(xd,"layers",this,a,null,c,null);this.ka();this.Oc()}}};z.prototype.findLayer=z.prototype.bt=function(a){for(var b=this.Yw;b.next();){var c=b.value;if(c.name===a)return c}return null};
  z.prototype.addChangedListener=z.prototype.Jz=function(a){t.i(a,"function",z,"addChangedListener:listener");null===this.rj&&(this.rj=new B("function"));this.rj.add(a)};z.prototype.removeChangedListener=z.prototype.VA=function(a){t.i(a,"function",z,"removeChangedListener:listener");null!==this.rj&&(this.rj.remove(a),0===this.rj.count&&(this.rj=null))};
  z.prototype.hw=function(a){this.Wa||this.ja.QE(a);a.td!==ud&&(this.hh=!0);if(null!==this.rj){var b=this.rj,c=b.length;if(1===c)b=b.wa(0),b(a);else if(0!==c)for(var d=b.Ie(),f=0;f<c;f++)b=d[f],b(a)}};z.prototype.raiseChangedEvent=z.prototype.Ic=function(a,b,c,d,f,g,h){void 0===g&&(g=null);void 0===h&&(h=null);var k=new td;k.h=this;k.td=a;k.propertyName=b;k.object=c;k.oldValue=d;k.Yf=g;k.newValue=f;k.Wf=h;this.hw(k)};
  z.prototype.raiseChanged=z.prototype.j=function(a,b,c,d,f){this.Ic(vd,a,this,b,c,d,f)};t.A(z,{Zb:"animationManager"},function(){return this.li});t.A(z,{ja:"undoManager"},function(){return this.ke.ja});t.g(z,"skipsUndoManager",z.prototype.Wa);t.defineProperty(z,{Wa:"skipsUndoManager"},function(){return this.Li},function(a){t.i(a,"boolean",z,"skipsUndoManager");this.Li=a;this.ke.Li=a});t.g(z,"delaysLayout",z.prototype.ww);
  t.defineProperty(z,{ww:"delaysLayout"},function(){return this.Gy},function(a){this.Gy=a});
  z.prototype.changeState=function(a,b){if(null!==a&&a.h===this){var c=a.td;if(c===vd){var d=a.object,c=a.propertyName,f=a.za(b);t.Sa(d,c,f);d instanceof Q&&(c=d.S,null!==c&&c.Pf());this.hh=!0}else if(c===wd){f=a.object;c=a.Wf;d=a.newValue;if(f instanceof y)if("number"===typeof c&&d instanceof Q){var g=f;b?g.Xe(c):g.Jd(c,d);c=f.S;null!==c&&c.Pf()}else"number"===typeof c&&d instanceof Ae&&(g=f,b?d.xf?g.RF(c):g.OF(c):(c=d.xf?g.Hd(d.index):g.Gd(d.index),gj(c,d)));else f instanceof $d?(g=!0===a.Yf,"number"===
  typeof c&&d instanceof E&&(b?(d.Pf(),g?f.Xe(c,d,g):this.remove(d)):f.np(c,d,g))):f instanceof z?"number"===typeof c&&d instanceof $d&&(b?this.Sb.qd(c):(d.wd(this),this.Sb.Jd(c,d))):t.m("unknown ChangedEvent.Insert object: "+a.toString());this.hh=!0}else c===xd?(f=a.object,c=a.Yf,d=a.oldValue,f instanceof y?"number"===typeof c&&d instanceof Q?(g=f,b?g.Jd(c,d):g.Xe(c)):"number"===typeof c&&d instanceof Ae&&(g=f,b?(c=d.xf?g.Hd(d.index):g.Gd(d.index),gj(c,d)):d.xf?g.RF(c):g.OF(c)):f instanceof $d?(g=
  !0===a.Wf,"number"===typeof c&&d instanceof E&&(b?f.np(c,d,g):(d.Pf(),g?f.Xe(c,d,g):this.remove(d)))):f instanceof z?"number"===typeof c&&d instanceof $d&&(b?(d.wd(this),this.Sb.Jd(c,d)):this.Sb.qd(c)):t.m("unknown ChangedEvent.Remove object: "+a.toString()),this.hh=!0):c!==ud&&t.m("unknown ChangedEvent: "+a.toString())}};z.prototype.startTransaction=z.prototype.sc=function(a){return this.ja.sc(a)};z.prototype.commitTransaction=z.prototype.Ce=function(a){return this.ja.Ce(a)};
  z.prototype.rollbackTransaction=z.prototype.Np=function(){return this.ja.Np()};z.prototype.updateAllTargetBindings=function(a){void 0===a&&(a="");for(var b=this.rl;b.next();)b.value.Qb(a);for(b=this.kh;b.next();)b.value.Qb(a);for(b=this.links;b.next();)b.value.Qb(a)};z.prototype.updateAllModelDataReferences=function(){for(var a=this.rl;a.next();)a.value.updateModelDataReferences();for(a=this.kh;a.next();)a.value.updateModelDataReferences();for(a=this.links;a.next();)a.value.updateModelDataReferences()};
  z.prototype.Dt=function(a,b,c){Ii(this);xi(this);var d=this.jc;null===d||!d.rt||c||a.width===b.width&&a.height===b.height||d.J();this.Xb||Bi(this);Ji(this);d=this.Ua;!0===this.ao&&d instanceof He&&(this.R.ea=this.LG(this.R.Ke),d.doMouseMove());Wi(this,a,b);this.Ba("ViewportBoundsChanged",c?{}:null,a)};
  function Ji(a,b){var c=a.gd;if(null!==c&&c.visible){for(var d=t.Al(),f=1,g=1,h=c.xa.length,k=0;k<h;k++){var l=c.xa.n[k],m=l.interval;2>m||(hj(l.zb)?g=g*m/H.IE(g,m):f=f*m/H.IE(f,m))}h=c.gt;d.p(g*h.width,f*h.height);if(b)k=b.width,l=b.height,g=b.x,h=b.y;else{f=t.Gf();g=a.xb;f.p(g.x,g.y,g.width,g.height);for(h=a.jm.k;h.next();)g=h.value.xb,g.N()&&hb(f,g.x,g.y,g.width,g.height);k=f.width;l=f.height;g=f.x;h=f.y;if(!f.N())return}c.width=k+2*d.width;c.height=l+2*d.height;f=t.K();H.ct(g,h,0,0,d.width,d.height,
  f);f.offset(-d.width,-d.height);t.bk(d);c.S.location=f;t.B(f)}}z.prototype.clearSelection=z.prototype.jw=function(){var a=0<this.selection.count;a&&this.Ba("ChangingSelection");Me(this);a&&this.Ba("ChangedSelection")};function Me(a){a=a.selection;if(0<a.count){for(var b=a.Ie(),c=b.length,d=0;d<c;d++)b[d].eb=!1;a.La();a.clear();a.freeze()}}
  z.prototype.select=z.prototype.select=function(a){null!==a&&a.layer.h===this&&(t.l(a,E,z,"select:part"),!a.eb||1<this.selection.count)&&(this.Ba("ChangingSelection"),Me(this),a.eb=!0,this.Ba("ChangedSelection"))};
  z.prototype.selectCollection=z.prototype.hG=function(a){this.Ba("ChangingSelection");Me(this);if(t.isArray(a))for(var b=t.vb(a),c=0;c<b;c++){var d=t.mb(a,c);d instanceof E||t.m("Diagram.selectCollection given something that is not a Part: "+d);d.eb=!0}else for(a=a.k;a.next();)d=a.value,d instanceof E||t.m("Diagram.selectCollection given something that is not a Part: "+d),d.eb=!0;this.Ba("ChangedSelection")};
  z.prototype.clearHighlighteds=z.prototype.VD=function(){var a=this.Lw;if(0<a.count){for(var b=a.Ie(),c=b.length,d=0;d<c;d++)b[d].zg=!1;a.La();a.clear();a.freeze()}};z.prototype.highlight=function(a){null!==a&&a.layer.h===this&&(t.l(a,E,z,"highlight:part"),!a.zg||1<this.Lw.count)&&(this.VD(),a.zg=!0)};
  z.prototype.highlightCollection=function(a){this.VD();if(t.isArray(a))for(var b=t.vb(a),c=0;c<b;c++){var d=t.mb(a,c);d instanceof E||t.m("Diagram.highlightCollection given something that is not a Part: "+d);d.zg=!0}else for(a=a.k;a.next();)d=a.value,d instanceof E||t.m("Diagram.highlightCollection given something that is not a Part: "+d),d.zg=!0};
  z.prototype.scroll=function(a,b,c){void 0===c&&(c=1);var d="up"===b||"down"===b,f;"pixel"===a?f=c:"line"===a?f=c*(d?this.Rp:this.Qp):"page"===a?(a=d?this.xb.height:this.xb.width,a*=this.scale,0!==a&&(f=Math.max(a-(d?this.Rp:this.Qp),0),f*=c)):t.m("scrolling unit must be 'pixel', 'line', or 'page', not: "+a);f/=this.scale;c=this.position.copy();"up"===b?c.y=this.position.y-f:"down"===b?c.y=this.position.y+f:"left"===b?c.x=this.position.x-f:"right"===b?c.x=this.position.x+f:t.m("scrolling direction must be 'up', 'down', 'left', or 'right', not: "+
  b);this.position=c};z.prototype.scrollToRect=function(a){var b=this.xb;b.Wj(a)||(a=a.Tz,a.x-=b.width/2,a.y-=b.height/2,this.position=a)};z.prototype.centerRect=function(a){var b=this.xb;a=a.Tz;a.x-=b.width/2;a.y-=b.height/2;this.position=a};z.prototype.transformDocToView=z.prototype.JG=function(a){var b=this.md;b.reset();1!==this.wc&&b.scale(this.wc);var c=this.Ma;(0!==c.x||0!==c.y)&&isFinite(c.x)&&isFinite(c.y)&&b.translate(-c.x,-c.y);return a.copy().transform(this.md)};
  function Ri(a,b){var c=a.md,d=b[0],f=b[1],g=d+b[2],h=f+b[3],k=c.m11,l=c.m12,m=c.m21,n=c.m22,p=c.dx,q=c.dy,r=d*k+f*m+p,s=d*l+f*n+q,c=g*k+f*m+p,f=g*l+f*n+q,u=d*k+h*m+p,d=d*l+h*n+q,k=g*k+h*m+p,g=g*l+h*n+q,h=r,l=s,r=Math.min(r,c),h=Math.max(h,c),l=Math.min(l,f),s=Math.max(s,f),r=Math.min(r,u),h=Math.max(h,u),l=Math.min(l,d),s=Math.max(s,d),r=Math.min(r,k),h=Math.max(h,k),l=Math.min(l,g),s=Math.max(s,g);return[r,l,h-r,s-l]}
  z.prototype.transformViewToDoc=z.prototype.LG=function(a){var b=this.md;b.reset();1!==this.wc&&b.scale(this.wc);var c=this.Ma;(0!==c.x||0!==c.y)&&isFinite(c.x)&&isFinite(c.y)&&b.translate(-c.x,-c.y);return Qa(a.copy(),this.md)};var Xe;z.None=Xe=t.w(z,"None",0);var Fi;z.Uniform=Fi=t.w(z,"Uniform",1);var Gi;z.UniformToFill=Gi=t.w(z,"UniformToFill",2);var dg;z.CycleAll=dg=t.w(z,"CycleAll",10);var ng;z.CycleNotDirected=ng=t.w(z,"CycleNotDirected",11);var pg;
  z.CycleNotDirectedFast=pg=t.w(z,"CycleNotDirectedFast",12);var qg;z.CycleNotUndirected=qg=t.w(z,"CycleNotUndirected",13);var eg;z.CycleDestinationTree=eg=t.w(z,"CycleDestinationTree",14);var mg;z.CycleSourceTree=mg=t.w(z,"CycleSourceTree",15);t.g(z,"validCycle",z.prototype.RG);t.defineProperty(z,{RG:"validCycle"},function(){return this.Vv},function(a){var b=this.Vv;b!==a&&(t.Aa(a,z,z,"validCycle"),this.Vv=a,this.j("validCycle",b,a))});t.g(z,"linkSpacing",z.prototype.yp);
  t.defineProperty(z,{yp:"linkSpacing"},function(){return this.zj},function(a){var b=this.zj;b!==a&&(t.q(a,z,"linkSpacing"),0>a&&t.la(a,">= zero",z,"linkSpacing"),this.zj=a,this.j("linkSpacing",b,a))});t.A(z,{Yw:"layers"},function(){return this.Sb.k});t.g(z,"isModelReadOnly",z.prototype.Ze);t.defineProperty(z,{Ze:"isModelReadOnly"},function(){var a=this.ke;return null===a?!1:a.ab},function(a){var b=this.ke;null!==b&&(b.ab=a)});t.g(z,"isReadOnly",z.prototype.ab);
  t.defineProperty(z,{ab:"isReadOnly"},function(){return this.Ik},function(a){var b=this.Ik;b!==a&&(t.i(a,"boolean",z,"isReadOnly"),this.Ik=a,this.j("isReadOnly",b,a))});t.g(z,"isEnabled",z.prototype.isEnabled);t.defineProperty(z,{isEnabled:"isEnabled"},function(){return this.Le},function(a){var b=this.Le;b!==a&&(t.i(a,"boolean",z,"isEnabled"),this.Le=a,this.j("isEnabled",b,a))});t.g(z,"allowClipboard",z.prototype.dw);
  t.defineProperty(z,{dw:"allowClipboard"},function(){return this.du},function(a){var b=this.du;b!==a&&(t.i(a,"boolean",z,"allowClipboard"),this.du=a,this.j("allowClipboard",b,a))});t.g(z,"allowCopy",z.prototype.Si);t.defineProperty(z,{Si:"allowCopy"},function(){return this.kk},function(a){var b=this.kk;b!==a&&(t.i(a,"boolean",z,"allowCopy"),this.kk=a,this.j("allowCopy",b,a))});t.g(z,"allowDelete",z.prototype.Yk);
  t.defineProperty(z,{Yk:"allowDelete"},function(){return this.lk},function(a){var b=this.lk;b!==a&&(t.i(a,"boolean",z,"allowDelete"),this.lk=a,this.j("allowDelete",b,a))});t.g(z,"allowDragOut",z.prototype.Ms);t.defineProperty(z,{Ms:"allowDragOut"},function(){return this.eu},function(a){var b=this.eu;b!==a&&(t.i(a,"boolean",z,"allowDragOut"),this.eu=a,this.j("allowDragOut",b,a))});t.g(z,"allowDrop",z.prototype.Lz);
  t.defineProperty(z,{Lz:"allowDrop"},function(){return this.fu},function(a){var b=this.fu;b!==a&&(t.i(a,"boolean",z,"allowDrop"),this.fu=a,this.j("allowDrop",b,a))});t.g(z,"allowTextEdit",z.prototype.Qo);t.defineProperty(z,{Qo:"allowTextEdit"},function(){return this.uk},function(a){var b=this.uk;b!==a&&(t.i(a,"boolean",z,"allowTextEdit"),this.uk=a,this.j("allowTextEdit",b,a))});t.g(z,"allowGroup",z.prototype.Mo);
  t.defineProperty(z,{Mo:"allowGroup"},function(){return this.mk},function(a){var b=this.mk;b!==a&&(t.i(a,"boolean",z,"allowGroup"),this.mk=a,this.j("allowGroup",b,a))});t.g(z,"allowUngroup",z.prototype.Ro);t.defineProperty(z,{Ro:"allowUngroup"},function(){return this.vk},function(a){var b=this.vk;b!==a&&(t.i(a,"boolean",z,"allowUngroup"),this.vk=a,this.j("allowUngroup",b,a))});t.g(z,"allowInsert",z.prototype.zm);
  t.defineProperty(z,{zm:"allowInsert"},function(){return this.hu},function(a){var b=this.hu;b!==a&&(t.i(a,"boolean",z,"allowInsert"),this.hu=a,this.j("allowInsert",b,a))});t.g(z,"allowLink",z.prototype.Am);t.defineProperty(z,{Am:"allowLink"},function(){return this.nk},function(a){var b=this.nk;b!==a&&(t.i(a,"boolean",z,"allowLink"),this.nk=a,this.j("allowLink",b,a))});t.g(z,"allowRelink",z.prototype.Tj);
  t.defineProperty(z,{Tj:"allowRelink"},function(){return this.pk},function(a){var b=this.pk;b!==a&&(t.i(a,"boolean",z,"allowRelink"),this.pk=a,this.j("allowRelink",b,a))});t.g(z,"allowMove",z.prototype.Sj);t.defineProperty(z,{Sj:"allowMove"},function(){return this.ok},function(a){var b=this.ok;b!==a&&(t.i(a,"boolean",z,"allowMove"),this.ok=a,this.j("allowMove",b,a))});t.g(z,"allowReshape",z.prototype.No);
  t.defineProperty(z,{No:"allowReshape"},function(){return this.qk},function(a){var b=this.qk;b!==a&&(t.i(a,"boolean",z,"allowReshape"),this.qk=a,this.j("allowReshape",b,a))});t.g(z,"allowResize",z.prototype.Oo);t.defineProperty(z,{Oo:"allowResize"},function(){return this.rk},function(a){var b=this.rk;b!==a&&(t.i(a,"boolean",z,"allowResize"),this.rk=a,this.j("allowResize",b,a))});t.g(z,"allowRotate",z.prototype.Po);
  t.defineProperty(z,{Po:"allowRotate"},function(){return this.sk},function(a){var b=this.sk;b!==a&&(t.i(a,"boolean",z,"allowRotate"),this.sk=a,this.j("allowRotate",b,a))});t.g(z,"allowSelect",z.prototype.Pe);t.defineProperty(z,{Pe:"allowSelect"},function(){return this.tk},function(a){var b=this.tk;b!==a&&(t.i(a,"boolean",z,"allowSelect"),this.tk=a,this.j("allowSelect",b,a))});t.g(z,"allowUndo",z.prototype.Mz);
  t.defineProperty(z,{Mz:"allowUndo"},function(){return this.iu},function(a){var b=this.iu;b!==a&&(t.i(a,"boolean",z,"allowUndo"),this.iu=a,this.j("allowUndo",b,a))});t.g(z,"allowZoom",z.prototype.Ns);t.defineProperty(z,{Ns:"allowZoom"},function(){return this.ku},function(a){var b=this.ku;b!==a&&(t.i(a,"boolean",z,"allowZoom"),this.ku=a,this.j("allowZoom",b,a))});t.g(z,"hasVerticalScrollbar",z.prototype.TE);
  t.defineProperty(z,{TE:"hasVerticalScrollbar"},function(){return this.Ou},function(a){var b=this.Ou;b!==a&&(t.i(a,"boolean",z,"hasVerticalScrollbar"),this.Ou=a,Ii(this),this.ka(),this.j("hasVerticalScrollbar",b,a),Bi(this))});t.g(z,"hasHorizontalScrollbar",z.prototype.SE);t.defineProperty(z,{SE:"hasHorizontalScrollbar"},function(){return this.Nu},function(a){var b=this.Nu;b!==a&&(t.i(a,"boolean",z,"hasHorizontalScrollbar"),this.Nu=a,Ii(this),this.ka(),this.j("hasHorizontalScrollbar",b,a),Bi(this))});
  t.g(z,"allowHorizontalScroll",z.prototype.of);t.defineProperty(z,{of:"allowHorizontalScroll"},function(){return this.gu},function(a){var b=this.gu;b!==a&&(t.i(a,"boolean",z,"allowHorizontalScroll"),this.gu=a,this.j("allowHorizontalScroll",b,a),Bi(this))});t.g(z,"allowVerticalScroll",z.prototype.pf);t.defineProperty(z,{pf:"allowVerticalScroll"},function(){return this.ju},function(a){var b=this.ju;b!==a&&(t.i(a,"boolean",z,"allowVerticalScroll"),this.ju=a,this.j("allowVerticalScroll",b,a),Bi(this))});
  t.g(z,"scrollHorizontalLineChange",z.prototype.Qp);t.defineProperty(z,{Qp:"scrollHorizontalLineChange"},function(){return this.Dv},function(a){var b=this.Dv;b!==a&&(t.i(a,"number",z,"scrollHorizontalLineChange"),0>a&&t.la(a,">= 0",z,"scrollHorizontalLineChange"),this.Dv=a,this.j("scrollHorizontalLineChange",b,a))});t.g(z,"scrollVerticalLineChange",z.prototype.Rp);
  t.defineProperty(z,{Rp:"scrollVerticalLineChange"},function(){return this.Ev},function(a){var b=this.Ev;b!==a&&(t.i(a,"number",z,"scrollVerticalLineChange"),0>a&&t.la(a,">= 0",z,"scrollVerticalLineChange"),this.Ev=a,this.j("scrollVerticalLineChange",b,a))});t.g(z,"lastInput",z.prototype.R);t.defineProperty(z,{R:"lastInput"},function(){return this.ec},function(a){e&&t.l(a,ld,z,"lastInput");this.ec=a});t.g(z,"firstInput",z.prototype.Nc);
  t.defineProperty(z,{Nc:"firstInput"},function(){return this.Ck},function(a){e&&t.l(a,ld,z,"firstInput");this.Ck=a});t.g(z,"currentCursor",z.prototype.$b);t.defineProperty(z,{$b:"currentCursor"},function(){return this.zy},function(a){""===a&&(a=this.Gq);this.zy!==a&&(t.i(a,"string",z,"currentCursor"),null!==this.jb&&(this.zy=a,this.jb.style.cursor=a,this.Mb.style.cursor=a))});t.g(z,"defaultCursor",z.prototype.pI);
  t.defineProperty(z,{pI:"defaultCursor"},function(){return this.Gq},function(a){""===a&&(a="auto");var b=this.Gq;b!==a&&(t.i(a,"string",z,"defaultCursor"),this.Gq=a,this.j("defaultCursor",b,a))});t.g(z,"hasGestureZoom",z.prototype.OI);t.defineProperty(z,{OI:"hasGestureZoom"},function(){return this.vi},function(a){var b=this.vi;b!==a&&(t.i(a,"boolean",z,"hasGestureZoom"),this.vi=a,this.j("hasGestureZoom",b,a))});t.g(z,"click",z.prototype.click);
  t.defineProperty(z,{click:"click"},function(){return this.ni},function(a){var b=this.ni;b!==a&&(null!==a&&t.i(a,"function",z,"click"),this.ni=a,this.j("click",b,a))});t.g(z,"doubleClick",z.prototype.Nm);t.defineProperty(z,{Nm:"doubleClick"},function(){return this.ti},function(a){var b=this.ti;b!==a&&(null!==a&&t.i(a,"function",z,"doubleClick"),this.ti=a,this.j("doubleClick",b,a))});t.g(z,"contextClick",z.prototype.Vs);
  t.defineProperty(z,{Vs:"contextClick"},function(){return this.pi},function(a){var b=this.pi;b!==a&&(null!==a&&t.i(a,"function",z,"contextClick"),this.pi=a,this.j("contextClick",b,a))});t.g(z,"mouseOver",z.prototype.yt);t.defineProperty(z,{yt:"mouseOver"},function(){return this.Ei},function(a){var b=this.Ei;b!==a&&(null!==a&&t.i(a,"function",z,"mouseOver"),this.Ei=a,this.j("mouseOver",b,a))});t.g(z,"mouseHover",z.prototype.xt);
  t.defineProperty(z,{xt:"mouseHover"},function(){return this.Di},function(a){var b=this.Di;b!==a&&(null!==a&&t.i(a,"function",z,"mouseHover"),this.Di=a,this.j("mouseHover",b,a))});t.g(z,"mouseHold",z.prototype.wt);t.defineProperty(z,{wt:"mouseHold"},function(){return this.Ci},function(a){var b=this.Ci;b!==a&&(null!==a&&t.i(a,"function",z,"mouseHold"),this.Ci=a,this.j("mouseHold",b,a))});t.g(z,"mouseDragOver",z.prototype.CF);
  t.defineProperty(z,{CF:"mouseDragOver"},function(){return this.jv},function(a){var b=this.jv;b!==a&&(null!==a&&t.i(a,"function",z,"mouseDragOver"),this.jv=a,this.j("mouseDragOver",b,a))});t.g(z,"mouseDrop",z.prototype.vt);t.defineProperty(z,{vt:"mouseDrop"},function(){return this.Bi},function(a){var b=this.Bi;b!==a&&(null!==a&&t.i(a,"function",z,"mouseDrop"),this.Bi=a,this.j("mouseDrop",b,a))});t.g(z,"toolTip",z.prototype.Wt);
  t.defineProperty(z,{Wt:"toolTip"},function(){return this.Oi},function(a){var b=this.Oi;b!==a&&(null!==a&&t.l(a,Je,z,"toolTip"),this.Oi=a,this.j("toolTip",b,a))});t.g(z,"contextMenu",z.prototype.contextMenu);t.defineProperty(z,{contextMenu:"contextMenu"},function(){return this.qi},function(a){var b=this.qi;b!==a&&(null!==a&&t.l(a,Je,z,"contextMenu"),this.qi=a,this.j("contextMenu",b,a))});t.g(z,"commandHandler",z.prototype.Se);
  t.defineProperty(z,{Se:"commandHandler"},function(){return this.py},function(a){var b=this.py;b!==a&&(t.l(a,oa,z,"commandHandler"),null!==a.h&&t.m("Cannot share CommandHandlers between Diagrams: "+a.toString()),null!==b&&b.wd(null),this.py=a,a.wd(this))});t.g(z,"toolManager",z.prototype.wb);
  t.defineProperty(z,{wb:"toolManager"},function(){return this.Tv},function(a){var b=this.Tv;b!==a&&(t.l(a,He,z,"toolManager"),null!==a.h&&t.m("Cannot share ToolManagers between Diagrams: "+a.toString()),null!==b&&b.wd(null),this.Tv=a,a.wd(this))});t.g(z,"defaultTool",z.prototype.uw);t.defineProperty(z,{uw:"defaultTool"},function(){return this.Fy},function(a){var b=this.Fy;b!==a&&(t.l(a,ae,z,"defaultTool"),this.Fy=a,this.Ua===b&&(this.Ua=a))});t.g(z,"currentTool",z.prototype.Ua);
  t.defineProperty(z,{Ua:"currentTool"},function(){return this.By},function(a){var b=this.By;if(null!==b)for(b.ha&&b.doDeactivate(),b.cancelWaitAfter(),b.doStop(),b=this.jm.k;b.next();)b.value.ka();null===a&&(a=this.uw);null!==a&&(t.l(a,ae,z,"currentTool"),this.By=a,a.wd(this),a.doStart())});t.A(z,{selection:"selection"},function(){return this.Hv});t.g(z,"maxSelectionCount",z.prototype.vF);
  t.defineProperty(z,{vF:"maxSelectionCount"},function(){return this.ev},function(a){var b=this.ev;if(b!==a)if(t.i(a,"number",z,"maxSelectionCount"),0<=a&&!isNaN(a)){if(this.ev=a,this.j("maxSelectionCount",b,a),!this.ja.sb&&(a=this.selection.count-a,0<a)){this.Ba("ChangingSelection");for(var b=this.selection.Ie(),c=0;c<a;c++)b[c].eb=!1;this.Ba("ChangedSelection")}}else t.la(a,">= 0",z,"maxSelectionCount")});t.g(z,"nodeSelectionAdornmentTemplate",z.prototype.HF);
  t.defineProperty(z,{HF:"nodeSelectionAdornmentTemplate"},function(){return this.pv},function(a){var b=this.pv;b!==a&&(t.l(a,Je,z,"nodeSelectionAdornmentTemplate"),this.pv=a,this.j("nodeSelectionAdornmentTemplate",b,a))});t.g(z,"groupSelectionAdornmentTemplate",z.prototype.OE);t.defineProperty(z,{OE:"groupSelectionAdornmentTemplate"},function(){return this.Ku},function(a){var b=this.Ku;b!==a&&(t.l(a,Je,z,"groupSelectionAdornmentTemplate"),this.Ku=a,this.j("groupSelectionAdornmentTemplate",b,a))});
  t.g(z,"linkSelectionAdornmentTemplate",z.prototype.sF);t.defineProperty(z,{sF:"linkSelectionAdornmentTemplate"},function(){return this.Zu},function(a){var b=this.Zu;b!==a&&(t.l(a,Je,z,"linkSelectionAdornmentTemplate"),this.Zu=a,this.j("linkSelectionAdornmentTemplate",b,a))});t.A(z,{Lw:"highlighteds"},function(){return this.Pu});t.g(z,"isModified",z.prototype.hh);
  t.defineProperty(z,{hh:"isModified"},function(){var a=this.ja;return a.isEnabled?null!==a.Yi?!0:this.az&&this.Ug!==a.cj:this.az},function(a){if(this.az!==a){t.i(a,"boolean",z,"isModified");this.az=a;var b=this.ja;!a&&b.isEnabled&&(this.Ug=b.cj);a||ij(this)}});function ij(a){var b=a.hh;a.DD!==b&&(a.DD=b,a.Ba("Modified"))}t.g(z,"model",z.prototype.ba);
  t.defineProperty(z,{ba:"model"},function(){return this.ke},function(a){var b=this.ke;if(b!==a){t.l(a,F,z,"model");this.Ua.doCancel();null!==b&&b.ja!==a.ja&&b.ja.eF&&t.m("Do not replace a Diagram.model while a transaction is in progress.");this.Zb.mn();this.jw();this.lf=!1;this.Qn=!0;this.Ug=-2;this.Nf=!1;var c=this.zd;this.zd=!0;this.Zb.tl();null!==b&&(b.VA(this.HC),b instanceof P&&jj(this,b.hj),jj(this,b.Gg));this.ke=a;a.Jz(this.GC);kj(this,a.Gg);a instanceof P&&lj(this,a.hj);a.VA(this.GC);a.Jz(this.HC);
  this.zd=c;this.Xb||this.ka();null!==b&&(a.ja.isEnabled=b.ja.isEnabled)}});t.defineProperty(z,{Na:null},function(){return this.zC},function(a){this.zC=a});
  function Xh(a,b){if(b.ba===a.ba){var c=b.td,d=b.propertyName;if(c===ud&&"S"===d[0])if("StartingFirstTransaction"===d){c=a.wb;for(d=c.ef.k;d.next();)d.value.wd(a);for(d=c.Dg.k;d.next();)d.value.wd(a);for(d=c.Eg.k;d.next();)d.value.wd(a);a.zd||a.lf||(a.Cu=!0,a.Qn&&(a.Nf=!0),a.li.tl())}else if("StartingUndo"===d||"StartingRedo"===d){var f=a.Zb;f.yg&&!a.Wa&&f.mn();a.Ba("ChangingSelection")}else"StartedTransaction"===d&&(f=a.Zb,f.yg&&!a.Wa&&f.mn(),a.Wu&&f.tl());else if(a.Na){a.Na=!1;try{var g=b.Af;if(""!==
  g)if(c===vd){if("linkFromKey"===g){var h=b.object,k=a.Qf(h);if(null!==k){var l=b.newValue,m=a.Ve(l);k.aa=m}}else if("linkToKey"===g)h=b.object,k=a.Qf(h),null!==k&&(l=b.newValue,m=a.Ve(l),k.ca=m);else if("linkFromPortId"===g){if(h=b.object,k=a.Qf(h),null!==k){var n=b.newValue;"string"===typeof n&&(k.Rf=n)}}else if("linkToPortId"===g)h=b.object,k=a.Qf(h),null!==k&&(n=b.newValue,"string"===typeof n&&(k.Og=n));else if("nodeGroupKey"===g){var h=b.object,p=a.gh(h);if(null!==p){var q=b.newValue;if(void 0!==
  q){var r=a.Ve(q);p.gb=r instanceof T?r:null}else p.gb=null}}else if("linkLabelKeys"===g){if(h=b.object,k=a.Qf(h),null!==k){var s=b.oldValue,u=b.newValue;if(t.isArray(s))for(var v=t.vb(s),D=0;D<v;D++){var A=t.mb(s,D),m=a.Ve(A);null!==m&&(m.$d=null)}if(t.isArray(u))for(v=t.vb(u),D=0;D<v;D++)A=t.mb(u,D),m=a.Ve(A),null!==m&&(m.$d=k)}}else if("nodeParentKey"===g){var G=b.object,L=a.Ve(b.newValue),N=a.Ew(G);if(null!==N){var O=N.et();null!==O?null===L?a.remove(O):a.pd?O.aa=L:O.ca=L:mj(a,L,N)}}else if("parentLinkCategory"===
  g){var G=b.object,N=a.Ew(G),U=b.newValue;null!==N&&"string"===typeof U&&(O=N.et(),null!==O&&(O.Zc=U))}else if("nodeCategory"===g){var h=b.object,Y=a.gh(h),U=b.newValue;null!==Y&&"string"===typeof U&&(Y.Zc=U)}else if("linkCategory"===g){var h=b.object,ba=a.Qf(h),U=b.newValue;null!==ba&&"string"===typeof U&&(ba.Zc=U)}else if("nodeDataArray"===g){a.ka();var R=b.oldValue;jj(a,R);var xa=b.newValue;kj(a,xa)}else"linkDataArray"===g&&(a.ka(),R=b.oldValue,jj(a,R),xa=b.newValue,lj(a,xa));a.hh=!0}else if(c===
  wd)xa=b.newValue,"nodeDataArray"===g&&t.rb(xa)?nj(a,xa):"linkDataArray"===g&&t.rb(xa)?oj(a,xa):"linkLabelKeys"===g&&oe(xa)&&(k=a.Qf(b.object),m=a.Ve(xa),null!==k&&null!==m&&(m.$d=k)),a.hh=!0;else if(c===xd)R=b.oldValue,"nodeDataArray"===g&&t.rb(R)?pj(a,R):"linkDataArray"===g&&t.rb(R)?pj(a,R):"linkLabelKeys"===g&&oe(R)&&(m=a.Ve(R),null!==m&&(m.$d=null)),a.hh=!0;else{if(c===ud&&"SourceChanged"===g){var p=a.gh(b.object),Ya=b.propertyName;null!==p&&"string"===typeof Ya&&(p.Qb(Ya),a.ba instanceof Kd&&
  (k=a.Qf(b.object),null!==k&&k.Qb(Ya)))}}else if(c===vd){var za=b.propertyName,h=b.object;if(h===a.ba){if("nodeKeyProperty"===za||"nodeCategoryProperty"===za||"linkFromKeyProperty"===za||"linkToKeyProperty"===za||"linkFromPortIdProperty"===za||"linkToPortIdProperty"===za||"linkLabelKeysProperty"===za||"nodeIsGroupProperty"===za||"nodeGroupKeyProperty"===za||"nodeParentKeyProperty"===za||"linkCategoryProperty"===za)a.ja.sb||a.gn()}else Wh(a,h,za);a.hh=!0}else if(c===wd||c===xd)qj(a,b),a.hh=!0;else if(c===
  ud){if("FinishedUndo"===d||"FinishedRedo"===d)a.ja.xi=!0,a.Ba("ChangedSelection"),zi(a),a.ja.xi=!1;a.Cu=!0;a.Uf();f=a.li;f.sd&&0===a.ja.Je&&Dh(f);"CommittedTransaction"===d&&a.ja.dz&&(a.Ug=Math.min(a.Ug,a.ja.cj-1));ij(a);a.kz||"CommittedTransaction"!==d||(a.kz=!0,setTimeout(function(){a.Ua.standardMouseOver();a.kz=!1},10))}}finally{a.Na=!0}}}}
  function Wh(a,b,c){var d=a.gh(b);if(null!==d&&"string"===typeof c)d.Qb(c),a.ba instanceof Kd&&(b=a.Qf(b),null!==b&&b.Qb(c));else if("string"===typeof c){d=null;for(a=a.Yl.k;a.next();){for(var f=a.value,g=0;g<f.length;g++){var h=f[g];null!==h.gg&&(h=h.gg.za(b),null!==h&&(null===d&&(d=t.Cb()),d.push(h)))}if(null!==d)break}b=d;if(null!==b){for(d=0;d<b.length;d++)b[d].Qb(c);t.ya(b)}}}t.g(z,"skipsModelSourceBindings",z.prototype.Rt);
  t.defineProperty(z,{Rt:"skipsModelSourceBindings"},function(){return this.eD},function(a){this.eD=a});function qj(a,b){var c=b.td===wd,d=c?b.Wf:b.Yf,f=c?b.newValue:b.oldValue,g=a.Yl.za(b.object);if(Array.isArray(g)&&"number"===typeof d)for(var h=0;h<g.length;h++){var k=g[h];k.type!==Sg&&k.type!==ci||d++;c?rj(k,f,d):(k.Xe(d),sj(k,d-1))}}function aj(a,b){var c=b.yi;if(t.isArray(c)){var d=a.Yl.za(c);if(null===d)a.Yl.add(c,[b]);else{for(c=0;c<d.length;c++)if(d[c]===b)return;d.push(b)}}}
  function dj(a,b){var c=b.yi;if(t.isArray(c)){var d=a.Yl.za(c);if(null!==d)for(var f=0;f<d.length;f++)if(d[f]===b){d.splice(f,1);0===d.length&&a.Yl.remove(c);break}}}
  z.prototype.clear=z.prototype.clear=function(){var a=null;null!==this.gd&&(a=this.gd.S);this.ba.clear();for(var b=this.Sb.length,c=0;c<b;c++)this.Sb.n[c].clear();this.fg.clear();this.Pl.clear();this.qv.clear();this.Tk.clear();this.$u.clear();this.Fb.clear();this.ri.clear();this.zk.clear();this.Yl.clear();this.Hv.La();this.Hv.clear();this.Hv.freeze();this.Pu.La();this.Pu.clear();this.Pu.freeze();this.Bn=null;t.Ss=null;this.Du=(new x(NaN,NaN,NaN,NaN)).freeze();null!==a&&(this.add(a),this.Fb.remove(a));
  this.ka()};
  z.prototype.reset=z.prototype.reset=function(){this.Xb=!0;this.clear();this.Sb=new B($d);this.Rk={};this.SF();this.Ma=(new w(NaN,NaN)).freeze();this.wc=1;this.Ru=(new w(NaN,NaN)).freeze();this.Su=NaN;this.gv=1E-4;this.dv=100;this.Zv=(new w(NaN,NaN)).freeze();this.Iu=(new x(NaN,NaN,NaN,NaN)).freeze();this.Fl=Xe;this.An=xb;this.Gk=Xe;this.Xn=xb;this.Tu=this.Qu=Eb;this.nu=(new ab(16,16,16,16)).freeze();this.Vu=!0;this.Vv=dg;this.Gq="auto";this.qi=this.Oi=this.Bi=this.jv=this.Ci=this.Di=this.Ei=this.pi=
  this.ti=this.ni=null;this.Ik=!1;this.lk=this.kk=this.du=this.Le=!0;this.fu=this.eu=!1;this.ju=this.gu=this.Ou=this.Nu=this.ku=this.iu=this.tk=this.sk=this.rk=this.qk=this.ok=this.pk=this.nk=this.hu=this.vk=this.mk=this.uk=!0;this.Ev=this.Dv=16;this.Ne=(new ab(5)).freeze();this.ev=999999999;this.Pd=null;Zh(this);this.gd=null;this.Li=!0;Yh(this);this.jc=new be;this.Li=!1;this.ba=new P;this.lf=!1;this.Qn=!0;this.Xb=this.Nf=!1;this.ka()};
  z.prototype.rebuildParts=z.prototype.gn=function(){for(var a=this.gx.k;a.next();){var b=a.value;(!b.Ld()||b instanceof T)&&t.m('Invalid node template in Diagram.nodeTemplateMap: template for "'+a.key+'" must be a Node or a simple Part, not a Group or Link: '+b)}for(a=this.Jw.k;a.next();)b=a.value,b instanceof T||t.m('Invalid group template in Diagram.groupTemplateMap: template for "'+a.key+'" must be a Group, not a normal Node or Link: '+b);for(a=this.$w.k;a.next();)b=a.value,b instanceof V||t.m('Invalid link template in Diagram.linkTemplateMap: template for "'+
  a.key+'" must be a Link, not a normal Node or simple Part: '+b);a=t.Cb();for(b=this.selection.k;b.next();){var c=b.value.data;c&&a.push(c)}for(var b=t.Cb(),d=this.Lw.k;d.next();)(c=d.value.data)&&b.push(c);for(var c=t.Cb(),f=this.kh.k;f.next();)d=f.value,d.data&&(c.push(d.data),c.push(d.location));for(f=this.links.k;f.next();)d=f.value,d.data&&(c.push(d.data),c.push(d.location));for(f=this.rl.k;f.next();)d=f.value,d.data&&(c.push(d.data),c.push(d.location));d=this.ba;d instanceof P&&jj(this,d.hj);
  jj(this,d.Gg);kj(this,d.Gg);d instanceof P&&lj(this,d.hj);for(d=0;d<a.length;d++)if(f=this.gh(a[d]))f.eb=!0;for(d=0;d<b.length;d++)if(f=this.gh(b[d]))f.zg=!0;for(d=0;d<c.length;d+=2)if(f=this.gh(c[d]))f.location=c[d+1];t.ya(a);t.ya(b);t.ya(c)};
  function kj(a,b){if(null!==b){for(var c=a.ba,d=t.vb(b),f=0;f<d;f++){var g=t.mb(b,f);c.ne(g)?nj(a,g,!1):c instanceof P&&oj(a,g)}if(c instanceof P||c instanceof Kd){for(f=0;f<d;f++)g=t.mb(b,f),c.ne(g)&&vj(a,g);if(c instanceof P)for(c=a.links;c.next();)Gj(c.value)}Hj(a,!1)}}
  function nj(a,b,c){if(void 0!==b&&null!==b&&!a.ja.sb&&!a.ri.contains(b)){void 0===c&&(c=!0);var d=a.getCategoryForNodeData(b),f=a.findTemplateForNodeData(b,d);f instanceof E&&(Le(f),f=f.copy(),f instanceof E&&(f.sh=d,a.un&&(f.Jk="Tool"),a.add(f),f.data=b,c&&vj(a,b)))}}z.prototype.getCategoryForNodeData=function(a){var b=this.ba,c=b.getCategoryForNodeData(a),d=!1;b instanceof P&&(d=b.YI(a));d&&""===c&&(c="LinkLabel");return c};
  z.prototype.findTemplateForNodeData=function(a,b){var c=!1,d=this.ba;d instanceof P&&(c=d.tA(a));c?(c=this.Jw.za(b),null===c&&(c=this.Jw.za(""),null===c&&(t.UG||(t.UG=!0,t.trace('No Group template found for category "'+b+'"'),t.trace("  Using default group template")),c=this.VB))):(c=this.gx.za(b),null===c&&(c=this.gx.za(""),null===c&&(t.XG||(t.XG=!0,t.trace('No Node template found for category "'+b+'"'),t.trace("  Using default node template")),c=this.XB)));return c instanceof E?c:null};
  function vj(a,b){var c=a.ba;if(c instanceof P||c instanceof Kd){var d=c.Hb(b);if(void 0!==d){var f=pe(c,d),g=a.gh(b);if(null!==f&&null!==g){for(f=f.k;f.next();){var h=f.value;if(c instanceof P)if(c.ne(h)){if(g instanceof T&&c.Rm(h)===d){var k=a.gh(h);null!==k&&(k.gb=g)}}else{if(k=a.Qf(h),null!==k&&g instanceof S&&(c.hl(h)===d&&(k.aa=g),c.ll(h)===d&&(k.ca=g),h=c.jl(h),t.isArray(h)))for(var l=0;l<t.vb(h);l++)if(t.mb(h,l)===d){g.$d=k;break}}else c instanceof Kd&&c.ne(h)&&g instanceof S&&c.Sm(h)===d&&
  (k=a.Ew(h),mj(a,g,k))}re(c,d)}c instanceof P?(c=c.Rm(b),void 0!==c&&(c=a.Ve(c),c instanceof T&&(g.gb=c))):c instanceof Kd&&(c=c.Sm(b),void 0!==c&&g instanceof S&&(c=a.Ve(c),mj(a,c,g)))}}}
  function mj(a,b,c){if(null!==b&&null!==c){var d=a.wb.BA,f=b,g=c;if(a.pd)for(b=g.qe;b.next();){var h=b.value;if(h.ca===g)return}else for(f=c,g=b,b=f.qe;b.next();)if(h=b.value,h.aa===f)return;null!==d&&lg(d,f,g,null,!0)||(d=a.getCategoryForLinkData(c.data),b=a.findTemplateForLinkData(c.data,d),b instanceof V&&(Le(b),b=b.copy(),b instanceof V&&(b.sh=d,b.aa=f,b.ca=g,a.add(b),b.data=c.data)))}}function lj(a,b){if(null!==b){for(var c=t.vb(b),d=0;d<c;d++){var f=t.mb(b,d);oj(a,f)}Hj(a,!1)}}
  function oj(a,b){if(void 0!==b&&null!==b&&!a.ja.sb&&!a.zk.contains(b)){var c=a.getCategoryForLinkData(b),d=a.findTemplateForLinkData(b,c);if(d instanceof V&&(Le(d),d=d.copy(),d instanceof V)){d.sh=c;var c=a.ba,f=c.II(b);""!==f&&(d.Rf=f);f=c.hl(b);void 0!==f&&(f=a.Ve(f),f instanceof S&&(d.aa=f));f=c.LI(b);""!==f&&(d.Og=f);f=c.ll(b);void 0!==f&&(f=a.Ve(f),f instanceof S&&(d.ca=f));c=c.jl(b);if(t.isArray(c))for(var f=t.vb(c),g=0;g<f;g++){var h=t.mb(c,g),h=a.Ve(h);null!==h&&(h.$d=d)}a.add(d);d.data=b}}}
  z.prototype.getCategoryForLinkData=function(a){var b=this.ba,c="";b instanceof P?c=b.getCategoryForLinkData(a):b instanceof Kd&&(c=b.KI(a));return c};z.prototype.findTemplateForLinkData=function(a,b){var c=this.$w.za(b);null===c&&(c=this.$w.za(""),null===c&&(t.WG||(t.WG=!0,t.trace('No Link template found for category "'+b+'"'),t.trace("  Using default link template")),c=this.WB));return c instanceof V?c:null};function jj(a,b){for(var c=t.vb(b),d=0;d<c;d++){var f=t.mb(b,d);pj(a,f)}}
  function pj(a,b){if(void 0!==b&&null!==b){var c=a.gh(b);if(c instanceof E){c.eb=!1;c.zg=!1;var d=c.layer;if(null!==d&&d.h===a){var f=a.ba;if(f instanceof P&&c instanceof S){var g=f.Hb(c.data);if(void 0!==g){for(var h=c.qe;h.next();){var k=h.value.data;qe(f,g,k)}c.ci&&(h=c.$d,null!==h&&(k=h.data,qe(f,g,k)));if(c instanceof T)for(h=c.Rc;h.next();)k=h.value.data,f.ne(k)&&qe(f,g,k)}}else if(f instanceof Kd&&c instanceof S){h=a.Qf(c.data);if(null!==h&&(h.eb=!1,h.zg=!1,k=h.layer,null!==k)){var l=k.Xe(-1,
  h,!1);0<=l&&a.Ic(xd,"parts",k,h,null,l,null);l=h.tp;null!==l&&l(h,k,null)}h=a.pd;for(k=c.qe;k.next();)l=k.value,l=(h?l.ca:l.aa).data,f.ne(l)&&qe(f,g,l)}f=d.Xe(-1,c,!1);0<=f&&a.Ic(xd,"parts",d,c,null,f,null);f=c.tp;null!==f&&f(c,d,null)}}}}z.prototype.findPartForKey=z.prototype.GI=function(a){if(null===a||void 0===a)return null;a=this.ba.uf(a);if(null===a)return null;a=this.ri.za(a);return a instanceof E?a:null};
  z.prototype.findNodeForKey=z.prototype.Ve=function(a){if(null===a||void 0===a)return null;a=this.ba.uf(a);if(null===a)return null;a=this.ri.za(a);return a instanceof S?a:null};z.prototype.findPartForData=z.prototype.gh=function(a){if(null===a)return null;var b=this.ri.za(a);if(b instanceof E)return b;b=this.zk.za(a);return b instanceof E?b:null};z.prototype.findNodeForData=z.prototype.Ew=function(a){if(null===a)return null;a=this.ri.za(a);return a instanceof S?a:null};
  z.prototype.findLinkForData=z.prototype.Qf=function(a){if(null===a)return null;a=this.zk.za(a);return a instanceof V?a:null};t.g(z,"nodeTemplate",z.prototype.tJ);t.defineProperty(z,{tJ:"nodeTemplate"},function(){return this.Fi.za("")},function(a){var b=this.Fi.za("");b!==a&&(t.l(a,E,z,"nodeTemplate"),this.Fi.add("",a),this.j("nodeTemplate",b,a),this.ja.sb||this.gn())});t.g(z,"nodeTemplateMap",z.prototype.gx);
  t.defineProperty(z,{gx:"nodeTemplateMap"},function(){return this.Fi},function(a){var b=this.Fi;b!==a&&(t.l(a,ja,z,"nodeTemplateMap"),this.Fi=a,this.j("nodeTemplateMap",b,a),this.ja.sb||this.gn())});t.g(z,"groupTemplate",z.prototype.NI);t.defineProperty(z,{NI:"groupTemplate"},function(){return this.Dk.za("")},function(a){var b=this.Dk.za("");b!==a&&(t.l(a,T,z,"groupTemplate"),this.Dk.add("",a),this.j("groupTemplate",b,a),this.ja.sb||this.gn())});t.g(z,"groupTemplateMap",z.prototype.Jw);
  t.defineProperty(z,{Jw:"groupTemplateMap"},function(){return this.Dk},function(a){var b=this.Dk;b!==a&&(t.l(a,ja,z,"groupTemplateMap"),this.Dk=a,this.j("groupTemplateMap",b,a),this.ja.sb||this.gn())});t.g(z,"linkTemplate",z.prototype.kJ);t.defineProperty(z,{kJ:"linkTemplate"},function(){return this.Aj.za("")},function(a){var b=this.Aj.za("");b!==a&&(t.l(a,V,z,"linkTemplate"),this.Aj.add("",a),this.j("linkTemplate",b,a),this.ja.sb||this.gn())});t.g(z,"linkTemplateMap",z.prototype.$w);
  t.defineProperty(z,{$w:"linkTemplateMap"},function(){return this.Aj},function(a){var b=this.Aj;b!==a&&(t.l(a,ja,z,"linkTemplateMap"),this.Aj=a,this.j("linkTemplateMap",b,a),this.ja.sb||this.gn())});t.g(z,"isMouseCaptured",z.prototype.Kd);
  t.defineProperty(z,{Kd:"isMouseCaptured"},function(){return this.wC},function(a){var b=this.jb;null!==b&&(a?(this.R.bubbles=!1,b.removeEventListener("mousemove",this.Dp,!1),b.removeEventListener("mousedown",this.Cp,!1),b.removeEventListener("mouseup",this.Fp,!1),b.removeEventListener("mousewheel",this.ih,!1),b.removeEventListener("DOMMouseScroll",this.ih,!1),b.removeEventListener("mouseout",this.Ep,!1),window.addEventListener("mousemove",this.Dp,!0),window.addEventListener("mousedown",this.Cp,!0),
  window.addEventListener("mouseup",this.Fp,!0),window.addEventListener("mousewheel",this.ih,!0),window.addEventListener("DOMMouseScroll",this.ih,!0),window.addEventListener("mouseout",this.Ep,!0),window.addEventListener("selectstart",this.preventDefault,!1)):(window.removeEventListener("mousemove",this.Dp,!0),window.removeEventListener("mousedown",this.Cp,!0),window.removeEventListener("mouseup",this.Fp,!0),window.removeEventListener("mousewheel",this.ih,!0),window.removeEventListener("DOMMouseScroll",
  this.ih,!0),window.removeEventListener("mouseout",this.Ep,!0),window.removeEventListener("selectstart",this.preventDefault,!1),b.addEventListener("mousemove",this.Dp,!1),b.addEventListener("mousedown",this.Cp,!1),b.addEventListener("mouseup",this.Fp,!1),b.addEventListener("mousewheel",this.ih,!1),b.addEventListener("DOMMouseScroll",this.ih,!1),b.addEventListener("mouseout",this.Ep,!1)),this.wC=a)});t.g(z,"position",z.prototype.position);
  t.defineProperty(z,{position:"position"},function(){return this.Ma},function(a){var b=this.Ma;if(!b.M(a)){t.l(a,w,z,"position");var c=this.xb.copy();c.x=b.x;c.y=b.y;a=a.copy();if(!this.Xb&&null!==this.jb){this.Xb=!0;var d=this.scale;Di(this,a,this.Ed,this.Eb/d,this.Db/d,this.An);this.Xb=!1}this.Ma=a.Z();a=this.Zb;a.sd&&Oh(a,b,this.Ma);this.Xb||this.Dt(c,this.xb)}});t.g(z,"initialPosition",z.prototype.XE);
  t.defineProperty(z,{XE:"initialPosition"},function(){return this.Ru},function(a){this.Ru.M(a)||(t.l(a,w,z,"initialPosition"),this.Ru=a.Z())});t.g(z,"initialScale",z.prototype.YE);t.defineProperty(z,{YE:"initialScale"},function(){return this.Su},function(a){this.Su!==a&&(t.i(a,"number",z,"initialScale"),this.Su=a)});t.g(z,"grid",z.prototype.lp);
  t.defineProperty(z,{lp:"grid"},function(){null===this.gd&&vi(this);return this.gd},function(a){var b=this.gd;if(b!==a){null===b&&(vi(this),b=this.gd);t.l(a,y,z,"grid");a.type!==wi&&t.m("Diagram.grid must be a Panel of type Panel.Grid");var c=b.ia;null!==c&&c.remove(b);this.gd=a;a.name="GRID";null!==c&&c.add(a);Ji(this);this.ka();this.j("grid",b,a)}});
  t.A(z,{xb:"viewportBounds"},function(){var a=this.CD;if(null===this.jb)return a;var b=this.Ma,c=this.wc;a.p(b.x,b.y,Math.max(this.Eb,0)/c,Math.max(this.Db,0)/c);return a});t.g(z,"fixedBounds",z.prototype.fA);t.defineProperty(z,{fA:"fixedBounds"},function(){return this.Iu},function(a){var b=this.Iu;b.M(a)||(t.l(a,x,z,"fixedBounds"),this.Iu=a=a.Z(),this.Oc(),this.j("fixedBounds",b,a))});t.A(z,{Ed:"documentBounds"},function(){return this.Du});
  function Ei(a,b){a.wi=!1;var c=a.Du;c.M(b)||(b=b.Z(),a.Du=b,a.uj=null,Bi(a),a.Ba("DocumentBoundsChanged",null,c.copy()),Ii(a))}t.g(z,"scale",z.prototype.scale);
  t.defineProperty(z,{scale:"scale"},function(){return this.wc},function(a){var b=this.wc;t.q(a,z,"scale");a<this.Cg&&(a=this.Cg);a>this.Bg&&(a=this.Bg);if(b!==a){this.wc=a;if(!this.Xb&&!this.zd&&(this.Xb=!0,null!==this.jb)){var c=this.xb.copy(),d=this.Eb,f=this.Db;c.width=this.Eb/b;c.height=this.Db/b;var g=this.$f.copy();if(isNaN(g.x))switch(this.ow){case ac:g.x=0;break;case bc:g.x=d-1;break;case Kb:g.x=d/2;break;case xb:case gc:g.x=d/2}if(isNaN(g.y))switch(this.ow){case $b:g.y=0;break;case cc:g.y=
  f-1;break;case Kb:g.y=f/2;break;case xb:case gc:g.y=f/2}this.position=new w(this.Ma.x+g.x/b-g.x/a,this.Ma.y+g.y/b-g.y/a);this.Xb=!1;this.Dt(c,this.xb)}this.ka();Ii(this)}});t.g(z,"autoScale",z.prototype.Dm);t.defineProperty(z,{Dm:"autoScale"},function(){return this.Fl},function(a){var b=this.Fl;b!==a&&(t.Aa(a,z,z,"autoScale"),this.Fl=a,this.j("autoScale",b,a),a!==Xe&&Bi(this))});t.g(z,"initialAutoScale",z.prototype.TI);
  t.defineProperty(z,{TI:"initialAutoScale"},function(){return this.Gk},function(a){var b=this.Gk;b!==a&&(t.Aa(a,z,z,"initialAutoScale"),this.Gk=a,this.j("initialAutoScale",b,a))});t.g(z,"initialViewportSpot",z.prototype.ZE);t.defineProperty(z,{ZE:"initialViewportSpot"},function(){return this.Tu},function(a){var b=this.Tu;b!==a&&(t.l(a,I,z,"initialViewportSpot"),a.vd()||t.m("initialViewportSpot must be a real Spot: "+a),this.Tu=a,this.j("initialViewportSpot",b,a))});t.g(z,"initialDocumentSpot",z.prototype.WE);
  t.defineProperty(z,{WE:"initialDocumentSpot"},function(){return this.Qu},function(a){var b=this.Qu;b!==a&&(t.l(a,I,z,"initialDocumentSpot"),a.vd()||t.m("initialViewportSpot must be a real Spot: "+a),this.Qu=a,this.j("initialDocumentSpot",b,a))});t.g(z,"minScale",z.prototype.Cg);t.defineProperty(z,{Cg:"minScale"},function(){return this.gv},function(a){t.q(a,z,"minScale");var b=this.gv;b!==a&&(0<a?(this.gv=a,this.j("minScale",b,a),a>this.scale&&(this.scale=a)):t.la(a,"> 0",z,"minScale"))});
  t.g(z,"maxScale",z.prototype.Bg);t.defineProperty(z,{Bg:"maxScale"},function(){return this.dv},function(a){t.q(a,z,"maxScale");var b=this.dv;b!==a&&(0<a?(this.dv=a,this.j("maxScale",b,a),a<this.scale&&(this.scale=a)):t.la(a,"> 0",z,"maxScale"))});t.g(z,"zoomPoint",z.prototype.$f);t.defineProperty(z,{$f:"zoomPoint"},function(){return this.Zv},function(a){this.Zv.M(a)||(t.l(a,w,z,"zoomPoint"),this.Zv=a=a.Z())});t.g(z,"contentAlignment",z.prototype.ow);
  t.defineProperty(z,{ow:"contentAlignment"},function(){return this.An},function(a){var b=this.An;b.M(a)||(t.l(a,I,z,"contentAlignment"),this.An=a=a.Z(),this.j("contentAlignment",b,a),Bi(this))});t.g(z,"initialContentAlignment",z.prototype.UI);t.defineProperty(z,{UI:"initialContentAlignment"},function(){return this.Xn},function(a){var b=this.Xn;b.M(a)||(t.l(a,I,z,"initialContentAlignment"),this.Xn=a=a.Z(),this.j("initialContentAlignment",b,a))});t.g(z,"padding",z.prototype.padding);
  t.defineProperty(z,{padding:"padding"},function(){return this.Ne},function(a){"number"===typeof a?a=new ab(a):t.l(a,ab,z,"padding");var b=this.Ne;b.M(a)||(this.Ne=a=a.Z(),this.Oc(),this.j("padding",b,a))});t.A(z,{kh:"nodes"},function(){return this.qv.k});t.A(z,{links:"links"},function(){return this.$u.k});t.A(z,{rl:"parts"},function(){return this.Fb.k});z.prototype.findTopLevelGroups=function(){return this.Tk.k};t.g(z,"layout",z.prototype.jc);
  t.defineProperty(z,{jc:"layout"},function(){return this.Pd},function(a){var b=this.Pd;b!==a&&(t.l(a,be,z,"layout"),null!==b&&(b.h=null,b.group=null),this.Pd=a,a.h=this,a.group=null,this.lu=!0,this.j("layout",b,a),this.te())});z.prototype.layoutDiagram=function(a){zi(this);a&&Hj(this,!0);Li(this,!1)};function Hj(a,b){for(var c=a.Tk.k;c.next();)Ij(a,c.value,b);null!==a.jc&&(b?a.jc.$e=!1:a.jc.J())}
  function Ij(a,b,c){if(null!==b){for(var d=b.qo.k;d.next();)Ij(a,d.value,c);null!==b.jc&&(c?b.jc.$e=!1:b.jc.J())}}function Li(a,b){if(!a.Gy){var c=a.jc,d=a.Wu;a.Wu=!0;var f=a.Na;a.Na=!0;try{for(var g=a.Tk.k;g.next();)Jj(a,g.value,b);c.$e||b&&!c.yA||(c.doLayout(a),zi(a),c.$e=!0)}finally{a.lu=!c.$e,a.Wu=d,a.Na=f}}}function Jj(a,b,c){if(null!==b){for(var d=b.qo.k;d.next();)Jj(a,d.value,c);d=b.jc;null===d||d.$e||c&&!d.yA||(b.NC=!b.location.N(),d.doLayout(b),b.J(Kj),d.$e=!0,Ni(a,b))}}
  t.g(z,"isTreePathToChildren",z.prototype.pd);t.defineProperty(z,{pd:"isTreePathToChildren"},function(){return this.Vu},function(a){var b=this.Vu;if(b!==a&&(t.i(a,"boolean",z,"isTreePathToChildren"),this.Vu=a,this.j("isTreePathToChildren",b,a),!this.ja.sb))for(a=this.kh;a.next();)Lj(a.value)});z.prototype.findTreeRoots=function(){for(var a=new B(S),b=this.kh.k;b.next();){var c=b.value;c.sp&&null===c.et()&&a.add(c)}return a.k};t.g(z,"isCollapsingExpanding",z.prototype.Wd);
  t.defineProperty(z,{Wd:null},function(){return this.oC},function(a){this.oC=a});
  function Vh(a){function b(a){var b=a.toLowerCase(),h=new B("function");c.add(a,h);c.add(b,h);d.add(a,a);d.add(b,a)}var c=new ja("string",B),d=new ja("string","string");b("AnimationStarting");b("AnimationFinished");b("BackgroundSingleClicked");b("BackgroundDoubleClicked");b("BackgroundContextClicked");b("ClipboardChanged");b("ClipboardPasted");b("DocumentBoundsChanged");b("ExternalObjectsDropped");b("InitialLayoutCompleted");b("LayoutCompleted");b("LinkDrawn");b("LinkRelinked");b("LinkReshaped");b("Modified");
  b("ObjectSingleClicked");b("ObjectDoubleClicked");b("ObjectContextClicked");b("PartCreated");b("PartResized");b("PartRotated");b("SelectionMoved");b("SelectionCopied");b("SelectionDeleting");b("SelectionDeleted");b("SelectionGrouped");b("SelectionUngrouped");b("ChangingSelection");b("ChangedSelection");b("SubGraphCollapsed");b("SubGraphExpanded");b("TextEdited");b("TreeCollapsed");b("TreeExpanded");b("ViewportBoundsChanged");a.Iy=c;a.Hy=d}
  function ma(a,b){var c=a.Hy.za(b);return null!==c?c:a.Hy.za(b.toLowerCase())}function Mj(a,b){var c=a.Iy.za(b);if(null!==c)return c;c=a.Iy.za(b.toLowerCase());if(null!==c)return c;t.m("Unknown DiagramEvent name: "+b);return null}z.prototype.addDiagramListener=z.prototype.Kz=function(a,b){t.i(a,"string",z,"addDiagramListener:name");t.i(b,"function",z,"addDiagramListener:listener");var c=Mj(this,a);null!==c&&c.add(b)};
  z.prototype.removeDiagramListener=z.prototype.PF=function(a,b){t.i(a,"string",z,"removeDiagramListener:name");t.i(b,"function",z,"addDiagramListener:listener");var c=Mj(this,a);null!==c&&c.remove(b)};z.prototype.raiseDiagramEvent=z.prototype.Ba=function(a,b,c){e&&t.i(a,"string",z,"raiseDiagramEvent:name");var d=Mj(this,a),f=new rd;f.h=this;f.name=ma(this,a);void 0!==b&&(f.Bx=b);void 0!==c&&(f.kx=c);a=d.length;if(1===a)d=d.wa(0),d(f);else if(0!==a)for(b=d.Ie(),c=0;c<a;c++)d=b[c],d(f);return f.cancel};
  function Yf(a,b){var c=!1;a.xb.Wj(b)&&(c=!0);c=a.dA(b,function(a){return a.S},function(a){return a instanceof V},!0,function(a){return a instanceof V},c);if(0!==c.count)for(c=c.k;c.next();){var d=c.value;d.dj&&d.ac()}}
  function Nj(a,b){null===a.Sd&&(a.Sd=new Oj);var c=null!==b?b.gb:null;if(a.Sd.mt||a.Sd.group!==c){if(null===c){var d;d=a.wi?Ai(a):a.Ed.copy();d.Sf(100,100);a.Sd.initialize(d);d=t.Gf();for(var f=a.kh;f.next();){var g=f.value,h=g.layer;null!==h&&h.visible&&!h.yc&&Pj(a,g,null,d)}}else for(c.pa.N()||c.sf(),d=c.pa.copy(),d.Sf(20,20),a.Sd.initialize(d),d=t.Gf(),f=c.Rc;f.next();)g=f.value,g instanceof S&&Pj(a,g,null,d);t.hc(d);a.Sd.group=c;a.Sd.mt=!1}else Qj(a.Sd);return a.Sd}
  function Pj(a,b,c,d){if(b!==c)if(b.Qa()&&b.canAvoid()){c=b.getAvoidableRect(d);d=a.Sd.Fm;b=a.Sd.Em;for(var f=c.x+c.width,g=c.y+c.height,h=c.x;h<f;h+=d){for(var k=c.y;k<g;k+=b)Rj(a.Sd,h,k);Rj(a.Sd,h,g)}for(k=c.y;k<g;k+=b)Rj(a.Sd,f,k);Rj(a.Sd,f,g)}else if(b instanceof T)for(b=b.Rc;b.next();)f=b.value,f instanceof S&&Pj(a,f,c,d)}function Sj(a,b){null===a.Sd||a.Sd.mt||null!==b&&!b.canAvoid()||(a.Sd.mt=!0)}
  z.prototype.simulatedMouseMove=z.prototype.fB=function(a,b,c){if(null!==ff){var d=ff.h;c instanceof z||(c=null);var f=gf;c!==f&&(null!==f&&f!==d&&null!==f.wb.Fd&&(tf(f),ff.ot=!1,f.wb.Fd.doSimulatedDragLeave()),gf=c,null!==c&&c!==d&&null!==c.wb.Fd&&(zf(),f=c.wb.Fd,wf.contains(f)||wf.add(f),c.wb.Fd.doSimulatedDragEnter()));if(null===c||c===d||!c.Lz||c.ab||!c.zm)return!1;d=c.wb.Fd;null!==d&&(null!==a?b=c.Un(a):null===b&&(b=new w),c.ec.ea=b,c.ec.$j=!1,c.ec.mj=!1,d.doSimulatedDragOver());return!0}return!1};
  z.prototype.simulatedMouseUp=z.prototype.sG=function(a,b,c,d){if(null!==ff){null===d&&(d=b);b=gf;var f=ff.h;if(d!==b){if(null!==b&&b!==f&&null!==b.wb.Fd)return tf(b),ff.ot=!1,b.wb.Fd.doSimulatedDragLeave(),!1;gf=d;null!==d&&null!==d.wb.Fd&&(zf(),b=d.wb.Fd,wf.contains(b)||wf.add(b),d.wb.Fd.doSimulatedDragEnter())}if(null===d)return ff.doCancel(),!0;if(d!==this)return null!==a&&(c=d.Un(a)),d.ec.ea=c,d.ec.$j=!1,d.ec.mj=!0,a=d.wb.Fd,null!==a&&a.doSimulatedDrop(),a=ff,null!==a&&(d=a.mayCopy(),a.gf=d?"Copy":
  "Move",a.stopTool()),!0}return!1};t.g(z,"autoScrollRegion",z.prototype.QD);t.defineProperty(z,{QD:"autoScrollRegion"},function(){return this.nu},function(a){"number"===typeof a?a=new ab(a):t.l(a,ab,z,"autoScrollRegion");var b=this.nu;b.M(a)||(this.nu=a=a.Z(),this.Oc(),this.j("autoScrollRegion",b,a))});function Uf(a,b){a.mu.assign(b);Tj(a,a.mu).tf(a.position)?tf(a):Uj(a)}
  function Uj(a){null===a.Gl&&(a.Gl={},a.Gl.id=setInterval(function(){if(null!==a.Gl){tf(a);var b=a.R.event;if(null!==b){var c=Tj(a,a.mu);c.tf(a.position)||(a.position=c,a.R.ea=a.LG(a.mu),a.fB(b,null,b.target.U)||a.doMouseMove(),a.wi=!0,Ei(a,a.qf()),a.ve=!0,a.Uf(),Uj(a))}}},a.iH))}function tf(a){null!==a.Gl&&(clearInterval(a.Gl.id),a.Gl=null)}
  function Tj(a,b){var c=a.position,d=a.QD;if(0>=d.top&&0>=d.left&&0>=d.right&&0>=d.bottom)return c;var f=a.xb,g=a.scale,f=t.hk(0,0,f.width*g,f.height*g),h=t.lc(0,0);if(b.x>=f.x&&b.x<f.x+d.left){var k=Math.max(a.Qp,1),k=k|0;h.x-=k;b.x<f.x+d.left/2&&(h.x-=k);b.x<f.x+d.left/4&&(h.x-=4*k)}else b.x<=f.x+f.width&&b.x>f.x+f.width-d.right&&(k=Math.max(a.Qp,1),k|=0,h.x+=k,b.x>f.x+f.width-d.right/2&&(h.x+=k),b.x>f.x+f.width-d.right/4&&(h.x+=4*k));b.y>=f.y&&b.y<f.y+d.top?(k=Math.max(a.Rp,1),k|=0,h.y-=k,b.y<f.y+
  d.top/2&&(h.y-=k),b.y<f.y+d.top/4&&(h.y-=4*k)):b.y<=f.y+f.height&&b.y>f.y+f.height-d.bottom&&(k=Math.max(a.Rp,1),k|=0,h.y+=k,b.y>f.y+f.height-d.bottom/2&&(h.y+=k),b.y>f.y+f.height-d.bottom/4&&(h.y+=4*k));h.tf(H.nj)||(c=new w(c.x+h.x/g,c.y+h.y/g));t.hc(f);t.B(h);return c}z.prototype.makeSVG=z.prototype.makeSvg=function(a){void 0===a&&(a={});a.context="svg";a=Vj(this,a);return null!==a?a.zl:null};
  z.prototype.makeImage=function(a){void 0===a&&(a={});var b=(a.document||document).createElement("img");b.src=this.lJ(a);return b instanceof HTMLImageElement?b:null};z.prototype.makeImageData=z.prototype.lJ=function(a){void 0===a&&(a={});var b=Vj(this,a);return null!==b?b.toDataURL(a.type,a.details):""};
  function Vj(a,b){a.Zb.mn();a.Uf();if(null===a.jb)return null;"object"!==typeof b&&t.m("properties argument must be an Object.");var c=!1,d=b.size||null,f=b.scale||null;void 0!==b.scale&&isNaN(b.scale)&&(f="NaN");var g=b.maxSize;void 0===b.maxSize&&(c=!0,g="svg"===b.context?new ga(Infinity,Infinity):new ga(2E3,2E3));var h=b.position||null,k=b.parts||null,l=void 0===b.padding?1:b.padding,m=b.background||null,n=b.omitTemporary;void 0===n&&(n=!0);var p=b.document||document,q=b.elementFinished||null,r=
  b.showTemporary;void 0===r&&(r=!n);n=b.showGrid;void 0===n&&(n=r);null!==d&&isNaN(d.width)&&isNaN(d.height)&&(d=null);l&&"number"===typeof l&&(l=new ab(l));l||(l=new ab(0));l.left=Math.max(l.left,0);l.right=Math.max(l.right,0);l.top=Math.max(l.top,0);l.bottom=Math.max(l.bottom,0);a.Mn=!1;ui(a);var s=p.createElement("canvas"),u=s.getContext("2d"),v=s;if(!(d||f||k||h))return s.width=a.Eb+Math.ceil(l.left+l.right),s.height=a.Db+Math.ceil(l.top+l.bottom),"svg"===b.context&&(u=v=new nc(s,p,q),u instanceof
  nc&&(a.Mn=!0)),Ui(a,u,l,new ga(s.width,s.height),a.wc,a.Ma,k,m,r,n),a.Mn=!0,v;var D=a.Se.Xs,A,G=new w(0,0);A=a.Ed.copy();A.ZJ(a.padding);G.x=A.x;G.y=A.y;if(k){var L,N=!0,k=k.k;for(k.reset();k.next();){var O=k.value;if(O instanceof E){var U=O.layer;U&&!U.visible||U&&U.yc||!O.Qa()||(O=O.pa,O.N()&&(N?(N=!1,L=O.copy()):L.lj(O)))}}N&&(L=new x(0,0,0,0));A.width=L.width;A.height=L.height;G.x=L.x;G.y=L.y}null!==h&&h.N()&&(G=h,f||(f=D));L=h=0;l&&(h=l.left+l.right,L=l.top+l.bottom);N=O=0;d&&(O=d.width,N=d.height,
  isFinite(O)&&(O=Math.max(0,O-h)),isFinite(N)&&(N=Math.max(0,N-L)));d&&f?("NaN"===f&&(f=D),d.N()?(d=O,A=N):isNaN(N)?(d=O,A=A.height*f):(d=A.width*f,A=N)):d?d.N()?(f=Math.min(O/A.width,N/A.height),d=O,A=N):isNaN(N)?(f=O/A.width,d=O,A=A.height*f):(f=N/A.height,d=A.width*f,A=N):f?"NaN"===f&&g.N()?(f=Math.min((g.width-h)/A.width,(g.height-L)/A.height),f>D?(f=D,d=A.width,A=A.height):(d=g.width,A=g.height)):(d=A.width*f,A=A.height*f):(f=D,d=A.width,A=A.height);l?(d+=h,A+=L):l=new ab(0);g&&(D=g.width,g=g.height,
  "svg"!==b.context&&c&&!t.TG&&(d>D||A>g)&&(t.trace("Diagram.makeImage(data): Diagram width or height is larger than the default max size. ("+Math.ceil(d)+"x"+Math.ceil(A)+" vs 2000x2000) Consider increasing the max size."),t.TG=!0),isNaN(D)&&(D=2E3),isNaN(g)&&(g=2E3),isFinite(D)&&(d=Math.min(d,D)),isFinite(g)&&(A=Math.min(A,g)));s.width=Math.ceil(d);s.height=Math.ceil(A);"svg"===b.context&&(u=v=new nc(s,p,q),u instanceof nc&&(a.Mn=!0));Ui(a,u,l,new ga(Math.ceil(d),Math.ceil(A)),f,G,k,m,r,n);a.Mn=!0;
  return v}z.inherit=function(a,b){t.i(a,"function",z,"inherit");t.i(b,"function",z,"inherit");b.uH&&t.m("Cannot inherit from "+t.xg(b));t.Ka(a,b)};function Wj(a){1<arguments.length&&t.m("Palette constructor can only take one optional argument, the DIV HTML element or its id.");z.call(this,a);this.Ms=!0;this.Sj=!1;this.ab=!0;this.ow=Fb;this.jc=new Xj}t.ga("Palette",Wj);t.Ka(Wj,z);
  function Xi(a){1<arguments.length&&t.m("Overview constructor can only take one optional argument, the DIV HTML element or its id.");z.call(this,a);this.li.isEnabled=!1;this.Xb=!0;this.Gi=null;this.oH=this.Fu=!0;this.QJ("drawShadows",!1);var b=new E,c=new W;c.stroke="magenta";c.fb=2;c.fill="transparent";c.name="BOXSHAPE";b.sx="BOXSHAPE";b.ax="BOXSHAPE";b.cursor="move";b.add(c);this.Il=b;this.zz=document.createElement("canvas");this.wH=this.zz.getContext("2d");b=new Yj;b.wd(this);this.wb.ef.Jd(0,b);
  var d=this;this.JF=function(){Zj(d)};this.IF=function(){null!==d.Gi&&(d.Oc(),d.ka())};this.ab=!0;this.Pe=!1;this.Dm=Fi;this.wb.bn=af;this.Xb=!1}t.ga("Overview",Xi);t.Ka(Xi,z);
  function Yi(a){a.Xb||a.zd||!1!==a.Nf||(a.Nf=!0,requestAnimationFrame(function(){if(a.Nf&&!a.zd&&(a.Nf=!1,null!==a.Mb)){a.zd=!0;zi(a);a.Ed.N()||Ei(a,a.qf());null===a.Mb&&t.m("No div specified");null===a.jb&&t.m("No canvas specified");if(a.ve){var b=a.Gi;if(null!==b&&!b.Zb.yg&&!b.Zb.sd){var b=a.Sg,c=a.zz;b.setTransform(1,0,0,1,0,0);b.clearRect(0,0,a.jb.width,a.jb.height);b.drawImage(c,0,0);c=a.md;c.reset();1!==a.wc&&c.scale(a.scale);0===a.position.x&&0===a.position.y||c.translate(-a.Ma.x,-a.Ma.y);b.setTransform(c.m11,
  c.m12,c.m21,c.m22,c.dx,c.dy);for(var c=a.Sb.length,d=0;d<c;d++)a.Sb.n[d].Ue(b,a);a.Hk=!1;a.ve=!1}}a.zd=!1}}))}Xi.prototype.computePixelRatio=function(){return 1};
  Xi.prototype.Ue=function(){null===this.Mb&&t.m("No div specified");null===this.jb&&t.m("No canvas specified");if(this.ve){var a=this.Gi;if(!(null===a||a.Zb.yg||a.Zb.sd||!this.oH&&a.wb.Fd.ha)){var b=a.lp;(b&&b.visible&&isNaN(b.width)||isNaN(b.height))&&Ji(a);var c=this.jb,b=this.Sg,d=this.zz,f=this.wH;d.width=c.width;d.height=c.height;b.cu="";b.setTransform(1,0,0,1,0,0);b.clearRect(0,0,this.jb.width,this.jb.height);var g=this.md;g.reset();1!==this.wc&&g.scale(this.scale);0===this.position.x&&0===this.position.y||
  g.translate(-this.Ma.x,-this.Ma.y);b.setTransform(g.m11,g.m12,g.m21,g.m22,g.dx,g.dy);for(var h=this.Fu,k=this.xb,l=a.Sb.length,g=0;g<l;g++){var m=a.Sb.n[g],n=b,p=k,q=h;void 0===q&&(q=!0);if(q||!m.yc)for(var m=m.Fb,q=this.scale,r=m.length,s=0;s<r;s++){var u=m.n[s],v=u.pa;v.Tf(p)&&(1<v.width*q||1<v.height*q?u.Ue(n,this):Rh(u,n))}}f.drawImage(c,0,0);e&&e.Sz&&(f.fillStyle="red",f.fillRect(0,d.height/2,d.width,4));a=this.Sb.n;c=this.Sb.length;for(g=0;g<c;g++)a[g].Ue(b,this);this.ve=this.Hk=!1}}};
  t.g(Xi,"observed",Xi.prototype.vJ);t.defineProperty(Xi,{vJ:"observed"},function(){return this.Gi},function(a){var b=this.Gi;null!==a&&t.l(a,z,Xi,"observed");b===a||a instanceof Xi||(null!==b&&(this.remove(this.vg),b.PF("ViewportBoundsChanged",this.JF),b.PF("DocumentBoundsChanged",this.IF),b.jm.remove(this)),this.Gi=a,null!==a&&(a.Kz("ViewportBoundsChanged",this.JF),a.Kz("DocumentBoundsChanged",this.IF),a.jm.add(this),this.add(this.vg),Zj(this)),this.Oc(),this.j("observed",b,a))});t.g(Xi,"box",Xi.prototype.vg);
  t.defineProperty(Xi,{vg:"box"},function(){return this.Il},function(a){var b=this.Il;b!==a&&(this.Il=a,this.remove(b),this.add(this.Il),Zj(this),this.j("box",b,a))});t.g(Xi,"drawsTemporaryLayers",Xi.prototype.DI);t.defineProperty(Xi,{DI:"drawsTemporaryLayers"},function(){return this.Fu},function(a){this.Fu!==a&&(this.Fu=a,this.TA())});
  function Zj(a){var b=a.vg;if(null!==b){var c=a.Gi;if(null!==c){a.ve=!0;var c=c.xb,d=b.Nt,f=t.Al();f.p(c.width,c.height);d.Ca=f;t.bk(f);a=2/a.scale;d instanceof W&&(d.fb=a);b.location=new w(c.x-a/2,c.y-a/2)}}}Xi.prototype.qf=function(){var a=this.Gi;return null===a?H.hH:a.Ed};Xi.prototype.Dt=function(a){this.Xb||(xi(this),this.ka(),Ii(this),this.Oc(),Zj(this),this.Ba("ViewportBoundsChanged",a))};function Yj(){ae.call(this);this.name="MoveBox"}t.Ka(Yj,ae);
  Yj.prototype.doStart=function(){this.ha=this.h.Kd=!0};Yj.prototype.doMouseMove=function(){if(this.ha){var a=this.h;if(null!==a&&null!==a.Gi){var b=a.Gi;if(null!==b){var c=b.xb,d=a.R.ea;b.position=new w(d.x-c.width/2,d.y-c.height/2);a.te()}}}};Yj.prototype.doMouseUp=function(){this.ha&&this.doMouseMove();this.stopTool()};Yj.prototype.doStop=function(){this.ha=!1;var a=this.h;null!==a&&(a.Kd=!1,Zj(a))};
  function fa(a){1<arguments.length&&t.m("Brush constructor can take at most one optional argument, the Brush type.");t.Ac(this);this.ob=!1;void 0===a?(this.da=Nd,this.zn="black"):"string"===typeof a?(this.da=Nd,e&&t.To("Brush constructor",a),this.zn=a):(e&&t.Aa(a,fa,fa,"constructor:type"),this.da=a,this.zn="black");var b=this.da;b===Od?(this.Ao=Fb,this.On=Mb):this.On=b===Zd?this.Ao=Kb:this.Ao=wb;this.Lv=0;this.Gu=NaN;this.Rg=this.xv=this.Qg=null;this.sy=this.ty=0}t.ga("Brush",fa);var Nd;
  fa.Solid=Nd=t.w(fa,"Solid",0);var Od;fa.Linear=Od=t.w(fa,"Linear",1);var Zd;fa.Radial=Zd=t.w(fa,"Radial",2);var ak;fa.Pattern=ak=t.w(fa,"Pattern",4);var ea;fa.isValidColor=ea=function(a){if("black"===a)return!0;if(""===a)return!1;e&&t.i(a,"string",fa,"isValidColor");var b=t.kn;b.fillStyle="#000000";var c=b.fillStyle;b.fillStyle=a;if(b.fillStyle!==c)return!0;b.fillStyle="#FFFFFF";c=b.fillStyle;b.fillStyle=a;return b.fillStyle!==c};
  fa.prototype.copy=function(){var a=new fa;a.da=this.da;a.zn=this.zn;a.Ao=this.Ao.Z();a.On=this.On.Z();a.Lv=this.Lv;a.Gu=this.Gu;null!==this.Qg&&(a.Qg=this.Qg.copy());a.xv=this.xv;return a};fa.prototype.Ja=function(){this.freeze();Object.freeze(this);return this};fa.prototype.freeze=function(){this.ob=!0;null!==this.Qg&&this.Qg.freeze();return this};fa.prototype.La=function(){Object.isFrozen(this)&&t.m("cannot thaw constant: "+this);this.ob=!1;null!==this.Qg&&this.Qg.La();return this};
  fa.prototype.toString=function(){var a="Brush(";if(this.type===Nd)a+=this.color;else if(a=this.type===Od?a+"Linear ":this.type===Zd?a+"Radial ":this.type===ak?a+"Pattern ":a+"(unknown) ",a+=this.start+" "+this.end,null!==this.Vo)for(var b=this.Vo.k;b.next();)a+=" "+b.key+":"+b.value;return a+")"};
  fa.prototype.addColorStop=fa.prototype.addColorStop=function(a,b){t.L(this);("number"!==typeof a||!isFinite(a)||1<a||0>a)&&t.la(a,"0 <= loc <= 1",fa,"addColorStop:loc");t.i(b,"string",fa,"addColorStop:color");null===this.Qg&&(this.Qg=new ja("number","string"));this.Qg.add(a,b);this.da===Nd&&(this.type=Od);this.Rg=null};t.g(fa,"type",fa.prototype.type);
  t.defineProperty(fa,{type:"type"},function(){return this.da},function(a){t.L(this,a);t.Aa(a,fa,fa,"type");this.da=a;this.start.Ge()&&(a===Od?this.start=Fb:a===Zd&&(this.start=Kb));this.end.Ge()&&(a===Od?this.end=Mb:a===Zd&&(this.end=Kb));this.Rg=null});t.g(fa,"color",fa.prototype.color);t.defineProperty(fa,{color:"color"},function(){return this.zn},function(a){t.L(this,a);t.i(a,"string",fa,"color");this.zn=a;this.Rg=null});t.g(fa,"start",fa.prototype.start);
  t.defineProperty(fa,{start:"start"},function(){return this.Ao},function(a){t.L(this,a);a instanceof I||t.bc(a,"Spot",fa,"start");this.Ao=a.Z();this.Rg=null});t.g(fa,"end",fa.prototype.end);t.defineProperty(fa,{end:"end"},function(){return this.On},function(a){t.L(this,a);a instanceof I||t.bc(a,"Spot",fa,"end");this.On=a.Z();this.Rg=null});t.g(fa,"startRadius",fa.prototype.Vp);
  t.defineProperty(fa,{Vp:"startRadius"},function(){return this.Lv},function(a){t.L(this,a);t.q(a,fa,"startRadius");0>a&&t.la(a,">= zero",fa,"startRadius");this.Lv=a;this.Rg=null});t.g(fa,"endRadius",fa.prototype.ap);t.defineProperty(fa,{ap:"endRadius"},function(){return this.Gu},function(a){t.L(this,a);t.q(a,fa,"endRadius");0>a&&t.la(a,">= zero",fa,"endRadius");this.Gu=a;this.Rg=null});t.g(fa,"colorStops",fa.prototype.Vo);
  t.defineProperty(fa,{Vo:"colorStops"},function(){return this.Qg},function(a){t.L(this,a);e&&t.l(a,ja,fa,"colorStops");this.Qg=a;this.Rg=null});t.g(fa,"pattern",fa.prototype.pattern);t.defineProperty(fa,{pattern:"pattern"},function(){return this.xv},function(a){t.L(this,a);this.xv=a;this.Rg=null});
  fa.randomColor=function(a,b){void 0===a&&(a=128);e&&(t.q(a,fa,"randomColor:min"),(0>a||255<a)&&t.la(a,"0 <= min <= 255",fa,"randomColor:min"));void 0===b&&(b=Math.max(a,255));e&&(t.q(b,fa,"randomColor:max"),(b<a||255<b)&&t.la(b,"min <= max <= 255",fa,"randomColor:max"));var c=Math.abs(b-a),d=Math.floor(a+Math.random()*c).toString(16),f=Math.floor(a+Math.random()*c).toString(16),c=Math.floor(a+Math.random()*c).toString(16);2>d.length&&(d="0"+d);2>f.length&&(f="0"+f);2>c.length&&(c="0"+c);return"#"+
  d+f+c};
  function Q(){t.Ac(this);this.ma=30723;this.Lf=1;this.Ii=null;this.Yb="";this.tc=this.Lb=null;this.Ma=(new w(NaN,NaN)).freeze();this.jf=(new ga(NaN,NaN)).freeze();this.Fj=H.gq;this.Ej=H.gH;this.md=new ha;this.jk=new ha;this.Lk=new ha;this.wc=1;this.wn=0;this.Ph=Vg;this.sr=H.fq;this.Wc=(new x(NaN,NaN,NaN,NaN)).freeze();this.cc=(new x(NaN,NaN,NaN,NaN)).freeze();this.hd=(new x(0,0,NaN,NaN)).freeze();this.ys=this.Nq=this.P=this.Nr=this.Pr=null;this.zs=this.Oq=Infinity;this.mq=this.ue=xb;this.as=0;this.Kj=
  1;this.tq=0;this.sj=1;this.es=-Infinity;this.ds=0;this.fs=H.nj;this.gs=yg;this.Aq="";this.lm=this.oi=this.Kl=this.Kc=this.Q=null}t.ga("GraphObject",Q);t.Yh(Q);
  Q.prototype.cloneProtected=function(a){a.ma=this.ma|6144;a.Lf=this.Lf;a.Yb=this.Yb;a.Lb=this.Lb;a.tc=this.tc;a.Ma.assign(this.Ma);a.jf.assign(this.jf);a.Fj=this.Fj.Z();a.Ej=this.Ej.Z();a.Lk=this.Lk.copy();a.wc=this.wc;a.wn=this.wn;a.Ph=this.Ph;a.sr=this.sr.Z();a.Wc.assign(this.Wc);a.cc.assign(this.cc);a.hd.assign(this.hd);a.Nr=this.Nr;if(null!==this.P){var b=this.P;a.P={Eh:b.Eh.Z(),Uh:b.Uh.Z(),Bh:b.Bh,Rh:b.Rh,Ah:b.Ah,Qh:b.Qh,Dh:b.Dh,Th:b.Th}}else a.P=null;a.Nq=this.Nq;a.Oq=this.Oq;a.ys=this.ys;a.zs=
  this.zs;a.ue=this.ue.Z();a.mq=this.mq.Z();a.as=this.as;a.Kj=this.Kj;a.tq=this.tq;a.sj=this.sj;a.es=this.es;a.ds=this.ds;a.fs=this.fs.Z();a.gs=this.gs;a.Aq=this.Aq;null!==this.Q?(b=this.Q,a.Q={ni:b.ni,ti:b.ti,pi:b.pi,Dr:b.Dr,Er:b.Er,Ei:b.Ei,Di:b.Di,Ci:b.Ci,Br:b.Br,Cr:b.Cr,Bi:b.Bi,iq:b.iq,jq:b.jq,kq:b.kq,hq:b.hq,Oi:b.Oi,qi:b.qi}):a.Q=null;a.Kc=this.Kc;if(Array.isArray(this.Kl))for(a.Kl=this.Kl.slice(0),b=0;b<this.Kl.length;b++){var c=this.Kl[b];a[c]=this[c]}null!==this.oi&&(a.oi=this.oi.copy())};
  Q.prototype.Zh=function(a){a.Pr=null;a.lm=null;a.fa()};Q.prototype.copy=function(){var a=new this.constructor;this.cloneProtected(a);return a};Q.prototype.toString=function(){return t.xg(Object.getPrototypeOf(this))+"#"+t.od(this)};var Ug;Q.None=Ug=t.w(Q,"None",0);var Vg;Q.Default=Vg=t.w(Q,"Default",0);var bk;Q.Vertical=bk=t.w(Q,"Vertical",4);var ck;Q.Horizontal=ck=t.w(Q,"Horizontal",5);var Cc;Q.Fill=Cc=t.w(Q,"Fill",3);var Wg;Q.Uniform=Wg=t.w(Q,"Uniform",1);var Xg;
  Q.UniformToFill=Xg=t.w(Q,"UniformToFill",2);function dk(a){a.Q={ni:null,ti:null,pi:null,Dr:null,Er:null,Ei:null,Di:null,Ci:null,Br:null,Cr:null,Bi:null,iq:null,jq:null,kq:null,hq:null,Oi:null,qi:null}}aa=Q.prototype;aa.Fe=function(){this.P={Eh:wb,Uh:wb,Bh:10,Rh:10,Ah:ek,Qh:ek,Dh:0,Th:0}};
  function fk(a,b,c,d,f,g,h){var k=0.001,l=g.length;a.moveTo(b,c);d-=b;k=f-c;0===d&&(d=0.001);f=k/d;for(var m=Math.sqrt(d*d+k*k),n=0,p=!0,q=0===h?!1:!0;0.1<=m;){if(q){k=g[n++%l];for(k-=h;0>k;)k+=g[n++%l],p=!p;q=!1}else k=g[n++%l];k>m&&(k=m);var r=Math.sqrt(k*k/(1+f*f));0>d&&(r=-r);b+=r;c+=f*r;p?a.lineTo(b,c):a.moveTo(b,c);m-=k;p=!p}}aa.Ic=function(a,b,c,d,f,g,h){var k=this.S;null!==k&&(k.fn(a,b,c,d,f,g,h),0!==(this.ma&1024)&&c===this&&a===vd&&gk(this,k,b))};
  function gk(a,b,c){var d=a.ep();if(null!==d)for(var f=a.Kc.k;f.next();){var g=f.value,h=g.St;if(null!==h){var k=d.oe(h);if(null===k)continue;g.pB(a,k,c,null)}else{k=d.data;if(null===k)continue;var l=b.h;null!==l&&l.Rt||g.pB(a,k,c,l)}null!==h&&(k=d,""!==h&&(k=d.oe(h)),null!==k&&(h=g.nn,l=d,""!==h&&(l=d.oe(h)),null!==l&&g.QG(l,k,c)))}}aa.j=function(a,b,c){this.Ic(vd,a,this,b,c)};
  function hk(a,b,c,d,f){var g=a.Wc,h=a.Lk;h.reset();ik(a,h,b,c,d,f);a.Lk=h;g.x=b;g.y=c;g.width=d;g.height=f;h.pt()||h.KG(g)}function jk(a,b,c,d){if(!1===a.Bf)return!1;d.multiply(a.transform);return c?a.Tf(b,d):a.Im(b,d)}
  aa.CE=function(a,b,c){if(!1===this.Bf)return!1;var d=this.Ra;b=a.Zj(b);var f=!1;c&&(f=Ra(a.x,a.y,0,0,0,d.height)<b||Ra(a.x,a.y,0,d.height,d.width,d.height)<b||Ra(a.x,a.y,d.width,d.height,d.width,0)<b||Ra(a.x,a.y,d.width,0,0,0)<b);c||(f=Ra(a.x,a.y,0,0,0,d.height)<b&&Ra(a.x,a.y,0,d.height,d.width,d.height)<b&&Ra(a.x,a.y,d.width,d.height,d.width,0)<b&&Ra(a.x,a.y,d.width,0,0,0)<b);return f};aa.Hf=function(){return!0};
  Q.prototype.containsPoint=Q.prototype.Ga=function(a){e&&t.l(a,w,Q,"containsPoint:p");var b=t.K();b.assign(a);this.transform.Ta(b);var c=this.pa;if(!c.N())return!1;if(t.iB){var d=this.Ra,f=this.dk()*(null!==this.h?this.h.scale:1),g=1/f;if(10>d.width*f&&10>d.height*f)return a=mb(c.x-5*g,c.y-5*g,c.width+10*g,c.height+10*g,b.x,b.y),t.B(b),a}if(void 0!==this.oc||this instanceof W?mb(c.x-5,c.y-5,c.width+10,c.height+10,b.x,b.y):c.Ga(b)){if(this.oi&&!this.oi.Ga(b))return!1;if(null!==this.tc&&c.Ga(b)||null!==
  this.Lb&&this.hd.Ga(a))return!0;t.B(b);return this.Vj(a)}t.B(b);return!1};Q.prototype.Vj=function(a){var b=this.Ra;return mb(0,0,b.width,b.height,a.x,a.y)};
  Q.prototype.containsRect=Q.prototype.Wj=function(a){e&&t.l(a,x,Q,"containsRect:r");if(0===this.angle)return this.pa.Wj(a);var b=this.Ra,b=t.hk(0,0,b.width,b.height),c=this.transform,d=!1,f=t.lc(a.x,a.y);b.Ga(c.bi(f))&&(f.p(a.x,a.bottom),b.Ga(c.bi(f))&&(f.p(a.right,a.bottom),b.Ga(c.bi(f))&&(f.p(a.right,a.y),b.Ga(c.bi(f))&&(d=!0))));t.B(f);t.hc(b);return d};
  Q.prototype.containedInRect=Q.prototype.Im=function(a,b){e&&t.l(a,x,Q,"containedInRect:r");if(void 0===b)return a.Wj(this.pa);var c=this.Ra,d=!1,f=t.lc(0,0);a.Ga(b.Ta(f))&&(f.p(0,c.height),a.Ga(b.Ta(f))&&(f.p(c.width,c.height),a.Ga(b.Ta(f))&&(f.p(c.width,0),a.Ga(b.Ta(f))&&(d=!0))));return d};
  Q.prototype.intersectsRect=Q.prototype.Tf=function(a,b){e&&t.l(a,x,Q,"intersectsRect:r");if(void 0===b&&(b=this.transform,0===this.angle))return a.Tf(this.pa);var c=this.Ra,d=b,f=t.lc(0,0),g=t.lc(0,c.height),h=t.lc(c.width,c.height),k=t.lc(c.width,0),l=!1;if(a.Ga(d.Ta(f))||a.Ga(d.Ta(g))||a.Ga(d.Ta(h))||a.Ga(d.Ta(k)))l=!0;else{var c=t.hk(0,0,c.width,c.height),m=t.lc(a.x,a.y);c.Ga(d.bi(m))?l=!0:(m.p(a.x,a.bottom),c.Ga(d.bi(m))?l=!0:(m.p(a.right,a.bottom),c.Ga(d.bi(m))?l=!0:(m.p(a.right,a.y),c.Ga(d.bi(m))&&
  (l=!0))));t.B(m);t.hc(c);!l&&(H.Ow(a,f,g)||H.Ow(a,g,h)||H.Ow(a,h,k)||H.Ow(a,k,f))&&(l=!0)}t.B(f);t.B(g);t.B(h);t.B(k);return l};Q.prototype.getDocumentPoint=Q.prototype.qb=function(a,b){void 0===b&&(b=new w);a.Ge()&&t.m("getDocumentPoint:s Spot must be real: "+a.toString());var c=this.Ra;b.p(a.x*c.width+a.offsetX,a.y*c.height+a.offsetY);this.me.Ta(b);return b};Q.prototype.getDocumentAngle=Q.prototype.gl=function(){var a=this.me,a=180/Math.PI*Math.atan2(a.m12,a.m11);0>a&&(a+=360);return a};
  Q.prototype.getDocumentScale=Q.prototype.dk=function(){var a=this.wc;return null!==this.ia?a*this.ia.dk():a};Q.prototype.getLocalPoint=Q.prototype.KE=function(a,b){void 0===b&&(b=new w);b.assign(a);this.me.bi(b);return b};Q.prototype.getNearestIntersectionPoint=Q.prototype.kl=function(a,b,c){return this.kp(a.x,a.y,b.x,b.y,c)};aa=Q.prototype;
  aa.kp=function(a,b,c,d,f){var g=this.transform,h=1/(g.m11*g.m22-g.m12*g.m21),k=g.m22*h,l=-g.m12*h,m=-g.m21*h,n=g.m11*h,p=h*(g.m21*g.dy-g.m22*g.dx),q=h*(g.m12*g.dx-g.m11*g.dy);if(null!==this.Zk)return g=this.pa,H.kl(g.left,g.top,g.right,g.bottom,a,b,c,d,f);h=a*k+b*m+p;a=a*l+b*n+q;b=c*k+d*m+p;c=c*l+d*n+q;f.p(0,0);d=this.Ra;c=H.kl(0,0,d.width,d.height,h,a,b,c,f);f.transform(g);return c};
  function hh(a,b,c,d,f){if(!1!==Oi(a)){var g=a.margin,h=g.top+g.bottom;b=Math.max(b-(g.right+g.left),0);c=Math.max(c-h,0);g=a.angle;if(90===g||270===g)g=b,b=c,c=g,g=d,d=f,f=g;g=a.Ca;h=0;a.fb&&(h=a.fb);b=isFinite(g.width)?g.width+h:b;c=isFinite(g.height)?g.height+h:c;var g=d||0,h=f||0,k=a instanceof y;switch(kk(a)){case Ug:h=g=0;k&&(c=b=Infinity);break;case Cc:isFinite(b)&&b>d&&(g=b);isFinite(c)&&c>f&&(h=c);break;case ck:isFinite(b)&&b>d&&(g=b);h=0;k&&(c=Infinity);break;case bk:isFinite(c)&&c>f&&(h=
  c),g=0,k&&(b=Infinity)}var k=a.He,l=a.Vf;g>k.width&&l.width<k.width&&(g=k.width);h>k.height&&l.height<k.height&&(h=k.height);d=Math.max(g/a.scale,l.width);f=Math.max(h/a.scale,l.height);k.width<d&&(d=Math.min(l.width,d));k.height<f&&(f=Math.min(l.height,f));b=Math.min(k.width,b);c=Math.min(k.height,c);b=Math.max(d,b);c=Math.max(f,c);a.Wc.La();a.tt(b,c,d,f);a.Wc.freeze();a.Wc.N()||t.m("Non-real measuredBounds has been set. Object "+a+", measuredBounds: "+a.Wc.toString());lk(a,!1)}}
  aa.Lc=function(a,b,c,d,f){mk(this);var g=t.Gf();g.assign(this.cc);this.cc.La();if(!1===Pi(this)){var h=this.cc;h.x=a;h.y=b;h.width=c;h.height=d}else this.Uj(a,b,c,d);this.cc.freeze();this.oi=void 0===f?null:f;c=!1;void 0!==f?c=!0:this.ia&&(f=this.ia.hd,d=this.Ea,null!==this.Zk&&(d=this.cc),c=b+d.height,d=a+d.width,c=!(0<=a+0.05&&d<=f.width+0.05&&0<=b+0.05&&c<=f.height+0.05),this instanceof na&&(a=this.hd,this.cv>a.height||this.no.Ag>a.width))&&(c=!0);this.ma=c?this.ma|256:this.ma&-257;this.cc.N()||
  t.m("Non-real actualBounds has been set. Object "+this+", actualBounds: "+this.cc.toString());nk(this,g,this.cc);t.hc(g)};aa.Uj=function(){};
  function ok(a,b,c,d,f){var g=a.pa;g.x=b;g.y=c;g.width=d;g.height=f;if(!a.Ca.N()){g=a.Wc;c=a.margin;b=c.right+c.left;var h=c.top+c.bottom;c=g.width+b;g=g.height+h;d+=b;f+=h;b=kk(a);c===d&&g===f&&(b=Ug);switch(b){case Ug:if(c>d||g>f)lk(a,!0),hh(a,c>d?d:c,g>f?f:g);break;case Cc:lk(a,!0);hh(a,d,f,0,0);break;case ck:lk(a,!0);hh(a,d,g,0,0);break;case bk:lk(a,!0),hh(a,c,f,0,0)}}}
  function nk(a,b,c){pk(a,!1);var d=a.S;if(null!==d){var f=d.h;if(null!==f)if(qk(d),a instanceof E){var g=!1,d=b.N();if(!1===f.wi){var h=f.Ed,k=f.padding,l=h.x+k.left,m=h.y+k.top,n=h.width-2*k.right,h=h.height-2*k.bottom;d&&b.x>l&&b.y>m&&b.right<n&&b.bottom<h&&c.x>l&&c.y>m&&c.right<n&&c.bottom<h&&(g=!0)}0!==(a.W&65536)!==!0&&b.M(c)||bj(a,g,f);f.qz&&null!==f.uj?(g=null,d&&(g=t.Gf(),Th(a,b,g)),f.ka(c.N()?Th(a,c):null,g),null!==g&&t.hc(g)):f.ka()}else rk(a,d),a.ka(),b=a.S,null!==b&&(b.Nt!==a&&b.XF!==a&&
  b.bG!==a||sk(b,!0))}}function rk(a,b){null!==a.Nd&&sk(b,!0);if(a instanceof y)for(var c=a.xa,d=c.length,f=0;f<d;f++)rk(c.n[f],b)}
  aa.Ue=function(a,b){if(this.visible){var c=this.opacity,d=1;if(1!==c){if(0===c)return;d=a.globalAlpha;a.globalAlpha=d*c}if(a instanceof nc)a:{if(this.visible){var f=null,g=a.Vw;if(this instanceof y&&(this.type===tk||this.type===uk))vk(this,a,b);else{var h=this.cc;if(0!==h.width&&0!==h.height&&!isNaN(h.x)&&!isNaN(h.y)){var k=this.transform,l=this.ia,m=this.jk;m.reset();null!==l&&(l.Hf()?m.multiply(l.me):null!==l.ia&&m.multiply(l.ia.me));m.multiply(this.md);var m=0!==(this.ma&256),n=!1;this instanceof
  na&&wk(this,a);if(m){n=l.Hf()?l.Ra:l.pa;if(this.oi)var p=this.oi,q=p.x,r=p.y,s=p.width,p=p.height;else q=Math.max(h.x,n.x),r=Math.max(h.y,n.y),s=Math.min(h.right,n.right)-q,p=Math.min(h.bottom,n.bottom)-r;if(q>h.width+h.x||h.x>n.width+n.x||r>h.height+h.y||h.y>n.height+n.y)break a;n=!0;rc(a,1,0,0,1,0,0);a.save();a.beginPath();a.rect(q,r,s,p);a.clip()}q=!1;if(this instanceof E&&(q=!0,!this.Qa()))break a;r=!1;s=b.Rk;this.S&&s.drawShadows&&(r=this.S.gj);a.Zi.cf=[1,0,0,1,0,0];null!==this.tc&&(xk(this,
  a,this.tc,!0,!0),this.tc instanceof fa&&this.tc.type===Zd?(a.beginPath(),a.rect(h.x,h.y,h.width,h.height),yk(a,this.tc,!0)):a.fillRect(h.x,h.y,h.width,h.height));q&&this.gj&&s.drawShadows&&(rc(a,1,0,0,1,0,0),h=this.um,a.shadowOffsetX=h.x,a.shadowOffsetY=h.y,a.shadowColor=this.tm,a.shadowBlur=this.sm/b.scale,a.bb());this instanceof y?rc(a,k.m11,k.m12,k.m21,k.m22,k.dx,k.dy):a.Zi.cf=[k.m11,k.m12,k.m21,k.m22,k.dx,k.dy];if(null!==this.Lb){var p=this.Ra,h=k=0,s=p.width,p=p.height,u=0;this instanceof W&&
  (p=this.Oa.Ob,k=p.x,h=p.y,s=p.width,p=p.height,u=this.bh);xk(this,a,this.Lb,!0);this.Lb instanceof fa&&this.Lb.type===Zd?(a.beginPath(),a.rect(k-u/2,h-u/2,s+u,p+u),yk(a,this.Lb,!0)):a.fillRect(k-u/2,h-u/2,s+u,p+u)}if(r&&(null!==this.Lb||null!==this.tc||null!==l&&0!==(l.ma&512)||null!==l&&l.type===ci&&l.Dw()!==this)){zk(this,!0);var v=[a.shadowOffsetX,a.shadowOffsetY,a.shadowBlur];a.shadowOffsetX=0;a.shadowOffsetY=0;a.shadowBlur=0}else zk(this,!1);this.el(a,b);r&&0!==(this.ma&512)===!0&&(a.shadowOffsetX=
  v[0],a.shadowOffsetY=v[1],a.shadowBlur=v[2]);q&&r&&(a.shadowOffsetX=0,a.shadowOffsetY=0,a.shadowBlur=0);m?(a.restore(),n&&a.vf.pop(),ui(b,a)):this instanceof y&&(f=a.vf.pop());q&&r&&a.vf.pop();null!==a.yE&&(null===f&&(g===a.Vw?(rc(a,1,0,0,1,0,0),v=a.vf.pop()):v=a.Vw,f=v),a.yE(this,f))}}}}else if(this instanceof y&&(this.type===tk||this.type===uk))vk(this,a,b);else if(m=this.cc,0!==m.width&&0!==m.height&&!isNaN(m.x)&&!isNaN(m.y)){v=this.transform;g=this.ia;l=this.jk;l.reset();null!==g&&(g.Hf()?l.multiply(g.me):
  null!==g.ia&&l.multiply(g.ia.me));l.multiply(this.md);l=0!==(this.ma&256);this instanceof na&&wk(this,a);if(l){e&&e.CI&&t.trace("clip"+this.toString());n=g.Hf()?g.Ra:g.pa;this.oi?(r=this.oi,k=r.x,h=r.y,q=r.width,r=r.height):(k=Math.max(m.x,n.x),h=Math.max(m.y,n.y),q=Math.min(m.right,n.right)-k,r=Math.min(m.bottom,n.bottom)-h);if(k>m.width+m.x||m.x>n.width+n.x||h>m.height+m.y||m.y>n.height+n.y){1!==c&&(a.globalAlpha=d);return}a.save();a.beginPath();a.rect(k,h,q,r);a.clip()}h=b.Rk;n=!1;if(this instanceof
  E){n=!0;if(!this.Qa()){1!==c&&(a.globalAlpha=d);return}this.gj&&h.drawShadows&&(k=this.um,a.shadowOffsetX=k.x*b.scale,a.shadowOffsetY=k.y*b.scale,a.shadowColor=this.tm,a.shadowBlur=this.sm)}k=!1;this.S&&h.drawShadows&&(k=this.S.gj);null!==this.tc&&(xk(this,a,this.tc,!0,!0),this.tc instanceof fa&&this.tc.type===Zd?(a.beginPath(),a.rect(m.x,m.y,m.width,m.height),yk(a,this.tc,!0)):a.fillRect(m.x,m.y,m.width,m.height));v.pt()||a.transform(v.m11,v.m12,v.m21,v.m22,v.dx,v.dy);null!==this.Lb&&(r=this.Ra,
  h=m=0,q=r.width,r=r.height,s=0,this instanceof W&&(r=this.Oa.Ob,m=r.x,h=r.y,q=r.width,r=r.height,s=this.bh),xk(this,a,this.Lb,!0),this.Lb instanceof fa&&this.Lb.type===Zd?(a.beginPath(),a.rect(m-s/2,h-s/2,q+s,r+s),yk(a,this.Lb,!0)):a.fillRect(m-s/2,h-s/2,q+s,r+s));k&&(null!==this.Lb||null!==this.tc||null!==g&&0!==(g.ma&512)||null!==g&&(g.type===ci||g.type===Sg)&&g.Dw()!==this)?(zk(this,!0),f=[a.shadowOffsetX,a.shadowOffsetY,a.shadowBlur],a.shadowOffsetX=0,a.shadowOffsetY=0,a.shadowBlur=0):zk(this,
  !1);this.el(a,b);k&&0!==(this.ma&512)===!0&&(a.shadowOffsetX=f[0],a.shadowOffsetY=f[1],a.shadowBlur=f[2]);n&&k&&(a.shadowOffsetX=0,a.shadowOffsetY=0,a.shadowBlur=0);l?(a.restore(),this instanceof y?ui(b,a,!0):ui(b,a,!1)):v.pt()||(f=1/(v.m11*v.m22-v.m12*v.m21),a.transform(v.m22*f,-v.m12*f,-v.m21*f,v.m11*f,f*(v.m21*v.dy-v.m22*v.dx),f*(v.m12*v.dx-v.m11*v.dy)))}1!==c&&(a.globalAlpha=d)}};
  function vk(a,b,c){var d=a.cc;0===d.width||0===d.height||isNaN(d.x)||isNaN(d.y)||(null!==a.tc&&(xk(a,b,a.tc,!0,!0),a.tc instanceof fa&&a.tc.type===Zd?(b.beginPath(),b.rect(d.x,d.y,d.width,d.height),yk(b,a.tc,!0)):b.fillRect(d.x,d.y,d.width,d.height)),null!==a.Lb&&(xk(a,b,a.Lb,!0),a.Lb instanceof fa&&a.Lb.type===Zd?(b.beginPath(),b.rect(d.x,d.y,d.width,d.height),yk(b,a.Lb,!0)):b.fillRect(d.x,d.y,d.width,d.height)),a.el(b,c))}aa.el=function(){};
  function yk(a,b,c){if(c)if(a instanceof CanvasRenderingContext2D&&b instanceof fa&&b.type===Zd){var d=b.ty;b=b.sy;b>d?(a.scale(d/b,1),a.translate((b-d)/2,0),c?a.fill():a.stroke(),a.translate(-(b-d)/2,0),a.scale(1/(d/b),1)):d>b?(a.scale(1,b/d),a.translate(0,(d-b)/2),c?a.fill():a.stroke(),a.translate(0,-(d-b)/2),a.scale(1,1/(b/d))):c?a.fill():a.stroke()}else c?a.fill():a.stroke();else a.stroke()}
  function xk(a,b,c,d,f){if(null!==c){var g=1,h=1;if("string"===typeof c)d?b.rn!==c&&(b.fillStyle=c,b.rn=c):b.sn!==c&&(b.strokeStyle=c,b.sn=c);else if(c.type===Nd)c=c.color,d?b.rn!==c&&(b.fillStyle=c,b.rn=c):b.sn!==c&&(b.strokeStyle=c,b.sn=c);else{var k,h=a.Ra,g=h.width,h=h.height;if(f)var l=a.pa,g=l.width,h=l.height;var m=b instanceof CanvasRenderingContext2D;if(m&&(c.Rg&&c.type===ak||c.ty===g&&c.sy===h))k=c.Rg;else{var n,p,q=p=0;f&&(l=a.pa,g=l.width,h=l.height,p=l.x,q=l.y);c.start instanceof w?(a=
  c.start.x,f=c.start.y):c.start instanceof I?(a=c.start.x*g+c.start.offsetX,f=c.start.y*h+c.start.offsetY):(a=Kb.x*g+c.start.offsetX,f=Kb.y*h+c.start.offsetY);c.end instanceof w?(l=c.end.x,n=c.end.y):c.end instanceof I?(l=c.end.x*g+c.end.offsetX,n=c.end.y*h+c.end.offsetY):c.type===Od?(l=Mb.x*g+c.end.offsetX,n=Mb.y*h+c.end.offsetY):(l=Kb.x*g+c.end.offsetX,n=Kb.y*h+c.end.offsetY);a+=p;l+=p;f+=q;n+=q;c.type===Od?k=b.createLinearGradient(a,f,l,n):c.type===Zd?(p=isNaN(c.ap)?Math.max(g,h)/2:c.ap,isNaN(c.Vp)?
  (k=0,p=Math.max(g,h)/2):k=c.Vp,k=b.createRadialGradient(a,f,k,l,n,p)):c.type===ak?k=b.createPattern(c.pattern,"repeat"):t.bc(c.type,"Brush type");if(c.type!==ak&&(p=c.Vo))for(p=p.k;p.next();)k.addColorStop(p.key,p.value);m&&(c.Rg=k,c.ty=g,c.sy=h)}d?b.rn!==k&&(b.fillStyle=k,b.rn=k):b.sn!==k&&(b.strokeStyle=k,b.sn=k)}}}Q.prototype.isContainedBy=Q.prototype.ej=function(a){if(a instanceof y)a:{if(this!==a&&null!==a)for(var b=this.ia;null!==b;){if(b===a){a=!0;break a}b=b.ia}a=!1}else a=!1;return a};
  Q.prototype.isVisibleObject=Q.prototype.ol=function(){if(!this.visible)return!1;var a=this.ia;return null!==a?a.ol():!0};
  function Ak(a){if(0!==(a.ma&2048)===!0){var b=a.md;b.reset();if(!a.cc.N()||!a.Wc.N()){Bk(a,!1);return}b.translate(a.cc.x,a.cc.y);b.translate(-a.Ea.x,-a.Ea.y);var c=a.Ra;ik(a,b,c.x,c.y,c.width,c.height);Bk(a,!1);Ck(a,!0)}0!==(a.ma&4096)===!0&&(b=a.ia,null===b?(a.jk.set(a.md),Ck(a,!1)):null!==b.me&&(c=a.jk,c.reset(),b.Hf()?c.multiply(b.jk):null!==b.ia&&c.multiply(b.ia.jk),c.multiply(a.md),Ck(a,!1)))}
  function ik(a,b,c,d,f,g){1!==a.scale&&b.scale(a.scale);if(0!==a.angle){var h=Kb;a.bf&&a.bf.vd()&&(h=a.bf);var k=t.K();if(a instanceof E&&a.kc!==a)for(c=a.kc,d=c.Ra,k.Pt(d.x,d.y,d.width,d.height,h),c.Lk.Ta(k),k.offset(-c.Ea.x,-c.Ea.y),h=c.ia;null!==h&&h!==a;)h.Lk.Ta(k),k.offset(-h.Ea.x,-h.Ea.y),h=h.ia;else k.Pt(c,d,f,g,h);b.rotate(a.angle,k.x,k.y);t.B(k)}}
  Q.prototype.fa=function(a){if(!0!==Oi(this)){lk(this,!0);pk(this,!0);var b=this.ia;null!==b?a||b.fa():(a=this.h,null!==a&&(this.Qa()&&a.fg.add(this),this instanceof S&&(a.ja.sb||this.wf(),null!==this.$d&&Dk(this.$d)),a.te()));if(this instanceof y){var c=null;a=this.xa;b=a.length;this.da===ci&&(c=Ek(this,a,b))&&c.fa(!0);a=a.n;for(c=0;c<b;c++){var d=a[c];!0!==Oi(d)&&(d.Ca.N()||(d instanceof Tg||d instanceof y||d instanceof na||kk(d)!==Ug)&&d.fa(!0))}}}};
  function Fk(a){if(!1===Oi(a)&&(lk(a,!0),pk(a,!0),a instanceof y)){a=a.xa.n;for(var b=a.length,c=0;c<b;c++)Fk(a[c])}}function Dk(a){if(!1===Pi(a)){if(null!==a.ia)a.ia.fa();else{var b=a.h;null!==b&&(a.Qa()&&b.fg.add(a),a instanceof S&&a.wf(),b.te())}pk(a,!0)}}function mk(a){if(0!==(a.ma&2048)===!1&&(Bk(a,!0),Ck(a,!0),a instanceof y)){a=a.xa.n;for(var b=a.length,c=0;c<b;c++)Gk(a[c])}}function Gk(a){Ck(a,!0);if(a instanceof y){a=a.xa.n;for(var b=a.length,c=0;c<b;c++)Gk(a[c])}}
  Q.prototype.ka=function(){if(this instanceof E){var a=this.h;null!==a&&!Pi(this)&&!Qi(this)&&this.Qa()&&this.cc.N()&&a.ka(Th(this,this.cc))}else null!==this.S&&this.S.ka()};function kk(a){var b=a.gi,c=a.ia;if(c&&c.da===Hk)return Ik(a,c.Hd(a.qc),c.Gd(a.column));if(c&&c.da===ci&&c.Dw()===a)return Cc;if(b===Vg){if(c){c.da===Sg&&null===c.Eo&&(b=c.xa,Ek(c,b,b.length));if(c.Eo===a)return Cc;a=c.$z;return a===Vg?Ug:a}return Ug}return b}
  function Ik(a,b,c){var d=a.gi;if(d!==Vg)return d;var f=d=void 0;switch(b.gi){case bk:f=!0;break;case Cc:f=!0}switch(c.gi){case ck:d=!0;break;case Cc:d=!0}a=a.ia.$z;d=void 0!==d||a!==ck&&a!==Cc?!1:!0;f=void 0!==f||a!==bk&&a!==Cc?!1:!0;return!0===d&&!0===f?Cc:!0===d?ck:!0===f?bk:Ug}t.g(Q,"segmentOrientation",Q.prototype.Mt);
  t.defineProperty(Q,{Mt:"segmentOrientation"},function(){return this.gs},function(a){var b=this.gs;b!==a&&(e&&t.Aa(a,V,Q,"segmentOrientation"),this.gs=a,this.fa(),this.j("segmentOrientation",b,a))});t.g(Q,"segmentIndex",Q.prototype.Cf);t.defineProperty(Q,{Cf:"segmentIndex"},function(){return this.es},function(a){e&&t.i(a,"number",Q,"segmentIndex");a=Math.round(a);var b=this.es;b!==a&&(this.es=a,this.fa(),this.j("segmentIndex",b,a))});t.g(Q,"segmentFraction",Q.prototype.Lt);
  t.defineProperty(Q,{Lt:"segmentFraction"},function(){return this.ds},function(a){e&&t.i(a,"number",Q,"segmentFraction");isNaN(a)?a=0:0>a?a=0:1<a&&(a=1);var b=this.ds;b!==a&&(this.ds=a,this.fa(),this.j("segmentFraction",b,a))});t.g(Q,"segmentOffset",Q.prototype.$A);t.defineProperty(Q,{$A:"segmentOffset"},function(){return this.fs},function(a){var b=this.fs;b.M(a)||(e&&t.l(a,w,Q,"segmentOffset"),this.fs=a=a.Z(),this.fa(),this.j("segmentOffset",b,a))});t.g(Q,"stretch",Q.prototype.gi);
  t.defineProperty(Q,{gi:"stretch"},function(){return this.Ph},function(a){var b=this.Ph;b!==a&&(e&&t.Aa(a,Q,Q,"stretch"),this.Ph=a,this.fa(),this.j("stretch",b,a))});t.g(Q,"name",Q.prototype.name);t.defineProperty(Q,{name:"name"},function(){return this.Yb},function(a){var b=this.Yb;b!==a&&(e&&t.i(a,"string",Q,"name"),this.Yb=a,this.S&&(this.S.Gj=null),this.j("name",b,a))});t.g(Q,"opacity",Q.prototype.opacity);
  t.defineProperty(Q,{opacity:"opacity"},function(){return this.Lf},function(a){var b=this.Lf;b!==a&&(t.i(a,"number",Q,"opacity"),(0>a||1<a)&&t.la(a,"0 <= val <= 1",Q,"opacity"),this.Lf=a,this.j("opacity",b,a),a=this.h,b=this.S,null!==a&&null!==b&&a.ka(Th(b,b.pa)))});t.g(Q,"visible",Q.prototype.visible);
  t.defineProperty(Q,{visible:"visible"},function(){return 0!==(this.ma&1)},function(a){var b=0!==(this.ma&1);b!==a&&(e&&t.i(a,"boolean",Q,"visible"),this.ma^=1,this.j("visible",b,a),b=this.ia,null!==b?b.fa():this instanceof E&&(this.h&&this.h.ka(),qk(this),this.df(a)),this.ka(),Jk(this))});t.g(Q,"pickable",Q.prototype.Bf);t.defineProperty(Q,{Bf:"pickable"},function(){return 0!==(this.ma&2)},function(a){var b=0!==(this.ma&2);b!==a&&(e&&t.i(a,"boolean",Q,"pickable"),this.ma^=2,this.j("pickable",b,a))});
  t.g(Q,"fromLinkableDuplicates",Q.prototype.FE);t.defineProperty(Q,{FE:"fromLinkableDuplicates"},function(){return 0!==(this.ma&4)},function(a){var b=0!==(this.ma&4);b!==a&&(e&&t.i(a,"boolean",Q,"fromLinkableDuplicates"),this.ma^=4,this.j("fromLinkableDuplicates",b,a))});t.g(Q,"fromLinkableSelfNode",Q.prototype.GE);
  t.defineProperty(Q,{GE:"fromLinkableSelfNode"},function(){return 0!==(this.ma&8)},function(a){var b=0!==(this.ma&8);b!==a&&(e&&t.i(a,"boolean",Q,"fromLinkableSelfNode"),this.ma^=8,this.j("fromLinkableSelfNode",b,a))});t.g(Q,"toLinkableDuplicates",Q.prototype.BG);t.defineProperty(Q,{BG:"toLinkableDuplicates"},function(){return 0!==(this.ma&16)},function(a){var b=0!==(this.ma&16);b!==a&&(e&&t.i(a,"boolean",Q,"toLinkableDuplicates"),this.ma^=16,this.j("toLinkableDuplicates",b,a))});
  t.g(Q,"toLinkableSelfNode",Q.prototype.CG);t.defineProperty(Q,{CG:"toLinkableSelfNode"},function(){return 0!==(this.ma&32)},function(a){var b=0!==(this.ma&32);b!==a&&(e&&t.i(a,"boolean",Q,"toLinkableSelfNode"),this.ma^=32,this.j("toLinkableSelfNode",b,a))});t.g(Q,"isPanelMain",Q.prototype.fj);t.defineProperty(Q,{fj:"isPanelMain"},function(){return 0!==(this.ma&64)},function(a){var b=0!==(this.ma&64);b!==a&&(e&&t.i(a,"boolean",Q,"isPanelMain"),this.ma^=64,this.fa(),this.j("isPanelMain",b,a))});
  t.g(Q,"isActionable",Q.prototype.Pw);t.defineProperty(Q,{Pw:"isActionable"},function(){return 0!==(this.ma&128)},function(a){var b=0!==(this.ma&128);b!==a&&(e&&t.i(a,"boolean",Q,"isActionable"),this.ma^=128,this.j("isActionable",b,a))});t.g(Q,"areaBackground",Q.prototype.Zk);
  t.defineProperty(Q,{Zk:"areaBackground"},function(){return this.tc},function(a){var b=this.tc;b!==a&&(e&&null!==a&&t.To(a,"GraphObject.areaBackground"),a instanceof fa&&a.freeze(),this.tc=a,this.ka(),this.j("areaBackground",b,a))});t.g(Q,"background",Q.prototype.background);t.defineProperty(Q,{background:"background"},function(){return this.Lb},function(a){var b=this.Lb;b!==a&&(e&&null!==a&&t.To(a,"GraphObject.background"),a instanceof fa&&a.freeze(),this.Lb=a,this.ka(),this.j("background",b,a))});
  function zk(a,b){a.ma=b?a.ma|512:a.ma&-513}function Kk(a,b){a.ma=b?a.ma|1024:a.ma&-1025}function Bk(a,b){a.ma=b?a.ma|2048:a.ma&-2049}function Ck(a,b){a.ma=b?a.ma|4096:a.ma&-4097}function Oi(a){return 0!==(a.ma&8192)}function lk(a,b){a.ma=b?a.ma|8192:a.ma&-8193}function Pi(a){return 0!==(a.ma&16384)}function pk(a,b){a.ma=b?a.ma|16384:a.ma&-16385}t.A(Q,{S:"part"},function(){if(this instanceof E)return this;if(this.lm)return this.lm;var a;for(a=this.ia;a;){if(a instanceof E)return this.lm=a;a=a.ia}return null});
  Q.prototype.wl=function(a){this.Ii=a};t.A(Q,{ia:"panel"},function(){return this.Ii});t.A(Q,{layer:"layer"},function(){var a=this.S;return null!==a?a.layer:null});t.A(Q,{h:"diagram"},function(){var a=this.S;return null!==a?a.h:null},{configurable:!0});t.g(Q,"position",Q.prototype.position);t.defineProperty(Q,{position:"position"},function(){return this.Ma},function(a){var b=this.Ma;b.M(a)||(e&&t.l(a,w,Q,"position"),a=a.Z(),this.oG(a,b)&&this.j("position",b,a))});
  Q.prototype.oG=function(a){this.Ma=a;Dk(this);mk(this);return!0};Q.prototype.pG=function(a,b){this.Ma.p(a,b);Lk(this,!1);mk(this)};t.A(Q,{pa:"actualBounds"},function(){return this.cc});t.g(Q,"scale",Q.prototype.scale);t.defineProperty(Q,{scale:"scale"},function(){return this.wc},function(a){var b=this.wc;b!==a&&(e&&t.q(a,Q,"scale"),0>=a&&t.m("GraphObject.scale must be greater than zero"),this.wc=a,mk(this),this.fa(),this.j("scale",b,a))});t.g(Q,"angle",Q.prototype.angle);
  t.defineProperty(Q,{angle:"angle"},function(){return this.wn},function(a){var b=this.wn;b!==a&&(e&&t.q(a,Q,"angle"),a%=360,0>a&&(a+=360),b!==a&&(this.wn=a,this.fa(),mk(this),this.j("angle",b,a)))});t.g(Q,"desiredSize",Q.prototype.Ca);
  t.defineProperty(Q,{Ca:"desiredSize"},function(){return this.jf},function(a){var b=this.jf;b.M(a)||(e&&t.l(a,ga,Q,"desiredSize"),this.jf=a=a.Z(),this.fa(),this instanceof W&&this.Ye(),this.j("desiredSize",b,a),a=this.S,null!==a&&0!==(this.ma&1024)&&(gk(this,a,"width"),gk(this,a,"height")))});t.g(Q,"width",Q.prototype.width);
  t.defineProperty(Q,{width:"width"},function(){return this.jf.width},function(a){if(this.jf.width!==a){e&&t.i(a,"number",Q,"width");var b=this.jf;this.jf=a=(new ga(a,this.jf.height)).freeze();this.fa();this instanceof W&&this.Ye();this.j("desiredSize",b,a);b=this.S;null!==b&&0!==(this.ma&1024)&&gk(this,b,"width")}});t.g(Q,"height",Q.prototype.height);
  t.defineProperty(Q,{height:"height"},function(){return this.jf.height},function(a){if(this.jf.height!==a){e&&t.i(a,"number",Q,"height");var b=this.jf;this.jf=a=(new ga(this.jf.width,a)).freeze();this.fa();this instanceof W&&this.Ye();this.j("desiredSize",b,a);b=this.S;null!==b&&0!==(this.ma&1024)&&gk(this,b,"height")}});t.g(Q,"minSize",Q.prototype.Vf);
  t.defineProperty(Q,{Vf:"minSize"},function(){return this.Fj},function(a){var b=this.Fj;b.M(a)||(e&&t.l(a,ga,Q,"minSize"),a=a.copy(),isNaN(a.width)&&(a.width=0),isNaN(a.height)&&(a.height=0),a.freeze(),this.Fj=a,this.fa(),this.j("minSize",b,a))});t.g(Q,"maxSize",Q.prototype.He);
  t.defineProperty(Q,{He:"maxSize"},function(){return this.Ej},function(a){var b=this.Ej;b.M(a)||(e&&t.l(a,ga,Q,"maxSize"),a=a.copy(),isNaN(a.width)&&(a.width=Infinity),isNaN(a.height)&&(a.height=Infinity),a.freeze(),this.Ej=a,this.fa(),this.j("maxSize",b,a))});t.A(Q,{Ea:"measuredBounds"},function(){return this.Wc});t.A(Q,{Ra:"naturalBounds"},function(){return this.hd},{configurable:!0});t.g(Q,"margin",Q.prototype.margin);
  t.defineProperty(Q,{margin:"margin"},function(){return this.sr},function(a){"number"===typeof a?a=new ab(a):e&&t.l(a,ab,Q,"margin");var b=this.sr;b.M(a)||(this.sr=a=a.Z(),this.fa(),this.j("margin",b,a))});t.A(Q,{transform:null},function(){0!==(this.ma&2048)===!0&&Ak(this);return this.md});t.A(Q,{me:null},function(){0!==(this.ma&4096)===!0&&Ak(this);return this.jk});t.g(Q,"alignment",Q.prototype.alignment);
  t.defineProperty(Q,{alignment:"alignment"},function(){return this.ue},function(a){var b=this.ue;b.M(a)||(e?t.l(a,I,Q,"alignment"):a.Ge()&&!a.Pc()&&t.m("alignment must be a real Spot or Spot.Default"),this.ue=a=a.Z(),Dk(this),this.j("alignment",b,a))});t.g(Q,"column",Q.prototype.column);t.defineProperty(Q,{column:"column"},function(){return this.tq},function(a){e&&t.q(a,Q,"column");a=Math.round(a);var b=this.tq;b!==a&&(0>a&&t.la(a,">= 0",Q,"column"),this.tq=a,this.fa(),this.j("column",b,a))});
  t.g(Q,"columnSpan",Q.prototype.aE);t.defineProperty(Q,{aE:"columnSpan"},function(){return this.sj},function(a){e&&t.q(a,Q,"columnSpan");a=Math.round(a);var b=this.sj;b!==a&&(1>a&&t.la(a,">= 1",Q,"columnSpan"),this.sj=a,this.fa(),this.j("columnSpan",b,a))});t.g(Q,"row",Q.prototype.qc);t.defineProperty(Q,{qc:"row"},function(){return this.as},function(a){e&&t.q(a,Q,"row");a=Math.round(a);var b=this.as;b!==a&&(0>a&&t.la(a,">= 0",Q,"row"),this.as=a,this.fa(),this.j("row",b,a))});t.g(Q,"rowSpan",Q.prototype.rowSpan);
  t.defineProperty(Q,{rowSpan:"rowSpan"},function(){return this.Kj},function(a){e&&t.q(a,Q,"rowSpan");a=Math.round(a);var b=this.Kj;b!==a&&(1>a&&t.la(a,">= 1",Q,"rowSpan"),this.Kj=a,this.fa(),this.j("rowSpan",b,a))});t.g(Q,"alignmentFocus",Q.prototype.Rj);
  t.defineProperty(Q,{Rj:"alignmentFocus"},function(){return this.mq},function(a){var b=this.mq;b.M(a)||(e?t.l(a,I,Q,"alignmentFocus"):a.Ge()&&!a.Pc()&&t.m("alignmentFocus must be a real Spot or Spot.Default"),this.mq=a=a.Z(),this.fa(),this.j("alignmentFocus",b,a))});t.g(Q,"portId",Q.prototype.Nd);
  t.defineProperty(Q,{Nd:"portId"},function(){return this.Nr},function(a){var b=this.Nr;if(b!==a){e&&null!==a&&t.i(a,"string",Q,"portId");var c=this.S;null===c||c instanceof S||(t.m("portID being set on a Link: "+a),c=null);null!==b&&c&&Mk(c,this);this.Nr=a;if(null!==a&&c){c.Fh=!0;null===c.Rd&&Nk(c);var d=this.Nd;null!==d&&c.Rd.add(d,this)}this.j("portId",b,a)}});function Ok(a){var b={value:null};Pk(a,b);return b.value}
  function Pk(a,b){var c=a.ia;return null===c||!Pk(c,b)&&a.visible?(b.value=a,!1):!0}function Jk(a){var b=a.S;b instanceof S&&(a=a.h)&&!a.ja.sb&&b.wf()}t.g(Q,"toSpot",Q.prototype.tb);t.defineProperty(Q,{tb:"toSpot"},function(){return null!==this.P?this.P.Uh:wb},function(a){null===this.P&&this.Fe();var b=this.P.Uh;b.M(a)||(e&&t.l(a,I,Q,"toSpot"),a=a.Z(),this.P.Uh=a,this.j("toSpot",b,a),Jk(this))});t.g(Q,"toEndSegmentLength",Q.prototype.ik);
  t.defineProperty(Q,{ik:"toEndSegmentLength"},function(){return null!==this.P?this.P.Rh:10},function(a){null===this.P&&this.Fe();var b=this.P.Rh;b!==a&&(e&&t.i(a,"number",Q,"toEndSegmentLength"),0>a&&t.la(a,">= 0",Q,"toEndSegmentLength"),this.P.Rh=a,this.j("toEndSegmentLength",b,a),Jk(this))});t.g(Q,"toEndSegmentDirection",Q.prototype.Xp);
  t.defineProperty(Q,{Xp:"toEndSegmentDirection"},function(){return null!==this.P?this.P.Qh:ek},function(a){null===this.P&&this.Fe();var b=this.P.Qh;b!==a&&(e&&t.Aa(a,S,Q,"toEndSegmentDirection"),this.P.Qh=a,this.j("toEndSegmentDirection",b,a),Jk(this))});t.g(Q,"toShortLength",Q.prototype.Yp);
  t.defineProperty(Q,{Yp:"toShortLength"},function(){return null!==this.P?this.P.Th:0},function(a){null===this.P&&this.Fe();var b=this.P.Th;b!==a&&(e&&t.i(a,"number",Q,"toShortLength"),this.P.Th=a,this.j("toShortLength",b,a),Jk(this))});t.g(Q,"toLinkable",Q.prototype.lB);t.defineProperty(Q,{lB:"toLinkable"},function(){return this.ys},function(a){var b=this.ys;b!==a&&(e&&null!==a&&t.i(a,"boolean",Q,"toLinkable"),this.ys=a,this.j("toLinkable",b,a))});t.g(Q,"toMaxLinks",Q.prototype.DG);
  t.defineProperty(Q,{DG:"toMaxLinks"},function(){return this.zs},function(a){var b=this.zs;b!==a&&(e&&t.q(a,Q,"toMaxLinks"),0>a&&t.la(a,">= 0",Q,"toMaxLinks"),this.zs=a,this.j("toMaxLinks",b,a))});t.g(Q,"fromSpot",Q.prototype.pb);t.defineProperty(Q,{pb:"fromSpot"},function(){return null!==this.P?this.P.Eh:wb},function(a){null===this.P&&this.Fe();var b=this.P.Eh;b.M(a)||(e&&t.l(a,I,Q,"fromSpot"),a=a.Z(),this.P.Eh=a,this.j("fromSpot",b,a),Jk(this))});t.g(Q,"fromEndSegmentLength",Q.prototype.ck);
  t.defineProperty(Q,{ck:"fromEndSegmentLength"},function(){return null!==this.P?this.P.Bh:10},function(a){null===this.P&&this.Fe();var b=this.P.Bh;b!==a&&(e&&t.i(a,"number",Q,"fromEndSegmentLength"),0>a&&t.la(a,">= 0",Q,"fromEndSegmentLength"),this.P.Bh=a,this.j("fromEndSegmentLength",b,a),Jk(this))});t.g(Q,"fromEndSegmentDirection",Q.prototype.hp);
  t.defineProperty(Q,{hp:"fromEndSegmentDirection"},function(){return null!==this.P?this.P.Ah:ek},function(a){null===this.P&&this.Fe();var b=this.P.Ah;b!==a&&(e&&t.Aa(a,S,Q,"fromEndSegmentDirection"),this.P.Ah=a,this.j("fromEndSegmentDirection",b,a),Jk(this))});t.g(Q,"fromShortLength",Q.prototype.ip);
  t.defineProperty(Q,{ip:"fromShortLength"},function(){return null!==this.P?this.P.Dh:0},function(a){null===this.P&&this.Fe();var b=this.P.Dh;b!==a&&(e&&t.i(a,"number",Q,"fromShortLength"),this.P.Dh=a,this.j("fromShortLength",b,a),Jk(this))});t.g(Q,"fromLinkable",Q.prototype.iA);t.defineProperty(Q,{iA:"fromLinkable"},function(){return this.Nq},function(a){var b=this.Nq;b!==a&&(e&&null!==a&&t.i(a,"boolean",Q,"fromLinkable"),this.Nq=a,this.j("fromLinkable",b,a))});t.g(Q,"fromMaxLinks",Q.prototype.HE);
  t.defineProperty(Q,{HE:"fromMaxLinks"},function(){return this.Oq},function(a){var b=this.Oq;b!==a&&(e&&t.q(a,Q,"fromMaxLinks"),0>a&&t.la(a,">= 0",Q,"fromMaxLinks"),this.Oq=a,this.j("fromMaxLinks",b,a))});t.g(Q,"cursor",Q.prototype.cursor);t.defineProperty(Q,{cursor:"cursor"},function(){return this.Aq},function(a){var b=this.Aq;b!==a&&(t.i(a,"string",Q,"cursor"),this.Aq=a,this.j("cursor",b,a))});t.g(Q,"click",Q.prototype.click);
  t.defineProperty(Q,{click:"click"},function(){return null!==this.Q?this.Q.ni:null},function(a){null===this.Q&&dk(this);var b=this.Q.ni;b!==a&&(null!==a&&t.i(a,"function",Q,"click"),this.Q.ni=a,this.j("click",b,a))});t.g(Q,"doubleClick",Q.prototype.Nm);t.defineProperty(Q,{Nm:"doubleClick"},function(){return null!==this.Q?this.Q.ti:null},function(a){null===this.Q&&dk(this);var b=this.Q.ti;b!==a&&(null!==a&&t.i(a,"function",Q,"doubleClick"),this.Q.ti=a,this.j("doubleClick",b,a))});
  t.g(Q,"contextClick",Q.prototype.Vs);t.defineProperty(Q,{Vs:"contextClick"},function(){return null!==this.Q?this.Q.pi:null},function(a){null===this.Q&&dk(this);var b=this.Q.pi;b!==a&&(null!==a&&t.i(a,"function",Q,"contextClick"),this.Q.pi=a,this.j("contextClick",b,a))});t.g(Q,"mouseEnter",Q.prototype.FA);
  t.defineProperty(Q,{FA:"mouseEnter"},function(){return null!==this.Q?this.Q.Dr:null},function(a){null===this.Q&&dk(this);var b=this.Q.Dr;b!==a&&(null!==a&&t.i(a,"function",Q,"mouseEnter"),this.Q.Dr=a,this.j("mouseEnter",b,a))});t.g(Q,"mouseLeave",Q.prototype.GA);t.defineProperty(Q,{GA:"mouseLeave"},function(){return null!==this.Q?this.Q.Er:null},function(a){null===this.Q&&dk(this);var b=this.Q.Er;b!==a&&(null!==a&&t.i(a,"function",Q,"mouseLeave"),this.Q.Er=a,this.j("mouseLeave",b,a))});
  t.g(Q,"mouseOver",Q.prototype.yt);t.defineProperty(Q,{yt:"mouseOver"},function(){return null!==this.Q?this.Q.Ei:null},function(a){null===this.Q&&dk(this);var b=this.Q.Ei;b!==a&&(null!==a&&t.i(a,"function",Q,"mouseOver"),this.Q.Ei=a,this.j("mouseOver",b,a))});t.g(Q,"mouseHover",Q.prototype.xt);
  t.defineProperty(Q,{xt:"mouseHover"},function(){return null!==this.Q?this.Q.Di:null},function(a){null===this.Q&&dk(this);var b=this.Q.Di;b!==a&&(null!==a&&t.i(a,"function",Q,"mouseHover"),this.Q.Di=a,this.j("mouseHover",b,a))});t.g(Q,"mouseHold",Q.prototype.wt);t.defineProperty(Q,{wt:"mouseHold"},function(){return null!==this.Q?this.Q.Ci:null},function(a){null===this.Q&&dk(this);var b=this.Q.Ci;b!==a&&(null!==a&&t.i(a,"function",Q,"mouseHold"),this.Q.Ci=a,this.j("mouseHold",b,a))});
  t.g(Q,"mouseDragEnter",Q.prototype.BF);t.defineProperty(Q,{BF:"mouseDragEnter"},function(){return null!==this.Q?this.Q.Br:null},function(a){null===this.Q&&dk(this);var b=this.Q.Br;b!==a&&(null!==a&&t.i(a,"function",Q,"mouseDragEnter"),this.Q.Br=a,this.j("mouseDragEnter",b,a))});t.g(Q,"mouseDragLeave",Q.prototype.EA);
  t.defineProperty(Q,{EA:"mouseDragLeave"},function(){return null!==this.Q?this.Q.Cr:null},function(a){null===this.Q&&dk(this);var b=this.Q.Cr;b!==a&&(null!==a&&t.i(a,"function",Q,"mouseDragLeave"),this.Q.Cr=a,this.j("mouseDragLeave",b,a))});t.g(Q,"mouseDrop",Q.prototype.vt);t.defineProperty(Q,{vt:"mouseDrop"},function(){return null!==this.Q?this.Q.Bi:null},function(a){null===this.Q&&dk(this);var b=this.Q.Bi;b!==a&&(null!==a&&t.i(a,"function",Q,"mouseDrop"),this.Q.Bi=a,this.j("mouseDrop",b,a))});
  t.g(Q,"actionDown",Q.prototype.Gz);t.defineProperty(Q,{Gz:"actionDown"},function(){return null!==this.Q?this.Q.iq:null},function(a){null===this.Q&&dk(this);var b=this.Q.iq;b!==a&&(null!==a&&t.i(a,"function",Q,"actionDown"),this.Q.iq=a,this.j("actionDown",b,a))});t.g(Q,"actionUp",Q.prototype.Iz);
  t.defineProperty(Q,{Iz:"actionUp"},function(){return null!==this.Q?this.Q.kq:null},function(a){null===this.Q&&dk(this);var b=this.Q.kq;b!==a&&(null!==a&&t.i(a,"function",Q,"actionUp"),this.Q.kq=a,this.j("actionUp",b,a))});t.g(Q,"actionMove",Q.prototype.Hz);t.defineProperty(Q,{Hz:"actionMove"},function(){return null!==this.Q?this.Q.jq:null},function(a){null===this.Q&&dk(this);var b=this.Q.jq;b!==a&&(null!==a&&t.i(a,"function",Q,"actionMove"),this.Q.jq=a,this.j("actionMove",b,a))});
  t.g(Q,"actionCancel",Q.prototype.Fz);t.defineProperty(Q,{Fz:"actionCancel"},function(){return null!==this.Q?this.Q.hq:null},function(a){null===this.Q&&dk(this);var b=this.Q.hq;b!==a&&(null!==a&&t.i(a,"function",Q,"actionCancel"),this.Q.hq=a,this.j("actionCancel",b,a))});t.g(Q,"toolTip",Q.prototype.Wt);
  t.defineProperty(Q,{Wt:"toolTip"},function(){return null!==this.Q?this.Q.Oi:null},function(a){null===this.Q&&dk(this);var b=this.Q.Oi;b!==a&&(null!==a&&t.l(a,Je,Q,"toolTip"),this.Q.Oi=a,this.j("toolTip",b,a))});t.g(Q,"contextMenu",Q.prototype.contextMenu);t.defineProperty(Q,{contextMenu:"contextMenu"},function(){return null!==this.Q?this.Q.qi:null},function(a){null===this.Q&&dk(this);var b=this.Q.qi;b!==a&&(null!==a&&t.l(a,Je,Q,"contextMenu"),this.Q.qi=a,this.j("contextMenu",b,a))});
  Q.prototype.bind=Q.prototype.bind=function(a){a.pg=this;var b=this.ep();null!==b&&Qk(b)&&t.m("Cannot add a Binding to a template that has already been copied: "+a);null===this.Kc&&(this.Kc=new B(De));this.Kc.add(a)};Q.prototype.findTemplateBinder=Q.prototype.ep=function(){for(var a=this instanceof y?this:this.ia;null!==a;){if(null!==a.Hl&&a instanceof y)return a;a=a.ia}return null};Q.fromSvg=Q.fromSVG=function(a){return Rk(a)};Q.prototype.setProperties=function(a){t.ux(this,a)};var Sk;
  Q.make=Sk=function(a,b){var c=arguments,d=null,f=null;if("function"===typeof a)f=a;else if("string"===typeof a){var g=Tk.za(a);"function"===typeof g?(c=Array.prototype.slice.call(arguments),d=g(c)):f=ca[a]}null===d&&(void 0===f&&(d=window.$,void 0!==d&&void 0!==d.noop&&t.m("GraphObject.make failed to complete. Is it conflicting with another $ var? (such as jQuery)"),t.m("GraphObject.make failed to complete, it may be conflicting with another var.")),null!==f&&f.constructor||t.m("GraphObject.make requires a class function or class name, not: "+
  a),d=new f);g=1;d instanceof z&&1<c.length&&(f=c[1],"string"===typeof f||f instanceof HTMLDivElement)&&(d.aj=null,ai(d,f),g++);for(;g<c.length;g++)f=c[g],void 0===f?t.m("Undefined value at argument "+g+" for object being constructed by GraphObject.make: "+d):Uk(d,f);return d};
  function Uk(a,b){if("string"===typeof b){var c=a;if(c instanceof na)c.text=b;else if(c instanceof W)c.zb=b;else if(c instanceof Vk)c.source=b;else if(c instanceof y){var d=t.Om(y,b);null!==d?c.type=d:t.m("Unknown Panel type as an argument to GraphObject.make: "+b)}else c instanceof fa?(d=t.Om(fa,b),null!==d?c.type=d:t.m("Unknown Brush type as an argument to GraphObject.make: "+b)):c instanceof zc?(d=t.Om(zc,b),null!==d?c.type=d:t.m("Unknown Geometry type as an argument to GraphObject.make: "+b)):
  c instanceof id?(d=t.Om(id,b),null!==d?c.type=d:t.m("Unknown PathSegment type as an argument to GraphObject.make: "+b)):t.m("Unable to use a string as an argument to GraphObject.make: "+b)}else if(b instanceof Q)a instanceof y||t.m("A GraphObject can only be added to a Panel, not to: "+a),a.add(b);else if(b instanceof Ae)a instanceof y||t.m("A RowColumnDefinition can only be added to a Panel, not to: "+a),gj(b.xf?a.Hd(b.index):a.Gd(b.index),b);else if(b instanceof da)c=a,c instanceof V&&b.Re===V?
  2===(b.value&2)?c.Kt=b:b===Og||b===xg||b===wg?c.De=b:b===Wk||b===Xk||b===Yk?c.Lo=b:b!==Zk&&b!==yg&&t.m("Unknown Link enum value for a Link property: "+b):c instanceof y&&b.Re===y?c.type=b:c instanceof na&&b.Re===na?c.rB=b:c instanceof Q&&b.Re===V?0===b.name.indexOf("Orient")?c.Mt=b:t.m("Unknown Link enum value for GraphObject.segmentOrientation property: "+b):c instanceof Q&&b.Re===Q?c.gi=b:c instanceof z&&b.Re===z?c.Dm=b:c instanceof fa&&b.Re===fa?c.type=b:c instanceof zc&&b.Re===zc?c.type=b:c instanceof
  id&&b.Re===id?c.type=b:c instanceof De&&b.Re===De?c.mode=b:c instanceof td&&b.Re===td?c.td=b:c instanceof X&&b.Re===X?0===b.name.indexOf("Alignment")?c.alignment=b:0===b.name.indexOf("Arrangement")?c.Qe=b:0===b.name.indexOf("Compaction")?c.compaction=b:0===b.name.indexOf("Path")?c.path=b:0===b.name.indexOf("Sorting")?c.sorting=b:0===b.name.indexOf("Style")?c.NG=b:t.m("Unknown enum value: "+b):c instanceof Z&&b.Re===Z?0===b.name.indexOf("Aggressive")?c.LD=b:0===b.name.indexOf("Cycle")?c.jE=b:0===b.name.indexOf("Init")?
  c.$E=b:0===b.name.indexOf("Layer")?c.mF=b:t.m("Unknown enum value: "+b):c instanceof Xj&&b.Re===Xj?b===$k||b===al||b===bl||b===cl?c.sorting=b:b===dl||b===el?c.Qe=b:b===fl||b===gl?c.alignment=b:t.m("Unknown enum value: "+b):c instanceof hl&&b.Re===hl?b===il||b===jl||b===kl||b===ll||b===ml?c.sorting=b:b===nl||b===ol||b===pl||b===ql?c.direction=b:b===rl||b===sl||b===zl||b===Al?c.Qe=b:b===Bl||b===Cl?c.At=b:t.m("Unknown enum value: "+b):t.m("No property to set for this enum value: "+b);else if(b instanceof
  De)if(a instanceof Q||a instanceof Ae){var d=b.Ut,f=d.indexOf(".");0<f&&a instanceof y&&(c=d.substr(f+1),d=a.oe(d.substring(0,f)),null!==d&&(a=d,b.Ut=c));a.bind(b)}else t.m("A Binding can only be applied to a GraphObject or RowColumnDefinition, not to: "+a);else if(b instanceof Bc)a instanceof zc?a.Ab.add(b):t.m("A PathFigure can only be added to a Geometry, not to: "+a);else if(b instanceof id)a instanceof Bc?a.Fa.add(b):t.m("A PathSegment can only be added to a PathFigure, not to: "+a);else if(Array.isArray(b))for(c=
  0;c<b.length;c++)Uk(a,b[c]);else if("object"===typeof b&&null!==b)if(c=a,c instanceof fa){d={};for(f in b){var g=parseFloat(f);isNaN(g)?d[f]=b[f]:c.addColorStop(g,b[f])}t.ux(c,d)}else c instanceof Ae?(void 0!==b.row?(d=b.row,(void 0===d||null===d||Infinity===d||isNaN(d)||0>d)&&t.m("Must specify non-negative integer row for RowColumnDefinition "+b),c.Vl=!0,c.Vc=d):void 0!==b.column?(d=b.column,(void 0===d||null===d||Infinity===d||isNaN(d)||0>d)&&t.m("Must specify non-negative integer column for RowColumnDefinition "+
  b),c.Vl=!1,c.Vc=d):t.m("Must specify row or column value in a RowColumnDefinition "+b),d=t.hI(b,"row","column"),t.ux(c,d)):t.ux(c,b);else t.m('Unknown initializer "'+b+'" for object being constructed by GraphObject.make: '+a)}var Tk;Q.Builders=Tk=new ja("string","function");
  Tk.add("Button",function(){var a=new fa(Od);a.addColorStop(0,"white");a.addColorStop(1,"lightgray");var b=new fa(Od);b.addColorStop(0,"white");b.addColorStop(1,"dodgerblue");var c=Sk(y,ci,{Pw:!0},Sk(W,{name:"ButtonBorder",zb:"RoundedRectangle",fill:a,stroke:"gray"}));c.FA=function(a,c){var g=c.wa(0),h=c._buttonFillOver;void 0===h&&(h=b);c._buttonFillNormal=g.fill;g.fill=h;h=c._buttonStrokeOver;void 0===h&&(h="blue");c._buttonStrokeNormal=g.stroke;g.stroke=h};c.GA=function(b,c){var g=c.wa(0),h=c._buttonFillNormal;
  void 0===h&&(h=a);g.fill=h;h=c._buttonStrokeNormal;void 0===h&&(h="gray");g.stroke=h};return c});
  Tk.add("TreeExpanderButton",function(){var a=Sk("Button",Sk(W,{name:"ButtonIcon",zb:"MinusLine",Ca:H.dq},(new De("figure","isTreeExpanded",function(a,c){var d=null,f=c.ia;f&&(d=a?f._treeExpandedFigure:f._treeCollapsedFigure);d||(d=a?"MinusLine":"PlusLine");return d})).LA("")),{visible:!1},(new De("visible","isTreeLeaf",function(a){return!a})).LA(""));a.click=function(a,c){var d=c.S;d instanceof Je&&(d=d.Xh);if(d instanceof S){var f=d.h;if(null!==f){f=f.Se;if(d.Qc){if(!f.canCollapseTree(d))return}else if(!f.canExpandTree(d))return;
  a.Ee=!0;d.Qc?f.collapseTree(d):f.expandTree(d)}}};return a});
  Tk.add("SubGraphExpanderButton",function(){var a=Sk("Button",Sk(W,{name:"ButtonIcon",zb:"MinusLine",Ca:H.dq},(new De("figure","isSubGraphExpanded",function(a,c){var d=null,f=c.ia;f&&(d=a?f._subGraphExpandedFigure:f._subGraphCollapsedFigure);d||(d=a?"MinusLine":"PlusLine");return d})).LA("")));a.click=function(a,c){var d=c.S;d instanceof Je&&(d=d.Xh);if(d instanceof T){var f=d.h;if(null!==f){f=f.Se;if(d.Yd){if(!f.canCollapseSubGraph(d))return}else if(!f.canExpandSubGraph(d))return;a.Ee=!0;d.Yd?f.collapseSubGraph(d):
  f.expandSubGraph(d)}}};return a});Tk.add("ContextMenuButton",function(){var a=Sk("Button");a.gi=ck;var b=a.oe("ButtonBorder");b instanceof W&&(b.zb="Rectangle",b.G=new I(0,0,2,2),b.H=new I(1,1,-2,-2));return a});Q.defineBuilder=function(a,b){t.i(a,"string",Q,"defineBuilder:name");t.i(b,"function",Q,"defineBuilder:func");var c=a.toLowerCase();""!==a&&"none"!==c&&a!==c||t.m("Shape.defineFigureGenerator name must not be empty or None or all-lower-case: "+a);Q.Builders.add(a,b)};
  function y(a){Q.call(this);void 0===a?0===arguments.length?this.da=Zg:t.m("invalid argument to Panel constructor: undefined"):(t.Aa(a,y,y,"type"),this.da=a);this.xa=new B(Q);this.Ne=H.fq;this.Vg=!1;this.da===wi&&(this.Vg=!0);this.Dq=xb;this.vc=Vg;this.da===Hk&&Dl(this);this.Io=Wg;this.Sq=(new ga(10,10)).freeze();this.Tq=H.nj;this.Hl=this.Ml=null;this.hr=NaN;this.hg=this.yi=null;this.eo="category";this.gg=null;this.Qi=new x(NaN,NaN,NaN,NaN);this.Eo=null;this.Fh=!1;this.bs=null}t.ga("Panel",y);t.Yh(y);
  t.Ka(y,Q);function Dl(a){a.tj=H.fq;a.xh=1;a.si=null;a.Ol=null;a.wh=1;a.vh=null;a.Nl=null;a.kd=[];a.dd=[];a.qm=El;a.Jl=El;a.Pi=0;a.zi=0}
  y.prototype.cloneProtected=function(a){Q.prototype.cloneProtected.call(this,a);a.da=this.da;a.Ne=this.Ne.Z();a.Vg=this.Vg;a.Dq=this.Dq.Z();a.vc=this.vc;if(a.da===Hk){a.tj=this.tj.Z();a.xh=this.xh;a.si=this.si;a.Ol=this.Ol;a.wh=this.wh;a.vh=this.vh;a.Nl=this.Nl;var b=[];if(0<this.kd.length)for(var c=this.kd,d=c.length,f=0;f<d;f++)if(void 0!==c[f]){var g=c[f].copy();g.wl(a);b[f]=g}a.kd=b;b=[];if(0<this.dd.length)for(c=this.dd,d=c.length,f=0;f<d;f++)void 0!==c[f]&&(g=c[f].copy(),g.wl(a),b[f]=g);a.dd=
  b;a.qm=this.qm;a.Jl=this.Jl;a.Pi=this.Pi;a.zi=this.zi}a.Io=this.Io;a.Sq.assign(this.Sq);a.Tq=this.Tq.Z();a.Ml=this.Ml;a.Hl=this.Hl;a.hr=this.hr;a.yi=this.yi;a.hg=this.hg;a.eo=this.eo;a.Qi.assign(this.Qi);a.Fh=this.Fh;this.bs&&(a.bs=this.bs);this._buttonFillNormal&&(a._buttonFillNormal=this._buttonFillNormal);this._buttonFillOver&&(a._buttonFillOver=this._buttonFillOver);this._buttonStrokeNormal&&(a._buttonStrokeNormal=this._buttonStrokeNormal);this._buttonStrokeOver&&(a._buttonStrokeOver=this._buttonStrokeOver);
  this._treeExpandedFigure&&(a._treeExpandedFigure=this._treeExpandedFigure);this._treeCollapsedFigure&&(a._treeCollapsedFigure=this._treeCollapsedFigure);this._subGraphExpandedFigure&&(a._subGraphExpandedFigure=this._subGraphExpandedFigure);this._subGraphCollapsedFigure&&(a._subGraphCollapsedFigure=this._subGraphCollapsedFigure)};y.prototype.Zh=function(a){Q.prototype.Zh.call(this,a);a.xa=this.xa;for(var b=a.xa.k;b.next();)b.value.Ii=a};
  y.prototype.copy=function(){var a=Q.prototype.copy.call(this);if(a instanceof y){var b=this.xa;if(0<b.length)for(var c=b.length,d=0;d<c;d++){var f=b.n[d].copy(),g=a;f.wl(g);f.lm=null;var h=g.xa,k=h.count;h.Jd(k,f);h=g.S;if(null!==h){h.Gj=null;null!==f.Nd&&h instanceof S&&(h.Fh=!0);var l=g.h;null!==l&&l.ja.sb||h.Ic(wd,"elements",g,null,f,null,k)}}return a}return null};y.prototype.toString=function(){return"Panel("+this.type+")#"+t.od(this)};var Zg;y.Position=Zg=t.w(y,"Position",0);
  y.Horizontal=t.w(y,"Horizontal",1);var bi;y.Vertical=bi=t.w(y,"Vertical",2);var Sg;y.Spot=Sg=t.w(y,"Spot",3);var ci;y.Auto=ci=t.w(y,"Auto",4);var Hk;y.Table=Hk=t.w(y,"Table",5);y.Viewbox=t.w(y,"Viewbox",6);var tk;y.TableRow=tk=t.w(y,"TableRow",7);var uk;y.TableColumn=uk=t.w(y,"TableColumn",8);var vg;y.Link=vg=t.w(y,"Link",9);var wi;y.Grid=wi=t.w(y,"Grid",10);t.g(y,"type",y.prototype.type);
  t.defineProperty(y,{type:"type"},function(){return this.da},function(a){var b=this.da;b!==a&&(e&&t.Aa(a,y,y,"type"),b!==tk&&b!==uk||t.m("Cannot change Panel.type when it is already a TableRow or a TableColumn: "+a),this.da=a,this.da===wi?this.Vg=!0:this.da===Hk&&Dl(this),this.fa(),this.j("type",b,a))});t.A(y,{elements:"elements"},function(){return this.xa.k});t.A(y,{Ra:"naturalBounds"},function(){return this.hd});t.g(y,"padding",y.prototype.padding);
  t.defineProperty(y,{padding:"padding"},function(){return this.Ne},function(a){"number"===typeof a?(0>a&&t.la(a,">= 0",y,"padding"),a=new ab(a)):(t.l(a,ab,y,"padding"),0>a.left&&t.la(a.left,">= 0",y,"padding:val.left"),0>a.right&&t.la(a.right,">= 0",y,"padding:val.right"),0>a.top&&t.la(a.top,">= 0",y,"padding:val.top"),0>a.bottom&&t.la(a.bottom,">= 0",y,"padding:val.bottom"));var b=this.Ne;b.M(a)||(this.Ne=a=a.Z(),this.fa(),this.j("padding",b,a))});t.g(y,"defaultAlignment",y.prototype.Xj);
  t.defineProperty(y,{Xj:"defaultAlignment"},function(){return this.Dq},function(a){var b=this.Dq;b.M(a)||(e&&t.l(a,I,y,"defaultAlignment"),this.Dq=a=a.Z(),this.fa(),this.j("defaultAlignment",b,a))});t.g(y,"defaultStretch",y.prototype.$z);t.defineProperty(y,{$z:"defaultStretch"},function(){return this.vc},function(a){var b=this.vc;b!==a&&(t.Aa(a,Q,y,"defaultStretch"),this.vc=a,this.fa(),this.j("defaultStretch",b,a))});t.g(y,"defaultSeparatorPadding",y.prototype.vI);
  t.defineProperty(y,{vI:"defaultSeparatorPadding"},function(){return void 0===this.tj?H.fq:this.tj},function(a){if(void 0!==this.tj){"number"===typeof a?a=new ab(a):e&&t.l(a,ab,y,"defaultSeparatorPadding");var b=this.tj;b.M(a)||(this.tj=a=a.Z(),this.j("defaultSeparatorPadding",b,a))}});t.g(y,"defaultRowSeparatorStroke",y.prototype.tI);
  t.defineProperty(y,{tI:"defaultRowSeparatorStroke"},function(){return void 0===this.si?null:this.si},function(a){var b=this.si;b!==a&&(null===a||"string"===typeof a||a instanceof fa)&&(a instanceof fa&&a.freeze(),this.si=a,this.j("defaultRowSeparatorStroke",b,a))});t.g(y,"defaultRowSeparatorStrokeWidth",y.prototype.uI);
  t.defineProperty(y,{uI:"defaultRowSeparatorStrokeWidth"},function(){return void 0===this.xh?1:this.xh},function(a){if(void 0!==this.xh){var b=this.xh;b!==a&&(this.xh=a,this.j("defaultRowSeparatorStrokeWidth",b,a))}});t.g(y,"defaultRowSeparatorDashArray",y.prototype.sI);
  t.defineProperty(y,{sI:"defaultRowSeparatorDashArray"},function(){return void 0===this.Ol?null:this.Ol},function(a){if(void 0!==this.Ol){var b=this.Ol;b!==a&&(Array.isArray(a)||t.bc(a,"Array",y,"defaultRowSeparatorDashArray:val"),this.Ol=a,this.j("defaultRowSeparatorDashArray",b,a))}});t.g(y,"defaultColumnSeparatorStroke",y.prototype.nI);
  t.defineProperty(y,{nI:"defaultColumnSeparatorStroke"},function(){return void 0===this.vh?null:this.vh},function(a){if(void 0!==this.vh){var b=this.vh;b!==a&&(null===a||"string"===typeof a||a instanceof fa)&&(a instanceof fa&&a.freeze(),this.vh=a,this.j("defaultColumnSeparatorStroke",b,a))}});t.g(y,"defaultColumnSeparatorStrokeWidth",y.prototype.oI);
  t.defineProperty(y,{oI:"defaultColumnSeparatorStrokeWidth"},function(){return void 0===this.wh?1:this.wh},function(a){if(void 0!==this.wh){var b=this.wh;b!==a&&(this.wh=a,this.j("defaultColumnSeparatorStrokeWidth",b,a))}});t.g(y,"defaultColumnSeparatorDashArray",y.prototype.mI);
  t.defineProperty(y,{mI:"defaultColumnSeparatorDashArray"},function(){return void 0===this.Nl?null:this.Nl},function(a){if(void 0!==this.Nl){var b=this.Nl;b!==a&&(Array.isArray(a)||t.bc(a,"Array",y,"defaultColumnSeparatorDashArray:val"),this.Nl=a,this.j("defaultColumnSeparatorDashArray",b,a))}});t.g(y,"viewboxStretch",y.prototype.eK);
  t.defineProperty(y,{eK:"viewboxStretch"},function(){return this.Io},function(a){var b=this.Io;b!==a&&(t.Aa(a,Q,y,"viewboxStretch"),this.Io=a,this.j("viewboxStretch",b,a))});t.g(y,"gridCellSize",y.prototype.gt);
  t.defineProperty(y,{gt:"gridCellSize"},function(){return this.Sq},function(a){var b=this.Sq;b.M(a)||(t.l(a,ga,y,"gridCellSize"),a.N()&&0!==a.width&&0!==a.height||t.m("Invalid Panel.gridCellSize: "+a),this.Sq=a.Z(),null!==this.h&&this===this.h.lp&&Ji(this.h),this.ka(),this.j("gridCellSize",b,a))});t.g(y,"gridOrigin",y.prototype.lA);
  t.defineProperty(y,{lA:"gridOrigin"},function(){return this.Tq},function(a){var b=this.Tq;b.M(a)||(t.l(a,w,y,"gridOrigin"),a.N()||t.m("Invalid Panel.gridOrigin: "+a),this.Tq=a.Z(),this.h&&Ji(this.h),this.ka(),this.j("gridOrigin",b,a))});
  y.prototype.el=function(a,b){if(this.da===wi){var c=this.dk()*b.scale;0>=c&&(c=1);var d=this.gt,f=d.width,d=d.height,g=this.Ra,h=g.width,g=g.height,k=Math.ceil(h/f),l=Math.ceil(g/d),m=this.lA;a.save();a.beginPath();a.rect(0,0,h,g);a.clip();for(var n=[],p=this.xa.n,q=this.xa.length,r=0;r<q;r++){var s=[];n.push(s);var u=p[r];if(u.visible)for(var u=hj(u.zb),v=r+1;v<q;v++){var D=p[v];D.visible&&hj(D.zb)===u&&(D=D.interval,2<=D&&s.push(D))}}p=this.xa.length;for(q=0;q<p;q++){var A=this.xa.n[q];if(A.visible){var r=
  n[q],s=A.interval,u=!1,G=A.Ax;if(null!==G){var L=u=!0;void 0!==a.setLineDash?(a.setLineDash(G),a.lineDashOffset=A.ld):void 0!==a.webkitLineDash?(a.webkitLineDash=G,a.webkitLineDashOffset=A.ld):void 0!==a.mozDash?(a.mozDash=G,a.mozDashOffset=A.ld):L=!1}if("LineV"===A.zb){a.lineWidth=A.fb;xk(this,a,A.stroke,!1);a.beginPath();for(D=v=Math.floor(-m.x/f);D<=v+k;D++){var N=D*f+m.x;if(0<=N&&N<h&&Fl(D,s,r)&&(u&&!L?fk(a,N,0,N,g,G,A.ld):(a.moveTo(N,0),a.lineTo(N,g)),2>f*s*c))break}a.stroke()}else if("LineH"===
  A.zb){a.lineWidth=A.fb;xk(this,a,A.stroke,!1);a.beginPath();for(D=v=Math.floor(-m.y/d);D<=v+l&&!(N=D*d+m.y,0<=N&&N<=g&&Fl(D,s,r)&&(u&&!L?fk(a,0,N,h,N,G,A.ld):(a.moveTo(0,N),a.lineTo(h,N)),2>d*s*c));D++);a.stroke()}else if("BarV"===A.zb)for(xk(this,a,A.fill,!0),A=A.width,isNaN(A)&&(A=f),D=v=Math.floor(-m.x/f);D<=v+k&&!(N=D*f+m.x,0<=N&&N<h&&Fl(D,s,r)&&(a.fillRect(N,0,A,g),2>f*s*c));D++);else if("BarH"===A.zb)for(xk(this,a,A.fill,!0),A=A.height,isNaN(A)&&(A=d),D=v=Math.floor(-m.y/d);D<=v+l&&!(N=D*d+
  m.y,0<=N&&N<=g&&Fl(D,s,r)&&(a.fillRect(0,N,h,A),2>d*s*c));D++);u&&(void 0!==a.setLineDash?(a.setLineDash(t.ji),a.lineDashOffset=0):void 0!==a.webkitLineDash?(a.webkitLineDash=t.ji,a.webkitLineDashOffset=0):void 0!==a.mozDash&&(a.mozDash=null,a.mozDashOffset=0))}}a.restore();ui(b,a,!1)}else{this.da===Hk&&(a.lineCap="butt",Gl(this,a,!0,this.kd,!0),Gl(this,a,!1,this.dd,!0),Hl(this,a,!0,this.kd),Hl(this,a,!1,this.dd),Gl(this,a,!0,this.kd,!1),Gl(this,a,!1,this.dd,!1));c=this.xa.length;for(f=0;f<c;f++)this.xa.n[f].Ue(a,
  b);e&&e.vK&&this instanceof V&&e.uK(a,b,this)}};
  function Hl(a,b,c,d){for(var f=d.length,g,h=a.pa,k=c?a.Hd(0):a.Gd(0),l=0;l<f;l++)if(g=d[l],void 0!==g&&g!==k&&0!==g.fc){var m=g.jn;isNaN(m)&&(m=c?a.xh:a.wh);var n=g.hn;null===n&&(n=c?a.si:a.vh);if(0!==m&&null!==n){xk(a,b,n,!1);var n=!1,p=g.lG;if(null!==p){var q=n=!0;void 0!==b.setLineDash?(b.setLineDash(p),b.lineDashOffset=a.ld):void 0!==b.webkitLineDash?(b.webkitLineDash=p,b.webkitLineDashOffset=a.ld):void 0!==b.mozDash?(b.mozDash=p,b.mozDashOffset=a.ld):q=!1}b.beginPath();var r=g.position+m;c?r>
  h.height&&(m-=r-h.height):r>h.width&&(m-=r-h.width);g=g.position+m/2;b.lineWidth=m;r=a.padding;c?(g+=r.top,m=r.left,r=h.width-r.right,n&&!q?fk(b,m,g,r,g,p,0):(b.moveTo(m,g),b.lineTo(r,g))):(g+=r.left,m=r.top,r=h.height-r.bottom,n&&!q?fk(b,g,m,g,r,p,0):(b.moveTo(g,m),b.lineTo(g,r)));b.stroke();n&&(void 0!==b.setLineDash?(b.setLineDash(t.ji),b.lineDashOffset=0):void 0!==b.webkitLineDash?(b.webkitLineDash=t.ji,b.webkitLineDashOffset=0):void 0!==b.mozDash&&(b.mozDash=null,b.mozDashOffset=0))}}}
  function Gl(a,b,c,d,f){for(var g=d.length,h,k=a.pa,l=0;l<g;l++)if(h=d[l],void 0!==h&&null!==h.background&&h.tw!==f&&0!==h.fc){var m=c?k.height:k.width;if(!(h.position>m)){var n=Il(h),p=h.jn;isNaN(p)&&(p=c?a.xh:a.wh);var q=h.hn;null===q&&(q=c?a.si:a.vh);null===q&&(p=0);n-=p;p=h.position+p;n+=h.fc;p+n>m&&(n=m-p);0>=n||(m=a.padding,xk(a,b,h.background,!0),c?b.fillRect(m.left,p+m.top,k.width-(m.left+m.right),n):b.fillRect(p+m.left,m.top,n,k.height-(m.top+m.bottom)))}}}
  function Fl(a,b,c){if(0!==a%b)return!1;b=c.length;for(var d=0;d<b;d++)if(0===a%c[d])return!1;return!0}function hj(a){return"LineV"===a||"BarV"===a}
  y.prototype.kp=function(a,b,c,d,f){var g=this.Hf(),h=this.transform,k=1/(h.m11*h.m22-h.m12*h.m21),l=h.m22*k,m=-h.m12*k,n=-h.m21*k,p=h.m11*k,q=k*(h.m21*h.dy-h.m22*h.dx),r=k*(h.m12*h.dx-h.m11*h.dy);if(null!==this.Zk)return h=this.pa,H.kl(h.left,h.top,h.right,h.bottom,a,b,c,d,f);if(null!==this.background)g=a*l+b*n+q,k=a*m+b*p+r,a=c*l+d*n+q,c=c*m+d*p+r,f.p(0,0),d=this.Ra,c=H.kl(0,0,d.width,d.height,g,k,a,c,f),f.transform(h);else{g||(l=1,n=m=0,p=1,r=q=0);k=a*l+b*n+q;a=a*m+b*p+r;l=c*l+d*n+q;d=c*m+d*p+r;
  f.p(l,d);m=(l-k)*(l-k)+(d-a)*(d-a);c=!1;p=this.xa.n;r=p.length;n=t.K();for(q=0;q<r;q++)b=p[q],b.visible&&b.kp(k,a,l,d,n)&&(c=!0,b=(k-n.x)*(k-n.x)+(a-n.y)*(a-n.y),b<m&&(m=b,f.set(n)));t.B(n);g&&f.transform(h)}return c};
  y.prototype.tt=function(a,b,c,d){var f=this.Qi;f.width=0;f.height=0;var g=this.Ca,h=this.Vf;void 0===c&&(c=h.width,d=h.height);c=Math.max(c,h.width);d=Math.max(d,h.height);var k=this.He;isNaN(g.width)||(a=Math.min(g.width,k.width));isNaN(g.height)||(b=Math.min(g.height,k.height));a=Math.max(c,a);b=Math.max(d,b);var l=this.padding;a=Math.max(a-l.left-l.right,0);b=Math.max(b-l.top-l.bottom,0);var m=this.xa,n=m.length;if(0!==n){var p=this.da.Yb;switch(p){case "Position":var q=a,r=b,s=c,u=d;f.x=0;f.y=
  0;f.width=0;for(var v=f.height=0;v<n;v++){var D=m.n[v];if(D.visible||D===this.kc){var A=D.margin,G=A.right+A.left,L=A.top+A.bottom;hh(D,q,r,s,u);var N=D.Ea,O=Math.max(N.width+G,0),U=Math.max(N.height+L,0),Y=D.position.x,ba=D.position.y;isFinite(Y)||(Y=0);isFinite(ba)||(ba=0);if(D instanceof W&&D.sA)var R=D.fb/2,Y=Y-R,ba=ba-R;hb(f,Y,ba,O,U)}}break;case "Vertical":for(var xa=a,Ya=c,za=t.Cb(),Na=0;Na<n;Na++){var va=m.n[Na];if(va.visible||va===this.kc){var Pa=kk(va);if(Pa!==Ug&&Pa!==bk)za.push(va);else{var Ga=
  va.margin,Jf=Ga.right+Ga.left,lf=Ga.top+Ga.bottom;hh(va,xa,Infinity,Ya,0);var Zb=va.Ea,fg=Math.max(Zb.width+Jf,0),ic=Math.max(Zb.height+lf,0);f.width=Math.max(f.width,fg);f.height+=ic}}}var kb=za.length;if(0!==kb){this.Ca.width?xa=Math.min(this.Ca.width,this.He.width):0!==f.width&&(xa=Math.min(f.width,this.He.width));for(Na=0;Na<kb;Na++)if(va=za[Na],va.visible||va===this.kc)Ga=va.margin,Jf=Ga.right+Ga.left,lf=Ga.top+Ga.bottom,hh(va,xa,Infinity,Ya,0),Zb=va.Ea,fg=Math.max(Zb.width+Jf,0),ic=Math.max(Zb.height+
  lf,0),f.width=Math.max(f.width,fg),f.height+=ic;t.ya(za)}break;case "Horizontal":for(var fb=b,Ia=d,Ja=t.Cb(),Xa=0;Xa<n;Xa++){var db=m.n[Xa];if(db.visible||db===this.kc){var Ab=kk(db);if(Ab!==Ug&&Ab!==ck)Ja.push(db);else{var md=db.margin,mf=md.right+md.left,Dd=md.top+md.bottom;hh(db,Infinity,fb,0,Ia);var nd=db.Ea,Ne=Math.max(nd.width+mf,0),Ed=Math.max(nd.height+Dd,0);f.width+=Ne;f.height=Math.max(f.height,Ed)}}}var se=Ja.length;if(0!==se){this.Ca.height?fb=Math.min(this.Ca.height,this.He.height):0!==
  f.height&&(fb=Math.min(f.height,this.He.height));for(Xa=0;Xa<se;Xa++)if(db=Ja[Xa],db.visible||db===this.kc)md=db.margin,mf=md.right+md.left,Dd=md.top+md.bottom,hh(db,Infinity,fb,0,Ia),nd=db.Ea,Ne=Math.max(nd.width+mf,0),Ed=Math.max(nd.height+Dd,0),f.width+=Ne,f.height=Math.max(f.height,Ed);t.ya(Ja)}break;case "Spot":a:{var Kf=a,Bb=b,Bg=c,Hb=d,qb=Ek(this,m,n),Za=qb.margin,yb,jc,Lf=Za.right+Za.left,Mf=Za.top+Za.bottom;hh(qb,Kf,Bb,Bg,Hb);var kc=qb.Ea,Uc=kc.width,od=kc.height,dc=Math.max(Uc+Lf,0),pd=
  Math.max(od+Mf,0);f.x=-Za.left;f.y=-Za.top;f.width=dc;f.height=pd;for(var $a=0;$a<n;$a++){var Ta=m.n[$a];if(Ta!==qb&&(Ta.visible||Ta===this.kc)){Za=Ta.margin;yb=Za.right+Za.left;jc=Za.top+Za.bottom;hh(Ta,Kf,Bb,0,0);var kc=Ta.Ea,dc=Math.max(kc.width+yb,0),pd=Math.max(kc.height+jc,0),Rb=Ta.alignment;Rb.Pc()&&(Rb=this.Xj);Rb.vd()||(Rb=Kb);var Ib=Ta.Rj;Ib.Pc()&&(Ib=Kb);hb(f,Rb.x*Uc+Rb.offsetX-(Ib.x*kc.width-Ib.offsetX)-Za.left,Rb.y*od+Rb.offsetY-(Ib.y*kc.height-Ib.offsetY)-Za.top,dc,pd)}}var Oe=qb.gi;
  Oe===Vg&&(Oe=kk(qb));switch(Oe){case Ug:break a;case Cc:if(!isFinite(Kf)&&!isFinite(Bb))break a;break;case ck:if(!isFinite(Kf))break a;break;case bk:if(!isFinite(Bb))break a}kc=qb.Ea;Uc=kc.width;od=kc.height;dc=Math.max(Uc+Lf,0);pd=Math.max(od+Mf,0);Za=qb.margin;f.x=-Za.left;f.y=-Za.top;f.width=dc;f.height=pd;for($a=0;$a<n;$a++)Ta=m.n[$a],Ta===qb||!Ta.visible&&Ta!==this.kc||(Za=Ta.margin,yb=Za.right+Za.left,jc=Za.top+Za.bottom,kc=Ta.Ea,dc=Math.max(kc.width+yb,0),pd=Math.max(kc.height+jc,0),Rb=Ta.alignment,
  Rb.Pc()&&(Rb=this.Xj),Rb.vd()||(Rb=Kb),Ib=Ta.Rj,Ib.Pc()&&(Ib=Kb),hb(f,Rb.x*Uc+Rb.offsetX-(Ib.x*kc.width-Ib.offsetX)-Za.left,Rb.y*od+Rb.offsetY-(Ib.y*kc.height-Ib.offsetY)-Za.top,dc,pd))}break;case "Auto":var Pd=a,pc=b,Jb=c,ee=d,rb=Ek(this,m,n),Fd=rb.margin,Cg=Fd.right+Fd.left,Pe=Fd.top+Fd.bottom;hh(rb,Pd,pc,Jb,ee);var Gd=rb.Ea,gb=Math.max(Gd.width+Cg,0),nf=Math.max(Gd.height+Pe,0),ib=Jl(rb),sb=ib.x*gb+ib.offsetX,Vc=ib.y*nf+ib.offsetY,ib=Kl(rb),Nb=ib.x*gb+ib.offsetX,Qd=ib.y*nf+ib.offsetY,Rd=Pd,fe=
  pc;isFinite(Pd)&&(Rd=Math.abs(sb-Nb));isFinite(pc)&&(fe=Math.abs(Vc-Qd));var Fc=t.Al();Fc.p(0,0);for(var te=0;te<n;te++){var Gc=m.n[te];if(Gc!==rb&&(Gc.visible||Gc===this.kc)){var Fd=Gc.margin,Cb=Fd.right+Fd.left,Qe=Fd.top+Fd.bottom;hh(Gc,Rd,fe,0,0);Gd=Gc.Ea;gb=Math.max(Gd.width+Cb,0);nf=Math.max(Gd.height+Qe,0);Fc.p(Math.max(gb,Fc.width),Math.max(nf,Fc.height))}}if(1===n)f.width=gb,f.height=nf,t.bk(Fc);else{var qd=Jl(rb),lb=Kl(rb),Hd,Db;lb.x!==qd.x&&lb.y!==qd.y&&(Hd=Fc.width/Math.abs(lb.x-qd.x),
  Db=Fc.height/Math.abs(lb.y-qd.y));t.bk(Fc);var Sd=0;rb instanceof W&&(Sd=rb.fb*rb.scale,Ll(rb)===Wg&&(Hd=Math.max(Hd,Db),Db=Math.max(Hd,Db)));Hd+=Math.abs(qd.offsetX)+Math.abs(lb.offsetX)+Sd;Db+=Math.abs(qd.offsetY)+Math.abs(lb.offsetY)+Sd;var Id=rb.gi;Id===Vg&&(Id=kk(rb));switch(Id){case Ug:ee=Jb=0;break;case Cc:isFinite(Pd)&&(Hd=Pd);isFinite(pc)&&(Db=pc);break;case ck:isFinite(Pd)&&(Hd=Pd);ee=0;break;case bk:Jb=0,isFinite(pc)&&(Db=pc)}rb instanceof W&&!rb.Ca.N()&&(rb.ah?rb.xk=null:rb.Oa=null);Fk(rb);
  hh(rb,Hd,Db,Jb,ee);f.width=rb.Ea.width+Cg;f.height=rb.Ea.height+Pe}break;case "Table":for(var lc=a,Ob=b,tb=n,of=c,bb=d,Jd=t.Cb(),Wc=t.Cb(),la=0;la<tb;la++){var ta=m.n[la];if(ta instanceof y&&(ta.type===tk||ta.type===uk)&&ta.visible){Wc.push(ta);for(var tj=ta.xa,nh=tj.length,xc=0;xc<nh;xc++){var oh=tj.n[xc];ta.type===tk?oh.qc=ta.qc:ta.type===uk&&(oh.column=ta.column);Jd.push(oh)}}else Jd.push(ta)}for(var tb=Jd.length,ec=[],la=0;la<tb;la++)ta=Jd[la],lk(ta,!0),pk(ta,!0),ec[ta.qc]||(ec[ta.qc]=[]),ec[ta.qc][ta.column]||
  (ec[ta.qc][ta.column]=[]),ec[ta.qc][ta.column].push(ta);t.ya(Jd);for(var Dg=t.Cb(),gg=t.Cb(),Hc=t.Cb(),Ic={count:0},Jc={count:0},yc=lc,Kc=Ob,Nf=this.kd,tb=Nf.length,la=0;la<tb;la++){var ka=Nf[la];void 0!==ka&&Ml(ka,0)}Nf=this.dd;tb=Nf.length;for(la=0;la<tb;la++)ka=Nf[la],void 0!==ka&&Ml(ka,0);for(var ge=ec.length,Td=0,la=0;la<ge;la++)ec[la]&&(Td=Math.max(Td,ec[la].length));for(var hg=Math.min(this.Pi,ge-1),uj=Math.min(this.zi,Td-1),Xc,ge=ec.length,la=hg;la<ge;la++)if(ec[la]){var Td=ec[la].length,
  jb=this.Hd(la);Ml(jb,0);for(xc=uj;xc<Td;xc++)if(ec[la][xc]){var nb=this.Gd(xc);void 0===Dg[xc]&&(Ml(nb,0),Dg[xc]=!0);for(var hi=ec[la][xc],tl=hi.length,ig=0;ig<tl;ig++)if(ta=hi[ig],ta.visible||ta===this.kc){var jg=1<ta.Kj||1<ta.sj;jg&&gg.push(ta);var Sb=ta.margin,Of=Sb.right+Sb.left,Pf=Sb.top+Sb.bottom,Ud=Ik(ta,jb,nb),he=ta.Ca,ph=!isNaN(he.width),Qf=!isNaN(he.height),Re=ph&&Qf;jg||Ud===Ug||Re||(void 0===Ic[xc]&&(Ic[xc]=-1,Ic.count++),void 0===Jc[la]&&(Jc[la]=-1,Jc.count++),Hc.push(ta));hh(ta,Infinity,
  Infinity,0,0);var ue=ta.Ea,Se=Math.max(ue.width+Of,0),Te=Math.max(ue.height+Pf,0);1!==ta.Kj||!Qf&&Ud!==Ug&&Ud!==ck||(ka=this.Hd(la),Xc=Math.max(Te-ka.fc,0),Xc>Kc&&(Xc=Kc),Ml(ka,ka.fc+Xc),Kc=Math.max(Kc-Xc,0));1!==ta.sj||!ph&&Ud!==Ug&&Ud!==bk||(ka=this.Gd(xc),Xc=Math.max(Se-ka.fc,0),Xc>yc&&(Xc=yc),Ml(ka,ka.fc+Xc),yc=Math.max(yc-Xc,0));jg&&Fk(ta)}}}t.ya(Dg);for(var ie=0,je=0,tb=this.mw,la=0;la<tb;la++)void 0!==this.dd[la]&&(ie+=this.Gd(la).Kb);tb=this.px;for(la=0;la<tb;la++)void 0!==this.kd[la]&&(je+=
  this.Hd(la).Kb);for(var yc=Math.max(lc-ie,0),sd=Kc=Math.max(Ob-je,0),qh=yc,tb=Hc.length,la=0;la<tb;la++){var ta=Hc[la],jb=this.Hd(ta.qc),nb=this.Gd(ta.column),Eg=ta.Ea,Sb=ta.margin,Of=Sb.right+Sb.left,Pf=Sb.top+Sb.bottom;Ic[ta.column]=0===nb.fc?Math.max(Eg.width+Of,Ic[ta.column]):null;Jc[ta.qc]=0===jb.fc?Math.max(Eg.height+Pf,Jc[ta.qc]):null}var Vd=0,Fg=0;for(la in Jc)"count"!==la&&(Vd+=Jc[la]);for(la in Ic)"count"!==la&&(Fg+=Ic[la]);for(var zb=t.Al(),la=0;la<tb;la++)if(ta=Hc[la],ta.visible||ta===
  this.kc){var jb=this.Hd(ta.qc),nb=this.Gd(ta.column),ke;isFinite(nb.width)?ke=nb.width:(ke=isFinite(yc)&&null!==Ic[ta.column]?0===Fg?nb.fc+yc:Ic[ta.column]/Fg*qh:null!==Ic[ta.column]?yc:nb.fc||yc,ke=Math.max(0,ke-Il(nb)));var pf;isFinite(jb.height)?pf=jb.height:(pf=isFinite(Kc)&&null!==Jc[ta.qc]?0===Vd?jb.fc+Kc:Jc[ta.qc]/Vd*sd:null!==Jc[ta.qc]?Kc:jb.fc||Kc,pf=Math.max(0,pf-Il(jb)));zb.p(Math.max(nb.ei,Math.min(ke,nb.zf)),Math.max(jb.ei,Math.min(pf,jb.zf)));Ud=Ik(ta,jb,nb);switch(Ud){case ck:zb.height=
  Infinity;break;case bk:zb.width=Infinity}Sb=ta.margin;Of=Sb.right+Sb.left;Pf=Sb.top+Sb.bottom;Fk(ta);hh(ta,zb.width,zb.height,nb.ei,jb.ei);ue=ta.Ea;Se=Math.max(ue.width+Of,0);Te=Math.max(ue.height+Pf,0);isFinite(yc)&&(Se=Math.min(Se,zb.width));isFinite(Kc)&&(Te=Math.min(Te,zb.height));var qf;qf=jb.fc;Ml(jb,Math.max(jb.fc,Te));Xc=jb.fc-qf;Kc=Math.max(Kc-Xc,0);qf=nb.fc;Ml(nb,Math.max(nb.fc,Se));Xc=nb.fc-qf;yc=Math.max(yc-Xc,0)}t.ya(Hc);for(var Wd=t.Al(),tb=gg.length,la=0;la<tb;la++)if(ta=gg[la],ta.visible||
  ta===this.kc){jb=this.Hd(ta.qc);nb=this.Gd(ta.column);zb.p(Math.max(nb.ei,Math.min(lc,nb.zf)),Math.max(jb.ei,Math.min(Ob,jb.zf)));Ud=Ik(ta,jb,nb);switch(Ud){case Cc:0!==nb.fc&&(zb.width=Math.min(zb.width,nb.fc));0!==jb.fc&&(zb.height=Math.min(zb.height,jb.fc));break;case ck:0!==nb.fc&&(zb.width=Math.min(zb.width,nb.fc));break;case bk:0!==jb.fc&&(zb.height=Math.min(zb.height,jb.fc))}isFinite(nb.width)&&(zb.width=nb.width);isFinite(jb.height)&&(zb.height=jb.height);Wd.p(0,0);for(var fc=1;fc<ta.Kj&&
  !(ta.qc+fc>=this.px);fc++)ka=this.Hd(ta.qc+fc),Wd.height+=Math.max(ka.ei,isNaN(ka.Mf)?ka.zf:Math.min(ka.Mf,ka.zf));for(fc=1;fc<ta.sj&&!(ta.column+fc>=this.mw);fc++)ka=this.Gd(ta.column+fc),Wd.width+=Math.max(ka.ei,isNaN(ka.Mf)?ka.zf:Math.min(ka.Mf,ka.zf));zb.width+=Wd.width;zb.height+=Wd.height;Sb=ta.margin;Of=Sb.right+Sb.left;Pf=Sb.top+Sb.bottom;hh(ta,zb.width,zb.height,of,bb);for(var ue=ta.Ea,Se=Math.max(ue.width+Of,0),Te=Math.max(ue.height+Pf,0),Gg=0,fc=0;fc<ta.Kj;fc++)ka=this.Hd(ta.qc+fc),Gg+=
  ka.total||0;if(Gg<Te)for(var Xd=Te-Gg;0<Xd;){var qc=ka.Kb||0;isNaN(ka.height)&&ka.zf>qc&&(Ml(ka,Math.min(ka.zf,qc+Xd)),ka.Kb!==qc&&(Xd-=ka.Kb-qc));if(-1===ka.index-1)break;ka=this.Hd(ka.index-1)}for(var Ue=0,fc=0;fc<ta.sj;fc++)ka=this.Gd(ta.column+fc),Ue+=ka.total||0;if(Ue<Se)for(Xd=Se-Ue;0<Xd;){qc=ka.Kb||0;isNaN(ka.width)&&ka.zf>qc&&(Ml(ka,Math.min(ka.zf,qc+Xd)),ka.Kb!==qc&&(Xd-=ka.Kb-qc));if(-1===ka.index-1)break;ka=this.Gd(ka.index-1)}}t.ya(gg);t.bk(Wd);t.bk(zb);for(var rf=0,le=0,Ud=kk(this),Hg=
  this.Ca,kg=this.He,Lc=je=ie=0,me=0,tb=this.mw,la=0;la<tb;la++)void 0!==this.dd[la]&&(ka=this.Gd(la),isFinite(ka.width)?(Lc+=ka.width,Lc+=Il(ka)):Nl(ka)===Ol?(Lc+=ka.Kb,Lc+=Il(ka)):0!==ka.Kb&&(ie+=ka.Kb,ie+=Il(ka)));var rf=isFinite(Hg.width)?Math.min(Hg.width,kg.width):Ud!==Ug&&isFinite(lc)?lc:ie,rf=Math.max(rf,this.Vf.width),rf=Math.max(rf-Lc,0),Jg=Math.max(rf/ie,1);isFinite(Jg)||(Jg=1);for(la=0;la<tb;la++)void 0!==this.dd[la]&&(ka=this.Gd(la),isFinite(ka.width)||Nl(ka)===Ol||Ml(ka,ka.Kb*Jg),ka.Ma=
  f.width,0!==ka.Kb&&(f.width+=ka.Kb,f.width+=Il(ka)));tb=this.px;for(la=0;la<tb;la++)void 0!==this.kd[la]&&(ka=this.Hd(la),isFinite(ka.height)?(me+=ka.height,me+=Il(ka)):Nl(ka)===Ol?(me+=ka.Kb,me+=Il(ka)):0!==ka.Kb&&(je+=ka.Kb,je+=Il(ka)));var le=isFinite(Hg.height)?Math.min(Hg.height,kg.height):Ud!==Ug&&isFinite(Ob)?Ob:je,le=Math.max(le,this.Vf.height),le=Math.max(le-me,0),Ve=Math.max(le/je,1);isFinite(Ve)||(Ve=1);for(la=0;la<tb;la++)void 0!==this.kd[la]&&(ka=this.Hd(la),isFinite(ka.height)||Nl(ka)===
  Ol||Ml(ka,ka.Kb*Ve),ka.Ma=f.height,0!==ka.Kb&&(f.height+=ka.Kb,f.height+=Il(ka)));tb=Wc.length;for(la=0;la<tb;la++){var Yc=Wc[la];Yc.type===tk?(ke=f.width,ka=this.Hd(Yc.qc),pf=ka.fc):(ka=this.Gd(Yc.column),ke=ka.fc,pf=f.height);Yc.Wc.p(0,0,ke,pf);lk(Yc,!1);ec[Yc.qc]||(ec[Yc.qc]=[]);ec[Yc.qc][Yc.column]||(ec[Yc.qc][Yc.column]=[]);ec[Yc.qc][Yc.column].push(Yc)}t.ya(Wc);this.bs=ec;break;case "Viewbox":var wj=a,xj=b,Go=c,Ho=d;1<n&&t.m("Viewbox Panel cannot contain more than one GraphObject.");var ve=
  m.n[0];ve.wc=1;Fk(ve);hh(ve,Infinity,Infinity,Go,Ho);var ii=ve.Ea,yj=ve.margin,Io=yj.right+yj.left,Jo=yj.top+yj.bottom;if(isFinite(wj)||isFinite(xj)){var Mq=ve.scale,Ko=ii.width,Lo=ii.height,Mo=Math.max(wj-Io,0),No=Math.max(xj-Jo,0),ul=this.Io===Wg?Math.min(Mo/Ko,No/Lo):Math.max(Mo/Ko,No/Lo);0===ul&&(ul=1E-4);ve.wc*=ul;Mq!==ve.scale&&(lk(ve,!0),hh(ve,Infinity,Infinity,Go,Ho))}ii=ve.Ea;f.width=isFinite(wj)?wj:Math.max(ii.width+Io,0);f.height=isFinite(xj)?xj:Math.max(ii.height+Jo,0);break;case "Link":var zj=
  this instanceof Je?this.Xh:this;if(0===n){var Aj=this.hd;Va(Aj,0,0);var Yd=this.Ea;Yd.p(0,0,0,0)}else{var Bj=this.Rq(),We=this.vj(),we=this.Qi;we.assign(We);we.x=0;we.y=0;var rh,ji=this.Sy();rh=void 0!==this.oa?this.oa:ji.count;this.Yg.p(We.x,We.y);this.mi.clear();null!==Bj&&(Pl(Bj,We.width,We.height),Yd=Bj.Ea,we.lj(Yd),this.mi.add(Yd));for(var sh=t.ph(),ki=t.K(),Rf=t.K(),vl=0;vl<n;vl++){var Tb=m.n[vl];if(Tb!==Bj)if(Tb.fj&&Tb instanceof W)Pl(Tb,We.width,We.height),Yd=Tb.Ea,we.lj(Yd),this.mi.add(Yd);
  else if(2>rh)hh(Tb,Infinity,Infinity),Yd=Tb.Ea,we.lj(Yd),this.mi.add(Yd);else{var Sf=Tb.Cf,Po=Tb.Lt,wl=Tb.Rj;wl.Ge()&&(wl=Kb);var li=Tb.Mt,Nq=Tb.$A,mi,ni,Cj=0;if(Sf<-rh||Sf>=rh){var Qo=zj.zF,oi=zj.yF;li!==yg&&(Cj=zj.computeAngle(Tb,li,oi),Tb.angle=Cj);mi=Qo.x-We.x;ni=Qo.y-We.y}else{var sf,th;if(0<=Sf)sf=ji.n[Sf],th=Sf<rh-1?ji.n[Sf+1]:sf;else{var xl=rh+Sf;sf=ji.n[xl];th=0<xl?ji.n[xl-1]:sf}oi=0<=Sf?sf.$i(th):th.$i(sf);li!==yg&&(Cj=zj.computeAngle(Tb,li,oi),Tb.wn=Cj);mi=sf.x+(th.x-sf.x)*Po-We.x;ni=sf.y+
  (th.y-sf.y)*Po-We.y}hh(Tb,Infinity,Infinity);var Yd=Tb.Ea,Aj=Tb.Ra,pi=0;Tb instanceof W&&(pi=Tb.fb);var Dj=Aj.width+pi,yl=Aj.height+pi;sh.reset();sh.translate(-Yd.x,-Yd.y);sh.scale(Tb.scale,Tb.scale);sh.rotate(li===yg?Tb.angle:oi,Dj/2,yl/2);var uh=new x(0,0,Dj,yl);ki.Ot(uh,wl);sh.Ta(ki);var Oq=-ki.x+pi/2,Pq=-ki.y+pi/2;Rf.assign(Nq);isNaN(Rf.x)&&(Rf.x=0<=Sf?Dj/2+3:-(Dj/2+3));isNaN(Rf.y)&&(Rf.y=-(yl/2+3));Rf.rotate(oi);mi+=Rf.x;ni+=Rf.y;uh.set(Yd);uh.x=mi+Oq;uh.y=ni+Pq;this.mi.add(uh);we.lj(uh)}}if(this.we)for(var Ro=
  this.ek;Ro.next();)hh(Ro.value,Infinity,Infinity);this.Qi=we;var Ej=this.Yg;Ej&&Ej.p(Ej.x+we.x,Ej.y+we.y);Va(f,we.width||0,we.height||0);t.We(sh);t.B(ki);t.B(Rf)}break;case "Grid":break;case "TableRow":case "TableColumn":t.m(this.toString()+" is not an element of a Table Panel. TableRow and TableColumn Panels can only be elements of a Table Panel.");break;default:t.m("Unknown panel type: "+p)}}var xe=f.width,ye=f.height,Fj=this.padding,Qq=Fj.top+Fj.bottom,xe=xe+(Fj.left+Fj.right),ye=ye+Qq;isFinite(g.width)&&
  (xe=g.width);isFinite(g.height)&&(ye=g.height);xe=Math.min(k.width,xe);ye=Math.min(k.height,ye);xe=Math.max(h.width,xe);ye=Math.max(h.height,ye);xe=Math.max(c,xe);ye=Math.max(d,ye);f.width=xe;f.height=ye;Va(this.hd,xe,ye);hk(this,0,0,xe,ye)};y.prototype.findMainElement=y.prototype.Dw=function(){null===this.Eo&&Ek(this,this.xa,this.xa.length);return this.Eo};function Ek(a,b,c){for(var d=0;d<c;d++){var f=b.n[d];if(!0===f.fj)return a.Eo=f}b=b.n[0];return a.Eo=b}
  y.prototype.Uj=function(a,b,c,d){var f=this.Qi,g=this.xa,h=g.length,k=t.hk(0,0,0,0);if(0===h){var l=this.pa;l.x=a;l.y=b;l.width=c;l.height=d}else{if(!this.Ca.N()){var m=kk(this),n=this.Wc,p=n.width,q=n.height,r=this.margin,s=r.left+r.right,u=r.top+r.bottom;p===c&&q===d&&(m=Ug);switch(m){case Ug:if(p>c||q>d)this.fa(),hh(this,p>c?c:p,q>d?d:q);break;case Cc:lk(this,!0);hh(this,c+s,d+u,0,0);break;case ck:lk(this,!0);hh(this,c+s,q+u,0,0);break;case bk:lk(this,!0),hh(this,p+s,d+u,0,0)}}l=this.pa;l.x=a;
  l.y=b;l.width=c;l.height=d;var v=this.da.Yb;switch(v){case "Position":for(var D=f.x-this.padding.left,A=f.y-this.padding.top,G=0;G<h;G++){var L=g.n[G],N=L.Ea,O=L.margin,U=L.position.x,Y=L.position.y;k.x=isNaN(U)?-D:U-D;k.y=isNaN(Y)?-A:Y-A;if(L instanceof W&&L.sA){var ba=L.fb/2;k.x-=ba;k.y-=ba}k.x+=O.left;k.y+=O.top;k.width=N.width;k.height=N.height;L.visible&&L.Lc(k.x,k.y,k.width,k.height)}break;case "Vertical":for(var R=this.padding.left,xa=this.padding.top,Ya=0;Ya<h;Ya++){var za=R,Na=g.n[Ya];if(Na.visible){var va=
  Na.Ea,Pa=Na.margin,Ga=Pa.left+Pa.right,Jf=R+this.padding.right,lf=va.width,Zb=kk(Na);if(isNaN(Na.Ca.width)&&Zb===Cc||Zb===ck)lf=Math.max(f.width-Ga-Jf,0);var fg=lf+Ga+Jf,ic=Na.alignment;ic.Pc()&&(ic=this.Xj);ic.vd()||(ic=Kb);Na.Lc(za+ic.offsetX+Pa.left+(f.width*ic.x-fg*ic.x),xa+ic.offsetY+Pa.top,lf,va.height);xa+=va.height+Pa.bottom+Pa.top}}break;case "Horizontal":for(var kb=this.padding.top,fb=this.padding.left,Ia=0;Ia<h;Ia++){var Ja=kb,Xa=g.n[Ia];if(Xa.visible){var db=Xa.Ea,Ab=Xa.margin,md=Ab.top+
  Ab.bottom,mf=kb+this.padding.bottom,Dd=db.height,nd=kk(Xa);if(isNaN(Xa.Ca.height)&&nd===Cc||nd===bk)Dd=Math.max(f.height-md-mf,0);var Ne=Dd+md+mf,Ed=Xa.alignment;Ed.Pc()&&(Ed=this.Xj);Ed.vd()||(Ed=Kb);Xa.Lc(fb+Ed.offsetX+Ab.left,Ja+Ed.offsetY+Ab.top+(f.height*Ed.y-Ne*Ed.y),db.width,Dd);fb+=db.width+Ab.left+Ab.right}}break;case "Spot":var se=Ek(this,g,h),Kf=se.Ea,Bb=Kf.width,Bg=Kf.height,Hb=this.padding,qb=Hb.left,Za=Hb.top;k.x=qb-f.x;k.y=Za-f.y;se.Lc(k.x,k.y,Bb,Bg);for(var yb=0;yb<h;yb++){var jc=
  g.n[yb];if(jc!==se){var Lf=jc.Ea,Mf=Lf.width,kc=Lf.height,Uc=jc.alignment;Uc.Pc()&&(Uc=this.Xj);Uc.vd()||(Uc=Kb);var od=jc.Rj;od.Pc()&&(od=Kb);k.x=Uc.x*Bb+Uc.offsetX-(od.x*Mf-od.offsetX);k.y=Uc.y*Bg+Uc.offsetY-(od.y*kc-od.offsetY);k.x-=f.x;k.y-=f.y;jc.visible&&jc.Lc(qb+k.x,Za+k.y,Mf,kc)}}break;case "Auto":var dc=Ek(this,g,h),pd=dc.Ea,$a=t.Gf();$a.p(0,0,1,1);var Ta=dc.margin,Rb=Ta.left,Ib=Ta.top,Oe=this.padding,Pd=Oe.left,pc=Oe.top;k.x=Rb;k.y=Ib;k.width=pd.width;k.height=pd.height;dc.Lc(Pd+k.x,pc+
  k.y,k.width,k.height);var Jb=Jl(dc),ee=Kl(dc),rb=0+Jb.y*pd.height+Jb.offsetY,Fd=0+ee.x*pd.width+ee.offsetX,Cg=0+ee.y*pd.height+ee.offsetY;$a.x=0+Jb.x*pd.width+Jb.offsetX;$a.y=rb;hb($a,Fd,Cg,0,0);$a.x+=Rb+Pd;$a.y+=Ib+pc;for(var Pe=0;Pe<h;Pe++){var Gd=g.n[Pe];if(Gd!==dc){var gb=Gd.Ea,Ta=Gd.margin,nf=Math.max(gb.width+Ta.right+Ta.left,0),ib=Math.max(gb.height+Ta.top+Ta.bottom,0),sb=Gd.alignment;sb.Pc()&&(sb=this.Xj);sb.vd()||(sb=Kb);k.x=$a.width*sb.x+sb.offsetX-nf*sb.x+Ta.left+$a.x;k.y=$a.height*sb.y+
  sb.offsetY-ib*sb.y+Ta.top+$a.y;k.width=$a.width;k.height=$a.height;Gd.visible&&(mb($a.x,$a.y,$a.width,$a.height,k.x,k.y,gb.width,gb.height)?Gd.Lc(k.x,k.y,gb.width,gb.height):Gd.Lc(k.x,k.y,gb.width,gb.height,new x($a.x,$a.y,$a.width,$a.height)))}}t.hc($a);break;case "Table":for(var Vc=this.padding,Nb=Vc.left,Qd=Vc.top,Rd=this.bs,fe,Fc,te=Rd.length,Gc=0,Cb=0;Cb<te;Cb++)Rd[Cb]&&(Gc=Math.max(Gc,Rd[Cb].length));for(var Qe=Math.min(this.Pi,te-1);Qe!==te&&(void 0===this.kd[Qe]||0===this.kd[Qe].Kb);)Qe++;
  for(var Qe=Math.min(Qe,te-1),qd=-this.kd[Qe].Ma,lb=Math.min(this.zi,Gc-1);lb!==Gc&&(void 0===this.dd[lb]||0===this.dd[lb].Kb);)lb++;for(var lb=Math.min(lb,Gc-1),Hd=-this.dd[lb].Ma,Db=t.Al(),Cb=0;Cb<te;Cb++)if(Rd[Cb]){var Gc=Rd[Cb].length,Sd=this.Hd(Cb);Fc=Sd.Ma+qd+Qd+Ql(Sd);for(var Id=0;Id<Gc;Id++)if(Rd[Cb][Id]){var lc=this.Gd(Id);fe=lc.Ma+Hd+Nb+Ql(lc);for(var Ob=Rd[Cb][Id],tb=Ob.length,of=0;of<tb;of++){var bb=Ob[of],Jd=bb.Ea;if(bb instanceof y&&(bb.type===tk||bb.type===uk)){mk(bb);bb.cc.La();var Wc=
  bb.cc;Wc.x=bb.type===tk?Nb:fe;Wc.y=bb.type===uk?Qd:Fc;Wc.width=Jd.width;Wc.height=Jd.height;bb.cc.freeze();pk(bb,!1)}else{Db.p(0,0);for(var la=1;la<bb.rowSpan&&!(Cb+la>=this.px);la++){var ta=this.Hd(Cb+la);Db.height+=ta.total}for(la=1;la<bb.aE&&!(Id+la>=this.mw);la++){var tj=this.Gd(Id+la);Db.width+=tj.total}var nh=lc.Kb+Db.width,xc=Sd.Kb+Db.height;k.x=fe;k.y=Fc;k.width=nh;k.height=xc;var oh=fe,ec=Fc,Dg=nh,gg=xc;fe+nh>f.width&&(Dg=Math.max(f.width-fe,0));Fc+xc>f.height&&(gg=Math.max(f.height-Fc,0));
  var Hc=bb.alignment,Ic,Jc,yc,Kc;if(Hc.Pc()){Hc=this.Xj;Hc.vd()||(Hc=Kb);Ic=Hc.x;Jc=Hc.y;yc=Hc.offsetX;Kc=Hc.offsetY;var Nf=lc.alignment,ka=Sd.alignment;Nf.vd()&&(Ic=Nf.x,yc=Nf.offsetX);ka.vd()&&(Jc=ka.y,Kc=ka.offsetY)}else Ic=Hc.x,Jc=Hc.y,yc=Hc.offsetX,Kc=Hc.offsetY;if(isNaN(Ic)||isNaN(Jc))Jc=Ic=0.5,Kc=yc=0;var ge=Jd.width,Td=Jd.height,hg=bb.margin,uj=hg.left+hg.right,Xc=hg.top+hg.bottom,jb=Ik(bb,Sd,lc);!isNaN(bb.Ca.width)||jb!==Cc&&jb!==ck||(ge=Math.max(nh-uj,0));!isNaN(bb.Ca.height)||jb!==Cc&&jb!==
  bk||(Td=Math.max(xc-Xc,0));var nb=bb.He,hi=bb.Vf,ge=Math.min(nb.width,ge),Td=Math.min(nb.height,Td),ge=Math.max(hi.width,ge),Td=Math.max(hi.height,Td),tl=Td+Xc;k.x+=k.width*Ic-(ge+uj)*Ic+yc+hg.left;k.y+=k.height*Jc-tl*Jc+Kc+hg.top;bb.visible&&(mb(oh,ec,Dg,gg,k.x,k.y,Jd.width,Jd.height)?bb.Lc(k.x,k.y,ge,Td):bb.Lc(k.x,k.y,ge,Td,new x(oh,ec,Dg,gg)))}}}}t.bk(Db);for(Cb=0;Cb<h;Cb++)bb=g.n[Cb],bb instanceof y&&(bb.type===tk||bb.type===uk)&&(Wc=bb.cc,bb.hd.La(),bb.hd.Sp(0,0,Wc.width,Wc.height),bb.hd.freeze());
  break;case "Viewbox":var ig=g.n[0],jg=ig.Ea,Sb=ig.margin,Of=Sb.top+Sb.bottom,Pf=Math.max(jg.width+(Sb.right+Sb.left),0),Ud=Math.max(jg.height+Of,0),he=ig.alignment;he.Pc()&&(he=this.Xj);he.vd()||(he=Kb);k.x=f.width*he.x-Pf*he.x+he.offsetX;k.y=f.height*he.y-Ud*he.y+he.offsetY;k.width=jg.width;k.height=jg.height;ig.Lc(k.x,k.y,k.width,k.height);break;case "Link":var ph=this.Rq(),Qf=0;if(null!==ph&&Qf<this.mi.count){var Re=this.mi.n[Qf];Qf++;ph.Lc(Re.x-this.Qi.x,Re.y-this.Qi.y,Re.width,Re.height)}for(var ue=
  0;ue<h;ue++){var Se=g.n[ue];Se!==ph&&Qf<this.mi.count&&(Re=this.mi.n[Qf],Qf++,Se.Lc(Re.x-this.Qi.x,Re.y-this.Qi.y,Re.width,Re.height))}var Te=this.Sy(),ie=Te.count;if(2<=ie&&this.we)for(var je=this.ek;je.next();){var sd=je.value,qh=ie,Eg=Te,Vd=sd.Cf,Fg=sd.Lt,zb=sd.Rj;zb.Ge()&&(zb=Kb);var ke=sd.Mt,pf=sd.$A,qf=void 0,Wd=void 0,fc=0;if(Vd<-qh||Vd>=qh){var Gg=this.zF,Xd=this.yF;ke!==yg&&(fc=this.computeAngle(sd,ke,Xd),sd.angle=fc);qf=Gg.x;Wd=Gg.y}else{var qc=void 0,Ue=void 0;if(0<=Vd)qc=Eg.n[Vd],Ue=Vd<
  qh-1?Eg.n[Vd+1]:qc;else var rf=qh+Vd,qc=Eg.n[rf],Ue=0<rf?Eg.n[rf-1]:qc;Xd=0<=Vd?qc.$i(Ue):Ue.$i(qc);ke!==yg&&(fc=this.computeAngle(sd,ke,Xd),sd.angle=fc);qf=qc.x+(Ue.x-qc.x)*Fg;Wd=qc.y+(Ue.y-qc.y)*Fg}var le=t.ph();le.reset();le.scale(sd.scale,sd.scale);le.rotate(sd.angle,0,0);var Hg=sd.Ra,kg=t.hk(0,0,Hg.width,Hg.height),Lc=t.K();Lc.Ot(kg,zb);le.Ta(Lc);var me=-Lc.x,Jg=-Lc.y,Ve=pf.copy();isNaN(Ve.x)&&(Ve.x=0<=Vd?Lc.x+3:-(Lc.x+3));isNaN(Ve.y)&&(Ve.y=-(Lc.y+3));Ve.rotate(Xd);qf+=Ve.x;Wd+=Ve.y;le.KG(kg);
  var me=me+kg.x,Jg=Jg+kg.y,Yc=t.lc(qf+me,Wd+Jg);sd.move(Yc);t.B(Yc);t.B(Lc);t.hc(kg);t.We(le)}this.bx();break;case "Grid":break;case "TableRow":case "TableColumn":t.m(this.toString()+" is not an element of a Table Panel.TableRow and TableColumn panels can only be elements of a Table Panel.");break;default:t.m("Unknown panel type: "+v)}t.hc(k)}};
  y.prototype.Vj=function(a){var b=this.Ra;if(mb(0,0,b.width,b.height,a.x,a.y)){for(var c=this.xa.length,b=t.lc(0,0);c--;){var d=this.xa.n[0];if(d.visible||d===this.kc)if(Qa(b.set(a),d.transform),d.Ga(b))return t.B(b),!0}t.B(b);return null===this.Lb&&null===this.tc?!1:!0}return!1};function Rl(a,b,c){c(a,b);if(b instanceof y){b=b.xa.n;for(var d=b.length,f=0;f<d;f++)Rl(a,b[f],c)}}function $i(a,b){Sl(a,a,b)}
  function Sl(a,b,c){c(b);b=b.xa.n;for(var d=b.length,f=0;f<d;f++){var g=b[f];g instanceof y&&Sl(a,g,c)}}y.prototype.walkVisualTree=function(a){Tl(this,this,a)};function Tl(a,b,c){c(b);if(b instanceof y){b=b.xa.n;for(var d=b.length,f=0;f<d;f++)Tl(a,b[f],c)}}y.prototype.findInVisualTree=y.prototype.at=function(a){return Ul(this,this,a)};function Ul(a,b,c){if(c(b))return b;if(b instanceof y){b=b.xa.n;for(var d=b.length,f=0;f<d;f++){var g=Ul(a,b[f],c);if(null!==g)return g}}return null}
  y.prototype.findObject=y.prototype.oe=function(a){if(this.name===a)return this;for(var b=this.xa.n,c=b.length,d=0;d<c;d++){var f=b[d];if(f.name===a)return f;if(f instanceof y)if(null===f.yi&&null===f.hg){if(f=f.oe(a),null!==f)return f}else if(Vl(f)&&(f=f.xa.$a(),null!==f&&(f=f.oe(a),null!==f)))return f}return null};
  function Wl(a){a=a.xa.n;for(var b=a.length,c=0,d=0;d<b;d++){var f=a[d];if(f instanceof y)c=Math.max(c,Wl(f));else if(f instanceof W){a:{if(!f.ah)switch(f.Pn){case "None":case "Square":case "Ellipse":case "Circle":case "LineH":case "LineV":case "FramedRectangle":case "RoundedRectangle":case "Line1":case "Line2":case "Border":case "Cube1":case "Cube2":case "Junction":case "Cylinder1":case "Cylinder2":case "Cylinder3":case "Cylinder4":case "PlusLine":case "XLine":case "ThinCross":case "ThickCross":f=0;
  break a}f=f.bh/2*f.wm*f.dk()}c=Math.max(c,f)}}return c}aa=y.prototype;aa.Hf=function(){return!(this.type===tk||this.type===uk)};
  aa.pe=function(a,b,c){if(!1===this.Bf)return null;void 0===b&&(b=null);void 0===c&&(c=null);if(Pi(this))return null;var d=this.Ra,f=1/this.dk(),g=this.Hf(),h=g?a:Qa(t.lc(a.x,a.y),this.transform);if(mb(-(5*f),-(5*f),d.width+10*f,d.height+10*f,h.x,h.y)){if(!this.Vg){for(var k=this.xa.length,f=t.K();k--;){var l=this.xa.n[k];if(l.visible||l===this.kc){l.Hf()?Qa(f.set(a),l.transform):f.set(a);var m=null;l instanceof y?m=l.pe(f,b,c):!0===l.Bf&&l.Ga(f)&&(m=l);if(null!==m&&(null!==b&&(m=b(m)),m&&(null===
  c||c(m))))return t.B(f),g||t.B(h),m}}t.B(f)}if(null===this.background&&null===this.Zk)return g||t.B(h),null;a=mb(0,0,d.width,d.height,h.x,h.y)?this:null;g||t.B(h);return a}g||t.B(h);return null};
  aa.cp=function(a,b,c,d){if(!1===this.Bf)return!1;void 0===b&&(b=null);void 0===c&&(c=null);d instanceof B||d instanceof C||(d=new B(Q));var f=this.Ra,g=this.Hf(),h=g?a:Qa(t.lc(a.x,a.y),this.transform);if(mb(0,0,f.width,f.height,h.x,h.y)){if(!this.Vg){for(var k=this.xa.length,f=t.K();k--;){var l=this.xa.n[k];if(l.visible||l===this.kc)l.Hf()?Qa(f.set(a),l.transform):f.set(a),(l instanceof y?l.cp(f,b,c,d):l.Ga(f))&&!1!==l.Bf&&(null!==b&&(l=b(l)),l&&(null===c||c(l))&&d.add(l))}t.B(f)}g||t.B(h);return null!==
  this.background||null!==this.Zk}g||t.B(h);return!1};
  aa.ak=function(a,b,c,d,f,g){if(!1===this.Bf)return!1;void 0===b&&(b=null);void 0===c&&(c=null);var h=g;void 0===g&&(h=t.ph(),h.reset());h.multiply(this.transform);if(this.Im(a,h))return Xl(this,b,c,f),void 0===g&&t.We(h),!0;if(this.Tf(a,h)){if(!this.Vg)for(var k=this.xa.length;k--;){var l=this.xa.n[k];if(l.visible||l===this.kc){var m=l.pa,n=this.Ra;if(!(m.x>n.width||m.y>n.height||0>m.x+m.width||0>m.y+m.height)){m=t.ph();m.set(h);if(l instanceof y?l.ak(a,b,c,d,f,m):jk(l,a,d,m))null!==b&&(l=b(l)),l&&
  (null===c||c(l))&&f.add(l);t.We(m)}}}void 0===g&&t.We(h);return d}void 0===g&&t.We(h);return!1};function Xl(a,b,c,d){for(var f=a.xa.length;f--;){var g=a.xa.n[f];if(g.visible){var h=g.pa,k=a.Ra;h.x>k.width||h.y>k.height||0>h.x+h.width||0>h.y+h.height||(g instanceof y&&Xl(g,b,c,d),null!==b&&(g=b(g)),g&&(null===c||c(g))&&d.add(g))}}}
  aa.Pm=function(a,b,c,d,f,g){if(!1===this.Bf)return!1;void 0===c&&(c=null);void 0===d&&(d=null);var h=this.Ra,k=this.Hf(),l=k?a:Qa(t.lc(a.x,a.y),this.transform),m=k?b:Qa(t.lc(b.x,b.y),this.transform),n=l.Zj(m),p=0<l.x&&l.x<h.width&&0<l.y&&l.y<h.height||Ra(l.x,l.y,0,0,0,h.height)<n||Ra(l.x,l.y,0,h.height,h.width,h.height)<n||Ra(l.x,l.y,h.width,h.height,h.width,0)<n||Ra(l.x,l.y,h.width,0,0,0)<n,h=0<l.x&&l.x<h.width&&0<l.y&&l.y<h.height&&Ra(l.x,l.y,0,0,0,h.height)<n&&Ra(l.x,l.y,0,h.height,h.width,h.height)<
  n&&Ra(l.x,l.y,h.width,h.height,h.width,0)<n&&Ra(l.x,l.y,h.width,0,0,0)<n;k||(t.B(l),t.B(m));if(p){if(!this.Vg){k=t.K();l=t.K();for(m=this.xa.length;m--;)if(n=this.xa.n[m],n.visible||n===this.kc){var q=n.pa,r=this.Ra;q.x>r.width||q.y>r.height||0>q.x+q.width||0>q.y+q.height||(n.Hf()?(q=n.transform,Qa(k.set(a),q),Qa(l.set(b),q)):(k.set(a),l.set(b)),n instanceof y?!n.Pm(k,l,c,d,f,g):!n.CE(k,l,f))||(null!==c&&(n=c(n)),n&&(null===d||d(n))&&g.add(n))}t.B(k);t.B(l)}return f?p:h}return!1};
  function Jl(a){var b=a.G;if(void 0===b||b===xb)b=null;null===b&&a instanceof W&&(a=a.Oa,null!==a&&(b=a.G));null===b&&(b=Eb);return b}function Kl(a){var b=a.H;if(void 0===b||b===xb)b=null;null===b&&a instanceof W&&(a=a.Oa,null!==a&&(b=a.H));null===b&&(b=Pb);return b}y.prototype.add=y.prototype.add=function(a){t.l(a,Q,y,"add:element");this.Jd(this.xa.count,a)};y.prototype.elt=y.prototype.wa=function(a){return this.xa.wa(a)};
  y.prototype.insertAt=y.prototype.Jd=function(a,b){b instanceof E&&t.m("Cannot add a Part to a Panel: "+b);if(this===b||this.ej(b))this===b&&t.m("Cannot make a Panel contain itself: "+this.toString()),t.m("Cannot make a Panel indirectly contain itself: "+this.toString()+" already contains "+b.toString());var c=b.ia;null!==c&&c!==this&&t.m("Cannot add a GraphObject that already belongs to another Panel to this Panel: "+b.toString()+", already contained by "+c.toString()+", cannot be shared by this Panel: "+
  this.toString());this.da!==wi||b instanceof W||t.m("Can only add Shapes to a Grid Panel, not: "+b);b.wl(this);b.lm=null;if(null!==this.zA){var d=b.data;null!==d&&"object"===typeof d&&(null===this.gg&&(this.gg=new ja(Object,y)),this.gg.add(d,b))}var f=this.xa,d=-1;if(c===this){for(var g=-1,h=f.count,k=0;k<h;k++)if(f.n[k]===b){g=k;break}if(-1!==g){if(g===a||g+1>=f.count&&a>=f.count)return;f.qd(g);d=g}else t.m("element "+b.toString()+" has panel "+c.toString()+" but is not contained by it.")}if(0>a||
  a>f.count)a=f.count;f.Jd(a,b);this.fa();b.fa();null!==b.Nd?this.Fh=!0:b instanceof y&&!0===b.Fh&&(this.Fh=!0);c=this.S;null!==c&&(c.Gj=null,c.Dj=NaN,this.Fh&&c instanceof S&&(c.Fh=!0),c.Fh&&(c.Rd=null),f=this.h,null!==f&&f.ja.sb||(-1!==d&&c.Ic(xd,"elements",this,b,null,d,null),c.Ic(wd,"elements",this,null,b,null,a)))};y.prototype.remove=y.prototype.remove=function(a){t.l(a,Q,y,"remove:element");for(var b=this.xa,c=b.count,d=-1,f=0;f<c;f++)if(b.n[f]===a){d=f;break}-1!==d&&this.Xe(d)};
  y.prototype.removeAt=y.prototype.qd=function(a){e&&t.q(a,y,"removeAt:idx");0<=a&&this.Xe(a)};y.prototype.Xe=function(a){var b=this.xa,c=b.wa(a);c.lm=null;c.wl(null);if(null!==this.gg){var d=c.data;"object"===typeof d&&this.gg.remove(d)}b.qd(a);lk(this,!1);this.fa();b=this.S;null!==b&&(b.Gj=null,b.Dj=NaN,d=this.h,null!==d&&d.ja.sb||b.Ic(xd,"elements",this,c,null,a,null))};t.A(y,{px:"rowCount"},function(){return void 0===this.kd?0:this.kd.length});
  y.prototype.getRowDefinition=y.prototype.Hd=function(a){if(void 0===this.kd)return null;e&&t.q(a,y,"getRowDefinition:idx");0>a&&t.la(a,">= 0",y,"getRowDefinition:idx");a=Math.round(a);var b=this.kd;if(void 0===b[a]){var c=new Ae;c.wl(this);c.Vl=!0;c.Vc=a;b[a]=c}return b[a]};
  y.prototype.removeRowDefinition=y.prototype.RF=function(a){if(void 0!==this.kd){e&&t.q(a,y,"removeRowDefinition:idx");0>a&&t.la(a,">= 0",y,"removeRowDefinition:idx");a=Math.round(a);var b=this.kd;this.Ic(xd,"coldefs",this,b[a],null,a,null);b[a]&&(b[a]=void 0);this.fa()}};t.A(y,{mw:"columnCount"},function(){return void 0===this.dd?0:this.dd.length});
  y.prototype.getColumnDefinition=y.prototype.Gd=function(a){if(void 0===this.dd)return null;e&&t.q(a,y,"getColumnDefinition:idx");0>a&&t.la(a,">= 0",y,"getColumnDefinition:idx");a=Math.round(a);var b=this.dd;if(void 0===b[a]){var c=new Ae;c.wl(this);c.Vl=!1;c.Vc=a;b[a]=c}return b[a]};
  y.prototype.removeColumnDefinition=y.prototype.OF=function(a){if(void 0!==this.dd){e&&t.q(a,y,"removeColumnDefinition:idx");0>a&&t.la(a,">= 0",y,"removeColumnDefinition:idx");a=Math.round(a);var b=this.dd;this.Ic(xd,"coldefs",this,b[a],null,a,null);b[a]&&(b[a]=void 0);this.fa()}};t.g(y,"rowSizing",y.prototype.eG);
  t.defineProperty(y,{eG:"rowSizing"},function(){return void 0===this.qm?El:this.qm},function(a){if(void 0!==this.qm){var b=this.qm;b!==a&&(a!==El&&a!==Ol&&t.m("rowSizing must be RowColumnDefinition.ProportionalExtra or RowColumnDefinition.None"),this.qm=a,this.fa(),this.j("rowSizing",b,a))}});t.g(y,"columnSizing",y.prototype.$D);
  t.defineProperty(y,{$D:"columnSizing"},function(){return void 0===this.Jl?El:this.Jl},function(a){if(void 0!==this.Jl){var b=this.Jl;b!==a&&(a!==El&&a!==Ol&&t.m("columnSizing must be RowColumnDefinition.ProportionalExtra or RowColumnDefinition.None"),this.Jl=a,this.fa(),this.j("columnSizing",b,a))}});t.g(y,"topIndex",y.prototype.dK);
  t.defineProperty(y,{dK:"topIndex"},function(){return void 0===this.Pi?0:this.Pi},function(a){if(void 0!==this.Pi){var b=this.Pi;b!==a&&((!isFinite(a)||0>a)&&t.m("topIndex must be greater than zero and a real number. Was "+a),this.Pi=a,this.fa(),this.j("topIndex",b,a))}});t.g(y,"leftIndex",y.prototype.jJ);
  t.defineProperty(y,{jJ:"leftIndex"},function(){return void 0===this.zi?0:this.zi},function(a){if(void 0!==this.zi){var b=this.zi;b!==a&&((!isFinite(a)||0>a)&&t.m("leftIndex must be greater than zero and a real number. Was "+a),this.zi=a,this.fa(),this.j("leftIndex",b,a))}});y.prototype.findRowForLocalY=function(a){if(0>a)return-1;if(this.type!==Hk)return NaN;for(var b=0,c=this.kd,d=c.length,f=this.Pi;f<d;f++){var g=c[f];if(void 0!==g&&(b+=g.total,a<b))return f}return-1};
  y.prototype.findColumnForLocalX=function(a){if(0>a)return-1;if(this.type!==Hk)return NaN;for(var b=0,c=this.dd,d=c.length,f=this.zi;f<d;f++){var g=c[f];if(void 0!==g&&(b+=g.total,a<b))return f}return-1};t.g(y,"data",y.prototype.data);
  t.defineProperty(y,{data:"data"},function(){return this.Ml},function(a){var b=this.Ml;if(b!==a){var c=this instanceof E&&!(this instanceof Je);c&&t.i(a,"object",y,"data");Le(this);this.Ml=a;var d=this.h;null!==d&&(c?this instanceof V?(null!==b&&d.zk.remove(b),null!==a&&d.zk.add(a,this)):(null!==b&&d.ri.remove(b),null!==a&&d.ri.add(a,this)):(c=this.ia,null!==c&&null!==c.gg&&(null!==b&&c.gg.remove(b),null!==a&&c.gg.add(a,this))));this.j("data",b,a);null!==d&&d.ja.sb||null!==a&&this.Qb()}});
  t.g(y,"itemIndex",y.prototype.iF);t.defineProperty(y,{iF:"itemIndex"},function(){return this.hr},function(a){var b=this.hr;b!==a&&(this.hr=a,this.j("itemIndex",b,a))});function Qk(a){a=a.Hl;return null!==a&&a.ob}
  function Le(a){var b=a.Hl;if(null===b)null!==a.data&&t.m("Template cannot have .data be non-null: "+a),a.Hl=b=new B(De);else if(b.ob)return;var c=new B(Q);Rl(a,a,function(a,d){var f=d.Kc;if(null!==f){Kk(d,!1);for(var g=f.k;g.next();){f=g.value;f.mode===Fe&&Kk(d,!0);var h=f.St;if(null!==h){var q=a;""!==h&&(q=a.oe(h));null!==q&&(c.add(q),void 0===q.rs&&(q.rs=new B(De)),q.rs.add(f))}b.add(f)}}if(d instanceof y&&d.type===Hk){if(0<d.kd.length)for(g=d.kd,h=g.length,q=0;q<h;q++){var r=g[q];if(void 0!==r&&
  null!==r.Kc)for(var s=r.Kc.k;s.next();)f=s.value,f.pg=r,f.yz=2,f.Pv=r.index,b.add(f)}if(0<d.dd.length)for(g=d.dd,h=g.length,q=0;q<h;q++)if(r=g[q],void 0!==r&&null!==r.Kc)for(s=r.Kc.k;s.next();)f=s.value,f.pg=r,f.yz=1,f.Pv=r.index,b.add(f)}});for(var d=c.k;d.next();){var f=d.value;if(void 0!==f.rs){Kk(f,!0);for(var g=f.rs.k;g.next();){var h=g.value;null===f.Kc&&(f.Kc=new B(De));f.Kc.add(h)}}delete f.rs}for(d=b.k;d.next();)f=d.value,g=f.pg,null!==g&&(f.pg=null,g===a?f.nn="":(g instanceof Ae&&(g=g.ia),
  f.nn=""!==g.name?g.name:g.name="_"+t.od(g)));b.freeze();a instanceof E&&a.Ld()&&(hh(a,Infinity,Infinity),a.Lc())}
  y.prototype.updateTargetBindings=y.prototype.Qb=function(a){var b=this.Hl;if(null!==b)for(void 0===a&&(a=""),b=b.k;b.next();){var c=b.value,d=c.gB;if(""===a||""===d||d===a)if(d=c.Ut,null!==c.dE||""!==d){var d=this.data,f=c.St;null!==f&&(d=this.oe(f));if(null===d)e&&t.trace("Binding error: missing GraphObject named "+f+" in "+this.toString());else{var f=this,g=c.nn;if(""!==g){if(f=this.oe(g),null===f)continue}else null!==c.pg&&(f=c.pg);g=c.yz;if(0!==g){if(!(f instanceof y))continue;1===g?f=f.Gd(c.Pv):
  2===g&&(f=f.Hd(c.Pv))}void 0!==f&&c.QG(f,d)}}}};t.g(y,"itemArray",y.prototype.zA);t.defineProperty(y,{zA:"itemArray"},function(){return this.yi},function(a){var b=this.yi;if(b!==a){e&&null!==a&&!t.isArray(a)&&t.m("Panel.itemArray must be an Array-like object or null, not: "+a);var c=this.h;null!==c&&null!==b&&dj(c,this);this.yi=a;null!==c&&null!==a&&aj(c,this);this.j("itemArray",b,a);null!==c&&c.ja.sb||this.SA()}});function Vl(a){return a.type===Sg||a.type===ci||a.type===vg}
  y.prototype.rebuildItemElements=y.prototype.SA=function(){var a=0;for(Vl(this)&&(a=1);this.xa.length>a;)this.Xe(a);a=this.zA;if(null!==a)for(var b=t.vb(a),c=0;c<b;c++)rj(this,t.mb(a,c),c)};function rj(a,b,c){if(void 0!==b&&null!==b){var d=a.getCategoryForItemData(b,c),d=a.findTemplateForItemData(b,c,d);d instanceof y&&(Le(d),d=d.copy(),"object"===typeof b&&(null===a.gg&&(a.gg=new ja(Object,y)),a.gg.add(b,d)),a.type!==Sg&&a.type!==ci||c++,a.Jd(c,d),Yl(d,c),sj(a,c),d.data=b)}}
  function sj(a,b){for(var c=a.xa,d=b+1;d<c.length;){var f=c.wa(d);f instanceof y&&Yl(f,d);d++}}function Yl(a,b){a.type===tk?a.qc=b:a.type===uk&&(a.column=b);a.iF=b}t.g(y,"itemTemplate",y.prototype.eJ);
  t.defineProperty(y,{eJ:"itemTemplate"},function(){return null===this.hg?null:this.hg.za("")},function(a){if(null===this.hg){if(null===a)return;this.hg=new ja("string",y)}var b=this.hg.za("");b!==a&&(t.l(a,y,y,"itemTemplate"),a instanceof E&&t.m("itemTemplate must not be a Part: "+a),this.hg.add("",a),this.j("itemTemplate",b,a),a=this.h,null!==a&&a.ja.sb||this.SA())});t.g(y,"itemTemplateMap",y.prototype.jF);
  t.defineProperty(y,{jF:"itemTemplateMap"},function(){return this.hg},function(a){var b=this.hg;if(b!==a){t.l(a,ja,y,"itemTemplateMap");for(var c=a.k;c.next();){var d=c.value;d instanceof E&&t.m("Template in itemTemplateMap must not be a Part: "+d)}this.hg=a;this.j("itemTemplateMap",b,a);a=this.h;null!==a&&a.ja.sb||this.SA()}});t.g(y,"itemCategoryProperty",y.prototype.dJ);
  t.defineProperty(y,{dJ:"itemCategoryProperty"},function(){return this.eo},function(a){var b=this.eo;b!==a&&("string"!==typeof a&&"function"!==typeof a&&t.bc(a,"string or function",y,"itemCategoryProperty"),this.eo=a,this.j("itemCategoryProperty",b,a))});
  y.prototype.getCategoryForItemData=function(a){if(null===a)return"";var b=this.eo;if("function"===typeof b)b=b(a);else if("string"===typeof b&&"object"===typeof a){if(""===b)return"";b=t.hb(a,b)}else return"";if(void 0===b)return"";if("string"===typeof b)return b;t.m("Panel.getCategoryForItemData found a non-string category for "+a+": "+b);return""};
  y.prototype.findTemplateForItemData=function(a,b,c){a=this.jF;b=null;null!==a&&(b=a.za(c));null===b&&(t.VG||(t.VG=!0,t.trace('No item template Panel found for category "'+c+'" on '+this),t.trace("  Using default item template."),c=new y,a=new na,a.bind(new De("text","",yd)),c.add(a),t.oE=c),b=t.oE);return b instanceof y?b:null};t.g(y,"isAtomic",y.prototype.WI);
  t.defineProperty(y,{WI:"isAtomic"},function(){return this.Vg},function(a){var b=this.Vg;b!==a&&(t.i(a,"boolean",y,"isAtomic"),this.Vg=a,this.j("isAtomic",b,a))});function Ae(){t.Ac(this);this.Ii=null;this.Vl=!0;this.Vc=0;this.Mf=NaN;this.fm=0;this.em=Infinity;this.ue=xb;this.Ma=this.Kb=0;this.Kc=null;this.os=Zl;this.Ph=Vg;this.ls=this.Nj=null;this.ms=NaN;this.Lb=this.Lh=null;this.zq=!1}t.ga("RowColumnDefinition",Ae);
  Ae.prototype.copy=function(){var a=new Ae;a.Vl=this.Vl;a.Vc=this.Vc;a.Mf=this.Mf;a.fm=this.fm;a.em=this.em;a.ue=this.ue;a.Kb=this.Kb;a.Ma=this.Ma;a.Ph=this.Ph;a.os=this.os;a.Nj=null===this.Nj?null:this.Nj.Z();a.ls=this.ls;a.ms=this.ms;a.Lh=null;this.Lh&&(a.Lh=this.Lh.slice(0));a.Lb=this.Lb;a.zq=this.zq;a.Kc=this.Kc;return a};
  function gj(a,b){t.l(b,Ae,Ae,"copyFrom:pd");b.xf?a.height=b.height:a.width=b.width;a.ei=b.ei;a.zf=b.zf;a.alignment=b.alignment;a.Qt=b.Qt;a.Nj=null===b.Nj?null:b.Nj.Z();a.hn=b.hn;a.jn=b.jn;a.Lh=null;b.Lh&&(a.Lh=b.Lh.slice(0));a.background=b.background;a.tw=b.tw;a.Kc=b.Kc}Ae.prototype.toString=function(){return"RowColumnDefinition "+(this.xf?"(Row ":"(Column ")+this.index+") #"+t.od(this)};var Zl;Ae.Default=Zl=t.w(Ae,"Default",0);var Ol;Ae.None=Ol=t.w(Ae,"None",1);var El;
  Ae.ProportionalExtra=El=t.w(Ae,"ProportionalExtra",2);Ae.prototype.wl=function(a){this.Ii=a};function Ml(a,b){a.Kb=isNaN(a.Mf)?Math.max(Math.min(a.em,b),a.fm):Math.max(Math.min(a.em,a.Mf),a.fm)}function Ql(a){var b=a.Ii,c=a.hn;null===c&&(c=a.xf?b.si:b.vh);var d=a.jn;isNaN(d)&&(d=a.xf?b.xh:b.wh);d=null!==c?d:0;0===a.index&&(d=0);c=a.aB;null===c&&(c=b.tj);return d+(a.xf?c.top:c.left)}
  function Il(a){var b=a.Ii,c=a.hn;null===c&&(c=a.xf?b.si:b.vh);var d=a.jn;isNaN(d)&&(d=a.xf?b.xh:b.wh);d=null!==c?d:0;0===a.index&&(d=0);c=a.aB;null===c&&(c=b.tj);return d+(a.xf?c.top+c.bottom:c.left+c.right)}
  Ae.prototype.Xc=function(a,b,c,d,f){var g=this.Ii;if(null!==g){g.fa();for(var h=this.xf,k=g.xa,l=k.length,m=0;m<l;m++){var n=k.n[m];(h?n.qc:n.column)===this.index&&n.fa()}g.Ic(vd,a,this,b,c,d,f);if(null!==this.Kc&&(b=g.ep(),null!==b&&(b=b.data,null!==b)))for(c=this.Kc.k;c.next();)c.value.pB(this,b,a,null)}};t.A(Ae,{ia:"panel"},function(){return this.Ii});t.A(Ae,{xf:"isRow"},function(){return this.Vl});t.A(Ae,{index:"index"},function(){return this.Vc});t.g(Ae,"height",Ae.prototype.height);
  t.defineProperty(Ae,{height:"height"},function(){return this.Mf},function(a){var b=this.Mf;b!==a&&(e&&t.i(a,"number",Ae,"height"),0>a&&t.la(a,">= 0",Ae,"height"),this.Mf=a,Ml(this,this.Kb),this.Xc("height",b,a))});t.g(Ae,"width",Ae.prototype.width);t.defineProperty(Ae,{width:"width"},function(){return this.Mf},function(a){var b=this.Mf;b!==a&&(e&&t.i(a,"number",Ae,"width"),0>a&&t.la(a,">= 0",Ae,"width"),this.Mf=a,Ml(this,this.Kb),this.Xc("width",b,a))});t.g(Ae,"minimum",Ae.prototype.ei);
  t.defineProperty(Ae,{ei:"minimum"},function(){return this.fm},function(a){var b=this.fm;b!==a&&(e&&t.i(a,"number",Ae,"minimum"),(0>a||!isFinite(a))&&t.la(a,">= 0",Ae,"minimum"),this.fm=a,Ml(this,this.Kb),this.Xc("minimum",b,a))});t.g(Ae,"maximum",Ae.prototype.zf);t.defineProperty(Ae,{zf:"maximum"},function(){return this.em},function(a){var b=this.em;b!==a&&(e&&t.i(a,"number",Ae,"maximum"),0>a&&t.la(a,">= 0",Ae,"maximum"),this.em=a,Ml(this,this.Kb),this.Xc("maximum",b,a))});t.g(Ae,"alignment",Ae.prototype.alignment);
  t.defineProperty(Ae,{alignment:"alignment"},function(){return this.ue},function(a){var b=this.ue;b.M(a)||(e&&t.l(a,I,Ae,"alignment"),this.ue=a.Z(),this.Xc("alignment",b,a))});t.g(Ae,"stretch",Ae.prototype.gi);t.defineProperty(Ae,{gi:"stretch"},function(){return this.Ph},function(a){var b=this.Ph;b!==a&&(e&&t.Aa(a,Q,Ae,"stretch"),this.Ph=a,this.Xc("stretch",b,a))});t.g(Ae,"separatorPadding",Ae.prototype.aB);
  t.defineProperty(Ae,{aB:"separatorPadding"},function(){return this.Nj},function(a){"number"===typeof a?a=new ab(a):null!==a&&e&&t.l(a,ab,Ae,"separatorPadding");var b=this.Nj;null!==a&&null!==b&&b.M(a)||(null!==a&&(a=a.Z()),this.Nj=a,this.Xc("separatorPadding",b,a))});t.g(Ae,"separatorStroke",Ae.prototype.hn);
  t.defineProperty(Ae,{hn:"separatorStroke"},function(){return this.ls},function(a){var b=this.ls;b!==a&&(null===a||"string"===typeof a||a instanceof fa)&&(a instanceof fa&&a.freeze(),this.ls=a,this.ia&&this.ia.ka(),this.Xc("separatorStroke",b,a))});t.g(Ae,"separatorStrokeWidth",Ae.prototype.jn);t.defineProperty(Ae,{jn:"separatorStrokeWidth"},function(){return this.ms},function(a){var b=this.ms;b!==a&&(this.ms=a,this.ia&&this.ia.ka(),this.Xc("separatorStrokeWidth",b,a))});
  t.g(Ae,"separatorDashArray",Ae.prototype.lG);t.defineProperty(Ae,{lG:"separatorDashArray"},function(){return this.Lh},function(a){var b=this.Lh;b!==a&&(Array.isArray(a)||t.bc(a,"Array",Ae,"separatorDashArray:val"),this.Lh=a,this.ia&&this.ia.ka(),this.Xc("separatorDashArray",b,a))});t.g(Ae,"background",Ae.prototype.background);
  t.defineProperty(Ae,{background:"background"},function(){return this.Lb},function(a){var b=this.Lb;b!==a&&(null===a||"string"===typeof a||a instanceof fa)&&(a instanceof fa&&a.freeze(),this.Lb=a,this.ia&&this.ia.ka(),this.Xc("background",b,a))});t.g(Ae,"coversSeparators",Ae.prototype.tw);t.defineProperty(Ae,{tw:"coversSeparators"},function(){return this.zq},function(a){var b=this.zq;b!==a&&(t.i(a,"boolean",Ae,"coversSeparators"),this.zq=a,this.Xc("coversSeparators",b,a))});t.g(Ae,"sizing",Ae.prototype.Qt);
  t.defineProperty(Ae,{Qt:"sizing"},function(){return this.os},function(a){var b=this.os;b!==a&&(e&&t.Aa(a,Ae,Ae,"sizing"),this.os=a,this.Xc("sizing",b,a))});function Nl(a){if(a.Qt===Zl){var b=a.Ii;return a.xf?b.eG:b.$D}return a.Qt}t.A(Ae,{fc:"actual"},function(){return this.Kb});t.A(Ae,{total:"total"},function(){return this.Kb+Il(this)});t.A(Ae,{position:"position"},function(){return this.Ma});
  Ae.prototype.bind=Ae.prototype.bind=function(a){a.pg=this;var b=this.ia;null!==b&&(b=b.ep(),null!==b&&Qk(b)&&t.m("Cannot add a Binding to a RowColumnDefinition that is already frozen: "+a));null===this.Kc&&(this.Kc=new B(De));this.Kc.add(a)};
  function W(){Q.call(this);this.Oa=null;this.Pn="None";this.ah=!1;this.Qq=Vg;this.xk=null;this.Gb=this.Uc="black";this.bh=1;this.Co="butt";this.Do="miter";this.wm=10;this.vm=null;this.ld=0;this.Ni=this.Mi=xb;this.Kr=this.Jr=0;this.Vq=!1;this.ar=!0;this.Mr=null;this.Sn=this.Fo="None";this.Uq=1}t.ga("Shape",W);t.Ka(W,Q);
  W.prototype.cloneProtected=function(a){Q.prototype.cloneProtected.call(this,a);a.Oa=this.Oa;a.Pn=this.Pn;a.ah=this.ah;a.Qq=this.Qq;a.xk=this.xk;a.Uc=this.Uc;a.Gb=this.Gb;a.bh=this.bh;a.Co=this.Co;a.Do=this.Do;a.wm=this.wm;a.vm=null;this.vm&&(a.vm=this.vm.slice(0));a.ld=this.ld;a.Mi=this.Mi.Z();a.Ni=this.Ni.Z();a.Jr=this.Jr;a.Kr=this.Kr;a.Vq=this.Vq;a.ar=this.ar;a.Mr=this.Mr;a.Fo=this.Fo;a.Sn=this.Sn;a.Uq=this.Uq};
  W.prototype.toString=function(){return"Shape("+("None"!==this.zb?this.zb:"None"!==this.on?this.on:this.Hw)+")#"+t.od(this)};
  function $l(a,b,c,d){var f=0.001,g=d.Ea,h=g.width,g=g.height,k,l,m,n=c.length;if(!(2>n)){k=c[0][0];l=c[0][1];for(var p,q,r,s,u=0,v=t.Cb(),D=1;D<n;D++)p=c[D],f=p[0],m=p[1],p=f-k,k=m-l,0===p&&(p=0.001),q=k/p,s=Math.atan2(k,p),k=Math.sqrt(p*p+k*k),v.push([p,s,q,k]),u+=k,k=f,l=m;k=c[0][0];l=c[0][1];c=0;f=h;n=h/2;D=0===n?!1:!0;m=0;r=v[m];p=r[0];s=r[1];q=r[2];r=r[3];for(var A=0;0.1<=u;){0===A&&(D?(f=h,c++,f-=n,u-=n,D=!1):(f=h,c++),0===f&&(f=1));if(f>u){t.ya(v);return}f>r?(A=f-r,f=r):A=0;var G=Math.sqrt(f*
  f/(1+q*q));0>p&&(G=-G);k+=G;l+=q*G;a.translate(k,l);a.rotate(s);a.translate(-(h/2),-(g/2));0===A&&d.el(a,b);a.translate(h/2,g/2);a.rotate(-s);a.translate(-k,-l);u-=f;r-=f;if(0!==A){m++;if(m===v.length){t.ya(v);return}r=v[m];p=r[0];s=r[1];q=r[2];r=r[3];f=A}}t.ya(v)}}
  W.prototype.el=function(a,b){if(null!==this.Gb||null!==this.Uc){null!==this.Uc&&xk(this,a,this.Uc,!0);null!==this.Gb&&xk(this,a,this.Gb,!1);var c=this.bh;if(0===c){var d=this.S;d instanceof Je&&d.type===vg&&d.oc instanceof W&&(c=d.oc.fb)}a.lineWidth=c;a.lineJoin=this.Do;a.lineCap=this.Co;a.miterLimit=this.wm;var f=!1;this.S&&b.Rk.drawShadows&&(f=this.S.gj);var g=!0;null!==this.Gb&&null===this.Uc&&(g=!1);var d=!1,h=this.Ax;if(null!==h){var k=d=!0;void 0!==a.setLineDash?(a.setLineDash(h),a.lineDashOffset=
  this.ld):void 0!==a.webkitLineDash?(a.webkitLineDash=h,a.webkitLineDashOffset=this.ld):void 0!==a.mozDash?(a.mozDash=h,a.mozDashOffset=this.ld):k=!1}var l=this.Oa;if(null!==l){if(l.da===Dc)a.beginPath(),d&&!k?fk(a,l.nc,l.xc,l.kb,l.ub,h,this.ld):(a.moveTo(l.nc,l.xc),a.lineTo(l.kb,l.ub)),null!==this.Uc&&yk(a,this.Uc,!0),0!==c&&null!==this.Gb&&yk(a,this.Gb,!1);else if(l.da===Ec){var m=l.nc,n=l.xc,p=l.kb,l=l.ub,q=Math.min(m,p),r=Math.min(n,l),m=Math.abs(p-m),n=Math.abs(l-n);null!==this.Uc&&(this.Uc instanceof
  fa&&this.Uc.type===Zd?(a.beginPath(),a.rect(q,r,m,n),yk(a,this.Uc,!0)):a.fillRect(q,r,m,n));if(null!==this.Gb){if(g&&f){var s=[a.shadowOffsetX,a.shadowOffsetY,a.shadowBlur];a.shadowOffsetX=0;a.shadowOffsetY=0;a.shadowBlur=0}d&&!k?(k=[[q,r],[q+m,r],[q+m,r+n],[q,r+n],[q,r]],a.beginPath(),am(a,k,h,this.ld),yk(a,this.Gb,!1)):0!==c&&(this.Gb instanceof fa&&this.Gb.type===Zd?(a.beginPath(),a.rect(q,r,m,n),yk(a,this.Gb,!1)):a.strokeRect(q,r,m,n));g&&f&&(a.shadowOffsetX=s[0],a.shadowOffsetY=s[1],a.shadowBlur=
  s[2])}}else if(l.da===Mc)m=l.nc,n=l.xc,p=l.kb,l=l.ub,q=Math.abs(p-m)/2,r=Math.abs(l-n)/2,m=Math.min(m,p)+q,n=Math.min(n,l)+r,a.beginPath(),a.moveTo(m,n-r),a.bezierCurveTo(m+H.va*q,n-r,m+q,n-H.va*r,m+q,n),a.bezierCurveTo(m+q,n+H.va*r,m+H.va*q,n+r,m,n+r),a.bezierCurveTo(m-H.va*q,n+r,m-q,n+H.va*r,m-q,n),a.bezierCurveTo(m-q,n-H.va*r,m-H.va*q,n-r,m,n-r),a.closePath(),null!==this.Uc&&yk(a,this.Uc,!0),d&&!k&&(k=t.Cb(),H.ze(m,n-r,m+H.va*q,n-r,m+q,n-H.va*r,m+q,n,0.5,k),H.ze(m+q,n,m+q,n+H.va*r,m+H.va*q,n+r,
  m,n+r,0.5,k),H.ze(m,n+r,m-H.va*q,n+r,m-q,n+H.va*r,m-q,n,0.5,k),H.ze(m-q,n,m-q,n-H.va*r,m-H.va*q,n-r,m,n-r,0.5,k),a.beginPath(),am(a,k,h,this.ld),t.ya(k)),0!==c&&null!==this.Gb&&(g&&f&&(s=[a.shadowOffsetX,a.shadowOffsetY,a.shadowBlur],a.shadowOffsetX=0,a.shadowOffsetY=0,a.shadowBlur=0),yk(a,this.Gb,!1),g&&f&&(a.shadowOffsetX=s[0],a.shadowOffsetY=s[1],a.shadowBlur=s[2]));else if(l.da===Ac){for(var q=l.Bk,r=q.length,u=0;u<r;u++){var v=q.n[u];a.beginPath();a.moveTo(v.qa,v.ra);for(var D=v.Fa.n,A=D.length,
  G=null,L=0;L<A;L++){var N=D[L];switch(N.da){case bd:a.moveTo(N.D,N.F);break;case Oc:a.lineTo(N.D,N.F);break;case cd:a.bezierCurveTo(N.jd,N.ye,N.ng,N.og,N.kb,N.ub);break;case dd:a.quadraticCurveTo(N.jd,N.ye,N.kb,N.ub);break;case ed:if(N.radiusX===N.radiusY)G=Math.PI/180,a.arc(N.jd,N.ye,N.radiusX,N.nh*G,(N.nh+N.hi)*G,0>N.hi);else for(var G=gd(N,v),O=G.length,U=0;U<O;U++){var Y=G[U];0===U&&a.lineTo(Y.x1,Y.y1);a.bezierCurveTo(Y.x2,Y.y2,Y.ge,Y.he,Y.Ub,Y.Vb)}break;case fd:G&&G.type===ed?(G=gd(G,v),G=G[G.length-
  1]||null,null!==G&&(m=G.Ub,p=G.Vb)):(m=G?G.D:v.qa,p=G?G.F:v.ra);G=hd(N,v,m,p);O=G.length;for(U=0;U<O;U++)Y=G[U],a.bezierCurveTo(Y.x2,Y.y2,Y.ge,Y.he,Y.Ub,Y.Vb);break;default:t.m("Segment not of valid type")}N.Hh&&a.closePath();G=N}f?v.bo?(!0===v.Ul&&null!==this.Uc?(yk(a,this.Uc,!0),g=!0):g=!1,0!==c&&null!==this.Gb&&(g&&(s=[a.shadowOffsetX,a.shadowOffsetY,a.shadowBlur],a.shadowOffsetX=0,a.shadowOffsetY=0,a.shadowBlur=0),d&&!k||yk(a,this.Gb,!1),g&&(a.shadowOffsetX=s[0],a.shadowOffsetY=s[1],a.shadowBlur=
  s[2]))):(g&&(s=[a.shadowOffsetX,a.shadowOffsetY,a.shadowBlur],a.shadowOffsetX=0,a.shadowOffsetY=0,a.shadowBlur=0),!0===v.Ul&&null!==this.Uc&&yk(a,this.Uc,!0),0!==c&&null!==this.Gb&&(d&&!k||yk(a,this.Gb,!1)),g&&(a.shadowOffsetX=s[0],a.shadowOffsetY=s[1],a.shadowBlur=s[2])):(!0===v.Ul&&null!==this.Uc&&yk(a,this.Uc,!0),0===c||null===this.Gb||d&&!k||yk(a,this.Gb,!1))}if(d&&!k)for(c=g,s=l.Bk,g=s.length,k=0;k<g;k++){l=s.n[k];a.beginPath();m=t.Cb();m.push([l.qa,l.ra]);p=l.qa;q=l.ra;r=p;u=q;v=l.Fa.n;D=v.length;
  for(A=0;A<D;A++){L=v[A];switch(L.da){case bd:am(a,m,h,this.ld);m.length=0;m.push([L.D,L.F]);p=L.D;q=L.F;r=p;u=q;break;case Oc:m.push([L.D,L.F]);p=L.D;q=L.F;break;case cd:H.ze(p,q,L.jd,L.ye,L.ng,L.og,L.kb,L.ub,0.5,m);p=L.D;q=L.F;break;case dd:H.Jp(p,q,L.jd,L.ye,L.kb,L.ub,0.5,m);p=L.D;q=L.F;break;case ed:N=gd(L,l);G=N.length;for(O=0;O<G;O++)U=N[O],H.ze(p,q,U.x2,U.y2,U.ge,U.he,U.Ub,U.Vb,0.5,m),p=U.Ub,q=U.Vb;break;case fd:N=hd(L,l,p,q);G=N.length;for(O=0;O<G;O++)U=N[O],H.ze(p,q,U.x2,U.y2,U.ge,U.he,U.Ub,
  U.Vb,0.5,m),p=U.Ub,q=U.Vb;break;default:t.m("Segment not of valid type")}L.Hh&&(m.push([r,u]),am(a,m,h,this.ld))}am(a,m,h,this.ld);t.ya(m);null!==this.Gb&&(c&&f&&(n=[a.shadowOffsetX,a.shadowOffsetY,a.shadowBlur],a.shadowOffsetX=0,a.shadowOffsetY=0,a.shadowBlur=0),yk(a,this.Gb,!1),c&&f&&(a.shadowOffsetX=n[0],a.shadowOffsetY=n[1],a.shadowBlur=n[2]))}}d&&(void 0!==a.setLineDash?(a.setLineDash(t.ji),a.lineDashOffset=0):void 0!==a.webkitLineDash?(a.webkitLineDash=t.ji,a.webkitLineDashOffset=0):void 0!==
  a.mozDash&&(a.mozDash=null,a.mozDashOffset=0));if(this.MA){d=this.MA;hh(d,Infinity,Infinity);h=d.Ea;d.Lc(0,0,h.width,h.height);a.save();h=this.nd.Ab.$a();a.beginPath();n=t.Cb();n.push([h.qa,h.ra]);c=h.qa;f=h.ra;s=c;g=f;k=h.Fa.n;l=k.length;for(m=0;m<l;m++){p=k[m];switch(p.da){case bd:$l(a,b,n,d);n.length=0;n.push([p.D,p.F]);c=p.D;f=p.F;s=c;g=f;break;case Oc:n.push([p.D,p.F]);c=p.D;f=p.F;break;case cd:H.ze(c,f,p.jd,p.ye,p.ng,p.og,p.kb,p.ub,0.5,n);c=p.D;f=p.F;break;case dd:H.Jp(c,f,p.jd,p.ye,p.kb,p.ub,
  0.5,n);c=p.D;f=p.F;break;case ed:q=gd(p,h);r=q.length;for(u=0;u<r;u++)v=q[u],H.ze(c,f,v.x2,v.y2,v.ge,v.he,v.Ub,v.Vb,0.5,n),c=v.Ub,f=v.Vb;break;case fd:q=hd(p,h,c,f);r=q.length;for(u=0;u<r;u++)v=q[u],H.ze(c,f,v.x2,v.y2,v.ge,v.he,v.Ub,v.Vb,0.5,n),c=v.Ub,f=v.Vb;break;default:t.m("Segment not of valid type")}p.Hh&&(n.push([s,g]),$l(a,b,n,d))}$l(a,b,n,d);t.ya(n);a.restore()}}}};
  function am(a,b,c,d){var f=0.001,g=c.length,h,k,l,m=b.length;if(!(2>m))if(h=b[0][0],k=b[0][1],2===m)fk(a,h,k,b[1][0],b[1][1],c,d);else{a.moveTo(h,k);for(var n,p,q,r=0,s=t.Cb(),u=1;u<m;u++)n=b[u],f=n[0],l=n[1],n=f-h,h=l-k,0===n&&(n=0.001),p=h/n,h=Math.sqrt(n*n+h*h),s.push([n,p,h]),r+=h,h=f,k=l;h=b[0][0];k=b[0][1];b=0;m=!0;f=c[b%g];u=0!==d;l=0;q=s[l];n=q[0];p=q[1];q=q[2];for(var v=0;0.1<=r;){0===v&&(f=c[b%g],b++,u&&(d%=f,f-=d,u=!1));f>r&&(f=r);f>q?(v=f-q,f=q):v=0;var D=Math.sqrt(f*f/(1+p*p));0>n&&(D=
  -D);h+=D;k+=p*D;m?a.lineTo(h,k):a.moveTo(h,k);r-=f;q-=f;if(0!==v){l++;if(l===s.length){t.ya(s);return}q=s[l];n=q[0];p=q[1];q=q[2];f=v}else m=!m}t.ya(s)}}W.prototype.getDocumentPoint=W.prototype.qb=function(a,b){void 0===b&&(b=new w);a.Ge()&&t.m("getDocumentPoint:s Spot must be real: "+a.toString());var c=this.Ra,d=this.fb;b.p(a.x*(c.width+d)-d/2+c.x+a.offsetX,a.y*(c.height+d)-d/2+c.y+a.offsetY);this.me.Ta(b);return b};
  W.prototype.Vj=function(a,b){var c=this.Oa;if(null===c||null===this.fill&&null===this.stroke)return!1;var d=c.Ob,f=this.fb/2;c.type!==Dc||b||(f+=2);var g=t.Gf();g.assign(d);g.Sf(f+2,f+2);if(!g.Ga(a))return t.hc(g),!1;d=f+1E-4;if(c.type===Dc){if(null===this.stroke)return!1;d=(c.D-c.qa)*(a.x-c.qa)+(c.F-c.ra)*(a.y-c.ra);if(0>(c.qa-c.D)*(a.x-c.D)+(c.ra-c.F)*(a.y-c.F)||0>d)return!1;t.hc(g);return H.Md(c.qa,c.ra,c.D,c.F,f,a.x,a.y)}if(c.type===Ec){var h=c.qa,k=c.ra,l=c.D,m=c.F,c=Math.min(h,l),n=Math.min(k,
  m),h=Math.abs(l-h),k=Math.abs(m-k);g.x=c;g.y=n;g.width=h;g.height=k;if(null===this.fill){g.Sf(-d,-d);if(g.Ga(a))return t.hc(g),!1;g.Sf(d,d)}null!==this.stroke&&g.Sf(f,f);f=g.Ga(a);t.hc(g);return f}if(c.type===Mc){h=c.qa;k=c.ra;l=c.D;m=c.F;c=Math.min(h,l);n=Math.min(k,m);h=Math.abs(l-h);k=Math.abs(m-k);h/=2;k/=2;c=a.x-(c+h);n=a.y-(n+k);if(null===this.fill){h-=d;k-=d;if(0>=h||0>=k||1>=c*c/(h*h)+n*n/(k*k))return t.hc(g),!1;h+=d;k+=d}null!==this.stroke&&(h+=f,k+=f);t.hc(g);return 0>=h||0>=k?!1:1>=c*c/
  (h*h)+n*n/(k*k)}if(c.type===Ac)return t.hc(g),null===this.fill?kd(c,a.x,a.y,f):c.Ga(a,f,1<this.fb,b);t.m("Unknown Geometry type");return!1};
  W.prototype.tt=function(a,b,c,d){var f=this.Ca,g=this.bh;a=Math.max(a,0);b=Math.max(b,0);var h;if(this.ah)h=this.Oa.Ob;else{var k=this.zb,l=H.OA[k];if(void 0===l){var m=H.bj[k];"string"===typeof m&&(m=H.bj[m]);"function"===typeof m?(l=m(null,100,100),H.OA[k]=l):t.m("Unsupported Figure:"+k)}h=l.Ob}var k=h.width,l=h.height,m=h.width,n=h.height;switch(kk(this)){case Ug:d=c=0;break;case Cc:m=Math.max(a-g,0);n=Math.max(b-g,0);break;case ck:m=Math.max(a-g,0);d=0;break;case bk:c=0,n=Math.max(b-g,0)}isFinite(f.width)&&
  (m=f.width);isFinite(f.height)&&(n=f.height);f=this.He;h=this.Vf;c=Math.max(c,h.width)-g;d=Math.max(d,h.height)-g;m=Math.min(f.width,m);n=Math.min(f.height,n);m=isFinite(m)?Math.max(c,m):Math.max(k,c);n=isFinite(n)?Math.max(d,n):Math.max(l,d);c=Ll(this);switch(c){case Ug:break;case Cc:k=m;l=n;break;case Wg:c=Math.min(m/k,n/l);isFinite(c)||(c=1);k*=c;l*=c;break;default:t.m(c+" is not a valid geometryStretch.")}if(this.ah){h=this.nd;d=k;f=l;c=h.copy();h=h.Ob;d/=h.width;f/=h.height;isFinite(d)||(d=1);
  isFinite(f)||(f=1);if(1!==d||1!==f)switch(c.type){case Dc:case Ec:case Mc:c.qa*=d;c.ra*=f;c.D*=d;c.F*=f;break;case Ac:h=c.Ab;for(var p=h.length,q=0;q<p;q++){var r=h.n[q];r.qa*=d;r.ra*=f;for(var r=r.Fa,s=r.length,u=0;u<s;u++){var v=r.n[u];switch(v.type){case Oc:case bd:v.D*=d;v.F*=f;break;case cd:v.Bb*=d;v.Rb*=f;v.re*=d;v.se*=f;v.D*=d;v.F*=f;break;case dd:v.Bb*=d;v.Rb*=f;v.D*=d;v.F*=f;break;case ed:v.Da*=d;v.Pa*=f;v.radiusX*=d;void 0!==v.radiusY&&(v.radiusY*=f);break;case fd:v.D*=d;v.F*=f;v.radiusX*=
  d;v.radiusY*=f;break;default:t.m("Unknown Segment type: "+v.type)}}}}this.Oa=c}else if(null===this.Oa||this.Oa.$n!==a-g||this.Oa.Zn!==b-g)this.Oa=H.makeGeometry(this,k,l);h=this.Oa.Ob;Infinity===a||Infinity===b?hk(this,h.x-g/2,h.y-g/2,0===a&&0===k?0:h.width+g,0===b&&0===l?0:h.height+g):hk(this,-(g/2),-(g/2),m+g,n+g)};
  function Pl(a,b,c){if(!1!==Oi(a)){a.Wc.La();var d=a.bh;if(0===d){var f=a.S;f instanceof Je&&f.type===vg&&f.oc instanceof W&&(d=f.oc.fb)}d*=a.wc;hk(a,-(d/2),-(d/2),b+d,c+d);b=a.Wc;c=a.He;d=a.Vf;b.width=Math.min(c.width,b.width);b.height=Math.min(c.height,b.height);b.width=Math.max(d.width,b.width);b.height=Math.max(d.height,b.height);a.Wc.freeze();a.Wc.N()||t.m("Non-real measuredBounds has been set. Object "+a+", measuredBounds: "+a.Wc.toString());lk(a,!1)}}
  function Ll(a){var b=a.Iw;return a.ah?b===Vg?Cc:b:b===Vg?H.OA[a.zb].vc:b}W.prototype.Uj=function(a,b,c,d){ok(this,a,b,c,d)};W.prototype.getNearestIntersectionPoint=W.prototype.kl=function(a,b,c){return this.kp(a.x,a.y,b.x,b.y,c)};
  W.prototype.kp=function(a,b,c,d,f){var g=this.transform,h=1/(g.m11*g.m22-g.m12*g.m21),k=g.m22*h,l=-g.m12*h,m=-g.m21*h,n=g.m11*h,p=h*(g.m21*g.dy-g.m22*g.dx),q=h*(g.m12*g.dx-g.m11*g.dy),g=a*k+b*m+p,h=a*l+b*n+q,k=c*k+d*m+p,l=c*l+d*n+q,m=this.fb/2,p=this.Oa;null===p&&(hh(this,Infinity,Infinity),p=this.Oa);q=p.Ob;n=!1;if(p.type===Dc)if(1.5>=this.fb)n=H.jh(p.nc,p.xc,p.kb,p.ub,g,h,k,l,f);else{var r,s;p.nc===p.kb?(r=m,s=0):(b=(p.ub-p.xc)/(p.kb-p.nc),s=m/Math.sqrt(1+b*b),r=s*b);d=t.Cb();b=new w;H.jh(p.nc+
  r,p.xc+s,p.kb+r,p.ub+s,g,h,k,l,b)&&d.push(b);b=new w;H.jh(p.nc-r,p.xc-s,p.kb-r,p.ub-s,g,h,k,l,b)&&d.push(b);b=new w;H.jh(p.nc+r,p.xc+s,p.nc-r,p.xc-s,g,h,k,l,b)&&d.push(b);b=new w;H.jh(p.kb+r,p.ub+s,p.kb-r,p.ub-s,g,h,k,l,b)&&d.push(b);b=d.length;if(0===b)return t.ya(d),!1;n=!0;s=Infinity;for(r=0;r<b;r++){var k=d[r],u=(k.x-g)*(k.x-g)+(k.y-h)*(k.y-h);u<s&&(s=u,f.x=k.x,f.y=k.y)}t.ya(d)}else if(p.type===Ec)b=q.x-m,n=H.kl(b,q.y-m,q.x+q.width+m,q.y+q.height+m,g,h,k,l,f);else if(p.type===Mc)a:if(b=q.copy().Sf(m,
  m),0===b.width)n=H.jh(b.x,b.y,b.x,b.y+b.height,g,h,k,l,f);else if(0===b.height)n=H.jh(b.x,b.y,b.x+b.width,b.y,g,h,k,l,f);else{a=b.width/2;var v=b.height/2;d=b.x+a;b=b.y+v;c=9999;g!==k&&(c=(h-l)/(g-k));if(9999>Math.abs(c)){n=h-b-c*(g-d);if(0>a*a*c*c+v*v-n*n){f.x=NaN;f.y=NaN;n=!1;break a}m=Math.sqrt(a*a*c*c+v*v-n*n);k=(-(a*a*c*n)+a*v*m)/(v*v+a*a*c*c)+d;a=(-(a*a*c*n)-a*v*m)/(v*v+a*a*c*c)+d;l=c*(k-d)+n+b;b=c*(a-d)+n+b;d=Math.abs((g-k)*(g-k))+Math.abs((h-l)*(h-l));h=Math.abs((g-a)*(g-a))+Math.abs((h-b)*
  (h-b));d<h?(f.x=k,f.y=l):(f.x=a,f.y=b)}else{k=v*v;l=g-d;k-=k/(a*a)*l*l;if(0>k){f.x=NaN;f.y=NaN;n=!1;break a}m=Math.sqrt(k);l=b+m;b-=m;d=Math.abs(l-h);h=Math.abs(b-h);d<h?(f.x=g,f.y=l):(f.x=g,f.y=b)}n=!0}else if(p.type===Ac){var D,A,G,q=t.K();r=k-g;s=l-h;s=r*r+s*s;f.x=k;f.y=l;for(r=0;r<p.Ab.count;r++){var L=p.Ab.n[r],N=L.Fa;D=L.qa;A=L.ra;for(var O=D,U=A,Y,ba,R=0;R<N.count;R++){Y=N.n[R];ba=Y.type;u=Y.D;G=Y.F;var xa=!1;switch(ba){case bd:O=u;U=G;break;case Oc:xa=bm(D,A,u,G,g,h,k,l,q);break;case cd:xa=
  Y.Bb;ba=Y.Rb;var Ya=Y.re,za=Y.se,xa=H.Ps(D,A,xa,ba,Ya,za,u,G,g,h,k,l,0.5,q);break;case dd:xa=(D+2*Y.Bb)/3;ba=(A+2*Y.Rb)/3;Ya=(2*Y.Bb+u)/3;za=(2*Y.Bb+u)/3;xa=H.Ps(D,A,xa,ba,Ya,za,u,G,g,h,k,l,0.5,q);break;case ed:case fd:G=Y.type===ed?gd(Y,L):hd(Y,L,D,A);ba=G.length;for(Ya=0;Ya<ba;Ya++)v=G[Ya],0===Ya&&bm(D,A,v.x1,v.y1,g,h,k,l,q)&&(u=cm(g,h,q,s,f),u<s&&(s=u,n=!0)),H.Ps(v.x1,v.y1,v.x2,v.y2,v.ge,v.he,v.Ub,v.Vb,g,h,k,l,0.5,q)&&(u=cm(g,h,q,s,f),u<s&&(s=u,n=!0));u=v.Ub;G=v.Vb;break;default:t.m("Unknown Segment type: "+
  Y.type)}D=u;A=G;xa&&(u=cm(g,h,q,s,f),u<s&&(s=u,n=!0));Y.nt&&(u=O,G=U,bm(D,A,u,G,g,h,k,l,q)&&(u=cm(g,h,q,s,f),u<s&&(s=u,n=!0)))}}g=c-a;h=d-b;b=Math.sqrt(g*g+h*h);0!==b&&(g/=b,h/=b);f.x-=g*m;f.y-=h*m;t.B(q)}else t.m("Invalid Geometry type");if(!n)return!1;this.transform.Ta(f);return!0};function cm(a,b,c,d,f){a=c.x-a;b=c.y-b;b=a*a+b*b;return b<d?(f.x=c.x,f.y=c.y,b):d}
  function bm(a,b,c,d,f,g,h,k,l){var m=!1,n=(f-h)*(b-d)-(g-k)*(a-c);if(0===n)return!1;l.x=((f*k-g*h)*(a-c)-(f-h)*(a*d-b*c))/n;l.y=((f*k-g*h)*(b-d)-(g-k)*(a*d-b*c))/n;(a>c?a-c:c-a)<(b>d?b-d:d-b)?(f=b<d?b:d,a=b<d?d:b,(l.y>f||H.nb(l.y,f))&&(l.y<a||H.nb(l.y,a))&&(m=!0)):(f=a<c?a:c,a=a<c?c:a,(l.x>f||H.nb(l.x,f))&&(l.x<a||H.nb(l.x,a))&&(m=!0));return m}
  W.prototype.containedInRect=W.prototype.Im=function(a,b){if(void 0===b)return a.Wj(this.pa);var c=this.Oa;null===c&&(hh(this,Infinity,Infinity),c=this.Oa);var c=c.Ob,d=this.fb/2,f=!1,g=t.K();g.p(c.x-d,c.y-d);a.Ga(b.Ta(g))&&(g.p(c.x-d,c.bottom+d),a.Ga(b.Ta(g))&&(g.p(c.right+d,c.bottom+d),a.Ga(b.Ta(g))&&(g.p(c.right+d,c.y-d),a.Ga(b.Ta(g))&&(f=!0))));t.B(g);return f};
  W.prototype.intersectsRect=W.prototype.Tf=function(a,b){if(this.Im(a,b)||void 0===b&&(b=this.transform,a.Wj(this.pa)))return!0;var c=t.ph();c.set(b);c.oA();var d=a.left,f=a.right,g=a.top,h=a.bottom,k=t.K();k.p(d,g);c.Ta(k);if(this.Vj(k,!0))return t.B(k),!0;k.p(f,g);c.Ta(k);if(this.Vj(k,!0))return t.B(k),!0;k.p(d,h);c.Ta(k);if(this.Vj(k,!0))return t.B(k),!0;k.p(f,h);c.Ta(k);if(this.Vj(k,!0))return t.B(k),!0;var l=t.K(),m=t.K();c.set(b);c.EF(this.transform);c.oA();l.x=f;l.y=g;l.transform(c);k.x=d;k.y=
  g;k.transform(c);var n=!1;dm(this,k,l,m)?n=!0:(k.x=f,k.y=h,k.transform(c),dm(this,k,l,m)?n=!0:(l.x=d,l.y=h,l.transform(c),dm(this,k,l,m)?n=!0:(k.x=d,k.y=g,k.transform(c),dm(this,k,l,m)&&(n=!0))));t.B(k);t.We(c);t.B(l);t.B(m);return n};function dm(a,b,c,d){if(!a.kl(b,c,d))return!1;a=b.x;b=b.y;var f=c.x,g=c.y;c=d.x;d=d.y;if(a===f){var h;b<g?(h=b,a=g):(h=g,a=b);return d>=h&&d<=a}a<f?(h=a,a=f):h=f;return c>=h&&c<=a}
  W.prototype.CE=function(a,b,c){function d(a,b){for(var c=a.length,d=0;d<c;d++){var g=a[d];if(b.Ys(g[0],g[1])>f)return!0}return!1}if(c&&null!==this.fill&&this.Vj(a,!0))return!0;var f=a.Zj(b);b=f;1.5<this.fb&&(f=this.fb/2+Math.sqrt(f),f*=f);var g=this.Oa;null===g&&(hh(this,Infinity,Infinity),g=this.Oa);if(!c){var h=g.Ob,k=h.x,l=h.y,m=h.x+h.width,h=h.y+h.height;if(Sa(a.x,a.y,k,l)<=f&&Sa(a.x,a.y,m,l)<=f&&Sa(a.x,a.y,k,h)<=f&&Sa(a.x,a.y,m,h)<=f)return!0}k=g.nc;l=g.xc;m=g.kb;h=g.ub;if(g.type===Dc){if(c=
  Ra(a.x,a.y,k,l,m,h),g=(k-m)*(a.x-m)+(l-h)*(a.y-h),c<=(0<=(m-k)*(a.x-k)+(h-l)*(a.y-l)&&0<=g?f:b))return!0}else{if(g.type===Ec)return b=!1,c&&(b=Ra(a.x,a.y,k,l,k,h)<=f||Ra(a.x,a.y,k,l,m,l)<=f||Ra(a.x,a.y,m,l,m,h)<=f||Ra(a.x,a.y,k,h,m,h)<=f),b;if(g.type===Mc){b=a.x-(k+m)/2;var g=a.y-(l+h)/2,n=Math.abs(m-k)/2,p=Math.abs(h-l)/2;if(0===n||0===p)return c=Ra(a.x,a.y,k,l,m,h),c<=f?!0:!1;if(c){if(a=H.zI(n,p,b,g),a*a<=f)return!0}else return Sa(b,g,-n,0)>=f||Sa(b,g,0,-p)>=f||Sa(b,g,0,p)>=f||Sa(b,g,n,0)>=f?!1:
  !0}else if(g.type===Ac){h=g.Ob;k=h.x;l=h.y;m=h.x+h.width;h=h.y+h.height;if(a.x>m&&a.x<k&&a.y>h&&a.y<l&&Ra(a.x,a.y,k,l,k,h)>f&&Ra(a.x,a.y,k,l,m,l)>f&&Ra(a.x,a.y,m,h,k,h)>f&&Ra(a.x,a.y,m,h,m,l)>f)return!1;b=Math.sqrt(f);if(c){if(null===this.fill?kd(g,a.x,a.y,b):g.Ga(a,b,!0))return!0}else{c=g.Ab;for(b=0;b<c.count;b++){k=c.n[b];n=k.qa;p=k.ra;if(a.Ys(n,p)>f)return!1;l=k.Fa.n;m=l.length;for(h=0;h<m;h++){var q=l[h];switch(q.type){case bd:case Oc:n=q.D;p=q.F;if(a.Ys(n,p)>f)return!1;break;case cd:g=t.Cb();
  H.ze(n,p,q.Bb,q.Rb,q.re,q.se,q.D,q.F,0.8,g);n=d(g,a);t.ya(g);if(n)return!1;n=q.D;p=q.F;if(a.Ys(n,p)>f)return!1;break;case dd:g=t.Cb();H.Jp(n,p,q.Bb,q.Rb,q.D,q.F,0.8,g);n=d(g,a);t.ya(g);if(n)return!1;n=q.D;p=q.F;if(a.Ys(n,p)>f)return!1;break;case ed:case fd:var q=q.type===ed?gd(q,k):hd(q,k,n,p),r=q.length,s=null,g=t.Cb();for(b=0;b<r;b++)if(s=q[b],g.length=0,H.ze(s.x1,s.y1,s.x2,s.y2,s.ge,s.he,s.Ub,s.Vb,0.8,g),d(g,a))return t.ya(g),!1;t.ya(g);null!==s&&(n=s.Ub,p=s.Vb);break;default:t.m("Unknown Segment type: "+
  q.type)}}}return!0}}}return!1};t.g(W,"geometry",W.prototype.nd);t.defineProperty(W,{nd:"geometry"},function(){return this.xk?this.xk:this.Oa},function(a){var b=this.Oa;if(b!==a){null!==a?(e&&t.l(a,zc,W,"geometry"),this.xk=this.Oa=a.freeze()):this.xk=this.Oa=null;var c=this.S;c&&(c.Dj=NaN);this.ah=!0;this.fa();this.j("geometry",b,a)}});t.g(W,"geometryString",W.prototype.JE);
  t.defineProperty(W,{JE:"geometryString"},function(){return this.nd.toString()},function(a){var b=Rc(a);a=b.normalize();this.nd=b;var b=t.K(),c=this.position;c.N()?b.p(c.x-a.x,c.y-a.y):b.p(-a.x,-a.y);this.position=b;t.B(b)});t.defineProperty(W,{sA:"isGeometryPositioned"},function(){return this.Vq},function(a){e&&t.i(a,"boolean",W,"isGeometryPositioned");var b=this.Vq;b!==a&&(this.Vq=a,this.fa(),this.j("isGeometryPositioned",b,a))});W.prototype.Ye=function(){this.ah?this.xk=null:this.Oa=null;this.fa()};
  t.g(W,"fill",W.prototype.fill);t.defineProperty(W,{fill:"fill"},function(){return this.Uc},function(a){var b=this.Uc;b!==a&&(e&&null!==a&&t.To(a,"Shape.fill"),a instanceof fa&&a.freeze(),this.Uc=a,this.ka(),this.j("fill",b,a))});t.g(W,"stroke",W.prototype.stroke);t.defineProperty(W,{stroke:"stroke"},function(){return this.Gb},function(a){var b=this.Gb;b!==a&&(e&&null!==a&&t.To(a,"Shape.stroke"),a instanceof fa&&a.freeze(),this.Gb=a,this.ka(),this.j("stroke",b,a))});t.g(W,"strokeWidth",W.prototype.fb);
  t.defineProperty(W,{fb:"strokeWidth"},function(){return this.bh},function(a){var b=this.bh;if(b!==a)if(e&&t.q(a,W,"strokeWidth"),0<=a){this.bh=a;this.fa();var c=this.S;c&&(c.Dj=NaN);this.j("strokeWidth",b,a)}else t.la(a,"val >= 0",W,"strokeWidth:val")});t.g(W,"strokeCap",W.prototype.xG);
  t.defineProperty(W,{xG:"strokeCap"},function(){return this.Co},function(a){var b=this.Co;b!==a&&("string"!==typeof a||"butt"!==a&&"round"!==a&&"square"!==a?t.la(a,'"butt", "round", or "square"',W,"strokeCap"):(this.Co=a,this.ka(),this.j("strokeCap",b,a)))});t.g(W,"strokeJoin",W.prototype.XJ);
  t.defineProperty(W,{XJ:"strokeJoin"},function(){return this.Do},function(a){var b=this.Do;b!==a&&("string"!==typeof a||"miter"!==a&&"bevel"!==a&&"round"!==a?t.la(a,'"miter", "bevel", or "round"',W,"strokeJoin"):(this.Do=a,this.ka(),this.j("strokeJoin",b,a)))});t.g(W,"strokeMiterLimit",W.prototype.YJ);
  t.defineProperty(W,{YJ:"strokeMiterLimit"},function(){return this.wm},function(a){var b=this.wm;if(b!==a)if(e&&t.q(a,W,"strokeMiterLimit"),0<a){this.wm=a;this.ka();var c=this.S;c&&(c.Dj=NaN);this.j("strokeMiterLimit",b,a)}else t.la(a,"val > 0",W,"strokeWidth:val")});t.g(W,"strokeDashArray",W.prototype.Ax);
  t.defineProperty(W,{Ax:"strokeDashArray"},function(){return this.vm},function(a){var b=this.vm;if(b!==a){null===a||Array.isArray(a)||t.bc(a,"Array",W,"strokeDashArray:val");if(null!==a)for(var c=a.length,d=0;d<c;d++){var f=a[d];"number"===typeof f&&0<f&&isFinite(f)||t.m("strokeDashArray:val "+f+" must be a positive non-zero number.")}this.vm=a;this.ka();this.j("strokeDashArray",b,a)}});t.g(W,"strokeDashOffset",W.prototype.yG);
  t.defineProperty(W,{yG:"strokeDashOffset"},function(){return this.ld},function(a){var b=this.ld;b!==a&&(e&&t.q(a,W,"strokeDashOffset"),0<=a&&(this.ld=a,this.ka(),this.j("strokeDashOffset",b,a)))});t.g(W,"figure",W.prototype.zb);
  t.defineProperty(W,{zb:"figure"},function(){return this.Pn},function(a){var b=this.Pn;if(b!==a){e&&t.i(a,"string",W,"figure");var c=H.bj[a];"function"===typeof c?c=a:(c=H.bj[a.toLowerCase()])||t.m("Unknown Shape.figure: "+a);if(b!==c){if(a=this.S)a.Dj=NaN;this.Pn=c;this.ah=!1;this.Ye();this.j("figure",b,c)}}});t.g(W,"toArrow",W.prototype.on);
  t.defineProperty(W,{on:"toArrow"},function(){return this.Fo},function(a){var b=this.Fo;!0===a?a="Standard":!1===a&&(a="");if(b!==a){e&&t.i(a,"string",W,"toArrow");var c=H.TD(a);null===c?t.m("Unknown Shape.toArrow: "+a):b!==c&&(this.Fo=c,this.ah=!1,this.Ye(),em(this),this.j("toArrow",b,c))}});t.g(W,"fromArrow",W.prototype.Hw);
  t.defineProperty(W,{Hw:"fromArrow"},function(){return this.Sn},function(a){var b=this.Sn;!0===a?a="Standard":!1===a&&(a="");if(b!==a){e&&t.i(a,"string",W,"fromArrow");var c=H.TD(a);null===c?t.m("Unknown Shape.fromArrow: "+a):b!==c&&(this.Sn=c,this.ah=!1,this.Ye(),em(this),this.j("fromArrow",b,c))}});function em(a){var b=a.h;null!==b&&b.ja.sb||(a.Mt=fm,"None"!==a.Fo?(a.Cf=-1,a.Rj=Vb):"None"!==a.Sn&&(a.Cf=0,a.Rj=new I(1-Vb.x,Vb.y)))}
  t.defineProperty(W,{G:"spot1"},function(){return this.Mi},function(a){t.l(a,I,W,"spot1");var b=this.Mi;b.M(a)||(this.Mi=a=a.Z(),this.fa(),this.j("spot1",b,a))});t.defineProperty(W,{H:"spot2"},function(){return this.Ni},function(a){t.l(a,I,W,"spot2");var b=this.Ni;b.M(a)||(this.Ni=a=a.Z(),this.fa(),this.j("spot2",b,a))});t.defineProperty(W,{Hc:"parameter1"},function(){return this.Jr},function(a){var b=this.Jr;b!==a&&(this.Jr=a,this.fa(),this.j("parameter1",b,a))});
  t.defineProperty(W,{Et:"parameter2"},function(){return this.Kr},function(a){var b=this.Kr;b!==a&&(this.Kr=a,this.fa(),this.j("parameter2",b,a))});t.A(W,{Ra:"naturalBounds"},function(){if(null!==this.Oa)return this.hd.assign(this.Oa.Ob),this.hd;var a=this.Ca;return new x(0,0,a.width,a.height)});t.g(W,"isRectangular",W.prototype.$I);
  t.defineProperty(W,{$I:"isRectangular"},function(){return this.ar},function(a){var b=this.ar;b!==a&&(e&&t.i(a,"boolean",W,"isRectangular"),this.ar=a,this.fa(),this.j("isRectangular",b,a))});t.g(W,"pathObject",W.prototype.MA);t.defineProperty(W,{MA:"pathObject"},function(){return this.Mr},function(a){var b=this.Mr;b!==a&&(e&&t.l(a,Q,W,"pathObject"),this.Mr=a,this.ka(),this.j("pathObject",b,a))});t.g(W,"geometryStretch",W.prototype.Iw);
  t.defineProperty(W,{Iw:"geometryStretch"},function(){return this.Qq},function(a){var b=this.Qq;b!==a&&(t.Aa(a,Q,W,"geometryStretch"),this.Qq=a,this.j("geometryStretch",b,a))});t.g(W,"interval",W.prototype.interval);t.defineProperty(W,{interval:"interval"},function(){return this.Uq},function(a){var b=this.Uq;e&&t.q(a,W,"interval");a=Math.floor(a);b!==a&&0<=a&&(this.Uq=a,this.h&&Ji(this.h),this.fa(),this.j("interval",b,a))});
  W.defineFigureGenerator=function(a,b){t.i(a,"string",W,"defineFigureGenerator:name");t.i(b,"function",W,"defineFigureGenerator:func");var c=a.toLowerCase();""!==a&&"none"!==c&&a!==c||t.m("Shape.defineFigureGenerator name must not be empty or None or all-lower-case: "+a);var d=W.FigureGenerators;d[a]=b;d[c]=a};
  W.defineArrowheadGeometry=function(a,b){t.i(a,"string",W,"defineArrowheadGeometry:name");t.i(b,"string",W,"defineArrowheadGeometry:pathstr");var c=a.toLowerCase();""!==a&&"none"!==c&&a!==c||t.m("Shape.defineArrowheadGeometry name must not be empty or None or all-lower-case: "+a);var d=W.ArrowheadGeometries;d[a]=b;d[c]=a};
  function na(){Q.call(this);this.le="";this.Gb="black";this.Tg="13px sans-serif";this.Td="start";this.Yq=!0;this.Wl=this.Xl=!1;this.Pk=gm;this.xm=hm;this.cv=this.mf=0;this.Rn=this.fz=this.gz=null;this.no={};this.Kq=!1;this.kf=this.Sk=this.xs=null;this.Qj=this.Pj=0;this.Ai=Infinity}t.ga("TextBlock",na);t.Ka(na,Q);na.getEllipsis=function(){return t.Zs};na.setEllipsis=function(a){t.Zs=a;t.Gw={};t.gA=0};
  na.prototype.cloneProtected=function(a){Q.prototype.cloneProtected.call(this,a);a.le=this.le;a.Gb=this.Gb;a.Tg=this.Tg;a.Td=this.Td;a.Yq=this.Yq;a.Xl=this.Xl;a.Wl=this.Wl;a.xm=this.xm;a.Pk=this.Pk;a.mf=this.mf;a.cv=this.cv;a.gz=this.gz;a.fz=this.fz;a.Rn=this.Rn;a.no=this.no;a.Kq=this.Kq;a.xs=this.xs;a.Sk=this.Sk;a.kf=this.kf;a.Pj=this.Pj;a.Qj=this.Qj;a.Ai=this.Ai};na.prototype.toString=function(){return 22<this.le.length?'TextBlock("'+this.le.substring(0,20)+'"...)':'TextBlock("'+this.le+'")'};var im;
  na.None=im=t.w(na,"None",0);var jm;na.WrapFit=jm=t.w(na,"WrapFit",1);var hm;na.WrapDesiredSize=hm=t.w(na,"WrapDesiredSize",2);var gm;na.OverflowClip=gm=t.w(na,"OverflowClip",0);var km;na.OverflowEllipsis=km=t.w(na,"OverflowEllipsis",1);na.prototype.fa=function(){Q.prototype.fa.call(this);this.fz=this.gz=null};t.g(na,"font",na.prototype.font);
  t.defineProperty(na,{font:"font"},function(){return this.Tg},function(a){var b=this.Tg;b!==a&&(e&&t.i(a,"string",na,"font"),this.Tg=a,this.Rn=null,this.fa(),this.j("font",b,a))});t.g(na,"text",na.prototype.text);t.defineProperty(na,{text:"text"},function(){return this.le},function(a){var b=this.le;a=null!==a&&void 0!==a?a.toString():"";b!==a&&(this.le=a,this.fa(),this.j("text",b,a))});t.g(na,"textAlign",na.prototype.textAlign);
  t.defineProperty(na,{textAlign:"textAlign"},function(){return this.Td},function(a){var b=this.Td;b!==a&&(e&&t.i(a,"string",na,"textAlign"),"start"===a||"end"===a||"left"===a||"right"===a||"center"===a?(this.Td=a,this.ka(),this.j("textAlign",b,a)):t.la(a,'"start", "end", "left", "right", or "center"',na,"textAlign"))});
  t.A(na,{Ra:"naturalBounds"},function(){if(!this.hd.N()){var a=lm(this,this.le,{},999999).width,b=mm(this,a,{}),c=this.Ca;isNaN(c.width)||(a=c.width);isNaN(c.height)||(b=c.height);Va(this.hd,a,b)}return this.hd});t.g(na,"isMultiline",na.prototype.Tw);t.defineProperty(na,{Tw:"isMultiline"},function(){return this.Yq},function(a){var b=this.Yq;b!==a&&(e&&t.i(a,"boolean",na,"isMultiline"),this.Yq=a,this.fa(),this.j("isMultiline",b,a))});t.g(na,"isUnderline",na.prototype.cJ);
  t.defineProperty(na,{cJ:"isUnderline"},function(){return this.Xl},function(a){var b=this.Xl;b!==a&&(e&&t.i(a,"boolean",na,"isUnderline"),this.Xl=a,this.ka(),this.j("isUnderline",b,a))});t.g(na,"isStrikethrough",na.prototype.aJ);t.defineProperty(na,{aJ:"isStrikethrough"},function(){return this.Wl},function(a){var b=this.Wl;b!==a&&(e&&t.i(a,"boolean",na,"isStrikethrough"),this.Wl=a,this.ka(),this.j("isStrikethrough",b,a))});t.g(na,"wrap",na.prototype.rB);
  t.defineProperty(na,{rB:"wrap"},function(){return this.xm},function(a){var b=this.xm;b!==a&&(e&&t.Aa(a,na,na,"wrap"),this.xm=a,this.fa(),this.j("wrap",b,a))});t.g(na,"overflow",na.prototype.overflow);t.defineProperty(na,{overflow:"overflow"},function(){return this.Pk},function(a){var b=this.Pk;b!==a&&(e&&t.Aa(a,na,na,"overflow"),this.Pk=a,this.fa(),this.j("overflow",b,a))});t.g(na,"stroke",na.prototype.stroke);
  t.defineProperty(na,{stroke:"stroke"},function(){return this.Gb},function(a){var b=this.Gb;b!==a&&(e&&null!==a&&t.To(a,"TextBlock.stroke"),a instanceof fa&&a.freeze(),this.Gb=a,this.ka(),this.j("stroke",b,a))});t.A(na,{oF:"lineCount"},function(){return this.mf});t.g(na,"editable",na.prototype.yw);t.defineProperty(na,{yw:"editable"},function(){return this.Kq},function(a){var b=this.Kq;b!==a&&(e&&t.i(a,"boolean",na,"editable"),this.Kq=a,this.j("editable",b,a))});t.g(na,"textEditor",na.prototype.jB);
  t.defineProperty(na,{jB:"textEditor"},function(){return this.xs},function(a){var b=this.xs;b!==a&&(a instanceof HTMLElement||t.m("textEditor must be an HTMLElement"),this.xs=a,this.j("textEditor",b,a))});t.g(na,"errorFunction",na.prototype.$s);t.defineProperty(na,{$s:"errorFunction"},function(){return this.kf},function(a){var b=this.kf;b!==a&&(null!==a&&t.i(a,"function",na,"errorFunction"),this.kf=a,this.j("errorFunction",b,a))});function wk(a,b){var c=a.Tg;null!==c&&b.cu!==c&&(b.font=c,b.cu=c)}
  na.prototype.el=function(a,b){if(null!==this.Gb&&0!==this.le.length&&null!==this.Tg){var c=this.Ra.width,d=zh(this);a.textAlign=this.Td;xk(this,a,this.Gb,!0);(this.Xl||this.Wl)&&xk(this,a,this.Gb,!1);var f=this.no,g=0,h=!1,k=t.lc(0,0);this.me.Ta(k);var l=t.lc(0,d);this.me.Ta(l);var m=k.Zj(l);t.B(k);t.B(l);k=b.scale;8>m*k*k&&(h=!0);b.Sg!==a&&(h=!1);for(var m=this.Pj,k=this.Qj,l=f.ug.length,n=0;n<l;n++){var p=f.ug[n],q=f.Of[n];p>c&&(p=c);var g=g+m,r=q,q=a,s=g,u=c,v=d,D=0;h?("start"===this.Td||"left"===
  this.Td?D=0:"end"===this.Td||"right"===this.Td?D=u-p:"center"===this.Td?D=(u-p)/2:t.m("textAlign must be start, end, left, right, or center"),q.fillRect(0+D,s+0.25*v,p,1)):("start"===this.Td||"left"===this.Td?D=0:"end"===this.Td||"right"===this.Td?D=u:"center"===this.Td?D=u/2:t.m("textAlign must be start, end, left, right, or center"),q.fillText(r,0+D,s+v-0.25*v),r=v/20|0,this.Xl&&("end"===this.Td||"right"===this.Td?D-=p:"center"===this.Td&&(D-=p/2),q.beginPath(),q.lineWidth=r,q.moveTo(0+D,s+v-0.2*
  v),q.lineTo(0+D+p,s+v-0.2*v),q.stroke()),this.Wl&&(q.beginPath(),q.lineWidth=r,s=s+v-v/2.2|0,0!==r%2&&(s+=0.5),q.moveTo(0,s),q.lineTo(0+p,s),q.stroke()));g+=d+k}}};
  na.prototype.tt=function(a,b,c,d){var f={},g=0,h=0;if(isNaN(this.Ca.width)){g=this.le;if(0===g.length)g=0;else if(this.Tw){for(var k=h=0,l=!1,m={qh:0};!l;){var n=nm(g,k,m);-1===n&&(n=g.length,l=!0);k=om(g.substr(k,n-k).replace(/^\s+|\s+$/g,""),this.Tg);k>h&&(h=k);k=m.qh}g=h}else h=nm(g,0,{}),0<=h&&(g=g.substr(0,h)),g=k=om(g,this.Tg);g=Math.min(g,a/this.scale);g=Math.max(8,g)}else g=this.Ca.width;this.ia&&(g=Math.min(g,this.ia.He.width),g=Math.max(g,this.ia.Vf.width));h=mm(this,g,f);m=h=isNaN(this.Ca.height)?
  Math.min(h,b/this.scale):this.Ca.height;if(0!==f.Ag&&1!==f.Of.length&&this.Pk===km&&(b=this.Tg,l=this.Pk===km?pm(b):0,k=this.Pj+this.Qj,k=Math.max(0,zh(this)+k),m=Math.max(Math.floor(m/k)-1,0),!(m+1>=f.Of.length))){k=f.Of[m];for(a=Math.max(1,a-l);om(k,b)>a&&1<k.length;)k=k.substr(0,k.length-1);k+=t.Zs;a=om(k,b);f.Of[m]=k;f.Of=f.Of.slice(0,m+1);f.ug[m]=a;f.ug=f.ug.slice(0,m+1);f.qh=f.Of.length;f.Ag=Math.max(f.Ag,a)}if(this.rB===jm||isNaN(this.Ca.width))g=f.Ag,isNaN(this.Ca.width)&&(g=Math.max(8,g));
  g=Math.max(c,g);h=Math.max(d,h);Va(this.hd,g,h);hk(this,0,0,g,h);this.no=f};na.prototype.Uj=function(a,b,c,d){ok(this,a,b,c,d)};
  function lm(a,b,c,d){b=b.replace(/^\s+|\s+$/g,"");void 0===c.Ag&&(c.Ag=0);void 0===c.ug&&(c.ug=[]);void 0===c.Of&&(c.Of=[]);var f=0,g,h,k=a.Tg;g=a.Pj+a.Qj;var l=Math.max(0,zh(a)+g),m=a.Pk===km?pm(k):0;if(!(a.mf>=a.Ai)){if(a.xm===im){c.qh=1;g=om(b,k);if(0===m||g<=d)return c.Ag=g,c.ug.push(c.Ag),c.Of.push(b),new ga(g,l);var n=qm(b);b=b.substr(n.length);h=qm(b);for(g=om(n+h,k);0<h.length&&g<=d;)n+=h,b=b.substr(h.length),h=qm(b),g=om((n+h).replace(/^\s+|\s+$/g,""),k);n+=h.replace(/^\s+|\s+$/g,"");for(d=
  Math.max(1,d-m);om(n,k)>d&&1<n.length;)n=n.substr(0,n.length-1);n+=t.Zs;h=om(n,k);c.ug.push(h);c.Ag=h;c.Of.push(n);return new ga(h,l)}m=0;0===b.length&&(m=1,c.ug.push(0),c.Of.push(b));for(;0<b.length;){n=qm(b);for(b=b.substr(n.length);om(n,k)>d;){var p=1;g=om(n.substr(0,p),k);for(h=0;g<=d;)p++,h=g,g=om(n.substr(0,p),k);1===p?(c.ug[a.mf+m]=g,f=Math.max(f,g)):(c.ug[a.mf+m]=h,f=Math.max(f,h));p--;1>p&&(p=1);c.Of[a.mf+m]=n.substr(0,p);m++;n=n.substr(p);if(a.mf+m===a.Ai)break}h=qm(b);for(g=om(n+h,k);0<
  h.length&&g<=d;)n+=h,b=b.substr(h.length),h=qm(b),g=om((n+h).replace(/^\s+|\s+$/g,""),k);n=n.replace(/^\s+|\s+$/g,"");if(""!==n&&(0===h.length?(c.ug.push(g),f=Math.max(f,g)):(h=om(n,k),c.ug.push(h),f=Math.max(f,h)),c.Of.push(n),m++,a.mf+m===a.Ai))break}c.qh=Math.min(a.Ai,m);c.Ag=Math.max(c.Ag,f);return new ga(c.Ag,l*c.qh)}}function qm(a){for(var b=a.length,c=0;c<b&&" "!==a.charAt(c);)c++;for(;c<b&&" "===a.charAt(c);)c++;return c>=b?a:a.substr(0,c)}
  function om(a,b){t.Tp!==b&&(t.kn.font=b,t.Tp=b);return t.kn.measureText(a).width}function zh(a){if(null!==a.Rn)return a.Rn;var b=a.Tg;t.Tp!==b&&(t.kn.font=b,t.Tp=b);var c=0;void 0!==t.hA[b]&&5E3>t.EE?c=t.hA[b]:(c=1.3*t.kn.measureText("M").width,t.hA[b]=c,t.EE++);return a.Rn=c}function pm(a){t.Tp!==a&&(t.kn.font=a,t.Tp=a);var b=0;void 0!==t.Gw[a]&&5E3>t.gA?b=t.Gw[a]:(b=t.kn.measureText(t.Zs).width,t.Gw[a]=b,t.gA++);return b}
  function nm(a,b,c){void 0===c.qh&&(c.qh=0);var d=a.indexOf("\r",b);-1===d&&(d=a.indexOf("\n",b));0<=d&&(c.qh="\r"===a[d]&&d+1<a.length&&"\n"===a[d+1]?d+2:d+1);return d}
  function mm(a,b,c){var d=a.le,f=a.Pj+a.Qj,f=Math.max(0,zh(a)+f);if(0===d.length)return c.Ag=0,a.mf=1,f;if(!a.Tw){var g=nm(d,0,{});0<=g&&(d=d.substr(0,g))}for(var g=0,h=a.mf=0,k=-1,l={qh:0},m=!1;!m;)k=nm(d,h,l),-1===k&&(k=d.length,m=!0),h<=k&&(h=d.substr(h,k-h),a.xm!==im?(c.qh=0,h=lm(a,h,c,b),g+=h.height,a.mf+=c.qh):(lm(a,h,c,b),g+=f,a.mf++),a.mf===a.Ai&&(m=!0)),h=l.qh;return a.cv=g}t.g(na,"textValidation",na.prototype.Vt);
  t.defineProperty(na,{Vt:"textValidation"},function(){return this.Sk},function(a){var b=this.Sk;b!==a&&(null!==a&&t.i(a,"function",na,"textValidation"),this.Sk=a,this.j("textValidation",b,a))});t.g(na,"spacingAbove",na.prototype.UJ);t.defineProperty(na,{UJ:"spacingAbove"},function(){return this.Pj},function(a){var b=this.Pj;b!==a&&(this.Pj=a,this.j("spacingAbove",b,a))});t.g(na,"spacingBelow",na.prototype.VJ);
  t.defineProperty(na,{VJ:"spacingBelow"},function(){return this.Qj},function(a){var b=this.Qj;b!==a&&(this.Qj=a,this.j("spacingBelow",b,a))});t.g(na,"maxLines",na.prototype.oJ);t.defineProperty(na,{oJ:"maxLines"},function(){return this.Ai},function(a){var b=this.Ai;b!==a&&(this.Ai=a,this.j("maxLines",b,a))});function Vk(){Q.call(this);this.dg=null;this.qs="";this.Oj=(new x(NaN,NaN,NaN,NaN)).freeze();this.Wn=Cc;this.vs=this.kf=null;this.Uu=this.Lu=this.dm=!1;this.hC=!0;this.zo=null}t.ga("Picture",Vk);
  t.Ka(Vk,Q);var rm;Vk.clearCache=rm=function(a){void 0===a&&(a="");t.i(a,"string",Vk,"clearCache:url");""!==a?t.jt[a]&&(delete t.jt[a],t.Mw--):(t.jt={},t.Mw=0)};Vk.prototype.cloneProtected=function(a){Q.prototype.cloneProtected.call(this,a);a.element=this.dg;a.qs=this.qs;a.Oj.assign(this.Oj);a.Wn=this.Wn;a.kf=this.kf;a.zo=this.zo};Vk.prototype.toString=function(){return"Picture("+this.source+")#"+t.od(this)};t.g(Vk,"element",Vk.prototype.element);
  t.defineProperty(Vk,{element:"element"},function(){return this.dg},function(a){var b=this.dg;if(b!==a){a instanceof HTMLImageElement||a instanceof HTMLVideoElement||a instanceof HTMLCanvasElement||t.m("Picture.element must be an instance of Image, Canvas, or Video.");this.Lu=!1;var c=this;a instanceof HTMLCanvasElement?this.Uu=!0:(this.Uu=!1,a.onerror=function(a){c.Lu=!0;null!==c.kf&&c.kf(c,a)});this.dg=a;!0===a.complete||void 0===a.complete?(this.dm=!0,this.Ca.N()||(lk(this,!1),this.fa())):(t.nB.push(this),
  null===t.lx&&(t.lx=setInterval(function(){for(var a=[],b=t.nB,c=b.length,h=0;h<c;h++){var k=b[h],l;l=k;var m=l.dg;if(m)if(m.complete){l.dm=!0;l.Ca.N()||(lk(l,!1),l.fa());if(l.h)l.Ca.N()||l.h.Oc(),l.h.ka();else{l=t.aA;var n=l.length;if(0===n)for(var n=document.getElementsByTagName("canvas"),p=n.length,m=0;m<p;m++){var q=n[m];q.parentElement&&q.parentElement.U&&l.push(q.parentElement.U)}n=l.length;for(m=0;m<n;m++)l[m].ka()}l=!0}else l=!1;else l=!0;l||a.push(k)}0===a.length&&(clearInterval(t.lx),t.lx=
  null);t.nB=a},200)));this.j("element",b,a);this.ka()}});t.g(Vk,"source",Vk.prototype.source);
  t.defineProperty(Vk,{source:"source"},function(){return this.qs},function(a){var b=this.qs;if(b!==a){t.i(a,"string",Vk,"source");this.qs=a;this.Lu=!1;var c=t.jt;if(void 0!==c[a])this.element=c[a];else{10<t.Mw&&(rm(),c=t.jt);var d=document.createElement("img");d.src=a;var f=d.src,g=this.zo;d.crossOrigin=null===g?0===f.indexOf("data")||0===f.indexOf("file")?null:"anonymous":g();c[a]=d;t.Mw++;d instanceof HTMLImageElement&&(this.element=d)}this.ka();this.j("source",b,a)}});
  t.g(Vk,"sourceCrossOrigin",Vk.prototype.SJ);t.defineProperty(Vk,{SJ:"sourceCrossOrigin"},function(){return this.zo},function(a){this.zo!==a&&(null!==a&&t.i(a,"function",Vk,"sourceCrossOrigin"),this.zo=a,this.element&&(this.element.crossOrigin=null===a?0===a.indexOf("data")||a.indexOf("file")?null:"anonymous":a()))});t.g(Vk,"sourceRect",Vk.prototype.fi);
  t.defineProperty(Vk,{fi:"sourceRect"},function(){return this.Oj},function(a){var b=this.Oj;b.M(a)||(t.l(a,x,Vk,"sourceRect"),this.Oj=a=a.Z(),this.ka(),this.j("sourceRect",b,a))});t.g(Vk,"imageStretch",Vk.prototype.RI);t.defineProperty(Vk,{RI:"imageStretch"},function(){return this.Wn},function(a){var b=this.Wn;b!==a&&(t.Aa(a,Q,Vk,"imageStretch"),this.Wn=a,this.ka(),this.j("imageStretch",b,a))});t.g(Vk,"errorFunction",Vk.prototype.$s);
  t.defineProperty(Vk,{$s:"errorFunction"},function(){return this.kf},function(a){var b=this.kf;if(b!==a){null!==a&&t.i(a,"function",Vk,"errorFunction");this.kf=a;if(this.dg){var c=this;this.dg.onerror=function(a){null!==c.kf&&c.kf(c,a)}}this.j("errorFunction",b,a)}});
  Vk.prototype.el=function(a,b){if(!b.Mn){if(null===this.vs)if(null===this.dg)this.vs=!1;else{var c=document.createElement("canvas").getContext("2d");0!==this.dg.width&&0!==this.dg.height&&c.drawImage(this.dg,0,0);try{c.getImageData(0,0,1,1),this.vs=!1}catch(d){this.vs=!0}}if(this.vs)return}if(this.dm&&!this.Lu&&(c=this.dg,null!==c)){var f=c.src;null!==f&&""!==f||t.m("Element has no source attribute: "+c);var f=this.Ra,g=0,h=0,k=this.Uu,l=k?+c.width:c.naturalWidth,k=k?+c.height:c.naturalHeight;void 0===
  l&&c.videoWidth&&(l=c.videoWidth);void 0===k&&c.videoHeight&&(k=c.videoHeight);l=l||f.width;k=k||f.height;if(0!==l&&0!==k){this.fi.N()&&(g=this.Oj.x,h=this.Oj.y,l=this.Oj.width,k=this.Oj.height);var m=l,n=k,p=this.Wn;switch(p){case Ug:if(this.fi.N())break;g+=Math.max((m-f.width)/2,0);h+=Math.max((n-f.height)/2,0);l=Math.min(f.width,m);k=Math.min(f.height,n);break;case Cc:m=f.width;n=f.height;break;case Wg:case Xg:p===Wg?(p=Math.min(f.height/n,f.width/m),m*=p,n*=p):p===Xg&&(p=Math.max(f.height/n,f.width/
  m),m*=p,n*=p,g+=(m-f.width)/2,h+=(n-f.height)/2,l*=1/(m/f.width),k*=1/(n/f.height),m=f.width,n=f.height)}try{a.drawImage(c,g,h,l,k,Math.max((f.width-m)/2,0),Math.max((f.height-n)/2,0),Math.min(f.width,m),Math.min(f.height,n))}catch(q){e&&this.hC&&t.trace(q.toString()),this.hC=!1}}}};t.A(Vk,{Ra:"naturalBounds"},function(){return this.hd});
  Vk.prototype.tt=function(a,b,c,d){var f=this.Ca,g=kk(this),h=this.dg,k=this.Uu;if(k||!this.dm&&h&&h.complete)this.dm=!0;null===h&&(isFinite(a)||(a=0),isFinite(b)||(b=0));isFinite(f.width)||g===Cc||g===ck?(isFinite(a)||(a=this.fi.N()?this.fi.width:k?+h.width:h.naturalWidth),c=0):null!==h&&!1!==this.dm&&(a=this.fi.N()?this.fi.width:k?+h.width:h.naturalWidth);isFinite(f.height)||g===Cc||g===bk?(isFinite(b)||(b=this.fi.N()?this.fi.height:k?+h.height:h.naturalHeight),d=0):null!==h&&!1!==this.dm&&(b=this.fi.N()?
  this.fi.height:k?+h.height:h.naturalHeight);isFinite(f.width)&&(a=f.width);isFinite(f.height)&&(b=f.height);f=this.He;g=this.Vf;c=Math.max(c,g.width);d=Math.max(d,g.height);a=Math.min(f.width,a);b=Math.min(f.height,b);a=Math.max(c,a);b=Math.max(d,b);null===h||h.complete||(isFinite(a)||(a=0),isFinite(b)||(b=0));Va(this.hd,a,b);hk(this,0,0,a,b)};Vk.prototype.Uj=function(a,b,c,d){ok(this,a,b,c,d)};function ia(){this.s=new zc;this.Wb=null}aa=ia.prototype;aa.reset=function(){this.s=new zc;this.Wb=null};
  function J(a,b,c,d,f,g){null===a.s&&t.m("StreamGeometryContext has been closed");void 0!==f&&!0===f?(null===a.Wb&&t.m("Need to call beginFigure first"),d=new id(bd),d.D=b,d.F=c,a.Wb.Fa.add(d)):(a.Wb=new Bc,a.Wb.qa=b,a.Wb.ra=c,a.Wb.pp=d,a.s.Ab.add(a.Wb));void 0!==g&&(a.Wb.bo=g)}function M(a){null===a.s&&t.m("StreamGeometryContext has been closed");null===a.Wb&&t.m("Need to call beginFigure first");var b=a.Wb.Fa.length;0<b&&a.Wb.Fa.n[b-1].close()}
  function Zc(a){null===a.s&&t.m("StreamGeometryContext has been closed");null===a.Wb&&t.m("Need to call beginFigure first");0<a.Wb.Fa.length&&(a.Wb.pp=!0)}aa.bb=function(a){null===this.s&&t.m("StreamGeometryContext has been closed");null===this.Wb&&t.m("Need to call beginFigure first");this.Wb.gj=a};aa.moveTo=function(a,b,c){null===this.s&&t.m("StreamGeometryContext has been closed");null===this.Wb&&t.m("Need to call beginFigure first");var d=new id(bd);d.D=a;d.F=b;c&&d.close();this.Wb.Fa.add(d)};
  aa.lineTo=function(a,b,c){null===this.s&&t.m("StreamGeometryContext has been closed");null===this.Wb&&t.m("Need to call beginFigure first");var d=new id(Oc);d.D=a;d.F=b;c&&d.close();this.Wb.Fa.add(d)};function K(a,b,c,d,f,g,h,k){null===a.s&&t.m("StreamGeometryContext has been closed");null===a.Wb&&t.m("Need to call beginFigure first");var l=new id(cd);l.Bb=b;l.Rb=c;l.re=d;l.se=f;l.D=g;l.F=h;k&&l.close();a.Wb.Fa.add(l)}
  function Sc(a,b,c,d,f){null===a.s&&t.m("StreamGeometryContext has been closed");null===a.Wb&&t.m("Need to call beginFigure first");var g=new id(dd);g.Bb=b;g.Rb=c;g.D=d;g.F=f;a.Wb.Fa.add(g)}aa.arcTo=function(a,b,c,d,f,g,h){null===this.s&&t.m("StreamGeometryContext has been closed");null===this.Wb&&t.m("Need to call beginFigure first");var k=new id(ed);k.nh=a;k.hi=b;k.Da=c;k.Pa=d;k.radiusX=f;k.radiusY=g?g:f;h&&k.close();this.Wb.Fa.add(k)};
  function Tc(a,b,c,d,f,g,h,k){null===a.s&&t.m("StreamGeometryContext has been closed");null===a.Wb&&t.m("Need to call beginFigure first");b=new id(fd,h,k,b,c,d,f,g);a.Wb.Fa.add(b)}
  H.makeGeometry=function(a,b,c){var d=a.Ca,f=d.width,d=d.height;void 0!==b&&!isNaN(b)&&isFinite(b)&&(f=b);void 0!==c&&!isNaN(c)&&isFinite(c)&&(d=c);isFinite(f)||(f=100);isFinite(d)||(d=100);b=void 0;"None"!==a.on?b=H.Bm[a.on]:"None"!==a.Hw?b=H.Bm[a.Hw]:(c=H.bj[a.zb],"string"===typeof c&&(c=H.bj[c]),void 0===c&&t.m("Unknown Shape.figure: "+a.zb),b=c(a,f,d),b.$n=f,b.Zn=d);void 0===b&&(c=H.bj.Rectangle)&&(b=c(a,f,d));return b};
  H.Vi=function(a,b,c,d,f,g,h,k,l,m,n,p,q,r){var s=1-l;a=a*s+c*l;b=b*s+d*l;c=c*s+f*l;d=d*s+g*l;f=f*s+h*l;g=g*s+k*l;k=a*s+c*l;h=b*s+d*l;c=c*s+f*l;d=d*s+g*l;m.x=a;m.y=b;n.x=k;n.y=h;p.x=k*s+c*l;p.y=h*s+d*l;q.x=c;q.y=d;r.x=f;r.y=g};H.Xo=function(a){a=H.Km(a);var b=t.Cb();b[0]=a[0];for(var c=1,d=1;c<a.length;c+=2,d+=3)b[d]=a[c],b[d+1]=a[c],b[d+2]=a[c+1];t.ya(a);return b};
  H.Km=function(a){var b=H.cl(a),c=t.Cb(),d=Math.floor(b.length/2),f=b.length-1;a=0===a%2?2:1;for(var g=0;g<f;g++){var h=b[g],k=b[g+1],l=b[(d+g-1)%f],m=b[(d+g+a)%f];c[2*g]=h;c[2*g+1]=H.il(h.x,h.y,l.x,l.y,k.x,k.y,m.x,m.y,new w)}c[c.length]=c[0];t.ya(b);return c};H.il=function(a,b,c,d,f,g,h,k,l){c=a-c;h=f-h;0===c||0===h?0===c?(h=(g-k)/h,k=a,f=h*k+(g-h*f)):(d=(b-d)/c,k=f,f=d*k+(b-d*a)):(d=(b-d)/c,h=(g-k)/h,a=b-d*a,k=(g-h*f-a)/(d-h),f=d*k+a);l.p(k,f);return l};
  H.cl=function(a){for(var b=t.Cb(),c=1.5*Math.PI,d=0,f=0;f<a;f++)d=2*Math.PI/a*f+c,b[f]=new w(0.5+0.5*Math.cos(d),0.5+0.5*Math.sin(d));b.push(b[0]);return b};H.uB=(new I(0.156,0.156)).Ja();H.vB=(new I(0.844,0.844)).Ja();
  H.bj={None:"Rectangle",Rectangle:function(a,b,c){a=new zc;a.type=Ec;a.qa=0;a.ra=0;a.D=b;a.F=c;return a},Square:function(a,b,c){a=new zc;a.vc=Wg;a.type=Ec;a.qa=0;a.ra=0;a.D=b;a.F=c;return a},Ellipse:function(a,b,c){a=new zc;a.type=Mc;a.qa=0;a.ra=0;a.D=b;a.F=c;a.G=H.uB;a.H=H.vB;return a},Circle:function(a,b,c){a=new zc;a.vc=Wg;a.type=Mc;a.qa=0;a.ra=0;a.D=b;a.F=c;a.G=H.uB;a.H=H.vB;return a},Connector:"Ellipse",TriangleRight:function(a,b,c){a=new zc;var d=new Bc,f=new id;f.D=b;f.F=0.5*c;d.Fa.add(f);b=
  new id;b.D=0;b.F=c;d.Fa.add(b.close());a.Ab.add(d);a.G=new I(0,0.25);a.H=new I(0.5,0.75);return a},TriangleDown:function(a,b,c){a=new zc;var d=new Bc,f=new id;f.D=b;f.F=0;d.Fa.add(f);f=new id;f.D=0.5*b;f.F=c;d.Fa.add(f.close());a.Ab.add(d);a.G=new I(0.25,0);a.H=new I(0.75,0.5);return a},TriangleLeft:function(a,b,c){a=new zc;var d=new Bc;d.qa=b;d.ra=c;var f=new id;f.D=0;f.F=0.5*c;d.Fa.add(f);c=new id;c.D=b;c.F=0;d.Fa.add(c.close());a.Ab.add(d);a.G=new I(0.5,0.25);a.H=new I(1,0.75);return a},TriangleUp:function(a,
  b,c){a=new zc;var d=new Bc;d.qa=b;d.ra=c;var f=new id;f.D=0;f.F=c;d.Fa.add(f);c=new id;c.D=0.5*b;c.F=0;d.Fa.add(c.close());a.Ab.add(d);a.G=new I(0.25,0.5);a.H=new I(0.75,1);return a},Line1:function(a,b,c){a=new zc;a.type=Dc;a.qa=0;a.ra=0;a.D=b;a.F=c;return a},Line2:function(a,b,c){a=new zc;a.type=Dc;a.qa=b;a.ra=0;a.D=0;a.F=c;return a},MinusLine:"LineH",LineH:function(a,b,c){a=new zc;a.type=Dc;a.qa=0;a.ra=c/2;a.D=b;a.F=c/2;return a},LineV:function(a,b,c){a=new zc;a.type=Dc;a.qa=b/2;a.ra=0;a.D=b/2;
  a.F=c;return a},Curve1:function(a,b,c){var d=H.va;a=t.u();J(a,0,0,!1);K(a,d*b,0,1*b,(1-d)*c,b,c);b=a.s;t.v(a);return b},Curve2:function(a,b,c){var d=H.va;a=t.u();J(a,0,0,!1);K(a,0,d*c,(1-d)*b,c,b,c);b=a.s;t.v(a);return b},Curve3:function(a,b,c){var d=H.va;a=t.u();J(a,1*b,0,!1);K(a,1*b,d*c,d*b,1*c,0,1*c);b=a.s;t.v(a);return b},Curve4:function(a,b,c){var d=H.va;a=t.u();J(a,1*b,0,!1);K(a,(1-d)*b,0,0,(1-d)*c,0,1*c);b=a.s;t.v(a);return b},Alternative:"Triangle",Merge:"Triangle",Triangle:function(a,b,c){a=
  t.u();J(a,0.5*b,0*c,!0);a.lineTo(0*b,1*c);a.lineTo(1*b,1*c,!0);b=a.s;b.G=new I(0.25,0.5);b.H=new I(0.75,1);t.v(a);return b},Decision:"Diamond",Diamond:function(a,b,c){a=t.u();J(a,0.5*b,0,!0);a.lineTo(0,0.5*c);a.lineTo(0.5*b,1*c);a.lineTo(1*b,0.5*c,!0);b=a.s;b.G=new I(0.25,0.25);b.H=new I(0.75,0.75);t.v(a);return b},Pentagon:function(a,b,c){var d=H.cl(5);a=t.u();J(a,d[0].x*b,d[0].y*c,!0);for(var f=1;5>f;f++)a.lineTo(d[f].x*b,d[f].y*c);t.ya(d);M(a);b=a.s;b.G=new I(0.2,0.22);b.H=new I(0.8,0.9);t.v(a);
  return b},DataTransmission:"Hexagon",Hexagon:function(a,b,c){var d=H.cl(6);a=t.u();J(a,d[0].x*b,d[0].y*c,!0);for(var f=1;6>f;f++)a.lineTo(d[f].x*b,d[f].y*c);t.ya(d);M(a);b=a.s;b.G=new I(0.07,0.25);b.H=new I(0.93,0.75);t.v(a);return b},Heptagon:function(a,b,c){var d=H.cl(7);a=t.u();J(a,d[0].x*b,d[0].y*c,!0);for(var f=1;7>f;f++)a.lineTo(d[f].x*b,d[f].y*c);t.ya(d);M(a);b=a.s;b.G=new I(0.2,0.15);b.H=new I(0.8,0.85);t.v(a);return b},Octagon:function(a,b,c){var d=H.cl(8);a=t.u();J(a,d[0].x*b,d[0].y*c,!0);
  for(var f=1;8>f;f++)a.lineTo(d[f].x*b,d[f].y*c);t.ya(d);M(a);b=a.s;b.G=new I(0.15,0.15);b.H=new I(0.85,0.85);t.v(a);return b},Nonagon:function(a,b,c){var d=H.cl(9);a=t.u();J(a,d[0].x*b,d[0].y*c,!0);for(var f=1;9>f;f++)a.lineTo(d[f].x*b,d[f].y*c);t.ya(d);M(a);b=a.s;b.G=new I(0.17,0.13);b.H=new I(0.82,0.82);t.v(a);return b},Decagon:function(a,b,c){var d=H.cl(10);a=t.u();J(a,d[0].x*b,d[0].y*c,!0);for(var f=1;10>f;f++)a.lineTo(d[f].x*b,d[f].y*c);t.ya(d);M(a);b=a.s;b.G=new I(0.16,0.16);b.H=new I(0.84,
  0.84);t.v(a);return b},Dodecagon:function(a,b,c){var d=H.cl(12);a=t.u();J(a,d[0].x*b,d[0].y*c,!0);for(var f=1;12>f;f++)a.lineTo(d[f].x*b,d[f].y*c);t.ya(d);M(a);b=a.s;b.G=new I(0.16,0.16);b.H=new I(0.84,0.84);t.v(a);return b},FivePointedStar:function(a,b,c){var d=H.Km(5);a=t.u();J(a,d[0].x*b,d[0].y*c,!0);for(var f=1;10>f;f++)a.lineTo(d[f].x*b,d[f].y*c);t.ya(d);M(a);b=a.s;b.G=new I(0.312,0.383);b.H=new I(0.693,0.765);t.v(a);return b},SixPointedStar:function(a,b,c){var d=H.Km(6);a=t.u();J(a,d[0].x*b,
  d[0].y*c,!0);for(var f=1;12>f;f++)a.lineTo(d[f].x*b,d[f].y*c);t.ya(d);M(a);b=a.s;b.G=new I(0.17,0.251);b.H=new I(0.833,0.755);t.v(a);return b},SevenPointedStar:function(a,b,c){var d=H.Km(7);a=t.u();J(a,d[0].x*b,d[0].y*c,!0);for(var f=1;14>f;f++)a.lineTo(d[f].x*b,d[f].y*c);t.ya(d);M(a);b=a.s;b.G=new I(0.363,0.361);b.H=new I(0.641,0.709);t.v(a);return b},EightPointedStar:function(a,b,c){var d=H.Km(8);a=t.u();J(a,d[0].x*b,d[0].y*c,!0);for(var f=1;16>f;f++)a.lineTo(d[f].x*b,d[f].y*c);t.ya(d);M(a);b=a.s;
  b.G=new I(0.252,0.255);b.H=new I(0.75,0.75);t.v(a);return b},NinePointedStar:function(a,b,c){var d=H.Km(9);a=t.u();J(a,d[0].x*b,d[0].y*c,!0);for(var f=1;18>f;f++)a.lineTo(d[f].x*b,d[f].y*c);t.ya(d);M(a);b=a.s;b.G=new I(0.355,0.361);b.H=new I(0.645,0.651);t.v(a);return b},TenPointedStar:function(a,b,c){var d=H.Km(10);a=t.u();J(a,d[0].x*b,d[0].y*c,!0);for(var f=1;20>f;f++)a.lineTo(d[f].x*b,d[f].y*c);t.ya(d);M(a);b=a.s;b.G=new I(0.281,0.261);b.H=new I(0.723,0.748);t.v(a);return b},FivePointedBurst:function(a,
  b,c){var d=H.Xo(5);a=t.u();J(a,d[0].x*b,d[0].y*c,!0);for(var f=1;f<d.length;f+=3)K(a,d[f].x*b,d[f].y*c,d[f+1].x*b,d[f+1].y*c,d[f+2].x*b,d[f+2].y*c);t.ya(d);M(a);b=a.s;b.G=new I(0.312,0.383);b.H=new I(0.693,0.765);t.v(a);return b},SixPointedBurst:function(a,b,c){var d=H.Xo(6);a=t.u();J(a,d[0].x*b,d[0].y*c,!0);for(var f=1;f<d.length;f+=3)K(a,d[f].x*b,d[f].y*c,d[f+1].x*b,d[f+1].y*c,d[f+2].x*b,d[f+2].y*c);t.ya(d);M(a);b=a.s;b.G=new I(0.17,0.251);b.H=new I(0.833,0.755);t.v(a);return b},SevenPointedBurst:function(a,
  b,c){var d=H.Xo(7);a=t.u();J(a,d[0].x*b,d[0].y*c,!0);for(var f=1;f<d.length;f+=3)K(a,d[f].x*b,d[f].y*c,d[f+1].x*b,d[f+1].y*c,d[f+2].x*b,d[f+2].y*c);t.ya(d);M(a);b=a.s;b.G=new I(0.363,0.361);b.H=new I(0.641,0.709);t.v(a);return b},EightPointedBurst:function(a,b,c){var d=H.Xo(8);a=t.u();J(a,d[0].x*b,d[0].y*c,!0);for(var f=1;f<d.length;f+=3)K(a,d[f].x*b,d[f].y*c,d[f+1].x*b,d[f+1].y*c,d[f+2].x*b,d[f+2].y*c);t.ya(d);M(a);b=a.s;b.G=new I(0.252,0.255);b.H=new I(0.75,0.75);t.v(a);return b},NinePointedBurst:function(a,
  b,c){var d=H.Xo(9);a=t.u();J(a,d[0].x*b,d[0].y*c,!0);for(var f=1;f<d.length;f+=3)K(a,d[f].x*b,d[f].y*c,d[f+1].x*b,d[f+1].y*c,d[f+2].x*b,d[f+2].y*c);t.ya(d);M(a);b=a.s;b.G=new I(0.355,0.361);b.H=new I(0.645,0.651);t.v(a);return b},TenPointedBurst:function(a,b,c){var d=H.Xo(10);a=t.u();J(a,d[0].x*b,d[0].y*c,!0);for(var f=1;f<d.length;f+=3)K(a,d[f].x*b,d[f].y*c,d[f+1].x*b,d[f+1].y*c,d[f+2].x*b,d[f+2].y*c);t.ya(d);M(a);b=a.s;b.G=new I(0.281,0.261);b.H=new I(0.723,0.748);t.v(a);return b},Cloud:function(a,
  b,c){a=t.u();J(a,0.08034461*b,0.1944299*c,!0);K(a,-0.09239631*b,0.07836421*c,0.1406031*b,-0.0542823*c,0.2008615*b,0.05349299*c);K(a,0.2450511*b,-0.00697547*c,0.3776197*b,-0.01112067*c,0.4338609*b,0.074219*c);K(a,0.4539471*b,0,0.6066018*b,-0.02526587*c,0.6558228*b,0.07004196*c);K(a,0.6914277*b,-0.01904177*c,0.8921095*b,-0.01220843*c,0.8921095*b,0.08370865*c);K(a,1.036446*b,0.04105738*c,1.020377*b,0.3022052*c,0.9147671*b,0.3194596*c);K(a,1.04448*b,0.360238*c,0.992256*b,0.5219009*c,0.9082935*b,0.562044*
  c);K(a,1.032337*b,0.5771781*c,1.018411*b,0.8120651*c,0.9212406*b,0.8217117*c);K(a,1.028411*b,0.9571472*c,0.8556702*b,1.052487*c,0.7592566*b,0.9156953*c);K(a,0.7431877*b,1.009325*c,0.5624123*b,1.021761*c,0.5101666*b,0.9310455*c);K(a,0.4820677*b,1.031761*c,0.3030112*b,1.002796*c,0.2609328*b,0.9344623*c);K(a,0.2329994*b,1.01518*c,0.03213784*b,1.01518*c,0.08034461*b,0.870098*c);K(a,-0.02812061*b,0.9032597*c,-0.01205169*b,0.6835638*c,0.06829292*b,0.6545475*c);K(a,-0.01812061*b,0.6089503*c,-0.00606892*
  b,0.4555777*c,0.06427569*b,0.4265613*c);K(a,-0.01606892*b,0.3892545*c,-0.01205169*b,0.1944299*c,0.08034461*b,0.1944299*c);M(a);b=a.s;b.G=new I(0.1,0.1);b.H=new I(0.9,0.9);t.v(a);return b},Gate:"Crescent",Crescent:function(a,b,c){a=t.u();J(a,0,0,!0);K(a,1*b,0,1*b,1*c,0,1*c);K(a,0.5*b,0.75*c,0.5*b,0.25*c,0,0);M(a);b=a.s;b.G=new I(0.511,0.19);b.H=new I(0.776,0.76);t.v(a);return b},FramedRectangle:function(a,b,c){var d=t.u(),f=a?a.Hc:0;a=a?a.Et:0;0===f&&(f=0.1);0===a&&(a=0.1);J(d,0,0,!0);d.lineTo(1*b,
  0);d.lineTo(1*b,1*c);d.lineTo(0,1*c,!0);J(d,f*b,a*c,!1,!0);d.lineTo(f*b,(1-a)*c);d.lineTo((1-f)*b,(1-a)*c);d.lineTo((1-f)*b,a*c,!0);b=d.s;b.G=new I(f,a);b.H=new I(1-f,1-a);t.v(d);return b},Delay:"HalfEllipse",HalfEllipse:function(a,b,c){var d=H.va;a=t.u();J(a,0,0,!0);K(a,d*b,0,1*b,(0.5-d/2)*c,1*b,0.5*c);K(a,1*b,(0.5+d/2)*c,d*b,1*c,0,1*c);M(a);b=a.s;b.G=new I(0,0.2);b.H=new I(0.75,0.8);t.v(a);return b},Heart:function(a,b,c){a=t.u();J(a,0.5*b,1*c,!0);K(a,0.1*b,0.8*c,0,0.5*c,0*b,0.3*c);K(a,0*b,0,0.45*
  b,0,0.5*b,0.3*c);K(a,0.55*b,0,1*b,0,1*b,0.3*c);K(a,b,0.5*c,0.9*b,0.8*c,0.5*b,1*c);M(a);b=a.s;b.G=new I(0.15,0.29);b.H=new I(0.86,0.68);t.v(a);return b},Spade:function(a,b,c){a=t.u();J(a,0.5*b,0,!0);a.lineTo(0.51*b,0.01*c);K(a,0.6*b,0.2*c,b,0.25*c,b,0.5*c);K(a,b,0.8*c,0.6*b,0.8*c,0.55*b,0.7*c);K(a,0.5*b,0.75*c,0.55*b,0.95*c,0.75*b,c);a.lineTo(0.25*b,c);K(a,0.45*b,0.95*c,0.5*b,0.75*c,0.45*b,0.7*c);K(a,0.4*b,0.8*c,0,0.8*c,0,0.5*c);K(a,0,0.25*c,0.4*b,0.2*c,0.49*b,0.01*c);M(a);b=a.s;b.G=new I(0.19,0.26);
  b.H=new I(0.8,0.68);t.v(a);return b},Club:function(a,b,c){a=t.u();J(a,0.4*b,0.6*c,!0);K(a,0.5*b,0.75*c,0.45*b,0.95*c,0.15*b,1*c);a.lineTo(0.85*b,c);K(a,0.55*b,0.95*c,0.5*b,0.75*c,0.6*b,0.6*c);var d=0.2,f=0.3,g=0,h=4*(Math.SQRT2-1)/3*d;K(a,(0.5-d+f)*b,(0.5+h+g)*c,(0.5-h+f)*b,(0.5+d+g)*c,(0.5+f)*b,(0.5+d+g)*c);K(a,(0.5+h+f)*b,(0.5+d+g)*c,(0.5+d+f)*b,(0.5+h+g)*c,(0.5+d+f)*b,(0.5+g)*c);K(a,(0.5+d+f)*b,(0.5-h+g)*c,(0.5+h+f)*b,(0.5-d+g)*c,(0.5+f)*b,(0.5-d+g)*c);K(a,(0.5-h+f)*b,(0.5-d+g)*c,(0.5-d+f+0.05)*
  b,(0.5-h+g-0.02)*c,0.65*b,0.36771243*c);d=0.2;f=0;g=-0.3;h=4*(Math.SQRT2-1)/3*d;K(a,(0.5+h+f)*b,(0.5+d+g)*c,(0.5+d+f)*b,(0.5+h+g)*c,(0.5+d+f)*b,(0.5+g)*c);K(a,(0.5+d+f)*b,(0.5-h+g)*c,(0.5+h+f)*b,(0.5-d+g)*c,(0.5+f)*b,(0.5-d+g)*c);K(a,(0.5-h+f)*b,(0.5-d+g)*c,(0.5-d+f)*b,(0.5-h+g)*c,(0.5-d+f)*b,(0.5+g)*c);K(a,(0.5-d+f)*b,(0.5+h+g)*c,(0.5-h+f)*b,(0.5+d+g)*c,0.35*b,0.36771243*c);d=0.2;f=-0.3;g=0;h=4*(Math.SQRT2-1)/3*d;K(a,(0.5+d+f-0.05)*b,(0.5-h+g-0.02)*c,(0.5+h+f)*b,(0.5-d+g)*c,(0.5+f)*b,(0.5-d+g)*c);
  K(a,(0.5-h+f)*b,(0.5-d+g)*c,(0.5-d+f)*b,(0.5-h+g)*c,(0.5-d+f)*b,(0.5+g)*c);K(a,(0.5-d+f)*b,(0.5+h+g)*c,(0.5-h+f)*b,(0.5+d+g)*c,(0.5+f)*b,(0.5+d+g)*c);K(a,(0.5+h+f)*b,(0.5+d+g)*c,(0.5+d+f)*b,(0.5+h+g)*c,0.4*b,0.6*c);M(a);b=a.s;b.G=new I(0.06,0.39);b.H=new I(0.93,0.58);t.v(a);return b},Ring:function(a,b,c){a=t.u();var d=4*(Math.SQRT2-1)/3*0.5;J(a,b,0.5*c,!0);K(a,b,(0.5-d)*c,(0.5+d)*b,0,0.5*b,0);K(a,(0.5-d)*b,0,0,(0.5-d)*c,0,0.5*c);K(a,0,(0.5+d)*c,(0.5-d)*b,c,0.5*b,c);K(a,(0.5+d)*b,c,b,(0.5+d)*c,b,0.5*
  c);d=4*(Math.SQRT2-1)/3*0.4;J(a,0.5*b,0.1*c,!0,!0);K(a,(0.5+d)*b,0.1*c,0.9*b,(0.5-d)*c,0.9*b,0.5*c);K(a,0.9*b,(0.5+d)*c,(0.5+d)*b,0.9*c,0.5*b,0.9*c);K(a,(0.5-d)*b,0.9*c,0.1*b,(0.5+d)*c,0.1*b,0.5*c);K(a,0.1*b,(0.5-d)*c,(0.5-d)*b,0.1*c,0.5*b,0.1*c);b=a.s;b.G=new I(0.146,0.146);b.H=new I(0.853,0.853);b.vc=Wg;t.v(a);return b},YinYang:function(a,b,c){var d=0.5;a=t.u();d=0.5;J(a,0.5*b,0,!0);a.arcTo(270,180,0.5*b,0.5*b,0.5*b);K(a,1*b,d*c,0,d*c,d*b,0,!0);var d=0.1,f=0.25;J(a,(0.5+d)*b,f*c,!0,!0);a.arcTo(0,
  -360,0.5*b,c*f,d*b);M(a);J(a,0.5*b,0,!1);a.arcTo(270,-180,0.5*b,0.5*b,0.5*b);a.bb(!1);f=0.75;J(a,(0.5+d)*b,f*c,!0);a.arcTo(0,360,0.5*b,c*f,d*b);M(a);b=a.s;b.vc=Wg;t.v(a);return b},Peace:function(a,b,c){a=t.u();var d=4*(Math.SQRT2-1)/3*0.5;J(a,b,0.5*c,!0);K(a,b,(0.5-d)*c,(0.5+d)*b,0,0.5*b,0);K(a,(0.5-d)*b,0,0,(0.5-d)*c,0,0.5*c);K(a,0,(0.5+d)*c,(0.5-d)*b,c,0.5*b,c);K(a,(0.5+d)*b,c,b,(0.5+d)*c,b,0.5*c);d=4*(Math.SQRT2-1)/3*0.4;J(a,0.5*b,0.1*c,!0,!0);K(a,(0.5+d)*b,0.1*c,0.9*b,(0.5-d)*c,0.9*b,0.5*c);K(a,
  0.9*b,(0.5+d)*c,(0.5+d)*b,0.9*c,0.5*b,0.9*c);K(a,(0.5-d)*b,0.9*c,0.1*b,(0.5+d)*c,0.1*b,0.5*c);K(a,0.1*b,(0.5-d)*c,(0.5-d)*b,0.1*c,0.5*b,0.1*c);var d=0.07,f=0,g=-0.707*0.11,h=4*(Math.SQRT2-1)/3*d;J(a,(0.5+d+f)*b,(0.5+g)*c,!0);K(a,(0.5+d+f)*b,(0.5-h+g)*c,(0.5+h+f)*b,(0.5-d+g)*c,(0.5+f)*b,(0.5-d+g)*c);K(a,(0.5-h+f)*b,(0.5-d+g)*c,(0.5-d+f)*b,(0.5-h+g)*c,(0.5-d+f)*b,(0.5+g)*c);K(a,(0.5-d+f)*b,(0.5+h+g)*c,(0.5-h+f)*b,(0.5+d+g)*c,(0.5+f)*b,(0.5+d+g)*c);K(a,(0.5+h+f)*b,(0.5+d+g)*c,(0.5+d+f)*b,(0.5+h+g)*c,
  (0.5+d+f)*b,(0.5+g)*c);d=0.07;f=-0.707*0.11;g=0.707*0.11;h=4*(Math.SQRT2-1)/3*d;J(a,(0.5+d+f)*b,(0.5+g)*c,!0);K(a,(0.5+d+f)*b,(0.5-h+g)*c,(0.5+h+f)*b,(0.5-d+g)*c,(0.5+f)*b,(0.5-d+g)*c);K(a,(0.5-h+f)*b,(0.5-d+g)*c,(0.5-d+f)*b,(0.5-h+g)*c,(0.5-d+f)*b,(0.5+g)*c);K(a,(0.5-d+f)*b,(0.5+h+g)*c,(0.5-h+f)*b,(0.5+d+g)*c,(0.5+f)*b,(0.5+d+g)*c);K(a,(0.5+h+f)*b,(0.5+d+g)*c,(0.5+d+f)*b,(0.5+h+g)*c,(0.5+d+f)*b,(0.5+g)*c);d=0.07;f=0.707*0.11;g=0.707*0.11;h=4*(Math.SQRT2-1)/3*d;J(a,(0.5+d+f)*b,(0.5+g)*c,!0);K(a,(0.5+
  d+f)*b,(0.5-h+g)*c,(0.5+h+f)*b,(0.5-d+g)*c,(0.5+f)*b,(0.5-d+g)*c);K(a,(0.5-h+f)*b,(0.5-d+g)*c,(0.5-d+f)*b,(0.5-h+g)*c,(0.5-d+f)*b,(0.5+g)*c);K(a,(0.5-d+f)*b,(0.5+h+g)*c,(0.5-h+f)*b,(0.5+d+g)*c,(0.5+f)*b,(0.5+d+g)*c);K(a,(0.5+h+f)*b,(0.5+d+g)*c,(0.5+d+f)*b,(0.5+h+g)*c,(0.5+d+f)*b,(0.5+g)*c);b=a.s;b.G=new I(0.146,0.146);b.H=new I(0.853,0.853);b.vc=Wg;t.v(a);return b},NotAllowed:function(a,b,c){var d=H.va,f=0.5*d,g=0.5;a=t.u();J(a,0.5*b,(0.5-g)*c,!0);K(a,(0.5-f)*b,(0.5-g)*c,(0.5-g)*b,(0.5-f)*c,(0.5-
  g)*b,0.5*c);K(a,(0.5-g)*b,(0.5+f)*c,(0.5-f)*b,(0.5+g)*c,0.5*b,(0.5+g)*c);K(a,(0.5+f)*b,(0.5+g)*c,(0.5+g)*b,(0.5+f)*c,(0.5+g)*b,0.5*c);K(a,(0.5+g)*b,(0.5-f)*c,(0.5+f)*b,(0.5-g)*c,0.5*b,(0.5-g)*c);var g=0.4,f=0.4*d,d=t.K(),h=t.K(),k=t.K(),l=t.K();H.Vi(0.5,0.5-g,0.5+f,0.5-g,0.5+g,0.5-f,0.5+g,0.5,0.42,d,h,k,l,l);var m=t.K(),n=t.K(),p=t.K();H.Vi(0.5,0.5-g,0.5+f,0.5-g,0.5+g,0.5-f,0.5+g,0.5,0.58,l,l,p,m,n);var q=t.K(),r=t.K(),s=t.K();H.Vi(0.5,0.5+g,0.5-f,0.5+g,0.5-g,0.5+f,0.5-g,0.5,0.42,q,r,s,l,l);var u=
  t.K(),v=t.K(),D=t.K();H.Vi(0.5,0.5+g,0.5-f,0.5+g,0.5-g,0.5+f,0.5-g,0.5,0.58,l,l,D,u,v);J(a,D.x*b,D.y*c,!0,!0);K(a,u.x*b,u.y*c,v.x*b,v.y*c,(0.5-g)*b,0.5*c);K(a,(0.5-g)*b,(0.5-f)*c,(0.5-f)*b,(0.5-g)*c,0.5*b,(0.5-g)*c);K(a,d.x*b,d.y*c,h.x*b,h.y*c,k.x*b,k.y*c);a.lineTo(D.x*b,D.y*c);M(a);J(a,s.x*b,s.y*c,!0,!0);a.lineTo(p.x*b,p.y*c);K(a,m.x*b,m.y*c,n.x*b,n.y*c,(0.5+g)*b,0.5*c);K(a,(0.5+g)*b,(0.5+f)*c,(0.5+f)*b,(0.5+g)*c,0.5*b,(0.5+g)*c);K(a,q.x*b,q.y*c,r.x*b,r.y*c,s.x*b,s.y*c);M(a);t.B(d);t.B(h);t.B(k);
  t.B(l);t.B(m);t.B(n);t.B(p);t.B(q);t.B(r);t.B(s);t.B(u);t.B(v);t.B(D);b=a.s;t.v(a);b.vc=Wg;return b},Fragile:function(a,b,c){a=t.u();J(a,0,0,!0);a.lineTo(0.25*b,0);a.lineTo(0.2*b,0.15*c);a.lineTo(0.3*b,0.25*c);a.lineTo(0.29*b,0.33*c);a.lineTo(0.35*b,0.25*c);a.lineTo(0.3*b,0.15*c);a.lineTo(0.4*b,0);a.lineTo(1*b,0);K(a,1*b,0.25*c,0.75*b,0.5*c,0.55*b,0.5*c);a.lineTo(0.55*b,0.9*c);a.lineTo(0.7*b,0.9*c);a.lineTo(0.7*b,1*c);a.lineTo(0.3*b,1*c);a.lineTo(0.3*b,0.9*c);a.lineTo(0.45*b,0.9*c);a.lineTo(0.45*
  b,0.5*c);K(a,0.25*b,0.5*c,0,0.25*c,0,0);M(a);b=a.s;b.G=new I(0.25,0);b.H=new I(0.75,0.4);t.v(a);return b},HourGlass:function(a,b,c){a=t.u();J(a,0.65*b,0.5*c,!0);a.lineTo(1*b,1*c);a.lineTo(0,1*c);a.lineTo(0.35*b,0.5*c);a.lineTo(0,0);a.lineTo(1*b,0);M(a);b=a.s;t.v(a);return b},Lightning:function(a,b,c){a=t.u();J(a,0*b,0.55*c,!0);a.lineTo(0.75*b,0);a.lineTo(0.25*b,0.45*c);a.lineTo(0.9*b,0.48*c);a.lineTo(0.4*b,1*c);a.lineTo(0.65*b,0.55*c);M(a);b=a.s;t.v(a);return b},Parallelogram1:function(a,b,c){a=a?
  a.Hc:0;0===a&&(a=0.1);var d=t.u();J(d,a*b,0,!0);d.lineTo(1*b,0);d.lineTo((1-a)*b,1*c);d.lineTo(0,1*c);M(d);b=d.s;b.G=new I(a,0);b.H=new I(1-a,1);t.v(d);return b},Input:"Output",Output:function(a,b,c){a=t.u();J(a,0,1*c,!0);a.lineTo(0.1*b,0);a.lineTo(1*b,0);a.lineTo(0.9*b,1*c);M(a);b=a.s;b.G=new I(0.1,0);b.H=new I(0.9,1);t.v(a);return b},Parallelogram2:function(a,b,c){a=a?a.Hc:0;0===a&&(a=0.25);var d=t.u();J(d,a*b,0,!0);d.lineTo(1*b,0);d.lineTo((1-a)*b,1*c);d.lineTo(0,1*c);M(d);b=d.s;b.G=new I(a,0);
  b.H=new I(1-a,1);t.v(d);return b},ThickCross:function(a,b,c){a=a?a.Hc:0;0===a&&(a=0.25);var d=t.u();J(d,(0.5-a/2)*b,0,!0);d.lineTo((0.5+a/2)*b,0);d.lineTo((0.5+a/2)*b,(0.5-a/2)*c);d.lineTo(1*b,(0.5-a/2)*c);d.lineTo(1*b,(0.5+a/2)*c);d.lineTo((0.5+a/2)*b,(0.5+a/2)*c);d.lineTo((0.5+a/2)*b,1*c);d.lineTo((0.5-a/2)*b,1*c);d.lineTo((0.5-a/2)*b,(0.5+a/2)*c);d.lineTo(0,(0.5+a/2)*c);d.lineTo(0,(0.5-a/2)*c);d.lineTo((0.5-a/2)*b,(0.5-a/2)*c);M(d);b=d.s;b.G=new I(0.5-a/2,0.5-a/2);b.H=new I(0.5+a/2,0.5+a/2);t.v(d);
  return b},ThickX:function(a,b,c){a=0.25/Math.SQRT2;var d=t.u();J(d,0.3*b,0,!0);d.lineTo(0.5*b,0.2*c);d.lineTo(0.7*b,0);d.lineTo(1*b,0.3*c);d.lineTo(0.8*b,0.5*c);d.lineTo(1*b,0.7*c);d.lineTo(0.7*b,1*c);d.lineTo(0.5*b,0.8*c);d.lineTo(0.3*b,1*c);d.lineTo(0,0.7*c);d.lineTo(0.2*b,0.5*c);d.lineTo(0,0.3*c);M(d);b=d.s;b.G=new I(0.5-a,0.5-a);b.H=new I(0.5+a,0.5+a);t.v(d);return b},ThinCross:function(a,b,c){var d=a?a.Hc:0;0===d&&(d=0.1);a=t.u();J(a,(0.5-d/2)*b,0,!0);a.lineTo((0.5+d/2)*b,0);a.lineTo((0.5+d/
  2)*b,(0.5-d/2)*c);a.lineTo(1*b,(0.5-d/2)*c);a.lineTo(1*b,(0.5+d/2)*c);a.lineTo((0.5+d/2)*b,(0.5+d/2)*c);a.lineTo((0.5+d/2)*b,1*c);a.lineTo((0.5-d/2)*b,1*c);a.lineTo((0.5-d/2)*b,(0.5+d/2)*c);a.lineTo(0,(0.5+d/2)*c);a.lineTo(0,(0.5-d/2)*c);a.lineTo((0.5-d/2)*b,(0.5-d/2)*c);M(a);b=a.s;t.v(a);return b},ThinX:function(a,b,c){a=t.u();J(a,0.1*b,0,!0);a.lineTo(0.5*b,0.4*c);a.lineTo(0.9*b,0);a.lineTo(1*b,0.1*c);a.lineTo(0.6*b,0.5*c);a.lineTo(1*b,0.9*c);a.lineTo(0.9*b,1*c);a.lineTo(0.5*b,0.6*c);a.lineTo(0.1*
  b,1*c);a.lineTo(0,0.9*c);a.lineTo(0.4*b,0.5*c);a.lineTo(0,0.1*c);M(a);return a.s},RightTriangle:function(a,b,c){a=t.u();J(a,0,0,!0);a.lineTo(1*b,1*c);a.lineTo(0,1*c);M(a);b=a.s;b.G=new I(0,0.5);b.H=new I(0.5,1);t.v(a);return b},RoundedIBeam:function(a,b,c){a=t.u();J(a,0,0,!0);a.lineTo(1*b,0);K(a,0.5*b,0.25*c,0.5*b,0.75*c,1*b,1*c);a.lineTo(0,1*c);K(a,0.5*b,0.75*c,0.5*b,0.25*c,0,0);M(a);b=a.s;t.v(a);return b},RoundedRectangle:function(a,b,c){var d=a?a.Hc:0;0>=d&&(d=5);d=Math.min(d,b/3);d=Math.min(d,
  c/3);a=d*H.va;var f=t.u();J(f,d,0,!0);f.lineTo(b-d,0);K(f,b-a,0,b,a,b,d);f.lineTo(b,c-d);K(f,b,c-a,b-a,c,b-d,c);f.lineTo(d,c);K(f,a,c,0,c-a,0,c-d);f.lineTo(0,d);K(f,0,a,a,0,d,0);M(f);b=f.s;1<a?(b.G=new I(0,0,a,a),b.H=new I(1,1,-a,-a)):(b.G=Eb,b.H=Pb);t.v(f);return b},Border:function(a,b,c){var d=a?a.Hc:0;0>=d&&(d=5);d=Math.min(d,b/3);d=Math.min(d,c/3);a=t.u();J(a,d,0,!0);a.lineTo(b-d,0);K(a,b-0,0,b,0,b,d);a.lineTo(b,c-d);K(a,b,c-0,b-0,c,b-d,c);a.lineTo(d,c);K(a,0,c,0,c-0,0,c-d);a.lineTo(0,d);K(a,
  0,0,0,0,d,0);M(a);b=a.s;b.G=Eb;b.H=Pb;t.v(a);return b},SquareIBeam:function(a,b,c){var d=a?a.Hc:0;0===d&&(d=0.2);a=t.u();J(a,0,0,!0);a.lineTo(1*b,0);a.lineTo(1*b,d*c);a.lineTo((0.5+d/2)*b,d*c);a.lineTo((0.5+d/2)*b,(1-d)*c);a.lineTo(1*b,(1-d)*c);a.lineTo(1*b,1*c);a.lineTo(0,1*c);a.lineTo(0,(1-d)*c);a.lineTo((0.5-d/2)*b,(1-d)*c);a.lineTo((0.5-d/2)*b,d*c);a.lineTo(0,d*c);M(a);b=a.s;t.v(a);return b},Trapezoid:function(a,b,c){a=a?a.Hc:0;0===a&&(a=0.2);var d=t.u();J(d,a*b,0,!0);d.lineTo((1-a)*b,0);d.lineTo(1*
  b,1*c);d.lineTo(0,1*c);M(d);b=d.s;b.G=new I(a,0);b.H=new I(1-a,1);t.v(d);return b},ManualLoop:"ManualOperation",ManualOperation:function(a,b,c){var d=a?a.Hc:0;a=t.u();J(a,d,0,!0);a.lineTo(0,0);a.lineTo(1*b,0);a.lineTo(0.9*b,1*c);a.lineTo(0.1*b,1*c);M(a);b=a.s;b.G=new I(0.1,0);b.H=new I(0.9,1);t.v(a);return b},GenderMale:function(a,b,c){a=t.u();var d=H.va,f=0.4*d,g=0.4,h=t.K(),k=t.K(),l=t.K(),m=t.K();J(a,(0.5-g)*b,0.5*c,!0);K(a,(0.5-g)*b,(0.5-f)*c,(0.5-f)*b,(0.5-g)*c,0.5*b,(0.5-g)*c);H.Vi(0.5,0.5-
  g,0.5+f,0.5-g,0.5+g,0.5-f,0.5+g,0.5,0.44,l,m,k,h,h);K(a,l.x*b,l.y*c,m.x*b,m.y*c,k.x*b,k.y*c);var n=t.lc(k.x,k.y);H.Vi(0.5,0.5-g,0.5+f,0.5-g,0.5+g,0.5-f,0.5+g,0.5,0.56,h,h,k,l,m);var p=t.lc(k.x,k.y);a.lineTo((0.1*n.x+0.855)*b,0.1*n.y*c);a.lineTo(0.85*b,0.1*n.y*c);a.lineTo(0.85*b,0);a.lineTo(1*b,0);a.lineTo(1*b,0.15*c);a.lineTo((0.1*p.x+0.9)*b,0.15*c);a.lineTo((0.1*p.x+0.9)*b,(0.1*p.y+0.05*0.9)*c);a.lineTo(p.x*b,p.y*c);K(a,l.x*b,l.y*c,m.x*b,m.y*c,(0.5+g)*b,0.5*c);K(a,(0.5+g)*b,(0.5+f)*c,(0.5+f)*b,(0.5+
  g)*c,0.5*b,(0.5+g)*c);K(a,(0.5-f)*b,(0.5+g)*c,(0.5-g)*b,(0.5+f)*c,(0.5-g)*b,0.5*c);g=0.35;f=0.35*d;J(a,0.5*b,(0.5-g)*c,!0,!0);K(a,(0.5-f)*b,(0.5-g)*c,(0.5-g)*b,(0.5-f)*c,(0.5-g)*b,0.5*c);K(a,(0.5-g)*b,(0.5+f)*c,(0.5-f)*b,(0.5+g)*c,0.5*b,(0.5+g)*c);K(a,(0.5+f)*b,(0.5+g)*c,(0.5+g)*b,(0.5+f)*c,(0.5+g)*b,0.5*c);K(a,(0.5+g)*b,(0.5-f)*c,(0.5+f)*b,(0.5-g)*c,0.5*b,(0.5-g)*c);J(a,(0.5-g)*b,0.5*c,!0);t.B(h);t.B(k);t.B(l);t.B(m);t.B(n);t.B(p);b=a.s;b.G=new I(0.202,0.257);b.H=new I(0.692,0.839);b.vc=Wg;t.v(a);
  return b},GenderFemale:function(a,b,c){a=t.u();var d=0.375,f=0,g=-0.125,h=4*(Math.SQRT2-1)/3*d;J(a,(0.525+f)*b,(0.5+d+g)*c,!0);K(a,(0.5+h+f)*b,(0.5+d+g)*c,(0.5+d+f)*b,(0.5+h+g)*c,(0.5+d+f)*b,(0.5+g)*c);K(a,(0.5+d+f)*b,(0.5-h+g)*c,(0.5+h+f)*b,(0.5-d+g)*c,(0.5+f)*b,(0.5-d+g)*c);K(a,(0.5-h+f)*b,(0.5-d+g)*c,(0.5-d+f)*b,(0.5-h+g)*c,(0.5-d+f)*b,(0.5+g)*c);K(a,(0.5-d+f)*b,(0.5+h+g)*c,(0.5-h+f)*b,(0.5+d+g)*c,(0.475+f)*b,(0.5+d+g)*c);a.lineTo(0.475*b,0.85*c);a.lineTo(0.425*b,0.85*c);a.lineTo(0.425*b,0.9*c);
  a.lineTo(0.475*b,0.9*c);a.lineTo(0.475*b,1*c);a.lineTo(0.525*b,1*c);a.lineTo(0.525*b,0.9*c);a.lineTo(0.575*b,0.9*c);a.lineTo(0.575*b,0.85*c);a.lineTo(0.525*b,0.85*c);M(a);d=0.325;f=0;g=-0.125;h=4*(Math.SQRT2-1)/3*d;J(a,(0.5+d+f)*b,(0.5+g)*c,!0,!0);K(a,(0.5+d+f)*b,(0.5+h+g)*c,(0.5+h+f)*b,(0.5+d+g)*c,(0.5+f)*b,(0.5+d+g)*c);K(a,(0.5-h+f)*b,(0.5+d+g)*c,(0.5-d+f)*b,(0.5+h+g)*c,(0.5-d+f)*b,(0.5+g)*c);K(a,(0.5-d+f)*b,(0.5-h+g)*c,(0.5-h+f)*b,(0.5-d+g)*c,(0.5+f)*b,(0.5-d+g)*c);K(a,(0.5+h+f)*b,(0.5-d+g)*c,
  (0.5+d+f)*b,(0.5-h+g)*c,(0.5+d+f)*b,(0.5+g)*c);J(a,(0.525+f)*b,(0.5+d+g)*c,!0);b=a.s;b.G=new I(0.232,0.136);b.H=new I(0.782,0.611);b.vc=Wg;t.v(a);return b},PlusLine:function(a,b,c){a=t.u();J(a,0,0.5*c,!1);a.lineTo(1*b,0.5*c);a.moveTo(0.5*b,0);a.lineTo(0.5*b,1*c);b=a.s;t.v(a);return b},XLine:function(a,b,c){a=t.u();J(a,0,1*c,!1);a.lineTo(1*b,0);a.moveTo(0,0);a.lineTo(1*b,1*c);b=a.s;t.v(a);return b},AsteriskLine:function(a,b,c){a=t.u();var d=0.2/Math.SQRT2;J(a,d*b,(1-d)*c,!1);a.lineTo((1-d)*b,d*c);
  a.moveTo(d*b,d*c);a.lineTo((1-d)*b,(1-d)*c);a.moveTo(0*b,0.5*c);a.lineTo(1*b,0.5*c);a.moveTo(0.5*b,0*c);a.lineTo(0.5*b,1*c);b=a.s;t.v(a);return b},CircleLine:function(a,b,c){var d=0.5*H.va;a=t.u();J(a,1*b,0.5*c,!1);K(a,1*b,(0.5+d)*c,(0.5+d)*b,1*c,0.5*b,1*c);K(a,(0.5-d)*b,1*c,0,(0.5+d)*c,0,0.5*c);K(a,0,(0.5-d)*c,(0.5-d)*b,0,0.5*b,0);K(a,(0.5+d)*b,0,1*b,(0.5-d)*c,1*b,0.5*c);b=a.s;b.G=new I(0.146,0.146);b.H=new I(0.853,0.853);b.vc=Wg;t.v(a);return b},Pie:function(a,b,c){a=t.u();var d=4*(Math.SQRT2-1)/
  3*0.5;J(a,(0.5*Math.SQRT2/2+0.5)*b,(0.5-0.5*Math.SQRT2/2)*c,!0);K(a,0.7*b,0*c,0.5*b,0*c,0.5*b,0*c);K(a,(0.5-d+0)*b,0*c,0*b,(0.5-d+0)*c,0*b,0.5*c);K(a,0*b,(0.5+d+0)*c,(0.5-d+0)*b,1*c,0.5*b,1*c);K(a,(0.5+d+0)*b,1*c,1*b,(0.5+d+0)*c,1*b,0.5*c);a.lineTo(0.5*b,0.5*c);M(a);b=a.s;t.v(a);return b},PiePiece:function(a,b,c){var d=H.va/Math.SQRT2*0.5,f=Math.SQRT2/2,g=1-Math.SQRT2/2;a=t.u();J(a,b,c,!0);K(a,b,(1-d)*c,(f+d)*b,(g+d)*c,f*b,g*c);a.lineTo(0,c);M(a);b=a.s;t.v(a);return b},StopSign:function(a,b,c){a=
  1/(Math.SQRT2+2);var d=t.u();J(d,a*b,0,!0);d.lineTo((1-a)*b,0);d.lineTo(1*b,a*c);d.lineTo(1*b,(1-a)*c);d.lineTo((1-a)*b,1*c);d.lineTo(a*b,1*c);d.lineTo(0,(1-a)*c);d.lineTo(0,a*c);M(d);b=d.s;b.G=new I(a/2,a/2);b.H=new I(1-a/2,1-a/2);t.v(d);return b},LogicImplies:function(a,b,c){var d=a?a.Hc:0;0===d&&(d=0.2);a=t.u();J(a,(1-d)*b,0*c,!1);a.lineTo(1*b,0.5*c);a.lineTo((1-d)*b,c);a.moveTo(0,0.5*c);a.lineTo(b,0.5*c);b=a.s;b.G=Eb;b.H=new I(0.8,0.5);t.v(a);return b},LogicIff:function(a,b,c){var d=a?a.Hc:0;
  0===d&&(d=0.2);a=t.u();J(a,(1-d)*b,0*c,!1);a.lineTo(1*b,0.5*c);a.lineTo((1-d)*b,c);a.moveTo(0,0.5*c);a.lineTo(b,0.5*c);a.moveTo(d*b,0);a.lineTo(0,0.5*c);a.lineTo(d*b,c);b=a.s;b.G=new I(0.2,0);b.H=new I(0.8,0.5);t.v(a);return b},LogicNot:function(a,b,c){a=t.u();J(a,0,0,!1);a.lineTo(1*b,0);a.lineTo(1*b,1*c);b=a.s;t.v(a);return b},LogicAnd:function(a,b,c){a=t.u();J(a,0,1*c,!1);a.lineTo(0.5*b,0);a.lineTo(1*b,1*c);b=a.s;b.G=new I(0.25,0.5);b.H=new I(0.75,1);t.v(a);return b},LogicOr:function(a,b,c){a=t.u();
  J(a,0,0,!1);a.lineTo(0.5*b,1*c);a.lineTo(1*b,0);b=a.s;b.G=new I(0.219,0);b.H=new I(0.78,0.409);t.v(a);return b},LogicXor:function(a,b,c){a=t.u();J(a,0.5*b,0,!1);a.lineTo(0.5*b,1*c);a.moveTo(0,0.5*c);a.lineTo(1*b,0.5*c);var d=0.5*H.va;K(a,1*b,(0.5+d)*c,(0.5+d)*b,1*c,0.5*b,1*c);K(a,(0.5-d)*b,1*c,0,(0.5+d)*c,0,0.5*c);K(a,0,(0.5-d)*c,(0.5-d)*b,0,0.5*b,0);K(a,(0.5+d)*b,0,1*b,(0.5-d)*c,1*b,0.5*c);b=a.s;b.vc=Wg;t.v(a);return b},LogicTruth:function(a,b,c){a=t.u();J(a,0,0,!1);a.lineTo(1*b,0);a.moveTo(0.5*
  b,0);a.lineTo(0.5*b,1*c);b=a.s;t.v(a);return b},LogicFalsity:function(a,b,c){a=t.u();J(a,0,1*c,!1);a.lineTo(1*b,1*c);a.moveTo(0.5*b,1*c);a.lineTo(0.5*b,0);b=a.s;t.v(a);return b},LogicThereExists:function(a,b,c){a=t.u();J(a,0,0,!1);a.lineTo(1*b,0);a.lineTo(1*b,0.5*c);a.lineTo(0,0.5*c);a.moveTo(1*b,0.5*c);a.lineTo(1*b,1*c);a.lineTo(0,1*c);b=a.s;t.v(a);return b},LogicForAll:function(a,b,c){a=t.u();J(a,0,0,!1);a.lineTo(0.5*b,1*c);a.lineTo(1*b,0);a.moveTo(0.25*b,0.5*c);a.lineTo(0.75*b,0.5*c);b=a.s;b.G=
  new I(0.25,0);b.H=new I(0.75,0.5);t.v(a);return b},LogicIsDefinedAs:function(a,b,c){a=t.u();J(a,0,0,!1);a.lineTo(b,0);a.moveTo(0,0.5*c);a.lineTo(b,0.5*c);a.moveTo(0,c);a.lineTo(b,c);b=a.s;b.G=new I(0.01,0.01);b.H=new I(0.99,0.49);t.v(a);return b},LogicIntersect:function(a,b,c){var d=0.5*H.va;a=t.u();J(a,0,1*c,!1);a.lineTo(0,0.5*c);K(a,0,(0.5-d)*c,(0.5-d)*b,0,0.5*b,0);K(a,(0.5+d)*b,0,1*b,(0.5-d)*c,1*b,0.5*c);a.lineTo(1*b,1*c);b=a.s;b.G=new I(0,0.5);b.H=Pb;t.v(a);return b},LogicUnion:function(a,b,c){var d=
  0.5*H.va;a=t.u();J(a,1*b,0,!1);a.lineTo(1*b,0.5*c);K(a,1*b,(0.5+d)*c,(0.5+d)*b,1*c,0.5*b,1*c);K(a,(0.5-d)*b,1*c,0,(0.5+d)*c,0,0.5*c);a.lineTo(0,0);b=a.s;b.G=Eb;b.H=new I(1,0.5);t.v(a);return b},Arrow:function(a,b,c){var d=a?a.Hc:0,f=a?a.Et:0;0===d&&(d=0.3);0===f&&(f=0.3);a=t.u();J(a,0,(0.5-f/2)*c,!0);a.lineTo((1-d)*b,(0.5-f/2)*c);a.lineTo((1-d)*b,0);a.lineTo(1*b,0.5*c);a.lineTo((1-d)*b,1*c);a.lineTo((1-d)*b,(0.5+f/2)*c);a.lineTo(0,(0.5+f/2)*c);M(a);b=a.s;b.G=new I(0,0.5-f/2);d=H.il(0,0.5+f/2,1,0.5+
  f/2,1-d,1,1,0.5,t.K());b.H=new I(d.x,d.y);t.B(d);t.v(a);return b},ISOProcess:"Chevron",Chevron:function(a,b,c){a=t.u();J(a,0,0,!0);a.lineTo(0.5*b,0);a.lineTo(1*b,0.5*c);a.lineTo(0.5*b,1*c);a.lineTo(0,1*c);a.lineTo(0.5*b,0.5*c);M(a);b=a.s;t.v(a);return b},DoubleArrow:function(a,b,c){a=t.u();J(a,0,0,!0);a.lineTo(0.3*b,0.214*c);a.lineTo(0.3*b,0);a.lineTo(1*b,0.5*c);a.lineTo(0.3*b,1*c);a.lineTo(0.3*b,0.786*c);a.lineTo(0,1*c);M(a);J(a,0.3*b,0.214*c,!1);a.lineTo(0.3*b,0.786*c);a.bb(!1);b=a.s;t.v(a);return b},
  DoubleEndArrow:function(a,b,c){a=t.u();J(a,1*b,0.5*c,!0);a.lineTo(0.7*b,1*c);a.lineTo(0.7*b,0.7*c);a.lineTo(0.3*b,0.7*c);a.lineTo(0.3*b,1*c);a.lineTo(0,0.5*c);a.lineTo(0.3*b,0);a.lineTo(0.3*b,0.3*c);a.lineTo(0.7*b,0.3*c);a.lineTo(0.7*b,0);M(a);b=a.s;c=H.il(0,0.5,0.3,0,0,0.3,0.3,0.3,t.K());b.G=new I(c.x,c.y);c=H.il(0.7,1,1,0.5,0.7,0.7,1,0.7,c);b.H=new I(c.x,c.y);t.B(c);t.v(a);return b},IBeamArrow:function(a,b,c){a=t.u();J(a,1*b,0.5*c,!0);a.lineTo(0.7*b,1*c);a.lineTo(0.7*b,0.7*c);a.lineTo(0.2*b,0.7*
  c);a.lineTo(0.2*b,1*c);a.lineTo(0,1*c);a.lineTo(0,0);a.lineTo(0.2*b,0);a.lineTo(0.2*b,0.3*c);a.lineTo(0.7*b,0.3*c);a.lineTo(0.7*b,0);M(a);b=a.s;b.G=new I(0,0.3);c=H.il(0.7,1,1,0.5,0.7,0.7,1,0.7,t.K());b.H=new I(c.x,c.y);t.B(c);t.v(a);return b},Pointer:function(a,b,c){a=t.u();J(a,1*b,0.5*c,!0);a.lineTo(0,1*c);a.lineTo(0.2*b,0.5*c);a.lineTo(0,0);M(a);b=a.s;b.G=new I(0.2,0.35);c=H.il(0.2,0.65,1,0.65,0,1,1,0.5,t.K());b.H=new I(c.x,c.y);t.B(c);t.v(a);return b},RoundedPointer:function(a,b,c){a=t.u();J(a,
  1*b,0.5*c,!0);a.lineTo(0,1*c);K(a,0.5*b,0.75*c,0.5*b,0.25*c,0,0);M(a);b=a.s;b.G=new I(0.4,0.35);c=H.il(0.2,0.65,1,0.65,0,1,1,0.5,t.K());b.H=new I(c.x,c.y);t.B(c);t.v(a);return b},SplitEndArrow:function(a,b,c){a=t.u();J(a,1*b,0.5*c,!0);a.lineTo(0.7*b,1*c);a.lineTo(0.7*b,0.7*c);a.lineTo(0,0.7*c);a.lineTo(0.2*b,0.5*c);a.lineTo(0,0.3*c);a.lineTo(0.7*b,0.3*c);a.lineTo(0.7*b,0);M(a);b=a.s;b.G=new I(0.2,0.3);c=H.il(0.7,1,1,0.5,0.7,0.7,1,0.7,t.K());b.H=new I(c.x,c.y);t.B(c);t.v(a);return b},MessageToUser:"SquareArrow",
  SquareArrow:function(a,b,c){a=t.u();J(a,1*b,0.5*c,!0);a.lineTo(0.7*b,1*c);a.lineTo(0,1*c);a.lineTo(0,0);a.lineTo(0.7*b,0);M(a);b=a.s;b.G=Eb;b.H=new I(0.7,1);t.v(a);return b},Cone1:function(a,b,c){var d=H.va;a=0.5*d;var f=0.1*d,d=t.u();J(d,0,0.9*c,!0);d.lineTo(0.5*b,0);d.lineTo(1*b,0.9*c);K(d,1*b,(0.9+f)*c,(0.5+a)*b,1*c,0.5*b,1*c);K(d,(0.5-a)*b,1*c,0,(0.9+f)*c,0,0.9*c);M(d);b=d.s;b.G=new I(0.25,0.5);b.H=new I(0.75,0.97);t.v(d);return b},Cone2:function(a,b,c){a=t.u();J(a,0,0.9*c,!0);K(a,(1-0.85/0.9)*
  b,1*c,0.85/0.9*b,1*c,1*b,0.9*c);a.lineTo(0.5*b,0);a.lineTo(0,0.9*c);M(a);J(a,0,0.9*c,!1);K(a,(1-0.85/0.9)*b,0.8*c,0.85/0.9*b,0.8*c,1*b,0.9*c);a.bb(!1);b=a.s;b.G=new I(0.25,0.5);b.H=new I(0.75,0.82);t.v(a);return b},Cube1:function(a,b,c){a=t.u();J(a,0.5*b,1*c,!0);a.lineTo(1*b,0.85*c);a.lineTo(1*b,0.15*c);a.lineTo(0.5*b,0*c);a.lineTo(0*b,0.15*c);a.lineTo(0*b,0.85*c);M(a);J(a,0.5*b,1*c,!1);a.lineTo(0.5*b,0.3*c);a.lineTo(0,0.15*c);a.moveTo(0.5*b,0.3*c);a.lineTo(1*b,0.15*c);a.bb(!1);b=a.s;b.G=new I(0,
  0.3);b.H=new I(0.5,0.85);t.v(a);return b},Cube2:function(a,b,c){a=t.u();J(a,0,0.3*c,!0);a.lineTo(0*b,1*c);a.lineTo(0.7*b,c);a.lineTo(1*b,0.7*c);a.lineTo(1*b,0*c);a.lineTo(0.3*b,0*c);M(a);J(a,0,0.3*c,!1);a.lineTo(0.7*b,0.3*c);a.lineTo(1*b,0*c);a.moveTo(0.7*b,0.3*c);a.lineTo(0.7*b,1*c);a.bb(!1);b=a.s;b.G=new I(0,0.3);b.H=new I(0.7,1);t.v(a);return b},MagneticData:"Cylinder1",Cylinder1:function(a,b,c){var d=H.va;a=0.5*d;var f=0.1*d,d=t.u();J(d,0,0.1*c,!0);K(d,0,(0.1-f)*c,(0.5-a)*b,0,0.5*b,0);K(d,(0.5+
  a)*b,0,1*b,(0.1-f)*c,1*b,0.1*c);d.lineTo(b,0.9*c);K(d,1*b,(0.9+f)*c,(0.5+a)*b,1*c,0.5*b,1*c);K(d,(0.5-a)*b,1*c,0,(0.9+f)*c,0,0.9*c);d.lineTo(0,0.1*c);J(d,0,0.1*c,!1);K(d,0,(0.1+f)*c,(0.5-a)*b,0.2*c,0.5*b,0.2*c);K(d,(0.5+a)*b,0.2*c,1*b,(0.1+f)*c,1*b,0.1*c);d.bb(!1);b=d.s;b.G=new I(0,0.2);b.H=new I(1,0.9);t.v(d);return b},Cylinder2:function(a,b,c){var d=H.va;a=0.5*d;var f=0.1*d,d=t.u();J(d,0,0.9*c,!0);d.lineTo(0,0.1*c);K(d,0,(0.1-f)*c,(0.5-a)*b,0,0.5*b,0);K(d,(0.5+a)*b,0,1*b,(0.1-f)*c,1*b,0.1*c);d.lineTo(1*
  b,0.9*c);K(d,1*b,(0.9+f)*c,(0.5+a)*b,1*c,0.5*b,1*c);K(d,(0.5-a)*b,1*c,0,(0.9+f)*c,0,0.9*c);J(d,0,0.9*c,!1);K(d,0,(0.9-f)*c,(0.5-a)*b,0.8*c,0.5*b,0.8*c);K(d,(0.5+a)*b,0.8*c,1*b,(0.9-f)*c,1*b,0.9*c);d.bb(!1);b=d.s;b.G=new I(0,0.1);b.H=new I(1,0.8);t.v(d);return b},Cylinder3:function(a,b,c){var d=H.va;a=0.1*d;var f=0.5*d,d=t.u();J(d,0.1*b,0,!0);d.lineTo(0.9*b,0);K(d,(0.9+a)*b,0,1*b,(0.5-f)*c,1*b,0.5*c);K(d,1*b,(0.5+f)*c,(0.9+a)*b,1*c,0.9*b,1*c);d.lineTo(0.1*b,1*c);K(d,(0.1-a)*b,1*c,0,(0.5+f)*c,0,0.5*
  c);K(d,0,(0.5-f)*c,(0.1-a)*b,0,0.1*b,0);J(d,0.1*b,0,!1);K(d,(0.1+a)*b,0,0.2*b,(0.5-f)*c,0.2*b,0.5*c);K(d,0.2*b,(0.5+f)*c,(0.1+a)*b,1*c,0.1*b,1*c);d.bb(!1);b=d.s;b.G=new I(0.2,0);b.H=new I(0.9,1);t.v(d);return b},DirectData:"Cylinder4",Cylinder4:function(a,b,c){var d=H.va;a=0.1*d;var f=0.5*d,d=t.u();J(d,0.9*b,0,!0);K(d,(0.9+a)*b,0,1*b,(0.5-f)*c,1*b,0.5*c);K(d,1*b,(0.5+f)*c,(0.9+a)*b,1*c,0.9*b,1*c);d.lineTo(0.1*b,1*c);K(d,(0.1-a)*b,1*c,0,(0.5+f)*c,0,0.5*c);K(d,0,(0.5-f)*c,(0.1-a)*b,0,0.1*b,0);d.lineTo(0.9*
  b,0);J(d,0.9*b,0,!1);K(d,(0.9-a)*b,0,0.8*b,(0.5-f)*c,0.8*b,0.5*c);K(d,0.8*b,(0.5+f)*c,(0.9-a)*b,1*c,0.9*b,1*c);d.bb(!1);b=d.s;b.G=new I(0.1,0);b.H=new I(0.8,1);t.v(d);return b},Prism1:function(a,b,c){a=t.u();J(a,0.25*b,0.25*c,!0);a.lineTo(0.75*b,0);a.lineTo(b,0.5*c);a.lineTo(0.5*b,c);a.lineTo(0,c);M(a);J(a,0.25*b,0.25*c,!1);a.lineTo(0.5*b,c);a.bb(!1);b=a.s;b.G=new I(0.408,0.172);b.H=new I(0.833,0.662);t.v(a);return b},Prism2:function(a,b,c){a=t.u();J(a,0,0.25*c,!0);a.lineTo(0.75*b,0);a.lineTo(1*b,
  0.25*c);a.lineTo(0.75*b,0.75*c);a.lineTo(0,1*c);M(a);J(a,0,c,!1);a.lineTo(0.25*b,0.5*c);a.lineTo(b,0.25*c);a.moveTo(0,0.25*c);a.lineTo(0.25*b,0.5*c);a.bb(!1);b=a.s;b.G=new I(0.25,0.5);b.H=new I(0.75,0.75);t.v(a);return b},Pyramid1:function(a,b,c){a=t.u();J(a,0.5*b,0,!0);a.lineTo(b,0.75*c);a.lineTo(0.5*b,1*c);a.lineTo(0,0.75*c);M(a);J(a,0.5*b,0,!1);a.lineTo(0.5*b,1*c);a.bb(!1);b=a.s;b.G=new I(0.25,0.367);b.H=new I(0.75,0.875);t.v(a);return b},Pyramid2:function(a,b,c){a=t.u();J(a,0.5*b,0,!0);a.lineTo(b,
  0.85*c);a.lineTo(0.5*b,1*c);a.lineTo(0,0.85*c);M(a);J(a,0.5*b,0,!1);a.lineTo(0.5*b,0.7*c);a.lineTo(0,0.85*c);a.moveTo(0.5*b,0.7*c);a.lineTo(1*b,0.85*c);a.bb(!1);b=a.s;b.G=new I(0.25,0.367);b.H=new I(0.75,0.875);t.v(a);return b},Actor:function(a,b,c){var d=H.va,f=0.2*d,g=0.1*d,h=0.5,k=0.1;a=t.u();J(a,h*b,(k+0.1)*c,!0);K(a,(h-f)*b,(k+0.1)*c,(h-0.2)*b,(k+g)*c,(h-0.2)*b,k*c);K(a,(h-0.2)*b,(k-g)*c,(h-f)*b,(k-0.1)*c,h*b,(k-0.1)*c);K(a,(h+f)*b,(k-0.1)*c,(h+0.2)*b,(k-g)*c,(h+0.2)*b,k*c);K(a,(h+0.2)*b,(k+
  g)*c,(h+f)*b,(k+0.1)*c,h*b,(k+0.1)*c);f=0.05;g=d*f;J(a,0.5*b,0.2*c,!0);a.lineTo(0.95*b,0.2*c);h=0.95;k=0.25;K(a,(h+g)*b,(k-f)*c,(h+f)*b,(k-g)*c,(h+f)*b,k*c);a.lineTo(1*b,0.6*c);a.lineTo(0.85*b,0.6*c);a.lineTo(0.85*b,0.35*c);f=0.025;g=d*f;h=0.825;k=0.35;K(a,(h+f)*b,(k-g)*c,(h+g)*b,(k-f)*c,h*b,(k-f)*c);K(a,(h-g)*b,(k-f)*c,(h-f)*b,(k-g)*c,(h-f)*b,k*c);a.lineTo(0.8*b,1*c);a.lineTo(0.55*b,1*c);a.lineTo(0.55*b,0.7*c);f=0.05;g=d*f;h=0.5;k=0.7;K(a,(h+f)*b,(k-g)*c,(h+g)*b,(k-f)*c,h*b,(k-f)*c);K(a,(h-g)*b,
  (k-f)*c,(h-f)*b,(k-g)*c,(h-f)*b,k*c);a.lineTo(0.45*b,1*c);a.lineTo(0.2*b,1*c);a.lineTo(0.2*b,0.35*c);f=0.025;g=d*f;h=0.175;k=0.35;K(a,(h+f)*b,(k-g)*c,(h+g)*b,(k-f)*c,h*b,(k-f)*c);K(a,(h-g)*b,(k-f)*c,(h-f)*b,(k-g)*c,(h-f)*b,k*c);a.lineTo(0.15*b,0.6*c);a.lineTo(0*b,0.6*c);a.lineTo(0*b,0.25*c);f=0.05;g=d*f;h=0.05;k=0.25;K(a,(h-f)*b,(k-g)*c,(h-g)*b,(k-f)*c,h*b,(k-f)*c);a.lineTo(0.5*b,0.2*c);b=a.s;b.G=new I(0.2,0.2);b.H=new I(0.8,0.65);t.v(a);return b},Card:function(a,b,c){a=t.u();J(a,1*b,0*c,!0);a.lineTo(1*
  b,1*c);a.lineTo(0*b,1*c);a.lineTo(0*b,0.2*c);a.lineTo(0.2*b,0*c);M(a);b=a.s;b.G=new I(0,0.2);b.H=Pb;t.v(a);return b},Collate:function(a,b,c){a=t.u();J(a,0.5*b,0.5*c,!0);a.lineTo(0,0);a.lineTo(1*b,0);a.lineTo(0.5*b,0.5*c);J(a,0.5*b,0.5*c,!0);a.lineTo(1*b,1*c);a.lineTo(0,1*c);a.lineTo(0.5*b,0.5*c);b=a.s;b.G=new I(0.25,0);b.H=new I(0.75,0.25);t.v(a);return b},CreateRequest:function(a,b,c){a=a?a.Hc:0;0===a&&(a=0.1);var d=t.u();J(d,0,0,!0);d.lineTo(1*b,0);d.lineTo(1*b,1*c);d.lineTo(0,1*c);M(d);J(d,0,a*
  c,!1);d.lineTo(1*b,a*c);d.moveTo(0,(1-a)*c);d.lineTo(1*b,(1-a)*c);d.bb(!1);b=d.s;b.G=new I(0,a);b.H=new I(1,1-a);t.v(d);return b},Database:function(a,b,c){a=t.u();var d=H.va,f=0.5*d,d=0.1*d;J(a,1*b,0.1*c,!0);a.lineTo(1*b,0.9*c);K(a,1*b,(0.9+d)*c,(0.5+f)*b,1*c,0.5*b,1*c);K(a,(0.5-f)*b,1*c,0,(0.9+d)*c,0,0.9*c);a.lineTo(0,0.1*c);K(a,0,(0.1-d)*c,(0.5-f)*b,0,0.5*b,0);K(a,(0.5+f)*b,0,1*b,(0.1-d)*c,1*b,0.1*c);J(a,1*b,0.1*c,!1);K(a,1*b,(0.1+d)*c,(0.5+f)*b,0.2*c,0.5*b,0.2*c);K(a,(0.5-f)*b,0.2*c,0,(0.1+d)*
  c,0,0.1*c);a.moveTo(1*b,0.2*c);K(a,1*b,(0.2+d)*c,(0.5+f)*b,0.3*c,0.5*b,0.3*c);K(a,(0.5-f)*b,0.3*c,0,(0.2+d)*c,0,0.2*c);a.moveTo(1*b,0.3*c);K(a,1*b,(0.3+d)*c,(0.5+f)*b,0.4*c,0.5*b,0.4*c);K(a,(0.5-f)*b,0.4*c,0,(0.3+d)*c,0,0.3*c);a.bb(!1);b=a.s;b.G=new I(0,0.4);b.H=new I(1,0.9);t.v(a);return b},StoredData:"DataStorage",DataStorage:function(a,b,c){a=t.u();J(a,0,0,!0);a.lineTo(0.75*b,0);K(a,1*b,0,1*b,1*c,0.75*b,1*c);a.lineTo(0,1*c);K(a,0.25*b,0.9*c,0.25*b,0.1*c,0,0);M(a);b=a.s;b.G=new I(0.226,0);b.H=new I(0.81,
  1);t.v(a);return b},DiskStorage:function(a,b,c){a=t.u();var d=H.va,f=0.5*d,d=0.1*d;J(a,1*b,0.1*c,!0);a.lineTo(1*b,0.9*c);K(a,1*b,(0.9+d)*c,(0.5+f)*b,1*c,0.5*b,1*c);K(a,(0.5-f)*b,1*c,0,(0.9+d)*c,0,0.9*c);a.lineTo(0,0.1*c);K(a,0,(0.1-d)*c,(0.5-f)*b,0,0.5*b,0);K(a,(0.5+f)*b,0,1*b,(0.1-d)*c,1*b,0.1*c);J(a,1*b,0.1*c,!1);K(a,1*b,(0.1+d)*c,(0.5+f)*b,0.2*c,0.5*b,0.2*c);K(a,(0.5-f)*b,0.2*c,0,(0.1+d)*c,0,0.1*c);a.moveTo(1*b,0.2*c);K(a,1*b,(0.2+d)*c,(0.5+f)*b,0.3*c,0.5*b,0.3*c);K(a,(0.5-f)*b,0.3*c,0,(0.2+d)*
  c,0,0.2*c);a.bb(!1);b=a.s;b.G=new I(0,0.3);b.H=new I(1,0.9);t.v(a);return b},Display:function(a,b,c){a=t.u();J(a,0.25*b,0,!0);a.lineTo(0.75*b,0);K(a,1*b,0,1*b,1*c,0.75*b,1*c);a.lineTo(0.25*b,1*c);a.lineTo(0,0.5*c);M(a);b=a.s;b.G=new I(0.25,0);b.H=new I(0.75,1);t.v(a);return b},DividedEvent:function(a,b,c){a=a?a.Hc:0;0===a?a=0.2:0.15>a&&(a=0.15);var d=t.u(),f=0.2*H.va;J(d,0,0.2*c,!0);K(d,0,(0.2-f)*c,(0.2-f)*b,0,0.2*b,0);d.lineTo(0.8*b,0);K(d,(0.8+f)*b,0,1*b,(0.2-f)*c,1*b,0.2*c);d.lineTo(1*b,0.8*c);
  K(d,1*b,(0.8+f)*c,(0.8+f)*b,1*c,0.8*b,1*c);d.lineTo(0.2*b,1*c);K(d,(0.2-f)*b,1*c,0,(0.8+f)*c,0,0.8*c);d.lineTo(0,0.2*c);J(d,0,a*c,!1);d.lineTo(1*b,a*c);d.bb(!1);b=d.s;b.G=new I(0,a);b.H=new I(1,1-a);t.v(d);return b},DividedProcess:function(a,b,c){a=a?a.Hc:0;0.1>a&&(a=0.1);var d=t.u();J(d,0,0,!0);d.lineTo(1*b,0);d.lineTo(1*b,1*c);d.lineTo(0,1*c);M(d);J(d,0,a*c,!1);d.lineTo(1*b,a*c);d.bb(!1);b=d.s;b.G=new I(0,a);b.H=Pb;t.v(d);return b},Document:function(a,b,c){c/=0.8;a=t.u();J(a,0,0.7*c,!0);a.lineTo(0,
  0);a.lineTo(1*b,0);a.lineTo(1*b,0.7*c);K(a,0.5*b,0.4*c,0.5*b,1*c,0,0.7*c);M(a);b=a.s;b.G=Eb;b.H=new I(1,0.6);t.v(a);return b},ExternalOrganization:function(a,b,c){a=a?a.Hc:0;0.2>a&&(a=0.2);var d=t.u();J(d,0,0,!0);d.lineTo(1*b,0);d.lineTo(1*b,1*c);d.lineTo(0,1*c);M(d);J(d,a*b,0,!1);d.lineTo(0,a*c);d.moveTo(1*b,a*c);d.lineTo((1-a)*b,0);d.moveTo(0,(1-a)*c);d.lineTo(a*b,1*c);d.moveTo((1-a)*b,1*c);d.lineTo(1*b,(1-a)*c);d.bb(!1);b=d.s;b.G=new I(a/2,a/2);b.H=new I(1-a/2,1-a/2);t.v(d);return b},ExternalProcess:function(a,
  b,c){a=t.u();J(a,0.5*b,0,!0);a.lineTo(1*b,0.5*c);a.lineTo(0.5*b,1*c);a.lineTo(0,0.5*c);M(a);J(a,0.1*b,0.4*c,!1);a.lineTo(0.1*b,0.6*c);a.moveTo(0.9*b,0.6*c);a.lineTo(0.9*b,0.4*c);a.moveTo(0.6*b,0.1*c);a.lineTo(0.4*b,0.1*c);a.moveTo(0.4*b,0.9*c);a.lineTo(0.6*b,0.9*c);a.bb(!1);b=a.s;b.G=new I(0.25,0.25);b.H=new I(0.75,0.75);t.v(a);return b},File:function(a,b,c){a=t.u();J(a,0,0,!0);a.lineTo(0.75*b,0);a.lineTo(1*b,0.25*c);a.lineTo(1*b,1*c);a.lineTo(0,1*c);M(a);J(a,0.75*b,0,!1);a.lineTo(0.75*b,0.25*c);
  a.lineTo(1*b,0.25*c);a.bb(!1);b=a.s;b.G=new I(0,0.25);b.H=Pb;t.v(a);return b},Interrupt:function(a,b,c){a=t.u();J(a,1*b,0.5*c,!0);a.lineTo(0,1*c);a.lineTo(0,0);a.lineTo(1*b,0.5*c);J(a,1*b,0.5*c,!1);a.lineTo(1*b,1*c);J(a,1*b,0.5*c,!1);a.lineTo(1*b,0);b=a.s;b.G=new I(0,0.25);b.H=new I(0.5,0.75);t.v(a);return b},InternalStorage:function(a,b,c){var d=a?a.Hc:0;a=a?a.Et:0;0===d&&(d=0.1);0===a&&(a=0.1);var f=t.u();J(f,0,0,!0);f.lineTo(1*b,0);f.lineTo(1*b,1*c);f.lineTo(0,1*c);M(f);J(f,d*b,0,!1);f.lineTo(d*
  b,1*c);f.moveTo(0,a*c);f.lineTo(1*b,a*c);f.bb(!1);b=f.s;b.G=new I(d,a);b.H=Pb;t.v(f);return b},Junction:function(a,b,c){a=t.u();var d=1/Math.SQRT2,f=(1-1/Math.SQRT2)/2,g=0.5*H.va;J(a,1*b,0.5*c,!0);K(a,1*b,(0.5+g)*c,(0.5+g)*b,1*c,0.5*b,1*c);K(a,(0.5-g)*b,1*c,0,(0.5+g)*c,0,0.5*c);K(a,0,(0.5-g)*c,(0.5-g)*b,0,0.5*b,0);K(a,(0.5+g)*b,0,1*b,(0.5-g)*c,1*b,0.5*c);J(a,(f+d)*b,(f+d)*c,!1);a.lineTo(f*b,f*c);a.moveTo(f*b,(f+d)*c);a.lineTo((f+d)*b,f*c);a.bb(!1);b=a.s;b.vc=Wg;t.v(a);return b},LinedDocument:function(a,
  b,c){c/=0.8;a=t.u();J(a,0,0.7*c,!0);a.lineTo(0,0);a.lineTo(1*b,0);a.lineTo(1*b,0.7*c);K(a,0.5*b,0.4*c,0.5*b,1*c,0,0.7*c);M(a);J(a,0.1*b,0,!1);a.lineTo(0.1*b,0.75*c);a.bb(!1);b=a.s;b.G=new I(0.1,0);b.H=new I(1,0.6);t.v(a);return b},LoopLimit:function(a,b,c){a=t.u();J(a,0,1*c,!0);a.lineTo(0,0.25*c);a.lineTo(0.25*b,0);a.lineTo(0.75*b,0);a.lineTo(1*b,0.25*c);a.lineTo(1*b,1*c);M(a);b=a.s;b.G=new I(0,0.25);b.H=Pb;t.v(a);return b},SequentialData:"MagneticTape",MagneticTape:function(a,b,c){a=t.u();var d=
  0.5*H.va;J(a,0.5*b,1*c,!0);K(a,(0.5-d)*b,1*c,0,(0.5+d)*c,0,0.5*c);K(a,0,(0.5-d)*c,(0.5-d)*b,0,0.5*b,0);K(a,(0.5+d)*b,0,1*b,(0.5-d)*c,1*b,0.5*c);K(a,1*b,(0.5+d)*c,(0.5+d)*b,0.9*c,0.6*b,0.9*c);a.lineTo(1*b,0.9*c);a.lineTo(1*b,1*c);a.lineTo(0.5*b,1*c);b=a.s;b.G=new I(0.15,0.15);b.H=new I(0.85,0.8);t.v(a);return b},ManualInput:function(a,b,c){a=t.u();J(a,1*b,0,!0);a.lineTo(1*b,1*c);a.lineTo(0,1*c);a.lineTo(0,0.25*c);M(a);b=a.s;b.G=new I(0,0.25);b.H=Pb;t.v(a);return b},MessageFromUser:function(a,b,c){a=
  a?a.Hc:0;0===a&&(a=0.7);var d=t.u();J(d,0,0,!0);d.lineTo(1*b,0);d.lineTo(a*b,0.5*c);d.lineTo(1*b,1*c);d.lineTo(0,1*c);M(d);b=d.s;b.G=Eb;b.H=new I(a,1);t.v(d);return b},MicroformProcessing:function(a,b,c){a=a?a.Hc:0;0===a&&(a=0.25);var d=t.u();J(d,0,0,!0);d.lineTo(0.5*b,a*c);d.lineTo(1*b,0);d.lineTo(1*b,1*c);d.lineTo(0.5*b,(1-a)*c);d.lineTo(0,1*c);M(d);b=d.s;b.G=new I(0,a);b.H=new I(1,1-a);t.v(d);return b},MicroformRecording:function(a,b,c){a=t.u();J(a,0,0,!0);a.lineTo(0.75*b,0.25*c);a.lineTo(1*b,
  0.15*c);a.lineTo(1*b,0.85*c);a.lineTo(0.75*b,0.75*c);a.lineTo(0,1*c);M(a);b=a.s;b.G=new I(0,0.25);b.H=new I(1,0.75);t.v(a);return b},MultiDocument:function(a,b,c){c/=0.8;a=t.u();J(a,b,0,!0);a.lineTo(b,0.5*c);K(a,0.96*b,0.47*c,0.93*b,0.45*c,0.9*b,0.44*c);a.lineTo(0.9*b,0.6*c);K(a,0.86*b,0.57*c,0.83*b,0.55*c,0.8*b,0.54*c);a.lineTo(0.8*b,0.7*c);K(a,0.4*b,0.4*c,0.4*b,1*c,0,0.7*c);a.lineTo(0,0.2*c);a.lineTo(0.1*b,0.2*c);a.lineTo(0.1*b,0.1*c);a.lineTo(0.2*b,0.1*c);a.lineTo(0.2*b,0);M(a);J(a,0.1*b,0.2*c,
  !1);a.lineTo(0.8*b,0.2*c);a.lineTo(0.8*b,0.54*c);a.moveTo(0.2*b,0.1*c);a.lineTo(0.9*b,0.1*c);a.lineTo(0.9*b,0.44*c);a.bb(!1);b=a.s;b.G=new I(0,0.25);b.H=new I(0.8,0.77);t.v(a);return b},MultiProcess:function(a,b,c){a=t.u();J(a,0.1*b,0.1*c,!0);a.lineTo(0.2*b,0.1*c);a.lineTo(0.2*b,0);a.lineTo(1*b,0);a.lineTo(1*b,0.8*c);a.lineTo(0.9*b,0.8*c);a.lineTo(0.9*b,0.9*c);a.lineTo(0.8*b,0.9*c);a.lineTo(0.8*b,1*c);a.lineTo(0,1*c);a.lineTo(0,0.2*c);a.lineTo(0.1*b,0.2*c);M(a);J(a,0.2*b,0.1*c,!1);a.lineTo(0.9*b,
  0.1*c);a.lineTo(0.9*b,0.8*c);a.moveTo(0.1*b,0.2*c);a.lineTo(0.8*b,0.2*c);a.lineTo(0.8*b,0.9*c);a.bb(!1);b=a.s;b.G=new I(0,0.2);b.H=new I(0.8,1);t.v(a);return b},OfflineStorage:function(a,b,c){a=a?a.Hc:0;0===a&&(a=0.1);var d=1-a,f=t.u();J(f,0,0,!0);f.lineTo(1*b,0);f.lineTo(0.5*b,1*c);M(f);J(f,0.5*a*b,a*c,!1);f.lineTo((1-0.5*a)*b,a*c);f.bb(!1);b=f.s;b.G=new I(d/4+0.5*a,a);b.H=new I(3*d/4+0.5*a,a+0.5*d);t.v(f);return b},OffPageConnector:function(a,b,c){a=t.u();J(a,0,0,!0);a.lineTo(0.75*b,0);a.lineTo(1*
  b,0.5*c);a.lineTo(0.75*b,1*c);a.lineTo(0,1*c);M(a);b=a.s;b.G=Eb;b.H=new I(0.75,1);t.v(a);return b},Or:function(a,b,c){a=t.u();var d=0.5*H.va;J(a,1*b,0.5*c,!0);K(a,1*b,(0.5+d)*c,(0.5+d)*b,1*c,0.5*b,1*c);K(a,(0.5-d)*b,1*c,0,(0.5+d)*c,0,0.5*c);K(a,0,(0.5-d)*c,(0.5-d)*b,0,0.5*b,0);K(a,(0.5+d)*b,0,1*b,(0.5-d)*c,1*b,0.5*c);J(a,1*b,0.5*c,!1);a.lineTo(0,0.5*c);a.moveTo(0.5*b,1*c);a.lineTo(0.5*b,0);a.bb(!1);b=a.s;b.vc=Wg;t.v(a);return b},PaperTape:function(a,b,c){c/=0.8;a=t.u();J(a,0,0.7*c,!0);a.lineTo(0,
  0.3*c);K(a,0.5*b,0.6*c,0.5*b,0,1*b,0.3);a.lineTo(1*b,0.7*c);K(a,0.5*b,0.4*c,0.5*b,1*c,0,0.7*c);M(a);b=a.s;b.G=new I(0,0.49);b.H=new I(1,0.75);t.v(a);return b},PrimitiveFromCall:function(a,b,c){var d=a?a.Hc:0;a=a?a.Et:0;0===d&&(d=0.1);0===a&&(a=0.3);var f=t.u();J(f,0,0,!0);f.lineTo(1*b,0);f.lineTo((1-a)*b,0.5*c);f.lineTo(1*b,1*c);f.lineTo(0,1*c);M(f);b=f.s;b.G=new I(d,0);b.H=new I(1-a,1);t.v(f);return b},PrimitiveToCall:function(a,b,c){var d=a?a.Hc:0;a=a?a.Et:0;0===d&&(d=0.1);0===a&&(a=0.3);var f=
  t.u();J(f,0,0,!0);f.lineTo((1-a)*b,0);f.lineTo(1*b,0.5*c);f.lineTo((1-a)*b,1*c);f.lineTo(0,1*c);M(f);b=f.s;b.G=new I(d,0);b.H=new I(1-a,1);t.v(f);return b},Subroutine:"Procedure",Procedure:function(a,b,c){a=a?a.Hc:0;0===a&&(a=0.1);var d=t.u();J(d,0,0,!0);d.lineTo(1*b,0);d.lineTo(1*b,1*c);d.lineTo(0,1*c);M(d);J(d,(1-a)*b,0,!1);d.lineTo((1-a)*b,1*c);d.moveTo(a*b,0);d.lineTo(a*b,1*c);d.bb(!1);b=d.s;b.G=new I(a,0);b.H=new I(1-a,1);t.v(d);return b},Process:function(a,b,c){a=a?a.Hc:0;0===a&&(a=0.1);var d=
  t.u();J(d,0,0,!0);d.lineTo(1*b,0);d.lineTo(1*b,1*c);d.lineTo(0,1*c);M(d);J(d,a*b,0,!1);d.lineTo(a*b,1*c);d.bb(!1);b=d.s;b.G=new I(a,0);b.H=Pb;t.v(d);return b},Sort:function(a,b,c){a=t.u();J(a,0.5*b,0,!0);a.lineTo(1*b,0.5*c);a.lineTo(0.5*b,1*c);a.lineTo(0,0.5*c);M(a);J(a,0,0.5*c,!1);a.lineTo(1*b,0.5*c);a.bb(!1);b=a.s;b.G=new I(0.25,0.25);b.H=new I(0.75,0.5);t.v(a);return b},Start:function(a,b,c){a=t.u();J(a,0.25*b,0,!0);J(a,0.25*b,0,!0);a.arcTo(270,180,0.75*b,0.5*c,0.25*b,0.5*c);a.arcTo(90,180,0.25*
  b,0.5*c,0.25*b,0.5*c);J(a,0.25*b,0,!1);a.lineTo(0.25*b,1*c);a.moveTo(0.75*b,0);a.lineTo(0.75*b,1*c);a.bb(!1);b=a.s;b.G=new I(0.25,0);b.H=new I(0.75,1);t.v(a);return b},Terminator:function(a,b,c){a=t.u();J(a,0.25*b,0,!0);a.arcTo(270,180,0.75*b,0.5*c,0.25*b,0.5*c);a.arcTo(90,180,0.25*b,0.5*c,0.25*b,0.5*c);b=a.s;b.G=new I(0.23,0);b.H=new I(0.77,1);t.v(a);return b},TransmittalTape:function(a,b,c){a=a?a.Hc:0;0===a&&(a=0.1);var d=t.u();J(d,0,0,!0);d.lineTo(1*b,0);d.lineTo(1*b,1*c);d.lineTo(0.75*b,(1-a)*
  c);d.lineTo(0,(1-a)*c);M(d);b=d.s;b.G=Eb;b.H=new I(1,1-a);t.v(d);return b},AndGate:function(a,b,c){a=t.u();var d=0.5*H.va;J(a,0,0,!0);a.lineTo(0.5*b,0);K(a,(0.5+d)*b,0,1*b,(0.5-d)*c,1*b,0.5*c);K(a,1*b,(0.5+d)*c,(0.5+d)*b,1*c,0.5*b,1*c);a.lineTo(0,1*c);M(a);b=a.s;b.G=Eb;b.H=new I(0.55,1);t.v(a);return b},Buffer:function(a,b,c){a=t.u();J(a,0,0,!0);a.lineTo(1*b,0.5*c);a.lineTo(0,1*c);M(a);b=a.s;b.G=new I(0,0.25);b.H=new I(0.5,0.75);t.v(a);return b},Clock:function(a,b,c){a=t.u();var d=0.5*H.va;J(a,1*
  b,0.5*c,!0);K(a,1*b,(0.5+d)*c,(0.5+d)*b,1*c,0.5*b,1*c);K(a,(0.5-d)*b,1*c,0,(0.5+d)*c,0,0.5*c);K(a,0,(0.5-d)*c,(0.5-d)*b,0,0.5*b,0);K(a,(0.5+d)*b,0,1*b,(0.5-d)*c,1*b,0.5*c);J(a,1*b,0.5*c,!1);a.lineTo(1*b,0.5*c);J(a,0.8*b,0.75*c,!1);a.lineTo(0.8*b,0.25*c);a.lineTo(0.6*b,0.25*c);a.lineTo(0.6*b,0.75*c);a.lineTo(0.4*b,0.75*c);a.lineTo(0.4*b,0.25*c);a.lineTo(0.2*b,0.25*c);a.lineTo(0.2*b,0.75*c);a.bb(!1);b=a.s;b.vc=Wg;t.v(a);return b},Ground:function(a,b,c){a=t.u();J(a,0.5*b,0,!1);a.lineTo(0.5*b,0.4*c);
  a.moveTo(0.2*b,0.6*c);a.lineTo(0.8*b,0.6*c);a.moveTo(0.3*b,0.8*c);a.lineTo(0.7*b,0.8*c);a.moveTo(0.4*b,1*c);a.lineTo(0.6*b,1*c);b=a.s;t.v(a);return b},Inverter:function(a,b,c){a=t.u();var d=0.1*H.va;J(a,0.8*b,0.5*c,!0);a.lineTo(0,1*c);a.lineTo(0,0);a.lineTo(0.8*b,0.5*c);J(a,1*b,0.5*c,!0);K(a,1*b,(0.5+d)*c,(0.9+d)*b,0.6*c,0.9*b,0.6*c);K(a,(0.9-d)*b,0.6*c,0.8*b,(0.5+d)*c,0.8*b,0.5*c);K(a,0.8*b,(0.5-d)*c,(0.9-d)*b,0.4*c,0.9*b,0.4*c);K(a,(0.9+d)*b,0.4*c,1*b,(0.5-d)*c,1*b,0.5*c);b=a.s;b.G=new I(0,0.25);
  b.H=new I(0.4,0.75);t.v(a);return b},NandGate:function(a,b,c){a=t.u();var d=H.va,f=0.5*d,g=0.4*d,d=0.1*d;J(a,0.8*b,0.5*c,!0);K(a,0.8*b,(0.5+g)*c,(0.4+f)*b,1*c,0.4*b,1*c);a.lineTo(0,1*c);a.lineTo(0,0);a.lineTo(0.4*b,0);K(a,(0.4+f)*b,0,0.8*b,(0.5-g)*c,0.8*b,0.5*c);J(a,1*b,0.5*c,!0);K(a,1*b,(0.5+d)*c,(0.9+d)*b,0.6*c,0.9*b,0.6*c);K(a,(0.9-d)*b,0.6*c,0.8*b,(0.5+d)*c,0.8*b,0.5*c);K(a,0.8*b,(0.5-d)*c,(0.9-d)*b,0.4*c,0.9*b,0.4*c);K(a,(0.9+d)*b,0.4*c,1*b,(0.5-d)*c,1*b,0.5*c);b=a.s;b.G=new I(0,0.05);b.H=new I(0.55,
  0.95);t.v(a);return b},NorGate:function(a,b,c){a=t.u();var d=H.va,f=0.5,g=d*f,h=0,k=0.5;J(a,0.8*b,0.5*c,!0);K(a,0.7*b,(k+g)*c,(h+g)*b,(k+f)*c,0,1*c);K(a,0.25*b,0.75*c,0.25*b,0.25*c,0,0);K(a,(h+g)*b,(k-f)*c,0.7*b,(k-g)*c,0.8*b,0.5*c);f=0.1;g=0.1*d;h=0.9;k=0.5;J(a,(h-f)*b,k*c,!0);K(a,(h-f)*b,(k-g)*c,(h-g)*b,(k-f)*c,h*b,(k-f)*c);K(a,(h+g)*b,(k-f)*c,(h+f)*b,(k-g)*c,(h+f)*b,k*c);K(a,(h+f)*b,(k+g)*c,(h+g)*b,(k+f)*c,h*b,(k+f)*c);K(a,(h-g)*b,(k+f)*c,(h-f)*b,(k+g)*c,(h-f)*b,k*c);b=a.s;b.G=new I(0.2,0.25);
  b.H=new I(0.6,0.75);t.v(a);return b},OrGate:function(a,b,c){a=t.u();var d=0.5*H.va;J(a,0,0,!0);K(a,(0+d+d)*b,0*c,0.8*b,(0.5-d)*c,1*b,0.5*c);K(a,0.8*b,(0.5+d)*c,(0+d+d)*b,1*c,0,1*c);K(a,0.25*b,0.75*c,0.25*b,0.25*c,0,0);M(a);b=a.s;b.G=new I(0.2,0.25);b.H=new I(0.75,0.75);t.v(a);return b},XnorGate:function(a,b,c){a=t.u();var d=H.va,f=0.5,g=d*f,h=0.2,k=0.5;J(a,0.1*b,0,!1);K(a,0.35*b,0.25*c,0.35*b,0.75*c,0.1*b,1*c);J(a,0.8*b,0.5*c,!0);K(a,0.7*b,(k+g)*c,(h+g)*b,(k+f)*c,0.2*b,1*c);K(a,0.45*b,0.75*c,0.45*
  b,0.25*c,0.2*b,0);K(a,(h+g)*b,(k-f)*c,0.7*b,(k-g)*c,0.8*b,0.5*c);f=0.1;g=0.1*d;h=0.9;k=0.5;J(a,(h-f)*b,k*c,!0);K(a,(h-f)*b,(k-g)*c,(h-g)*b,(k-f)*c,h*b,(k-f)*c);K(a,(h+g)*b,(k-f)*c,(h+f)*b,(k-g)*c,(h+f)*b,k*c);K(a,(h+f)*b,(k+g)*c,(h+g)*b,(k+f)*c,h*b,(k+f)*c);K(a,(h-g)*b,(k+f)*c,(h-f)*b,(k+g)*c,(h-f)*b,k*c);b=a.s;b.G=new I(0.4,0.25);b.H=new I(0.65,0.75);t.v(a);return b},XorGate:function(a,b,c){a=t.u();var d=0.5*H.va;J(a,0.1*b,0,!1);K(a,0.35*b,0.25*c,0.35*b,0.75*c,0.1*b,1*c);J(a,0.2*b,0,!0);K(a,(0.2+
  d)*b,0*c,0.9*b,(0.5-d)*c,1*b,0.5*c);K(a,0.9*b,(0.5+d)*c,(0.2+d)*b,1*c,0.2*b,1*c);K(a,0.45*b,0.75*c,0.45*b,0.25*c,0.2*b,0);M(a);b=a.s;b.G=new I(0.4,0.25);b.H=new I(0.8,0.75);t.v(a);return b},Capacitor:function(a,b,c){a=t.u();J(a,0,0,!1);a.lineTo(0,1*c);a.moveTo(1*b,0);a.lineTo(1*b,1*c);b=a.s;t.v(a);return b},Resistor:function(a,b,c){a=t.u();J(a,0,0.5*c,!1);a.lineTo(0.1*b,0);a.lineTo(0.2*b,1*c);a.lineTo(0.3*b,0);a.lineTo(0.4*b,1*c);a.lineTo(0.5*b,0);a.lineTo(0.6*b,1*c);a.lineTo(0.7*b,0.5*c);b=a.s;t.v(a);
  return b},Inductor:function(a,b,c){a=t.u();var d=0.1*H.va,f=0.1,g=0.5;J(a,(f-0.5*d)*b,(g+0.1)*c,!1);K(a,(f-d)*b,(g+0.1)*c,(f-0.1)*b,(g+d)*c,(f+0.1)*b,(g+d)*c);f=0.3;g=0.5;K(a,(f+0.1)*b,(g+d)*c,(f+d)*b,(g+0.1)*c,f*b,(g+0.1)*c);K(a,(f-d)*b,(g+0.1)*c,(f-0.1)*b,(g+d)*c,(f+0.1)*b,(g+d)*c);g=f=0.5;K(a,(f+0.1)*b,(g+d)*c,(f+d)*b,(g+0.1)*c,f*b,(g+0.1)*c);K(a,(f-d)*b,(g+0.1)*c,(f-0.1)*b,(g+d)*c,(f+0.1)*b,(g+d)*c);f=0.7;g=0.5;K(a,(f+0.1)*b,(g+d)*c,(f+d)*b,(g+0.1)*c,f*b,(g+0.1)*c);K(a,(f-d)*b,(g+0.1)*c,(f-0.1)*
  b,(g+d)*c,(f+0.1)*b,(g+d)*c);f=0.9;g=0.5;K(a,(f+0.1)*b,(g+d)*c,(f+d)*b,(g+0.1)*c,(f+0.5*d)*b,(g+0.1)*c);b=a.s;t.v(a);return b},ACvoltageSource:function(a,b,c){a=t.u();var d=0.5*H.va;J(a,0*b,0.5*c,!1);K(a,0*b,(0.5-d)*c,(0.5-d)*b,0*c,0.5*b,0*c);K(a,(0.5+d)*b,0*c,1*b,(0.5-d)*c,1*b,0.5*c);K(a,1*b,(0.5+d)*c,(0.5+d)*b,1*c,0.5*b,1*c);K(a,(0.5-d)*b,1*c,0*b,(0.5+d)*c,0*b,0.5*c);a.moveTo(0.1*b,0.5*c);K(a,0.5*b,0*c,0.5*b,1*c,0.9*b,0.5*c);b=a.s;b.vc=Wg;t.v(a);return b},DCvoltageSource:function(a,b,c){a=t.u();
  J(a,0,0.75*c,!1);a.lineTo(0,0.25*c);a.moveTo(1*b,0);a.lineTo(1*b,1*c);b=a.s;t.v(a);return b},Diode:function(a,b,c){a=t.u();J(a,1*b,0,!1);a.lineTo(1*b,0.5*c);a.lineTo(0,1*c);a.lineTo(0,0);a.lineTo(1*b,0.5*c);a.lineTo(1*b,1*c);b=a.s;b.G=new I(0,0.25);b.H=new I(0.5,0.75);t.v(a);return b},Wifi:function(a,b,c){var d=b,f=c;b*=0.38;c*=0.6;a=t.u();var g=H.va,h=0.8*g,k=0.8,l=0,m=0.5,d=(d-b)/2,f=(f-c)/2;J(a,l*b+d,(m+k)*c+f,!0);K(a,(l-h)*b+d,(m+k)*c+f,(l-k)*b+d,(m+h)*c+f,(l-k)*b+d,m*c+f);K(a,(l-k)*b+d,(m-h)*
  c+f,(l-h)*b+d,(m-k)*c+f,l*b+d,(m-k)*c+f);K(a,l*b+d,(m-k)*c+f,(l-k+0.5*h)*b+d,(m-h)*c+f,(l-k+0.5*h)*b+d,m*c+f);K(a,(l-k+0.5*h)*b+d,(m+h)*c+f,l*b+d,(m+k)*c+f,l*b+d,(m+k)*c+f);M(a);h=0.4*g;k=0.4;l=0.2;m=0.5;J(a,l*b+d,(m+k)*c+f,!0);K(a,(l-h)*b+d,(m+k)*c+f,(l-k)*b+d,(m+h)*c+f,(l-k)*b+d,m*c+f);K(a,(l-k)*b+d,(m-h)*c+f,(l-h)*b+d,(m-k)*c+f,l*b+d,(m-k)*c+f);K(a,l*b+d,(m-k)*c+f,(l-k+0.5*h)*b+d,(m-h)*c+f,(l-k+0.5*h)*b+d,m*c+f);K(a,(l-k+0.5*h)*b+d,(m+h)*c+f,l*b+d,(m+k)*c+f,l*b+d,(m+k)*c+f);M(a);h=0.2*g;k=0.2;
  m=l=0.5;J(a,(l-k)*b+d,m*c+f,!0);K(a,(l-k)*b+d,(m-h)*c+f,(l-h)*b+d,(m-k)*c+f,l*b+d,(m-k)*c+f);K(a,(l+h)*b+d,(m-k)*c+f,(l+k)*b+d,(m-h)*c+f,(l+k)*b+d,m*c+f);K(a,(l+k)*b+d,(m+h)*c+f,(l+h)*b+d,(m+k)*c+f,l*b+d,(m+k)*c+f);K(a,(l-h)*b+d,(m+k)*c+f,(l-k)*b+d,(m+h)*c+f,(l-k)*b+d,m*c+f);h=0.4*g;k=0.4;l=0.8;m=0.5;J(a,l*b+d,(m-k)*c+f,!0);K(a,(l+h)*b+d,(m-k)*c+f,(l+k)*b+d,(m-h)*c+f,(l+k)*b+d,m*c+f);K(a,(l+k)*b+d,(m+h)*c+f,(l+h)*b+d,(m+k)*c+f,l*b+d,(m+k)*c+f);K(a,l*b+d,(m+k)*c+f,(l+k-0.5*h)*b+d,(m+h)*c+f,(l+k-0.5*
  h)*b+d,m*c+f);K(a,(l+k-0.5*h)*b+d,(m-h)*c+f,l*b+d,(m-k)*c+f,l*b+d,(m-k)*c+f);M(a);h=0.8*g;k=0.8;l=1;m=0.5;J(a,l*b+d,(m-k)*c+f,!0);K(a,(l+h)*b+d,(m-k)*c+f,(l+k)*b+d,(m-h)*c+f,(l+k)*b+d,m*c+f);K(a,(l+k)*b+d,(m+h)*c+f,(l+h)*b+d,(m+k)*c+f,l*b+d,(m+k)*c+f);K(a,l*b+d,(m+k)*c+f,(l+k-0.5*h)*b+d,(m+h)*c+f,(l+k-0.5*h)*b+d,m*c+f);K(a,(l+k-0.5*h)*b+d,(m-h)*c+f,l*b+d,(m-k)*c+f,l*b+d,(m-k)*c+f);M(a);b=a.s;t.v(a);return b},Email:function(a,b,c){a=t.u();J(a,0,0,!0);a.lineTo(1*b,0);a.lineTo(1*b,1*c);a.lineTo(0,1*
  c);a.lineTo(0,0);M(a);J(a,0,0,!1);a.lineTo(0.5*b,0.6*c);a.lineTo(1*b,0);a.moveTo(0,1*c);a.lineTo(0.45*b,0.54*c);a.moveTo(1*b,1*c);a.lineTo(0.55*b,0.54*c);a.bb(!1);b=a.s;t.v(a);return b},Ethernet:function(a,b,c){a=t.u();J(a,0.35*b,0,!0);a.lineTo(0.65*b,0);a.lineTo(0.65*b,0.4*c);a.lineTo(0.35*b,0.4*c);a.lineTo(0.35*b,0);M(a);J(a,0.1*b,1*c,!0,!0);a.lineTo(0.4*b,1*c);a.lineTo(0.4*b,0.6*c);a.lineTo(0.1*b,0.6*c);a.lineTo(0.1*b,1*c);M(a);J(a,0.6*b,1*c,!0,!0);a.lineTo(0.9*b,1*c);a.lineTo(0.9*b,0.6*c);a.lineTo(0.6*
  b,0.6*c);a.lineTo(0.6*b,1*c);M(a);J(a,0,0.5*c,!1);a.lineTo(1*b,0.5*c);a.moveTo(0.5*b,0.5*c);a.lineTo(0.5*b,0.4*c);a.moveTo(0.75*b,0.5*c);a.lineTo(0.75*b,0.6*c);a.moveTo(0.25*b,0.5*c);a.lineTo(0.25*b,0.6*c);a.bb(!1);b=a.s;t.v(a);return b},Power:function(a,b,c){a=t.u();var d=H.va,f=0.4*d,g=0.4,h=t.K(),k=t.K(),l=t.K(),m=t.K();H.Vi(0.5,0.5-g,0.5+f,0.5-g,0.5+g,0.5-f,0.5+g,0.5,0.5,h,h,k,l,m);var n=t.lc(k.x,k.y);J(a,k.x*b,k.y*c,!0);K(a,l.x*b,l.y*c,m.x*b,m.y*c,(0.5+g)*b,0.5*c);K(a,(0.5+g)*b,(0.5+f)*c,(0.5+
  f)*b,(0.5+g)*c,0.5*b,(0.5+g)*c);K(a,(0.5-f)*b,(0.5+g)*c,(0.5-g)*b,(0.5+f)*c,(0.5-g)*b,0.5*c);H.Vi(0.5-g,0.5,0.5-g,0.5-f,0.5-f,0.5-g,0.5,0.5-g,0.5,l,m,k,h,h);K(a,l.x*b,l.y*c,m.x*b,m.y*c,k.x*b,k.y*c);f=0.3*d;g=0.3;H.Vi(0.5-g,0.5,0.5-g,0.5-f,0.5-f,0.5-g,0.5,0.5-g,0.5,l,m,k,h,h);a.lineTo(k.x*b,k.y*c);K(a,m.x*b,m.y*c,l.x*b,l.y*c,(0.5-g)*b,0.5*c);K(a,(0.5-g)*b,(0.5+f)*c,(0.5-f)*b,(0.5+g)*c,0.5*b,(0.5+g)*c);K(a,(0.5+f)*b,(0.5+g)*c,(0.5+g)*b,(0.5+f)*c,(0.5+g)*b,0.5*c);H.Vi(0.5,0.5-g,0.5+f,0.5-g,0.5+g,0.5-
  f,0.5+g,0.5,0.5,h,h,k,l,m);K(a,m.x*b,m.y*c,l.x*b,l.y*c,k.x*b,k.y*c);M(a);J(a,0.45*b,0,!0);a.lineTo(0.45*b,0.5*c);a.lineTo(0.55*b,0.5*c);a.lineTo(0.55*b,0);M(a);t.B(h);t.B(k);t.B(l);t.B(m);t.B(n);b=a.s;b.G=new I(0.25,0.55);b.H=new I(0.75,0.8);t.v(a);return b},Fallout:function(a,b,c){a=t.u();var d=0.5*H.va;J(a,0*b,0.5*c,!0);K(a,0*b,(0.5-d)*c,(0.5-d)*b,0*c,0.5*b,0*c);K(a,(0.5+d)*b,0*c,1*b,(0.5-d)*c,1*b,0.5*c);K(a,1*b,(0.5+d)*c,(0.5+d)*b,1*c,0.5*b,1*c);K(a,(0.5-d)*b,1*c,0*b,(0.5+d)*c,0*b,0.5*c);var f=
  d=0;J(a,(0.3+d)*b,(0.8+f)*c,!0,!0);a.lineTo((0.5+d)*b,(0.5+f)*c);a.lineTo((0.1+d)*b,(0.5+f)*c);a.lineTo((0.3+d)*b,(0.8+f)*c);d=0.4;f=0;M(a);J(a,(0.3+d)*b,(0.8+f)*c,!0,!0);a.lineTo((0.5+d)*b,(0.5+f)*c);a.lineTo((0.1+d)*b,(0.5+f)*c);a.lineTo((0.3+d)*b,(0.8+f)*c);d=0.2;f=-0.3;M(a);J(a,(0.3+d)*b,(0.8+f)*c,!0,!0);a.lineTo((0.5+d)*b,(0.5+f)*c);a.lineTo((0.1+d)*b,(0.5+f)*c);a.lineTo((0.3+d)*b,(0.8+f)*c);M(a);b=a.s;b.vc=Wg;t.v(a);return b},IrritationHazard:function(a,b,c){a=t.u();J(a,0.2*b,0*c,!0);a.lineTo(0.5*
  b,0.3*c);a.lineTo(0.8*b,0*c);a.lineTo(1*b,0.2*c);a.lineTo(0.7*b,0.5*c);a.lineTo(1*b,0.8*c);a.lineTo(0.8*b,1*c);a.lineTo(0.5*b,0.7*c);a.lineTo(0.2*b,1*c);a.lineTo(0*b,0.8*c);a.lineTo(0.3*b,0.5*c);a.lineTo(0*b,0.2*c);M(a);b=a.s;b.G=new I(0.3,0.3);b.H=new I(0.7,0.7);t.v(a);return b},ElectricalHazard:function(a,b,c){a=t.u();J(a,0.37,0*c,!0);a.lineTo(0.5*b,0.11*c);a.lineTo(0.77*b,0.04*c);a.lineTo(0.33*b,0.49*c);a.lineTo(1*b,0.37*c);a.lineTo(0.63*b,0.86*c);a.lineTo(0.77*b,0.91*c);a.lineTo(0.34*b,1*c);a.lineTo(0.34*
  b,0.78*c);a.lineTo(0.44*b,0.8*c);a.lineTo(0.65*b,0.56*c);a.lineTo(0*b,0.68*c);M(a);b=a.s;t.v(a);return b},FireHazard:function(a,b,c){a=t.u();J(a,0.1*b,1*c,!0);K(a,-0.25*b,0.63*c,0.45*b,0.44*c,0.29*b,0*c);K(a,0.48*b,0.17*c,0.54*b,0.35*c,0.51*b,0.42*c);K(a,0.59*b,0.29*c,0.58*b,0.28*c,0.59*b,0.18*c);K(a,0.8*b,0.34*c,0.88*b,0.43*c,0.75*b,0.6*c);K(a,0.87*b,0.48*c,0.88*b,0.43*c,0.88*b,0.31*c);K(a,1.17*b,0.76*c,0.82*b,0.8*c,0.9*b,1*c);M(a);b=a.s;b.G=new I(0.05,0.645);b.H=new I(0.884,0.908);t.v(a);return b},
  BpmnActivityLoop:function(a,b,c){a=t.u();var d=4*(Math.SQRT2-1)/3*0.5;J(a,(0.5*Math.SQRT2/2+0.5)*b,(1-(0.5-0.5*Math.SQRT2/2))*c,!1);K(a,1*b,0.7*c,1*b,0.5*c,1*b,0.5*c);K(a,1*b,(0.5-d+0)*c,(0.5+d+0)*b,0*c,0.5*b,0*c);K(a,(0.5-d+0)*b,0*c,0*b,(0.5-d+0)*c,0*b,0.5*c);K(a,0*b,(0.5+d+0)*c,(0.5-d+0)*b,1*c,0.35*b,0.98*c);a.moveTo(0.35*b,0.8*c);a.lineTo(0.35*b,1*c);a.lineTo(0.15*b,1*c);b=a.s;t.v(a);return b},BpmnActivityParallel:function(a,b,c){a=t.u();J(a,0,0,!1);a.lineTo(0,1*c);a.moveTo(0.5*b,0);a.lineTo(0.5*
  b,1*c);a.moveTo(1*b,0);a.lineTo(1*b,1*c);b=a.s;t.v(a);return b},BpmnActivitySequential:function(a,b,c){a=t.u();J(a,0,0,!1);a.lineTo(1*b,0);a.moveTo(0,0.5*c);a.lineTo(1*b,0.5*c);a.moveTo(0,1*c);a.lineTo(1*b,1*c);b=a.s;t.v(a);return b},BpmnActivityAdHoc:function(a,b,c){a=t.u();J(a,0,0,!1);J(a,1*b,1*c,!1);J(a,0,0.5*c,!1);K(a,0.2*b,0.35*c,0.3*b,0.35*c,0.5*b,0.5*c);K(a,0.7*b,0.65*c,0.8*b,0.65*c,1*b,0.5*c);b=a.s;t.v(a);return b},BpmnActivityCompensation:function(a,b,c){a=t.u();J(a,0,0.5*c,!0);a.lineTo(0.5*
  b,0);a.lineTo(0.5*b,0.5*c);a.lineTo(1*b,1*c);a.lineTo(1*b,0);a.lineTo(0.5*b,0.5*c);a.lineTo(0.5*b,1*c);M(a);b=a.s;t.v(a);return b},BpmnTaskMessage:function(a,b,c){a=t.u();J(a,0,0.2*c,!0);a.lineTo(1*b,0.2*c);a.lineTo(1*b,0.8*c);a.lineTo(0,0.8*c);a.lineTo(0,0.8*c);M(a);J(a,0,0.2*c,!1);a.lineTo(0.5*b,0.5*c);a.lineTo(1*b,0.2*c);a.bb(!1);b=a.s;t.v(a);return b},BpmnTaskScript:function(a,b,c){a=t.u();J(a,0.7*b,1*c,!0);a.lineTo(0.3*b,1*c);K(a,0.6*b,0.5*c,0,0.5*c,0.3*b,0);a.lineTo(0.7*b,0);K(a,0.4*b,0.5*c,
  1*b,0.5*c,0.7*b,1*c);M(a);J(a,0.45*b,0.73*c,!1);a.lineTo(0.7*b,0.73*c);a.moveTo(0.38*b,0.5*c);a.lineTo(0.63*b,0.5*c);a.moveTo(0.31*b,0.27*c);a.lineTo(0.56*b,0.27*c);a.bb(!1);b=a.s;t.v(a);return b},BpmnTaskUser:function(a,b,c){a=t.u();J(a,0,0,!1);J(a,0.335*b,(1-0.555)*c,!0);a.lineTo(0.335*b,0.595*c);a.lineTo(0.665*b,0.595*c);a.lineTo(0.665*b,(1-0.555)*c);K(a,0.88*b,0.46*c,0.98*b,0.54*c,1*b,0.68*c);a.lineTo(1*b,1*c);a.lineTo(0,1*c);a.lineTo(0,0.68*c);K(a,0.02*b,0.54*c,0.12*b,0.46*c,0.335*b,(1-0.555)*
  c);a.lineTo(0.365*b,0.405*c);var d=0.5-0.285,f=Math.PI/4,g=4*(1-Math.cos(f))/(3*Math.sin(f)),f=g*d,g=g*d;K(a,(0.5-(f+d)/2)*b,(d+(d+g)/2)*c,(0.5-d)*b,(d+g)*c,(0.5-d)*b,d*c);K(a,(0.5-d)*b,(d-g)*c,(0.5-f)*b,(d-d)*c,0.5*b,(d-d)*c);K(a,(0.5+f)*b,(d-d)*c,(0.5+d)*b,(d-g)*c,(0.5+d)*b,d*c);K(a,(0.5+d)*b,(d+g)*c,(0.5+(f+d)/2)*b,(d+(d+g)/2)*c,0.635*b,0.405*c);a.lineTo(0.635*b,0.405*c);a.lineTo(0.665*b,(1-0.555)*c);a.lineTo(0.665*b,0.595*c);a.lineTo(0.335*b,0.595*c);J(a,0.2*b,1*c,!1);a.lineTo(0.2*b,0.8*c);J(a,
  0.8*b,1*c,!1);a.lineTo(0.8*b,0.8*c);b=a.s;t.v(a);return b},BpmnEventConditional:function(a,b,c){a=t.u();J(a,0.1*b,0,!0);a.lineTo(0.9*b,0);a.lineTo(0.9*b,1*c);a.lineTo(0.1*b,1*c);M(a);J(a,0.2*b,0.2*c,!1);a.lineTo(0.8*b,0.2*c);a.moveTo(0.2*b,0.4*c);a.lineTo(0.8*b,0.4*c);a.moveTo(0.2*b,0.6*c);a.lineTo(0.8*b,0.6*c);a.moveTo(0.2*b,0.8*c);a.lineTo(0.8*b,0.8*c);a.bb(!1);b=a.s;t.v(a);return b},BpmnEventError:function(a,b,c){a=t.u();J(a,0,1*c,!0);a.lineTo(0.33*b,0);a.lineTo(0.66*b,0.5*c);a.lineTo(1*b,0);a.lineTo(0.66*
  b,1*c);a.lineTo(0.33*b,0.5*c);M(a);b=a.s;t.v(a);return b},BpmnEventEscalation:function(a,b,c){a=t.u();J(a,0,0,!1);J(a,1*b,1*c,!1);J(a,0.1*b,1*c,!0);a.lineTo(0.5*b,0);a.lineTo(0.9*b,1*c);a.lineTo(0.5*b,0.5*c);M(a);b=a.s;t.v(a);return b},BpmnEventTimer:function(a,b,c){a=t.u();var d=0.5*H.va;J(a,1*b,0.5*c,!0);K(a,1*b,(0.5+d)*c,(0.5+d)*b,1*c,0.5*b,1*c);K(a,(0.5-d)*b,1*c,0,(0.5+d)*c,0,0.5*c);K(a,0,(0.5-d)*c,(0.5-d)*b,0,0.5*b,0);K(a,(0.5+d)*b,0,1*b,(0.5-d)*c,1*b,0.5*c);J(a,0.5*b,0,!1);a.lineTo(0.5*b,0.15*
  c);a.moveTo(0.5*b,1*c);a.lineTo(0.5*b,0.85*c);a.moveTo(0,0.5*c);a.lineTo(0.15*b,0.5*c);a.moveTo(1*b,0.5*c);a.lineTo(0.85*b,0.5*c);a.moveTo(0.5*b,0.5*c);a.lineTo(0.58*b,0.1*c);a.moveTo(0.5*b,0.5*c);a.lineTo(0.78*b,0.54*c);a.bb(!1);b=a.s;b.vc=Wg;t.v(a);return b}};H.OA={};for(var sm in H.bj)H.bj[sm.toLowerCase()]=sm;
  H.fw={"":"",Standard:"F1 m 0,0 l 8,4 -8,4 2,-4 z",Backward:"F1 m 8,0 l -2,4 2,4 -8,-4 z",Triangle:"F1 m 0,0 l 8,4.62 -8,4.62 z",BackwardTriangle:"F1 m 8,4 l 0,4 -8,-4 8,-4 0,4 z",Boomerang:"F1 m 0,0 l 8,4 -8,4 4,-4 -4,-4 z",BackwardBoomerang:"F1 m 8,0 l -8,4 8,4 -4,-4 4,-4 z",SidewaysV:"m 0,0 l 8,4 -8,4 0,-1 6,-3 -6,-3 0,-1 z",BackwardV:"m 8,0 l -8,4 8,4 0,-1 -6,-3 6,-3 0,-1 z",OpenTriangle:"m 0,0 l 8,4 -8,4",BackwardOpenTriangle:"m 8,0 l -8,4 8,4",OpenTriangleLine:"m 0,0 l 8,4 -8,4 m 8.5,0 l 0,-8",
  BackwardOpenTriangleLine:"m 8,0 l  -8,4 8,4 m -8.5,0 l 0,-8",OpenTriangleTop:"m 0,0 l 8,4 m 0,4",BackwardOpenTriangleTop:"m 8,0 l -8,4 m 0,4",OpenTriangleBottom:"m 0,8 l 8,-4",BackwardOpenTriangleBottom:"m 0,4 l 8,4",HalfTriangleTop:"F1 m 0,0 l 0,4 8,0 z m 0,8",BackwardHalfTriangleTop:"F1 m 8,0 l 0,4 -8,0 z m 0,8",HalfTriangleBottom:"F1 m 0,4 l 0,4 8,-4 z",BackwardHalfTriangleBottom:"F1 m 8,4 l 0,4 -8,-4 z",ForwardSemiCircle:"m 4,0 b 270 180 0 4 4",BackwardSemiCircle:"m 4,8 b 90 180 0 -4 4",Feather:"m 0,0 l 3,4 -3,4",
  BackwardFeather:"m 3,0 l -3,4 3,4",DoubleFeathers:"m 0,0 l 3,4 -3,4 m 3,-8 l 3,4 -3,4",BackwardDoubleFeathers:"m 3,0 l -3,4 3,4 m 3,-8 l -3,4 3,4",TripleFeathers:"m 0,0 l 3,4 -3,4 m 3,-8 l 3,4 -3,4 m 3,-8 l 3,4 -3,4",BackwardTripleFeathers:"m 3,0 l -3,4 3,4 m 3,-8 l -3,4 3,4 m 3,-8 l -3,4 3,4",ForwardSlash:"m 0,8 l 5,-8",BackSlash:"m 0,0 l 5,8",DoubleForwardSlash:"m 0,8 l 4,-8 m -2,8 l 4,-8",DoubleBackSlash:"m 0,0 l 4,8 m -2,-8 l 4,8",TripleForwardSlash:"m 0,8 l 4,-8 m -2,8 l 4,-8 m -2,8 l 4,-8",
  TripleBackSlash:"m 0,0 l 4,8 m -2,-8 l 4,8 m -2,-8 l 4,8",Fork:"m 0,4 l 8,0 m -8,0 l 8,-4 m -8,4 l 8,4",BackwardFork:"m 8,4 l -8,0 m 8,0 l -8,-4 m 8,4 l -8,4",LineFork:"m 0,0 l 0,8 m 0,-4 l 8,0 m -8,0 l 8,-4 m -8,4 l 8,4",BackwardLineFork:"m 8,4 l -8,0 m 8,0 l -8,-4 m 8,4 l -8,4 m 8,-8 l 0,8",CircleFork:"F1 m 6,4 b 0 360 -3 0 3 z m 0,0 l 6,0 m -6,0 l 6,-4 m -6,4 l 6,4",BackwardCircleFork:"F1 m 0,4 l 6,0 m -6,-4 l 6,4 m -6,4 l 6,-4 m 6,0 b 0 360 -3 0 3",CircleLineFork:"F1 m 6,4 b 0 360 -3 0 3 z m 1,-4 l 0,8 m 0,-4 l 6,0 m -6,0 l 6,-4 m -6,4 l 6,4",
  BackwardCircleLineFork:"F1 m 0,4 l 6,0 m -6,-4 l 6,4 m -6,4 l 6,-4 m 0,-4 l 0,8 m 7,-4 b 0 360 -3 0 3",Circle:"F1 m 8,4 b 0 360 -4 0 4 z",Block:"F1 m 0,0 l 0,8 8,0 0,-8 z",StretchedDiamond:"F1 m 0,3 l 5,-3 5,3 -5,3 -5,-3 z",Diamond:"F1 m 0,4 l 4,-4 4,4 -4,4 -4,-4 z",Chevron:"F1 m 0,0 l 5,0 3,4 -3,4 -5,0 3,-4 -3,-4 z",StretchedChevron:"F1 m 0,0 l 8,0 3,4 -3,4 -8,0 3,-4 -3,-4 z",NormalArrow:"F1 m 0,2 l 4,0 0,-2 4,4 -4,4 0,-2 -4,0 z",X:"m 0,0 l 8,8 m 0,-8 l -8,8",TailedNormalArrow:"F1 m 0,0 l 2,0 1,2 3,0 0,-2 2,4 -2,4 0,-2 -3,0 -1,2 -2,0 1,-4 -1,-4 z",
  DoubleTriangle:"F1 m 0,0 l 4,4 -4,4 0,-8 z  m 4,0 l 4,4 -4,4 0,-8 z",BigEndArrow:"F1 m 0,0 l 5,2 0,-2 3,4 -3,4 0,-2 -5,2 0,-8 z",ConcaveTailArrow:"F1 m 0,2 h 4 v -2 l 4,4 -4,4 v -2 h -4 l 2,-2 -2,-2 z",RoundedTriangle:"F1 m 0,1 a 1,1 0 0 1 1,-1 l 7,3 a 0.5,1 0 0 1 0,2 l -7,3 a 1,1 0 0 1 -1,-1 l 0,-6 z",SimpleArrow:"F1 m 1,2 l -1,-2 2,0 1,2 -1,2 -2,0 1,-2 5,0 0,-2 2,2 -2,2 0,-2 z",AccelerationArrow:"F1 m 0,0 l 0,8 0.2,0 0,-8 -0.2,0 z m 2,0 l 0,8 1,0 0,-8 -1,0 z m 3,0 l 2,0 2,4 -2,4 -2,0 0,-8 z",BoxArrow:"F1 m 0,0 l 4,0 0,2 2,0 0,-2 2,4 -2,4 0,-2 -2,0 0,2 -4,0 0,-8 z",
  TriangleLine:"F1 m 8,4 l -8,-4 0,8 8,-4 z m 0.5,4 l 0,-8",CircleEndedArrow:"F1 m 10,4 l -2,-3 0,2 -2,0 0,2 2,0 0,2 2,-3 z m -4,0 b 0 360 -3 0 3 z",DynamicWidthArrow:"F1 m 0,3 l 2,0 2,-1 2,-2 2,4 -2,4 -2,-2 -2,-1 -2,0 0,-2 z",EquilibriumArrow:"m 0,3 l 8,0 -3,-3 m 3,5 l -8,0 3,3",FastForward:"F1 m 0,0 l 3.5,4 0,-4 3.5,4 0,-4 1,0 0,8 -1,0 0,-4 -3.5,4 0,-4 -3.5,4 0,-8 z",Kite:"F1 m 0,4 l 2,-4 6,4 -6,4 -2,-4 z",HalfArrowTop:"F1 m 0,0 l 4,4 4,0 -8,-4 z m 0,8",HalfArrowBottom:"F1 m 0,8 l 4,-4 4,0 -8,4 z",
  OpposingDirectionDoubleArrow:"F1 m 0,4 l 2,-4 0,2 4,0 0,-2 2,4 -2,4 0,-2 -4,0 0,2 -2,-4 z",PartialDoubleTriangle:"F1 m 0,0 4,3 0,-3 4,4 -4,4 0,-3 -4,3 0,-8 z",LineCircle:"F1 m 0,0 l 0,8 m 7 -4 b 0 360 -3 0 3 z",DoubleLineCircle:"F1 m 0,0 l 0,8 m 2,-8 l 0,8 m 7 -4 b 0 360 -3 0 3 z",TripleLineCircle:"F1 m 0,0 l 0,8 m 2,-8 l 0,8 m 2,-8 l 0,8 m 7 -4 b 0 360 -3 0 3 z",CircleLine:"F1 m 6 4 b 0 360 -3 0 3 z m 1,-4 l 0,8",DiamondCircle:"F1 m 8,4 l -4,4 -4,-4 4,-4 4,4 m 8,0 b 0 360 -4 0 4 z",PlusCircle:"F1 m 8,4 b 0 360 -4 0 4 l -8 0 z m -4 -4 l 0 8",
  OpenRightTriangleTop:"m 8,0 l 0,4 -8,0 m 0,4",OpenRightTriangleBottom:"m 8,8 l 0,-4 -8,0",Line:"m 0,0 l 0,8",DoubleLine:"m 0,0 l 0,8 m 2,0 l 0,-8",TripleLine:"m 0,0 l 0,8 m 2,0 l 0,-8 m 2,0 l 0,8",PentagonArrow:"F1 m 8,4 l -4,-4 -4,0 0,8 4,0 4,-4 z"};H.Bm={};H.RJ=function(){if(H.fw){for(var a in H.fw){var b=Rc(H.fw[a],!1);H.Bm[a]=b;a.toLowerCase()!==a&&(H.Bm[a.toLowerCase()]=a)}H.fw=void 0}};
  H.TD=function(a){H.RJ();var b=H.Bm[a];if(void 0===b){b=a.toLowerCase();if("none"===b)return"None";b=H.Bm[b]}return"string"===typeof b?b:b instanceof zc?a:null};W.FigureGenerators=H.bj;W.ArrowheadGeometries=H.Bm;
  function E(a){0===arguments.length?y.call(this):y.call(this,a);this.W=311807;this.Jk=this.sh="";this.Zr=this.Wr=this.is=this.jr=null;this.ks="";this.ki=this.js=this.rm=null;this.Yr="";this.vo=null;this.Xr=(new ga(NaN,NaN)).freeze();this.$r="";this.wo=null;this.le="";this.lo=this.xq=this.yk=null;this.Yg=(new w(NaN,NaN)).freeze();this.qr="";this.Mk=null;this.rr=Eb;this.Ar=H.dH;this.tr=H.cH;this.Hq=null;this.kr=tm;this.um=(new w(6,6)).freeze();this.tm="gray";this.sm=4;this.DC=-1;this.nH=new x;this.Gj=
  null;this.Dj=NaN}t.ga("Part",E);t.Ka(E,y);E.prototype.cloneProtected=function(a){y.prototype.cloneProtected.call(this,a);a.W=this.W&-4097|49152;a.sh=this.sh;a.Jk=this.Jk;a.jr=this.jr;a.is=this.is;a.Wr=this.Wr;a.Zr=this.Zr;a.ks=this.ks;a.js=this.js;a.ki=null;a.Yr=this.Yr;a.Xr.assign(this.Xr);a.$r=this.$r;a.le=this.le;a.xq=this.xq;a.Yg.assign(this.Yg);a.qr=this.qr;a.rr=this.rr.Z();a.Ar=this.Ar.Z();a.tr=this.tr.Z();a.Hq=this.Hq;a.kr=this.kr;a.um.assign(this.um);a.tm=this.tm;a.sm=this.sm};
  E.prototype.Zh=function(a){y.prototype.Zh.call(this,a);qk(a);a.rm=null;a.vo=null;a.wo=null;a.Mk=null;a.Gj=null};E.prototype.toString=function(){var a=t.xg(Object.getPrototypeOf(this))+"#"+t.od(this);this.data&&(a+="("+yd(this.data)+")");return a};E.LayoutNone=0;var Zi;E.LayoutAdded=Zi=1;var ej;E.LayoutRemoved=ej=2;E.LayoutShown=4;E.LayoutHidden=8;E.LayoutNodeSized=16;var Kj;E.LayoutGroupLayout=Kj=32;E.LayoutNodeReplaced=64;var tm;E.LayoutStandard=tm=Zi|ej|28|Kj|64;
  E.prototype.fn=function(a,b,c,d,f,g,h){var k=this.h;null!==k&&(a===wd&&"elements"===b?f instanceof y&&$i(f,function(a){aj(k,a)}):a===xd&&"elements"===b&&f instanceof y&&$i(f,function(a){dj(k,a)}),k.Ic(a,b,c,d,f,g,h))};E.prototype.updateTargetBindings=E.prototype.Qb=function(a){y.prototype.Qb.call(this,a);if(null!==this.data){a=this.xa.n;for(var b=a.length,c=0;c<b;c++){var d=a[c];d instanceof y&&$i(d,function(a){null!==a.data&&a.Qb()})}}};
  E.prototype.updateModelDataReferences=function(){var a=this.data;if(null!==a&&!(this instanceof Je)){var b=this.h;if(null!==b){var c=b.ba;if(c instanceof P){var d=c.Rm(a),b=b.GI(d),f=this.gb;b!==f&&(b=null!==f?c.Hb(f.data):void 0,f=c.dn,"function"===typeof f?f(a,b):a[f]=b,c.wx(a,d))}}}};t.A(E,{bw:"adornments"},function(){return null===this.ki?t.ag:this.ki.kF});E.prototype.findAdornment=E.prototype.bp=function(a){e&&t.i(a,"string",E,"findAdornment:category");var b=this.ki;return null===b?null:b.za(a)};
  E.prototype.addAdornment=E.prototype.Vk=function(a,b){if(null!==b){e&&(t.i(a,"string",E,"addAdornment:category"),t.l(b,Je,E,"addAdornment:ad"));var c=null,d=this.ki;null!==d&&(c=d.za(a));if(c!==b){if(null!==c){var f=c.h;null!==f&&f.remove(c)}null===d&&(this.ki=d=new ja("string",Je));b.sh!==a&&(b.Zc=a);d.add(a,b);c=this.h;null!==c&&(c.add(b),b.data=this.data)}}};
  E.prototype.removeAdornment=E.prototype.ul=function(a){e&&t.i(a,"string",E,"removeAdornment:category");var b=this.ki;if(null!==b){var c=b.za(a);if(null!==c){var d=c.h;null!==d&&d.remove(c)}b.remove(a);0===b.count&&(this.ki=null)}};E.prototype.clearAdornments=E.prototype.Pf=function(){var a=this.ki;if(null!==a){for(var b=t.Cb(),a=a.k;a.next();)b.push(a.key);for(var a=b.length,c=0;c<a;c++)this.ul(b[c]);t.ya(b)}};
  E.prototype.updateAdornments=function(){var a=this.h;if(null!==a){um(this,a);for(var a=a.wb.ef.n,b=a.length,c=0;c<b;c++){var d=a[c];d.isEnabled&&d.updateAdornments(this)}for(a=this.bw;a.next();)a.value.fa()}};
  function um(a,b){if(a.eb&&a.iG){var c=a.Nt;if(null===c||!(a.pa.N()&&a.Qa()&&c.ol()&&c.pa.N()))return;var d=a.bp("Selection");if(null===d){d=a.jG;null===d&&(a instanceof V?d=b.sF:a instanceof E&&(d=a instanceof T?b.OE:b.HF));if(!(d instanceof Je))return;Le(d);d=d.copy();if(!(d instanceof Je))return;d.Zc="Selection";d.oc=c}if(null!==d){var f=d.placeholder;if(null!==f){var g=c.dk(),h=0;c instanceof W&&(h=c.fb);var k=t.Al();k.p((c.Ra.width+h)*g,(c.Ra.height+h)*g);f.Ca=k;t.bk(k)}d.angle=c.gl();d.type!==
  vg?(f=t.K(),d.location=c.qb(Eb,f),t.B(f)):d.fa();a.Vk("Selection",d);return}}a.ul("Selection")}t.A(E,{layer:"layer"},function(){return this.lo});t.A(E,{h:"diagram"},function(){var a=this.lo;return null!==a?a.h:null});t.g(E,"layerName",E.prototype.af);
  t.defineProperty(E,{af:"layerName"},function(){return this.Jk},function(a){var b=this.Jk;if(b!==a){t.i(a,"string",E,"layerName");var c=this.h;if(null===c||null!==c.bt(a)&&!c.un)if(this.Jk=a,this.j("layerName",b,a),b=this.layer,null!==b&&b.name!==a&&(c=b.h,null!==c&&(a=c.bt(a),null!==a&&a!==b))){var d=b.Xe(-1,this,!0);0<=d&&c.Ic(xd,"parts",b,this,null,d,!0);d=a.np(99999999,this,!0);0<=d&&c.Ic(wd,"parts",a,null,this,!0,d);d=this.tp;if(null!==d){var f=c.Na;c.Na=!0;d(this,b,a);c.Na=f}}}});
  t.g(E,"layerChanged",E.prototype.tp);t.defineProperty(E,{tp:"layerChanged"},function(){return this.jr},function(a){var b=this.jr;b!==a&&(null!==a&&t.i(a,"function",E,"layerChanged"),this.jr=a,this.j("layerChanged",b,a))});t.A(E,{yc:"isTemporary"},function(){return null!==this.lo?this.lo.yc:!1});function vm(a){var b=a.h;null!==b&&(xi(b),0!==(a.W&16384)!==!0&&(a.W|=16384,b.te()))}function Qh(a){0!==(a.W&16384)!==!1&&(a.updateAdornments(),a.W&=-16385,a=a.h,null!==a&&(a.ve=!0))}t.g(E,"location",E.prototype.location);
  t.defineProperty(E,{location:"location"},function(){return this.Yg},function(a){var b=this.Yg;if(!(b.M(a)||this instanceof V)){e&&t.l(a,w,E,"location");a=a.Z();var c=this.h;this.Yg=a;if(!1===Pi(this)){var d=this.Ma,f=a.x-b.x,g=a.y-b.y,h=d.copy();d.p(h.x+f,h.y+g);Lk(this,!0);!d.M(h)&&c&&this.j("position",h,d)}this.j("location",b,a)}});function Lk(a,b){if(!1===Qi(a)){var c=a.h;null!==c&&(a.Qa()&&c.fg.add(a),a instanceof S&&!c.ja.sb&&a.wf(),b||c.te());wm(a,!0)}}
  function xm(a){if(!1!==Qi(a)){var b=a.position,c=a.location;c.N()&&b.N()||(ym(a,b,c),mk(a));var b=a.Ma,c=a.cc,d=c.copy();c.La();c.x=b.x;c.y=b.y;c.freeze();nk(a,d,c);wm(a,!1)}}t.A(E,{kc:"locationObject"},function(){if(null===this.Mk){var a=this.ax;void 0!==a&&null!==a&&""!==a?(a=this.oe(a),this.Mk=null!==a?a:this):this.Mk=this instanceof Je&&this.da!==vg&&null!==this.Jb?this.Jb:this}return this.Mk.visible?this.Mk:this});t.g(E,"minLocation",E.prototype.AF);
  t.defineProperty(E,{AF:"minLocation"},function(){return this.Ar},function(a){var b=this.Ar;b.M(a)||(e&&t.l(a,w,E,"minLocation"),this.Ar=a=a.Z(),this.j("minLocation",b,a))});t.g(E,"maxLocation",E.prototype.uF);t.defineProperty(E,{uF:"maxLocation"},function(){return this.tr},function(a){var b=this.tr;b.M(a)||(e&&t.l(a,w,E,"maxLocation"),this.tr=a=a.Z(),this.j("maxLocation",b,a))});t.g(E,"locationObjectName",E.prototype.ax);
  t.defineProperty(E,{ax:"locationObjectName"},function(){return this.qr},function(a){var b=this.qr;b!==a&&(e&&t.i(a,"string",E,"locationObjectName"),this.qr=a,this.Mk=null,Dk(this),this.j("locationObjectName",b,a))});t.g(E,"locationSpot",E.prototype.bf);
  t.defineProperty(E,{bf:"locationSpot"},function(){return this.rr},function(a){var b=this.rr;b.M(a)||(e&&(t.l(a,I,E,"locationSpot"),a.vd()||t.m("Part.locationSpot must be a specific Spot value, not: "+a)),this.rr=a=a.Z(),Dk(this),this.j("locationSpot",b,a))});E.prototype.move=E.prototype.move=function(a){this.position=a};E.prototype.moveTo=E.prototype.moveTo=function(a,b){var c=t.lc(a,b);this.move(c);t.B(c)};
  E.prototype.isVisible=E.prototype.Qa=function(){if(!this.visible)return!1;var a=this.layer;if(null!==a&&!a.visible)return!1;a=this.gb;if(!(null===a||a.Yd&&a.Qa()))return!1;if(this instanceof S){a=this.eA();if(null!==a&&!a.Qc)return!1;a=this.$d;if(null!==a)return a.Qa()}else if(this instanceof V){var b=!0,c=this.h;null!==c&&(b=c.pd);c=this.aa;if(null!==c){if(this.Fc&&b&&!c.Qc)return!1;c=c.findVisibleNode();if(null===c||c===a)return!1}c=this.ca;if(null!==c){if(this.Fc&&!b&&!c.Qc)return!1;b=c.findVisibleNode();
  if(null===b||b===a)return!1}}return!0};E.prototype.df=function(a){a?(this.J(4),vm(this),this.ka(),a=this.h,null!==a&&a.fg.add(this)):(this.J(8),this.Pf())};
  E.prototype.findObject=E.prototype.oe=function(a){if(this.name===a)return this;null===this.Gj&&(this.Gj={});var b=this.Gj;if(void 0!==b[a])return b[a];for(var c=this.xa.n,d=c.length,f=0;f<d;f++){var g=c[f];if(g.name===a)return b[a]=g;if(g instanceof y)if(null===g.yi&&null===g.hg){if(g=g.oe(a),null!==g)return b[a]=g}else if(Vl(g)&&(g=g.xa.$a(),null!==g&&g.name===a))return b[a]=g}return b[a]=null};
  function zm(a,b,c,d){void 0===d&&(d=new w);c.Ge()&&(c=Kb);var f=b.Ra;d.p(f.width*c.x+c.offsetX,f.height*c.y+c.offsetY);if(null===b||b===a)return d;b.transform.Ta(d);for(b=b.ia;null!==b&&b!==a;)b.transform.Ta(d),b=b.ia;a.Lk.Ta(d);d.offset(-a.Wc.x,-a.Wc.y);return d}E.prototype.ensureBounds=E.prototype.sf=function(){hh(this,Infinity,Infinity);this.Lc()};
  function Th(a,b,c){c=void 0===c?a.nH:c;var d;isNaN(a.Dj)&&(a.Dj=Wl(a));d=a.Dj;var f=2*d;if(!a.gj)return c.p(b.x-1-d,b.y-1-d,b.width+2+f,b.height+2+f),c;d=b.x;var f=b.y,g=b.width;b=b.height;var h=a.shadowBlur;a=a.qG;g+=h;b+=h;d-=h/2;f-=h/2;0<a.x?g+=a.x:(d+=a.x,g-=a.x);0<a.y?b+=a.y:(f+=a.y,b-=a.y);c.p(d-1,f-1,g+2,b+2);return c}aa=E.prototype;
  aa.Lc=function(){mk(this);if(!1===Pi(this))xm(this);else{var a=t.Gf();a.assign(this.cc);Ak(this);this.cc.La();var b=Ph(this);this.Uj(0,0,this.Wc.width,this.Wc.height);var c=this.position;ym(this,c,this.location);var d=this.cc;d.x=c.x;d.y=c.y;d.freeze();mk(this);nk(this,a,d);a.M(d)?this.Df(b):!this.Ld()||H.I(a.width,d.width)&&H.I(a.height,d.height)||0<=this.DC&&this.J(16);t.hc(a);wm(this,!1)}};
  aa.oG=function(a,b){if(!a.N()||this instanceof V)return!1;if(this.h&&!(this instanceof Je)){var c=this.h.li;c.sd&&Fh(c,this,b.copy(),a.copy())}var c=this.Yg,d=c.copy();!1===Pi(this)?(c.p(c.x+(a.x-this.Ma.x),c.y+(a.y-this.Ma.y)),this.Ma=a,Lk(this,!0),mk(this),xm(this),c.M(d)||this.j("location",d,c)):(this.Ma=a,c.p(NaN,NaN));return!0};aa.pG=function(a,b){var c=this.Yg;!1===Pi(this)?(this.Yg.p(c.x+a-this.Ma.x,c.y+b-this.Ma.y),this.Ma.p(a,b),Lk(this,!1),mk(this)):(c.p(NaN,NaN),this.Ma.p(a,b))};
  function ym(a,b,c){var d=NaN,f=NaN,g=t.K(),h=a.bf,k=a.kc;h.Ge()&&t.m("determineOffset: Part's locationSpot must be real: "+h.toString());var l=k.Ra,d=0;k.fb&&(d=k.bh);g.Pt(0,0,l.width+d,l.height+d,h);if(k!==a)for(k.fb&&g.offset(-d/2,-d/2),k.transform.Ta(g),h=k.ia;null!==h&&h!==a;)h.transform.Ta(g),h=h.ia;a.Lk.Ta(g);g.offset(-a.Wc.x,-a.Wc.y);h=a.h;c.N()?(k=b.x,l=b.y,d=c.x-g.x,f=c.y-g.y,b.p(d,f),c=!1,null!==h&&(d=h.li,d.xj?c=!0:!d.sd||a instanceof Je||Fh(d,a,new w(k,l),b),c||b.x===k&&b.y===l||(d=h.Wa,
  h.Wa=!0,a.j("position",new w(k,l),b),h.Wa=d))):b.N()&&(d=b.x,f=b.y,b=c.copy(),c.p(d+g.x,f+g.y),c.M(b)||null===h||(d=h.Wa,h.Wa=!0,a.j("location",b,c),h.Wa=d));t.B(g)}function bj(a,b,c){sk(a,!1);a instanceof S&&Sj(c,a);a.layer.yc||b||c.Oc();b=a.cc;var d=c.xb;d.N()?(Ph(a)?eb(b,d)||(a.Df(!1),vm(a)):b.Tf(d)&&a.Df(!0),a.updateAdornments()):c.Hk=!0}aa.nl=function(){return!0};
  function Rh(a,b){if(a.visible){var c=a.cc;if(0!==c.width&&0!==c.height&&!isNaN(c.x)&&!isNaN(c.y)){var d=a.transform,f=a.ia,g=a.jk;g.reset();null!==f&&(f.Hf()?g.multiply(f.me):null!==f.ia&&g.multiply(f.ia.me));g.multiply(a.md);null!==a.tc&&(xk(a,b,a.tc,!0,!0),b.fillRect(c.x,c.y,c.width,c.height));null===a.tc&&null===a.Lb&&(b.fillStyle="rgba(0,0,0,0.4)",b.fillRect(c.x,c.y,c.width,c.height));null!==a.Lb&&(d.pt()||b.transform(d.m11,d.m12,d.m21,d.m22,d.dx,d.dy),f=a.Ra,c=f.width,f=f.height,xk(a,b,a.Lb,
  !0),b.fillRect(0,0,c+0,f+0),d.pt()||(c=1/(d.m11*d.m22-d.m12*d.m21),b.transform(d.m22*c,-d.m12*c,-d.m21*c,d.m11*c,c*(d.m21*d.dy-d.m22*d.dx),c*(d.m12*d.dx-d.m11*d.dy))))}}}aa.Ld=function(){return!0};t.g(E,"category",E.prototype.Zc);
  t.defineProperty(E,{Zc:"category"},function(){return this.sh},function(a){var b=this.sh;if(b!==a){t.i(a,"string",E,"category");this.sh=a;this.j("category",b,a);var c=this.h,d=this.data;if(null!==c&&null!==d){var f=c.ba;this instanceof V?(f instanceof P?f.mG(d,a):f instanceof Kd&&f.PJ(d,a),c=c.findTemplateForLinkData(d,a),c instanceof V&&(Le(c),c=c.copy(),c instanceof V&&Am(this,c,b,a))):this instanceof Je||(null!==f&&f.tx(d,a),c=c.findTemplateForNodeData(d,a),c instanceof E&&(Le(c),c=c.copy(),c instanceof
  E&&!(c instanceof V)&&(c.location=this.location,Am(this,c,b,a))))}this instanceof Je&&(a=this.Xh,null!==a&&(c=a.ki,null!==c&&c.remove(b),a.Vk(this.sh,this)))}});
  function Am(a,b,c,d){b.constructor===a.constructor||t.SG||(t.SG=!0,t.trace('Should not change the class of the Part when changing category from "'+c+'" to "'+d+'"'),t.trace("  Old class: "+t.xg(a)+", new class: "+t.xg(b)+", part: "+a.toString()));a.Pf();var f=a.data;c=a.af;var g=a.eb,h=a.zg,k=!0,l=!0,m=!1;a instanceof S&&(k=a.di,l=a.Qc,m=a.pn);b.Zh(a);b.cloneProtected(a);a.sh=d;a.fa();a.ka();b=a.h;d=!0;null!==b&&(d=b.Wa,b.Wa=!0);a.Ml=f;null!==f&&a.Qb();null!==b&&(b.Wa=d);f=a.af;f!==c&&(a.Jk=c,a.af=
  f);a instanceof S&&(a.di=k,a.Qc=l,a.pn=m,a.Ld()&&a.J(64));a.eb=g;a.zg=h}E.prototype.canCopy=function(){if(!this.hE)return!1;var a=this.layer;if(null===a)return!0;if(!a.Si)return!1;a=a.h;return null===a?!0:a.Si?!0:!1};E.prototype.canDelete=function(){if(!this.qE)return!1;var a=this.layer;if(null===a)return!0;if(!a.Yk)return!1;a=a.h;return null===a?!0:a.Yk?!0:!1};
  E.prototype.canEdit=function(){if(!this.AG)return!1;var a=this.layer;if(null===a)return!0;if(!a.Qo)return!1;a=a.h;return null===a?!0:a.Qo?!0:!1};E.prototype.canGroup=function(){if(!this.PE)return!1;var a=this.layer;if(null===a)return!0;if(!a.Mo)return!1;a=a.h;return null===a?!0:a.Mo?!0:!1};E.prototype.canMove=function(){if(!this.DF)return!1;var a=this.layer;if(null===a)return!0;if(!a.Sj)return!1;a=a.h;return null===a?!0:a.Sj?!0:!1};
  E.prototype.canReshape=function(){if(!this.TF)return!1;var a=this.layer;if(null===a)return!0;if(!a.No)return!1;a=a.h;return null===a?!0:a.No?!0:!1};E.prototype.canResize=function(){if(!this.UF)return!1;var a=this.layer;if(null===a)return!0;if(!a.Oo)return!1;a=a.h;return null===a?!0:a.Oo?!0:!1};E.prototype.canRotate=function(){if(!this.$F)return!1;var a=this.layer;if(null===a)return!0;if(!a.Po)return!1;a=a.h;return null===a?!0:a.Po?!0:!1};
  E.prototype.canSelect=function(){if(!this.vl)return!1;var a=this.layer;if(null===a)return!0;if(!a.Pe)return!1;a=a.h;return null===a?!0:a.Pe?!0:!1};t.g(E,"copyable",E.prototype.hE);t.defineProperty(E,{hE:"copyable"},function(){return 0!==(this.W&1)},function(a){var b=0!==(this.W&1);b!==a&&(e&&t.i(a,"boolean",E,"copyable"),this.W^=1,this.j("copyable",b,a))});t.g(E,"deletable",E.prototype.qE);
  t.defineProperty(E,{qE:"deletable"},function(){return 0!==(this.W&2)},function(a){var b=0!==(this.W&2);b!==a&&(e&&t.i(a,"boolean",E,"deletable"),this.W^=2,this.j("deletable",b,a))});t.g(E,"textEditable",E.prototype.AG);t.defineProperty(E,{AG:"textEditable"},function(){return 0!==(this.W&4)},function(a){var b=0!==(this.W&4);b!==a&&(e&&t.i(a,"boolean",E,"textEditable"),this.W^=4,this.j("textEditable",b,a),this.updateAdornments())});t.g(E,"groupable",E.prototype.PE);
  t.defineProperty(E,{PE:"groupable"},function(){return 0!==(this.W&8)},function(a){var b=0!==(this.W&8);b!==a&&(e&&t.i(a,"boolean",E,"groupable"),this.W^=8,this.j("groupable",b,a))});t.g(E,"movable",E.prototype.DF);t.defineProperty(E,{DF:"movable"},function(){return 0!==(this.W&16)},function(a){var b=0!==(this.W&16);b!==a&&(e&&t.i(a,"boolean",E,"movable"),this.W^=16,this.j("movable",b,a))});t.g(E,"selectionAdorned",E.prototype.iG);
  t.defineProperty(E,{iG:"selectionAdorned"},function(){return 0!==(this.W&32)},function(a){var b=0!==(this.W&32);b!==a&&(e&&t.i(a,"boolean",E,"selectionAdorned"),this.W^=32,this.j("selectionAdorned",b,a),this.updateAdornments())});t.g(E,"isInDocumentBounds",E.prototype.vA);t.defineProperty(E,{vA:"isInDocumentBounds"},function(){return 0!==(this.W&64)},function(a){var b=0!==(this.W&64);b!==a&&(e&&t.i(a,"boolean",E,"isInDocumentBounds"),this.W^=64,this.j("isInDocumentBounds",b,a))});
  t.g(E,"isLayoutPositioned",E.prototype.xA);t.defineProperty(E,{xA:"isLayoutPositioned"},function(){return 0!==(this.W&128)},function(a){var b=0!==(this.W&128);b!==a&&(e&&t.i(a,"boolean",E,"isLayoutPositioned"),this.W^=128,this.j("isLayoutPositioned",b,a),this.J(a?4:8))});t.g(E,"selectable",E.prototype.vl);t.defineProperty(E,{vl:"selectable"},function(){return 0!==(this.W&256)},function(a){var b=0!==(this.W&256);b!==a&&(e&&t.i(a,"boolean",E,"selectable"),this.W^=256,this.j("selectable",b,a),this.updateAdornments())});
  t.g(E,"reshapable",E.prototype.TF);t.defineProperty(E,{TF:"reshapable"},function(){return 0!==(this.W&512)},function(a){var b=0!==(this.W&512);b!==a&&(e&&t.i(a,"boolean",E,"reshapable"),this.W^=512,this.j("reshapable",b,a),this.updateAdornments())});t.g(E,"resizable",E.prototype.UF);t.defineProperty(E,{UF:"resizable"},function(){return 0!==(this.W&1024)},function(a){var b=0!==(this.W&1024);b!==a&&(e&&t.i(a,"boolean",E,"resizable"),this.W^=1024,this.j("resizable",b,a),this.updateAdornments())});
  t.g(E,"rotatable",E.prototype.$F);t.defineProperty(E,{$F:"rotatable"},function(){return 0!==(this.W&2048)},function(a){var b=0!==(this.W&2048);b!==a&&(e&&t.i(a,"boolean",E,"rotatable"),this.W^=2048,this.j("rotatable",b,a),this.updateAdornments())});t.g(E,"isSelected",E.prototype.eb);
  t.defineProperty(E,{eb:"isSelected"},function(){return 0!==(this.W&4096)},function(a){var b=0!==(this.W&4096);if(b!==a){e&&t.i(a,"boolean",E,"isSelected");var c=this.h;if(!a||this.canSelect()&&!(null!==c&&c.selection.count>=c.vF)){this.W^=4096;var d=!1;if(null!==c){d=c.Wa;c.Wa=!0;var f=c.selection;f.La();a?f.add(this):f.remove(this);f.freeze()}this.j("isSelected",b,a);vm(this);a=this.kG;null!==a&&a(this);null!==c&&(c.te(),c.Wa=d)}}});t.g(E,"isHighlighted",E.prototype.zg);
  t.defineProperty(E,{zg:"isHighlighted"},function(){return 0!==(this.W&524288)},function(a){var b=0!==(this.W&524288);if(b!==a){e&&t.i(a,"boolean",E,"isHighlighted");this.W^=524288;var c=this.h;null!==c&&(c=c.Lw,c.La(),a?c.add(this):c.remove(this),c.freeze());this.j("isHighlighted",b,a);this.ka()}});t.g(E,"isShadowed",E.prototype.gj);
  t.defineProperty(E,{gj:"isShadowed"},function(){return 0!==(this.W&8192)},function(a){var b=0!==(this.W&8192);b!==a&&(e&&t.i(a,"boolean",E,"isShadowed"),this.W^=8192,this.j("isShadowed",b,a),this.ka())});function Qi(a){return 0!==(a.W&32768)}function wm(a,b){a.W=b?a.W|32768:a.W&-32769}function sk(a,b){a.W=b?a.W|65536:a.W&-65537}function Ph(a){return 0!==(a.W&131072)}E.prototype.Df=function(a){this.W=a?this.W|131072:this.W&-131073};t.g(E,"isAnimated",E.prototype.pA);
  t.defineProperty(E,{pA:"isAnimated"},function(){return 0!==(this.W&262144)},function(a){var b=0!==(this.W&262144);b!==a&&(e&&t.i(a,"boolean",E,"isAnimated"),this.W^=262144,this.j("isAnimated",b,a))});t.g(E,"selectionObjectName",E.prototype.sx);t.defineProperty(E,{sx:"selectionObjectName"},function(){return this.ks},function(a){var b=this.ks;b!==a&&(e&&t.i(a,"string",E,"selectionObjectName"),this.ks=a,this.rm=null,this.j("selectionObjectName",b,a))});t.g(E,"selectionAdornmentTemplate",E.prototype.jG);
  t.defineProperty(E,{jG:"selectionAdornmentTemplate"},function(){return this.is},function(a){var b=this.is;b!==a&&(e&&t.l(a,Je,E,"selectionAdornmentTemplate"),this instanceof V&&(a.type=vg),this.is=a,this.j("selectionAdornmentTemplate",b,a))});t.A(E,{Nt:"selectionObject"},function(){if(null===this.rm){var a=this.sx;null!==a&&""!==a?(a=this.oe(a),this.rm=null!==a?a:this):this instanceof V?(a=this.path,this.rm=null!==a?a:this):this.rm=this}return this.rm});t.g(E,"selectionChanged",E.prototype.kG);
  t.defineProperty(E,{kG:"selectionChanged"},function(){return this.js},function(a){var b=this.js;b!==a&&(null!==a&&t.i(a,"function",E,"selectionChanged"),this.js=a,this.j("selectionChanged",b,a))});t.g(E,"resizeAdornmentTemplate",E.prototype.VF);t.defineProperty(E,{VF:"resizeAdornmentTemplate"},function(){return this.Wr},function(a){var b=this.Wr;b!==a&&(e&&t.l(a,Je,E,"resizeAdornmentTemplate"),this.Wr=a,this.j("resizeAdornmentTemplate",b,a))});t.g(E,"resizeObjectName",E.prototype.YF);
  t.defineProperty(E,{YF:"resizeObjectName"},function(){return this.Yr},function(a){var b=this.Yr;b!==a&&(e&&t.i(a,"string",E,"resizeObjectName"),this.Yr=a,this.vo=null,this.j("resizeObjectName",b,a))});t.A(E,{XF:"resizeObject"},function(){if(null===this.vo){var a=this.YF;null!==a&&""!==a?(a=this.oe(a),this.vo=null!==a?a:this):this.vo=this}return this.vo});t.g(E,"resizeCellSize",E.prototype.WF);
  t.defineProperty(E,{WF:"resizeCellSize"},function(){return this.Xr},function(a){var b=this.Xr;b.M(a)||(e&&t.l(a,ga,E,"resizeCellSize"),this.Xr=a=a.Z(),this.j("resizeCellSize",b,a))});t.g(E,"rotateAdornmentTemplate",E.prototype.aG);t.defineProperty(E,{aG:"rotateAdornmentTemplate"},function(){return this.Zr},function(a){var b=this.Zr;b!==a&&(e&&t.l(a,Je,E,"rotateAdornmentTemplate"),this.Zr=a,this.j("rotateAdornmentTemplate",b,a))});t.g(E,"rotateObjectName",E.prototype.cG);
  t.defineProperty(E,{cG:"rotateObjectName"},function(){return this.$r},function(a){var b=this.$r;b!==a&&(e&&t.i(a,"string",E,"rotateObjectName"),this.$r=a,this.wo=null,this.j("rotateObjectName",b,a))});t.A(E,{bG:"rotateObject"},function(){if(null===this.wo){var a=this.cG;null!==a&&""!==a?(a=this.oe(a),this.wo=null!==a?a:this):this.wo=this}return this.wo});t.g(E,"text",E.prototype.text);
  t.defineProperty(E,{text:"text"},function(){return this.le},function(a){var b=this.le;b!==a&&(e&&t.i(a,"string",E,"text"),this.le=a,this.j("text",b,a))});t.g(E,"containingGroup",E.prototype.gb);
  t.defineProperty(E,{gb:"containingGroup"},function(){return this.yk},function(a){if(this.Ld()){var b=this.yk;if(b!==a){e&&null!==a&&t.l(a,T,E,"containingGroup");null===a||this!==a&&!a.ml(this)||(this===a&&t.m("Cannot make a Group a member of itself: "+this.toString()),t.m("Cannot make a Group indirectly contain itself: "+this.toString()+" already contains "+a.toString()));this.J(ej);var c=this.h;null!==b?Bm(b,this):this instanceof T&&null!==c&&c.Tk.remove(this);this.yk=a;null!==a?Cm(a,this):this instanceof
  T&&null!==c&&c.Tk.add(this);this.J(Zi);if(null!==c){var d=this.data,f=c.ba;null!==d&&f instanceof P&&f.wx(d,f.Hb(null!==a?a.data:null))}d=this.Xz;null!==d&&(f=!0,null!==c&&(f=c.Na,c.Na=!0),d(this,b,a),null!==c&&(c.Na=f));if(this instanceof T)for(c=new C(E),Ie(c,this,!0,0),c=c.k;c.next();)if(d=c.value,d instanceof S)for(d=d.qe;d.next();)f=d.value,Gj(f);if(this instanceof S)for(d=this.qe;d.next();)f=d.value,Gj(f);this.j("containingGroup",b,a);null!==a&&a.yx()}}else t.m("cannot set the Part.containingGroup of a Link or Adornment")});
  function qk(a){a=a.gb;null!==a&&(a.fa(),null!==a.Jb&&a.Jb.fa(),a.wf())}E.prototype.kt=function(a){var b=this.yk;null===b||a||Cm(b,this)};E.prototype.lt=function(a){var b=this.yk;null===b||a||Bm(b,this)};E.prototype.Mm=function(){var a=this.data;if(null!==a){var b=this.h;null!==b&&(b=b.ba,null!==b&&b.nx(a))}};t.g(E,"containingGroupChanged",E.prototype.Xz);
  t.defineProperty(E,{Xz:"containingGroupChanged"},function(){return this.xq},function(a){var b=this.xq;b!==a&&(null!==a&&t.i(a,"function",E,"containingGroupChanged"),this.xq=a,this.j("containingGroupChanged",b,a))});E.prototype.findTopLevelPart=function(){return Dm(this,this)};function Dm(a,b){var c=b.gb;return null!==c?Dm(a,c):b instanceof S&&(c=b.$d,null!==c)?Dm(a,c):b}t.A(E,{sp:"isTopLevel"},function(){return null!==this.gb||this instanceof S&&this.ci?!1:!0});
  E.prototype.isMemberOf=E.prototype.ml=function(a){return a instanceof T?Em(this,this,a):!1};function Em(a,b,c){if(b===c||null===c)return!1;var d=b.gb;return null===d||d!==c&&!Em(a,d,c)?b instanceof S&&(b=b.$d,null!==b)?Em(a,b,c):!1:!0}E.prototype.findCommonContainingGroup=E.prototype.FI=function(a){return Fm(this,this,a)};
  function Fm(a,b,c){if(null===b||null===c)return null;var d=b.gb;if(null===d)return null;if(b===c)return d;var f=c.gb;return null===f?null:d===f?f:Em(a,c,d)?d:Em(a,b,f)?f:Fm(a,d,f)}t.g(E,"layoutConditions",E.prototype.nF);t.defineProperty(E,{nF:"layoutConditions"},function(){return this.kr},function(a){var b=this.kr;b!==a&&(e&&t.i(a,"number",E,"layoutConditions"),this.kr=a,this.j("layoutConditions",b,a))});
  E.prototype.canLayout=function(){if(!this.xA||!this.Qa())return!1;var a=this.layer;return null!==a&&a.yc||this instanceof S&&this.ci?!1:!0};E.prototype.invalidateLayout=E.prototype.J=function(a){void 0===a&&(a=16777215);var b;this.xA&&0!==(a&this.nF)?(b=this.layer,null!==b&&b.yc||this instanceof S&&this.ci?b=!1:(b=this.h,b=null!==b&&b.ja.sb?!1:!0)):b=!1;if(b)if(b=this.yk,null!==b){var c=b.jc;null!==c?c.J():b.J(a)}else a=this.h,null!==a&&(c=a.jc,null!==c&&c.J())};
  function cj(a){if(!a.Qa())return!1;a=a.layer;return null!==a&&a.yc?!1:!0}t.g(E,"dragComputation",E.prototype.bA);t.defineProperty(E,{bA:"dragComputation"},function(){return this.Hq},function(a){var b=this.Hq;b!==a&&(null!==a&&t.i(a,"function",E,"dragComputation"),this.Hq=a,this.j("dragComputation",b,a))});t.g(E,"shadowOffset",E.prototype.qG);
  t.defineProperty(E,{qG:"shadowOffset"},function(){return this.um},function(a){var b=this.um;b.M(a)||(e&&t.l(a,w,E,"shadowOffset"),this.um=a=a.Z(),this.ka(),this.j("shadowOffset",b,a))});t.g(E,"shadowColor",E.prototype.shadowColor);t.defineProperty(E,{shadowColor:"shadowColor"},function(){return this.tm},function(a){var b=this.tm;b!==a&&(e&&t.i(a,"string",E,"shadowColor"),this.tm=a,this.ka(),this.j("shadowColor",b,a))});t.g(E,"shadowBlur",E.prototype.shadowBlur);
  t.defineProperty(E,{shadowBlur:"shadowBlur"},function(){return this.sm},function(a){var b=this.sm;b!==a&&(e&&t.i(a,"number",E,"shadowBlur"),this.sm=a,this.ka(),this.j("shadowBlur",b,a))});function Je(a){0===arguments.length?E.call(this,Zg):E.call(this,a);this.af="Adornment";this.ib=null;this.W&=-257;this.Yg=new w(NaN,NaN);this.mi=new B(x);this.Jb=null}t.ga("Adornment",Je);t.Ka(Je,E);aa=Je.prototype;aa.toString=function(){var a=this.Xh;return"Adornment("+this.Zc+")"+(null!==a?a.toString():"")};
  aa.vj=function(){return this.ib&&this.ib.S instanceof V?this.ib.S.vj():null};aa.Rq=function(){return null};aa.bx=function(){var a=this.oc.S,b=this.oc;if(a instanceof V&&b instanceof W){var c=a.path,b=c.Oa;a.bx();for(var b=c.Oa,a=this.xa,c=a.length,d=0;d<c;d++){var f=a.n[d];f.fj&&f instanceof W&&(f.Oa=b)}}};aa.Sy=function(){var a=this.Xh;return a instanceof V?a.Cc:null};t.A(Je,{placeholder:"placeholder"},function(){return this.Jb});t.g(Je,"adornedObject",Je.prototype.oc);
  t.defineProperty(Je,{oc:"adornedObject"},function(){return this.ib},function(a){e&&null!==a&&t.l(a,Q,E,"adornedObject:val");var b=this.Xh,c=null;null!==a&&(c=a.S);null===b||null!==a&&b===c||b.ul(this.Zc);this.ib=a;c&&c.Vk(this.Zc,this)});t.A(Je,{Xh:"adornedPart"},function(){var a=this.ib;return null!==a?a.S:null});Je.prototype.nl=function(){var a=this.ib;if(null===a)return!0;a=a.S;return null===a||!Pi(a)};Je.prototype.Ld=function(){return!1};t.A(Je,{gb:"containingGroup"},function(){return null});
  Je.prototype.fn=function(a,b,c,d,f,g,h){if(a===wd&&"elements"===b)if(f instanceof Tg)null===this.Jb?this.Jb=f:this.Jb!==f&&t.m("Cannot insert a second Placeholder into the visual tree of an Adornment.");else{if(f instanceof y){var k=f.at(function(a){return a instanceof Tg});k instanceof Tg&&(null===this.Jb?this.Jb=k:this.Jb!==k&&t.m("Cannot insert a second Placeholder into the visual tree of an Adornment."))}}else a===xd&&"elements"===b&&null!==this.Jb&&(d===this.Jb?this.Jb=null:d instanceof y&&this.Jb.ej(d)&&
  (this.Jb=null));E.prototype.fn.call(this,a,b,c,d,f,g,h)};Je.prototype.updateAdornments=function(){};Je.prototype.Mm=function(){};function S(a){0===arguments.length?E.call(this,Zg):E.call(this,a);this.mc=new B(V);this.io=this.Kk=this.nr=this.mr=null;this.dr=!0;this.Gs=!1;this.Bs=null;this.qq=this.er=!0;this.rq=H.fH;this.Rd=this.rh=null;this.Qr=Gm;this.Vh=!1}t.ga("Node",S);t.Ka(S,E);
  S.prototype.cloneProtected=function(a){E.prototype.cloneProtected.call(this,a);a.mr=this.mr;a.nr=this.nr;a.Kk=this.Kk;a.dr=this.dr;a.Gs=this.Gs;a.Bs=this.Bs;a.er=this.er;a.qq=this.qq;a.rq=this.rq.Z();a.Qr=this.Qr};S.prototype.Zh=function(a){E.prototype.Zh.call(this,a);a.wf();a.rh=this.rh;a.Rd=null};var Hm;S.DirectionDefault=Hm=t.w(S,"DirectionDefault",0);S.DirectionAbsolute=t.w(S,"DirectionAbsolute",1);var Im;S.DirectionRotatedNode=Im=t.w(S,"DirectionRotatedNode",2);var ek;
  S.DirectionRotatedNodeOrthogonal=ek=t.w(S,"DirectionRotatedNodeOrthogonal",3);S.SpreadingNone=t.w(S,"SpreadingNone",10);var Gm;S.SpreadingEvenly=Gm=t.w(S,"SpreadingEvenly",11);var Jm;S.SpreadingPacked=Jm=t.w(S,"SpreadingPacked",12);function Km(a,b){null!==b&&(null===a.rh&&(a.rh=new C(Lm)),a.rh.add(b))}
  S.prototype.fn=function(a,b,c,d,f,g,h){a===wd&&"elements"===b?this.Rd=null:a===xd&&"elements"===b&&(null===this.h?this.Rd=null:d instanceof Q&&Rl(this,d,function(a,b){Mk(a,b,!0)}));E.prototype.fn.call(this,a,b,c,d,f,g,h)};S.prototype.invalidateConnectedLinks=S.prototype.wf=function(a){void 0===a&&(a=null);for(var b=this.qe;b.next();){var c=b.value;null!==a&&a.contains(c)||(Mm(this,c.ud),Mm(this,c.fe),c.ac())}};function Mm(a,b){if(null!==b){b.Pr=null;var c=a.gb;null===c||c.Yd||Mm(c,c.fl(""))}}
  S.prototype.nl=function(){return!0};t.defineProperty(S,{EJ:"portSpreading"},function(){return this.Qr},function(a){var b=this.Qr;b!==a&&(e&&t.Aa(a,S,S,"portSpreading"),this.Qr=a,this.j("portSpreading",b,a),a=this.h,null!==a&&a.ja.sb||this.wf())});t.g(S,"avoidable",S.prototype.Rz);t.defineProperty(S,{Rz:"avoidable"},function(){return this.qq},function(a){var b=this.qq;if(b!==a){e&&t.i(a,"boolean",S,"avoidable");this.qq=a;var c=this.h;null!==c&&Sj(c,this);this.j("avoidable",b,a)}});
  t.g(S,"avoidableMargin",S.prototype.RD);t.defineProperty(S,{RD:"avoidableMargin"},function(){return this.rq},function(a){"number"===typeof a?a=new ab(a):t.l(a,ab,S,"avoidableMargin");var b=this.rq;if(!b.M(a)){this.rq=a=a.Z();var c=this.h;null!==c&&Sj(c,this);this.j("avoidableMargin",b,a)}});S.prototype.canAvoid=function(){return this.Rz&&!this.ci};S.prototype.getAvoidableRect=function(a){a.set(this.pa);a.aw(this.RD);return a};
  S.prototype.findVisibleNode=function(){for(var a=this;null!==a&&!a.Qa();)a=a.gb;return a};S.prototype.df=function(a){E.prototype.df.call(this,a);for(var b=this.qe;b.next();)b.value.df(a)};t.A(S,{qe:"linksConnected"},function(){return this.mc.k});S.prototype.findLinksConnected=S.prototype.AE=function(a){void 0===a&&(a=null);if(null===a)return this.mc.k;e&&t.i(a,"string",S,"findLinksConnected:pid");var b=new Ba(this.mc),c=this;b.sl=function(b){return b.aa===c&&b.Rf===a||b.ca===c&&b.Og===a};return b};
  S.prototype.findLinksOutOf=S.prototype.Cw=function(a){void 0===a&&(a=null);e&&null!==a&&t.i(a,"string",S,"findLinksOutOf:pid");var b=new Ba(this.mc),c=this;b.sl=function(b){return b.aa!==c?!1:null===a?!0:b.Rf===a};return b};S.prototype.findLinksInto=S.prototype.wg=function(a){void 0===a&&(a=null);e&&null!==a&&t.i(a,"string",S,"findLinksInto:pid");var b=new Ba(this.mc),c=this;b.sl=function(b){return b.ca!==c?!1:null===a?!0:b.Og===a};return b};
  S.prototype.findNodesConnected=S.prototype.BE=function(a){void 0===a&&(a=null);e&&null!==a&&t.i(a,"string",S,"findNodesConnected:pid");for(var b=null,c=null,d=this.mc.k;d.next();){var f=d.value;if(f.aa===this){if(null===a||f.Rf===a)f=f.ca,null!==b?b.add(f):null!==c&&c!==f?(b=new C(S),b.add(c),b.add(f)):c=f}else f.ca!==this||null!==a&&f.Og!==a||(f=f.aa,null!==b?b.add(f):null!==c&&c!==f?(b=new C(S),b.add(c),b.add(f)):c=f)}return null!==b?b.k:null!==c?new Aa(c):t.ag};
  S.prototype.findNodesOutOf=function(a){void 0===a&&(a=null);e&&null!==a&&t.i(a,"string",S,"findNodesOutOf:pid");for(var b=null,c=null,d=this.mc.k;d.next();){var f=d.value;f.aa!==this||null!==a&&f.Rf!==a||(f=f.ca,null!==b?b.add(f):null!==c&&c!==f?(b=new C(S),b.add(c),b.add(f)):c=f)}return null!==b?b.k:null!==c?new Aa(c):t.ag};
  S.prototype.findNodesInto=function(a){void 0===a&&(a=null);e&&null!==a&&t.i(a,"string",S,"findNodesInto:pid");for(var b=null,c=null,d=this.mc.k;d.next();){var f=d.value;f.ca!==this||null!==a&&f.Og!==a||(f=f.aa,null!==b?b.add(f):null!==c&&c!==f?(b=new C(S),b.add(c),b.add(f)):c=f)}return null!==b?b.k:null!==c?new Aa(c):t.ag};
  S.prototype.findLinksBetween=function(a,b,c){void 0===b&&(b=null);void 0===c&&(c=null);e&&(t.l(a,S,S,"findLinksBetween:othernode"),null!==b&&t.i(b,"string",S,"findLinksBetween:pid"),null!==c&&t.i(c,"string",S,"findLinksBetween:otherpid"));var d=new Ba(this.mc),f=this;d.sl=function(d){return(d.aa!==f||d.ca!==a||null!==b&&d.Rf!==b||null!==c&&d.Og!==c)&&(d.aa!==a||d.ca!==f||null!==c&&d.Rf!==c||null!==b&&d.Og!==b)?!1:!0};return d};
  S.prototype.findLinksTo=function(a,b,c){void 0===b&&(b=null);void 0===c&&(c=null);e&&(t.l(a,S,S,"findLinksTo:othernode"),null!==b&&t.i(b,"string",S,"findLinksTo:pid"),null!==c&&t.i(c,"string",S,"findLinksTo:otherpid"));var d=new Ba(this.mc),f=this;d.sl=function(d){return d.aa!==f||d.ca!==a||null!==b&&d.Rf!==b||null!==c&&d.Og===c?!1:!0};return d};t.g(S,"linkConnected",S.prototype.pF);
  t.defineProperty(S,{pF:"linkConnected"},function(){return this.mr},function(a){var b=this.mr;b!==a&&(null!==a&&t.i(a,"function",S,"linkConnected"),this.mr=a,this.j("linkConnected",b,a))});t.g(S,"linkDisconnected",S.prototype.qF);t.defineProperty(S,{qF:"linkDisconnected"},function(){return this.nr},function(a){var b=this.nr;b!==a&&(null!==a&&t.i(a,"function",S,"linkDisconnected"),this.nr=a,this.j("linkDisconnected",b,a))});t.g(S,"linkValidation",S.prototype.Ap);
  t.defineProperty(S,{Ap:"linkValidation"},function(){return this.Kk},function(a){var b=this.Kk;b!==a&&(null!==a&&t.i(a,"function",S,"linkValidation"),this.Kk=a,this.j("linkValidation",b,a))});
  function Nm(a,b,c){Mm(a,c);if(!a.mc.contains(b)){a.mc.add(b);var d=a.pF;if(null!==d){var f=!0,g=a.h;null!==g&&(f=g.Na,g.Na=!0);d(a,b,c);null!==g&&(g.Na=f)}b.Fc&&(c=b.aa,b=b.ca,null!==c&&null!==b&&c!==b&&(d=!0,g=a.h,null!==g&&(d=g.pd),a=d?b:c,f=d?c:b,a.Vh||(a.Vh=f),!f.di||null!==g&&g.ja.sb||(d?c===f&&(f.di=!1):b===f&&(f.di=!1))))}}
  function Om(a,b,c){Mm(a,c);if(a.mc.remove(b)){var d=a.qF,f=a.h;if(null!==d){var g=!0;null!==f&&(g=f.Na,f.Na=!0);d(a,b,c);null!==f&&(f.Na=g)}b.Fc&&(c=!0,null!==f&&(c=f.pd),a=c?b.ca:b.aa,b=c?b.aa:b.ca,null!==a&&(a.Vh=!1),null===b||b.di||(0===b.mc.count?(b.Vh=null,null!==f&&f.ja.sb||(b.di=!0)):Lj(b)))}}
  function Lj(a){a.Vh=!1;if(0!==a.mc.count){var b=!0,c=a.h;if(null===c||!c.ja.sb){null!==c&&(b=c.pd);for(c=a.mc.k;c.next();){var d=c.value;if(d.Fc)if(b){if(d.aa===a){a.di=!1;return}}else if(d.ca===a){a.di=!1;return}}a.di=!0}}}
  S.prototype.updateModelDataReferences=function(){E.prototype.updateModelDataReferences.call(this);var a=this.data;if(null!==a){var b=this.h;if(null!==b){var c=b.ba;if(c instanceof Kd){var d=c.Sm(a),b=b.Ve(d),f=this.eA();b!==f&&(b=null!==f?c.Hb(f.data):void 0,f=c.en,"function"===typeof f?f(a,b):a[f]=b,c.mh(a,d))}}}};S.prototype.kt=function(a){E.prototype.kt.call(this,a);a||Lj(this);var b=this.io;null===b||a||Pm(b,this)};
  S.prototype.lt=function(a){E.prototype.lt.call(this,a);var b=this.io;null===b||a||null===b.we||(b.we.remove(this),b.fa())};S.prototype.Mm=function(){if(0<this.mc.count){var a=this.h;if(null===a)return;for(var b=this.mc.copy().k;b.next();)a.remove(b.value)}this.$d=null;E.prototype.Mm.call(this)};t.A(S,{ci:"isLinkLabel"},function(){return null!==this.io});t.g(S,"labeledLink",S.prototype.$d);
  t.defineProperty(S,{$d:"labeledLink"},function(){return this.io},function(a){var b=this.io;if(b!==a){e&&null!==a&&t.l(a,V,S,"labeledLink");var c=this.h,d=this.data;if(null!==b&&(null!==b.we&&(b.we.remove(this),b.fa()),null!==c&&null!==d&&!c.ja.sb)){var f=b.data,g=c.ba;if(null!==f&&g instanceof P){var h=g.Hb(d);void 0!==h&&g.JJ(f,h)}}this.io=a;null!==a&&(Pm(a,this),null===c||null===d||c.ja.sb||(f=a.data,g=c.ba,null!==f&&g instanceof P&&(h=g.Hb(d),void 0!==h&&g.JD(f,h))));Dk(this);this.j("labeledLink",
  b,a)}});S.prototype.findPort=S.prototype.fl=function(a){e&&t.i(a,"string",S,"findPort:pid");if(null===this.Rd){if(""===a&&!1===this.Fh)return this;Nk(this)}var b=this.Rd.za(a);return null!==b||""!==a&&(b=this.Rd.za(""),null!==b)?b:this};t.A(S,{port:"port"},function(){return this.fl("")});t.A(S,{ports:"ports"},function(){null===this.Rd&&Nk(this);return this.Rd.kF});
  function Nk(a){null===a.Rd?a.Rd=new ja("string",Q):a.Rd.clear();Rl(a,a,function(a,c){var d=c.Nd;null!==d&&a.Rd.add(d,c)});0===a.Rd.count&&a.Rd.add("",a)}function Mk(a,b,c){var d=b.Nd;if(null!==d&&(null!==a.Rd&&a.Rd.remove(d),b=a.h,null!==b&&c)){c=null;for(a=a.AE(d);a.next();)null===c&&(c=t.Cb()),c.push(a.value);if(null!==c){for(a=0;a<c.length;a++)b.remove(c[a]);t.ya(c)}}}
  S.prototype.isInTreeOf=function(a){if(null===a||a===this)return!1;var b=!0,c=this.h;null!==c&&(b=c.pd);c=this;if(b)for(;c!==a;){for(var b=null,d=c.mc.k;d.next();){var f=d.value;if(f.Fc&&(b=f.aa,b!==c&&b!==this))break}if(b===this||null===b||b===c)return!1;c=b}else for(;c!==a;){b=null;for(d=c.mc.k;d.next()&&(f=d.value,!f.Fc||(b=f.ca,b===c||b===this)););if(b===this||null===b||b===c)return!1;c=b}return!0};
  S.prototype.findTreeRoot=function(){var a=!0,b=this.h;null!==b&&(a=b.pd);b=this;if(a)for(;;){for(var a=null,c=b.mc.k;c.next();){var d=c.value;if(d.Fc&&(a=d.aa,a!==b&&a!==this))break}if(a===this)return this;if(null===a||a===b)return b;b=a}else for(;;){a=null;for(c=b.mc.k;c.next()&&(d=c.value,!d.Fc||(a=d.ca,a===b||a===this)););if(a===this)return this;if(null===a||a===b)return b;b=a}};
  S.prototype.findTreeParentLink=S.prototype.et=function(){var a=!0,b=this.h;null!==b&&(a=b.pd);b=this.mc.k;if(a)for(;b.next();){if(a=b.value,a.Fc&&a.aa!==this)return a}else for(;b.next();)if(a=b.value,a.Fc&&a.ca!==this)return a;return null};
  S.prototype.findTreeParentNode=S.prototype.eA=function(){if(null===this.Vh||this.Vh instanceof S)return this.Vh;var a=!0,b=this.h;null!==b&&(a=b.pd);var b=this.mc.n,c=b.length;if(a)for(a=0;a<c;a++){var d=b[a];if(d.Fc&&(d=d.aa,d!==this))return this.Vh=d}else for(a=0;a<c;a++)if(d=b[a],d.Fc&&(d=d.ca,d!==this))return this.Vh=d;return this.Vh=null};
  S.prototype.findTreeChildrenLinks=S.prototype.Fw=function(){var a=!0,b=this.h;null!==b&&(a=b.pd);if(a){var a=new Ba(this.mc),c=this;a.sl=function(a){return a.Fc&&a.aa===c?!0:!1}}else a=new Ba(this.mc),c=this,a.sl=function(a){return a.Fc&&a.ca===c?!0:!1};return a};
  S.prototype.findTreeChildrenNodes=S.prototype.DE=function(){var a=!0,b=this.h;null!==b&&(a=b.pd);var c=b=null,d=this.mc.k;if(a)for(;d.next();)a=d.value,a.Fc&&a.aa===this&&(a=a.ca,null!==b?b.add(a):null!==c&&c!==a?(b=new B(S),b.add(c),b.add(a)):c=a);else for(;d.next();)a=d.value,a.Fc&&a.ca===this&&(a=a.aa,null!==b?b.add(a):null!==c&&c!==a?(b=new B(S),b.add(c),b.add(a)):c=a);return null!==b?b.k:null!==c?new Aa(c):t.ag};
  S.prototype.findTreeParts=function(a){void 0===a&&(a=Infinity);t.i(a,"number",S,"collapseTree:level");var b=new C(E);Ie(b,this,!1,a);return b};S.prototype.collapseTree=S.prototype.collapseTree=function(a){void 0===a&&(a=1);t.q(a,S,"collapseTree:level");1>a&&(a=1);var b=this.h;if(null!==b&&!b.Wd){var c=b.Zb;0!==b.ja.Je&&c.tl();b.Wd=!0;var c=b.pd,d=new C(S);d.add(this);Qm(this,d,c,a,this.Qc);b.Wd=!1;b.ka()}};
  function Qm(a,b,c,d,f){if(1<d)for(f=c?a.Cw():a.wg();f.next();){var g=f.value;g.Fc&&(g=g.kA(a),null===g||g===a||b.contains(g)||(b.add(g),Qm(g,b,c,d-1,g.Qc)))}else Rm(a,b,c,f)}function Rm(a,b,c,d){for(var f=c?a.Cw():a.wg();f.next();){var g=f.value;d&&g.Pf();g.Fc&&(g=g.kA(a),null===g||g===a||b.contains(g)||(b.add(g),d&&(g.ka(),qk(g),g.df(!1)),g.Qc&&(g.pn=g.Qc,Rm(g,b,c,g.pn))))}a.Qc=!1}
  S.prototype.expandTree=S.prototype.expandTree=function(a){void 0===a&&(a=2);t.q(a,S,"collapseTree:level");2>a&&(a=2);var b=this.h;if(null!==b&&!b.Wd){var c=b.Zb;0!==b.ja.Je&&c.tl();b.Wd=!0;var d=b.pd,f=new C(S);f.add(this);Sm(this,f,d,a,this.Qc,c,this);b.Wd=!1}};
  function Sm(a,b,c,d,f,g,h){for(var k=c?a.Cw():a.wg();k.next();){var l=k.value;l.Fc&&(f||(l.rg||l.ac(),l.updateAdornments()),l=l.kA(a),null!==l&&l!==a&&!b.contains(l)&&(b.add(l),f||(l.df(!0),qk(l),Nh(g,l,h)),2<d||l.pn))&&(l.pn=!1,Sm(l,b,c,d-1,l.Qc,g,h))}a.Qc=!0}t.g(S,"isTreeExpanded",S.prototype.Qc);
  t.defineProperty(S,{Qc:"isTreeExpanded"},function(){return this.dr},function(a){var b=this.dr;if(b!==a){e&&t.i(a,"boolean",S,"isTreeExpanded");this.dr=a;var c=this.h;this.j("isTreeExpanded",b,a);b=this.MG;if(null!==b){var d=!0;null!==c&&(d=c.Na,c.Na=!0);b(this);null!==c&&(c.Na=d)}null!==c&&c.ja.sb?this.df(a):a?null===c||c.Wd||(0!==c.ja.Je&&c.Zb.tl(),c.Wd=!0,a=c.pd,b=new C(S),b.add(this),Sm(this,b,a,2,!1,c.Zb,this),c.Wd=!1):null===c||c.Wd||(0!==c.ja.Je&&c.Zb.tl(),c.Wd=!0,a=c.pd,b=new C(S),b.add(this),
  Rm(this,b,a,!0),c.Wd=!1)}});t.g(S,"wasTreeExpanded",S.prototype.pn);t.defineProperty(S,{pn:"wasTreeExpanded"},function(){return this.Gs},function(a){var b=this.Gs;b!==a&&(e&&t.i(a,"boolean",S,"wasTreeExpanded"),this.Gs=a,this.j("wasTreeExpanded",b,a))});t.g(S,"treeExpandedChanged",S.prototype.MG);t.defineProperty(S,{MG:"treeExpandedChanged"},function(){return this.Bs},function(a){var b=this.Bs;b!==a&&(null!==a&&t.i(a,"function",S,"treeExpandedChanged"),this.Bs=a,this.j("treeExpandedChanged",b,a))});
  t.g(S,"isTreeLeaf",S.prototype.di);t.defineProperty(S,{di:"isTreeLeaf"},function(){return this.er},function(a){var b=this.er;b!==a&&(e&&t.i(a,"boolean",S,"isTreeLeaf"),this.er=a,this.j("isTreeLeaf",b,a))});
  function V(){E.call(this,vg);this.eg=null;this.Ch="";this.qg=this.Pq=null;this.Sh="";this.As=null;this.Vr=this.Ur=this.Tr=!1;this.fr=!0;this.lq=yg;this.yq=0;this.Bq=yg;this.Cq=NaN;this.nm=Zk;this.ps=0.5;this.Ji=this.we=null;this.Cc=(new B(w)).freeze();this.xo=this.xe=null;this.rg=!1;this.pz=null;this.wz=!1;this.xn=this.ui=this.Oa=null;this.hf=0;this.Jn=this.Fn=null;this.mi=new B(x);this.Az=new w;this.qD=this.oD=null;this.qy=!1;this.P=null}t.ga("Link",V);t.Ka(V,E);
  V.prototype.cloneProtected=function(a){E.prototype.cloneProtected.call(this,a);a.Ch=this.Ch;a.Pq=this.Pq;a.Sh=this.Sh;a.As=this.As;a.Tr=this.Tr;a.Ur=this.Ur;a.Vr=this.Vr;a.fr=this.fr;a.lq=this.lq;a.yq=this.yq;a.Bq=this.Bq;a.Cq=this.Cq;a.nm=this.nm;a.ps=this.ps;if(null!==this.P){var b=this.P;a.P={Eh:b.Eh.Z(),Uh:b.Uh.Z(),Bh:b.Bh,Rh:b.Rh,Ah:b.Ah,Qh:b.Qh,Dh:b.Dh,Th:b.Th}}else a.P=null};
  V.prototype.Zh=function(a){E.prototype.Zh.call(this,a);this.Ch=a.Ch;this.Sh=a.Sh;a.Ji=null;a.xe=null;a.ac();a.xn=this.xn;a.hf=this.hf};var Zk;V.Normal=Zk=t.w(V,"Normal",1);V.Orthogonal=t.w(V,"Orthogonal",2);V.AvoidsNodes=t.w(V,"AvoidsNodes",6);var Tm;V.AvoidsNodesStraight=Tm=t.w(V,"AvoidsNodesStraight",7);var yg;V.None=yg=t.w(V,"None",0);var Og;V.Bezier=Og=t.w(V,"Bezier",9);var xg;V.JumpGap=xg=t.w(V,"JumpGap",10);var wg;V.JumpOver=wg=t.w(V,"JumpOver",11);var Wk;V.End=Wk=t.w(V,"End",17);var Xk;
  V.Scale=Xk=t.w(V,"Scale",18);var Yk;V.Stretch=Yk=t.w(V,"Stretch",19);var fm;V.OrientAlong=fm=t.w(V,"OrientAlong",21);var Um;V.OrientPlus90=Um=t.w(V,"OrientPlus90",22);var Vm;V.OrientMinus90=Vm=t.w(V,"OrientMinus90",23);var Wm;V.OrientOpposite=Wm=t.w(V,"OrientOpposite",24);var Xm;V.OrientUpright=Xm=t.w(V,"OrientUpright",25);var Ym;V.OrientPlus90Upright=Ym=t.w(V,"OrientPlus90Upright",26);var Zm;V.OrientMinus90Upright=Zm=t.w(V,"OrientMinus90Upright",27);var $m;
  V.OrientUpright45=$m=t.w(V,"OrientUpright45",28);V.prototype.Fe=function(){this.P={Eh:xb,Uh:xb,Bh:NaN,Rh:NaN,Ah:Hm,Qh:Hm,Dh:NaN,Th:NaN}};V.prototype.nl=function(){var a=this.aa;if(null!==a){var b=a.findVisibleNode();null!==b&&(a=b);if(Pi(a)||Qi(a))return!1}a=this.ca;return null!==a&&(b=a.findVisibleNode(),null!==b&&(a=b),Pi(a)||Qi(a))?!1:!0};V.prototype.Ld=function(){return!1};
  V.prototype.computeAngle=function(a,b,c){switch(b){default:case yg:a=0;break;case fm:a=c;break;case Um:a=c+90;break;case Vm:a=c-90;break;case Wm:a=c+180;break;case Xm:a=H.Ct(c);90<a&&270>a&&(a-=180);break;case Ym:a=H.Ct(c+90);90<a&&270>a&&(a-=180);break;case Zm:a=H.Ct(c-90);90<a&&270>a&&(a-=180);break;case $m:a=H.Ct(c);if(45<a&&135>a||225<a&&315>a)return 0;90<a&&270>a&&(a-=180)}return H.Ct(a)};t.g(V,"fromNode",V.prototype.aa);
  t.defineProperty(V,{aa:"fromNode"},function(){return this.eg},function(a){var b=this.eg;if(b!==a){e&&null!==a&&t.l(a,S,V,"fromNode");var c=this.ud;null!==b&&(this.qg!==b&&Om(b,this,c),an(this),this.J(ej));this.eg=a;this.ui=null;this.ac();var d=this.h;if(null!==d){var f=this.data,g=d.ba;if(null!==f)if(g instanceof P){var h=null!==a?a.data:null;g.vx(f,g.Hb(h))}else g instanceof Kd&&(h=null!==a?a.data:null,d.pd?g.mh(f,g.Hb(h)):(null!==b&&g.mh(b.data,void 0),g.mh(h,g.Hb(null!==this.qg?this.qg.data:null))))}f=
  this.ud;g=this.jA;null!==g&&(h=!0,null!==d&&(h=d.Na,d.Na=!0),g(this,c,f),null!==d&&(d.Na=h));null!==a&&(this.qg!==a&&Nm(a,this,f),bn(this),this.J(Zi));this.j("fromNode",b,a);Gj(this)}});t.g(V,"fromPortId",V.prototype.Rf);
  t.defineProperty(V,{Rf:"fromPortId"},function(){return this.Ch},function(a){var b=this.Ch;if(b!==a){e&&t.i(a,"string",V,"fromPortId");var c=this.ud;null!==c&&Mm(this.aa,c);an(this);this.Ch=a;var d=this.ud;null!==d&&Mm(this.aa,d);var f=this.h;if(null!==f){var g=this.data,h=f.ba;null!==g&&h instanceof P&&h.bB(g,a)}c!==d&&(this.ui=null,this.ac(),g=this.jA,null!==g&&(h=!0,null!==f&&(h=f.Na,f.Na=!0),g(this,c,d),null!==f&&(f.Na=h)));bn(this);this.j("fromPortId",b,a)}});
  t.A(V,{ud:"fromPort"},function(){var a=this.eg;return null===a?null:a.fl(this.Ch)});t.g(V,"fromPortChanged",V.prototype.jA);t.defineProperty(V,{jA:"fromPortChanged"},function(){return this.Pq},function(a){var b=this.Pq;b!==a&&(null!==a&&t.i(a,"function",V,"fromPortChanged"),this.Pq=a,this.j("fromPortChanged",b,a))});t.g(V,"toNode",V.prototype.ca);
  t.defineProperty(V,{ca:"toNode"},function(){return this.qg},function(a){var b=this.qg;if(b!==a){e&&null!==a&&t.l(a,S,V,"toNode");var c=this.fe;null!==b&&(this.eg!==b&&Om(b,this,c),an(this),this.J(ej));this.qg=a;this.ui=null;this.ac();var d=this.h;if(null!==d){var f=this.data,g=d.ba;if(null!==f)if(g instanceof P){var h=null!==a?a.data:null;g.xx(f,g.Hb(h))}else g instanceof Kd&&(h=null!==a?a.data:null,d.pd?(null!==b&&g.mh(b.data,void 0),g.mh(h,g.Hb(null!==this.eg?this.eg.data:null))):g.mh(f,g.Hb(h)))}f=
  this.fe;g=this.mB;null!==g&&(h=!0,null!==d&&(h=d.Na,d.Na=!0),g(this,c,f),null!==d&&(d.Na=h));null!==a&&(this.eg!==a&&Nm(a,this,f),bn(this),this.J(Zi));this.j("toNode",b,a);Gj(this)}});t.g(V,"toPortId",V.prototype.Og);
  t.defineProperty(V,{Og:"toPortId"},function(){return this.Sh},function(a){var b=this.Sh;if(b!==a){e&&t.i(a,"string",V,"toPortId");var c=this.fe;null!==c&&Mm(this.ca,c);an(this);this.Sh=a;var d=this.fe;null!==d&&Mm(this.ca,d);var f=this.h;if(null!==f){var g=this.data,h=f.ba;null!==g&&h instanceof P&&h.eB(g,a)}c!==d&&(this.ui=null,this.ac(),g=this.mB,null!==g&&(h=!0,null!==f&&(h=f.Na,f.Na=!0),g(this,c,d),null!==f&&(f.Na=h)));bn(this);this.j("toPortId",b,a)}});
  t.A(V,{fe:"toPort"},function(){var a=this.qg;return null===a?null:a.fl(this.Sh)});t.g(V,"toPortChanged",V.prototype.mB);t.defineProperty(V,{mB:"toPortChanged"},function(){return this.As},function(a){var b=this.As;b!==a&&(null!==a&&t.i(a,"function",V,"toPortChanged"),this.As=a,this.j("toPortChanged",b,a))});
  t.defineProperty(V,{pb:"fromSpot"},function(){return null!==this.P?this.P.Eh:xb},function(a){null===this.P&&this.Fe();var b=this.P.Eh;b.M(a)||(e&&t.l(a,I,V,"fromSpot"),a=a.Z(),this.P.Eh=a,this.j("fromSpot",b,a),this.ac())});
  t.defineProperty(V,{ck:"fromEndSegmentLength"},function(){return null!==this.P?this.P.Bh:NaN},function(a){null===this.P&&this.Fe();var b=this.P.Bh;b!==a&&(e&&t.i(a,"number",V,"fromEndSegmentLength"),0>a&&t.la(a,">= 0",V,"fromEndSegmentLength"),this.P.Bh=a,this.j("fromEndSegmentLength",b,a),this.ac())});
  t.defineProperty(V,{hp:"fromEndSegmentDirection"},function(){return null!==this.P?this.P.Ah:Hm},function(a){null===this.P&&this.Fe();var b=this.P.Ah;b!==a&&(e&&t.Aa(a,S,V,"fromEndSegmentDirection"),this.P.Ah=a,this.j("fromEndSegmentDirection",b,a),this.ac())});t.defineProperty(V,{ip:"fromShortLength"},function(){return null!==this.P?this.P.Dh:NaN},function(a){null===this.P&&this.Fe();var b=this.P.Dh;b!==a&&(e&&t.i(a,"number",V,"fromShortLength"),this.P.Dh=a,this.j("fromShortLength",b,a),this.ac())});
  t.defineProperty(V,{tb:"toSpot"},function(){return null!==this.P?this.P.Uh:xb},function(a){null===this.P&&this.Fe();var b=this.P.Uh;b.M(a)||(e&&t.l(a,I,V,"toSpot"),a=a.Z(),this.P.Uh=a,this.j("toSpot",b,a),this.ac())});
  t.defineProperty(V,{ik:"toEndSegmentLength"},function(){return null!==this.P?this.P.Rh:NaN},function(a){null===this.P&&this.Fe();var b=this.P.Rh;b!==a&&(e&&t.i(a,"number",V,"toEndSegmentLength"),0>a&&t.la(a,">= 0",V,"toEndSegmentLength"),this.P.Rh=a,this.j("toEndSegmentLength",b,a),this.ac())});
  t.defineProperty(V,{Xp:"toEndSegmentDirection"},function(){return null!==this.P?this.P.Qh:Hm},function(a){null===this.P&&this.Fe();var b=this.P.Qh;b!==a&&(e&&t.Aa(a,S,V,"toEndSegmentDirection"),this.P.Qh=a,this.j("toEndSegmentDirection",b,a),this.ac())});t.defineProperty(V,{Yp:"toShortLength"},function(){return null!==this.P?this.P.Th:NaN},function(a){null===this.P&&this.Fe();var b=this.P.Th;b!==a&&(e&&t.i(a,"number",V,"toShortLength"),this.P.Th=a,this.j("toShortLength",b,a),this.ac())});
  function Gj(a){var b=a.aa,c=a.ca;null!==b&&null!==c?cn(a,b.FI(c)):cn(a,null)}function cn(a,b){var c=a.yk;if(c!==b){null!==c&&Bm(c,a);a.yk=b;null!==b&&Cm(b,a);var d=a.Xz;if(null!==d){var f=!0,g=a.h;null!==g&&(f=g.Na,g.Na=!0);d(a,c,b);null!==g&&(g.Na=f)}!a.rg||a.oD!==c&&a.qD!==c||a.ac()}}V.prototype.getOtherNode=V.prototype.kA=function(a){e&&t.l(a,S,V,"getOtherNode:node");var b=this.aa;return a===b?this.ca:b};
  V.prototype.getOtherPort=function(a){e&&t.l(a,Q,V,"getOtherPort:port");var b=this.ud;return a===b?this.fe:b};t.A(V,{BK:"isLabeledLink"},function(){return null===this.we?!1:0<this.we.count});t.A(V,{ek:"labelNodes"},function(){return null===this.we?t.ag:this.we.k});function Pm(a,b){null===a.we&&(a.we=new C(S));a.we.add(b);a.fa()}
  V.prototype.kt=function(a){E.prototype.kt.call(this,a);dn(this)&&zg(this,this.pa);if(!a){a=this.eg;var b=this.qg;null!==a&&(Nm(a,this,this.ud),bn(this));null!==b&&(Nm(b,this,this.fe),bn(this))}};V.prototype.lt=function(a){E.prototype.lt.call(this,a);dn(this)&&zg(this,this.pa);if(!a){a=this.eg;var b=this.qg;null!==a&&(Om(a,this,this.ud),an(this));null!==b&&(Om(b,this,this.fe),an(this))}};
  V.prototype.Mm=function(){this.rg=!0;if(null!==this.we){var a=this.h;if(null===a)return;for(var b=this.we.copy().k;b.next();)a.remove(b.value)}b=this.data;null!==b&&(a=this.h,null!==a&&(a=a.ba,a instanceof P?a.WA(b):a instanceof Kd&&a.mh(b,void 0)))};
  V.prototype.updateModelDataReferences=function(){var a=this.data;if(null!==a){var b=this.h;if(null!==b){var c=b.ba;if(c instanceof P){var d=c.hl(a),f=b.Ve(d),g=this.aa;f!==g&&(f=null!==g?c.Hb(g.data):void 0,g=c.Ym,"function"===typeof g?g(a,f):a[g]=f,c.vx(a,d));d=c.ll(a);f=b.Ve(d);g=this.ca;f!==g&&(f=null!==g?c.Hb(g.data):void 0,g=c.Zm,"function"===typeof g?g(a,f):a[g]=f,c.xx(a,d))}}}};
  V.prototype.move=V.prototype.move=function(a){var b=this.position,c=b.x;isNaN(c)&&(c=0);b=b.y;isNaN(b)&&(b=0);c=a.x-c;b=a.y-b;E.prototype.move.call(this,a);this.pl(c,b);for(a=this.ek;a.next();){var d=a.value,f=d.position;d.moveTo(f.x+c,f.y+b)}};t.g(V,"relinkableFrom",V.prototype.MF);t.defineProperty(V,{MF:"relinkableFrom"},function(){return this.Tr},function(a){var b=this.Tr;b!==a&&(e&&t.i(a,"boolean",V,"relinkableFrom"),this.Tr=a,this.j("relinkableFrom",b,a),this.updateAdornments())});
  t.g(V,"relinkableTo",V.prototype.NF);t.defineProperty(V,{NF:"relinkableTo"},function(){return this.Ur},function(a){var b=this.Ur;b!==a&&(e&&t.i(a,"boolean",V,"relinkableTo"),this.Ur=a,this.j("relinkableTo",b,a),this.updateAdornments())});V.prototype.canRelinkFrom=function(){if(!this.MF)return!1;var a=this.layer;if(null===a)return!0;if(!a.Tj)return!1;a=a.h;return null===a||a.Tj?!0:!1};
  V.prototype.canRelinkTo=function(){if(!this.NF)return!1;var a=this.layer;if(null===a)return!0;if(!a.Tj)return!1;a=a.h;return null===a||a.Tj?!0:!1};t.g(V,"resegmentable",V.prototype.Kp);t.defineProperty(V,{Kp:"resegmentable"},function(){return this.Vr},function(a){var b=this.Vr;b!==a&&(e&&t.i(a,"boolean",V,"resegmentable"),this.Vr=a,this.j("resegmentable",b,a),this.updateAdornments())});t.g(V,"isTreeLink",V.prototype.Fc);
  t.defineProperty(V,{Fc:"isTreeLink"},function(){return this.fr},function(a){var b=this.fr;b!==a&&(e&&t.i(a,"boolean",V,"isTreeLink"),this.fr=a,this.j("isTreeLink",b,a),null!==this.aa&&Lj(this.aa),null!==this.ca&&Lj(this.ca))});t.A(V,{path:"path"},function(){var a=this.Ji;if(null!==a)return a;a=this.xa;a=Ek(this,a,a.length);return a instanceof W?this.Ji=a:null});V.prototype.Rq=function(){return this.path};V.prototype.Sy=function(){return this.Cc};
  V.prototype.vj=function(){this.updateRoute();var a=new x;this.qf(a);return this.pz=a};
  V.prototype.qf=function(a){var b=Infinity,c=Infinity,d=this.oa;if(0===d)return a.p(NaN,NaN,0,0),a;if(1===d)d=this.o(0),b=Math.min(d.x,b),c=Math.min(d.y,c),a.p(d.x,d.y,0,0);else if(2===d){var f=this.o(0),g=this.o(1),b=Math.min(f.x,g.x),c=Math.min(f.y,g.y);a.p(f.x,f.y,0,0);a.kj(g)}else if(this.computeCurve()===Og&&3<=d&&!this.ic)if(f=this.o(0),b=f.x,c=f.y,a.p(b,c,0,0),3===d)d=this.o(1),b=Math.min(d.x,b),c=Math.min(d.y,c),g=this.o(2),b=Math.min(g.x,b),c=Math.min(g.y,c),H.So(f.x,f.y,d.x,d.y,d.x,d.y,g.x,
  g.y,0.5,a);else for(var h,k,l=3;l<d;l+=3)h=this.o(l-2),l+3>=d&&(l=d-1),k=this.o(l-1),g=this.o(l),H.So(f.x,f.y,h.x,h.y,k.x,k.y,g.x,g.y,0.5,a),b=Math.min(g.x,b),c=Math.min(g.y,c),f=g;else for(f=this.o(0),g=this.o(1),b=Math.min(f.x,g.x),c=Math.min(f.y,g.y),a.p(f.x,f.y,0,0),a.kj(g),l=2;l<d;l++)f=this.o(l),b=Math.min(f.x,b),c=Math.min(f.y,c),a.kj(f);this.Az.p(b-a.x,c-a.y);return a};t.A(V,{zF:"midPoint"},function(){this.updateRoute();return this.computeMidPoint(new w)});
  V.prototype.computeMidPoint=function(a){var b=this.oa;if(0===b)return a.assign(H.eH),a;if(1===b)return a.assign(this.o(0)),a;if(2===b){var c=this.o(0),d=this.o(1);a.p((c.x+d.x)/2,(c.y+d.y)/2);return a}if(this.computeCurve()===Og&&3<=b&&!this.ic){if(3===b)return this.o(1);var b=(b-1)/3|0,f=3*(b/2|0);1===b%2?(c=this.o(f),d=this.o(f+1),b=this.o(f+2),f=this.o(f+3),H.bI(c.x,c.y,d.x,d.y,b.x,b.y,f.x,f.y,a)):a.assign(this.o(f));return a}for(var f=0,g=t.Cb(),h=0;h<b-1;h++)c=this.o(h),d=this.o(h+1),H.nb(c.x,
  d.x)?(c=d.y-c.y,0>c&&(c=-c)):H.nb(c.y,d.y)?(c=d.x-c.x,0>c&&(c=-c)):c=Math.sqrt(c.Zj(d)),g.push(c),f+=c;for(d=h=c=0;c<f/2&&h<b;){d=g[h];if(c+d>f/2)break;c+=d;h++}t.ya(g);b=this.o(h);g=this.o(h+1);b.x===g.x?b.y>g.y?a.p(b.x,b.y-(f/2-c)):a.p(b.x,b.y+(f/2-c)):b.y===g.y?b.x>g.x?a.p(b.x-(f/2-c),b.y):a.p(b.x+(f/2-c),b.y):(f=(f/2-c)/d,a.p(b.x+f*(g.x-b.x),b.y+f*(g.y-b.y)));return a};t.A(V,{yF:"midAngle"},function(){this.updateRoute();return this.computeMidAngle()});
  V.prototype.computeMidAngle=function(){var a=this.oa;if(2>a)return NaN;if(this.computeCurve()===Og&&4<=a&&!this.ic){var b=(a-1)/3|0,c=3*(b/2|0);if(1===b%2){var c=Math.floor(c),a=this.o(c),b=this.o(c+1),d=this.o(c+2),c=this.o(c+3);return H.aI(a.x,a.y,b.x,b.y,d.x,d.y,c.x,c.y)}if(0<c&&c+1<a)return a=this.o(c-1),b=this.o(c+1),a.$i(b)}d=a/2|0;if(0===a%2)return a=this.o(d-1),b=this.o(d),a.$i(b);var a=this.o(d-1),b=this.o(d),d=this.o(d+1),c=a.Zj(b),f=b.Zj(d);return c>f?a.$i(b):b.$i(d)};t.g(V,"points",V.prototype.points);
  t.defineProperty(V,{points:"points"},function(){return this.Cc},function(a){var b=this.Cc;if(b!==a){e&&(Array.isArray(a)||a instanceof B||t.m("Link.points value is not an instance of List or Array"));var c=a;if(Array.isArray(a)){var d=0===a.length%2;if(d)for(var f=0;f<a.length;f++)if("number"!==typeof a[f]){d=!1;break}if(d)for(c=new B(w),d=0;d<a.length/2;d++)f=(new w(a[2*d],a[2*d+1])).freeze(),c.add(f);else t.m("Link.points array must contain only numbers")}else for(c=a.copy(),a=c.k;a.next();)a.value.freeze();
  c.freeze();this.Cc=c;this.Ye();en(this);this.h&&this.h.Zb.sd&&(this.xo=c);this.j("points",b,c)}});t.A(V,{oa:"pointsCount"},function(){return this.Cc.count});V.prototype.getPoint=V.prototype.o=function(a){return this.Cc.n[a]};V.prototype.setPoint=V.prototype.Ef=function(a,b){e&&(t.l(b,w,V,"setPoint"),b.N()||t.m("Link.setPoint called with a Point that does not have real numbers: "+b.toString()));null===this.xe&&t.m("Call Link.startRoute before modifying the points of the route.");this.Cc.Mg(a,b)};
  V.prototype.setPointAt=V.prototype.Y=function(a,b,c){e&&(t.q(b,V,"setPointAt:x"),t.q(c,V,"setPointAt:y"));null===this.xe&&t.m("Call Link.startRoute before modifying the points of the route.");this.Cc.Mg(a,new w(b,c))};V.prototype.insertPoint=function(a,b){e&&(t.l(b,w,V,"insertPoint"),b.N()||t.m("Link.insertPoint called with a Point that does not have real numbers: "+b.toString()));null===this.xe&&t.m("Call Link.startRoute before modifying the points of the route.");this.Cc.Jd(a,b)};
  V.prototype.insertPointAt=V.prototype.C=function(a,b,c){e&&(t.q(b,V,"insertPointAt:x"),t.q(c,V,"insertPointAt:y"));null===this.xe&&t.m("Call Link.startRoute before modifying the points of the route.");this.Cc.Jd(a,new w(b,c))};V.prototype.addPoint=V.prototype.Wh=function(a){e&&(t.l(a,w,V,"addPoint"),a.N()||t.m("Link.addPoint called with a Point that does not have real numbers: "+a.toString()));null===this.xe&&t.m("Call Link.startRoute before modifying the points of the route.");this.Cc.add(a)};
  V.prototype.addPointAt=V.prototype.Wk=function(a,b){e&&(t.q(a,V,"insertPointAt:x"),t.q(b,V,"insertPointAt:y"));null===this.xe&&t.m("Call Link.startRoute before modifying the points of the route.");this.Cc.add(new w(a,b))};V.prototype.removePoint=V.prototype.QF=function(a){null===this.xe&&t.m("Call Link.startRoute before modifying the points of the route.");this.Cc.qd(a)};
  V.prototype.clearPoints=V.prototype.Uo=function(){null===this.xe&&t.m("Call Link.startRoute before modifying the points of the route.");this.Cc.clear()};V.prototype.movePoints=V.prototype.pl=function(a,b){for(var c=new B(w),d=this.Cc.k;d.next();){var f=d.value;c.add((new w(f.x+a,f.y+b)).freeze())}c.freeze();d=this.Cc;this.Cc=c;this.Ye();en(this);this.h&&this.h.Zb.sd&&(this.xo=c);this.j("points",d,c)};V.prototype.startRoute=V.prototype.yl=function(){null===this.xe&&(this.xe=this.Cc,this.Cc=this.Cc.copy())};
  V.prototype.commitRoute=V.prototype.Wi=function(){if(null!==this.xe){for(var a=this.xe,b=this.Cc,c=Infinity,d=Infinity,f=a.count,g=0;g<f;g++)var h=a.n[g],c=Math.min(h.x,c),d=Math.min(h.y,d);for(var k=Infinity,l=Infinity,m=b.count,g=0;g<m;g++)h=b.n[g],k=Math.min(h.x,k),l=Math.min(h.y,l),h.freeze();b.freeze();if(m===f)for(g=0;g<m;g++){if(f=a.n[g],h=b.n[g],f.x-c!==h.x-k||f.y-d!==h.y-l){this.Ye();break}}else this.Ye();this.xe=null;this.h&&this.h.Zb.sd&&(this.xo=b);en(this);this.j("points",a,b)}};
  V.prototype.rollbackRoute=V.prototype.LJ=function(){null!==this.xe&&(this.Cc=this.xe,this.xe=null)};function en(a){0===a.Cc.count?a.rg=!1:(a.rg=!0,a.Fn=a.o(0).copy(),a.Jn=a.o(a.oa-1).copy(),fn(a,!1))}V.prototype.invalidateRoute=V.prototype.ac=function(){if(!(this.wz||this.h&&this.h.ja.sb)){var a=this.Rq();null!==a&&(this.rg=!1,this.Ye(),a.fa())}};t.defineProperty(V,{Wp:null},function(){return this.wz},function(a){this.wz=a});
  V.prototype.updateRoute=function(){if(!this.rg&&!this.qy){var a=!0;try{this.qy=!0,this.yl(),a=this.computePoints()}finally{this.qy=!1,a?this.Wi():this.LJ()}}};
  V.prototype.computePoints=function(){var a=this.h;if(null===a)return!1;var b=this.aa,c=null;null===b?(a.om||(a.Av=new W,a.Av.Ca=H.gq,a.Av.fb=0,a.om=new S,a.om.add(a.Av),a.om.sf()),this.Fn&&(a.om.position=a.om.location=this.Fn,a.om.sf(),b=a.om,c=a.Av)):c=this.ud;if(null!==c){var d=Ok(c);d!==b&&b.Qa()?c=d:(d=b.findVisibleNode(),null!==d&&d!==b?(b=d,c=d.fl("")):b=d)}this.oD=b;if(null===b||null===c||!b.location.N())return!1;var d=this.ca,f=null;null===d?(a.pm||(a.Bv=new W,a.Bv.Ca=H.gq,a.Bv.fb=0,a.pm=
  new S,a.pm.add(a.Bv),a.pm.sf()),this.Jn&&(a.pm.position=a.pm.location=this.Jn,a.pm.sf(),d=a.pm,f=a.Bv)):f=this.fe;null!==f&&(a=Ok(f),a!==d&&d.Qa()?f=a:(a=d.findVisibleNode(),null!==a&&a!==d?(d=a,f=a.fl("")):d=a));this.qD=d;if(null===d||null===f||!d.location.N())return!1;var a=this.oa,g=gn(this,c),h=hn(this,f),k=c===f&&null!==c,l=this.ic,m=this.De===Og;this.ui=k&&!l?m=!0:!1;var n=this.Lo===yg||k;if(l||g!==wb||h!==wb||k){m=this.dj;n&&(l&&m||k)&&this.Uo();var p=k?this.computeCurviness():0,q=this.getLinkPoint(b,
  c,g,!0,l,d,f),r=0,s=0,u=0;if(l||g!==wb||k){var v=this.computeEndSegmentLength(b,c,g,!0),u=this.getLinkDirection(b,c,q,g,!0,l,d,f);k&&(u-=l?90:30,0>p&&(u-=180));0>u?u+=360:360<=u&&(u-=360);k&&(v+=Math.abs(p));0===u?r=v:90===u?s=v:180===u?r=-v:270===u?s=-v:(r=v*Math.cos(u*Math.PI/180),s=v*Math.sin(u*Math.PI/180));if(g.Ge()&&k){var D=c.qb(Kb,t.K()),A=t.lc(D.x+1E3*r,D.y+1E3*s);this.getLinkPointFromPoint(b,c,D,A,!0,q);t.B(D);t.B(A)}}var v=this.getLinkPoint(d,f,h,!1,l,b,c),G=0,L=0,N=0;if(l||h!==wb||k)D=
  this.computeEndSegmentLength(d,f,h,!1),N=this.getLinkDirection(d,f,v,h,!1,l,b,c),k&&(N+=l?0:30,0>p&&(N+=180)),0>N?N+=360:360<=N&&(N-=360),k&&(D+=Math.abs(p)),0===N?G=D:90===N?L=D:180===N?G=-D:270===N?L=-D:(G=D*Math.cos(N*Math.PI/180),L=D*Math.sin(N*Math.PI/180)),h.Ge()&&k&&(D=f.qb(Kb,t.K()),A=t.lc(D.x+1E3*G,D.y+1E3*L),this.getLinkPointFromPoint(d,f,D,A,!1,v),t.B(D),t.B(A));f=q;if(l||g!==wb||k)f=new w(q.x+r,q.y+s);c=v;if(l||h!==wb||k)c=new w(v.x+G,v.y+L);!n&&!l&&g===wb&&3<a&&this.adjustPoints(0,q,
  a-2,c)?this.Ef(a-1,v):!n&&!l&&h===wb&&3<a&&this.adjustPoints(1,f,a-1,v)?this.Ef(0,q):!n&&!l&&4<a&&this.adjustPoints(1,f,a-2,c)?(this.Ef(0,q),this.Ef(a-1,v)):!n&&l&&6<=a&&!m&&this.adjustPoints(1,f,a-2,c)?(this.Ef(0,q),this.Ef(a-1,v)):(this.Uo(),this.Wh(q),(l||g!==wb||k)&&this.Wh(f),l&&this.addOrthoPoints(f,u,c,N,b,d),(l||h!==wb||k)&&this.Wh(c),this.Wh(v))}else g=!1,!n&&3<=a&&(n=this.getLinkPoint(b,c,wb,!0,!1,d,f),g=this.getLinkPoint(d,f,wb,!1,!1,b,c),g=this.adjustPoints(0,n,a-1,g)),g||(this.Uo(),m?
  (a=this.getLinkPoint(b,c,wb,!0,!1,d,f),n=this.getLinkPoint(d,f,wb,!1,!1,b,c),g=n.x-a.x,h=n.y-a.y,k=this.computeCurviness(),m=l=0,q=a.x+g/3,u=a.y+h/3,r=q,s=u,H.I(h,0)?s=0<g?s-k:s+k:(l=-g/h,m=Math.sqrt(k*k/(l*l+1)),0>k&&(m=-m),r=(0>h?-1:1)*m+q,s=l*(r-q)+u),q=a.x+2*g/3,u=a.y+2*h/3,v=q,G=u,H.I(h,0)?G=0<g?G-k:G+k:(v=(0>h?-1:1)*m+q,G=l*(v-q)+u),this.Uo(),this.Wh(a),this.Wk(r,s),this.Wk(v,G),this.Wh(n),this.Ef(0,this.getLinkPoint(b,c,wb,!0,!1,d,f)),this.Ef(3,this.getLinkPoint(d,f,wb,!1,!1,b,c))):(a=d,d=
  this.getLinkPoint(b,c,wb,!0,!1,a,f),f=this.getLinkPoint(a,f,wb,!1,!1,b,c),this.hasCurviness()?(h=f.x-d.x,b=f.y-d.y,c=this.computeCurviness(),a=d.x+h/2,n=d.y+b/2,g=a,k=n,H.I(b,0)?k=0<h?k-c:k+c:(h=-h/b,g=Math.sqrt(c*c/(h*h+1)),0>c&&(g=-g),g=(0>b?-1:1)*g+a,k=h*(g-a)+n),this.Wh(d),this.Wk(g,k)):this.Wh(d),this.Wh(f)));return!0};function jn(a,b){Math.abs(b.x-a.x)>Math.abs(b.y-a.y)?(b.x=b.x>=a.x?a.x+9E9:a.x-9E9,b.y=a.y):(b.y=b.y>=a.y?a.y+9E9:a.y-9E9,b.x=a.x);return b}
  V.prototype.getLinkPointFromPoint=function(a,b,c,d,f,g){void 0===g&&(g=new w);if(null===a||null===b)return g.assign(c),g;a.Qa()||(f=a.findVisibleNode(),null!==f&&f!==a&&(b=f.port));var h;a=null;f=b.ia;null===f||f.Hf()||(f=f.ia);if(null===f)f=d.x,d=d.y,h=c.x,c=c.y;else{a=f.me;f=1/(a.m11*a.m22-a.m12*a.m21);h=a.m22*f;var k=-a.m12*f,l=-a.m21*f,m=a.m11*f,n=f*(a.m21*a.dy-a.m22*a.dx),p=f*(a.m12*a.dx-a.m11*a.dy);f=d.x*h+d.y*l+n;d=d.x*k+d.y*m+p;h=c.x*h+c.y*l+n;c=c.x*k+c.y*m+p}b.kp(f,d,h,c,g);a&&g.transform(a);
  return g};function kn(a,b){var c=b.Pr;null===c&&(c=new ln,c.port=b,c.Gc=b.S,b.Pr=c);return mn(c,a)}
  V.prototype.getLinkPoint=function(a,b,c,d,f,g,h,k){void 0===k&&(k=new w);if(c.vd())return b.qb(c,k),k;if(c.rp()&&(c=kn(this,b),null!==c)){k.assign(c.xp);if(f&&this.Kt===Tm){var l=kn(this,h);if(c.Jm<l.Jm){c=t.K();var l=t.K(),m=new x(b.qb(Eb,c),b.qb(Pb,l)),n=this.computeSpot(!d);a=this.getLinkPoint(g,h,n,!d,f,a,b,l);a.x>=m.x&&a.x<=m.x+m.width?k.x=a.x:a.y>=m.y&&a.y<=m.y+m.height&&(k.y=a.y);t.B(c);t.B(l)}}return k}g=b.qb(Kb,t.K());c=null;this.oa>(f?6:2)?(h=d?this.o(1):this.o(this.oa-2),f&&(h=jn(g,h.copy()))):
  (c=t.K(),h=h.qb(Kb,c),f&&(h=jn(g,h)));this.getLinkPointFromPoint(a,b,g,h,d,k);t.B(g);null!==c&&t.B(c);return k};
  V.prototype.getLinkDirection=function(a,b,c,d,f,g,h,k){a:if(d.vd())c=d.x>d.y?d.x>1-d.y?0:d.x<1-d.y?270:315:d.x<d.y?d.x>1-d.y?90:d.x<1-d.y?180:135:0.5>d.x?225:0.5<d.x?45:0;else{if(d.rp()&&(a=kn(this,b),null!==a))switch(a.be){case t.bd:c=270;break a;case t.Jc:c=180;break a;default:case t.Tc:c=0;break a;case t.Sc:c=90;break a}a=b.qb(Kb,t.K());d=null;this.oa>(g?6:2)?(k=f?this.o(1):this.o(this.oa-2),k=g?jn(a,k.copy()):c):(d=t.K(),k=k.qb(Kb,d));c=Math.abs(k.x-a.x)>Math.abs(k.y-a.y)?k.x>=a.x?0:180:k.y>=
  a.y?90:270;t.B(a);null!==d&&t.B(d)}g=Hm;g=f?this.hp:this.Xp;g===Hm&&(g=f?b.hp:b.Xp);switch(g){case Im:b=b.gl();c+=b;360<=c&&(c-=360);break;case Hm:case ek:b=b.gl();if(0===b)break;45<=b&&135>b?c+=90:135<=b&&225>b?c+=180:225<=b&&315>b&&(c+=270);360<=c&&(c-=360)}return c};V.prototype.computeEndSegmentLength=function(a,b,c,d){if(null!==b&&c.rp()&&(a=kn(this,b),null!==a))return a.Aw;a=NaN;a=d?this.ck:this.ik;null!==b&&isNaN(a)&&(a=d?b.ck:b.ik);isNaN(a)&&(a=10);return a};
  V.prototype.computeSpot=function(a){return a?gn(this,this.ud):hn(this,this.fe)};function gn(a,b){if(null===b)return Kb;var c=a.pb;c.Pc()&&(void 0===b&&(b=a.ud),null!==b&&(c=b.pb));return c===xb?wb:c}function hn(a,b){if(null===b)return Kb;var c=a.tb;c.Pc()&&(void 0===b&&(b=a.fe),null!==b&&(c=b.tb));return c===xb?wb:c}V.prototype.computeOtherPoint=function(a,b){var c=b.qb(Kb),d;d=b.Pr;d=null!==d?mn(d,this):null;null!==d&&(c=d.xp);return c};
  V.prototype.computeShortLength=function(a){return a?nn(this):on(this)};function nn(a){var b=a.ip;isNaN(b)&&(a=a.ud,null!==a&&(b=a.ip));return isNaN(b)?0:b}function on(a){var b=a.Yp;isNaN(b)&&(a=a.fe,null!==a&&(b=a.Yp));return isNaN(b)?0:b}
  V.prototype.ak=function(a,b,c,d,f,g){if(!1===this.Bf)return!1;void 0===b&&(b=null);void 0===c&&(c=null);var h=g;void 0===g&&(h=t.ph(),h.reset());h.multiply(this.transform);if(this.Im(a,h))return Xl(this,b,c,f),void 0===g&&t.We(h),!0;if(this.Tf(a,h)){var k=!1;if(!this.Vg)for(var l=this.xa.length;l--;){var m=this.xa.n[l];if(m.visible||m===this.kc){var n=m.pa,p=this.Ra;if(!(n.x>p.width||n.y>p.height||0>n.x+n.width||0>n.y+n.height)){n=t.ph();n.set(h);if(m instanceof y)k=m.ak(a,b,c,d,f,n);else if(this.path===
  m){var k=m,q=a,r=d,p=n;if(!1===k.Bf)k=!1;else if(p.multiply(k.transform),r)b:{var s=q,u=p;if(k.Im(s,u))k=!0;else{if(void 0===u&&(u=k.transform,s.Wj(k.pa))){k=!0;break b}var p=s.left,q=s.right,r=s.top,s=s.bottom,v=t.K(),D=t.K(),A=t.K(),G=t.ph();G.set(u);G.EF(k.transform);G.oA();D.x=q;D.y=r;D.transform(G);v.x=p;v.y=r;v.transform(G);u=!1;dm(k,v,D,A)?u=!0:(v.x=q,v.y=s,v.transform(G),dm(k,v,D,A)?u=!0:(D.x=p,D.y=s,D.transform(G),dm(k,v,D,A)?u=!0:(v.x=p,v.y=r,v.transform(G),dm(k,v,D,A)&&(u=!0))));t.We(G);
  t.B(v);t.B(D);t.B(A);k=u}}else k=k.Im(q,p)}else k=jk(m,a,d,n);k&&(null!==b&&(m=b(m)),m&&(null===c||c(m))&&f.add(m));t.We(n)}}}void 0===g&&t.We(h);return k||null!==this.background||null!==this.Zk}void 0===g&&t.We(h);return!1};t.A(V,{ic:"isOrthogonal"},function(){return 2===(this.nm.value&2)});t.A(V,{dj:"isAvoiding"},function(){return 4===(this.nm.value&4)});V.prototype.computeCurve=function(){if(null===this.ui){var a=this.ud,b=this.ic;this.ui=null!==a&&a===this.fe&&!b}return this.ui?Og:this.De};
  V.prototype.computeCorner=function(){if(this.De===Og)return 0;var a=this.sw;if(isNaN(a)||0>a)a=10;return a};V.prototype.computeCurviness=function(){var a=this.Ws;if(isNaN(a)){var b=this.hf;if(0!==b){var a=10,c=this.h;null!==c&&(a=c.yp);c=Math.abs(b);a=a/2+((c-1)/2|0)*a;0===c%2&&(a=-a);0>b&&(a=-a)}else a=10}return a};V.prototype.computeThickness=function(){var a=this.path;return null!==a?Math.max(a.fb,1):1};V.prototype.hasCurviness=function(){return!isNaN(this.Ws)||0!==this.hf&&!this.ic};
  V.prototype.adjustPoints=function(a,b,c,d){var f=this.Lo;if(this.ic){if(f===Xk)return!1;f===Yk&&(f=Wk)}switch(f){case Xk:var g=this.o(a),h=this.o(c);if(!g.M(b)||!h.M(d)){var f=g.x,g=g.y,k=h.x-f,l=h.y-g,m=Math.sqrt(k*k+l*l);if(!H.I(m,0)){var n;H.I(k,0)?n=0>l?-Math.PI/2:Math.PI/2:(n=Math.atan(l/Math.abs(k)),0>k&&(n=Math.PI-n));var h=b.x,p=b.y,k=d.x-h,q=d.y-p,l=Math.sqrt(k*k+q*q);H.I(k,0)?q=0>q?-Math.PI/2:Math.PI/2:(q=Math.atan(q/Math.abs(k)),0>k&&(q=Math.PI-q));m=l/m;n=q-n;this.Ef(a,b);for(a+=1;a<c;a++)b=
  this.o(a),k=b.x-f,l=b.y-g,b=Math.sqrt(k*k+l*l),H.I(b,0)||(H.I(k,0)?l=0>l?-Math.PI/2:Math.PI/2:(l=Math.atan(l/Math.abs(k)),0>k&&(l=Math.PI-l)),k=l+n,b*=m,this.Y(a,h+b*Math.cos(k),p+b*Math.sin(k)));this.Ef(c,d)}}return!0;case Yk:g=this.o(a);p=this.o(c);if(!g.M(b)||!p.M(d)){f=g.x;g=g.y;h=p.x;p=p.y;m=(h-f)*(h-f)+(p-g)*(p-g);k=b.x;n=b.y;var l=d.x,q=d.y,r=0,s=1,r=0!==l-k?(q-n)/(l-k):9E9;0!==r&&(s=Math.sqrt(1+1/(r*r)));this.Ef(a,b);for(a+=1;a<c;a++){b=this.o(a);var u=b.x,v=b.y,D=0.5;0!==m&&(D=((f-u)*(f-
  h)+(g-v)*(g-p))/m);var A=f+D*(h-f),G=g+D*(p-g);b=Math.sqrt((u-A)*(u-A)+(v-G)*(v-G));v<r*(u-A)+G&&(b=-b);0<r&&(b=-b);u=k+D*(l-k);D=n+D*(q-n);0!==r?(b=u+b/s,this.Y(a,b,D-(b-u)/r)):this.Y(a,u,D+b)}this.Ef(c,d)}return!0;case Wk:return this.ic&&(f=this.o(a),g=this.o(a+1),h=this.o(a+2),H.I(f.y,g.y)?H.I(g.x,h.x)?this.Y(a+1,g.x,b.y):H.I(g.y,h.y)&&this.Y(a+1,b.x,g.y):H.I(f.x,g.x)&&(H.I(g.y,h.y)?this.Y(a+1,b.x,g.y):H.I(g.x,h.x)&&this.Y(a+1,g.x,b.y)),f=this.o(c),g=this.o(c-1),h=this.o(c-2),H.I(f.y,g.y)?H.I(g.x,
  h.x)?this.Y(c-1,g.x,d.y):H.I(g.y,h.y)&&this.Y(c-1,d.x,g.y):H.I(f.x,g.x)&&(H.I(g.y,h.y)?this.Y(c-1,d.x,g.y):H.I(g.x,h.x)&&this.Y(c-1,g.x,d.y))),this.Ef(a,b),this.Ef(c,d),!0;default:return!1}};
  V.prototype.addOrthoPoints=function(a,b,c,d,f,g){b=-45<=b&&45>b?0:45<=b&&135>b?90:135<=b&&225>b?180:270;d=-45<=d&&45>d?0:45<=d&&135>d?90:135<=d&&225>d?180:270;var h=f.pa.copy(),k=g.pa.copy();if(h.N()&&k.N()){h.Sf(8,8);k.Sf(8,8);h.kj(a);k.kj(c);var l,m;if(0===b)if(c.x>a.x||270===d&&c.y<a.y&&k.right>a.x||90===d&&c.y>a.y&&k.right>a.x)l=new w(c.x,a.y),m=new w(c.x,(a.y+c.y)/2),180===d?(l.x=this.computeMidOrthoPosition(a.x,c.x,!1),m.x=l.x,m.y=c.y):270===d&&c.y<a.y||90===d&&c.y>a.y?(l.x=a.x<k.left?this.computeMidOrthoPosition(a.x,
  k.left,!1):a.x<k.right&&(270===d&&a.y<k.top||90===d&&a.y>k.bottom)?this.computeMidOrthoPosition(a.x,c.x,!1):k.right,m.x=l.x,m.y=c.y):0===d&&a.x<k.left&&a.y>k.top&&a.y<k.bottom&&(l.x=a.x,l.y=a.y<c.y?Math.min(c.y,k.top):Math.max(c.y,k.bottom),m.y=l.y);else{l=new w(a.x,c.y);m=new w((a.x+c.x)/2,c.y);if(180===d||90===d&&c.y<h.top||270===d&&c.y>h.bottom)180===d&&(k.Ga(a)||h.Ga(c))?l.y=this.computeMidOrthoPosition(a.y,c.y,!0):c.y<a.y&&(180===d||90===d)?l.y=this.computeMidOrthoPosition(h.top,Math.max(c.y,
  k.bottom),!0):c.y>a.y&&(180===d||270===d)&&(l.y=this.computeMidOrthoPosition(h.bottom,Math.min(c.y,k.top),!0)),m.x=c.x,m.y=l.y;if(l.y>h.top&&l.y<h.bottom)if(c.x>=h.left&&c.x<=a.x||a.x<=k.right&&a.x>=c.x){if(90===d||270===d)l=new w(Math.max((a.x+c.x)/2,a.x),a.y),m=new w(l.x,c.y)}else l.y=270===d||(0===d||180===d)&&c.y<a.y?Math.min(c.y,0===d?h.top:Math.min(h.top,k.top)):Math.max(c.y,0===d?h.bottom:Math.max(h.bottom,k.bottom)),m.x=c.x,m.y=l.y}else if(180===b)if(c.x<a.x||270===d&&c.y<a.y&&k.left<a.x||
  90===d&&c.y>a.y&&k.left<a.x)l=new w(c.x,a.y),m=new w(c.x,(a.y+c.y)/2),0===d?(l.x=this.computeMidOrthoPosition(a.x,c.x,!1),m.x=l.x,m.y=c.y):270===d&&c.y<a.y||90===d&&c.y>a.y?(l.x=a.x>k.right?this.computeMidOrthoPosition(a.x,k.right,!1):a.x>k.left&&(270===d&&a.y<k.top||90===d&&a.y>k.bottom)?this.computeMidOrthoPosition(a.x,c.x,!1):k.left,m.x=l.x,m.y=c.y):180===d&&a.x>k.right&&a.y>k.top&&a.y<k.bottom&&(l.x=a.x,l.y=a.y<c.y?Math.min(c.y,k.top):Math.max(c.y,k.bottom),m.y=l.y);else{l=new w(a.x,c.y);m=new w((a.x+
  c.x)/2,c.y);if(0===d||90===d&&c.y<h.top||270===d&&c.y>h.bottom)0===d&&(k.Ga(a)||h.Ga(c))?l.y=this.computeMidOrthoPosition(a.y,c.y,!0):c.y<a.y&&(0===d||90===d)?l.y=this.computeMidOrthoPosition(h.top,Math.max(c.y,k.bottom),!0):c.y>a.y&&(0===d||270===d)&&(l.y=this.computeMidOrthoPosition(h.bottom,Math.min(c.y,k.top),!0)),m.x=c.x,m.y=l.y;if(l.y>h.top&&l.y<h.bottom)if(c.x<=h.right&&c.x>=a.x||a.x>=k.left&&a.x<=c.x){if(90===d||270===d)l=new w(Math.min((a.x+c.x)/2,a.x),a.y),m=new w(l.x,c.y)}else l.y=270===
  d||(0===d||180===d)&&c.y<a.y?Math.min(c.y,180===d?h.top:Math.min(h.top,k.top)):Math.max(c.y,180===d?h.bottom:Math.max(h.bottom,k.bottom)),m.x=c.x,m.y=l.y}else if(90===b)if(c.y>a.y||180===d&&c.x<a.x&&k.bottom>a.y||0===d&&c.x>a.x&&k.bottom>a.y)l=new w(a.x,c.y),m=new w((a.x+c.x)/2,c.y),270===d?(l.y=this.computeMidOrthoPosition(a.y,c.y,!0),m.x=c.x,m.y=l.y):180===d&&c.x<a.x||0===d&&c.x>a.x?(l.y=a.y<k.top?this.computeMidOrthoPosition(a.y,k.top,!0):a.y<k.bottom&&(180===d&&a.x<k.left||0===d&&a.x>k.right)?
  this.computeMidOrthoPosition(a.y,c.y,!0):k.bottom,m.x=c.x,m.y=l.y):90===d&&a.y<k.top&&a.x>k.left&&a.x<k.right&&(l.x=a.x<c.x?Math.min(c.x,k.left):Math.max(c.x,k.right),l.y=a.y,m.x=l.x);else{l=new w(c.x,a.y);m=new w(c.x,(a.y+c.y)/2);if(270===d||0===d&&c.x<h.left||180===d&&c.x>h.right)270===d&&(k.Ga(a)||h.Ga(c))?l.x=this.computeMidOrthoPosition(a.x,c.x,!1):c.x<a.x&&(270===d||0===d)?l.x=this.computeMidOrthoPosition(h.left,Math.max(c.x,k.right),!1):c.x>a.x&&(270===d||180===d)&&(l.x=this.computeMidOrthoPosition(h.right,
  Math.min(c.x,k.left),!1)),m.x=l.x,m.y=c.y;if(l.x>h.left&&l.x<h.right)if(c.y>=h.top&&c.y<=a.y||a.y<=k.bottom&&a.y>=c.y){if(0===d||180===d)l=new w(a.x,Math.max((a.y+c.y)/2,a.y)),m=new w(c.x,l.y)}else l.x=180===d||(90===d||270===d)&&c.x<a.x?Math.min(c.x,90===d?h.left:Math.min(h.left,k.left)):Math.max(c.x,90===d?h.right:Math.max(h.right,k.right)),m.x=l.x,m.y=c.y}else if(c.y<a.y||180===d&&c.x<a.x&&k.top<a.y||0===d&&c.x>a.x&&k.top<a.y)l=new w(a.x,c.y),m=new w((a.x+c.x)/2,c.y),90===d?(l.y=this.computeMidOrthoPosition(a.y,
  c.y,!0),m.x=c.x,m.y=l.y):180===d&&c.x<a.x||0===d&&c.x>=a.x?(l.y=a.y>k.bottom?this.computeMidOrthoPosition(a.y,k.bottom,!0):a.y>k.top&&(180===d&&a.x<k.left||0===d&&a.x>k.right)?this.computeMidOrthoPosition(a.y,c.y,!0):k.top,m.x=c.x,m.y=l.y):270===d&&a.y>k.bottom&&a.x>k.left&&a.x<k.right&&(l.x=a.x<c.x?Math.min(c.x,k.left):Math.max(c.x,k.right),l.y=a.y,m.x=l.x);else{l=new w(c.x,a.y);m=new w(c.x,(a.y+c.y)/2);if(90===d||0===d&&c.x<h.left||180===d&&c.x>h.right)90===d&&(k.Ga(a)||h.Ga(c))?l.x=this.computeMidOrthoPosition(a.x,
  c.x,!1):c.x<a.x&&(90===d||0===d)?l.x=this.computeMidOrthoPosition(h.left,Math.max(c.x,k.right),!1):c.x>a.x&&(90===d||180===d)&&(l.x=this.computeMidOrthoPosition(h.right,Math.min(c.x,k.left),!1)),m.x=l.x,m.y=c.y;if(l.x>h.left&&l.x<h.right)if(c.y<=h.bottom&&c.y>=a.y||a.y>=k.top&&a.y<=c.y){if(0===d||180===d)l=new w(a.x,Math.min((a.y+c.y)/2,a.y)),m=new w(c.x,l.y)}else l.x=180===d||(90===d||270===d)&&c.x<a.x?Math.min(c.x,270===d?h.left:Math.min(h.left,k.left)):Math.max(c.x,270===d?h.right:Math.max(h.right,
  k.right)),m.x=l.x,m.y=c.y}var n=l,p=m;if(this.dj){var q=this.h,r;(r=null===q)||(q.Zb.yg?r=!1:(r=q.Ua,r=r instanceof cf?!r.Nv||r.bF:!0),r=!r);if(r||h.Ga(c)||k.Ga(a)||f===g||this.layer.yc)a=!1;else if(f=Nj(q,this),pn(f,Math.min(a.x,n.x),Math.min(a.y,n.y),Math.abs(a.x-n.x),Math.abs(a.y-n.y))&&pn(f,Math.min(n.x,p.x),Math.min(n.y,p.y),Math.abs(n.x-p.x),Math.abs(n.y-p.y))&&pn(f,Math.min(p.x,c.x),Math.min(p.y,c.y),Math.abs(p.x-c.x),Math.abs(p.y-c.y)))a=!1;else if(h=h.copy().lj(k),h.Sf(2*f.Fm,2*f.Em),qn(f,
  a,b,c,d,h),k=rn(f,c.x,c.y),f.abort||k!==sn||(Qj(f),k=f.tG,h.Sf(f.Fm*k,f.Em*k),qn(f,a,b,c,d,h),k=rn(f,c.x,c.y)),f.abort||k!==sn||(Qj(f),k=f.lF,h.Sf(f.Fm*k,f.Em*k),qn(f,a,b,c,d,h),k=rn(f,c.x,c.y)),!f.abort&&k===sn&&f.YG&&(Qj(f),qn(f,a,b,c,d,f.Ob),k=rn(f,c.x,c.y)),!f.abort&&k<sn&&0!==rn(f,c.x,c.y)){tn(this,f,c.x,c.y,d,!0);d=this.o(2);if(4>this.oa)0===b||180===b?(d.x=a.x,d.y=c.y):(d.x=c.x,d.y=a.y),this.Y(2,d.x,d.y),this.C(3,d.x,d.y);else if(c=this.o(3),0===b||180===b)H.I(d.x,c.x)?(b=0===b?Math.max(d.x,
  a.x):Math.min(d.x,a.x),this.Y(2,b,a.y),this.Y(3,b,c.y)):H.I(d.y,c.y)?(Math.abs(a.y-d.y)<=f.Em/2&&(this.Y(2,d.x,a.y),this.Y(3,c.x,a.y)),this.C(2,d.x,a.y)):this.Y(2,a.x,d.y);else if(90===b||270===b)H.I(d.y,c.y)?(b=90===b?Math.max(d.y,a.y):Math.min(d.y,a.y),this.Y(2,a.x,b),this.Y(3,c.x,b)):H.I(d.x,c.x)?(Math.abs(a.x-d.x)<=f.Fm/2&&(this.Y(2,a.x,d.y),this.Y(3,a.x,c.y)),this.C(2,a.x,d.y)):this.Y(2,d.x,a.y);a=!0}else a=!1}else a=!1;a||(this.Wh(l),this.Wh(m))}};
  V.prototype.computeMidOrthoPosition=function(a,b){if(this.hasCurviness()){var c=this.computeCurviness();return(a+b)/2+c}return(a+b)/2};function Bf(a){if(!a.dj)return!1;var b=a.points.n,c=b.length;if(4>c)return!1;a=Nj(a.h,a);for(var d=1;d<c-2;d++){var f=b[d],g=b[d+1];if(!pn(a,Math.min(f.x,g.x),Math.min(f.y,g.y),Math.abs(f.x-g.x),Math.abs(f.y-g.y)))return!0}return!1}
  function tn(a,b,c,d,f,g){var h=b.Fm,k=b.Em,l=rn(b,c,d),m=c,n=d;for(0===f?m+=h:90===f?n+=k:180===f?m-=h:n-=k;l>un&&rn(b,m,n)===l-vn;)c=m,d=n,0===f?m+=h:90===f?n+=k:180===f?m-=h:n-=k,l-=vn;if(g){if(l>un)if(180===f||0===f)c=Math.floor(c/h)*h+h/2;else if(90===f||270===f)d=Math.floor(d/k)*k+k/2}else c=Math.floor(c/h)*h+h/2,d=Math.floor(d/k)*k+k/2;l>un&&(g=f,m=c,n=d,0===f?(g=90,n+=k):90===f?(g=180,m-=h):180===f?(g=270,n-=k):270===f&&(g=0,m+=h),rn(b,m,n)===l-vn?tn(a,b,m,n,g,!1):(m=c,n=d,0===f?(g=270,n-=
  k):90===f?(g=0,m+=h):180===f?(g=90,n+=k):270===f&&(g=180,m-=h),rn(b,m,n)===l-vn&&tn(a,b,m,n,g,!1)));a.Wk(c,d)}V.prototype.findClosestSegment=function(a){e&&t.l(a,w,V,"findClosestSegment:p");var b=a.x;a=a.y;for(var c=this.o(0),d=this.o(1),f=Ra(b,a,c.x,c.y,d.x,d.y),g=0,h=1;h<this.oa-1;h++){var c=this.o(h+1),k=Ra(b,a,d.x,d.y,c.x,c.y),d=c;k<f&&(g=h,f=k)}return g};V.prototype.invalidateGeometry=V.prototype.Ye=function(){this.Ji=this.Oa=null;this.fa()};
  t.A(V,{nd:"geometry"},function(){null===this.Oa&&(this.updateRoute(),this.Oa=this.makeGeometry());return this.Oa});V.prototype.bx=function(){if(null===this.Oa&&!1!==this.rg){this.Oa=this.makeGeometry();var a=this.Rq();if(null!==a){a.Oa=this.Oa;for(var b=this.xa,c=b.length,d=0;d<c;d++){var f=b.n[d];f!==a&&f.fj&&f instanceof W&&(f.Oa=this.Oa)}}}};
  V.prototype.makeGeometry=function(){var a=this.oa;if(2>a){var b=new zc(Ac),c=new Bc(0,0);b.Ab.add(c);return b}var d=!1,b=this.h;null!==b&&0!==b.ja.Je&&dn(this)&&(d=!0);var f=this.o(0).copy(),g=f.copy(),h=this.computeCurve();if(h===Og&&3<=a&&!H.nb(this.ln,0))if(3===a)var k=this.o(1),b=Math.min(f.x,k.x),c=Math.min(f.y,k.y),k=this.o(2),b=Math.min(b,k.x),c=Math.min(c,k.y);else{if(this.ic)for(k=0;k<a;k++)b=this.Cc.n[k],g.x=Math.min(b.x,g.x),g.y=Math.min(b.y,g.y);else for(var l,k=3;k<a;k+=3)k+3>=a&&(k=
  a-1),l=this.o(k),g.x=Math.min(l.x,g.x),g.y=Math.min(l.y,g.y);b=g.x;c=g.y}else{for(k=0;k<a;k++)b=this.Cc.n[k],g.x=Math.min(b.x,g.x),g.y=Math.min(b.y,g.y);b=g.x;c=g.y}b-=this.Az.x;c-=this.Az.y;f.x-=b;f.y-=c;if(2===a){var m=this.o(1).copy();m.x-=b;m.y-=c;0!==nn(this)&&wn(this,f,!0,g);0!==on(this)&&wn(this,m,!1,g);b=new zc(Dc);b.qa=f.x;b.ra=f.y;b.D=m.x;b.F=m.y}else{m=t.u();0!==nn(this)&&wn(this,f,!0,g);J(m,f.x,f.y,!1,!1);if(h===Og&&3<=a&&!H.nb(this.ln,0))if(3===a)k=this.o(1),a=k.x-b,d=k.y-c,k=this.o(2).copy(),
  k.x-=b,k.y-=c,0!==on(this)&&wn(this,k,!1,g),K(m,a,d,a,d,k.x,k.y);else if(this.ic){g=new w(b,c);f=this.o(1).copy();h=new w(b,c);a=new w(b,c);d=this.o(0);l=null;for(var n=this.ln/3,k=1;k<this.oa-1;k++){l=this.o(k);var p=d,q=l,r=this.o(xn(this,l,k,!1));if(!H.nb(p.x,q.x)||!H.nb(q.x,r.x))if(!H.nb(p.y,q.y)||!H.nb(q.y,r.y)){var s=n,u=h,v=a;isNaN(s)&&(s=this.ln/3);var D=p.x,p=p.y,A=q.x,q=q.y,G=r.x,r=r.y,L=s*yn(D,p,A,q),s=s*yn(A,q,G,r);H.nb(p,q)&&H.nb(A,G)&&(A>D?r>q?(u.x=A-L,u.y=q-L,v.x=A+s,v.y=q+s):(u.x=
  A-L,u.y=q+L,v.x=A+s,v.y=q-s):r>q?(u.x=A+L,u.y=q-L,v.x=A-s,v.y=q+s):(u.x=A+L,u.y=q+L,v.x=A-s,v.y=q-s));H.nb(D,A)&&H.nb(q,r)&&(q>p?(G>A?(u.x=A-L,u.y=q-L,v.x=A+s):(u.x=A+L,u.y=q-L,v.x=A-s),v.y=q+s):(G>A?(u.x=A-L,u.y=q+L,v.x=A+s):(u.x=A+L,u.y=q+L,v.x=A-s),v.y=q-s));if(H.nb(D,A)&&H.nb(A,G)||H.nb(p,q)&&H.nb(q,r))D=0.5*(D+G),p=0.5*(p+r),u.x=D,u.y=p,v.x=D,v.y=p;1===k?(f.x=0.5*(d.x+l.x),f.y=0.5*(d.y+l.y)):2===k&&H.nb(d.x,this.o(0).x)&&H.nb(d.y,this.o(0).y)&&(f.x=0.5*(d.x+l.x),f.y=0.5*(d.y+l.y));K(m,f.x-b,
  f.y-c,h.x-b,h.y-c,l.x-b,l.y-c);g.set(h);f.set(a);d=l}}k=d.x;d=d.y;g=this.o(this.oa-1);k=0.5*(k+g.x);d=0.5*(d+g.y);K(m,a.x-b,a.y-c,k-b,d-c,g.x-b,g.y-c)}else for(k=3;k<a;k+=3)d=this.o(k-2),k+3>=a&&(k=a-1),g=this.o(k-1),l=this.o(k),k===a-1&&0!==on(this)&&(l=l.copy(),wn(this,l,!1,H.nj)),K(m,d.x-b,d.y-c,g.x-b,g.y-c,l.x-b,l.y-c);else{g=t.K();g.assign(this.o(0));for(k=1;k<a;){k=xn(this,g,k,1<k);u=this.o(k);if(k>=a-1){g!==u&&(0!==on(this)&&(u=u.copy(),wn(this,u,!1,H.nj)),zn(this,m,-b,-c,g,u,d));break}k=xn(this,
  u,k+1,k<a-3);f=m;h=-b;l=-c;n=g;v=this.o(k);D=g;p=d;H.I(n.y,u.y)&&H.I(u.x,v.x)?(s=this.computeCorner(),s=Math.min(s,Math.abs(u.x-n.x)/2),s=A=Math.min(s,Math.abs(v.y-u.y)/2),H.I(s,0)?(zn(this,f,h,l,n,u,p),D.assign(u)):(q=u.x,G=u.y,r=q,L=G,q=u.x>n.x?u.x-s:u.x+s,L=v.y>u.y?u.y+A:u.y-A,zn(this,f,h,l,n,new w(q,G),p),Sc(f,u.x+h,u.y+l,r+h,L+l),D.p(r,L))):H.I(n.x,u.x)&&H.I(u.y,v.y)?(s=this.computeCorner(),A=Math.min(s,Math.abs(u.y-n.y)/2),A=s=Math.min(A,Math.abs(v.x-u.x)/2),H.I(s,0)?(zn(this,f,h,l,n,u,p),D.assign(u)):
  (q=u.x,L=G=u.y,G=u.y>n.y?u.y-A:u.y+A,r=v.x>u.x?u.x+s:u.x-s,zn(this,f,h,l,n,new w(q,G),p),Sc(f,u.x+h,u.y+l,r+h,L+l),D.p(r,L))):(zn(this,f,h,l,n,u,p),D.assign(u))}t.B(g)}b=m.s;t.v(m)}return b};function yn(a,b,c,d){a=c-a;if(isNaN(a)||Infinity===a||-Infinity===a)return NaN;0>a&&(a=-a);b=d-b;if(isNaN(b)||Infinity===b||-Infinity===b)return NaN;0>b&&(b=-b);return H.nb(a,0)?b:H.nb(b,0)?a:Math.sqrt(a*a+b*b)}
  function wn(a,b,c,d){var f=a.oa;if(!(2>f))if(c){var g=a.o(1);c=g.x-d.x;d=g.y-d.y;g=yn(b.x,b.y,c,d);0!==g&&(f=2===f?0.5*g:g,a=nn(a),a>f&&(a=f),c=a*(c-b.x)/g,a=a*(d-b.y)/g,b.x+=c,b.y+=a)}else g=a.o(f-2),c=g.x-d.x,d=g.y-d.y,g=yn(b.x,b.y,c,d),0!==g&&(f=2===f?0.5*g:g,a=on(a),a>f&&(a=f),c=a*(b.x-c)/g,a=a*(b.y-d)/g,b.x-=c,b.y-=a)}
  function xn(a,b,c,d){for(var f=a.oa,g=b;H.nb(b.x,g.x)&&H.nb(b.y,g.y);){if(c>=f)return f-1;g=a.o(c++)}if(!H.nb(b.x,g.x)&&!H.nb(b.y,g.y))return c-1;for(var h=g;H.nb(b.x,g.x)&&H.nb(g.x,h.x)&&(!d||(b.y>=g.y?g.y>=h.y:g.y<=h.y))||H.nb(b.y,g.y)&&H.nb(g.y,h.y)&&(!d||(b.x>=g.x?g.x>=h.x:g.x<=h.x));){if(c>=f)return f-1;h=a.o(c++)}return c-2}
  function zn(a,b,c,d,f,g,h){if(!h&&dn(a)){h=[];var k=0;a.Qa()&&(k=An(a,f,g,h));var l=f.x,l=f.y;if(0<k)if(H.I(f.y,g.y))if(f.x<g.x)for(var m=0;m<k;){var n=Math.max(f.x,Math.min(h[m++]-5,g.x-10));b.lineTo(n+c,g.y+d);for(var l=n+c,p=Math.min(n+10,g.x);m<k;){var q=h[m];if(q<p+10)m++,p=Math.min(q+5,g.x);else break}q=(n+p)/2+c;q=g.y-10+d;n=p+c;p=g.y+d;a.De===xg?J(b,n,p,!1,!1):K(b,l,q,n,q,n,p)}else for(m=k-1;0<=m;){n=Math.min(f.x,Math.max(h[m--]+5,g.x+10));b.lineTo(n+c,g.y+d);l=n+c;for(p=Math.max(n-10,g.x);0<=
  m;)if(q=h[m],q>p-10)m--,p=Math.max(q-5,g.x);else break;q=g.y-10+d;n=p+c;p=g.y+d;a.De===xg?J(b,n,p,!1,!1):K(b,l,q,n,q,n,p)}else if(H.I(f.x,g.x))if(f.y<g.y)for(m=0;m<k;){n=Math.max(f.y,Math.min(h[m++]-5,g.y-10));b.lineTo(g.x+c,n+d);l=n+d;for(p=Math.min(n+10,g.y);m<k;)if(q=h[m],q<p+10)m++,p=Math.min(q+5,g.y);else break;q=g.x-10+c;n=g.x+c;p+=d;a.De===xg?J(b,n,p,!1,!1):K(b,q,l,q,p,n,p)}else for(m=k-1;0<=m;){n=Math.min(f.y,Math.max(h[m--]+5,g.y+10));b.lineTo(g.x+c,n+d);l=n+d;for(p=Math.max(n-10,g.y);0<=
  m;)if(q=h[m],q>p-10)m--,p=Math.max(q-5,g.y);else break;q=g.x-10+c;n=g.x+c;p+=d;a.De===xg?J(b,n,p,!1,!1):K(b,q,l,q,p,n,p)}}b.lineTo(g.x+c,g.y+d)}
  function An(a,b,c,d){var f=a.h;if(null===f||b.M(c))return 0;for(f=f.Yw;f.next();){var g=f.value;if(null!==g&&g.visible)for(var g=g.Fb.n,h=g.length,k=0;k<h;k++){var l=g[k];if(l===a)return 0<d.length&&d.sort(function(a,b){return a-b}),d.length;if(l instanceof V&&l.Qa()&&dn(l)){var m=l.vj();m.N()&&a.vj().Tf(m)&&!a.usesSamePort(l)&&(m=l.path,null!==m&&m.ol()&&Bn(b,c,d,l))}}}0<d.length&&d.sort(function(a,b){return a-b});return d.length}
  function Bn(a,b,c,d){for(var f=H.I(a.y,b.y),g=d.oa,h=d.o(0),k=t.K(),l=1;l<g;l++){var m=d.o(l);if(l<g-1){var n=d.o(l+1);if(h.y===m.y&&m.y===n.y){if(m.x>h.x&&n.x>m.x||m.x<h.x&&n.x<m.x)m=n,l++}else h.x===m.x&&m.x===n.x&&(m.y>h.y&&n.y>m.y||m.y<h.y&&n.y<m.y)&&(m=n,l++)}a:{var n=k,p=a.x,q=a.y,r=b.x,s=b.y,u=h.x,h=h.y,v=m.x,D=m.y;if(!H.I(p,r)){if(H.I(q,s)&&H.I(u,v)&&Math.min(p,r)<u&&Math.max(p,r)>u&&Math.min(h,D)<q&&Math.max(h,D)>q&&!H.I(h,D)){n.x=u;n.y=q;n=!0;break a}}else if(!H.I(q,s)&&H.I(h,D)&&Math.min(q,
  s)<h&&Math.max(q,s)>h&&Math.min(u,v)<p&&Math.max(u,v)>p&&!H.I(u,v)){n.x=p;n.y=h;n=!0;break a}n.x=0;n.y=0;n=!1}n&&(f?c.push(k.x):c.push(k.y));h=m}t.B(k)}t.A(V,{ft:"firstPickIndex"},function(){return 2>=this.oa?0:this.ic||gn(this)!==wb?1:0});t.A(V,{Ww:"lastPickIndex"},function(){var a=this.oa;return 0===a?0:2>=a?a-1:this.ic||hn(this)!==wb?a-2:a-1});function dn(a){a=a.De;return a===wg||a===xg}function fn(a,b){if(b||dn(a)){var c=a.h;null===c||c.Pl.contains(a)||null===a.pz||c.Pl.add(a,a.pz)}}
  function zg(a,b){var c=a.layer;if(null!==c&&c.visible&&!c.yc){var d=c.h;if(null!==d)for(var f=!1,d=d.Yw;d.next();){var g=d.value;if(g.visible)if(g===c)for(var f=!0,h=!1,g=g.Fb.n,k=g.length,l=0;l<k;l++){var m=g[l];m instanceof V&&(m===a?h=!0:h&&Cn(a,m,b))}else if(f)for(g=g.Fb.n,k=g.length,l=0;l<k;l++)m=g[l],m instanceof V&&Cn(a,m,b)}}}function Cn(a,b,c){if(null!==b&&dn(b)&&null!==b.Oa){var d=b.vj();d.N()&&(a.vj().Tf(d)||c.Tf(d))&&(a.usesSamePort(b)||b.Ye())}}
  V.prototype.usesSamePort=function(a){var b=this.oa,c=a.oa;if(0<b&&0<c){if(this.o(0).tf(a.o(0))||this.o(b-1).tf(a.o(c-1)))return!0}else if(this.aa===a.aa||this.ca===a.ca)return!0;return!1};V.prototype.df=function(a){E.prototype.df.call(this,a);a&&this.updateRoute();if(null!==this.we)for(var b=this.we.k;b.next();)b.value.df(a)};t.g(V,"adjusting",V.prototype.Lo);
  t.defineProperty(V,{Lo:"adjusting"},function(){return this.lq},function(a){var b=this.lq;b!==a&&(e&&t.Aa(a,V,V,"adjusting"),this.lq=a,this.j("adjusting",b,a))});t.g(V,"corner",V.prototype.sw);t.defineProperty(V,{sw:"corner"},function(){return this.yq},function(a){var b=this.yq;b!==a&&(e&&t.i(a,"number",V,"corner"),this.yq=a,this.Ye(),this.j("corner",b,a))});t.g(V,"curve",V.prototype.De);
  t.defineProperty(V,{De:"curve"},function(){return this.Bq},function(a){var b=this.Bq;b!==a&&(e&&t.Aa(a,V,V,"curve"),this.Bq=a,this.ac(),fn(this,b===xg||b===wg||a===xg||a===wg),this.j("curve",b,a))});t.g(V,"curviness",V.prototype.Ws);t.defineProperty(V,{Ws:"curviness"},function(){return this.Cq},function(a){var b=this.Cq;b!==a&&(e&&t.i(a,"number",V,"curviness"),this.Cq=a,this.ac(),this.j("curviness",b,a))});t.g(V,"routing",V.prototype.Kt);
  t.defineProperty(V,{Kt:"routing"},function(){return this.nm},function(a){var b=this.nm;b!==a&&(e&&t.Aa(a,V,V,"routing"),this.nm=a,this.ui=null,this.ac(),fn(this,2===(b.value&2)||2===(a.value&2)),this.j("routing",b,a))});t.g(V,"smoothness",V.prototype.ln);t.defineProperty(V,{ln:"smoothness"},function(){return this.ps},function(a){var b=this.ps;b!==a&&(e&&t.i(a,"number",V,"smoothness"),this.ps=a,this.Ye(),this.j("smoothness",b,a))});
  function bn(a){var b=a.eg;if(null!==b){var c=a.qg;if(null!==c){var d=a.Ch,f=a.Sh;a:{if(null!==c&&null!==b.rh)for(a=b.rh.k;a.next();){var g=a.value;if(g.Hp===b&&g.zt===c&&g.ix===d&&g.jx===f||g.Hp===c&&g.zt===b&&g.ix===f&&g.jx===d){a=g;break a}}a=null}for(var h=g=null,k=b.mc.n,l=k.length,m=0;m<l;m++){var n=k[m];if(n.eg===b&&n.Ch===d&&n.qg===c&&n.Sh===f||n.eg===c&&n.Ch===f&&n.qg===b&&n.Sh===d)null===h?h=n:(null===g&&(g=new B(V),g.add(h)),g.add(n))}if(null!==g)for(null===a&&(a=new Lm,a.Hp=b,a.ix=d,a.zt=
  c,a.jx=f,Km(b,a),Km(c,a)),a.links=g,m=0;m<g.count;m++)if(n=g.n[m],0===n.hf){b=1;for(c=0;c<g.count;c++)Math.abs(g.n[c].hf)===b&&(b++,c=-1);n.xn=a;n.hf=n.aa===a.Hp?b:-b;b=n.h;(null===b||b.lf)&&n.ac()}}}}
  function an(a){var b=a.xn;if(null!==b){var c=a.hf;a.xn=null;a.hf=0;b.links.remove(a);if(2>b.links.count)1===b.links.count&&(c=b.links.n[0],c.xn=null,c.hf=0,c.ac()),c=b.Hp,null!==b&&null!==c.rh&&c.rh.remove(b),c=b.zt,null!==b&&null!==c.rh&&c.rh.remove(b);else for(c=Math.abs(c),a=0===c%2,b=b.links.k;b.next();){var d=b.value,f=Math.abs(d.hf),g=0===f%2;f>c&&a===g&&(d.hf=0<d.hf?d.hf-2:d.hf+2,d.ac())}}}function Lm(){t.Ac(this);this.links=this.jx=this.zt=this.ix=this.Hp=null}
  t.Vd(Lm,{Hp:!0,ix:!0,zt:!0,jx:!0,links:!0,spacing:!0});function Oj(){t.Ac(this);this.group=null;this.mt=!0;this.abort=!1;this.kg=this.jg=1;this.vr=this.ur=-1;this.je=this.ie=8;this.uc=null;this.YG=!1;this.tG=22;this.lF=111}t.Vd(Oj,{group:!0,mt:!0,abort:!0,YG:!0,tG:!0,lF:!0});var un=1,vn=1,sn=999999999,Dn=sn;
  Oj.prototype.initialize=function(a){if(!(0>=a.width||0>=a.height)){var b=a.y,c=a.x+a.width,d=a.y+a.height;this.jg=Math.floor((a.x-this.ie)/this.ie)*this.ie;this.kg=Math.floor((b-this.je)/this.je)*this.je;this.ur=Math.ceil((c+2*this.ie)/this.ie)*this.ie;this.vr=Math.ceil((d+2*this.je)/this.je)*this.je;a=1+(Math.ceil((this.ur-this.jg)/this.ie)|0);b=1+(Math.ceil((this.vr-this.kg)/this.je)|0);if(null===this.uc||this.Go<a-1||this.Ho<b-1){c=[];for(d=0;d<=a;d++){for(var f=[],g=0;g<=b;g++)f[g]=0;c[d]=f}this.uc=
  c;this.Go=a-1;this.Ho=b-1}if(null!==this.uc)for(a=0;a<=this.Go;a++)for(b=0;b<=this.Ho;b++)this.uc[a][b]=Dn}};t.A(Oj,{Ob:null},function(){return new x(this.jg,this.kg,this.ur-this.jg,this.vr-this.kg)});t.g(Oj,"cellWidth",Oj.prototype.Fm);t.defineProperty(Oj,{Fm:null},function(){return this.ie},function(a){0<a&&a!==this.ie&&(this.ie=a,this.initialize(this.Ob))});t.g(Oj,"cellHeight",Oj.prototype.Em);t.defineProperty(Oj,{Em:null},function(){return this.je},function(a){0<a&&a!==this.je&&(this.je=a,this.initialize(this.Ob))});
  function En(a,b,c){return a.jg<=b&&b<=a.ur&&a.kg<=c&&c<=a.vr}function rn(a,b,c){if(!En(a,b,c))return 0;b-=a.jg;b/=a.ie;c-=a.kg;c/=a.je;return a.uc[b|0][c|0]}function Rj(a,b,c){En(a,b,c)&&(b-=a.jg,b/=a.ie,c-=a.kg,c/=a.je,a.uc[b|0][c|0]=0)}function Qj(a){if(null!==a.uc)for(var b=0;b<=a.Go;b++)for(var c=0;c<=a.Ho;c++)a.uc[b][c]>=un&&(a.uc[b][c]|=sn)}
  function pn(a,b,c,d,f){if(b>a.ur||b+d<a.jg||c>a.vr||c+f<a.kg)return!0;b=(b-a.jg)/a.ie|0;c=(c-a.kg)/a.je|0;d=Math.max(0,d)/a.ie+1|0;var g=Math.max(0,f)/a.je+1|0;0>b&&(d+=b,b=0);0>c&&(g+=c,c=0);if(0>d||0>g)return!0;f=Math.min(b+d-1,a.Go)|0;for(d=Math.min(c+g-1,a.Ho)|0;b<=f;b++)for(g=c;g<=d;g++)if(0===a.uc[b][g])return!1;return!0}
  function Fn(a,b,c,d,f,g,h,k,l){if(!(b<g||b>h||c<k||c>l)){var m,n;m=b|0;n=c|0;var p=a.uc[m][n];if(p>=un&&p<sn)for(f?n+=d:m+=d,p+=vn;g<=m&&m<=h&&k<=n&&n<=l&&!(p>=a.uc[m][n]);)a.uc[m][n]=p,p+=vn,f?n+=d:m+=d;m=f?n:m;if(f)if(0<d)for(c+=d;c<m;c+=d)Fn(a,b,c,1,!f,g,h,k,l),Fn(a,b,c,-1,!f,g,h,k,l);else for(c+=d;c>m;c+=d)Fn(a,b,c,1,!f,g,h,k,l),Fn(a,b,c,-1,!f,g,h,k,l);else if(0<d)for(b+=d;b<m;b+=d)Fn(a,b,c,1,!f,g,h,k,l),Fn(a,b,c,-1,!f,g,h,k,l);else for(b+=d;b>m;b+=d)Fn(a,b,c,1,!f,g,h,k,l),Fn(a,b,c,-1,!f,g,h,
  k,l)}}function Gn(a,b,c,d,f,g,h,k,l,m,n){for(var p=b|0,q=c|0,r=a.uc[p][q];0===r&&p>k&&p<l&&q>m&&q<n;)if(h?q+=g:p+=g,r=a.uc[p][q],1>=Math.abs(p-d)&&1>=Math.abs(q-f))return a.abort=!0,0;p=b|0;q=c|0;r=a.uc[p][q];b=un;for(a.uc[p][q]=b;0===r&&p>k&&p<l&&q>m&&q<n;)h?q+=g:p+=g,r=a.uc[p][q],a.uc[p][q]=b,b+=vn;return h?q:p}
  function qn(a,b,c,d,f,g){if(null!==a.uc){a.abort=!1;var h=b.x,k=b.y;if(En(a,h,k)){var h=h-a.jg,h=h/a.ie,k=k-a.kg,k=k/a.je,l=d.x,m=d.y;if(En(a,l,m))if(l-=a.jg,l/=a.ie,m-=a.kg,m/=a.je,1>=Math.abs(h-l)&&1>=Math.abs(k-m))a.abort=!0;else{var n=g.x;b=g.y;d=g.x+g.width;var p=g.y+g.height,n=n-a.jg,n=n/a.ie;b-=a.kg;b/=a.je;d-=a.jg;d/=a.ie;p-=a.kg;p/=a.je;g=Math.max(0,Math.min(a.Go,n|0));d=Math.min(a.Go,Math.max(0,d|0));b=Math.max(0,Math.min(a.Ho,b|0));var p=Math.min(a.Ho,Math.max(0,p|0)),h=h|0,k=k|0,l=l|0,
  m=m|0,n=h,q=k,r=0===c||90===c?1:-1;(c=90===c||270===c)?q=Gn(a,h,k,l,m,r,c,g,d,b,p):n=Gn(a,h,k,l,m,r,c,g,d,b,p);if(!a.abort){a:{c=0===f||90===f?1:-1;f=90===f||270===f;for(var r=l|0,s=m|0,u=a.uc[r][s];0===u&&r>g&&r<d&&s>b&&s<p;)if(f?s+=c:r+=c,u=a.uc[r][s],1>=Math.abs(r-h)&&1>=Math.abs(s-k)){a.abort=!0;break a}r=l|0;s=m|0;u=a.uc[r][s];for(a.uc[r][s]=Dn;0===u&&r>g&&r<d&&s>b&&s<p;)f?s+=c:r+=c,u=a.uc[r][s],a.uc[r][s]=Dn}a.abort||(Fn(a,n,q,1,!1,g,d,b,p),Fn(a,n,q,-1,!1,g,d,b,p),Fn(a,n,q,1,!0,g,d,b,p),Fn(a,
  n,q,-1,!0,g,d,b,p))}}}}}function ln(){t.Ac(this);this.port=this.Gc=null;this.Fg=[];this.Gp=!1}t.Vd(ln,{Gc:!0,port:!0,Fg:!0,Gp:!0});ln.prototype.toString=function(){for(var a=this.Fg,b=this.Gc.toString()+" "+a.length.toString()+":",c=0;c<a.length;c++){var d=a[c];null!==d&&(b+="\n  "+d.toString())}return b};
  function Hn(a,b,c,d){b=b.offsetY;switch(b){case t.Sc:return 90;case t.Jc:return 180;case t.bd:return 270;case t.Tc:return 0}switch(b){case t.Sc|t.bd:return 180<c?270:90;case t.Jc|t.Tc:return 90<c&&270>=c?180:0}a=180*Math.atan2(a.height,a.width)/Math.PI;switch(b){case t.Jc|t.bd:return c>a&&c<=180+a?180:270;case t.bd|t.Tc:return c>180-a&&c<=360-a?270:0;case t.Tc|t.Sc:return c>a&&c<=180+a?90:0;case t.Sc|t.Jc:return c>180-a&&c<=360-a?180:90;case t.Jc|t.bd|t.Tc:return 90<c&&c<=180+a?180:c>180+a&&c<=360-
  a?270:0;case t.bd|t.Tc|t.Sc:return 180<c&&c<=360-a?270:c>a&&180>=c?90:0;case t.Tc|t.Sc|t.Jc:return c>a&&c<=180-a?90:c>180-a&&270>=c?180:0;case t.Sc|t.Jc|t.bd:return c>180-a&&c<=180+a?180:c>180+a?270:90}d&&b!==(t.Jc|t.bd|t.Tc|t.Sc)&&(c-=15,0>c&&(c+=360));return c>a&&c<180-a?90:c>=180-a&&c<=180+a?180:c>180+a&&c<360-a?270:0}
  function mn(a,b){var c=a.Fg;if(0===c.length){a:if(!a.Gp){c=a.Gp;a.Gp=!0;var d,f=null,g=a.Gc;if(g instanceof T&&!g.Yd){if(!g.pa.N()){a.Gp=c;break a}f=g;d=f.zE()}else d=a.Gc.AE();var h=a.Fg.length=0,k=a.port.qb(Eb,t.K()),l=a.port.qb(Pb,t.K()),g=t.hk(k.x,k.y,0,0);g.kj(l);t.B(k);t.B(l);k=t.lc(g.x+g.width/2,g.y+g.height/2);for(d=d.k;d.next();)if(l=d.value,l.Qa()){var m=wb,n=l.ud===a.port||l.aa.ml(f),m=n?gn(l,a.port):hn(l,a.port);if(m.rp()&&(n=n?l.fe:l.ud,null!==n)){var p=n.S;if(null!==p){var n=l.computeOtherPoint(p,
  n),p=k.$i(n),m=Hn(g,m,p,l.ic),q;0===m?(q=t.Tc,180<p&&(p-=360)):q=90===m?t.Sc:180===m?t.Jc:t.bd;(m=a.Fg[h])?(m.link=l,m.angle=p,m.be=q):(m=new In(l,p,q),a.Fg[h]=m);m.hx.set(n);h++}}}t.B(k);a.Fg.sort(ln.prototype.sJ);f=a.Fg.length;k=-1;for(h=d=0;h<f;h++)m=a.Fg[h],null!==m&&(m.be!==k&&(k=m.be,d=0),m.mp=d,d++);k=-1;d=0;for(h=f-1;0<=h;h--)m=a.Fg[h],null!==m&&(m.be!==k&&(k=m.be,d=m.mp+1),m.Jm=d);h=a.Fg;n=a.port;f=a.Gc.EJ;k=t.K();d=t.K();l=t.K();m=t.K();n.qb(Eb,k);n.qb(Gb,d);n.qb(Pb,l);n.qb(Lb,m);var r=
  q=p=n=0;if(f===Jm)for(var s=0;s<h.length;s++){var u=h[s];if(null!==u){var v=u.link.computeThickness();switch(u.be){case t.Sc:q+=v;break;case t.Jc:r+=v;break;case t.bd:n+=v;break;default:case t.Tc:p+=v}}}for(var D=0,A,G,L=0,N=G=0,O=1,s=0;s<h.length;s++)if(u=h[s],null!==u){if(D!=u.be){D=u.be;switch(D){case t.Sc:A=l;G=m;break;case t.Jc:A=m;G=k;break;case t.bd:A=k;G=d;break;default:case t.Tc:A=d,G=l}L=G.x-A.x;G=G.y-A.y;switch(D){case t.Sc:q>Math.abs(L)?(O=Math.abs(L)/q,q=Math.abs(L)):O=1;break;case t.Jc:r>
  Math.abs(G)?(O=Math.abs(G)/r,r=Math.abs(G)):O=1;break;case t.bd:n>Math.abs(L)?(O=Math.abs(L)/n,n=Math.abs(L)):O=1;break;default:case t.Tc:p>Math.abs(G)?(O=Math.abs(G)/p,p=Math.abs(G)):O=1}N=0}var U=u.xp;if(f===Jm){v=u.link.computeThickness();v*=O;U.set(A);switch(D){case t.Sc:U.x=A.x+L/2+q/2-N-v/2;break;case t.Jc:U.y=A.y+G/2+r/2-N-v/2;break;case t.bd:U.x=A.x+L/2-n/2+N+v/2;break;default:case t.Tc:U.y=A.y+G/2-p/2+N+v/2}N+=v}else v=0.5,f===Gm&&(v=(u.mp+1)/(u.Jm+1)),U.x=A.x+L*v,U.y=A.y+G*v}t.B(k);t.B(d);
  t.B(l);t.B(m);A=a.Fg;for(h=0;h<A.length;h++)f=A[h],null!==f&&(f.Aw=a.computeEndSegmentLength(f));a.Gp=c;t.hc(g)}c=a.Fg}for(g=0;g<c.length;g++)if(A=c[g],null!==A&&A.link===b)return A;return null}ln.prototype.sJ=function(a,b){return a===b?0:null===a?-1:null===b?1:a.be<b.be?-1:a.be>b.be?1:a.angle<b.angle?-1:a.angle>b.angle?1:0};
  ln.prototype.computeEndSegmentLength=function(a){var b=a.link,c=b.computeEndSegmentLength(this.Gc,this.port,wb,b.ud===this.port),d=a.mp;if(0>d)return c;var f=a.Jm;if(1>=f||!b.ic)return c;var b=a.hx,g=a.xp;if(a.be===t.Jc||a.be===t.Sc)d=f-1-d;return((a=a.be===t.Jc||a.be===t.Tc)?b.y<g.y:b.x<g.x)?c+8*d:(a?b.y===g.y:b.x===g.x)?c:c+8*(f-1-d)};function In(a,b,c){this.link=a;this.angle=b;this.be=c;this.hx=new w;this.Jm=this.mp=0;this.xp=new w;this.Aw=0}
  t.Vd(In,{link:!0,angle:!0,be:!0,hx:!0,mp:!0,Jm:!0,xp:!0,Aw:!0});In.prototype.toString=function(){return this.link.toString()+" "+this.angle.toString()+" "+this.be.toString()+":"+this.mp.toString()+"/"+this.Jm.toString()+" "+this.xp.toString()+" "+this.Aw.toString()+" "+this.hx.toString()};
  function T(a){0===arguments.length?S.call(this,Zg):S.call(this,a);this.xr=new C(E);this.qo=new C(T);this.Nk=this.yr=this.wr=null;this.Es=!1;this.br=!0;this.Fs=!1;this.Jb=this.ts=null;this.uq=!1;this.vq=!0;this.wq=!1;this.Pd=new be;this.Pd.group=this}t.ga("Group",T);t.Ka(T,S);
  T.prototype.cloneProtected=function(a){S.prototype.cloneProtected.call(this,a);a.wr=this.wr;a.yr=this.yr;a.Nk=this.Nk;a.Es=this.Es;a.br=this.br;a.Fs=this.Fs;a.ts=this.ts;var b=a.at(function(a){return a instanceof Tg});a.Jb=b instanceof Tg?b:null;a.uq=this.uq;a.vq=this.vq;a.wq=this.wq;null!==this.Pd?(a.Pd=this.Pd.copy(),a instanceof T&&(a.Pd.group=a)):(null!==a.Pd&&(a.Pd.group=null),a.Pd=null)};
  T.prototype.Zh=function(a){S.prototype.Zh.call(this,a);var b=a.dp();for(a=a.Rc;a.next();){var c=a.value;c.fa();c.J(8);c.Pf();c instanceof T&&(c.Yt=c.Yd,Jn(c,b));if(c instanceof S)c.wf(b);else if(c instanceof V)for(c=c.ek;c.next();)c.value.wf(b)}};
  T.prototype.fn=function(a,b,c,d,f,g,h){if(a===wd&&"elements"===b)if(f instanceof Tg)null===this.Jb?this.Jb=f:this.Jb!==f&&t.m("Cannot insert a second Placeholder into the visual tree of a Group.");else{if(f instanceof y){var k=f.at(function(a){return a instanceof Tg});k instanceof Tg&&(null===this.Jb?this.Jb=k:this.Jb!==k&&t.m("Cannot insert a second Placeholder into the visual tree of a Group."))}}else a===xd&&"elements"===b&&null!==this.Jb&&(d===this.Jb?this.Jb=null:d instanceof y&&this.Jb.ej(d)&&
  (this.Jb=null));S.prototype.fn.call(this,a,b,c,d,f,g,h)};T.prototype.Uj=function(a,b,c,d){this.Mk=this.Jb;y.prototype.Uj.call(this,a,b,c,d)};T.prototype.nl=function(){if(!S.prototype.nl.call(this))return!1;for(var a=this.Rc;a.next();){var b=a.value;if(b instanceof S){if(b.Qa()&&Pi(b))return!1}else if(b instanceof V&&b.Qa()&&Pi(b)&&b.aa!==this&&b.ca!==this)return!1}return!0};t.A(T,{placeholder:"placeholder"},function(){return this.Jb});t.g(T,"computesBoundsAfterDrag",T.prototype.Wz);
  t.defineProperty(T,{Wz:"computesBoundsAfterDrag"},function(){return this.uq},function(a){var b=this.uq;b!==a&&(t.i(a,"boolean",T,"computesBoundsAfterDrag"),this.uq=a,this.j("computesBoundsAfterDrag",b,a))});t.g(T,"computesBoundsIncludingLinks",T.prototype.bE);t.defineProperty(T,{bE:"computesBoundsIncludingLinks"},function(){return this.vq},function(a){t.i(a,"boolean",T,"computesBoundsIncludingLinks");var b=this.vq;b!==a&&(this.vq=a,this.j("computesBoundsIncludingLinks",b,a))});
  t.g(T,"computesBoundsIncludingLocation",T.prototype.cE);t.defineProperty(T,{cE:"computesBoundsIncludingLocation"},function(){return this.wq},function(a){t.i(a,"boolean",T,"computesBoundsIncludingLocation");var b=this.wq;b!==a&&(this.wq=a,this.j("computesBoundsIncludingLocation",b,a))});t.A(T,{Rc:"memberParts"},function(){return this.xr.k});
  function Cm(a,b){if(a.xr.add(b)){b instanceof T&&a.qo.add(b);var c=a.wF;if(null!==c){var d=!0,f=a.h;null!==f&&(d=f.Na,f.Na=!0);c(a,b);null!==f&&(f.Na=d)}}c=a.Jb;null===c&&(c=a);c.fa()}function Bm(a,b){if(a.xr.remove(b)){b instanceof T&&a.qo.remove(b);var c=a.xF;if(null!==c){var d=!0,f=a.h;null!==f&&(d=f.Na,f.Na=!0);c(a,b);null!==f&&(f.Na=d)}}c=a.Jb;null===c&&(c=a);c.fa()}T.prototype.Mm=function(){if(0<this.xr.count){var a=this.h;if(null===a)return;for(var b=this.xr.copy().k;b.next();)a.remove(b.value)}S.prototype.Mm.call(this)};
  T.prototype.yx=function(){var a=this.layer;null!==a&&a.yx(this)};t.g(T,"layout",T.prototype.jc);t.defineProperty(T,{jc:"layout"},function(){return this.Pd},function(a){var b=this.Pd;b!==a&&(null!==a&&t.l(a,be,T,"layout"),null!==b&&(b.h=null,b.group=null),this.Pd=a,null!==a&&(a.h=this.h,a.group=this),this.j("layout",b,a))});t.g(T,"memberAdded",T.prototype.wF);
  t.defineProperty(T,{wF:"memberAdded"},function(){return this.wr},function(a){var b=this.wr;b!==a&&(null!==a&&t.i(a,"function",T,"memberAdded"),this.wr=a,this.j("memberAdded",b,a))});t.g(T,"memberRemoved",T.prototype.xF);t.defineProperty(T,{xF:"memberRemoved"},function(){return this.yr},function(a){var b=this.yr;b!==a&&(null!==a&&t.i(a,"function",T,"memberRemoved"),this.yr=a,this.j("memberRemoved",b,a))});t.g(T,"memberValidation",T.prototype.ut);
  t.defineProperty(T,{ut:"memberValidation"},function(){return this.Nk},function(a){var b=this.Nk;b!==a&&(null!==a&&t.i(a,"function",T,"memberValidation"),this.Nk=a,this.j("memberValidation",b,a))});T.prototype.canAddMembers=function(a){var b=this.h;if(null===b)return!1;b=b.Se;for(a=Ye(a).k;a.next();)if(!b.isValidMember(this,a.value))return!1;return!0};
  T.prototype.addMembers=function(a,b){var c=this.h;if(null===c)return!1;for(var c=c.Se,d=!0,f=Ye(a).k;f.next();){var g=f.value;!b||c.isValidMember(this,g)?g.gb=this:d=!1}return d};t.g(T,"ungroupable",T.prototype.OG);t.defineProperty(T,{OG:"ungroupable"},function(){return this.Es},function(a){var b=this.Es;b!==a&&(t.i(a,"boolean",T,"ungroupable"),this.Es=a,this.j("ungroupable",b,a))});
  T.prototype.canUngroup=function(){if(!this.OG)return!1;var a=this.layer;if(null!==a&&!a.Ro)return!1;a=a.h;return null===a||a.Ro?!0:!1};T.prototype.invalidateConnectedLinks=T.prototype.wf=function(a){void 0===a&&(a=null);S.prototype.wf.call(this,a);for(var b=this.zE();b.next();){var c=b.value;if(null===a||!a.contains(c)){var d=c.aa;null!==d&&d.ml(this)&&!d.Qa()?c.ac():(d=c.ca,null!==d&&d.ml(this)&&!d.Qa()&&c.ac())}}};
  T.prototype.findExternalLinksConnected=T.prototype.zE=function(){var a=this.dp();a.add(this);for(var b=new C(V),c=a.k;c.next();){var d=c.value;if(d instanceof S)for(d=d.qe;d.next();){var f=d.value;a.contains(f)||b.add(f)}}return b.k};T.prototype.findExternalNodesConnected=function(){var a=this.dp();a.add(this);for(var b=new C(S),c=a.k;c.next();){var d=c.value;if(d instanceof S)for(d=d.qe;d.next();){var f=d.value,g=f.aa;a.contains(g)&&g!==this||b.add(g);f=f.ca;a.contains(f)&&f!==this||b.add(f)}}return b.k};
  T.prototype.findSubGraphParts=T.prototype.dp=function(){var a=new C(E);Ie(a,this,!0,0);a.remove(this);return a};T.prototype.df=function(a){S.prototype.df.call(this,a);for(var b=this.Rc;b.next();)b.value.df(a)};T.prototype.collapseSubGraph=T.prototype.collapseSubGraph=function(){var a=this.h;if(null!==a&&!a.Wd){a.Wd=!0;var b=this.dp();Jn(this,b);a.Wd=!1}};
  function Jn(a,b){for(var c=a.Rc;c.next();){var d=c.value;d.df(!1);if(d instanceof T){var f=d;f.Yd&&(f.Yt=f.Yd,Jn(f,b))}if(d instanceof S)d.wf(b);else if(d instanceof V)for(d=d.ek;d.next();)d.value.wf(b)}a.Yd=!1}T.prototype.expandSubGraph=T.prototype.expandSubGraph=function(){var a=this.h;if(null!==a&&!a.Wd){var b=a.Zb;0!==a.ja.Je&&b.tl();a.Wd=!0;var c=this.dp();Kn(this,c,b,this);a.Wd=!1}};
  function Kn(a,b,c,d){for(var f=a.Rc;f.next();){var g=f.value;g.df(!0);if(g instanceof T){var h=g;h.Yt&&(h.Yt=!1,Kn(h,b,c,d))}if(g instanceof S)g.wf(b),Nh(c,g,d);else if(g instanceof V)for(g=g.ek;g.next();)g.value.wf(b)}a.Yd=!0}t.g(T,"isSubGraphExpanded",T.prototype.Yd);
  t.defineProperty(T,{Yd:"isSubGraphExpanded"},function(){return this.br},function(a){var b=this.br;if(b!==a){t.i(a,"boolean",T,"isSubGraphExpanded");this.br=a;var c=this.h;this.j("isSubGraphExpanded",b,a);b=this.zG;if(null!==b){var d=!0;null!==c&&(d=c.Na,c.Na=!0);b(this);null!==c&&(c.Na=d)}null!==c&&c.ja.sb||(a?this.expandSubGraph():this.collapseSubGraph())}});t.g(T,"wasSubGraphExpanded",T.prototype.Yt);
  t.defineProperty(T,{Yt:"wasSubGraphExpanded"},function(){return this.Fs},function(a){var b=this.Fs;b!==a&&(t.i(a,"boolean",T,"wasSubGraphExpanded"),this.Fs=a,this.j("wasSubGraphExpanded",b,a))});t.g(T,"subGraphExpandedChanged",T.prototype.zG);t.defineProperty(T,{zG:"subGraphExpandedChanged"},function(){return this.ts},function(a){var b=this.ts;b!==a&&(null!==a&&t.i(a,"function",T,"subGraphExpandedChanged"),this.ts=a,this.j("subGraphExpandedChanged",b,a))});
  T.prototype.move=T.prototype.move=function(a){var b=this.position,c=b.x;isNaN(c)&&(c=0);b=b.y;isNaN(b)&&(b=0);var c=a.x-c,b=a.y-b,d=t.lc(c,b);S.prototype.move.call(this,a);for(a=this.dp().k;a.next();){var f=a.value;if(!(f instanceof V||f.ci)){var g=f.position;d.x=g.x+c;d.y=g.y+b;S.prototype.move.call(f,d)}}for(a.reset();a.next();)f=a.value,f instanceof V&&(g=f.position,d.x=g.x+c,d.y=g.y+b,f.move(d));t.B(d)};function Tg(){Q.call(this);this.Ne=H.fq;this.cs=new x(NaN,NaN,NaN,NaN)}
  t.ga("Placeholder",Tg);t.Ka(Tg,Q);Tg.prototype.cloneProtected=function(a){Q.prototype.cloneProtected.call(this,a);a.Ne=this.Ne.Z();a.cs=this.cs.copy()};Tg.prototype.Vj=function(a){if(null===this.background&&null===this.Zk)return!1;var b=this.Ra;return mb(0,0,b.width,b.height,a.x,a.y)};
  Tg.prototype.tt=function(){var a=this.S;null!==a&&(a instanceof T||a instanceof Je)||t.m("Placeholder is not inside a Group or Adornment.");if(a instanceof T){var b=this.computeBorder(this.cs),c=this.hd;Va(c,b.width||0,b.height||0);hk(this,0,0,c.width,c.height);for(var c=a.Rc,d=!1;c.next();)if(c.value.Qa()){d=!0;break}!d||isNaN(b.x)||isNaN(b.y)||(c=new w,c.Ot(b,a.bf),a.location=new w(c.x,c.y))}else{var b=this.Ca,c=this.hd,a=this.padding,d=a.left+a.right,f=a.top+a.bottom;if(b.N())Va(c,b.width+d||0,
  b.height+f||0),hk(this,-a.left,-a.top,c.width,c.height);else{var g=this.S,h=g.oc,k=h.qb(Eb,t.K()),b=t.hk(k.x,k.y,0,0);b.kj(h.qb(Pb,k));b.kj(h.qb(Gb,k));b.kj(h.qb(Lb,k));g.Yg.p(b.x,b.y);Va(c,b.width+d||0,b.height+f||0);hk(this,-a.left,-a.top,c.width,c.height);t.B(k);t.hc(b)}}};Tg.prototype.Uj=function(a,b,c,d){var f=this.pa;f.x=a;f.y=b;f.width=c;f.height=d};
  Tg.prototype.computeBorder=function(a){var b=this.S;if(b instanceof T&&b.Wz&&this.cs.N()){var c=b.h;if(null!==c&&(c=c.Ua,c instanceof cf&&!c.Iq&&null!==c.Ec&&!c.Ec.contains(b)))return a.assign(this.cs),a}var c=t.Gf(),d=this.computeMemberBounds(c),f=this.padding;a.p(d.x-f.left,d.y-f.top,d.width+f.left+f.right,d.height+f.top+f.bottom);t.hc(c);b instanceof T&&b.cE&&b.location.N()&&a.kj(b.location);return a};
  Tg.prototype.computeMemberBounds=function(a){var b=this.S;if(!(b instanceof T))return a.p(0,0,0,0),a;for(var c=Infinity,d=Infinity,f=-Infinity,g=-Infinity,h=b.Rc;h.next();){var k=h.value;if(k.Qa()){if(k instanceof V){if(!b.bE)continue;if(Oi(k))continue;if(k.aa===b||k.ca===b)continue}k=k.pa;k.left<c&&(c=k.left);k.top<d&&(d=k.top);k.right>f&&(f=k.right);k.bottom>g&&(g=k.bottom)}}isFinite(c)&&isFinite(d)?a.p(c,d,f-c,g-d):(b=b.location,c=this.padding,a.p(b.x+c.left,b.y+c.top,0,0));return a};
  t.g(Tg,"padding",Tg.prototype.padding);t.defineProperty(Tg,{padding:"padding"},function(){return this.Ne},function(a){"number"===typeof a?(0>a&&t.la(a,">= 0",Tg,"padding"),a=new ab(a)):(t.l(a,ab,Tg,"padding"),0>a.left&&t.la(a.left,">= 0",Tg,"padding:val.left"),0>a.right&&t.la(a.right,">= 0",Tg,"padding:val.right"),0>a.top&&t.la(a.top,">= 0",Tg,"padding:val.top"),0>a.bottom&&t.la(a.bottom,">= 0",Tg,"padding:val.bottom"));var b=this.Ne;b.M(a)||(this.Ne=a=a.Z(),this.j("padding",b,a))});
  function be(){0<arguments.length&&t.ad(be);t.Ac(this);this.Wy=this.U=null;this.Xq=this.Zq=!0;this.gr=this.co=!1;this.nq=(new w(0,0)).freeze();this.bz=!0;this.lz=null;this.$q=!0}t.ga("Layout",be);be.prototype.cloneProtected=function(a){a.Zq=this.Zq;a.Xq=this.Xq;this.Xq||(a.co=!0);a.gr=this.gr;a.nq.assign(this.nq);a.$q=this.$q};be.prototype.copy=function(){var a=new this.constructor;this.cloneProtected(a);return a};
  be.prototype.toString=function(){var a=t.xg(Object.getPrototypeOf(this)),a=a+"(";null!==this.group&&(a+=" in "+this.group);null!==this.h&&(a+=" for "+this.h);return a+")"};t.g(be,"diagram",be.prototype.h);t.defineProperty(be,{h:"diagram"},function(){return this.U},function(a){this.U!==a&&(null!==a&&t.l(a,z,be,"diagram"),this.U=a)});t.g(be,"group",be.prototype.group);
  t.defineProperty(be,{group:"group"},function(){return this.Wy},function(a){this.Wy!==a&&(null!==a&&t.l(a,T,be,"group"),this.Wy=a,null!==a&&(this.U=a.h))});t.g(be,"isOngoing",be.prototype.gF);t.defineProperty(be,{gF:"isOngoing"},function(){return this.Zq},function(a){this.Zq!==a&&(t.i(a,"boolean",be,"isOngoing"),this.Zq=a)});t.g(be,"isInitial",be.prototype.fF);t.defineProperty(be,{fF:"isInitial"},function(){return this.Xq},function(a){t.i(a,"boolean",be,"isInitial");this.Xq=a;a||(this.co=!0)});
  t.g(be,"isValidLayout",be.prototype.$e);t.defineProperty(be,{$e:"isValidLayout"},function(){return this.co},function(a){this.co!==a&&(t.i(a,"boolean",be,"isValidLayout"),this.co=a,a||(a=this.h,null!==a&&(a.lu=!0)))});be.prototype.invalidateLayout=be.prototype.J=function(){if(this.co){var a=this.h;if(null!==a&&!a.ja.sb){var b=a.Zb;!b.cr&&(b.yg&&b.mn(),this.gF&&a.lf||this.fF&&!a.lf)&&(this.$e=!1,a.te())}}};t.g(be,"isRealtime",be.prototype.yA);
  t.defineProperty(be,{yA:"isRealtime"},function(){return this.$q},function(a){this.$q!==a&&(t.i(a,"boolean",be,"isRealtime"),this.$q=a)});t.g(be,"isViewportSized",be.prototype.rt);t.defineProperty(be,{rt:"isViewportSized"},function(){return this.gr},function(a){this.gr!==a&&(t.i(a,"boolean",be,"isViewportSized"),(this.gr=a)&&this.J())});t.g(be,"isRouting",be.prototype.qt);
  t.defineProperty(be,{qt:"isRouting"},function(){return this.bz},function(a){this.bz!==a&&(t.i(a,"boolean",be,"isRouting"),this.bz=a)});t.g(be,"network",be.prototype.network);t.defineProperty(be,{network:"network"},function(){return this.lz},function(a){var b=this.lz;b!==a&&(null!==a&&t.l(a,ra,be,"network"),null!==b&&Ln(b,null),this.lz=a,null!==a&&Ln(a,this))});be.prototype.createNetwork=function(){var a=new ra;Ln(a,this);return a};
  be.prototype.makeNetwork=function(a){var b=this.createNetwork();a instanceof z?(b.Ks(a.kh,!0),b.Ks(a.links,!0)):a instanceof T?b.Ks(a.Rc):b.Ks(a.k);return b};be.prototype.updateParts=function(){var a=this.h;if(null===a&&null!==this.network)for(var b=this.network.vertexes.k;b.next();){var c=b.value.Gc;if(null!==c&&(a=c.h,null!==a))break}this.$e=!0;null!==a&&a.sc("Layout");this.commitLayout();null!==a&&a.Ce("Layout")};be.prototype.commitLayout=function(){};
  be.prototype.doLayout=function(a){a||t.m("Layout.doLayout(collection) argument must not be null but a Diagram, a Group, or an Iterable of Parts");var b=new C(E);a===this.h?(Mn(this,b,a.kh,!0,this.HA,!0,!1,!0),Mn(this,b,a.rl,!0,this.HA,!0,!1,!0)):a===this.group?Mn(this,b,a.Rc,!1,this.HA,!0,!1,!0):b.Oe(a.k);var c=b.count;if(0<c){a=this.h;null!==a&&a.sc("Layout");for(var c=Math.ceil(Math.sqrt(c)),d=this.Dd.x,f=d,g=this.Dd.y,h=0,k=0,b=b.k;b.next();){var l=b.value;l.sf();var m=l.Ea,n=m.width,m=m.height;
  l.moveTo(f,g);delete l.NC;f+=Math.max(n,50)+20;k=Math.max(k,Math.max(m,50));h>=c-1?(h=0,f=d,g+=k+20,k=0):h++}null!==a&&a.Ce("Layout")}this.$e=!0};be.prototype.HA=function(a){return!a.location.N()||a instanceof T&&a.NC?!0:!1};function Mn(a,b,c,d,f,g,h,k){for(c=c.k;c.next();){var l=c.value;d&&!l.sp||f&&!f(l)||l.canLayout()&&(g&&l instanceof S?l.ci||(l instanceof T&&null===l.jc?Mn(a,b,l.Rc,!1,f,g,h,k):b.add(l)):h&&l instanceof V?b.add(l):!k||!l.Ld()||l instanceof S||b.add(l))}}
  t.g(be,"arrangementOrigin",be.prototype.Dd);t.defineProperty(be,{Dd:"arrangementOrigin"},function(){return this.nq},function(a){t.l(a,w,be,"arrangementOrigin");this.nq.M(a)||(this.nq.assign(a),this.J())});be.prototype.initialOrigin=function(a){var b=this.group;if(null!==b){var c=b.location;if(isNaN(c.x)||isNaN(c.y))return a;a=b.placeholder;null!==a?(c=a.qb(Eb),c.x+=a.padding.left,c.y+=a.padding.top):c=b.position.copy();return c}return a};function ra(){t.Ac(this);this.Pd=null;this.clear()}
  t.ga("LayoutNetwork",ra);ra.prototype.clear=function(){if(this.vertexes)for(var a=this.vertexes.k;a.next();){var b=a.value;b.clear();b.network=null}if(this.edges)for(a=this.edges.k;a.next();)b=a.value,b.clear(),b.network=null;this.vertexes=new C(sa);this.edges=new C(ua);this.KA=new ja(S,sa);this.AA=new ja(V,ua)};ra.prototype.toString=function(){return"LayoutNetwork"+(null!==this.jc?"("+this.jc.toString()+")":"")};t.A(ra,{jc:"layout"},function(){return this.Pd});
  function Ln(a,b){e&&null!==b&&t.l(b,be,ra,"setLayout");a.Pd=b}ra.prototype.createVertex=function(){return new sa};ra.prototype.createEdge=function(){return new ua};
  ra.prototype.addParts=ra.prototype.Ks=function(a,b){if(null!==a){void 0===b&&(b=!1);t.i(b,"boolean",ra,"addParts:toplevelonly");for(var c=a.k;c.next();){var d=c.value;if(d instanceof S&&(!b||d.sp)&&d.canLayout()&&!d.ci)if(d instanceof T&&null===d.jc)this.Ks(d.Rc,!1);else if(null===this.Qm(d)){var f=this.createVertex();f.Gc=d;this.Xk(f)}}for(c.reset();c.next();)if(d=c.value,d instanceof V&&(!b||d.sp)&&d.canLayout()&&null===this.Bw(d)){var g=d.aa,f=d.ca;g!==f&&(g=this.findGroupVertex(g),f=this.findGroupVertex(f),
  null!==g&&null!==f&&this.$m(g,f,d))}}};ra.prototype.findGroupVertex=function(a){if(null===a)return null;var b=a.findVisibleNode();if(null===b)return null;a=this.Qm(b);if(null!==a)return a;for(b=b.gb;null!==b;){a=this.Qm(b);if(null!==a)return a;b=b.gb}return null};ra.prototype.addVertex=ra.prototype.Xk=function(a){if(null!==a){e&&t.l(a,sa,ra,"addVertex:vertex");this.vertexes.add(a);var b=a.Gc;null!==b&&this.KA.add(b,a);a.network=this}};
  ra.prototype.addNode=ra.prototype.Ko=function(a){if(null===a)return null;e&&t.l(a,S,ra,"addNode:node");var b=this.Qm(a);null===b&&(b=this.createVertex(),b.Gc=a,this.Xk(b));return b};ra.prototype.deleteVertex=ra.prototype.tE=function(a){if(null!==a&&(e&&t.l(a,sa,ra,"deleteVertex:vertex"),Nn(this,a))){for(var b=a.ff,c=b.count-1;0<=c;c--){var d=b.wa(c);this.Zo(d)}b=a.Te;for(c=b.count-1;0<=c;c--)d=b.wa(c),this.Zo(d)}};
  function Nn(a,b){if(null===b)return!1;var c=a.vertexes.remove(b);c&&(a.KA.remove(b.Gc),b.network=null);return c}ra.prototype.deleteNode=function(a){null!==a&&(e&&t.l(a,S,ra,"deleteNode:node"),a=this.Qm(a),null!==a&&this.tE(a))};ra.prototype.findVertex=ra.prototype.Qm=function(a){if(null===a)return null;e&&t.l(a,S,ra,"findVertex:node");return this.KA.za(a)};
  ra.prototype.addEdge=ra.prototype.Jo=function(a){if(null!==a){e&&t.l(a,ua,ra,"addEdge:edge");this.edges.add(a);var b=a.link;null!==b&&null===this.Bw(b)&&this.AA.add(b,a);b=a.toVertex;null!==b&&b.KD(a);b=a.fromVertex;null!==b&&b.HD(a);a.network=this}};
  ra.prototype.addLink=function(a){if(null===a)return null;e&&t.l(a,V,ra,"addLink:link");var b=a.aa,c=a.ca,d=this.Bw(a);null===d?(d=this.createEdge(),d.link=a,null!==b&&(d.fromVertex=this.Ko(b)),null!==c&&(d.toVertex=this.Ko(c)),this.Jo(d)):(d.fromVertex=null!==b?this.Ko(b):null,d.toVertex=null!==c?this.Ko(c):null);return d};ra.prototype.deleteEdge=ra.prototype.Zo=function(a){if(null!==a){e&&t.l(a,ua,ra,"deleteEdge:edge");var b=a.toVertex;null!==b&&b.sE(a);b=a.fromVertex;null!==b&&b.rE(a);On(this,a)}};
  function On(a,b){null!==b&&a.edges.remove(b)&&(a.AA.remove(b.link),b.network=null)}ra.prototype.deleteLink=function(a){null!==a&&(e&&t.l(a,V,ra,"deleteLink:link"),a=this.Bw(a),null!==a&&this.Zo(a))};ra.prototype.findEdge=ra.prototype.Bw=function(a){if(null===a)return null;e&&t.l(a,V,ra,"findEdge:link");return this.AA.za(a)};
  ra.prototype.linkVertexes=ra.prototype.$m=function(a,b,c){if(null===a||null===b)return null;e&&(t.l(a,sa,ra,"linkVertexes:fromVertex"),t.l(b,sa,ra,"linkVertexes:toVertex"),null!==c&&t.l(c,V,ra,"linkVertexes:link"));if(a.network===this&&b.network===this){var d=this.createEdge();d.link=c;d.fromVertex=a;d.toVertex=b;this.Jo(d);return d}return null};
  ra.prototype.reverseEdge=ra.prototype.ox=function(a){if(null!==a){e&&t.l(a,ua,ra,"reverseEdge:edge");var b=a.fromVertex,c=a.toVertex;null!==b&&null!==c&&(b.rE(a),c.sE(a),a.ox(),b.KD(a),c.HD(a))}};ra.prototype.deleteSelfEdges=ra.prototype.xw=function(){for(var a=t.Cb(),b=this.edges.k;b.next();){var c=b.value;c.fromVertex===c.toVertex&&a.push(c)}b=a.length;for(c=0;c<b;c++)this.Zo(a[c]);t.ya(a)};
  ra.prototype.deleteArtificialVertexes=function(){for(var a=t.Cb(),b=this.vertexes.k;b.next();){var c=b.value;null===c.Gc&&a.push(c)}c=a.length;for(b=0;b<c;b++)this.tE(a[b]);c=t.Cb();for(b=this.edges.k;b.next();){var d=b.value;null===d.link&&c.push(d)}d=c.length;for(b=0;b<d;b++)this.Zo(c[b]);t.ya(a);t.ya(c)};function Pn(a){for(var b=t.Cb(),c=a.edges.k;c.next();){var d=c.value;null!==d.fromVertex&&null!==d.toVertex||b.push(d)}c=b.length;for(d=0;d<c;d++)a.Zo(b[d]);t.ya(b)}
  ra.prototype.splitIntoSubNetworks=ra.prototype.WJ=function(){this.deleteArtificialVertexes();Pn(this);this.xw();for(var a=new B(ra),b=!0;b;)for(var b=!1,c=this.vertexes.k;c.next();){var d=c.value;if(0<d.ff.count||0<d.Te.count){b=this.jc.createNetwork();a.add(b);Qn(this,b,d);b=!0;break}}a.sort(function(a,b){return null===a||null===b||a===b?0:b.vertexes.count-a.vertexes.count});return a};
  function Qn(a,b,c){if(null!==c&&c.network!==b){Nn(a,c);b.Xk(c);for(var d=c.rc;d.next();){var f=d.value;f.network!==b&&(On(a,f),b.Jo(f),Qn(a,b,f.fromVertex))}for(d=c.gc;d.next();)f=d.value,f.network!==b&&(On(a,f),b.Jo(f),Qn(a,b,f.toVertex))}}ra.prototype.findAllParts=function(){for(var a=new C(E),b=this.vertexes.k;b.next();)a.add(b.value.Gc);for(b=this.edges.k;b.next();)a.add(b.value.link);return a};
  function sa(){t.Ac(this);this.network=null;this.T=(new x(0,0,10,10)).freeze();this.O=(new w(5,5)).freeze();this.clear()}t.ga("LayoutVertex",sa);sa.prototype.clear=function(){this.rd=null;this.ff=new B(ua);this.Te=new B(ua)};sa.prototype.toString=function(){return"LayoutVertex#"+t.od(this)+(null!==this.Gc?"("+this.Gc.toString()+")":"")};t.g(sa,"node",sa.prototype.Gc);
  t.defineProperty(sa,{Gc:"node"},function(){return this.rd},function(a){if(this.rd!==a){e&&null!==a&&t.l(a,S,sa,"node");this.rd=a;a.sf();var b=a.pa,c=b.x,d=b.y,f=b.width,b=b.height;isNaN(c)&&(c=0);isNaN(d)&&(d=0);this.T.p(c,d,f,b);if(!(a instanceof T)&&(a=a.kc.qb(Kb),a.N())){this.O.p(a.x-c,a.y-d);return}this.O.p(f/2,b/2)}});t.g(sa,"bounds",sa.prototype.Ob);t.defineProperty(sa,{Ob:"bounds"},function(){return this.T},function(a){this.T.M(a)||(e&&t.l(a,x,sa,"bounds"),this.T.assign(a))});
  t.g(sa,"focus",sa.prototype.focus);t.defineProperty(sa,{focus:"focus"},function(){return this.O},function(a){this.O.M(a)||(e&&t.l(a,w,sa,"focus"),this.O.assign(a))});t.g(sa,"centerX",sa.prototype.Da);t.defineProperty(sa,{Da:"centerX"},function(){return this.T.x+this.O.x},function(a){var b=this.T;b.x+this.O.x!==a&&(e&&t.q(a,sa,"centerX"),b.La(),b.x=a-this.O.x,b.freeze())});t.g(sa,"centerY",sa.prototype.Pa);
  t.defineProperty(sa,{Pa:"centerY"},function(){return this.T.y+this.O.y},function(a){var b=this.T;b.y+this.O.y!==a&&(e&&t.q(a,sa,"centerY"),b.La(),b.y=a-this.O.y,b.freeze())});t.g(sa,"focusX",sa.prototype.fp);t.defineProperty(sa,{fp:"focusX"},function(){return this.O.x},function(a){var b=this.O;b.x!==a&&(b.La(),b.x=a,b.freeze())});t.g(sa,"focusY",sa.prototype.gp);t.defineProperty(sa,{gp:"focusY"},function(){return this.O.y},function(a){var b=this.O;b.y!==a&&(b.La(),b.y=a,b.freeze())});t.g(sa,"x",sa.prototype.x);
  t.defineProperty(sa,{x:"x"},function(){return this.T.x},function(a){var b=this.T;b.x!==a&&(b.La(),b.x=a,b.freeze())});t.g(sa,"y",sa.prototype.y);t.defineProperty(sa,{y:"y"},function(){return this.T.y},function(a){var b=this.T;b.y!==a&&(b.La(),b.y=a,b.freeze())});t.g(sa,"width",sa.prototype.width);t.defineProperty(sa,{width:"width"},function(){return this.T.width},function(a){var b=this.T;b.width!==a&&(b.La(),b.width=a,b.freeze())});t.g(sa,"height",sa.prototype.height);
  t.defineProperty(sa,{height:"height"},function(){return this.T.height},function(a){var b=this.T;b.height!==a&&(b.La(),b.height=a,b.freeze())});sa.prototype.commit=function(){var a=this.Gc;if(null!==a){var b=this.Ob;if(!(a instanceof T)){var c=a.pa,d=a.kc.qb(Kb);if(c.N()&&d.N()){a.moveTo(b.x+this.fp-(d.x-c.x),b.y+this.gp-(d.y-c.y));return}}a.moveTo(b.x,b.y)}};sa.prototype.addSourceEdge=sa.prototype.KD=function(a){null!==a&&(e&&t.l(a,ua,sa,"addSourceEdge:edge"),this.ff.contains(a)||this.ff.add(a))};
  sa.prototype.deleteSourceEdge=sa.prototype.sE=function(a){null!==a&&(e&&t.l(a,ua,sa,"deleteSourceEdge:edge"),this.ff.remove(a))};sa.prototype.addDestinationEdge=sa.prototype.HD=function(a){null!==a&&(e&&t.l(a,ua,sa,"addDestinationEdge:edge"),this.Te.contains(a)||this.Te.add(a))};sa.prototype.deleteDestinationEdge=sa.prototype.rE=function(a){null!==a&&(e&&t.l(a,ua,sa,"deleteDestinationEdge:edge"),this.Te.remove(a))};
  t.A(sa,{TJ:"sourceVertexes"},function(){for(var a=new C(sa),b=this.rc;b.next();){var c=b.value.fromVertex;null===c||a.contains(c)||a.add(c)}return a.k});t.A(sa,{yI:"destinationVertexes"},function(){for(var a=new C(sa),b=this.gc;b.next();){var c=b.value.toVertex;null===c||a.contains(c)||a.add(c)}return a.k});
  t.A(sa,{vertexes:"vertexes"},function(){for(var a=new C(sa),b=this.rc;b.next();){var c=b.value,c=c.fromVertex;null===c||a.contains(c)||a.add(c)}for(b=this.gc;b.next();)c=b.value,c=c.toVertex,null===c||a.contains(c)||a.add(c);return a.k});t.A(sa,{rc:"sourceEdges"},function(){return this.ff.k});t.A(sa,{gc:"destinationEdges"},function(){return this.Te.k});t.A(sa,{edges:"edges"},function(){for(var a=new B(ua),b=this.rc;b.next();){var c=b.value;a.add(c)}for(b=this.gc;b.next();)c=b.value,a.add(c);return a.k});
  t.A(sa,{EI:"edgesCount"},function(){return this.ff.count+this.Te.count});var Rn;sa.standardComparer=Rn=function(a,b){e&&t.l(a,sa,sa,"standardComparer:m");e&&t.l(b,sa,sa,"standardComparer:n");var c=a.rd,d=b.rd;return c?d?(c=c.text,d=d.text,c<d?-1:c>d?1:0):1:null!==d?-1:0};
  sa.smartComparer=function(a,b){e&&t.l(a,sa,sa,"smartComparer:m");e&&t.l(b,sa,sa,"smartComparer:n");if(null!==a){if(null!==b){var c=a.rd,d=b.rd;if(null!==c){if(null!==d){var c=c.text.toLocaleLowerCase().split(/([+\-]?[\.]?\d+(?:\.\d*)?(?:e[+\-]?\d+)?)/),d=d.text.toLocaleLowerCase().split(/([+\-]?[\.]?\d+(?:\.\d*)?(?:e[+\-]?\d+)?)/),f;for(f=0;f<c.length;f++)if(""!==d[f]&&void 0!==d[f]){var g=parseFloat(c[f]),h=parseFloat(d[f]);if(isNaN(g)){if(!isNaN(h))return 1;if(0!==c[f].localeCompare(d[f]))return c[f].localeCompare(d[f])}else{if(isNaN(h))return-1;
  if(0!==g-h)return g-h}}else if(""!==c[f])return 1;return""!==d[f]&&void 0!==d[f]?-1:0}return 1}return null!==d?-1:0}return 1}return null!==b?-1:0};function ua(){t.Ac(this);this.network=null;this.clear()}t.ga("LayoutEdge",ua);ua.prototype.clear=function(){this.toVertex=this.fromVertex=this.link=null};ua.prototype.toString=function(){return"LayoutEdge#"+t.od(this)+(null!==this.link?"("+this.link.toString()+")":"")};
  ua.prototype.ox=function(){var a=this.fromVertex;this.fromVertex=this.toVertex;this.toVertex=a};ua.prototype.commit=function(){};ua.prototype.getOtherVertex=ua.prototype.JI=function(a){e&&t.l(a,sa,ua,"getOtherVertex:v");return this.toVertex===a?this.fromVertex:this.fromVertex===a?this.toVertex:null};
  function Xj(){0<arguments.length&&t.ad(Xj);be.call(this);this.rt=!0;this.Hs=this.Is=NaN;this.qj=(new ga(NaN,NaN)).freeze();this.Oh=(new ga(10,10)).freeze();this.ue=fl;this.cd=dl;this.Nh=$k;this.uh=Sn}t.ga("GridLayout",Xj);t.Ka(Xj,be);Xj.prototype.cloneProtected=function(a){be.prototype.cloneProtected.call(this,a);a.Is=this.Is;a.Hs=this.Hs;a.qj.assign(this.qj);a.Oh.assign(this.Oh);a.ue=this.ue;a.cd=this.cd;a.Nh=this.Nh;a.uh=this.uh};
  Xj.prototype.doLayout=function(a){a||t.m("Layout.doLayout(collection) argument must not be null but a Diagram, a Group, or an Iterable of Parts");var b=this.h;null===b&&null===this.group&&t.m("The diagram for this layout is not set.");this.Dd=this.initialOrigin(this.Dd);var c=new C(E);a===b?(Mn(this,c,a.kh,!0,null,!0,!0,!0),Mn(this,c,a.links,!0,null,!0,!0,!0),Mn(this,c,a.rl,!0,null,!0,!0,!0)):a===this.group?Mn(this,c,a.Rc,!1,null,!0,!0,!0):c.Oe(a.k);for(a=c.copy().k;a.next();){var d=a.value;if(d instanceof
  V&&(null!==d.aa||null!==d.ca))c.remove(d);else if(d.sf(),d instanceof T)for(d=d.Rc;d.next();)c.remove(d.value)}c=c.Ie();if(0!==c.length){switch(this.sorting){case cl:c.reverse();break;case $k:c.sort(this.comparer);break;case al:c.sort(this.comparer),c.reverse()}var f=this.$G;isNaN(f)&&(f=0);var g=this.sB,g=isNaN(g)?Math.max(b.xb.width-b.padding.left-b.padding.right,0):Math.max(this.sB,0);0>=f&&0>=g&&(f=1);a=this.spacing.width;isFinite(a)||(a=0);d=this.spacing.height;isFinite(d)||(d=0);b.sc("Layout");
  var h=[];switch(this.alignment){case gl:var k=a,l=d,m=Math.max(this.$k.width,1);if(!isFinite(m))for(var n=m=0;n<c.length;n++)var p=c[n],q=p.Ea,m=Math.max(m,q.width);var m=Math.max(m+k,1),r=Math.max(this.$k.height,1);if(!isFinite(r))for(n=r=0;n<c.length;n++)p=c[n],q=p.Ea,r=Math.max(r,q.height);for(var r=Math.max(r+l,1),s=this.Qe,u=this.Dd.x,v=u,D=this.Dd.y,A=0,G=0,n=0;n<c.length;n++){var p=c[n],q=p.Ea,L=Math.ceil((q.width+k)/m)*m,N=Math.ceil((q.height+l)/r)*r,O;switch(s){case el:O=Math.abs(v-q.width);
  break;default:O=v+q.width}if(0<f&&A>f-1||0<g&&0<A&&O>g)h.push(new x(0,D,g,G+l)),A=0,v=u,D+=G,G=0;G=Math.max(G,N);switch(s){case el:q=-q.width;break;default:q=0}p.moveTo(v+q,D);switch(s){case el:v-=L;break;default:v+=L}A++}h.push(new x(0,D,g,G+l));break;case fl:k=a;l=d;m=Math.max(this.$k.width,1);n=A=q=0;p=t.K();for(r=0;r<c.length;r++)s=c[r],u=s.Ea,v=zm(s,s.kc,s.bf,p),q=Math.max(q,v.x),A=Math.max(A,u.width-v.x),n=Math.max(n,v.y);D=this.Qe;switch(D){case el:q+=k;break;default:A+=k}var m=isFinite(m)?
  Math.max(m+k,1):Math.max(q+A,1),U=A=this.Dd.x,G=this.Dd.y,L=0;g>=q&&(g-=q);q=0;N=Math.max(this.$k.height,1);O=n=0;for(var Y=!0,ba=t.K(),r=0;r<c.length;r++){s=c[r];u=s.Ea;v=zm(s,s.kc,s.bf,p);if(0<L)switch(D){case el:U=Math.floor((U-A-(u.width-v.x))/m)*m+A;break;default:U=Math.ceil((U-A+v.x)/m)*m+A}else switch(D){case el:q=U+v.x+u.width;break;default:q=U-v.x}var R;switch(D){case el:R=-(U+v.x)+q;break;default:R=U+u.width-v.x-q}if(0<f&&L>f-1||0<g&&0<L&&R>g){h.push(new x(0,G,g,(Y?O:O+n)+l));for(U=0;U<
  L&&r!==L;U++){R=c[r-L+U];var xa=zm(R,R.kc,R.bf,ba);R.moveTo(R.position.x,R.position.y+n-xa.y)}O+=l;G=Y?G+O:G+(O+n);L=O=n=0;U=A;Y=!1}n=Math.max(n,v.y);O=Math.max(O,u.height-v.y);isFinite(N)&&(O=Math.max(O,Math.max(u.height,N)-v.y));Y?s.moveTo(U-v.x,G-v.y):s.moveTo(U-v.x,G);switch(D){case el:U-=v.x+k;break;default:U+=u.width-v.x+k}L++}h.push(new x(0,G,g,(Y?O:O+n)+l));for(U=0;U<L&&r!==L;U++)R=c[r-L+U],xa=zm(R,R.kc,R.bf,p),R.moveTo(R.position.x,R.position.y+n-xa.y);t.B(p);t.B(ba)}this.commitLayers(h,
  new w(-a/2,-d/2));b.Ce("Layout");this.$e=!0}};Xj.prototype.commitLayers=function(){};t.g(Xj,"wrappingWidth",Xj.prototype.sB);t.defineProperty(Xj,{sB:"wrappingWidth"},function(){return this.Is},function(a){this.Is!==a&&(t.i(a,"number",Xj,"wrappingWidth"),0<a||isNaN(a))&&(this.Is=a,this.rt=isNaN(a),this.J())});t.g(Xj,"wrappingColumn",Xj.prototype.$G);
  t.defineProperty(Xj,{$G:"wrappingColumn"},function(){return this.Hs},function(a){this.Hs!==a&&(t.i(a,"number",Xj,"wrappingColumn"),0<a||isNaN(a))&&(this.Hs=a,this.J())});t.g(Xj,"cellSize",Xj.prototype.$k);t.defineProperty(Xj,{$k:"cellSize"},function(){return this.qj},function(a){t.l(a,ga,Xj,"cellSize");this.qj.M(a)||(this.qj.assign(a),this.J())});t.g(Xj,"spacing",Xj.prototype.spacing);
  t.defineProperty(Xj,{spacing:"spacing"},function(){return this.Oh},function(a){t.l(a,ga,Xj,"spacing");this.Oh.M(a)||(this.Oh.assign(a),this.J())});t.g(Xj,"alignment",Xj.prototype.alignment);t.defineProperty(Xj,{alignment:"alignment"},function(){return this.ue},function(a){this.ue!==a&&(t.Aa(a,Xj,Xj,"alignment"),a===fl||a===gl)&&(this.ue=a,this.J())});t.g(Xj,"arrangement",Xj.prototype.Qe);
  t.defineProperty(Xj,{Qe:"arrangement"},function(){return this.cd},function(a){this.cd!==a&&(t.Aa(a,Xj,Xj,"arrangement"),a===dl||a===el)&&(this.cd=a,this.J())});t.g(Xj,"sorting",Xj.prototype.sorting);t.defineProperty(Xj,{sorting:"sorting"},function(){return this.Nh},function(a){this.Nh!==a&&(t.Aa(a,Xj,Xj,"sorting"),a===bl||a===cl||a===$k||a===al)&&(this.Nh=a,this.J())});t.g(Xj,"comparer",Xj.prototype.comparer);
  t.defineProperty(Xj,{comparer:"comparer"},function(){return this.uh},function(a){this.uh!==a&&(t.i(a,"function",Xj,"comparer"),this.uh=a,this.J())});var Sn;Xj.standardComparer=Sn=function(a,b){e&&t.l(a,E,Xj,"standardComparer:a");e&&t.l(b,E,Xj,"standardComparer:b");var c=a.text,d=b.text;return c<d?-1:c>d?1:0};
  Xj.smartComparer=function(a,b){e&&t.l(a,E,Xj,"standardComparer:a");e&&t.l(b,E,Xj,"standardComparer:b");if(null!==a){if(null!==b){var c=a.text.toLocaleLowerCase().split(/([+\-]?[\.]?\d+(?:\.\d*)?(?:e[+\-]?\d+)?)/),d=b.text.toLocaleLowerCase().split(/([+\-]?[\.]?\d+(?:\.\d*)?(?:e[+\-]?\d+)?)/),f;for(f=0;f<c.length;f++)if(""!==d[f]&&void 0!==d[f]){var g=parseFloat(c[f]),h=parseFloat(d[f]);if(isNaN(g)){if(!isNaN(h))return 1;if(0!==c[f].localeCompare(d[f]))return c[f].localeCompare(d[f])}else{if(isNaN(h))return-1;
  if(0!==g-h)return g-h}}else if(""!==c[f])return 1;return""!==d[f]&&void 0!==d[f]?-1:0}return 1}return null!==b?-1:0};var gl;Xj.Position=gl=t.w(Xj,"Position",0);var fl;Xj.Location=fl=t.w(Xj,"Location",1);var dl;Xj.LeftToRight=dl=t.w(Xj,"LeftToRight",2);var el;Xj.RightToLeft=el=t.w(Xj,"RightToLeft",3);var bl;Xj.Forward=bl=t.w(Xj,"Forward",4);var cl;Xj.Reverse=cl=t.w(Xj,"Reverse",5);var $k;Xj.Ascending=$k=t.w(Xj,"Ascending",6);var al;Xj.Descending=al=t.w(Xj,"Descending",7);
  function hl(){0<arguments.length&&t.ad(hl);be.call(this);this.Ny=this.Nn=this.yd=0;this.Jq=360;this.My=zl;this.Ak=0;this.gC=zl;this.tu=this.tg=this.yD=0;this.Wv=new Tn;this.wu=this.km=0;this.tH=600;this.Rr=NaN;this.pq=1;this.ss=0;this.us=360;this.cd=zl;this.sa=pl;this.Nh=ml;this.uh=Rn;this.Oh=6;this.Ir=Cl}t.ga("CircularLayout",hl);t.Ka(hl,be);
  hl.prototype.cloneProtected=function(a){be.prototype.cloneProtected.call(this,a);a.Rr=this.Rr;a.pq=this.pq;a.ss=this.ss;a.us=this.us;a.cd=this.cd;a.sa=this.sa;a.Nh=this.Nh;a.uh=this.uh;a.Oh=this.Oh;a.Ir=this.Ir};hl.prototype.createNetwork=function(){var a=new Un;Ln(a,this);return a};
  hl.prototype.doLayout=function(a){a||t.m("Layout.doLayout(collection) argument must not be null but a Diagram, a Group, or an Iterable of Parts");null===this.network&&(this.network=this.makeNetwork(a));a=this.network.vertexes;if(1>=a.count)1===a.count&&(a=a.$a(),a.Da=0,a.Pa=0);else{var b=new B(Vn);b.Oe(a.k);a=new B(Vn);var c=new B(Vn),b=this.sort(b);a=new B(Vn);var c=new B(Vn),d=this.My,f=this.gC,g=this.yd,h=this.Nn,k=this.Ny,l=this.Jq,m=this.Ak,n=this.yD,p=this.tg,q=this.tu,d=this.Qe,f=this.At,g=
  this.LF;if(!isFinite(g)||0>=g)g=NaN;h=this.PD;if(!isFinite(h)||0>=h)h=1;k=this.nh;isFinite(k)||(k=0);l=this.hi;if(!isFinite(l)||360<l||1>l)l=360;m=this.spacing;isFinite(m)||(m=NaN);d===Al&&f===Bl?d=zl:d===Al&&f!==Bl&&(f=Bl,d=this.Qe);if((this.direction===nl||this.direction===ol)&&this.sorting!==ml){for(var r=0;!(r>=b.length);r+=2){a.add(b.wa(r));if(r+1>=b.length)break;c.add(b.wa(r+1))}this.direction===nl?(this.Qe===Al&&a.reverse(),b=new B(Vn),b.Oe(a),b.Oe(c)):(this.Qe===Al&&c.reverse(),b=new B(Vn),
  b.Oe(c),b.Oe(a))}for(var s=b.length,u=n=0,r=0;r<b.length;r++){var p=k+l*u*(this.direction===pl?1:-1)/s,v=b.wa(r).diameter;isNaN(v)&&(v=Wn(b.wa(r),p));360>l&&(0===r||r===b.length-1)&&(v/=2);n+=v;u++}if(isNaN(g)||d===Al){isNaN(m)&&(m=6);if(d!==zl&&d!==Al){v=-Infinity;for(r=0;r<s;r++){var q=b.wa(r),D=b.wa(r===s-1?0:r+1);isNaN(q.diameter)&&Wn(q,0);isNaN(D.diameter)&&Wn(D,0);v=Math.max(v,(q.diameter+D.diameter)/2)}q=v+m;d===rl?(p=2*Math.PI/s,g=(v+m)/p):g=Xn(this,q*(360<=l?s:s-1),h,k*Math.PI/180,l*Math.PI/
  180)}else g=Xn(this,n+(360<=l?s:s-1)*(d!==Al?m:1.6*m),h,k*Math.PI/180,l*Math.PI/180);p=g*h}else if(p=g*h,u=Yn(this,g,p,k*Math.PI/180,l*Math.PI/180),isNaN(m)){if(d===zl||d===Al)m=(u-n)/(360<=l?s:s-1)}else if(d===zl||d===Al)r=(u-n)/(360<=l?s:s-1),r<m?(g=Xn(this,n+m*(360<=l?s:s-1),h,k*Math.PI/180,l*Math.PI/180),p=g*h):m=r;else{v=-Infinity;for(r=0;r<s;r++)q=b.wa(r),D=b.wa(r===s-1?0:r+1),isNaN(q.diameter)&&Wn(q,0),isNaN(D.diameter)&&Wn(D,0),v=Math.max(v,(q.diameter+D.diameter)/2);q=v+m;r=Xn(this,q*(360<=
  l?s:s-1),h,k*Math.PI/180,l*Math.PI/180);r>g?(g=r,p=g*h):q=u/(360<=l?s:s-1)}this.My=d;this.gC=f;this.yd=g;this.Nn=h;this.Ny=k;this.Jq=l;this.Ak=m;this.yD=n;this.tg=p;this.tu=q;c=[b,a,c];b=c[0];a=c[1];c=c[2];d=this.My;f=this.yd;h=this.Ny;k=this.Jq;l=this.Ak;m=this.tg;n=this.tu;if(this.direction!==nl&&this.direction!==ol||d!==Al)if(this.direction===nl||this.direction===ol){g=0;switch(d){case sl:g=180*Zn(this,f,m,h,n)/Math.PI;break;case zl:n=b=0;g=a.$a();null!==g&&(b=Wn(g,Math.PI/2));g=c.$a();null!==
  g&&(n=Wn(g,Math.PI/2));g=180*Zn(this,f,m,h,l+(b+n)/2)/Math.PI;break;case rl:g=k/b.length}if(this.direction===nl){switch(d){case sl:$n(this,a,h,ql);break;case zl:ao(this,a,h,ql);break;case rl:bo(this,a,k/2,h,ql)}switch(d){case sl:$n(this,c,h+g,pl);break;case zl:ao(this,c,h+g,pl);break;case rl:bo(this,c,k/2,h+g,pl)}}else{switch(d){case sl:$n(this,c,h,ql);break;case zl:ao(this,c,h,ql);break;case rl:bo(this,c,k/2,h,ql)}switch(d){case sl:$n(this,a,h+g,pl);break;case zl:ao(this,a,h+g,pl);break;case rl:bo(this,
  a,k/2,h+g,pl)}}}else switch(d){case sl:$n(this,b,h,this.direction);break;case zl:ao(this,b,h,this.direction);break;case rl:bo(this,b,k,h,this.direction);break;case Al:co(this,b,k,h,this.direction)}else co(this,b,k,h-k/2,pl)}this.updateParts();this.network=null;this.$e=!0};
  function bo(a,b,c,d,f){var g=a.Jq,h=a.yd;a=a.tg;d=d*Math.PI/180;c=c*Math.PI/180;for(var k=b.length,l=0;l<k;l++){var m=d+(f===pl?l*c/(360<=g?k:k-1):-(l*c)/k),n=b.wa(l),p=h*Math.tan(m)/a,p=Math.sqrt((h*h+a*a*p*p)/(1+p*p));n.Da=p*Math.cos(m);n.Pa=p*Math.sin(m);n.actualAngle=180*m/Math.PI}}
  function ao(a,b,c,d){var f=a.yd,g=a.tg,h=a.Ak;c=c*Math.PI/180;for(var k=b.length,l=0;l<k;l++){var m=b.wa(l),n=b.wa(l===k-1?0:l+1),p=g*Math.sin(c);m.Da=f*Math.cos(c);m.Pa=p;m.actualAngle=180*c/Math.PI;isNaN(m.diameter)&&Wn(m,0);isNaN(n.diameter)&&Wn(n,0);m=Zn(a,f,g,d===pl?c:-c,(m.diameter+n.diameter)/2+h);c+=d===pl?m:-m}}
  function $n(a,b,c,d){var f=a.yd,g=a.tg,h=a.tu;c=c*Math.PI/180;for(var k=b.length,l=0;l<k;l++){var m=b.wa(l);m.Da=f*Math.cos(c);m.Pa=g*Math.sin(c);m.actualAngle=180*c/Math.PI;m=Zn(a,f,g,d===pl?c:-c,h);c+=d===pl?m:-m}}function co(a,b,c,d,f){var g=a.wu,g=a.Jq;a.km=0;a.Wv=new Tn;if(360>c){for(g=d+(f===pl?g:-g);0>g;)g+=360;g%=360;180<g&&(g-=360);g*=Math.PI/180;a.wu=g;eo(a,b,c,d,f)}else fo(a,b,c,d,f);a.Wv.commit(b)}
  function fo(a,b,c,d,f){var g=a.yd,h=a.Ak,k=a.Nn,l=g*Math.cos(d*Math.PI/180),m=a.tg*Math.sin(d*Math.PI/180),n=b.Ie();if(3===n.length)n[0].Da=g,n[0].Pa=0,n[1].Da=n[0].Da-n[0].width/2-n[1].width/2-h,n[1].y=n[0].y,n[2].Da=(n[0].Da+n[1].Da)/2,n[2].y=n[0].y-n[2].height-h;else if(4===n.length)n[0].Da=g,n[0].Pa=0,n[2].Da=-n[0].Da,n[2].Pa=n[0].Pa,n[1].Da=0,n[1].y=Math.min(n[0].y,n[2].y)-n[1].height-h,n[3].Da=0,n[3].y=Math.max(n[0].y+n[0].height+h,n[2].y+n[2].height+h);else{for(g=0;g<n.length;g++){n[g].Da=
  l;n[g].Pa=m;if(g>=n.length-1)break;var p=ho(a,l,m,n,g,f);p[0]||(p=io(a,l,m,n,g,f));l=p[1];m=p[2]}a.km++;if(!(23<a.km)){var l=n[0].Da,m=n[0].Pa,g=n[n.length-1].Da,p=n[n.length-1].Pa,q=Math.abs(l-g)-((n[0].width+n[n.length-1].width)/2+h),r=Math.abs(m-p)-((n[0].height+n[n.length-1].height)/2+h),h=0;1>Math.abs(r)?Math.abs(l-g)<(n[0].width+n[n.length-1].width)/2&&(h=0):h=0<r?r:1>Math.abs(q)?0:q;q=!1;q=Math.abs(g)>Math.abs(p)?0<g!==m>p:0<p!==l<g;if(q=f===pl?q:!q)h=-Math.abs(h),h=Math.min(h,-n[n.length-
  1].width),h=Math.min(h,-n[n.length-1].height);l=a.Wv;if(0<h&&0>l.jp||Math.abs(h)<Math.abs(l.jp)&&!(0>h&&0<l.jp))for(l.jp=h,l.qn=[],l.$p=[],m=0;m<n.length;m++)l.qn[m]=n[m].Ob.x,l.$p[m]=n[m].Ob.y;1<Math.abs(h)&&(a.yd=8>a.km?a.yd-h/(2*Math.PI):5>n.length&&10<h?a.yd/2:a.yd-(0<h?1.7:-2.3),a.tg=a.yd*k,fo(a,b,c,d,f))}}}
  function eo(a,b,c,d,f){for(var g=a.yd,h=a.tg,k=a.Nn,l=g*Math.cos(d*Math.PI/180),m=h*Math.sin(d*Math.PI/180),n=b.Ie(),p=0;p<n.length;p++){n[p].Da=l;n[p].Pa=m;if(p>=n.length-1)break;var q=ho(a,l,m,n,p,f);q[0]||(q=io(a,l,m,n,p,f));l=q[1];m=q[2]}a.km++;if(!(23<a.km)){l=Math.atan2(m,l);l=f===pl?a.wu-l:l-a.wu;l=Math.abs(l)<Math.abs(l-2*Math.PI)?l:l-2*Math.PI;g=l*(g+h)/2;h=a.Wv;if(Math.abs(g)<Math.abs(h.jp))for(h.jp=g,h.qn=[],h.$p=[],l=0;l<n.length;l++)h.qn[l]=n[l].Ob.x,h.$p[l]=n[l].Ob.y;1<Math.abs(g)&&
  (a.yd=8>a.km?a.yd-g/(2*Math.PI):a.yd-(0<g?1.7:-2.3),a.tg=a.yd*k,eo(a,b,c,d,f))}}function ho(a,b,c,d,f,g){var h=a.yd,k=a.tg,l=0,m=0;a=(d[f].width+d[f+1].width)/2+a.Ak;var n=!1;if(0<=c!==(g===pl)){if(l=b+a,l>h){l=b-a;if(l<-h)return b=[!1],b[1]=l,b[2]=m,b;n=!0}}else if(l=b-a,l<-h){l=b+a;if(l>h)return b=[!1],b[1]=l,b[2]=m,b;n=!0}m=Math.sqrt(1-Math.min(1,l*l/(h*h)))*k;0>c!==n&&(m=-m);b=Math.abs(c-m)>(d[f].height+d[f+1].height)/2?[!1]:[!0];b[1]=l;b[2]=m;return b}
  function io(a,b,c,d,f,g){var h=a.yd,k=a.tg,l=0,m=0;a=(d[f].height+d[f+1].height)/2+a.Ak;var n=!1;if(0<=b!==(g===pl)){if(m=c-a,m<-k){m=c+a;if(m>k)return b=[!1],b[1]=l,b[2]=m,b;n=!0}}else if(m=c+a,m>k){m=c-a;if(m<-k)return b=[!1],b[1]=l,b[2]=m,b;n=!0}l=Math.sqrt(1-Math.min(1,m*m/(k*k)))*h;0>b!==n&&(l=-l);b=Math.abs(b-l)>(d[f].width+d[f+1].width)/2?[!1]:[!0];b[1]=l;b[2]=m;return b}function Tn(){this.jp=-Infinity;this.$p=this.qn=null}
  Tn.prototype.commit=function(a){if(null!==this.qn&&null!==this.$p)for(var b=0;b<this.qn.length;b++){var c=a.wa(b);c.x=this.qn[b];c.y=this.$p[b]}};hl.prototype.commitLayout=function(){this.commitNodes();this.qt&&this.commitLinks()};hl.prototype.commitNodes=function(){for(var a=this.BH,b=this.network.vertexes.k,c;b.next();)c=b.value,c.x+=a.x,c.y+=a.y,c.commit()};hl.prototype.commitLinks=function(){for(var a=this.network.edges.k;a.next();)a.value.commit()};
  function Yn(a,b,c,d,f){var g=a.tH;if(0.001>Math.abs(a.Nn-1))return void 0!==d&&void 0!==f?f*b:2*Math.PI*b;a=b>c?Math.sqrt(b*b-c*c)/b:Math.sqrt(c*c-b*b)/c;var h=0,k;k=void 0!==d&&void 0!==f?f/(g+1):Math.PI/(2*(g+1));for(var l=0;l<=g;l++)var m=Math.sin(void 0!==d&&void 0!==f?d+l*f/g:l*Math.PI/(2*g)),h=h+Math.sqrt(1-a*a*m*m)*k;return void 0!==d&&void 0!==f?(b>c?b:c)*h:4*(b>c?b:c)*h}function Xn(a,b,c,d,f){a=void 0!==d&&void 0!==f?Yn(a,1,c,d,f):Yn(a,1,c);return b/a}
  function Zn(a,b,c,d,f){if(0.001>Math.abs(a.Nn-1))return f/b;var g=b>c?Math.sqrt(b*b-c*c)/b:Math.sqrt(c*c-b*b)/c,h=0;a=2*Math.PI/(700*a.network.vertexes.count);b>c&&(d+=Math.PI/2);for(var k=0;;k++){var l=Math.sin(d+k*a),h=h+(b>c?b:c)*Math.sqrt(1-g*g*l*l)*a;if(h>=f)return k*a}return 0}
  hl.prototype.sort=function(a){switch(this.sorting){case kl:break;case ll:a.reverse();break;case il:a.sort(this.comparer);break;case jl:a.sort(this.comparer);a.reverse();break;case ml:for(var b=[],c=0;c<a.length;c++)b.push(0);for(var d=new B(Vn),c=0;c<a.length;c++){var f=-1,g=-1;if(0===c)for(var h=0;h<a.length;h++){var k=a.wa(h).EI;k>f&&(f=k,g=h)}else for(h=0;h<a.length;h++)k=b[h],k>f&&(f=k,g=h);d.add(a.wa(g));b[g]=-1;g=a.wa(g);f=g.rc;for(g=g.gc;f.next();)h=f.value,h=h.fromVertex,h=a.indexOf(h),0>
  h||0<=b[h]&&b[h]++;for(;g.next();)h=g.value,h=h.toVertex,h=a.indexOf(h),0>h||0<=b[h]&&b[h]++}a=[];for(b=0;b<d.length;b++){k=d.wa(b);a[b]=[];for(var c=k.gc,f=k.rc,l,m;c.next();)l=c.value,m=d.indexOf(l.toVertex),m!==b&&0>a[b].indexOf(m)&&a[b].push(m);for(;f.next();)l=f.value,m=d.indexOf(l.fromVertex),m!==b&&0>a[b].indexOf(m)&&a[b].push(m)}k=[];for(b=0;b<a.length;b++)k[b]=0;for(var c=[],n=[],p=[],f=[],g=new B(Vn),h=b=0;b<a.length;b++){var q=a[b].length;if(1===q)f.push(b);else if(0===q)g.add(d.wa(b));
  else{if(0===h)c.push(b);else{for(var r=Infinity,s=Infinity,u=-1,v=[],q=0;q<c.length;q++)0>a[c[q]].indexOf(c[q===c.length-1?0:q+1])&&v.push(q===c.length-1?0:q+1);if(0===v.length)for(q=0;q<c.length;q++)v.push(q);for(q=0;q<v.length;q++){var D=v[q],A;m=a[b];l=n;A=p;for(var G=k,L=D,N=c,O=0,U=0;U<l.length;U++){var Y=G[l[U]],ba=G[A[U]],R=0,xa=0;Y<ba?(R=Y,xa=ba):(R=ba,xa=Y);if(R<L&&L<=xa)for(Y=0;Y<m.length;Y++)ba=m[Y],0>N.indexOf(ba)||R<G[ba]&&G[ba]<xa||R===G[ba]||xa===G[ba]||O++;else for(Y=0;Y<m.length;Y++)ba=
  m[Y],0>N.indexOf(ba)||R<G[ba]&&G[ba]<xa&&R!==G[ba]&&xa!==G[ba]&&O++}A=O;for(l=G=0;l<a[b].length;l++)m=c.indexOf(a[b][l]),0<=m&&(m=Math.abs(D-(m>=D?m+1:m)),G+=m<c.length+1-m?m:c.length+1-m);for(l=0;l<n.length;l++)m=k[n[l]],L=k[p[l]],m>=D&&m++,L>=D&&L++,m>L&&(N=L,L=m,m=N),L-m<(c.length+2)/2===(m<D&&D<=L)&&G++;if(A<r||A===r&&G<s)r=A,s=G,u=D}c.splice(u,0,b);for(q=0;q<c.length;q++)k[c[q]]=q;for(q=0;q<a[b].length;q++)r=a[b][q],0<=c.indexOf(r)&&(n.push(b),p.push(r))}h++}}n=!1;for(p=c.length;;){n=!0;for(k=
  0;k<f.length;k++)if(b=f[k],q=a[b][0],m=c.indexOf(q),0<=m){for(h=s=0;h<a[q].length;h++)r=a[q][h],r=c.indexOf(r),0>r||r===m||(u=r>m?r-m:m-r,s+=r<m!==u>p-u?1:-1);c.splice(0>s?m:m+1,0,b);f.splice(k,1);k--}else n=!1;if(n)break;else c.push(f[0]),f.splice(0,1)}for(b=0;b<c.length;b++)m=c[b],g.add(d.wa(m));return g;default:t.m("Invalid sorting type.")}return a};t.g(hl,"radius",hl.prototype.LF);
  t.defineProperty(hl,{LF:"radius"},function(){return this.Rr},function(a){this.Rr!==a&&(t.i(a,"number",hl,"radius"),0<a||isNaN(a))&&(this.Rr=a,this.J())});t.g(hl,"aspectRatio",hl.prototype.PD);t.defineProperty(hl,{PD:"aspectRatio"},function(){return this.pq},function(a){this.pq!==a&&(t.i(a,"number",hl,"aspectRatio"),0<a&&(this.pq=a,this.J()))});t.g(hl,"startAngle",hl.prototype.nh);
  t.defineProperty(hl,{nh:"startAngle"},function(){return this.ss},function(a){this.ss!==a&&(t.i(a,"number",hl,"startAngle"),this.ss=a,this.J())});t.g(hl,"sweepAngle",hl.prototype.hi);t.defineProperty(hl,{hi:"sweepAngle"},function(){return this.us},function(a){this.us!==a&&(t.i(a,"number",hl,"sweepAngle"),this.us=0<a&&360>=a?a:360,this.J())});t.g(hl,"arrangement",hl.prototype.Qe);
  t.defineProperty(hl,{Qe:"arrangement"},function(){return this.cd},function(a){this.cd!==a&&(t.Aa(a,hl,hl,"arrangement"),a===Al||a===zl||a===sl||a===rl)&&(this.cd=a,this.J())});t.g(hl,"direction",hl.prototype.direction);t.defineProperty(hl,{direction:"direction"},function(){return this.sa},function(a){this.sa!==a&&(t.Aa(a,hl,hl,"direction"),a===pl||a===ql||a===nl||a===ol)&&(this.sa=a,this.J())});t.g(hl,"sorting",hl.prototype.sorting);
  t.defineProperty(hl,{sorting:"sorting"},function(){return this.Nh},function(a){this.Nh!==a&&(t.Aa(a,hl,hl,"sorting"),a===kl||a===ll||a===il||jl||a===ml)&&(this.Nh=a,this.J())});t.g(hl,"comparer",hl.prototype.comparer);t.defineProperty(hl,{comparer:"comparer"},function(){return this.uh},function(a){this.uh!==a&&(t.i(a,"function",hl,"comparer"),this.uh=a,this.J())});t.g(hl,"spacing",hl.prototype.spacing);
  t.defineProperty(hl,{spacing:"spacing"},function(){return this.Oh},function(a){this.Oh!==a&&(t.i(a,"number",hl,"spacing"),this.Oh=a,this.J())});t.g(hl,"nodeDiameterFormula",hl.prototype.At);t.defineProperty(hl,{At:"nodeDiameterFormula"},function(){return this.Ir},function(a){this.Ir!==a&&(t.Aa(a,hl,hl,"nodeDiameterFormula"),a===Cl||a===Bl)&&(this.Ir=a,this.J())});t.A(hl,{CH:"actualXRadius"},function(){return this.yd});t.A(hl,{DH:"actualYRadius"},function(){return this.tg});
  t.A(hl,{gK:"actualSpacing"},function(){return this.Ak});t.A(hl,{BH:"actualCenter"},function(){return isNaN(this.Dd.x)||isNaN(this.Dd.y)?new w(0,0):new w(this.Dd.x+this.CH,this.Dd.y+this.DH)});var zl;hl.ConstantSpacing=zl=t.w(hl,"ConstantSpacing",0);var sl;hl.ConstantDistance=sl=t.w(hl,"ConstantDistance",1);var rl;hl.ConstantAngle=rl=t.w(hl,"ConstantAngle",2);var Al;hl.Packed=Al=t.w(hl,"Packed",3);var pl;hl.Clockwise=pl=t.w(hl,"Clockwise",4);var ql;
  hl.Counterclockwise=ql=t.w(hl,"Counterclockwise",5);var nl;hl.BidirectionalLeft=nl=t.w(hl,"BidirectionalLeft",6);var ol;hl.BidirectionalRight=ol=t.w(hl,"BidirectionalRight",7);var kl;hl.Forwards=kl=t.w(hl,"Forwards",8);var ll;hl.Reverse=ll=t.w(hl,"Reverse",9);var il;hl.Ascending=il=t.w(hl,"Ascending",10);var jl;hl.Descending=jl=t.w(hl,"Descending",11);var ml;hl.Optimized=ml=t.w(hl,"Optimized",12);var Cl;hl.Pythagorean=Cl=t.w(hl,"Pythagorean",13);var Bl;hl.Circular=Bl=t.w(hl,"Circular",14);
  function Un(){ra.call(this)}t.ga("CircularNetwork",Un);t.Ka(Un,ra);Un.prototype.createVertex=function(){return new Vn};Un.prototype.createEdge=function(){return new jo};function Vn(){sa.call(this);this.actualAngle=this.diameter=NaN}t.ga("CircularVertex",Vn);t.Ka(Vn,sa);
  function Wn(a,b){var c=a.network;if(null===c)return NaN;c=c.jc;if(null===c)return NaN;if(c.Qe===Al)if(c.At===Bl)a.diameter=Math.max(a.width,a.height);else{var c=Math.abs(Math.sin(b)),d=Math.abs(Math.cos(b));if(0===c)return a.width;if(0===d)return a.height;a.diameter=Math.min(a.height/c,a.width/d)}else a.diameter=c.At===Bl?Math.max(a.width,a.height):Math.sqrt(a.width*a.width+a.height*a.height);return a.diameter}function jo(){ua.call(this)}t.ga("CircularEdge",jo);t.Ka(jo,ua);
  function lo(){0<arguments.length&&t.ad(lo);be.call(this);this.sg=null;this.ir=0;this.bg=(new ga(100,100)).freeze();this.oq=!1;this.Mh=!0;this.th=!1;this.oo=100;this.Lq=1;this.Gh=1E3;this.In=0.05;this.Hn=50;this.En=150;this.Gn=0;this.Fq=10;this.Eq=5}t.ga("ForceDirectedLayout",lo);t.Ka(lo,be);
  lo.prototype.cloneProtected=function(a){be.prototype.cloneProtected.call(this,a);a.bg.assign(this.bg);a.oq=this.oq;a.Mh=this.Mh;a.th=this.th;a.oo=this.oo;a.Lq=this.Lq;a.Gh=this.Gh;a.In=this.In;a.Hn=this.Hn;a.En=this.En;a.Gn=this.Gn;a.Fq=this.Fq;a.Eq=this.Eq};lo.prototype.createNetwork=function(){var a=new mo;Ln(a,this);return a};
  lo.prototype.doLayout=function(a){a||t.m("Layout.doLayout(collection) argument must not be null but a Diagram, a Group, or an Iterable of Parts");null===this.network&&(this.network=this.makeNetwork(a));a=this.ex;if(0<this.network.vertexes.count){this.network.xw();for(var b=this.network.vertexes.k;b.next();){var c=b.value;c.charge=this.electricalCharge(c);c.mass=this.gravitationalMass(c)}for(b=this.network.edges.k;b.next();)c=b.value,c.stiffness=this.springStiffness(c),c.length=this.springLength(c);
  this.Nz();this.ir=0;if(this.needsClusterLayout()){for(var b=this.network,d=b.WJ().k;d.next();){var f=d.value;this.network=f;for(c=this.network.vertexes.k;c.next();){for(var f=c.value,g=0,h=f.vertexes;h.next();)g++;f.Xf=g;f.fk=1;f.Hm=null;f.lh=null}no(this,0,a)}this.network=b;d.reset();e&&t.l(b,mo,lo,"arrangeConnectedGraphs:singletons");for(var c=this.ew,k=d.count,l=!0,g=f=0,h=t.Cb(),m=0;m<k+b.vertexes.count+2;m++)h[m]=null;k=0;d.reset();for(m=t.Gf();d.next();){var n=d.value;this.qf(n,m);if(l)l=!1,
  f=m.x+m.width/2,g=m.y+m.height/2,h[0]=new w(m.x+m.width+c.width,m.y),h[1]=new w(m.x,m.y+m.height+c.height),k=2;else{var p=oo(h,k,f,g,m.width,m.height,c),q=h[p],r=new w(q.x+m.width+c.width,q.y),s=new w(q.x,q.y+m.height+c.height);p+1<k&&h.splice(p+1,0,null);h[p]=r;h[p+1]=s;k++;p=q.x-m.x;q=q.y-m.y;for(n=n.vertexes.k;n.next();){var u=n.value;u.Da+=p;u.Pa+=q}}}t.hc(m);for(n=b.vertexes.k;n.next();)u=n.value,l=u.T,2>k?(f=l.x+l.width/2,g=l.y+l.height/2,h[0]=new w(l.x+l.width+c.width,l.y),h[1]=new w(l.x,l.y+
  l.height+c.height),k=2):(p=oo(h,k,f,g,l.width,l.height,c),q=h[p],r=new w(q.x+l.width+c.width,q.y),s=new w(q.x,q.y+l.height+c.height),p+1<k&&h.splice(p+1,0,null),h[p]=r,h[p+1]=s,k++,u.Da=q.x+u.width/2,u.Pa=q.y+u.height/2);t.ya(h);for(d.reset();d.next();){f=d.value;for(g=f.vertexes.k;g.next();)c=g.value,b.Xk(c);for(f=f.edges.k;f.next();)c=f.value,b.Jo(c)}}po(this,a);this.updateParts()}this.oo=a;this.network=null;this.$e=!0};
  lo.prototype.needsClusterLayout=function(){if(3>this.network.vertexes.count)return!1;var a=0,b=0,c=this.network.vertexes.k;c.next();for(var d=c.value.T;c.next();){if(c.value.T.Tf(d)&&(a++,1<a))return!0;if(10<b)break;b++}return!1};lo.prototype.qf=function(a,b){for(var c=!0,d=a.vertexes.k;d.next();){var f=d.value;c?(c=!1,b.set(f.T)):b.lj(f.T)}return b};
  function qo(a,b,c){e&&(t.q(b,lo,"computeClusterLayoutIterations:level"),t.q(c,lo,"computeClusterLayoutIterations:maxiter"));return Math.max(Math.min(a.network.vertexes.count,c*(b+1)/11),10)}
  function no(a,b,c){e&&(t.q(b,lo,"layoutClusters:level"),t.q(c,lo,"layoutClusters:maxiter"));if(ro(a,b)){var d=a.Gh;a.Gh*=1+1/(b+1);var f=so(a,b),g=Math.max(0,qo(a,b,c));a.ex+=g;no(a,b+1,c);po(a,g);to(a,f,b);c=a.sg;null===c?c=new B(uo):c.clear();c.Oe(f.vertexes);c.sort(function(a,b){return null===a||null===b||a===b?0:b.Xf-a.Xf});for(f=c.k;f.next();)vo(a,f.value,b);a.Gh=d}}
  function ro(a,b){e&&t.q(b,lo,"hasClusters:level");if(10<b||3>a.network.vertexes.count)return!1;null===a.sg?a.sg=new B(uo):a.sg.clear();a.sg.Oe(a.network.vertexes);var c=a.sg;c.sort(function(a,b){return null===a||null===b||a===b?0:b.Xf-a.Xf});for(var d=c.count-1;0<=d&&1>=c.n[d].Xf;)d--;return 1<c.count-d}
  function so(a,b){e&&t.q(b,lo,"pushSubNetwork:level");for(var c=a.network,d=new mo,f=a.sg.k;f.next();){var g=f.value;if(1<g.Xf){d.Xk(g);var h={xB:g.Xf,zB:g.width,wB:g.height,aH:g.O.x,bH:g.O.y};null===g.lh&&(g.lh=new B);g.lh.add(h);g.ZA=g.lh.count-1}else break}for(var k=c.edges.k;k.next();){var l=k.value;if(l.fromVertex.network===d&&l.toVertex.network===d)d.Jo(l);else if(l.fromVertex.network===d){var m=l.fromVertex.Hm;null===m&&(m=new B(uo),l.fromVertex.Hm=m);m.add(l.toVertex);l.fromVertex.Xf--;l.fromVertex.fk+=
  l.toVertex.fk}else l.toVertex.network===d&&(m=l.toVertex.Hm,null===m&&(m=new B(uo),l.toVertex.Hm=m),m.add(l.fromVertex),l.toVertex.Xf--,l.toVertex.fk+=l.fromVertex.fk)}for(k=d.edges.k;k.next();)l=k.value,l.length*=Math.max(1,H.sqrt((l.fromVertex.fk+l.toVertex.fk)/(4*b+1)));for(f=d.vertexes.k;f.next();)if(g=f.value,m=g.Hm,null!==m&&0<m.count&&(h=g.lh.n[g.lh.count-1],h=h.xB-g.Xf,!(0>=h))){for(var n=0,p=0,q=m.count-h;q<m.count;q++){for(var r=m.n[q],l=null,k=r.edges.k;k.next();){var s=k.value;if(s.JI(r)===
  g){l=s;break}}null!==l&&(p+=l.length,n+=r.width*r.height)}m=g.Da;k=g.Pa;l=g.width;q=g.height;r=g.O;s=l*q;1>s&&(s=1);n=H.sqrt((n+s+p*p*4/(h*h))/s);h=(n-1)*l/2;n=(n-1)*q/2;g.Ob=new x(m-r.x-h,k-r.y-n,l+2*h,q+2*n);g.focus=new w(r.x+h,r.y+n)}a.network=d;return c}
  function to(a,b,c){e&&(t.l(b,mo,lo,"popNetwork:oldnet"),t.q(c,lo,"popNetwork:level"));for(c=a.network.vertexes.k;c.next();){var d=c.value;d.network=b;if(null!==d.lh){var f=d.lh.n[d.ZA];d.Xf=f.xB;var g=f.aH,h=f.bH;d.Ob=new x(d.Da-g,d.Pa-h,f.zB,f.wB);d.focus=new w(g,h);d.ZA--}}for(c=a.network.edges.k;c.next();)c.value.network=b;a.network=b}
  function vo(a,b,c){e&&(t.l(b,uo,lo,"surroundNode:oldnet"),t.q(c,lo,"surroundNode:level"));var d=b.Hm;if(null!==d&&0!==d.count){c=b.Da;var f=b.Pa,g=b.width,h=b.height;null!==b.lh&&0<b.lh.count&&(h=b.lh.n[0],g=h.zB,h=h.wB);for(var g=H.sqrt(g*g+h*h)/2,k=!1,l=h=0,m=0,n=b.vertexes.k;n.next();){var p=n.value;1>=p.Xf?l++:(k=!0,m++,h+=Math.atan2(b.Pa-p.Pa,b.Da-p.Da))}if(0!==l)for(0<m&&(h/=m),m=b=0,b=k?2*Math.PI/(l+1):2*Math.PI/l,0===l%2&&(m=b/2),1<d.count&&d.sort(function(a,b){return null===a||null===b||
  a===b?0:b.width*b.height-a.width*a.height}),k=0===l%2?0:1,n=d.k;n.next();)if(p=n.value,!(1<p.Xf||a.isFixed(p))){d=null;for(l=p.edges.k;l.next();){d=l.value;break}var l=p.width,q=p.height,l=H.sqrt(l*l+q*q)/2,d=g+d.length+l,l=h+(b*(k/2>>1)+m)*(0===k%2?1:-1);p.Da=c+d*Math.cos(l);p.Pa=f+d*Math.sin(l);k++}}}
  function oo(a,b,c,d,f,g,h){var k=9E19,l=-1,m=0;a:for(;m<b;m++){var n=a[m],p=n.x-c,q=n.y-d,p=p*p+q*q;if(p<k){for(q=m-1;0<=q;q--)if(a[q].y>n.y&&a[q].x-n.x<f+h.width)continue a;for(q=m+1;q<b;q++)if(a[q].x>n.x&&a[q].y-n.y<g+h.height)continue a;l=m;k=p}}return l}lo.prototype.Nz=function(){if(this.comments)for(var a=this.network.vertexes.k;a.next();)this.addComments(a.value)};
  lo.prototype.addComments=function(a){var b=a.Gc;if(null!==b)for(b=b.BE();b.next();){var c=b.value;if("Comment"===c.Zc&&c.Qa()){var d=this.network.Qm(c);null===d&&(d=this.network.Ko(c));d.charge=this.lE;for(var c=null,f=d.gc;f.next();)if(f.value.toVertex===a){c=f.value;break}if(null===c)for(f=d.rc;f.next();)if(f.value.fromVertex===a){c=f.value;break}null===c&&(c=this.network.$m(a,d,null));c.length=this.mE}}};
  function wo(a,b){e&&(t.l(a,uo,lo,"getNodeDistance:vertexA"),t.l(b,uo,lo,"getNodeDistance:vertexB"));var c=a.T,d=c.x,f=c.y,g=c.width,c=c.height,h=b.T,k=h.x,l=h.y,m=h.width,h=h.height;return d+g<k?f>l+h?(d=d+g-k,f=f-l-h,H.sqrt(d*d+f*f)):f+c<l?(d=d+g-k,f=f+c-l,H.sqrt(d*d+f*f)):k-(d+g):d>k+m?f>l+h?(d=d-k-m,f=f-l-h,H.sqrt(d*d+f*f)):f+c<l?(d=d-k-m,f=f+c-l,H.sqrt(d*d+f*f)):d-(k+m):f>l+h?f-(l+h):f+c<l?l-(f+c):0.1}
  function po(a,b){e&&t.q(b,lo,"performIterations:num");a.sg=null;for(var c=a.ir+b;a.ir<c&&(a.ir++,xo(a)););a.sg=null}
  function xo(a){null===a.sg&&(a.sg=new B(uo),a.sg.Oe(a.network.vertexes));var b=a.sg.n;if(0>=b.length)return!1;var c=b[0];c.forceX=0;c.forceY=0;for(var d=c.Da,f=d,g=c.Pa,h=g,c=1;c<b.length;c++){var k=b[c];k.forceX=0;k.forceY=0;var l=k.Da,k=k.Pa,d=Math.min(d,l),f=Math.max(f,l),g=Math.min(g,k),h=Math.max(h,k)}(g=f-d>h-g)?b.sort(function(a,b){return null===a||null===b||a===b?0:a.Da-b.Da}):b.sort(function(a,b){return null===a||null===b||a===b?0:a.Pa-b.Pa});for(var h=a.Gh,m=0,n=0,p=0,c=0;c<b.length;c++){var k=
  b[c],l=k.T,q=k.O,d=l.x+q.x,l=l.y+q.y,n=k.charge*a.electricalFieldX(d,l),p=k.charge*a.electricalFieldY(d,l),n=n+k.mass*a.gravitationalFieldX(d,l),p=p+k.mass*a.gravitationalFieldY(d,l);k.forceX+=n;k.forceY+=p;for(q=c+1;q<b.length;q++)if(f=b[q],f!==k){var n=f.T,r=f.O,p=n.x+r.x,r=n.y+r.y;if(d-p>h||p-d>h){if(g)break}else if(l-r>h||r-l>h){if(!g)break}else{var s=wo(k,f);1>s?(d>p?(n=Math.abs(f.T.right-k.T.x),n=(1+n)*Math.random()):d<p?(n=Math.abs(f.T.x-k.T.right),n=-(1+n)*Math.random()):(n=Math.max(f.width,
  k.width),n=(1+n)*Math.random()-n/2),l>r?(p=Math.abs(f.T.bottom-k.T.y),p=(1+p)*Math.random()):d<p?(p=Math.abs(f.T.y-k.T.bottom),p=-(1+p)*Math.random()):(p=Math.max(f.height,k.height),p=(1+p)*Math.random()-p/2)):(m=-(k.charge*f.charge)/(s*s),n=(p-d)/s*m,p=(r-l)/s*m);k.forceX+=n;k.forceY+=p;f.forceX-=n;f.forceY-=p}}}for(c=a.network.edges.k;c.next();)g=c.value,k=g.fromVertex,f=g.toVertex,l=k.T,q=k.O,d=l.x+q.x,l=l.y+q.y,n=f.T,r=f.O,p=n.x+r.x,r=n.y+r.y,s=wo(k,f),1>s?(n=(d>p?1:-1)*(1+(f.width>k.width)?f.width:
  k.width)*Math.random(),p=(l>r?1:-1)*(1+(f.height>k.height)?f.height:k.height)*Math.random()):(m=g.stiffness*(s-g.length),n=(p-d)/s*m,p=(r-l)/s*m),k.forceX+=n,k.forceY+=p,f.forceX-=n,f.forceY-=p;c=0;d=Math.max(a.Gh/20,50);for(f=0;f<b.length;f++)k=b[f],a.isFixed(k)?a.moveFixedVertex(k):(g=k.forceX,h=k.forceY,g<-d?g=-d:g>d&&(g=d),h<-d?h=-d:h>d&&(h=d),k.Da+=g,k.Pa+=h,c=Math.max(c,g*g+h*h));return c>a.cA*a.cA}lo.prototype.moveFixedVertex=function(){};
  lo.prototype.commitLayout=function(){this.dB();this.commitNodes();this.qt&&this.commitLinks()};lo.prototype.dB=function(){if(this.xl)for(var a=this.network.edges.k;a.next();){var b=a.value.link;null!==b&&(b.pb=xb,b.tb=xb)}};lo.prototype.commitNodes=function(){var a=0,b=0;if(this.ND){var c=t.Gf();this.qf(this.network,c);b=this.Dd;a=b.x-c.x;b=b.y-c.y;t.hc(c)}for(var c=t.Gf(),d=this.network.vertexes.k;d.next();){var f=d.value;if(0!==a||0!==b)c.assign(f.T),c.x+=a,c.y+=b,f.Ob=c;f.commit()}t.hc(c)};
  lo.prototype.commitLinks=function(){for(var a=this.network.edges.k;a.next();)a.value.commit()};lo.prototype.springStiffness=function(a){a=a.stiffness;return isNaN(a)?this.In:a};lo.prototype.springLength=function(a){a=a.length;return isNaN(a)?this.Hn:a};lo.prototype.electricalCharge=function(a){a=a.charge;return isNaN(a)?this.En:a};lo.prototype.electricalFieldX=function(){return 0};lo.prototype.electricalFieldY=function(){return 0};
  lo.prototype.gravitationalMass=function(a){a=a.mass;return isNaN(a)?this.Gn:a};lo.prototype.gravitationalFieldX=function(){return 0};lo.prototype.gravitationalFieldY=function(){return 0};lo.prototype.isFixed=function(a){return a.isFixed};t.A(lo,{iK:"currentIteration"},function(){return this.ir});t.g(lo,"arrangementSpacing",lo.prototype.ew);t.defineProperty(lo,{ew:"arrangementSpacing"},function(){return this.bg},function(a){t.l(a,ga,lo,"arrangementSpacing");this.bg.M(a)||(this.bg.assign(a),this.J())});
  t.g(lo,"arrangesToOrigin",lo.prototype.ND);t.defineProperty(lo,{ND:"arrangesToOrigin"},function(){return this.oq},function(a){this.oq!==a&&(t.i(a,"boolean",lo,"arrangesToOrigin"),this.oq=a,this.J())});t.g(lo,"setsPortSpots",lo.prototype.xl);t.defineProperty(lo,{xl:"setsPortSpots"},function(){return this.Mh},function(a){this.Mh!==a&&(t.i(a,"boolean",lo,"setsPortSpots"),this.Mh=a,this.J())});t.g(lo,"comments",lo.prototype.comments);
  t.defineProperty(lo,{comments:"comments"},function(){return this.th},function(a){this.th!==a&&(t.i(a,"boolean",lo,"comments"),this.th=a,this.J())});t.g(lo,"maxIterations",lo.prototype.ex);t.defineProperty(lo,{ex:"maxIterations"},function(){return this.oo},function(a){this.oo!==a&&(t.i(a,"number",lo,"maxIterations"),0<=a&&(this.oo=a,this.J()))});t.g(lo,"epsilonDistance",lo.prototype.cA);
  t.defineProperty(lo,{cA:"epsilonDistance"},function(){return this.Lq},function(a){this.Lq!==a&&(t.i(a,"number",lo,"epsilonDistance"),0<a&&(this.Lq=a,this.J()))});t.g(lo,"infinityDistance",lo.prototype.SI);t.defineProperty(lo,{SI:"infinityDistance"},function(){return this.Gh},function(a){this.Gh!==a&&(t.i(a,"number",lo,"infinityDistance"),1<a&&(this.Gh=a,this.J()))});t.g(lo,"defaultSpringStiffness",lo.prototype.xI);
  t.defineProperty(lo,{xI:"defaultSpringStiffness"},function(){return this.In},function(a){this.In!==a&&(t.i(a,"number",lo,"defaultSpringStiffness"),this.In=a,this.J())});t.g(lo,"defaultSpringLength",lo.prototype.wI);t.defineProperty(lo,{wI:"defaultSpringLength"},function(){return this.Hn},function(a){this.Hn!==a&&(t.i(a,"number",lo,"defaultSpringLength"),this.Hn=a,this.J())});t.g(lo,"defaultElectricalCharge",lo.prototype.qI);
  t.defineProperty(lo,{qI:"defaultElectricalCharge"},function(){return this.En},function(a){this.En!==a&&(t.i(a,"number",lo,"defaultElectricalCharge"),this.En=a,this.J())});t.g(lo,"defaultGravitationalMass",lo.prototype.rI);t.defineProperty(lo,{rI:"defaultGravitationalMass"},function(){return this.Gn},function(a){this.Gn!==a&&(t.i(a,"number",lo,"defaultGravitationalMass"),this.Gn=a,this.J())});t.g(lo,"defaultCommentSpringLength",lo.prototype.mE);
  t.defineProperty(lo,{mE:"defaultCommentSpringLength"},function(){return this.Fq},function(a){this.Fq!==a&&(t.i(a,"number",lo,"defaultCommentSpringLength"),this.Fq=a,this.J())});t.g(lo,"defaultCommentElectricalCharge",lo.prototype.lE);t.defineProperty(lo,{lE:"defaultCommentElectricalCharge"},function(){return this.Eq},function(a){this.Eq!==a&&(t.i(a,"number",lo,"defaultCommentElectricalCharge"),this.Eq=a,this.J())});function mo(){ra.call(this)}t.ga("ForceDirectedNetwork",mo);t.Ka(mo,ra);
  mo.prototype.createVertex=function(){return new uo};mo.prototype.createEdge=function(){return new yo};function uo(){sa.call(this);this.isFixed=!1;this.mass=this.charge=NaN;this.fk=this.Xf=this.forceY=this.forceX=0;this.lh=this.Hm=null;this.ZA=0}t.ga("ForceDirectedVertex",uo);t.Ka(uo,sa);function yo(){ua.call(this);this.length=this.stiffness=NaN}t.ga("ForceDirectedEdge",yo);t.Ka(yo,ua);
  function Z(){0<arguments.length&&t.ad(Z);be.call(this);this.xd=this.bm=25;this.sa=0;this.Dn=zo;this.mo=Ao;this.Yn=Bo;this.Zl=4;this.vn=Co;this.Hi=Do;this.Mh=!0;this.zj=4;this.Ib=this.bv=this.lb=-1;this.Kf=this.zr=0;this.Nb=this.Jf=this.ig=this.Wg=this.Od=null;this.Fr=0;this.kv=this.gm=null;this.lg=0;this.Gr=null;this.Zg=[];this.Zg.length=100}t.ga("LayeredDigraphLayout",Z);t.Ka(Z,be);
  Z.prototype.cloneProtected=function(a){be.prototype.cloneProtected.call(this,a);a.bm=this.bm;a.xd=this.xd;a.sa=this.sa;a.Dn=this.Dn;a.mo=this.mo;a.Yn=this.Yn;a.Zl=this.Zl;a.vn=this.vn;a.Hi=this.Hi;a.Mh=this.Mh;a.zj=this.zj};Z.prototype.createNetwork=function(){var a=new Eo;Ln(a,this);return a};
  Z.prototype.doLayout=function(a){a||t.m("Layout.doLayout(collection) argument must not be null but a Diagram, a Group, or an Iterable of Parts");null===this.network&&(this.network=this.makeNetwork(a));this.Dd=this.initialOrigin(this.Dd);this.bv=-1;this.Kf=this.zr=0;this.Gr=this.kv=this.gm=null;for(a=0;a<this.Zg.length;a++)this.Zg[a]=null;if(0<this.network.vertexes.count){this.network.xw();for(a=this.network.edges.k;a.next();)a.value.rev=!1;switch(this.Dn){default:case Fo:var b=0,c=this.network.vertexes.count-
  1;a=[];a.length=c+1;for(var d=this.network.vertexes.k;d.next();)d.value.valid=!0;for(;null!==Oo(this.network);){for(d=So(this.network);null!==d;)a[c]=d,c--,d.valid=!1,d=So(this.network);for(d=To(this.network);null!==d;)a[b]=d,b++,d.valid=!1,d=To(this.network);for(var d=null,f=0,g=this.network.vertexes.k;g.next();){var h=g.value;if(h.valid){for(var k=0,l=h.gc;l.next();)l.value.toVertex.valid&&k++;for(var l=0,m=h.rc;m.next();)m.value.fromVertex.valid&&l++;if(null===d||f<k-l)d=h,f=k-l}}null!==d&&(a[b]=
  d,b++,d.valid=!1)}for(b=0;b<this.network.vertexes.count;b++)a[b].index=b;for(a=this.network.edges.k;a.next();)b=a.value,b.fromVertex.index>b.toVertex.index&&(this.network.ox(b),b.rev=!0);break;case zo:for(b=this.network.vertexes.k;b.next();)b.value.$o=-1,b.value.finish=-1;for(a=this.network.edges.k;a.next();)a.value.forest=!1;this.Fr=0;for(b.reset();b.next();)0===b.value.rc.count&&Uo(this,b.value);for(b.reset();b.next();)-1===b.value.$o&&Uo(this,b.value);for(a.reset();a.next();)b=a.value,b.forest||
  (c=b.fromVertex,d=c.finish,f=b.toVertex,g=f.finish,f.$o<c.$o&&d<g&&(this.network.ox(b),b.rev=!0))}for(a=this.network.vertexes.k;a.next();)b=a.value,b.layer=-1;this.lb=-1;this.assignLayers();for(a.reset();a.next();)this.lb=Math.max(this.lb,a.value.layer);c=this.network.edges.k;for(b=[];c.next();)a=c.value,a.valid=!1,b.push(a);for(c=0;c<b.length;c++)if(a=b[c],!a.valid&&(null!==a.fromVertex.rd&&null!==a.toVertex.rd||a.fromVertex.layer!==a.toVertex.layer)){g=k=h=l=0;f=a.fromVertex;d=a.toVertex;if(null!==
  a.link){k=a.link;if(null===k)continue;var n=f.rd,g=d.rd;if(null===n||null===g)continue;var p=k.aa,h=k.ca,q=k.ud,l=k.fe;a.rev&&(k=p,m=q,p=h,q=l,h=k,l=m);var r=f.O,k=a.toVertex.O,s=a.rev?d.T:f.T,m=t.K();isNaN(s.x)?m.assign(r):zm(p,q,Kb,m);n!==p&&!isNaN(s.x)&&p.Qa()&&(n=f.T,isNaN(n.x)||(m.x+=s.x-n.x,m.y+=s.y-n.y));p=a.rev?f.T:d.T;n=t.K();isNaN(p.x)?n.assign(k):zm(h,l,Kb,n);g!==h&&!isNaN(p.x)&&h.Qa()&&(g=d.T,isNaN(g.x)||(n.x+=p.x-g.x,n.y+=p.y-g.y));90===this.sa||270===this.sa?(g=Math.round((m.x-r.x)/
  this.xd),h=m.x,k=Math.round((n.x-k.x)/this.xd),l=n.x):(g=Math.round((m.y-r.y)/this.xd),h=m.y,k=Math.round((n.y-k.y)/this.xd),l=n.y);t.B(m);t.B(n);a.portFromColOffset=g;a.portFromPos=h;a.portToColOffset=k;a.portToPos=l}else a.portFromColOffset=0,a.portFromPos=0,a.portToColOffset=0,a.portToPos=0;m=f.layer;r=d.layer;n=a;p=0;s=n.link;if(null!==s){var u=s.ud,v=s.fe;if(null!==u&&null!==v){var D=s.aa,q=s.ca;if(null!==D&&null!==q){var A=u.pb,G=v.tb;this.xl||(s.pb.Pc()||(A=s.pb),s.tb.Pc()||(G=s.tb));if(A.Pc()||
  A===wb)A=Vo(this,!0);if(G.Pc()||G===wb)G=Vo(this,!1);var L=s.ic,N=s.getLinkPoint(D,u,A,!0,L,q,v,t.K()),A=s.getLinkDirection(D,u,N,A,!0,L,q,v);t.B(N);A===Wo(this,n,!0)?p+=1:this.xl&&null!==D&&1===D.ports.count&&n.rev&&(p+=1);N=s.getLinkPoint(q,v,G,!1,L,D,u,t.K());s=s.getLinkDirection(q,v,N,G,!1,L,D,u);t.B(N);s===Wo(this,n,!1)?p+=2:this.xl&&null!==q&&1===q.ports.count&&n.rev&&(p+=2)}}}n=1===p||3===p?!0:!1;if(p=2===p||3===p?!0:!1)q=this.network.createVertex(),q.rd=null,q.Cm=1,q.layer=m,q.near=f,this.network.Xk(q),
  f=this.network.$m(f,q,a.link),f.valid=!1,f.rev=a.rev,f.portFromColOffset=g,f.portToColOffset=0,f.portFromPos=h,f.portToPos=0,f=q;s=1;n&&s--;if(m-r>s&&0<m){a.valid=!1;q=this.network.createVertex();q.rd=null;q.Cm=2;q.layer=m-1;this.network.Xk(q);f=this.network.$m(f,q,a.link);f.valid=!0;f.rev=a.rev;f.portFromColOffset=p?0:g;f.portToColOffset=0;f.portFromPos=p?0:h;f.portToPos=0;f=q;for(m--;m-r>s&&0<m;)q=this.network.createVertex(),q.rd=null,q.Cm=3,q.layer=m-1,this.network.Xk(q),f=this.network.$m(f,q,
  a.link),f.valid=!0,f.rev=a.rev,f.portFromColOffset=0,f.portToColOffset=0,f.portFromPos=0,f.portToPos=0,f=q,m--;f=this.network.$m(q,d,a.link);f.valid=!n;n&&(q.near=d);f.rev=a.rev;f.portFromColOffset=0;f.portToColOffset=k;f.portFromPos=0;f.portToPos=l}else a.valid=!0}b=this.Od=[];for(c=0;c<=this.lb;c++)b[c]=0;for(a=this.network.vertexes.k;a.next();)a.value.index=-1;this.initializeIndices();this.bv=-1;for(c=this.Kf=this.zr=0;c<=this.lb;c++)b[c]>b[this.Kf]&&(this.bv=b[c]-1,this.Kf=c),b[c]<b[this.zr]&&
  (this.zr=c);this.Gr=[];for(c=0;c<b.length;c++)this.Gr[c]=[];for(a.reset();a.next();)c=a.value,b=c.layer,this.Gr[b][c.index]=c;this.Ib=-1;for(a=0;a<=this.lb;a++){b=Xo(this,a);c=0;d=this.Od[a];for(f=0;f<d;f++)g=b[f],c+=this.nodeMinColumnSpace(g,!0),g.column=c,c+=1,c+=this.nodeMinColumnSpace(g,!1);this.Ib=Math.max(this.Ib,c-1);Yo(this,a,b)}this.reduceCrossings();this.straightenAndPack();this.updateParts()}this.network=null;this.$e=!0};
  Z.prototype.linkMinLength=function(a){var b=a.toVertex,c=0;for(a=a.fromVertex.gc;a.next();)a.value.toVertex===b&&c++;return 1<c?2:1};function Zo(a){var b=a.fromVertex.rd;a=a.toVertex.rd;return null===b&&null===a?8:null===b||null===a?4:1}Z.prototype.nodeMinLayerSpace=function(a,b){return null===a.rd?0:90===this.sa||270===this.sa?b?a.O.y+10:a.T.height-a.O.y+10:b?a.O.x+10:a.T.width-a.O.x+10};
  Z.prototype.nodeMinColumnSpace=function(a,b){if(null===a.rd)return 0;var c=b?a.JA:a.IA;if(void 0!==c)return c;c=this.sa;return 90===c||270===c?b?a.JA=a.O.x/this.xd+1|0:a.IA=(a.T.width-a.O.x)/this.xd+1|0:b?a.JA=a.O.y/this.xd+1|0:a.IA=(a.T.height-a.O.y)/this.xd+1|0};function $o(a){null===a.gm&&(a.gm=[]);for(var b=0,c=a.network.vertexes.k,d;c.next();)d=c.value,a.gm[b]=d.layer,b++,a.gm[b]=d.column,b++,a.gm[b]=d.index,b++;return a.gm}
  function ap(a,b){for(var c=0,d=a.network.vertexes.k,f;d.next();)f=d.value,f.layer=b[c],c++,f.column=b[c],c++,f.index=b[c],c++}
  function bp(a,b,c){e&&(t.q(b,Z,"crossingMatrix:unfixedLayer"),t.q(c,Z,"crossingMatrix:direction"));var d=Xo(a,b),f=a.Od[b];a.kv||(a.kv=[]);for(var g=a.kv,h,k=0;k<f;k++){h=0;var l=d[k],m=l.near,n,p;if(null!==m&&m.layer===l.layer)if(l=m.index,l>k)for(p=k+1;p<l;p++)n=d[p],n.near===m&&n.Cm===m.Cm||h++;else for(p=k-1;p>l;p--)n=d[p],n.near===m&&n.Cm===m.Cm||h++;var q,r,s,u,v,D;if(0<=c)for(l=d[k].ff,m=0;m<l.count;m++)if(q=l.n[m],q.valid&&q.fromVertex.layer!==b)for(n=q.fromVertex.index,p=q.portToPos,q=q.portFromPos,
  r=m+1;r<l.count;r++)s=l.n[r],s.valid&&s.fromVertex.layer!==b&&(u=s.fromVertex.index,v=s.portToPos,s=s.portFromPos,p<v&&(n>u||n===u&&q>s)&&h++,v<p&&(u>n||u===n&&s>q)&&h++);if(0>=c)for(l=d[k].Te,m=0;m<l.count;m++)if(q=l.n[m],q.valid&&q.toVertex.layer!==b)for(n=q.toVertex.index,p=q.portToPos,q=q.portFromPos,r=m+1;r<l.count;r++)s=l.n[r],s.valid&&s.toVertex.layer!==b&&(u=s.toVertex.index,v=s.portToPos,s=s.portFromPos,q<s&&(n>u||n===u&&p>v)&&h++,s<q&&(u>n||u===n&&v>p)&&h++);g[k*f+k]=h;for(l=k+1;l<f;l++){var A=
  0,G=0;if(0<=c)for(h=d[k].ff,D=d[l].ff,m=0;m<h.count;m++)if(q=h.n[m],q.valid&&q.fromVertex.layer!==b)for(n=q.fromVertex.index,q=q.portFromPos,r=0;r<D.count;r++)s=D.n[r],s.valid&&s.fromVertex.layer!==b&&(u=s.fromVertex.index,s=s.portFromPos,(n<u||n===u&&q<s)&&G++,(u<n||u===n&&s<q)&&A++);if(0>=c)for(h=d[k].Te,D=d[l].Te,m=0;m<h.count;m++)if(q=h.n[m],q.valid&&q.toVertex.layer!==b)for(n=q.toVertex.index,p=q.portToPos,r=0;r<D.count;r++)s=D.n[r],s.valid&&s.toVertex.layer!==b&&(u=s.toVertex.index,v=s.portToPos,
  (n<u||n===u&&p<v)&&G++,(u<n||u===n&&v<p)&&A++);g[k*f+l]=A;g[l*f+k]=G}}Yo(a,b,d);return g}Z.prototype.countCrossings=function(){var a,b=0,c,d;for(a=0;a<=this.lb;a++){c=bp(this,a,1);d=this.Od[a];for(var f=0;f<d;f++)for(var g=f;g<d;g++)b+=c[f*d+g]}return b};
  function cp(a){for(var b=0,c=0;c<=a.lb;c++){for(var d=a,f=c,g=Xo(d,f),h=d.Od[f],k=0,l=void 0,l=0;l<h;l++){var m=g[l].Te,n,p,q;if("undefined"!==typeof m)for(var r=0;r<m.count;r++)n=m.n[r],n.valid&&n.toVertex.layer!==f&&(p=n.fromVertex.column+n.portFromColOffset,q=n.toVertex.column+n.portToColOffset,k+=(Math.abs(p-q)+1)*Zo(n))}Yo(d,f,g);b+=k}return b}
  Z.prototype.normalize=function(){var a=Infinity;this.Ib=-1;for(var b=this.network.vertexes.k,c;b.next();)c=b.value,a=Math.min(a,c.column-this.nodeMinColumnSpace(c,!0)),this.Ib=Math.max(this.Ib,c.column+this.nodeMinColumnSpace(c,!1));for(b.reset();b.next();)b.value.column-=a;this.Ib-=a};
  function dp(a,b,c){e&&(t.q(b,Z,"barycenters:unfixedLayer"),t.q(c,Z,"barycenters:direction"));var d=Xo(a,b),f=a.Od[b],g=[],h;for(h=0;h<f;h++){var k=d[h],l=null;0>=c&&(l=k.ff);var m=null;0<=c&&(m=k.Te);var n=0,p=0,q=k.near;null!==q&&q.layer===k.layer&&(n+=q.column-1,p++);if(null!==l)for(q=0;q<l.count;q++){var k=l.n[q],r=k.fromVertex;k.valid&&!k.rev&&r.layer!==b&&(n+=r.column+k.portFromColOffset,p++)}if(null!==m)for(l=0;l<m.count;l++)k=m.n[l],q=k.toVertex,k.valid&&!k.rev&&q.layer!==b&&(n+=q.column+k.portToColOffset,
  p++);g[h]=0===p?-1:n/p}Yo(a,b,d);return g}
  function ep(a,b,c){e&&(t.q(b,Z,"medians:unfixedLayer"),t.q(c,Z,"medians:direction"));for(var d=Xo(a,b),f=a.Od[b],g=[],h=0;h<f;h++){var k=d[h],l=null;0>=c&&(l=k.ff);var m=null;0<=c&&(m=k.Te);var n=0,p=[],q=k.near;null!==q&&q.layer===k.layer&&(p[n]=q.column-1,n++);if(null!==l)for(q=0;q<l.count;q++){var k=l.n[q],r=k.fromVertex;k.valid&&!k.rev&&r.layer!==b&&(p[n]=r.column+k.portFromColOffset,n++)}if(null!==m)for(l=0;l<m.count;l++)k=m.n[l],q=k.toVertex,k.valid&&!k.rev&&q.layer!==b&&(p[n]=q.column+k.portToColOffset,
  n++);0===n?g[h]=-1:(p.sort(function(a,b){return a-b}),m=n>>1,g[h]=n&1?p[m]:p[m-1]+p[m]>>1)}Yo(a,b,d);return g}function fp(a,b,c,d,f,g){if(b.component===d){b.component=c;var h,k;if(f)for(var l=b.gc;l.next();){var m=l.value.toVertex;h=b.layer-m.layer;k=a.linkMinLength(l.value);h===k&&fp(a,m,c,d,f,g)}if(g)for(l=b.rc;l.next();)m=l.value.fromVertex,h=m.layer-b.layer,k=a.linkMinLength(l.value),h===k&&fp(a,m,c,d,f,g)}}
  function gp(a,b,c,d,f,g){if(b.component===d){b.component=c;if(f)for(var h=b.gc,k;h.next();)k=h.value.toVertex,gp(a,k,c,d,f,g);if(g)for(b=b.rc;b.next();)h=b.value.fromVertex,gp(a,h,c,d,f,g)}}function Oo(a){for(a=a.vertexes.k;a.next();){var b=a.value;if(b.valid)return b}return null}function So(a){for(a=a.vertexes.k;a.next();){var b=a.value;if(b.valid){for(var c=!0,d=b.gc;d.next();)if(d.value.toVertex.valid){c=!1;break}if(c)return b}}return null}
  function To(a){for(a=a.vertexes.k;a.next();){var b=a.value;if(b.valid){for(var c=!0,d=b.rc;d.next();)if(d.value.fromVertex.valid){c=!1;break}if(c)return b}}return null}function Uo(a,b){b.$o=a.Fr;a.Fr++;for(var c=b.gc;c.next();){var d=c.value,f=d.toVertex;-1===f.$o&&(d.forest=!0,Uo(a,f))}b.finish=a.Fr;a.Fr++}
  Z.prototype.assignLayers=function(){switch(this.mo){case hp:ip(this);break;case jp:for(var a,b=this.network.vertexes.k;b.next();)a=kp(this,b.value),this.lb=Math.max(a,this.lb);for(b.reset();b.next();)a=b.value,a.layer=this.lb-a.layer;break;default:case Ao:ip(this);for(b=this.network.vertexes.k;b.next();)b.value.valid=!1;for(b.reset();b.next();)0===b.value.rc.count&&lp(this,b.value);a=Infinity;for(b.reset();b.next();)a=Math.min(a,b.value.layer);this.lb=-1;for(b.reset();b.next();)b.value.layer-=a,this.lb=
  Math.max(this.lb,b.value.layer)}};function ip(a){for(var b=a.network.vertexes.k;b.next();){var c=mp(a,b.value);a.lb=Math.max(c,a.lb)}}function mp(a,b){var c=0;if(-1===b.layer){for(var d=b.gc;d.next();)var f=d.value,g=a.linkMinLength(f),c=Math.max(c,mp(a,f.toVertex)+g);b.layer=c}else c=b.layer;return c}function kp(a,b){var c=0;if(-1===b.layer){for(var d,f,g=b.rc;g.next();)f=g.value,d=a.linkMinLength(f),c=Math.max(c,kp(a,f.fromVertex)+d);b.layer=c}else c=b.layer;return c}
  function lp(a,b){if(!b.valid){b.valid=!0;for(var c=b.gc;c.next();)lp(a,c.value.toVertex);for(c=a.network.vertexes.k;c.next();)c.value.component=-1;for(var d=b.ff.n,f=d.length,g=0;g<f;g++){var h=d[g],k=a.linkMinLength(h);h.fromVertex.layer-h.toVertex.layer>k&&fp(a,h.fromVertex,0,-1,!0,!1)}for(fp(a,b,1,-1,!0,!0);0!==b.component;){for(var k=0,d=Infinity,l=0,m=null,n=a.network.vertexes.k;n.next();){var p=n.value;if(1===p.component){for(var q=0,r=!1,s=p.ff.n,f=s.length,g=0;g<f;g++){var h=s[g],u=h.fromVertex,
  q=q+1;1!==u.component&&(k+=1,u=u.layer-p.layer,h=a.linkMinLength(h),d=Math.min(d,u-h))}h=p.Te.n;f=h.length;for(g=0;g<f;g++)s=h[g].toVertex,q-=1,1!==s.component?k-=1:r=!0;(null===m||q<l)&&!r&&(m=p,l=q)}}if(0<k){for(c.reset();c.next();)f=c.value,1===f.component&&(f.layer+=d);b.component=0}else m.component=0}for(c=a.network.vertexes.k;c.next();)c.value.component=-1;for(fp(a,b,1,-1,!0,!1);0!==b.component;){g=0;f=Infinity;d=0;k=null;for(l=a.network.vertexes.k;l.next();)if(m=l.value,1===m.component){n=
  0;p=!1;h=m.ff.n;q=h.length;for(r=0;r<q;r++)s=h[r].fromVertex,n+=1,1!==s.component?g+=1:p=!0;h=m.Te.n;q=h.length;for(r=0;r<q;r++)s=h[r],u=s.toVertex,n-=1,1!==u.component&&(g-=1,u=m.layer-u.layer,s=a.linkMinLength(s),f=Math.min(f,u-s));(null===k||n>d)&&!p&&(k=m,d=n)}if(0>g){for(c.reset();c.next();)g=c.value,1===g.component&&(g.layer-=f);b.component=0}else k.component=0}}}
  function Wo(a,b,c){return 90===a.sa?c&&!b.rev||!c&&b.rev?270:90:180===a.sa?c&&!b.rev||!c&&b.rev?0:180:270===a.sa?c&&!b.rev||!c&&b.rev?90:270:c&&!b.rev||!c&&b.rev?180:0}
  Z.prototype.initializeIndices=function(){switch(this.Yn){default:case np:for(var a,b=this.network.vertexes.k;b.next();){var c=b.value;a=c.layer;c.index=this.Od[a];this.Od[a]++}break;case Bo:b=this.network.vertexes.k;for(a=this.lb;0<=a;a--){for(;b.next();)b.value.layer===a&&-1===b.value.index&&op(this,b.value);b.reset()}break;case pp:for(b=this.network.vertexes.k,a=0;a<=this.lb;a++){for(;b.next();)b.value.layer===a&&-1===b.value.index&&qp(this,b.value);b.reset()}}};
  function op(a,b){var c=b.layer;b.index=a.Od[c];a.Od[c]++;for(var c=b.Te.Ie(),d=!0,f;d;)for(d=!1,f=0;f<c.length-1;f++){var g=c[f],h=c[f+1];g.portFromColOffset>h.portFromColOffset&&(d=!0,c[f]=h,c[f+1]=g)}for(f=0;f<c.length;f++)d=c[f],d.valid&&(d=d.toVertex,-1===d.index&&op(a,d))}
  function qp(a,b){var c=b.layer;b.index=a.Od[c];a.Od[c]++;for(var c=b.ff.Ie(),d=!0,f;d;)for(d=!1,f=0;f<c.length-1;f++){var g=c[f],h=c[f+1];g.portToColOffset>h.portToColOffset&&(d=!0,c[f]=h,c[f+1]=g)}for(f=0;f<c.length;f++)d=c[f],d.valid&&(d=d.fromVertex,-1===d.index&&qp(a,d))}
  Z.prototype.reduceCrossings=function(){var a=this.countCrossings(),b=$o(this),c,d,f;for(c=0;c<this.Zl;c++){for(d=0;d<=this.lb;d++)rp(this,d,1),sp(this,d,1);f=this.countCrossings();f<a&&(a=f,b=$o(this));for(d=this.lb;0<=d;d--)rp(this,d,-1),sp(this,d,-1);f=this.countCrossings();f<a&&(a=f,b=$o(this))}ap(this,b);for(c=0;c<this.Zl;c++){for(d=0;d<=this.lb;d++)rp(this,d,0),sp(this,d,0);f=this.countCrossings();f<a&&(a=f,b=$o(this));for(d=this.lb;0<=d;d--)rp(this,d,0),sp(this,d,0);f=this.countCrossings();
  f<a&&(a=f,b=$o(this))}ap(this,b);var g,h,k;switch(this.vn){case tp:break;case up:for(k=a+1;(d=this.countCrossings())<k;)for(k=d,c=this.lb;0<=c;c--)for(h=0;h<=c;h++){for(g=!0;g;)for(g=!1,d=c;d>=h;d--)g=sp(this,d,-1)||g;f=this.countCrossings();f>=a?ap(this,b):(a=f,b=$o(this));for(g=!0;g;)for(g=!1,d=c;d>=h;d--)g=sp(this,d,1)||g;f=this.countCrossings();f>=a?ap(this,b):(a=f,b=$o(this));for(g=!0;g;)for(g=!1,d=h;d<=c;d++)g=sp(this,d,1)||g;f>=a?ap(this,b):(a=f,b=$o(this));for(g=!0;g;)for(g=!1,d=h;d<=c;d++)g=
  sp(this,d,-1)||g;f>=a?ap(this,b):(a=f,b=$o(this));for(g=!0;g;)for(g=!1,d=c;d>=h;d--)g=sp(this,d,0)||g;f>=a?ap(this,b):(a=f,b=$o(this));for(g=!0;g;)for(g=!1,d=h;d<=c;d++)g=sp(this,d,0)||g;f>=a?ap(this,b):(a=f,b=$o(this))}break;default:case Co:for(c=this.lb,h=0,k=a+1;(d=this.countCrossings())<k;){k=d;for(g=!0;g;)for(g=!1,d=c;d>=h;d--)g=sp(this,d,-1)||g;f=this.countCrossings();f>=a?ap(this,b):(a=f,b=$o(this));for(g=!0;g;)for(g=!1,d=c;d>=h;d--)g=sp(this,d,1)||g;f=this.countCrossings();f>=a?ap(this,b):
  (a=f,b=$o(this));for(g=!0;g;)for(g=!1,d=h;d<=c;d++)g=sp(this,d,1)||g;f>=a?ap(this,b):(a=f,b=$o(this));for(g=!0;g;)for(g=!1,d=h;d<=c;d++)g=sp(this,d,-1)||g;f>=a?ap(this,b):(a=f,b=$o(this));for(g=!0;g;)for(g=!1,d=c;d>=h;d--)g=sp(this,d,0)||g;f>=a?ap(this,b):(a=f,b=$o(this));for(g=!0;g;)for(g=!1,d=h;d<=c;d++)g=sp(this,d,0)||g;f>=a?ap(this,b):(a=f,b=$o(this))}}ap(this,b)};
  function rp(a,b,c){e&&(t.q(b,Z,"medianBarycenterCrossingReduction:unfixedLayer"),t.q(c,Z,"medianBarycenterCrossingReduction:direction"));var d=Xo(a,b),f=a.Od[b],g=ep(a,b,c),h=dp(a,b,c);for(c=0;c<f;c++)-1===h[c]&&(h[c]=d[c].column),-1===g[c]&&(g[c]=d[c].column);for(var k=!0,l;k;)for(k=!1,c=0;c<f-1;c++)if(g[c+1]<g[c]||g[c+1]===g[c]&&h[c+1]<h[c])k=!0,l=g[c],g[c]=g[c+1],g[c+1]=l,l=h[c],h[c]=h[c+1],h[c+1]=l,l=d[c],d[c]=d[c+1],d[c+1]=l;for(c=g=0;c<f;c++)l=d[c],l.index=c,g+=a.nodeMinColumnSpace(l,!0),l.column=
  g,g+=1,g+=a.nodeMinColumnSpace(l,!1);Yo(a,b,d)}
  function sp(a,b,c){var d=Xo(a,b),f=a.Od[b];c=bp(a,b,c);var g,h;h=[];for(g=0;g<f;g++)h[g]=-1;var k;k=[];for(g=0;g<f;g++)k[g]=-1;for(var l=!1,m=!0;m;)for(m=!1,g=0;g<f-1;g++){var n=c[d[g].index*f+d[g+1].index],p=c[d[g+1].index*f+d[g].index],q=0,r=0,s=d[g].column,u=d[g+1].column,v=a.nodeMinColumnSpace(d[g],!0),D=a.nodeMinColumnSpace(d[g],!1),A=a.nodeMinColumnSpace(d[g+1],!0),G=a.nodeMinColumnSpace(d[g+1],!1),v=s-v+A,D=u-D+G,L=d[g].rc.k;for(L.reset();L.next();)if(G=L.value,G.valid&&G.fromVertex.layer===
  b){G=G.fromVertex;for(A=0;d[A]!==G;)A++;A<g&&(q+=2*(g-A),r+=2*(g+1-A));A===g+1&&(q+=1);A>g+1&&(q+=4*(A-g),r+=4*(A-(g+1)))}L=d[g].gc.k;for(L.reset();L.next();)if(G=L.value,G.valid&&G.toVertex.layer===b){G=G.toVertex;for(A=0;d[A]!==G;)A++;A===g+1&&(r+=1)}L=d[g+1].rc.k;for(L.reset();L.next();)if(G=L.value,G.valid&&G.fromVertex.layer===b){G=G.fromVertex;for(A=0;d[A]!==G;)A++;A<g&&(q+=2*(g+1-A),r+=2*(g-A));A===g&&(r+=1);A>g+1&&(q+=4*(A-(g+1)),r+=4*(A-g))}L=d[g+1].gc.k;for(L.reset();L.next();)if(G=L.value,
  G.valid&&G.toVertex.layer===b){G=G.toVertex;for(A=0;d[A]!==G;)A++;A===g&&(q+=1)}var A=G=0,L=h[d[g].index],N=k[d[g].index],O=h[d[g+1].index],U=k[d[g+1].index];-1!==L&&(G+=Math.abs(L-s),A+=Math.abs(L-D));-1!==N&&(G+=Math.abs(N-s),A+=Math.abs(N-D));-1!==O&&(G+=Math.abs(O-u),A+=Math.abs(O-v));-1!==U&&(G+=Math.abs(U-u),A+=Math.abs(U-v));if(r<q-0.5||r===q&&p<n-0.5||r===q&&p===n&&A<G-0.5)m=l=!0,d[g].column=D,d[g+1].column=v,n=d[g],d[g]=d[g+1],d[g+1]=n}for(g=0;g<f;g++)d[g].index=g;Yo(a,b,d);return l}
  Z.prototype.straightenAndPack=function(){var a,b,c=0!==(this.Hi&vp);a=this.Hi===Do;1E3<this.network.edges.count&&!a&&(c=!1);if(c){b=[];for(a=0;a<=this.lb;a++)b[a]=0;for(var d=this.network.vertexes.k,f,g;d.next();)f=d.value,a=f.layer,g=f.column,f=this.nodeMinColumnSpace(f,!1),b[a]=Math.max(b[a],g+f);for(d.reset();d.next();)f=d.value,a=f.layer,g=f.column,f.column=(8*(this.Ib-b[a])>>1)+8*g;this.Ib*=8}if(0!==(this.Hi&wp))for(b=!0;b;){b=!1;for(a=this.Kf+1;a<=this.lb;a++)b=xp(this,a,1)||b;for(a=this.Kf-
  1;0<=a;a--)b=xp(this,a,-1)||b;b=xp(this,this.Kf,0)||b}if(0!==(this.Hi&yp)){for(a=this.Kf+1;a<=this.lb;a++)zp(this,a,1);for(a=this.Kf-1;0<=a;a--)zp(this,a,-1);zp(this,this.Kf,0)}c&&(Ap(this,-1),Ap(this,1));if(0!==(this.Hi&wp))for(b=!0;b;){b=!1;b=xp(this,this.Kf,0)||b;for(a=this.Kf+1;a<=this.lb;a++)b=xp(this,a,0)||b;for(a=this.Kf-1;0<=a;a--)b=xp(this,a,0)||b}};function xp(a,b,c){e&&(t.q(b,Z,"bendStraighten:unfixedLayer"),t.q(c,Z,"bendStraighten:direction"));for(var d=!1;Bp(a,b,c);)d=!0;return d}
  function Bp(a,b,c){e&&(t.q(b,Z,"shiftbendStraighten:unfixedLayer"),t.q(c,Z,"shiftbendStraighten:direction"));var d,f=Xo(a,b),g=a.Od[b],h=dp(a,b,-1);if(0<c)for(d=0;d<g;d++)h[d]=-1;var k=dp(a,b,1);if(0>c)for(d=0;d<g;d++)k[d]=-1;for(var l=!1,m=!0;m;)for(m=!1,d=0;d<g;d++){var n=f[d].column,p=a.nodeMinColumnSpace(f[d],!0),q=a.nodeMinColumnSpace(f[d],!1),p=0>d-1||n-f[d-1].column-1>p+a.nodeMinColumnSpace(f[d-1],!1)?n-1:n,q=d+1>=g||f[d+1].column-n-1>q+a.nodeMinColumnSpace(f[d+1],!0)?n+1:n,r=0,s=0,u=0,v,D,
  A,G;if(0>=c)for(var L=f[d].rc.k;L.next();)v=L.value,v.valid&&v.fromVertex.layer!==b&&(D=Zo(v),A=v.portFromColOffset,G=v.portToColOffset,v=v.fromVertex.column,r+=(Math.abs(n+G-(v+A))+1)*D,s+=(Math.abs(p+G-(v+A))+1)*D,u+=(Math.abs(q+G-(v+A))+1)*D);if(0<=c)for(L=f[d].gc.k;L.next();)v=L.value,v.valid&&v.toVertex.layer!==b&&(D=Zo(v),A=v.portFromColOffset,G=v.portToColOffset,v=v.toVertex.column,r+=(Math.abs(n+A-(v+G))+1)*D,s+=(Math.abs(p+A-(v+G))+1)*D,u+=(Math.abs(q+A-(v+G))+1)*D);G=A=D=0;v=h[f[d].index];
  L=k[f[d].index];-1!==v&&(D+=Math.abs(v-n),A+=Math.abs(v-p),G+=Math.abs(v-q));-1!==L&&(D+=Math.abs(L-n),A+=Math.abs(L-p),G+=Math.abs(L-q));if(s<r||s===r&&A<D)m=l=!0,f[d].column=p;if(u<r||u===r&&G<D)m=l=!0,f[d].column=q}Yo(a,b,f);a.normalize();return l}
  function zp(a,b,c){e&&(t.q(b,Z,"medianStraighten:unfixedLayer"),t.q(c,Z,"medianStraighten:direction"));var d=Xo(a,b),f=a.Od[b],g=ep(a,b,c),h=[];for(c=0;c<f;c++)h[c]=g[c];for(g=!0;g;)for(g=!1,c=0;c<f;c++){var k=d[c].column,l=a.nodeMinColumnSpace(d[c],!0),m=a.nodeMinColumnSpace(d[c],!1),n=0,p;-1===h[c]?0===c&&c===f-1?n=k:0===c?(p=d[c+1].column,n=p-k===m+a.nodeMinColumnSpace(d[c+1],!0)?k-1:k):c===f-1?(p=d[c-1].column,n=k-p===l+a.nodeMinColumnSpace(d[c-1],!1)?k+1:k):(p=d[c-1].column,l=p+a.nodeMinColumnSpace(d[c-
  1],!1)+l+1,p=d[c+1].column,m=p-a.nodeMinColumnSpace(d[c+1],!0)-m-1,n=(l+m)/2|0):0===c&&c===f-1?n=h[c]:0===c?(p=d[c+1].column,m=p-a.nodeMinColumnSpace(d[c+1],!0)-m-1,n=Math.min(h[c],m)):c===f-1?(p=d[c-1].column,l=p+a.nodeMinColumnSpace(d[c-1],!1)+l+1,n=Math.max(h[c],l)):(p=d[c-1].column,l=p+a.nodeMinColumnSpace(d[c-1],!1)+l+1,p=d[c+1].column,m=p-a.nodeMinColumnSpace(d[c+1],!0)-m-1,l<h[c]&&h[c]<m?n=h[c]:l>=h[c]?n=l:m<=h[c]&&(n=m));n!==k&&(g=!0,d[c].column=n)}Yo(a,b,d);a.normalize()}
  function Cp(a,b){e&&(t.q(b,Z,"packAux:column"),t.q(1,Z,"packAux:direction"));for(var c=!0,d=a.network.vertexes.k,f;d.next();){f=d.value;var g=a.nodeMinColumnSpace(f,!0),h=a.nodeMinColumnSpace(f,!1);if(f.column-g<=b&&f.column+h>=b){c=!1;break}}g=!1;if(c)for(d.reset();d.next();)f=d.value,f.column>b&&(f.column-=1,g=!0);return g}
  function Dp(a,b){e&&(t.q(b,Z,"tightPackAux:column"),t.q(1,Z,"tightPackAux:direction"));var c=b,c=b+1,d,f=[],g=[];for(d=0;d<=a.lb;d++)f[d]=!1,g[d]=!1;for(var h=a.network.vertexes.k;h.next();){d=h.value;var k=d.column-a.nodeMinColumnSpace(d,!0),l=d.column+a.nodeMinColumnSpace(d,!1);k<=b&&l>=b&&(f[d.layer]=!0);k<=c&&l>=c&&(g[d.layer]=!0)}k=!0;c=!1;for(d=0;d<=a.lb;d++)k=k&&!(f[d]&&g[d]);if(k)for(h.reset();h.next();)d=h.value,d.column>b&&(d.column-=1,c=!0);return c}
  function Ap(a,b){e&&t.q(b,Z,"componentPack:direction");for(var c=0;c<=a.Ib;c++)for(;Cp(a,c););a.normalize();for(c=0;c<a.Ib;c++)for(;Dp(a,c););a.normalize();var d,f,g,h;if(0<b)for(c=0;c<=a.Ib;c++)for(d=$o(a),f=cp(a),g=f+1;f<g;)g=f,Ep(a,c,1),h=cp(a),h>f?ap(a,d):h<f&&(f=h,d=$o(a));if(0>b)for(c=a.Ib;0<=c;c--)for(d=$o(a),f=cp(a),g=f+1;f<g;)g=f,Ep(a,c,-1),h=cp(a),h>f?ap(a,d):h<f&&(f=h,d=$o(a));a.normalize()}
  function Ep(a,b,c){a.lg=0;for(var d=a.network.vertexes.k,f;d.next();)d.value.component=-1;if(0<c)for(d.reset();d.next();)f=d.value,f.column-a.nodeMinColumnSpace(f,!0)<=b&&(f.component=a.lg);if(0>c)for(d.reset();d.next();)f=d.value,f.column+a.nodeMinColumnSpace(f,!1)>=b&&(f.component=a.lg);a.lg++;for(d.reset();d.next();)f=d.value,-1===f.component&&(gp(a,f,a.lg,-1,!0,!0),a.lg++);b=[];for(f=0;f<a.lg*a.lg;f++)b[f]=!1;var g=[];for(f=0;f<(a.lb+1)*(a.Ib+1);f++)g[f]=-1;for(d.reset();d.next();){f=d.value;
  for(var h=f.layer,k=Math.max(0,f.column-a.nodeMinColumnSpace(f,!0)),l=Math.min(a.Ib,f.column+a.nodeMinColumnSpace(f,!1));k<=l;k++)g[h*(a.Ib+1)+k]=f.component}for(f=0;f<=a.lb;f++){if(0<c)for(k=0;k<a.Ib;k++)-1!==g[f*(a.Ib+1)+k]&&-1!==g[f*(a.Ib+1)+k+1]&&g[f*(a.Ib+1)+k]!==g[f*(a.Ib+1)+k+1]&&(b[g[f*(a.Ib+1)+k]*a.lg+g[f*(a.Ib+1)+k+1]]=!0);if(0>c)for(k=a.Ib;0<k;k--)-1!==g[f*(a.Ib+1)+k]&&-1!==g[f*(a.Ib+1)+k-1]&&g[f*(a.Ib+1)+k]!==g[f*(a.Ib+1)+k-1]&&(b[g[f*(a.Ib+1)+k]*a.lg+g[f*(a.Ib+1)+k-1]]=!0)}g=[];for(f=
  0;f<a.lg;f++)g[f]=!0;h=new B("number");for(h.add(0);0!==h.count;)if(l=h.n[h.count-1],h.qd(h.count-1),g[l])for(g[l]=!1,f=0;f<a.lg;f++)b[l*a.lg+f]&&h.Jd(0,f);if(0<c)for(d.reset();d.next();)f=d.value,g[f.component]&&(f.column-=1);if(0>c)for(d.reset();d.next();)f=d.value,g[f.component]&&(f.column+=1)}Z.prototype.commitLayout=function(){if(this.xl)for(var a=Vo(this,!0),b=Vo(this,!1),c=this.network.edges.k,d;c.next();)d=c.value.link,null!==d&&(d.pb=a,d.tb=b);this.commitNodes();this.Vz();this.qt&&this.commitLinks()};
  function Vo(a,b){return 270===a.sa?b?Qb:Wb:90===a.sa?b?Wb:Qb:180===a.sa?b?Ub:Vb:b?Vb:Ub}
  Z.prototype.commitNodes=function(){this.Wg=[];this.ig=[];this.Jf=[];this.Nb=[];for(var a=0;a<=this.lb;a++)this.Wg[a]=0,this.ig[a]=0,this.Jf[a]=0,this.Nb[a]=0;for(var a=this.network.vertexes.k,b,c;a.next();)b=a.value,c=b.layer,this.Wg[c]=Math.max(this.Wg[c],this.nodeMinLayerSpace(b,!0)),this.ig[c]=Math.max(this.ig[c],this.nodeMinLayerSpace(b,!1));var d=0,f=this.bm;for(b=0;b<=this.lb;b++)c=f,0>=this.Wg[b]+this.ig[b]&&(c=0),0<b&&(d+=c/2),90===this.sa||0===this.sa?(d+=this.ig[b],this.Jf[b]=d,d+=this.Wg[b]):
  (d+=this.Wg[b],this.Jf[b]=d,d+=this.ig[b]),b<this.lb&&(d+=c/2),this.Nb[b]=d;f=d;d=this.Dd;for(b=0;b<=this.lb;b++)270===this.sa?this.Jf[b]=d.y+this.Jf[b]:90===this.sa?(this.Jf[b]=d.y+f-this.Jf[b],this.Nb[b]=f-this.Nb[b]):180===this.sa?this.Jf[b]=d.x+this.Jf[b]:(this.Jf[b]=d.x+f-this.Jf[b],this.Nb[b]=f-this.Nb[b]);for(a.reset();a.next();){b=a.value;c=b.layer;var g=b.column|0;270===this.sa||90===this.sa?(f=d.x+this.xd*g,c=this.Jf[c]):(f=this.Jf[c],c=d.y+this.xd*g);b.Da=f;b.Pa=c;b.commit()}};
  Z.prototype.Vz=function(){for(var a=0,b=this.bm,c=0;c<=this.lb;c++)a+=this.Wg[c],a+=this.ig[c];for(var a=a+this.lb*b,b=[],c=this.xd*this.Ib,d=this.nJ;0<=d;d--)270===this.sa?0===d?b.push(new x(0,0,c,Math.abs(this.Nb[0]))):b.push(new x(0,this.Nb[d-1],c,Math.abs(this.Nb[d-1]-this.Nb[d]))):90===this.sa?0===d?b.push(new x(0,this.Nb[0],c,Math.abs(this.Nb[0]-a))):b.push(new x(0,this.Nb[d],c,Math.abs(this.Nb[d-1]-this.Nb[d]))):180===this.sa?0===d?b.push(new x(0,0,Math.abs(this.Nb[0]),c)):b.push(new x(this.Nb[d-
  1],0,Math.abs(this.Nb[d-1]-this.Nb[d]),c)):0===d?b.push(new x(this.Nb[0],0,Math.abs(this.Nb[0]-a),c)):b.push(new x(this.Nb[d],0,Math.abs(this.Nb[d-1]-this.Nb[d]),c));this.commitLayers(b,H.nj)};Z.prototype.commitLayers=function(){};
  Z.prototype.commitLinks=function(){for(var a=this.network.edges.k,b,c;a.next();)c=a.value.link,"undefined"!==typeof c&&null!==c&&(c.yl(),c.Uo(),c.Wi());for(a.reset();a.next();)c=a.value.link,"undefined"!==typeof c&&null!==c&&c.updateRoute();for(a.reset();a.next();)if(b=a.value,c=b.link){c.yl();var d=c,f=d.aa,g=d.ca,h=d.ud,k=d.fe;if(b.valid){if(c.De===Og&&4===c.oa){if(b.rev)var l=f,f=g,g=l,m=h,h=k,k=m;if(b.fromVertex.column===b.toVertex.column){var n=c.getLinkPoint(f,h,c.computeSpot(!0),!0,!1,g,k),
  p=c.getLinkPoint(g,k,c.computeSpot(!1),!1,!1,f,h);c.Uo();c.Wk(n.x,n.y);c.Wk((2*n.x+p.x)/3,(2*n.y+p.y)/3);c.Wk((n.x+2*p.x)/3,(n.y+2*p.y)/3);c.Wk(p.x,p.y)}else{var q=!1,r=!1;null!==h&&c.computeSpot(!0)===wb&&(q=!0);null!==k&&c.computeSpot(!1)===wb&&(r=!0);if(q||r){var s=c.o(0).x,u=c.o(0).y,v=c.o(1).x,D=c.o(1).y,A=c.o(2).x,G=c.o(2).y,L=c.o(3).x,N=c.o(3).y;if(q){90===this.sa||270===this.sa?(v=s,D=(u+N)/2):(v=(s+L)/2,D=u);c.Y(1,v,D);var O=c.getLinkPoint(f,h,c.computeSpot(!0),!0,!1,g,k);c.Y(0,O.x,O.y)}r&&
  (90===this.sa||270===this.sa?(A=L,G=(u+N)/2):(A=(s+L)/2,G=N),c.Y(2,A,G),O=c.getLinkPoint(g,k,c.computeSpot(!1),!1,!1,f,h),c.Y(3,O.x,O.y))}}}c.Wi()}else if(b.fromVertex.layer===b.toVertex.layer)c.Wi();else{var U=!1,Y=!1,ba,R=c.ft+1;if(c.ic)Y=!0,ba=c.oa,4<ba&&c.points.removeRange(2,ba-3);else if(c.De===Og)U=!0,ba=c.oa,4<ba&&c.points.removeRange(2,ba-3),R=2;else{ba=c.oa;var xa=c.computeSpot(!0)===wb,Ya=c.computeSpot(!1)===wb;2<ba&&xa&&Ya?c.points.removeRange(1,ba-2):3<ba&&xa&&!Ya?c.points.removeRange(1,
  ba-3):3<ba&&!xa&&Ya?c.points.removeRange(2,ba-2):4<ba&&!xa&&!Ya&&c.points.removeRange(2,ba-3)}var za=b.fromVertex,Na=b.toVertex,va,Pa;if(b.rev){for(var Ga;null!==Na&&za!==Na;){Pa=va=null;for(var Jf=Na.rc.k;Jf.next()&&(ic=Jf.value,ic.link!==b.link||(va=ic.fromVertex,Pa=ic.toVertex,null!==va.rd)););va!==za&&(kb=c.o(R-1).x,fb=c.o(R-1).y,Ia=va.Da,Ja=va.Pa,Y?180===this.sa||0===this.sa?2===R?(c.C(R++,kb,fb),c.C(R++,kb,Ja)):(md=null!==Pa?Pa.Pa:fb,md!==Ja&&(Xa=this.Nb[va.layer-1],c.C(R++,Xa,fb),c.C(R++,Xa,
  Ja))):2===R?(c.C(R++,kb,fb),c.C(R++,Ia,fb)):(mf=null!==Pa?Pa.Da:kb,mf!==Ia&&(Xa=this.Nb[va.layer-1],c.C(R++,kb,Xa),c.C(R++,Ia,Xa))):2===R?U?(db=Math.max(10,this.Wg[Na.layer]),Ab=Math.max(10,this.ig[Na.layer]),180===this.sa?(Ga=Na.T.x,c.C(R++,Ga-db,Ja),c.C(R++,Ga,Ja),c.C(R++,Ga+Ab,Ja)):90===this.sa?(Ga=Na.T.y+Na.T.height,c.C(R++,Ia,Ga+Ab),c.C(R++,Ia,Ga),c.C(R++,Ia,Ga-db)):270===this.sa?(Ga=Na.T.y,c.C(R++,Ia,Ga-db),c.C(R++,Ia,Ga),c.C(R++,Ia,Ga+Ab)):(Ga=Na.T.x+Na.T.width,c.C(R++,Ga+Ab,Ja),c.C(R++,Ga,
  Ja),c.C(R++,Ga-db,Ja))):(c.C(R++,kb,fb),180===this.sa||0===this.sa?c.C(R++,kb,Ja):c.C(R++,Ia,fb),c.C(R++,Ia,Ja)):(db=Math.max(10,this.Wg[va.layer]),Ab=Math.max(10,this.ig[va.layer]),180===this.sa?(U&&c.C(R++,Ia-db,Ja),c.C(R++,Ia,Ja),U&&c.C(R++,Ia+Ab,Ja)):90===this.sa?(U&&c.C(R++,Ia,Ja+Ab),c.C(R++,Ia,Ja),U&&c.C(R++,Ia,Ja-db)):270===this.sa?(U&&c.C(R++,Ia,Ja-db),c.C(R++,Ia,Ja),U&&c.C(R++,Ia,Ja+Ab)):(U&&c.C(R++,Ia+Ab,Ja),c.C(R++,Ia,Ja),U&&c.C(R++,Ia-db,Ja))));Na=va}if(null===k||c.computeSpot(!1)!==wb)if(kb=
  c.o(R-1).x,fb=c.o(R-1).y,Ia=c.o(R).x,Ja=c.o(R).y,Y){var lf=this.ig[za.layer],Zb;180===this.sa||0===this.sa?(Zb=fb,Zb>=za.T.y&&Zb<=za.T.bottom&&(Ga=za.Da+lf,Zb=Zb<za.T.y+za.T.height/2?za.T.y-this.xd/2:za.T.bottom+this.xd/2,c.C(R++,Ga,fb),c.C(R++,Ga,Zb)),c.C(R++,Ia,Zb)):(Zb=kb,Zb>=za.T.x&&Zb<=za.T.right&&(Ga=za.Pa+lf,Zb=Zb<za.T.x+za.T.width/2?za.T.x-this.xd/2:za.T.right+this.xd/2,c.C(R++,kb,Ga),c.C(R++,Zb,Ga)),c.C(R++,Zb,Ja));c.C(R++,Ia,Ja)}else U?(db=Math.max(10,this.Wg[za.layer]),Ab=Math.max(10,this.ig[za.layer]),
  180===this.sa?(Ga=za.T.x+za.T.width,c.Y(R-2,Ga,fb),c.Y(R-1,Ga+Ab,fb)):90===this.sa?(Ga=za.T.y,c.Y(R-2,kb,Ga),c.Y(R-1,kb,Ga-db)):270===this.sa?(Ga=za.T.y+za.T.height,c.Y(R-2,kb,Ga),c.Y(R-1,kb,Ga+Ab)):(Ga=za.T.x,c.Y(R-2,Ga,fb),c.Y(R-1,Ga-db,fb))):(180===this.sa||0===this.sa?c.C(R++,Ia,fb):c.C(R++,kb,Ja),c.C(R++,Ia,Ja))}else{for(;null!==za&&za!==Na;){Pa=va=null;for(var fg=za.gc.k,ic;fg.next()&&(ic=fg.value,ic.link!==b.link||(va=ic.toVertex,Pa=ic.fromVertex,null!==Pa.rd&&(Pa=null),null!==va.rd)););var kb,
  fb,Ia,Ja,Xa,db,Ab;if(va!==Na)if(kb=c.o(R-1).x,fb=c.o(R-1).y,Ia=va.Da,Ja=va.Pa,Y)if(180===this.sa||0===this.sa){var md=null!==Pa?Pa.Pa:fb;md!==Ja&&(Xa=this.Nb[va.layer],2===R&&(Xa=0===this.sa?Math.max(Xa,kb):Math.min(Xa,kb)),c.C(R++,Xa,fb),c.C(R++,Xa,Ja))}else{var mf=null!==Pa?Pa.Da:kb;mf!==Ia&&(Xa=this.Nb[va.layer],2===R&&(Xa=90===this.sa?Math.max(Xa,fb):Math.min(Xa,fb)),c.C(R++,kb,Xa),c.C(R++,Ia,Xa))}else db=Math.max(10,this.Wg[va.layer]),Ab=Math.max(10,this.ig[va.layer]),180===this.sa?(c.C(R++,
  Ia+Ab,Ja),U&&c.C(R++,Ia,Ja),c.C(R++,Ia-db,Ja)):90===this.sa?(c.C(R++,Ia,Ja-db),U&&c.C(R++,Ia,Ja),c.C(R++,Ia,Ja+Ab)):270===this.sa?(c.C(R++,Ia,Ja+Ab),U&&c.C(R++,Ia,Ja),c.C(R++,Ia,Ja-db)):(c.C(R++,Ia-db,Ja),U&&c.C(R++,Ia,Ja),c.C(R++,Ia+Ab,Ja));za=va}Y&&(kb=c.o(R-1).x,fb=c.o(R-1).y,Ia=c.o(R).x,Ja=c.o(R).y,180===this.sa||0===this.sa?fb!==Ja&&(Xa=0===this.sa?Math.min(Math.max((Ia+kb)/2,this.Nb[Na.layer]),Ia):Math.max(Math.min((Ia+kb)/2,this.Nb[Na.layer]),Ia),c.C(R++,Xa,fb),c.C(R++,Xa,Ja)):kb!==Ia&&(Xa=
  90===this.sa?Math.min(Math.max((Ja+fb)/2,this.Nb[Na.layer]),Ja):Math.max(Math.min((Ja+fb)/2,this.Nb[Na.layer]),Ja),c.C(R++,kb,Xa),c.C(R++,Ia,Xa)))}if(null!==d&&U){if(null!==h){if(c.computeSpot(!0)===wb){var Dd=c.o(0),nd=c.o(2);Dd.M(nd)||c.Y(1,(Dd.x+nd.x)/2,(Dd.y+nd.y)/2)}O=c.getLinkPoint(f,h,wb,!0,!1,g,k);c.Y(0,O.x,O.y)}null!==k&&(c.computeSpot(!1)===wb&&(Dd=c.o(c.oa-1),nd=c.o(c.oa-3),Dd.M(nd)||c.Y(c.oa-2,(Dd.x+nd.x)/2,(Dd.y+nd.y)/2)),O=c.getLinkPoint(g,k,wb,!1,!1,f,h),c.Y(c.oa-1,O.x,O.y))}c.Wi();
  b.commit()}}for(var Ne=new B(V),Ed=this.network.edges.k,se;Ed.next();)se=Ed.value.link,null!==se&&se.ic&&!Ne.contains(se)&&Ne.add(se);if(0<Ne.count)if(90===this.sa||270===this.sa){for(var Kf=0,Bb=new B(Fp),Bg=Ne.k,Hb,qb,Za;Bg.next();)if(Hb=Bg.value,null!==Hb&&Hb.ic)for(var yb=2;yb<Hb.oa-3;yb++)if(qb=Hb.o(yb),Za=Hb.o(yb+1),this.I(qb.y,Za.y)&&!this.I(qb.x,Za.x)){var jc=new Fp;jc.layer=Math.floor(qb.y/2);var Lf=Hb.o(0),Mf=Hb.o(Hb.oa-1);jc.$a=Lf.x*Lf.x+Lf.y;jc.ae=Mf.x*Mf.x+Mf.y;jc.Be=Math.min(qb.x,Za.x);
  jc.Ud=Math.max(qb.x,Za.x);jc.index=yb;jc.link=Hb;if(yb+2<Hb.oa){var kc=Hb.o(yb-1),Uc=Hb.o(yb+2),od=0;kc.y<qb.y?od=Uc.y<qb.y?3:qb.x<Za.x?2:1:kc.y>qb.y&&(od=Uc.y>qb.y?0:Za.x<qb.x?2:1);jc.ii=od}Bb.add(jc)}if(1<Bb.count){Bb.sort(this.gG);for(var dc=0;dc<Bb.count;){for(var pd=Bb.n[dc].layer,$a=dc+1;$a<Bb.count&&Bb.n[$a].layer===pd;)$a++;if(1<$a-dc)for(var Ta=dc;Ta<$a;){for(var Rb=Bb.n[Ta].Ud,Ib=dc+1;Ib<$a&&Bb.n[Ib].Be<Rb;)Rb=Math.max(Rb,Bb.n[Ib].Ud),Ib++;var Oe=Ib-Ta;if(1<Oe){Bb.Up(this.qx,Ta,Ta+Oe);for(var Pd=
  1,pc=Bb.n[Ta].ae,Jb,yb=Ta;yb<Ib;yb++)Jb=Bb.n[yb],Jb.ae!==pc&&(Pd++,pc=Jb.ae);Bb.Up(this.fG,Ta,Ta+Oe);for(var ee=1,pc=Bb.n[Ta].$a,yb=Ta;yb<Ib;yb++)Jb=Bb.n[yb],Jb.$a!==pc&&(ee++,pc=Jb.$a);var rb,Fd;Pd<ee?(rb=!1,Fd=Pd,pc=Bb.n[Ta].ae,Bb.Up(this.qx,Ta,Ta+Oe)):(rb=!0,Fd=ee,pc=Bb.n[Ta].$a);for(var Cg=0,yb=Ta;yb<Ib;yb++){Jb=Bb.n[yb];(rb?Jb.$a:Jb.ae)!==pc&&(Cg++,pc=rb?Jb.$a:Jb.ae);Hb=Jb.link;qb=Hb.o(Jb.index);Za=Hb.o(Jb.index+1);var Pe=this.yp*(Cg-(Fd-1)/2);if(!Hb.dj||Gp(qb.x,qb.y+Pe,Za.x,Za.y+Pe))Kf++,Hb.yl(),
  Hb.Y(Jb.index,qb.x,qb.y+Pe),Hb.Y(Jb.index+1,Za.x,Za.y+Pe),Hb.Wi()}}Ta=Ib}dc=$a}}}else{for(var Gd=0,gb=new B(Fp),nf=Ne.k,ib,sb,Vc;nf.next();)if(ib=nf.value,null!==ib&&ib.ic)for(var Nb=2;Nb<ib.oa-3;Nb++)if(sb=ib.o(Nb),Vc=ib.o(Nb+1),this.I(sb.x,Vc.x)&&!this.I(sb.y,Vc.y)){var Qd=new Fp;Qd.layer=Math.floor(sb.x/2);var Rd=ib.o(0),fe=ib.o(ib.oa-1);Qd.$a=Rd.x+Rd.y*Rd.y;Qd.ae=fe.x+fe.y*fe.y;Qd.Be=Math.min(sb.y,Vc.y);Qd.Ud=Math.max(sb.y,Vc.y);Qd.index=Nb;Qd.link=ib;if(Nb+2<ib.oa){var Fc=ib.o(Nb-1),te=ib.o(Nb+
  2),Gc=0;Fc.x<sb.x?Gc=te.x<sb.x?3:sb.y<Vc.y?2:1:Fc.x>sb.x&&(Gc=te.x>sb.x?0:Vc.y<sb.y?2:1);Qd.ii=Gc}gb.add(Qd)}if(1<gb.count){gb.sort(this.gG);for(var Cb=0;Cb<gb.count;){for(var Qe=gb.n[Cb].layer,qd=Cb+1;qd<gb.count&&gb.n[qd].layer===Qe;)qd++;if(1<qd-Cb)for(var lb=Cb;lb<qd;){for(var Hd=gb.n[lb].Ud,Db=Cb+1;Db<qd&&gb.n[Db].Be<Hd;)Hd=Math.max(Hd,gb.n[Db].Ud),Db++;var Sd=Db-lb;if(1<Sd){gb.Up(this.qx,lb,lb+Sd);for(var Id=1,lc=gb.n[lb].ae,Ob,Nb=lb;Nb<Db;Nb++)Ob=gb.n[Nb],Ob.ae!==lc&&(Id++,lc=Ob.ae);gb.Up(this.fG,
  lb,lb+Sd);for(var tb=1,lc=gb.n[lb].$a,Nb=lb;Nb<Db;Nb++)Ob=gb.n[Nb],Ob.$a!==lc&&(tb++,lc=Ob.$a);var of,bb;Id<tb?(of=!1,bb=Id,lc=gb.n[lb].ae,gb.Up(this.qx,lb,lb+Sd)):(of=!0,bb=tb,lc=gb.n[lb].$a);for(var Jd=0,Nb=lb;Nb<Db;Nb++){Ob=gb.n[Nb];(of?Ob.$a:Ob.ae)!==lc&&(Jd++,lc=of?Ob.$a:Ob.ae);ib=Ob.link;sb=ib.o(Ob.index);Vc=ib.o(Ob.index+1);var Wc=this.yp*(Jd-(bb-1)/2);if(!ib.dj||Gp(sb.x+Wc,sb.y,Vc.x+Wc,Vc.y))Gd++,ib.yl(),ib.Y(Ob.index,sb.x+Wc,sb.y),ib.Y(Ob.index+1,Vc.x+Wc,Vc.y),ib.Wi()}}lb=Db}Cb=qd}}}};
  function Fp(){this.index=this.Ud=this.Be=this.ae=this.$a=this.layer=0;this.link=null;this.ii=0}t.Vd(Fp,{layer:!0,$a:!0,ae:!0,Be:!0,Ud:!0,index:!0,link:!0,ii:!0});Z.prototype.gG=function(a,b){return a instanceof Fp&&b instanceof Fp&&a!==b?a.layer<b.layer?-1:a.layer>b.layer?1:a.Be<b.Be?-1:a.Be>b.Be?1:a.Ud<b.Ud?-1:a.Ud>b.Ud?1:0:0};
  Z.prototype.fG=function(a,b){return a instanceof Fp&&b instanceof Fp&&a!==b?a.$a<b.$a?-1:a.$a>b.$a||a.ii<b.ii?1:a.ii>b.ii||a.Be<b.Be?-1:a.Be>b.Be?1:a.Ud<b.Ud?-1:a.Ud>b.Ud?1:0:0};Z.prototype.qx=function(a,b){return a instanceof Fp&&b instanceof Fp&&a!==b?a.ae<b.ae?-1:a.ae>b.ae||a.ii<b.ii?1:a.ii>b.ii||a.Be<b.Be?-1:a.Be>b.Be?1:a.Ud<b.Ud?-1:a.Ud>b.Ud?1:0:0};Z.prototype.I=function(a,b){e&&(t.q(a,Z,"isApprox:a"),t.q(b,Z,"isApprox:b"));var c=a-b;return-1<c&&1>c};
  function Gp(a,b,c,d){e&&(t.q(a,Z,"isUnoccupied2:px"),t.q(b,Z,"isUnoccupied2:py"),t.q(c,Z,"isUnoccupied2:qx"),t.q(d,Z,"isUnoccupied2:qy"));return!0}function Xo(a,b){var c,d=a.Od[b];if(d>=a.Zg.length){c=[];var f;for(f=0;f<a.Zg.length;f++)c[f]=a.Zg[f];a.Zg=c}"undefined"===typeof a.Zg[d]||null===a.Zg[d]?c=[]:(c=a.Zg[d],a.Zg[d]=null);var d=a.Gr[b],g;for(f=0;f<d.length;f++)g=d[f],g instanceof Hp&&(c[g.index]=g);return c}function Yo(a,b,c){a.Zg[a.Od[b]]=c}t.g(Z,"layerSpacing",Z.prototype.layerSpacing);
  t.defineProperty(Z,{layerSpacing:"layerSpacing"},function(){return this.bm},function(a){this.bm!==a&&(t.i(a,"number",Z,"layerSpacing"),0<=a&&(this.bm=a,this.J()))});t.g(Z,"columnSpacing",Z.prototype.fI);t.defineProperty(Z,{fI:"columnSpacing"},function(){return this.xd},function(a){this.xd!==a&&(t.i(a,"number",Z,"columnSpacing"),0<=a&&(this.xd=a,this.J()))});t.g(Z,"direction",Z.prototype.direction);
  t.defineProperty(Z,{direction:"direction"},function(){return this.sa},function(a){this.sa!==a&&(t.i(a,"number",Z,"direction"),this.sa=a,this.J())});t.g(Z,"cycleRemoveOption",Z.prototype.jE);t.defineProperty(Z,{jE:"cycleRemoveOption"},function(){return this.Dn},function(a){this.Dn!==a&&(t.Aa(a,Z,Z,"cycleRemoveOption"),a===Fo||a===zo)&&(this.Dn=a,this.J())});t.g(Z,"layeringOption",Z.prototype.mF);
  t.defineProperty(Z,{mF:"layeringOption"},function(){return this.mo},function(a){this.mo!==a&&(t.Aa(a,Z,Z,"layeringOption"),a===Ao||a===hp||a===jp)&&(this.mo=a,this.J())});t.g(Z,"initializeOption",Z.prototype.$E);t.defineProperty(Z,{$E:"initializeOption"},function(){return this.Yn},function(a){this.Yn!==a&&(t.Aa(a,Z,Z,"initializeOption"),a===Bo||a===pp||a===np)&&(this.Yn=a,this.J())});t.g(Z,"iterations",Z.prototype.fJ);
  t.defineProperty(Z,{fJ:"iterations"},function(){return this.Zl},function(a){this.Zl!==a&&(t.q(a,Eo,"iterations"),0<=a&&(this.Zl=a,this.J()))});t.g(Z,"aggressiveOption",Z.prototype.LD);t.defineProperty(Z,{LD:"aggressiveOption"},function(){return this.vn},function(a){this.vn!==a&&(t.Aa(a,Z,Z,"aggressiveOption"),a===tp||a===Co||a===up)&&(this.vn=a,this.J())});t.g(Z,"packOption",Z.prototype.CJ);
  t.defineProperty(Z,{CJ:"packOption"},function(){return this.Hi},function(a){this.Hi!==a&&(t.i(a,"number",Z,"packOption"),0<=a&&8>a&&(this.Hi=a,this.J()))});t.g(Z,"setsPortSpots",Z.prototype.xl);t.defineProperty(Z,{xl:"setsPortSpots"},function(){return this.Mh},function(a){this.Mh!==a&&(t.i(a,"boolean",Z,"setsPortSpots"),this.Mh=a,this.J())});t.g(Z,"linkSpacing",Z.prototype.yp);
  t.defineProperty(Z,{yp:"linkSpacing"},function(){return this.zj},function(a){this.zj!==a&&(t.i(a,"number",Z,"linkSpacing"),0<=a&&(this.zj=a,this.J()))});t.A(Z,{nJ:"maxLayer"},function(){return this.lb});t.A(Z,{GK:"maxIndex"},function(){return this.bv});t.A(Z,{FK:"maxColumn"},function(){return this.Ib});t.A(Z,{IK:"minIndexLayer"},function(){return this.zr});t.A(Z,{HK:"maxIndexLayer"},function(){return this.Kf});var zo;Z.CycleDepthFirst=zo=t.w(Z,"CycleDepthFirst",0);var Fo;
  Z.CycleGreedy=Fo=t.w(Z,"CycleGreedy",1);var Ao;Z.LayerOptimalLinkLength=Ao=t.w(Z,"LayerOptimalLinkLength",0);var hp;Z.LayerLongestPathSink=hp=t.w(Z,"LayerLongestPathSink",1);var jp;Z.LayerLongestPathSource=jp=t.w(Z,"LayerLongestPathSource",2);var Bo;Z.InitDepthFirstOut=Bo=t.w(Z,"InitDepthFirstOut",0);var pp;Z.InitDepthFirstIn=pp=t.w(Z,"InitDepthFirstIn",1);var np;Z.InitNaive=np=t.w(Z,"InitNaive",2);var tp;Z.AggressiveNone=tp=t.w(Z,"AggressiveNone",0);var Co;
  Z.AggressiveLess=Co=t.w(Z,"AggressiveLess",1);var up;Z.AggressiveMore=up=t.w(Z,"AggressiveMore",2);Z.PackNone=0;var vp;Z.PackExpand=vp=1;var wp;Z.PackStraighten=wp=2;var yp;Z.PackMedian=yp=4;var Do;Z.PackAll=Do=7;function Eo(){ra.call(this)}t.ga("LayeredDigraphNetwork",Eo);t.Ka(Eo,ra);Eo.prototype.createVertex=function(){return new Hp};Eo.prototype.createEdge=function(){return new Ip};
  function Hp(){sa.call(this);this.index=this.column=this.layer=-1;this.component=NaN;this.near=null;this.valid=!1;this.finish=this.$o=NaN;this.Cm=0;this.IA=this.JA=void 0}t.ga("LayeredDigraphVertex",Hp);t.Ka(Hp,sa);function Ip(){ua.call(this);this.forest=this.rev=this.valid=!1;this.portToPos=this.portFromPos=NaN;this.portToColOffset=this.portFromColOffset=0}t.ga("LayeredDigraphEdge",Ip);t.Ka(Ip,ua);
  function X(){0<arguments.length&&t.ad(X);be.call(this);this.Yc=new C(Object);this.Ji=Jp;this.If=Kp;this.Cs=Lp;this.Yu=Mp;this.GB=null;this.th=!0;this.cd=Np;this.bg=(new ga(10,10)).freeze();this.ua=new Op;this.ta=new Op}t.ga("TreeLayout",X);t.Ka(X,be);X.prototype.cloneProtected=function(a){be.prototype.cloneProtected.call(this,a);a.Ji=this.Ji;a.Cs=this.Cs;a.Yu=this.Yu;a.th=this.th;a.cd=this.cd;a.bg.assign(this.bg);a.ua.copyInheritedPropertiesFrom(this.ua);a.ta.copyInheritedPropertiesFrom(this.ta)};
  X.prototype.createNetwork=function(){var a=new Pp;Ln(a,this);return a};X.prototype.makeNetwork=function(a){var b=this.createNetwork();a instanceof z?(Qp(this,b,a.kh,!0),Qp(this,b,a.links,!0)):a instanceof T?Qp(this,b,a.Rc,!1):Qp(this,b,a.k,!1);return b};
  function Qp(a,b,c,d){for(c=c.k;c.next();){var f=c.value;f instanceof S&&f.canLayout()&&"Comment"!==f.Zc&&(!d||f.sp)&&(f.ci||(f instanceof T&&null===f.jc?Qp(a,b,f.Rc,!1):b.Ko(f)))}for(c.reset();c.next();)if(f=c.value,f instanceof V&&f.canLayout()&&"Comment"!==f.Zc&&(!d||f.sp)){var g=f.aa;a=f.ca;null!==g&&null!==a&&g!==a&&"Comment"!==g.Zc&&"Comment"!==a.Zc&&(g=b.findGroupVertex(g),a=b.findGroupVertex(a),null!==g&&null!==a&&b.$m(g,a,f))}}
  X.prototype.doLayout=function(a){a||t.m("Layout.doLayout(collection) argument must not be null but a Diagram, a Group, or an Iterable of Parts");null===this.network&&(this.network=this.makeNetwork(a));this.Qe!==Rp&&(this.Dd=this.initialOrigin(this.Dd));var b=this.h;null===b&&a instanceof z&&(b=a);this.If=this.path===Jp&&null!==b?b.pd?Kp:Sp:this.path===Jp?Kp:this.path;if(0<this.network.vertexes.count){this.network.xw();for(b=this.network.vertexes.k;b.next();)a=b.value,a.initialized=!1,a.level=0,a.parent=
  null,a.children=[];if(0<this.Yc.count)for(b=this.Yc.k,this.Yc=new C(Op);b.next();)a=b.value,a instanceof S?(a=this.network.Qm(a),null!==a&&this.Yc.add(a)):a instanceof Op&&this.Yc.add(a);0===this.Yc.count&&this.findRoots();for(b=this.Yc.copy().k;b.next();)a=b.value,a.initialized||(a.initialized=!0,Tp(this,a));for(a=this.Yc.k;a.next();)Up(this,a.value);for(a=this.Yc.k;a.next();)Vp(this,a.value);for(a=this.Yc.k;a.next();)Wp(this,a.value);this.Nz();if(this.Xw===Xp){var c=[];for(a=this.network.vertexes.k;a.next();){var b=
  a.value,d=b.parent;d||(d=b);var d=0===d.angle||180===d.angle,f=c[b.level];void 0===f&&(f=0);c[b.level]=Math.max(f,d?b.width:b.height)}for(f=0;f<c.length;f++)void 0===c[f]&&(c[f]=0);this.GB=c;for(a=this.network.vertexes.k;a.next();)b=a.value,(d=b.parent)||(d=b),0===d.angle||180===d.angle?(180===d.angle&&(b.fp+=c[b.level]-b.width),b.width=c[b.level]):(270===d.angle&&(b.gp+=c[b.level]-b.height),b.height=c[b.level])}else if(this.Xw===Yp)for(a=this.network.vertexes.k;a.next();){b=a.value;d=0===b.angle||
  180===b.angle;c=-1;for(f=0;f<b.children.length;f++)var g=b.children[f],c=Math.max(c,d?g.width:g.height);if(0<=c)for(f=0;f<b.children.length;f++)g=b.children[f],d?(180===b.angle&&(g.fp+=c-g.width),g.width=c):(270===b.angle&&(g.gp+=c-g.height),g.height=c)}for(a=this.Yc.k;a.next();)this.layoutTree(a.value);this.arrangeTrees();this.updateParts()}this.network=null;this.Yc=new C(Object);this.$e=!0};
  X.prototype.findRoots=function(){for(var a=this.network.vertexes.k;a.next();){var b=a.value;switch(this.If){case Kp:0===b.rc.count&&this.Yc.add(b);break;case Sp:0===b.gc.count&&this.Yc.add(b);break;default:t.m("Unhandled path value "+this.If.toString())}}if(0===this.Yc.count){for(var a=999999,b=null,c=this.network.vertexes.k;c.next();){var d=c.value;switch(this.If){case Kp:d.rc.count<a&&(a=d.rc.count,b=d);break;case Sp:d.gc.count<a&&(a=d.gc.count,b=d);break;default:t.m("Unhandled path value "+this.If.toString())}}null!==
  b&&this.Yc.add(b)}};
  function Tp(a,b){if(null!==b){e&&t.l(b,Op,X,"walkTree:v");switch(a.If){case Kp:if(0<b.gc.count){for(var c=new B(Op),d=b.yI;d.next();){var f=d.value;Zp(a,b,f)&&c.add(f)}0<c.count&&(b.children=c.Ie())}break;case Sp:if(0<b.rc.count){c=new B(Op);for(d=b.TJ;d.next();)f=d.value,Zp(a,b,f)&&c.add(f);0<c.count&&(b.children=c.Ie())}break;default:t.m("Unhandled path value"+a.If.toString())}for(var c=b.children,d=c.length,g=0;g<d;g++)f=c[g],f.initialized=!0,f.level=b.level+1,f.parent=b,a.Yc.remove(f);for(g=0;g<
  d;g++)f=c[g],Tp(a,f)}}function Zp(a,b,c){e&&t.l(b,Op,X,"walkOK:v");e&&t.l(c,Op,X,"walkOK:c");if(c.initialized){var d;if(null===b)d=!1;else{e&&t.l(c,Op,X,"isAncestor:a");e&&t.l(b,Op,X,"isAncestor:b");for(d=b.parent;null!==d&&d!==c;)d=d.parent;d=d===c}if(d||c.level>b.level)return!1;a.removeChild(c.parent,c)}return!0}
  X.prototype.removeChild=function(a,b){if(null!==a&&null!==b){e&&t.l(a,Op,X,"removeChild:p");e&&t.l(b,Op,X,"removeChild:c");for(var c=a.children,d=0,f=0;f<c.length;f++)c[f]===b&&d++;if(0<d){for(var d=Array(c.length-d),g=0,f=0;f<c.length;f++)c[f]!==b&&(d[g++]=c[f]);a.children=d}}};
  function Up(a,b){if(null!==b){e&&t.l(b,Op,X,"initializeTree:v");a.initializeTreeVertexValues(b);b.alignment===$p&&a.sortTreeVertexChildren(b);for(var c=0,d=b.Gm,f=0,g=b.children,h=g.length,k=0;k<h;k++){var l=g[k];Up(a,l);c+=l.descendantCount+1;d=Math.max(d,l.maxChildrenCount);f=Math.max(f,l.maxGenerationCount)}b.descendantCount=c;b.maxChildrenCount=d;b.maxGenerationCount=0<d?f+1:0}}
  function aq(a,b){e&&t.l(b,Op,X,"mom:v");switch(a.Cs){default:case Lp:return null!==b.parent?b.parent:a.ua;case bq:return null===b.parent?a.ua:null===b.parent.parent?a.ta:b.parent;case cq:if(null!==b.parent)return null!==b.parent.parent?b.parent.parent:a.ta;case dq:var c=!0;if(0===b.Gm)c=!1;else for(var d=b.children,f=d.length,g=0;g<f;g++)if(0<d[g].Gm){c=!1;break}return c&&null!==b.parent?a.ta:null!==b.parent?b.parent:a.ua}}
  X.prototype.initializeTreeVertexValues=function(a){e&&t.l(a,Op,X,"initializeTreeVertexValues:v");var b=aq(this,a);a.copyInheritedPropertiesFrom(b);if(null!==a.parent&&a.parent.alignment===$p){for(var b=a.angle,c=a.parent.children,d=0;d<c.length&&a!==c[d];)d++;0===d%2?d!==c.length-1&&(b=90===b?180:180===b?270:270===b?180:270):b=90===b?0:180===b?90:270===b?0:90;a.angle=b}a.initialized=!0};
  function Vp(a,b){if(null!==b){e&&t.l(b,Op,X,"assignTree:v");a.assignTreeVertexValues(b);for(var c=b.children,d=c.length,f=0;f<d;f++)Vp(a,c[f])}}X.prototype.assignTreeVertexValues=function(){};function Wp(a,b){if(null!==b){e&&t.l(b,Op,X,"sortTree:v");b.alignment!==$p&&a.sortTreeVertexChildren(b);for(var c=b.children,d=c.length,f=0;f<d;f++)Wp(a,c[f])}}
  X.prototype.sortTreeVertexChildren=function(a){e&&t.l(a,Op,X,"sortTreeVertexChildren:v");switch(a.sorting){case eq:break;case fq:a.children.reverse();break;case gq:a.children.sort(a.comparer);break;case hq:a.children.sort(a.comparer);a.children.reverse();break;default:t.m("Unhandled sorting value "+a.sorting.toString())}};X.prototype.Nz=function(){if(this.comments)for(var a=this.network.vertexes.k;a.next();)this.addComments(a.value)};
  X.prototype.addComments=function(a){e&&t.l(a,Op,X,"addComments:v");var b=a.angle,c=a.parent,d=0,f=iq,f=!1;null!==c&&(d=c.angle,f=c.alignment,f=jq(f));var b=90===b||270===b,d=90===d||270===d,c=0===a.Gm,g=0,h=0,k=0,l=a.commentSpacing;if(null!==a.Gc)for(var m=a.Gc.BE();m.next();){var n=m.value;"Comment"===n.Zc&&n.Qa()&&(null===a.comments&&(a.comments=[]),a.comments.push(n),n.sf(),n=n.Ea,b&&!c||!f&&!d&&c||f&&d&&c?(g=Math.max(g,n.width),h+=n.height+Math.abs(k)):(g+=n.width+Math.abs(k),h=Math.max(h,n.height)),
  k=l)}null!==a.comments&&(b&&!c||!f&&!d&&c||f&&d&&c?(g+=Math.abs(a.commentMargin),h=Math.max(0,h-a.height)):(h+=Math.abs(a.commentMargin),g=Math.max(0,g-a.width)),f=t.hk(0,0,a.T.width+g,a.T.height+h),a.Ob=f,t.hc(f))};function jq(a){return a===kq||a===$p||a===lq||a===mq}function nq(a){return a===kq||a===$p}
  function oq(a){e&&t.l(a,Op,X,"isLeftSideBus:v");var b=a.parent;if(null!==b){var c=b.alignment;if(jq(c)){if(nq(c)){b=b.children;for(c=0;c<b.length&&a!==b[c];)c++;return 0===c%2}if(c===lq)return!0}}return!1}
  X.prototype.layoutComments=function(a){e&&t.l(a,Op,X,"layoutComments:v");if(null!==a.comments){var b=a.Gc.Ea,c=a.parent,d=a.angle,f=0,g=iq,g=!1;null!==c&&(f=c.angle,g=c.alignment,g=jq(g));for(var d=90===d||270===d,h=90===f||270===f,k=0===a.Gm,l=oq(a),m=0,n=a.comments,p=n.length,q=t.K(),r=0;r<p;r++){var c=n[r],s=c.Ea;if(d&&!k||!g&&!h&&k||g&&h&&k){if(135<f&&!g||h&&l)if(0<=a.commentMargin){q.p(a.T.x-a.commentMargin-s.width,a.T.y+m);c.move(q);for(var u=c.wg();u.next();)c=u.value,c.pb=Ub,c.tb=Vb}else for(q.p(a.T.x+
  2*a.O.x-a.commentMargin,a.T.y+m),c.move(q),u=c.wg();u.next();)c=u.value,c.pb=Vb,c.tb=Ub;else if(0<=a.commentMargin)for(q.p(a.T.x+2*a.O.x+a.commentMargin,a.T.y+m),c.move(q),u=c.wg();u.next();)c=u.value,c.pb=Vb,c.tb=Ub;else for(q.p(a.T.x+a.commentMargin-s.width,a.T.y+m),c.move(q),u=c.wg();u.next();)c=u.value,c.pb=Ub,c.tb=Vb;m=0<=a.commentSpacing?m+(s.height+a.commentSpacing):m+(a.commentSpacing-s.height)}else{if(135<f&&!g||!h&&l)if(0<=a.commentMargin)for(q.p(a.T.x+m,a.T.y-a.commentMargin-s.height),
  c.move(q),u=c.wg();u.next();)c=u.value,c.pb=Qb,c.tb=Wb;else for(q.p(a.T.x+m,a.T.y+2*a.O.y-a.commentMargin),c.move(q),u=c.wg();u.next();)c=u.value,c.pb=Wb,c.tb=Qb;else if(0<=a.commentMargin)for(q.p(a.T.x+m,a.T.y+2*a.O.y+a.commentMargin),c.move(q),u=c.wg();u.next();)c=u.value,c.pb=Wb,c.tb=Qb;else for(q.p(a.T.x+m,a.T.y+a.commentMargin-s.height),c.move(q),u=c.wg();u.next();)c=u.value,c.pb=Qb,c.tb=Wb;m=0<=a.commentSpacing?m+(s.width+a.commentSpacing):m+(a.commentSpacing-s.width)}}t.B(q);b=m-a.commentSpacing-
  (d?b.height:b.width);if(this.If===Kp)for(a=a.gc;a.next();)f=a.value,(c=f.link)&&!c.dj&&(c.ck=0<b?b:NaN);else for(a=a.rc;a.next();)f=a.value,(c=f.link)&&!c.dj&&(c.ik=0<b?b:NaN)}};
  X.prototype.layoutTree=function(a){if(null!==a){e&&t.l(a,Op,X,"layoutTree:v");for(var b=a.children,c=b.length,d=0;d<c;d++)this.layoutTree(b[d]);switch(a.compaction){case pq:qq(this,a);break;case rq:if(a.alignment===$p)qq(this,a);else if(e&&t.l(a,Op,X,"layoutTreeBlock:v"),0===a.Gm){var d=a.parent,b=!1,c=0,f=iq;null!==d&&(c=d.angle,f=d.alignment,b=jq(f));d=oq(a);a.na.p(0,0);a.Za.p(a.width,a.height);null===a.parent||null===a.comments||(180!==c&&270!==c||b)&&!d?a.Ia.p(0,0):180===c&&!b||(90===c||270===
  c)&&d?a.Ia.p(a.width-2*a.O.x,0):a.Ia.p(0,a.height-2*a.O.y);a.st=null;a.Jt=null}else{for(var g=sq(a),b=90===g||270===g,h=0,k=a.children,l=k.length,m=0;m<l;m++)var n=k[m],h=Math.max(h,b?n.Za.width:n.Za.height);var p=a.alignment,d=p===tq,q=p===uq,r=jq(p),s=Math.max(0,a.breadthLimit),c=vq(a),u=a.nodeSpacing,v=wq(a),D=a.rowSpacing,A=0;if(d||q||a.Op||a.Pp&&1===a.maxGenerationCount)A=Math.max(0,a.rowIndent);var d=a.width,f=a.height,G=0,L=0,N=0,O=null,U=null,Y=0,ba=0,R=0,xa=0,Ya=0,za=0,Na=0,va=0,n=0;r&&!nq(p)&&
  135<g&&k.reverse();if(nq(p))if(1<l)for(m=0;m<l;m++)0===m%2&&m!==l-1?va=Math.max(va,b?k[m].Za.width:k[m].Za.height):0!==m%2&&(n=Math.max(n,b?k[m].Za.width:k[m].Za.height));else 1===l&&(va=b?k[0].Za.width:k[0].Za.height);if(r){switch(p){case kq:ba=135>g?xq(a,k,va,G,L):yq(a,k,va,G,L);va=ba[0];G=ba[1];L=ba[2];break;case lq:for(m=0;m<l;m++){var n=k[m],Pa=n.Za,O=0===za?0:D;b?(n.na.p(h-Pa.width,xa+O),G=Math.max(G,Pa.width),L=Math.max(L,xa+O+Pa.height),xa+=O+Pa.height):(n.na.p(R+O,h-Pa.height),G=Math.max(G,
  R+O+Pa.width),L=Math.max(L,Pa.height),R+=O+Pa.width);za++}break;case mq:for(m=0;m<l;m++)n=k[m],Pa=n.Za,O=0===za?0:D,b?(n.na.p(u/2+a.O.x,xa+O),G=Math.max(G,Pa.width),L=Math.max(L,xa+O+Pa.height),xa+=O+Pa.height):(n.na.p(R+O,u/2+a.O.y),G=Math.max(G,R+O+Pa.width),L=Math.max(L,Pa.height),R+=O+Pa.width),za++}O=zq(this,2);U=zq(this,2);b?(O[0].p(0,0),O[1].p(0,L),U[0].p(G,0)):(O[0].p(0,0),O[1].p(G,0),U[0].p(0,L));U[1].p(G,L)}else for(m=0;m<l;m++){n=k[m];Pa=n.Za;if(b){0<s&&0<za&&R+u+Pa.width>s&&(R<h&&Aq(a,
  p,h-R,0,Na,m-1),Ya++,za=0,Na=m,N=L,R=0,xa=135<g?-L-D:L+D);Bq(this,n,0,xa);var Ga=0;if(0===za){if(O=n.st,U=n.Jt,Y=Pa.width,ba=Pa.height,null===O||null===U||g!==sq(n))O=zq(this,2),U=zq(this,2),O[0].p(0,0),O[1].p(0,ba),U[0].p(Y,0),U[1].p(Y,ba)}else ba=Cq(this,a,n,O,U,Y,ba),Ga=ba[0],O=ba[1],U=ba[2],Y=ba[3],ba=ba[4],R<Pa.width&&0>Ga&&(Dq(a,-Ga,0,Na,m-1),Eq(O,-Ga,0),Eq(U,-Ga,0),Ga=0);n.na.p(Ga,xa);G=Math.max(G,Y);L=Math.max(L,N+(0===Ya?0:D)+Pa.height);R=Y}else{0<s&&0<za&&xa+u+Pa.height>s&&(xa<h&&Aq(a,p,
  0,h-xa,Na,m-1),Ya++,za=0,Na=m,N=G,xa=0,R=135<g?-G-D:G+D);Bq(this,n,R,0);Ga=0;if(0===za){if(O=n.st,U=n.Jt,Y=Pa.width,ba=Pa.height,null===O||null===U||g!==sq(n))O=zq(this,2),U=zq(this,2),O[0].p(0,0),O[1].p(Y,0),U[0].p(0,ba),U[1].p(Y,ba)}else ba=Cq(this,a,n,O,U,Y,ba),Ga=ba[0],O=ba[1],U=ba[2],Y=ba[3],ba=ba[4],xa<Pa.height&&0>Ga&&(Dq(a,0,-Ga,Na,m-1),Eq(O,0,-Ga),Eq(U,0,-Ga),Ga=0);n.na.p(R,Ga);L=Math.max(L,ba);G=Math.max(G,N+(0===Ya?0:D)+Pa.width);xa=ba}za++}0<Ya&&(b?(L+=Math.max(0,c),R<G&&Aq(a,p,G-R,0,
  Na,l-1),0<A&&(q||Dq(a,A,0,0,l-1),G+=A)):(G+=Math.max(0,c),xa<L&&Aq(a,p,0,L-xa,Na,l-1),0<A&&(q||Dq(a,0,A,0,l-1),L+=A)));q=h=0;switch(p){case Fq:b?h+=G/2-a.O.x-v/2:q+=L/2-a.O.y-v/2;break;case iq:0<Ya?b?h+=G/2-a.O.x-v/2:q+=L/2-a.O.y-v/2:b?(m=k[0].na.x+k[0].Ia.x,va=k[l-1].na.x+k[l-1].Ia.x+2*k[l-1].O.x,h+=m+(va-m)/2-a.O.x-v/2):(m=k[0].na.y+k[0].Ia.y,va=k[l-1].na.y+k[l-1].Ia.y+2*k[l-1].O.y,q+=m+(va-m)/2-a.O.y-v/2);break;case tq:b?(h-=v,G+=v):(q-=v,L+=v);break;case uq:b?(h+=G-a.width+v,G+=v):(q+=L-a.height+
  v,L+=v);break;case kq:b?h=1<l?h+(va+u/2-a.O.x):h+(k[0].O.x-a.O.x+k[0].Ia.x):q=1<l?q+(va+u/2-a.O.y):q+(k[0].O.y-a.O.y+k[0].Ia.y);break;case lq:b?h+=G+u/2-a.O.x:q+=L+u/2-a.O.y;break;case mq:break;default:t.m("Unhandled alignment value "+p.toString())}for(m=0;m<l;m++)n=k[m],b?n.na.p(n.na.x+n.Ia.x-h,n.na.y+(135<g?(r?-L:-n.Za.height)+n.Ia.y-c:f+c+n.Ia.y)):n.na.p(n.na.x+(135<g?(r?-G:-n.Za.width)+n.Ia.x-c:d+c+n.Ia.x),n.na.y+n.Ia.y-q);l=k=0;r?b?(G=Gq(a,G,h),0>h&&(h=0),135<g&&(q+=L+c),L+=f+c,p===mq&&(k+=u/
  2+a.O.x),l+=f+c):(135<g&&(h+=G+c),G+=d+c,L=Hq(a,L,q),0>q&&(q=0),p===mq&&(l+=u/2+a.O.y),k+=d+c):b?(null===a.comments?d>G&&(p=Iq(p,d-G,0),k=p[0],l=p[1],G=d,h=0):G=Gq(a,G,h),0>h&&(k-=h,h=0),135<g&&(q+=L+c),L=Math.max(Math.max(L,f),L+f+c),l+=f+c):(135<g&&(h+=G+c),G=Math.max(Math.max(G,d),G+d+c),null===a.comments?f>L&&(p=Iq(p,0,f-L),k=p[0],l=p[1],L=f,q=0):L=Hq(a,L,q),0>q&&(l-=q,q=0),k+=d+c);if(0<Ya)g=zq(this,4),p=zq(this,4),b?(g[2].p(0,f+c),g[3].p(g[2].x,L),p[2].p(G,g[2].y),p[3].p(p[2].x,g[3].y)):(g[2].p(d+
  c,0),g[3].p(G,g[2].y),p[2].p(g[2].x,L),p[3].p(g[3].x,p[2].y));else{g=zq(this,O.length+2);p=zq(this,U.length+2);for(m=0;m<O.length;m++)r=O[m],g[m+2].p(r.x+k,r.y+l);for(m=0;m<U.length;m++)r=U[m],p[m+2].p(r.x+k,r.y+l)}b?(g[0].p(h,0),g[1].p(g[0].x,f),g[2].y<g[1].y&&(g[2].x>g[0].x?g[2].assign(g[1]):g[1].assign(g[2])),g[3].y<g[2].y&&(g[3].x>g[0].x?g[3].assign(g[2]):g[2].assign(g[3])),p[0].p(h+d,0),p[1].p(p[0].x,f),p[2].y<p[1].y&&(p[2].x<p[0].x?p[2].assign(p[1]):p[1].assign(p[2])),p[3].y<p[2].y&&(p[3].x<
  p[0].x?p[3].assign(p[2]):p[2].assign(p[3])),g[2].y-=c/2,p[2].y-=c/2):(g[0].p(0,q),g[1].p(d,g[0].y),g[2].x<g[1].x&&(g[2].y>g[0].y?g[2].assign(g[1]):g[1].assign(g[2])),g[3].x<g[2].x&&(g[3].y>g[0].y?g[3].assign(g[2]):g[2].assign(g[3])),p[0].p(0,q+f),p[1].p(d,p[0].y),p[2].x<p[1].x&&(p[2].y<p[0].y?p[2].assign(p[1]):p[1].assign(p[2])),p[3].x<p[2].x&&(p[3].y<p[0].y?p[3].assign(p[2]):p[2].assign(p[3])),g[2].x-=c/2,p[2].x-=c/2);Jq(this,O);Jq(this,U);a.st=g;a.Jt=p;a.Ia.p(h,q);a.Za.p(G,L)}break;default:t.m("Unhandled compaction value "+
  a.compaction.toString())}}};
  function qq(a,b){e&&t.l(b,Op,X,"layoutTreeNone:v");if(0===b.Gm){var c=!1,d=0,f=iq;null!==b.parent&&(d=b.parent.angle,f=b.parent.alignment,c=jq(f));f=oq(b);b.na.p(0,0);b.Za.p(b.width,b.height);null===b.parent||null===b.comments||(180!==d&&270!==d||c)&&!f?b.Ia.p(0,0):180===d&&!c||(90===d||270===d)&&f?b.Ia.p(b.width-2*b.O.x,0):b.Ia.p(0,b.height-2*b.O.y)}else{for(var c=sq(b),d=90===c||270===c,g=0,f=b.children,h=f.length,k=0;k<h;k++)var l=f[k],g=Math.max(g,d?l.Za.width:l.Za.height);var m=b.alignment,n=
  m===tq,p=m===uq,q=jq(m),r=Math.max(0,b.breadthLimit),s=vq(b),u=b.nodeSpacing,v=wq(b),D=n||p?0:v/2,A=b.rowSpacing,G=0;if(n||p||b.Op||b.Pp&&1===b.maxGenerationCount)G=Math.max(0,b.rowIndent);var n=b.width,L=b.height,N=0,O=0,U=0,Y=0,ba=0,R=0,xa=0,Ya=0,za=0,Na=0;q&&!nq(m)&&135<c&&f.reverse();if(nq(m))if(1<h)for(k=0;k<h;k++){var l=f[k],va=l.Za;0===k%2&&k!==h-1?za=Math.max(za,(d?va.width:va.height)+Kq(l)-u):0!==k%2&&(Na=Math.max(Na,(d?va.width:va.height)+Kq(l)-u))}else 1===h&&(za=d?f[0].Za.width:f[0].Za.height);
  if(q)switch(m){case kq:case $p:O=135>c?xq(b,f,za,N,O):yq(b,f,za,N,O);za=O[0];N=O[1];O=O[2];break;case lq:for(k=0;k<h;k++)l=f[k],va=l.Za,r=0===xa?0:A,d?(l.na.p(g-va.width,ba+r),N=Math.max(N,va.width),O=Math.max(O,ba+r+va.height),ba+=r+va.height):(l.na.p(Y+r,g-va.height),N=Math.max(N,Y+r+va.width),O=Math.max(O,va.height),Y+=r+va.width),xa++;break;case mq:for(g=0;g<h;g++)l=f[g],va=l.Za,r=0===xa?0:A,d?(l.na.p(u/2+b.O.x,ba+r),N=Math.max(N,va.width),O=Math.max(O,ba+r+va.height),ba+=r+va.height):(l.na.p(Y+
  r,u/2+b.O.y),N=Math.max(N,Y+r+va.width),O=Math.max(O,va.height),Y+=r+va.width),xa++}else for(k=0;k<h;k++)l=f[k],va=l.Za,d?(0<r&&0<xa&&Y+u+va.width>r&&(Y<g&&Aq(b,m,g-Y,0,Ya,k-1),R++,xa=0,Ya=k,U=O,Y=0,ba=135<c?-O-A:O+A),Na=0===xa?D:u,Bq(a,l,0,ba),l.na.p(Y+Na,ba),N=Math.max(N,Y+Na+va.width),O=Math.max(O,U+(0===R?0:A)+va.height),Y+=Na+va.width):(0<r&&0<xa&&ba+u+va.height>r&&(ba<g&&Aq(b,m,0,g-ba,Ya,k-1),R++,xa=0,Ya=k,U=N,ba=0,Y=135<c?-N-A:N+A),Na=0===xa?D:u,Bq(a,l,Y,0),l.na.p(Y,ba+Na),O=Math.max(O,ba+
  Na+va.height),N=Math.max(N,U+(0===R?0:A)+va.width),ba+=Na+va.height),xa++;0<R&&(d?(O+=Math.max(0,s),Y<N&&Aq(b,m,N-Y,0,Ya,h-1),0<G&&(p||Dq(b,G,0,0,h-1),N+=G)):(N+=Math.max(0,s),ba<O&&Aq(b,m,0,O-ba,Ya,h-1),0<G&&(p||Dq(b,0,G,0,h-1),O+=G)));G=p=0;switch(m){case Fq:d?p+=N/2-b.O.x-v/2:G+=O/2-b.O.y-v/2;break;case iq:0<R?d?p+=N/2-b.O.x-v/2:G+=O/2-b.O.y-v/2:d?(m=f[0].na.x+f[0].Ia.x,u=f[h-1].na.x+f[h-1].Ia.x+2*f[h-1].O.x,p+=m+(u-m)/2-b.O.x-v/2):(m=f[0].na.y+f[0].Ia.y,u=f[h-1].na.y+f[h-1].Ia.y+2*f[h-1].O.y,
  G+=m+(u-m)/2-b.O.y-v/2);break;case tq:d?(p-=v,N+=v):(G-=v,O+=v);break;case uq:d?(p+=N-b.width+v,N+=v):(G+=O-b.height+v,O+=v);break;case kq:case $p:d?p=1<h?p+(za+u/2-b.O.x):p+(f[0].O.x-b.O.x+f[0].Ia.x):G=1<h?G+(za+u/2-b.O.y):G+(f[0].O.y-b.O.y+f[0].Ia.y);break;case lq:d?p+=N+u/2-b.O.x:G+=O+u/2-b.O.y;break;case mq:break;default:t.m("Unhandled alignment value "+m.toString())}for(k=0;k<h;k++)l=f[k],d?l.na.p(l.na.x+l.Ia.x-p,l.na.y+(135<c?(q?-O:-l.Za.height)+l.Ia.y-s:L+s+l.Ia.y)):l.na.p(l.na.x+(135<c?(q?
  -N:-l.Za.width)+l.Ia.x-s:n+s+l.Ia.x),l.na.y+l.Ia.y-G);d?(N=Gq(b,N,p),0>p&&(p=0),135<c&&(G+=O+s),O+=L+s):(135<c&&(p+=N+s),N+=n+s,O=Hq(b,O,G),0>G&&(G=0));b.Ia.p(p,G);b.Za.p(N,O)}}
  function xq(a,b,c,d,f){e&&t.l(a,Op,X,"layoutBusChildrenPosDir:v");var g=b.length;if(0===g)return a=[],a[0]=c,a[1]=d,a[2]=f,a;if(1===g){var h=b[0];d=h.Za.width;f=h.Za.height;a=[];a[0]=c;a[1]=d;a[2]=f;return a}for(var k=a.nodeSpacing,l=a.rowSpacing,m=90===sq(a),n=0,p=0,q=0,r=0;r<g;r++)if(!(0!==r%2||1<g&&r===g-1)){var h=b[r],s=h.Za,u=0===n?0:l;if(m){var v=Kq(h)-k;h.na.p(c-(s.width+v),q+u);d=Math.max(d,s.width+v);f=Math.max(f,q+u+s.height);q+=u+s.height}else v=Kq(h)-k,h.na.p(p+u,c-(s.height+v)),f=Math.max(f,
  s.height+v),d=Math.max(d,p+u+s.width),p+=u+s.width;n++}var n=0,D=p,A=q;m?(p=c+k,q=0):(p=0,q=c+k);for(r=0;r<g;r++)0!==r%2&&(h=b[r],s=h.Za,u=0===n?0:l,m?(v=Kq(h)-k,h.na.p(p+v,q+u),d=Math.max(d,p+s.width+v),f=Math.max(f,q+u+s.height),q+=u+s.height):(v=Kq(h)-k,h.na.p(p+u,q+v),d=Math.max(d,p+u+s.width),f=Math.max(f,q+s.height+v),p+=u+s.width),n++);1<g&&1===g%2&&(h=b[g-1],s=h.Za,b=Lq(h,m?Math.max(Math.abs(A),Math.abs(q)):Math.max(Math.abs(D),Math.abs(p))),m?(h.na.p(c+k/2-h.O.x-h.Ia.x,f+b),m=c+k/2-h.O.x-
  h.Ia.x,d=Math.max(d,m+s.width),0>m&&(d-=m),f=Math.max(f,Math.max(A,q)+b+s.height),0>h.na.x&&(c=Rq(a,h.na.x,!1,c,k))):(h.na.p(d+b,c+k/2-h.O.y-h.Ia.y),d=Math.max(d,Math.max(D,p)+b+s.width),m=c+k/2-h.O.y-h.Ia.y,f=Math.max(f,m+s.height),0>m&&(f-=m),0>h.na.y&&(c=Rq(a,h.na.y,!0,c,k))));a=[];a[0]=c;a[1]=d;a[2]=f;return a}
  function yq(a,b,c,d,f){e&&t.l(a,Op,X,"layoutBusChildrenNegDir:v");var g=b.length;if(0===g)return a=[],a[0]=c,a[1]=d,a[2]=f,a;if(1===g){var h=b[0];d=h.Za.width;f=h.Za.height;a=[];a[0]=c;a[1]=d;a[2]=f;return a}for(var k=a.nodeSpacing,l=a.rowSpacing,m=270===sq(a),n=0,p=0,q=0,r=0;r<g;r++)if(!(0!==r%2||1<g&&r===g-1)){var h=b[r],s=h.Za,u=0===n?0:l;if(m){var v=Kq(h)-k,q=q-(u+s.height);h.na.p(c-(s.width+v),q);d=Math.max(d,s.width+v);f=Math.max(f,Math.abs(q))}else v=Kq(h)-k,p-=u+s.width,h.na.p(p,c-(s.height+
  v)),f=Math.max(f,s.height+v),d=Math.max(d,Math.abs(p));n++}var n=0,D=p,A=q;m?(p=c+k,q=0):(p=0,q=c+k);for(r=0;r<g;r++)0!==r%2&&(h=b[r],s=h.Za,u=0===n?0:l,m?(v=Kq(h)-k,q-=u+s.height,h.na.p(p+v,q),d=Math.max(d,p+s.width+v),f=Math.max(f,Math.abs(q))):(v=Kq(h)-k,p-=u+s.width,h.na.p(p,q+v),f=Math.max(f,q+s.height+v),d=Math.max(d,Math.abs(p))),n++);1<g&&1===g%2&&(h=b[g-1],s=h.Za,l=Lq(h,m?Math.max(Math.abs(A),Math.abs(q)):Math.max(Math.abs(D),Math.abs(p))),m?(h.na.p(c+k/2-h.O.x-h.Ia.x,-f-s.height-l),p=c+
  k/2-h.O.x-h.Ia.x,d=Math.max(d,p+s.width),0>p&&(d-=p),f=Math.max(f,Math.abs(Math.min(A,q))+l+s.height),0>h.na.x&&(c=Rq(a,h.na.x,!1,c,k))):(h.na.p(-d-s.width-l,c+k/2-h.O.y-h.Ia.y),d=Math.max(d,Math.abs(Math.min(D,p))+l+s.width),p=c+k/2-h.O.y-h.Ia.y,f=Math.max(f,p+s.height),0>p&&(f-=p),0>h.na.y&&(c=Rq(a,h.na.y,!0,c,k))));for(r=0;r<g;r++)h=b[r],m?h.na.p(h.na.x,h.na.y+f):h.na.p(h.na.x+d,h.na.y);a=[];a[0]=c;a[1]=d;a[2]=f;return a}
  function Kq(a){e&&t.l(a,Op,X,"fixRelativePostions:child");return null===a.parent?0:a.parent.nodeSpacing}function Lq(a){e&&t.l(a,Op,X,"fixRelativePostions:lastchild");return null===a.parent?0:a.parent.rowSpacing}function Rq(a,b,c,d,f){e&&t.l(a,Op,X,"fixRelativePostions:v");a=a.children;for(var g=a.length,h=0;h<g;h++)c?a[h].na.p(a[h].na.x,a[h].na.y-b):a[h].na.p(a[h].na.x-b,a[h].na.y);b=a[g-1];return Math.max(d,c?b.Ia.y+b.O.y-f/2:b.Ia.x+b.O.x-f/2)}
  function Gq(a,b,c){e&&t.l(a,Op,X,"calculateSubwidth:v");switch(a.alignment){case iq:case Fq:var d=b;c+a.width>d&&(d=c+a.width);0>c&&(d-=c);return d;case tq:return a.width>b?a.width:b;case uq:return 2*a.O.x>b?a.width:b+a.width-2*a.O.x;case kq:case $p:return d=Math.min(0,c),c=Math.max(b,c+a.width),Math.max(a.width,c-d);case lq:return a.width-a.O.x+a.nodeSpacing/2+b;case mq:return Math.max(a.width,a.O.x+a.nodeSpacing/2+b);default:return b}}
  function Hq(a,b,c){e&&t.l(a,Op,X,"calculateSubheight:v");switch(a.alignment){case iq:case Fq:var d=b;c+a.height>d&&(d=c+a.height);0>c&&(d-=c);return d;case tq:return a.height>b?a.height:b;case uq:return 2*a.O.y>b?a.height:b+a.height-2*a.O.y;case kq:case $p:return d=Math.min(0,c),c=Math.max(b,c+a.height),Math.max(a.height,c-d);case lq:return a.height-a.O.y+a.nodeSpacing/2+b;case mq:return Math.max(a.height,a.O.y+a.nodeSpacing/2+b);default:return b}}
  function Iq(a,b,c){e&&t.l(a,da,X,"alignOffset:align");switch(a){case Fq:b/=2;c/=2;break;case iq:b/=2;c/=2;break;case tq:c=b=0;break;case uq:break;default:t.m("Unhandled alignment value "+a.toString())}a=[];a[0]=b;a[1]=c;return a}function Aq(a,b,c,d,f,g){e&&t.l(a,Op,X,"shiftRelPosAlign:v");e&&t.l(b,da,X,"shiftRelPosAlign:align");b=Iq(b,c,d);Dq(a,b[0],b[1],f,g)}function Dq(a,b,c,d,f){e&&t.l(a,Op,X,"shiftRelPos:v");if(0!==b||0!==c)for(a=a.children;d<=f;d++){var g=a[d].na;g.x+=b;g.y+=c}}
  function Bq(a,b,c,d){e&&(t.l(b,Op,X,"recordMidPoints:v"),t.i(c,"number",X,"recordMidPoints:x"),t.i(d,"number",X,"recordMidPoints:y"));var f=b.parent;switch(a.If){case Kp:for(a=b.rc;a.next();)b=a.value,b.fromVertex===f&&b.Sr.p(c,d);break;case Sp:for(a=b.gc;a.next();)b=a.value,b.toVertex===f&&b.Sr.p(c,d);break;default:t.m("Unhandled path value "+a.If.toString())}}function Eq(a,b,c){for(var d=0;d<a.length;d++){var f=a[d];f.x+=b;f.y+=c}}
  function Cq(a,b,c,d,f,g,h){e&&t.l(b,Op,X,"mergeFringes:parent");e&&t.l(c,Op,X,"mergeFringes:child");var k=sq(b),l=90===k||270===k,m=b.nodeSpacing;b=d;var n=f;d=g;f=h;var p=c.st,q=c.Jt;h=c.Za;var r=l?Math.max(f,h.height):Math.max(d,h.width);if(null===p||k!==sq(c))p=zq(a,2),q=zq(a,2),l?(p[0].p(0,0),p[1].p(0,h.height),q[0].p(h.width,0),q[1].p(q[0].x,p[1].y)):(p[0].p(0,0),p[1].p(h.width,0),q[0].p(0,h.height),q[1].p(p[1].x,q[0].y));if(l){c=d;d=9999999;if(!(null===n||2>n.length||null===p||2>p.length))for(g=
  f=0;f<n.length&&g<p.length;){var k=n[f],s=p[g],l=s.x,u=s.y,l=l+c,v=k;f+1<n.length&&(v=n[f+1]);var D=s,s=D.x,D=D.y;g+1<p.length&&(D=p[g+1],s=D.x,D=D.y,s+=c);var A=d;k.y===u?A=l-k.x:k.y>u&&k.y<D?A=l+(k.y-u)/(D-u)*(s-l)-k.x:u>k.y&&u<v.y&&(A=l-(k.x+(u-k.y)/(v.y-k.y)*(v.x-k.x)));A<d&&(d=A);v.y<=k.y?f++:D<=u?g++:(v.y<=D&&f++,D<=v.y&&g++)}c-=d;c+=m;f=p;g=c;if(null===b||2>b.length||null===f||2>f.length)d=null;else{m=zq(a,b.length+f.length);for(d=l=k=0;l<f.length&&f[l].y<b[0].y;)u=f[l++],m[d++].p(u.x+g,u.y);
  for(;k<b.length;)u=b[k++],m[d++].p(u.x,u.y);for(k=b[b.length-1].y;l<f.length&&f[l].y<=k;)l++;for(;l<f.length&&f[l].y>k;)u=f[l++],m[d++].p(u.x+g,u.y);f=zq(a,d);for(k=0;k<d;k++)f[k].assign(m[k]);Jq(a,m);d=f}l=q;u=c;if(null===n||2>n.length||null===l||2>l.length)f=null;else{m=zq(a,n.length+l.length);for(g=v=f=0;f<n.length&&n[f].y<l[0].y;)k=n[f++],m[g++].p(k.x,k.y);for(;v<l.length;)k=l[v++],m[g++].p(k.x+u,k.y);for(l=l[l.length-1].y;f<n.length&&n[f].y<=l;)f++;for(;f<n.length&&n[f].y>l;)k=n[f++],m[g++].p(k.x,
  k.y);k=zq(a,g);for(f=0;f<g;f++)k[f].assign(m[f]);Jq(a,m);f=k}g=Math.max(0,c)+h.width;h=r}else{c=f;d=9999999;if(!(null===n||2>n.length||null===p||2>p.length))for(g=f=0;f<n.length&&g<p.length;)k=n[f],s=p[g],l=s.x,u=s.y,u+=c,v=k,f+1<n.length&&(v=n[f+1]),D=s,s=D.x,D=D.y,g+1<p.length&&(D=p[g+1],s=D.x,D=D.y,D+=c),A=d,k.x===l?A=u-k.y:k.x>l&&k.x<s?A=u+(k.x-l)/(s-l)*(D-u)-k.y:l>k.x&&l<v.x&&(A=u-(k.y+(l-k.x)/(v.x-k.x)*(v.y-k.y))),A<d&&(d=A),v.x<=k.x?f++:s<=l?g++:(v.x<=s&&f++,s<=v.x&&g++);c-=d;c+=m;f=p;g=c;
  if(null===b||2>b.length||null===f||2>f.length)d=null;else{m=zq(a,b.length+f.length);for(d=l=k=0;l<f.length&&f[l].x<b[0].x;)u=f[l++],m[d++].p(u.x,u.y+g);for(;k<b.length;)u=b[k++],m[d++].p(u.x,u.y);for(k=b[b.length-1].x;l<f.length&&f[l].x<=k;)l++;for(;l<f.length&&f[l].x>k;)u=f[l++],m[d++].p(u.x,u.y+g);f=zq(a,d);for(k=0;k<d;k++)f[k].assign(m[k]);Jq(a,m);d=f}l=q;u=c;if(null===n||2>n.length||null===l||2>l.length)f=null;else{m=zq(a,n.length+l.length);for(g=v=f=0;f<n.length&&n[f].x<l[0].x;)k=n[f++],m[g++].p(k.x,
  k.y);for(;v<l.length;)k=l[v++],m[g++].p(k.x,k.y+u);for(l=l[l.length-1].x;f<n.length&&n[f].x<=l;)f++;for(;f<n.length&&n[f].x>l;)k=n[f++],m[g++].p(k.x,k.y);k=zq(a,g);for(f=0;f<g;f++)k[f].assign(m[f]);Jq(a,m);f=k}g=r;h=Math.max(0,c)+h.height}Jq(a,b);Jq(a,p);Jq(a,n);Jq(a,q);a=[];a[0]=c;a[1]=d;a[2]=f;a[3]=g;a[4]=h;return a}function zq(a,b){a.ws||(a.ws=[]);var c=a.ws[b];if(void 0!==c&&(c=c.pop(),void 0!==c))return c;for(var c=[],d=0;d<b;d++)c[d]=new w;return c}
  function Jq(a,b){if(a.ws){var c=b.length,d=a.ws[c];void 0===d&&(d=[],a.ws[c]=d);d.push(b)}}
  X.prototype.arrangeTrees=function(){if(this.cd===Rp)for(var a=this.Yc.k;a.next();){var b=a.value,c=b.Gc;if(null!==c){var d=c.position,c=d.x,d=d.y;isFinite(c)||(c=0);isFinite(d)||(d=0);Sq(this,b,c,d)}}else for(a=this.Dd,c=a.x,d=a.y,a=this.Yc.k;a.next();)switch(b=a.value,Sq(this,b,c+b.Ia.x,d+b.Ia.y),this.cd){case Np:d+=b.Za.height+this.bg.height;break;case Tq:c+=b.Za.width+this.bg.width;break;default:t.m("Unhandled arrangement value "+this.cd.toString())}};
  function Sq(a,b,c,d){if(null!==b){e&&t.l(b,Op,X,"assignAbsolutePositions:v");b.x=c;b.y=d;b=b.children;for(var f=b.length,g=0;g<f;g++){var h=b[g];Sq(a,h,c+h.na.x,d+h.na.y)}}}X.prototype.commitLayout=function(){this.dB();this.commitNodes();this.Vz();this.qt&&this.commitLinks()};X.prototype.commitNodes=function(){for(var a=this.network.vertexes.k,b;a.next();)b=a.value,b.commit();for(a.reset();a.next();)b=a.value,this.layoutComments(b)};
  X.prototype.Vz=function(){if(this.Xw===Xp){for(var a=this.GB,b=[],c=null,d=this.network.vertexes.k;d.next();){var f=d.value;null===c?c=f.Ob.copy():c.lj(f.Ob);var g=b[f.level],g=void 0===g?vq(f):Math.max(g,vq(f));b[f.level]=g}for(d=0;d<b.length;d++)void 0===b[d]&&(b[d]=0);90===this.angle||270===this.angle?(c.Sf(this.nodeSpacing/2,this.layerSpacing),f=new w(-this.nodeSpacing/2,-this.layerSpacing/2)):(c.Sf(this.layerSpacing,this.nodeSpacing/2),f=new w(-this.layerSpacing/2,-this.nodeSpacing/2));var g=
  [],c=90===this.angle||270===this.angle?c.width:c.height,h=0;if(180===this.angle||270===this.angle)for(d=0;d<a.length;d++)h+=a[d]+b[d];for(d=0;d<a.length;d++){var k=a[d]+b[d];270===this.angle?(h-=k,g.push(new x(0,h,c,k))):90===this.angle?(g.push(new x(0,h,c,k)),h+=k):180===this.angle?(h-=k,g.push(new x(h,0,k,c))):(g.push(new x(h,0,k,c)),h+=k)}this.commitLayers(g,f)}};X.prototype.commitLayers=function(){};X.prototype.commitLinks=function(){for(var a=this.network.edges.k;a.next();)a.value.commit()};
  X.prototype.dB=function(){for(var a=this.Yc.k;a.next();)Uq(this,a.value)};function Uq(a,b){if(null!==b){e&&t.l(b,Op,X,"setPortSpotsTree:v");a.setPortSpots(b);for(var c=b.children,d=c.length,f=0;f<d;f++)Uq(a,c[f])}}
  X.prototype.setPortSpots=function(a){e&&t.l(a,Op,X,"setPortSpots:v");var b=a.alignment;if(jq(b)){e&&t.l(a,Op,X,"setPortSpotsBus:v");e&&t.l(b,da,X,"setPortSpots:align");var c=this.If===Kp,d=sq(a),f;switch(d){case 0:f=Vb;break;case 90:f=Wb;break;case 180:f=Ub;break;default:f=Qb}var g=a.children,h=g.length;switch(b){case kq:case $p:for(b=0;b<h;b++){var k=g[b],k=c?k.rc:k.gc;if(k.next()){var l=k.value,l=l.link;if(null!==l){var m=90===d||270===d?Ub:Qb;if(1===h||b===h-1&&1===h%2)switch(d){case 0:m=Ub;break;
  case 90:m=Qb;break;case 180:m=Vb;break;default:m=Wb}else 0===b%2&&(m=90===d||270===d?Vb:Wb);c?(a.setsPortSpot&&(l.pb=f),a.setsChildPortSpot&&(l.tb=m)):(a.setsPortSpot&&(l.pb=m),a.setsChildPortSpot&&(l.tb=f))}}}break;case lq:m=90===d||270===d?Vb:Wb;for(k=c?a.gc:a.rc;k.next();)l=k.value,l=l.link,null!==l&&(c?(a.setsPortSpot&&(l.pb=f),a.setsChildPortSpot&&(l.tb=m)):(a.setsPortSpot&&(l.pb=m),a.setsChildPortSpot&&(l.tb=f)));break;case mq:for(m=90===d||270===d?Ub:Qb,k=c?a.gc:a.rc;k.next();)l=k.value,l=
  l.link,null!==l&&(c?(a.setsPortSpot&&(l.pb=f),a.setsChildPortSpot&&(l.tb=m)):(a.setsPortSpot&&(l.pb=m),a.setsChildPortSpot&&(l.tb=f)))}}else if(c=sq(a),this.If===Kp)for(d=a.gc;d.next();){if(f=d.value,f=f.link,null!==f){if(a.setsPortSpot)if(a.portSpot.Pc())switch(c){case 0:f.pb=Vb;break;case 90:f.pb=Wb;break;case 180:f.pb=Ub;break;default:f.pb=Qb}else f.pb=a.portSpot;if(a.setsChildPortSpot)if(a.childPortSpot.Pc())switch(c){case 0:f.tb=Ub;break;case 90:f.tb=Qb;break;case 180:f.tb=Vb;break;default:f.tb=
  Wb}else f.tb=a.childPortSpot}}else for(d=a.rc;d.next();)if(f=d.value,f=f.link,null!==f){if(a.setsPortSpot)if(a.portSpot.Pc())switch(c){case 0:f.tb=Vb;break;case 90:f.tb=Wb;break;case 180:f.tb=Ub;break;default:f.tb=Qb}else f.tb=a.portSpot;if(a.setsChildPortSpot)if(a.childPortSpot.Pc())switch(c){case 0:f.pb=Ub;break;case 90:f.pb=Qb;break;case 180:f.pb=Vb;break;default:f.pb=Wb}else f.pb=a.childPortSpot}};function sq(a){a=a.angle;return 45>=a?0:135>=a?90:225>=a?180:315>=a?270:0}
  function vq(a){e&&t.l(a,Op,X,"computeLayerSpacing:v");var b=sq(a),b=90===b||270===b,c=a.layerSpacing;if(0<a.layerSpacingParentOverlap)var d=Math.min(1,a.layerSpacingParentOverlap),c=c-(b?a.height*d:a.width*d);c<(b?-a.height:-a.width)&&(c=b?-a.height:-a.width);return c}function wq(a){e&&t.l(a,Op,X,"computeNodeIndent:v");var b=sq(a),b=90===b||270===b,c=a.nodeIndent;if(0<a.nodeIndentPastParent)var d=Math.min(1,a.nodeIndentPastParent),c=c+(b?a.width*d:a.height*d);return c=Math.max(0,c)}
  t.g(X,"roots",X.prototype.NJ);t.defineProperty(X,{NJ:"roots"},function(){return this.Yc},function(a){this.Yc!==a&&(t.l(a,C,X,"roots"),this.Yc=a,this.J())});t.g(X,"path",X.prototype.path);t.defineProperty(X,{path:"path"},function(){return this.Ji},function(a){this.Ji!==a&&(t.Aa(a,X,X,"path"),this.Ji=a,this.J())});t.g(X,"treeStyle",X.prototype.NG);
  t.defineProperty(X,{NG:"treeStyle"},function(){return this.Cs},function(a){this.cd!==a&&(t.Aa(a,X,X,"treeStyle"),a===Lp||a===cq||a===dq||a===bq)&&(this.Cs=a,this.J())});t.g(X,"layerStyle",X.prototype.Xw);t.defineProperty(X,{Xw:"layerStyle"},function(){return this.Yu},function(a){this.cd!==a&&(t.Aa(a,X,X,"layerStyle"),a===Mp||a===Yp||a===Xp)&&(this.Yu=a,this.J())});t.g(X,"comments",X.prototype.comments);
  t.defineProperty(X,{comments:"comments"},function(){return this.th},function(a){this.th!==a&&(t.i(a,"boolean",X,"comments"),this.th=a,this.J())});t.g(X,"arrangement",X.prototype.Qe);t.defineProperty(X,{Qe:"arrangement"},function(){return this.cd},function(a){this.cd!==a&&(t.Aa(a,X,X,"arrangement"),a===Np||a===Tq||a===Rp)&&(this.cd=a,this.J())});t.g(X,"arrangementSpacing",X.prototype.ew);
  t.defineProperty(X,{ew:"arrangementSpacing"},function(){return this.bg},function(a){t.l(a,ga,X,"arrangementSpacing");this.bg.M(a)||(this.bg.assign(a),this.J())});t.g(X,"rootDefaults",X.prototype.MJ);t.defineProperty(X,{MJ:"rootDefaults"},function(){return this.ua},function(a){this.ua!==a&&(t.l(a,Op,X,"rootDefaults"),this.ua=a,this.J())});t.g(X,"alternateDefaults",X.prototype.OH);
  t.defineProperty(X,{OH:"alternateDefaults"},function(){return this.ta},function(a){this.ta!==a&&(t.l(a,Op,X,"alternateDefaults"),this.ta=a,this.J())});t.g(X,"sorting",X.prototype.sorting);t.defineProperty(X,{sorting:"sorting"},function(){return this.ua.sorting},function(a){this.ua.sorting!==a&&(t.Aa(a,X,X,"sorting"),a===eq||a===fq||a===gq||hq)&&(this.ua.sorting=a,this.J())});t.g(X,"comparer",X.prototype.comparer);
  t.defineProperty(X,{comparer:"comparer"},function(){return this.ua.comparer},function(a){this.ua.comparer!==a&&(t.i(a,"function",X,"comparer"),this.ua.comparer=a,this.J())});t.g(X,"angle",X.prototype.angle);t.defineProperty(X,{angle:"angle"},function(){return this.ua.angle},function(a){this.ua.angle!==a&&(t.i(a,"number",X,"angle"),0===a||90===a||180===a||270===a)&&(this.ua.angle=a,this.J())});t.g(X,"alignment",X.prototype.alignment);
  t.defineProperty(X,{alignment:"alignment"},function(){return this.ua.alignment},function(a){this.ua.alignment!==a&&(t.Aa(a,X,X,"alignment"),this.ua.alignment=a,this.J())});t.g(X,"nodeIndent",X.prototype.nodeIndent);t.defineProperty(X,{nodeIndent:"nodeIndent"},function(){return this.ua.nodeIndent},function(a){this.ua.nodeIndent!==a&&(t.i(a,"number",X,"nodeIndent"),0<=a&&(this.ua.nodeIndent=a,this.J()))});t.g(X,"nodeIndentPastParent",X.prototype.nodeIndentPastParent);
  t.defineProperty(X,{nodeIndentPastParent:"nodeIndentPastParent"},function(){return this.ua.nodeIndentPastParent},function(a){this.ua.nodeIndentPastParent!==a&&(t.i(a,"number",X,"nodeIndentPastParent"),0<=a&&1>=a&&(this.ua.nodeIndentPastParent=a,this.J()))});t.g(X,"nodeSpacing",X.prototype.nodeSpacing);t.defineProperty(X,{nodeSpacing:"nodeSpacing"},function(){return this.ua.nodeSpacing},function(a){this.ua.nodeSpacing!==a&&(t.i(a,"number",X,"nodeSpacing"),this.ua.nodeSpacing=a,this.J())});
  t.g(X,"layerSpacing",X.prototype.layerSpacing);t.defineProperty(X,{layerSpacing:"layerSpacing"},function(){return this.ua.layerSpacing},function(a){this.ua.layerSpacing!==a&&(t.i(a,"number",X,"layerSpacing"),this.ua.layerSpacing=a,this.J())});t.g(X,"layerSpacingParentOverlap",X.prototype.layerSpacingParentOverlap);
  t.defineProperty(X,{layerSpacingParentOverlap:"layerSpacingParentOverlap"},function(){return this.ua.layerSpacingParentOverlap},function(a){this.ua.layerSpacingParentOverlap!==a&&(t.i(a,"number",X,"layerSpacingParentOverlap"),0<=a&&1>=a&&(this.ua.layerSpacingParentOverlap=a,this.J()))});t.g(X,"compaction",X.prototype.compaction);
  t.defineProperty(X,{compaction:"compaction"},function(){return this.ua.compaction},function(a){this.ua.compaction!==a&&(t.Aa(a,X,X,"compaction"),a===pq||a===rq)&&(this.ua.compaction=a,this.J())});t.g(X,"breadthLimit",X.prototype.breadthLimit);t.defineProperty(X,{breadthLimit:"breadthLimit"},function(){return this.ua.breadthLimit},function(a){this.ua.breadthLimit!==a&&(t.i(a,"number",X,"breadthLimit"),0<=a&&(this.ua.breadthLimit=a,this.J()))});t.g(X,"rowSpacing",X.prototype.rowSpacing);
  t.defineProperty(X,{rowSpacing:"rowSpacing"},function(){return this.ua.rowSpacing},function(a){this.ua.rowSpacing!==a&&(t.i(a,"number",X,"rowSpacing"),this.ua.rowSpacing=a,this.J())});t.g(X,"rowIndent",X.prototype.rowIndent);t.defineProperty(X,{rowIndent:"rowIndent"},function(){return this.ua.rowIndent},function(a){this.ua.rowIndent!==a&&(t.i(a,"number",X,"rowIndent"),0<=a&&(this.ua.rowIndent=a,this.J()))});t.g(X,"commentSpacing",X.prototype.commentSpacing);
  t.defineProperty(X,{commentSpacing:"commentSpacing"},function(){return this.ua.commentSpacing},function(a){this.ua.commentSpacing!==a&&(t.i(a,"number",X,"commentSpacing"),this.ua.commentSpacing=a,this.J())});t.g(X,"commentMargin",X.prototype.commentMargin);t.defineProperty(X,{commentMargin:"commentMargin"},function(){return this.ua.commentMargin},function(a){this.ua.commentMargin!==a&&(t.i(a,"number",X,"commentMargin"),this.ua.commentMargin=a,this.J())});t.g(X,"setsPortSpot",X.prototype.setsPortSpot);
  t.defineProperty(X,{setsPortSpot:"setsPortSpot"},function(){return this.ua.setsPortSpot},function(a){this.ua.setsPortSpot!==a&&(t.i(a,"boolean",X,"setsPortSpot"),this.ua.setsPortSpot=a,this.J())});t.g(X,"portSpot",X.prototype.portSpot);t.defineProperty(X,{portSpot:"portSpot"},function(){return this.ua.portSpot},function(a){t.l(a,I,X,"portSpot");this.ua.portSpot.M(a)||(this.ua.portSpot=a,this.J())});t.g(X,"setsChildPortSpot",X.prototype.setsChildPortSpot);
  t.defineProperty(X,{setsChildPortSpot:"setsChildPortSpot"},function(){return this.ua.setsChildPortSpot},function(a){this.ua.setsChildPortSpot!==a&&(t.i(a,"boolean",X,"setsChildPortSpot"),this.ua.setsChildPortSpot=a,this.J())});t.g(X,"childPortSpot",X.prototype.childPortSpot);t.defineProperty(X,{childPortSpot:"childPortSpot"},function(){return this.ua.childPortSpot},function(a){t.l(a,I,X,"childPortSpot");this.ua.childPortSpot.M(a)||(this.ua.childPortSpot=a,this.J())});t.g(X,"alternateSorting",X.prototype.ZH);
  t.defineProperty(X,{ZH:"alternateSorting"},function(){return this.ta.sorting},function(a){this.ta.sorting!==a&&(t.Aa(a,X,X,"alternateSorting"),a===eq||a===fq||a===gq||hq)&&(this.ta.sorting=a,this.J())});t.g(X,"alternateComparer",X.prototype.NH);t.defineProperty(X,{NH:"alternateComparer"},function(){return this.ta.comparer},function(a){this.ta.comparer!==a&&(t.i(a,"function",X,"alternateComparer"),this.ta.comparer=a,this.J())});t.g(X,"alternateAngle",X.prototype.HH);
  t.defineProperty(X,{HH:"alternateAngle"},function(){return this.ta.angle},function(a){this.ta.angle!==a&&(t.i(a,"number",X,"alternateAngle"),0===a||90===a||180===a||270===a)&&(this.ta.angle=a,this.J())});t.g(X,"alternateAlignment",X.prototype.GH);t.defineProperty(X,{GH:"alternateAlignment"},function(){return this.ta.alignment},function(a){this.ta.alignment!==a&&(t.Aa(a,X,X,"alternateAlignment"),this.ta.alignment=a,this.J())});t.g(X,"alternateNodeIndent",X.prototype.RH);
  t.defineProperty(X,{RH:"alternateNodeIndent"},function(){return this.ta.nodeIndent},function(a){this.ta.nodeIndent!==a&&(t.i(a,"number",X,"alternateNodeIndent"),0<=a&&(this.ta.nodeIndent=a,this.J()))});t.g(X,"alternateNodeIndentPastParent",X.prototype.SH);
  t.defineProperty(X,{SH:"alternateNodeIndentPastParent"},function(){return this.ta.nodeIndentPastParent},function(a){this.ta.nodeIndentPastParent!==a&&(t.i(a,"number",X,"alternateNodeIndentPastParent"),0<=a&&1>=a&&(this.ta.nodeIndentPastParent=a,this.J()))});t.g(X,"alternateNodeSpacing",X.prototype.TH);t.defineProperty(X,{TH:"alternateNodeSpacing"},function(){return this.ta.nodeSpacing},function(a){this.ta.nodeSpacing!==a&&(t.i(a,"number",X,"alternateNodeSpacing"),this.ta.nodeSpacing=a,this.J())});
  t.g(X,"alternateLayerSpacing",X.prototype.PH);t.defineProperty(X,{PH:"alternateLayerSpacing"},function(){return this.ta.layerSpacing},function(a){this.ta.layerSpacing!==a&&(t.i(a,"number",X,"alternateLayerSpacing"),this.ta.layerSpacing=a,this.J())});t.g(X,"alternateLayerSpacingParentOverlap",X.prototype.QH);
  t.defineProperty(X,{QH:"alternateLayerSpacingParentOverlap"},function(){return this.ta.layerSpacingParentOverlap},function(a){this.ta.layerSpacingParentOverlap!==a&&(t.i(a,"number",X,"alternateLayerSpacingParentOverlap"),0<=a&&1>=a&&(this.ta.layerSpacingParentOverlap=a,this.J()))});t.g(X,"alternateCompaction",X.prototype.MH);
  t.defineProperty(X,{MH:"alternateCompaction"},function(){return this.ta.compaction},function(a){this.ta.compaction!==a&&(t.Aa(a,X,X,"alternateCompaction"),a===pq||a===rq)&&(this.ta.compaction=a,this.J())});t.g(X,"alternateBreadthLimit",X.prototype.IH);t.defineProperty(X,{IH:"alternateBreadthLimit"},function(){return this.ta.breadthLimit},function(a){this.ta.breadthLimit!==a&&(t.i(a,"number",X,"alternateBreadthLimit"),0<=a&&(this.ta.breadthLimit=a,this.J()))});t.g(X,"alternateRowSpacing",X.prototype.WH);
  t.defineProperty(X,{WH:"alternateRowSpacing"},function(){return this.ta.rowSpacing},function(a){this.ta.rowSpacing!==a&&(t.i(a,"number",X,"alternateRowSpacing"),this.ta.rowSpacing=a,this.J())});t.g(X,"alternateRowIndent",X.prototype.VH);t.defineProperty(X,{VH:"alternateRowIndent"},function(){return this.ta.rowIndent},function(a){this.ta.rowIndent!==a&&(t.i(a,"number",X,"alternateRowIndent"),0<=a&&(this.ta.rowIndent=a,this.J()))});t.g(X,"alternateCommentSpacing",X.prototype.LH);
  t.defineProperty(X,{LH:"alternateCommentSpacing"},function(){return this.ta.commentSpacing},function(a){this.ta.commentSpacing!==a&&(t.i(a,"number",X,"alternateCommentSpacing"),this.ta.commentSpacing=a,this.J())});t.g(X,"alternateCommentMargin",X.prototype.KH);t.defineProperty(X,{KH:"alternateCommentMargin"},function(){return this.ta.commentMargin},function(a){this.ta.commentMargin!==a&&(t.i(a,"number",X,"alternateCommentMargin"),this.ta.commentMargin=a,this.J())});t.g(X,"alternateSetsPortSpot",X.prototype.YH);
  t.defineProperty(X,{YH:"alternateSetsPortSpot"},function(){return this.ta.setsPortSpot},function(a){this.ta.setsPortSpot!==a&&(t.i(a,"boolean",X,"alternateSetsPortSpot"),this.ta.setsPortSpot=a,this.J())});t.g(X,"alternatePortSpot",X.prototype.UH);t.defineProperty(X,{UH:"alternatePortSpot"},function(){return this.ta.portSpot},function(a){t.l(a,I,X,"alternatePortSpot");this.ta.portSpot.M(a)||(this.ta.portSpot=a,this.J())});t.g(X,"alternateSetsChildPortSpot",X.prototype.XH);
  t.defineProperty(X,{XH:"alternateSetsChildPortSpot"},function(){return this.ta.setsChildPortSpot},function(a){this.ta.setsChildPortSpot!==a&&(t.i(a,"boolean",X,"alternateSetsChildPortSpot"),this.ta.setsChildPortSpot=a,this.J())});t.g(X,"alternateChildPortSpot",X.prototype.JH);t.defineProperty(X,{JH:"alternateChildPortSpot"},function(){return this.ta.childPortSpot},function(a){t.l(a,I,X,"alternateChildPortSpot");this.ta.childPortSpot.M(a)||(this.ta.childPortSpot=a,this.J())});var Jp;
  X.PathDefault=Jp=t.w(X,"PathDefault",-1);var Kp;X.PathDestination=Kp=t.w(X,"PathDestination",0);var Sp;X.PathSource=Sp=t.w(X,"PathSource",1);var eq;X.SortingForwards=eq=t.w(X,"SortingForwards",10);var fq;X.SortingReverse=fq=t.w(X,"SortingReverse",11);var gq;X.SortingAscending=gq=t.w(X,"SortingAscending",12);var hq;X.SortingDescending=hq=t.w(X,"SortingDescending",13);var Fq;X.AlignmentCenterSubtrees=Fq=t.w(X,"AlignmentCenterSubtrees",20);var iq;
  X.AlignmentCenterChildren=iq=t.w(X,"AlignmentCenterChildren",21);var tq;X.AlignmentStart=tq=t.w(X,"AlignmentStart",22);var uq;X.AlignmentEnd=uq=t.w(X,"AlignmentEnd",23);var kq;X.AlignmentBus=kq=t.w(X,"AlignmentBus",24);var $p;X.AlignmentBusBranching=$p=t.w(X,"AlignmentBusBranching",25);var lq;X.AlignmentTopLeftBus=lq=t.w(X,"AlignmentTopLeftBus",26);var mq;X.AlignmentBottomRightBus=mq=t.w(X,"AlignmentBottomRightBus",27);var pq;X.CompactionNone=pq=t.w(X,"CompactionNone",30);var rq;
  X.CompactionBlock=rq=t.w(X,"CompactionBlock",31);var Lp;X.StyleLayered=Lp=t.w(X,"StyleLayered",40);var dq;X.StyleLastParents=dq=t.w(X,"StyleLastParents",41);var cq;X.StyleAlternating=cq=t.w(X,"StyleAlternating",42);var bq;X.StyleRootOnly=bq=t.w(X,"StyleRootOnly",43);var Np;X.ArrangementVertical=Np=t.w(X,"ArrangementVertical",50);var Tq;X.ArrangementHorizontal=Tq=t.w(X,"ArrangementHorizontal",51);var Rp;X.ArrangementFixedRoots=Rp=t.w(X,"ArrangementFixedRoots",52);var Mp;
  X.LayerIndividual=Mp=t.w(X,"LayerIndividual",60);var Yp;X.LayerSiblings=Yp=t.w(X,"LayerSiblings",61);var Xp;X.LayerUniform=Xp=t.w(X,"LayerUniform",62);function Pp(){ra.call(this)}t.ga("TreeNetwork",Pp);t.Ka(Pp,ra);Pp.prototype.createVertex=function(){return new Op};Pp.prototype.createEdge=function(){return new Vq};
  function Op(){sa.call(this);this.initialized=!1;this.parent=null;this.children=[];this.maxGenerationCount=this.maxChildrenCount=this.descendantCount=this.level=0;this.comments=null;this.na=new w(0,0);this.Za=new ga(0,0);this.Ia=new w(0,0);this.Pp=this.Op=this.OJ=!1;this.Jt=this.st=null;this.sorting=eq;this.comparer=Rn;this.angle=0;this.alignment=iq;this.nodeIndentPastParent=this.nodeIndent=0;this.nodeSpacing=20;this.layerSpacing=50;this.layerSpacingParentOverlap=0;this.compaction=rq;this.breadthLimit=
  0;this.rowSpacing=25;this.commentSpacing=this.rowIndent=10;this.commentMargin=20;this.setsPortSpot=!0;this.portSpot=xb;this.setsChildPortSpot=!0;this.childPortSpot=xb}t.ga("TreeVertex",Op);t.Ka(Op,sa);
  Op.prototype.copyInheritedPropertiesFrom=function(a){null!==a&&(this.sorting=a.sorting,this.comparer=a.comparer,this.angle=a.angle,this.alignment=a.alignment,this.nodeIndent=a.nodeIndent,this.nodeIndentPastParent=a.nodeIndentPastParent,this.nodeSpacing=a.nodeSpacing,this.layerSpacing=a.layerSpacing,this.layerSpacingParentOverlap=a.layerSpacingParentOverlap,this.compaction=a.compaction,this.breadthLimit=a.breadthLimit,this.rowSpacing=a.rowSpacing,this.rowIndent=a.rowIndent,this.commentSpacing=a.commentSpacing,
  this.commentMargin=a.commentMargin,this.setsPortSpot=a.setsPortSpot,this.portSpot=a.portSpot,this.setsChildPortSpot=a.setsChildPortSpot,this.childPortSpot=a.childPortSpot)};t.A(Op,{Gm:"childrenCount"},function(){return this.children.length});t.g(Op,"relativePosition",Op.prototype.IJ);t.defineProperty(Op,{IJ:"relativePosition"},function(){return this.na},function(a){this.na.set(a)});t.g(Op,"subtreeSize",Op.prototype.aK);t.defineProperty(Op,{aK:"subtreeSize"},function(){return this.Za},function(a){this.Za.set(a)});
  t.g(Op,"subtreeOffset",Op.prototype.$J);t.defineProperty(Op,{$J:"subtreeOffset"},function(){return this.Ia},function(a){this.Ia.set(a)});function Vq(){ua.call(this);this.Sr=new w(0,0)}t.ga("TreeEdge",Vq);t.Ka(Vq,ua);
  Vq.prototype.commit=function(){var a=this.link;if(null!==a&&!a.dj){var b=this.network.jc,c=null,d=null;switch(b.If){case Kp:c=this.fromVertex;d=this.toVertex;break;case Sp:c=this.toVertex;d=this.fromVertex;break;default:t.m("Unhandled path value "+b.If.toString())}if(null!==c&&null!==d)if(b=this.Sr,0!==b.x||0!==b.y||c.OJ){var d=c.Ob,f=sq(c),g=vq(c),h=c.rowSpacing;a.updateRoute();var k=a.De===Og,l=a.ic,m,n,p,q;a.yl();if(l||k){for(m=2;4<a.oa;)a.QF(2);n=a.o(1);p=a.o(2)}else{for(m=1;3<a.oa;)a.QF(1);n=
  a.o(0);p=a.o(a.oa-1)}q=a.o(a.oa-1);0===f?(c.alignment===uq?(f=d.bottom+b.y,0===b.y&&n.y>q.y+c.rowIndent&&(f=Math.min(f,Math.max(n.y,f-wq(c))))):c.alignment===tq?(f=d.top+b.y,0===b.y&&n.y<q.y-c.rowIndent&&(f=Math.max(f,Math.min(n.y,f+wq(c))))):f=c.Op||c.Pp&&1===c.maxGenerationCount?d.top-c.Ia.y+b.y:d.y+d.height/2+b.y,k?(a.C(m,n.x,f),m++,a.C(m,d.right+g,f),m++,a.C(m,d.right+g+(b.x-h)/3,f),m++,a.C(m,d.right+g+2*(b.x-h)/3,f),m++,a.C(m,d.right+g+(b.x-h),f),m++,a.C(m,p.x,f)):(l&&(a.C(m,d.right+g/2,n.y),
  m++),a.C(m,d.right+g/2,f),m++,a.C(m,d.right+g+b.x-(l?h/2:h),f),m++,l&&a.C(m,a.o(m-1).x,p.y))):90===f?(c.alignment===uq?(f=d.right+b.x,0===b.x&&n.x>q.x+c.rowIndent&&(f=Math.min(f,Math.max(n.x,f-wq(c))))):c.alignment===tq?(f=d.left+b.x,0===b.x&&n.x<q.x-c.rowIndent&&(f=Math.max(f,Math.min(n.x,f+wq(c))))):f=c.Op||c.Pp&&1===c.maxGenerationCount?d.left-c.Ia.x+b.x:d.x+d.width/2+b.x,k?(a.C(m,f,n.y),m++,a.C(m,f,d.bottom+g),m++,a.C(m,f,d.bottom+g+(b.y-h)/3),m++,a.C(m,f,d.bottom+g+2*(b.y-h)/3),m++,a.C(m,f,d.bottom+
  g+(b.y-h)),m++,a.C(m,f,p.y)):(l&&(a.C(m,n.x,d.bottom+g/2),m++),a.C(m,f,d.bottom+g/2),m++,a.C(m,f,d.bottom+g+b.y-(l?h/2:h)),m++,l&&a.C(m,p.x,a.o(m-1).y))):180===f?(c.alignment===uq?(f=d.bottom+b.y,0===b.y&&n.y>q.y+c.rowIndent&&(f=Math.min(f,Math.max(n.y,f-wq(c))))):c.alignment===tq?(f=d.top+b.y,0===b.y&&n.y<q.y-c.rowIndent&&(f=Math.max(f,Math.min(n.y,f+wq(c))))):f=c.Op||c.Pp&&1===c.maxGenerationCount?d.top-c.Ia.y+b.y:d.y+d.height/2+b.y,k?(a.C(m,n.x,f),m++,a.C(m,d.left-g,f),m++,a.C(m,d.left-g+(b.x+
  h)/3,f),m++,a.C(m,d.left-g+2*(b.x+h)/3,f),m++,a.C(m,d.left-g+(b.x+h),f),m++,a.C(m,p.x,f)):(l&&(a.C(m,d.left-g/2,n.y),m++),a.C(m,d.left-g/2,f),m++,a.C(m,d.left-g+b.x+(l?h/2:h),f),m++,l&&a.C(m,a.o(m-1).x,p.y))):270===f?(c.alignment===uq?(f=d.right+b.x,0===b.x&&n.x>q.x+c.rowIndent&&(f=Math.min(f,Math.max(n.x,f-wq(c))))):c.alignment===tq?(f=d.left+b.x,0===b.x&&n.x<q.x-c.rowIndent&&(f=Math.max(f,Math.min(n.x,f+wq(c))))):f=c.Op||c.Pp&&1===c.maxGenerationCount?d.left-c.Ia.x+b.x:d.x+d.width/2+b.x,k?(a.C(m,
  f,n.y),m++,a.C(m,f,d.top-g),m++,a.C(m,f,d.top-g+(b.y+h)/3),m++,a.C(m,f,d.top-g+2*(b.y+h)/3),m++,a.C(m,f,d.top-g+(b.y+h)),m++,a.C(m,f,p.y)):(l&&(a.C(m,n.x,d.top-g/2),m++),a.C(m,f,d.top-g/2),m++,a.C(m,f,d.top-g+b.y+(l?h/2:h)),m++,l&&a.C(m,p.x,a.o(m-1).y))):t.m("Invalid angle "+f);a.Wi()}else g=c,h=d,e&&t.l(g,Op,Vq,"adjustRouteForAngleChange:parent"),e&&t.l(h,Op,Vq,"adjustRouteForAngleChange:child"),a=this.link,c=sq(g),c!==sq(h)&&(b=vq(g),d=g.Ob,g=h.Ob,0===c&&g.left-d.right<b+1||90===c&&g.top-d.bottom<
  b+1||180===c&&d.left-g.right<b+1||270===c&&d.top-g.bottom<b+1||(a.updateRoute(),g=a.De===Og,h=a.ic,k=jq(this.fromVertex.alignment),a.yl(),0===c?(c=d.right+b/2,g?4===a.oa&&(b=a.o(3).y,a.Y(1,c-20,a.o(1).y),a.C(2,c-20,b),a.C(3,c,b),a.C(4,c+20,b),a.Y(5,a.o(5).x,b)):h?k?a.Y(3,a.o(2).x,a.o(4).y):6===a.oa&&(a.Y(2,c,a.o(2).y),a.Y(3,c,a.o(3).y)):4===a.oa?a.C(2,c,a.o(2).y):3===a.oa?a.Y(1,c,a.o(2).y):2===a.oa&&a.C(1,c,a.o(1).y)):90===c?(b=d.bottom+b/2,g?4===a.oa&&(c=a.o(3).x,a.Y(1,a.o(1).x,b-20),a.C(2,c,b-20),
  a.C(3,c,b),a.C(4,c,b+20),a.Y(5,c,a.o(5).y)):h?k?a.Y(3,a.o(2).x,a.o(4).y):6===a.oa&&(a.Y(2,a.o(2).x,b),a.Y(3,a.o(3).x,b)):4===a.oa?a.C(2,a.o(2).x,b):3===a.oa?a.Y(1,a.o(2).x,b):2===a.oa&&a.C(1,a.o(1).x,b)):180===c?(c=d.left-b/2,g?4===a.oa&&(b=a.o(3).y,a.Y(1,c+20,a.o(1).y),a.C(2,c+20,b),a.C(3,c,b),a.C(4,c-20,b),a.Y(5,a.o(5).x,b)):h?k?a.Y(3,a.o(2).x,a.o(4).y):6===a.oa&&(a.Y(2,c,a.o(2).y),a.Y(3,c,a.o(3).y)):4===a.oa?a.C(2,c,a.o(2).y):3===a.oa?a.Y(1,c,a.o(2).y):2===a.oa&&a.C(1,c,a.o(1).y)):270===c&&(b=
  d.top-b/2,g?4===a.oa&&(c=a.o(3).x,a.Y(1,a.o(1).x,b+20),a.C(2,c,b+20),a.C(3,c,b),a.C(4,c,b-20),a.Y(5,c,a.o(5).y)):h?k?a.Y(3,a.o(2).x,a.o(4).y):6===a.oa&&(a.Y(2,a.o(2).x,b),a.Y(3,a.o(3).x,b)):4===a.oa?a.C(2,a.o(2).x,b):3===a.oa?a.Y(1,a.o(2).x,b):2===a.oa&&a.C(1,a.o(1).x,b)),a.Wi()))}};t.g(Vq,"relativePoint",Vq.prototype.HJ);t.defineProperty(Vq,{HJ:"relativePoint"},function(){return this.Sr},function(a){this.Sr.set(a)});function Wq(){this.Vn=[]}
  function Rk(a){var b=new Wq,c;if("string"===typeof a)c=(new DOMParser).parseFromString(a,"text/xml");else if(a instanceof Document)c=a.implementation.createDocument("http://www.w3.org/2000/svg","svg",null),c.appendChild(c.importNode(a.documentElement,!0));else return null;a=c.getElementsByTagName("svg");if(0===a.length)return null;var d=a[0],f=c.getElementsByTagName("linearGradient"),g=c.getElementsByTagName("radialGradient");for(a=0;a<f.length;a++){for(var h=f[a],k=Sk(fa,Od,{start:Xb,end:Yb}),l=
  h.childNodes,m=0;m<l.length;m++)if("stop"===l[m].tagName){var n=Xq(b,l[m],"stop-color");if(n){var p=Xq(b,l[m],"offset");p||(p="0");var q=parseFloat(p);isNaN(q)&&(q=0);k.addColorStop((-1!==p.indexOf("%")?0.01:1)*q,n)}}h=h.getAttribute("id");"string"===typeof h&&(b["_brush"+h]=k)}for(a=0;a<g.length;a++){h=g[a];k=Sk(fa,Zd,{start:Kb,end:Kb});l=h.childNodes;for(m=0;m<l.length;m++)"stop"===l[m].tagName&&(n=Xq(b,l[m],"stop-color"))&&((p=Xq(b,l[m],"offset"))||(p="0"),q=parseFloat(p),isNaN(q)&&(q=0),k.addColorStop((-1!==
  p.indexOf("%")?0.01:1)*q,n));h=h.getAttribute("id");"string"===typeof h&&(b["_brush"+h]=k)}for(f=!0;f;)for(f=!1,g=c.getElementsByTagName("use"),a=0;a<g.length;a++)k=g[a],0===k.childNodes.length&&(h=k.href,void 0!==h&&(h=c.getElementById(h.baseVal.substring(1)),null!==h&&(h=h.cloneNode(!0),h.removeAttribute("id"),l=parseFloat(k.getAttribute("x")),isNaN(l)&&(l=0),m=parseFloat(k.getAttribute("y")),isNaN(m)&&(m=0),n=k.getAttribute("transform"),null===n&&(n=""),k.setAttribute("transform",n+" translate("+
  l+","+m+")"),k.appendChild(h),"use"===h.tagName&&(f=!0))));Yq(b,d,null);c=new y;if(0===b.Vn.length)return c;if(1===b.Vn.length)return b.Vn[0];for(a=0;a<b.Vn.length;a++)c.add(b.Vn[a]);return c}function Zq(a,b){var c=a.getAttribute(b);"string"!==typeof c&&a.style&&(c=a.style[b]);return"string"!==typeof c?null:c}
  function Xq(a,b,c){var d=b.getAttribute(c);"string"!==typeof d&&b.style&&(d=b.style[c]);return"string"!==typeof d||""===d||"inherit"===d?(b=b.parentNode,"g"===b.tagName||"use"===b.tagName?Xq(a,b,c):null):d}
  function Yq(a,b,c){var d=b.tagName;if(("g"===d||"svg"===d||"use"===d||"symbol"===d)&&"none"!==Xq(a,b,"display")){for(var d=b.childNodes,f=0;f<d.length;f++){var g=d[f],h=null;if(void 0!==g.getAttribute){var k=g.getAttribute("transform");switch(g.tagName){case "g":null===k?Yq(a,g,null):(h=new y,Yq(a,g,h));break;case "use":null===k?Yq(a,g,null):(h=new y,Yq(a,g,h));break;case "symbol":if("use"!==b.tagName)break;h=new y;Yq(a,g,h);var l=h,m=a,n=g;Xq(m,n,"preserveAspectRatio");Xq(m,n,"viewBox");l.scale=
  1;break;case "path":l=g;h=new W;l=l.getAttribute("d");"string"===typeof l&&(h.JE=Qc(l));break;case "line":var p=g,h=new W,l=parseFloat(p.getAttribute("x1"));isNaN(l)&&(l=0);m=parseFloat(p.getAttribute("y1"));isNaN(m)&&(m=0);n=parseFloat(p.getAttribute("x2"));isNaN(n)&&(n=0);p=parseFloat(p.getAttribute("y2"));isNaN(p)&&(p=0);var q=new zc(Dc);h.position=new w(Math.min(l,n),Math.min(m,p));0<(n-l)/(p-m)?(q.qa=0,q.ra=0,q.D=Math.abs(n-l),q.F=Math.abs(p-m)):(q.qa=0,q.ra=Math.abs(p-m),q.D=Math.abs(n-l),q.F=
  0);h.nd=q;break;case "circle":n=g;h=new W;l=parseFloat(n.getAttribute("r"));isNaN(l)||0>l?h=null:(m=parseFloat(n.getAttribute("cx")),isNaN(m)&&(m=0),n=parseFloat(n.getAttribute("cy")),isNaN(n)&&(n=0),p=new zc(Mc),p.qa=0,p.ra=0,p.D=2*l,p.F=2*l,h.position=new w(m-l,n-l),h.nd=p);break;case "ellipse":p=g;h=new W;l=parseFloat(p.getAttribute("rx"));isNaN(l)||0>l?h=null:(m=parseFloat(p.getAttribute("ry")),isNaN(m)||0>m?h=null:(n=parseFloat(p.getAttribute("cx")),isNaN(n)&&(n=0),p=parseFloat(p.getAttribute("cy")),
  isNaN(p)&&(p=0),q=new zc(Mc),q.qa=0,q.ra=0,q.D=2*l,q.F=2*m,h.position=new w(n-l,p-m),h.nd=q));break;case "rect":q=g;h=new W;l=parseFloat(q.getAttribute("width"));if(isNaN(l)||0>l)h=null;else if(m=parseFloat(q.getAttribute("height")),isNaN(m)||0>m)h=null;else{n=parseFloat(q.getAttribute("x"));isNaN(n)&&(n=0);p=parseFloat(q.getAttribute("y"));isNaN(p)&&(p=0);var r=q.getAttribute("rx"),s=q.getAttribute("ry"),q=parseFloat(r);if(isNaN(q)||0>q)q=0;var u=parseFloat(s);if(isNaN(u)||0>u)u=0;!r&&s?q=u:r&&!s&&
  (u=q);q=Math.min(q,l/2);u=Math.min(u,m/2);s=void 0;0===q&&0===u?(s=new zc(Ec),s.qa=0,s.ra=0,s.D=l,s.F=m):(s=H.va/2,r=t.u(),J(r,q,0,!0),r.lineTo(l-q,0),K(r,l-q*s,0,l,u*s,l,u),r.lineTo(l,m-u),K(r,l,m-u*s,l-q*s,m,l-q,m),r.lineTo(q,m),K(r,q*s,m,0,m-u*s,0,m-u),r.lineTo(0,u),K(r,0,u*s,q*s,0,q,0),M(r),s=r.s,t.v(r));h.position=new w(n,p);h.nd=s}break;case "polygon":h=$q(g);break;case "polyline":h=$q(g)}if(null!==h){if(h instanceof W){l=Xq(a,g,"fill");null!==l&&-1!==l.indexOf("url")?(l=l.substring(l.indexOf("#")+
  1,l.length-1),l=a["_brush"+l],h.fill=l instanceof fa?l:"black"):h.fill=null===l?"black":"none"===l?null:l;l=Xq(a,g,"stroke");null!==l&&-1!==l.indexOf("url")?(l=l.substring(l.indexOf("#")+1,l.length-1),l=a["_brush"+l],h.stroke=l instanceof fa?l:"black"):h.stroke="none"===l?null:l;l=parseFloat(Xq(a,g,"stroke-width"));isNaN(l)||(h.fb=l);l=Xq(a,g,"stroke-linecap");null!==l&&(h.xG=l);if(l=Xq(a,g,"stroke-dasharray")){m=l.split(",");n=[];for(l=0;l<m.length;l++)p=parseFloat(m[l]),!isNaN(p)&&0<p&&n.push(p);
  h.Ax=n}if(g=Xq(a,g,"stroke-dashoffset"))g=parseFloat(g),isNaN(g)||(h.yG=g);h.sA=!0}if(null!==k){k=k.split(")");g=!0;for(l=0;l<k.length;l++)/\(.*[^0-9\.,\s-]/.test(k[l])&&(g=!1),/\(.*[0-9]-[0-9]/.test(k[l])&&(g=!1);if(g)for(l=k.length-1;0<=l;l--)if(m=k[l],""!==m)switch(n=m.indexOf("("),g=m.substring(0,n).replace(/\s*/,""),n=m.substring(n+1).split(/\s*[\s,]\s*/),g){case "rotate":ar(a,h,n);break;case "translate":g=h;m=parseFloat(n[0]);isNaN(m)&&(m=0);n=parseFloat(n[1]);isNaN(n)&&(n=0);if(0!==m||0!==
  n)p=g.position.copy(),isNaN(p.x)&&(p.x=0),isNaN(p.y)&&(p.y=0),g.position=new w(m+p.x,n+p.y);break;case "scale":br(a,h,n);break;case "skewX":cr(a,h,n);break;case "skewY":dr(a,h,n);break;case "matrix":er(a,h,n)}}if(h instanceof y){k=h.elements.k;l=g=0;m=h.position.copy();isNaN(m.x)&&(m.x=0);isNaN(m.y)&&(m.y=0);for(;k.next();)n=k.value.position.copy(),isNaN(n.x)&&(n.x=0),isNaN(n.y)&&(n.y=0),n.x<g&&(g=n.x),n.y<l&&(l=n.y);m.x+=g;m.y+=l;h.position=m}null===c?a.Vn.push(h):c.add(h)}}}if(null!==h){a=Zq(b,
  "visibility");if("hidden"===a||"collapse"===a)h.visible=!1;if(b=Zq(b,"opacity"))b=parseFloat(b),isNaN(b)||(h.opacity=b)}}}
  function er(a,b,c){var d=parseFloat(c[0]),f=parseFloat(c[1]),g=parseFloat(c[2]),h=parseFloat(c[3]),k=parseFloat(c[4]),l=parseFloat(c[5]);if(!isNaN(d+f+g+h+k+l)){var m=b.position.copy();isNaN(m.x)&&(m.x=0);isNaN(m.y)&&(m.y=0);if(b instanceof W){c=b.nd.copy();if(c.type===Ec)c=a.Ds(c);else if(c.type===Mc)c=fr(c);else if(c.type===Dc){c.type=Ac;a=new Bc(c.qa,c.ra);var n=new id(Oc,c.D,c.F);a.Fa.add(n);c.Ab.add(a)}c.offset(m.x,m.y);c.transform(d,f,g,h,k-m.x,l-m.y);a=c.normalize();b.nd=c;m.x-=a.x;m.y-=a.y;
  b.position=m}else{for(b=b.elements.k;b.next();)d=b.value.position.copy(),d.x+=m.x,d.y+=m.y,b.value.position=d;for(b.reset();b.next();)er(a,b.value,c);for(b.reset();b.next();)d=b.value.position.copy(),d.x-=m.x,d.y-=m.y,b.value.position=d}}}
  function ar(a,b,c){var d=parseFloat(c[0]);isNaN(d)&&(d=0);var f=parseFloat(c[1]);isNaN(f)&&(f=0);var g=parseFloat(c[2]);isNaN(g)&&(g=0);if(0!==d){var h=d*Math.PI/180,k=b.position.copy();isNaN(k.x)&&(k.x=0);isNaN(k.y)&&(k.y=0);if(b instanceof W){c=b.nd.copy();c.type===Mc?c=fr(c):c.type===Ec&&(c=a.Ds(c));if(c.type===Ac)c.rotate(d,f-k.x,g-k.y),g=c.normalize(),b.nd=c,k.x-=g.x,k.y-=g.y,b.position=k;else{var d=c.qa-f+k.x,l=c.ra-g+k.y,m=c.D-f+k.x,n=c.F-g+k.y;a=d*Math.cos(h)-l*Math.sin(h)+f-k.x;d=l*Math.cos(h)+
  d*Math.sin(h)+g-k.y;f=m*Math.cos(h)-n*Math.sin(h)+f-k.x;g=n*Math.cos(h)+m*Math.sin(h)+g-k.y;m=Math.min(a,f);n=Math.min(d,g);c.qa=a-m;c.ra=d-n;c.D=f-m;c.F=g-n;k.x+=m;k.y+=n;b.position=k;b.nd=c}b.fill instanceof fa&&(k=b.fill.copy(),c=Math.atan((0.5-k.start.y)/(0.5-k.start.x)),isNaN(c)||(c+=h,k.start=new I((1-Math.cos(c))/2,(1-Math.sin(c))/2),k.end=new I((1+Math.cos(c))/2,(1+Math.sin(c))/2)),b.fill=k);b.stroke instanceof fa&&(k=b.stroke.copy(),c=Math.atan((0.5-k.start.y)/(0.5-k.start.x)),isNaN(c)||
  (c+=h,k.start=new I((1-Math.cos(c))/2,(1-Math.sin(c))/2),k.end=new I((1+Math.cos(c))/2,(1+Math.sin(c))/2)),b.stroke=k)}else{for(b=b.elements.k;b.next();)h=b.value.position.copy(),h.x+=k.x,h.y+=k.y,b.value.position=h;for(b.reset();b.next();)ar(a,b.value,c);for(b.reset();b.next();)h=b.value.position.copy(),h.x-=k.x,h.y-=k.y,b.value.position=h}}}
  function br(a,b,c){var d=parseFloat(c[0]);isNaN(d)&&(d=1);var f=parseFloat(c[1]);isNaN(f)&&(f=d);if(1!==d||1!==f){var g=b.position.copy();isNaN(g.x)&&(g.x=0);isNaN(g.y)&&(g.y=0);if(b instanceof W)a=b.nd.copy(),g.x*=d,g.y*=f,b.position=g,a.scale(d,f),b.nd=a;else{for(b=b.elements.k;b.next();)d=b.value.position.copy(),d.x+=g.x,d.y+=g.y,b.value.position=d;for(b.reset();b.next();)br(a,b.value,c);for(b.reset();b.next();)d=b.value.position.copy(),d.x-=g.x,d.y-=g.y,b.value.position=d}}}
  function cr(a,b,c){var d=parseFloat(c[0]);if(!isNaN(d)){var d=d*Math.PI/180,f=b.position.copy();isNaN(f.x)&&(f.x=0);isNaN(f.y)&&(f.y=0);if(b instanceof W){c=b.nd.copy();if(c.type===Ec)c=a.Ds(c);else if(c.type===Mc)c=fr(c);else if(c.type===Dc){c.type=Ac;a=new Bc(c.qa,c.ra);var g=new id(Oc,c.D,c.F);a.Fa.add(g);c.Ab.add(a)}c.offset(f.x,f.y);c.transform(1,0,Math.tan(d),1,-f.x,-f.y);a=c.normalize();b.nd=c;f.x-=a.x;f.y-=a.y;b.position=f}else{for(b=b.elements.k;b.next();)d=b.value.position.copy(),d.x+=f.x,
  d.y+=f.y,b.value.position=d;for(b.reset();b.next();)cr(a,b.value,c);for(b.reset();b.next();)d=b.value.position.copy(),d.x-=f.x,d.y-=f.y,b.value.position=d}}}
  function dr(a,b,c){var d=parseFloat(c[0]);if(!isNaN(d)){var d=d*Math.PI/180,f=b.position.copy();isNaN(f.x)&&(f.x=0);isNaN(f.y)&&(f.y=0);if(b instanceof W){c=b.nd.copy();if(c.type===Ec)c=a.Ds(c);else if(c.type===Mc)c=fr(c);else if(c.type===Dc){c.type=Ac;a=new Bc(c.qa,c.ra);var g=new id(Oc,c.D,c.F);a.Fa.add(g);c.Ab.add(a)}c.offset(f.x,f.y);c.transform(1,Math.tan(d),0,1,-f.x,-f.y);a=c.normalize();b.nd=c;f.x-=a.x;f.y-=a.y;b.position=f}else{for(b=b.elements.k;b.next();)d=b.value.position.copy(),d.x+=f.x,
  d.y+=f.y,b.value.position=d;for(b.reset();b.next();)dr(a,b.value,c);for(b.reset();b.next();)d=b.value.position.copy(),d.x-=f.x,d.y-=f.y,b.value.position=d}}}
  function $q(a){var b=!1;if("polygon"===a.tagName)b=!0;else if("polyline"!==a.tagName)return null;var c=new W,d=a.getAttribute("points");a=new zc;var f=new B(Bc),g=d.split(/\s*[\s,]\s*/);if(4>g.length)return null;for(var h,d=new B(id),k,l,m=1;m<g.length;m+=2){k=eval(g[m-1]);l=eval(g[m]);if("number"!==typeof k||isNaN(k)||"number"!==typeof l||isNaN(l))return null;1===m?h=new Bc(k,l):d.add(new id(Oc,k,l))}b&&(b=new id(Oc,h.qa,h.ra),b.close(),d.add(b));h.Fa=d;f.add(h);a.Ab=f;h=a.normalize();c.position=
  new w(-h.x,-h.y);c.nd=a;return c}
  function fr(a){var b=a.qa,c=a.ra,d=a.D,f=a.F,g=Math.abs(d-b)/2,h=Math.abs(f-c)/2,b=Math.min(b,d)+g,c=Math.min(c,f)+h;new w;f=new Bc(b,c-h);d=new id(cd);d.Bb=b+H.va*g;d.Rb=c-h;d.re=b+g;d.se=c-H.va*h;d.D=b+g;d.F=c;f.Fa.add(d);d=new id(cd);d.Bb=b+g;d.Rb=c+H.va*h;d.re=b+H.va*g;d.se=c+h;d.D=b;d.F=c+h;f.Fa.add(d);d=new id(cd);d.Bb=b-H.va*g;d.Rb=c+h;d.re=b-g;d.se=c+H.va*h;d.D=b-g;d.F=c;f.Fa.add(d);d=new id(cd);d.Bb=b-g;d.Rb=c-H.va*h;d.re=b-H.va*g;d.se=c-h;d.D=b;d.F=c-h;f.Fa.add(d);a.type=Ac;a.Ab.add(f);
  return a}Wq.prototype.Ds=function(a){var b=a.qa,c=a.ra,d=a.D,f=a.F,g=Math.min(b,d),h=Math.min(c,f),b=Math.abs(d-b),c=Math.abs(f-c),f=new Bc(g,h);f.Fa.add(new id(Oc,g+b,h));f.Fa.add(new id(Oc,g+b,h+c));f.Fa.add((new id(Oc,g,h+c)).close());a.type=Ac;a.Ab.add(f);return a};ca.version="1.4.20";
  window&&(window.module&&"object"===typeof window.module&&"object"===typeof window.module.exports?window.module.exports=ca:window.define&&"function"===typeof window.define&&window.define.amd?(window.go=ca,window.define(ca)):window.go=ca); })(window);
  