Z*J*m/t.graduatedRange)){var Q=y[0][0],tt=0,et=0;K=m*$.graduatedStart-1e-4,H=m*$.graduatedEnd+1e-4;var it=Z*J,nt=t.graduatedTickBase;if(ntt.graduatedMin+it&&(nt-=Math.floor((nt-t.graduatedMin)/it)*it);for(var rt=Y[W],st=nt,at=1;nt m&&(U=m),K<=U&&U<=H)){for(var ct=w[tt][et],ft=y[tt][et];tt Q&&et mt?0 Kt;Kt++){switch(Kt){case 0:Bt.h(It,Et);break;case 1:Bt.h(It+Ot,Et);break;case 2:Bt.h(It,Et+Dt);break;case 3:Bt.h(It+Ot,Et+Dt)}Bt.rotate(Ut+Pt.angle),Bt.offset(Xt,qt),0===Gt&&0===Kt?Rt.h(Bt.x,Bt.y,0,0):Rt.Oe(Bt),Bt.offset(-Xt,-qt),Bt.rotate(-Ut-Pt.angle)}pt.free(Bt),null!==Ct.dh&&Ct.dh.push(Rt),Ht(Tt,Rt.x,Rt.y,Rt.width,Rt.height)}else if(Pt instanceof Il){var _t=t,Wt=o;null===_t.zh&&(_t.zh=new Il);var $t=_t.zh;El($t,Pt);var Jt=Pt.alignmentFocus;Jt.nc()&&(Jt=oe);for(var Zt=Pt.segmentOrientation,Qt=Pt.segmentOffset,te=new zt,ee=0,ie=0,ne=0,re=0,se=0,ae=Nt.length,he=0;he ne||225 ne)&&pe.rotate(-ne,fe/2,de/2);var ge=zt.allocAt(0,0,fe,de),ye=pt.alloc();ye.tj(ge,Jt),pe.ta(ye);var me=-ye.x,ve=-ye.y,xe=pt.alloc();xe.assign(Qt),isNaN(xe.x)&&(xe.x=fe/2+3),isNaN(xe.y)&&(xe.y=-(de/2+3)),xe.rotate(ne),ee+=xe.x+me,ie+=xe.y+ve;var be=new zt(ee,ie,ue.width,ue.height),we=new zt(ue.x,ue.y,ue.width,ue.height),ke=new zt(ce.x,ce.y,ce.width,ce.height);le.DA=re,le.lineCount=$t.lineCount,le.lines=[$t.vb,$t.Ei,$t.oe,$t.Be,$t.Qb,$t.lb,$t.me],le.actualBounds=be,le.measuredBounds=we,le.naturalBounds=ke,0===he?te.assign(be):te.Rc(be),pt.free(xe),pt.free(ye),zt.free(ge),Ke.free(pe)}null!==_t.dh&&_t.dh.push(te),Ht(Wt,te.x,te.y,te.width,te.height)}ja(Pt,!1)}}},qh.prototype.arrange=function(t,e,i){if(null!==t.dh){var n=t.tb(),o=t.Mj;if(null!==o){var r=t.dh,s=0,a=r[s];s++,null!==n&&n.arrange(a.x-i.x,a.y-i.y,a.width,a.height);for(var h=e.length,l=0;l =o&&(o=1);for(var s=r.actualBounds,a=t.W.j,h=t.Mj,l=a.length,u=0;u t.graduatedTickUnit*c.interval*r.geometry.flattenedTotalLength/t.graduatedRange*o)){var p=c.measuredBounds,g=c.strokeWidth*c.scale,y=c.alignmentFocus;y.nc()&&(y=oe);for(var m=0;m n&&o.set(p),pt.free(p)),pt.free(u),r&&o.transform(s),l},i.o=function(t){if(!La(this)){ca.prototype.o.call(this,t),t=null,this.qa!==Uh.Auto&&this.qa!==Uh.Link||(t=this.tb());for(var e=this.W.j,i=e.length,n=0;ni||r>n)&&(this.o(),this.measure(e>i?i:e,r>n?n:r,0,0));break;case Xs:this.o(!0),this.measure(i+a,n+s,0,0);break;case Hs:this.o(!0),this.measure(i+a,r+s,0,0);break;case _s:this.o(!0),this.measure(e+a,n+s,0,0)}}this.qa.arrange(this,o,this.xg)}},i.Kh=function(t){var e=this.naturalBounds,i=$h(this);if(_t(0,0,e.width,e.height,t.x,t.y)){e=this.W.j;for(var n=e.length,o=pt.allocAt(0,0);n--;){var r=e[n];if((r.visible||r===i)&&(vt(o.set(t),r.transform),r.$(o)))return pt.free(o),!0}return pt.free(o),null!==this.mb||null!==this.ec}return!1},i.Gt=function(t){if(this.dl===t)return this;for(var e=this.W.j,i=e.length,n=0;nf.width||c.y>f.height||0>c.x+c.width||0>c.y+c.height||(c=u,u=u instanceof Uh?u:null,f=Ke.alloc(),f.set(s),(null!==u?u.zf(t,e,i,n,o,f):ga(c,t,n,f))&&(null!==e&&(c=e(c)),null===c||null!==i&&!i(c)||o.add(c)),Ke.free(f))}}return void 0===r&&Ke.free(s),n}return void 0===r&&Ke.free(s),!1},i.Eg=function(t,e,i,n,o,r){if(!1===this.pickable)return!1;void 0===i&&(i=null),void 0===n&&(n=null);var s=this.naturalBounds,a=this.he(),h=a?t:vt(pt.allocAt(t.x,t.y),this.transform),l=a?e:vt(pt.allocAt(e.x,e.y),this.transform),u=h.Ie(l),c=0 y.width||g.y>y.height||0>g.x+g.width||0>g.y+g.height)||(p.he()?(g=p.transform,vt(h.set(t),g),vt(l.set(e),g)):(h.set(t),l.set(e)),g=p,p=p instanceof Uh?p:null,(null!==p?p.Eg(h,l,i,n,o,r):g.sy(h,l,o))&&(null!==i&&(g=i(g)),null===g||null!==n&&!n(g)||r.add(g)))}}pt.free(h),pt.free(l)}return o?c:s}return!1},i.add=function(t){this.wb(this.W.count,t)},i.J=function(t){return this.W.J(t)},i.wb=function(t,e){e instanceof Lu&&w("Cannot add a Part to a Panel: "+e+"; use a Panel instead"),(this===e||this.Gg(e))&&(this===e&&w("Cannot make a Panel contain itself: "+this.toString()),w("Cannot make a Panel indirectly contain itself: "+this.toString()+" already contains "+e.toString()));var i=e.panel;if(null!==i&&i!==this&&w("Cannot add a GraphObject that already belongs to another Panel to this Panel: "+e.toString()+", already contained by "+i.toString()+", cannot be shared by this Panel: "+this.toString()),this.qa!==Uh.Grid||e instanceof Nl||w("Can only add Shapes to a Grid Panel, not: "+e),this.qa!==Uh.Graduated||e instanceof Nl||e instanceof Il||w("Can only add Shapes or TextBlocks to a Graduated Panel, not: "+e),e.sj(this),e.ak=null,null!==this.itemArray){var n=e.data;null!==n&&"object"===typeof n&&(null===this.Zd&&(this.Zd=new dt),this.Zd.add(n,e))}var o=this.W;if(n=-1,i===this){for(var r=-1,s=this.W.j,a=s.length,h=0;h=o.count&&t>=o.count)return;o.cb(r),n=r}else w("element "+e.toString()+" has panel "+i.toString()+" but is not contained by it.")}(0>t||t>o.count)&&(t=o.count),o.wb(t,e),(0===t||e.isPanelMain)&&(this.Ui=null),La(this)||this.o(),e.o(!1),(null!==e.portId||e instanceof Uh&&!0===e.Nh)&&(this.Nh=!0),this.eh=null,i=this.part,null!==i&&(i.Xj=null,i.kh=NaN,this.Nh&&i instanceof ec&&(i.Nh=!0),i.Nh&&i instanceof ec&&(i.tc=null),o=this.diagram,null!==o&&o.undoManager.isUndoingRedoing||(-1!==n&&i.Va(Ci,"elements",this,e,null,n,null),i.Va(Ni,"elements",this,null,e,null,t),this.Hg()||yl(this,e,!1)))},i.remove=function(t){for(var e=this.W.j,i=e.length,n=-1,o=0;ot&&M(t,">= 0",Uh,"getRowDefinition:idx"),t=Math.round(t);var e=this.qb;if(void 0===e)return null;if(void 0===e[t]){var i=new wl;i.sj(this),i.isRow=!0,i.index=t,e[t]=i,this.Va(Ni,"rowdefs",this,null,i,null,t)}return e[t]},Uh.prototype.XA=function(t){0>t&&M(t,">= 0",Uh,"removeRowDefinition:idx"),t=Math.round(t);var e=this.qb;if(void 0!==e){var i=e[t];if(i){e[t]=void 0;for(var n=e.length-1;0<=n&&void 0===e[n--];)e.length--;this.Va(Ci,"rowdefs",this,i,null,t,null),this.o()}}},Uh.prototype.getColumnDefinition=function(t){0>t&&M(t,">= 0",Uh,"getColumnDefinition:idx"),t=Math.round(t);var e=this.nb;if(void 0===e)return null;if(void 0===e[t]){var i=new wl;i.sj(this),i.isRow=!1,i.index=t,e[t]=i,this.Va(Ni,"coldefs",this,null,i,null,t)}return e[t]},i=Uh.prototype,i.SA=function(t){0>t&&M(t,">= 0",Uh,"removeColumnDefinition:idx"),t=Math.round(t);var e=this.nb;if(void 0!==e){var i=e[t];if(i){e[t]=void 0;for(var n=e.length-1;0<=n&&void 0===e[n--];)e.length--;this.Va(Ci,"coldefs",this,i,null,t,null),this.o()}}},i.aA=function(t){if(0>t||this.type!==Uh.Table)return-1;for(var e=0,i=this.qb,n=i.length,o=this.Xi;o t||this.type!==Uh.Table)return-1;for(var e=0,i=this.nb,n=i.length,o=this.Gi;o t;)this.Lc(this.W.length-1,!1);if(t=this.itemArray,null!==t)for(var e=t.length,i=0;i t&&M(t,">= 0",Uh,"padding"),t=new Qt(t)):(0>t.left&&M(t.left,">= 0",Uh,"padding:value.left"),0>t.right&&M(t.right,">= 0",Uh,"padding:value.right"),0>t.top&&M(t.top,">= 0",Uh,"padding:value.top"),0>t.bottom&&M(t.bottom,">= 0",Uh,"padding:value.bottom"));var e=this.ib;e.w(t)||(this.ib=t=t.H(),this.o(),this.g("padding",e,t))}},defaultAlignment:{get:function(){return this.Mn},set:function(t){var e=this.Mn;e.w(t)||(this.Mn=t=t.H(),this.o(),this.g("defaultAlignment",e,t))}},defaultStretch:{get:function(){return this.Sf},set:function(t){var e=this.Sf;e!==t&&(this.Sf=t,this.o(),this.g("defaultStretch",e,t))}},defaultSeparatorPadding:{get:function(){return void 0===this.Fj?Re:this.Fj},set:function(t){if(void 0!==this.Fj){"number"===typeof t&&(t=new Qt(t));var e=this.Fj;e.w(t)||(this.Fj=t=t.H(),this.o(),this.g("defaultSeparatorPadding",e,t))}}},defaultRowSeparatorStroke:{get:function(){return void 0===this.si?null:this.si},set:function(t){var e=this.si;e!==t&&(null===t||"string"===typeof t||t instanceof eh)&&(t instanceof eh&&t.freeze(),this.si=t,this.M(),this.g("defaultRowSeparatorStroke",e,t))}},defaultRowSeparatorStrokeWidth:{get:function(){return void 0===this.Ug?1:this.Ug},set:function(t){if(void 0!==this.Ug){var e=this.Ug;e!==t&&isFinite(t)&&0<=t&&(this.Ug=t,this.o(),this.g("defaultRowSeparatorStrokeWidth",e,t))}}},defaultRowSeparatorDashArray:{get:function(){return void 0===this.ri?null:this.ri},set:function(t){if(void 0!==this.ri){var e=this.ri;if(e!==t){if(null!==t){for(var i=t.length,n=0,o=0;ot)&&w("Panel.topIndex must be greater than zero and a real number, not: "+t),this.Xi=t,this.o(),this.g("topIndex",e,t))}}},leftIndex:{get:function(){return void 0===this.Gi?0:this.Gi},set:function(t){if(void 0!==this.Gi){var e=this.Gi;e!==t&&((!isFinite(t)||0>t)&&w("Panel.leftIndex must be greater than zero and a real number, not: "+t),this.Gi=t,this.o(),this.g("leftIndex",e,t))}}},data:{get:function(){return this.ob},set:function(t){var e=this.ob;if(e!==t){var i=this instanceof Lu&&!(this instanceof Qu);ul(this),this.ob=t;var n=this.diagram;null!==n&&(i?(i=n.partManager,this instanceof Nc?(null!==e&&i.Te.remove(e),null!==t&&i.Te.add(t,this)):this instanceof Lu&&(null!==e&&i.Ue.remove(e),null!==t&&i.Ue.add(t,this))):(i=this.panel,null!==i&&null!==i.Zd&&(null!==e&&i.Zd.remove(e),null!==t&&i.Zd.add(t,this)))),this.g("data",e,t),null!==n&&n.undoManager.isUndoingRedoing||null!==t&&this.Da()}}},itemIndex:{get:function(){return this.Do},set:function(t){var e=this.Do;e!==t&&(this.Do=t,this.g("itemIndex",e,t))}},itemArray:{get:function(){return this.Ci},set:function(t){var e=this.Ci;if(e!==t||null!==t&&cl(this,t)){var i=this.diagram;e!==t&&(null!==i&&null!==e&&Sd(i.partManager,this,i),this.Ci=t,null!==i&&null!==t&&Md(i.partManager,this)),this.g("itemArray",e,t),null!==i&&i.undoManager.isUndoingRedoing||this.eu()}}},itemTemplate:{get:function(){return null===this.te?null:this.te.G("")},set:function(t){if(null===this.te){if(null===t)return;this.te=new dt}var e=this.te.G("");e!==t&&((t instanceof Lu||t.isPanelMain)&&w("Panel.itemTemplate must not be a Part or be Panel.isPanelMain: "+t),this.te.add("",t),this.g("itemTemplate",e,t),t=this.diagram,null!==t&&t.undoManager.isUndoingRedoing||this.eu())}},itemTemplateMap:{get:function(){return this.te},set:function(t){var e=this.te;if(e!==t){for(var i=t.iterator;i.next(););this.te=t,this.g("itemTemplateMap",e,t),t=this.diagram,null!==t&&t.undoManager.isUndoingRedoing||this.eu()}}},itemCategoryProperty:{get:function(){return this.Jl},set:function(t){var e=this.Jl;e!==t&&(this.Jl=t,this.g("itemCategoryProperty",e,t))}},isAtomic:{get:function(){return 0!==(1048576&this.F)},set:function(t){var e=0!==(1048576&this.F);e!==t&&(this.F^=1048576,this.g("isAtomic",e,t))}},isClipping:{get:function(){return 0!==(2097152&this.F)},set:function(t){var e=0!==(2097152&this.F);e!==t&&(!t||this.type===Uh.Spot||this instanceof bc||S("Warning: Panel.isClipping set on non-Spot Panel: "+this.toString()),this.F^=2097152,this instanceof bc&&(this.Za=null),this.o(),this.g("isClipping",e,t))}},isOpposite:{get:function(){return 0!==(33554432&this.F)},set:function(t){var e=0!==(33554432&this.F);e!==t&&(this.F^=33554432,this.o(),this.g("isOpposite",e,t))}},isEnabled:{get:function(){return 0!==(4194304&this.F)},set:function(t){var e=0!==(4194304&this.F);if(e!==t){var i=null===this.panel||this.panel.Hg();this.F^=4194304,this.g("isEnabled",e,t),e=this.diagram,null!==e&&e.undoManager.isUndoingRedoing||i&&yl(this,this,t)}}},alignmentFocusName:{get:function(){return this.Lg},set:function(t){var e=this.Lg;e!==t&&(this.Lg=t,this.o(),this.g("alignmentFocusName",e,t))}}}),d.Object.defineProperties(Uh,{Position:{get:function(){return bl.G("Position")}},Horizontal:{get:function(){return bl.G("Horizontal")}},Vertical:{get:function(){return bl.G("Vertical")}},Spot:{get:function(){return bl.G("Spot")}},Auto:{get:function(){return bl.G("Auto")}},Table:{get:function(){return bl.G("Table")}},Viewbox:{get:function(){return bl.G("Viewbox")}},TableRow:{get:function(){return bl.G("TableRow")}},TableColumn:{get:function(){return bl.G("TableColumn")}},Link:{get:function(){return bl.G("Link")}},Grid:{get:function(){return bl.G("Grid")}},Graduated:{get:function(){return bl.G("Graduated")}}}),Uh.prototype.findItemPanelForData=Uh.prototype.qy,Uh.prototype.rebuildItemElements=Uh.prototype.eu,Uh.prototype.updateTargetBindings=Uh.prototype.Da,Uh.prototype.copyTemplate=Uh.prototype.Gz,Uh.prototype.graduatedValueForPoint=Uh.prototype.rA,Uh.prototype.graduatedPointForValue=Uh.prototype.qA,Uh.prototype.findColumnForLocalX=Uh.prototype.Tz,Uh.prototype.findRowForLocalY=Uh.prototype.aA,Uh.prototype.removeColumnDefinition=Uh.prototype.SA,Uh.prototype.removeRowDefinition=Uh.prototype.XA,Uh.prototype.removeAt=Uh.prototype.cb,Uh.prototype.remove=Uh.prototype.remove,Uh.prototype.insertAt=Uh.prototype.wb,Uh.prototype.elt=Uh.prototype.J,Uh.prototype.add=Uh.prototype.add,Uh.prototype.findObject=Uh.prototype.bb,Uh.prototype.findInVisualTree=Uh.prototype.ym,Uh.prototype.walkVisualTreeFrom=Uh.prototype.an,Uh.prototype.findMainElement=Uh.prototype.tb;var vl=!1,xl=null,bl=new dt;function wl(){ot(this),this.og=null,this.ns=!0,this.Ra=0,this.ad=NaN,this.nh=0,this.lh=1/0,this.yb=Ce,this.la=this.bc=this.ha=0,this.fb=null,this.Yp=Ml,this.De=Ks,this.Up=this.sg=null,this.Vp=NaN,this.mb=this.fk=null,this.In=!1}function kl(t){if(t.sizing===Ml){var e=t.og;return t.isRow?e.rowSizing:e.columnSizing}return t.sizing}Uh.className="Panel",Uh.definePanelLayout=ml,ml("Position",new jh),ml("Vertical",new Dh),ml("Auto",new Bh),ml("Link",new Yh),wl.prototype.copy=function(){var t=new wl;return t.ns=this.ns,t.Ra=this.Ra,t.ad=this.ad,t.nh=this.nh,t.lh=this.lh,t.yb=this.yb,t.ha=this.ha,t.bc=this.bc,t.la=this.la,t.De=this.De,t.Yp=this.Yp,null===this.sg?t.sg=null:t.sg=this.sg.H(),t.Up=this.Up,t.Vp=this.Vp,t.fk=null,null!==this.fk&&(t.separatorDashArray=T(this.separatorDashArray)),t.mb=this.mb,t.In=this.In,t.fb=this.fb,t},i=wl.prototype,i.gy=function(t){t.isRow?this.height=t.height:this.width=t.width,this.minimum=t.minimum,this.maximum=t.maximum,this.alignment=t.alignment,this.stretch=t.stretch,this.sizing=t.sizing,this.sg=null===t.separatorPadding?null:t.separatorPadding.H(),this.separatorStroke=t.separatorStroke,this.separatorStrokeWidth=t.separatorStrokeWidth,this.fk=null,t.separatorDashArray&&(this.fk=T(t.separatorDashArray)),this.background=t.background,this.coversSeparators=t.coversSeparators,this.fb=t.fb},i.jb=function(t){t.classType===wl&&(this.sizing=t)},i.toString=function(){return"RowColumnDefinition "+(this.isRow?"(Row ":"(Column ")+this.index+") #"+st(this)},i.sj=function(t){this.og=t},i.Jv=function(){var t=0,e=0,i=this.og,n=this.isRow;if(null!==i&&i.type===Uh.Table)for(var o=n?i.qb.length:i.nb.length,r=0;r t&&M(t,">= 0",wl,"height"),this.ad=t,this.actual=this.ha,null!==this.panel&&this.panel.o(),this.Bb("height",e,t))}},width:{get:function(){return this.ad},set:function(t){var e=this.ad;e!==t&&(0>t&&M(t,">= 0",wl,"width"),this.ad=t,this.actual=this.ha,null!==this.panel&&this.panel.o(),this.Bb("width",e,t))}},minimum:{get:function(){return this.nh},set:function(t){var e=this.nh;e!==t&&((0>t||!isFinite(t))&&M(t,">= 0",wl,"minimum"),this.nh=t,this.actual=this.ha,null!==this.panel&&this.panel.o(),this.Bb("minimum",e,t))}},maximum:{get:function(){return this.lh},set:function(t){var e=this.lh;e!==t&&(0>t&&M(t,">= 0",wl,"maximum"),this.lh=t,this.actual=this.ha,null!==this.panel&&this.panel.o(),this.Bb("maximum",e,t))}},alignment:{get:function(){return this.yb},set:function(t){var e=this.yb;e.w(t)||(this.yb=t.H(),null!==this.panel&&this.panel.o(),this.Bb("alignment",e,t))}},stretch:{get:function(){return this.De},set:function(t){var e=this.De;e!==t&&(this.De=t,null!==this.panel&&this.panel.o(),this.Bb("stretch",e,t))}},separatorPadding:{get:function(){return this.sg},set:function(t){"number"===typeof t&&(t=new Qt(t));var e=this.sg;null!==t&&null!==e&&e.w(t)||(null!==t&&(t=t.H()),this.sg=t,null!==this.panel&&this.panel.o(),this.Bb("separatorPadding",e,t))}},separatorStroke:{get:function(){return this.Up},set:function(t){var e=this.Up;e!==t&&(null!==t&&dh(t,"RowColumnDefinition.separatorStroke"),t instanceof eh&&t.freeze(),this.Up=t,null!==this.panel&&this.panel.o(),this.Bb("separatorStroke",e,t))}},separatorStrokeWidth:{get:function(){return this.Vp},set:function(t){var e=this.Vp;e!==t&&(this.Vp=t,null!==this.panel&&this.panel.o(),this.Bb("separatorStrokeWidth",e,t))}},separatorDashArray:{get:function(){return this.fk},set:function(t){var e=this.fk;if(e!==t){if(null!==t){for(var i=t.length,n=0,o=0;oo)){var r=n.measuredBounds,s=Math.max(1,r.width);r=r.height;for(var a,h,l,u,c,f,d=i[0],p=i[1],g=0,y=j(),m=2;m l&&(l=1),o=i=l,a=s/2,h=0!==a,m=0,f=y[m],l=f[0],c=f[1],u=f[2],f=f[3];for(var v=0;.1<=g;){if(0===v&&(h?(o=i,o-=a,g-=a,h=!1):o=i,0===o&&(o=1)),o>g)return void O(y);o>f?(v=o-f,o=f):v=0;var x=Math.sqrt(o*o/(1+u*u));if(0>l&&(x=-x),d+=x,p+=u*x,t.translate(d,p),t.rotate(c),t.translate(-s/2,-r/2),0===v&&n.ej(t,e),t.translate(s/2,r/2),t.rotate(-c),t.translate(-d,-p),g-=o,f-=o,0!==v){if(m++,m===y.length)return void O(y);f=y[m],l=f[0],c=f[1],u=f[2],f=f[3],o=v}}O(y)}}function Tl(t){var e=t.geometryStretch;return null!==t.Ed?e===Ks?Xs:e:e===Ks?Bl[t.figure].defaultStretch:e}function Al(t,e,i,n,o){return t=i.x-t,e=i.y-e,e=t*t+e*e,e i?t-i:i-t)<(e>n?e-n:n-e)?(t=e t||_e.aa(h.y,t))&&(h.y e||_e.aa(h.x,e))&&(h.x =t&&n<=e):(t =n&&i<=t)}function Ol(t){var e=t.diagram;null!==e&&e.undoManager.isUndoingRedoing||(t.segmentOrientation=hf,"None"!==t.rm?(t.segmentIndex=-1,t.alignmentFocus=Fe):"None"!==t.ul&&(t.segmentIndex=0,t.alignmentFocus=new Ge(1-Fe.x,Fe.y)))}function Dl(t){var e=Fl[t];if(void 0===e){var i=t.toLowerCase();if("none"===i)return"None";if(e=Fl[i],void 0===e){var n,o=null;for(n in _e.dn)if(n.toLowerCase()===i){o=n;break}if(null!==o)return t=Ze(_e.dn[o],!1),Fl[o]=t,i!==o&&(Fl[i]=o),o}}return"string"===typeof e?e:e instanceof We?t:null}wl.className="RowColumnDefinition",wl.Default=Ml,wl.None=Sl,wl.ProportionalExtra=Pl,f(Nl,ca),Nl.prototype.cloneProtected=function(t){ca.prototype.cloneProtected.call(this,t),t.na=this.na,t.Yn=this.Yn,t.ho=this.ho,t.Ed=this.Ed,t.tl=this.tl,t.Hc=this.Hc,t.wh=this.wh,t.km=this.km,t.lm=this.lm,t.gk=this.gk,null!==this.uh&&(t.uh=T(this.uh)),t.vh=this.vh,t.pf=this.pf.H(),t.qf=this.qf.H(),t.sp=this.sp,t.tp=this.tp,t.vo=this.vo,t.wp=this.wp,t.rm=this.rm,t.ul=this.ul,t.Yd=this.Yd,t.Wd=this.Wd,t.Ud=this.Ud,t.Vd=this.Vd},i=Nl.prototype,i.jb=function(t){t===qs||t===Us||t===Ws||t===Ks?this.geometryStretch=t:ca.prototype.jb.call(this,t)},i.toString=function(){return"Shape("+("None"!==this.figure?this.figure:"None"!==this.toArrow?this.toArrow:this.fromArrow)+")#"+st(this)},i.ej=function(t,e){var i=this.Hc,n=this.tl;if(null!==i||null!==n){var o=this.actualBounds,r=this.naturalBounds;null!==n&&va(this,t,n,!0,!1,r,o);var s=this.part,a=this.wh;null===i||0!==a||null===s||!this.isPanelMain&&s.tb()!==this||(a=s.type===Uh.Link&&s instanceof Qu&&"Selection"===s.category&&s.adornedObject instanceof Nl&&s.adornedPart.tb()===s.adornedObject?s.adornedObject.strokeWidth:0),0===a&&(i=null),null!==i&&0!==a&&(va(this,t,i,!1,!1,r,o),t.lineWidth=a,t.lineJoin=this.lm,t.lineCap=this.km,t.miterLimit=this.gk),o=!1,s&&e.Ke("drawShadows")&&(o=s.isShadowed),s=!0,null===i||null!==n&&"transparent"!==n||(s=!1),r=!1,a=this.strokeDashArray,null!==a&&(r=!0,t.Ft(a,this.vh));var h=this.na;if(null!==h){if(h.type===si)t.beginPath(),t.moveTo(h.startX,h.startY),t.lineTo(h.endX,h.endY),null!==i&&t.vj();else if(h.type===ai){var l=h.startX;a=h.startY;var u=h.endX,c=h.endY;h=Math.min(l,u);var f=Math.min(a,c);l=Math.abs(u-l),a=Math.abs(c-a),t.beginPath(),t.rect(h,f,l,a),null!==n&&t.Je(n),null!==i&&(s&&o&&Wa(t),0!==l&&0!==a||(t.beginPath(),t.rect(h,f,Math.max(l,.1),Math.max(a,.1))),t.vj(),s&&o&&$a(t))}else if(h.type===hi)l=h.startX,a=h.startY,u=h.endX,c=h.endY,h=Math.abs(u-l)/2,f=Math.abs(c-a)/2,l=Math.min(l,u)+h,a=Math.min(a,c)+f,t.beginPath(),t.moveTo(l,a-f),t.bezierCurveTo(l+_e.Kg*h,a-f,l+h,a-_e.Kg*f,l+h,a),t.bezierCurveTo(l+h,a+_e.Kg*f,l+_e.Kg*h,a+f,l,a+f),t.bezierCurveTo(l-_e.Kg*h,a+f,l-h,a+_e.Kg*f,l-h,a),t.bezierCurveTo(l-h,a-_e.Kg*f,l-_e.Kg*h,a-f,l,a-f),t.closePath(),null!==n&&t.Je(n),null!==i&&(s&&o?(Wa(t),t.vj(),$a(t)):t.vj());else if(h.type===li)for(a=h.figures,h=a.length,f=0;f g.sweepAngle,null!==d?d.endX:l.startX,null!==d?d.endY:l.startY)}else if(d=di(g,l),y=d.length,0===y)t.lineTo(g.centerX,g.centerY);else for(var m=0;m (i.startX-i.endX)*(t.x-i.endX)+(i.startY-i.endY)*(t.y-i.endY)||0>n)&&(zt.free(r),_e.Nb(i.startX,i.startY,i.endX,i.endY,o,t.x,t.y)));if(i.type===ai){e=i.startX;var s=i.startY,a=i.endX;if(i=i.endY,r.x=Math.min(e,a),r.y=Math.min(s,i),r.width=Math.abs(a-e),r.height=Math.abs(i-s),null===this.fill){if(r.Jc(-n,-n),r.$(t))return zt.free(r),!1;r.Jc(n,n)}return null!==this.stroke&&r.Jc(o,o),t=r.$(t),zt.free(r),t}if(i.type===hi){s=i.startX,o=i.startY,a=i.endX;var h=i.endY;if(i=Math.min(s,a),e=Math.min(o,h),s=Math.abs(a-s)/2,o=Math.abs(h-o)/2,i=t.x-(i+s),e=t.y-(e+o),null===this.fill){if(s-=n,o-=n,0>=s||0>=o||1>=i*i/(s*s)+e*e/(o*o))return zt.free(r),!1;s+=n,o+=n}return null!==this.stroke&&(s+=n,o+=n),zt.free(r),!(0>=s||0>=o)&&1>=i*i/(s*s)+e*e/(o*o)}return i.type===li?(zt.free(r),null===this.fill?ni(i,t.x,t.y,o):ei(i,t,o,1 =this.strokeWidth)u=_e.Me(l.startX,l.startY,l.endX,l.endY,r,s,a,h,o);else{if(l.startX===l.endX?(n=c,u=0):(e=(l.endY-l.startY)/(l.endX-l.startX),u=c/Math.sqrt(1+e*e),n=u*e),e=j(),t=new pt,_e.Me(l.startX+n,l.startY+u,l.endX+n,l.endY+u,r,s,a,h,t)&&e.push(t),t=new pt,_e.Me(l.startX-n,l.startY-u,l.endX-n,l.endY-u,r,s,a,h,t)&&e.push(t),t=new pt,_e.Me(l.startX+n,l.startY+u,l.startX-n,l.startY-u,r,s,a,h,t)&&e.push(t),t=new pt,_e.Me(l.endX+n,l.endY+u,l.endX-n,l.endY-u,r,s,a,h,t)&&e.push(t),a=e.length,0===a)return O(e),!1;for(u=!0,h=1/0,n=0;nMath.abs(i)){if(h=s-u-i*(r-n),0>t*t*i*i+l*l-h*h){o.x=NaN,o.y=NaN,u=!1;break t}c=Math.sqrt(t*t*i*i+l*l-h*h),a=(-t*t*i*h+t*l*c)/(l*l+t*t*i*i)+n,t=(-t*t*i*h-t*l*c)/(l*l+t*t*i*i)+n,l=i*(a-n)+h+u,h=i*(t-n)+h+u,Math.abs((r-a)*(r-a))+Math.abs((s-l)*(s-l)) a){o.x=NaN,o.y=NaN,u=!1;break t}h=Math.sqrt(a),a=u+h,h=u-h,Math.abs(a-s) Math.abs(p)?(g*=.5/p,p=.5):0!==g&&.5>Math.abs(g)&&(p*=.5/g,g=.5),m-=p,v-=g;d.contains(m,v);)m-=p,v-=g;for(o.x=a,o.y=h,g=0;g o)return!0;return!1}if(i&&null!==this.fill&&this.Kh(t,!0))return!0;var o=t.Ie(e),r=o;if(1.5 =o||bt(e,r,0,-c)>=o||bt(e,r,0,c)>=o||bt(e,r,u,0)>=o);if(t=_e.Mz(u,c,e,r),t*t<=o)return!0}else if(e.type===li){if(l=e.bounds,r=l.x,a=l.y,h=l.x+l.width,l=l.y+l.height,t.x>h&&t.x l&&t.yo&&xt(t.x,t.y,r,a,h,a)>o&&xt(t.x,t.y,h,l,r,l)>o&&xt(t.x,t.y,h,l,h,a)>o)return!1;if(r=Math.sqrt(o),!i){for(i=e.figures,e=0;e o)return!1;for(a=r.segments.j,h=a.length,l=0;l o)return!1;break;case mi:var f=j();if(_e.Fe(s,u,c.point1X,c.point1Y,c.point2X,c.point2Y,c.endX,c.endY,.8,f),s=n(f,t),O(f),s)return!1;if(s=c.endX,u=c.endY,t.qd(s,u)>o)return!1;break;case vi:if(f=j(),_e.Vq(s,u,c.point1X,c.point1Y,c.endX,c.endY,.8,f),s=n(f,t),O(f),s)return!1;if(s=c.endX,u=c.endY,t.qd(s,u)>o)return!1;break;case xi:case bi:f=c.type===xi?di(c,r):pi(c,r,s,u);var d=f.length;if(0===d){if(s=c.type===xi?c.centerX:c.endX,u=c.type===xi?c.centerY:c.endY,t.qd(s,u)>o)return!1;break}c=null;for(var p=j(),g=0;g = 0",Nl,"strokeWidth:value")}},strokeCap:{get:function(){return this.km},set:function(t){var e=this.km;e!==t&&("string"!==typeof t||"butt"!==t&&"round"!==t&&"square"!==t?M(t,'"butt", "round", or "square"',Nl,"strokeCap"):(this.km=t,this.M(),this.g("strokeCap",e,t)))}},strokeJoin:{get:function(){return this.lm},set:function(t){var e=this.lm;e!==t&&("string"!==typeof t||"miter"!==t&&"bevel"!==t&&"round"!==t?M(t,'"miter", "bevel", or "round"',Nl,"strokeJoin"):(this.lm=t,this.M(),this.g("strokeJoin",e,t)))}},strokeMiterLimit:{get:function(){return this.gk},set:function(t){var e=this.gk;if(e!==t&&1<=t){this.gk=t,this.M();var i=this.part;null!==i&&(i.kh=NaN),this.g("strokeMiterLimit",e,t)}}},strokeDashArray:{get:function(){return this.uh},set:function(t){var e=this.uh;if(e!==t){if(null!==t){for(var i=t.length,n=0,o=0;ot?t=0:1 t?t=0:1 =t.ve)null!==n&&n.h(0,a);else if(s=e,t.zg===Hl){t.Be=1;var l=Gl(e);if(0===h||l<=i)t.vb=Math.max(t.vb,l),Rl(t,e,t.vb),null!==n&&n.h(l,a);else{for(r=Vl(t,s),s=s.substr(r.length),e=Vl(t,s),l=Gl(r+e);0 i&&1 i;){var c=1;for(l=Gl(e.substr(0,c)),u=0;l<=i;)c++,u=l,l=Gl(e.substr(0,c));if(1===c){var f=l;r=Math.max(r,l)}else f=u,r=Math.max(r,u);if(c--,1>c&&(c=1),Rl(t,e.substr(0,c),f),h++,e=e.substr(c),t.Zc+h>t.ve)break}for(u=Vl(t,s),l=Gl(e+u);0 t.ve))break}t.Be=Math.min(t.ve,h),t.vb=Math.max(t.vb,r),null!==n&&n.h(t.vb,a*t.Be)}}function Vl(t,e){if(t.zg===$l)return e.substr(0,1);for(var i=e.length,n=0,o=eu;n=e.length?e:e.substr(0,n)}function Gl(t){return null===hu?8*t.length:hu.measureText(t).width}function Yl(t){if(null!==t.oe)return t.oe;var e=t.ne;if(null===hu){var i=16;return t.oe=i}return void 0!==iu[e]&&5e3>nu?i=iu[e]:(i=1.3*hu.measureText("M").width,iu[e]=i,nu++),t.oe=i}function Xl(t){if(null===hu)return 6;if(void 0!==ou[t]&&5e3>ru)var e=ou[t];else e=hu.measureText(su).width,ou[t]=e,ru++;return e}function ql(t,e){var i=t.Ub.replace(/\r\n/g,"\n").replace(/\r/g,"\n"),n=t.mf+t.nf;if(n=Math.max(0,Yl(t)+n),0===i.length)return t.vb=0,t.Zc=1,n;if(!t.isMultiline){var o=i.indexOf("\n",0);0<=o&&(i=i.substr(0,o))}o=0;for(var r,s=t.Zc=0,a=!1;!a;){if(r=i.indexOf("\n",s),-1===r&&(r=i.length,a=!0),s<=r){if(s=i.substr(s,r-s),t.zg!==Hl){t.Be=0;var h=Bt.alloc();zl(t,s,e,h),o+=h.height,Bt.free(h),t.Zc+=t.Be}else zl(t,s,e,null),o+=n,t.Zc++;t.Zc===t.ve&&(a=!0)}s=r+1}return t.us=o}Nl.className="Shape",Nl.getFigureGenerators=function(){var t,e=new dt;for(t in _e.Qe)t!==t.toLowerCase()&&e.add(t,_e.Qe[t]);return e.freeze(),e},Nl.defineFigureGenerator=function(t,e){var i=t.toLowerCase(),n=_e.Qe;n[t]=e,n[i]=t},Nl.getArrowheadGeometries=function(){var t=new dt;for(n in _e.dn)if(void 0===Fl[n]){var e=Ze(_e.dn[n],!1);Fl[n]=e,e=n.toLowerCase(),e!==n&&(Fl[e]=n)}for(var i in Fl)if(i!==i.toLowerCase()){var n=Fl[i];n instanceof We&&t.add(i,n)}return t.freeze(),t},Nl.defineArrowheadGeometry=function(t,e){var i=null;i="string"===typeof e?Ze(e,!1):e,e=t.toLowerCase(),"none"!==e&&t!==e||w("Shape.defineArrowheadGeometry name must not be empty or None or all-lower-case: "+t);var n=Fl;n[t]=i,n[e]=t},f(Il,ca),Il.prototype.cloneProtected=function(t){ca.prototype.cloneProtected.call(this,t),t.Ub=this.Ub,t.Jx=this.Jx,t.Hc=this.Hc,t.ne=this.ne,t.Vi=this.Vi,t.Td=this.Td,t.aj=this.aj,t.Pj=this.Pj,t.Bi=this.Bi,t.Ai=this.Ai,t.mg=this.mg,t.zg=this.zg,t.Zc=this.Zc,t.us=this.us,t.vb=this.vb,t.fv=this.fv,t.ev=this.ev,t.Vn=this.Vn,t.jq=this.jq,t.Wi=this.Wi,t.iq=this.iq,t.xn=this.xn,t.ld=this.ld,t.mf=this.mf,t.nf=this.nf,t.ti=this.ti,t.ve=this.ve,t.oe=this.oe,t.Be=this.Be,t.Qb=this.Qb,t.lb=this.lb,t.me=this.me,t.Ei=this.Ei,t.Yd=this.Yd,t.Wd=this.Wd,t.Ud=this.Ud,t.Lj=this.Lj,t.Vd=this.Vd},i=Il.prototype,i.jb=function(t){t.classType===Il?this.wrap=t:ca.prototype.jb.call(this,t)},i.toString=function(){return 22 f*u*u&&(i=!0),e.Gb!==t&&(i=!1),!1===e.Ke("textGreeking")&&(i=!1),e=this.mf,f=this.nf,this.flip){case Js:t.translate(o,0),t.scale(-1,1);break;case $s:t.translate(0,r),t.scale(1,-1);break;case Zs:t.translate(o,r),t.scale(-1,-1)}if(u=this.Zc,c=(e+s+f)*u,r>c&&(n=this.aj,n=n.y*r-n.y*c+n.offsetY),1===u&&null!==this.me)f=this.vb,f>o&&(f=o),this.dj(this.me,t,0,n+e,o,s,f,i,a,h,l);else if(null!==this.Qb&&null!==this.lb)for(c=0;co&&(d=o),n+=e,this.dj(this.lb[c],t,0,n,o,s,d,i,a,h,l),n+=s+f}switch(this.flip){case Js:t.scale(-1,1),t.translate(-o,0);break;case $s:t.scale(1,-1),t.translate(0,-r);break;case Zs:t.scale(-1,-1),t.translate(-o,-r)}}},i.dj=function(t,e,i,n,o,r,s,a,h,l,u){var c=0;a?("left"===h?c=0:"right"===h?c=o-s:"center"===h&&(c=(o-s)/2),e.fillRect(i+c,n+.25*r,s,1)):("left"===h?c=0:"right"===h?c=o:"center"===h&&(c=o/2),o=null!==Ul?Ul(this,r):.75*r,e.fillText(t,i+c,n+o),t=r/20|0,0===t&&(t=1),"right"===h?c-=s:"center"===h&&(c-=s/2),l&&(h=null!==Kl?Kl(this,r):.8*r,e.beginPath(),e.lineWidth=t,e.moveTo(i+c,n+h),e.lineTo(i+c+s,n+h),e.stroke()),u&&(e.beginPath(),e.lineWidth=t,n=n+r-r/2.2|0,0!==t%2&&(n+=.5),e.moveTo(i+c,n),e.lineTo(i+c+s,n),e.stroke()))},i.Hm=function(t,e,i,n){this.Ei=t;var o,r=this.ne;if(null!==hu&&au!==r&&(au=hu.font=r),this.vb=this.Be=0,this.me=this.lb=this.Qb=this.oe=null,isNaN(this.desiredSize.width)){if(r=this.Ub.replace(/\r\n/g,"\n").replace(/\r/g,"\n"),0===r.length)r=0;else if(this.isMultiline){for(var s=o=0,a=!1;!a;){var h=r.indexOf("\n",s);-1===h&&(h=r.length,a=!0),s=r.substr(s,h-s),this.ti===Ql&&(s=s.trim()),o=Math.max(o,Gl(s)),s=h+1}r=o}else o=r.indexOf("\n",0),0<=o&&(r=r.substr(0,o)),r=Gl(r);r=Math.min(r,t/this.scale),r=Math.max(8,r)}else r=this.desiredSize.width;if(null!==this.panel&&(r=Math.min(r,this.panel.maxSize.width)),o=ql(this,r),o=isNaN(this.desiredSize.height)?Math.min(o,e/this.scale):this.desiredSize.height,a=o,0!==this.vb&&null!==this.Qb&&null!==this.lb&&this.mg===Zl&&(e=this.ne,e=this.mg===Zl?Xl(e):0,h=this.mf+this.nf,h=Math.max(0,Yl(this)+h),a=Math.min(this.maxLines-1,Math.max(Math.floor(a/h+.01)-1,0)),!(a+1>=this.lb.length))){for(h=this.lb[a],e=Math.max(1,t-e);Gl(h)>e&&1 t?t=0:1 t?t=0:1 =t&&M(t,"> 0",Il,"maxLines"),this.ve=t,this.o(),this.g("maxLines",e,t))}},metrics:{get:function(){return{arrSize:null!==this.Qb?this.Qb:[this.vb],arrText:null!==this.lb?this.lb:[this.me],maxLineWidth:this.vb,fontHeight:this.oe}}},choices:{get:function(){return this.xn},set:function(t){var e=this.xn;e!==t&&(this.xn=t,this.g("choices",e,t))}}});var Ul=null,Kl=null,Hl=new U(Il,"None",0),_l=new U(Il,"WrapFit",1),Wl=new U(Il,"WrapDesiredSize",2),$l=new U(Il,"WrapBreakAll",3),Jl=new U(Il,"OverflowClip",0),Zl=new U(Il,"OverflowEllipsis",1),Ql=new U(Il,"FormatTrim",0),tu=new U(Il,"FormatNone",0),eu=/[ \u200b\u00ad]/,iu=new _,nu=0,ou=new _,ru=0,su="...",au="",hu=null,lu=!1;function uu(){this.Qb=[],this.lb=[]}function cu(){ca.call(this),this.Zg=null,this.$p="",this.th=Jt,this.yl=Xs,this.xh=this.ld=null,this.xl=ae,this.Td=qs,this.nm=null,this.uo=!1,this.Yr=!0,this.Ol=!1,this.gm=null}function fu(t){void 0===t&&(t=""),""!==t?gu[t]&&(delete gu[t],yu--):(gu=new _,yu=0)}function du(t,e){e.fz||(e.dv=function(i){e.ls=!0,e.ro=!1;var n=e.Wg.copy();if(null!==n&&void 0!==n){for(n=n.iterator;n.next();){var o=n.value,r=e.getAttribute("src"),s=o.pg.G(r);if(null!==s)for(var a=s.length,h=0;h=n.width&&(o=o+d.offsetX+(u*d.x-n.width*d.x)),c>=n.height&&(r=r+d.offsetY+(c*d.y-n.height*d.y)),a=Math.min(n.width,u),s=Math.min(n.height,c);break;case Xs:u=n.width,c=n.height;break;case Us:case Ws:f===Us?(f=Math.min(n.height/c,n.width/u),u*=f,c*=f):f===Ws&&(f=Math.max(n.height/c,n.width/u),u*=f,c*=f,u>=n.width&&(o=(o+d.offsetX+(u*d.x-n.width*d.x)/u)*a),c>=n.height&&(r=(r+d.offsetY+(c*d.y-n.height*d.y)/c)*s),a*=1/(u/n.width),s*=1/(c/n.height),u=n.width,c=n.height)}f=this.Af()*e.scale;var p=u*f*c*f,g=a*s/p,y=i.__goCache;f=null;var m=mu;if(i.ls&&void 0!==y&&4 m*m)for(null===y.cj&&(xu(y,4,h,l,i),xu(y,16,h,l,i)),h=y.cj,l=h.length,p=0;p
_e.Vh&&(_e.Uh[t]=n,_e.Vh++)),n})),Au("Square",(function(t,e,i){t="s"+e+","+i;var n=_e.Uh[t];return void 0!==n||(n=new We(ai),n.endX=e,n.endY=i,n.defaultStretch=Us,50>_e.Vh&&(_e.Uh[t]=n,_e.Vh++)),n})),Au("RoundedRectangle",(function(t,e,i){var n=t?t.parameter1:NaN;return(isNaN(n)||0>n)&&(n=5),n=Math.min(n,e/3),n=Math.min(n,i/3),t=n*_e.Kg,e=(new We).add(new ci(n,0,!0).add(new fi(yi,e-n,0)).add(new fi(mi,e,n,e-t,0,e,t)).add(new fi(yi,e,i-n)).add(new fi(mi,e-n,i,e,i-t,e-t,i)).add(new fi(yi,n,i)).add(new fi(mi,0,i-n,t,i,0,i-t)).add(new fi(yi,0,n)).add(new fi(mi,n,0,0,t,t,0).close())),1