diff --git a/apps/generator/models.py b/apps/generator/models.py index 87dc649..5a31fb2 100644 --- a/apps/generator/models.py +++ b/apps/generator/models.py @@ -136,7 +136,7 @@ class GeneratorConfiguration(Configuration): print(generator) json_trmode = json.dumps({"periode": generator.periode, "Delay": generator.delay, "width": generator.width, "enable": generator.selector}) print(json_trmode) - base64_trmode = base64.urlsafe_b64encode(json_trmode.encode('ascii')) + base64_trmode = base64.standard_b64encode(json_trmode.encode('ascii')) print(base64_trmode) trmode_url = self.device.url() + "trmode?params=" complete_url_trmode = trmode_url + base64_trmode.decode('ascii') diff --git a/apps/main/templates/experiment.html b/apps/main/templates/experiment.html index 1ae6ae2..cd72f83 100644 --- a/apps/main/templates/experiment.html +++ b/apps/main/templates/experiment.html @@ -21,10 +21,7 @@
  • ----------------
  • Start
  • Stop
  • -
  • Mix RC Configurations
  • Add Configuration
  • -
  • Summary
  • - {% endblock %} diff --git a/apps/main/templates/index.html b/apps/main/templates/index.html index d48965b..574e81f 100644 --- a/apps/main/templates/index.html +++ b/apps/main/templates/index.html @@ -18,4 +18,4 @@ meteorológicos que puedan cubrir estratégicamente todo el territorio nacional. De este modo, el IGP contribuye con ciencia para protegernos, con ciencia para avanzar.

    -{% endblock %} +{% endblock %} \ No newline at end of file diff --git a/apps/pedestal/models.py b/apps/pedestal/models.py index 1b72394..ce10968 100644 --- a/apps/pedestal/models.py +++ b/apps/pedestal/models.py @@ -152,7 +152,7 @@ class PedestalConfiguration(Configuration): byte_table.append(temp[1]) byte_table.append(temp[0]) print(byte_table) - coded_table = base64.urlsafe_b64encode(bytes(byte_table)) + coded_table = base64.standard_b64encode(bytes(byte_table)) coded_table_ascii = coded_table.decode('ascii') print(coded_table_ascii) data = {'axis': pedestal_axis, 'speed': pedestal.speed, 'table': coded_table_ascii} @@ -168,9 +168,9 @@ class PedestalConfiguration(Configuration): json_az = json.dumps({"axis": 'azimuth', "position": first_position}) json_el = json.dumps({"axis": 'elevation', "position": 0.0}) - base64_table = base64.urlsafe_b64encode(json_data.encode('ascii')) - base64_az = base64.urlsafe_b64encode(json_az.encode('ascii')) - base64_el = base64.urlsafe_b64encode(json_el.encode('ascii')) + base64_table = base64.standard_b64encode(json_data.encode('ascii')) + base64_az = base64.standard_b64encode(json_az.encode('ascii')) + base64_el = base64.standard_b64encode(json_el.encode('ascii')) table_url = self.device.url() + "table?params=" az_url = self.device.url() + "position?params=" diff --git a/static/js/go-debug.js b/static/js/go-debug.js new file mode 100644 index 0000000..e476c8f --- /dev/null +++ b/static/js/go-debug.js @@ -0,0 +1,2353 @@ +/* + * GoJS v2.1.53 JavaScript Library for HTML Diagrams, https://gojs.net + * GoJS and Northwoods Software are registered trademarks of Northwoods Software Corporation, https://www.nwoods.com. + * Copyright (C) 1998-2021 by Northwoods Software Corporation. All Rights Reserved. + * THIS SOFTWARE IS LICENSED. THE LICENSE AGREEMENT IS AT: https://gojs.net/2.1.53/license.html. + * DO NOT MODIFY THIS FILE. DO NOT DISTRIBUTE A MODIFIED COPY OF THE CONTENTS OF THIS FILE. + */ +(function() { var t;function aa(a){var b=0;return function(){return bc&&(c=Math.max(0,b+c));if(null==d||d>b)d=b;d=Number(d);0>d&&(d=Math.max(0,b+d));for(c=Number(c||0);c=a.length?a.push(c):a.splice(b,0,c):v("Cannot insert an object into an HTMLCollection or NodeList: "+c+" at "+b)}function La(a,b){Array.isArray(a)?b>=a.length?a.pop():a.splice(b,1):v("Cannot remove an object from an HTMLCollection or NodeList at "+b)}function Ma(){var a=Na.pop();return void 0===a?[]:a}function Oa(a){a.length=0;Na.push(a)} +function wa(a){return null===a?"*":"string"===typeof a?a:"function"===typeof a&&"string"===typeof a.className?a.className:""}function Pa(a){if("function"===typeof a){if(a.className)return a.className;if(a.name)return a.name;var b=a.toString();b=b.substring(9,b.indexOf("(")).trim();if(""!==b)return a._className=b}else if(Ga(a)&&a.constructor)return Pa(a.constructor);return typeof a} +function Qa(a){var b=a;Ga(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()}function Ra(a,b){if(a.hasOwnProperty(b))return!0;for(a=Object.getPrototypeOf(a);a&&a!==Function;){if(a.hasOwnProperty(b))return!0;var c=a.HB;if(c&&c[b])return!0;a=Object.getPrototypeOf(a)}return!1} +function Sa(a,b,c){Object.defineProperty(Ta.prototype,a,{get:b,set:c})} +function Va(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);c=[];for(var d=0,e=0;ec;c++)b[c]=c;for(c=d=0;256>c;c++)d=(d+b[c]+119)%256,e=b[c],b[c]=b[d],b[d]=e;d=c=0;for(var f="",g=0;gthis.key)return!1;Ca(a)}a=a.j;var b=a.length,c=++this.Xa,d=this.tf;if(null!==d)for(;cthis.key)return!1;Ca(a)}var b=--this.Xa;if(0<=b)return this.key=b,this.value=a.j[b],!0;this.Yd();return!1};nb.prototype.xd=function(){return this.next()}; +nb.prototype.first=function(){var a=this.zb;this.oa=a.v;var b=a.j;this.Xa=a=b.length-1;return 0<=a?(b=b[a],this.key=a,this.value=b):null};nb.prototype.any=function(a){var b=this.zb;b.sh=null;var c=b.v,d=b.j,e=d.length;this.Xa=e;for(--e;0<=e;e--){if(a(d[e]))return!0;b.v!==c&&Ca(b)}return!1};nb.prototype.all=function(a){var b=this.zb;b.sh=null;var c=b.v,d=b.j,e=d.length;this.Xa=e;for(--e;0<=e;e--){if(!a(d[e]))return!1;b.v!==c&&Ca(b)}return!0}; +nb.prototype.each=function(a){var b=this.zb;b.sh=null;var c=b.v,d=b.j,e=d.length;this.Xa=e;for(--e;0<=e;e--)a(d[e]),b.v!==c&&Ca(b);return this};nb.prototype.map=function(a){var b=this.zb;b.sh=null;var c=b.v,d=[],e=b.j,f=e.length;this.Xa=f;for(--f;0<=f;f--)d.push(a(e[f])),b.v!==c&&Ca(b);a=new H;a.j=d;a.ub();return a.iterator}; +nb.prototype.filter=function(a){var b=this.zb;b.sh=null;var c=b.v,d=[],e=b.j,f=e.length;this.Xa=f;for(--f;0<=f;f--){var g=e[f];a(g)&&d.push(g);b.v!==c&&Ca(b)}a=new H;a.j=d;a.ub();return a.iterator};nb.prototype.Yd=function(){this.key=-1;this.value=null;this.oa=-1;this.zb.sh=this};nb.prototype.toString=function(){return"ListIteratorBackwards("+this.Xa+"/"+this.zb.count+")"}; +na.Object.defineProperties(nb.prototype,{iterator:{configurable:!0,get:function(){return this}},count:{configurable:!0,get:function(){return this.zb.j.length}}});nb.prototype.first=nb.prototype.first;nb.prototype.hasNext=nb.prototype.xd;nb.prototype.next=nb.prototype.next;nb.prototype.reset=nb.prototype.reset;nb.className="ListIteratorBackwards"; +function H(a){eb(this);this.s=!1;this.j=[];this.v=0;this.sh=this.Ma=null;void 0!==a&&("function"===typeof a||"string"===typeof a?Fa():this.addAll(a))}t=H.prototype;t.ub=function(){var a=this.v;a++;999999999a||a>=b.length)&&za(a,"0 <= i < length",H,"elt:i");return b[a]};t.get=function(a){return this.M(a)};t.Vc=function(a,b){F&&C(a,H,"setElt:i");var c=this.j;(0>a||a>=c.length)&&za(a,"0 <= i < length",H,"setElt:i");this.s&&va(this,a);c[a]=b};t.set=function(a,b){this.Vc(a,b)};t.first=function(){var a=this.j;return 0===a.length?null:a[0]};t.cc=function(){var a=this.j,b=a.length;return 0a&&za(a,">= 0",H,"insertAt:i");this.s&&va(this,a);var c=this.j;a>=c.length?c.push(b):c.splice(a,0,b);this.ub()}; +t.remove=function(a){if(null===a)return!1;this.s&&va(this,a);var b=this.j;a=b.indexOf(a);if(-1===a)return!1;a===b.length-1?b.pop():b.splice(a,1);this.ub();return!0};t.delete=function(a){return this.remove(a)};t.jb=function(a){F&&C(a,H,"removeAt:i");var b=this.j;(0>a||a>=b.length)&&za(a,"0 <= i < length",H,"removeAt:i");this.s&&va(this,a);a===b.length-1?b.pop():b.splice(a,1);this.ub()}; +t.removeRange=function(a,b){F&&(C(a,H,"removeRange:from"),C(b,H,"removeRange:to"));var c=this.j,d=c.length;if(0>a)a=0;else if(a>=d)return this;if(0>b)return this;b>=d&&(b=d-1);if(a>b)return this;this.s&&va(this);for(var e=a,f=b+1;f=f)return this;(0>b||b>=e-1)&&za(b,"0 <= from < length",H,"sortRange:from");if(2===f)return c=d[b],e=d[b+1],0=e)d.sort(a);else for(b=d.slice(0,c),b.sort(a),a=0;a=e)for(c=d.slice(b),c.sort(a),a=b;a=this.j.length)return kb;var a=this.Ma;return null!==a?(a.reset(),a):new mb(this)}},iteratorBackwards:{configurable:!0, +enumerable:!0,get:function(){if(0>=this.j.length)return kb;var a=this.sh;return null!==a?(a.reset(),a):new nb(this)}}});H.prototype.reverse=H.prototype.reverse;H.prototype.sortRange=H.prototype.Gj;H.prototype.sort=H.prototype.sort;H.prototype.toSet=H.prototype.Zw;H.prototype.toArray=H.prototype.ta;H.prototype.removeRange=H.prototype.removeRange;H.prototype.removeAt=H.prototype.jb;H.prototype["delete"]=H.prototype.delete;H.prototype.remove=H.prototype.remove;H.prototype.insertAt=H.prototype.Bb; +H.prototype.pop=H.prototype.pop;H.prototype.last=H.prototype.cc;H.prototype.first=H.prototype.first;H.prototype.set=H.prototype.set;H.prototype.setElt=H.prototype.Vc;H.prototype.get=H.prototype.get;H.prototype.elt=H.prototype.M;H.prototype.indexOf=H.prototype.indexOf;H.prototype.has=H.prototype.has;H.prototype.contains=H.prototype.contains;H.prototype.clear=H.prototype.clear;H.prototype.addAll=H.prototype.addAll;H.prototype.push=H.prototype.push;H.prototype.add=H.prototype.add;H.prototype.thaw=H.prototype.ka; +H.prototype.freeze=H.prototype.freeze;H.className="List";function pb(a){this.Fg=a;a.Ma=null;this.oa=a.v;this.qa=null}pb.prototype.reset=function(){var a=this.Fg;a.Ma=null;this.oa=a.v;this.qa=null};pb.prototype.next=function(){var a=this.Fg;if(a.v!==this.oa){if(null===this.key)return!1;Ca(a)}var b=this.qa;b=null===b?a.ga:b.wa;if(null!==b)return this.qa=b,this.value=b.value,this.key=b.key,!0;this.Yd();return!1};pb.prototype.xd=function(){return this.next()}; +pb.prototype.first=function(){var a=this.Fg;this.oa=a.v;a=a.ga;if(null!==a){this.qa=a;var b=a.value;this.key=a.key;return this.value=b}return null};pb.prototype.any=function(a){var b=this.Fg;b.Ma=null;var c=b.v;this.qa=null;for(var d=b.ga;null!==d;){if(a(d.value))return!0;b.v!==c&&Ca(b);d=d.wa}return!1};pb.prototype.all=function(a){var b=this.Fg;b.Ma=null;var c=b.v;this.qa=null;for(var d=b.ga;null!==d;){if(!a(d.value))return!1;b.v!==c&&Ca(b);d=d.wa}return!0}; +pb.prototype.each=function(a){var b=this.Fg;b.Ma=null;var c=b.v;this.qa=null;for(var d=b.ga;null!==d;)a(d.value),b.v!==c&&Ca(b),d=d.wa;return this};pb.prototype.map=function(a){var b=this.Fg;b.Ma=null;for(var c=new H,d=b.v,e=b.ga;null!==e;)c.add(a(e.value)),b.v!==d&&Ca(b),e=e.wa;return c.iterator};pb.prototype.filter=function(a){var b=this.Fg;b.Ma=null;for(var c=new H,d=b.v,e=b.ga;null!==e;){var f=e.value;a(f)&&c.add(f);b.v!==d&&Ca(b);e=e.wa}return c.iterator}; +pb.prototype.Yd=function(){this.value=this.key=null;this.oa=-1;this.Fg.Ma=this};pb.prototype.toString=function(){return null!==this.qa?"SetIterator@"+this.qa.value:"SetIterator"};na.Object.defineProperties(pb.prototype,{iterator:{configurable:!0,get:function(){return this}},count:{configurable:!0,get:function(){return this.Fg.Lb}}});pb.prototype.first=pb.prototype.first;pb.prototype.hasNext=pb.prototype.xd;pb.prototype.next=pb.prototype.next;pb.prototype.reset=pb.prototype.reset; +pb.className="SetIterator";function I(a){eb(this);this.s=!1;this.Nb={};this.Lb=0;this.Ma=null;this.v=0;this.mf=this.ga=null;void 0!==a&&("function"===typeof a||"string"===typeof a?Fa():this.addAll(a))}t=I.prototype;t.ub=function(){var a=this.v;a++;999999999=this.Lb)return kb;var a=this.Ma;return null!==a?(a.reset(),a):new pb(this)}}});I.prototype.toList=I.prototype.Yw;I.prototype.toArray=I.prototype.ta;I.prototype.clear=I.prototype.clear;I.prototype.retainAll=I.prototype.rB;I.prototype.removeAll=I.prototype.mr; +I.prototype["delete"]=I.prototype.delete;I.prototype.remove=I.prototype.remove;I.prototype.first=I.prototype.first;I.prototype.containsAny=I.prototype.Wz;I.prototype.containsAll=I.prototype.Vz;I.prototype.has=I.prototype.has;I.prototype.contains=I.prototype.contains;I.prototype.addAll=I.prototype.addAll;I.prototype.add=I.prototype.add;I.prototype.thaw=I.prototype.ka;I.prototype.freeze=I.prototype.freeze;var wb=1;I.className="Set";I.uniqueHash=eb;I.hashIdUnique=rb;I.hashId=ob; +function xb(a){this.ma=a;this.oa=a.v;this.qa=null}xb.prototype.reset=function(){this.oa=this.ma.v;this.qa=null};xb.prototype.next=function(){var a=this.ma;if(a.v!==this.oa){if(null===this.key)return!1;Ca(a)}var b=this.qa;b=null===b?a.ga:b.wa;if(null!==b)return this.qa=b,this.value=this.key=a=b.key,!0;this.Yd();return!1};xb.prototype.xd=function(){return this.next()};xb.prototype.first=function(){var a=this.ma;this.oa=a.v;a=a.ga;return null!==a?(this.qa=a,this.value=this.key=a=a.key):null}; +xb.prototype.any=function(a){var b=this.ma,c=b.v;this.qa=null;for(var d=b.ga;null!==d;){if(a(d.key))return!0;b.v!==c&&Ca(b);d=d.wa}return!1};xb.prototype.all=function(a){var b=this.ma,c=b.v;this.qa=null;for(var d=b.ga;null!==d;){if(!a(d.key))return!1;b.v!==c&&Ca(b);d=d.wa}return!0};xb.prototype.each=function(a){var b=this.ma,c=b.v;this.qa=null;for(var d=b.ga;null!==d;)a(d.key),b.v!==c&&Ca(b),d=d.wa;return this}; +xb.prototype.map=function(a){var b=this.ma,c=b.v;this.qa=null;for(var d=new H,e=b.ga;null!==e;)d.add(a(e.key)),b.v!==c&&Ca(b),e=e.wa;return d.iterator};xb.prototype.filter=function(a){var b=this.ma,c=b.v;this.qa=null;for(var d=new H,e=b.ga;null!==e;){var f=e.key;a(f)&&d.add(f);b.v!==c&&Ca(b);e=e.wa}return d.iterator};xb.prototype.Yd=function(){this.value=this.key=null;this.oa=-1};xb.prototype.toString=function(){return null!==this.qa?"MapKeySetIterator@"+this.qa.value:"MapKeySetIterator"}; +na.Object.defineProperties(xb.prototype,{iterator:{configurable:!0,get:function(){return this}},count:{configurable:!0,get:function(){return this.ma.Lb}}});xb.prototype.first=xb.prototype.first;xb.prototype.hasNext=xb.prototype.xd;xb.prototype.next=xb.prototype.next;xb.prototype.reset=xb.prototype.reset;xb.className="MapKeySetIterator";function yb(a){I.call(this);eb(this);this.s=!0;this.ma=a}ma(yb,I);t=yb.prototype;t.freeze=function(){return this};t.ka=function(){return this}; +t.toString=function(){return"MapKeySet("+this.ma.toString()+")"};t.add=function(){v("This Set is read-only: "+this.toString());return this};t.contains=function(a){return this.ma.contains(a)};t.has=function(a){return this.contains(a)};t.remove=function(){v("This Set is read-only: "+this.toString());return!1};t.delete=function(a){return this.remove(a)};t.clear=function(){v("This Set is read-only: "+this.toString())};t.first=function(){var a=this.ma.ga;return null!==a?a.key:null}; +yb.prototype.any=function(a){for(var b=this.ma.ga;null!==b;){if(a(b.key))return!0;b=b.wa}return!1};yb.prototype.all=function(a){for(var b=this.ma.ga;null!==b;){if(!a(b.key))return!1;b=b.wa}return!0};yb.prototype.each=function(a){for(var b=this.ma.ga;null!==b;)a(b.key),b=b.wa;return this};yb.prototype.map=function(a){for(var b=new I,c=this.ma.ga;null!==c;)b.add(a(c.key)),c=c.wa;return b};yb.prototype.filter=function(a){for(var b=new I,c=this.ma.ga;null!==c;){var d=c.key;a(d)&&b.add(d);c=c.wa}return b}; +yb.prototype.copy=function(){return new yb(this.ma)};yb.prototype.Zw=function(){var a=new I,b=this.ma.Nb,c;for(c in b)a.add(b[c].key);return a};yb.prototype.ta=function(){var a=this.ma.Nb,b=Array(this.ma.Lb),c=0,d;for(d in a)b[c]=a[d].key,c++;return b};yb.prototype.Yw=function(){var a=new H,b=this.ma.Nb,c;for(c in b)a.add(b[c].key);return a}; +na.Object.defineProperties(yb.prototype,{count:{configurable:!0,get:function(){return this.ma.Lb}},size:{configurable:!0,get:function(){return this.ma.Lb}},iterator:{configurable:!0,get:function(){return 0>=this.ma.Lb?kb:new xb(this.ma)}}});yb.prototype.toList=yb.prototype.Yw;yb.prototype.toArray=yb.prototype.ta;yb.prototype.toSet=yb.prototype.Zw;yb.prototype.first=yb.prototype.first;yb.prototype.clear=yb.prototype.clear;yb.prototype["delete"]=yb.prototype.delete; +yb.prototype.remove=yb.prototype.remove;yb.prototype.has=yb.prototype.has;yb.prototype.contains=yb.prototype.contains;yb.prototype.add=yb.prototype.add;yb.prototype.thaw=yb.prototype.ka;yb.prototype.freeze=yb.prototype.freeze;yb.className="MapKeySet";function zb(a){this.ma=a;a.lf=null;this.oa=a.v;this.qa=null}zb.prototype.reset=function(){var a=this.ma;a.lf=null;this.oa=a.v;this.qa=null}; +zb.prototype.next=function(){var a=this.ma;if(a.v!==this.oa){if(null===this.key)return!1;Ca(a)}var b=this.qa;b=null===b?a.ga:b.wa;if(null!==b)return this.qa=b,this.value=b.value,this.key=b.key,!0;this.Yd();return!1};zb.prototype.xd=function(){return this.next()};zb.prototype.first=function(){var a=this.ma;this.oa=a.v;a=a.ga;if(null!==a){this.qa=a;var b=a.value;this.key=a.key;return this.value=b}return null}; +zb.prototype.any=function(a){var b=this.ma;b.lf=null;var c=b.v;this.qa=null;for(var d=b.ga;null!==d;){if(a(d.value))return!0;b.v!==c&&Ca(b);d=d.wa}return!1};zb.prototype.all=function(a){var b=this.ma;b.lf=null;var c=b.v;this.qa=null;for(var d=b.ga;null!==d;){if(!a(d.value))return!1;b.v!==c&&Ca(b);d=d.wa}return!0};zb.prototype.each=function(a){var b=this.ma;b.lf=null;var c=b.v;this.qa=null;for(var d=b.ga;null!==d;)a(d.value),b.v!==c&&Ca(b),d=d.wa;return this}; +zb.prototype.map=function(a){var b=this.ma;b.lf=null;var c=b.v;this.qa=null;for(var d=new H,e=b.ga;null!==e;)d.add(a(e.value)),b.v!==c&&Ca(b),e=e.wa;return d.iterator};zb.prototype.filter=function(a){var b=this.ma;b.lf=null;var c=b.v;this.qa=null;for(var d=new H,e=b.ga;null!==e;){var f=e.value;a(f)&&d.add(f);b.v!==c&&Ca(b);e=e.wa}return d.iterator};zb.prototype.Yd=function(){this.value=this.key=null;this.oa=-1;this.ma.lf=this}; +zb.prototype.toString=function(){return null!==this.qa?"MapValueSetIterator@"+this.qa.value:"MapValueSetIterator"};na.Object.defineProperties(zb.prototype,{iterator:{configurable:!0,get:function(){return this}},count:{configurable:!0,get:function(){return this.ma.Lb}}});zb.prototype.first=zb.prototype.first;zb.prototype.hasNext=zb.prototype.xd;zb.prototype.next=zb.prototype.next;zb.prototype.reset=zb.prototype.reset;zb.className="MapValueSetIterator"; +function sb(a,b){this.key=a;this.value=b;this.jm=this.wa=null}sb.prototype.toString=function(){return"{"+this.key+":"+this.value+"}"};sb.className="KeyValuePair";function Ab(a){this.ma=a;a.Ma=null;this.oa=a.v;this.qa=null}Ab.prototype.reset=function(){var a=this.ma;a.Ma=null;this.oa=a.v;this.qa=null}; +Ab.prototype.next=function(){var a=this.ma;if(a.v!==this.oa){if(null===this.key)return!1;Ca(a)}var b=this.qa;b=null===b?a.ga:b.wa;if(null!==b)return this.qa=b,this.key=b.key,this.value=b.value,!0;this.Yd();return!1};Ab.prototype.xd=function(){return this.next()};Ab.prototype.first=function(){var a=this.ma;this.oa=a.v;a=a.ga;return null!==a?(this.qa=a,this.key=a.key,this.value=a.value,a):null}; +Ab.prototype.any=function(a){var b=this.ma;b.Ma=null;var c=b.v;this.qa=null;for(var d=b.ga;null!==d;){if(a(d))return!0;b.v!==c&&Ca(b);d=d.wa}return!1};Ab.prototype.all=function(a){var b=this.ma;b.Ma=null;var c=b.v;this.qa=null;for(var d=b.ga;null!==d;){if(!a(d))return!1;b.v!==c&&Ca(b);d=d.wa}return!0};Ab.prototype.each=function(a){var b=this.ma;b.Ma=null;var c=b.v;this.qa=null;for(var d=b.ga;null!==d;)a(d),b.v!==c&&Ca(b),d=d.wa;return this}; +Ab.prototype.map=function(a){var b=this.ma;b.Ma=null;var c=b.v;this.qa=null;for(var d=new H,e=b.ga;null!==e;)d.add(a(e)),b.v!==c&&Ca(b),e=e.wa;return d.iterator};Ab.prototype.filter=function(a){var b=this.ma;b.Ma=null;var c=b.v;this.qa=null;for(var d=new H,e=b.ga;null!==e;)a(e)&&d.add(e),b.v!==c&&Ca(b),e=e.wa;return d.iterator};Ab.prototype.Yd=function(){this.value=this.key=null;this.oa=-1;this.ma.Ma=this};Ab.prototype.toString=function(){return null!==this.qa?"MapIterator@"+this.qa:"MapIterator"}; +na.Object.defineProperties(Ab.prototype,{iterator:{configurable:!0,get:function(){return this}},count:{configurable:!0,get:function(){return this.ma.Lb}}});Ab.prototype.first=Ab.prototype.first;Ab.prototype.hasNext=Ab.prototype.xd;Ab.prototype.next=Ab.prototype.next;Ab.prototype.reset=Ab.prototype.reset;Ab.className="MapIterator"; +function Bb(a){eb(this);this.s=!1;this.Nb={};this.Lb=0;this.lf=this.Ma=null;this.v=0;this.mf=this.ga=null;void 0!==a&&("function"===typeof a||"string"===typeof a?Fa():this.addAll(a))}t=Bb.prototype;t.ub=function(){var a=this.v;a++;999999999=this.count)return kb;var a=this.Ma;return null!==a?(a.reset(),a):new Ab(this)}},iteratorKeys:{configurable:!0,get:function(){return 0>=this.count?kb:new xb(this)}},iteratorValues:{configurable:!0,get:function(){if(0>=this.count)return kb; +var a=this.lf;return null!==a?(a.reset(),a):new zb(this)}}});Bb.prototype.toKeySet=Bb.prototype.Wf;Bb.prototype.toArray=Bb.prototype.ta;Bb.prototype.clear=Bb.prototype.clear;Bb.prototype["delete"]=Bb.prototype.delete;Bb.prototype.remove=Bb.prototype.remove;Bb.prototype.get=Bb.prototype.get;Bb.prototype.getValue=Bb.prototype.J;Bb.prototype.has=Bb.prototype.has;Bb.prototype.contains=Bb.prototype.contains;Bb.prototype.first=Bb.prototype.first;Bb.prototype.addAll=Bb.prototype.addAll; +Bb.prototype.set=Bb.prototype.set;Bb.prototype.add=Bb.prototype.add;Bb.prototype.thaw=Bb.prototype.ka;Bb.prototype.freeze=Bb.prototype.freeze;Bb.className="Map";function J(a,b){void 0===a?this.H=this.G=0:"number"===typeof a&&"number"===typeof b?(this.G=a,this.H=b):v("Invalid arguments to Point constructor: "+a+", "+b);this.s=!1}J.prototype.assign=function(a){this.G=a.G;this.H=a.H;return this};J.prototype.h=function(a,b){this.G=a;this.H=b;return this}; +J.prototype.Ug=function(a,b){F&&(A(a,"number",J,"setTo:x"),A(b,"number",J,"setTo:y"),this.ha());this.G=a;this.H=b;return this};J.prototype.set=function(a){F&&(w(a,J,J,"set:p"),this.ha());this.G=a.G;this.H=a.H;return this};J.prototype.copy=function(){var a=new J;a.G=this.G;a.H=this.H;return a};t=J.prototype;t.ia=function(){this.s=!0;Object.freeze(this);return this};t.K=function(){return this.s||Object.isFrozen(this)?this:this.copy().freeze()};t.freeze=function(){this.s=!0;return this}; +t.ka=function(){Object.isFrozen(this)&&v("cannot thaw constant: "+this);this.s=!1;return this};t.ha=function(a){if(F&&this.s){var b="The Point is frozen, so its properties cannot be set: "+this.toString();void 0!==a&&(b+=" to value: "+a);v(b)}};function Cb(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 e=0;""===a[b];)b++;(d=a[b++])&&(e=parseFloat(d));return new J(c,e)}return new J} +function Db(a){F&&w(a,J);return a.x.toString()+" "+a.y.toString()}t.toString=function(){return"Point("+this.x+","+this.y+")"};t.A=function(a){return a instanceof J?this.G===a.x&&this.H===a.y:!1};t.qj=function(a,b){return this.G===a&&this.H===b};t.Wa=function(a){return K.B(this.G,a.x)&&K.B(this.H,a.y)};t.add=function(a){F&&(w(a,J,J,"add:p"),this.ha());this.G+=a.x;this.H+=a.y;return this};t.oe=function(a){F&&(w(a,J,J,"subtract:p"),this.ha());this.G-=a.x;this.H-=a.y;return this}; +t.offset=function(a,b){F&&(C(a,J,"offset:dx"),C(b,J,"offset:dy"),this.ha());this.G+=a;this.H+=b;return this};J.prototype.rotate=function(a){F&&(C(a,J,"rotate:angle"),this.ha());if(0===a)return this;var b=this.G,c=this.H;if(0===b&&0===c)return this;360<=a?a-=360:0>a&&(a+=360);if(90===a){a=0;var d=1}else 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.G=a*b-d*c;this.H=d*b+a*c;return this};t=J.prototype; +t.scale=function(a,b){F&&(C(a,J,"scale:sx"),C(b,J,"scale:sy"),this.ha());this.G*=a;this.H*=b;return this};t.Ve=function(a){F&&w(a,J,J,"distanceSquaredPoint:p");var b=a.x-this.G;a=a.y-this.H;return b*b+a*a};t.wd=function(a,b){F&&(C(a,J,"distanceSquared:px"),C(b,J,"distanceSquared:py"));a-=this.G;b-=this.H;return a*a+b*b};t.normalize=function(){F&&this.ha();var a=this.G,b=this.H,c=Math.sqrt(a*a+b*b);0b?270:0;if(0===b)return 0a?c=0>b?c+180:180-c:0>b&&(c=360-c);return c} +t.hB=function(a,b,c,d){F&&(C(a,J,"projectOntoLineSegment:px"),C(b,J,"projectOntoLineSegment:py"),C(c,J,"projectOntoLineSegment:qx"),C(d,J,"projectOntoLineSegment:qy"));K.ai(a,b,c,d,this.G,this.H,this);return this};t.iB=function(a,b){F&&(w(a,J,J,"projectOntoLineSegmentPoint:p"),w(b,J,J,"projectOntoLineSegmentPoint:q"));K.ai(a.x,a.y,b.x,b.y,this.G,this.H,this);return this}; +t.wB=function(a,b,c,d){F&&(C(a,J,"snapToGrid:originx"),C(b,J,"snapToGrid:originy"),C(c,J,"snapToGrid:cellwidth"),C(d,J,"snapToGrid:cellheight"));K.Tq(this.G,this.H,a,b,c,d,this);return this};t.xB=function(a,b){F&&(w(a,J,J,"snapToGridPoint:p"),w(b,Fb,J,"snapToGridPoint:q"));K.Tq(this.G,this.H,a.x,a.y,b.width,b.height,this);return this};t.Fj=function(a,b){F&&(w(a,L,J,"setRectSpot:r"),w(b,N,J,"setRectSpot:spot"),this.ha());this.G=a.x+b.x*a.width+b.offsetX;this.H=a.y+b.y*a.height+b.offsetY;return this}; +t.el=function(a,b,c,d,e){F&&(C(a,J,"setSpot:x"),C(b,J,"setSpot:y"),C(c,J,"setSpot:w"),C(d,J,"setSpot:h"),(0>c||0>d)&&v("Point.setSpot:Width and height cannot be negative"),w(e,N,J,"setSpot:spot"),this.ha());this.G=a+e.x*c+e.offsetX;this.H=b+e.y*d+e.offsetY;return this};t.transform=function(a){F&&w(a,Gb,J,"transform:t");a.Aa(this);return this};function Hb(a,b){F&&w(b,Gb,J,"transformInverted:t");b.Pd(a);return a} +function Ib(a,b,c,d,e,f){F&&(C(a,J,"distanceLineSegmentSquared:px"),C(b,J,"distanceLineSegmentSquared:py"),C(c,J,"distanceLineSegmentSquared:ax"),C(d,J,"distanceLineSegmentSquared:ay"),C(e,J,"distanceLineSegmentSquared:bx"),C(f,J,"distanceLineSegmentSquared:by"));var g=e-c,h=f-d,k=g*g+h*h;c-=a;d-=b;var l=-c*g-d*h;if(0>=l||l>=k)return g=e-a,h=f-b,Math.min(c*c+d*d,g*g+h*h);a=g*d-h*c;return a*a/k} +function Jb(a,b,c,d){F&&(C(a,J,"distanceSquared:px"),C(b,J,"distanceSquared:py"),C(c,J,"distanceSquared:qx"),C(d,J,"distanceSquared:qy"));a=c-a;b=d-b;return a*a+b*b}function Kb(a,b,c,d){F&&(C(a,J,"direction:px"),C(b,J,"direction:py"),C(c,J,"direction:qx"),C(d,J,"direction:qy"));a=c-a;b=d-b;if(0===a)return 0b?270:0;if(0===b)return 0a?d=0>b?d+180:180-d:0>b&&(d=360-d);return d} +t.o=function(){return isFinite(this.x)&&isFinite(this.y)};J.alloc=function(){var a=Lb.pop();return void 0===a?new J:a};J.allocAt=function(a,b){var c=Lb.pop();if(void 0===c)return new J(a,b);c.x=a;c.y=b;return c};J.free=function(a){Lb.push(a)}; +na.Object.defineProperties(J.prototype,{x:{configurable:!0,get:function(){return this.G},set:function(a){F&&(A(a,"number",J,"x"),this.ha(a));this.G=a}},y:{configurable:!0,get:function(){return this.H},set:function(a){F&&(A(a,"number",J,"y"),this.ha(a));this.H=a}}});J.prototype.isReal=J.prototype.o;J.prototype.setSpot=J.prototype.el;J.prototype.setRectSpot=J.prototype.Fj;J.prototype.snapToGridPoint=J.prototype.xB;J.prototype.snapToGrid=J.prototype.wB; +J.prototype.projectOntoLineSegmentPoint=J.prototype.iB;J.prototype.projectOntoLineSegment=J.prototype.hB;J.intersectingLineSegments=function(a,b,c,d,e,f,g,h){F&&(C(a,L,"intersectingLineSegments:a1x"),C(b,L,"intersectingLineSegments:a1y"),C(c,L,"intersectingLineSegments:a2x"),C(d,L,"intersectingLineSegments:a2y"),C(e,L,"intersectingLineSegments:b1x"),C(f,L,"intersectingLineSegments:b1y"),C(g,L,"intersectingLineSegments:b2x"),C(h,L,"intersectingLineSegments:b2y"));return K.Qm(a,b,c,d,e,f,g,h)}; +J.prototype.direction=J.prototype.direction;J.prototype.directionPoint=J.prototype.Va;J.prototype.normalize=J.prototype.normalize;J.prototype.distanceSquared=J.prototype.wd;J.prototype.distanceSquaredPoint=J.prototype.Ve;J.prototype.scale=J.prototype.scale;J.prototype.rotate=J.prototype.rotate;J.prototype.offset=J.prototype.offset;J.prototype.subtract=J.prototype.oe;J.prototype.add=J.prototype.add;J.prototype.equalsApprox=J.prototype.Wa;J.prototype.equalTo=J.prototype.qj;J.prototype.equals=J.prototype.A; +J.prototype.set=J.prototype.set;J.prototype.setTo=J.prototype.Ug;var Mb=null,Nb=null,Ob=null,Pb=null,Qb=null,Lb=[];J.className="Point";J.parse=Cb;J.stringify=Db;J.distanceLineSegmentSquared=Ib;J.distanceSquared=Jb;J.direction=Kb;J.Origin=Mb=(new J(0,0)).ia();J.InfiniteTopLeft=Nb=(new J(-Infinity,-Infinity)).ia();J.InfiniteBottomRight=Ob=(new J(Infinity,Infinity)).ia();J.SixPoint=Pb=(new J(6,6)).ia();J.NoPoint=Qb=(new J(NaN,NaN)).ia();J.parse=Cb;J.stringify=Db;J.distanceLineSegmentSquared=Ib; +J.distanceSquared=Jb;J.direction=Kb;function Fb(a,b){void 0===a?this.ea=this.fa=0:"number"===typeof a&&(0<=a||isNaN(a))&&"number"===typeof b&&(0<=b||isNaN(b))?(this.fa=a,this.ea=b):v("Invalid arguments to Size constructor: "+a+", "+b);this.s=!1}var Rb,Sb,Tb,Ub,Vb,Wb,Zb;Fb.prototype.assign=function(a){this.fa=a.fa;this.ea=a.ea;return this};Fb.prototype.h=function(a,b){this.fa=a;this.ea=b;return this}; +Fb.prototype.Ug=function(a,b){F&&(A(a,"number",Fb,"setTo:w"),A(b,"number",Fb,"setTo:h"),0>a&&za(a,">= 0",Fb,"setTo:w"),0>b&&za(b,">= 0",Fb,"setTo:h"),this.ha());this.fa=a;this.ea=b;return this};Fb.prototype.set=function(a){F&&(w(a,Fb,Fb,"set:s"),this.ha());this.fa=a.fa;this.ea=a.ea;return this};Fb.prototype.copy=function(){var a=new Fb;a.fa=this.fa;a.ea=this.ea;return a};t=Fb.prototype;t.ia=function(){this.s=!0;Object.freeze(this);return this}; +t.K=function(){return this.s||Object.isFrozen(this)?this:this.copy().freeze()};t.freeze=function(){this.s=!0;return this};t.ka=function(){Object.isFrozen(this)&&v("cannot thaw constant: "+this);this.s=!1;return this};t.ha=function(a){if(F&&this.s){var b="The Size is frozen, so its properties cannot be set: "+this.toString();void 0!==a&&(b+=" to value: "+a);v(b)}}; +function $b(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 e=0;""===a[b];)b++;(d=a[b++])&&(e=parseFloat(d));return new Fb(c,e)}return new Fb}function ac(a){F&&w(a,Fb);return a.width.toString()+" "+a.height.toString()}t.toString=function(){return"Size("+this.width+","+this.height+")"};t.A=function(a){return a instanceof Fb?this.fa===a.width&&this.ea===a.height:!1};t.qj=function(a,b){return this.fa===a&&this.ea===b}; +t.Wa=function(a){return K.B(this.fa,a.width)&&K.B(this.ea,a.height)};t.o=function(){return isFinite(this.width)&&isFinite(this.height)};Fb.alloc=function(){var a=bc.pop();return void 0===a?new Fb:a};Fb.free=function(a){bc.push(a)}; +na.Object.defineProperties(Fb.prototype,{width:{configurable:!0,get:function(){return this.fa},set:function(a){F&&(A(a,"number",Fb,"width"),this.ha(a));0>a&&za(a,">= 0",Fb,"width");this.fa=a}},height:{configurable:!0,get:function(){return this.ea},set:function(a){F&&(A(a,"number",Fb,"height"),this.ha(a));0>a&&za(a,">= 0",Fb,"height");this.ea=a}}});Fb.prototype.isReal=Fb.prototype.o;Fb.prototype.equalsApprox=Fb.prototype.Wa;Fb.prototype.equalTo=Fb.prototype.qj; +Fb.prototype.equals=Fb.prototype.A;Fb.prototype.set=Fb.prototype.set;Fb.prototype.setTo=Fb.prototype.Ug;var bc=[];Fb.className="Size";Fb.parse=$b;Fb.stringify=ac;Fb.ZeroSize=Rb=(new Fb(0,0)).ia();Fb.OneSize=Sb=(new Fb(1,1)).ia();Fb.SixSize=Tb=(new Fb(6,6)).ia();Fb.EightSize=Ub=(new Fb(8,8)).ia();Fb.TenSize=Vb=(new Fb(10,10)).ia();Fb.InfiniteSize=Wb=(new Fb(Infinity,Infinity)).ia();Fb.NoSize=Zb=(new Fb(NaN,NaN)).ia();Fb.parse=$b;Fb.stringify=ac; +function L(a,b,c,d){void 0===a?this.ea=this.fa=this.H=this.G=0:a instanceof J?(c=a.x,a=a.y,b instanceof J?(d=b.x,b=b.y,this.G=Math.min(c,d),this.H=Math.min(a,b),this.fa=Math.abs(c-d),this.ea=Math.abs(a-b)):b instanceof Fb?(this.G=c,this.H=a,this.fa=b.width,this.ea=b.height):v("Incorrect arguments supplied to Rect constructor")):"number"===typeof a&&"number"===typeof b&&"number"===typeof c&&(0<=c||isNaN(c))&&"number"===typeof d&&(0<=d||isNaN(d))?(this.G=a,this.H=b,this.fa=c,this.ea=d):v("Invalid arguments to Rect constructor: "+ +a+", "+b+", "+c+", "+d);this.s=!1}t=L.prototype;t.assign=function(a){this.G=a.G;this.H=a.H;this.fa=a.fa;this.ea=a.ea;return this};t.h=function(a,b,c,d){this.G=a;this.H=b;this.fa=c;this.ea=d;return this};function cc(a,b,c){a.fa=b;a.ea=c}t.Ug=function(a,b,c,d){F&&(A(a,"number",L,"setTo:x"),A(b,"number",L,"setTo:y"),A(c,"number",L,"setTo:w"),A(d,"number",L,"setTo:h"),0>c&&za(c,">= 0",L,"setTo:w"),0>d&&za(d,">= 0",L,"setTo:h"),this.ha());this.G=a;this.H=b;this.fa=c;this.ea=d;return this}; +t.set=function(a){F&&(w(a,L,L,"set:r"),this.ha());this.G=a.G;this.H=a.H;this.fa=a.fa;this.ea=a.ea;return this};t.Wc=function(a){F&&(w(a,J,L,"setPoint:p"),this.ha());this.G=a.x;this.H=a.y;return this};t.vB=function(a){F&&(w(a,Fb,L,"setSize:s"),this.ha());this.fa=a.width;this.ea=a.height;return this};L.prototype.copy=function(){var a=new L;a.G=this.G;a.H=this.H;a.fa=this.fa;a.ea=this.ea;return a};t=L.prototype;t.ia=function(){this.s=!0;Object.freeze(this);return this}; +t.K=function(){return this.s||Object.isFrozen(this)?this:this.copy().freeze()};t.freeze=function(){this.s=!0;return this};t.ka=function(){Object.isFrozen(this)&&v("cannot thaw constant: "+this);this.s=!1;return this};t.ha=function(a){if(F&&this.s){var b="The Rect is frozen, so its properties cannot be set: "+this.toString();void 0!==a&&(b+=" to value: "+a);v(b)}}; +function dc(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 e=0;""===a[b];)b++;(d=a[b++])&&(e=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));return new L(c,e,f,g)}return new L}function ec(a){F&&w(a,L);return a.x.toString()+" "+a.y.toString()+" "+a.width.toString()+" "+a.height.toString()} +t.toString=function(){return"Rect("+this.x+","+this.y+","+this.width+","+this.height+")"};t.A=function(a){return a instanceof L?this.G===a.x&&this.H===a.y&&this.fa===a.width&&this.ea===a.height:!1};t.qj=function(a,b,c,d){return this.G===a&&this.H===b&&this.fa===c&&this.ea===d};t.Wa=function(a){return K.B(this.G,a.x)&&K.B(this.H,a.y)&&K.B(this.fa,a.width)&&K.B(this.ea,a.height)};function fc(a,b){return K.da(a.G,b.x)&&K.da(a.H,b.y)&&K.da(a.fa,b.width)&&K.da(a.ea,b.height)} +t.ca=function(a){F&&w(a,J,L,"containsPoint:p");return this.G<=a.x&&this.G+this.fa>=a.x&&this.H<=a.y&&this.H+this.ea>=a.y};t.Te=function(a){F&&w(a,L,L,"containsRect:r");return this.G<=a.x&&a.x+a.width<=this.G+this.fa&&this.H<=a.y&&a.y+a.height<=this.H+this.ea}; +t.contains=function(a,b,c,d){F?(C(a,L,"contains:x"),C(b,L,"contains:y"),void 0===c?c=0:C(c,L,"contains:w"),void 0===d?d=0:C(d,L,"contains:h"),(0>c||0>d)&&v("Rect.contains:Width and height cannot be negative")):(void 0===c&&(c=0),void 0===d&&(d=0));return this.G<=a&&a+c<=this.G+this.fa&&this.H<=b&&b+d<=this.H+this.ea};t.offset=function(a,b){F&&(C(a,L,"offset:dx"),C(b,L,"offset:dy"),this.ha());this.G+=a;this.H+=b;return this}; +t.Pc=function(a,b){F&&(C(a,L,"inflate:w"),C(b,L,"inflate:h"));return gc(this,b,a,b,a)};t.Hq=function(a){F&&w(a,hc,L,"addMargin:m");return gc(this,a.top,a.right,a.bottom,a.left)};t.Xw=function(a){F&&w(a,hc,L,"subtractMargin:m");return gc(this,-a.top,-a.right,-a.bottom,-a.left)};t.MA=function(a,b,c,d){F&&(C(a,L,"grow:t"),C(b,L,"grow:r"),C(c,L,"grow:b"),C(d,L,"grow:l"));return gc(this,a,b,c,d)}; +function gc(a,b,c,d,e){F&&a.ha();var f=a.fa;c+e<=-f?(a.G+=f/2,a.fa=0):(a.G-=e,a.fa+=c+e);c=a.ea;b+d<=-c?(a.H+=c/2,a.ea=0):(a.H-=b,a.ea+=b+d);return a}t.Ty=function(a){F&&w(a,L,L,"intersectRect:r");return ic(this,a.x,a.y,a.width,a.height)};t.qw=function(a,b,c,d){F&&(C(a,L,"intersect:x"),C(b,L,"intersect:y"),C(c,L,"intersect:w"),C(d,L,"intersect:h"),(0>c||0>d)&&v("Rect.intersect:Width and height cannot be negative"));return ic(this,a,b,c,d)}; +function ic(a,b,c,d,e){F&&a.ha();var f=Math.max(a.G,b),g=Math.max(a.H,c);b=Math.min(a.G+a.fa,b+d);c=Math.min(a.H+a.ea,c+e);a.G=f;a.H=g;a.fa=Math.max(0,b-f);a.ea=Math.max(0,c-g);return a}t.Sc=function(a){F&&w(a,L,L,"intersectsRect:r");return this.rw(a.x,a.y,a.width,a.height)}; +t.rw=function(a,b,c,d){F&&(C(a,L,"intersects:x"),C(b,L,"intersects:y"),C(a,L,"intersects:w"),C(b,L,"intersects:h"),(0>c||0>d)&&v("Rect.intersects:Width and height cannot be negative"));var e=this.fa,f=this.G;if(Infinity!==e&&Infinity!==c&&(e+=f,c+=a,isNaN(c)||isNaN(e)||f>c||a>e))return!1;a=this.ea;c=this.H;return Infinity!==a&&Infinity!==d&&(a+=c,d+=b,isNaN(d)||isNaN(a)||c>d||b>a)?!1:!0}; +function jc(a,b){var c=a.fa,d=a.G,e=b.x-10;if(d>b.width+10+10+e||e>c+d)return!1;c=a.ea;a=a.H;d=b.y-10;return a>b.height+10+10+d||d>c+a?!1:!0}t.af=function(a){F&&w(a,J,L,"unionPoint:p");return kc(this,a.x,a.y,0,0)};t.Xc=function(a){F&&w(a,L,L,"unionRect:r");return kc(this,a.G,a.H,a.fa,a.ea)}; +t.hx=function(a,b,c,d){F?(C(a,L,"union:x"),C(b,L,"union:y"),void 0===c?c=0:C(c,L,"union:w"),void 0===d?d=0:C(d,L,"union:h"),(0>c||0>d)&&v("Rect.union:Width and height cannot be negative"),this.ha()):(void 0===c&&(c=0),void 0===d&&(d=0));return kc(this,a,b,c,d)};function kc(a,b,c,d,e){var f=Math.min(a.G,b),g=Math.min(a.H,c);b=Math.max(a.G+a.fa,b+d);c=Math.max(a.H+a.ea,c+e);a.G=f;a.H=g;a.fa=b-f;a.ea=c-g;return a} +t.el=function(a,b,c){F&&(C(a,L,"setSpot:x"),C(b,L,"setSpot:y"),w(c,N,L,"setSpot:spot"),this.ha());this.G=a-c.offsetX-c.x*this.fa;this.H=b-c.offsetY-c.y*this.ea;return this}; +function lc(a,b,c,d,e,f,g,h){F?(C(a,L,"contains:rx"),C(b,L,"contains:ry"),C(c,L,"contains:rw"),C(d,L,"contains:rh"),C(e,L,"contains:x"),C(f,L,"contains:y"),void 0===g?g=0:C(g,L,"contains:w"),void 0===h?h=0:C(h,L,"contains:h"),(0>c||0>d||0>g||0>h)&&v("Rect.contains:Width and height cannot be negative")):(void 0===g&&(g=0),void 0===h&&(h=0));return a<=e&&e+g<=a+c&&b<=f&&f+h<=b+d} +function pc(a,b,c,d,e,f,g,h){F&&(C(a,L,"intersects:rx"),C(b,L,"intersects:ry"),C(c,L,"intersects:rw"),C(d,L,"intersects:rh"),C(e,L,"intersects:x"),C(f,L,"intersects:y"),C(g,L,"intersects:w"),C(h,L,"intersects:h"),(0>c||0>d||0>g||0>h)&&v("Rect.intersects:Width and height cannot be negative"));return a>g+e||e>c+a?!1:b>h+f||f>d+b?!1:!0}t.o=function(){return isFinite(this.x)&&isFinite(this.y)&&isFinite(this.width)&&isFinite(this.height)};t.SA=function(){return 0===this.width&&0===this.height}; +L.alloc=function(){var a=qc.pop();return void 0===a?new L:a};L.allocAt=function(a,b,c,d){var e=qc.pop();return void 0===e?new L(a,b,c,d):e.h(a,b,c,d)};L.free=function(a){qc.push(a)}; +na.Object.defineProperties(L.prototype,{x:{configurable:!0,get:function(){return this.G},set:function(a){F&&(A(a,"number",L,"x"),this.ha(a));this.G=a}},y:{configurable:!0,get:function(){return this.H},set:function(a){F&&(A(a,"number",L,"y"),this.ha(a));this.H=a}},width:{configurable:!0,get:function(){return this.fa},set:function(a){F&&(A(a,"number",L,"width"),this.ha(a));0>a&&za(a,">= 0",L,"width");this.fa=a}},height:{configurable:!0,get:function(){return this.ea}, +set:function(a){F&&(A(a,"number",L,"height"),this.ha(a));0>a&&za(a,">= 0",L,"height");this.ea=a}},left:{configurable:!0,get:function(){return this.G},set:function(a){F&&(A(a,"number",L,"left"),this.ha(a));this.G=a}},top:{configurable:!0,get:function(){return this.H},set:function(a){F&&(A(a,"number",L,"top"),this.ha(a));this.H=a}},right:{configurable:!0,get:function(){return this.G+this.fa},set:function(a){F&&(C(a,L,"right"),this.ha(a));this.G+=a-(this.G+this.fa)}}, +bottom:{configurable:!0,get:function(){return this.H+this.ea},set:function(a){F&&(C(a,L,"top"),this.ha(a));this.H+=a-(this.H+this.ea)}},position:{configurable:!0,get:function(){return new J(this.G,this.H)},set:function(a){F&&(w(a,J,L,"position"),this.ha(a));this.G=a.x;this.H=a.y}},size:{configurable:!0,get:function(){return new Fb(this.fa,this.ea)},set:function(a){F&&(w(a,Fb,L,"size"),this.ha(a));this.fa=a.width;this.ea=a.height}},center:{configurable:!0, +enumerable:!0,get:function(){return new J(this.G+this.fa/2,this.H+this.ea/2)},set:function(a){F&&(w(a,J,L,"center"),this.ha(a));this.G=a.x-this.fa/2;this.H=a.y-this.ea/2}},centerX:{configurable:!0,get:function(){return this.G+this.fa/2},set:function(a){F&&(C(a,L,"centerX"),this.ha(a));this.G=a-this.fa/2}},centerY:{configurable:!0,get:function(){return this.H+this.ea/2},set:function(a){F&&(C(a,L,"centerY"),this.ha(a));this.H=a-this.ea/2}}});L.prototype.isEmpty=L.prototype.SA; +L.prototype.isReal=L.prototype.o;L.intersectsLineSegment=function(a,b,c,d,e,f,g,h){F&&(C(a,L,"intersectsLineSegment:x"),C(b,L,"intersectsLineSegment:y"),C(c,L,"intersectsLineSegment:w"),C(d,L,"intersectsLineSegment:h"),C(e,L,"intersectsLineSegment:p1x"),C(f,L,"intersectsLineSegment:p1y"),C(g,L,"intersectsLineSegment:p2x"),C(h,L,"intersectsLineSegment:p2y"),(0>c||0>d)&&v("Rect.intersectsLineSegment: width and height cannot be negative"));return K.Uy(a,b,c,d,e,f,g,h)};L.prototype.setSpot=L.prototype.el; +L.prototype.union=L.prototype.hx;L.prototype.unionRect=L.prototype.Xc;L.prototype.unionPoint=L.prototype.af;L.prototype.intersects=L.prototype.rw;L.prototype.intersectsRect=L.prototype.Sc;L.prototype.intersect=L.prototype.qw;L.prototype.intersectRect=L.prototype.Ty;L.prototype.grow=L.prototype.MA;L.prototype.subtractMargin=L.prototype.Xw;L.prototype.addMargin=L.prototype.Hq;L.prototype.inflate=L.prototype.Pc;L.prototype.offset=L.prototype.offset;L.prototype.contains=L.prototype.contains; +L.prototype.containsRect=L.prototype.Te;L.prototype.containsPoint=L.prototype.ca;L.prototype.equalsApprox=L.prototype.Wa;L.prototype.equalTo=L.prototype.qj;L.prototype.equals=L.prototype.A;L.prototype.setSize=L.prototype.vB;L.prototype.setPoint=L.prototype.Wc;L.prototype.set=L.prototype.set;L.prototype.setTo=L.prototype.Ug;var rc=null,vc=null,qc=[];L.className="Rect";L.parse=dc;L.stringify=ec;L.contains=lc;L.intersects=pc;L.ZeroRect=rc=(new L(0,0,0,0)).ia();L.NoRect=vc=(new L(NaN,NaN,NaN,NaN)).ia(); +L.parse=dc;L.stringify=ec;L.contains=lc;L.intersects=pc;function hc(a,b,c,d){void 0===a?this.Fe=this.se=this.Oe=this.Qe=0:void 0===b?this.left=this.bottom=this.right=this.top=a:void 0===c?(this.top=a,this.right=b,this.bottom=a,this.left=b):void 0!==d?(this.top=a,this.right=b,this.bottom=c,this.left=d):v("Invalid arguments to Margin constructor: "+a+", "+b+", "+c+", "+d);this.s=!1}hc.prototype.assign=function(a){this.Qe=a.Qe;this.Oe=a.Oe;this.se=a.se;this.Fe=a.Fe;return this}; +hc.prototype.Ug=function(a,b,c,d){F&&(A(a,"number",hc,"setTo:t"),A(b,"number",hc,"setTo:r"),A(c,"number",hc,"setTo:b"),A(d,"number",hc,"setTo:l"),this.ha());this.Qe=a;this.Oe=b;this.se=c;this.Fe=d;return this};hc.prototype.set=function(a){F&&(w(a,hc,hc,"assign:m"),this.ha());this.Qe=a.Qe;this.Oe=a.Oe;this.se=a.se;this.Fe=a.Fe;return this};hc.prototype.copy=function(){var a=new hc;a.Qe=this.Qe;a.Oe=this.Oe;a.se=this.se;a.Fe=this.Fe;return a};t=hc.prototype; +t.ia=function(){this.s=!0;Object.freeze(this);return this};t.K=function(){return this.s||Object.isFrozen(this)?this:this.copy().freeze()};t.freeze=function(){this.s=!0;return this};t.ka=function(){Object.isFrozen(this)&&v("cannot thaw constant: "+this);this.s=!1;return this};t.ha=function(a){if(F&&this.s){var b="The Margin is frozen, so its properties cannot be set: "+this.toString();void 0!==a&&(b+=" to value: "+a);v(b)}}; +function wc(a){if("string"===typeof a){a=a.split(" ");for(var b=0,c=NaN;""===a[b];)b++;var d=a[b++];d&&(c=parseFloat(d));if(isNaN(c))return new hc;for(var e=NaN;""===a[b];)b++;(d=a[b++])&&(e=parseFloat(d));if(isNaN(e))return new hc(c);for(var f=NaN;""===a[b];)b++;(d=a[b++])&&(f=parseFloat(d));if(isNaN(f))return new hc(c,e);for(var g=NaN;""===a[b];)b++;(d=a[b++])&&(g=parseFloat(d));return isNaN(g)?new hc(c,e):new hc(c,e,f,g)}return new hc} +function xc(a){F&&w(a,hc);return a.top.toString()+" "+a.right.toString()+" "+a.bottom.toString()+" "+a.left.toString()}t.toString=function(){return"Margin("+this.top+","+this.right+","+this.bottom+","+this.left+")"};t.A=function(a){return a instanceof hc?this.Qe===a.top&&this.Oe===a.right&&this.se===a.bottom&&this.Fe===a.left:!1};t.qj=function(a,b,c,d){return this.Qe===a&&this.Oe===b&&this.se===c&&this.Fe===d}; +t.Wa=function(a){return K.B(this.Qe,a.top)&&K.B(this.Oe,a.right)&&K.B(this.se,a.bottom)&&K.B(this.Fe,a.left)};t.o=function(){return isFinite(this.top)&&isFinite(this.right)&&isFinite(this.bottom)&&isFinite(this.left)};hc.alloc=function(){var a=yc.pop();return void 0===a?new hc:a};hc.free=function(a){yc.push(a)}; +na.Object.defineProperties(hc.prototype,{top:{configurable:!0,get:function(){return this.Qe},set:function(a){F&&(C(a,hc,"top"),this.ha(a));this.Qe=a}},right:{configurable:!0,get:function(){return this.Oe},set:function(a){F&&(C(a,hc,"right"),this.ha(a));this.Oe=a}},bottom:{configurable:!0,get:function(){return this.se},set:function(a){F&&(C(a,hc,"bottom"),this.ha(a));this.se=a}},left:{configurable:!0,get:function(){return this.Fe},set:function(a){F&& +(C(a,hc,"left"),this.ha(a));this.Fe=a}}});hc.prototype.isReal=hc.prototype.o;hc.prototype.equalsApprox=hc.prototype.Wa;hc.prototype.equalTo=hc.prototype.qj;hc.prototype.equals=hc.prototype.A;hc.prototype.set=hc.prototype.set;hc.prototype.setTo=hc.prototype.Ug;var zc=null,Ac=null,yc=[];hc.className="Margin";hc.parse=wc;hc.stringify=xc;hc.ZeroMargin=zc=(new hc(0,0,0,0)).ia();hc.TwoMargin=Ac=(new hc(2,2,2,2)).ia();hc.parse=wc;hc.stringify=xc; +function N(a,b,c,d){void 0===a?this.ie=this.he=this.H=this.G=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);this.s=!1}var Bc,Ec,Fc,Gc,Hc,Kc,Lc,Mc,Nc,Oc,Pc,Rc,Sc,Tc,Uc,Vc,Wc,Xc,Yc,Zc,ad,bd,cd,dd,ed,fd,gd,hd,kd,ld,md,nd,od,pd,qd,rd;N.prototype.assign=function(a){this.G=a.G;this.H=a.H;this.he=a.he;this.ie=a.ie;return this}; +N.prototype.Ug=function(a,b,c,d){F&&(sd(a,"setTo:x"),sd(b,"setTo:y"),td(c,"setTo:offx"),td(d,"setTo:offy"),this.ha());this.G=a;this.H=b;this.he=c;this.ie=d;return this};N.prototype.set=function(a){F&&(w(a,N,N,"set:s"),this.ha());this.G=a.G;this.H=a.H;this.he=a.he;this.ie=a.ie;return this};N.prototype.copy=function(){var a=new N;a.G=this.G;a.H=this.H;a.he=this.he;a.ie=this.ie;return a};t=N.prototype;t.ia=function(){this.s=!0;Object.freeze(this);return this}; +t.K=function(){return this.s||Object.isFrozen(this)?this:this.copy().freeze()};t.freeze=function(){this.s=!0;return this};t.ka=function(){Object.isFrozen(this)&&v("cannot thaw constant: "+this);this.s=!1;return this};t.ha=function(a){if(F&&this.s){var b="The Spot is frozen, so its properties cannot be set: "+this.toString();void 0!==a&&(b+=" to value: "+a);v(b)}};function ud(a,b){a.G=NaN;a.H=NaN;a.he=b;return a}function sd(a,b){(isNaN(a)||1a)&&za(a,"0 <= "+b+" <= 1",N,b)} +function td(a,b){(isNaN(a)||Infinity===a||-Infinity===a)&&za(a,"real number, not NaN or Infinity",N,b)} +function vd(a){if("string"===typeof a){a=a.trim();if("None"===a)return Bc;if("TopLeft"===a)return Ec;if("Top"===a||"TopCenter"===a||"MiddleTop"===a)return Fc;if("TopRight"===a)return Gc;if("Left"===a||"LeftCenter"===a||"MiddleLeft"===a)return Hc;if("Center"===a)return Kc;if("Right"===a||"RightCenter"===a||"MiddleRight"===a)return Lc;if("BottomLeft"===a)return Mc;if("Bottom"===a||"BottomCenter"===a||"MiddleBottom"===a)return Nc;if("BottomRight"===a)return Oc;if("TopSide"===a)return Pc;if("LeftSide"=== +a)return Rc;if("RightSide"===a)return Sc;if("BottomSide"===a)return Tc;if("TopBottomSides"===a)return Uc;if("LeftRightSides"===a)return Vc;if("TopLeftSides"===a)return Wc;if("TopRightSides"===a)return Xc;if("BottomLeftSides"===a)return Yc;if("BottomRightSides"===a)return Zc;if("NotTopSide"===a)return ad;if("NotLeftSide"===a)return bd;if("NotRightSide"===a)return cd;if("NotBottomSide"===a)return dd;if("AllSides"===a)return ed;if("Default"===a)return fd;a=a.split(" ");for(var b=0,c=0;""===a[b];)b++; +var d=a[b++];void 0!==d&&0a&&(a+=360);if(0===a)return this;this.translate(b,c);if(90===a){a=0;var d=1}else 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 e=this.m12*a+this.m22*d,f=this.m11*-d+this.m21*a,g=this.m12*-d+this.m22*a;this.m11=this.m11*a+this.m21*d;this.m12=e;this.m21=f;this.m22=g;this.translate(-b,-c);return this};t=Gb.prototype; +t.translate=function(a,b){F&&(C(a,Gb,"translate:x"),C(b,Gb,"translate:y"));this.dx+=this.m11*a+this.m21*b;this.dy+=this.m12*a+this.m22*b;return this};t.scale=function(a,b){void 0===b&&(b=a);F&&(C(a,Gb,"translate:sx"),C(b,Gb,"translate:sy"));this.m11*=a;this.m12*=a;this.m21*=b;this.m22*=b;return this};t.Aa=function(a){var b=a.x,c=a.y;return a.h(b*this.m11+c*this.m21+this.dx,b*this.m12+c*this.m22+this.dy)}; +t.Pd=function(a){var b=1/(this.m11*this.m22-this.m12*this.m21),c=a.x,d=a.y;return a.h(c*this.m22*b+d*-this.m21*b+b*(this.m21*this.dy-this.m22*this.dx),c*-this.m12*b+d*this.m11*b+b*(this.m12*this.dx-this.m11*this.dy))};t.py=function(a){var b=1/(this.m11*this.m22-this.m12*this.m21),c=1.25*a.x,d=1.2*a.y;return a.h(c*this.m22*b+d*-this.m21*b+b*(this.m21*this.dy-this.m22*this.dx),c*-this.m12*b+d*this.m11*b+b*(this.m12*this.dx-this.m11*this.dy))}; +t.ex=function(a){var b=a.x,c=a.y,d=b+a.width,e=c+a.height,f=this.m11,g=this.m12,h=this.m21,k=this.m22,l=this.dx,m=this.dy,n=b*f+c*h+l,p=b*g+c*k+m,r=d*f+c*h+l,q=d*g+c*k+m;c=b*f+e*h+l;b=b*g+e*k+m;f=d*f+e*h+l;d=d*g+e*k+m;e=Math.min(n,r);n=Math.max(n,r);r=Math.min(p,q);p=Math.max(p,q);e=Math.min(e,c);n=Math.max(n,c);r=Math.min(r,b);p=Math.max(p,b);e=Math.min(e,f);n=Math.max(n,f);r=Math.min(r,d);p=Math.max(p,d);a.h(e,r,n-e,p-r);return a};Gb.alloc=function(){var a=yd.pop();return void 0===a?new Gb:a}; +Gb.free=function(a){yd.push(a)};Gb.prototype.transformRect=Gb.prototype.ex;Gb.prototype.transformPoint=Gb.prototype.Aa;Gb.prototype.scale=Gb.prototype.scale;Gb.prototype.translate=Gb.prototype.translate;Gb.prototype.rotate=Gb.prototype.rotate;Gb.prototype.invert=Gb.prototype.eu;Gb.prototype.multiplyInverted=Gb.prototype.xw;Gb.prototype.multiply=Gb.prototype.multiply;Gb.prototype.reset=Gb.prototype.reset;Gb.prototype.isIdentity=Gb.prototype.gu;Gb.prototype.equals=Gb.prototype.A;Gb.prototype.set=Gb.prototype.set; +var yd=[];Gb.className="Transform";Gb.xF="54a702f3e53909c447824c6706603faf4c"; +var K={FB:"7da71ca0ad381e90",Wg:(Math.sqrt(2)-1)/3*4,yx:null,sqrt:function(a){if(0>=a)return 0;var b=K.yx;if(null===b){b=[];for(var c=0;2E3>=c;c++)b[c]=Math.sqrt(c);K.yx=b}return 1>a?(c=1/a,2E3>=c?1/b[c|0]:Math.sqrt(a)):2E3>=a?b[a|0]:Math.sqrt(a)},B:function(a,b){a-=b;return.5>a&&-.5a&&-5E-8=e&&(e=1E-6);if(am-l)if(a-c>e||c-a>e){if(f=(d-b)/(c-a)*(f-a)+b,f-e<=g&&g<=f+e)return!0}else return!0;else if(b-d>e||d-b>e){if(g=(c-a)/(d-b)*(g-b)+a,g-e<=f&&f<=g+e)return!0}else return!0;return!1},Lt:function(a,b,c,d,e,f,g,h,k,l,m,n){if(K.Tb(a,b,g,h,n,c,d)&&K.Tb(a,b,g,h,n,e,f))return K.Tb(a,b,g,h,n,l,m);var p=(a+c)/2,r=(b+d)/2,q=(c+e)/2,u=(d+f)/2;e=(e+g)/2;f=(f+h)/2;d=(p+q)/2;c=(r+u)/2;q=(q+e)/2;u=(u+f)/2;var y=(d+q)/2,x=(c+u)/2;return K.Lt(a, +b,p,r,d,c,y,x,k,l,m,n)||K.Lt(y,x,q,u,e,f,g,h,k,l,m,n)},Pz:function(a,b,c,d,e,f,g,h,k){var l=(c+e)/2,m=(d+f)/2;k.h((((a+c)/2+l)/2+(l+(e+g)/2)/2)/2,(((b+d)/2+m)/2+(m+(f+h)/2)/2)/2);return k},Oz:function(a,b,c,d,e,f,g,h){var k=(c+e)/2,l=(d+f)/2;return Kb(((a+c)/2+k)/2,((b+d)/2+l)/2,(k+(e+g)/2)/2,(l+(f+h)/2)/2)},Im:function(a,b,c,d,e,f,g,h,k,l){if(K.Tb(a,b,g,h,k,c,d)&&K.Tb(a,b,g,h,k,e,f))kc(l,a,b,0,0),kc(l,g,h,0,0);else{var m=(a+c)/2,n=(b+d)/2,p=(c+e)/2,r=(d+f)/2;e=(e+g)/2;f=(f+h)/2;d=(m+p)/2;c=(n+r)/ +2;p=(p+e)/2;r=(r+f)/2;var q=(d+p)/2,u=(c+r)/2;K.Im(a,b,m,n,d,c,q,u,k,l);K.Im(q,u,p,r,e,f,g,h,k,l)}return l},Se:function(a,b,c,d,e,f,g,h,k,l){if(K.Tb(a,b,g,h,k,c,d)&&K.Tb(a,b,g,h,k,e,f))0===l.length&&(l.push(a),l.push(b)),l.push(g),l.push(h);else{var m=(a+c)/2,n=(b+d)/2,p=(c+e)/2,r=(d+f)/2;e=(e+g)/2;f=(f+h)/2;d=(m+p)/2;c=(n+r)/2;p=(p+e)/2;r=(r+f)/2;var q=(d+p)/2,u=(c+r)/2;K.Se(a,b,m,n,d,c,q,u,k,l);K.Se(q,u,p,r,e,f,g,h,k,l)}return l},Ew:function(a,b,c,d,e,f,g,h,k,l){if(K.Tb(a,b,e,f,l,c,d))return K.Tb(a, +b,e,f,l,h,k);var m=(a+c)/2,n=(b+d)/2;c=(c+e)/2;d=(d+f)/2;var p=(m+c)/2,r=(n+d)/2;return K.Ew(a,b,m,n,p,r,g,h,k,l)||K.Ew(p,r,c,d,e,f,g,h,k,l)},PB:function(a,b,c,d,e,f,g){g.h(((a+c)/2+(c+e)/2)/2,((b+d)/2+(d+f)/2)/2);return g},Dw:function(a,b,c,d,e,f,g,h){if(K.Tb(a,b,e,f,g,c,d))kc(h,a,b,0,0),kc(h,e,f,0,0);else{var k=(a+c)/2,l=(b+d)/2;c=(c+e)/2;d=(d+f)/2;var m=(k+c)/2,n=(l+d)/2;K.Dw(a,b,k,l,m,n,g,h);K.Dw(m,n,c,d,e,f,g,h)}return h},ir:function(a,b,c,d,e,f,g,h){if(K.Tb(a,b,e,f,g,c,d))0===h.length&&(h.push(a), +h.push(b)),h.push(e),h.push(f);else{var k=(a+c)/2,l=(b+d)/2;c=(c+e)/2;d=(d+f)/2;var m=(k+c)/2,n=(l+d)/2;K.ir(a,b,k,l,m,n,g,h);K.ir(m,n,c,d,e,f,g,h)}return h},Jq:function(a,b,c,d,e,f,g,h,k,l,m,n,p,r){if(K.Tb(a,b,g,h,p,c,d)&&K.Tb(a,b,g,h,p,e,f)){if(!K.Qm(a,b,g,h,k,l,m,n))return!1;p=(a-g)*(l-n)-(b-h)*(k-m);if(0===p)return!1;r.h(((a*h-b*g)*(k-m)-(a-g)*(k*n-l*m))/p,((a*h-b*g)*(l-n)-(b-h)*(k*n-l*m))/p);return!0}var q=(a+c)/2,u=(b+d)/2,y=(c+e)/2,x=(d+f)/2;e=(e+g)/2;f=(f+h)/2;d=(q+y)/2;c=(u+x)/2;y=(y+e)/ +2;x=(x+f)/2;var z=(d+y)/2,B=(c+x)/2,D=Infinity,G=!1,M=0,Y=0;K.Jq(a,b,q,u,d,c,z,B,k,l,m,n,p,r)&&(a=(r.x-k)*(r.x-k)+(r.y-l)*(r.y-l),a=m)return r; +if((k>m?k-m:m-k)<(l>n?l-n:n-l)){if(bb)return r}else if(aa)return r;0p&&r--}else{q=(a+c)/2;u=(b+d)/2;var y=(c+e)/2,x=(d+f)/2;e=(e+g)/2;f=(f+h)/2;d=(q+y)/2;c=(u+x)/2;y=(y+e)/2;x=(x+f)/2;var z=(d+y)/2,B=(c+x)/2;r+=K.Kq(a,b,q,u,d,c,z,B,k,l,m,n,p);r+=K.Kq(z,B,y,x,e,f,g,h,k,l,m,n,p)}return r},ai:function(a,b,c,d,e,f,g){if(K.da(a,c)){bb)return g.h(a,b),!1;g.h(a,f);return!0}if(K.da(b,d)){aa)return g.h(a,b),!1;g.h(e,b);return!0}e=((a-e)*(a-c)+(b-f)*(b-d))/((c-a)*(c-a)+(d-b)*(d-b));if(-5E-6>e)return g.h(a,b),!1;if(1.000005b)return k.h(a,b),!1; +k.h(a,c);return!0}g=(d-b)/(c-a);if(K.da(h,g))return K.ai(a,b,c,d,e,f,k),!1;e=(g*a-h*e+f-b)/(g-h);if(K.da(g,0)){aa)return k.h(a,b),!1;k.h(e,b);return!0}return K.ai(a,b,c,d,e,g*(e-a)+b,k)},NB:function(a,b,c,d,e){return K.Ze(c.x,c.y,d.x,d.y,a.x,a.y,b.x,b.y,e)},MB:function(a,b,c,d,e,f,g,h,k,l){function m(c,d){var e=(c-a)*(c-a)+(d-b)*(d-b);e(c>a?c-a:a-c)){p=1-(c-e)*(c-e)/(p*p);if(0>p)return k;p=Math.sqrt(p);d=-l*p+f;m(c,l*p+f);m(c,d)}else{c=(d-b)/(c-a);d=1/(p*p)+c*c/(l*l);h=2*c*(b-c*a)/(l*l)-2*c*f/(l*l)-2*e/(p*p);p=h*h-4*d*(2*c*a*f/(l*l)-2*b*f/(l*l)+f*f/(l*l)+e*e/(p*p)-1+(b-c*a)*(b-c*a)/(l*l));if(0>p)return k;p=Math.sqrt(p);l=(-h+p)/(2*d);m(l,c*l-c*a+b);p=(-h-p)/(2*d);m(p,c*p-c*a+b)}return k},Of:function(a,b,c,d,e,f,g,h,k){var l=1E21,m=a,n=b;if(K.Ze(a,b,a,d,e,f, +g,h,k)){var p=(k.x-e)*(k.x-e)+(k.y-f)*(k.y-f);pl},LB:function(a,b,c,d,e,f,g,h,k){c=a-c;g=e-g;0===c||0===g?0===c?(b=(f-h)/g,h=a,e=b*h+(f-b*e)):(f=(b-d)/c,h=e,e=f*h+(b-f*a)):(d=(b-d)/c,h=(f-h)/g,a=b-d*a,h=(f- +h*e-a)/(d-h),e=d*h+a);k.h(h,e);return k},cu:function(a,b,c){return K.Uy(a.x,a.y,a.width,a.height,b.x,b.y,c.x,c.y)},Uy:function(a,b,c,d,e,f,g,h){var k=a+c,l=b+d;return e===g?(f=b):f===h?(e=a):lc(a,b,c,d,e,f)||lc(a,b,c,d,g,h)||K.Qm(a,b,k,b,e,f,g,h)||K.Qm(k,b,k,l,e,f,g,h)||K.Qm(k,l,a,l,e,f,g,h)||K.Qm(a,l,a,b,e,f,g,h)?!0:!1},Qm:function(a,b,c,d,e,f,g,h){return 0>=K.Ot(a,b,c,d,e,f)*K.Ot(a,b,c,d,g,h)&&0>=K.Ot(e,f,g,h,a,b)*K.Ot(e, +f,g,h,c,d)},Ot:function(a,b,c,d,e,f){c-=a;d-=b;a=e-a;b=f-b;f=a*d-b*c;0===f&&(f=a*c+b*d,0f&&(f=0)));return 0>f?-1:0a&&(a+=360);360<=a&&(a-=360);return a},wy:function(a,b,c,d,e,f){var g=Math.PI;f||(d*=g/180,e*=g/180);var h=d>e?-1:1;f=[];var k=g/2,l=d;d=Math.min(2*g,Math.abs(e-d));if(1E-5>d)return k=l+h*Math.min(d,k),h=a+c*Math.cos(l),l=b+c*Math.sin(l),a+=c*Math.cos(k),b+=c*Math.sin(k),c=(h+a)/2,k=(l+b)/2,f.push([h,l,c,k,c,k,a,b]),f;for(;1E-5c,f=0>d;if(al;++l){b=.5*(h+k);if(b===h||b===k)break;var m=a/(b+e),n=g/(b+f);m= +m*m+n*n-1;if(0m)k=b;else break}c=e*c/(b+e)-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,fa?"M"+this.startX.toString()+" "+this.startY.toString()+"L"+this.endX.toString()+" "+this.endY.toString():"M"+this.startX.toFixed(a)+" "+this.startY.toFixed(a)+"L"+this.endX.toFixed(a)+" "+this.endY.toFixed(a);case Kd:var b=new L(this.startX,this.startY,0,0);b.hx(this.endX,this.endY,0,0);return 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 Ld:b=new L(this.startX,this.startY,0,0);b.hx(this.endX,this.endY,0,0);if(0>a)return a=b.left.toString()+" "+(b.y+b.height/2).toString(),"M"+a+"A"+(b.width/2).toString()+" "+(b.height/2).toString()+" 0 0 1 "+(b.right.toString()+" "+(b.y+b.height/2).toString())+"A"+(b.width/2).toString()+" "+(b.height/2).toString()+" 0 0 1 "+a;var c=b.left.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 "+(b.right.toFixed(a)+" "+(b.y+b.height/2).toFixed(a))+"A"+(b.width/2).toFixed(a)+" "+(b.height/2).toFixed(a)+" 0 0 1 "+c;case Ad:b="";c=this.figures.j;for(var d=c.length,e=0;e=D-1?!0:null!==n[u+1].match(G)}function d(){u++;return n[u]}function e(a){var b=parseFloat(d()),c=parseFloat(d());y===y.toLowerCase()&&(b=B.x+b,c=B.y+c);a.h(b,c)}function f(){e(B);return B}function g(){e(z);return z}function h(){var a=x.toLowerCase();return"c"!==a&&"s"!==a&&"q"!==a&&"t"!==a?B:new J(2*B.x-z.x,2*B.y-z.y)}void 0===b&&(b=!1);"string"!==typeof a&&ya(a,"string",zd,"parse:str");var k=new RegExp("(["+Nd+"])(["+Nd+"])","gm"),l=new RegExp("(["+Nd+"])([^s])", +"gm"),m=new RegExp("([^s])(["+Nd+"])","gm");a=a.replace(/,/gm," ");a=a.replace(k,"$1 $2");a=a.replace(k,"$1 $2");a=a.replace(l,"$1 $2");a=a.replace(m,"$1 $2");a=a.replace(/([0-9])([+\-])/gm,"$1 $2");a=a.replace(/[\s\r\t\n]+/gm," ");a=a.replace(/^\s+|\s+$/g,"");var n=a.split(" ");for(a=0;a=D-1);)if(x=y,y=d(),""!==y)switch(y.toUpperCase()){case "X":p=!0;m=l=!1;break;case "M":r=f();null===a.oc||!0===p?(Pd(a,r.x,r.y,l,!m),p=!1):a.moveTo(r.x,r.y);for(k.assign(B);!c();)r=f(),a.lineTo(r.x,r.y);break;case "L":for(;!c();)r=f(),a.lineTo(r.x,r.y);break;case "H":for(;!c();)B=new J((y===y.toLowerCase()?B.x:0)+parseFloat(d()), +B.y),a.lineTo(B.x,B.y);break;case "V":for(;!c();)B=new J(B.x,(y===y.toLowerCase()?B.y:0)+parseFloat(d())),a.lineTo(B.x,B.y);break;case "C":for(;!c();){r=new J;e(r);q=g();var M=f();Td(a,r.x,r.y,q.x,q.y,M.x,M.y)}break;case "S":for(;!c();)r=h(),q=g(),M=f(),Td(a,r.x,r.y,q.x,q.y,M.x,M.y);break;case "Q":for(;!c();)r=g(),q=f(),Ud(a,r.x,r.y,q.x,q.y);break;case "T":for(;!c();)z=r=h(),q=f(),Ud(a,r.x,r.y,q.x,q.y);break;case "B":for(;!c();){r=parseFloat(d());q=parseFloat(d());M=parseFloat(d());var Y=parseFloat(d()), +Q=parseFloat(d()),ca=Q,T=!1;c()||(ca=parseFloat(d()),c()||(T=0!==parseFloat(d())));y===y.toLowerCase()&&(M+=B.x,Y+=B.y);a.arcTo(r,q,M,Y,Q,ca,T)}break;case "A":for(;!c();)r=Math.abs(parseFloat(d())),q=Math.abs(parseFloat(d())),M=parseFloat(d()),Q=Y=!1,T=ca=0,ca=d(),1===ca.length?(Y=!!parseFloat(ca),Q=!!parseFloat(d()),ca=parseFloat(d())):2===ca.length?(Y=!!parseFloat(ca[0]),Q=!!parseFloat(ca[1]),ca=parseFloat(d())):(Y=!!parseFloat(ca[0]),Q=!!parseFloat(ca[1]),ca=parseFloat(ca.slice(2))),T=parseFloat(d()), +y===y.toLowerCase()&&(ca=B.x+ca,T=B.y+T),B.h(ca,T),Vd(a,r,q,M,Y,Q,ca,T);break;case "Z":Wd(a);B.assign(k);break;case "F":r="";for(q=1;n[u+q];)if(null!==n[u+q].match(/[Uu]/))q++;else if(null===n[u+q].match(G))q++;else{r=n[u+q];break}r.match(/[Mm]/)?l=!0:0g&&(g+=360),q.startAngle+=g);0>a&&(q.startAngle=180-q.startAngle,q.sweepAngle=-q.sweepAngle);0>d&& +(q.startAngle=-q.startAngle,q.sweepAngle=-q.sweepAngle);q.radiusX*=Math.sqrt(a*a+c*c);void 0!==q.radiusY&&(q.radiusY*=Math.sqrt(b*b+d*d));break;case oe:g=q.endX;h=q.endY;q.endX=g*a+h*c+e;q.endY=g*b+h*d+f;if(0===q.radiusX||0===q.radiusY)break;0!==b&&(g=180*Math.atan2(b,a)/Math.PI,0>g&&(g+=360),q.xAxisRotation+=g);0>a&&(q.xAxisRotation=180-q.xAxisRotation,q.isClockwiseArc=!q.isClockwiseArc);0>d&&(q.xAxisRotation=-q.xAxisRotation,q.isClockwiseArc=!q.isClockwiseArc);q.radiusX*=Math.sqrt(a*a+c*c);q.radiusY*= +Math.sqrt(b*b+d*d);break;default:v("Unknown Segment type: "+q.type)}}}}this.xa=!0;return this}; +t.ca=function(a,b){void 0===b&&(b=0);var c=this.jd,d=this.kd,e=this.nc,f=this.tc;switch(this.type){case Gd:return K.Tb(c,d,e,f,b,a.x,a.y);case Kd:var g=L.allocAt(Math.min(c,e)-b,Math.min(d,f)-b,Math.abs(e-c)+2*b,Math.abs(f-d)+2*b);a=g.ca(a);L.free(g);return a;case Ld:g=Math.min(c,e)-b;var h=Math.min(d,f)-b;c=(Math.abs(e-c)+2*b)/2;b=(Math.abs(f-d)+2*b)/2;if(0>=c||0>=b)return!1;g=a.x-(g+c);h=a.y-(h+b);return 1>=g*g/(c*c)+h*h/(b*b);case Ad:return re(this,a,b,!0,!1);default:return!1}}; +function re(a,b,c,d,e){var f=b.x;b=b.y;for(var g=a.bounds.x-20,h=0,k,l,m,n,p=a.figures.j,r=p.length,q=0;q=a)return 0;if((e>g?e-g:g-e)<(f>h?f-h:h-f))if(fh)return 0}else{if(bf)return 0}else if(eg)return 0}else if(le)return 0;return 0a?a=0:1=f)return d=f-g,d=0===m?0:d/m,c=c[h],h=c[2*a],e=c[2*a+1],b.h(h+(c[2*a+2]-h)*d,e+(c[2*a+3]-e)*d),b;g+=m}}return b}; +t.Ky=function(a){0>a?a=0:1=e)return e=b[g],b=e[2*a],c=e[2*a+1],d=e[2*a+2],a=e[2*a+3],1>Math.abs(d-b)&&1>Math.abs(a-c)?0:1>Math.abs(d-b)?0<=a-c?90:270:1>Math.abs(a-c)?0<=d-b?0:180:180*Math.atan2(a-c,d-b)/Math.PI;f+=l}}return NaN}; +t.mw=function(a,b){0>a?a=0:1=f)return d=f-g,d=0===m?0:d/m,m=c[h],c=m[2*a],h=m[2*a+1],e=m[2*a+2],a=m[2*a+ +3],b[0]=c+(e-c)*d,b[1]=h+(a-h)*d,b[2]=1>Math.abs(e-c)&&1>Math.abs(a-h)?0:1>Math.abs(e-c)?0<=a-h?90:270:1>Math.abs(a-h)?0<=e-c?0:180:180*Math.atan2(a-h,e-c)/Math.PI,b;g+=m}}return b}; +t.Ly=function(a){if(this.type===Gd){var b=this.startX,c=this.startY,d=this.endX,e=this.endY;if(b!==d||c!==e){var f=a.x;a=a.y;if(b===d){if(c=d?d===c?0:1:Math.abs(a-c)/(d-g)}if(c===e)return b=d?d===b?0:1:Math.abs(f-b)/(d-g);g=(d-b)*(d-b)+(e-c)*(e-c);var h=J.alloc();K.ai(b,c,d,e,f,a,h);a=h.x;f=h.y;J.free(h);return Math.sqrt(((a-b)*(a-b)+(f-c)*(f-c))/g)}}else if(this.type===Kd){g=this.startX;h=this.startY;var k=this.endX; +e=this.endY;if(g!==k||h!==e){b=k-g;c=e-h;f=2*b+2*c;d=a.x;a=a.y;d=Math.min(Math.max(d,g),k);a=Math.min(Math.max(a,h),e);g=Math.abs(d-g);k=Math.abs(d-k);h=Math.abs(a-h);e=Math.abs(a-e);var l=Math.min(g,k,h,e);if(l===h)return d/f;if(l===k)return(b+a)/f;if(l===e)return(2*b+c-d)/f;if(l===g)return(2*b+2*c-a)/f}}else{b=this.flattenedSegments;c=this.flattenedLengths;f=this.flattenedTotalLength;d=J.alloc();e=Infinity;h=g=0;k=b.length;for(var m=l=0,n=0;na?0:1a?"M"+this.startX.toString()+" "+this.startY.toString():"M"+this.startX.toFixed(a)+" "+this.startY.toFixed(a);for(var c=this.segments.j,d=c.length,e=0;ea&&(a+=360),this.Ne=a,this.aj=0,F&&C(d,we,"x1"),this.bj=Math.max(d,0),F&&C(e,we,"y1"),this.Bh=Math.max(e,0),this.Yl="boolean"===typeof g?g:"number"===typeof g?!!g:!1,this.ql=!!h):(F&&C(d,we,"x1"),this.Ne=d, +F&&C(e,we,"y1"),this.aj=e,F&&C(f,we,"x2"),a===ne&&(f=Math.max(f,0)),this.bj=f,"number"===typeof g?(a===ne&&(g=Math.max(g,0)),this.Bh=g):this.Bh=0,this.ql=this.Yl=!1);this.$j=!1;this.xa=!0;this.Wd=null}we.prototype.copy=function(){var a=new we;a.sa=this.sa;a.nc=this.nc;a.tc=this.tc;a.Ne=this.Ne;a.aj=this.aj;a.bj=this.bj;a.Bh=this.Bh;a.Yl=this.Yl;a.ql=this.ql;a.$j=this.$j;a.xa=this.xa;return a};t=we.prototype; +t.Wa=function(a){if(!(a instanceof we)||this.type!==a.type||this.isClosed!==a.isClosed)return!1;switch(this.type){case ke:case Id:return K.B(this.endX,a.endX)&&K.B(this.endY,a.endY);case le:return K.B(this.endX,a.endX)&&K.B(this.endY,a.endY)&&K.B(this.point1X,a.point1X)&&K.B(this.point1Y,a.point1Y)&&K.B(this.point2X,a.point2X)&&K.B(this.point2Y,a.point2Y);case me:return K.B(this.endX,a.endX)&&K.B(this.endY,a.endY)&&K.B(this.point1X,a.point1X)&&K.B(this.point1Y,a.point1Y);case ne:return K.B(this.startAngle, +a.startAngle)&&K.B(this.sweepAngle,a.sweepAngle)&&K.B(this.centerX,a.centerX)&&K.B(this.centerY,a.centerY)&&K.B(this.radiusX,a.radiusX)&&K.B(this.radiusY,a.radiusY);case oe:return this.isClockwiseArc===a.isClockwiseArc&&this.isLargeArc===a.isLargeArc&&K.B(this.xAxisRotation,a.xAxisRotation)&&K.B(this.endX,a.endX)&&K.B(this.endY,a.endY)&&K.B(this.radiusX,a.radiusX)&&K.B(this.radiusY,a.radiusY);default:return!1}};t.pb=function(a){a.classType===we?this.type=a:Da(this,a)}; +t.toString=function(a){void 0===a&&(a=-1);switch(this.type){case ke:a=0>a?"M"+this.endX.toString()+" "+this.endY.toString():"M"+this.endX.toFixed(a)+" "+this.endY.toFixed(a);break;case Id:a=0>a?"L"+this.endX.toString()+" "+this.endY.toString():"L"+this.endX.toFixed(a)+" "+this.endY.toFixed(a);break;case le:a=0>a?"C"+this.point1X.toString()+" "+this.point1Y.toString()+" "+this.point2X.toString()+" "+this.point2Y.toString()+" "+this.endX.toString()+" "+this.endY.toString():"C"+this.point1X.toFixed(a)+ +" "+this.point1Y.toFixed(a)+" "+this.point2X.toFixed(a)+" "+this.point2Y.toFixed(a)+" "+this.endX.toFixed(a)+" "+this.endY.toFixed(a);break;case me:a=0>a?"Q"+this.point1X.toString()+" "+this.point1Y.toString()+" "+this.endX.toString()+" "+this.endY.toString():"Q"+this.point1X.toFixed(a)+" "+this.point1Y.toFixed(a)+" "+this.endX.toFixed(a)+" "+this.endY.toFixed(a);break;case ne:a=0>a?"B"+this.startAngle.toString()+" "+this.sweepAngle.toString()+" "+this.centerX.toString()+" "+this.centerY.toString()+ +" "+this.radiusX.toString()+" "+this.radiusY.toString():"B"+this.startAngle.toFixed(a)+" "+this.sweepAngle.toFixed(a)+" "+this.centerX.toFixed(a)+" "+this.centerY.toFixed(a)+" "+this.radiusX.toFixed(a)+" "+this.radiusY.toFixed(a);break;case oe:a=0>a?"A"+this.radiusX.toString()+" "+this.radiusY.toString()+" "+this.xAxisRotation.toString()+" "+(this.isLargeArc?1:0)+" "+(this.isClockwiseArc?1:0)+" "+this.endX.toString()+" "+this.endY.toString():"A"+this.radiusX.toFixed(a)+" "+this.radiusY.toFixed(a)+ +" "+this.xAxisRotation.toFixed(a)+" "+(this.isLargeArc?1:0)+" "+(this.isClockwiseArc?1:0)+" "+this.endX.toFixed(a)+" "+this.endY.toFixed(a);break;default:a=this.type.toString()}return a+(this.$j?"z":"")};t.freeze=function(){this.s=!0;return this};t.ka=function(){this.s=!1;return this};t.close=function(){this.$j=!0;return this}; +function pe(a,b){if(null!==a.Wd&&!1===b.xa)return a.Wd;var c=a.radiusX,d=a.radiusY;void 0===d&&(d=c);if(0===c||0===d)return a.Wd=[],a.Wd;b=a.Ne;var e=a.aj,f=K.wy(0,0,c=r?g=Math.PI:1<=r&&(g=0);!k&&0g&&(g+=2*Math.PI);k=b>f?1:b/f;r=b>f?f/b:1;b=K.wy(0,0,b>f?b:f,m,m+g,!0);f=Gb.alloc();f.reset();f.translate(c,d);f.rotate(a.Ne,0,0);f.scale(k,r);Yd(b,f);Gb.free(f);a.Wd=b;return a.Wd} +na.Object.defineProperties(we.prototype,{isClosed:{configurable:!0,get:function(){return this.$j},set:function(a){this.$j!==a&&(this.$j=a,this.xa=!0)}},type:{configurable:!0,get:function(){return this.sa},set:function(a){F&&gb(a,we,we,"type");this.s&&va(this,a);this.sa=a;this.xa=!0}},endX:{configurable:!0,get:function(){return this.nc},set:function(a){F&&C(a,we,"endX");this.s&&va(this,a);this.nc=a;this.xa=!0}},endY:{configurable:!0,get:function(){return this.tc}, +set:function(a){F&&C(a,we,"endY");this.s&&va(this,a);this.tc=a;this.xa=!0}},point1X:{configurable:!0,get:function(){return this.Ne},set:function(a){F&&C(a,we,"point1X");this.s&&va(this,a);this.Ne=a;this.xa=!0}},point1Y:{configurable:!0,get:function(){return this.aj},set:function(a){F&&C(a,we,"point1Y");this.s&&va(this,a);this.aj=a;this.xa=!0}},point2X:{configurable:!0,get:function(){return this.bj},set:function(a){F&&C(a,we,"point2X");this.s&&va(this,a);this.bj= +a;this.xa=!0}},point2Y:{configurable:!0,get:function(){return this.Bh},set:function(a){F&&C(a,we,"point2Y");this.s&&va(this,a);this.Bh=a;this.xa=!0}},centerX:{configurable:!0,get:function(){return this.Ne},set:function(a){F&&C(a,we,"centerX");this.s&&va(this,a);this.Ne=a;this.xa=!0}},centerY:{configurable:!0,get:function(){return this.aj},set:function(a){F&&C(a,we,"centerY");this.s&&va(this,a);this.aj=a;this.xa=!0}},radiusX:{configurable:!0, +get:function(){return this.bj},set:function(a){F&&C(a,we,"radiusX");0>a&&za(a,">= zero",we,"radiusX");this.s&&va(this,a);this.bj=a;this.xa=!0}},radiusY:{configurable:!0,get:function(){return this.Bh},set:function(a){F&&C(a,we,"radiusY");0>a&&za(a,">= zero",we,"radiusY");this.s&&va(this,a);this.Bh=a;this.xa=!0}},startAngle:{configurable:!0,get:function(){return this.nc},set:function(a){this.nc!==a&&(this.s&&va(this,a),F&&C(a,we,"startAngle"),a%=360,0>a&&(a+=360),this.nc= +a,this.xa=!0)}},sweepAngle:{configurable:!0,get:function(){return this.tc},set:function(a){F&&C(a,we,"sweepAngle");this.s&&va(this,a);360a&&(a=-360);this.tc=a;this.xa=!0}},isClockwiseArc:{configurable:!0,get:function(){return this.ql},set:function(a){this.s&&va(this,a);this.ql=a;this.xa=!0}},isLargeArc:{configurable:!0,get:function(){return this.Yl},set:function(a){this.s&&va(this,a);this.Yl=a;this.xa=!0}},xAxisRotation:{configurable:!0, +get:function(){return this.Ne},set:function(a){F&&C(a,we,"xAxisRotation");a%=360;0>a&&(a+=360);this.s&&va(this,a);this.Ne=a;this.xa=!0}}});we.prototype.equalsApprox=we.prototype.Wa;var ke=new E(we,"Move",0),Id=new E(we,"Line",1),le=new E(we,"Bezier",2),me=new E(we,"QuadraticBezier",3),ne=new E(we,"Arc",4),oe=new E(we,"SvgArc",4);we.className="PathSegment";we.Move=ke;we.Line=Id;we.Bezier=le;we.QuadraticBezier=me;we.Arc=ne;we.SvgArc=oe; +function ye(){this.C=null;this.Lv=(new J(0,0)).freeze();this.Vu=(new J(0,0)).freeze();this.Lr=this.Ms=0;this.Mr=1;this.Oi="";this.Ft=this.fs=!1;this.cs=this.Or=0;this.ah=this.ps=this.zs=!1;this.ls=null;this.At=0;this.vd=this.zt=null}ye.prototype.copy=function(){var a=new ye;return this.clone(a)}; +ye.prototype.clone=function(a){a.C=this.C;a.Lv.assign(this.viewPoint);a.Vu.assign(this.documentPoint);a.Ms=this.Ms;a.Lr=this.Lr;a.Mr=this.Mr;a.Oi=this.Oi;a.fs=this.fs;a.Ft=this.Ft;a.Or=this.Or;a.cs=this.cs;a.zs=this.zs;a.ps=this.ps;a.ah=this.ah;a.ls=this.ls;a.At=this.At;a.zt=this.zt;a.vd=this.vd;return a}; +ye.prototype.toString=function(){var a="^";0!==this.modifiers&&(a+="M:"+this.modifiers);0!==this.button&&(a+="B:"+this.button);""!==this.key&&(a+="K:"+this.key);0!==this.clickCount&&(a+="C:"+this.clickCount);0!==this.delta&&(a+="D:"+this.delta);this.handled&&(a+="h");this.bubbles&&(a+="b");null!==this.documentPoint&&(a+="@"+this.documentPoint.toString());return a};ye.prototype.Wq=function(a,b){var c=this.diagram;if(null===c)return b;ze(c,this.event,a,b);return b}; +ye.prototype.GA=function(a,b){var c=this.diagram;if(null===c)return b;ze(c,this.event,a,b);b.assign(c.Bu(b));return b}; +na.Object.defineProperties(ye.prototype,{diagram:{configurable:!0,get:function(){return this.C},set:function(a){this.C=a}},viewPoint:{configurable:!0,get:function(){return this.Lv},set:function(a){w(a,J,ye,"viewPoint");this.Lv.assign(a)}},documentPoint:{configurable:!0,get:function(){return this.Vu},set:function(a){w(a,J,ye,"documentPoint");this.Vu.assign(a)}},modifiers:{configurable:!0,get:function(){return this.Ms},set:function(a){this.Ms= +a}},button:{configurable:!0,get:function(){return this.Lr},set:function(a){this.Lr=a;if(null===this.event)switch(a){case 0:this.buttons=1;break;case 1:this.buttons=4;break;case 2:this.buttons=2}}},buttons:{configurable:!0,get:function(){return this.Mr},set:function(a){this.Mr=a}},key:{configurable:!0,get:function(){return this.Oi},set:function(a){this.Oi=a}},down:{configurable:!0,get:function(){return this.fs},set:function(a){this.fs=a}},up:{configurable:!0, +enumerable:!0,get:function(){return this.Ft},set:function(a){this.Ft=a}},clickCount:{configurable:!0,get:function(){return this.Or},set:function(a){this.Or=a}},delta:{configurable:!0,get:function(){return this.cs},set:function(a){this.cs=a}},isMultiTouch:{configurable:!0,get:function(){return this.zs},set:function(a){this.zs=a}},handled:{configurable:!0,get:function(){return this.ps},set:function(a){this.ps=a}},bubbles:{configurable:!0, +get:function(){return this.ah},set:function(a){this.ah=a}},event:{configurable:!0,get:function(){return this.ls},set:function(a){this.ls=a}},isTouchEvent:{configurable:!0,get:function(){var a=qa.TouchEvent,b=this.event;return a&&b instanceof a?!0:(a=qa.PointerEvent)&&b instanceof a&&("touch"===b.pointerType||"pen"===b.pointerType)}},timestamp:{configurable:!0,get:function(){return this.At},set:function(a){this.At=a}},targetDiagram:{configurable:!0, +get:function(){return this.zt},set:function(a){this.zt=a}},targetObject:{configurable:!0,get:function(){return this.vd},set:function(a){this.vd=a}},control:{configurable:!0,get:function(){return 0!==(this.modifiers&1)},set:function(a){this.modifiers=a?this.modifiers|1:this.modifiers&-2}},shift:{configurable:!0,get:function(){return 0!==(this.modifiers&4)},set:function(a){this.modifiers=a?this.modifiers|4:this.modifiers&-5}},alt:{configurable:!0, +get:function(){return 0!==(this.modifiers&2)},set:function(a){this.modifiers=a?this.modifiers|2:this.modifiers&-3}},meta:{configurable:!0,get:function(){return 0!==(this.modifiers&8)},set:function(a){this.modifiers=a?this.modifiers|8:this.modifiers&-9}},left:{configurable:!0,get:function(){var a=this.event;return null===a||"mousedown"!==a.type&&"mouseup"!==a.type&&"pointerdown"!==a.type&&"pointerup"!==a.type?0!==(this.buttons&1):0===this.button},set:function(a){this.buttons= +a?this.buttons|1:this.buttons&-2}},right:{configurable:!0,get:function(){var a=this.event;return null===a||"mousedown"!==a.type&&"mouseup"!==a.type&&"pointerdown"!==a.type&&"pointerup"!==a.type?0!==(this.buttons&2):2===this.button},set:function(a){this.buttons=a?this.buttons|2:this.buttons&-3}},middle:{configurable:!0,get:function(){var a=this.event;return null===a||"mousedown"!==a.type&&"mouseup"!==a.type&&"pointerdown"!==a.type&&"pointerup"!==a.type?0!==(this.buttons& +4):1===this.button},set:function(a){this.buttons=a?this.buttons|4:this.buttons&-5}}});ye.prototype.getMultiTouchDocumentPoint=ye.prototype.GA;ye.prototype.getMultiTouchViewPoint=ye.prototype.Wq;ye.className="InputEvent";function Ae(){this.C=null;this.va="";this.Ws=this.xt=null}Ae.prototype.copy=function(){var a=new Ae;a.C=this.C;a.va=this.va;a.xt=this.xt;a.Ws=this.Ws;return a}; +Ae.prototype.toString=function(){var a="*"+this.name;null!==this.subject&&(a+=":"+this.subject.toString());null!==this.parameter&&(a+="("+this.parameter.toString()+")");return a}; +na.Object.defineProperties(Ae.prototype,{diagram:{configurable:!0,get:function(){return this.C},set:function(a){this.C=a}},name:{configurable:!0,get:function(){return this.va},set:function(a){this.va=a}},subject:{configurable:!0,get:function(){return this.xt},set:function(a){this.xt=a}},parameter:{configurable:!0,get:function(){return this.Ws},set:function(a){this.Ws=a}}});Ae.className="DiagramEvent"; +function Be(){this.Jn=Ce;this.uf=this.Ls="";this.vp=this.wp=this.Cp=this.Dp=this.Bp=this.C=this.ic=null}Be.prototype.clear=function(){this.vp=this.wp=this.Cp=this.Dp=this.Bp=this.C=this.ic=null}; +Be.prototype.copy=function(){var a=new Be;a.Jn=this.Jn;a.Ls=this.Ls;a.uf=this.uf;a.ic=this.ic;a.C=this.C;a.Bp=this.Bp;var b=this.Dp;a.Dp=Ga(b)&&"function"===typeof b.K?b.K():b;b=this.Cp;a.Cp=Ga(b)&&"function"===typeof b.K?b.K():b;b=this.wp;a.wp=Ga(b)&&"function"===typeof b.K?b.K():b;b=this.vp;a.vp=Ga(b)&&"function"===typeof b.K?b.K():b;return a};Be.prototype.pb=function(a){a.classType===Be?this.change=a:Da(this,a)}; +Be.prototype.toString=function(){var a="";a=this.change===De?a+"* ":this.change===Ce?a+(null!==this.model?"!m":"!d"):a+((null!==this.model?"!m":"!d")+this.change);this.propertyName&&"string"===typeof this.propertyName&&(a+=" "+this.propertyName);this.modelChange&&this.modelChange!==this.propertyName&&(a+=" "+this.modelChange);a+=": ";this.change===De?null!==this.oldValue&&(a+=" "+this.oldValue):(null!==this.object&&(a+=Qa(this.object)),null!==this.oldValue&&(a+=" old: "+Qa(this.oldValue)),null!== +this.oldParam&&(a+=" "+this.oldParam),null!==this.newValue&&(a+=" new: "+Qa(this.newValue)),null!==this.newParam&&(a+=" "+this.newParam));return a};Be.prototype.J=function(a){return a?this.oldValue:this.newValue};Be.prototype.IA=function(a){return a?this.oldParam:this.newParam};Be.prototype.canUndo=function(){return null!==this.model||null!==this.diagram?!0:!1}; +Be.prototype.undo=function(){this.canUndo()&&(null!==this.model?this.model.changeState(this,!0):null!==this.diagram&&this.diagram.changeState(this,!0))};Be.prototype.canRedo=function(){return null!==this.model||null!==this.diagram?!0:!1};Be.prototype.redo=function(){this.canRedo()&&(null!==this.model?this.model.changeState(this,!1):null!==this.diagram&&this.diagram.changeState(this,!1))}; +na.Object.defineProperties(Be.prototype,{model:{configurable:!0,get:function(){return this.ic},set:function(a){this.ic=a}},diagram:{configurable:!0,get:function(){return this.C},set:function(a){this.C=a}},change:{configurable:!0,get:function(){return this.Jn},set:function(a){F&&gb(a,Be,Be,"change");this.Jn=a}},modelChange:{configurable:!0,get:function(){return this.Ls},set:function(a){F&&A(a,"string",Be,"modelChange");this.Ls=a}},propertyName:{configurable:!0, +enumerable:!0,get:function(){return this.uf},set:function(a){F&&"string"!==typeof a&&A(a,"function",Be,"propertyName");this.uf=a}},isTransactionFinished:{configurable:!0,get:function(){return this.Jn===De&&("CommittedTransaction"===this.uf||"FinishedUndo"===this.uf||"FinishedRedo"===this.uf)}},object:{configurable:!0,get:function(){return this.Bp},set:function(a){this.Bp=a}},oldValue:{configurable:!0,get:function(){return this.Dp},set:function(a){this.Dp= +a}},oldParam:{configurable:!0,get:function(){return this.Cp},set:function(a){this.Cp=a}},newValue:{configurable:!0,get:function(){return this.wp},set:function(a){this.wp=a}},newParam:{configurable:!0,get:function(){return this.vp},set:function(a){this.vp=a}}});Be.prototype.redo=Be.prototype.redo;Be.prototype.canRedo=Be.prototype.canRedo;Be.prototype.undo=Be.prototype.undo;Be.prototype.canUndo=Be.prototype.canUndo;Be.prototype.getParam=Be.prototype.IA; +Be.prototype.getValue=Be.prototype.J;Be.prototype.clear=Be.prototype.clear;var De=new E(Be,"Transaction",-1),Ce=new E(Be,"Property",0),Le=new E(Be,"Insert",1),Me=new E(Be,"Remove",2);Be.className="ChangedEvent";Be.Transaction=De;Be.Property=Ce;Be.Insert=Le;Be.Remove=Me;function Ne(){this.w=(new H).freeze();this.va="";this.l=!1} +Ne.prototype.toString=function(a){var b="Transaction: "+this.name+" "+this.changes.count.toString()+(this.isComplete?"":", incomplete");if(void 0!==a&&0b&&a.Vc(b,d),b++);for(;a.length>b;)a.pop();a.freeze()}}; +na.Object.defineProperties(Ne.prototype,{changes:{configurable:!0,get:function(){return this.w}},name:{configurable:!0,get:function(){return this.va},set:function(a){this.va=a}},isComplete:{configurable:!0,get:function(){return this.l},set:function(a){this.l=a}}});Ne.prototype.optimize=Ne.prototype.Bw;Ne.prototype.redo=Ne.prototype.redo;Ne.prototype.canRedo=Ne.prototype.canRedo;Ne.prototype.undo=Ne.prototype.undo;Ne.prototype.canUndo=Ne.prototype.canUndo; +Ne.prototype.clear=Ne.prototype.clear;Ne.className="Transaction";function Oe(){this.tv=new I;this.sd=!1;this.L=(new H).freeze();this.ce=-1;this.w=999;this.Ce=!1;this.Zr=null;this.ij=0;this.l=!1;F&&(this.l=!0);this.Je=(new H).freeze();this.fm=new H;this.cv=!0;this.iv=this.xs=this.mv=this.lv=!1} +Oe.prototype.toString=function(a){var b="UndoManager "+this.historyIndex+"<"+this.history.count+"<="+this.maxHistoryLength;b+="[";for(var c=this.nestedTransactionNames.count,d=0;da.transactionLevel&&Ea("Ending transaction without having started a transaction: "+c);var d=1===a.transactionLevel,e=a.currentTransaction;d&&b&&(a.isInternalTransaction||a.Gb("CommittingTransaction",c,e));var f=0;if(0a.historyIndex;d--)f=b.M(d),null!==f&&f.clear(),b.jb(d),a.xs=!0;d=a.maxHistoryLength;0<=d&&(0===d?b.clear():b.count>=d&&(f=b.M(0),null!==f&&f.clear(),b.jb(0),a.ce--));0===d||0!==b.count&&b.get(b.count-1)===e||(b.add(e),a.ce++);b.freeze()}a.isInternalTransaction||a.Gb("CommittedTransaction",c,e)}else{a.Ce=!0;try{a.isEnabled&&null!==e&&(e.isComplete=!0,e.undo())}finally{a.isInternalTransaction|| +a.Gb("RolledBackTransaction",c,e),a.Ce=!1}null!==e&&e.clear()}a.Zr=null;a.isPendingClear&&a.clear();a.isPendingClear=!1;a.isPendingUnmodified=!1;return!0}if(a.isEnabled&&!b&&null!==e){a=f;c=e.changes;for(e=c.count-1;e>=a;e--)b=c.M(e),null!==b&&b.undo(),c.ka(),c.jb(e);c.freeze()}return!1}Oe.prototype.canUndo=function(){if(!this.isEnabled||0=this.transactionLevel&&!this.cv&&(a=a.diagram,null!==a&&!1===a.Bj||Ea("Change not within a transaction: "+c.toString()))}}; +Oe.prototype.skipsEvent=function(a){if(null===a||0>a.change.value)return!0;a=a.object;if(null===a)return!1;if(void 0!==a.layer){if(a=a.layer,null!==a&&a.isTemporary)return!0}else if(a.isTemporary)return!0;return!1}; +na.Object.defineProperties(Oe.prototype,{models:{configurable:!0,get:function(){return this.tv.iterator}},isEnabled:{configurable:!0,get:function(){return this.sd},set:function(a){this.sd=a}},transactionToUndo:{configurable:!0,get:function(){return 0<=this.historyIndex&&this.historyIndex<=this.history.count-1?this.history.M(this.historyIndex):null}},transactionToRedo:{configurable:!0,get:function(){return this.historyIndexe&&(e=-3),0g&&(g=-3);if(void 0===h||void 0===e||void 0===g||0===e&&0===g||b.shift)!b.shift&&a.allowVerticalScroll?(f=3*f*a.scrollVerticalLineChange,0e||Math.abs(b.y-a.y)>d}; +na.Object.defineProperties(Qe.prototype,{diagram:{configurable:!0,get:function(){return this.C},set:function(a){a instanceof R&&(this.C=a)}},name:{configurable:!0,get:function(){return this.va},set:function(a){A(a,"string",Qe,"name");this.va=a}},isEnabled:{configurable:!0,get:function(){return this.sd},set:function(a){A(a,"boolean",Qe,"isEnabled");this.sd=a}},isActive:{configurable:!0,get:function(){return this.Yc},set:function(a){A(a,"boolean", +Qe,"isActive");this.Yc=a}},transactionResult:{configurable:!0,get:function(){return this.xx},set:function(a){null!==a&&A(a,"string",Qe,"transactionResult");this.xx=a}}});Qe.prototype.stopTransaction=Qe.prototype.Vg;Qe.prototype.startTransaction=Qe.prototype.Ca;Qe.className="Tool";function Ta(){Qe.call(this);this.name="ToolManager";this.Ic=new H;this.Zc=new H;this.Ud=new H;this.W=this.Pa=850;this.w=(new Fb(2,2)).ia();this.kb=5E3;this.Qa=Ue;this.L=We;this.Yr=this.l=null;this.vk=-1} +ma(Ta,Qe);Ta.prototype.initializeStandardTools=function(){};Ta.prototype.updateAdornments=function(a){var b=this.currentToolTip;if(b instanceof Ve&&this.Yr===a){var c=b.adornedObject;(null!==a?c.part===a:null===c)?this.showToolTip(b,c):this.hideToolTip()}}; +Ta.prototype.doMouseDown=function(){var a=this.diagram,b=a.lastInput;b.isTouchEvent&&this.gestureBehavior===Xe&&(b.bubbles=!1);if(b.isMultiTouch){this.cancelWaitAfter();if(this.gestureBehavior===Ye){b.bubbles=!0;return}if(this.gestureBehavior===Xe)return;if(a.currentTool.canStartMultiTouch()){a.currentTool.standardPinchZoomStart();return}}var c=a.undoManager;F&&c.checksTransactionLevel&&0!==c.transactionLevel&&Ea("WARNING: In ToolManager.doMouseDown: UndoManager.transactionLevel is not zero");c=this.mouseDownTools.length; +for(var d=0;de.right&&(c.x-=d.width+5/b.scale);c.xe.bottom?c.y-(d.height+5/b.scale):c.y+20/b.scale;c.yc.pointsCount)){var d=a.diagram;if(!d.isReadOnly){var e=a.Cg;if(null!==e){var f=null,g=null;null===c.fromNode&&(f=Lf(a,c.i(0),!1),null!==f&&(g=f.part));var h=null,k=null;null===c.toNode&&(h=Lf(a,c.i(c.pointsCount-1),!0),null!==h&&(k=h.part));e.isValidLink(g,f,k,h)?b?(c.defaultFromPoint=c.i(0),c.defaultToPoint=c.i(c.pointsCount-1),c.suspendsRouting=!1,c.fromNode=g,null!==f&&(c.fromPortId=f.portId),c.toNode=k,null!==h&&(c.toPortId=h.portId),c.fromPort!== +d.$y&&d.U("LinkRelinked",c,d.$y),c.toPort!==d.az&&d.U("LinkRelinked",c,d.az)):Mf(e,g,f,k,h):Mf(e,null,null,null,null)}}}}gf.prototype.doDragOver=function(){}; +function Nf(a,b){var c=a.diagram;a.dragsLink&&Hf(a,!0);qf(a);var d=a.findDragOverObject(b),e=c.lastInput;e.targetObject=d;if(null!==d){e.handled=!1;for(var f=d;null!==f;){var g=f.mouseDrop;if(null!==g&&(g(e,f),e.handled))break;Of(a,e,f);f=Kf(f)}}else f=c.mouseDrop,null!==f&&f(e);if(a.isActive||null!==jf){for(e=(a.copiedParts||a.draggedParts).iterator;e.next();)f=e.key,f instanceof V&&f.linksConnected.each(function(a){a.suspendsRouting=!1});a.doDropOnto(b,d);if(a.isActive||null!==jf){a=L.alloc();for(b= +c.selection.iterator;b.next();)d=b.value,d instanceof V&&Pf(c,d,a);L.free(a)}}}function Of(a,b,c){a=a.diagram;c=c.part;!a.handlesDragDropForTopLevelParts||!c.isTopLevel||c instanceof If||(c=a.mouseDrop,null!==c&&c(b))}function Pf(a,b,c){var d=!1;b.getAvoidableRect(c);a.viewportBounds.Te(c)&&(d=!0);a=a.jw(c,function(a){return a.part},function(a){return a instanceof S},!0,function(a){return a instanceof S},d);if(0!==a.count)for(a=a.iterator;a.next();)c=a.value,!c.Qd(b)&&c.isAvoiding&&c.Za()} +gf.prototype.doDropOnto=function(){};gf.prototype.doMouseMove=function(){if(this.isActive){var a=this.diagram,b=a.lastInput;this.simulatedMouseMove(b.event,b.documentPoint,b.targetDiagram)||null===this.currentPart||null===this.draggedParts||(this.mayCopy()?(Cf(this,!1),mf(a,this.copiedParts),Ef(this,this.copiedParts,!1),rf(a,this.copiedParts)):this.mayMove()?(uf(this),Ef(this,this.draggedParts,!0)):this.mayDragOut()?(Cf(this,!1),Ef(this,this.copiedParts,!1)):uf(this),Gf(this,a.lastInput.documentPoint))}}; +gf.prototype.doMouseUp=function(){if(this.isActive){var a=this.diagram,b=a.lastInput;if(!this.simulatedMouseUp(b.event,b.documentPoint,b.targetDiagram)){b=!1;var c=this.mayCopy();c&&null!==this.copiedParts?(uf(this),Cf(this,!0),mf(a,this.copiedParts),Ef(this,this.copiedParts,!1),rf(a,this.copiedParts),null!==this.copiedParts&&(a.U("ChangingSelection",a.selection),a.clearSelection(!0),this.copiedParts.iteratorKeys.each(function(a){a.isSelected=!0}))):(b=!0,uf(this),this.mayMove()&&(Ef(this,this.draggedParts, +!0),Gf(this,a.lastInput.documentPoint)));this.ho=!0;Nf(this,a.lastInput.documentPoint);if(this.isActive){var d=c?this.copiedParts.Wf():this.draggedParts.Wf();this.copiedParts=null;b&&Qf(this);a.Ta();rf(a,this.draggedParts);this.transactionResult=c?"Copy":"Move";a.U(c?"SelectionCopied":"SelectionMoved",d)}this.stopTool();c&&a.U("ChangedSelection",a.selection)}}}; +gf.prototype.simulatedMouseMove=function(a,b,c){if(null===jf)return!1;var d=jf.diagram;c instanceof R||(c=null);var e=nf;c!==e&&(null!==e&&e!==d&&(e.Vf(),jf.isDragOutStarted=!1,e=e.toolManager.findTool("Dragging"),null!==e&&e.doSimulatedDragLeave()),nf=c,null!==c&&c!==d&&(Af(),e=c.toolManager.findTool("Dragging"),null!==e&&(sf.contains(e)||sf.add(e),e.doSimulatedDragEnter())));if(null===c||c===d||!c.allowDrop||c.isReadOnly||!c.allowInsert)return!1;d=c.toolManager.findTool("Dragging");null!==d&&(null!== +a&&(void 0!==a.targetTouches&&(0g&&(g=l),m>h&&(h=m))}}Infinity===d?f.h(0,0,0,0):f.h(d,e,g-d,h-e);d=f.x+f.width/2;e=f.y+f.height/2;L.free(f); +f=a.vt;g=new Bb;h=J.alloc();for(k=b.iterator;k.next();)l=k.value,l instanceof S&&l.canCopy()&&(m=c.J(l),null!==m&&(m.points=l.points,Df(m,f.x-d,f.y-e),m.suspendsRouting=!0,g.add(m,a.Jd())));for(b=b.iterator;b.next();)l=b.value,l.Tc()&&l.canCopy()&&(k=c.J(l),null!==k&&(l=l.location,h.h(f.x-(d-l.x),f.y-(e-l.y)),k.location=h,k.Ya(),g.add(k,a.Jd(h))));J.free(h);a.copiedParts=g;kf(a,g.Wf());null!==a.draggedLink&&(c=a.draggedLink,b=c.routeBounds,Df(c,a.startPoint.x-(b.x+b.width/2),a.startPoint.y-(b.y+b.height/ +2)))}}}gf.prototype.doSimulatedDragOut=function(){var a=this.diagram;a.zu=!1;this.mayCopy()||this.mayMove()?a.currentCursor="":a.currentCursor=this.nodropCursor;this.So=null};gf.prototype.computeMove=function(a,b,c,d){c=this.diagram;return null!==c?c.computeMove(a,b,this.dragOptions,d):new J}; +na.Object.defineProperties(gf.prototype,{isCopyEnabled:{configurable:!0,get:function(){return this.Zc},set:function(a){A(a,"boolean",gf,"isCopyEnabled");this.Zc=a}},copiesEffectiveCollection:{configurable:!0,get:function(){return this.L},set:function(a){A(a,"boolean",gf,"copiesEffectiveCollection");this.L=a}},dragOptions:{configurable:!0,get:function(){return this.Qa},set:function(a){w(a,hf,gf,"dragOptions");this.Qa=a}},isGridSnapEnabled:{configurable:!0, +enumerable:!0,get:function(){return this.dragOptions.isGridSnapEnabled},set:function(a){A(a,"boolean",gf,"isGridSnapEnabled");this.dragOptions.isGridSnapEnabled=a}},isComplexRoutingRealtime:{configurable:!0,get:function(){return this.Ic},set:function(a){A(a,"boolean",gf,"isComplexRoutingRealtime");this.Ic=a}},isGridSnapRealtime:{configurable:!0,get:function(){return this.dragOptions.isGridSnapRealtime},set:function(a){A(a,"boolean",gf,"isGridSnapRealtime");this.dragOptions.isGridSnapRealtime= +a}},gridSnapCellSize:{configurable:!0,get:function(){return this.dragOptions.gridSnapCellSize},set:function(a){w(a,Fb,gf,"gridSnapCellSize");this.dragOptions.gridSnapCellSize.A(a)||(a=a.K(),this.dragOptions.gridSnapCellSize=a)}},gridSnapCellSpot:{configurable:!0,get:function(){return this.dragOptions.gridSnapCellSpot},set:function(a){w(a,N,gf,"gridSnapCellSpot");this.dragOptions.gridSnapCellSpot.A(a)||(a=a.K(),this.dragOptions.gridSnapCellSpot=a)}},gridSnapOrigin:{configurable:!0, +enumerable:!0,get:function(){return this.dragOptions.gridSnapOrigin},set:function(a){w(a,J,gf,"gridSnapOrigin");this.dragOptions.gridSnapOrigin.A(a)||(a=a.K(),this.dragOptions.gridSnapOrigin=a)}},dragsLink:{configurable:!0,get:function(){return this.dragOptions.dragsLink},set:function(a){A(a,"boolean",gf,"dragsLink");this.dragOptions.dragsLink=a}},dragsTree:{configurable:!0,get:function(){return this.dragOptions.dragsTree},set:function(a){A(a,"boolean",gf,"dragsTree"); +this.dragOptions.dragsTree=a}},copyCursor:{configurable:!0,get:function(){return this.W},set:function(a){this.W=a}},moveCursor:{configurable:!0,get:function(){return this.gi},set:function(a){this.gi=a}},nodropCursor:{configurable:!0,get:function(){return this.hi},set:function(a){this.hi=a}},currentPart:{configurable:!0,get:function(){return this.Pa},set:function(a){null!==a&&w(a,U,gf,"currentPart");this.Pa=a}},copiedParts:{configurable:!0, +get:function(){return this.w},set:function(a){this.w=a}},draggedParts:{configurable:!0,get:function(){return this.kb},set:function(a){this.kb=a}},draggingParts:{configurable:!0,get:function(){return null!==this.copiedParts?this.copiedParts.Wf():null!==this.draggedParts?this.draggedParts.Wf():this.Ar}},draggedLink:{configurable:!0,get:function(){return this.diagram.draggedLink},set:function(a){null!==a&&w(a,S,gf,"draggedLink");this.diagram.draggedLink=a}}, +isDragOutStarted:{configurable:!0,get:function(){return this.Ud},set:function(a){this.Ud=a}},startPoint:{configurable:!0,get:function(){return this.vt},set:function(a){w(a,J,gf,"startPoint");this.vt.A(a)||this.vt.assign(a)}},delay:{configurable:!0,get:function(){return this.Bl},set:function(a){A(a,"number",gf,"delay");this.Bl=a}}});gf.prototype.getDraggingSource=gf.prototype.FA;var sf=null,jf=null,nf=null;gf.className="DraggingTool";sf=new H; +Sa("draggingTool",function(){return this.findTool("Dragging")},function(a){this.fb("Dragging",a,this.mouseMoveTools)});Ta.prototype.doCancel=function(){null!==jf&&jf.doCancel();Qe.prototype.doCancel.call(this)}; +function Tf(){0=d&&(d=.1);var e=this,f=b.Qg(c,d,function(b){return e.findValidLinkablePort(b,a)},null,!0);d=Infinity;b=null;for(f=f.iterator;f.next();){var g=f.value,h=g.part;if(h instanceof V){var k=g.ja(Kc,J.alloc()),l=c.x-k.x,m=c.y-k.y;J.free(k);k=l*l+m*m;kc){if(null!==this.originalLink&&a===this.originalFromNode&&b===this.originalFromPort)return!0;b=b.portId;null===b&&(b="");if(a.Sq(b).count>=c)return!1}return!0}; +Tf.prototype.isValidTo=function(a,b){if(null===a||null===b)return this.isUnconnectedLinkValid;if(this.diagram.currentTool===this&&(null!==a.layer&&!a.layer.allowLink||!0!==b.toLinkable))return!1;var c=b.toMaxLinks;if(Infinity>c){if(null!==this.originalLink&&a===this.originalToNode&&b===this.originalToPort)return!0;b=b.portId;null===b&&(b="");if(a.Od(b).count>=c)return!1}return!0}; +Tf.prototype.isInSameNode=function(a,b){if(null===a||null===b)return!1;if(a===b)return!0;a=a.part;b=b.part;return null!==a&&a===b};Tf.prototype.isLinked=function(a,b){if(null===a||null===b)return!1;var c=a.part;if(!(c instanceof V))return!1;a=a.portId;null===a&&(a="");var d=b.part;if(!(d instanceof V))return!1;b=b.portId;null===b&&(b="");for(b=d.Od(b);b.next();)if(d=b.value,d.fromNode===c&&d.fromPortId===a)return!0;return!1}; +Tf.prototype.isValidLink=function(a,b,c,d){if(!this.isValidFrom(a,b)||!this.isValidTo(c,d)||!(null===b||null===d||(b.fromLinkableSelfNode&&d.toLinkableSelfNode||!this.isInSameNode(b,d))&&(b.fromLinkableDuplicates&&d.toLinkableDuplicates||!this.isLinked(b,d)))||null!==this.originalLink&&(null!==a&&this.isLabelDependentOnLink(a,this.originalLink)||null!==c&&this.isLabelDependentOnLink(c,this.originalLink))||null!==a&&null!==c&&(null===a.data&&null!==c.data||null!==a.data&&null===c.data)||!this.isValidCycle(a, +c,this.originalLink))return!1;if(null!==a){var e=a.linkValidation;if(null!==e&&!e(a,b,c,d,this.originalLink))return!1}if(null!==c&&(e=c.linkValidation,null!==e&&!e(a,b,c,d,this.originalLink)))return!1;e=this.linkValidation;return null!==e?e(a,b,c,d,this.originalLink):!0};Tf.prototype.isLabelDependentOnLink=function(a,b){if(null===a)return!1;var c=a.labeledLink;if(null===c)return!1;if(c===b)return!0;var d=new I;d.add(a);return Yf(this,c,b,d)}; +function Yf(a,b,c,d){if(b===c)return!0;var e=b.fromNode;if(null!==e&&e.isLinkLabel&&(d.add(e),Yf(a,e.labeledLink,c,d)))return!0;b=b.toNode;return null!==b&&b.isLinkLabel&&(d.add(b),Yf(a,b.labeledLink,c,d))?!0:!1} +Tf.prototype.isValidCycle=function(a,b,c){void 0===c&&(c=null);if(null===a||null===b)return this.isUnconnectedLinkValid;var d=this.diagram.validCycle;if(d!==Zf){if(d===$f){d=c||this.temporaryLink;if(null!==d&&!d.isTreeLink)return!0;for(d=b.linksConnected;d.next();){var e=d.value;if(e!==c&&e.isTreeLink&&e.toNode===b)return!1}return!ag(this,a,b,c,!0)}if(d===bg){d=c||this.temporaryLink;if(null!==d&&!d.isTreeLink)return!0;for(d=a.linksConnected;d.next();)if(e=d.value,e!==c&&e.isTreeLink&&e.fromNode=== +a)return!1;return!ag(this,a,b,c,!0)}if(d===cg)return a===b?a=!0:(d=new I,d.add(b),a=dg(this,d,a,b,c)),!a;if(d===eg)return!ag(this,a,b,c,!1);if(d===fg)return a===b?a=!0:(d=new I,d.add(b),a=gg(this,d,a,b,c)),!a}return!0};function ag(a,b,c,d,e){if(b===c)return!0;if(null===b||null===c)return!1;for(var f=b.linksConnected;f.next();){var g=f.value;if(g!==d&&(!e||g.isTreeLink)&&g.toNode===b&&(g=g.fromNode,g!==b&&ag(a,g,c,d,e)))return!0}return!1} +function dg(a,b,c,d,e){if(c===d)return!0;if(null===c||null===d||b.contains(c))return!1;b.add(c);for(var f=c.linksConnected;f.next();){var g=f.value;if(g!==e&&g.toNode===c&&(g=g.fromNode,g!==c&&dg(a,b,g,d,e)))return!0}return!1}function gg(a,b,c,d,e){if(c===d)return!0;if(null===c||null===d||b.contains(c))return!1;b.add(c);for(var f=c.linksConnected;f.next();){var g=f.value;if(g!==e){var h=g.fromNode;g=g.toNode;h=h===c?g:h;if(h!==c&&gg(a,b,h,d,e))return!0}}return!1} +na.Object.defineProperties(Tf.prototype,{portGravity:{configurable:!0,get:function(){return this.hi},set:function(a){A(a,"number",Tf,"portGravity");0<=a&&(this.hi=a)}},isUnconnectedLinkValid:{configurable:!0,get:function(){return this.Qa},set:function(a){A(a,"boolean",Tf,"isUnconnectedLinkValid");this.Qa=a}},linkingCursor:{configurable:!0,get:function(){return this.Ai},set:function(a){this.Ai=a}},temporaryLink:{configurable:!0,get:function(){return this.vx}, +set:function(a){w(a,S,Tf,"temporaryLink");this.vx=a}},temporaryFromNode:{configurable:!0,get:function(){return this.ux},set:function(a){w(a,V,Tf,"temporaryFromNode");if(this.ux=a)this.l=a.port}},temporaryFromPort:{configurable:!0,get:function(){return this.l},set:function(a){w(a,O,Tf,"temporaryFromPort");if(null!==this.l){var b=this.l.panel;if(null!==b){var c=b.$.indexOf(this.l);b.jb(c);b.Bb(c,a)}}this.l=a}},temporaryToNode:{configurable:!0,get:function(){return this.wx}, +set:function(a){w(a,V,Tf,"temporaryToNode");if(this.wx=a)this.w=a.port}},temporaryToPort:{configurable:!0,get:function(){return this.w},set:function(a){w(a,O,Tf,"temporaryToPort");if(null!==this.w){var b=this.w.panel;if(null!==b){var c=b.$.indexOf(this.w);b.jb(c);b.Bb(c,a)}}this.w=a}},originalLink:{configurable:!0,get:function(){return this.Zc},set:function(a){null!==a&&w(a,S,Tf,"originalLink");this.Zc=a}},originalFromNode:{configurable:!0,get:function(){return this.kb}, +set:function(a){null!==a&&w(a,V,Tf,"originalFromNode");this.kb=a}},originalFromPort:{configurable:!0,get:function(){return this.Ic},set:function(a){null!==a&&w(a,O,Tf,"originalFromPort");this.Ic=a}},originalToNode:{configurable:!0,get:function(){return this.Ud},set:function(a){null!==a&&w(a,V,Tf,"originalToNode");this.Ud=a}},originalToPort:{configurable:!0,get:function(){return this.gi},set:function(a){null!==a&&w(a,O,Tf,"originalToPort");this.gi=a}},isForwards:{configurable:!0, +enumerable:!0,get:function(){return this.Pa},set:function(a){A(a,"boolean",Tf,"isForwards");this.Pa=a}},validPortsCache:{configurable:!0,get:function(){return this.sz}},targetPort:{configurable:!0,get:function(){return this.tx},set:function(a){null!==a&&w(a,O,Tf,"targetPort");this.tx=a}},linkValidation:{configurable:!0,get:function(){return this.Ti},set:function(a){null!==a&&A(a,"function",Tf,"linkValidation");this.Ti=a}},portTargeted:{configurable:!0, +get:function(){return this.Ar},set:function(a){null!==a&&A(a,"function",Tf,"portTargeted");this.Ar=a}}});Tf.className="LinkingBaseTool";function hg(){0b.firstPickIndex+1&&c=c.x)b=0>=c.y?b+225:1<=c.y?b+135:b+180;else if(1<=c.x)0>=c.y?b+=315:1<=c.y&&(b+=45);else if(0>=c.y)b+=270;else if(1<=c.y)b+=90;else break a;0>b?b+=360:360<=b&&(b-=360);a.cursor=22.5>b?"e-resize":67.5>b?"se-resize":112.5>b?"s-resize":157.5>b?"sw-resize":202.5>b?"w-resize":247.5>b?"nw-resize":292.5>b?"n-resize":337.5>b?"ne-resize": +"e-resize"}else if(a instanceof W)for(a=a.elements;a.next();)this.updateResizeHandles(a.value,b)};vg.prototype.canStart=function(){if(!this.isEnabled)return!1;var a=this.diagram;return!a.isReadOnly&&a.allowResize&&a.lastInput.left?null!==this.findToolHandleAt(a.firstInput.documentPoint,this.name):!1}; +vg.prototype.doActivate=function(){var a=this.diagram;null===this.handle&&(this.handle=this.findToolHandleAt(a.firstInput.documentPoint,this.name));null!==this.handle&&(this.adornedObject=this.handle.part.adornedObject,null!==this.adornedObject&&(a.isMouseCaptured=!0,a.animationManager.Hc(),this.Ca(this.name),this.Us.set(this.adornedObject.ja(this.handle.alignment.Aw())),this.Ep.set(this.adornedObject.part.location),this.Ux.set(this.adornedObject.desiredSize),this.Yu=this.computeCellSize(),this.$u= +this.computeMinSize(),this.Zu=this.computeMaxSize(),this.isActive=!0))};vg.prototype.doDeactivate=function(){var a=this.diagram;this.Vg();this.re=this.handle=null;this.isActive=a.isMouseCaptured=!1};vg.prototype.doCancel=function(){null!==this.adornedObject&&(this.adornedObject.desiredSize=this.originalDesiredSize,this.adornedObject.part.location=this.originalLocation);this.stopTool()}; +vg.prototype.doMouseMove=function(){var a=this.diagram;if(this.isActive){var b=this.$u,c=this.Zu,d=this.Yu,e=this.adornedObject.Zt(a.lastInput.documentPoint,J.alloc()),f=this.computeReshape();b=this.computeResize(e,this.handle.alignment,b,c,d,f);this.resize(b);a.od();J.free(e)}}; +vg.prototype.doMouseUp=function(){var a=this.diagram;if(this.isActive){var b=this.$u,c=this.Zu,d=this.Yu,e=this.adornedObject.Zt(a.lastInput.documentPoint,J.alloc()),f=this.computeReshape();b=this.computeResize(e,this.handle.alignment,b,c,d,f);this.resize(b);J.free(e);a.Ta();this.transactionResult=this.name;a.U("PartResized",this.adornedObject,this.originalDesiredSize)}this.stopTool()}; +vg.prototype.resize=function(a){var b=this.diagram,c=this.adornedObject;if(null!==c){c.desiredSize=a.size;a=c.part;a.Ya();c=c.ja(this.handle.alignment.Aw());if(a instanceof If){var d=new H;d.add(a);if(!this.dragsMembers&&null===a.placeholder){var e=new hf;e.dragsMembers=!1}b.moveParts(d,this.oppositePoint.copy().oe(c),!0,e)}else a.location=a.location.copy().oe(c).add(this.oppositePoint);b.od()}}; +vg.prototype.computeResize=function(a,b,c,d,e,f){b.Sb()&&(b=Kc);var g=this.adornedObject.naturalBounds,h=g.x,k=g.y,l=g.x+g.width,m=g.y+g.height,n=1;if(!f){n=g.width;var p=g.height;0>=n&&(n=1);0>=p&&(p=1);n=p/n}p=J.alloc();K.Tq(a.x,a.y,h,k,e.width,e.height,p);a=g.copy();0>=b.x?0>=b.y?(a.x=Math.max(p.x,l-d.width),a.x=Math.min(a.x,l-c.width),a.width=Math.max(l-a.x,c.width),a.y=Math.max(p.y,m-d.height),a.y=Math.min(a.y,m-c.height),a.height=Math.max(m-a.y,c.height),f||(1<=a.height/a.width?(a.height=Math.max(Math.min(n* +a.width,d.height),c.height),a.width=a.height/n):(a.width=Math.max(Math.min(a.height/n,d.width),c.width),a.height=n*a.width),a.x=l-a.width,a.y=m-a.height)):1<=b.y?(a.x=Math.max(p.x,l-d.width),a.x=Math.min(a.x,l-c.width),a.width=Math.max(l-a.x,c.width),a.height=Math.max(Math.min(p.y-k,d.height),c.height),f||(1<=a.height/a.width?(a.height=Math.max(Math.min(n*a.width,d.height),c.height),a.width=a.height/n):(a.width=Math.max(Math.min(a.height/n,d.width),c.width),a.height=n*a.width),a.x=l-a.width)):(a.x= +Math.max(p.x,l-d.width),a.x=Math.min(a.x,l-c.width),a.width=l-a.x,f||(a.height=Math.max(Math.min(n*a.width,d.height),c.height),a.width=a.height/n,a.y=k+.5*(m-k-a.height))):1<=b.x?0>=b.y?(a.width=Math.max(Math.min(p.x-h,d.width),c.width),a.y=Math.max(p.y,m-d.height),a.y=Math.min(a.y,m-c.height),a.height=Math.max(m-a.y,c.height),f||(1<=a.height/a.width?(a.height=Math.max(Math.min(n*a.width,d.height),c.height),a.width=a.height/n):(a.width=Math.max(Math.min(a.height/n,d.width),c.width),a.height=n*a.width), +a.y=m-a.height)):1<=b.y?(a.width=Math.max(Math.min(p.x-h,d.width),c.width),a.height=Math.max(Math.min(p.y-k,d.height),c.height),f||(1<=a.height/a.width?(a.height=Math.max(Math.min(n*a.width,d.height),c.height),a.width=a.height/n):(a.width=Math.max(Math.min(a.height/n,d.width),c.width),a.height=n*a.width))):(a.width=Math.max(Math.min(p.x-h,d.width),c.width),f||(a.height=Math.max(Math.min(n*a.width,d.height),c.height),a.width=a.height/n,a.y=k+.5*(m-k-a.height))):0>=b.y?(a.y=Math.max(p.y,m-d.height), +a.y=Math.min(a.y,m-c.height),a.height=m-a.y,f||(a.width=Math.max(Math.min(a.height/n,d.width),c.width),a.height=n*a.width,a.x=h+.5*(l-h-a.width))):1<=b.y&&(a.height=Math.max(Math.min(p.y-k,d.height),c.height),f||(a.width=Math.max(Math.min(a.height/n,d.width),c.width),a.height=n*a.width,a.x=h+.5*(l-h-a.width)));J.free(p);return a};vg.prototype.computeReshape=function(){var a=zg;this.adornedObject instanceof Uf&&(a=Ng(this.adornedObject));return!(a===Og||this.diagram.lastInput.shift)}; +vg.prototype.computeMinSize=function(){var a=this.adornedObject.minSize.copy(),b=this.minSize;!isNaN(b.width)&&b.width>a.width&&(a.width=b.width);!isNaN(b.height)&&b.height>a.height&&(a.height=b.height);return a};vg.prototype.computeMaxSize=function(){var a=this.adornedObject.maxSize.copy(),b=this.maxSize;!isNaN(b.width)&&b.widthc?c+=360:360<=c&&(c-=360);c=Math.round(45*Math.round(c/45));var d=this.handleDistance;0===c?b.x=a.naturalBounds.width+d:45===c?(b.x=a.naturalBounds.width+d,b.y=a.naturalBounds.height+d):90===c?b.y=a.naturalBounds.height+d:135===c?(b.x=-d,b.y=a.naturalBounds.height+d):180===c?b.x=-d:225===c?(b.x=-d,b.y=-d):270===c?b.y=-d:315===c&&(b.x=a.naturalBounds.width+ +d,b.y=-d);return a.ja(b)};Pg.prototype.doDeactivate=function(){var a=this.diagram;this.Vg();this.re=this.handle=null;this.bt=new J(NaN,NaN);this.isActive=a.isMouseCaptured=!1};Pg.prototype.doCancel=function(){this.diagram.delaysLayout=!1;this.rotate(this.originalAngle);this.stopTool()};Pg.prototype.doMouseMove=function(){var a=this.diagram;this.isActive&&(a=this.computeRotate(a.lastInput.documentPoint),this.rotate(a))}; +Pg.prototype.doMouseUp=function(){var a=this.diagram;if(this.isActive){a.delaysLayout=!1;var b=this.computeRotate(a.lastInput.documentPoint);this.rotate(b);a.Ta();this.transactionResult=this.name;a.U("PartRotated",this.adornedObject,this.originalAngle)}this.stopTool()}; +Pg.prototype.rotate=function(a){F&&C(a,Pg,"rotate:newangle");var b=this.adornedObject;if(null!==b){b.angle=a;b=b.part;b.Ya();var c=b.locationObject,d=b.rotateObject;if(c===d||c.Sg(d))c=this.Ep.copy(),b.location=c.oe(this.rotationPoint).rotate(a-this.originalAngle).add(this.rotationPoint);this.diagram.od()}}; +Pg.prototype.computeRotate=function(a){a=this.rotationPoint.Va(a)-this.handleAngle;var b=this.adornedObject.panel;null!==b&&(a-=b.wj());360<=a?a-=360:0>a&&(a+=360);b=Math.min(Math.abs(this.snapAngleMultiple),180);var c=Math.min(Math.abs(this.snapAngleEpsilon),b/2);!this.diagram.lastInput.shift&&0b-c&&(a=(Math.floor(a/b)+1)*b));360<=a?a-=360:0>a&&(a+=360);return a}; +na.Object.defineProperties(Pg.prototype,{handleArchetype:{configurable:!0,get:function(){return this.w},set:function(a){null!==a&&w(a,O,Pg,"handleArchetype");this.w=a}},handle:{configurable:!0,get:function(){return this.l},set:function(a){if(null!==a&&(w(a,O,Pg,"handle"),!(a.part instanceof Ve)))throw Error("new handle is not in an Adornment: "+a);this.l=a}},adornedObject:{configurable:!0,get:function(){return this.re},set:function(a){if(null!==a&&(w(a,O, +Pg,"handle"),a.part instanceof Ve))throw Error("new handle must not be in an Adornment: "+a);this.re=a}},snapAngleMultiple:{configurable:!0,get:function(){return this.Qa},set:function(a){A(a,"number",Pg,"snapAngleMultiple");this.Qa=a}},snapAngleEpsilon:{configurable:!0,get:function(){return this.Pa},set:function(a){A(a,"number",Pg,"snapAngleEpsilon");this.Pa=a}},originalAngle:{configurable:!0,get:function(){return this.Tx}},rotationPoint:{configurable:!0, +enumerable:!0,get:function(){return this.bt},set:function(a){this.bt=a.copy()}},handleAngle:{configurable:!0,get:function(){return this.L},set:function(a){A(a,"number",Pg,"handleAngle");this.L=a}},handleDistance:{configurable:!0,get:function(){return this.W},set:function(a){A(a,"number",Pg,"handleDistance");this.W=a}}});Pg.className="RotatingTool";Sa("rotatingTool",function(){return this.findTool("Rotating")},function(a){this.fb("Rotating",a,this.mouseDownTools)}); +function Qg(){Qe.call(this);0e.right&&(c.x-=d.width+5/b.scale);c.xe.bottom&&(c.y-=d.height+5/b.scale);c.ya.lastInput.clickCount?!1:!0};hh.prototype.doStart=function(){rh=this;null!==this.textBlock&&this.doActivate()}; +hh.prototype.doActivate=function(){if(!this.isActive){var a=this.diagram;if(null!==a){var b=this.textBlock;null===b&&(b=a.ac(a.lastInput.documentPoint));if(null!==b&&b instanceof ih&&(this.textBlock=b,null!==b.part)){this.isActive=!0;this.oa=oh;var c=this.defaultTextEditor;null!==b.textEditor&&(c=b.textEditor);this.Kh=this.textBlock.copy();var d=new L(this.textBlock.ja(Ec),this.textBlock.ja(Oc));a.Ow(d);c.show(b,a,this);this.currentTextEditor=c}}}};hh.prototype.doCancel=function(){this.stopTool()}; +hh.prototype.doMouseUp=function(){this.canStart()&&this.doActivate()};hh.prototype.doMouseDown=function(){this.isActive&&this.acceptText(sh)};hh.prototype.acceptText=function(a){switch(a){case sh:if(this.oa===uh)this.currentTextEditor instanceof HTMLElement&&this.currentTextEditor.focus();else if(this.oa===oh||this.oa===qh||this.oa===ph)this.oa=vh,wh(this);break;case xh:case mh:case nh:if(mh!==a||!0!==this.textBlock.isMultiline)if(this.oa===oh||this.oa===qh||this.oa===ph)this.oa=vh,wh(this)}}; +function wh(a){var b=a.textBlock,c=a.diagram,d=a.currentTextEditor;if(null!==b&&null!==d){var e=b.text,f="";null!==d.valueFunction&&(f=d.valueFunction());a.isValidText(b,e,f)?(a.Ca(a.name),a.oa=uh,a.transactionResult=a.name,b.text=f,a.doSuccess(e,f),null!==c&&c.U("TextEdited",b,e),a.Vg(),a.stopTool(),null!==c&&c.doFocus()):(a.oa=qh,a.doError(e,f))}} +hh.prototype.doError=function(a,b){var c=this.textBlock;null!==c.errorFunction&&c.errorFunction(this,a,b);(a=this.currentTextEditor)&&a.show(c,this.diagram,this)};hh.prototype.doSuccess=function(a,b){var c=this.textBlock;null!==c.textEdited&&c.textEdited(c,a,b)};hh.prototype.doDeactivate=function(){var a=this.diagram;null!==a&&(this.oa=kh,this.textBlock=null,null!==this.currentTextEditor&&this.currentTextEditor.hide(a,this),this.isActive=!1)};hh.prototype.doStop=function(){rh=null}; +hh.prototype.isValidText=function(a,b,c){w(a,ih,hh,"isValidText:textblock");var d=this.textValidation;if(null!==d&&!d(a,b,c))return!1;d=a.textValidation;return null===d||d(a,b,c)?!0:!1};hh.prototype.Zy=function(a){var b=this.Kh;b.text=a;b.measure(this.textBlock.Pi,Infinity);return b}; +na.Object.defineProperties(hh.prototype,{textBlock:{configurable:!0,get:function(){return this.Qa},set:function(a){null!==a&&w(a,ih,hh,"textBlock");this.Qa=a}},currentTextEditor:{configurable:!0,get:function(){return this.w},set:function(a){this.w=a}},defaultTextEditor:{configurable:!0,get:function(){return this.l},set:function(a){!F||a instanceof ef||v("TextEditingTool.defaultTextEditor must be an HTMLInfo.");this.l=a}},starting:{configurable:!0, +get:function(){return this.Pa},set:function(a){gb(a,hh,hh,"starting");this.Pa=a}},textValidation:{configurable:!0,get:function(){return this.gj},set:function(a){null!==a&&A(a,"function",hh,"textValidation");this.gj=a}},minimumEditorScale:{configurable:!0,get:function(){return this.L},set:function(a){null!==a&&A(a,"number",hh,"minimumEditorScale");this.L=a}},selectsTextOnActivate:{configurable:!0,get:function(){return this.W},set:function(a){null!==a&&A(a, +"boolean",hh,"selectsTextOnActivate");this.W=a}},state:{configurable:!0,get:function(){return this.oa},set:function(a){this.oa!==a&&(gb(a,hh,hh,"starting"),this.oa=a)}}});hh.prototype.measureTemporaryTextBlock=hh.prototype.Zy; +var xh=new E(hh,"LostFocus",0),sh=new E(hh,"MouseDown",1),nh=new E(hh,"Tab",2),mh=new E(hh,"Enter",3),yh=new E(hh,"SingleClick",0),jh=new E(hh,"SingleClickSelected",1),th=new E(hh,"DoubleClick",2),kh=new E(hh,"StateNone",0),oh=new E(hh,"StateActive",1),ph=new E(hh,"StateEditing",2),vh=new E(hh,"StateValidating",3),qh=new E(hh,"StateInvalid",4),uh=new E(hh,"StateValidated",5),rh=null;hh.className="TextEditingTool";hh.LostFocus=xh;hh.MouseDown=sh;hh.Tab=nh;hh.Enter=mh;hh.SingleClick=yh; +hh.SingleClickSelected=jh;hh.DoubleClick=th;hh.StateNone=kh;hh.StateActive=oh;hh.StateEditing=ph;hh.StateValidating=vh;hh.StateInvalid=qh;hh.StateValidated=uh;Sa("textEditingTool",function(){return this.findTool("TextEditing")},function(a){this.fb("TextEditing",a,this.mouseUpTools)}); +function zh(){Ah||(Bh(),Ah=!0);this.C=Re;this.Ml=this.sf=this.yc=this.Cs=this.pc=!1;this.gy=!0;this.Nl=Ch;this.Gn=!1;this.Ki=this.sd=!0;this.kh=600;this.Ex=this.ey=!1;this.cf=new I;this.Xd=new Dh;this.Xd.$c=this;this.Kj=new I;this.Gv=new I;this.Bt=new I;this.mm=new I}zh.prototype.me=function(a){this.C=a};zh.prototype.canStart=function(){return!0};function Eh(a,b){Fh(a,b)&&(a.sf=!0)} +function Fh(a,b){if(!a.sd||!a.canStart(b))return!1;a.cf.add(b);a.defaultAnimation.isAnimating&&a.Hc();return a.yc=!0} +function Gh(a){if(a.sd&&a.yc){var b=a.Xd,c=a.C,d=a.cf.contains("Model");d&&(a.Ml=!0,a.Nl===Ch?(b.isViewportUnconstrained=!0,b.rc.clear(),b.add(c,"position",c.position.copy().offset(0,-200),c.position),b.add(c,"opacity",0,1)):a.Nl===Hh&&b.rc.clear(),a.gy=a.Nl===Ih&&c.ft.A(c.ra)?!0:!1,c.U("InitialAnimationStarting",a));d&&!a.Ki||0===b.rc.count?(a.cf.clear(),a.yc=!1,a.sf=!1,b.rc.clear(),Jh(b,c),a.Ml=!1,c.P()):(a.cf.clear(),c.Re=!1,d=b.rc.get(c),c.autoScale!==Kh&&null!==d&&(delete d.start.scale,delete d.end.scale), +qa.requestAnimationFrame(function(){!1===a.yc||b.pc||(c.Xe("temporaryPixelRatio")&&lf(c),Lh(c),a.yc=!1,a.sf=!1,b.start(),Mh(a),c.Ta(),Nh(b,0),Rf(c,!0),Oh(a),c.U("AnimationStarting",a))}))}}function ai(a,b,c,d){a.isTicking||b instanceof S&&(null!==b.fromNode||null!==b.toNode)||a.Xd.add(b,"position",c,d,!1)}t=zh.prototype;t.pu=function(a){return this.Xd.pu(a)};t.tw=function(a){return this.Xd.tw(a)}; +function bi(a,b){function c(){0f?f+=360:k+=360);f=e(c,f,k-f,d)%360;g=e(c,g,l-g,d);h=e(c,h,m-h,d);c=e(c,a,b-a,d);return"hsla("+f+", "+g+"%, "+h+"%, "+c+")"} +function Bh(){function a(a,b,e,f,g,h){a.position=new J(f(g,b.x,e.x-b.x,h),f(g,b.y,e.y-b.y,h))}var b=new Bb;b.add("position:diagram",a);b.add("position",a);b.add("position:part",function(a,b,e,f,g,h){ga&&za(a,">= 1",zh,"duration");this.kh=a}},isAnimating:{configurable:!0, +enumerable:!0,get:function(){return this.pc}},isTicking:{configurable:!0,get:function(){return this.Cs}},isInitial:{configurable:!0,get:function(){return this.Ki},set:function(a){A(a,"boolean",zh,"isInitial");this.Ki=a}},defaultAnimation:{configurable:!0,get:function(){return this.Xd}},activeAnimations:{configurable:!0,get:function(){return this.Kj}},initialAnimationStyle:{configurable:!0,get:function(){return this.Nl},set:function(a){F&& +gb(a,zh,zh,"initialAnimationStyle");this.Nl=a}}});zh.prototype.stopAnimation=zh.prototype.Hc;var ii=null,Ah=!1,Ch=new E(zh,"Default",1),Ih=new E(zh,"AnimateLocations",2),Hh=new E(zh,"None",3);zh.className="AnimationManager";zh.defineAnimationEffect=function(a,b){Ah||(Bh(),Ah=!0);ii.add(a,b)};zh.Default=Ch;zh.AnimateLocations=Ih;zh.None=Hh; +function Dh(){this.Kv=this.by=this.$c=this.C=null;this.Vl=this.pc=this.l=!1;this.no=this.Kd=0;this.Wr=this.Xu=ji;this.Ul=this.Sp=!1;this.Av=1;this.zv=0;this.Bd=this.kh=NaN;this.Ix=0;this.oo=null;this.w=Mb;this.rc=new Bb;this.vv=new Bb;this.Dm=new I;this.wv=new I;this.Fx=ki}Dh.prototype.suspend=function(){this.Vl=!0};Dh.prototype.advanceTo=function(a,b){b&&(this.Vl=!1);this.Sp&&a>=this.Bd&&(this.Ul=!0,a-=this.Bd);this.Ix=a;ci(this,!0);Mh(this.$c);Rf(this.C);Oh(this.$c);this.C.redraw()}; +function Jh(a,b){a.vv.clear();a.Ul=!1;a.zv=0;a.Bd=NaN;0a.no?a.Bd:d-a.Kd;b&&(e=a.Ix,ea.no&&(a.Sp&&!a.Ul?(a.Kd=+new Date,a.no=a.Kd+a.Bd,a.Ul=!0):a.Lm(!1))}}} +function Nh(a,b){for(var c=a.Bd,d=a.rc.iterator,e=a.Ul;d.next();){var f=d.key;if(!(f instanceof O&&null===f.diagram)){var g=d.value,h=e?g.end:g.start;g=e?g.start:g.end;var k=ii,l;for(l in g)"position"===l&&(g["position:placeholder"]||g["position:nodeCollapse"])||null===k.get(l)||k.get(l)(f,h[l],g[l],a.Wr,b,c,a)}}}t.stop=function(){this.pc&&this.Lm(!0)}; +t.Lm=function(a){null!==this.Kv&&this.Kv.Zp.remove(this.by);if(this.pc){var b=this.C,c=this.$c;this.Vl=this.pc=c.Ml=!1;Mh(c);for(var d=this.rc,e=this.Dm.iterator;e.next();)b.remove(e.value);for(e=this.wv.iterator;e.next();)e.value.u();e=this.Sp;d=d.iterator;for(var f=ii;d.next();){var g=d.key,h=d.value,k=e?h.end:h.start,l=e?h.start:h.end,m=h.ew,n;for(n in l)if(null!==f.get(n)){var p=n;!h.Xv||"position:nodeCollapse"!==p&&"position:placeholder"!==p||(p="position");f.get(p)(g,k[n],void 0!==m[n]?m[n]: +h.Xv?k[n]:l[n],this.Wr,this.Bd,this.Bd,this)}h.Xv&&void 0!==m.location&&g instanceof U&&(g.location=m.location);h.Gw&&g instanceof U&&g.Ub(!1)}b.ku.clear();vf(b,!1);b.Ta();b.P();Rf(b,!0);if(c.defaultAnimation===this){for(n=c.mm.iterator;n.next();)e=n.value,null!==e.wf&&(e.points=e.wf,e.wf=null);c.mm.clear()}this.isViewportUnconstrained&&(b.scrollMode=this.Fx);Oh(c);this.zv++;!a&&this.Av>this.zv?(this.Ul=!1,this.start()):(this.oo&&this.oo(this),Jh(this,null),c.Lm(this),b.Jb())}}; +t.yk=function(a,b){var c=b.actualBounds,d=null;b instanceof If&&(d=b.placeholder);null!==d?(c=d.ja(Ec),d=d.padding,c.x+=d.left,c.y+=d.top,this.add(a,"position",c,a.position,!1)):this.add(a,"position",new J(c.x+c.width/2,c.y+c.height/2),a.position,!1);this.add(a,"scale",.01,a.scale,!1);if(a instanceof If)for(a=a.memberParts;a.next();)d=a.value,d instanceof V&&this.yk(d,b)}; +t.wk=function(a,b){if(a.isVisible()){var c=null;b instanceof If&&(c=b.placeholder);null!==c?this.add(a,"position:placeholder",a.position,c,!0):this.add(a,"position:nodeCollapse",a.position,b,!0);this.add(a,"scale",a.scale,.01,!0);c=this.rc;c.contains(a)&&(c.J(a).Gw=!0);if(a instanceof If)for(a=a.memberParts;a.next();)c=a.value,c instanceof V&&this.wk(c,b)}};t.JA=function(a){var b=this.vv.get(a);null===b&&(b={},this.vv.add(a,b));return b}; +na.Object.defineProperties(Dh.prototype,{duration:{configurable:!0,get:function(){return this.kh},set:function(a){A(a,"number",Dh,"duration");1>a&&za(a,">= 1",Dh,"duration");this.kh=a}},reversible:{configurable:!0,get:function(){return this.Sp},set:function(a){this.Sp=a}},runCount:{configurable:!0,get:function(){return this.Av},set:function(a){0a?c/2*a*a+b:-c/2*(--a*(a-2)-1)+b}function li(a,b,c,d){return a===d?b+c:c*(-Math.pow(2,-10*a/d)+1)+b}Dh.className="Animation";Dh.EaseLinear=function(a,b,c,d){return c*a/d+b};Dh.EaseInOutQuad=ji;Dh.EaseInQuad=function(a,b,c,d){return c*(a/=d)*a+b};Dh.EaseOutQuad=function(a,b,c,d){return-c*(a/=d)*(a-2)+b};Dh.EaseInExpo=function(a,b,c,d){return 0===a?b:c*Math.pow(2,10*(a/d-1))+b};Dh.EaseOutExpo=li; +function ri(a,b,c){this.start=a;this.end=b;this.ew={};this.Xv=c;this.Gw=!1}ri.className="AnimationState";function si(a,b,c){this.vd=null;this.uf=a;this.qq=c||ti;this.nl=null;void 0!==b&&(this.nl=b,void 0===c&&(this.qq=ui))}si.prototype.copy=function(){var a=new si(this.uf);a.qq=this.qq;var b=this.nl;if(null!==b){var c={};void 0!==b.duration&&(c.Dy=b.duration);void 0!==b.finished&&(c.Dy=b.finished);void 0!==b.easing&&(c.Dy=b.easing);a.nl=c}return a}; +function vi(a,b){a=a.nl;null!==a&&(a.duration&&(b.duration=a.duration),a.finished&&(b.finished=a.finished),a.easing&&(b.easing=a.easing))} +na.Object.defineProperties(si.prototype,{propertyName:{configurable:!0,get:function(){return this.uf},set:function(a){this.uf=a}},animationSettings:{configurable:!0,get:function(){return this.nl},set:function(a){this.nl=a}},startCondition:{configurable:!0,get:function(){return this.qq},set:function(a){F&&gb(a,si,si,"startCondition");this.qq=a}}});var ti=new E(si,"Default",1),ui=new E(si,"Immediate",2),wi=new E(si,"Bundled",3);si.className="AnimationTrigger"; +si.Default=ti;si.Immediate=ui;si.Bundled=wi;function xi(){0=a)return b;for(var c=0,d=0,e=0,f=0,g=0,h=this.Ja.iterator;h.next();){var k=h.value;k instanceof If?e++:k instanceof V?d++:k instanceof S?f++:k instanceof Ve?g++:c++}h="";0c.kp||h.height*e>c.kp?b.sc(a,c):(e=b.actualBounds,f=b.naturalBounds,0===e.width||0===e.height||isNaN(e.x)|| +isNaN(e.y)||!b.isVisible()||(c=b.transform,null!==b.areaBackground&&(Ai(b,a,b.areaBackground,!0,!0,f,e),a.fillRect(e.x,e.y,e.width,e.height)),null===b.areaBackground&&null===b.background&&(Ai(b,a,"rgba(0,0,0,0.3)",!0,!1,f,e),a.fillRect(e.x,e.y,e.width,e.height)),null!==b.background&&(a.transform(c.m11,c.m12,c.m21,c.m22,c.dx,c.dy),Ai(b,a,b.background,!0,!1,f,e),a.fillRect(0,0,f.width/2,f.height/2),c.gu()||(b=1/(c.m11*c.m22-c.m12*c.m21),a.transform(c.m22*b,-c.m12*b,-c.m21*b,c.m11*b,b*(c.m21*c.dy-c.m22* +c.dx),b*(c.m12*c.dx-c.m11*c.dy))))));d&&(a.restore(),a.Ac(!0))}};t.g=function(a,b,c,d,e){var f=this.diagram;null!==f&&f.ab(Ce,a,this,b,c,d,e)};t.zj=function(a,b,c){var d=this.Ja;b.Qi=this;if(a>=d.count)a=d.count;else if(d.M(a)===b)return-1;d.Bb(a,b);b.Zq(c);d=this.diagram;null!==d&&(c?d.P():d.zj(b));Bi(this,a,b);return a}; +t.Rc=function(a,b,c){if(!c&&b.layer!==this&&null!==b.layer)return b.layer.Rc(a,b,c);var d=this.Ja;if(0>a||a>=d.length){if(a=d.indexOf(b),0>a)return-1}else if(d.M(a)!==b&&(a=d.indexOf(b),0>a))return-1;b.$q(c);d.jb(a);d=this.diagram;null!==d&&(c?d.P():d.Rc(b));b.Qi=null;return a}; +function Bi(a,b,c){b=Ci(a,b,c);if(c instanceof If&&null!==c&&isNaN(c.zOrder)){if(0!==c.memberParts.count){for(var d=-1,e=a.Ja.j,f=e.length,g=0;gd&&h.containingGroup===c&&(d=g,0<=b))break}!(0>d)&&d=e)return b;0>b&&(b=a.indexOf(c));if(0>b)return-1;for(var f=b-1,g=NaN;0<=f;){g=a.M(f).zOrder;if(!isNaN(g))break;f--}for(var h=b+1,k=NaN;hd)for(;;){if(-1===f||g<=d){f++;if(f===b)break;a.jb(b);a.Bb(f,c);return f}for(g=NaN;0<=--f&&(g=a.M(f).zOrder,isNaN(g)););}else if(!isNaN(k)&&k=d){h--;if(h===b)break;a.jb(b);a.Bb(h,c);return h}for(k=NaN;++h< +e&&(k=a.M(h).zOrder,isNaN(k)););}return b} +na.Object.defineProperties(xi.prototype,{parts:{configurable:!0,get:function(){return this.Ja.iterator}},partsBackwards:{configurable:!0,get:function(){return this.Ja.iteratorBackwards}},diagram:{configurable:!0,get:function(){return this.C}},name:{configurable:!0,get:function(){return this.va},set:function(a){A(a,"string",xi,"name");var b=this.va;if(b!==a){var c=this.diagram;if(null!==c)for(""===b&&v("Cannot rename default Layer to: "+a),c= +c.layers;c.next();)c.value.name===a&&v("Layer.name is already present in this diagram: "+a);this.va=a;this.g("name",b,a);for(a=this.Ja.iterator;a.next();)a.value.layerName=this.va}}},opacity:{configurable:!0,get:function(){return this.nb},set:function(a){var b=this.nb;b!==a&&(A(a,"number",xi,"opacity"),(0>a||1=a)return b;for(var c=this.Ra.iterator;c.next();)b+="\n "+c.value.toString(a-1);return b};R.prototype.addEventListener=function(a,b,c,d){a.addEventListener(b,c,{capture:d,passive:!1})}; +R.prototype.removeEventListener=function(a,b,c,d){a.removeEventListener(b,c,{capture:d})}; +function Xi(a){var b=a.Da.Oa;b instanceof HTMLCanvasElement&&(a.Lj?(a.addEventListener(b,"pointerdown",a.Zk,!1),a.addEventListener(b,"pointermove",a.$k,!1),a.addEventListener(b,"pointerup",a.bl,!1),a.addEventListener(b,"pointerout",a.al,!1)):(a.addEventListener(b,"touchstart",a.bx,!1),a.addEventListener(b,"touchmove",a.ax,!1),a.addEventListener(b,"touchend",a.$w,!1),a.addEventListener(b,"mousemove",a.Tk,!1),a.addEventListener(b,"mousedown",a.Sk,!1),a.addEventListener(b,"mouseup",a.Vk,!1),a.addEventListener(b, +"mouseout",a.Uk,!1)),a.addEventListener(b,"mouseenter",a.eA,!1),a.addEventListener(b,"mouseleave",a.fA,!1),a.addEventListener(b,"wheel",a.Wk,!1),a.addEventListener(b,"keydown",a.VA,!1),a.addEventListener(b,"keyup",a.WA,!1),a.addEventListener(b,"blur",a.Rz,!1),a.addEventListener(b,"focus",a.Sz,!1),a.addEventListener(b,"selectstart",function(a){a.preventDefault();return!1},!1),a.addEventListener(b,"contextmenu",function(a){a.preventDefault();return!1},!1),a.addEventListener(b,"gesturestart",function(b){a.toolManager.gestureBehavior!== +Ye&&(a.toolManager.gestureBehavior===Xe?b.preventDefault():a.Be&&a.lastInput.handled||(b.preventDefault(),a.hm=a.scale,a.currentTool.doCancel()))},!1),a.addEventListener(b,"gesturechange",function(b){if(a.toolManager.gestureBehavior!==Ye)if(a.toolManager.gestureBehavior===Xe)b.preventDefault();else if(!a.Be||!a.lastInput.handled){b.preventDefault();var c=b.scale;if(null!==a.hm){var e=a.Da.getBoundingClientRect();b=new J(b.pageX-qa.scrollX-a.Fa/e.width*e.left,b.pageY-qa.scrollY-a.Ea/e.height*e.top); +c=a.hm*c;e=a.commandHandler;if(c!==a.scale&&e.canResetZoom(c)){var f=a.zoomPoint;a.zoomPoint=b;e.resetZoom(c);a.zoomPoint=f}}}},!1),a.addEventListener(qa,"resize",a.mx,!1))}function lf(a){30p&&(this.position=q.h(-(this.kt.scrollWidth-this.Fa)+u-this.Fa/c+k,this.position.y))),a.zz&&this.allowVerticalScroll&&(fr&&(this.position=q.h(this.position.x, +-(this.kt.scrollHeight-this.Ea)+a.scrollTop-this.Ea/c+d))),J.free(q),ij(this),this.Hi=this.aq=!1,b=this.documentBounds,c=this.viewportBounds,k=b.right,p=c.right,d=b.bottom,r=c.bottom,e=b.x,l=c.x,f=b.y,b=c.y,m>=g&&e>=l&&k<=p&&(this.bq.style.width="1px"),n>=h&&f>=b&&d<=r&&(this.bq.style.height="1px"))}};R.prototype.computeBounds=function(){0c&&(b=c),ba.maxScale&&(b=a.maxScale),b):b===rj?(b=k>h?(g-a.wb)/d:(f-a.wb)/e,b>c&&(b=c),ba.maxScale&&(b=a.maxScale),b):a.scale} +R.prototype.zoomToFit=function(){var a=this.dj;this.dj=ki;this.scale=mj(this,qj);a!==ki&&(lj(this,!1),nj(this,this.documentBounds,this.Fa/this.Ga,this.Ea/this.Ga,this.Pj,!1));this.dj=a};t=R.prototype; +t.GB=function(a,b){void 0===b&&(b=qj);var c=a.width,d=a.height;if(!(0===c||0===d||isNaN(c)&&isNaN(d))){var e=1;if(b===qj||b===rj)if(isNaN(c))e=this.viewportBounds.height*this.scale/d;else if(isNaN(d))e=this.viewportBounds.width*this.scale/c;else{e=this.Fa;var f=this.Ea;e=b===rj?f/d>e/c?(f-(this.ze?this.wb:0))/d:(e-(this.kf?this.wb:0))/c:Math.min(f/d,e/c)}this.scale=e;this.position=new J(a.x,a.y)}}; +t.Kz=function(a,b){this.Ya();var c=this.documentBounds,d=this.viewportBounds;this.position=new J(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))};t.EA=function(a){if(a instanceof O){this.po=a;var b=J.alloc();this.qo=this.vr(a.ja(Ec,b));J.free(b)}else this.po=null,this.qo=Qb}; +function nj(a,b,c,d,e,f){var g=J.allocAt(a.ra.x,a.ra.y),h=g.x,k=g.y;if(null!==a.po){var l=J.alloc();l=a.po.ja(Ec,l);h=l.x-a.qo.x/a.scale;k=l.y-a.qo.y/a.scale;e=Bc;J.free(l)}if(f||a.scrollMode===ki)e.eb()&&(c>b.width&&(h=b.x+(e.x*b.width+e.offsetX)-(e.x*c-e.offsetX)),d>b.height&&(k=b.y+(e.y*b.height+e.offsetY)-(e.y*d-e.offsetY))),e=a.cj,f=c-b.width,cb.left?h=b.left:hb.top?k=b.top:kb.targetTouches.length)return;b=b.targetTouches[c]}else if(null!==a.nk[0])b=a.nk[c];else return;c=a.Da;null!==c&&(c=c.getBoundingClientRect(),d.h(b.clientX-a.Fa/c.width*c.left,b.clientY-a.Ea/c.height*c.top))}R.prototype.Ta=function(){this.Gi||(this.Gi=!0,this.Jb(!0))};function Cj(a){a.gc||jj(a);a.Ya()}R.prototype.redraw=function(){this.Yb||this.gc||(this.P(),oj(this),ij(this),this.Ta(),this.od())};t=R.prototype;t.UA=function(){return this.Re}; +t.$z=function(a){void 0===a&&(a=null);var b=this.animationManager,c=b.isEnabled;b.Hc();b.isEnabled=!1;Rf(this);this.Ae=!1;this.ft=new J(NaN,NaN);b.isEnabled=c;this.gc=!0;var d=this;null!==a&&ta(function(){d.gc=!1;Eh(b,"Model");a(d)},1)};t.Jb=function(a){void 0===a&&(a=!1);if(!0!==this.Re&&!(this.Yb||!1===a&&this.gc)){this.Re=!0;var b=this;qa.requestAnimationFrame(function(){b.Re&&b.od()})}};t.od=function(){if(!this.Wj||this.Re)this.Wj&&(this.Wj=!1),Rf(this)}; +function pj(a,b,c){a.animationManager.defaultAnimation.isAnimating||a.Yb||!a.Hi||$i(a)||(b&&jj(a),c&&lj(a,!1))} +function Rf(a,b){if(!a.gc&&(a.Re=!1,null!==a.Ka||a.Fm.o())){a.gc=!0;var c=a.animationManager,d=a.im;if(!c.isAnimating&&0!==d.length){for(var e=d.j,f=e.length,g=0;gb;b++){var c=a.Cd.iterator;if(null===c||0===a.Cd.count)break;a.Cd=new I;a.lx(c,a.Cd);F&&22===b&&Ea("failure to validate parts")}a.nodes.each(function(a){a instanceof If&&0!==(a.T&65536)!==!1&&(a.T=a.T^65536)})}} +t.lx=function(a,b){for(a.reset();a.next();){var c=a.value;!c.Tc()||c instanceof If||(c.Dj()?(c.measure(Infinity,Infinity),c.arrange()):b.add(c))}for(a.reset();a.next();)c=a.value,c instanceof If&&c.isVisible()&&Hj(this,c);for(a.reset();a.next();)c=a.value,c instanceof S&&c.isVisible()&&(c.Dj()?(c.measure(Infinity,Infinity),c.arrange()):b.add(c));for(a.reset();a.next();)c=a.value,c instanceof Ve&&c.isVisible()&&(c.Dj()?(c.measure(Infinity,Infinity),c.arrange()):b.add(c))}; +function Hj(a,b){for(var c=Ma(),d=Ma(),e=b.memberParts;e.next();){var f=e.value;f.isVisible()&&(f instanceof If?(Ij(f)||Jj(f)||Kj(f))&&Hj(a,f):f instanceof S?f.fromNode===b||f.toNode===b?d.push(f):c.push(f):(f.measure(Infinity,Infinity),f.arrange()))}a=c.length;for(e=0;ec&&(r=z.left,q=z.right),p.height>x&&(u=z.top,y=z.bottom)): +(r=z.left,q=z.right,u=z.top,y=z.bottom);z=p.width+r+q;var B=p.height+u+y;r=p.x-r;var D=n.x;q=p.right+q;var G=n.right+h;u=p.y-u;var M=n.y;p=p.bottom+y;n=n.bottom+k;var Y="1px",Q="1px";y=a.scale;l=z>l/y;m=B>m/y;a.scrollMode===ki&&(l||m)&&(l&&a.hasHorizontalScrollbar&&a.allowHorizontalScroll&&(l=1,r+1G+1&&(l=Math.max((q-G)*y+a.Fa,l)),c+h+1n+1&&(l=Math.max((p-n)*y+a.Ea,l)),x+k+1G+1&&(h=Math.max((q-G)*y+a.Fa,h)),c+1n+1&&(k=Math.max((p-n)*y+h,k)),x+1G+1&&(k=a.position.x*y));if(a.Tl)switch(a.et){case "negative":k=-(b.scrollWidth-k-b.clientWidth);break;case "reverse":k=b.scrollWidth-k-b.clientWidth}b.scrollLeft=k;a.hasVerticalScrollbar&&a.allowVerticalScroll&&(x+1n+1&&(b.scrollTop= +a.position.y*y));l=a.Fa;m=a.Ea;b.style.width=l+(a.kf?a.wb:0)+"px";b.style.height=m+(a.ze?a.wb:0)+"px";return d!==l||e!==m||a.animationManager.yc?(a.onViewportBoundsChanged(f,a.viewportBounds,y,g),!1):!0}t=R.prototype; +t.add=function(a){w(a,U,R,"add:part");var b=a.diagram;if(b!==this&&(null!==b&&v("Cannot add part "+a.toString()+" to "+this.toString()+". It is already a part of "+b.toString()),b=this.Jk(a.layerName),null===b&&(b=this.Jk("")),null===b&&v('Cannot add a Part when unable find a Layer named "'+a.layerName+'" and there is no default Layer'),a.layer!==b)){var c=b.zj(99999999,a,a.diagram===this);0<=c&&this.ab(Le,"parts",b,null,a,null,c);b.isTemporary||this.Ta();a.D(1);c=a.layerChanged;null!==c&&c(a,null, +b)}};t.zj=function(a){this.partManager.zj(a);var b=this;Vj(a,function(a){Wj(b,a)});(a instanceof Ve||a instanceof If&&null!==a.placeholder)&&a.u();null!==a.data&&Vj(a,function(a){Xj(b.partManager,a)});!0!==Jj(a)&&!0!==Kj(a)||this.Cd.add(a);Yj(a,!0,this);Zj(a)?(a.actualBounds.o()&&this.P(Tj(a,a.actualBounds)),this.Ta()):a.isVisible()&&a.actualBounds.o()&&this.P(Tj(a,a.actualBounds));this.Jb()}; +t.Rc=function(a){a.Ak();this.partManager.Rc(a);var b=this;null!==a.data&&Vj(a,function(a){ak(b.partManager,a,b)});this.Cd.remove(a);Zj(a)?(a.actualBounds.o()&&this.P(Tj(a,a.actualBounds)),this.Ta()):a.isVisible()&&a.actualBounds.o()&&this.P(Tj(a,a.actualBounds));this.Jb()};t.remove=function(a){w(a,U,R,"remove:part");bk(this,a,!0)}; +function bk(a,b,c){var d=b.layer;null!==d&&d.diagram===a&&(b.isSelected=!1,b.isHighlighted=!1,b.D(2),c&&b.Gk(),c=d.Rc(-1,b,!1),0<=c&&a.ab(Me,"parts",d,b,null,c,null),a=b.layerChanged,null!==a&&a(b,d,null))}t.tu=function(a,b){void 0===b&&(b=!1);if(Ha(a))for(var c=a.length,d=0;dd&&this.Ta()}; +t.Ez=function(a,b){hk(this,a,b);a.me(this);var c=this.Ra,d=c.indexOf(a);0<=d&&(c.remove(a),null!==this.ic&&this.ab(Me,"layers",this,a,null,d,null));var e=c.count,f;for(f=0;fd&&this.Ta()}; +t.mB=function(a){w(a,xi,R,"removeLayer:layer");a.diagram!==this&&v("Cannot remove a Layer from another Diagram: "+a+" of "+a.diagram);if(""!==a.name){var b=this.Ra,c=b.indexOf(a);if(b.remove(a)){for(b=a.Ja.copy().iterator;b.next();){var d=b.value,e=d.layerName;e!==a.name?d.layerName=e:d.layerName=""}null!==this.ic&&this.ab(Me,"layers",this,a,null,c,null);this.P();this.Ta()}}};t.Jk=function(a){for(var b=this.layers;b.next();){var c=b.value;if(c.name===a)return c}return null}; +t.my=function(a){A(a,"function",R,"addModelChangedListener:listener");null===this.He&&(this.He=new H);this.He.add(a);this.model.Sh(a)};t.oB=function(a){A(a,"function",R,"removeModelChangedListener:listener");null!==this.He&&(this.He.remove(a),0===this.He.count&&(this.He=null));this.model.dl(a)};t.Sh=function(a){A(a,"function",R,"addChangedListener:listener");null===this.$f&&(this.$f=new H);this.$f.add(a)}; +t.dl=function(a){A(a,"function",R,"removeChangedListener:listener");null!==this.$f&&(this.$f.remove(a),0===this.$f.count&&(this.$f=null))};t.Mt=function(a){this.skipsUndoManager||this.model.skipsUndoManager||this.model.undoManager.pw(a);a.change!==De&&(this.isModified=!0);if(null!==this.$f)for(var b=this.$f,c=b.length,d=0;dn.Ja.indexOf(r)&&n.zj(p,r,q):(r.isSelected=!1,r.isHighlighted=!1,r.Rb(),n.Rc(q?p:-1,r,q)))}else n instanceof R?"number"===typeof p&&r instanceof xi&&(b?(r.me(this),this.Ra.Bb(p,r)):this.Ra.jb(p)):v("unknown ChangedEvent.Remove object: "+a.toString());this.isModified=!0}else d!==De&&v("unknown ChangedEvent: "+a.toString())}finally{this.skipsModelSourceBindings= +c}}};R.prototype.Ca=function(a){return this.undoManager.Ca(a)};R.prototype.cb=function(a){return this.undoManager.cb(a)};R.prototype.Uf=function(){return this.undoManager.Uf()};R.prototype.commit=function(a,b){void 0===b&&(b="");var c=this.skipsUndoManager;null===b&&(this.skipsUndoManager=!0,b="");this.undoManager.Ca(b);var d=!1;try{a(this),d=!0}finally{d?this.undoManager.cb(b):this.undoManager.Uf(),this.skipsUndoManager=c}};R.prototype.updateAllTargetBindings=function(a){this.partManager.updateAllTargetBindings(a)}; +R.prototype.xr=function(){this.partManager.xr()}; +function mk(a,b,c){var d=a.animationManager;if(a.Yb||a.gc)a.Ga=c,d.sf&&d.Xd.add(d.C,"scale",b,a.Ga);else if(null===a.Da)a.Ga=c;else{a.Yb=!0;var e=a.viewportBounds.copy(),f=a.Fa,g=a.Ea;e.width=a.Fa/b;e.height=a.Ea/b;var h=a.zoomPoint.x,k=a.zoomPoint.y,l=a.contentAlignment;isNaN(h)&&(l.Uc()?l.Qf(Rc)?h=0:l.Qf(Sc)&&(h=f-1):h=l.eb()?l.x*(f-1):f/2);isNaN(k)&&(l.Uc()?l.Qf(Pc)?k=0:l.Qf(Tc)&&(k=g-1):k=l.eb()?l.y*(g-1):g/2);null===a.scaleComputation||a.animationManager.defaultAnimation.isAnimating||(c=a.scaleComputation(a, +c));ca.maxScale&&(c=a.maxScale);f=J.allocAt(a.ra.x+h/b-h/c,a.ra.y+k/b-k/c);a.position=f;J.free(f);a.Ga=c;a.onViewportBoundsChanged(e,a.viewportBounds,b,!1);a.Yb=!1;lj(a,!1);d.sf&&d.Xd.add(d.C,"scale",b,a.Ga);a.P();oj(a)}} +R.prototype.onViewportBoundsChanged=function(a,b,c,d){if(!a.A(b)){void 0===d&&(d=!1);d||oj(this);ij(this);var e=this.layout;null===e||!e.isViewportSized||this.autoScale!==Kh||d||a.width===b.width&&a.height===b.height||e.D();e=this.currentTool;!0===this.kg&&e instanceof Ta&&(this.lastInput.documentPoint=this.Bu(this.lastInput.viewPoint),Ze(e,this));this.Yb||this.invalidateViewport(a,b);Ej(this);this.Oc.scale=c;this.Oc.position.x=a.x;this.Oc.position.y=a.y;this.Oc.bounds.assign(a);this.Oc.Tv.width= +Math.round(a.width*c);this.Oc.Tv.height=Math.round(a.height*c);this.Oc.yw.width=this.Fa;this.Oc.yw.height=this.Ea;this.Oc.vw=d;this.U("ViewportBoundsChanged",this.Oc,a);this.isVirtualized&&this.links.each(function(a){a.isAvoiding&&a.actualBounds.Sc(b)&&a.Za()})}}; +function Ej(a,b){void 0===b&&(b=null);var c=a.Ob;if(null!==c&&c.visible){for(var d=Fb.alloc(),e=1,f=1,g=c.$.j,h=g.length,k=0;km||(nk(l.figure)?f=f*m/K.Jy(f,m):e=e*m/K.Jy(e,m))}g=c.gridCellSize;d.h(f*g.width,e*g.height);if(null!==b)e=b.width,f=b.height,a=b.x,g=b.y;else{b=L.alloc();a=a.viewportBounds;b.h(a.x,a.y,a.width,a.height);if(!b.o()){L.free(b);return}e=b.width;f=b.height;a=b.x;g=b.y;L.free(b)}c.width=e+2*d.width;c.height=f+2*d.height;b=J.alloc();K.Tq(a, +g,0,0,d.width,d.height,b);b.offset(-d.width,-d.height);Fb.free(d);c.part.location=b;J.free(b)}}R.prototype.clearSelection=function(a){void 0===a&&(a=!1);var b=this.selection;if(0!==b.count){a||this.U("ChangingSelection",b);for(var c=b.ta(),d=c.length,e=0;e=d&&!f.defaultAnimation.isAnimating&&!f.yc&&(b||Eh(f,"Layout"));a.Zg=!1;for(var g=a.Oh.iterator;g.next();)wk(a,g.value,b,d);e.isValidLayout||(!b||e.isRealtime||null===e.isRealtime||0===d?(e.doLayout(a),jj(a),e.isValidLayout=!0):a.Zg=!0)}finally{b=a.undoManager.isInternalTransaction,0===d&&(a.cb("Layout"),a.undoManager.isInternalTransaction= +!1),!b||0!==d&&1!==d||Gh(f),a.ba=c}}}function wk(a,b,c,d){if(null!==b){for(var e=b.em.iterator;e.next();)wk(a,e.value,c,d);e=b.layout;null===e||e.isValidLayout||(!c||e.isRealtime||0===d?(b.bi=!b.location.o(),e.doLayout(b),b.D(32),Hj(a,b),e.isValidLayout=!0):a.Zg=!0)}}t.DA=function(){for(var a=new H,b=this.nodes;b.next();){var c=b.value;c.isTopLevel&&null===c.uj()&&a.add(c)}return a.iterator}; +function Fi(a){function b(a){var b=a.toLowerCase(),e=new H;c.add(a,e);c.add(b,e);d.add(a,a);d.add(b,a)}var c=new Bb,d=new Bb;b("InitialAnimationStarting");b("AnimationStarting");b("AnimationFinished");b("BackgroundSingleClicked");b("BackgroundDoubleClicked");b("BackgroundContextClicked");b("ClipboardChanged");b("ClipboardPasted");b("DocumentBoundsChanged");b("ExternalObjectsDropped");b("GainedFocus");b("InitialLayoutCompleted");b("LayoutCompleted");b("LinkDrawn");b("LinkRelinked");b("LinkReshaped"); +b("LostFocus");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");b("InvalidateDraw");a.es=c;a.ds=d} +function Qj(a,b){var c=a.ds.J(b);return null!==c?c:a.ds.J(b.toLowerCase())}function xk(a,b){var c=a.es.J(b);if(null!==c)return c;c=a.es.J(b.toLowerCase());if(null!==c)return c;v("Unknown DiagramEvent name: "+b)}t.xk=function(a,b){A(a,"string",R,"addDiagramListener:name");A(b,"function",R,"addDiagramListener:listener");a=xk(this,a);null!==a&&a.add(b)};t.Zm=function(a,b){A(a,"string",R,"removeDiagramListener:name");A(b,"function",R,"addDiagramListener:listener");a=xk(this,a);null!==a&&a.remove(b)}; +t.U=function(a,b,c){F&&A(a,"string",R,"raiseDiagramEvent:name");var d=xk(this,a),e=new Ae;e.diagram=this;a=Qj(this,a);null!==a&&(e.name=a);void 0!==b&&(e.subject=b);void 0!==c&&(e.parameter=c);b=d.length;if(1===b)d.M(0)(e);else if(0!==b)for(d=d.ta(),c=0;c=c.top&&0>=c.left&&0>=c.right&&0>=c.bottom)return b;var d=this.viewportBounds,e=this.scale;d=L.allocAt(0,0,d.width*e,d.height*e);var f=J.allocAt(0,0);if(a.x>=d.x&&a.xd.x+d.width-c.right&&this.allowHorizontalScroll&&(g=Math.max(this.scrollHorizontalLineChange, +1),g|=0,f.x+=g,a.x>d.x+d.width-c.right/2&&(f.x+=g),a.x>d.x+d.width-c.right/4&&(f.x+=4*g));a.y>=d.y&&a.yd.y+d.height-c.bottom&&this.allowVerticalScroll&&(g=Math.max(this.scrollVerticalLineChange,1),g|=0,f.y+=g,a.y>d.y+d.height-c.bottom/2&&(f.y+=g),a.y>d.y+d.height-c.bottom/4&&(f.y+=4*g));f.Wa(Mb)||(b=new J(b.x+f.x/e,b.y+f.y/e)); +L.free(d);J.free(f);return b};t=R.prototype;t.mu=function(){return null};t.ww=function(){return null};t.Iz=function(a,b){this.Yx.add(a,b)}; +function Sk(a,b,c){function d(){var a=+new Date;f=!0;for(g.reset();g.next();)if(!g.value[0].am){f=!1;break}f||a-l>k?b(c,e,h):qa.requestAnimationFrame(d)}for(var e=c.callback,f=!0,g=a.Bg.iterator;g.next();)if(!g.value[0].am){f=!1;break}if("function"!==typeof e||f)return b(c,e,a);var h=a,k=c.callbackTimeout||300,l=+new Date;qa.requestAnimationFrame(function(){d()});return null}t.$A=function(a){if(!gh)return null;void 0===a&&(a=new ib);a.returnType="Image";return this.Xy(a)}; +t.Xy=function(a){void 0===a&&(a=new ib);return Sk(this,this.aB,a)}; +t.aB=function(a,b,c){var d=Tk(c,a,"canvas",null);if(null===d)return null;c=d.aa.canvas;var e=null;if(null!==c)switch(e=a.returnType,void 0===e?e="string":e=e.toLowerCase(),e){case Uk+"data":e=d.getImageData(0,0,c.width,c.height);break;case Uk:d=(a.document||document).createElement("img");d.src=c.toDataURL(a.type,a.details);e=d;break;case "blob":"function"!==typeof b&&v('Error: Diagram.makeImageData called with "returnType: toBlob", but no required "callback" function property defined.');if("function"=== +typeof c.toBlob)return c.toBlob(b,a.type,a.details),"toBlob";if("function"===typeof c.msToBlob)return b(c.msToBlob()),"msToBlob";b(null);return null;default:e=c.toDataURL(a.type,a.details)}return"function"===typeof b?(b(e),null):e}; +function Tk(a,b,c,d){a.animationManager.Hc();a.od();if(null===a.Da)return null;"object"!==typeof b&&v("properties argument must be an Object.");var e=!1,f=b.size||null,g=b.scale||null;void 0!==b.scale&&isNaN(b.scale)&&(g="NaN");var h=b.maxSize;void 0===b.maxSize&&(e=!0,h="SVG"===c?new Fb(Infinity,Infinity):new Fb(2E3,2E3));var k=b.position||null,l=b.parts||null,m=void 0===b.padding?1:b.padding,n=b.background||null,p=b.omitTemporary;void 0===p&&(p=!0);var r=b.document||document,q=b.elementFinished|| +null,u=b.showTemporary;void 0===u&&(u=!p);b=b.showGrid;void 0===b&&(b=u);null!==f&&isNaN(f.width)&&isNaN(f.height)&&(f=null);"number"===typeof m?m=new hc(m):m instanceof hc||v("MakeImage padding must be a Margin or a number.");m.left=Math.max(m.left,0);m.right=Math.max(m.right,0);m.top=Math.max(m.top,0);m.bottom=Math.max(m.bottom,0);a.Mb.Ac(!0);p=new Vk(null,r);var y=p.context;if(!(f||g||l||k)){p.width=a.Fa+Math.ceil(m.left+m.right);p.height=a.Ea+Math.ceil(m.top+m.bottom);if("SVG"===c){if(null=== +d)return null;d.resize(p.width,p.height,p.width,p.height);d.ownerDocument=r;d.Qq=q;Oj(a,d.context,m,new Fb(p.width,p.height),a.Ga,a.ra,l,n,u,b);return d.context}a.Dl=!1;Oj(a,y,m,new Fb(p.width,p.height),a.Ga,a.ra,l,n,u,b);a.Dl=!0;return p.context}var x=a.co,z=a.documentBounds.copy();z.Xw(a.ob);if(u)for(var B=a.Ra.j,D=B.length,G=0;Gx?(g=x,f=z.width,z=z.height):(f=h.width,z=h.height)):(f=z.width*g,z=z.height*g):(g=x,f=z.width,z=z.height);null!==m?(f+=k,z+=T):m=new hc(0);null!==h&&(x=h.width,h=h.height, +"SVG"!==c&&e&&!Wk&&F&&(f>x||z>h)&&(Ea("Diagram.makeImage(data): Diagram width or height is larger than the default max size. ("+Math.ceil(f)+"x"+Math.ceil(z)+" vs 2000x2000) Consider increasing the max size."),Wk=!0),isNaN(x)&&(x=2E3),isNaN(h)&&(h=2E3),isFinite(x)&&(f=Math.min(f,x)),isFinite(h)&&(z=Math.min(z,h)));p.width=Math.ceil(f);p.height=Math.ceil(z);if("SVG"===c){if(null===d)return null;d.resize(p.width,p.height,p.width,p.height);d.ownerDocument=r;d.Qq=q;Oj(a,d.context,m,new Fb(Math.ceil(f), +Math.ceil(z)),g,B,l,n,u,b);return d.context}a.Dl=!1;Oj(a,y,m,new Fb(Math.ceil(f),Math.ceil(z)),g,B,l,n,u,b);a.Dl=!0;return p.context} +na.Object.defineProperties(R.prototype,{div:{configurable:!0,get:function(){return this.Ka},set:function(a){null!==a&&w(a,HTMLDivElement,R,"div");if(this.Ka!==a){var b=this.Ka;null!==b?(b.C=void 0,b.goDiagram=void 0,b.innerHTML="",null!==this.Da&&(b=this.Da.Oa,this.Lj?(this.removeEventListener(b,"pointermove",this.$k,!1),this.removeEventListener(b,"pointerdown",this.Zk,!1),this.removeEventListener(b,"pointerup",this.bl,!1),this.removeEventListener(b,"pointerout",this.al,!1)):(this.removeEventListener(b, +"touchstart",this.bx,!1),this.removeEventListener(b,"touchmove",this.ax,!1),this.removeEventListener(b,"touchend",this.$w,!1)),this.Da.zy()),this.lm&&(this.lm.disconnect(),this.lm=null),b=this.toolManager,null!==b&&(b.mouseDownTools.each(function(a){a.cancelWaitAfter()}),b.mouseMoveTools.each(function(a){a.cancelWaitAfter()}),b.mouseUpTools.each(function(a){a.cancelWaitAfter()})),b.cancelWaitAfter(),this.currentTool.doCancel(),this.Mb=this.Da=null,this.removeEventListener(qa,"resize",this.mx,!1), +this.Lj||(this.removeEventListener(qa,"mousemove",this.Tk,!0),this.removeEventListener(qa,"mousedown",this.Sk,!0),this.removeEventListener(qa,"mouseup",this.Vk,!0),this.removeEventListener(qa,"mouseout",this.Uk,!0)),this.removeEventListener(qa,"wheel",this.Wk,!0),Re===this&&(Re=null)):this.Ae=!1;this.Ka=null;if(null!==a){if(b=a.C)b.div=null;Pi(this,a);this.redraw()}}}},oy:{configurable:!0,get:function(){return this.qp}},Bj:{configurable:!0,get:function(){return this.Ae}}, +draggedLink:{configurable:!0,get:function(){return this.gs},set:function(a){this.gs!==a&&(this.gs=a,null!==a&&(this.Ss=a.fromPort,this.Ts=a.toPort))}},$y:{configurable:!0,get:function(){return this.Ss},set:function(a){this.Ss=a}},az:{configurable:!0,get:function(){return this.Ts},set:function(a){this.Ts=a}},animationManager:{configurable:!0,get:function(){return this.$c}},undoManager:{configurable:!0,get:function(){return this.ic.undoManager}}, +skipsUndoManager:{configurable:!0,get:function(){return this.Hg},set:function(a){A(a,"boolean",R,"skipsUndoManager");this.Hg=a;this.ic.skipsUndoManager=a}},delaysLayout:{configurable:!0,get:function(){return this.bs},set:function(a){this.bs=a}},opacity:{configurable:!0,get:function(){return this.nb},set:function(a){var b=this.nb;b!==a&&(A(a,"number",R,"opacity"),(0>a||1a&&za(a,">= 0",R,"scrollHorizontalLineChange"),this.it=a,this.g("scrollHorizontalLineChange",b,a))}},scrollVerticalLineChange:{configurable:!0,get:function(){return this.mt},set:function(a){var b=this.mt;b!==a&&(A(a,"number",R,"scrollVerticalLineChange"),0>a&&za(a,">= 0",R,"scrollVerticalLineChange"),this.mt=a,this.g("scrollVerticalLineChange",b,a))}},lastInput:{configurable:!0,get:function(){return this.th},set:function(a){F&&w(a,ye,R,"lastInput");this.th=a}},previousInput:{configurable:!0, +enumerable:!0,get:function(){return this.ud},set:function(a){F&&w(a,ye,R,"previousInput");this.ud=a}},firstInput:{configurable:!0,get:function(){return this.hg},set:function(a){F&&w(a,ye,R,"firstInput");this.hg=a}},currentCursor:{configurable:!0,get:function(){return this.Vr},set:function(a){""===a&&(a=this.bo);if(this.Vr!==a){A(a,"string",R,"currentCursor");var b=this.Da,c=this.Ka;if(null!==b){this.Vr=a;var d=b.style.cursor;b.style.cursor=a;c.style.cursor=a;b.style.cursor=== +d&&(b.style.cursor="-webkit-"+a,c.style.cursor="-webkit-"+a,b.style.cursor===d&&(b.style.cursor="-moz-"+a,c.style.cursor="-moz-"+a,b.style.cursor===d&&(b.style.cursor=a,c.style.cursor=a)))}}}},defaultCursor:{configurable:!0,get:function(){return this.bo},set:function(a){""===a&&(a="auto");var b=this.bo;b!==a&&(A(a,"string",R,"defaultCursor"),this.bo=a,this.g("defaultCursor",b,a))}},click:{configurable:!0,get:function(){return this.ag},set:function(a){var b=this.ag;b!== +a&&(null!==a&&A(a,"function",R,"click"),this.ag=a,this.g("click",b,a))}},doubleClick:{configurable:!0,get:function(){return this.fg},set:function(a){var b=this.fg;b!==a&&(null!==a&&A(a,"function",R,"doubleClick"),this.fg=a,this.g("doubleClick",b,a))}},contextClick:{configurable:!0,get:function(){return this.bg},set:function(a){var b=this.bg;b!==a&&(null!==a&&A(a,"function",R,"contextClick"),this.bg=a,this.g("contextClick",b,a))}},mouseOver:{configurable:!0, +get:function(){return this.xg},set:function(a){var b=this.xg;b!==a&&(null!==a&&A(a,"function",R,"mouseOver"),this.xg=a,this.g("mouseOver",b,a))}},mouseHover:{configurable:!0,get:function(){return this.vg},set:function(a){var b=this.vg;b!==a&&(null!==a&&A(a,"function",R,"mouseHover"),this.vg=a,this.g("mouseHover",b,a))}},mouseHold:{configurable:!0,get:function(){return this.ug},set:function(a){var b=this.ug;b!==a&&(null!==a&&A(a,"function",R,"mouseHold"),this.ug=a,this.g("mouseHold", +b,a))}},mouseDragOver:{configurable:!0,get:function(){return this.Ns},set:function(a){var b=this.Ns;b!==a&&(null!==a&&A(a,"function",R,"mouseDragOver"),this.Ns=a,this.g("mouseDragOver",b,a))}},mouseDrop:{configurable:!0,get:function(){return this.sg},set:function(a){var b=this.sg;b!==a&&(F&&null!==a&&A(a,"function",R,"mouseDrop"),this.sg=a,this.g("mouseDrop",b,a))}},handlesDragDropForTopLevelParts:{configurable:!0,get:function(){return this.qs},set:function(a){var b= +this.qs;b!==a&&(A(a,"boolean",R,"handlesDragDropForTopLevelParts"),this.qs=a,this.g("handlesDragDropForTopLevelParts",b,a))}},mouseEnter:{configurable:!0,get:function(){return this.tg},set:function(a){var b=this.tg;b!==a&&(null!==a&&A(a,"function",R,"mouseEnter"),this.tg=a,this.g("mouseEnter",b,a))}},mouseLeave:{configurable:!0,get:function(){return this.wg},set:function(a){var b=this.wg;b!==a&&(null!==a&&A(a,"function",R,"mouseLeave"),this.wg=a,this.g("mouseLeave",b,a))}}, +toolTip:{configurable:!0,get:function(){return this.Ig},set:function(a){var b=this.Ig;b!==a&&(!F||null===a||a instanceof Ve||a instanceof ef||v("Diagram.toolTip must be an Adornment or HTMLInfo."),this.Ig=a,this.g("toolTip",b,a))}},contextMenu:{configurable:!0,get:function(){return this.cg},set:function(a){var b=this.cg;b!==a&&(!F||a instanceof Ve||a instanceof ef||v("Diagram.contextMenu must be an Adornment or HTMLInfo."),this.cg=a,this.g("contextMenu",b,a))}},commandHandler:{configurable:!0, +enumerable:!0,get:function(){return this.Pr},set:function(a){this.Pr!==a&&(this.Pr=a,a.me(this))}},toolManager:{configurable:!0,get:function(){return this.Ct},set:function(a){this.Ct!==a&&(w(a,Ta,R,"toolManager"),this.Ct=a,a.diagram=this)}},defaultTool:{configurable:!0,get:function(){return this.$r},set:function(a){var b=this.$r;b!==a&&(w(a,Qe,R,"defaultTool"),this.$r=a,a.diagram=this,this.currentTool===b&&(this.currentTool=a))}},currentTool:{configurable:!0, +get:function(){return this.Xr},set:function(a){var b=this.Xr;null!==b&&(b.isActive&&b.doDeactivate(),b.cancelWaitAfter(),b.doStop());null===a&&(a=this.defaultTool);null!==a&&(w(a,Qe,R,"currentTool"),this.Xr=a,a.diagram=this,a.doStart())}},selection:{configurable:!0,get:function(){return this.Dv}},maxSelectionCount:{configurable:!0,get:function(){return this.Js},set:function(a){var b=this.Js;if(b!==a)if(A(a,"number",R,"maxSelectionCount"),0<=a&&!isNaN(a)){if(this.Js=a,this.g("maxSelectionCount", +b,a),!this.undoManager.isUndoingRedoing&&(a=this.selection.count-a,0= 0",R,"maxSelectionCount")}},nodeSelectionAdornmentTemplate:{configurable:!0,get:function(){return this.yp},set:function(a){var b=this.yp;b!==a&&(w(a,Ve,R,"nodeSelectionAdornmentTemplate"),this.yp=a,this.g("nodeSelectionAdornmentTemplate",b,a))}},groupSelectionAdornmentTemplate:{configurable:!0, +enumerable:!0,get:function(){return this.Do},set:function(a){var b=this.Do;b!==a&&(w(a,Ve,R,"groupSelectionAdornmentTemplate"),this.Do=a,this.g("groupSelectionAdornmentTemplate",b,a))}},linkSelectionAdornmentTemplate:{configurable:!0,get:function(){return this.Yo},set:function(a){var b=this.Yo;b!==a&&(w(a,Ve,R,"linkSelectionAdornmentTemplate"),this.Yo=a,this.g("linkSelectionAdornmentTemplate",b,a))}},highlighteds:{configurable:!0,get:function(){return this.ev}},isModified:{configurable:!0, +enumerable:!0,get:function(){var a=this.undoManager;return a.isEnabled?null!==a.currentTransaction?!0:this.Jo&&this.ce!==a.historyIndex:this.Jo},set:function(a){if(this.Jo!==a){A(a,"boolean",R,"isModified");this.Jo=a;var b=this.undoManager;!a&&b.isEnabled&&(this.ce=b.historyIndex);a||ok(this)}}},model:{configurable:!0,get:function(){return this.ic},set:function(a){var b=this.ic;if(b!==a){w(a,X,R,"model");this.currentTool.doCancel();null!==b&&b.undoManager!==a.undoManager&&b.undoManager.isInTransaction&& +v("Do not replace a Diagram.model while a transaction is in progress.");this.animationManager.Hc(!0);var c=Si(this,!0);this.Ae=!1;this.Wj=!0;this.ce=-2;this.Re=!1;var d=this.gc;this.gc=!0;Eh(this.animationManager,"Model");null!==b&&(null!==this.He&&this.He.each(function(a){b.dl(a)}),b.dl(this.Zc));this.ic=a;this.partManager=pk(this.ic.type);for(var e=0;ethis.scale&&(this.scale=a)): +za(a,"> 0",R,"minScale"))}},maxScale:{configurable:!0,get:function(){return this.Is},set:function(a){C(a,R,"maxScale");var b=this.Is;b!==a&&(0 0",R,"maxScale"))}},zoomPoint:{configurable:!0,get:function(){return this.Kt},set:function(a){this.Kt.A(a)||(w(a,J,R,"zoomPoint"),this.Kt=a=a.K())}},contentAlignment:{configurable:!0,get:function(){return this.Pj},set:function(a){var b=this.Pj; +b.A(a)||(w(a,N,R,"contentAlignment"),this.Pj=a=a.K(),this.g("contentAlignment",b,a),lj(this,!1))}},initialContentAlignment:{configurable:!0,get:function(){return this.Go},set:function(a){var b=this.Go;b.A(a)||(w(a,N,R,"initialContentAlignment"),this.Go=a=a.K(),this.g("initialContentAlignment",b,a))}},padding:{configurable:!0,get:function(){return this.ob},set:function(a){"number"===typeof a?a=new hc(a):w(a,hc,R,"padding");var b=this.ob;b.A(a)||(this.ob=a=a.K(),this.Ta(), +this.g("padding",b,a))}},partManager:{configurable:!0,get:function(){return this.Qa},set:function(a){var b=this.Qa;b!==a&&(w(a,Ii,R,"partManager"),null!==a.diagram&&v("Cannot share PartManagers between Diagrams: "+a.toString()),null!==b&&b.me(null),this.Qa=a,a.me(this))}},nodes:{configurable:!0,get:function(){return this.partManager.nodes.iterator}},links:{configurable:!0,get:function(){return this.partManager.links.iterator}},parts:{configurable:!0, +get:function(){return this.partManager.parts.iterator}},layout:{configurable:!0,get:function(){return this.qc},set:function(a){var b=this.qc;b!==a&&(w(a,Ni,R,"layout"),this.qc=a,a.diagram=this,a.group=null,this.Zg=!0,this.g("layout",b,a),this.Jb())}},isTreePathToChildren:{configurable:!0,get:function(){return this.Ds},set:function(a){var b=this.Ds;if(b!==a&&(A(a,"boolean",R,"isTreePathToChildren"),this.Ds=a,this.g("isTreePathToChildren",b,a),!this.undoManager.isUndoingRedoing))for(a= +this.nodes;a.next();)Xk(a.value)}},treeCollapsePolicy:{configurable:!0,get:function(){return this.Et},set:function(a){var b=this.Et;b!==a&&(a!==Gi&&a!==Yk&&a!==Zk&&v("Unknown Diagram.treeCollapsePolicy: "+a),this.Et=a,this.g("treeCollapsePolicy",b,a))}},Ye:{configurable:!0,get:function(){return this.gv},set:function(a){this.gv=a}},autoScrollInterval:{configurable:!0,get:function(){return this.Dn},set:function(a){var b=this.Dn;C(a,R,"scale");b!==a&&(this.Dn= +a,this.g("autoScrollInterval",b,a))}},autoScrollRegion:{configurable:!0,get:function(){return this.Fn},set:function(a){"number"===typeof a?a=new hc(a):w(a,hc,R,"autoScrollRegion");var b=this.Fn;b.A(a)||(this.Fn=a=a.K(),this.Ta(),this.g("autoScrollRegion",b,a))}}});na.Object.defineProperties(R,{licenseKey:{configurable:!0,get:function(){return $k.cc()},set:function(a){$k.add(a)}},version:{configurable:!0,get:function(){return al}}}); +R.prototype.makeImageData=R.prototype.Xy;R.prototype.makeImage=R.prototype.$A;R.prototype.addRenderer=R.prototype.Iz;R.prototype.makeSVG=R.prototype.ww;R.prototype.makeSvg=R.prototype.mu;R.prototype.stopAutoScroll=R.prototype.Vf;R.prototype.doAutoScroll=R.prototype.Rt;R.prototype.isUnoccupied=R.prototype.Pk;R.prototype.raiseDiagramEvent=R.prototype.U;R.prototype.removeDiagramListener=R.prototype.Zm;R.prototype.addDiagramListener=R.prototype.xk;R.prototype.findTreeRoots=R.prototype.DA; +R.prototype.layoutDiagram=R.prototype.YA;R.prototype.findTopLevelGroups=R.prototype.wA;R.prototype.findTopLevelNodesAndLinks=R.prototype.xA;R.prototype.ensureBounds=R.prototype.Ya;R.prototype.findLinksByExample=R.prototype.Ut;R.prototype.findNodesByExample=R.prototype.Vt;R.prototype.findLinkForData=R.prototype.Ec;R.prototype.findNodeForData=R.prototype.rj;R.prototype.findPartForData=R.prototype.Fc;R.prototype.findLinkForKey=R.prototype.findLinkForKey;R.prototype.findNodeForKey=R.prototype.Hb; +R.prototype.findPartForKey=R.prototype.findPartForKey;R.prototype.rebuildParts=R.prototype.Sd;R.prototype.transformViewToDoc=R.prototype.Bu;R.prototype.transformRectDocToView=R.prototype.CB;R.prototype.transformDocToView=R.prototype.vr;R.prototype.centerRect=R.prototype.Nt;R.prototype.scrollToRect=R.prototype.Ow;R.prototype.scroll=R.prototype.scroll;R.prototype.highlightCollection=R.prototype.PA;R.prototype.highlight=R.prototype.OA;R.prototype.selectCollection=R.prototype.tB;R.prototype.select=R.prototype.select; +R.prototype.updateAllRelationshipsFromData=R.prototype.xr;R.prototype.updateAllTargetBindings=R.prototype.updateAllTargetBindings;R.prototype.commit=R.prototype.commit;R.prototype.rollbackTransaction=R.prototype.Uf;R.prototype.commitTransaction=R.prototype.cb;R.prototype.startTransaction=R.prototype.Ca;R.prototype.raiseChanged=R.prototype.g;R.prototype.raiseChangedEvent=R.prototype.ab;R.prototype.removeChangedListener=R.prototype.dl;R.prototype.addChangedListener=R.prototype.Sh; +R.prototype.removeModelChangedListener=R.prototype.oB;R.prototype.addModelChangedListener=R.prototype.my;R.prototype.findLayer=R.prototype.Jk;R.prototype.removeLayer=R.prototype.mB;R.prototype.addLayerAfter=R.prototype.Ez;R.prototype.addLayerBefore=R.prototype.ky;R.prototype.addLayer=R.prototype.Hm;R.prototype.moveParts=R.prototype.moveParts;R.prototype.copyParts=R.prototype.Fk;R.prototype.removeParts=R.prototype.tu;R.prototype.remove=R.prototype.remove;R.prototype.add=R.prototype.add; +R.prototype.clearDelayedGeometries=R.prototype.Uv;R.prototype.setProperties=R.prototype.Tw;R.prototype.resetInputOptions=R.prototype.Kw;R.prototype.setInputOption=R.prototype.uB;R.prototype.getInputOption=R.prototype.Pm;R.prototype.resetRenderingHints=R.prototype.Lw;R.prototype.setRenderingHint=R.prototype.iz;R.prototype.getRenderingHint=R.prototype.Xe;R.prototype.maybeUpdate=R.prototype.od;R.prototype.requestUpdate=R.prototype.Jb;R.prototype.delayInitialization=R.prototype.$z; +R.prototype.isUpdateRequested=R.prototype.UA;R.prototype.invalidateDocumentBounds=R.prototype.Ta;R.prototype.findObjectsNear=R.prototype.Qg;R.prototype.findPartsNear=R.prototype.tA;R.prototype.findObjectsIn=R.prototype.Lf;R.prototype.findPartsIn=R.prototype.Iy;R.prototype.findObjectsAt=R.prototype.sj;R.prototype.findPartsAt=R.prototype.sA;R.prototype.findObjectAt=R.prototype.ac;R.prototype.findPartAt=R.prototype.Nm;R.prototype.focusObject=R.prototype.EA;R.prototype.alignDocument=R.prototype.Kz; +R.prototype.zoomToRect=R.prototype.GB;R.prototype.zoomToFit=R.prototype.zoomToFit;R.prototype.diagramScroll=R.prototype.xy;R.prototype.focus=R.prototype.focus;R.useDOM=function(a){gh=a?void 0!==qa.document:!1};R.isUsingDOM=function(){return gh}; +var Re=null,Hi=new Bb,Wi=null,Vi=null,gh=void 0!==qa.document,Qi=null,Ri="",Kh=new E(R,"None",0),qj=new E(R,"Uniform",1),rj=new E(R,"UniformToFill",2),Zf=new E(R,"CycleAll",10),cg=new E(R,"CycleNotDirected",11),eg=new E(R,"CycleNotDirectedFast",12),fg=new E(R,"CycleNotUndirected",13),$f=new E(R,"CycleDestinationTree",14),bg=new E(R,"CycleSourceTree",15),ki=new E(R,"DocumentScroll",1),mi=new E(R,"InfiniteScroll",2),Gi=new E(R,"TreeParentCollapsed",21),Yk=new E(R,"AllParentsCollapsed",22),Zk=new E(R, +"AnyParentsCollapsed",23),$k=new H,al="2.1.53",Uk="image",Wk=!1,bl=null,Di=!1; +function Ei(){if(gh){var a=qa.document.createElement("canvas"),b=a.getContext("2d"),c=Va("7ca11abfd022028846");b[c]=Va("398c3597c01238");for(var d=["5da73c80a36455d5038e4972187c3cae51fd22",ra.Dx+"4ae6247590da4bb21c324ba3a84e385776",Gb.xF+"fb236cdfda5de14c134ba1a95a2d4c7cc6f93c1387",K.za],e=1;5>e;e++)b[Va("7ca11abfd7330390")](Va(d[e-1]),10,15*e);b[c]=Va("39f046ebb36e4b");for(c=1;5>c;c++)b[Va("7ca11abfd7330390")](Va(d[c-1]),10,15*c);if(4!==d.length||"5"!==d[0][0]||"7"!==d[3][0])Gb.prototype.Pd=Gb.prototype.py; +bl=a}}R.className="Diagram";R.fromDiv=function(a){var b=a;"string"===typeof a&&(b=qa.document.getElementById(a));return b instanceof HTMLDivElement&&b.C instanceof R?b.C:null};R.inherit=function(a,b){function c(){}if(Object.getPrototypeOf(a).prototype)throw Error("Used go.Diagram.inherit defining already defined class \n"+a);A(a,"function",R,"inherit");A(b,"function",R,"inherit");c.prototype=b.prototype;a.prototype=new c;a.prototype.constructor=a};R.None=Kh;R.Uniform=qj;R.UniformToFill=rj; +R.CycleAll=Zf;R.CycleNotDirected=cg;R.CycleNotDirectedFast=eg;R.CycleNotUndirected=fg;R.CycleDestinationTree=$f;R.CycleSourceTree=bg;R.DocumentScroll=ki;R.InfiniteScroll=mi;R.TreeParentCollapsed=Gi;R.AllParentsCollapsed=Yk;R.AnyParentsCollapsed=Zk;function Oi(){this.Az=null;this.l="zz@orderNum";"63ad05bbe23a1786468a4c741b6d2"===this._tk?this.gf=this.l=!0:this.gf=null} +function Nj(a,b){b.Mb.setTransform(b.Zb,0,0,b.Zb,0,0);if(null===a.gf)a:{b="f";var c=qa[Va("76a715b2f73f148a")][Va("72ba13b5")];a.gf=!0;if(gh){var d=R[Va("76a115b6ed251eaf4692")];if(d)for(var e=$k.iterator;e.next();){d=e.value;d=Va(d).split(Va("39e9"));if(6>d.length)break;var f=Va(d[1]).split(".");if("7da71ca0"!==d[4])break;var g=Va(ra[Va("6cae19")]).split(".");if(f[0]>g[0]||f[0]===g[0]&&f[1]>=g[1]){f=c[Va("76ad18b4f73e")];for(g=c[Va("73a612b6fb191d")](Va("35e7"))+2;gf&&Va(d[2])!==Va("7da71ca0ad381e90")&&(f=b[Va("73a612b6fb191d")](Va("76a715b2ef3e149757")));0>f&&(f=b[Va("73a612b6fb191d")](Va("76a715b2ef3e149757")));0>f&&(f=c[Va("73a612b6fb191d")](Va("7baa19a6f76c1988428554")));a.gf=!(0<=f&&fh.length;)h+="9";h=h.substr(h.length-4);d="";d+=["gsh","gsf"][parseInt(h.substr(0, +1),10)%2];d+=["Header","Background","Display","Feedback"][parseInt(h.substr(0,1),10)%4];g[Va("79a417a0f0181a8946")]=d;if(qa.document[Va("78a712aa")]){if(qa.document[Va("78a712aa")][Va("7bb806b6ed32388c4a875b")](g),h=qa.getComputedStyle(g).getPropertyValue(Va("78a704b7e62456904c9b12701b6532a8")),qa.document[Va("78a712aa")][Va("68ad1bbcf533388c4a875b")](g),h)if(-1!==h.indexOf(parseInt(f[1]+f[2],16))&&-1!==h.indexOf(parseInt(f[3]+f[4],16))){a.gf=!1;break}else if(Wa||Za||$a||ab)for(d="."+d,f=0;fMath.abs(b.deltaY)?-d:-e):void 0!==b.wheelDeltaX?(0!==b.wheelDeltaX&&(d=0Math.abs(b.wheelDeltaY)?-d:-e):void 0!==b.wheelDelta&&0!==b.wheelDelta&&(c.delta=0e||Math.abs(d.y-b.screenY)>e)?a.Dd++:a.Dd=1;c.clickCount=a.Dd;a.dk=b.timeStamp;a.To.Ug(b.screenX,b.screenY);a.doMouseDown();1===b.button?b.preventDefault(): +Bj(a,c,b)}};a.$k=function(b){if(a.isEnabled){a.kg=!0;var c=a.nk;if(null!==c[0]&&c[0].pointerId===b.pointerId)c[0]=b;else{if(null!==c[1]&&c[1].pointerId===b.pointerId){c[1]=b;return}if(null===c[0])c[0]=b;else return}c[0].pointerId===b.pointerId&&(c=Aj(a,b,b,null!==c[1]),c.targetDiagram=xj(b),a.doMouseMove(),Bj(a,c,b))}};a.bl=function(b){if(a.isEnabled){a.kg=!0;var c="touch"===b.pointerType||"pen"===b.pointerType,d=a.Ys;if(c&&a.uk)delete d[b.pointerId],b.preventDefault();else if(d=a.nk,null!==d[0]&& +d[0].pointerId===b.pointerId){d[0]=null;d=zj(a,b,!1,!0,!0,!1);var e=qa.document.elementFromPoint(b.clientX,b.clientY);null!==e&&e.C instanceof R&&e.C!==a&&wj(e.C,b,d);wj(a,b,d);d.clickCount=a.Dd;null===e?d.targetDiagram=xj(b):e.C?d.targetDiagram=e.C:d.targetDiagram=null;d.targetObject=null;a.doMouseUp();Bj(a,d,b);c&&(a.Be=!1)}else null!==d[1]&&d[1].pointerId===b.pointerId&&(d[1]=null)}};a.al=function(b){if(a.isEnabled){a.kg=!1;var c=a.Ys;c[b.pointerId]&&delete c[b.pointerId];c=a.nk;null!==c[0]&&c[0].pointerId=== +b.pointerId&&(c[0]=null);null!==c[1]&&c[1].pointerId===b.pointerId&&(c[1]=null);"touch"!==b.pointerType&&"pen"!==b.pointerType&&(b=a.currentTool,b.cancelWaitAfter(),b.standardMouseOver())}};a.hs=d.aa["d"+cl[1]+cl[2]+"wI"+Uk.slice(1,5)]["b"+dl.slice(1,b)](d.aa,bl,b,b);d.Ac(!0);Xi(a)}}Oi.className="DiagramHelper";function pf(a){this.l=void 0===a?new J:a;this.w=new J} +na.Object.defineProperties(pf.prototype,{point:{configurable:!0,get:function(){return this.l},set:function(a){this.l=a}},shifted:{configurable:!0,get:function(){return this.w},set:function(a){this.w=a}}});var cl="DraggingInfo";pf.className="DraggingInfo";function fk(a,b,c){this.node=a;this.info=b;this.ow=c}fk.className="DraggingNodeInfoPair";function hf(){this.reset()} +hf.prototype.reset=function(){this.isGridSnapEnabled=!1;this.isGridSnapRealtime=!0;this.gridSnapCellSize=(new Fb(NaN,NaN)).freeze();this.gridSnapCellSpot=Ec;this.gridSnapOrigin=(new J(NaN,NaN)).freeze();this.groupsSnapMembers=this.dragsTree=this.dragsLink=!1;this.dragsMembers=this.groupsAlwaysMove=!0};hf.className="DraggingOptions";function el(a){1 +b.updateDelay?b.P():b.w||(b.w=!0,setTimeout(function(){return b.redraw()},b.updateDelay))};this.Ud=function(){null!==b.observed&&jl(b)};this.autoScale=qj;this.Yb=!1}ma(hl,R);hl.prototype.computePixelRatio=function(){return 1}; +hl.prototype.redraw=function(){if(this.w&&1<=this.updateDelay){this.w=!1;var a=this.Da,b=this.Mb;if(null!==a&&null!==b){Lj(this);if(null===this.sm){var c=new Vk(null);c.width=a.width;c.height=a.height;this.sm=c}try{this.Da=this.sm,this.Mb=this.Da.context,this.Mb.Ac(!0),this.Mb.setTransform(1,0,0,1,0,0),this.Mb.clearRect(0,0,this.Da.width,this.Da.height),kl(this)}finally{this.Da=a,this.Mb=b}}}R.prototype.redraw.call(this)}; +hl.prototype.sc=function(){null===this.Ka&&v("No div specified");null===this.Da&&v("No canvas specified");if(!(this.Da instanceof Sj)&&(yi(this.box),this.Jc)){var a=this.observed;if(null!==a&&!a.animationManager.defaultAnimation.isAnimating&&a.Bj){Lj(this);var b=this.Da;a=this.Mb;a.Ac(!0);a.setTransform(1,0,0,1,0,0);a.clearRect(0,0,b.width,b.height);1>this.updateDelay?kl(this):null!==this.sm&&(a.drawImage(this.sm.Oa,0,0),b=this.xb,b.reset(),1!==this.scale&&b.scale(this.scale),0===this.position.x&& +0===this.position.y||b.translate(-this.position.x,-this.position.y),a.scale(this.Zb,this.Zb),a.transform(b.m11,b.m12,b.m21,b.m22,b.dx,b.dy));b=this.Ra.j;for(var c=b.length,d=0;da&&(a=0);this.kb!==a&&(this.kb=a)}}});hl.className="Overview";function il(){gf.call(this);this.l=null}ma(il,gf); +il.prototype.canStart=function(){if(!this.isEnabled)return!1;var a=this.diagram;if(null===a||!a.allowMove||!a.allowSelect)return!1;var b=a.observed;if(null===b)return!1;var c=a.lastInput;if(!c.left||a.currentTool!==this&&(!this.isBeyondDragSize()||c.isTouchEvent&&c.timestamp-a.firstInput.timestampb.maxScale||(b.scale=a))}; +ll.prototype.canDecreaseZoom=function(a){void 0===a&&(a=1/this.zoomFactor);C(a,ll,"canDecreaseZoom:factor");var b=this.diagram;if(b.autoScale!==Kh)return!1;a=b.scale*a;return ab.maxScale?!1:b.allowZoom};ll.prototype.increaseZoom=function(a){void 0===a&&(a=this.zoomFactor);C(a,ll,"increaseZoom:factor");var b=this.diagram;b.autoScale===Kh&&(a=b.scale*a,ab.maxScale||(b.scale=a))}; +ll.prototype.canIncreaseZoom=function(a){void 0===a&&(a=this.zoomFactor);C(a,ll,"canIncreaseZoom:factor");var b=this.diagram;if(b.autoScale!==Kh)return!1;a=b.scale*a;return ab.maxScale?!1:b.allowZoom};ll.prototype.resetZoom=function(a){void 0===a&&(a=this.defaultScale);C(a,ll,"resetZoom:newscale");var b=this.diagram;ab.maxScale||(b.scale=a)}; +ll.prototype.canResetZoom=function(a){void 0===a&&(a=this.defaultScale);C(a,ll,"canResetZoom:newscale");var b=this.diagram;return ab.maxScale?!1:b.allowZoom}; +ll.prototype.zoomToFit=function(){var a=this.diagram,b=a.animationManager;b.Hc();a.redraw();var c=a.position,d=a.scale;Eh(b,"Zoom To Fit");this.isZoomToFitRestoreEnabled&&d===this.Ov&&!isNaN(this.ov)&&a.documentBounds.A(this.Nv)?(a.scale=this.ov,a.position=this.Nx,this.Ov=NaN,this.Nv=rc):(this.ov=d,this.Nx=c.copy(),a.zoomToFit(),this.Ov=a.scale,this.Nv=a.documentBounds.copy());Gh(b)};ll.prototype.canZoomToFit=function(){return this.diagram.allowZoom}; +ll.prototype.scrollToPart=function(a){void 0===a&&(a=null);null!==a&&w(a,U,ll,"part");var b=this.diagram;b.Ya();if(null===a){try{null!==this.Dg&&(this.Dg.next()?a=this.Dg.value:this.Dg=null)}catch(k){this.Dg=null}null===a&&(0a&&(a+=360));return a}; +t.Mf=function(){if(0!==(this.I&4096)===!1)return this.Cl;var a=this.Ga;return null!==this.panel?a*this.panel.Mf():a};t.Zt=function(a,b){void 0===b&&(b=new J);b.assign(a);this.Md.Pd(b);return b};t.$t=function(a,b,c){return this.Lk(a.x,a.y,b.x,b.y,c)}; +t.Lk=function(a,b,c,d,e){var f=this.transform,g=1/(f.m11*f.m22-f.m12*f.m21),h=f.m22*g,k=-f.m12*g,l=-f.m21*g,m=f.m11*g,n=g*(f.m21*f.dy-f.m22*f.dx),p=g*(f.m12*f.dx-f.m11*f.dy);if(null!==this.areaBackground)return f=this.actualBounds,K.Of(f.left,f.top,f.right,f.bottom,a,b,c,d,e);g=a*h+b*l+n;a=a*k+b*m+p;b=c*h+d*l+n;c=c*k+d*m+p;e.h(0,0);d=this.naturalBounds;c=K.Of(0,0,d.width,d.height,g,a,b,c,e);e.transform(f);return c}; +O.prototype.measure=function(a,b,c,d){if(!1!==Ij(this)){var e=this.vh,f=e.right+e.left;e=e.top+e.bottom;a=Math.max(a-f,0);b=Math.max(b-e,0);c=Math.max((c||0)-f,0);d=Math.max((d||0)-e,0);f=this.angle;e=this.desiredSize;var g=0;this instanceof Uf&&(g=this.strokeWidth);90===f||270===f?(a=isFinite(e.height)?e.height+g:a,b=isFinite(e.width)?e.width+g:b):(a=isFinite(e.width)?e.width+g:a,b=isFinite(e.height)?e.height+g:b);e=c||0;g=d||0;var h=this instanceof W;switch(Fl(this,!0)){case zg:g=e=0;h&&(b=a=Infinity); +break;case Bd:isFinite(a)&&a>c&&(e=a);isFinite(b)&&b>d&&(g=b);break;case ql:isFinite(a)&&a>c&&(e=a);g=0;h&&(b=Infinity);break;case rl:isFinite(b)&&b>d&&(g=b),e=0,h&&(a=Infinity)}h=this.maxSize;var k=this.minSize;e>h.width&&k.widthh.height&&k.heighta.height||this.Ab>a.width)))c=!0;this.I=c?this.I|256:this.I&-257;this.Cb.o()||v("Non-real actualBounds has been set. Object "+this+", actualBounds: "+this.Cb.toString());this.Wm(f,this.Cb);Gl(this,!1);L.free(f)};t=O.prototype;t.Th=function(){}; +function Hl(a,b,c,d,e){a.Cb.h(b,c,d,e);if(!a.desiredSize.o()){var f=a.vc;c=a.vh;b=c.right+c.left;var g=c.top+c.bottom;c=f.width+b;f=f.height+g;d+=b;e+=g;b=Fl(a,!0);c===d&&f===e&&(b=zg);switch(b){case zg:if(c>d||f>e)Dj(a,!0),a.measure(c>d?d:c,f>e?e:f,0,0);break;case Bd:Dj(a,!0);a.measure(d,e,0,0);break;case ql:Dj(a,!0);a.measure(d,f,0,0);break;case rl:Dj(a,!0),a.measure(c,e,0,0)}}} +t.Wm=function(a,b){var c=this.part;null!==c&&null!==c.diagram&&(c.selectionObject!==this&&c.resizeObject!==this&&c.rotateObject!==this||Il(c,!0),this.P(),fc(a,b)||(c.Zh(),this.Ap(c)))};t.Ap=function(a){null!==this.portId&&(Il(a,!0),a instanceof V&&Jl(a,this))}; +t.sc=function(a,b){if(this.visible){var c=this instanceof W&&(this.type===W.TableRow||this.type===W.TableColumn),d=this.Cb;if(c||0!==d.width&&0!==d.height&&!isNaN(d.x)&&!isNaN(d.y)){var e=this.opacity;if(0!==e){var f=1;1!==e&&(f=a.globalAlpha,a.globalAlpha=f*e);if(!this.Ay(a,b))if(c)Kl(this,a,b);else{this instanceof S&&this.Rk(!1);F&&F.Jm&&F.gA&&F.gA(a,this);c=this.transform;var g=this.panel;0!==(this.I&4096)===!0&&Ll(this);var h=this.part,k=!1,l=0;if(h&&b.Xe("drawShadows")&&(k=h.isShadowed)){var m= +h.shadowOffset;l=Math.max(m.y,m.x)*b.scale*b.Zb}if(!(m=b.Ji||!this.Rf())){var n=this.naturalBounds;m=this.ji;var p=m.m11,r=m.m21,q=m.dx,u=m.m12,y=m.m22,x=m.dy,z,B=z=0;m=z*p+B*r+q;var D=z*u+B*y+x;z=n.width+l;B=0;var G=z*p+B*r+q;z=z*u+B*y+x;B=Math.min(m,G);var M=Math.min(D,z);var Y=Math.max(m+0,G)-B;var Q=Math.max(D+0,z)-M;m=B;D=M;z=n.width+l;B=n.height+l;G=z*p+B*r+q;z=z*u+B*y+x;B=Math.min(m,G);M=Math.min(D,z);Y=Math.max(m+Y,G)-B;Q=Math.max(D+Q,z)-M;m=B;D=M;z=0;B=n.height+l;G=z*p+B*r+q;z=z*u+B*y+x; +B=Math.min(m,G);M=Math.min(D,z);Y=Math.max(m+Y,G)-B;Q=Math.max(D+Q,z)-M;m=B;D=M;l=b.viewportBounds;n=l.x;p=l.y;m=!(m>l.width+n||n>Y+m||D>l.height+p||p>Q+D)}if(m){m=0!==(this.I&256);a.clipInsteadOfFill&&(m=!1);this instanceof ih&&(a.font=this.font);if(m){F&&F.iA&&Ea("clip"+this.toString());D=g.pe()?g.naturalBounds:g.actualBounds;null!==this.gb?(n=this.gb,Y=n.x,Q=n.y,l=n.width,n=n.height):(Y=Math.max(d.x,D.x),Q=Math.max(d.y,D.y),l=Math.min(d.right,D.right)-Y,n=Math.min(d.bottom,D.bottom)-Q);if(Y>d.width+ +d.x||d.x>D.width+D.x){1!==e&&(a.globalAlpha=f);return}a.save();a.beginPath();a.rect(Y,Q,l,n);a.clip()}if(this.Rf()){if(!h.isVisible()){1!==e&&(a.globalAlpha=f);return}k&&(D=h.shadowOffset,a.Ww(D.x*b.scale*b.Zb,D.y*b.scale*b.Zb,h.shadowBlur),Ml(a),a.shadowColor=h.shadowColor)}k&&!0===this.shadowVisible?Ml(a):k&&!1===this.shadowVisible&&Nl(a);h=this.naturalBounds;null!==this.kc&&(Ai(this,a,this.kc,!0,!0,h,d),this.kc instanceof Ol&&this.kc.type===Pl?(a.beginPath(),a.rect(d.x,d.y,d.width,d.height),a.We(this.kc)): +a.fillRect(d.x,d.y,d.width,d.height));a.transform(c.m11,c.m12,c.m21,c.m22,c.dx,c.dy);k&&(null!==g&&0!==(g.I&512)||null!==g&&(g.type===W.Auto||g.type===W.Spot)&&g.yb()!==this)&&null===this.shadowVisible&&Nl(a);null!==this.rb&&(l=this.naturalBounds,Y=D=0,Q=l.width,l=l.height,n=0,this instanceof Uf&&(l=this.ua.bounds,D=l.x,Y=l.y,Q=l.width,l=l.height,n=this.strokeWidth),Ai(this,a,this.rb,!0,!1,h,d),this.rb instanceof Ol&&this.rb.type===Pl?(a.beginPath(),a.rect(D-n/2,Y-n/2,Q+n,l+n),a.We(this.rb)):a.fillRect(D- +n/2,Y-n/2,Q+n,l+n));F&&F.Jm&&F.hA&&F.hA(a,this);k&&(null!==this.rb||null!==this.kc||null!==g&&0!==(g.I&512)||null!==g&&(g.type===W.Auto||g.type===W.Spot)&&g.yb()!==this)?(Ql(this,!0),null===this.shadowVisible&&Nl(a)):Ql(this,!1);this.pj(a,b);k&&0!==(this.I&512)===!0&&Ml(a);this.Rf()&&k&&Nl(a);m?(a.restore(),this instanceof W?a.Ac(!0):a.Ac(!1)):c.gu()||(b=1/(c.m11*c.m22-c.m12*c.m21),a.transform(c.m22*b,-c.m12*b,-c.m21*b,c.m11*b,b*(c.m21*c.dy-c.m22*c.dx),b*(c.m12*c.dx-c.m11*c.dy)))}}1!==e&&(a.globalAlpha= +f)}}}};t.Ay=function(){return!1};function Kl(a,b,c){var d=a.Cb,e=a.wc;null!==a.kc&&(Ai(a,b,a.kc,!0,!0,e,d),a.kc instanceof Ol&&a.kc.type===Pl?(b.beginPath(),b.rect(d.x,d.y,d.width,d.height),b.We(a.kc)):b.fillRect(d.x,d.y,d.width,d.height));null!==a.rb&&(Ai(a,b,a.rb,!0,!1,e,d),a.rb instanceof Ol&&a.rb.type===Pl?(b.beginPath(),b.rect(d.x,d.y,d.width,d.height),b.We(a.rb)):b.fillRect(d.x,d.y,d.width,d.height));a.pj(b,c)}t.pj=function(){}; +function Ai(a,b,c,d,e,f,g){if(null!==c){var h=1,k=1;if("string"===typeof c)d?b.fillStyle=c:b.strokeStyle=c;else if(c.type===Rl)d?b.fillStyle=c.color:b.strokeStyle=c.color;else{var l=0;a instanceof Uf&&(l=a.strokeWidth);h=f.width;k=f.height;e?(h=g.width,k=g.height):d||(h+=l,k+=l);if((f=b instanceof Sl)&&c.ue&&(c.type===Tl||c.sl===h&&c.Nu===k))var m=c.ue;else{var n=0,p=0,r=0,q=0,u=0,y=0;y=u=0;e?(u=g.x,y=g.y):d||(u-=l/2,y-=l/2);n=c.start.x*h+c.start.offsetX;p=c.start.y*k+c.start.offsetY;r=c.end.x*h+ +c.end.offsetX;q=c.end.y*k+c.end.offsetY;n+=u;r+=u;p+=y;q+=y;if(c.type===Ul)m=b.createLinearGradient(n,p,r,q);else if(c.type===Pl)y=isNaN(c.endRadius)?Math.max(h,k)/2:c.endRadius,isNaN(c.startRadius)?(u=0,y=Math.max(h,k)/2):u=c.startRadius,m=b.createRadialGradient(n,p,u,r,q,y);else if(c.type===Tl)try{m=b.createPattern(c.pattern,"repeat")}catch(z){m=null}else ya(c.type,"Brush type");if(c.type!==Tl&&(e=c.colorStops,null!==e))for(e=e.iterator;e.next();)m.addColorStop(e.key,e.value);if(f&&(c.ue=m,null!== +m&&(c.sl=h,c.Nu=k),null===m&&c.type===Tl&&-1!==c.sl)){c.sl=-1;var x=a.diagram;null!==x&&-1===c.sl&&ta(function(){x.redraw()},600)}}d?b.fillStyle=m:b.strokeStyle=m}}}t.Sg=function(a){if(a instanceof W)a:{if(this!==a&&null!==a)for(var b=this.panel;null!==b;){if(b===a){a=!0;break a}b=b.panel}a=!1}else a=!1;return a};t.Sf=function(){if(!this.visible)return!1;var a=this.panel;return null!==a?a.Sf():!0}; +t.Tg=function(){for(var a=this instanceof W?this:this.panel;null!==a&&a.isEnabled;)a=a.panel;return null===a}; +function Ll(a){if(0!==(a.I&2048)===!0){var b=a.xb;b.reset();if(!a.Cb.o()||!a.vc.o()){Vl(a,!1);return}b.translate(a.Cb.x-a.vc.x,a.Cb.y-a.vc.y);if(1!==a.scale||0!==a.angle){var c=a.naturalBounds;Dl(a,b,c.x,c.y,c.width,c.height)}Vl(a,!1);Wl(a,!0)}0!==(a.I&4096)===!0&&(b=a.panel,null===b?(a.ji.set(a.xb),a.Cl=a.scale,Wl(a,!1)):null!==b.Md&&(c=a.ji,c.reset(),b.pe()?c.multiply(b.ji):null!==b.panel&&c.multiply(b.panel.ji),c.multiply(a.xb),a.Cl=a.scale*b.Cl,Wl(a,!1)))} +function Dl(a,b,c,d,e,f){1!==a.scale&&b.scale(a.scale);if(0!==a.dc){var g=Kc;a.Rf()&&a.locationSpot.eb()&&(g=a.locationSpot);var h=J.alloc();if(a instanceof U&&a.locationObject!==a)for(c=a.locationObject,d=c.naturalBounds,h.el(d.x,d.y,d.width,d.height,g),c.og.Aa(h),h.offset(-c.measuredBounds.x,-c.measuredBounds.y),g=c.panel;null!==g&&g!==a;)g.og.Aa(h),h.offset(-g.measuredBounds.x,-g.measuredBounds.y),g=g.panel;else h.el(c,d,e,f,g);b.rotate(a.dc,h.x,h.y);J.free(h)}} +t.u=function(a){if(!Ij(this)){void 0===a&&(a=!1);Dj(this,!0);Gl(this,!0);var b=this.panel;null===b||a||b.u()}};t.Nk=function(){Ij(this)||(Dj(this,!0),Gl(this,!0))};function Xl(a){if(!Jj(a)){var b=a.panel;null!==b?b.u():a.Rf()&&(b=a.diagram,null!==b&&(b.Cd.add(a),a instanceof V&&a.yd(),b.Jb()));Gl(a,!0)}}t.Sl=function(){0!==(this.I&2048)===!1&&(Vl(this,!0),Wl(this,!0))};t.sw=function(){Wl(this,!0)};t.P=function(){var a=this.part;null!==a&&a.P()}; +function Fl(a,b){var c=a.stretch,d=a.panel;if(null!==d&&d.type===W.Table)return Yl(a,d.getRowDefinition(a.row),d.getColumnDefinition(a.column),b);if(null!==d&&d.type===W.Auto&&d.yb()===a)return Zl(a,Bd,b);if(c===pl){if(null!==d){if(d.type===W.Spot&&d.yb()===a)return Zl(a,Bd,b);c=d.defaultStretch;return c===pl?Zl(a,zg,b):Zl(a,c,b)}return Zl(a,zg,b)}return Zl(a,c,b)} +function Yl(a,b,c,d){var e=a.stretch;if(e!==pl)return Zl(a,e,d);var f=e=null;switch(b.stretch){case rl:f=!0;break;case Bd:f=!0}switch(c.stretch){case ql:e=!0;break;case Bd:e=!0}b=a.panel.defaultStretch;null===e&&(e=b===ql||b===Bd);null===f&&(f=b===rl||b===Bd);return!0===e&&!0===f?Zl(a,Bd,d):!0===e?Zl(a,ql,d):!0===f?Zl(a,rl,d):Zl(a,zg,d)} +function Zl(a,b,c){if(c)return b;if(b===zg)return zg;c=a.desiredSize;if(c.o())return zg;a=a.angle;if(!isNaN(c.width))if(90!==a&&270!==a){if(b===ql)return zg;if(b===Bd)return rl}else{if(b===rl)return zg;if(b===Bd)return ql}if(!isNaN(c.height))if(90!==a&&270!==a){if(b===rl)return zg;if(b===Bd)return ql}else{if(b===ql)return zg;if(b===Bd)return rl}return b}function Ql(a,b){a.I=b?a.I|512:a.I&-513}function zl(a){return 0!==(a.I&1024)}function $l(a,b){a.I=b?a.I|1024:a.I&-1025} +function Vl(a,b){a.I=b?a.I|2048:a.I&-2049}function Wl(a,b){a.I=b?a.I|4096:a.I&-4097}function Ij(a){return 0!==(a.I&8192)}function Dj(a,b){a.I=b?a.I|8192:a.I&-8193}function Jj(a){return 0!==(a.I&16384)}function Gl(a,b){a.I=b?a.I|16384:a.I&-16385}t.Ej=function(a){this.Ag=a};t.yu=function(){};t.Sw=function(a){this.ra.assign(a);Xl(this);return!0};t.tr=function(a,b){if(this.ra.x!==a||this.ra.y!==b)this.ra.h(a,b),this.Sl()}; +function am(a){var b=a.part;if(b instanceof V&&(null!==a.portId||a===b.port)){var c=b.diagram;null===c||c.undoManager.isUndoingRedoing||Jl(b,a)}}function bm(a){var b=a.diagram;null===b||b.undoManager.isUndoingRedoing||(a instanceof W?a instanceof V?a.yd():a.fl(a,function(a){am(a)}):am(a))}t.bind=function(a){a.vd=this;var b=this.tj();null!==b&&cm(b)&&v("Cannot add a Binding to a template that has already been copied: "+a);null===this.lb&&(this.lb=new H);this.lb.add(a)}; +t.tj=function(){for(var a=this instanceof W?this:this.panel;null!==a;){if(null!==a.xi)return a;a=a.panel}return null};t.Tw=function(a){Pj(this,a)};t.gx=function(a){a.vd=this;null===this.Yg&&(this.Yg=new Bb);this.Yg.add(a.propertyName,a)}; +function dm(a,b){for(var c=1;ce)&&v("Must specify non-negative integer row for RowColumnDefinition "+b+", not: "+e),a.isRow=!0,a.index=e):void 0!==b.column&&(e=b.column,(void 0===e||null===e||Infinity===e||isNaN(e)||0>e)&&v("Must specify non-negative integer column for RowColumnDefinition "+b+", not: "+e),a.isRow=!1,a.index=e);e=new ib;for(c in b)"row"!== +c&&"column"!==c&&(e[c]=b[c]);Pj(a,e)}else Pj(a,b);else v('Unknown initializer "'+b+'" for object being constructed by GraphObject.make: '+a)}function im(a,b){A(a,"string",O,"defineBuilder:name");A(b,"function",O,"defineBuilder:func");var c=a.toLowerCase();F&&(""===a||"none"===c||a===c)&&v("Shape.defineFigureGenerator name must not be empty or None or all-lower-case: "+a);em.add(a,b)} +function jm(a,b,c){void 0===c&&(c=null);var d=a[1];if("function"===typeof c?c(d):"string"===typeof d)return a.splice(1,1),d;if(void 0===b)throw Error("no "+("function"===typeof c?"satisfactory":"string")+" argument for GraphObject builder "+a[0]);return b} +na.Object.defineProperties(O.prototype,{shadowVisible:{configurable:!0,get:function(){return this.rm},set:function(a){var b=this.rm;b!==a&&(F&&null!==a&&A(a,"boolean",O,"shadowVisible"),this.rm=a,this.P(),this.g("shadowVisible",b,a))}},enabledChanged:{configurable:!0,get:function(){return null!==this.R?this.R.ko:null},set:function(a){wl(this);var b=this.R.ko;b!==a&&(null!==a&&A(a,"function",O,"enabledChanged"),this.R.ko=a,this.g("enabledChanged",b,a))}},segmentOrientation:{configurable:!0, +enumerable:!0,get:function(){return this.pm},set:function(a){var b=this.pm;b!==a&&(F&&gb(a,S,O,"segmentOrientation"),this.pm=a,this.u(),this.g("segmentOrientation",b,a),a===ng&&(this.angle=0))}},segmentIndex:{configurable:!0,get:function(){return this.cq},set:function(a){F&&A(a,"number",O,"segmentIndex");a=Math.round(a);var b=this.cq;b!==a&&(this.cq=a,this.u(),this.g("segmentIndex",b,a))}},segmentFraction:{configurable:!0,get:function(){return this.nm},set:function(a){F&& +A(a,"number",O,"segmentFraction");isNaN(a)?a=0:0>a?a=0:1a||1=a&&v("GraphObject.scale for "+this+" must be greater than zero, not: "+a),this.Ga=a,this.u(),this.g("scale",b,a))}},angle:{configurable:!0,get:function(){return this.dc},set:function(a){var b=this.dc;b!==a&&(F&&C(a,O,"angle"),a%=360,0>a&&(a+=360),b!==a&&(this.dc= +a,bm(this),this.u(),this.g("angle",b,a)))}},desiredSize:{configurable:!0,get:function(){return this.cd},set:function(a){F&&w(a,Fb,O,"desiredSize");var b=a.width,c=a.height,d=this.cd,e=d.width,f=d.height;(e===b||isNaN(e)&&isNaN(b))&&(f===c||isNaN(f)&&isNaN(c))||(this.cd=a=a.K(),this.u(),this instanceof Uf&&this.jc(),this.g("desiredSize",d,a),zl(this)&&(a=this.part,null!==a&&(Al(this,a,"width"),Al(this,a,"height"))))}},width:{configurable:!0,get:function(){return this.cd.width}, +set:function(a){var b=this.cd.width;b===a||isNaN(b)&&isNaN(a)||(F&&A(a,"number",O,"width"),b=this.cd,this.cd=a=(new Fb(a,this.cd.height)).freeze(),this.u(),this instanceof Uf&&this.jc(),this.g("desiredSize",b,a),zl(this)&&(a=this.part,null!==a&&Al(this,a,"width")))}},height:{configurable:!0,get:function(){return this.cd.height},set:function(a){var b=this.cd.height;b===a||isNaN(b)&&isNaN(a)||(F&&A(a,"number",O,"height"),b=this.cd,this.cd=a=(new Fb(this.cd.width,a)).freeze(),this.u(), +this instanceof Uf&&this.jc(),this.g("desiredSize",b,a),zl(this)&&(a=this.part,null!==a&&Al(this,a,"height")))}},minSize:{configurable:!0,get:function(){return this.rg},set:function(a){var b=this.rg;b.A(a)||(F&&w(a,Fb,O,"minSize"),a=a.copy(),isNaN(a.width)&&(a.width=0),isNaN(a.height)&&(a.height=0),a.freeze(),this.rg=a,this.u(),this.g("minSize",b,a))}},maxSize:{configurable:!0,get:function(){return this.qg},set:function(a){var b=this.qg;b.A(a)||(F&&w(a,Fb,O,"maxSize"), +a=a.copy(),isNaN(a.width)&&(a.width=Infinity),isNaN(a.height)&&(a.height=Infinity),a.freeze(),this.qg=a,this.u(),this.g("maxSize",b,a))}},measuredBounds:{configurable:!0,get:function(){return this.vc}},naturalBounds:{configurable:!0,get:function(){return this.wc}},margin:{configurable:!0,get:function(){return this.vh},set:function(a){"number"===typeof a?a=new hc(a):F&&w(a,hc,O,"margin");var b=this.vh;b.A(a)||(this.vh=a=a.K(),this.u(),this.g("margin",b,a))}}, +transform:{configurable:!0,get:function(){0!==(this.I&2048)===!0&&Ll(this);return this.xb}},Md:{configurable:!0,get:function(){0!==(this.I&4096)===!0&&Ll(this);return this.ji}},alignment:{configurable:!0,get:function(){return this.Db},set:function(a){var b=this.Db;b.A(a)||(F&&w(a,N,O,"alignment"),a.Sb()&&!a.Ib()&&v("GraphObject.alignment for "+this+" must be a real Spot or Spot.Default, not: "+a),this.Db=a=a.K(),Xl(this),this.g("alignment",b,a))}},column:{configurable:!0, +enumerable:!0,get:function(){return this.dh},set:function(a){F&&C(a,O,"column");a=Math.round(a);var b=this.dh;b!==a&&(0>a&&za(a,">= 0",O,"column"),this.dh=a,this.u(),this.g("column",b,a))}},columnSpan:{configurable:!0,get:function(){return this.Mn},set:function(a){F&&A(a,"number",O,"columnSpan");a=Math.round(a);var b=this.Mn;b!==a&&(1>a&&za(a,">= 1",O,"columnSpan"),this.Mn=a,this.u(),this.g("columnSpan",b,a))}},row:{configurable:!0,get:function(){return this.Wp},set:function(a){F&& +C(a,O,"row");a=Math.round(a);var b=this.Wp;b!==a&&(0>a&&za(a,">= 0",O,"row"),this.Wp=a,this.u(),this.g("row",b,a))}},rowSpan:{configurable:!0,get:function(){return this.Xp},set:function(a){F&&A(a,"number",O,"rowSpan");a=Math.round(a);var b=this.Xp;b!==a&&(1>a&&za(a,">= 1",O,"rowSpan"),this.Xp=a,this.u(),this.g("rowSpan",b,a))}},spanAllocation:{configurable:!0,get:function(){return this.oq},set:function(a){var b=this.oq;b!==a&&(null!==a&&A(a,"function",O,"spanAllocation"), +this.oq=a,this.u(),this.g("spanAllocation",b,a))}},alignmentFocus:{configurable:!0,get:function(){return this.ll},set:function(a){var b=this.ll;b.A(a)||(F&&w(a,N,O,"alignmentFocus"),!F||!a.Sb()||a.Ib()||a.br()&&this instanceof V||v("GraphObject.alignmentFocus must be a real Spot or Spot.Default, not: "+a),this.ll=a=a.K(),this.u(),this.g("alignmentFocus",b,a))}},portId:{configurable:!0,get:function(){return this.Kp},set:function(a){var b=this.Kp;if(b!==a){F&&null!==a&&A(a, +"string",O,"portId");var c=this.part;null===c||c instanceof V||(v("Cannot set portID on a Link: "+a),c=null);null!==b&&null!==c&&lm(c,this);this.Kp=a;null!==a&&null!==c&&(c.Yh=!0,mm(c,this));this.g("portId",b,a)}}},toSpot:{configurable:!0,get:function(){return null!==this.S?this.S.Nh:Bc},set:function(a){this.Qc();var b=this.S.Nh;b.A(a)||(F&&w(a,N,O,"toSpot"),a=a.K(),this.S.Nh=a,this.g("toSpot",b,a),am(this))}},toEndSegmentLength:{configurable:!0,get:function(){return null!== +this.S?this.S.Lh:10},set:function(a){this.Qc();var b=this.S.Lh;b!==a&&(F&&A(a,"number",O,"toEndSegmentLength"),0>a&&za(a,">= 0",O,"toEndSegmentLength"),this.S.Lh=a,this.g("toEndSegmentLength",b,a),am(this))}},toShortLength:{configurable:!0,get:function(){return null!==this.S?this.S.Mh:0},set:function(a){this.Qc();var b=this.S.Mh;b!==a&&(F&&A(a,"number",O,"toShortLength"),this.S.Mh=a,this.g("toShortLength",b,a),am(this))}},toLinkable:{configurable:!0,get:function(){return null!== +this.S?this.S.xq:null},set:function(a){this.Qc();var b=this.S.xq;b!==a&&(F&&null!==a&&A(a,"boolean",O,"toLinkable"),this.S.xq=a,this.g("toLinkable",b,a))}},toMaxLinks:{configurable:!0,get:function(){return null!==this.S?this.S.yq:Infinity},set:function(a){this.Qc();var b=this.S.yq;b!==a&&(F&&A(a,"number",O,"toMaxLinks"),0>a&&za(a,">= 0",O,"toMaxLinks"),this.S.yq=a,this.g("toMaxLinks",b,a))}},fromSpot:{configurable:!0,get:function(){return null!==this.S?this.S.oh:Bc},set:function(a){this.Qc(); +var b=this.S.oh;b.A(a)||(F&&w(a,N,O,"fromSpot"),a=a.K(),this.S.oh=a,this.g("fromSpot",b,a),am(this))}},fromEndSegmentLength:{configurable:!0,get:function(){return null!==this.S?this.S.mh:10},set:function(a){this.Qc();var b=this.S.mh;b!==a&&(F&&A(a,"number",O,"fromEndSegmentLength"),0>a&&za(a,">= 0",O,"fromEndSegmentLength"),this.S.mh=a,this.g("fromEndSegmentLength",b,a),am(this))}},fromShortLength:{configurable:!0,get:function(){return null!==this.S?this.S.nh:0},set:function(a){this.Qc(); +var b=this.S.nh;b!==a&&(F&&A(a,"number",O,"fromShortLength"),this.S.nh=a,this.g("fromShortLength",b,a),am(this))}},fromLinkable:{configurable:!0,get:function(){return null!==this.S?this.S.ro:null},set:function(a){this.Qc();var b=this.S.ro;b!==a&&(F&&null!==a&&A(a,"boolean",O,"fromLinkable"),this.S.ro=a,this.g("fromLinkable",b,a))}},fromMaxLinks:{configurable:!0,get:function(){return null!==this.S?this.S.so:Infinity},set:function(a){this.Qc();var b=this.S.so;b!==a&&(F&& +A(a,"number",O,"fromMaxLinks"),0>a&&za(a,">= 0",O,"fromMaxLinks"),this.S.so=a,this.g("fromMaxLinks",b,a))}},cursor:{configurable:!0,get:function(){return this.Ai},set:function(a){var b=this.Ai;b!==a&&(A(a,"string",O,"cursor"),this.Ai=a,this.g("cursor",b,a))}},click:{configurable:!0,get:function(){return null!==this.R?this.R.ag:null},set:function(a){wl(this);var b=this.R.ag;b!==a&&(null!==a&&A(a,"function",O,"click"),this.R.ag=a,this.g("click",b,a))}},doubleClick:{configurable:!0, +enumerable:!0,get:function(){return null!==this.R?this.R.fg:null},set:function(a){wl(this);var b=this.R.fg;b!==a&&(null!==a&&A(a,"function",O,"doubleClick"),this.R.fg=a,this.g("doubleClick",b,a))}},contextClick:{configurable:!0,get:function(){return null!==this.R?this.R.bg:null},set:function(a){wl(this);var b=this.R.bg;b!==a&&(null!==a&&A(a,"function",O,"contextClick"),this.R.bg=a,this.g("contextClick",b,a))}},mouseEnter:{configurable:!0,get:function(){return null!==this.R? +this.R.tg:null},set:function(a){wl(this);var b=this.R.tg;b!==a&&(null!==a&&A(a,"function",O,"mouseEnter"),this.R.tg=a,this.g("mouseEnter",b,a))}},mouseLeave:{configurable:!0,get:function(){return null!==this.R?this.R.wg:null},set:function(a){wl(this);var b=this.R.wg;b!==a&&(null!==a&&A(a,"function",O,"mouseLeave"),this.R.wg=a,this.g("mouseLeave",b,a))}},mouseOver:{configurable:!0,get:function(){return null!==this.R?this.R.xg:null},set:function(a){wl(this);var b=this.R.xg; +b!==a&&(null!==a&&A(a,"function",O,"mouseOver"),this.R.xg=a,this.g("mouseOver",b,a))}},mouseHover:{configurable:!0,get:function(){return null!==this.R?this.R.vg:null},set:function(a){wl(this);var b=this.R.vg;b!==a&&(null!==a&&A(a,"function",O,"mouseHover"),this.R.vg=a,this.g("mouseHover",b,a))}},mouseHold:{configurable:!0,get:function(){return null!==this.R?this.R.ug:null},set:function(a){wl(this);var b=this.R.ug;b!==a&&(null!==a&&A(a,"function",O,"mouseHold"),this.R.ug= +a,this.g("mouseHold",b,a))}},mouseDragEnter:{configurable:!0,get:function(){return null!==this.R?this.R.np:null},set:function(a){wl(this);var b=this.R.np;b!==a&&(null!==a&&A(a,"function",O,"mouseDragEnter"),this.R.np=a,this.g("mouseDragEnter",b,a))}},mouseDragLeave:{configurable:!0,get:function(){return null!==this.R?this.R.op:null},set:function(a){wl(this);var b=this.R.op;b!==a&&(null!==a&&A(a,"function",O,"mouseDragLeave"),this.R.op=a,this.g("mouseDragLeave",b,a))}}, +mouseDrop:{configurable:!0,get:function(){return null!==this.R?this.R.sg:null},set:function(a){wl(this);var b=this.R.sg;b!==a&&(null!==a&&A(a,"function",O,"mouseDrop"),this.R.sg=a,this.g("mouseDrop",b,a))}},actionDown:{configurable:!0,get:function(){return null!==this.R?this.R.un:null},set:function(a){wl(this);var b=this.R.un;b!==a&&(null!==a&&A(a,"function",O,"actionDown"),this.R.un=a,this.g("actionDown",b,a))}},actionMove:{configurable:!0,get:function(){return null!== +this.R?this.R.vn:null},set:function(a){wl(this);var b=this.R.vn;b!==a&&(null!==a&&A(a,"function",O,"actionMove"),this.R.vn=a,this.g("actionMove",b,a))}},actionUp:{configurable:!0,get:function(){return null!==this.R?this.R.wn:null},set:function(a){wl(this);var b=this.R.wn;b!==a&&(null!==a&&A(a,"function",O,"actionUp"),this.R.wn=a,this.g("actionUp",b,a))}},actionCancel:{configurable:!0,get:function(){return null!==this.R?this.R.tn:null},set:function(a){wl(this);var b=this.R.tn; +b!==a&&(null!==a&&A(a,"function",O,"actionCancel"),this.R.tn=a,this.g("actionCancel",b,a))}},toolTip:{configurable:!0,get:function(){return null!==this.R?this.R.Ig:null},set:function(a){wl(this);var b=this.R.Ig;b!==a&&(!F||null===a||a instanceof Ve||a instanceof ef||v("GraphObject.toolTip must be an Adornment or HTMLInfo."),this.R.Ig=a,this.g("toolTip",b,a))}},contextMenu:{configurable:!0,get:function(){return null!==this.R?this.R.cg:null},set:function(a){wl(this);var b= +this.R.cg;b!==a&&(!F||a instanceof Ve||a instanceof ef||v("GraphObject.contextMenu must be an Adornment or HTMLInfo."),this.R.cg=a,this.g("contextMenu",b,a))}}});O.prototype.trigger=O.prototype.gx;O.prototype.setProperties=O.prototype.Tw;O.prototype.findTemplateBinder=O.prototype.tj;O.prototype.bind=O.prototype.bind;O.prototype.isEnabledObject=O.prototype.Tg;O.prototype.isVisibleObject=O.prototype.Sf;O.prototype.isContainedBy=O.prototype.Sg;O.prototype.getNearestIntersectionPoint=O.prototype.$t; +O.prototype.getLocalPoint=O.prototype.Zt;O.prototype.getDocumentScale=O.prototype.Mf;O.prototype.getDocumentAngle=O.prototype.wj;O.prototype.getDocumentBounds=O.prototype.xj;O.prototype.getDocumentPoint=O.prototype.ja;O.prototype.intersectsRect=O.prototype.Sc;O.prototype.containedInRect=O.prototype.Uh;O.prototype.containsRect=O.prototype.Te;O.prototype.containsPoint=O.prototype.ca;O.prototype.raiseChanged=O.prototype.g;O.prototype.raiseChangedEvent=O.prototype.ab;O.prototype.addCopyProperty=O.prototype.jy; +var em=null;O.className="GraphObject";em=new Bb; +im("Button",function(){function a(a,b){return null!==a.diagram.ac(a.documentPoint,function(a){for(;null!==a.panel&&!a.isActionable;)a=a.panel;return a},function(a){return a===b})}var b=dm(W,W.Auto,{isActionable:!0,enabledChanged:function(a,b){if(a instanceof W){var c=a.ib("ButtonBorder");null!==c&&(c.fill=b?a._buttonFillNormal:a._buttonFillDisabled)}},cursor:"pointer",_buttonFillNormal:"#F5F5F5",_buttonStrokeNormal:"#BDBDBD",_buttonFillOver:"#E0E0E0",_buttonStrokeOver:"#9E9E9E",_buttonFillPressed:"#BDBDBD", +_buttonStrokePressed:"#9E9E9E",_buttonFillDisabled:"#E5E5E5"},dm(Uf,{name:"ButtonBorder",figure:"RoundedRectangle",spot1:new N(0,0,2.76142374915397,2.761423749153969),spot2:new N(1,1,-2.76142374915397,-2.761423749153969),parameter1:2,parameter2:2,fill:"#F5F5F5",stroke:"#BDBDBD"}));b.mouseEnter=function(a,b){if(b.Tg()&&b instanceof W&&(a=b.ib("ButtonBorder"),a instanceof Uf)){var c=b._buttonFillOver;b._buttonFillNormal=a.fill;a.fill=c;c=b._buttonStrokeOver;b._buttonStrokeNormal=a.stroke;a.stroke=c}}; +b.mouseLeave=function(a,b){b.Tg()&&b instanceof W&&(a=b.ib("ButtonBorder"),a instanceof Uf&&(a.fill=b._buttonFillNormal,a.stroke=b._buttonStrokeNormal))};b.actionDown=function(a,b){if(b.Tg()&&b instanceof W&&null!==b._buttonFillPressed&&0===a.button){var c=b.ib("ButtonBorder");if(c instanceof Uf){a=a.diagram;var d=a.skipsUndoManager;a.skipsUndoManager=!0;var g=b._buttonFillPressed;b._buttonFillOver=c.fill;c.fill=g;g=b._buttonStrokePressed;b._buttonStrokeOver=c.stroke;c.stroke=g;a.skipsUndoManager= +d}}};b.actionUp=function(b,d){if(d.Tg()&&d instanceof W&&null!==d._buttonFillPressed&&0===b.button){var c=d.ib("ButtonBorder");if(c instanceof Uf){var f=b.diagram,g=f.skipsUndoManager;f.skipsUndoManager=!0;a(b,d)?(c.fill=d._buttonFillOver,c.stroke=d._buttonStrokeOver):(c.fill=d._buttonFillNormal,c.stroke=d._buttonStrokeNormal);f.skipsUndoManager=g}}};b.actionCancel=function(b,d){if(d.Tg()&&d instanceof W&&null!==d._buttonFillPressed){var c=d.ib("ButtonBorder");if(c instanceof Uf){var f=b.diagram, +g=f.skipsUndoManager;f.skipsUndoManager=!0;a(b,d)?(c.fill=d._buttonFillOver,c.stroke=d._buttonStrokeOver):(c.fill=d._buttonFillNormal,c.stroke=d._buttonStrokeNormal);f.skipsUndoManager=g}}};b.actionMove=function(b,d){if(d.Tg()&&d instanceof W&&null!==d._buttonFillPressed){var c=b.diagram;if(0===c.firstInput.button&&(c.currentTool.standardMouseOver(),a(b,d)&&(b=d.ib("ButtonBorder"),b instanceof Uf))){var f=c.skipsUndoManager;c.skipsUndoManager=!0;var g=d._buttonFillPressed;b.fill!==g&&(b.fill=g);g= +d._buttonStrokePressed;b.stroke!==g&&(b.stroke=g);c.skipsUndoManager=f}}};return b}); +im("TreeExpanderButton",function(){var a=dm("Button",{_treeExpandedFigure:"MinusLine",_treeCollapsedFigure:"PlusLine"},dm(Uf,{name:"ButtonIcon",figure:"MinusLine",stroke:"#424242",strokeWidth:2,desiredSize:Ub},(new Ui("figure","isTreeExpanded",function(a,c){c=c.panel;return a?c._treeExpandedFigure:c._treeCollapsedFigure})).hr()),{visible:!1},(new Ui("visible","isTreeLeaf",function(a){return!a})).hr());a.click=function(a,c){c=c.part;c instanceof Ve&&(c=c.adornedPart);if(c instanceof V){var b=c.diagram; +if(null!==b){b=b.commandHandler;if(c.isTreeExpanded){if(!b.canCollapseTree(c))return}else if(!b.canExpandTree(c))return;a.handled=!0;c.isTreeExpanded?b.collapseTree(c):b.expandTree(c)}}};return a}); +im("SubGraphExpanderButton",function(){var a=dm("Button",{_subGraphExpandedFigure:"MinusLine",_subGraphCollapsedFigure:"PlusLine"},dm(Uf,{name:"ButtonIcon",figure:"MinusLine",stroke:"#424242",strokeWidth:2,desiredSize:Ub},(new Ui("figure","isSubGraphExpanded",function(a,c){c=c.panel;return a?c._subGraphExpandedFigure:c._subGraphCollapsedFigure})).hr()));a.click=function(a,c){c=c.part;c instanceof Ve&&(c=c.adornedPart);if(c instanceof If){var b=c.diagram;if(null!==b){b=b.commandHandler;if(c.isSubGraphExpanded){if(!b.canCollapseSubGraph(c))return}else if(!b.canExpandSubGraph(c))return; +a.handled=!0;c.isSubGraphExpanded?b.collapseSubGraph(c):b.expandSubGraph(c)}}};return a});im("ToolTip",function(){return dm(Ve,W.Auto,{isShadowed:!0,shadowColor:"rgba(0, 0, 0, .4)",shadowOffset:new J(0,3),shadowBlur:5},dm(Uf,{name:"Border",figure:"RoundedRectangle",parameter1:1,parameter2:1,fill:"#F5F5F5",stroke:"#F0F0F0",spot1:new N(0,0,4,6),spot2:new N(1,1,-4,-4)}))}); +im("ContextMenu",function(){return dm(Ve,W.Vertical,{background:"#F5F5F5",isShadowed:!0,shadowColor:"rgba(0, 0, 0, .4)",shadowOffset:new J(0,3),shadowBlur:5},new Ui("background","",function(a){return null!==a.adornedPart&&null!==a.placeholder?null:"#F5F5F5"}))});im("ContextMenuButton",function(){var a=dm("Button");a.stretch=ql;var b=a.ib("ButtonBorder");b instanceof Uf&&(b.figure="Rectangle",b.strokeWidth=0,b.spot1=new N(0,0,2,3),b.spot2=new N(1,1,-2,-2));return a}); +im("PanelExpanderButton",function(a){var b=jm(a,"COLLAPSIBLE"),c=dm("Button",{_buttonExpandedFigure:"M0 0 M0 6 L4 2 8 6 M8 8",_buttonCollapsedFigure:"M0 0 M0 2 L4 6 8 2 M8 8",_buttonFillNormal:"rgba(0, 0, 0, 0)",_buttonStrokeNormal:null,_buttonFillOver:"rgba(0, 0, 0, .2)",_buttonStrokeOver:null,_buttonFillPressed:"rgba(0, 0, 0, .4)",_buttonStrokePressed:null},dm(Uf,{name:"ButtonIcon",strokeWidth:2},(new Ui("geometryString","visible",function(a){return a?c._buttonExpandedFigure:c._buttonCollapsedFigure})).hr(b))); +a=c.ib("ButtonBorder");a instanceof Uf&&(a.stroke=null,a.fill="rgba(0, 0, 0, 0)");c.click=function(a,c){var d=c.diagram;if(null!==d&&!d.isReadOnly){var e=c.tj();null===e&&(e=c.part);null!==e&&(c=e.ib(b),null!==c&&(a.handled=!0,d.Ca("Collapse/Expand Panel"),c.visible=!c.visible,d.cb("Collapse/Expand Panel")))}};return c}); +im("CheckBoxButton",function(a){var b=jm(a);a=dm("Button",{desiredSize:new Fb(14,14)},dm(Uf,{name:"ButtonIcon",geometryString:"M0 0 M0 8.85 L4.9 13.75 16.2 2.45 M16.2 16.2",strokeWidth:2,stretch:Bd,geometryStretch:Og,visible:!1},""!==b?(new Ui("visible",b)).Yy():[]));a.click=function(a,d){if(d instanceof W){var c=a.diagram;if(!(null===c||c.isReadOnly||""!==b&&c.model.isReadOnly)){a.handled=!0;var f=d.ib("ButtonIcon");c.Ca("checkbox");f.visible=!f.visible;"function"===typeof d._doClick&&d._doClick(a, +d);c.cb("checkbox")}}};return a}); +im("CheckBox",function(a){a=jm(a);a=dm("CheckBoxButton",a,{name:"Button",isActionable:!1,margin:new hc(0,1,0,0)});var b=dm(W,"Horizontal",a,{isActionable:!0,cursor:a.cursor,margin:1,_buttonFillNormal:a._buttonFillNormal,_buttonStrokeNormal:a._buttonStrokeNormal,_buttonFillOver:a._buttonFillOver,_buttonStrokeOver:a._buttonStrokeOver,_buttonFillPressed:a._buttonFillPressed,_buttonStrokePressed:a._buttonStrokePressed,_buttonFillDisabled:a._buttonFillDisabled,mouseEnter:a.mouseEnter,mouseLeave:a.mouseLeave, +actionDown:a.actionDown,actionUp:a.actionUp,actionCancel:a.actionCancel,actionMove:a.actionMove,click:a.click,_buttonClick:a.click});a.mouseEnter=null;a.mouseLeave=null;a.actionDown=null;a.actionUp=null;a.actionCancel=null;a.actionMove=null;a.click=null;return b});O.None=zg=new E(O,"None",0);O.Default=pl=new E(O,"Default",0);O.Vertical=rl=new E(O,"Vertical",4);O.Horizontal=ql=new E(O,"Horizontal",5);O.Fill=Bd=new E(O,"Fill",3);O.Uniform=Og=new E(O,"Uniform",1); +O.UniformToFill=sl=new E(O,"UniformToFill",2);O.FlipVertical=tl=new E(O,"FlipVertical",1);O.FlipHorizontal=ul=new E(O,"FlipHorizontal",2);O.FlipBoth=vl=new E(O,"FlipBoth",3);O.make=dm;O.getBuilders=function(){var a=new Bb,b;for(b in em)if(b!==b.toLowerCase()){var c=em.J(b);"function"===typeof c&&a.add(b,c)}a.freeze();return a};O.defineBuilder=im;O.takeBuilderArgument=jm; +function xl(){this.ko=this.cg=this.Ig=this.tn=this.wn=this.vn=this.un=this.sg=this.op=this.np=this.ug=this.vg=this.xg=this.wg=this.tg=this.bg=this.fg=this.ag=null}xl.prototype.copy=function(){var a=new xl;a.ag=this.ag;a.fg=this.fg;a.bg=this.bg;a.tg=this.tg;a.wg=this.wg;a.xg=this.xg;a.vg=this.vg;a.ug=this.ug;a.np=this.np;a.op=this.op;a.sg=this.sg;a.un=this.un;a.vn=this.vn;a.wn=this.wn;a.tn=this.tn;a.Ig=this.Ig;a.cg=this.cg;a.ko=this.ko;return a};xl.className="GraphObjectEventHandlers"; +function nm(){this.Ua=[1,0,0,1,0,0]}nm.prototype.copy=function(){var a=new nm;a.Ua[0]=this.Ua[0];a.Ua[1]=this.Ua[1];a.Ua[2]=this.Ua[2];a.Ua[3]=this.Ua[3];a.Ua[4]=this.Ua[4];a.Ua[5]=this.Ua[5];return a};nm.prototype.translate=function(a,b){this.Ua[4]+=this.Ua[0]*a+this.Ua[2]*b;this.Ua[5]+=this.Ua[1]*a+this.Ua[3]*b};nm.prototype.scale=function(a,b){this.Ua[0]*=a;this.Ua[1]*=a;this.Ua[2]*=b;this.Ua[3]*=b};nm.className="STransform"; +function om(a){this.type=a;this.r2=this.y2=this.x2=this.r1=this.y1=this.x1=0;this.sy=[];this.pattern=null}om.prototype.addColorStop=function(a,b){this.sy.push({offset:a,color:b})};om.className="SGradient"; +function Sj(a,b){this.ownerDocument=a=void 0===b?qa.document:b;this.eB="http://www.w3.org/2000/svg";void 0!==a&&(this.Oa=this.Vb("svg",{width:"1px",height:"1px",viewBox:"0 0 1 1"}),this.Oa.setAttributeNS("http://www.w3.org/2000/xmlns/","xmlns","http://www.w3.org/2000/svg"),this.Oa.setAttributeNS("http://www.w3.org/2000/xmlns/","xmlns:xlink","http://www.w3.org/1999/xlink"));this.Qq=null;this.context=new pm(this)} +Sj.prototype.resize=function(a,b,c,d){return this.width!==a||this.height!==b?(this.style.width=c+"px",this.style.height=d+"px",this.Oa.setAttributeNS(null,"width",c+"px"),this.Oa.setAttributeNS(null,"height",d+"px"),this.Oa.setAttributeNS(null,"viewBox","0 0 "+c+" "+d),this.context.Qx.firstElementChild.setAttributeNS(null,"width",c+"px"),this.context.Qx.firstElementChild.setAttributeNS(null,"height",d+"px"),!0):!1}; +Sj.prototype.Vb=function(a,b,c){a=this.ownerDocument.createElementNS(this.eB,a);if(Ga(b))for(var d in b)a.setAttributeNS("href"===d?"http://www.w3.org/1999/xlink":"",d,b[d]);void 0!==c&&(a.textContent=c);return a};Sj.prototype.getBoundingClientRect=function(){return this.Oa.getBoundingClientRect()};Sj.prototype.focus=function(){this.Oa.focus()};Sj.prototype.zy=function(){this.ownerDocument=null}; +na.Object.defineProperties(Sj.prototype,{width:{configurable:!0,get:function(){return this.Oa.width.baseVal.value},set:function(a){this.Oa.width=a}},height:{configurable:!0,get:function(){return this.Oa.height.baseVal.value},set:function(a){this.Oa.height=a}},style:{configurable:!0,get:function(){return this.Oa.style}}});Sj.className="SVGSurface"; +function pm(a){this.Au=a;this.svg=a.Oa;this.stack=[];this.nd=[];this.fillStyle="#000000";this.font="10px sans-serif";this.globalAlpha=1;this.lineCap="butt";this.lineDashOffset=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.clipInsteadOfFill=!1;this.Gg=this.st=this.rt=0;this.iu=null;this.path=[];this.hv=!1;this.Fh=null;this.Gh=0;this.Ue=new nm; +qm(this,1,0,0,1,0,0);var b=wb++,c=this.Vb("clipPath",{id:"mainClip"+b});c.appendChild(this.Vb("rect",{x:0,y:0,width:a.width,height:a.height}));this.Qx=c;this.Au.Oa.appendChild(c);this.nd[0].setAttributeNS(null,"clip-path","url(#mainClip"+b+")");this.gB={}}t=pm.prototype; +t.arc=function(a,b,c,d,e,f,g,h){var k=2*Math.PI,l=k-1E-6,m=c*Math.cos(d),n=c*Math.sin(d),p=a+m,r=b+n,q=f?0:1;d=f?d-e:e-d;(1E-6d&&(d=d%k+k);d>l?(this.path.push(["A",c,c,0,1,q,a-m,b-n]),this.path.push(["A",c,c,0,1,q,p,r])):1E-6=Math.PI),q,a+c*Math.cos(e),b+c*Math.sin(e)])};t.beginPath=function(){this.path=[]};t.bezierCurveTo=function(a,b,c,d,e,f){this.path.push(["C",a,b,c,d,e,f])};t.clearRect=function(){}; +t.clip=function(){this.addPath("clipPath",this.path,this.Ue)};t.closePath=function(){this.path.push(["z"])};t.createLinearGradient=function(a,b,c,d){var e=new om("linear");e.x1=a;e.y1=b;e.x2=c;e.y2=d;return e}; +t.createPattern=function(a){var b="";a instanceof HTMLCanvasElement&&(b=a.toDataURL());a instanceof HTMLImageElement&&(b=a.getAttribute("src"));var c=this.gB;if(c[b])return"url(#"+c[b]+")";var d="PATTERN"+wb++,e={x:0,y:0,width:a.width,height:a.height,href:b};a=this.Vb("pattern",{width:a.width,height:a.height,id:d,patternUnits:"userSpaceOnUse"});a.appendChild(this.Vb(Uk,e));this.svg.appendChild(a);c[b]=d;return"url(#"+d+")"}; +t.createRadialGradient=function(a,b,c,d,e,f){var g=new om("radial");g.x1=a;g.y1=b;g.r1=c;g.x2=d;g.y2=e;g.r2=f;return g}; +t.drawImage=function(a,b,c,d,e,f,g,h,k){var l="";a instanceof HTMLCanvasElement&&(l=a.toDataURL());a instanceof HTMLImageElement&&(l=a.getAttribute("src"));var m=a instanceof HTMLImageElement?a.naturalWidth:a.width,n=a instanceof HTMLImageElement?a.naturalHeight:a.height;void 0===d&&(f=b,g=c,h=d=m,k=e=n);d=d||0;e=e||0;f=f||0;g=g||0;h=h||0;k=k||0;a={x:0,y:0,width:m||d,height:n||e,href:l};K.da(d,h)&&K.da(e,k)?-1===l.toLowerCase().indexOf(".svg")&&-1===l.toLowerCase().indexOf("data:image/svg")&&(a.preserveAspectRatio= +"xMidYMid slice"):a.preserveAspectRatio="none";l="";h/=d;k/=e;if(0!==f||0!==g)l+=" translate("+f+", "+g+")";if(1!==h||1!==k)l+=" scale("+h+", "+k+")";if(0!==b||0!==c)l+=" translate("+-b+", "+-c+")";if(0!==b||0!==c||d!==m||e!==n)f="CLIP"+wb++,g=this.Vb("clipPath",{id:f}),g.appendChild(this.Vb("rect",{x:b,y:c,width:d,height:e})),this.svg.appendChild(g),a["clip-path"]="url(#"+f+")";rm(this,Uk,a,this.Ue,l);this.addElement(Uk,a)};t.fill=function(){this.addPath("fill",this.path,this.Ue)}; +t.We=function(){this.clipInsteadOfFill?this.clip():this.fill()};t.fillRect=function(a,b,c,d){a=[a,b,c,d];a={x:a[0],y:a[1],width:a[2],height:a[3]};rm(this,"fill",a,this.Ue);this.addElement("rect",a)};t.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};rm(this,"fill",b,this.Ue);this.addElement("text",b,a[0])};t.lineTo=function(a,b){this.path.push(["L",a,b])}; +t.moveTo=function(a,b){this.path.push(["M",a,b])};t.quadraticCurveTo=function(a,b,c,d){this.path.push(["Q",a,b,c,d])};t.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"])}; +t.restore=function(){this.Ue=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.lineDashOffset=a.lineDashOffset;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}; +t.save=function(){this.stack.push({fillStyle:this.fillStyle,font:this.font,globalAlpha:this.globalAlpha,lineCap:this.lineCap,lineDashOffset:this.lineDashOffset,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;bb.offset?1:-1});for(e=0;ee.width+e.x||e.x>k.width+k.x||n>e.height+e.y||e.y>k.height+k.y)return!0;k=!0;qm(a,1,0,0,1,0,0);a.save();a.beginPath();a.rect(m,n,p,l);a.clip()}if(this.Rf()&&!this.isVisible())return!0;a.Ue.Ua=[1,0,0,1,0,0];(this instanceof ih&&1b?(this.scale(b/a,1),this.translate((a-b)/2,0)):b>a&&(this.scale(1,a/b),this.translate(0,(b-a)/2));this.Ln?this.clip():this.fill();a>b?(this.translate(-(a-b)/2,0),this.scale(1/(b/a),1)):b>a&&(this.translate(0,-(b-a)/2),this.scale(1,1/(a/b)))}else this.Ln?this.clip():this.fill()};t.Hj=function(){this.Ln||this.stroke()};t.Ww=function(a,b,c){this.rt=a;this.st=b;this.Gg=c}; +t.St=function(a,b){var c=this.aa;void 0!==c.setLineDash&&(c.setLineDash(a),c.lineDashOffset=b)};t.Qt=function(){var a=this.aa;void 0!==a.setLineDash&&(a.setLineDash(tm),a.lineDashOffset=0)};t.Ac=function(a){a&&(this.Lu="");this.Ku=this.Mu=""}; +na.Object.defineProperties(Sl.prototype,{fillStyle:{configurable:!0,get:function(){return this.aa.fillStyle},set:function(a){this.Ku!==a&&(this.Ku=this.aa.fillStyle=a)}},font:{configurable:!0,get:function(){return this.aa.font},set:function(a){this.Lu!==a&&(this.Lu=this.aa.font=a)}},globalAlpha:{configurable:!0,get:function(){return this.aa.globalAlpha},set:function(a){this.aa.globalAlpha=a}},lineCap:{configurable:!0,get:function(){return this.aa.lineCap}, +set:function(a){this.aa.lineCap=a}},lineDashOffset:{configurable:!0,get:function(){return this.aa.lineDashOffset},set:function(a){this.aa.lineDashOffset=a}},lineJoin:{configurable:!0,get:function(){return this.aa.lineJoin},set:function(a){this.aa.lineJoin=a}},lineWidth:{configurable:!0,get:function(){return this.aa.lineWidth},set:function(a){this.aa.lineWidth=a}},miterLimit:{configurable:!0,get:function(){return this.aa.miterLimit},set:function(a){this.aa.miterLimit= +a}},shadowBlur:{configurable:!0,get:function(){return this.aa.shadowBlur},set:function(a){this.aa.shadowBlur=a}},shadowColor:{configurable:!0,get:function(){return this.aa.shadowColor},set:function(a){this.aa.shadowColor=a}},shadowOffsetX:{configurable:!0,get:function(){return this.aa.shadowOffsetX},set:function(a){this.aa.shadowOffsetX=a}},shadowOffsetY:{configurable:!0,get:function(){return this.aa.shadowOffsetY},set:function(a){this.aa.shadowOffsetY= +a}},strokeStyle:{configurable:!0,get:function(){return this.aa.strokeStyle},set:function(a){this.Mu!==a&&(this.Mu=this.aa.strokeStyle=a)}},textAlign:{configurable:!0,get:function(){return this.aa.textAlign},set:function(a){this.aa.textAlign=a}},imageSmoothingEnabled:{configurable:!0,get:function(){return this.aa.imageSmoothingEnabled},set:function(a){this.aa.imageSmoothingEnabled=a}},clipInsteadOfFill:{configurable:!0,get:function(){return this.Ln}, +set:function(a){this.Ln=a}}});var tm=Object.freeze([]);Sl.className="CanvasSurfaceContext";function um(){this.W=this.w=this.L=this.l=0}um.className="ColorNumbers"; +function Ol(a){F&&1a)&&za(a,"0 <= loc <= 1",Ol,"addColorStop:loc");A(b,"string",Ol,"addColorStop:color");F&&!xm(b)&&v('Color "'+b+'" is not a valid color string for Brush.addColorStop');null===this.te&&(this.te=new Bb);this.te.add(a,b);this.sa===Rl&&(this.type=Ul);this.ue=null;return this}; +function xm(a){if("black"===a)return!0;if(""===a)return!1;F&&A(a,"string",Ol,"isValidColor");vm||(wm(),vm=!0);var b=ym;if(null===b)return!0;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} +t.ZA=function(a,b){this.s&&va(this);a=void 0===a||"number"!==typeof a?.2:a;b=void 0===b?zm:b;if(this.type===Rl)ni(this.color),this.color=Am(a,b);else if((this.type===Ul||this.type===Pl)&&null!==this.colorStops)for(var c=this.colorStops.iterator;c.next();)ni(c.value),this.addColorStop(c.key,Am(a,b));return this};function Bm(a,b,c){b=void 0===b||"number"!==typeof b?.2:b;c=void 0===c?zm:c;ni(a);return Am(b,c)} +t.Zz=function(a,b){this.s&&va(this);a=void 0===a||"number"!==typeof a?.2:a;b=void 0===b?zm:b;if(this.type===Rl)ni(this.color),this.color=Am(-a,b);else if((this.type===Ul||this.type===Pl)&&null!==this.colorStops)for(var c=this.colorStops.iterator;c.next();)ni(c.value),this.addColorStop(c.key,Am(-a,b));return this};function Cm(a,b,c){b=void 0===b||"number"!==typeof b?.2:b;c=void 0===c?zm:c;ni(a);return Am(-b,c)} +function Dm(a,b,c){ni(a);a=Em.l;var d=Em.L,e=Em.w,f=Em.W;ni(b);void 0===c&&(c=.5);return"rgba("+Math.round((Em.l-a)*c+a)+", "+Math.round((Em.L-d)*c+d)+", "+Math.round((Em.w-e)*c+e)+", "+Math.round((Em.W-f)*c+f)+")"} +t.Vy=function(){if(this.type===Rl)return Fm(this.color);if((this.type===Ul||this.type===Pl)&&null!==this.colorStops){var a=this.colorStops;if(this.type===Pl)return Fm(a.first().value);if(null!==a.get(.5))return Fm(a.get(.5));if(2===a.count)return a=a.ta(),Fm(Dm(a[0].value,a[1].value));for(var b=a.iterator,c=-1,d=-1,e=1,f=1;b.next();){var g=b.key,h=Math.abs(.5-b.key);e>f&&h=e&&hd&&(f=c,c=d,d=f,f=e);e=d-c;return Fm(Dm(a.get(c),a.get(d),1-f/e))}return!1}; +function Fm(a){if(!a)return!1;if(a instanceof Ol)return a.Vy();ni(a);return 128>(299*Em.l+587*Em.L+114*Em.w)/1E3} +function Am(a,b){switch(b){case zm:b=100*Gm(Em.l);var c=100*Gm(Em.L),d=100*Gm(Em.w);Hm.l=.4124564*b+.3575761*c+.1804375*d;Hm.L=.2126729*b+.7151522*c+.072175*d;Hm.w=.0193339*b+.119192*c+.9503041*d;Hm.W=Em.W;b=Im(Hm.l/Jm[0]);c=Im(Hm.L/Jm[1]);d=Im(Hm.w/Jm[2]);Km.l=116*c-16;Km.L=500*(b-c);Km.w=200*(c-d);Km.W=Hm.W;Km.l=Math.min(100,Math.max(0,Km.l+100*a));a=(Km.l+16)/116;b=a-Km.w/200;Hm.l=Jm[0]*Lm(Km.L/500+a);Hm.L=Jm[1]*(Km.l>Mm*Nm?Math.pow(a,3):Km.l/Mm);Hm.w=Jm[2]*Lm(b);Hm.W=Km.W;a=-.969266*Hm.l+1.8760108* +Hm.L+.041556*Hm.w;b=.0556434*Hm.l+-.2040259*Hm.L+1.0572252*Hm.w;Em.l=255*Om((3.2404542*Hm.l+-1.5371385*Hm.L+-.4985314*Hm.w)/100);Em.L=255*Om(a/100);Em.w=255*Om(b/100);Em.W=Hm.W;Em.l=Math.round(Em.l);255Em.l&&(Em.l=0);Em.L=Math.round(Em.L);255Em.L&&(Em.L=0);Em.w=Math.round(Em.w);255Em.w&&(Em.w=0);return"rgba("+Em.l+", "+Em.L+", "+Em.w+", "+Em.W+")";case Pm:return oi(),pi.w=Math.min(100,Math.max(0,pi.w+100*a)),"hsla("+pi.l+", "+pi.L+"%, "+pi.w+"%, "+ +pi.W+")";default:return v("Unknown color space: "+b),"rgba(0, 0, 0, 1)"}}function ni(a){vm||(wm(),vm=!0);var b=ym;if(null!==b){b.clearRect(0,0,1,1);b.fillStyle="#000000";var c=b.fillStyle;b.fillStyle=a;b.fillStyle!==c?(b.fillRect(0,0,1,1),a=b.getImageData(0,0,1,1).data,Em.l=a[0],Em.L=a[1],Em.w=a[2],Em.W=a[3]/255):(b.fillStyle="#FFFFFF",c=b.fillStyle,b.fillStyle=a,b.fillStyle===c&&F&&v('Color "'+a+'" is not a valid color string for RGBA color conversion'),Em.l=0,Em.L=0,Em.w=0,Em.W=1)}} +function oi(){var a=Em.l/255,b=Em.L/255,c=Em.w/255,d=Math.max(a,b,c),e=Math.min(a,b,c),f=d-e;e=(d+e)/2;if(0===f)var g=a=0;else{switch(d){case a:g=(b-c)/f%6;break;case b:g=(c-a)/f+2;break;case c:g=(a-b)/f+4}g*=60;0>g&&(g+=360);a=f/(1-Math.abs(2*e-1))}pi.l=Math.round(g);pi.L=Math.round(100*a);pi.w=Math.round(100*e);pi.W=Em.W}function Gm(a){a/=255;return.04045>=a?a/12.92:Math.pow((a+.055)/1.055,2.4)}function Om(a){return.0031308>=a?12.92*a:1.055*Math.pow(a,1/2.4)-.055} +function Im(a){return a>Nm?Math.pow(a,1/3):(Mm*a+16)/116}function Lm(a){var b=a*a*a;return b>Nm?b:(116*a-16)/Mm}function km(a,b){"string"===typeof a?F&&!xm(a)&&v('Color "'+a+'" is not a valid color string for '+b):a instanceof Ol||v("Value for "+b+" must be a color string or a Brush, not "+a)}function wm(){ym=gh?(new Vk(null)).context:null} +na.Object.defineProperties(Ol.prototype,{type:{configurable:!0,get:function(){return this.sa},set:function(a){this.s&&va(this,a);gb(a,Ol,Ol,"type");this.sa=a;this.start.Sb()&&(a===Ul?this.start=Fc:a===Pl&&(this.start=Kc));this.end.Sb()&&(a===Ul?this.end=Nc:a===Pl&&(this.end=Kc));this.ue=null}},color:{configurable:!0,get:function(){return this.rl},set:function(a){this.s&&va(this,a);F&&!xm(a)&&v('Color "'+a+'" is not a valid color string for Brush.color');this.rl=a;this.ue= +null}},start:{configurable:!0,get:function(){return this.Kd},set:function(a){this.s&&va(this,a);w(a,N,Ol,"start");this.Kd=a.K();this.ue=null}},end:{configurable:!0,get:function(){return this.El},set:function(a){this.s&&va(this,a);w(a,N,Ol,"end");this.El=a.K();this.ue=null}},startRadius:{configurable:!0,get:function(){return this.wt},set:function(a){this.s&&va(this,a);C(a,Ol,"startRadius");0>a&&za(a,">= zero",Ol,"startRadius");this.wt=a;this.ue=null}},endRadius:{configurable:!0, +enumerable:!0,get:function(){return this.ks},set:function(a){this.s&&va(this,a);C(a,Ol,"endRadius");0>a&&za(a,">= zero",Ol,"endRadius");this.ks=a;this.ue=null}},colorStops:{configurable:!0,get:function(){return this.te},set:function(a){this.s&&va(this,a);F&&w(a,Bb,Ol,"colorStops");this.te=a;this.ue=null}},pattern:{configurable:!0,get:function(){return this.Xs},set:function(a){this.s&&va(this,a);this.Xs=a;this.ue=null}}});Ol.prototype.isDark=Ol.prototype.Vy; +Ol.prototype.darkenBy=Ol.prototype.Zz;Ol.prototype.lightenBy=Ol.prototype.ZA;Ol.prototype.addColorStop=Ol.prototype.addColorStop;var Nm=216/24389,Mm=24389/27,Jm=[95.047,100,108.883],ym=null,Em=new um,pi=new um,Hm=new um,Km=new um,vm=!1;Ol.className="Brush";var Rl;Ol.Solid=Rl=new E(Ol,"Solid",0);var Ul;Ol.Linear=Ul=new E(Ol,"Linear",1);var Pl;Ol.Radial=Pl=new E(Ol,"Radial",2);var Tl;Ol.Pattern=Tl=new E(Ol,"Pattern",4);var zm;Ol.Lab=zm=new E(Ol,"Lab",5);var Pm;Ol.HSL=Pm=new E(Ol,"HSL",6); +Ol.randomColor=function(a,b){void 0===a&&(a=128);F&&(C(a,Ol,"randomColor:min"),(0>a||255b.length&&(b="0"+b);2>d.length&&(d="0"+d);2>a.length&&(a="0"+a);return"#"+b+d+ +a};Ol.isValidColor=xm;Ol.lighten=function(a){return Bm(a)};Ol.lightenBy=Bm;Ol.darken=function(a){return Cm(a)};Ol.darkenBy=Cm;Ol.mix=Dm;Ol.isDark=Fm;function hm(){this.va="Base"}hm.prototype.measure=function(){};hm.prototype.bB=function(a,b,c,d,e){a.measure(b,c,d,e)};hm.prototype.arrange=function(){};hm.prototype.Mz=function(a,b,c,d,e,f){a.arrange(b,c,d,e,f)};hm.prototype.kB=function(a){a.Nk()};hm.prototype.sc=function(){}; +na.Object.defineProperties(hm.prototype,{name:{configurable:!0,get:function(){return this.va},set:function(a){this.va=a}},classType:{configurable:!0,get:function(){return W}}});hm.prototype.remeasureObject=hm.prototype.kB;hm.prototype.arrangeElement=hm.prototype.Mz;hm.prototype.measureElement=hm.prototype.bB;hm.className="PanelLayout";function Qm(){this.va="Base"}ma(Qm,hm); +Qm.prototype.measure=function(a,b,c,d,e,f,g){var h=d.length;a=Rm(a);for(var k=0;kQ&&(Ya=Math.max(Q-Ic,0));var Eg=0===P.na;P.hc=P.hc+Ya;P.actual=P.na+Ya;Q=Math.max(Q-(Ya+(Eg?Ic:0)),0)}if(1===Xb.columnSpan&&(qb===zg||qb===rl)){P=a.getColumnDefinition(ub);var Sh=P.Cc();Ya=Math.max(Cc-P.actual,0);Ya+Sh>Y&&(Ya=Math.max(Y-Sh,0));var Wn=0===P.na;P.hc=P.hc+Ya;P.actual=P.na+Ya;Y=Math.max(Y-(Ya+(Wn?Sh:0)),0)}Ph&&Xb.Nk()}}}}}Oa(z); +var Zd=0,Ee=0;f=a.columnCount;for(var Fg=0;Fg=a.rowCount);cf++)P=a.getRowDefinition(bb.row+ +cf),Ya=0,Ya=qb===Bd||qb===rl?Math.max(P.minimum,0===ee[bb.row+cf]?P.maximum:Math.min(ee[bb.row+cf],P.maximum)):Math.max(P.minimum,isNaN(P.gd)?P.maximum:Math.min(P.gd,P.maximum)),de.height+=Ya,Yh+=P.minimum;for(var $c=1;$c=a.columnCount);$c++)P=a.getColumnDefinition(bb.column+$c),Ya=0,Ya=qb===Bd||qb===ql?Math.max(P.minimum,0===fe[bb.column+$c]?P.maximum:Math.min(fe[bb.column+$c],P.maximum)):Math.max(P.minimum,isNaN(P.gd)?P.maximum:Math.min(P.gd,P.maximum)),de.width+= +Ya,bf+=P.minimum;vb.width+=de.width;vb.height+=de.height;var zf=bb.margin,Zh=zf.right+zf.left,Zn=zf.top+zf.bottom;bb.measure(vb.width,vb.height,bf,Yh);for(var Jg=bb.measuredBounds,Dd=Math.max(Jg.width+Zh,0),he=Math.max(Jg.height+Zn,0),Ie=0,Je=0;Je=a.rowCount);Je++)P=a.getRowDefinition(bb.row+Je),Ie+=P.total||0;if(Ie=ie)&&!(bb.row+df>=a.rowCount);df++){P=a.getRowDefinition(bb.row+ +df);var dj=P.na||0,ej=Ck(bb,P,Ke);F&&"number"!==typeof ej&&v(bb+" spanAllocation does not return a number: "+ej);P.actual=Math.min(P.maximum,dj+ej);P.na!==dj&&(ie-=P.na-dj)}for(;0Ed&&(P.actual=Math.min(P.maximum,Ed+ie),P.na!==Ed&&(ie-=P.na-Ed));if(0===P.index)break;P=a.getRowDefinition(P.index-1)}}for(var Xf=0,$h=0;$h=a.columnCount);$h++)P=a.getColumnDefinition(bb.column+$h),Xf+=P.total||0;if(Xf=Kg)&&!(bb.column+Dk>=a.columnCount);Dk++){P=a.getColumnDefinition(bb.column+Dk);var $n=P.na||0,ao=Cu(bb,P,Bu);F&&"number"!==typeof ao&&v(bb+" spanAllocation does not return a number: "+ao);P.actual=Math.min(P.maximum,$n+ao);P.na!==$n&&(Kg-=P.na-$n)}for(;0Ek&&(P.actual=Math.min(P.maximum,Ek+Kg),P.na!==Ek&&(Kg-=P.na-Ek));if(0===P.index)break;P=a.getColumnDefinition(P.index- +1)}}}}Oa(B);Fb.free(de);Fb.free(vb);void 0!==ee&&Oa(ee);void 0!==fe&&Oa(fe);var Lg=0,Mg=0,Fk=a.desiredSize,Jr=a.maxSize;qb=Fl(a,!0);var fj=Ee=Zd=0,gj=0;f=a.columnCount;for(var Gk=0;Gk=a.rowCount);Q++)Y=a.getRowDefinition(q+Q),r.height+=Y.total;for(Q=1;Q=a.columnCount);Q++)Y=a.getColumnDefinition(y+Q),r.width+=Y.total;var ca=x.na+r.width,T=u.na+r.height; +Q=h;Y=k;var P=ca,xa=T,ka=h,Aa=k,Ua=ca,tb=T;h+ca>c.width&&(Ua=Math.max(c.width-h,0));k+T>c.height&&(tb=Math.max(c.height-k,0));var Xa=G.alignment;if(Xa.Ib()){Xa=a.defaultAlignment;Xa.eb()||(Xa=Kc);var Ya=Xa.x;var Qd=Xa.y;var mc=Xa.offsetX;Xa=Xa.offsetY;var nc=x.alignment,ub=u.alignment;nc.eb()&&(Ya=nc.x,mc=nc.offsetX);ub.eb()&&(Qd=ub.y,Xa=ub.offsetY)}else Ya=Xa.x,Qd=Xa.y,mc=Xa.offsetX,Xa=Xa.offsetY;if(isNaN(Ya)||isNaN(Qd))Qd=Ya=.5,Xa=mc=0;nc=M.width;ub=M.height;var Rd=G.margin,Ag=Rd.left+Rd.right, +Bg=Rd.top+Rd.bottom,$e=Yl(G,u,x,!1);!isNaN(G.desiredSize.width)||$e!==Bd&&$e!==ql||(nc=Math.max(ca-Ag,0));!isNaN(G.desiredSize.height)||$e!==Bd&&$e!==rl||(ub=Math.max(T-Bg,0));ca=G.maxSize;T=G.minSize;nc=Math.min(ca.width,nc);ub=Math.min(ca.height,ub);nc=Math.max(T.width,nc);ub=Math.max(T.height,ub);ca=ub+Bg;Q+=P*Ya-(nc+Ag)*Ya+mc+Rd.left;Y+=xa*Qd-ca*Qd+Xa+Rd.top;G.visible&&(lc(ka,Aa,Ua,tb,Q,Y,M.width,M.height)?G.arrange(Q,Y,nc,ub):G.arrange(Q,Y,nc,ub,new L(ka,Aa,Ua,tb)))}else G.Sl(),G.actualBounds.ka(), +P=G.actualBounds,Q=L.allocAt(P.x,P.y,P.width,P.height),P.x=Y.type===W.TableRow?f:h,P.y=Y.type===W.TableColumn?e:k,P.width=M.width,P.height=M.height,G.actualBounds.freeze(),Gl(G,!1),fc(Q,P)||(M=G.part,null!==M&&(M.Zh(),G.Ap(M))),L.free(Q)}}}Fb.free(r);for(a=0;a=c&&(c=1);var d=a.gridCellSize,e=d.width;d=d.height;var f=a.naturalBounds,g=a.actualBounds,h=f.width,k=f.height,l=Math.ceil(h/e),m=Math.ceil(k/d),n=a.gridOrigin,p=n.x;n=n.y;b.save();b.beginPath();b.rect(0,0,h,k);b.clip();for(var r=[],q=a.$.j,u=q.length,y=0;yB)){x=nk(x.figure);for(var D=0;DB&&z.push(G))}}}}q= +a.$.j;u=q.length;for(y=0;ye*x*c))){B=M.segmentIndex;if(!isFinite(B)||isNaN(B))B=0;0>B&&(B=x-Math.min(-B,x));B=Math.round(B%x);x=M.opacity;D=1;if(1!==x){if(0===x)continue;D=b.globalAlpha;b.globalAlpha=D*x}G=r[y];var Y=!1,Q=M.strokeDashArray;null!==Q&&(Y=!0,b.St(Q,M.strokeDashOffset));if("LineV"===M.figure&&null!==M.stroke&&0b)return a%b===c;if(a%b!==c)return!1;b=d.length;for(var e=0;ef)x.measure(Infinity,Infinity,0,0),z=x.measuredBounds,b.Xc(z),a.l.push(z);else{var B=x.segmentIndex,D=x.segmentFraction,G=x.alignmentFocus;G.Sb()&&(G=Kc);var M=x.segmentOrientation,Y=x.segmentOffset;if(isNaN(B)){var Q=k.ua;z=Ma();Q.mw(D,z);var ca=J.allocAt(z[0],z[1]);ca.add(k.i(0)); +Q.type===Gd?ca.offset(-Q.startX,-Q.startY):(Q=Q.figures.first(),ca.offset(-Q.startX,-Q.startY));Q=z[2];if(M!==ng){var T=k.computeAngle(x,M,Q);x.dc=T}T=ca.x-m.x;var P=ca.y-m.y;J.free(ca);Oa(z)}else if(B<-f||B>=f)P=k.midPoint,Q=k.midAngle,M!==ng&&(T=k.computeAngle(x,M,Q),x.dc=T),T=P.x-m.x,P=P.y-m.y;else{T=0;0<=B?(P=n.M(B),z=Bxa+ +10?0<=B?Q.Va(P):P.Va(Q):xa>ca+10?0<=B?z.Va(T):T.Va(z):0<=B?Q.Va(T):T.Va(Q)}else Q=0<=B?P.Va(z):z.Va(P);M!==ng&&(T=k.computeAngle(x,M,Q),x.dc=T);T=P.x+(z.x-P.x)*D-m.x;P=P.y+(z.y-P.y)*D-m.y}x.measure(Infinity,Infinity,0,0);z=x.measuredBounds;ca=x.naturalBounds;var ka=0;x instanceof Uf&&(ka=x.strokeWidth);xa=ca.width+ka;var Aa=ca.height+ka;h.reset();h.translate(-z.x,-z.y);h.scale(x.scale,x.scale);h.rotate(M===ng?x.angle:Q,xa/2,Aa/2);M!==hn&&M!==jn||h.rotate(90,xa/2,Aa/2);M!==kn&&M!==ln||h.rotate(-90, +xa/2,Aa/2);M===mn&&(45Q||225Q)&&h.rotate(-Q,xa/2,Aa/2);ca=new L(0,0,xa,Aa);q.Fj(ca,G);h.Aa(q);G=-q.x+ka/2*x.scale;x=-q.y+ka/2*x.scale;u.assign(Y);ka=isNaN(Y.x);var Ua=isNaN(Y.y);if(ka||Ua){xa=xa/2+3;Aa=Aa/2+3;var tb=45<=Q&&135>=Q,Xa=225<=Q&&315>=Q;M===ng&&(tb||Xa)?(u.x=Ua?xa:Y.y,u.y=ka?Aa:Y.x,tb?0<=B||isNaN(B)&&.5>D||!ka||(u.y=-Aa):Xa&&((0<=B||isNaN(B)&&.5>D)&&ka&&(u.y=-Aa),Ua&&(u.x=-xa))):(ka&&(u.x=0<=B||isNaN(B)&&.5>D?xa:-xa),Ua&&(u.y=-Aa),u.rotate(Q))}else u.rotate(Q);T+=u.x;P+= +u.y;ca.set(z);ca.h(T+G,P+x,z.width,z.height);a.l.push(ca);b.Xc(ca)}}if(null!==g)for(d=g.labelNodes;d.next();)d.value.measure(Infinity,Infinity);a.Jg=b;a=a.location;a.h(a.x+b.x,a.y+b.y);cc(e,b.width||0,b.height||0);Gb.free(h);J.free(q);J.free(u)}}}}; +fn.prototype.arrange=function(a,b){var c=b.length;if(a instanceof Ve||a instanceof S){var d=null,e=null,f=null;a instanceof S&&(e=d=a);a instanceof Ve&&(f=a,d=f.adornedPart);var g=a instanceof Ve?null:d.path;if(0!==a.l.length){var h=a.l,k=0;if(null!==g&&k=c)y=p.midPoint,n=p.midAngle,l!==ng&&(p=p.computeAngle(g,l,n),g.angle=p),p=y.x,y=y.y; +else{u=0;0<=h?(q=b.j[h],y=hz+10?0<=h?n.Va(q):q.Va(n):z>x+10?0<=h?y.Va(u):u.Va(y):0<=h?n.Va(u):u.Va(n)}else n=0<=h?q.Va(y):y.Va(q);l!==ng&&(p=p.computeAngle(g,l,n),g.angle=p);p=q.x+(y.x-q.x)*k;y=q.y+(y.y-q.y)*k}if(r.br())g.location=new J(p,y);else{r.Sb()&&(r=Kc);q=Gb.alloc();q.reset();q.scale(g.scale,g.scale);q.rotate(g.angle,0, +0);var B=g.naturalBounds;u=L.allocAt(0,0,B.width,B.height);x=J.alloc();x.Fj(u,r);q.Aa(x);r=-x.x;z=-x.y;var D=B.width,G=B.height;B=J.alloc();B.assign(m);var M=isNaN(m.x),Y=isNaN(m.y);if(M||Y){D=D/2+3;G=G/2+3;var Q=45<=n&&135>=n,ca=225<=n&&315>=n;l===ng&&(Q||ca)?(B.x=Y?D:m.y,B.y=M?G:m.x,Q?0<=h||isNaN(h)&&.5>k||!M||(B.y=-G):ca&&((0<=h||isNaN(h)&&.5>k)&&M&&(B.y=-G),Y&&(B.x=-D))):(M&&(B.x=0<=h||isNaN(h)&&.5>k?D:-D),Y&&(B.y=-G),B.rotate(n))}else B.rotate(n);p+=B.x;y+=B.y;q.ex(u);r+=u.x;z+=u.y;h=J.allocAt(p+ +r,y+z);g.move(h);J.free(h);J.free(B);J.free(x);L.free(u);Gb.free(q)}}null!==f?f.Rk(!1):null!==e&&e.Rk(!1)}}; +function gn(a,b,c,d){if(!1!==Ij(d)){var e=d.strokeWidth;0===e&&a instanceof Ve&&a.type===W.Link&&a.adornedObject instanceof Uf&&(e=a.adornedObject.strokeWidth);e*=d.Ga;a instanceof S&&null!==a.ua?(a=a.ua.bounds,Cl(d,a.x-e/2,a.y-e/2,a.width+e,a.height+e)):a instanceof Ve&&null!==a.adornedPart.ua?(a=a.adornedPart.ua.bounds,Cl(d,a.x-e/2,a.y-e/2,a.width+e,a.height+e)):Cl(d,-(e/2),-(e/2),b+e,c+e);Dj(d,!1)}}function nn(){this.va="Base"}ma(nn,hm); +nn.prototype.measure=function(a,b,c,d,e,f,g){var h=a.yb();a.ph=[];var k=h.margin,l=k.right+k.left,m=k.top+k.bottom;h.measure(b,c,f,g);var n=h.measuredBounds,p=new L(-k.left,-k.top,Math.max(n.width+l,0),Math.max(n.height+m,0));a.ph.push(p);e.assign(p);for(var r=h.geometry,q=h.strokeWidth,u=r.flattenedSegments,y=r.flattenedLengths,x=r.flattenedTotalLength,z=u.length,B=0,D=0,G=Ma(),M=0;Mka&&(ka+=360);Q.push(ka)}B=P;D=xa}G.push(Q)}if(null===a.qh){for(var Aa=[],Ua=a.$.j,tb=Ua.length,Xa=0;Xamc))for(var nc=0;ncmc&&Qd.push(Rd)}}}}a.qh=Aa}var Ag=a.qh;var Bg=a.$.j,$e=Bg.length,Xb=0,Ph=0,Cg=x;a.Yj=[];for(var Qh,Rh=0;Rh<$e;Rh++){var qb=Bg[Rh];Qh=[];if(qb.visible&&qb!==h){var aj=Math.abs(qb.interval), +Ak=a.graduatedTickUnit;if(!(2>Ak*aj*x/a.graduatedRange)){var Dg=y[0][0],Cd=0,Cc=0;Ph=x*qb.graduatedStart-1E-4;Cg=x*qb.graduatedEnd+1E-4;var Vf=Ak*aj,Ic=a.graduatedTickBase;if(Ica.graduatedMin+Vf&&(Ic-=Math.floor((Ic-a.graduatedMin)/Vf)*Vf);for(var Sh=Ag[Rh],Wn=Ic,Zd=1;Icx&&(Xb=x),Ph<=Xb&&Xb<=Cg)){for(var id=G[Cd][Cc],Fe=y[Cd][Cc];CdDg&&Ccjd?0Xh;Xh++){switch(Xh){case 0:Qc.h(Vh,Ig);break;case 1:Qc.h(Vh+ae,Ig);break;case 2:Qc.h(Vh,Ig+be);break;case 3:Qc.h(Vh+ae,Ig+be)}Qc.rotate(af+Yb.angle);Qc.offset(ee,fe);0===yf&&0===Xh?ce.h(Qc.x,Qc.y,0,0):ce.af(Qc);Qc.offset(-ee,-fe);Qc.rotate(-af-Yb.angle)}J.free(Qc);null!==vb.ph&&vb.ph.push(ce);kc(cj,ce.x,ce.y,ce.width,ce.height)}else if(Yb instanceof ih){var He=a,Yn=e;null===He.Kh&&(He.Kh=new ih);var tc=He.Kh;on(tc,Yb);var bb=Yb.alignmentFocus;bb.Sb()&&(bb= +Fc);for(var uc=Yb.segmentOrientation,ge=Yb.segmentOffset,bf=new L,Yh=0,cf=0,$c=0,zf=0,Zh=0,Zn=$d.length,Jg=0;Jg$c||225<$c&&315>$c)&&Ke.rotate(-$c,Je/2,ie/2);var Ck=L.allocAt(0,0,Je,ie),df=J.alloc();df.Fj(Ck,bb);Ke.Aa(df);var dj=-df.x,ej=-df.y,Ed=J.alloc();Ed.assign(ge);isNaN(Ed.x)&&(Ed.x=Je/2+3);isNaN(Ed.y)&&(Ed.y=-(ie/2+3));Ed.rotate($c);Yh+=Ed.x+dj;cf+=Ed.y+ej;var Xf=new L(Yh,cf,he.width,he.height),$h=new L(he.x,he.y,he.width,he.height),Kg=new L(Ie.x,Ie.y,Ie.width,Ie.height);Dd.XA=zf;Dd.lineCount=tc.lineCount;Dd.lines= +[tc.Ab,tc.Pi,tc.ye,tc.Me,tc.Wb,tc.qb,tc.we];Dd.actualBounds=Xf;Dd.measuredBounds=$h;Dd.naturalBounds=Kg;0===Jg?bf.assign(Xf):bf.Xc(Xf);J.free(Ed);J.free(df);L.free(Ck);Gb.free(Ke)}null!==He.ph&&He.ph.push(bf);kc(Yn,bf.x,bf.y,bf.width,bf.height)}Dj(Yb,!1)}}}; +nn.prototype.arrange=function(a,b,c){if(null!==a.ph){var d=a.yb(),e=a.Yj;if(null!==e){var f=a.ph,g=0,h=f[g];g++;null!==d&&d.arrange(h.x-c.x,h.y-c.y,h.width,h.height);for(var k=b.length,l=0;l=e&&(e=1);for(var g=f.actualBounds,h=a.$.j,k=a.Yj,l=h.length,m=0;ma.graduatedTickUnit*n.interval*f.geometry.flattenedTotalLength/a.graduatedRange*e)){var q=n.measuredBounds,u=n.strokeWidth*n.scale,y=n.alignmentFocus;y.Sb()&& +(y=Fc);for(var x=0;xf.height)continue}else if(l.position>f.width)continue;var m=l.separatorStrokeWidth;isNaN(m)&&(m=c?a.gh:a.fh);var n=l.separatorStroke;null===n&&(n=c?a.Di:a.eh);if(0!==m&&null!==n){Ai(a,b,n,!1,!1,g,f);n=!1;var p=l.separatorDashArray;null===p&&(p=c?a.Ci:a.Bi);null!==p&&(n=!0,b.St(p,0));b.beginPath();p=l.position+m;c?p>f.height&&(m-= +p-f.height):p>f.width&&(m-=p-f.width);l=l.position+m/2;b.lineWidth=m;m=a.ob;c?(l+=m.top,p=f.width-m.right,b.moveTo(m.left,l),b.lineTo(p,l)):(l+=m.left,p=f.height-m.bottom,b.moveTo(l,m.top),b.lineTo(l,p));b.stroke();n&&b.Qt()}}}} +function tn(a,b,c,d,e){for(var f=d.length,g=a.actualBounds,h=a.naturalBounds,k=0;km)){var n=l.Cc(),p=l.separatorStrokeWidth;isNaN(p)&&(p=c?a.gh:a.fh);var r=l.separatorStroke;null===r&&(r=c?a.Di:a.eh);null===r&&(p=0);n-=p;p=l.position+p;n+=l.actual;p+n>m&&(n=m-p);0>=n||(m=a.ob,Ai(a,b,l.background,!0,!1,h,g),c?b.fillRect(m.left,p+m.top,g.width-(m.left+m.right),n):b.fillRect(p+ +m.left,m.top,n,g.height-(m.top+m.bottom)))}}}}function nk(a){return"LineV"===a||"BarV"===a} +t.Lk=function(a,b,c,d,e){var f=this.pe(),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),r=h*(g.m12*g.dx-g.m11*g.dy);if(null!==this.areaBackground)return g=this.actualBounds,K.Of(g.left,g.top,g.right,g.bottom,a,b,c,d,e);if(null!==this.background)return f=a*k+b*m+p,h=a*l+b*n+r,a=c*k+d*m+p,k=c*l+d*n+r,e.h(0,0),c=this.naturalBounds,f=K.Of(0,0,c.width,c.height,f,h,a,k,e),e.transform(g),f;f||(k=1,m=l=0,n=1,r=p=0);h=a*k+b*m+p;a=a*l+b* +n+r;k=c*k+d*m+p;c=c*l+d*n+r;e.h(k,c);d=(k-h)*(k-h)+(c-a)*(c-a);l=!1;n=this.$.j;r=n.length;m=J.alloc();p=null;b=Infinity;var q=null,u=this.isClipping&&this.sa===W.Spot;u&&(q=J.alloc(),p=this.yb(),(l=p.Lk(h,a,k,c,q))&&(b=(h-q.x)*(h-q.x)+(a-q.y)*(a-q.y)));for(var y=0;yd&&e.set(q),J.free(q));J.free(m);f&&e.transform(g);return l}; +t.u=function(a){if(!Ij(this)){O.prototype.u.call(this,a);a=null;if(this.sa===W.Auto||this.sa===W.Link)a=this.yb();for(var b=this.$.j,c=b.length,d=0;dc||f>d)this.u(),this.measure(b>c?c:b,f>d?d:f,0,0);break;case Bd:this.u(!0);this.measure(c+h,d+g,0,0);break;case ql:this.u(!0);this.measure(c+h,f+g,0,0);break;case rl:this.u(!0),this.measure(b+h,d+g,0,0)}}this.sa.arrange(this,e,this.Jg)}}; +t.Vh=function(a){var b=this.naturalBounds,c=Rm(this);if(lc(0,0,b.width,b.height,a.x,a.y)){b=this.$.j;for(var d=b.length,e=J.allocAt(0,0);d--;){var f=b[d];if(f.visible||f===c)if(Hb(e.set(a),f.transform),f.ca(e))return J.free(e),!0}J.free(e);return null===this.rb&&null===this.kc?!1:!0}return!1};t.Tt=function(a){if(this.pl===a)return this;for(var b=this.$.j,c=b.length,d=0;dp.width||n.y>p.height||0>n.x+n.width||0>n.y+n.height)){n=m;m=m instanceof W?m:null;p=Gb.alloc();p.set(g); +if(null!==m?m.Lf(a,b,c,d,e,p):El(n,a,d,p))null!==b&&(n=b(n)),null===n||null!==c&&!c(n)||e.add(n);Gb.free(p)}}}void 0===f&&Gb.free(g);return d}void 0===f&&Gb.free(g);return!1};function Bn(a,b,c,d){for(var e=a.$.j,f=e.length;f--;){var g=e[f];if(g.visible){var h=g.actualBounds,k=a.naturalBounds;h.x>k.width||h.y>k.height||0>h.x+h.width||0>h.y+h.height||(g instanceof W&&Bn(g,b,c,d),null!==b&&(g=b(g)),null===g||null!==c&&!c(g)||d.add(g))}}} +t.Qg=function(a,b,c,d,e,f){if(!1===this.pickable)return!1;void 0===c&&(c=null);void 0===d&&(d=null);var g=this.naturalBounds,h=this.pe(),k=h?a:Hb(J.allocAt(a.x,a.y),this.transform),l=h?b:Hb(J.allocAt(b.x,b.y),this.transform),m=k.Ve(l),n=0y.width||u.y>y.height||0>u.x+u.width||0>u.y+u.height))if(q.pe()?(u=q.transform,Hb(k.set(a),u),Hb(l.set(b),u)):(k.set(a),l.set(b)),u=q,q=q instanceof W?q:null,null!==q?q.Qg(k,l,c,d,e,f):u.Hy(k,l,e))null!==c&&(u=c(u)),null===u||null!==d&&!d(u)||f.add(u)}}J.free(k);J.free(l)}return e?n:g}return!1}; +function Wm(a){var b=null;a instanceof Uf&&(b=a.spot1,b===fd&&(b=null),a=a.geometry,null!==a&&null===b&&(b=a.spot1));null===b&&(b=Ec);return b}function Xm(a){var b=null;a instanceof Uf&&(b=a.spot2,b===fd&&(b=null),a=a.geometry,null!==a&&null===b&&(b=a.spot2));null===b&&(b=Oc);return b}t.add=function(a){w(a,O,W,"add:element");this.Bb(this.$.count,a)};t.M=function(a){return this.$.M(a)}; +t.Bb=function(a,b){b instanceof U&&v("Cannot add a Part to a Panel: "+b+"; use a Panel instead");if(this===b||this.Sg(b))this===b&&v("Cannot make a Panel contain itself: "+this.toString()),v("Cannot make a Panel indirectly contain itself: "+this.toString()+" already contains "+b.toString());var c=b.panel;null!==c&&c!==this&&v("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.sa!==W.Grid||b instanceof Uf||v("Can only add Shapes to a Grid Panel, not: "+b);this.sa!==W.Graduated||b instanceof Uf||b instanceof ih||v("Can only add Shapes or TextBlocks to a Graduated Panel, not: "+b);b.Ej(this);b.mk=null;if(null!==this.itemArray){var d=b.data;null!==d&&"object"===typeof d&&(null===this.ee&&(this.ee=new Bb),this.ee.add(d,b))}var e=this.$;d=-1;if(c===this){for(var f=-1,g=this.$.j,h=g.length,k=0;k=e.count&&a>=e.count)return; +e.jb(f);d=f}else v("element "+b.toString()+" has panel "+c.toString()+" but is not contained by it.")}if(0>a||a>e.count)a=e.count;e.Bb(a,b);if(0===a||b.isPanelMain)this.ej=null;Ij(this)||this.u();b.u(!1);null!==b.portId?this.Yh=!0:b instanceof W&&!0===b.Yh&&(this.Yh=!0);this.qh=null;c=this.part;null!==c&&(c.ik=null,c.wh=NaN,this.Yh&&c instanceof V&&(c.Yh=!0),c.Yh&&c instanceof V&&(c.zc=null),e=this.diagram,null!==e&&e.undoManager.isUndoingRedoing||(-1!==d&&c.ab(Me,"elements",this,b,null,d,null),c.ab(Le, +"elements",this,null,b,null,a),this.Tg()||Cn(this,b,!1)))};function Dn(a,b){a.I=b?a.I|16777216:a.I&-16777217}t.remove=function(a){w(a,O,W,"remove:element");for(var b=this.$.j,c=b.length,d=-1,e=0;ea&&za(a,">= 0",W,"getRowDefinition:idx");a=Math.round(a);var b=this.vb;if(void 0===b)return null;if(void 0===b[a]){var c=new jk;c.Ej(this);c.isRow=!0;c.index=a;b[a]=c;this.ab(Le,"rowdefs",this,null,c,null,a)}return b[a]}; +W.prototype.qB=function(a){F&&C(a,W,"removeRowDefinition:idx");0>a&&za(a,">= 0",W,"removeRowDefinition:idx");a=Math.round(a);var b=this.vb;if(void 0!==b){var c=b[a];if(c){b[a]=void 0;for(var d=b.length-1;0<=d&&void 0===b[d--];)b.length--;this.ab(Me,"rowdefs",this,c,null,a,null);this.u()}}};function kk(a,b,c){var d=a.vb;if(d&&!(0>b)){d[b]=c instanceof jk?c:void 0;if(!c)for(b=d.length-1;0<=b&&void 0===d[b--];)d.length--;a.u()}} +W.prototype.getColumnDefinition=function(a){F&&C(a,W,"getColumnDefinition:idx");0>a&&za(a,">= 0",W,"getColumnDefinition:idx");a=Math.round(a);var b=this.sb;if(void 0===b)return null;if(void 0===b[a]){var c=new jk;c.Ej(this);c.isRow=!1;c.index=a;b[a]=c;this.ab(Le,"coldefs",this,null,c,null,a)}return b[a]};t=W.prototype; +t.lB=function(a){F&&C(a,W,"removeColumnDefinition:idx");0>a&&za(a,">= 0",W,"removeColumnDefinition:idx");a=Math.round(a);var b=this.sb;if(void 0!==b){var c=b[a];if(c){b[a]=void 0;for(var d=b.length-1;0<=d&&void 0===b[d--];)b.length--;this.ab(Me,"coldefs",this,c,null,a,null);this.u()}}};function lk(a,b,c){var d=a.sb;if(d&&!(0>b)){d[b]=c instanceof jk?c:void 0;if(!c)for(b=d.length-1;0<=b&&void 0===d[b--];)d.length--;a.u()}} +t.uA=function(a){if(0>a||this.type!==W.Table)return-1;for(var b=0,c=this.vb,d=c.length,e=this.hj;ea||this.type!==W.Table)return-1;for(var b=0,c=this.sb,d=c.length,e=this.Ri;e=c.elements.count&&!(c instanceof U)){var d=!1;if(1===c.elements.count&&(d=null!==c.itemArray,!d))for(h=b.iterator;h.next();)if("itemArray"===h.value.targetProperty){d=!0;break}d||(Ea("Auto, Spot, or Graduated Panel should not have zero or one elements: "+c.toString()+" in "+a.toString()),Fn=!0)}}))} +t.Xz=function(a){void 0===a&&(a=!1);var b=this.copy();wn(b,function(a){a instanceof W&&(a.xi=null,a.tb=null);var b=a.lb;null!==b&&(a.lb=null,b.each(function(b){a.bind(b.copy())}));b=a.Yg;null!==b&&(a.Yg=null,b.each(function(b){a.gx(b.value.copy())}))});a&&yg(b);return b}; +t.Ia=function(a){var b=this.xi;if(null!==b)for(void 0===a&&(a=""),b=b.iterator;b.next();){var c=b.value,d=c.sourceProperty;if(""===a||""===d||d===a)if(d=c.targetProperty,null!==c.converter||""!==d){d=this.data;var e=c.sourceName;if(null!==e)if(""===e)d=this;else if("/"===e)d=this;else if("."===e)d=this;else if(".."===e)d=this;else{if(d=this.ib(e),null===d){F&&Ea("Binding error: missing GraphObject named "+e+" in "+this.toString());continue}}else if(c.isToModel)if(d=this.diagram,null!==d)d=d.model.modelData; +else continue;var f=this,g=c.Ij;if(-1!==g){if(f=this.Tt(g),null===f)continue}else null!==c.vd&&(f=c.vd);"/"===e?d=f.part:"."===e?d=f:".."===e&&(d=f.panel);e=c.uq;if(0!==e){if(!(f instanceof W))continue;1===e?f=f.getColumnDefinition(c.Bm):2===e&&(f=f.getRowDefinition(c.Bm))}void 0!==f&&c.jx(f,d)}}}; +function Gn(a,b){a=a.$.j;for(var c=a.length,d=b.length,e=0,f=null;ea;)this.Rc(this.$.length-1,!1);a=this.itemArray;if(null!==a)for(var b=a.length,c=0;cc)){var d=In(a,b),e=a.itemTemplateMap,f=null;null!==e&&(f=e.J(d));null===f&&(null!==e&&(f=e.J("")),null===f&&(Jn||(Jn=!0,Ea('No item template Panel found for category "'+d+'" on '+a),Ea(" Using default item template."),d=new W,e=new ih,e.bind(new Ui("text","",Qa)),d.add(e),Kn=d),f=Kn));d=f;null!==d&&(yg(d),d=d.copy(),0!==(d.I&16777216)&&(e=a.tj(),null!==e&&Dn(e,!0)),"object"===typeof b&&(null===a.ee&&(a.ee=new Bb),a.ee.add(b,d)),e=c+zn(a),a.Bb(e,d), +d.tb=b,Ln(a,e,c),d.tb=null,d.data=b)}}function Ln(a,b,c){for(a=a.$;ba&&za(a,">= 0",W,"padding"),a=new hc(a)):(w(a,hc,W,"padding"),0>a.left&&za(a.left,">= 0",W,"padding:value.left"),0>a.right&&za(a.right,">= 0",W,"padding:value.right"),0>a.top&&za(a.top,">= 0",W,"padding:value.top"),0>a.bottom&&za(a.bottom,">= 0",W,"padding:value.bottom"));var b=this.ob;b.A(a)||(this.ob=a=a.K(),this.u(),this.g("padding",b,a))}},defaultAlignment:{configurable:!0,get:function(){return this.Zn},set:function(a){var b=this.Zn;b.A(a)||(F&&w(a,N,W,"defaultAlignment"), +this.Zn=a=a.K(),this.u(),this.g("defaultAlignment",b,a))}},defaultStretch:{configurable:!0,get:function(){return this.dg},set:function(a){var b=this.dg;b!==a&&(gb(a,O,W,"defaultStretch"),this.dg=a,this.u(),this.g("defaultStretch",b,a))}},defaultSeparatorPadding:{configurable:!0,get:function(){return void 0===this.Rj?zc:this.Rj},set:function(a){if(void 0!==this.Rj){"number"===typeof a?a=new hc(a):F&&w(a,hc,W,"defaultSeparatorPadding");var b=this.Rj;b.A(a)||(this.Rj=a=a.K(), +this.u(),this.g("defaultSeparatorPadding",b,a))}}},defaultRowSeparatorStroke:{configurable:!0,get:function(){return void 0===this.Di?null:this.Di},set:function(a){var b=this.Di;b!==a&&(null===a||"string"===typeof a||a instanceof Ol)&&(a instanceof Ol&&a.freeze(),this.Di=a,this.P(),this.g("defaultRowSeparatorStroke",b,a))}},defaultRowSeparatorStrokeWidth:{configurable:!0,get:function(){return void 0===this.gh?1:this.gh},set:function(a){if(void 0!==this.gh){var b=this.gh; +b!==a&&isFinite(a)&&0<=a&&(this.gh=a,this.u(),this.g("defaultRowSeparatorStrokeWidth",b,a))}}},defaultRowSeparatorDashArray:{configurable:!0,get:function(){return void 0===this.Ci?null:this.Ci},set:function(a){if(void 0!==this.Ci){var b=this.Ci;if(b!==a){null===a||Array.isArray(a)||ya(a,"Array",W,"defaultRowSeparatorDashArray:value");if(null!==a){for(var c=a.length,d=0,e=0;ea)&&v("Panel.topIndex must be greater than zero and a real number, not: "+a),this.hj=a,this.u(),this.g("topIndex",b,a))}}},leftIndex:{configurable:!0,get:function(){return void 0===this.Ri?0:this.Ri},set:function(a){if(void 0!==this.Ri){var b=this.Ri;b!==a&&((!isFinite(a)||0>a)&&v("Panel.leftIndex must be greater than zero and a real number, not: "+ +a),this.Ri=a,this.u(),this.g("leftIndex",b,a))}}},data:{configurable:!0,get:function(){return this.tb},set:function(a){var b=this.tb;if(b!==a){var c=this instanceof U&&!(this instanceof Ve);c&&A(a,"object",W,"data");yg(this);this.tb=a;var d=this.diagram;null!==d&&(c?(c=d.partManager,this instanceof S?(null!==b&&c.ef.remove(b),null!==a&&c.ef.add(a,this)):this instanceof U&&(null!==b&&c.ff.remove(b),null!==a&&c.ff.add(a,this))):(c=this.panel,null!==c&&null!==c.ee&&(null!==b&&c.ee.remove(b), +null!==a&&c.ee.add(a,this))));this.g("data",b,a);null!==d&&d.undoManager.isUndoingRedoing||null!==a&&this.Ia()}}},itemIndex:{configurable:!0,get:function(){return this.Qo},set:function(a){var b=this.Qo;b!==a&&(this.Qo=a,this.g("itemIndex",b,a))}},itemArray:{configurable:!0,get:function(){return this.Ni},set:function(a){var b=this.Ni;if(b!==a||null!==a&&Gn(this,a)){F&&null!==a&&!Ha(a)&&v("Panel.itemArray must be an Array-like object or null, not: "+a);var c=this.diagram; +b!==a&&(null!==c&&null!==b&&ak(c.partManager,this,c),this.Ni=a,null!==c&&null!==a&&Xj(c.partManager,this));this.g("itemArray",b,a);null!==c&&c.undoManager.isUndoingRedoing||this.ru()}}},itemTemplate:{configurable:!0,get:function(){return null===this.De?null:this.De.J("")},set:function(a){if(null===this.De){if(null===a)return;this.De=new Bb}var b=this.De.J("");b!==a&&(w(a,W,W,"itemTemplate"),(a instanceof U||a.isPanelMain)&&v("Panel.itemTemplate must not be a Part or be Panel.isPanelMain: "+ +a),this.De.add("",a),this.g("itemTemplate",b,a),a=this.diagram,null!==a&&a.undoManager.isUndoingRedoing||this.ru())}},itemTemplateMap:{configurable:!0,get:function(){return this.De},set:function(a){var b=this.De;if(b!==a){w(a,Bb,W,"itemTemplateMap");for(var c=a.iterator;c.next();){var d=c.value;F&&(d instanceof U||d.isPanelMain)&&v("Template in Panel.itemTemplateMap must not be a Part or be Panel.isPanelMain: "+d)}this.De=a;this.g("itemTemplateMap",b,a);a=this.diagram;null!==a&&a.undoManager.isUndoingRedoing|| +this.ru()}}},itemCategoryProperty:{configurable:!0,get:function(){return this.Wl},set:function(a){var b=this.Wl;b!==a&&("string"!==typeof a&&"function"!==typeof a&&ya(a,"string or function",W,"itemCategoryProperty"),this.Wl=a,this.g("itemCategoryProperty",b,a))}},isAtomic:{configurable:!0,get:function(){return 0!==(this.I&1048576)},set:function(a){var b=0!==(this.I&1048576);b!==a&&(A(a,"boolean",W,"isAtomic"),this.I^=1048576,this.g("isAtomic",b,a))}},isClipping:{configurable:!0, +enumerable:!0,get:function(){return 0!==(this.I&2097152)},set:function(a){var b=0!==(this.I&2097152);b!==a&&(A(a,"boolean",W,"isClipping"),!a||this.type===W.Spot||this instanceof If||Ea("Warning: Panel.isClipping set on non-Spot Panel: "+this.toString()),this.I^=2097152,this instanceof If&&(this.gb=null),this.u(),this.g("isClipping",b,a))}},isOpposite:{configurable:!0,get:function(){return 0!==(this.I&33554432)},set:function(a){var b=0!==(this.I&33554432);b!==a&&(A(a,"boolean",W,"isOpposite"), +this.I^=33554432,this.u(),this.g("isOpposite",b,a))}},isEnabled:{configurable:!0,get:function(){return 0!==(this.I&4194304)},set:function(a){var b=0!==(this.I&4194304);if(b!==a){A(a,"boolean",W,"isEnabled");var c=null===this.panel||this.panel.Tg();this.I^=4194304;this.g("isEnabled",b,a);b=this.diagram;null!==b&&b.undoManager.isUndoingRedoing||c&&Cn(this,this,a)}}},alignmentFocusName:{configurable:!0,get:function(){return this.Xg},set:function(a){var b=this.Xg;b!==a&&(F&& +A(a,"string",W,"alignmentFocusName"),this.Xg=a,this.u(),this.g("alignmentFocusName",b,a))}}}); +na.Object.defineProperties(W,{Position:{configurable:!0,get:function(){return gm.J("Position")}},Horizontal:{configurable:!0,get:function(){return gm.J("Horizontal")}},Vertical:{configurable:!0,get:function(){return gm.J("Vertical")}},Spot:{configurable:!0,get:function(){return gm.J("Spot")}},Auto:{configurable:!0,get:function(){return gm.J("Auto")}},Table:{configurable:!0,get:function(){return gm.J("Table")}},Viewbox:{configurable:!0, +enumerable:!0,get:function(){return gm.J("Viewbox")}},TableRow:{configurable:!0,get:function(){return gm.J("TableRow")}},TableColumn:{configurable:!0,get:function(){return gm.J("TableColumn")}},Link:{configurable:!0,get:function(){return gm.J("Link")}},Grid:{configurable:!0,get:function(){return gm.J("Grid")}},Graduated:{configurable:!0,get:function(){return gm.J("Graduated")}}});W.prototype.findItemPanelForData=W.prototype.Gy; +W.prototype.rebuildItemElements=W.prototype.ru;W.prototype.updateTargetBindings=W.prototype.Ia;W.prototype.copyTemplate=W.prototype.Xz;W.prototype.graduatedValueForPoint=W.prototype.LA;W.prototype.graduatedPointForValue=W.prototype.KA;W.prototype.findColumnForLocalX=W.prototype.mA;W.prototype.findRowForLocalY=W.prototype.uA;W.prototype.removeColumnDefinition=W.prototype.lB;W.prototype.removeRowDefinition=W.prototype.qB;W.prototype.removeAt=W.prototype.jb;W.prototype.remove=W.prototype.remove; +W.prototype.insertAt=W.prototype.Bb;W.prototype.elt=W.prototype.M;W.prototype.add=W.prototype.add;W.prototype.findObject=W.prototype.ib;W.prototype.findInVisualTree=W.prototype.Mm;W.prototype.walkVisualTreeFrom=W.prototype.fl;W.prototype.findMainElement=W.prototype.yb;var Fn=!1,Jn=!1,Kn=null,gm=new Bb;W.className="Panel";W.definePanelLayout=Nn;Nn("Position",new Qm);Nn("Vertical",new Tm);Nn("Auto",new Vm);Nn("Link",new fn); +function jk(){eb(this);this.Ag=null;this.As=!0;this.Xa=0;this.gd=NaN;this.zh=0;this.xh=Infinity;this.Db=fd;this.ra=this.hc=this.na=0;this.lb=null;this.lq=On;this.Pe=pl;this.hq=this.Eg=null;this.iq=NaN;this.rb=this.sk=null;this.Vn=!1} +jk.prototype.copy=function(){var a=new jk;a.As=this.As;a.Xa=this.Xa;a.gd=this.gd;a.zh=this.zh;a.xh=this.xh;a.Db=this.Db;a.na=this.na;a.hc=this.hc;a.ra=this.ra;a.Pe=this.Pe;a.lq=this.lq;null===this.Eg?a.Eg=null:a.Eg=this.Eg.K();a.hq=this.hq;a.iq=this.iq;a.sk=null;null!==this.sk&&(a.separatorDashArray=Ja(this.separatorDashArray));a.rb=this.rb;a.Vn=this.Vn;a.lb=this.lb;return a};t=jk.prototype; +t.vy=function(a){w(a,jk,jk,"copyFrom:pd");a.isRow?this.height=a.height:this.width=a.width;this.minimum=a.minimum;this.maximum=a.maximum;this.alignment=a.alignment;this.stretch=a.stretch;this.sizing=a.sizing;this.Eg=null===a.separatorPadding?null:a.separatorPadding.K();this.separatorStroke=a.separatorStroke;this.separatorStrokeWidth=a.separatorStrokeWidth;this.sk=null;a.separatorDashArray&&(this.sk=Ja(a.separatorDashArray));this.background=a.background;this.coversSeparators=a.coversSeparators;this.lb= +a.lb};t.pb=function(a){a.classType===jk?this.sizing=a:Da(this,a)};t.toString=function(){return"RowColumnDefinition "+(this.isRow?"(Row ":"(Column ")+this.index+") #"+ob(this)};t.Ej=function(a){this.Ag=a}; +t.Wv=function(){var a=0,b=0,c=this.Ag,d=this.isRow;if(null!==c&&c.type===W.Table)for(var e=d?c.vb.length:c.sb.length,f=0;fa&&za(a,">= 0",jk,"height"),this.gd=a,this.actual=this.na,null!== +this.panel&&this.panel.u(),this.Gb("height",b,a))}},width:{configurable:!0,get:function(){return this.gd},set:function(a){var b=this.gd;b!==a&&(F&&A(a,"number",jk,"width"),0>a&&za(a,">= 0",jk,"width"),this.gd=a,this.actual=this.na,null!==this.panel&&this.panel.u(),this.Gb("width",b,a))}},minimum:{configurable:!0,get:function(){return this.zh},set:function(a){var b=this.zh;b!==a&&(F&&A(a,"number",jk,"minimum"),(0>a||!isFinite(a))&&za(a,">= 0",jk,"minimum"),this.zh=a,this.actual= +this.na,null!==this.panel&&this.panel.u(),this.Gb("minimum",b,a))}},maximum:{configurable:!0,get:function(){return this.xh},set:function(a){var b=this.xh;b!==a&&(F&&A(a,"number",jk,"maximum"),0>a&&za(a,">= 0",jk,"maximum"),this.xh=a,this.actual=this.na,null!==this.panel&&this.panel.u(),this.Gb("maximum",b,a))}},alignment:{configurable:!0,get:function(){return this.Db},set:function(a){var b=this.Db;b.A(a)||(F&&w(a,N,jk,"alignment"),this.Db=a.K(),null!==this.panel&&this.panel.u(), +this.Gb("alignment",b,a))}},stretch:{configurable:!0,get:function(){return this.Pe},set:function(a){var b=this.Pe;b!==a&&(F&&gb(a,O,jk,"stretch"),this.Pe=a,null!==this.panel&&this.panel.u(),this.Gb("stretch",b,a))}},separatorPadding:{configurable:!0,get:function(){return this.Eg},set:function(a){"number"===typeof a?a=new hc(a):null!==a&&F&&w(a,hc,jk,"separatorPadding");var b=this.Eg;null!==a&&null!==b&&b.A(a)||(null!==a&&(a=a.K()),this.Eg=a,null!==this.panel&&this.panel.u(), +this.Gb("separatorPadding",b,a))}},separatorStroke:{configurable:!0,get:function(){return this.hq},set:function(a){var b=this.hq;b!==a&&(null!==a&&km(a,"RowColumnDefinition.separatorStroke"),a instanceof Ol&&a.freeze(),this.hq=a,null!==this.panel&&this.panel.u(),this.Gb("separatorStroke",b,a))}},separatorStrokeWidth:{configurable:!0,get:function(){return this.iq},set:function(a){var b=this.iq;b!==a&&(this.iq=a,null!==this.panel&&this.panel.u(),this.Gb("separatorStrokeWidth", +b,a))}},separatorDashArray:{configurable:!0,get:function(){return this.sk},set:function(a){var b=this.sk;if(b!==a){null===a||Array.isArray(a)||ya(a,"Array",jk,"separatorDashArray:value");if(null!==a){for(var c=a.length,d=0,e=0;ee)){var f=d.measuredBounds,g=Math.max(1,f.width);f=f.height;for(var h=c[0],k=c[1],l,m,n,p,r,q,u=0,y=Ma(),x=2;xn&&(n=1);e=c=n;l=g/2;m=0===l?!1:!0;x=0;q=y[x];n=q[0];r=q[1];p=q[2];q=q[3];for(var z=0;.1<=u;){0===z&&(m?(e=c,e-=l,u-=l,m=!1):e=c,0===e&&(e=1)); +if(e>u){Oa(y);return}e>q?(z=e-q,e=q):z=0;var B=Math.sqrt(e*e/(1+p*p));0>n&&(B=-B);h+=B;k+=p*B;a.translate(h,k);a.rotate(r);a.translate(-(g/2),-(f/2));0===z&&d.pj(a,b);a.translate(g/2,f/2);a.rotate(-r);a.translate(-h,-k);u-=e;q-=e;if(0!==z){x++;if(x===y.length){Oa(y);return}q=y[x];n=q[0];r=q[1];p=q[2];q=q[3];e=z}}Oa(y)}} +t.pj=function(a,b){var c=this.Nc,d=this.Fl;if(null!==c||null!==d){var e=this.actualBounds,f=this.naturalBounds;null!==d&&Ai(this,a,d,!0,!1,f,e);var g=this.part,h=this.Hh;null===c||0!==h||null===g||!this.isPanelMain&&g.yb()!==this||(h=g.type===W.Link&&g instanceof Ve&&"Selection"===g.category&&g.adornedObject instanceof Uf&&g.adornedPart.yb()===g.adornedObject?g.adornedObject.strokeWidth:0);0===h&&(c=null);null!==c&&0!==h&&(Ai(this,a,c,!1,!1,f,e),a.lineWidth=h,a.lineJoin=this.ym,a.lineCap=this.xm, +a.miterLimit=this.tk);e=!1;g&&b.Xe("drawShadows")&&(e=g.isShadowed);g=!0;null===c||null!==d&&"transparent"!==d||(g=!1);f=!1;h=this.strokeDashArray;null!==h&&(f=!0,a.St(h,this.Gh));var k=this.ua;if(null!==k){if(k.type===Gd)a.beginPath(),a.moveTo(k.startX,k.startY),a.lineTo(k.endX,k.endY),null!==c&&a.Hj();else if(k.type===Kd){var l=k.startX;h=k.startY;var m=k.endX,n=k.endY;k=Math.min(l,m);var p=Math.min(h,n);l=Math.abs(m-l);h=Math.abs(n-h);a.beginPath();a.rect(k,p,l,h);null!==d&&a.We(d);if(null!==c){g&& +e&&Nl(a);if(0===l||0===h)a.beginPath(),a.rect(k,p,Math.max(l,.1),Math.max(h,.1));a.Hj();g&&e&&Ml(a)}}else if(k.type===Ld)l=k.startX,h=k.startY,m=k.endX,n=k.endY,k=Math.abs(m-l)/2,p=Math.abs(n-h)/2,l=Math.min(l,m)+k,h=Math.min(h,n)+p,a.beginPath(),a.moveTo(l,h-p),a.bezierCurveTo(l+K.Wg*k,h-p,l+k,h-K.Wg*p,l+k,h),a.bezierCurveTo(l+k,h+K.Wg*p,l+K.Wg*k,h+p,l,h+p),a.bezierCurveTo(l-K.Wg*k,h+p,l-k,h+K.Wg*p,l-k,h),a.bezierCurveTo(l-k,h-K.Wg*p,l-K.Wg*k,h-p,l,h-p),a.closePath(),null!==d&&a.We(d),null!==c&& +(g&&e?(Nl(a),a.Hj(),Ml(a)):a.Hj());else if(k.type===Ad)for(h=k.figures,k=h.length,p=0;pu.sweepAngle,null!==r?r.endX:l.startX,null!==r?r.endY:l.startY)}else if(r=pe(u,l),y=r.length,0===y)a.lineTo(u.centerX,u.centerY);else for(var x=0;x(c.startX-c.endX)*(a.x-c.endX)+(c.startY-c.endY)*(a.y-c.endY)||0>d)return!1;L.free(f);return K.Tb(c.startX,c.startY,c.endX,c.endY,e,a.x,a.y)}if(c.type=== +Kd){b=c.startX;var g=c.startY,h=c.endX;c=c.endY;f.x=Math.min(b,h);f.y=Math.min(g,c);f.width=Math.abs(h-b);f.height=Math.abs(c-g);if(null===this.fill){f.Pc(-d,-d);if(f.ca(a))return L.free(f),!1;f.Pc(d,d)}null!==this.stroke&&f.Pc(e,e);a=f.ca(a);L.free(f);return a}if(c.type===Ld){g=c.startX;e=c.startY;h=c.endX;var k=c.endY;c=Math.min(g,h);b=Math.min(e,k);g=Math.abs(h-g)/2;e=Math.abs(k-e)/2;c=a.x-(c+g);b=a.y-(b+e);if(null===this.fill){g-=d;e-=d;if(0>=g||0>=e||1>=c*c/(g*g)+b*b/(e*e))return L.free(f),!1; +g+=d;e+=d}null!==this.stroke&&(g+=d,e+=d);L.free(f);return 0>=g||0>=e?!1:1>=c*c/(g*g)+b*b/(e*e)}if(c.type===Ad)return L.free(f),null===this.fill?te(c,a.x,a.y,e):re(c,a,e,1=this.strokeWidth)m=K.Ze(l.startX,l.startY,l.endX,l.endY,f,g,h,k,e);else{l.startX===l.endX?(d=n,m=0):(b=(l.endY-l.startY)/(l.endX-l.startX),m=n/Math.sqrt(1+b*b), +d=m*b);b=Ma();a=new J;K.Ze(l.startX+d,l.startY+m,l.endX+d,l.endY+m,f,g,h,k,a)&&b.push(a);a=new J;K.Ze(l.startX-d,l.startY-m,l.endX-d,l.endY-m,f,g,h,k,a)&&b.push(a);a=new J;K.Ze(l.startX+d,l.startY+m,l.startX-d,l.startY-m,f,g,h,k,a)&&b.push(a);a=new J;K.Ze(l.endX+d,l.endY+m,l.endX-d,l.endY-m,f,g,h,k,a)&&b.push(a);h=b.length;if(0===h)return Oa(b),!1;m=!0;k=Infinity;for(d=0;dMath.abs(c)){k=g-m-c*(f-d);if(0>a*a*c*c+l*l-k*k){e.x=NaN;e.y=NaN;m=!1;break a}n=Math.sqrt(a*a*c*c+l*l-k*k);h=(-(a*a*c*k)+a*l*n)/(l*l+a*a*c*c)+d;a=(-(a*a*c*k)-a*l*n)/(l*l+a*a*c*c)+d;l=c*(h-d)+k+m;k=c* +(a-d)+k+m;Math.abs((f-h)*(f-h))+Math.abs((g-l)*(g-l))h){e.x=NaN;e.y=NaN;m=!1;break a}k=Math.sqrt(h);h=m+k;k=m-k;Math.abs(h-g)Math.abs(q)?(u*=.5/q,q=.5):0!==u&&.5>Math.abs(u)&&(q*=.5/u,u=.5),x-=q,z-= +u;r.contains(x,z);)x-=q,z-=u;e.x=h;e.y=k;for(u=0;uc?a-c:c-a)<(b>d?b-d:d-b)?(a=ba||K.da(k.y,a))&&(k.yb||K.da(k.x,b))&&(k.x=a&&d<=b;a=d&&c<=a} +t.Hy=function(a,b,c){function d(a,b){for(var c=a.length,d=0;de)return!0;return!1}if(c&&null!==this.fill&&this.Vh(a,!0))return!0;var e=a.Ve(b),f=e;1.5=e||Jb(b,f,0,-n)>=e|| +Jb(b,f,0,n)>=e||Jb(b,f,m,0)>=e?!1:!0}else if(b.type===Ad){l=b.bounds;f=l.x;h=l.y;k=l.x+l.width;l=l.y+l.height;if(a.x>k&&a.xl&&a.ye&&Ib(a.x,a.y,f,h,k,h)>e&&Ib(a.x,a.y,k,l,f,l)>e&&Ib(a.x,a.y,k,l,k,h)>e)return!1;f=Math.sqrt(e);if(c){if(null===this.fill?te(b,a.x,a.y,f):re(b,a,f,!0,!1))return!0}else{c=b.figures;for(b=0;be)return!1;h=f.segments.j;k=h.length;for(l=0;le)return!1;break;case le:var p=Ma();K.Se(g,m,n.point1X,n.point1Y,n.point2X,n.point2Y,n.endX,n.endY,.8,p);g=d(p,a);Oa(p);if(g)return!1;g=n.endX;m=n.endY;if(a.wd(g,m)>e)return!1;break;case me:p=Ma();K.ir(g,m,n.point1X,n.point1Y,n.endX,n.endY,.8,p);g=d(p,a);Oa(p);if(g)return!1;g=n.endX;m=n.endY;if(a.wd(g,m)>e)return!1;break;case ne:case oe:p=n.type===ne?pe(n,f):qe(n,f,g,m);var r=p.length;if(0===r){g=n.type===ne?n.centerX:n.endX;m=n.type===ne?n.centerY:n.endY;if(a.wd(g,m)>e)return!1; +break}n=null;for(var q=Ma(),u=0;ub+1E-5||d.bounds.height>c+1E-5)&&v('Geometry made with figure "'+a.figure+'" has bounds '+d.bounds.toString()+" that are too large for the given size ("+b+","+c+"). See documentation for Shape.defineFigureGenerator."); +return d};function fo(a){var b=Vn[a];if(void 0===b){var c=a.toLowerCase();if("none"===c)return"None";b=Vn[c];if(void 0===b){var d=null,e;for(e in K.rn)if(e.toLowerCase()===c){d=e;break}if(null!==d)return a=Md(K.rn[d],!1),Vn[d]=a,c!==d&&(Vn[c]=d),d}}return"string"===typeof b?b:b instanceof zd?a:null} +na.Object.defineProperties(Uf.prototype,{geometry:{configurable:!0,get:function(){return null!==this.ua?this.ua:this.Ld},set:function(a){var b=this.ua,c=this.Ld;if(b!==a){null!==a?(F&&w(a,zd,Uf,"geometry"),this.Ld=this.ua=a.freeze()):this.Ld=this.ua=null;var d=this.part;null!==d&&(d.wh=NaN);this.u();this.g("geometry",b||c,a);zl(this)&&(a=this.part,null!==a&&Al(this,a,"geometryString"))}}},geometryString:{configurable:!0,get:function(){return null===this.geometry?"":this.geometry.toString()}, +set:function(a){a=Md(a);var b=a.normalize();this.geometry=a;this.position=a=J.allocAt(-b.x,-b.y);J.free(a)}},isGeometryPositioned:{configurable:!0,get:function(){return this.Io},set:function(a){F&&A(a,"boolean",Uf,"isGeometryPositioned");var b=this.Io;b!==a&&(this.Io=a,this.u(),this.g("isGeometryPositioned",b,a))}},fill:{configurable:!0,get:function(){return this.Fl},set:function(a){var b=this.Fl;b!==a&&(null!==a&&km(a,"Shape.fill"),a instanceof Ol&&a.freeze(),this.Fl= +a,this.P(),this.g("fill",b,a))}},stroke:{configurable:!0,get:function(){return this.Nc},set:function(a){var b=this.Nc;b!==a&&(null!==a&&km(a,"Shape.stroke"),a instanceof Ol&&a.freeze(),this.Nc=a,this.P(),this.g("stroke",b,a))}},strokeWidth:{configurable:!0,get:function(){return this.Hh},set:function(a){var b=this.Hh;if(b!==a)if(F&&C(a,Uf,"strokeWidth"),0<=a){this.Hh=a;this.u();var c=this.part;null!==c&&(c.wh=NaN);this.g("strokeWidth",b,a)}else za(a,"value >= 0",Uf,"strokeWidth:value")}}, +strokeCap:{configurable:!0,get:function(){return this.xm},set:function(a){var b=this.xm;b!==a&&("string"!==typeof a||"butt"!==a&&"round"!==a&&"square"!==a?za(a,'"butt", "round", or "square"',Uf,"strokeCap"):(this.xm=a,this.P(),this.g("strokeCap",b,a)))}},strokeJoin:{configurable:!0,get:function(){return this.ym},set:function(a){var b=this.ym;b!==a&&("string"!==typeof a||"miter"!==a&&"bevel"!==a&&"round"!==a?za(a,'"miter", "bevel", or "round"',Uf,"strokeJoin"):(this.ym= +a,this.P(),this.g("strokeJoin",b,a)))}},strokeMiterLimit:{configurable:!0,get:function(){return this.tk},set:function(a){var b=this.tk;if(b!==a)if(F&&C(a,Uf,"strokeMiterLimit"),1<=a){this.tk=a;this.P();var c=this.part;null!==c&&(c.wh=NaN);this.g("strokeMiterLimit",b,a)}else F&&za(a,"value >= 1",Uf,"strokeWidth:value")}},strokeDashArray:{configurable:!0,get:function(){return this.Fh},set:function(a){var b=this.Fh;if(b!==a){null===a||Array.isArray(a)||ya(a,"Array",Uf,"strokeDashArray:value"); +if(null!==a){for(var c=a.length,d=0,e=0;ea?a=0:1a?a=0:1p*m*m&&(c=!0);b.Mb!==a&&(c=!1);!1===b.Xe("textGreeking")&& +(c=!1);b=this.zf;p=this.Af;switch(this.flip){case ul:a.translate(e,0);a.scale(-1,1);break;case tl:a.translate(0,f);a.scale(1,-1);break;case vl:a.translate(e,f),a.scale(-1,-1)}m=this.ed;n=(b+g+p)*m;f>n&&(d=this.lj,d=d.y*f-d.y*n+d.offsetY);if(1===m&&null!==this.we)p=this.Ab,p>e&&(p=e),this.oj(this.we,a,0,d+b,e,g,p,c,h,k,l);else if(null!==this.Wb&&null!==this.qb)for(n=0;ne&&(r=e);d+=b;this.oj(this.qb[n],a,0,d,e,g,r,c,h,k,l);d+=g+p}switch(this.flip){case ul:a.scale(-1,1);a.translate(-e, +0);break;case tl:a.scale(1,-1);a.translate(0,-f);break;case vl:a.scale(-1,-1),a.translate(-e,-f)}}}; +t.oj=function(a,b,c,d,e,f,g,h,k,l,m){var n=0;h?("left"===k?n=0:"right"===k?n=e-g:"center"===k&&(n=(e-g)/2),b.fillRect(c+n,d+.25*f,g,1)):("left"===k?n=0:"right"===k?n=e:"center"===k&&(n=e/2),e=null!==no?no(this,f):.75*f,b.fillText(a,c+n,d+e),a=f/20|0,0===a&&(a=1),"right"===k?n-=g:"center"===k&&(n-=g/2),l&&(k=null!==oo?oo(this,f):.8*f,b.beginPath(),b.lineWidth=a,b.moveTo(c+n,d+k),b.lineTo(c+n+g,d+k),b.stroke()),m&&(b.beginPath(),b.lineWidth=a,d=d+f-f/2.2|0,0!==a%2&&(d+=.5),b.moveTo(c+n,d),b.lineTo(c+ +n+g,d),b.stroke()))}; +t.Vm=function(a,b,c,d){this.Pi=a;var e=this.xe;null!==ho&&po!==e&&(po=ho.font=e);this.Ab=this.Me=0;this.we=this.qb=this.Wb=this.ye=null;var f;if(isNaN(this.desiredSize.width)){e=this.$b.replace(/\r\n/g,"\n").replace(/\r/g,"\n");if(0===e.length)e=0;else if(this.isMultiline){for(var g=f=0,h=!1;!h;){var k=e.indexOf("\n",g);-1===k&&(k=e.length,h=!0);g=e.substr(g,k-g);this.Ei===ko&&(g=g.trim());f=Math.max(f,qo(g));g=k+1}e=f}else f=e.indexOf("\n",0),0<=f&&(e=e.substr(0,f)),e=qo(e);e=Math.min(e,a/this.scale); +e=Math.max(8,e)}else e=this.desiredSize.width;null!==this.panel&&(e=Math.min(e,this.panel.maxSize.width));f=ro(this,e);isNaN(this.desiredSize.height)?f=Math.min(f,b/this.scale):f=this.desiredSize.height;h=f;if(0!==this.Ab&&null!==this.Wb&&null!==this.qb&&this.yg===so&&(b=this.xe,b=this.yg===so?to(b):0,k=this.zf+this.Af,k=Math.max(0,mo(this)+k),h=Math.min(this.maxLines-1,Math.max(Math.floor(h/k+.01)-1,0)),!(h+1>=this.qb.length))){k=this.qb[h];for(b=Math.max(1,a-b);qo(k)>b&&1=a.Ge)null!==d&&d.h(0,h);else if(g=b,a.Lg===yo){a.Me=1;var l=qo(b);if(0===k||l<=c)a.Ab=Math.max(a.Ab,l),wo(a,b,a.Ab),null!==d&&d.h(l,h);else{f=zo(a,g);g=g.substr(f.length);b=zo(a,g);for(l=qo(f+b);0c&&1c;){var n=1;l=qo(b.substr(0,n));for(m=0;l<=c;)n++,m=l,l=qo(b.substr(0,n));if(1===n){var p=l;f=Math.max(f,l)}else p=m,f=Math.max(f,m);n--;1>n&&(n=1);wo(a,b.substr(0,n),p);k++;b=b.substr(n);if(a.ed+k>a.Ge)break}m=zo(a,g);for(l=qo(b+m);0a.Ge))break}a.Me=Math.min(a.Ge,k);a.Ab=Math.max(a.Ab,f);null!==d&&d.h(a.Ab,h*a.Me)}}function zo(a,b){if(a.Lg===Ao)return b.substr(0,1);for(var c=b.length,d=0,e=Bo;d=b.length?b:b.substr(0,d)}function qo(a){return null===ho?8*a.length:ho.measureText(a).width} +function mo(a){if(null!==a.ye)return a.ye;var b=a.xe;if(null===ho){var c=16;return a.ye=c}void 0!==Do[b]&&5E3>Eo?c=Do[b]:(c=1.3*ho.measureText("M").width,Do[b]=c,Eo++);return a.ye=c}function to(a){if(null===ho)return 6;if(void 0!==Fo[a]&&5E3>Go)var b=Fo[a];else b=ho.measureText(uo).width,Fo[a]=b,Go++;return b} +function ro(a,b){var c=a.$b.replace(/\r\n/g,"\n").replace(/\r/g,"\n"),d=a.zf+a.Af;d=Math.max(0,mo(a)+d);if(0===c.length)return a.Ab=0,a.ed=1,d;if(!a.isMultiline){var e=c.indexOf("\n",0);0<=e&&(c=c.substr(0,e))}e=0;for(var f=a.ed=0,g,h=!1;!h;){g=c.indexOf("\n",f);-1===g&&(g=c.length,h=!0);if(f<=g){f=c.substr(f,g-f);if(a.Lg!==yo){a.Me=0;var k=Fb.alloc();xo(a,f,b,k);e+=k.height;Fb.free(k);a.ed+=a.Me}else xo(a,f,b,null),e+=d,a.ed++;a.ed===a.Ge&&(h=!0)}f=g+1}return a.Hs=e} +na.Object.defineProperties(ih.prototype,{font:{configurable:!0,get:function(){return this.xe},set:function(a){var b=this.xe;b!==a&&(F&&(A(a,"string",ih,"font"),lo(a)||v('Not a valid font: "'+a+'"')),this.xe=a,this.ye=null,this.u(),this.g("font",b,a))}},text:{configurable:!0,get:function(){return this.$b},set:function(a){var b=this.$b;null!==a&&void 0!==a?a=a.toString():a="";b!==a&&(this.$b=a,this.u(),this.g("text",b,a))}},textAlign:{configurable:!0,get:function(){return this.fj}, +set:function(a){var b=this.fj;b!==a&&(F&&A(a,"string",ih,"textAlign"),"start"===a||"end"===a||"left"===a||"right"===a||"center"===a?(this.fj=a,this.P(),this.g("textAlign",b,a)):F&&za(a,'"start", "end", "left", "right", or "center"',ih,"textAlign"))}},flip:{configurable:!0,get:function(){return this.Zd},set:function(a){var b=this.Zd;b!==a&&(gb(a,O,ih,"flip"),this.Zd=a,this.P(),this.g("flip",b,a))}},verticalAlignment:{configurable:!0,get:function(){return this.lj},set:function(a){var b= +this.lj;b.A(a)||(F&&(w(a,N,ih,"verticalAlignment"),a.Sb()&&v("TextBlock.verticalAlignment for "+this+" must be a real Spot, not:"+a)),this.lj=a=a.K(),Xl(this),this.g("verticalAlignment",b,a))}},naturalBounds:{configurable:!0,get:function(){if(!this.wc.o()){var a=Fb.alloc();xo(this,this.$b,999999,a);var b=a.width;Fb.free(a);a=ro(this,b);var c=this.desiredSize;isNaN(c.width)||(b=c.width);isNaN(c.height)||(a=c.height);cc(this.wc,b,a)}return this.wc}},isMultiline:{configurable:!0, +get:function(){return this.ak},set:function(a){var b=this.ak;b!==a&&(F&&A(a,"boolean",ih,"isMultiline"),this.ak=a,this.u(),this.g("isMultiline",b,a))}},isUnderline:{configurable:!0,get:function(){return this.Mi},set:function(a){var b=this.Mi;b!==a&&(F&&A(a,"boolean",ih,"isUnderline"),this.Mi=a,this.P(),this.g("isUnderline",b,a))}},isStrikethrough:{configurable:!0,get:function(){return this.Li},set:function(a){var b=this.Li;b!==a&&(F&&A(a,"boolean",ih,"isStrikethrough"), +this.Li=a,this.P(),this.g("isStrikethrough",b,a))}},wrap:{configurable:!0,get:function(){return this.Lg},set:function(a){var b=this.Lg;b!==a&&(F&&gb(a,ih,ih,"wrap"),this.Lg=a,this.u(),this.g("wrap",b,a))}},overflow:{configurable:!0,get:function(){return this.yg},set:function(a){var b=this.yg;b!==a&&(F&&gb(a,ih,ih,"overflow"),this.yg=a,this.u(),this.g("overflow",b,a))}},stroke:{configurable:!0,get:function(){return this.Nc},set:function(a){var b=this.Nc;b!== +a&&(null!==a&&km(a,"TextBlock.stroke"),a instanceof Ol&&a.freeze(),this.Nc=a,this.P(),this.g("stroke",b,a))}},lineCount:{configurable:!0,get:function(){return this.ed}},editable:{configurable:!0,get:function(){return this.jo},set:function(a){var b=this.jo;b!==a&&(F&&A(a,"boolean",ih,"editable"),this.jo=a,this.g("editable",b,a))}},textEditor:{configurable:!0,get:function(){return this.wq},set:function(a){var b=this.wq;b!==a&&(!F||a instanceof ef||v("TextBlock.textEditor must be an HTMLInfo."), +this.wq=a,this.g("textEditor",b,a))}},errorFunction:{configurable:!0,get:function(){return this.rd},set:function(a){var b=this.rd;b!==a&&(null!==a&&A(a,"function",ih,"errorFunction"),this.rd=a,this.g("errorFunction",b,a))}},interval:{configurable:!0,get:function(){return this.de},set:function(a){var b=this.de;F&&C(a,ih,"interval");a=Math.round(a);if(b!==a&&0!==a&&isFinite(a)){this.de=a;this.u();var c=this.panel;null!==c&&(c.qh=null);this.g("interval",b,a)}}},graduatedStart:{configurable:!0, +enumerable:!0,get:function(){return this.be},set:function(a){var b=this.be;F&&C(a,ih,"graduatedStart");b!==a&&(0>a?a=0:1a?a=0:1=a&&za(a,"> 0",ih,"maxLines"),this.Ge=a,this.u(),this.g("maxLines",b,a))}}, +metrics:{configurable:!0,get:function(){return{arrSize:null!==this.Wb?this.Wb:[this.Ab],arrText:null!==this.qb?this.qb:[this.we],maxLineWidth:this.Ab,fontHeight:this.ye}}},choices:{configurable:!0,get:function(){return this.Kn},set:function(a){var b=this.Kn;b!==a&&(F&&null!==a&&!Array.isArray(a)&&ya(a,"Array",ih,"choices:value"),this.Kn=a,this.g("choices",b,a))}}}); +var no=null,oo=null,yo=new E(ih,"None",0),vo=new E(ih,"WrapFit",1),jo=new E(ih,"WrapDesiredSize",2),Ao=new E(ih,"WrapBreakAll",3),io=new E(ih,"OverflowClip",0),so=new E(ih,"OverflowEllipsis",1),ko=new E(ih,"FormatTrim",0),Co=new E(ih,"FormatNone",0),Bo=/[ \u200b\u00ad]/,Do=new ib,Eo=0,Fo=new ib,Go=0,uo="...",po="",ho=null,go=!1;ih.className="TextBlock";ih.getEllipsis=function(){return uo};ih.setEllipsis=function(a){uo=a;Fo=new ib;Go=0};ih.getBaseline=function(){return no}; +ih.setBaseline=function(a){no=a};ih.getUnderline=function(){return oo};ih.setUnderline=function(a){oo=a};ih.isValidFont=lo;ih.None=yo;ih.WrapFit=vo;ih.WrapDesiredSize=jo;ih.WrapBreakAll=Ao;ih.OverflowClip=io;ih.OverflowEllipsis=so;function Ho(){this.Wb=[];this.qb=[]}Ho.prototype.reset=function(){this.Wb=[];this.qb=[]};Ho.prototype.vy=function(a){this.Wb=Ja(a.Wb);this.qb=Ja(a.qb)};Ho.className="TextBlockMetrics"; +function rk(){O.call(this);this.lh=null;this.nq="";this.Eh=vc;this.Ll=Bd;this.Ih=this.rd=null;this.Kl=Kc;this.Zd=zg;this.Am=null;this.Ho=!1;this.Gl=!0;this.am=!1;this.tm=null}ma(rk,O);rk.prototype.cloneProtected=function(a){O.prototype.cloneProtected.call(this,a);a.element=this.lh;a.nq=this.nq;a.Eh=this.Eh.K();a.Ll=this.Ll;a.Zd=this.Zd;a.rd=this.rd;a.Ih=this.Ih;a.Kl=this.Kl.K();a.Gl=this.Gl;a.tm=this.tm}; +rk.prototype.pb=function(a){a===zg||a===Og||a===sl?this.imageStretch=a:O.prototype.pb.call(this,a)};rk.prototype.toString=function(){return"Picture("+this.source+")#"+ob(this)};function Ti(a){void 0===a&&(a="");A(a,"string",rk,"clearCache:url");""!==a?Io[a]&&(delete Io[a],Jo--):(Io=new ib,Jo=0)} +function Ko(a,b){b.wz||(b.qv=function(c){b.ys=!0;b.Eo=!1;var d=b.ih.copy();if(null!==d&&void 0!==d){for(d=d.iterator;d.next();){var e=d.value;var f=b.getAttribute("src");var g=e.Bg.J(f);if(null!==g)for(var h=g.length,k=0;k=d.width&&(e=e+r.offsetX+(m*r.x-d.width*r.x));n>=d.height&&(f=f+r.offsetY+(n*r.y-d.height*r.y));h=Math.min(d.width,m);g=Math.min(d.height,n);break;case Bd:m=d.width;n=d.height;break;case Og:case sl:p===Og?(p=Math.min(d.height/n,d.width/m),m*=p,n*=p):p===sl&&(p=Math.max(d.height/n,d.width/m),m*=p,n*=p,m>=d.width&&(e=(e+r.offsetX+(m*r.x-d.width*r.x)/m)*h),n>=d.height&&(f=(f+r.offsetY+(n*r.y-d.height*r.y)/n)*g),h*=1/(m/ +d.width),g*=1/(n/d.height),m=d.width,n=d.height)}p=this.Mf()*b.scale;var q=m*p*n*p,u=h*g/q,y=c.__goCache;p=null;var x=Lo;if(c.ys&&void 0!==y&&4x*x)for(null===y.nj&&(Mo(y,4,k,l,c),Mo(y,16,k,l,c)),k=y.nj,l=k.length,q=0;qK.fi&&(K.ei[a]=d,K.fi++);return d});Qo("Square",function(a,b,c){a="s"+b+","+c;var d=K.ei[a];if(void 0!==d)return d;d=new zd(Kd);d.endX=b;d.endY=c;d.defaultStretch=Og;50>K.fi&&(K.ei[a]=d,K.fi++);return d}); +Qo("RoundedRectangle",function(a,b,c){var d=a?a.parameter1:NaN;if(isNaN(d)||0>d)d=5;d=Math.min(d,b/3);d=Math.min(d,c/3);a=d*K.Wg;b=(new zd).add((new ve(d,0,!0)).add(new we(Id,b-d,0)).add(new we(le,b,d,b-a,0,b,a)).add(new we(Id,b,c-d)).add(new we(le,b-d,c,b,c-a,b-a,c)).add(new we(Id,d,c)).add(new we(le,0,c-d,a,c,0,c-a)).add(new we(Id,0,d)).add((new we(le,d,0,0,a,a,0)).close()));1K.fi&&(K.ei[a]=d,K.fi++);return d});Qo("Circle",function(a,b,c){a="c"+b+","+c;var d=K.ei[a];if(void 0!==d)return d;d=new zd(Ld);d.endX=b;d.endY=c;d.spot1=qd;d.spot2=rd;d.defaultStretch=Og;50>K.fi&&(K.ei[a]=d,K.fi++);return d});Qo("TriangleRight",function(a,b,c){return(new zd).add((new ve(0,0)).add(new we(Id,b,.5*c)).add((new we(Id,0,c)).close())).nn(0,.25,.5,.75)}); +Qo("TriangleDown",function(a,b,c){return(new zd).add((new ve(0,0)).add(new we(Id,b,0)).add((new we(Id,.5*b,c)).close())).nn(.25,0,.75,.5)});Qo("TriangleLeft",function(a,b,c){return(new zd).add((new ve(b,c)).add(new we(Id,0,.5*c)).add((new we(Id,b,0)).close())).nn(.5,.25,1,.75)});Qo("TriangleUp",function(a,b,c){return(new zd).add((new ve(b,c)).add(new we(Id,0,c)).add((new we(Id,.5*b,0)).close())).nn(.25,.5,.75,1)});Qo("Triangle","TriangleUp"); +Qo("Diamond",function(a,b,c){return(new zd).add((new ve(.5*b,0)).add(new we(Id,0,.5*c)).add(new we(Id,.5*b,c)).add((new we(Id,b,.5*c)).close())).nn(.25,.25,.75,.75)});Qo("LineH",function(a,b,c){a=new zd(Gd);a.startX=0;a.startY=c/2;a.endX=b;a.endY=c/2;return a});Qo("LineV",function(a,b,c){a=new zd(Gd);a.startX=b/2;a.startY=0;a.endX=b/2;a.endY=c;return a});Qo("None","Rectangle");Qo("BarH","Rectangle");Qo("BarV","Rectangle");Qo("MinusLine","LineH"); +Qo("PlusLine",function(a,b,c){return(new zd).add((new ve(0,c/2,!1)).add(new we(Id,b,c/2)).add(new we(ke,b/2,0)).add(new we(Id,b/2,c)))});Qo("XLine",function(a,b,c){return(new zd).add((new ve(0,c,!1)).add(new we(Id,b,0)).add(new we(ke,0,0)).add(new we(Id,b,c)))}); +K.rn={"":"",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"}; +function U(a){W.call(this,a);this.F=2408959;this.uh=this.Zf="";this.Tp=this.Pp=this.eq=this.Uo=null;this.gq="";this.Xf=this.Fo=this.fq=this.Dh=null;this.Rp="";this.Qp=Zb;this.$b=this.Up="";this.Qi=this.Nn=this.yi=null;this.pg=(new J(NaN,NaN)).freeze();this.ap="";this.qf=null;this.bp=Ec;this.Vp=fd;this.lp=Nb;this.cp=Ob;this.fo=null;this.Vo=127;this.kq=Pb;this.jq="gray";this.Gg=4;this.Ox=-1;this.Gq=NaN;this.vz=new L;this.ik=null;this.wh=NaN}ma(U,W); +U.prototype.cloneProtected=function(a){W.prototype.cloneProtected.call(this,a);a.F=this.F&-4097|49152;a.Zf=this.Zf;a.uh=this.uh;a.Uo=this.Uo;a.eq=this.eq;a.Pp=this.Pp;a.Tp=this.Tp;a.gq=this.gq;a.fq=this.fq;a.Fo=this.Fo;a.Xf=null;a.Rp=this.Rp;a.Qp=this.Qp.K();a.Up=this.Up;a.Vp=this.Vp.K();a.$b=this.$b;a.Nn=this.Nn;a.pg.assign(this.pg);a.ap=this.ap;a.bp=this.bp.K();a.lp=this.lp.K();a.cp=this.cp.K();a.fo=this.fo;a.Vo=this.Vo;a.kq=this.kq.K();a.jq=this.jq;a.Gg=this.Gg;a.Gq=this.Gq}; +U.prototype.Kf=function(a){W.prototype.Kf.call(this,a);a.Zh();a.Dh=null;a.qf=null;a.ik=null};U.prototype.toString=function(){var a=Pa(this.constructor)+"#"+ob(this);null!==this.data&&(a+="("+Qa(this.data)+")");return a};U.prototype.cl=function(a,b,c,d,e,f,g){var h=this.diagram;null!==h&&(a===Le&&"elements"===b?e instanceof W?Vj(e,function(a){Xj(h.partManager,a);Wj(h,a)}):qk(h,e):a===Me&&"elements"===b&&(e instanceof W?Vj(e,function(a){ak(h.partManager,a,h)}):sk(h,e)),h.ab(a,b,c,d,e,f,g))}; +U.prototype.Ia=function(a){W.prototype.Ia.call(this,a);if(null!==this.data){for(var b=this.$.j,c=b.length,d=0;de.x&&a.y>e.y&&a.righte.x&&b.y>e.y&&b.right=c.maxSelectionCount)){this.F^=4096;var d=!1;if(null!==c){d=c.skipsUndoManager;c.skipsUndoManager=!0;var e=c.selection; +e.ka();a?e.add(this):e.remove(this);e.freeze()}this.g("isSelected",b,a);this.Rb();a=this.selectionChanged;null!==a&&a(this);null!==c&&(c.Jb(),c.skipsUndoManager=d)}}}},isHighlighted:{configurable:!0,get:function(){return 0!==(this.F&524288)},set:function(a){var b=0!==(this.F&524288);if(b!==a){F&&A(a,"boolean",U,"isHighlighted");this.F^=524288;var c=this.diagram;null!==c&&(c=c.highlighteds,c.ka(),a?c.add(this):c.remove(this),c.freeze());this.g("isHighlighted",b,a);this.P();a=this.highlightedChanged; +null!==a&&a(this)}}},isShadowed:{configurable:!0,get:function(){return 0!==(this.F&8192)},set:function(a){var b=0!==(this.F&8192);b!==a&&(F&&A(a,"boolean",U,"isShadowed"),this.F^=8192,this.g("isShadowed",b,a),this.P())}},isAnimated:{configurable:!0,get:function(){return 0!==(this.F&262144)},set:function(a){var b=0!==(this.F&262144);b!==a&&(F&&A(a,"boolean",U,"isAnimated"),this.F^=262144,this.g("isAnimated",b,a))}},highlightedChanged:{configurable:!0,get:function(){return this.Fo}, +set:function(a){var b=this.Fo;b!==a&&(null!==a&&A(a,"function",U,"highlightedChanged"),this.Fo=a,this.g("highlightedChanged",b,a))}},selectionObjectName:{configurable:!0,get:function(){return this.gq},set:function(a){var b=this.gq;b!==a&&(F&&A(a,"string",U,"selectionObjectName"),this.gq=a,this.Dh=null,this.g("selectionObjectName",b,a))}},selectionAdornmentTemplate:{configurable:!0,get:function(){return this.eq},set:function(a){var b=this.eq;b!==a&&(F&&w(a,Ve,U,"selectionAdornmentTemplate"), +this.eq=a,this.g("selectionAdornmentTemplate",b,a))}},selectionObject:{configurable:!0,get:function(){if(null===this.Dh){var a=this.selectionObjectName;null!==a&&""!==a?(a=this.ib(a),null!==a?this.Dh=a:this.Dh=this):this instanceof S?(a=this.path,null!==a?this.Dh=a:this.Dh=this):this.Dh=this}return this.Dh}},selectionChanged:{configurable:!0,get:function(){return this.fq},set:function(a){var b=this.fq;b!==a&&(null!==a&&A(a,"function",U,"selectionChanged"),this.fq=a,this.g("selectionChanged", +b,a))}},resizeAdornmentTemplate:{configurable:!0,get:function(){return this.Pp},set:function(a){var b=this.Pp;b!==a&&(F&&w(a,Ve,U,"resizeAdornmentTemplate"),this.Pp=a,this.g("resizeAdornmentTemplate",b,a))}},resizeObjectName:{configurable:!0,get:function(){return this.Rp},set:function(a){var b=this.Rp;b!==a&&(F&&A(a,"string",U,"resizeObjectName"),this.Rp=a,this.g("resizeObjectName",b,a))}},resizeObject:{configurable:!0,get:function(){var a=this.resizeObjectName; +return""!==a&&(a=this.ib(a),null!==a)?a:this}},resizeCellSize:{configurable:!0,get:function(){return this.Qp},set:function(a){var b=this.Qp;b.A(a)||(F&&w(a,Fb,U,"resizeCellSize"),this.Qp=a=a.K(),this.g("resizeCellSize",b,a))}},rotateAdornmentTemplate:{configurable:!0,get:function(){return this.Tp},set:function(a){var b=this.Tp;b!==a&&(F&&w(a,Ve,U,"rotateAdornmentTemplate"),this.Tp=a,this.g("rotateAdornmentTemplate",b,a))}},rotateObjectName:{configurable:!0, +get:function(){return this.Up},set:function(a){var b=this.Up;b!==a&&(F&&A(a,"string",U,"rotateObjectName"),this.Up=a,this.g("rotateObjectName",b,a))}},rotateObject:{configurable:!0,get:function(){var a=this.rotateObjectName;return""!==a&&(a=this.ib(a),null!==a)?a:this}},rotationSpot:{configurable:!0,get:function(){return this.Vp},set:function(a){var b=this.Vp;b.A(a)||(F&&(w(a,N,U,"rotationSpot"),a===fd||a.eb()||v("Part.rotationSpot must be a specific Spot value or Spot.Default, not: "+ +a)),this.Vp=a=a.K(),this.g("rotationSpot",b,a))}},text:{configurable:!0,get:function(){return this.$b},set:function(a){var b=this.$b;b!==a&&(F&&A(a,"string",U,"text"),this.$b=a,this.g("text",b,a))}},containingGroup:{configurable:!0,get:function(){return this.yi},set:function(a){if(this.Tc()){var b=this.yi;if(b!==a){F&&null!==a&&w(a,If,U,"containingGroup");null===a||this!==a&&!a.Qd(this)||(this===a&&v("Cannot make a Group a member of itself: "+this.toString()),v("Cannot make a Group indirectly contain itself: "+ +this.toString()+" already contains "+a.toString()));this.D(2);var c=this.diagram;null!==b?cp(b,this):this instanceof If&&null!==c&&c.Oh.remove(this);this.yi=a;null!==a?bp(a,this):this instanceof If&&null!==c&&c.Oh.add(this);this.D(1);if(null!==c&&c.ba){var d=this.data,e=c.model;if(null!==d&&e.Aj()){var f=e.pa(null!==a?a.data:null);e.sr(d,f)}}d=this.containingGroupChanged;null!==d&&(e=!0,null!==c&&(e=c.ba,c.ba=!0),d(this,b,a),null!==c&&(c.ba=e));if(this instanceof If)for(c=new I,ml(c,this,!0,0,!0), +c=c.iterator;c.next();)if(d=c.value,d instanceof V)for(d=d.linksConnected;d.next();)hp(d.value);if(this instanceof V){for(c=this.linksConnected;c.next();)hp(c.value);c=this.labeledLink;null!==c&&hp(c)}this.g("containingGroup",b,a);null!==a&&(b=a.layer,null!==b&&Bi(b,-1,a))}}else v("cannot set the Part.containingGroup of a Link or Adornment")}},containingGroupChanged:{configurable:!0,get:function(){return this.Nn},set:function(a){var b=this.Nn;b!==a&&(null!==a&&A(a,"function",U,"containingGroupChanged"), +this.Nn=a,this.g("containingGroupChanged",b,a))}},isTopLevel:{configurable:!0,get:function(){return null!==this.containingGroup||this instanceof V&&null!==this.labeledLink?!1:!0}},layoutConditions:{configurable:!0,get:function(){return this.Vo},set:function(a){var b=this.Vo;b!==a&&(F&&A(a,"number",U,"layoutConditions"),this.Vo=a,this.g("layoutConditions",b,a))}},dragComputation:{configurable:!0,get:function(){return this.fo},set:function(a){var b=this.fo; +b!==a&&(null!==a&&A(a,"function",U,"dragComputation"),this.fo=a,this.g("dragComputation",b,a))}},shadowOffset:{configurable:!0,get:function(){return this.kq},set:function(a){var b=this.kq;b.A(a)||(F&&w(a,J,U,"shadowOffset"),this.kq=a=a.K(),this.P(),this.g("shadowOffset",b,a))}},shadowColor:{configurable:!0,get:function(){return this.jq},set:function(a){var b=this.jq;b!==a&&(F&&A(a,"string",U,"shadowColor"),this.jq=a,this.P(),this.g("shadowColor",b,a))}},shadowBlur:{configurable:!0, +enumerable:!0,get:function(){return this.Gg},set:function(a){var b=this.Gg;b!==a&&(F&&A(a,"number",U,"shadowBlur"),this.Gg=a,this.P(),this.g("shadowBlur",b,a))}}});U.prototype.invalidateLayout=U.prototype.D;U.prototype.findCommonContainingGroup=U.prototype.Ey;U.prototype.isMemberOf=U.prototype.Qd;U.prototype.findTopLevelPart=U.prototype.yA;U.prototype.findSubGraphLevel=U.prototype.vA;U.prototype.ensureBounds=U.prototype.Ya;U.prototype.getDocumentBounds=U.prototype.xj; +U.prototype.getRelativePoint=U.prototype.Pf;U.prototype.findObject=U.prototype.ib;U.prototype.moveTo=U.prototype.moveTo;U.prototype.invalidateAdornments=U.prototype.Rb;U.prototype.clearAdornments=U.prototype.Ak;U.prototype.removeAdornment=U.prototype.Tf;U.prototype.addAdornment=U.prototype.Rh;U.prototype.findAdornment=U.prototype.Ik;U.prototype.updateTargetBindings=U.prototype.Ia;var $o=!1;U.className="Part";U.LayoutNone=0;U.LayoutAdded=1;U.LayoutRemoved=2;U.LayoutShown=4;U.LayoutHidden=8; +U.LayoutNodeSized=16;U.LayoutGroupLayout=32;U.LayoutNodeReplaced=64;U.LayoutStandard=127;U.LayoutAll=16777215;function Ve(a){U.call(this,a);this.F&=-257;this.uh="Adornment";this.re=null;this.Sx=0;this.iy=!1;this.l=a instanceof fn?[]:ip;this.Sa=null}ma(Ve,U);Ve.prototype.toString=function(){var a=this.adornedPart;return"Adornment("+this.category+")"+(null!==a?a.toString():"")};Ve.prototype.updateRelationshipsFromData=function(){}; +Ve.prototype.Rk=function(a){var b=this.adornedObject.part;if(b instanceof S&&this.adornedObject instanceof Uf){var c=b.path;b.Rk(a);a=c.geometry;b=this.$.j;c=b.length;for(var d=0;da&&(a=1);var b=this.diagram;if(null!==b&&!b.Ye){b.Ye=!0;var c=new I;c.add(this);tp(this,c,b.isTreePathToChildren,a,b,this,b.treeCollapsePolicy===Gi);b.Ye=!1}}; +function tp(a,b,c,d,e,f,g){if(1a&&(a=2);var b=this.diagram;if(null!==b&&!b.Ye){b.Ye=!0;var c=new I;c.add(this);vp(this,c,b.isTreePathToChildren,a,b,this,b.treeCollapsePolicy===Gi);b.Ye=!1}}; +function vp(a,b,c,d,e,f,g){for(var h=f===a?!1:a.isTreeExpanded,k=c?a.Sq():a.Od();k.next();){var l=k.value;l.isTreeLink&&(h||l.Ad||l.Za(),l=l.Xq(a),null!==l&&l!==a&&!b.contains(l)&&(b.add(l),h||(l.Ub(!0),l.Zh(),g&&e.yk(l,f)),2e&&(e=h.right);h.bottom>f&&(f=h.bottom)}}isFinite(c)&&isFinite(d)?a.h(c,d,e-c,f-d):(b=b.location, +a.h(b.x,b.y,0,0));return a};na.Object.defineProperties(xg.prototype,{padding:{configurable:!0,get:function(){return this.ob},set:function(a){"number"===typeof a?a=new hc(a):w(a,hc,xg,"padding");var b=this.ob;b.A(a)||(this.ob=a=a.K(),this.g("padding",b,a),this.u())}}});xg.className="Placeholder"; +function S(){U.call(this,W.Link);this.La=8;this.hf=null;this.jf="";this.Df=this.to=null;this.Ef="";this.zq=null;this.jl=ng;this.Un=0;this.Wn=ng;this.Xn=NaN;this.pk=Ap;this.mq=.5;this.td=null;this.Fb=(new H).freeze();this.wf=this.Lc=null;this.km=new L;this.ua=new zd;this.L=this.w=this.Yf=this.gg=null;this.l=[];this.Iv=new J;this.os=this.ay=this.$x=null;this.dv=NaN;this.S=null}ma(S,U); +S.prototype.cloneProtected=function(a){U.prototype.cloneProtected.call(this,a);a.La=this.La&-113;a.jf=this.jf;a.to=this.to;a.Ef=this.Ef;a.zq=this.zq;a.jl=this.jl;a.Un=this.Un;a.Wn=this.Wn;a.Xn=this.Xn;a.pk=this.pk;a.mq=this.mq;null!==this.S&&(a.S=this.S.copy())};t=S.prototype;t.Kf=function(a){U.prototype.Kf.call(this,a);this.jf=a.jf;this.Ef=a.Ef;a.Lc=null;a.Za();a.Yf=this.Yf;var b=a.fromPort;null!==b&&mp(b);a=a.toPort;null!==a&&mp(a)}; +t.pb=function(a){a.classType===S?2===(a.value&2)?this.routing=a:a===qg||a===mg||a===lg?this.curve=a:a===Bp||a===Cp||a===Dp?this.adjusting=a:a!==Ap&&a!==ng&&v("Unknown Link enum value for a Link property: "+a):U.prototype.pb.call(this,a)};t.Qc=function(){null===this.S&&(this.S=new yl)};t.Dj=function(){var a=this.fromNode;if(null!==a){var b=a.findVisibleNode();null!==b&&(a=b);if(Jj(a)||Kj(a))return!1}a=this.toNode;return null!==a&&(b=a.findVisibleNode(),null!==b&&(a=b),Jj(a)||Kj(a))?!1:!0};t.Sw=function(){return!1}; +t.yu=function(){};t.Tc=function(){return!1};S.prototype.computeAngle=function(a,b,c){return S.computeAngle(b,c)};S.computeAngle=function(a,b){switch(a){default:case ng:a=0;break;case pn:a=b;break;case hn:a=b+90;break;case kn:a=b-90;break;case Ep:a=b+180;break;case qn:a=K.gr(b);90a&&(a-=180);break;case jn:a=K.gr(b+90);90a&&(a-=180);break;case ln:a=K.gr(b-90);90a&&(a-=180);break;case mn:a=K.gr(b);if(45a||225a)return 0;90a&&(a-=180)}return K.gr(a)}; +function hp(a){var b=a.fromNode,c=a.toNode,d=null;null!==b?d=null!==c?b.Ey(c):b.containingGroup:null!==c?d=c.containingGroup:d=null;b=d;c=a.yi;if(c!==b){null!==c&&cp(c,a);a.yi=b;null!==b&&bp(b,a);var e=a.containingGroupChanged;if(null!==e){var f=!0,g=a.diagram;null!==g&&(f=g.ba,g.ba=!0);e(a,c,b);null!==g&&(g.ba=f)}!a.Ad||a.$x!==c&&a.ay!==c||a.Za()}if(a.isLabeledLink)for(a=a.labelNodes;a.next();)a.value.containingGroup=d}t=S.prototype; +t.Zh=function(){var a=this.containingGroup;null!==a&&this.fromNode!==a&&this.toNode!==a&&a.computesBoundsIncludingLinks&&U.prototype.Zh.call(this)};t.Xq=function(a){F&&w(a,V,S,"getOtherNode:node");var b=this.fromNode;return a===b?this.toNode:b};t.HA=function(a){F&&w(a,O,S,"getOtherPort:port");var b=this.fromPort;return a===b?this.toPort:b};function qp(a,b){null===a.td&&(a.td=new I);a.td.add(b);a.u()} +t.Zq=function(a){U.prototype.Zq.call(this,a);Fp(this)&&this.ar(this.actualBounds);if(!a){a=this.hf;var b=null;null!==a&&(b=this.fromPort,op(a,this,b));var c=this.Df;if(null!==c){var d=this.toPort;c===a&&d===b||op(c,this,d)}Gp(this)}};t.$q=function(a){U.prototype.$q.call(this,a);Fp(this)&&this.ar(this.actualBounds);if(!a){a=this.hf;var b=null;null!==a&&(b=this.fromPort,pp(a,this,b));var c=this.Df;if(null!==c){var d=this.toPort;c===a&&d===b||pp(c,this,d)}Hp(this)}}; +t.Gk=function(){this.Ad=!0;if(null!==this.td){var a=this.diagram;if(null!==a)for(var b=this.td.copy().iterator;b.next();)a.remove(b.value)}null!==this.data&&(a=this.diagram,null!==a&&a.partManager.removeDataForLink(this))};S.prototype.updateRelationshipsFromData=function(){if(null!==this.data){var a=this.diagram;null!==a&&a.partManager.updateRelationshipsFromData(this)}}; +S.prototype.move=function(a,b){var c=b?this.location:this.position,d=c.x;isNaN(d)&&(d=0);var e=c.y;isNaN(e)&&(e=0);d=a.x-d;e=a.y-e;!0===b?U.prototype.move.call(this,a,!1):(a=J.allocAt(c.x+d,c.y+e),U.prototype.move.call(this,a,!1),J.free(a));Df(this,d,e);for(a=this.labelNodes;a.next();)b=a.value,c=b.position,b.moveTo(c.x+d,c.y+e)}; +S.prototype.canRelinkFrom=function(){if(!this.relinkableFrom)return!1;var a=this.layer;if(null===a)return!0;if(!a.allowRelink)return!1;a=a.diagram;return null===a||a.allowRelink?!0:!1};S.prototype.canRelinkTo=function(){if(!this.relinkableTo)return!1;var a=this.layer;if(null===a)return!0;if(!a.allowRelink)return!1;a=a.diagram;return null===a||a.allowRelink?!0:!1}; +S.prototype.computeMidPoint=function(a){var b=this.pointsCount;if(0===b)return a.assign(Qb),a;if(1===b)return a.assign(this.i(0)),a;if(2===b){var c=this.i(0),d=this.i(1);a.h((c.x+d.x)/2,(c.y+d.y)/2);return a}if(this.isOrthogonal&&(15<=this.computeCorner()||this.computeCurve()===qg))return this.ua.lw(.5,a),a.add(this.i(0)),c=this.ua.figures.first(),a.offset(-c.startX,-c.startY),a;if(this.computeCurve()===qg){if(3===b)return this.i(1);d=(b-1)/3|0;c=3*(d/2|0);if(1===d%2){d=this.i(c);var e=this.i(c+1), +f=this.i(c+2);c=this.i(c+3);K.Pz(d.x,d.y,e.x,e.y,f.x,f.y,c.x,c.y,a)}else a.assign(this.i(c));return a}var g=this.flattenedLengths;c=this.flattenedTotalLength;for(e=f=d=0;dc/2)break;d+=e;f++}b=this.i(f);f=this.i(f+1);1>Math.abs(b.x-f.x)?b.y>f.y?a.h(b.x,b.y-(c/2-d)):a.h(b.x,b.y+(c/2-d)):1>Math.abs(b.y-f.y)?b.x>f.x?a.h(b.x-(c/2-d),b.y):a.h(b.x+(c/2-d),b.y):(c=(c/2-d)/e,a.h(b.x+c*(f.x-b.x),b.y+c*(f.y-b.y)));return a}; +S.prototype.computeMidAngle=function(){var a=this.pointsCount;if(2>a)return NaN;if(2===a)return this.i(0).Va(this.i(1));if(this.isOrthogonal&&(15<=this.computeCorner()||this.computeCurve()===qg))return this.ua.Ky(.5);if(this.computeCurve()===qg&&4<=a){var b=(a-1)/3|0,c=3*(b/2|0);if(1===b%2){c=Math.floor(c);a=this.i(c);b=this.i(c+1);var d=this.i(c+2);c=this.i(c+3);return K.Oz(a.x,a.y,b.x,b.y,d.x,d.y,c.x,c.y)}if(0d/2)break;e+=f;c++}b=this.i(c);d=this.i(c+1);if(1>Math.abs(b.x-d.x)&&1>Math.abs(b.y-d.y)){if(0Math.abs(b.x-d.x))return b.y>d.y?270:90;if(1>Math.abs(b.y-d.y))return b.x>d.x?180:0}return b.Va(d)};t=S.prototype;t.i=function(a){return this.Fb.j[a]}; +t.Wc=function(a,b){F&&(w(b,J,S,"setPoint"),b.o()||v("Link.setPoint called with a Point that does not have real numbers: "+b.toString()));F&&null===this.Lc&&v("Call Link.startRoute before modifying the points of the route.");this.Fb.Vc(a,b)};t.O=function(a,b,c){F&&(C(b,S,"setPointAt:x"),C(c,S,"setPointAt:y"));F&&null===this.Lc&&v("Call Link.startRoute before modifying the points of the route.");this.Fb.Vc(a,new J(b,c))}; +t.QA=function(a,b){F&&(w(b,J,S,"insertPoint"),b.o()||v("Link.insertPoint called with a Point that does not have real numbers: "+b.toString()));F&&null===this.Lc&&v("Call Link.startRoute before modifying the points of the route.");this.Fb.Bb(a,b)};t.m=function(a,b,c){F&&(C(b,S,"insertPointAt:x"),C(c,S,"insertPointAt:y"));F&&null===this.Lc&&v("Call Link.startRoute before modifying the points of the route.");this.Fb.Bb(a,new J(b,c))}; +t.ke=function(a){F&&(w(a,J,S,"addPoint"),a.o()||v("Link.addPoint called with a Point that does not have real numbers: "+a.toString()));F&&null===this.Lc&&v("Call Link.startRoute before modifying the points of the route.");this.Fb.add(a)};t.Hf=function(a,b){F&&(C(a,S,"insertPointAt:x"),C(b,S,"insertPointAt:y"));F&&null===this.Lc&&v("Call Link.startRoute before modifying the points of the route.");this.Fb.add(new J(a,b))}; +t.Iw=function(a){F&&null===this.Lc&&v("Call Link.startRoute before modifying the points of the route.");this.Fb.jb(a)};t.Bk=function(){F&&null===this.Lc&&v("Call Link.startRoute before modifying the points of the route.");this.Fb.clear()}; +function Df(a,b,c){if(0!==b||0!==c)if(0===a.pointsCount)a.defaultFromPoint&&a.defaultFromPoint.copy().offset(b,c),a.defaultToPoint&&a.defaultToPoint.copy().offset(b,c);else{for(var d=a.Ad,e=new H,f=a.Fb.iterator;f.next();){var g=f.value;e.add((new J(g.x+b,g.y+c)).freeze())}e.freeze();f=a.Fb;a.Fb=e;g=a.diagram;isNaN(b)||isNaN(c)||null!==g&&g.animationManager.yc?a.u():(a.pg.h(a.pg.x+b,a.pg.y+c),a.ra.h(a.ra.x+b,a.ra.y+c),Xl(a));d?Ip(a):(a.defaultFromPoint&&(a.defaultFromPoint=a.i(0)),a.defaultToPoint&& +(a.defaultToPoint=a.i(a.pointsCount-1)));null!==g&&g.animationManager.yc&&(b=g.animationManager,a.wf=e,b.mm.add(a));a.g("points",f,e)}}t.di=function(){null===this.Lc&&(this.Lc=this.Fb,this.Fb=this.Fb.copy())}; +t.Jf=function(){if(null!==this.Lc){for(var a=this.Lc,b=this.Fb,c=Infinity,d=Infinity,e=a.j,f=e.length,g=0;gl&&(n=-n),u= +(0>k?-1:1)*n+r,y=m*(u-r)+q);r=f.x+2*h/3;q=f.y+2*k/3;var x=r,z=q;K.B(k,0)?z=0k?-1:1)*n+r,z=m*(x-r)+q);this.Bk();this.ke(f);this.Hf(u,y);this.Hf(x,z);this.ke(p);this.Wc(0,this.getLinkPoint(a,b,g,!0,!1,d,e));this.Wc(3,this.getLinkPoint(d,e,c,!1,!1,a,b))}else if(f=d,p=e,d=this.getLinkPoint(a,b,g,!0,!1,f,p),e=this.getLinkPoint(f,p,c,!1,!1,a,b),this.hasCurviness())p=e.x-d.x,c=e.y-d.y,g=this.computeCurviness(),a=d.x+p/2,b=d.y+c/2,f=a,h=b,K.B(c,0)?h=0g&&(f=-f),f=(0>c?-1:1)*f+a,h=p*(f-a)+b),this.ke(d),this.Hf(f,h),this.ke(e);else{this.ke(d);this.ke(e);h=L.alloc();b.xj(h);k=h.ca(e);p.xj(h);l=h.ca(d);if(k||l)g=b.ja(Np(g),new J),this.Wc(0,this.getLinkPointFromPoint(a,b,g,e,!0,g)),c=p.ja(Np(c),new J),this.Wc(1,this.getLinkPointFromPoint(f,p,c,d,!1,c));L.free(h)}}else{n=this.isAvoiding;p&&(m&&n||l)&&this.Bk();var B=l?this.computeCurviness():0;n=this.getLinkPoint(a,b,g,!0,m,d,e);r=u=q=0;if(m||!h||l)y=this.computeEndSegmentLength(a,b,g,!0),r= +this.getLinkDirection(a,b,n,g,!0,m,d,e),l&&(h||g.A(c)||!m&&1===g.x+c.x&&1===g.y+c.y)&&(r-=m?90:30,0>B&&(r-=180)),0>r?r+=360:360<=r&&(r-=360),l&&(y+=Math.abs(B)*(m?1:2)),0===r?q=y:90===r?u=y:180===r?q=-y:270===r?u=-y:(q=y*Math.cos(r*Math.PI/180),u=y*Math.sin(r*Math.PI/180)),g.Sb()&&l&&(y=b.ja(Kc,J.alloc()),x=J.allocAt(y.x+1E3*q,y.y+1E3*u),this.getLinkPointFromPoint(a,b,y,x,!0,n),J.free(y),J.free(x));y=this.getLinkPoint(d,e,c,!1,m,a,b);var D=z=x=0;if(m||!k||l){var G=this.computeEndSegmentLength(d,e, +c,!1);D=this.getLinkDirection(d,e,y,c,!1,m,a,b);l&&(k||g.A(c)||!m&&1===g.x+c.x&&1===g.y+c.y)&&(D+=m?0:30,0>B&&(D+=180));0>D?D+=360:360<=D&&(D-=360);l&&(G+=Math.abs(B)*(m?1:2));0===D?x=G:90===D?z=G:180===D?x=-G:270===D?z=-G:(x=G*Math.cos(D*Math.PI/180),z=G*Math.sin(D*Math.PI/180));c.Sb()&&l&&(c=e.ja(Kc,J.alloc()),g=J.allocAt(c.x+1E3*x,c.y+1E3*z),this.getLinkPointFromPoint(d,e,c,g,!1,y),J.free(c),J.free(g))}c=n;if(m||!h||l)c=new J(n.x+q,n.y+u);g=y;if(m||!k||l)g=new J(y.x+x,y.y+z);!p&&!m&&h&&3Math.abs(b.y-a.y)?(b.x>=a.x?b.x=a.x+9E9:b.x=a.x-9E9,b.y=a.y):(b.y>=a.y?b.y=a.y+9E9:b.y=a.y-9E9,b.x=a.x);return b} +S.prototype.getLinkPointFromPoint=function(a,b,c,d,e,f){void 0===f&&(f=new J);if(null===a||null===b)return f.assign(c),f;a.isVisible()||(e=a.findVisibleNode(),null!==e&&e!==a&&(b=e.port));a=null;e=b.panel;null===e||e.pe()||(e=e.panel);if(null===e){e=d.x;d=d.y;var g=c.x;c=c.y}else{a=e.Md;e=1/(a.m11*a.m22-a.m12*a.m21);g=a.m22*e;var h=-a.m12*e,k=-a.m21*e,l=a.m11*e,m=e*(a.m21*a.dy-a.m22*a.dx),n=e*(a.m12*a.dx-a.m11*a.dy);e=d.x*g+d.y*k+m;d=d.x*h+d.y*l+n;g=c.x*g+c.y*k+m;c=c.x*h+c.y*l+n}b.Lk(e,d,g,c,f);null!== +a&&f.transform(a);return f};function Pp(a,b){var c=b.Lp;null===c&&(c=new Qp,c.port=b,c.node=b.part,b.Lp=c);return Rp(c,a)} +S.prototype.getLinkPoint=function(a,b,c,d,e,f,g,h){void 0===h&&(h=new J);if(c.eb()&&!Mp(c))return b.ja(c,h),h;if(c.Uc()){var k=Pp(this,b);if(null!==k){h.assign(k.dr);if(e&&this.routing===Sp){var l=Pp(this,g);if(null!==l&&k.Km=m.y&&a.y<=m.y+m.height?h.y=a.y:(c.Qf(Pc)||c.Qf(Tc))&&a.x>=m.x&&a.x<=m.x+m.width&&(h.x=a.x);J.free(k);J.free(l)}}return h}}c= +b.ja(Np(c),J.alloc());this.pointsCount>(e?6:2)?(g=d?this.i(1):this.i(this.pointsCount-2),e&&(g=Op(c,g.copy()))):(k=this.computeSpot(!d,g),f=J.alloc(),g=g.ja(Np(k),f),e&&(g=Op(c,g)),J.free(f));this.getLinkPointFromPoint(a,b,c,g,d,h);J.free(c);return h}; +S.prototype.getLinkDirection=function(a,b,c,d,e,f,g,h){a:if(d.eb())var k=d.x>d.y?d.x>1-d.y?0:d.x<1-d.y?270:315:d.x1-d.y?90:d.x<1-d.y?180:135:.5>d.x?225:.5(f?6:2)?(h=e?this.i(1):this.i(this.pointsCount-2),h=f?Op(k,h.copy()):c):(c=J.alloc(),h=h.ja(Kc,c),J.free(c));c=Math.abs(h.x-k.x)>Math.abs(h.y-k.y)?h.x>= +k.x?0:180:h.y>=k.y?90:270;J.free(k);k=c}d.Sb()&&g.Qd(a)&&(k+=180,360<=k&&(k-=360));if(Mp(d))return k;a=b.wj();if(0===a)return k;45<=a&&135>a?k+=90:135<=a&&225>a?k+=180:225<=a&&315>a&&(k+=270);360<=k&&(k-=360);return k};S.prototype.computeEndSegmentLength=function(a,b,c,d){if(null!==b&&c.Uc()&&(a=Pp(this,b),null!==a))return a.dw;a=d?this.fromEndSegmentLength:this.toEndSegmentLength;null!==b&&isNaN(a)&&(a=d?b.fromEndSegmentLength:b.toEndSegmentLength);isNaN(a)&&(a=10);return a}; +S.prototype.computeSpot=function(a,b){void 0===b&&(b=null);a?(a=b?b:this.fromPort,null===a?a=Kc:(b=this.fromSpot,b.Ib()&&(b=a.fromSpot),a=b===fd?Bc:b)):(a=b?b:this.toPort,null===a?a=Kc:(b=this.toSpot,b.Ib()&&(b=a.toSpot),a=b===fd?Bc:b));return a};function Mp(a){return a===Bc||.5===a.x&&.5===a.y}function Np(a){return.5===a.x&&.5===a.y?a:Kc} +S.prototype.computeOtherPoint=function(a,b){if(this.computeAdjusting()!==ng&&4p.width||n.y>p.height||0>n.x+n.width||0>n.y+n.height)){n=Gb.alloc();n.set(g); +if(m instanceof W)h=m.Lf(a,b,c,d,e,n);else if(this.path===m){if(m instanceof Uf)if(h=a,p=d,!1===m.pickable)h=!1;else if(n.multiply(m.transform),p)b:{var r=h,q=n;if(m.Uh(r,q))h=!0;else{if(void 0===q&&(q=m.transform,r.Te(m.actualBounds))){h=!0;break b}h=r.left;p=r.right;var u=r.top;r=r.bottom;var y=J.alloc(),x=J.alloc(),z=J.alloc(),B=Gb.alloc();B.set(q);B.xw(m.transform);B.eu();x.x=p;x.y=u;x.transform(B);y.x=h;y.y=u;y.transform(B);q=!1;Tn(m,y,x,z)?q=!0:(y.x=p,y.y=r,y.transform(B),Tn(m,y,x,z)?q=!0:(x.x= +h,x.y=r,x.transform(B),Tn(m,y,x,z)?q=!0:(y.x=h,y.y=u,y.transform(B),Tn(m,y,x,z)&&(q=!0))));Gb.free(B);J.free(y);J.free(x);J.free(z);h=q}}else h=m.Uh(h,n)}else h=El(m,a,d,n);h&&(p=m,null!==b&&(p=b(m)),p&&(null===c||c(p))&&e.add(p));Gb.free(n)}}}void 0===f&&Gb.free(g);return h||null!==this.background||null!==this.areaBackground}void 0===f&&Gb.free(g);return!1}; +S.prototype.computeCurve=function(){if(null===this.gg){var a=this.fromPort,b=this.isOrthogonal;this.gg=null!==a&&a===this.toPort&&!b}return this.gg?qg:this.curve};S.prototype.computeCorner=function(){if(this.curve===qg)return 0;var a=this.corner;if(isNaN(a)||0>a)a=10;return a}; +S.prototype.findMidLabel=function(){for(var a=this.path,b=this.$.j,c=b.length,d=0;dk?-Math.PI/2:Math.PI/2;else m=Math.atan(k/Math.abs(h)),0>h&&(m=Math.PI-m);g=b.x;var n=b.y;h=d.x-g;var p=d.y-n;k=Math.sqrt(h*h+p*p);K.da(h,0)?p=0>p?-Math.PI/2:Math.PI/2:(p=Math.atan(p/Math.abs(h)),0>h&&(p=Math.PI-p)); +l=k/l;m=p-m;this.Wc(a,b);for(a+=1;ak?-Math.PI/2:Math.PI/2:(k=Math.atan(k/Math.abs(h)),0>h&&(k=Math.PI-k)),h=k+m,b*=l,this.O(a,g+b*Math.cos(h),n+b*Math.sin(h)));this.Wc(c,d)}}return!0;case Dp:f=this.i(a);n=this.i(c);if(!f.Wa(b)||!n.Wa(d)){e=f.x;f=f.y;g=n.x;n=n.y;l=(g-e)*(g-e)+(n-f)*(n-f);h=b.x;m=b.y;k=d.x;p=d.y;var r=1;if(0!==k-h){var q=(p-m)/(k-h);r=Math.sqrt(1+1/(q*q))}else q=9E9;this.Wc(a,b);for(a+=1;ab?b+=360:360<=b&&(b-=360);0>d?d+=360:360<=d&&(d-=360);var g=d;b=315<=b||45>b?0:45<=b&&135>b?90:135<=b&&225>b?180:270;d=315<=d||45>d?0:45<=d&&135>d?90:135<=d&&225>d?180:270;var h=e.actualBounds.copy(),k=f.actualBounds.copy();if(h.o()&&k.o()){h.Pc(Vp,Vp);k.Pc(Vp,Vp);h.af(a);k.af(c);if(0===b)if(c.x>a.x||270===d&&c.ya.x||90===d&&c.y>a.y&&k.right>a.x){var l=new J(c.x,a.y);var m=new J(c.x,(a.y+c.y)/2);180===d?(l.x=this.computeMidOrthoPosition(a.x, +a.y,c.x,c.y,!1),m.x=l.x,m.y=c.y):270===d&&c.ya.y?(l.x=a.xk.bottom)?this.computeMidOrthoPosition(a.x,a.y,c.x,c.y,!1):k.right,m.x=l.x,m.y=c.y):0===d&&a.xk.top&&a.yh.bottom)180===d&&(k.ca(a)|| +h.ca(c))?l.y=this.computeMidOrthoPosition(a.x,a.y,c.x,c.y,!0):c.ya.y&&(180===d||270===d)&&(l.y=this.computeMidOrthoPosition(a.x,h.bottom,c.x,Math.min(c.y,k.top),!0)),m.x=c.x,m.y=l.y;if(l.y>h.top&&l.y=h.left&&c.x<=a.x||a.x<=k.right&&a.x>=c.x){if(90===d||270===d)l=new J(Math.max((a.x+c.x)/2,a.x),a.y),m=new J(l.x,c.y)}else l.y=270===d||(0===d||180===d)&&c.ya.y&&k.lefta.y?(l.x=a.x>k.right?this.computeMidOrthoPosition(a.x,a.y,k.right,c.y,!1):a.x>k.left&&(270===d&&a.yk.bottom)?this.computeMidOrthoPosition(a.x,a.y,c.x, +c.y,!1):k.left,m.x=l.x,m.y=c.y):180===d&&a.x>k.right&&a.y>k.top&&a.yh.bottom)0===d&&(k.ca(a)||h.ca(c))?l.y=this.computeMidOrthoPosition(a.x,a.y,c.x,c.y,!0):c.ya.y&&(0===d||270===d)&&(l.y=this.computeMidOrthoPosition(a.x,h.bottom, +c.x,Math.min(c.y,k.top),!0)),m.x=c.x,m.y=l.y;if(l.y>h.top&&l.y=a.x||a.x>=k.left&&a.x<=c.x){if(90===d||270===d)l=new J(Math.min((a.x+c.x)/2,a.x),a.y),m=new J(l.x,c.y)}else l.y=270===d||(0===d||180===d)&&c.ya.y||180===d&&c.xa.y||0===d&&c.x>a.x&&k.bottom>a.y)l=new J(a.x,c.y),m=new J((a.x+c.x)/2,c.y),270=== +d?(l.y=this.computeMidOrthoPosition(a.x,a.y,c.x,c.y,!0),m.x=c.x,m.y=l.y):180===d&&c.xa.x?(l.y=a.yk.right)?this.computeMidOrthoPosition(a.x,a.y,c.x,c.y,!0):k.bottom,m.x=c.x,m.y=l.y):90===d&&a.yk.left&&a.xh.right)270===d&&(k.ca(a)||h.ca(c))?l.x=this.computeMidOrthoPosition(a.x,a.y,c.x,c.y,!1):c.xa.x&&(270===d||180===d)&&(l.x=this.computeMidOrthoPosition(h.right,a.y,Math.min(c.x,k.left),c.y,!1)),m.x=l.x,m.y=c.y;if(l.x>h.left&&l.x=h.top&&c.y<=a.y||a.y<=k.bottom&&a.y>=c.y){if(0===d||180===d)l=new J(a.x,Math.max((a.y+c.y)/2,a.y)),m=new J(c.x,l.y)}else l.x=180===d||(90===d||270=== +d)&&c.xa.x&&k.top=a.x?(l.y=a.y>k.bottom?this.computeMidOrthoPosition(a.x,a.y,c.x,k.bottom,!0):a.y>k.top&&(180===d&&a.xk.right)?this.computeMidOrthoPosition(a.x, +a.y,c.x,c.y,!0):k.top,m.x=c.x,m.y=l.y):270===d&&a.y>k.bottom&&a.x>k.left&&a.xh.right)90===d&&(k.ca(a)||h.ca(c))?l.x=this.computeMidOrthoPosition(a.x,a.y,c.x,c.y,!1):c.xa.x&&(90===d||180===d)&&(l.x=this.computeMidOrthoPosition(h.right, +a.y,Math.min(c.x,k.left),c.y,!1)),m.x=l.x,m.y=c.y;if(l.x>h.left&&l.x=a.y||a.y>=k.top&&a.y<=c.y){if(0===d||180===d)l=new J(a.x,Math.min((a.y+c.y)/2,a.y)),m=new J(c.x,l.y)}else l.x=180===d||(90===d||270===d)&&c.x=Yp&&(Nk(u),h.Pc(u.Mq*u.Wy,u.Lq*u.Wy),Wp(u,a,b,r,d,h,!1),k=Xp(u,r.x,r.y));if(!u.abort&&kthis.pointsCount)0===b||180===b?(h.x=a.x,h.y=r.y):(h.x=r.x,h.y=a.y),this.O(2,h.x,h.y),this.m(3,h.x,h.y);else if(g=this.i(3),0===b||180===b)K.B(h.x,g.x)?(h=0===b?Math.max(h.x,a.x):Math.min(h.x,a.x),this.O(2,h,a.y),this.O(3,h,g.y)):K.B(h.y,g.y)?(Math.abs(a.y-h.y)<=u.Lq/2&&(this.O(2,h.x,a.y),this.O(3, +g.x,a.y)),this.m(2,h.x,a.y)):this.O(2,a.x,h.y);else if(90===b||270===b)K.B(h.y,g.y)?(h=90===b?Math.max(h.y,a.y):Math.min(h.y,a.y),this.O(2,a.x,h),this.O(3,g.x,h)):K.B(h.x,g.x)?(Math.abs(a.x-h.x)<=u.Mq/2&&(this.O(2,a.x,h.y),this.O(3,a.x,g.y)),this.m(2,a.x,h.y)):this.O(2,h.x,a.y);null!==c&&(a=this.i(1),g=this.i(2),a.x!==g.x&&a.y!==g.y?0===b||180===b?this.m(2,a.x,g.y):this.m(2,g.x,a.y):0===b||180===b?this.m(2,e.x,c.y):this.m(2,c.x,e.y));null!==y&&(0===d||180===d?this.Hf(f.x,y.y):this.Hf(y.x,f.y));b= +!0}else b=!1}}}else b=!1;b||(this.ke(l),this.ke(m))}};S.prototype.computeMidOrthoPosition=function(a,b,c,d,e){var f=0;!this.hasCurviness()||this.computeSpot(!0,this.fromPort).Uc()||this.computeSpot(!1,this.toPort).Uc()||(f=this.computeCurviness());return e?(b+d)/2+f:(a+c)/2+f}; +function gk(a){if(null===a.diagram||!a.isAvoiding||!yk(a.diagram))return!1;var b=a.points.j,c=b.length;if(4>c)return!1;a=zk(a.diagram,!0,a.containingGroup,null);for(var d=1;d$p&&Xp(b,m,n)!==l-1&&(Xp(b,c-h,d)===l-1?(e=180,m=c-h,n=d):Xp(b,c+h,d)===l-1?(e=0,m=c+h,n=d):Xp(b,c,d-k)===l-1?(e=270,m=c,n=d-k):Xp(b,c,d+k)===l-1&&(e=90,m=c,n=d+k));for(;l>$p&&Xp(b,m,n)===l-1;)c=m,d=n,0===e?m+=h:90===e?n+=k:180===e?m-=h:n-=k,--l;if(f){if(l>$p)if(180===e||0===e)c=Math.floor(c/h)*h+h/2;else if(90===e||270===e)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>$p&&(f=e,g=c,m=d,0===e?(f=90,m+=k):90===e?(f=180,g-=h):180===e?(f=270,m-=k):270===e&&(f=0,g+=h),Xp(b,g,m)===l-1?Zp(a,b,g,m,f,!1,f):(g=c,m=d,0===e?(f=270,m-=k):90===e?(f=0,g+=h):180===e?(f=90,m+=k):270===e&&(f=180,g-=h),Xp(b,g,m)===l-1&&Zp(a,b,g,m,f,!1,f)));a.Hf(c,d)} +S.prototype.lA=function(a){F&&w(a,J,S,"findClosestSegment:p");var b=a.x;a=a.y;for(var c=this.i(0),d=this.i(1),e=Ib(b,a,c.x,c.y,d.x,d.y),f=0,g=1;gb)return a.type=Gd,this.on=!0,a;var c=!1,d=this.diagram;null!==d&&Fp(this)&&d.hh.contains(this)&&(0!==this.km.width||0!==this.km.height)&&(c=!0);var e=this.i(0).copy(),f=e.copy();d=this.Fb.j;var g=this.computeCurve();if(g===qg&&3<=b&&!K.da(this.smoothness,0))if(3===b){var h=this.i(1);d=Math.min(e.x,h.x);var k=Math.min(e.y,h.y);h=this.i(2);d=Math.min(d,h.x);k=Math.min(k,h.y)}else{if(this.isOrthogonal)for(k=0;k=b&&(d=b-1),k=this.i(d),f.x=Math.min(k.x,f.x),f.y=Math.min(k.y,f.y);d=f.x;k=f.y}else{for(k=0;ky?q>r?(g.x=x-B,g.y=r-B,b.x=x+u,b.y= +r+u):(g.x=x-B,g.y=r+B,b.x=x+u,b.y=r-u):q>r?(g.x=x+B,g.y=r-B,b.x=x-u,b.y=r+u):(g.x=x+B,g.y=r+B,b.x=x-u,b.y=r-u));K.da(y,x)&&K.da(r,q)&&(r>p?(z>x?(g.x=x-B,g.y=r-B,b.x=x+u):(g.x=x+B,g.y=r-B,b.x=x-u),b.y=r+u):(z>x?(g.x=x-B,g.y=r+B,b.x=x+u):(g.x=x+B,g.y=r+B,b.x=x-u),b.y=r-u));if(K.da(y,x)&&K.da(x,z)||K.da(p,r)&&K.da(r,q))y=.5*(y+z),p=.5*(p+q),g.x=y,g.y=p,b.x=y,b.y=p;1===n?(e.x=.5*(c.x+l.x),e.y=.5*(c.y+l.y)):2===n&&K.da(c.x,this.i(0).x)&&K.da(c.y,this.i(0).y)&&(e.x=.5*(c.x+l.x),e.y=.5*(c.y+l.y));Td(h,e.x- +d,e.y-k,g.x-d,g.y-k,l.x-d,l.y-k);f.set(g);e.set(b);c=l}}f=c.x;c=c.y;e=this.i(this.pointsCount-1);0!==this.computeShortLength(!1)&&(e=aq(this,e.copy(),!1,Mb));f=.5*(f+e.x);c=.5*(c+e.y);Td(h,b.x-d,b.y-k,f-d,c-k,e.x-d,e.y-k)}else for(c=3;c=b&&(c=b-1),e=this.i(c-1),g=this.i(c),c===b-1&&0!==this.computeShortLength(!1)&&(g=aq(this,g.copy(),!1,Mb)),Td(h,f.x-d,f.y-k,e.x-d,e.y-k,g.x-d,g.y-k);else{f=J.alloc();f.assign(this.i(0));e=J.alloc();e.assign(f);g=this.computeCorner();n=1;for(l= +0;n=b-1){if(!f.A(m))0!==this.computeShortLength(!1)&&(m=aq(this,m.copy(),!1,Mb)),dq(this,h,-d,-k,f,m,c);else if(0===l)for(n=1;nf.x?q=p.x-r:q=p.x+r;u.y>p.y?G=p.y+ +z:G=p.y-z;dq(this,h,n,y,f,new J(q,B),x);Ud(h,p.x+n,p.y+y,D+n,G+y);f.h(D,G)}else K.B(f.x,p.x)&&K.B(p.y,u.y)?(r=Math.min(g,Math.abs(p.y-e.y)/2),r=z=Math.min(r,Math.abs(u.x-p.x)/2),K.B(z,0)?(dq(this,h,n,y,f,p,x),f.assign(p)):(q=p.x,B=p.y,D=q,G=B,p.y>f.y?B=p.y-r:B=p.y+r,u.x>p.x?D=p.x+z:D=p.x-z,dq(this,h,n,y,f,new J(q,B),x),Ud(h,p.x+n,p.y+y,D+n,G+y),f.h(D,G))):(dq(this,h,n,y,f,p,x),f.assign(p));e.assign(m);n=l}J.free(f)}Xd=h}else h=this.i(1).copy(),h.x-=d,h.y-=k,0!==this.computeShortLength(!0)&&(e=aq(this, +e,!0,f)),0!==this.computeShortLength(!1)&&(h=aq(this,h,!1,f)),a.type=Gd,a.startX=e.x,a.startY=e.y,a.endX=h.x,a.endY=h.y;this.on=!0;return a};function cq(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 K.da(a,0)?b:K.da(b,0)?a:Math.sqrt(a*a+b*b)} +function aq(a,b,c,d){var e=a.pointsCount;if(2>e)return b;if(c){var f=a.i(1);c=f.x-d.x;f=f.y-d.y;d=cq(b.x,b.y,c,f);if(0===d)return b;e=2===e?.5*d:d;a=a.computeShortLength(!0);a>e&&(a=e);e=a*(f-b.y)/d;b.x+=a*(c-b.x)/d;b.y+=e}else{f=a.i(e-2);c=f.x-d.x;f=f.y-d.y;d=cq(b.x,b.y,c,f);if(0===d)return b;e=2===e?.5*d:d;a=a.computeShortLength(!1);a>e&&(a=e);e=a*(b.y-f)/d;b.x-=a*(b.x-c)/d;b.y-=e}return b} +function bq(a,b,c,d){for(var e=a.pointsCount,f=b;K.da(b.x,f.x)&&K.da(b.y,f.y);){if(c>=e)return e-1;f=a.i(c++)}if(!K.da(b.x,f.x)&&!K.da(b.y,f.y))return c-1;for(var g=f;K.da(b.x,f.x)&&K.da(f.x,g.x)&&(!d||(b.y>=f.y?f.y>=g.y:f.y<=g.y))||K.da(b.y,f.y)&&K.da(f.y,g.y)&&(!d||(b.x>=f.x?f.x>=g.x:f.x<=g.x));){if(c>=e)return e-1;g=a.i(c++)}return c-2}S.prototype.computeJumpLength=function(){return 10}; +function dq(a,b,c,d,e,f,g){if(!g&&Fp(a)){g=a.computeJumpLength();var h=g/2,k=[],l=0;a.isVisible()&&(l=eq(a,e,f,k));if(0n-g)l--,n=Math.max(m-h,f.x);else break;m=f.y-g+d;n+=c;r=f.y+d;a.curve===mg?Pd(b,n,r,!1):Td(b,p,m,n,m,n,r)}else if(K.B(e.x,f.x))if(e.ym-g)l--,m=Math.max(n-h,f.y);else break;n=f.x-g+c;r=f.x+c;m+=d;a.curve===mg?Pd(b,r,m,!1):Td(b,n,p,n,m,r,m)}}b.lineTo(f.x+c,f.y+d)} +function eq(a,b,c,d){var e=a.diagram;if(null===e||b.A(c))return 0;for(e=e.layers;e.next();){var f=e.value;if(null!==f&&f.visible){f=f.Ja.j;for(var g=f.length,h=0;hg.x&&m.x>=l.x||l.xg.y&&m.y>=l.y||l.yq&&Math.min(g,y)n&&!K.B(g,y)){h.x=q;h.y=n;m=!0;break a}}else if(!K.B(n,r)&& +K.B(g,y)&&Math.min(n,r)g&&Math.min(q,u)m&&!K.B(q,u)){h.x=m;h.y=g;m=!0;break a}h.x=0;h.y=0;m=!1}m&&(e?c.push(h.x):c.push(h.y));g=l}J.free(h)}function Fp(a){a=a.curve;return a===lg||a===mg}function Jp(a,b){if(b||Fp(a))b=a.diagram,null===b||b.animationManager.isTicking||b.hh.contains(a)||0===a.km.width&&0===a.km.height||b.hh.add(a,a.km.copy())} +S.prototype.ar=function(a){var b=this.layer;if(null!==b&&b.visible&&!b.isTemporary){var c=b.diagram;if(null!==c&&!c.animationManager.isTicking){var d=!1;for(c=c.layers;c.next();){var e=c.value;if(e.visible)if(e===b){d=!0;var f=!1;e=e.Ja.j;for(var g=e.length,h=0;ha&&za(a,">= 0",S,"fromEndSegmentLength"),this.S.mh=a,this.g("fromEndSegmentLength",b,a),this.Za())}},fromShortLength:{configurable:!0,get:function(){return null!==this.S?this.S.nh:NaN},set:function(a){this.Qc();var b=this.S.nh;b!==a&&(F&&A(a,"number",S,"fromShortLength"),this.S.nh= +a,this.jc(),this.g("fromShortLength",b,a))}},toSpot:{configurable:!0,get:function(){return null!==this.S?this.S.Nh:fd},set:function(a){this.Qc();var b=this.S.Nh;b.A(a)||(F&&w(a,N,S,"toSpot"),a=a.K(),this.S.Nh=a,this.g("toSpot",b,a),(b.Uc()||a.Uc())&&null!==this.toNode&&mp(this.toPort),this.Za())}},toEndSegmentLength:{configurable:!0,get:function(){return null!==this.S?this.S.Lh:NaN},set:function(a){this.Qc();var b=this.S.Lh;b!==a&&(F&&A(a,"number",S,"toEndSegmentLength"), +0>a&&za(a,">= 0",S,"toEndSegmentLength"),this.S.Lh=a,this.g("toEndSegmentLength",b,a),this.Za())}},toShortLength:{configurable:!0,get:function(){return null!==this.S?this.S.Mh:NaN},set:function(a){this.Qc();var b=this.S.Mh;b!==a&&(F&&A(a,"number",S,"toShortLength"),this.S.Mh=a,this.jc(),this.g("toShortLength",b,a))}},isLabeledLink:{configurable:!0,get:function(){return null===this.td?!1:0=d&&(f=d-1);var h=this.i(f-1),k=this.i(f);K.Im(e.x,e.y,g.x,g.y,h.x,h.y,k.x,k.y,.5,a);b=Math.min(k.x,b);c=Math.min(k.y,c);e=k}else for(e=this.i(0),f=this.i(1),b=Math.min(e.x,f.x),c=Math.min(e.y,f.y),a.h(e.x,e.y,0,0),a.af(f),e=2;ed&&(d=-d)):K.da(d.y,e.y)?(d=e.x-d.x,0>d&&(d=-d)):d=Math.sqrt(d.Ve(e));a.push(d)}}return this.os}},flattenedTotalLength:{configurable:!0, +enumerable:!0,get:function(){var a=this.dv;if(isNaN(a)){for(var b=this.flattenedLengths,c=b.length,d=a=0;d=this.pointsCount?0:this.isOrthogonal||!Mp(this.computeSpot(!0))?1:0}},lastPickIndex:{configurable:!0,get:function(){var a=this.pointsCount;return 0=== +a?0:2>=a?a-1:this.isOrthogonal||!Mp(this.computeSpot(!1))?a-2:a-1}},adjusting:{configurable:!0,get:function(){return this.jl},set:function(a){var b=this.jl;b!==a&&(F&&a!==ng&&a!==Bp&&a!==Cp&&a!==Dp&&v("Link.adjusting can only be set to Link.None, Link.End, LInk.Scale, or Link.Stretch, not: "+a),this.jl=a,this.g("adjusting",b,a))}},corner:{configurable:!0,get:function(){return this.Un},set:function(a){var b=this.Un;b!==a&&(F&&A(a,"number",S,"corner"),this.Un=a,this.jc(), +this.g("corner",b,a))}},curve:{configurable:!0,get:function(){return this.Wn},set:function(a){var b=this.Wn;b!==a&&(F&&a!==ng&&a!==qg&&a!==mg&&a!==lg&&v("Link.curve can only be set to Link.None, Link.Bezier, LInk.JumpGap, or Link.JumpOver, not: "+a),this.Wn=a,this.Za(),this.jc(),Jp(this,b===mg||b===lg||a===mg||a===lg),this.g("curve",b,a))}},curviness:{configurable:!0,get:function(){return this.Xn},set:function(a){var b=this.Xn;b!==a&&(F&&A(a,"number",S,"curviness"),this.Xn= +a,this.Za(),this.jc(),this.g("curviness",b,a))}},routing:{configurable:!0,get:function(){return this.pk},set:function(a){var b=this.pk;b!==a&&(F&&a!==Ap&&a!==iq&&a!==jq&&a!==Sp&&v("Link.routing can only be set to Link.Normal, Link.Orthogonal, LInk.AvoidsNodes, not: "+a),this.pk=a,this.gg=null,this.Za(),Jp(this,2===(b.value&2)||2===(a.value&2)),this.g("routing",b,a))}},smoothness:{configurable:!0,get:function(){return this.mq},set:function(a){var b=this.mq;b!==a&&(F&&A(a, +"number",S,"smoothness"),this.mq=a,this.jc(),this.g("smoothness",b,a))}},key:{configurable:!0,get:function(){var a=this.diagram;if(null!==a&&a.model.Cj())return a.model.bc(this.data)}}});S.prototype.invalidateOtherJumpOvers=S.prototype.ar;S.prototype.findClosestSegment=S.prototype.lA;S.prototype.updateRoute=S.prototype.Jj;S.prototype.invalidateRoute=S.prototype.Za;S.prototype.rollbackRoute=S.prototype.Mw;S.prototype.commitRoute=S.prototype.Jf;S.prototype.startRoute=S.prototype.di; +S.prototype.clearPoints=S.prototype.Bk;S.prototype.removePoint=S.prototype.Iw;S.prototype.addPointAt=S.prototype.Hf;S.prototype.addPoint=S.prototype.ke;S.prototype.insertPointAt=S.prototype.m;S.prototype.insertPoint=S.prototype.QA;S.prototype.setPointAt=S.prototype.O;S.prototype.setPoint=S.prototype.Wc;S.prototype.getPoint=S.prototype.i;S.prototype.getOtherPort=S.prototype.HA;S.prototype.getOtherNode=S.prototype.Xq; +var Kp=null,Lp=null,Ap=new E(S,"Normal",1),iq=new E(S,"Orthogonal",2),jq=new E(S,"AvoidsNodes",6),Sp=new E(S,"AvoidsNodesStraight",7),ng=new E(S,"None",0),qg=new E(S,"Bezier",9),mg=new E(S,"JumpGap",10),lg=new E(S,"JumpOver",11),Bp=new E(S,"End",17),Cp=new E(S,"Scale",18),Dp=new E(S,"Stretch",19),pn=new E(S,"OrientAlong",21),hn=new E(S,"OrientPlus90",22),kn=new E(S,"OrientMinus90",23),Ep=new E(S,"OrientOpposite",24),qn=new E(S,"OrientUpright",25),jn=new E(S,"OrientPlus90Upright",26),ln=new E(S,"OrientMinus90Upright", +27),mn=new E(S,"OrientUpright45",28),Up=16,Tp=14,Vp=8;S.className="Link";S.Normal=Ap;S.Orthogonal=iq;S.AvoidsNodes=jq;S.AvoidsNodesStraight=Sp;S.None=ng;S.Bezier=qg;S.JumpGap=mg;S.JumpOver=lg;S.End=Bp;S.Scale=Cp;S.Stretch=Dp;S.OrientAlong=pn;S.OrientPlus90=hn;S.OrientMinus90=kn;S.OrientOpposite=Ep;S.OrientUpright=qn;S.OrientPlus90Upright=jn;S.OrientMinus90Upright=ln;S.OrientUpright45=mn;S.EndSegmentStep=8;S.CurvinessStart=Up;S.SpacingMin=Tp;S.OrthoShortCut=Vp;S.AvoidanceCell=8;S.AvoidanceLimit=999; +function hq(a,b,c,d){eb(this);this.Ce=this.vs=!1;this.nu=a;this.bz=b;this.zw=c;this.cz=d;this.links=[]}hq.prototype.Rm=function(){if(!this.vs){var a=this.links;0=a.width||0>=a.height)){var b=a.y,c=a.x+a.width,d=a.y+a.height;this.Gd=Math.floor((a.x-this.lc)/this.lc)*this.lc;this.Hd=Math.floor((b-this.mc)/this.mc)*this.mc;this.ep=Math.ceil((c+2*this.lc)/this.lc)*this.lc;this.fp=Math.ceil((d+2*this.mc)/this.mc)*this.mc;a=1+(Math.ceil((this.ep-this.Gd)/this.lc)|0);b=1+(Math.ceil((this.fp-this.Hd)/this.mc)|0);if(null===this.Xb||this.jj=$p&&(c[d]=kq)} +Hk.prototype.Pk=function(a,b,c,d){if(a>this.ep||a+cthis.fp||b+da&&(c+=a,a=0);0>b&&(e+=b,b=0);if(0>c||0>e)return!0;d=Math.min(a+c-1,this.jj)|0;for(c=Math.min(b+e-1,this.kj)|0;a<=d;a++){e=this.Xb[a];for(var f=b;f<=c;f++)if(e[f]===Pk)return!1}return!0}; +function lq(a,b,c,d,e,f,g,h,k){if(!(bg||ck)){var l=b|0;var m=c|0;var n=a.Xb[l][m];if(n>=$p&&n=a.Xb[l][m]);)a.Xb[l][m]=n,n+=1,e?m+=d:l+=d;l=e?m:l;if(e)if(0l;c+=d)lq(a,b,c,1,!e,f,g,h,k),lq(a,b,c,-1,!e,f,g,h,k);else if(0l;b+=d)lq(a,b,c,1,!e,f,g,h,k),lq(a,b,c,-1,!e,f,g,h, +k)}}function mq(a,b,c,d,e,f,g,h,k){b|=0;c|=0;var l=Pk,m=$p;for(a.Xb[b][c]=m;l===Pk&&b>f&&bh&&cf&&bh&&c=Math.abs(h-l)&&1>=Math.abs(k-m))a.abort=!0;else{var n=f.x;d=f.y;b=f.x+f.width;var p=f.y+f.height;n-=a.Gd;n/=a.lc;d-=a.Hd;d/=a.mc;b-=a.Gd;b/=a.lc;p-=a.Hd;p/=a.mc;f=Math.max(0,Math.min(a.jj,n|0));b=Math.min(a.jj,Math.max(0,b|0));n=Math.max(0,Math.min(a.kj,d|0));p=Math.min(a.kj,Math.max(0,p|0));d=a.Xb;h|=0;k|=0;l|=0;m|= +0;var r=0===c||90===c?1:-1;c=90===c||270===c;d[h][k]===Pk?(mq(a,h,k,r,c,f,b,n,p),mq(a,h,k,1,!c,f,b,n,p),mq(a,h,k,-1,!c,f,b,n,p)):mq(a,h,k,r,c,h,k,h,k);d[l][m]===Pk?(nq(a,l,m,0===e||90===e?1:-1,90===e||270===e,f,b,n,p),nq(a,l,m,1,!(90===e||270===e),f,b,n,p),nq(a,l,m,-1,!(90===e||270===e),f,b,n,p)):nq(a,l,m,r,c,l,m,l,m);c=Ma();if(g&&oq(a,l,m,e,h,k,c)){if(c[0]!==l||c[1]!==m)c.unshift(m),c.unshift(l);if(c[c.length-2]!==h||c[c.length-1]!==k)c.push(h),c.push(k);a=$p;e=c[c.length-2];g=c[c.length-1];d[e][g]= +a++;for(f=c.length-4;0<=f;f-=2)for(e=c[f+2],g=c[f+3],b=c[f],l=c[f+1];b>e?e++:bg?g++:le)m--;else break;else if(n>f)n--;else break;var p=h[m][n];if(0===p||p===pq)break;k=m;l=n}for(;;){m=d;n=k;p=l;0===d?pf&&(m=270,p--):90===d?ne&&(m=180,n--):180===d?pf&&(m=270,p--):ne&&(m=180,n--);n=h[n][p];if(m!==d&&0!==n&&n!==pq){g.push(k);g.push(l);if(oq(a,k,l, +m,e,f,g))return!0;g.pop();g.pop()}h[k][l]=pq;if(0===d){if(k===b)return!1;k--}else if(90===d){if(l===c)return!1;l--}else if(180===d){if(k===b)return!1;k++}else{if(l===c)return!1;l++}}} +na.Object.defineProperties(Hk.prototype,{bounds:{configurable:!0,get:function(){return new L(this.Gd,this.Hd,this.ep-this.Gd,this.fp-this.Hd)}},Mq:{configurable:!0,get:function(){return this.lc},set:function(a){0=c?180:0}a=180*Math.atan2(a.height,a.width)/Math.PI;switch(b){case 3:return c>a&&c<=180+a?180:270;case 5:return c>180-a&&c<=360-a?270:0;case 12:return c>a&&c<=180+a?90:0;case 10:return c>180-a&&c<=360-a?180:90;case 7:return 90180+a&&c<=360-a?270:0;case 13:return 180a&&180>=c?90:0;case 14:return c> +a&&c<=180-a?90:c>180-a&&270>=c?180:0;case 11:return c>180-a&&c<=180+a?180:c>180+a?270:90}d&&15!==b&&(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}Qp.prototype.Rm=function(){this.le.length=0}; +function Rp(a,b){var c=a.le;if(0===c.length){a:if(!a.fr){c=a.fr;a.fr=!0;var d=null,e=a.node,f=e instanceof If?e:null;if(null===f||f.isSubGraphExpanded)var g=e.isTreeExpanded?e.findLinksConnected(a.port.portId):e.Fy();else{if(!f.actualBounds.o()){a.fr=c;break a}d=f;g=d.fw()}f=a.le.length=0;var h=a.port.ja(Ec,J.alloc()),k=a.port.ja(Oc,J.alloc());e=L.allocAt(h.x,h.y,0,0);e.af(k);J.free(h);J.free(k);h=J.allocAt(e.x+e.width/2,e.y+e.height/2);k=a.port.wj();for(g=g.iterator;g.next();){var l=g.value;if(l.isVisible()&& +l.fromPort!==l.toPort){var m=l.fromPort===a.port||null!==l.fromNode&&l.fromNode.Qd(d),n=l.computeSpot(m,a.port);if(n.Uc()){var p=m?l.toPort:l.fromPort;if(null!==p&&(m=p.part,null!==m)){var r=m.findVisibleNode();null!==r&&r!==m&&(m=r,p=m.port);m=l.computeOtherPoint(m,p);p=h.Va(p.ja(Kc));r=h.Va(m);p+=(r-p)/360;p-=k;0>p?p+=360:360<=p&&(p-=360);n=qq(e,n,p,l.isOrthogonal);0===n?(n=4,180p&&(p+=360));r=a.le[f];void 0===r?(r=new rq(l,p,n),a.le[f]= +r):(r.link=l,r.angle=p,r.Gc=n);r.Cw.set(m);f++}}}}J.free(h);a.le.sort(Qp.prototype.l);k=a.le.length;d=-1;for(f=h=0;fMath.abs(u)?(z=Math.abs(u)/p,p=Math.abs(u)):z=1;break;case 2:r>Math.abs(B)?(z=Math.abs(B)/r,r=Math.abs(B)):z=1;break;case 1:n>Math.abs(u)?(z=Math.abs(u)/n,n=Math.abs(u)):z=1;break;default:case 4:m> +Math.abs(B)?(z=Math.abs(B)/m,m=Math.abs(B)):z=1}x=0}var M=D.dr;if(d===xp){D=D.link.computeThickness();D*=z;M.set(G);switch(q){case 8:M.x=G.x+u/2+p/2-x-D/2;break;case 2:M.y=G.y+B/2+r/2-x-D/2;break;case 1:M.x=G.x+u/2-n/2+x+D/2;break;default:case 4:M.y=G.y+B/2-m/2+x+D/2}x+=D}else{var Y=.5;d===jp&&(Y=(D.Yq+1)/(D.Km+1));M.x=G.x+u*Y;M.y=G.y+B*Y}}}J.free(h);J.free(k);J.free(g);J.free(l);G=a.le;for(f=0;fb.Gc?1:a.angleb.angle?1:0}; +Qp.prototype.computeEndSegmentLength=function(a){var b=a.link,c=b.computeEndSegmentLength(this.node,this.port,Bc,b.fromPort===this.port),d=a.Yq;if(0>d)return c;var e=a.Km;if(1>=e||!b.isOrthogonal)return c;b=a.Cw;var f=a.dr;if(2===a.Gc||8===a.Gc)d=e-1-d;return((a=2===a.Gc||4===a.Gc)?b.y=b-1?(f=0,d=c,e+=g+20,g=0):f++}}; +Ni.prototype.doMinimalNetworkLayout=function(){var a=Math.ceil(Math.sqrt(this.network.vertexes.count));this.arrangementOrigin=this.initialOrigin(this.arrangementOrigin);for(var b=this.arrangementOrigin.x,c=b,d=this.arrangementOrigin.y,e=0,f=0,g=this.network.vertexes.iterator;g.next();){var h=g.value.node;if(!(null===h||h instanceof S)&&(uq(h),this.bi(h))){var k=h.measuredBounds,l=k.width;k=k.height;h.moveTo(c,d);h instanceof If&&(h.bi=!1);c+=Math.max(l,50)+20;f=Math.max(f,Math.max(k,50));e>=a-1?(e= +0,c=b,d+=f+20,f=0):e++}}};Ni.prototype.bi=function(a){return!a.location.o()||a instanceof If&&a.bi?!0:!1};function tq(a,b,c,d,e,f,g,h){for(c=c.iterator;c.next();){var k=c.value;d&&!k.isTopLevel||null!==e&&!e(k)||!k.canLayout()||(f&&k instanceof V?k.isLinkLabel||(k instanceof If?null===k.layout?tq(a,b,k.memberParts,!1,e,f,g,h):(uq(k),b.add(k)):(uq(k),b.add(k))):g&&k instanceof S?b.add(k):!h||!k.Tc()||k instanceof V||(uq(k),b.add(k)))}} +function uq(a){var b=a.actualBounds;(0===b.width||0===b.height||isNaN(b.width)||isNaN(b.height))&&a.Ya()}Ni.prototype.yj=function(a,b){var c=this.boundsComputation;if(null!==c)return b||(b=new L),c(a,this,b);if(!b)return a.actualBounds;b.set(a.actualBounds);return b}; +Ni.prototype.qy=function(a){var b=new I;a instanceof R?(tq(this,b,a.nodes,!0,null,!0,!0,!0),tq(this,b,a.links,!0,null,!0,!0,!0),tq(this,b,a.parts,!0,null,!0,!0,!0)):a instanceof If?tq(this,b,a.memberParts,!1,null,!0,!0,!0):tq(this,b,a.iterator,!1,null,!0,!0,!0);return b}; +Ni.prototype.initialOrigin=function(a){var b=this.group;if(null!==b){var c=b.position.copy();(isNaN(c.x)||isNaN(c.y))&&c.set(a);b=b.placeholder;null!==b&&(c=b.ja(Ec),(isNaN(c.x)||isNaN(c.y))&&c.set(a),a=b.padding,c.x+=a.left,c.y+=a.top);return c}return a};Ni.prototype.mayUseWorker=function(){return this.mayUseWorkerFunction?this.mayUseWorkerFunction(this):!1};Ni.prototype.workerLayout=function(){return!1}; +function vq(a,b){if(null!==a.workerStateChanged){var c={key:a.group?a.group.key:null};void 0!==b&&(c.time=b);null!==a.rk&&(c.running=wq(a.rk));null!==a.Kg&&(c.waiting=wq(a.Kg));a.workerStateChanged(c,a)}}function wq(a){return{vertexes:a.vertexes.count,edges:a.edges.count}}Ni.prototype.Qz=function(){var a=xq(this.constructor);a&&(null!==a.bf&&a.bf.terminate(),a.bf=null,a.Tm.iteratorValues.each(function(a){a.Jt=!1;a.rk=null;a.Kg=null;a.yt=!1;vq(a)}),a.Tm.clear())}; +function yq(a,b){var c=xq(a);if(c){if(b)for(var d in b)c[d]=b[d]}else throw Error("Unknown Layout class: "+a);}function xq(a){var b=null;if("function"===typeof a){if(b=zq.get(a),!b){var c=Pa(a);b=zq.get(c);b||(b=new Aq,b.Yv=a,b.name=c,b.l=a.name,b.Ry=Bq,zq.set(c,b),zq.set(a,b),zq.set(a.name,b))}}else"string"===typeof a&&(b=zq.get(a));return b} +Ni.prototype.kx=function(){if("undefined"===typeof Worker||!Cq||"undefined"===typeof self||"undefined"!==typeof self.DedicatedWorkerGlobalScope)return!1;if(!this.mayUseWorker())return this.Jt&&(this.yt=!0,this.Kg=this.rk=null,vq(this)),!1;var a=xq(this.constructor);if(null===a)return!1;null===a.bf&&(a.bf=new Worker(Cq),a.bf.onerror=function(a){a.preventDefault();Ea("Worker Error at: "+a.filename+" "+a.lineno+" "+a.colno+"\n "+a.message)},a.bf.l=function(a){Ea("Worker serialization error: "+a)},a.bf.onmessage= +function(b){var c=b.data;if("_GoJS"===c._GoJS)if(c.version&&R.version&&c.version!==R.version)Ea("Failure: GoJS v"+R.version+" Worker v"+c.version);else if(b=a.Tm.get(c.id)){a.Tm.remove(c.id);b.Jt=!1;b.rk=null;if(b.yt)b.yt=!1,b.Kg=null;else{var d=Dq(b,c,!1);b.network=d;b.updateParts();b.network=null;b.isValidLayout=!0}vq(b,c.time);c=b.Kg;if(null!==c)b.Kg=null;else for(d=a.Tm.iteratorValues;d.next();){var e=d.value;c=e.Kg;if(null!==c){e.Kg=null;break}}null!==c&&Eq(b,c)}},a.bf.postMessage({_GoJS:"_GoJS", +url:a.Ry}),Array.isArray(a.scripts)&&a.scripts.forEach(function(b){a.bf.postMessage({_GoJS:"_GoJS",url:b})}),a.bf.postMessage({_GoJS:"_GoJS",version:-1}));null!==this.rk?this.Kg=this.network:Eq(this,this.network);vq(this);this.doMinimalNetworkLayout();this.network=null;return this.isValidLayout=!0};function Eq(a,b){a.Jt=!0;var c=xq(a.constructor),d=Fq(a,b,!0);d._GoJS="_GoJS";c.bf.postMessage(d);c.Tm.set(ob(a),a);a.rk=b} +function Fq(a,b,c){a.onNetworkSerialization(1,c,b,null);var d={};a.serializeLayoutProperties(d,c);var e=[];b.vertexes.each(function(a){var b={};a.serializeVertexProperties(b,c);e.push(b)});var f=[];b.edges.each(function(a){var b={};a.serializeEdgeProperties(b,c);f.push(b)});d={id:c?ob(a):a.id,layout:Pa(a.constructor),p:d,DB:e,jA:f};a.onNetworkSerialization(2,c,b,d);return d} +function Dq(a,b,c){c&&(a.id=b.id);var d=a.diagram,e=a.createNetwork();a.onNetworkSerialization(3,c,e,b);var f=b.DB,g=new Bb;f&&f.forEach(function(a){var b=null;null===a.key||null===d||c||(b=d.Hb(a.key));null!==b?b=e.zk(b):(b=e.createVertex(),e.Ng(b));c&&null!==a.key&&(b.data={Oi:a.key});g.set(a.id,b)});var h=b.jA,k=new Bb;h&&h.forEach(function(a){var b=null;null===a.key||null===d||c||(b=d.findLinkForKey(a.key));var f=e.createEdge();e.Gm(f);f.link=b;c&&null!==a.key&&(f.data={Oi:a.key});k.set(a.id, +f)});f&&f.forEach(function(a){var b=g.get(a.id);b&&b.Pq(a,g,k,c)});h&&h.forEach(function(a){var b=k.get(a.id);b&&b.deserializeEdgeProperties(a,g,k,c)});a.deserializeLayoutProperties(b.p,g,k,c,e);a.onNetworkSerialization(4,c,e,b);return e}Ni.prototype.onNetworkSerialization=function(){}; +na.Object.defineProperties(Ni.prototype,{diagram:{configurable:!0,get:function(){return this.C},set:function(a){null!==a&&w(a,R,Ni,"diagram");this.C=a}},group:{configurable:!0,get:function(){return this.w},set:function(a){this.w!==a&&(null!==a&&w(a,If,Ni,"group"),this.w=a,null!==a&&(this.C=a.diagram))}},isOngoing:{configurable:!0,get:function(){return this.Ko},set:function(a){this.Ko!==a&&(A(a,"boolean",Ni,"isOngoing"),this.Ko=a)}},isInitial:{configurable:!0, +enumerable:!0,get:function(){return this.Ki},set:function(a){A(a,"boolean",Ni,"isInitial");this.Ki=a;a||(this.Oo=!0)}},isViewportSized:{configurable:!0,get:function(){return this.Po},set:function(a){this.Po!==a&&(A(a,"boolean",Ni,"isViewportSized"),(this.Po=a)&&this.D())}},isRouting:{configurable:!0,get:function(){return this.Mo},set:function(a){this.Mo!==a&&(A(a,"boolean",Ni,"isRouting"),this.Mo=a)}},isRealtime:{configurable:!0,get:function(){return this.Lo}, +set:function(a){this.Lo!==a&&(null!==a&&A(a,"boolean",Ni,"isRealtime"),this.Lo=a)}},isValidLayout:{configurable:!0,get:function(){return this.Oo},set:function(a){this.Oo!==a&&(A(a,"boolean",Ni,"isValidLayout"),this.Oo=a,a||(a=this.diagram,null!==a&&(a.Zg=!0)))}},network:{configurable:!0,get:function(){return this.l},set:function(a){this.l!==a&&(null!==a&&w(a,sq,Ni,"network"),this.l=a,null!==a&&(a.layout=this))}},boundsComputation:{configurable:!0,get:function(){return this.In}, +set:function(a){this.In!==a&&(null!==a&&A(a,"function",Ni,"boundsComputation"),this.In=a,this.D())}},arrangementOrigin:{configurable:!0,get:function(){return this.An},set:function(a){w(a,J,Ni,"arrangementOrigin");this.An.A(a)||(this.An.assign(a),this.D())}},id:{configurable:!0,get:function(){return this.L},set:function(a){this.L=a}},mayUseWorkerFunction:{configurable:!0,get:function(){return this.gp},set:function(a){this.gp!==a&&(null!==a&&A(a,"function", +Ni,"mayUseWorkerFunction"),this.gp=a)}},workerStateChanged:{configurable:!0,get:function(){return this.Dq},set:function(a){this.Dq!==a&&(null!==a&&A(a,"function",Ni,"workerStateChanged"),this.Dq=a)}}});Ni.prototype.useWorker=Ni.prototype.kx;Ni.declareWorkerLayout=yq;Ni.prototype.cancelWorker=Ni.prototype.Qz;Ni.prototype.collectParts=Ni.prototype.qy;Ni.prototype.getLayoutBounds=Ni.prototype.yj;Ni.prototype.invalidateLayout=Ni.prototype.D; +var zq=new Bb,Bq="object"===typeof qa.document&&qa.document.currentScript?qa.document.currentScript.src:"",Cq="undefined"!==typeof URL&&"function"===typeof URL.createObjectURL&&"function"===typeof Blob?URL.createObjectURL(new Blob(["self.onmessage=function(e){if(e.data.url){\nimportScripts(e.data.url);}}"],{type:"text/javascript"})):"";Ni.className="Layout";Ni.GoJSScriptURL=Bq;Ni.declareWorkerLayout=yq; +"undefined"!==typeof self&&"undefined"!==typeof self.DedicatedWorkerGlobalScope&&"undefined"!==typeof self&&"undefined"!==typeof self.DedicatedWorkerGlobalScope&&(self.onmessage=function(a){a=a.data;if("_GoJS"===a._GoJS)if(a.url)importScripts(a.url);else if(a.version)self.postMessage({_GoJS:"_GoJS",version:R.version},void 0);else{var b=performance.now(),c=null;a.layout&&(c=xq(a.layout));var d=null;c&&c.Yv&&(d=new c.Yv);if(!d)throw Error("no registered Worker Layout: "+a.layout);d.network=Dq(d,a,!0); +d.workerLayout=function(){var a=Fq(d,d.network,!1);a._GoJS="_GoJS";a.time=performance.now()-b;self.postMessage(a,void 0);return!0};d.doLayout(new H)}});function Aq(){this.Yv=null;this.Ry=this.l=this.name="";this.scripts=[];this.bf=null;this.Tm=new Bb}function sq(a){eb(this);F&&!a&&v("LayoutNetwork constructor requires non-null Layout argument");this.qc=a;this.Ff=new I;this.ve=new I;this.ou=new Bb;this.ju=new Bb} +sq.prototype.clear=function(){if(this.Ff)for(var a=this.Ff.iterator;a.next();)a.value.clear();if(this.ve)for(a=this.ve.iterator;a.next();)a.value.clear();this.Ff=new I;this.ve=new I;this.ou=new Bb;this.ju=new Bb}; +sq.prototype.toString=function(a){void 0===a&&(a=0);var b="LayoutNetwork"+(null!==this.layout?"("+this.layout.toString()+")":"");if(0>=a)return b;b+=" vertexes: "+this.Ff.count+" edges: "+this.ve.count;if(1b?1:0):1:null!==b?-1:0} +na.Object.defineProperties(Gq.prototype,{sourceEdgesArrayAccess:{configurable:!0,get:function(){return this.zd._dataArray}},destinationEdgesArrayAccess:{configurable:!0,get:function(){return this.Nd._dataArray}},data:{configurable:!0,get:function(){return this.tb},set:function(a){this.tb=a;if(null!==a&&a.bounds){var b=a.bounds;a=b.x;var c=b.y,d=b.width;b=b.height;this.w.h(d/2,b/2);this.l.h(a,c,d,b)}}},node:{configurable:!0,get:function(){return this.Xi}, +set:function(a){if(this.Xi!==a){F&&null!==a&&w(a,V,Gq,"node");this.Xi=a;a.Ya();var b=this.network.layout,c=L.alloc(),d=b.yj(a,c);b=d.x;var e=d.y,f=d.width;d=d.height;isNaN(b)&&(b=0);isNaN(e)&&(e=0);this.l.h(b,e,f,d);L.free(c);if(!(a instanceof If)&&(a=a.locationObject.ja(Kc),a.o())){this.w.h(a.x-b,a.y-e);return}this.w.h(f/2,d/2)}}},bounds:{configurable:!0,get:function(){return this.l},set:function(a){this.l.A(a)||(F&&w(a,L,Gq,"bounds"),this.l.assign(a))}},focus:{configurable:!0, +get:function(){return this.w},set:function(a){this.w.A(a)||(F&&w(a,J,Gq,"focus"),this.w.assign(a))}},centerX:{configurable:!0,get:function(){return this.l.x+this.w.x},set:function(a){var b=this.l;b.x+this.w.x!==a&&(F&&C(a,Gq,"centerX"),b.ka(),b.x=a-this.w.x,b.freeze())}},centerY:{configurable:!0,get:function(){return this.l.y+this.w.y},set:function(a){var b=this.l;b.y+this.w.y!==a&&(F&&C(a,Gq,"centerY"),b.ka(),b.y=a-this.w.y,b.freeze())}},focusX:{configurable:!0, +get:function(){return this.w.x},set:function(a){var b=this.w;b.x!==a&&(b.ka(),b.x=a,b.freeze())}},focusY:{configurable:!0,get:function(){return this.w.y},set:function(a){var b=this.w;b.y!==a&&(b.ka(),b.y=a,b.freeze())}},x:{configurable:!0,get:function(){return this.l.x},set:function(a){var b=this.l;b.x!==a&&(b.ka(),b.x=a,b.freeze())}},y:{configurable:!0,get:function(){return this.l.y},set:function(a){var b=this.l;b.y!==a&&(b.ka(),b.y=a,b.freeze())}},width:{configurable:!0, +enumerable:!0,get:function(){return this.l.width},set:function(a){var b=this.l;b.width!==a&&(b.ka(),b.width=a,b.freeze())}},height:{configurable:!0,get:function(){return this.l.height},set:function(a){var b=this.l;b.height!==a&&(b.ka(),b.height=a,b.freeze())}},network:{configurable:!0,get:function(){return this.Zc},set:function(a){F&&w(a,sq,Gq,"network");this.Zc=a}},sourceVertexes:{configurable:!0,get:function(){for(var a=new I,b=this.sourceEdges;b.next();)a.add(b.value.fromVertex); +return a.iterator}},destinationVertexes:{configurable:!0,get:function(){for(var a=new I,b=this.destinationEdges;b.next();)a.add(b.value.toVertex);return a.iterator}},vertexes:{configurable:!0,get:function(){for(var a=new I,b=this.sourceEdges;b.next();)a.add(b.value.fromVertex);for(b=this.destinationEdges;b.next();)a.add(b.value.toVertex);return a.iterator}},sourceEdges:{configurable:!0,get:function(){return this.zd.iterator}},destinationEdges:{configurable:!0, +enumerable:!0,get:function(){return this.Nd.iterator}},edges:{configurable:!0,get:function(){for(var a=new H,b=this.sourceEdges;b.next();)a.add(b.value);for(b=this.destinationEdges;b.next();)a.add(b.value);return a.iterator}},edgesCount:{configurable:!0,get:function(){return this.zd.count+this.Nd.count}}});Gq.prototype.deleteDestinationEdge=Gq.prototype.Zv;Gq.prototype.addDestinationEdge=Gq.prototype.Pv;Gq.prototype.deleteSourceEdge=Gq.prototype.$v; +Gq.prototype.addSourceEdge=Gq.prototype.Rv;Gq.className="LayoutVertex";Gq.standardComparer=Nq; +Gq.smartComparer=function(a,b){F&&w(a,Gq,Gq,"smartComparer:m");F&&w(b,Gq,Gq,"smartComparer:n");if(null!==a){if(null!==b){a=a.Xi;var c=b.Xi;if(null!==a){if(null!==c){b=a.text.toLocaleLowerCase().split(/([+\-]?[\.]?\d+(?:\.\d*)?(?:e[+\-]?\d+)?)/);a=c.text.toLocaleLowerCase().split(/([+\-]?[\.]?\d+(?:\.\d*)?(?:e[+\-]?\d+)?)/);for(c=0;c=f&&0>=g&&(f=1);b=this.spacing.width;isFinite(b)||(b=0);c=this.spacing.height;isFinite(c)||(c=0);null!==a&&a.Ca("Layout");d=[];switch(this.alignment){case Wq:var h=b,k=c,l=L.alloc(),m=Math.max(this.cellSize.width,1);if(!isFinite(m))for(var n= +m=0;nf-1|| +0g)d.push(new L(0,u,g+h,x)),y=0,q=r,u+=x,x=0;x=Math.max(x,M);switch(p){case Vq:D=-D.width;break;default:D=0}B.moveTo(q+D,u);switch(p){case Vq:q-=G;break;default:q+=G}y++}d.push(new L(0,u,g+h,x));L.free(l);break;case Oq:k=g;m=f;n=b;p=c;g=L.alloc();r=Math.max(this.cellSize.width,1);f=u=l=0;h=J.alloc();for(q=0;q=l&&(k-=l);l=B=0;G=Math.max(this.cellSize.height,1);D=f=0;M=!0;y=J.alloc();for(Y=0;Ym-1||0k){d.push(new L(0,M?z-f:z,k+n,D+f+p));for(Q=0;Ql&&(f.width+=f.x-l,f.x=l);L.free(g)}for(h=f=g=e=0;hb?1:0} +na.Object.defineProperties(gl.prototype,{wrappingWidth:{configurable:!0,get:function(){return this.Fq},set:function(a){this.Fq!==a&&(A(a,"number",gl,"wrappingWidth"),0n)){var u=n+zn(q);q.Rc(u,!0);Ln(q,u,n)}}b.isModified=!0}}finally{b.ba=!0}}}}};Ii.prototype.updateAllTargetBindings=function(a){void 0===a&&(a="");for(var b=this.parts.iterator;b.next();)b.value.Ia(a);for(b=this.nodes.iterator;b.next();)b.value.Ia(a);for(b=this.links.iterator;b.next();)b.value.Ia(a)}; +Ii.prototype.xr=function(){for(var a=this.C.model,b=new I,c=a.nodeDataArray,d=0;df?b+("\\u000"+a.charCodeAt(d).toString(16)):32>f?b+("\\u00"+a.charCodeAt(d).toString(16)):8232===f?b+"\\u2028":8233===f?b+"\\u2029":b+e}}return'"'+b+'"'}; +t.pn=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.pn(a.valueOf()):Ha(a)?Cr(this,a):Ga(a)?zr(this,a):"function"===typeof a?"null":a.toString()}; +function Cr(a,b,c){void 0===c&&(c=!1);var d=b.length;if(0>=d)return"[]";var e=new hb;e.add("[");c&&1d)return;La(a.xc,d)}Mr(a,"nodeDataArray",Me,"nodeDataArray",a,b,null,d,null);a.wr(b)}t.pB=function(a){if(Ha(a))for(var b=a.length,c=0;cb&&(b=a.length);Ka(a,b,c);Mr(this,"",Le,"",a,null,c,null,b)}; +t.Hw=function(a,b){void 0===b&&(b=-1);F&&(Ia(a,X,"removeArrayItem:arr"),C(b,X,"removeArrayItem:idx"));a===this.xc&&v("Model.removeArrayItem should not be called on the Model.nodeDataArray");-1===b&&(b=a.length-1);var c=a[b];La(a,b);Mr(this,"",Me,"",a,c,null,b,null)};t.Vq=function(a){if(null===a)return"";var b=this.jk;if(""===b)return"";b=Mn(a,b);if(void 0===b)return"";if("string"===typeof b)return b;v("getCategoryForNodeData found a non-string category for "+a+": "+b);return""}; +t.hn=function(a,b){A(b,"string",X,"setCategoryForNodeData:cat");if(null!==a){var c=this.jk;if(""!==c)if(this.$a(a)){var d=Mn(a,c);void 0===d&&(d="");d!==b&&(ik(a,c,b),Mr(this,"nodeCategory",Ce,c,a,d,b))}else ik(a,c,b)}};t.kn=function(a,b){this.hn(b,this.Vq(a))};t.Sm=function(){return!1};t.Ok=function(){return!1};t.Cj=function(){return!1};t.hu=function(){return!1};t.Aj=function(){return!1};function Li(){return new X} +function Fr(a,b){if("function"===typeof b){if(b.className)return b.className;if(b.name)return b.name}else if("object"===typeof b&&null!==b&&b.constructor)return Fr(a,b.constructor);return typeof b}function Kr(a){return Qr[a]?Qr[a]:void 0!==qa.go&&qa.go[a]?qa.go[a]:null}function Mn(a,b){if(!a||!b)return null;try{if("function"===typeof b)var c=b(a);else"function"===typeof a.getAttribute?(c=a.getAttribute(b),null===c&&(c=void 0)):c=a[b]}catch(d){F&&Ea("property get error: "+d.toString())}return c} +function ik(a,b,c){if(a&&b)try{"function"===typeof b?b(a,c):"function"===typeof a.setAttribute?a.setAttribute(b,c):a[b]=c}catch(d){F&&Ea("property set error: "+d.toString())}} +na.Object.defineProperties(X.prototype,{name:{configurable:!0,get:function(){return this.va},set:function(a){var b=this.va;b!==a&&(A(a,"string",X,"name"),this.va=a,this.g("name",b,a))}},dataFormat:{configurable:!0,get:function(){return this.Yn},set:function(a){var b=this.Yn;b!==a&&(A(a,"string",X,"dataFormat"),this.Yn=a,this.g("dataFormat",b,a))}},isReadOnly:{configurable:!0,get:function(){return this.lg},set:function(a){var b=this.lg;b!==a&&(A(a,"boolean", +X,"isReadOnly"),this.lg=a,this.g("isReadOnly",b,a))}},modelData:{configurable:!0,get:function(){return this.l},set:function(a){var b=this.l;b!==a&&(A(a,"object",X,"modelData"),this.l=a,this.g("modelData",b,a),this.Ia(a))}},undoManager:{configurable:!0,get:function(){return this.w},set:function(a){var b=this.w;b!==a&&(w(a,Oe,X,"undoManager"),null!==b&&b.ez(this),this.w=a,null!==a&&a.ly(this))}},skipsUndoManager:{configurable:!0,get:function(){return this.Hg}, +set:function(a){A(a,"boolean",X,"skipsUndoManager");this.Hg=a}},nodeKeyProperty:{configurable:!0,get:function(){return this.Yi},set:function(a){var b=this.Yi;b!==a&&(Nr(a,X,"nodeKeyProperty"),""===a&&v("Model.nodeKeyProperty may not be the empty string"),0d.indexOf(a.newValue)&&d.splice(c,0,a.newValue));return}}else if(a.change===Me){c=a.oldParam;if("linkDataArray"===a.modelChange){a=a.oldValue;Ga(a)&&"number"===typeof c&&(d=this.bc(a),b?(this.mg.add(a),this.fd[c]!==a&&this.fd.splice(c,0,a),void 0!==d&&this.mb.add(d,a)):(this.mg.remove(a),this.fd[c]=== +a&&this.fd.splice(c,1),void 0!==d&&this.mb.remove(d)));return}if("linkLabelKeys"===a.modelChange){d=this.Nf(a.object);Array.isArray(d)&&"number"===typeof c&&(b?0>d.indexOf(a.newValue)&&d.splice(c,0,a.newValue):(c=d.indexOf(a.newValue),0<=c&&d.splice(c,1)));return}}X.prototype.changeState.call(this,a,b)}};t=Sr.prototype;t.Um=function(a){if(void 0!==a){var b=this.Mj;if(null!==b){var c=this.Qb(a);null===c&&(c=this.copyNodeData(b),ik(c,this.nodeKeyProperty,a),this.Gf(c))}return a}}; +t.My=function(a){return jr(this,a,!0)};t.Pw=function(a,b){rr(this,a,b,!0)};t.Py=function(a){return jr(this,a,!1)};t.Uw=function(a,b){rr(this,a,b,!1)};function jr(a,b,c){if(null!==b&&(a=c?a.nf:a.pf,""!==a&&(a=Mn(b,a),void 0!==a))){if(lr(a))return a;v((c?"FromKey":"ToKey")+" value for link data "+b+" is not a number or a string: "+a)}} +function rr(a,b,c,d){null===c&&(c=void 0);void 0===c||lr(c)||ya(c,"number or string",Sr,d?"setFromKeyForLinkData:key":"setToKeyForLinkData:key");if(null!==b){var e=d?a.nf:a.pf;if(""!==e)if(c=a.Um(c),a.Dc(b)){var f=Mn(b,e);f!==c&&(pr(a,f,b),ik(b,e,c),null===a.Qb(c)&&qr(a,c,b),Mr(a,d?"linkFromKey":"linkToKey",Ce,e,b,f,c),"string"===typeof e&&a.Ia(b,e))}else ik(b,e,c)}}t.Ny=function(a){return ir(this,a,!0)};t.Qw=function(a,b){sr(this,a,b,!0)};t.Qy=function(a){return ir(this,a,!1)}; +t.Vw=function(a,b){sr(this,a,b,!1)};function ir(a,b,c){if(null===b)return"";a=c?a.fk:a.gk;if(""===a)return"";b=Mn(b,a);return void 0===b?"":b}function sr(a,b,c,d){A(c,"string",Sr,d?"setFromPortIdForLinkData:portname":"setToPortIdForLinkData:portname");if(null!==b){var e=d?a.fk:a.gk;if(""!==e)if(a.Dc(b)){var f=Mn(b,e);void 0===f&&(f="");f!==c&&(ik(b,e,c),Mr(a,d?"linkFromPortId":"linkToPortId",Ce,e,b,f,c),"string"===typeof e&&a.Ia(b,e))}else ik(b,e,c)}} +t.Nf=function(a){if(null===a)return Vr;var b=this.ge;if(""===b)return Vr;a=Mn(a,b);return void 0===a?Vr:a};t.wu=function(a,b){Ia(b,Sr,"setLabelKeysForLinkData:arr");if(null!==a){var c=this.ge;if(""!==c)if(this.Dc(a)){var d=Mn(a,c);void 0===d&&(d=Vr);if(d!==b){if(Array.isArray(d))for(var e=d.length,f=0;fe||(d.splice(e,1),this.Dc(a)&&(pr(this,b,a),Mr(this,"linkLabelKeys",Me,c,a,b,null,e,null)))}else void 0!==d&&v(c+" property is not an Array; cannot removeLabelKeyforLinkData: "+a)}}}; +t.bc=function(a){if(null!==a){var b=this.Si;if(""!==b&&(b=Mn(a,b),void 0!==b)){if(lr(b))return b;v("Key value for link data "+a+" is not a number or a string: "+b)}}};t.vu=function(a,b){void 0!==b&&null!==b&&lr(b)||ya(b,"number or string",Sr,"setKeyForLinkData:key");if(null!==a){var c=this.Si;if(""!==c)if(this.Dc(a)){var d=Mn(a,c);d!==b&&null===this.Pg(b)&&(ik(a,c,b),void 0!==d&&this.mb.remove(d),this.mb.add(b,a),Mr(this,"linkKey",Ce,c,a,d,b),"string"===typeof c&&this.Ia(a,c))}else ik(a,c,b)}}; +t.Pg=function(a){null===a&&v("GraphLinksModel.findLinkDataForKey:key must not be null");return void 0!==a&&lr(a)?this.mb.J(a):null}; +t.er=function(a){if(null!==a){var b=this.Si;if(""!==b){var c=this.bc(a);if(void 0===c||this.mb.contains(c)){var d=this.cm;if(null!==d&&(c=d(this,a),void 0!==c&&null!==c&&!this.mb.contains(c))){ik(a,b,c);return}if("string"===typeof c){for(d=2;this.mb.contains(c+d);)d++;ik(a,b,c+d)}else if(void 0===c||"number"===typeof c){for(c=-this.mb.count-1;this.mb.contains(c);)c--;ik(a,b,c)}else F&&v("GraphLinksModel.getKeyForLinkData returned something other than a string or a number: "+c)}}}}; +t.Dc=function(a){return null===a?!1:this.mg.contains(a)};t.mj=function(a){null!==a&&(rb(a),this.Dc(a)||nr(this,a,!0))};function nr(a,b,c){if(""!==a.linkKeyProperty){var d=a.bc(b);if(void 0!==d&&a.mb.J(d)===b)return;a.er(b);d=a.bc(b);if(void 0===d){v("GraphLinksModel.makeLinkDataKeyUnique failed on "+b+". Data not added to model.");return}a.mb.add(d,b)}a.mg.add(b);d=null;c&&(d=a.fd.length,a.fd.splice(d,0,b));Mr(a,"linkDataArray",Le,"linkDataArray",a,null,b,null,d);Wr(a,b)} +t.Gz=function(a){if(Array.isArray(a))for(var b=a.length,c=0;cd)return;a.fd.splice(d,1)}Mr(a,"linkDataArray",Me,"linkDataArray",a,b,null,d,null);c=jr(a,b,!0);pr(a,c,b);c=jr(a,b,!1);pr(a,c,b);d=a.Nf(b);if(Array.isArray(d))for(var e=d.length,f=0;f=a.count)1===a.count&&(a=a.first(),a.centerX=0,a.centerY=0);else{var b=new H;b.addAll(a.iterator);a=new H;var c=new H;var d=this.sort(b);var e,f,g=this.Ur;var h=this.arrangement;var k=this.nodeDiameterFormula; +var l=this.radius;if(!isFinite(l)||0>=l)l=NaN;var m=this.aspectRatio;if(!isFinite(m)||0>=m)m=1;var n=this.startAngle;isFinite(n)||(n=0);var p=this.sweepAngle;if(!isFinite(p)||360p)p=360;b=this.spacing;isFinite(b)||(b=NaN);h===ms&&k===ns?h=Zr:h===ms&&k!==ns&&(h=this.arrangement);if((this.direction===hs||this.direction===is)&&this.sorting!==bs){for(k=0;!(k>=d.length);k+=2){a.add(d.M(k));if(k+1>=d.length)break;c.add(d.M(k+1))}this.direction===hs?(this.arrangement===ms&&a.reverse(),d=new H,d.addAll(a), +d.addAll(c)):(this.arrangement===ms&&c.reverse(),d=new H,d.addAll(c),d.addAll(a))}k=d.length;for(var r=f=e=0;rp&&(0===r||r===d.length-1)&&(u/=2);e+=u;f++}if(isNaN(l)||h===ms){isNaN(b)&&(b=6);if(h!==Zr&&h!==ms){f=-Infinity;for(g=0;gl?(l=e,f=l*m):g=r/(360<=p?k:k-1)}this.Kx=h;this.fc=l;this.io=m;this.Lx=n;this.js=p;this.Uj=b;this.je=f;this.Ur=g;b=d;d=this.Kx;h=this.fc;l=this.Lx;m=this.js;n=this.Uj;p=this.je;k=this.Ur;if(this.direction!==hs&&this.direction!==is||d!==ms)if(this.direction===hs||this.direction===is){g=0;switch(d){case ls:g=180*ss(this,h,p,l,k)/Math.PI;break;case Zr:k=b=0;g=a.first();null!==g&&(b=ps(g,Math.PI/2));g=c.first(); +null!==g&&(k=ps(g,Math.PI/2));g=180*ss(this,h,p,l,n+(b+k)/2)/Math.PI;break;case ks:g=m/b.length}if(this.direction===hs){switch(d){case ls:ts(this,a,l,js);break;case Zr:us(this,a,l,js);break;case ks:vs(this,a,m/2,l,js)}switch(d){case ls:ts(this,c,l+g,as);break;case Zr:us(this,c,l+g,as);break;case ks:vs(this,c,m/2,l+g,as)}}else{switch(d){case ls:ts(this,c,l,js);break;case Zr:us(this,c,l,js);break;case ks:vs(this,c,m/2,l,js)}switch(d){case ls:ts(this,a,l+g,as);break;case Zr:us(this,a,l+g,as);break;case ks:vs(this, +a,m/2,l+g,as)}}}else switch(d){case ls:ts(this,b,l,this.direction);break;case Zr:us(this,b,l,this.direction);break;case ks:vs(this,b,m,l,this.direction);break;case ms:ws(this,b,m,l,this.direction)}else ws(this,b,m,l-m/2,as)}this.updateParts();this.network=null;this.isValidLayout=!0}; +function vs(a,b,c,d,e){var f=a.js,g=a.fc;a=a.je;d=d*Math.PI/180;c=c*Math.PI/180;for(var h=b.length,k=0;kc){for(f=d+(e===as?f:-f);0>f;)f+=360;f%=360;180=m.length-1)break;zs(a,k,l,m,n,e,f)||As(a,k,l,m,n,e,f);k=f.x;l=f.y}J.free(f);a.kk++;if(!(23Math.abs(r)?Math.abs(k-f)<(m[0].width+m[m.length-1].width)/2&&(g=0):g=0Math.abs(p)? +0:p;k=Math.abs(f)>Math.abs(n)?0n:0a.kk?a.fc-g/(2*Math.PI):5>m.length&&10=n.length-1)break;zs(a,k,l,n,p,e,m)||As(a,k,l,n,p,e,m);k=m.x;l=m.y}J.free(m);a.kk++;if(!(23a.kk?a.fc-f/(2*Math.PI):a.fc-(0h){f=b-a;if(f<-h)return g.x=f,g.y=l,!1;m=!0}}else if(f=b-a,f<-h){f=b+a;if(f>h)return g.x=f,g.y=l,!1;m=!0}l=Math.sqrt(1-Math.min(1,f*f/(h*h)))*k;0>c!==m&&(l=-l);if(Math.abs(c-l)>(d[e].height+d[e+1].height)/2)return g.x=f,g.y=l,!1;g.x=f;g.y=l;return!0} +function As(a,b,c,d,e,f,g){var h=a.fc,k=a.je,l=0;a=(d[e].height+d[e+1].height)/2+a.Uj;d=!1;if(0<=b!==(f===as)){if(f=c-a,f<-k){f=c+a;if(f>k){g.x=l;g.y=f;return}d=!0}}else if(f=c+a,f>k){f=c-a;if(f<-k){g.x=l;g.y=f;return}d=!0}l=Math.sqrt(1-Math.min(1,f*f/(k*k)))*h;0>b!==d&&(l=-l);g.x=l;g.y=f}Yr.prototype.commitLayout=function(){this.commitNodes();this.isRouting&&this.commitLinks()}; +Yr.prototype.commitNodes=function(){var a=null!==this.group&&null!==this.group.placeholder&&this.group.isSubGraphExpanded,b=a?this.group.location.copy():null,c=this.actualCenter;a?c=new J(0,0):(c.x=this.arrangementOrigin.x+this.fc,c.y=this.arrangementOrigin.y+this.je);for(var d=this.network.vertexes.iterator;d.next();){var e=d.value;e.x+=c.x;e.y+=c.y;e.commit()}a&&(this.group.Ya(),a=this.group.position.copy(),c=this.group.location.copy(),b=b.oe(c.oe(a)),this.group.move(b),this.Bx=b.oe(a))}; +Yr.prototype.commitLinks=function(){for(var a=this.network.edges.iterator;a.next();)a.value.commit()};function rs(a,b,c,d,e){var f=a.xz;if(.001>Math.abs(a.io-1))return void 0!==d&&void 0!==e?e*b:2*Math.PI*b;a=b>c?Math.sqrt(b*b-c*c)/b:Math.sqrt(c*c-b*b)/c;var g=0;var h=void 0!==d&&void 0!==e?e/(f+1):Math.PI/(2*(f+1));for(var k=0,l=0;l<=f;l++){void 0!==d&&void 0!==e?k=d+l*e/f:k=l*Math.PI/(2*f);var m=Math.sin(k);g+=Math.sqrt(1-a*a*m*m)*h}return void 0!==d&&void 0!==e?(b>c?b:c)*g:4*(b>c?b:c)*g} +function qs(a,b,c,d,e){return b/(void 0!==d&&void 0!==e?rs(a,1,c,d,e):rs(a,1,c))}function ss(a,b,c,d,e){if(.001>Math.abs(a.io-1))return e/b;var f=b>c?Math.sqrt(b*b-c*c)/b:Math.sqrt(c*c-b*b)/c,g=0;a=2*Math.PI/(700*a.network.vertexes.count);b>c&&(d+=Math.PI/2);for(var h=0;;h++){var k=Math.sin(d+h*a);g+=(b>c?b:c)*Math.sqrt(1-f*f*k*k)*a;if(g>=e)return h*a}} +Yr.prototype.sort=function(a){switch(this.sorting){case fs:break;case gs:a.reverse();break;case ds:a.sort(this.comparer);break;case es:a.sort(this.comparer);a.reverse();break;case bs:return this.Bw(Bs(a));default:v("Invalid sorting type.")}return a}; +function Bs(a){for(var b=[],c=0;ce&&(e=h,f=g)}else for(g=0;ge&&(e=h,f=g);c.add(a.M(f));b[f]=-1;f=a.M(f);for(g=f.sourceEdges;g.next();)e=a.indexOf(g.value.fromVertex),0>e||0<=b[e]&&b[e]++;for(f=f.destinationEdges;f.next();)e=a.indexOf(f.value.toVertex),0>e||0<=b[e]&&b[e]++}return c} +Yr.prototype.Bw=function(a){for(var b=[],c=0;cb[c].indexOf(e)&&b[c].push(e);for(d=d.sourceEdges;d.next();)e=a.indexOf(d.value.fromVertex),e!==c&&0>b[c].indexOf(e)&&b[c].push(e)}f=[];for(c=0;cb[c[q]].indexOf(c[q===c.length-1?0:q+1])&&r.push(q===c.length-1?0:q+1);if(0===r.length)for(q=0;qc.indexOf(M)||Gc.indexOf(M)||G=u?G+1:G)),x+=G=u&&G++,B>=u&&B++,G>B&&(D=B,B=G,G=D),B-G<(c.length+2)/2===(Gr||r===m||(q=r>m?r-m:m-r,n+=rg-q?1:-1);c.splice(0>n?m:m+1,0,k);d.splice(h,1);h--}else f=!1;if(f)break;else c.push(d[0]),d.splice(0,1)}for(b=0;b=a?this.zm=a:this.zm=360,this.D())}},arrangement:{configurable:!0,get:function(){return this.Kb},set:function(a){this.Kb!==a&&(gb(a,Yr,Yr,"arrangement"),a===ms||a===Zr||a===ls||a===ks)&&(this.Kb=a,this.D())}},direction:{configurable:!0,get:function(){return this.N},set:function(a){this.N!==a&&(gb(a,Yr,Yr,"direction"), +a===as||a===js||a===hs||a===is)&&(this.N=a,this.D())}},sorting:{configurable:!0,get:function(){return this.hd},set:function(a){this.hd!==a&&(gb(a,Yr,Yr,"sorting"),a===fs||a===gs||a===ds||es||a===bs)&&(this.hd=a,this.D())}},comparer:{configurable:!0,get:function(){return this.bd},set:function(a){this.bd!==a&&(A(a,"function",Yr,"comparer"),this.bd=a,this.D())}},spacing:{configurable:!0,get:function(){return this.yf},set:function(a){this.yf!==a&&(A(a,"number", +Yr,"spacing"),this.yf=a,this.D())}},nodeDiameterFormula:{configurable:!0,get:function(){return this.xp},set:function(a){this.xp!==a&&(gb(a,Yr,Yr,"nodeDiameterFormula"),a===cs||a===ns)&&(this.xp=a,this.D())}},actualXRadius:{configurable:!0,get:function(){return this.fc}},actualYRadius:{configurable:!0,get:function(){return this.je}},actualSpacing:{configurable:!0,get:function(){return this.Uj}},actualCenter:{configurable:!0,get:function(){return this.Bx}}}); +var Zr=new E(Yr,"ConstantSpacing",0),ls=new E(Yr,"ConstantDistance",1),ks=new E(Yr,"ConstantAngle",2),ms=new E(Yr,"Packed",3),as=new E(Yr,"Clockwise",4),js=new E(Yr,"Counterclockwise",5),hs=new E(Yr,"BidirectionalLeft",6),is=new E(Yr,"BidirectionalRight",7),fs=new E(Yr,"Forwards",8),gs=new E(Yr,"Reverse",9),ds=new E(Yr,"Ascending",10),es=new E(Yr,"Descending",11),bs=new E(Yr,"Optimized",12),cs=new E(Yr,"Pythagorean",13),ns=new E(Yr,"Circular",14);Yr.className="CircularLayout";Yr.ConstantSpacing=Zr; +Yr.ConstantDistance=ls;Yr.ConstantAngle=ks;Yr.Packed=ms;Yr.Clockwise=as;Yr.Counterclockwise=js;Yr.BidirectionalLeft=hs;Yr.BidirectionalRight=is;Yr.Forwards=fs;Yr.Reverse=gs;Yr.Ascending=ds;Yr.Descending=es;Yr.Optimized=bs;Yr.Pythagorean=cs;Yr.Circular=ns;function $r(){this.Om=-Infinity;this.qn=this.hl=null} +$r.prototype.compare=function(a,b){if(0this.Om||Math.abs(a)a&&0h?(e=p.x+p.width/2,f=p.y+ +p.height/2,l[0]=new J(p.x+p.width+d.width,p.y),l[1]=new J(p.x,p.y+p.height+d.height),h=2):(k=Hs(l,h,e,f,p.width,p.height,d),n=l[k],r=new J(n.x+p.width+d.width,n.y),p=new J(n.x,n.y+p.height+d.height),k+1this.network.vertexes.count)return!1;for(var a=0,b=0,c=this.network.vertexes.first().bounds,d=this.network.vertexes.iterator;d.next();){if(d.value.bounds.Sc(c)&&(a++,2a.network.vertexes.count)return!1;a.Qh=a.network.vertexes.ta();a=a.Qh;a.sort(function(a,b){return null===a||null===b||a===b?0:b.Rd-a.Rd});for(b=a.length-1;0<=b&&1>=a[b].Rd;)b--;return 1=g))){for(var l=h=0,m=k.count-g;mr&&(r=1);h=K.sqrt((h+r+l*l*4/(g*g))/r);g=(h-1)*m/2;h=(h-1)*n/2;e.bounds=new L(f-p.x-g,k-p.y-h,m+2*g,n+2*h);e.focus=new J(p.x+g,p.y+h)}}a.network=d;return c} +function Ms(a,b,c){F&&(w(b,Fs,Es,"popNetwork:oldnet"),C(c,Es,"popNetwork:level"));for(c=a.network.vertexes.iterator;c.next();){var d=c.value;d.network=b;if(null!==d.$e){var e=d.$e.M(d.Nw);d.Rd=e.Du;var f=e.qx,g=e.sx;d.bounds=new L(d.centerX-f,d.centerY-g,e.Eu,e.Cu);d.focus=new J(f,g);d.Nw--}}for(c=a.network.edges.iterator;c.next();)c.value.network=b;a.network=b} +function Ns(a,b,c){F&&(w(b,Ps,Es,"surroundNode:oldnet"),C(c,Es,"surroundNode:level"));var d=b.Ck;if(null!==d&&0!==d.count){c=b.centerX;var e=b.centerY,f=b.width,g=b.height;null!==b.$e&&0=n.Rd?k++:(h=!0,l++,g+=Math.atan2(b.centerY-n.centerY,b.centerX-n.centerX))}if(0!==k)for(0>1)+l)*(0===h%2?1:-1);k.centerX=c+m*Math.cos(n);k.centerY=e+m*Math.sin(n);h++}}} +function Hs(a,b,c,d,e,f,g){var h=9E19,k=-1,l=0;a:for(;lm.y&&a[p].x-m.xm.x&&a[p].y-m.yb+f?(c=d+e-g,a=a-b-f,K.sqrt(c*c+a*a)):a+cg+h?a>b+f?(c=d-g-h,a=a-b-f,K.sqrt(c*c+a*a)):a+cb+f?a-(b+f):a+c=b.length)return!1;var c=b[0];c.forceX=0;c.forceY=0;for(var d=c.centerX,e=d,f=c=c.centerY,g=1;gf-c)?b.sort(function(a,b){return null===a||null===b||a===b?0:a.centerX-b.centerX}):b.sort(function(a,b){return null===a||null===b||a===b?0:a.centerY-b.centerY});c=a.ig;var l=d=h=0;for(f= +0;fc||l-k>c){if(e)break}else if(m-r>c||r-m>c){if(!e)break}else{var q=Qs(g,p);1>q?(d=a.randomNumberGenerator,null===d&&(a.randomNumberGenerator=d=new Ss),q=d.random(), +h=d.random(),k>l?(d=Math.abs(p.bounds.right-g.bounds.x),d=(1+d)*q):kr?(l=Math.abs(p.bounds.bottom-g.bounds.y),l=(1+l)*h):kn?(n=a.randomNumberGenerator,null===n&&(a.randomNumberGenerator=n=new Ss),h=n.random(),n=n.random(),d=(d>k?1:-1)*(1+(f.width>c.width?f.width:c.width))*h,l=(g>m?1:-1)*(1+(f.height>c.height?f.height:c.height))*n):(h=h.stiffness*(n-h.length),d=(k-d)/n*h,l=(m-g)/n*h),c.forceX+=d,c.forceY+=l,f.forceX-=d,f.forceY-=l;for(e=d=0;ea.epsilonDistance*a.epsilonDistance}Es.prototype.moveVertex=function(a){var b=a.forceX,c=a.forceY,d=this.moveLimit;b<-d?b=-d:b>d&&(b=d);c<-d?c=-d:c>d&&(c=d);a.centerX+=b;a.centerY+=c;return b*b+c*c};Es.prototype.moveFixedVertex=function(){};Es.prototype.commitLayout=function(){this.Rw();this.commitNodes();this.isRouting&&this.commitLinks()}; +Es.prototype.Rw=function(){if(this.setsPortSpots)for(var a=this.network.edges.iterator;a.next();){var b=a.value.link;null!==b&&(b.fromSpot=fd,b.toSpot=fd)}};Es.prototype.commitNodes=function(){var a=0,b=0;if(this.arrangesToOrigin){var c=L.alloc();this.computeBounds(this.network,c);b=this.arrangementOrigin;a=b.x-c.x;b=b.y-c.y;L.free(c)}c=L.alloc();for(var d=this.network.vertexes.iterator;d.next();){var e=d.value;if(0!==a||0!==b)c.assign(e.bounds),c.x+=a,c.y+=b,e.bounds=c;e.commit()}L.free(c)}; +Es.prototype.commitLinks=function(){for(var a=this.network.edges.iterator;a.next();)a.value.commit()};Es.prototype.springStiffness=function(a){a=a.stiffness;return isNaN(a)?this.Al:a};Es.prototype.springLength=function(a){a=a.length;return isNaN(a)?this.zl:a};Es.prototype.electricalCharge=function(a){a=a.charge;return isNaN(a)?this.xl:a};Es.prototype.electricalFieldX=function(){return 0};Es.prototype.electricalFieldY=function(){return 0}; +Es.prototype.gravitationalMass=function(a){a=a.mass;return isNaN(a)?this.yl:a};Es.prototype.gravitationalFieldX=function(){return 0};Es.prototype.gravitationalFieldY=function(){return 0};Es.prototype.isFixed=function(a){return a.isFixed}; +na.Object.defineProperties(Es.prototype,{currentIteration:{configurable:!0,get:function(){return this.Ro}},arrangementSpacing:{configurable:!0,get:function(){return this.Vd},set:function(a){w(a,Fb,Es,"arrangementSpacing");this.Vd.A(a)||(this.Vd.assign(a),this.D())}},arrangesToOrigin:{configurable:!0,get:function(){return this.Bn},set:function(a){this.Bn!==a&&(A(a,"boolean",Es,"arrangesToOrigin"),this.Bn=a,this.D())}},setsPortSpots:{configurable:!0, +get:function(){return this.xf},set:function(a){this.xf!==a&&(A(a,"boolean",Es,"setsPortSpots"),this.xf=a,this.D())}},comments:{configurable:!0,get:function(){return this.pd},set:function(a){this.pd!==a&&(A(a,"boolean",Es,"comments"),this.pd=a,this.D())}},maxIterations:{configurable:!0,get:function(){return this.dm},set:function(a){this.dm!==a&&(A(a,"number",Es,"maxIterations"),0<=a&&(this.dm=a,this.D()))}},epsilonDistance:{configurable:!0,get:function(){return this.lo}, +set:function(a){this.lo!==a&&(A(a,"number",Es,"epsilonDistance"),0u&&0u&&0a[this.uc]&&(this.Ui=a[c]-1,this.uc=c),a[c]g)for(var m=g+1;mk;m--)n=d[m],n.near===l&&n.If===l.If||h++;var p;if(0<=c)for(k=d[g].sourceEdgesArrayAccess,l=0;lu||n===u&&r>q)&&h++;yn||u===n&&q>r)&&h++}}}if(0>=c)for(k=d[g].destinationEdgesArrayAccess,l=0;lu||n===u&&m>y)&&h++,qn||u===n&&y>m)&&h++);f[g*e+g]=h;for(k=g+1;k=c)for(h=d[g].destinationEdgesArrayAccess,B=d[k].destinationEdgesArrayAccess, +l=0;l=c&&(k=h.sourceEdgesArrayAccess);var l=null;0<=c&&(l=h.destinationEdgesArrayAccess);var m=0,n=0,p=h.near;null!==p&&p.layer===h.layer&&(m+=p.column-1,n++);if(null!==k)for(p=0;p=c&&(k=h.sourceEdgesArrayAccess);var l=null;0<=c&&(l=h.destinationEdgesArrayAccess);var m=0,n=[],p=h.near;null!==p&&p.layer===h.layer&&(n[m]=p.column-1,m++);h=void 0;if(null!==k)for(p=0;p>1,f[g]=0!==(m&1)?n[l]:n[l-1]+n[l]>>1)}dt(a,b,d);return f} +function lt(a,b,c,d,e,f){if(b.component===d){b.component=c;if(e)for(var g=b.destinationEdges;g.next();){var h=g.value;var k=h.toVertex;var l=b.layer-k.layer;h=a.linkMinLength(h);l===h&<(a,k,c,d,e,f)}if(f)for(g=b.sourceEdges;g.next();)h=g.value,k=h.fromVertex,l=k.layer-b.layer,h=a.linkMinLength(h),l===h&<(a,k,c,d,e,f)}} +function mt(a,b,c,d,e,f){if(b.component===d){b.component=c;if(e)for(var g=b.destinationEdges;g.next();)mt(a,g.value.toVertex,c,d,e,f);if(f)for(b=b.sourceEdges;b.next();)mt(a,b.value.fromVertex,c,d,e,f)}} +Us.prototype.removeCycles=function(){for(var a=this.network.edges.iterator;a.next();)a.value.rev=!1;switch(this.vl){default:case nt:a=this.network;var b=0,c=a.vertexes.count-1,d=[];d.length=c+1;for(var e=a.vertexes.iterator;e.next();)e.value.valid=!0;for(;null!==ot(a);){for(e=pt(a);null!==e;)d[c]=e,c--,e.valid=!1,e=pt(a);for(e=qt(a);null!==e;)d[b]=e,b++,e.valid=!1,e=qt(a);e=null;for(var f=0,g=this.network.vertexes.iterator;g.next();){var h=g.value;if(h.valid){for(var k=0,l=h.destinationEdges;l.next();)l.value.toVertex.valid&& +k++;l=0;for(var m=h.sourceEdges;m.next();)m.value.fromVertex.valid&&l++;if(null===e||fb.toVertex.index&&(a.en(b),b.rev=!0);break;case Vs:for(d=this.network.vertexes.iterator;d.next();)a=d.value,a.Og=-1,a.finish=-1;for(a=this.network.edges.iterator;a.next();)a.value.forest=!1;this.Ah=0;for(d.reset();d.next();)b=d.value,0===b.sourceEdges.count&& +rt(this,b);for(d.reset();d.next();)b=d.value,-1===b.Og&&rt(this,b);for(a.reset();a.next();)d=a.value,d.forest||(b=d.fromVertex,c=b.finish,e=d.toVertex,f=e.finish,e.Ogd){if(0>d)for(b.reset();b.next();)b.value.layer-=d;d=[];for(b.reset();b.next();)c=b.value,e=d[c.layer],void 0===e?d[c.layer]=[c]:e.push(c);for(c=b=0;cg&<(a,h,0,-1,!0,!1)}for(lt(a,b,1,-1,!0,!0);0!==b.component;){f=0;d=Infinity;h=0;k=null;for(g=a.network.vertexes.iterator;g.next();){var l=g.value;if(1===l.component){var m=0,n=!1,p=l.sourceEdgesArrayAccess; +e=p.length;for(var r=0;rf)&&!m&&(h=g,f=l)}if(0>d){for(c.reset();c.next();)d=c.value,1===d.component&&(d.layer-=e);b.component=0}else h.component=0}}} +function bt(a,b,c){return 90===a.N?c&&!b.rev||!c&&b.rev?270:90:180===a.N?c&&!b.rev||!c&&b.rev?0:180:270===a.N?c&&!b.rev||!c&&b.rev?90:270:c&&!b.rev||!c&&b.rev?180:0} +Us.prototype.initializeIndices=function(){switch(this.Ol){default:case yt:for(var a=this.network.vertexes.iterator;a.next();){var b=a.value,c=b.layer;b.index=this.Eb[c];this.Eb[c]++}break;case Xs:a=this.network.vertexes.iterator;for(b=this.ya;0<=b;b--)for(a.reset();a.next();)c=a.value,c.layer===b&&-1===c.index&&zt(this,c);break;case At:for(a=this.network.vertexes.iterator,b=0;b<=this.ya;b++)for(a.reset();a.next();)c=a.value,c.layer===b&&-1===c.index&&Bt(this,c)}}; +function zt(a,b){var c=b.layer;b.index=a.Eb[c];a.Eb[c]++;b=b.destinationEdgesArrayAccess;for(c=!0;c;){c=!1;for(var d=0;df.portFromColOffset&&(c=!0,b[d]=f,b[d+1]=e)}}for(c=0;cf.portToColOffset&&(d=!0,b[c]=f,b[c+1]=e)}for(c=0;c=g;d--)f=Dt(this,d,-1)||f;e=this.countCrossings();e>=a?gt(this,b):(a=e,b=ft(this));for(f=!0;f;)for(f=!1,d=c;d>=g;d--)f=Dt(this,d,1)||f;e=this.countCrossings();e>=a?gt(this,b):(a=e,b=ft(this));for(f=!0;f;)for(f=!1,d=g;d<=c;d++)f=Dt(this,d,1)||f;e>=a?gt(this,b):(a=e,b=ft(this));for(f=!0;f;)for(f=!1,d=g;d<=c;d++)f= +Dt(this,d,-1)||f;e>=a?gt(this,b):(a=e,b=ft(this));for(f=!0;f;)for(f=!1,d=c;d>=g;d--)f=Dt(this,d,0)||f;e>=a?gt(this,b):(a=e,b=ft(this));for(f=!0;f;)for(f=!1,d=g;d<=c;d++)f=Dt(this,d,0)||f;e>=a?gt(this,b):(a=e,b=ft(this))}break;default:case Ys:for(c=this.ya,g=0,h=a+1;(d=this.countCrossings())=g;d--)f=Dt(this,d,-1)||f;e=this.countCrossings();e>=a?gt(this,b):(a=e,b=ft(this));for(f=!0;f;)for(f=!1,d=c;d>=g;d--)f=Dt(this,d,1)||f;e=this.countCrossings();e>=a?gt(this,b): +(a=e,b=ft(this));for(f=!0;f;)for(f=!1,d=g;d<=c;d++)f=Dt(this,d,1)||f;e>=a?gt(this,b):(a=e,b=ft(this));for(f=!0;f;)for(f=!1,d=g;d<=c;d++)f=Dt(this,d,-1)||f;e>=a?gt(this,b):(a=e,b=ft(this));for(f=!0;f;)for(f=!1,d=c;d>=g;d--)f=Dt(this,d,0)||f;e>=a?gt(this,b):(a=e,b=ft(this));for(f=!0;f;)for(f=!1,d=g;d<=c;d++)f=Dt(this,d,0)||f;e>=a?gt(this,b):(a=e,b=ft(this))}}gt(this,b)}; +function Ct(a,b,c){F&&(C(b,Us,"medianBarycenterCrossingReduction:unfixedLayer"),C(c,Us,"medianBarycenterCrossingReduction:direction"));var d=ct(a,b),e=a.Eb[b],f=kt(a,b,c),g=jt(a,b,c);for(c=0;cf+1&&(p+=4*(z-f),r+=4*(z-(f+1)))}D=d[f].destinationEdges.iterator;for(D.reset();D.next();)if(z=D.value,B=z.toVertex,z.valid&&B.layer===b){for(z=0;d[z]!==B;)z++;z===f+1&&(r+=1)}D=d[f+1].sourceEdges.iterator;for(D.reset();D.next();)if(z=D.value,B=z.fromVertex,z.valid&&B.layer===b){for(z=0;d[z]!==B;)z++;zf+1&&(p+=4*(z-(f+1)),r+=4*(z-f))}D=d[f+1].destinationEdges.iterator; +for(D.reset();D.next();)if(z=D.value,B=z.toVertex,z.valid&&B.layer===b){for(z=0;d[z]!==B;)z++;z===f&&(p+=1)}z=B=0;D=g[d[f].index];var G=h[d[f].index],M=g[d[f+1].index],Y=h[d[f+1].index];-1!==D&&(B+=Math.abs(D-q),z+=Math.abs(D-x));-1!==G&&(B+=Math.abs(G-q),z+=Math.abs(G-x));-1!==M&&(B+=Math.abs(M-u),z+=Math.abs(M-y));-1!==Y&&(B+=Math.abs(Y-u),z+=Math.abs(Y-y));if(r>1)+8*d;this.Ha*=8}if(0!==(this.zg&2))for(c=!0;c;){c=!1;for(b=this.uc+1;b<=this.ya;b++)c=Ht(this,b,1)|| +c;for(b=this.uc-1;0<=b;b--)c=Ht(this,b,-1)||c;c=Ht(this,this.uc,0)||c}if(0!==(this.zg&4)){for(b=this.uc+1;b<=this.ya;b++)It(this,b,1);for(b=this.uc-1;0<=b;b--)It(this,b,-1);It(this,this.uc,0)}a&&(Jt(this,-1),Jt(this,1));if(0!==(this.zg&2))for(c=!0;c;){c=!1;c=Ht(this,this.uc,0)||c;for(b=this.uc+1;b<=this.ya;b++)c=Ht(this,b,0)||c;for(b=this.uc-1;0<=b;b--)c=Ht(this,b,0)||c}}; +function Ht(a,b,c){F&&(C(b,Us,"bendStraighten:unfixedLayer"),C(c,Us,"bendStraighten:direction"));for(var d=!1;Kt(a,b,c);)d=!0;return d} +function Kt(a,b,c){F&&(C(b,Us,"shiftbendStraighten:unfixedLayer"),C(c,Us,"shiftbendStraighten:direction"));var d,e=ct(a,b),f=a.Eb[b],g=jt(a,b,-1);if(0c)for(d=0;dd-1||m-e[d-1].column-1>n+a.nodeMinColumnSpace(e[d-1],!1)?r=m-1:r=m;n=d+1>=f||e[d+1].column-m-1>p+a.nodeMinColumnSpace(e[d+1],!0)?m+1:m;var q=p=0,u= +0;if(0>=c)for(var y=e[d].sourceEdges.iterator;y.next();){var x=y.value;var z=x.fromVertex;if(x.valid&&z.layer!==b){var B=et(x);var D=x.portFromColOffset;x=x.portToColOffset;z=z.column;p+=(Math.abs(m+x-(z+D))+1)*B;q+=(Math.abs(r+x-(z+D))+1)*B;u+=(Math.abs(n+x-(z+D))+1)*B}}if(0<=c)for(y=e[d].destinationEdges.iterator;y.next();)x=y.value,z=x.toVertex,x.valid&&z.layer!==b&&(B=et(x),D=x.portFromColOffset,x=x.portToColOffset,z=z.column,p+=(Math.abs(m+D-(z+x))+1)*B,q+=(Math.abs(r+D-(z+x))+1)*B,u+=(Math.abs(n+ +D-(z+x))+1)*B);x=D=B=0;y=g[e[d].index];z=h[e[d].index];-1!==y&&(B+=Math.abs(y-m),D+=Math.abs(y-r),x+=Math.abs(y-n));-1!==z&&(B+=Math.abs(z-m),D+=Math.abs(z-r),x+=Math.abs(z-n));if(q=g[c]?m=k:l<=g[c]&&(m=l));m!==h&&(f=!0,d[c].column=m)}dt(a,b, +d);a.normalize()}function Lt(a,b){F&&(C(b,Us,"packAux:column"),C(1,Us,"packAux:direction"));for(var c=!0,d=a.network.vertexes.iterator;d.next();){var e=d.value,f=a.nodeMinColumnSpace(e,!0),g=a.nodeMinColumnSpace(e,!1);if(e.column-f<=b&&e.column+g>=b){c=!1;break}}a=!1;if(c)for(d.reset();d.next();)c=d.value,c.column>b&&(--c.column,a=!0);return a} +function Mt(a,b){F&&(C(b,Us,"tightPackAux:column"),C(1,Us,"tightPackAux:direction"));var c=b+1;var d,e=[],f=[];for(d=0;d<=a.ya;d++)e[d]=!1,f[d]=!1;for(var g=a.network.vertexes.iterator;g.next();){d=g.value;var h=d.column-a.nodeMinColumnSpace(d,!0),k=d.column+a.nodeMinColumnSpace(d,!1);h<=b&&k>=b&&(e[d.layer]=!0);h<=c&&k>=c&&(f[d.layer]=!0)}h=!0;c=!1;for(d=0;d<=a.ya;d++)h=h&&!(e[d]&&f[d]);if(h)for(g.reset();g.next();)a=g.value,a.column>b&&(--a.column,c=!0);return c} +function Jt(a,b){F&&C(b,Us,"componentPack:direction");for(var c=0;c<=a.Ha;c++)for(;Lt(a,c););a.normalize();for(c=0;cf?gt(a,e):gb)for(c=a.Ha;0<=c;c--)for(e=ft(a),f=it(a),d=f+1;ff?gt(a,e):gc)for(d.reset();d.next();)e=d.value,e.column+a.nodeMinColumnSpace(e,!1)>=b&&(e.component=a.Kc);a.Kc++;for(d.reset();d.next();)b=d.value,-1===b.component&&(mt(a,b,a.Kc,-1,!0,!0),a.Kc++);var f;b=[];for(f=0;fc)for(g=a.Ha;0c)for(d.reset();d.next();)c=d.value,e[c.component]&&(c.column+=1)} +Us.prototype.commitLayout=function(){if(this.setsPortSpots)for(var a=at(this,!0),b=at(this,!1),c=this.network.edges.iterator;c.next();){var d=c.value.link;null!==d&&(d.fromSpot=a,d.toSpot=b)}this.commitNodes();this.Vv();this.isRouting&&this.commitLinks()};function at(a,b){return 270===a.N?b?md:pd:90===a.N?b?pd:md:180===a.N?b?nd:od:b?od:nd} +Us.prototype.commitNodes=function(){this.fe=[];this.Fd=[];this.Ed=[];this.Na=[];for(var a=0;a<=this.ya;a++)this.fe[a]=0,this.Fd[a]=0,this.Ed[a]=0,this.Na[a]=0;for(a=this.network.vertexes.iterator;a.next();){var b=a.value,c=b.layer;this.fe[c]=Math.max(this.fe[c],this.nodeMinLayerSpace(b,!0));this.Fd[c]=Math.max(this.Fd[c],this.nodeMinLayerSpace(b,!1))}b=0;c=this.Ee;for(var d=0;d<=this.ya;d++){var e=c;0>=this.fe[d]+this.Fd[d]&&(e=0);0=n.bounds.bottom? +(n=n.bounds.y+n.bounds.height,b.m(q++,B,n+G),b.m(q++,B,n),b.m(q++,B,n-z)):(b.m(q++,B,D+G),b.m(q++,B,D),b.m(q++,B,D-z)):270===this.N?D<=n.bounds.y?(n=n.bounds.y,b.m(q++,B,n-z),b.m(q++,B,n),b.m(q++,B,n+G)):(b.m(q++,B,D-z),b.m(q++,B,D),b.m(q++,B,D+G)):0===this.N&&(B>=n.bounds.right?(n=n.bounds.x+n.bounds.width,b.m(q++,n+G,D),b.m(q++,n,D),b.m(q++,n-z,D)):(b.m(q++,B+G,D),b.m(q++,B,D),b.m(q++,B-z,D)));else{b.m(q++,y,x);var M=0;if(180===this.N||0===this.N){if(180===this.N?B>=n.bounds.right:B<=n.bounds.x)M= +(0===this.N?-z:G)/2;b.m(q++,y+M,D)}else{if(270===this.N?D>=n.bounds.bottom:D<=n.bounds.y)M=(90===this.N?-z:G)/2;b.m(q++,B,x+M)}b.m(q++,B,D)}}else z=Math.max(10,this.fe[u.layer]),G=Math.max(10,this.Fd[u.layer]),180===this.N?(r&&b.m(q++,B-z,D),b.m(q++,B,D),r&&b.m(q++,B+G,D)):90===this.N?(r&&b.m(q++,B,D+G),b.m(q++,B,D),r&&b.m(q++,B,D-z)):270===this.N?(r&&b.m(q++,B,D-z),b.m(q++,B,D),r&&b.m(q++,B,D+G)):(r&&b.m(q++,B+G,D),b.m(q++,B,D),r&&b.m(q++,B-z,D))}n=u}if(null===h||l!==Bc||p)if(y=b.i(q-1).x,x=b.i(q- +1).y,B=b.i(q).x,D=b.i(q).y,p)n=this.Fd[m.layer],180===this.N||0===this.N?(p=x,p>=m.bounds.y&&p<=m.bounds.bottom&&(180===this.N?B>=m.bounds.x:B<=m.bounds.right)&&(n=m.centerX+(180===this.N?-n:n),p=m.bounds.x&&p<=m.bounds.right&&(270===this.N?D>=m.bounds.y:D<=m.bounds.bottom)&&(n=m.centerY+(270===this.N?-n:n),p=m.bounds.x?(n=m.bounds.x+m.bounds.width,b.O(q-2,n,x),b.O(q-1,n+G,x)):90===this.N&&D<=m.bounds.bottom?(n=m.bounds.y,b.O(q-2,y,n),b.O(q-1,y,n-z)):270===this.N&&D>=m.bounds.y?(n=m.bounds.y+m.bounds.height,b.O(q-2,y,n),b.O(q-1,y,n+G)):0===this.N&&B<=m.bounds.right&&(n=m.bounds.x,b.O(q-2,n,x),b.O(q-1,n-z,x));else{z=Math.max(10,this.fe[m.layer]);G=Math.max(10, +this.Fd[m.layer]);p=0;if(180===this.N||0===this.N){if(180===this.N?B<=m.bounds.x:B>=m.bounds.right)p=(0===this.N?G:-z)/2;b.m(q++,B+p,x)}else{if(270===this.N?D<=m.bounds.y:D>=m.bounds.bottom)p=(90===this.N?G:-z)/2;b.m(q++,y,D+p)}b.m(q++,B,D)}}else{for(;null!==m&&m!==n;){z=u=null;for(m=m.destinationEdges.iterator;m.next()&&(y=m.value,y.link!==c.link||(u=y.toVertex,z=y.fromVertex,null!==z.node&&(z=null),null!==u.node)););u!==n&&(y=b.i(q-1).x,x=b.i(q-1).y,B=u.centerX,D=u.centerY,p?180===this.N||0===this.N? +(null!==z?z.centerY:x)!==D&&(z=this.Na[u.layer]+this.ad.x,q===b.firstPickIndex+1&&(z=0===this.N?Math.max(z,y):Math.min(z,y)),b.m(q++,z,x),b.m(q++,z,D)):(null!==z?z.centerX:y)!==B&&(z=this.Na[u.layer]+this.ad.y,q===b.firstPickIndex+1&&(z=90===this.N?Math.max(z,x):Math.min(z,x)),b.m(q++,y,z),b.m(q++,B,z)):(z=Math.max(10,this.fe[u.layer]),G=Math.max(10,this.Fd[u.layer]),180===this.N?(b.m(q++,B+G,D),r&&b.m(q++,B,D),b.m(q++,B-z,D)):90===this.N?(b.m(q++,B,D-z),r&&b.m(q++,B,D),b.m(q++,B,D+G)):270===this.N? +(b.m(q++,B,D+G),r&&b.m(q++,B,D),b.m(q++,B,D-z)):(b.m(q++,B-z,D),r&&b.m(q++,B,D),b.m(q++,B+G,D))));m=u}p&&(y=b.i(q-1).x,x=b.i(q-1).y,B=b.i(q).x,D=b.i(q).y,180===this.N||0===this.N?x!==D&&(z=0===this.N?Math.min(Math.max((B+y)/2,this.Na[n.layer]+this.ad.x),B):Math.max(Math.min((B+y)/2,this.Na[n.layer]+this.ad.x),B),b.m(q++,z,x),b.m(q++,z,D)):y!==B&&(z=90===this.N?Math.min(Math.max((D+x)/2,this.Na[n.layer]+this.ad.y),D):Math.max(Math.min((D+x)/2,this.Na[n.layer]+this.ad.y),D),b.m(q++,y,z),b.m(q++,B,z)))}null!== +d&&r&&(null!==g&&(l===Bc&&(l=b.i(0),d=b.i(2),l.A(d)||b.O(1,(l.x+d.x)/2,(l.y+d.y)/2)),l=b.getLinkPoint(e,g,Bc,!0,!1,f,h),l.o()||l.set(e.actualBounds.center),b.O(0,l.x,l.y)),null!==h&&(k===Bc&&(k=b.i(b.pointsCount-1),l=b.i(b.pointsCount-3),k.A(l)||b.O(b.pointsCount-2,(k.x+l.x)/2,(k.y+l.y)/2)),e=b.getLinkPoint(f,h,Bc,!1,!1,e,g),e.o()||e.set(f.actualBounds.center),b.O(b.pointsCount-1,e.x,e.y)));b.Jf();c.commit()}}}this.avoidOrthogonalOverlaps()}; +Us.prototype.avoidOrthogonalOverlaps=function(){if(!(0>=this.linkSpacing)){for(var a=new H,b=this.network.edges.iterator;b.next();){var c=b.value.link;null!==c&&c.isOrthogonal&&!a.contains(c)&&a.add(c)}if(0f.y&&(m=l.y>f.y?0:g.xf.x&&(m=l.x>f.x?0:g.yb.layer?1:a.mdb.md?1:a.Bcb.Bc?1:0:0};t.fz=function(a,b){return a instanceof Ot&&b instanceof Ot&&a!==b?a.firstb.first||a.lb.l||a.mdb.md?1:a.Bcb.Bc?1:0:0}; +t.uu=function(a,b){return a instanceof Ot&&b instanceof Ot&&a!==b?a.ccb.cc||a.lb.l||a.mdb.md?1:a.Bcb.Bc?1:0:0};t.B=function(a,b){F&&(C(a,Us,"isApprox:a"),C(b,Us,"isApprox:b"));a-=b;return-1a}; +t.Gj=function(a,b,c,d){var e=a.length,f=d-c;if(!(1>=f))if((0>c||c>=e-1)&&v("not in range 0 <= from < length: "+c),2===f)d=a[c],e=a[c+1],0=e)a.sort(b);else for(c=a.slice(0,d),c.sort(b),b=0;b=e)for(d=a.slice(c),d.sort(b),b=c;b=a.Ie.length){var d=[];for(var e=0;ea&&(this.zg=a,this.D()))}},setsPortSpots:{configurable:!0,get:function(){return this.xf},set:function(a){this.xf!==a&&(A(a,"boolean",Us,"setsPortSpots"),this.xf=a,this.D())}},linkSpacing:{configurable:!0,get:function(){return this.Zo},set:function(a){this.Zo!==a&&(A(a,"number",Us,"linkSpacing"),0<=a&&(this.Zo=a,this.D()))}},maxLayer:{configurable:!0, +get:function(){return this.ya}},maxIndex:{configurable:!0,get:function(){return this.Ui}},maxColumn:{configurable:!0,get:function(){return this.Ha}},minIndexLayer:{configurable:!0,get:function(){return this.yh}},maxIndexLayer:{configurable:!0,get:function(){return this.uc}}}); +var Vs=new E(Us,"CycleDepthFirst",0),nt=new E(Us,"CycleGreedy",1),$s=new E(Us,"CycleFromLayers",2),Ws=new E(Us,"LayerOptimalLinkLength",0),st=new E(Us,"LayerLongestPathSink",1),ut=new E(Us,"LayerLongestPathSource",2),Xs=new E(Us,"InitDepthFirstOut",0),At=new E(Us,"InitDepthFirstIn",1),yt=new E(Us,"InitNaive",2),Et=new E(Us,"AggressiveNone",0),Ys=new E(Us,"AggressiveLess",1),Ft=new E(Us,"AggressiveMore",2),Gt=8;Us.className="LayeredDigraphLayout";Us.CycleDepthFirst=Vs;Us.CycleGreedy=nt; +Us.CycleFromLayers=$s;Us.LayerOptimalLinkLength=Ws;Us.LayerLongestPathSink=st;Us.LayerLongestPathSource=ut;Us.InitDepthFirstOut=Xs;Us.InitDepthFirstIn=At;Us.InitNaive=yt;Us.AggressiveNone=Et;Us.AggressiveLess=Ys;Us.AggressiveMore=Ft;Us.PackNone=0;Us.PackExpand=1;Us.PackStraighten=2;Us.PackMedian=4;Us.PackAll=15;function Ot(){this.index=this.Bc=this.md=this.cc=this.first=this.layer=0;this.link=null;this.l=0}Ot.className="SegInfo";function Zs(a){sq.call(this,a)}ma(Zs,sq);Zs.prototype.createVertex=function(){return new Qt(this)}; +Zs.prototype.createEdge=function(){return new Rt(this)};Zs.className="LayeredDigraphNetwork";function Qt(a){Gq.call(this,a);this.Xa=this.dh=this.Qi=-1;this.L=NaN;this.W=null;this.valid=!1;this.finish=this.Og=NaN;this.If=0;this.Xk=this.Yk=null}ma(Qt,Gq); +Qt.prototype.serializeVertexProperties=function(a,b){Gq.prototype.serializeVertexProperties.call(this,a,b);a.layer=this.layer;a.column=this.column;a.index=this.index;a.component=this.component;a.near=this.near?ob(this.near):null;a.valid=this.valid;a.Og=this.Og;a.finish=this.finish;a.If=this.If;a.Yk=this.Yk;a.Xk=this.Xk}; +Qt.prototype.Pq=function(a,b,c,d){Gq.prototype.Pq.call(this,a,b,c,d);this.layer=a.layer;this.column=a.column;this.index=a.index;this.component=a.component;if(b=b.get(a.near))this.near=b;this.valid=a.valid;this.Og=a.Og;this.finish=a.finish;this.If=a.If;this.Yk=a.Yk;this.Xk=a.Xk}; +na.Object.defineProperties(Qt.prototype,{layer:{configurable:!0,get:function(){return this.Qi},set:function(a){this.Qi!==a&&(A(a,"number",Qt,"layer"),this.Qi=a)}},column:{configurable:!0,get:function(){return this.dh},set:function(a){this.dh!==a&&(A(a,"number",Qt,"column"),this.dh=a)}},index:{configurable:!0,get:function(){return this.Xa},set:function(a){this.Xa!==a&&(A(a,"number",Qt,"index"),this.Xa=a)}},component:{configurable:!0,get:function(){return this.L}, +set:function(a){this.L!==a&&(A(a,"number",Qt,"component"),this.L=a)}},near:{configurable:!0,get:function(){return this.W},set:function(a){this.W!==a&&(F&&null!==a&&w(a,Qt,Qt,"near"),this.W=a)}}});Qt.className="LayeredDigraphVertex";function Rt(a){Hq.call(this,a);this.l=this.Qa=this.kb=!1;this.Pa=this.L=NaN;this.W=this.w=0}ma(Rt,Hq); +Rt.prototype.serializeEdgeProperties=function(a,b){Hq.prototype.serializeEdgeProperties.call(this,a,b);a.valid=this.valid;a.rev=this.rev;a.forest=this.forest;a.portFromPos=this.portFromPos;a.portToPos=this.portToPos;a.portFromColOffset=this.portFromColOffset;a.portToColOffset=this.portToColOffset}; +Rt.prototype.deserializeEdgeProperties=function(a,b,c,d){Hq.prototype.deserializeEdgeProperties.call(this,a,b,c,d);this.valid=a.valid;this.rev=a.rev;this.forest=a.forest;this.portFromPos=a.portFromPos;this.portToPos=a.portToPos;this.portFromColOffset=a.portFromColOffset;this.portToColOffset=a.portToColOffset}; +na.Object.defineProperties(Rt.prototype,{fromVertex:{configurable:!0,get:function(){return this.dd},set:function(a){this.dd!==a&&(F&&null!==a&&w(a,Qt,Rt,"fromVertex"),this.dd=a)}},toVertex:{configurable:!0,get:function(){return this.ld},set:function(a){this.ld!==a&&(F&&null!==a&&w(a,Qt,Rt,"toVertex"),this.ld=a)}},valid:{configurable:!0,get:function(){return this.kb},set:function(a){this.kb!==a&&(A(a,"boolean",Rt,"valid"),this.kb=a)}},rev:{configurable:!0, +enumerable:!0,get:function(){return this.Qa},set:function(a){this.Qa!==a&&(A(a,"boolean",Rt,"rev"),this.Qa=a)}},forest:{configurable:!0,get:function(){return this.l},set:function(a){this.l!==a&&(A(a,"boolean",Rt,"forest"),this.l=a)}},portFromPos:{configurable:!0,get:function(){return this.L},set:function(a){this.L!==a&&(A(a,"number",Rt,"portFromPos"),this.L=a)}},portToPos:{configurable:!0,get:function(){return this.Pa},set:function(a){this.Pa!==a&&(A(a,"number", +Rt,"portToPos"),this.Pa=a)}},portFromColOffset:{configurable:!0,get:function(){return this.w},set:function(a){this.w!==a&&(A(a,"number",Rt,"portFromColOffset"),this.w=a)}},portToColOffset:{configurable:!0,get:function(){return this.W},set:function(a){this.W!==a&&(A(a,"number",Rt,"portToColOffset"),this.W=a)}}});Rt.className="LayeredDigraphEdge"; +function Z(){0b.level)return!1;a.removeChild(c.parent,c)}return!0} +Z.prototype.removeChild=function(a,b){if(null!==a&&null!==b){F&&w(a,Yt,Z,"removeChild:p");F&&w(b,Yt,Z,"removeChild:c");for(var c=a.children,d=0,e=0;ee?Ku(a,g,ka,x,z):Lu(a,g,ka,x,z);ka=z.x;x=z.width;z=z.height;break;case uu:for(D=0;Dn&&(QXa&&(Qu(a,-Xa,0,xa,Aa-1),Ru(D,-Xa,0),Ru(G,-Xa,0),Xa=0)}Ua.V.h(Xa,ca);x=Math.max(x,M);z=Math.max(z,B+(0===T?0:q)+tb.height);Q=M}else{0n&&(caXa&&(Qu(a,0,-Xa,xa,Aa-1),Ru(D,0,-Xa),Ru(G,0,-Xa),Xa=0);Ua.V.h(Q,Xa);z=Math.max(z,Y);x=Math.max(x,B+(0===T?0:q)+tb.width);ca=Y}P++}0l&&(l=0),135u&&(u=0),k===vu&&(h+=p/2+a.focus.y),g+=d+c):b?(null===a.comments?d>x&&(x=Wu(k,d-x,0),g=x.x,h=x.y,x=d,l=0):x=Uu(a,x,l),0>l&&(g-=l,l=0),135z&&(z=Wu(k,0,y-z),g=z.x,h=z.y,z=y,u=0):z=Vu(a,z,u),0>u&&(h-=u,u=0),g+=d+c);if(0e[0].x?e[2].assign(e[1]):e[1].assign(e[2])),e[3].ye[0].x?e[3].assign(e[2]):e[2].assign(e[3])),T[0].h(l+d,0),T[1].h(T[0].x,y),T[2].ye[0].y?e[2].assign(e[1]):e[1].assign(e[2])),e[3].xe[0].y?e[3].assign(e[2]):e[2].assign(e[3])),T[0].h(0,u+y),T[1].h(d,T[0].y),T[2].xd?Ku(b,e,P,B,D):Lu(b,e,P,B,D);P=D.x;B=D.width;D=D.height;break;case uu:for(a=0;ap&&(Mp&&(Yn&&(n=0),135x&&(x=0));b.la.h(n,x);b.Ba.h(B,D)}} +function Ku(a,b,c,d,e){F&&w(a,Yt,Z,"layoutBusChildrenPosDir:v");var f=b.length;if(0===f)return new L(c,0,d,e);if(1===f)return a=b[0],d=a.Ba.width,e=a.Ba.height,new L(c,0,d,e);for(var g=a.nodeSpacing,h=a.rowSpacing,k=90===Fu(a),l=0,m=0,n=0,p=0;pk&&(d-=k),e=Math.max(e,Math.max(p,n)+h+f.height), +0>b.V.x&&(c=$u(a,b.V.x,!1,c,g))):(b.V.h(d+h,c+g/2-b.focus.y-b.la.y),d=Math.max(d,Math.max(r,m)+h+f.width),n=c+g/2-b.focus.y-b.la.y,e=Math.max(e,n+f.height),0>n&&(e-=n),0>b.V.y&&(c=$u(a,b.V.y,!0,c,g))));return new L(c,0,d,e)} +function Lu(a,b,c,d,e){F&&w(a,Yt,Z,"layoutBusChildrenNegDir:v");var f=b.length;if(0===f)return new L(c,0,d,e);if(1===f)return b=b[0],d=b.Ba.width,e=b.Ba.height,new L(c,0,d,e);for(var g=a.nodeSpacing,h=a.rowSpacing,k=270===Fu(a),l=0,m=0,n=0,p=0;pm&&(d-=m),e=Math.max(e,Math.abs(Math.min(p,n))+q+l.height), +0>h.V.x&&(c=$u(a,h.V.x,!1,c,g))):(h.V.h(-d-l.width-q,c+g/2-h.focus.y-h.la.y),d=Math.max(d,Math.abs(Math.min(r,m))+q+l.width),n=c+g/2-h.focus.y-h.la.y,e=Math.max(e,n+l.height),0>n&&(e-=n),0>h.V.y&&(c=$u(a,h.V.y,!0,c,g))));for(a=0;ab&&(b=c+a.width),0>c&&(b-=c),b;case Gu:return a.width>b?a.width:b;case Hu:return 2*a.focus.x>b?a.width:b+a.width-2*a.focus.x;case tu:case ju:return Math.max(a.width,Math.max(b,c+a.width)-Math.min(0,c));case uu:return a.width-a.focus.x+a.nodeSpacing/2+b;case vu:return Math.max(a.width,a.focus.x+a.nodeSpacing/2+b);default:return b}} +function Vu(a,b,c){F&&w(a,Yt,Z,"calculateSubheight:v");switch(a.alignment){case Tu:case Su:return c+a.height>b&&(b=c+a.height),0>c&&(b-=c),b;case Gu:return a.height>b?a.height:b;case Hu:return 2*a.focus.y>b?a.height:b+a.height-2*a.focus.y;case tu:case ju:return Math.max(a.height,Math.max(b,c+a.height)-Math.min(0,c));case uu:return a.height-a.focus.y+a.nodeSpacing/2+b;case vu:return Math.max(a.height,a.focus.y+a.nodeSpacing/2+b);default:return b}} +function Wu(a,b,c){F&&w(a,E,Z,"alignOffset:align");switch(a){case Su:b/=2;c/=2;break;case Tu:b/=2;c/=2;break;case Gu:c=b=0;break;case Hu:break;default:v("Unhandled alignment value "+a.toString())}return new J(b,c)}function Nu(a,b,c,d,e,f){F&&w(a,Yt,Z,"shiftRelPosAlign:v");F&&w(b,E,Z,"shiftRelPosAlign:align");b=Wu(b,c,d);Qu(a,b.x,b.y,e,f)}function Qu(a,b,c,d,e){F&&w(a,Yt,Z,"shiftRelPos:v");if(0!==b||0!==c)for(a=a.children;d<=e;d++){var f=a[d].V;f.x+=b;f.y+=c}} +function Ou(a,b,c,d){F&&(w(b,Yt,Z,"recordMidPoints:v"),A(c,"number",Z,"recordMidPoints:x"),A(d,"number",Z,"recordMidPoints:y"));var e=b.parent;switch(a.qd){case Tt:for(a=b.sourceEdges;a.next();)b=a.value,b.fromVertex===e&&b.relativePoint.h(c,d);break;case $t:for(a=b.destinationEdges;a.next();)b=a.value,b.toVertex===e&&b.relativePoint.h(c,d);break;default:v("Unhandled path value "+a.qd.toString())}}function Ru(a,b,c){for(var d=0;dn.length||null===r||2>r.length))for(e=c= +0;cl&&f.yf.y&&lb.length||null===c||2>c.length)d=null;else{m=Mu(a,b.length+c.length);for(d=f=k=0;fk;)l=c[f++],m[d++].h(l.x+e,l.y);c=Mu(a,d);for(k=0;kn.length||null===f||2>f.length)e=null;else{m=Mu(a,n.length+f.length);for(e=l=c=0;cf;)k=n[c++],m[e++].h(k.x, +k.y);f=Mu(a,e);for(c=0;cn.length||null===r||2>r.length))for(e=c=0;ck&&f.xf.x&&kb.length||null===c||2>c.length)d=null;else{m=Mu(a,b.length+c.length);for(d=f=k=0;fk;)l=c[f++],m[d++].h(l.x,l.y+e);c=Mu(a,d);for(k=0;kn.length||null===f||2>f.length)e=null;else{m=Mu(a,n.length+f.length); +for(e=l=c=0;cf;)k=n[c++],m[e++].h(k.x,k.y);f=Mu(a,e);for(c=0;c=a?0:135>=a?90:225>=a?180:315>=a?270:0}function Iu(a){F&&w(a,Yt,Z,"computeLayerSpacing:v");var b=Fu(a);b=90===b||270===b;var c=a.layerSpacing;if(0=a&&(this.Y.nodeIndentPastParent=a,this.D()))}},nodeSpacing:{configurable:!0,get:function(){return this.Y.nodeSpacing},set:function(a){this.Y.nodeSpacing!==a&&(A(a,"number",Z,"nodeSpacing"),this.Y.nodeSpacing=a,this.D())}},layerSpacing:{configurable:!0,get:function(){return this.Y.layerSpacing},set:function(a){this.Y.layerSpacing!==a&&(A(a,"number",Z,"layerSpacing"),this.Y.layerSpacing=a,this.D())}},layerSpacingParentOverlap:{configurable:!0, +enumerable:!0,get:function(){return this.Y.layerSpacingParentOverlap},set:function(a){this.Y.layerSpacingParentOverlap!==a&&(A(a,"number",Z,"layerSpacingParentOverlap"),0<=a&&1>=a&&(this.Y.layerSpacingParentOverlap=a,this.D()))}},compaction:{configurable:!0,get:function(){return this.Y.compaction},set:function(a){this.Y.compaction!==a&&(gb(a,Z,Z,"compaction"),a===yu||a===Au)&&(this.Y.compaction=a,this.D())}},breadthLimit:{configurable:!0,get:function(){return this.Y.breadthLimit}, +set:function(a){this.Y.breadthLimit!==a&&(A(a,"number",Z,"breadthLimit"),0<=a&&(this.Y.breadthLimit=a,this.D()))}},rowSpacing:{configurable:!0,get:function(){return this.Y.rowSpacing},set:function(a){this.Y.rowSpacing!==a&&(A(a,"number",Z,"rowSpacing"),this.Y.rowSpacing=a,this.D())}},rowIndent:{configurable:!0,get:function(){return this.Y.rowIndent},set:function(a){this.Y.rowIndent!==a&&(A(a,"number",Z,"rowIndent"),0<=a&&(this.Y.rowIndent=a,this.D()))}},commentSpacing:{configurable:!0, +enumerable:!0,get:function(){return this.Y.commentSpacing},set:function(a){this.Y.commentSpacing!==a&&(A(a,"number",Z,"commentSpacing"),this.Y.commentSpacing=a,this.D())}},commentMargin:{configurable:!0,get:function(){return this.Y.commentMargin},set:function(a){this.Y.commentMargin!==a&&(A(a,"number",Z,"commentMargin"),this.Y.commentMargin=a,this.D())}},setsPortSpot:{configurable:!0,get:function(){return this.Y.setsPortSpot},set:function(a){this.Y.setsPortSpot!==a&&(A(a, +"boolean",Z,"setsPortSpot"),this.Y.setsPortSpot=a,this.D())}},portSpot:{configurable:!0,get:function(){return this.Y.portSpot},set:function(a){w(a,N,Z,"portSpot");this.Y.portSpot.A(a)||(this.Y.portSpot=a,this.D())}},setsChildPortSpot:{configurable:!0,get:function(){return this.Y.setsChildPortSpot},set:function(a){this.Y.setsChildPortSpot!==a&&(A(a,"boolean",Z,"setsChildPortSpot"),this.Y.setsChildPortSpot=a,this.D())}},childPortSpot:{configurable:!0,get:function(){return this.Y.childPortSpot}, +set:function(a){w(a,N,Z,"childPortSpot");this.Y.childPortSpot.A(a)||(this.Y.childPortSpot=a,this.D())}},alternateSorting:{configurable:!0,get:function(){return this.Z.sorting},set:function(a){this.Z.sorting!==a&&(gb(a,Z,Z,"alternateSorting"),a===ou||a===pu||a===qu||ru)&&(this.Z.sorting=a,this.D())}},alternateComparer:{configurable:!0,get:function(){return this.Z.comparer},set:function(a){this.Z.comparer!==a&&(A(a,"function",Z,"alternateComparer"),this.Z.comparer=a,this.D())}}, +alternateAngle:{configurable:!0,get:function(){return this.Z.angle},set:function(a){this.Z.angle!==a&&(A(a,"number",Z,"alternateAngle"),0===a||90===a||180===a||270===a)&&(this.Z.angle=a,this.D())}},alternateAlignment:{configurable:!0,get:function(){return this.Z.alignment},set:function(a){this.Z.alignment!==a&&(gb(a,Z,Z,"alternateAlignment"),this.Z.alignment=a,this.D())}},alternateNodeIndent:{configurable:!0,get:function(){return this.Z.nodeIndent},set:function(a){this.Z.nodeIndent!== +a&&(A(a,"number",Z,"alternateNodeIndent"),0<=a&&(this.Z.nodeIndent=a,this.D()))}},alternateNodeIndentPastParent:{configurable:!0,get:function(){return this.Z.nodeIndentPastParent},set:function(a){this.Z.nodeIndentPastParent!==a&&(A(a,"number",Z,"alternateNodeIndentPastParent"),0<=a&&1>=a&&(this.Z.nodeIndentPastParent=a,this.D()))}},alternateNodeSpacing:{configurable:!0,get:function(){return this.Z.nodeSpacing},set:function(a){this.Z.nodeSpacing!==a&&(A(a,"number",Z,"alternateNodeSpacing"), +this.Z.nodeSpacing=a,this.D())}},alternateLayerSpacing:{configurable:!0,get:function(){return this.Z.layerSpacing},set:function(a){this.Z.layerSpacing!==a&&(A(a,"number",Z,"alternateLayerSpacing"),this.Z.layerSpacing=a,this.D())}},alternateLayerSpacingParentOverlap:{configurable:!0,get:function(){return this.Z.layerSpacingParentOverlap},set:function(a){this.Z.layerSpacingParentOverlap!==a&&(A(a,"number",Z,"alternateLayerSpacingParentOverlap"),0<=a&&1>=a&&(this.Z.layerSpacingParentOverlap= +a,this.D()))}},alternateCompaction:{configurable:!0,get:function(){return this.Z.compaction},set:function(a){this.Z.compaction!==a&&(gb(a,Z,Z,"alternateCompaction"),a===yu||a===Au)&&(this.Z.compaction=a,this.D())}},alternateBreadthLimit:{configurable:!0,get:function(){return this.Z.breadthLimit},set:function(a){this.Z.breadthLimit!==a&&(A(a,"number",Z,"alternateBreadthLimit"),0<=a&&(this.Z.breadthLimit=a,this.D()))}},alternateRowSpacing:{configurable:!0,get:function(){return this.Z.rowSpacing}, +set:function(a){this.Z.rowSpacing!==a&&(A(a,"number",Z,"alternateRowSpacing"),this.Z.rowSpacing=a,this.D())}},alternateRowIndent:{configurable:!0,get:function(){return this.Z.rowIndent},set:function(a){this.Z.rowIndent!==a&&(A(a,"number",Z,"alternateRowIndent"),0<=a&&(this.Z.rowIndent=a,this.D()))}},alternateCommentSpacing:{configurable:!0,get:function(){return this.Z.commentSpacing},set:function(a){this.Z.commentSpacing!==a&&(A(a,"number",Z,"alternateCommentSpacing"), +this.Z.commentSpacing=a,this.D())}},alternateCommentMargin:{configurable:!0,get:function(){return this.Z.commentMargin},set:function(a){this.Z.commentMargin!==a&&(A(a,"number",Z,"alternateCommentMargin"),this.Z.commentMargin=a,this.D())}},alternateSetsPortSpot:{configurable:!0,get:function(){return this.Z.setsPortSpot},set:function(a){this.Z.setsPortSpot!==a&&(A(a,"boolean",Z,"alternateSetsPortSpot"),this.Z.setsPortSpot=a,this.D())}},alternatePortSpot:{configurable:!0, +enumerable:!0,get:function(){return this.Z.portSpot},set:function(a){w(a,N,Z,"alternatePortSpot");this.Z.portSpot.A(a)||(this.Z.portSpot=a,this.D())}},alternateSetsChildPortSpot:{configurable:!0,get:function(){return this.Z.setsChildPortSpot},set:function(a){this.Z.setsChildPortSpot!==a&&(A(a,"boolean",Z,"alternateSetsChildPortSpot"),this.Z.setsChildPortSpot=a,this.D())}},alternateChildPortSpot:{configurable:!0,get:function(){return this.Z.childPortSpot},set:function(a){w(a, +N,Z,"alternateChildPortSpot");this.Z.childPortSpot.A(a)||(this.Z.childPortSpot=a,this.D())}}}); +var St=new E(Z,"PathDefault",-1),Tt=new E(Z,"PathDestination",0),$t=new E(Z,"PathSource",1),ou=new E(Z,"SortingForwards",10),pu=new E(Z,"SortingReverse",11),qu=new E(Z,"SortingAscending",12),ru=new E(Z,"SortingDescending",13),Su=new E(Z,"AlignmentCenterSubtrees",20),Tu=new E(Z,"AlignmentCenterChildren",21),Gu=new E(Z,"AlignmentStart",22),Hu=new E(Z,"AlignmentEnd",23),tu=new E(Z,"AlignmentBus",24),ju=new E(Z,"AlignmentBusBranching",25),uu=new E(Z,"AlignmentTopLeftBus",26),vu=new E(Z,"AlignmentBottomRightBus", +27),yu=new E(Z,"CompactionNone",30),Au=new E(Z,"CompactionBlock",31),Ut=new E(Z,"StyleLayered",40),nu=new E(Z,"StyleLastParents",41),mu=new E(Z,"StyleAlternating",42),lu=new E(Z,"StyleRootOnly",43),Wt=new E(Z,"ArrangementVertical",50),bv=new E(Z,"ArrangementHorizontal",51),Zt=new E(Z,"ArrangementFixedRoots",52),Vt=new E(Z,"LayerIndividual",60),hu=new E(Z,"LayerSiblings",61),gu=new E(Z,"LayerUniform",62);Z.className="TreeLayout";Z.PathDefault=St;Z.PathDestination=Tt;Z.PathSource=$t; +Z.SortingForwards=ou;Z.SortingReverse=pu;Z.SortingAscending=qu;Z.SortingDescending=ru;Z.AlignmentCenterSubtrees=Su;Z.AlignmentCenterChildren=Tu;Z.AlignmentStart=Gu;Z.AlignmentEnd=Hu;Z.AlignmentBus=tu;Z.AlignmentBusBranching=ju;Z.AlignmentTopLeftBus=uu;Z.AlignmentBottomRightBus=vu;Z.CompactionNone=yu;Z.CompactionBlock=Au;Z.StyleLayered=Ut;Z.StyleLastParents=nu;Z.StyleAlternating=mu;Z.StyleRootOnly=lu;Z.ArrangementVertical=Wt;Z.ArrangementHorizontal=bv;Z.ArrangementFixedRoots=Zt;Z.LayerIndividual=Vt; +Z.LayerSiblings=hu;Z.LayerUniform=gu;function Xt(a){sq.call(this,a)}ma(Xt,sq);Xt.prototype.createVertex=function(){return new Yt(this)};Xt.prototype.createEdge=function(){return new dv(this)};Xt.className="TreeNetwork"; +function Yt(a){Gq.call(this,a);this.Pa=!1;this.Ic=null;this.L=[];this.Yc=this.kb=this.W=this.Qa=0;this.pd=null;this.V=new J(0,0);this.Ba=new Fb(0,0);this.la=new J(0,0);this.gn=this.fn=this.sB=!1;this.qr=this.cr=null;this.hd=ou;this.bd=Nq;this.dc=0;this.Db=Tu;this.Qs=this.Ps=0;this.Rs=20;this.Ee=50;this.Fs=0;this.Sr=Au;this.Kr=0;this.dt=25;this.Rr=this.ct=10;this.Qr=20;this.qt=!0;this.Zs=fd;this.pt=!0;this.Nr=fd}ma(Yt,Gq); +Yt.prototype.copyInheritedPropertiesFrom=function(a){null!==a&&(this.hd=a.sorting,this.bd=a.comparer,this.dc=a.angle,this.Db=a.alignment,this.Ps=a.nodeIndent,this.Qs=a.nodeIndentPastParent,this.Rs=a.nodeSpacing,this.Ee=a.layerSpacing,this.Fs=a.layerSpacingParentOverlap,this.Sr=a.compaction,this.Kr=a.breadthLimit,this.dt=a.rowSpacing,this.ct=a.rowIndent,this.Rr=a.commentSpacing,this.Qr=a.commentMargin,this.qt=a.setsPortSpot,this.Zs=a.portSpot,this.pt=a.setsChildPortSpot,this.Nr=a.childPortSpot)}; +na.Object.defineProperties(Yt.prototype,{initialized:{configurable:!0,get:function(){return this.Pa},set:function(a){this.Pa!==a&&(A(a,"boolean",Yt,"initialized"),this.Pa=a)}},parent:{configurable:!0,get:function(){return this.Ic},set:function(a){this.Ic!==a&&(F&&null!==a&&w(a,Yt,Yt,"parent"),this.Ic=a)}},children:{configurable:!0,get:function(){return this.L},set:function(a){if(this.L!==a){null===a||Array.isArray(a)||ya(a,"Array",Yt,"children:value");if(null!== +a)for(var b=a.length,c=0;cp.y+c.rowIndent&&(e=Math.min(e,Math.max(m.y,e-Ju(c))))):c.alignment===Gu?(e=d.top+b.y,0===b.y&&m.yp.x+c.rowIndent&&(e=Math.min(e,Math.max(m.x,e-Ju(c))))):c.alignment===Gu?(e=d.left+b.x,0===b.x&&m.xp.y+c.rowIndent&&(e=Math.min(e,Math.max(m.y,e-Ju(c))))):c.alignment===Gu?(e=d.top+b.y,0===b.y&&m.yp.x+c.rowIndent&&(e=Math.min(e,Math.max(m.x,e-Ju(c))))):c.alignment===Gu?(e=d.left+b.x,0===b.x&&m.x