/*!@license * Infragistics.Web.ClientUI infragistics.dv_geometry.js 19.1.20191.172 * * Copyright (c) 2011-2019 Infragistics Inc. * * http://www.infragistics.com/ * * Depends: * jquery-1.4.4.js * jquery.ui.core.js * jquery.ui.widget.js * infragistics.util.js * infragistics.ext_core.js * infragistics.ext_collections.js * infragistics.dv_core.js * infragistics.ext_ui.js */ (function(factory){if(typeof define==="function"&&define.amd){define(["./infragistics.util","./infragistics.ext_core","./infragistics.ext_collections","./infragistics.dv_core","./infragistics.ext_ui"],factory)}else{factory(igRoot)}})(function($){$.ig=$.ig||{};var $$t={};$.ig.globalDefs=$.ig.globalDefs||{};$.ig.globalDefs.$$r=$$t;$$0=$.ig.globalDefs.$$0;$$4=$.ig.globalDefs.$$4;$$1=$.ig.globalDefs.$$1;$$w=$.ig.globalDefs.$$w;$$6=$.ig.globalDefs.$$6;$$a=$.ig.globalDefs.$$a;$.ig.$currDefinitions=$$t;$.ig.util.bulkDefine(["CollisionManagerLabelsMovedEventHandler:e","QuadTree:f","QuadTreeNode:i","ISmartPlaceable:ab"]);var $a=$.ig.intDivide,$b=$.ig.util.cast,$c=$.ig.util.defType,$d=$.ig.util.defEnum,$e=$.ig.util.getBoxIfEnum,$f=$.ig.util.getDefaultValue,$g=$.ig.util.getEnumValue,$h=$.ig.util.getValue,$i=$.ig.util.intSToU,$j=$.ig.util.nullableEquals,$k=$.ig.util.nullableIsNull,$l=$.ig.util.nullableNotEquals,$m=$.ig.util.toNullable,$n=$.ig.util.toString$1,$o=$.ig.util.u32BitwiseAnd,$p=$.ig.util.u32BitwiseOr,$q=$.ig.util.u32BitwiseXor,$r=$.ig.util.u32LS,$s=$.ig.util.unwrapNullable,$t=$.ig.util.wrapNullable,$u=String.fromCharCode,$v=$.ig.util.castObjTo$t,$w=$.ig.util.compareSimple,$x=$.ig.util.tryParseNumber,$y=$.ig.util.tryParseNumber1,$z=$.ig.util.numberToString,$0=$.ig.util.numberToString1,$1=$.ig.util.parseNumber;$d("SmartPosition:aa",false,false,{LeftTop:0,CenterTop:1,RightTop:2,LeftCenter:3,CenterCenter:4,RightCenter:5,LeftBottom:6,CenterBottom:7,RightBottom:8});$d("LabelCollisionManagerCollisionMode:b",false,false,{SimulatedAnnealing:0,Greedy:1,GreedyCenterOfMass:2});$d("LabelCollisionPlacementPositions:a",false,false,{Top:0,Left:1,Right:2,Bottom:3,TopLeft:4,TopRight:5,BottomLeft:6,BottomRight:7});$c("LabelCollisionManager:c","Object",{init:function(a,b,c,d,e,f,g,h,i){this.r=new $$4.v($$t.$d.$type);this.ab=0;this.s=new $$4.x($$t.$d.$type,0);this.k=false;this.j=false;this.ac=0;this.l=false;this.i=false;$.ig.$op.init.call(this);this._az=c;this._z=a;this._x=b;this._f=new $$t.f(a,b,8,8);this._e=f;this._c=d;this._t=new $$4.x($$t.$a.$type,0);this._t.add(0);this._t.add(5);this._t.add(7);this._t.add(2);this._t.add(3);this._t.add(6);this._t.add(1);this._t.add(4);this._y=e;this._af=g;this._ae=h;this.i=i},g:function(a,b,c,d,e){var f=0;var g=0;switch(b){case 0:f=a._o;g=a._p-a._m-a._k-this._y-d;break;case 4:f=a._o-a._n-a._l-this._y-c;g=a._p-a._m-a._k-this._y-d;break;case 5:f=a._o+a._n+a._l+this._y+c;g=a._p-a._m-a._k-this._y-d;break;case 1:f=a._o-a._n-a._l-this._y-c;g=a._p;break;case 2:f=a._o+a._n+a._l+this._y+c;g=a._p;break;case 3:f=a._o;g=a._p+a._m+a._k+this._y+d;break;case 6:f=a._o-a._n-a._l-this._y-c;g=a._p+a._m+a._k+this._y+d;break;case 7:f=a._o+a._n+a._l+this._y+c;g=a._p+a._m+a._k+this._y-d;break}var h=new $$t.h;h.b=f;h.c=g;h.e=a._l;h.d=a._k;h.g=a;if(this.o(h)&&!e){return null}return h},o:function(a){var b=a.b-a.e;var c=a.b+a.e;var d=a.c-a.d;var e=a.c+a.d;var f=this._az;if(bf.right()||df.bottom()){return true}return false},_t:null,labelsMoved:null,_h:null,_f:null,_e:0,_c:null,_y:0,_af:0,_ae:0,_az:null,_z:0,_x:0,ar:function(a,b,c,d,e){this.aq(a,b,c,d,e)},aq:function(a,b,c,d,e){this._f.d(a);a.b=b;a.c=c;a.e=d;a.d=e;this._f.c(a)},av:function(a){this._f.d(a)},r:null,ab:0,al:function(a){this.ab++;this.r.f(a);a._e=this.r.d();if(a._c==null){a._c=new $$t.h;a._c.b=a._o;a._c.c=a._p;a._c.e=a._n;a._c.d=a._m;a._c.g=a;this._f.c(a._c)}},aw:function(a){if(a._c!=null){this._f.d(a._c);a._c=null}if(a._b!=null){this._f.d(a._b);a._b=null}if(a._e!=null){this.r.h(a._e);a._e=null}this.ab--},at:function(a){if(a._c!=null&&a._c.b==a._o&&a._c.c==a._p){return}if(a._c!=null){this._f.d(a._c)}var b=NaN;var c=NaN;if(a._c==null){a._c=new $$t.h;a._c.g=a}else{if(a._b!=null){b=a._b.b-a._c.b;c=a._b.c-a._c.c}}a._c.b=a._o;a._c.c=a._p;a._c.e=a._n;a._c.d=a._m;this._f.c(a._c);if(a._b!=null){this._f.d(a._b);if(!$.ig.util.isNaN(b)){a._b=new $$t.h;a._b.b=a._c.b+b;a._b.c=a._c.c+c;a._b.g=a;a._b.e=a._l;a._b.d=a._k;a._g=a._b.b;a._h=a._b.c;this._f.c(a._b)}else{a._b=this.g(a,a._a,0,0,true);a._g=a._b.b;a._h=a._b.c;this._f.c(a._b)}}},as:function(a){this._f.d(a._b);a._b.b=a._g;a._b.c=a._h;a._b.e=a._l;a._b.d=a._k;this._f.c(a._b)},ay:function(){this.j=false;{var a=this.r.c();while(a!=null){if(a._c._b!=null){this._f.d(a._c._b);a._c._b=null;if(a._c._f!=null){a._c._f.clear()}}a=a.a}this.ac=0}this.aa=0;this.u=.4;this.v=.4;var b=$.ig.truncate(Math.ceil(this._ae/150*this._af));this.ad=b;this.an()},s:null,k:false,j:false,am:function(){this.j=true},ap:function(){this.k=false;if(this.j){return}this.an()},an:function(){this.s.clear();this.au(false);if(this._e==0){for(var a=0;athis.ad){if(this._h!=null){this._h()}return}}if(this.labelsMoved!=null){this.labelsMoved(this.s)}if(this.ac>0){if(!this.k){this.k=true;this._c.executeDelayed(this.ap.runOn(this),150)}}else{if(this._h!=null){this._h()}}}else{if(this._e==2){var b=this.r.c();this._f.k();while(b!=null){var c=b._c;if(c._b!=null){this._f.d(c._b);c._b=null;c._d=false;c._f=null}b=b.a}this.ac=0;this.au(true)}if(this.labelsMoved!=null){this.labelsMoved(this.s)}}},ad:0,aa:0,u:0,v:0,ao:function(){var a=$.ig.truncate(Math.round((this.ab-1)*$$t.$c.aj.nextDouble()));var b=0;var c=this.r.c();var d=this.w(null);var e=30;var f=60;while(c!=null){var g=c._c;var h=0;var i=0;if(this.i){h=$$t.$c.aj.nextDouble()*g._l*2;i=$$t.$c.aj.nextDouble()*g._k*2}if(b==a){var j=$.ig.truncate(Math.round((this._t.count()-1)*$$t.$c.aj.nextDouble()));while(this._t.__inner[j]==g._a){j=$.ig.truncate(Math.round((this._t.count()-1)*$$t.$c.aj.nextDouble()))}var k=g._b;var l=this.g(g,this._t.__inner[j],h,i,false);var m=0;while(l==null){if(m>=e){h=0;i=0}if(m>=f){break}j=$.ig.truncate(Math.round((this._t.count()-1)*$$t.$c.aj.nextDouble()));l=this.g(g,this._t.__inner[j],h,i,false);m++}g._b=l;if(k!=null){this._f.d(k)}if(l!=null){this._f.c(l);var n=this.w(g);var o=d>n;if(!o){var p=Math.exp(-(n-d)/this.v);if($$t.$c.aj.nextDouble()=0;w--){if(!l.contains(a._f.__inner[w])){var x=a._f.__inner[w];var y=x._f.remove(a);a._f.removeAt(w);if(x._f.count()==0&&y){this.ac--}var z=j.remove(x);if(j.count()==0&&z){this.ac--}}}}for(var aa=0;aa0){this.ac--;for(var y=a._f.count()-1;y>=0;y--){var z=a._f.__inner[y];if(z._f!=null){z._f.remove(a);if(z._f.count()==0){this.ac--}}}}if(i==null){a._d=false;this.s.add(a);return false}a._f=i;if(i.count()>0){this.ac++}for(var aa=0;aa=0&&c<=22.5||c>=337.5&&c<=360){b[0]=2;b[1]=5;b[2]=7}if(c>=22.5&&c<=67.5){b[0]=2;b[1]=7;b[2]=3}if(c>=67.5&&c<=112.5){b[0]=7;b[1]=3;b[2]=6}if(c>=112.5&&c<=157.5){b[0]=3;b[1]=6;b[2]=1}if(c>=157.5&&c<=202.5){b[0]=6;b[1]=1;b[2]=4}if(c>=202.5&&c<=247.5){b[0]=1;b[1]=4;b[2]=0}if(c>=247.5&&c<=292.5){b[0]=4;b[1]=0;b[2]=5}if(c>=292.5&&c<=337.5){b[0]=0;b[1]=5;b[2]=2}return b},d:function(a,b){var c=false;var d=null;var e=new $$t.h;e.b=a.__x;e.c=a.__y;e.e=5;e.d=5;var f=this._f.e(e);for(var g=0;ga.b+a.e||this.c-this.d>a.c+a.d){return false}return true},g:null,f:function(a){var b=this.b-this.e;var c=this.c-this.d;var d=this.b+this.e;var e=this.c+this.d;var f=a.b-a.e;var g=a.c-a.d;var h=a.b+a.e;var i=a.c+a.d;var j=Math.max(b,f);var k=Math.min(d,h);var l=Math.max(c,g);var m=Math.min(e,i);return(k-j)*(m-l)},$type:new $.ig.Type("QuadTreeBoundingBox",$.ig.$ot)},true);$c("QuadTreeNode:i","Object",{init:function(){this.t=0;this.q=0;$.ig.$op.init.call(this);this.m=0;this.n=0;this.o=0;this.l=new $$4.v($$t.$h.$type);this.a=new Array(4);this.c=new $$t.h;for(var a=0;a<4;a++){this.a[a]=null}},k:function(a){if(!this.c.a(a)){return false}var b=this.f()==null&&this.e()==null&&this.h()==null&&this.g()==null;if(b){var c=this.l.c();while(c!=null){if(c._c==a){this.l.h(c);this.t--;return true}c=c.a}return false}this.f().k(a);this.e().k(a);this.h().k(a);this.g().k(a);return false},j:function(){return this.f()==null&&this.e()==null&&this.h()==null&&this.g()==null},x:function(a,b){if(!this.c.a(a)){return}if(this.j()){b.add(this);return}this.f().x(a,b);this.e().x(a,b);this.h().x(a,b);this.g().x(a,b)},w:function(){if(this.f()!=null){this.f().w()}if(this.e()!=null){this.e().w()}if(this.h()!=null){this.h().w()}if(this.g()!=null){this.h().w()}if(this.f().j()&&this.f().t==0&&this.e().j()&&this.e().t==0&&this.h().j()&&this.h().t==0&&this.g().j()&&this.g().t==0){this.f(this.e(this.h(this.g(null))));return}},i:function(a){if(!this.c.a(a)){return false}var b=this.f()==null&&this.e()==null&&this.h()==null&&this.g()==null;if(b&&this.t0){this.m=e/g;this.n=f/g}this.o=g}},d:function(a,b,c){var d=Math.sqrt((a-this.m)*(a-this.m)+(b-this.n)*(b-this.n));var e=this.c.e*2;if(e/d0){switch(a){case 1:this.init1.apply(this,arguments);break}return}$.ig.$op.init.call(this);this.c=function(){var $ret=new $$t.l;$ret._edge=b.left();$ret._isClosed=c;return $ret}();this.a=function(){var $ret=new $$t.m;$ret._edge=b.bottom();$ret._isClosed=c;return $ret}();this.d=function(){var $ret=new $$t.n;$ret._edge=b.right();$ret._isClosed=c;return $ret}();this.e=function(){var $ret=new $$t.o;$ret._edge=b.top();$ret._isClosed=c;return $ret}()},init1:function(a,b,c,d,e,f){$.ig.$op.init.call(this);this.c=!$.ig.util.isNaN(b)?function(){var $ret=new $$t.l;$ret._edge=b;$ret._isClosed=f;return $ret}():null;this.a=!$.ig.util.isNaN(c)?function(){var $ret=new $$t.m;$ret._edge=c;$ret._isClosed=f;return $ret}():null;this.d=!$.ig.util.isNaN(d)?function(){var $ret=new $$t.n;$ret._edge=d;$ret._isClosed=f;return $ret}():null;this.e=!$.ig.util.isNaN(e)?function(){var $ret=new $$t.o;$ret._edge=e;$ret._isClosed=f;return $ret}():null},j:function(a){this.g.add(a)},k:function(a,b){var c=a;var d=a.count();var e=new Array(4);e[0]=this.e;e[1]=this.d;e[2]=this.a;e[3]=this.c;var f=0;var g=0;var h=0;var i=0;if(this.e!=null){f=this.e._edge}if(this.d!=null){g=this.d._edge}if(this.a!=null){h=this.a._edge}if(this.c!=null){i=this.c._edge}var j=false;var k;var l=e.length;var m=l+1;var n=null;var o;var p;var q=0;var r=new Array(16);var s=0;var t=new Array(16);var u=0;var v=1;var w;var x;if(b){u=d-1;v=-1}for(var y=u;y=0;y+=v){o=c.item(y);r[q]=o;q++;for(k=0;k=l){this.h.add(o);continue}j=k==0&&w>=f||k==1&&x<=g||k==2&&w<=h||k==3&&x>=i;if(n.c){n.c=false;n.j=o}else{if(true){if(j){if(!n.g){t[s]=n.k(n.l,o);s++}else{if(!n._isClosed&&!n.f){t[s]=n.l;s++;n.f=true}}t[s]=o;s++}else{if(n.g){if(!n._isClosed&&!n.f){t[s]=n.l;s++;n.f=true}t[s]=n.k(n.l,o);s++}}}}n.l=o;n.g=j}var z=r;r=t;t=z;q=s;s=0}}},f:function(a){if(arguments.length===1){if(this.c!=null){this.c._isClosed=a}if(this.a!=null){this.a._isClosed=a}if(this.d!=null){this.d._isClosed=a}if(this.e!=null){this.e._isClosed=a}return a}else{return(this.c==null||this.c._isClosed)&&(this.a==null||this.a._isClosed)&&(this.d==null||this.d._isClosed)&&(this.e==null||this.e._isClosed)}},$type:new $.ig.Type("Clipper",$.ig.$ot)},true);$c("EdgeClipper:k","Object",{init:function(){this.c=true;this.f=false;$.ig.$op.init.call(this)},dst:function(a){if(arguments.length===1){if(this._dst!=a){this.c=true;this._dst=a}return a}else{return this._dst}},_dst:null,__nextClipper:null,nextClipper:function(a){if(arguments.length===1){this.__nextClipper=a;return a}else{return this.__nextClipper}},c:false,j:null,l:null,g:false,_isClosed:false,f:false,add:function(a){var b=this.e(a);if(this.c){this.c=false;this.j=a}else{if(true){if(b){if(!this.g){this._dst.add(this.k(this.l,a))}else{if(!this._isClosed&&!this.f){this._dst.add(this.l);this.f=true}}this._dst.add(a)}else{if(this.g){if(!this._isClosed&&!this.f){this._dst.add(this.l);this.f=true}this._dst.add(this.k(this.l,a))}}}}this.l=a;this.g=b},clear:function(){if(this._isClosed&&!this.c){this.add(this.j)}if(this.__nextClipper!=null){this.__nextClipper.clear()}this.c=true;this.f=false},e:function(a){},k:function(a,b){},getEnumerator:function(){return null},isReadOnly:function(){return false},count:function(){return 0},remove:function(a){return false},removeAt:function(a){},copyTo:function(a,b){},contains:function(a){return false},item:function(a,b){if(arguments.length===2){return b}else{return{__x:0,__y:0,$type:$$a.$y.$type,getType:$.ig.$op.getType,getGetHashCode:$.ig.$op.getGetHashCode,typeName:$.ig.$op.typeName}}},insert:function(a,b){},indexOf:function(a){return-1},$type:new $.ig.Type("EdgeClipper",$.ig.$ot,[$$0.$bz.$type.specialize($$a.$y.$type)])},true);$c("LeftClipper:l","EdgeClipper",{init:function(){$$t.$k.init.call(this)},_edge:0,e:function(a){return a.__x>=this._edge},k:function(a,b){return{__x:this._edge,__y:a.__y+(b.__y-a.__y)*(this._edge-a.__x)/(b.__x-a.__x),$type:$$a.$y.$type,getType:$.ig.$op.getType,getGetHashCode:$.ig.$op.getGetHashCode,typeName:$.ig.$op.typeName}},$type:new $.ig.Type("LeftClipper",$$t.$k.$type)},true);$c("BottomClipper:m","EdgeClipper",{init:function(){$$t.$k.init.call(this)},_edge:0,e:function(a){return a.__y<=this._edge},k:function(a,b){return{__x:a.__x+(b.__x-a.__x)*(this._edge-a.__y)/(b.__y-a.__y),__y:this._edge,$type:$$a.$y.$type,getType:$.ig.$op.getType,getGetHashCode:$.ig.$op.getGetHashCode,typeName:$.ig.$op.typeName}},$type:new $.ig.Type("BottomClipper",$$t.$k.$type)},true);$c("RightClipper:n","EdgeClipper",{init:function(){$$t.$k.init.call(this)},_edge:0,e:function(a){return a.__x<=this._edge},k:function(a,b){return{__x:this._edge,__y:a.__y+(b.__y-a.__y)*(this._edge-a.__x)/(b.__x-a.__x),$type:$$a.$y.$type,getType:$.ig.$op.getType,getGetHashCode:$.ig.$op.getGetHashCode,typeName:$.ig.$op.typeName}},$type:new $.ig.Type("RightClipper",$$t.$k.$type)},true);$c("TopClipper:o","EdgeClipper",{init:function(){$$t.$k.init.call(this)},_edge:0,e:function(a){return a.__y>=this._edge},k:function(a,b){return{__x:a.__x+(b.__x-a.__x)*(this._edge-a.__y)/(b.__y-a.__y),__y:this._edge,$type:$$a.$y.$type,getType:$.ig.$op.getType,getGetHashCode:$.ig.$op.getGetHashCode,typeName:$.ig.$op.typeName}},$type:new $.ig.Type("TopClipper",$$t.$k.$type)},true);$c("Flattener:p","Object",{init:function(){$.ig.$op.init.call(this)},d:function(a,b,c,d){var e=new $$4.x($$0.$aw.$type,0);$$t.$p.c(e,b,c,0,a-1,d);return e},c:function(a,b,c,d,e,f){return $$t.$p.b(a,function(g){return g},b,c,d,e,f)},a:function(a,b,c,d,e,f,g){return $$t.$p.b(a,function(h){return b.item(h)},c,d,e,f,g)},b:function(a,b,c,d,e,f,g){if(e>f){return a}var h=c(b(e));var i=d(b(e));while(($.ig.util.isNaN(h)||$.ig.util.isNaN(i))&&e=f){return}var l=-1;var m=g;var n=$.ig.MathUtil.prototype.e(j-h,k-i);if(n==0){for(var o=e+1;o=m){m=r;l=o}}}else{var s=j-h;var t=k-i;for(var u=e+1;u=m){m=x;l=u}}}if(l!=-1){$$t.$p.e(a,b,c,d,e,l,g);a.add(b(l));$$t.$p.e(a,b,c,d,l,f,g)}return},$type:new $.ig.Type("Flattener",$.ig.$ot)},true);$c("FastFlattener:q","Object",{init:function(){$.ig.$op.init.call(this)},e:function(a,b,c,d,e,f){if(d>e){return a}var g=b[d];var h=c[d];while(($.ig.util.isNaN(g)||$.ig.util.isNaN(h))&&d0){if(m<=h){$$t.$q.f(i,b,c,d,k,l,g);k=l+1}else{var n=k+h-1;$$t.$q.f(i,b,c,d,k,n,g);k=n+1}m=l-k+1}return i},f:function(a,b,c,d,e,f,g){var h;var i;if(c){h=0;i=1}else if(d){h=0;i=2}else{h=2;i=3}return $$t.$q.g(a,b,h,i,e,f,g)},g:function(a,b,c,d,e,f,g){if(e>f){return a}var h=b.__inner[e];var i,j;i=h[c];j=h[d];while(($.ig.util.isNaN(i)||$.ig.util.isNaN(j))&&e=e){return}var k=-1;var l=f*f;var m;var n;m=i-g;n=j-h;var o=m*m+n*n;if(o==0){for(var p=d+1;p=l){l=s;k=p}}}else{var t=i-g;var u=j-h;for(var v=d+1;v=l){l=y;k=v}}}if(k!=-1){$$t.$q.h(a,b,c,d,k,f);a.add(k);$$t.$q.h(a,b,c,k,e,f)}return},i:function(a,b,c,d,e,f,g){var h=b.__inner[e];var i,j;i=h[c];j=h[d];while(i!=i||j!=j&&e=f){return}var n=-1;var o=g*g;var p;var q;p=l-i;q=m-j;var r=p*p+q*q;if(r==0){for(var s=e+1;s=o){o=w;n=s}}}else{var x=l-i;var y=m-j;for(var z=e+1;z=o){o=ad;n=z}}}if(n!=-1){$$t.$q.i(a,b,c,d,e,n,g);a.add(n);$$t.$q.i(a,b,c,d,n,f,g)}return},$type:new $.ig.Type("FastFlattener",$.ig.$ot)},true);$c("SpiralFlattener:r","Object",{init:function(){$.ig.$op.init.call(this)},a:function(a,b,c,d,e){if($.ig.util.isNaN(e)||e<=0){e=1}var f=new $$4.x(Number,0);var g=new $$4.aa($$t.$s.$type);var h=(d-b)/(c-a);var i=b-h*a;var j=h*h;var k=i*i;var l=i*h;g.push(function(){var $ret=new $$t.s;$ret.a=0;$ret.b=1;return $ret}());while(g.count()!=0){var m=g.pop();var n=b+m.a*(d-b);var o=a+m.a*(c-a);var p=o*o;var q=p*o;var r=b+m.b*(d-b);var s=a+m.b*(c-a);var t=s*s;var u=t*s;var v;if(h==0){v=k*(s-o)/2+l*(t-p)/2+j*(u-q)/6}else{v=(Math.pow(i+h*s,3)-Math.pow(i+h*o,3))/(6*h)}var w=.5*n*r*Math.sin(s-o);if(v-w>e){var x=.5*(m.a+m.b);g.push(function(){var $ret=new $$t.s;$ret.a=x;$ret.b=m.b;return $ret}());g.push(function(){var $ret=new $$t.s;$ret.a=m.a;$ret.b=x;return $ret}())}else{f.add(m.a)}}f.add(1);return f},$type:new $.ig.Type("SpiralFlattener",$.ig.$ot)},true);$c("SpiralTodo:s","Object",{init:function(){$.ig.$op.init.call(this)},a:0,b:0,$type:new $.ig.Type("SpiralTodo",$.ig.$ot)},true);$c("FlattenerSettings:t","Object",{init:function(){$.ig.$op.init.call(this);this.chunkingAmount(3e3)},instance:function(){if($$t.$t.a==null){$$t.$t.a=new $$t.t}return $$t.$t.a},_chunkingAmount:0,chunkingAmount:function(a){if(arguments.length===1){this._chunkingAmount=a;return a}else{return this._chunkingAmount}},$type:new $.ig.Type("FlattenerSettings",$.ig.$ot)},true);$c("GeometryUtil:u","Object",{init:function(){$.ig.$op.init.call(this)},g:function(a){if($.ig.util.isNaN(a)||Number.isInfinity(a)){return a}while(a>360){a-=360}while(a<0){a+=360}return a},c:function(a){return Math.atan(a)},h:function(a,b){return(b.__y-a.__y)/(b.__x-a.__x)},d:function(a){return 1-Math.pow(a.height()/2,2)/Math.pow(a.width()/2,2)},n:function(a,b,c,d,e){var f=Math.cos(a);var g=Math.sin(a);var h=Math.sqrt(d*d/(1-b*Math.pow(f,2)));h*=e;return{__x:h*f+c.__x,__y:h*g+c.__y,$type:$$a.$y.$type,getType:$.ig.$op.getType,getGetHashCode:$.ig.$op.getGetHashCode,typeName:$.ig.$op.typeName}},j:function(a,b,c,d,e){var f;if(c){f=$$t.$u.k({__x:a/2,__y:b/2,$type:$$a.$y.$type,getType:$.ig.$op.getType,getGetHashCode:$.ig.$op.getGetHashCode,typeName:$.ig.$op.typeName},d,e)}else{f={__x:a/2,__y:b/2,$type:$$a.$y.$type,getType:$.ig.$op.getType,getGetHashCode:$.ig.$op.getGetHashCode,typeName:$.ig.$op.typeName}}return f},k:function(a,b,c){b=b/180*Math.PI;var d=a.__y+c*Math.sin(b);var e=a.__x+c*Math.cos(b);return{__x:e,__y:d,$type:$$a.$y.$type,getType:$.ig.$op.getType,getGetHashCode:$.ig.$op.getGetHashCode,typeName:$.ig.$op.typeName}},m:function(a,b,c){var d=b.__x-a.__x;var e=b.__y-a.__y;var f=Math.sqrt(d*d+e*e);d=d/f*c;e=e/f*c;return{__x:a.__x+d,__y:a.__y+e,$type:$$a.$y.$type,getType:$.ig.$op.getType,getGetHashCode:$.ig.$op.getGetHashCode,typeName:$.ig.$op.typeName}},f:function(a,b){var c=Math.abs(b.__x-a.__x);var d=Math.abs(b.__y-a.__y);return Math.sqrt(c*c+d*d)},l:function(a,b,c,d,e){return $.ig.CoreGeometryUtil.prototype.b(a,b,c,d,e)},e:function(a,b){var c=Math.sqrt(Math.pow(b.__x-a.__x,2)+Math.pow(b.__y-a.__y,2));var d=Math.acos((b.__x-a.__x)/c);if(b.__y-a.__y<0){d=2*Math.PI-d}return d},i:function(a,b,c,d){var e=a.__x-c.__x;var f=a.__y-c.__y;var g=b.__x-c.__x;var h=b.__y-c.__y;var i=g-e;var j=h-f;var k=Math.sqrt(i*i+j*j);var l=e*h-g*f;var m=d*d;var n=k*k;var o=l*l;var p=m*n-o;if(p<0){return new $$6.u($$a.$y.$type,$$a.$y.$type,{__x:NaN,__y:NaN,$type:$$a.$y.$type,getType:$.ig.$op.getType,getGetHashCode:$.ig.$op.getGetHashCode,typeName:$.ig.$op.typeName},{__x:NaN,__y:NaN,$type:$$a.$y.$type,getType:$.ig.$op.getType,getGetHashCode:$.ig.$op.getGetHashCode,typeName:$.ig.$op.typeName})}var q=1;if(j<0){q=-1}var r=(l*j+q*i*Math.sqrt(p))/n;var s=(l*j-q*i*Math.sqrt(p))/n;var t=(-1*l*i+Math.abs(j)*Math.sqrt(p))/n;var u=(-1*l*i-Math.abs(j)*Math.sqrt(p))/n;return new $$6.u($$a.$y.$type,$$a.$y.$type,{__x:r+c.__x,__y:t+c.__y,$type:$$a.$y.$type,getType:$.ig.$op.getType,getGetHashCode:$.ig.$op.getGetHashCode,typeName:$.ig.$op.typeName},{__x:s+c.__x,__y:u+c.__y,$type:$$a.$y.$type,getType:$.ig.$op.getType,getGetHashCode:$.ig.$op.getGetHashCode,typeName:$.ig.$op.typeName})},a:function(a,b,c,d){var e=d*d;var f=b.__x;var g=b.__y; var h=c.__x;var i=c.__y;var j=a.__x;var k=a.__y;if(g==i){var l=Math.abs(g-k)=Math.min(f,h)-d&&j<=Math.max(f,h)+d;if(l&&m){return true}else{return false}}if(f==h){var n=Math.abs(f-j)=Math.min(g,i)-d&&k<=Math.max(g,i)+d;if(n&&o){return true}else{return false}}var p=h-f;var q=i-g;var r=p*p+q*q;if(r==0){return(j-f)*(j-f)+(k-g)*(k-g)1?1:s;var t=f+p*s;var u=g+q*s;var v=(t-j)*(t-j)+(u-k)*(u-k);if(v=Math.min(l,n)-d&&i<=Math.max(l,n)+d;if(p&&q){return true}else{continue}}if(l==n){var r=Math.abs(l-i)=Math.min(m,o)-d&&j<=Math.max(m,o)+d;if(r&&s){return true}else{continue}}var t=n-l;var u=o-m;var v=t*t+u*u;if(v==0){return(i-l)*(i-l)+(j-m)*(j-m)1?1:w;var x=l+t*w;var y=m+u*w;var z=(x-i)*(x-i)+(y-j)*(y-j);if(z360){a-=360}while(a<0){a+=360}return a},$type:new $.ig.Type("AngleSimplifier",$.ig.$ot)},true);$c("PathFigureUtil:w","Object",{init:function(){$.ig.$op.init.call(this)},b:function(a){var b=new $$a.a9;var d=a.getEnumerator();while(d.moveNext()){var c=d.current();b.add($$t.$w.a(c))}return b},a:function(a){if(a==null){return null}var b=new $$a.bc;var d=a.__segments.getEnumerator();while(d.moveNext()){var c=d.current();switch(c.a()){case 4:var e=c;var f=new $$a.bh;f._b=e._b;f._e=e._e;f._c=e._c;f._f=e._f;f._d=e._d;b.add(f);break;case 0:var g=c;var h=new $$a.bd(1);h.c(g.c());b.add(h);break;case 3:var i=c;var j=new $$a.bg;var l=i.__points.getEnumerator();while(l.moveNext()){var k=l.current();j.__points.add(k)}b.add(j);break}}return function(){var $ret=new $$a.a8;$ret.isClosed(a.__isClosed);$ret.isFilled(a.__isFilled);$ret.startPoint(a.__startPoint);$ret.segments(b);return $ret}()},$type:new $.ig.Type("PathFigureUtil",$.ig.$ot)},true);$c("PolygonUtil:x","Object",{init:function(){$.ig.$op.init.call(this)},a:function(a,b){if(a==null){return false}var c=a.count();if(c<4){return false}var d=false;for(var e=0,f=c-1;eb.__y!=a.item(f).__y>b.__y&&b.__x<(a.item(f).__x-a.item(e).__x)*(b.__y-a.item(e).__y)/(a.item(f).__y-a.item(e).__y)+a.item(e).__x){d=!d}}return d},$type:new $.ig.Type("PolygonUtil",$.ig.$ot)},true);$c("PolySimplification:y","Object",{init:function(){$.ig.$op.init.call(this)},b:function(a,b){var c=a._c;var d=a._d;if(c.length==0){return 0}var e=0;var f=0;var g=b*b;e++;var h;var i;var j;for(var k=0;kg){c[e]=c[k];d[e]=d[k];e++;f=k}}return e},a:function(a,b){var c=b.__x-a.__x;var d=b.__y-a.__y;return c*c+d*d},$type:new $.ig.Type("PolySimplification",$.ig.$ot)},true);$c("ISmartPlaceable:ab","Object",{$type:new $.ig.Type("ISmartPlaceable",null)},true);$c("SmartPlaceableWrapper$1:z","Object",{$t:null,init:function($t){this.$t=$t;if(!this.hasOwnProperty("$type")){this.$type=this.$type.specialize(this.$t)}this._elementDesiredSize=new $$a.af;$.ig.$op.init.call(this);this.noWiggle(false)},_noWiggle:false,noWiggle:function(a){if(arguments.length===1){this._noWiggle=a;return a}else{return this._noWiggle}},c:null,element:function(a){if(arguments.length===1){this.c=a;return a}else{return this.c}},_elementLocationResult:null,elementLocationResult:function(a){if(arguments.length===1){this._elementLocationResult=a;return a}else{return this._elementLocationResult}},_originalLocation:null,originalLocation:function(a){if(arguments.length===1){this._originalLocation=a;return a}else{return this._originalLocation}},getSmartPositions:function(){if(this.noWiggle()){return this.$type.getStaticFields($$t.$z.$type).a}else{return this.$type.getStaticFields($$t.$z.$type).b}},_elementDesiredSize:null,elementDesiredSize:function(a){if(arguments.length===1){this._elementDesiredSize=a;return a}else{return this._elementDesiredSize}},k:function(){return this.elementDesiredSize()},getSmartBounds:function(a){var b=this.k();var c=b.width();var d=b.height();var e;{e=this.h(a,c,d)}return new $$a.ae(0,this.originalLocation().__x+e.__x,this.originalLocation().__y+e.__y,c,d)},opacity:function(a){if(arguments.length===1){this.element().__opacity=a;return a}else{return this.element().__opacity}},smartPosition:function(a){if(arguments.length===1){this.e=a;var b=this.k();var c=b.height();var d=b.width();var e;{e=this.h(this.e,d,c)}this.elementLocationResult({__x:this.originalLocation().__x+e.__x,__y:this.originalLocation().__y+e.__y,$type:$$a.$y.$type,getType:$.ig.$op.getType,getGetHashCode:$.ig.$op.getGetHashCode,typeName:$.ig.$op.typeName});return a}else{return this.e}},e:0,h:function(a,b,c){var d=.25;switch(a){case 0:return{__x:-b*d,__y:-c*d,$type:$$a.$y.$type,getType:$.ig.$op.getType,getGetHashCode:$.ig.$op.getGetHashCode,typeName:$.ig.$op.typeName};case 1:return{__x:0,__y:-c*d,$type:$$a.$y.$type,getType:$.ig.$op.getType,getGetHashCode:$.ig.$op.getGetHashCode,typeName:$.ig.$op.typeName};case 2:return{__x:b*d,__y:-c*d,$type:$$a.$y.$type,getType:$.ig.$op.getType,getGetHashCode:$.ig.$op.getGetHashCode,typeName:$.ig.$op.typeName};case 3:return{__x:-b*d,__y:0,$type:$$a.$y.$type,getType:$.ig.$op.getType,getGetHashCode:$.ig.$op.getGetHashCode,typeName:$.ig.$op.typeName};case 4:return{__x:0,__y:0,$type:$$a.$y.$type,getType:$.ig.$op.getType,getGetHashCode:$.ig.$op.getGetHashCode,typeName:$.ig.$op.typeName};case 5:return{__x:b*d,__y:0,$type:$$a.$y.$type,getType:$.ig.$op.getType,getGetHashCode:$.ig.$op.getGetHashCode,typeName:$.ig.$op.typeName};case 6:return{__x:-b*d,__y:c*d,$type:$$a.$y.$type,getType:$.ig.$op.getType,getGetHashCode:$.ig.$op.getGetHashCode,typeName:$.ig.$op.typeName};case 7:return{__x:0,__y:c*d,$type:$$a.$y.$type,getType:$.ig.$op.getType,getGetHashCode:$.ig.$op.getGetHashCode,typeName:$.ig.$op.typeName};default:return{__x:b*d,__y:c*d,$type:$$a.$y.$type,getType:$.ig.$op.getType,getGetHashCode:$.ig.$op.getGetHashCode,typeName:$.ig.$op.typeName}}},$type:new $.ig.Type("SmartPlaceableWrapper$1",$.ig.$ot,[$$t.$ab.$type],function(){this.a=[4];this.b=[4,5,2,1,8,7,0,3,6]})},true);$c("SmartPlacer:ac","Object",{init:function(){this.a=new $$4.x($$a.$ae.$type,0);$.ig.$op.init.call(this);this._e=$$a.$ae.empty();this._c=.3;this._b=2},_e:null,_c:0,_b:0,d:function(a){if(a==null){return}var b=1.7976931348623157e308;var c=$$a.$ae.empty();var d=7;var e=false;var h=a.getSmartPositions();for(var g=0;gthis._c){a.opacity(0)}else{if(b>0){a.opacity(Math.pow(1-$.ig.MathUtil.prototype.b(0,m,1),this._b))}else{a.opacity(1)}a.smartPosition(d);this.a.add(c)}},a:null,$type:new $.ig.Type("SmartPlacer",$.ig.$ot)},true);$c("PointCollectionUtil:ad","Object",{init:function(){$.ig.$op.init.call(this)},d:function(a,b,c){if(b==null){return}b.clear();if(a.count()>=2){var d=$$t.$p.d(a.count(),function(e){return a.item(e).__x},function(e){return a.item(e).__y},c);var f=d.getEnumerator();while(f.moveNext()){var e=f.current();b.add(a.item(e))}}},g:function(a){var b=Number.POSITIVE_INFINITY;var c=Number.POSITIVE_INFINITY;var d=Number.NEGATIVE_INFINITY;var e=Number.NEGATIVE_INFINITY;var g=a.getEnumerator();while(g.moveNext()){var f=g.current();b=Math.min(b,f.__x);c=Math.min(c,f.__y);d=Math.max(d,f.__x);e=Math.max(e,f.__y)}if(Number.isInfinity(b)||Number.isInfinity(c)||Number.isInfinity(c)||Number.isInfinity(e)){return $$a.$ae.empty()}return new $$a.ae(0,b,c,d-b,e-c)},h:function(a){var b=$$a.$ae.empty();var d=a.getEnumerator();while(d.moveNext()){var c=d.current();b.union($$t.$ad.g(c))}return b},i:function(a){var b=Number.POSITIVE_INFINITY;var c=Number.POSITIVE_INFINITY;var d=Number.NEGATIVE_INFINITY;var e=Number.NEGATIVE_INFINITY;var f;for(var g=0;g