jh-gojs
Version:
Interactive diagrams, charts, and graphs, such as trees, flowcharts, orgcharts, UML, BPMN, or business diagrams
124 lines • 991 kB
JavaScript
/*
* GoJS v2.2.3 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-2022 by Northwoods Software Corporation. All Rights Reserved.
* THIS SOFTWARE IS LICENSED. THE LICENSE AGREEMENT IS AT: https://gojs.net/2.2.3/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 b<a.length?{done:!1,value:a[b++]}:{done:!0}}}function ca(a){var b="undefined"!=typeof Symbol&&Symbol.iterator&&a[Symbol.iterator];return b?b.call(a):{next:aa(a)}}function da(a){for(var b,c=[];!(b=a.next()).done;)c.push(b.value);return c}var ea="function"==typeof Object.create?Object.create:function(a){function b(){}b.prototype=a;return new b},fa;
if("function"==typeof Object.setPrototypeOf)fa=Object.setPrototypeOf;else{var ha;a:{var ia={a:!0},ja={};try{ja.__proto__=ia;ha=ja.a;break a}catch(a){}ha=!1}fa=ha?function(a,b){a.__proto__=b;if(a.__proto__!==b)throw new TypeError(a+" is not extensible");return a}:null}var la=fa;
function ma(a,b){a.prototype=ea(b.prototype);a.prototype.constructor=a;if(la)la(a,b);else for(var c in b)if("prototype"!=c)if(Object.defineProperties){var d=Object.getOwnPropertyDescriptor(b,c);d&&Object.defineProperty(a,c,d)}else a[c]=b[c];a.DB=b.prototype}
var na="undefined"!=typeof global&&null!=global?global:self,oa="function"==typeof Object.assign?Object.assign:function(a,b){for(var c=1;c<arguments.length;c++){var d=arguments[c];if(d)for(var e in d)Object.prototype.hasOwnProperty.call(d,e)&&(a[e]=d[e])}return a},pa="function"==typeof Object.defineProperties?Object.defineProperty:function(a,b,c){a!=Array.prototype&&a!=Object.prototype&&(a[b]=c.value)};
function qa(a,b){if(b){var c=na;a=a.split(".");for(var d=0;d<a.length-1;d++){var e=a[d];e in c||(c[e]={});c=c[e]}a=a[a.length-1];d=c[a];b=b(d);b!=d&&null!=b&&pa(c,a,{configurable:!0,writable:!0,value:b})}}qa("Object.assign",function(a){return a||oa});
qa("String.prototype.startsWith",function(a){return a?a:function(a,c){if(null==this)throw new TypeError("The 'this' value for String.prototype.startsWith must not be null or undefined");if(a instanceof RegExp)throw new TypeError("First argument to String.prototype.startsWith must not be a regular expression");var b=this.length,e=a.length;c=Math.max(0,Math.min(c|0,this.length));for(var f=0;f<e&&c<b;)if(this[c++]!=a[f++])return!1;return f>=e}});
qa("Array.prototype.fill",function(a){return a?a:function(a,c,d){var b=this.length||0;0>c&&(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<d;c++)this[c]=a;return this}});var ra="object"===typeof globalThis&&globalThis||"object"===typeof global&&global.global===global&&global||"object"===typeof self&&self.self===self&&self||{};void 0===ra.requestAnimationFrame&&(void 0===ra.setImmediate?ra.requestAnimationFrame=function(a){ra.setTimeout(a,0)}:ra.requestAnimationFrame=ra.setImmediate);function sa(){}function ta(a,b){var c=-1;return function(){var d=this,e=arguments;-1!==c&&ra.clearTimeout(c);c=ua(function(){c=-1;a.apply(d,e)},b)}}
function ua(a,b){return ra.setTimeout(a,b)}function va(a){return ra.document.createElement(a)}function v(a){throw Error(a);}function wa(a,b){a="The object is frozen, so its properties cannot be set: "+a.toString();void 0!==b&&(a+=" to value: "+b);v(a)}function w(a,b,c,d){a instanceof b||(c=ya(c),void 0!==d&&(c+="."+d),za(a,b,c))}function A(a,b,c,d){typeof a!==b&&(c=ya(c),void 0!==d&&(c+="."+d),za(a,b,c))}
function D(a,b,c){"number"===typeof a&&isFinite(a)||(b=ya(b),void 0!==c&&(b+="."+c),v(b+" must be a real number type, and not NaN or Infinity: "+a))}function za(a,b,c,d){b=" value is not an instance of "+ya(b)+": ";c=ya(c);void 0!==d&&(c+="."+d);"string"===typeof a&&(a='"'+a+'"');v(c+b+a)}function Ba(a,b,c,d){c=ya(c);void 0!==d&&(c+="."+d);v(c+" is not in the range "+b+": "+a)}function Ca(a){v(("string"===typeof a.className?a.className:"")+" constructor cannot take any arguments.")}
function Da(a){v("Collection was modified during iteration: "+a.toString()+"\n Perhaps you should iterate over a copy of the collection,\n or you could collect items to be removed from the collection after the iteration.")}function Ea(a,b){v("No property to set for this enum value: "+b+" on "+a.toString())}function Fa(a){ra.console&&ra.console.log(a)}function Ga(a){return"object"===typeof a&&null!==a}
function Ha(a){return Array.isArray(a)||ra.NodeList&&a instanceof ra.NodeList||ra.HTMLCollection&&a instanceof ra.HTMLCollection}function Ia(a,b,c){Ha(a)||za(a,"Array or NodeList or HTMLCollection",b,c)}function Ja(a){return Array.prototype.slice.call(a)}function Ka(a,b,c){Array.isArray(a)?b>=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 ya(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.tB;if(c&&c[b])return!0;a=Object.getPrototypeOf(a)}return!1}
function Ta(a,b,c){Object.defineProperty(Ua.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;e<a.length;e+=2)c[d++]=b[a.substr(e,2)];a=c.join("");a=""===a?"0":a;b=[];for(c=0;256>c;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;g<a.length;g++)c=(c+1)%256,d=(d+b[c])%256,e=b[c],b[c]=b[d],b[d]=e,f+=String.fromCharCode(a.charCodeAt(g)^b[(b[c]+b[d])%256]);return f}
var Wa=void 0!==ra.navigator&&0<ra.navigator.userAgent.indexOf("Trident/7"),Za=void 0!==ra.navigator&&0<ra.navigator.userAgent.indexOf("Edge/"),$a=void 0!==ra.navigator&&void 0!==ra.navigator.platform&&0<=ra.navigator.platform.toUpperCase().indexOf("MAC"),ab=void 0!==ra.navigator&&void 0!==ra.navigator.platform&&null!==ra.navigator.platform.match(/(iPhone|iPod|iPad)/i),Na=[];Object.freeze([]);sa.className="Util";sa.Dx="32ab5ff3b26f42dc0ed90f21462913b5";sa.adym="gojs.net";sa.vfo="28e644fdb0";
sa.className="Util";function F(a,b,c){cb(this);this.j=a;this.ta=b;this.o=c}F.prototype.toString=function(){return"EnumValue."+this.ta};function db(a,b){return void 0===b||null===b||""===b?null:a[b]}function eb(a,b,c,d){a.classType!==b&&(c=ya(c),void 0!==d&&(c+="."+d),za(a,"function"==="a constant of class "+typeof b.className?b.className:"",c))}
na.Object.defineProperties(F.prototype,{classType:{configurable:!0,get:function(){return this.j}},name:{configurable:!0,get:function(){return this.ta}},value:{configurable:!0,get:function(){return this.o}}});F.className="EnumValue";function fb(){this.Uw=[]}fb.prototype.toString=function(){return this.Uw.join("")};fb.prototype.add=function(a){""!==a&&this.Uw.push(a)};fb.className="StringBuilder";function gb(){}gb.className="PropertyCollection";
var G={im:!1,ey:!1,vB:!1,xB:!1,BB:!1,vy:!1,by:!1,uB:null,trace:function(a){ra.console&&ra.console.log(a)},wB:function(a,b,c,d){a.strokeStyle="red";a.fillStyle="red";a.font="8px sans-serif";a.beginPath();a.moveTo(-10,0);a.lineTo(10,0);a.moveTo(0,-10);a.lineTo(0,10);a.stroke();a.setTransform(1,0,0,1,0,0);a.scale(c,c);a.transform(b.m11,b.m12,b.m21,b.m22,b.dx,b.dy);a.lineWidth=2;a.beginPath();a.moveTo(d.left,d.top+20);a.lineTo(d.left,d.top);a.lineTo(d.left+20,d.top);a.moveTo(d.right,d.bottom-20);a.lineTo(d.right,
d.bottom);a.lineTo(d.right-20,d.bottom);a.stroke();a.fillText("DB: "+Math.round(d.x)+", "+Math.round(d.y)+", "+Math.round(d.width)+", "+Math.round(d.height),d.left,d.top-5)},yz:function(a){var b={},c;for(c in a){b.x=c;if("licenseKey"!==b.x){var d=a[b.x];if(void 0!==d.prototype){b.ym=Object.getOwnPropertyNames(d.prototype);for(var e={nk:0};e.nk<b.ym.length;e={nk:e.nk},e.nk++){var f=Object.getOwnPropertyDescriptor(d.prototype,b.ym[e.nk]);void 0!==f.get&&void 0===f.set&&Object.defineProperty(d.prototype,
b.ym[e.nk],{set:function(a,b){return function(){throw Error("Property "+a.ym[b.nk]+" of "+a.x+" is read-only.");}}(b,e)})}}}b={ym:b.ym,x:b.x}}}};function hb(){}hb.prototype.reset=function(){};hb.prototype.next=function(){return!1};hb.prototype.wd=function(){return!1};hb.prototype.first=function(){return null};hb.prototype.any=function(){return!1};hb.prototype.all=function(){return!0};hb.prototype.each=function(){return this};hb.prototype.map=function(){return this};hb.prototype.filter=function(){return this};
hb.prototype.$d=function(){};hb.prototype.toString=function(){return"EmptyIterator"};na.Object.defineProperties(hb.prototype,{iterator:{configurable:!0,get:function(){return this}},count:{configurable:!0,get:function(){return 0}}});hb.prototype.first=hb.prototype.first;hb.prototype.hasNext=hb.prototype.wd;hb.prototype.next=hb.prototype.next;hb.prototype.reset=hb.prototype.reset;var ib=null;hb.className="EmptyIterator";ib=new hb;function jb(a){this.key=-1;this.value=a}
jb.prototype.reset=function(){this.key=-1};jb.prototype.next=function(){return-1===this.key?(this.key=0,!0):!1};jb.prototype.wd=function(){return this.next()};jb.prototype.first=function(){this.key=0;return this.value};jb.prototype.any=function(a){this.key=-1;return a(this.value)};jb.prototype.all=function(a){this.key=-1;return a(this.value)};jb.prototype.each=function(a){this.key=-1;a(this.value);return this};jb.prototype.map=function(a){return new jb(a(this.value))};
jb.prototype.filter=function(a){return a(this.value)?new jb(this.value):ib};jb.prototype.$d=function(){this.value=null};jb.prototype.toString=function(){return"SingletonIterator("+this.value+")"};na.Object.defineProperties(jb.prototype,{iterator:{configurable:!0,get:function(){return this}},count:{configurable:!0,get:function(){return 1}}});jb.prototype.first=jb.prototype.first;jb.prototype.hasNext=jb.prototype.wd;jb.prototype.next=jb.prototype.next;
jb.prototype.reset=jb.prototype.reset;jb.className="SingletonIterator";function kb(a){this.vb=a;this.sf=null;a.Oa=null;this.oa=a.w;this.Xa=-1}kb.prototype.reset=function(){var a=this.vb;a.Oa=null;this.oa=a.w;this.Xa=-1};kb.prototype.next=function(){var a=this.vb;if(a.w!==this.oa){if(0>this.key)return!1;Da(a)}a=a.m;var b=a.length,c=++this.Xa,d=this.sf;if(null!==d)for(;c<b;){var e=a[c];if(d(e))return this.key=this.Xa=c,this.value=e,!0;c++}else{if(c<b)return this.key=c,this.value=a[c],!0;this.$d()}return!1};
kb.prototype.wd=function(){return this.next()};kb.prototype.first=function(){var a=this.vb;this.oa=a.w;this.Xa=0;a=a.m;var b=a.length,c=this.sf;if(null!==c){for(var d=0;d<b;){var e=a[d];if(c(e))return this.key=this.Xa=d,this.value=e;d++}return null}return 0<b?(a=a[0],this.key=0,this.value=a):null};kb.prototype.any=function(a){var b=this.vb;b.Oa=null;var c=b.w;this.Xa=-1;for(var d=b.m,e=d.length,f=this.sf,g=0;g<e;g++){var h=d[g];if(null===f||f(h)){if(a(h))return!0;b.w!==c&&Da(b)}}return!1};
kb.prototype.all=function(a){var b=this.vb;b.Oa=null;var c=b.w;this.Xa=-1;for(var d=b.m,e=d.length,f=this.sf,g=0;g<e;g++){var h=d[g];if(null===f||f(h)){if(!a(h))return!1;b.w!==c&&Da(b)}}return!0};kb.prototype.each=function(a){var b=this.vb;b.Oa=null;var c=b.w;this.Xa=-1;for(var d=b.m,e=d.length,f=this.sf,g=0;g<e;g++){var h=d[g];if(null===f||f(h))a(h),b.w!==c&&Da(b)}return this};
kb.prototype.map=function(a){var b=this.vb;b.Oa=null;var c=b.w;this.Xa=-1;for(var d=[],e=b.m,f=e.length,g=this.sf,h=0;h<f;h++){var k=e[h];if(null===g||g(k))d.push(a(k)),b.w!==c&&Da(b)}a=new H;a.m=d;a.qb();return a.iterator};kb.prototype.filter=function(a){var b=this.vb;b.Oa=null;var c=b.w;this.Xa=-1;for(var d=[],e=b.m,f=e.length,g=this.sf,h=0;h<f;h++){var k=e[h];if(null===g||g(k))a(k)&&d.push(k),b.w!==c&&Da(b)}a=new H;a.m=d;a.qb();return a.iterator};
kb.prototype.$d=function(){this.key=-1;this.value=null;this.oa=-1;this.sf=null;this.vb.Oa=this};kb.prototype.toString=function(){return"ListIterator@"+this.Xa+"/"+this.vb.count};
na.Object.defineProperties(kb.prototype,{iterator:{configurable:!0,get:function(){return this}},predicate:{configurable:!0,get:function(){return this.sf},set:function(a){this.sf=a}},count:{configurable:!0,get:function(){var a=this.sf;if(null!==a){for(var b=0,c=this.vb.m,d=c.length,e=0;e<d;e++)a(c[e])&&b++;return b}return this.vb.m.length}}});kb.prototype.first=kb.prototype.first;kb.prototype.hasNext=kb.prototype.wd;kb.prototype.next=kb.prototype.next;
kb.prototype.reset=kb.prototype.reset;kb.className="ListIterator";function lb(a){this.vb=a;a.fh=null;this.oa=a.w;this.Xa=a.m.length}lb.prototype.reset=function(){var a=this.vb;a.fh=null;this.oa=a.w;this.Xa=a.m.length};lb.prototype.next=function(){var a=this.vb;if(a.w!==this.oa){if(0>this.key)return!1;Da(a)}var b=--this.Xa;if(0<=b)return this.key=b,this.value=a.m[b],!0;this.$d();return!1};lb.prototype.wd=function(){return this.next()};
lb.prototype.first=function(){var a=this.vb;this.oa=a.w;var b=a.m;this.Xa=a=b.length-1;return 0<=a?(b=b[a],this.key=a,this.value=b):null};lb.prototype.any=function(a){var b=this.vb;b.fh=null;var c=b.w,d=b.m,e=d.length;this.Xa=e;for(--e;0<=e;e--){if(a(d[e]))return!0;b.w!==c&&Da(b)}return!1};lb.prototype.all=function(a){var b=this.vb;b.fh=null;var c=b.w,d=b.m,e=d.length;this.Xa=e;for(--e;0<=e;e--){if(!a(d[e]))return!1;b.w!==c&&Da(b)}return!0};
lb.prototype.each=function(a){var b=this.vb;b.fh=null;var c=b.w,d=b.m,e=d.length;this.Xa=e;for(--e;0<=e;e--)a(d[e]),b.w!==c&&Da(b);return this};lb.prototype.map=function(a){var b=this.vb;b.fh=null;var c=b.w,d=[],e=b.m,f=e.length;this.Xa=f;for(--f;0<=f;f--)d.push(a(e[f])),b.w!==c&&Da(b);a=new H;a.m=d;a.qb();return a.iterator};
lb.prototype.filter=function(a){var b=this.vb;b.fh=null;var c=b.w,d=[],e=b.m,f=e.length;this.Xa=f;for(--f;0<=f;f--){var g=e[f];a(g)&&d.push(g);b.w!==c&&Da(b)}a=new H;a.m=d;a.qb();return a.iterator};lb.prototype.$d=function(){this.key=-1;this.value=null;this.oa=-1;this.vb.fh=this};lb.prototype.toString=function(){return"ListIteratorBackwards("+this.Xa+"/"+this.vb.count+")"};
na.Object.defineProperties(lb.prototype,{iterator:{configurable:!0,get:function(){return this}},count:{configurable:!0,get:function(){return this.vb.m.length}}});lb.prototype.first=lb.prototype.first;lb.prototype.hasNext=lb.prototype.wd;lb.prototype.next=lb.prototype.next;lb.prototype.reset=lb.prototype.reset;lb.className="ListIteratorBackwards";
function H(a){cb(this);this.u=!1;this.m=[];this.w=0;this.fh=this.Oa=null;(G&&"function"===typeof a||"string"===typeof a)&&v("Error: Since 2.0 List/Map/Set constructors no longer take an argument that enforces type.");void 0!==a&&this.addAll(a)}t=H.prototype;t.qb=function(){var a=this.w;a++;999999999<a&&(a=0);this.w=a};t.freeze=function(){this.u=!0;return this};t.ka=function(){this.u=!1;return this};t.toString=function(){return"List()#"+mb(this)};
t.add=function(a){if(null===a)return this;this.u&&wa(this,a);this.m.push(a);this.qb();return this};t.push=function(a){this.add(a)};t.addAll=function(a){if(null===a)return this;this.u&&wa(this);var b=this.m;if(Ha(a))for(var c=a.length,d=0;d<c;d++)b.push(a[d]);else for(a=a.iterator;a.next();)b.push(a.value);this.qb();return this};t.clear=function(){this.u&&wa(this);this.m.length=0;this.qb()};t.contains=function(a){return null===a?!1:-1!==this.m.indexOf(a)};t.has=function(a){return this.contains(a)};
t.indexOf=function(a){return null===a?-1:this.m.indexOf(a)};t.M=function(a){G&&D(a,H,"elt:i");var b=this.m;(0>a||a>=b.length)&&Ba(a,"0 <= i < length",H,"elt:i");return b[a]};t.get=function(a){return this.M(a)};t.Vc=function(a,b){G&&D(a,H,"setElt:i");var c=this.m;(0>a||a>=c.length)&&Ba(a,"0 <= i < length",H,"setElt:i");this.u&&wa(this,a);c[a]=b};t.set=function(a,b){this.Vc(a,b)};t.first=function(){var a=this.m;return 0===a.length?null:a[0]};
t.fc=function(){var a=this.m,b=a.length;return 0<b?a[b-1]:null};t.pop=function(){this.u&&wa(this);var a=this.m;return 0<a.length?a.pop():null};H.prototype.any=function(a){for(var b=this.m,c=this.w,d=b.length,e=0;e<d;e++){if(a(b[e]))return!0;this.w!==c&&Da(this)}return!1};H.prototype.all=function(a){for(var b=this.m,c=this.w,d=b.length,e=0;e<d;e++){if(!a(b[e]))return!1;this.w!==c&&Da(this)}return!0};
H.prototype.each=function(a){for(var b=this.m,c=this.w,d=b.length,e=0;e<d;e++)a(b[e]),this.w!==c&&Da(this);return this};H.prototype.map=function(a){for(var b=new H,c=[],d=this.m,e=this.w,f=d.length,g=0;g<f;g++)c.push(a(d[g])),this.w!==e&&Da(this);b.m=c;b.qb();return b};H.prototype.filter=function(a){for(var b=new H,c=[],d=this.m,e=this.w,f=d.length,g=0;g<f;g++){var h=d[g];a(h)&&c.push(h);this.w!==e&&Da(this)}b.m=c;b.qb();return b};t=H.prototype;
t.Ab=function(a,b){G&&D(a,H,"insertAt:i");0>a&&Ba(a,">= 0",H,"insertAt:i");this.u&&wa(this,a);var c=this.m;a>=c.length?c.push(b):c.splice(a,0,b);this.qb()};t.remove=function(a){if(null===a)return!1;this.u&&wa(this,a);var b=this.m;a=b.indexOf(a);if(-1===a)return!1;a===b.length-1?b.pop():b.splice(a,1);this.qb();return!0};t.delete=function(a){return this.remove(a)};
t.kb=function(a){G&&D(a,H,"removeAt:i");var b=this.m;(0>a||a>=b.length)&&Ba(a,"0 <= i < length",H,"removeAt:i");this.u&&wa(this,a);a===b.length-1?b.pop():b.splice(a,1);this.qb()};t.removeRange=function(a,b){G&&(D(a,H,"removeRange:from"),D(b,H,"removeRange:to"));var c=this.m,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.u&&wa(this);for(var e=a,f=b+1;f<d;)c[e++]=c[f++];c.length=d-(b-a+1);this.qb();return this};
H.prototype.copy=function(){var a=new H,b=this.m;0<b.length&&(a.m=Array.prototype.slice.call(b));return a};t=H.prototype;t.Fa=function(){for(var a=this.m,b=this.count,c=Array(b),d=0;d<b;d++)c[d]=a[d];return c};t.lw=function(){for(var a=new I,b=this.m,c=this.count,d=0;d<c;d++)a.add(b[d]);return a};t.sort=function(a){G&&A(a,"function",H,"sort:sortfunc");this.u&&wa(this);this.m.sort(a);this.qb();return this};
t.gj=function(a,b,c){var d=this.m,e=d.length;void 0===b&&(b=0);void 0===c&&(c=e);G&&(A(a,"function",H,"sortRange:sortfunc"),D(b,H,"sortRange:from"),D(c,H,"sortRange:to"));this.u&&wa(this);var f=c-b;if(1>=f)return this;(0>b||b>=e-1)&&Ba(b,"0 <= from < length",H,"sortRange:from");if(2===f)return c=d[b],e=d[b+1],0<a(c,e)&&(d[b]=e,d[b+1]=c,this.qb()),this;if(0===b)if(c>=e)d.sort(a);else for(b=d.slice(0,c),b.sort(a),a=0;a<c;a++)d[a]=b[a];else if(c>=e)for(c=d.slice(b),c.sort(a),a=b;a<e;a++)d[a]=c[a-b];
else for(e=d.slice(b,c),e.sort(a),a=b;a<c;a++)d[a]=e[a-b];this.qb();return this};t.reverse=function(){this.u&&wa(this);this.m.reverse();this.qb();return this};
na.Object.defineProperties(H.prototype,{_dataArray:{configurable:!0,get:function(){return this.m}},count:{configurable:!0,get:function(){return this.m.length}},size:{configurable:!0,get:function(){return this.m.length}},length:{configurable:!0,get:function(){return this.m.length}},iterator:{configurable:!0,get:function(){if(0>=this.m.length)return ib;var a=this.Oa;return null!==a?(a.reset(),a):new kb(this)}},iteratorBackwards:{configurable:!0,
enumerable:!0,get:function(){if(0>=this.m.length)return ib;var a=this.fh;return null!==a?(a.reset(),a):new lb(this)}}});H.prototype.reverse=H.prototype.reverse;H.prototype.sortRange=H.prototype.gj;H.prototype.sort=H.prototype.sort;H.prototype.toSet=H.prototype.lw;H.prototype.toArray=H.prototype.Fa;H.prototype.removeRange=H.prototype.removeRange;H.prototype.removeAt=H.prototype.kb;H.prototype["delete"]=H.prototype.delete;H.prototype.remove=H.prototype.remove;H.prototype.insertAt=H.prototype.Ab;
H.prototype.pop=H.prototype.pop;H.prototype.last=H.prototype.fc;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 nb(a){this.sg=a;a.Oa=null;this.oa=a.w;this.qa=null}nb.prototype.reset=function(){var a=this.sg;a.Oa=null;this.oa=a.w;this.qa=null};nb.prototype.next=function(){var a=this.sg;if(a.w!==this.oa){if(null===this.key)return!1;Da(a)}var b=this.qa;b=null===b?a.ga:b.ua;if(null!==b)return this.qa=b,this.value=b.value,this.key=b.key,!0;this.$d();return!1};nb.prototype.wd=function(){return this.next()};
nb.prototype.first=function(){var a=this.sg;this.oa=a.w;a=a.ga;if(null!==a){this.qa=a;var b=a.value;this.key=a.key;return this.value=b}return null};nb.prototype.any=function(a){var b=this.sg;b.Oa=null;var c=b.w;this.qa=null;for(var d=b.ga;null!==d;){if(a(d.value))return!0;b.w!==c&&Da(b);d=d.ua}return!1};nb.prototype.all=function(a){var b=this.sg;b.Oa=null;var c=b.w;this.qa=null;for(var d=b.ga;null!==d;){if(!a(d.value))return!1;b.w!==c&&Da(b);d=d.ua}return!0};
nb.prototype.each=function(a){var b=this.sg;b.Oa=null;var c=b.w;this.qa=null;for(var d=b.ga;null!==d;)a(d.value),b.w!==c&&Da(b),d=d.ua;return this};nb.prototype.map=function(a){var b=this.sg;b.Oa=null;for(var c=new H,d=b.w,e=b.ga;null!==e;)c.add(a(e.value)),b.w!==d&&Da(b),e=e.ua;return c.iterator};nb.prototype.filter=function(a){var b=this.sg;b.Oa=null;for(var c=new H,d=b.w,e=b.ga;null!==e;){var f=e.value;a(f)&&c.add(f);b.w!==d&&Da(b);e=e.ua}return c.iterator};
nb.prototype.$d=function(){this.value=this.key=null;this.oa=-1;this.sg.Oa=this};nb.prototype.toString=function(){return null!==this.qa?"SetIterator@"+this.qa.value:"SetIterator"};na.Object.defineProperties(nb.prototype,{iterator:{configurable:!0,get:function(){return this}},count:{configurable:!0,get:function(){return this.sg.Ob}}});nb.prototype.first=nb.prototype.first;nb.prototype.hasNext=nb.prototype.wd;nb.prototype.next=nb.prototype.next;nb.prototype.reset=nb.prototype.reset;
nb.className="SetIterator";function I(a){cb(this);this.u=!1;this.Pb={};this.Ob=0;this.Oa=null;this.w=0;this.mf=this.ga=null;(G&&"function"===typeof a||"string"===typeof a)&&v("Error: Since 2.0 List/Map/Set constructors no longer take an argument that enforces type.");void 0!==a&&this.addAll(a)}t=I.prototype;t.qb=function(){var a=this.w;a++;999999999<a&&(a=0);this.w=a};t.freeze=function(){this.u=!0;return this};t.ka=function(){this.u=!1;return this};t.toString=function(){return"Set()#"+mb(this)};
t.add=function(a){if(null===a)return this;this.u&&wa(this,a);var b=a;Ga(a)&&(b=ob(a));void 0===this.Pb[b]&&(this.Ob++,a=new pb(a,a),this.Pb[b]=a,b=this.mf,null===b?this.ga=a:(a.Kl=b,b.ua=a),this.mf=a,this.qb());return this};t.addAll=function(a){if(null===a)return this;this.u&&wa(this);if(Ha(a))for(var b=a.length,c=0;c<b;c++)this.add(a[c]);else for(a=a.iterator;a.next();)this.add(a.value);return this};
t.contains=function(a){if(null===a)return!1;var b=a;return Ga(a)&&(b=mb(a),void 0===b)?!1:void 0!==this.Pb[b]};t.has=function(a){return this.contains(a)};t.Gz=function(a){if(null===a)return!0;for(a=a.iterator;a.next();)if(!this.contains(a.value))return!1;return!0};t.Hz=function(a){if(null===a)return!0;for(a=a.iterator;a.next();)if(this.contains(a.value))return!0;return!1};t.first=function(){var a=this.ga;return null===a?null:a.value};
I.prototype.any=function(a){for(var b=this.w,c=this.ga;null!==c;){if(a(c.value))return!0;this.w!==b&&Da(this);c=c.ua}return!1};I.prototype.all=function(a){for(var b=this.w,c=this.ga;null!==c;){if(!a(c.value))return!1;this.w!==b&&Da(this);c=c.ua}return!0};I.prototype.each=function(a){for(var b=this.w,c=this.ga;null!==c;)a(c.value),this.w!==b&&Da(this),c=c.ua;return this};I.prototype.map=function(a){for(var b=new I,c=this.w,d=this.ga;null!==d;)b.add(a(d.value)),this.w!==c&&Da(this),d=d.ua;return b};
I.prototype.filter=function(a){for(var b=new I,c=this.w,d=this.ga;null!==d;){var e=d.value;a(e)&&b.add(e);this.w!==c&&Da(this);d=d.ua}return b};t=I.prototype;t.remove=function(a){if(null===a)return!1;this.u&&wa(this,a);var b=a;if(Ga(a)&&(b=mb(a),void 0===b))return!1;a=this.Pb[b];if(void 0===a)return!1;var c=a.ua,d=a.Kl;null!==c&&(c.Kl=d);null!==d&&(d.ua=c);this.ga===a&&(this.ga=c);this.mf===a&&(this.mf=d);delete this.Pb[b];this.Ob--;this.qb();return!0};t.delete=function(a){return this.remove(a)};
t.Dq=function(a){if(null===a)return this;this.u&&wa(this);if(Ha(a))for(var b=a.length,c=0;c<b;c++)this.remove(a[c]);else for(a=a.iterator;a.next();)this.remove(a.value);return this};t.dB=function(a){if(null===a||0===this.count)return this;this.u&&wa(this);var b=new I;b.addAll(a);a=[];for(var c=this.iterator;c.next();){var d=c.value;b.contains(d)||a.push(d)}this.Dq(a);return this};t.clear=function(){this.u&&wa(this);this.Pb={};this.Ob=0;null!==this.Oa&&this.Oa.reset();this.mf=this.ga=null;this.qb()};
I.prototype.copy=function(){var a=new I,b=this.Pb,c;for(c in b)a.add(b[c].value);return a};I.prototype.Fa=function(){var a=Array(this.Ob),b=this.Pb,c=0,d;for(d in b)a[c]=b[d].value,c++;return a};I.prototype.kw=function(){var a=new H,b=this.Pb,c;for(c in b)a.add(b[c].value);return a};function cb(a){a.__gohashid=qb++}function ob(a){var b=a.__gohashid;void 0===b&&(b=qb++,a.__gohashid=b);return b}function mb(a){return a.__gohashid}
na.Object.defineProperties(I.prototype,{count:{configurable:!0,get:function(){return this.Ob}},size:{configurable:!0,get:function(){return this.Ob}},iterator:{configurable:!0,get:function(){if(0>=this.Ob)return ib;var a=this.Oa;return null!==a?(a.reset(),a):new nb(this)}}});I.prototype.toList=I.prototype.kw;I.prototype.toArray=I.prototype.Fa;I.prototype.clear=I.prototype.clear;I.prototype.retainAll=I.prototype.dB;I.prototype.removeAll=I.prototype.Dq;
I.prototype["delete"]=I.prototype.delete;I.prototype.remove=I.prototype.remove;I.prototype.first=I.prototype.first;I.prototype.containsAny=I.prototype.Hz;I.prototype.containsAll=I.prototype.Gz;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 qb=1;I.className="Set";I.uniqueHash=cb;I.hashIdUnique=ob;I.hashId=mb;
function sb(a){this.ma=a;this.oa=a.w;this.qa=null}sb.prototype.reset=function(){this.oa=this.ma.w;this.qa=null};sb.prototype.next=function(){var a=this.ma;if(a.w!==this.oa){if(null===this.key)return!1;Da(a)}var b=this.qa;b=null===b?a.ga:b.ua;if(null!==b)return this.qa=b,this.value=this.key=a=b.key,!0;this.$d();return!1};sb.prototype.wd=function(){return this.next()};sb.prototype.first=function(){var a=this.ma;this.oa=a.w;a=a.ga;return null!==a?(this.qa=a,this.value=this.key=a=a.key):null};
sb.prototype.any=function(a){var b=this.ma,c=b.w;this.qa=null;for(var d=b.ga;null!==d;){if(a(d.key))return!0;b.w!==c&&Da(b);d=d.ua}return!1};sb.prototype.all=function(a){var b=this.ma,c=b.w;this.qa=null;for(var d=b.ga;null!==d;){if(!a(d.key))return!1;b.w!==c&&Da(b);d=d.ua}return!0};sb.prototype.each=function(a){var b=this.ma,c=b.w;this.qa=null;for(var d=b.ga;null!==d;)a(d.key),b.w!==c&&Da(b),d=d.ua;return this};
sb.prototype.map=function(a){var b=this.ma,c=b.w;this.qa=null;for(var d=new H,e=b.ga;null!==e;)d.add(a(e.key)),b.w!==c&&Da(b),e=e.ua;return d.iterator};sb.prototype.filter=function(a){var b=this.ma,c=b.w;this.qa=null;for(var d=new H,e=b.ga;null!==e;){var f=e.key;a(f)&&d.add(f);b.w!==c&&Da(b);e=e.ua}return d.iterator};sb.prototype.$d=function(){this.value=this.key=null;this.oa=-1};sb.prototype.toString=function(){return null!==this.qa?"MapKeySetIterator@"+this.qa.value:"MapKeySetIterator"};
na.Object.defineProperties(sb.prototype,{iterator:{configurable:!0,get:function(){return this}},count:{configurable:!0,get:function(){return this.ma.Ob}}});sb.prototype.first=sb.prototype.first;sb.prototype.hasNext=sb.prototype.wd;sb.prototype.next=sb.prototype.next;sb.prototype.reset=sb.prototype.reset;sb.className="MapKeySetIterator";function tb(a){I.call(this);cb(this);this.u=!0;this.ma=a}ma(tb,I);t=tb.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())};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())};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};
tb.prototype.any=function(a){for(var b=this.ma.ga;null!==b;){if(a(b.key))return!0;b=b.ua}return!1};tb.prototype.all=function(a){for(var b=this.ma.ga;null!==b;){if(!a(b.key))return!1;b=b.ua}return!0};tb.prototype.each=function(a){for(var b=this.ma.ga;null!==b;)a(b.key),b=b.ua;return this};tb.prototype.map=function(a){for(var b=new I,c=this.ma.ga;null!==c;)b.add(a(c.key)),c=c.ua;return b};tb.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.ua}return b};
tb.prototype.copy=function(){return new tb(this.ma)};tb.prototype.lw=function(){var a=new I,b=this.ma.Pb,c;for(c in b)a.add(b[c].key);return a};tb.prototype.Fa=function(){var a=this.ma.Pb,b=Array(this.ma.Ob),c=0,d;for(d in a)b[c]=a[d].key,c++;return b};tb.prototype.kw=function(){var a=new H,b=this.ma.Pb,c;for(c in b)a.add(b[c].key);return a};
na.Object.defineProperties(tb.prototype,{count:{configurable:!0,get:function(){return this.ma.Ob}},size:{configurable:!0,get:function(){return this.ma.Ob}},iterator:{configurable:!0,get:function(){return 0>=this.ma.Ob?ib:new sb(this.ma)}}});tb.prototype.toList=tb.prototype.kw;tb.prototype.toArray=tb.prototype.Fa;tb.prototype.toSet=tb.prototype.lw;tb.prototype.first=tb.prototype.first;tb.prototype.clear=tb.prototype.clear;tb.prototype["delete"]=tb.prototype.delete;
tb.prototype.remove=tb.prototype.remove;tb.prototype.has=tb.prototype.has;tb.prototype.contains=tb.prototype.contains;tb.prototype.add=tb.prototype.add;tb.prototype.thaw=tb.prototype.ka;tb.prototype.freeze=tb.prototype.freeze;tb.className="MapKeySet";function xb(a){this.ma=a;a.lf=null;this.oa=a.w;this.qa=null}xb.prototype.reset=function(){var a=this.ma;a.lf=null;this.oa=a.w;this.qa=null};
xb.prototype.next=function(){var a=this.ma;if(a.w!==this.oa){if(null===this.key)return!1;Da(a)}var b=this.qa;b=null===b?a.ga:b.ua;if(null!==b)return this.qa=b,this.value=b.value,this.key=b.key,!0;this.$d();return!1};xb.prototype.wd=function(){return this.next()};xb.prototype.first=function(){var a=this.ma;this.oa=a.w;a=a.ga;if(null!==a){this.qa=a;var b=a.value;this.key=a.key;return this.value=b}return null};
xb.prototype.any=function(a){var b=this.ma;b.lf=null;var c=b.w;this.qa=null;for(var d=b.ga;null!==d;){if(a(d.value))return!0;b.w!==c&&Da(b);d=d.ua}return!1};xb.prototype.all=function(a){var b=this.ma;b.lf=null;var c=b.w;this.qa=null;for(var d=b.ga;null!==d;){if(!a(d.value))return!1;b.w!==c&&Da(b);d=d.ua}return!0};xb.prototype.each=function(a){var b=this.ma;b.lf=null;var c=b.w;this.qa=null;for(var d=b.ga;null!==d;)a(d.value),b.w!==c&&Da(b),d=d.ua;return this};
xb.prototype.map=function(a){var b=this.ma;b.lf=null;var c=b.w;this.qa=null;for(var d=new H,e=b.ga;null!==e;)d.add(a(e.value)),b.w!==c&&Da(b),e=e.ua;return d.iterator};xb.prototype.filter=function(a){var b=this.ma;b.lf=null;var c=b.w;this.qa=null;for(var d=new H,e=b.ga;null!==e;){var f=e.value;a(f)&&d.add(f);b.w!==c&&Da(b);e=e.ua}return d.iterator};xb.prototype.$d=function(){this.value=this.key=null;this.oa=-1;this.ma.lf=this};
xb.prototype.toString=function(){return null!==this.qa?"MapValueSetIterator@"+this.qa.value:"MapValueSetIterator"};na.Object.defineProperties(xb.prototype,{iterator:{configurable:!0,get:function(){return this}},count:{configurable:!0,get:function(){return this.ma.Ob}}});xb.prototype.first=xb.prototype.first;xb.prototype.hasNext=xb.prototype.wd;xb.prototype.next=xb.prototype.next;xb.prototype.reset=xb.prototype.reset;xb.className="MapValueSetIterator";
function pb(a,b){this.key=a;this.value=b;this.Kl=this.ua=null}pb.prototype.toString=function(){return"{"+this.key+":"+this.value+"}"};pb.className="KeyValuePair";function yb(a){this.ma=a;a.Oa=null;this.oa=a.w;this.qa=null}yb.prototype.reset=function(){var a=this.ma;a.Oa=null;this.oa=a.w;this.qa=null};
yb.prototype.next=function(){var a=this.ma;if(a.w!==this.oa){if(null===this.key)return!1;Da(a)}var b=this.qa;b=null===b?a.ga:b.ua;if(null!==b)return this.qa=b,this.key=b.key,this.value=b.value,!0;this.$d();return!1};yb.prototype.wd=function(){return this.next()};yb.prototype.first=function(){var a=this.ma;this.oa=a.w;a=a.ga;return null!==a?(this.qa=a,this.key=a.key,this.value=a.value,a):null};
yb.prototype.any=function(a){var b=this.ma;b.Oa=null;var c=b.w;this.qa=null;for(var d=b.ga;null!==d;){if(a(d))return!0;b.w!==c&&Da(b);d=d.ua}return!1};yb.prototype.all=function(a){var b=this.ma;b.Oa=null;var c=b.w;this.qa=null;for(var d=b.ga;null!==d;){if(!a(d))return!1;b.w!==c&&Da(b);d=d.ua}return!0};yb.prototype.each=function(a){var b=this.ma;b.Oa=null;var c=b.w;this.qa=null;for(var d=b.ga;null!==d;)a(d),b.w!==c&&Da(b),d=d.ua;return this};
yb.prototype.map=function(a){var b=this.ma;b.Oa=null;var c=b.w;this.qa=null;for(var d=new H,e=b.ga;null!==e;)d.add(a(e)),b.w!==c&&Da(b),e=e.ua;return d.iterator};yb.prototype.filter=function(a){var b=this.ma;b.Oa=null;var c=b.w;this.qa=null;for(var d=new H,e=b.ga;null!==e;)a(e)&&d.add(e),b.w!==c&&Da(b),e=e.ua;return d.iterator};yb.prototype.$d=function(){this.value=this.key=null;this.oa=-1;this.ma.Oa=this};yb.prototype.toString=function(){return null!==this.qa?"MapIterator@"+this.qa:"MapIterator"};
na.Object.defineProperties(yb.prototype,{iterator:{configurable:!0,get:function(){return this}},count:{configurable:!0,get:function(){return this.ma.Ob}}});yb.prototype.first=yb.prototype.first;yb.prototype.hasNext=yb.prototype.wd;yb.prototype.next=yb.prototype.next;yb.prototype.reset=yb.prototype.reset;yb.className="MapIterator";
function zb(a){cb(this);this.u=!1;this.Pb={};this.Ob=0;this.lf=this.Oa=null;this.w=0;this.mf=this.ga=null;(G&&"function"===typeof a||"string"===typeof a)&&v("Error: Since 2.0 List/Map/Set constructors no longer take an argument that enforces type.");void 0!==a&&this.addAll(a)}t=zb.prototype;t.qb=function(){var a=this.w;a++;999999999<a&&(a=0);this.w=a};t.freeze=function(){this.u=!0;return this};t.ka=function(){this.u=!1;return this};t.toString=function(){return"Map()#"+mb(this)};
t.add=function(a,b){this.u&&wa(this,a);var c=a;Ga(a)&&(c=ob(a));var d=this.Pb[c];void 0===d?(this.Ob++,a=new pb(a,b),this.Pb[c]=a,c=this.mf,null===c?this.ga=a:(a.Kl=c,c.ua=a),this.mf=a,this.qb()):d.value=b;return this};t.set=function(a,b){return this.add(a,b)};
t.addAll=function(a){if(null===a)return this;if(Ha(a))for(var b=a.length,c=0;c<b;c++){var d=a[c];this.add(d.key,d.value)}else if(a instanceof zb)for(a=a.iterator;a.next();)this.add(a.key,a.value);else for(a=a.iterator;a.next();)b=a.value,this.add(b.key,b.value);return this};t.first=function(){return this.ga};zb.prototype.any=function(a){for(var b=this.w,c=this.ga;null!==c;){if(a(c))return!0;this.w!==b&&Da(this);c=c.ua}return!1};
zb.prototype.all=function(a){for(var b=this.w,c=this.ga;null!==c;){if(!a(c))return!1;this.w!==b&&Da(this);c=c.ua}return!0};zb.prototype.each=function(a){for(var b=this.w,c=this.ga;null!==c;)a(c),this.w!==b&&Da(this),c=c.ua;return this};zb.prototype.map=function(a){for(var b=new zb,c=this.w,d=this.ga;null!==d;)b.add(d.key,a(d)),this.w!==c&&Da(this),d=d.ua;return b};zb.prototype.filter=function(a){for(var b=new zb,c=this.w,d=this.ga;null!==d;)a(d)&&b.add(d.key,d.value),this.w!==c&&Da(this),d=d.ua;return b};
t=zb.prototype;t.contains=function(a){var b=a;return Ga(a)&&(b=mb(a),void 0===b)?!1:void 0!==this.Pb[b]};t.has=function(a){return this.contains(a)};t.K=function(a){var b=a;if(Ga(a)&&(b=mb(a),void 0===b))return null;a=this.Pb[b];return void 0===a?null:a.value};t.get=function(a){return this.K(a)};
t.remove=function(a){if(null===a)return!1;this.u&&wa(this,a);var b=a;if(Ga(a)&&(b=mb(a),void 0===b))return!1;a=this.Pb[b];if(void 0===a)return!1;var c=a.ua,d=a.Kl;null!==c&&(c.Kl=d);null!==d&&(d.ua=c);this.ga===a&&(this.ga=c);this.mf===a&&(this.mf=d);delete this.Pb[b];this.Ob--;this.qb();return!0};t.delete=function(a){return this.remove(a)};t.clear=function(){this.u&&wa(this);this.Pb={};this.Ob=0;null!==this.Oa&&this.Oa.reset();null!==this.lf&&this.lf.reset();this.mf=this.ga=null;this.qb()};
zb.prototype.copy=function(){var a=new zb,b=this.Pb,c;for(c in b){var d=b[c];a.add(d.key,d.value)}return a};zb.prototype.Fa=function(){var a=this.Pb,b=Array(this.Ob),c=0,d;for(d in a){var e=a[d];b[c]=new pb(e.key,e.value);c++}return b};zb.prototype.Uf=function(){return new tb(this)};
na.Object.defineProperties(zb.prototype,{count:{configurable:!0,get:function(){return this.Ob}},size:{configurable:!0,get:function(){return this.Ob}},iterator:{configurable:!0,get:function(){if(0>=this.count)return ib;var a=this.Oa;return null!==a?(a.reset(),a):new yb(this)}},iteratorKeys:{configurable:!0,get:function(){return 0>=this.count?ib:new sb(this)}},iteratorValues:{configurable:!0,get:function(){if(0>=this.count)return ib;
var a=this.lf;return null!==a?(a.reset(),a):new xb(this)}}});zb.prototype.toKeySet=zb.prototype.Uf;zb.prototype.toArray=zb.prototype.Fa;zb.prototype.clear=zb.prototype.clear;zb.prototype["delete"]=zb.prototype.delete;zb.prototype.remove=zb.prototype.remove;zb.prototype.get=zb.prototype.get;zb.prototype.getValue=zb.prototype.K;zb.prototype.has=zb.prototype.has;zb.prototype.contains=zb.prototype.contains;zb.prototype.first=zb.prototype.first;zb.prototype.addAll=zb.prototype.addAll;
zb.prototype.set=zb.prototype.set;zb.prototype.add=zb.prototype.add;zb.prototype.thaw=zb.prototype.ka;zb.prototype.freeze=zb.prototype.freeze;zb.className="Map";function K(a,b){void 0===a?this.J=this.I=0:"number"===typeof a&&"number"===typeof b?(this.I=a,this.J=b):v("Invalid arguments to Point constructor: "+a+", "+b);this.u=!1}K.prototype.assign=function(a){this.I=a.I;this.J=a.J;return this};K.prototype.h=function(a,b){this.I=a;this.J=b;return this};
K.prototype.Fg=function(a,b){G&&(A(a,"number",K,"setTo:x"),A(b,"number",K,"setTo:y"),this.ha());this.I=a;this.J=b;return this};K.prototype.set=function(a){G&&(w(a,K,K,"set:p"),this.ha());this.I=a.I;this.J=a.J;return this};K.prototype.copy=function(){var a=new K;a.I=this.I;a.J=this.J;return a};t=K.prototype;t.ia=function(){this.u=!0;Object.freeze(this);return this};t.L=function(){return this.u||Object.isFrozen(this)?this:this.copy().freeze()};t.freeze=function(){this.u=!0;return this};
t.ka=function(){Object.isFrozen(this)&&v("cannot thaw constant: "+this);this.u=!1;return this};t.ha=function(a){if(G&&this.u){var b="The Point is frozen, so its properties cannot be set: "+this.toString();void 0!==a&&(b+=" to value: "+a);v(b)}};function Ab(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 K(c,e)}return new K}
function Bb(a){G&&w(a,K);return a.x.toString()+" "+a.y.toString()}t.toString=function(){return"Point("+this.x+","+this.y+")"};t.B=function(a){return a instanceof K?this.I===a.x&&this.J===a.y:!1};t.Qi=function(a,b){return this.I===a&&this.J===b};t.Za=function(a){return L.A(this.I,a.x)&&L.A(this.J,a.y)};t.add=function(a){G&&(w(a,K,K,"add:p"),this.ha());this.I+=a.x;this.J+=a.y;return this};t.qe=function(a){G&&(w(a,K,K,"subtract:p"),this.ha());this.I-=a.x;this.J-=a.y;return this};
t.offset=function(a,b){G&&(D(a,K,"offset:dx"),D(b,K,"offset:dy"),this.ha());this.I+=a;this.J+=b;return this};K.prototype.rotate=function(a){G&&(D(a,K,"rotate:angle"),this.ha());if(0===a)return this;var b=this.I,c=this.J;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.I=a*b-d*c;this.J=d*b+a*c;return this};t=K.prototype;
t.scale=function(a,b){G&&(D(a,K,"scale:sx"),D(b,K,"scale:sy"),this.ha());this.I*=a;this.J*=b;return this};t.Jf=function(a){G&&w(a,K,K,"distanceSquaredPoint:p");var b=a.x-this.I;a=a.y-this.J;return b*b+a*a};t.vd=function(a,b){G&&(D(a,K,"distanceSquared:px"),D(b,K,"distanceSquared:py"));a-=this.I;b-=this.J;return a*a+b*b};t.normalize=function(){G&&this.ha();var a=this.I,b=this.J,c=Math.sqrt(a*a+b*b);0<c&&(this.I=a/c,this.J=b/c);return this};
t.Va=function(a){G&&w(a,K,K,"directionPoint:p");return Cb(a.x-this.I,a.y-this.J)};t.direction=function(a,b){G&&(D(a,K,"direction:px"),D(b,K,"direction:py"));return Cb(a-this.I,b-this.J)};function Cb(a,b){if(0===a)return 0<b?90:0>b?270:0;if(0===b)return 0<a?0:180;if(isNaN(a)||isNaN(b))return 0;var c=180*Math.atan(Math.abs(b/a))/Math.PI;0>a?c=0>b?c+180:180-c:0>b&&(c=360-c);return c}
t.Fz=function(a,b){G&&(w(a,K,K,"compareWithLineSegmentPoint:p"),w(b,K,K,"compareWithLineSegmentPoint:q"));return L.km(a.x,a.y,b.x,b.y,this.x,this.y)};t.UA=function(a,b,c,d){G&&(D(a,K,"projectOntoLineSegment:px"),D(b,K,"projectOntoLineSegment:py"),D(c,K,"projectOntoLineSegment:qx"),D(d,K,"projectOntoLineSegment:qy"));L.Th(a,b,c,d,this.I,this.J,this);return this};
t.VA=function(a,b){G&&(w(a,K,K,"projectOntoLineSegmentPoint:p"),w(b,K,K,"projectOntoLineSegmentPoint:q"));L.Th(a.x,a.y,b.x,b.y,this.I,this.J,this);return this};t.iB=function(a,b,c,d){G&&(D(a,K,"snapToGrid:originx"),D(b,K,"snapToGrid:originy"),D(c,K,"snapToGrid:cellwidth"),D(d,K,"snapToGrid:cellheight"));L.kq(this.I,this.J,a,b,c,d,this);return this};t.jB=function(a,b){G&&(w(a,K,K,"snapToGridPoint:p"),w(b,Db,K,"snapToGridPoint:q"));L.kq(this.I,this.J,a.x,a.y,b.width,b.height,this);return this};
t.ej=function(a,b){G&&(w(a,M,K,"setRectSpot:r"),w(b,Eb,K,"setRectSpot:spot"),this.ha());this.I=a.x+b.x*a.width+b.offsetX;this.J=a.y+b.y*a.height+b.offsetY;return this};t.fj=function(a,b,c,d,e){G&&(D(a,K,"setSpot:x"),D(b,K,"setSpot:y"),D(c,K,"setSpot:w"),D(d,K,"setSpot:h"),(0>c||0>d)&&v("Point.setSpot:Width and height cannot be negative"),w(e,Eb,K,"setSpot:spot"),this.ha());this.I=a+e.x*c+e.offsetX;this.J=b+e.y*d+e.offsetY;return this};
t.transform=function(a){G&&w(a,Fb,K,"transform:t");a.Ga(this);return this};function Gb(a,b){G&&w(b,Fb,K,"transformInverted:t");b.Od(a);return a}
function Hb(a,b,c,d,e,f){G&&(D(a,K,"distanceLineSegmentSquared:px"),D(b,K,"distanceLineSegmentSquared:py"),D(c,K,"distanceLineSegmentSquared:ax"),D(d,K,"distanceLineSegmentSquared:ay"),D(e,K,"distanceLineSegmentSquared:bx"),D(f,K,"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 Ib(a,b,c,d){G&&(D(a,K,"distanceSquared:px"),D(b,K,"distanceSquared:py"),D(c,K,"distanceSquared:qx"),D(d,K,"distanceSquared:qy"));a=c-a;b=d-b;return a*a+b*b}function Jb(a,b,c,d){G&&(D(a,K,"direction:px"),D(b,K,"direction:py"),D(c,K,"direction:qx"),D(d,K,"direction:qy"));a=c-a;b=d-b;if(0===a)return 0<b?90:0>b?270:0;if(0===b)return 0<a?0:180;if(isNaN(a)||isNaN(b))return 0;d=180*Math.atan(Math.abs(b/a))/Math.PI;0>a?d=0>b?d+180:180-d:0>b&&(d=360-d);return d}
t.s=function(){return isFinite(this.x)&&isFinite(this.y)};K.alloc=function(){var a=Kb.pop();return void 0===a?new K:a};K.allocAt=function(a,b){var c=Kb.pop();if(void 0===c)return new K(a,b);c.x=a;c.y=b;return c};K.free=function(a){Kb.push(a)};
na.Object.defineProperties(K.prototype,{x:{configurable:!0,get:function(){return this.I},set:function(a){G&&(A(a,"number",K,"x"),this.ha(a));this.I=a}},y:{configurable:!0,get:function(){return this.J},set:function(a){G&&(A(a,"number",K,"y"),this.ha(a));this.J=a}}});K.prototype.isReal=K.prototype.s;K.prototype.setSpot=K.prototype.fj;K.prototype.setRectSpot=K.prototype.ej;K.prototype.snapToGridPoint=K.prototype.jB;K.prototype.snapToGrid=K.prototype.iB;
K.prototype.projectOntoLineSegmentPoint=K.prototype.VA;K.prototype.projectOntoLineSegment=K.prototype.UA;K.intersectingLineSegments=function(a,b,c,d,e,f,g,h){G&&(D(a,K,"intersectingLineSegments:a1x"),D(b,K,"intersectingLineSegments:a1y"),D(c,K,"intersectingLineSegments:a2x"),D(d,K,"intersectingLineSegments:a2y"),D(e,K,"intersectingLineSegments:b1x"),D(f,K,"intersectingLineSegments:b1y"),D(g,K,"intersectingLineSegments:b2x"),D(h,K,"intersectingLineSegments:b2y"));return L.rm(a,b,c,d,e,f,g,h)};
K.prototype.compareWithLineSegmentPoint=K.prototype.Fz;K.compareWithLineSegment=function(a,b,c,d,e,f){G&&(D(a,K,"compareWithLineSegment:a1x"),D(b,K,"compareWithLineSegment:a1y"),D(c,K,"compareWithLineSegment:a2x"),D(d,K,"compareWithLineSegment:a2y"),D(e,K,"compareWithLineSegment:b1x"),D(f,K,"compareWithLineSegment:b1y"));return L.km(a,b,c,d,e,f)};K.prototype.direction=K.prototype.direction;K.prototype.directionPoint=K.prototype.Va;K.prototype.normalize=K.prototype.normalize;
K.prototype.distanceSquared=K.prototype.vd;K.prototype.distanceSquaredPoint=K.prototype.Jf;K.prototype.scale=K.prototype.scale;K.prototype.rotate=K.prototype.rotate;K.prototype.offset=K.prototype.offset;K.prototype.subtract=K.prototype.qe;K.prototype.add=K.prototype.add;K.prototype.equalsApprox=K.prototype.Za;K.prototype.equalTo=K.prototype.Qi;K.prototype.equals=K.prototype.B;K.prototype.set=K.prototype.set;K.prototype.setTo=K.prototype.Fg;var Lb=null,Mb=null,Nb=null,Ob=null,Pb=null,Kb=[];
K.className="Point";K.parse=Ab;K.stringify=Bb;K.distanceLineSegmentSquared=Hb;K.distanceSquared=Ib;K.direction=Jb;K.Origin=Lb=(new K(0,0)).ia();K.InfiniteTopLeft=Mb=(new K(-Infinity,-Infinity)).ia();K.InfiniteBottomRight=Nb=(new K(Infinity,Infinity)).ia();K.SixPoint=Ob=(new K(6,6)).ia();K.NoPoint=Pb=(new K(NaN,NaN)).ia();K.parse=Ab;K.stringify=Bb;K.distanceLineSegmentSquared=Hb;K.distanceSquared=Ib;K.direction=Jb;
function Db(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.u=!1}var Qb,Rb,Ub,Vb,Wb,Xb,Yb;Db.prototype.assign=function(a){this.fa=a.fa;this.ea=a.ea;return this};Db.prototype.h=function(a,b){this.fa=a;this.ea=b;return this};
Db.prototype.Fg=function(a,b){G&&(A(a,"number",Db,"setTo:w"),A(b,"number",Db,"setTo:h"),0>a&&Ba(a,">= 0",Db,"setTo:w"),0>b&&Ba(b,">= 0",Db,"setTo:h"),this.ha());this.fa=a;this.ea=b;return this};Db.prototype.set=function(a){G&&(w(a,Db,Db,"set:s"),this.ha());this.fa=a.fa;this.ea=a.ea;return this};Db.prototype.copy=function(){var a=new Db;a.fa=this.fa;a.ea=this.ea;return a};t=Db.prototype;t.ia=function(){this.u=!0;Object.freeze(this);return this};
t.L=function(){return this.u||Object.isFrozen(this)?this:this.copy().freeze()};t.freeze=function(){this.u=!0;return this};t.ka=function(){Object.isFrozen(this)&&v("cannot thaw constant: "+this);this.u=!1;return this};t.ha=function(a){if(G&&this.u){var b="The Size is frozen, so its properties cannot be set: "+this.toString();void 0!==a&&(b+=" to value: "+a);v(b)}};
function Zb(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 Db(c,e)}return new Db}function $b(a){G&&w(a,Db);return a.width.toString()+" "+a.height.toString()}t.toString=function(){return"Size("+this.width+","+this.height+")"};t.B=function(a){return a instanceof Db?this.fa===a.width&&this.ea===a.height:!1};t.Qi=function(a,b){return this.fa===a&&this.ea===b};
t.Za=function(a){return L.A(this.fa,a.width)&&L.A(this.ea,a.height)};t.s=function(){return isFinite(this.width)&&isFinite(this.height)};Db.alloc=function(){var a=ac.pop();return void 0===a?new Db:a};Db.free=function(a){ac.push(a)};
na.Object.defineProperties(Db.prototype,{width:{configurable:!0,get:function(){return this.fa},set:function(a){G&&(A(a,"number",Db,"width"),this.ha(a));0>a&&Ba(a,">= 0",Db,"width");this.fa=a}},height:{configurable:!0,get:function(){return this.ea},set:function(a){G&&(A(a,"number",Db,"height"),this.ha(a));0>a&&Ba(a,">= 0",Db,"height");this.ea=a}}});Db.prototype.isReal=Db.prototype.s;Db.prototype.equalsApprox=Db.prototype.Za;Db.prototype.equalTo=Db.prototype.Qi;
Db.prototype.equals=Db.prototype.B;Db.prototype.set=Db.prototype.set;Db.prototype.setTo=Db.prototype.Fg;var ac=[];Db.className="Size";Db.parse=Zb;Db.stringify=$b;Db.ZeroSize=Qb=(new Db(0,0)).ia();Db.OneSize=Rb=(new Db(1,1)).ia();Db.SixSize=Ub=(new Db(6,6)).ia();Db.EightSize=Vb=(new Db(8,8)).ia();Db.TenSize=Wb=(new Db(10,10)).ia();Db.InfiniteSize=Xb=(new Db(Infinity,Infinity)).ia();Db.NoSize=Yb=(new Db(NaN,NaN)).ia();Db.parse=Zb;Db.stringify=$b;
function M(a,b,c,d){void 0===a?this.ea=this.fa=this.J=this.I=0:"number"===typeof a&&"number"===typeof b&&"number"===typeof c&&(0<=c||isNaN(c))&&"number"===typeof d&&(0<=d||isNaN(d))?(this.I=a,this.J=b,this.fa=c,this.ea=d):a instanceof K?(c=a.x,a=a.y,b instanceof K?(d=b.x,b=b.y,this.I=Math.min(c,d),this.J=Math.min(a,b),this.fa=Math.abs(c-d),this.ea=Math.abs(a-b)):b instanceof Db?(this.I=c,this.J=a,this.fa=b.width,this.ea=b.height):v("Incorrect second argument supplied to Rect constructor "+b)):v("Invalid arguments to Rect constructor: "+
a+", "+b+", "+c+", "+d);this.u=!1}t=M.prototype;t.assign=function(a){this.I=a.I;this.J=a.J;this.fa=a.fa;this.