You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
1178 lines
2.1 MiB
1178 lines
2.1 MiB
(self.webpackChunk=self.webpackChunk||[]).push([[8982],{8336:function(){"use strict"},12469:function(){"use strict"},99587:function(Tn,oi){"use strict";oi.Z={lists:"lists___xhHyq",item:"item___pWJAA",children:"children___sDG61",diamond:"diamond___FwgzD",button:"button___WPN6r",mathWrap:"mathWrap___FmnMJ",mathFillWrap:"mathFillWrap___PmY3H"}},63720:function(){"use strict";function Tn(Nt,nt,et,ct){et===void 0&&(et=0),ct===void 0&&(ct=1/0),this._name=Nt,this._defaultValue=nt,this._minimum=et,this._maximum=ct}Object.defineProperty(Tn.prototype,"name",{get:function(){return this._name},set:function(Nt){if(typeof Nt!="string"||Nt==="")throw new Error("Shape name must be a valid string.");this._name=Nt}}),Object.defineProperty(Tn.prototype,"defaultValue",{get:function(){return this._defaultValue},set:function(Nt){if(typeof Nt!="number"||isNaN(Nt))throw new Error("The default value must be a real number, not: "+Nt);this._defaultValue=Nt}}),Object.defineProperty(Tn.prototype,"minimum",{get:function(){return this._minimum},set:function(Nt){if(typeof Nt!="number"||isNaN(Nt))throw new Error("Minimum must be a real number, not: "+Nt);this._minimum=Nt}}),Object.defineProperty(Tn.prototype,"maximum",{get:function(){return this._maximum},set:function(Nt){if(typeof Nt!="number"||isNaN(Nt))throw new Error("Maximum must be a real number, not: "+Nt);this._maximum=Nt}}),go.Shape._FigureParameters={},go.Shape.getFigureParameter=function(Nt,nt){var et=go.Shape._FigureParameters[Nt];return et?et[nt]:null},go.Shape.setFigureParameter=function(Nt,nt,et){if(!(et instanceof Tn))throw new Error("Third argument to Shape.setFigureParameter is not FigureParameter: "+et);if(et.defaultValue<et.minimum||et.defaultValue>et.maximum)throw new Error("defaultValue must be between minimum and maximum, not: "+et.defaultValue);var ct=go.Shape._FigureParameters[Nt];ct||(ct=[],go.Shape._FigureParameters[Nt]=ct),ct[nt]=et};var oi=[];function Dt(Nt,nt){var et=oi.pop();return et===void 0?new go.Point(Nt,nt):(et.x=Nt,et.y=nt,et)}function Ft(){var Nt=oi.pop();return Nt===void 0?new go.Point:Nt}function se(Nt){oi.push(Nt)}function ye(Nt,nt,et,ct,lt,pt,vt,xt,Lt){Lt||(Lt=new go.Point);var Ot=Nt-et,Ht=lt-vt,te=NaN,_t=NaN;if(Ot===0)if(Ht===0)Nt===et&&(te=Nt,_t=nt);else{var Xt=(pt-xt)/Ht,ve=pt-Xt*lt;te=Nt,_t=Xt*te+ve}else if(Ht===0){var oe=(nt-ct)/Ot,Re=nt-oe*Nt;te=lt,_t=oe*te+Re}else{var oe=(nt-ct)/Ot,Xt=(pt-xt)/Ht,Re=nt-oe*Nt,ve=pt-Xt*lt;te=(ve-Re)/(oe-Xt),_t=oe*te+Re}return Lt.x=te,Lt.y=_t,Lt}function Be(Nt,nt,et,ct,lt,pt,vt,xt,Lt,Ot,Ht,te,_t,Xt){var ve=1-Lt,oe=Lt,Re=Nt*ve+et*oe,Ye=nt*ve+ct*oe,en=et*ve+lt*oe,Rn=ct*ve+pt*oe,wn=lt*ve+vt*oe,un=pt*ve+xt*oe,vn=Re*ve+en*oe,ne=Ye*ve+Rn*oe,jt=en*ve+wn*oe,Fe=Rn*ve+un*oe,We=vn*ve+jt*oe,Pn=ne*ve+Fe*oe;Ot.x=Re,Ot.y=Ye,Ht.x=vn,Ht.y=ne,te.x=We,te.y=Pn,_t.x=jt,_t.y=Fe,Xt.x=wn,Xt.y=un}var Se=new go.Spot(.156,.156),Rt=new go.Spot(.844,.844),ie=4*((Math.sqrt(2)-1)/3);go.Shape.setFigureParameter("RoundedRectangle",0,new Tn("CornerRounding",5)),go.Shape.defineFigureGenerator("RoundedRectangle",function(Nt,nt,et){var ct=Nt?Nt.parameter1:NaN;(isNaN(ct)||ct<0)&&(ct=5),ct=Math.min(ct,nt/3),ct=Math.min(ct,et/3);var lt=ct*ie,pt=new go.Geometry().add(new go.PathFigure(ct,0,!0).add(new go.PathSegment(go.PathSegment.Line,nt-ct,0)).add(new go.PathSegment(go.PathSegment.Bezier,nt,ct,nt-lt,0,nt,lt)).add(new go.PathSegment(go.PathSegment.Line,nt,et-ct)).add(new go.PathSegment(go.PathSegment.Bezier,nt-ct,et,nt,et-lt,nt-lt,et)).add(new go.PathSegment(go.PathSegment.Line,ct,et)).add(new go.PathSegment(go.PathSegment.Bezier,0,et-ct,lt,et,0,et-lt)).add(new go.PathSegment(go.PathSegment.Line,0,ct)).add(new go.PathSegment(go.PathSegment.Bezier,ct,0,0,lt,lt,0).close()));return lt>1&&(pt.spot1=new go.Spot(0,0,lt,lt),pt.spot2=new go.Spot(1,1,-lt,-lt)),pt}),go.Shape.defineFigureGenerator("Border","RoundedRectangle"),go.Shape.defineFigureGenerator("TriangleRight",function(Nt,nt,et){return new go.Geometry().add(new go.PathFigure(0,0).add(new go.PathSegment(go.PathSegment.Line,nt,.5*et)).add(new go.PathSegment(go.PathSegment.Line,0,et).close())).setSpots(0,.25,.5,.75)}),go.Shape.defineFigureGenerator("TriangleDown",function(Nt,nt,et){return new go.Geometry().add(new go.PathFigure(0,0).add(new go.PathSegment(go.PathSegment.Line,nt,0)).add(new go.PathSegment(go.PathSegment.Line,.5*nt,et).close())).setSpots(.25,0,.75,.5)}),go.Shape.defineFigureGenerator("TriangleLeft",function(Nt,nt,et){return new go.Geometry().add(new go.PathFigure(nt,et).add(new go.PathSegment(go.PathSegment.Line,0,.5*et)).add(new go.PathSegment(go.PathSegment.Line,nt,0).close())).setSpots(.5,.25,1,.75)}),go.Shape.defineFigureGenerator("TriangleUp",function(Nt,nt,et){return new go.Geometry().add(new go.PathFigure(nt,et).add(new go.PathSegment(go.PathSegment.Line,0,et)).add(new go.PathSegment(go.PathSegment.Line,.5*nt,0).close())).setSpots(.25,.5,.75,1)}),go.Shape.defineFigureGenerator("Triangle","TriangleUp"),go.Shape.defineFigureGenerator("Diamond",function(Nt,nt,et){return new go.Geometry().add(new go.PathFigure(.5*nt,0).add(new go.PathSegment(go.PathSegment.Line,0,.5*et)).add(new go.PathSegment(go.PathSegment.Line,.5*nt,et)).add(new go.PathSegment(go.PathSegment.Line,nt,.5*et).close())).setSpots(.25,.25,.75,.75)}),go.Shape.defineFigureGenerator("LineH",function(Nt,nt,et){var ct=new go.Geometry(go.Geometry.Line);return ct.startX=0,ct.startY=et/2,ct.endX=nt,ct.endY=et/2,ct}),go.Shape.defineFigureGenerator("LineV",function(Nt,nt,et){var ct=new go.Geometry(go.Geometry.Line);return ct.startX=nt/2,ct.startY=0,ct.endX=nt/2,ct.endY=et,ct}),go.Shape.defineFigureGenerator("BarH","Rectangle"),go.Shape.defineFigureGenerator("BarV","Rectangle"),go.Shape.defineFigureGenerator("MinusLine","LineH"),go.Shape.defineFigureGenerator("PlusLine",function(Nt,nt,et){return new go.Geometry().add(new go.PathFigure(0,et/2,!1).add(new go.PathSegment(go.PathSegment.Line,nt,et/2)).add(new go.PathSegment(go.PathSegment.Move,nt/2,0)).add(new go.PathSegment(go.PathSegment.Line,nt/2,et)))}),go.Shape.defineFigureGenerator("XLine",function(Nt,nt,et){return new go.Geometry().add(new go.PathFigure(0,et,!1).add(new go.PathSegment(go.PathSegment.Line,nt,0)).add(new go.PathSegment(go.PathSegment.Move,0,0)).add(new go.PathSegment(go.PathSegment.Line,nt,et)))}),go.Shape.defineFigureGenerator("LineRight",function(Nt,nt,et){return new go.Geometry().add(new go.PathFigure(.25*nt,0,!1).add(new go.PathSegment(go.PathSegment.Line,.75*nt,.5*et)).add(new go.PathSegment(go.PathSegment.Line,.25*nt,et)))}),go.Shape.defineFigureGenerator("LineDown",function(Nt,nt,et){return new go.Geometry().add(new go.PathFigure(0,.25*et,!1).add(new go.PathSegment(go.PathSegment.Line,.5*nt,.75*et)).add(new go.PathSegment(go.PathSegment.Line,nt,.25*et)))}),go.Shape.defineFigureGenerator("LineLeft",function(Nt,nt,et){return new go.Geometry().add(new go.PathFigure(.75*nt,0,!1).add(new go.PathSegment(go.PathSegment.Line,.25*nt,.5*et)).add(new go.PathSegment(go.PathSegment.Line,.75*nt,et)))}),go.Shape.defineFigureGenerator("LineUp",function(Nt,nt,et){return new go.Geometry().add(new go.PathFigure(0,.75*et,!1).add(new go.PathSegment(go.PathSegment.Line,.5*nt,.25*et)).add(new go.PathSegment(go.PathSegment.Line,nt,.75*et)))}),go.Shape.defineFigureGenerator("AsteriskLine",function(Nt,nt,et){var ct=.2/Math.SQRT2;return new go.Geometry().add(new go.PathFigure(ct*nt,(1-ct)*et,!1).add(new go.PathSegment(go.PathSegment.Line,(1-ct)*nt,ct*et)).add(new go.PathSegment(go.PathSegment.Move,ct*nt,ct*et)).add(new go.PathSegment(go.PathSegment.Line,(1-ct)*nt,(1-ct)*et)).add(new go.PathSegment(go.PathSegment.Move,0,et/2)).add(new go.PathSegment(go.PathSegment.Line,nt,et/2)).add(new go.PathSegment(go.PathSegment.Move,nt/2,0)).add(new go.PathSegment(go.PathSegment.Line,nt/2,et)))}),go.Shape.defineFigureGenerator("CircleLine",function(Nt,nt,et){var ct=nt/2,lt=new go.Geometry().add(new go.PathFigure(nt,nt/2,!1).add(new go.PathSegment(go.PathSegment.Arc,0,360,ct,ct,ct,ct).close()));return lt.spot1=Se,lt.spot2=Rt,lt.defaultStretch=go.GraphObject.Uniform,lt}),go.Shape.defineFigureGenerator("Line1",function(Nt,nt,et){var ct=new go.Geometry(go.Geometry.Line);return ct.startX=0,ct.startY=0,ct.endX=nt,ct.endY=et,ct}),go.Shape.defineFigureGenerator("Line2",function(Nt,nt,et){var ct=new go.Geometry(go.Geometry.Line);return ct.startX=nt,ct.startY=0,ct.endX=0,ct.endY=et,ct}),go.Shape.defineFigureGenerator("Curve1",function(Nt,nt,et){return new go.Geometry().add(new go.PathFigure(0,0,!1).add(new go.PathSegment(go.PathSegment.Bezier,nt,et,ie*nt,0,nt,(1-ie)*et)))}),go.Shape.defineFigureGenerator("Curve2",function(Nt,nt,et){return new go.Geometry().add(new go.PathFigure(0,0,!1).add(new go.PathSegment(go.PathSegment.Bezier,nt,et,0,ie*et,(1-ie)*nt,et)))}),go.Shape.defineFigureGenerator("Curve3",function(Nt,nt,et){return new go.Geometry().add(new go.PathFigure(nt,0,!1).add(new go.PathSegment(go.PathSegment.Bezier,0,et,nt,ie*et,ie*nt,et)))}),go.Shape.defineFigureGenerator("Curve4",function(Nt,nt,et){return new go.Geometry().add(new go.PathFigure(nt,0,!1).add(new go.PathSegment(go.PathSegment.Bezier,0,et,(1-ie)*nt,0,0,(1-ie)*et)))}),go.Shape.defineFigureGenerator("TriangleDownLeft",function(Nt,nt,et){return new go.Geometry().add(new go.PathFigure(0,0,!0).add(new go.PathSegment(go.PathSegment.Line,nt,et)).add(new go.PathSegment(go.PathSegment.Line,0,et).close())).setSpots(0,.5,.5,1)}),go.Shape.defineFigureGenerator("TriangleDownRight",function(Nt,nt,et){return new go.Geometry().add(new go.PathFigure(nt,0,!0).add(new go.PathSegment(go.PathSegment.Line,nt,et)).add(new go.PathSegment(go.PathSegment.Line,0,et).close())).setSpots(.5,.5,1,1)}),go.Shape.defineFigureGenerator("TriangleUpLeft",function(Nt,nt,et){return new go.Geometry().add(new go.PathFigure(0,0,!0).add(new go.PathSegment(go.PathSegment.Line,nt,0)).add(new go.PathSegment(go.PathSegment.Line,0,et).close())).setSpots(0,0,.5,.5)}),go.Shape.defineFigureGenerator("TriangleUpRight",function(Nt,nt,et){return new go.Geometry().add(new go.PathFigure(0,0,!0).add(new go.PathSegment(go.PathSegment.Line,nt,0)).add(new go.PathSegment(go.PathSegment.Line,nt,et).close())).setSpots(.5,0,1,.5)}),go.Shape.defineFigureGenerator("RightTriangle","TriangleDownLeft"),go.Shape.setFigureParameter("Parallelogram1",0,new Tn("Indent",.1,-.99,.99)),go.Shape.defineFigureGenerator("Parallelogram1",function(Nt,nt,et){var ct=Nt?Nt.parameter1:NaN;isNaN(ct)?ct=.1:ct<-1?ct=-1:ct>1&&(ct=1);var lt=Math.abs(ct)*nt;if(ct===0){var pt=new go.Geometry(go.Geometry.Rectangle);return pt.startX=0,pt.startY=0,pt.endX=nt,pt.endY=et,pt}else{var pt=new go.Geometry;return ct>0?pt.add(new go.PathFigure(lt,0).add(new go.PathSegment(go.PathSegment.Line,nt,0)).add(new go.PathSegment(go.PathSegment.Line,nt-lt,et)).add(new go.PathSegment(go.PathSegment.Line,0,et).close())):pt.add(new go.PathFigure(0,0).add(new go.PathSegment(go.PathSegment.Line,nt-lt,0)).add(new go.PathSegment(go.PathSegment.Line,nt,et)).add(new go.PathSegment(go.PathSegment.Line,lt,et).close())),lt<nt/2&&pt.setSpots(lt/nt,0,(nt-lt)/nt,1),pt}}),go.Shape.defineFigureGenerator("Parallelogram","Parallelogram1"),go.Shape.setFigureParameter("Parallelogram2",0,new Tn("Indent",10,-1/0,1/0)),go.Shape.defineFigureGenerator("Parallelogram2",function(Nt,nt,et){var ct=Nt?Nt.parameter1:NaN;isNaN(ct)?ct=10:ct<-nt?ct=-nt:ct>nt&&(ct=nt);var lt=Math.abs(ct);if(ct===0){var pt=new go.Geometry(go.Geometry.Rectangle);return pt.startX=0,pt.startY=0,pt.endX=nt,pt.endY=et,pt}else{var pt=new go.Geometry;return ct>0?pt.add(new go.PathFigure(lt,0).add(new go.PathSegment(go.PathSegment.Line,nt,0)).add(new go.PathSegment(go.PathSegment.Line,nt-lt,et)).add(new go.PathSegment(go.PathSegment.Line,0,et).close())):pt.add(new go.PathFigure(0,0).add(new go.PathSegment(go.PathSegment.Line,nt-lt,0)).add(new go.PathSegment(go.PathSegment.Line,nt,et)).add(new go.PathSegment(go.PathSegment.Line,lt,et).close())),lt<nt/2&&pt.setSpots(lt/nt,0,(nt-lt)/nt,1),pt}}),go.Shape.setFigureParameter("Trapezoid1",0,new Tn("Indent",.2,-.99,.99)),go.Shape.defineFigureGenerator("Trapezoid1",function(Nt,nt,et){var ct=Nt?Nt.parameter1:NaN;isNaN(ct)?ct=.2:ct<.5?ct=-.5:ct>.5&&(ct=.5);var lt=Math.abs(ct)*nt;if(ct===0){var pt=new go.Geometry(go.Geometry.Rectangle);return pt.startX=0,pt.startY=0,pt.endX=nt,pt.endY=et,pt}else{var pt=new go.Geometry;return ct>0?pt.add(new go.PathFigure(lt,0).add(new go.PathSegment(go.PathSegment.Line,nt-lt,0)).add(new go.PathSegment(go.PathSegment.Line,nt,et)).add(new go.PathSegment(go.PathSegment.Line,0,et).close())):pt.add(new go.PathFigure(0,0).add(new go.PathSegment(go.PathSegment.Line,nt,0)).add(new go.PathSegment(go.PathSegment.Line,nt-lt,et)).add(new go.PathSegment(go.PathSegment.Line,lt,et).close())),lt<nt/2&&pt.setSpots(lt/nt,0,(nt-lt)/nt,1),pt}}),go.Shape.defineFigureGenerator("Trapezoid","Trapezoid1"),go.Shape.setFigureParameter("Trapezoid2",0,new Tn("Indent",20,-1/0,1/0)),go.Shape.defineFigureGenerator("Trapezoid2",function(Nt,nt,et){var ct=Nt?Nt.parameter1:NaN;isNaN(ct)?ct=20:ct<-nt?ct=-nt/2:ct>nt&&(ct=nt/2);var lt=Math.abs(ct);if(ct===0){var pt=new go.Geometry(go.Geometry.Rectangle);return pt.startX=0,pt.startY=0,pt.endX=nt,pt.endY=et,pt}else{var pt=new go.Geometry;return ct>0?pt.add(new go.PathFigure(lt,0).add(new go.PathSegment(go.PathSegment.Line,nt-lt,0)).add(new go.PathSegment(go.PathSegment.Line,nt,et)).add(new go.PathSegment(go.PathSegment.Line,0,et).close())):pt.add(new go.PathFigure(0,0).add(new go.PathSegment(go.PathSegment.Line,nt,0)).add(new go.PathSegment(go.PathSegment.Line,nt-lt,et)).add(new go.PathSegment(go.PathSegment.Line,lt,et).close())),lt<nt/2&&pt.setSpots(lt/nt,0,(nt-lt)/nt,1),pt}}),go.Shape.setFigureParameter("ManualOperation",0,new Tn("Indent",10,-1/0,1/0)),go.Shape.defineFigureGenerator("ManualOperation",function(Nt,nt,et){var ct=Nt?Nt.parameter1:NaN;isNaN(ct)?ct=10:ct<-nt?ct=-nt/2:ct>nt&&(ct=nt/2);var lt=Math.abs(ct);if(ct===0){var pt=new go.Geometry(go.Geometry.Rectangle);return pt.startX=0,pt.startY=0,pt.endX=nt,pt.endY=et,pt}else{var pt=new go.Geometry;return ct>0?pt.add(new go.PathFigure(0,0).add(new go.PathSegment(go.PathSegment.Line,nt,0)).add(new go.PathSegment(go.PathSegment.Line,nt-lt,et)).add(new go.PathSegment(go.PathSegment.Line,lt,et).close())):pt.add(new go.PathFigure(lt,0).add(new go.PathSegment(go.PathSegment.Line,nt-lt,0)).add(new go.PathSegment(go.PathSegment.Line,nt,et)).add(new go.PathSegment(go.PathSegment.Line,0,et).close())),lt<nt/2&&pt.setSpots(lt/nt,0,(nt-lt)/nt,1),pt}});var je=[];function ce(){var Nt=je.pop();return Nt===void 0?[]:Nt}function Vt(Nt){Nt.length=0,je.push(Nt)}function Qe(Nt){for(var nt=ce(),et=.5,ct=.5,lt=Math.PI*1.5,pt=0,vt=0;vt<Nt;vt++)pt=2*Math.PI/Nt*vt+lt,nt[vt]=new go.Point(ct+et*Math.cos(pt),ct+et*Math.sin(pt));return nt.push(nt[0]),nt}function Qt(Nt){var nt=Je(Nt),et=ce();et[0]=nt[0];for(var ct=1,lt=1;ct<nt.length;ct+=2,lt+=3)et[lt]=nt[ct],et[lt+1]=nt[ct],et[lt+2]=nt[ct+1];return Vt(nt),et}function Je(Nt){for(var nt=Qe(Nt),et=ce(),ct=Math.floor(nt.length/2),lt=nt.length-1,pt=Nt%2===0?2:1,vt=0;vt<lt;vt++){var xt=nt[vt],Lt=nt[vt+1],Ot=nt[(ct+vt-1)%lt],Ht=nt[(ct+vt+pt)%lt];et[vt*2]=xt,et[vt*2+1]=ye(xt.x,xt.y,Ot.x,Ot.y,Lt.x,Lt.y,Ht.x,Ht.y,new go.Point)}return et[et.length]=et[0],Vt(nt),et}go.Shape.defineFigureGenerator("Pentagon",function(Nt,nt,et){var ct=Qe(5),lt=new go.Geometry,pt=new go.PathFigure(ct[0].x*nt,ct[0].y*et,!0);lt.add(pt);for(var vt=1;vt<5;vt++)pt.add(new go.PathSegment(go.PathSegment.Line,ct[vt].x*nt,ct[vt].y*et));return pt.add(new go.PathSegment(go.PathSegment.Line,ct[0].x*nt,ct[0].y*et).close()),Vt(ct),lt.spot1=new go.Spot(.2,.22),lt.spot2=new go.Spot(.8,.9),lt}),go.Shape.defineFigureGenerator("Hexagon",function(Nt,nt,et){var ct=Qe(6),lt=new go.Geometry,pt=new go.PathFigure(ct[0].x*nt,ct[0].y*et,!0);lt.add(pt);for(var vt=1;vt<6;vt++)pt.add(new go.PathSegment(go.PathSegment.Line,ct[vt].x*nt,ct[vt].y*et));return pt.add(new go.PathSegment(go.PathSegment.Line,ct[0].x*nt,ct[0].y*et).close()),Vt(ct),lt.spot1=new go.Spot(.07,.25),lt.spot2=new go.Spot(.93,.75),lt}),go.Shape.defineFigureGenerator("Heptagon",function(Nt,nt,et){var ct=Qe(7),lt=new go.Geometry,pt=new go.PathFigure(ct[0].x*nt,ct[0].y*et,!0);lt.add(pt);for(var vt=1;vt<7;vt++)pt.add(new go.PathSegment(go.PathSegment.Line,ct[vt].x*nt,ct[vt].y*et));return pt.add(new go.PathSegment(go.PathSegment.Line,ct[0].x*nt,ct[0].y*et).close()),Vt(ct),lt.spot1=new go.Spot(.2,.15),lt.spot2=new go.Spot(.8,.85),lt}),go.Shape.defineFigureGenerator("Octagon",function(Nt,nt,et){var ct=Qe(8),lt=new go.Geometry,pt=new go.PathFigure(ct[0].x*nt,ct[0].y*et,!0);lt.add(pt);for(var vt=1;vt<8;vt++)pt.add(new go.PathSegment(go.PathSegment.Line,ct[vt].x*nt,ct[vt].y*et));return pt.add(new go.PathSegment(go.PathSegment.Line,ct[0].x*nt,ct[0].y*et).close()),Vt(ct),lt.spot1=new go.Spot(.15,.15),lt.spot2=new go.Spot(.85,.85),lt}),go.Shape.defineFigureGenerator("Nonagon",function(Nt,nt,et){var ct=Qe(9),lt=new go.Geometry,pt=new go.PathFigure(ct[0].x*nt,ct[0].y*et,!0);lt.add(pt);for(var vt=1;vt<9;vt++)pt.add(new go.PathSegment(go.PathSegment.Line,ct[vt].x*nt,ct[vt].y*et));return pt.add(new go.PathSegment(go.PathSegment.Line,ct[0].x*nt,ct[0].y*et).close()),Vt(ct),lt.spot1=new go.Spot(.17,.13),lt.spot2=new go.Spot(.82,.82),lt}),go.Shape.defineFigureGenerator("Decagon",function(Nt,nt,et){var ct=Qe(10),lt=new go.Geometry,pt=new go.PathFigure(ct[0].x*nt,ct[0].y*et,!0);lt.add(pt);for(var vt=1;vt<10;vt++)pt.add(new go.PathSegment(go.PathSegment.Line,ct[vt].x*nt,ct[vt].y*et));return pt.add(new go.PathSegment(go.PathSegment.Line,ct[0].x*nt,ct[0].y*et).close()),Vt(ct),lt.spot1=new go.Spot(.16,.16),lt.spot2=new go.Spot(.84,.84),lt}),go.Shape.defineFigureGenerator("Dodecagon",function(Nt,nt,et){var ct=Qe(12),lt=new go.Geometry,pt=new go.PathFigure(ct[0].x*nt,ct[0].y*et,!0);lt.add(pt);for(var vt=1;vt<12;vt++)pt.add(new go.PathSegment(go.PathSegment.Line,ct[vt].x*nt,ct[vt].y*et));return pt.add(new go.PathSegment(go.PathSegment.Line,ct[0].x*nt,ct[0].y*et).close()),Vt(ct),lt.spot1=new go.Spot(.16,.16),lt.spot2=new go.Spot(.84,.84),lt}),go.Shape.defineFigureGenerator("FivePointedStar",function(Nt,nt,et){var ct=Je(5),lt=new go.Geometry,pt=new go.PathFigure(ct[0].x*nt,ct[0].y*et,!0);lt.add(pt);for(var vt=1;vt<10;vt++)pt.add(new go.PathSegment(go.PathSegment.Line,ct[vt].x*nt,ct[vt].y*et));return pt.add(new go.PathSegment(go.PathSegment.Line,ct[0].x*nt,ct[0].y*et).close()),Vt(ct),lt.spot1=new go.Spot(.266,.333),lt.spot2=new go.Spot(.733,.733),lt}),go.Shape.defineFigureGenerator("SixPointedStar",function(Nt,nt,et){var ct=Je(6),lt=new go.Geometry,pt=new go.PathFigure(ct[0].x*nt,ct[0].y*et,!0);lt.add(pt);for(var vt=1;vt<12;vt++)pt.add(new go.PathSegment(go.PathSegment.Line,ct[vt].x*nt,ct[vt].y*et));return pt.add(new go.PathSegment(go.PathSegment.Line,ct[0].x*nt,ct[0].y*et).close()),Vt(ct),lt.spot1=new go.Spot(.17,.25),lt.spot2=new go.Spot(.83,.75),lt}),go.Shape.defineFigureGenerator("SevenPointedStar",function(Nt,nt,et){var ct=Je(7),lt=new go.Geometry,pt=new go.PathFigure(ct[0].x*nt,ct[0].y*et,!0);lt.add(pt);for(var vt=1;vt<14;vt++)pt.add(new go.PathSegment(go.PathSegment.Line,ct[vt].x*nt,ct[vt].y*et));return pt.add(new go.PathSegment(go.PathSegment.Line,ct[0].x*nt,ct[0].y*et).close()),Vt(ct),lt.spot1=new go.Spot(.222,.277),lt.spot2=new go.Spot(.777,.666),lt}),go.Shape.defineFigureGenerator("EightPointedStar",function(Nt,nt,et){var ct=Je(8),lt=new go.Geometry,pt=new go.PathFigure(ct[0].x*nt,ct[0].y*et,!0);lt.add(pt);for(var vt=1;vt<16;vt++)pt.add(new go.PathSegment(go.PathSegment.Line,ct[vt].x*nt,ct[vt].y*et));return pt.add(new go.PathSegment(go.PathSegment.Line,ct[0].x*nt,ct[0].y*et).close()),Vt(ct),lt.spot1=new go.Spot(.25,.25),lt.spot2=new go.Spot(.75,.75),lt}),go.Shape.defineFigureGenerator("NinePointedStar",function(Nt,nt,et){var ct=Je(9),lt=new go.Geometry,pt=new go.PathFigure(ct[0].x*nt,ct[0].y*et,!0);lt.add(pt);for(var vt=1;vt<18;vt++)pt.add(new go.PathSegment(go.PathSegment.Line,ct[vt].x*nt,ct[vt].y*et));return pt.add(new go.PathSegment(go.PathSegment.Line,ct[0].x*nt,ct[0].y*et).close()),Vt(ct),lt.spot1=new go.Spot(.222,.277),lt.spot2=new go.Spot(.777,.666),lt}),go.Shape.defineFigureGenerator("TenPointedStar",function(Nt,nt,et){var ct=Je(10),lt=new go.Geometry,pt=new go.PathFigure(ct[0].x*nt,ct[0].y*et,!0);lt.add(pt);for(var vt=1;vt<20;vt++)pt.add(new go.PathSegment(go.PathSegment.Line,ct[vt].x*nt,ct[vt].y*et));return pt.add(new go.PathSegment(go.PathSegment.Line,ct[0].x*nt,ct[0].y*et).close()),Vt(ct),lt.spot1=new go.Spot(.281,.261),lt.spot2=new go.Spot(.723,.748),lt}),go.Shape.defineFigureGenerator("FivePointedBurst",function(Nt,nt,et){var ct=Qt(5),lt=new go.Geometry,pt=new go.PathFigure(ct[0].x*nt,ct[0].y*et,!0);lt.add(pt);for(var vt=1;vt<ct.length;vt+=3)pt.add(new go.PathSegment(go.PathSegment.Bezier,ct[vt+2].x*nt,ct[vt+2].y*et,ct[vt].x*nt,ct[vt].y*et,ct[vt+1].x*nt,ct[vt+1].y*et));return pt.segments.last().close(),Vt(ct),lt.spot1=new go.Spot(.222,.277),lt.spot2=new go.Spot(.777,.777),lt}),go.Shape.defineFigureGenerator("SixPointedBurst",function(Nt,nt,et){var ct=Qt(6),lt=new go.Geometry,pt=new go.PathFigure(ct[0].x*nt,ct[0].y*et,!0);lt.add(pt);for(var vt=1;vt<ct.length;vt+=3)pt.add(new go.PathSegment(go.PathSegment.Bezier,ct[vt+2].x*nt,ct[vt+2].y*et,ct[vt].x*nt,ct[vt].y*et,ct[vt+1].x*nt,ct[vt+1].y*et));return pt.segments.last().close(),Vt(ct),lt.spot1=new go.Spot(.17,.222),lt.spot2=new go.Spot(.833,.777),lt}),go.Shape.defineFigureGenerator("SevenPointedBurst",function(Nt,nt,et){var ct=Qt(7),lt=new go.Geometry,pt=new go.PathFigure(ct[0].x*nt,ct[0].y*et,!0);lt.add(pt);for(var vt=1;vt<ct.length;vt+=3)pt.add(new go.PathSegment(go.PathSegment.Bezier,ct[vt+2].x*nt,ct[vt+2].y*et,ct[vt].x*nt,ct[vt].y*et,ct[vt+1].x*nt,ct[vt+1].y*et));return pt.segments.last().close(),Vt(ct),lt.spot1=new go.Spot(.222,.222),lt.spot2=new go.Spot(.777,.777),lt}),go.Shape.defineFigureGenerator("EightPointedBurst",function(Nt,nt,et){var ct=Qt(8),lt=new go.Geometry,pt=new go.PathFigure(ct[0].x*nt,ct[0].y*et,!0);lt.add(pt);for(var vt=1;vt<ct.length;vt+=3)pt.add(new go.PathSegment(go.PathSegment.Bezier,ct[vt+2].x*nt,ct[vt+2].y*et,ct[vt].x*nt,ct[vt].y*et,ct[vt+1].x*nt,ct[vt+1].y*et));return pt.segments.last().close(),Vt(ct),lt.spot1=new go.Spot(.222,.222),lt.spot2=new go.Spot(.777,.777),lt}),go.Shape.defineFigureGenerator("NinePointedBurst",function(Nt,nt,et){var ct=Qt(9),lt=new go.Geometry,pt=new go.PathFigure(ct[0].x*nt,ct[0].y*et,!0);lt.add(pt);for(var vt=1;vt<ct.length;vt+=3)pt.add(new go.PathSegment(go.PathSegment.Bezier,ct[vt+2].x*nt,ct[vt+2].y*et,ct[vt].x*nt,ct[vt].y*et,ct[vt+1].x*nt,ct[vt+1].y*et));return pt.segments.last().close(),Vt(ct),lt.spot1=new go.Spot(.222,.222),lt.spot2=new go.Spot(.777,.777),lt}),go.Shape.defineFigureGenerator("TenPointedBurst",function(Nt,nt,et){var ct=Qt(10),lt=new go.Geometry,pt=new go.PathFigure(ct[0].x*nt,ct[0].y*et,!0);lt.add(pt);for(var vt=1;vt<ct.length;vt+=3)pt.add(new go.PathSegment(go.PathSegment.Bezier,ct[vt+2].x*nt,ct[vt+2].y*et,ct[vt].x*nt,ct[vt].y*et,ct[vt+1].x*nt,ct[vt+1].y*et));return pt.segments.last().close(),Vt(ct),lt.spot1=new go.Spot(.222,.222),lt.spot2=new go.Spot(.777,.777),lt}),go.Shape.setFigureParameter("FramedRectangle",0,new Tn("ThicknessX",8)),go.Shape.setFigureParameter("FramedRectangle",1,new Tn("ThicknessY",8)),go.Shape.defineFigureGenerator("FramedRectangle",function(Nt,nt,et){var ct=Nt?Nt.parameter1:NaN,lt=Nt?Nt.parameter2:NaN;isNaN(ct)&&(ct=8),isNaN(lt)&&(lt=8);var pt=new go.Geometry,vt=new go.PathFigure(0,0,!0);return pt.add(vt),vt.add(new go.PathSegment(go.PathSegment.Line,nt,0)),vt.add(new go.PathSegment(go.PathSegment.Line,nt,et)),vt.add(new go.PathSegment(go.PathSegment.Line,0,et).close()),ct<nt/2&<<et/2&&(vt.add(new go.PathSegment(go.PathSegment.Move,ct,lt)),vt.add(new go.PathSegment(go.PathSegment.Line,ct,et-lt)),vt.add(new go.PathSegment(go.PathSegment.Line,nt-ct,et-lt)),vt.add(new go.PathSegment(go.PathSegment.Line,nt-ct,lt).close())),pt.setSpots(0,0,1,1,ct,lt,-ct,-lt),pt}),go.Shape.setFigureParameter("Ring",0,new Tn("Thickness",8)),go.Shape.defineFigureGenerator("Ring",function(Nt,nt,et){var ct=Nt?Nt.parameter1:NaN;(isNaN(ct)||ct<0)&&(ct=8);var lt=nt/2,pt=new go.Geometry,vt=new go.PathFigure(nt,nt/2,!0);pt.add(vt),vt.add(new go.PathSegment(go.PathSegment.Arc,0,360,lt,lt,lt,lt).close());var xt=Math.max(lt-ct,0);return xt>0&&(vt.add(new go.PathSegment(go.PathSegment.Move,nt/2+xt,nt/2)),vt.add(new go.PathSegment(go.PathSegment.Arc,0,-360,lt,lt,xt,xt).close())),pt.spot1=Se,pt.spot2=Rt,pt.defaultStretch=go.GraphObject.Uniform,pt}),go.Shape.defineFigureGenerator("Cloud",function(Nt,nt,et){return new go.Geometry().add(new go.PathFigure(.08034461*nt,.1944299*et,!0).add(new go.PathSegment(go.PathSegment.Bezier,.2008615*nt,.05349299*et,-.09239631*nt,.07836421*et,.1406031*nt,-.0542823*et)).add(new go.PathSegment(go.PathSegment.Bezier,.4338609*nt,.074219*et,.2450511*nt,-.00697547*et,.3776197*nt,-.01112067*et)).add(new go.PathSegment(go.PathSegment.Bezier,.6558228*nt,.07004196*et,.4539471*nt,0,.6066018*nt,-.02526587*et)).add(new go.PathSegment(go.PathSegment.Bezier,.8921095*nt,.08370865*et,.6914277*nt,-.01904177*et,.8921095*nt,-.01220843*et)).add(new go.PathSegment(go.PathSegment.Bezier,.9147671*nt,.3194596*et,1.036446*nt,.04105738*et,1.020377*nt,.3022052*et)).add(new go.PathSegment(go.PathSegment.Bezier,.9082935*nt,.562044*et,1.04448*nt,.360238*et,.992256*nt,.5219009*et)).add(new go.PathSegment(go.PathSegment.Bezier,.9212406*nt,.8217117*et,1.032337*nt,.5771781*et,1.018411*nt,.8120651*et)).add(new go.PathSegment(go.PathSegment.Bezier,.7592566*nt,.9156953*et,1.028411*nt,.9571472*et,.8556702*nt,1.052487*et)).add(new go.PathSegment(go.PathSegment.Bezier,.5101666*nt,.9310455*et,.7431877*nt,1.009325*et,.5624123*nt,1.021761*et)).add(new go.PathSegment(go.PathSegment.Bezier,.2609328*nt,.9344623*et,.4820677*nt,1.031761*et,.3030112*nt,1.002796*et)).add(new go.PathSegment(go.PathSegment.Bezier,.08034461*nt,.870098*et,.2329994*nt,1.01518*et,.03213784*nt,1.01518*et)).add(new go.PathSegment(go.PathSegment.Bezier,.06829292*nt,.6545475*et,-.02812061*nt,.9032597*et,-.01205169*nt,.6835638*et)).add(new go.PathSegment(go.PathSegment.Bezier,.06427569*nt,.4265613*et,-.01812061*nt,.6089503*et,-.00606892*nt,.4555777*et)).add(new go.PathSegment(go.PathSegment.Bezier,.08034461*nt,.1944299*et,-.01606892*nt,.3892545*et,-.01205169*nt,.1944299*et))).setSpots(.1,.1,.9,.9)}),go.Shape.defineFigureGenerator("StopSign",function(Nt,nt,et){var ct=1/(Math.SQRT2+2);return new go.Geometry().add(new go.PathFigure(ct*nt,0,!0).add(new go.PathSegment(go.PathSegment.Line,(1-ct)*nt,0)).add(new go.PathSegment(go.PathSegment.Line,nt,ct*et)).add(new go.PathSegment(go.PathSegment.Line,nt,(1-ct)*et)).add(new go.PathSegment(go.PathSegment.Line,(1-ct)*nt,et)).add(new go.PathSegment(go.PathSegment.Line,ct*nt,et)).add(new go.PathSegment(go.PathSegment.Line,0,(1-ct)*et)).add(new go.PathSegment(go.PathSegment.Line,0,ct*et).close())).setSpots(ct/2,ct/2,1-ct/2,1-ct/2)}),go.Shape.setFigureParameter("Pie",0,new Tn("Start",0,-360,360)),go.Shape.setFigureParameter("Pie",1,new Tn("Sweep",315,-360,360)),go.Shape.defineFigureGenerator("Pie",function(Nt,nt,et){var ct=Nt?Nt.parameter1:NaN,lt=Nt?Nt.parameter2:NaN;isNaN(ct)&&(ct=0),isNaN(lt)&&(lt=315);var pt=ct%360;pt<0&&(pt+=360);var vt=lt%360,xt=Math.min(nt,et)/2;return new go.Geometry().add(new go.PathFigure(xt,xt).add(new go.PathSegment(go.PathSegment.Arc,pt,vt,xt,xt,xt,xt).close()))}),go.Shape.defineFigureGenerator("PiePiece",function(Nt,nt,et){var ct=ie/Math.SQRT2*.5,lt=Math.SQRT2/2,pt=1-Math.SQRT2/2;return new go.Geometry().add(new go.PathFigure(nt,et,!0).add(new go.PathSegment(go.PathSegment.Bezier,lt*nt,pt*et,nt,(1-ct)*et,(lt+ct)*nt,(pt+ct)*et)).add(new go.PathSegment(go.PathSegment.Line,0,et).close()))}),go.Shape.setFigureParameter("ThickCross",0,new Tn("Thickness",30)),go.Shape.defineFigureGenerator("ThickCross",function(Nt,nt,et){var ct=Nt?Nt.parameter1:NaN;(isNaN(ct)||ct<0)&&(ct=30);var lt=Math.min(ct,nt)/2,pt=nt/2,vt=et/2;return new go.Geometry().add(new go.PathFigure(pt-lt,0,!0).add(new go.PathSegment(go.PathSegment.Line,pt+lt,0)).add(new go.PathSegment(go.PathSegment.Line,pt+lt,vt-lt)).add(new go.PathSegment(go.PathSegment.Line,nt,vt-lt)).add(new go.PathSegment(go.PathSegment.Line,nt,vt+lt)).add(new go.PathSegment(go.PathSegment.Line,pt+lt,vt+lt)).add(new go.PathSegment(go.PathSegment.Line,pt+lt,et)).add(new go.PathSegment(go.PathSegment.Line,pt-lt,et)).add(new go.PathSegment(go.PathSegment.Line,pt-lt,vt+lt)).add(new go.PathSegment(go.PathSegment.Line,0,vt+lt)).add(new go.PathSegment(go.PathSegment.Line,0,vt-lt)).add(new go.PathSegment(go.PathSegment.Line,pt-lt,vt-lt).close()))}),go.Shape.setFigureParameter("ThinCross",0,new Tn("Thickness",10)),go.Shape.defineFigureGenerator("ThinCross",function(Nt,nt,et){var ct=Nt?Nt.parameter1:NaN;(isNaN(ct)||ct<0)&&(ct=10);var lt=Math.min(ct,nt)/2,pt=nt/2,vt=et/2;return new go.Geometry().add(new go.PathFigure(pt-lt,0,!0).add(new go.PathSegment(go.PathSegment.Line,pt+lt,0)).add(new go.PathSegment(go.PathSegment.Line,pt+lt,vt-lt)).add(new go.PathSegment(go.PathSegment.Line,nt,vt-lt)).add(new go.PathSegment(go.PathSegment.Line,nt,vt+lt)).add(new go.PathSegment(go.PathSegment.Line,pt+lt,vt+lt)).add(new go.PathSegment(go.PathSegment.Line,pt+lt,et)).add(new go.PathSegment(go.PathSegment.Line,pt-lt,et)).add(new go.PathSegment(go.PathSegment.Line,pt-lt,vt+lt)).add(new go.PathSegment(go.PathSegment.Line,0,vt+lt)).add(new go.PathSegment(go.PathSegment.Line,0,vt-lt)).add(new go.PathSegment(go.PathSegment.Line,pt-lt,vt-lt).close()))}),go.Shape.setFigureParameter("ThickX",0,new Tn("Thickness",30)),go.Shape.defineFigureGenerator("ThickX",function(Nt,nt,et){var ct=Nt?Nt.parameter1:NaN;if((isNaN(ct)||ct<0)&&(ct=30),nt===0||et===0){var lt=new go.Geometry(go.Geometry.Rectangle);return lt.startX=0,lt.startY=0,lt.endX=nt,lt.endY=et,lt}else{var pt=nt/2,vt=et/2,xt=Math.atan2(et,nt),Lt=ct-Math.min(Math.cos(xt)*ct/2,pt),Ot=ct-Math.min(Math.sin(xt)*ct/2,vt),lt=new go.Geometry,Ht=new go.PathFigure(Lt,0,!0);return lt.add(Ht),Ht.add(new go.PathSegment(go.PathSegment.Line,pt,.2*et)),Ht.add(new go.PathSegment(go.PathSegment.Line,nt-Lt,0)),Ht.add(new go.PathSegment(go.PathSegment.Line,nt,Ot)),Ht.add(new go.PathSegment(go.PathSegment.Line,.8*nt,vt)),Ht.add(new go.PathSegment(go.PathSegment.Line,nt,et-Ot)),Ht.add(new go.PathSegment(go.PathSegment.Line,nt-Lt,et)),Ht.add(new go.PathSegment(go.PathSegment.Line,pt,.8*et)),Ht.add(new go.PathSegment(go.PathSegment.Line,Lt,et)),Ht.add(new go.PathSegment(go.PathSegment.Line,0,et-Ot)),Ht.add(new go.PathSegment(go.PathSegment.Line,.2*nt,vt)),Ht.add(new go.PathSegment(go.PathSegment.Line,0,Ot).close()),lt}}),go.Shape.setFigureParameter("ThinX",0,new Tn("Thickness",10)),go.Shape.defineFigureGenerator("ThinX",function(Nt,nt,et){var ct=Nt?Nt.parameter1:NaN;(isNaN(ct)||ct<0)&&(ct=10);var lt=new go.Geometry,pt=new go.PathFigure(.1*nt,0,!0);return lt.add(pt),pt.add(new go.PathSegment(go.PathSegment.Line,.5*nt,.4*et)),pt.add(new go.PathSegment(go.PathSegment.Line,.9*nt,0)),pt.add(new go.PathSegment(go.PathSegment.Line,nt,.1*et)),pt.add(new go.PathSegment(go.PathSegment.Line,.6*nt,.5*et)),pt.add(new go.PathSegment(go.PathSegment.Line,nt,.9*et)),pt.add(new go.PathSegment(go.PathSegment.Line,.9*nt,et)),pt.add(new go.PathSegment(go.PathSegment.Line,.5*nt,.6*et)),pt.add(new go.PathSegment(go.PathSegment.Line,.1*nt,et)),pt.add(new go.PathSegment(go.PathSegment.Line,0,.9*et)),pt.add(new go.PathSegment(go.PathSegment.Line,.4*nt,.5*et)),pt.add(new go.PathSegment(go.PathSegment.Line,0,.1*et).close()),lt}),go.Shape.setFigureParameter("SquareIBeam",0,new Tn("BeamWidth",.2,.1,.9)),go.Shape.defineFigureGenerator("SquareIBeam",function(Nt,nt,et){var ct=Nt?Nt.parameter1:NaN;isNaN(ct)&&(ct=.2);var lt=new go.Geometry,pt=new go.PathFigure(0,0,!0);return lt.add(pt),pt.add(new go.PathSegment(go.PathSegment.Line,nt,0)),pt.add(new go.PathSegment(go.PathSegment.Line,nt,ct*et)),pt.add(new go.PathSegment(go.PathSegment.Line,(.5+ct/2)*nt,ct*et)),pt.add(new go.PathSegment(go.PathSegment.Line,(.5+ct/2)*nt,(1-ct)*et)),pt.add(new go.PathSegment(go.PathSegment.Line,nt,(1-ct)*et)),pt.add(new go.PathSegment(go.PathSegment.Line,nt,et)),pt.add(new go.PathSegment(go.PathSegment.Line,0,et)),pt.add(new go.PathSegment(go.PathSegment.Line,0,(1-ct)*et)),pt.add(new go.PathSegment(go.PathSegment.Line,(.5-ct/2)*nt,(1-ct)*et)),pt.add(new go.PathSegment(go.PathSegment.Line,(.5-ct/2)*nt,ct*et)),pt.add(new go.PathSegment(go.PathSegment.Line,0,ct*et).close()),lt}),go.Shape.setFigureParameter("RoundedIBeam",0,new Tn("Curviness",.5,.05,.65)),go.Shape.defineFigureGenerator("RoundedIBeam",function(Nt,nt,et){var ct=Nt?Nt.parameter1:NaN;isNaN(ct)&&(ct=.5);var lt=new go.Geometry,pt=new go.PathFigure(0,0,!0);return lt.add(pt),pt.add(new go.PathSegment(go.PathSegment.Line,nt,0)),pt.add(new go.PathSegment(go.PathSegment.Bezier,nt,et,Math.abs(1-ct)*nt,.25*et,Math.abs(1-ct)*nt,.75*et)),pt.add(new go.PathSegment(go.PathSegment.Line,0,et)),pt.add(new go.PathSegment(go.PathSegment.Bezier,0,0,ct*nt,.75*et,ct*nt,.25*et).close()),lt}),go.Shape.defineFigureGenerator("HalfEllipse",function(Nt,nt,et){return new go.Geometry().add(new go.PathFigure(0,0,!0).add(new go.PathSegment(go.PathSegment.Bezier,nt,.5*et,ie*nt,0,nt,(.5-ie/2)*et)).add(new go.PathSegment(go.PathSegment.Bezier,0,et,nt,(.5+ie/2)*et,ie*nt,et).close())).setSpots(0,.156,.844,.844)}),go.Shape.defineFigureGenerator("Crescent",function(Nt,nt,et){return new go.Geometry().add(new go.PathFigure(0,0,!0).add(new go.PathSegment(go.PathSegment.Bezier,0,et,nt,0,nt,et)).add(new go.PathSegment(go.PathSegment.Bezier,0,0,.5*nt,.75*et,.5*nt,.25*et).close())).setSpots(.311,.266,.744,.744)}),go.Shape.defineFigureGenerator("Heart",function(Nt,nt,et){return new go.Geometry().add(new go.PathFigure(.5*nt,et,!0).add(new go.PathSegment(go.PathSegment.Bezier,0,.3*et,.1*nt,.8*et,0,.5*et)).add(new go.PathSegment(go.PathSegment.Bezier,.5*nt,.3*et,0,0,.45*nt,0)).add(new go.PathSegment(go.PathSegment.Bezier,nt,.3*et,.55*nt,0,nt,0)).add(new go.PathSegment(go.PathSegment.Bezier,.5*nt,et,nt,.5*et,.9*nt,.8*et).close())).setSpots(.14,.29,.86,.78)}),go.Shape.defineFigureGenerator("Spade",function(Nt,nt,et){return new go.Geometry().add(new go.PathFigure(.5*nt,0,!0).add(new go.PathSegment(go.PathSegment.Line,.51*nt,.01*et)).add(new go.PathSegment(go.PathSegment.Bezier,nt,.5*et,.6*nt,.2*et,nt,.25*et)).add(new go.PathSegment(go.PathSegment.Bezier,.55*nt,.7*et,nt,.8*et,.6*nt,.8*et)).add(new go.PathSegment(go.PathSegment.Bezier,.75*nt,et,.5*nt,.75*et,.55*nt,.95*et)).add(new go.PathSegment(go.PathSegment.Line,.25*nt,et)).add(new go.PathSegment(go.PathSegment.Bezier,.45*nt,.7*et,.45*nt,.95*et,.5*nt,.75*et)).add(new go.PathSegment(go.PathSegment.Bezier,0,.5*et,.4*nt,.8*et,0,.8*et)).add(new go.PathSegment(go.PathSegment.Bezier,.49*nt,.01*et,0,.25*et,.4*nt,.2*et).close())).setSpots(.14,.26,.86,.78)}),go.Shape.defineFigureGenerator("Club",function(Nt,nt,et){var ct=new go.Geometry,lt=new go.PathFigure(.4*nt,.6*et,!0);ct.add(lt),lt.add(new go.PathSegment(go.PathSegment.Bezier,.15*nt,et,.5*nt,.75*et,.45*nt,.95*et)),lt.add(new go.PathSegment(go.PathSegment.Line,.85*nt,et)),lt.add(new go.PathSegment(go.PathSegment.Bezier,.6*nt,.6*et,.55*nt,.95*et,.5*nt,.75*et));var pt=.2,vt=.3,xt=0,Lt=pt*ie;return lt.add(new go.PathSegment(go.PathSegment.Bezier,(.5+vt)*nt,(.5+pt+xt)*et,(.5-pt+vt)*nt,(.5+Lt+xt)*et,(.5-Lt+vt)*nt,(.5+pt+xt)*et)),lt.add(new go.PathSegment(go.PathSegment.Bezier,(1-.5+pt+vt)*nt,(.5+xt)*et,(.5+Lt+vt)*nt,(.5+pt+xt)*et,(.5+pt+vt)*nt,(.5+Lt+xt)*et)),lt.add(new go.PathSegment(go.PathSegment.Bezier,(.5+vt)*nt,(.5-pt+xt)*et,(1-.5+pt+vt)*nt,(.5-Lt+xt)*et,(.5+Lt+vt)*nt,(.5-pt+xt)*et)),lt.add(new go.PathSegment(go.PathSegment.Bezier,.65*nt,.36771243*et,(.5-Lt+vt)*nt,(.5-pt+xt)*et,(.5-pt+vt+.05)*nt,(.5-Lt+xt-.02)*et)),pt=.2,vt=0,xt=-.3,Lt=pt*ie,lt.add(new go.PathSegment(go.PathSegment.Bezier,(1-.5+pt+vt)*nt,(.5+xt)*et,(.5+Lt+vt)*nt,(.5+pt+xt)*et,(.5+pt+vt)*nt,(.5+Lt+xt)*et)),lt.add(new go.PathSegment(go.PathSegment.Bezier,(.5+vt)*nt,(.5-pt+xt)*et,(1-.5+pt+vt)*nt,(.5-Lt+xt)*et,(.5+Lt+vt)*nt,(.5-pt+xt)*et)),lt.add(new go.PathSegment(go.PathSegment.Bezier,(.5-pt+vt)*nt,(.5+xt)*et,(.5-Lt+vt)*nt,(.5-pt+xt)*et,(.5-pt+vt)*nt,(.5-Lt+xt)*et)),lt.add(new go.PathSegment(go.PathSegment.Bezier,(.5-Lt+vt)*nt,(.5+pt+xt)*et,(.5-pt+vt)*nt,(.5+Lt+xt)*et,(.5-Lt+vt)*nt,(.5+pt+xt)*et)),pt=.2,vt=-.3,xt=0,Lt=pt*ie,lt.add(new go.PathSegment(go.PathSegment.Bezier,(.5+vt)*nt,(.5-pt+xt)*et,(1-.5+pt+vt-.05)*nt,(.5-Lt+xt-.02)*et,(.5+Lt+vt)*nt,(.5-pt+xt)*et)),lt.add(new go.PathSegment(go.PathSegment.Bezier,(.5-pt+vt)*nt,(.5+xt)*et,(.5-Lt+vt)*nt,(.5-pt+xt)*et,(.5-pt+vt)*nt,(.5-Lt+xt)*et)),lt.add(new go.PathSegment(go.PathSegment.Bezier,(.5+vt)*nt,(.5+pt+xt)*et,(.5-pt+vt)*nt,(.5+Lt+xt)*et,(.5-Lt+vt)*nt,(.5+pt+xt)*et)),lt.add(new go.PathSegment(go.PathSegment.Bezier,.4*nt,.6*et,(.5+Lt+vt)*nt,(.5+pt+xt)*et,(.5+pt+vt)*nt,(.5+Lt+xt)*et).close()),ct.setSpots(.06,.33,.93,.68),ct}),go.Shape.defineFigureGenerator("YinYang",function(Nt,nt,et){var ct=new go.Geometry,lt=new go.PathFigure(nt*.5,0,!0);ct.add(lt),lt.add(new go.PathSegment(go.PathSegment.Arc,270,180,nt*.5,nt*.5,nt*.5,nt*.5)),lt.add(new go.PathSegment(go.PathSegment.Arc,90,-180,nt*.5,nt*.75,nt*.25,nt*.25)),lt.add(new go.PathSegment(go.PathSegment.Arc,90,180,nt*.5,nt*.25,nt*.25,nt*.25));var pt=.1,vt=.5,xt=.25;return lt.add(new go.PathSegment(go.PathSegment.Move,(vt+pt)*nt,xt*et)),lt.add(new go.PathSegment(go.PathSegment.Arc,0,-360,nt*vt,et*xt,pt*nt,pt*nt).close()),lt=new go.PathFigure(nt*.5,0,!1),ct.add(lt),lt.add(new go.PathSegment(go.PathSegment.Arc,270,-180,nt*.5,nt*.5,nt*.5,nt*.5)),xt=.75,lt=new go.PathFigure((vt+pt)*nt,xt*et,!0),ct.add(lt),lt.add(new go.PathSegment(go.PathSegment.Arc,0,360,nt*vt,et*xt,pt*nt,pt*nt).close()),ct.defaultStretch=go.GraphObject.Uniform,ct}),go.Shape.defineFigureGenerator("Peace",function(Nt,nt,et){var ct=.8535533905932737,lt=.5*nt,pt=.5*et;return new go.Geometry().add(new go.PathFigure(lt,0,!1).add(new go.PathSegment(go.PathSegment.Arc,270,360,lt,pt,lt,pt)).add(new go.PathSegment(go.PathSegment.Line,lt,et)).add(new go.PathSegment(go.PathSegment.Move,lt,pt)).add(new go.PathSegment(go.PathSegment.Line,(1-ct)*nt,ct*et)).add(new go.PathSegment(go.PathSegment.Move,lt,pt)).add(new go.PathSegment(go.PathSegment.Line,ct*nt,ct*et)))}),go.Shape.defineFigureGenerator("NotAllowed",function(Nt,nt,et){var ct=new go.Geometry,lt=ie*.5,pt=.5,vt=.5,xt=.5,Lt=new go.PathFigure(vt*nt,(xt-pt)*et);ct.add(Lt),Lt.add(new go.PathSegment(go.PathSegment.Bezier,(vt-pt)*nt,xt*et,(vt-lt)*nt,(xt-pt)*et,(vt-pt)*nt,(xt-lt)*et)),Lt.add(new go.PathSegment(go.PathSegment.Bezier,vt*nt,(xt+pt)*et,(vt-pt)*nt,(xt+lt)*et,(vt-lt)*nt,(xt+pt)*et)),Lt.add(new go.PathSegment(go.PathSegment.Bezier,(vt+pt)*nt,xt*et,(vt+lt)*nt,(xt+pt)*et,(vt+pt)*nt,(xt+lt)*et)),Lt.add(new go.PathSegment(go.PathSegment.Bezier,vt*nt,(xt-pt)*et,(vt+pt)*nt,(xt-lt)*et,(vt+lt)*nt,(xt-pt)*et)),pt=.4,lt=ie*.4;var Ot=Ft(),Ht=Ft(),te=Ft(),_t=Ft();Be(vt,xt-pt,vt+lt,xt-pt,vt+pt,xt-lt,vt+pt,xt,.42,Ot,Ht,te,_t,_t);var Xt=Ft(),ve=Ft(),oe=Ft();Be(vt,xt-pt,vt+lt,xt-pt,vt+pt,xt-lt,vt+pt,xt,.58,_t,_t,oe,Xt,ve);var Re=Ft(),Ye=Ft(),en=Ft();Be(vt,xt+pt,vt-lt,xt+pt,vt-pt,xt+lt,vt-pt,xt,.42,Re,Ye,en,_t,_t);var Rn=Ft(),wn=Ft(),un=Ft();return Be(vt,xt+pt,vt-lt,xt+pt,vt-pt,xt+lt,vt-pt,xt,.58,_t,_t,un,Rn,wn),Lt.add(new go.PathSegment(go.PathSegment.Move,un.x*nt,un.y*et)),Lt.add(new go.PathSegment(go.PathSegment.Bezier,(vt-pt)*nt,xt*et,Rn.x*nt,Rn.y*et,wn.x*nt,wn.y*et)),Lt.add(new go.PathSegment(go.PathSegment.Bezier,vt*nt,(xt-pt)*et,(vt-pt)*nt,(xt-lt)*et,(vt-lt)*nt,(xt-pt)*et)),Lt.add(new go.PathSegment(go.PathSegment.Bezier,te.x*nt,te.y*et,Ot.x*nt,Ot.y*et,Ht.x*nt,Ht.y*et)),Lt.add(new go.PathSegment(go.PathSegment.Line,un.x*nt,un.y*et).close()),Lt.add(new go.PathSegment(go.PathSegment.Move,en.x*nt,en.y*et)),Lt.add(new go.PathSegment(go.PathSegment.Line,oe.x*nt,oe.y*et)),Lt.add(new go.PathSegment(go.PathSegment.Bezier,(vt+pt)*nt,xt*et,Xt.x*nt,Xt.y*et,ve.x*nt,ve.y*et)),Lt.add(new go.PathSegment(go.PathSegment.Bezier,vt*nt,(xt+pt)*et,(vt+pt)*nt,(xt+lt)*et,(vt+lt)*nt,(xt+pt)*et)),Lt.add(new go.PathSegment(go.PathSegment.Bezier,en.x*nt,en.y*et,Re.x*nt,Re.y*et,Ye.x*nt,Ye.y*et).close()),se(Ot),se(Ht),se(te),se(_t),se(Xt),se(ve),se(oe),se(Re),se(Ye),se(en),se(Rn),se(wn),se(un),ct.defaultStretch=go.GraphObject.Uniform,ct}),go.Shape.defineFigureGenerator("Fragile",function(Nt,nt,et){return new go.Geometry().add(new go.PathFigure(0,0,!0).add(new go.PathSegment(go.PathSegment.Line,.25*nt,0)).add(new go.PathSegment(go.PathSegment.Line,.2*nt,.15*et)).add(new go.PathSegment(go.PathSegment.Line,.3*nt,.25*et)).add(new go.PathSegment(go.PathSegment.Line,.29*nt,.33*et)).add(new go.PathSegment(go.PathSegment.Line,.35*nt,.25*et)).add(new go.PathSegment(go.PathSegment.Line,.3*nt,.15*et)).add(new go.PathSegment(go.PathSegment.Line,.4*nt,0)).add(new go.PathSegment(go.PathSegment.Line,nt,0)).add(new go.PathSegment(go.PathSegment.Bezier,.55*nt,.5*et,nt,.25*et,.75*nt,.5*et)).add(new go.PathSegment(go.PathSegment.Line,.55*nt,.9*et)).add(new go.PathSegment(go.PathSegment.Line,.7*nt,.9*et)).add(new go.PathSegment(go.PathSegment.Line,.7*nt,et)).add(new go.PathSegment(go.PathSegment.Line,.3*nt,et)).add(new go.PathSegment(go.PathSegment.Line,.3*nt,.9*et)).add(new go.PathSegment(go.PathSegment.Line,.45*nt,.9*et)).add(new go.PathSegment(go.PathSegment.Line,.45*nt,.5*et)).add(new go.PathSegment(go.PathSegment.Bezier,0,0,.25*nt,.5*et,0,.25*et).close()))}),go.Shape.setFigureParameter("HourGlass",0,new Tn("Thickness",30)),go.Shape.defineFigureGenerator("HourGlass",function(Nt,nt,et){var ct=Nt?Nt.parameter1:NaN;(isNaN(ct)||ct<0)&&(ct=30),ct>nt&&(ct=nt);var lt=(nt-ct)/2,pt=lt+ct;return new go.Geometry().add(new go.PathFigure(pt,.5*et).add(new go.PathSegment(go.PathSegment.Line,nt,et)).add(new go.PathSegment(go.PathSegment.Line,0,et)).add(new go.PathSegment(go.PathSegment.Line,lt,.5*et)).add(new go.PathSegment(go.PathSegment.Line,0,0)).add(new go.PathSegment(go.PathSegment.Line,nt,0).close()))}),go.Shape.defineFigureGenerator("Lightning",function(Nt,nt,et){return new go.Geometry().add(new go.PathFigure(0,.55*et).add(new go.PathSegment(go.PathSegment.Line,.6*nt,0)).add(new go.PathSegment(go.PathSegment.Line,.3*nt,.45*et)).add(new go.PathSegment(go.PathSegment.Line,nt,.45*et)).add(new go.PathSegment(go.PathSegment.Line,.4*nt,et)).add(new go.PathSegment(go.PathSegment.Line,.7*nt,.55*et).close()))}),go.Shape.defineFigureGenerator("GenderMale",function(Nt,nt,et){var ct=new go.Geometry,lt=ie*.4,pt=.4,vt=.5,xt=.5,Lt=Ft(),Ot=Ft(),Ht=Ft(),te=Ft(),_t=new go.PathFigure((vt-pt)*nt,xt*et,!1);ct.add(_t),_t.add(new go.PathSegment(go.PathSegment.Bezier,vt*nt,(xt-pt)*et,(vt-pt)*nt,(xt-lt)*et,(vt-lt)*nt,(xt-pt)*et)),Be(vt,xt-pt,vt+lt,xt-pt,vt+pt,xt-lt,vt+pt,xt,.44,Ht,te,Ot,Lt,Lt),_t.add(new go.PathSegment(go.PathSegment.Bezier,Ot.x*nt,Ot.y*et,Ht.x*nt,Ht.y*et,te.x*nt,te.y*et));var Xt=Dt(Ot.x,Ot.y);Be(vt,xt-pt,vt+lt,xt-pt,vt+pt,xt-lt,vt+pt,xt,.56,Lt,Lt,Ot,Ht,te);var ve=Dt(Ot.x,Ot.y);_t.add(new go.PathSegment(go.PathSegment.Line,(Xt.x*.1+.95*.9)*nt,Xt.y*.1*et)),_t.add(new go.PathSegment(go.PathSegment.Line,.85*nt,Xt.y*.1*et)),_t.add(new go.PathSegment(go.PathSegment.Line,.85*nt,0)),_t.add(new go.PathSegment(go.PathSegment.Line,nt,0)),_t.add(new go.PathSegment(go.PathSegment.Line,nt,.15*et)),_t.add(new go.PathSegment(go.PathSegment.Line,(ve.x*.1+.9)*nt,.15*et)),_t.add(new go.PathSegment(go.PathSegment.Line,(ve.x*.1+.9)*nt,(ve.y*.1+.05*.9)*et)),_t.add(new go.PathSegment(go.PathSegment.Line,ve.x*nt,ve.y*et)),_t.add(new go.PathSegment(go.PathSegment.Bezier,(vt+pt)*nt,xt*et,Ht.x*nt,Ht.y*et,te.x*nt,te.y*et)),_t.add(new go.PathSegment(go.PathSegment.Bezier,vt*nt,(xt+pt)*et,(vt+pt)*nt,(xt+lt)*et,(vt+lt)*nt,(xt+pt)*et)),_t.add(new go.PathSegment(go.PathSegment.Bezier,(vt-pt)*nt,xt*et,(vt-lt)*nt,(xt+pt)*et,(vt-pt)*nt,(xt+lt)*et)),pt=.35,lt=ie*.35;var oe=new go.PathFigure(vt*nt,(xt-pt)*et,!1);ct.add(oe),oe.add(new go.PathSegment(go.PathSegment.Bezier,(vt-pt)*nt,xt*et,(vt-lt)*nt,(xt-pt)*et,(vt-pt)*nt,(xt-lt)*et)),oe.add(new go.PathSegment(go.PathSegment.Bezier,vt*nt,(xt+pt)*et,(vt-pt)*nt,(xt+lt)*et,(vt-lt)*nt,(xt+pt)*et)),oe.add(new go.PathSegment(go.PathSegment.Bezier,(vt+pt)*nt,xt*et,(vt+lt)*nt,(xt+pt)*et,(vt+pt)*nt,(xt+lt)*et)),oe.add(new go.PathSegment(go.PathSegment.Bezier,vt*nt,(xt-pt)*et,(vt+pt)*nt,(xt-lt)*et,(vt+lt)*nt,(xt-pt)*et));var Re=new go.PathFigure((vt-pt)*nt,xt*et,!1);return ct.add(Re),se(Lt),se(Ot),se(Ht),se(te),se(Xt),se(ve),ct.spot1=new go.Spot(.202,.257),ct.spot2=new go.Spot(.792,.739),ct.defaultStretch=go.GraphObject.Uniform,ct}),go.Shape.defineFigureGenerator("GenderFemale",function(Nt,nt,et){var ct=new go.Geometry,lt=.375,pt=0,vt=-.125,xt=lt*ie,Lt=new go.PathFigure((.525+pt)*nt,(.5+lt+vt)*et,!1);ct.add(Lt),Lt.add(new go.PathSegment(go.PathSegment.Bezier,(1-.5+lt+pt)*nt,(.5+vt)*et,(.5+xt+pt)*nt,(.5+lt+vt)*et,(.5+lt+pt)*nt,(.5+xt+vt)*et)),Lt.add(new go.PathSegment(go.PathSegment.Bezier,(.5+pt)*nt,(.5-lt+vt)*et,(1-.5+lt+pt)*nt,(.5-xt+vt)*et,(.5+xt+pt)*nt,(.5-lt+vt)*et)),Lt.add(new go.PathSegment(go.PathSegment.Bezier,(.5-lt+pt)*nt,(.5+vt)*et,(.5-xt+pt)*nt,(.5-lt+vt)*et,(.5-lt+pt)*nt,(.5-xt+vt)*et)),Lt.add(new go.PathSegment(go.PathSegment.Bezier,(.475+pt)*nt,(.5+lt+vt)*et,(.5-lt+pt)*nt,(.5+xt+vt)*et,(.5-xt+pt)*nt,(.5+lt+vt)*et)),Lt.add(new go.PathSegment(go.PathSegment.Line,.475*nt,.85*et)),Lt.add(new go.PathSegment(go.PathSegment.Line,.425*nt,.85*et)),Lt.add(new go.PathSegment(go.PathSegment.Line,.425*nt,.9*et)),Lt.add(new go.PathSegment(go.PathSegment.Line,.475*nt,.9*et)),Lt.add(new go.PathSegment(go.PathSegment.Line,.475*nt,et)),Lt.add(new go.PathSegment(go.PathSegment.Line,.525*nt,et)),Lt.add(new go.PathSegment(go.PathSegment.Line,.525*nt,.9*et)),Lt.add(new go.PathSegment(go.PathSegment.Line,.575*nt,.9*et)),Lt.add(new go.PathSegment(go.PathSegment.Line,.575*nt,.85*et)),Lt.add(new go.PathSegment(go.PathSegment.Line,.525*nt,.85*et).close()),lt=.325,pt=0,vt=-.125,xt=lt*ie;var Lt=new go.PathFigure((1-.5+lt+pt)*nt,(.5+vt)*et,!1);ct.add(Lt),Lt.add(new go.PathSegment(go.PathSegment.Bezier,(.5+pt)*nt,(.5+lt+vt)*et,(.5+lt+pt)*nt,(.5+xt+vt)*et,(.5+xt+pt)*nt,(.5+lt+vt)*et)),Lt.add(new go.PathSegment(go.PathSegment.Bezier,(.5-lt+pt)*nt,(.5+vt)*et,(.5-xt+pt)*nt,(.5+lt+vt)*et,(.5-lt+pt)*nt,(.5+xt+vt)*et)),Lt.add(new go.PathSegment(go.PathSegment.Bezier,(.5+pt)*nt,(.5-lt+vt)*et,(.5-lt+pt)*nt,(.5-xt+vt)*et,(.5-xt+pt)*nt,(.5-lt+vt)*et)),Lt.add(new go.PathSegment(go.PathSegment.Bezier,(1-.5+lt+pt)*nt,(.5+vt)*et,(.5+xt+pt)*nt,(.5-lt+vt)*et,(1-.5+lt+pt)*nt,(.5-xt+vt)*et));var Lt=new go.PathFigure((.525+pt)*nt,(.5+lt+vt)*et,!1);return ct.add(Lt),ct.spot1=new go.Spot(.232,.136),ct.spot2=new go.Spot(.682,.611),ct.defaultStretch=go.GraphObject.Uniform,ct}),go.Shape.defineFigureGenerator("LogicImplies",function(Nt,nt,et){var ct=Nt?Nt.parameter1:NaN;return isNaN(ct)&&(ct=.2),new go.Geometry().add(new go.PathFigure((1-ct)*nt,0,!1).add(new go.PathSegment(go.PathSegment.Line,nt,.5*et)).add(new go.PathSegment(go.PathSegment.Line,(1-ct)*nt,et)).add(new go.PathSegment(go.PathSegment.Move,0,.5*et)).add(new go.PathSegment(go.PathSegment.Line,nt,.5*et))).setSpots(0,0,.8,.5)}),go.Shape.defineFigureGenerator("LogicIff",function(Nt,nt,et){var ct=Nt?Nt.parameter1:NaN;return isNaN(ct)&&(ct=.2),new go.Geometry().add(new go.PathFigure((1-ct)*nt,0,!1).add(new go.PathSegment(go.PathSegment.Line,nt,.5*et)).add(new go.PathSegment(go.PathSegment.Line,(1-ct)*nt,et)).add(new go.PathSegment(go.PathSegment.Move,0,.5*et)).add(new go.PathSegment(go.PathSegment.Line,nt,.5*et)).add(new go.PathSegment(go.PathSegment.Move,ct*nt,0)).add(new go.PathSegment(go.PathSegment.Line,0,.5*et)).add(new go.PathSegment(go.PathSegment.Line,ct*nt,et))).setSpots(.2,0,.8,.5)}),go.Shape.defineFigureGenerator("LogicNot",function(Nt,nt,et){return new go.Geometry().add(new go.PathFigure(0,0,!1).add(new go.PathSegment(go.PathSegment.Line,nt,0)).add(new go.PathSegment(go.PathSegment.Line,nt,et)))}),go.Shape.defineFigureGenerator("LogicAnd",function(Nt,nt,et){return new go.Geometry().add(new go.PathFigure(0,et,!1).add(new go.PathSegment(go.PathSegment.Line,.5*nt,0)).add(new go.PathSegment(go.PathSegment.Line,nt,et))).setSpots(.25,.5,.75,1)}),go.Shape.defineFigureGenerator("LogicOr",function(Nt,nt,et){return new go.Geometry().add(new go.PathFigure(0,0,!1).add(new go.PathSegment(go.PathSegment.Line,.5*nt,et)).add(new go.PathSegment(go.PathSegment.Line,nt,0))).setSpots(.219,0,.78,.409)}),go.Shape.defineFigureGenerator("LogicXor",function(Nt,nt,et){var ct=new go.Geometry().add(new go.PathFigure(.5*nt,0,!1).add(new go.PathSegment(go.PathSegment.Line,.5*nt,et)).add(new go.PathSegment(go.PathSegment.Move,0,.5*et)).add(new go.PathSegment(go.PathSegment.Line,nt,.5*et)).add(new go.PathSegment(go.PathSegment.Arc,0,360,.5*nt,.5*et,.5*nt,.5*et)));return ct.defaultStretch=go.GraphObject.Uniform,ct}),go.Shape.defineFigureGenerator("LogicTruth",function(Nt,nt,et){return new go.Geometry().add(new go.PathFigure(0,0,!1).add(new go.PathSegment(go.PathSegment.Line,nt,0)).add(new go.PathSegment(go.PathSegment.Move,.5*nt,0)).add(new go.PathSegment(go.PathSegment.Line,.5*nt,et)))}),go.Shape.defineFigureGenerator("LogicFalsity",function(Nt,nt,et){return new go.Geometry().add(new go.PathFigure(0,et,!1).add(new go.PathSegment(go.PathSegment.Line,nt,et)).add(new go.PathSegment(go.PathSegment.Move,.5*nt,et)).add(new go.PathSegment(go.PathSegment.Line,.5*nt,0)))}),go.Shape.defineFigureGenerator("LogicThereExists",function(Nt,nt,et){return new go.Geometry().add(new go.PathFigure(0,0,!1).add(new go.PathSegment(go.PathSegment.Line,nt,0)).add(new go.PathSegment(go.PathSegment.Line,nt,.5*et)).add(new go.PathSegment(go.PathSegment.Line,0,.5*et)).add(new go.PathSegment(go.PathSegment.Move,nt,.5*et)).add(new go.PathSegment(go.PathSegment.Line,nt,et)).add(new go.PathSegment(go.PathSegment.Line,0,et)))}),go.Shape.defineFigureGenerator("LogicForAll",function(Nt,nt,et){return new go.Geometry().add(new go.PathFigure(0,0,!1).add(new go.PathSegment(go.PathSegment.Line,.5*nt,et)).add(new go.PathSegment(go.PathSegment.Line,nt,0)).add(new go.PathSegment(go.PathSegment.Move,.25*nt,.5*et)).add(new go.PathSegment(go.PathSegment.Line,.75*nt,.5*et))).setSpots(.25,0,.75,.5)}),go.Shape.defineFigureGenerator("LogicIsDefinedAs",function(Nt,nt,et){return new go.Geometry().add(new go.PathFigure(0,0,!1).add(new go.PathSegment(go.PathSegment.Line,nt,0)).add(new go.PathSegment(go.PathSegment.Move,0,.5*et)).add(new go.PathSegment(go.PathSegment.Line,nt,.5*et)).add(new go.PathSegment(go.PathSegment.Move,0,et)).add(new go.PathSegment(go.PathSegment.Line,nt,et))).setSpots(.01,.01,.99,.49)}),go.Shape.defineFigureGenerator("LogicIntersect",function(Nt,nt,et){var ct=.5;return new go.Geometry().add(new go.PathFigure(0,et,!1).add(new go.PathSegment(go.PathSegment.Line,0,ct*et)).add(new go.PathSegment(go.PathSegment.Arc,180,180,ct*nt,ct*et,ct*nt,ct*et)).add(new go.PathSegment(go.PathSegment.Line,nt,et))).setSpots(0,.5,1,1)}),go.Shape.defineFigureGenerator("LogicUnion",function(Nt,nt,et){var ct=.5;return new go.Geometry().add(new go.PathFigure(nt,0,!1).add(new go.PathSegment(go.PathSegment.Line,nt,ct*et)).add(new go.PathSegment(go.PathSegment.Arc,0,180,ct*nt,ct*et,ct*nt,ct*et)).add(new go.PathSegment(go.PathSegment.Line,0,0))).setSpots(0,0,1,.5)}),go.Shape.setFigureParameter("Arrow",0,new Tn("ArrowheadWidth",.3,.01,.99)),go.Shape.setFigureParameter("Arrow",1,new Tn("TailHeight",.3,.01,.99)),go.Shape.defineFigureGenerator("Arrow",function(Nt,nt,et){var ct=Nt?Nt.parameter1:NaN;isNaN(ct)&&(ct=.3);var lt=Nt?Nt.parameter2:NaN;isNaN(lt)&&(lt=.3);var pt=(1-ct)*nt,vt=(.5-lt/2)*et,xt=(.5+lt/2)*et,Lt=new go.Geometry,Ot=new go.PathFigure(0,vt,!0);Lt.add(Ot),Ot.add(new go.PathSegment(go.PathSegment.Line,pt,vt)),Ot.add(new go.PathSegment(go.PathSegment.Line,pt,0)),Ot.add(new go.PathSegment(go.PathSegment.Line,nt,.5*et)),Ot.add(new go.PathSegment(go.PathSegment.Line,pt,et)),Ot.add(new go.PathSegment(go.PathSegment.Line,pt,xt)),Ot.add(new go.PathSegment(go.PathSegment.Line,0,xt).close()),Lt.spot1=new go.Spot(0,vt/et);var Ht=ye(0,xt/et,1,xt/et,pt/nt,1,1,.5,Ft());return Lt.spot2=new go.Spot(Ht.x,Ht.y),se(Ht),Lt}),go.Shape.setFigureParameter("Arrow2",0,new Tn("ArrowheadWidth",30)),go.Shape.setFigureParameter("Arrow2",0,new Tn("TailHeight",30)),go.Shape.defineFigureGenerator("Arrow2",function(Nt,nt,et){var ct=Nt?Nt.parameter1:NaN;isNaN(ct)&&(ct=30),ct>nt&&(ct=nt);var lt=Nt?Nt.parameter2:NaN;isNaN(lt)&&(lt=30),lt=Math.min(lt,et/2);var pt=nt-ct,vt=(et-lt)/2,xt=vt+lt,Lt=new go.Geometry,Ot=new go.PathFigure(0,vt,!0);Lt.add(Ot),Ot.add(new go.PathSegment(go.PathSegment.Line,pt,vt)),Ot.add(new go.PathSegment(go.PathSegment.Line,pt,0)),Ot.add(new go.PathSegment(go.PathSegment.Line,nt,.5*et)),Ot.add(new go.PathSegment(go.PathSegment.Line,pt,et)),Ot.add(new go.PathSegment(go.PathSegment.Line,pt,xt)),Ot.add(new go.PathSegment(go.PathSegment.Line,0,xt).close()),Lt.spot1=new go.Spot(0,vt/et);var Ht=ye(0,xt/et,1,xt/et,pt/nt,1,1,.5,Ft());return Lt.spot2=new go.Spot(Ht.x,Ht.y),se(Ht),Lt}),go.Shape.defineFigureGenerator("Chevron",function(Nt,nt,et){var ct=new go.Geometry,lt=new go.PathFigure(0,0,!0);return ct.add(lt),lt.add(new go.PathSegment(go.PathSegment.Line,.5*nt,0)),lt.add(new go.PathSegment(go.PathSegment.Line,nt,.5*et)),lt.add(new go.PathSegment(go.PathSegment.Line,.5*nt,et)),lt.add(new go.PathSegment(go.PathSegment.Line,0,et)),lt.add(new go.PathSegment(go.PathSegment.Line,.5*nt,.5*et).close()),ct}),go.Shape.defineFigureGenerator("DoubleArrow",function(Nt,nt,et){var ct=new go.Geometry,lt=new go.PathFigure(0,0,!0);return ct.add(lt),lt.add(new go.PathSegment(go.PathSegment.Line,.3*nt,.214*et)),lt.add(new go.PathSegment(go.PathSegment.Line,.3*nt,0)),lt.add(new go.PathSegment(go.PathSegment.Line,1*nt,.5*et)),lt.add(new go.PathSegment(go.PathSegment.Line,.3*nt,1*et)),lt.add(new go.PathSegment(go.PathSegment.Line,.3*nt,.786*et)),lt.add(new go.PathSegment(go.PathSegment.Line,0,1*et).close()),ct}),go.Shape.setFigureParameter("DoubleEndArrow",0,new Tn("ConnecterHeight",.3,.01,.99)),go.Shape.defineFigureGenerator("DoubleEndArrow",function(Nt,nt,et){var ct=Nt?Nt.parameter1:NaN;isNaN(ct)&&(ct=.3);var lt=(.5-ct/2)*et,pt=(.5+ct/2)*et,vt=new go.Geometry,xt=new go.PathFigure(nt,.5*et,!0);vt.add(xt),xt.add(new go.PathSegment(go.PathSegment.Line,.7*nt,et)),xt.add(new go.PathSegment(go.PathSegment.Line,.7*nt,pt)),xt.add(new go.PathSegment(go.PathSegment.Line,.3*nt,pt)),xt.add(new go.PathSegment(go.PathSegment.Line,.3*nt,et)),xt.add(new go.PathSegment(go.PathSegment.Line,0,.5*et)),xt.add(new go.PathSegment(go.PathSegment.Line,.3*nt,0)),xt.add(new go.PathSegment(go.PathSegment.Line,.3*nt,lt)),xt.add(new go.PathSegment(go.PathSegment.Line,.7*nt,lt)),xt.add(new go.PathSegment(go.PathSegment.Line,.7*nt,0).close());var Lt=ye(0,.5,.3,0,0,lt/et,.1,lt/et,Ft());return vt.spot1=new go.Spot(Lt.x,Lt.y),Lt=ye(.7,1,1,.5,0,pt/et,1,pt/et,Lt),vt.spot2=new go.Spot(Lt.x,Lt.y),se(Lt),vt}),go.Shape.setFigureParameter("DoubleEndArrow2",0,new Tn("ConnecterHeight",40)),go.Shape.setFigureParameter("DoubleEndArrow2",1,new Tn("ArrowHeight",100)),go.Shape.defineFigureGenerator("DoubleEndArrow2",function(Nt,nt,et){var ct=Nt?Nt.parameter1:NaN;isNaN(ct)&&(ct=40);var lt=Nt?Nt.parameter2:NaN;isNaN(lt)&&(lt=100);var pt=(et-ct)/2,vt=pt+ct,xt=(et-lt)/2,Lt=xt+lt;(ct>et||lt>et)&&(lt>ct?(ct=ct*et/lt,pt=(et-ct)/2,vt=pt+ct,xt=0,Lt=et):(pt=0,vt=et,xt=0,Lt=et));var Ot=new go.Geometry,Ht=new go.PathFigure(nt,.5*et,!0);Ot.add(Ht),Ht.add(new go.PathSegment(go.PathSegment.Line,.7*nt,Lt)),Ht.add(new go.PathSegment(go.PathSegment.Line,.7*nt,vt)),Ht.add(new go.PathSegment(go.PathSegment.Line,.3*nt,vt)),Ht.add(new go.PathSegment(go.PathSegment.Line,.3*nt,Lt)),Ht.add(new go.PathSegment(go.PathSegment.Line,0,.5*et)),Ht.add(new go.PathSegment(go.PathSegment.Line,.3*nt,xt)),Ht.add(new go.PathSegment(go.PathSegment.Line,.3*nt,pt)),Ht.add(new go.PathSegment(go.PathSegment.Line,.7*nt,pt)),Ht.add(new go.PathSegment(go.PathSegment.Line,.7*nt,xt).close());var te=ye(0,.5,.3,xt/et,0,pt/et,1,pt/et,Ft());return Ot.spot1=new go.Spot(te.x,te.y),te=ye(.7,Lt/et,1,.5,0,vt/et,1,vt/et,te),Ot.spot2=new go.Spot(te.x,te.y),se(te),Ot}),go.Shape.setFigureParameter("IBeamArrow",0,new Tn("ConnectorHeight",.7,.51,.97)),go.Shape.defineFigureGenerator("IBeamArrow",function(Nt,nt,et){var ct=Nt?Nt.parameter1:NaN;isNaN(ct)&&(ct=.3);var lt=(.5-ct/2)*et,pt=(.5+ct/2)*et,vt=new go.Geometry,xt=new go.PathFigure(nt,.5*et,!0);vt.add(xt),xt.add(new go.PathSegment(go.PathSegment.Line,.7*nt,et)),xt.add(new go.PathSegment(go.PathSegment.Line,.7*nt,pt)),xt.add(new go.PathSegment(go.PathSegment.Line,.2*nt,pt)),xt.add(new go.PathSegment(go.PathSegment.Line,.2*nt,et)),xt.add(new go.PathSegment(go.PathSegment.Line,0,et)),xt.add(new go.PathSegment(go.PathSegment.Line,0,0)),xt.add(new go.PathSegment(go.PathSegment.Line,.2*nt,0)),xt.add(new go.PathSegment(go.PathSegment.Line,.2*nt,lt)),xt.add(new go.PathSegment(go.PathSegment.Line,.7*nt,lt)),xt.add(new go.PathSegment(go.PathSegment.Line,.7*nt,0).close()),vt.spot1=new go.Spot(0,lt/et);var Lt=ye(.7,1,1,.5,0,pt/et,1,pt/et,Ft());return vt.spot2=new go.Spot(Lt.x,Lt.y),se(Lt),vt}),go.Shape.setFigureParameter("IBeamArrow2",0,new Tn("ConnectorHeight",40)),go.Shape.setFigureParameter("IBeamArrow2",1,new Tn("BeamArrowHeight",100)),go.Shape.defineFigureGenerator("IBeamArrow2",function(Nt,nt,et){var ct=Nt?Nt.parameter1:NaN;isNaN(ct)&&(ct=40);var lt=Nt?Nt.parameter2:NaN;isNaN(lt)&&(lt=100);var pt=(et-ct)/2,vt=pt+ct,xt=(et-lt)/2,Lt=xt+lt;(ct>et||lt>et)&&(lt>ct?(ct=ct*et/lt,pt=(et-ct)/2,vt=pt+ct,xt=0,Lt=et):(pt=0,vt=et,xt=0,Lt=et));var Ot=new go.Geometry,Ht=new go.PathFigure(nt,.5*et,!0);Ot.add(Ht),Ht.add(new go.PathSegment(go.PathSegment.Line,.7*nt,Lt)),Ht.add(new go.PathSegment(go.PathSegment.Line,.7*nt,vt)),Ht.add(new go.PathSegment(go.PathSegment.Line,.2*nt,vt)),Ht.add(new go.PathSegment(go.PathSegment.Line,.2*nt,Lt)),Ht.add(new go.PathSegment(go.PathSegment.Line,0,Lt)),Ht.add(new go.PathSegment(go.PathSegment.Line,0,xt)),Ht.add(new go.PathSegment(go.PathSegment.Line,.2*nt,xt)),Ht.add(new go.PathSegment(go.PathSegment.Line,.2*nt,pt)),Ht.add(new go.PathSegment(go.PathSegment.Line,.7*nt,pt)),Ht.add(new go.PathSegment(go.PathSegment.Line,.7*nt,xt).close()),Ot.spot1=new go.Spot(0,pt/et);var te=ye(.7,Lt/et,1,.5,0,vt/et,1,vt/et,Ft());return Ot.spot2=new go.Spot(te.x,te.y),se(te),Ot}),go.Shape.setFigureParameter("Pointer",0,new Tn("BackPoint",.1,0,.2)),go.Shape.defineFigureGenerator("Pointer",function(Nt,nt,et){var ct=Nt?Nt.parameter1:NaN;isNaN(ct)&&(ct=.1);var lt=new go.Geometry,pt=new go.PathFigure(nt,.5*et,!0);lt.add(pt),pt.add(new go.PathSegment(go.PathSegment.Line,0,et)),pt.add(new go.PathSegment(go.PathSegment.Line,ct*nt,.5*et)),pt.add(new go.PathSegment(go.PathSegment.Line,0,0).close()),lt.spot1=new go.Spot(ct,.35);var vt=ye(.2,.65,1,.65,0,1,1,.5,Ft());return lt.spot2=new go.Spot(vt.x,vt.y),se(vt),lt}),go.Shape.setFigureParameter("RoundedPointer",0,new Tn("RoundedEdge",.3,0,.5)),go.Shape.defineFigureGenerator("RoundedPointer",function(Nt,nt,et){var ct=Nt?Nt.parameter1:NaN;isNaN(ct)&&(ct=.3);var lt=new go.Geometry,pt=new go.PathFigure(nt,.5*et,!0);lt.add(pt),pt.add(new go.PathSegment(go.PathSegment.Line,0,et)),pt.add(new go.PathSegment(go.PathSegment.Bezier,0,0,ct*nt,.75*et,ct*nt,.25*et).close()),lt.spot1=new go.Spot(ct,.35);var vt=ye(0,.65,1,.65,0,1,1,.5,Ft());return lt.spot2=new go.Spot(vt.x,vt.y),se(vt),lt}),go.Shape.setFigureParameter("SplitEndArrow",0,new Tn("TailHeight",.4,.01,.99)),go.Shape.defineFigureGenerator("SplitEndArrow",function(Nt,nt,et){var ct=Nt?Nt.parameter1:NaN;isNaN(ct)&&(ct=.4);var lt=(.5-ct/2)*et,pt=(.5+ct/2)*et,vt=new go.Geometry,xt=new go.PathFigure(nt,.5*et,!0);vt.add(xt),xt.add(new go.PathSegment(go.PathSegment.Line,.7*nt,et)),xt.add(new go.PathSegment(go.PathSegment.Line,.7*nt,pt)),xt.add(new go.PathSegment(go.PathSegment.Line,0,pt)),xt.add(new go.PathSegment(go.PathSegment.Line,.2*nt,.5*et)),xt.add(new go.PathSegment(go.PathSegment.Line,0,lt)),xt.add(new go.PathSegment(go.PathSegment.Line,.7*nt,lt)),xt.add(new go.PathSegment(go.PathSegment.Line,.7*nt,0).close()),vt.spot1=new go.Spot(.2,.3);var Lt=ye(.7,1,1,.5,0,pt/et,1,pt/et,Ft());return vt.spot2=new go.Spot(Lt.x,Lt.y),se(Lt),vt}),go.Shape.setFigureParameter("SplitEndArrow2",0,new Tn("TailThickness",50)),go.Shape.defineFigureGenerator("SplitEndArrow2",function(Nt,nt,et){var ct=Nt?Nt.parameter1:NaN;isNaN(ct)&&(ct=50);var lt=(et-ct)/2,pt=lt+ct;ct>et&&(lt=0,pt=et);var vt=new go.Geometry,xt=new go.PathFigure(nt,.5*et,!0);vt.add(xt),xt.add(new go.PathSegment(go.PathSegment.Line,.7*nt,et)),xt.add(new go.PathSegment(go.PathSegment.Line,.7*nt,pt)),xt.add(new go.PathSegment(go.PathSegment.Line,0,pt)),xt.add(new go.PathSegment(go.PathSegment.Line,.2*nt,.5*et)),xt.add(new go.PathSegment(go.PathSegment.Line,0,lt)),xt.add(new go.PathSegment(go.PathSegment.Line,.7*nt,lt)),xt.add(new go.PathSegment(go.PathSegment.Line,.7*nt,0).close()),vt.spot1=new go.Spot(.2,lt/et);var Lt=ye(.7,1,1,.5,0,pt/et,1,pt/et,Ft());return vt.spot2=new go.Spot(Lt.x,Lt.y),se(Lt),vt}),go.Shape.setFigureParameter("SquareArrow",0,new Tn("ArrowPoint",.7,.2,.9)),go.Shape.defineFigureGenerator("SquareArrow",function(Nt,nt,et){var ct=Nt?Nt.parameter1:NaN;isNaN(ct)&&(ct=.7);var lt=new go.Geometry,pt=new go.PathFigure(nt,.5*et,!0);return lt.add(pt),pt.add(new go.PathSegment(go.PathSegment.Line,ct*nt,et)),pt.add(new go.PathSegment(go.PathSegment.Line,0,et)),pt.add(new go.PathSegment(go.PathSegment.Line,0,0)),pt.add(new go.PathSegment(go.PathSegment.Line,ct*nt,0).close()),lt.spot1=go.Spot.TopLeft,lt.spot2=new go.Spot(ct,1),lt}),go.Shape.defineFigureGenerator("Cone1",function(Nt,nt,et){var ct=new go.Geometry,lt=ie*.5,pt=ie*.1,vt=new go.PathFigure(0,.9*et,!0);return ct.add(vt),vt.add(new go.PathSegment(go.PathSegment.Line,.5*nt,0)),vt.add(new go.PathSegment(go.PathSegment.Line,nt,.9*et)),vt.add(new go.PathSegment(go.PathSegment.Bezier,.5*nt,et,nt,(.9+pt)*et,(.5+lt)*nt,et)),vt.add(new go.PathSegment(go.PathSegment.Bezier,0,.9*et,(.5-lt)*nt,et,0,(.9+pt)*et).close()),ct.spot1=new go.Spot(.25,.5),ct.spot2=new go.Spot(.75,.97),ct}),go.Shape.defineFigureGenerator("Cone2",function(Nt,nt,et){var ct=new go.Geometry,lt=new go.PathFigure(0,.9*et,!0);ct.add(lt),lt.add(new go.PathSegment(go.PathSegment.Bezier,nt,.9*et,(1-.85/.9)*nt,et,.85/.9*nt,et)),lt.add(new go.PathSegment(go.PathSegment.Line,.5*nt,0)),lt.add(new go.PathSegment(go.PathSegment.Line,0,.9*et).close());var pt=new go.PathFigure(0,.9*et,!1);return ct.add(pt),pt.add(new go.PathSegment(go.PathSegment.Bezier,nt,.9*et,(1-.85/.9)*nt,.8*et,.85/.9*nt,.8*et)),ct.spot1=new go.Spot(.25,.5),ct.spot2=new go.Spot(.75,.82),ct}),go.Shape.defineFigureGenerator("Cube1",function(Nt,nt,et){var ct=new go.Geometry,lt=new go.PathFigure(.5*nt,et,!0);ct.add(lt),lt.add(new go.PathSegment(go.PathSegment.Line,nt,.85*et)),lt.add(new go.PathSegment(go.PathSegment.Line,nt,.15*et)),lt.add(new go.PathSegment(go.PathSegment.Line,.5*nt,0)),lt.add(new go.PathSegment(go.PathSegment.Line,0,.15*et)),lt.add(new go.PathSegment(go.PathSegment.Line,0,.85*et).close());var pt=new go.PathFigure(.5*nt,et,!1);return ct.add(pt),pt.add(new go.PathSegment(go.PathSegment.Line,.5*nt,.3*et)),pt.add(new go.PathSegment(go.PathSegment.Line,0,.15*et)),pt.add(new go.PathSegment(go.PathSegment.Move,.5*nt,.3*et)),pt.add(new go.PathSegment(go.PathSegment.Line,nt,.15*et)),ct.spot1=new go.Spot(0,.3),ct.spot2=new go.Spot(.5,.85),ct}),go.Shape.defineFigureGenerator("Cube2",function(Nt,nt,et){var ct=new go.Geometry,lt=new go.PathFigure(0,.3*et,!0);ct.add(lt),lt.add(new go.PathSegment(go.PathSegment.Line,0,et)),lt.add(new go.PathSegment(go.PathSegment.Line,.7*nt,et)),lt.add(new go.PathSegment(go.PathSegment.Line,nt,.7*et)),lt.add(new go.PathSegment(go.PathSegment.Line,nt,0)),lt.add(new go.PathSegment(go.PathSegment.Line,.3*nt,0).close());var pt=new go.PathFigure(0,.3*et,!1);return ct.add(pt),pt.add(new go.PathSegment(go.PathSegment.Line,.7*nt,.3*et)),pt.add(new go.PathSegment(go.PathSegment.Line,nt,0)),pt.add(new go.PathSegment(go.PathSegment.Move,.7*nt,.3*et)),pt.add(new go.PathSegment(go.PathSegment.Line,.7*nt,et)),ct.spot1=new go.Spot(0,.3),ct.spot2=new go.Spot(.7,1),ct}),go.Shape.defineFigureGenerator("Cylinder1",function(Nt,nt,et){var ct=Nt?Nt.parameter1:NaN;isNaN(ct)&&(ct=5),ct=Math.min(ct,et/3);var lt=new go.Geometry,pt=ie*.5,vt=new go.PathFigure(0,ct,!0);lt.add(vt),vt.add(new go.PathSegment(go.PathSegment.Bezier,.5*nt,0,0,ie*ct,(.5-pt)*nt,0)),vt.add(new go.PathSegment(go.PathSegment.Bezier,1*nt,ct,(.5+pt)*nt,0,1*nt,ie*ct)),vt.add(new go.PathSegment(go.PathSegment.Line,nt,et-ct)),vt.add(new go.PathSegment(go.PathSegment.Bezier,.5*nt,1*et,1*nt,et-ie*ct,(.5+pt)*nt,1*et)),vt.add(new go.PathSegment(go.PathSegment.Bezier,0,et-ct,(.5-pt)*nt,1*et,0,et-ie*ct)),vt.add(new go.PathSegment(go.PathSegment.Line,0,ct));var xt=new go.PathFigure(nt,ct,!1);return lt.add(xt),xt.add(new go.PathSegment(go.PathSegment.Bezier,.5*nt,2*ct,1*nt,2*ct-ie*ct,(.5+pt)*nt,2*ct)),xt.add(new go.PathSegment(go.PathSegment.Bezier,0,ct,(.5-pt)*nt,2*ct,0,2*ct-ie*ct)),lt.spot1=new go.Spot(0,0,0,2*ct),lt.spot2=new go.Spot(1,1),lt}),go.Shape.defineFigureGenerator("Cylinder2",function(Nt,nt,et){var ct=Nt?Nt.parameter1:NaN;isNaN(ct)&&(ct=5),ct=Math.min(ct,et/3);var lt=new go.Geometry,pt=ie*.5,vt=new go.PathFigure(0,et-ct,!0);lt.add(vt),vt.add(new go.PathSegment(go.PathSegment.Line,0,ct)),vt.add(new go.PathSegment(go.PathSegment.Bezier,.5*nt,0,0,ie*ct,(.5-pt)*nt,0)),vt.add(new go.PathSegment(go.PathSegment.Bezier,nt,ct,(.5+pt)*nt,0,nt,ie*ct)),vt.add(new go.PathSegment(go.PathSegment.Line,nt,et-ct)),vt.add(new go.PathSegment(go.PathSegment.Bezier,.5*nt,et,nt,et-ie*ct,(.5+pt)*nt,et)),vt.add(new go.PathSegment(go.PathSegment.Bezier,0,et-ct,(.5-pt)*nt,et,0,et-ie*ct));var xt=new go.PathFigure(0,et-ct,!1);return lt.add(xt),xt.add(new go.PathSegment(go.PathSegment.Bezier,.5*nt,et-2*ct,0,et-ct-ie*ct,(.5-pt)*nt,et-2*ct)),xt.add(new go.PathSegment(go.PathSegment.Bezier,nt,et-ct,(.5+pt)*nt,et-2*ct,nt,et-ct-ie*ct)),lt.spot1=new go.Spot(0,0),lt.spot2=new go.Spot(1,1,0,-2*ct),lt}),go.Shape.defineFigureGenerator("Cylinder3",function(Nt,nt,et){var ct=Nt?Nt.parameter1:NaN;isNaN(ct)&&(ct=5),ct=Math.min(ct,nt/3);var lt=new go.Geometry,pt=ie*.5,vt=new go.PathFigure(ct,0,!0);lt.add(vt),vt.add(new go.PathSegment(go.PathSegment.Line,nt-ct,0)),vt.add(new go.PathSegment(go.PathSegment.Bezier,nt,.5*et,nt-ie*ct,0,nt,(.5-pt)*et)),vt.add(new go.PathSegment(go.PathSegment.Bezier,nt-ct,et,nt,(.5+pt)*et,nt-ie*ct,et)),vt.add(new go.PathSegment(go.PathSegment.Line,ct,et)),vt.add(new go.PathSegment(go.PathSegment.Bezier,0,.5*et,ie*ct,et,0,(.5+pt)*et)),vt.add(new go.PathSegment(go.PathSegment.Bezier,ct,0,0,(.5-pt)*et,ie*ct,0));var xt=new go.PathFigure(ct,0,!1);return lt.add(xt),xt.add(new go.PathSegment(go.PathSegment.Bezier,2*ct,.5*et,ct+ie*ct,0,2*ct,(.5-pt)*et)),xt.add(new go.PathSegment(go.PathSegment.Bezier,ct,et,2*ct,(.5+pt)*et,ct+ie*ct,et)),lt.spot1=new go.Spot(0,0,2*ct,0),lt.spot2=new go.Spot(1,1),lt}),go.Shape.defineFigureGenerator("Cylinder4",function(Nt,nt,et){var ct=Nt?Nt.parameter1:NaN;isNaN(ct)&&(ct=5),ct=Math.min(ct,nt/3);var lt=new go.Geometry,pt=ie*.5,vt=new go.PathFigure(nt-ct,0,!0);lt.add(vt),vt.add(new go.PathSegment(go.PathSegment.Bezier,nt,.5*et,nt-ie*ct,0,nt,(.5-pt)*et)),vt.add(new go.PathSegment(go.PathSegment.Bezier,nt-ct,et,nt,(.5+pt)*et,nt-ie*ct,et)),vt.add(new go.PathSegment(go.PathSegment.Line,ct,et)),vt.add(new go.PathSegment(go.PathSegment.Bezier,0,.5*et,ie*ct,et,0,(.5+pt)*et)),vt.add(new go.PathSegment(go.PathSegment.Bezier,ct,0,0,(.5-pt)*et,ie*ct,0)),vt.add(new go.PathSegment(go.PathSegment.Line,nt-ct,0));var xt=new go.PathFigure(nt-ct,0,!1);return lt.add(xt),xt.add(new go.PathSegment(go.PathSegment.Bezier,nt-2*ct,.5*et,nt-ct-ie*ct,0,nt-2*ct,(.5-pt)*et)),xt.add(new go.PathSegment(go.PathSegment.Bezier,nt-ct,et,nt-2*ct,(.5+pt)*et,nt-ct-ie*ct,et)),lt.spot1=new go.Spot(0,0),lt.spot2=new go.Spot(1,1,-2*ct,0),lt}),go.Shape.defineFigureGenerator("Prism1",function(Nt,nt,et){var ct=new go.Geometry,lt=new go.PathFigure(.25*nt,.25*et,!0);ct.add(lt),lt.add(new go.PathSegment(go.PathSegment.Line,.75*nt,0)),lt.add(new go.PathSegment(go.PathSegment.Line,nt,.5*et)),lt.add(new go.PathSegment(go.PathSegment.Line,.5*nt,et)),lt.add(new go.PathSegment(go.PathSegment.Line,0,et).close());var pt=new go.PathFigure(.25*nt,.25*et,!1);return ct.add(pt),pt.add(new go.PathSegment(go.PathSegment.Line,.5*nt,et)),ct.spot1=new go.Spot(.408,.172),ct.spot2=new go.Spot(.833,.662),ct}),go.Shape.defineFigureGenerator("Prism2",function(Nt,nt,et){var ct=new go.Geometry,lt=new go.PathFigure(0,.25*et,!0);ct.add(lt),lt.add(new go.PathSegment(go.PathSegment.Line,.75*nt,0)),lt.add(new go.PathSegment(go.PathSegment.Line,nt,.25*et)),lt.add(new go.PathSegment(go.PathSegment.Line,.75*nt,.75*et)),lt.add(new go.PathSegment(go.PathSegment.Line,0,et).close());var pt=new go.PathFigure(0,et,!1);return ct.add(pt),pt.add(new go.PathSegment(go.PathSegment.Line,.25*nt,.5*et)),pt.add(new go.PathSegment(go.PathSegment.Line,nt,.25*et)),pt.add(new go.PathSegment(go.PathSegment.Move,0,.25*et)),pt.add(new go.PathSegment(go.PathSegment.Line,.25*nt,.5*et)),ct.spot1=new go.Spot(.25,.5),ct.spot2=new go.Spot(.75,.75),ct}),go.Shape.defineFigureGenerator("Pyramid1",function(Nt,nt,et){var ct=new go.Geometry,lt=new go.PathFigure(.5*nt,0,!0);ct.add(lt),lt.add(new go.PathSegment(go.PathSegment.Line,nt,.75*et)),lt.add(new go.PathSegment(go.PathSegment.Line,.5*nt,et)),lt.add(new go.PathSegment(go.PathSegment.Line,0,.75*et).close());var pt=new go.PathFigure(.5*nt,0,!1);return ct.add(pt),pt.add(new go.PathSegment(go.PathSegment.Line,.5*nt,et)),ct.spot1=new go.Spot(.25,.367),ct.spot2=new go.Spot(.75,.875),ct}),go.Shape.defineFigureGenerator("Pyramid2",function(Nt,nt,et){var ct=new go.Geometry,lt=new go.PathFigure(.5*nt,0,!0);ct.add(lt),lt.add(new go.PathSegment(go.PathSegment.Line,nt,.85*et)),lt.add(new go.PathSegment(go.PathSegment.Line,.5*nt,et)),lt.add(new go.PathSegment(go.PathSegment.Line,0,.85*et).close());var pt=new go.PathFigure(.5*nt,0,!1);return ct.add(pt),pt.add(new go.PathSegment(go.PathSegment.Line,.5*nt,.7*et)),pt.add(new go.PathSegment(go.PathSegment.Line,0,.85*et)),pt.add(new go.PathSegment(go.PathSegment.Move,.5*nt,.7*et)),pt.add(new go.PathSegment(go.PathSegment.Line,nt,.85*et)),ct.spot1=new go.Spot(.25,.367),ct.spot2=new go.Spot(.75,.875),ct}),go.Shape.defineFigureGenerator("Actor",function(Nt,nt,et){var ct=new go.Geometry,lt=.2,pt=.1,vt=ie*lt,xt=ie*pt,Lt=.5,Ot=.1,Ht=new go.PathFigure(Lt*nt,(Ot+pt)*et,!0);ct.add(Ht),Ht.add(new go.PathSegment(go.PathSegment.Bezier,(Lt-lt)*nt,Ot*et,(Lt-vt)*nt,(Ot+pt)*et,(Lt-lt)*nt,(Ot+xt)*et)),Ht.add(new go.PathSegment(go.PathSegment.Bezier,Lt*nt,(Ot-pt)*et,(Lt-lt)*nt,(Ot-xt)*et,(Lt-vt)*nt,(Ot-pt)*et)),Ht.add(new go.PathSegment(go.PathSegment.Bezier,(Lt+lt)*nt,Ot*et,(Lt+vt)*nt,(Ot-pt)*et,(Lt+lt)*nt,(Ot-xt)*et)),Ht.add(new go.PathSegment(go.PathSegment.Bezier,Lt*nt,(Ot+pt)*et,(Lt+lt)*nt,(Ot+xt)*et,(Lt+vt)*nt,(Ot+pt)*et));var te=.05,_t=ie*te;Lt=.05,Ot=.25;var Xt=new go.PathFigure(.5*nt,.2*et,!0);return ct.add(Xt),Xt.add(new go.PathSegment(go.PathSegment.Line,.95*nt,.2*et)),Lt=.95,Ot=.25,Xt.add(new go.PathSegment(go.PathSegment.Bezier,(Lt+te)*nt,Ot*et,(Lt+_t)*nt,(Ot-te)*et,(Lt+te)*nt,(Ot-_t)*et)),Xt.add(new go.PathSegment(go.PathSegment.Line,nt,.6*et)),Xt.add(new go.PathSegment(go.PathSegment.Line,.85*nt,.6*et)),Xt.add(new go.PathSegment(go.PathSegment.Line,.85*nt,.35*et)),te=.025,_t=ie*te,Lt=.825,Ot=.35,Xt.add(new go.PathSegment(go.PathSegment.Bezier,Lt*nt,(Ot-te)*et,(Lt+te)*nt,(Ot-_t)*et,(Lt+_t)*nt,(Ot-te)*et)),Xt.add(new go.PathSegment(go.PathSegment.Bezier,(Lt-te)*nt,Ot*et,(Lt-_t)*nt,(Ot-te)*et,(Lt-te)*nt,(Ot-_t)*et)),Xt.add(new go.PathSegment(go.PathSegment.Line,.8*nt,et)),Xt.add(new go.PathSegment(go.PathSegment.Line,.55*nt,et)),Xt.add(new go.PathSegment(go.PathSegment.Line,.55*nt,.7*et)),te=.05,_t=ie*te,Lt=.5,Ot=.7,Xt.add(new go.PathSegment(go.PathSegment.Bezier,Lt*nt,(Ot-te)*et,(Lt+te)*nt,(Ot-_t)*et,(Lt+_t)*nt,(Ot-te)*et)),Xt.add(new go.PathSegment(go.PathSegment.Bezier,(Lt-te)*nt,Ot*et,(Lt-_t)*nt,(Ot-te)*et,(Lt-te)*nt,(Ot-_t)*et)),Xt.add(new go.PathSegment(go.PathSegment.Line,.45*nt,et)),Xt.add(new go.PathSegment(go.PathSegment.Line,.2*nt,et)),Xt.add(new go.PathSegment(go.PathSegment.Line,.2*nt,.35*et)),te=.025,_t=ie*te,Lt=.175,Ot=.35,Xt.add(new go.PathSegment(go.PathSegment.Bezier,Lt*nt,(Ot-te)*et,(Lt+te)*nt,(Ot-_t)*et,(Lt+_t)*nt,(Ot-te)*et)),Xt.add(new go.PathSegment(go.PathSegment.Bezier,(Lt-te)*nt,Ot*et,(Lt-_t)*nt,(Ot-te)*et,(Lt-te)*nt,(Ot-_t)*et)),Xt.add(new go.PathSegment(go.PathSegment.Line,.15*nt,.6*et)),Xt.add(new go.PathSegment(go.PathSegment.Line,0,.6*et)),Xt.add(new go.PathSegment(go.PathSegment.Line,0,.25*et)),te=.05,_t=ie*te,Lt=.05,Ot=.25,Xt.add(new go.PathSegment(go.PathSegment.Bezier,Lt*nt,(Ot-te)*et,(Lt-te)*nt,(Ot-_t)*et,(Lt-_t)*nt,(Ot-te)*et)),Xt.add(new go.PathSegment(go.PathSegment.Line,.5*nt,.2*et)),ct.spot1=new go.Spot(.2,.2),ct.spot2=new go.Spot(.8,.65),ct}),go.Shape.setFigureParameter("Card",0,new Tn("CornerCutoutSize",.2,.1,.9)),go.Shape.defineFigureGenerator("Card",function(Nt,nt,et){var ct=Nt?Nt.parameter1:NaN;isNaN(ct)&&(ct=.2);var lt=new go.Geometry,pt=new go.PathFigure(nt,0,!0);return lt.add(pt),pt.add(new go.PathSegment(go.PathSegment.Line,nt,et)),pt.add(new go.PathSegment(go.PathSegment.Line,0,et)),pt.add(new go.PathSegment(go.PathSegment.Line,0,ct*et)),pt.add(new go.PathSegment(go.PathSegment.Line,ct*nt,0).close()),lt.spot1=new go.Spot(0,ct),lt.spot2=go.Spot.BottomRight,lt}),go.Shape.defineFigureGenerator("Collate",function(Nt,nt,et){var ct=new go.Geometry,lt=new go.PathFigure(.5*nt,.5*et,!0);ct.add(lt),lt.add(new go.PathSegment(go.PathSegment.Line,0,0)),lt.add(new go.PathSegment(go.PathSegment.Line,nt,0)),lt.add(new go.PathSegment(go.PathSegment.Line,.5*nt,.5*et));var pt=new go.PathFigure(.5*nt,.5*et,!0);return ct.add(pt),pt.add(new go.PathSegment(go.PathSegment.Line,nt,et)),pt.add(new go.PathSegment(go.PathSegment.Line,0,et)),pt.add(new go.PathSegment(go.PathSegment.Line,.5*nt,.5*et)),ct.spot1=new go.Spot(.25,0),ct.spot2=new go.Spot(.75,.25),ct}),go.Shape.defineFigureGenerator("CreateRequest",function(Nt,nt,et){var ct=new go.Geometry,lt=Nt?Nt.parameter1:NaN;isNaN(lt)&&(lt=.1);var pt=new go.PathFigure(0,0,!0);ct.add(pt),pt.add(new go.PathSegment(go.PathSegment.Line,nt,0)),pt.add(new go.PathSegment(go.PathSegment.Line,nt,et)),pt.add(new go.PathSegment(go.PathSegment.Line,0,et).close());var vt=new go.PathFigure(0,lt*et,!1);return ct.add(vt),vt.add(new go.PathSegment(go.PathSegment.Line,nt,lt*et)),vt.add(new go.PathSegment(go.PathSegment.Move,0,(1-lt)*et)),vt.add(new go.PathSegment(go.PathSegment.Line,nt,(1-lt)*et)),ct}),go.Shape.defineFigureGenerator("Database",function(Nt,nt,et){var ct=new go.Geometry,lt=ie*.5,pt=ie*.1,vt=new go.PathFigure(nt,.1*et,!0);ct.add(vt),vt.add(new go.PathSegment(go.PathSegment.Line,nt,.9*et)),vt.add(new go.PathSegment(go.PathSegment.Bezier,.5*nt,et,nt,(.9+pt)*et,(.5+lt)*nt,et)),vt.add(new go.PathSegment(go.PathSegment.Bezier,0,.9*et,(.5-lt)*nt,et,0,(.9+pt)*et)),vt.add(new go.PathSegment(go.PathSegment.Line,0,.1*et)),vt.add(new go.PathSegment(go.PathSegment.Bezier,.5*nt,0,0,(.1-pt)*et,(.5-lt)*nt,0)),vt.add(new go.PathSegment(go.PathSegment.Bezier,nt,.1*et,(.5+lt)*nt,0,nt,(.1-pt)*et));var xt=new go.PathFigure(nt,.1*et,!1);return ct.add(xt),xt.add(new go.PathSegment(go.PathSegment.Bezier,.5*nt,.2*et,nt,(.1+pt)*et,(.5+lt)*nt,.2*et)),xt.add(new go.PathSegment(go.PathSegment.Bezier,0,.1*et,(.5-lt)*nt,.2*et,0,(.1+pt)*et)),xt.add(new go.PathSegment(go.PathSegment.Move,nt,.2*et)),xt.add(new go.PathSegment(go.PathSegment.Bezier,.5*nt,.3*et,nt,(.2+pt)*et,(.5+lt)*nt,.3*et)),xt.add(new go.PathSegment(go.PathSegment.Bezier,0,.2*et,(.5-lt)*nt,.3*et,0,(.2+pt)*et)),xt.add(new go.PathSegment(go.PathSegment.Move,nt,.3*et)),xt.add(new go.PathSegment(go.PathSegment.Bezier,.5*nt,.4*et,nt,(.3+pt)*et,(.5+lt)*nt,.4*et)),xt.add(new go.PathSegment(go.PathSegment.Bezier,0,.3*et,(.5-lt)*nt,.4*et,0,(.3+pt)*et)),ct.spot1=new go.Spot(0,.4),ct.spot2=new go.Spot(1,.9),ct}),go.Shape.defineFigureGenerator("DataStorage",function(Nt,nt,et){var ct=new go.Geometry,lt=new go.PathFigure(0,0,!0);return ct.add(lt),lt.add(new go.PathSegment(go.PathSegment.Line,.75*nt,0)),lt.add(new go.PathSegment(go.PathSegment.Bezier,.75*nt,et,nt,0,nt,et)),lt.add(new go.PathSegment(go.PathSegment.Line,0,et)),lt.add(new go.PathSegment(go.PathSegment.Bezier,0,0,.25*nt,.9*et,.25*nt,.1*et).close()),ct.spot1=new go.Spot(.226,0),ct.spot2=new go.Spot(.81,1),ct}),go.Shape.defineFigureGenerator("DiskStorage",function(Nt,nt,et){var ct=new go.Geometry,lt=ie*.5,pt=ie*.1,vt=new go.PathFigure(nt,.1*et,!0);ct.add(vt),vt.add(new go.PathSegment(go.PathSegment.Line,nt,.9*et)),vt.add(new go.PathSegment(go.PathSegment.Bezier,.5*nt,et,nt,(.9+pt)*et,(.5+lt)*nt,et)),vt.add(new go.PathSegment(go.PathSegment.Bezier,0,.9*et,(.5-lt)*nt,et,0,(.9+pt)*et)),vt.add(new go.PathSegment(go.PathSegment.Line,0,.1*et)),vt.add(new go.PathSegment(go.PathSegment.Bezier,.5*nt,0,0,(.1-pt)*et,(.5-lt)*nt,0)),vt.add(new go.PathSegment(go.PathSegment.Bezier,nt,.1*et,(.5+lt)*nt,0,nt,(.1-pt)*et));var xt=new go.PathFigure(nt,.1*et,!1);return ct.add(xt),xt.add(new go.PathSegment(go.PathSegment.Bezier,.5*nt,.2*et,nt,(.1+pt)*et,(.5+lt)*nt,.2*et)),xt.add(new go.PathSegment(go.PathSegment.Bezier,0,.1*et,(.5-lt)*nt,.2*et,0,(.1+pt)*et)),xt.add(new go.PathSegment(go.PathSegment.Move,nt,.2*et)),xt.add(new go.PathSegment(go.PathSegment.Bezier,.5*nt,.3*et,nt,(.2+pt)*et,(.5+lt)*nt,.3*et)),xt.add(new go.PathSegment(go.PathSegment.Bezier,0,.2*et,(.5-lt)*nt,.3*et,0,(.2+pt)*et)),ct.spot1=new go.Spot(0,.3),ct.spot2=new go.Spot(1,.9),ct}),go.Shape.defineFigureGenerator("Display",function(Nt,nt,et){var ct=new go.Geometry,lt=new go.PathFigure(.25*nt,0,!0);return ct.add(lt),lt.add(new go.PathSegment(go.PathSegment.Line,.75*nt,0)),lt.add(new go.PathSegment(go.PathSegment.Bezier,.75*nt,et,nt,0,nt,et)),lt.add(new go.PathSegment(go.PathSegment.Line,.25*nt,et)),lt.add(new go.PathSegment(go.PathSegment.Line,0,.5*et).close()),ct.spot1=new go.Spot(.25,0),ct.spot2=new go.Spot(.75,1),ct}),go.Shape.defineFigureGenerator("DividedEvent",function(Nt,nt,et){var ct=new go.Geometry,lt=Nt?Nt.parameter1:NaN;isNaN(lt)?lt=.2:lt<.15&&(lt=.15);var pt=ie*.2,vt=new go.PathFigure(0,.2*et,!0);ct.add(vt),vt.add(new go.PathSegment(go.PathSegment.Bezier,.2*nt,0,0,(.2-pt)*et,(.2-pt)*nt,0)),vt.add(new go.PathSegment(go.PathSegment.Line,.8*nt,0)),vt.add(new go.PathSegment(go.PathSegment.Bezier,nt,.2*et,(.8+pt)*nt,0,nt,(.2-pt)*et)),vt.add(new go.PathSegment(go.PathSegment.Line,nt,.8*et)),vt.add(new go.PathSegment(go.PathSegment.Bezier,.8*nt,et,nt,(.8+pt)*et,(.8+pt)*nt,et)),vt.add(new go.PathSegment(go.PathSegment.Line,.2*nt,et)),vt.add(new go.PathSegment(go.PathSegment.Bezier,0,.8*et,(.2-pt)*nt,et,0,(.8+pt)*et)),vt.add(new go.PathSegment(go.PathSegment.Line,0,.2*et));var xt=new go.PathFigure(0,lt*et,!1);return ct.add(xt),xt.add(new go.PathSegment(go.PathSegment.Line,nt,lt*et)),ct}),go.Shape.defineFigureGenerator("DividedProcess",function(Nt,nt,et){var ct=new go.Geometry,lt=Nt?Nt.parameter1:NaN;(isNaN(lt)||lt<.1)&&(lt=.1);var pt=new go.PathFigure(0,0,!0);ct.add(pt),pt.add(new go.PathSegment(go.PathSegment.Line,nt,0)),pt.add(new go.PathSegment(go.PathSegment.Line,nt,et)),pt.add(new go.PathSegment(go.PathSegment.Line,0,et).close());var vt=new go.PathFigure(0,lt*et,!1);return ct.add(vt),vt.add(new go.PathSegment(go.PathSegment.Line,nt,lt*et)),ct}),go.Shape.defineFigureGenerator("Document",function(Nt,nt,et){var ct=new go.Geometry;et=et/.8;var lt=new go.PathFigure(0,.7*et,!0);return ct.add(lt),lt.add(new go.PathSegment(go.PathSegment.Line,0,0)),lt.add(new go.PathSegment(go.PathSegment.Line,nt,0)),lt.add(new go.PathSegment(go.PathSegment.Line,nt,.7*et)),lt.add(new go.PathSegment(go.PathSegment.Bezier,0,.7*et,.5*nt,.4*et,.5*nt,et).close()),ct.spot1=go.Spot.TopLeft,ct.spot2=new go.Spot(1,.6),ct}),go.Shape.defineFigureGenerator("ExternalOrganization",function(Nt,nt,et){var ct=new go.Geometry,lt=Nt?Nt.parameter1:NaN;(isNaN(lt)||lt<.2)&&(lt=.2);var pt=new go.PathFigure(0,0,!0);ct.add(pt),pt.add(new go.PathSegment(go.PathSegment.Line,nt,0)),pt.add(new go.PathSegment(go.PathSegment.Line,nt,et)),pt.add(new go.PathSegment(go.PathSegment.Line,0,et).close());var vt=new go.PathFigure(lt*nt,0,!1);return ct.add(vt),vt.add(new go.PathSegment(go.PathSegment.Line,0,lt*et)),vt.add(new go.PathSegment(go.PathSegment.Move,nt,lt*et)),vt.add(new go.PathSegment(go.PathSegment.Line,(1-lt)*nt,0)),vt.add(new go.PathSegment(go.PathSegment.Move,0,(1-lt)*et)),vt.add(new go.PathSegment(go.PathSegment.Line,lt*nt,et)),vt.add(new go.PathSegment(go.PathSegment.Move,(1-lt)*nt,et)),vt.add(new go.PathSegment(go.PathSegment.Line,nt,(1-lt)*et)),ct}),go.Shape.defineFigureGenerator("ExternalProcess",function(Nt,nt,et){var ct=new go.Geometry,lt=new go.PathFigure(.5*nt,0,!0);ct.add(lt),lt.add(new go.PathSegment(go.PathSegment.Line,nt,.5*et)),lt.add(new go.PathSegment(go.PathSegment.Line,.5*nt,et)),lt.add(new go.PathSegment(go.PathSegment.Line,0,.5*et).close());var pt=new go.PathFigure(.1*nt,.4*et,!1);return ct.add(pt),pt.add(new go.PathSegment(go.PathSegment.Line,.1*nt,.6*et)),pt.add(new go.PathSegment(go.PathSegment.Move,.9*nt,.6*et)),pt.add(new go.PathSegment(go.PathSegment.Line,.9*nt,.4*et)),pt.add(new go.PathSegment(go.PathSegment.Move,.6*nt,.1*et)),pt.add(new go.PathSegment(go.PathSegment.Line,.4*nt,.1*et)),pt.add(new go.PathSegment(go.PathSegment.Move,.4*nt,.9*et)),pt.add(new go.PathSegment(go.PathSegment.Line,.6*nt,.9*et)),ct.spot1=new go.Spot(.25,.25),ct.spot2=new go.Spot(.75,.75),ct}),go.Shape.defineFigureGenerator("File",function(Nt,nt,et){var ct=new go.Geometry,lt=new go.PathFigure(0,0,!0);ct.add(lt),lt.add(new go.PathSegment(go.PathSegment.Line,.75*nt,0)),lt.add(new go.PathSegment(go.PathSegment.Line,nt,.25*et)),lt.add(new go.PathSegment(go.PathSegment.Line,nt,et)),lt.add(new go.PathSegment(go.PathSegment.Line,0,et).close());var pt=new go.PathFigure(.75*nt,0,!1);return ct.add(pt),pt.add(new go.PathSegment(go.PathSegment.Line,.75*nt,.25*et)),pt.add(new go.PathSegment(go.PathSegment.Line,nt,.25*et)),ct.spot1=new go.Spot(0,.25),ct.spot2=go.Spot.BottomRight,ct}),go.Shape.defineFigureGenerator("Interrupt",function(Nt,nt,et){var ct=new go.Geometry,lt=new go.PathFigure(nt,.5*et,!0);ct.add(lt),lt.add(new go.PathSegment(go.PathSegment.Line,0,et)),lt.add(new go.PathSegment(go.PathSegment.Line,0,0)),lt.add(new go.PathSegment(go.PathSegment.Line,nt,.5*et));var pt=new go.PathFigure(nt,.5*et,!1);ct.add(pt),pt.add(new go.PathSegment(go.PathSegment.Line,nt,et));var vt=new go.PathFigure(nt,.5*et,!1);return ct.add(vt),vt.add(new go.PathSegment(go.PathSegment.Line,nt,0)),ct.spot1=new go.Spot(0,.25),ct.spot2=new go.Spot(.5,.75),ct}),go.Shape.defineFigureGenerator("InternalStorage",function(Nt,nt,et){var ct=new go.Geometry,lt=Nt?Nt.parameter1:NaN,pt=Nt?Nt.parameter2:NaN;isNaN(lt)&&(lt=.1),isNaN(pt)&&(pt=.1);var vt=new go.PathFigure(0,0,!0);ct.add(vt),vt.add(new go.PathSegment(go.PathSegment.Line,nt,0)),vt.add(new go.PathSegment(go.PathSegment.Line,nt,et)),vt.add(new go.PathSegment(go.PathSegment.Line,0,et).close());var xt=new go.PathFigure(lt*nt,0,!1);return ct.add(xt),xt.add(new go.PathSegment(go.PathSegment.Line,lt*nt,et)),xt.add(new go.PathSegment(go.PathSegment.Move,0,pt*et)),xt.add(new go.PathSegment(go.PathSegment.Line,nt,pt*et)),ct}),go.Shape.defineFigureGenerator("Junction",function(Nt,nt,et){var ct=new go.Geometry,lt=1/Math.SQRT2,pt=(1-1/Math.SQRT2)/2,vt=ie*.5,xt=.5,Lt=new go.PathFigure(nt,xt*et,!0);ct.add(Lt),Lt.add(new go.PathSegment(go.PathSegment.Bezier,xt*nt,et,nt,(xt+vt)*et,(xt+vt)*nt,et)),Lt.add(new go.PathSegment(go.PathSegment.Bezier,0,xt*et,(xt-vt)*nt,et,0,(xt+vt)*et)),Lt.add(new go.PathSegment(go.PathSegment.Bezier,xt*nt,0,0,(xt-vt)*et,(xt-vt)*nt,0)),Lt.add(new go.PathSegment(go.PathSegment.Bezier,nt,xt*et,(xt+vt)*nt,0,nt,(xt-vt)*et));var Ot=new go.PathFigure((pt+lt)*nt,(pt+lt)*et,!1);return ct.add(Ot),Ot.add(new go.PathSegment(go.PathSegment.Line,pt*nt,pt*et)),Ot.add(new go.PathSegment(go.PathSegment.Move,pt*nt,(pt+lt)*et)),Ot.add(new go.PathSegment(go.PathSegment.Line,(pt+lt)*nt,pt*et)),ct}),go.Shape.defineFigureGenerator("LinedDocument",function(Nt,nt,et){var ct=new go.Geometry;et=et/.8;var lt=new go.PathFigure(0,.7*et,!0);ct.add(lt),lt.add(new go.PathSegment(go.PathSegment.Line,0,0)),lt.add(new go.PathSegment(go.PathSegment.Line,nt,0)),lt.add(new go.PathSegment(go.PathSegment.Line,nt,.7*et)),lt.add(new go.PathSegment(go.PathSegment.Bezier,0,.7*et,.5*nt,.4*et,.5*nt,et).close());var pt=new go.PathFigure(.1*nt,0,!1);return ct.add(pt),pt.add(new go.PathSegment(go.PathSegment.Line,.1*nt,.75*et)),ct.spot1=new go.Spot(.1,0),ct.spot2=new go.Spot(1,.6),ct}),go.Shape.defineFigureGenerator("LoopLimit",function(Nt,nt,et){var ct=new go.Geometry,lt=new go.PathFigure(0,et,!0);return ct.add(lt),lt.add(new go.PathSegment(go.PathSegment.Line,0,.25*et)),lt.add(new go.PathSegment(go.PathSegment.Line,.25*nt,0)),lt.add(new go.PathSegment(go.PathSegment.Line,.75*nt,0)),lt.add(new go.PathSegment(go.PathSegment.Line,nt,.25*et)),lt.add(new go.PathSegment(go.PathSegment.Line,nt,et).close()),ct.spot1=new go.Spot(0,.25),ct.spot2=go.Spot.BottomRight,ct}),go.Shape.defineFigureGenerator("MagneticTape",function(Nt,nt,et){var ct=new go.Geometry,lt=ie*.5,pt=.5,vt=new go.PathFigure(.5*nt,et,!0);return ct.add(vt),vt.add(new go.PathSegment(go.PathSegment.Bezier,0,pt*et,(pt-lt)*nt,et,0,(pt+lt)*et)),vt.add(new go.PathSegment(go.PathSegment.Bezier,pt*nt,0,0,(pt-lt)*et,(pt-lt)*nt,0)),vt.add(new go.PathSegment(go.PathSegment.Bezier,nt,pt*et,(pt+lt)*nt,0,nt,(pt-lt)*et)),vt.add(new go.PathSegment(go.PathSegment.Bezier,(pt+.1)*nt,.9*et,nt,(pt+lt)*et,(pt+lt)*nt,.9*et)),vt.add(new go.PathSegment(go.PathSegment.Line,nt,.9*et)),vt.add(new go.PathSegment(go.PathSegment.Line,nt,et)),vt.add(new go.PathSegment(go.PathSegment.Line,.5*nt,et)),ct.spot1=new go.Spot(.15,.15),ct.spot2=new go.Spot(.85,.8),ct}),go.Shape.defineFigureGenerator("ManualInput",function(Nt,nt,et){var ct=new go.Geometry,lt=new go.PathFigure(nt,0,!0);return ct.add(lt),lt.add(new go.PathSegment(go.PathSegment.Line,nt,et)),lt.add(new go.PathSegment(go.PathSegment.Line,0,et)),lt.add(new go.PathSegment(go.PathSegment.Line,0,.25*et).close()),ct.spot1=new go.Spot(0,.25),ct.spot2=go.Spot.BottomRight,ct}),go.Shape.defineFigureGenerator("MessageFromUser",function(Nt,nt,et){var ct=new go.Geometry,lt=Nt?Nt.parameter1:NaN;isNaN(lt)&&(lt=.7);var pt=new go.PathFigure(0,0,!0);return ct.add(pt),pt.add(new go.PathSegment(go.PathSegment.Line,nt,0)),pt.add(new go.PathSegment(go.PathSegment.Line,lt*nt,.5*et)),pt.add(new go.PathSegment(go.PathSegment.Line,nt,et)),pt.add(new go.PathSegment(go.PathSegment.Line,0,et).close()),ct.spot1=go.Spot.TopLeft,ct}),go.Shape.defineFigureGenerator("MicroformProcessing",function(Nt,nt,et){var ct=new go.Geometry,lt=Nt?Nt.parameter1:NaN;isNaN(lt)&&(lt=.25);var pt=new go.PathFigure(0,0,!0);return ct.add(pt),pt.add(new go.PathSegment(go.PathSegment.Line,.5*nt,lt*et)),pt.add(new go.PathSegment(go.PathSegment.Line,nt,0)),pt.add(new go.PathSegment(go.PathSegment.Line,nt,et)),pt.add(new go.PathSegment(go.PathSegment.Line,.5*nt,(1-lt)*et)),pt.add(new go.PathSegment(go.PathSegment.Line,0,et).close()),ct}),go.Shape.defineFigureGenerator("MicroformRecording",function(Nt,nt,et){var ct=new go.Geometry,lt=new go.PathFigure(0,0,!0);return ct.add(lt),lt.add(new go.PathSegment(go.PathSegment.Line,.75*nt,.25*et)),lt.add(new go.PathSegment(go.PathSegment.Line,nt,.15*et)),lt.add(new go.PathSegment(go.PathSegment.Line,nt,.85*et)),lt.add(new go.PathSegment(go.PathSegment.Line,.75*nt,.75*et)),lt.add(new go.PathSegment(go.PathSegment.Line,0,et).close()),ct.spot1=new go.Spot(0,.25),ct.spot2=new go.Spot(1,.75),ct}),go.Shape.defineFigureGenerator("MultiDocument",function(Nt,nt,et){var ct=new go.Geometry;et=et/.8;var lt=new go.PathFigure(nt,0,!0);ct.add(lt),lt.add(new go.PathSegment(go.PathSegment.Line,nt,.5*et)),lt.add(new go.PathSegment(go.PathSegment.Bezier,.9*nt,.44*et,.96*nt,.47*et,.93*nt,.45*et)),lt.add(new go.PathSegment(go.PathSegment.Line,.9*nt,.6*et)),lt.add(new go.PathSegment(go.PathSegment.Bezier,.8*nt,.54*et,.86*nt,.57*et,.83*nt,.55*et)),lt.add(new go.PathSegment(go.PathSegment.Line,.8*nt,.7*et)),lt.add(new go.PathSegment(go.PathSegment.Bezier,0,.7*et,.4*nt,.4*et,.4*nt,et)),lt.add(new go.PathSegment(go.PathSegment.Line,0,.2*et)),lt.add(new go.PathSegment(go.PathSegment.Line,.1*nt,.2*et)),lt.add(new go.PathSegment(go.PathSegment.Line,.1*nt,.1*et)),lt.add(new go.PathSegment(go.PathSegment.Line,.2*nt,.1*et)),lt.add(new go.PathSegment(go.PathSegment.Line,.2*nt,0).close());var pt=new go.PathFigure(.1*nt,.2*et,!1);return ct.add(pt),pt.add(new go.PathSegment(go.PathSegment.Line,.8*nt,.2*et)),pt.add(new go.PathSegment(go.PathSegment.Line,.8*nt,.54*et)),pt.add(new go.PathSegment(go.PathSegment.Move,.2*nt,.1*et)),pt.add(new go.PathSegment(go.PathSegment.Line,.9*nt,.1*et)),pt.add(new go.PathSegment(go.PathSegment.Line,.9*nt,.44*et)),ct.spot1=new go.Spot(0,.25),ct.spot2=new go.Spot(.8,.77),ct}),go.Shape.defineFigureGenerator("MultiProcess",function(Nt,nt,et){var ct=new go.Geometry,lt=new go.PathFigure(.1*nt,.1*et,!0);ct.add(lt),lt.add(new go.PathSegment(go.PathSegment.Line,.2*nt,.1*et)),lt.add(new go.PathSegment(go.PathSegment.Line,.2*nt,0)),lt.add(new go.PathSegment(go.PathSegment.Line,nt,0)),lt.add(new go.PathSegment(go.PathSegment.Line,nt,.8*et)),lt.add(new go.PathSegment(go.PathSegment.Line,.9*nt,.8*et)),lt.add(new go.PathSegment(go.PathSegment.Line,.9*nt,.9*et)),lt.add(new go.PathSegment(go.PathSegment.Line,.8*nt,.9*et)),lt.add(new go.PathSegment(go.PathSegment.Line,.8*nt,et)),lt.add(new go.PathSegment(go.PathSegment.Line,0,et)),lt.add(new go.PathSegment(go.PathSegment.Line,0,.2*et)),lt.add(new go.PathSegment(go.PathSegment.Line,.1*nt,.2*et).close());var pt=new go.PathFigure(.2*nt,.1*et,!1);return ct.add(pt),pt.add(new go.PathSegment(go.PathSegment.Line,.9*nt,.1*et)),pt.add(new go.PathSegment(go.PathSegment.Line,.9*nt,.8*et)),pt.add(new go.PathSegment(go.PathSegment.Move,.1*nt,.2*et)),pt.add(new go.PathSegment(go.PathSegment.Line,.8*nt,.2*et)),pt.add(new go.PathSegment(go.PathSegment.Line,.8*nt,.9*et)),ct.spot1=new go.Spot(0,.2),ct.spot2=new go.Spot(.8,1),ct}),go.Shape.defineFigureGenerator("OfflineStorage",function(Nt,nt,et){var ct=new go.Geometry,lt=Nt?Nt.parameter1:NaN;isNaN(lt)&&(lt=.1);var pt=1-lt,vt=new go.PathFigure(0,0,!0);ct.add(vt),vt.add(new go.PathSegment(go.PathSegment.Line,nt,0)),vt.add(new go.PathSegment(go.PathSegment.Line,.5*nt,et).close());var xt=new go.PathFigure(.5*lt*nt,lt*et,!1);return ct.add(xt),xt.add(new go.PathSegment(go.PathSegment.Line,(1-.5*lt)*nt,lt*et)),ct}),go.Shape.defineFigureGenerator("OffPageConnector",function(Nt,nt,et){var ct=new go.Geometry,lt=new go.PathFigure(0,0,!0);return ct.add(lt),lt.add(new go.PathSegment(go.PathSegment.Line,.75*nt,0)),lt.add(new go.PathSegment(go.PathSegment.Line,nt,.5*et)),lt.add(new go.PathSegment(go.PathSegment.Line,.75*nt,et)),lt.add(new go.PathSegment(go.PathSegment.Line,0,et).close()),ct.spot1=go.Spot.TopLeft,ct.spot2=new go.Spot(.75,1),ct}),go.Shape.defineFigureGenerator("Or",function(Nt,nt,et){var ct=new go.Geometry,lt=ie*.5,pt=.5,vt=new go.PathFigure(nt,pt*et,!0);ct.add(vt),vt.add(new go.PathSegment(go.PathSegment.Bezier,pt*nt,et,nt,(pt+lt)*et,(pt+lt)*nt,et)),vt.add(new go.PathSegment(go.PathSegment.Bezier,0,pt*et,(pt-lt)*nt,et,0,(pt+lt)*et)),vt.add(new go.PathSegment(go.PathSegment.Bezier,pt*nt,0,0,(pt-lt)*et,(pt-lt)*nt,0)),vt.add(new go.PathSegment(go.PathSegment.Bezier,nt,pt*et,(pt+lt)*nt,0,nt,(pt-lt)*et));var xt=new go.PathFigure(nt,.5*et,!1);return ct.add(xt),xt.add(new go.PathSegment(go.PathSegment.Line,0,.5*et)),xt.add(new go.PathSegment(go.PathSegment.Move,.5*nt,et)),xt.add(new go.PathSegment(go.PathSegment.Line,.5*nt,0)),ct}),go.Shape.defineFigureGenerator("PaperTape",function(Nt,nt,et){var ct=new go.Geometry;et=et/.8;var lt=new go.PathFigure(0,.7*et,!0);return ct.add(lt),lt.add(new go.PathSegment(go.PathSegment.Line,0,.3*et)),lt.add(new go.PathSegment(go.PathSegment.Bezier,nt,.3*et,.5*nt,.6*et,.5*nt,0)),lt.add(new go.PathSegment(go.PathSegment.Line,nt,.7*et)),lt.add(new go.PathSegment(go.PathSegment.Bezier,0,.7*et,.5*nt,.4*et,.5*nt,et).close()),ct.spot1=new go.Spot(0,.49),ct.spot2=new go.Spot(1,.75),ct}),go.Shape.defineFigureGenerator("PrimitiveFromCall",function(Nt,nt,et){var ct=new go.Geometry,lt=Nt?Nt.parameter1:NaN,pt=Nt?Nt.parameter2:NaN;isNaN(lt)&&(lt=.1),isNaN(pt)&&(pt=.3);var vt=new go.PathFigure(0,0,!0);return ct.add(vt),vt.add(new go.PathSegment(go.PathSegment.Line,nt,0)),vt.add(new go.PathSegment(go.PathSegment.Line,(1-pt)*nt,.5*et)),vt.add(new go.PathSegment(go.PathSegment.Line,nt,et)),vt.add(new go.PathSegment(go.PathSegment.Line,0,et).close()),ct}),go.Shape.defineFigureGenerator("PrimitiveToCall",function(Nt,nt,et){var ct=new go.Geometry,lt=Nt?Nt.parameter1:NaN,pt=Nt?Nt.parameter2:NaN;isNaN(lt)&&(lt=.1),isNaN(pt)&&(pt=.3);var vt=new go.PathFigure(0,0,!0);return ct.add(vt),vt.add(new go.PathSegment(go.PathSegment.Line,(1-pt)*nt,0)),vt.add(new go.PathSegment(go.PathSegment.Line,nt,.5*et)),vt.add(new go.PathSegment(go.PathSegment.Line,(1-pt)*nt,et)),vt.add(new go.PathSegment(go.PathSegment.Line,0,et).close()),ct}),go.Shape.defineFigureGenerator("Procedure",function(Nt,nt,et){var ct=new go.Geometry,lt=Nt?Nt.parameter1:NaN;isNaN(lt)&&(lt=.1);var pt=new go.PathFigure(0,0,!0);ct.add(pt),pt.add(new go.PathSegment(go.PathSegment.Line,nt,0)),pt.add(new go.PathSegment(go.PathSegment.Line,nt,et)),pt.add(new go.PathSegment(go.PathSegment.Line,0,et).close());var vt=new go.PathFigure((1-lt)*nt,0,!1);return ct.add(vt),vt.add(new go.PathSegment(go.PathSegment.Line,(1-lt)*nt,et)),vt.add(new go.PathSegment(go.PathSegment.Move,lt*nt,0)),vt.add(new go.PathSegment(go.PathSegment.Line,lt*nt,et)),ct}),go.Shape.defineFigureGenerator("Process",function(Nt,nt,et){var ct=new go.Geometry,lt=Nt?Nt.parameter1:NaN;isNaN(lt)&&(lt=.1);var pt=new go.PathFigure(0,0,!0);ct.add(pt),pt.add(new go.PathSegment(go.PathSegment.Line,nt,0)),pt.add(new go.PathSegment(go.PathSegment.Line,nt,et)),pt.add(new go.PathSegment(go.PathSegment.Line,0,et).close());var vt=new go.PathFigure(lt*nt,0,!1);return ct.add(vt),vt.add(new go.PathSegment(go.PathSegment.Line,lt*nt,et)),ct.spot2=go.Spot.BottomRight,ct}),go.Shape.defineFigureGenerator("Sort",function(Nt,nt,et){var ct=new go.Geometry,lt=new go.PathFigure(.5*nt,0,!0);ct.add(lt),lt.add(new go.PathSegment(go.PathSegment.Line,nt,.5*et)),lt.add(new go.PathSegment(go.PathSegment.Line,.5*nt,et)),lt.add(new go.PathSegment(go.PathSegment.Line,0,.5*et).close());var pt=new go.PathFigure(0,.5*et,!1);return ct.add(pt),pt.add(new go.PathSegment(go.PathSegment.Line,nt,.5*et)),ct.spot1=new go.Spot(.25,.25),ct.spot2=new go.Spot(.75,.5),ct}),go.Shape.defineFigureGenerator("Start",function(Nt,nt,et){var ct=new go.Geometry,lt=Nt?Nt.parameter1:NaN;isNaN(lt)&&(lt=.25);var pt=new go.PathFigure(lt*nt,0,!0);ct.add(pt),pt.add(new go.PathSegment(go.PathSegment.Arc,270,180,.75*nt,.5*et,.25*nt,.5*et)),pt.add(new go.PathSegment(go.PathSegment.Arc,90,180,.25*nt,.5*et,.25*nt,.5*et));var vt=new go.PathFigure(lt*nt,0,!1);return ct.add(vt),vt.add(new go.PathSegment(go.PathSegment.Line,lt*nt,et)),vt.add(new go.PathSegment(go.PathSegment.Move,(1-lt)*nt,0)),vt.add(new go.PathSegment(go.PathSegment.Line,(1-lt)*nt,et)),ct.spot1=new go.Spot(lt,0),ct.spot2=new go.Spot(1-lt,1),ct}),go.Shape.defineFigureGenerator("Terminator",function(Nt,nt,et){var ct=new go.Geometry,lt=new go.PathFigure(.25*nt,0,!0);return ct.add(lt),lt.add(new go.PathSegment(go.PathSegment.Arc,270,180,.75*nt,.5*et,.25*nt,.5*et)),lt.add(new go.PathSegment(go.PathSegment.Arc,90,180,.25*nt,.5*et,.25*nt,.5*et)),ct.spot1=new go.Spot(.23,0),ct.spot2=new go.Spot(.77,1),ct}),go.Shape.defineFigureGenerator("TransmittalTape",function(Nt,nt,et){var ct=new go.Geometry,lt=Nt?Nt.parameter1:NaN;isNaN(lt)&&(lt=.1);var pt=new go.PathFigure(0,0,!0);return ct.add(pt),pt.add(new go.PathSegment(go.PathSegment.Line,nt,0)),pt.add(new go.PathSegment(go.PathSegment.Line,nt,et)),pt.add(new go.PathSegment(go.PathSegment.Line,.75*nt,(1-lt)*et)),pt.add(new go.PathSegment(go.PathSegment.Line,0,(1-lt)*et).close()),ct.spot1=go.Spot.TopLeft,ct}),go.Shape.defineFigureGenerator("AndGate",function(Nt,nt,et){var ct=new go.Geometry,lt=ie*.5,pt=new go.PathFigure(0,0,!0);return ct.add(pt),pt.add(new go.PathSegment(go.PathSegment.Line,.5*nt,0)),pt.add(new go.PathSegment(go.PathSegment.Bezier,nt,.5*et,(.5+lt)*nt,0,nt,(.5-lt)*et)),pt.add(new go.PathSegment(go.PathSegment.Bezier,.5*nt,et,nt,(.5+lt)*et,(.5+lt)*nt,et)),pt.add(new go.PathSegment(go.PathSegment.Line,0,et).close()),ct.spot1=go.Spot.TopLeft,ct.spot2=new go.Spot(.55,1),ct}),go.Shape.defineFigureGenerator("Buffer",function(Nt,nt,et){var ct=new go.Geometry,lt=new go.PathFigure(0,0,!0);return ct.add(lt),lt.add(new go.PathSegment(go.PathSegment.Line,nt,.5*et)),lt.add(new go.PathSegment(go.PathSegment.Line,0,et).close()),ct.spot1=new go.Spot(0,.25),ct.spot2=new go.Spot(.5,.75),ct}),go.Shape.defineFigureGenerator("Clock",function(Nt,nt,et){var ct=new go.Geometry,lt=ie*.5,pt=.5,vt=new go.PathFigure(nt,pt*et,!0);ct.add(vt),vt.add(new go.PathSegment(go.PathSegment.Bezier,pt*nt,et,nt,(pt+lt)*et,(pt+lt)*nt,et)),vt.add(new go.PathSegment(go.PathSegment.Bezier,0,pt*et,(pt-lt)*nt,et,0,(pt+lt)*et)),vt.add(new go.PathSegment(go.PathSegment.Bezier,pt*nt,0,0,(pt-lt)*et,(pt-lt)*nt,0)),vt.add(new go.PathSegment(go.PathSegment.Bezier,nt,pt*et,(pt+lt)*nt,0,nt,(pt-lt)*et));var xt=new go.PathFigure(nt,pt*et,!1);ct.add(xt),xt.add(new go.PathSegment(go.PathSegment.Line,nt,pt*et));var Lt=new go.PathFigure(.8*nt,.75*et,!1);return ct.add(Lt),Lt.add(new go.PathSegment(go.PathSegment.Line,.8*nt,.25*et)),Lt.add(new go.PathSegment(go.PathSegment.Line,.6*nt,.25*et)),Lt.add(new go.PathSegment(go.PathSegment.Line,.6*nt,.75*et)),Lt.add(new go.PathSegment(go.PathSegment.Line,.4*nt,.75*et)),Lt.add(new go.PathSegment(go.PathSegment.Line,.4*nt,.25*et)),Lt.add(new go.PathSegment(go.PathSegment.Line,.2*nt,.25*et)),Lt.add(new go.PathSegment(go.PathSegment.Line,.2*nt,.75*et)),ct}),go.Shape.defineFigureGenerator("Ground",function(Nt,nt,et){var ct=new go.Geometry,lt=new go.PathFigure(.5*nt,0,!1);return ct.add(lt),lt.add(new go.PathSegment(go.PathSegment.Line,.5*nt,.4*et)),lt.add(new go.PathSegment(go.PathSegment.Move,.2*nt,.6*et)),lt.add(new go.PathSegment(go.PathSegment.Line,.8*nt,.6*et)),lt.add(new go.PathSegment(go.PathSegment.Move,.3*nt,.8*et)),lt.add(new go.PathSegment(go.PathSegment.Line,.7*nt,.8*et)),lt.add(new go.PathSegment(go.PathSegment.Move,.4*nt,et)),lt.add(new go.PathSegment(go.PathSegment.Line,.6*nt,et)),ct}),go.Shape.defineFigureGenerator("Inverter",function(Nt,nt,et){var ct=new go.Geometry,lt=ie*.1,pt=.1,vt=.9,xt=.5,Lt=new go.PathFigure(.8*nt,.5*et,!0);ct.add(Lt),Lt.add(new go.PathSegment(go.PathSegment.Line,0,et)),Lt.add(new go.PathSegment(go.PathSegment.Line,0,0)),Lt.add(new go.PathSegment(go.PathSegment.Line,.8*nt,.5*et));var Ot=new go.PathFigure((vt+pt)*nt,xt*et,!0);return ct.add(Ot),Ot.add(new go.PathSegment(go.PathSegment.Bezier,vt*nt,(xt+pt)*et,(vt+pt)*nt,(xt+lt)*et,(vt+lt)*nt,(xt+pt)*et)),Ot.add(new go.PathSegment(go.PathSegment.Bezier,(vt-pt)*nt,xt*et,(vt-lt)*nt,(xt+pt)*et,(vt-pt)*nt,(xt+lt)*et)),Ot.add(new go.PathSegment(go.PathSegment.Bezier,vt*nt,(xt-pt)*et,(vt-pt)*nt,(xt-lt)*et,(vt-lt)*nt,(xt-pt)*et)),Ot.add(new go.PathSegment(go.PathSegment.Bezier,(vt+pt)*nt,xt*et,(vt+lt)*nt,(xt-pt)*et,(vt+pt)*nt,(xt-lt)*et)),ct.spot1=new go.Spot(0,.25),ct.spot2=new go.Spot(.4,.75),ct}),go.Shape.defineFigureGenerator("NandGate",function(Nt,nt,et){var ct=new go.Geometry,lt=ie*.5,pt=ie*.4,vt=ie*.1,xt=.1,Lt=.9,Ot=.5,Ht=new go.PathFigure(.8*nt,.5*et,!0);ct.add(Ht),Ht.add(new go.PathSegment(go.PathSegment.Bezier,.4*nt,et,.8*nt,(.5+pt)*et,(.4+lt)*nt,et)),Ht.add(new go.PathSegment(go.PathSegment.Line,0,et)),Ht.add(new go.PathSegment(go.PathSegment.Line,0,0)),Ht.add(new go.PathSegment(go.PathSegment.Line,.4*nt,0)),Ht.add(new go.PathSegment(go.PathSegment.Bezier,.8*nt,.5*et,(.4+lt)*nt,0,.8*nt,(.5-pt)*et));var te=new go.PathFigure((Lt+xt)*nt,Ot*et,!0);return ct.add(te),te.add(new go.PathSegment(go.PathSegment.Bezier,Lt*nt,(Ot+xt)*et,(Lt+xt)*nt,(Ot+vt)*et,(Lt+vt)*nt,(Ot+xt)*et)),te.add(new go.PathSegment(go.PathSegment.Bezier,(Lt-xt)*nt,Ot*et,(Lt-vt)*nt,(Ot+xt)*et,(Lt-xt)*nt,(Ot+vt)*et)),te.add(new go.PathSegment(go.PathSegment.Bezier,Lt*nt,(Ot-xt)*et,(Lt-xt)*nt,(Ot-vt)*et,(Lt-vt)*nt,(Ot-xt)*et)),te.add(new go.PathSegment(go.PathSegment.Bezier,(Lt+xt)*nt,Ot*et,(Lt+vt)*nt,(Ot-xt)*et,(Lt+xt)*nt,(Ot-vt)*et)),ct.spot1=new go.Spot(0,.05),ct.spot2=new go.Spot(.55,.95),ct}),go.Shape.defineFigureGenerator("NorGate",function(Nt,nt,et){var ct=new go.Geometry,lt=.5,pt=ie*lt,vt=0,xt=.5,Lt=new go.PathFigure(.8*nt,.5*et,!0);ct.add(Lt),Lt.add(new go.PathSegment(go.PathSegment.Bezier,0,et,.7*nt,(xt+pt)*et,(vt+pt)*nt,(xt+lt)*et)),Lt.add(new go.PathSegment(go.PathSegment.Bezier,0,0,.25*nt,.75*et,.25*nt,.25*et)),Lt.add(new go.PathSegment(go.PathSegment.Bezier,.8*nt,.5*et,(vt+pt)*nt,(xt-lt)*et,.7*nt,(xt-pt)*et)),lt=.1,pt=ie*.1,vt=.9,xt=.5;var Ot=new go.PathFigure((vt-lt)*nt,xt*et,!0);return ct.add(Ot),Ot.add(new go.PathSegment(go.PathSegment.Bezier,vt*nt,(xt-lt)*et,(vt-lt)*nt,(xt-pt)*et,(vt-pt)*nt,(xt-lt)*et)),Ot.add(new go.PathSegment(go.PathSegment.Bezier,(vt+lt)*nt,xt*et,(vt+pt)*nt,(xt-lt)*et,(vt+lt)*nt,(xt-pt)*et)),Ot.add(new go.PathSegment(go.PathSegment.Bezier,vt*nt,(xt+lt)*et,(vt+lt)*nt,(xt+pt)*et,(vt+pt)*nt,(xt+lt)*et)),Ot.add(new go.PathSegment(go.PathSegment.Bezier,(vt-lt)*nt,xt*et,(vt-pt)*nt,(xt+lt)*et,(vt-lt)*nt,(xt+pt)*et)),ct.spot1=new go.Spot(.2,.25),ct.spot2=new go.Spot(.6,.75),ct}),go.Shape.defineFigureGenerator("OrGate",function(Nt,nt,et){var ct=new go.Geometry,lt=.5,pt=ie*lt,vt=0,xt=.5,Lt=new go.PathFigure(0,0,!0);return ct.add(Lt),Lt.add(new go.PathSegment(go.PathSegment.Bezier,nt,.5*et,(vt+pt+pt)*nt,(xt-lt)*et,.8*nt,(xt-pt)*et)),Lt.add(new go.PathSegment(go.PathSegment.Bezier,0,et,.8*nt,(xt+pt)*et,(vt+pt+pt)*nt,(xt+lt)*et)),Lt.add(new go.PathSegment(go.PathSegment.Bezier,0,0,.25*nt,.75*et,.25*nt,.25*et).close()),ct.spot1=new go.Spot(.2,.25),ct.spot2=new go.Spot(.75,.75),ct}),go.Shape.defineFigureGenerator("XnorGate",function(Nt,nt,et){var ct=new go.Geometry,lt=.5,pt=ie*lt,vt=.2,xt=.5,Lt=new go.PathFigure(.1*nt,0,!1);ct.add(Lt),Lt.add(new go.PathSegment(go.PathSegment.Bezier,.1*nt,et,.35*nt,.25*et,.35*nt,.75*et));var Ot=new go.PathFigure(.8*nt,.5*et,!0);ct.add(Ot),Ot.add(new go.PathSegment(go.PathSegment.Bezier,.2*nt,et,.7*nt,(xt+pt)*et,(vt+pt)*nt,(xt+lt)*et)),Ot.add(new go.PathSegment(go.PathSegment.Bezier,.2*nt,0,.45*nt,.75*et,.45*nt,.25*et)),Ot.add(new go.PathSegment(go.PathSegment.Bezier,.8*nt,.5*et,(vt+pt)*nt,(xt-lt)*et,.7*nt,(xt-pt)*et)),lt=.1,pt=ie*.1,vt=.9,xt=.5;var Ht=new go.PathFigure((vt-lt)*nt,xt*et,!0);return ct.add(Ht),Ht.add(new go.PathSegment(go.PathSegment.Bezier,vt*nt,(xt-lt)*et,(vt-lt)*nt,(xt-pt)*et,(vt-pt)*nt,(xt-lt)*et)),Ht.add(new go.PathSegment(go.PathSegment.Bezier,(vt+lt)*nt,xt*et,(vt+pt)*nt,(xt-lt)*et,(vt+lt)*nt,(xt-pt)*et)),Ht.add(new go.PathSegment(go.PathSegment.Bezier,vt*nt,(xt+lt)*et,(vt+lt)*nt,(xt+pt)*et,(vt+pt)*nt,(xt+lt)*et)),Ht.add(new go.PathSegment(go.PathSegment.Bezier,(vt-lt)*nt,xt*et,(vt-pt)*nt,(xt+lt)*et,(vt-lt)*nt,(xt+pt)*et)),ct.spot1=new go.Spot(.4,.25),ct.spot2=new go.Spot(.65,.75),ct}),go.Shape.defineFigureGenerator("XorGate",function(Nt,nt,et){var ct=new go.Geometry,lt=.5,pt=ie*lt,vt=.2,xt=.5,Lt=new go.PathFigure(.1*nt,0,!1);ct.add(Lt),Lt.add(new go.PathSegment(go.PathSegment.Bezier,.1*nt,et,.35*nt,.25*et,.35*nt,.75*et));var Ot=new go.PathFigure(.2*nt,0,!0);return ct.add(Ot),Ot.add(new go.PathSegment(go.PathSegment.Bezier,nt,.5*et,(vt+pt)*nt,(xt-lt)*et,.9*nt,(xt-pt)*et)),Ot.add(new go.PathSegment(go.PathSegment.Bezier,.2*nt,et,.9*nt,(xt+pt)*et,(vt+pt)*nt,(xt+lt)*et)),Ot.add(new go.PathSegment(go.PathSegment.Bezier,.2*nt,0,.45*nt,.75*et,.45*nt,.25*et).close()),ct.spot1=new go.Spot(.4,.25),ct.spot2=new go.Spot(.8,.75),ct}),go.Shape.defineFigureGenerator("Capacitor",function(Nt,nt,et){var ct=new go.Geometry,lt=new go.PathFigure(0,0,!1);return ct.add(lt),lt.add(new go.PathSegment(go.PathSegment.Line,0,et)),lt.add(new go.PathSegment(go.PathSegment.Move,nt,0)),lt.add(new go.PathSegment(go.PathSegment.Line,nt,et)),ct}),go.Shape.defineFigureGenerator("Resistor",function(Nt,nt,et){var ct=new go.Geometry,lt=new go.PathFigure(0,.5*et,!1);return ct.add(lt),lt.add(new go.PathSegment(go.PathSegment.Line,.1*nt,0)),lt.add(new go.PathSegment(go.PathSegment.Line,.2*nt,et)),lt.add(new go.PathSegment(go.PathSegment.Line,.3*nt,0)),lt.add(new go.PathSegment(go.PathSegment.Line,.4*nt,et)),lt.add(new go.PathSegment(go.PathSegment.Line,.5*nt,0)),lt.add(new go.PathSegment(go.PathSegment.Line,.6*nt,et)),lt.add(new go.PathSegment(go.PathSegment.Line,.7*nt,.5*et)),ct}),go.Shape.defineFigureGenerator("Inductor",function(Nt,nt,et){var ct=new go.Geometry,lt=ie*.1,pt=.1,vt=.1,xt=.5,Lt=new go.PathFigure((vt-lt*.5)*nt,et,!1);return ct.add(Lt),Lt.add(new go.PathSegment(go.PathSegment.Bezier,(vt+pt)*nt,0,(vt-lt)*nt,et,(vt-pt)*nt,0)),vt=.3,Lt.add(new go.PathSegment(go.PathSegment.Bezier,vt*nt,et,(vt+pt)*nt,0,(vt+lt)*nt,et)),Lt.add(new go.PathSegment(go.PathSegment.Bezier,(vt+pt)*nt,0,(vt-lt)*nt,et,(vt-pt)*nt,0)),vt=.5,Lt.add(new go.PathSegment(go.PathSegment.Bezier,vt*nt,et,(vt+pt)*nt,0,(vt+lt)*nt,et)),Lt.add(new go.PathSegment(go.PathSegment.Bezier,(vt+pt)*nt,0,(vt-lt)*nt,et,(vt-pt)*nt,0)),vt=.7,Lt.add(new go.PathSegment(go.PathSegment.Bezier,vt*nt,et,(vt+pt)*nt,0,(vt+lt)*nt,et)),Lt.add(new go.PathSegment(go.PathSegment.Bezier,(vt+pt)*nt,0,(vt-lt)*nt,et,(vt-pt)*nt,0)),vt=.9,Lt.add(new go.PathSegment(go.PathSegment.Bezier,(vt+lt*.5)*nt,et,(vt+pt)*nt,0,(vt+lt)*nt,et)),ct}),go.Shape.defineFigureGenerator("ACvoltageSource",function(Nt,nt,et){var ct=new go.Geometry,lt=ie*.5,pt=.5,vt=.5,xt=.5,Lt=new go.PathFigure((vt-pt)*nt,xt*et,!1);return ct.add(Lt),Lt.add(new go.PathSegment(go.PathSegment.Bezier,vt*nt,(xt-pt)*et,(vt-pt)*nt,(xt-lt)*et,(vt-lt)*nt,(xt-pt)*et)),Lt.add(new go.PathSegment(go.PathSegment.Bezier,(vt+pt)*nt,xt*et,(vt+lt)*nt,(xt-pt)*et,(vt+pt)*nt,(xt-lt)*et)),Lt.add(new go.PathSegment(go.PathSegment.Bezier,vt*nt,(xt+pt)*et,(vt+pt)*nt,(xt+lt)*et,(vt+lt)*nt,(xt+pt)*et)),Lt.add(new go.PathSegment(go.PathSegment.Bezier,(vt-pt)*nt,xt*et,(vt-lt)*nt,(xt+pt)*et,(vt-pt)*nt,(xt+lt)*et)),Lt.add(new go.PathSegment(go.PathSegment.Move,(vt-pt+.1)*nt,xt*et)),Lt.add(new go.PathSegment(go.PathSegment.Bezier,(vt+pt-.1)*nt,xt*et,vt*nt,(xt-pt)*et,vt*nt,(xt+pt)*et)),ct}),go.Shape.defineFigureGenerator("DCvoltageSource",function(Nt,nt,et){var ct=new go.Geometry,lt=new go.PathFigure(0,.75*et,!1);return ct.add(lt),lt.add(new go.PathSegment(go.PathSegment.Line,0,.25*et)),lt.add(new go.PathSegment(go.PathSegment.Move,nt,0)),lt.add(new go.PathSegment(go.PathSegment.Line,nt,et)),ct}),go.Shape.defineFigureGenerator("Diode",function(Nt,nt,et){var ct=new go.Geometry,lt=new go.PathFigure(nt,0,!1);return ct.add(lt),lt.add(new go.PathSegment(go.PathSegment.Line,nt,.5*et)),lt.add(new go.PathSegment(go.PathSegment.Line,0,et)),lt.add(new go.PathSegment(go.PathSegment.Line,0,0)),lt.add(new go.PathSegment(go.PathSegment.Line,nt,.5*et)),lt.add(new go.PathSegment(go.PathSegment.Line,nt,et)),ct.spot1=new go.Spot(0,.25),ct.spot2=new go.Spot(.5,.75),ct}),go.Shape.defineFigureGenerator("Wifi",function(Nt,nt,et){var ct=new go.Geometry,lt=nt,pt=et;nt=nt*.38,et=et*.6;var vt=ie*.8,xt=.8,Lt=0,Ot=.5,Ht=(lt-nt)/2,te=(pt-et)/2,_t=new go.PathFigure(Lt*nt+Ht,(Ot+xt)*et+te,!0);ct.add(_t),_t.add(new go.PathSegment(go.PathSegment.Bezier,(Lt-xt)*nt+Ht,Ot*et+te,(Lt-vt)*nt+Ht,(Ot+xt)*et+te,(Lt-xt)*nt+Ht,(Ot+vt)*et+te)),_t.add(new go.PathSegment(go.PathSegment.Bezier,Lt*nt+Ht,(Ot-xt)*et+te,(Lt-xt)*nt+Ht,(Ot-vt)*et+te,(Lt-vt)*nt+Ht,(Ot-xt)*et+te)),_t.add(new go.PathSegment(go.PathSegment.Bezier,(Lt-xt+vt*.5)*nt+Ht,Ot*et+te,Lt*nt+Ht,(Ot-xt)*et+te,(Lt-xt+vt*.5)*nt+Ht,(Ot-vt)*et+te)),_t.add(new go.PathSegment(go.PathSegment.Bezier,Lt*nt+Ht,(Ot+xt)*et+te,(Lt-xt+vt*.5)*nt+Ht,(Ot+vt)*et+te,Lt*nt+Ht,(Ot+xt)*et+te).close()),vt=ie*.4,xt=.4,Lt=.2,Ot=.5;var Xt=new go.PathFigure(Lt*nt+Ht,(Ot+xt)*et+te,!0);ct.add(Xt),Xt.add(new go.PathSegment(go.PathSegment.Bezier,(Lt-xt)*nt+Ht,Ot*et+te,(Lt-vt)*nt+Ht,(Ot+xt)*et+te,(Lt-xt)*nt+Ht,(Ot+vt)*et+te)),Xt.add(new go.PathSegment(go.PathSegment.Bezier,Lt*nt+Ht,(Ot-xt)*et+te,(Lt-xt)*nt+Ht,(Ot-vt)*et+te,(Lt-vt)*nt+Ht,(Ot-xt)*et+te)),Xt.add(new go.PathSegment(go.PathSegment.Bezier,(Lt-xt+vt*.5)*nt+Ht,Ot*et+te,Lt*nt+Ht,(Ot-xt)*et+te,(Lt-xt+vt*.5)*nt+Ht,(Ot-vt)*et+te)),Xt.add(new go.PathSegment(go.PathSegment.Bezier,Lt*nt+Ht,(Ot+xt)*et+te,(Lt-xt+vt*.5)*nt+Ht,(Ot+vt)*et+te,Lt*nt+Ht,(Ot+xt)*et+te).close()),vt=ie*.2,xt=.2,Lt=.5,Ot=.5;var ve=new go.PathFigure((Lt-xt)*nt+Ht,Ot*et+te,!0);ct.add(ve),ve.add(new go.PathSegment(go.PathSegment.Bezier,Lt*nt+Ht,(Ot-xt)*et+te,(Lt-xt)*nt+Ht,(Ot-vt)*et+te,(Lt-vt)*nt+Ht,(Ot-xt)*et+te)),ve.add(new go.PathSegment(go.PathSegment.Bezier,(Lt+xt)*nt+Ht,Ot*et+te,(Lt+vt)*nt+Ht,(Ot-xt)*et+te,(Lt+xt)*nt+Ht,(Ot-vt)*et+te)),ve.add(new go.PathSegment(go.PathSegment.Bezier,Lt*nt+Ht,(Ot+xt)*et+te,(Lt+xt)*nt+Ht,(Ot+vt)*et+te,(Lt+vt)*nt+Ht,(Ot+xt)*et+te)),ve.add(new go.PathSegment(go.PathSegment.Bezier,(Lt-xt)*nt+Ht,Ot*et+te,(Lt-vt)*nt+Ht,(Ot+xt)*et+te,(Lt-xt)*nt+Ht,(Ot+vt)*et+te)),vt=ie*.4,xt=.4,Lt=.8,Ot=.5;var oe=new go.PathFigure(Lt*nt+Ht,(Ot-xt)*et+te,!0);ct.add(oe),oe.add(new go.PathSegment(go.PathSegment.Bezier,(Lt+xt)*nt+Ht,Ot*et+te,(Lt+vt)*nt+Ht,(Ot-xt)*et+te,(Lt+xt)*nt+Ht,(Ot-vt)*et+te)),oe.add(new go.PathSegment(go.PathSegment.Bezier,Lt*nt+Ht,(Ot+xt)*et+te,(Lt+xt)*nt+Ht,(Ot+vt)*et+te,(Lt+vt)*nt+Ht,(Ot+xt)*et+te)),oe.add(new go.PathSegment(go.PathSegment.Bezier,(Lt+xt-vt*.5)*nt+Ht,Ot*et+te,Lt*nt+Ht,(Ot+xt)*et+te,(Lt+xt-vt*.5)*nt+Ht,(Ot+vt)*et+te)),oe.add(new go.PathSegment(go.PathSegment.Bezier,Lt*nt+Ht,(Ot-xt)*et+te,(Lt+xt-vt*.5)*nt+Ht,(Ot-vt)*et+te,Lt*nt+Ht,(Ot-xt)*et+te).close()),vt=ie*.8,xt=.8,Lt=1,Ot=.5;var Re=new go.PathFigure(Lt*nt+Ht,(Ot-xt)*et+te,!0);return ct.add(Re),Re.add(new go.PathSegment(go.PathSegment.Bezier,(Lt+xt)*nt+Ht,Ot*et+te,(Lt+vt)*nt+Ht,(Ot-xt)*et+te,(Lt+xt)*nt+Ht,(Ot-vt)*et+te)),Re.add(new go.PathSegment(go.PathSegment.Bezier,Lt*nt+Ht,(Ot+xt)*et+te,(Lt+xt)*nt+Ht,(Ot+vt)*et+te,(Lt+vt)*nt+Ht,(Ot+xt)*et+te)),Re.add(new go.PathSegment(go.PathSegment.Bezier,(Lt+xt-vt*.5)*nt+Ht,Ot*et+te,Lt*nt+Ht,(Ot+xt)*et+te,(Lt+xt-vt*.5)*nt+Ht,(Ot+vt)*et+te)),Re.add(new go.PathSegment(go.PathSegment.Bezier,Lt*nt+Ht,(Ot-xt)*et+te,(Lt+xt-vt*.5)*nt+Ht,(Ot-vt)*et+te,Lt*nt+Ht,(Ot-xt)*et+te).close()),ct}),go.Shape.defineFigureGenerator("Email",function(Nt,nt,et){var ct=new go.Geometry,lt=new go.PathFigure(0,0,!0);ct.add(lt),lt.add(new go.PathSegment(go.PathSegment.Line,nt,0)),lt.add(new go.PathSegment(go.PathSegment.Line,nt,et)),lt.add(new go.PathSegment(go.PathSegment.Line,0,et)),lt.add(new go.PathSegment(go.PathSegment.Line,0,0).close());var pt=new go.PathFigure(0,0,!1);return ct.add(pt),pt.add(new go.PathSegment(go.PathSegment.Line,.5*nt,.6*et)),pt.add(new go.PathSegment(go.PathSegment.Line,nt,0)),pt.add(new go.PathSegment(go.PathSegment.Move,0,et)),pt.add(new go.PathSegment(go.PathSegment.Line,.45*nt,.54*et)),pt.add(new go.PathSegment(go.PathSegment.Move,nt,et)),pt.add(new go.PathSegment(go.PathSegment.Line,.55*nt,.54*et)),ct}),go.Shape.defineFigureGenerator("Ethernet",function(Nt,nt,et){var ct=new go.Geometry,lt=new go.PathFigure(.35*nt,0,!0);ct.add(lt),lt.add(new go.PathSegment(go.PathSegment.Line,.65*nt,0)),lt.add(new go.PathSegment(go.PathSegment.Line,.65*nt,.4*et)),lt.add(new go.PathSegment(go.PathSegment.Line,.35*nt,.4*et)),lt.add(new go.PathSegment(go.PathSegment.Line,.35*nt,0).close());var pt=new go.PathFigure(.1*nt,et,!0,!0);ct.add(pt),pt.add(new go.PathSegment(go.PathSegment.Line,.4*nt,et)),pt.add(new go.PathSegment(go.PathSegment.Line,.4*nt,.6*et)),pt.add(new go.PathSegment(go.PathSegment.Line,.1*nt,.6*et)),pt.add(new go.PathSegment(go.PathSegment.Line,.1*nt,et).close());var vt=new go.PathFigure(.6*nt,et,!0,!0);ct.add(vt),vt.add(new go.PathSegment(go.PathSegment.Line,.9*nt,et)),vt.add(new go.PathSegment(go.PathSegment.Line,.9*nt,.6*et)),vt.add(new go.PathSegment(go.PathSegment.Line,.6*nt,.6*et)),vt.add(new go.PathSegment(go.PathSegment.Line,.6*nt,et).close());var xt=new go.PathFigure(0,.5*et,!1);return ct.add(xt),xt.add(new go.PathSegment(go.PathSegment.Line,nt,.5*et)),xt.add(new go.PathSegment(go.PathSegment.Move,.5*nt,.5*et)),xt.add(new go.PathSegment(go.PathSegment.Line,.5*nt,.4*et)),xt.add(new go.PathSegment(go.PathSegment.Move,.75*nt,.5*et)),xt.add(new go.PathSegment(go.PathSegment.Line,.75*nt,.6*et)),xt.add(new go.PathSegment(go.PathSegment.Move,.25*nt,.5*et)),xt.add(new go.PathSegment(go.PathSegment.Line,.25*nt,.6*et)),ct}),go.Shape.defineFigureGenerator("Power",function(Nt,nt,et){var ct=new go.Geometry,lt=ie*.4,pt=.4,vt=.5,xt=.5,Lt=Ft(),Ot=Ft(),Ht=Ft(),te=Ft();Be(vt,xt-pt,vt+lt,xt-pt,vt+pt,xt-lt,vt+pt,xt,.5,Lt,Lt,Ot,Ht,te);var _t=Dt(Ot.x,Ot.y),Xt=new go.PathFigure(Ot.x*nt,Ot.y*et,!0);ct.add(Xt),Xt.add(new go.PathSegment(go.PathSegment.Bezier,(vt+pt)*nt,xt*et,Ht.x*nt,Ht.y*et,te.x*nt,te.y*et)),Xt.add(new go.PathSegment(go.PathSegment.Bezier,vt*nt,(xt+pt)*et,(vt+pt)*nt,(xt+lt)*et,(vt+lt)*nt,(xt+pt)*et)),Xt.add(new go.PathSegment(go.PathSegment.Bezier,(vt-pt)*nt,xt*et,(vt-lt)*nt,(xt+pt)*et,(vt-pt)*nt,(xt+lt)*et)),Be(vt-pt,xt,vt-pt,xt-lt,vt-lt,xt-pt,vt,xt-pt,.5,Ht,te,Ot,Lt,Lt),Xt.add(new go.PathSegment(go.PathSegment.Bezier,Ot.x*nt,Ot.y*et,Ht.x*nt,Ht.y*et,te.x*nt,te.y*et)),lt=ie*.3,pt=.3,Be(vt-pt,xt,vt-pt,xt-lt,vt-lt,xt-pt,vt,xt-pt,.5,Ht,te,Ot,Lt,Lt),Xt.add(new go.PathSegment(go.PathSegment.Line,Ot.x*nt,Ot.y*et)),Xt.add(new go.PathSegment(go.PathSegment.Bezier,(vt-pt)*nt,xt*et,te.x*nt,te.y*et,Ht.x*nt,Ht.y*et)),Xt.add(new go.PathSegment(go.PathSegment.Bezier,vt*nt,(xt+pt)*et,(vt-pt)*nt,(xt+lt)*et,(vt-lt)*nt,(xt+pt)*et)),Xt.add(new go.PathSegment(go.PathSegment.Bezier,(vt+pt)*nt,xt*et,(vt+lt)*nt,(xt+pt)*et,(vt+pt)*nt,(xt+lt)*et)),Be(vt,xt-pt,vt+lt,xt-pt,vt+pt,xt-lt,vt+pt,xt,.5,Lt,Lt,Ot,Ht,te),Xt.add(new go.PathSegment(go.PathSegment.Bezier,Ot.x*nt,Ot.y*et,te.x*nt,te.y*et,Ht.x*nt,Ht.y*et).close());var Xt=new go.PathFigure(.45*nt,0,!0);return ct.add(Xt),Xt.add(new go.PathSegment(go.PathSegment.Line,.45*nt,.5*et)),Xt.add(new go.PathSegment(go.PathSegment.Line,.55*nt,.5*et)),Xt.add(new go.PathSegment(go.PathSegment.Line,.55*nt,0).close()),se(Lt),se(Ot),se(Ht),se(te),se(_t),ct.spot1=new go.Spot(.25,.45),ct.spot2=new go.Spot(.75,.8),ct}),go.Shape.defineFigureGenerator("Fallout",function(Nt,nt,et){var ct=new go.Geometry,lt=new go.PathFigure(0,et/2,!0);ct.add(lt),lt.add(new go.PathSegment(go.PathSegment.Arc,180,360,nt/2,et/2,nt/2,et/2));function pt(vt,xt,Lt){vt.add(new go.PathSegment(go.PathSegment.Move,(.3+xt)*nt,(.8+Lt)*et)),vt.add(new go.PathSegment(go.PathSegment.Line,(.5+xt)*nt,(.5+Lt)*et)),vt.add(new go.PathSegment(go.PathSegment.Line,(.1+xt)*nt,(.5+Lt)*et)),vt.add(new go.PathSegment(go.PathSegment.Line,(.3+xt)*nt,(.8+Lt)*et).close())}return pt(lt,0,0),pt(lt,.4,0),pt(lt,.2,-.3),ct}),go.Shape.defineFigureGenerator("IrritationHazard",function(Nt,nt,et){var ct=new go.Geometry,lt=new go.PathFigure(.2*nt,0,!0);return ct.add(lt),lt.add(new go.PathSegment(go.PathSegment.Line,.5*nt,.3*et)),lt.add(new go.PathSegment(go.PathSegment.Line,.8*nt,0)),lt.add(new go.PathSegment(go.PathSegment.Line,nt,.2*et)),lt.add(new go.PathSegment(go.PathSegment.Line,.7*nt,.5*et)),lt.add(new go.PathSegment(go.PathSegment.Line,nt,.8*et)),lt.add(new go.PathSegment(go.PathSegment.Line,.8*nt,et)),lt.add(new go.PathSegment(go.PathSegment.Line,.5*nt,.7*et)),lt.add(new go.PathSegment(go.PathSegment.Line,.2*nt,et)),lt.add(new go.PathSegment(go.PathSegment.Line,0,.8*et)),lt.add(new go.PathSegment(go.PathSegment.Line,.3*nt,.5*et)),lt.add(new go.PathSegment(go.PathSegment.Line,0,.2*et).close()),ct.spot1=new go.Spot(.3,.3),ct.spot2=new go.Spot(.7,.7),ct}),go.Shape.defineFigureGenerator("ElectricalHazard",function(Nt,nt,et){var ct=new go.Geometry,lt=new go.PathFigure(.37*nt,0,!0);return ct.add(lt),lt.add(new go.PathSegment(go.PathSegment.Line,.5*nt,.11*et)),lt.add(new go.PathSegment(go.PathSegment.Line,.77*nt,.04*et)),lt.add(new go.PathSegment(go.PathSegment.Line,.33*nt,.49*et)),lt.add(new go.PathSegment(go.PathSegment.Line,nt,.37*et)),lt.add(new go.PathSegment(go.PathSegment.Line,.63*nt,.86*et)),lt.add(new go.PathSegment(go.PathSegment.Line,.77*nt,.91*et)),lt.add(new go.PathSegment(go.PathSegment.Line,.34*nt,et)),lt.add(new go.PathSegment(go.PathSegment.Line,.34*nt,.78*et)),lt.add(new go.PathSegment(go.PathSegment.Line,.44*nt,.8*et)),lt.add(new go.PathSegment(go.PathSegment.Line,.65*nt,.56*et)),lt.add(new go.PathSegment(go.PathSegment.Line,0,.68*et).close()),ct}),go.Shape.defineFigureGenerator("FireHazard",function(Nt,nt,et){var ct=new go.Geometry,lt=new go.PathFigure(.1*nt,et,!0);return ct.add(lt),lt.add(new go.PathSegment(go.PathSegment.Bezier,.29*nt,0,-.25*nt,.63*et,.45*nt,.44*et)),lt.add(new go.PathSegment(go.PathSegment.Bezier,.51*nt,.42*et,.48*nt,.17*et,.54*nt,.35*et)),lt.add(new go.PathSegment(go.PathSegment.Bezier,.59*nt,.18*et,.59*nt,.29*et,.58*nt,.28*et)),lt.add(new go.PathSegment(go.PathSegment.Bezier,.75*nt,.6*et,.8*nt,.34*et,.88*nt,.43*et)),lt.add(new go.PathSegment(go.PathSegment.Bezier,.88*nt,.31*et,.87*nt,.48*et,.88*nt,.43*et)),lt.add(new go.PathSegment(go.PathSegment.Bezier,.9*nt,et,1.17*nt,.76*et,.82*nt,.8*et).close()),ct.spot1=new go.Spot(.07,.445),ct.spot2=new go.Spot(.884,.958),ct}),go.Shape.defineFigureGenerator("BpmnActivityLoop",function(Nt,nt,et){var ct=new go.Geometry,lt=.5,pt=0,vt=0,xt=lt*ie,Lt=.4*Math.SQRT2/2+.5,Ot=.5-.5*Math.SQRT2/2,Ht=1,te=.5,_t=.5,Xt=0,ve=new go.PathFigure(Lt*nt,(1-Ot)*et,!1);return ct.add(ve),ve.add(new go.PathSegment(go.PathSegment.Bezier,Ht*nt,te*et,Ht*nt,.7*et,Ht*nt,te*et)),ve.add(new go.PathSegment(go.PathSegment.Bezier,(_t+pt)*nt,(Xt+pt)*et,(.5+lt+pt)*nt,(.5-xt+pt)*et,(.5+xt+pt)*nt,(.5-lt+pt)*et)),ve.add(new go.PathSegment(go.PathSegment.Bezier,(.5-lt+pt)*nt,(.5+vt)*et,(.5-xt+pt)*nt,(.5-lt+vt)*et,(.5-lt+pt)*nt,(.5-xt+vt)*et)),ve.add(new go.PathSegment(go.PathSegment.Bezier,(.35+pt)*nt,.9*et,(.5-lt+pt)*nt,(.5+xt+vt)*et,(.5-xt+pt)*nt,.9*et)),ve.add(new go.PathSegment(go.PathSegment.Move,(.25+pt)*nt,.8*et)),ve.add(new go.PathSegment(go.PathSegment.Line,(.35+pt)*nt,.9*et)),ve.add(new go.PathSegment(go.PathSegment.Line,(.2+pt)*nt,.95*et)),ct}),go.Shape.defineFigureGenerator("BpmnActivityParallel",function(Nt,nt,et){var ct=new go.Geometry,lt=new go.PathFigure(0,0,!1);return ct.add(lt),lt.add(new go.PathSegment(go.PathSegment.Line,0,et)),lt.add(new go.PathSegment(go.PathSegment.Move,.5*nt,0)),lt.add(new go.PathSegment(go.PathSegment.Line,.5*nt,et)),lt.add(new go.PathSegment(go.PathSegment.Move,nt,0)),lt.add(new go.PathSegment(go.PathSegment.Line,nt,et)),ct}),go.Shape.defineFigureGenerator("BpmnActivitySequential",function(Nt,nt,et){var ct=new go.Geometry,lt=new go.PathFigure(0,0,!1);return ct.add(lt),lt.add(new go.PathSegment(go.PathSegment.Line,nt,0)),lt.add(new go.PathSegment(go.PathSegment.Move,0,.5*et)),lt.add(new go.PathSegment(go.PathSegment.Line,nt,.5*et)),lt.add(new go.PathSegment(go.PathSegment.Move,0,et)),lt.add(new go.PathSegment(go.PathSegment.Line,nt,et)),ct}),go.Shape.defineFigureGenerator("BpmnActivityAdHoc",function(Nt,nt,et){var ct=new go.Geometry,lt=new go.PathFigure(0,0,!1);ct.add(lt);var pt=new go.PathFigure(nt,et,!1);ct.add(pt);var vt=new go.PathFigure(0,.5*et,!1);return ct.add(vt),vt.add(new go.PathSegment(go.PathSegment.Bezier,.5*nt,.5*et,.2*nt,.35*et,.3*nt,.35*et)),vt.add(new go.PathSegment(go.PathSegment.Bezier,nt,.5*et,.7*nt,.65*et,.8*nt,.65*et)),ct}),go.Shape.defineFigureGenerator("BpmnActivityCompensation",function(Nt,nt,et){var ct=new go.Geometry,lt=new go.PathFigure(0,.5*et,!0);return ct.add(lt),lt.add(new go.PathSegment(go.PathSegment.Line,.5*nt,0)),lt.add(new go.PathSegment(go.PathSegment.Line,.5*nt,.5*et)),lt.add(new go.PathSegment(go.PathSegment.Line,nt,et)),lt.add(new go.PathSegment(go.PathSegment.Line,nt,0)),lt.add(new go.PathSegment(go.PathSegment.Line,.5*nt,.5*et)),lt.add(new go.PathSegment(go.PathSegment.Line,.5*nt,et).close()),ct}),go.Shape.defineFigureGenerator("BpmnTaskMessage",function(Nt,nt,et){var ct=new go.Geometry,lt=new go.PathFigure(0,.2*et,!0);ct.add(lt),lt.add(new go.PathSegment(go.PathSegment.Line,nt,.2*et)),lt.add(new go.PathSegment(go.PathSegment.Line,nt,.8*et)),lt.add(new go.PathSegment(go.PathSegment.Line,0,.8*et)),lt.add(new go.PathSegment(go.PathSegment.Line,0,.8*et).close());var lt=new go.PathFigure(0,.2*et,!1);return ct.add(lt),lt.add(new go.PathSegment(go.PathSegment.Line,.5*nt,.5*et)),lt.add(new go.PathSegment(go.PathSegment.Line,nt,.2*et)),ct}),go.Shape.defineFigureGenerator("BpmnTaskScript",function(Nt,nt,et){var ct=new go.Geometry,lt=new go.PathFigure(.7*nt,et,!0);ct.add(lt),lt.add(new go.PathSegment(go.PathSegment.Line,.3*nt,et)),lt.add(new go.PathSegment(go.PathSegment.Bezier,.3*nt,0,.6*nt,.5*et,0,.5*et)),lt.add(new go.PathSegment(go.PathSegment.Line,.7*nt,0)),lt.add(new go.PathSegment(go.PathSegment.Bezier,.7*nt,et,.4*nt,.5*et,nt,.5*et).close());var pt=new go.PathFigure(.45*nt,.73*et,!1);return ct.add(pt),pt.add(new go.PathSegment(go.PathSegment.Line,.7*nt,.73*et)),pt.add(new go.PathSegment(go.PathSegment.Move,.38*nt,.5*et)),pt.add(new go.PathSegment(go.PathSegment.Line,.63*nt,.5*et)),pt.add(new go.PathSegment(go.PathSegment.Move,.31*nt,.27*et)),pt.add(new go.PathSegment(go.PathSegment.Line,.56*nt,.27*et)),ct}),go.Shape.defineFigureGenerator("BpmnTaskUser",function(Nt,nt,et){var ct=new go.Geometry,lt=new go.PathFigure(0,0,!1);ct.add(lt);var pt=new go.PathFigure(.335*nt,(1-.555)*et,!0);ct.add(pt),pt.add(new go.PathSegment(go.PathSegment.Line,.335*nt,(1-.405)*et)),pt.add(new go.PathSegment(go.PathSegment.Line,(1-.335)*nt,(1-.405)*et)),pt.add(new go.PathSegment(go.PathSegment.Line,(1-.335)*nt,(1-.555)*et)),pt.add(new go.PathSegment(go.PathSegment.Bezier,nt,.68*et,(1-.12)*nt,.46*et,(1-.02)*nt,.54*et)),pt.add(new go.PathSegment(go.PathSegment.Line,nt,et)),pt.add(new go.PathSegment(go.PathSegment.Line,0,et)),pt.add(new go.PathSegment(go.PathSegment.Line,0,.68*et)),pt.add(new go.PathSegment(go.PathSegment.Bezier,.335*nt,(1-.555)*et,.02*nt,.54*et,.12*nt,.46*et)),pt.add(new go.PathSegment(go.PathSegment.Line,.365*nt,(1-.595)*et));var vt=.5-.285,xt=.5,Lt=vt,Ot=Math.PI/4,Ht=4*(1-Math.cos(Ot))/(3*Math.sin(Ot)),te=Ht*.5,_t=vt,Xt=vt,ve=Ht*_t,oe=Ht*Xt;pt.add(new go.PathSegment(go.PathSegment.Bezier,(xt-_t)*nt,Lt*et,(xt-(ve+_t)/2)*nt,(Lt+(Xt+oe)/2)*et,(xt-_t)*nt,(Lt+oe)*et)),pt.add(new go.PathSegment(go.PathSegment.Bezier,xt*nt,(Lt-Xt)*et,(xt-_t)*nt,(Lt-oe)*et,(xt-ve)*nt,(Lt-Xt)*et)),pt.add(new go.PathSegment(go.PathSegment.Bezier,(xt+_t)*nt,Lt*et,(xt+ve)*nt,(Lt-Xt)*et,(xt+_t)*nt,(Lt-oe)*et)),pt.add(new go.PathSegment(go.PathSegment.Bezier,(1-.365)*nt,(1-.595)*et,(xt+_t)*nt,(Lt+oe)*et,(xt+(ve+_t)/2)*nt,(Lt+(Xt+oe)/2)*et)),pt.add(new go.PathSegment(go.PathSegment.Line,(1-.365)*nt,(1-.595)*et)),pt.add(new go.PathSegment(go.PathSegment.Line,(1-.335)*nt,(1-.555)*et)),pt.add(new go.PathSegment(go.PathSegment.Line,(1-.335)*nt,(1-.405)*et)),pt.add(new go.PathSegment(go.PathSegment.Line,.335*nt,(1-.405)*et));var Re=new go.PathFigure(.2*nt,et,!1);ct.add(Re),Re.add(new go.PathSegment(go.PathSegment.Line,.2*nt,.8*et));var Ye=new go.PathFigure(.8*nt,et,!1);return ct.add(Ye),Ye.add(new go.PathSegment(go.PathSegment.Line,.8*nt,.8*et)),ct}),go.Shape.defineFigureGenerator("BpmnEventConditional",function(Nt,nt,et){var ct=new go.Geometry,lt=new go.PathFigure(.1*nt,0,!0);ct.add(lt),lt.add(new go.PathSegment(go.PathSegment.Line,.9*nt,0)),lt.add(new go.PathSegment(go.PathSegment.Line,.9*nt,et)),lt.add(new go.PathSegment(go.PathSegment.Line,.1*nt,et).close());var pt=new go.PathFigure(.2*nt,.2*et,!1);return ct.add(pt),pt.add(new go.PathSegment(go.PathSegment.Line,.8*nt,.2*et)),pt.add(new go.PathSegment(go.PathSegment.Move,.2*nt,.4*et)),pt.add(new go.PathSegment(go.PathSegment.Line,.8*nt,.4*et)),pt.add(new go.PathSegment(go.PathSegment.Move,.2*nt,.6*et)),pt.add(new go.PathSegment(go.PathSegment.Line,.8*nt,.6*et)),pt.add(new go.PathSegment(go.PathSegment.Move,.2*nt,.8*et)),pt.add(new go.PathSegment(go.PathSegment.Line,.8*nt,.8*et)),ct}),go.Shape.defineFigureGenerator("BpmnEventError",function(Nt,nt,et){var ct=new go.Geometry,lt=new go.PathFigure(0,et,!0);return ct.add(lt),lt.add(new go.PathSegment(go.PathSegment.Line,.33*nt,0)),lt.add(new go.PathSegment(go.PathSegment.Line,.66*nt,.5*et)),lt.add(new go.PathSegment(go.PathSegment.Line,nt,0)),lt.add(new go.PathSegment(go.PathSegment.Line,.66*nt,et)),lt.add(new go.PathSegment(go.PathSegment.Line,.33*nt,.5*et).close()),ct}),go.Shape.defineFigureGenerator("BpmnEventEscalation",function(Nt,nt,et){var ct=new go.Geometry,lt=new go.PathFigure(0,0,!1);ct.add(lt);var pt=new go.PathFigure(nt,et,!1);ct.add(pt);var vt=new go.PathFigure(.1*nt,et,!0);return ct.add(vt),vt.add(new go.PathSegment(go.PathSegment.Line,.5*nt,0)),vt.add(new go.PathSegment(go.PathSegment.Line,.9*nt,et)),vt.add(new go.PathSegment(go.PathSegment.Line,.5*nt,.5*et).close()),ct}),go.Shape.defineFigureGenerator("Caution",function(Nt,nt,et){var ct=new go.Geometry,lt=new go.PathFigure(.05*nt,et,!0);ct.add(lt),lt.add(new go.PathSegment(go.PathSegment.Bezier,.1*nt,.8*et,0,et,0,et)),lt.add(new go.PathSegment(go.PathSegment.Line,.45*nt,.1*et)),lt.add(new go.PathSegment(go.PathSegment.Bezier,.55*nt,.1*et,.5*nt,0,.5*nt,0)),lt.add(new go.PathSegment(go.PathSegment.Line,.95*nt,.9*et)),lt.add(new go.PathSegment(go.PathSegment.Bezier,.9*nt,et,nt,et,nt,et)),lt.add(new go.PathSegment(go.PathSegment.Line,.05*nt,et));var pt=.05;return lt.add(new go.PathSegment(go.PathSegment.Move,(.5-pt)*nt,.875*et)),lt.add(new go.PathSegment(go.PathSegment.Arc,180,-360,.5*nt,.875*et,pt*nt,pt*et)),lt.add(new go.PathSegment(go.PathSegment.Move,.5*nt,.75*et)),lt.add(new go.PathSegment(go.PathSegment.Bezier,.5*nt,.325*et,.575*nt,.725*et,.625*nt,.375*et)),lt.add(new go.PathSegment(go.PathSegment.Bezier,.5*nt,.75*et,.375*nt,.375*et,.425*nt,.725*et)),ct}),go.Shape.defineFigureGenerator("Recycle",function(Nt,nt,et){var ct=new go.Geometry,lt=new go.PathFigure(.45*nt,.95*et,!1);ct.add(lt),lt.add(new go.PathSegment(go.PathSegment.Line,.2*nt,.95*et)),lt.add(new go.PathSegment(go.PathSegment.Bezier,.185*nt,.85*et,.17*nt,.95*et,.15*nt,.9*et)),lt.add(new go.PathSegment(go.PathSegment.Line,.235*nt,.75*et)),lt.add(new go.PathSegment(go.PathSegment.Line,.3*nt,.625*et)),lt.add(new go.PathSegment(go.PathSegment.Line,.35*nt,.65*et)),lt.add(new go.PathSegment(go.PathSegment.Line,.275*nt,.45*et)),lt.add(new go.PathSegment(go.PathSegment.Line,.05*nt,.45*et)),lt.add(new go.PathSegment(go.PathSegment.Line,.1*nt,.5*et)),lt.add(new go.PathSegment(go.PathSegment.Line,.05*nt,.575*et)),lt.add(new go.PathSegment(go.PathSegment.Bezier,.1875*nt,.95*et,0,.675*et,0,.7*et)),lt.add(new go.PathSegment(go.PathSegment.Move,.45*nt,.95*et)),lt.add(new go.PathSegment(go.PathSegment.Line,.45*nt,.775*et)),lt.add(new go.PathSegment(go.PathSegment.Line,.22*nt,.775*et));var pt=new go.PathFigure(.475*nt,.2*et,!1);ct.add(pt),pt.add(new go.PathSegment(go.PathSegment.Line,.4*nt,.4*et)),pt.add(new go.PathSegment(go.PathSegment.Line,.225*nt,.3*et)),pt.add(new go.PathSegment(go.PathSegment.Line,.275*nt,.175*et)),pt.add(new go.PathSegment(go.PathSegment.Line,.325*nt,.05*et)),pt.add(new go.PathSegment(go.PathSegment.Bezier,.4*nt,.05*et,.35*nt,0,.375*nt,0)),pt.add(new go.PathSegment(go.PathSegment.Line,.575*nt,.375*et)),pt.add(new go.PathSegment(go.PathSegment.Line,.525*nt,.4*et)),pt.add(new go.PathSegment(go.PathSegment.Line,.75*nt,.475*et)),pt.add(new go.PathSegment(go.PathSegment.Line,.85*nt,.315*et)),pt.add(new go.PathSegment(go.PathSegment.Line,.8*nt,.32*et)),pt.add(new go.PathSegment(go.PathSegment.Line,.65*nt,.05*et)),pt.add(new go.PathSegment(go.PathSegment.Bezier,.575*nt,0,.65*nt,.05*et,.625*nt,0)),pt.add(new go.PathSegment(go.PathSegment.Line,.38*nt,.0105*et));var vt=new go.PathFigure(.675*nt,.575*et,!1);return ct.add(vt),vt.add(new go.PathSegment(go.PathSegment.Line,.875*nt,.525*et)),vt.add(new go.PathSegment(go.PathSegment.Line,nt,.775*et)),vt.add(new go.PathSegment(go.PathSegment.Bezier,.85*nt,.95*et,nt,.8*et,nt,.85*et)),vt.add(new go.PathSegment(go.PathSegment.Line,.65*nt,.95*et)),vt.add(new go.PathSegment(go.PathSegment.Line,.65*nt,et)),vt.add(new go.PathSegment(go.PathSegment.Line,.55*nt,.85*et)),vt.add(new go.PathSegment(go.PathSegment.Line,.65*nt,.725*et)),vt.add(new go.PathSegment(go.PathSegment.Line,.65*nt,.775*et)),vt.add(new go.PathSegment(go.PathSegment.Line,.7*nt,.775*et)),vt.add(new go.PathSegment(go.PathSegment.Line,nt,.775*et)),vt.add(new go.PathSegment(go.PathSegment.Move,.675*nt,.575*et)),vt.add(new go.PathSegment(go.PathSegment.Line,.775*nt,.775*et)),ct}),go.Shape.defineFigureGenerator("BpmnEventTimer",function(Nt,nt,et){var ct=new go.Geometry,lt=.5,pt=ie*.5,vt=new go.PathFigure(nt,lt*et,!0);ct.add(vt),vt.add(new go.PathSegment(go.PathSegment.Bezier,lt*nt,et,nt,(lt+pt)*et,(lt+pt)*nt,et)),vt.add(new go.PathSegment(go.PathSegment.Bezier,0,lt*et,(lt-pt)*nt,et,0,(lt+pt)*et)),vt.add(new go.PathSegment(go.PathSegment.Bezier,lt*nt,0,0,(lt-pt)*et,(lt-pt)*nt,0)),vt.add(new go.PathSegment(go.PathSegment.Bezier,nt,lt*et,(lt+pt)*nt,0,nt,(lt-pt)*et));var xt=new go.PathFigure(lt*nt,0,!1);return ct.add(xt),xt.add(new go.PathSegment(go.PathSegment.Line,lt*nt,.15*et)),xt.add(new go.PathSegment(go.PathSegment.Move,lt*nt,et)),xt.add(new go.PathSegment(go.PathSegment.Line,lt*nt,.85*et)),xt.add(new go.PathSegment(go.PathSegment.Move,0,lt*et)),xt.add(new go.PathSegment(go.PathSegment.Line,.15*nt,lt*et)),xt.add(new go.PathSegment(go.PathSegment.Move,nt,lt*et)),xt.add(new go.PathSegment(go.PathSegment.Line,.85*nt,lt*et)),xt.add(new go.PathSegment(go.PathSegment.Move,lt*nt,lt*et)),xt.add(new go.PathSegment(go.PathSegment.Line,.58*nt,.1*et)),xt.add(new go.PathSegment(go.PathSegment.Move,lt*nt,lt*et)),xt.add(new go.PathSegment(go.PathSegment.Line,.78*nt,.54*et)),ct}),go.Shape.defineFigureGenerator("Package",function(Nt,nt,et){var ct=new go.Geometry,lt=new go.PathFigure(0,.15*et,!0);ct.add(lt),lt.add(new go.PathSegment(go.PathSegment.Line,nt,.15*et)),lt.add(new go.PathSegment(go.PathSegment.Line,nt,et)),lt.add(new go.PathSegment(go.PathSegment.Line,0,et).close());var pt=new go.PathFigure(0,.15*et,!0);return ct.add(pt),pt.add(new go.PathSegment(go.PathSegment.Line,0,0)),pt.add(new go.PathSegment(go.PathSegment.Line,.6*nt,0)),pt.add(new go.PathSegment(go.PathSegment.Line,.65*nt,.15*et).close()),ct.spot1=new go.Spot(0,.1),ct.spot2=new go.Spot(1,1),ct}),go.Shape.defineFigureGenerator("Class",function(Nt,nt,et){var ct=new go.Geometry,lt=new go.PathFigure(0,0,!0);ct.add(lt),lt.add(new go.PathSegment(go.PathSegment.Line,nt,0)),lt.add(new go.PathSegment(go.PathSegment.Line,nt,et)),lt.add(new go.PathSegment(go.PathSegment.Line,0,et)),lt.add(new go.PathSegment(go.PathSegment.Line,0,0).close());var pt=new go.PathFigure(0,.2*et,!1);ct.add(pt),pt.add(new go.PathSegment(go.PathSegment.Line,nt,.2*et).close());var vt=new go.PathFigure(0,.5*et,!1);return ct.add(vt),vt.add(new go.PathSegment(go.PathSegment.Line,nt,.5*et).close()),ct}),go.Shape.defineFigureGenerator("Component",function(Nt,nt,et){var ct=new go.Geometry,lt=new go.PathFigure(nt,et,!0);ct.add(lt),lt.add(new go.PathSegment(go.PathSegment.Line,nt,0)),lt.add(new go.PathSegment(go.PathSegment.Line,.15*nt,0)),lt.add(new go.PathSegment(go.PathSegment.Line,.15*nt,et)),lt.add(new go.PathSegment(go.PathSegment.Line,nt,et).close());var pt=new go.PathFigure(0,.2*et,!0);ct.add(pt),pt.add(new go.PathSegment(go.PathSegment.Line,.45*nt,.2*et)),pt.add(new go.PathSegment(go.PathSegment.Line,.45*nt,.4*et)),pt.add(new go.PathSegment(go.PathSegment.Line,0,.4*et)),pt.add(new go.PathSegment(go.PathSegment.Line,0,.2*et).close());var vt=new go.PathFigure(0,.6*et,!0);return ct.add(vt),vt.add(new go.PathSegment(go.PathSegment.Line,.45*nt,.6*et)),vt.add(new go.PathSegment(go.PathSegment.Line,.45*nt,.8*et)),vt.add(new go.PathSegment(go.PathSegment.Line,0,.8*et)),vt.add(new go.PathSegment(go.PathSegment.Line,0,.6*et).close()),ct}),go.Shape.defineFigureGenerator("Boat Shipment",function(Nt,nt,et){var ct=new go.Geometry,lt=new go.PathFigure(.15*nt,.6*et,!0);ct.add(lt),lt.add(new go.PathSegment(go.PathSegment.Line,.15*nt,.6*et)),lt.add(new go.PathSegment(go.PathSegment.Line,0,.6*et)),lt.add(new go.PathSegment(go.PathSegment.Line,.15*nt,et)),lt.add(new go.PathSegment(go.PathSegment.Line,.85*nt,et)),lt.add(new go.PathSegment(go.PathSegment.Line,nt,.6*et)),lt.add(new go.PathSegment(go.PathSegment.Line,.85*nt,.6*et)),lt.add(new go.PathSegment(go.PathSegment.Line,.5*nt,0)),lt.add(new go.PathSegment(go.PathSegment.Line,.15*nt,.6*et));var pt=new go.PathFigure(.15*nt,.6*et,!1);return ct.add(pt),pt.add(new go.PathSegment(go.PathSegment.Line,.85*nt,.6*et)),ct}),go.Shape.defineFigureGenerator("Customer/Supplier",function(Nt,nt,et){var ct=new go.Geometry,lt=new go.PathFigure(nt,et,!0);return ct.add(lt),lt.add(new go.PathSegment(go.PathSegment.Line,nt,0)),lt.add(new go.PathSegment(go.PathSegment.Line,.66*nt,.33*et)),lt.add(new go.PathSegment(go.PathSegment.Line,.66*nt,0)),lt.add(new go.PathSegment(go.PathSegment.Line,.33*nt,.33*et)),lt.add(new go.PathSegment(go.PathSegment.Line,.33*nt,0)),lt.add(new go.PathSegment(go.PathSegment.Line,0,.33*et)),lt.add(new go.PathSegment(go.PathSegment.Line,0,et)),lt.add(new go.PathSegment(go.PathSegment.Line,nt,et).close()),ct}),go.Shape.defineFigureGenerator("Workcell",function(Nt,nt,et){var ct=new go.Geometry,lt=new go.PathFigure(0,et,!0);return ct.add(lt),lt.add(new go.PathSegment(go.PathSegment.Line,0,0)),lt.add(new go.PathSegment(go.PathSegment.Line,nt,0)),lt.add(new go.PathSegment(go.PathSegment.Line,nt,et)),lt.add(new go.PathSegment(go.PathSegment.Line,.65*nt,et)),lt.add(new go.PathSegment(go.PathSegment.Line,.65*nt,.4*et)),lt.add(new go.PathSegment(go.PathSegment.Line,.35*nt,.4*et)),lt.add(new go.PathSegment(go.PathSegment.Line,.35*nt,et)),lt.add(new go.PathSegment(go.PathSegment.Line,0,et).close()),ct}),go.Shape.defineFigureGenerator("Supermarket",function(Nt,nt,et){var ct=new go.Geometry,lt=new go.PathFigure(0,0,!1);return ct.add(lt),lt.add(new go.PathSegment(go.PathSegment.Line,nt,0)),lt.add(new go.PathSegment(go.PathSegment.Line,nt,.33*et)),lt.add(new go.PathSegment(go.PathSegment.Line,0,.33*et)),lt.add(new go.PathSegment(go.PathSegment.Move,nt,.33*et)),lt.add(new go.PathSegment(go.PathSegment.Line,nt,.66*et)),lt.add(new go.PathSegment(go.PathSegment.Line,0,.66*et)),lt.add(new go.PathSegment(go.PathSegment.Move,nt,.66*et)),lt.add(new go.PathSegment(go.PathSegment.Line,nt,et)),lt.add(new go.PathSegment(go.PathSegment.Line,0,et)),ct}),go.Shape.defineFigureGenerator("TruckShipment",function(Nt,nt,et){var ct=new go.Geometry,lt=new go.PathFigure(0,0,!0);ct.add(lt),lt.add(new go.PathSegment(go.PathSegment.Line,.6*nt,0)),lt.add(new go.PathSegment(go.PathSegment.Line,.6*nt,.8*et)),lt.add(new go.PathSegment(go.PathSegment.Line,0,.8*et)),lt.add(new go.PathSegment(go.PathSegment.Line,0,0).close());var pt=new go.PathFigure(nt,.8*et,!0);ct.add(pt),pt.add(new go.PathSegment(go.PathSegment.Line,nt,.4*et)),pt.add(new go.PathSegment(go.PathSegment.Line,.6*nt,.4*et)),pt.add(new go.PathSegment(go.PathSegment.Line,.6*nt,.8*et)),pt.add(new go.PathSegment(go.PathSegment.Line,nt,.8*et).close());var vt=.1,xt=ie*.1,Lt=.2,Ot=.9,Ht=new go.PathFigure((Lt-vt)*nt,Ot*et,!0);ct.add(Ht),Ht.add(new go.PathSegment(go.PathSegment.Bezier,Lt*nt,(Ot-vt)*et,(Lt-vt)*nt,(Ot-xt)*et,(Lt-xt)*nt,(Ot-vt)*et)),Ht.add(new go.PathSegment(go.PathSegment.Bezier,(Lt+vt)*nt,Ot*et,(Lt+xt)*nt,(Ot-vt)*et,(Lt+vt)*nt,(Ot-xt)*et)),Ht.add(new go.PathSegment(go.PathSegment.Bezier,Lt*nt,(Ot+vt)*et,(Lt+vt)*nt,(Ot+xt)*et,(Lt+xt)*nt,(Ot+vt)*et)),Ht.add(new go.PathSegment(go.PathSegment.Bezier,(Lt-vt)*nt,Ot*et,(Lt-xt)*nt,(Ot+vt)*et,(Lt-vt)*nt,(Ot+xt)*et).close()),vt=.1,xt=ie*.1,Lt=.8,Ot=.9;var te=new go.PathFigure((Lt-vt)*nt,Ot*et,!0);return ct.add(te),te.add(new go.PathSegment(go.PathSegment.Bezier,Lt*nt,(Ot-vt)*et,(Lt-vt)*nt,(Ot-xt)*et,(Lt-xt)*nt,(Ot-vt)*et)),te.add(new go.PathSegment(go.PathSegment.Bezier,(Lt+vt)*nt,Ot*et,(Lt+xt)*nt,(Ot-vt)*et,(Lt+vt)*nt,(Ot-xt)*et)),te.add(new go.PathSegment(go.PathSegment.Bezier,Lt*nt,(Ot+vt)*et,(Lt+vt)*nt,(Ot+xt)*et,(Lt+xt)*nt,(Ot+vt)*et)),te.add(new go.PathSegment(go.PathSegment.Bezier,(Lt-vt)*nt,Ot*et,(Lt-xt)*nt,(Ot+vt)*et,(Lt-vt)*nt,(Ot+xt)*et).close()),ct}),go.Shape.defineFigureGenerator("KanbanPost",function(Nt,nt,et){var ct=new go.Geometry,lt=new go.PathFigure(.2*nt,0,!1);return ct.add(lt),lt.add(new go.PathSegment(go.PathSegment.Line,.2*nt,.5*et)),lt.add(new go.PathSegment(go.PathSegment.Line,.8*nt,.5*et)),lt.add(new go.PathSegment(go.PathSegment.Line,.8*nt,0)),lt.add(new go.PathSegment(go.PathSegment.Move,.5*nt,.5*et)),lt.add(new go.PathSegment(go.PathSegment.Line,.5*nt,et)),lt.add(new go.PathSegment(go.PathSegment.Line,.2*nt,et)),lt.add(new go.PathSegment(go.PathSegment.Move,.5*nt,et)),lt.add(new go.PathSegment(go.PathSegment.Line,.8*nt,et)),ct}),go.Shape.defineFigureGenerator("Forklift",function(Nt,nt,et){var ct=new go.Geometry,lt=new go.PathFigure(0,0,!0);ct.add(lt),lt.add(new go.PathSegment(go.PathSegment.Line,0,.5*et)),lt.add(new go.PathSegment(go.PathSegment.Line,.5*nt,.5*et)),lt.add(new go.PathSegment(go.PathSegment.Line,.4*nt,0)),lt.add(new go.PathSegment(go.PathSegment.Line,0,0));var pt=new go.PathFigure(0,.5*et,!0);ct.add(pt),pt.add(new go.PathSegment(go.PathSegment.Line,0,.8*et)),pt.add(new go.PathSegment(go.PathSegment.Line,.5*nt,.8*et)),pt.add(new go.PathSegment(go.PathSegment.Line,.5*nt,.5*et)),pt.add(new go.PathSegment(go.PathSegment.Line,0,.5*et));var vt=new go.PathFigure(.5*nt,.8*et,!0);ct.add(vt),vt.add(new go.PathSegment(go.PathSegment.Line,.5*nt,.1*et)),vt.add(new go.PathSegment(go.PathSegment.Line,.55*nt,.1*et)),vt.add(new go.PathSegment(go.PathSegment.Line,.55*nt,.8*et)),vt.add(new go.PathSegment(go.PathSegment.Line,.5*nt,.8*et));var xt=new go.PathFigure(.5*nt,.7*et,!1);ct.add(xt),xt.add(new go.PathSegment(go.PathSegment.Line,nt,.7*et));var Lt=.1,Ot=ie*.1,Ht=.1,te=.9,_t=new go.PathFigure((Ht-Lt)*nt,te*et,!0);ct.add(_t),_t.add(new go.PathSegment(go.PathSegment.Bezier,Ht*nt,(te-Lt)*et,(Ht-Lt)*nt,(te-Ot)*et,(Ht-Ot)*nt,(te-Lt)*et)),_t.add(new go.PathSegment(go.PathSegment.Bezier,(Ht+Lt)*nt,te*et,(Ht+Ot)*nt,(te-Lt)*et,(Ht+Lt)*nt,(te-Ot)*et)),_t.add(new go.PathSegment(go.PathSegment.Bezier,Ht*nt,(te+Lt)*et,(Ht+Lt)*nt,(te+Ot)*et,(Ht+Ot)*nt,(te+Lt)*et)),_t.add(new go.PathSegment(go.PathSegment.Bezier,(Ht-Lt)*nt,te*et,(Ht-Ot)*nt,(te+Lt)*et,(Ht-Lt)*nt,(te+Ot)*et)),Lt=.1,Ot=ie*.1,Ht=.4,te=.9;var Xt=new go.PathFigure((Ht-Lt)*nt,te*et,!0);return ct.add(Xt),Xt.add(new go.PathSegment(go.PathSegment.Bezier,Ht*nt,(te-Lt)*et,(Ht-Lt)*nt,(te-Ot)*et,(Ht-Ot)*nt,(te-Lt)*et)),Xt.add(new go.PathSegment(go.PathSegment.Bezier,(Ht+Lt)*nt,te*et,(Ht+Ot)*nt,(te-Lt)*et,(Ht+Lt)*nt,(te-Ot)*et)),Xt.add(new go.PathSegment(go.PathSegment.Bezier,Ht*nt,(te+Lt)*et,(Ht+Lt)*nt,(te+Ot)*et,(Ht+Ot)*nt,(te+Lt)*et)),Xt.add(new go.PathSegment(go.PathSegment.Bezier,(Ht-Lt)*nt,te*et,(Ht-Ot)*nt,(te+Lt)*et,(Ht-Lt)*nt,(te+Ot)*et)),ct}),go.Shape.defineFigureGenerator("RailShipment",function(Nt,nt,et){var ct=new go.Geometry,lt=new go.PathFigure(.1*nt,.4*et,!0);ct.add(lt),lt.add(new go.PathSegment(go.PathSegment.Line,.45*nt,.4*et)),lt.add(new go.PathSegment(go.PathSegment.Line,.45*nt,.9*et)),lt.add(new go.PathSegment(go.PathSegment.Line,.1*nt,.9*et)),lt.add(new go.PathSegment(go.PathSegment.Line,.1*nt,.4*et).close());var pt=new go.PathFigure(.45*nt,.7*et,!1);ct.add(pt),pt.add(new go.PathSegment(go.PathSegment.Line,.55*nt,.7*et));var vt=new go.PathFigure(.55*nt,.4*et,!0);ct.add(vt),vt.add(new go.PathSegment(go.PathSegment.Line,.9*nt,.4*et)),vt.add(new go.PathSegment(go.PathSegment.Line,.9*nt,.9*et)),vt.add(new go.PathSegment(go.PathSegment.Line,.55*nt,.9*et)),vt.add(new go.PathSegment(go.PathSegment.Line,.55*nt,.4*et).close());var Ht=.05,te=ie*.05,_t=.175,Xt=.95,xt=new go.PathFigure((_t-Ht)*nt,Xt*et,!0);ct.add(xt),xt.add(new go.PathSegment(go.PathSegment.Bezier,_t*nt,(Xt-Ht)*et,(_t-Ht)*nt,(Xt-te)*et,(_t-te)*nt,(Xt-Ht)*et)),xt.add(new go.PathSegment(go.PathSegment.Bezier,(_t+Ht)*nt,Xt*et,(_t+te)*nt,(Xt-Ht)*et,(_t+Ht)*nt,(Xt-te)*et)),xt.add(new go.PathSegment(go.PathSegment.Bezier,_t*nt,(Xt+Ht)*et,(_t+Ht)*nt,(Xt+te)*et,(_t+te)*nt,(Xt+Ht)*et)),xt.add(new go.PathSegment(go.PathSegment.Bezier,(_t-Ht)*nt,Xt*et,(_t-te)*nt,(Xt+Ht)*et,(_t-Ht)*nt,(Xt+te)*et));var Ht=.05,te=ie*.05,_t=.375,Xt=.95,Lt=new go.PathFigure((_t-Ht)*nt,Xt*et,!0);ct.add(Lt),Lt.add(new go.PathSegment(go.PathSegment.Bezier,_t*nt,(Xt-Ht)*et,(_t-Ht)*nt,(Xt-te)*et,(_t-te)*nt,(Xt-Ht)*et)),Lt.add(new go.PathSegment(go.PathSegment.Bezier,(_t+Ht)*nt,Xt*et,(_t+te)*nt,(Xt-Ht)*et,(_t+Ht)*nt,(Xt-te)*et)),Lt.add(new go.PathSegment(go.PathSegment.Bezier,_t*nt,(Xt+Ht)*et,(_t+Ht)*nt,(Xt+te)*et,(_t+te)*nt,(Xt+Ht)*et)),Lt.add(new go.PathSegment(go.PathSegment.Bezier,(_t-Ht)*nt,Xt*et,(_t-te)*nt,(Xt+Ht)*et,(_t-Ht)*nt,(Xt+te)*et));var Ht=.05,te=ie*.05,_t=.625,Xt=.95,Ot=new go.PathFigure((_t-Ht)*nt,Xt*et,!0);ct.add(Ot),Ot.add(new go.PathSegment(go.PathSegment.Bezier,_t*nt,(Xt-Ht)*et,(_t-Ht)*nt,(Xt-te)*et,(_t-te)*nt,(Xt-Ht)*et)),Ot.add(new go.PathSegment(go.PathSegment.Bezier,(_t+Ht)*nt,Xt*et,(_t+te)*nt,(Xt-Ht)*et,(_t+Ht)*nt,(Xt-te)*et)),Ot.add(new go.PathSegment(go.PathSegment.Bezier,_t*nt,(Xt+Ht)*et,(_t+Ht)*nt,(Xt+te)*et,(_t+te)*nt,(Xt+Ht)*et)),Ot.add(new go.PathSegment(go.PathSegment.Bezier,(_t-Ht)*nt,Xt*et,(_t-te)*nt,(Xt+Ht)*et,(_t-Ht)*nt,(Xt+te)*et));var Ht=.05,te=ie*.05,_t=.825,Xt=.95,ve=new go.PathFigure((_t-Ht)*nt,Xt*et,!0);ct.add(ve),ve.add(new go.PathSegment(go.PathSegment.Bezier,_t*nt,(Xt-Ht)*et,(_t-Ht)*nt,(Xt-te)*et,(_t-te)*nt,(Xt-Ht)*et)),ve.add(new go.PathSegment(go.PathSegment.Bezier,(_t+Ht)*nt,Xt*et,(_t+te)*nt,(Xt-Ht)*et,(_t+Ht)*nt,(Xt-te)*et)),ve.add(new go.PathSegment(go.PathSegment.Bezier,_t*nt,(Xt+Ht)*et,(_t+Ht)*nt,(Xt+te)*et,(_t+te)*nt,(Xt+Ht)*et)),ve.add(new go.PathSegment(go.PathSegment.Bezier,(_t-Ht)*nt,Xt*et,(_t-te)*nt,(Xt+Ht)*et,(_t-Ht)*nt,(Xt+te)*et).close());var oe=new go.PathFigure(0,et,!1);return ct.add(oe),oe.add(new go.PathSegment(go.PathSegment.Line,nt,et).close()),ct}),go.Shape.defineFigureGenerator("Warehouse",function(Nt,nt,et){var ct=new go.Geometry,lt=new go.PathFigure(0,0,!0);ct.add(lt),lt.add(new go.PathSegment(go.PathSegment.Line,nt,0)),lt.add(new go.PathSegment(go.PathSegment.Line,nt,et)),lt.add(new go.PathSegment(go.PathSegment.Line,0,et)),lt.add(new go.PathSegment(go.PathSegment.Line,0,0).close());var pt=new go.PathFigure(0,.2*et,!1);ct.add(pt),pt.add(new go.PathSegment(go.PathSegment.Line,nt,.2*et).close());var vt=new go.PathFigure(.15*nt,et,!0);ct.add(vt),vt.add(new go.PathSegment(go.PathSegment.Line,.15*nt,.5*et)),vt.add(new go.PathSegment(go.PathSegment.Line,.4*nt,.5*et)),vt.add(new go.PathSegment(go.PathSegment.Line,.4*nt,et)),vt.add(new go.PathSegment(go.PathSegment.Line,.15*nt,et).close());var xt=.05,Lt=ie*.05,Ot=.35,Ht=.775,te=new go.PathFigure((Ot-xt)*nt,Ht*et,!0);return ct.add(te),te.add(new go.PathSegment(go.PathSegment.Bezier,Ot*nt,(Ht-xt)*et,(Ot-xt)*nt,(Ht-Lt)*et,(Ot-Lt)*nt,(Ht-xt)*et)),te.add(new go.PathSegment(go.PathSegment.Bezier,(Ot+xt)*nt,Ht*et,(Ot+Lt)*nt,(Ht-xt)*et,(Ot+xt)*nt,(Ht-Lt)*et)),te.add(new go.PathSegment(go.PathSegment.Bezier,Ot*nt,(Ht+xt)*et,(Ot+xt)*nt,(Ht+Lt)*et,(Ot+Lt)*nt,(Ht+xt)*et)),te.add(new go.PathSegment(go.PathSegment.Bezier,(Ot-xt)*nt,Ht*et,(Ot-Lt)*nt,(Ht+xt)*et,(Ot-xt)*nt,(Ht+Lt)*et).close()),ct}),go.Shape.defineFigureGenerator("ControlCenter",function(Nt,nt,et){var ct=new go.Geometry,lt=new go.PathFigure(0,et,!0);return ct.add(lt),lt.add(new go.PathSegment(go.PathSegment.Line,0,.8*et)),lt.add(new go.PathSegment(go.PathSegment.Line,.1*nt,.8*et)),lt.add(new go.PathSegment(go.PathSegment.Line,.1*nt,0)),lt.add(new go.PathSegment(go.PathSegment.Line,.9*nt,0)),lt.add(new go.PathSegment(go.PathSegment.Line,.9*nt,.8*et)),lt.add(new go.PathSegment(go.PathSegment.Line,nt,.8*et)),lt.add(new go.PathSegment(go.PathSegment.Line,nt,et)),lt.add(new go.PathSegment(go.PathSegment.Line,0,et)),lt.add(new go.PathSegment(go.PathSegment.Move,.1*nt,.8*et)),lt.add(new go.PathSegment(go.PathSegment.Line,.9*nt,.8*et).close()),ct}),go.Shape.defineFigureGenerator("Bluetooth",function(Nt,nt,et){var ct=new go.Geometry,lt=new go.PathFigure(0,.75*et,!1);return ct.add(lt),lt.add(new go.PathSegment(go.PathSegment.Line,0,.75*et)),lt.add(new go.PathSegment(go.PathSegment.Line,nt,.25*et)),lt.add(new go.PathSegment(go.PathSegment.Line,.5*nt,0)),lt.add(new go.PathSegment(go.PathSegment.Line,.5*nt,et)),lt.add(new go.PathSegment(go.PathSegment.Line,nt,.75*et)),lt.add(new go.PathSegment(go.PathSegment.Line,0,.25*et)),ct}),go.Shape.defineFigureGenerator("Bookmark",function(Nt,nt,et){var ct=new go.Geometry,lt=new go.PathFigure(0,0,!0);return ct.add(lt),lt.add(new go.PathSegment(go.PathSegment.Line,0,et)),lt.add(new go.PathSegment(go.PathSegment.Line,.5*nt,.6*et)),lt.add(new go.PathSegment(go.PathSegment.Line,nt,et)),lt.add(new go.PathSegment(go.PathSegment.Line,nt,0)),lt.add(new go.PathSegment(go.PathSegment.Line,0,0)),lt.add(new go.PathSegment(go.PathSegment.Move,.2*nt,.2*et)),lt.add(new go.PathSegment(go.PathSegment.Line,.8*nt,.2*et)),lt.add(new go.PathSegment(go.PathSegment.Move,.2*nt,.4*et)),lt.add(new go.PathSegment(go.PathSegment.Line,.8*nt,.4*et)),ct}),go.Shape.defineFigureGenerator("Bookmark",function(Nt,nt,et){var ct=new go.Geometry,lt=new go.PathFigure(0,0,!0);return ct.add(lt),lt.add(new go.PathSegment(go.PathSegment.Line,0,et)),lt.add(new go.PathSegment(go.PathSegment.Line,.5*nt,.6*et)),lt.add(new go.PathSegment(go.PathSegment.Line,nt,et)),lt.add(new go.PathSegment(go.PathSegment.Line,nt,0)),lt.add(new go.PathSegment(go.PathSegment.Line,0,0)),lt.add(new go.PathSegment(go.PathSegment.Move,.2*nt,.2*et)),lt.add(new go.PathSegment(go.PathSegment.Line,.8*nt,.2*et)),lt.add(new go.PathSegment(go.PathSegment.Move,.2*nt,.4*et)),lt.add(new go.PathSegment(go.PathSegment.Line,.8*nt,.4*et)),ct}),go.Shape.defineFigureGenerator("Globe",function(Nt,nt,et){var ct=new go.Geometry,lt=new go.PathFigure(.5*nt,0,!1);return ct.add(lt),lt.add(new go.PathSegment(go.PathSegment.Line,.5*nt,et)),lt.add(new go.PathSegment(go.PathSegment.Move,0,.5*et)),lt.add(new go.PathSegment(go.PathSegment.Line,nt,.5*et)),lt.add(new go.PathSegment(go.PathSegment.Move,.5*nt,0)),lt.add(new go.PathSegment(go.PathSegment.Bezier,nt,.5*et,.75*nt,0,nt,.25*et)),lt.add(new go.PathSegment(go.PathSegment.Bezier,.5*nt,et,nt,.75*et,.75*nt,et)),lt.add(new go.PathSegment(go.PathSegment.Bezier,0,.5*et,.25*nt,et,0,.75*et)),lt.add(new go.PathSegment(go.PathSegment.Bezier,.5*nt,0,0,.25*et,.25*nt,0)),lt.add(new go.PathSegment(go.PathSegment.Bezier,.5*nt,et,.15*nt,.25*et,.15*nt,.75*et)),lt.add(new go.PathSegment(go.PathSegment.Bezier,.5*nt,0,.85*nt,.75*et,.85*nt,.25*et)),lt.add(new go.PathSegment(go.PathSegment.Move,.1675*nt,.15*et)),lt.add(new go.PathSegment(go.PathSegment.Bezier,.8325*nt,.15*et,.35*nt,.3*et,.65*nt,.3*et)),lt.add(new go.PathSegment(go.PathSegment.Move,.1675*nt,.85*et)),lt.add(new go.PathSegment(go.PathSegment.Bezier,.8325*nt,.85*et,.35*nt,.7*et,.65*nt,.7*et)),ct}),go.Shape.defineFigureGenerator("Wave",function(Nt,nt,et){var ct=new go.Geometry,lt=new go.PathFigure(0,.25*et,!1);return ct.add(lt),lt.add(new go.PathSegment(go.PathSegment.Bezier,.3*nt,.25*et,.1*nt,0,.2*nt,0)),lt.add(new go.PathSegment(go.PathSegment.Bezier,.7*nt,.25*et,.425*nt,.5*et,.575*nt,.5*et)),lt.add(new go.PathSegment(go.PathSegment.Bezier,nt,.25*et,.8*nt,0,.9*nt,0)),lt.add(new go.PathSegment(go.PathSegment.Line,nt,.75*et)),lt.add(new go.PathSegment(go.PathSegment.Move,0,.25*et)),lt.add(new go.PathSegment(go.PathSegment.Line,0,.75*et)),lt.add(new go.PathSegment(go.PathSegment.Bezier,.3*nt,.75*et,.1*nt,.5*et,.2*nt,.5*et)),lt.add(new go.PathSegment(go.PathSegment.Bezier,.7*nt,.75*et,.425*nt,et,.575*nt,et)),lt.add(new go.PathSegment(go.PathSegment.Bezier,nt,.75*et,.8*nt,.5*et,.9*nt,.5*et)),ct}),go.Shape.defineFigureGenerator("Operator",function(Nt,nt,et){var ct=new go.Geometry,lt=.3,pt=ie*.3,vt=.5,xt=.7,Lt=new go.PathFigure((vt-lt)*nt,xt*et,!0);ct.add(Lt),Lt.add(new go.PathSegment(go.PathSegment.Bezier,vt*nt,(xt-lt)*et,(vt-lt)*nt,(xt-pt)*et,(vt-pt)*nt,(xt-lt)*et)),Lt.add(new go.PathSegment(go.PathSegment.Bezier,(vt+lt)*nt,xt*et,(vt+pt)*nt,(xt-lt)*et,(vt+lt)*nt,(xt-pt)*et)),Lt.add(new go.PathSegment(go.PathSegment.Bezier,vt*nt,(xt+lt)*et,(vt+lt)*nt,(xt+pt)*et,(vt+pt)*nt,(xt+lt)*et)),Lt.add(new go.PathSegment(go.PathSegment.Bezier,(vt-lt)*nt,xt*et,(vt-pt)*nt,(xt+lt)*et,(vt-lt)*nt,(xt+pt)*et));var Ot=new go.PathFigure(0,.7*et,!1);return ct.add(Ot),Ot.add(new go.PathSegment(go.PathSegment.Bezier,nt,.7*et,0,0,nt,0)),ct}),go.Shape.defineFigureGenerator("TripleFanBlades",function(Nt,nt,et){var ct=new go.Geometry,lt=new go.PathFigure(.5*nt,0,!0);return ct.add(lt),lt.add(new go.PathSegment(go.PathSegment.Bezier,.5*nt,.65*et,.65*nt,.3*et,.65*nt,.5*et)),lt.add(new go.PathSegment(go.PathSegment.Bezier,.5*nt,0,.35*nt,.5*et,.35*nt,.3*et)),lt.add(new go.PathSegment(go.PathSegment.Move,.5*nt,.65*et)),lt.add(new go.PathSegment(go.PathSegment.Bezier,0,et,.3*nt,.6*et,.1*nt,.8*et)),lt.add(new go.PathSegment(go.PathSegment.Bezier,.5*nt,.65*et,.2*nt,et,.35*nt,.95*et)),lt.add(new go.PathSegment(go.PathSegment.Move,.5*nt,.65*et)),lt.add(new go.PathSegment(go.PathSegment.Bezier,nt,et,.7*nt,.6*et,.9*nt,.8*et)),lt.add(new go.PathSegment(go.PathSegment.Bezier,.5*nt,.65*et,.8*nt,et,.65*nt,.95*et)),ct}),go.Shape.defineFigureGenerator("CentrifugalPump",function(Nt,nt,et){var ct=new go.Geometry,lt=new go.PathFigure(nt,0,!0);return ct.add(lt),lt.add(new go.PathSegment(go.PathSegment.Line,.4*nt,0)),lt.add(new go.PathSegment(go.PathSegment.Bezier,0,.5*et,0,.075*et,0,.5*et)),lt.add(new go.PathSegment(go.PathSegment.Bezier,.4*nt,et,0,et,.4*nt,et)),lt.add(new go.PathSegment(go.PathSegment.Bezier,.8*nt,.4*et,.8*nt,et,.85*nt,.6*et)),lt.add(new go.PathSegment(go.PathSegment.Line,nt,.4*et)),lt.add(new go.PathSegment(go.PathSegment.Line,nt,0)),ct}),go.Shape.defineFigureGenerator("Battery",function(Nt,nt,et){var ct=new go.Geometry,lt=new go.PathFigure(0,et,!0);ct.add(lt),lt.add(new go.PathSegment(go.PathSegment.Line,0,.1*et)),lt.add(new go.PathSegment(go.PathSegment.Line,nt,.1*et)),lt.add(new go.PathSegment(go.PathSegment.Line,nt,et)),lt.add(new go.PathSegment(go.PathSegment.Line,0,et)),lt.add(new go.PathSegment(go.PathSegment.Move,.4*nt,.1*et)),lt.add(new go.PathSegment(go.PathSegment.Line,.4*nt,0)),lt.add(new go.PathSegment(go.PathSegment.Line,.6*nt,0)),lt.add(new go.PathSegment(go.PathSegment.Line,.6*nt,.1*et));var pt=new go.PathFigure(0,.6*et,!1);return ct.add(pt),pt.add(new go.PathSegment(go.PathSegment.Move,0,.4*et)),pt.add(new go.PathSegment(go.PathSegment.Line,nt,.4*et)),ct}),go.Shape.defineFigureGenerator("Delete",function(Nt,nt,et){var ct=new go.Geometry,lt=.5,pt=ie*.5,vt=.5,xt=.5,Lt=new go.PathFigure((vt-lt)*nt,xt*et,!0);ct.add(Lt),Lt.add(new go.PathSegment(go.PathSegment.Bezier,vt*nt,(xt-lt)*et,(vt-lt)*nt,(xt-pt)*et,(vt-pt)*nt,(xt-lt)*et)),Lt.add(new go.PathSegment(go.PathSegment.Bezier,(vt+lt)*nt,xt*et,(vt+pt)*nt,(xt-lt)*et,(vt+lt)*nt,(xt-pt)*et)),Lt.add(new go.PathSegment(go.PathSegment.Bezier,vt*nt,(xt+lt)*et,(vt+lt)*nt,(xt+pt)*et,(vt+pt)*nt,(xt+lt)*et)),Lt.add(new go.PathSegment(go.PathSegment.Bezier,(vt-lt)*nt,xt*et,(vt-pt)*nt,(xt+lt)*et,(vt-lt)*nt,(xt+pt)*et));var Ot=new go.PathFigure(.15*nt,.5*et,!1);return ct.add(Ot),Ot.add(new go.PathSegment(go.PathSegment.Line,.85*nt,.5*et)),ct}),go.Shape.defineFigureGenerator("Flag",function(Nt,nt,et){var ct=new go.Geometry,lt=new go.PathFigure(0,.1*et,!0);return ct.add(lt),lt.add(new go.PathSegment(go.PathSegment.Line,0,et)),lt.add(new go.PathSegment(go.PathSegment.Move,0,.1*et)),lt.add(new go.PathSegment(go.PathSegment.Bezier,.5*nt,.1*et,.15*nt,0,.35*nt,0)),lt.add(new go.PathSegment(go.PathSegment.Bezier,nt,.1*et,.65*nt,.2*et,.85*nt,.2*et)),lt.add(new go.PathSegment(go.PathSegment.Line,nt,.5*et)),lt.add(new go.PathSegment(go.PathSegment.Bezier,.5*nt,.5*et,.85*nt,.6*et,.65*nt,.6*et)),lt.add(new go.PathSegment(go.PathSegment.Bezier,0,.5*et,.35*nt,.4*et,.15*nt,.4*et).close()),ct}),go.Shape.defineFigureGenerator("Help",function(Nt,nt,et){var ct=new go.Geometry,lt=.5,pt=ie*.5,vt=.5,xt=.5,Lt=new go.PathFigure((vt-lt)*nt,xt*et,!1);ct.add(Lt),Lt.add(new go.PathSegment(go.PathSegment.Bezier,vt*nt,(xt-lt)*et,(vt-lt)*nt,(xt-pt)*et,(vt-pt)*nt,(xt-lt)*et)),Lt.add(new go.PathSegment(go.PathSegment.Bezier,(vt+lt)*nt,xt*et,(vt+pt)*nt,(xt-lt)*et,(vt+lt)*nt,(xt-pt)*et)),Lt.add(new go.PathSegment(go.PathSegment.Bezier,vt*nt,(xt+lt)*et,(vt+lt)*nt,(xt+pt)*et,(vt+pt)*nt,(xt+lt)*et)),Lt.add(new go.PathSegment(go.PathSegment.Bezier,(vt-lt)*nt,xt*et,(vt-pt)*nt,(xt+lt)*et,(vt-lt)*nt,(xt+pt)*et).close()),lt=.05,pt=ie*.05,vt=.5,xt=.8;var Ot=new go.PathFigure((vt-lt)*nt,xt*et,!1);return ct.add(Ot),Ot.add(new go.PathSegment(go.PathSegment.Bezier,vt*nt,(xt-lt)*et,(vt-lt)*nt,(xt-pt)*et,(vt-pt)*nt,(xt-lt)*et)),Ot.add(new go.PathSegment(go.PathSegment.Bezier,(vt+lt)*nt,xt*et,(vt+pt)*nt,(xt-lt)*et,(vt+lt)*nt,(xt-pt)*et)),Ot.add(new go.PathSegment(go.PathSegment.Bezier,vt*nt,(xt+lt)*et,(vt+lt)*nt,(xt+pt)*et,(vt+pt)*nt,(xt+lt)*et)),Ot.add(new go.PathSegment(go.PathSegment.Bezier,(vt-lt)*nt,xt*et,(vt-pt)*nt,(xt+lt)*et,(vt-lt)*nt,(xt+pt)*et).close()),Ot.add(new go.PathSegment(go.PathSegment.Move,.5*nt,.7*et)),Ot.add(new go.PathSegment(go.PathSegment.Line,.5*nt,.5*et)),Ot.add(new go.PathSegment(go.PathSegment.Bezier,.5*nt,.2*et,.75*nt,.475*et,.75*nt,.225*et)),Ot.add(new go.PathSegment(go.PathSegment.Bezier,.3*nt,.35*et,.4*nt,.2*et,.3*nt,.25*et)),ct}),go.Shape.defineFigureGenerator("Location",function(Nt,nt,et){return new go.Geometry().add(new go.PathFigure(.5*nt,et,!0).add(new go.PathSegment(go.PathSegment.Line,.75*nt,.5*et)).add(new go.PathSegment(go.PathSegment.Bezier,.5*nt,0,.975*nt,.025*et,.5*nt,0)).add(new go.PathSegment(go.PathSegment.Bezier,.25*nt,.5*et,.5*nt,0,.025*nt,.025*et).close()).add(new go.PathSegment(go.PathSegment.Move,.5*nt,.2*et)).add(new go.PathSegment(go.PathSegment.Arc,270,360,.5*nt,.3*et,.1*nt,.1*et).close()))}),go.Shape.defineFigureGenerator("Lock",function(Nt,nt,et){var ct=new go.Geometry,lt=new go.PathFigure(0,.5*et,!0);ct.add(lt),lt.add(new go.PathSegment(go.PathSegment.Line,0,et)),lt.add(new go.PathSegment(go.PathSegment.Line,nt,et)),lt.add(new go.PathSegment(go.PathSegment.Line,nt,.5*et)),lt.add(new go.PathSegment(go.PathSegment.Line,0,.5*et));var pt=new go.PathFigure(.2*nt,.5*et,!1);return ct.add(pt),pt.add(new go.PathSegment(go.PathSegment.Move,.2*nt,.5*et)),pt.add(new go.PathSegment(go.PathSegment.Line,.2*nt,.3*et)),pt.add(new go.PathSegment(go.PathSegment.Bezier,.8*nt,.3*et,.25*nt,0,.75*nt,0)),pt.add(new go.PathSegment(go.PathSegment.Line,.8*nt,.5*et)),pt.add(new go.PathSegment(go.PathSegment.Line,.8*nt,.3*et)),ct}),go.Shape.defineFigureGenerator("Unlocked",function(Nt,nt,et){var ct=new go.Geometry,lt=new go.PathFigure(0,.5*et,!0);ct.add(lt),lt.add(new go.PathSegment(go.PathSegment.Line,0,et)),lt.add(new go.PathSegment(go.PathSegment.Line,nt,et)),lt.add(new go.PathSegment(go.PathSegment.Line,nt,.5*et)),lt.add(new go.PathSegment(go.PathSegment.Line,0,.5*et));var pt=new go.PathFigure(.2*nt,.5*et,!1);return ct.add(pt),pt.add(new go.PathSegment(go.PathSegment.Move,.2*nt,.5*et)),pt.add(new go.PathSegment(go.PathSegment.Line,.2*nt,.3*et)),pt.add(new go.PathSegment(go.PathSegment.Bezier,.8*nt,.3*et,.25*nt,0,.75*nt,0)),pt.add(new go.PathSegment(go.PathSegment.Line,.8*nt,.35*et)),ct}),go.Shape.defineFigureGenerator("Gear",function(Nt,nt,et){return new go.Geometry().add(new go.PathFigure(.9375*nt,.56246875*et,!0).add(new go.PathSegment(go.PathSegment.Line,.9375*nt,.4375*et)).add(new go.PathSegment(go.PathSegment.Line,.80621875*nt,.4375*et)).add(new go.PathSegment(go.PathSegment.Bezier,.763*nt,.3316875*et,.79840625*nt,.39915625*et,.7834375*nt,.3635*et)).add(new go.PathSegment(go.PathSegment.Line,.8566875*nt,.23796875*et)).add(new go.PathSegment(go.PathSegment.Line,.76825*nt,.14959375*et)).add(new go.PathSegment(go.PathSegment.Line,.67596875*nt,.24184375*et)).add(new go.PathSegment(go.PathSegment.Bezier,.5625*nt,.19378125*et,.64228125*nt,.2188125*et,.603875*nt,.2021875*et)).add(new go.PathSegment(go.PathSegment.Line,.5625*nt,.0625*et)).add(new go.PathSegment(go.PathSegment.Line,.4375*nt,.0625*et)).add(new go.PathSegment(go.PathSegment.Line,.4375*nt,.19378125*et)).add(new go.PathSegment(go.PathSegment.Bezier,.32775*nt,.239375*et,.39759375*nt,.20190625*et,.36053125*nt,.2176875*et)).add(new go.PathSegment(go.PathSegment.Line,.2379375*nt,.14959375*et)).add(new go.PathSegment(go.PathSegment.Line,.14953125*nt,.2379375*et)).add(new go.PathSegment(go.PathSegment.Line,.23934375*nt,.3278125*et)).add(new go.PathSegment(go.PathSegment.Bezier,.19378125*nt,.4375*et,.21765625*nt,.36059375*et,.201875*nt,.397625*et)).add(new go.PathSegment(go.PathSegment.Line,.0625*nt,.4375*et)).add(new go.PathSegment(go.PathSegment.Line,.0625*nt,.5625*et)).add(new go.PathSegment(go.PathSegment.Line,.1938125*nt,.5625*et)).add(new go.PathSegment(go.PathSegment.Bezier,.241875*nt,.67596875*et,.20221875*nt,.603875*et,.21884375*nt,.64228125*et)).add(new go.PathSegment(go.PathSegment.Line,.1495625*nt,.76825*et)).add(new go.PathSegment(go.PathSegment.Line,.238*nt,.8566875*et)).add(new go.PathSegment(go.PathSegment.Line,.3316875*nt,.76296875*et)).add(new go.PathSegment(go.PathSegment.Bezier,.43753125*nt,.80621875*et,.36353125*nt,.78340625*et,.3991875*nt,.79840625*et)).add(new go.PathSegment(go.PathSegment.Line,.43753125*nt,.9375*et)).add(new go.PathSegment(go.PathSegment.Line,.5625*nt,.9375*et)).add(new go.PathSegment(go.PathSegment.Line,.5625*nt,.80621875*et)).add(new go.PathSegment(go.PathSegment.Bezier,.67225*nt,.760625*et,.602375*nt,.79809375*et,.63946875*nt,.78234375*et)).add(new go.PathSegment(go.PathSegment.Line,.76828125*nt,.8566875*et)).add(new go.PathSegment(go.PathSegment.Line,.85671875*nt,.76825*et)).add(new go.PathSegment(go.PathSegment.Line,.76065625*nt,.67221875*et)).add(new go.PathSegment(go.PathSegment.Bezier,.80621875*nt,.56246875*et,.78234375*nt,.63940625*et,.798125*nt,.602375*et)).add(new go.PathSegment(go.PathSegment.Line,.9375*nt,.56246875*et).close()).add(new go.PathSegment(go.PathSegment.Move,.5*nt,.6*et)).add(new go.PathSegment(go.PathSegment.Arc,90,360,.5*nt,.5*et,.1*nt,.1*et).close()))}),go.Shape.defineFigureGenerator("Hand",function(Nt,nt,et){var ct=new go.Geometry,lt=new go.PathFigure(0,.5*et,!0);return ct.add(lt),lt.add(new go.PathSegment(go.PathSegment.Bezier,.1*nt,.3*et,0,.375*et,.05*nt,.325*et)),lt.add(new go.PathSegment(go.PathSegment.Bezier,.45*nt,.075*et,.3*nt,.225*et,.4*nt,.175*et)),lt.add(new go.PathSegment(go.PathSegment.Bezier,.525*nt,.075*et,.46*nt,.05*et,.525*nt,.05*et)),lt.add(new go.PathSegment(go.PathSegment.Bezier,.3*nt,.4*et,.525*nt,.275*et,.475*nt,.325*et)),lt.add(new go.PathSegment(go.PathSegment.Line,.9*nt,.4*et)),lt.add(new go.PathSegment(go.PathSegment.Bezier,.9*nt,.55*et,nt,.4*et,nt,.55*et)),lt.add(new go.PathSegment(go.PathSegment.Line,.425*nt,.55*et)),lt.add(new go.PathSegment(go.PathSegment.Line,.6*nt,.55*et)),lt.add(new go.PathSegment(go.PathSegment.Bezier,.6*nt,.7*et,.675*nt,.55*et,.675*nt,.7*et)),lt.add(new go.PathSegment(go.PathSegment.Line,.4*nt,.7*et)),lt.add(new go.PathSegment(go.PathSegment.Line,.575*nt,.7*et)),lt.add(new go.PathSegment(go.PathSegment.Bezier,.575*nt,.85*et,.65*nt,.7*et,.65*nt,.85*et)),lt.add(new go.PathSegment(go.PathSegment.Line,.4*nt,.85*et)),lt.add(new go.PathSegment(go.PathSegment.Line,.525*nt,.85*et)),lt.add(new go.PathSegment(go.PathSegment.Bezier,.535*nt,et,.61*nt,.85*et,.61*nt,et)),lt.add(new go.PathSegment(go.PathSegment.Bezier,0,.9*et,.435*nt,et,0,et).close()),ct}),go.Shape.defineFigureGenerator("Map",function(Nt,nt,et){var ct=new go.Geometry,lt=new go.PathFigure(0,.2*et,!0);return ct.add(lt),lt.add(new go.PathSegment(go.PathSegment.Line,.25*nt,0)),lt.add(new go.PathSegment(go.PathSegment.Line,.5*nt,.2*et)),lt.add(new go.PathSegment(go.PathSegment.Line,.75*nt,0)),lt.add(new go.PathSegment(go.PathSegment.Line,nt,.2*et)),lt.add(new go.PathSegment(go.PathSegment.Line,nt,et)),lt.add(new go.PathSegment(go.PathSegment.Line,.75*nt,.8*et)),lt.add(new go.PathSegment(go.PathSegment.Line,.5*nt,et)),lt.add(new go.PathSegment(go.PathSegment.Line,.25*nt,.8*et)),lt.add(new go.PathSegment(go.PathSegment.Line,0,et).close()),lt.add(new go.PathSegment(go.PathSegment.Move,.25*nt,0)),lt.add(new go.PathSegment(go.PathSegment.Line,.25*nt,.8*et)),lt.add(new go.PathSegment(go.PathSegment.Move,.5*nt,.2*et)),lt.add(new go.PathSegment(go.PathSegment.Line,.5*nt,et)),lt.add(new go.PathSegment(go.PathSegment.Move,.75*nt,0)),lt.add(new go.PathSegment(go.PathSegment.Line,.75*nt,.8*et)),ct}),go.Shape.defineFigureGenerator("Eject",function(Nt,nt,et){var ct=new go.Geometry,lt=new go.PathFigure(0,et,!0);ct.add(lt),lt.add(new go.PathSegment(go.PathSegment.Line,nt,et)),lt.add(new go.PathSegment(go.PathSegment.Line,nt,et*.7)),lt.add(new go.PathSegment(go.PathSegment.Line,0,et*.7).close());var pt=new go.PathFigure(0,et*.6,!0);return ct.add(pt),pt.add(new go.PathSegment(go.PathSegment.Line,nt,.6*et)),pt.add(new go.PathSegment(go.PathSegment.Line,.5*nt,0).close()),ct}),go.Shape.defineFigureGenerator("Pencil",function(Nt,nt,et){return new go.Geometry().add(new go.PathFigure(0,0,!0).add(new go.PathSegment(go.PathSegment.Line,.2*nt,.1*et)).add(new go.PathSegment(go.PathSegment.Line,nt,.9*et)).add(new go.PathSegment(go.PathSegment.Line,.9*nt,et)).add(new go.PathSegment(go.PathSegment.Line,.1*nt,.2*et).close()))}),go.Shape.defineFigureGenerator("Building",function(Nt,nt,et){var ct=new go.Geometry,lt=new go.PathFigure(nt*1,et*1,!1);ct.add(lt),lt.add(new go.PathSegment(go.PathSegment.Line,0,et*1)),lt.add(new go.PathSegment(go.PathSegment.Line,0,et*.85)),lt.add(new go.PathSegment(go.PathSegment.Line,.046*nt,et*.85)),lt.add(new go.PathSegment(go.PathSegment.Line,.046*nt,et*.45)),lt.add(new go.PathSegment(go.PathSegment.Line,0,et*.45)),lt.add(new go.PathSegment(go.PathSegment.Line,0,et*.3)),lt.add(new go.PathSegment(go.PathSegment.Line,.046*nt,et*.3)),lt.add(new go.PathSegment(go.PathSegment.Line,.5*nt,et*0)),lt.add(new go.PathSegment(go.PathSegment.Line,(1-.046)*nt,et*.3)),lt.add(new go.PathSegment(go.PathSegment.Line,nt,et*.3)),lt.add(new go.PathSegment(go.PathSegment.Line,nt,et*.45)),lt.add(new go.PathSegment(go.PathSegment.Line,(1-.046)*nt,et*.45)),lt.add(new go.PathSegment(go.PathSegment.Line,(1-.046)*nt,et*.85)),lt.add(new go.PathSegment(go.PathSegment.Line,nt,et*.85).close());var pt=new go.PathFigure(.126*nt,.85*et,!1);ct.add(pt),pt.add(new go.PathSegment(go.PathSegment.Line,.126*nt,.45*et)),pt.add(new go.PathSegment(go.PathSegment.Line,.322*nt,.45*et)),pt.add(new go.PathSegment(go.PathSegment.Line,.322*nt,.85*et).close());var vt=new go.PathFigure(.402*nt,.85*et,!1);ct.add(vt),vt.add(new go.PathSegment(go.PathSegment.Line,.402*nt,.45*et)),vt.add(new go.PathSegment(go.PathSegment.Line,.598*nt,.45*et)),vt.add(new go.PathSegment(go.PathSegment.Line,.598*nt,.85*et).close());var xt=new go.PathFigure(.678*nt,.85*et,!1);ct.add(xt),xt.add(new go.PathSegment(go.PathSegment.Line,.678*nt,.45*et)),xt.add(new go.PathSegment(go.PathSegment.Line,.874*nt,.45*et)),xt.add(new go.PathSegment(go.PathSegment.Line,.874*nt,.85*et).close());var Lt=new go.PathFigure(.5*nt,.1*et,!1);return ct.add(Lt),Lt.add(new go.PathSegment(go.PathSegment.Line,(.046+.15)*nt,.3*et)),Lt.add(new go.PathSegment(go.PathSegment.Line,(1-(.046+.15))*nt,.3*et).close()),ct}),go.Shape.defineFigureGenerator("Staircase",function(Nt,nt,et){var ct=new go.Geometry,lt=new go.PathFigure(0,et*1,!0);return ct.add(lt),lt.add(new go.PathSegment(go.PathSegment.Line,nt*.2,et*1)),lt.add(new go.PathSegment(go.PathSegment.Line,nt*.2,et*.8)),lt.add(new go.PathSegment(go.PathSegment.Line,nt*.4,et*.8)),lt.add(new go.PathSegment(go.PathSegment.Line,nt*.4,et*.6)),lt.add(new go.PathSegment(go.PathSegment.Line,nt*.6,et*.6)),lt.add(new go.PathSegment(go.PathSegment.Line,nt*.6,et*.4)),lt.add(new go.PathSegment(go.PathSegment.Line,nt*.8,et*.4)),lt.add(new go.PathSegment(go.PathSegment.Line,nt*.8,et*.2)),lt.add(new go.PathSegment(go.PathSegment.Line,nt*1,et*.2)),lt.add(new go.PathSegment(go.PathSegment.Line,nt*1,et*.15)),lt.add(new go.PathSegment(go.PathSegment.Line,nt*.75,et*.15)),lt.add(new go.PathSegment(go.PathSegment.Line,nt*.75,et*.35)),lt.add(new go.PathSegment(go.PathSegment.Line,nt*.55,et*.35)),lt.add(new go.PathSegment(go.PathSegment.Line,nt*.55,et*.55)),lt.add(new go.PathSegment(go.PathSegment.Line,nt*.35,et*.55)),lt.add(new go.PathSegment(go.PathSegment.Line,nt*.35,et*.75)),lt.add(new go.PathSegment(go.PathSegment.Line,nt*.15,et*.75)),lt.add(new go.PathSegment(go.PathSegment.Line,nt*.15,et*.95)),lt.add(new go.PathSegment(go.PathSegment.Line,0,et*.95).close()),ct}),go.Shape.defineFigureGenerator("5Bars",function(Nt,nt,et){var ct=new go.Geometry,lt=new go.PathFigure(0,et*1,!0);ct.add(lt),lt.add(new go.PathSegment(go.PathSegment.Line,nt*.184,et*1)),lt.add(new go.PathSegment(go.PathSegment.Line,nt*.184,et*(1-.184)).close());var pt=new go.PathFigure(nt*.204,et,!0);ct.add(pt),pt.add(new go.PathSegment(go.PathSegment.Line,nt*.204,et*(1-.184))),pt.add(new go.PathSegment(go.PathSegment.Line,nt*.388,et*(1-.184*2))),pt.add(new go.PathSegment(go.PathSegment.Line,nt*.388,et*1).close());var vt=new go.PathFigure(nt*.408,et,!0);ct.add(vt),vt.add(new go.PathSegment(go.PathSegment.Line,nt*.408,et*(1-.184*2))),vt.add(new go.PathSegment(go.PathSegment.Line,nt*.592,et*(1-.184*3))),vt.add(new go.PathSegment(go.PathSegment.Line,nt*.592,et*1).close());var xt=new go.PathFigure(nt*.612,et,!0);ct.add(xt),xt.add(new go.PathSegment(go.PathSegment.Line,nt*.612,et*(1-.184*3))),xt.add(new go.PathSegment(go.PathSegment.Line,nt*.796,et*(1-.184*4))),xt.add(new go.PathSegment(go.PathSegment.Line,nt*.796,et*1).close());var Lt=new go.PathFigure(nt*.816,et,!0);return ct.add(Lt),Lt.add(new go.PathSegment(go.PathSegment.Line,nt*.816,et*(1-.184*4))),Lt.add(new go.PathSegment(go.PathSegment.Line,nt*1,et*(1-.184*5))),Lt.add(new go.PathSegment(go.PathSegment.Line,nt*1,et*1).close()),ct}),go.Shape.defineFigureGenerator("PC",function(Nt,nt,et){var ct=new go.Geometry,lt=new go.PathFigure(0,0,!0);ct.add(lt),lt.add(new go.PathSegment(go.PathSegment.Line,0,et*1)),lt.add(new go.PathSegment(go.PathSegment.Line,nt*.3,et*1)),lt.add(new go.PathSegment(go.PathSegment.Line,nt*.3,0).close());var pt=new go.PathFigure(nt*.055,.07*et,!0);ct.add(pt),pt.add(new go.PathSegment(go.PathSegment.Line,nt*.245,et*.07)),pt.add(new go.PathSegment(go.PathSegment.Line,nt*.245,et*.1)),pt.add(new go.PathSegment(go.PathSegment.Line,nt*.055,et*.1).close());var vt=new go.PathFigure(nt*.055,.13*et,!0);ct.add(vt),vt.add(new go.PathSegment(go.PathSegment.Line,nt*.245,et*.13)),vt.add(new go.PathSegment(go.PathSegment.Line,nt*.245,et*.16)),vt.add(new go.PathSegment(go.PathSegment.Line,nt*.055,et*.16).close());var xt=new go.PathFigure(nt*.055,.18*et,!0);ct.add(xt),xt.add(new go.PathSegment(go.PathSegment.Line,nt*.245,et*.18)),xt.add(new go.PathSegment(go.PathSegment.Line,nt*.245,et*.21)),xt.add(new go.PathSegment(go.PathSegment.Line,nt*.055,et*.21).close());var Lt=new go.PathFigure(nt*1,0,!0);return ct.add(Lt),Lt.add(new go.PathSegment(go.PathSegment.Line,nt*.4,0)),Lt.add(new go.PathSegment(go.PathSegment.Line,nt*.4,et*.65)),Lt.add(new go.PathSegment(go.PathSegment.Line,nt*1,et*.65).close()),ct}),go.Shape.defineFigureGenerator("Plane",function(Nt,nt,et){var ct=new go.Geometry,lt=new go.PathFigure(.55*nt,et,!0);return ct.add(lt),lt.add(new go.PathSegment(go.PathSegment.Line,.5*nt,.6*et)),lt.add(new go.PathSegment(go.PathSegment.Line,.4*nt,.7*et)),lt.add(new go.PathSegment(go.PathSegment.Line,.1*nt,.475*et)),lt.add(new go.PathSegment(go.PathSegment.Bezier,.35*nt,.525*et,0,.4*et,.225*nt,.45*et)),lt.add(new go.PathSegment(go.PathSegment.Line,.4*nt,.475*et)),lt.add(new go.PathSegment(go.PathSegment.Line,.15*nt,.35*et)),lt.add(new go.PathSegment(go.PathSegment.Line,.2*nt,.325*et)),lt.add(new go.PathSegment(go.PathSegment.Line,.6*nt,.325*et)),lt.add(new go.PathSegment(go.PathSegment.Line,.85*nt,.1*et)),lt.add(new go.PathSegment(go.PathSegment.Bezier,.9*nt,.2*et,.975*nt,0,nt,.08*et)),lt.add(new go.PathSegment(go.PathSegment.Line,.7*nt,.45*et)),lt.add(new go.PathSegment(go.PathSegment.Line,.6*nt,.95*et)),lt.add(new go.PathSegment(go.PathSegment.Line,.55*nt,et).close()),ct}),go.Shape.defineFigureGenerator("Key",function(Nt,nt,et){var ct=new go.Geometry,lt=new go.PathFigure(nt*1,et*.5,!0);return ct.add(lt),lt.add(new go.PathSegment(go.PathSegment.Line,nt*.9,.4*et)),lt.add(new go.PathSegment(go.PathSegment.Line,nt*.5,.4*et)),lt.add(new go.PathSegment(go.PathSegment.Line,nt*.5,.35*et)),lt.add(new go.PathSegment(go.PathSegment.Line,nt*.45,.35*et)),lt.add(new go.PathSegment(go.PathSegment.Line,nt*.3,.2*et)),lt.add(new go.PathSegment(go.PathSegment.Line,nt*.15,.2*et)),lt.add(new go.PathSegment(go.PathSegment.Line,0,.35*et)),lt.add(new go.PathSegment(go.PathSegment.Line,0,.65*et)),lt.add(new go.PathSegment(go.PathSegment.Line,nt*.15,.8*et)),lt.add(new go.PathSegment(go.PathSegment.Line,nt*.3,.8*et)),lt.add(new go.PathSegment(go.PathSegment.Line,nt*.45,.65*et)),lt.add(new go.PathSegment(go.PathSegment.Line,nt*.5,.65*et)),lt.add(new go.PathSegment(go.PathSegment.Line,nt*.5,.6*et)),lt.add(new go.PathSegment(go.PathSegment.Line,nt*.6,.6*et)),lt.add(new go.PathSegment(go.PathSegment.Line,nt*.65,.55*et)),lt.add(new go.PathSegment(go.PathSegment.Line,nt*.7,.6*et)),lt.add(new go.PathSegment(go.PathSegment.Line,nt*.75,.55*et)),lt.add(new go.PathSegment(go.PathSegment.Line,nt*.8,.6*et)),lt.add(new go.PathSegment(go.PathSegment.Line,nt*.85,.575*et)),lt.add(new go.PathSegment(go.PathSegment.Line,nt*.9,.6*et).close()),lt.add(new go.PathSegment(go.PathSegment.Move,.17*nt,.425*et)),lt.add(new go.PathSegment(go.PathSegment.Arc,270,360,.17*nt,.5*et,.075*nt,.075*et).close()),ct}),go.Shape.defineFigureGenerator("FilmTape",function(Nt,nt,et){var ct=new go.Geometry,lt=new go.PathFigure(0,0,!1);ct.add(lt),lt.add(new go.PathSegment(go.PathSegment.Arc,270,180,nt*0,nt*.3,nt*.055)),lt.add(new go.PathSegment(go.PathSegment.Line,0,et*1)),lt.add(new go.PathSegment(go.PathSegment.Line,nt*.08,et*1)),lt.add(new go.PathSegment(go.PathSegment.Line,nt*.08,et*.95)),lt.add(new go.PathSegment(go.PathSegment.Line,nt*(.08+.056*1),et*.95)),lt.add(new go.PathSegment(go.PathSegment.Line,nt*(.08+.056*1),et*1)),lt.add(new go.PathSegment(go.PathSegment.Line,nt*(.08+.056*2),et*1)),lt.add(new go.PathSegment(go.PathSegment.Line,nt*(.08+.056*2),et*.95)),lt.add(new go.PathSegment(go.PathSegment.Line,nt*(.08+.056*3),et*.95)),lt.add(new go.PathSegment(go.PathSegment.Line,nt*(.08+.056*3),et*1)),lt.add(new go.PathSegment(go.PathSegment.Line,nt*(.08+.056*4),et*1)),lt.add(new go.PathSegment(go.PathSegment.Line,nt*(.08+.056*4),et*.95)),lt.add(new go.PathSegment(go.PathSegment.Line,nt*(.08+.056*5),et*.95)),lt.add(new go.PathSegment(go.PathSegment.Line,nt*(.08+.056*5),et*1)),lt.add(new go.PathSegment(go.PathSegment.Line,nt*(.08+.056*6),et*1)),lt.add(new go.PathSegment(go.PathSegment.Line,nt*(.08+.056*6),et*.95)),lt.add(new go.PathSegment(go.PathSegment.Line,nt*(.08+.056*7),et*.95)),lt.add(new go.PathSegment(go.PathSegment.Line,nt*(.08+.056*7),et*1)),lt.add(new go.PathSegment(go.PathSegment.Line,nt*(.08+.056*8),et*1)),lt.add(new go.PathSegment(go.PathSegment.Line,nt*(.08+.056*8),et*.95)),lt.add(new go.PathSegment(go.PathSegment.Line,nt*(.08+.056*9),et*.95)),lt.add(new go.PathSegment(go.PathSegment.Line,nt*(.08+.056*9),et*1)),lt.add(new go.PathSegment(go.PathSegment.Line,nt*(.08+.056*10),et*1)),lt.add(new go.PathSegment(go.PathSegment.Line,nt*(.08+.056*10),et*.95)),lt.add(new go.PathSegment(go.PathSegment.Line,nt*(.08+.056*11),et*.95)),lt.add(new go.PathSegment(go.PathSegment.Line,nt*(.08+.056*11),et*1)),lt.add(new go.PathSegment(go.PathSegment.Line,nt*(.08+.056*12),et*1)),lt.add(new go.PathSegment(go.PathSegment.Line,nt*(.08+.056*12),et*.95)),lt.add(new go.PathSegment(go.PathSegment.Line,nt*(.08+.056*13),et*.95)),lt.add(new go.PathSegment(go.PathSegment.Line,nt*(.08+.056*13),et*1)),lt.add(new go.PathSegment(go.PathSegment.Line,nt*(.08+.056*14),et*1)),lt.add(new go.PathSegment(go.PathSegment.Line,nt*(.08+.056*14),et*.95)),lt.add(new go.PathSegment(go.PathSegment.Line,nt*(.08+.056*15),et*.95)),lt.add(new go.PathSegment(go.PathSegment.Line,nt*(.08+.056*15),et*1)),lt.add(new go.PathSegment(go.PathSegment.Line,nt*1,et*1)),lt.add(new go.PathSegment(go.PathSegment.Line,nt*1,et*1));var pt=new go.PathFigure(0,0,!1);ct.add(pt),pt.add(new go.PathSegment(go.PathSegment.Line,nt*1,et*0)),pt.add(new go.PathSegment(go.PathSegment.Arc,270,-180,nt*1,nt*.3,nt*.055)),pt.add(new go.PathSegment(go.PathSegment.Line,nt*1,et*1));var vt=new go.PathFigure(nt*.11,et*.1,!1);ct.add(vt),vt.add(new go.PathSegment(go.PathSegment.Line,nt*(.11+.24133333*1+.028*0),et*.1)),vt.add(new go.PathSegment(go.PathSegment.Line,nt*(.11+.24133333*1+.028*0),et*.8)),vt.add(new go.PathSegment(go.PathSegment.Line,nt*.11,et*.8).close());var xt=new go.PathFigure(nt*(.11+.24133333*1+.028*1),et*.1,!1);ct.add(xt),xt.add(new go.PathSegment(go.PathSegment.Line,nt*(.11+.24133333*2+.028*1),et*.1)),xt.add(new go.PathSegment(go.PathSegment.Line,nt*(.11+.24133333*2+.028*1),et*.8)),xt.add(new go.PathSegment(go.PathSegment.Line,nt*(.11+.24133333*1+.028*1),et*.8).close());var Lt=new go.PathFigure(nt*(.11+.24133333*2+.028*2),et*.1,!1);return ct.add(Lt),Lt.add(new go.PathSegment(go.PathSegment.Line,nt*(.11+.24133333*3+.028*2),et*.1)),Lt.add(new go.PathSegment(go.PathSegment.Line,nt*(.11+.24133333*3+.028*2),et*.8)),Lt.add(new go.PathSegment(go.PathSegment.Line,nt*(.11+.24133333*2+.028*2),et*.8).close()),ct}),go.Shape.defineFigureGenerator("FloppyDisk",function(Nt,nt,et){var ct=new go.Geometry,lt=8,pt=lt*ie,vt=new go.PathFigure(lt,0,!1);ct.add(vt),vt.add(new go.PathSegment(go.PathSegment.Line,nt*.86,0)),vt.add(new go.PathSegment(go.PathSegment.Line,nt*1,et*.14)),vt.add(new go.PathSegment(go.PathSegment.Line,nt,et-lt)),vt.add(new go.PathSegment(go.PathSegment.Bezier,nt-lt,et,nt,et-pt,nt-pt,et)),vt.add(new go.PathSegment(go.PathSegment.Line,lt,et)),vt.add(new go.PathSegment(go.PathSegment.Bezier,0,et-lt,pt,et,0,et-pt)),vt.add(new go.PathSegment(go.PathSegment.Line,0,lt)),vt.add(new go.PathSegment(go.PathSegment.Bezier,lt,0,0,pt,pt,0).close());var xt=new go.PathFigure(nt*.83,0,!1);ct.add(xt),xt.add(new go.PathSegment(go.PathSegment.Line,nt*.83,et*.3)),xt.add(new go.PathSegment(go.PathSegment.Line,nt*.17,et*.3)),xt.add(new go.PathSegment(go.PathSegment.Line,nt*.17,et*0).close());var Lt=new go.PathFigure(nt*.83,et*1,!1);ct.add(Lt),Lt.add(new go.PathSegment(go.PathSegment.Line,nt*.83,et*.5)),Lt.add(new go.PathSegment(go.PathSegment.Line,nt*.17,et*.5)),Lt.add(new go.PathSegment(go.PathSegment.Line,nt*.17,et*1).close());var Ot=new go.PathFigure(nt*.78,et*.05,!1);return ct.add(Ot),Ot.add(new go.PathSegment(go.PathSegment.Line,nt*.66,et*.05)),Ot.add(new go.PathSegment(go.PathSegment.Line,nt*.66,et*.25)),Ot.add(new go.PathSegment(go.PathSegment.Line,nt*.78,et*.25).close()),ct}),go.Shape.defineFigureGenerator("SpeechBubble",function(Nt,nt,et){var ct=Nt?Nt.parameter1:NaN;(isNaN(ct)||ct<0)&&(ct=15),ct=Math.min(ct,nt/3),ct=Math.min(ct,et/3);var lt=ct*ie,pt=et*.8,vt=new go.Geometry,xt=new go.PathFigure(ct,0,!0);return vt.add(xt),xt.add(new go.PathSegment(go.PathSegment.Line,nt-ct,0)),xt.add(new go.PathSegment(go.PathSegment.Bezier,nt,ct,nt-lt,0,nt,lt)),xt.add(new go.PathSegment(go.PathSegment.Line,nt,pt-ct)),xt.add(new go.PathSegment(go.PathSegment.Bezier,nt-ct,pt,nt,pt-lt,nt-lt,pt)),xt.add(new go.PathSegment(go.PathSegment.Line,nt*.7,pt)),xt.add(new go.PathSegment(go.PathSegment.Line,nt*.7,et)),xt.add(new go.PathSegment(go.PathSegment.Line,nt*.55,pt)),xt.add(new go.PathSegment(go.PathSegment.Line,ct,pt)),xt.add(new go.PathSegment(go.PathSegment.Bezier,0,pt-ct,lt,pt,0,pt-lt)),xt.add(new go.PathSegment(go.PathSegment.Line,0,ct)),xt.add(new go.PathSegment(go.PathSegment.Bezier,ct,0,0,lt,lt,0).close()),lt>1?(vt.spot1=new go.Spot(0,0,lt,lt),vt.spot2=new go.Spot(1,.8,-lt,-lt)):(vt.spot1=go.Spot.TopLeft,vt.spot2=new go.Spot(1,.8)),vt}),go.Shape.defineFigureGenerator("Repeat",function(Nt,nt,et){var ct=new go.Geometry,lt=new go.PathFigure(nt*0,et*.45,!0);ct.add(lt),lt.add(new go.PathSegment(go.PathSegment.Line,nt*.25,et*0)),lt.add(new go.PathSegment(go.PathSegment.Line,nt*.5,et*.45)),lt.add(new go.PathSegment(go.PathSegment.Line,nt*.3,et*.45)),lt.add(new go.PathSegment(go.PathSegment.Line,nt*.3,et*.9)),lt.add(new go.PathSegment(go.PathSegment.Line,nt*.6,et*.9)),lt.add(new go.PathSegment(go.PathSegment.Line,nt*.65,et*1)),lt.add(new go.PathSegment(go.PathSegment.Line,nt*.2,et*1)),lt.add(new go.PathSegment(go.PathSegment.Line,nt*.2,et*.45).close());var pt=new go.PathFigure(nt*1,et*.55,!0);return ct.add(pt),pt.add(new go.PathSegment(go.PathSegment.Line,nt*.75,et*1)),pt.add(new go.PathSegment(go.PathSegment.Line,nt*.5,et*.55)),pt.add(new go.PathSegment(go.PathSegment.Line,nt*.7,et*.55)),pt.add(new go.PathSegment(go.PathSegment.Line,nt*.7,et*.1)),pt.add(new go.PathSegment(go.PathSegment.Line,nt*.4,et*.1)),pt.add(new go.PathSegment(go.PathSegment.Line,nt*.35,et*0)),pt.add(new go.PathSegment(go.PathSegment.Line,nt*.8,et*0)),pt.add(new go.PathSegment(go.PathSegment.Line,nt*.8,et*.55).close()),ct}),go.Shape.defineFigureGenerator("Windows",function(Nt,nt,et){return new go.Geometry().add(new go.PathFigure(0,0,!0).add(new go.PathSegment(go.PathSegment.Line,nt,0)).add(new go.PathSegment(go.PathSegment.Line,nt,et)).add(new go.PathSegment(go.PathSegment.Line,0,et).close()).add(new go.PathSegment(go.PathSegment.Move,.4*nt,.4*et)).add(new go.PathSegment(go.PathSegment.Line,.4*nt,.8*et)).add(new go.PathSegment(go.PathSegment.Line,.9*nt,.8*et)).add(new go.PathSegment(go.PathSegment.Line,.9*nt,.4*et).close()).add(new go.PathSegment(go.PathSegment.Move,.2*nt,.1*et)).add(new go.PathSegment(go.PathSegment.Line,.2*nt,.6*et)).add(new go.PathSegment(go.PathSegment.Line,.7*nt,.6*et)).add(new go.PathSegment(go.PathSegment.Line,.7*nt,.1*et).close()).add(new go.PathSegment(go.PathSegment.Move,.1*nt,.6*et)).add(new go.PathSegment(go.PathSegment.Line,.1*nt,.9*et)).add(new go.PathSegment(go.PathSegment.Line,.5*nt,.9*et)).add(new go.PathSegment(go.PathSegment.Line,.5*nt,.6*et).close()))}),go.Shape.defineFigureGenerator("Terminal",function(Nt,nt,et){var ct=new go.Geometry,lt=new go.PathFigure(nt*0,et*.1,!1);ct.add(lt),lt.add(new go.PathSegment(go.PathSegment.Line,nt*1,et*.1)),lt.add(new go.PathSegment(go.PathSegment.Line,nt*1,et*.9)),lt.add(new go.PathSegment(go.PathSegment.Line,nt*0,et*.9).close());var pt=new go.PathFigure(nt*.1,et*.2,!0);ct.add(pt),pt.add(new go.PathSegment(go.PathSegment.Line,nt*.1,et*.25)),pt.add(new go.PathSegment(go.PathSegment.Line,nt*.22,et*.285)),pt.add(new go.PathSegment(go.PathSegment.Line,nt*.1,et*.32)),pt.add(new go.PathSegment(go.PathSegment.Line,nt*.1,et*.37)),pt.add(new go.PathSegment(go.PathSegment.Line,nt*.275,et*.32)),pt.add(new go.PathSegment(go.PathSegment.Line,nt*.275,et*.25).close());var vt=new go.PathFigure(nt*.28,et*.37,!0);return ct.add(vt),vt.add(new go.PathSegment(go.PathSegment.Line,nt*.45,et*.37)),vt.add(new go.PathSegment(go.PathSegment.Line,nt*.45,et*.41)),vt.add(new go.PathSegment(go.PathSegment.Line,nt*.28,et*.41).close()),ct}),go.Shape.defineFigureGenerator("Beaker",function(Nt,nt,et){var ct=new go.Geometry,lt=15,pt=lt*ie,vt=new go.PathFigure(nt*.62,et*.475,!0);return ct.add(vt),vt.add(new go.PathSegment(go.PathSegment.Line,nt,et-lt)),vt.add(new go.PathSegment(go.PathSegment.Bezier,nt-lt,et,nt,et-pt,nt-pt,et)),vt.add(new go.PathSegment(go.PathSegment.Line,lt,et)),vt.add(new go.PathSegment(go.PathSegment.Bezier,0,et-lt,pt,et,0,et-pt)),vt.add(new go.PathSegment(go.PathSegment.Line,nt*.38,et*.475)),vt.add(new go.PathSegment(go.PathSegment.Line,nt*.38,et*.03)),vt.add(new go.PathSegment(go.PathSegment.Line,nt*.36,et*0)),vt.add(new go.PathSegment(go.PathSegment.Line,nt*.64,et*0)),vt.add(new go.PathSegment(go.PathSegment.Line,nt*.62,et*.03).close()),pt>1?(ct.spot1=new go.Spot(0,0,pt,pt),ct.spot2=new go.Spot(1,1,-pt,-pt)):(ct.spot1=go.Spot.TopLeft,ct.spot2=go.Spot.BottomRight),ct}),go.Shape.defineFigureGenerator("Download",function(Nt,nt,et){var ct=new go.Geometry,lt=new go.PathFigure(nt*0,et*1,!0);ct.add(lt);var pt=.1/.3;lt.add(new go.PathSegment(go.PathSegment.Line,nt*1,et*1)),lt.add(new go.PathSegment(go.PathSegment.Line,nt*1,et*(1-pt))),lt.add(new go.PathSegment(go.PathSegment.Line,nt*.8,et*0)),lt.add(new go.PathSegment(go.PathSegment.Line,nt*.66,et*0)),lt.add(new go.PathSegment(go.PathSegment.Line,nt*.66,et*.055)),lt.add(new go.PathSegment(go.PathSegment.Line,nt*.755,et*.055)),lt.add(new go.PathSegment(go.PathSegment.Line,nt*.93,et*(1-pt))),lt.add(new go.PathSegment(go.PathSegment.Line,nt*.64,et*(1-pt))),lt.add(new go.PathSegment(go.PathSegment.Line,nt*.61,et*.75)),lt.add(new go.PathSegment(go.PathSegment.Line,nt*.5,et*.75)),lt.add(new go.PathSegment(go.PathSegment.Line,nt*.39,et*.75)),lt.add(new go.PathSegment(go.PathSegment.Line,nt*.36,et*(1-pt))),lt.add(new go.PathSegment(go.PathSegment.Line,nt*.07,et*(1-pt))),lt.add(new go.PathSegment(go.PathSegment.Line,nt*(1-.755),et*.055)),lt.add(new go.PathSegment(go.PathSegment.Line,nt*(1-.66),et*.055)),lt.add(new go.PathSegment(go.PathSegment.Line,nt*(1-.66),et*0)),lt.add(new go.PathSegment(go.PathSegment.Line,nt*(1-.8),et*0)),lt.add(new go.PathSegment(go.PathSegment.Line,nt*0,et*(1-pt)).close());var vt=new go.PathFigure(nt*.4,et*0,!0);return ct.add(vt),vt.add(new go.PathSegment(go.PathSegment.Line,nt*.4,et*.44)),vt.add(new go.PathSegment(go.PathSegment.Line,nt*.26,et*.44)),vt.add(new go.PathSegment(go.PathSegment.Line,nt*.5,et*.66)),vt.add(new go.PathSegment(go.PathSegment.Line,nt*(1-.26),et*.44)),vt.add(new go.PathSegment(go.PathSegment.Line,nt*.6,et*.44)),vt.add(new go.PathSegment(go.PathSegment.Line,nt*.6,et*0).close()),ct}),go.Shape.defineFigureGenerator("Bin",function(Nt,nt,et){var ct=new go.Geometry,lt=new go.PathFigure(nt*0,et*1,!0);ct.add(lt);var pt=.1/.3;return lt.add(new go.PathSegment(go.PathSegment.Line,nt*1,et*1)),lt.add(new go.PathSegment(go.PathSegment.Line,nt*1,et*(1-pt))),lt.add(new go.PathSegment(go.PathSegment.Line,nt*.8,et*0)),lt.add(new go.PathSegment(go.PathSegment.Line,nt*.66,et*0)),lt.add(new go.PathSegment(go.PathSegment.Line,nt*.66,et*.055)),lt.add(new go.PathSegment(go.PathSegment.Line,nt*.755,et*.055)),lt.add(new go.PathSegment(go.PathSegment.Line,nt*.93,et*(1-pt))),lt.add(new go.PathSegment(go.PathSegment.Line,nt*.64,et*(1-pt))),lt.add(new go.PathSegment(go.PathSegment.Line,nt*.61,et*.75)),lt.add(new go.PathSegment(go.PathSegment.Line,nt*.5,et*.75)),lt.add(new go.PathSegment(go.PathSegment.Line,nt*.39,et*.75)),lt.add(new go.PathSegment(go.PathSegment.Line,nt*.36,et*(1-pt))),lt.add(new go.PathSegment(go.PathSegment.Line,nt*.07,et*(1-pt))),lt.add(new go.PathSegment(go.PathSegment.Line,nt*(1-.755),et*.055)),lt.add(new go.PathSegment(go.PathSegment.Line,nt*(1-.66),et*.055)),lt.add(new go.PathSegment(go.PathSegment.Line,nt*(1-.66),et*0)),lt.add(new go.PathSegment(go.PathSegment.Line,nt*(1-.8),et*0)),lt.add(new go.PathSegment(go.PathSegment.Line,nt*0,et*(1-pt)).close()),ct}),go.Shape.defineFigureGenerator("Upload",function(Nt,nt,et){var ct=new go.Geometry,lt=new go.PathFigure(nt*0,et*1,!0);ct.add(lt);var pt=.1/.3;lt.add(new go.PathSegment(go.PathSegment.Line,nt*1,et*1)),lt.add(new go.PathSegment(go.PathSegment.Line,nt*1,et*(1-pt))),lt.add(new go.PathSegment(go.PathSegment.Line,nt*.8,et*0)),lt.add(new go.PathSegment(go.PathSegment.Line,nt*.66,et*0)),lt.add(new go.PathSegment(go.PathSegment.Line,nt*.66,et*.055)),lt.add(new go.PathSegment(go.PathSegment.Line,nt*.755,et*.055)),lt.add(new go.PathSegment(go.PathSegment.Line,nt*.93,et*(1-pt))),lt.add(new go.PathSegment(go.PathSegment.Line,nt*.64,et*(1-pt))),lt.add(new go.PathSegment(go.PathSegment.Line,nt*.61,et*.75)),lt.add(new go.PathSegment(go.PathSegment.Line,nt*.5,et*.75)),lt.add(new go.PathSegment(go.PathSegment.Line,nt*.39,et*.75)),lt.add(new go.PathSegment(go.PathSegment.Line,nt*.36,et*(1-pt))),lt.add(new go.PathSegment(go.PathSegment.Line,nt*.07,et*(1-pt))),lt.add(new go.PathSegment(go.PathSegment.Line,nt*(1-.755),et*.055)),lt.add(new go.PathSegment(go.PathSegment.Line,nt*(1-.66),et*.055)),lt.add(new go.PathSegment(go.PathSegment.Line,nt*(1-.66),et*0)),lt.add(new go.PathSegment(go.PathSegment.Line,nt*(1-.8),et*0)),lt.add(new go.PathSegment(go.PathSegment.Line,nt*0,et*(1-pt)).close());var vt=new go.PathFigure(nt*.5,et*0,!0);return ct.add(vt),vt.add(new go.PathSegment(go.PathSegment.Line,nt*.26,et*.25)),vt.add(new go.PathSegment(go.PathSegment.Line,nt*.4,et*.25)),vt.add(new go.PathSegment(go.PathSegment.Line,nt*.4,et*.63)),vt.add(new go.PathSegment(go.PathSegment.Line,nt*.6,et*.63)),vt.add(new go.PathSegment(go.PathSegment.Line,nt*.6,et*.25)),vt.add(new go.PathSegment(go.PathSegment.Line,nt*.74,et*.25).close()),ct}),go.Shape.defineFigureGenerator("EmptyDrink",function(Nt,nt,et){var ct=new go.Geometry,lt=new go.PathFigure(nt*.15,et*0,!1);return ct.add(lt),lt.add(new go.PathSegment(go.PathSegment.Line,nt*.85,et*0)),lt.add(new go.PathSegment(go.PathSegment.Line,nt*.7,et*1)),lt.add(new go.PathSegment(go.PathSegment.Line,nt*.3,et*1).close()),ct}),go.Shape.defineFigureGenerator("Drink",function(Nt,nt,et){var ct=new go.Geometry,lt=new go.PathFigure(nt*.15,et*0,!1);ct.add(lt),lt.add(new go.PathSegment(go.PathSegment.Line,nt*.85,et*0)),lt.add(new go.PathSegment(go.PathSegment.Line,nt*.7,et*1)),lt.add(new go.PathSegment(go.PathSegment.Line,nt*.3,et*1).close());var pt=new go.PathFigure(nt*.235,et*.28,!0);return ct.add(pt),pt.add(new go.PathSegment(go.PathSegment.Line,nt*.765,et*.28)),pt.add(new go.PathSegment(go.PathSegment.Line,nt*.655,et*.97)),pt.add(new go.PathSegment(go.PathSegment.Line,nt*.345,et*.97).close()),ct}),go.Shape.defineFigureGenerator("4Arrows",function(Nt,nt,et){var ct=new go.Geometry,lt=new go.PathFigure(nt*.5,et*0,!0);return ct.add(lt),lt.add(new go.PathSegment(go.PathSegment.Line,nt*.65,et*.25)),lt.add(new go.PathSegment(go.PathSegment.Line,nt*.55,et*.25)),lt.add(new go.PathSegment(go.PathSegment.Line,nt*.55,et*.45)),lt.add(new go.PathSegment(go.PathSegment.Line,nt*.75,et*.45)),lt.add(new go.PathSegment(go.PathSegment.Line,nt*.75,et*.35)),lt.add(new go.PathSegment(go.PathSegment.Line,nt*1,et*.5)),lt.add(new go.PathSegment(go.PathSegment.Line,nt*.75,et*.65)),lt.add(new go.PathSegment(go.PathSegment.Line,nt*.75,et*.55)),lt.add(new go.PathSegment(go.PathSegment.Line,nt*.55,et*.55)),lt.add(new go.PathSegment(go.PathSegment.Line,nt*.55,et*.75)),lt.add(new go.PathSegment(go.PathSegment.Line,nt*.65,et*.75)),lt.add(new go.PathSegment(go.PathSegment.Line,nt*.5,et*1)),lt.add(new go.PathSegment(go.PathSegment.Line,nt*.35,et*.75)),lt.add(new go.PathSegment(go.PathSegment.Line,nt*.45,et*.75)),lt.add(new go.PathSegment(go.PathSegment.Line,nt*.45,et*.55)),lt.add(new go.PathSegment(go.PathSegment.Line,nt*.25,et*.55)),lt.add(new go.PathSegment(go.PathSegment.Line,nt*.25,et*.65)),lt.add(new go.PathSegment(go.PathSegment.Line,nt*0,et*.5)),lt.add(new go.PathSegment(go.PathSegment.Line,nt*.25,et*.35)),lt.add(new go.PathSegment(go.PathSegment.Line,nt*.25,et*.45)),lt.add(new go.PathSegment(go.PathSegment.Line,nt*.45,et*.45)),lt.add(new go.PathSegment(go.PathSegment.Line,nt*.45,et*.25)),lt.add(new go.PathSegment(go.PathSegment.Line,nt*.35,et*.25).close()),ct}),go.Shape.defineFigureGenerator("Connector","Ellipse"),go.Shape.defineFigureGenerator("Alternative","TriangleUp"),go.Shape.defineFigureGenerator("Merge","TriangleUp"),go.Shape.defineFigureGenerator("Decision","Diamond"),go.Shape.defineFigureGenerator("DataTransmissions","Hexagon"),go.Shape.defineFigureGenerator("Gate","Crescent"),go.Shape.defineFigureGenerator("Delay","HalfEllipse"),go.Shape.defineFigureGenerator("Input","Parallelogram1"),go.Shape.defineFigureGenerator("ManualLoop","ManualOperation"),go.Shape.defineFigureGenerator("ISOProcess","Chevron"),go.Shape.defineFigureGenerator("MessageToUser","SquareArrow"),go.Shape.defineFigureGenerator("MagneticData","Cylinder1"),go.Shape.defineFigureGenerator("DirectData","Cylinder4"),go.Shape.defineFigureGenerator("StoredData","DataStorage"),go.Shape.defineFigureGenerator("SequentialData","MagneticTape"),go.Shape.defineFigureGenerator("Subroutine","Procedure")},43001:function(module,exports,__webpack_require__){var __WEBPACK_AMD_DEFINE_ARRAY__,__WEBPACK_AMD_DEFINE_RESULT__;(function(){if(typeof window.GGBApplet=="function"){console.warn("deployggb.js was loaded twice");return}var isRenderGGBElementEnabled=!1,scriptLoadStarted=!1,html5AppletsToProcess=null,ggbHTML5LoadedCodebaseIsWebSimple=!1,ggbHTML5LoadedCodebaseVersion=null,ggbHTML5LoadedScript=null,GGBApplet=function(){"use strict";for(var Tn={},oi="5.0",Dt={},Ft=null,se=!1,ye=!1,Be=null,Se=!1,Rt=null,ie=null,je=0;je<arguments.length;je++){var ce=arguments[je];if(ce!==null)switch(typeof ce){case"number":oi=ce.toFixed(1);break;case"string":ce.match(new RegExp("^[0-9]\\.[0-9]+$"))?oi=ce:Be=ce;break;case"object":typeof ce.is3D!="undefined"?Ft=ce:Dt=ce;break;case"boolean":se=ce,ye=!0;break}}Ft===null&&(Ft={is3D:!1,AV:!1,SV:!1,CV:!1,EV2:!1,CP:!1,PC:!1,DA:!1,FI:!1,PV:!1,macro:!1},Dt.material_id!==void 0&&!ye&&(se=!0)),Be!==null&&Dt.id===void 0&&(Dt.id=Be);var Vt="",Qe="",Qt=!1,Je=null,Nt=null,nt=null,et=!1,ct=null,lt=null,pt=null,vt=null,xt=null;Dt.height!==void 0&&(Dt.height=Math.round(Dt.height)),Dt.width!==void 0&&(Dt.width=Math.round(Dt.width));var Lt=function(ke){return parseFloat(ke)>4?parseFloat(ke):5};Tn.setHTML5Codebase=function(ke,tn){ie=ke,Fe(ke,tn)},Tn.setJavaCodebase=Tn.setJavaCodebaseVersion=Tn.isCompiledInstalled=Tn.setPreCompiledScriptPath=Tn.setPreCompiledResourcePath=function(){},Tn.setHTML5CodebaseVersion=function(ke,tn){var fn=parseFloat(ke);if(fn!==NaN&&fn<5){console.log("The GeoGebra HTML5 codebase version "+fn+" is deprecated. Using version latest instead.");return}Rt=ke,jt(ke,tn)},Tn.getHTML5CodebaseVersion=function(){return Nt},Tn.getParameters=function(){return Dt},Tn.setFontsCSSURL=function(ke){vt=ke},Tn.setGiacJSURL=function(ke){},Tn.setJNLPFile=function(ke){Vt=ke},Tn.setJNLPBaseDir=function(ke){},Tn.inject=function(){function ke(){return window.frameElement&&window.frameElement.getAttribute("data-singleton")}for(var tn="auto",fn=Dt.id,Jn,Pe=!1,an=0;an<arguments.length;an++){var re=arguments[an];typeof re=="string"?(re=re.toLowerCase(),re.match(/^(prefer)?(java|html5|compiled|auto|screenshot)$/)?tn=re:fn=arguments[an]):typeof re=="boolean"?Pe=re:re instanceof HTMLElement&&(Jn=re)}hn();function hn(){if(!Se){setTimeout(hn,200);return}tn=vn(tn);var di=Jn||document.getElementById(fn);if(!di){console.log("possibly bug on ajax loading? ");return}if(Tn.removeExistingApplet(di,!1),Dt.width===void 0&&di.clientWidth&&(Dt.width=di.clientWidth),Dt.height===void 0&&di.clientHeight&&(Dt.height=di.clientHeight),!(Dt.width&&Dt.height)&&tn==="html5"&&(delete Dt.width,delete Dt.height),Je=tn,tn==="screenshot")Ye(di,Dt);else{var Tt=!1;Dt.hasOwnProperty("playButton")&&Dt.playButton||Dt.hasOwnProperty("clickToLoad")&&Dt.clickToLoad?Tt=!0:Dt.hasOwnProperty("playButtonAutoDecide")&&Dt.playButtonAutoDecide&&(Tt=(!Ot()||ke())&&Ht()),Tt?(Je="screenshot",Rn(di,Dt,Pe,tn)):Re(di,Dt,Pe)}}};function Ot(){try{return window.self!==window.top}catch(ke){return!0}}function Ht(){return Dt.hasOwnProperty("screenshotGenerator")&&Dt.screenshotGenerator?!1:Math.max(screen.width,screen.height)<800}Tn.getViews=function(){return Ft},Tn.isJavaInstalled=function(){return!1};var te=function(ke){var tn=function(an){var re=JSON.parse(an),hn=function(Et){return Et.type=="G"||Et.type=="E"},di=re.elements?re.elements.filter(hn)[0]:re;if(!di||!di.url){fn();return}Dt.fileName=di.url,_t(di.settings||{}),Ft.is3D=!0;var Tt="https://www.geogebra.org/images/";Tn.setPreviewImage(ct||di.previewUrl,Tt+"GeoGebra_loading.png",Tt+"applet_play.png"),ke()},fn=function(){Dt.onError&&Dt.onError(),We("Error: Fetching material (id "+Dt.material_id+") failed.",Dt)},Jn=location.host.match(/(www|stage|beta|groot|alpha).geogebra.(org|net)/)?location.host:"www.geogebra.org",Pe="/materials/"+Dt.material_id+"?scope=basic";Xt("https://"+Jn+"/api/proxy.php?path="+encodeURIComponent(Pe),tn,fn)};function _t(ke){var tn=["width","height","showToolBar","showMenuBar","showAlgebraInput","allowStyleBar","showResetIcon","enableLabelDrags","enableShiftDragZoom","enableRightClick","appName"];["enableLabelDrags","enableShiftDragZoom","enableRightClick"].forEach(function(fn){ke[fn]=!!ke[fn]}),tn.forEach(function(fn){Dt[fn]===void 0&&ke[fn]!==void 0&&(Dt[fn]=ke[fn])}),Dt.showToolBarHelp===void 0&&(Dt.showToolBarHelp=Dt.showToolBar)}function Xt(ke,tn,fn){var Jn=new XMLHttpRequest;Jn.open("GET",ke),Jn.onload=function(){tn(Jn.responseText)},Jn.onerror=fn,Jn.send()}Tn.isHTML5Installed=function(){return!0},Tn.getLoadedAppletType=function(){return Je},Tn.setPreviewImage=function(ke,tn,fn){ct=ke,lt=tn,pt=fn},Tn.removeExistingApplet=function(ke,tn){var fn;typeof ke=="string"&&(ke=document.getElementById(ke)),Je=null;var Jn=null;for(fn=0;fn<ke.childNodes.length;fn++){var Pe=ke.childNodes[fn],an=Pe.className;an==="applet_screenshot"?tn?(Pe.style.display="block",Je="screenshot"):Pe.style.display="none":an!=="applet_scaler prerender"&&(ke.removeChild(Pe),Jn=an&&an.indexOf("appletParameters")!=-1?Pe.id:null,fn--)}var re=Dt.id!==void 0?Dt.id:Jn,hn=window[re];hn&&typeof hn.getBase64=="function"&&(hn.remove(),window[re]=null)},Tn.refreshHitPoints=function(){if(Lt(ggbHTML5LoadedCodebaseVersion)>=5)return!0;var ke=Tn.getAppletObject();return ke&&typeof ke.recalculateEnvironments=="function"?(ke.recalculateEnvironments(),!0):!1},Tn.startAnimation=function(){var ke=Tn.getAppletObject();return ke&&typeof ke.startAnimation=="function"?(ke.startAnimation(),!0):!1},Tn.stopAnimation=function(){var ke=Tn.getAppletObject();return ke&&typeof ke.stopAnimation=="function"?(ke.stopAnimation(),!0):!1},Tn.getAppletObject=function(){var ke=Dt.id!==void 0?Dt.id:"ggbApplet";return window[ke]},Tn.resize=function(){};var ve=function(ke,tn,fn){var Jn=document.createElement("param");Jn.setAttribute("name",tn),Jn.setAttribute("value",fn),ke.appendChild(Jn)},oe=function(ke){return ke&&ke!=="false"},Re=function(ke,tn,fn){Lt(Nt)<=4.2&&(fn=!0);var Jn=!isRenderGGBElementEnabled&&!scriptLoadStarted;(!isRenderGGBElementEnabled&&!scriptLoadStarted||ggbHTML5LoadedCodebaseVersion!==Nt||ggbHTML5LoadedCodebaseIsWebSimple&&!et)&&(Jn=!0,isRenderGGBElementEnabled=!1,scriptLoadStarted=!1);var Pe=document.createElement("div");Pe.classList.add("appletParameters","notranslate");var an=tn.width,re=tn.height;if(tn.disableAutoScale=tn.disableAutoScale===void 0?GGBAppletUtils.isFlexibleWorksheetEditor():tn.disableAutoScale,tn.width!==void 0)if(Lt(Nt)<=4.4)oe(tn.showToolBar)&&(tn.height-=7),oe(tn.showAlgebraInput)&&(tn.height-=37),tn.width<605&&oe(tn.showToolBar)&&(tn.width=605,an=605);else{var hn=100;(oe(tn.showToolBar)||oe(tn.showMenuBar))&&(tn.hasOwnProperty("customToolBar")&&(tn.customToolbar=tn.customToolBar),hn=oe(tn.showMenuBar)?245:155),an<hn&&(tn.width=hn,an=hn)}Pe.style.border="none",Pe.style.display="inline-block";for(var di in tn)tn.hasOwnProperty(di)&&di!=="appletOnLoad"&&Pe.setAttribute("data-param-"+di,tn[di]);vt&&Pe.setAttribute("data-param-fontscssurl",vt),Tn.resize=function(){GGBAppletUtils.responsiveResize(ke,tn)},window.addEventListener("resize",function(pe){Tn.resize()});var Tt=typeof tn.appletOnLoad=="function"?tn.appletOnLoad:function(){};if(!fn&&tn.width!==void 0){tn.hasOwnProperty("showSplash")||Pe.setAttribute("data-param-showSplash","false");var Et=ke.querySelector(".applet_scaler.prerender"),St=Et!==null;if(St)var Mt=Et.querySelector(".ggb_preview");else{var Mt=un(an,re,tn.borderColor,!1);Et=document.createElement("div"),Et.className="applet_scaler",Et.style.position="relative",Et.style.display="block",Et.style.width=an+"px",Et.style.height=re+"px"}window.GGBT_spinner&&window.GGBT_spinner.attachSpinner(Et,"66%"),Lt(Nt)>=5?(tn.appletOnLoad=function(pe){var be=ke.querySelector(".ggb_preview");be&&be.parentNode.removeChild(be),window.GGBT_spinner&&window.GGBT_spinner.removeSpinner(Et),window.GGBT_wsf_view&&$(window).trigger("resize"),Tt(pe)},St||Et.appendChild(Mt)):Pe.appendChild(Mt),Et.appendChild(Pe),St||ke.appendChild(Et),setTimeout(function(){Tn.resize()},1)}else{var zt=document.createElement("div");zt.className="applet_scaler",zt.style.position="relative",zt.style.display="block",zt.appendChild(Pe),ke.appendChild(zt),tn.appletOnLoad=function(pe){Tn.resize(),Tt(pe)}}function kt(pe,be){be&&typeof be.appletOnLoad=="function"&&typeof renderGGBElement=="function"?renderGGBElement(pe,be.appletOnLoad):renderGGBElement(pe),We("GeoGebra HTML5 applet injected and rendered with previously loaded codebase.",be)}function Ut(pe,be){typeof renderGGBElement=="undefined"?(html5AppletsToProcess===null&&(html5AppletsToProcess=[]),html5AppletsToProcess.push({article:pe,params:be}),window.renderGGBElementReady=function(){isRenderGGBElementEnabled=!0,html5AppletsToProcess!==null&&html5AppletsToProcess.length&&(html5AppletsToProcess.forEach(function(ze){kt(ze.article,ze.params)}),html5AppletsToProcess=null)},Lt(Nt)<5&&(pe.className+=" geogebraweb")):kt(pe,be)}if(Jn){scriptLoadStarted=!0;for(var Oe=0;Oe<Pe.childNodes.length;Oe++){var Te=Pe.childNodes[Oe].tagName;Te==="TABLE"&&(Pe.removeChild(Pe.childNodes[Oe]),Oe--)}if(ggbHTML5LoadedScript!==null){var _e=document.querySelector('script[src="'+ggbHTML5LoadedScript+'"]');_e!=null&&_e.parentNode.removeChild(_e)}var ee=document.createElement("script"),de=function(){Ut(Pe,tn)};ee.src=Qe+nt,ggbHTML5LoadedCodebaseIsWebSimple=et,ggbHTML5LoadedCodebaseVersion=Nt,ggbHTML5LoadedScript=ee.src,We("GeoGebra HTML5 codebase loaded: '"+Qe+"'.",tn),!ie&&(!Rt||Rt=="5.0")?(et?webSimple.succeeded=webSimple.succeeded||webSimple():web3d.succeeded=web3d.succeeded||web3d(),de()):Qe.requirejs?__webpack_require__.e(7963).then(function(){var pe=[__webpack_require__(87963)];de.apply(null,pe)}.bind(this)).catch(__webpack_require__.oe):(ee.onload=de,ke.appendChild(ee))}else Ut(Pe,tn);tn.height=re,tn.width=an},Ye=function(ke,tn,fn){var Jn=un(tn.width,tn.height,tn.borderColor,fn),Pe=document.createElement("div");Pe.style.position="relative",Pe.style.display="block",Pe.style.width=tn.width+"px",Pe.style.height=tn.height+"px",Pe.className="applet_screenshot applet_scaler"+(fn?" applet_screenshot_play":""),Pe.appendChild(Jn);var an=GGBAppletUtils.getScale(tn,ke,fn);fn?(ke.appendChild(wn()),window.GGBT_wsf_view||(ke.style.position="relative")):window.GGBT_spinner&&window.GGBT_spinner.attachSpinner(Pe,"66%"),ke.appendChild(Pe),an!==1&&!isNaN(an)&&(GGBAppletUtils.scaleElement(Pe,an),Pe.style.width=tn.width+"px",Pe.style.height=tn.height+"px",Pe.parentNode.style.width=tn.width*an+"px",Pe.parentNode.style.height=tn.height*an+"px"),Tn.resize=function(){en(ke,Jn,Pe,fn)},window.addEventListener("resize",function(re){Tn.resize()}),Tn.resize()};function en(ke,tn,fn,Jn){if(ke.contains(tn)){if(typeof window.GGBT_wsf_view=="object"&&window.GGBT_wsf_view.isFullscreen()){if(ke.id!=="fullscreencontent")return;window.GGBT_wsf_view.setCloseBtnPosition(ke)}var Pe=GGBAppletUtils.getScale(Dt,ke,Jn);fn.parentNode!==null&&(!isNaN(Pe)&&Pe!==1?(GGBAppletUtils.scaleElement(fn,Pe),fn.parentNode.style.width=Dt.width*Pe+"px",fn.parentNode.style.height=Dt.height*Pe+"px"):(GGBAppletUtils.scaleElement(fn,1),fn.parentNode.style.width=Dt.width+"px",fn.parentNode.style.height=Dt.height+"px")),typeof window.GGBT_wsf_view=="object"&&window.GGBT_wsf_view.isFullscreen()&&GGBAppletUtils.positionCenter(ke),typeof window.GGBT_ws_header_footer=="object"&&window.GGBT_ws_header_footer.setWsScrollerHeight()}}Tn.onExitFullscreen=function(ke,tn){tn.appendChild(ke)};var Rn=function(ke,tn,fn,Jn){Ye(ke,tn,!0);for(var Pe=function(){var hn=[];for(re=0;re<ke.childNodes.length;re++)hn.push(ke.childNodes[re]);if(window.GGBT_wsf_view){var di=window.GGBT_wsf_view.renderFullScreen(ke,tn.id),Tt=document.getElementById("fullscreencontainer"),Et=jQuery(ke).find(".fullscreencontent");Et.length>0?(di.remove(),Et.attr("id","fullscreencontent").show(),jQuery(Tt).append(Et),window.dispatchEvent(new Event("resize"))):Re(di,tn,!1),window.GGBT_wsf_view.launchFullScreen(Tt)}else Je=Jn,Re(ke,tn,!1);if(!window.GGBT_wsf_view)for(re=0;re<hn.length;re++)ke.removeChild(hn[re])},an=ke.getElementsByClassName("ggb_preview_play"),re=0;re<an.length;re++)an[re].addEventListener("click",Pe,!1),an[re].addEventListener("ontouchstart",Pe,!1);typeof window.ggbAppletPlayerOnload=="function"&&window.ggbAppletPlayerOnload(ke),Ht()&&window.GGBT_wsf_view&&$(".wsf-element-fullscreen-button").remove()},wn=function(){var ke=document.createElement("div");if(ke.className="ggb_preview_play icon-applet-play",!window.GGBT_wsf_view){var tn='.icon-applet-play { width: 100%; height: 100%;box-sizing: border-box;position: absolute;z-index: 1001;cursor: pointer;border-width: 0px; background-color: transparent;background-repeat: no-repeat;left: 0;top: 0;background-position: center center; background-image: url("https://www.geogebra.org/images/worksheet/icon-start-applet.png");}.icon-applet-play:hover {background-image: url("https://www.geogebra.org/images/worksheet/icon-start-applet-hover.png");}',fn=document.createElement("style");fn.styleSheet?fn.styleSheet.cssText=tn:fn.appendChild(document.createTextNode(tn)),document.getElementsByTagName("head")[0].appendChild(fn)}return ke},un=function(ke,tn,fn,Jn){var Pe=document.createElement("div");Pe.className="ggb_preview",Pe.style.position="absolute",Pe.style.zIndex="90",Pe.style.width=ke-2+"px",Pe.style.height=tn-2+"px",Pe.style.top="0px",Pe.style.left="0px",Pe.style.overflow="hidden",Pe.style.backgroundColor="white";var an="lightgrey";fn!==void 0&&(fn==="none"?an="transparent":an=fn),Pe.style.border="1px solid "+an;var re=document.createElement("img");if(re.style.position="relative",re.style.zIndex="1000",re.style.top="-1px",re.style.left="-1px",ct!==null&&re.setAttribute("src",ct),re.style.opacity=.7,lt!==null){var hn,di,Tt;if(!Jn){hn=document.createElement("img"),hn.style.position="absolute",hn.style.zIndex="1001",hn.style.opacity=1,re.style.opacity=.3,di=360,di>ke/4*3&&(di=ke/4*3),Tt=di/5.8,hn.setAttribute("src",lt),hn.setAttribute("width",di),hn.setAttribute("height",Tt);var Et=(ke-di)/2,St=(tn-Tt)/2;hn.style.left=Et+"px",hn.style.top=St+"px",Pe.appendChild(hn)}}return Pe.appendChild(re),Pe},vn=function(ke){return ke=ke.toLowerCase(),ke==="html5"||ke==="screenshot"?ke:"html5"},ne=["web","webSimple","web3d","tablet","tablet3d","phone"],jt=function(ke,tn){if(Nt=ke,tn){Fe(Nt,!0);return}var fn=!se;if(fn){var Jn=Lt(Nt);!isNaN(Jn)&&Jn<4.4&&(fn=!1)}var Pe,an;window.location.protocol.substr(0,4)==="http"?Pe=window.location.protocol:Pe="http:";var re=Nt.indexOf("//");re>0?an=Nt:re===0?an=Pe+Nt:an="https://www.geogebra.org/apps/5.2.814.0/";for(var hn in ne)if(Nt.slice(ne[hn].length*-1)===ne[hn]||Nt.slice((ne[hn].length+1)*-1)===ne[hn]+"/"){Fe(an,!1);return}!GGBAppletUtils.isFlexibleWorksheetEditor()&&fn&&!Ft.is3D&&!Ft.AV&&!Ft.SV&&!Ft.CV&&!Ft.EV2&&!Ft.CP&&!Ft.PC&&!Ft.DA&&!Ft.FI&&!Ft.PV&&!oe(Dt.showToolBar)&&!oe(Dt.showMenuBar)&&!oe(Dt.showAlgebraInput)&&!oe(Dt.enableRightClick)&&(!Dt.appName||Dt.appName=="classic")?an+="webSimple/":an+="web3d/",Fe(an,!1)},Fe=function(ke,tn){if(ke.requirejs){Qe=ke;return}ke.slice(-1)!=="/"&&(ke+="/"),Qe=ke,tn===null&&(tn=ke.indexOf("http")===-1),Qt=tn,nt="web.nocache.js",et=!1;var fn=Qe.split("/");fn.length>1&&(!tn&&fn[fn.length-2]==="webSimple"?(nt="webSimple.nocache.js",et=!0):ne.indexOf(fn[fn.length-2])>=0&&(nt=fn[fn.length-2]+".nocache.js")),fn=ke.split("/"),Nt=fn[fn.length-3],Nt.substr(0,4)==="test"?Nt=Nt.substr(4,1)+"."+Nt.substr(5,1):(Nt.substr(0,3)==="war"||Nt.substr(0,4)==="beta")&&(Nt="5.0");var Jn=parseFloat(Nt);Jn!==NaN&&Jn<5&&ke.indexOf("geogebra.org")>=0&&(console.log("The GeoGebra HTML5 codebase version "+Jn+" is deprecated. Using version latest instead."),jt("5.0",tn))},We=function(ke,tn){window.console&&window.console.log&&(!tn||typeof tn.showLogging=="undefined"||tn.showLogging&&tn.showLogging!=="false")&&console.log(ke)};Dt.material_id!==void 0?te(Pn):Pn();function Pn(){var ke=oi;Rt!==null?ke=Rt:parseFloat(ke)<5&&(ke="5.0"),jt(ke,!1),ie!==null&&Fe(ie,Qt),Se=!0}return Tn},GGBAppletUtils=function(){"use strict";function Tn(){return window.GGBT_wsf_edit!==void 0}function oi(Se,Rt){Rt!=1?(Se.style.transformOrigin="0% 0% 0px",Se.style.webkitTransformOrigin="0% 0% 0px",Se.style.transform="scale("+Rt+","+Rt+")",Se.style.webkitTransform="scale("+Rt+","+Rt+")",Se.style.maxWidth="initial",Se.querySelector(".ggb_preview")!==null&&(Se.querySelector(".ggb_preview").style.maxWidth="initial"),Se.querySelectorAll(".ggb_preview img")[0]!==void 0&&(Se.querySelectorAll(".ggb_preview img")[0].style.maxWidth="initial"),Se.querySelectorAll(".ggb_preview img")[1]!==void 0&&(Se.querySelectorAll(".ggb_preview img")[1].style.maxWidth="initial")):(Se.style.transform="none",Se.style.webkitTransform="none")}function Dt(Se,Rt,ie,je,ce,Vt){var Qe=null;if(Vt!=null&&Vt!="")for(var Qt=Se.parentNode;Qt!=null;)if((" "+Qt.className+" ").indexOf(" "+Vt+" ")>-1){Qe=Qt;break}else Qt=Qt.parentNode;var Je=0,Nt=0,nt=0,et=0,ct=0,lt=0,pt=0;if(Qe)Je=Qe.offsetWidth,Nt=Math.max(je?Qe.offsetWidth:0,Qe.offsetHeight);else{if(window.innerWidth&&document.documentElement.clientWidth?(Je=Math.min(window.innerWidth,document.documentElement.clientWidth),Nt=Math.min(window.innerHeight,document.documentElement.clientHeight),nt=Je):(Je=window.innerWidth,Nt=window.innerHeight,nt=window.innerWidth),Se){var vt=Se.getBoundingClientRect();vt.left>0&&vt.left<=Je&&(ce===void 0||!ce)&&(document.dir==="rtl"?(ct=Je-vt.width-vt.left,lt=nt<=480?10:30):(lt=vt.left,ct=nt<=480?10:30),et=lt+ct)}if(Se&&typeof window.GGBT_wsf_view=="object"&&window.GGBT_wsf_view.isFullscreen()){var xt=Se.getBoundingClientRect();window.GGBT_wsf_view.getCloseBtnPosition()==="closePositionRight"?(et=40,pt=0):window.GGBT_wsf_view.getCloseBtnPosition()==="closePositionTop"&&(et=0,pt=40)}}return Se&&((ie===void 0||!ie)&&Rt>0&&Rt+et<Je?Je=Rt:Je-=et,typeof window.GGBT_wsf_view=="object"&&window.GGBT_wsf_view.isFullscreen()&&(ie===void 0||!ie)&&(Nt-=pt)),{width:Je,height:Nt}}function Ft(Se,Rt,ie,je,ce){if(Se.isScreenshoGenerator)return 1;var Vt=je!==void 0&&je,Qe=Se.noScaleMargin!=null&&Se.noScaleMargin,Qt=function(xt){return xt&&xt!=="false"},Je=Qt(Se.autoHeight),Nt=Dt(Rt,Se.width,ie,Je,Vt&&window.GGBT_wsf_view||Qe,ce),nt=parseInt(Nt.width),et=Se.width,ct=Se.height;if(et===void 0){var lt=Rt.querySelector(".appletParameters");lt&&(et=lt.offsetWidth,ct=lt.offsetHeight)}var pt=nt/et,vt=Vt?1:Nt.height/ct;return ie!==void 0&&!ie&&(pt=Math.min(1,pt),vt=Math.min(1,vt)),Math.min(pt,vt)}function se(Se,Rt,ie){var je=1,ce,Vt=!1;if(Se.hasOwnProperty("allowUpscale")&&(Vt=Se.allowUpscale),Se.hasOwnProperty("scale")&&(je=parseFloat(Se.scale),(isNaN(je)||je===null||je===0)&&(je=1),je>1&&(Vt=!0)),Rt&&typeof window.GGBT_wsf_view=="object"&&window.GGBT_wsf_view.isFullscreen()&&(Vt=!0),!(Se.hasOwnProperty("disableAutoScale")&&Se.disableAutoScale))ce=Ft(Se,Rt,Vt,ie,Se.scaleContainerClass);else return je;return Vt&&(!Se.hasOwnProperty("scale")||je===1)?ce:Math.min(je,ce)}function ye(Se){var Rt=Math.min(window.innerWidth,document.documentElement.clientWidth),ie=Math.min(window.innerHeight,document.documentElement.clientHeight),je=Se.getBoundingClientRect(),ce=(Rt-je.width)/2,Vt=(ie-je.height)/2;Vt<0&&(Vt=0),Se.style.position="relative",window.GGBT_wsf_view.getCloseBtnPosition()==="closePositionRight"?(ce<40?Se.style.left="40px":Se.style.left=ce+"px",Se.style.top=Vt+"px"):window.GGBT_wsf_view.getCloseBtnPosition()==="closePositionTop"&&(Vt<40?Se.style.top="40px":Se.style.top=Vt+"px",Se.style.left=ce+"px")}function Be(Se,Rt){var ie=Se.querySelector(".appletParameters");if(ie){if(typeof window.GGBT_wsf_view=="object"&&window.GGBT_wsf_view.isFullscreen()){if(Rt.id!==ie.getAttribute("data-param-id"))return;window.GGBT_wsf_view.setCloseBtnPosition(Se)}if(ie.parentElement&&/fullscreen/.test(ie.parentElement.className))return;var je=se(Rt,Se);Tn()&&ie.setAttribute("data-param-scale",je);for(var ce=null,Vt=0;Vt<Se.childNodes.length;Vt++)if(Se.childNodes[Vt].className!==void 0&&Se.childNodes[Vt].className.match(/^applet_scaler/)){ce=Se.childNodes[Vt];break}if(ce!==null&&ce.querySelector(".noscale")!==null)return;var Qe=Rt.id!==void 0?Rt.id:"ggbApplet",Qt=window[Qe];(Qt==null||!Qt.recalculateEnvironments)&&ce!==null&&!ce.className.match(/fullscreen/)&&(ce.parentNode.style.transform="",!isNaN(je)&&je!==1?(ce.parentNode.style.width=Rt.width*je+"px",ce.parentNode.style.height=Rt.height*je+"px",oi(ce,je)):(oi(ce,1),ce.parentNode.style.width=Rt.width+"px",ce.parentNode.style.height=Rt.height+"px")),typeof window.GGBT_wsf_view=="object"&&window.GGBT_wsf_view.isFullscreen()&&ye(Se),window.GGBT_wsf_view&&!window.GGBT_wsf_view.isFullscreen()&&window.GGBT_wsf_general.adjustContentToResize($(ie).parents(".content-added-content"))}}return{responsiveResize:Be,isFlexibleWorksheetEditor:Tn,positionCenter:ye,getScale:se,scaleElement:oi}}();__WEBPACK_AMD_DEFINE_ARRAY__=[],__WEBPACK_AMD_DEFINE_RESULT__=function(){return GGBApplet}.apply(exports,__WEBPACK_AMD_DEFINE_ARRAY__),__WEBPACK_AMD_DEFINE_RESULT__!==void 0&&(module.exports=__WEBPACK_AMD_DEFINE_RESULT__),GGBAppletUtils.makeModule=function(name,permutation){function webModule(){var H="bootstrap",I="begin",J="gwt.codesvr."+name+"=",K="gwt.codesvr=",L=name,M="startup",N="DUMMY",O=0,P=1,Q="iframe",R="position:absolute; width:0; height:0; border:none; left: -1000px;",S=" top: -1000px;",T="Chrome",U="CSS1Compat",V="<!doctype html>",W="",X="<html><head></head><body></body></html>",Y="undefined",Z="readystatechange",$=10,_="script",ab="javascript",bb="Failed to load ",cb="moduleStartup",db="scriptTagAdded",eb="moduleRequested",fb="meta",gb="name",hb=name+"::",ib="::",jb="gwt:property",kb="content",lb="=",mb="gwt:onPropertyErrorFn",nb='Bad handler "',ob='" for "gwt:onPropertyErrorFn"',pb="gwt:onLoadErrorFn",qb='" for "gwt:onLoadErrorFn"',rb="#",sb="?",tb="/",ub="img",vb="clear.cache.gif",wb="baseUrl",xb=name+".nocache.js",yb="base",zb="//",Ab="selectingPermutation",Bb=name+".devmode.js",Cb=permutation,Db=":",Eb=".cache.js",Fb="loadExternalRefs",Gb="end",n=window,o=document;function p(){var Tn=n.location.search;return Tn.indexOf(J)!=-1||Tn.indexOf(K)!=-1}function q(Tn,oi){}webModule.__sendStats=q,webModule.__moduleName=L,webModule.__errFn=null,webModule.__moduleBase=N,webModule.__softPermutationId=O,webModule.__computePropValue=null,webModule.__getPropMap=null,webModule.__installRunAsyncCode=function(){},webModule.__gwtStartLoadingFragment=function(){return null},webModule.__gwt_isKnownPropertyValue=function(){return!1},webModule.__gwt_getMetaProperty=function(){return null};var r=null,s=n.__gwt_activeModules=n.__gwt_activeModules||{};s[L]={moduleName:L},webModule.__moduleStartupDone=function(Tn){var oi=s[L].bindings;s[L].bindings=function(){for(var Dt=oi?oi():{},Ft=Tn[webModule.__softPermutationId],se=O;se<Ft.length;se++){var ye=Ft[se];Dt[ye[O]]=ye[P]}return Dt}};var t;function u(){return v(),t}function v(){if(!t){var Tn=o.createElement(Q);if(Tn.id=L,Tn.style.cssText=R+S,Tn.tabIndex=-1,o.body.appendChild(Tn),t=Tn.contentWindow.document,navigator.userAgent.indexOf(T)==-1){t.open();var oi=document.compatMode==U?V:W;t.write(oi+X),t.close()}}}function w(Tn){function oi(Ft){function se(){return typeof o.readyState==Y?typeof o.body!=Y&&o.body!=null:/loaded|complete/.test(o.readyState)}var ye=se();if(ye){Ft();return}function Be(){if(!ye){if(!se())return;ye=!0,Ft(),o.removeEventListener&&o.removeEventListener(Z,Be,!1),Se&&clearInterval(Se)}}o.addEventListener&&o.addEventListener(Z,Be,!1);var Se=setInterval(function(){Be()},$)}function Dt(Ft){var se=u(),ye=se.body,Be=se.createElement(_);Be.language=ab,Be.crossOrigin=W,Be.src=Ft,webModule.__errFn&&(Be.onerror=function(){webModule.__errFn(L,new Error(bb+Ft))}),ye.appendChild(Be)}oi(function(){Dt(Tn)})}webModule.__startLoadingFragment=function(Tn){return C(Tn)},webModule.__installRunAsyncCode=function(Tn){var oi=u(),Dt=oi.body,Ft=oi.createElement(_);Ft.language=ab,Ft.text=Tn,Dt.appendChild(Ft),Dt.removeChild(Ft)};function A(){for(var c={},d,e,f=o.getElementsByTagName(fb),g=O,h=f.length;g<h;++g){var i=f[g],j=i.getAttribute(gb),k;if(j){if(j=j.replace(hb,W),j.indexOf(ib)>=O)continue;if(j==jb){if(k=i.getAttribute(kb),k){var l,m=k.indexOf(lb);m>=O?(j=k.substring(O,m),l=k.substring(m+P)):(j=k,l=W),c[j]=l}}else if(j==mb){if(k=i.getAttribute(kb),k)try{d=eval(k)}catch(Tn){alert(nb+k+ob)}}else if(j==pb&&(k=i.getAttribute(kb),k))try{e=eval(k)}catch(Tn){alert(nb+k+qb)}}}__gwt_getMetaProperty=function(Tn){var oi=c[Tn];return oi==null?null:oi},r=d,webModule.__errFn=e}function B(){function Tn(Se){var Rt=Se.lastIndexOf(rb);Rt==-1&&(Rt=Se.length);var ie=Se.indexOf(sb);ie==-1&&(ie=Se.length);var je=Se.lastIndexOf(tb,Math.min(ie,Rt));return je>=O?Se.substring(O,je+P):W}function oi(Se){if(!Se.match(/^\w+:\/\//)){var Rt=o.createElement(ub);Rt.src=Se+vb,Se=Tn(Rt.src)}return Se}function Dt(){var Se=__gwt_getMetaProperty(wb);return Se!=null?Se:W}function Ft(){for(var Se=o.getElementsByTagName(_),Rt=O;Rt<Se.length;++Rt)if(Se[Rt].src.indexOf(xb)!=-1)return Tn(Se[Rt].src);return W}function se(){var Se=o.getElementsByTagName(yb);return Se.length>O?Se[Se.length-P].href:W}function ye(){var Se=o.location;return Se.href==Se.protocol+zb+Se.host+Se.pathname+Se.search+Se.hash}var Be=Dt();return Be==W&&(Be=Ft()),Be==W&&(Be=se()),Be==W&&ye()&&(Be=Tn(o.location.href)),Be=oi(Be),Be}function C(Tn){return Tn.match(/^\//)||Tn.match(/^[a-zA-Z]+:\/\//)?Tn:webModule.__moduleBase+Tn}function D(){var Tn=[],oi=O,Dt=[],Ft=[];function se(Se){var Rt=Ft[Se](),ie=Dt[Se];if(Rt in ie)return Rt;var je=[];for(var ce in ie)je[ie[ce]]=ce;throw r&&r(Se,je,Rt),null}if(__gwt_isKnownPropertyValue=function(Se,Rt){return Rt in Dt[Se]},webModule.__getPropMap=function(){var Se={};for(var Rt in Dt)Dt.hasOwnProperty(Rt)&&(Se[Rt]=se(Rt));return Se},webModule.__computePropValue=se,n.__gwt_activeModules[L].bindings=webModule.__getPropMap,p())return C(Bb);var ye;try{ye=Cb;var Be=ye.indexOf(Db);Be!=-1&&(oi=parseInt(ye.substring(Be+P),$),ye=ye.substring(O,Be))}catch(Se){}return webModule.__softPermutationId=oi,C(ye+Eb)}function F(){n.__gwt_stylesLoaded||(n.__gwt_stylesLoaded={})}A(),webModule.__moduleBase="/js/mathematicalGraphics/"+name+"/",s[L].moduleBase=webModule.__moduleBase;var G=D();return F(),w(G),!0}return webModule},typeof window.web3d!="function"&&(window.web3d=GGBAppletUtils.makeModule("web3d","A18F540516513B1292CA7CEF2F6AFC7E")),typeof window.webSimple!="function"&&(window.webSimple=GGBAppletUtils.makeModule("webSimple","96B09BF1B436BF53F0DF54116700F16A")),window.GGBApplet=GGBApplet})()},46699:function(Tn,oi,Dt){"use strict";Dt.d(oi,{Ax:function(){return Be},Ds:function(){return Se},KI:function(){return ie},SI:function(){return ye},f1:function(){return se}});var Ft=Dt(346);function se(je){let ce=!0;if(je.length>0){for(let Vt=0;Vt<je.length;Vt++)if(je[Vt].compile_success==0||!je[Vt].compile_success){ce=!1;break}}else ce=!1;return ce}function ye(je,ce=""){let Vt=[];for(let Qe=0;Qe<je.length;Qe++){let Qt=je[Qe],Je=ce?`${ce}/${Qt.name}`:`${Qt.name}`;Vt.push({title:Qt.name,type:Qt.type,isLeaf:Qt.type!=="tree",key:Je})}return Vt}function Be(je,ce,Vt){for(let Qe=0;Qe<je.length;Qe++){let Qt=je[Qe];if(Qt.key===ce){Qt.children=Vt;break}Qt.children&&Be(Qt.children,ce,Vt)}return je}function Se(je,ce,Vt){let Qe;return function(){let Qt=this,Je=arguments,Nt=function(){Qe=null,Vt||je.apply(Qt,Je)},nt=Vt&&!Qe;clearTimeout(Qe),Qe=setTimeout(Nt,ce),nt&&je.apply(Qt,Je)}}const Rt=!0,ie=Ft.Z.API_SERVER},9507:function(Tn,oi,Dt){"use strict";Dt.d(oi,{Z:function(){return Qe}});var Ft=Dt(59301),se={imageDimensions:"imageDimensions___a7crR",img:"img___Kroat",fullWidth:"fullWidth___c492T"},ye=Dt(92310),Be=Dt.n(ye),Se=Dt(29787),Rt=Dt(2859),ie=Dt(38986),je=Dt(51257),ce=(Qt,Je,Nt)=>new Promise((nt,et)=>{var ct=vt=>{try{pt(Nt.next(vt))}catch(xt){et(xt)}},lt=vt=>{try{pt(Nt.throw(vt))}catch(xt){et(xt)}},pt=vt=>vt.done?nt(vt.value):Promise.resolve(vt.value).then(ct,lt);pt((Nt=Nt.apply(Qt,Je)).next())}),Qe=({data:Qt,className:Je,fullWidth:Nt,style:nt={},onClose:et,onOk:ct,showFullTools:lt,noAssociationId:pt})=>{const vt=(0,Ft.useRef)(null),xt=(0,Ft.useRef)(null),Lt=(0,Ft.useRef)(null),Ot=(0,Ft.useRef)(null),[Ht,te]=(0,Ft.useState)(!1),[_t,Xt]=(0,Ft.useState)("\u6B63\u5728\u52A0\u8F7D\u4E2D");(0,Ft.useEffect)(()=>(Lt.current||(Lt.current=document.createElement("style"),document.head.appendChild(Lt.current)),Qt!=null&&Qt.visible?(document.body.setAttribute("data-custom","y-hidden"),Lt.current.innerHTML=" html { overflow-y: hidden; }",Qt!=null&&Qt.src&&ve()):(document.body.removeAttribute("data-custom"),Lt.current&&(document.head.removeChild(Lt.current),Lt.current=null)),()=>{document.body.removeAttribute("data-custom"),Lt.current&&(document.head.removeChild(Lt.current),Lt.current=null)}),[Qt==null?void 0:Qt.visible]);const ve=()=>ce(void 0,null,function*(){te(!0),Xt("\u6B63\u5728\u52A0\u8F7D\u4E2D");const en=yield(0,je.ZJ)(Qt==null?void 0:Qt.src);vt.current.src="",vt.current.src=en,vt.current.onload=function(){Ye()},te(!1),Xt("")}),oe=en=>ce(void 0,null,function*(){te(!0),Xt("\u6B63\u5728\u4FDD\u5B58\u4E2D");const Rn=yield(0,ie.ZP)("/api/attachments.json",{method:"post",body:{file_type:"base64",original_filename:Qt.title,file:en.dataUrl}});Rn!=null&&Rn.id&&!pt?(yield(0,ie.ZP)(`/api/attachments/${Qt.id}/add_subitem.json`,{method:"post",body:{subitem_id:Rn==null?void 0:Rn.id,settings:JSON.stringify(en.state)}})).status===0&&ct():Rn!=null&&Rn.id&&ct(Rn),te(!1),Xt("")}),Re=()=>{const en=document.querySelector('a[href="https://markerjs.com/"]');en&&en.parentNode&&(en.parentNode.style.display="none"),[{name:'[data-action="select"]',title:"\u9009\u62E9"},{name:'[data-action="delete"]',title:"\u5220\u9664\u5143\u7D20"},{name:'[data-action="undo"]',title:"\u64A4\u9500"},{name:'[data-type-name="FrameMarker"]',title:"\u77E9\u5F62"},{name:'[data-type-name="FreehandMarker"]',title:"\u753B\u7EBF"},{name:'[data-type-name="ArrowMarker"]',title:"\u7BAD\u5934"},{name:'[data-type-name="TextMarker"]',title:"\u6587\u672C"},{name:'[data-type-name="EllipseMarker"]',title:"\u692D\u5706"},{name:'[data-type-name="HighlightMarker"]',title:"\u65B9\u5757"},{name:'[data-type-name="CalloutMarker"]',title:"\u6CE8\u91CA"},{name:'[data-action="render"]',title:"\u4FDD\u5B58"},{name:'[data-action="close"]',title:"\u9000\u51FA"}].forEach(wn=>{const un=document.querySelector(wn.name);un&&un.setAttribute("title",wn.title)})},Ye=()=>{xt.current=new Rt.hP(vt.current),xt.current.targetRoot=Ot.current,xt.current.addEventListener("render",oe),xt.current.addEventListener("beforeclose",et),lt&&(xt.current.availableMarkerTypes=xt.current.ALL_MARKER_TYPES,xt.current.uiStyleSettings.redoButtonVisible=!0,xt.current.uiStyleSettings.notesButtonVisible=!0,xt.current.uiStyleSettings.zoomButtonVisible=!0,xt.current.uiStyleSettings.zoomOutButtonVisible=!0,xt.current.uiStyleSettings.clearButtonVisible=!0),window.markerArea=xt.current.uiStyleSettings,xt.current.show(),Qt!=null&&Qt.snapshotData&&xt.current.restoreState(Qt.snapshotData),setTimeout(()=>{window.scrollTo(0,0),Re()},300)};return Ft.createElement(Ft.Fragment,null,(Qt==null?void 0:Qt.visible)&&Ft.createElement(Se.Z,{spinning:Ht,tip:_t,style:{position:"absolute",width:"100vw"}},Ft.createElement("div",{ref:Ot,className:Be()(se.imageDimensions,Je,Nt?se.fullWidth:""),style:nt},Ft.createElement("img",{className:se.img,ref:vt}))))}},76562:function(Tn,oi,Dt){"use strict";var Ft=Dt(59301),se=Dt(77019),ye=Dt(5269),Be=Dt(20554),Se=Dt(99571),Rt=Dt(76902),ie=Dt(99587),je=Dt(48136),ce=Dt(59301);const Vt=(0,Ft.forwardRef)(({callback:Qe,showSaveButton:Qt,value:Je=""},Nt)=>{const nt=(0,Ft.useRef)(),et=[{name:"\u5206\u6570\u5F97\u5206",value:"\\frac{x}{y}",children:[{name:"\u5206\u6570 Fractions",data:[{value:"\\frac{a}{b}"},{value:"x\\tfrac{x}{a} "},{value:"\\mathrm{d}t"},{value:"\\partial t"},{value:"\\frac{\\partial y}{\\partial x}"},{value:"\\nabla\\psi"},{value:"\\frac{\\partial^2}{\\partial x_1\\partial x_2}y"},{value:"\\cfrac{1}{a + \\cfrac{7}{b + \\cfrac{2}{9}}} = c"}]},{name:"\u5BFC\u6570 Derivative",data:[{value:"\\dot{a} "},{value:"\\ddot{a}"},{value:"{f}^{\\prime}"},{value:"{f}^{\\prime\\prime}"},{value:"{f}^{(n)}"}]},{name:"\u6A21\u7B97\u672F Modular arithmetic",data:[{value:"a \\bmod b"},{value:"a \\equiv b \\pmod{m} "},{value:"\\gcd(m, n) "},{value:"\\operatorname{lcm}(m, n) "}]}]},{name:"\u6839\u5F0F\u89D2\u6807",value:"\\sqrt{x}",children:[{name:"\u6839\u5F0F Radicals",data:[{value:"\\sqrt{x}"},{value:"\\sqrt[y]{x}"}]},{name:"\u4E0A\u4E0B\u6807 Sub&Super",data:[{value:"x^{a}"},{value:"x_{a}"},{value:"x_{a}^{b} "},{value:"_{a}^{b} x"},{value:"x_{a}^{b} "}]},{name:"\u91CD\u97F3\u7B26\u53CA\u5176\u4ED6 Accents and Others",data:[{value:"\\hat{a} "},{value:"\\sqrt[y]{x}"},{value:"\\check{} "},{value:"\\grave{a} "},{value:"\\acute{a}"},{value:"\\tilde{a}"},{value:"\\breve{a}"},{value:"\\bar{a}"},{value:"\\vec{a}"},{value:"\\not{a}"},{value:"\\widetilde{abc}"},{value:"\\widehat{abc}"},{value:"\\overleftarrow{abc} "},{value:"\\overrightarrow{abc}"},{value:"\\overline{abc}"},{value:"\\underline{abc}"},{value:"\\overbrace{abc}"},{value:"\\underbrace{abc}"},{value:"\\overset{a}{abc}"},{value:"\\underset{a}{abc} \\stackrel\\frown{ab}"},{value:"\\overline{ab} "},{value:"\\overleftrightarrow{ab}"},{value:"\\overset{a}{\\leftarrow}"},{value:"\\overset{a}{\\rightarrow}"},{value:"\\xleftarrow[abc]{a}"},{value:"\\xrightarrow[abc]{a} "}]}]},{name:"\u6781\u9650\u5BF9\u6570",value:"\\lim_{x \\to 0}",children:[{name:"\u6781\u9650 Limits",data:[{value:"\\lim a"},{value:"\\lim_{x \\to 0}"},{value:"\\lim_{x \\to \\infty}"},{value:"\\max_b{a}"},{value:"\\min_a{b}"}]},{name:"\u5BF9\u6570\u6307\u6570 Logarithms and exponentials",data:[{value:"\\log_{a}{b}"},{value:"\\lg_{a}{b}"},{value:"\\ln_{a}{b}"},{value:"\\exp a"}]},{name:"\u754C\u9650 Bounds",data:[{value:"\\min x"},{value:"\\sup t"},{value:"\\inf s"},{value:"\\lim u"},{value:"\\limsup w"},{value:"\\dim p"},{value:"\\ker\\phi "}]}]},{name:"\u4E09\u89D2\u51FD\u6570",value:"\\sin a",children:[{name:"\u4E09\u89D2\u51FD\u6570 Trigonometric functions",data:[{value:"\\sin a"},{value:"\\cos a"},{value:"\\tan a"},{value:"\\cot a "},{value:"\\sec a "},{value:"\\csc a "}]},{name:"\u53CD\u4E09\u89D2\u51FD\u6570 Inverse trigonometric functions",data:[{value:"\\sin^{-1}"},{value:"\\cos^{-1}"},{value:"\\tan^{-1}"},{value:"\\cot^{-1}"},{value:"\\sec^{-1}"},{value:"\\csc^{-1}"},{value:"\\arcsin a"},{value:"\\arccos a"},{value:"\\arctan a"},{value:"\\operatorname{arccot} a"},{value:"\\operatorname{arcsec} a"},{value:"\\operatorname{arccsc} a"}]},{name:"\u53CC\u66F2\u51FD\u6570 Hyperblic functions",data:[{value:"\\sinh a"},{value:"\\cosh a"},{value:"\\tanh a"},{value:"\\coth a"},{value:"\\operatorname{sech} a"},{value:"\\operatorname{csch} a"}]},{name:"\u53CD\u53CC\u66F2\u51FD\u6570 Inverse hyperbolic functions",data:[{value:"\\sinh^{-1}"},{value:"a\\cosh^{-1} a"},{value:"\\tanh^{-1} a"},{value:"\\coth^{-1} a"},{value:"\\operatorname{sech}^{-1} a"},{value:"\\operatorname{csch}^{-1} a"}]}]},{name:"\u79EF\u5206\u8FD0\u7B97",value:"\\int_{a}^{b}",children:[{name:"\u79EF\u5206 Integral",data:[{value:"\\int"},{value:"\\int_{a}^{b}"},{value:"\\int\\limits_{a}^{b}"}]},{name:"\u53CC\u91CD\u79EF\u5206 Double integral",data:[{value:"\\iint"},{value:"\\iint_{a}^{b} "},{value:"\\iint\\limits_{a}^{b} "}]},{name:"\u4E09\u91CD\u79EF\u5206 Triple integral",data:[{value:"\\iiint"},{value:"\\iiint_{a}^{b}"},{value:"\\iiint\\limits_{a}^{b} "}]},{name:"\u66F2\u7EBF\u79EF\u5206 Closed line or path integral",data:[{value:"\\oint"},{value:"\\oint_{a}^{b} "}]}]},{name:"\u5927\u578B\u8FD0\u7B97",value:"\\sum_{a}^{b}",children:[{name:"\u6C42\u548C Summation",data:[{value:"\\sum"},{value:"\\sum_{a}^{b}"},{value:"{\\textstyle \\sum_{a}^{b}} "}]},{name:"\u4E58\u79EF\u4F59\u79EF Product and coproduct",data:[{value:"\\prod"},{value:"\\prod_{a}^{b}"},{value:"{\\textstyle \\prod_{a}^{b}}"},{value:"\\coprod"},{value:"\\coprod_{a}^{b}"},{value:"{\\textstyle \\coprod_{a}^{b}} "}]},{name:"\u5E76\u96C6\u4EA4\u96C6 Union and intersection",data:[{value:"\\bigcup"},{value:"\\bigcup_{a}^{b}"},{value:"{\\textstyle \\bigcup_{a}^{b}}"},{value:"\\bigcap"},{value:"\\bigcap_{a}^{b}"}]},{name:"\u6790\u53D6\u5408\u53D6 Disjunction and conjunction",data:[{value:"\\bigvee"},{value:"\\bigvee_{a}^{b}"},{value:"\\bigwedge"},{value:"\\bigwedge_{a}^{b}"}]}]},{name:"\u62EC\u53F7\u53D6\u6574",value:"\\left [ \\left ( \\right ) \\right ] ",children:[{name:"\u62EC\u53F7 Brackets",data:[{value:"\\left ( \\right )"},{value:"\\left [ \\right ]"},{value:"\\left \\langle \\right \\rangle "},{value:"\\left | \\right | "},{value:"\\left \\lfloor \\right \\rfloor "},{value:"\\left \\lceil \\right \\rceil "}]}]}],ct=[{name:"\u4EE3\u6570",value:"\\sqrt{a^2+b^2}",children:[{data:[{value:"\\left(x-1\\right)\\left(x+3\\right) "},{value:"\\sqrt{a^2+b^2}"},{value:"\\left ( \\frac{a}{b}\\right )^{n}= \\frac{a^{n}}{b^{n}}"},{value:"\\frac{a}{b}\\pm \\frac{c}{d}= \\frac{ad \\pm bc}{bd} "},{value:"\\frac{x^{2}}{a^{2}}-\\frac{y^{2}}{b^{2}}=1 "},{value:"\\frac{1}{\\sqrt{a}}=\\frac{\\sqrt{a}}{a},a\\ge 0\\frac{1}{\\sqrt{a}}=\\frac{\\sqrt{a}}{a},a\\ge 0 "},{value:"\\sqrt[n]{a^{n}}=\\left ( \\sqrt[n]{a}\\right )^{n} "},{value:"x ={-b \\pm \\sqrt{b^2-4ac}\\over 2a} "},{value:"y-y_{1}=k \\left( x-x_{1}\\right) "},{value:`\\left\\{\\begin{matrix} \r
|
|
x=a + r\\text{cos}\\theta \\ \r
|
|
y=b + r\\text{sin}\\theta \r
|
|
\\end{matrix}\\right. `},{value:`\\begin{array}{l} \r
|
|
\\text{\u5BF9\u4E8E\u65B9\u7A0B\u5F62\u5982\uFF1A}x^{3}-1=0 \\ \r
|
|
\\text{\u8BBE}\\text{:}\\omega =\\frac{-1+\\sqrt{3}i}{2} \\ \r
|
|
x_{1}=1,x_{2}= \\omega =\\frac{-1+\\sqrt{3}i}{2} \\ \r
|
|
x_{3}= \\omega ^{2}=\\frac{-1-\\sqrt{3}i}{2} \r
|
|
\\end{array} `},{value:`\\begin{array}{l} \r
|
|
a\\mathop{{x}}\\nolimits^{{2}}+bx+c=0 \\ \r
|
|
\\Delta =\\mathop{{b}}\\nolimits^{{2}}-4ac \\ \r
|
|
\\left\\{\\begin{matrix} \r
|
|
\\Delta \\gt 0\\text{\u65B9\u7A0B\u6709\u4E24\u4E2A\u4E0D\u76F8\u7B49\u7684\u5B9E\u6839} \\ \r
|
|
\\Delta = 0\\text{\u65B9\u7A0B\u6709\u4E24\u4E2A\u76F8\u7B49\u7684\u5B9E\u6839} \\ \r
|
|
\\Delta \\lt 0\\text{\u65B9\u7A0B\u65E0\u5B9E\u6839} \r
|
|
\\end{matrix}\\right. \r
|
|
\\end{array} `},{value:`\\begin{array}{l} \r
|
|
a\\mathop{{x}}\\nolimits^{{2}}+bx+c=0 \\ \r
|
|
\\Delta =\\mathop{{b}}\\nolimits^{{2}}-4ac \\ \r
|
|
\\mathop{{x}}\\nolimits_{{1,2}}=\\frac{{-b \\pm \r
|
|
\\sqrt{{\\mathop{{b}}\\nolimits^{{2}}-4ac}}}}{{2a}} \\ \r
|
|
\\mathop{{x}}\\nolimits_{{1}}+\\mathop{{x}}\\nolimits_{{2}}=-\\frac{{b}}{{a}} \\ \r
|
|
\\mathop{{x}}\\nolimits_{{1}}\\mathop{{x}}\\nolimits_{{2}}=\\frac{{c}}{{a}} \r
|
|
\\end{array} `}]}]},{name:"\u51E0\u4F55",value:"\\Delta A B C ",children:[{data:[{value:"\\Delta A B C "},{value:"a \\parallel c,b \\parallel c \\Rightarrow a \\parallel b "},{value:"l \\perp \\beta ,l \\subset \\alpha \\Rightarrow \\alpha \\perp \\beta"},{value:`\\left.\\begin{matrix} \r
|
|
a \\perp \\alpha \\ \r
|
|
b \\perp \\alpha \r
|
|
\\end{matrix}\\right\\}\\Rightarrow a \\parallel b`},{value:"P \\in \\alpha ,P \\in \\beta , \\alpha \\cap \\beta =l \\Rightarrow P \\in l "},{value:`\\alpha \\perp \\beta , \\alpha \\cap \\beta =l,a \\subset \\alpha ,a \\perp l \r
|
|
\\Rightarrow a \\perp \\beta `},{value:`\\left.\\begin{matrix} \r
|
|
a \\subset \\beta ,b \\subset \\beta ,a \\cap b=P \\ \r
|
|
a \\parallel \\partial ,b \\parallel \\partial \r
|
|
\\end{matrix}\\right\\}\\Rightarrow \\beta \\parallel \\alpha `},{value:"\\alpha \\parallel \\beta , \\gamma \\cap \\alpha =a, \\gamma \\cap \\beta =b \\Rightarrow a \\parallel b "},{value:"A \\in l,B \\in l,A \\in \\alpha ,B \\in \\alpha \\Rightarrow l \\subset \\alpha "},{value:`\\left.\\begin{matrix} \r
|
|
m \\subset \\alpha ,n \\subset \\alpha ,m \\cap n=P \\ \r
|
|
a \\perp m,a \\perp n \r
|
|
\\end{matrix}\\right\\}\\Rightarrow a \\perp \\alpha `},{value:`\\begin{array}{c} \r
|
|
\\text{\u76F4\u89D2\u4E09\u89D2\u5F62\u4E2D,\u76F4\u89D2\u8FB9\u957Fa,b,\u659C\u8FB9\u8FB9\u957Fc} \\ \r
|
|
a^{2}+b^{2}=c^{2} \r
|
|
\\end{array}`}]}]},{name:"\u4E0D\u7B49\u5F0F",value:"a > b",children:[{data:[{value:"a > b,b > c \\Rightarrow a > c "},{value:"a > b,c > d \\Rightarrow a+c > b+d "},{value:"a > b > 0,c > d > 0 \\Rightarrow ac bd "},{value:`\\begin{array}{c} \r
|
|
a \\gt b,c \\gt 0 \\Rightarrow ac \\gt bc \\ \r
|
|
a \\gt b,c \\lt 0 \\Rightarrow ac \\lt bc \r
|
|
\\end{array}`},{value:"\\left | a-b \\right | \\geqslant \\left | a \\right | -\\left | b \\right | "},{value:"-\\left | a \\right |\\leq a\\leqslant \\left | a \\right | "},{value:"\\left | a \\right |\\leqslant b \\Rightarrow -b \\leqslant a \\leqslant \\left | b \\right | "},{value:"\\left | a+b \\right | \\leqslant \\left | a \\right | + \\left | b \\right | "},{value:`\\begin{array}{c} \r
|
|
a \\gt b \\gt 0,n \\in N^{\\ast},n \\gt 1 \\ \r
|
|
\\Rightarrow a^{n}\\gt b^{n}, \\sqrt[n]{a}\\gt \\sqrt[n]{b} \r
|
|
\\end{array}`},{value:`\\left( \\sum_{k=1}^n a_k b_k \\right)^{\\!\\!2}\\leq \r
|
|
\\left( \\sum_{k=1}^n a_k^2 \\right) \\left( \\sum_{k=1}^n b_k^2 \\right) `},{value:`\\begin{array}{c} \r
|
|
a,b \\in R^{+} \\ \r
|
|
\\Rightarrow \\frac{a+b}{{2}}\\ge \\sqrt{ab} \\ \r
|
|
\\left( \\text{\u5F53\u4E14\u4EC5\u5F53}a=b\\text{\u65F6\u53D6\u201C}=\\text{\u201D\u53F7}\\right) \r
|
|
\\end{array}`},{value:`\\begin{array}{c} \r
|
|
a,b \\in R \\ \r
|
|
\\Rightarrow a^{2}+b^{2}\\gt 2ab \\ \r
|
|
\\left( \\text{\u5F53\u4E14\u4EC5\u5F53}a=b\\text{\u65F6\u53D6\u201C}=\\text{\u201D\u53F7}\\right) \r
|
|
\\end{array}`},{value:`\\begin{array}{c} \r
|
|
H_{n}=\\frac{n}{\\sum \\limits_{i=1}^{n}\\frac{1}{x_{i}}}= \\frac{n}{\\frac{1}{x_{1}}+ \\frac{1}{x_{2}}+ \\cdots + \\frac{1}{x_{n}}} \\ G_{n}=\\sqrt[n]{\\prod \\limits_{i=1}^{n}x_{i}}= \\sqrt[n]{x_{1}x_{2}\\cdots x_{n}} \\ A_{n}=\\frac{1}{n}\\sum \\limits_{i=1}^{n}x_{i}=\\frac{x_{1}+ x_{2}+ \\cdots + x_{n}}{n} \\ Q_{n}=\\sqrt{\\sum \\limits_{i=1}^{n}x_{i}^{2}}= \\sqrt{\\frac{x_{1}^{2}+ x_{2}^{2}+ \\cdots + x_{n}^{2}}{n}} \\ H_{n}\\leq G_{n}\\leq A_{n}\\leq Q_{n} \r
|
|
\\end{array}`}]}]},{name:"\u79EF\u5206",value:"\\frac{\\mathrm{d}\\partial}{\\partial x}",children:[{data:[{value:"\\frac{\\mathrm{d}}{\\mathrm{d}x}x^n=nx^{n-1} "},{value:"\\frac{\\mathrm{d}}{\\mathrm{d}x}e^{ax}=a\\,e^{ax} "},{value:"\\frac{\\mathrm{d}}{\\mathrm{d}x}\\ln(x)=\\frac{1}{x} "},{value:"\\frac{\\mathrm{d}}{\\mathrm{d}x}\\sin x=\\cos x "},{value:"\\frac{\\mathrm{d}}{\\mathrm{d}x}\\cos x=-\\sin x "},{value:"\\int k\\mathrm{d}x = kx+C "},{value:"\\frac{\\mathrm{d}}{\\mathrm{d}x}\\tan x=\\sec^2 x "},{value:"\\frac{\\mathrm{d}}{\\mathrm{d}x}\\cot x=-\\csc^2 x "},{value:"\\int \\frac{1}{x}\\mathrm{d}x= \\ln \\left| x \\right| +C "},{value:"\\int \\frac{1}{\\sqrt{1-x^{2}}}\\mathrm{d}x= \\arcsin x +C "},{value:"\\int \\frac{1}{1+x^{2}}\\mathrm{d}x= \\arctan x +C "},{value:"\\int u \\frac{\\mathrm{d}v}{\\mathrm{d}x}\\,\\mathrm{d}x=uv-\\int \\frac{\\mathrm{d}u}{\\mathrm{d}x}v\\,\\mathrm{d}x "},{value:"f(x) = \\int_{-\\infty}^\\infty \\hat f(x)\\xi\\,e^{2 \\pi i \\xi x} \\,\\mathrm{d}\\xi "},{value:"\\int x^{\\mu}\\mathrm{d}x=\\frac{x^{\\mu +1}}{\\mu +1}+C, \\left({\\mu \\neq -1}\\right) "}]}]},{name:"\u4E09\u89D2",value:"e^{i \\theta}",children:[{name:"\u6C42\u548C Summation",data:[{value:"e^{i \\theta} "},{value:"\\left(\\frac{\\pi}{2}-\\theta \\right ) "},{value:"\\text{sin}^{2}\\frac{\\alpha}{2}=\\frac{1- \\text{cos}\\alpha}{2} "},{value:"\\text{cos}^{2}\\frac{\\alpha}{2}=\\frac{1+ \\text{cos}\\alpha}{2} "},{value:"\\text{tan}\\frac{\\alpha}{2}=\\frac{\\text{sin}\\alpha}{1+ \\text{cos}\\alpha} "},{value:"\\sin \\alpha + \\sin \\beta =2 \\sin \\frac{\\alpha + \\beta}{2}\\cos \\frac{\\alpha - \\beta}{2} "},{value:"\\sin \\alpha - \\sin \\beta =2 \\cos \\frac{\\alpha + \\beta}{2}\\sin \\frac{\\alpha - \\beta}{2} "},{value:"\\cos \\alpha + \\cos \\beta =2 \\cos \\frac{\\alpha + \\beta}{2}\\cos \\frac{\\alpha - \\beta}{2} "},{value:"\\cos \\alpha - \\cos \\beta =-2\\sin \\frac{\\alpha + \\beta}{2}\\sin \\frac{\\alpha - \\beta}{2} "},{value:"a^{2}=b^{2}+c^{2}-2bc\\cos A "},{value:"\\frac{\\sin A}{a}=\\frac{\\sin B}{b}=\\frac{\\sin C}{c}=\\frac{1}{2R} "},{value:"\\sin \\left ( \\frac{\\pi}{2}-\\alpha \\right ) = \\cos \\alpha "},{value:"\\sin \\left ( \\frac{\\pi}{2}+\\alpha \\right ) = \\cos \\alpha "}]}]},{name:"\u7EDF\u8BA1",value:"C_{r}^{n}",children:[{data:[{value:"C_{r}^{n} "},{value:"\\frac{n!}{r!(n-r)!} "},{value:"\\sum_{i=1}^{n}{X_i} "},{value:"\\sum_{i=1}^{n}{X_i^2} "},{value:"X_1, \\cdots,X_n "},{value:"\\frac{x-\\mu}{\\sigma} "},{value:"\\sum_{i=1}^{n}{(X_i - \\overline{X})^2} "},{value:`\\begin{array}{c} \r
|
|
\\text{\u82E5}P \\left( AB \\right) =P \\left( A \\right) P \\left( B \\right) \\\\ \r
|
|
\\text{\u5219}P \\left( A \\left| B\\right. \\right) =P \\left({B}\\right) \r
|
|
\\end{array}`},{value:"P(E) ={n \\choose k}p^k (1-p)^{n-k} "},{value:"P \\left( A \\right) = \\lim \\limits_{n \\to \\infty}f_{n}\\left ( A \\right ) "},{value:"P \\left( \\bigcup \\limits_{i=1}^{+ \\infty}A_{i}\\right) = \\prod \\limits_{i=1}^{+ \\infty}P{\\left( A_{i}\\right)} "},{value:`\\begin{array}{c} \r
|
|
P \\left( \\emptyset \\right) =0 \\\\ \r
|
|
P \\left( S \\right) =1 \r
|
|
\\end{array}`},{value:`\\begin{array}{c} \r
|
|
\\forall A \\in S \\\\ \r
|
|
P \\left( A \\right) \\ge 0 \r
|
|
\\end{array}`},{value:"P \\left( \\bigcup \\limits_{i=1}^{n}A_{i}\\right) = \\prod \\limits_{i=1}^{n}P \\left( A_{i}\\right) "},{value:`\\begin{array}{c} \r
|
|
S= \\binom{N}{n},A_{k}=\\binom{M}{k}\\cdot \\binom{N-M}{n-k} \\\\ \r
|
|
P\\left ( A_{k}\\right ) = \\frac{\\binom{M}{k}\\cdot \\binom{N-M}{n-k}}{\\binom{N}{n}} \r
|
|
\\end{array}`},{value:`\\begin{array}{c} \r
|
|
P_{n}=n! \\\\ \r
|
|
A_{n}^{k}=\\frac{n!}{\\left( n-k \\left) !\\right. \\right.} \r
|
|
\\end{array}`}]}]}],lt=xt=>{nt.current.setValue(nt.current.getValue()+" "+xt.value+" ")},pt=[{key:"1",label:"\u5FEB\u6377\u6A21\u677F",children:ce.createElement(se.Z,{className:ie.Z.lists,gutter:[10,10]},et.map((xt,Lt)=>ce.createElement(ye.Z,{flex:"110px",className:ie.Z.item},ce.createElement("div",null,ce.createElement(Rt.Z,{value:`$$${xt.value}$$`}),xt.name),ce.createElement("div",{className:ie.Z.children},xt.children.map((Ot,Ht)=>ce.createElement("div",{key:Ht},ce.createElement("h1",null,Ot.name),ce.createElement(se.Z,{gutter:[10,10]},Ot.data.map((te,_t)=>ce.createElement(ye.Z,{key:_t,onClick:()=>lt(te),className:ie.Z.diamond},ce.createElement(Rt.Z,{value:"`$$"+te.value+"$$`"}))))))))))},{key:"2",label:"\u516C\u5F0F\u6A21\u677F",children:ce.createElement(se.Z,{className:ie.Z.lists,gutter:[10,10]},ct.map((xt,Lt)=>ce.createElement(ye.Z,{flex:"110px",className:ie.Z.item},ce.createElement("div",null,ce.createElement(Rt.Z,{value:"`$$"+xt.value+"$$`"}),xt.name),ce.createElement("div",{className:ie.Z.children},xt.children.map((Ot,Ht)=>ce.createElement("div",{key:Ht},Ot.name&&ce.createElement("h1",null,Ot.name),ce.createElement(se.Z,{gutter:[10,10]},Ot.data.map((te,_t)=>ce.createElement(ye.Z,{key:_t,onClick:()=>lt(te),className:ie.Z.diamond},ce.createElement(Rt.Z,{value:"`$$"+te.value+"$$`"}))))))))))}],vt=()=>{var xt=document.createElement("div");xt.innerHTML=nt.current.getValue();var Lt=xt.innerText;return Qe&&Qe(Lt),Lt};return(0,Ft.useImperativeHandle)(Nt,()=>({getData:vt})),ce.createElement("div",{className:ie.Z.mathWrap},ce.createElement(Be.default,{defaultActiveKey:"1",items:pt}),ce.createElement("math-field",{locale:"zh_cn",className:ie.Z.mathField,placeholder:"\u8BF7\u6253\u5F00\u952E\u76D8\uFF0C\u8F93\u5165\u516C\u5F0F",ref:nt,style:{width:800,marginTop:30,fontSize:18}},Je||""),Qt&&ce.createElement("div",{className:ie.Z.button},ce.createElement(Se.ZP,{size:"large",onClick:vt,style:{zIndex:8,marginTop:10},type:"primary"},"\u4FDD\u5B58\u5230\u7F16\u8F91\u5668")))});oi.Z=Vt},96472:function(Tn,oi,Dt){"use strict";Dt.d(oi,{z:function(){return vn},Z:function(){return ne}});var Ft=Dt(59301),se=Dt(14566),ye=Dt(6767),Be=Dt(62957),Se=Dt(99571),Rt=Dt(346),ie=Dt(51917),je=Object.defineProperty,ce=Object.getOwnPropertySymbols,Vt=Object.prototype.hasOwnProperty,Qe=Object.prototype.propertyIsEnumerable,Qt=(jt,Fe,We)=>Fe in jt?je(jt,Fe,{enumerable:!0,configurable:!0,writable:!0,value:We}):jt[Fe]=We,Je=(jt,Fe)=>{for(var We in Fe||(Fe={}))Vt.call(Fe,We)&&Qt(jt,We,Fe[We]);if(ce)for(var We of ce(Fe))Qe.call(Fe,We)&&Qt(jt,We,Fe[We]);return jt},Nt=(jt,Fe,We)=>new Promise((Pn,ke)=>{var tn=Pe=>{try{Jn(We.next(Pe))}catch(an){ke(an)}},fn=Pe=>{try{Jn(We.throw(Pe))}catch(an){ke(an)}},Jn=Pe=>Pe.done?Pn(Pe.value):Promise.resolve(Pe.value).then(tn,fn);Jn((We=We.apply(jt,Fe)).next())});const nt="\u3000\u3000";function et(jt){var Fe=["Bytes","KB","MB","GB","TB"];if(jt==0)return"0 Byte";var We=parseInt(""+Math.floor(Math.log(jt)/Math.log(1024)),10);return(jt/Math.pow(1024,We)).toFixed(1)+" "+Fe[We]}var ct=({value:jt=[],action:Fe,onChange:We,className:Pn,maxSize:ke=150,title:tn="\u6587\u4EF6\u4E0A\u4F20",accept:fn=null})=>{const Jn={multiple:!1,fileList:jt,accept:fn,withCredentials:!0,beforeUpload:an=>an.size/1024/1024<ke?!0:(message.error(`\u8BE5\u6587\u4EF6\u65E0\u6CD5\u4E0A\u4F20\u3002\u8D85\u8FC7\u6587\u4EF6\u5927\u5C0F\u9650\u5236(${ke}MB),\u5EFA\u8BAE\u4E0A\u4F20\u5230\u767E\u5EA6\u4E91\u7B49\u5176\u5B83\u5171\u4EAB\u5DE5\u5177\u91CC\uFF0C\u7136\u540E\u518Dtxt\u6587\u6863\u91CC\u7ED9\u51FA\u94FE\u63A5\u4EE5\u53CA\u5171\u4EAB\u5BC6\u7801\u5E76\u4E0A\u4F20`),Promise.reject()),action:`${ENV.API_SERVER}/api/attachments.json`,onChange(an){var re,hn,di,Tt;let Et=[...an.fileList];if(Et=Et.map(St=>(St.name.indexOf(nt)===-1&&(St.name=`${St.name}${nt}${et(St.size)}`),Je({},St))),an.file.status==="done"&&((hn=(re=an.file)==null?void 0:re.response)==null?void 0:hn.status)===-1){message.error((Tt=(di=an.file)==null?void 0:di.response)==null?void 0:Tt.message),We([]);return}We(Et)},onRemove:an=>Nt(void 0,null,function*(){const re=an.size/1024/1024;return an.status==="uploading"?!0:re<ke&&(an.response?an.response.id:an.uid)?yield removeAttachment(an.response?an.response.id:an.id):!0})};function Pe(an){an.preventDefault(),an.stopPropagation()}return React.createElement("div",{className:`single-upload ${Pn||""}`},React.createElement(Upload,Je({},Jn),React.createElement(Button,{type:"primary",title:jt.length>0?"\u6BCF\u6B21\u53EA\u80FD\u4E0A\u4F20\u4E00\u4E2A\u8D44\u6E90\uFF0C \u5220\u9664\u4E0B\u9762\u8D44\u6E90\u53EF\u91CD\u65B0\u4E0A\u4F20 ":"",disabled:jt.length>0,ghost:!0},tn),React.createElement("span",{onClick:Pe,style:{marginLeft:10}},"(\u5355\u4E2A\u6587\u4EF6\u6700\u5927",ke,"M)"," ")))},lt=Dt(61481),pt=Dt(89392),vt=Object.defineProperty,xt=Object.getOwnPropertySymbols,Lt=Object.prototype.hasOwnProperty,Ot=Object.prototype.propertyIsEnumerable,Ht=(jt,Fe,We)=>Fe in jt?vt(jt,Fe,{enumerable:!0,configurable:!0,writable:!0,value:We}):jt[Fe]=We,te=(jt,Fe)=>{for(var We in Fe||(Fe={}))Lt.call(Fe,We)&&Ht(jt,We,Fe[We]);if(xt)for(var We of xt(Fe))Ot.call(Fe,We)&&Ht(jt,We,Fe[We]);return jt};const _t=jt=>React.createElement("svg",te({width:14,height:14,xmlns:"http://www.w3.org/2000/svg"},jt),React.createElement("title",null,"\u5F62\u72B6"),React.createElement("path",{d:"M10.354 3.5h-2.77v8.167H6.416V3.5H3.646L7 0l3.354 3.5ZM14 7h-1.167v5.833H1.167V7H0v7h14V7Z",fill:"#3061D0",fillRule:"nonzero"}));var Xt="data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTQiIGhlaWdodD0iMTQiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PHBhdGggZD0iTTEwLjM1NCAzLjVoLTIuNzd2OC4xNjdINi40MTZWMy41SDMuNjQ2TDcgMGwzLjM1NCAzLjVaTTE0IDdoLTEuMTY3djUuODMzSDEuMTY3VjdIMHY3aDE0VjdaIiBmaWxsPSIjMzA2MUQwIiBmaWxsLXJ1bGU9Im5vbnplcm8iLz48L3N2Zz4=",ve=Object.defineProperty,oe=Object.getOwnPropertySymbols,Re=Object.prototype.hasOwnProperty,Ye=Object.prototype.propertyIsEnumerable,en=(jt,Fe,We)=>Fe in jt?ve(jt,Fe,{enumerable:!0,configurable:!0,writable:!0,value:We}):jt[Fe]=We,Rn=(jt,Fe)=>{for(var We in Fe||(Fe={}))Re.call(Fe,We)&&en(jt,We,Fe[We]);if(oe)for(var We of oe(Fe))Ye.call(Fe,We)&&en(jt,We,Fe[We]);return jt},wn=(jt,Fe,We)=>new Promise((Pn,ke)=>{var tn=Pe=>{try{Jn(We.next(Pe))}catch(an){ke(an)}},fn=Pe=>{try{Jn(We.throw(Pe))}catch(an){ke(an)}},Jn=Pe=>Pe.done?Pn(Pe.value):Promise.resolve(Pe.value).then(tn,fn);Jn((We=We.apply(jt,Fe)).next())});const{Dragger:un}=se.default;function vn(jt){let Fe=[];return jt&&jt.length>0&&(Fe=jt.map(We=>({uid:We.id,id:We.id,name:We.title+nt+We.filesize,url:We.url,filesize:We.filesize,status:"done",response:{id:We.id}}))),Fe}var ne=({value:jt,onChange:Fe,action:We,data:Pn,className:ke,maxSize:tn=150,title:fn="\u4E0A\u4F20\u9644\u4EF6",showRemoveModal:Jn=!1,accept:Pe="",additionalText:an,isDragger:re,number:hn=1e3,aloneClear:di=!1,realTimeRemove:Tt=!0,uploadText:Et,setFileProgress:St,showFileProgress:Mt})=>{const[zt,kt]=(0,Ft.useState)(!1);let[Ut,Oe]=(0,Ft.useState)(jt||[]),[Te,_e]=(0,Ft.useState)(1);(0,Ft.useEffect)(()=>{jt&&(Te===1&&Oe([...jt]),_e(2),hn===(jt==null?void 0:jt.length)&&kt(!0))},[jt]);const ee=()=>{setTimeout(()=>{Ut.pop(),Oe([...Ut])},500)};Mt&&St(Ut.some(be=>be.status==="uploading"));const de={multiple:!0,disabled:zt,accept:Pe,withCredentials:!0,fileList:Ut,beforeUpload:(be,ze)=>{const rn=be.size/1024/1024;return Ut.concat(ze).length>hn?(Ut.pop(),Oe([...Ut]),ye.ZP.error(`\u6700\u591A\u53EA\u80FD\u4E0A\u4F20${hn}\u4E2A\u6587\u4EF6`),di?Promise.reject():(ee(),!1)):rn<tn?!0:(ye.ZP.error(`\u8BE5\u6587\u4EF6\u65E0\u6CD5\u4E0A\u4F20\u3002\u8D85\u8FC7\u6587\u4EF6\u5927\u5C0F\u9650\u5236(${tn}MB).`),di?Promise.reject():(ee(),!1))},data:Pn,action:We||`${Rt.Z.API_SERVER}/api/attachments.json`,onChange(be){var ze,rn,He,yn;if(be.file.status==="removed"?Ut=be.fileList:Ut=(0,pt.uniqBy)([...be.fileList,...Ut],"uid"),be.file.status==="done"&&((rn=(ze=be.file)==null?void 0:ze.response)==null?void 0:rn.status)===-1){ye.ZP.error((yn=(He=be.file)==null?void 0:He.response)==null?void 0:yn.message);return}Ut.length>=hn?kt(!0):kt(!1),Oe([...Ut]),Ut=Ut.map(xe=>{var Ne,Ze;return(Ne=xe==null?void 0:xe.response)!=null&&Ne.id&&(xe.url=(Ze=xe==null?void 0:xe.response)==null?void 0:Ze.url),xe.name.indexOf(nt)===-1&&(xe.name=`${xe.name}${nt}${et(xe.size)}`),Rn({},xe)}),console.log("info:",be,Ut),Fe(Ut)},onRemove:be=>wn(void 0,null,function*(){if(!Tt)return!0;const ze=()=>wn(void 0,null,function*(){if(be.response?be.response.id:be.id){let He=yield(0,ie.JZ)(be.response?be.response.id:be.uid);return Promise.resolve(He)}else return!0});return Jn?new Promise((rn,He)=>{Be.default.confirm({centered:!0,width:530,okText:"\u786E\u5B9A",cancelText:"\u53D6\u6D88",title:"\u63D0\u793A",content:Ft.createElement("div",{className:"tc font16"},"\u662F\u5426\u786E\u8BA4\u5220\u9664?"),onOk:()=>wn(void 0,null,function*(){const yn=yield ze();ye.ZP.success("\u5220\u9664\u6210\u529F"),rn(!0)}),onCancel:()=>rn(!1)})}):yield ze()})};function pe(be){be.preventDefault(),be.stopPropagation()}return Ft.createElement("div",{className:`multi-upload ${ke||""}`},re&&Ft.createElement(un,Rn({},de),Ft.createElement("p",{className:"ant-upload-drag-icon"},Ft.createElement(lt.Z,null)),Ft.createElement("p",{className:"ant-upload-text"},"\u70B9\u51FB\u4E0A\u4F20\u56FE\u6807\uFF0C\u9009\u62E9\u8981\u4E0A\u4F20\u7684\u6587\u4EF6\u6216\u5C06\u6587\u4EF6\u62D6\u62FD\u5230\u6B64",Ft.createElement("br",null),"(\u5355\u4E2A\u6587\u4EF6\u6700\u5927\u9650\u5236\u4E3A",tn,"MB)"," "),an),!re&&Ft.createElement(se.default,Rn({},de),Ft.createElement(Se.ZP,{disabled:zt,className:"upload_button"},Ft.createElement("img",{className:"aBtn_img",src:Xt}),fn),Ft.createElement("span",{onClick:pe,className:"upload_text"},Et||`(\u5355\u4E2A\u6587\u4EF6\u6700\u5927${tn}MB)`)))}},28426:function(Tn,oi,Dt){"use strict";var Ft=Dt(59301),se=Dt(93314),ye=Dt(99571),Be=Object.defineProperty,Se=Object.defineProperties,Rt=Object.getOwnPropertyDescriptors,ie=Object.getOwnPropertySymbols,je=Object.prototype.hasOwnProperty,ce=Object.prototype.propertyIsEnumerable,Vt=(Nt,nt,et)=>nt in Nt?Be(Nt,nt,{enumerable:!0,configurable:!0,writable:!0,value:et}):Nt[nt]=et,Qe=(Nt,nt)=>{for(var et in nt||(nt={}))je.call(nt,et)&&Vt(Nt,et,nt[et]);if(ie)for(var et of ie(nt))ce.call(nt,et)&&Vt(Nt,et,nt[et]);return Nt},Qt=(Nt,nt)=>Se(Nt,Rt(nt));const Je=({img:Nt,buttonProps:nt={},styles:et={},customText:ct,ButtonText:lt,ButtonClick:pt,Buttonclass:vt,ButtonTwo:xt,imgStyles:Lt,loading:Ot=!1,className:Ht=""})=>Ft.createElement("section",{className:`tc animated fadeIn ${Ht}`,style:Qe({color:"#999",margin:"100px auto",visibility:Ot?"hidden":"visible"},et)},Ft.createElement("img",{src:Nt||se,style:Qt(Qe({},Lt),{pointerEvents:"none",userSelect:"none"})}),Ft.createElement("p",{className:"mt20 font14"},ct||"\u6682\u65F6\u8FD8\u6CA1\u6709\u76F8\u5173\u6570\u636E\u54E6!"),lt&&Ft.createElement(ye.ZP,Qe({className:vt,onClick:pt},nt),lt),xt&&xt);oi.Z=Je},45677:function(Tn,oi,Dt){"use strict";Dt.d(oi,{Z:function(){return vt}});var Ft=Dt(59301),se={wrp:"wrp___dq7YK",bgBlack:"bgBlack___ARIUV",monaco:"monaco___VnZC3",darkBlue:"darkBlue___UprA9",close:"close___LKoWu",embed:"embed___hvpEJ"},ye=Dt(99571),Be=Dt(70557),Se=Dt(75975),Rt=Dt(25399),ie=Dt(51257),je=Dt(81722),ce=Dt(28426),Vt=Dt(346),Qe=Dt(44203),Qt=Dt(59301),Je=Object.defineProperty,Nt=Object.getOwnPropertySymbols,nt=Object.prototype.hasOwnProperty,et=Object.prototype.propertyIsEnumerable,ct=(xt,Lt,Ot)=>Lt in xt?Je(xt,Lt,{enumerable:!0,configurable:!0,writable:!0,value:Ot}):xt[Lt]=Ot,lt=(xt,Lt)=>{for(var Ot in Lt||(Lt={}))nt.call(Lt,Ot)&&ct(xt,Ot,Lt[Ot]);if(Nt)for(var Ot of Nt(Lt))et.call(Lt,Ot)&&ct(xt,Ot,Lt[Ot]);return xt},pt=(xt,Lt,Ot)=>new Promise((Ht,te)=>{var _t=oe=>{try{ve(Ot.next(oe))}catch(Re){te(Re)}},Xt=oe=>{try{ve(Ot.throw(oe))}catch(Re){te(Re)}},ve=oe=>oe.done?Ht(oe.value):Promise.resolve(oe.value).then(_t,Xt);ve((Ot=Ot.apply(xt,Lt)).next())}),vt=({editOffice:xt="view",data:Lt,issaver:Ot,onSaver:Ht,theme:te,type:_t,filename:Xt,monacoEditor:ve,className:oe,style:Re,close:Ye,onClose:en,hasMask:Rn,disabledDownload:wn,onImgDimensions:un,showNodata:vn,recordInfo:ne})=>{const[jt,Fe]=(0,Ft.useState)("https://view.officeapps.live.com/op/view.aspx?src=http://testgs.educoder.net//rails/active_storage/blobs/eyJfcmFpbHMiOnsibWVzc2FnZSI6IkJBaHBCZz09IiwiZXhwIjpudWxsLCJwdXIiOiJibG9iX2lkIn19--03541f6234b93d7ac3b2d84e7eb0e6594a952945/1.ppt"),[We,Pn]=(0,Ft.useState)(""),[ke,tn]=(0,Ft.useState)(),fn=window.ENV==="build"?"/react/build":"",Jn=location.host.startsWith("localhost")?Vt.Z.PROXY_SERVER:Vt.Z.API_SERVER,an=10*(1024*1024),re=(0,Ft.useRef)();Lt!=null&&Lt.startsWith("/api")&&_t!=="txt"&&(Lt=Vt.Z.API_SERVER+Lt);const hn=Mt=>Mt.substring(Mt.lastIndexOf("/")+1).split(".").pop();Xt&&ve&&(ve.filename=Xt),(0,Ft.useEffect)(()=>{var Mt,zt;const kt=(zt=(Mt=document.cookie)==null?void 0:Mt.replace(/\s/g,""))==null?void 0:zt.split(";");kt==null||kt.map(Ut=>{let Oe=Ut.split("=");Oe[0]==="_educoder_session"&&Pn(Oe[1])})},[]),(0,Ft.useEffect)(()=>{_t==="office"&&(Lt.indexOf("bigfilescdn.")>-1||Lt.indexOf("bigfiles1")>-1?tn({url:Lt,fileType:hn(Lt),model:Lt.indexOf("model=edit")?"edit":"view"}):Tt())},[_t,Lt]);function di(Mt){return pt(this,null,function*(){Mt.data.type==="pdfdata"&&(Ht(Mt.data.data),window.removeEventListener("message",di,!1)),console.log("mess---:",Mt.data)})}const Tt=()=>pt(void 0,null,function*(){console.log("data:",Lt);let Mt=Lt;Lt.startsWith("http")||(Mt=location.origin+Mt);let zt=new URL(Mt).pathname.split("/").pop();const kt=yield(0,je.gJ)({attachment_id:zt});kt.url=Jn+kt.url,tn(kt)}),Et=()=>{if(Lt.startsWith("http")||Lt.startsWith("blob:")){St();return}(0,ie.Sv)(Xt||"educoder",Lt,Xt)},St=()=>{ne&&(0,Qe.fc)({id:ne==null?void 0:ne.id,watch_type:1,course_id:ne==null?void 0:ne.course_id}),(0,ie.Nd)(Xt||"educoder",decodeURIComponent(Lt))};return Qt.createElement("div",{style:lt({},Re||{}),className:`${Rn&&se.bgBlack} ${_t?se.wrp:"hide"}`},Ye&&Qt.createElement("div",{className:se.close,ref:re},!!un&&Qt.createElement(Rt.Z,{title:"\u70B9\u51FB\u5BF9\u56FE\u7247\u8FDB\u884C\u6279\u6CE8",getPopupContainer:()=>re.current},Qt.createElement("span",{onClick:()=>{en(),un()}},Qt.createElement("i",{className:"icon-yulanpizhu"}))),!wn&&Qt.createElement(Rt.Z,{title:"\u70B9\u51FB\u4E0B\u8F7D\u6B64\u6587\u4EF6",getPopupContainer:()=>re.current},Qt.createElement("span",{onClick:St},Qt.createElement("i",{className:"icon-quxiaozhiding"}))),Ot&&Qt.createElement(Rt.Z,{title:"\u4FDD\u5B58pdf\u5E76\u9000\u51FA",getPopupContainer:()=>re.current},Qt.createElement("span",{className:"",onClick:()=>{const Mt=document.getElementById("pdfiframe");window.addEventListener("message",di,!1),setTimeout(()=>{Mt.contentWindow.postMessage("getData","*")},300)}},Qt.createElement("i",{className:"icon-baocun"}))),Qt.createElement(Rt.Z,{title:"\u5173\u95ED",getPopupContainer:()=>re.current},Qt.createElement("span",{className:"",onClick:()=>{en()}},Qt.createElement("i",{className:"icon-guanbi1"})))),Qt.createElement("div",{className:`${se[oe]} ${oe} ${se.monaco} ${_t==="txt"?"show":"hide"}`},_t==="txt"&&Qt.createElement(Qt.Fragment,null,Qt.createElement(Se.ZP,lt({},ve)))),_t==="audio"&&Qt.createElement("audio",{src:`${(Lt==null?void 0:Lt.indexOf("http://"))>-1||(Lt==null?void 0:Lt.indexOf("https://"))>-1?"":"data:audio/mp3;base64,"}${Lt}`,autoPlay:!0}),_t==="video"&&Qt.createElement(Qt.Fragment,null,(Lt==null?void 0:Lt.indexOf("http"))>-1?Qt.createElement("video",{controls:!0,src:`${Lt}`,autoPlay:!0}):Qt.createElement("video",{controls:!0,src:`data:video/mp4;base64,${Lt}`,autoPlay:!0})),_t==="office"&&ke&&Qt.createElement("iframe",{src:`${fn}/office.html?key=${ke.key}&url=${btoa(ke.url)}&callbackUrl=${Jn+(ke.callbackUrl||"")}&fileType=${ke.fileType}&title=${ke.title||""}&model=${xt}&officeServer=${Vt.Z.ONLYOFFICE}&disabledDownload=${!!wn}`}),_t==="html"&&Qt.createElement("iframe",{src:Lt+"&disposition=inline"}),_t==="pdf"&&Qt.createElement("iframe",{id:"pdfiframe",src:`${fn}/js/pdfview/index.html?filename=${Xt||"educoder.pdf"}&url=${encodeURIComponent(Lt)}&disabledDownload=${!!wn}&model=${xt}`}),_t==="image"&&Qt.createElement("img",{src:`${(Lt==null?void 0:Lt.indexOf("http://"))>-1||(Lt==null?void 0:Lt.indexOf("https://"))>-1?"":"data:image/png;base64,"}${Lt}`}),(_t==="other"||_t==="download")&&Qt.createElement(Qt.Fragment,null,vn?Qt.createElement(ce.Z,{customText:"\u5F53\u524D\u6587\u4EF6\u4E0D\u652F\u6301\u9884\u89C8\uFF0C\u53EF\u70B9\u51FB\u4E0B\u8F7D\u67E5\u770B",ButtonTwo:Qt.createElement(ye.ZP,{icon:Qt.createElement("i",{className:"iconfont icon-xiazai4 font14"}),type:"primary",size:"middle",onClick:Et,disabled:wn},"\u4E0B\u8F7D")}):Qt.createElement(ye.ZP,{type:"primary",size:"middle",onClick:Et,disabled:wn},Qt.createElement(Be.Z,null),"\u70B9\u51FB\u4E0B\u8F7D")))}},76902:function(Tn,oi,Dt){"use strict";Dt.d(oi,{z:function(){return te},Z:function(){return _t}});var Ft=Dt(59301),se=Dt(8944),ye=Dt(81428),Be=Dt(64018),Se=Dt(79710),Rt=Dt(346),ie=Dt(51257),je=Dt(15342),ce=Dt(1012),Vt=Dt(45677),Qe=Dt(59301),Je=({html:Xt})=>{const ve=(0,Ft.useRef)(null),oe=(0,Ft.useRef)(null),Re=`.markdown-body p {
|
|
margin: 0 0 16px 0 !important;
|
|
line-height: 28px;
|
|
white-space: pre-wrap;
|
|
}
|
|
|
|
ol,
|
|
ul,
|
|
li {
|
|
list-style-type: none
|
|
}
|
|
|
|
ol,
|
|
ul,
|
|
dl {
|
|
margin-bottom: 0px;
|
|
}
|
|
|
|
.markdown-body {
|
|
-ms-text-size-adjust: 100%;
|
|
-webkit-text-size-adjust: 100%;
|
|
color: #333;
|
|
overflow: hidden;
|
|
font-family: "Microsoft YaHei", Helvetica, "Meiryo UI", "Malgun Gothic", "Segoe UI", "Trebuchet MS", "Monaco", monospace, Tahoma, STXihei, "\u534E\u6587\u7EC6\u9ED1", STHeiti, "Helvetica Neue", "Droid Sans", "wenquanyi micro hei", FreeSans, Arimo, Arial, SimSun, "\u5B8B\u4F53", Heiti, "\u9ED1\u4F53", sans-serif;
|
|
word-break: break-word;
|
|
font-size: 16px;
|
|
line-height: 1.6;
|
|
white-space: normal;
|
|
word-wrap: break-word;
|
|
position: relative;
|
|
}
|
|
|
|
.markdown-body ul>li {
|
|
list-style-type: disc;
|
|
}
|
|
|
|
.markdown-body ol>li {
|
|
list-style-type: decimal;
|
|
}
|
|
|
|
.markdown-body a {
|
|
background: transparent;
|
|
}
|
|
|
|
.markdown-body a:active,
|
|
.markdown-body a:hover {
|
|
outline: 0;
|
|
}
|
|
|
|
.markdown-body strong {
|
|
font-weight: bold;
|
|
}
|
|
|
|
.markdown-body h1 {
|
|
font-size: 2em;
|
|
margin: 0.67em 0;
|
|
}
|
|
|
|
.markdown-body img {
|
|
border: 0;
|
|
}
|
|
|
|
.markdown-body hr {
|
|
-moz-box-sizing: content-box;
|
|
box-sizing: content-box;
|
|
height: 0;
|
|
}
|
|
|
|
.markdown-body pre {
|
|
overflow: auto;
|
|
}
|
|
|
|
.markdown-body code,
|
|
.markdown-body kbd,
|
|
.markdown-body pre {
|
|
font-family: "Meiryo UI", "YaHei Consolas Hybrid", Consolas, "Malgun Gothic", "Segoe UI", "Trebuchet MS", Helvetica, monospace, monospace;
|
|
font-size: 1em;
|
|
}
|
|
|
|
.markdown-body input {
|
|
color: inherit;
|
|
font: inherit;
|
|
margin: 0;
|
|
}
|
|
|
|
.markdown-body html input[disabled] {
|
|
cursor: default;
|
|
}
|
|
|
|
.markdown-body input {
|
|
line-height: normal;
|
|
}
|
|
|
|
.markdown-body input[type="checkbox"] {
|
|
-moz-box-sizing: border-box;
|
|
box-sizing: border-box;
|
|
padding: 0;
|
|
}
|
|
|
|
.markdown-body table {
|
|
border-collapse: collapse;
|
|
border-spacing: 0;
|
|
}
|
|
|
|
.markdown-body td,
|
|
.markdown-body th {
|
|
padding: 0;
|
|
}
|
|
|
|
.markdown-body * {
|
|
-moz-box-sizing: border-box;
|
|
box-sizing: border-box;
|
|
}
|
|
|
|
.markdown-body input {
|
|
font: 13px/1.4 Helvetica, arial, freesans, clean, sans-serif, "Segoe UI Emoji", "Segoe UI Symbol";
|
|
}
|
|
|
|
.markdown-body a {
|
|
color: #4183c4;
|
|
text-decoration: none;
|
|
}
|
|
|
|
.markdown-body a:hover,
|
|
.markdown-body a:active {
|
|
text-decoration: underline;
|
|
}
|
|
|
|
.markdown-body hr {
|
|
height: 0;
|
|
margin: 15px 0;
|
|
overflow: hidden;
|
|
background: transparent;
|
|
border: 0;
|
|
border-bottom: 1px solid #ddd;
|
|
}
|
|
|
|
.markdown-body hr:before {
|
|
display: table;
|
|
content: "";
|
|
}
|
|
|
|
.markdown-body hr:after {
|
|
display: table;
|
|
clear: both;
|
|
content: "";
|
|
}
|
|
|
|
.markdown-body h1,
|
|
.markdown-body h2,
|
|
.markdown-body h3,
|
|
.markdown-body h4,
|
|
.markdown-body h5,
|
|
.markdown-body h6 {
|
|
margin-top: 15px;
|
|
margin-bottom: 15px;
|
|
line-height: 1.1;
|
|
}
|
|
|
|
.markdown-body h1 {
|
|
font-size: 30px;
|
|
}
|
|
|
|
.markdown-body h2 {
|
|
font-size: 21px;
|
|
}
|
|
|
|
.markdown-body h3 {
|
|
font-size: 16px;
|
|
}
|
|
|
|
.markdown-body h4 {
|
|
font-size: 14px;
|
|
}
|
|
|
|
.markdown-body h5 {
|
|
font-size: 12px;
|
|
}
|
|
|
|
.markdown-body h6 {
|
|
font-size: 11px;
|
|
}
|
|
|
|
.markdown-body blockquote {
|
|
margin: 0;
|
|
}
|
|
|
|
.markdown-body ul,
|
|
.markdown-body ol {
|
|
padding: 0;
|
|
margin-top: 0;
|
|
margin-bottom: 0;
|
|
}
|
|
|
|
ul.linenums,
|
|
ol.linenums {
|
|
padding: 16px 0 0 56px !important;
|
|
}
|
|
|
|
.markdown-body ul,
|
|
.markdown-body ol {
|
|
padding-left: 2em;
|
|
}
|
|
|
|
|
|
.markdown-body ol ol,
|
|
.markdown-body ul ol {
|
|
list-style-type: lower-roman;
|
|
}
|
|
|
|
.markdown-body ul ul ol,
|
|
.markdown-body ul ol ol,
|
|
.markdown-body ol ul ol,
|
|
.markdown-body ol ol ol {
|
|
list-style-type: lower-alpha;
|
|
}
|
|
|
|
.markdown-body dd {
|
|
margin-left: 0;
|
|
}
|
|
|
|
.markdown-body code {
|
|
font-family: Consolas, "Liberation Mono", Menlo, Courier, monospace;
|
|
font-size: 12px;
|
|
}
|
|
|
|
.markdown-body pre {
|
|
margin-top: 0;
|
|
margin-bottom: 0;
|
|
font: 12px Consolas, "Liberation Mono", Menlo, Courier, monospace;
|
|
}
|
|
|
|
.markdown-body .octicon {
|
|
font: normal normal 16px octicons-anchor;
|
|
line-height: 1;
|
|
display: inline-block;
|
|
text-decoration: none;
|
|
-webkit-font-smoothing: antialiased;
|
|
-moz-osx-font-smoothing: grayscale;
|
|
-webkit-user-select: none;
|
|
-moz-user-select: none;
|
|
-ms-user-select: none;
|
|
user-select: none;
|
|
}
|
|
|
|
.markdown-body .octicon-link:before {
|
|
content: '\f05c';
|
|
}
|
|
|
|
.markdown-body>*:first-child {
|
|
margin-top: 0 !important;
|
|
}
|
|
|
|
.markdown-body>*:last-child {
|
|
margin-bottom: 0 !important;
|
|
}
|
|
|
|
.markdown-body .anchor {
|
|
position: absolute;
|
|
top: 0;
|
|
left: 0;
|
|
display: block;
|
|
padding-right: 6px;
|
|
padding-left: 30px;
|
|
margin-left: -30px;
|
|
}
|
|
|
|
.markdown-body .anchor:focus {
|
|
outline: none;
|
|
}
|
|
|
|
.markdown-body h1,
|
|
.markdown-body h2,
|
|
.markdown-body h3,
|
|
.markdown-body h4,
|
|
.markdown-body h5,
|
|
.markdown-body h6 {
|
|
position: relative;
|
|
margin-top: 1em;
|
|
margin-bottom: 16px;
|
|
font-weight: bold;
|
|
line-height: 1.4;
|
|
}
|
|
|
|
.markdown-body h1 .octicon-link,
|
|
.markdown-body h2 .octicon-link,
|
|
.markdown-body h3 .octicon-link,
|
|
.markdown-body h4 .octicon-link,
|
|
.markdown-body h5 .octicon-link,
|
|
.markdown-body h6 .octicon-link {
|
|
display: none;
|
|
color: #000;
|
|
vertical-align: middle;
|
|
}
|
|
|
|
.markdown-body h1:hover .anchor,
|
|
.markdown-body h2:hover .anchor,
|
|
.markdown-body h3:hover .anchor,
|
|
.markdown-body h4:hover .anchor,
|
|
.markdown-body h5:hover .anchor,
|
|
.markdown-body h6:hover .anchor {
|
|
padding-left: 8px;
|
|
margin-left: -30px;
|
|
text-decoration: none;
|
|
}
|
|
|
|
.markdown-body h1:hover .anchor .octicon-link,
|
|
.markdown-body h2:hover .anchor .octicon-link,
|
|
.markdown-body h3:hover .anchor .octicon-link,
|
|
.markdown-body h4:hover .anchor .octicon-link,
|
|
.markdown-body h5:hover .anchor .octicon-link,
|
|
.markdown-body h6:hover .anchor .octicon-link {
|
|
display: inline-block;
|
|
}
|
|
|
|
.markdown-body h1 {
|
|
padding-bottom: 0.3em;
|
|
font-size: 2.25em;
|
|
line-height: 1.2;
|
|
border-bottom: 1px solid #eee;
|
|
}
|
|
|
|
.markdown-body h1 .anchor {
|
|
line-height: 1;
|
|
}
|
|
|
|
.markdown-body h2 {
|
|
padding-bottom: 0.3em;
|
|
font-size: 1.75em;
|
|
line-height: 1.225;
|
|
border-bottom: 1px solid #eee;
|
|
}
|
|
|
|
.markdown-body h2 .anchor {
|
|
line-height: 1;
|
|
}
|
|
|
|
.markdown-body h3 {
|
|
font-size: 1.5em;
|
|
line-height: 1.43;
|
|
}
|
|
|
|
.markdown-body h3 .anchor {
|
|
line-height: 1.2;
|
|
}
|
|
|
|
.markdown-body h4 {
|
|
font-size: 1.25em;
|
|
}
|
|
|
|
.markdown-body h4 .anchor {
|
|
line-height: 1.2;
|
|
}
|
|
|
|
.markdown-body h5 {
|
|
font-size: 1em;
|
|
}
|
|
|
|
.markdown-body h5 .anchor {
|
|
line-height: 1.1;
|
|
}
|
|
|
|
.markdown-body h6 {
|
|
font-size: 1em;
|
|
color: #777;
|
|
}
|
|
|
|
.markdown-body h6 .anchor {
|
|
line-height: 1.1;
|
|
}
|
|
|
|
.markdown-body p,
|
|
.markdown-body blockquote,
|
|
.markdown-body ul,
|
|
.markdown-body ol,
|
|
.markdown-body dl,
|
|
.markdown-body table,
|
|
.markdown-body pre {
|
|
margin-top: 0;
|
|
margin-bottom: 16px;
|
|
}
|
|
|
|
.markdown-body ul ul,
|
|
.markdown-body ul ol,
|
|
.markdown-body ol ol,
|
|
.markdown-body ol ul {
|
|
margin-top: 0;
|
|
margin-bottom: 0;
|
|
}
|
|
|
|
.markdown-body li>p {
|
|
margin-top: 16px;
|
|
}
|
|
|
|
.markdown-body dl {
|
|
padding: 0;
|
|
}
|
|
|
|
.markdown-body dl dt {
|
|
padding: 0;
|
|
margin-top: 16px;
|
|
font-size: 1em;
|
|
font-style: italic;
|
|
font-weight: bold;
|
|
}
|
|
|
|
.markdown-body dl dd {
|
|
padding: 0 16px;
|
|
margin-bottom: 16px;
|
|
}
|
|
|
|
.markdown-body blockquote {
|
|
padding: 0 15px;
|
|
color: #777;
|
|
border-left: 4px solid #ddd;
|
|
}
|
|
|
|
.markdown-body blockquote> :first-child {
|
|
margin-top: 0;
|
|
}
|
|
|
|
.markdown-body blockquote> :last-child {
|
|
margin-bottom: 0;
|
|
}
|
|
|
|
.markdown-body table {
|
|
display: block;
|
|
width: 100%;
|
|
overflow: auto;
|
|
word-break: normal;
|
|
word-break: keep-all;
|
|
}
|
|
|
|
.markdown-body table th {
|
|
font-weight: bold;
|
|
text-align: revert;
|
|
}
|
|
|
|
.markdown-body table th,
|
|
.markdown-body table td {
|
|
padding: 6px 13px;
|
|
border: 1px solid #ddd;
|
|
}
|
|
|
|
.markdown-body table tr {
|
|
background-color: #fff;
|
|
border-top: 1px solid #ccc;
|
|
}
|
|
|
|
.markdown-body table tr:nth-child(2n) {
|
|
background-color: #f8f8f8;
|
|
}
|
|
|
|
.markdown-body img {
|
|
max-width: 100%;
|
|
-moz-box-sizing: border-box;
|
|
box-sizing: border-box;
|
|
}
|
|
|
|
.markdown-body code {
|
|
padding: 0;
|
|
padding-top: 0.2em;
|
|
padding-bottom: 0.2em;
|
|
margin: 0;
|
|
font-size: 85%;
|
|
background-color: rgba(0, 0, 0, 0.04);
|
|
border-radius: 3px;
|
|
}
|
|
|
|
.markdown-body code:has(.katex) {
|
|
background-color: transparent;
|
|
}
|
|
|
|
.markdown-body code:before,
|
|
.markdown-body code:after {
|
|
letter-spacing: -0.2em;
|
|
content: "\\00a0";
|
|
}
|
|
|
|
.markdown-body pre>code {
|
|
padding: 0;
|
|
margin: 0;
|
|
font-size: 100%;
|
|
word-break: normal;
|
|
white-space: pre;
|
|
background: transparent;
|
|
border: 0;
|
|
}
|
|
|
|
.markdown-body .highlight {
|
|
margin-bottom: 16px;
|
|
}
|
|
|
|
.markdown-body .highlight pre,
|
|
.markdown-body pre {
|
|
padding: 16px;
|
|
overflow: auto;
|
|
font-size: 85%;
|
|
line-height: 1.45;
|
|
background-color: #f7f7f7;
|
|
border-radius: 3px;
|
|
}
|
|
|
|
.markdown-body .highlight pre {
|
|
margin-bottom: 0;
|
|
word-break: normal;
|
|
}
|
|
|
|
.markdown-body pre {
|
|
word-wrap: normal;
|
|
}
|
|
|
|
.markdown-body pre code {
|
|
display: inline;
|
|
max-width: initial;
|
|
padding: 0;
|
|
margin: 0;
|
|
overflow: initial;
|
|
line-height: inherit;
|
|
word-wrap: normal;
|
|
background-color: transparent;
|
|
border: 0;
|
|
}
|
|
|
|
.markdown-body pre code:before,
|
|
.markdown-body pre code:after {
|
|
content: normal;
|
|
}
|
|
|
|
.markdown-body kbd {
|
|
display: inline-block;
|
|
padding: 3px 5px;
|
|
font-size: 11px;
|
|
line-height: 10px;
|
|
color: #555;
|
|
vertical-align: middle;
|
|
background-color: #fcfcfc;
|
|
border: solid 1px #ccc;
|
|
border-bottom-color: #bbb;
|
|
border-radius: 3px;
|
|
box-shadow: inset 0 -1px 0 #bbb;
|
|
}
|
|
|
|
.markdown-body .pl-c {
|
|
color: #969896;
|
|
}
|
|
|
|
.markdown-body .pl-c1,
|
|
.markdown-body .pl-mdh,
|
|
.markdown-body .pl-mm,
|
|
.markdown-body .pl-mp,
|
|
.markdown-body .pl-mr,
|
|
.markdown-body .pl-s1 .pl-v,
|
|
.markdown-body .pl-s3,
|
|
.markdown-body .pl-sc,
|
|
.markdown-body .pl-sv {
|
|
color: #0086b3;
|
|
}
|
|
|
|
.markdown-body .pl-e,
|
|
.markdown-body .pl-en {
|
|
color: #795da3;
|
|
}
|
|
|
|
.markdown-body .pl-s1 .pl-s2,
|
|
.markdown-body .pl-smi,
|
|
.markdown-body .pl-smp,
|
|
.markdown-body .pl-stj,
|
|
.markdown-body .pl-vo,
|
|
.markdown-body .pl-vpf {
|
|
color: #333;
|
|
}
|
|
|
|
.markdown-body .pl-ent {
|
|
color: #63a35c;
|
|
}
|
|
|
|
.markdown-body .pl-k,
|
|
.markdown-body .pl-s,
|
|
.markdown-body .pl-st {
|
|
color: #a71d5d;
|
|
}
|
|
|
|
.markdown-body .pl-pds,
|
|
.markdown-body .pl-s1,
|
|
.markdown-body .pl-s1 .pl-pse .pl-s2,
|
|
.markdown-body .pl-sr,
|
|
.markdown-body .pl-sr .pl-cce,
|
|
.markdown-body .pl-sr .pl-sra,
|
|
.markdown-body .pl-sr .pl-sre,
|
|
.markdown-body .pl-src {
|
|
color: #df5000;
|
|
}
|
|
|
|
.markdown-body .pl-mo,
|
|
.markdown-body .pl-v {
|
|
color: #1d3e81;
|
|
}
|
|
|
|
.markdown-body .pl-id {
|
|
color: #b52a1d;
|
|
}
|
|
|
|
.markdown-body .pl-ii {
|
|
background-color: #b52a1d;
|
|
color: #f8f8f8;
|
|
}
|
|
|
|
.markdown-body .pl-sr .pl-cce {
|
|
color: #63a35c;
|
|
font-weight: bold;
|
|
}
|
|
|
|
.markdown-body .pl-ml {
|
|
color: #693a17;
|
|
}
|
|
|
|
.markdown-body .pl-mh,
|
|
.markdown-body .pl-mh .pl-en,
|
|
.markdown-body .pl-ms {
|
|
color: #1d3e81;
|
|
font-weight: bold;
|
|
}
|
|
|
|
.markdown-body .pl-mq {
|
|
color: #008080;
|
|
}
|
|
|
|
.markdown-body .pl-mi {
|
|
color: #333;
|
|
font-style: italic;
|
|
}
|
|
|
|
.markdown-body .pl-mb {
|
|
color: #333;
|
|
font-weight: bold;
|
|
}
|
|
|
|
.markdown-body .pl-md,
|
|
.markdown-body .pl-mdhf {
|
|
background-color: #ffecec;
|
|
color: #bd2c00;
|
|
}
|
|
|
|
.markdown-body .pl-mdht,
|
|
.markdown-body .pl-mi1 {
|
|
background-color: #eaffea;
|
|
color: #55a532;
|
|
}
|
|
|
|
.markdown-body .pl-mdr {
|
|
color: #795da3;
|
|
font-weight: bold;
|
|
}
|
|
|
|
.markdown-body kbd {
|
|
display: inline-block;
|
|
padding: 3px 5px;
|
|
font: 11px Consolas, "Liberation Mono", Menlo, Courier, monospace;
|
|
line-height: 10px;
|
|
color: #555;
|
|
vertical-align: middle;
|
|
background-color: #fcfcfc;
|
|
border: solid 1px #ccc;
|
|
border-bottom-color: #bbb;
|
|
border-radius: 3px;
|
|
box-shadow: inset 0 -1px 0 #bbb;
|
|
}
|
|
|
|
.markdown-body .task-list-item {
|
|
list-style-type: none;
|
|
}
|
|
|
|
.markdown-body .task-list-item+.task-list-item {
|
|
margin-top: 3px;
|
|
}
|
|
|
|
.markdown-body .task-list-item input {
|
|
float: left;
|
|
margin: 0.3em 0 0.25em -1.6em;
|
|
vertical-align: middle;
|
|
}
|
|
|
|
.markdown-body :checked+.radio-label {
|
|
z-index: 1;
|
|
position: relative;
|
|
border-color: #4183c4;
|
|
}
|
|
|
|
|
|
/*! Pretty printing styles. Used with prettify.js. */
|
|
/* SPAN elements with the classes below are added by prettyprint. */
|
|
.pln {
|
|
color: #000
|
|
}
|
|
|
|
/* plain text */
|
|
|
|
@media screen {
|
|
.str {
|
|
color: #080
|
|
}
|
|
|
|
/* string content */
|
|
.kwd {
|
|
color: #008
|
|
}
|
|
|
|
/* a keyword */
|
|
.com {
|
|
color: #800
|
|
}
|
|
|
|
/* a comment */
|
|
.typ {
|
|
color: #606
|
|
}
|
|
|
|
/* a type name */
|
|
.lit {
|
|
color: #066
|
|
}
|
|
|
|
/* a literal value */
|
|
/* punctuation, lisp open bracket, lisp close bracket */
|
|
.pun,
|
|
.opn,
|
|
.clo {
|
|
color: #660
|
|
}
|
|
|
|
.tag {
|
|
color: #008
|
|
}
|
|
|
|
/* a markup tag name */
|
|
.atn {
|
|
color: #606
|
|
}
|
|
|
|
/* a markup attribute name */
|
|
.atv {
|
|
color: #080
|
|
}
|
|
|
|
/* a markup attribute value */
|
|
.dec,
|
|
.var {
|
|
color: #606
|
|
}
|
|
|
|
/* a declaration; a variable name */
|
|
.fun {
|
|
color: red
|
|
}
|
|
|
|
/* a function name */
|
|
}
|
|
|
|
/* Use higher contrast and text-weight for printable form. */
|
|
@media print,
|
|
projection {
|
|
.str {
|
|
color: #060
|
|
}
|
|
|
|
.kwd {
|
|
color: #006;
|
|
font-weight: bold
|
|
}
|
|
|
|
.com {
|
|
color: #600;
|
|
font-style: italic
|
|
}
|
|
|
|
.typ {
|
|
color: #404;
|
|
font-weight: bold
|
|
}
|
|
|
|
.lit {
|
|
color: #044
|
|
}
|
|
|
|
.pun,
|
|
.opn,
|
|
.clo {
|
|
color: #440
|
|
}
|
|
|
|
.tag {
|
|
color: #006;
|
|
font-weight: bold
|
|
}
|
|
|
|
.atn {
|
|
color: #404
|
|
}
|
|
|
|
.atv {
|
|
color: #060
|
|
}
|
|
}
|
|
|
|
/* Put a border around prettyprinted code snippets. */
|
|
pre.prettyprint {
|
|
padding: 2px;
|
|
/* border: 1px solid #888 */
|
|
}
|
|
|
|
/* Specify class=linenums on a pre to get line numbering */
|
|
ol.linenums {
|
|
margin-top: 0;
|
|
margin-bottom: 0
|
|
}
|
|
|
|
/* IE indents via margin-left */
|
|
li.L0,
|
|
li.L1,
|
|
li.L2,
|
|
li.L3,
|
|
li.L5,
|
|
li.L6,
|
|
li.L7,
|
|
li.L8 {
|
|
list-style-type: none
|
|
}
|
|
|
|
/* Alternate shading for lines */
|
|
li.L1,
|
|
li.L3,
|
|
li.L5,
|
|
li.L7,
|
|
li.L9 {
|
|
background: #eee
|
|
}
|
|
|
|
.markdown-body p,
|
|
.markdown-body blockquote,
|
|
.markdown-body ul,
|
|
.markdown-body ol,
|
|
.markdown-body dl,
|
|
.markdown-body table,
|
|
.markdown-body pre {
|
|
margin-top: 0;
|
|
margin-bottom: 16px;
|
|
}`;return(0,Ft.useEffect)(()=>{const Ye=ve.current.attachShadow({mode:"open"});oe.current=document.createElement("div"),oe.current.className="markdown-body",oe.current.innerHTML=Xt,Ye.appendChild(oe.current);const en=document.createElement("style");return en.textContent=Re,Ye.appendChild(en),()=>{Ye.innerHTML=""}},[]),(0,Ft.useEffect)(()=>{oe.current&&(oe.current.innerHTML=Xt)},[Xt]),Qe.createElement("div",{ref:ve})};function Nt(Xt){const ve=["onabort","onanimationend","onanimationiteration","onanimationstart","onauxclick","onblur","oncancel","oncanplay","oncanplaythrough","onchange","onclick","onclose","oncontextmenu","oncopy","oncut","ondblclick","ondrag","ondragend","ondragenter","ondragleave","ondragover","ondragstart","ondrop","ondurationchange","onemptied","onended","onerror","onfocus","onformdata","ongotpointercapture","oninput","oninvalid","onkeydown","onkeypress","onkeyup","onload","onloadeddata","onloadedmetadata","onloadstart","onlostpointercapture","onmousedown","onmousemove","onmouseout","onmouseover","onmouseup","onpaste","onpause","onplay","onplaying","onpointercancel","onpointerdown","onpointerenter","onpointerleave","onpointermove","onpointerout","onpointerover","onpointerup","onprogress","onratechange","onreset","onresize","onscroll","onsecuritypolicyviolation","onseeked","onseeking","onselect","onslotchange","onstalled","onsubmit","onsuspend","ontimeupdate","ontoggle","ontouchcancel","ontouchend","ontouchmove","ontouchstart","ontransitionend","onvolumechange","onwaiting","onwheel"],oe=new RegExp(`\\b(${ve.join("|")})\\s*=\\s*(?:"[^"]*"|'[^']*'|[^\\s>]*)`,"gi");return Xt.replace(oe,"").trim()}var nt=Object.defineProperty,et=Object.getOwnPropertySymbols,ct=Object.prototype.hasOwnProperty,lt=Object.prototype.propertyIsEnumerable,pt=(Xt,ve,oe)=>ve in Xt?nt(Xt,ve,{enumerable:!0,configurable:!0,writable:!0,value:oe}):Xt[ve]=oe,vt=(Xt,ve)=>{for(var oe in ve||(ve={}))ct.call(ve,oe)&&pt(Xt,oe,ve[oe]);if(et)for(var oe of et(ve))lt.call(ve,oe)&&pt(Xt,oe,ve[oe]);return Xt};const xt="@\u2581\u2581@",Lt="@\u2581@",Ot=/<pre[^>]*>/g;function Ht(Xt){let ve=document.createElement("div");return ve.innerHTML=Xt,ve.childNodes.length===0?"":ve.childNodes[0].nodeValue}const te=(Xt,ve)=>{Xt=Xt||"";const oe=/(?:https?:\/\/[^\/]+)?\/api\/attachments\/([A-Za-z0-9+/=]+)(\?.*?)?\)|(?:https?:\/\/[^\/]+)?\/api\/attachments\/([A-Za-z0-9+/=]+)(\?.*?)?|(?:https?:\/\/[^\/]+)?\/attachments\/download\/([A-Za-z0-9+/=]+)(\?.*?)?\//g,Re=/\"(?:https?:\/\/[^\/]+)?\/api\/attachments\/([A-Za-z0-9+/=]+)(\?.*?)?|\"(?:https?:\/\/[^\/]+)?\/attachments\/download\/([A-Za-z0-9+/=]+)(\?.*?)?\//g,Ye=/\(\s+(?:https?:\/\/[^\/]+)?\/files\/uploads\/([A-Za-z0-9+/=]+)(\?.*?)?|\"(?:https?:\/\/[^\/]+)?\/files\/uploads\/([A-Za-z0-9+/=]+)(\?.*?)?\//g,en=/(?:https?:\/\/[^\/]+)?\/attachments\/download\/([A-Za-z0-9+/=]+)(\?.*?)?\//g;return ve?Xt.replaceAll("https://www.educoder.net","").replaceAll("https://www-cdn.educoder.net","").replaceAll("//api/attachments","/api/attachments").replace(oe,(Rn,wn,un,vn,ne,jt,Fe)=>{const We=wn||vn||jt,Pn=un||ne||Fe||"?";return Rt.Z.API_SERVER+"/api/attachments/"+We+Pn+"&t="+(0,ie.Jn)(We,Date.now())+(Rn.indexOf(")")>-1?")":"&")}).replaceAll('src="(','src="').replaceAll("src='(",'src="'):(Xt=Xt.replace(en,(Rn,wn,un,vn,ne,jt,Fe)=>{const We=wn||vn||jt,Pn=un||ne||Fe||"?";return Rt.Z.API_SERVER+"/attachments/download/"+We+Pn+"&t="+(0,ie.Jn)(We,Date.now())+(Rn.indexOf(")")>-1?")":"&")}).replace(oe,(Rn,wn,un,vn,ne,jt,Fe)=>{const We=wn||vn||jt,Pn=un||ne||Fe||"?";return Rt.Z.API_SERVER+"/api/attachments/"+We+Pn+"&t="+(0,ie.Jn)(We,Date.now())+(Rn.indexOf(")")>-1?")":"&")}).replace(Re,(Rn,wn,un,vn,ne)=>{const jt=wn||vn,Fe=un||ne||"";return'"'+Rt.Z.API_SERVER+"/api/attachments/"+jt+Fe+jt+Fe+"&t="+(0,ie.Jn)(jt,Date.now())}).replace(Ye,(Rn,wn,un,vn,ne)=>{const jt=wn||vn,Fe=un||ne||"";return"("+Rt.Z.API_SERVER+"/files/uploads/"+jt+Fe+jt+Fe+"&t="+(0,ie.Jn)(jt,Date.now())}).replaceAll('src="(','src="').replaceAll("src='(",'src="').replaceAll("http://video.educoder","https://video.educoder").replaceAll("http://www.educoder.net/api","https://data.educoder.net/api").replaceAll("https://www.educoder.net/api","https://data.educoder.net/api").replace(/\r\n/g,`
|
|
`),Xt)};var _t=({value:Xt="",className:ve,showTextOnly:oe,showLines:Re,style:Ye={},stylesPrev:en={},highlightKeywords:Rn,showProgramFill:wn,isProgramFill:un,disabledFill:vn=!1,programFillValue:ne,onFillChange:jt=Pn=>{},onFillBlur:Fe=()=>{},onFillFocus:We=()=>{}})=>{let Pn=Nt(String(Xt||""));const[ke,tn]=(0,Ft.useState)(""),[fn,Jn]=(0,Ft.useState)("office"),[Pe,an]=(0,Ft.useState)([]),re=(0,Ft.useRef)("a"+(0,ce.Z)()),hn={},di=de=>/<style[\s\S]*?>/i.test(de||""),Tt=(de,pe,be)=>{const ze=document.createElement(de===Lt?"input":"textarea");ze.style.width="100%",ze.style.height=de===Lt?"40px":"151px",ze.rows=5,ze.spellcheck=!1,ze.name="edu-program-fill",ze.placeholder="\u8BF7\u8F93\u5165",ze.dataset.id=pe;const rn=Object.keys(hn).length;return hn[rn]=ze,`<span class="edu-program-fill-wrap ${de===Lt?"":"show"}" style="width:${de===Lt?"400px":"100%"}" title=${be||""}><span>${ze.outerHTML}<span class="edu-program-fill-score" style="margin:0 6px"></span></span></span>`};function Et(de){return de=de.replace(/!\[.*?\]\(.*?\)/g,""),de=de.replace(/\[.*?\]\(.*?\)/g,""),de=de.replace(new RegExp("<iframe.*?<\\/iframe>","gs"),""),de=de.replace(/<embed.*?>/g,""),de=de.replace(/<img.*?>/g,""),de=de.replace(new RegExp("<video.*?>.*?<\\/video>","gs"),""),de=de.replace(new RegExp("<audio.*?>.*?<\\/audio>","gs"),""),de=de.replace(new RegExp("<style.*?>.*?<\\/style>","gs"),""),de=de.replace(new RegExp("<script.*?>.*?<\\/script>","gs"),""),de}const St=de=>!oe&&di(Pn)?de:de.replace(/<style.*?>([\s\S]+?)<\/style>/gim,function(pe,be){let ze=be.replace(/(\n|\r)/g,"").split("}"),rn=[];return ze.map(He=>{He!=""&&rn.push(`.${re.current} ${He}`)}),`<style>${rn.join("}")}</style>`}),Mt=(0,Ft.useMemo)(()=>{try{const ze=/\(\s+\/api\/attachments\/|\(\/api\/attachments\//g,rn=/\"\/api\/attachments\/|\"\/attachments\/download\//g,He=/\(\s+\/files\/uploads\/|\"\/files\/uploads\//g,yn=/\(\/attachments\/download\//g;Pn=Pn.replace(yn,"("+Rt.Z.API_SERVER+"/attachments/download/").replace(ze,"("+Rt.Z.API_SERVER+"/api/attachments/").replace(rn,'"'+Rt.Z.API_SERVER+"/api/attachments/").replace(He,'"'+Rt.Z.API_SERVER+"/files/uploads/").replaceAll("http://video.educoder","https://video.educoder").replaceAll("http://www.educoder.net/api","https://data.educoder.net/api").replaceAll("https://www.educoder.net/api","https://data.educoder.net/api").replace(/\r\n/g,`
|
|
`)}catch(ze){}if(wn){let ze=-1;return Pn=Pn.replaceAll("<","<").replaceAll(">",">").replace(/(@▁▁@|@▁@)/g,function(rn,He,yn){var xe;return++ze,Tt(rn,ze,(xe=ne==null?void 0:ne[ze])==null?void 0:xe.value.replaceAll("<","<").replaceAll(">",">"))}),`<pre style="background:#fff;padding:4px">${St(Pn||"")}</pre>`}let de=St(Pn);de=(0,ye.ZP)(de);const pe=(0,ye.ez)();Pn.match(/\[TOC\]/)&&(de=de.replace("<p>[TOC]</p>",(0,ye.Qv)()),(0,ye.Iy)()),de=de.replace(/(__special_katext_id_\d+__)/g,(ze,rn)=>{const{type:He,expression:yn}=pe[rn];return(0,je.renderToString)(Ht(yn)||"",{displayMode:He==="block",throwOnError:!1,output:"html"})}),de=de.replace(/▁/g,"\u2581\u2581\u2581\u2581\u2581"),(0,ye.AL)();const be=document.createElement("div");if(be.innerHTML=de,oe)return be.innerText;if(Rn){const ze=Rn.replace(/[.*+?^${}()|[\]\\]/g,"\\$&");return Oe(be,ze),be.innerHTML}return setTimeout(()=>ee(),500),be.innerHTML},[Pn,Rn]);(0,Ft.useEffect)(()=>{Te.current&&Te.current.querySelectorAll(["input","textarea"]).forEach(pe=>{pe.oninput=zt,pe.onblur=kt,pe.onfocus=Ut})},[Pe]),(0,Ft.useEffect)(()=>{var de,pe,be,ze,rn;if(ne!=null&&ne.length)try{const He=Te.current.querySelectorAll(".edu-program-fill-score"),yn=Te.current.querySelectorAll('[name="edu-program-fill"]');for(const[xe,Ne]of yn.entries())Ne.value=((de=ne==null?void 0:ne[xe])==null?void 0:de.value)||"",((pe=ne==null?void 0:ne[xe])==null?void 0:pe.type)==="warning"?Ne.className="program-fill-warning":((be=ne==null?void 0:ne[xe])==null?void 0:be.type)==="success"?Ne.className="program-fill-success":Ne.className="";for(const[xe,Ne]of He.entries())Ne.innerHTML=(ze=ne==null?void 0:ne[xe])!=null&&ze.score?`${(rn=ne==null?void 0:ne[xe])==null?void 0:rn.score}\u5206`:"";an(ne)}catch(He){console.log(He,"error")}},[ne]);const zt=de=>{Pe[de.target.dataset.id]=Pe[de.target.dataset.id]||{},Pe[de.target.dataset.id].value=de.target.value,an([...Pe]),jt(Pe,de.target.dataset.id)},kt=de=>{Pe[de.target.dataset.id]=Pe[de.target.dataset.id]||{},Pe[de.target.dataset.id].value=de.target.value,an([...Pe]),Fe(Pe,de.target.dataset.id)},Ut=de=>{Pe[de.target.dataset.id]=Pe[de.target.dataset.id]||{},Pe[de.target.dataset.id].value=de.target.value,an([...Pe]),We(Pe,de.target.dataset.id)};function Oe(de,pe){return de.childNodes.forEach(be=>{var ze;if(be.childNodes.length>0)Oe(be,pe);else if(be.nodeName!=="IMG")if(be.innerHTML)be.innerHTML=(ze=be.innerHTML)==null?void 0:ze.replace(new RegExp(pe,"gi"),'<span style="color:#0152d9;background-color:#1890ff33">$&</span>');else{const rn=document.createElement("span");rn.innerHTML=be.textContent.replace(new RegExp(pe,"gi"),'<span style="color:#0152d9;background-color:#1890ff33">$&</span>'),be.replaceWith(rn)}})}const Te=(0,Ft.useRef)();ye.jb.WebkitLineClamp=Re,Re&&(Ye=vt(vt({},Ye),ye.jb));function _e(de){let pe=de.target;if(pe.tagName.toUpperCase()==="A"){let be=pe.getAttribute("href");if(be.indexOf("office")>-1)de.preventDefault(),tn(be),Jn("office");else if(be.indexOf("application/pdf")>-1)de.preventDefault(),tn(be),Jn("pdf");else if(be.indexOf("text/html")>-1)de.preventDefault(),tn(be),Jn("html");else if(be.startsWith("#")){de.preventDefault();let ze=document.getElementById(be.replace("#",""));ze&&ze.scrollIntoView(!0)}}}const ee=()=>{var de;const pe=(de=Te.current)==null?void 0:de.querySelectorAll("video");pe==null||pe.forEach(be=>{if(be.oncontextmenu=()=>!1,be.src.indexOf(".m3u8")>-1&&!be.canPlayType("application/vnd.apple.mpegurl")){if(Se.ZP.isSupported()){var ze=new Se.ZP;ze.loadSource(be.src),ze.attachMedia(be)}}})};return(0,Ft.useEffect)(()=>{if(Te.current&&Mt&&Mt.match(Ot)&&window.PR.prettyPrint(),Te.current)return Te.current.addEventListener("click",_e),()=>{var de;(de=Te.current)==null||de.removeEventListener("click",_e),(0,ye.AL)(),(0,ye.Iy)()}},[Mt,Te.current,_e]),(0,Ft.useEffect)(()=>{var de;const pe=be=>{be.preventDefault(),be.clipboardData.setData("text",window.getSelection().toString())};return(de=Te.current)==null||de.addEventListener("copy",pe),()=>{var be;(be=Te.current)==null||be.removeEventListener("copy",pe)}},[Te.current]),Ft.createElement(Ft.Fragment,null,oe&&Ft.createElement("div",{ref:Te},Mt),!oe&&!di(Mt)&&Ft.createElement("div",{ref:Te,style:vt({},Ye),className:`${ve||""} ${vn?"disabled-fill":""} markdown-body ${re.current}`,dangerouslySetInnerHTML:{__html:Mt}}),!oe&&di(Mt)&&Ft.createElement(Je,{html:Mt}),Ft.createElement(Vt.Z,{close:!0,data:ke,type:ke!=null&&ke.length?fn:"",style:vt({},en),onClose:()=>tn("")}))}},69720:function(Tn,oi,Dt){"use strict";Dt.d(oi,{h:function(){return xt}});var Ft=Dt(59301),se=Dt(82326),ye=Dt(28284),Be=Dt(99571),Se=Dt(89780),Rt=Dt.n(Se),ie=Dt(8336),je=Dt(12469),ce=Object.defineProperty,Vt=Object.defineProperties,Qe=Object.getOwnPropertyDescriptors,Qt=Object.getOwnPropertySymbols,Je=Object.prototype.hasOwnProperty,Nt=Object.prototype.propertyIsEnumerable,nt=(Lt,Ot,Ht)=>Ot in Lt?ce(Lt,Ot,{enumerable:!0,configurable:!0,writable:!0,value:Ht}):Lt[Ot]=Ht,et=(Lt,Ot)=>{for(var Ht in Ot||(Ot={}))Je.call(Ot,Ht)&&nt(Lt,Ht,Ot[Ht]);if(Qt)for(var Ht of Qt(Ot))Nt.call(Ot,Ht)&&nt(Lt,Ht,Ot[Ht]);return Lt},ct=(Lt,Ot)=>Vt(Lt,Qe(Ot));const lt=se.default.Option,pt={labelCol:{span:4},wrapperCol:{span:20}},vt={asp:["ASP","vbscript"],actionscript:["ActionScript(3.0)/Flash/Flex","clike"],bash:["Bash/Bat","shell"],css:["CSS","css"],c:["C","clike"],cpp:["C++","clike"],csharp:["C#","clike"],coffeescript:["CoffeeScript","coffeescript"],d:["D","d"],dart:["Dart","dart"],delphi:["Delphi/Pascal","pascal"],erlang:["Erlang","erlang"],go:["Golang","go"],groovy:["Groovy","groovy"],html:["HTML","text/html"],java:["Java","clike"],json:["JSON","text/json"],javascript:["Javascript","javascript"],lua:["Lua","lua"],less:["LESS","css"],markdown:["Markdown","gfm"],"objective-c":["Objective-C","clike"],php:["PHP","php"],perl:["Perl","perl"],python:["Python","python"],r:["R","r"],rst:["reStructedText","rst"],ruby:["Ruby","ruby"],sql:["SQL","sql"],sass:["SASS/SCSS","sass"],shell:["Shell","shell"],scala:["Scala","clike"],swift:["Swift","clike"],vb:["VB/VBScript","vb"],xml:["XML","text/xml"],yaml:["YAML","yaml"]};oi.Z=({callback:Lt,onCancel:Ot})=>{const[Ht,te]=(0,Ft.useState)("python");function _t(ve){te(vt[ve][1])}function Xt(ve){Lt(ve)}return Ft.createElement(ye.default,ct(et({},pt),{className:"code-block-panel",initialValues:{language:"python",content:""},onFinish:Xt,style:{width:500}}),Ft.createElement(ye.default.Item,{label:"\u4EE3\u7801\u8BED\u8A00",name:"language"},Ft.createElement(se.default,{getPopupContainer:ve=>ve.parentNode,onChange:_t},Object.keys(vt).map(ve=>Ft.createElement(lt,{key:ve,value:ve},vt[ve][0])))),Ft.createElement(ye.default.Item,{label:"\u4EE3\u7801\u5185\u5BB9",name:"content",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u4EE3\u7801\u5185\u5BB9"}]},Ft.createElement(xt,{mode:Ht})),Ft.createElement("div",{className:"flex-container flex-end"},Ft.createElement(Be.ZP,{type:"primary",htmlType:"submit",style:{marginRight:10}},"\u786E\u5B9A"),Ft.createElement(Be.ZP,{type:"ghost",onClick:Ot},"\u53D6\u6D88")))};function xt({value:Lt,onChange:Ot,mode:Ht,options:te={}}){const _t=(0,Ft.useRef)(),[Xt,ve]=(0,Ft.useState)();return(0,Ft.useEffect)(()=>{if(Xt){let oe=function(Re){const Ye=Re.getValue();Ot&&Ot(Ye)};return Xt.on("change",oe),()=>{Xt.off("change",oe)}}},[Xt,Ot]),(0,Ft.useEffect)(()=>{Xt&&Xt.setOption("mode",Ht)},[Xt,Ht]),(0,Ft.useEffect)(()=>{Xt&&(Lt!==Xt.getValue()||Lt==="")&&setTimeout(()=>{Xt.setValue(Lt||"")},300)},[Xt,Lt]),(0,Ft.useEffect)(()=>{if(_t.current&&!Xt){const oe=Rt().fromTextArea(_t.current,et({mode:Ht,lineNumbers:!0,lineWrapping:!0,autoCloseBrackets:!0,tabSize:4,autofocus:!0,autoCloseTags:!0,matchBrackets:!0,styleActiveLine:!0},te));ve(oe)}},[_t.current,Xt]),Ft.createElement("div",{className:"my-codemirror-container"},Ft.createElement("textarea",{ref:_t}))}},39793:function(Tn,oi,Dt){"use strict";Dt.d(oi,{Z:function(){return Bi}});var Ft=Dt(59301),se=Dt(89780),ye=Dt.n(se),Be=Dt(76374),Se=Dt(8336),Rt=Dt(6313),ie=Dt(25717),je=Dt(99498),ce=Dt(25419),Vt=Dt(67549),Qe=Dt(76902),Qt=({value:me="",className:we,showTextOnly:ge,showLines:Wn,style:ai={}})=>{const si=(0,Ft.useMemo)(()=>"",[me]);return Ft.createElement(Ft.Fragment,null,Ft.createElement("div",{dangerouslySetInnerHTML:{__html:si}}))},Je=Dt(59301),Nt=Object.defineProperty,nt=Object.defineProperties,et=Object.getOwnPropertyDescriptors,ct=Object.getOwnPropertySymbols,lt=Object.prototype.hasOwnProperty,pt=Object.prototype.propertyIsEnumerable,vt=(me,we,ge)=>we in me?Nt(me,we,{enumerable:!0,configurable:!0,writable:!0,value:ge}):me[we]=ge,xt=(me,we)=>{for(var ge in we||(we={}))lt.call(we,ge)&&vt(me,ge,we[ge]);if(ct)for(var ge of ct(we))pt.call(we,ge)&&vt(me,ge,we[ge]);return me},Lt=(me,we)=>nt(me,et(we));let Ot=[{title:"\u7C97\u4F53",icon:"md-iconfont icon-bold",actionName:"bold"},{title:"\u659C\u4F53",icon:"md-iconfont icon-italic",actionName:"italic"},"|",{title:"\u65E0\u5E8F\u5217\u8868",icon:"md-iconfont icon-unorder-list",actionName:"list-ul"},{title:"\u6709\u5E8F\u5217\u8868",icon:"md-iconfont icon-order-list",actionName:"list-ol"},"|",{title:"\u884C\u5185\u4EE3\u7801",icon:"md-iconfont icon-code",actionName:"code"},{title:"\u4EE3\u7801\u5757\uFF08\u591A\u8BED\u8A00\u98CE\u683C\uFF09",icon:"md-iconfont icon-file-code",actionName:"code-block"},{title:"\u94FE\u63A5",icon:"md-iconfont icon-link",actionName:"link"},"|",{title:"\u884C\u5185\u516C\u5F0F",icon:"md-iconfont icon-sum",actionName:"inline-latex"},{title:"\u6570\u5B66\u56FE\u50CF",icon:"iconfont icon-shuxuetuxiang2",actionName:"maths-latex"},{title:"\u591A\u884C\u516C\u5F0F",icon:"iconfont icon-jisuan1",actionName:"latex"},"|",{title:"\u6DFB\u52A0\u56FE\u7247",icon:"md-iconfont icon-picture",actionName:"upload-image"},{title:"\u63D2\u5165\u753B\u56FE",icon:"iconfont icon-sheji",actionName:"draw-image"},{title:"\u63D2\u5165\u6D41\u7A0B\u56FE",icon:"iconfont icon-liucheng",actionName:"add-flowchart"},{title:"\u8868\u683C",icon:"md-iconfont icon-table",actionName:"add-table"},"|",{title:"\u6362\u884C",icon:"md-iconfont icon-minus",actionName:"line-break"},{title:"\u6E05\u7A7A",icon:"md-iconfont icon-eraser",actionName:"eraser"}];function Ht({onActionCallback:me,title:we,icon:ge,actionName:Wn,className:ai="",children:si}){function ln(){me(Wn)}return Je.createElement("a",{title:we,className:ai,onClick:ln},Je.createElement("i",{className:`${ge}`}),si)}var te=({watch:me,showNullButton:we,showNullProgramButton:ge,onActionCallback:Wn,fullScreen:ai,insertTemp:si,hidetoolBar:ln,extraUse:jn})=>{const ii=[...Ot,{title:`${me?"\u5173\u95ED\u5B9E\u65F6\u9884\u89C8":"\u5F00\u542F\u5B9E\u65F6\u9884\u89C8"}`,icon:`${me?"md-iconfont icon-eye-slash":"md-iconfont icon-eye"}`,actionName:"trigger-watch"}];return Je.createElement("ul",{className:"markdown-toolbar-container"},!ln&&ii.map((ki,Ri)=>Je.createElement("li",{key:Ri},ki.actionName?Je.createElement(Ht,Lt(xt({},ki),{onActionCallback:Wn})):Je.createElement("span",{className:"v-line"}))),we?Je.createElement("li",null,Je.createElement(Ht,{icon:"md-iconfont icon-edit insert-blank",className:"btn-null",title:"\u589E\u52A0\u586B\u7A7A",actionName:"add-null-ch",onActionCallback:Wn},Je.createElement("span",{className:"fill-tip"},"\u70B9\u51FB\u63D2\u5165\b\u586B\u7A7A\u9879"))):null,ge?Je.createElement(Je.Fragment,null,Je.createElement("li",null,Je.createElement(Ht,{icon:"md-iconfont icon-edit insert-blank",className:"btn-null",title:"\u589E\u52A0\u586B\u7A7A",actionName:"add-signal",onActionCallback:Wn},Je.createElement("span",{className:"fill-tip"},"+\u5355\u884C\u586B\u7A7A\u9879"))),Je.createElement("li",null,Je.createElement(Ht,{icon:"md-iconfont icon-uniE900 insert-blank",className:"btn-null",title:"\u589E\u52A0\u586B\u7A7A",actionName:"add-multiple",onActionCallback:Wn},Je.createElement("span",{className:"fill-tip"},"+\u591A\u884C\u586B\u7A7A\u9879")))):null,si&&Je.createElement("li",null,Je.createElement(Ht,{icon:"md-iconfont icon-edit",className:"btn-null",title:"\u63D2\u5165\u6A21\u677F",actionName:`inster-template-${si}`,onActionCallback:Wn},Je.createElement("span",{className:"fill-tip"},"\u63D2\u5165\u6A21\u677F"))),jn&&Je.createElement("li",null,jn),Je.createElement("li",{className:"btn-full-screen"},Je.createElement(Ht,{icon:`${ai?"md-iconfont icon-shrink":"md-iconfont icon-enlarge"}`,title:ai?"\u5173\u95ED\u5168\u5C4F":"\u5F00\u542F\u5168\u5C4F",actionName:"trigger-full-screen",onActionCallback:Wn})))},_t=Dt(91558),Xt=Dt(28284),ve=Dt(37568),oe=Dt(99571),Re=Object.defineProperty,Ye=Object.defineProperties,en=Object.getOwnPropertyDescriptors,Rn=Object.getOwnPropertySymbols,wn=Object.prototype.hasOwnProperty,un=Object.prototype.propertyIsEnumerable,vn=(me,we,ge)=>we in me?Re(me,we,{enumerable:!0,configurable:!0,writable:!0,value:ge}):me[we]=ge,ne=(me,we)=>{for(var ge in we||(we={}))wn.call(we,ge)&&vn(me,ge,we[ge]);if(Rn)for(var ge of Rn(we))un.call(we,ge)&&vn(me,ge,we[ge]);return me},jt=(me,we)=>Ye(me,en(we));const Fe={labelCol:{span:4},wrapperCol:{span:20}};var We=({callback:me,onCancel:we})=>{function ge(Wn){me(Wn)}return Ft.createElement(Xt.default,jt(ne({},Fe),{initialValues:{link:"http://",title:""},className:"link-panel",onFinish:ge,style:{width:500}}),Ft.createElement(Xt.default.Item,{label:"\u94FE\u63A5\u5730\u5740",name:"link",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u94FE\u63A5\u5730\u5740"}]},Ft.createElement(ve.default,null)),Ft.createElement(Xt.default.Item,{label:"\u94FE\u63A5\u6807\u9898",name:"title",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u94FE\u63A5\u6807\u9898"}]},Ft.createElement(ve.default,null)),Ft.createElement("div",{className:"flex-container flex-end"},Ft.createElement(oe.ZP,{type:"primary",htmlType:"submit",style:{marginRight:10}},"\u786E\u5B9A"),Ft.createElement(oe.ZP,{type:"ghost",onClick:we},"\u53D6\u6D88")))},Pn=Dt(69720),ke=Dt(17077),tn=Dt(62957),fn=Dt(77019),Jn=Dt(9507),Pe=Dt(59301),an=({callback:me,onCancel:we})=>{const ge=document.createElement("canvas"),Wn=ge.getContext("2d");ge.width=1e3,ge.height=800,Wn.fillStyle="#ffffff",Wn.fillRect(0,0,ge.width,ge.height);const ai=ge.toDataURL("image/png");return Pe.createElement(tn.default,{open:!0,width:"100vw",style:{height:"100vh",top:0},footer:null,title:null,closable:!1},Pe.createElement(fn.Z,{style:{height:"100vh"}},Pe.createElement(Jn.Z,{fullWidth:!0,noAssociationId:!0,showFullTools:!0,data:{src:ai,visible:!0,title:String(Date.now())},onOk:si=>{me({src:si.url})},onClose:we})))},re=Dt(12378);function hn(){go.CommandHandler.call(this),this._arrowKeyBehavior="move",this._pasteOffset=new go.Point(10,10),this._lastPasteOffset=new go.Point(0,0)}go.Diagram.inherit(hn,go.CommandHandler),hn.prototype.canAlignSelection=function(){var me=this.diagram;return!(me===null||me.isReadOnly||me.isModelReadOnly||me.selection.count<2)},hn.prototype.alignLeft=function(){var me=this.diagram;me.startTransaction("aligning left");var we=1/0;me.selection.each(function(ge){ge instanceof go.Link||(we=Math.min(ge.position.x,we))}),me.selection.each(function(ge){ge instanceof go.Link||ge.move(new go.Point(we,ge.position.y))}),me.commitTransaction("aligning left")},hn.prototype.alignRight=function(){var me=this.diagram;me.startTransaction("aligning right");var we=-1/0;me.selection.each(function(ge){if(!(ge instanceof go.Link)){var Wn=ge.actualBounds.x+ge.actualBounds.width;we=Math.max(Wn,we)}}),me.selection.each(function(ge){ge instanceof go.Link||ge.move(new go.Point(we-ge.actualBounds.width,ge.position.y))}),me.commitTransaction("aligning right")},hn.prototype.alignTop=function(){var me=this.diagram;me.startTransaction("alignTop");var we=1/0;me.selection.each(function(ge){ge instanceof go.Link||(we=Math.min(ge.position.y,we))}),me.selection.each(function(ge){ge instanceof go.Link||ge.move(new go.Point(ge.position.x,we))}),me.commitTransaction("alignTop")},hn.prototype.alignBottom=function(){var me=this.diagram;me.startTransaction("aligning bottom");var we=-1/0;me.selection.each(function(ge){if(!(ge instanceof go.Link)){var Wn=ge.actualBounds.y+ge.actualBounds.height;we=Math.max(Wn,we)}}),me.selection.each(function(ge){ge instanceof go.Link||ge.move(new go.Point(ge.actualBounds.x,we-ge.actualBounds.height))}),me.commitTransaction("aligning bottom")},hn.prototype.alignCenterX=function(){var me=this.diagram,we=me.selection.first();if(we){me.startTransaction("aligning Center X");var ge=we.actualBounds.x+we.actualBounds.width/2;me.selection.each(function(Wn){Wn instanceof go.Link||Wn.move(new go.Point(ge-Wn.actualBounds.width/2,Wn.actualBounds.y))}),me.commitTransaction("aligning Center X")}},hn.prototype.alignCenterY=function(){var me=this.diagram,we=me.selection.first();if(we){me.startTransaction("aligning Center Y");var ge=we.actualBounds.y+we.actualBounds.height/2;me.selection.each(function(Wn){Wn instanceof go.Link||Wn.move(new go.Point(Wn.actualBounds.x,ge-Wn.actualBounds.height/2))}),me.commitTransaction("aligning Center Y")}},hn.prototype.alignColumn=function(me){var we=this.diagram;we.startTransaction("align Column"),me===void 0&&(me=0),me=parseFloat(me);var ge=new Array;we.selection.each(function(jn){jn instanceof go.Link||ge.push(jn)});for(var Wn=0;Wn<ge.length-1;Wn++){var ai=ge[Wn],si=ai.actualBounds.y+ai.actualBounds.height+me,ln=ge[Wn+1];ln.move(new go.Point(ai.actualBounds.x,si))}we.commitTransaction("align Column")},hn.prototype.alignRow=function(me){me===void 0&&(me=0),me=parseFloat(me);var we=this.diagram;we.startTransaction("align Row");var ge=new Array;we.selection.each(function(jn){jn instanceof go.Link||ge.push(jn)});for(var Wn=0;Wn<ge.length-1;Wn++){var ai=ge[Wn],si=ai.actualBounds.x+ai.actualBounds.width+me,ln=ge[Wn+1];ln.move(new go.Point(si,ai.actualBounds.y))}we.commitTransaction("align Row")},hn.prototype.canRotate=function(me){var we=this.diagram;return!(we===null||we.isReadOnly||we.isModelReadOnly||we.selection.count<1)},hn.prototype.rotate=function(me){me===void 0&&(me=90);var we=this.diagram;we.startTransaction("rotate "+me.toString());var we=this.diagram;we.selection.each(function(ge){ge instanceof go.Link||ge instanceof go.Group||(ge.angle+=me)}),we.commitTransaction("rotate "+me.toString())},hn.prototype.pullToFront=function(){var me=this.diagram;me.startTransaction("pullToFront");var we=new go.Map;me.selection.each(function(ge){we.set(ge.layer,0)}),we.iteratorKeys.each(function(ge){var Wn=0;ge.parts.each(function(ai){if(!ai.isSelected){var si=ai.zOrder;isNaN(si)?ai.zOrder=0:Wn=Math.max(Wn,si)}}),we.set(ge,Wn)}),me.selection.each(function(ge){hn._assignZOrder(ge,we.get(ge.layer)+1)}),me.commitTransaction("pullToFront")},hn.prototype.pushToBack=function(){var me=this.diagram;me.startTransaction("pushToBack");var we=new go.Map;me.selection.each(function(ge){we.set(ge.layer,0)}),we.iteratorKeys.each(function(ge){var Wn=0;ge.parts.each(function(ai){if(!ai.isSelected){var si=ai.zOrder;isNaN(si)?ai.zOrder=0:Wn=Math.min(Wn,si)}}),we.set(ge,Wn)}),me.selection.each(function(ge){hn._assignZOrder(ge,we.get(ge.layer)-1-hn._findGroupDepth(ge))}),me.commitTransaction("pushToBack")},hn._assignZOrder=function(me,we,ge){ge===void 0&&(ge=me),me.layer===ge.layer&&(me.zOrder=we),me instanceof go.Group&&me.memberParts.each(function(Wn){hn._assignZOrder(Wn,we+1,ge)})},hn._findGroupDepth=function(me){if(me instanceof go.Group){var we=0;return me.memberParts.each(function(ge){we=Math.max(we,hn._findGroupDepth(ge))}),we+1}else return 0},hn.prototype.doKeyDown=function(){var me=this.diagram;if(me!==null){var we=me.lastInput;if(we.key==="Up"||we.key==="Down"||we.key==="Left"||we.key==="Right"){var ge=this.arrowKeyBehavior;if(ge==="none")return;if(ge==="select"){this._arrowKeySelect();return}else if(ge==="move"){this._arrowKeyMove();return}else if(ge==="tree"){this._arrowKeyTree();return}}go.CommandHandler.prototype.doKeyDown.call(this)}},hn.prototype._getAllParts=function(){var me=new Array;return this.diagram.nodes.each(function(we){me.push(we)}),this.diagram.parts.each(function(we){me.push(we)}),me},hn.prototype._arrowKeyMove=function(){var me=this.diagram,we=me.lastInput,ge=0,Wn=0;if(we.control||we.meta)ge=1,Wn=1;else if(me.grid!==null){var ai=me.grid.gridCellSize;Wn=ai.width,ge=ai.height}me.startTransaction("arrowKeyMove"),me.selection.each(function(si){we.key==="Up"?si.move(new go.Point(si.actualBounds.x,si.actualBounds.y-ge)):we.key==="Down"?si.move(new go.Point(si.actualBounds.x,si.actualBounds.y+ge)):we.key==="Left"?si.move(new go.Point(si.actualBounds.x-Wn,si.actualBounds.y)):we.key==="Right"&&si.move(new go.Point(si.actualBounds.x+Wn,si.actualBounds.y))}),me.commitTransaction("arrowKeyMove")},hn.prototype._arrowKeySelect=function(){var me=this.diagram,we=me.lastInput,ge=null;we.key==="Up"?ge=this._findNearestPartTowards(270):we.key==="Down"?ge=this._findNearestPartTowards(90):we.key==="Left"?ge=this._findNearestPartTowards(180):we.key==="Right"&&(ge=this._findNearestPartTowards(0)),ge!==null&&(we.shift?ge.isSelected=!0:we.control||we.meta?ge.isSelected=!ge.isSelected:me.select(ge))},hn.prototype._findNearestPartTowards=function(me){var we=this.diagram.selection.first();if(we===null)return null;for(var ge=we.actualBounds.center,Wn=this._getAllParts(),ai=1/0,si=we,ln=0;ln<Wn.length;ln++){var jn=Wn[ln];if(jn!==we&&jn.canSelect()){var ii=jn.actualBounds.center,ki=ge.directionPoint(ii),Ri=this._angleCloseness(ki,me);if(Ri<=45){var Gt=ge.distanceSquaredPoint(ii);Gt*=1+Math.sin(Ri*Math.PI/180),Gt<ai&&(ai=Gt,si=jn)}}}return si},hn.prototype._angleCloseness=function(me,we){return Math.min(Math.abs(we-me),Math.min(Math.abs(we+360-me),Math.abs(we-360-me)))},hn.prototype._arrowKeyTree=function(){var me=this.diagram,we=me.selection.first();if(we instanceof go.Node){var ge=me.lastInput;if(ge.key==="Right"){if(!we.isTreeLeaf)if(!we.isTreeExpanded)me.commandHandler.canExpandTree(we)&&me.commandHandler.expandTree(we);else{var Wn=this._sortTreeChildrenByY(we).first();Wn!==null&&me.select(Wn)}}else if(ge.key==="Left")if(!we.isTreeLeaf&&we.isTreeExpanded)me.commandHandler.canCollapseTree(we)&&me.commandHandler.collapseTree(we);else{var ai=we.findTreeParentNode();ai!==null&&me.select(ai)}else if(ge.key==="Up"){var ai=we.findTreeParentNode();if(ai!==null){var si=this._sortTreeChildrenByY(ai),ln=si.indexOf(we);if(ln>0){for(var jn=si.elt(ln-1);jn!==null&&jn.isTreeExpanded&&!jn.isTreeLeaf;){var ii=this._sortTreeChildrenByY(jn);jn=ii.last()}jn!==null&&me.select(jn)}else me.select(ai)}}else if(ge.key==="Down")if(we.isTreeExpanded&&!we.isTreeLeaf){var Wn=this._sortTreeChildrenByY(we).first();Wn!==null&&me.select(Wn)}else for(;we!==null;){var ai=we.findTreeParentNode();if(ai===null)break;var si=this._sortTreeChildrenByY(ai),ln=si.indexOf(we);if(ln<si.length-1){me.select(si.elt(ln+1));break}else we=ai}var ki=me.selection.first();ki!==null&&me.scrollToRect(ki.actualBounds)}},hn.prototype._sortTreeChildrenByY=function(me){var we=new go.List().addAll(me.findTreeChildrenNodes());return we.sort(function(ge,Wn){var ai=ge.location,si=Wn.location;return ai.y<si.y?-1:ai.y>si.y?1:ai.x<si.x?-1:ai.x>si.x?1:0}),we},hn.prototype.copyToClipboard=function(me){go.CommandHandler.prototype.copyToClipboard.call(this,me),this._lastPasteOffset.set(this.pasteOffset)},hn.prototype.pasteFromClipboard=function(){var me=go.CommandHandler.prototype.pasteFromClipboard.call(this);return this.diagram.moveParts(me,this._lastPasteOffset),this._lastPasteOffset.add(this.pasteOffset),me},Object.defineProperty(hn.prototype,"arrowKeyBehavior",{get:function(){return this._arrowKeyBehavior},set:function(me){if(me!=="move"&&me!=="select"&&me!=="scroll"&&me!=="tree"&&me!=="none")throw new Error('DrawCommandHandler.arrowKeyBehavior must be either "move", "select", "scroll", "tree", or "none", not: '+me);this._arrowKeyBehavior=me}}),Object.defineProperty(hn.prototype,"pasteOffset",{get:function(){return this._pasteOffset},set:function(me){if(!(me instanceof go.Point))throw new Error("DrawCommandHandler.pasteOffset must be a Point, not: "+me);this._pasteOffset.set(me)}});var di=hn,Tt=Dt(63720),Et=Dt(5269),St=Dt(38986),Mt={myPaletteDiv:"myPaletteDiv___Xjz2I",flowChartWrp:"flowChartWrp____f45r",maxH60:"maxH60___Pd4Re"},zt=Dt(48790),kt=Dt(59301),Ut=(me,we,ge)=>new Promise((Wn,ai)=>{var si=ii=>{try{jn(ge.next(ii))}catch(ki){ai(ki)}},ln=ii=>{try{jn(ge.throw(ii))}catch(ki){ai(ki)}},jn=ii=>ii.done?Wn(ii.value):Promise.resolve(ii.value).then(si,ln);jn((ge=ge.apply(me,we)).next())});function Oe({onCancel:me,callback:we}){let ge=(0,Ft.useRef)(),Wn=(0,Ft.useRef)(),ai=(0,Ft.useRef)(),si=(0,Ft.useRef)(!1);const ln=(0,Ft.useRef)(!1),[jn,ii]=(0,Ft.useState)(0);function ki(){const Gt=re.bx.make,fe={red:"#ff3333",blue:"#3358ff",green:"#25ad23",magenta:"#d533ff",purple:"#7d33ff",orange:"#ff6233",brown:"#8e571e",white:"#ffffff",black:"#000000",beige:"#fffcd5",extralightblue:"#d5ebff",extralightred:"#f2dfe0",lightblue:"#a5d2fa",lightgray:"#cccccc",lightgreen:"#b3e6b3",lightred:"#fcbbbd"};ge.current=new re.S0(Wn.current,{padding:20,grid:Gt(re.s_,"Grid",Gt(re.bn,"LineH",{stroke:"lightgray",strokeWidth:.5}),Gt(re.bn,"LineV",{stroke:"lightgray",strokeWidth:.5})),"draggingTool.isGridSnapEnabled":!0,handlesDragDropForTopLevelParts:!0,mouseDrop:Vn=>{var vi=Vn.diagram.commandHandler.addTopLevelParts(Vn.diagram.selection,!0);vi||Vn.diagram.currentTool.doCancel()},commandHandler:Gt(di),"clickCreatingTool.archetypeNodeData":{text:"\u672A\u547D\u540D",fill:null,stroke:null,borderColor:"rgba(0,0,0,0)"},PartCreated:Vn=>{var vi=Vn.subject;vi.location=vi.location.copy().snapToGridPoint(Vn.diagram.grid.gridOrigin,Vn.diagram.grid.gridCellSize),setTimeout(()=>{Vn.diagram.commandHandler.editTextBlock()},20)},"commandHandler.archetypeGroupData":{isGroup:!0,text:"NEW GROUP"},SelectionGrouped:Vn=>{var vi=Vn.subject;setTimeout(()=>{Vn.diagram.commandHandler.editTextBlock()})},LinkRelinked:Vn=>{var vi=Vn.parameter.part;vi.invalidateConnectedLinks();var pi=Vn.subject;Vn.diagram.toolManager.linkingTool.isForwards?pi.toNode.invalidateConnectedLinks():pi.fromNode.invalidateConnectedLinks()},"undoManager.isEnabled":!0}),ge.current.nodeTemplate=Gt(re.NB,"Auto",{locationSpot:re.z6.Center,locationObjectName:"SHAPE",desiredSize:new re.$u(120,60),minSize:new re.$u(40,40),resizable:!0,resizeCellSize:new re.$u(10,10),rotatable:!0},new re.KX("location","loc",re.E9.parse).makeTwoWay(re.E9.stringify),new re.KX("desiredSize","size",re.$u.parse).makeTwoWay(re.$u.stringify),Gt(re.bn,{name:"SHAPE",fill:fe.white,cursor:"pointer",portId:"",fromLinkable:!0,toLinkable:!0,fromLinkableDuplicates:!0,toLinkableDuplicates:!0,fromSpot:re.z6.AllSides,toSpot:re.z6.AllSides},new re.KX("figure"),new re.KX("fill"),new re.KX("stroke","borderColor"),new re.KX("strokeWidth","thickness"),new re.KX("strokeDashArray","dash")),Gt(re.bn,{width:100,height:20,strokeWidth:0,fill:"transparent"}),Gt(re.al,{margin:1,textAlign:"center",overflow:re.al.OverflowEllipsis,editable:!0},new re.KX("text").makeTwoWay(),new re.KX("stroke","color"))),ge.current.nodeTemplate.toolTip=Gt("ToolTip",Gt(re.s_,"Vertical",{maxSize:new re.$u(200,NaN)},Gt(re.al,{font:"bold 10pt sans-serif",textAlign:"center"},new re.KX("text")),Gt(re.al,{font:"10pt sans-serif",textAlign:"center"},new re.KX("text","details"))));function Mn(Vn,vi){var pi=(Fi,Wi)=>{Fi.handled=!0,Fi.diagram.model.commit(Vi=>{var pr=Wi.part.adornedPart,or=new re.E9().setRectSpot(pr.actualBounds,Vn);or.subtract(pr.location),or.scale(2,2),or.x+=Math.sign(or.x)*130,or.y+=Math.sign(or.y)*130,or.add(pr.location),or.snapToGridPoint(Fi.diagram.grid.gridOrigin,Fi.diagram.grid.gridCellSize);var hr=Vi.copyNodeData(pr.data);Vi.setGroupKeyForNodeData(hr,Vi.getGroupKeyForNodeData(pr.data)),Vi.addNodeData(hr);var Xe={from:pr.key,to:Vi.getKeyForNodeData(hr)};Vi.addLinkData(Xe);var nr=Fi.diagram.findNodeForData(hr);nr.location=or,Fi.diagram.select(nr),setTimeout(()=>{Fi.diagram.commandHandler.editTextBlock()},20)})};return Gt(re.bn,{figure:vi,alignment:Vn,alignmentFocus:Vn.opposite(),width:Vn.equals(re.z6.Top)||Vn.equals(re.z6.Bottom)?25:18,height:Vn.equals(re.z6.Top)||Vn.equals(re.z6.Bottom)?18:25,fill:"orange",stroke:fe.white,strokeWidth:4,mouseEnter:(Fi,Wi)=>Wi.fill="dodgerblue",mouseLeave:(Fi,Wi)=>Wi.fill="orange",isActionable:!0,click:pi,contextClick:pi})}function zn(Vn){return Gt(re.bn,{fill:"orange",stroke:"rgba(0, 0, 0, 0)",strokeWidth:15,background:"transparent",geometryString:"F1 M0 0 b 0 360 -4 0 4 z M10 0 b 0 360 -4 0 4 z M20 0 b 0 360 -4 0 4",isActionable:!0,cursor:"context-menu",mouseEnter:(vi,pi)=>pi.fill="dodgerblue",mouseLeave:(vi,pi)=>pi.fill="orange",click:(vi,pi)=>{vi.diagram.commandHandler.showContextMenu(pi.part.adornedPart)}},Vn||{})}ge.current.nodeTemplate.selectionAdornmentTemplate=Gt(re.uz,"Spot",Gt(re.Vm,{padding:10}),Mn(re.z6.Top,"TriangleUp"),Mn(re.z6.Left,"TriangleLeft"),Mn(re.z6.Right,"TriangleRight"),Mn(re.z6.Bottom,"TriangleDown"),zn({alignment:new re.z6(.75,0)}));function De(Vn,vi){return(pi,Fi)=>{pi.handled=!0,pi.diagram.model.commit(Wi=>{Wi.set(Fi.part.adornedPart.data,Vn,vi)})}}function kn(Vn,vi){return vi||(vi="color"),Gt(re.bn,{width:16,height:16,stroke:"lightgray",fill:Vn,margin:1,background:"transparent",mouseEnter:(pi,Fi)=>Fi.stroke="dodgerblue",mouseLeave:(pi,Fi)=>Fi.stroke="lightgray",click:De(vi,Vn),contextClick:De(vi,Vn)})}function Sn(){return[Gt("ContextMenuButton",Gt(re.s_,"Horizontal",kn(fe.white,"fill"),kn(fe.beige,"fill"),kn(fe.extralightblue,"fill"),kn(fe.extralightred,"fill"))),Gt("ContextMenuButton",Gt(re.s_,"Horizontal",kn(fe.lightgray,"fill"),kn(fe.lightgreen,"fill"),kn(fe.lightblue,"fill"),kn(fe.lightred,"fill")))]}function Fn(){return[Gt("ContextMenuButton",Gt(re.s_,"Horizontal",kn(fe.black),kn(fe.green),kn(fe.blue),kn(fe.red))),Gt("ContextMenuButton",Gt(re.s_,"Horizontal",kn(fe.white),kn(fe.magenta),kn(fe.purple),kn(fe.orange)))]}function ei(Vn,vi){return vi||(vi="thickness"),Gt(re.bn,"LineH",{width:16,height:16,strokeWidth:Vn,margin:1,background:"transparent",mouseEnter:(pi,Fi)=>Fi.background="dodgerblue",mouseLeave:(pi,Fi)=>Fi.background="transparent",click:De(vi,Vn),contextClick:De(vi,Vn)})}function On(Vn,vi){return vi||(vi="dash"),Gt(re.bn,"LineH",{width:24,height:16,strokeWidth:2,strokeDashArray:Vn,margin:1,background:"transparent",mouseEnter:(pi,Fi)=>Fi.background="dodgerblue",mouseLeave:(pi,Fi)=>Fi.background="transparent",click:De(vi,Vn),contextClick:De(vi,Vn)})}function Qn(){return[Gt("ContextMenuButton",Gt(re.s_,"Horizontal",ei(1),ei(2),ei(3),ei(4))),Gt("ContextMenuButton",Gt(re.s_,"Horizontal",On(null),On([2,4]),On([4,4])))]}function Yn(Vn,vi){return vi||(vi="figure"),Gt(re.bn,{width:32,height:32,scale:.5,fill:"lightgray",figure:Vn,margin:1,background:"transparent",mouseEnter:(pi,Fi)=>Fi.fill="dodgerblue",mouseLeave:(pi,Fi)=>Fi.fill="lightgray",click:De(vi,Vn),contextClick:De(vi,Vn)})}ge.current.nodeTemplate.contextMenu=Gt("ContextMenu",Gt("ContextMenuButton",Gt(re.s_,"Horizontal",Yn("Rectangle"),Yn("RoundedRectangle"),Yn("Ellipse"),Yn("Diamond"))),Gt("ContextMenuButton",Gt(re.s_,"Horizontal",Yn("Parallelogram2"),Yn("ManualOperation"),Yn("Procedure"),Yn("Cylinder1"))),Gt("ContextMenuButton",Gt(re.s_,"Horizontal",Yn("Terminator"),Yn("CreateRequest"),Yn("Document"),Yn("TriangleDown"))),Sn(),Fn(),Qn()),ge.current.groupTemplate=Gt(re.ZA,"Spot",{layerName:"Background",ungroupable:!0,locationSpot:re.z6.Center,selectionObjectName:"BODY",computesBoundsAfterDrag:!0,handlesDragDropForMembers:!0,mouseDrop:(Vn,vi)=>{var pi=vi.addMembers(vi.diagram.selection,!0);pi||vi.diagram.currentTool.doCancel()},avoidable:!1},new re.KX("location","loc",re.E9.parse).makeTwoWay(re.E9.stringify),Gt(re.s_,"Auto",{name:"BODY"},Gt(re.bn,{parameter1:10,fill:fe.white,strokeWidth:2,cursor:"pointer",fromLinkable:!0,toLinkable:!0,fromLinkableDuplicates:!0,toLinkableDuplicates:!0,fromSpot:re.z6.AllSides,toSpot:re.z6.AllSides},new re.KX("fill"),new re.KX("stroke","color"),new re.KX("strokeWidth","thickness"),new re.KX("strokeDashArray","dash")),Gt(re.Vm,{background:"transparent",margin:20})),Gt(re.al,{alignment:re.z6.Top,alignmentFocus:re.z6.Bottom,font:"bold 12pt sans-serif",editable:!0},new re.KX("text"),new re.KX("stroke","color"))),ge.current.groupTemplate.selectionAdornmentTemplate=Gt(re.uz,"Spot",Gt(re.s_,"Auto",Gt(re.bn,{fill:null,stroke:"dodgerblue",strokeWidth:3}),Gt(re.Vm,{margin:1.5})),zn({alignment:re.z6.TopRight,alignmentFocus:re.z6.BottomRight})),ge.current.groupTemplate.contextMenu=Gt("ContextMenu",Sn(),Fn(),Qn()),ge.current.linkTemplate=Gt(re.rU,{layerName:"Foreground",routing:re.rU.AvoidsNodes,corner:10,fromShortLength:10,toShortLength:15,relinkableFrom:!0,relinkableTo:!0,reshapable:!0,resegmentable:!0},new re.KX("fromSpot","fromSpot",re.z6.parse),new re.KX("toSpot","toSpot",re.z6.parse),new re.KX("fromShortLength","dir",Vn=>Vn>=1?10:0),new re.KX("toShortLength","dir",Vn=>Vn>=1?10:0),new re.KX("points").makeTwoWay(),Gt(re.bn,{strokeWidth:2},new re.KX("stroke","color"),new re.KX("strokeWidth","thickness"),new re.KX("strokeDashArray","dash")),Gt(re.bn,{segmentIndex:0,segmentOffset:new re.E9(15,0),segmentOrientation:re.rU.OrientAlong,alignmentFocus:re.z6.Right,figure:"circle",width:10,strokeWidth:0},new re.KX("fill","color"),new re.KX("visible","dir",Vn=>Vn===1)),Gt(re.bn,{segmentIndex:-1,segmentOffset:new re.E9(-10,6),segmentOrientation:re.rU.OrientPlus90,alignmentFocus:re.z6.Right,figure:"triangle",width:12,height:12,strokeWidth:0},new re.KX("fill","color"),new re.KX("visible","dir",Vn=>Vn>=1),new re.KX("width","thickness",Vn=>7+3*Vn),new re.KX("height","thickness",Vn=>7+3*Vn),new re.KX("segmentOffset","thickness",Vn=>new re.E9(-15,4+1.5*Vn))),Gt(re.bn,{segmentIndex:0,segmentOffset:new re.E9(15,-6),segmentOrientation:re.rU.OrientMinus90,alignmentFocus:re.z6.Right,figure:"triangle",width:12,height:12,strokeWidth:0},new re.KX("fill","color"),new re.KX("visible","dir",Vn=>Vn===2),new re.KX("width","thickness",Vn=>7+3*Vn),new re.KX("height","thickness",Vn=>7+3*Vn),new re.KX("segmentOffset","thickness",Vn=>new re.E9(-15,4+1.5*Vn))),Gt(re.al,{alignmentFocus:new re.z6(0,1,-4,0),editable:!0},new re.KX("text").makeTwoWay(),new re.KX("stroke","color"))),ge.current.linkTemplate.selectionAdornmentTemplate=Gt(re.uz,Gt(re.bn,{isPanelMain:!0,stroke:"transparent",strokeWidth:6,pathPattern:Ni(2)},new re.KX("pathPattern","thickness",Ni)),zn({alignmentFocus:new re.z6(0,0,-6,-4)}));function Ni(Vn){return Gt(re.bn,{stroke:"dodgerblue",strokeWidth:2,strokeCap:"square",geometryString:"M0 0 M4 2 H3 M4 "+(Vn+4).toString()+" H3"})}function Pi(Vn){var vi="M0 0 M8 16 M0 8 L16 8 M12 11 L16 8 L12 5";return Vn===0?vi="M0 0 M16 16 M0 8 L16 8":Vn===2&&(vi="M0 0 M16 16 M0 8 L16 8 M12 11 L16 8 L12 5 M4 11 L0 8 L4 5"),Gt(re.bn,{geometryString:vi,margin:2,background:"transparent",mouseEnter:(pi,Fi)=>Fi.background="dodgerblue",mouseLeave:(pi,Fi)=>Fi.background="transparent",click:De("dir",Vn),contextClick:De("dir",Vn)})}function bi(Vn){var vi=(pi,Fi)=>{pi.handled=!0,pi.diagram.model.commit(Wi=>{var Vi=Fi.part.adornedPart;Wi.set(Vi.data,Vn?"toSpot":"fromSpot",re.z6.stringify(re.z6.AllSides)),(Vn?Vi.toNode:Vi.fromNode).invalidateConnectedLinks()})};return Gt(re.bn,{width:12,height:12,fill:"transparent",mouseEnter:(pi,Fi)=>Fi.background="dodgerblue",mouseLeave:(pi,Fi)=>Fi.background="transparent",click:vi,contextClick:vi})}function Ge(Vn,vi){var pi=0,Fi=re.z6.RightSide;Vn.equals(re.z6.Top)?(pi=270,Fi=re.z6.TopSide):Vn.equals(re.z6.Left)?(pi=180,Fi=re.z6.LeftSide):Vn.equals(re.z6.Bottom)&&(pi=90,Fi=re.z6.BottomSide),vi||(pi-=180);var Wi=(Vi,pr)=>{Vi.handled=!0,Vi.diagram.model.commit(or=>{var hr=pr.part.adornedPart;or.set(hr.data,vi?"toSpot":"fromSpot",re.z6.stringify(Fi)),(vi?hr.toNode:hr.fromNode).invalidateConnectedLinks()})};return Gt(re.bn,{alignment:Vn,alignmentFocus:Vn.opposite(),geometryString:"M0 0 M12 12 M12 6 L1 6 L4 4 M1 6 L4 8",angle:pi,background:"transparent",mouseEnter:(Vi,pr)=>pr.background="dodgerblue",mouseLeave:(Vi,pr)=>pr.background="transparent",click:Wi,contextClick:Wi})}ge.current.linkTemplate.contextMenu=Gt("ContextMenu",Fn(),Qn(),Gt("ContextMenuButton",Gt(re.s_,"Horizontal",Pi(0),Pi(1),Pi(2))),Gt("ContextMenuButton",Gt(re.s_,"Horizontal",Gt(re.s_,"Spot",bi(!1),Ge(re.z6.Top,!1),Ge(re.z6.Left,!1),Ge(re.z6.Right,!1),Ge(re.z6.Bottom,!1)),Gt(re.s_,"Spot",{margin:new re.Zt(0,0,0,2)},bi(!0),Ge(re.z6.Top,!0),Ge(re.z6.Left,!0),Ge(re.z6.Right,!0),Ge(re.z6.Bottom,!0)))));const Xi=`{ "class": "GraphLinksModel",
|
|
"nodeDataArray": [
|
|
{"text":"Find Problem","key":-9,"loc":"-20 -140","color":"#3358ff","fill":"white","figure":"Procedure","thickness":3},
|
|
{"text":"What do we want?","key":-10,"loc":"-65 -324.305","group":-16,"figure":"Ellipse","fill":"white"},
|
|
{"text":"What do our users want?","key":-11,"loc":"105 -334.305","group":-20,"figure":"Ellipse","fill":"#ffffff","color":"black"},
|
|
{"text":"Meetings","key":-12,"loc":"-65 -444.305","group":-16,"figure":"TriangleDown","fill":"#ffffff"},
|
|
{"text":"Reviews","key":-13,"loc":"105 -454.305","group":-20,"figure":"TriangleDown","fill":"#ffffff","color":"black"},
|
|
{"text":"Can we solve it?","key":-14,"loc":"190 -140","color":"#7d33ff","fill":"#ffffff","figure":"Diamond","size":"140 80","thickness":3},
|
|
{"isGroup":true,"text":"Internal","key":-16,"loc":"-65 -384.305","fill":"#d5ebff","dash":null,"thickness":1,"group":-22},
|
|
{"isGroup":true,"text":"External","key":-20,"loc":"105 -394.305","fill":"#d5ebff","dash":null,"thickness":1,"group":-22},
|
|
{"isGroup":true,"text":"Sources","key":-22,"loc":"20 -400","fill":"#a5d2fa","dash":[4,4],"color":"#3358ff"}
|
|
],
|
|
"linkDataArray": [
|
|
{"from":-12,"to":-10,"points":[-65,-414.305,-65,-404.305,-65,-384.305,-65,-384.305,-65,-364.305,-65,-354.305],"dash":null,"dir":1},
|
|
{"from":-13,"to":-11,"points":[105,-424.305,105,-414.305,105,-394.305,105,-394.305,105,-374.305,105,-364.305],"dash":null,"color":"#000000","dir":1},
|
|
{"from":-10,"to":-9,"points":[-65,-294.305,-65,-284.305,-65,-232.1525,-40,-232.1525,-40,-180,-40,-170],"dir":2,"dash":[4,4]},
|
|
{"from":-11,"to":-9,"points":[105,-304.305,105,-294.305,105,-237.1525,0,-237.1525,0,-180,0,-170],"dash":[4,4],"dir":2},
|
|
{"from":-9,"to":-14,"points":[40,-150,58,-150,80,-150,80,-153.33333333333331,102,-153.33333333333331,120,-153.33333333333331],"dir":1,"color":"#3358ff"},
|
|
{"from":-14,"to":-9,"points":[190,-100,190,-90,-20,-90,-20,-95,-20,-100,-20,-110],"fromSpot":"BottomSide","toSpot":"BottomSide","text":"No","color":"#ff3333","thickness":2,"dir":1},
|
|
{"from":-9,"to":-14,"points":[40,-130,58,-130,80,-130,80,-126.66666666666666,102,-126.66666666666666,120,-126.66666666666666]}
|
|
]}`;var dr=["Rectangle","Square","RoundedRectangle","Border","Ellipse","Circle","TriangleRight","TriangleDown","TriangleLeft","TriangleUp","Triangle","Diamond","LineH","LineV","None","BarH","BarV","MinusLine","PlusLine","XLine","LineRight","LineDown","LineLeft","LineUp"];function br(Vn){return console.log("shapeName:",Vn),dr.indexOf(Vn)>=0}var Ue=new re.YI(ai.current,{maxSelectionCount:1,linkTemplate:Gt(re.rU,{locationSpot:re.z6.Center,selectionAdornmentTemplate:Gt(re.uz,"Link",{locationSpot:re.z6.Center},Gt(re.bn,{isPanelMain:!0,fill:null,stroke:"deepskyblue",strokeWidth:0}),Gt(re.bn,{toArrow:"Standard",stroke:null}))},{routing:re.rU.AvoidsNodes,curve:re.rU.JumpOver,corner:5,toShortLength:4},new re.KX("points"),Gt(re.bn,{isPanelMain:!0,strokeWidth:2}),Gt(re.bn,{toArrow:"Standard",stroke:null})),model:new re.FJ([{text:"\u672A\u547D\u540D",size:"100 100",fill:null,stroke:"#000"},...re.bn.getFigureGenerators().toArray().map(Vn=>({text:"\u672A\u547D\u540D",size:"100 100",figure:Vn.key,fill:"white",stroke:"#666",borderColor:"#000"}))])});return ge.current.addDiagramListener("TextEdited",function(Vn){var vi;const pi=Vn.subject.part;var Fi=(vi=document.activeElement)==null?void 0:vi.value;typeof Fi=="string"&&Fi.trim()===""&&ge.current.model.commit(function(Wi){Wi.set(pi.data,"text","\u672A\u547D\u540D"),ge.current.commandHandler.stopCommand()},"increment")}),Ue.nodeTemplate=Gt(re.NB,"Auto",{locationSpot:re.z6.Center},new re.KX("location","location",re.E9.parse).makeTwoWay(re.E9.stringify),Gt(re.bn,"Circle",{fill:"white",stroke:"gray",strokeWidth:2,width:20,height:20,portId:"",fromLinkable:!0,toLinkable:!0,fromLinkableDuplicates:!0,toLinkableDuplicates:!0,fromLinkableSelfNode:!0,toLinkableSelfNode:!0},new re.KX("stroke").makeTwoWay(),new re.KX("fill").makeTwoWay(),new re.KX("figure")),Gt(re.al,{margin:new re.Zt(5,5,3,5),font:"10pt sans-serif",minSize:new re.$u(16,16),maxSize:new re.$u(10,NaN),textAlign:"center",editable:!0},new re.KX("key").makeTwoWay())),setTimeout(()=>{ge.current.grid=Gt(re.s_,"Grid",Gt(re.bn,"LineH",{stroke:"lightgray",strokeWidth:.5}),Gt(re.bn,"LineV",{stroke:"lightgray",strokeWidth:.5})),ge.current.grid.visible=!0,ge.current.grid.gridCellStroke="darkgray",ge.current.grid.gridCellStrokeWidth=1},300),window.myDiagrams=ge.current,ge.current}const Ri=()=>Ut(this,null,function*(){var Gt,fe=ge.current.makeImage();const Mn=yield(0,St.ZP)("/api/attachments.json",{method:"post",body:{file_type:"base64",original_filename:Date.now(),file:fe.src,file_data:JSON.stringify({login:(Gt=(0,zt.eY)())==null?void 0:Gt.login,data:JSON.parse(ge.current.model.toJson())})}});we({src:Mn.url})});return(0,Ft.useEffect)(()=>(setTimeout(()=>{ki()},500),ii(jn+1),()=>{ge.current=null}),[]),kt.createElement("div",{ref:ln,className:"body-overflow-initial"},kt.createElement(tn.default,{width:1200,icon:null,footer:null,closable:!0,visible:!!jn,destroyOnClose:!0,maskClosable:!1,rootClassName:"zIndex-9999",title:kt.createElement(fn.Z,null,kt.createElement(Et.Z,{flex:1},"\u63D2\u5165\u6D41\u7A0B\u56FE"),kt.createElement(Et.Z,{onClick:()=>{var Gt,fe,Mn=ge.current.selection.first();if(si.current=!si.current,document.activeElement&&Mn){let zn=(fe=(Gt=document.activeElement)==null?void 0:Gt.value)==null?void 0:fe.trim();typeof zn=="string"&&ge.current.model.commit(function(De){De.set(Mn.data,"text",zn||"\u672A\u547D\u540D"),ge.current.commandHandler.stopCommand()},"increment")}ii(jn+1)}},kt.createElement("span",{className:"current c-blue mr30",style:{fontWeight:400}},"\u5C55\u5F00/\u6536\u8D77"))),onCancel:me},kt.createElement("div",{style:{width:"100%",height:"80vh",overflow:"hidden",position:"relative",display:si.current?"none":"block"},className:Mt.flowChartWrp},kt.createElement("div",{style:{display:"flex",height:"100%"}},kt.createElement("div",{style:{width:"300px",height:"100%"}},kt.createElement("div",{style:{background:"#fff",position:"relative",zIndex:12,fontSize:16,color:"#3061d0"}},"\u56FE\u5F62\u5E93"),kt.createElement("div",{style:{height:"calc(100% - 50px)"},className:Mt.myPaletteDiv,ref:ai})),kt.createElement("div",{style:{flex:1,position:"relative"}},kt.createElement("div",{ref:Wn,style:{height:"80vh"}}))),kt.createElement("div",{className:"tr"},kt.createElement(oe.ZP,{size:"large",onClick:Ri,style:{position:"absolute",right:0,bottom:0,zIndex:8},type:"primary"},"\u4FDD\u5B58\u5230\u7F16\u8F91\u5668")))))}var Te=Oe,_e=Dt(47889),ee=Dt(71051);const de=_e.ZP.Group,pe={margin:"0 8px"};var be=({callback:me,onCancel:we})=>{function ge(Wn){me(Wn)}return Ft.createElement(Xt.default,{className:"add-table-panel",initialValues:{row:3,col:2,align:"default"},onFinish:ge},Ft.createElement("div",{className:"flex-container",style:{alignItems:"baseline"}},Ft.createElement("span",{style:pe},"\u5355\u5143\u683C\u6570\uFF1A"),Ft.createElement("span",{style:pe},"\u884C\u6570"),Ft.createElement(Xt.default.Item,{name:"row",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u884C\u6570"}]},Ft.createElement(ee.Z,null)),Ft.createElement("span",{style:pe},"\u5217\u6570"),Ft.createElement(Xt.default.Item,{name:"col",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u5217\u6570"}]},Ft.createElement(ee.Z,null))),Ft.createElement("div",{className:"flex-container",style:{marginTop:12,alignItems:"baseline"}},Ft.createElement("span",{style:pe},"\u5BF9\u9F50\u65B9\u5F0F\uFF1A"),Ft.createElement(Xt.default.Item,{name:"align"},Ft.createElement(de,null,Ft.createElement(_e.ZP,{value:"default"},Ft.createElement("i",{className:"fa fa-align-justify"})),Ft.createElement(_e.ZP,{value:"left"},Ft.createElement("i",{className:"fa fa-align-left"})),Ft.createElement(_e.ZP,{value:"center"},Ft.createElement("i",{className:"fa fa-align-center"})),Ft.createElement(_e.ZP,{value:"right"},Ft.createElement("i",{className:"fa fa-align-right"}))))),Ft.createElement("div",{className:"flex-container flex-end"},Ft.createElement(oe.ZP,{type:"primary",htmlType:"submit",style:{marginRight:10}},"\u786E\u5B9A"),Ft.createElement(oe.ZP,{type:"ghost",onClick:we},"\u53D6\u6D88")))},ze=Dt(71411),rn=Dt(43001),He=Dt.n(rn),xe=(0,Ft.forwardRef)(({use3d:me,width:we,height:ge,callback:Wn,showSaveButton:ai},si)=>{const ln=(0,Ft.useRef)(),jn=(0,Ft.useRef)(),[ii,ki]=(0,Ft.useState)(!1),Ri=(0,Ft.useRef)({id:ln,appName:"graphing",width:we||1e3,height:ge||600,showToolBar:!0,showMenuBar:!0,allowStyleBar:!0,showAlgebraInput:!0,enableLabelDrags:!1,enableShiftDragZoom:!0,showToolBarHelp:!1,errorDialogsActive:!0,showTutorialLink:!0,showLogging:!0,useBrowserForJS:!1});(0,Ft.useEffect)(()=>{jn.current=new(He())(Ri.current,!0),window.onload=function(){jn.current.inject("applet_container")}},[]);const Gt=()=>{var fe=window.ggbApplet.getPNGBase64(1,!0,72);return Wn&&Wn(fe),fe};return(0,Ft.useEffect)(()=>{Ri.current.appName=ii?"3D":"graphing",jn.current.inject("applet_container")},[ii]),(0,Ft.useEffect)(()=>{ki(me)},[me]),(0,Ft.useImperativeHandle)(si,()=>({getImgData:Gt})),Ft.createElement(Ft.Fragment,null,Ft.createElement("div",{style:{width:"100%",height:"100%"},id:"applet_container",ref:ln}),Ft.createElement(fn.Z,{align:"middle"},Ft.createElement(Et.Z,{flex:1},Ft.createElement(ze.Z,{size:"default",checkedChildren:"\u5173\u95ED3D\u56FE\u50CF",unCheckedChildren:"\u5F00\u542F3D\u56FE\u50CF",checked:ii,onChange:fe=>ki(fe)})),Ft.createElement(Et.Z,null,Ft.createElement(oe.ZP,{size:"large",onClick:Gt,style:{zIndex:8,marginTop:10},type:"primary"},"\u4FDD\u5B58\u5230\u7F16\u8F91\u5668"))))}),Ne=Dt(76562),Ze=Dt(6767);const Bn="link",le="upload-image",An="add-flowchart",Kn="draw-image",yi="add-flowchart",Xn="code-block",Ei="add-table",Yi="------------",Gi={default:Yi,left:`:${Yi}`,center:`:${Yi}:`,right:`${Yi}:`};var Hi=Dt(37808);function Ki(){}let Qi=0;const ji=1e4,Ai="\u2581",Zi="@\u2581\u2581@",Pt="@\u2581@",ni=`
|
|
**\u6A21\u677F\u6807\u9898**
|
|
\u6A21\u677F\u6B63\u6587\u5185\u5BB9\uFF0C\u53EF\u8F93\u5165\u6587\u672C\u5185\u5BB9\u548C\u7C98\u8D34\u56FE\u7247\u7B49\u64CD\u4F5C`,Si=["pptm","pptx","ppt","pot","pps","ppa","potx","ppsx","ppam","pptm","potm","ppsm","doc","docx","dot","dotx","docm","dotm","xls","xlsx","csv","xlt","xla","xltx","xlsm","xltm","xlam","xlsb"];function on(me){return/^\d+$/.test(me)?`${me}px`:me}const pn=navigator.platform.toUpperCase().indexOf("MAC")>=0?"Cmd":"Ctrl",_n={[pn+"-B"]:"bold",[pn+"-I"]:"italic"},Di={[Bn]:"\u6DFB\u52A0\u94FE\u63A5",[Xn]:"\u6DFB\u52A0\u4EE3\u7801\u5757",[le]:"\u6DFB\u52A0\u56FE\u7247",[Kn]:"\u6DFB\u52A0\u753B\u56FE",[An]:"\u63D2\u5165\u6D41\u7A0B\u56FE",[Ei]:"\u6DFB\u52A0\u8868\u683C","maths-latex":"\u6570\u5B66\u56FE\u50CF","inline-latex":"LATEX\u516C\u5F0F"};var Bi=({defaultValue:me="",onChange:we,width:ge="100%",height:Wn=400,miniToolbar:ai=!1,isFocus:si=!1,watch:ln,insertTemp:jn,mode:ii="markdown",id:ki="markdown-editor-id",showResizeBar:Ri=!1,noStorage:Gt=!1,showNullButton:fe=!1,showNullProgramButton:Mn=!1,hidetoolBar:zn=!1,fullScreen:De=!1,onBlur:kn,onCMBeforeChange:Sn,onFullScreen:Fn,className:ei="",disablePaste:On=!1,disabled:Qn=!1,disabledFill:Yn=!1,placeholder:Ni="",values:Pi="",extraUse:bi})=>{const[Ge,Xi]=(0,Ft.useState)(null),[dr,br]=(0,Ft.useState)(me),[Ue,Vn]=(0,Ft.useState)(ln),[vi,pi]=(0,Ft.useState)(De),[Fi,Wi]=(0,Ft.useState)(""),[Vi,pr]=(0,Ft.useState)(0),[or,hr]=(0,Ft.useState)(Wn),[Xe,nr]=(0,Ft.useState)(!1),[qe,xi]=(0,Ft.useState)(0),[ir,fr]=(0,Ft.useState)(0),Br=(0,Ft.useRef)(),kr=(0,Ft.useRef)(),rr=(0,Ft.useRef)(),Kr=(0,Ft.useRef)();(0,Ft.useEffect)(()=>{const hi=window.scrollY||window.pageYOffset;br(Pi),Ge==null||Ge.setValue(Pi),window.scrollTo(0,hi)},[Pi]),(0,Ft.useEffect)(()=>{Fn==null||Fn(vi)},[vi]),(0,Ft.useEffect)(()=>{if(Br.current){let hi=function(Ke,qn){var Ci;if(On){qn.preventDefault();return}const ar=qn.clipboardData;if(ar){const Oi=ar.types.toString(),ur=ar.items;if(Oi==="Files"||ar.types.indexOf("Files")>-1){if(qn.preventDefault(),ii=="stex")return;try{let sr=ur[1];((Ci=ur[0])==null?void 0:Ci.kind)==="file"&&(sr=ur[0]);const yr=sr.getAsFile(),Tr=yr.name.split(".").pop();(0,ke.I)(yr,jr=>{var Jr,Ee,Fr;jr.id?((Jr=yr==null?void 0:yr.type)==null?void 0:Jr.indexOf("image"))>-1?bn.replaceSelection(`<img width="100%" src="/api/attachments/${jr.id}?type=${jr.content_type})" alt="" />`):((Ee=yr==null?void 0:yr.type)==null?void 0:Ee.indexOf("video"))>-1?bn.replaceSelection(`<video width="100%" controls src="/api/attachments/${jr.id}"></video>`):((Fr=yr==null?void 0:yr.type)==null?void 0:Fr.indexOf("pdf"))>-1?bn.replaceSelection(`<a href="/api/attachments/${jr.id}?type=${yr.type}&disposition=inline" target="_blank">${yr.name}</a>`):Si.includes(Tr)?bn.replaceSelection(`<a href="/api/attachments/${jr.id}?type=office&disposition=inline" target="_blank">${yr.name}</a>`):bn.replaceSelection(`[${yr.name}](/api/attachments/${jr.id}?type=${jr.content_type})`):(jr==null?void 0:jr.status)===401&&(document.location.href="/user/login")})}catch(sr){Ze.ZP.warning("\u8BF7\u4F7F\u7528chrome\u6D4F\u89C8\u5668\u7C98\u8D34")}return!0}else return!0}return!0};const bn=ye().fromTextArea(Br.current,{mode:ii,lineNumbers:!ai,lineWrapping:!0,value:me,autoCloseTags:!0,autoCloseBrackets:!0});return bn.on("keyup",function(Ke,qn){qn.keyCode===8&&(Ke.getValue()==""?bn.setOption("placeholder",Ni):bn.setOption("placeholder",null))}),bn.on("keydown",function(Ke,qn){if(qn.keyCode===8){var Ci=gn(Ke);Ci&&qn.preventDefault()}}),si&&bn.focus(),bn.on("paste",hi),Qn&&bn.on("beforeChange",function(Ke,qn){(qn.origin==="paste"||qn.origin==="+input")&&qn.cancel()}),Xi(bn),()=>{bn.off("paste",hi)}}},[]);const Ae=(0,Ft.useCallback)(()=>{if(kr.current)try{}catch(hi){console.log(hi,"---- to set md editor body height")}},[or,kr,vi]);(0,Ft.useEffect)(()=>{function hi(){let bn=new Be.Z(Ke=>{for(let qn of Ke)(qn.target.offsetHeight>0||qn.target.offsetWidth>0)&&(Ae(),Ge.setSize("100%","100%"),Ge.refresh())});return bn.observe(Br.current.parentElement),bn}if(Ge){const bn=hi();return()=>{var Ke,qn;(Ke=Br.current)!=null&&Ke.parentElement&&bn.unobserve((qn=Br.current)==null?void 0:qn.parentElement)}}},[Ge,Ae]),(0,Ft.useEffect)(()=>{if(Ge){let hi=[];for(const[bn,Ke]of Object.entries(_n)){let qn={[bn]:()=>{Me(Ke)}};hi.push(qn),Ge.addKeyMap(qn)}return()=>{for(let bn of hi)Ge.removeKeyMap(bn)}}},[Ge]),(0,Ft.useEffect)(()=>{De!==vi&&pi(De)},[De]),(0,Hi.Z)(()=>{if(!Gt&&Vi>0){let hi=new Date().getTime(),bn=window.sessionStorage.getItem(ki);hi>=Vi+ji&&(!bn||bn!==dr)&&(window.sessionStorage.setItem(ki,dr),nr(!0))}},ji),(0,Ft.useEffect)(()=>{Vn(ln)},[Ge,ln]),(0,Ft.useEffect)(()=>{Ge&&si&&Ge.focus()},[Ge,si]),(0,Ft.useEffect)(()=>{if(Ue&&Ge){let hi=function(Ke){let qn=Ke.target;if(Kr.current){let Ci=qn.scrollTop/qn.scrollHeight;Kr.current.scrollTop=Kr.current.scrollHeight*Ci}};const bn=Ge.getScrollerElement();return bn.addEventListener("scroll",hi),()=>{bn.removeEventListener("scroll",hi)}}},[Ge,Ue]),(0,Ft.useEffect)(()=>{if(Ge&&Sn){let hi=function(bn,Ke){Sn(bn,Ke)};return Ge.on("beforeChange",hi),()=>{Ge.off("beforeChange",hi)}}},[Ge,Sn]),(0,Ft.useEffect)(()=>{if(Ge&&kn){let hi=function(){kn(Ge.getValue())};return Ge.on("blur",hi),()=>{Ge.off("blur",hi)}}},[Ge,kn]);function gn(hi,bn){var Ke=hi.getDoc(),qn=Ke.getCursor(),Ci=Ke.getLine(qn.line),ar=Ci.charAt(qn.ch-1),Oi=Ci.lastIndexOf("@\u2581@",qn.ch),ur=Ci.lastIndexOf("@\u2581\u2581@",qn.ch),sr=Oi>ur?Oi:ur,yr=Oi>ur?3:4;if(Zi.indexOf(ar)===-1)return null;if(console.log("change1:",bn,hi,Ci,qn,sr,Oi,ur,ar),sr>=0&&qn.ch-sr<5){var Tr=sr+yr;return Ke.replaceRange("",{line:qn.line,ch:sr},{line:qn.line,ch:Tr}),{line:qn.line,ch:Tr}}return null}(0,Ft.useEffect)(()=>{if(Ge){let hi=function(bn,Ke){const qn=bn.getValue();br(qn),pr(new Date().getTime()),bn.getScrollerElement().dispatchEvent(new CustomEvent("scroll")),we&&(Mn?we(qn,Dn(qn)):we(qn))};return Ge.on("change",hi),()=>{Ge.off("change",hi)}}},[Ge,we]),(0,Ft.useEffect)(()=>{if(Ge)if(me==null)Ge.setValue(""),br("");else{const hi=window.scrollY||window.pageYOffset;me!==Ge.getValue()&&(Ge.setValue(me),br(me),Ge.setCursor(Qn?1:Ge.lineCount(),0),window.scrollTo(0,hi))}},[Ge,me]);const Me=(0,Ft.useCallback)(hi=>{const bn=Ge.getCursor(),Ke=Ge.getSelection();let qn=Ke.split(`
|
|
`);switch(hi){case"bold":return Ge.replaceSelection("**"+Ke+"**"),Ke===""&&Ge.setCursor(bn.line,bn.ch+2),Ge.focus();case"italic":return Ge.replaceSelection("*"+Ke+"*"),Ke===""&&Ge.setCursor(bn.line,bn.ch+1),Ge.focus();case"code":return Ge.replaceSelection("`"+Ke+"`"),Ke===""&&Ge.setCursor(bn.line,bn.ch+1),Ge.focus();case"inline-latex":return Wi("inline-latex"),Ge.focus();case"latex":return Ge.replaceSelection("```latex\n"+Ke+"\n```"),Ge.setCursor(bn.line+1,Ke.length+1),Ge.focus();case"line-break":return Ge.replaceSelection(`<br/>
|
|
`),Ge.focus();case"list-ul":return Ke===""?Ge.replaceSelection("- "+Ke):Ge.replaceSelection(qn.map(Ci=>Ci===""?"":`- ${Ci}`).join(`
|
|
`)),Ge.focus();case"list-ol":return Ke===""?Ge.replaceSelection("1. "+Ke):Ge.replaceSelection(qn.map((Ci,ar)=>Ci===""?"":`${ar+1}. ${Ci}`).join(`
|
|
`)),Ge.focus();case"add-null-ch":return Ke===""&&Ge.setCursor(bn.line,bn.ch),Ge.replaceSelection(Ai),Ge.focus();case"add-signal":return Ke===""&&Ge.setCursor(bn.line,bn.ch),Ge.replaceSelection(Pt),Ge.focus();case"add-multiple":return Ke===""&&Ge.setCursor(bn.line,bn.ch),Ge.replaceSelection(Zi),Ge.focus();case"inster-template-1":return Ke===""&&Ge.setCursor(bn.line,bn.ch),Ge.replaceSelection(ni),Ge.focus();case"eraser":return Ge.setValue(""),Ge.focus();case"trigger-watch":return Vn(!Ue),Ge.focus();case"trigger-full-screen":return pi(!vi),Ge.focus();case Bn:Wi(Bn);return;case Xn:Wi(Xn);return;case le:Wi(le);return;case Kn:Wi(Kn);return;case"maths-latex":Wi("maths-latex");return;case An:Wi(An);return;case Ei:Wi(Ei);return;default:throw new Error}},[Ge,Ue,vi]),At=(0,Ft.useCallback)((hi,bn)=>{var Ke,qn,Ci,ar,Oi,ur;switch(Wi(""),Fi){case Bn:const{title:Jr,link:Ee}=hi;return Ge.replaceSelection(`[${Jr}](${Ee})`),Ge.focus();case Xn:const{language:Fr,content:Mr}=hi;return Ge.replaceSelection(["```"+Fr,Mr,"```"].join(`
|
|
`)),Ge.focus();case"maths-latex":for(var sr=atob(hi),yr=new Uint8Array(sr.length),Tr=0;Tr<sr.length;Tr++)yr[Tr]=sr.charCodeAt(Tr);var jr=new Blob([yr],{type:"image/png"});(0,ke.I)(jr,wo=>{wo.id?Ge.replaceSelection(``):(wo==null?void 0:wo.status)===401&&(document.location.href="/user/login")});break;case"inline-latex":Ge.replaceSelection("`$$"+hi+"$$`");break;case le:case Kn:case yi:const{src:Ui,alt:vr}=hi,mr=bn,_r=(Ci=(qn=(Ke=mr==null?void 0:mr.name)==null?void 0:Ke.split("."))==null?void 0:qn.pop)==null?void 0:Ci.call(qn);return((ar=mr==null?void 0:mr.type)==null?void 0:ar.indexOf("image"))>-1||!(mr!=null&&mr.type)?mr!=null&&mr.align||mr!=null&&mr.width?Ge.replaceSelection(`<p style="text-align:${mr.align||"initial"}"><img width="${mr.width?mr.width+"%":"initial"}" src="${Ui}" alt="${vr||""}" /></p>`):Ge.replaceSelection(`<img width="100%" src="${Ui}" alt="${vr||""}" />`):((Oi=mr==null?void 0:mr.type)==null?void 0:Oi.indexOf("video"))>-1?Ge.replaceSelection(`<video width="100%" controls src="${Ui}"></video>`):((ur=mr==null?void 0:mr.type)==null?void 0:ur.indexOf("pdf"))>-1?Ge.replaceSelection(`<a href="${Ui}?type=${mr.type}&disposition=inline" target="_blank">${mr.name}</a>`):Si.includes(_r)?Ge.replaceSelection(`<a href="${Ui}?type=office&disposition=inline" target="_blank">${mr.name}</a>`):Ge.replaceSelection(`[${mr.name}](${Ui})`),Ge.focus();case Ei:const{row:Yr,col:Pr,align:oo}=hi;let va=`
|
|
`;for(let wo=0;wo<Yr;wo++){let ha=[],da=[];for(let Ji=0;Ji<Pr;Ji++)wo===1&&da.push(Gi[oo]),ha.push(" ");wo===1&&(va+=`| ${da.join(" | ")} |
|
|
`),va+=`| ${ha.join(Pr===1?"":" | ")} |
|
|
`}return Ge.replaceSelection(va+`
|
|
`),Ge.focus();default:throw new Error}},[Ge,Fi]),Nn=(0,Ft.useMemo)(()=>{switch(Fi){case Bn:return Ft.createElement(We,{callback:At,onCancel:Hn});case Xn:return Ft.createElement(Pn.Z,{callback:At,onCancel:Hn});case le:return Ft.createElement(ke.Z,{callback:At,onCancel:Hn});case An:return Ft.createElement(Te,{callback:At,onCancel:Hn});case Ei:return Ft.createElement(be,{callback:At,onCancel:Hn});case"maths-latex":return Ft.createElement(xe,{showSaveButton:!0,callback:At});case"inline-latex":return Ft.createElement(Ne.Z,{showSaveButton:!0,callback:At});default:return null}},[Fi]);function Hn(){Wi("")}(0,Ft.useEffect)(()=>{if(rr.current){let hi=function(Oi){Ci=!0,ar=Oi.pageY},bn=function(){Ci=!1},Ke=function(Oi){if(Ci){let ur=Oi.pageY-ar;ur<0&&(ur=0),ur>300&&(ur=300);let sr=Wn+ur+"px";hr(sr)}},qn=rr.current,Ci=!1,ar=0;return qn.addEventListener("mousedown",hi),document.addEventListener("mousemove",Ke),document.addEventListener("mouseup",bn),()=>{qn.removeEventListener("mousedown",hi),document.removeEventListener("mousemove",Ke),document.removeEventListener("mouseup",bn)}}},[Ge,rr]),(0,Ft.useEffect)(()=>{hr(Wn)},[Wn]);const gi=on(ge),ci=on(or),ti={width:gi,height:ci},sn=(0,Ft.useMemo)(()=>{if(Vi){let hi=new Date(Vi),bn=hi.getHours(),Ke=hi.getMinutes(),qn=hi.getSeconds();return bn=bn<10?"0"+bn:bn,Ke=Ke<10?"0"+Ke:Ke,qn=qn<10?"0"+qn:qn,`${bn}:${Ke}:${qn}`}return 0},[Vi]),Dn=hi=>{const bn=[];if(Mn){let Ke=-1;hi=hi.replace(/(@▁▁@|@▁@)/g,function(qn,Ci,ar){bn.push({multiLine:qn!==Pt})})}return bn};function Gn(){window.sessionStorage.removeItem(ki),nr(!1),pr(0)}function Ln(){nr(!1),pr(0),Ge.setValue(window.sessionStorage.getItem(ki))}(0,Ft.useEffect)(()=>{Di[Fi]&&Fi!==Kn&&Fi!==An&&setTimeout(()=>{const hi=document.getElementsByClassName("markdown-popup-form")[0],bn=window.innerWidth/2-hi.offsetWidth/2,Ke=window.innerHeight/2-hi.offsetHeight/2;xi(bn),fr(Ke)},0)},[Fi]);const Zn=hi=>{hi.preventDefault();const bn=hi.clientX-qe,Ke=hi.clientY-ir;document.body.onmousemove=qn=>{let Ci=qn.clientX-bn,ar=qn.clientY-Ke;const Oi=document.getElementsByClassName("markdown-popup-form")[0],ur=window.innerWidth-Oi.offsetWidth,sr=window.innerHeight-Oi.offsetHeight;Ci=Math.max(0,Math.min(Ci,ur)),ar=Math.max(0,Math.min(ar,sr)),Mi(qn.clientX,qn.clientY,bn,Ke)&&(xi(Ci),fr(ar))},document.body.onmouseup=function(){document.body.onmousemove=null}},Mi=(hi,bn,Ke,qn)=>{const Ci=document.body.clientHeight,ar=document.body.clientWidth;return hi<20&&Ke>hi||hi>ar-20&&Ke<hi||bn<20&&qn>bn||bn>Ci-20&&qn<bn?(document.body.onmousemove=null,document.body.onmouseup=null,!1):!0};return Ft.createElement(Ft.Fragment,null,Ft.createElement("div",{className:"markdown-editor-wrapper",ref:kr},Ft.createElement("div",{className:`markdown-editor-container ${ei} ${Ue?"on-preview":""} ${ai?"mini":""} ${vi?"full-screen":""}`,style:ti},Ft.createElement(te,{insertTemp:jn,watch:Ue,fullScreen:vi,showNullButton:fe,showNullProgramButton:Mn,onActionCallback:Me,hidetoolBar:zn,extraUse:bi}),Ft.createElement("div",{className:"markdown-editor-body"},Ft.createElement("div",{className:"codemirror-container"},Ft.createElement("textarea",{ref:Br,placeholder:Ni})),Ue?Ft.createElement("div",{ref:Kr,className:"preview-container"},ii==="stex"&&Ft.createElement(Qt,{value:dr}),ii!=="stex"&&Ft.createElement(Qe.Z,{disabledFill:Yn,showProgramFill:Mn,value:dr})):null))),Ri?Ft.createElement("a",{ref:rr,className:"editor-resize"}):null,Fi===Kn&&Ft.createElement(an,{callback:At,onCancel:Hn}),Fi===An&&Ft.createElement(Te,{callback:At,onCancel:Hn}),Ft.createElement(_t.Z,null,Di[Fi]&&Fi!==Kn&&Fi!==An?Ft.createElement(tn.default,{maskClosable:!1,centered:!0,style:{position:"absolute",left:qe,top:ir},title:Ft.createElement("div",{style:{cursor:"move"},onMouseDown:Zn},Di[Fi]),open:!0,onCancel:Hn,footer:null,destroyOnClose:!0,width:Fi===An?"1200px":null,height:Fi===An?"80vh":null,className:"markdown-popup-form"},Nn):null))}},17077:function(Tn,oi,Dt){"use strict";Dt.d(oi,{Z:function(){return Ot},I:function(){return te}});var Ft=Dt(28284),se=Dt(6767),ye=Dt(37568),Be=Dt(77736),Se=Dt(71051),Rt=Dt(47889),ie=Dt(99571),je=Dt(46699),ce=Dt(59301),Vt=Dt(59301),Qe=Object.defineProperty,Qt=Object.defineProperties,Je=Object.getOwnPropertyDescriptors,Nt=Object.getOwnPropertySymbols,nt=Object.prototype.hasOwnProperty,et=Object.prototype.propertyIsEnumerable,ct=(_t,Xt,ve)=>Xt in _t?Qe(_t,Xt,{enumerable:!0,configurable:!0,writable:!0,value:ve}):_t[Xt]=ve,lt=(_t,Xt)=>{for(var ve in Xt||(Xt={}))nt.call(Xt,ve)&&ct(_t,ve,Xt[ve]);if(Nt)for(var ve of Nt(Xt))et.call(Xt,ve)&&ct(_t,ve,Xt[ve]);return _t},pt=(_t,Xt)=>Qt(_t,Je(Xt));const{useForm:vt}=Ft.default,xt={width:280,marginRight:10},Lt={labelCol:{span:5},wrapperCol:{span:19}};var Ot=({callback:_t,onCancel:Xt})=>{const[ve]=vt();let oe=(0,ce.useRef)();function Re(Rn){oe.current.width=ve.getFieldValue("width"),oe.current.align=ve.getFieldValue("align"),_t(Rn,oe.current)}function Ye(Rn,wn){if(Rn.status===-1){se.ZP.error(Rn.message);return}ve.setFieldsValue({src:`/api/attachments/${Rn.id}`,type:wn.type})}function en(Rn){let wn=Rn.target.files[0];oe.current=wn,te(wn,Ye)}return Vt.createElement(Ft.default,pt(lt({form:ve},Lt),{className:"upload-image-panel",onFinish:Re,style:{width:470,overflow:"hidden"}}),Vt.createElement(Ft.default.Item,{label:"\u56FE\u7247\u5730\u5740",required:!0},Vt.createElement("div",{className:"flex-container"},Vt.createElement(Ft.default.Item,{noStyle:!0,name:"src",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u56FE\u7247\u5730\u5740"}]},Vt.createElement(ye.default,{style:xt})),Vt.createElement(Ht,{onFileChange:en}))),Vt.createElement(Ft.default.Item,{label:"\u56FE\u7247\u63CF\u8FF0",name:"alt"},Vt.createElement(ye.default,{style:{width:264}})),Vt.createElement(Ft.default.Item,{label:"\u56FE\u7247\u5BBD\u5EA6",name:"width"},Vt.createElement(Be.Z,null,Vt.createElement(Ft.default.Item,{name:"width",style:{margin:0}},Vt.createElement(Se.Z,{style:{width:264}})),Vt.createElement("span",{className:"ml8"},"%"))),Vt.createElement(Ft.default.Item,{label:"\u5BF9\u9F50\u65B9\u5F0F",name:"align"},Vt.createElement(Rt.ZP.Group,{name:"align",defaultValue:1,options:[{value:"left",label:"\u5DE6\u5BF9\u9F50"},{value:"center",label:"\u5C45\u4E2D\u5BF9\u9F50"},{value:"right",label:"\u53F3\u5BF9\u9F50"}]})),Vt.createElement("aside",null,Vt.createElement(Ft.default.Item,{style:{textAlign:"right",position:"relative",right:-98}},Vt.createElement(ie.ZP,{type:"primary",htmlType:"submit",style:{marginRight:10}},"\u786E\u5B9A"),Vt.createElement(ie.ZP,{type:"default",onClick:Xt},"\u53D6\u6D88"))))};function Ht({onFileChange:_t}){return Vt.createElement("label",{className:"upload-button",style:{cursor:"pointer"}},"\u672C\u5730\u4E0A\u4F20",Vt.createElement("input",{type:"file",onChange:_t}))}function te(_t,Xt){if(!_t)throw new String("\u6CA1\u6709\u6587\u4EF6");let ve=new FormData;ve.append("editormd-image-file",_t),ve.append("file_param_name","editormd-image-file"),ve.append("byxhr","true");var oe=new window.XMLHttpRequest;oe.withCredentials=!0,oe.addEventListener("load",function(Re){Xt(JSON.parse(Re.target.responseText),_t)},!1),oe.addEventListener("error",function(Re){console.error(Re)},!1),oe.open("POST",`${je.KI}/api/attachments.json`),oe.send(ve)}},91558:function(Tn,oi,Dt){"use strict";Dt.d(oi,{Z:function(){return ye}});var Ft=Dt(59301),se=Dt(4676);class ye extends Ft.Component{constructor(Se){super(Se);const Rt=window.document;this.node=Rt.createElement("div"),Rt.body.appendChild(this.node)}render(){const{children:Se}=this.props;return(0,se.createPortal)(Se,this.node)}componentWillUnmount(){window.document.body.removeChild(this.node)}}},75975:function(Tn,oi,Dt){"use strict";Dt.d(oi,{SV:function(){return Oe},ZP:function(){return Ut}});var Ft=Dt(59301),se=Dt(76374);const ye={keywords:["print","auto","break","case","char","const","continue","default","do","double","else","enum","extern","float","for","goto","if","int","long","register","return","short","signed","sizeof","static","struct","switch","typedef","union","unsigned","void","volatile","while"]},Be={quickKey:[{label:"main",content:["public static void main(String[] args) {"," $0","}"].join(`
|
|
`)},{label:"System.out.println",content:["System.out.println($0)"].join(`
|
|
`)},{label:"System.out.print",content:["System.out.print($0)"].join(`
|
|
`)}],keywords:["abstract","continue","for","new","switch","assert","default","goto","package","synchronized","boolean","do","if","private","this","break","double","implements","protected","throw","byte","else","import","public","throws","case","enum","instanceof","return","transient","catch","extends","int","short","try","char","final","interface","static","void","class","finally","long","strictfp","volatile","const","float","native","super","while","true","false"]},Se={keywords:["abstract","amp","array","auto","bool","break","case","catch","char","class","const","constexpr","const_cast","continue","cpu","decltype","default","delegate","delete","do","double","dynamic_cast","each","else","enum","event","explicit","export","extern","false","final","finally","float","friend","gcnew","generic","goto","in","initonly","inline","int","interface","interior_ptr","internal","literal","long","mutable","namespace","new","noexcept","nullptr","__nullptr","operator","override","partial","pascal","pin_ptr","private","property","protected","public","ref","register","reinterpret_cast","restrict","return","safe_cast","sealed","short","signed","sizeof","static","static_assert","static_cast","struct","switch","template","this","thread_local","throw","tile_static","true","try","typedef","typeid","typename","union","unsigned","using","virtual","void","volatile","wchar_t","where","while","_asm","_based","_cdecl","_declspec","_fastcall","_if_exists","_if_not_exists","_inline","_multiple_inheritance","_pascal","_single_inheritance","_stdcall","_virtual_inheritance","_w64","__abstract","__alignof","__asm","__assume","__based","__box","__builtin_alignof","__cdecl","__clrcall","__declspec","__delegate","__event","__except","__fastcall","__finally","__forceinline","__gc","__hook","__identifier","__if_exists","__if_not_exists","__inline","__int128","__int16","__int32","__int64","__int8","__interface","__leave","__m128","__m128d","__m128i","__m256","__m256d","__m256i","__m64","__multiple_inheritance","__newslot","__nogc","__noop","__nounwind","__novtordisp","__pascal","__pin","__pragma","__property","__ptr32","__ptr64","__raise","__restrict","__resume","__sealed","__single_inheritance","__stdcall","__super","__thiscall","__try","__try_cast","__typeof","__unaligned","__unhook","__uuidof","__value","__virtual_inheritance","__w64","__wchar_t"],operators:["=",">","<","!","~","?",":","==","<=",">=","!=","&&","||","++","--","+","-","*","/","&","|","^","%","<<",">>",">>>","+=","-=","*=","/=","&=","|=","^=","%=","<<=",">>=",">>>="],quickKey:[{label:"ifelse",content:["if (${1:condition}) {"," $0","} else {"," ","}"].join(`
|
|
`)},{label:"include",content:"include<$0>"},{label:"printf",content:"printf($0)"},{label:"system",content:'system("$0")'},{label:"main",content:["int main () {"," $0","}"].join(`
|
|
`)},{label:"if",content:["if () {"," $0","}"].join(`
|
|
`)},{label:"for",content:["for(int j=0 ; j<10; j++){"," $0","}"].join(`
|
|
`)},{label:"trycatch",content:["try{"," $0","}catch(ExceptionName e){","}"].join(`
|
|
`)},{label:"using namespace std;",content:["using namespace std;"].join(`
|
|
`)},{label:"include <iostream>",content:["#include <iostream>"].join(`
|
|
`)},{label:"include <vector>",content:["#include <vector>"].join(`
|
|
`)},{label:"include <cstdio>",content:["#include <cstdio>"].join(`
|
|
`)},{label:"include <cstring>",content:["#include <cstring>"].join(`
|
|
`)},{label:"include <sstream>",content:["#include <sstream>"].join(`
|
|
`)},{label:"include <fstream>",content:["#include <fstream>"].join(`
|
|
`)},{label:"include <map>",content:["#include <map>"].join(`
|
|
`)},{label:"include <string>",content:["#include <string>"].join(`
|
|
`)},{label:"include <cmath>",content:["#include <cmath>"].join(`
|
|
`)}]},Rt={keywords:["and","as","assert","break","class","continue","def","del","elif","else","except","exec","finally","for","from","global","if","import","in","is","lambda","None","not","or","pass","raise","return","self","try","while","with","yield","int","float","long","complex","hex","abs","all","any","apply","basestring","bin","bool","buffer","bytearray","callable","chr","classmethod","cmp","coerce","compile","complex","delattr","dict","dir","divmod","enumerate","eval","execfile","file","filter","format","frozenset","getattr","globals","hasattr","hash","help","id","input","intern","isinstance","issubclass","iter","len","locals","list","map","max","memoryview","min","next","object","oct","open","ord","pow","print","property","reversed","range","raw_input","reduce","reload","repr","reversed","round","set","setattr","slice","sorted","staticmethod","str","sum","super","tuple","type","unichr","unicode","vars","xrange","zip","True","False","__dict__","__methods__","__members__","__class__","__bases__","__name__","__mro__","__subclasses__","__init__","__import__"],quickKey:[{label:"print",content:["print($0)"].join(`
|
|
`)}]},ie={keywords:["asInstanceOf","catch","class","classOf","def","do","else","extends","finally","for","foreach","forSome","if","import","isInstanceOf","macro","match","new","object","package","return","throw","trait","try","type","until","val","var","while","with","yield","given","enum","then"],quickKey:[{label:"println",content:["println($0)"].join(`
|
|
`)}]};var je=Dt(53184),ce=Dt.n(je),Vt=Object.defineProperty,Qe=Object.defineProperties,Qt=Object.getOwnPropertyDescriptors,Je=Object.getOwnPropertySymbols,Nt=Object.prototype.hasOwnProperty,nt=Object.prototype.propertyIsEnumerable,et=(Te,_e,ee)=>_e in Te?Vt(Te,_e,{enumerable:!0,configurable:!0,writable:!0,value:ee}):Te[_e]=ee,ct=(Te,_e)=>{for(var ee in _e||(_e={}))Nt.call(_e,ee)&&et(Te,ee,_e[ee]);if(Je)for(var ee of Je(_e))nt.call(_e,ee)&&et(Te,ee,_e[ee]);return Te},lt=(Te,_e)=>Qe(Te,Qt(_e)),pt=(Te,_e,ee)=>new Promise((de,pe)=>{var be=He=>{try{rn(ee.next(He))}catch(yn){pe(yn)}},ze=He=>{try{rn(ee.throw(He))}catch(yn){pe(yn)}},rn=He=>He.done?de(He.value):Promise.resolve(He.value).then(be,ze);rn((ee=ee.apply(Te,_e)).next())});const vt={languages:["c","abap","apex","azcli","bat","cameligo","clojure","coffee","cpp","csharp","csp","css","dockerfile","fsharp","go","graphql","handlebars","html","ini","java","javascript","json","kotlin","less","lua","markdown","mips","msdax","mysql","objective-c","pascal","pascaligo","perl","pgsql","php","postiats","powerquery","powershell","pug","python","r","razor","redis","redshift","restructuredtext","ruby","rust","sb","scheme","scss","shell","solidity","sophia","sql","st","swift","tcl","twig","vb","xml","yaml'"],tables:{users:["name","id","email","phone","password"],roles:["id","name","order","created_at","updated_at","deleted_at"]}},xt=(Te,_e)=>_e.map(ee=>({label:ee,kind:Te.languages.CompletionItemKind.Keyword,insertText:ee})),Lt=Te=>Object.keys(vt.tables).map(_e=>({label:_e,kind:Te.languages.CompletionItemKind.Variable,insertText:_e})),Ot=(Te,_e)=>{const ee=vt.tables[Te];return ee?ee.map(de=>({label:de,kind:_e.languages.CompletionItemKind.Field,insertText:de})):[]};function Ht(Te,_e,ee,de,pe){let be=_e.getWordUntilPosition(ee),ze={startLineNumber:ee.lineNumber,endLineNumber:ee.lineNumber,startColumn:be.startColumn,endColumn:be.endColumn},rn=de.map(He=>({label:He,kind:Te.languages.CompletionItemKind.Keyword,insertText:He,insertTextRules:Te.languages.CompletionItemInsertTextRule.InsertAsSnippet,range:ze}));return pe.map(He=>{rn.push(lt(ct({},He),{range:ze}))}),rn}var te=Te=>{vt.languages.map(pe=>(Te.languages.registerDocumentFormattingEditProvider(pe,{provideDocumentFormattingEdits(be,ze,rn){return pt(this,null,function*(){const He=ce()(be.getValue(),{indent_size:"2",indent_char:" ",max_preserve_newlines:"2",preserve_newlines:!0,keep_array_indentation:!0,break_chained_methods:!1,indent_scripts:"normal",brace_style:"collapse",space_before_conditional:!0,unescape_strings:!1,jslint_happy:!1,end_with_newline:!0,wrap_line_length:"0",indent_inner_html:!1,comma_first:!1,e4x:!1,indent_empty_lines:!1});return[{range:be.getFullModelRange(),text:He}]})}}),pe));const _e=Se.quickKey.map(pe=>({label:pe.label,kind:Te.languages.CompletionItemKind.Method,insertText:pe.content,insertTextRules:Te.languages.CompletionItemInsertTextRule.InsertAsSnippet})),ee=Rt.quickKey.map(pe=>({label:pe.label,kind:Te.languages.CompletionItemKind.Method,insertText:pe.content,insertTextRules:Te.languages.CompletionItemInsertTextRule.InsertAsSnippet})),de=Be.quickKey.map(pe=>({label:pe.label,kind:Te.languages.CompletionItemKind.Method,insertText:pe.content,insertTextRules:Te.languages.CompletionItemInsertTextRule.InsertAsSnippet}));Te.languages.registerCompletionItemProvider("cpp",{provideCompletionItems:function(pe,be){var ze=pe.getWordUntilPosition(be),rn={startLineNumber:be.lineNumber,endLineNumber:be.lineNumber,startColumn:ze.startColumn,endColumn:ze.endColumn},He=pe.getLineContent(be.lineNumber).substring(ze.startColumn-2,ze.endColumn);return{suggestions:[...Se.keywords.map(yn=>({label:yn,kind:Te.languages.CompletionItemKind.Function,documentation:yn,insertText:yn,insertTextRules:Te.languages.CompletionItemInsertTextRule.InsertAsSnippet,range:rn})),...Se.quickKey.map(yn=>({label:yn.label,kind:Te.languages.CompletionItemKind.Function,documentation:yn.content,insertText:He.startsWith("#")?yn.content.replace(/#/,""):yn.content,insertTextRules:Te.languages.CompletionItemInsertTextRule.InsertAsSnippet,range:rn}))]}}}),Te.languages.registerCompletionItemProvider("c",{provideCompletionItems:function(pe,be){var ze=pe.getWordUntilPosition(be),rn={startLineNumber:be.lineNumber,endLineNumber:be.lineNumber,startColumn:ze.startColumn,endColumn:ze.endColumn};return{suggestions:[...ye.keywords.map(He=>({label:He,kind:Te.languages.CompletionItemKind.Function,documentation:He,insertText:He,insertTextRules:Te.languages.CompletionItemInsertTextRule.InsertAsSnippet,range:rn}))]}}}),Te.languages.registerCompletionItemProvider("java",{provideCompletionItems:function(pe,be){var ze=pe.getWordUntilPosition(be),rn={startLineNumber:be.lineNumber,endLineNumber:be.lineNumber,startColumn:ze.startColumn,endColumn:ze.endColumn},He=pe.getLineContent(be.lineNumber).substring(ze.startColumn-2,ze.endColumn);return{suggestions:[...Be.keywords.map(yn=>({label:yn,kind:Te.languages.CompletionItemKind.Function,documentation:yn,insertText:yn,insertTextRules:Te.languages.CompletionItemInsertTextRule.InsertAsSnippet,range:rn})),...Be.quickKey.map(yn=>({label:yn.label,kind:Te.languages.CompletionItemKind.Function,documentation:yn.content,insertText:He.startsWith("#")?yn.content.replace(/#/,""):yn.content,insertTextRules:Te.languages.CompletionItemInsertTextRule.InsertAsSnippet,range:rn}))]}}}),Te.languages.registerCompletionItemProvider("scala",{provideCompletionItems:function(pe,be){var ze=pe.getWordUntilPosition(be),rn={startLineNumber:be.lineNumber,endLineNumber:be.lineNumber,startColumn:ze.startColumn,endColumn:ze.endColumn},He=pe.getLineContent(be.lineNumber).substring(ze.startColumn-2,ze.endColumn);return{suggestions:[...ie.keywords.map(yn=>({label:yn,kind:Te.languages.CompletionItemKind.Function,documentation:yn,insertText:yn,insertTextRules:Te.languages.CompletionItemInsertTextRule.InsertAsSnippet,range:rn})),...ie.quickKey.map(yn=>({label:yn.label,kind:Te.languages.CompletionItemKind.Function,documentation:yn.content,insertText:He.startsWith("#")?yn.content.replace(/#/,""):yn.content,insertTextRules:Te.languages.CompletionItemInsertTextRule.InsertAsSnippet,range:rn}))]}}}),Te.languages.registerCompletionItemProvider("python",{provideCompletionItems:function(pe,be){var ze=pe.getWordUntilPosition(be),rn={startLineNumber:be.lineNumber,endLineNumber:be.lineNumber,startColumn:ze.startColumn,endColumn:ze.endColumn},He=pe.getLineContent(be.lineNumber).substring(ze.startColumn-2,ze.endColumn);return{suggestions:[...Rt.keywords.map(yn=>({label:yn,kind:Te.languages.CompletionItemKind.Function,documentation:yn,insertText:yn,insertTextRules:Te.languages.CompletionItemInsertTextRule.InsertAsSnippet,range:rn})),...Rt.quickKey.map(yn=>({label:yn.label,kind:Te.languages.CompletionItemKind.Function,documentation:yn.content,insertText:He.startsWith("#")?yn.content.replace(/#/,""):yn.content,insertTextRules:Te.languages.CompletionItemInsertTextRule.InsertAsSnippet,range:rn}))]}}})};const _t="\u8BE5\u4EFB\u52A1\u5173\u5361\u8BBE\u7F6E\u4E86\u7981\u6B62\u590D\u5236\u7C98\u8D34\uFF0C\u8BF7\u624B\u52A8\u8F93\u5165\u4EE3\u7801\u3002";var Xt=Object.defineProperty,ve=(Te,_e,ee)=>_e in Te?Xt(Te,_e,{enumerable:!0,configurable:!0,writable:!0,value:ee}):Te[_e]=ee,oe=(Te,_e,ee)=>ve(Te,typeof _e!="symbol"?_e+"":_e,ee);const Re=class px{constructor(_e,ee,de){this.placeholder=_e,this.editor=ee,this.monaco=de,ee.onDidChangeModelContent(()=>this.onDidChangeModelContent()),this.onDidChangeModelContent()}onDidChangeModelContent(){this.editor.getValue()===""?this.editor.addContentWidget(this):this.editor.removeContentWidget(this)}getId(){return px.ID}getDomNode(){return this.domNode||(this.domNode=document.createElement("div"),this.domNode.style.width="max-content",this.domNode.textContent=this.placeholder,this.domNode.style.fontStyle="initial",this.domNode.style.color="#D7D7D7",this.domNode.style.pointerEvents="none",this.editor.applyFontInfo(this.domNode)),this.domNode}getPosition(){return{position:{lineNumber:1,column:1},preference:[this.monaco.editor.ContentWidgetPositionPreference.EXACT]}}dispose(){this.editor.removeContentWidget(this)}};oe(Re,"ID","editor.widget.placeholderHint");var en=Re,Rn=Dt(96236),wn=Dt(6767),un=Dt(25399),vn=Dt(89392),ne=Dt(49535),jt=Dt(56102),Fe=Object.defineProperty,We=Object.defineProperties,Pn=Object.getOwnPropertyDescriptors,ke=Object.getOwnPropertySymbols,tn=Object.prototype.hasOwnProperty,fn=Object.prototype.propertyIsEnumerable,Jn=(Te,_e,ee)=>_e in Te?Fe(Te,_e,{enumerable:!0,configurable:!0,writable:!0,value:ee}):Te[_e]=ee,Pe=(Te,_e)=>{for(var ee in _e||(_e={}))tn.call(_e,ee)&&Jn(Te,ee,_e[ee]);if(ke)for(var ee of ke(_e))fn.call(_e,ee)&&Jn(Te,ee,_e[ee]);return Te},an=(Te,_e)=>We(Te,Pn(_e)),re=(Te,_e)=>{var ee={};for(var de in Te)tn.call(Te,de)&&_e.indexOf(de)<0&&(ee[de]=Te[de]);if(Te!=null&&ke)for(var de of ke(Te))_e.indexOf(de)<0&&fn.call(Te,de)&&(ee[de]=Te[de]);return ee},hn=(Te,_e,ee)=>new Promise((de,pe)=>{var be=He=>{try{rn(ee.next(He))}catch(yn){pe(yn)}},ze=He=>{try{rn(ee.throw(He))}catch(yn){pe(yn)}},rn=He=>He.done?de(He.value):Promise.resolve(He.value).then(be,ze);rn((ee=ee.apply(Te,_e)).next())});function di(Te){return/^\d+$/.test(Te)?`${Te}px`:Te}function Tt(){}let Et=!1;const St={"Python3.6":"python","Python2.7":"python",Dynamips:"cpp",Java:"java",Web:"php",Html:"html",Hive:"sql",Hadoop:"java",SDL:"cpp",PHP:"php",Matlab:"python",Git:"python",Python:"python","C/C++":"cpp","C++":"cpp",C:"cpp",Ruby:"ruby",Shell:"shell",JavaScript:"javascript",Perl6:"perl",Kotlin:"kotlin",Elixir:"elixir",Android:"java",JavaWeb:"java",Go:"go",Spark:"sql",MachineLearning:"python",Verilog:"xml","Verilog/VNC":"xml",Docker:"dockerfile","C#":"csharp",SQLite3:"sql",Oracle:"sql",Vhdl:"vhdl",R:"r",Swift:"swift",SQLServer:"mysql",MySQL:"mysql",Mongo:"sql",PostgreSql:"pgsql",Hbase:"powershell",Sqoop:"sql",Nasm:"cpp",Kafka:"java",Flink:"java",Sml:"javascript",OpenGL:"cpp",Perl5:"perl",Orange:"python",Scala:"scale",solidity:"sol"};function Mt(Te=[]){let _e=Te;if(Array.isArray(Te)){for(let ee=0;ee<Te.length;ee++){let de=St[Te[ee]];if(de)return de}return _e[0]}return St[_e]||_e}let zt=null;const kt=()=>hn(void 0,null,function*(){try{yield navigator.clipboard.writeText(" "),console.log("\u5185\u5BB9\u5DF2\u81EA\u52A8\u590D\u5236\u5230\u526A\u8D34\u677F:")}catch(Te){console.error("\u81EA\u52A8\u590D\u5236\u5931\u8D25:",Te)}});var Ut=Te=>{var _e=Te,{width:ee="100%",height:de="100%",value:pe,language:be="javascript",style:ze={},options:rn={},overrideServices:He={},theme:yn="vs-dark",onEditBlur:xe,isCopy:Ne=!1,onSave:Ze,autoHeight:Bn=!1,forbidCopy:le=!1,onChange:An=Tt,editorDidMount:Kn=Tt,onFocus:yi=Tt,onBreakPoint:Xn=Tt,breakPointValue:Ei=[],filename:Yi="educoder.txt",errorLine:Gi,errorContent:Hi="",highlightLine:Ki,openBreakPoint:Qi=!1,placeholder:ji="",showMiniMap:Ai=!0}=_e,Zi=re(_e,["width","height","value","language","style","options","overrideServices","theme","onEditBlur","isCopy","onSave","autoHeight","forbidCopy","onChange","editorDidMount","onFocus","onBreakPoint","breakPointValue","filename","errorLine","errorContent","highlightLine","openBreakPoint","placeholder","showMiniMap"]);const Pt=(0,Ft.useRef)(),ni=(0,Ft.useRef)({}),Si=(0,Ft.useRef)(),on=(0,Ft.useRef)(),dn=(0,Ft.useRef)([]),pn=(0,Ft.useRef)(!1),_n=(0,Ft.useRef)(),Di=(0,Ft.useRef)(),Bi=(0,Ft.useRef)(!1),[me,we]=(0,Ft.useState)(!1);function ge(){let Sn;return Pt.current&&(Sn=new se.Z(Fn=>{for(let ei of Fn)(ei.target.offsetHeight>0||ei.target.offsetWidth>0)&&ni.current.instance.layout()}),Sn.observe(Pt.current)),Sn}function Wn(){wn.ZP.warning({content:decodeURIComponent(_t),key:"monaco-editor-tip"})}const ai=()=>{let Sn=ni.current.instance;if(pe!=null&&Sn&&me){const Fn=Sn.getModel();Fn&&pe!==Fn.getValue()&&(Et=!0,Fn.setValue(pe),Sn.layout(),Et=!1)}};(0,Ft.useEffect)(()=>{const Sn=ne.Z.subscribe("formatDocument",Fn=>{var ei;let On=ni.current.instance;(ei=On==null?void 0:On.getAction)==null||ei.call(On,"editor.action.formatDocument").run()});return window.updateMonacoValue=Fn=>{An(Fn)},Sn},[]),(0,Ft.useEffect)(()=>{var Sn;let Fn=ni.current.instance;on.current&&clearTimeout(on.current),on.current=setTimeout(()=>{ai()},500),pe&&(pe!=null&&pe.length)&&((Sn=Fn==null?void 0:Fn.updateOptions)==null||Sn.call(Fn,{lineNumbersMinChars:Math.max(Math.floor(Math.log10(pe.split(/\r\n|\r|\n/g).length))+3,5)}))},[pe,me,ni.current]),(0,Ft.useEffect)(()=>{if(Gi&&ni.current&&ni.current.instance){let Fn=ni.current.instance;Fn.changeViewZones(function(ei){var On=document.createElement("div");On.style.padding="10px 20px",On.style.width="calc(100% - 20px)",On.className="my-error-line-wrp",On.innerHTML=Hi,ei.addZone({afterLineNumber:Gi||11,heightInLines:3,domNode:On})});var Sn={domNode:null,getId:function(){return"my.overlay.widget"},getDomNode:function(){return this.domNode||(this.domNode=document.createElement("div"),this.domNode.innerHTML="",this.domNode.style.width="100%",this.domNode.style.padding="20px 100px",this.domNode.style.right="0px",this.domNode.style.top="50px",this.domNode.style.position="relative",this.domNode.style.color="#333"),this.domNode},getPosition:function(){return null}};Fn.addOverlayWidget(Sn),Fn.revealPositionInCenter({lineNumber:20,column:1})}},[Gi,ni.current,me]);const si=(Sn="",Fn)=>{if(!Sn||Sn.trim()==="")return!0;const On=ni.current.instance.getModel().getLineTokens(Fn);let Qn=!1;for(let Yn=0;Yn<2;Yn++)On.getStandardTokenType(Yn)===1&&(Qn=!0);return Qn};(0,Ft.useEffect)(()=>{var Sn;const Fn=(Sn=ni.current)==null?void 0:Sn.instance;if(Fn&&me&&le){const ei=Fn.onDidBlurEditorWidget(()=>{Bi.current=!1}),On=Fn.onDidFocusEditorText(()=>{Bi.current=!0});return()=>{ei.dispose(),On.dispose()}}},[ni.current,me,le]),(0,Ft.useEffect)(()=>{var Sn;if((Sn=ni.current)!=null&&Sn.instance&&me&&Qi){let Fn=ni.current.instance,ei=Fn.getModel();if(!ei)return;(()=>{var Vn;let vi=[],pi=[];const Fi=ei.getAllDecorations();for(let Vi of Fi)Vi.options.className==="highlighted-line"&&(vi.push((Vn=Vi==null?void 0:Vi.range)==null?void 0:Vn.startLineNumber),pi.push(Vi==null?void 0:Vi.id));if(Ki===vi[0])return;ei.deltaDecorations(pi,[]);const Wi=ei.getLineCount();Ki&&Ki<=Wi&&(Fn.deltaDecorations([],[{range:new zt.Range(Ki,1,Ki,ei.getLineMaxColumn(Ki)),options:{isWholeLine:!0,className:"highlighted-line"}}]),Fn.revealLineInCenter(Ki))})();const Qn=(Vn=!1)=>{var vi;let pi=[],Fi=[];const Wi=ei.getAllDecorations();for(let Vi of Wi)Vi.options.linesDecorationsClassName==="breakpoints-select"&&(pi.push((vi=Vi==null?void 0:Vi.range)==null?void 0:vi.startLineNumber),Fi.push(Vi==null?void 0:Vi.id));if(Vn)return{lines:pi,ids:Fi};Xn(pi)},Yn=Vn=>hn(void 0,null,function*(){let vi={range:new zt.Range(Vn,1,Vn,1),options:{isWholeLine:!1,linesDecorationsClassName:"breakpoints-select"}};yield ei.deltaDecorations([],[vi]),Qn()}),Ni=Vn=>hn(void 0,null,function*(){let vi=[];const pi=Fn.getLineDecorations(Vn);for(let Fi of pi)Fi.options.linesDecorationsClassName==="breakpoints-select"&&vi.push(Fi.id);yield ei.deltaDecorations(vi,[]),Qn()}),Pi=Vn=>{let vi=Fn.getLineDecorations(Vn);for(let pi of vi)if(pi.options.linesDecorationsClassName==="breakpoints-select")return!0;return!1};if(!(0,vn.isEqual)(Ei,Qn(!0).lines)){ei.deltaDecorations(Qn(!0).ids,[]);const Vn=Ei.map(vi=>({range:new zt.Range(vi,1,vi,1),options:{isWholeLine:!1,linesDecorationsClassName:"breakpoints-select"}}));ei.deltaDecorations([],Vn)}const bi=Fn.onDidChangeModelContent(Vn=>{let vi=Fn.getPosition();if(vi){let pi=vi.lineNumber;clearTimeout(Di.current),Di.current=setTimeout(()=>{si(ei.getLineContent(pi),pi)?Ni(pi):Pi(pi)?(Ni(pi),Yn(pi)):Qn()},100)}}),Ge=Fn.onMouseDown(Vn=>{var vi,pi,Fi;if(Vn.target.detail&&((Fi=(pi=(vi=Vn.target)==null?void 0:vi.element)==null?void 0:pi.className)!=null&&Fi.includes("line-numbers"))){let Wi=Vn.target.position.lineNumber;if(si(ei.getLineContent(Wi),Wi))return;Pi(Wi)?Ni(Wi):Yn(Wi)}}),Xi=Vn=>{let vi={range:new zt.Range(Vn,1,Vn,1),options:{isWholeLine:!1,linesDecorationsClassName:"breakpoints-fake"}};dn.current=Fn.deltaDecorations(dn.current,[vi])},dr=()=>{dn.current=Fn.deltaDecorations(dn.current,[])},br=Fn.onMouseMove(Vn=>{var vi,pi,Fi;if(dr(),Vn.target.detail&&((Fi=(pi=(vi=Vn.target)==null?void 0:vi.element)==null?void 0:pi.className)!=null&&Fi.includes("line-numbers"))){let Wi=Vn.target.position.lineNumber;if(si(ei.getLineContent(Wi),Wi))return;Xi(Wi)}}),Ue=Fn.onMouseLeave(()=>{dr()});return()=>{bi.dispose(),Ge.dispose(),br.dispose(),Ue.dispose()}}},[ni.current,me,Ei,Ki,Qi,be]),(0,Ft.useEffect)(()=>{var Sn;(Sn=ni.current)!=null&&Sn.instance&&Qi&&ni.current.instance.setPosition({lineNumber:0,column:0})},[Ki]);function ln(){let Sn=ni.current.instance;if(Sn){const Fn=Sn.getSelection(),ei=ni.current.pastePos||{},On=new zt.Range(ei.startLineNumber||Fn.endLineNumber,ei.startColumn||Fn.endColumn,ei.endLineNumber||Fn.endLineNumber,ei.endColumn||Fn.endColumn);setTimeout(()=>{Sn.executeEdits("",[{range:On,text:""}])},300)}}function jn(Sn){(window.navigator.platform.match("Mac")?Sn.metaKey:Sn.ctrlKey)&&Sn.keyCode==83&&(Sn.preventDefault(),Ze())}const ii=()=>{if(Bn&&ni.current.instance){const Sn=ni.current.instance.getContentHeight();De(Sn<de?de:Sn)}else De(de)};function ki(Sn){var Fn=document.createEvent("MouseEvents");Fn.initMouseEvent("click",!0,!1,window,0,0,0,0,0,!1,!1,!1,!1,0,null),Sn.dispatchEvent(Fn)}const Ri=Sn=>{if(!Bi.current)return;const{keyCode:Fn,ctrlKey:ei,metaKey:On,target:Qn,type:Yn}=Sn;return(Yn==="paste"||(Fn===67||Fn===86)&&(On||ei))&&Qn.nodeName==="TEXTAREA"&&(Wn(),Sn.preventDefault()),!1};function Gt(Sn,Fn){var ei=window.URL||window.webkitURL||window,On=new Blob([Fn]),Qn=document.createElementNS("http://www.w3.org/1999/xhtml","a");Qn.href=ei.createObjectURL(On),Qn.download=Sn,ki(Qn)}(0,Ft.useEffect)(()=>{ii()},[ii]),(0,Ft.useEffect)(()=>{Pt.current&&!me&&Promise.all([Dt.e(8909),Dt.e(6656)]).then(Dt.bind(Dt,71448)).then(Sn=>{try{zt=Sn,ni.current.instance=zt.editor.create(Pt.current,{value:pe,language:Mt(be),theme:yn,requireConfig:{"vs/nls":{availableLanguages:{"*":"zh-cn"}}},wordWrap:!0,autoIndent:!0,contextmenu:!0,formatOnType:!0,minimap:{enabled:Ai||!1}},He);const Fn=ni.current.instance;let Qn=[...Rn.BH._menuItems].find(bi=>bi[0]._debugName=="EditorContext")[1],Yn=["editor.action.clipboardCopyWithSyntaxHighlightingAction","editor.action.quickCommand","editor.action.clipboardCopyAction","editor.action.clipboardPasteAction","editor.action.clipboardCutAction"],Ni=(bi,Ge)=>{var Xi,dr;let br=bi._first;do Ge.includes((dr=(Xi=br.element)==null?void 0:Xi.command)==null?void 0:dr.id)&&bi._remove(br);while(br=br.next)};if(Kn(Fn,zt),setTimeout(()=>{ii(),ni.current.instance.addAction({id:"d123123",label:"Download File",contextMenuGroupId:"9_cutcopypaste",run:()=>{Gt(Yi||"educoder.txt",Fn.getValue())}})},500),ni.current.subscription=Fn.onDidChangeModelContent(bi=>{pn.current?clearTimeout(_n.current):(ii(),An(Fn.getValue(),bi)),_n.current=setTimeout(()=>{pn.current=!1},500)}),window.Monaco||te(zt,Mt(be)),le&&(Ni(Qn,Yn),Pt.current.classList.add("noCopyPaste"),window.removeEventListener("keydown",Ri),window.removeEventListener("paste",Ri),window.addEventListener("keydown",Ri),window.addEventListener("paste",Ri)),window.Monaco=zt,xe&&Fn.onDidBlurEditorWidget(()=>{xe(Fn.getValue())}),yi&&Fn.onDidFocusEditorText(()=>{le&&kt(),yi(Fn.getValue())}),le){kt();try{Fn.onDidPaste(bi=>{const Ge=Fn.getSelection(),Xi=ni.current.pastePos||{},dr=new zt.Range(Xi.startLineNumber||Ge.endLineNumber,Xi.startColumn||Ge.endColumn,Xi.endLineNumber||Ge.endLineNumber,Xi.endColumn||Ge.endColumn);Fn.executeEdits("",[{range:bi.range,text:""}])})}catch(bi){}}let Pi=ge();return ji&&typeof ji=="string"&&new en(ji,Fn,zt),we(!0),()=>{const bi=ni.current.instance;bi.dispose();const Ge=bi.getModel();Ge&&Ge.dispose(),ni.current.subscription&&ni.current.subscription.dispose(),Pi.unobserve(Pt.current)}}catch(Fn){}})},[]),(0,Ft.useEffect)(()=>{if(ni.current.instance&&me)return document.addEventListener("keydown",jn,!1),()=>{document.removeEventListener("keydown",jn)}},[Ze,me]),(0,Ft.useEffect)(()=>{let Sn=ni.current.instance;if(Sn&&me){let Fn=Mt(be);zt.editor.setModelLanguage(Sn.getModel(),Fn)}},[be,me]),(0,Ft.useEffect)(()=>{ni.current.instance&&me&&zt.editor.setTheme(yn)},[yn,me]),(0,Ft.useEffect)(()=>{let Sn=ni.current.instance;Si.current=rn,Sn&&me&&(Sn.updateOptions(Pe({},rn)),setTimeout(()=>{Sn.getModel().updateOptions(Pe({},rn))},200))},[JSON.stringify(rn),me]),(0,Ft.useEffect)(()=>{let Sn=ni.current.instance;Sn&&me&&Sn.layout()},[ee,de,me]);const[fe,Mn]=(0,Ft.useState)(di(ee)),[zn,De]=(0,Ft.useState)(di(de)),kn=an(Pe({},ze),{width:fe,height:zn,position:"relative"});return Ft.createElement("div",{className:"my-monaco-editor",ref:Pt,style:kn},Ne&&Ft.createElement(jt.CopyToClipboard,{text:pe,onCopy:()=>wn.ZP.success("\u590D\u5236\u6210\u529F")},Ft.createElement(un.Z,{title:"\u590D\u5236\u4EE3\u7801"},Ft.createElement("div",{style:{position:"absolute",top:0,right:10,cursor:"pointer",zIndex:10,color:"#165DFF"}},Ft.createElement("i",{className:"iconfont icon-fuzhi8",style:{fontSize:14}})," \u590D\u5236\u4EE3\u7801"))))};function Oe({width:Te="100%",height:_e="100%",original:ee,modified:de,language:pe,options:be={}}){const ze=(0,Ft.useRef)(),[rn,He]=(0,Ft.useState)(null);function yn(Bn){let le;return ze.current&&(le=new se.Z(An=>{for(let Kn of An)(Kn.target.offsetHeight>0||Kn.target.offsetWidth>0)&&Bn.layout()}),le.observe(ze.current)),le}(0,Ft.useEffect)(()=>(ze.current&&Promise.all([Dt.e(8909),Dt.e(9404)]).then(Dt.bind(Dt,2550)).then(Bn=>{zt=Bn;const le=zt.editor.createDiffEditor(ze.current,an(Pe({enableSplitViewResizing:!1,scrollBeyondLastLine:!1,roundedSelection:!1,renderIndicators:!1,useShadows:!1,horizontal:"hidden",lineNumbers:"off",wordWrap:"off",ignoreTrimWhitespace:!1,"semanticHighlighting.enabled":!0,followsCaret:!0,ignoreCharChanges:!0,minimap:{enabled:!1},readOnly:!0},be),{wordWrap:!0}));He(le);let An=yn(le);return()=>{le.dispose();const Kn=le.getModel();Kn&&Kn.dispose(),An.unobserve(ze.current)}}),()=>{window.removeEventListener("keydown",checkPaste),window.removeEventListener("paste",checkPaste)}),[]),(0,Ft.useEffect)(()=>{rn&&rn.setModel({original:zt.editor.createModel(ee,pe),modified:zt.editor.createModel(de,pe)})},[ee,de,pe,rn]);const xe=di(Te),Ne=di(_e),Ze={width:xe,height:Ne};return Ft.createElement("div",{className:"my-diff-editor",ref:ze,style:Ze})}},10661:function(Tn,oi,Dt){"use strict";Dt.d(oi,{Z:function(){return Qe}});var Ft={flex_box_center:"flex_box_center___AQ53o",flex_space_between:"flex_space_between___i2aIa",flex_box_vertical_center:"flex_box_vertical_center___sPEKB",flex_box_center_end:"flex_box_center_end___GhSSH",flex_box_column:"flex_box_column___R9_Hb",list:"list___jb2Ay",wrap:"wrap___VsQDr",lockWrap:"lockWrap___g1k1T",li:"li___IxCLC",cover:"cover___Mu8wr",img:"img___IpFLA",movebq:"movebq___mF7wt",bq:"bq___Bil0T",sign:"sign___DXJ4d",name:"name___l7FoJ",e:"e___pXQUG",unit:"unit___wCIFR",tags:"tags___w_Mil",tag1:"tag1___dxm7r",tag2:"tag2___llZkf"},se=Dt(29787),ye=Dt(25399),Be=Dt(92310),Se=Dt.n(Be),Rt=Dt(51257),ie=Dt(28426),je=Dt(48790),ce=Dt(59301),Qe=({className:Qt,dataSource:Je=[],col:Nt=4,right:nt,bottom:et=23,precision:ct=0,wrapWidth:lt=1200,trackEventItems:pt,loading:vt,onRemove:xt=()=>{},isCurrent:Lt=!0,showAlias:Ot=!1})=>{const Ht=Math.floor((lt-(Nt-1)*nt)/Nt),te=[{name:"\u63A8\u8350\u81EA\u5B66",ptimg:"/images/tjzx.png",swimg:"/images/sw_tjzx.png"},{name:"101\u8BA1\u5212",ptimg:"/images/jh.png",swimg:"/images/sw_jh.png"},{name:"\u56FD\u5BB6\u4E00\u6D41",ptimg:"/images/gjyl.png",swimg:"/images/sw_gjyl.png"},{name:"\u7701\u7EA7\u4E00\u6D41",ptimg:"/images/sjyl.png",swimg:"/images/sw_sjyl.png"},{name:"\u7CBE\u54C1\u8BFE\u7A0B",ptimg:"/images/jpkc.png",swimg:"/images/sw_jpkc.png"},{name:"\u519B\u961F\u4E00\u6D41",ptimg:"/images/jdyl.png",swimg:"/images/sw_jdyl.png"},{name:"\u65B0\u578B\u6559\u6750",ptimg:"/images/xxjc.png",swimg:"/images/sw_xxjc.png"}];return ce.createElement(se.Z,{spinning:vt},ce.createElement("div",{className:Se()(Ft.list,Qt)},!!(Je!=null&&Je.length)&&(Je==null?void 0:Je.map((_t,Xt)=>{var ve;const{name:oe,id:Re,identifier:Ye,featured:en,school_name:Rn,image_url:wn,excellent:un,is_plan:vn}=_t;return ce.createElement("div",{key:Re,className:Ft.wrap,style:{width:Ht,marginRight:(1+Xt)%Nt===0?0:nt+ct,marginBottom:et}},ce.createElement("a",{className:Ft.li,onClick:ne=>{ne.preventDefault(),ne.stopPropagation(),pt&&(0,Rt.L9)([pt]),(0,Rt.xg)(`/paths/${Ye}`)}},ce.createElement("div",{className:Ft.img},ce.createElement("img",{className:Ft.cover,src:`${wn}`}),Lt&&(0,je.bg)()&&(_t==null?void 0:_t.studying)&&ce.createElement("div",{className:`${Ft.movebq} user-path-items`,onClick:ne=>{ne.stopPropagation(),xt(_t)}},ce.createElement("i",{className:"iconfont icon-yichu1 mr5 c-red"}),ce.createElement("span",{className:"c-red"},"\u79FB\u9664")),(ve=_t==null?void 0:_t.subject_tags)==null?void 0:ve.map((ne,jt)=>{var Fe,We;if(jt===0){const ke=(Fe=te.find(tn=>tn.name==ne))==null?void 0:Fe.swimg;return ce.createElement("img",{className:Ft.sign,src:ke,style:{left:"-4px"}})}const Pn=(We=te.find(ke=>ke.name==ne))==null?void 0:We.ptimg;return ce.createElement("img",{className:Ft.sign,src:Pn,style:{left:`${48+52*(jt-1)+2*jt}px`}})}),ce.createElement("div",{style:{position:"absolute",top:"150px",left:"4px"}},(_t==null?void 0:_t.excellent)&&ce.createElement("div",{className:Ft.bq},"\u5F00\u653E\u8BFE\u7A0B"))),ce.createElement("div",{className:Ft.name},ce.createElement(ye.Z,{title:Ot&&(_t!=null&&_t.excellent_alias_name)?ce.createElement("span",null,`\u8BFE\u7A0B\u539F\u540D\uFF1A${oe}`,ce.createElement("br",null),ce.createElement("span",null,`\u8BFE\u7A0B\u522B\u540D\uFF1A${_t==null?void 0:_t.excellent_alias_name}`)):oe},ce.createElement("span",{className:Ft.e},Ot&&(_t==null?void 0:_t.excellent_alias_name)||oe))),ce.createElement(ye.Z,{title:`\u53D1\u5E03\u5355\u4F4D\uFF1A${Rn}`},ce.createElement("div",{className:Ft.unit},ce.createElement("i",{className:"iconfont icon-danwei1 font14 mr3"}),Rn)),ce.createElement("div",{className:Ft.tags},ce.createElement("div",null,ce.createElement(ye.Z,{placement:"bottom",title:"\u7AE0\u8282\u6570"},ce.createElement("span",null,ce.createElement("i",{className:"iconfont icon-zhangjie1 font14 mr3"}),ce.createElement("span",null,_t.stages_count))),ce.createElement(ye.Z,{placement:"bottom",title:"\u5B66\u4E60\u4EBA\u6570"},ce.createElement("span",null,ce.createElement("i",{className:"iconfont icon-chengyuan font14 mr3"}),ce.createElement("span",null,_t.members_count)))))))})),!Je.length&&ce.createElement(ie.Z,null)))}},9148:function(Tn,oi,Dt){"use strict";Dt.d(oi,{jL:function(){return Se},w9:function(){return Fe},QD:function(){return xe},cQ:function(){return wn.Z},op:function(){return pe},O5:function(){return Si},_b:function(){return Kn},t7:function(){return lt},Gi:function(){return Jn},YG:function(){return tn},qp:function(){return Qe},vr:function(){return Bn},qE:function(){return rn},Je:function(){return xt},wb:function(){return Rn},cq:function(){return Tt},tp:function(){return Nt}});var Ft=Dt(59301),se={flex_box_center:"flex_box_center___NeSU8",flex_space_between:"flex_space_between___ImTGl",flex_box_vertical_center:"flex_box_vertical_center___BtRd9",flex_box_center_end:"flex_box_center_end___qcLe3",flex_box_column:"flex_box_column___Ze_3q",banner:"banner___PoUBO",content:"content___XoDjy",btns:"btns___Pb35j"},ye="data:image/png;base64,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",Se=({dataSource:on=[],img:dn,imgWidth:pn=346,title:_n,sunTitle:Di,bannerExtraContent:Bi})=>Ft.createElement("div",{className:se.banner},Ft.createElement("div",{className:se.content},Ft.createElement("aside",null,Ft.createElement("p",null,Ft.createElement("b",null,_n),Ft.createElement("span",null,Di)),on.length>0&&Ft.createElement("div",{className:se.btns},on.map((me,we)=>Ft.createElement("div",{key:we,onClick:me.click},me.name,me.sign?Ft.createElement("img",{src:ye,width:39}):null))),Bi),dn&&Ft.createElement("img",{style:{marginTop:33,marginRight:38},src:dn,width:pn}))),Rt={flex_box_center:"flex_box_center___hG6RI",flex_space_between:"flex_space_between___ss3Fh",flex_box_vertical_center:"flex_box_vertical_center___K80p9",flex_box_center_end:"flex_box_center_end___qmXX3",flex_box_column:"flex_box_column___GFV8F",row:"row___aXJjm",title:"title___HUKL0",tagsWrap:"tagsWrap___XB2W3",action:"action___VdHb1",bar:"bar___t1kKC",tag:"tag___V7Eft",name:"name___Hk1Ip",num:"num___xQpcH",active:"active___XryTX",tagsBorderWrap:"tagsBorderWrap___OMxjs"},ie=Dt(92310),je=Dt.n(ie),ce=Dt(89392),Qe=({dataSource:on=[],value:dn,onChange:pn,onTitleChange:_n,className:Di,title:Bi,titleWidth:me=41,style:we={},fontColor:ge="#6A7283",showCount:Wn})=>{const[ai,si]=(0,Ft.useState)(0),[ln,jn]=(0,Ft.useState)(!1),ii=(0,Ft.useRef)(null),ki=(0,Ft.useRef)(null);return(0,Ft.useEffect)(()=>{var Ri;on.length!==0&&(((Ri=ii==null?void 0:ii.current)==null?void 0:Ri.clientHeight)>97?si(1):si(0)),on.length===0&&si(0),jn(!1)},[on]),Ft.createElement("div",{className:je()(Rt.row,Di),style:we},Ft.createElement("div",{onClick:(0,ce.throttle)(()=>_n==null?void 0:_n(),2e3),style:{width:me,marginTop:ln?12:4},className:`${Rt.title} ${_n?"current":""}`},Bi),Ft.createElement("div",{className:ln?`${Rt.tagsWrap} ${Rt.tagsBorderWrap}`:Rt.tagsWrap},Ft.createElement("div",{className:Rt.bar,ref:ki,style:ai>0?{height:ai===1?97:"auto",overflow:ai===1?"hidden":"auto",paddingRight:55}:{paddingRight:0}},Ft.createElement("div",{className:Rt.tag,ref:ii},on==null?void 0:on.map(Ri=>Ft.createElement("span",{onClick:()=>pn(Ri.id),key:Ri.id,style:{color:ge},className:dn===Ri.id?Rt.active:""},Ft.createElement("span",{title:Ri.name,className:Rt.name},Ri.name),!!Wn&&Ft.createElement("span",{className:Rt.num},Ri.count))))),!!ai&&Ft.createElement(Ft.Fragment,null,ai===1?Ft.createElement("div",{onClick:()=>{var Ri;si(2),((Ri=ii==null?void 0:ii.current)==null?void 0:Ri.clientHeight)>245?jn(!0):jn(!1)},className:Rt.action},"\u5C55\u5F00",Ft.createElement("i",{style:{transform:"translateY(1px) scale(0.6)"},className:"iconfont icon-zhankai4"})):Ft.createElement("div",{onClick:()=>{ki.current.scrollTop=0,si(1),jn(!1)},className:Rt.action},"\u6536\u8D77",Ft.createElement("i",{style:{transform:"translateY(0px) scale(0.6)"},className:"iconfont icon-shouqi3"})))))},Qt={flex_box_center:"flex_box_center___aK2n3",flex_space_between:"flex_space_between___HX0Oh",flex_box_vertical_center:"flex_box_vertical_center___LJOJr",flex_box_center_end:"flex_box_center_end___SCakF",flex_box_column:"flex_box_column___AYv4m",tabs:"tabs___GTqPV",active:"active___F26E8"},Nt=({dataSource:on=[],value:dn,onChange:pn,className:_n,style:Di={}})=>Ft.createElement("div",{style:Di,className:je()(Qt.tabs,_n)},on.map(Bi=>Ft.createElement("span",{onClick:()=>pn(Bi.id),className:dn===Bi.id?Qt.active:"",key:Bi.id},Bi.name))),nt={flex_box_center:"flex_box_center___yX6Oa",flex_space_between:"flex_space_between___t7oqF",flex_box_vertical_center:"flex_box_vertical_center___dEIHy",flex_box_center_end:"flex_box_center_end___taQDF",flex_box_column:"flex_box_column___xY_Lr",input:"input___PW2zI",dropdown:"dropdown___vSy8B",menu:"menu___NiyBu",text:"text___Grueu",b1:"b1___ZKryM",b2:"b2___aKyGa"},et=Dt(37568),lt=({dataSource:on=[],value:dn="",onChange:pn,onInputChange:_n=()=>{},className:Di,style:Bi={},placeholder:me,allowClear:we=!1})=>{var ge;const[Wn,ai]=(0,Ft.useState)(""),[si,ln]=(0,Ft.useState)("");(0,Ft.useEffect)(()=>{var ki;let Ri=dn;(ki=JSON.stringify(dn))!=null&&ki.includes("{")&&(ai(dn.id),Ri=dn.value||"");try{ln(decodeURIComponent(Ri||""))}catch(Gt){ln(decodeURIComponent(Ri||""))}},[dn]);const jn=()=>{pn(encodeURIComponent(si),Wn||null)},ii=ki=>{ki!==Wn&&(ai(ki),pn(encodeURIComponent(si),ki))};return Ft.createElement("div",{className:je()(nt.input,Di),style:Bi},!!on.length&&Ft.createElement("div",{className:nt.dropdown},Ft.createElement("div",{className:nt.text},(ge=on.find(ki=>ki.id===Wn))==null?void 0:ge.name,Ft.createElement("i",{className:"iconfont icon-zhankai4"}),Ft.createElement("b",{className:nt.b1}),Ft.createElement("b",{className:nt.b2})),Ft.createElement("div",{className:nt.menu},on.map((ki,Ri)=>Ft.createElement("div",{key:Ri,onClick:()=>ii(ki.id)},ki.name)))),Ft.createElement(et.default,{onPressEnter:jn,value:si,onChange:ki=>{ln(ki.target.value),_n(encodeURIComponent(ki.target.value),Wn||null)},bordered:!1,placeholder:me}),Ft.createElement("i",{onClick:jn,className:"iconfont icon-sousuo9 font14 pl10 current"}))},pt={flex_box_center:"flex_box_center___tol8o",flex_space_between:"flex_space_between___Z235C",flex_box_vertical_center:"flex_box_vertical_center___Wq1sZ",flex_box_center_end:"flex_box_center_end___LLxom",flex_box_column:"flex_box_column___DbMSN",quickPager:"quickPager___GM30J",disabled:"disabled___Ozc8I"},xt=({value:on,onChange:dn,className:pn,total:_n,pageSize:Di,style:Bi={}})=>{const me=on<2,we=on>=Math.ceil(_n/Di);return _n<=Di?Ft.createElement(Ft.Fragment,null):Ft.createElement("div",{className:je()(pt.quickPager,pn),style:Bi},Ft.createElement("div",{onClick:()=>{me||dn(on-1,"prev")},className:me?pt.disabled:""},"\u4E0A\u4E00\u9875"),Ft.createElement("div",{onClick:()=>{we||dn(on+1,"next")},className:we?pt.disabled:""},"\u4E0B\u4E00\u9875"))},Lt={flex_box_center:"flex_box_center___FO7TP",flex_space_between:"flex_space_between___LotYx",flex_box_vertical_center:"flex_box_vertical_center___bWdaw",flex_box_center_end:"flex_box_center_end___mVJ1o",flex_box_column:"flex_box_column___M83Mm",list:"list___oOsiS",wrap:"wrap___G6T7F",lockWrap:"lockWrap___Rl79E",li:"li___oZZ7l",cover:"cover___b2bYW",img:"img___IQX7w",sign:"sign___HkT6C",name:"name___SsJx8",e:"e___TMqq0",tags:"tags___bcjyo",rate:"rate___YACg7"},Ot=Dt(29787),Ht=Dt(25399),te=Dt(58018),_t=Dt(346),Xt=Dt(51257),ve=Dt(96908),oe=Dt(57177),Re=Dt(81378),Ye=Dt(28426),Rn=({className:on,dataSource:dn=[],col:pn=4,right:_n,bottom:Di=23,precision:Bi=0,wrapWidth:me=1200,trackEventItems:we,loading:ge})=>{const Wn=Math.floor((me-(pn-1)*_n)/pn);return Ft.createElement(Ot.Z,{spinning:ge},Ft.createElement("div",{className:je()(Lt.list,on)},!!dn.length&&dn.map((ai,si)=>{const{name:ln,id:jn,identifier:ii,power:ki,cover_image_id:Ri,pic:Gt}=ai;return Ft.createElement("div",{className:Lt.wrap,key:jn,style:{width:Wn,marginRight:(1+si)%pn===0?0:_n+Bi,marginBottom:Di}},Ft.createElement("a",{target:"_blank",href:`/shixuns/${ii}/challenges`,className:Lt.li,onClick:fe=>{fe.preventDefault(),we&&(0,Xt.L9)([we]),ki&&(0,Xt.xg)(`/shixuns/${ii}/challenges`)}},Ft.createElement("div",{className:Lt.img},Ft.createElement("img",{className:Lt.cover,src:`${Gt}`}),ai.is_jupyter&&Ft.createElement("img",{className:Lt.sign,src:ve}),ai.is_jupyter_lab&&Ft.createElement("img",{className:Lt.sign,src:oe}),ai.is_unity_3d&&Ft.createElement("img",{className:Lt.sign,src:Re})),Ft.createElement("div",{className:Lt.name},Ft.createElement(Ht.Z,{title:ln||"\u5B9E\u8DF5\u9879\u76EE\u540D\u79F0-\u672A\u586B\u5199"},Ft.createElement("span",{className:Lt.e},ln||"\u5B9E\u8DF5\u9879\u76EE\u540D\u79F0-\u672A\u586B\u5199"))),Ft.createElement("div",{className:Lt.tags},Ft.createElement(Ht.Z,{placement:"bottom",title:"\u5173\u5361\u6570"},Ft.createElement("span",null,Ft.createElement("i",{className:"iconfont icon-shixunguanqia font14 mr2"}),Ft.createElement("span",null,ai.challenges_count))),!!ai.myshixuns_count&&Ft.createElement(Ht.Z,{placement:"bottom",title:"\u5B66\u4E60\u4EBA\u6570"},Ft.createElement("span",null,Ft.createElement("i",{className:"iconfont icon-chengyuan font14 mr2"}),Ft.createElement("span",null,ai.myshixuns_count))),Ft.createElement(Ht.Z,{placement:"bottom",title:"\u96BE\u5EA6\u7B49\u7EA7"},Ft.createElement("span",null,Ft.createElement("span",null,ai.level))),Ft.createElement("div",{className:Lt.rate},Ft.createElement(te.Z,{allowHalf:!0,disabled:!0,defaultValue:ai.score_info}),Ft.createElement("span",null,"\xA0",ai.score_info?`${ai.score_info}\u5206`:"5\u5206")))),!ki&&Ft.createElement("div",{className:Lt.lockWrap},Ft.createElement("img",{src:`${_t.Z.IMG_SERVER}/images/educoder/icon/lockclose.svg`}),Ft.createElement("span",{className:"mt15 font16 c-white"},"\u5B9A\u5411\u5F00\u653E\u5185\u5BB9\uFF0C\u9700\u8981\u6388\u6743")))}),!dn.length&&Ft.createElement(Ye.Z,null)))},wn=Dt(10661),un={flex_box_center:"flex_box_center___eMcr7",flex_space_between:"flex_space_between___HcNca",flex_box_vertical_center:"flex_box_vertical_center___ZnvVN",flex_box_center_end:"flex_box_center_end___fdgDf",flex_box_column:"flex_box_column___SEKvd",list:"list___L1hmU",wrap:"wrap___pKgcW",lockWrap:"lockWrap___SMhkK",top:"top___udHSB",sign:"sign___uwRpq",name:"name___Fpf90",img:"img___AMLhL",text:"text___KiTb7",btns:"btns___i6IuZ",bottom:"bottom____k2sh"},vn="data:image/png;base64,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",ne=Dt(59301),Fe=({className:on,dataSource:dn=[],col:pn=4,right:_n,bottom:Di=23,precision:Bi=0,wrapWidth:me=1200,trackEventItems:we,loading:ge,handleVery:Wn=()=>!0})=>{const ai=Math.floor((me-(pn-1)*_n)/pn);return ne.createElement(Ot.Z,{spinning:ge},ne.createElement("div",{className:je()(un.list,on)},!!dn.length&&dn.map((si,ln)=>{const{subject_identifier:jn,id:ii,identifier:ki,power:Ri}=si,Gt=si.is_public!=0&&si.is_public;return ne.createElement("div",{className:un.wrap,key:ii,style:{width:ai,marginRight:(1+ln)%pn===0?0:_n+Bi,marginBottom:Di}},ne.createElement("a",{className:un.li,onClick:fe=>{fe.preventDefault(),Wn(si==null?void 0:si.first_category_url)&&(we&&(0,Xt.L9)([we]),(0,Xt.xg)(si.first_category_url))}},ne.createElement("div",{className:un.top},ne.createElement(Ht.Z,{title:si.name},ne.createElement("div",{className:un.name},si.name)),ne.createElement("img",{className:un.img,src:_t.Z.IMG_SERVER+"/images/"+si.avatar_url}),ne.createElement("div",{className:un.text,title:si.creator},si.creator),jn&&ne.createElement("div",{className:un.btns},ne.createElement("div",null,"\u5F00\u653E\u8BFE\u7A0B"),ne.createElement("aside",null,"\u5F00\u653E\u8BFE\u5802")),Gt&&ne.createElement("div",{className:un.sign},"\u516C\u5F00")),ne.createElement("div",{className:un.bottom},si.visits>0&&ne.createElement(Ht.Z,{title:"\u8BBF\u95EE\u91CF",placement:"bottom"},ne.createElement("span",null,ne.createElement("i",{className:"iconfont icon-liulanyan"}),ne.createElement("span",null,si.visits))),si.course_members_count>0&&ne.createElement(Ht.Z,{title:"\u6210\u5458",placement:"bottom"},ne.createElement("span",null,ne.createElement("i",{className:"iconfont icon-chengyuan"}),si.course_members_count)),si.tasks_count>0&&ne.createElement(Ht.Z,{title:"\u4F5C\u4E1A",placement:"bottom"},ne.createElement("span",null,ne.createElement("i",{className:"iconfont icon-zuoye"}),si.tasks_count)),si.is_end?ne.createElement("div",{style:{color:"#6B758B"}},"\u5DF2\u7ED3\u675F"):ne.createElement("div",{style:{color:"#00B187"}},"\u8FDB\u884C\u4E2D"))),!si.is_accessible&&ne.createElement("div",{className:un.lockWrap},ne.createElement("img",{src:`${_t.Z.IMG_SERVER}/images/educoder/icon/lockclose.svg`}),ne.createElement("span",{className:"mt15 font16 c-white"},"\u975E\u8BFE\u5802\u6210\u5458\u4E0D\u53EF\u8FDB\u5165")))}),!dn.length&&ne.createElement(Ye.Z,null)))},We={flex_box_center:"flex_box_center___d27mZ",flex_space_between:"flex_space_between___qfRU9",flex_box_vertical_center:"flex_box_vertical_center___fCRld",flex_box_center_end:"flex_box_center_end___ORMV8",flex_box_column:"flex_box_column___PNKtZ",tabs:"tabs___alpa7",tabsWrap:"tabsWrap___aCQjw",tab:"tab___MKLr4",active:"active___nl_4v"},Pn=Dt(25690),tn=({dataSource:on=[],value:dn,onChange:pn,className:_n,style:Di={},tabBarExtraContent:Bi})=>Ft.createElement("div",{className:je()(We.tabs,_n),style:Di},Ft.createElement("div",{className:We.tabsWrap},on.map((me,we)=>!(me!=null&&me.hide)&&Ft.createElement("aside",{className:We.tab,onClick:()=>{pn(me.id),me.link&&Pn.history.push(me.link)},key:we},Ft.createElement("div",{className:dn===me.id?We.active:""},me.name),(me==null?void 0:me.resetCount)==null&&(me==null?void 0:me.total)!==void 0&&Ft.createElement("span",null,"\uFF08",me==null?void 0:me.total,"\uFF09"),(me==null?void 0:me.resetCount)!==void 0&&(me==null?void 0:me.total)!==void 0&&Ft.createElement(Ht.Z,{title:(me==null?void 0:me.tip)!=null?me==null?void 0:me.tip:""},Ft.createElement("span",{style:{color:"#9096A3"}},"\uFF08",Ft.createElement("span",{style:{color:"#000"}},me==null?void 0:me.resetCount),"/",Ft.createElement("span",null,me==null?void 0:me.total),"\uFF09"))))),Ft.createElement("div",{className:We.tabBar},Bi)),Jn=({className:on,style:dn={},children:pn})=>Ft.createElement("div",{className:je()(on),style:dn},pn),Pe={flex_box_center:"flex_box_center___e6HxQ",flex_space_between:"flex_space_between___RnXYe",flex_box_vertical_center:"flex_box_vertical_center___lVxPk",flex_box_center_end:"flex_box_center_end___bu8yv",flex_box_column:"flex_box_column___JczGj",orderWrap:"orderWrap___ZfyGX",orderIconWrap:"orderIconWrap___XTB_O",orderAsc:"orderAsc___KWHmA",orderDesc:"orderDesc___rHdbB",active:"active___a7eSP",cursorPointer:"cursorPointer___gs9kL",orderTextWrap:"orderTextWrap___teAKn"},an=Dt(75727),re=Dt(93041);const hn=[{id:"updated_at",name:"\u6700\u65B0\u52A8\u6001"},{id:"created_at",name:"\u6700\u65B0\u521B\u5EFA"},{id:"name",name:"\u540D\u79F0\u6392\u5E8F"}];var Tt=({sortValue:on,dropValue:dn,className:pn,onSort:_n,onDrop:Di,dataSource:Bi=hn})=>{var me;return Ft.createElement("div",{className:je()(Pe.orderWrap,pn)},Ft.createElement(an.Z,{dropdownRender:()=>Ft.createElement(re.default,null,Bi.map((we,ge)=>Ft.createElement(re.default.Item,{key:ge,onClick:()=>Di(we.id)},we.name)))},Ft.createElement("span",{className:Pe.orderTextWrap},(me=Bi.find(we=>dn===we.id))==null?void 0:me.name)),Ft.createElement("span",{className:Pe.orderIconWrap},Ft.createElement("span",{className:Pe.orderAsc},Ft.createElement("i",{className:on==="asc"?`iconfont icon-sanjiaoxing-up font12 ${Pe.cursorPointer} ${Pe.active}`:`iconfont icon-sanjiaoxing-up font12 ${Pe.cursorPointer}`,onClick:()=>_n(on==="asc"?"desc":"asc")})),Ft.createElement("span",{className:Pe.orderDesc},Ft.createElement("i",{className:on==="desc"?`iconfont icon-sanjiaoxing-down font12 ${Pe.cursorPointer} ${Pe.active}`:`iconfont icon-sanjiaoxing-down font12 ${Pe.cursorPointer}`,onClick:()=>_n(on==="asc"?"desc":"asc")}))))},Et={flex_box_center:"flex_box_center___LCi0B",flex_space_between:"flex_space_between___hzONe",flex_box_vertical_center:"flex_box_vertical_center___ZyQRE",flex_box_center_end:"flex_box_center_end___XKM74",flex_box_column:"flex_box_column___p8LCU",btn:"btn___In02G","mediacy-round":"mediacy-round___uveEv","mediacy-default":"mediacy-default___dDxsd",default:"default___K791v"},St=Dt(99571),Mt=Object.defineProperty,zt=Object.getOwnPropertySymbols,kt=Object.prototype.hasOwnProperty,Ut=Object.prototype.propertyIsEnumerable,Oe=(on,dn,pn)=>dn in on?Mt(on,dn,{enumerable:!0,configurable:!0,writable:!0,value:pn}):on[dn]=pn,Te=(on,dn)=>{for(var pn in dn||(dn={}))kt.call(dn,pn)&&Oe(on,pn,dn[pn]);if(zt)for(var pn of zt(dn))Ut.call(dn,pn)&&Oe(on,pn,dn[pn]);return on},_e=(on,dn)=>{var pn={};for(var _n in on)kt.call(on,_n)&&dn.indexOf(_n)<0&&(pn[_n]=on[_n]);if(on!=null&&zt)for(var _n of zt(on))dn.indexOf(_n)<0&&Ut.call(on,_n)&&(pn[_n]=on[_n]);return pn},ee=(on,dn,pn)=>new Promise((_n,Di)=>{var Bi=ge=>{try{we(pn.next(ge))}catch(Wn){Di(Wn)}},me=ge=>{try{we(pn.throw(ge))}catch(Wn){Di(Wn)}},we=ge=>ge.done?_n(ge.value):Promise.resolve(ge.value).then(Bi,me);we((pn=pn.apply(on,dn)).next())}),pe=on=>{var dn=on,{className:pn,style:_n,children:Di,loading:Bi=!1,openLoading:me,onClick:we=()=>{},size:ge="middle",shape:Wn="round"}=dn,ai=_e(dn,["className","style","children","loading","openLoading","onClick","size","shape"]);const[si,ln]=(0,Ft.useState)(!1);return Ft.createElement(St.ZP,Te({onClick:(0,ce.throttle)(jn=>ee(void 0,null,function*(){me&&ln(!0);try{yield we(jn)}catch(ii){console.log("error",ii)}me&&ln(!1)}),2e3,{leading:!0,trailing:!1}),className:je()(Et.btn,Et[`${ge}-${Wn}`],pn),style:_n,size:ge,shape:Wn,loading:si||Bi},ai),Di)},be={flex_box_center:"flex_box_center___TB7bQ",flex_space_between:"flex_space_between___oBlTb",flex_box_vertical_center:"flex_box_vertical_center___b5XbB",flex_box_center_end:"flex_box_center_end___CNhe7",flex_box_column:"flex_box_column___yHXKW",head:"head___ghH72",node:"node___mjPEy"},rn=({className:on,style:dn,children:pn=null,onClick:_n,title:Di})=>Ft.createElement("div",{className:je()(be.head,on),style:dn},Ft.createElement("span",{className:"primary-hover",onClick:_n},Ft.createElement("i",{className:"iconfont icon-fanhui2 font12"}),"\u8FD4\u56DE"),Ft.createElement("b",{title:Di},Di),Ft.createElement("div",{className:be.node},pn)),He={flex_box_center:"flex_box_center___AlHuF",flex_space_between:"flex_space_between___vN2LW",flex_box_vertical_center:"flex_box_vertical_center___Ac7D2",flex_box_center_end:"flex_box_center_end___y38I7",flex_box_column:"flex_box_column___iQE6P",btns:"btns___sNgTb",confirm:"confirm___Ozirl",cancel:"cancel___aiq1I"},xe=({confirmShow:on=!0,confirmTitle:dn,confirmClick:pn,cancelShow:_n=!0,cancelTitle:Di,cancelClick:Bi,className:me,style:we,confirmLoading:ge=!1})=>Ft.createElement("div",{className:je()(He.btns,me),style:we},on&&Ft.createElement(St.ZP,{loading:ge,onClick:pn,type:"primary",className:He.confirm},dn),_n&&Ft.createElement(St.ZP,{onClick:Bi,className:He.cancel},Di)),Ne={flex_box_center:"flex_box_center___jkpdr",flex_space_between:"flex_space_between___OtsL8",flex_box_vertical_center:"flex_box_vertical_center___rbcb_",flex_box_center_end:"flex_box_center_end___zBR21",flex_box_column:"flex_box_column___nS_eP",fixedBottom:"fixedBottom___oJl7m",wrap:"wrap___A3Oq1",center:"center____VL1y"},Bn=({className:on,style:dn={},LeftContent:pn,children:_n,RightContent:Di})=>Ft.createElement("div",{className:je()(Ne.fixedBottom,on),style:dn},Ft.createElement("div",{className:Ne.wrap},Ft.createElement("div",{className:Ne.left},pn),Ft.createElement("div",{className:Ne.center},_n),Ft.createElement("div",{className:Ne.right},Di))),le={flex_box_center:"flex_box_center___tY8Yn",flex_space_between:"flex_space_between___vHdYA",flex_box_vertical_center:"flex_box_vertical_center___pa61F",flex_box_center_end:"flex_box_center_end___HyDXt",flex_box_column:"flex_box_column___UjZek",crumbs:"crumbs___V41Oe",hover:"hover___bEIVd"},Kn=({className:on,style:dn={},dataSource:pn=[]})=>Ft.createElement("div",{className:je()(le.crumbs,on),style:dn},pn.map((_n,Di)=>Di<pn.length-1?Ft.createElement(Ft.Fragment,{key:Di},_n.path||_n.onClick?Ft.createElement("span",{className:le.hover,onClick:_n!=null&&_n.onClick?_n.onClick:()=>Pn.history.push(_n.path)},_n.name):Ft.createElement("span",null,_n.name),Ft.createElement("span",null,"\xA0",">","\xA0")):Ft.createElement("span",{key:Di,style:{color:"#5F6368"}},_n.name))),yi=Dt(11938),Xn=Object.defineProperty,Ei=Object.defineProperties,Yi=Object.getOwnPropertyDescriptors,Gi=Object.getOwnPropertySymbols,Hi=Object.prototype.hasOwnProperty,Ki=Object.prototype.propertyIsEnumerable,Qi=(on,dn,pn)=>dn in on?Xn(on,dn,{enumerable:!0,configurable:!0,writable:!0,value:pn}):on[dn]=pn,ji=(on,dn)=>{for(var pn in dn||(dn={}))Hi.call(dn,pn)&&Qi(on,pn,dn[pn]);if(Gi)for(var pn of Gi(dn))Ki.call(dn,pn)&&Qi(on,pn,dn[pn]);return on},Ai=(on,dn)=>Ei(on,Yi(dn)),Zi=(on,dn)=>{var pn={};for(var _n in on)Hi.call(on,_n)&&dn.indexOf(_n)<0&&(pn[_n]=on[_n]);if(on!=null&&Gi)for(var _n of Gi(on))dn.indexOf(_n)<0&&Ki.call(on,_n)&&(pn[_n]=on[_n]);return pn};const{Countdown:Pt}=yi.default;var Si=on=>{var dn=on,{onChange:pn}=dn,_n=Zi(dn,["onChange"]);const[Di,Bi]=(0,Ft.useState)(null);(0,Ft.useEffect)(()=>{typeof Di=="number"&&Di>=0&&pn(Di)},[Di]);const me=we=>{const ge=Math.floor(we/1e3);Bi(ge)};return Ft.createElement(Pt,Ai(ji({},_n),{onChange:me}))}},37808:function(Tn,oi,Dt){"use strict";Dt.d(oi,{Z:function(){return se}});var Ft=Dt(59301);function se(ye,Be){const Se=(0,Ft.useRef)();(0,Ft.useEffect)(()=>{Se.current=ye}),(0,Ft.useEffect)(()=>{function Rt(){Se.current()}if(Be!==null){let ie=setInterval(Rt,Be);return()=>clearInterval(ie)}},[Be])}},51917:function(Tn,oi,Dt){"use strict";Dt.d(oi,{$J:function(){return ye},JZ:function(){return Se},bN:function(){return ie},jP:function(){return Rt},rO:function(){return Be}});var Ft=Dt(38986),se=(je,ce,Vt)=>new Promise((Qe,Qt)=>{var Je=et=>{try{nt(Vt.next(et))}catch(ct){Qt(ct)}},Nt=et=>{try{nt(Vt.throw(et))}catch(ct){Qt(ct)}},nt=et=>et.done?Qe(et.value):Promise.resolve(et.value).then(Je,Nt);nt((Vt=Vt.apply(je,ce)).next())});function ye(je){return(0,Ft.U2)(`libraries/${je}.json`)}function Be(){return(0,Ft.U2)("library_tags.json")}function Se(je){return se(this,null,function*(){return(yield(0,Ft.IV)(`attachments/${je}.json`)).status===0})}function Rt(je){return(0,Ft.v_)("libraries.json",je)}function ie(je,ce){return(0,Ft.gz)(`libraries/${je}.json`,ce)}},52154:function(Tn,oi,Dt){"use strict";Dt.d(oi,{Z:function(){return Vt}});var Ft=Dt(62957),se={ul:"ul___TdfYY"},ye=Dt(32637),Be=Dt(59301),Se=Object.getOwnPropertySymbols,Rt=Object.prototype.hasOwnProperty,ie=Object.prototype.propertyIsEnumerable,je=(Qe,Qt)=>{var Je={};for(var Nt in Qe)Rt.call(Qe,Nt)&&Qt.indexOf(Nt)<0&&(Je[Nt]=Qe[Nt]);if(Qe!=null&&Se)for(var Nt of Se(Qe))Qt.indexOf(Nt)<0&&ie.call(Qe,Nt)&&(Je[Nt]=Qe[Nt]);return Je},Vt=Qe=>{var Qt=Qe,{open:Je,onCancel:Nt}=Qt,nt=je(Qt,["open","onCancel"]);return Be.createElement(Ft.default,{centered:!0,open:Je,title:Be.createElement("div",{style:{fontWeight:"bold"}},"\u8054\u7CFB\u6559\u7814\u52A9\u7406"),width:"696px",onCancel:Nt,footer:null},Be.createElement("div",null,Be.createElement("div",{className:"tc"},Be.createElement("img",{className:"mt10",src:ye,width:"182px",height:"181px",style:{borderRadius:"2px",border:"1px solid #D8E3E9"}})),Be.createElement("div",{style:{color:"#191919",fontWeight:"bold"},className:"tc font16 mt10"},"\u514D\u8D39\u6559\u7814\u52A9\u7406"),Be.createElement("div",{style:{color:"#191919",fontWeight:"bold"},className:"tc font16"},"\u5FAE\u4FE1\u626B\u4E00\u626B\u6DFB\u52A0"),Be.createElement("div",{style:{color:"#333"},className:"pt30 font14"},Be.createElement("ul",{className:se.ul},Be.createElement("li",null,"1\u3001\u89E3\u7B54\u8001\u5E08\u7591\u60D1\u3001\u5E2E\u52A9\u8001\u5E08\u66F4\u5FEB\u719F\u6089\u548C\u4F7F\u7528\u5E73\u53F0\u6559\u5B66\u3002"),Be.createElement("li",null,"2\u3001\u534F\u52A9\u8001\u5E08\u521B\u5EFA\u8BFE\u5802\u3001\u8BFE\u7A0B\u8BBE\u8BA1\u3001\u505A\u597D\u6559\u5B66\u5DE5\u4F5C\u3002"),Be.createElement("li",null,"3\u3001\u6839\u636E\u8001\u5E08\u6559\u5B66\u65B9\u5411\uFF0C\u5206\u4EAB\u5934\u6B4C\u5E73\u53F0C9\u9662\u6821\u3001985\u9AD8\u6821\u3001211\u9AD8\u6821\u3001\u53CC\u4E00\u6D41\u9AD8\u6821\u8001\u5E08\u7ECF\u5178\u5B9E\u8DF5\u6559\u5B66\u6848\u4F8B\u3002")))))}},86364:function(Tn,oi,Dt){"use strict";Dt.r(oi),Dt.d(oi,{default:function(){return Si}});var Ft=Dt(59301),se=Dt(25690),ye=Dt(37568),Be=Dt(69219),Se=Dt(82326),Rt=Dt(28284),ie=Dt(6767),je=Dt(62957),ce=Dt(1560),Vt=Dt(77019),Qe=Dt(5269),Qt=Dt(71411),Je=Dt(47889),Nt=Dt(62673),nt=Dt(18287),et=Dt(14566),ct=Dt(99571),lt=Dt(29787),pt=Dt(39793),vt={bg:"bg____raBL",wrap:"wrap___HeK2P",crumbs:"crumbs___bamBY",titleWrap:"titleWrap___UpC0c",flexRow:"flexRow___WjoyK",flexJustifyCenter:"flexJustifyCenter___V6ndk",flexAlignEnd:"flexAlignEnd___So64w",flexAlignCenter:"flexAlignCenter___WWRXs",flexColumn:"flexColumn___b0Fz8",formWrap:"formWrap___Bmhgz",fieldWrap:"fieldWrap___pR4UB",mdWrap:"mdWrap___FPskk",tree:"tree___bVp9O",backgroundFa:"backgroundFa___ghlCO",aBtn:"aBtn___M7dWu",bBtn:"bBtn___XycZO",cascaderWrap:"cascaderWrap___CPNAV",listItem:"listItem____eV5T",right:"right___x8wr7",one:"one___wdYdi",schoolHintWrap:"schoolHintWrap___AWsQj",colorCDCDCD:"colorCDCDCD___xguLh",color0152d9:"color0152d9___MEYYd",spanText:"spanText___Srs_u",addTypeRadio:"addTypeRadio___JTRkP",add_ai:"add_ai___JGWFe",paths_content:"paths_content___Rzg9i",content_header:"content_header___LvvU1",header_box:"header_box___c05Gw",header_bj:"header_bj____CaVY",header_text:"header_text___jNO1N",lianjie:"lianjie___vtxBe",buzou_box:"buzou_box___qkXlL",no_start_style:"no_start_style___ONC9T",start_style:"start_style___vWVZl"},xt=Dt(51257),Lt=Dt(346),Ot=Dt(38986),Ht=Dt(584),te={cascaderContainer:"cascaderContainer___uz26h",valueWrap:"valueWrap___zTHXb",valueItem:"valueItem___vBNoA",placeholder:"placeholder___bJTkn",modalWrap:"modalWrap___uhROO",left:"left___oZrbl",right:"right___y9QjL",disabled:"disabled___LVx0f",emptyWrap:"emptyWrap___KG5pK"},_t=Dt(99267),Xt=Dt(38819),ve=Object.defineProperty,oe=Object.defineProperties,Re=Object.getOwnPropertyDescriptors,Ye=Object.getOwnPropertySymbols,en=Object.prototype.hasOwnProperty,Rn=Object.prototype.propertyIsEnumerable,wn=(on,dn,pn)=>dn in on?ve(on,dn,{enumerable:!0,configurable:!0,writable:!0,value:pn}):on[dn]=pn,un=(on,dn)=>{for(var pn in dn||(dn={}))en.call(dn,pn)&&wn(on,pn,dn[pn]);if(Ye)for(var pn of Ye(dn))Rn.call(dn,pn)&&wn(on,pn,dn[pn]);return on},vn=(on,dn)=>oe(on,Re(dn)),ne=(on,dn)=>{var pn={};for(var _n in on)en.call(on,_n)&&dn.indexOf(_n)<0&&(pn[_n]=on[_n]);if(on!=null&&Ye)for(var _n of Ye(on))dn.indexOf(_n)<0&&Rn.call(on,_n)&&(pn[_n]=on[_n]);return pn};const jt=(0,Ft.createRef)();var We=({dataSource:on,placeholder:dn,defaultValue:pn,onChange:_n})=>{const[Di,Bi]=(0,Ft.useState)(!1),[me,we]=(0,Ft.useState)({data:[],objData:{},ids:[]}),[ge,Wn]=(0,Ft.useState)({});(0,Ft.useEffect)(()=>{window.addEventListener("click",()=>{Bi(!1),Wn({})})},[]),(0,Ft.useEffect)(()=>{if(pn){let ii={},ki=[];pn.forEach(Ri=>{const Gt=Ri,{sub_discipline:fe}=Gt,Mn=ne(Gt,["sub_discipline"]);fe&&(ii[fe.id]=vn(un({},Mn),{sub_disciplines:[fe]}),ki.push(fe.id))}),we({ids:ki,data:Object.values(ii),objData:ii}),_n(ki)}},[pn]);const ai=()=>Ft.createElement("div",{className:te.emptyWrap},Ft.createElement(Ht.Z,{image:Ht.Z.PRESENTED_IMAGE_SIMPLE})),si=ii=>{if(me.ids.includes(ii.id))return!1;const ki=ge,{sub_disciplines:Ri}=ki,Gt=ne(ki,["sub_disciplines"]),fe=vn(un({},me.objData),{[ii.id]:vn(un({},Gt),{sub_disciplines:[ii]})});we({ids:[...me.ids,ii.id],data:Object.values(fe),objData:fe}),_n([...me.ids,ii.id])},ln=ii=>{const ki=me.objData;delete ki[ii];const Ri=me.ids.filter(Gt=>Gt!==ii);we({data:Object.values(ki),objData:ki,ids:Ri}),_n(Ri)};let jn=45;return jt&&jt.current&&jt.current.clientHeight>45&&(jn=jt.current.clientHeight+5),Ft.createElement("div",{className:te.cascaderContainer,onClick:ii=>{ii.stopPropagation()}},Ft.createElement("div",{ref:jt,className:te.valueWrap,onClick:()=>Bi(!Di)},me.data.length===0&&Ft.createElement("span",{className:te.placeholder},dn||"\u8BF7\u9009\u62E9\u65B9\u5411&\u8BFE\u7A0B"),me.data.map(ii=>Ft.createElement("div",{className:te.valueItem,key:ii.id},Ft.createElement("span",null,ii.name),Ft.createElement("span",null,"/"),Ft.createElement("span",null,ii.sub_disciplines[0].name),Ft.createElement("span",{onClick:ki=>{ki.stopPropagation(),ki.preventDefault(),ln(ii.sub_disciplines[0].id)}},Ft.createElement(_t.Z,null))))),Di&&Ft.createElement("div",{className:te.modalWrap,style:{top:jn}},Ft.createElement("div",{className:te.left},on.length===0&&ai(),on.length>0&&on.map(ii=>Ft.createElement("div",{key:ii.id,onClick:()=>{Wn(ii)}},Ft.createElement("span",null,ii.name),Ft.createElement("span",null,Ft.createElement(Xt.Z,null))))),ge.sub_disciplines&&Ft.createElement("div",{className:te.right},ge.sub_disciplines.length===0&&ai(),ge.sub_disciplines.length>0&&ge.sub_disciplines.map(ii=>{const ki=me.ids.includes(ii.id);return Ft.createElement("div",{key:ii.id,className:ki?te.disabled:"",onClick:()=>{si(ii),Bi(!1)}},ii.name)}))))},Pn=Dt(54172),ke=Dt(17149),tn=Dt(61186),fn=Dt.n(tn),Jn=Dt(29679),Pe=Dt(19248),an=Dt(98846),re={flexRow:"flexRow___qY1Ro",flexColumn:"flexColumn___xTKsc",formWrap:"formWrap___OJ1NZ",example:"example___XZnZv",footerWrap:"footerWrap___DSZCv"},hn=Dt(59301),di=Object.defineProperty,Tt=Object.getOwnPropertySymbols,Et=Object.prototype.hasOwnProperty,St=Object.prototype.propertyIsEnumerable,Mt=(on,dn,pn)=>dn in on?di(on,dn,{enumerable:!0,configurable:!0,writable:!0,value:pn}):on[dn]=pn,zt=(on,dn)=>{for(var pn in dn||(dn={}))Et.call(dn,pn)&&Mt(on,pn,dn[pn]);if(Tt)for(var pn of Tt(dn))St.call(dn,pn)&&Mt(on,pn,dn[pn]);return on},kt=(on,dn)=>{var pn={};for(var _n in on)Et.call(on,_n)&&dn.indexOf(_n)<0&&(pn[_n]=on[_n]);if(on!=null&&Tt)for(var _n of Tt(on))dn.indexOf(_n)<0&&St.call(on,_n)&&(pn[_n]=on[_n]);return pn},Ut=(on,dn,pn)=>new Promise((_n,Di)=>{var Bi=ge=>{try{we(pn.next(ge))}catch(Wn){Di(Wn)}},me=ge=>{try{we(pn.throw(ge))}catch(Wn){Di(Wn)}},we=ge=>ge.done?_n(ge.value):Promise.resolve(ge.value).then(Bi,me);we((pn=pn.apply(on,dn)).next())});const Oe=(on,dn)=>dn.some(pn=>pn.label.toLowerCase().indexOf(on.toLowerCase())>-1),Te=ye.default.TextArea,_e=on=>{var dn=on,{newCourse:pn,globalSetting:_n,loading:Di,dispatch:Bi,schoolName:me,onSuccess:we=()=>{}}=dn,ge=kt(dn,["newCourse","globalSetting","loading","dispatch","schoolName","onSuccess"]);const[Wn]=Rt.default.useForm();(0,Ft.useEffect)(()=>{Wn.setFieldsValue({name:me})},[me]);const ai=si=>Ut(void 0,null,function*(){const{name:ln,city:jn=[],address:ii,remarks:ki}=si||{},Ri=yield Bi({type:"newCourse/appplySchool",payload:{name:ln,province:jn[0],city:jn[1],address:ii,remarks:ki}});if((Ri==null?void 0:Ri.status)==2){const Gt=je.default.confirm({icon:null,width:600,centered:!0,okText:"\u786E\u5B9A",cancelText:"\u53D6\u6D88",title:"\u63D0\u793A",content:hn.createElement(hn.Fragment,null,hn.createElement("p",null,"\u7CFB\u7EDF\u68C0\u6D4B\u5230\u60A8\u7533\u8BF7\u65B0\u589E\u7684\u5355\u4F4D\u5DF2\u5B58\u5728\uFF0C\u8BF7\u786E\u8BA4\u662F\u5426\u4E3A\u8BE5\u5355\u4F4D\uFF1F"),hn.createElement(Pn.default,{columns:[{title:"\u5B66\u6821/\u5355\u4F4D",dataIndex:"name"},{title:"\u7528\u6237\u6570",width:150,dataIndex:"users_count"}],dataSource:[zt({},Ri)],pagination:!1})),onOk:()=>Ut(void 0,null,function*(){yield we(ln),Gt.destroy(),Bi({type:"newCourse/setActionTabs",payload:{}})}),onCancel:()=>{Gt.destroy()}});return}Bi({type:"newCourse/setActionTabs",payload:{}}),Ri.status==0&&(ie.ZP.success("\u65B0\u589E\u53D1\u5E03\u5355\u4F4D\u6210\u529F\uFF01"),we(ln))});return hn.createElement(je.default,{centered:!0,keyboard:!1,closable:!1,destroyOnClose:!0,open:pn.actionTabs.key==="NewCourse-AppplySchool",title:"\u7533\u8BF7\u53D1\u5E03\u5355\u4F4D",width:"600px",footer:null},hn.createElement(Rt.default,{className:re.formWrap,form:Wn,labelCol:{span:4},wrapperCol:{span:20},onFinish:ai},hn.createElement(Rt.default.Item,{label:"\u53D1\u5E03\u5355\u4F4D\uFF1A",name:"name",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u5B66\u6821\u6216\u5DE5\u4F5C\u5355\u4F4D"}]},hn.createElement(ye.default,{placeholder:"\u8BF7\u8F93\u5165\u53D1\u5E03\u5355\u4F4D"})),hn.createElement("div",{className:`${re.flexRow} ${re.example}`},hn.createElement("div",null,"\u793A\u4F8B\uFF1A"),hn.createElement("div",{className:re.flexColumn},hn.createElement("div",null,hn.createElement(Jn.Z,{style:{color:"rgb(82, 196, 26)"}}),hn.createElement("span",{className:"font14 ml5"},"\u6B63\u786E\u793A\u4F8B\uFF1A\u6570\u636E\u7ED3\u6784")),hn.createElement("div",null,hn.createElement(Pe.Z,{style:{color:"red"}}),hn.createElement("span",{className:"font14 ml5"},"\u9519\u8BEF\u793A\u4F8B\uFF1A\u6570\u636E\u7ED3\u6784",fn()().format("YYYY"),"\u6625")))),hn.createElement(Rt.default.Item,{label:"\u5730\u533A\uFF1A",name:"city"},hn.createElement(ke.Z,{allowClear:!0,size:"middle",options:an.P,placeholder:"\u8BF7\u9009\u62E9\u6240\u5728\u5730",showSearch:{matchInputWidth:!0,filter:Oe}})),hn.createElement(Rt.default.Item,{label:"\u8BE6\u7EC6\u5730\u5740\uFF1A",name:"address"},hn.createElement(ye.default,{placeholder:"\u8BF7\u586B\u5199\u5B8C\u6574\u7684\u5730\u5740\u4FE1\u606F"})),hn.createElement(Rt.default.Item,{label:"\u8BF4\u660E\uFF1A",name:"remarks"},hn.createElement(Te,{placeholder:"\u518D\u6B21\u8BF4\u660E\u7279\u522B\u60C5\u51B5\uFF08\u9009\u586B\uFF09"})),hn.createElement("div",{className:re.footerWrap},hn.createElement(Rt.default.Item,null,hn.createElement(ct.ZP,{className:"mr5",size:"middle",onClick:()=>{Bi({type:"newCourse/setActionTabs",payload:{}})}},"\u53D6\u6D88"),hn.createElement(ct.ZP,{size:"middle",type:"primary",htmlType:"submit",loading:Di["newCourse/appplySchool"]},"\u4FDD\u5B58")))))};var ee=(0,se.connect)(({newCourse:on,loading:dn,globalSetting:pn})=>({newCourse:on,globalSetting:pn,loading:dn.effects}))(_e),de=Dt(52154),pe=Dt(96472),be="data:image/png;base64,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",ze="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAYIAAAAoCAYAAADzCv21AAAAAXNSR0IArs4c6QAAApFJREFUeF7t3TFO42AQgFEiQSIKKrgEiJqb0HI4Wm5CjeASUFGgBArkSInixPY/rWfetqHIPI80+tjdZPHw9HH9e/6zOvOHAAECBFIJrL+Xn+8v95vWUIu7x7fl6mpz0/pBrxMgQIDAvAQu/i7Xr8+3X613veh+QBW0mLxOgACBeQpEqmB7CFTBPB+wd02AAIGWQKQKtodAFbQovU6AAIH5CrSqYH8IVMF8H7J3ToAAgSmBVhXsD4EqsEgECBDIKzBVBb1DoAryLoHJCBCoLTBVBb1DoApqL4rpCRDILTBWBSeHQBXkXgTTESBQV2CsCk4OgSqouyQmJ0Agv8BQFQweAlWQfxlMSIBATYGhKhg8BKqg5oKYmgCBGgLHVTB6CFRBjYUwJQEC9QSOq2D0EKiCesthYgIE6ggcVsHkIVAFdZbCpAQI1BI4rILJQ6AKai2GaQkQqCWwq4LmIVAFtRbDtAQI1BHYVUHzEKiCOkthUgIE6gl0VRA6BKqg3nKYmACBGgJdFTgENZ61KQkQIDAoED4EvsrSBhEgQCCnQOhXQ34tlPPhm4oAAQLhvyxWA5aFAAECOQVC/3xUDeR8+KYiQIBA+D+UqQHLQoAAgZwCoY+YUAM5H76pCBAgEP7QOTVgWQgQIJBTIPQx1Gog58M3FQECBMJfTKMGLAsBAgRyCoS+qlIN5Hz4piJAgED4y+vVgGUhQIBAToGhGugm7X3WkBrI+fBNRYAAgbEaODkEasCyECBAIKfAWA30DoEayPnwTUWAAIGpGugdAjVgWQgQIJBTYKoG9odADeR8+KYiQIBAqwb2h0ANWBYCBAjkFGjVwPYQqIGcD99UBAgQiNTA9hCoActCgACBnAKRGugm/wceYDXmz1T+uAAAAABJRU5ErkJggg==",rn="data:image/png;base64,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",He="data:image/png;base64,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",yn=Dt.p+"static/shiyong.3f0aff1d.png",xe="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACgAAAAoCAYAAACM/rhtAAAAAXNSR0IArs4c6QAABQVJREFUWEfNmXes32MUxj8PagS1QghJiU1pxExsFbUqitoSKzVilEjoHzVj/KEEDYnGbq3aexNiRRGjlMTee8+K432u87u+99ffvPdK7kl+f/3e8bznPec5z3m/oh8WEfMBGwPbAhsCawIrAIvncj8BnwFvAS8CjwMvSPq72+3UzYSIWBE4BjgQ+BZ4FHgOmAN8AhiYzUA9di1gM2A0sDQwHZgqyWM7so4ARsQywFnA3sDVwJWS3uhohxwUEesAhwIHAzcDkyV9026NtgAjYl/gwuKNGw1Skj3Xb4sIe3Jy8brXnSjpplaLNQUYEQsAlwDbeTFJL/cbVYOJEbFBHvox4FhJfzVavyHAiFgEmAk4qPeX9PNggqutFRGLAdcDTrrxkn6r32cegOm5O4DvgEOanWywAOd+VwFLAbvX79cI4GWZgXv83+AqnnQ43WYmkHRU9fB9AGZCnGFuq11rRPSMkRSD4bWIGAacU650tiQzQo/ldZszT60mTi/ApJLXgZ2rCRERnuSY3FHShwMBmQR/Q9LVLEkm+17LxLkPGFmjoCrAS4E/JJ1QN+kpYAvgI2B7SW/3F2Qh+mnA4YVevjc7NGKGiDClLSTp6J6bS/ea9V8pGbVGPc9FxPBy5XcDWwFfAGMkeWxXFhFTgBOBX3KNpxstkDxpJ4xyxakBPBcYVuLupCaTfMW3Ajvl6XeR9EynCCPCxHymbwjYTdJDreaWeDwfmCtpkjIuPshTNS1fGdwzzFfphXGSHm4HMiKOKxRyEWAi3keSs7WlZVl8EBhhgJsCl0sa1cHE+T02a6q9sV+Zd3uzeRHhuntF/n9YNWs72MthNMEATwGWk+T4aGtJO44nJ5O94o2vrZ8YEXtmKTPHHS/p4raL983oC4AvDfAWqwtJVhgdW0ScVgafnuXQAKbWJkfEGOBOZ2PympVQVxYRVk7jDfA14ABJr3a1wr/kOhHwSW2WT2dHxOaA42fRogunNEu8dntFxPrADAP8ysKyE23WaNGIsMZzXDo+XVPHAUuWcjlN0oR2QFrErzXoHAP8vXhhuKQ/B7DYXj5tKWEL5hrWeFZBXUv8Sph4rR8HC+DKhaaeBZavADxI0twBHLoX4ECv2KBcDlcrRP589iFLAPekxvMNdW2pDXqueCBJYvn+RKky6wGzUn2vXhqlB4Bl8z9Xjloz1THQTJLpBmjlPLMfNGM1/Ahgop9dWsuta4kWEWsDLmcrud1MJdRVL1Olma6I2i6IiIVLX3xveuzd0n5uWTL206p7IsJx6QOsCljG7SDJvXJHVkRKL1F3XOoSXE39js1e2ODea0JBbubtyZHAOynX3u8EYUT0ljo3LG3FQoLz2OtMIaWB/zqvtWV/nPLpfmCTogU/Tk++2QpkH7GQG7eUWxVucr9ypPkpBafVdlsrWtAvDXeVpNkGMGtYnb/UgqT/k1sJsKlgrYA7DzgZ+NW6UNKTbZFVBmTcOiF3LULjh/JmM1aS6amPNRSsCbKh5M//JmWj42pjHei+oWtLTXmNZVoedLQkv+30WkPJnyBc+xo1Te5H7K1aE9+V6mngIcexnXGEf5Jcx3ssmybH67rzNE05wO8l9W3niEwMF38nyKBYRKxSzf62bWflFEO3cU8vmueG7tNHghy6j0eVqx66z291aT80HzDrQA7dJ+A6oEPzEb0J2dY+Q2yUnyGsrKufIT7PzxAWsv3+DPEPkKKBQOOiq+AAAAAASUVORK5CYII=",Ne=Dt(58617),Ze=Dt(9148),Bn=Dt(48790),le=Dt(59301),An=Object.defineProperty,Kn=Object.defineProperties,yi=Object.getOwnPropertyDescriptors,Xn=Object.getOwnPropertySymbols,Ei=Object.prototype.hasOwnProperty,Yi=Object.prototype.propertyIsEnumerable,Gi=(on,dn,pn)=>dn in on?An(on,dn,{enumerable:!0,configurable:!0,writable:!0,value:pn}):on[dn]=pn,Hi=(on,dn)=>{for(var pn in dn||(dn={}))Ei.call(dn,pn)&&Gi(on,pn,dn[pn]);if(Xn)for(var pn of Xn(dn))Yi.call(dn,pn)&&Gi(on,pn,dn[pn]);return on},Ki=(on,dn)=>Kn(on,yi(dn)),Qi=(on,dn)=>{var pn={};for(var _n in on)Ei.call(on,_n)&&dn.indexOf(_n)<0&&(pn[_n]=on[_n]);if(on!=null&&Xn)for(var _n of Xn(on))dn.indexOf(_n)<0&&Yi.call(on,_n)&&(pn[_n]=on[_n]);return pn},ji=(on,dn,pn)=>new Promise((_n,Di)=>{var Bi=ge=>{try{we(pn.next(ge))}catch(Wn){Di(Wn)}},me=ge=>{try{we(pn.throw(ge))}catch(Wn){Di(Wn)}},we=ge=>ge.done?_n(ge.value):Promise.resolve(ge.value).then(Bi,me);we((pn=pn.apply(on,dn)).next())});const{TextArea:Ai}=ye.default,{TreeNode:Zi}=Be.default,Pt=Se.default.Option,ni=on=>{var dn=on,{user:pn,newCourse:_n,globalSetting:Di,loading:Bi,dispatch:me}=dn,we=Qi(dn,["user","newCourse","globalSetting","loading","dispatch"]),ge,Wn,ai,si,ln,jn,ii,ki,Ri,Gt,fe,Mn,zn,De,kn,Sn,Fn,ei,On,Qn,Yn,Ni,Pi,bi,Ge,Xi,dr,br,Ue,Vn,vi,pi,Fi,Wi,Vi,pr,or,hr,Xe,nr,qe,xi,ir,fr,Br,kr,rr,Kr,Ae,gn,Me,At,Nn,Hn,gi,ci,ti,sn,Dn,Gn,Ln,Zn,Mi,hi,bn,Ke,qn,Ci,ar,Oi,ur,sr,yr,Tr,jr,Jr,Ee,Fr,Mr,Ui,vr,mr,_r,Yr,Pr;const[oo]=(0,se.useSearchParams)(),va=(0,se.useParams)(),[wo]=Rt.default.useForm(),[ha,da]=(0,Ft.useState)({}),[Ji,Fo]=(0,Ft.useState)(),So=(0,Ft.useRef)(),[$o,Do]=(0,Ft.useState)(!0),[Vo,li]=(0,Ft.useState)(!1),[qi,Sr]=(0,Ft.useState)(),[Ir,Gr]=(0,Ft.useState)(),[lo,er]=(0,Ft.useState)(!0),[La,Ro]=(0,Ft.useState)(!1),[bo,Hr]=(0,Ft.useState)(!1),[Uo,ba]=(0,Ft.useState)(-1),[ko,Ha]=(0,Ft.useState)(!0),[Ba,cs]=(0,Ft.useState)([]),[ea,ru]=(0,Ft.useState)([]),[Hl,As]=(0,Ft.useState)(!1),[Hs,fs]=(0,Ft.useState)(!1),[kl,ou]=(0,Ft.useState)(!1),[Ll]=Rt.default.useForm(),Bo=(0,Ft.useRef)(),[Ve,au]=(0,Ft.useState)({}),[bl,Ml]=(0,Ft.useState)(!1),[Ma,ya]=(0,Ft.useState)(!1),[na,Sa]=(0,Ft.useState)(!1);(0,Ft.useEffect)(()=>()=>{window.clearInterval(Bo.current)},[]);const _s=()=>ji(void 0,null,function*(){var ri,Ar;const Zr=yield(0,Ot.ZP)("/api/subject_generations/get.json",{method:"get"});(Zr==null?void 0:Zr.status)==0&&(au(Zr==null?void 0:Zr.data),(((ri=Zr==null?void 0:Zr.data)==null?void 0:ri.state)==1||((Ar=Zr==null?void 0:Zr.data)==null?void 0:Ar.state)==-1)&&window.clearInterval(Bo.current))}),Oa=()=>ji(void 0,null,function*(){const ri=yield(0,Ot.ZP)("/api/subject_generations/get_file.json",{method:"get"});(ri==null?void 0:ri.status)==0&&Ll.setFieldValue("file_ids",(0,pe.z)(ri==null?void 0:ri.data))}),yo=[{title:"\u5C55\u793A\u8BFE\u7A0B\u6982\u8981\uFF08\u9009\u4E2D\uFF0C\u5219\u9ED8\u8BA4\u5C55\u793A\u6240\u6709\u6982\u89C8\u6A21\u5757\uFF09",key:"all",children:[{title:"\u5C55\u793A\u8BFE\u7A0B\u7AE0\u8282",key:"chapter"},{title:"\u5C55\u793A\u6392\u884C\u699C",key:"charts"},{title:"\u5C55\u793A\u8BC1\u4E66\u7533\u8BF7",key:"cert_apply"},{title:"\u5C55\u793A\u77E5\u8BC6\u56FE\u8C31",key:"knowledge_graph"}]}],[Cr,$r]=(0,Ft.useState)([]),[Oo,Ii]=(0,Ft.useState)(!1),ca=Cr.length>0&&Cr.length<4,[ue,xn]=(0,Ft.useState)(1),[Ns,dl]=(0,Ft.useState)([]),[ta,Ea]=(0,Ft.useState)([]);(0,Ft.useEffect)(()=>{var ri;ws(),Ds(),So.current=va.pathId,Fo(!!So.current),(0,xt.Dk)((ri=Di==null?void 0:Di.setting)==null?void 0:ri.name),wo.setFieldsValue({learning_notes_title:"\u8BFE\u7A0B\u987B\u77E5"}),So.current&&jo()},[]);const ws=()=>ji(void 0,null,function*(){const ri=yield(0,Ot.ZP)("/api/disciplines.json",{method:"get",params:{source:"subject"}});dl(ri.disciplines)}),Ds=()=>ji(void 0,null,function*(){Ha(!0);const ri=yield me({type:"newCourse/getSchoolOption",payload:{display_aliases:!0}});Ha(!1),cs(ri==null?void 0:ri.schools),ru(ri==null?void 0:ri.schools)}),Kl=()=>{if(oo.get("username")){se.history.push(`/users/${oo.get("username")}/paths`);return}se.history.push(Ji?`/paths/${So.current}`:"/paths")},jo=()=>ji(void 0,null,function*(){var ri,Ar,Zr,Qr,Co,ia,Qs,ao,fa,no,Po,Eo,To,uo,qs,wr,Zl,qr;const Nr=yield me({type:"newCourse/getEditCourseData",payload:{id:So.current}});if(Nr){let Wl={name:Nr.name,name_en:Nr.name_en,intro:Nr.description,content:(ri=Nr==null?void 0:Nr.toast)==null?void 0:ri.content,notice:Nr.learning_notes,school_id:Nr==null?void 0:Nr.school,learning_notes_title:Nr.learning_notes_title||"\u8BFE\u7A0B\u987B\u77E5"};Nr.disciplines&&Nr.disciplines.length>0&&Ea(Nr.disciplines),wo.setFieldsValue(Wl),Hr((Ar=Nr==null?void 0:Nr.toast)==null?void 0:Ar.is_open),ba((Zr=Nr==null?void 0:Nr.toast)==null?void 0:Zr.open_num),Do(Nr==null?void 0:Nr.cust_seq),li(Nr==null?void 0:Nr.show_spoc),Ro(Nr==null?void 0:Nr.show_history),fs(Nr==null?void 0:Nr.show_course_section),As(Nr==null?void 0:Nr.allow_download),er(Nr==null?void 0:Nr.show_tag),Ii(Nr==null?void 0:Nr.allow_set_subject_summary),Nr!=null&&Nr.show_chapter&&Cr.push("chapter"),Nr!=null&&Nr.show_charts&&Cr.push("charts"),Nr!=null&&Nr.show_cert_apply&&Cr.push("cert_apply"),Nr!=null&&Nr.show_knowledge_graph&&Cr.push("knowledge_graph"),Nr!=null&&Nr.show_chapter&&(Nr!=null&&Nr.show_charts)&&(Nr!=null&&Nr.show_cert_apply)&&(Nr!=null&&Nr.show_knowledge_graph)&&Cr.push("all"),$r([...Cr]),((Qr=Nr==null?void 0:Nr.attachments)==null?void 0:Qr.length)>0&&Sr([{uid:(ia=(Co=Nr==null?void 0:Nr.attachments)==null?void 0:Co[0])==null?void 0:ia.id,name:(ao=(Qs=Nr==null?void 0:Nr.attachments)==null?void 0:Qs[0])==null?void 0:ao.title,response:{id:(no=(fa=Nr==null?void 0:Nr.attachments)==null?void 0:fa[0])==null?void 0:no.id}}]),((Po=Nr==null?void 0:Nr.attachments_b)==null?void 0:Po.length)>0&&Gr([{uid:(To=(Eo=Nr==null?void 0:Nr.attachments_b)==null?void 0:Eo[0])==null?void 0:To.id,name:(qs=(uo=Nr==null?void 0:Nr.attachments_b)==null?void 0:uo[0])==null?void 0:qs.title,response:{id:(Zl=(wr=Nr==null?void 0:Nr.attachments_b)==null?void 0:wr[0])==null?void 0:Zl.id}}]),da({name:Nr.name,intro:Nr.description,notice:Nr.learning_notes,content:(qr=Nr==null?void 0:Nr.toast)==null?void 0:qr.content})}}),Or=ri=>ji(void 0,null,function*(){var Ar,Zr,Qr,Co;const{name:ia,intro:Qs,notice:ao,name_en:fa,learning_notes_title:no,sub_discipline_ids:Po,school_id:Eo}=ri||{},To=Ji?"newCourse/editCourse":"newCourse/submitCourse";let uo=!1,qs=null;if(Ba.map(qr=>{Eo===qr.name&&(uo=!0,qs=qr.id)}),!uo)return ie.ZP.error(`\u672A\u627E\u5230\u5305\u542B'${Eo}'\u7684\u53D1\u5E03\u5355\u4F4D`);let wr={id:So.current,name:ia,name_en:fa,description:Qs,learning_notes:ao,cust_seq:$o,show_spoc:Vo,school_id:qs,show_tag:lo,show_history:La,show_course_section:Hs,allow_download:Hl,learning_notes_title:no,attachment_ids:[(Zr=(Ar=qi==null?void 0:qi[0])==null?void 0:Ar.response)==null?void 0:Zr.id],attachment_ids_b:[(Co=(Qr=Ir==null?void 0:Ir[0])==null?void 0:Qr.response)==null?void 0:Co.id],sub_discipline_ids:Po,subject_toast_attributes:{is_open:bo,open_num:Uo,content:ri.content}};Oo&&(wr.show_chapter=Cr==null?void 0:Cr.includes("chapter"),wr.show_charts=Cr==null?void 0:Cr.includes("charts"),wr.show_cert_apply=Cr==null?void 0:Cr.includes("cert_apply"),wr.show_knowledge_graph=Cr==null?void 0:Cr.includes("knowledge_graph"));const Zl=yield me({type:To,payload:Hi({},wr)});Zl!=null&&Zl.subject_id&&se.history.push(`/paths/${Zl.subject_id}`)}),Ka=()=>{me({type:"newCourse/setActionTabs",payload:{key:"NewCourse-AppplySchool"}})},Ps=ri=>{Ds(),da(Ki(Hi({},wo.getFieldsValue()),{school_id:ri}))},zo=(ri,Ar)=>{$r(ri)};return le.createElement("div",{className:vt.wrap},le.createElement("div",{className:vt.bg},le.createElement("div",{className:vt.crumbs},le.createElement("span",null,"\u5B9E\u8DF5\u8BFE\u7A0B"),le.createElement("i",{className:"iconfont icon-zhankai1"}),le.createElement("b",null,Ji?"\u7F16\u8F91":"\u521B\u5EFA","\u5B9E\u8DF5\u8BFE\u7A0B")),le.createElement("div",{className:vt.titleWrap},le.createElement("span",null,Ji?"\u7F16\u8F91":"\u521B\u5EFA","\u5B9E\u8DF5\u8BFE\u7A0B"),le.createElement("b",{onClick:Kl},"\u8FD4\u56DE")),!Ji&&le.createElement(Ze.tp,{style:{marginTop:"20px"},dataSource:[{name:"\u624B\u52A8\u521B\u5EFA",id:1},{name:"\u667A\u80FD\u521B\u5EFA",id:2}],value:ue,onChange:ri=>ji(void 0,null,function*(){var Ar,Zr,Qr;if(xn(ri),ri==1)window.clearInterval(Bo.current),Ll.resetFields();else{Oa();const Co=yield(0,Ot.ZP)("/api/subject_generations/get.json",{method:"get"});(Co==null?void 0:Co.status)==0&&(au(Co==null?void 0:Co.data),(((Ar=Co==null?void 0:Co.data)==null?void 0:Ar.state)==1||((Zr=Co==null?void 0:Co.data)==null?void 0:Zr.state)==-1)&&window.clearInterval(Bo.current),((Qr=Co==null?void 0:Co.data)==null?void 0:Qr.state)==0&&(Bo.current=setInterval(()=>{_s()},1e3)))}})}),ue==1&&le.createElement(Rt.default,{form:wo,className:vt.formWrap,scrollToFirstError:!0,layout:"vertical",colon:!1,onValuesChange:()=>{const ri=wo.getFieldsValue();"school_id"in ri&&ru(Ba.filter(Ar=>{var Zr,Qr,Co;return((Co=(Zr=Ar==null?void 0:Ar.name)==null?void 0:Zr.toUpperCase())==null?void 0:Co.indexOf((Qr=ri==null?void 0:ri.school_id)==null?void 0:Qr.toUpperCase()))!==-1})),da(Hi({},ri))},onFinish:Or},le.createElement("div",{className:vt.fieldWrap},le.createElement(Rt.default.Item,{extra:le.createElement("div",{className:"tr c-grey-333 font12 mt3"},`${((ge=ha.name)==null?void 0:ge.length)||0}/60`),name:"name",label:"\u5B9E\u8DF5\u8BFE\u7A0B\u540D\u79F0",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u5B9E\u8DF5\u8BFE\u7A0B\u540D\u79F0"}]},le.createElement(Ai,{maxLength:60,placeholder:"\u4F8B\u5982\uFF1A\u5927\u5B66\u8BA1\u7B97\u673A\u57FA\u7840 \u2014\u2014 \u8BA1\u7B97\u601D\u7EF4"})),le.createElement(Rt.default.Item,{style:{marginTop:"-24px"},name:"name_en",label:"\u82F1\u6587\u8BFE\u7A0B\u540D\u79F0",extra:le.createElement("div",{className:"tr c-grey-333 font12 mt3"},`${((Wn=ha.name_en)==null?void 0:Wn.length)||0}/200`),rules:[{message:"\u8BF7\u8F93\u5165\u82F1\u6587\u8BFE\u7A0B\u540D\u79F0"}]},le.createElement(Ai,{maxLength:200,placeholder:"College Computer Fundamentals - Computational Thinking"})),le.createElement(Rt.default.Item,{name:"sub_discipline_ids",label:le.createElement("div",{style:{display:"flex",justifyContent:"space-between",width:1200}},le.createElement("div",null,"\u65B9\u5411&\u8BFE\u7A0B"),le.createElement("div",{style:{color:"#9096A3",position:"relative",left:12}},"\u6CA1\u6709\u5408\u9002\u7684\u65B9\u5411&\u8BFE\u7A0B\uFF1F",le.createElement("span",{style:{color:"#3061D0",cursor:"pointer"},onClick:()=>ou(!0)},"\u8054\u7CFB\u6559\u7814\u52A9\u7406"))),style:{marginTop:"-24px"}},le.createElement(We,{defaultValue:ta,dataSource:Ns,onChange:ri=>wo.setFieldsValue({sub_discipline_ids:ri})})),le.createElement(Rt.default.Item,{label:"\u53D1\u5E03\u5355\u4F4D",name:"school_id",wrapperCol:{span:24},extra:!ko&&ha.school_id&&!(Ba!=null&&Ba.find(ri=>ri.name===ha.school_id))&&le.createElement("div",{className:vt.schoolHintWrap},le.createElement("span",{className:vt.colorCDCDCD},"\u672A\u627E\u5230\u5305\u542B\u201C",ha.school_id,"\u201D\u7684\u53D1\u5E03\u5355\u4F4D\uFF0C\u5982\u6709\u9700\u8981\uFF0C\u8BF7",le.createElement("span",{style:{color:"blue",cursor:"pointer"},onClick:()=>{var ri,Ar;je.default.info({title:"\u8054\u7CFB\u5E73\u53F0\u8FD0\u8425",width:400,icon:null,centered:!0,content:le.createElement("div",{style:{textAlign:"center"}},le.createElement("div",{style:{textAlign:"left"}},"\u8BF7\u626B\u7801\u6216\u641C\u7D22\u52A0\u5165\u5934\u6B4C\u5B98\u65B9\u4EA4\u6D41QQ\u7FA4\uFF1A",(ri=Di==null?void 0:Di.setting)==null?void 0:ri.homepage_tea_qq_number,"\uFF0C\u8054\u7CFB\u7FA4\u5185\u7684\u8FD0\u8425\u8FDB\u884C\u54A8\u8BE2\u548C\u7533\u8BF7\u65B0\u589E\u5B66\u6821\u540D\u79F0\u3002"),le.createElement("img",{src:`${Lt.Z.IMG_SERVER}/${(Ar=Di==null?void 0:Di.setting)==null?void 0:Ar.homepage_tea_qq_qrcode_url}`,style:{width:"170px",height:"170px",marginTop:"20px"}})),okText:"\u6211\u77E5\u9053\u4E86"})}},"\u8054\u7CFB\u5E73\u53F0\u8FD0\u8425"),"\u7533\u8BF7\u65B0\u589E")),rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u53D1\u5E03\u5355\u4F4D"}]},le.createElement(ce.Z,{placeholder:"\u8BF7\u8F93\u5165\u53D1\u5E03\u5355\u4F4D",showSearch:!0,size:"large"},ea.map((ri,Ar)=>le.createElement(Pt,{key:Ar,value:ri.name},ri.name))))),le.createElement("div",{className:vt.mdWrap},le.createElement(Rt.default.Item,{name:"intro",label:"\u7B80\u4ECB",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u5B9E\u8DF5\u8BFE\u7A0B\u7684\u7B80\u4ECB"},{whitespace:!0,message:"\u8BF7\u8F93\u5165\u5B9E\u8DF5\u8BFE\u7A0B\u7684\u7B80\u4ECB"},{max:65e3,message:"\u5B9E\u8DF5\u8BFE\u7A0B\u7684\u7B80\u4ECB\u6700\u5927\u9650\u523665000\u4E2A\u5B57\u7B26"}]},le.createElement(pt.Z,{watch:!0,defaultValue:ha.intro}))),le.createElement("div",{className:vt.mdWrap},le.createElement(Vt.Z,{align:"top",className:"mb10 mt10"},le.createElement(Qe.Z,null,le.createElement("span",{className:"c-red mr10"},"*")),le.createElement(Qe.Z,{flex:"1"},le.createElement(Rt.default.Item,{name:"learning_notes_title",label:"",style:{marginBottom:0},rules:[{required:!0,message:"\u8BF7\u8F93\u8BFE\u7A0B\u987B\u77E5\u6807\u9898"},{max:15,message:"\u8BF7\u8F93\u8BFE\u7A0B\u987B\u77E5\u6807\u9898\u6700\u5927\u9650\u523615\u4E2A\u5B57\u7B26"}]},le.createElement(ye.default,{style:{height:38},placeholder:"\u8BF7\u8F93\u5165"})))),le.createElement(Rt.default.Item,{name:"notice",label:"",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u5B9E\u8DF5\u8BFE\u7A0B\u7684\u8BFE\u7A0B\u987B\u77E5"},{whitespace:!0,message:"\u8BF7\u8F93\u5165\u5B9E\u8DF5\u8BFE\u7A0B\u7684\u8BFE\u7A0B\u987B\u77E5"},{max:65e3,message:"\u5B9E\u8DF5\u8BFE\u7A0B\u7684\u8BFE\u7A0B\u987B\u77E5\u6700\u5927\u9650\u523665000\u4E2A\u5B57\u7B26"}]},le.createElement(pt.Z,{insertTemp:"1",watch:!0,defaultValue:ha.notice}))),le.createElement("div",{className:vt.mdWrap},le.createElement("div",{style:{display:"flex",alignItems:"center"}},le.createElement(Qt.Z,{checked:bo,style:{marginRight:11,minWidth:32},onChange:ri=>{Hr(ri)}}),le.createElement("span",{className:vt.spanText},"\u8BFE\u7A0B\u516C\u544A",le.createElement("span",null,"\uFF08\u652F\u6301\u8001\u5E08\u81EA\u5B9A\u4E49\u516C\u544A\u5185\u5BB9\uFF0C\u4EE5\u5F39\u6846\u5F62\u5F0F\u63D0\u9192\u8BFE\u7A0B\u7684\u5B66\u4E60\u7528\u6237\uFF09"))),bo&&le.createElement(Rt.default.Item,{style:{marginTop:10},name:"content",label:"",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u5B9E\u8DF5\u8BFE\u7A0B\u7684\u8BFE\u7A0B\u63D0\u793A"},{max:1e4,message:"\u5B9E\u8DF5\u8BFE\u7A0B\u7684\u8BFE\u7A0B\u63D0\u793A\u6700\u5927\u9650\u523610000\u4E2A\u5B57\u7B26"}]},le.createElement(pt.Z,{insertTemp:"1",watch:!0,defaultValue:ha.content})),bo&&le.createElement("div",{style:{marginTop:20,borderBottom:"1px solid #DBDCE0",paddingBottom:7}},le.createElement("label",{style:{color:"#000",marginRight:10}},"\u63D0\u793A\u6B21\u6570"),le.createElement(Je.ZP.Group,{value:Uo,onChange:ri=>{ba(ri.target.value)}},le.createElement(Je.ZP,{className:"c-black",value:-1},"\u6BCF\u6B21"),le.createElement(Je.ZP,{className:"ml20 c-black",value:1},"\u4E00\u6B21")))),le.createElement("div",{className:vt.mdWrap,style:{marginTop:25}},le.createElement(Nt.default,{style:{marginLeft:Oo?"28px":"0"},checked:$o,onChange:ri=>{Do(ri==null?void 0:ri.target.checked)}},le.createElement("span",{className:vt.spanText},"\u5C55\u793A\u9ED8\u8BA4\u7AE0\u8282\u5E8F\u53F7",le.createElement("span",null,"\uFF08\u9009\u4E2D\uFF0C\u5219\u4E3A\u7AE0\u8282\u4E0B\u6240\u6709\u9879\u76EE\u6DFB\u52A0\u6392\u5E8F\u7F16\u53F7\uFF09"))),le.createElement("br",null),le.createElement(Nt.default,{style:{marginTop:"10px",marginLeft:Oo?"28px":"0"},checked:Vo,onChange:ri=>li(ri==null?void 0:ri.target.checked)},le.createElement("span",{className:vt.spanText},"\u81EA\u9009\u5E76\u5C55\u793ASPOC\u8BFE\u5802",le.createElement("span",null,"\uFF08\u9009\u4E2D\uFF0C\u5219\u5728\u6559\u5B66\u56E2\u961F\u4E0B\u65B9\u6DFB\u52A0SPOC\u8BFE\u5802\u6A21\u5757\uFF0C\u56E2\u961F\u6210\u5458\u53EF\u7BA1\u7406\u6A21\u5757\u4E2D\u8BFE\u5802\u7684\u5C55\u793A\uFF09"))),le.createElement("br",null),le.createElement(Nt.default,{style:{marginTop:"10px",marginLeft:Oo?"28px":"0"},checked:lo,onChange:ri=>er(ri==null?void 0:ri.target.checked)},le.createElement("span",{className:vt.spanText},"\u5C55\u793A\u6280\u672F\u6807\u7B7E\u6A21\u5757",le.createElement("span",null,"\uFF08\u9009\u4E2D\uFF0C\u5219\u5728\u6559\u5B66\u56E2\u961F\u4E0B\u65B9\u6DFB\u52A0\u6280\u672F\u6807\u7B7E\u6A21\u5757\uFF09"))),le.createElement("br",null),le.createElement(Nt.default,{style:{marginTop:"10px",marginLeft:Oo?"28px":"0"},checked:La,onChange:ri=>Ro(ri==null?void 0:ri.target.checked)},le.createElement("span",{className:vt.spanText},"\u5C55\u793A\u5386\u53F2\u8BFE\u5802\u6A21\u5757",le.createElement("span",null,"\uFF08\u9009\u4E2D\uFF0C\u5219\u5728\u6559\u5B66\u56E2\u961F\u4E0B\u65B9\u6DFB\u52A0\u5386\u53F2\u8BFE\u5802\u6A21\u5757\uFF0C\u56E2\u961F\u6210\u5458\u53EF\u7BA1\u7406\u6A21\u5757\u4E2D\u8BFE\u5802\u7684\u5C55\u793A\uFF09"))),le.createElement("br",null),le.createElement(Nt.default,{style:{marginTop:"10px",marginLeft:Oo?"28px":"0"},checked:Hl,onChange:ri=>As(ri==null?void 0:ri.target.checked)},le.createElement("span",{className:vt.spanText},"\u5141\u8BB8\u4E0B\u8F7D\u6559\u5B66\u8BFE\u4EF6",le.createElement("span",null,"\uFF08\u9009\u4E2D\uFF0C\u5219\u5141\u8BB8\u5B66\u4E60\u7528\u6237\u4E0B\u8F7D\u8BFE\u7A0B\u7AE0\u8282\u4E2D\u4E0A\u4F20\u7684\u6559\u5B66\u8BFE\u4EF6\uFF09"))),le.createElement("br",null),le.createElement(Nt.default,{style:{marginTop:"10px",marginLeft:Oo?"28px":"0"},checked:Hs,onChange:ri=>fs(ri==null?void 0:ri.target.checked)},le.createElement("span",{className:vt.spanText},"\u9ED8\u8BA4\u5C55\u5F00\u8BFE\u7A0B\u5C0F\u8282\u5185\u5BB9",le.createElement("span",null,"\uFF08\u9009\u4E2D\uFF0C\u5219\u7528\u6237\u5728\u8FDB\u5165\u662F\u5C06\u8BFE\u7A0B\u8BE6\u60C5\u9875\u9762\u65F6\uFF0C\u9ED8\u8BA4\u5C55\u5F00\u6240\u6709\u5C0F\u8282\u5185\u5BB9\uFF09"))),le.createElement("br",null),Oo&&le.createElement(nt.default,{style:{marginTop:"10px"},showIcon:!1,className:vt.tree,defaultExpandAll:!0,treeData:yo,onCheck:(ri,Ar)=>{zo(ri,Ar)},titleRender:ri=>le.createElement(Nt.default,{checked:Cr==null?void 0:Cr.includes(ri.key),indeterminate:ri.key==="all"?ca:!1,onChange:Ar=>{const Zr=Cr==null?void 0:Cr.indexOf(ri.key);if(Zr>-1)if(ri.key==="all")Cr.splice(0);else{Cr.splice(Zr,1);const Qr=Cr==null?void 0:Cr.indexOf("all");Qr>-1&&Cr.splice(Qr,1)}else ri.key==="all"?Cr.splice(0,Cr.length,"all","chapter","charts","cert_apply","knowledge_graph"):(Cr.push(ri.key),Cr.length>=4&&!(Cr!=null&&Cr.includes("all"))&&Cr.push("all"));console.log("checkedValueList--",Cr),$r([...Cr])}},ri.title)}),le.createElement("div",{className:"mt10"},le.createElement("div",{className:"c-black mb10"},"\u81EA\u5B9A\u4E49\u9876\u90E8\u80CC\u666F\u56FE"),le.createElement(et.default,{action:Lt.Z.API_SERVER+"/api/attachments.json",withCredentials:!0,fileList:qi,onChange:ri=>{var Ar,Zr;const Qr=(ri==null?void 0:ri.file.size)/1024/1024<2;if(!((Ar=ri.fileList)!=null&&Ar.length))return!1;Sr(Qr?(Zr=ri==null?void 0:ri.fileList)==null?void 0:Zr.slice(-1):[...qi])},beforeUpload:ri=>{const Ar=ri.type==="image/jpeg"||ri.type==="image/png";if(!Ar)return ie.ZP.error("\u53EA\u80FD\u4E0A\u4F20jpg \u6216\u8005png\u56FE\u7247"),!1;const Zr=ri.size/1024/1024<2;return Zr?Ar&&Zr:(ie.ZP.error("\u6587\u4EF6\u5927\u5C0F\u4E0D\u80FD\u5927\u4E8E2m"),!1)},onRemove:ri=>{Sr([])}},le.createElement("div",{className:vt.aBtn},"\u4E0A\u4F20\u56FE\u7247"),le.createElement("span",{style:{color:"#5F6367",pointerEvents:"none"}},"\uFF08\u672C\u9879\u975E\u5FC5\u9700\u3002\u5982\u4E0D\u4E0A\u4F20\uFF0C\u5219\u4F7F\u7528\u7CFB\u7EDF\u9ED8\u8BA4\u56FE\u7247\uFF1B\u5982\u4E0A\u4F20\uFF0C\u8BF7\u9009\u62E9jpg\u3001png\u683C\u5F0F\uFF0C\u5927\u5C0F\u4E0D\u8D85\u8FC72M\uFF0C\u5EFA\u8BAE\u5C3A\u5BF81920*240\u50CF\u7D20\uFF09"))),le.createElement("div",{className:"mt10"},le.createElement("div",{className:"c-black mb10"},"\u81EA\u5B9A\u4E49\u9876\u90E8\u5185\u5BB9\u56FE"),le.createElement(et.default,{action:Lt.Z.API_SERVER+"/api/attachments.json",withCredentials:!0,fileList:Ir,onChange:ri=>{var Ar,Zr;const Qr=(ri==null?void 0:ri.file.size)/1024/1024<2;if(!((Ar=ri.fileList)!=null&&Ar.length))return!1;Gr(Qr?(Zr=ri==null?void 0:ri.fileList)==null?void 0:Zr.slice(-1):[...Ir])},beforeUpload:ri=>{const Ar=ri.type==="image/jpeg"||ri.type==="image/png";if(!Ar)return ie.ZP.error("\u53EA\u80FD\u4E0A\u4F20jpg \u6216\u8005png\u56FE\u7247"),!1;const Zr=ri.size/1024/1024<2;return Zr?Ar&&Zr:(ie.ZP.error("\u6587\u4EF6\u5927\u5C0F\u4E0D\u80FD\u5927\u4E8E2m"),!1)},onRemove:ri=>{Gr([])}},le.createElement("div",{className:vt.aBtn},"\u4E0A\u4F20\u56FE\u7247"),le.createElement("span",{style:{color:"#5F6367",pointerEvents:"none"}},"\uFF08\u672C\u9879\u975E\u5FC5\u9700\u3002\u5982\u4E0D\u4E0A\u4F20\uFF0C\u5219\u4F7F\u7528\u7CFB\u7EDF\u9ED8\u8BA4\u56FE\u7247\uFF1B\u5982\u4E0A\u4F20\uFF0C\u8BF7\u9009\u62E9jpg\u3001png\u683C\u5F0F\uFF0C\u5927\u5C0F\u4E0D\u8D85\u8FC72M\uFF0C\u5EFA\u8BAE\u5C3A\u5BF81200*240\u50CF\u7D20\uFF09")))),le.createElement("div",{className:vt.backgroundFa},le.createElement("div",{className:vt.bBtn,onClick:Kl},"\u53D6\u6D88"),le.createElement(ct.ZP,{className:vt.cBtn,onClick:()=>wo.submit(),loading:Bi["newCourse/editCourse"]||Bi["newCourse/submitCourse"]},"\u63D0\u4EA4 "))),ue==2&&le.createElement("div",{className:vt.add_ai},le.createElement("div",{style:{margin:"20px 0"}},"\u6839\u636E\u60A8\u4E0A\u4F20\u7684\u8D44\u6599\u81EA\u52A8\u751F\u6210\u8BFE\u7A0B\u7B80\u4ECB\u3001\u8BFE\u7A0B\u76EE\u6807\u3001\u8BFE\u7A0B\u5927\u7EB2\u3001\u7AE0\u8282\u63CF\u8FF0\u3001\u8BFE\u7A0B\u8D44\u6E90\u3001\u77E5\u8BC6\u70B9\u3001\u77E5\u8BC6\u56FE\u8C31\u7B49\u5185\u5BB9"),le.createElement(Rt.default,{form:Ll,scrollToFirstError:!0,colon:!1},le.createElement(Rt.default.Item,{name:"file_ids"},le.createElement(pe.Z,{accept:".pdf, .docx, .doc, .xlsx, .xls, .txt, .md",maxSize:150,number:99,uploadText:"\u5EFA\u8BAE\u4E0A\u4F20\u8BFE\u7A0B\u4E66\u7C4D\u3001\u8BFE\u7A0B\u6559\u5B66\u5927\u7EB2\u7B49\u7C7B\u4F3C\u6587\u4EF6",setFileProgress:Sa,showFileProgress:!0}))),((ai=[-1,0,1])==null?void 0:ai.includes(Ve==null?void 0:Ve.state))&&le.createElement("div",{className:vt.paths_content},le.createElement("div",{className:vt.content_header},le.createElement("i",{className:"iconfont icon-ziyuanshibie font22 mb10",style:{color:(si=[1,2,3,4,5,6,7,8])!=null&&si.includes(Ve==null?void 0:Ve.phase)?"#2a56ca":"#bdbdbd"}}),le.createElement("i",{className:"iconfont icon-kechengjibenxinxi font22 mb10",style:{color:(ln=[2,3,4,5,6,7,8])!=null&&ln.includes(Ve==null?void 0:Ve.phase)?"#2a56ca":"#bdbdbd"}}),le.createElement("i",{className:"iconfont icon-kechengneirongziyuan font22 mb10",style:{color:(jn=[5,6,7,8])!=null&&jn.includes(Ve==null?void 0:Ve.phase)?"#2a56ca":"#bdbdbd"}})),le.createElement("div",{style:{display:"flex",position:"relative"}},le.createElement("div",{className:vt.header_box,style:{left:0}},le.createElement("img",{src:(ii=[1,2,3,4,5,6,7,8])!=null&&ii.includes(Ve==null?void 0:Ve.phase)?be:ze}),le.createElement("div",{className:vt.header_text,style:{color:(ki=[1,2,3,4,5,6,7,8])!=null&&ki.includes(Ve==null?void 0:Ve.phase)?"#fff":"#9096A3"}},(Ri=[1,2,3,4,5,6,7,8])!=null&&Ri.includes(Ve==null?void 0:Ve.phase)?"\u8D44\u6E90\u8BC6\u522B \u5DF2\u5B8C\u6210":"\u8D44\u6E90\u8BC6\u522B"),le.createElement("div",{style:{textAlign:"center",width:"386px"}},le.createElement("img",{src:He,style:{width:"233px",height:"179px"}}))),le.createElement("div",{className:vt.header_box,style:{left:"380px"}},le.createElement("img",{src:(Gt=[2,3,4,5,6,7,8])!=null&&Gt.includes(Ve==null?void 0:Ve.phase)?rn:ze}),le.createElement("div",{className:vt.header_text,style:{color:(fe=[2,3,4,5,6,7,8])!=null&&fe.includes(Ve==null?void 0:Ve.phase)?"#fff":"#9096A3"}},(Mn=[2,3,4,5,6,7,8])!=null&&Mn.includes(Ve==null?void 0:Ve.phase)?`\u8BFE\u7A0B\u57FA\u672C\u4FE1\u606F\u751F\u6210 ${(zn=[2,3,4])!=null&&zn.includes(Ve==null?void 0:Ve.phase)?"\u8FDB\u884C\u4E2D":"\u5DF2\u5B8C\u6210"}`:"\u8BFE\u7A0B\u57FA\u672C\u4FE1\u606F\u751F\u6210 \u7B49\u5F85\u4E2D"),le.createElement("div",{className:vt.lianjie}),le.createElement("div",{style:{textAlign:"center"}},le.createElement("div",{className:vt.buzou_box},le.createElement("div",{style:{display:"flex",alignItems:"center"}},((De=[0,1])==null?void 0:De.includes(Ve==null?void 0:Ve.phase))&&le.createElement("div",{style:{width:"16px",height:"16px",borderRadius:"8px",border:"2px solid rgba(48,97,208,0.1)"}}),((kn=[2])==null?void 0:kn.includes(Ve==null?void 0:Ve.phase))&&(Ve==null?void 0:Ve.state)!=-1&&le.createElement(lt.Z,{indicator:le.createElement(Ne.Z,{spin:!0}),size:"small"},le.createElement("div",{style:{width:"16px",height:"16px",borderRadius:"8px",border:"2px solid rgba(48,97,208,0.1)"}})),((Sn=[2])==null?void 0:Sn.includes(Ve==null?void 0:Ve.phase))&&(Ve==null?void 0:Ve.state)==-1&&le.createElement("i",{className:"iconfont icon-cuowu font16",style:{color:"#E30000"}}),((Fn=[3,4,5,6,7,8])==null?void 0:Fn.includes(Ve==null?void 0:Ve.phase))&&le.createElement("i",{className:"iconfont icon-wancheng3 font16",style:{color:"#83B6FF"}}),le.createElement("div",{style:{margin:"0 10px",color:(ei=[0,1])!=null&&ei.includes(Ve==null?void 0:Ve.phase)?"#9096A3":(On=[2])!=null&&On.includes(Ve==null?void 0:Ve.phase)&&(Ve==null?void 0:Ve.state)==-1?"red":"#83B6FF"}},"\u8BFE\u7A0B\u7B80\u4ECB\u751F\u6210"),le.createElement("div",{style:{color:(Qn=[0,1])!=null&&Qn.includes(Ve==null?void 0:Ve.phase)?"#9096A3":(Yn=[2])!=null&&Yn.includes(Ve==null?void 0:Ve.phase)&&(Ve==null?void 0:Ve.state)==-1?"red":"#83B6FF"}},(Ni=[0,1])!=null&&Ni.includes(Ve==null?void 0:Ve.phase)?"\u7B49\u5F85\u4E2D":(Pi=[2])!=null&&Pi.includes(Ve==null?void 0:Ve.phase)?(Ve==null?void 0:Ve.state)==-1?"\u751F\u6210\u5931\u8D25":"\u8FDB\u884C\u4E2D":"\u5DF2\u5B8C\u6210")),le.createElement("div",{style:{width:"2px",height:"30px",background:(bi=[0,1,2])!=null&&bi.includes(Ve==null?void 0:Ve.phase)?"rgba(48,97,208,0.1)":"#83B6FF",marginLeft:"7px"}}),le.createElement("div",{style:{display:"flex",alignItems:"center"}},((Ge=[0,1,2])==null?void 0:Ge.includes(Ve==null?void 0:Ve.phase))&&le.createElement("div",{style:{width:"16px",height:"16px",borderRadius:"8px",border:"2px solid rgba(48,97,208,0.1)"}}),((Xi=[3])==null?void 0:Xi.includes(Ve==null?void 0:Ve.phase))&&(Ve==null?void 0:Ve.state)!=-1&&le.createElement(lt.Z,{indicator:le.createElement(Ne.Z,{spin:!0}),size:"small"},le.createElement("div",{style:{width:"16px",height:"16px",borderRadius:"8px",border:"2px solid rgba(48,97,208,0.1)"}})),((dr=[3])==null?void 0:dr.includes(Ve==null?void 0:Ve.phase))&&(Ve==null?void 0:Ve.state)==-1&&le.createElement("i",{className:"iconfont icon-cuowu font16",style:{color:"#E30000"}}),((br=[4,5,6,7,8])==null?void 0:br.includes(Ve==null?void 0:Ve.phase))&&le.createElement("i",{className:"iconfont icon-wancheng3 font16",style:{color:"#83B6FF"}}),le.createElement("div",{style:{margin:"0 10px",color:(Ue=[0,1,2])!=null&&Ue.includes(Ve==null?void 0:Ve.phase)?"#9096A3":(Vn=[3])!=null&&Vn.includes(Ve==null?void 0:Ve.phase)&&(Ve==null?void 0:Ve.state)==-1?"red":"#83B6FF"}},"\u8BFE\u7A0B\u76EE\u6807\u751F\u6210"),le.createElement("div",{style:{color:(vi=[0,1,2])!=null&&vi.includes(Ve==null?void 0:Ve.phase)?"#9096A3":(pi=[3])!=null&&pi.includes(Ve==null?void 0:Ve.phase)&&(Ve==null?void 0:Ve.state)==-1?"red":"#83B6FF"}},(Fi=[0,1,2])!=null&&Fi.includes(Ve==null?void 0:Ve.phase)?"\u7B49\u5F85\u4E2D":(Wi=[3])!=null&&Wi.includes(Ve==null?void 0:Ve.phase)?(Ve==null?void 0:Ve.state)==-1?"\u751F\u6210\u5931\u8D25":"\u8FDB\u884C\u4E2D":"\u5DF2\u5B8C\u6210")),le.createElement("div",{style:{width:"2px",height:"30px",background:(Vi=[0,1,2,3])!=null&&Vi.includes(Ve==null?void 0:Ve.phase)?"rgba(48,97,208,0.1)":"#83B6FF",marginLeft:"7px"}}),le.createElement("div",{style:{display:"flex",alignItems:"center"}},((pr=[0,1,2,3])==null?void 0:pr.includes(Ve==null?void 0:Ve.phase))&&le.createElement("div",{style:{width:"16px",height:"16px",borderRadius:"8px",border:"2px solid rgba(48,97,208,0.1)"}}),((or=[4])==null?void 0:or.includes(Ve==null?void 0:Ve.phase))&&(Ve==null?void 0:Ve.state)!=-1&&le.createElement(lt.Z,{indicator:le.createElement(Ne.Z,{spin:!0}),size:"small"},le.createElement("div",{style:{width:"16px",height:"16px",borderRadius:"8px",border:"2px solid rgba(48,97,208,0.1)"}})),((hr=[4])==null?void 0:hr.includes(Ve==null?void 0:Ve.phase))&&(Ve==null?void 0:Ve.state)==-1&&le.createElement("i",{className:"iconfont icon-cuowu font16",style:{color:"#E30000"}}),((Xe=[5,6,7,8])==null?void 0:Xe.includes(Ve==null?void 0:Ve.phase))&&le.createElement("i",{className:"iconfont icon-wancheng3 font16",style:{color:"#83B6FF"}}),le.createElement("div",{style:{margin:"0 10px",color:(nr=[0,1,2,3])!=null&&nr.includes(Ve==null?void 0:Ve.phase)?"#9096A3":(qe=[4])!=null&&qe.includes(Ve==null?void 0:Ve.phase)&&(Ve==null?void 0:Ve.state)==-1?"red":"#83B6FF"}},"\u7AE0\u8282\u53CA\u63CF\u8FF0\u751F\u6210"),le.createElement("div",{style:{color:(xi=[0,1,2,3])!=null&&xi.includes(Ve==null?void 0:Ve.phase)?"#9096A3":(ir=[4])!=null&&ir.includes(Ve==null?void 0:Ve.phase)&&(Ve==null?void 0:Ve.state)==-1?"red":"#83B6FF"}},(fr=[0,1,2,3])!=null&&fr.includes(Ve==null?void 0:Ve.phase)?"\u7B49\u5F85\u4E2D":(Br=[4])!=null&&Br.includes(Ve==null?void 0:Ve.phase)?(Ve==null?void 0:Ve.state)==-1?"\u751F\u6210\u5931\u8D25":"\u8FDB\u884C\u4E2D":"\u5DF2\u5B8C\u6210"),((kr=[5,6,7,8])==null?void 0:kr.includes(Ve==null?void 0:Ve.phase))&&le.createElement("div",{style:{marginLeft:"10px",color:"#232B40"}},"\u5171\u751F\u6210",le.createElement("span",{style:{color:"#3061D0"}},Ve==null?void 0:Ve.stage_size),"\u4E2A\u7AE0\u8282"))))),le.createElement("div",{className:vt.header_box,style:{left:"760px"}},le.createElement("img",{src:(rr=[5,6,7,8])!=null&&rr.includes(Ve==null?void 0:Ve.phase)?rn:ze}),le.createElement("div",{className:vt.header_text,style:{color:(Kr=[5,6,7,8])!=null&&Kr.includes(Ve==null?void 0:Ve.phase)?"#fff":"#9096A3"}},(Ae=[5,6,7,8])!=null&&Ae.includes(Ve==null?void 0:Ve.phase)?`\u8BFE\u7A0B\u5185\u5BB9\u8D44\u6E90\u751F\u6210 ${(gn=[5,6,7])!=null&&gn.includes(Ve==null?void 0:Ve.phase)?"\u8FDB\u884C\u4E2D":"\u5DF2\u5B8C\u6210"}`:"\u8BFE\u7A0B\u5185\u5BB9\u8D44\u6E90\u751F\u6210 \u7B49\u5F85\u4E2D"),le.createElement("div",{className:vt.lianjie}),le.createElement("div",{style:{textAlign:"center"}},le.createElement("div",{className:vt.buzou_box},le.createElement("div",{style:{display:"flex",alignItems:"center"}},((Me=[0,1,2,3,4])==null?void 0:Me.includes(Ve==null?void 0:Ve.phase))&&le.createElement("div",{style:{width:"16px",height:"16px",borderRadius:"8px",border:"2px solid rgba(48,97,208,0.1)"}}),((At=[5])==null?void 0:At.includes(Ve==null?void 0:Ve.phase))&&(Ve==null?void 0:Ve.state)!=-1&&le.createElement(lt.Z,{indicator:le.createElement(Ne.Z,{spin:!0}),size:"small"},le.createElement("div",{style:{width:"16px",height:"16px",borderRadius:"8px",border:"2px solid rgba(48,97,208,0.1)"}})),((Nn=[5])==null?void 0:Nn.includes(Ve==null?void 0:Ve.phase))&&(Ve==null?void 0:Ve.state)==-1&&le.createElement("i",{className:"iconfont icon-cuowu font16",style:{color:"#E30000"}}),((Hn=[6,7,8])==null?void 0:Hn.includes(Ve==null?void 0:Ve.phase))&&le.createElement("i",{className:"iconfont icon-wancheng3 font16",style:{color:"#83B6FF"}}),le.createElement("div",{style:{margin:"0 10px",color:(gi=[0,1,2,3,4])!=null&&gi.includes(Ve==null?void 0:Ve.phase)?"#9096A3":(ci=[5])!=null&&ci.includes(Ve==null?void 0:Ve.phase)&&(Ve==null?void 0:Ve.state)==-1?"red":"#83B6FF"}},"\u77E5\u8BC6\u70B9\u751F\u6210"),le.createElement("div",{style:{color:(ti=[0,1,2,3,4])!=null&&ti.includes(Ve==null?void 0:Ve.phase)?"#9096A3":(sn=[5])!=null&&sn.includes(Ve==null?void 0:Ve.phase)&&(Ve==null?void 0:Ve.state)==-1?"red":"#83B6FF"}},(Dn=[0,1,2,3,4])!=null&&Dn.includes(Ve==null?void 0:Ve.phase)?"\u7B49\u5F85\u4E2D":(Gn=[5])!=null&&Gn.includes(Ve==null?void 0:Ve.phase)?(Ve==null?void 0:Ve.state)==-1?"\u751F\u6210\u5931\u8D25":"\u8FDB\u884C\u4E2D":"\u5DF2\u5B8C\u6210"),((Ln=[6,7,8])==null?void 0:Ln.includes(Ve==null?void 0:Ve.phase))&&le.createElement("div",{style:{marginLeft:"10px",color:"#232B40"}},"\u5171\u751F\u6210",le.createElement("span",{style:{color:"#3061D0"}},Ve==null?void 0:Ve.resource_size),"\u4E2A\u77E5\u8BC6\u70B9")),le.createElement("div",{style:{width:"2px",height:"30px",background:(Zn=[0,1,2,3,4,5])!=null&&Zn.includes(Ve==null?void 0:Ve.phase)?"rgba(48,97,208,0.1)":"#83B6FF",marginLeft:"7px"}}),le.createElement("div",{style:{display:"flex",alignItems:"center"}},((Mi=[0,1,2,3,4,5])==null?void 0:Mi.includes(Ve==null?void 0:Ve.phase))&&le.createElement("div",{style:{width:"16px",height:"16px",borderRadius:"8px",border:"2px solid rgba(48,97,208,0.1)"}}),((hi=[6])==null?void 0:hi.includes(Ve==null?void 0:Ve.phase))&&(Ve==null?void 0:Ve.state)!=-1&&le.createElement(lt.Z,{indicator:le.createElement(Ne.Z,{spin:!0}),size:"small"},le.createElement("div",{style:{width:"16px",height:"16px",borderRadius:"8px",border:"2px solid rgba(48,97,208,0.1)"}})),((bn=[6])==null?void 0:bn.includes(Ve==null?void 0:Ve.phase))&&(Ve==null?void 0:Ve.state)==-1&&le.createElement("i",{className:"iconfont icon-cuowu font16",style:{color:"#E30000"}}),((Ke=[7,8])==null?void 0:Ke.includes(Ve==null?void 0:Ve.phase))&&le.createElement("i",{className:"iconfont icon-wancheng3 font16",style:{color:"#83B6FF"}}),le.createElement("div",{style:{margin:"0 10px",color:(qn=[0,1,2,3,4,5])!=null&&qn.includes(Ve==null?void 0:Ve.phase)?"#9096A3":(Ci=[6])!=null&&Ci.includes(Ve==null?void 0:Ve.phase)&&(Ve==null?void 0:Ve.state)==-1?"red":"#83B6FF"}},"\u77E5\u8BC6\u70B9\u8D44\u6E90\u751F\u6210"),le.createElement("div",{style:{color:(ar=[0,1,2,3,4,5])!=null&&ar.includes(Ve==null?void 0:Ve.phase)?"#9096A3":(Oi=[6])!=null&&Oi.includes(Ve==null?void 0:Ve.phase)&&(Ve==null?void 0:Ve.state)==-1?"red":"#83B6FF"}},(ur=[0,1,2,3,4,5])!=null&&ur.includes(Ve==null?void 0:Ve.phase)?"\u7B49\u5F85\u4E2D":(sr=[6])!=null&&sr.includes(Ve==null?void 0:Ve.phase)?(Ve==null?void 0:Ve.state)==-1?"\u751F\u6210\u5931\u8D25":"\u8FDB\u884C\u4E2D":"\u5DF2\u5B8C\u6210"),((yr=[7,8])==null?void 0:yr.includes(Ve==null?void 0:Ve.phase))&&le.createElement("div",{style:{marginLeft:"10px",color:"#232B40"}},"\u5171\u751F\u6210",le.createElement("span",{style:{color:"#3061D0"}},Ve==null?void 0:Ve.resource_size),"\u4E2A\u8D44\u6E90")),le.createElement("div",{style:{width:"2px",height:"30px",background:(Tr=[0,1,2,3,4,5,6])!=null&&Tr.includes(Ve==null?void 0:Ve.phase)?"rgba(48,97,208,0.1)":"#83B6FF",marginLeft:"7px"}}),le.createElement("div",{style:{display:"flex",alignItems:"center"}},((jr=[0,1,2,3,4,5,6])==null?void 0:jr.includes(Ve==null?void 0:Ve.phase))&&le.createElement("div",{style:{width:"16px",height:"16px",borderRadius:"8px",border:"2px solid rgba(48,97,208,0.1)"}}),((Jr=[7])==null?void 0:Jr.includes(Ve==null?void 0:Ve.phase))&&(Ve==null?void 0:Ve.state)!=-1&&le.createElement(lt.Z,{indicator:le.createElement(Ne.Z,{spin:!0}),size:"small"},le.createElement("div",{style:{width:"16px",height:"16px",borderRadius:"8px",border:"2px solid rgba(48,97,208,0.1)"}})),((Ee=[7])==null?void 0:Ee.includes(Ve==null?void 0:Ve.phase))&&(Ve==null?void 0:Ve.state)==-1&&le.createElement("i",{className:"iconfont icon-cuowu font16",style:{color:"#E30000"}}),((Fr=[8])==null?void 0:Fr.includes(Ve==null?void 0:Ve.phase))&&le.createElement("i",{className:"iconfont icon-wancheng3 font16",style:{color:"#83B6FF"}}),le.createElement("div",{style:{margin:"0 10px",color:(Mr=[0,1,2,3,4,5,6])!=null&&Mr.includes(Ve==null?void 0:Ve.phase)?"#9096A3":(Ui=[7])!=null&&Ui.includes(Ve==null?void 0:Ve.phase)&&(Ve==null?void 0:Ve.state)==-1?"red":"#83B6FF"}},"\u77E5\u8BC6\u56FE\u8C31\u751F\u6210"),le.createElement("div",{style:{color:(vr=[0,1,2,3,4,5,6])!=null&&vr.includes(Ve==null?void 0:Ve.phase)?"#9096A3":(mr=[7])!=null&&mr.includes(Ve==null?void 0:Ve.phase)&&(Ve==null?void 0:Ve.state)==-1?"red":"#83B6FF"}},(_r=[0,1,2,3,4,5,6])!=null&&_r.includes(Ve==null?void 0:Ve.phase)?"\u7B49\u5F85\u4E2D":(Yr=[7])!=null&&Yr.includes(Ve==null?void 0:Ve.phase)?(Ve==null?void 0:Ve.state)==-1?"\u751F\u6210\u5931\u8D25":"\u8FDB\u884C\u4E2D":"\u5DF2\u5B8C\u6210"),((Pr=[8])==null?void 0:Pr.includes(Ve==null?void 0:Ve.phase))&&le.createElement("div",{style:{marginLeft:"10px",color:"#232B40"}},"\u5171\u751F\u6210",le.createElement("span",{style:{color:"#3061D0"}},Ve==null?void 0:Ve.knowledge_size),"\u4E2A\u77E5\u8BC6\u56FE\u8C31"))))))),le.createElement(lt.Z,{spinning:Ma},le.createElement("div",{className:(Ve==null?void 0:Ve.state)==0||na?vt.start_style:vt.no_start_style,onClick:()=>ji(void 0,null,function*(){var ri;if(na)return ie.ZP.error("\u6709\u6587\u4EF6\u672A\u4E0A\u4F20\u5B8C\u6210\uFF0C\u8BF7\u7B49\u6587\u4EF6\u4E0A\u4F20\u5B8C\u6210\u540E\u518D\u751F\u6210"),!1;if(!(0,Bn.$O)())return Ml(!0),!1;if((Ve==null?void 0:Ve.state)==-2||(Ve==null?void 0:Ve.state)==-1){ya(!0);let Ar=[];if((ri=Ll.getFieldValue("file_ids"))==null||ri.map(Zr=>{var Qr,Co;Ar.push(((Qr=Zr==null?void 0:Zr.response)==null?void 0:Qr.container_id)||((Co=Zr==null?void 0:Zr.response)==null?void 0:Co.id))}),(Ar==null?void 0:Ar.length)>0){const Zr=yield(0,Ot.ZP)("/api/subject_generations.json",{method:"post",body:{attachment_ids:Ar}});(Zr==null?void 0:Zr.status)==0&&(ie.ZP.success("\u5F00\u59CB\u751F\u6210"),_s(),Bo.current=setInterval(()=>{_s()},1e3))}else ie.ZP.error("\u8BF7\u4E0A\u4F20\u8BFE\u7A0B\u8D44\u6599\uFF0C\u5EFA\u8BAE\u4E0A\u4F20\u4E66\u7C4D\u3001\u8BFE\u7A0B\u6559\u5B66\u5927\u7EB2\u7B49");ya(!1)}else if((Ve==null?void 0:Ve.state)==1){ya(!0);const Ar=yield(0,Ot.ZP)("/api/subject_generations/finish.json",{method:"post",body:{id:Ve==null?void 0:Ve.id}});(Ar==null?void 0:Ar.status)==0&&se.history.push(`/paths/${Ve==null?void 0:Ve.subject_id}`),ya(!1)}})},(Ve==null?void 0:Ve.state)==1?"\u5B8C\u6210\u8BFE\u7A0B\u521B\u5EFA":(Ve==null?void 0:Ve.state)==0?"\u8BFE\u7A0B\u751F\u6210\u4E2D\uFF0C\u8BF7\u7A0D\u540E...":(Ve==null?void 0:Ve.state)==-1?"\u91CD\u65B0\u751F\u6210\u8BFE\u7A0B":"\u5F00\u59CB\u751F\u6210\u8BFE\u7A0B"))),bl&&le.createElement("div",{style:{width:"100vw",height:"100vh",position:"fixed",top:0,left:0,background:"rgba(0,0,0,.5)",zIndex:200,display:"flex",alignItems:"center",justifyContent:"center"}},le.createElement("div",{style:{width:"500px",height:"515px",textAlign:"center"}},le.createElement("img",{src:xe,style:{marginLeft:"auto",display:"block",cursor:"pointer",width:"30px",height:"30px"},onClick:()=>{Ml(!1)}}),le.createElement("img",{src:yn,style:{display:"block",marginTop:"-20px",width:"460px",height:"500px"}}))),le.createElement(ee,{schoolName:ha.school_id,onSuccess:Ps}),le.createElement(de.Z,{open:kl,onCancel:()=>{ou(!1)}})))};var Si=(0,se.connect)(({user:on,newCourse:dn,loading:pn,globalSetting:_n})=>({user:on,newCourse:dn,globalSetting:_n,loading:pn.effects}))(ni)},98846:function(Tn,oi,Dt){"use strict";Dt.d(oi,{P:function(){return Ft}});const Ft=[{value:"\u5317\u4EAC",label:"\u5317\u4EAC",children:[{value:"\u4E1C\u57CE",label:"\u4E1C\u57CE"},{value:"\u897F\u57CE",label:"\u897F\u57CE"},{value:"\u671D\u9633",label:"\u671D\u9633"},{value:"\u4E30\u53F0",label:"\u4E30\u53F0"},{value:"\u77F3\u666F\u5C71",label:"\u77F3\u666F\u5C71"},{value:"\u6D77\u6DC0",label:"\u6D77\u6DC0"},{value:"\u95E8\u5934\u6C9F",label:"\u95E8\u5934\u6C9F"},{value:"\u623F\u5C71",label:"\u623F\u5C71"},{value:"\u901A\u5DDE",label:"\u901A\u5DDE"},{value:"\u987A\u4E49",label:"\u987A\u4E49"},{value:"\u660C\u5E73",label:"\u660C\u5E73"},{value:"\u5927\u5174",label:"\u5927\u5174"},{value:"\u5E73\u8C37",label:"\u5E73\u8C37"},{value:"\u6000\u67D4",label:"\u6000\u67D4"},{value:"\u5BC6\u4E91",label:"\u5BC6\u4E91"},{value:"\u5EF6\u5E86",label:"\u5EF6\u5E86"}]},{value:"\u4E0A\u6D77",label:"\u4E0A\u6D77",children:[{value:"\u5D07\u660E",label:"\u5D07\u660E"},{value:"\u9EC4\u6D66",label:"\u9EC4\u6D66"},{value:"\u5362\u6E7E",label:"\u5362\u6E7E"},{value:"\u5F90\u6C47",label:"\u5F90\u6C47"},{value:"\u957F\u5B81",label:"\u957F\u5B81"},{value:"\u9759\u5B89",label:"\u9759\u5B89"},{value:"\u666E\u9640",label:"\u666E\u9640"},{value:"\u95F8\u5317",label:"\u95F8\u5317"},{value:"\u8679\u53E3",label:"\u8679\u53E3"},{value:"\u6768\u6D66",label:"\u6768\u6D66"},{value:"\u95F5\u884C",label:"\u95F5\u884C"},{value:"\u5B9D\u5C71",label:"\u5B9D\u5C71"},{value:"\u5609\u5B9A",label:"\u5609\u5B9A"},{value:"\u6D66\u4E1C",label:"\u6D66\u4E1C"},{value:"\u91D1\u5C71",label:"\u91D1\u5C71"},{value:"\u677E\u6C5F",label:"\u677E\u6C5F"},{value:"\u9752\u6D66",label:"\u9752\u6D66"},{value:"\u5357\u6C47",label:"\u5357\u6C47"},{value:"\u5949\u8D24",label:"\u5949\u8D24"}]},{value:"\u5E7F\u4E1C",label:"\u5E7F\u4E1C",children:[{value:"\u5E7F\u5DDE",label:"\u5E7F\u5DDE"},{value:"\u6DF1\u5733",label:"\u6DF1\u5733"},{value:"\u73E0\u6D77",label:"\u73E0\u6D77"},{value:"\u4E1C\u839E",label:"\u4E1C\u839E"},{value:"\u4E2D\u5C71",label:"\u4E2D\u5C71"},{value:"\u4F5B\u5C71",label:"\u4F5B\u5C71"},{value:"\u60E0\u5DDE",label:"\u60E0\u5DDE"},{value:"\u6CB3\u6E90",label:"\u6CB3\u6E90"},{value:"\u6F6E\u5DDE",label:"\u6F6E\u5DDE"},{value:"\u6C5F\u95E8",label:"\u6C5F\u95E8"},{value:"\u63ED\u9633",label:"\u63ED\u9633"},{value:"\u8302\u540D",label:"\u8302\u540D"},{value:"\u6885\u5DDE",label:"\u6885\u5DDE"},{value:"\u6E05\u8FDC",label:"\u6E05\u8FDC"},{value:"\u6C55\u5934",label:"\u6C55\u5934"},{value:"\u6C55\u5C3E",label:"\u6C55\u5C3E"},{value:"\u97F6\u5173",label:"\u97F6\u5173"},{value:"\u987A\u5FB7",label:"\u987A\u5FB7"},{value:"\u9633\u6C5F",label:"\u9633\u6C5F"},{value:"\u4E91\u6D6E",label:"\u4E91\u6D6E"},{value:"\u6E5B\u6C5F",label:"\u6E5B\u6C5F"},{value:"\u8087\u5E86",label:"\u8087\u5E86"}]},{value:"\u6C5F\u82CF",label:"\u6C5F\u82CF",children:[{value:"\u5357\u4EAC",label:"\u5357\u4EAC"},{value:"\u5E38\u719F",label:"\u5E38\u719F"},{value:"\u5E38\u5DDE",label:"\u5E38\u5DDE"},{value:"\u6D77\u95E8",label:"\u6D77\u95E8"},{value:"\u6DEE\u5B89",label:"\u6DEE\u5B89"},{value:"\u6C5F\u90FD",label:"\u6C5F\u90FD"},{value:"\u6C5F\u9634",label:"\u6C5F\u9634"},{value:"\u6606\u5C71",label:"\u6606\u5C71"},{value:"\u8FDE\u4E91\u6E2F",label:"\u8FDE\u4E91\u6E2F"},{value:"\u5357\u901A",label:"\u5357\u901A"},{value:"\u542F\u4E1C",label:"\u542F\u4E1C"},{value:"\u6CAD\u9633",label:"\u6CAD\u9633"},{value:"\u5BBF\u8FC1",label:"\u5BBF\u8FC1"},{value:"\u82CF\u5DDE",label:"\u82CF\u5DDE"},{value:"\u592A\u4ED3",label:"\u592A\u4ED3"},{value:"\u6CF0\u5DDE",label:"\u6CF0\u5DDE"},{value:"\u540C\u91CC",label:"\u540C\u91CC"},{value:"\u65E0\u9521",label:"\u65E0\u9521"},{value:"\u5F90\u5DDE",label:"\u5F90\u5DDE"},{value:"\u76D0\u57CE",label:"\u76D0\u57CE"},{value:"\u626C\u5DDE",label:"\u626C\u5DDE"},{value:"\u5B9C\u5174",label:"\u5B9C\u5174"},{value:"\u4EEA\u5F81",label:"\u4EEA\u5F81"},{value:"\u5F20\u5BB6\u6E2F",label:"\u5F20\u5BB6\u6E2F"},{value:"\u9547\u6C5F",label:"\u9547\u6C5F"}]},{value:"\u91CD\u5E86",label:"\u91CD\u5E86",children:[{value:"\u4E07\u5DDE",label:"\u4E07\u5DDE"},{value:"\u6DAA\u9675",label:"\u6DAA\u9675"},{value:"\u6E1D\u4E2D",label:"\u6E1D\u4E2D"},{value:"\u5927\u6E21\u53E3",label:"\u5927\u6E21\u53E3"},{value:"\u6C5F\u5317",label:"\u6C5F\u5317"},{value:"\u6C99\u576A\u575D",label:"\u6C99\u576A\u575D"},{value:"\u4E5D\u9F99\u5761",label:"\u4E5D\u9F99\u5761"},{value:"\u5357\u5CB8",label:"\u5357\u5CB8"},{value:"\u5317\u789A",label:"\u5317\u789A"},{value:"\u4E07\u76DB",label:"\u4E07\u76DB"},{value:"\u53CC\u6322",label:"\u53CC\u6322"},{value:"\u6E1D\u5317",label:"\u6E1D\u5317"},{value:"\u5DF4\u5357",label:"\u5DF4\u5357"},{value:"\u9ED4\u6C5F",label:"\u9ED4\u6C5F"},{value:"\u957F\u5BFF",label:"\u957F\u5BFF"},{value:"\u7DA6\u6C5F",label:"\u7DA6\u6C5F"},{value:"\u6F7C\u5357",label:"\u6F7C\u5357"},{value:"\u94DC\u6881",label:"\u94DC\u6881"},{value:"\u5927\u8DB3",label:"\u5927\u8DB3"},{value:"\u8363\u660C",label:"\u8363\u660C"},{value:"\u58C1\u5C71",label:"\u58C1\u5C71"},{value:"\u6881\u5E73",label:"\u6881\u5E73"},{value:"\u57CE\u53E3",label:"\u57CE\u53E3"},{value:"\u4E30\u90FD",label:"\u4E30\u90FD"},{value:"\u57AB\u6C5F",label:"\u57AB\u6C5F"},{value:"\u6B66\u9686",label:"\u6B66\u9686"},{value:"\u5FE0\u53BF",label:"\u5FE0\u53BF"},{value:"\u5F00\u53BF",label:"\u5F00\u53BF"},{value:"\u4E91\u9633",label:"\u4E91\u9633"},{value:"\u5949\u8282",label:"\u5949\u8282"},{value:"\u5DEB\u5C71",label:"\u5DEB\u5C71"},{value:"\u5DEB\u6EAA",label:"\u5DEB\u6EAA"},{value:"\u77F3\u67F1",label:"\u77F3\u67F1"},{value:"\u79C0\u5C71",label:"\u79C0\u5C71"},{value:"\u9149\u9633",label:"\u9149\u9633"},{value:"\u5F6D\u6C34",label:"\u5F6D\u6C34"},{value:"\u6C5F\u6D25",label:"\u6C5F\u6D25"},{value:"\u5408\u5DDD",label:"\u5408\u5DDD"},{value:"\u6C38\u5DDD",label:"\u6C38\u5DDD"},{value:"\u5357\u5DDD",label:"\u5357\u5DDD"}]},{value:"\u5B89\u5FBD",label:"\u5B89\u5FBD",children:[{value:"\u5408\u80A5",label:"\u5408\u80A5"},{value:"\u5B89\u5E86",label:"\u5B89\u5E86"},{value:"\u868C\u57E0",label:"\u868C\u57E0"},{value:"\u4EB3\u5DDE",label:"\u4EB3\u5DDE"},{value:"\u5DE2\u6E56",label:"\u5DE2\u6E56"},{value:"\u6EC1\u5DDE",label:"\u6EC1\u5DDE"},{value:"\u961C\u9633",label:"\u961C\u9633"},{value:"\u8D35\u6C60",label:"\u8D35\u6C60"},{value:"\u6DEE\u5317",label:"\u6DEE\u5317"},{value:"\u6DEE\u5316",label:"\u6DEE\u5316"},{value:"\u6DEE\u5357",label:"\u6DEE\u5357"},{value:"\u9EC4\u5C71",label:"\u9EC4\u5C71"},{value:"\u4E5D\u534E\u5C71",label:"\u4E5D\u534E\u5C71"},{value:"\u516D\u5B89",label:"\u516D\u5B89"},{value:"\u9A6C\u978D\u5C71",label:"\u9A6C\u978D\u5C71"},{value:"\u5BBF\u5DDE",label:"\u5BBF\u5DDE"},{value:"\u94DC\u9675",label:"\u94DC\u9675"},{value:"\u5C6F\u6EAA",label:"\u5C6F\u6EAA"},{value:"\u829C\u6E56",label:"\u829C\u6E56"},{value:"\u5BA3\u57CE",label:"\u5BA3\u57CE"}]},{value:"\u798F\u5EFA",label:"\u798F\u5EFA",children:[{value:"\u798F\u5DDE",label:"\u798F\u5DDE"},{value:"\u53A6\u95E8",label:"\u53A6\u95E8"},{value:"\u6CC9\u5DDE",label:"\u6CC9\u5DDE"},{value:"\u6F33\u5DDE",label:"\u6F33\u5DDE"},{value:"\u9F99\u5CA9",label:"\u9F99\u5CA9"},{value:"\u5357\u5E73",label:"\u5357\u5E73"},{value:"\u5B81\u5FB7",label:"\u5B81\u5FB7"},{value:"\u8386\u7530",label:"\u8386\u7530"},{value:"\u4E09\u660E",label:"\u4E09\u660E"}]},{value:"\u7518\u8083",label:"\u7518\u8083",children:[{value:"\u5170\u5DDE",label:"\u5170\u5DDE"},{value:"\u5609\u5CEA\u5173",label:"\u5609\u5CEA\u5173"},{value:"\u767D\u94F6",label:"\u767D\u94F6"},{value:"\u5B9A\u897F",label:"\u5B9A\u897F"},{value:"\u6566\u714C",label:"\u6566\u714C"},{value:"\u7518\u5357",label:"\u7518\u5357"},{value:"\u91D1\u660C",label:"\u91D1\u660C"},{value:"\u9152\u6CC9",label:"\u9152\u6CC9"},{value:"\u4E34\u590F",label:"\u4E34\u590F"},{value:"\u5E73\u51C9",label:"\u5E73\u51C9"},{value:"\u5929\u6C34",label:"\u5929\u6C34"},{value:"\u9647\u5357",label:"\u9647\u5357"},{value:"\u6B66\u5A01",label:"\u6B66\u5A01"},{value:"\u897F\u5CF0",label:"\u897F\u5CF0"},{value:"\u5F20\u6396",label:"\u5F20\u6396"}]},{value:"\u5E7F\u897F",label:"\u5E7F\u897F",children:[{value:"\u5357\u5B81",label:"\u5357\u5B81"},{value:"\u6765\u5BBE",label:"\u6765\u5BBE"},{value:"\u767E\u8272",label:"\u767E\u8272"},{value:"\u5317\u6D77",label:"\u5317\u6D77"},{value:"\u6842\u6797",label:"\u6842\u6797"},{value:"\u9632\u57CE\u6E2F",label:"\u9632\u57CE\u6E2F"},{value:"\u8D35\u6E2F",label:"\u8D35\u6E2F"},{value:"\u6CB3\u6C60",label:"\u6CB3\u6C60"},{value:"\u8D3A\u5DDE",label:"\u8D3A\u5DDE"},{value:"\u67F3\u5DDE",label:"\u67F3\u5DDE"},{value:"\u94A6\u5DDE",label:"\u94A6\u5DDE"},{value:"\u68A7\u5DDE",label:"\u68A7\u5DDE"},{value:"\u7389\u6797",label:"\u7389\u6797"}]},{value:"\u8D35\u5DDE",label:"\u8D35\u5DDE",children:[{value:"\u8D35\u9633",label:"\u8D35\u9633"},{value:"\u5B89\u987A",label:"\u5B89\u987A"},{value:"\u6BD5\u8282",label:"\u6BD5\u8282"},{value:"\u90FD\u5300",label:"\u90FD\u5300"},{value:"\u51EF\u91CC",label:"\u51EF\u91CC"},{value:"\u516D\u76D8\u6C34",label:"\u516D\u76D8\u6C34"},{value:"\u94DC\u4EC1",label:"\u94DC\u4EC1"},{value:"\u5174\u4E49",label:"\u5174\u4E49"},{value:"\u7389\u5C4F",label:"\u7389\u5C4F"},{value:"\u9075\u4E49",label:"\u9075\u4E49"}]},{value:"\u6D77\u5357",label:"\u6D77\u5357",children:[{value:"\u6D77\u53E3",label:"\u6D77\u53E3"},{value:"\u510B\u53BF",label:"\u510B\u53BF"},{value:"\u9675\u6C34",label:"\u9675\u6C34"},{value:"\u743C\u6D77",label:"\u743C\u6D77"},{value:"\u4E09\u4E9A",label:"\u4E09\u4E9A"},{value:"\u901A\u4EC0",label:"\u901A\u4EC0"},{value:"\u4E07\u5B81",label:"\u4E07\u5B81"}]},{value:"\u6CB3\u5317",label:"\u6CB3\u5317",children:[{value:"\u77F3\u5BB6\u5E84",label:"\u77F3\u5BB6\u5E84"},{value:"\u4FDD\u5B9A",label:"\u4FDD\u5B9A"},{value:"\u5317\u6234\u6CB3",label:"\u5317\u6234\u6CB3"},{value:"\u6CA7\u5DDE",label:"\u6CA7\u5DDE"},{value:"\u627F\u5FB7",label:"\u627F\u5FB7"},{value:"\u4E30\u6DA6",label:"\u4E30\u6DA6"},{value:"\u90AF\u90F8",label:"\u90AF\u90F8"},{value:"\u8861\u6C34",label:"\u8861\u6C34"},{value:"\u5ECA\u574A",label:"\u5ECA\u574A"},{value:"\u5357\u6234\u6CB3",label:"\u5357\u6234\u6CB3"},{value:"\u79E6\u7687\u5C9B",label:"\u79E6\u7687\u5C9B"},{value:"\u5510\u5C71",label:"\u5510\u5C71"},{value:"\u65B0\u57CE",label:"\u65B0\u57CE"},{value:"\u90A2\u53F0",label:"\u90A2\u53F0"},{value:"\u5F20\u5BB6\u53E3",label:"\u5F20\u5BB6\u53E3"}]},{value:"\u9ED1\u9F99\u6C5F",label:"\u9ED1\u9F99\u6C5F",children:[{value:"\u54C8\u5C14\u6EE8",label:"\u54C8\u5C14\u6EE8"},{value:"\u5317\u5B89",label:"\u5317\u5B89"},{value:"\u5927\u5E86",label:"\u5927\u5E86"},{value:"\u5927\u5174\u5B89\u5CAD",label:"\u5927\u5174\u5B89\u5CAD"},{value:"\u9E64\u5C97",label:"\u9E64\u5C97"},{value:"\u9ED1\u6CB3",label:"\u9ED1\u6CB3"},{value:"\u4F73\u6728\u65AF",label:"\u4F73\u6728\u65AF"},{value:"\u9E21\u897F",label:"\u9E21\u897F"},{value:"\u7261\u4E39\u6C5F",label:"\u7261\u4E39\u6C5F"},{value:"\u9F50\u9F50\u54C8\u5C14",label:"\u9F50\u9F50\u54C8\u5C14"},{value:"\u4E03\u53F0\u6CB3",label:"\u4E03\u53F0\u6CB3"},{value:"\u53CC\u9E2D\u5C71",label:"\u53CC\u9E2D\u5C71"},{value:"\u7EE5\u5316",label:"\u7EE5\u5316"},{value:"\u4F0A\u6625",label:"\u4F0A\u6625"}]},{value:"\u6CB3\u5357",label:"\u6CB3\u5357",children:[{value:"\u90D1\u5DDE",label:"\u90D1\u5DDE"},{value:"\u5B89\u9633",label:"\u5B89\u9633"},{value:"\u9E64\u58C1",label:"\u9E64\u58C1"},{value:"\u6F62\u5DDD",label:"\u6F62\u5DDD"},{value:"\u7126\u4F5C",label:"\u7126\u4F5C"},{value:"\u6D4E\u6E90",label:"\u6D4E\u6E90"},{value:"\u5F00\u5C01",label:"\u5F00\u5C01"},{value:"\u6F2F\u6CB3",label:"\u6F2F\u6CB3"},{value:"\u6D1B\u9633",label:"\u6D1B\u9633"},{value:"\u5357\u9633",label:"\u5357\u9633"},{value:"\u5E73\u9876\u5C71",label:"\u5E73\u9876\u5C71"},{value:"\u6FEE\u9633",label:"\u6FEE\u9633"},{value:"\u4E09\u95E8\u5CE1",label:"\u4E09\u95E8\u5CE1"},{value:"\u5546\u4E18",label:"\u5546\u4E18"},{value:"\u65B0\u4E61",label:"\u65B0\u4E61"},{value:"\u4FE1\u9633",label:"\u4FE1\u9633"},{value:"\u8BB8\u660C",label:"\u8BB8\u660C"},{value:"\u5468\u53E3",label:"\u5468\u53E3"},{value:"\u9A7B\u9A6C\u5E97",label:"\u9A7B\u9A6C\u5E97"}]},{value:"\u9999\u6E2F",label:"\u9999\u6E2F",children:[{value:"\u9999\u6E2F",label:"\u9999\u6E2F"},{value:"\u4E5D\u9F99",label:"\u4E5D\u9F99"},{value:"\u65B0\u754C",label:"\u65B0\u754C"}]},{value:"\u6E56\u5317",label:"\u6E56\u5317",children:[{value:"\u6B66\u6C49",label:"\u6B66\u6C49"},{value:"\u5929\u95E8",label:"\u5929\u95E8"},{value:"\u6069\u65BD",label:"\u6069\u65BD"},{value:"\u9102\u5DDE",label:"\u9102\u5DDE"},{value:"\u9EC4\u5188",label:"\u9EC4\u5188"},{value:"\u9EC4\u77F3",label:"\u9EC4\u77F3"},{value:"\u8346\u95E8",label:"\u8346\u95E8"},{value:"\u8346\u5DDE",label:"\u8346\u5DDE"},{value:"\u6F5C\u6C5F",label:"\u6F5C\u6C5F"},{value:"\u5341\u5830",label:"\u5341\u5830"},{value:"\u968F\u5DDE",label:"\u968F\u5DDE"},{value:"\u6B66\u7A74",label:"\u6B66\u7A74"},{value:"\u4ED9\u6843",label:"\u4ED9\u6843"},{value:"\u54B8\u5B81",label:"\u54B8\u5B81"},{value:"\u8944\u9633",label:"\u8944\u9633"},{value:"\u8944\u6A0A",label:"\u8944\u6A0A"},{value:"\u5B5D\u611F",label:"\u5B5D\u611F"},{value:"\u5B9C\u660C",label:"\u5B9C\u660C"}]},{value:"\u6E56\u5357",label:"\u6E56\u5357",children:[{value:"\u957F\u6C99",label:"\u957F\u6C99"},{value:"\u5E38\u5FB7",label:"\u5E38\u5FB7"},{value:"\u90F4\u5DDE",label:"\u90F4\u5DDE"},{value:"\u8861\u9633",label:"\u8861\u9633"},{value:"\u6000\u5316",label:"\u6000\u5316"},{value:"\u5409\u9996",label:"\u5409\u9996"},{value:"\u5A04\u5E95",label:"\u5A04\u5E95"},{value:"\u90B5\u9633",label:"\u90B5\u9633"},{value:"\u6E58\u6F6D",label:"\u6E58\u6F6D"},{value:"\u76CA\u9633",label:"\u76CA\u9633"},{value:"\u5CB3\u9633",label:"\u5CB3\u9633"},{value:"\u6C38\u5DDE",label:"\u6C38\u5DDE"},{value:"\u5F20\u5BB6\u754C",label:"\u5F20\u5BB6\u754C"},{value:"\u682A\u6D32",label:"\u682A\u6D32"}]},{value:"\u6C5F\u897F",label:"\u6C5F\u897F",children:[{value:"\u5357\u660C",label:"\u5357\u660C"},{value:"\u629A\u5DDE",label:"\u629A\u5DDE"},{value:"\u8D63\u5DDE",label:"\u8D63\u5DDE"},{value:"\u5409\u5B89",label:"\u5409\u5B89"},{value:"\u666F\u5FB7\u9547",label:"\u666F\u5FB7\u9547"},{value:"\u4E95\u5188\u5C71",label:"\u4E95\u5188\u5C71"},{value:"\u4E5D\u6C5F",label:"\u4E5D\u6C5F"},{value:"\u5E90\u5C71",label:"\u5E90\u5C71"},{value:"\u840D\u4E61",label:"\u840D\u4E61"},{value:"\u4E0A\u9976",label:"\u4E0A\u9976"},{value:"\u65B0\u4F59",label:"\u65B0\u4F59"},{value:"\u5B9C\u6625",label:"\u5B9C\u6625"},{value:"\u9E70\u6F6D",label:"\u9E70\u6F6D"}]},{value:"\u5409\u6797",label:"\u5409\u6797",children:[{value:"\u957F\u6625",label:"\u957F\u6625"},{value:"\u5409\u6797",label:"\u5409\u6797"},{value:"\u767D\u57CE",label:"\u767D\u57CE"},{value:"\u767D\u5C71",label:"\u767D\u5C71"},{value:"\u73F2\u6625",label:"\u73F2\u6625"},{value:"\u8FBD\u6E90",label:"\u8FBD\u6E90"},{value:"\u6885\u6CB3",label:"\u6885\u6CB3"},{value:"\u56DB\u5E73",label:"\u56DB\u5E73"},{value:"\u677E\u539F",label:"\u677E\u539F"},{value:"\u901A\u5316",label:"\u901A\u5316"},{value:"\u5EF6\u5409",label:"\u5EF6\u5409"}]},{value:"\u8FBD\u5B81",label:"\u8FBD\u5B81",children:[{value:"\u6C88\u9633",label:"\u6C88\u9633"},{value:"\u978D\u5C71",label:"\u978D\u5C71"},{value:"\u672C\u6EAA",label:"\u672C\u6EAA"},{value:"\u671D\u9633",label:"\u671D\u9633"},{value:"\u5927\u8FDE",label:"\u5927\u8FDE"},{value:"\u4E39\u4E1C",label:"\u4E39\u4E1C"},{value:"\u629A\u987A",label:"\u629A\u987A"},{value:"\u961C\u65B0",label:"\u961C\u65B0"},{value:"\u846B\u82A6\u5C9B",label:"\u846B\u82A6\u5C9B"},{value:"\u9526\u5DDE",label:"\u9526\u5DDE"},{value:"\u8FBD\u9633",label:"\u8FBD\u9633"},{value:"\u76D8\u9526",label:"\u76D8\u9526"},{value:"\u94C1\u5CAD",label:"\u94C1\u5CAD"},{value:"\u8425\u53E3",label:"\u8425\u53E3"}]},{value:"\u6FB3\u95E8",label:"\u6FB3\u95E8",children:[{value:"\u6FB3\u95E8",label:"\u6FB3\u95E8"}]},{value:"\u5185\u8499\u53E4",label:"\u5185\u8499\u53E4",children:[{value:"\u547C\u548C\u6D69\u7279",label:"\u547C\u548C\u6D69\u7279"},{value:"\u963F\u62C9\u5584\u76DF",label:"\u963F\u62C9\u5584\u76DF"},{value:"\u5305\u5934",label:"\u5305\u5934"},{value:"\u8D64\u5CF0",label:"\u8D64\u5CF0"},{value:"\u4E1C\u80DC",label:"\u4E1C\u80DC"},{value:"\u6D77\u62C9\u5C14",label:"\u6D77\u62C9\u5C14"},{value:"\u96C6\u5B81",label:"\u96C6\u5B81"},{value:"\u4E34\u6CB3",label:"\u4E34\u6CB3"},{value:"\u901A\u8FBD",label:"\u901A\u8FBD"},{value:"\u4E4C\u6D77",label:"\u4E4C\u6D77"},{value:"\u4E4C\u5170\u6D69\u7279",label:"\u4E4C\u5170\u6D69\u7279"},{value:"\u9521\u6797\u6D69\u7279",label:"\u9521\u6797\u6D69\u7279"}]},{value:"\u5B81\u590F",label:"\u5B81\u590F",children:[{value:"\u94F6\u5DDD",label:"\u94F6\u5DDD"},{value:"\u56FA\u6E90",label:"\u56FA\u6E90"},{value:"\u77F3\u5634\u5C71",label:"\u77F3\u5634\u5C71"},{value:"\u5434\u5FE0",label:"\u5434\u5FE0"}]},{value:"\u9752\u6D77",label:"\u9752\u6D77",children:[{value:"\u897F\u5B81",label:"\u897F\u5B81"},{value:"\u5FB7\u4EE4\u54C8",label:"\u5FB7\u4EE4\u54C8"},{value:"\u683C\u5C14\u6728",label:"\u683C\u5C14\u6728"},{value:"\u5171\u548C",label:"\u5171\u548C"},{value:"\u6D77\u4E1C",label:"\u6D77\u4E1C"},{value:"\u6D77\u664F",label:"\u6D77\u664F"},{value:"\u739B\u6C81",label:"\u739B\u6C81"},{value:"\u540C\u4EC1",label:"\u540C\u4EC1"},{value:"\u7389\u6811",label:"\u7389\u6811"}]},{value:"\u5C71\u4E1C",label:"\u5C71\u4E1C",children:[{value:"\u6D4E\u5357",label:"\u6D4E\u5357"},{value:"\u6EE8\u5DDE",label:"\u6EE8\u5DDE"},{value:"\u5156\u5DDE",label:"\u5156\u5DDE"},{value:"\u5FB7\u5DDE",label:"\u5FB7\u5DDE"},{value:"\u4E1C\u8425",label:"\u4E1C\u8425"},{value:"\u83CF\u6CFD",label:"\u83CF\u6CFD"},{value:"\u6D4E\u5B81",label:"\u6D4E\u5B81"},{value:"\u83B1\u829C",label:"\u83B1\u829C"},{value:"\u804A\u57CE",label:"\u804A\u57CE"},{value:"\u4E34\u6C82",label:"\u4E34\u6C82"},{value:"\u84EC\u83B1",label:"\u84EC\u83B1"},{value:"\u9752\u5C9B",label:"\u9752\u5C9B"},{value:"\u66F2\u961C",label:"\u66F2\u961C"},{value:"\u65E5\u7167",label:"\u65E5\u7167"},{value:"\u6CF0\u5B89",label:"\u6CF0\u5B89"},{value:"\u6F4D\u574A",label:"\u6F4D\u574A"},{value:"\u5A01\u6D77",label:"\u5A01\u6D77"},{value:"\u70DF\u53F0",label:"\u70DF\u53F0"},{value:"\u67A3\u5E84",label:"\u67A3\u5E84"},{value:"\u6DC4\u535A",label:"\u6DC4\u535A"}]},{value:"\u5C71\u897F",label:"\u5C71\u897F",children:[{value:"\u592A\u539F",label:"\u592A\u539F"},{value:"\u5415\u6881",label:"\u5415\u6881"},{value:"\u957F\u6CBB",label:"\u957F\u6CBB"},{value:"\u5927\u540C",label:"\u5927\u540C"},{value:"\u5019\u9A6C",label:"\u5019\u9A6C"},{value:"\u664B\u57CE",label:"\u664B\u57CE"},{value:"\u79BB\u77F3",label:"\u79BB\u77F3"},{value:"\u4E34\u6C7E",label:"\u4E34\u6C7E"},{value:"\u5B81\u6B66",label:"\u5B81\u6B66"},{value:"\u6714\u5DDE",label:"\u6714\u5DDE"},{value:"\u5FFB\u5DDE",label:"\u5FFB\u5DDE"},{value:"\u9633\u6CC9",label:"\u9633\u6CC9"},{value:"\u6986\u6B21",label:"\u6986\u6B21"},{value:"\u664B\u4E2D",label:"\u664B\u4E2D"},{value:"\u8FD0\u57CE",label:"\u8FD0\u57CE"}]},{value:"\u9655\u897F",label:"\u9655\u897F",children:[{value:"\u897F\u5B89",label:"\u897F\u5B89"},{value:"\u5B89\u5EB7",label:"\u5B89\u5EB7"},{value:"\u5B9D\u9E21",label:"\u5B9D\u9E21"},{value:"\u6C49\u4E2D",label:"\u6C49\u4E2D"},{value:"\u6E2D\u5357",label:"\u6E2D\u5357"},{value:"\u5546\u5DDE",label:"\u5546\u5DDE"},{value:"\u7EE5\u5FB7",label:"\u7EE5\u5FB7"},{value:"\u94DC\u5DDD",label:"\u94DC\u5DDD"},{value:"\u54B8\u9633",label:"\u54B8\u9633"},{value:"\u5EF6\u5B89",label:"\u5EF6\u5B89"},{value:"\u6986\u6797",label:"\u6986\u6797"}]},{value:"\u56DB\u5DDD",label:"\u56DB\u5DDD",children:[{value:"\u6210\u90FD",label:"\u6210\u90FD"},{value:"\u5DF4\u4E2D",label:"\u5DF4\u4E2D"},{value:"\u8FBE\u5DDD",label:"\u8FBE\u5DDD"},{value:"\u5FB7\u9633",label:"\u5FB7\u9633"},{value:"\u90FD\u6C5F\u5830",label:"\u90FD\u6C5F\u5830"},{value:"\u5CE8\u7709\u5C71",label:"\u5CE8\u7709\u5C71"},{value:"\u6DAA\u9675",label:"\u6DAA\u9675"},{value:"\u5E7F\u5B89",label:"\u5E7F\u5B89"},{value:"\u5E7F\u5143",label:"\u5E7F\u5143"},{value:"\u4E5D\u5BE8\u6C9F",label:"\u4E5D\u5BE8\u6C9F"},{value:"\u5EB7\u5B9A",label:"\u5EB7\u5B9A"},{value:"\u4E50\u5C71",label:"\u4E50\u5C71"},{value:"\u6CF8\u5DDE",label:"\u6CF8\u5DDE"},{value:"\u9A6C\u5C14\u5EB7",label:"\u9A6C\u5C14\u5EB7"},{value:"\u7EF5\u9633",label:"\u7EF5\u9633"},{value:"\u7709\u5C71",label:"\u7709\u5C71"},{value:"\u5357\u5145",label:"\u5357\u5145"},{value:"\u5185\u6C5F",label:"\u5185\u6C5F"},{value:"\u6500\u679D\u82B1",label:"\u6500\u679D\u82B1"},{value:"\u9042\u5B81",label:"\u9042\u5B81"},{value:"\u6C76\u5DDD",label:"\u6C76\u5DDD"},{value:"\u897F\u660C",label:"\u897F\u660C"},{value:"\u96C5\u5B89",label:"\u96C5\u5B89"},{value:"\u5B9C\u5BBE",label:"\u5B9C\u5BBE"},{value:"\u81EA\u8D21",label:"\u81EA\u8D21"},{value:"\u8D44\u9633",label:"\u8D44\u9633"}]},{value:"\u53F0\u6E7E",label:"\u53F0\u6E7E",children:[{value:"\u53F0\u5317",label:"\u53F0\u5317"},{value:"\u57FA\u9686",label:"\u57FA\u9686"},{value:"\u53F0\u5357",label:"\u53F0\u5357"},{value:"\u53F0\u4E2D",label:"\u53F0\u4E2D"},{value:"\u9AD8\u96C4",label:"\u9AD8\u96C4"},{value:"\u5C4F\u4E1C",label:"\u5C4F\u4E1C"},{value:"\u5357\u6295",label:"\u5357\u6295"},{value:"\u4E91\u6797",label:"\u4E91\u6797"},{value:"\u65B0\u7AF9",label:"\u65B0\u7AF9"},{value:"\u5F70\u5316",label:"\u5F70\u5316"},{value:"\u82D7\u6817",label:"\u82D7\u6817"},{value:"\u5609\u4E49",label:"\u5609\u4E49"},{value:"\u6843\u56ED",label:"\u6843\u56ED"},{value:"\u5B9C\u5170",label:"\u5B9C\u5170"},{value:"\u53F0\u4E1C",label:"\u53F0\u4E1C"},{value:"\u91D1\u95E8",label:"\u91D1\u95E8"},{value:"\u9A6C\u7956",label:"\u9A6C\u7956"},{value:"\u6F8E\u6E56",label:"\u6F8E\u6E56"}]},{value:"\u5929\u6D25",label:"\u5929\u6D25",children:[{value:"\u5929\u6D25",label:"\u5929\u6D25"},{value:"\u548C\u5E73",label:"\u548C\u5E73"},{value:"\u4E1C\u4E3D",label:"\u4E1C\u4E3D"},{value:"\u6CB3\u4E1C",label:"\u6CB3\u4E1C"},{value:"\u897F\u9752",label:"\u897F\u9752"},{value:"\u6CB3\u897F",label:"\u6CB3\u897F"},{value:"\u6D25\u5357",label:"\u6D25\u5357"},{value:"\u5357\u5F00",label:"\u5357\u5F00"},{value:"\u5317\u8FB0",label:"\u5317\u8FB0"},{value:"\u6CB3\u5317",label:"\u6CB3\u5317"},{value:"\u6B66\u6E05",label:"\u6B66\u6E05"},{value:"\u7EA2\u6322",label:"\u7EA2\u6322"},{value:"\u5858\u6CBD",label:"\u5858\u6CBD"},{value:"\u6C49\u6CBD",label:"\u6C49\u6CBD"},{value:"\u5927\u6E2F",label:"\u5927\u6E2F"},{value:"\u5B81\u6CB3",label:"\u5B81\u6CB3"},{value:"\u9759\u6D77",label:"\u9759\u6D77"},{value:"\u5B9D\u577B",label:"\u5B9D\u577B"},{value:"\u84DF\u53BF",label:"\u84DF\u53BF"}]},{value:"\u65B0\u7586",label:"\u65B0\u7586",children:[{value:"\u4E4C\u9C81\u6728\u9F50",label:"\u4E4C\u9C81\u6728\u9F50"},{value:"\u963F\u514B\u82CF",label:"\u963F\u514B\u82CF"},{value:"\u963F\u52D2\u6CF0",label:"\u963F\u52D2\u6CF0"},{value:"\u963F\u56FE\u4EC0",label:"\u963F\u56FE\u4EC0"},{value:"\u535A\u4E50",label:"\u535A\u4E50"},{value:"\u660C\u5409",label:"\u660C\u5409"},{value:"\u4E1C\u5C71",label:"\u4E1C\u5C71"},{value:"\u54C8\u5BC6",label:"\u54C8\u5BC6"},{value:"\u548C\u7530",label:"\u548C\u7530"},{value:"\u5580\u4EC0",label:"\u5580\u4EC0"},{value:"\u514B\u62C9\u739B\u4F9D",label:"\u514B\u62C9\u739B\u4F9D"},{value:"\u5E93\u8F66",label:"\u5E93\u8F66"},{value:"\u5E93\u5C14\u52D2",label:"\u5E93\u5C14\u52D2"},{value:"\u594E\u5C6F",label:"\u594E\u5C6F"},{value:"\u77F3\u6CB3\u5B50",label:"\u77F3\u6CB3\u5B50"},{value:"\u5854\u57CE",label:"\u5854\u57CE"},{value:"\u5410\u9C81\u756A",label:"\u5410\u9C81\u756A"},{value:"\u4F0A\u5B81",label:"\u4F0A\u5B81"}]},{value:"\u897F\u85CF",label:"\u897F\u85CF",children:[{value:"\u62C9\u8428",label:"\u62C9\u8428"},{value:"\u963F\u91CC",label:"\u963F\u91CC"},{value:"\u660C\u90FD",label:"\u660C\u90FD"},{value:"\u6797\u829D",label:"\u6797\u829D"},{value:"\u90A3\u66F2",label:"\u90A3\u66F2"},{value:"\u65E5\u5580\u5219",label:"\u65E5\u5580\u5219"},{value:"\u5C71\u5357",label:"\u5C71\u5357"}]},{value:"\u4E91\u5357",label:"\u4E91\u5357",children:[{value:"\u6606\u660E",label:"\u6606\u660E"},{value:"\u5927\u7406",label:"\u5927\u7406"},{value:"\u4FDD\u5C71",label:"\u4FDD\u5C71"},{value:"\u695A\u96C4",label:"\u695A\u96C4"},{value:"\u5927\u7406",label:"\u5927\u7406"},{value:"\u4E1C\u5DDD",label:"\u4E1C\u5DDD"},{value:"\u4E2A\u65E7",label:"\u4E2A\u65E7"},{value:"\u666F\u6D2A",label:"\u666F\u6D2A"},{value:"\u5F00\u8FDC",label:"\u5F00\u8FDC"},{value:"\u4E34\u6CA7",label:"\u4E34\u6CA7"},{value:"\u4E3D\u6C5F",label:"\u4E3D\u6C5F"},{value:"\u516D\u5E93",label:"\u516D\u5E93"},{value:"\u6F5E\u897F",label:"\u6F5E\u897F"},{value:"\u66F2\u9756",label:"\u66F2\u9756"},{value:"\u601D\u8305",label:"\u601D\u8305"},{value:"\u6587\u5C71",label:"\u6587\u5C71"},{value:"\u897F\u53CC\u7248\u7EB3",label:"\u897F\u53CC\u7248\u7EB3"},{value:"\u7389\u6EAA",label:"\u7389\u6EAA"},{value:"\u4E2D\u7538",label:"\u4E2D\u7538"},{value:"\u662D\u901A",label:"\u662D\u901A"}]},{value:"\u6D59\u6C5F",label:"\u6D59\u6C5F",children:[{value:"\u676D\u5DDE",label:"\u676D\u5DDE"},{value:"\u6E29\u5DDE",label:"\u6E29\u5DDE"},{value:"\u5B89\u5409",label:"\u5B89\u5409"},{value:"\u6148\u6EAA",label:"\u6148\u6EAA"},{value:"\u5B9A\u6D77",label:"\u5B9A\u6D77"},{value:"\u5949\u5316",label:"\u5949\u5316"},{value:"\u6D77\u76D0",label:"\u6D77\u76D0"},{value:"\u9EC4\u5CA9",label:"\u9EC4\u5CA9"},{value:"\u6E56\u5DDE",label:"\u6E56\u5DDE"},{value:"\u5609\u5174",label:"\u5609\u5174"},{value:"\u91D1\u534E",label:"\u91D1\u534E"},{value:"\u4E34\u5B89",label:"\u4E34\u5B89"},{value:"\u4E34\u6D77",label:"\u4E34\u6D77"},{value:"\u4E3D\u6C34",label:"\u4E3D\u6C34"},{value:"\u5B81\u6CE2",label:"\u5B81\u6CE2"},{value:"\u74EF\u6D77",label:"\u74EF\u6D77"},{value:"\u5E73\u6E56",label:"\u5E73\u6E56"},{value:"\u5343\u5C9B\u6E56",label:"\u5343\u5C9B\u6E56"},{value:"\u8862\u5DDE",label:"\u8862\u5DDE"},{value:"\u6C5F\u5C71",label:"\u6C5F\u5C71"},{value:"\u745E\u5B89",label:"\u745E\u5B89"},{value:"\u7ECD\u5174",label:"\u7ECD\u5174"},{value:"\u5D4A\u5DDE",label:"\u5D4A\u5DDE"},{value:"\u53F0\u5DDE",label:"\u53F0\u5DDE"},{value:"\u6E29\u5CAD",label:"\u6E29\u5CAD"},{value:"\u4F59\u59DA",label:"\u4F59\u59DA"},{value:"\u821F\u5C71",label:"\u821F\u5C71"}]},{value:"\u6D77\u5916",label:"\u6D77\u5916",children:[{value:"\u7F8E\u56FD",label:"\u7F8E\u56FD"},{value:"\u65E5\u672C",label:"\u65E5\u672C"},{value:"\u82F1\u56FD",label:"\u82F1\u56FD"},{value:"\u6CD5\u56FD",label:"\u6CD5\u56FD"},{value:"\u5FB7\u56FD",label:"\u5FB7\u56FD"},{value:"\u5176\u4ED6",label:"\u5176\u4ED6"}]}]},81428:function(Tn,oi,Dt){"use strict";Dt.d(oi,{AL:function(){return xt},Iy:function(){return Qe},Qv:function(){return Nt},ez:function(){return vt},jb:function(){return Qt}});var Ft=Dt(32834),se=Dt.n(Ft),ye=Dt(11690),Be=Dt.n(ye);let Se=1;function Rt(_t,Xt){const ve=_t.match(/^(\s+)(?:```)/);if(ve===null)return Xt;const oe=ve[1];return Xt.split(`
|
|
`).map(Re=>{const Ye=Re.match(/^\s+/);if(Ye===null)return Re;const[en]=Ye;return en.length>=oe.length?Re.slice(oe.length):Re}).join(`
|
|
`)}let ie=[],je=["<ul>"];const ce=new(se()).Renderer,Vt=/^ *(#{1,6}) *([^\n]+?) *(?:#+ *)?(?:\n+|$)/;function Qe(){ie.length=0,je=["<ul>"]}const Qt={overflow:"hidden",WebkitBoxOrient:"vertical",display:"-webkit-box",WebkitLineClamp:2};function Je(_t,Xt,ve,oe){if(Xt>=_t.length||_t[Xt].level<=ve)return Xt;var Re=_t[Xt];oe.push("<li><a href='#"+Se+Re.anchor+"'>"+Re.text+"</a>"),Xt++;var Ye=[];return Xt=Je(_t,Xt,Re.level,Ye),Ye.length>0&&(oe.push("<ul>"),Ye.forEach(function(en){oe.push(en)}),oe.push("</ul>")),oe.push("</li>"),Xt=Je(_t,Xt,ve,oe),Xt}function Nt(){return Je(ie,0,0,je),je.push("</ul>"),je.join("")}const nt={heading(_t){const Xt=Vt.exec(_t);if(Se+=1,Xt)return{type:"heading",raw:Xt[0],depth:Xt[1].length,text:Xt[2]}},fences(_t){const Xt=this.rules.block.fences.exec(_t);if(Xt){const ve=Xt[0];let oe=Rt(ve,Xt[3]||"");const Re=Xt[2]?Xt[2].trim():Xt[2];if(["latex","katex","math"].indexOf(Re)>=0){const Ye=lt(),en=oe;oe=Ye,pt[Ye]={type:"block",expression:en}}return{type:"code",raw:ve,lang:Re,text:oe}}}},et=/(?:\${2})([^\n`]+?)(?:\${2})/gi;let ct=0;const lt=()=>`__special_katext_id_${ct++}__`;let pt={};function vt(){return pt}function xt(){ct=0,pt={}}function Lt(_t){return _t=_t.replace(et,(Xt,ve)=>{const oe=lt();return pt[oe]={type:"inline",expression:ve},oe}),_t}const Ot=ce.listitem;ce.listitem=function(_t){return Ot(Lt(_t))};const Ht=ce.paragraph;ce.paragraph=function(_t){return Ht(Lt(_t))};const te=ce.tablecell;ce.tablecell=function(_t,Xt){return te(Lt(_t),Xt)},ce.code=function(_t,Xt,ve){const oe=(Xt||"").match(/\S*/)[0];return oe?["latex","katex","math"].indexOf(oe)>=0?`<p class='editormd-tex'>${_t}</p>`:`<pre class="prettyprint linenums"><code class="language-${Xt}">${ve?_t:(0,ye.escape)(_t,!0)}</code></pre>
|
|
`:'<pre class="prettyprint linenums"><code>'+(ve?_t:(0,ye.escape)(_t,!0))+"</code></pre>"},ce.heading=function(_t,Xt,ve){let oe=this.options.headerPrefix+ve.toLowerCase().replace(/[^\w\\u4e00-\\u9fa5]]+/g,"-");return ie.push({anchor:oe,level:Xt,text:_t}),"<h"+Xt+' id="'+Se+oe+'">'+_t+"</h"+Xt+">"},se().setOptions({silent:!0,gfm:!0,pedantic:!1}),se().use({tokenizer:nt,renderer:ce}),oi.ZP=se()},99498:function(Tn,oi,Dt){(function(Ft){Ft(Dt(89780))})(function(Ft){Ft.defineOption("placeholder","",function(je,ce,Vt){var Qe=Vt&&Vt!=Ft.Init;if(ce&&!Qe)je.on("blur",Se),je.on("change",Rt),je.on("swapDoc",Rt),Ft.on(je.getInputField(),"compositionupdate",je.state.placeholderCompose=function(){Be(je)}),Rt(je);else if(!ce&&Qe){je.off("blur",Se),je.off("change",Rt),je.off("swapDoc",Rt),Ft.off(je.getInputField(),"compositionupdate",je.state.placeholderCompose),se(je);var Qt=je.getWrapperElement();Qt.className=Qt.className.replace(" CodeMirror-empty","")}ce&&!je.hasFocus()&&Se(je)});function se(je){je.state.placeholder&&(je.state.placeholder.parentNode.removeChild(je.state.placeholder),je.state.placeholder=null)}function ye(je){se(je);var ce=je.state.placeholder=document.createElement("pre");ce.style.cssText="height: 0; overflow: visible",ce.style.direction=je.getOption("direction"),ce.className="CodeMirror-placeholder CodeMirror-line-like";var Vt=je.getOption("placeholder");typeof Vt=="string"&&(Vt=document.createTextNode(Vt)),ce.appendChild(Vt),je.display.lineSpace.insertBefore(ce,je.display.lineSpace.firstChild)}function Be(je){setTimeout(function(){var ce=!1,Vt=je.getInputField();Vt.nodeName=="TEXTAREA"?ce=!Vt.value:je.lineCount()==1&&(ce=!/[^\u200b]/.test(Vt.querySelector(".CodeMirror-line").textContent)),ce?ye(je):se(je)},20)}function Se(je){ie(je)&&ye(je)}function Rt(je){var ce=je.getWrapperElement(),Vt=ie(je);ce.className=ce.className.replace(" CodeMirror-empty","")+(Vt?" CodeMirror-empty":""),Vt?ye(je):se(je)}function ie(je){return je.lineCount()===1&&je.getLine(0)===""}})},25717:function(Tn,oi,Dt){(function(Ft){Ft(Dt(89780))})(function(Ft){var se={pairs:`()[]{}''""`,closeBefore:`)]}'":;>`,triples:"",explode:"[]{}"},ye=Ft.Pos;Ft.defineOption("autoCloseBrackets",!1,function(nt,et,ct){ct&&ct!=Ft.Init&&(nt.removeKeyMap(Se),nt.state.closeBrackets=null),et&&(Rt(Be(et,"pairs")),nt.state.closeBrackets=et,nt.addKeyMap(Se))});function Be(nt,et){return et=="pairs"&&typeof nt=="string"?nt:typeof nt=="object"&&nt[et]!=null?nt[et]:se[et]}var Se={Backspace:ce,Enter:Vt};function Rt(nt){for(var et=0;et<nt.length;et++){var ct=nt.charAt(et),lt="'"+ct+"'";Se[lt]||(Se[lt]=ie(ct))}}Rt(se.pairs+"`");function ie(nt){return function(et){return Qt(et,nt)}}function je(nt){var et=nt.state.closeBrackets;if(!et||et.override)return et;var ct=nt.getModeAt(nt.getCursor());return ct.closeBrackets||et}function ce(nt){var et=je(nt);if(!et||nt.getOption("disableInput"))return Ft.Pass;for(var ct=Be(et,"pairs"),lt=nt.listSelections(),pt=0;pt<lt.length;pt++){if(!lt[pt].empty())return Ft.Pass;var vt=Je(nt,lt[pt].head);if(!vt||ct.indexOf(vt)%2!=0)return Ft.Pass}for(var pt=lt.length-1;pt>=0;pt--){var xt=lt[pt].head;nt.replaceRange("",ye(xt.line,xt.ch-1),ye(xt.line,xt.ch+1),"+delete")}}function Vt(nt){var et=je(nt),ct=et&&Be(et,"explode");if(!ct||nt.getOption("disableInput"))return Ft.Pass;for(var lt=nt.listSelections(),pt=0;pt<lt.length;pt++){if(!lt[pt].empty())return Ft.Pass;var vt=Je(nt,lt[pt].head);if(!vt||ct.indexOf(vt)%2!=0)return Ft.Pass}nt.operation(function(){var xt=nt.lineSeparator()||`
|
|
`;nt.replaceSelection(xt+xt,null),nt.execCommand("goCharLeft"),lt=nt.listSelections();for(var Lt=0;Lt<lt.length;Lt++){var Ot=lt[Lt].head.line;nt.indentLine(Ot,null,!0),nt.indentLine(Ot+1,null,!0)}})}function Qe(nt){var et=Ft.cmpPos(nt.anchor,nt.head)>0;return{anchor:new ye(nt.anchor.line,nt.anchor.ch+(et?-1:1)),head:new ye(nt.head.line,nt.head.ch+(et?1:-1))}}function Qt(nt,et){var ct=je(nt);if(!ct||nt.getOption("disableInput"))return Ft.Pass;var lt=Be(ct,"pairs"),pt=lt.indexOf(et);if(pt==-1)return Ft.Pass;for(var vt=Be(ct,"closeBefore"),xt=Be(ct,"triples"),Lt=lt.charAt(pt+1)==et,Ot=nt.listSelections(),Ht=pt%2==0,te,_t=0;_t<Ot.length;_t++){var Xt=Ot[_t],ve=Xt.head,oe,Re=nt.getRange(ve,ye(ve.line,ve.ch+1));if(Ht&&!Xt.empty())oe="surround";else if((Lt||!Ht)&&Re==et)Lt&&Nt(nt,ve)?oe="both":xt.indexOf(et)>=0&&nt.getRange(ve,ye(ve.line,ve.ch+3))==et+et+et?oe="skipThree":oe="skip";else if(Lt&&ve.ch>1&&xt.indexOf(et)>=0&&nt.getRange(ye(ve.line,ve.ch-2),ve)==et+et){if(ve.ch>2&&/\bstring/.test(nt.getTokenTypeAt(ye(ve.line,ve.ch-2))))return Ft.Pass;oe="addFour"}else if(Lt){var Ye=ve.ch==0?" ":nt.getRange(ye(ve.line,ve.ch-1),ve);if(!Ft.isWordChar(Re)&&Ye!=et&&!Ft.isWordChar(Ye))oe="both";else return Ft.Pass}else if(Ht&&(Re.length===0||/\s/.test(Re)||vt.indexOf(Re)>-1))oe="both";else return Ft.Pass;if(!te)te=oe;else if(te!=oe)return Ft.Pass}var en=pt%2?lt.charAt(pt-1):et,Rn=pt%2?et:lt.charAt(pt+1);nt.operation(function(){if(te=="skip")nt.execCommand("goCharRight");else if(te=="skipThree")for(var wn=0;wn<3;wn++)nt.execCommand("goCharRight");else if(te=="surround"){for(var un=nt.getSelections(),wn=0;wn<un.length;wn++)un[wn]=en+un[wn]+Rn;nt.replaceSelections(un,"around"),un=nt.listSelections().slice();for(var wn=0;wn<un.length;wn++)un[wn]=Qe(un[wn]);nt.setSelections(un)}else te=="both"?(nt.replaceSelection(en+Rn,null),nt.triggerElectric(en+Rn),nt.execCommand("goCharLeft")):te=="addFour"&&(nt.replaceSelection(en+en+en+en,"before"),nt.execCommand("goCharRight"))})}function Je(nt,et){var ct=nt.getRange(ye(et.line,et.ch-1),ye(et.line,et.ch+1));return ct.length==2?ct:null}function Nt(nt,et){var ct=nt.getTokenAt(ye(et.line,et.ch+1));return/\bstring/.test(ct.type)&&ct.start==et.ch&&(et.ch==0||!/\bstring/.test(nt.getTokenTypeAt(et)))}})},6313:function(Tn,oi,Dt){(function(Ft){Ft(Dt(89780),Dt(32855))})(function(Ft){Ft.defineOption("autoCloseTags",!1,function(ce,Vt,Qe){if(Qe!=Ft.Init&&Qe&&ce.removeKeyMap("autoCloseTags"),!!Vt){var Qt={name:"autoCloseTags"};(typeof Vt!="object"||Vt.whenClosing!==!1)&&(Qt["'/'"]=function(Je){return Rt(Je)}),(typeof Vt!="object"||Vt.whenOpening!==!1)&&(Qt["'>'"]=function(Je){return Be(Je)}),ce.addKeyMap(Qt)}});var se=["area","base","br","col","command","embed","hr","img","input","keygen","link","meta","param","source","track","wbr"],ye=["applet","blockquote","body","button","div","dl","fieldset","form","frameset","h1","h2","h3","h4","h5","h6","head","html","iframe","layer","legend","object","ol","p","select","table","ul"];function Be(ce){if(ce.getOption("disableInput"))return Ft.Pass;for(var Vt=ce.listSelections(),Qe=[],Qt=ce.getOption("autoCloseTags"),Je=0;Je<Vt.length;Je++){if(!Vt[Je].empty())return Ft.Pass;var Nt=Vt[Je].head,nt=ce.getTokenAt(Nt),et=Ft.innerMode(ce.getMode(),nt.state),ct=et.state,lt=et.mode.xmlCurrentTag&&et.mode.xmlCurrentTag(ct),pt=lt&<.name;if(!pt)return Ft.Pass;var vt=et.mode.configuration=="html",xt=typeof Qt=="object"&&Qt.dontCloseTags||vt&&se,Lt=typeof Qt=="object"&&Qt.indentTags||vt&&ye;nt.end>Nt.ch&&(pt=pt.slice(0,pt.length-nt.end+Nt.ch));var Ot=pt.toLowerCase();if(!pt||nt.type=="string"&&(nt.end!=Nt.ch||!/[\"\']/.test(nt.string.charAt(nt.string.length-1))||nt.string.length==1)||nt.type=="tag"&<.close||nt.string.indexOf("/")==Nt.ch-nt.start-1||xt&&ie(xt,Ot)>-1||je(ce,et.mode.xmlCurrentContext&&et.mode.xmlCurrentContext(ct)||[],pt,Nt,!0))return Ft.Pass;var Ht=typeof Qt=="object"&&Qt.emptyTags;if(Ht&&ie(Ht,pt)>-1){Qe[Je]={text:"/>",newPos:Ft.Pos(Nt.line,Nt.ch+2)};continue}var te=Lt&&ie(Lt,Ot)>-1;Qe[Je]={indent:te,text:">"+(te?`
|
|
|
|
`:"")+"</"+pt+">",newPos:te?Ft.Pos(Nt.line+1,0):Ft.Pos(Nt.line,Nt.ch+1)}}for(var _t=typeof Qt=="object"&&Qt.dontIndentOnAutoClose,Je=Vt.length-1;Je>=0;Je--){var Xt=Qe[Je];ce.replaceRange(Xt.text,Vt[Je].head,Vt[Je].anchor,"+insert");var ve=ce.listSelections().slice(0);ve[Je]={head:Xt.newPos,anchor:Xt.newPos},ce.setSelections(ve),!_t&&Xt.indent&&(ce.indentLine(Xt.newPos.line,null,!0),ce.indentLine(Xt.newPos.line+1,null,!0))}}function Se(ce,Vt){for(var Qe=ce.listSelections(),Qt=[],Je=Vt?"/":"</",Nt=ce.getOption("autoCloseTags"),nt=typeof Nt=="object"&&Nt.dontIndentOnSlash,et=0;et<Qe.length;et++){if(!Qe[et].empty())return Ft.Pass;var ct=Qe[et].head,lt=ce.getTokenAt(ct),pt=Ft.innerMode(ce.getMode(),lt.state),vt=pt.state;if(Vt&&(lt.type=="string"||lt.string.charAt(0)!="<"||lt.start!=ct.ch-1))return Ft.Pass;var xt,Lt=pt.mode.name!="xml"&&ce.getMode().name=="htmlmixed";if(Lt&&pt.mode.name=="javascript")xt=Je+"script";else if(Lt&&pt.mode.name=="css")xt=Je+"style";else{var Ot=pt.mode.xmlCurrentContext&&pt.mode.xmlCurrentContext(vt);if(!Ot||Ot.length&&je(ce,Ot,Ot[Ot.length-1],ct))return Ft.Pass;xt=Je+Ot[Ot.length-1]}ce.getLine(ct.line).charAt(lt.end)!=">"&&(xt+=">"),Qt[et]=xt}if(ce.replaceSelections(Qt),Qe=ce.listSelections(),!nt)for(var et=0;et<Qe.length;et++)(et==Qe.length-1||Qe[et].head.line<Qe[et+1].head.line)&&ce.indentLine(Qe[et].head.line)}function Rt(ce){return ce.getOption("disableInput")?Ft.Pass:Se(ce,!0)}Ft.commands.closeTag=function(ce){return Se(ce)};function ie(ce,Vt){if(ce.indexOf)return ce.indexOf(Vt);for(var Qe=0,Qt=ce.length;Qe<Qt;++Qe)if(ce[Qe]==Vt)return Qe;return-1}function je(ce,Vt,Qe,Qt,Je){if(!Ft.scanForClosingTag)return!1;var Nt=Math.min(ce.lastLine()+1,Qt.line+500),nt=Ft.scanForClosingTag(ce,Qt,null,Nt);if(!nt||nt.tag!=Qe)return!1;for(var et=Je?1:0,ct=Vt.length-1;ct>=0&&Vt[ct]==Qe;ct--)++et;Qt=nt.to;for(var ct=1;ct<et;ct++){var lt=Ft.scanForClosingTag(ce,Qt,null,Nt);if(!lt||lt.tag!=Qe)return!1;Qt=lt.to}return!0}})},32855:function(Tn,oi,Dt){(function(Ft){Ft(Dt(89780))})(function(Ft){"use strict";var se=Ft.Pos;function ye(ct,lt){return ct.line-lt.line||ct.ch-lt.ch}var Be="A-Z_a-z\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD",Se=Be+"-:.0-9\\u00B7\\u0300-\\u036F\\u203F-\\u2040",Rt=new RegExp("<(/?)(["+Be+"]["+Se+"]*)","g");function ie(ct,lt,pt,vt){this.line=lt,this.ch=pt,this.cm=ct,this.text=ct.getLine(lt),this.min=vt?Math.max(vt.from,ct.firstLine()):ct.firstLine(),this.max=vt?Math.min(vt.to-1,ct.lastLine()):ct.lastLine()}function je(ct,lt){var pt=ct.cm.getTokenTypeAt(se(ct.line,lt));return pt&&/\btag\b/.test(pt)}function ce(ct){if(!(ct.line>=ct.max))return ct.ch=0,ct.text=ct.cm.getLine(++ct.line),!0}function Vt(ct){if(!(ct.line<=ct.min))return ct.text=ct.cm.getLine(--ct.line),ct.ch=ct.text.length,!0}function Qe(ct){for(;;){var lt=ct.text.indexOf(">",ct.ch);if(lt==-1){if(ce(ct))continue;return}if(!je(ct,lt+1)){ct.ch=lt+1;continue}var pt=ct.text.lastIndexOf("/",lt),vt=pt>-1&&!/\S/.test(ct.text.slice(pt+1,lt));return ct.ch=lt+1,vt?"selfClose":"regular"}}function Qt(ct){for(;;){var lt=ct.ch?ct.text.lastIndexOf("<",ct.ch-1):-1;if(lt==-1){if(Vt(ct))continue;return}if(!je(ct,lt+1)){ct.ch=lt;continue}Rt.lastIndex=lt,ct.ch=lt;var pt=Rt.exec(ct.text);if(pt&&pt.index==lt)return pt}}function Je(ct){for(;;){Rt.lastIndex=ct.ch;var lt=Rt.exec(ct.text);if(!lt){if(ce(ct))continue;return}if(!je(ct,lt.index+1)){ct.ch=lt.index+1;continue}return ct.ch=lt.index+lt[0].length,lt}}function Nt(ct){for(;;){var lt=ct.ch?ct.text.lastIndexOf(">",ct.ch-1):-1;if(lt==-1){if(Vt(ct))continue;return}if(!je(ct,lt+1)){ct.ch=lt;continue}var pt=ct.text.lastIndexOf("/",lt),vt=pt>-1&&!/\S/.test(ct.text.slice(pt+1,lt));return ct.ch=lt+1,vt?"selfClose":"regular"}}function nt(ct,lt){for(var pt=[];;){var vt=Je(ct),xt,Lt=ct.line,Ot=ct.ch-(vt?vt[0].length:0);if(!vt||!(xt=Qe(ct)))return;if(xt!="selfClose")if(vt[1]){for(var Ht=pt.length-1;Ht>=0;--Ht)if(pt[Ht]==vt[2]){pt.length=Ht;break}if(Ht<0&&(!lt||lt==vt[2]))return{tag:vt[2],from:se(Lt,Ot),to:se(ct.line,ct.ch)}}else pt.push(vt[2])}}function et(ct,lt){for(var pt=[];;){var vt=Nt(ct);if(!vt)return;if(vt=="selfClose"){Qt(ct);continue}var xt=ct.line,Lt=ct.ch,Ot=Qt(ct);if(!Ot)return;if(Ot[1])pt.push(Ot[2]);else{for(var Ht=pt.length-1;Ht>=0;--Ht)if(pt[Ht]==Ot[2]){pt.length=Ht;break}if(Ht<0&&(!lt||lt==Ot[2]))return{tag:Ot[2],from:se(ct.line,ct.ch),to:se(xt,Lt)}}}}Ft.registerHelper("fold","xml",function(ct,lt){for(var pt=new ie(ct,lt.line,0);;){var vt=Je(pt);if(!vt||pt.line!=lt.line)return;var xt=Qe(pt);if(!xt)return;if(!vt[1]&&xt!="selfClose"){var Lt=se(pt.line,pt.ch),Ot=nt(pt,vt[2]);return Ot&&ye(Ot.from,Lt)>0?{from:Lt,to:Ot.from}:null}}}),Ft.findMatchingTag=function(ct,lt,pt){var vt=new ie(ct,lt.line,lt.ch,pt);if(!(vt.text.indexOf(">")==-1&&vt.text.indexOf("<")==-1)){var xt=Qe(vt),Lt=xt&&se(vt.line,vt.ch),Ot=xt&&Qt(vt);if(!(!xt||!Ot||ye(vt,lt)>0)){var Ht={from:se(vt.line,vt.ch),to:Lt,tag:Ot[2]};return xt=="selfClose"?{open:Ht,close:null,at:"open"}:Ot[1]?{open:et(vt,Ot[2]),close:Ht,at:"close"}:(vt=new ie(ct,Lt.line,Lt.ch,pt),{open:Ht,close:nt(vt,Ot[2]),at:"open"})}}},Ft.findEnclosingTag=function(ct,lt,pt,vt){for(var xt=new ie(ct,lt.line,lt.ch,pt);;){var Lt=et(xt,vt);if(!Lt)break;var Ot=new ie(ct,lt.line,lt.ch,pt),Ht=nt(Ot,Lt.tag);if(Ht)return{open:Lt,close:Ht}}},Ft.scanForClosingTag=function(ct,lt,pt,vt){var xt=new ie(ct,lt.line,lt.ch,vt?{from:0,to:vt}:null);return nt(xt,pt)}})},89780:function(Tn){(function(oi,Dt){Tn.exports=Dt()})(this,function(){"use strict";var oi=navigator.userAgent,Dt=navigator.platform,Ft=/gecko\/\d/i.test(oi),se=/MSIE \d/.test(oi),ye=/Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(oi),Be=/Edge\/(\d+)/.exec(oi),Se=se||ye||Be,Rt=Se&&(se?document.documentMode||6:+(Be||ye)[1]),ie=!Be&&/WebKit\//.test(oi),je=ie&&/Qt\/\d+\.\d+/.test(oi),ce=!Be&&/Chrome\//.test(oi),Vt=/Opera\//.test(oi),Qe=/Apple Computer/.test(navigator.vendor),Qt=/Mac OS X 1\d\D([8-9]|\d\d)\D/.test(oi),Je=/PhantomJS/.test(oi),Nt=!Be&&/AppleWebKit/.test(oi)&&/Mobile\/\w+/.test(oi),nt=/Android/.test(oi),et=Nt||nt||/webOS|BlackBerry|Opera Mini|Opera Mobi|IEMobile/i.test(oi),ct=Nt||/Mac/.test(Dt),lt=/\bCrOS\b/.test(oi),pt=/win/i.test(Dt),vt=Vt&&oi.match(/Version\/(\d*\.\d*)/);vt&&(vt=Number(vt[1])),vt&&vt>=15&&(Vt=!1,ie=!0);var xt=ct&&(je||Vt&&(vt==null||vt<12.11)),Lt=Ft||Se&&Rt>=9;function Ot(it){return new RegExp("(^|\\s)"+it+"(?:$|\\s)\\s*")}var Ht=function(it,at){var dt=it.className,ht=Ot(at).exec(dt);if(ht){var gt=dt.slice(ht.index+ht[0].length);it.className=dt.slice(0,ht.index)+(gt?ht[1]+gt:"")}};function te(it){for(var at=it.childNodes.length;at>0;--at)it.removeChild(it.firstChild);return it}function _t(it,at){return te(it).appendChild(at)}function Xt(it,at,dt,ht){var gt=document.createElement(it);if(dt&&(gt.className=dt),ht&&(gt.style.cssText=ht),typeof at=="string")gt.appendChild(document.createTextNode(at));else if(at)for(var Ct=0;Ct<at.length;++Ct)gt.appendChild(at[Ct]);return gt}function ve(it,at,dt,ht){var gt=Xt(it,at,dt,ht);return gt.setAttribute("role","presentation"),gt}var oe;document.createRange?oe=function(it,at,dt,ht){var gt=document.createRange();return gt.setEnd(ht||it,dt),gt.setStart(it,at),gt}:oe=function(it,at,dt){var ht=document.body.createTextRange();try{ht.moveToElementText(it.parentNode)}catch(gt){return ht}return ht.collapse(!0),ht.moveEnd("character",dt),ht.moveStart("character",at),ht};function Re(it,at){if(at.nodeType==3&&(at=at.parentNode),it.contains)return it.contains(at);do if(at.nodeType==11&&(at=at.host),at==it)return!0;while(at=at.parentNode)}function Ye(){var it;try{it=document.activeElement}catch(at){it=document.body||null}for(;it&&it.shadowRoot&&it.shadowRoot.activeElement;)it=it.shadowRoot.activeElement;return it}function en(it,at){var dt=it.className;Ot(at).test(dt)||(it.className+=(dt?" ":"")+at)}function Rn(it,at){for(var dt=it.split(" "),ht=0;ht<dt.length;ht++)dt[ht]&&!Ot(dt[ht]).test(at)&&(at+=" "+dt[ht]);return at}var wn=function(it){it.select()};Nt?wn=function(it){it.selectionStart=0,it.selectionEnd=it.value.length}:Se&&(wn=function(it){try{it.select()}catch(at){}});function un(it){var at=Array.prototype.slice.call(arguments,1);return function(){return it.apply(null,at)}}function vn(it,at,dt){at||(at={});for(var ht in it)it.hasOwnProperty(ht)&&(dt!==!1||!at.hasOwnProperty(ht))&&(at[ht]=it[ht]);return at}function ne(it,at,dt,ht,gt){at==null&&(at=it.search(/[^\s\u00a0]/),at==-1&&(at=it.length));for(var Ct=ht||0,Bt=gt||0;;){var Wt=it.indexOf(" ",Ct);if(Wt<0||Wt>=at)return Bt+(at-Ct);Bt+=Wt-Ct,Bt+=dt-Bt%dt,Ct=Wt+1}}var jt=function(){this.id=null,this.f=null,this.time=0,this.handler=un(this.onTimeout,this)};jt.prototype.onTimeout=function(it){it.id=0,it.time<=+new Date?it.f():setTimeout(it.handler,it.time-+new Date)},jt.prototype.set=function(it,at){this.f=at;var dt=+new Date+it;(!this.id||dt<this.time)&&(clearTimeout(this.id),this.id=setTimeout(this.handler,it),this.time=dt)};function Fe(it,at){for(var dt=0;dt<it.length;++dt)if(it[dt]==at)return dt;return-1}var We=50,Pn={toString:function(){return"CodeMirror.Pass"}},ke={scroll:!1},tn={origin:"*mouse"},fn={origin:"+move"};function Jn(it,at,dt){for(var ht=0,gt=0;;){var Ct=it.indexOf(" ",ht);Ct==-1&&(Ct=it.length);var Bt=Ct-ht;if(Ct==it.length||gt+Bt>=at)return ht+Math.min(Bt,at-gt);if(gt+=Ct-ht,gt+=dt-gt%dt,ht=Ct+1,gt>=at)return ht}}var Pe=[""];function an(it){for(;Pe.length<=it;)Pe.push(re(Pe)+" ");return Pe[it]}function re(it){return it[it.length-1]}function hn(it,at){for(var dt=[],ht=0;ht<it.length;ht++)dt[ht]=at(it[ht],ht);return dt}function di(it,at,dt){for(var ht=0,gt=dt(at);ht<it.length&&dt(it[ht])<=gt;)ht++;it.splice(ht,0,at)}function Tt(){}function Et(it,at){var dt;return Object.create?dt=Object.create(it):(Tt.prototype=it,dt=new Tt),at&&vn(at,dt),dt}var St=/[\u00df\u0587\u0590-\u05f4\u0600-\u06ff\u3040-\u309f\u30a0-\u30ff\u3400-\u4db5\u4e00-\u9fcc\uac00-\ud7af]/;function Mt(it){return/\w/.test(it)||it>"\x80"&&(it.toUpperCase()!=it.toLowerCase()||St.test(it))}function zt(it,at){return at?at.source.indexOf("\\w")>-1&&Mt(it)?!0:at.test(it):Mt(it)}function kt(it){for(var at in it)if(it.hasOwnProperty(at)&&it[at])return!1;return!0}var Ut=/[\u0300-\u036f\u0483-\u0489\u0591-\u05bd\u05bf\u05c1\u05c2\u05c4\u05c5\u05c7\u0610-\u061a\u064b-\u065e\u0670\u06d6-\u06dc\u06de-\u06e4\u06e7\u06e8\u06ea-\u06ed\u0711\u0730-\u074a\u07a6-\u07b0\u07eb-\u07f3\u0816-\u0819\u081b-\u0823\u0825-\u0827\u0829-\u082d\u0900-\u0902\u093c\u0941-\u0948\u094d\u0951-\u0955\u0962\u0963\u0981\u09bc\u09be\u09c1-\u09c4\u09cd\u09d7\u09e2\u09e3\u0a01\u0a02\u0a3c\u0a41\u0a42\u0a47\u0a48\u0a4b-\u0a4d\u0a51\u0a70\u0a71\u0a75\u0a81\u0a82\u0abc\u0ac1-\u0ac5\u0ac7\u0ac8\u0acd\u0ae2\u0ae3\u0b01\u0b3c\u0b3e\u0b3f\u0b41-\u0b44\u0b4d\u0b56\u0b57\u0b62\u0b63\u0b82\u0bbe\u0bc0\u0bcd\u0bd7\u0c3e-\u0c40\u0c46-\u0c48\u0c4a-\u0c4d\u0c55\u0c56\u0c62\u0c63\u0cbc\u0cbf\u0cc2\u0cc6\u0ccc\u0ccd\u0cd5\u0cd6\u0ce2\u0ce3\u0d3e\u0d41-\u0d44\u0d4d\u0d57\u0d62\u0d63\u0dca\u0dcf\u0dd2-\u0dd4\u0dd6\u0ddf\u0e31\u0e34-\u0e3a\u0e47-\u0e4e\u0eb1\u0eb4-\u0eb9\u0ebb\u0ebc\u0ec8-\u0ecd\u0f18\u0f19\u0f35\u0f37\u0f39\u0f71-\u0f7e\u0f80-\u0f84\u0f86\u0f87\u0f90-\u0f97\u0f99-\u0fbc\u0fc6\u102d-\u1030\u1032-\u1037\u1039\u103a\u103d\u103e\u1058\u1059\u105e-\u1060\u1071-\u1074\u1082\u1085\u1086\u108d\u109d\u135f\u1712-\u1714\u1732-\u1734\u1752\u1753\u1772\u1773\u17b7-\u17bd\u17c6\u17c9-\u17d3\u17dd\u180b-\u180d\u18a9\u1920-\u1922\u1927\u1928\u1932\u1939-\u193b\u1a17\u1a18\u1a56\u1a58-\u1a5e\u1a60\u1a62\u1a65-\u1a6c\u1a73-\u1a7c\u1a7f\u1b00-\u1b03\u1b34\u1b36-\u1b3a\u1b3c\u1b42\u1b6b-\u1b73\u1b80\u1b81\u1ba2-\u1ba5\u1ba8\u1ba9\u1c2c-\u1c33\u1c36\u1c37\u1cd0-\u1cd2\u1cd4-\u1ce0\u1ce2-\u1ce8\u1ced\u1dc0-\u1de6\u1dfd-\u1dff\u200c\u200d\u20d0-\u20f0\u2cef-\u2cf1\u2de0-\u2dff\u302a-\u302f\u3099\u309a\ua66f-\ua672\ua67c\ua67d\ua6f0\ua6f1\ua802\ua806\ua80b\ua825\ua826\ua8c4\ua8e0-\ua8f1\ua926-\ua92d\ua947-\ua951\ua980-\ua982\ua9b3\ua9b6-\ua9b9\ua9bc\uaa29-\uaa2e\uaa31\uaa32\uaa35\uaa36\uaa43\uaa4c\uaab0\uaab2-\uaab4\uaab7\uaab8\uaabe\uaabf\uaac1\uabe5\uabe8\uabed\udc00-\udfff\ufb1e\ufe00-\ufe0f\ufe20-\ufe26\uff9e\uff9f]/;function Oe(it){return it.charCodeAt(0)>=768&&Ut.test(it)}function Te(it,at,dt){for(;(dt<0?at>0:at<it.length)&&Oe(it.charAt(at));)at+=dt;return at}function _e(it,at,dt){for(var ht=at>dt?-1:1;;){if(at==dt)return at;var gt=(at+dt)/2,Ct=ht<0?Math.ceil(gt):Math.floor(gt);if(Ct==at)return it(Ct)?at:dt;it(Ct)?dt=Ct:at=Ct+ht}}function ee(it,at,dt,ht){if(!it)return ht(at,dt,"ltr",0);for(var gt=!1,Ct=0;Ct<it.length;++Ct){var Bt=it[Ct];(Bt.from<dt&&Bt.to>at||at==dt&&Bt.to==at)&&(ht(Math.max(Bt.from,at),Math.min(Bt.to,dt),Bt.level==1?"rtl":"ltr",Ct),gt=!0)}gt||ht(at,dt,"ltr")}var de=null;function pe(it,at,dt){var ht;de=null;for(var gt=0;gt<it.length;++gt){var Ct=it[gt];if(Ct.from<at&&Ct.to>at)return gt;Ct.to==at&&(Ct.from!=Ct.to&&dt=="before"?ht=gt:de=gt),Ct.from==at&&(Ct.from!=Ct.to&&dt!="before"?ht=gt:de=gt)}return ht!=null?ht:de}var be=function(){var it="bbbbbbbbbtstwsbbbbbbbbbbbbbbssstwNN%%%NNNNNN,N,N1111111111NNNNNNNLLLLLLLLLLLLLLLLLLLLLLLLLLNNNNNNLLLLLLLLLLLLLLLLLLLLLLLLLLNNNNbbbbbbsbbbbbbbbbbbbbbbbbbbbbbbbbb,N%%%%NNNNLNNNNN%%11NLNNN1LNNNNNLLLLLLLLLLLLLLLLLLLLLLLNLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLN",at="nnnnnnNNr%%r,rNNmmmmmmmmmmmrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrmmmmmmmmmmmmmmmmmmmmmnnnnnnnnnn%nnrrrmrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrmmmmmmmnNmmmmmmrrmmNmmmmrr1111111111";function dt($t){return $t<=247?it.charAt($t):1424<=$t&&$t<=1524?"R":1536<=$t&&$t<=1785?at.charAt($t-1536):1774<=$t&&$t<=2220?"r":8192<=$t&&$t<=8203?"w":$t==8204?"b":"L"}var ht=/[\u0590-\u05f4\u0600-\u06ff\u0700-\u08ac]/,gt=/[stwN]/,Ct=/[LRr]/,Bt=/[Lb1n]/,Wt=/[1n]/;function Kt($t,Ie,he){this.level=$t,this.from=Ie,this.to=he}return function($t,Ie){var he=Ie=="ltr"?"L":"R";if($t.length==0||Ie=="ltr"&&!ht.test($t))return!1;for(var cn=$t.length,nn=[],fi=0;fi<cn;++fi)nn.push(dt($t.charCodeAt(fi)));for(var wi=0,Ti=he;wi<cn;++wi){var tr=nn[wi];tr=="m"?nn[wi]=Ti:Ti=tr}for(var Er=0,gr=he;Er<cn;++Er){var Dr=nn[Er];Dr=="1"&&gr=="r"?nn[Er]="n":Ct.test(Dr)&&(gr=Dr,Dr=="r"&&(nn[Er]="R"))}for(var Xr=1,cr=nn[0];Xr<cn-1;++Xr){var co=nn[Xr];co=="+"&&cr=="1"&&nn[Xr+1]=="1"?nn[Xr]="1":co==","&&cr==nn[Xr+1]&&(cr=="1"||cr=="n")&&(nn[Xr]=cr),cr=co}for(var oa=0;oa<cn;++oa){var Ua=nn[oa];if(Ua==",")nn[oa]="N";else if(Ua=="%"){var pa=void 0;for(pa=oa+1;pa<cn&&nn[pa]=="%";++pa);for(var Ws=oa&&nn[oa-1]=="!"||pa<cn&&nn[pa]=="1"?"1":"N",Es=oa;Es<pa;++Es)nn[Es]=Ws;oa=pa-1}}for(var ja=0,nl=he;ja<cn;++ja){var ps=nn[ja];nl=="L"&&ps=="1"?nn[ja]="L":Ct.test(ps)&&(nl=ps)}for(var za=0;za<cn;++za)if(gt.test(nn[za])){var Mo=void 0;for(Mo=za+1;Mo<cn&>.test(nn[Mo]);++Mo);for(var wa=(za?nn[za-1]:he)=="L",es=(Mo<cn?nn[Mo]:he)=="L",ms=wa==es?wa?"L":"R":he,Xl=za;Xl<Mo;++Xl)nn[Xl]=ms;za=Mo-1}for(var ma=[],Dl,ka=0;ka<cn;)if(Bt.test(nn[ka])){var Fc=ka;for(++ka;ka<cn&&Bt.test(nn[ka]);++ka);ma.push(new Kt(0,Fc,ka))}else{var vl=ka,il=ma.length,Vs=Ie=="rtl"?1:0;for(++ka;ka<cn&&nn[ka]!="L";++ka);for(var Xo=vl;Xo<ka;)if(Wt.test(nn[Xo])){vl<Xo&&(ma.splice(il,0,new Kt(1,vl,Xo)),il+=Vs);var ns=Xo;for(++Xo;Xo<ka&&Wt.test(nn[Xo]);++Xo);ma.splice(il,0,new Kt(2,ns,Xo)),il+=Vs,vl=Xo}else++Xo;vl<ka&&ma.splice(il,0,new Kt(1,vl,ka))}return Ie=="ltr"&&(ma[0].level==1&&(Dl=$t.match(/^\s+/))&&(ma[0].from=Dl[0].length,ma.unshift(new Kt(0,0,Dl[0].length))),re(ma).level==1&&(Dl=$t.match(/\s+$/))&&(re(ma).to-=Dl[0].length,ma.push(new Kt(0,cn-Dl[0].length,cn)))),Ie=="rtl"?ma.reverse():ma}}();function ze(it,at){var dt=it.order;return dt==null&&(dt=it.order=be(it.text,at)),dt}var rn=[],He=function(it,at,dt){if(it.addEventListener)it.addEventListener(at,dt,!1);else if(it.attachEvent)it.attachEvent("on"+at,dt);else{var ht=it._handlers||(it._handlers={});ht[at]=(ht[at]||rn).concat(dt)}};function yn(it,at){return it._handlers&&it._handlers[at]||rn}function xe(it,at,dt){if(it.removeEventListener)it.removeEventListener(at,dt,!1);else if(it.detachEvent)it.detachEvent("on"+at,dt);else{var ht=it._handlers,gt=ht&&ht[at];if(gt){var Ct=Fe(gt,dt);Ct>-1&&(ht[at]=gt.slice(0,Ct).concat(gt.slice(Ct+1)))}}}function Ne(it,at){var dt=yn(it,at);if(dt.length)for(var ht=Array.prototype.slice.call(arguments,2),gt=0;gt<dt.length;++gt)dt[gt].apply(null,ht)}function Ze(it,at,dt){return typeof at=="string"&&(at={type:at,preventDefault:function(){this.defaultPrevented=!0}}),Ne(it,dt||at.type,it,at),Xn(at)||at.codemirrorIgnore}function Bn(it){var at=it._handlers&&it._handlers.cursorActivity;if(at)for(var dt=it.curOp.cursorActivityHandlers||(it.curOp.cursorActivityHandlers=[]),ht=0;ht<at.length;++ht)Fe(dt,at[ht])==-1&&dt.push(at[ht])}function le(it,at){return yn(it,at).length>0}function An(it){it.prototype.on=function(at,dt){He(this,at,dt)},it.prototype.off=function(at,dt){xe(this,at,dt)}}function Kn(it){it.preventDefault?it.preventDefault():it.returnValue=!1}function yi(it){it.stopPropagation?it.stopPropagation():it.cancelBubble=!0}function Xn(it){return it.defaultPrevented!=null?it.defaultPrevented:it.returnValue==!1}function Ei(it){Kn(it),yi(it)}function Yi(it){return it.target||it.srcElement}function Gi(it){var at=it.which;return at==null&&(it.button&1?at=1:it.button&2?at=3:it.button&4&&(at=2)),ct&&it.ctrlKey&&at==1&&(at=3),at}var Hi=function(){if(Se&&Rt<9)return!1;var it=Xt("div");return"draggable"in it||"dragDrop"in it}(),Ki;function Qi(it){if(Ki==null){var at=Xt("span","\u200B");_t(it,Xt("span",[at,document.createTextNode("x")])),it.firstChild.offsetHeight!=0&&(Ki=at.offsetWidth<=1&&at.offsetHeight>2&&!(Se&&Rt<8))}var dt=Ki?Xt("span","\u200B"):Xt("span","\xA0",null,"display: inline-block; width: 1px; margin-right: -1px");return dt.setAttribute("cm-text",""),dt}var ji;function Ai(it){if(ji!=null)return ji;var at=_t(it,document.createTextNode("A\u062EA")),dt=oe(at,0,1).getBoundingClientRect(),ht=oe(at,1,2).getBoundingClientRect();return te(it),!dt||dt.left==dt.right?!1:ji=ht.right-dt.right<3}var Zi=`
|
|
|
|
b`.split(/\n/).length!=3?function(it){for(var at=0,dt=[],ht=it.length;at<=ht;){var gt=it.indexOf(`
|
|
`,at);gt==-1&&(gt=it.length);var Ct=it.slice(at,it.charAt(gt-1)=="\r"?gt-1:gt),Bt=Ct.indexOf("\r");Bt!=-1?(dt.push(Ct.slice(0,Bt)),at+=Bt+1):(dt.push(Ct),at=gt+1)}return dt}:function(it){return it.split(/\r\n?|\n/)},Pt=window.getSelection?function(it){try{return it.selectionStart!=it.selectionEnd}catch(at){return!1}}:function(it){var at;try{at=it.ownerDocument.selection.createRange()}catch(dt){}return!at||at.parentElement()!=it?!1:at.compareEndPoints("StartToEnd",at)!=0},ni=function(){var it=Xt("div");return"oncopy"in it?!0:(it.setAttribute("oncopy","return;"),typeof it.oncopy=="function")}(),Si=null;function on(it){if(Si!=null)return Si;var at=_t(it,Xt("span","x")),dt=at.getBoundingClientRect(),ht=oe(at,0,1).getBoundingClientRect();return Si=Math.abs(dt.left-ht.left)>1}var dn={},pn={};function _n(it,at){arguments.length>2&&(at.dependencies=Array.prototype.slice.call(arguments,2)),dn[it]=at}function Di(it,at){pn[it]=at}function Bi(it){if(typeof it=="string"&&pn.hasOwnProperty(it))it=pn[it];else if(it&&typeof it.name=="string"&&pn.hasOwnProperty(it.name)){var at=pn[it.name];typeof at=="string"&&(at={name:at}),it=Et(at,it),it.name=at.name}else{if(typeof it=="string"&&/^[\w\-]+\/[\w\-]+\+xml$/.test(it))return Bi("application/xml");if(typeof it=="string"&&/^[\w\-]+\/[\w\-]+\+json$/.test(it))return Bi("application/json")}return typeof it=="string"?{name:it}:it||{name:"null"}}function me(it,at){at=Bi(at);var dt=dn[at.name];if(!dt)return me(it,"text/plain");var ht=dt(it,at);if(we.hasOwnProperty(at.name)){var gt=we[at.name];for(var Ct in gt)gt.hasOwnProperty(Ct)&&(ht.hasOwnProperty(Ct)&&(ht["_"+Ct]=ht[Ct]),ht[Ct]=gt[Ct])}if(ht.name=at.name,at.helperType&&(ht.helperType=at.helperType),at.modeProps)for(var Bt in at.modeProps)ht[Bt]=at.modeProps[Bt];return ht}var we={};function ge(it,at){var dt=we.hasOwnProperty(it)?we[it]:we[it]={};vn(at,dt)}function Wn(it,at){if(at===!0)return at;if(it.copyState)return it.copyState(at);var dt={};for(var ht in at){var gt=at[ht];gt instanceof Array&&(gt=gt.concat([])),dt[ht]=gt}return dt}function ai(it,at){for(var dt;it.innerMode&&(dt=it.innerMode(at),!(!dt||dt.mode==it));)at=dt.state,it=dt.mode;return dt||{mode:it,state:at}}function si(it,at,dt){return it.startState?it.startState(at,dt):!0}var ln=function(it,at,dt){this.pos=this.start=0,this.string=it,this.tabSize=at||8,this.lastColumnPos=this.lastColumnValue=0,this.lineStart=0,this.lineOracle=dt};ln.prototype.eol=function(){return this.pos>=this.string.length},ln.prototype.sol=function(){return this.pos==this.lineStart},ln.prototype.peek=function(){return this.string.charAt(this.pos)||void 0},ln.prototype.next=function(){if(this.pos<this.string.length)return this.string.charAt(this.pos++)},ln.prototype.eat=function(it){var at=this.string.charAt(this.pos),dt;if(typeof it=="string"?dt=at==it:dt=at&&(it.test?it.test(at):it(at)),dt)return++this.pos,at},ln.prototype.eatWhile=function(it){for(var at=this.pos;this.eat(it););return this.pos>at},ln.prototype.eatSpace=function(){for(var it=this.pos;/[\s\u00a0]/.test(this.string.charAt(this.pos));)++this.pos;return this.pos>it},ln.prototype.skipToEnd=function(){this.pos=this.string.length},ln.prototype.skipTo=function(it){var at=this.string.indexOf(it,this.pos);if(at>-1)return this.pos=at,!0},ln.prototype.backUp=function(it){this.pos-=it},ln.prototype.column=function(){return this.lastColumnPos<this.start&&(this.lastColumnValue=ne(this.string,this.start,this.tabSize,this.lastColumnPos,this.lastColumnValue),this.lastColumnPos=this.start),this.lastColumnValue-(this.lineStart?ne(this.string,this.lineStart,this.tabSize):0)},ln.prototype.indentation=function(){return ne(this.string,null,this.tabSize)-(this.lineStart?ne(this.string,this.lineStart,this.tabSize):0)},ln.prototype.match=function(it,at,dt){if(typeof it=="string"){var ht=function(Bt){return dt?Bt.toLowerCase():Bt},gt=this.string.substr(this.pos,it.length);if(ht(gt)==ht(it))return at!==!1&&(this.pos+=it.length),!0}else{var Ct=this.string.slice(this.pos).match(it);return Ct&&Ct.index>0?null:(Ct&&at!==!1&&(this.pos+=Ct[0].length),Ct)}},ln.prototype.current=function(){return this.string.slice(this.start,this.pos)},ln.prototype.hideFirstChars=function(it,at){this.lineStart+=it;try{return at()}finally{this.lineStart-=it}},ln.prototype.lookAhead=function(it){var at=this.lineOracle;return at&&at.lookAhead(it)},ln.prototype.baseToken=function(){var it=this.lineOracle;return it&&it.baseToken(this.pos)};function jn(it,at){if(at-=it.first,at<0||at>=it.size)throw new Error("There is no line "+(at+it.first)+" in the document.");for(var dt=it;!dt.lines;)for(var ht=0;;++ht){var gt=dt.children[ht],Ct=gt.chunkSize();if(at<Ct){dt=gt;break}at-=Ct}return dt.lines[at]}function ii(it,at,dt){var ht=[],gt=at.line;return it.iter(at.line,dt.line+1,function(Ct){var Bt=Ct.text;gt==dt.line&&(Bt=Bt.slice(0,dt.ch)),gt==at.line&&(Bt=Bt.slice(at.ch)),ht.push(Bt),++gt}),ht}function ki(it,at,dt){var ht=[];return it.iter(at,dt,function(gt){ht.push(gt.text)}),ht}function Ri(it,at){var dt=at-it.height;if(dt)for(var ht=it;ht;ht=ht.parent)ht.height+=dt}function Gt(it){if(it.parent==null)return null;for(var at=it.parent,dt=Fe(at.lines,it),ht=at.parent;ht;at=ht,ht=ht.parent)for(var gt=0;ht.children[gt]!=at;++gt)dt+=ht.children[gt].chunkSize();return dt+at.first}function fe(it,at){var dt=it.first;t:do{for(var ht=0;ht<it.children.length;++ht){var gt=it.children[ht],Ct=gt.height;if(at<Ct){it=gt;continue t}at-=Ct,dt+=gt.chunkSize()}return dt}while(!it.lines);for(var Bt=0;Bt<it.lines.length;++Bt){var Wt=it.lines[Bt],Kt=Wt.height;if(at<Kt)break;at-=Kt}return dt+Bt}function Mn(it,at){return at>=it.first&&at<it.first+it.size}function zn(it,at){return String(it.lineNumberFormatter(at+it.firstLineNumber))}function De(it,at,dt){if(dt===void 0&&(dt=null),!(this instanceof De))return new De(it,at,dt);this.line=it,this.ch=at,this.sticky=dt}function kn(it,at){return it.line-at.line||it.ch-at.ch}function Sn(it,at){return it.sticky==at.sticky&&kn(it,at)==0}function Fn(it){return De(it.line,it.ch)}function ei(it,at){return kn(it,at)<0?at:it}function On(it,at){return kn(it,at)<0?it:at}function Qn(it,at){return Math.max(it.first,Math.min(at,it.first+it.size-1))}function Yn(it,at){if(at.line<it.first)return De(it.first,0);var dt=it.first+it.size-1;return at.line>dt?De(dt,jn(it,dt).text.length):Ni(at,jn(it,at.line).text.length)}function Ni(it,at){var dt=it.ch;return dt==null||dt>at?De(it.line,at):dt<0?De(it.line,0):it}function Pi(it,at){for(var dt=[],ht=0;ht<at.length;ht++)dt[ht]=Yn(it,at[ht]);return dt}var bi=function(it,at){this.state=it,this.lookAhead=at},Ge=function(it,at,dt,ht){this.state=at,this.doc=it,this.line=dt,this.maxLookAhead=ht||0,this.baseTokens=null,this.baseTokenPos=1};Ge.prototype.lookAhead=function(it){var at=this.doc.getLine(this.line+it);return at!=null&&it>this.maxLookAhead&&(this.maxLookAhead=it),at},Ge.prototype.baseToken=function(it){if(!this.baseTokens)return null;for(;this.baseTokens[this.baseTokenPos]<=it;)this.baseTokenPos+=2;var at=this.baseTokens[this.baseTokenPos+1];return{type:at&&at.replace(/( |^)overlay .*/,""),size:this.baseTokens[this.baseTokenPos]-it}},Ge.prototype.nextLine=function(){this.line++,this.maxLookAhead>0&&this.maxLookAhead--},Ge.fromSaved=function(it,at,dt){return at instanceof bi?new Ge(it,Wn(it.mode,at.state),dt,at.lookAhead):new Ge(it,Wn(it.mode,at),dt)},Ge.prototype.save=function(it){var at=it!==!1?Wn(this.doc.mode,this.state):this.state;return this.maxLookAhead>0?new bi(at,this.maxLookAhead):at};function Xi(it,at,dt,ht){var gt=[it.state.modeGen],Ct={};Vi(it,at.text,it.doc.mode,dt,function($t,Ie){return gt.push($t,Ie)},Ct,ht);for(var Bt=dt.state,Wt=function($t){dt.baseTokens=gt;var Ie=it.state.overlays[$t],he=1,cn=0;dt.state=!0,Vi(it,at.text,Ie.mode,dt,function(nn,fi){for(var wi=he;cn<nn;){var Ti=gt[he];Ti>nn&>.splice(he,1,nn,gt[he+1],Ti),he+=2,cn=Math.min(nn,Ti)}if(fi)if(Ie.opaque)gt.splice(wi,he-wi,nn,"overlay "+fi),he=wi+2;else for(;wi<he;wi+=2){var tr=gt[wi+1];gt[wi+1]=(tr?tr+" ":"")+"overlay "+fi}},Ct),dt.state=Bt,dt.baseTokens=null,dt.baseTokenPos=1},Kt=0;Kt<it.state.overlays.length;++Kt)Wt(Kt);return{styles:gt,classes:Ct.bgClass||Ct.textClass?Ct:null}}function dr(it,at,dt){if(!at.styles||at.styles[0]!=it.state.modeGen){var ht=br(it,Gt(at)),gt=at.text.length>it.options.maxHighlightLength&&Wn(it.doc.mode,ht.state),Ct=Xi(it,at,ht);gt&&(ht.state=gt),at.stateAfter=ht.save(!gt),at.styles=Ct.styles,Ct.classes?at.styleClasses=Ct.classes:at.styleClasses&&(at.styleClasses=null),dt===it.doc.highlightFrontier&&(it.doc.modeFrontier=Math.max(it.doc.modeFrontier,++it.doc.highlightFrontier))}return at.styles}function br(it,at,dt){var ht=it.doc,gt=it.display;if(!ht.mode.startState)return new Ge(ht,!0,at);var Ct=pr(it,at,dt),Bt=Ct>ht.first&&jn(ht,Ct-1).stateAfter,Wt=Bt?Ge.fromSaved(ht,Bt,Ct):new Ge(ht,si(ht.mode),Ct);return ht.iter(Ct,at,function(Kt){Ue(it,Kt.text,Wt);var $t=Wt.line;Kt.stateAfter=$t==at-1||$t%5==0||$t>=gt.viewFrom&&$t<gt.viewTo?Wt.save():null,Wt.nextLine()}),dt&&(ht.modeFrontier=Wt.line),Wt}function Ue(it,at,dt,ht){var gt=it.doc.mode,Ct=new ln(at,it.options.tabSize,dt);for(Ct.start=Ct.pos=ht||0,at==""&&Vn(gt,dt.state);!Ct.eol();)vi(gt,Ct,dt.state),Ct.start=Ct.pos}function Vn(it,at){if(it.blankLine)return it.blankLine(at);if(it.innerMode){var dt=ai(it,at);if(dt.mode.blankLine)return dt.mode.blankLine(dt.state)}}function vi(it,at,dt,ht){for(var gt=0;gt<10;gt++){ht&&(ht[0]=ai(it,dt).mode);var Ct=it.token(at,dt);if(at.pos>at.start)return Ct}throw new Error("Mode "+it.name+" failed to advance stream.")}var pi=function(it,at,dt){this.start=it.start,this.end=it.pos,this.string=it.current(),this.type=at||null,this.state=dt};function Fi(it,at,dt,ht){var gt=it.doc,Ct=gt.mode,Bt;at=Yn(gt,at);var Wt=jn(gt,at.line),Kt=br(it,at.line,dt),$t=new ln(Wt.text,it.options.tabSize,Kt),Ie;for(ht&&(Ie=[]);(ht||$t.pos<at.ch)&&!$t.eol();)$t.start=$t.pos,Bt=vi(Ct,$t,Kt.state),ht&&Ie.push(new pi($t,Bt,Wn(gt.mode,Kt.state)));return ht?Ie:new pi($t,Bt,Kt.state)}function Wi(it,at){if(it)for(;;){var dt=it.match(/(?:^|\s+)line-(background-)?(\S+)/);if(!dt)break;it=it.slice(0,dt.index)+it.slice(dt.index+dt[0].length);var ht=dt[1]?"bgClass":"textClass";at[ht]==null?at[ht]=dt[2]:new RegExp("(?:^|\\s)"+dt[2]+"(?:$|\\s)").test(at[ht])||(at[ht]+=" "+dt[2])}return it}function Vi(it,at,dt,ht,gt,Ct,Bt){var Wt=dt.flattenSpans;Wt==null&&(Wt=it.options.flattenSpans);var Kt=0,$t=null,Ie=new ln(at,it.options.tabSize,ht),he,cn=it.options.addModeClass&&[null];for(at==""&&Wi(Vn(dt,ht.state),Ct);!Ie.eol();){if(Ie.pos>it.options.maxHighlightLength?(Wt=!1,Bt&&Ue(it,at,ht,Ie.pos),Ie.pos=at.length,he=null):he=Wi(vi(dt,Ie,ht.state,cn),Ct),cn){var nn=cn[0].name;nn&&(he="m-"+(he?nn+" "+he:nn))}if(!Wt||$t!=he){for(;Kt<Ie.start;)Kt=Math.min(Ie.start,Kt+5e3),gt(Kt,$t);$t=he}Ie.start=Ie.pos}for(;Kt<Ie.pos;){var fi=Math.min(Ie.pos,Kt+5e3);gt(fi,$t),Kt=fi}}function pr(it,at,dt){for(var ht,gt,Ct=it.doc,Bt=dt?-1:at-(it.doc.mode.innerMode?1e3:100),Wt=at;Wt>Bt;--Wt){if(Wt<=Ct.first)return Ct.first;var Kt=jn(Ct,Wt-1),$t=Kt.stateAfter;if($t&&(!dt||Wt+($t instanceof bi?$t.lookAhead:0)<=Ct.modeFrontier))return Wt;var Ie=ne(Kt.text,null,it.options.tabSize);(gt==null||ht>Ie)&&(gt=Wt-1,ht=Ie)}return gt}function or(it,at){if(it.modeFrontier=Math.min(it.modeFrontier,at),!(it.highlightFrontier<at-10)){for(var dt=it.first,ht=at-1;ht>dt;ht--){var gt=jn(it,ht).stateAfter;if(gt&&(!(gt instanceof bi)||ht+gt.lookAhead<at)){dt=ht+1;break}}it.highlightFrontier=Math.min(it.highlightFrontier,dt)}}var hr=!1,Xe=!1;function nr(){hr=!0}function qe(){Xe=!0}function xi(it,at,dt){this.marker=it,this.from=at,this.to=dt}function ir(it,at){if(it)for(var dt=0;dt<it.length;++dt){var ht=it[dt];if(ht.marker==at)return ht}}function fr(it,at){for(var dt,ht=0;ht<it.length;++ht)it[ht]!=at&&(dt||(dt=[])).push(it[ht]);return dt}function Br(it,at){it.markedSpans=it.markedSpans?it.markedSpans.concat([at]):[at],at.marker.attachLine(it)}function kr(it,at,dt){var ht;if(it)for(var gt=0;gt<it.length;++gt){var Ct=it[gt],Bt=Ct.marker,Wt=Ct.from==null||(Bt.inclusiveLeft?Ct.from<=at:Ct.from<at);if(Wt||Ct.from==at&&Bt.type=="bookmark"&&(!dt||!Ct.marker.insertLeft)){var Kt=Ct.to==null||(Bt.inclusiveRight?Ct.to>=at:Ct.to>at);(ht||(ht=[])).push(new xi(Bt,Ct.from,Kt?null:Ct.to))}}return ht}function rr(it,at,dt){var ht;if(it)for(var gt=0;gt<it.length;++gt){var Ct=it[gt],Bt=Ct.marker,Wt=Ct.to==null||(Bt.inclusiveRight?Ct.to>=at:Ct.to>at);if(Wt||Ct.from==at&&Bt.type=="bookmark"&&(!dt||Ct.marker.insertLeft)){var Kt=Ct.from==null||(Bt.inclusiveLeft?Ct.from<=at:Ct.from<at);(ht||(ht=[])).push(new xi(Bt,Kt?null:Ct.from-at,Ct.to==null?null:Ct.to-at))}}return ht}function Kr(it,at){if(at.full)return null;var dt=Mn(it,at.from.line)&&jn(it,at.from.line).markedSpans,ht=Mn(it,at.to.line)&&jn(it,at.to.line).markedSpans;if(!dt&&!ht)return null;var gt=at.from.ch,Ct=at.to.ch,Bt=kn(at.from,at.to)==0,Wt=kr(dt,gt,Bt),Kt=rr(ht,Ct,Bt),$t=at.text.length==1,Ie=re(at.text).length+($t?gt:0);if(Wt)for(var he=0;he<Wt.length;++he){var cn=Wt[he];if(cn.to==null){var nn=ir(Kt,cn.marker);nn?$t&&(cn.to=nn.to==null?null:nn.to+Ie):cn.to=gt}}if(Kt)for(var fi=0;fi<Kt.length;++fi){var wi=Kt[fi];if(wi.to!=null&&(wi.to+=Ie),wi.from==null){var Ti=ir(Wt,wi.marker);Ti||(wi.from=Ie,$t&&(Wt||(Wt=[])).push(wi))}else wi.from+=Ie,$t&&(Wt||(Wt=[])).push(wi)}Wt&&(Wt=Ae(Wt)),Kt&&Kt!=Wt&&(Kt=Ae(Kt));var tr=[Wt];if(!$t){var Er=at.text.length-2,gr;if(Er>0&&Wt)for(var Dr=0;Dr<Wt.length;++Dr)Wt[Dr].to==null&&(gr||(gr=[])).push(new xi(Wt[Dr].marker,null,null));for(var Xr=0;Xr<Er;++Xr)tr.push(gr);tr.push(Kt)}return tr}function Ae(it){for(var at=0;at<it.length;++at){var dt=it[at];dt.from!=null&&dt.from==dt.to&&dt.marker.clearWhenEmpty!==!1&&it.splice(at--,1)}return it.length?it:null}function gn(it,at,dt){var ht=null;if(it.iter(at.line,dt.line+1,function(nn){if(nn.markedSpans)for(var fi=0;fi<nn.markedSpans.length;++fi){var wi=nn.markedSpans[fi].marker;wi.readOnly&&(!ht||Fe(ht,wi)==-1)&&(ht||(ht=[])).push(wi)}}),!ht)return null;for(var gt=[{from:at,to:dt}],Ct=0;Ct<ht.length;++Ct)for(var Bt=ht[Ct],Wt=Bt.find(0),Kt=0;Kt<gt.length;++Kt){var $t=gt[Kt];if(!(kn($t.to,Wt.from)<0||kn($t.from,Wt.to)>0)){var Ie=[Kt,1],he=kn($t.from,Wt.from),cn=kn($t.to,Wt.to);(he<0||!Bt.inclusiveLeft&&!he)&&Ie.push({from:$t.from,to:Wt.from}),(cn>0||!Bt.inclusiveRight&&!cn)&&Ie.push({from:Wt.to,to:$t.to}),gt.splice.apply(gt,Ie),Kt+=Ie.length-3}}return gt}function Me(it){var at=it.markedSpans;if(at){for(var dt=0;dt<at.length;++dt)at[dt].marker.detachLine(it);it.markedSpans=null}}function At(it,at){if(at){for(var dt=0;dt<at.length;++dt)at[dt].marker.attachLine(it);it.markedSpans=at}}function Nn(it){return it.inclusiveLeft?-1:0}function Hn(it){return it.inclusiveRight?1:0}function gi(it,at){var dt=it.lines.length-at.lines.length;if(dt!=0)return dt;var ht=it.find(),gt=at.find(),Ct=kn(ht.from,gt.from)||Nn(it)-Nn(at);if(Ct)return-Ct;var Bt=kn(ht.to,gt.to)||Hn(it)-Hn(at);return Bt||at.id-it.id}function ci(it,at){var dt=Xe&&it.markedSpans,ht;if(dt)for(var gt=void 0,Ct=0;Ct<dt.length;++Ct)gt=dt[Ct],gt.marker.collapsed&&(at?gt.from:gt.to)==null&&(!ht||gi(ht,gt.marker)<0)&&(ht=gt.marker);return ht}function ti(it){return ci(it,!0)}function sn(it){return ci(it,!1)}function Dn(it,at){var dt=Xe&&it.markedSpans,ht;if(dt)for(var gt=0;gt<dt.length;++gt){var Ct=dt[gt];Ct.marker.collapsed&&(Ct.from==null||Ct.from<at)&&(Ct.to==null||Ct.to>at)&&(!ht||gi(ht,Ct.marker)<0)&&(ht=Ct.marker)}return ht}function Gn(it,at,dt,ht,gt){var Ct=jn(it,at),Bt=Xe&&Ct.markedSpans;if(Bt)for(var Wt=0;Wt<Bt.length;++Wt){var Kt=Bt[Wt];if(Kt.marker.collapsed){var $t=Kt.marker.find(0),Ie=kn($t.from,dt)||Nn(Kt.marker)-Nn(gt),he=kn($t.to,ht)||Hn(Kt.marker)-Hn(gt);if(!(Ie>=0&&he<=0||Ie<=0&&he>=0)&&(Ie<=0&&(Kt.marker.inclusiveRight&>.inclusiveLeft?kn($t.to,dt)>=0:kn($t.to,dt)>0)||Ie>=0&&(Kt.marker.inclusiveRight&>.inclusiveLeft?kn($t.from,ht)<=0:kn($t.from,ht)<0)))return!0}}}function Ln(it){for(var at;at=ti(it);)it=at.find(-1,!0).line;return it}function Zn(it){for(var at;at=sn(it);)it=at.find(1,!0).line;return it}function Mi(it){for(var at,dt;at=sn(it);)it=at.find(1,!0).line,(dt||(dt=[])).push(it);return dt}function hi(it,at){var dt=jn(it,at),ht=Ln(dt);return dt==ht?at:Gt(ht)}function bn(it,at){if(at>it.lastLine())return at;var dt=jn(it,at),ht;if(!Ke(it,dt))return at;for(;ht=sn(dt);)dt=ht.find(1,!0).line;return Gt(dt)+1}function Ke(it,at){var dt=Xe&&at.markedSpans;if(dt){for(var ht=void 0,gt=0;gt<dt.length;++gt)if(ht=dt[gt],!!ht.marker.collapsed){if(ht.from==null)return!0;if(!ht.marker.widgetNode&&ht.from==0&&ht.marker.inclusiveLeft&&qn(it,at,ht))return!0}}}function qn(it,at,dt){if(dt.to==null){var ht=dt.marker.find(1,!0);return qn(it,ht.line,ir(ht.line.markedSpans,dt.marker))}if(dt.marker.inclusiveRight&&dt.to==at.text.length)return!0;for(var gt=void 0,Ct=0;Ct<at.markedSpans.length;++Ct)if(gt=at.markedSpans[Ct],gt.marker.collapsed&&!gt.marker.widgetNode&>.from==dt.to&&(gt.to==null||gt.to!=dt.from)&&(gt.marker.inclusiveLeft||dt.marker.inclusiveRight)&&qn(it,at,gt))return!0}function Ci(it){it=Ln(it);for(var at=0,dt=it.parent,ht=0;ht<dt.lines.length;++ht){var gt=dt.lines[ht];if(gt==it)break;at+=gt.height}for(var Ct=dt.parent;Ct;dt=Ct,Ct=dt.parent)for(var Bt=0;Bt<Ct.children.length;++Bt){var Wt=Ct.children[Bt];if(Wt==dt)break;at+=Wt.height}return at}function ar(it){if(it.height==0)return 0;for(var at=it.text.length,dt,ht=it;dt=ti(ht);){var gt=dt.find(0,!0);ht=gt.from.line,at+=gt.from.ch-gt.to.ch}for(ht=it;dt=sn(ht);){var Ct=dt.find(0,!0);at-=ht.text.length-Ct.from.ch,ht=Ct.to.line,at+=ht.text.length-Ct.to.ch}return at}function Oi(it){var at=it.display,dt=it.doc;at.maxLine=jn(dt,dt.first),at.maxLineLength=ar(at.maxLine),at.maxLineChanged=!0,dt.iter(function(ht){var gt=ar(ht);gt>at.maxLineLength&&(at.maxLineLength=gt,at.maxLine=ht)})}var ur=function(it,at,dt){this.text=it,At(this,at),this.height=dt?dt(this):1};ur.prototype.lineNo=function(){return Gt(this)},An(ur);function sr(it,at,dt,ht){it.text=at,it.stateAfter&&(it.stateAfter=null),it.styles&&(it.styles=null),it.order!=null&&(it.order=null),Me(it),At(it,dt);var gt=ht?ht(it):1;gt!=it.height&&Ri(it,gt)}function yr(it){it.parent=null,Me(it)}var Tr={},jr={};function Jr(it,at){if(!it||/^\s*$/.test(it))return null;var dt=at.addModeClass?jr:Tr;return dt[it]||(dt[it]=it.replace(/\S+/g,"cm-$&"))}function Ee(it,at){var dt=ve("span",null,null,ie?"padding-right: .1px":null),ht={pre:ve("pre",[dt],"CodeMirror-line"),content:dt,col:0,pos:0,cm:it,trailingSpace:!1,splitSpaces:it.getOption("lineWrapping")};at.measure={};for(var gt=0;gt<=(at.rest?at.rest.length:0);gt++){var Ct=gt?at.rest[gt-1]:at.line,Bt=void 0;ht.pos=0,ht.addToken=Mr,Ai(it.display.measure)&&(Bt=ze(Ct,it.doc.direction))&&(ht.addToken=vr(ht.addToken,Bt)),ht.map=[];var Wt=at!=it.display.externalMeasured&&Gt(Ct);_r(Ct,ht,dr(it,Ct,Wt)),Ct.styleClasses&&(Ct.styleClasses.bgClass&&(ht.bgClass=Rn(Ct.styleClasses.bgClass,ht.bgClass||"")),Ct.styleClasses.textClass&&(ht.textClass=Rn(Ct.styleClasses.textClass,ht.textClass||""))),ht.map.length==0&&ht.map.push(0,0,ht.content.appendChild(Qi(it.display.measure))),gt==0?(at.measure.map=ht.map,at.measure.cache={}):((at.measure.maps||(at.measure.maps=[])).push(ht.map),(at.measure.caches||(at.measure.caches=[])).push({}))}if(ie){var Kt=ht.content.lastChild;(/\bcm-tab\b/.test(Kt.className)||Kt.querySelector&&Kt.querySelector(".cm-tab"))&&(ht.content.className="cm-tab-wrap-hack")}return Ne(it,"renderLine",it,at.line,ht.pre),ht.pre.className&&(ht.textClass=Rn(ht.pre.className,ht.textClass||"")),ht}function Fr(it){var at=Xt("span","\u2022","cm-invalidchar");return at.title="\\u"+it.charCodeAt(0).toString(16),at.setAttribute("aria-label",at.title),at}function Mr(it,at,dt,ht,gt,Ct,Bt){if(at){var Wt=it.splitSpaces?Ui(at,it.trailingSpace):at,Kt=it.cm.state.specialChars,$t=!1,Ie;if(!Kt.test(at))it.col+=at.length,Ie=document.createTextNode(Wt),it.map.push(it.pos,it.pos+at.length,Ie),Se&&Rt<9&&($t=!0),it.pos+=at.length;else{Ie=document.createDocumentFragment();for(var he=0;;){Kt.lastIndex=he;var cn=Kt.exec(at),nn=cn?cn.index-he:at.length-he;if(nn){var fi=document.createTextNode(Wt.slice(he,he+nn));Se&&Rt<9?Ie.appendChild(Xt("span",[fi])):Ie.appendChild(fi),it.map.push(it.pos,it.pos+nn,fi),it.col+=nn,it.pos+=nn}if(!cn)break;he+=nn+1;var wi=void 0;if(cn[0]==" "){var Ti=it.cm.options.tabSize,tr=Ti-it.col%Ti;wi=Ie.appendChild(Xt("span",an(tr),"cm-tab")),wi.setAttribute("role","presentation"),wi.setAttribute("cm-text"," "),it.col+=tr}else cn[0]=="\r"||cn[0]==`
|
|
`?(wi=Ie.appendChild(Xt("span",cn[0]=="\r"?"\u240D":"\u2424","cm-invalidchar")),wi.setAttribute("cm-text",cn[0]),it.col+=1):(wi=it.cm.options.specialCharPlaceholder(cn[0]),wi.setAttribute("cm-text",cn[0]),Se&&Rt<9?Ie.appendChild(Xt("span",[wi])):Ie.appendChild(wi),it.col+=1);it.map.push(it.pos,it.pos+1,wi),it.pos++}}if(it.trailingSpace=Wt.charCodeAt(at.length-1)==32,dt||ht||gt||$t||Ct||Bt){var Er=dt||"";ht&&(Er+=ht),gt&&(Er+=gt);var gr=Xt("span",[Ie],Er,Ct);if(Bt)for(var Dr in Bt)Bt.hasOwnProperty(Dr)&&Dr!="style"&&Dr!="class"&&gr.setAttribute(Dr,Bt[Dr]);return it.content.appendChild(gr)}it.content.appendChild(Ie)}}function Ui(it,at){if(it.length>1&&!/ /.test(it))return it;for(var dt=at,ht="",gt=0;gt<it.length;gt++){var Ct=it.charAt(gt);Ct==" "&&dt&&(gt==it.length-1||it.charCodeAt(gt+1)==32)&&(Ct="\xA0"),ht+=Ct,dt=Ct==" "}return ht}function vr(it,at){return function(dt,ht,gt,Ct,Bt,Wt,Kt){gt=gt?gt+" cm-force-border":"cm-force-border";for(var $t=dt.pos,Ie=$t+ht.length;;){for(var he=void 0,cn=0;cn<at.length&&(he=at[cn],!(he.to>$t&&he.from<=$t));cn++);if(he.to>=Ie)return it(dt,ht,gt,Ct,Bt,Wt,Kt);it(dt,ht.slice(0,he.to-$t),gt,Ct,null,Wt,Kt),Ct=null,ht=ht.slice(he.to-$t),$t=he.to}}}function mr(it,at,dt,ht){var gt=!ht&&dt.widgetNode;gt&&it.map.push(it.pos,it.pos+at,gt),!ht&&it.cm.display.input.needsContentAttribute&&(gt||(gt=it.content.appendChild(document.createElement("span"))),gt.setAttribute("cm-marker",dt.id)),gt&&(it.cm.display.input.setUneditable(gt),it.content.appendChild(gt)),it.pos+=at,it.trailingSpace=!1}function _r(it,at,dt){var ht=it.markedSpans,gt=it.text,Ct=0;if(!ht){for(var Bt=1;Bt<dt.length;Bt+=2)at.addToken(at,gt.slice(Ct,Ct=dt[Bt]),Jr(dt[Bt+1],at.cm.options));return}for(var Wt=gt.length,Kt=0,$t=1,Ie="",he,cn,nn=0,fi,wi,Ti,tr,Er;;){if(nn==Kt){fi=wi=Ti=cn="",Er=null,tr=null,nn=1/0;for(var gr=[],Dr=void 0,Xr=0;Xr<ht.length;++Xr){var cr=ht[Xr],co=cr.marker;if(co.type=="bookmark"&&cr.from==Kt&&co.widgetNode)gr.push(co);else if(cr.from<=Kt&&(cr.to==null||cr.to>Kt||co.collapsed&&cr.to==Kt&&cr.from==Kt)){if(cr.to!=null&&cr.to!=Kt&&nn>cr.to&&(nn=cr.to,wi=""),co.className&&(fi+=" "+co.className),co.css&&(cn=(cn?cn+";":"")+co.css),co.startStyle&&cr.from==Kt&&(Ti+=" "+co.startStyle),co.endStyle&&cr.to==nn&&(Dr||(Dr=[])).push(co.endStyle,cr.to),co.title&&((Er||(Er={})).title=co.title),co.attributes)for(var oa in co.attributes)(Er||(Er={}))[oa]=co.attributes[oa];co.collapsed&&(!tr||gi(tr.marker,co)<0)&&(tr=cr)}else cr.from>Kt&&nn>cr.from&&(nn=cr.from)}if(Dr)for(var Ua=0;Ua<Dr.length;Ua+=2)Dr[Ua+1]==nn&&(wi+=" "+Dr[Ua]);if(!tr||tr.from==Kt)for(var pa=0;pa<gr.length;++pa)mr(at,0,gr[pa]);if(tr&&(tr.from||0)==Kt){if(mr(at,(tr.to==null?Wt+1:tr.to)-Kt,tr.marker,tr.from==null),tr.to==null)return;tr.to==Kt&&(tr=!1)}}if(Kt>=Wt)break;for(var Ws=Math.min(Wt,nn);;){if(Ie){var Es=Kt+Ie.length;if(!tr){var ja=Es>Ws?Ie.slice(0,Ws-Kt):Ie;at.addToken(at,ja,he?he+fi:fi,Ti,Kt+ja.length==nn?wi:"",cn,Er)}if(Es>=Ws){Ie=Ie.slice(Ws-Kt),Kt=Ws;break}Kt=Es,Ti=""}Ie=gt.slice(Ct,Ct=dt[$t++]),he=Jr(dt[$t++],at.cm.options)}}}function Yr(it,at,dt){this.line=at,this.rest=Mi(at),this.size=this.rest?Gt(re(this.rest))-dt+1:1,this.node=this.text=null,this.hidden=Ke(it,at)}function Pr(it,at,dt){for(var ht=[],gt,Ct=at;Ct<dt;Ct=gt){var Bt=new Yr(it.doc,jn(it.doc,Ct),Ct);gt=Ct+Bt.size,ht.push(Bt)}return ht}var oo=null;function va(it){oo?oo.ops.push(it):it.ownsGroup=oo={ops:[it],delayedCallbacks:[]}}function wo(it){var at=it.delayedCallbacks,dt=0;do{for(;dt<at.length;dt++)at[dt].call(null);for(var ht=0;ht<it.ops.length;ht++){var gt=it.ops[ht];if(gt.cursorActivityHandlers)for(;gt.cursorActivityCalled<gt.cursorActivityHandlers.length;)gt.cursorActivityHandlers[gt.cursorActivityCalled++].call(null,gt.cm)}}while(dt<at.length)}function ha(it,at){var dt=it.ownsGroup;if(dt)try{wo(dt)}finally{oo=null,at(dt)}}var da=null;function Ji(it,at){var dt=yn(it,at);if(dt.length){var ht=Array.prototype.slice.call(arguments,2),gt;oo?gt=oo.delayedCallbacks:da?gt=da:(gt=da=[],setTimeout(Fo,0));for(var Ct=function(Wt){gt.push(function(){return dt[Wt].apply(null,ht)})},Bt=0;Bt<dt.length;++Bt)Ct(Bt)}}function Fo(){var it=da;da=null;for(var at=0;at<it.length;++at)it[at]()}function So(it,at,dt,ht){for(var gt=0;gt<at.changes.length;gt++){var Ct=at.changes[gt];Ct=="text"?li(it,at):Ct=="gutter"?Sr(it,at,dt,ht):Ct=="class"?qi(it,at):Ct=="widget"&&Ir(it,at,ht)}at.changes=null}function $o(it){return it.node==it.text&&(it.node=Xt("div",null,null,"position: relative"),it.text.parentNode&&it.text.parentNode.replaceChild(it.node,it.text),it.node.appendChild(it.text),Se&&Rt<8&&(it.node.style.zIndex=2)),it.node}function Do(it,at){var dt=at.bgClass?at.bgClass+" "+(at.line.bgClass||""):at.line.bgClass;if(dt&&(dt+=" CodeMirror-linebackground"),at.background)dt?at.background.className=dt:(at.background.parentNode.removeChild(at.background),at.background=null);else if(dt){var ht=$o(at);at.background=ht.insertBefore(Xt("div",null,dt),ht.firstChild),it.display.input.setUneditable(at.background)}}function Vo(it,at){var dt=it.display.externalMeasured;return dt&&dt.line==at.line?(it.display.externalMeasured=null,at.measure=dt.measure,dt.built):Ee(it,at)}function li(it,at){var dt=at.text.className,ht=Vo(it,at);at.text==at.node&&(at.node=ht.pre),at.text.parentNode.replaceChild(ht.pre,at.text),at.text=ht.pre,ht.bgClass!=at.bgClass||ht.textClass!=at.textClass?(at.bgClass=ht.bgClass,at.textClass=ht.textClass,qi(it,at)):dt&&(at.text.className=dt)}function qi(it,at){Do(it,at),at.line.wrapClass?$o(at).className=at.line.wrapClass:at.node!=at.text&&(at.node.className="");var dt=at.textClass?at.textClass+" "+(at.line.textClass||""):at.line.textClass;at.text.className=dt||""}function Sr(it,at,dt,ht){if(at.gutter&&(at.node.removeChild(at.gutter),at.gutter=null),at.gutterBackground&&(at.node.removeChild(at.gutterBackground),at.gutterBackground=null),at.line.gutterClass){var gt=$o(at);at.gutterBackground=Xt("div",null,"CodeMirror-gutter-background "+at.line.gutterClass,"left: "+(it.options.fixedGutter?ht.fixedPos:-ht.gutterTotalWidth)+"px; width: "+ht.gutterTotalWidth+"px"),it.display.input.setUneditable(at.gutterBackground),gt.insertBefore(at.gutterBackground,at.text)}var Ct=at.line.gutterMarkers;if(it.options.lineNumbers||Ct){var Bt=$o(at),Wt=at.gutter=Xt("div",null,"CodeMirror-gutter-wrapper","left: "+(it.options.fixedGutter?ht.fixedPos:-ht.gutterTotalWidth)+"px");if(it.display.input.setUneditable(Wt),Bt.insertBefore(Wt,at.text),at.line.gutterClass&&(Wt.className+=" "+at.line.gutterClass),it.options.lineNumbers&&(!Ct||!Ct["CodeMirror-linenumbers"])&&(at.lineNumber=Wt.appendChild(Xt("div",zn(it.options,dt),"CodeMirror-linenumber CodeMirror-gutter-elt","left: "+ht.gutterLeft["CodeMirror-linenumbers"]+"px; width: "+it.display.lineNumInnerWidth+"px"))),Ct)for(var Kt=0;Kt<it.display.gutterSpecs.length;++Kt){var $t=it.display.gutterSpecs[Kt].className,Ie=Ct.hasOwnProperty($t)&&Ct[$t];Ie&&Wt.appendChild(Xt("div",[Ie],"CodeMirror-gutter-elt","left: "+ht.gutterLeft[$t]+"px; width: "+ht.gutterWidth[$t]+"px"))}}}function Ir(it,at,dt){at.alignable&&(at.alignable=null);for(var ht=Ot("CodeMirror-linewidget"),gt=at.node.firstChild,Ct=void 0;gt;gt=Ct)Ct=gt.nextSibling,ht.test(gt.className)&&at.node.removeChild(gt);lo(it,at,dt)}function Gr(it,at,dt,ht){var gt=Vo(it,at);return at.text=at.node=gt.pre,gt.bgClass&&(at.bgClass=gt.bgClass),gt.textClass&&(at.textClass=gt.textClass),qi(it,at),Sr(it,at,dt,ht),lo(it,at,ht),at.node}function lo(it,at,dt){if(er(it,at.line,at,dt,!0),at.rest)for(var ht=0;ht<at.rest.length;ht++)er(it,at.rest[ht],at,dt,!1)}function er(it,at,dt,ht,gt){if(at.widgets)for(var Ct=$o(dt),Bt=0,Wt=at.widgets;Bt<Wt.length;++Bt){var Kt=Wt[Bt],$t=Xt("div",[Kt.node],"CodeMirror-linewidget"+(Kt.className?" "+Kt.className:""));Kt.handleMouseEvents||$t.setAttribute("cm-ignore-events","true"),La(Kt,$t,dt,ht),it.display.input.setUneditable($t),gt&&Kt.above?Ct.insertBefore($t,dt.gutter||dt.text):Ct.appendChild($t),Ji(Kt,"redraw")}}function La(it,at,dt,ht){if(it.noHScroll){(dt.alignable||(dt.alignable=[])).push(at);var gt=ht.wrapperWidth;at.style.left=ht.fixedPos+"px",it.coverGutter||(gt-=ht.gutterTotalWidth,at.style.paddingLeft=ht.gutterTotalWidth+"px"),at.style.width=gt+"px"}it.coverGutter&&(at.style.zIndex=5,at.style.position="relative",it.noHScroll||(at.style.marginLeft=-ht.gutterTotalWidth+"px"))}function Ro(it){if(it.height!=null)return it.height;var at=it.doc.cm;if(!at)return 0;if(!Re(document.body,it.node)){var dt="position: relative;";it.coverGutter&&(dt+="margin-left: -"+at.display.gutters.offsetWidth+"px;"),it.noHScroll&&(dt+="width: "+at.display.wrapper.clientWidth+"px;"),_t(at.display.measure,Xt("div",[it.node],null,dt))}return it.height=it.node.parentNode.offsetHeight}function bo(it,at){for(var dt=Yi(at);dt!=it.wrapper;dt=dt.parentNode)if(!dt||dt.nodeType==1&&dt.getAttribute("cm-ignore-events")=="true"||dt.parentNode==it.sizer&&dt!=it.mover)return!0}function Hr(it){return it.lineSpace.offsetTop}function Uo(it){return it.mover.offsetHeight-it.lineSpace.offsetHeight}function ba(it){if(it.cachedPaddingH)return it.cachedPaddingH;var at=_t(it.measure,Xt("pre","x","CodeMirror-line-like")),dt=window.getComputedStyle?window.getComputedStyle(at):at.currentStyle,ht={left:parseInt(dt.paddingLeft),right:parseInt(dt.paddingRight)};return!isNaN(ht.left)&&!isNaN(ht.right)&&(it.cachedPaddingH=ht),ht}function ko(it){return We-it.display.nativeBarWidth}function Ha(it){return it.display.scroller.clientWidth-ko(it)-it.display.barWidth}function Ba(it){return it.display.scroller.clientHeight-ko(it)-it.display.barHeight}function cs(it,at,dt){var ht=it.options.lineWrapping,gt=ht&&Ha(it);if(!at.measure.heights||ht&&at.measure.width!=gt){var Ct=at.measure.heights=[];if(ht){at.measure.width=gt;for(var Bt=at.text.firstChild.getClientRects(),Wt=0;Wt<Bt.length-1;Wt++){var Kt=Bt[Wt],$t=Bt[Wt+1];Math.abs(Kt.bottom-$t.bottom)>2&&Ct.push((Kt.bottom+$t.top)/2-dt.top)}}Ct.push(dt.bottom-dt.top)}}function ea(it,at,dt){if(it.line==at)return{map:it.measure.map,cache:it.measure.cache};for(var ht=0;ht<it.rest.length;ht++)if(it.rest[ht]==at)return{map:it.measure.maps[ht],cache:it.measure.caches[ht]};for(var gt=0;gt<it.rest.length;gt++)if(Gt(it.rest[gt])>dt)return{map:it.measure.maps[gt],cache:it.measure.caches[gt],before:!0}}function ru(it,at){at=Ln(at);var dt=Gt(at),ht=it.display.externalMeasured=new Yr(it.doc,at,dt);ht.lineN=dt;var gt=ht.built=Ee(it,ht);return ht.text=gt.pre,_t(it.display.lineMeasure,gt.pre),ht}function Hl(it,at,dt,ht){return fs(it,Hs(it,at),dt,ht)}function As(it,at){if(at>=it.display.viewFrom&&at<it.display.viewTo)return it.display.view[Ps(it,at)];var dt=it.display.externalMeasured;if(dt&&at>=dt.lineN&&at<dt.lineN+dt.size)return dt}function Hs(it,at){var dt=Gt(at),ht=As(it,dt);ht&&!ht.text?ht=null:ht&&ht.changes&&(So(it,ht,dt,Ds(it)),it.curOp.forceUpdate=!0),ht||(ht=ru(it,at));var gt=ea(ht,at,dt);return{line:at,view:ht,rect:null,map:gt.map,cache:gt.cache,before:gt.before,hasHeights:!1}}function fs(it,at,dt,ht,gt){at.before&&(dt=-1);var Ct=dt+(ht||""),Bt;return at.cache.hasOwnProperty(Ct)?Bt=at.cache[Ct]:(at.rect||(at.rect=at.view.text.getBoundingClientRect()),at.hasHeights||(cs(it,at.view,at.rect),at.hasHeights=!0),Bt=Bo(it,at,dt,ht),Bt.bogus||(at.cache[Ct]=Bt)),{left:Bt.left,right:Bt.right,top:gt?Bt.rtop:Bt.top,bottom:gt?Bt.rbottom:Bt.bottom}}var kl={left:0,right:0,top:0,bottom:0};function ou(it,at,dt){for(var ht,gt,Ct,Bt,Wt,Kt,$t=0;$t<it.length;$t+=3)if(Wt=it[$t],Kt=it[$t+1],at<Wt?(gt=0,Ct=1,Bt="left"):at<Kt?(gt=at-Wt,Ct=gt+1):($t==it.length-3||at==Kt&&it[$t+3]>at)&&(Ct=Kt-Wt,gt=Ct-1,at>=Kt&&(Bt="right")),gt!=null){if(ht=it[$t+2],Wt==Kt&&dt==(ht.insertLeft?"left":"right")&&(Bt=dt),dt=="left"&>==0)for(;$t&&it[$t-2]==it[$t-3]&&it[$t-1].insertLeft;)ht=it[($t-=3)+2],Bt="left";if(dt=="right"&>==Kt-Wt)for(;$t<it.length-3&&it[$t+3]==it[$t+4]&&!it[$t+5].insertLeft;)ht=it[($t+=3)+2],Bt="right";break}return{node:ht,start:gt,end:Ct,collapse:Bt,coverStart:Wt,coverEnd:Kt}}function Ll(it,at){var dt=kl;if(at=="left")for(var ht=0;ht<it.length&&(dt=it[ht]).left==dt.right;ht++);else for(var gt=it.length-1;gt>=0&&(dt=it[gt]).left==dt.right;gt--);return dt}function Bo(it,at,dt,ht){var gt=ou(at.map,dt,ht),Ct=gt.node,Bt=gt.start,Wt=gt.end,Kt=gt.collapse,$t;if(Ct.nodeType==3){for(var Ie=0;Ie<4;Ie++){for(;Bt&&Oe(at.line.text.charAt(gt.coverStart+Bt));)--Bt;for(;gt.coverStart+Wt<gt.coverEnd&&Oe(at.line.text.charAt(gt.coverStart+Wt));)++Wt;if(Se&&Rt<9&&Bt==0&&Wt==gt.coverEnd-gt.coverStart?$t=Ct.parentNode.getBoundingClientRect():$t=Ll(oe(Ct,Bt,Wt).getClientRects(),ht),$t.left||$t.right||Bt==0)break;Wt=Bt,Bt=Bt-1,Kt="right"}Se&&Rt<11&&($t=Ve(it.display.measure,$t))}else{Bt>0&&(Kt=ht="right");var he;it.options.lineWrapping&&(he=Ct.getClientRects()).length>1?$t=he[ht=="right"?he.length-1:0]:$t=Ct.getBoundingClientRect()}if(Se&&Rt<9&&!Bt&&(!$t||!$t.left&&!$t.right)){var cn=Ct.parentNode.getClientRects()[0];cn?$t={left:cn.left,right:cn.left+ws(it.display),top:cn.top,bottom:cn.bottom}:$t=kl}for(var nn=$t.top-at.rect.top,fi=$t.bottom-at.rect.top,wi=(nn+fi)/2,Ti=at.view.measure.heights,tr=0;tr<Ti.length-1&&!(wi<Ti[tr]);tr++);var Er=tr?Ti[tr-1]:0,gr=Ti[tr],Dr={left:(Kt=="right"?$t.right:$t.left)-at.rect.left,right:(Kt=="left"?$t.left:$t.right)-at.rect.left,top:Er,bottom:gr};return!$t.left&&!$t.right&&(Dr.bogus=!0),it.options.singleCursorHeightPerLine||(Dr.rtop=nn,Dr.rbottom=fi),Dr}function Ve(it,at){if(!window.screen||screen.logicalXDPI==null||screen.logicalXDPI==screen.deviceXDPI||!on(it))return at;var dt=screen.logicalXDPI/screen.deviceXDPI,ht=screen.logicalYDPI/screen.deviceYDPI;return{left:at.left*dt,right:at.right*dt,top:at.top*ht,bottom:at.bottom*ht}}function au(it){if(it.measure&&(it.measure.cache={},it.measure.heights=null,it.rest))for(var at=0;at<it.rest.length;at++)it.measure.caches[at]={}}function bl(it){it.display.externalMeasure=null,te(it.display.lineMeasure);for(var at=0;at<it.display.view.length;at++)au(it.display.view[at])}function Ml(it){bl(it),it.display.cachedCharWidth=it.display.cachedTextHeight=it.display.cachedPaddingH=null,it.options.lineWrapping||(it.display.maxLineChanged=!0),it.display.lineNumChars=null}function Ma(){return ce&&nt?-(document.body.getBoundingClientRect().left-parseInt(getComputedStyle(document.body).marginLeft)):window.pageXOffset||(document.documentElement||document.body).scrollLeft}function ya(){return ce&&nt?-(document.body.getBoundingClientRect().top-parseInt(getComputedStyle(document.body).marginTop)):window.pageYOffset||(document.documentElement||document.body).scrollTop}function na(it){var at=0;if(it.widgets)for(var dt=0;dt<it.widgets.length;++dt)it.widgets[dt].above&&(at+=Ro(it.widgets[dt]));return at}function Sa(it,at,dt,ht,gt){if(!gt){var Ct=na(at);dt.top+=Ct,dt.bottom+=Ct}if(ht=="line")return dt;ht||(ht="local");var Bt=Ci(at);if(ht=="local"?Bt+=Hr(it.display):Bt-=it.display.viewOffset,ht=="page"||ht=="window"){var Wt=it.display.lineSpace.getBoundingClientRect();Bt+=Wt.top+(ht=="window"?0:ya());var Kt=Wt.left+(ht=="window"?0:Ma());dt.left+=Kt,dt.right+=Kt}return dt.top+=Bt,dt.bottom+=Bt,dt}function _s(it,at,dt){if(dt=="div")return at;var ht=at.left,gt=at.top;if(dt=="page")ht-=Ma(),gt-=ya();else if(dt=="local"||!dt){var Ct=it.display.sizer.getBoundingClientRect();ht+=Ct.left,gt+=Ct.top}var Bt=it.display.lineSpace.getBoundingClientRect();return{left:ht-Bt.left,top:gt-Bt.top}}function Oa(it,at,dt,ht,gt){return ht||(ht=jn(it.doc,at.line)),Sa(it,ht,Hl(it,ht,at.ch,gt),dt)}function yo(it,at,dt,ht,gt,Ct){ht=ht||jn(it.doc,at.line),gt||(gt=Hs(it,ht));function Bt(fi,wi){var Ti=fs(it,gt,fi,wi?"right":"left",Ct);return wi?Ti.left=Ti.right:Ti.right=Ti.left,Sa(it,ht,Ti,dt)}var Wt=ze(ht,it.doc.direction),Kt=at.ch,$t=at.sticky;if(Kt>=ht.text.length?(Kt=ht.text.length,$t="before"):Kt<=0&&(Kt=0,$t="after"),!Wt)return Bt($t=="before"?Kt-1:Kt,$t=="before");function Ie(fi,wi,Ti){var tr=Wt[wi],Er=tr.level==1;return Bt(Ti?fi-1:fi,Er!=Ti)}var he=pe(Wt,Kt,$t),cn=de,nn=Ie(Kt,he,$t=="before");return cn!=null&&(nn.other=Ie(Kt,cn,$t!="before")),nn}function Cr(it,at){var dt=0;at=Yn(it.doc,at),it.options.lineWrapping||(dt=ws(it.display)*at.ch);var ht=jn(it.doc,at.line),gt=Ci(ht)+Hr(it.display);return{left:dt,right:dt,top:gt,bottom:gt+ht.height}}function $r(it,at,dt,ht,gt){var Ct=De(it,at,dt);return Ct.xRel=gt,ht&&(Ct.outside=ht),Ct}function Oo(it,at,dt){var ht=it.doc;if(dt+=it.display.viewOffset,dt<0)return $r(ht.first,0,null,-1,-1);var gt=fe(ht,dt),Ct=ht.first+ht.size-1;if(gt>Ct)return $r(ht.first+ht.size-1,jn(ht,Ct).text.length,null,1,1);at<0&&(at=0);for(var Bt=jn(ht,gt);;){var Wt=xn(it,Bt,gt,at,dt),Kt=Dn(Bt,Wt.ch+(Wt.xRel>0||Wt.outside>0?1:0));if(!Kt)return Wt;var $t=Kt.find(1);if($t.line==gt)return $t;Bt=jn(ht,gt=$t.line)}}function Ii(it,at,dt,ht){ht-=na(at);var gt=at.text.length,Ct=_e(function(Bt){return fs(it,dt,Bt-1).bottom<=ht},gt,0);return gt=_e(function(Bt){return fs(it,dt,Bt).top>ht},Ct,gt),{begin:Ct,end:gt}}function ca(it,at,dt,ht){dt||(dt=Hs(it,at));var gt=Sa(it,at,fs(it,dt,ht),"line").top;return Ii(it,at,dt,gt)}function ue(it,at,dt,ht){return it.bottom<=dt?!1:it.top>dt?!0:(ht?it.left:it.right)>at}function xn(it,at,dt,ht,gt){gt-=Ci(at);var Ct=Hs(it,at),Bt=na(at),Wt=0,Kt=at.text.length,$t=!0,Ie=ze(at,it.doc.direction);if(Ie){var he=(it.options.lineWrapping?dl:Ns)(it,at,dt,Ct,Ie,ht,gt);$t=he.level!=1,Wt=$t?he.from:he.to-1,Kt=$t?he.to:he.from-1}var cn=null,nn=null,fi=_e(function(Xr){var cr=fs(it,Ct,Xr);return cr.top+=Bt,cr.bottom+=Bt,ue(cr,ht,gt,!1)?(cr.top<=gt&&cr.left<=ht&&(cn=Xr,nn=cr),!0):!1},Wt,Kt),wi,Ti,tr=!1;if(nn){var Er=ht-nn.left<nn.right-ht,gr=Er==$t;fi=cn+(gr?0:1),Ti=gr?"after":"before",wi=Er?nn.left:nn.right}else{!$t&&(fi==Kt||fi==Wt)&&fi++,Ti=fi==0?"after":fi==at.text.length?"before":fs(it,Ct,fi-($t?1:0)).bottom+Bt<=gt==$t?"after":"before";var Dr=yo(it,De(dt,fi,Ti),"line",at,Ct);wi=Dr.left,tr=gt<Dr.top?-1:gt>=Dr.bottom?1:0}return fi=Te(at.text,fi,1),$r(dt,fi,Ti,tr,ht-wi)}function Ns(it,at,dt,ht,gt,Ct,Bt){var Wt=_e(function(he){var cn=gt[he],nn=cn.level!=1;return ue(yo(it,De(dt,nn?cn.to:cn.from,nn?"before":"after"),"line",at,ht),Ct,Bt,!0)},0,gt.length-1),Kt=gt[Wt];if(Wt>0){var $t=Kt.level!=1,Ie=yo(it,De(dt,$t?Kt.from:Kt.to,$t?"after":"before"),"line",at,ht);ue(Ie,Ct,Bt,!0)&&Ie.top>Bt&&(Kt=gt[Wt-1])}return Kt}function dl(it,at,dt,ht,gt,Ct,Bt){var Wt=Ii(it,at,ht,Bt),Kt=Wt.begin,$t=Wt.end;/\s/.test(at.text.charAt($t-1))&&$t--;for(var Ie=null,he=null,cn=0;cn<gt.length;cn++){var nn=gt[cn];if(!(nn.from>=$t||nn.to<=Kt)){var fi=nn.level!=1,wi=fs(it,ht,fi?Math.min($t,nn.to)-1:Math.max(Kt,nn.from)).right,Ti=wi<Ct?Ct-wi+1e9:wi-Ct;(!Ie||he>Ti)&&(Ie=nn,he=Ti)}}return Ie||(Ie=gt[gt.length-1]),Ie.from<Kt&&(Ie={from:Kt,to:Ie.to,level:Ie.level}),Ie.to>$t&&(Ie={from:Ie.from,to:$t,level:Ie.level}),Ie}var ta;function Ea(it){if(it.cachedTextHeight!=null)return it.cachedTextHeight;if(ta==null){ta=Xt("pre",null,"CodeMirror-line-like");for(var at=0;at<49;++at)ta.appendChild(document.createTextNode("x")),ta.appendChild(Xt("br"));ta.appendChild(document.createTextNode("x"))}_t(it.measure,ta);var dt=ta.offsetHeight/50;return dt>3&&(it.cachedTextHeight=dt),te(it.measure),dt||1}function ws(it){if(it.cachedCharWidth!=null)return it.cachedCharWidth;var at=Xt("span","xxxxxxxxxx"),dt=Xt("pre",[at],"CodeMirror-line-like");_t(it.measure,dt);var ht=at.getBoundingClientRect(),gt=(ht.right-ht.left)/10;return gt>2&&(it.cachedCharWidth=gt),gt||10}function Ds(it){for(var at=it.display,dt={},ht={},gt=at.gutters.clientLeft,Ct=at.gutters.firstChild,Bt=0;Ct;Ct=Ct.nextSibling,++Bt){var Wt=it.display.gutterSpecs[Bt].className;dt[Wt]=Ct.offsetLeft+Ct.clientLeft+gt,ht[Wt]=Ct.clientWidth}return{fixedPos:Kl(at),gutterTotalWidth:at.gutters.offsetWidth,gutterLeft:dt,gutterWidth:ht,wrapperWidth:at.wrapper.clientWidth}}function Kl(it){return it.scroller.getBoundingClientRect().left-it.sizer.getBoundingClientRect().left}function jo(it){var at=Ea(it.display),dt=it.options.lineWrapping,ht=dt&&Math.max(5,it.display.scroller.clientWidth/ws(it.display)-3);return function(gt){if(Ke(it.doc,gt))return 0;var Ct=0;if(gt.widgets)for(var Bt=0;Bt<gt.widgets.length;Bt++)gt.widgets[Bt].height&&(Ct+=gt.widgets[Bt].height);return dt?Ct+(Math.ceil(gt.text.length/ht)||1)*at:Ct+at}}function Or(it){var at=it.doc,dt=jo(it);at.iter(function(ht){var gt=dt(ht);gt!=ht.height&&Ri(ht,gt)})}function Ka(it,at,dt,ht){var gt=it.display;if(!dt&&Yi(at).getAttribute("cm-not-content")=="true")return null;var Ct,Bt,Wt=gt.lineSpace.getBoundingClientRect();try{Ct=at.clientX-Wt.left,Bt=at.clientY-Wt.top}catch(he){return null}var Kt=Oo(it,Ct,Bt),$t;if(ht&&Kt.xRel>0&&($t=jn(it.doc,Kt.line).text).length==Kt.ch){var Ie=ne($t,$t.length,it.options.tabSize)-$t.length;Kt=De(Kt.line,Math.max(0,Math.round((Ct-ba(it.display).left)/ws(it.display))-Ie))}return Kt}function Ps(it,at){if(at>=it.display.viewTo||(at-=it.display.viewFrom,at<0))return null;for(var dt=it.display.view,ht=0;ht<dt.length;ht++)if(at-=dt[ht].size,at<0)return ht}function zo(it,at,dt,ht){at==null&&(at=it.doc.first),dt==null&&(dt=it.doc.first+it.doc.size),ht||(ht=0);var gt=it.display;if(ht&&dt<gt.viewTo&&(gt.updateLineNumbers==null||gt.updateLineNumbers>at)&&(gt.updateLineNumbers=at),it.curOp.viewChanged=!0,at>=gt.viewTo)Xe&&hi(it.doc,at)<gt.viewTo&&Ar(it);else if(dt<=gt.viewFrom)Xe&&bn(it.doc,dt+ht)>gt.viewFrom?Ar(it):(gt.viewFrom+=ht,gt.viewTo+=ht);else if(at<=gt.viewFrom&&dt>=gt.viewTo)Ar(it);else if(at<=gt.viewFrom){var Ct=Zr(it,dt,dt+ht,1);Ct?(gt.view=gt.view.slice(Ct.index),gt.viewFrom=Ct.lineN,gt.viewTo+=ht):Ar(it)}else if(dt>=gt.viewTo){var Bt=Zr(it,at,at,-1);Bt?(gt.view=gt.view.slice(0,Bt.index),gt.viewTo=Bt.lineN):Ar(it)}else{var Wt=Zr(it,at,at,-1),Kt=Zr(it,dt,dt+ht,1);Wt&&Kt?(gt.view=gt.view.slice(0,Wt.index).concat(Pr(it,Wt.lineN,Kt.lineN)).concat(gt.view.slice(Kt.index)),gt.viewTo+=ht):Ar(it)}var $t=gt.externalMeasured;$t&&(dt<$t.lineN?$t.lineN+=ht:at<$t.lineN+$t.size&&(gt.externalMeasured=null))}function ri(it,at,dt){it.curOp.viewChanged=!0;var ht=it.display,gt=it.display.externalMeasured;if(gt&&at>=gt.lineN&&at<gt.lineN+gt.size&&(ht.externalMeasured=null),!(at<ht.viewFrom||at>=ht.viewTo)){var Ct=ht.view[Ps(it,at)];if(Ct.node!=null){var Bt=Ct.changes||(Ct.changes=[]);Fe(Bt,dt)==-1&&Bt.push(dt)}}}function Ar(it){it.display.viewFrom=it.display.viewTo=it.doc.first,it.display.view=[],it.display.viewOffset=0}function Zr(it,at,dt,ht){var gt=Ps(it,at),Ct,Bt=it.display.view;if(!Xe||dt==it.doc.first+it.doc.size)return{index:gt,lineN:dt};for(var Wt=it.display.viewFrom,Kt=0;Kt<gt;Kt++)Wt+=Bt[Kt].size;if(Wt!=at){if(ht>0){if(gt==Bt.length-1)return null;Ct=Wt+Bt[gt].size-at,gt++}else Ct=Wt-at;at+=Ct,dt+=Ct}for(;hi(it.doc,dt)!=dt;){if(gt==(ht<0?0:Bt.length-1))return null;dt+=ht*Bt[gt-(ht<0?1:0)].size,gt+=ht}return{index:gt,lineN:dt}}function Qr(it,at,dt){var ht=it.display,gt=ht.view;gt.length==0||at>=ht.viewTo||dt<=ht.viewFrom?(ht.view=Pr(it,at,dt),ht.viewFrom=at):(ht.viewFrom>at?ht.view=Pr(it,at,ht.viewFrom).concat(ht.view):ht.viewFrom<at&&(ht.view=ht.view.slice(Ps(it,at))),ht.viewFrom=at,ht.viewTo<dt?ht.view=ht.view.concat(Pr(it,ht.viewTo,dt)):ht.viewTo>dt&&(ht.view=ht.view.slice(0,Ps(it,dt)))),ht.viewTo=dt}function Co(it){for(var at=it.display.view,dt=0,ht=0;ht<at.length;ht++){var gt=at[ht];!gt.hidden&&(!gt.node||gt.changes)&&++dt}return dt}function ia(it){it.display.input.showSelection(it.display.input.prepareSelection())}function Qs(it,at){at===void 0&&(at=!0);for(var dt=it.doc,ht={},gt=ht.cursors=document.createDocumentFragment(),Ct=ht.selection=document.createDocumentFragment(),Bt=0;Bt<dt.sel.ranges.length;Bt++)if(!(!at&&Bt==dt.sel.primIndex)){var Wt=dt.sel.ranges[Bt];if(!(Wt.from().line>=it.display.viewTo||Wt.to().line<it.display.viewFrom)){var Kt=Wt.empty();(Kt||it.options.showCursorWhenSelecting)&&ao(it,Wt.head,gt),Kt||no(it,Wt,Ct)}}return ht}function ao(it,at,dt){var ht=yo(it,at,"div",null,null,!it.options.singleCursorHeightPerLine),gt=dt.appendChild(Xt("div","\xA0","CodeMirror-cursor"));if(gt.style.left=ht.left+"px",gt.style.top=ht.top+"px",gt.style.height=Math.max(0,ht.bottom-ht.top)*it.options.cursorHeight+"px",ht.other){var Ct=dt.appendChild(Xt("div","\xA0","CodeMirror-cursor CodeMirror-secondarycursor"));Ct.style.display="",Ct.style.left=ht.other.left+"px",Ct.style.top=ht.other.top+"px",Ct.style.height=(ht.other.bottom-ht.other.top)*.85+"px"}}function fa(it,at){return it.top-at.top||it.left-at.left}function no(it,at,dt){var ht=it.display,gt=it.doc,Ct=document.createDocumentFragment(),Bt=ba(it.display),Wt=Bt.left,Kt=Math.max(ht.sizerWidth,Ha(it)-ht.sizer.offsetLeft)-Bt.right,$t=gt.direction=="ltr";function Ie(gr,Dr,Xr,cr){Dr<0&&(Dr=0),Dr=Math.round(Dr),cr=Math.round(cr),Ct.appendChild(Xt("div",null,"CodeMirror-selected","position: absolute; left: "+gr+`px;
|
|
top: `+Dr+"px; width: "+(Xr==null?Kt-gr:Xr)+`px;
|
|
height: `+(cr-Dr)+"px"))}function he(gr,Dr,Xr){var cr=jn(gt,gr),co=cr.text.length,oa,Ua;function pa(ja,nl){return Oa(it,De(gr,ja),"div",cr,nl)}function Ws(ja,nl,ps){var za=ca(it,cr,null,ja),Mo=nl=="ltr"==(ps=="after")?"left":"right",wa=ps=="after"?za.begin:za.end-(/\s/.test(cr.text.charAt(za.end-1))?2:1);return pa(wa,Mo)[Mo]}var Es=ze(cr,gt.direction);return ee(Es,Dr||0,Xr==null?co:Xr,function(ja,nl,ps,za){var Mo=ps=="ltr",wa=pa(ja,Mo?"left":"right"),es=pa(nl-1,Mo?"right":"left"),ms=Dr==null&&ja==0,Xl=Xr==null&&nl==co,ma=za==0,Dl=!Es||za==Es.length-1;if(es.top-wa.top<=3){var ka=($t?ms:Xl)&&ma,Fc=($t?Xl:ms)&&Dl,vl=ka?Wt:(Mo?wa:es).left,il=Fc?Kt:(Mo?es:wa).right;Ie(vl,wa.top,il-vl,wa.bottom)}else{var Vs,Xo,ns,bu;Mo?(Vs=$t&&ms&&ma?Wt:wa.left,Xo=$t?Kt:Ws(ja,ps,"before"),ns=$t?Wt:Ws(nl,ps,"after"),bu=$t&&Xl&&Dl?Kt:es.right):(Vs=$t?Ws(ja,ps,"before"):Wt,Xo=!$t&&ms&&ma?Kt:wa.right,ns=!$t&&Xl&&Dl?Wt:es.left,bu=$t?Ws(nl,ps,"after"):Kt),Ie(Vs,wa.top,Xo-Vs,wa.bottom),wa.bottom<es.top&&Ie(Wt,wa.bottom,null,es.top),Ie(ns,es.top,bu-ns,es.bottom)}(!oa||fa(wa,oa)<0)&&(oa=wa),fa(es,oa)<0&&(oa=es),(!Ua||fa(wa,Ua)<0)&&(Ua=wa),fa(es,Ua)<0&&(Ua=es)}),{start:oa,end:Ua}}var cn=at.from(),nn=at.to();if(cn.line==nn.line)he(cn.line,cn.ch,nn.ch);else{var fi=jn(gt,cn.line),wi=jn(gt,nn.line),Ti=Ln(fi)==Ln(wi),tr=he(cn.line,cn.ch,Ti?fi.text.length+1:null).end,Er=he(nn.line,Ti?0:null,nn.ch).start;Ti&&(tr.top<Er.top-2?(Ie(tr.right,tr.top,null,tr.bottom),Ie(Wt,Er.top,Er.left,Er.bottom)):Ie(tr.right,tr.top,Er.left-tr.right,tr.bottom)),tr.bottom<Er.top&&Ie(Wt,tr.bottom,null,Er.top)}dt.appendChild(Ct)}function Po(it){if(it.state.focused){var at=it.display;clearInterval(at.blinker);var dt=!0;at.cursorDiv.style.visibility="",it.options.cursorBlinkRate>0?at.blinker=setInterval(function(){it.hasFocus()||qs(it),at.cursorDiv.style.visibility=(dt=!dt)?"":"hidden"},it.options.cursorBlinkRate):it.options.cursorBlinkRate<0&&(at.cursorDiv.style.visibility="hidden")}}function Eo(it){it.state.focused||(it.display.input.focus(),uo(it))}function To(it){it.state.delayingBlurEvent=!0,setTimeout(function(){it.state.delayingBlurEvent&&(it.state.delayingBlurEvent=!1,qs(it))},100)}function uo(it,at){it.state.delayingBlurEvent&&(it.state.delayingBlurEvent=!1),it.options.readOnly!="nocursor"&&(it.state.focused||(Ne(it,"focus",it,at),it.state.focused=!0,en(it.display.wrapper,"CodeMirror-focused"),!it.curOp&&it.display.selForContextMenu!=it.doc.sel&&(it.display.input.reset(),ie&&setTimeout(function(){return it.display.input.reset(!0)},20)),it.display.input.receivedFocus()),Po(it))}function qs(it,at){it.state.delayingBlurEvent||(it.state.focused&&(Ne(it,"blur",it,at),it.state.focused=!1,Ht(it.display.wrapper,"CodeMirror-focused")),clearInterval(it.display.blinker),setTimeout(function(){it.state.focused||(it.display.shift=!1)},150))}function wr(it){for(var at=it.display,dt=at.lineDiv.offsetTop,ht=0;ht<at.view.length;ht++){var gt=at.view[ht],Ct=it.options.lineWrapping,Bt=void 0,Wt=0;if(!gt.hidden){if(Se&&Rt<8){var Kt=gt.node.offsetTop+gt.node.offsetHeight;Bt=Kt-dt,dt=Kt}else{var $t=gt.node.getBoundingClientRect();Bt=$t.bottom-$t.top,!Ct&>.text.firstChild&&(Wt=gt.text.firstChild.getBoundingClientRect().right-$t.left-1)}var Ie=gt.line.height-Bt;if((Ie>.005||Ie<-.005)&&(Ri(gt.line,Bt),Zl(gt.line),gt.rest))for(var he=0;he<gt.rest.length;he++)Zl(gt.rest[he]);if(Wt>it.display.sizerWidth){var cn=Math.ceil(Wt/ws(it.display));cn>it.display.maxLineLength&&(it.display.maxLineLength=cn,it.display.maxLine=gt.line,it.display.maxLineChanged=!0)}}}}function Zl(it){if(it.widgets)for(var at=0;at<it.widgets.length;++at){var dt=it.widgets[at],ht=dt.node.parentNode;ht&&(dt.height=ht.offsetHeight)}}function qr(it,at,dt){var ht=dt&&dt.top!=null?Math.max(0,dt.top):it.scroller.scrollTop;ht=Math.floor(ht-Hr(it));var gt=dt&&dt.bottom!=null?dt.bottom:ht+it.wrapper.clientHeight,Ct=fe(at,ht),Bt=fe(at,gt);if(dt&&dt.ensure){var Wt=dt.ensure.from.line,Kt=dt.ensure.to.line;Wt<Ct?(Ct=Wt,Bt=fe(at,Ci(jn(at,Wt))+it.wrapper.clientHeight)):Math.min(Kt,at.lastLine())>=Bt&&(Ct=fe(at,Ci(jn(at,Kt))-it.wrapper.clientHeight),Bt=Kt)}return{from:Ct,to:Math.max(Bt,Ct+1)}}function Nr(it,at){if(!Ze(it,"scrollCursorIntoView")){var dt=it.display,ht=dt.sizer.getBoundingClientRect(),gt=null;if(at.top+ht.top<0?gt=!0:at.bottom+ht.top>(window.innerHeight||document.documentElement.clientHeight)&&(gt=!1),gt!=null&&!Je){var Ct=Xt("div","\u200B",null,`position: absolute;
|
|
top: `+(at.top-dt.viewOffset-Hr(it.display))+`px;
|
|
height: `+(at.bottom-at.top+ko(it)+dt.barHeight)+`px;
|
|
left: `+at.left+"px; width: "+Math.max(2,at.right-at.left)+"px;");it.display.lineSpace.appendChild(Ct),Ct.scrollIntoView(gt),it.display.lineSpace.removeChild(Ct)}}}function Wl(it,at,dt,ht){ht==null&&(ht=0);var gt;!it.options.lineWrapping&&at==dt&&(at=at.ch?De(at.line,at.sticky=="before"?at.ch-1:at.ch,"after"):at,dt=at.sticky=="before"?De(at.line,at.ch+1,"before"):at);for(var Ct=0;Ct<5;Ct++){var Bt=!1,Wt=yo(it,at),Kt=!dt||dt==at?Wt:yo(it,dt);gt={left:Math.min(Wt.left,Kt.left),top:Math.min(Wt.top,Kt.top)-ht,right:Math.max(Wt.left,Kt.left),bottom:Math.max(Wt.bottom,Kt.bottom)+ht};var $t=kd(it,gt),Ie=it.doc.scrollTop,he=it.doc.scrollLeft;if($t.scrollTop!=null&&(su(it,$t.scrollTop),Math.abs(it.doc.scrollTop-Ie)>1&&(Bt=!0)),$t.scrollLeft!=null&&(lu(it,$t.scrollLeft),Math.abs(it.doc.scrollLeft-he)>1&&(Bt=!0)),!Bt)break}return gt}function oh(it,at){var dt=kd(it,at);dt.scrollTop!=null&&su(it,dt.scrollTop),dt.scrollLeft!=null&&lu(it,dt.scrollLeft)}function kd(it,at){var dt=it.display,ht=Ea(it.display);at.top<0&&(at.top=0);var gt=it.curOp&&it.curOp.scrollTop!=null?it.curOp.scrollTop:dt.scroller.scrollTop,Ct=Ba(it),Bt={};at.bottom-at.top>Ct&&(at.bottom=at.top+Ct);var Wt=it.doc.height+Uo(dt),Kt=at.top<ht,$t=at.bottom>Wt-ht;if(at.top<gt)Bt.scrollTop=Kt?0:at.top;else if(at.bottom>gt+Ct){var Ie=Math.min(at.top,($t?Wt:at.bottom)-Ct);Ie!=gt&&(Bt.scrollTop=Ie)}var he=it.options.fixedGutter?0:dt.gutters.offsetWidth,cn=it.curOp&&it.curOp.scrollLeft!=null?it.curOp.scrollLeft:dt.scroller.scrollLeft-he,nn=Ha(it)-dt.gutters.offsetWidth,fi=at.right-at.left>nn;return fi&&(at.right=at.left+nn),at.left<10?Bt.scrollLeft=0:at.left<cn?Bt.scrollLeft=Math.max(0,at.left+he-(fi?0:10)):at.right>nn+cn-3&&(Bt.scrollLeft=at.right+(fi?0:10)-nn),Bt}function Gh(it,at){at!=null&&(cl(it),it.curOp.scrollTop=(it.curOp.scrollTop==null?it.doc.scrollTop:it.curOp.scrollTop)+at)}function Vl(it){cl(it);var at=it.getCursor();it.curOp.scrollToPos={from:at,to:at,margin:it.options.cursorScrollMargin}}function Hu(it,at,dt){(at!=null||dt!=null)&&cl(it),at!=null&&(it.curOp.scrollLeft=at),dt!=null&&(it.curOp.scrollTop=dt)}function vo(it,at){cl(it),it.curOp.scrollToPos=at}function cl(it){var at=it.curOp.scrollToPos;if(at){it.curOp.scrollToPos=null;var dt=Cr(it,at.from),ht=Cr(it,at.to);Hh(it,dt,ht,at.margin)}}function Hh(it,at,dt,ht){var gt=kd(it,{left:Math.min(at.left,dt.left),top:Math.min(at.top,dt.top)-ht,right:Math.max(at.right,dt.right),bottom:Math.max(at.bottom,dt.bottom)+ht});Hu(it,gt.scrollLeft,gt.scrollTop)}function su(it,at){Math.abs(it.doc.scrollTop-at)<2||(Ft||sh(it,{top:at}),Ld(it,at,!0),Ft&&sh(it),bd(it,100))}function Ld(it,at,dt){at=Math.max(0,Math.min(it.display.scroller.scrollHeight-it.display.scroller.clientHeight,at)),!(it.display.scroller.scrollTop==at&&!dt)&&(it.doc.scrollTop=at,it.display.scrollbars.setScrollTop(at),it.display.scroller.scrollTop!=at&&(it.display.scroller.scrollTop=at))}function lu(it,at,dt,ht){at=Math.max(0,Math.min(at,it.display.scroller.scrollWidth-it.display.scroller.clientWidth)),!((dt?at==it.doc.scrollLeft:Math.abs(it.doc.scrollLeft-at)<2)&&!ht)&&(it.doc.scrollLeft=at,$c(it),it.display.scroller.scrollLeft!=at&&(it.display.scroller.scrollLeft=at),it.display.scrollbars.setScrollLeft(at))}function to(it){var at=it.display,dt=at.gutters.offsetWidth,ht=Math.round(it.doc.height+Uo(it.display));return{clientHeight:at.scroller.clientHeight,viewHeight:at.wrapper.clientHeight,scrollWidth:at.scroller.scrollWidth,clientWidth:at.scroller.clientWidth,viewWidth:at.wrapper.clientWidth,barLeft:it.options.fixedGutter?dt:0,docHeight:ht,scrollHeight:ht+ko(it)+at.barHeight,nativeBarWidth:at.nativeBarWidth,gutterWidth:dt}}var po=function(it,at,dt){this.cm=dt;var ht=this.vert=Xt("div",[Xt("div",null,null,"min-width: 1px")],"CodeMirror-vscrollbar"),gt=this.horiz=Xt("div",[Xt("div",null,null,"height: 100%; min-height: 1px")],"CodeMirror-hscrollbar");ht.tabIndex=gt.tabIndex=-1,it(ht),it(gt),He(ht,"scroll",function(){ht.clientHeight&&at(ht.scrollTop,"vertical")}),He(gt,"scroll",function(){gt.clientWidth&&at(gt.scrollLeft,"horizontal")}),this.checkedZeroWidth=!1,Se&&Rt<8&&(this.horiz.style.minHeight=this.vert.style.minWidth="18px")};po.prototype.update=function(it){var at=it.scrollWidth>it.clientWidth+1,dt=it.scrollHeight>it.clientHeight+1,ht=it.nativeBarWidth;if(dt){this.vert.style.display="block",this.vert.style.bottom=at?ht+"px":"0";var gt=it.viewHeight-(at?ht:0);this.vert.firstChild.style.height=Math.max(0,it.scrollHeight-it.clientHeight+gt)+"px"}else this.vert.style.display="",this.vert.firstChild.style.height="0";if(at){this.horiz.style.display="block",this.horiz.style.right=dt?ht+"px":"0",this.horiz.style.left=it.barLeft+"px";var Ct=it.viewWidth-it.barLeft-(dt?ht:0);this.horiz.firstChild.style.width=Math.max(0,it.scrollWidth-it.clientWidth+Ct)+"px"}else this.horiz.style.display="",this.horiz.firstChild.style.width="0";return!this.checkedZeroWidth&&it.clientHeight>0&&(ht==0&&this.zeroWidthHack(),this.checkedZeroWidth=!0),{right:dt?ht:0,bottom:at?ht:0}},po.prototype.setScrollLeft=function(it){this.horiz.scrollLeft!=it&&(this.horiz.scrollLeft=it),this.disableHoriz&&this.enableZeroWidthBar(this.horiz,this.disableHoriz,"horiz")},po.prototype.setScrollTop=function(it){this.vert.scrollTop!=it&&(this.vert.scrollTop=it),this.disableVert&&this.enableZeroWidthBar(this.vert,this.disableVert,"vert")},po.prototype.zeroWidthHack=function(){var it=ct&&!Qt?"12px":"18px";this.horiz.style.height=this.vert.style.width=it,this.horiz.style.pointerEvents=this.vert.style.pointerEvents="none",this.disableHoriz=new jt,this.disableVert=new jt},po.prototype.enableZeroWidthBar=function(it,at,dt){it.style.pointerEvents="auto";function ht(){var gt=it.getBoundingClientRect(),Ct=dt=="vert"?document.elementFromPoint(gt.right-1,(gt.top+gt.bottom)/2):document.elementFromPoint((gt.right+gt.left)/2,gt.bottom-1);Ct!=it?it.style.pointerEvents="none":at.set(1e3,ht)}at.set(1e3,ht)},po.prototype.clear=function(){var it=this.horiz.parentNode;it.removeChild(this.horiz),it.removeChild(this.vert)};var ra=function(){};ra.prototype.update=function(){return{bottom:0,right:0}},ra.prototype.setScrollLeft=function(){},ra.prototype.setScrollTop=function(){},ra.prototype.clear=function(){};function Za(it,at){at||(at=to(it));var dt=it.display.barWidth,ht=it.display.barHeight;Ia(it,at);for(var gt=0;gt<4&&dt!=it.display.barWidth||ht!=it.display.barHeight;gt++)dt!=it.display.barWidth&&it.options.lineWrapping&&wr(it),Ia(it,to(it)),dt=it.display.barWidth,ht=it.display.barHeight}function Ia(it,at){var dt=it.display,ht=dt.scrollbars.update(at);dt.sizer.style.paddingRight=(dt.barWidth=ht.right)+"px",dt.sizer.style.paddingBottom=(dt.barHeight=ht.bottom)+"px",dt.heightForcer.style.borderBottom=ht.bottom+"px solid transparent",ht.right&&ht.bottom?(dt.scrollbarFiller.style.display="block",dt.scrollbarFiller.style.height=ht.bottom+"px",dt.scrollbarFiller.style.width=ht.right+"px"):dt.scrollbarFiller.style.display="",ht.bottom&&it.options.coverGutterNextToScrollbar&&it.options.fixedGutter?(dt.gutterFiller.style.display="block",dt.gutterFiller.style.height=ht.bottom+"px",dt.gutterFiller.style.width=at.gutterWidth+"px"):dt.gutterFiller.style.display=""}var wu={native:po,null:ra};function uu(it){it.display.scrollbars&&(it.display.scrollbars.clear(),it.display.scrollbars.addClass&&Ht(it.display.wrapper,it.display.scrollbars.addClass)),it.display.scrollbars=new wu[it.options.scrollbarStyle](function(at){it.display.wrapper.insertBefore(at,it.display.scrollbarFiller),He(at,"mousedown",function(){it.state.focused&&setTimeout(function(){return it.display.input.focus()},0)}),at.setAttribute("cm-not-content","true")},function(at,dt){dt=="horizontal"?lu(it,at):su(it,at)},it),it.display.scrollbars.addClass&&en(it.display.wrapper,it.display.scrollbars.addClass)}var Pu=0;function fl(it){it.curOp={cm:it,viewChanged:!1,startHeight:it.doc.height,forceUpdate:!1,updateInput:0,typing:!1,changeObjs:null,cursorActivityHandlers:null,cursorActivityCalled:0,selectionChanged:!1,updateMaxLine:!1,scrollLeft:null,scrollTop:null,scrollToPos:null,focus:!1,id:++Pu},va(it.curOp)}function Ul(it){var at=it.curOp;at&&ha(at,function(dt){for(var ht=0;ht<dt.ops.length;ht++)dt.ops[ht].cm.curOp=null;_0(dt)})}function _0(it){for(var at=it.ops,dt=0;dt<at.length;dt++)Q0(at[dt]);for(var ht=0;ht<at.length;ht++)q0(at[ht]);for(var gt=0;gt<at.length;gt++)Rp(at[gt]);for(var Ct=0;Ct<at.length;Ct++)xa(at[Ct]);for(var Bt=0;Bt<at.length;Bt++)ah(at[Bt])}function Q0(it){var at=it.cm,dt=at.display;jp(at),it.updateMaxLine&&Oi(at),it.mustUpdate=it.viewChanged||it.forceUpdate||it.scrollTop!=null||it.scrollToPos&&(it.scrollToPos.from.line<dt.viewFrom||it.scrollToPos.to.line>=dt.viewTo)||dt.maxLineChanged&&at.options.lineWrapping,it.update=it.mustUpdate&&new Kh(at,it.mustUpdate&&{top:it.scrollTop,ensure:it.scrollToPos},it.forceUpdate)}function q0(it){it.updatedDisplay=it.mustUpdate&&qc(it.cm,it.update)}function Rp(it){var at=it.cm,dt=at.display;it.updatedDisplay&&wr(at),it.barMeasure=to(at),dt.maxLineChanged&&!at.options.lineWrapping&&(it.adjustWidthTo=Hl(at,dt.maxLine,dt.maxLine.text.length).left+3,at.display.sizerWidth=it.adjustWidthTo,it.barMeasure.scrollWidth=Math.max(dt.scroller.clientWidth,dt.sizer.offsetLeft+it.adjustWidthTo+ko(at)+at.display.barWidth),it.maxScrollLeft=Math.max(0,dt.sizer.offsetLeft+it.adjustWidthTo-Ha(at))),(it.updatedDisplay||it.selectionChanged)&&(it.preparedSelection=dt.input.prepareSelection())}function xa(it){var at=it.cm;it.adjustWidthTo!=null&&(at.display.sizer.style.minWidth=it.adjustWidthTo+"px",it.maxScrollLeft<at.doc.scrollLeft&&lu(at,Math.min(at.display.scroller.scrollLeft,it.maxScrollLeft),!0),at.display.maxLineChanged=!1);var dt=it.focus&&it.focus==Ye();it.preparedSelection&&at.display.input.showSelection(it.preparedSelection,dt),(it.updatedDisplay||it.startHeight!=at.doc.height)&&Za(at,it.barMeasure),it.updatedDisplay&&uh(at,it.barMeasure),it.selectionChanged&&Po(at),at.state.focused&&it.updateInput&&at.display.input.reset(it.typing),dt&&Eo(it.cm)}function ah(it){var at=it.cm,dt=at.display,ht=at.doc;if(it.updatedDisplay&&Go(at,it.update),dt.wheelStartX!=null&&(it.scrollTop!=null||it.scrollLeft!=null||it.scrollToPos)&&(dt.wheelStartX=dt.wheelStartY=null),it.scrollTop!=null&&Ld(at,it.scrollTop,it.forceScroll),it.scrollLeft!=null&&lu(at,it.scrollLeft,!0,!0),it.scrollToPos){var gt=Wl(at,Yn(ht,it.scrollToPos.from),Yn(ht,it.scrollToPos.to),it.scrollToPos.margin);Nr(at,gt)}var Ct=it.maybeHiddenMarkers,Bt=it.maybeUnhiddenMarkers;if(Ct)for(var Wt=0;Wt<Ct.length;++Wt)Ct[Wt].lines.length||Ne(Ct[Wt],"hide");if(Bt)for(var Kt=0;Kt<Bt.length;++Kt)Bt[Kt].lines.length&&Ne(Bt[Kt],"unhide");dt.wrapper.offsetHeight&&(ht.scrollTop=at.display.scroller.scrollTop),it.changeObjs&&Ne(at,"changes",at,it.changeObjs),it.update&&it.update.finish()}function Ao(it,at){if(it.curOp)return at();fl(it);try{return at()}finally{Ul(it)}}function Wa(it,at){return function(){if(it.curOp)return at.apply(it,arguments);fl(it);try{return at.apply(it,arguments)}finally{Ul(it)}}}function _a(it){return function(){if(this.curOp)return it.apply(this,arguments);fl(this);try{return it.apply(this,arguments)}finally{Ul(this)}}}function Qa(it){return function(){var at=this.cm;if(!at||at.curOp)return it.apply(this,arguments);fl(at);try{return it.apply(this,arguments)}finally{Ul(at)}}}function bd(it,at){it.doc.highlightFrontier<it.display.viewTo&&it.state.highlight.set(at,un(qa,it))}function qa(it){var at=it.doc;if(!(at.highlightFrontier>=it.display.viewTo)){var dt=+new Date+it.options.workTime,ht=br(it,at.highlightFrontier),gt=[];at.iter(ht.line,Math.min(at.first+at.size,it.display.viewTo+500),function(Ct){if(ht.line>=it.display.viewFrom){var Bt=Ct.styles,Wt=Ct.text.length>it.options.maxHighlightLength?Wn(at.mode,ht.state):null,Kt=Xi(it,Ct,ht,!0);Wt&&(ht.state=Wt),Ct.styles=Kt.styles;var $t=Ct.styleClasses,Ie=Kt.classes;Ie?Ct.styleClasses=Ie:$t&&(Ct.styleClasses=null);for(var he=!Bt||Bt.length!=Ct.styles.length||$t!=Ie&&(!$t||!Ie||$t.bgClass!=Ie.bgClass||$t.textClass!=Ie.textClass),cn=0;!he&&cn<Bt.length;++cn)he=Bt[cn]!=Ct.styles[cn];he&>.push(ht.line),Ct.stateAfter=ht.save(),ht.nextLine()}else Ct.text.length<=it.options.maxHighlightLength&&Ue(it,Ct.text,ht),Ct.stateAfter=ht.line%5==0?ht.save():null,ht.nextLine();if(+new Date>dt)return bd(it,it.options.workDelay),!0}),at.highlightFrontier=ht.line,at.modeFrontier=Math.max(at.modeFrontier,ht.line),gt.length&&Ao(it,function(){for(var Ct=0;Ct<gt.length;Ct++)ri(it,gt[Ct],"text")})}}var Kh=function(it,at,dt){var ht=it.display;this.viewport=at,this.visible=qr(ht,it.doc,at),this.editorIsHidden=!ht.wrapper.offsetWidth,this.wrapperHeight=ht.wrapper.clientHeight,this.wrapperWidth=ht.wrapper.clientWidth,this.oldDisplayWidth=Ha(it),this.force=dt,this.dims=Ds(it),this.events=[]};Kh.prototype.signal=function(it,at){le(it,at)&&this.events.push(arguments)},Kh.prototype.finish=function(){for(var it=0;it<this.events.length;it++)Ne.apply(null,this.events[it])};function jp(it){var at=it.display;!at.scrollbarsClipped&&at.scroller.offsetWidth&&(at.nativeBarWidth=at.scroller.offsetWidth-at.scroller.clientWidth,at.heightForcer.style.height=ko(it)+"px",at.sizer.style.marginBottom=-at.nativeBarWidth+"px",at.sizer.style.borderRightWidth=ko(it)+"px",at.scrollbarsClipped=!0)}function zp(it){if(it.hasFocus())return null;var at=Ye();if(!at||!Re(it.display.lineDiv,at))return null;var dt={activeElt:at};if(window.getSelection){var ht=window.getSelection();ht.anchorNode&&ht.extend&&Re(it.display.lineDiv,ht.anchorNode)&&(dt.anchorNode=ht.anchorNode,dt.anchorOffset=ht.anchorOffset,dt.focusNode=ht.focusNode,dt.focusOffset=ht.focusOffset)}return dt}function Ks(it){if(!(!it||!it.activeElt||it.activeElt==Ye())&&(it.activeElt.focus(),!/^(INPUT|TEXTAREA)$/.test(it.activeElt.nodeName)&&it.anchorNode&&Re(document.body,it.anchorNode)&&Re(document.body,it.focusNode))){var at=window.getSelection(),dt=document.createRange();dt.setEnd(it.anchorNode,it.anchorOffset),dt.collapse(!1),at.removeAllRanges(),at.addRange(dt),at.extend(it.focusNode,it.focusOffset)}}function qc(it,at){var dt=it.display,ht=it.doc;if(at.editorIsHidden)return Ar(it),!1;if(!at.force&&at.visible.from>=dt.viewFrom&&at.visible.to<=dt.viewTo&&(dt.updateLineNumbers==null||dt.updateLineNumbers>=dt.viewTo)&&dt.renderedView==dt.view&&Co(it)==0)return!1;Ta(it)&&(Ar(it),at.dims=Ds(it));var gt=ht.first+ht.size,Ct=Math.max(at.visible.from-it.options.viewportMargin,ht.first),Bt=Math.min(gt,at.visible.to+it.options.viewportMargin);dt.viewFrom<Ct&&Ct-dt.viewFrom<20&&(Ct=Math.max(ht.first,dt.viewFrom)),dt.viewTo>Bt&&dt.viewTo-Bt<20&&(Bt=Math.min(gt,dt.viewTo)),Xe&&(Ct=hi(it.doc,Ct),Bt=bn(it.doc,Bt));var Wt=Ct!=dt.viewFrom||Bt!=dt.viewTo||dt.lastWrapHeight!=at.wrapperHeight||dt.lastWrapWidth!=at.wrapperWidth;Qr(it,Ct,Bt),dt.viewOffset=Ci(jn(it.doc,dt.viewFrom)),it.display.mover.style.top=dt.viewOffset+"px";var Kt=Co(it);if(!Wt&&Kt==0&&!at.force&&dt.renderedView==dt.view&&(dt.updateLineNumbers==null||dt.updateLineNumbers>=dt.viewTo))return!1;var $t=zp(it);return Kt>4&&(dt.lineDiv.style.display="none"),sg(it,dt.updateLineNumbers,at.dims),Kt>4&&(dt.lineDiv.style.display=""),dt.renderedView=dt.view,Ks($t),te(dt.cursorDiv),te(dt.selectionDiv),dt.gutters.style.height=dt.sizer.style.minHeight=0,Wt&&(dt.lastWrapHeight=at.wrapperHeight,dt.lastWrapWidth=at.wrapperWidth,bd(it,400)),dt.updateLineNumbers=null,!0}function Go(it,at){for(var dt=at.viewport,ht=!0;;ht=!1){if(!ht||!it.options.lineWrapping||at.oldDisplayWidth==Ha(it)){if(dt&&dt.top!=null&&(dt={top:Math.min(it.doc.height+Uo(it.display)-Ba(it),dt.top)}),at.visible=qr(it.display,it.doc,dt),at.visible.from>=it.display.viewFrom&&at.visible.to<=it.display.viewTo)break}else ht&&(at.visible=qr(it.display,it.doc,dt));if(!qc(it,at))break;wr(it);var gt=to(it);ia(it),Za(it,gt),uh(it,gt),at.force=!1}at.signal(it,"update",it),(it.display.viewFrom!=it.display.reportedViewFrom||it.display.viewTo!=it.display.reportedViewTo)&&(at.signal(it,"viewportChange",it,it.display.viewFrom,it.display.viewTo),it.display.reportedViewFrom=it.display.viewFrom,it.display.reportedViewTo=it.display.viewTo)}function sh(it,at){var dt=new Kh(it,at);if(qc(it,dt)){wr(it),Go(it,dt);var ht=to(it);ia(it),Za(it,ht),uh(it,ht),dt.finish()}}function sg(it,at,dt){var ht=it.display,gt=it.options.lineNumbers,Ct=ht.lineDiv,Bt=Ct.firstChild;function Wt(fi){var wi=fi.nextSibling;return ie&&ct&&it.display.currentWheelTarget==fi?fi.style.display="none":fi.parentNode.removeChild(fi),wi}for(var Kt=ht.view,$t=ht.viewFrom,Ie=0;Ie<Kt.length;Ie++){var he=Kt[Ie];if(!he.hidden)if(!he.node||he.node.parentNode!=Ct){var cn=Gr(it,he,$t,dt);Ct.insertBefore(cn,Bt)}else{for(;Bt!=he.node;)Bt=Wt(Bt);var nn=gt&&at!=null&&at<=$t&&he.lineNumber;he.changes&&(Fe(he.changes,"gutter")>-1&&(nn=!1),So(it,he,$t,dt)),nn&&(te(he.lineNumber),he.lineNumber.appendChild(document.createTextNode(zn(it.options,$t)))),Bt=he.node.nextSibling}$t+=he.size}for(;Bt;)Bt=Wt(Bt)}function lh(it){var at=it.gutters.offsetWidth;it.sizer.style.marginLeft=at+"px"}function uh(it,at){it.display.sizer.style.minHeight=at.docHeight+"px",it.display.heightForcer.style.top=at.docHeight+"px",it.display.gutters.style.height=at.docHeight+it.display.barHeight+ko(it)+"px"}function $c(it){var at=it.display,dt=at.view;if(!(!at.alignWidgets&&(!at.gutters.firstChild||!it.options.fixedGutter))){for(var ht=Kl(at)-at.scroller.scrollLeft+it.doc.scrollLeft,gt=at.gutters.offsetWidth,Ct=ht+"px",Bt=0;Bt<dt.length;Bt++)if(!dt[Bt].hidden){it.options.fixedGutter&&(dt[Bt].gutter&&(dt[Bt].gutter.style.left=Ct),dt[Bt].gutterBackground&&(dt[Bt].gutterBackground.style.left=Ct));var Wt=dt[Bt].alignable;if(Wt)for(var Kt=0;Kt<Wt.length;Kt++)Wt[Kt].style.left=Ct}it.options.fixedGutter&&(at.gutters.style.left=ht+gt+"px")}}function Ta(it){if(!it.options.lineNumbers)return!1;var at=it.doc,dt=zn(it.options,at.first+at.size-1),ht=it.display;if(dt.length!=ht.lineNumChars){var gt=ht.measure.appendChild(Xt("div",[Xt("div",dt)],"CodeMirror-linenumber CodeMirror-gutter-elt")),Ct=gt.firstChild.offsetWidth,Bt=gt.offsetWidth-Ct;return ht.lineGutter.style.width="",ht.lineNumInnerWidth=Math.max(Ct,ht.lineGutter.offsetWidth-Bt)+1,ht.lineNumWidth=ht.lineNumInnerWidth+Bt,ht.lineNumChars=ht.lineNumInnerWidth?dt.length:-1,ht.lineGutter.style.width=ht.lineNumWidth+"px",lh(it.display),!0}return!1}function $a(it,at){for(var dt=[],ht=!1,gt=0;gt<it.length;gt++){var Ct=it[gt],Bt=null;if(typeof Ct!="string"&&(Bt=Ct.style,Ct=Ct.className),Ct=="CodeMirror-linenumbers")if(at)ht=!0;else continue;dt.push({className:Ct,style:Bt})}return at&&!ht&&dt.push({className:"CodeMirror-linenumbers",style:null}),dt}function Zh(it){var at=it.gutters,dt=it.gutterSpecs;te(at),it.lineGutter=null;for(var ht=0;ht<dt.length;++ht){var gt=dt[ht],Ct=gt.className,Bt=gt.style,Wt=at.appendChild(Xt("div",null,"CodeMirror-gutter "+Ct));Bt&&(Wt.style.cssText=Bt),Ct=="CodeMirror-linenumbers"&&(it.lineGutter=Wt,Wt.style.width=(it.lineNumWidth||1)+"px")}at.style.display=dt.length?"":"none",lh(it)}function gl(it){Zh(it.display),zo(it),$c(it)}function hh(it,at,dt,ht){var gt=this;this.input=dt,gt.scrollbarFiller=Xt("div",null,"CodeMirror-scrollbar-filler"),gt.scrollbarFiller.setAttribute("cm-not-content","true"),gt.gutterFiller=Xt("div",null,"CodeMirror-gutter-filler"),gt.gutterFiller.setAttribute("cm-not-content","true"),gt.lineDiv=ve("div",null,"CodeMirror-code"),gt.selectionDiv=Xt("div",null,null,"position: relative; z-index: 1"),gt.cursorDiv=Xt("div",null,"CodeMirror-cursors"),gt.measure=Xt("div",null,"CodeMirror-measure"),gt.lineMeasure=Xt("div",null,"CodeMirror-measure"),gt.lineSpace=ve("div",[gt.measure,gt.lineMeasure,gt.selectionDiv,gt.cursorDiv,gt.lineDiv],null,"position: relative; outline: none");var Ct=ve("div",[gt.lineSpace],"CodeMirror-lines");gt.mover=Xt("div",[Ct],null,"position: relative"),gt.sizer=Xt("div",[gt.mover],"CodeMirror-sizer"),gt.sizerWidth=null,gt.heightForcer=Xt("div",null,null,"position: absolute; height: "+We+"px; width: 1px;"),gt.gutters=Xt("div",null,"CodeMirror-gutters"),gt.lineGutter=null,gt.scroller=Xt("div",[gt.sizer,gt.heightForcer,gt.gutters],"CodeMirror-scroll"),gt.scroller.setAttribute("tabIndex","-1"),gt.wrapper=Xt("div",[gt.scrollbarFiller,gt.gutterFiller,gt.scroller],"CodeMirror"),Se&&Rt<8&&(gt.gutters.style.zIndex=-1,gt.scroller.style.paddingRight=0),!ie&&!(Ft&&et)&&(gt.scroller.draggable=!0),it&&(it.appendChild?it.appendChild(gt.wrapper):it(gt.wrapper)),gt.viewFrom=gt.viewTo=at.first,gt.reportedViewFrom=gt.reportedViewTo=at.first,gt.view=[],gt.renderedView=null,gt.externalMeasured=null,gt.viewOffset=0,gt.lastWrapHeight=gt.lastWrapWidth=0,gt.updateLineNumbers=null,gt.nativeBarWidth=gt.barHeight=gt.barWidth=0,gt.scrollbarsClipped=!1,gt.lineNumWidth=gt.lineNumInnerWidth=gt.lineNumChars=null,gt.alignWidgets=!1,gt.cachedCharWidth=gt.cachedTextHeight=gt.cachedPaddingH=null,gt.maxLine=null,gt.maxLineLength=0,gt.maxLineChanged=!1,gt.wheelDX=gt.wheelDY=gt.wheelStartX=gt.wheelStartY=null,gt.shift=!1,gt.selForContextMenu=null,gt.activeTouch=null,gt.gutterSpecs=$a(ht.gutters,ht.lineNumbers),Zh(gt),dt.init(gt)}var $s=0,Fa=null;Se?Fa=-.53:Ft?Fa=15:ce?Fa=-.7:Qe&&(Fa=-1/3);function hu(it){var at=it.wheelDeltaX,dt=it.wheelDeltaY;return at==null&&it.detail&&it.axis==it.HORIZONTAL_AXIS&&(at=it.detail),dt==null&&it.detail&&it.axis==it.VERTICAL_AXIS?dt=it.detail:dt==null&&(dt=it.wheelDelta),{x:at,y:dt}}function pl(it){var at=hu(it);return at.x*=Fa,at.y*=Fa,at}function ts(it,at){var dt=hu(at),ht=dt.x,gt=dt.y,Ct=it.display,Bt=Ct.scroller,Wt=Bt.scrollWidth>Bt.clientWidth,Kt=Bt.scrollHeight>Bt.clientHeight;if(ht&&Wt||gt&&Kt){if(gt&&ct&&ie){t:for(var $t=at.target,Ie=Ct.view;$t!=Bt;$t=$t.parentNode)for(var he=0;he<Ie.length;he++)if(Ie[he].node==$t){it.display.currentWheelTarget=$t;break t}}if(ht&&!Ft&&!Vt&&Fa!=null){gt&&Kt&&su(it,Math.max(0,Bt.scrollTop+gt*Fa)),lu(it,Math.max(0,Bt.scrollLeft+ht*Fa)),(!gt||gt&&Kt)&&Kn(at),Ct.wheelStartX=null;return}if(gt&&Fa!=null){var cn=gt*Fa,nn=it.doc.scrollTop,fi=nn+Ct.wrapper.clientHeight;cn<0?nn=Math.max(0,nn+cn-50):fi=Math.min(it.doc.height,fi+cn+50),sh(it,{top:nn,bottom:fi})}$s<20&&(Ct.wheelStartX==null?(Ct.wheelStartX=Bt.scrollLeft,Ct.wheelStartY=Bt.scrollTop,Ct.wheelDX=ht,Ct.wheelDY=gt,setTimeout(function(){if(Ct.wheelStartX!=null){var wi=Bt.scrollLeft-Ct.wheelStartX,Ti=Bt.scrollTop-Ct.wheelStartY,tr=Ti&&Ct.wheelDY&&Ti/Ct.wheelDY||wi&&Ct.wheelDX&&wi/Ct.wheelDX;Ct.wheelStartX=Ct.wheelStartY=null,tr&&(Fa=(Fa*$s+tr)/($s+1),++$s)}},200)):(Ct.wheelDX+=ht,Ct.wheelDY+=gt))}}var Fl=function(it,at){this.ranges=it,this.primIndex=at};Fl.prototype.primary=function(){return this.ranges[this.primIndex]},Fl.prototype.equals=function(it){if(it==this)return!0;if(it.primIndex!=this.primIndex||it.ranges.length!=this.ranges.length)return!1;for(var at=0;at<this.ranges.length;at++){var dt=this.ranges[at],ht=it.ranges[at];if(!Sn(dt.anchor,ht.anchor)||!Sn(dt.head,ht.head))return!1}return!0},Fl.prototype.deepCopy=function(){for(var it=[],at=0;at<this.ranges.length;at++)it[at]=new Ho(Fn(this.ranges[at].anchor),Fn(this.ranges[at].head));return new Fl(it,this.primIndex)},Fl.prototype.somethingSelected=function(){for(var it=0;it<this.ranges.length;it++)if(!this.ranges[it].empty())return!0;return!1},Fl.prototype.contains=function(it,at){at||(at=it);for(var dt=0;dt<this.ranges.length;dt++){var ht=this.ranges[dt];if(kn(at,ht.from())>=0&&kn(it,ht.to())<=0)return dt}return-1};var Ho=function(it,at){this.anchor=it,this.head=at};Ho.prototype.from=function(){return On(this.anchor,this.head)},Ho.prototype.to=function(){return ei(this.anchor,this.head)},Ho.prototype.empty=function(){return this.head.line==this.anchor.line&&this.head.ch==this.anchor.ch};function Yl(it,at,dt){var ht=it&&it.options.selectionsMayTouch,gt=at[dt];at.sort(function(cn,nn){return kn(cn.from(),nn.from())}),dt=Fe(at,gt);for(var Ct=1;Ct<at.length;Ct++){var Bt=at[Ct],Wt=at[Ct-1],Kt=kn(Wt.to(),Bt.from());if(ht&&!Bt.empty()?Kt>0:Kt>=0){var $t=On(Wt.from(),Bt.from()),Ie=ei(Wt.to(),Bt.to()),he=Wt.empty()?Bt.from()==Bt.head:Wt.from()==Wt.head;Ct<=dt&&--dt,at.splice(--Ct,2,new Ho(he?Ie:$t,he?$t:Ie))}}return new Fl(at,dt)}function Ku(it,at){return new Fl([new Ho(it,at||it)],0)}function dh(it){return it.text?De(it.from.line+it.text.length-1,re(it.text).length+(it.text.length==1?it.from.ch:0)):it.to}function Wh(it,at){if(kn(it,at.from)<0)return it;if(kn(it,at.to)<=0)return dh(at);var dt=it.line+at.text.length-(at.to.line-at.from.line)-1,ht=it.ch;return it.line==at.to.line&&(ht+=dh(at).ch-at.to.ch),De(dt,ht)}function lc(it,at){for(var dt=[],ht=0;ht<it.sel.ranges.length;ht++){var gt=it.sel.ranges[ht];dt.push(new Ho(Wh(gt.anchor,at),Wh(gt.head,at)))}return Yl(it.cm,dt,it.sel.primIndex)}function Md(it,at,dt){return it.line==at.line?De(dt.line,it.ch-at.ch+dt.ch):De(dt.line+(it.line-at.line),it.ch)}function uc(it,at,dt){for(var ht=[],gt=De(it.first,0),Ct=gt,Bt=0;Bt<at.length;Bt++){var Wt=at[Bt],Kt=Md(Wt.from,gt,Ct),$t=Md(dh(Wt),gt,Ct);if(gt=Wt.to,Ct=$t,dt=="around"){var Ie=it.sel.ranges[Bt],he=kn(Ie.head,Ie.anchor)<0;ht[Bt]=new Ho(he?$t:Kt,he?Kt:$t)}else ht[Bt]=new Ho(Kt,Kt)}return new Fl(ht,it.sel.primIndex)}function ho(it){it.doc.mode=me(it.options,it.doc.modeOption),hc(it)}function hc(it){it.doc.iter(function(at){at.stateAfter&&(at.stateAfter=null),at.styles&&(at.styles=null)}),it.doc.modeFrontier=it.doc.highlightFrontier=it.doc.first,bd(it,100),it.state.modeGen++,it.curOp&&zo(it)}function lg(it,at){return at.from.ch==0&&at.to.ch==0&&re(at.text)==""&&(!it.cm||it.cm.options.wholeLineUpdateBefore)}function tf(it,at,dt,ht){function gt(Er){return dt?dt[Er]:null}function Ct(Er,gr,Dr){sr(Er,gr,Dr,ht),Ji(Er,"change",Er,at)}function Bt(Er,gr){for(var Dr=[],Xr=Er;Xr<gr;++Xr)Dr.push(new ur($t[Xr],gt(Xr),ht));return Dr}var Wt=at.from,Kt=at.to,$t=at.text,Ie=jn(it,Wt.line),he=jn(it,Kt.line),cn=re($t),nn=gt($t.length-1),fi=Kt.line-Wt.line;if(at.full)it.insert(0,Bt(0,$t.length)),it.remove($t.length,it.size-$t.length);else if(lg(it,at)){var wi=Bt(0,$t.length-1);Ct(he,he.text,nn),fi&&it.remove(Wt.line,fi),wi.length&&it.insert(Wt.line,wi)}else if(Ie==he)if($t.length==1)Ct(Ie,Ie.text.slice(0,Wt.ch)+cn+Ie.text.slice(Kt.ch),nn);else{var Ti=Bt(1,$t.length-1);Ti.push(new ur(cn+Ie.text.slice(Kt.ch),nn,ht)),Ct(Ie,Ie.text.slice(0,Wt.ch)+$t[0],gt(0)),it.insert(Wt.line+1,Ti)}else if($t.length==1)Ct(Ie,Ie.text.slice(0,Wt.ch)+$t[0]+he.text.slice(Kt.ch),gt(0)),it.remove(Wt.line+1,fi);else{Ct(Ie,Ie.text.slice(0,Wt.ch)+$t[0],gt(0)),Ct(he,cn+he.text.slice(Kt.ch),nn);var tr=Bt(1,$t.length-1);fi>1&&it.remove(Wt.line+1,fi-1),it.insert(Wt.line+1,tr)}Ji(it,"change",it,at)}function du(it,at,dt){function ht(gt,Ct,Bt){if(gt.linked)for(var Wt=0;Wt<gt.linked.length;++Wt){var Kt=gt.linked[Wt];if(Kt.doc!=Ct){var $t=Bt&&Kt.sharedHist;dt&&!$t||(at(Kt.doc,$t),ht(Kt.doc,gt,$t))}}}ht(it,null,!0)}function ef(it,at){if(at.cm)throw new Error("This document is already in use.");it.doc=at,at.cm=it,Or(it),ho(it),dc(it),it.options.lineWrapping||Oi(it),it.options.mode=at.modeOption,zo(it)}function dc(it){(it.doc.direction=="rtl"?en:Ht)(it.display.lineDiv,"CodeMirror-rtl")}function $0(it){Ao(it,function(){dc(it),zo(it)})}function Fd(it){this.done=[],this.undone=[],this.undoDepth=1/0,this.lastModTime=this.lastSelTime=0,this.lastOp=this.lastSelOp=null,this.lastOrigin=this.lastSelOrigin=null,this.generation=this.maxGeneration=it||1}function nf(it,at){var dt={from:Fn(at.from),to:dh(at),text:ii(it,at.from,at.to)};return ch(it,dt,at.from.line,at.to.line+1),du(it,function(ht){return ch(ht,dt,at.from.line,at.to.line+1)},!0),dt}function Ad(it){for(;it.length;){var at=re(it);if(at.ranges)it.pop();else break}}function cc(it,at){if(at)return Ad(it.done),re(it.done);if(it.done.length&&!re(it.done).ranges)return re(it.done);if(it.done.length>1&&!it.done[it.done.length-2].ranges)return it.done.pop(),re(it.done)}function fc(it,at,dt,ht){var gt=it.history;gt.undone.length=0;var Ct=+new Date,Bt,Wt;if((gt.lastOp==ht||gt.lastOrigin==at.origin&&at.origin&&(at.origin.charAt(0)=="+"&>.lastModTime>Ct-(it.cm?it.cm.options.historyEventDelay:500)||at.origin.charAt(0)=="*"))&&(Bt=cc(gt,gt.lastOp==ht)))Wt=re(Bt.changes),kn(at.from,at.to)==0&&kn(at.from,Wt.to)==0?Wt.to=dh(at):Bt.changes.push(nf(it,at));else{var Kt=re(gt.done);for((!Kt||!Kt.ranges)&&Nd(it.sel,gt.done),Bt={changes:[nf(it,at)],generation:gt.generation},gt.done.push(Bt);gt.done.length>gt.undoDepth;)gt.done.shift(),gt.done[0].ranges||gt.done.shift()}gt.done.push(dt),gt.generation=++gt.maxGeneration,gt.lastModTime=gt.lastSelTime=Ct,gt.lastOp=gt.lastSelOp=ht,gt.lastOrigin=gt.lastSelOrigin=at.origin,Wt||Ne(it,"historyAdded")}function ug(it,at,dt,ht){var gt=at.charAt(0);return gt=="*"||gt=="+"&&dt.ranges.length==ht.ranges.length&&dt.somethingSelected()==ht.somethingSelected()&&new Date-it.history.lastSelTime<=(it.cm?it.cm.options.historyEventDelay:500)}function gc(it,at,dt,ht){var gt=it.history,Ct=ht&&ht.origin;dt==gt.lastSelOp||Ct&>.lastSelOrigin==Ct&&(gt.lastModTime==gt.lastSelTime&>.lastOrigin==Ct||ug(it,Ct,re(gt.done),at))?gt.done[gt.done.length-1]=at:Nd(at,gt.done),gt.lastSelTime=+new Date,gt.lastSelOrigin=Ct,gt.lastSelOp=dt,ht&&ht.clearRedo!==!1&&Ad(gt.undone)}function Nd(it,at){var dt=re(at);dt&&dt.ranges&&dt.equals(it)||at.push(it)}function ch(it,at,dt,ht){var gt=at["spans_"+it.id],Ct=0;it.iter(Math.max(it.first,dt),Math.min(it.first+it.size,ht),function(Bt){Bt.markedSpans&&((gt||(gt=at["spans_"+it.id]={}))[Ct]=Bt.markedSpans),++Ct})}function Bs(it){if(!it)return null;for(var at,dt=0;dt<it.length;++dt)it[dt].marker.explicitlyCleared?at||(at=it.slice(0,dt)):at&&at.push(it[dt]);return at?at.length?at:null:it}function Cu(it,at){var dt=at["spans_"+it.id];if(!dt)return null;for(var ht=[],gt=0;gt<at.text.length;++gt)ht.push(Bs(dt[gt]));return ht}function rf(it,at){var dt=Cu(it,at),ht=Kr(it,at);if(!dt)return ht;if(!ht)return dt;for(var gt=0;gt<dt.length;++gt){var Ct=dt[gt],Bt=ht[gt];if(Ct&&Bt)t:for(var Wt=0;Wt<Bt.length;++Wt){for(var Kt=Bt[Wt],$t=0;$t<Ct.length;++$t)if(Ct[$t].marker==Kt.marker)continue t;Ct.push(Kt)}else Bt&&(dt[gt]=Bt)}return dt}function Zu(it,at,dt){for(var ht=[],gt=0;gt<it.length;++gt){var Ct=it[gt];if(Ct.ranges){ht.push(dt?Fl.prototype.deepCopy.call(Ct):Ct);continue}var Bt=Ct.changes,Wt=[];ht.push({changes:Wt});for(var Kt=0;Kt<Bt.length;++Kt){var $t=Bt[Kt],Ie=void 0;if(Wt.push({from:$t.from,to:$t.to,text:$t.text}),at)for(var he in $t)(Ie=he.match(/^spans_(\d+)$/))&&Fe(at,Number(Ie[1]))>-1&&(re(Wt)[he]=$t[he],delete $t[he])}}return ht}function of(it,at,dt,ht){if(ht){var gt=it.anchor;if(dt){var Ct=kn(at,gt)<0;Ct!=kn(dt,gt)<0?(gt=at,at=dt):Ct!=kn(at,dt)<0&&(at=dt)}return new Ho(gt,at)}else return new Ho(dt||at,at)}function af(it,at,dt,ht,gt){gt==null&&(gt=it.cm&&(it.cm.display.shift||it.extend)),Cs(it,new Fl([of(it.sel.primary(),at,dt,gt)],0),ht)}function Gp(it,at,dt){for(var ht=[],gt=it.cm&&(it.cm.display.shift||it.extend),Ct=0;Ct<it.sel.ranges.length;Ct++)ht[Ct]=of(it.sel.ranges[Ct],at[Ct],null,gt);var Bt=Yl(it.cm,ht,it.sel.primIndex);Cs(it,Bt,dt)}function fh(it,at,dt,ht){var gt=it.sel.ranges.slice(0);gt[at]=dt,Cs(it,Yl(it.cm,gt,it.sel.primIndex),ht)}function Vh(it,at,dt,ht){Cs(it,Ku(at,dt),ht)}function Hp(it,at,dt){var ht={ranges:at.ranges,update:function(gt){this.ranges=[];for(var Ct=0;Ct<gt.length;Ct++)this.ranges[Ct]=new Ho(Yn(it,gt[Ct].anchor),Yn(it,gt[Ct].head))},origin:dt&&dt.origin};return Ne(it,"beforeSelectionChange",it,ht),it.cm&&Ne(it.cm,"beforeSelectionChange",it.cm,ht),ht.ranges!=at.ranges?Yl(it.cm,ht.ranges,ht.ranges.length-1):at}function sf(it,at,dt){var ht=it.history.done,gt=re(ht);gt&>.ranges?(ht[ht.length-1]=at,Uh(it,at,dt)):Cs(it,at,dt)}function Cs(it,at,dt){Uh(it,at,dt),gc(it,it.sel,it.cm?it.cm.curOp.id:NaN,dt)}function Uh(it,at,dt){(le(it,"beforeSelectionChange")||it.cm&&le(it.cm,"beforeSelectionChange"))&&(at=Hp(it,at,dt));var ht=dt&&dt.bias||(kn(at.primary().head,it.sel.primary().head)<0?-1:1);hg(it,mc(it,at,ht,!0)),!(dt&&dt.scroll===!1)&&it.cm&&Vl(it.cm)}function hg(it,at){at.equals(it.sel)||(it.sel=at,it.cm&&(it.cm.curOp.updateInput=1,it.cm.curOp.selectionChanged=!0,Bn(it.cm)),Ji(it,"cursorActivity",it))}function pc(it){hg(it,mc(it,it.sel,null,!1))}function mc(it,at,dt,ht){for(var gt,Ct=0;Ct<at.ranges.length;Ct++){var Bt=at.ranges[Ct],Wt=at.ranges.length==it.sel.ranges.length&&it.sel.ranges[Ct],Kt=vc(it,Bt.anchor,Wt&&Wt.anchor,dt,ht),$t=vc(it,Bt.head,Wt&&Wt.head,dt,ht);(gt||Kt!=Bt.anchor||$t!=Bt.head)&&(gt||(gt=at.ranges.slice(0,Ct)),gt[Ct]=new Ho(Kt,$t))}return gt?Yl(it.cm,gt,at.primIndex):at}function Wu(it,at,dt,ht,gt){var Ct=jn(it,at.line);if(Ct.markedSpans)for(var Bt=0;Bt<Ct.markedSpans.length;++Bt){var Wt=Ct.markedSpans[Bt],Kt=Wt.marker,$t="selectLeft"in Kt?!Kt.selectLeft:Kt.inclusiveLeft,Ie="selectRight"in Kt?!Kt.selectRight:Kt.inclusiveRight;if((Wt.from==null||($t?Wt.from<=at.ch:Wt.from<at.ch))&&(Wt.to==null||(Ie?Wt.to>=at.ch:Wt.to>at.ch))){if(gt&&(Ne(Kt,"beforeCursorEnter"),Kt.explicitlyCleared))if(Ct.markedSpans){--Bt;continue}else break;if(!Kt.atomic)continue;if(dt){var he=Kt.find(ht<0?1:-1),cn=void 0;if((ht<0?Ie:$t)&&(he=dg(it,he,-ht,he&&he.line==at.line?Ct:null)),he&&he.line==at.line&&(cn=kn(he,dt))&&(ht<0?cn<0:cn>0))return Wu(it,he,at,ht,gt)}var nn=Kt.find(ht<0?-1:1);return(ht<0?$t:Ie)&&(nn=dg(it,nn,ht,nn.line==at.line?Ct:null)),nn?Wu(it,nn,at,ht,gt):null}}return at}function vc(it,at,dt,ht,gt){var Ct=ht||1,Bt=Wu(it,at,dt,Ct,gt)||!gt&&Wu(it,at,dt,Ct,!0)||Wu(it,at,dt,-Ct,gt)||!gt&&Wu(it,at,dt,-Ct,!0);return Bt||(it.cantEdit=!0,De(it.first,0))}function dg(it,at,dt,ht){return dt<0&&at.ch==0?at.line>it.first?Yn(it,De(at.line-1)):null:dt>0&&at.ch==(ht||jn(it,at.line)).text.length?at.line<it.first+it.size-1?De(at.line+1,0):null:new De(at.line,at.ch+dt)}function Aa(it){it.setSelection(De(it.firstLine(),0),De(it.lastLine()),ke)}function yc(it,at,dt){var ht={canceled:!1,from:at.from,to:at.to,text:at.text,origin:at.origin,cancel:function(){return ht.canceled=!0}};return dt&&(ht.update=function(gt,Ct,Bt,Wt){gt&&(ht.from=Yn(it,gt)),Ct&&(ht.to=Yn(it,Ct)),Bt&&(ht.text=Bt),Wt!==void 0&&(ht.origin=Wt)}),Ne(it,"beforeChange",it,ht),it.cm&&Ne(it.cm,"beforeChange",it.cm,ht),ht.canceled?(it.cm&&(it.cm.curOp.updateInput=2),null):{from:ht.from,to:ht.to,text:ht.text,origin:ht.origin}}function gh(it,at,dt){if(it.cm){if(!it.cm.curOp)return Wa(it.cm,gh)(it,at,dt);if(it.cm.state.suppressEdits)return}if(!((le(it,"beforeChange")||it.cm&&le(it.cm,"beforeChange"))&&(at=yc(it,at,!0),!at))){var ht=hr&&!dt&&gn(it,at.from,at.to);if(ht)for(var gt=ht.length-1;gt>=0;--gt)Yh(it,{from:ht[gt].from,to:ht[gt].to,text:gt?[""]:at.text,origin:at.origin});else Yh(it,at)}}function Yh(it,at){if(!(at.text.length==1&&at.text[0]==""&&kn(at.from,at.to)==0)){var dt=lc(it,at);fc(it,at,dt,it.cm?it.cm.curOp.id:NaN),Dd(it,at,dt,Kr(it,at));var ht=[];du(it,function(gt,Ct){!Ct&&Fe(ht,gt.history)==-1&&(fg(gt.history,at),ht.push(gt.history)),Dd(gt,at,null,Kr(gt,at))})}}function Sc(it,at,dt){var ht=it.cm&&it.cm.state.suppressEdits;if(!(ht&&!dt)){for(var gt=it.history,Ct,Bt=it.sel,Wt=at=="undo"?gt.done:gt.undone,Kt=at=="undo"?gt.undone:gt.done,$t=0;$t<Wt.length&&(Ct=Wt[$t],!(dt?Ct.ranges&&!Ct.equals(it.sel):!Ct.ranges));$t++);if($t!=Wt.length){for(gt.lastOrigin=gt.lastSelOrigin=null;;)if(Ct=Wt.pop(),Ct.ranges){if(Nd(Ct,Kt),dt&&!Ct.equals(it.sel)){Cs(it,Ct,{clearRedo:!1});return}Bt=Ct}else if(ht){Wt.push(Ct);return}else break;var Ie=[];Nd(Bt,Kt),Kt.push({changes:Ie,generation:gt.generation}),gt.generation=Ct.generation||++gt.maxGeneration;for(var he=le(it,"beforeChange")||it.cm&&le(it.cm,"beforeChange"),cn=function(wi){var Ti=Ct.changes[wi];if(Ti.origin=at,he&&!yc(it,Ti,!1))return Wt.length=0,{};Ie.push(nf(it,Ti));var tr=wi?lc(it,Ti):re(Wt);Dd(it,Ti,tr,rf(it,Ti)),!wi&&it.cm&&it.cm.scrollIntoView({from:Ti.from,to:dh(Ti)});var Er=[];du(it,function(gr,Dr){!Dr&&Fe(Er,gr.history)==-1&&(fg(gr.history,Ti),Er.push(gr.history)),Dd(gr,Ti,null,rf(gr,Ti))})},nn=Ct.changes.length-1;nn>=0;--nn){var fi=cn(nn);if(fi)return fi.v}}}}function cg(it,at){if(at!=0&&(it.first+=at,it.sel=new Fl(hn(it.sel.ranges,function(gt){return new Ho(De(gt.anchor.line+at,gt.anchor.ch),De(gt.head.line+at,gt.head.ch))}),it.sel.primIndex),it.cm)){zo(it.cm,it.first,it.first-at,at);for(var dt=it.cm.display,ht=dt.viewFrom;ht<dt.viewTo;ht++)ri(it.cm,ht,"gutter")}}function Dd(it,at,dt,ht){if(it.cm&&!it.cm.curOp)return Wa(it.cm,Dd)(it,at,dt,ht);if(at.to.line<it.first){cg(it,at.text.length-1-(at.to.line-at.from.line));return}if(!(at.from.line>it.lastLine())){if(at.from.line<it.first){var gt=at.text.length-1-(it.first-at.from.line);cg(it,gt),at={from:De(it.first,0),to:De(at.to.line+gt,at.to.ch),text:[re(at.text)],origin:at.origin}}var Ct=it.lastLine();at.to.line>Ct&&(at={from:at.from,to:De(Ct,jn(it,Ct).text.length),text:[at.text[0]],origin:at.origin}),at.removed=ii(it,at.from,at.to),dt||(dt=lc(it,at)),it.cm?Kp(it.cm,at,ht):tf(it,at,ht),Uh(it,dt,ke),it.cantEdit&&vc(it,De(it.firstLine(),0))&&(it.cantEdit=!1)}}function Kp(it,at,dt){var ht=it.doc,gt=it.display,Ct=at.from,Bt=at.to,Wt=!1,Kt=Ct.line;it.options.lineWrapping||(Kt=Gt(Ln(jn(ht,Ct.line))),ht.iter(Kt,Bt.line+1,function(nn){if(nn==gt.maxLine)return Wt=!0,!0})),ht.sel.contains(at.from,at.to)>-1&&Bn(it),tf(ht,at,dt,jo(it)),it.options.lineWrapping||(ht.iter(Kt,Ct.line+at.text.length,function(nn){var fi=ar(nn);fi>gt.maxLineLength&&(gt.maxLine=nn,gt.maxLineLength=fi,gt.maxLineChanged=!0,Wt=!1)}),Wt&&(it.curOp.updateMaxLine=!0)),or(ht,Ct.line),bd(it,400);var $t=at.text.length-(Bt.line-Ct.line)-1;at.full?zo(it):Ct.line==Bt.line&&at.text.length==1&&!lg(it.doc,at)?ri(it,Ct.line,"text"):zo(it,Ct.line,Bt.line+1,$t);var Ie=le(it,"changes"),he=le(it,"change");if(he||Ie){var cn={from:Ct,to:Bt,text:at.text,removed:at.removed,origin:at.origin};he&&Ji(it,"change",it,cn),Ie&&(it.curOp.changeObjs||(it.curOp.changeObjs=[])).push(cn)}it.display.selForContextMenu=null}function Xh(it,at,dt,ht,gt){var Ct;ht||(ht=dt),kn(ht,dt)<0&&(Ct=[ht,dt],dt=Ct[0],ht=Ct[1]),typeof at=="string"&&(at=it.splitLines(at)),gh(it,{from:dt,to:ht,text:at,origin:gt})}function Al(it,at,dt,ht){dt<it.line?it.line+=ht:at<it.line&&(it.line=at,it.ch=0)}function Zp(it,at,dt,ht){for(var gt=0;gt<it.length;++gt){var Ct=it[gt],Bt=!0;if(Ct.ranges){Ct.copied||(Ct=it[gt]=Ct.deepCopy(),Ct.copied=!0);for(var Wt=0;Wt<Ct.ranges.length;Wt++)Al(Ct.ranges[Wt].anchor,at,dt,ht),Al(Ct.ranges[Wt].head,at,dt,ht);continue}for(var Kt=0;Kt<Ct.changes.length;++Kt){var $t=Ct.changes[Kt];if(dt<$t.from.line)$t.from=De($t.from.line+ht,$t.from.ch),$t.to=De($t.to.line+ht,$t.to.ch);else if(at<=$t.to.line){Bt=!1;break}}Bt||(it.splice(0,gt+1),gt=0)}}function fg(it,at){var dt=at.from.line,ht=at.to.line,gt=at.text.length-(ht-dt)-1;Zp(it.done,dt,ht,gt),Zp(it.undone,dt,ht,gt)}function Jh(it,at,dt,ht){var gt=at,Ct=at;return typeof at=="number"?Ct=jn(it,Qn(it,at)):gt=Gt(at),gt==null?null:(ht(Ct,gt)&&it.cm&&ri(it.cm,gt,dt),Ct)}function Bd(it){this.lines=it,this.parent=null;for(var at=0,dt=0;dt<it.length;++dt)it[dt].parent=this,at+=it[dt].height;this.height=at}Bd.prototype={chunkSize:function(){return this.lines.length},removeInner:function(it,at){for(var dt=it,ht=it+at;dt<ht;++dt){var gt=this.lines[dt];this.height-=gt.height,yr(gt),Ji(gt,"delete")}this.lines.splice(it,at)},collapse:function(it){it.push.apply(it,this.lines)},insertInner:function(it,at,dt){this.height+=dt,this.lines=this.lines.slice(0,it).concat(at).concat(this.lines.slice(it));for(var ht=0;ht<at.length;++ht)at[ht].parent=this},iterN:function(it,at,dt){for(var ht=it+at;it<ht;++it)if(dt(this.lines[it]))return!0}};function ga(it){this.children=it;for(var at=0,dt=0,ht=0;ht<it.length;++ht){var gt=it[ht];at+=gt.chunkSize(),dt+=gt.height,gt.parent=this}this.size=at,this.height=dt,this.parent=null}ga.prototype={chunkSize:function(){return this.size},removeInner:function(it,at){this.size-=at;for(var dt=0;dt<this.children.length;++dt){var ht=this.children[dt],gt=ht.chunkSize();if(it<gt){var Ct=Math.min(at,gt-it),Bt=ht.height;if(ht.removeInner(it,Ct),this.height-=Bt-ht.height,gt==Ct&&(this.children.splice(dt--,1),ht.parent=null),(at-=Ct)==0)break;it=0}else it-=gt}if(this.size-at<25&&(this.children.length>1||!(this.children[0]instanceof Bd))){var Wt=[];this.collapse(Wt),this.children=[new Bd(Wt)],this.children[0].parent=this}},collapse:function(it){for(var at=0;at<this.children.length;++at)this.children[at].collapse(it)},insertInner:function(it,at,dt){this.size+=at.length,this.height+=dt;for(var ht=0;ht<this.children.length;++ht){var gt=this.children[ht],Ct=gt.chunkSize();if(it<=Ct){if(gt.insertInner(it,at,dt),gt.lines&>.lines.length>50){for(var Bt=gt.lines.length%25+25,Wt=Bt;Wt<gt.lines.length;){var Kt=new Bd(gt.lines.slice(Wt,Wt+=25));gt.height-=Kt.height,this.children.splice(++ht,0,Kt),Kt.parent=this}gt.lines=gt.lines.slice(0,Bt),this.maybeSpill()}break}it-=Ct}},maybeSpill:function(){if(!(this.children.length<=10)){var it=this;do{var at=it.children.splice(it.children.length-5,5),dt=new ga(at);if(it.parent){it.size-=dt.size,it.height-=dt.height;var gt=Fe(it.parent.children,it);it.parent.children.splice(gt+1,0,dt)}else{var ht=new ga(it.children);ht.parent=it,it.children=[ht,dt],it=ht}dt.parent=it.parent}while(it.children.length>10);it.parent.maybeSpill()}},iterN:function(it,at,dt){for(var ht=0;ht<this.children.length;++ht){var gt=this.children[ht],Ct=gt.chunkSize();if(it<Ct){var Bt=Math.min(at,Ct-it);if(gt.iterN(it,Bt,dt))return!0;if((at-=Bt)==0)break;it=0}else it-=Ct}}};var Vu=function(it,at,dt){if(dt)for(var ht in dt)dt.hasOwnProperty(ht)&&(this[ht]=dt[ht]);this.doc=it,this.node=at};Vu.prototype.clear=function(){var it=this.doc.cm,at=this.line.widgets,dt=this.line,ht=Gt(dt);if(!(ht==null||!at)){for(var gt=0;gt<at.length;++gt)at[gt]==this&&at.splice(gt--,1);at.length||(dt.widgets=null);var Ct=Ro(this);Ri(dt,Math.max(0,dt.height-Ct)),it&&(Ao(it,function(){Wp(it,dt,-Ct),ri(it,ht,"widget")}),Ji(it,"lineWidgetCleared",it,this,ht))}},Vu.prototype.changed=function(){var it=this,at=this.height,dt=this.doc.cm,ht=this.line;this.height=null;var gt=Ro(this)-at;gt&&(Ke(this.doc,ht)||Ri(ht,ht.height+gt),dt&&Ao(dt,function(){dt.curOp.forceUpdate=!0,Wp(dt,ht,gt),Ji(dt,"lineWidgetChanged",dt,it,Gt(ht))}))},An(Vu);function Wp(it,at,dt){Ci(at)<(it.curOp&&it.curOp.scrollTop||it.doc.scrollTop)&&Gh(it,dt)}function lf(it,at,dt,ht){var gt=new Vu(it,dt,ht),Ct=it.cm;return Ct&>.noHScroll&&(Ct.display.alignWidgets=!0),Jh(it,at,"widget",function(Bt){var Wt=Bt.widgets||(Bt.widgets=[]);if(gt.insertAt==null?Wt.push(gt):Wt.splice(Math.min(Wt.length-1,Math.max(0,gt.insertAt)),0,gt),gt.line=Bt,Ct&&!Ke(it,Bt)){var Kt=Ci(Bt)<it.scrollTop;Ri(Bt,Bt.height+Ro(gt)),Kt&&Gh(Ct,gt.height),Ct.curOp.forceUpdate=!0}return!0}),Ct&&Ji(Ct,"lineWidgetAdded",Ct,gt,typeof at=="number"?at:Gt(at)),gt}var Vp=0,Le=function(it,at){this.lines=[],this.type=at,this.doc=it,this.id=++Vp};Le.prototype.clear=function(){if(!this.explicitlyCleared){var it=this.doc.cm,at=it&&!it.curOp;if(at&&fl(it),le(this,"clear")){var dt=this.find();dt&&Ji(this,"clear",dt.from,dt.to)}for(var ht=null,gt=null,Ct=0;Ct<this.lines.length;++Ct){var Bt=this.lines[Ct],Wt=ir(Bt.markedSpans,this);it&&!this.collapsed?ri(it,Gt(Bt),"text"):it&&(Wt.to!=null&&(gt=Gt(Bt)),Wt.from!=null&&(ht=Gt(Bt))),Bt.markedSpans=fr(Bt.markedSpans,Wt),Wt.from==null&&this.collapsed&&!Ke(this.doc,Bt)&&it&&Ri(Bt,Ea(it.display))}if(it&&this.collapsed&&!it.options.lineWrapping)for(var Kt=0;Kt<this.lines.length;++Kt){var $t=Ln(this.lines[Kt]),Ie=ar($t);Ie>it.display.maxLineLength&&(it.display.maxLine=$t,it.display.maxLineLength=Ie,it.display.maxLineChanged=!0)}ht!=null&&it&&this.collapsed&&zo(it,ht,gt+1),this.lines.length=0,this.explicitlyCleared=!0,this.atomic&&this.doc.cantEdit&&(this.doc.cantEdit=!1,it&&pc(it.doc)),it&&Ji(it,"markerCleared",it,this,ht,gt),at&&Ul(it),this.parent&&this.parent.clear()}},Le.prototype.find=function(it,at){it==null&&this.type=="bookmark"&&(it=1);for(var dt,ht,gt=0;gt<this.lines.length;++gt){var Ct=this.lines[gt],Bt=ir(Ct.markedSpans,this);if(Bt.from!=null&&(dt=De(at?Ct:Gt(Ct),Bt.from),it==-1))return dt;if(Bt.to!=null&&(ht=De(at?Ct:Gt(Ct),Bt.to),it==1))return ht}return dt&&{from:dt,to:ht}},Le.prototype.changed=function(){var it=this,at=this.find(-1,!0),dt=this,ht=this.doc.cm;!at||!ht||Ao(ht,function(){var gt=at.line,Ct=Gt(at.line),Bt=As(ht,Ct);if(Bt&&(au(Bt),ht.curOp.selectionChanged=ht.curOp.forceUpdate=!0),ht.curOp.updateMaxLine=!0,!Ke(dt.doc,gt)&&dt.height!=null){var Wt=dt.height;dt.height=null;var Kt=Ro(dt)-Wt;Kt&&Ri(gt,gt.height+Kt)}Ji(ht,"markerChanged",ht,it)})},Le.prototype.attachLine=function(it){if(!this.lines.length&&this.doc.cm){var at=this.doc.cm.curOp;(!at.maybeHiddenMarkers||Fe(at.maybeHiddenMarkers,this)==-1)&&(at.maybeUnhiddenMarkers||(at.maybeUnhiddenMarkers=[])).push(this)}this.lines.push(it)},Le.prototype.detachLine=function(it){if(this.lines.splice(Fe(this.lines,it),1),!this.lines.length&&this.doc.cm){var at=this.doc.cm.curOp;(at.maybeHiddenMarkers||(at.maybeHiddenMarkers=[])).push(this)}},An(Le);function _h(it,at,dt,ht,gt){if(ht&&ht.shared)return Up(it,at,dt,ht,gt);if(it.cm&&!it.cm.curOp)return Wa(it.cm,_h)(it,at,dt,ht,gt);var Ct=new Le(it,gt),Bt=kn(at,dt);if(ht&&vn(ht,Ct,!1),Bt>0||Bt==0&&Ct.clearWhenEmpty!==!1)return Ct;if(Ct.replacedWith&&(Ct.collapsed=!0,Ct.widgetNode=ve("span",[Ct.replacedWith],"CodeMirror-widget"),ht.handleMouseEvents||Ct.widgetNode.setAttribute("cm-ignore-events","true"),ht.insertLeft&&(Ct.widgetNode.insertLeft=!0)),Ct.collapsed){if(Gn(it,at.line,at,dt,Ct)||at.line!=dt.line&&Gn(it,dt.line,at,dt,Ct))throw new Error("Inserting collapsed marker partially overlapping an existing one");qe()}Ct.addToHistory&&fc(it,{from:at,to:dt,origin:"markText"},it.sel,NaN);var Wt=at.line,Kt=it.cm,$t;if(it.iter(Wt,dt.line+1,function(he){Kt&&Ct.collapsed&&!Kt.options.lineWrapping&&Ln(he)==Kt.display.maxLine&&($t=!0),Ct.collapsed&&Wt!=at.line&&Ri(he,0),Br(he,new xi(Ct,Wt==at.line?at.ch:null,Wt==dt.line?dt.ch:null)),++Wt}),Ct.collapsed&&it.iter(at.line,dt.line+1,function(he){Ke(it,he)&&Ri(he,0)}),Ct.clearOnEnter&&He(Ct,"beforeCursorEnter",function(){return Ct.clear()}),Ct.readOnly&&(nr(),(it.history.done.length||it.history.undone.length)&&it.clearHistory()),Ct.collapsed&&(Ct.id=++Vp,Ct.atomic=!0),Kt){if($t&&(Kt.curOp.updateMaxLine=!0),Ct.collapsed)zo(Kt,at.line,dt.line+1);else if(Ct.className||Ct.startStyle||Ct.endStyle||Ct.css||Ct.attributes||Ct.title)for(var Ie=at.line;Ie<=dt.line;Ie++)ri(Kt,Ie,"text");Ct.atomic&&pc(Kt.doc),Ji(Kt,"markerAdded",Kt,Ct)}return Ct}var Eu=function(it,at){this.markers=it,this.primary=at;for(var dt=0;dt<it.length;++dt)it[dt].parent=this};Eu.prototype.clear=function(){if(!this.explicitlyCleared){this.explicitlyCleared=!0;for(var it=0;it<this.markers.length;++it)this.markers[it].clear();Ji(this,"clear")}},Eu.prototype.find=function(it,at){return this.primary.find(it,at)},An(Eu);function Up(it,at,dt,ht,gt){ht=vn(ht),ht.shared=!1;var Ct=[_h(it,at,dt,ht,gt)],Bt=Ct[0],Wt=ht.widgetNode;return du(it,function(Kt){Wt&&(ht.widgetNode=Wt.cloneNode(!0)),Ct.push(_h(Kt,Yn(Kt,at),Yn(Kt,dt),ht,gt));for(var $t=0;$t<Kt.linked.length;++$t)if(Kt.linked[$t].isParent)return;Bt=re(Ct)}),new Eu(Ct,Bt)}function gg(it){return it.findMarks(De(it.first,0),it.clipPos(De(it.lastLine())),function(at){return at.parent})}function Yp(it,at){for(var dt=0;dt<at.length;dt++){var ht=at[dt],gt=ht.find(),Ct=it.clipPos(gt.from),Bt=it.clipPos(gt.to);if(kn(Ct,Bt)){var Wt=_h(it,Ct,Bt,ht.primary,ht.primary.type);ht.markers.push(Wt),Wt.parent=ht}}}function pg(it){for(var at=function(ht){var gt=it[ht],Ct=[gt.primary.doc];du(gt.primary.doc,function(Kt){return Ct.push(Kt)});for(var Bt=0;Bt<gt.markers.length;Bt++){var Wt=gt.markers[Bt];Fe(Ct,Wt.doc)==-1&&(Wt.parent=null,gt.markers.splice(Bt--,1))}},dt=0;dt<it.length;dt++)at(dt)}var tv=0,gs=function(it,at,dt,ht,gt){if(!(this instanceof gs))return new gs(it,at,dt,ht,gt);dt==null&&(dt=0),ga.call(this,[new Bd([new ur("",null)])]),this.first=dt,this.scrollTop=this.scrollLeft=0,this.cantEdit=!1,this.cleanGeneration=1,this.modeFrontier=this.highlightFrontier=dt;var Ct=De(dt,0);this.sel=Ku(Ct),this.history=new Fd(null),this.id=++tv,this.modeOption=at,this.lineSep=ht,this.direction=gt=="rtl"?"rtl":"ltr",this.extend=!1,typeof it=="string"&&(it=this.splitLines(it)),tf(this,{from:Ct,to:Ct,text:it}),Cs(this,Ku(Ct),ke)};gs.prototype=Et(ga.prototype,{constructor:gs,iter:function(it,at,dt){dt?this.iterN(it-this.first,at-it,dt):this.iterN(this.first,this.first+this.size,it)},insert:function(it,at){for(var dt=0,ht=0;ht<at.length;++ht)dt+=at[ht].height;this.insertInner(it-this.first,at,dt)},remove:function(it,at){this.removeInner(it-this.first,at)},getValue:function(it){var at=ki(this,this.first,this.first+this.size);return it===!1?at:at.join(it||this.lineSeparator())},setValue:Qa(function(it){var at=De(this.first,0),dt=this.first+this.size-1;gh(this,{from:at,to:De(dt,jn(this,dt).text.length),text:this.splitLines(it),origin:"setValue",full:!0},!0),this.cm&&Hu(this.cm,0,0),Cs(this,Ku(at),ke)}),replaceRange:function(it,at,dt,ht){at=Yn(this,at),dt=dt?Yn(this,dt):at,Xh(this,it,at,dt,ht)},getRange:function(it,at,dt){var ht=ii(this,Yn(this,it),Yn(this,at));return dt===!1?ht:ht.join(dt||this.lineSeparator())},getLine:function(it){var at=this.getLineHandle(it);return at&&at.text},getLineHandle:function(it){if(Mn(this,it))return jn(this,it)},getLineNumber:function(it){return Gt(it)},getLineHandleVisualStart:function(it){return typeof it=="number"&&(it=jn(this,it)),Ln(it)},lineCount:function(){return this.size},firstLine:function(){return this.first},lastLine:function(){return this.first+this.size-1},clipPos:function(it){return Yn(this,it)},getCursor:function(it){var at=this.sel.primary(),dt;return it==null||it=="head"?dt=at.head:it=="anchor"?dt=at.anchor:it=="end"||it=="to"||it===!1?dt=at.to():dt=at.from(),dt},listSelections:function(){return this.sel.ranges},somethingSelected:function(){return this.sel.somethingSelected()},setCursor:Qa(function(it,at,dt){Vh(this,Yn(this,typeof it=="number"?De(it,at||0):it),null,dt)}),setSelection:Qa(function(it,at,dt){Vh(this,Yn(this,it),Yn(this,at||it),dt)}),extendSelection:Qa(function(it,at,dt){af(this,Yn(this,it),at&&Yn(this,at),dt)}),extendSelections:Qa(function(it,at){Gp(this,Pi(this,it),at)}),extendSelectionsBy:Qa(function(it,at){var dt=hn(this.sel.ranges,it);Gp(this,Pi(this,dt),at)}),setSelections:Qa(function(it,at,dt){if(it.length){for(var ht=[],gt=0;gt<it.length;gt++)ht[gt]=new Ho(Yn(this,it[gt].anchor),Yn(this,it[gt].head));at==null&&(at=Math.min(it.length-1,this.sel.primIndex)),Cs(this,Yl(this.cm,ht,at),dt)}}),addSelection:Qa(function(it,at,dt){var ht=this.sel.ranges.slice(0);ht.push(new Ho(Yn(this,it),Yn(this,at||it))),Cs(this,Yl(this.cm,ht,ht.length-1),dt)}),getSelection:function(it){for(var at=this.sel.ranges,dt,ht=0;ht<at.length;ht++){var gt=ii(this,at[ht].from(),at[ht].to());dt=dt?dt.concat(gt):gt}return it===!1?dt:dt.join(it||this.lineSeparator())},getSelections:function(it){for(var at=[],dt=this.sel.ranges,ht=0;ht<dt.length;ht++){var gt=ii(this,dt[ht].from(),dt[ht].to());it!==!1&&(gt=gt.join(it||this.lineSeparator())),at[ht]=gt}return at},replaceSelection:function(it,at,dt){for(var ht=[],gt=0;gt<this.sel.ranges.length;gt++)ht[gt]=it;this.replaceSelections(ht,at,dt||"+input")},replaceSelections:Qa(function(it,at,dt){for(var ht=[],gt=this.sel,Ct=0;Ct<gt.ranges.length;Ct++){var Bt=gt.ranges[Ct];ht[Ct]={from:Bt.from(),to:Bt.to(),text:this.splitLines(it[Ct]),origin:dt}}for(var Wt=at&&at!="end"&&uc(this,ht,at),Kt=ht.length-1;Kt>=0;Kt--)gh(this,ht[Kt]);Wt?sf(this,Wt):this.cm&&Vl(this.cm)}),undo:Qa(function(){Sc(this,"undo")}),redo:Qa(function(){Sc(this,"redo")}),undoSelection:Qa(function(){Sc(this,"undo",!0)}),redoSelection:Qa(function(){Sc(this,"redo",!0)}),setExtending:function(it){this.extend=it},getExtending:function(){return this.extend},historySize:function(){for(var it=this.history,at=0,dt=0,ht=0;ht<it.done.length;ht++)it.done[ht].ranges||++at;for(var gt=0;gt<it.undone.length;gt++)it.undone[gt].ranges||++dt;return{undo:at,redo:dt}},clearHistory:function(){var it=this;this.history=new Fd(this.history.maxGeneration),du(this,function(at){return at.history=it.history},!0)},markClean:function(){this.cleanGeneration=this.changeGeneration(!0)},changeGeneration:function(it){return it&&(this.history.lastOp=this.history.lastSelOp=this.history.lastOrigin=null),this.history.generation},isClean:function(it){return this.history.generation==(it||this.cleanGeneration)},getHistory:function(){return{done:Zu(this.history.done),undone:Zu(this.history.undone)}},setHistory:function(it){var at=this.history=new Fd(this.history.maxGeneration);at.done=Zu(it.done.slice(0),null,!0),at.undone=Zu(it.undone.slice(0),null,!0)},setGutterMarker:Qa(function(it,at,dt){return Jh(this,it,"gutter",function(ht){var gt=ht.gutterMarkers||(ht.gutterMarkers={});return gt[at]=dt,!dt&&kt(gt)&&(ht.gutterMarkers=null),!0})}),clearGutter:Qa(function(it){var at=this;this.iter(function(dt){dt.gutterMarkers&&dt.gutterMarkers[it]&&Jh(at,dt,"gutter",function(){return dt.gutterMarkers[it]=null,kt(dt.gutterMarkers)&&(dt.gutterMarkers=null),!0})})}),lineInfo:function(it){var at;if(typeof it=="number"){if(!Mn(this,it)||(at=it,it=jn(this,it),!it))return null}else if(at=Gt(it),at==null)return null;return{line:at,handle:it,text:it.text,gutterMarkers:it.gutterMarkers,textClass:it.textClass,bgClass:it.bgClass,wrapClass:it.wrapClass,widgets:it.widgets}},addLineClass:Qa(function(it,at,dt){return Jh(this,it,at=="gutter"?"gutter":"class",function(ht){var gt=at=="text"?"textClass":at=="background"?"bgClass":at=="gutter"?"gutterClass":"wrapClass";if(!ht[gt])ht[gt]=dt;else{if(Ot(dt).test(ht[gt]))return!1;ht[gt]+=" "+dt}return!0})}),removeLineClass:Qa(function(it,at,dt){return Jh(this,it,at=="gutter"?"gutter":"class",function(ht){var gt=at=="text"?"textClass":at=="background"?"bgClass":at=="gutter"?"gutterClass":"wrapClass",Ct=ht[gt];if(Ct)if(dt==null)ht[gt]=null;else{var Bt=Ct.match(Ot(dt));if(!Bt)return!1;var Wt=Bt.index+Bt[0].length;ht[gt]=Ct.slice(0,Bt.index)+(!Bt.index||Wt==Ct.length?"":" ")+Ct.slice(Wt)||null}else return!1;return!0})}),addLineWidget:Qa(function(it,at,dt){return lf(this,it,at,dt)}),removeLineWidget:function(it){it.clear()},markText:function(it,at,dt){return _h(this,Yn(this,it),Yn(this,at),dt,dt&&dt.type||"range")},setBookmark:function(it,at){var dt={replacedWith:at&&(at.nodeType==null?at.widget:at),insertLeft:at&&at.insertLeft,clearWhenEmpty:!1,shared:at&&at.shared,handleMouseEvents:at&&at.handleMouseEvents};return it=Yn(this,it),_h(this,it,it,dt,"bookmark")},findMarksAt:function(it){it=Yn(this,it);var at=[],dt=jn(this,it.line).markedSpans;if(dt)for(var ht=0;ht<dt.length;++ht){var gt=dt[ht];(gt.from==null||gt.from<=it.ch)&&(gt.to==null||gt.to>=it.ch)&&at.push(gt.marker.parent||gt.marker)}return at},findMarks:function(it,at,dt){it=Yn(this,it),at=Yn(this,at);var ht=[],gt=it.line;return this.iter(it.line,at.line+1,function(Ct){var Bt=Ct.markedSpans;if(Bt)for(var Wt=0;Wt<Bt.length;Wt++){var Kt=Bt[Wt];!(Kt.to!=null&>==it.line&&it.ch>=Kt.to||Kt.from==null&>!=it.line||Kt.from!=null&>==at.line&&Kt.from>=at.ch)&&(!dt||dt(Kt.marker))&&ht.push(Kt.marker.parent||Kt.marker)}++gt}),ht},getAllMarks:function(){var it=[];return this.iter(function(at){var dt=at.markedSpans;if(dt)for(var ht=0;ht<dt.length;++ht)dt[ht].from!=null&&it.push(dt[ht].marker)}),it},posFromIndex:function(it){var at,dt=this.first,ht=this.lineSeparator().length;return this.iter(function(gt){var Ct=gt.text.length+ht;if(Ct>it)return at=it,!0;it-=Ct,++dt}),Yn(this,De(dt,at))},indexFromPos:function(it){it=Yn(this,it);var at=it.ch;if(it.line<this.first||it.ch<0)return 0;var dt=this.lineSeparator().length;return this.iter(this.first,it.line,function(ht){at+=ht.text.length+dt}),at},copy:function(it){var at=new gs(ki(this,this.first,this.first+this.size),this.modeOption,this.first,this.lineSep,this.direction);return at.scrollTop=this.scrollTop,at.scrollLeft=this.scrollLeft,at.sel=this.sel,at.extend=!1,it&&(at.history.undoDepth=this.history.undoDepth,at.setHistory(this.getHistory())),at},linkedDoc:function(it){it||(it={});var at=this.first,dt=this.first+this.size;it.from!=null&&it.from>at&&(at=it.from),it.to!=null&&it.to<dt&&(dt=it.to);var ht=new gs(ki(this,at,dt),it.mode||this.modeOption,at,this.lineSep,this.direction);return it.sharedHist&&(ht.history=this.history),(this.linked||(this.linked=[])).push({doc:ht,sharedHist:it.sharedHist}),ht.linked=[{doc:this,isParent:!0,sharedHist:it.sharedHist}],Yp(ht,gg(this)),ht},unlinkDoc:function(it){if(it instanceof Lo&&(it=it.doc),this.linked)for(var at=0;at<this.linked.length;++at){var dt=this.linked[at];if(dt.doc==it){this.linked.splice(at,1),it.unlinkDoc(this),pg(gg(this));break}}if(it.history==this.history){var ht=[it.id];du(it,function(gt){return ht.push(gt.id)},!0),it.history=new Fd(null),it.history.done=Zu(this.history.done,ht),it.history.undone=Zu(this.history.undone,ht)}},iterLinkedDocs:function(it){du(this,it)},getMode:function(){return this.mode},getEditor:function(){return this.cm},splitLines:function(it){return this.lineSep?it.split(this.lineSep):Zi(it)},lineSeparator:function(){return this.lineSep||`
|
|
`},setDirection:Qa(function(it){it!="rtl"&&(it="ltr"),it!=this.direction&&(this.direction=it,this.iter(function(at){return at.order=null}),this.cm&&$0(this.cm))})}),gs.prototype.eachLine=gs.prototype.iter;var xc=0;function mg(it){var at=this;if(_p(at),!(Ze(at,it)||bo(at.display,it))){Kn(it),Se&&(xc=+new Date);var dt=Ka(at,it,!0),ht=it.dataTransfer.files;if(!(!dt||at.isReadOnly()))if(ht&&ht.length&&window.FileReader&&window.File)for(var gt=ht.length,Ct=Array(gt),Bt=0,Wt=function(){++Bt==gt&&Wa(at,function(){dt=Yn(at.doc,dt);var nn={from:dt,to:dt,text:at.doc.splitLines(Ct.filter(function(fi){return fi!=null}).join(at.doc.lineSeparator())),origin:"paste"};gh(at.doc,nn),sf(at.doc,Ku(Yn(at.doc,dt),Yn(at.doc,dh(nn))))})()},Kt=function(nn,fi){if(at.options.allowDropFileTypes&&Fe(at.options.allowDropFileTypes,nn.type)==-1){Wt();return}var wi=new FileReader;wi.onerror=function(){return Wt()},wi.onload=function(){var Ti=wi.result;if(/[\x00-\x08\x0e-\x1f]{2}/.test(Ti)){Wt();return}Ct[fi]=Ti,Wt()},wi.readAsText(nn)},$t=0;$t<ht.length;$t++)Kt(ht[$t],$t);else{if(at.state.draggingText&&at.doc.sel.contains(dt)>-1){at.state.draggingText(it),setTimeout(function(){return at.display.input.focus()},20);return}try{var Ie=it.dataTransfer.getData("Text");if(Ie){var he;if(at.state.draggingText&&!at.state.draggingText.copy&&(he=at.listSelections()),Uh(at.doc,Ku(dt,dt)),he)for(var cn=0;cn<he.length;++cn)Xh(at.doc,"",he[cn].anchor,he[cn].head,"drag");at.replaceSelection(Ie,"around","paste"),at.display.input.focus()}}catch(nn){}}}}function Xp(it,at){if(Se&&(!it.state.draggingText||+new Date-xc<100)){Ei(at);return}if(!(Ze(it,at)||bo(it.display,at))&&(at.dataTransfer.setData("Text",it.getSelection()),at.dataTransfer.effectAllowed="copyMove",at.dataTransfer.setDragImage&&!Qe)){var dt=Xt("img",null,null,"position: fixed; left: 0; top: 0;");dt.src="data:image/gif;base64,R0lGODlhAQABAAAAACH5BAEKAAEALAAAAAABAAEAAAICTAEAOw==",Vt&&(dt.width=dt.height=1,it.display.wrapper.appendChild(dt),dt._top=dt.offsetTop),at.dataTransfer.setDragImage(dt,0,0),Vt&&dt.parentNode.removeChild(dt)}}function Jp(it,at){var dt=Ka(it,at);if(dt){var ht=document.createDocumentFragment();ao(it,dt,ht),it.display.dragCursor||(it.display.dragCursor=Xt("div",null,"CodeMirror-cursors CodeMirror-dragcursors"),it.display.lineSpace.insertBefore(it.display.dragCursor,it.display.cursorDiv)),_t(it.display.dragCursor,ht)}}function _p(it){it.display.dragCursor&&(it.display.lineSpace.removeChild(it.display.dragCursor),it.display.dragCursor=null)}function Qp(it){if(document.getElementsByClassName){for(var at=document.getElementsByClassName("CodeMirror"),dt=[],ht=0;ht<at.length;ht++){var gt=at[ht].CodeMirror;gt&&dt.push(gt)}dt.length&&dt[0].operation(function(){for(var Ct=0;Ct<dt.length;Ct++)it(dt[Ct])})}}var vg=!1;function ml(){vg||(Td(),vg=!0)}function Td(){var it;He(window,"resize",function(){it==null&&(it=setTimeout(function(){it=null,Qp(yg)},100))}),He(window,"blur",function(){return Qp(qs)})}function yg(it){var at=it.display;at.cachedCharWidth=at.cachedTextHeight=at.cachedPaddingH=null,at.scrollbarsClipped=!1,it.setSize()}for(var ku={3:"Pause",8:"Backspace",9:"Tab",13:"Enter",16:"Shift",17:"Ctrl",18:"Alt",19:"Pause",20:"CapsLock",27:"Esc",32:"Space",33:"PageUp",34:"PageDown",35:"End",36:"Home",37:"Left",38:"Up",39:"Right",40:"Down",44:"PrintScrn",45:"Insert",46:"Delete",59:";",61:"=",91:"Mod",92:"Mod",93:"Mod",106:"*",107:"=",109:"-",110:".",111:"/",145:"ScrollLock",173:"-",186:";",187:"=",188:",",189:"-",190:".",191:"/",192:"`",219:"[",220:"\\",221:"]",222:"'",224:"Mod",63232:"Up",63233:"Down",63234:"Left",63235:"Right",63272:"Delete",63273:"Home",63275:"End",63276:"PageUp",63277:"PageDown",63302:"Insert"},wc=0;wc<10;wc++)ku[wc+48]=ku[wc+96]=String(wc);for(var uf=65;uf<=90;uf++)ku[uf]=String.fromCharCode(uf);for(var Pc=1;Pc<=12;Pc++)ku[Pc+111]=ku[Pc+63235]="F"+Pc;var tl={};tl.basic={Left:"goCharLeft",Right:"goCharRight",Up:"goLineUp",Down:"goLineDown",End:"goLineEnd",Home:"goLineStartSmart",PageUp:"goPageUp",PageDown:"goPageDown",Delete:"delCharAfter",Backspace:"delCharBefore","Shift-Backspace":"delCharBefore",Tab:"defaultTab","Shift-Tab":"indentAuto",Enter:"newlineAndIndent",Insert:"toggleOverwrite",Esc:"singleSelection"},tl.pcDefault={"Ctrl-A":"selectAll","Ctrl-D":"deleteLine","Ctrl-Z":"undo","Shift-Ctrl-Z":"redo","Ctrl-Y":"redo","Ctrl-Home":"goDocStart","Ctrl-End":"goDocEnd","Ctrl-Up":"goLineUp","Ctrl-Down":"goLineDown","Ctrl-Left":"goGroupLeft","Ctrl-Right":"goGroupRight","Alt-Left":"goLineStart","Alt-Right":"goLineEnd","Ctrl-Backspace":"delGroupBefore","Ctrl-Delete":"delGroupAfter","Ctrl-S":"save","Ctrl-F":"find","Ctrl-G":"findNext","Shift-Ctrl-G":"findPrev","Shift-Ctrl-F":"replace","Shift-Ctrl-R":"replaceAll","Ctrl-[":"indentLess","Ctrl-]":"indentMore","Ctrl-U":"undoSelection","Shift-Ctrl-U":"redoSelection","Alt-U":"redoSelection",fallthrough:"basic"},tl.emacsy={"Ctrl-F":"goCharRight","Ctrl-B":"goCharLeft","Ctrl-P":"goLineUp","Ctrl-N":"goLineDown","Alt-F":"goWordRight","Alt-B":"goWordLeft","Ctrl-A":"goLineStart","Ctrl-E":"goLineEnd","Ctrl-V":"goPageDown","Shift-Ctrl-V":"goPageUp","Ctrl-D":"delCharAfter","Ctrl-H":"delCharBefore","Alt-D":"delWordAfter","Alt-Backspace":"delWordBefore","Ctrl-K":"killLine","Ctrl-T":"transposeChars","Ctrl-O":"openLine"},tl.macDefault={"Cmd-A":"selectAll","Cmd-D":"deleteLine","Cmd-Z":"undo","Shift-Cmd-Z":"redo","Cmd-Y":"redo","Cmd-Home":"goDocStart","Cmd-Up":"goDocStart","Cmd-End":"goDocEnd","Cmd-Down":"goDocEnd","Alt-Left":"goGroupLeft","Alt-Right":"goGroupRight","Cmd-Left":"goLineLeft","Cmd-Right":"goLineRight","Alt-Backspace":"delGroupBefore","Ctrl-Alt-Backspace":"delGroupAfter","Alt-Delete":"delGroupAfter","Cmd-S":"save","Cmd-F":"find","Cmd-G":"findNext","Shift-Cmd-G":"findPrev","Cmd-Alt-F":"replace","Shift-Cmd-Alt-F":"replaceAll","Cmd-[":"indentLess","Cmd-]":"indentMore","Cmd-Backspace":"delWrappedLineLeft","Cmd-Delete":"delWrappedLineRight","Cmd-U":"undoSelection","Shift-Cmd-U":"redoSelection","Ctrl-Up":"goDocStart","Ctrl-Down":"goDocEnd",fallthrough:["basic","emacsy"]},tl.default=ct?tl.macDefault:tl.pcDefault;function Sg(it){var at=it.split(/-(?!$)/);it=at[at.length-1];for(var dt,ht,gt,Ct,Bt=0;Bt<at.length-1;Bt++){var Wt=at[Bt];if(/^(cmd|meta|m)$/i.test(Wt))Ct=!0;else if(/^a(lt)?$/i.test(Wt))dt=!0;else if(/^(c|ctrl|control)$/i.test(Wt))ht=!0;else if(/^s(hift)?$/i.test(Wt))gt=!0;else throw new Error("Unrecognized modifier name: "+Wt)}return dt&&(it="Alt-"+it),ht&&(it="Ctrl-"+it),Ct&&(it="Cmd-"+it),gt&&(it="Shift-"+it),it}function xg(it){var at={};for(var dt in it)if(it.hasOwnProperty(dt)){var ht=it[dt];if(/^(name|fallthrough|(de|at)tach)$/.test(dt))continue;if(ht=="..."){delete it[dt];continue}for(var gt=hn(dt.split(" "),Sg),Ct=0;Ct<gt.length;Ct++){var Bt=void 0,Wt=void 0;Ct==gt.length-1?(Wt=gt.join(" "),Bt=ht):(Wt=gt.slice(0,Ct+1).join(" "),Bt="...");var Kt=at[Wt];if(!Kt)at[Wt]=Bt;else if(Kt!=Bt)throw new Error("Inconsistent bindings for "+Wt)}delete it[dt]}for(var $t in at)it[$t]=at[$t];return it}function Nl(it,at,dt,ht){at=Qh(at);var gt=at.call?at.call(it,ht):at[it];if(gt===!1)return"nothing";if(gt==="...")return"multi";if(gt!=null&&dt(gt))return"handled";if(at.fallthrough){if(Object.prototype.toString.call(at.fallthrough)!="[object Array]")return Nl(it,at.fallthrough,dt,ht);for(var Ct=0;Ct<at.fallthrough.length;Ct++){var Bt=Nl(it,at.fallthrough[Ct],dt,ht);if(Bt)return Bt}}}function Od(it){var at=typeof it=="string"?it:ku[it.keyCode];return at=="Ctrl"||at=="Alt"||at=="Shift"||at=="Mod"}function wg(it,at,dt){var ht=it;return at.altKey&&ht!="Alt"&&(it="Alt-"+it),(xt?at.metaKey:at.ctrlKey)&&ht!="Ctrl"&&(it="Ctrl-"+it),(xt?at.ctrlKey:at.metaKey)&&ht!="Mod"&&(it="Cmd-"+it),!dt&&at.shiftKey&&ht!="Shift"&&(it="Shift-"+it),it}function qp(it,at){if(Vt&&it.keyCode==34&&it.char)return!1;var dt=ku[it.keyCode];return dt==null||it.altGraphKey?!1:(it.keyCode==3&&it.code&&(dt=it.code),wg(dt,it,at))}function Qh(it){return typeof it=="string"?tl[it]:it}function el(it,at){for(var dt=it.doc.sel.ranges,ht=[],gt=0;gt<dt.length;gt++){for(var Ct=at(dt[gt]);ht.length&&kn(Ct.from,re(ht).to)<=0;){var Bt=ht.pop();if(kn(Bt.from,Ct.from)<0){Ct.from=Bt.from;break}}ht.push(Ct)}Ao(it,function(){for(var Wt=ht.length-1;Wt>=0;Wt--)Xh(it.doc,"",ht[Wt].from,ht[Wt].to,"+delete");Vl(it)})}function Pg(it,at,dt){var ht=Te(it.text,at+dt,dt);return ht<0||ht>it.text.length?null:ht}function Na(it,at,dt){var ht=Pg(it,at.ch,dt);return ht==null?null:new De(at.line,ht,dt<0?"after":"before")}function Cc(it,at,dt,ht,gt){if(it){at.doc.direction=="rtl"&&(gt=-gt);var Ct=ze(dt,at.doc.direction);if(Ct){var Bt=gt<0?re(Ct):Ct[0],Wt=gt<0==(Bt.level==1),Kt=Wt?"after":"before",$t;if(Bt.level>0||at.doc.direction=="rtl"){var Ie=Hs(at,dt);$t=gt<0?dt.text.length-1:0;var he=fs(at,Ie,$t).top;$t=_e(function(cn){return fs(at,Ie,cn).top==he},gt<0==(Bt.level==1)?Bt.from:Bt.to-1,$t),Kt=="before"&&($t=Pg(dt,$t,1))}else $t=gt<0?Bt.to:Bt.from;return new De(ht,$t,Kt)}}return new De(ht,gt<0?dt.text.length:0,gt<0?"before":"after")}function hf(it,at,dt,ht){var gt=ze(at,it.doc.direction);if(!gt)return Na(at,dt,ht);dt.ch>=at.text.length?(dt.ch=at.text.length,dt.sticky="before"):dt.ch<=0&&(dt.ch=0,dt.sticky="after");var Ct=pe(gt,dt.ch,dt.sticky),Bt=gt[Ct];if(it.doc.direction=="ltr"&&Bt.level%2==0&&(ht>0?Bt.to>dt.ch:Bt.from<dt.ch))return Na(at,dt,ht);var Wt=function(tr,Er){return Pg(at,tr instanceof De?tr.ch:tr,Er)},Kt,$t=function(tr){return it.options.lineWrapping?(Kt=Kt||Hs(it,at),ca(it,at,Kt,tr)):{begin:0,end:at.text.length}},Ie=$t(dt.sticky=="before"?Wt(dt,-1):dt.ch);if(it.doc.direction=="rtl"||Bt.level==1){var he=Bt.level==1==ht<0,cn=Wt(dt,he?1:-1);if(cn!=null&&(he?cn<=Bt.to&&cn<=Ie.end:cn>=Bt.from&&cn>=Ie.begin)){var nn=he?"before":"after";return new De(dt.line,cn,nn)}}var fi=function(tr,Er,gr){for(var Dr=function(oa,Ua){return Ua?new De(dt.line,Wt(oa,1),"before"):new De(dt.line,oa,"after")};tr>=0&&tr<gt.length;tr+=Er){var Xr=gt[tr],cr=Er>0==(Xr.level!=1),co=cr?gr.begin:Wt(gr.end,-1);if(Xr.from<=co&&co<Xr.to||(co=cr?Xr.from:Wt(Xr.to,-1),gr.begin<=co&&co<gr.end))return Dr(co,cr)}},wi=fi(Ct+ht,ht,Ie);if(wi)return wi;var Ti=ht>0?Ie.end:Wt(Ie.begin,-1);return Ti!=null&&!(ht>0&&Ti==at.text.length)&&(wi=fi(ht>0?0:gt.length-1,ht,$t(Ti)),wi)?wi:null}var ph={selectAll:Aa,singleSelection:function(it){return it.setSelection(it.getCursor("anchor"),it.getCursor("head"),ke)},killLine:function(it){return el(it,function(at){if(at.empty()){var dt=jn(it.doc,at.head.line).text.length;return at.head.ch==dt&&at.head.line<it.lastLine()?{from:at.head,to:De(at.head.line+1,0)}:{from:at.head,to:De(at.head.line,dt)}}else return{from:at.from(),to:at.to()}})},deleteLine:function(it){return el(it,function(at){return{from:De(at.from().line,0),to:Yn(it.doc,De(at.to().line+1,0))}})},delLineLeft:function(it){return el(it,function(at){return{from:De(at.from().line,0),to:at.from()}})},delWrappedLineLeft:function(it){return el(it,function(at){var dt=it.charCoords(at.head,"div").top+5,ht=it.coordsChar({left:0,top:dt},"div");return{from:ht,to:at.from()}})},delWrappedLineRight:function(it){return el(it,function(at){var dt=it.charCoords(at.head,"div").top+5,ht=it.coordsChar({left:it.display.lineDiv.offsetWidth+100,top:dt},"div");return{from:at.from(),to:ht}})},undo:function(it){return it.undo()},redo:function(it){return it.redo()},undoSelection:function(it){return it.undoSelection()},redoSelection:function(it){return it.redoSelection()},goDocStart:function(it){return it.extendSelection(De(it.firstLine(),0))},goDocEnd:function(it){return it.extendSelection(De(it.lastLine()))},goLineStart:function(it){return it.extendSelectionsBy(function(at){return Id(it,at.head.line)},{origin:"+move",bias:1})},goLineStartSmart:function(it){return it.extendSelectionsBy(function(at){return Cg(it,at.head)},{origin:"+move",bias:1})},goLineEnd:function(it){return it.extendSelectionsBy(function(at){return Rd(it,at.head.line)},{origin:"+move",bias:-1})},goLineRight:function(it){return it.extendSelectionsBy(function(at){var dt=it.cursorCoords(at.head,"div").top+5;return it.coordsChar({left:it.display.lineDiv.offsetWidth+100,top:dt},"div")},fn)},goLineLeft:function(it){return it.extendSelectionsBy(function(at){var dt=it.cursorCoords(at.head,"div").top+5;return it.coordsChar({left:0,top:dt},"div")},fn)},goLineLeftSmart:function(it){return it.extendSelectionsBy(function(at){var dt=it.cursorCoords(at.head,"div").top+5,ht=it.coordsChar({left:0,top:dt},"div");return ht.ch<it.getLine(ht.line).search(/\S/)?Cg(it,at.head):ht},fn)},goLineUp:function(it){return it.moveV(-1,"line")},goLineDown:function(it){return it.moveV(1,"line")},goPageUp:function(it){return it.moveV(-1,"page")},goPageDown:function(it){return it.moveV(1,"page")},goCharLeft:function(it){return it.moveH(-1,"char")},goCharRight:function(it){return it.moveH(1,"char")},goColumnLeft:function(it){return it.moveH(-1,"column")},goColumnRight:function(it){return it.moveH(1,"column")},goWordLeft:function(it){return it.moveH(-1,"word")},goGroupRight:function(it){return it.moveH(1,"group")},goGroupLeft:function(it){return it.moveH(-1,"group")},goWordRight:function(it){return it.moveH(1,"word")},delCharBefore:function(it){return it.deleteH(-1,"codepoint")},delCharAfter:function(it){return it.deleteH(1,"char")},delWordBefore:function(it){return it.deleteH(-1,"word")},delWordAfter:function(it){return it.deleteH(1,"word")},delGroupBefore:function(it){return it.deleteH(-1,"group")},delGroupAfter:function(it){return it.deleteH(1,"group")},indentAuto:function(it){return it.indentSelection("smart")},indentMore:function(it){return it.indentSelection("add")},indentLess:function(it){return it.indentSelection("subtract")},insertTab:function(it){return it.replaceSelection(" ")},insertSoftTab:function(it){for(var at=[],dt=it.listSelections(),ht=it.options.tabSize,gt=0;gt<dt.length;gt++){var Ct=dt[gt].from(),Bt=ne(it.getLine(Ct.line),Ct.ch,ht);at.push(an(ht-Bt%ht))}it.replaceSelections(at)},defaultTab:function(it){it.somethingSelected()?it.indentSelection("add"):it.execCommand("insertTab")},transposeChars:function(it){return Ao(it,function(){for(var at=it.listSelections(),dt=[],ht=0;ht<at.length;ht++)if(at[ht].empty()){var gt=at[ht].head,Ct=jn(it.doc,gt.line).text;if(Ct){if(gt.ch==Ct.length&&(gt=new De(gt.line,gt.ch-1)),gt.ch>0)gt=new De(gt.line,gt.ch+1),it.replaceRange(Ct.charAt(gt.ch-1)+Ct.charAt(gt.ch-2),De(gt.line,gt.ch-2),gt,"+transpose");else if(gt.line>it.doc.first){var Bt=jn(it.doc,gt.line-1).text;Bt&&(gt=new De(gt.line,1),it.replaceRange(Ct.charAt(0)+it.doc.lineSeparator()+Bt.charAt(Bt.length-1),De(gt.line-1,Bt.length-1),gt,"+transpose"))}}dt.push(new Ho(gt,gt))}it.setSelections(dt)})},newlineAndIndent:function(it){return Ao(it,function(){for(var at=it.listSelections(),dt=at.length-1;dt>=0;dt--)it.replaceRange(it.doc.lineSeparator(),at[dt].anchor,at[dt].head,"+input");at=it.listSelections();for(var ht=0;ht<at.length;ht++)it.indentLine(at[ht].from().line,null,!0);Vl(it)})},openLine:function(it){return it.replaceSelection(`
|
|
`,"start")},toggleOverwrite:function(it){return it.toggleOverwrite()}};function Id(it,at){var dt=jn(it.doc,at),ht=Ln(dt);return ht!=dt&&(at=Gt(ht)),Cc(!0,it,ht,at,1)}function Rd(it,at){var dt=jn(it.doc,at),ht=Zn(dt);return ht!=dt&&(at=Gt(ht)),Cc(!0,it,dt,at,-1)}function Cg(it,at){var dt=Id(it,at.line),ht=jn(it.doc,dt.line),gt=ze(ht,it.doc.direction);if(!gt||gt[0].level==0){var Ct=Math.max(dt.ch,ht.text.search(/\S/)),Bt=at.line==dt.line&&at.ch<=Ct&&at.ch;return De(dt.line,Bt?0:Ct,dt.sticky)}return dt}function jd(it,at,dt){if(typeof at=="string"&&(at=ph[at],!at))return!1;it.display.input.ensurePolled();var ht=it.display.shift,gt=!1;try{it.isReadOnly()&&(it.state.suppressEdits=!0),dt&&(it.display.shift=!1),gt=at(it)!=Pn}finally{it.display.shift=ht,it.state.suppressEdits=!1}return gt}function Eg(it,at,dt){for(var ht=0;ht<it.state.keyMaps.length;ht++){var gt=Nl(at,it.state.keyMaps[ht],dt,it);if(gt)return gt}return it.options.extraKeys&&Nl(at,it.options.extraKeys,dt,it)||Nl(at,it.options.keyMap,dt,it)}var Lu=new jt;function qh(it,at,dt,ht){var gt=it.state.keySeq;if(gt){if(Od(at))return"handled";if(/\'$/.test(at)?it.state.keySeq=null:Lu.set(50,function(){it.state.keySeq==gt&&(it.state.keySeq=null,it.display.input.reset())}),df(it,gt+" "+at,dt,ht))return!0}return df(it,at,dt,ht)}function df(it,at,dt,ht){var gt=Eg(it,at,ht);return gt=="multi"&&(it.state.keySeq=at),gt=="handled"&&Ji(it,"keyHandled",it,at,dt),(gt=="handled"||gt=="multi")&&(Kn(dt),Po(it)),!!gt}function cf(it,at){var dt=qp(at,!0);return dt?at.shiftKey&&!it.state.keySeq?qh(it,"Shift-"+dt,at,function(ht){return jd(it,ht,!0)})||qh(it,dt,at,function(ht){if(typeof ht=="string"?/^go[A-Z]/.test(ht):ht.motion)return jd(it,ht)}):qh(it,dt,at,function(ht){return jd(it,ht)}):!1}function ff(it,at,dt){return qh(it,"'"+dt+"'",at,function(ht){return jd(it,ht,!0)})}var $h=null;function kg(it){var at=this;if(!(it.target&&it.target!=at.display.input.getField())&&(at.curOp.focus=Ye(),!Ze(at,it))){Se&&Rt<11&&it.keyCode==27&&(it.returnValue=!1);var dt=it.keyCode;at.display.shift=dt==16||it.shiftKey;var ht=cf(at,it);Vt&&($h=ht?dt:null,!ht&&dt==88&&!ni&&(ct?it.metaKey:it.ctrlKey)&&at.replaceSelection("",null,"cut")),Ft&&!ct&&!ht&&dt==46&&it.shiftKey&&!it.ctrlKey&&document.execCommand&&document.execCommand("cut"),dt==18&&!/\bCodeMirror-crosshair\b/.test(at.display.lineDiv.className)&&Lg(at)}}function Lg(it){var at=it.display.lineDiv;en(at,"CodeMirror-crosshair");function dt(ht){(ht.keyCode==18||!ht.altKey)&&(Ht(at,"CodeMirror-crosshair"),xe(document,"keyup",dt),xe(document,"mouseover",dt))}He(document,"keyup",dt),He(document,"mouseover",dt)}function bg(it){it.keyCode==16&&(this.doc.sel.shift=!1),Ze(this,it)}function cu(it){var at=this;if(!(it.target&&it.target!=at.display.input.getField())&&!(bo(at.display,it)||Ze(at,it)||it.ctrlKey&&!it.altKey||ct&&it.metaKey)){var dt=it.keyCode,ht=it.charCode;if(Vt&&dt==$h){$h=null,Kn(it);return}if(!(Vt&&(!it.which||it.which<10)&&cf(at,it))){var gt=String.fromCharCode(ht==null?dt:ht);gt!="\b"&&(ff(at,it,gt)||at.display.input.onKeyPress(it))}}}var $p=400,Mg=function(it,at,dt){this.time=it,this.pos=at,this.button=dt};Mg.prototype.compare=function(it,at,dt){return this.time+$p>it&&kn(at,this.pos)==0&&dt==this.button};var zd,td;function Fg(it,at){var dt=+new Date;return td&&td.compare(dt,it,at)?(zd=td=null,"triple"):zd&&zd.compare(dt,it,at)?(td=new Mg(dt,it,at),zd=null,"double"):(zd=new Mg(dt,it,at),td=null,"single")}function fu(it){var at=this,dt=at.display;if(!(Ze(at,it)||dt.activeTouch&&dt.input.supportsTouch())){if(dt.input.ensurePolled(),dt.shift=it.shiftKey,bo(dt,it)){ie||(dt.scroller.draggable=!1,setTimeout(function(){return dt.scroller.draggable=!0},100));return}if(!mf(at,it)){var ht=Ka(at,it),gt=Gi(it),Ct=ht?Fg(ht,gt):"single";window.focus(),gt==1&&at.state.selectingText&&at.state.selectingText(it),!(ht&&Ag(at,gt,ht,Ct,it))&&(gt==1?ht?tm(at,ht,Ct,it):Yi(it)==dt.scroller&&Kn(it):gt==2?(ht&&af(at.doc,ht),setTimeout(function(){return dt.input.focus()},20)):gt==3&&(Lt?at.display.input.onContextMenu(it):To(at)))}}}function Ag(it,at,dt,ht,gt){var Ct="Click";return ht=="double"?Ct="Double"+Ct:ht=="triple"&&(Ct="Triple"+Ct),Ct=(at==1?"Left":at==2?"Middle":"Right")+Ct,qh(it,wg(Ct,gt),gt,function(Bt){if(typeof Bt=="string"&&(Bt=ph[Bt]),!Bt)return!1;var Wt=!1;try{it.isReadOnly()&&(it.state.suppressEdits=!0),Wt=Bt(it,dt)!=Pn}finally{it.state.suppressEdits=!1}return Wt})}function gf(it,at,dt){var ht=it.getOption("configureMouse"),gt=ht?ht(it,at,dt):{};if(gt.unit==null){var Ct=lt?dt.shiftKey&&dt.metaKey:dt.altKey;gt.unit=Ct?"rectangle":at=="single"?"char":at=="double"?"word":"line"}return(gt.extend==null||it.doc.extend)&&(gt.extend=it.doc.extend||dt.shiftKey),gt.addNew==null&&(gt.addNew=ct?dt.metaKey:dt.ctrlKey),gt.moveOnDrag==null&&(gt.moveOnDrag=!(ct?dt.altKey:dt.ctrlKey)),gt}function tm(it,at,dt,ht){Se?setTimeout(un(Eo,it),0):it.curOp.focus=Ye();var gt=gf(it,dt,ht),Ct=it.doc.sel,Bt;it.options.dragDrop&&Hi&&!it.isReadOnly()&&dt=="single"&&(Bt=Ct.contains(at))>-1&&(kn((Bt=Ct.ranges[Bt]).from(),at)<0||at.xRel>0)&&(kn(Bt.to(),at)>0||at.xRel<0)?Ng(it,ht,at,gt):ev(it,ht,at,gt)}function Ng(it,at,dt,ht){var gt=it.display,Ct=!1,Bt=Wa(it,function($t){ie&&(gt.scroller.draggable=!1),it.state.draggingText=!1,xe(gt.wrapper.ownerDocument,"mouseup",Bt),xe(gt.wrapper.ownerDocument,"mousemove",Wt),xe(gt.scroller,"dragstart",Kt),xe(gt.scroller,"drop",Bt),Ct||(Kn($t),ht.addNew||af(it.doc,dt,null,null,ht.extend),ie&&!Qe||Se&&Rt==9?setTimeout(function(){gt.wrapper.ownerDocument.body.focus({preventScroll:!0}),gt.input.focus()},20):gt.input.focus())}),Wt=function($t){Ct=Ct||Math.abs(at.clientX-$t.clientX)+Math.abs(at.clientY-$t.clientY)>=10},Kt=function(){return Ct=!0};ie&&(gt.scroller.draggable=!0),it.state.draggingText=Bt,Bt.copy=!ht.moveOnDrag,gt.scroller.dragDrop&>.scroller.dragDrop(),He(gt.wrapper.ownerDocument,"mouseup",Bt),He(gt.wrapper.ownerDocument,"mousemove",Wt),He(gt.scroller,"dragstart",Kt),He(gt.scroller,"drop",Bt),To(it),setTimeout(function(){return gt.input.focus()},20)}function Dg(it,at,dt){if(dt=="char")return new Ho(at,at);if(dt=="word")return it.findWordAt(at);if(dt=="line")return new Ho(De(at.line,0),Yn(it.doc,De(at.line+1,0)));var ht=dt(it,at);return new Ho(ht.from,ht.to)}function ev(it,at,dt,ht){var gt=it.display,Ct=it.doc;Kn(at);var Bt,Wt,Kt=Ct.sel,$t=Kt.ranges;if(ht.addNew&&!ht.extend?(Wt=Ct.sel.contains(dt),Wt>-1?Bt=$t[Wt]:Bt=new Ho(dt,dt)):(Bt=Ct.sel.primary(),Wt=Ct.sel.primIndex),ht.unit=="rectangle")ht.addNew||(Bt=new Ho(dt,dt)),dt=Ka(it,at,!0,!0),Wt=-1;else{var Ie=Dg(it,dt,ht.unit);ht.extend?Bt=of(Bt,Ie.anchor,Ie.head,ht.extend):Bt=Ie}ht.addNew?Wt==-1?(Wt=$t.length,Cs(Ct,Yl(it,$t.concat([Bt]),Wt),{scroll:!1,origin:"*mouse"})):$t.length>1&&$t[Wt].empty()&&ht.unit=="char"&&!ht.extend?(Cs(Ct,Yl(it,$t.slice(0,Wt).concat($t.slice(Wt+1)),0),{scroll:!1,origin:"*mouse"}),Kt=Ct.sel):fh(Ct,Wt,Bt,tn):(Wt=0,Cs(Ct,new Fl([Bt],0),tn),Kt=Ct.sel);var he=dt;function cn(gr){if(kn(he,gr)!=0)if(he=gr,ht.unit=="rectangle"){for(var Dr=[],Xr=it.options.tabSize,cr=ne(jn(Ct,dt.line).text,dt.ch,Xr),co=ne(jn(Ct,gr.line).text,gr.ch,Xr),oa=Math.min(cr,co),Ua=Math.max(cr,co),pa=Math.min(dt.line,gr.line),Ws=Math.min(it.lastLine(),Math.max(dt.line,gr.line));pa<=Ws;pa++){var Es=jn(Ct,pa).text,ja=Jn(Es,oa,Xr);oa==Ua?Dr.push(new Ho(De(pa,ja),De(pa,ja))):Es.length>ja&&Dr.push(new Ho(De(pa,ja),De(pa,Jn(Es,Ua,Xr))))}Dr.length||Dr.push(new Ho(dt,dt)),Cs(Ct,Yl(it,Kt.ranges.slice(0,Wt).concat(Dr),Wt),{origin:"*mouse",scroll:!1}),it.scrollIntoView(gr)}else{var nl=Bt,ps=Dg(it,gr,ht.unit),za=nl.anchor,Mo;kn(ps.anchor,za)>0?(Mo=ps.head,za=On(nl.from(),ps.anchor)):(Mo=ps.anchor,za=ei(nl.to(),ps.head));var wa=Kt.ranges.slice(0);wa[Wt]=em(it,new Ho(Yn(Ct,za),Mo)),Cs(Ct,Yl(it,wa,Wt),tn)}}var nn=gt.wrapper.getBoundingClientRect(),fi=0;function wi(gr){var Dr=++fi,Xr=Ka(it,gr,!0,ht.unit=="rectangle");if(Xr)if(kn(Xr,he)!=0){it.curOp.focus=Ye(),cn(Xr);var cr=qr(gt,Ct);(Xr.line>=cr.to||Xr.line<cr.from)&&setTimeout(Wa(it,function(){fi==Dr&&wi(gr)}),150)}else{var co=gr.clientY<nn.top?-20:gr.clientY>nn.bottom?20:0;co&&setTimeout(Wa(it,function(){fi==Dr&&(gt.scroller.scrollTop+=co,wi(gr))}),50)}}function Ti(gr){it.state.selectingText=!1,fi=1/0,gr&&(Kn(gr),gt.input.focus()),xe(gt.wrapper.ownerDocument,"mousemove",tr),xe(gt.wrapper.ownerDocument,"mouseup",Er),Ct.history.lastSelOrigin=null}var tr=Wa(it,function(gr){gr.buttons===0||!Gi(gr)?Ti(gr):wi(gr)}),Er=Wa(it,Ti);it.state.selectingText=Er,He(gt.wrapper.ownerDocument,"mousemove",tr),He(gt.wrapper.ownerDocument,"mouseup",Er)}function em(it,at){var dt=at.anchor,ht=at.head,gt=jn(it.doc,dt.line);if(kn(dt,ht)==0&&dt.sticky==ht.sticky)return at;var Ct=ze(gt);if(!Ct)return at;var Bt=pe(Ct,dt.ch,dt.sticky),Wt=Ct[Bt];if(Wt.from!=dt.ch&&Wt.to!=dt.ch)return at;var Kt=Bt+(Wt.from==dt.ch==(Wt.level!=1)?0:1);if(Kt==0||Kt==Ct.length)return at;var $t;if(ht.line!=dt.line)$t=(ht.line-dt.line)*(it.doc.direction=="ltr"?1:-1)>0;else{var Ie=pe(Ct,ht.ch,ht.sticky),he=Ie-Bt||(ht.ch-dt.ch)*(Wt.level==1?-1:1);Ie==Kt-1||Ie==Kt?$t=he<0:$t=he>0}var cn=Ct[Kt+($t?-1:0)],nn=$t==(cn.level==1),fi=nn?cn.from:cn.to,wi=nn?"after":"before";return dt.ch==fi&&dt.sticky==wi?at:new Ho(new De(dt.line,fi,wi),ht)}function pf(it,at,dt,ht){var gt,Ct;if(at.touches)gt=at.touches[0].clientX,Ct=at.touches[0].clientY;else try{gt=at.clientX,Ct=at.clientY}catch(cn){return!1}if(gt>=Math.floor(it.display.gutters.getBoundingClientRect().right))return!1;ht&&Kn(at);var Bt=it.display,Wt=Bt.lineDiv.getBoundingClientRect();if(Ct>Wt.bottom||!le(it,dt))return Xn(at);Ct-=Wt.top-Bt.viewOffset;for(var Kt=0;Kt<it.display.gutterSpecs.length;++Kt){var $t=Bt.gutters.childNodes[Kt];if($t&&$t.getBoundingClientRect().right>=gt){var Ie=fe(it.doc,Ct),he=it.display.gutterSpecs[Kt];return Ne(it,dt,it,Ie,he.className,at),Xn(at)}}}function mf(it,at){return pf(it,at,"gutterClick",!0)}function vf(it,at){bo(it.display,at)||nm(it,at)||Ze(it,at,"contextmenu")||Lt||it.display.input.onContextMenu(at)}function nm(it,at){return le(it,"gutterContextMenu")?pf(it,at,"gutterContextMenu",!1):!1}function yf(it){it.display.wrapper.className=it.display.wrapper.className.replace(/\s*cm-s-\S+/g,"")+it.options.theme.replace(/(^|\s)\s*/g," cm-s-"),Ml(it)}var mh={toString:function(){return"CodeMirror.Init"}},Bg={},Ec={};function im(it){var at=it.optionHandlers;function dt(ht,gt,Ct,Bt){it.defaults[ht]=gt,Ct&&(at[ht]=Bt?function(Wt,Kt,$t){$t!=mh&&Ct(Wt,Kt,$t)}:Ct)}it.defineOption=dt,it.Init=mh,dt("value","",function(ht,gt){return ht.setValue(gt)},!0),dt("mode",null,function(ht,gt){ht.doc.modeOption=gt,ho(ht)},!0),dt("indentUnit",2,ho,!0),dt("indentWithTabs",!1),dt("smartIndent",!0),dt("tabSize",4,function(ht){hc(ht),Ml(ht),zo(ht)},!0),dt("lineSeparator",null,function(ht,gt){if(ht.doc.lineSep=gt,!!gt){var Ct=[],Bt=ht.doc.first;ht.doc.iter(function(Kt){for(var $t=0;;){var Ie=Kt.text.indexOf(gt,$t);if(Ie==-1)break;$t=Ie+gt.length,Ct.push(De(Bt,Ie))}Bt++});for(var Wt=Ct.length-1;Wt>=0;Wt--)Xh(ht.doc,gt,Ct[Wt],De(Ct[Wt].line,Ct[Wt].ch+gt.length))}}),dt("specialChars",/[\u0000-\u001f\u007f-\u009f\u00ad\u061c\u200b-\u200c\u200e\u200f\u2028\u2029\ufeff\ufff9-\ufffc]/g,function(ht,gt,Ct){ht.state.specialChars=new RegExp(gt.source+(gt.test(" ")?"":"| "),"g"),Ct!=mh&&ht.refresh()}),dt("specialCharPlaceholder",Fr,function(ht){return ht.refresh()},!0),dt("electricChars",!0),dt("inputStyle",et?"contenteditable":"textarea",function(){throw new Error("inputStyle can not (yet) be changed in a running editor")},!0),dt("spellcheck",!1,function(ht,gt){return ht.getInputField().spellcheck=gt},!0),dt("autocorrect",!1,function(ht,gt){return ht.getInputField().autocorrect=gt},!0),dt("autocapitalize",!1,function(ht,gt){return ht.getInputField().autocapitalize=gt},!0),dt("rtlMoveVisually",!pt),dt("wholeLineUpdateBefore",!0),dt("theme","default",function(ht){yf(ht),gl(ht)},!0),dt("keyMap","default",function(ht,gt,Ct){var Bt=Qh(gt),Wt=Ct!=mh&&Qh(Ct);Wt&&Wt.detach&&Wt.detach(ht,Bt),Bt.attach&&Bt.attach(ht,Wt||null)}),dt("extraKeys",null),dt("configureMouse",null),dt("lineWrapping",!1,rm,!0),dt("gutters",[],function(ht,gt){ht.display.gutterSpecs=$a(gt,ht.options.lineNumbers),gl(ht)},!0),dt("fixedGutter",!0,function(ht,gt){ht.display.gutters.style.left=gt?Kl(ht.display)+"px":"0",ht.refresh()},!0),dt("coverGutterNextToScrollbar",!1,function(ht){return Za(ht)},!0),dt("scrollbarStyle","native",function(ht){uu(ht),Za(ht),ht.display.scrollbars.setScrollTop(ht.doc.scrollTop),ht.display.scrollbars.setScrollLeft(ht.doc.scrollLeft)},!0),dt("lineNumbers",!1,function(ht,gt){ht.display.gutterSpecs=$a(ht.options.gutters,gt),gl(ht)},!0),dt("firstLineNumber",1,gl,!0),dt("lineNumberFormatter",function(ht){return ht},gl,!0),dt("showCursorWhenSelecting",!1,ia,!0),dt("resetSelectionOnContextMenu",!0),dt("lineWiseCopyCut",!0),dt("pasteLinesPerSelection",!0),dt("selectionsMayTouch",!1),dt("readOnly",!1,function(ht,gt){gt=="nocursor"&&(qs(ht),ht.display.input.blur()),ht.display.input.readOnlyChanged(gt)}),dt("screenReaderLabel",null,function(ht,gt){gt=gt===""?null:gt,ht.display.input.screenReaderLabelChanged(gt)}),dt("disableInput",!1,function(ht,gt){gt||ht.display.input.reset()},!0),dt("dragDrop",!0,Sf),dt("allowDropFileTypes",null),dt("cursorBlinkRate",530),dt("cursorScrollMargin",0),dt("cursorHeight",1,ia,!0),dt("singleCursorHeightPerLine",!0,ia,!0),dt("workTime",100),dt("workDelay",100),dt("flattenSpans",!0,hc,!0),dt("addModeClass",!1,hc,!0),dt("pollInterval",100),dt("undoDepth",200,function(ht,gt){return ht.doc.history.undoDepth=gt}),dt("historyEventDelay",1250),dt("viewportMargin",10,function(ht){return ht.refresh()},!0),dt("maxHighlightLength",1e4,hc,!0),dt("moveInputWithCursor",!0,function(ht,gt){gt||ht.display.input.resetPosition()}),dt("tabindex",null,function(ht,gt){return ht.display.input.getField().tabIndex=gt||""}),dt("autofocus",null),dt("direction","ltr",function(ht,gt){return ht.doc.setDirection(gt)},!0),dt("phrases",null)}function Sf(it,at,dt){var ht=dt&&dt!=mh;if(!at!=!ht){var gt=it.display.dragFunctions,Ct=at?He:xe;Ct(it.display.scroller,"dragstart",gt.start),Ct(it.display.scroller,"dragenter",gt.enter),Ct(it.display.scroller,"dragover",gt.over),Ct(it.display.scroller,"dragleave",gt.leave),Ct(it.display.scroller,"drop",gt.drop)}}function rm(it){it.options.lineWrapping?(en(it.display.wrapper,"CodeMirror-wrap"),it.display.sizer.style.minWidth="",it.display.sizerWidth=null):(Ht(it.display.wrapper,"CodeMirror-wrap"),Oi(it)),Or(it),zo(it),Ml(it),setTimeout(function(){return Za(it)},100)}function Lo(it,at){var dt=this;if(!(this instanceof Lo))return new Lo(it,at);this.options=at=at?vn(at):{},vn(Bg,at,!1);var ht=at.value;typeof ht=="string"?ht=new gs(ht,at.mode,null,at.lineSeparator,at.direction):at.mode&&(ht.modeOption=at.mode),this.doc=ht;var gt=new Lo.inputStyles[at.inputStyle](this),Ct=this.display=new hh(it,ht,gt,at);Ct.wrapper.CodeMirror=this,yf(this),at.lineWrapping&&(this.display.wrapper.className+=" CodeMirror-wrap"),uu(this),this.state={keyMaps:[],overlays:[],modeGen:0,overwrite:!1,delayingBlurEvent:!1,focused:!1,suppressEdits:!1,pasteIncoming:-1,cutIncoming:-1,selectingText:!1,draggingText:!1,highlight:new jt,keySeq:null,specialChars:null},at.autofocus&&!et&&Ct.input.focus(),Se&&Rt<11&&setTimeout(function(){return dt.display.input.reset(!0)},20),Gd(this),ml(),fl(this),this.curOp.forceUpdate=!0,ef(this,ht),at.autofocus&&!et||this.hasFocus()?setTimeout(function(){dt.hasFocus()&&!dt.state.focused&&uo(dt)},20):qs(this);for(var Bt in Ec)Ec.hasOwnProperty(Bt)&&Ec[Bt](this,at[Bt],mh);Ta(this),at.finishInit&&at.finishInit(this);for(var Wt=0;Wt<ed.length;++Wt)ed[Wt](this);Ul(this),ie&&at.lineWrapping&&getComputedStyle(Ct.lineDiv).textRendering=="optimizelegibility"&&(Ct.lineDiv.style.textRendering="auto")}Lo.defaults=Bg,Lo.optionHandlers=Ec;function Gd(it){var at=it.display;He(at.scroller,"mousedown",Wa(it,fu)),Se&&Rt<11?He(at.scroller,"dblclick",Wa(it,function(Kt){if(!Ze(it,Kt)){var $t=Ka(it,Kt);if(!(!$t||mf(it,Kt)||bo(it.display,Kt))){Kn(Kt);var Ie=it.findWordAt($t);af(it.doc,Ie.anchor,Ie.head)}}})):He(at.scroller,"dblclick",function(Kt){return Ze(it,Kt)||Kn(Kt)}),He(at.scroller,"contextmenu",function(Kt){return vf(it,Kt)}),He(at.input.getField(),"contextmenu",function(Kt){at.scroller.contains(Kt.target)||vf(it,Kt)});var dt,ht={end:0};function gt(){at.activeTouch&&(dt=setTimeout(function(){return at.activeTouch=null},1e3),ht=at.activeTouch,ht.end=+new Date)}function Ct(Kt){if(Kt.touches.length!=1)return!1;var $t=Kt.touches[0];return $t.radiusX<=1&&$t.radiusY<=1}function Bt(Kt,$t){if($t.left==null)return!0;var Ie=$t.left-Kt.left,he=$t.top-Kt.top;return Ie*Ie+he*he>20*20}He(at.scroller,"touchstart",function(Kt){if(!Ze(it,Kt)&&!Ct(Kt)&&!mf(it,Kt)){at.input.ensurePolled(),clearTimeout(dt);var $t=+new Date;at.activeTouch={start:$t,moved:!1,prev:$t-ht.end<=300?ht:null},Kt.touches.length==1&&(at.activeTouch.left=Kt.touches[0].pageX,at.activeTouch.top=Kt.touches[0].pageY)}}),He(at.scroller,"touchmove",function(){at.activeTouch&&(at.activeTouch.moved=!0)}),He(at.scroller,"touchend",function(Kt){var $t=at.activeTouch;if($t&&!bo(at,Kt)&&$t.left!=null&&!$t.moved&&new Date-$t.start<300){var Ie=it.coordsChar(at.activeTouch,"page"),he;!$t.prev||Bt($t,$t.prev)?he=new Ho(Ie,Ie):!$t.prev.prev||Bt($t,$t.prev.prev)?he=it.findWordAt(Ie):he=new Ho(De(Ie.line,0),Yn(it.doc,De(Ie.line+1,0))),it.setSelection(he.anchor,he.head),it.focus(),Kn(Kt)}gt()}),He(at.scroller,"touchcancel",gt),He(at.scroller,"scroll",function(){at.scroller.clientHeight&&(su(it,at.scroller.scrollTop),lu(it,at.scroller.scrollLeft,!0),Ne(it,"scroll",it))}),He(at.scroller,"mousewheel",function(Kt){return ts(it,Kt)}),He(at.scroller,"DOMMouseScroll",function(Kt){return ts(it,Kt)}),He(at.wrapper,"scroll",function(){return at.wrapper.scrollTop=at.wrapper.scrollLeft=0}),at.dragFunctions={enter:function(Kt){Ze(it,Kt)||Ei(Kt)},over:function(Kt){Ze(it,Kt)||(Jp(it,Kt),Ei(Kt))},start:function(Kt){return Xp(it,Kt)},drop:Wa(it,mg),leave:function(Kt){Ze(it,Kt)||_p(it)}};var Wt=at.input.getField();He(Wt,"keyup",function(Kt){return bg.call(it,Kt)}),He(Wt,"keydown",Wa(it,kg)),He(Wt,"keypress",Wa(it,cu)),He(Wt,"focus",function(Kt){return uo(it,Kt)}),He(Wt,"blur",function(Kt){return qs(it,Kt)})}var ed=[];Lo.defineInitHook=function(it){return ed.push(it)};function Va(it,at,dt,ht){var gt=it.doc,Ct;dt==null&&(dt="add"),dt=="smart"&&(gt.mode.indent?Ct=br(it,at).state:dt="prev");var Bt=it.options.tabSize,Wt=jn(gt,at),Kt=ne(Wt.text,null,Bt);Wt.stateAfter&&(Wt.stateAfter=null);var $t=Wt.text.match(/^\s*/)[0],Ie;if(!ht&&!/\S/.test(Wt.text))Ie=0,dt="not";else if(dt=="smart"&&(Ie=gt.mode.indent(Ct,Wt.text.slice($t.length),Wt.text),Ie==Pn||Ie>150)){if(!ht)return;dt="prev"}dt=="prev"?at>gt.first?Ie=ne(jn(gt,at-1).text,null,Bt):Ie=0:dt=="add"?Ie=Kt+it.options.indentUnit:dt=="subtract"?Ie=Kt-it.options.indentUnit:typeof dt=="number"&&(Ie=Kt+dt),Ie=Math.max(0,Ie);var he="",cn=0;if(it.options.indentWithTabs)for(var nn=Math.floor(Ie/Bt);nn;--nn)cn+=Bt,he+=" ";if(cn<Ie&&(he+=an(Ie-cn)),he!=$t)return Xh(gt,he,De(at,0),De(at,$t.length),"+input"),Wt.stateAfter=null,!0;for(var fi=0;fi<gt.sel.ranges.length;fi++){var wi=gt.sel.ranges[fi];if(wi.head.line==at&&wi.head.ch<$t.length){var Ti=De(at,$t.length);fh(gt,fi,new Ho(Ti,Ti));break}}}var Zs=null;function nd(it){Zs=it}function kc(it,at,dt,ht,gt){var Ct=it.doc;it.display.shift=!1,ht||(ht=Ct.sel);var Bt=+new Date-200,Wt=gt=="paste"||it.state.pasteIncoming>Bt,Kt=Zi(at),$t=null;if(Wt&&ht.ranges.length>1)if(Zs&&Zs.text.join(`
|
|
`)==at){if(ht.ranges.length%Zs.text.length==0){$t=[];for(var Ie=0;Ie<Zs.text.length;Ie++)$t.push(Ct.splitLines(Zs.text[Ie]))}}else Kt.length==ht.ranges.length&&it.options.pasteLinesPerSelection&&($t=hn(Kt,function(tr){return[tr]}));for(var he=it.curOp.updateInput,cn=ht.ranges.length-1;cn>=0;cn--){var nn=ht.ranges[cn],fi=nn.from(),wi=nn.to();nn.empty()&&(dt&&dt>0?fi=De(fi.line,fi.ch-dt):it.state.overwrite&&!Wt?wi=De(wi.line,Math.min(jn(Ct,wi.line).text.length,wi.ch+re(Kt).length)):Wt&&Zs&&Zs.lineWise&&Zs.text.join(`
|
|
`)==Kt.join(`
|
|
`)&&(fi=wi=De(fi.line,0)));var Ti={from:fi,to:wi,text:$t?$t[cn%$t.length]:Kt,origin:gt||(Wt?"paste":it.state.cutIncoming>Bt?"cut":"+input")};gh(it.doc,Ti),Ji(it,"inputRead",it,Ti)}at&&!Wt&&Og(it,at),Vl(it),it.curOp.updateInput<2&&(it.curOp.updateInput=he),it.curOp.typing=!0,it.state.pasteIncoming=it.state.cutIncoming=-1}function Tg(it,at){var dt=it.clipboardData&&it.clipboardData.getData("Text");if(dt)return it.preventDefault(),!at.isReadOnly()&&!at.options.disableInput&&Ao(at,function(){return kc(at,dt,0,null,"paste")}),!0}function Og(it,at){if(!(!it.options.electricChars||!it.options.smartIndent))for(var dt=it.doc.sel,ht=dt.ranges.length-1;ht>=0;ht--){var gt=dt.ranges[ht];if(!(gt.head.ch>100||ht&&dt.ranges[ht-1].head.line==gt.head.line)){var Ct=it.getModeAt(gt.head),Bt=!1;if(Ct.electricChars){for(var Wt=0;Wt<Ct.electricChars.length;Wt++)if(at.indexOf(Ct.electricChars.charAt(Wt))>-1){Bt=Va(it,gt.head.line,"smart");break}}else Ct.electricInput&&Ct.electricInput.test(jn(it.doc,gt.head.line).text.slice(0,gt.head.ch))&&(Bt=Va(it,gt.head.line,"smart"));Bt&&Ji(it,"electricInput",it,gt.head.line)}}}function Ig(it){for(var at=[],dt=[],ht=0;ht<it.doc.sel.ranges.length;ht++){var gt=it.doc.sel.ranges[ht].head.line,Ct={anchor:De(gt,0),head:De(gt+1,0)};dt.push(Ct),at.push(it.getRange(Ct.anchor,Ct.head))}return{text:at,ranges:dt}}function Rg(it,at,dt,ht){it.setAttribute("autocorrect",dt?"":"off"),it.setAttribute("autocapitalize",ht?"":"off"),it.setAttribute("spellcheck",!!at)}function jg(){var it=Xt("textarea",null,null,"position: absolute; bottom: -1em; padding: 0; width: 1px; height: 1em; outline: none"),at=Xt("div",[it],null,"overflow: hidden; position: relative; width: 3px; height: 0px;");return ie?it.style.width="1000px":it.setAttribute("wrap","off"),Nt&&(it.style.border="1px solid black"),Rg(it),at}function vh(it){var at=it.optionHandlers,dt=it.helpers={};it.prototype={constructor:it,focus:function(){window.focus(),this.display.input.focus()},setOption:function(ht,gt){var Ct=this.options,Bt=Ct[ht];Ct[ht]==gt&&ht!="mode"||(Ct[ht]=gt,at.hasOwnProperty(ht)&&Wa(this,at[ht])(this,gt,Bt),Ne(this,"optionChange",this,ht))},getOption:function(ht){return this.options[ht]},getDoc:function(){return this.doc},addKeyMap:function(ht,gt){this.state.keyMaps[gt?"push":"unshift"](Qh(ht))},removeKeyMap:function(ht){for(var gt=this.state.keyMaps,Ct=0;Ct<gt.length;++Ct)if(gt[Ct]==ht||gt[Ct].name==ht)return gt.splice(Ct,1),!0},addOverlay:_a(function(ht,gt){var Ct=ht.token?ht:it.getMode(this.options,ht);if(Ct.startState)throw new Error("Overlays may not be stateful.");di(this.state.overlays,{mode:Ct,modeSpec:ht,opaque:gt&>.opaque,priority:gt&>.priority||0},function(Bt){return Bt.priority}),this.state.modeGen++,zo(this)}),removeOverlay:_a(function(ht){for(var gt=this.state.overlays,Ct=0;Ct<gt.length;++Ct){var Bt=gt[Ct].modeSpec;if(Bt==ht||typeof ht=="string"&&Bt.name==ht){gt.splice(Ct,1),this.state.modeGen++,zo(this);return}}}),indentLine:_a(function(ht,gt,Ct){typeof gt!="string"&&typeof gt!="number"&&(gt==null?gt=this.options.smartIndent?"smart":"prev":gt=gt?"add":"subtract"),Mn(this.doc,ht)&&Va(this,ht,gt,Ct)}),indentSelection:_a(function(ht){for(var gt=this.doc.sel.ranges,Ct=-1,Bt=0;Bt<gt.length;Bt++){var Wt=gt[Bt];if(Wt.empty())Wt.head.line>Ct&&(Va(this,Wt.head.line,ht,!0),Ct=Wt.head.line,Bt==this.doc.sel.primIndex&&Vl(this));else{var Kt=Wt.from(),$t=Wt.to(),Ie=Math.max(Ct,Kt.line);Ct=Math.min(this.lastLine(),$t.line-($t.ch?0:1))+1;for(var he=Ie;he<Ct;++he)Va(this,he,ht);var cn=this.doc.sel.ranges;Kt.ch==0&>.length==cn.length&&cn[Bt].from().ch>0&&fh(this.doc,Bt,new Ho(Kt,cn[Bt].to()),ke)}}}),getTokenAt:function(ht,gt){return Fi(this,ht,gt)},getLineTokens:function(ht,gt){return Fi(this,De(ht),gt,!0)},getTokenTypeAt:function(ht){ht=Yn(this.doc,ht);var gt=dr(this,jn(this.doc,ht.line)),Ct=0,Bt=(gt.length-1)/2,Wt=ht.ch,Kt;if(Wt==0)Kt=gt[2];else for(;;){var $t=Ct+Bt>>1;if(($t?gt[$t*2-1]:0)>=Wt)Bt=$t;else if(gt[$t*2+1]<Wt)Ct=$t+1;else{Kt=gt[$t*2+2];break}}var Ie=Kt?Kt.indexOf("overlay "):-1;return Ie<0?Kt:Ie==0?null:Kt.slice(0,Ie-1)},getModeAt:function(ht){var gt=this.doc.mode;return gt.innerMode?it.innerMode(gt,this.getTokenAt(ht).state).mode:gt},getHelper:function(ht,gt){return this.getHelpers(ht,gt)[0]},getHelpers:function(ht,gt){var Ct=[];if(!dt.hasOwnProperty(gt))return Ct;var Bt=dt[gt],Wt=this.getModeAt(ht);if(typeof Wt[gt]=="string")Bt[Wt[gt]]&&Ct.push(Bt[Wt[gt]]);else if(Wt[gt])for(var Kt=0;Kt<Wt[gt].length;Kt++){var $t=Bt[Wt[gt][Kt]];$t&&Ct.push($t)}else Wt.helperType&&Bt[Wt.helperType]?Ct.push(Bt[Wt.helperType]):Bt[Wt.name]&&Ct.push(Bt[Wt.name]);for(var Ie=0;Ie<Bt._global.length;Ie++){var he=Bt._global[Ie];he.pred(Wt,this)&&Fe(Ct,he.val)==-1&&Ct.push(he.val)}return Ct},getStateAfter:function(ht,gt){var Ct=this.doc;return ht=Qn(Ct,ht==null?Ct.first+Ct.size-1:ht),br(this,ht+1,gt).state},cursorCoords:function(ht,gt){var Ct,Bt=this.doc.sel.primary();return ht==null?Ct=Bt.head:typeof ht=="object"?Ct=Yn(this.doc,ht):Ct=ht?Bt.from():Bt.to(),yo(this,Ct,gt||"page")},charCoords:function(ht,gt){return Oa(this,Yn(this.doc,ht),gt||"page")},coordsChar:function(ht,gt){return ht=_s(this,ht,gt||"page"),Oo(this,ht.left,ht.top)},lineAtHeight:function(ht,gt){return ht=_s(this,{top:ht,left:0},gt||"page").top,fe(this.doc,ht+this.display.viewOffset)},heightAtLine:function(ht,gt,Ct){var Bt=!1,Wt;if(typeof ht=="number"){var Kt=this.doc.first+this.doc.size-1;ht<this.doc.first?ht=this.doc.first:ht>Kt&&(ht=Kt,Bt=!0),Wt=jn(this.doc,ht)}else Wt=ht;return Sa(this,Wt,{top:0,left:0},gt||"page",Ct||Bt).top+(Bt?this.doc.height-Ci(Wt):0)},defaultTextHeight:function(){return Ea(this.display)},defaultCharWidth:function(){return ws(this.display)},getViewport:function(){return{from:this.display.viewFrom,to:this.display.viewTo}},addWidget:function(ht,gt,Ct,Bt,Wt){var Kt=this.display;ht=yo(this,Yn(this.doc,ht));var $t=ht.bottom,Ie=ht.left;if(gt.style.position="absolute",gt.setAttribute("cm-ignore-events","true"),this.display.input.setUneditable(gt),Kt.sizer.appendChild(gt),Bt=="over")$t=ht.top;else if(Bt=="above"||Bt=="near"){var he=Math.max(Kt.wrapper.clientHeight,this.doc.height),cn=Math.max(Kt.sizer.clientWidth,Kt.lineSpace.clientWidth);(Bt=="above"||ht.bottom+gt.offsetHeight>he)&&ht.top>gt.offsetHeight?$t=ht.top-gt.offsetHeight:ht.bottom+gt.offsetHeight<=he&&($t=ht.bottom),Ie+gt.offsetWidth>cn&&(Ie=cn-gt.offsetWidth)}gt.style.top=$t+"px",gt.style.left=gt.style.right="",Wt=="right"?(Ie=Kt.sizer.clientWidth-gt.offsetWidth,gt.style.right="0px"):(Wt=="left"?Ie=0:Wt=="middle"&&(Ie=(Kt.sizer.clientWidth-gt.offsetWidth)/2),gt.style.left=Ie+"px"),Ct&&oh(this,{left:Ie,top:$t,right:Ie+gt.offsetWidth,bottom:$t+gt.offsetHeight})},triggerOnKeyDown:_a(kg),triggerOnKeyPress:_a(cu),triggerOnKeyUp:bg,triggerOnMouseDown:_a(fu),execCommand:function(ht){if(ph.hasOwnProperty(ht))return ph[ht].call(null,this)},triggerElectric:_a(function(ht){Og(this,ht)}),findPosH:function(ht,gt,Ct,Bt){var Wt=1;gt<0&&(Wt=-1,gt=-gt);for(var Kt=Yn(this.doc,ht),$t=0;$t<gt&&(Kt=Lc(this.doc,Kt,Wt,Ct,Bt),!Kt.hitSide);++$t);return Kt},moveH:_a(function(ht,gt){var Ct=this;this.extendSelectionsBy(function(Bt){return Ct.display.shift||Ct.doc.extend||Bt.empty()?Lc(Ct.doc,Bt.head,ht,gt,Ct.options.rtlMoveVisually):ht<0?Bt.from():Bt.to()},fn)}),deleteH:_a(function(ht,gt){var Ct=this.doc.sel,Bt=this.doc;Ct.somethingSelected()?Bt.replaceSelection("",null,"+delete"):el(this,function(Wt){var Kt=Lc(Bt,Wt.head,ht,gt,!1);return ht<0?{from:Kt,to:Wt.head}:{from:Wt.head,to:Kt}})}),findPosV:function(ht,gt,Ct,Bt){var Wt=1,Kt=Bt;gt<0&&(Wt=-1,gt=-gt);for(var $t=Yn(this.doc,ht),Ie=0;Ie<gt;++Ie){var he=yo(this,$t,"div");if(Kt==null?Kt=he.left:he.left=Kt,$t=yh(this,he,Wt,Ct),$t.hitSide)break}return $t},moveV:_a(function(ht,gt){var Ct=this,Bt=this.doc,Wt=[],Kt=!this.display.shift&&!Bt.extend&&Bt.sel.somethingSelected();if(Bt.extendSelectionsBy(function(Ie){if(Kt)return ht<0?Ie.from():Ie.to();var he=yo(Ct,Ie.head,"div");Ie.goalColumn!=null&&(he.left=Ie.goalColumn),Wt.push(he.left);var cn=yh(Ct,he,ht,gt);return gt=="page"&&Ie==Bt.sel.primary()&&Gh(Ct,Oa(Ct,cn,"div").top-he.top),cn},fn),Wt.length)for(var $t=0;$t<Bt.sel.ranges.length;$t++)Bt.sel.ranges[$t].goalColumn=Wt[$t]}),findWordAt:function(ht){var gt=this.doc,Ct=jn(gt,ht.line).text,Bt=ht.ch,Wt=ht.ch;if(Ct){var Kt=this.getHelper(ht,"wordChars");(ht.sticky=="before"||Wt==Ct.length)&&Bt?--Bt:++Wt;for(var $t=Ct.charAt(Bt),Ie=zt($t,Kt)?function(he){return zt(he,Kt)}:/\s/.test($t)?function(he){return/\s/.test(he)}:function(he){return!/\s/.test(he)&&!zt(he)};Bt>0&&Ie(Ct.charAt(Bt-1));)--Bt;for(;Wt<Ct.length&&Ie(Ct.charAt(Wt));)++Wt}return new Ho(De(ht.line,Bt),De(ht.line,Wt))},toggleOverwrite:function(ht){ht!=null&&ht==this.state.overwrite||((this.state.overwrite=!this.state.overwrite)?en(this.display.cursorDiv,"CodeMirror-overwrite"):Ht(this.display.cursorDiv,"CodeMirror-overwrite"),Ne(this,"overwriteToggle",this,this.state.overwrite))},hasFocus:function(){return this.display.input.getField()==Ye()},isReadOnly:function(){return!!(this.options.readOnly||this.doc.cantEdit)},scrollTo:_a(function(ht,gt){Hu(this,ht,gt)}),getScrollInfo:function(){var ht=this.display.scroller;return{left:ht.scrollLeft,top:ht.scrollTop,height:ht.scrollHeight-ko(this)-this.display.barHeight,width:ht.scrollWidth-ko(this)-this.display.barWidth,clientHeight:Ba(this),clientWidth:Ha(this)}},scrollIntoView:_a(function(ht,gt){ht==null?(ht={from:this.doc.sel.primary().head,to:null},gt==null&&(gt=this.options.cursorScrollMargin)):typeof ht=="number"?ht={from:De(ht,0),to:null}:ht.from==null&&(ht={from:ht,to:null}),ht.to||(ht.to=ht.from),ht.margin=gt||0,ht.from.line!=null?vo(this,ht):Hh(this,ht.from,ht.to,ht.margin)}),setSize:_a(function(ht,gt){var Ct=this,Bt=function(Kt){return typeof Kt=="number"||/^\d+$/.test(String(Kt))?Kt+"px":Kt};ht!=null&&(this.display.wrapper.style.width=Bt(ht)),gt!=null&&(this.display.wrapper.style.height=Bt(gt)),this.options.lineWrapping&&bl(this);var Wt=this.display.viewFrom;this.doc.iter(Wt,this.display.viewTo,function(Kt){if(Kt.widgets){for(var $t=0;$t<Kt.widgets.length;$t++)if(Kt.widgets[$t].noHScroll){ri(Ct,Wt,"widget");break}}++Wt}),this.curOp.forceUpdate=!0,Ne(this,"refresh",this)}),operation:function(ht){return Ao(this,ht)},startOperation:function(){return fl(this)},endOperation:function(){return Ul(this)},refresh:_a(function(){var ht=this.display.cachedTextHeight;zo(this),this.curOp.forceUpdate=!0,Ml(this),Hu(this,this.doc.scrollLeft,this.doc.scrollTop),lh(this.display),(ht==null||Math.abs(ht-Ea(this.display))>.5||this.options.lineWrapping)&&Or(this),Ne(this,"refresh",this)}),swapDoc:_a(function(ht){var gt=this.doc;return gt.cm=null,this.state.selectingText&&this.state.selectingText(),ef(this,ht),Ml(this),this.display.input.reset(),Hu(this,ht.scrollLeft,ht.scrollTop),this.curOp.forceScroll=!0,Ji(this,"swapDoc",this,gt),gt}),phrase:function(ht){var gt=this.options.phrases;return gt&&Object.prototype.hasOwnProperty.call(gt,ht)?gt[ht]:ht},getInputField:function(){return this.display.input.getField()},getWrapperElement:function(){return this.display.wrapper},getScrollerElement:function(){return this.display.scroller},getGutterElement:function(){return this.display.gutters}},An(it),it.registerHelper=function(ht,gt,Ct){dt.hasOwnProperty(ht)||(dt[ht]=it[ht]={_global:[]}),dt[ht][gt]=Ct},it.registerGlobalHelper=function(ht,gt,Ct,Bt){it.registerHelper(ht,gt,Bt),dt[ht]._global.push({pred:Ct,val:Bt})}}function Lc(it,at,dt,ht,gt){var Ct=at,Bt=dt,Wt=jn(it,at.line),Kt=gt&&it.direction=="rtl"?-dt:dt;function $t(){var Er=at.line+Kt;return Er<it.first||Er>=it.first+it.size?!1:(at=new De(Er,at.ch,at.sticky),Wt=jn(it,Er))}function Ie(Er){var gr;if(ht=="codepoint"){var Dr=Wt.text.charCodeAt(at.ch+(ht>0?0:-1));isNaN(Dr)?gr=null:gr=new De(at.line,Math.max(0,Math.min(Wt.text.length,at.ch+dt*(Dr>=55296&&Dr<56320?2:1))),-dt)}else gt?gr=hf(it.cm,Wt,at,dt):gr=Na(Wt,at,dt);if(gr==null)if(!Er&&$t())at=Cc(gt,it.cm,Wt,at.line,Kt);else return!1;else at=gr;return!0}if(ht=="char"||ht=="codepoint")Ie();else if(ht=="column")Ie(!0);else if(ht=="word"||ht=="group")for(var he=null,cn=ht=="group",nn=it.cm&&it.cm.getHelper(at,"wordChars"),fi=!0;!(dt<0&&!Ie(!fi));fi=!1){var wi=Wt.text.charAt(at.ch)||`
|
|
`,Ti=zt(wi,nn)?"w":cn&&wi==`
|
|
`?"n":!cn||/\s/.test(wi)?null:"p";if(cn&&!fi&&!Ti&&(Ti="s"),he&&he!=Ti){dt<0&&(dt=1,Ie(),at.sticky="after");break}if(Ti&&(he=Ti),dt>0&&!Ie(!fi))break}var tr=vc(it,at,Ct,Bt,!0);return Sn(Ct,tr)&&(tr.hitSide=!0),tr}function yh(it,at,dt,ht){var gt=it.doc,Ct=at.left,Bt;if(ht=="page"){var Wt=Math.min(it.display.wrapper.clientHeight,window.innerHeight||document.documentElement.clientHeight),Kt=Math.max(Wt-.5*Ea(it.display),3);Bt=(dt>0?at.bottom:at.top)+dt*Kt}else ht=="line"&&(Bt=dt>0?at.bottom+3:at.top-3);for(var $t;$t=Oo(it,Ct,Bt),!!$t.outside;){if(dt<0?Bt<=0:Bt>=gt.height){$t.hitSide=!0;break}Bt+=dt*5}return $t}var Yo=function(it){this.cm=it,this.lastAnchorNode=this.lastAnchorOffset=this.lastFocusNode=this.lastFocusOffset=null,this.polling=new jt,this.composing=null,this.gracePeriod=!1,this.readDOMTimeout=null};Yo.prototype.init=function(it){var at=this,dt=this,ht=dt.cm,gt=dt.div=it.lineDiv;Rg(gt,ht.options.spellcheck,ht.options.autocorrect,ht.options.autocapitalize);function Ct(Wt){for(var Kt=Wt.target;Kt;Kt=Kt.parentNode){if(Kt==gt)return!0;if(/\bCodeMirror-(?:line)?widget\b/.test(Kt.className))break}return!1}He(gt,"paste",function(Wt){!Ct(Wt)||Ze(ht,Wt)||Tg(Wt,ht)||Rt<=11&&setTimeout(Wa(ht,function(){return at.updateFromDOM()}),20)}),He(gt,"compositionstart",function(Wt){at.composing={data:Wt.data,done:!1}}),He(gt,"compositionupdate",function(Wt){at.composing||(at.composing={data:Wt.data,done:!1})}),He(gt,"compositionend",function(Wt){at.composing&&(Wt.data!=at.composing.data&&at.readFromDOMSoon(),at.composing.done=!0)}),He(gt,"touchstart",function(){return dt.forceCompositionEnd()}),He(gt,"input",function(){at.composing||at.readFromDOMSoon()});function Bt(Wt){if(!(!Ct(Wt)||Ze(ht,Wt))){if(ht.somethingSelected())nd({lineWise:!1,text:ht.getSelections()}),Wt.type=="cut"&&ht.replaceSelection("",null,"cut");else if(ht.options.lineWiseCopyCut){var Kt=Ig(ht);nd({lineWise:!0,text:Kt.text}),Wt.type=="cut"&&ht.operation(function(){ht.setSelections(Kt.ranges,0,ke),ht.replaceSelection("",null,"cut")})}else return;if(Wt.clipboardData){Wt.clipboardData.clearData();var $t=Zs.text.join(`
|
|
`);if(Wt.clipboardData.setData("Text",$t),Wt.clipboardData.getData("Text")==$t){Wt.preventDefault();return}}var Ie=jg(),he=Ie.firstChild;ht.display.lineSpace.insertBefore(Ie,ht.display.lineSpace.firstChild),he.value=Zs.text.join(`
|
|
`);var cn=document.activeElement;wn(he),setTimeout(function(){ht.display.lineSpace.removeChild(Ie),cn.focus(),cn==gt&&dt.showPrimarySelection()},50)}}He(gt,"copy",Bt),He(gt,"cut",Bt)},Yo.prototype.screenReaderLabelChanged=function(it){it?this.div.setAttribute("aria-label",it):this.div.removeAttribute("aria-label")},Yo.prototype.prepareSelection=function(){var it=Qs(this.cm,!1);return it.focus=document.activeElement==this.div,it},Yo.prototype.showSelection=function(it,at){!it||!this.cm.display.view.length||((it.focus||at)&&this.showPrimarySelection(),this.showMultipleSelections(it))},Yo.prototype.getSelection=function(){return this.cm.display.wrapper.ownerDocument.getSelection()},Yo.prototype.showPrimarySelection=function(){var it=this.getSelection(),at=this.cm,dt=at.doc.sel.primary(),ht=dt.from(),gt=dt.to();if(at.display.viewTo==at.display.viewFrom||ht.line>=at.display.viewTo||gt.line<at.display.viewFrom){it.removeAllRanges();return}var Ct=bc(at,it.anchorNode,it.anchorOffset),Bt=bc(at,it.focusNode,it.focusOffset);if(!(Ct&&!Ct.bad&&Bt&&!Bt.bad&&kn(On(Ct,Bt),ht)==0&&kn(ei(Ct,Bt),gt)==0)){var Wt=at.display.view,Kt=ht.line>=at.display.viewFrom&&xf(at,ht)||{node:Wt[0].measure.map[2],offset:0},$t=gt.line<at.display.viewTo&&xf(at,gt);if(!$t){var Ie=Wt[Wt.length-1].measure,he=Ie.maps?Ie.maps[Ie.maps.length-1]:Ie.map;$t={node:he[he.length-1],offset:he[he.length-2]-he[he.length-3]}}if(!Kt||!$t){it.removeAllRanges();return}var cn=it.rangeCount&&it.getRangeAt(0),nn;try{nn=oe(Kt.node,Kt.offset,$t.offset,$t.node)}catch(fi){}nn&&(!Ft&&at.state.focused?(it.collapse(Kt.node,Kt.offset),nn.collapsed||(it.removeAllRanges(),it.addRange(nn))):(it.removeAllRanges(),it.addRange(nn)),cn&&it.anchorNode==null?it.addRange(cn):Ft&&this.startGracePeriod()),this.rememberSelection()}},Yo.prototype.startGracePeriod=function(){var it=this;clearTimeout(this.gracePeriod),this.gracePeriod=setTimeout(function(){it.gracePeriod=!1,it.selectionChanged()&&it.cm.operation(function(){return it.cm.curOp.selectionChanged=!0})},20)},Yo.prototype.showMultipleSelections=function(it){_t(this.cm.display.cursorDiv,it.cursors),_t(this.cm.display.selectionDiv,it.selection)},Yo.prototype.rememberSelection=function(){var it=this.getSelection();this.lastAnchorNode=it.anchorNode,this.lastAnchorOffset=it.anchorOffset,this.lastFocusNode=it.focusNode,this.lastFocusOffset=it.focusOffset},Yo.prototype.selectionInEditor=function(){var it=this.getSelection();if(!it.rangeCount)return!1;var at=it.getRangeAt(0).commonAncestorContainer;return Re(this.div,at)},Yo.prototype.focus=function(){this.cm.options.readOnly!="nocursor"&&((!this.selectionInEditor()||document.activeElement!=this.div)&&this.showSelection(this.prepareSelection(),!0),this.div.focus())},Yo.prototype.blur=function(){this.div.blur()},Yo.prototype.getField=function(){return this.div},Yo.prototype.supportsTouch=function(){return!0},Yo.prototype.receivedFocus=function(){var it=this;this.selectionInEditor()?this.pollSelection():Ao(this.cm,function(){return it.cm.curOp.selectionChanged=!0});function at(){it.cm.state.focused&&(it.pollSelection(),it.polling.set(it.cm.options.pollInterval,at))}this.polling.set(this.cm.options.pollInterval,at)},Yo.prototype.selectionChanged=function(){var it=this.getSelection();return it.anchorNode!=this.lastAnchorNode||it.anchorOffset!=this.lastAnchorOffset||it.focusNode!=this.lastFocusNode||it.focusOffset!=this.lastFocusOffset},Yo.prototype.pollSelection=function(){if(!(this.readDOMTimeout!=null||this.gracePeriod||!this.selectionChanged())){var it=this.getSelection(),at=this.cm;if(nt&&ce&&this.cm.display.gutterSpecs.length&&zg(it.anchorNode)){this.cm.triggerOnKeyDown({type:"keydown",keyCode:8,preventDefault:Math.abs}),this.blur(),this.focus();return}if(!this.composing){this.rememberSelection();var dt=bc(at,it.anchorNode,it.anchorOffset),ht=bc(at,it.focusNode,it.focusOffset);dt&&ht&&Ao(at,function(){Cs(at.doc,Ku(dt,ht),ke),(dt.bad||ht.bad)&&(at.curOp.selectionChanged=!0)})}}},Yo.prototype.pollContent=function(){this.readDOMTimeout!=null&&(clearTimeout(this.readDOMTimeout),this.readDOMTimeout=null);var it=this.cm,at=it.display,dt=it.doc.sel.primary(),ht=dt.from(),gt=dt.to();if(ht.ch==0&&ht.line>it.firstLine()&&(ht=De(ht.line-1,jn(it.doc,ht.line-1).length)),gt.ch==jn(it.doc,gt.line).text.length&>.line<it.lastLine()&&(gt=De(gt.line+1,0)),ht.line<at.viewFrom||gt.line>at.viewTo-1)return!1;var Ct,Bt,Wt;ht.line==at.viewFrom||(Ct=Ps(it,ht.line))==0?(Bt=Gt(at.view[0].line),Wt=at.view[0].node):(Bt=Gt(at.view[Ct].line),Wt=at.view[Ct-1].node.nextSibling);var Kt=Ps(it,gt.line),$t,Ie;if(Kt==at.view.length-1?($t=at.viewTo-1,Ie=at.lineDiv.lastChild):($t=Gt(at.view[Kt+1].line)-1,Ie=at.view[Kt+1].node.previousSibling),!Wt)return!1;for(var he=it.doc.splitLines(Kd(it,Wt,Ie,Bt,$t)),cn=ii(it.doc,De(Bt,0),De($t,jn(it.doc,$t).text.length));he.length>1&&cn.length>1;)if(re(he)==re(cn))he.pop(),cn.pop(),$t--;else if(he[0]==cn[0])he.shift(),cn.shift(),Bt++;else break;for(var nn=0,fi=0,wi=he[0],Ti=cn[0],tr=Math.min(wi.length,Ti.length);nn<tr&&wi.charCodeAt(nn)==Ti.charCodeAt(nn);)++nn;for(var Er=re(he),gr=re(cn),Dr=Math.min(Er.length-(he.length==1?nn:0),gr.length-(cn.length==1?nn:0));fi<Dr&&Er.charCodeAt(Er.length-fi-1)==gr.charCodeAt(gr.length-fi-1);)++fi;if(he.length==1&&cn.length==1&&Bt==ht.line)for(;nn&&nn>ht.ch&&Er.charCodeAt(Er.length-fi-1)==gr.charCodeAt(gr.length-fi-1);)nn--,fi++;he[he.length-1]=Er.slice(0,Er.length-fi).replace(/^\u200b+/,""),he[0]=he[0].slice(nn).replace(/\u200b+$/,"");var Xr=De(Bt,nn),cr=De($t,cn.length?re(cn).length-fi:0);if(he.length>1||he[0]||kn(Xr,cr))return Xh(it.doc,he,Xr,cr,"+input"),!0},Yo.prototype.ensurePolled=function(){this.forceCompositionEnd()},Yo.prototype.reset=function(){this.forceCompositionEnd()},Yo.prototype.forceCompositionEnd=function(){this.composing&&(clearTimeout(this.readDOMTimeout),this.composing=null,this.updateFromDOM(),this.div.blur(),this.div.focus())},Yo.prototype.readFromDOMSoon=function(){var it=this;this.readDOMTimeout==null&&(this.readDOMTimeout=setTimeout(function(){if(it.readDOMTimeout=null,it.composing)if(it.composing.done)it.composing=null;else return;it.updateFromDOM()},80))},Yo.prototype.updateFromDOM=function(){var it=this;(this.cm.isReadOnly()||!this.pollContent())&&Ao(this.cm,function(){return zo(it.cm)})},Yo.prototype.setUneditable=function(it){it.contentEditable="false"},Yo.prototype.onKeyPress=function(it){it.charCode==0||this.composing||(it.preventDefault(),this.cm.isReadOnly()||Wa(this.cm,kc)(this.cm,String.fromCharCode(it.charCode==null?it.keyCode:it.charCode),0))},Yo.prototype.readOnlyChanged=function(it){this.div.contentEditable=String(it!="nocursor")},Yo.prototype.onContextMenu=function(){},Yo.prototype.resetPosition=function(){},Yo.prototype.needsContentAttribute=!0;function xf(it,at){var dt=As(it,at.line);if(!dt||dt.hidden)return null;var ht=jn(it.doc,at.line),gt=ea(dt,ht,at.line),Ct=ze(ht,it.doc.direction),Bt="left";if(Ct){var Wt=pe(Ct,at.ch);Bt=Wt%2?"right":"left"}var Kt=ou(gt.map,at.ch,Bt);return Kt.offset=Kt.collapse=="right"?Kt.end:Kt.start,Kt}function zg(it){for(var at=it;at;at=at.parentNode)if(/CodeMirror-gutter-wrapper/.test(at.className))return!0;return!1}function Hd(it,at){return at&&(it.bad=!0),it}function Kd(it,at,dt,ht,gt){var Ct="",Bt=!1,Wt=it.doc.lineSeparator(),Kt=!1;function $t(nn){return function(fi){return fi.id==nn}}function Ie(){Bt&&(Ct+=Wt,Kt&&(Ct+=Wt),Bt=Kt=!1)}function he(nn){nn&&(Ie(),Ct+=nn)}function cn(nn){if(nn.nodeType==1){var fi=nn.getAttribute("cm-text");if(fi){he(fi);return}var wi=nn.getAttribute("cm-marker"),Ti;if(wi){var tr=it.findMarks(De(ht,0),De(gt+1,0),$t(+wi));tr.length&&(Ti=tr[0].find(0))&&he(ii(it.doc,Ti.from,Ti.to).join(Wt));return}if(nn.getAttribute("contenteditable")=="false")return;var Er=/^(pre|div|p|li|table|br)$/i.test(nn.nodeName);if(!/^br$/i.test(nn.nodeName)&&nn.textContent.length==0)return;Er&&Ie();for(var gr=0;gr<nn.childNodes.length;gr++)cn(nn.childNodes[gr]);/^(pre|p)$/i.test(nn.nodeName)&&(Kt=!0),Er&&(Bt=!0)}else nn.nodeType==3&&he(nn.nodeValue.replace(/\u200b/g,"").replace(/\u00a0/g," "))}for(;cn(at),at!=dt;)at=at.nextSibling,Kt=!1;return Ct}function bc(it,at,dt){var ht;if(at==it.display.lineDiv){if(ht=it.display.lineDiv.childNodes[dt],!ht)return Hd(it.clipPos(De(it.display.viewTo-1)),!0);at=null,dt=0}else for(ht=at;;ht=ht.parentNode){if(!ht||ht==it.display.lineDiv)return null;if(ht.parentNode&&ht.parentNode==it.display.lineDiv)break}for(var gt=0;gt<it.display.view.length;gt++){var Ct=it.display.view[gt];if(Ct.node==ht)return om(Ct,at,dt)}}function om(it,at,dt){var ht=it.text.firstChild,gt=!1;if(!at||!Re(ht,at))return Hd(De(Gt(it.line),0),!0);if(at==ht&&(gt=!0,at=ht.childNodes[dt],dt=0,!at)){var Ct=it.rest?re(it.rest):it.line;return Hd(De(Gt(Ct),Ct.text.length),gt)}var Bt=at.nodeType==3?at:null,Wt=at;for(!Bt&&at.childNodes.length==1&&at.firstChild.nodeType==3&&(Bt=at.firstChild,dt&&(dt=Bt.nodeValue.length));Wt.parentNode!=ht;)Wt=Wt.parentNode;var Kt=it.measure,$t=Kt.maps;function Ie(Ti,tr,Er){for(var gr=-1;gr<($t?$t.length:0);gr++)for(var Dr=gr<0?Kt.map:$t[gr],Xr=0;Xr<Dr.length;Xr+=3){var cr=Dr[Xr+2];if(cr==Ti||cr==tr){var co=Gt(gr<0?it.line:it.rest[gr]),oa=Dr[Xr]+Er;return(Er<0||cr!=Ti)&&(oa=Dr[Xr+(Er?1:0)]),De(co,oa)}}}var he=Ie(Bt,Wt,dt);if(he)return Hd(he,gt);for(var cn=Wt.nextSibling,nn=Bt?Bt.nodeValue.length-dt:0;cn;cn=cn.nextSibling){if(he=Ie(cn,cn.firstChild,0),he)return Hd(De(he.line,he.ch-nn),gt);nn+=cn.textContent.length}for(var fi=Wt.previousSibling,wi=dt;fi;fi=fi.previousSibling){if(he=Ie(fi,fi.firstChild,-1),he)return Hd(De(he.line,he.ch+wi),gt);wi+=fi.textContent.length}}var Ra=function(it){this.cm=it,this.prevInput="",this.pollingFast=!1,this.polling=new jt,this.hasSelection=!1,this.composing=null};Ra.prototype.init=function(it){var at=this,dt=this,ht=this.cm;this.createField(it);var gt=this.textarea;it.wrapper.insertBefore(this.wrapper,it.wrapper.firstChild),Nt&&(gt.style.width="0px"),He(gt,"input",function(){Se&&Rt>=9&&at.hasSelection&&(at.hasSelection=null),dt.poll()}),He(gt,"paste",function(Bt){Ze(ht,Bt)||Tg(Bt,ht)||(ht.state.pasteIncoming=+new Date,dt.fastPoll())});function Ct(Bt){if(!Ze(ht,Bt)){if(ht.somethingSelected())nd({lineWise:!1,text:ht.getSelections()});else if(ht.options.lineWiseCopyCut){var Wt=Ig(ht);nd({lineWise:!0,text:Wt.text}),Bt.type=="cut"?ht.setSelections(Wt.ranges,null,ke):(dt.prevInput="",gt.value=Wt.text.join(`
|
|
`),wn(gt))}else return;Bt.type=="cut"&&(ht.state.cutIncoming=+new Date)}}He(gt,"cut",Ct),He(gt,"copy",Ct),He(it.scroller,"paste",function(Bt){if(!(bo(it,Bt)||Ze(ht,Bt))){if(!gt.dispatchEvent){ht.state.pasteIncoming=+new Date,dt.focus();return}var Wt=new Event("paste");Wt.clipboardData=Bt.clipboardData,gt.dispatchEvent(Wt)}}),He(it.lineSpace,"selectstart",function(Bt){bo(it,Bt)||Kn(Bt)}),He(gt,"compositionstart",function(){var Bt=ht.getCursor("from");dt.composing&&dt.composing.range.clear(),dt.composing={start:Bt,range:ht.markText(Bt,ht.getCursor("to"),{className:"CodeMirror-composing"})}}),He(gt,"compositionend",function(){dt.composing&&(dt.poll(),dt.composing.range.clear(),dt.composing=null)})},Ra.prototype.createField=function(it){this.wrapper=jg(),this.textarea=this.wrapper.firstChild},Ra.prototype.screenReaderLabelChanged=function(it){it?this.textarea.setAttribute("aria-label",it):this.textarea.removeAttribute("aria-label")},Ra.prototype.prepareSelection=function(){var it=this.cm,at=it.display,dt=it.doc,ht=Qs(it);if(it.options.moveInputWithCursor){var gt=yo(it,dt.sel.primary().head,"div"),Ct=at.wrapper.getBoundingClientRect(),Bt=at.lineDiv.getBoundingClientRect();ht.teTop=Math.max(0,Math.min(at.wrapper.clientHeight-10,gt.top+Bt.top-Ct.top)),ht.teLeft=Math.max(0,Math.min(at.wrapper.clientWidth-10,gt.left+Bt.left-Ct.left))}return ht},Ra.prototype.showSelection=function(it){var at=this.cm,dt=at.display;_t(dt.cursorDiv,it.cursors),_t(dt.selectionDiv,it.selection),it.teTop!=null&&(this.wrapper.style.top=it.teTop+"px",this.wrapper.style.left=it.teLeft+"px")},Ra.prototype.reset=function(it){if(!(this.contextMenuPending||this.composing)){var at=this.cm;if(at.somethingSelected()){this.prevInput="";var dt=at.getSelection();this.textarea.value=dt,at.state.focused&&wn(this.textarea),Se&&Rt>=9&&(this.hasSelection=dt)}else it||(this.prevInput=this.textarea.value="",Se&&Rt>=9&&(this.hasSelection=null))}},Ra.prototype.getField=function(){return this.textarea},Ra.prototype.supportsTouch=function(){return!1},Ra.prototype.focus=function(){if(this.cm.options.readOnly!="nocursor"&&(!et||Ye()!=this.textarea))try{this.textarea.focus()}catch(it){}},Ra.prototype.blur=function(){this.textarea.blur()},Ra.prototype.resetPosition=function(){this.wrapper.style.top=this.wrapper.style.left=0},Ra.prototype.receivedFocus=function(){this.slowPoll()},Ra.prototype.slowPoll=function(){var it=this;this.pollingFast||this.polling.set(this.cm.options.pollInterval,function(){it.poll(),it.cm.state.focused&&it.slowPoll()})},Ra.prototype.fastPoll=function(){var it=!1,at=this;at.pollingFast=!0;function dt(){var ht=at.poll();!ht&&!it?(it=!0,at.polling.set(60,dt)):(at.pollingFast=!1,at.slowPoll())}at.polling.set(20,dt)},Ra.prototype.poll=function(){var it=this,at=this.cm,dt=this.textarea,ht=this.prevInput;if(this.contextMenuPending||!at.state.focused||Pt(dt)&&!ht&&!this.composing||at.isReadOnly()||at.options.disableInput||at.state.keySeq)return!1;var gt=dt.value;if(gt==ht&&!at.somethingSelected())return!1;if(Se&&Rt>=9&&this.hasSelection===gt||ct&&/[\uf700-\uf7ff]/.test(gt))return at.display.input.reset(),!1;if(at.doc.sel==at.display.selForContextMenu){var Ct=gt.charCodeAt(0);if(Ct==8203&&!ht&&(ht="\u200B"),Ct==8666)return this.reset(),this.cm.execCommand("undo")}for(var Bt=0,Wt=Math.min(ht.length,gt.length);Bt<Wt&&ht.charCodeAt(Bt)==gt.charCodeAt(Bt);)++Bt;return Ao(at,function(){kc(at,gt.slice(Bt),ht.length-Bt,null,it.composing?"*compose":null),gt.length>1e3||gt.indexOf(`
|
|
`)>-1?dt.value=it.prevInput="":it.prevInput=gt,it.composing&&(it.composing.range.clear(),it.composing.range=at.markText(it.composing.start,at.getCursor("to"),{className:"CodeMirror-composing"}))}),!0},Ra.prototype.ensurePolled=function(){this.pollingFast&&this.poll()&&(this.pollingFast=!1)},Ra.prototype.onKeyPress=function(){Se&&Rt>=9&&(this.hasSelection=null),this.fastPoll()},Ra.prototype.onContextMenu=function(it){var at=this,dt=at.cm,ht=dt.display,gt=at.textarea;at.contextMenuPending&&at.contextMenuPending();var Ct=Ka(dt,it),Bt=ht.scroller.scrollTop;if(!Ct||Vt)return;var Wt=dt.options.resetSelectionOnContextMenu;Wt&&dt.doc.sel.contains(Ct)==-1&&Wa(dt,Cs)(dt.doc,Ku(Ct),ke);var Kt=gt.style.cssText,$t=at.wrapper.style.cssText,Ie=at.wrapper.offsetParent.getBoundingClientRect();at.wrapper.style.cssText="position: static",gt.style.cssText=`position: absolute; width: 30px; height: 30px;
|
|
top: `+(it.clientY-Ie.top-5)+"px; left: "+(it.clientX-Ie.left-5)+`px;
|
|
z-index: 1000; background: `+(Se?"rgba(255, 255, 255, .05)":"transparent")+`;
|
|
outline: none; border-width: 0; outline: none; overflow: hidden; opacity: .05; filter: alpha(opacity=5);`;var he;ie&&(he=window.scrollY),ht.input.focus(),ie&&window.scrollTo(null,he),ht.input.reset(),dt.somethingSelected()||(gt.value=at.prevInput=" "),at.contextMenuPending=nn,ht.selForContextMenu=dt.doc.sel,clearTimeout(ht.detectingSelectAll);function cn(){if(gt.selectionStart!=null){var wi=dt.somethingSelected(),Ti="\u200B"+(wi?gt.value:"");gt.value="\u21DA",gt.value=Ti,at.prevInput=wi?"":"\u200B",gt.selectionStart=1,gt.selectionEnd=Ti.length,ht.selForContextMenu=dt.doc.sel}}function nn(){if(at.contextMenuPending==nn&&(at.contextMenuPending=!1,at.wrapper.style.cssText=$t,gt.style.cssText=Kt,Se&&Rt<9&&ht.scrollbars.setScrollTop(ht.scroller.scrollTop=Bt),gt.selectionStart!=null)){(!Se||Se&&Rt<9)&&cn();var wi=0,Ti=function(){ht.selForContextMenu==dt.doc.sel&>.selectionStart==0&>.selectionEnd>0&&at.prevInput=="\u200B"?Wa(dt,Aa)(dt):wi++<10?ht.detectingSelectAll=setTimeout(Ti,500):(ht.selForContextMenu=null,ht.input.reset())};ht.detectingSelectAll=setTimeout(Ti,200)}}if(Se&&Rt>=9&&cn(),Lt){Ei(it);var fi=function(){xe(window,"mouseup",fi),setTimeout(nn,20)};He(window,"mouseup",fi)}else setTimeout(nn,50)},Ra.prototype.readOnlyChanged=function(it){it||this.reset(),this.textarea.disabled=it=="nocursor",this.textarea.readOnly=!!it},Ra.prototype.setUneditable=function(){},Ra.prototype.needsContentAttribute=!1;function am(it,at){if(at=at?vn(at):{},at.value=it.value,!at.tabindex&&it.tabIndex&&(at.tabindex=it.tabIndex),!at.placeholder&&it.placeholder&&(at.placeholder=it.placeholder),at.autofocus==null){var dt=Ye();at.autofocus=dt==it||it.getAttribute("autofocus")!=null&&dt==document.body}function ht(){it.value=Wt.getValue()}var gt;if(it.form&&(He(it.form,"submit",ht),!at.leaveSubmitMethodAlone)){var Ct=it.form;gt=Ct.submit;try{var Bt=Ct.submit=function(){ht(),Ct.submit=gt,Ct.submit(),Ct.submit=Bt}}catch(Kt){}}at.finishInit=function(Kt){Kt.save=ht,Kt.getTextArea=function(){return it},Kt.toTextArea=function(){Kt.toTextArea=isNaN,ht(),it.parentNode.removeChild(Kt.getWrapperElement()),it.style.display="",it.form&&(xe(it.form,"submit",ht),!at.leaveSubmitMethodAlone&&typeof it.form.submit=="function"&&(it.form.submit=gt))}},it.style.display="none";var Wt=Lo(function(Kt){return it.parentNode.insertBefore(Kt,it.nextSibling)},at);return Wt}function Zd(it){it.off=xe,it.on=He,it.wheelEventPixels=pl,it.Doc=gs,it.splitLines=Zi,it.countColumn=ne,it.findColumn=Jn,it.isWordChar=Mt,it.Pass=Pn,it.signal=Ne,it.Line=ur,it.changeEnd=dh,it.scrollbarModel=wu,it.Pos=De,it.cmpPos=kn,it.modes=dn,it.mimeModes=pn,it.resolveMode=Bi,it.getMode=me,it.modeExtensions=we,it.extendMode=ge,it.copyState=Wn,it.startState=si,it.innerMode=ai,it.commands=ph,it.keyMap=tl,it.keyName=qp,it.isModifierKey=Od,it.lookupKey=Nl,it.normalizeKeyMap=xg,it.StringStream=ln,it.SharedTextMarker=Eu,it.TextMarker=Le,it.LineWidget=Vu,it.e_preventDefault=Kn,it.e_stopPropagation=yi,it.e_stop=Ei,it.addClass=en,it.contains=Re,it.rmClass=Ht,it.keyNames=ku}im(Lo),vh(Lo);var Uu="iter insert remove copy getEditor constructor".split(" ");for(var Mc in gs.prototype)gs.prototype.hasOwnProperty(Mc)&&Fe(Uu,Mc)<0&&(Lo.prototype[Mc]=function(it){return function(){return it.apply(this.doc,arguments)}}(gs.prototype[Mc]));return An(gs),Lo.inputStyles={textarea:Ra,contenteditable:Yo},Lo.defineMode=function(it){!Lo.defaults.mode&&it!="null"&&(Lo.defaults.mode=it),_n.apply(this,arguments)},Lo.defineMIME=Di,Lo.defineMode("null",function(){return{token:function(it){return it.skipToEnd()}}}),Lo.defineMIME("text/plain","null"),Lo.defineExtension=function(it,at){Lo.prototype[it]=at},Lo.defineDocExtension=function(it,at){gs.prototype[it]=at},Lo.fromTextArea=am,Zd(Lo),Lo.version="5.58.2",Lo})},25419:function(Tn,oi,Dt){(function(Ft){Ft(Dt(89780),Dt(15525),Dt(98101))})(function(Ft){"use strict";Ft.defineMode("markdown",function(se,ye){var Be=Ft.getMode(se,"text/html"),Se=Be.name=="null";function Rt(ne){if(Ft.findModeByName){var jt=Ft.findModeByName(ne);jt&&(ne=jt.mime||jt.mimes[0])}var Fe=Ft.getMode(se,ne);return Fe.name=="null"?null:Fe}ye.highlightFormatting===void 0&&(ye.highlightFormatting=!1),ye.maxBlockquoteDepth===void 0&&(ye.maxBlockquoteDepth=0),ye.taskLists===void 0&&(ye.taskLists=!1),ye.strikethrough===void 0&&(ye.strikethrough=!1),ye.emoji===void 0&&(ye.emoji=!1),ye.fencedCodeBlockHighlighting===void 0&&(ye.fencedCodeBlockHighlighting=!0),ye.fencedCodeBlockDefaultMode===void 0&&(ye.fencedCodeBlockDefaultMode="text/plain"),ye.xml===void 0&&(ye.xml=!0),ye.tokenTypeOverrides===void 0&&(ye.tokenTypeOverrides={});var ie={header:"header",code:"comment",quote:"quote",list1:"variable-2",list2:"variable-3",list3:"keyword",hr:"hr",image:"image",imageAltText:"image-alt-text",imageMarker:"image-marker",formatting:"formatting",linkInline:"link",linkEmail:"link",linkText:"link",linkHref:"string",em:"em",strong:"strong",strikethrough:"strikethrough",emoji:"builtin"};for(var je in ie)ie.hasOwnProperty(je)&&ye.tokenTypeOverrides[je]&&(ie[je]=ye.tokenTypeOverrides[je]);var ce=/^([*\-_])(?:\s*\1){2,}\s*$/,Vt=/^(?:[*\-+]|^[0-9]+([.)]))\s+/,Qe=/^\[(x| )\](?=\s)/i,Qt=ye.allowAtxHeaderWithoutSpace?/^(#+)/:/^(#+)(?: |$)/,Je=/^ {0,3}(?:\={1,}|-{2,})\s*$/,Nt=/^[^#!\[\]*_\\<>` "'(~:]+/,nt=/^(~~~+|```+)[ \t]*([\w\/+#-]*)[^\n`]*$/,et=/^\s*\[[^\]]+?\]:.*$/,ct=/[!"#$%&'()*+,\-.\/:;<=>?@\[\\\]^_`{|}~\xA1\xA7\xAB\xB6\xB7\xBB\xBF\u037E\u0387\u055A-\u055F\u0589\u058A\u05BE\u05C0\u05C3\u05C6\u05F3\u05F4\u0609\u060A\u060C\u060D\u061B\u061E\u061F\u066A-\u066D\u06D4\u0700-\u070D\u07F7-\u07F9\u0830-\u083E\u085E\u0964\u0965\u0970\u0AF0\u0DF4\u0E4F\u0E5A\u0E5B\u0F04-\u0F12\u0F14\u0F3A-\u0F3D\u0F85\u0FD0-\u0FD4\u0FD9\u0FDA\u104A-\u104F\u10FB\u1360-\u1368\u1400\u166D\u166E\u169B\u169C\u16EB-\u16ED\u1735\u1736\u17D4-\u17D6\u17D8-\u17DA\u1800-\u180A\u1944\u1945\u1A1E\u1A1F\u1AA0-\u1AA6\u1AA8-\u1AAD\u1B5A-\u1B60\u1BFC-\u1BFF\u1C3B-\u1C3F\u1C7E\u1C7F\u1CC0-\u1CC7\u1CD3\u2010-\u2027\u2030-\u2043\u2045-\u2051\u2053-\u205E\u207D\u207E\u208D\u208E\u2308-\u230B\u2329\u232A\u2768-\u2775\u27C5\u27C6\u27E6-\u27EF\u2983-\u2998\u29D8-\u29DB\u29FC\u29FD\u2CF9-\u2CFC\u2CFE\u2CFF\u2D70\u2E00-\u2E2E\u2E30-\u2E42\u3001-\u3003\u3008-\u3011\u3014-\u301F\u3030\u303D\u30A0\u30FB\uA4FE\uA4FF\uA60D-\uA60F\uA673\uA67E\uA6F2-\uA6F7\uA874-\uA877\uA8CE\uA8CF\uA8F8-\uA8FA\uA8FC\uA92E\uA92F\uA95F\uA9C1-\uA9CD\uA9DE\uA9DF\uAA5C-\uAA5F\uAADE\uAADF\uAAF0\uAAF1\uABEB\uFD3E\uFD3F\uFE10-\uFE19\uFE30-\uFE52\uFE54-\uFE61\uFE63\uFE68\uFE6A\uFE6B\uFF01-\uFF03\uFF05-\uFF0A\uFF0C-\uFF0F\uFF1A\uFF1B\uFF1F\uFF20\uFF3B-\uFF3D\uFF3F\uFF5B\uFF5D\uFF5F-\uFF65]|\uD800[\uDD00-\uDD02\uDF9F\uDFD0]|\uD801\uDD6F|\uD802[\uDC57\uDD1F\uDD3F\uDE50-\uDE58\uDE7F\uDEF0-\uDEF6\uDF39-\uDF3F\uDF99-\uDF9C]|\uD804[\uDC47-\uDC4D\uDCBB\uDCBC\uDCBE-\uDCC1\uDD40-\uDD43\uDD74\uDD75\uDDC5-\uDDC9\uDDCD\uDDDB\uDDDD-\uDDDF\uDE38-\uDE3D\uDEA9]|\uD805[\uDCC6\uDDC1-\uDDD7\uDE41-\uDE43\uDF3C-\uDF3E]|\uD809[\uDC70-\uDC74]|\uD81A[\uDE6E\uDE6F\uDEF5\uDF37-\uDF3B\uDF44]|\uD82F\uDC9F|\uD836[\uDE87-\uDE8B]/,lt=" ";function pt(ne,jt,Fe){return jt.f=jt.inline=Fe,Fe(ne,jt)}function vt(ne,jt,Fe){return jt.f=jt.block=Fe,Fe(ne,jt)}function xt(ne){return!ne||!/\S/.test(ne.string)}function Lt(ne){if(ne.linkTitle=!1,ne.linkHref=!1,ne.linkText=!1,ne.em=!1,ne.strong=!1,ne.strikethrough=!1,ne.quote=0,ne.indentedCode=!1,ne.f==Ht){var jt=Se;if(!jt){var Fe=Ft.innerMode(Be,ne.htmlState);jt=Fe.mode.name=="xml"&&Fe.state.tagStart===null&&!Fe.state.context&&Fe.state.tokenize.isInText}jt&&(ne.f=ve,ne.block=Ot,ne.htmlState=null)}return ne.trailingSpace=0,ne.trailingSpaceNewLine=!1,ne.prevLine=ne.thisLine,ne.thisLine={stream:null},null}function Ot(ne,jt){var Fe=ne.column()===jt.indentation,We=xt(jt.prevLine.stream),Pn=jt.indentedCode,ke=jt.prevLine.hr,tn=jt.list!==!1,fn=(jt.listStack[jt.listStack.length-1]||0)+3;jt.indentedCode=!1;var Jn=jt.indentation;if(jt.indentationDiff===null&&(jt.indentationDiff=jt.indentation,tn)){for(jt.list=null;Jn<jt.listStack[jt.listStack.length-1];)jt.listStack.pop(),jt.listStack.length?jt.indentation=jt.listStack[jt.listStack.length-1]:jt.list=!1;jt.list!==!1&&(jt.indentationDiff=Jn-jt.listStack[jt.listStack.length-1])}var Pe=!We&&!ke&&!jt.prevLine.header&&(!tn||!Pn)&&!jt.prevLine.fencedCodeEnd,an=(jt.list===!1||ke||We)&&jt.indentation<=fn&&ne.match(ce),re=null;if(jt.indentationDiff>=4&&(Pn||jt.prevLine.fencedCodeEnd||jt.prevLine.header||We))return ne.skipToEnd(),jt.indentedCode=!0,ie.code;if(ne.eatSpace())return null;if(Fe&&jt.indentation<=fn&&(re=ne.match(Qt))&&re[1].length<=6)return jt.quote=0,jt.header=re[1].length,jt.thisLine.header=!0,ye.highlightFormatting&&(jt.formatting="header"),jt.f=jt.inline,_t(jt);if(jt.indentation<=fn&&ne.eat(">"))return jt.quote=Fe?1:jt.quote+1,ye.highlightFormatting&&(jt.formatting="quote"),ne.eatSpace(),_t(jt);if(!an&&!jt.setext&&Fe&&jt.indentation<=fn&&(re=ne.match(Vt))){var hn=re[1]?"ol":"ul";return jt.indentation=Jn+ne.current().length,jt.list=!0,jt.quote=0,jt.listStack.push(jt.indentation),jt.em=!1,jt.strong=!1,jt.code=!1,jt.strikethrough=!1,ye.taskLists&&ne.match(Qe,!1)&&(jt.taskList=!0),jt.f=jt.inline,ye.highlightFormatting&&(jt.formatting=["list","list-"+hn]),_t(jt)}else{if(Fe&&jt.indentation<=fn&&(re=ne.match(nt,!0)))return jt.quote=0,jt.fencedEndRE=new RegExp(re[1]+"+ *$"),jt.localMode=ye.fencedCodeBlockHighlighting&&Rt(re[2]||ye.fencedCodeBlockDefaultMode),jt.localMode&&(jt.localState=Ft.startState(jt.localMode)),jt.f=jt.block=te,ye.highlightFormatting&&(jt.formatting="code-block"),jt.code=-1,_t(jt);if(jt.setext||(!Pe||!tn)&&!jt.quote&&jt.list===!1&&!jt.code&&!an&&!et.test(ne.string)&&(re=ne.lookAhead(1))&&(re=re.match(Je)))return jt.setext?(jt.header=jt.setext,jt.setext=0,ne.skipToEnd(),ye.highlightFormatting&&(jt.formatting="header")):(jt.header=re[0].charAt(0)=="="?1:2,jt.setext=jt.header),jt.thisLine.header=!0,jt.f=jt.inline,_t(jt);if(an)return ne.skipToEnd(),jt.hr=!0,jt.thisLine.hr=!0,ie.hr;if(ne.peek()==="[")return pt(ne,jt,Rn)}return pt(ne,jt,jt.inline)}function Ht(ne,jt){var Fe=Be.token(ne,jt.htmlState);if(!Se){var We=Ft.innerMode(Be,jt.htmlState);(We.mode.name=="xml"&&We.state.tagStart===null&&!We.state.context&&We.state.tokenize.isInText||jt.md_inside&&ne.current().indexOf(">")>-1)&&(jt.f=ve,jt.block=Ot,jt.htmlState=null)}return Fe}function te(ne,jt){var Fe=jt.listStack[jt.listStack.length-1]||0,We=jt.indentation<Fe,Pn=Fe+3;if(jt.fencedEndRE&&jt.indentation<=Pn&&(We||ne.match(jt.fencedEndRE))){ye.highlightFormatting&&(jt.formatting="code-block");var ke;return We||(ke=_t(jt)),jt.localMode=jt.localState=null,jt.block=Ot,jt.f=ve,jt.fencedEndRE=null,jt.code=0,jt.thisLine.fencedCodeEnd=!0,We?vt(ne,jt,jt.block):ke}else return jt.localMode?jt.localMode.token(ne,jt.localState):(ne.skipToEnd(),ie.code)}function _t(ne){var jt=[];if(ne.formatting){jt.push(ie.formatting),typeof ne.formatting=="string"&&(ne.formatting=[ne.formatting]);for(var Fe=0;Fe<ne.formatting.length;Fe++)jt.push(ie.formatting+"-"+ne.formatting[Fe]),ne.formatting[Fe]==="header"&&jt.push(ie.formatting+"-"+ne.formatting[Fe]+"-"+ne.header),ne.formatting[Fe]==="quote"&&(!ye.maxBlockquoteDepth||ye.maxBlockquoteDepth>=ne.quote?jt.push(ie.formatting+"-"+ne.formatting[Fe]+"-"+ne.quote):jt.push("error"))}if(ne.taskOpen)return jt.push("meta"),jt.length?jt.join(" "):null;if(ne.taskClosed)return jt.push("property"),jt.length?jt.join(" "):null;if(ne.linkHref?jt.push(ie.linkHref,"url"):(ne.strong&&jt.push(ie.strong),ne.em&&jt.push(ie.em),ne.strikethrough&&jt.push(ie.strikethrough),ne.emoji&&jt.push(ie.emoji),ne.linkText&&jt.push(ie.linkText),ne.code&&jt.push(ie.code),ne.image&&jt.push(ie.image),ne.imageAltText&&jt.push(ie.imageAltText,"link"),ne.imageMarker&&jt.push(ie.imageMarker)),ne.header&&jt.push(ie.header,ie.header+"-"+ne.header),ne.quote&&(jt.push(ie.quote),!ye.maxBlockquoteDepth||ye.maxBlockquoteDepth>=ne.quote?jt.push(ie.quote+"-"+ne.quote):jt.push(ie.quote+"-"+ye.maxBlockquoteDepth)),ne.list!==!1){var We=(ne.listStack.length-1)%3;We?We===1?jt.push(ie.list2):jt.push(ie.list3):jt.push(ie.list1)}return ne.trailingSpaceNewLine?jt.push("trailing-space-new-line"):ne.trailingSpace&&jt.push("trailing-space-"+(ne.trailingSpace%2?"a":"b")),jt.length?jt.join(" "):null}function Xt(ne,jt){if(ne.match(Nt,!0))return _t(jt)}function ve(ne,jt){var Fe=jt.text(ne,jt);if(typeof Fe!="undefined")return Fe;if(jt.list)return jt.list=null,_t(jt);if(jt.taskList){var We=ne.match(Qe,!0)[1]===" ";return We?jt.taskOpen=!0:jt.taskClosed=!0,ye.highlightFormatting&&(jt.formatting="task"),jt.taskList=!1,_t(jt)}if(jt.taskOpen=!1,jt.taskClosed=!1,jt.header&&ne.match(/^#+$/,!0))return ye.highlightFormatting&&(jt.formatting="header"),_t(jt);var Pn=ne.next();if(jt.linkTitle){jt.linkTitle=!1;var ke=Pn;Pn==="("&&(ke=")"),ke=(ke+"").replace(/([.?*+^\[\]\\(){}|-])/g,"\\$1");var tn="^\\s*(?:[^"+ke+"\\\\]+|\\\\\\\\|\\\\.)"+ke;if(ne.match(new RegExp(tn),!0))return ie.linkHref}if(Pn==="`"){var fn=jt.formatting;ye.highlightFormatting&&(jt.formatting="code"),ne.eatWhile("`");var Jn=ne.current().length;if(jt.code==0&&(!jt.quote||Jn==1))return jt.code=Jn,_t(jt);if(Jn==jt.code){var Pe=_t(jt);return jt.code=0,Pe}else return jt.formatting=fn,_t(jt)}else if(jt.code)return _t(jt);if(Pn==="\\"&&(ne.next(),ye.highlightFormatting)){var an=_t(jt),re=ie.formatting+"-escape";return an?an+" "+re:re}if(Pn==="!"&&ne.match(/\[[^\]]*\] ?(?:\(|\[)/,!1))return jt.imageMarker=!0,jt.image=!0,ye.highlightFormatting&&(jt.formatting="image"),_t(jt);if(Pn==="["&&jt.imageMarker&&ne.match(/[^\]]*\](\(.*?\)| ?\[.*?\])/,!1))return jt.imageMarker=!1,jt.imageAltText=!0,ye.highlightFormatting&&(jt.formatting="image"),_t(jt);if(Pn==="]"&&jt.imageAltText){ye.highlightFormatting&&(jt.formatting="image");var an=_t(jt);return jt.imageAltText=!1,jt.image=!1,jt.inline=jt.f=Re,an}if(Pn==="["&&!jt.image)return jt.linkText&&ne.match(/^.*?\]/)||(jt.linkText=!0,ye.highlightFormatting&&(jt.formatting="link")),_t(jt);if(Pn==="]"&&jt.linkText){ye.highlightFormatting&&(jt.formatting="link");var an=_t(jt);return jt.linkText=!1,jt.inline=jt.f=ne.match(/\(.*?\)| ?\[.*?\]/,!1)?Re:ve,an}if(Pn==="<"&&ne.match(/^(https?|ftps?):\/\/(?:[^\\>]|\\.)+>/,!1)){jt.f=jt.inline=oe,ye.highlightFormatting&&(jt.formatting="link");var an=_t(jt);return an?an+=" ":an="",an+ie.linkInline}if(Pn==="<"&&ne.match(/^[^> \\]+@(?:[^\\>]|\\.)+>/,!1)){jt.f=jt.inline=oe,ye.highlightFormatting&&(jt.formatting="link");var an=_t(jt);return an?an+=" ":an="",an+ie.linkEmail}if(ye.xml&&Pn==="<"&&ne.match(/^(!--|\?|!\[CDATA\[|[a-z][a-z0-9-]*(?:\s+[a-z_:.\-]+(?:\s*=\s*[^>]+)?)*\s*(?:>|$))/i,!1)){var hn=ne.string.indexOf(">",ne.pos);if(hn!=-1){var di=ne.string.substring(ne.start,hn);/markdown\s*=\s*('|"){0,1}1('|"){0,1}/.test(di)&&(jt.md_inside=!0)}return ne.backUp(1),jt.htmlState=Ft.startState(Be),vt(ne,jt,Ht)}if(ye.xml&&Pn==="<"&&ne.match(/^\/\w*?>/))return jt.md_inside=!1,"tag";if(Pn==="*"||Pn==="_"){for(var Tt=1,Et=ne.pos==1?" ":ne.string.charAt(ne.pos-2);Tt<3&&ne.eat(Pn);)Tt++;var St=ne.peek()||" ",Mt=!/\s/.test(St)&&(!ct.test(St)||/\s/.test(Et)||ct.test(Et)),zt=!/\s/.test(Et)&&(!ct.test(Et)||/\s/.test(St)||ct.test(St)),kt=null,Ut=null;if(Tt%2&&(!jt.em&&Mt&&(Pn==="*"||!zt||ct.test(Et))?kt=!0:jt.em==Pn&&zt&&(Pn==="*"||!Mt||ct.test(St))&&(kt=!1)),Tt>1&&(!jt.strong&&Mt&&(Pn==="*"||!zt||ct.test(Et))?Ut=!0:jt.strong==Pn&&zt&&(Pn==="*"||!Mt||ct.test(St))&&(Ut=!1)),Ut!=null||kt!=null){ye.highlightFormatting&&(jt.formatting=kt==null?"strong":Ut==null?"em":"strong em"),kt===!0&&(jt.em=Pn),Ut===!0&&(jt.strong=Pn);var Pe=_t(jt);return kt===!1&&(jt.em=!1),Ut===!1&&(jt.strong=!1),Pe}}else if(Pn===" "&&(ne.eat("*")||ne.eat("_"))){if(ne.peek()===" ")return _t(jt);ne.backUp(1)}if(ye.strikethrough){if(Pn==="~"&&ne.eatWhile(Pn)){if(jt.strikethrough){ye.highlightFormatting&&(jt.formatting="strikethrough");var Pe=_t(jt);return jt.strikethrough=!1,Pe}else if(ne.match(/^[^\s]/,!1))return jt.strikethrough=!0,ye.highlightFormatting&&(jt.formatting="strikethrough"),_t(jt)}else if(Pn===" "&&ne.match(/^~~/,!0)){if(ne.peek()===" ")return _t(jt);ne.backUp(2)}}if(ye.emoji&&Pn===":"&&ne.match(/^(?:[a-z_\d+][a-z_\d+-]*|\-[a-z_\d+][a-z_\d+-]*):/)){jt.emoji=!0,ye.highlightFormatting&&(jt.formatting="emoji");var Oe=_t(jt);return jt.emoji=!1,Oe}return Pn===" "&&(ne.match(/^ +$/,!1)?jt.trailingSpace++:jt.trailingSpace&&(jt.trailingSpaceNewLine=!0)),_t(jt)}function oe(ne,jt){var Fe=ne.next();if(Fe===">"){jt.f=jt.inline=ve,ye.highlightFormatting&&(jt.formatting="link");var We=_t(jt);return We?We+=" ":We="",We+ie.linkInline}return ne.match(/^[^>]+/,!0),ie.linkInline}function Re(ne,jt){if(ne.eatSpace())return null;var Fe=ne.next();return Fe==="("||Fe==="["?(jt.f=jt.inline=en(Fe==="("?")":"]"),ye.highlightFormatting&&(jt.formatting="link-string"),jt.linkHref=!0,_t(jt)):"error"}var Ye={")":/^(?:[^\\\(\)]|\\.|\((?:[^\\\(\)]|\\.)*\))*?(?=\))/,"]":/^(?:[^\\\[\]]|\\.|\[(?:[^\\\[\]]|\\.)*\])*?(?=\])/};function en(ne){return function(jt,Fe){var We=jt.next();if(We===ne){Fe.f=Fe.inline=ve,ye.highlightFormatting&&(Fe.formatting="link-string");var Pn=_t(Fe);return Fe.linkHref=!1,Pn}return jt.match(Ye[ne]),Fe.linkHref=!0,_t(Fe)}}function Rn(ne,jt){return ne.match(/^([^\]\\]|\\.)*\]:/,!1)?(jt.f=wn,ne.next(),ye.highlightFormatting&&(jt.formatting="link"),jt.linkText=!0,_t(jt)):pt(ne,jt,ve)}function wn(ne,jt){if(ne.match(/^\]:/,!0)){jt.f=jt.inline=un,ye.highlightFormatting&&(jt.formatting="link");var Fe=_t(jt);return jt.linkText=!1,Fe}return ne.match(/^([^\]\\]|\\.)+/,!0),ie.linkText}function un(ne,jt){return ne.eatSpace()?null:(ne.match(/^[^\s]+/,!0),ne.peek()===void 0?jt.linkTitle=!0:ne.match(/^(?:\s+(?:"(?:[^"\\]|\\\\|\\.)+"|'(?:[^'\\]|\\\\|\\.)+'|\((?:[^)\\]|\\\\|\\.)+\)))?/,!0),jt.f=jt.inline=ve,ie.linkHref+" url")}var vn={startState:function(){return{f:Ot,prevLine:{stream:null},thisLine:{stream:null},block:Ot,htmlState:null,indentation:0,inline:ve,text:Xt,formatting:!1,linkText:!1,linkHref:!1,linkTitle:!1,code:0,em:!1,strong:!1,header:0,setext:0,hr:!1,taskList:!1,list:!1,listStack:[],quote:0,trailingSpace:0,trailingSpaceNewLine:!1,strikethrough:!1,emoji:!1,fencedEndRE:null}},copyState:function(ne){return{f:ne.f,prevLine:ne.prevLine,thisLine:ne.thisLine,block:ne.block,htmlState:ne.htmlState&&Ft.copyState(Be,ne.htmlState),indentation:ne.indentation,localMode:ne.localMode,localState:ne.localMode?Ft.copyState(ne.localMode,ne.localState):null,inline:ne.inline,text:ne.text,formatting:!1,linkText:ne.linkText,linkTitle:ne.linkTitle,linkHref:ne.linkHref,code:ne.code,em:ne.em,strong:ne.strong,strikethrough:ne.strikethrough,emoji:ne.emoji,header:ne.header,setext:ne.setext,hr:ne.hr,taskList:ne.taskList,list:ne.list,listStack:ne.listStack.slice(0),quote:ne.quote,indentedCode:ne.indentedCode,trailingSpace:ne.trailingSpace,trailingSpaceNewLine:ne.trailingSpaceNewLine,md_inside:ne.md_inside,fencedEndRE:ne.fencedEndRE}},token:function(ne,jt){if(jt.formatting=!1,ne!=jt.thisLine.stream){if(jt.header=0,jt.hr=!1,ne.match(/^\s*$/,!0))return Lt(jt),null;if(jt.prevLine=jt.thisLine,jt.thisLine={stream:ne},jt.taskList=!1,jt.trailingSpace=0,jt.trailingSpaceNewLine=!1,!jt.localState&&(jt.f=jt.block,jt.f!=Ht)){var Fe=ne.match(/^\s*/,!0)[0].replace(/\t/g,lt).length;if(jt.indentation=Fe,jt.indentationDiff=null,Fe>0)return null}}return jt.f(ne,jt)},innerMode:function(ne){return ne.block==Ht?{state:ne.htmlState,mode:Be}:ne.localState?{state:ne.localState,mode:ne.localMode}:{state:ne,mode:vn}},indent:function(ne,jt,Fe){return ne.block==Ht&&Be.indent?Be.indent(ne.htmlState,jt,Fe):ne.localState&&ne.localMode.indent?ne.localMode.indent(ne.localState,jt,Fe):Ft.Pass},blankLine:Lt,getType:_t,blockCommentStart:"<!--",blockCommentEnd:"-->",closeBrackets:"()[]{}''\"\"``",fold:"markdown"};return vn},"xml"),Ft.defineMIME("text/markdown","markdown"),Ft.defineMIME("text/x-markdown","markdown")})},98101:function(Tn,oi,Dt){(function(Ft){Ft(Dt(89780))})(function(Ft){"use strict";Ft.modeInfo=[{name:"APL",mime:"text/apl",mode:"apl",ext:["dyalog","apl"]},{name:"PGP",mimes:["application/pgp","application/pgp-encrypted","application/pgp-keys","application/pgp-signature"],mode:"asciiarmor",ext:["asc","pgp","sig"]},{name:"ASN.1",mime:"text/x-ttcn-asn",mode:"asn.1",ext:["asn","asn1"]},{name:"Asterisk",mime:"text/x-asterisk",mode:"asterisk",file:/^extensions\.conf$/i},{name:"Brainfuck",mime:"text/x-brainfuck",mode:"brainfuck",ext:["b","bf"]},{name:"C",mime:"text/x-csrc",mode:"clike",ext:["c","h","ino"]},{name:"C++",mime:"text/x-c++src",mode:"clike",ext:["cpp","c++","cc","cxx","hpp","h++","hh","hxx"],alias:["cpp"]},{name:"Cobol",mime:"text/x-cobol",mode:"cobol",ext:["cob","cpy"]},{name:"C#",mime:"text/x-csharp",mode:"clike",ext:["cs"],alias:["csharp","cs"]},{name:"Clojure",mime:"text/x-clojure",mode:"clojure",ext:["clj","cljc","cljx"]},{name:"ClojureScript",mime:"text/x-clojurescript",mode:"clojure",ext:["cljs"]},{name:"Closure Stylesheets (GSS)",mime:"text/x-gss",mode:"css",ext:["gss"]},{name:"CMake",mime:"text/x-cmake",mode:"cmake",ext:["cmake","cmake.in"],file:/^CMakeLists\.txt$/},{name:"CoffeeScript",mimes:["application/vnd.coffeescript","text/coffeescript","text/x-coffeescript"],mode:"coffeescript",ext:["coffee"],alias:["coffee","coffee-script"]},{name:"Common Lisp",mime:"text/x-common-lisp",mode:"commonlisp",ext:["cl","lisp","el"],alias:["lisp"]},{name:"Cypher",mime:"application/x-cypher-query",mode:"cypher",ext:["cyp","cypher"]},{name:"Cython",mime:"text/x-cython",mode:"python",ext:["pyx","pxd","pxi"]},{name:"Crystal",mime:"text/x-crystal",mode:"crystal",ext:["cr"]},{name:"CSS",mime:"text/css",mode:"css",ext:["css"]},{name:"CQL",mime:"text/x-cassandra",mode:"sql",ext:["cql"]},{name:"D",mime:"text/x-d",mode:"d",ext:["d"]},{name:"Dart",mimes:["application/dart","text/x-dart"],mode:"dart",ext:["dart"]},{name:"diff",mime:"text/x-diff",mode:"diff",ext:["diff","patch"]},{name:"Django",mime:"text/x-django",mode:"django"},{name:"Dockerfile",mime:"text/x-dockerfile",mode:"dockerfile",file:/^Dockerfile$/},{name:"DTD",mime:"application/xml-dtd",mode:"dtd",ext:["dtd"]},{name:"Dylan",mime:"text/x-dylan",mode:"dylan",ext:["dylan","dyl","intr"]},{name:"EBNF",mime:"text/x-ebnf",mode:"ebnf"},{name:"ECL",mime:"text/x-ecl",mode:"ecl",ext:["ecl"]},{name:"edn",mime:"application/edn",mode:"clojure",ext:["edn"]},{name:"Eiffel",mime:"text/x-eiffel",mode:"eiffel",ext:["e"]},{name:"Elm",mime:"text/x-elm",mode:"elm",ext:["elm"]},{name:"Embedded Javascript",mime:"application/x-ejs",mode:"htmlembedded",ext:["ejs"]},{name:"Embedded Ruby",mime:"application/x-erb",mode:"htmlembedded",ext:["erb"]},{name:"Erlang",mime:"text/x-erlang",mode:"erlang",ext:["erl"]},{name:"Esper",mime:"text/x-esper",mode:"sql"},{name:"Factor",mime:"text/x-factor",mode:"factor",ext:["factor"]},{name:"FCL",mime:"text/x-fcl",mode:"fcl"},{name:"Forth",mime:"text/x-forth",mode:"forth",ext:["forth","fth","4th"]},{name:"Fortran",mime:"text/x-fortran",mode:"fortran",ext:["f","for","f77","f90","f95"]},{name:"F#",mime:"text/x-fsharp",mode:"mllike",ext:["fs"],alias:["fsharp"]},{name:"Gas",mime:"text/x-gas",mode:"gas",ext:["s"]},{name:"Gherkin",mime:"text/x-feature",mode:"gherkin",ext:["feature"]},{name:"GitHub Flavored Markdown",mime:"text/x-gfm",mode:"gfm",file:/^(readme|contributing|history)\.md$/i},{name:"Go",mime:"text/x-go",mode:"go",ext:["go"]},{name:"Groovy",mime:"text/x-groovy",mode:"groovy",ext:["groovy","gradle"],file:/^Jenkinsfile$/},{name:"HAML",mime:"text/x-haml",mode:"haml",ext:["haml"]},{name:"Haskell",mime:"text/x-haskell",mode:"haskell",ext:["hs"]},{name:"Haskell (Literate)",mime:"text/x-literate-haskell",mode:"haskell-literate",ext:["lhs"]},{name:"Haxe",mime:"text/x-haxe",mode:"haxe",ext:["hx"]},{name:"HXML",mime:"text/x-hxml",mode:"haxe",ext:["hxml"]},{name:"ASP.NET",mime:"application/x-aspx",mode:"htmlembedded",ext:["aspx"],alias:["asp","aspx"]},{name:"HTML",mime:"text/html",mode:"htmlmixed",ext:["html","htm","handlebars","hbs"],alias:["xhtml"]},{name:"HTTP",mime:"message/http",mode:"http"},{name:"IDL",mime:"text/x-idl",mode:"idl",ext:["pro"]},{name:"Pug",mime:"text/x-pug",mode:"pug",ext:["jade","pug"],alias:["jade"]},{name:"Java",mime:"text/x-java",mode:"clike",ext:["java"]},{name:"Java Server Pages",mime:"application/x-jsp",mode:"htmlembedded",ext:["jsp"],alias:["jsp"]},{name:"JavaScript",mimes:["text/javascript","text/ecmascript","application/javascript","application/x-javascript","application/ecmascript"],mode:"javascript",ext:["js"],alias:["ecmascript","js","node"]},{name:"JSON",mimes:["application/json","application/x-json"],mode:"javascript",ext:["json","map"],alias:["json5"]},{name:"JSON-LD",mime:"application/ld+json",mode:"javascript",ext:["jsonld"],alias:["jsonld"]},{name:"JSX",mime:"text/jsx",mode:"jsx",ext:["jsx"]},{name:"Jinja2",mime:"text/jinja2",mode:"jinja2",ext:["j2","jinja","jinja2"]},{name:"Julia",mime:"text/x-julia",mode:"julia",ext:["jl"]},{name:"Kotlin",mime:"text/x-kotlin",mode:"clike",ext:["kt"]},{name:"LESS",mime:"text/x-less",mode:"css",ext:["less"]},{name:"LiveScript",mime:"text/x-livescript",mode:"livescript",ext:["ls"],alias:["ls"]},{name:"Lua",mime:"text/x-lua",mode:"lua",ext:["lua"]},{name:"Markdown",mime:"text/x-markdown",mode:"markdown",ext:["markdown","md","mkd"]},{name:"mIRC",mime:"text/mirc",mode:"mirc"},{name:"MariaDB SQL",mime:"text/x-mariadb",mode:"sql"},{name:"Mathematica",mime:"text/x-mathematica",mode:"mathematica",ext:["m","nb","wl","wls"]},{name:"Modelica",mime:"text/x-modelica",mode:"modelica",ext:["mo"]},{name:"MUMPS",mime:"text/x-mumps",mode:"mumps",ext:["mps"]},{name:"MS SQL",mime:"text/x-mssql",mode:"sql"},{name:"mbox",mime:"application/mbox",mode:"mbox",ext:["mbox"]},{name:"MySQL",mime:"text/x-mysql",mode:"sql"},{name:"Nginx",mime:"text/x-nginx-conf",mode:"nginx",file:/nginx.*\.conf$/i},{name:"NSIS",mime:"text/x-nsis",mode:"nsis",ext:["nsh","nsi"]},{name:"NTriples",mimes:["application/n-triples","application/n-quads","text/n-triples"],mode:"ntriples",ext:["nt","nq"]},{name:"Objective-C",mime:"text/x-objectivec",mode:"clike",ext:["m"],alias:["objective-c","objc"]},{name:"Objective-C++",mime:"text/x-objectivec++",mode:"clike",ext:["mm"],alias:["objective-c++","objc++"]},{name:"OCaml",mime:"text/x-ocaml",mode:"mllike",ext:["ml","mli","mll","mly"]},{name:"Octave",mime:"text/x-octave",mode:"octave",ext:["m"]},{name:"Oz",mime:"text/x-oz",mode:"oz",ext:["oz"]},{name:"Pascal",mime:"text/x-pascal",mode:"pascal",ext:["p","pas"]},{name:"PEG.js",mime:"null",mode:"pegjs",ext:["jsonld"]},{name:"Perl",mime:"text/x-perl",mode:"perl",ext:["pl","pm"]},{name:"PHP",mimes:["text/x-php","application/x-httpd-php","application/x-httpd-php-open"],mode:"php",ext:["php","php3","php4","php5","php7","phtml"]},{name:"Pig",mime:"text/x-pig",mode:"pig",ext:["pig"]},{name:"Plain Text",mime:"text/plain",mode:"null",ext:["txt","text","conf","def","list","log"]},{name:"PLSQL",mime:"text/x-plsql",mode:"sql",ext:["pls"]},{name:"PostgreSQL",mime:"text/x-pgsql",mode:"sql"},{name:"PowerShell",mime:"application/x-powershell",mode:"powershell",ext:["ps1","psd1","psm1"]},{name:"Properties files",mime:"text/x-properties",mode:"properties",ext:["properties","ini","in"],alias:["ini","properties"]},{name:"ProtoBuf",mime:"text/x-protobuf",mode:"protobuf",ext:["proto"]},{name:"Python",mime:"text/x-python",mode:"python",ext:["BUILD","bzl","py","pyw"],file:/^(BUCK|BUILD)$/},{name:"Puppet",mime:"text/x-puppet",mode:"puppet",ext:["pp"]},{name:"Q",mime:"text/x-q",mode:"q",ext:["q"]},{name:"R",mime:"text/x-rsrc",mode:"r",ext:["r","R"],alias:["rscript"]},{name:"reStructuredText",mime:"text/x-rst",mode:"rst",ext:["rst"],alias:["rst"]},{name:"RPM Changes",mime:"text/x-rpm-changes",mode:"rpm"},{name:"RPM Spec",mime:"text/x-rpm-spec",mode:"rpm",ext:["spec"]},{name:"Ruby",mime:"text/x-ruby",mode:"ruby",ext:["rb"],alias:["jruby","macruby","rake","rb","rbx"]},{name:"Rust",mime:"text/x-rustsrc",mode:"rust",ext:["rs"]},{name:"SAS",mime:"text/x-sas",mode:"sas",ext:["sas"]},{name:"Sass",mime:"text/x-sass",mode:"sass",ext:["sass"]},{name:"Scala",mime:"text/x-scala",mode:"clike",ext:["scala"]},{name:"Scheme",mime:"text/x-scheme",mode:"scheme",ext:["scm","ss"]},{name:"SCSS",mime:"text/x-scss",mode:"css",ext:["scss"]},{name:"Shell",mimes:["text/x-sh","application/x-sh"],mode:"shell",ext:["sh","ksh","bash"],alias:["bash","sh","zsh"],file:/^PKGBUILD$/},{name:"Sieve",mime:"application/sieve",mode:"sieve",ext:["siv","sieve"]},{name:"Slim",mimes:["text/x-slim","application/x-slim"],mode:"slim",ext:["slim"]},{name:"Smalltalk",mime:"text/x-stsrc",mode:"smalltalk",ext:["st"]},{name:"Smarty",mime:"text/x-smarty",mode:"smarty",ext:["tpl"]},{name:"Solr",mime:"text/x-solr",mode:"solr"},{name:"SML",mime:"text/x-sml",mode:"mllike",ext:["sml","sig","fun","smackspec"]},{name:"Soy",mime:"text/x-soy",mode:"soy",ext:["soy"],alias:["closure template"]},{name:"SPARQL",mime:"application/sparql-query",mode:"sparql",ext:["rq","sparql"],alias:["sparul"]},{name:"Spreadsheet",mime:"text/x-spreadsheet",mode:"spreadsheet",alias:["excel","formula"]},{name:"SQL",mime:"text/x-sql",mode:"sql",ext:["sql"]},{name:"SQLite",mime:"text/x-sqlite",mode:"sql"},{name:"Squirrel",mime:"text/x-squirrel",mode:"clike",ext:["nut"]},{name:"Stylus",mime:"text/x-styl",mode:"stylus",ext:["styl"]},{name:"Swift",mime:"text/x-swift",mode:"swift",ext:["swift"]},{name:"sTeX",mime:"text/x-stex",mode:"stex"},{name:"LaTeX",mime:"text/x-latex",mode:"stex",ext:["text","ltx","tex"],alias:["tex"]},{name:"SystemVerilog",mime:"text/x-systemverilog",mode:"verilog",ext:["v","sv","svh"]},{name:"Tcl",mime:"text/x-tcl",mode:"tcl",ext:["tcl"]},{name:"Textile",mime:"text/x-textile",mode:"textile",ext:["textile"]},{name:"TiddlyWiki",mime:"text/x-tiddlywiki",mode:"tiddlywiki"},{name:"Tiki wiki",mime:"text/tiki",mode:"tiki"},{name:"TOML",mime:"text/x-toml",mode:"toml",ext:["toml"]},{name:"Tornado",mime:"text/x-tornado",mode:"tornado"},{name:"troff",mime:"text/troff",mode:"troff",ext:["1","2","3","4","5","6","7","8","9"]},{name:"TTCN",mime:"text/x-ttcn",mode:"ttcn",ext:["ttcn","ttcn3","ttcnpp"]},{name:"TTCN_CFG",mime:"text/x-ttcn-cfg",mode:"ttcn-cfg",ext:["cfg"]},{name:"Turtle",mime:"text/turtle",mode:"turtle",ext:["ttl"]},{name:"TypeScript",mime:"application/typescript",mode:"javascript",ext:["ts"],alias:["ts"]},{name:"TypeScript-JSX",mime:"text/typescript-jsx",mode:"jsx",ext:["tsx"],alias:["tsx"]},{name:"Twig",mime:"text/x-twig",mode:"twig"},{name:"Web IDL",mime:"text/x-webidl",mode:"webidl",ext:["webidl"]},{name:"VB.NET",mime:"text/x-vb",mode:"vb",ext:["vb"]},{name:"VBScript",mime:"text/vbscript",mode:"vbscript",ext:["vbs"]},{name:"Velocity",mime:"text/velocity",mode:"velocity",ext:["vtl"]},{name:"Verilog",mime:"text/x-verilog",mode:"verilog",ext:["v"]},{name:"VHDL",mime:"text/x-vhdl",mode:"vhdl",ext:["vhd","vhdl"]},{name:"Vue.js Component",mimes:["script/x-vue","text/x-vue"],mode:"vue",ext:["vue"]},{name:"XML",mimes:["application/xml","text/xml"],mode:"xml",ext:["xml","xsl","xsd","svg"],alias:["rss","wsdl","xsd"]},{name:"XQuery",mime:"application/xquery",mode:"xquery",ext:["xy","xquery"]},{name:"Yacas",mime:"text/x-yacas",mode:"yacas",ext:["ys"]},{name:"YAML",mimes:["text/x-yaml","text/yaml"],mode:"yaml",ext:["yaml","yml"],alias:["yml"]},{name:"Z80",mime:"text/x-z80",mode:"z80",ext:["z80"]},{name:"mscgen",mime:"text/x-mscgen",mode:"mscgen",ext:["mscgen","mscin","msc"]},{name:"xu",mime:"text/x-xu",mode:"mscgen",ext:["xu"]},{name:"msgenny",mime:"text/x-msgenny",mode:"mscgen",ext:["msgenny"]},{name:"WebAssembly",mime:"text/webassembly",mode:"wast",ext:["wat","wast"]}];for(var se=0;se<Ft.modeInfo.length;se++){var ye=Ft.modeInfo[se];ye.mimes&&(ye.mime=ye.mimes[0])}Ft.findModeByMIME=function(Be){Be=Be.toLowerCase();for(var Se=0;Se<Ft.modeInfo.length;Se++){var Rt=Ft.modeInfo[Se];if(Rt.mime==Be)return Rt;if(Rt.mimes){for(var ie=0;ie<Rt.mimes.length;ie++)if(Rt.mimes[ie]==Be)return Rt}}if(/\+xml$/.test(Be))return Ft.findModeByMIME("application/xml");if(/\+json$/.test(Be))return Ft.findModeByMIME("application/json")},Ft.findModeByExtension=function(Be){Be=Be.toLowerCase();for(var Se=0;Se<Ft.modeInfo.length;Se++){var Rt=Ft.modeInfo[Se];if(Rt.ext){for(var ie=0;ie<Rt.ext.length;ie++)if(Rt.ext[ie]==Be)return Rt}}},Ft.findModeByFileName=function(Be){for(var Se=0;Se<Ft.modeInfo.length;Se++){var Rt=Ft.modeInfo[Se];if(Rt.file&&Rt.file.test(Be))return Rt}var ie=Be.lastIndexOf("."),je=ie>-1&&Be.substring(ie+1,Be.length);if(je)return Ft.findModeByExtension(je)},Ft.findModeByName=function(Be){Be=Be.toLowerCase();for(var Se=0;Se<Ft.modeInfo.length;Se++){var Rt=Ft.modeInfo[Se];if(Rt.name.toLowerCase()==Be)return Rt;if(Rt.alias){for(var ie=0;ie<Rt.alias.length;ie++)if(Rt.alias[ie].toLowerCase()==Be)return Rt}}}})},67549:function(Tn,oi,Dt){(function(Ft){Ft(Dt(89780))})(function(Ft){"use strict";Ft.defineMode("stex",function(se,ye){"use strict";function Be(Nt,nt){Nt.cmdState.push(nt)}function Se(Nt){return Nt.cmdState.length>0?Nt.cmdState[Nt.cmdState.length-1]:null}function Rt(Nt){var nt=Nt.cmdState.pop();nt&&nt.closeBracket()}function ie(Nt){for(var nt=Nt.cmdState,et=nt.length-1;et>=0;et--){var ct=nt[et];if(ct.name!="DEFAULT")return ct}return{styleIdentifier:function(){return null}}}function je(Nt,nt,et){return function(){this.name=Nt,this.bracketNo=0,this.style=nt,this.styles=et,this.argument=null,this.styleIdentifier=function(){return this.styles[this.bracketNo-1]||null},this.openBracket=function(){return this.bracketNo++,"bracket"},this.closeBracket=function(){}}}var ce={};ce.importmodule=je("importmodule","tag",["string","builtin"]),ce.documentclass=je("documentclass","tag",["","atom"]),ce.usepackage=je("usepackage","tag",["atom"]),ce.begin=je("begin","tag",["atom"]),ce.end=je("end","tag",["atom"]),ce.label=je("label","tag",["atom"]),ce.ref=je("ref","tag",["atom"]),ce.eqref=je("eqref","tag",["atom"]),ce.cite=je("cite","tag",["atom"]),ce.bibitem=je("bibitem","tag",["atom"]),ce.Bibitem=je("Bibitem","tag",["atom"]),ce.RBibitem=je("RBibitem","tag",["atom"]),ce.DEFAULT=function(){this.name="DEFAULT",this.style="tag",this.styleIdentifier=this.openBracket=this.closeBracket=function(){}};function Vt(Nt,nt){Nt.f=nt}function Qe(Nt,nt){var et;if(Nt.match(/^\\[a-zA-Z@]+/)){var ct=Nt.current().slice(1);return et=ce.hasOwnProperty(ct)?ce[ct]:ce.DEFAULT,et=new et,Be(nt,et),Vt(nt,Je),et.style}if(Nt.match(/^\\[$&%#{}_]/)||Nt.match(/^\\[,;!\/\\]/))return"tag";if(Nt.match("\\["))return Vt(nt,function(pt,vt){return Qt(pt,vt,"\\]")}),"keyword";if(Nt.match("\\("))return Vt(nt,function(pt,vt){return Qt(pt,vt,"\\)")}),"keyword";if(Nt.match("$$"))return Vt(nt,function(pt,vt){return Qt(pt,vt,"$$")}),"keyword";if(Nt.match("$"))return Vt(nt,function(pt,vt){return Qt(pt,vt,"$")}),"keyword";var lt=Nt.next();if(lt=="%")return Nt.skipToEnd(),"comment";if(lt=="}"||lt=="]"){if(et=Se(nt),et)et.closeBracket(lt),Vt(nt,Je);else return"error";return"bracket"}else return lt=="{"||lt=="["?(et=ce.DEFAULT,et=new et,Be(nt,et),"bracket"):/\d/.test(lt)?(Nt.eatWhile(/[\w.%]/),"atom"):(Nt.eatWhile(/[\w\-_]/),et=ie(nt),et.name=="begin"&&(et.argument=Nt.current()),et.styleIdentifier())}function Qt(Nt,nt,et){if(Nt.eatSpace())return null;if(et&&Nt.match(et))return Vt(nt,Qe),"keyword";if(Nt.match(/^\\[a-zA-Z@]+/))return"tag";if(Nt.match(/^[a-zA-Z]+/))return"variable-2";if(Nt.match(/^\\[$&%#{}_]/)||Nt.match(/^\\[,;!\/]/)||Nt.match(/^[\^_&]/))return"tag";if(Nt.match(/^[+\-<>|=,\/@!*:;'"`~#?]/))return null;if(Nt.match(/^(\d+\.\d*|\d*\.\d+|\d+)/))return"number";var ct=Nt.next();return ct=="{"||ct=="}"||ct=="["||ct=="]"||ct=="("||ct==")"?"bracket":ct=="%"?(Nt.skipToEnd(),"comment"):"error"}function Je(Nt,nt){var et=Nt.peek(),ct;return et=="{"||et=="["?(ct=Se(nt),ct.openBracket(et),Nt.eat(et),Vt(nt,Qe),"bracket"):/[ \t\r]/.test(et)?(Nt.eat(et),null):(Vt(nt,Qe),Rt(nt),Qe(Nt,nt))}return{startState:function(){var Nt=ye.inMathMode?function(nt,et){return Qt(nt,et)}:Qe;return{cmdState:[],f:Nt}},copyState:function(Nt){return{cmdState:Nt.cmdState.slice(),f:Nt.f}},token:function(Nt,nt){return nt.f(Nt,nt)},blankLine:function(Nt){Nt.f=Qe,Nt.cmdState.length=0},lineComment:"%"}}),Ft.defineMIME("text/x-stex","stex"),Ft.defineMIME("text/x-latex","stex")})},15525:function(Tn,oi,Dt){(function(Ft){Ft(Dt(89780))})(function(Ft){"use strict";var se={autoSelfClosers:{area:!0,base:!0,br:!0,col:!0,command:!0,embed:!0,frame:!0,hr:!0,img:!0,input:!0,keygen:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0,menuitem:!0},implicitlyClosed:{dd:!0,li:!0,optgroup:!0,option:!0,p:!0,rp:!0,rt:!0,tbody:!0,td:!0,tfoot:!0,th:!0,tr:!0},contextGrabbers:{dd:{dd:!0,dt:!0},dt:{dd:!0,dt:!0},li:{li:!0},option:{option:!0,optgroup:!0},optgroup:{optgroup:!0},p:{address:!0,article:!0,aside:!0,blockquote:!0,dir:!0,div:!0,dl:!0,fieldset:!0,footer:!0,form:!0,h1:!0,h2:!0,h3:!0,h4:!0,h5:!0,h6:!0,header:!0,hgroup:!0,hr:!0,menu:!0,nav:!0,ol:!0,p:!0,pre:!0,section:!0,table:!0,ul:!0},rp:{rp:!0,rt:!0},rt:{rp:!0,rt:!0},tbody:{tbody:!0,tfoot:!0},td:{td:!0,th:!0},tfoot:{tbody:!0},th:{td:!0,th:!0},thead:{tbody:!0,tfoot:!0},tr:{tr:!0}},doNotIndent:{pre:!0},allowUnquoted:!0,allowMissing:!0,caseFold:!0},ye={autoSelfClosers:{},implicitlyClosed:{},contextGrabbers:{},doNotIndent:{},allowUnquoted:!1,allowMissing:!1,allowMissingTagName:!1,caseFold:!1};Ft.defineMode("xml",function(Be,Se){var Rt=Be.indentUnit,ie={},je=Se.htmlMode?se:ye;for(var ce in je)ie[ce]=je[ce];for(var ce in Se)ie[ce]=Se[ce];var Vt,Qe;function Qt(oe,Re){function Ye(wn){return Re.tokenize=wn,wn(oe,Re)}var en=oe.next();if(en=="<")return oe.eat("!")?oe.eat("[")?oe.match("CDATA[")?Ye(nt("atom","]]>")):null:oe.match("--")?Ye(nt("comment","-->")):oe.match("DOCTYPE",!0,!0)?(oe.eatWhile(/[\w\._\-]/),Ye(et(1))):null:oe.eat("?")?(oe.eatWhile(/[\w\._\-]/),Re.tokenize=nt("meta","?>"),"meta"):(Vt=oe.eat("/")?"closeTag":"openTag",Re.tokenize=Je,"tag bracket");if(en=="&"){var Rn;return oe.eat("#")?oe.eat("x")?Rn=oe.eatWhile(/[a-fA-F\d]/)&&oe.eat(";"):Rn=oe.eatWhile(/[\d]/)&&oe.eat(";"):Rn=oe.eatWhile(/[\w\.\-:]/)&&oe.eat(";"),Rn?"atom":"error"}else return oe.eatWhile(/[^&<]/),null}Qt.isInText=!0;function Je(oe,Re){var Ye=oe.next();if(Ye==">"||Ye=="/"&&oe.eat(">"))return Re.tokenize=Qt,Vt=Ye==">"?"endTag":"selfcloseTag","tag bracket";if(Ye=="=")return Vt="equals",null;if(Ye=="<"){Re.tokenize=Qt,Re.state=vt,Re.tagName=Re.tagStart=null;var en=Re.tokenize(oe,Re);return en?en+" tag error":"tag error"}else return/[\'\"]/.test(Ye)?(Re.tokenize=Nt(Ye),Re.stringStartCol=oe.column(),Re.tokenize(oe,Re)):(oe.match(/^[^\s\u00a0=<>\"\']*[^\s\u00a0=<>\"\'\/]/),"word")}function Nt(oe){var Re=function(Ye,en){for(;!Ye.eol();)if(Ye.next()==oe){en.tokenize=Je;break}return"string"};return Re.isInAttribute=!0,Re}function nt(oe,Re){return function(Ye,en){for(;!Ye.eol();){if(Ye.match(Re)){en.tokenize=Qt;break}Ye.next()}return oe}}function et(oe){return function(Re,Ye){for(var en;(en=Re.next())!=null;){if(en=="<")return Ye.tokenize=et(oe+1),Ye.tokenize(Re,Ye);if(en==">")if(oe==1){Ye.tokenize=Qt;break}else return Ye.tokenize=et(oe-1),Ye.tokenize(Re,Ye)}return"meta"}}function ct(oe,Re,Ye){this.prev=oe.context,this.tagName=Re,this.indent=oe.indented,this.startOfLine=Ye,(ie.doNotIndent.hasOwnProperty(Re)||oe.context&&oe.context.noIndent)&&(this.noIndent=!0)}function lt(oe){oe.context&&(oe.context=oe.context.prev)}function pt(oe,Re){for(var Ye;;){if(!oe.context||(Ye=oe.context.tagName,!ie.contextGrabbers.hasOwnProperty(Ye)||!ie.contextGrabbers[Ye].hasOwnProperty(Re)))return;lt(oe)}}function vt(oe,Re,Ye){return oe=="openTag"?(Ye.tagStart=Re.column(),xt):oe=="closeTag"?Lt:vt}function xt(oe,Re,Ye){return oe=="word"?(Ye.tagName=Re.current(),Qe="tag",te):ie.allowMissingTagName&&oe=="endTag"?(Qe="tag bracket",te(oe,Re,Ye)):(Qe="error",xt)}function Lt(oe,Re,Ye){if(oe=="word"){var en=Re.current();return Ye.context&&Ye.context.tagName!=en&&ie.implicitlyClosed.hasOwnProperty(Ye.context.tagName)&<(Ye),Ye.context&&Ye.context.tagName==en||ie.matchClosing===!1?(Qe="tag",Ot):(Qe="tag error",Ht)}else return ie.allowMissingTagName&&oe=="endTag"?(Qe="tag bracket",Ot(oe,Re,Ye)):(Qe="error",Ht)}function Ot(oe,Re,Ye){return oe!="endTag"?(Qe="error",Ot):(lt(Ye),vt)}function Ht(oe,Re,Ye){return Qe="error",Ot(oe,Re,Ye)}function te(oe,Re,Ye){if(oe=="word")return Qe="attribute",_t;if(oe=="endTag"||oe=="selfcloseTag"){var en=Ye.tagName,Rn=Ye.tagStart;return Ye.tagName=Ye.tagStart=null,oe=="selfcloseTag"||ie.autoSelfClosers.hasOwnProperty(en)?pt(Ye,en):(pt(Ye,en),Ye.context=new ct(Ye,en,Rn==Ye.indented)),vt}return Qe="error",te}function _t(oe,Re,Ye){return oe=="equals"?Xt:(ie.allowMissing||(Qe="error"),te(oe,Re,Ye))}function Xt(oe,Re,Ye){return oe=="string"?ve:oe=="word"&&ie.allowUnquoted?(Qe="string",te):(Qe="error",te(oe,Re,Ye))}function ve(oe,Re,Ye){return oe=="string"?ve:te(oe,Re,Ye)}return{startState:function(oe){var Re={tokenize:Qt,state:vt,indented:oe||0,tagName:null,tagStart:null,context:null};return oe!=null&&(Re.baseIndent=oe),Re},token:function(oe,Re){if(!Re.tagName&&oe.sol()&&(Re.indented=oe.indentation()),oe.eatSpace())return null;Vt=null;var Ye=Re.tokenize(oe,Re);return(Ye||Vt)&&Ye!="comment"&&(Qe=null,Re.state=Re.state(Vt||Ye,oe,Re),Qe&&(Ye=Qe=="error"?Ye+" error":Qe)),Ye},indent:function(oe,Re,Ye){var en=oe.context;if(oe.tokenize.isInAttribute)return oe.tagStart==oe.indented?oe.stringStartCol+1:oe.indented+Rt;if(en&&en.noIndent)return Ft.Pass;if(oe.tokenize!=Je&&oe.tokenize!=Qt)return Ye?Ye.match(/^(\s*)/)[0].length:0;if(oe.tagName)return ie.multilineTagIndentPastTag!==!1?oe.tagStart+oe.tagName.length+2:oe.tagStart+Rt*(ie.multilineTagIndentFactor||1);if(ie.alignCDATA&&/<!\[CDATA\[/.test(Re))return 0;var Rn=Re&&/^<(\/)?([\w_:\.-]*)/.exec(Re);if(Rn&&Rn[1])for(;en;)if(en.tagName==Rn[2]){en=en.prev;break}else if(ie.implicitlyClosed.hasOwnProperty(en.tagName))en=en.prev;else break;else if(Rn)for(;en;){var wn=ie.contextGrabbers[en.tagName];if(wn&&wn.hasOwnProperty(Rn[2]))en=en.prev;else break}for(;en&&en.prev&&!en.startOfLine;)en=en.prev;return en?en.indent+Rt:oe.baseIndent||0},electricInput:/<\/[\s\w:]+>$/,blockCommentStart:"<!--",blockCommentEnd:"-->",configuration:ie.htmlMode?"html":"xml",helperType:ie.htmlMode?"html":"xml",skipAttribute:function(oe){oe.state==Xt&&(oe.state=te)},xmlCurrentTag:function(oe){return oe.tagName?{name:oe.tagName,close:oe.type=="closeTag"}:null},xmlCurrentContext:function(oe){for(var Re=[],Ye=oe.context;Ye;Ye=Ye.prev)Ye.tagName&&Re.push(Ye.tagName);return Re.reverse()}}}),Ft.defineMIME("text/xml","xml"),Ft.defineMIME("application/xml","xml"),Ft.mimeModes.hasOwnProperty("text/html")||Ft.defineMIME("text/html",{name:"xml",htmlMode:!0})})},12378:function(Tn,oi,Dt){"use strict";Dt.d(oi,{$u:function(){return ce},BD:function(){return Tt},E9:function(){return je},FF:function(){return Ki},FJ:function(){return vt},Hn:function(){return pt},KX:function(){return Lt},NB:function(){return ee},S0:function(){return re},UL:function(){return Vt},Vk:function(){return lt},Vm:function(){return pe},YI:function(){return hn},ZA:function(){return ye},Zt:function(){return Qe},al:function(){return kt},bn:function(){return zt},bx:function(){return Et},g2:function(){return di},h1:function(){return Xt},hD:function(){return An},l4:function(){return Rt},rU:function(){return de},s_:function(){return St},uz:function(){return _e},z6:function(){return Qt}}),Tn=Dt.hmd(Tn),function(){var Pt;function ni(a){var y=0;return function(){return y<a.length?{done:!1,value:a[y++]}:{done:!0}}}function Si(a){var y=typeof Symbol!="undefined"&&Symbol.iterator&&a[Symbol.iterator];return y?y.call(a):{next:ni(a)}}function on(a){for(var y,x=[];!(y=a.next()).done;)x.push(y.value);return x}var dn=typeof Object.create=="function"?Object.create:function(a){function y(){}return y.prototype=a,new y},pn;if(typeof Object.setPrototypeOf=="function")pn=Object.setPrototypeOf;else{var _n;t:{var Di={a:!0},Bi={};try{Bi.__proto__=Di,_n=Bi.a;break t}catch(a){}_n=!1}pn=_n?function(a,y){if(a.__proto__=y,a.__proto__!==y)throw new TypeError(a+" is not extensible");return a}:null}var me=pn;function we(a,y){if(a.prototype=dn(y.prototype),a.prototype.constructor=a,me)me(a,y);else for(var x in y)if(x!="prototype")if(Object.defineProperties){var E=Object.getOwnPropertyDescriptor(y,x);E&&Object.defineProperty(a,x,E)}else a[x]=y[x];a.QA=y.prototype}var ge=typeof Dt.g!="undefined"&&Dt.g!=null?Dt.g:self,Wn=typeof Object.assign=="function"?Object.assign:function(a,y){for(var x=1;x<arguments.length;x++){var E=arguments[x];if(E)for(var b in E)Object.prototype.hasOwnProperty.call(E,b)&&(a[b]=E[b])}return a},ai=typeof Object.defineProperties=="function"?Object.defineProperty:function(a,y,x){a!=Array.prototype&&a!=Object.prototype&&(a[y]=x.value)};function si(a,y){if(y){var x=ge;a=a.split(".");for(var E=0;E<a.length-1;E++){var b=a[E];b in x||(x[b]={}),x=x[b]}a=a[a.length-1],E=x[a],y=y(E),y!=E&&y!=null&&ai(x,a,{writable:!0,value:y})}}si("Object.assign",function(a){return a||Wn}),si("Array.prototype.fill",function(a){return a||function(y,x,E){var b=this.length||0;for(0>x&&(x=Math.max(0,b+x)),(E==null||E>b)&&(E=b),E=Number(E),0>E&&(E=Math.max(0,b+E)),x=Number(x||0);x<E;x++)this[x]=y;return this}});var ln=typeof globalThis=="object"&&globalThis||typeof Dt.g=="object"&&Dt.g.global===Dt.g&&Dt.g||typeof self=="object"&&self.self===self&&self||{};ln.requestAnimationFrame===void 0&&(ln.setImmediate===void 0?ln.requestAnimationFrame=function(a){ln.setTimeout(a,0)}:ln.requestAnimationFrame=ln.setImmediate);function jn(){}function ii(a,y){var x=-1;return function(){var E=this,b=arguments;x!==-1&&ln.clearTimeout(x),x=ki(function(){x=-1,a.apply(E,b)},y)}}function ki(a,y){return ln.setTimeout(a,y)}function Ri(a){return ln.document.createElement(a)}function Gt(a){throw Error(a)}function fe(a,y){a="The object is frozen, so its properties cannot be set: "+a.toString(),y!==void 0&&(a+=" to value: "+y),Gt(a)}function Mn(a,y,x,E){x=x===null?"*":typeof x=="string"?x:typeof x=="function"&&typeof x.className=="string"?x.className:"",E!==void 0&&(x+="."+E),Gt(x+" is not in the range "+y+": "+a)}function zn(a){ln.console&&ln.console.log(a)}function De(a){return typeof a=="object"&&a!==null}function kn(a){return Array.isArray(a)||ln.NodeList&&a instanceof ln.NodeList||ln.HTMLCollection&&a instanceof ln.HTMLCollection}function Sn(a){return Array.prototype.slice.call(a)}function Fn(a,y,x){Array.isArray(a)?y>=a.length?a.push(x):a.splice(y,0,x):Gt("Cannot insert an object into an HTMLCollection or NodeList: "+x+" at "+y)}function ei(a,y){Array.isArray(a)?y>=a.length?a.pop():a.splice(y,1):Gt("Cannot remove an object from an HTMLCollection or NodeList at "+y)}function On(){var a=br.pop();return a===void 0?[]:a}function Qn(a){a.length=0,br.push(a)}function Yn(a){if(typeof a=="function"){if(a.className)return a.className;if(a.name)return a.name;var y=a.toString();if(y=y.substring(9,y.indexOf("(")).trim(),y!=="")return a._className=y}else if(De(a)&&a.constructor)return Yn(a.constructor);return typeof a}function Ni(a){var y=a;return De(a)&&(a.text?y=a.text:a.name?y=a.name:a.key!==void 0?y=a.key:a.id!==void 0?y=a.id:a.constructor===Object&&(a.Text?y=a.Text:a.Name?y=a.Name:a.Key!==void 0?y=a.Key:a.Id!==void 0?y=a.Id:a.ID!==void 0&&(y=a.ID))),y===void 0?"undefined":y===null?"null":y.toString()}function Pi(a,y){if(a.hasOwnProperty(y))return!0;for(a=Object.getPrototypeOf(a);a&&a!==Function;){if(a.hasOwnProperty(y))return!0;var x=a.CA;if(x&&x[y])return!0;a=Object.getPrototypeOf(a)}return!1}function bi(a,y,x){Object.defineProperty(qr.prototype,a,{get:y,set:x})}function Ge(a){for(var y=[],x=0;256>x;x++)y["0123456789abcdef".charAt(x>>4)+"0123456789abcdef".charAt(x&15)]=String.fromCharCode(x);a.length%2&&(a="0"+a),x=[];for(var E=0,b=0;b<a.length;b+=2)x[E++]=y[a.substr(b,2)];for(a=x.join(""),a=a===""?"0":a,y=[],x=0;256>x;x++)y[x]=x;for(x=E=0;256>x;x++)E=(E+y[x]+119)%256,b=y[x],y[x]=y[E],y[E]=b;E=x=0;for(var z="",tt=0;tt<a.length;tt++)x=(x+1)%256,E=(E+y[x])%256,b=y[x],y[x]=y[E],y[E]=b,z+=String.fromCharCode(a.charCodeAt(tt)^y[(y[x]+y[E])%256]);return z.indexOf("GoJS 2.1 evaluation")>-1||z.indexOf("\xA9 1998-2021 Northwoods Software")>-1||z.indexOf("Not for distribution or production use")>-1||z.indexOf("gojs.net")>-1?"":z}var Xi=ln.navigator!==void 0&&0<ln.navigator.userAgent.indexOf("Trident/7"),dr=ln.navigator!==void 0&&ln.navigator.platform!==void 0&&ln.navigator.platform.match(/(iPhone|iPod|iPad|Mac)/i)!==null,br=[];Object.freeze([]),jn.className="Util",jn.Dx="32ab5ff3b26f42dc0ed90f21472913b5",jn.adym="gojs.net",jn.vfo="28e645fdb266",jn.className="Util";function Ue(a,y,x){xi(this),this.j=a,this.xa=y,this.o=x}Ue.prototype.toString=function(){return"EnumValue."+this.xa};function Vn(a,y){return y==null||y===""?null:a[y]}ge.Object.defineProperties(Ue.prototype,{classType:{get:function(){return this.j}},name:{get:function(){return this.xa}},value:{get:function(){return this.o}}}),Ue.className="EnumValue";function vi(){this.ew=[]}vi.prototype.toString=function(){return this.ew.join("")},vi.prototype.add=function(a){a!==""&&this.ew.push(a)},vi.className="StringBuilder";function pi(){}pi.className="PropertyCollection";var Fi={EA:!1,JA:!1,GA:!1,IA:!1,NA:!1,LA:!1,nx:!1,FA:null,trace:function(a){ln.console&&ln.console.log(a)},HA:function(a,y,x,E){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(x,x),a.transform(y.m11,y.m12,y.m21,y.m22,y.dx,y.dy),a.lineWidth=2,a.beginPath(),a.moveTo(E.left,E.top+20),a.lineTo(E.left,E.top),a.lineTo(E.left+20,E.top),a.moveTo(E.right,E.bottom-20),a.lineTo(E.right,E.bottom),a.lineTo(E.right-20,E.bottom),a.stroke(),a.fillText("DB: "+Math.round(E.x)+", "+Math.round(E.y)+", "+Math.round(E.width)+", "+Math.round(E.height),E.left,E.top-5)},DA:function(a){var y={},x;for(x in a){if(y.x=x,y.x!=="licenseKey"){var E=a[y.x];if(E.prototype!==void 0){y.Zl=Object.getOwnPropertyNames(E.prototype);for(var b={Tj:0};b.Tj<y.Zl.length;b={Tj:b.Tj},b.Tj++){var z=Object.getOwnPropertyDescriptor(E.prototype,y.Zl[b.Tj]);z.get!==void 0&&z.set===void 0&&Object.defineProperty(E.prototype,y.Zl[b.Tj],{set:function(tt,rt){return function(){throw Error("Property "+tt.Zl[rt.Tj]+" of "+tt.x+" is read-only.")}}(y,b)})}}}y={Zl:y.Zl,x:y.x}}}};function Wi(){}Wi.prototype.reset=function(){},Wi.prototype.next=function(){return!1},Wi.prototype.Ad=function(){return!1},Wi.prototype.first=function(){return null},Wi.prototype.any=function(){return!1},Wi.prototype.all=function(){return!0},Wi.prototype.each=function(){return this},Wi.prototype.map=function(){return this},Wi.prototype.filter=function(){return this},Wi.prototype.de=function(){},Wi.prototype.toString=function(){return"EmptyIterator"},ge.Object.defineProperties(Wi.prototype,{iterator:{get:function(){return this}},count:{get:function(){return 0}}}),Wi.prototype.first=Wi.prototype.first,Wi.prototype.hasNext=Wi.prototype.Ad,Wi.prototype.next=Wi.prototype.next,Wi.prototype.reset=Wi.prototype.reset;var Vi=null;Wi.className="EmptyIterator",Vi=new Wi;function pr(a){this.key=-1,this.value=a}pr.prototype.reset=function(){this.key=-1},pr.prototype.next=function(){return this.key===-1?(this.key=0,!0):!1},pr.prototype.Ad=function(){return this.next()},pr.prototype.first=function(){return this.key=0,this.value},pr.prototype.any=function(a){return this.key=-1,a(this.value)},pr.prototype.all=function(a){return this.key=-1,a(this.value)},pr.prototype.each=function(a){return this.key=-1,a(this.value),this},pr.prototype.map=function(a){return new pr(a(this.value))},pr.prototype.filter=function(a){return a(this.value)?new pr(this.value):Vi},pr.prototype.de=function(){this.value=null},pr.prototype.toString=function(){return"SingletonIterator("+this.value+")"},ge.Object.defineProperties(pr.prototype,{iterator:{get:function(){return this}},count:{get:function(){return 1}}}),pr.prototype.first=pr.prototype.first,pr.prototype.hasNext=pr.prototype.Ad,pr.prototype.next=pr.prototype.next,pr.prototype.reset=pr.prototype.reset,pr.className="SingletonIterator";function or(a){this.Bb=a,this.qf=null,a.Sa=null,this.qa=a.Ja,this.Za=-1}or.prototype.reset=function(){var a=this.Bb;a.Sa=null,this.qa=a.Ja,this.Za=-1},or.prototype.next=function(){var a=this.Bb;if(a.Ja!==this.qa&&0>this.key)return!1;a=a.s;var y=a.length,x=++this.Za,E=this.qf;if(E!==null)for(;x<y;){var b=a[x];if(E(b))return this.key=this.Za=x,this.value=b,!0;x++}else{if(x<y)return this.key=x,this.value=a[x],!0;this.de()}return!1},or.prototype.Ad=function(){return this.next()},or.prototype.first=function(){var a=this.Bb;this.qa=a.Ja,this.Za=0,a=a.s;var y=a.length,x=this.qf;if(x!==null){for(var E=0;E<y;){var b=a[E];if(x(b))return this.key=this.Za=E,this.value=b;E++}return null}return 0<y?(a=a[0],this.key=0,this.value=a):null},or.prototype.any=function(a){var y=this.Bb;y.Sa=null,this.Za=-1,y=y.s;for(var x=y.length,E=this.qf,b=0;b<x;b++){var z=y[b];if((E===null||E(z))&&a(z))return!0}return!1},or.prototype.all=function(a){var y=this.Bb;y.Sa=null,this.Za=-1,y=y.s;for(var x=y.length,E=this.qf,b=0;b<x;b++){var z=y[b];if((E===null||E(z))&&!a(z))return!1}return!0},or.prototype.each=function(a){var y=this.Bb;y.Sa=null,this.Za=-1,y=y.s;for(var x=y.length,E=this.qf,b=0;b<x;b++){var z=y[b];(E===null||E(z))&&a(z)}return this},or.prototype.map=function(a){var y=this.Bb;y.Sa=null,this.Za=-1;var x=[];y=y.s;for(var E=y.length,b=this.qf,z=0;z<E;z++){var tt=y[z];(b===null||b(tt))&&x.push(a(tt))}return a=new Xe,a.s=x,a.xb(),a.iterator},or.prototype.filter=function(a){var y=this.Bb;y.Sa=null,this.Za=-1;var x=[];y=y.s;for(var E=y.length,b=this.qf,z=0;z<E;z++){var tt=y[z];(b===null||b(tt))&&a(tt)&&x.push(tt)}return a=new Xe,a.s=x,a.xb(),a.iterator},or.prototype.de=function(){this.key=-1,this.value=null,this.qa=-1,this.qf=null,this.Bb.Sa=this},or.prototype.toString=function(){return"ListIterator@"+this.Za+"/"+this.Bb.count},ge.Object.defineProperties(or.prototype,{iterator:{get:function(){return this}},predicate:{get:function(){return this.qf},set:function(a){this.qf=a}},count:{get:function(){var a=this.qf;if(a!==null){for(var y=0,x=this.Bb.s,E=x.length,b=0;b<E;b++)a(x[b])&&y++;return y}return this.Bb.s.length}}}),or.prototype.first=or.prototype.first,or.prototype.hasNext=or.prototype.Ad,or.prototype.next=or.prototype.next,or.prototype.reset=or.prototype.reset,or.className="ListIterator";function hr(a){this.Bb=a,a.Hg=null,this.qa=a.Ja,this.Za=a.s.length}hr.prototype.reset=function(){var a=this.Bb;a.Hg=null,this.qa=a.Ja,this.Za=a.s.length},hr.prototype.next=function(){var a=this.Bb;if(a.Ja!==this.qa&&0>this.key)return!1;var y=--this.Za;return 0<=y?(this.key=y,this.value=a.s[y],!0):(this.de(),!1)},hr.prototype.Ad=function(){return this.next()},hr.prototype.first=function(){var a=this.Bb;this.qa=a.Ja;var y=a.s;return this.Za=a=y.length-1,0<=a?(y=y[a],this.key=a,this.value=y):null},hr.prototype.any=function(a){var y=this.Bb;y.Hg=null,y=y.s;var x=y.length;for(this.Za=x,--x;0<=x;x--)if(a(y[x]))return!0;return!1},hr.prototype.all=function(a){var y=this.Bb;y.Hg=null,y=y.s;var x=y.length;for(this.Za=x,--x;0<=x;x--)if(!a(y[x]))return!1;return!0},hr.prototype.each=function(a){var y=this.Bb;y.Hg=null,y=y.s;var x=y.length;for(this.Za=x,--x;0<=x;x--)a(y[x]);return this},hr.prototype.map=function(a){var y=this.Bb;y.Hg=null;var x=[];y=y.s;var E=y.length;for(this.Za=E,--E;0<=E;E--)x.push(a(y[E]));return a=new Xe,a.s=x,a.xb(),a.iterator},hr.prototype.filter=function(a){var y=this.Bb;y.Hg=null;var x=[];y=y.s;var E=y.length;for(this.Za=E,--E;0<=E;E--){var b=y[E];a(b)&&x.push(b)}return a=new Xe,a.s=x,a.xb(),a.iterator},hr.prototype.de=function(){this.key=-1,this.value=null,this.qa=-1,this.Bb.Hg=this},hr.prototype.toString=function(){return"ListIteratorBackwards("+this.Za+"/"+this.Bb.count+")"},ge.Object.defineProperties(hr.prototype,{iterator:{get:function(){return this}},count:{get:function(){return this.Bb.s.length}}}),hr.prototype.first=hr.prototype.first,hr.prototype.hasNext=hr.prototype.Ad,hr.prototype.next=hr.prototype.next,hr.prototype.reset=hr.prototype.reset,hr.className="ListIteratorBackwards";function Xe(a){xi(this),this._isFrozen=!1,this.s=[],this.Ja=0,this.Hg=this.Sa=null,typeof a=="string"&&Gt("Error: Since 2.0 List/Map/Set constructors no longer take an argument that enforces type."),a!==void 0&&this.addAll(a)}Pt=Xe.prototype,Pt.xb=function(){var a=this.Ja;a++,999999999<a&&(a=0),this.Ja=a},Pt.freeze=function(){return this._isFrozen=!0,this},Pt.ka=function(){return this._isFrozen=!1,this},Pt.toString=function(){return"List()#"+fr(this)},Pt.add=function(a){return a===null?this:(this._isFrozen&&fe(this,a),this.s.push(a),this.xb(),this)},Pt.push=function(a){this.add(a)},Pt.addAll=function(a){if(a===null)return this;this._isFrozen&&fe(this);var y=this.s;if(kn(a))for(var x=a.length,E=0;E<x;E++)y.push(a[E]);else for(a=a.iterator;a.next();)y.push(a.value);return this.xb(),this},Pt.clear=function(){this._isFrozen&&fe(this),this.s.length=0,this.xb()},Pt.contains=function(a){return a===null?!1:this.s.indexOf(a)!==-1},Pt.has=function(a){return this.contains(a)},Pt.indexOf=function(a){return a===null?-1:this.s.indexOf(a)},Pt.M=function(a){var y=this.s;return(0>a||a>=y.length)&&Mn(a,"0 <= i < length",Xe,"elt:i"),y[a]},Pt.get=function(a){return this.M(a)},Pt.cd=function(a,y){var x=this.s;(0>a||a>=x.length)&&Mn(a,"0 <= i < length",Xe,"setElt:i"),this._isFrozen&&fe(this,a),x[a]=y},Pt.set=function(a,y){this.cd(a,y)},Pt.first=function(){var a=this.s;return a.length===0?null:a[0]},Pt.jc=function(){var a=this.s,y=a.length;return 0<y?a[y-1]:null},Pt.pop=function(){this._isFrozen&&fe(this);var a=this.s;return 0<a.length?a.pop():null},Xe.prototype.any=function(a){for(var y=this.s,x=y.length,E=0;E<x;E++)if(a(y[E]))return!0;return!1},Xe.prototype.all=function(a){for(var y=this.s,x=y.length,E=0;E<x;E++)if(!a(y[E]))return!1;return!0},Xe.prototype.each=function(a){for(var y=this.s,x=y.length,E=0;E<x;E++)a(y[E]);return this},Xe.prototype.map=function(a){for(var y=new Xe,x=[],E=this.s,b=E.length,z=0;z<b;z++)x.push(a(E[z]));return y.s=x,y.xb(),y},Xe.prototype.filter=function(a){for(var y=new Xe,x=[],E=this.s,b=E.length,z=0;z<b;z++){var tt=E[z];a(tt)&&x.push(tt)}return y.s=x,y.xb(),y},Pt=Xe.prototype,Pt.Gb=function(a,y){0>a&&Mn(a,">= 0",Xe,"insertAt:i"),this._isFrozen&&fe(this,a);var x=this.s;a>=x.length?x.push(y):x.splice(a,0,y),this.xb()},Pt.remove=function(a){if(a===null)return!1;this._isFrozen&&fe(this,a);var y=this.s;return a=y.indexOf(a),a===-1?!1:(a===y.length-1?y.pop():y.splice(a,1),this.xb(),!0)},Pt.delete=function(a){return this.remove(a)},Pt.mb=function(a){var y=this.s;(0>a||a>=y.length)&&Mn(a,"0 <= i < length",Xe,"removeAt:i"),this._isFrozen&&fe(this,a),a===y.length-1?y.pop():y.splice(a,1),this.xb()},Pt.removeRange=function(a,y){var x=this.s,E=x.length;if(0>a)a=0;else if(a>=E)return this;if(0>y)return this;if(y>=E&&(y=E-1),a>y)return this;this._isFrozen&&fe(this);for(var b=a,z=y+1;z<E;)x[b++]=x[z++];return x.length=E-(y-a+1),this.xb(),this},Xe.prototype.copy=function(){var a=new Xe,y=this.s;return 0<y.length&&(a.s=Array.prototype.slice.call(y)),a},Pt=Xe.prototype,Pt.Fa=function(){for(var a=this.s,y=this.count,x=Array(y),E=0;E<y;E++)x[E]=a[E];return x},Pt.Iv=function(){for(var a=new qe,y=this.s,x=this.count,E=0;E<x;E++)a.add(y[E]);return a},Pt.sort=function(a){return this._isFrozen&&fe(this),this.s.sort(a),this.xb(),this},Pt.zi=function(a,y,x){var E=this.s,b=E.length;y===void 0&&(y=0),x===void 0&&(x=b),this._isFrozen&&fe(this);var z=x-y;if(1>=z)return this;if((0>y||y>=b-1)&&Mn(y,"0 <= from < length",Xe,"sortRange:from"),z===2)return x=E[y],b=E[y+1],0<a(x,b)&&(E[y]=b,E[y+1]=x,this.xb()),this;if(y===0)if(x>=b)E.sort(a);else for(y=E.slice(0,x),y.sort(a),a=0;a<x;a++)E[a]=y[a];else if(x>=b)for(x=E.slice(y),x.sort(a),a=y;a<b;a++)E[a]=x[a-y];else for(b=E.slice(y,x),b.sort(a),a=y;a<x;a++)E[a]=b[a-y];return this.xb(),this},Pt.reverse=function(){return this._isFrozen&&fe(this),this.s.reverse(),this.xb(),this},ge.Object.defineProperties(Xe.prototype,{_dataArray:{get:function(){return this.s}},count:{get:function(){return this.s.length}},size:{get:function(){return this.s.length}},length:{get:function(){return this.s.length}},iterator:{get:function(){if(0>=this.s.length)return Vi;var a=this.Sa;return a!==null?(a.reset(),a):new or(this)}},iteratorBackwards:{get:function(){if(0>=this.s.length)return Vi;var a=this.Hg;return a!==null?(a.reset(),a):new hr(this)}}}),Xe.prototype.reverse=Xe.prototype.reverse,Xe.prototype.sortRange=Xe.prototype.zi,Xe.prototype.sort=Xe.prototype.sort,Xe.prototype.toSet=Xe.prototype.Iv,Xe.prototype.toArray=Xe.prototype.Fa,Xe.prototype.removeRange=Xe.prototype.removeRange,Xe.prototype.removeAt=Xe.prototype.mb,Xe.prototype.delete=Xe.prototype.delete,Xe.prototype.remove=Xe.prototype.remove,Xe.prototype.insertAt=Xe.prototype.Gb,Xe.prototype.pop=Xe.prototype.pop,Xe.prototype.last=Xe.prototype.jc,Xe.prototype.first=Xe.prototype.first,Xe.prototype.set=Xe.prototype.set,Xe.prototype.setElt=Xe.prototype.cd,Xe.prototype.get=Xe.prototype.get,Xe.prototype.elt=Xe.prototype.M,Xe.prototype.indexOf=Xe.prototype.indexOf,Xe.prototype.has=Xe.prototype.has,Xe.prototype.contains=Xe.prototype.contains,Xe.prototype.clear=Xe.prototype.clear,Xe.prototype.addAll=Xe.prototype.addAll,Xe.prototype.push=Xe.prototype.push,Xe.prototype.add=Xe.prototype.add,Xe.prototype.thaw=Xe.prototype.ka,Xe.prototype.freeze=Xe.prototype.freeze,Xe.className="List";function nr(a){this.eg=a,a.Sa=null,this.qa=a.Ja,this.sa=null}nr.prototype.reset=function(){var a=this.eg;a.Sa=null,this.qa=a.Ja,this.sa=null},nr.prototype.next=function(){var a=this.eg;if(a.Ja!==this.qa&&this.key===null)return!1;var y=this.sa;return y=y===null?a.ea:y.va,y!==null?(this.sa=y,this.value=y.value,this.key=y.key,!0):(this.de(),!1)},nr.prototype.Ad=function(){return this.next()},nr.prototype.first=function(){var a=this.eg;if(this.qa=a.Ja,a=a.ea,a!==null){this.sa=a;var y=a.value;return this.key=a.key,this.value=y}return null},nr.prototype.any=function(a){var y=this.eg;for(this.sa=y.Sa=null,y=y.ea;y!==null;){if(a(y.value))return!0;y=y.va}return!1},nr.prototype.all=function(a){var y=this.eg;for(this.sa=y.Sa=null,y=y.ea;y!==null;){if(!a(y.value))return!1;y=y.va}return!0},nr.prototype.each=function(a){var y=this.eg;for(this.sa=y.Sa=null,y=y.ea;y!==null;)a(y.value),y=y.va;return this},nr.prototype.map=function(a){var y=this.eg;y.Sa=null;var x=new Xe;for(y=y.ea;y!==null;)x.add(a(y.value)),y=y.va;return x.iterator},nr.prototype.filter=function(a){var y=this.eg;y.Sa=null;var x=new Xe;for(y=y.ea;y!==null;){var E=y.value;a(E)&&x.add(E),y=y.va}return x.iterator},nr.prototype.de=function(){this.value=this.key=null,this.qa=-1,this.eg.Sa=this},nr.prototype.toString=function(){return this.sa!==null?"SetIterator@"+this.sa.value:"SetIterator"},ge.Object.defineProperties(nr.prototype,{iterator:{get:function(){return this}},count:{get:function(){return this.eg.Sb}}}),nr.prototype.first=nr.prototype.first,nr.prototype.hasNext=nr.prototype.Ad,nr.prototype.next=nr.prototype.next,nr.prototype.reset=nr.prototype.reset,nr.className="SetIterator";function qe(a){xi(this),this._isFrozen=!1,this.Tb={},this.Sb=0,this.Sa=null,this.Ja=0,this.kf=this.ea=null,typeof a=="string"&&Gt("Error: Since 2.0 List/Map/Set constructors no longer take an argument that enforces type."),a!==void 0&&this.addAll(a)}Pt=qe.prototype,Pt.xb=function(){var a=this.Ja;a++,999999999<a&&(a=0),this.Ja=a},Pt.freeze=function(){return this._isFrozen=!0,this},Pt.ka=function(){return this._isFrozen=!1,this},Pt.toString=function(){return"Set()#"+fr(this)},Pt.add=function(a){if(a===null)return this;this._isFrozen&&fe(this,a);var y=a;return De(a)&&(y=ir(a)),this.Tb[y]===void 0&&(this.Sb++,a=new Ae(a,a),this.Tb[y]=a,y=this.kf,y===null?this.ea=a:(a.ll=y,y.va=a),this.kf=a,this.xb()),this},Pt.addAll=function(a){if(a===null)return this;if(this._isFrozen&&fe(this),kn(a))for(var y=a.length,x=0;x<y;x++)this.add(a[x]);else for(a=a.iterator;a.next();)this.add(a.value);return this},Pt.contains=function(a){if(a===null)return!1;var y=a;return De(a)&&(y=fr(a),y===void 0)?!1:this.Tb[y]!==void 0},Pt.has=function(a){return this.contains(a)},Pt.Sy=function(a){if(a===null)return!0;for(a=a.iterator;a.next();)if(!this.contains(a.value))return!1;return!0},Pt.Ty=function(a){if(a===null)return!0;for(a=a.iterator;a.next();)if(this.contains(a.value))return!0;return!1},Pt.first=function(){var a=this.ea;return a===null?null:a.value},qe.prototype.any=function(a){for(var y=this.ea;y!==null;){if(a(y.value))return!0;y=y.va}return!1},qe.prototype.all=function(a){for(var y=this.ea;y!==null;){if(!a(y.value))return!1;y=y.va}return!0},qe.prototype.each=function(a){for(var y=this.ea;y!==null;)a(y.value),y=y.va;return this},qe.prototype.map=function(a){for(var y=new qe,x=this.ea;x!==null;)y.add(a(x.value)),x=x.va;return y},qe.prototype.filter=function(a){for(var y=new qe,x=this.ea;x!==null;){var E=x.value;a(E)&&y.add(E),x=x.va}return y},Pt=qe.prototype,Pt.remove=function(a){if(a===null)return!1;this._isFrozen&&fe(this,a);var y=a;if(De(a)&&(y=fr(a),y===void 0)||(a=this.Tb[y],a===void 0))return!1;var x=a.va,E=a.ll;return x!==null&&(x.ll=E),E!==null&&(E.va=x),this.ea===a&&(this.ea=x),this.kf===a&&(this.kf=E),delete this.Tb[y],this.Sb--,this.xb(),!0},Pt.delete=function(a){return this.remove(a)},Pt.hp=function(a){if(a===null)return this;if(this._isFrozen&&fe(this),kn(a))for(var y=a.length,x=0;x<y;x++)this.remove(a[x]);else for(a=a.iterator;a.next();)this.remove(a.value);return this},Pt.pA=function(a){if(a===null||this.count===0)return this;this._isFrozen&&fe(this);var y=new qe;y.addAll(a),a=[];for(var x=this.iterator;x.next();){var E=x.value;y.contains(E)||a.push(E)}return this.hp(a),this},Pt.clear=function(){this._isFrozen&&fe(this),this.Tb={},this.Sb=0,this.Sa!==null&&this.Sa.reset(),this.kf=this.ea=null,this.xb()},qe.prototype.copy=function(){var a=new qe,y=this.Tb,x;for(x in y)a.add(y[x].value);return a},qe.prototype.Fa=function(){var a=Array(this.Sb),y=this.Tb,x=0,E;for(E in y)a[x]=y[E].value,x++;return a},qe.prototype.Hv=function(){var a=new Xe,y=this.Tb,x;for(x in y)a.add(y[x].value);return a};function xi(a){a.__gohashid=Br++}function ir(a){var y=a.__gohashid;return y===void 0&&(y=Br++,a.__gohashid=y),y}function fr(a){return a.__gohashid}ge.Object.defineProperties(qe.prototype,{count:{get:function(){return this.Sb}},size:{get:function(){return this.Sb}},iterator:{get:function(){if(0>=this.Sb)return Vi;var a=this.Sa;return a!==null?(a.reset(),a):new nr(this)}}}),qe.prototype.toList=qe.prototype.Hv,qe.prototype.toArray=qe.prototype.Fa,qe.prototype.clear=qe.prototype.clear,qe.prototype.retainAll=qe.prototype.pA,qe.prototype.removeAll=qe.prototype.hp,qe.prototype.delete=qe.prototype.delete,qe.prototype.remove=qe.prototype.remove,qe.prototype.first=qe.prototype.first,qe.prototype.containsAny=qe.prototype.Ty,qe.prototype.containsAll=qe.prototype.Sy,qe.prototype.has=qe.prototype.has,qe.prototype.contains=qe.prototype.contains,qe.prototype.addAll=qe.prototype.addAll,qe.prototype.add=qe.prototype.add,qe.prototype.thaw=qe.prototype.ka,qe.prototype.freeze=qe.prototype.freeze;var Br=1;qe.className="Set",qe.uniqueHash=xi,qe.hashIdUnique=ir,qe.hashId=fr;function kr(a){this.ma=a,this.qa=a.Ja,this.sa=null}kr.prototype.reset=function(){this.qa=this.ma.Ja,this.sa=null},kr.prototype.next=function(){var a=this.ma;if(a.Ja!==this.qa&&this.key===null)return!1;var y=this.sa;return y=y===null?a.ea:y.va,y!==null?(this.sa=y,this.value=this.key=a=y.key,!0):(this.de(),!1)},kr.prototype.Ad=function(){return this.next()},kr.prototype.first=function(){var a=this.ma;return this.qa=a.Ja,a=a.ea,a!==null?(this.sa=a,this.value=this.key=a=a.key):null},kr.prototype.any=function(a){var y=this.ma;for(this.sa=null,y=y.ea;y!==null;){if(a(y.key))return!0;y=y.va}return!1},kr.prototype.all=function(a){var y=this.ma;for(this.sa=null,y=y.ea;y!==null;){if(!a(y.key))return!1;y=y.va}return!0},kr.prototype.each=function(a){var y=this.ma;for(this.sa=null,y=y.ea;y!==null;)a(y.key),y=y.va;return this},kr.prototype.map=function(a){var y=this.ma;this.sa=null;var x=new Xe;for(y=y.ea;y!==null;)x.add(a(y.key)),y=y.va;return x.iterator},kr.prototype.filter=function(a){var y=this.ma;this.sa=null;var x=new Xe;for(y=y.ea;y!==null;){var E=y.key;a(E)&&x.add(E),y=y.va}return x.iterator},kr.prototype.de=function(){this.value=this.key=null,this.qa=-1},kr.prototype.toString=function(){return this.sa!==null?"MapKeySetIterator@"+this.sa.value:"MapKeySetIterator"},ge.Object.defineProperties(kr.prototype,{iterator:{get:function(){return this}},count:{get:function(){return this.ma.Sb}}}),kr.prototype.first=kr.prototype.first,kr.prototype.hasNext=kr.prototype.Ad,kr.prototype.next=kr.prototype.next,kr.prototype.reset=kr.prototype.reset,kr.className="MapKeySetIterator";function rr(a){qe.call(this),xi(this),this._isFrozen=!0,this.ma=a}we(rr,qe),Pt=rr.prototype,Pt.freeze=function(){return this},Pt.ka=function(){return this},Pt.toString=function(){return"MapKeySet("+this.ma.toString()+")"},Pt.add=function(){Gt("This Set is read-only: "+this.toString())},Pt.contains=function(a){return this.ma.contains(a)},Pt.has=function(a){return this.contains(a)},Pt.remove=function(){Gt("This Set is read-only: "+this.toString())},Pt.delete=function(a){return this.remove(a)},Pt.clear=function(){Gt("This Set is read-only: "+this.toString())},Pt.first=function(){var a=this.ma.ea;return a!==null?a.key:null},rr.prototype.any=function(a){for(var y=this.ma.ea;y!==null;){if(a(y.key))return!0;y=y.va}return!1},rr.prototype.all=function(a){for(var y=this.ma.ea;y!==null;){if(!a(y.key))return!1;y=y.va}return!0},rr.prototype.each=function(a){for(var y=this.ma.ea;y!==null;)a(y.key),y=y.va;return this},rr.prototype.map=function(a){for(var y=new qe,x=this.ma.ea;x!==null;)y.add(a(x.key)),x=x.va;return y},rr.prototype.filter=function(a){for(var y=new qe,x=this.ma.ea;x!==null;){var E=x.key;a(E)&&y.add(E),x=x.va}return y},rr.prototype.copy=function(){return new rr(this.ma)},rr.prototype.Iv=function(){var a=new qe,y=this.ma.Tb,x;for(x in y)a.add(y[x].key);return a},rr.prototype.Fa=function(){var a=this.ma.Tb,y=Array(this.ma.Sb),x=0,E;for(E in a)y[x]=a[E].key,x++;return y},rr.prototype.Hv=function(){var a=new Xe,y=this.ma.Tb,x;for(x in y)a.add(y[x].key);return a},ge.Object.defineProperties(rr.prototype,{count:{get:function(){return this.ma.Sb}},size:{get:function(){return this.ma.Sb}},iterator:{get:function(){return 0>=this.ma.Sb?Vi:new kr(this.ma)}}}),rr.prototype.toList=rr.prototype.Hv,rr.prototype.toArray=rr.prototype.Fa,rr.prototype.toSet=rr.prototype.Iv,rr.prototype.first=rr.prototype.first,rr.prototype.clear=rr.prototype.clear,rr.prototype.delete=rr.prototype.delete,rr.prototype.remove=rr.prototype.remove,rr.prototype.has=rr.prototype.has,rr.prototype.contains=rr.prototype.contains,rr.prototype.add=rr.prototype.add,rr.prototype.thaw=rr.prototype.ka,rr.prototype.freeze=rr.prototype.freeze,rr.className="MapKeySet";function Kr(a){this.ma=a,a.jf=null,this.qa=a.Ja,this.sa=null}Kr.prototype.reset=function(){var a=this.ma;a.jf=null,this.qa=a.Ja,this.sa=null},Kr.prototype.next=function(){var a=this.ma;if(a.Ja!==this.qa&&this.key===null)return!1;var y=this.sa;return y=y===null?a.ea:y.va,y!==null?(this.sa=y,this.value=y.value,this.key=y.key,!0):(this.de(),!1)},Kr.prototype.Ad=function(){return this.next()},Kr.prototype.first=function(){var a=this.ma;if(this.qa=a.Ja,a=a.ea,a!==null){this.sa=a;var y=a.value;return this.key=a.key,this.value=y}return null},Kr.prototype.any=function(a){var y=this.ma;for(this.sa=y.jf=null,y=y.ea;y!==null;){if(a(y.value))return!0;y=y.va}return!1},Kr.prototype.all=function(a){var y=this.ma;for(this.sa=y.jf=null,y=y.ea;y!==null;){if(!a(y.value))return!1;y=y.va}return!0},Kr.prototype.each=function(a){var y=this.ma;for(this.sa=y.jf=null,y=y.ea;y!==null;)a(y.value),y=y.va;return this},Kr.prototype.map=function(a){var y=this.ma;this.sa=y.jf=null;var x=new Xe;for(y=y.ea;y!==null;)x.add(a(y.value)),y=y.va;return x.iterator},Kr.prototype.filter=function(a){var y=this.ma;this.sa=y.jf=null;var x=new Xe;for(y=y.ea;y!==null;){var E=y.value;a(E)&&x.add(E),y=y.va}return x.iterator},Kr.prototype.de=function(){this.value=this.key=null,this.qa=-1,this.ma.jf=this},Kr.prototype.toString=function(){return this.sa!==null?"MapValueSetIterator@"+this.sa.value:"MapValueSetIterator"},ge.Object.defineProperties(Kr.prototype,{iterator:{get:function(){return this}},count:{get:function(){return this.ma.Sb}}}),Kr.prototype.first=Kr.prototype.first,Kr.prototype.hasNext=Kr.prototype.Ad,Kr.prototype.next=Kr.prototype.next,Kr.prototype.reset=Kr.prototype.reset,Kr.className="MapValueSetIterator";function Ae(a,y){this.key=a,this.value=y,this.ll=this.va=null}Ae.prototype.toString=function(){return"{"+this.key+":"+this.value+"}"},Ae.className="KeyValuePair";function gn(a){this.ma=a,a.Sa=null,this.qa=a.Ja,this.sa=null}gn.prototype.reset=function(){var a=this.ma;a.Sa=null,this.qa=a.Ja,this.sa=null},gn.prototype.next=function(){var a=this.ma;if(a.Ja!==this.qa&&this.key===null)return!1;var y=this.sa;return y=y===null?a.ea:y.va,y!==null?(this.sa=y,this.key=y.key,this.value=y.value,!0):(this.de(),!1)},gn.prototype.Ad=function(){return this.next()},gn.prototype.first=function(){var a=this.ma;return this.qa=a.Ja,a=a.ea,a!==null?(this.sa=a,this.key=a.key,this.value=a.value,a):null},gn.prototype.any=function(a){var y=this.ma;for(this.sa=y.Sa=null,y=y.ea;y!==null;){if(a(y))return!0;y=y.va}return!1},gn.prototype.all=function(a){var y=this.ma;for(this.sa=y.Sa=null,y=y.ea;y!==null;){if(!a(y))return!1;y=y.va}return!0},gn.prototype.each=function(a){var y=this.ma;for(this.sa=y.Sa=null,y=y.ea;y!==null;)a(y),y=y.va;return this},gn.prototype.map=function(a){var y=this.ma;this.sa=y.Sa=null;var x=new Xe;for(y=y.ea;y!==null;)x.add(a(y)),y=y.va;return x.iterator},gn.prototype.filter=function(a){var y=this.ma;this.sa=y.Sa=null;var x=new Xe;for(y=y.ea;y!==null;)a(y)&&x.add(y),y=y.va;return x.iterator},gn.prototype.de=function(){this.value=this.key=null,this.qa=-1,this.ma.Sa=this},gn.prototype.toString=function(){return this.sa!==null?"MapIterator@"+this.sa:"MapIterator"},ge.Object.defineProperties(gn.prototype,{iterator:{get:function(){return this}},count:{get:function(){return this.ma.Sb}}}),gn.prototype.first=gn.prototype.first,gn.prototype.hasNext=gn.prototype.Ad,gn.prototype.next=gn.prototype.next,gn.prototype.reset=gn.prototype.reset,gn.className="MapIterator";function Me(a){xi(this),this._isFrozen=!1,this.Tb={},this.Sb=0,this.jf=this.Sa=null,this.Ja=0,this.kf=this.ea=null,typeof a=="string"&&Gt("Error: Since 2.0 List/Map/Set constructors no longer take an argument that enforces type."),a!==void 0&&this.addAll(a)}Pt=Me.prototype,Pt.xb=function(){var a=this.Ja;a++,999999999<a&&(a=0),this.Ja=a},Pt.freeze=function(){return this._isFrozen=!0,this},Pt.ka=function(){return this._isFrozen=!1,this},Pt.toString=function(){return"Map()#"+fr(this)},Pt.add=function(a,y){this._isFrozen&&fe(this,a);var x=a;De(a)&&(x=ir(a));var E=this.Tb[x];return E===void 0?(this.Sb++,a=new Ae(a,y),this.Tb[x]=a,x=this.kf,x===null?this.ea=a:(a.ll=x,x.va=a),this.kf=a,this.xb()):E.value=y,this},Pt.set=function(a,y){return this.add(a,y)},Pt.addAll=function(a){if(a===null)return this;if(kn(a))for(var y=a.length,x=0;x<y;x++){var E=a[x];this.add(E.key,E.value)}else if(a instanceof Me)for(a=a.iterator;a.next();)this.add(a.key,a.value);else for(a=a.iterator;a.next();)y=a.value,this.add(y.key,y.value);return this},Pt.first=function(){return this.ea},Me.prototype.any=function(a){for(var y=this.ea;y!==null;){if(a(y))return!0;y=y.va}return!1},Me.prototype.all=function(a){for(var y=this.ea;y!==null;){if(!a(y))return!1;y=y.va}return!0},Me.prototype.each=function(a){for(var y=this.ea;y!==null;)a(y),y=y.va;return this},Me.prototype.map=function(a){for(var y=new Me,x=this.ea;x!==null;)y.add(x.key,a(x)),x=x.va;return y},Me.prototype.filter=function(a){for(var y=new Me,x=this.ea;x!==null;)a(x)&&y.add(x.key,x.value),x=x.va;return y},Pt=Me.prototype,Pt.contains=function(a){var y=a;return De(a)&&(y=fr(a),y===void 0)?!1:this.Tb[y]!==void 0},Pt.has=function(a){return this.contains(a)},Pt.I=function(a){var y=a;return De(a)&&(y=fr(a),y===void 0)?null:(a=this.Tb[y],a===void 0?null:a.value)},Pt.get=function(a){return this.I(a)},Pt.remove=function(a){if(a===null)return!1;this._isFrozen&&fe(this,a);var y=a;if(De(a)&&(y=fr(a),y===void 0)||(a=this.Tb[y],a===void 0))return!1;var x=a.va,E=a.ll;return x!==null&&(x.ll=E),E!==null&&(E.va=x),this.ea===a&&(this.ea=x),this.kf===a&&(this.kf=E),delete this.Tb[y],this.Sb--,this.xb(),!0},Pt.delete=function(a){return this.remove(a)},Pt.clear=function(){this._isFrozen&&fe(this),this.Tb={},this.Sb=0,this.Sa!==null&&this.Sa.reset(),this.jf!==null&&this.jf.reset(),this.kf=this.ea=null,this.xb()},Me.prototype.copy=function(){var a=new Me,y=this.Tb,x;for(x in y){var E=y[x];a.add(E.key,E.value)}return a},Me.prototype.Fa=function(){var a=this.Tb,y=Array(this.Sb),x=0,E;for(E in a){var b=a[E];y[x]=new Ae(b.key,b.value),x++}return y},Me.prototype.Lf=function(){return new rr(this)},ge.Object.defineProperties(Me.prototype,{count:{get:function(){return this.Sb}},size:{get:function(){return this.Sb}},iterator:{get:function(){if(0>=this.count)return Vi;var a=this.Sa;return a!==null?(a.reset(),a):new gn(this)}},iteratorKeys:{get:function(){return 0>=this.count?Vi:new kr(this)}},iteratorValues:{get:function(){if(0>=this.count)return Vi;var a=this.jf;return a!==null?(a.reset(),a):new Kr(this)}}}),Me.prototype.toKeySet=Me.prototype.Lf,Me.prototype.toArray=Me.prototype.Fa,Me.prototype.clear=Me.prototype.clear,Me.prototype.delete=Me.prototype.delete,Me.prototype.remove=Me.prototype.remove,Me.prototype.get=Me.prototype.get,Me.prototype.getValue=Me.prototype.I,Me.prototype.has=Me.prototype.has,Me.prototype.contains=Me.prototype.contains,Me.prototype.first=Me.prototype.first,Me.prototype.addAll=Me.prototype.addAll,Me.prototype.set=Me.prototype.set,Me.prototype.add=Me.prototype.add,Me.prototype.thaw=Me.prototype.ka,Me.prototype.freeze=Me.prototype.freeze,Me.className="Map";function At(a,y){a===void 0?this.y=this.x=0:typeof a=="number"&&typeof y=="number"?(this.x=a,this.y=y):Gt("Invalid arguments to Point constructor: "+a+", "+y),this._isFrozen=!1}var Nn,Hn,gi,ci,ti;At.prototype.assign=function(a){return this.x=a.x,this.y=a.y,this},At.prototype.h=function(a,y){return this.x=a,this.y=y,this},At.prototype.sg=function(a,y){return this.x=a,this.y=y,this},At.prototype.set=function(a){return this.x=a.x,this.y=a.y,this},At.prototype.copy=function(){var a=new At;return a.x=this.x,a.y=this.y,a},Pt=At.prototype,Pt.ja=function(){return this._isFrozen=!0,Object.freeze(this),this},Pt.J=function(){return this._isFrozen||Object.isFrozen(this)?this:this.copy().freeze()},Pt.freeze=function(){return this._isFrozen=!0,this},Pt.ka=function(){return Object.isFrozen(this)&&Gt("cannot thaw constant: "+this),this._isFrozen=!1,this};function sn(a){if(typeof a=="string"){a=a.split(" ");for(var y=0,x=0;a[y]==="";)y++;var E=a[y++];E&&(x=parseFloat(E));for(var b=0;a[y]==="";)y++;return(E=a[y++])&&(b=parseFloat(E)),new At(x,b)}return new At}function Dn(a){return a.x.toString()+" "+a.y.toString()}Pt.toString=function(){return"Point("+this.x+","+this.y+")"},Pt.D=function(a){return a instanceof At?this.x===a.x&&this.y===a.y:!1},Pt.hi=function(a,y){return this.x===a&&this.y===y},Pt.Xa=function(a){return ue.B(this.x,a.x)&&ue.B(this.y,a.y)},Pt.add=function(a){return this.x+=a.x,this.y+=a.y,this},Pt.re=function(a){return this.x-=a.x,this.y-=a.y,this},Pt.offset=function(a,y){return this.x+=a,this.y+=y,this},At.prototype.rotate=function(a){if(a===0)return this;var y=this.x,x=this.y;if(y===0&&x===0)return this;if(360<=a?a-=360:0>a&&(a+=360),a===90){a=0;var E=1}else a===180?(a=-1,E=0):a===270?(a=0,E=-1):(E=a*Math.PI/180,a=Math.cos(E),E=Math.sin(E));return this.x=a*y-E*x,this.y=E*y+a*x,this},Pt=At.prototype,Pt.scale=function(a,y){return this.x*=a,this.y*=y,this},Pt.Bf=function(a){var y=a.x-this.x;return a=a.y-this.y,y*y+a*a},Pt.zd=function(a,y){return a-=this.x,y-=this.y,a*a+y*y},Pt.normalize=function(){var a=this.x,y=this.y,x=Math.sqrt(a*a+y*y);return 0<x&&(this.x=a/x,this.y=y/x),this},Pt.ab=function(a){return Gn(a.x-this.x,a.y-this.y)},Pt.direction=function(a,y){return Gn(a-this.x,y-this.y)};function Gn(a,y){if(a===0)return 0<y?90:0>y?270:0;if(y===0)return 0<a?0:180;if(isNaN(a)||isNaN(y))return 0;var x=180*Math.atan(Math.abs(y/a))/Math.PI;return 0>a?x=0>y?x+180:180-x:0>y&&(x=360-x),x}Pt.Ry=function(a,y){return ue.Fl(a.x,a.y,y.x,y.y,this.x,this.y)},Pt.fA=function(a,y,x,E){return ue.qh(a,y,x,E,this.x,this.y,this),this},Pt.gA=function(a,y){return ue.qh(a.x,a.y,y.x,y.y,this.x,this.y,this),this},Pt.uA=function(a,y,x,E){return ue.No(this.x,this.y,a,y,x,E,this),this},Pt.vA=function(a,y){return ue.No(this.x,this.y,a.x,a.y,y.width,y.height,this),this},Pt.xi=function(a,y){return this.x=a.x+y.x*a.width+y.offsetX,this.y=a.y+y.y*a.height+y.offsetY,this},Pt.yi=function(a,y,x,E,b){return this.x=a+b.x*x+b.offsetX,this.y=y+b.y*E+b.offsetY,this},Pt.transform=function(a){return a.Ga(this),this};function Ln(a,y){return y.Cd(a),a}function Zn(a,y,x,E,b,z){var tt=b-x,rt=z-E,ot=tt*tt+rt*rt;x-=a,E-=y;var st=-x*tt-E*rt;return 0>=st||st>=ot?(tt=b-a,rt=z-y,Math.min(x*x+E*E,tt*tt+rt*rt)):(a=tt*E-rt*x,a*a/ot)}function Mi(a,y,x,E){return a=x-a,y=E-y,a*a+y*y}function hi(a,y,x,E){return a=x-a,y=E-y,a===0?0<y?90:0>y?270:0:y===0?0<a?0:180:isNaN(a)||isNaN(y)?0:(E=180*Math.atan(Math.abs(y/a))/Math.PI,0>a?E=0>y?E+180:180-E:0>y&&(E=360-E),E)}Pt.w=function(){return isFinite(this.x)&&isFinite(this.y)},At.alloc=function(){var a=bn.pop();return a===void 0?new At:a},At.allocAt=function(a,y){var x=bn.pop();return x===void 0?new At(a,y):(x.x=a,x.y=y,x)},At.free=function(a){bn.push(a)},At.prototype.isReal=At.prototype.w,At.prototype.setSpot=At.prototype.yi,At.prototype.setRectSpot=At.prototype.xi,At.prototype.snapToGridPoint=At.prototype.vA,At.prototype.snapToGrid=At.prototype.uA,At.prototype.projectOntoLineSegmentPoint=At.prototype.gA,At.prototype.projectOntoLineSegment=At.prototype.fA,At.intersectingLineSegments=function(a,y,x,E,b,z,tt,rt){return ue.Rl(a,y,x,E,b,z,tt,rt)},At.prototype.compareWithLineSegmentPoint=At.prototype.Ry,At.compareWithLineSegment=function(a,y,x,E,b,z){return ue.Fl(a,y,x,E,b,z)},At.prototype.direction=At.prototype.direction,At.prototype.directionPoint=At.prototype.ab,At.prototype.normalize=At.prototype.normalize,At.prototype.distanceSquared=At.prototype.zd,At.prototype.distanceSquaredPoint=At.prototype.Bf,At.prototype.scale=At.prototype.scale,At.prototype.rotate=At.prototype.rotate,At.prototype.offset=At.prototype.offset,At.prototype.subtract=At.prototype.re,At.prototype.add=At.prototype.add,At.prototype.equalsApprox=At.prototype.Xa,At.prototype.equalTo=At.prototype.hi,At.prototype.equals=At.prototype.D,At.prototype.set=At.prototype.set,At.prototype.setTo=At.prototype.sg;var bn=[];At.className="Point",At.parse=sn,At.stringify=Dn,At.distanceLineSegmentSquared=Zn,At.distanceSquared=Mi,At.direction=hi,At.Origin=Nn=new At(0,0).ja(),At.InfiniteTopLeft=Hn=new At(-1/0,-1/0).ja(),At.InfiniteBottomRight=gi=new At(1/0,1/0).ja(),At.SixPoint=ci=new At(6,6).ja(),At.NoPoint=ti=new At(NaN,NaN).ja(),At.parse=sn,At.stringify=Dn,At.distanceLineSegmentSquared=Zn,At.distanceSquared=Mi,At.direction=hi;function Ke(a,y){a===void 0?this.height=this.width=0:typeof a=="number"&&(0<=a||isNaN(a))&&typeof y=="number"&&(0<=y||isNaN(y))?(this.width=a,this.height=y):Gt("Invalid arguments to Size constructor: "+a+", "+y),this._isFrozen=!1}var qn,Ci,ar,Oi,ur,sr,yr;Ke.prototype.assign=function(a){return this.width=a.width,this.height=a.height,this},Ke.prototype.h=function(a,y){return this.width=a,this.height=y,this},Ke.prototype.sg=function(a,y){return this.width=a,this.height=y,this},Ke.prototype.set=function(a){return this.width=a.width,this.height=a.height,this},Ke.prototype.copy=function(){var a=new Ke;return a.width=this.width,a.height=this.height,a},Pt=Ke.prototype,Pt.ja=function(){return this._isFrozen=!0,Object.freeze(this),this},Pt.J=function(){return this._isFrozen||Object.isFrozen(this)?this:this.copy().freeze()},Pt.freeze=function(){return this._isFrozen=!0,this},Pt.ka=function(){return Object.isFrozen(this)&&Gt("cannot thaw constant: "+this),this._isFrozen=!1,this};function Tr(a){if(typeof a=="string"){a=a.split(" ");for(var y=0,x=0;a[y]==="";)y++;var E=a[y++];E&&(x=parseFloat(E));for(var b=0;a[y]==="";)y++;return(E=a[y++])&&(b=parseFloat(E)),new Ke(x,b)}return new Ke}function jr(a){return a.width.toString()+" "+a.height.toString()}Pt.toString=function(){return"Size("+this.width+","+this.height+")"},Pt.D=function(a){return a instanceof Ke?this.width===a.width&&this.height===a.height:!1},Pt.hi=function(a,y){return this.width===a&&this.height===y},Pt.Xa=function(a){return ue.B(this.width,a.width)&&ue.B(this.height,a.height)},Pt.Bc=function(a,y){return a=this.width+a,this.width=0<=a?a:0,y=this.height+y,this.height=0<=y?y:0,this},Pt.w=function(){return isFinite(this.width)&&isFinite(this.height)},Ke.alloc=function(){var a=Jr.pop();return a===void 0?new Ke:a},Ke.free=function(a){Jr.push(a)},Ke.prototype.isReal=Ke.prototype.w,Ke.prototype.inflate=Ke.prototype.Bc,Ke.prototype.equalsApprox=Ke.prototype.Xa,Ke.prototype.equalTo=Ke.prototype.hi,Ke.prototype.equals=Ke.prototype.D,Ke.prototype.set=Ke.prototype.set,Ke.prototype.setTo=Ke.prototype.sg;var Jr=[];Ke.className="Size",Ke.parse=Tr,Ke.stringify=jr,Ke.ZeroSize=qn=new Ke(0,0).ja(),Ke.OneSize=Ci=new Ke(1,1).ja(),Ke.SixSize=ar=new Ke(6,6).ja(),Ke.EightSize=Oi=new Ke(8,8).ja(),Ke.TenSize=ur=new Ke(10,10).ja(),Ke.InfiniteSize=sr=new Ke(1/0,1/0).ja(),Ke.NoSize=yr=new Ke(NaN,NaN).ja(),Ke.parse=Tr,Ke.stringify=jr;function Ee(a,y,x,E){a===void 0?this.height=this.width=this.y=this.x=0:typeof a=="number"&&typeof y=="number"&&typeof x=="number"&&(0<=x||isNaN(x))&&typeof E=="number"&&(0<=E||isNaN(E))?(this.x=a,this.y=y,this.width=x,this.height=E):a instanceof At?(x=a.x,a=a.y,y instanceof At?(E=y.x,y=y.y,this.x=Math.min(x,E),this.y=Math.min(a,y),this.width=Math.abs(x-E),this.height=Math.abs(a-y)):y instanceof Ke?(this.x=x,this.y=a,this.width=y.width,this.height=y.height):Gt("Incorrect second argument supplied to Rect constructor "+y)):Gt("Invalid arguments to Rect constructor: "+a+", "+y+", "+x+", "+E),this._isFrozen=!1}Pt=Ee.prototype,Pt.assign=function(a){return this.x=a.x,this.y=a.y,this.width=a.width,this.height=a.height,this},Pt.h=function(a,y,x,E){return this.x=a,this.y=y,this.width=x,this.height=E,this};function Fr(a,y,x){a.width=y,a.height=x}Pt.sg=function(a,y,x,E){return this.x=a,this.y=y,this.width=x,this.height=E,this},Pt.set=function(a){return this.x=a.x,this.y=a.y,this.width=a.width,this.height=a.height,this},Pt.dd=function(a){return this.x=a.x,this.y=a.y,this},Pt.tA=function(a){return this.width=a.width,this.height=a.height,this},Ee.prototype.copy=function(){var a=new Ee;return a.x=this.x,a.y=this.y,a.width=this.width,a.height=this.height,a},Pt=Ee.prototype,Pt.ja=function(){return this._isFrozen=!0,Object.freeze(this),this},Pt.J=function(){return this._isFrozen||Object.isFrozen(this)?this:this.copy().freeze()},Pt.freeze=function(){return this._isFrozen=!0,this},Pt.ka=function(){return Object.isFrozen(this)&&Gt("cannot thaw constant: "+this),this._isFrozen=!1,this};function Mr(a){if(typeof a=="string"){a=a.split(" ");for(var y=0,x=0;a[y]==="";)y++;var E=a[y++];E&&(x=parseFloat(E));for(var b=0;a[y]==="";)y++;(E=a[y++])&&(b=parseFloat(E));for(var z=0;a[y]==="";)y++;(E=a[y++])&&(z=parseFloat(E));for(var tt=0;a[y]==="";)y++;return(E=a[y++])&&(tt=parseFloat(E)),new Ee(x,b,z,tt)}return new Ee}function Ui(a){return a.x.toString()+" "+a.y.toString()+" "+a.width.toString()+" "+a.height.toString()}Pt.toString=function(){return"Rect("+this.x+","+this.y+","+this.width+","+this.height+")"},Pt.D=function(a){return a instanceof Ee?this.x===a.x&&this.y===a.y&&this.width===a.width&&this.height===a.height:!1},Pt.hi=function(a,y,x,E){return this.x===a&&this.y===y&&this.width===x&&this.height===E},Pt.Xa=function(a){return ue.B(this.x,a.x)&&ue.B(this.y,a.y)&&ue.B(this.width,a.width)&&ue.B(this.height,a.height)};function vr(a,y){return ue.$(a.x,y.x)&&ue.$(a.y,y.y)&&ue.$(a.width,y.width)&&ue.$(a.height,y.height)}Pt.ca=function(a){return this.x<=a.x&&this.x+this.width>=a.x&&this.y<=a.y&&this.y+this.height>=a.y},Pt.Re=function(a){return this.x<=a.x&&a.x+a.width<=this.x+this.width&&this.y<=a.y&&a.y+a.height<=this.y+this.height},Pt.contains=function(a,y,x,E){return x===void 0&&(x=0),E===void 0&&(E=0),this.x<=a&&a+x<=this.x+this.width&&this.y<=y&&y+E<=this.y+this.height},Pt.offset=function(a,y){return this.x+=a,this.y+=y,this},Pt.Bc=function(a,y){return mr(this,y,a,y,a)},Pt.Co=function(a){return mr(this,a.top,a.right,a.bottom,a.left)},Pt.Fv=function(a){return mr(this,-a.top,-a.right,-a.bottom,-a.left)},Pt.Hz=function(a,y,x,E){return mr(this,a,y,x,E)};function mr(a,y,x,E,b){var z=a.width;return x+b<=-z?(a.x+=z/2,a.width=0):(a.x-=b,a.width+=x+b),x=a.height,y+E<=-x?(a.y+=x/2,a.height=0):(a.y-=y,a.height+=y+E),a}Pt.Ex=function(a){return _r(this,a.x,a.y,a.width,a.height)},Pt.Uu=function(a,y,x,E){return _r(this,a,y,x,E)};function _r(a,y,x,E,b){var z=Math.max(a.x,y),tt=Math.max(a.y,x);return y=Math.min(a.x+a.width,y+E),x=Math.min(a.y+a.height,x+b),a.x=z,a.y=tt,a.width=Math.max(0,y-z),a.height=Math.max(0,x-tt),a}Pt.Yc=function(a){return this.Vu(a.x,a.y,a.width,a.height)},Pt.Vu=function(a,y,x,E){var b=this.width,z=this.x;return b!==1/0&&x!==1/0&&(b+=z,x+=a,isNaN(x)||isNaN(b)||z>x||a>b)?!1:(a=this.height,x=this.y,!(a!==1/0&&E!==1/0&&(a+=x,E+=y,isNaN(E)||isNaN(a)||x>E||y>a)))};function Yr(a,y){var x=a.width,E=a.x,b=y.x-10;return E>y.width+10+10+b||b>x+E?!1:(x=a.height,a=a.y,E=y.y-10,!(a>y.height+10+10+E||E>x+a))}Pt.Ye=function(a){return Pr(this,a.x,a.y,0,0)},Pt.ed=function(a){return Pr(this,a.x,a.y,a.width,a.height)},Pt.Kv=function(a,y,x,E){return x===void 0&&(x=0),E===void 0&&(E=0),Pr(this,a,y,x,E)};function Pr(a,y,x,E,b){var z=Math.min(a.x,y),tt=Math.min(a.y,x);return y=Math.max(a.x+a.width,y+E),x=Math.max(a.y+a.height,x+b),a.x=z,a.y=tt,a.width=y-z,a.height=x-tt,a}Pt.yi=function(a,y,x){return this.x=a-x.offsetX-x.x*this.width,this.y=y-x.offsetY-x.y*this.height,this};function oo(a,y,x,E,b,z,tt,rt){return tt===void 0&&(tt=0),rt===void 0&&(rt=0),a<=b&&b+tt<=a+x&&y<=z&&z+rt<=y+E}function va(a,y,x,E,b,z,tt,rt){return a>tt+b||b>x+a?!1:!(y>rt+z||z>E+y)}Pt.w=function(){return isFinite(this.x)&&isFinite(this.y)&&isFinite(this.width)&&isFinite(this.height)},Pt.Mz=function(){return this.width===0&&this.height===0},Ee.alloc=function(){var a=da.pop();return a===void 0?new Ee:a},Ee.allocAt=function(a,y,x,E){var b=da.pop();return b===void 0?new Ee(a,y,x,E):b.h(a,y,x,E)},Ee.free=function(a){da.push(a)},ge.Object.defineProperties(Ee.prototype,{left:{get:function(){return this.x},set:function(a){this.x=a}},top:{get:function(){return this.y},set:function(a){this.y=a}},right:{get:function(){return this.x+this.width},set:function(a){this.x+=a-(this.x+this.width)}},bottom:{get:function(){return this.y+this.height},set:function(a){this.y+=a-(this.y+this.height)}},position:{get:function(){return new At(this.x,this.y)},set:function(a){this.x=a.x,this.y=a.y}},size:{get:function(){return new Ke(this.width,this.height)},set:function(a){this.width=a.width,this.height=a.height}},center:{get:function(){return new At(this.x+this.width/2,this.y+this.height/2)},set:function(a){this.x=a.x-this.width/2,this.y=a.y-this.height/2}},centerX:{get:function(){return this.x+this.width/2},set:function(a){this.x=a-this.width/2}},centerY:{get:function(){return this.y+this.height/2},set:function(a){this.y=a-this.height/2}}}),Ee.prototype.isEmpty=Ee.prototype.Mz,Ee.prototype.isReal=Ee.prototype.w,Ee.intersectsLineSegment=function(a,y,x,E,b,z,tt,rt){return ue.Fx(a,y,x,E,b,z,tt,rt)},Ee.prototype.setSpot=Ee.prototype.yi,Ee.prototype.union=Ee.prototype.Kv,Ee.prototype.unionRect=Ee.prototype.ed,Ee.prototype.unionPoint=Ee.prototype.Ye,Ee.prototype.intersects=Ee.prototype.Vu,Ee.prototype.intersectsRect=Ee.prototype.Yc,Ee.prototype.intersect=Ee.prototype.Uu,Ee.prototype.intersectRect=Ee.prototype.Ex,Ee.prototype.grow=Ee.prototype.Hz,Ee.prototype.subtractMargin=Ee.prototype.Fv,Ee.prototype.addMargin=Ee.prototype.Co,Ee.prototype.inflate=Ee.prototype.Bc,Ee.prototype.offset=Ee.prototype.offset,Ee.prototype.contains=Ee.prototype.contains,Ee.prototype.containsRect=Ee.prototype.Re,Ee.prototype.containsPoint=Ee.prototype.ca,Ee.prototype.equalsApprox=Ee.prototype.Xa,Ee.prototype.equalTo=Ee.prototype.hi,Ee.prototype.equals=Ee.prototype.D,Ee.prototype.setSize=Ee.prototype.tA,Ee.prototype.setPoint=Ee.prototype.dd,Ee.prototype.set=Ee.prototype.set,Ee.prototype.setTo=Ee.prototype.sg;var wo=null,ha=null,da=[];Ee.className="Rect",Ee.parse=Mr,Ee.stringify=Ui,Ee.contains=oo,Ee.intersects=va,Ee.ZeroRect=wo=new Ee(0,0,0,0).ja(),Ee.NoRect=ha=new Ee(NaN,NaN,NaN,NaN).ja(),Ee.parse=Mr,Ee.stringify=Ui,Ee.contains=oo,Ee.intersects=va;function Ji(a,y,x,E){a===void 0?this.left=this.bottom=this.right=this.top=0:y===void 0?this.left=this.bottom=this.right=this.top=a:x===void 0?(this.top=a,this.right=y,this.bottom=a,this.left=y):E!==void 0?(this.top=a,this.right=y,this.bottom=x,this.left=E):Gt("Invalid arguments to Margin constructor: "+a+", "+y+", "+x+", "+E),this._isFrozen=!1}Ji.prototype.assign=function(a){return this.top=a.top,this.right=a.right,this.bottom=a.bottom,this.left=a.left,this},Ji.prototype.sg=function(a,y,x,E){return this.top=a,this.right=y,this.bottom=x,this.left=E,this},Ji.prototype.set=function(a){return this.top=a.top,this.right=a.right,this.bottom=a.bottom,this.left=a.left,this},Ji.prototype.copy=function(){var a=new Ji;return a.top=this.top,a.right=this.right,a.bottom=this.bottom,a.left=this.left,a},Pt=Ji.prototype,Pt.ja=function(){return this._isFrozen=!0,Object.freeze(this),this},Pt.J=function(){return this._isFrozen||Object.isFrozen(this)?this:this.copy().freeze()},Pt.freeze=function(){return this._isFrozen=!0,this},Pt.ka=function(){return Object.isFrozen(this)&&Gt("cannot thaw constant: "+this),this._isFrozen=!1,this};function Fo(a){if(typeof a=="string"){a=a.split(" ");for(var y=0,x=NaN;a[y]==="";)y++;var E=a[y++];if(E&&(x=parseFloat(E)),isNaN(x))return new Ji;for(var b=NaN;a[y]==="";)y++;if((E=a[y++])&&(b=parseFloat(E)),isNaN(b))return new Ji(x);for(var z=NaN;a[y]==="";)y++;if((E=a[y++])&&(z=parseFloat(E)),isNaN(z))return new Ji(x,b);for(var tt=NaN;a[y]==="";)y++;return(E=a[y++])&&(tt=parseFloat(E)),isNaN(tt)?new Ji(x,b):new Ji(x,b,z,tt)}return new Ji}function So(a){return a.top.toString()+" "+a.right.toString()+" "+a.bottom.toString()+" "+a.left.toString()}Pt.toString=function(){return"Margin("+this.top+","+this.right+","+this.bottom+","+this.left+")"},Pt.D=function(a){return a instanceof Ji?this.top===a.top&&this.right===a.right&&this.bottom===a.bottom&&this.left===a.left:!1},Pt.hi=function(a,y,x,E){return this.top===a&&this.right===y&&this.bottom===x&&this.left===E},Pt.Xa=function(a){return ue.B(this.top,a.top)&&ue.B(this.right,a.right)&&ue.B(this.bottom,a.bottom)&&ue.B(this.left,a.left)},Pt.w=function(){return isFinite(this.top)&&isFinite(this.right)&&isFinite(this.bottom)&&isFinite(this.left)},Ji.alloc=function(){var a=Vo.pop();return a===void 0?new Ji:a},Ji.free=function(a){Vo.push(a)},Ji.prototype.isReal=Ji.prototype.w,Ji.prototype.equalsApprox=Ji.prototype.Xa,Ji.prototype.equalTo=Ji.prototype.hi,Ji.prototype.equals=Ji.prototype.D,Ji.prototype.set=Ji.prototype.set,Ji.prototype.setTo=Ji.prototype.sg;var $o=null,Do=null,Vo=[];Ji.className="Margin",Ji.parse=Fo,Ji.stringify=So,Ji.ZeroMargin=$o=new Ji(0,0,0,0).ja(),Ji.TwoMargin=Do=new Ji(2,2,2,2).ja(),Ji.parse=Fo,Ji.stringify=So;function li(a,y,x,E){a===void 0?this.offsetY=this.offsetX=this.y=this.x=0:(y===void 0&&(y=0),x===void 0&&(x=0),E===void 0&&(E=0),this.x=a,this.y=y,this.offsetX=x,this.offsetY=E),this._isFrozen=!1}var qi,Sr,Ir,Gr,lo,er,La,Ro,bo,Hr,Uo,ba,ko,Ha,Ba,cs,ea,ru,Hl,As,Hs,fs,kl,ou,Ll,Bo,Ve,au,bl,Ml,Ma,ya,na,Sa,_s,Oa;li.prototype.assign=function(a){return this.x=a.x,this.y=a.y,this.offsetX=a.offsetX,this.offsetY=a.offsetY,this},li.prototype.sg=function(a,y,x,E){return this.x=a,this.y=y,this.offsetX=x,this.offsetY=E,this},li.prototype.set=function(a){return this.x=a.x,this.y=a.y,this.offsetX=a.offsetX,this.offsetY=a.offsetY,this},li.prototype.copy=function(){var a=new li;return a.x=this.x,a.y=this.y,a.offsetX=this.offsetX,a.offsetY=this.offsetY,a},Pt=li.prototype,Pt.ja=function(){return this._isFrozen=!0,Object.freeze(this),this},Pt.J=function(){return this._isFrozen||Object.isFrozen(this)?this:this.copy().freeze()},Pt.freeze=function(){return this._isFrozen=!0,this},Pt.ka=function(){return Object.isFrozen(this)&&Gt("cannot thaw constant: "+this),this._isFrozen=!1,this};function yo(a,y){return a.x=NaN,a.y=NaN,a.offsetX=y,a}function Cr(a){if(typeof a=="string"){if(a=a.trim(),a==="None")return qi;if(a==="TopLeft")return Sr;if(a==="Top"||a==="TopCenter"||a==="MiddleTop")return Ir;if(a==="TopRight")return Gr;if(a==="Left"||a==="LeftCenter"||a==="MiddleLeft")return lo;if(a==="Center")return er;if(a==="Right"||a==="RightCenter"||a==="MiddleRight")return La;if(a==="BottomLeft")return Ro;if(a==="Bottom"||a==="BottomCenter"||a==="MiddleBottom")return bo;if(a==="BottomRight")return Hr;if(a==="TopSide")return Uo;if(a==="LeftSide")return ba;if(a==="RightSide")return ko;if(a==="BottomSide")return Ha;if(a==="TopBottomSides")return Ba;if(a==="LeftRightSides")return cs;if(a==="TopLeftSides")return ea;if(a==="TopRightSides")return ru;if(a==="BottomLeftSides")return Hl;if(a==="BottomRightSides")return As;if(a==="NotTopSide")return Hs;if(a==="NotLeftSide")return fs;if(a==="NotRightSide")return kl;if(a==="NotBottomSide")return ou;if(a==="AllSides")return Ll;if(a==="Default")return Bo;a=a.split(" ");for(var y=0,x=0;a[y]==="";)y++;var E=a[y++];E!==void 0&&0<E.length&&(x=parseFloat(E));for(var b=0;a[y]==="";)y++;E=a[y++],E!==void 0&&0<E.length&&(b=parseFloat(E));for(var z=0;a[y]==="";)y++;E=a[y++],E!==void 0&&0<E.length&&(z=parseFloat(E));for(var tt=0;a[y]==="";)y++;return E=a[y++],E!==void 0&&0<E.length&&(tt=parseFloat(E)),new li(x,b,z,tt)}return new li}function $r(a){return a.sb()?a.x.toString()+" "+a.y.toString()+" "+a.offsetX.toString()+" "+a.offsetY.toString():a.toString()}Pt.toString=function(){return this.sb()?this.offsetX===0&&this.offsetY===0?"Spot("+this.x+","+this.y+")":"Spot("+this.x+","+this.y+","+this.offsetX+","+this.offsetY+")":this.D(qi)?"None":this.D(Sr)?"TopLeft":this.D(Ir)?"Top":this.D(Gr)?"TopRight":this.D(lo)?"Left":this.D(er)?"Center":this.D(La)?"Right":this.D(Ro)?"BottomLeft":this.D(bo)?"Bottom":this.D(Hr)?"BottomRight":this.D(Uo)?"TopSide":this.D(ba)?"LeftSide":this.D(ko)?"RightSide":this.D(Ha)?"BottomSide":this.D(Ba)?"TopBottomSides":this.D(cs)?"LeftRightSides":this.D(ea)?"TopLeftSides":this.D(ru)?"TopRightSides":this.D(Hl)?"BottomLeftSides":this.D(As)?"BottomRightSides":this.D(Hs)?"NotTopSide":this.D(fs)?"NotLeftSide":this.D(kl)?"NotRightSide":this.D(ou)?"NotBottomSide":this.D(Ll)?"AllSides":this.D(Bo)?"Default":"None"},Pt.D=function(a){return a instanceof li?(this.x===a.x||isNaN(this.x)&&isNaN(a.x))&&(this.y===a.y||isNaN(this.y)&&isNaN(a.y))&&this.offsetX===a.offsetX&&this.offsetY===a.offsetY:!1},Pt.gv=function(){return new li(.5-(this.x-.5),.5-(this.y-.5),-this.offsetX,-this.offsetY)},Pt.Hf=function(a){if(!this.$c())return!1;if(!a.$c())if(a.D(Ve))a=ba;else if(a.D(au))a=ko;else if(a.D(bl))a=Uo;else if(a.D(Ml))a=Ha;else return!1;return a=a.offsetY,(this.offsetY&a)===a},Pt.sb=function(){return!isNaN(this.x)&&!isNaN(this.y)},Pt.Mc=function(){return isNaN(this.x)||isNaN(this.y)},Pt.$c=function(){return isNaN(this.x)&&isNaN(this.y)&&this.offsetX===1&&this.offsetY!==0},Pt.ys=function(){return isNaN(this.x)&&isNaN(this.y)&&this.offsetX===0&&this.offsetY===0},Pt.Xb=function(){return isNaN(this.x)&&isNaN(this.y)&&this.offsetX===-1&&this.offsetY===0},li.alloc=function(){var a=Oo.pop();return a===void 0?new li:a},li.free=function(a){Oo.push(a)},li.prototype.isDefault=li.prototype.Xb,li.prototype.isNone=li.prototype.ys,li.prototype.isSide=li.prototype.$c,li.prototype.isNoSpot=li.prototype.Mc,li.prototype.isSpot=li.prototype.sb,li.prototype.includesSide=li.prototype.Hf,li.prototype.opposite=li.prototype.gv,li.prototype.equals=li.prototype.D,li.prototype.set=li.prototype.set,li.prototype.setTo=li.prototype.sg;var Oo=[];li.className="Spot",li.parse=Cr,li.stringify=$r,li.None=qi=yo(new li(0,0,0,0),0).ja(),li.Default=Bo=yo(new li(0,0,-1,0),-1).ja(),li.TopLeft=Sr=new li(0,0,0,0).ja(),li.TopCenter=Ir=new li(.5,0,0,0).ja(),li.TopRight=Gr=new li(1,0,0,0).ja(),li.LeftCenter=lo=new li(0,.5,0,0).ja(),li.Center=er=new li(.5,.5,0,0).ja(),li.RightCenter=La=new li(1,.5,0,0).ja(),li.BottomLeft=Ro=new li(0,1,0,0).ja(),li.BottomCenter=bo=new li(.5,1,0,0).ja(),li.BottomRight=Hr=new li(1,1,0,0).ja(),li.MiddleTop=Ma=Ir,li.MiddleLeft=ya=lo,li.MiddleRight=na=La,li.MiddleBottom=Sa=bo,li.Top=bl=Ir,li.Left=Ve=lo,li.Right=au=La,li.Bottom=Ml=bo,li.TopSide=Uo=yo(new li(0,0,1,1),1).ja(),li.LeftSide=ba=yo(new li(0,0,1,2),1).ja(),li.RightSide=ko=yo(new li(0,0,1,4),1).ja(),li.BottomSide=Ha=yo(new li(0,0,1,8),1).ja(),li.TopBottomSides=Ba=yo(new li(0,0,1,9),1).ja(),li.LeftRightSides=cs=yo(new li(0,0,1,6),1).ja(),li.TopLeftSides=ea=yo(new li(0,0,1,3),1).ja(),li.TopRightSides=ru=yo(new li(0,0,1,5),1).ja(),li.BottomLeftSides=Hl=yo(new li(0,0,1,10),1).ja(),li.BottomRightSides=As=yo(new li(0,0,1,12),1).ja(),li.NotTopSide=Hs=yo(new li(0,0,1,14),1).ja(),li.NotLeftSide=fs=yo(new li(0,0,1,13),1).ja(),li.NotRightSide=kl=yo(new li(0,0,1,11),1).ja(),li.NotBottomSide=ou=yo(new li(0,0,1,7),1).ja(),li.AllSides=Ll=yo(new li(0,0,1,15),1).ja(),_s=new li(.156,.156).ja(),Oa=new li(.844,.844).ja(),li.parse=Cr,li.stringify=$r;function Ii(){this.m11=1,this.m21=this.m12=0,this.m22=1,this.dy=this.dx=0}Ii.prototype.set=function(a){return this.m11=a.m11,this.m12=a.m12,this.m21=a.m21,this.m22=a.m22,this.dx=a.dx,this.dy=a.dy,this},Ii.prototype.setTransform=function(a,y,x,E,b,z){return this.m11=a,this.m12=y,this.m21=x,this.m22=E,this.dx=b,this.dy=z,this},Ii.prototype.copy=function(){var a=new Ii;return a.m11=this.m11,a.m12=this.m12,a.m21=this.m21,a.m22=this.m22,a.dx=this.dx,a.dy=this.dy,a},Ii.prototype.toString=function(){return"Transform("+this.m11+","+this.m12+","+this.m21+","+this.m22+","+this.dx+","+this.dy+")"},Ii.prototype.D=function(a){return this.m11===a.m11&&this.m12===a.m12&&this.m21===a.m21&&this.m22===a.m22&&this.dx===a.dx&&this.dy===a.dy},Ii.prototype.ws=function(){return this.dx===0&&this.dy===0&&this.m11===1&&this.m12===0&&this.m21===0&&this.m22===1},Ii.prototype.reset=function(){return this.m11=1,this.m21=this.m12=0,this.m22=1,this.dy=this.dx=0,this},Ii.prototype.multiply=function(a){var y=this.m11*a.m11+this.m21*a.m12,x=this.m12*a.m11+this.m22*a.m12,E=this.m11*a.m21+this.m21*a.m22,b=this.m12*a.m21+this.m22*a.m22;return this.dx=this.m11*a.dx+this.m21*a.dy+this.dx,this.dy=this.m12*a.dx+this.m22*a.dy+this.dy,this.m11=y,this.m12=x,this.m21=E,this.m22=b,this},Ii.prototype.bv=function(a){var y=1/(a.m11*a.m22-a.m12*a.m21),x=a.m22*y,E=-a.m12*y,b=-a.m21*y,z=a.m11*y,tt=y*(a.m21*a.dy-a.m22*a.dx);return a=y*(a.m12*a.dx-a.m11*a.dy),y=this.m11*x+this.m21*E,x=this.m12*x+this.m22*E,E=this.m11*b+this.m21*z,b=this.m12*b+this.m22*z,this.dx=this.m11*tt+this.m21*a+this.dx,this.dy=this.m12*tt+this.m22*a+this.dy,this.m11=y,this.m12=x,this.m21=E,this.m22=b,this},Ii.prototype.Vj=function(){var a=1/(this.m11*this.m22-this.m12*this.m21),y=-this.m12*a,x=-this.m21*a,E=this.m11*a,b=a*(this.m21*this.dy-this.m22*this.dx),z=a*(this.m12*this.dx-this.m11*this.dy);return this.m11=this.m22*a,this.m12=y,this.m21=x,this.m22=E,this.dx=b,this.dy=z,this},Ii.prototype.rotate=function(a,y,x){if(360<=a?a-=360:0>a&&(a+=360),a===0)return this;if(this.translate(y,x),a===90){a=0;var E=1}else a===180?(a=-1,E=0):a===270?(a=0,E=-1):(E=a*Math.PI/180,a=Math.cos(E),E=Math.sin(E));var b=this.m12*a+this.m22*E,z=this.m11*-E+this.m21*a,tt=this.m12*-E+this.m22*a;return this.m11=this.m11*a+this.m21*E,this.m12=b,this.m21=z,this.m22=tt,this.translate(-y,-x),this},Pt=Ii.prototype,Pt.translate=function(a,y){return this.dx+=this.m11*a+this.m21*y,this.dy+=this.m12*a+this.m22*y,this},Pt.scale=function(a,y){return y===void 0&&(y=a),this.m11*=a,this.m12*=a,this.m21*=y,this.m22*=y,this},Pt.Ga=function(a){var y=a.x,x=a.y;return a.h(y*this.m11+x*this.m21+this.dx,y*this.m12+x*this.m22+this.dy)},Pt.Cd=function(a){var y=1/(this.m11*this.m22-this.m12*this.m21),x=a.x,E=a.y;return a.h(x*this.m22*y+E*-this.m21*y+y*(this.m21*this.dy-this.m22*this.dx),x*-this.m12*y+E*this.m11*y+y*(this.m12*this.dx-this.m11*this.dy))},Pt.Eu=function(a){var y=1/(this.m11*this.m22-this.m12*this.m21),x=1.25*a.x,E=1.2*a.y;return a.h(x*this.m22*y+E*-this.m21*y+y*(this.m21*this.dy-this.m22*this.dx),x*-this.m12*y+E*this.m11*y+y*(this.m12*this.dx-this.m11*this.dy))},Pt.pp=function(a){var y=a.x,x=a.y,E=y+a.width,b=x+a.height,z=this.m11,tt=this.m12,rt=this.m21,ot=this.m22,st=this.dx,ut=this.dy,ft=y*z+x*rt+st,mt=y*tt+x*ot+ut,yt=E*z+x*rt+st,wt=E*tt+x*ot+ut;return x=y*z+b*rt+st,y=y*tt+b*ot+ut,z=E*z+b*rt+st,E=E*tt+b*ot+ut,b=Math.min(ft,yt),ft=Math.max(ft,yt),yt=Math.min(mt,wt),mt=Math.max(mt,wt),b=Math.min(b,x),ft=Math.max(ft,x),yt=Math.min(yt,y),mt=Math.max(mt,y),b=Math.min(b,z),ft=Math.max(ft,z),yt=Math.min(yt,E),mt=Math.max(mt,E),a.h(b,yt,ft-b,mt-yt),a},Ii.alloc=function(){var a=ca.pop();return a===void 0?new Ii:a},Ii.free=function(a){ca.push(a)},Ii.prototype.transformRect=Ii.prototype.pp,Ii.prototype.transformPoint=Ii.prototype.Ga,Ii.prototype.scale=Ii.prototype.scale,Ii.prototype.translate=Ii.prototype.translate,Ii.prototype.rotate=Ii.prototype.rotate,Ii.prototype.invert=Ii.prototype.Vj,Ii.prototype.multiplyInverted=Ii.prototype.bv,Ii.prototype.multiply=Ii.prototype.multiply,Ii.prototype.reset=Ii.prototype.reset,Ii.prototype.isIdentity=Ii.prototype.ws,Ii.prototype.equals=Ii.prototype.D,Ii.prototype.setTransform=Ii.prototype.setTransform,Ii.prototype.set=Ii.prototype.set;var ca=[];Ii.className="Transform",Ii.xF="54a702f3e53909c447824c6706603faf4c";var ue={AA:"7da71ca0ad381e90",wg:(Math.sqrt(2)-1)/3*4,Uv:null,sqrt:function(a){if(0>=a)return 0;var y=ue.Uv;if(y===null){y=[];for(var x=0;2e3>=x;x++)y[x]=Math.sqrt(x);ue.Uv=y}return 1>a?(x=1/a,2e3>=x?1/y[x|0]:Math.sqrt(a)):2e3>=a?y[a|0]:Math.sqrt(a)},B:function(a,y){return a-=y,.5>a&&-.5<a},$:function(a,y){return a-=y,5e-8>a&&-5e-8<a},Yb:function(a,y,x,E,b,z,tt){if(0>=b&&(b=1e-6),a<x)var rt=a,ot=x;else rt=x,ot=a;if(y<E)var st=y,ut=E;else st=E,ut=y;if(a===x)return st<=tt&&tt<=ut&&a-b<=z&&z<=a+b;if(y===E)return rt<=z&&z<=ot&&y-b<=tt&&tt<=y+b;if(ot+=b,rt-=b,rt<=z&&z<=ot&&(ut+=b,st-=b,st<=tt&&tt<=ut))if(ot-rt>ut-st)if(a-x>b||x-a>b){if(z=(E-y)/(x-a)*(z-a)+y,z-b<=tt&&tt<=z+b)return!0}else return!0;else if(y-E>b||E-y>b){if(tt=(x-a)/(E-y)*(tt-y)+a,tt-b<=z&&z<=tt+b)return!0}else return!0;return!1},cs:function(a,y,x,E,b,z,tt,rt,ot,st,ut,ft){if(ue.Yb(a,y,tt,rt,ft,x,E)&&ue.Yb(a,y,tt,rt,ft,b,z))return ue.Yb(a,y,tt,rt,ft,st,ut);var mt=(a+x)/2,yt=(y+E)/2,wt=(x+b)/2,bt=(E+z)/2;b=(b+tt)/2,z=(z+rt)/2,E=(mt+wt)/2,x=(yt+bt)/2,wt=(wt+b)/2,bt=(bt+z)/2;var Zt=(E+wt)/2,It=(x+bt)/2;return ue.cs(a,y,mt,yt,E,x,Zt,It,ot,st,ut,ft)||ue.cs(Zt,It,wt,bt,b,z,tt,rt,ot,st,ut,ft)},ax:function(a,y,x,E,b,z,tt,rt,ot){var st=(x+b)/2,ut=(E+z)/2;return ot.h((((a+x)/2+st)/2+(st+(b+tt)/2)/2)/2,(((y+E)/2+ut)/2+(ut+(z+rt)/2)/2)/2),ot},My:function(a,y,x,E,b,z,tt,rt){var ot=(x+b)/2,st=(E+z)/2;return hi(((a+x)/2+ot)/2,((y+E)/2+st)/2,(ot+(b+tt)/2)/2,(st+(z+rt)/2)/2)},Dl:function(a,y,x,E,b,z,tt,rt,ot,st){if(ue.Yb(a,y,tt,rt,ot,x,E)&&ue.Yb(a,y,tt,rt,ot,b,z))Pr(st,a,y,0,0),Pr(st,tt,rt,0,0);else{var ut=(a+x)/2,ft=(y+E)/2,mt=(x+b)/2,yt=(E+z)/2;b=(b+tt)/2,z=(z+rt)/2,E=(ut+mt)/2,x=(ft+yt)/2,mt=(mt+b)/2,yt=(yt+z)/2;var wt=(E+mt)/2,bt=(x+yt)/2;ue.Dl(a,y,ut,ft,E,x,wt,bt,ot,st),ue.Dl(wt,bt,mt,yt,b,z,tt,rt,ot,st)}return st},Qe:function(a,y,x,E,b,z,tt,rt,ot,st){if(ue.Yb(a,y,tt,rt,ot,x,E)&&ue.Yb(a,y,tt,rt,ot,b,z))st.length===0&&(st.push(a),st.push(y)),st.push(tt),st.push(rt);else{var ut=(a+x)/2,ft=(y+E)/2,mt=(x+b)/2,yt=(E+z)/2;b=(b+tt)/2,z=(z+rt)/2,E=(ut+mt)/2,x=(ft+yt)/2,mt=(mt+b)/2,yt=(yt+z)/2;var wt=(E+mt)/2,bt=(x+yt)/2;ue.Qe(a,y,ut,ft,E,x,wt,bt,ot,st),ue.Qe(wt,bt,mt,yt,b,z,tt,rt,ot,st)}return st},jv:function(a,y,x,E,b,z,tt,rt,ot,st){if(ue.Yb(a,y,b,z,st,x,E))return ue.Yb(a,y,b,z,st,rt,ot);var ut=(a+x)/2,ft=(y+E)/2;x=(x+b)/2,E=(E+z)/2;var mt=(ut+x)/2,yt=(ft+E)/2;return ue.jv(a,y,ut,ft,mt,yt,tt,rt,ot,st)||ue.jv(mt,yt,x,E,b,z,tt,rt,ot,st)},OA:function(a,y,x,E,b,z,tt){return tt.h(((a+x)/2+(x+b)/2)/2,((y+E)/2+(E+z)/2)/2),tt},iv:function(a,y,x,E,b,z,tt,rt){if(ue.Yb(a,y,b,z,tt,x,E))Pr(rt,a,y,0,0),Pr(rt,b,z,0,0);else{var ot=(a+x)/2,st=(y+E)/2;x=(x+b)/2,E=(E+z)/2;var ut=(ot+x)/2,ft=(st+E)/2;ue.iv(a,y,ot,st,ut,ft,tt,rt),ue.iv(ut,ft,x,E,b,z,tt,rt)}return rt},ep:function(a,y,x,E,b,z,tt,rt){if(ue.Yb(a,y,b,z,tt,x,E))rt.length===0&&(rt.push(a),rt.push(y)),rt.push(b),rt.push(z);else{var ot=(a+x)/2,st=(y+E)/2;x=(x+b)/2,E=(E+z)/2;var ut=(ot+x)/2,ft=(st+E)/2;ue.ep(a,y,ot,st,ut,ft,tt,rt),ue.ep(ut,ft,x,E,b,z,tt,rt)}return rt},Eo:function(a,y,x,E,b,z,tt,rt,ot,st,ut,ft,mt,yt){if(ue.Yb(a,y,tt,rt,mt,x,E)&&ue.Yb(a,y,tt,rt,mt,b,z))return!ue.Rl(a,y,tt,rt,ot,st,ut,ft)||(mt=(a-tt)*(st-ft)-(y-rt)*(ot-ut),mt===0)?!1:(yt.h(((a*rt-y*tt)*(ot-ut)-(a-tt)*(ot*ft-st*ut))/mt,((a*rt-y*tt)*(st-ft)-(y-rt)*(ot*ft-st*ut))/mt),!0);var wt=(a+x)/2,bt=(y+E)/2,Zt=(x+b)/2,It=(E+z)/2;b=(b+tt)/2,z=(z+rt)/2,E=(wt+Zt)/2,x=(bt+It)/2,Zt=(Zt+b)/2,It=(It+z)/2;var Yt=(E+Zt)/2,Jt=(x+It)/2,qt=1/0,ae=!1,Ce=0,In=0;return ue.Eo(a,y,wt,bt,E,x,Yt,Jt,ot,st,ut,ft,mt,yt)&&(a=(yt.x-ot)*(yt.x-ot)+(yt.y-st)*(yt.y-st),a<qt&&(qt=a,ae=!0,Ce=yt.x,In=yt.y)),ue.Eo(Yt,Jt,Zt,It,b,z,tt,rt,ot,st,ut,ft,mt,yt)&&(yt.x-ot)*(yt.x-ot)+(yt.y-st)*(yt.y-st)<qt&&(ae=!0,Ce=yt.x,In=yt.y),ae&&(yt.x=Ce,yt.y=In),ae},Fo:function(a,y,x,E,b,z,tt,rt,ot,st,ut,ft,mt){var yt=0;if(ue.Yb(a,y,tt,rt,mt,x,E)&&ue.Yb(a,y,tt,rt,mt,b,z)){if(mt=(a-tt)*(st-ft)-(y-rt)*(ot-ut),mt===0)return yt;var wt=((a*rt-y*tt)*(ot-ut)-(a-tt)*(ot*ft-st*ut))/mt,bt=((a*rt-y*tt)*(st-ft)-(y-rt)*(ot*ft-st*ut))/mt;if(wt>=ut)return yt;if((ot>ut?ot-ut:ut-ot)<(st>ft?st-ft:ft-st)){if(y<rt?(ot=y,a=rt):(ot=rt,a=y),bt<ot||bt>a)return yt}else if(a<tt?(ot=a,a=tt):ot=tt,wt<ot||wt>a)return yt;0<mt?yt++:0>mt&&yt--}else{wt=(a+x)/2,bt=(y+E)/2;var Zt=(x+b)/2,It=(E+z)/2;b=(b+tt)/2,z=(z+rt)/2,E=(wt+Zt)/2,x=(bt+It)/2,Zt=(Zt+b)/2,It=(It+z)/2;var Yt=(E+Zt)/2,Jt=(x+It)/2;yt+=ue.Fo(a,y,wt,bt,E,x,Yt,Jt,ot,st,ut,ft,mt),yt+=ue.Fo(Yt,Jt,Zt,It,b,z,tt,rt,ot,st,ut,ft,mt)}return yt},qh:function(a,y,x,E,b,z,tt){return ue.$(a,x)?(y<E?(x=y,y=E):x=E,z<x?(tt.h(a,x),!1):z>y?(tt.h(a,y),!1):(tt.h(a,z),!0)):ue.$(y,E)?(a<x?(E=a,a=x):E=x,b<E?(tt.h(E,y),!1):b>a?(tt.h(a,y),!1):(tt.h(b,y),!0)):(b=((a-b)*(a-x)+(y-z)*(y-E))/((x-a)*(x-a)+(E-y)*(E-y)),-5e-6>b?(tt.h(a,y),!1):1.000005<b?(tt.h(x,E),!1):(tt.h(a+b*(x-a),y+b*(E-y)),!0))},Ve:function(a,y,x,E,b,z,tt,rt,ot){return ue.B(a,x)&&ue.B(y,E)?(ot.h(a,y),!1):ue.$(b,tt)?ue.$(a,x)?(ue.qh(a,y,x,E,b,z,ot),!1):ue.qh(a,y,x,E,b,(E-y)/(x-a)*(b-a)+y,ot):(rt=(rt-z)/(tt-b),ue.$(a,x)?(x=rt*(a-b)+z,y<E?(b=y,y=E):b=E,x<b?(ot.h(a,b),!1):x>y?(ot.h(a,y),!1):(ot.h(a,x),!0)):(tt=(E-y)/(x-a),ue.$(rt,tt)?(ue.qh(a,y,x,E,b,z,ot),!1):(b=(tt*a-rt*b+z-y)/(tt-rt),ue.$(tt,0)?(a<x?(E=a,a=x):E=x,b<E?(ot.h(E,y),!1):b>a?(ot.h(a,y),!1):(ot.h(b,y),!0)):ue.qh(a,y,x,E,b,tt*(b-a)+y,ot))))},MA:function(a,y,x,E,b){return ue.Ve(x.x,x.y,E.x,E.y,a.x,a.y,y.x,y.y,b)},KA:function(a,y,x,E,b,z,tt,rt,ot,st){function ut(Zt,It){var Yt=(Zt-a)*(Zt-a)+(It-y)*(It-y);Yt<ft&&(ft=Yt,ot.h(Zt,It))}var ft=1/0;ut(ot.x,ot.y);var mt=0,yt=0,wt=0,bt=0;if(b<tt?(mt=b,yt=tt):(mt=tt,yt=b),z<rt?(wt=b,bt=tt):(wt=tt,bt=b),mt=(yt-mt)/2+st,st=(bt-wt)/2+st,b=(b+tt)/2,z=(z+rt)/2,mt===0||st===0)return ot;if(.5>(x>a?x-a:a-x)){if(mt=1-(x-b)*(x-b)/(mt*mt),0>mt)return ot;mt=Math.sqrt(mt),E=-st*mt+z,ut(x,st*mt+z),ut(x,E)}else{if(x=(E-y)/(x-a),E=1/(mt*mt)+x*x/(st*st),rt=2*x*(y-x*a)/(st*st)-2*x*z/(st*st)-2*b/(mt*mt),mt=rt*rt-4*E*(2*x*a*z/(st*st)-2*y*z/(st*st)+z*z/(st*st)+b*b/(mt*mt)-1+(y-x*a)*(y-x*a)/(st*st)),0>mt)return ot;mt=Math.sqrt(mt),st=(-rt+mt)/(2*E),ut(st,x*st-x*a+y),mt=(-rt-mt)/(2*E),ut(mt,x*mt-x*a+y)}return ot},Ff:function(a,y,x,E,b,z,tt,rt,ot){var st=1e21,ut=a,ft=y;if(ue.Ve(a,y,a,E,b,z,tt,rt,ot)){var mt=(ot.x-b)*(ot.x-b)+(ot.y-z)*(ot.y-z);mt<st&&(st=mt,ut=ot.x,ft=ot.y)}return ue.Ve(x,y,x,E,b,z,tt,rt,ot)&&(mt=(ot.x-b)*(ot.x-b)+(ot.y-z)*(ot.y-z),mt<st&&(st=mt,ut=ot.x,ft=ot.y)),ue.Ve(a,y,x,y,b,z,tt,rt,ot)&&(y=(ot.x-b)*(ot.x-b)+(ot.y-z)*(ot.y-z),y<st&&(st=y,ut=ot.x,ft=ot.y)),ue.Ve(a,E,x,E,b,z,tt,rt,ot)&&(a=(ot.x-b)*(ot.x-b)+(ot.y-z)*(ot.y-z),a<st&&(st=a,ut=ot.x,ft=ot.y)),ot.h(ut,ft),1e21>st},us:function(a,y,x){return ue.Fx(a.x,a.y,a.width,a.height,y.x,y.y,x.x,x.y)},Fx:function(a,y,x,E,b,z,tt,rt){var ot=a+x,st=y+E;return b===tt?(z<rt?(tt=z,z=rt):tt=rt,a<=b&&b<=ot&&tt<=st&&z>=y):z===rt?(b<tt?(rt=b,b=tt):rt=tt,y<=z&&z<=st&&rt<=ot&&b>=a):!!(oo(a,y,x,E,b,z)||oo(a,y,x,E,tt,rt)||ue.Rl(a,y,ot,y,b,z,tt,rt)||ue.Rl(ot,y,ot,st,b,z,tt,rt)||ue.Rl(ot,st,a,st,b,z,tt,rt)||ue.Rl(a,st,a,y,b,z,tt,rt))},Rl:function(a,y,x,E,b,z,tt,rt){return a===x&&y===E&&b===tt&&z===rt?a===b&&y===z:0>=ue.Fl(a,y,x,E,b,z)*ue.Fl(a,y,x,E,tt,rt)&&0>=ue.Fl(b,z,tt,rt,a,y)*ue.Fl(b,z,tt,rt,x,E)},Fl:function(a,y,x,E,b,z){return x-=a,E-=y,a=b-a,y=z-y,z=a*E-y*x,z===0&&(z=a*x+y*E,0<z&&(z=(a-x)*x+(y-E)*E,0>z&&(z=0))),z},bp:function(a){return 0>a&&(a+=360),360<=a&&(a-=360),a},jx:function(a,y,x,E,b,z){var tt=Math.PI;z||(E*=tt/180,b*=tt/180);var rt=E>b?-1:1;z=[];var ot=tt/2,st=E;if(E=Math.min(2*tt,Math.abs(b-E)),1e-5>E)return ot=st+rt*Math.min(E,ot),rt=a+x*Math.cos(st),st=y+x*Math.sin(st),a+=x*Math.cos(ot),y+=x*Math.sin(ot),x=(rt+a)/2,ot=(st+y)/2,z.push([rt,st,x,ot,x,ot,a,y]),z;for(;1e-5<E;)b=st+rt*Math.min(E,ot),z.push(ue.Vy(x,st,b,a,y)),E-=Math.abs(b-st),st=b;return z},Vy:function(a,y,x,E,b){var z=(x-y)/2,tt=a*Math.cos(z),rt=a*Math.sin(z),ot=-rt,st=tt*tt+ot*ot,ut=st+tt*tt+ot*rt;return st=4/3*(Math.sqrt(2*st*ut)-ut)/(tt*rt-ot*tt),rt=tt-st*ot,tt=ot+st*tt,ot=-tt,st=z+y,z=Math.cos(st),st=Math.sin(st),[E+a*Math.cos(y),b+a*Math.sin(y),E+rt*z-tt*st,b+rt*st+tt*z,E+rt*z-ot*st,b+rt*st+ot*z,E+a*Math.cos(x),b+a*Math.sin(x)]},No:function(a,y,x,E,b,z,tt){x=Math.floor((a-x)/b)*b+x,E=Math.floor((y-E)/z)*z+E;var rt=x;return x+b-a<b/2&&(rt=x+b),a=E,E+z-y<z/2&&(a=E+z),tt.h(rt,a),tt},vx:function(a,y){var x=Math.max(a,y);a=Math.min(a,y);var E;do y=x%a,x=E=a,a=y;while(0<y);return E},$y:function(a,y,x,E){var b=0>x,z=0>E;if(a<y)var tt=1,rt=0;else tt=0,rt=1;var ot=tt===0?a:y,st=tt===0?x:E;return(tt===0?b:z)&&(st=-st),tt=rt,x=tt===0?x:E,(tt===0?b:z)&&(x=-x),ue.az(ot,tt===0?a:y,st,x,0,0)},az:function(a,y,x,E,b,z){if(0<E)if(0<x){b=a*a,z=y*y,a*=x;var tt=y*E,rt=-z+tt,ot=-z+Math.sqrt(a*a+tt*tt);y=rt;for(var st=0;9999999999>st&&(y=.5*(rt+ot),!(y===rt||y===ot));++st){var ut=a/(y+b),ft=tt/(y+z);if(ut=ut*ut+ft*ft-1,0<ut)rt=y;else if(0>ut)ot=y;else break}x=b*x/(y+b)-x,E=z*E/(y+z)-E,x=Math.sqrt(x*x+E*E)}else x=Math.abs(E-y);else E=a*a-y*y,z=a*x,z<E?(E=z/E,z=y*Math.sqrt(Math.abs(1-E*E)),x=a*E-x,x=Math.sqrt(x*x+z*z)):x=Math.abs(x-a);return x},Ze:new pi,um:new pi,Mf:new pi,Nf:0,vm:100};ue.za=ue.AA;function xn(a){xi(this),this.l=2,a===void 0&&(a=xn.o),this.na=a,this.Ec=this.Dc=this.pd=this.od=0,a===xn.o?this.ee=new Xe:(xn.V===null&&(xn.V=new Xe().freeze()),this.ee=xn.V),this.aq=this.ee.Ja,this.Ip=new Ee().freeze(),this.ym=this.tk=null,this.zm=NaN,this.fg=Sr,this.gg=Hr,this.Rk=this.Sk=NaN,this.Uf=cn}xn.prototype.copy=function(){var a=new xn;if(a.l=this.l&-2,a.na=this.na,a.od=this.od,a.pd=this.pd,a.Dc=this.Dc,a.Ec=this.Ec,this.na===xn.o){for(var y=this.ee.s,x=a.ee,E=0;E<y.length;E++)x.add(y[E].copy());a.ee=x}else a.ee=this.ee;return a.aq=this.aq,a.Ip.assign(this.Ip),a.tk=this.tk,a.ym=this.ym,a.zm=this.zm,a.fg=this.fg.J(),a.gg=this.gg.J(),a.Sk=this.Sk,a.Rk=this.Rk,a.Uf=this.Uf,a},xn.prototype.ja=function(){return this.freeze(),Object.freeze(this),this},xn.prototype.freeze=function(){if(this._isFrozen=!0,this.type!==xn.o)return this;var a=this.figures;a.freeze(),a=a.s;for(var y=a.length,x=0;x<y;x++)a[x].freeze();return this},xn.prototype.ka=function(){if(Object.isFrozen(this)&&Gt("cannot thaw constant: "+this),this._isFrozen=!1,this.type!==xn.o)return this;var a=this.figures;a.ka(),a=a.s;for(var y=a.length,x=0;x<y;x++)a[x].ka();return this},xn.prototype.Xa=function(a){if(!(a instanceof xn))return!1;if(this.type!==a.type)return this.type===xn.j&&a.type===xn.o?Ns(this,a):a.type===xn.j&&this.type===xn.o?Ns(a,this):!1;if(this.type===xn.o){var y=this.figures.s;a=a.figures.s;var x=y.length;if(x!==a.length)return!1;for(var E=0;E<x;E++)if(!y[E].Xa(a[E]))return!1;return!0}return ue.B(this.startX,a.startX)&&ue.B(this.startY,a.startY)&&ue.B(this.endX,a.endX)&&ue.B(this.endY,a.endY)};function Ns(a,y){return a.type!==xn.j||y.type!==xn.o?!1:!!(y.figures.count===1&&(y=y.figures.M(0),y.segments.count===1&&ue.B(a.startX,y.startX)&&ue.B(a.startY,y.startY)&&(y=y.segments.M(0),y.type===ri&&ue.B(a.endX,y.endX)&&ue.B(a.endY,y.endY))))}xn.ia=function(a){return a.toString()},xn.prototype.qb=function(a){a.classType===xn&&(this.type=a)},xn.prototype.toString=function(a){switch(a===void 0&&(a=-1),this.type){case xn.j:return 0>a?"M"+this.startX.toString()+" "+this.startY.toString()+"L"+this.endX.toString()+" "+this.endY.toString():"M"+this.startX.toFixed(a)+" "+this.startY.toFixed(a)+"L"+this.endX.toFixed(a)+" "+this.endY.toFixed(a);case xn.u:var y=new Ee(this.startX,this.startY,0,0);return y.Kv(this.endX,this.endY,0,0),0>a?"M"+y.x.toString()+" "+y.y.toString()+"H"+y.right.toString()+"V"+y.bottom.toString()+"H"+y.left.toString()+"z":"M"+y.x.toFixed(a)+" "+y.y.toFixed(a)+"H"+y.right.toFixed(a)+"V"+y.bottom.toFixed(a)+"H"+y.left.toFixed(a)+"z";case xn.F:if(y=new Ee(this.startX,this.startY,0,0),y.Kv(this.endX,this.endY,0,0),0>a)return a=y.left.toString()+" "+(y.y+y.height/2).toString(),"M"+a+"A"+(y.width/2).toString()+" "+(y.height/2).toString()+" 0 0 1 "+(y.right.toString()+" "+(y.y+y.height/2).toString())+"A"+(y.width/2).toString()+" "+(y.height/2).toString()+" 0 0 1 "+a;var x=y.left.toFixed(a)+" "+(y.y+y.height/2).toFixed(a);return"M"+x+"A"+(y.width/2).toFixed(a)+" "+(y.height/2).toFixed(a)+" 0 0 1 "+(y.right.toFixed(a)+" "+(y.y+y.height/2).toFixed(a))+"A"+(y.width/2).toFixed(a)+" "+(y.height/2).toFixed(a)+" 0 0 1 "+x;case xn.o:y="",x=this.figures.s;for(var E=x.length,b=0;b<E;b++){var z=x[b];0<b&&(y+=" x "),z.isFilled&&(y+="F "),y+=z.toString(a)}return y;default:return this.type.toString()}},xn.nb=function(a){a=a.split(/[Xx]/);for(var y=a.length,x="",E=0;E<y;E++){var b=a[E];x=b.match(/[Ff]/)!==null?E===0?x+b:x+("X"+(b[0]===" "?"":" ")+b):x+((E===0?"":"X ")+"F"+(b[0]===" "?"":" ")+b)}return x},xn.parse=function(a,y){function x(){return bt>=qt-1?!0:st[bt+1].match(ae)!==null}function E(){return bt++,st[bt]}function b(_i){var zi=parseFloat(E()),zr=parseFloat(E());Zt===Zt.toLowerCase()&&(zi=Jt.x+zi,zr=Jt.y+zr),_i.h(zi,zr)}function z(){return b(Jt),Jt}function tt(){return b(Yt),Yt}function rt(){var _i=It.toLowerCase();return _i!=="c"&&_i!=="s"&&_i!=="q"&&_i!=="t"?Jt:new At(2*Jt.x-Yt.x,2*Jt.y-Yt.y)}y===void 0&&(y=!1);var ot=/([UuBbMmZzLlHhVvCcSsQqTtAaFfXx])([UuBbMmZzLlHhVvCcSsQqTtAaFfXx])/gm;a=a.replace(/,/gm," "),a=a.replace(ot,"$1 $2"),a=a.replace(ot,"$1 $2"),a=a.replace(/([UuBbMmZzLlHhVvCcSsQqTtAaFfXx])([^s])/gm,"$1 $2"),a=a.replace(/([^s])([UuBbMmZzLlHhVvCcSsQqTtAaFfXx])/gm,"$1 $2"),a=a.replace(/([0-9])([+\-])/gm,"$1 $2"),a=a.replace(/[\s\r\t\n]+/gm," "),a=a.replace(/^\s+|\s+$/g,"");var st=a.split(" ");for(a=0;a<st.length;a++){var ut=st[a];if(ut.match(/(\.[0-9]*)(\.)/gm)!==null){ot=On();for(var ft="",mt=!1,yt=0;yt<ut.length;yt++){var wt=ut[yt];wt!=="."||mt?wt==="."?(ot.push(ft),ft="."):ft+=wt:(mt=!0,ft+=wt)}for(ot.push(ft),st.splice(a,1),ut=0;ut<ot.length;ut++)st.splice(a+ut,0,ot[ut]);a+=ot.length-1,Qn(ot)}}var bt=-1,Zt="",It="";ot=new At(0,0);var Yt=new At(0,0),Jt=new At(0,0),qt=st.length;a=A1(null),mt=ft=ut=!1,yt=!0,wt=null;for(var ae=/[UuBbMmZzLlHhVvCcSsQqTtAaFfXx]/;!(bt>=qt-1);)if(It=Zt,Zt=E(),Zt!=="")switch(Zt.toUpperCase()){case"X":yt=!0,ft=ut=!1;break;case"M":for(wt=z(),a.mc===null||yt===!0?(Tf(a,wt.x,wt.y,ut,!ft,mt),yt=!1):a.moveTo(wt.x,wt.y),ot.assign(Jt);!x();)wt=z(),a.lineTo(wt.x,wt.y);break;case"L":for(;!x();)wt=z(),a.lineTo(wt.x,wt.y);break;case"H":for(;!x();)Jt=new At((Zt===Zt.toLowerCase()?Jt.x:0)+parseFloat(E()),Jt.y),a.lineTo(Jt.x,Jt.y);break;case"V":for(;!x();)Jt=new At(Jt.x,(Zt===Zt.toLowerCase()?Jt.y:0)+parseFloat(E())),a.lineTo(Jt.x,Jt.y);break;case"C":for(;!x();){wt=new At,b(wt);var Ce=tt(),In=z();Ph(a,wt.x,wt.y,Ce.x,Ce.y,In.x,In.y)}break;case"S":for(;!x();)wt=rt(),Ce=tt(),In=z(),Ph(a,wt.x,wt.y,Ce.x,Ce.y,In.x,In.y);break;case"Q":for(;!x();)wt=tt(),Ce=z(),Im(a,wt.x,wt.y,Ce.x,Ce.y);break;case"T":for(;!x();)Yt=wt=rt(),Ce=z(),Im(a,wt.x,wt.y,Ce.x,Ce.y);break;case"B":for(;!x();){wt=parseFloat(E()),Ce=parseFloat(E()),In=parseFloat(E());var ui=parseFloat(E()),$n=parseFloat(E()),Cn=$n,$e=!1;x()||(Cn=parseFloat(E()),x()||($e=parseFloat(E())!==0)),Zt===Zt.toLowerCase()&&(In+=Jt.x,ui+=Jt.y),a.arcTo(wt,Ce,In,ui,$n,Cn,$e)}break;case"A":for(;!x();)wt=Math.abs(parseFloat(E())),Ce=Math.abs(parseFloat(E())),In=parseFloat(E()),$n=ui=!1,$e=Cn=0,Cn=E(),Cn.length===1?(ui=!!parseFloat(Cn),$n=!!parseFloat(E()),Cn=parseFloat(E())):Cn.length===2?(ui=!!parseFloat(Cn[0]),$n=!!parseFloat(Cn[1]),Cn=parseFloat(E())):(ui=!!parseFloat(Cn[0]),$n=!!parseFloat(Cn[1]),Cn=parseFloat(Cn.slice(2))),$e=parseFloat(E()),Zt===Zt.toLowerCase()&&(Cn=Jt.x+Cn,$e=Jt.y+$e),Jt.h(Cn,$e),Px(a,wt,Ce,In,ui,$n,Cn,$e);break;case"Z":wx(a),Jt.assign(ot);break;case"F":for(wt="",Ce=1;st[bt+Ce];)if(st[bt+Ce]==="0")mt=!0,Ce++;else if(st[bt+Ce].match(/[Uu]/)!==null)Ce++;else if(st[bt+Ce].match(ae)===null)Ce++;else{wt=st[bt+Ce];break}wt.match(/[Mm]/)?ut=!0:0<a.mc.segments.length&&(a.mc.isFilled=!0);break;case"U":for(wt="",Ce=1;st[bt+Ce];)if(st[bt+Ce].match(/[Ff]/)!==null)Ce++;else if(st[bt+Ce].match(ae)===null)Ce++;else{wt=st[bt+Ce];break}wt.match(/[Mm]/)?ft=!0:a.mc.isShadowed=!1}if(ot=a.os,Rm=a,y)for(y=ot.figures.iterator;y.next();)y.value.isFilled=!0;return ot},xn.Ha=function(a,y){for(var x=a.length,E=At.alloc(),b=0;b<x;b++){var z=a[b];E.x=z[0],E.y=z[1],y.Ga(E),z[0]=E.x,z[1]=E.y,E.x=z[2],E.y=z[3],y.Ga(E),z[2]=E.x,z[3]=E.y,E.x=z[4],E.y=z[5],y.Ga(E),z[4]=E.x,z[5]=E.y,E.x=z[6],E.y=z[7],y.Ga(E),z[6]=E.x,z[7]=E.y}At.free(E)},xn.prototype.Zu=function(){if(this._isInvalidBounds)return!0;if(this.type===xn.o){if(this.aq!==this.figures.Ja)return!0;for(var a=this.figures.s,y=a.length,x=0;x<y;x++)if(a[x].Zu())return!0}return!1},xn.prototype.computeBounds=function(){if(this._isInvalidBounds=!1,this.ym=this.tk=null,this.zm=NaN,this.type===xn.o){this.aq=this.figures.Ja;for(var a=this.figures.s,y=a.length,x=0;x<y;x++){var E=a[x];E._isInvalidBounds=!1;var b=E.segments;E.sr=b.Ja,E=b.s,b=E.length;for(var z=0;z<b;z++){var tt=E[z];tt._isInvalidBounds=!1,tt.ae=null}}}a=this.Ip,a.ka(),isNaN(this.Sk)||isNaN(this.Rk)?a.h(0,0,0,0):a.h(0,0,this.Sk,this.Rk),dl(this,a,!1),Pr(a,0,0,0,0),a.freeze()},xn.prototype.ix=function(){var a=new Ee;return dl(this,a,!0),a};function dl(a,y,x){switch(a.type){case xn.j:case xn.u:case xn.F:x?y.h(a.od,a.pd,0,0):Pr(y,a.od,a.pd,0,0),Pr(y,a.Dc,a.Ec,0,0);break;case xn.o:var E=a.figures;a=E.s,E=E.length;for(var b=0;b<E;b++){var z=a[b];x&&b===0?y.h(z.startX,z.startY,0,0):Pr(y,z.startX,z.startY,0,0);for(var tt=z.segments.s,rt=tt.length,ot=z.startX,st=z.startY,ut=0;ut<rt;ut++){var ft=tt[ut];switch(ft.type){case ri:case zo:ot=ft.endX,st=ft.endY,Pr(y,ot,st,0,0);break;case Ar:ue.Dl(ot,st,ft.point1X,ft.point1Y,ft.point2X,ft.point2Y,ft.endX,ft.endY,.5,y),ot=ft.endX,st=ft.endY;break;case Zr:ue.iv(ot,st,ft.point1X,ft.point1Y,ft.endX,ft.endY,.5,y),ot=ft.endX,st=ft.endY;break;case Qr:case Co:var mt=ft.type===Qr?Ka(ft,z):Ps(ft,z,ot,st),yt=mt.length;if(yt===0){ot=ft.type===Qr?ft.centerX:ft.endX,st=ft.type===Qr?ft.centerY:ft.endY,Pr(y,ot,st,0,0);break}ft=null;for(var wt=0;wt<yt;wt++)ft=mt[wt],ue.Dl(ft[0],ft[1],ft[2],ft[3],ft[4],ft[5],ft[6],ft[7],.5,y);ft!==null&&(ot=ft[6],st=ft[7]);break;default:Gt("Unknown Segment type: "+ft.type)}}}break;default:Gt("Unknown Geometry type: "+a.type)}}xn.prototype.normalize=function(){this._isFrozen&&fe(this);var a=this.ix();return this.offset(-a.x,-a.y),new At(-a.x,-a.y)},xn.prototype.offset=function(a,y){return this._isFrozen&&fe(this),this.transform(1,0,0,1,a,y),this},xn.prototype.scale=function(a,y){return this._isFrozen&&fe(this),this.transform(a,0,0,y,0,0),this},xn.prototype.rotate=function(a,y,x){this._isFrozen&&fe(this),y===void 0&&(y=0),x===void 0&&(x=0);var E=Ii.alloc();return E.reset(),E.rotate(a,y,x),this.transform(E.m11,E.m12,E.m21,E.m22,E.dx,E.dy),Ii.free(E),this},Pt=xn.prototype,Pt.transform=function(a,y,x,E,b,z){switch(this.type){case xn.j:case xn.u:case xn.F:var tt=this.od,rt=this.pd;this.od=tt*a+rt*x+b,this.pd=tt*y+rt*E+z,tt=this.Dc,rt=this.Ec,this.Dc=tt*a+rt*x+b,this.Ec=tt*y+rt*E+z;break;case xn.o:for(var ot=this.figures.s,st=ot.length,ut=0;ut<st;ut++){var ft=ot[ut];tt=ft.startX,rt=ft.startY,ft.startX=tt*a+rt*x+b,ft.startY=tt*y+rt*E+z,ft=ft.segments.s;for(var mt=ft.length,yt=0;yt<mt;yt++){var wt=ft[yt];switch(wt.type){case ri:case zo:tt=wt.endX,rt=wt.endY,wt.endX=tt*a+rt*x+b,wt.endY=tt*y+rt*E+z;break;case Ar:tt=wt.point1X,rt=wt.point1Y,wt.point1X=tt*a+rt*x+b,wt.point1Y=tt*y+rt*E+z,tt=wt.point2X,rt=wt.point2Y,wt.point2X=tt*a+rt*x+b,wt.point2Y=tt*y+rt*E+z,tt=wt.endX,rt=wt.endY,wt.endX=tt*a+rt*x+b,wt.endY=tt*y+rt*E+z;break;case Zr:tt=wt.point1X,rt=wt.point1Y,wt.point1X=tt*a+rt*x+b,wt.point1Y=tt*y+rt*E+z,tt=wt.endX,rt=wt.endY,wt.endX=tt*a+rt*x+b,wt.endY=tt*y+rt*E+z;break;case Qr:tt=wt.centerX,rt=wt.centerY,wt.centerX=tt*a+rt*x+b,wt.centerY=tt*y+rt*E+z,y!==0&&(tt=180*Math.atan2(y,a)/Math.PI,0>tt&&(tt+=360),wt.startAngle+=tt),0>a&&(wt.startAngle=180-wt.startAngle,wt.sweepAngle=-wt.sweepAngle),0>E&&(wt.startAngle=-wt.startAngle,wt.sweepAngle=-wt.sweepAngle),wt.radiusX*=Math.sqrt(a*a+x*x),wt.radiusY!==void 0&&(wt.radiusY*=Math.sqrt(y*y+E*E));break;case Co:if(tt=wt.endX,rt=wt.endY,wt.endX=tt*a+rt*x+b,wt.endY=tt*y+rt*E+z,wt.radiusX===0||wt.radiusY===0)break;y!==0&&(tt=180*Math.atan2(y,a)/Math.PI,0>tt&&(tt+=360),wt.xAxisRotation+=tt),0>a&&(wt.xAxisRotation=180-wt.xAxisRotation,wt.isClockwiseArc=!wt.isClockwiseArc),0>E&&(wt.xAxisRotation=-wt.xAxisRotation,wt.isClockwiseArc=!wt.isClockwiseArc),wt.radiusX*=Math.sqrt(a*a+x*x),wt.radiusY*=Math.sqrt(y*y+E*E);break;default:Gt("Unknown Segment type: "+wt.type)}}}}return this._isInvalidBounds=!0,this},Pt.ca=function(a,y){y===void 0&&(y=0);var x=this.od,E=this.pd,b=this.Dc,z=this.Ec;switch(this.type){case xn.j:return ue.Yb(x,E,b,z,y,a.x,a.y);case xn.u:var tt=Ee.allocAt(Math.min(x,b)-y,Math.min(E,z)-y,Math.abs(b-x)+2*y,Math.abs(z-E)+2*y);return a=tt.ca(a),Ee.free(tt),a;case xn.F:tt=Math.min(x,b)-y;var rt=Math.min(E,z)-y;return x=(Math.abs(b-x)+2*y)/2,y=(Math.abs(z-E)+2*y)/2,0>=x||0>=y?!1:(tt=a.x-(tt+x),rt=a.y-(rt+y),1>=tt*tt/(x*x)+rt*rt/(y*y));case xn.o:return ta(this,a,y,!0,!1);default:return!1}};function ta(a,y,x,E,b){var z=y.x;y=y.y;for(var tt=a.bounds.x-20,rt=0,ot,st,ut,ft,mt=a.figures.s,yt=mt.length,wt=0;wt<yt;wt++){var bt=mt[wt],Zt=!bt.isEvenOdd;if(bt.isFilled){if(E&&bt.ca(z,y,x))return!0;var It=bt.segments;ot=bt.startX,st=bt.startY;for(var Yt=ot,Jt=st,qt=It.s,ae=0;ae<=It.length;ae++){var Ce=void 0;if(ae!==It.length){Ce=qt[ae];var In=Ce.type;a=Ce.endX,ft=Ce.endY}else In=ri,a=Yt,ft=Jt;switch(In){case zo:if(Yt=Ea(z,y,tt,y,ot,st,Yt,Jt),isNaN(Yt))return!0;rt+=Yt,Yt=a,Jt=ft;break;case ri:if(ot=Ea(z,y,tt,y,ot,st,a,ft),isNaN(ot))return!0;rt+=ot;break;case Ar:ut=ue.Fo(ot,st,Ce.point1X,Ce.point1Y,Ce.point2X,Ce.point2Y,a,ft,tt,y,z,y,.5),rt+=ut;break;case Zr:ut=ue.Fo(ot,st,(ot+2*Ce.point1X)/3,(st+2*Ce.point1Y)/3,(2*Ce.point1X+a)/3,(2*Ce.point1Y+ft)/3,a,ft,tt,y,z,y,.5),rt+=ut;break;case Qr:case Co:In=Ce.type===Qr?Ka(Ce,bt):Ps(Ce,bt,ot,st);var ui=In.length;if(ui===0){if(ot=Ea(z,y,tt,y,ot,st,Ce.type===Qr?Ce.centerX:Ce.endX,Ce.type===Qr?Ce.centerY:Ce.endY),isNaN(ot))return!0;rt+=ot;break}Ce=null;for(var $n=0;$n<ui;$n++){if(Ce=In[$n],$n===0){if(ut=Ea(z,y,tt,y,ot,st,Ce[0],Ce[1]),isNaN(ut))return!0;rt+=ut}ut=ue.Fo(Ce[0],Ce[1],Ce[2],Ce[3],Ce[4],Ce[5],Ce[6],Ce[7],tt,y,z,y,.5),rt+=ut}Ce!==null&&(a=Ce[6],ft=Ce[7]);break;default:Gt("Unknown Segment type: "+Ce.type)}ot=a,st=ft}if(Zt){if(rt!==0)return!0}else if(rt%2!==0)return!0;rt=0}else if(bt.ca(z,y,b?x:x+2))return!0}return!1}function Ea(a,y,x,E,b,z,tt,rt){if(ue.Yb(b,z,tt,rt,.05,a,y))return NaN;var ot=(a-x)*(z-rt);if(ot===0)return 0;var st=((a*E-y*x)*(b-tt)-(a-x)*(b*rt-z*tt))/ot;if(y=(a*E-y*x)*(z-rt)/ot,st>=a)return 0;if((b>tt?b-tt:tt-b)<(z>rt?z-rt:rt-z)){if(z<rt){if(y<z||y>rt)return 0}else if(y<rt||y>z)return 0}else if(b<tt){if(st<b||st>tt)return 0}else if(st<tt||st>b)return 0;return 0<ot?1:-1}function ws(a,y,x,E){a=a.figures.s;for(var b=a.length,z=0;z<b;z++)if(a[z].ca(y,x,E))return!0;return!1}Pt.Pu=function(a,y){if(0>a?a=0:1<a&&(a=1),y===void 0&&(y=new At),this.type===xn.j)return y.h(this.startX+a*(this.endX-this.startX),this.startY+a*(this.endY-this.startY)),y;for(var x=this.flattenedSegments,E=this.flattenedLengths,b=x.length,z=this.flattenedTotalLength*a,tt=0,rt=0;rt<b;rt++){var ot=E[rt],st=ot.length;for(a=0;a<st;a++){var ut=ot[a];if(tt+ut>=z)return E=z-tt,E=ut===0?0:E/ut,x=x[rt],rt=x[2*a],b=x[2*a+1],y.h(rt+(x[2*a+2]-rt)*E,b+(x[2*a+3]-b)*E),y;tt+=ut}}return y},Pt.wx=function(a){if(0>a?a=0:1<a&&(a=1),this.type===xn.j)return 180*Math.atan2(this.endY-this.startY,this.endX-this.startX)/Math.PI;for(var y=this.flattenedSegments,x=this.flattenedLengths,E=y.length,b=this.flattenedTotalLength*a,z=0,tt=0;tt<E;tt++){var rt=x[tt],ot=rt.length;for(a=0;a<ot;a++){var st=rt[a];if(z+st>=b)return b=y[tt],y=b[2*a],x=b[2*a+1],E=b[2*a+2],a=b[2*a+3],1>Math.abs(E-y)&&1>Math.abs(a-x)?0:1>Math.abs(E-y)?0<=a-x?90:270:1>Math.abs(a-x)?0<=E-y?0:180:180*Math.atan2(a-x,E-y)/Math.PI;z+=st}}return NaN},Pt.Qu=function(a,y){if(0>a?a=0:1<a&&(a=1),y===void 0&&(y=[]),y.length=3,this.type===xn.j)return y[0]=this.startX+a*(this.endX-this.startX),y[1]=this.startY+a*(this.endY-this.startY),y[2]=180*Math.atan2(this.endY-this.startY,this.endX-this.startX)/Math.PI,y;for(var x=this.flattenedSegments,E=this.flattenedLengths,b=x.length,z=this.flattenedTotalLength*a,tt=0,rt=0;rt<b;rt++){var ot=E[rt],st=ot.length;for(a=0;a<st;a++){var ut=ot[a];if(tt+ut>=z)return E=z-tt,E=ut===0?0:E/ut,ut=x[rt],x=ut[2*a],rt=ut[2*a+1],b=ut[2*a+2],a=ut[2*a+3],y[0]=x+(b-x)*E,y[1]=rt+(a-rt)*E,y[2]=1>Math.abs(b-x)&&1>Math.abs(a-rt)?0:1>Math.abs(b-x)?0<=a-rt?90:270:1>Math.abs(a-rt)?0<=b-x?0:180:180*Math.atan2(a-rt,b-x)/Math.PI,y;tt+=ut}}return y},Pt.xx=function(a){if(this.type===xn.j){var y=this.startX,x=this.startY,E=this.endX,b=this.endY;if(y!==E||x!==b){var z=a.x;if(a=a.y,y===E){if(x<b){var tt=x;E=b}else tt=b,E=x;return a<=tt?tt===x?0:1:a>=E?E===x?0:1:Math.abs(a-x)/(E-tt)}if(x===b)return y<E?tt=y:(tt=E,E=y),z<=tt?tt===y?0:1:z>=E?E===y?0:1:Math.abs(z-y)/(E-tt);tt=(E-y)*(E-y)+(b-x)*(b-x);var rt=At.alloc();return ue.qh(y,x,E,b,z,a,rt),a=rt.x,z=rt.y,At.free(rt),Math.sqrt(((a-y)*(a-y)+(z-x)*(z-x))/tt)}}else if(this.type===xn.u){tt=this.startX,rt=this.startY;var ot=this.endX;if(b=this.endY,tt!==ot||rt!==b){y=ot-tt,x=b-rt,z=2*y+2*x,E=a.x,a=a.y,E=Math.min(Math.max(E,tt),ot),a=Math.min(Math.max(a,rt),b),tt=Math.abs(E-tt),ot=Math.abs(E-ot),rt=Math.abs(a-rt),b=Math.abs(a-b);var st=Math.min(tt,ot,rt,b);if(st===rt)return E/z;if(st===ot)return(y+a)/z;if(st===b)return(2*y+x-E)/z;if(st===tt)return(2*y+2*x-a)/z}}else{y=this.flattenedSegments,x=this.flattenedLengths,z=this.flattenedTotalLength,E=At.alloc(),b=1/0,rt=tt=0,ot=y.length;for(var ut=st=0,ft=0;ft<ot;ft++)for(var mt=y[ft],yt=x[ft],wt=mt.length,bt=0;bt<wt;bt+=2){var Zt=mt[bt],It=mt[bt+1];if(bt!==0){ue.qh(st,ut,Zt,It,a.x,a.y,E);var Yt=(E.x-a.x)*(E.x-a.x)+(E.y-a.y)*(E.y-a.y);Yt<b&&(b=Yt,tt=rt,tt+=Math.sqrt((E.x-st)*(E.x-st)+(E.y-ut)*(E.y-ut))),rt+=yt[(bt-2)/2]}st=Zt,ut=It}return At.free(E),a=tt/z,0>a?0:1<a?1:a}return 0};function Ds(a){if(a.tk===null){var y=a.tk=[],x=a.ym=[],E=[],b=[];if(a.type===xn.j)E.push(a.startX),E.push(a.startY),E.push(a.endX),E.push(a.endY),y.push(E),b.push(Math.sqrt((a.startX-a.endX)*(a.startX-a.endX)+(a.startY-a.endY)*(a.startY-a.endY))),x.push(b);else if(a.type===xn.u)E.push(a.startX),E.push(a.startY),E.push(a.endX),E.push(a.startY),E.push(a.endX),E.push(a.endY),E.push(a.startX),E.push(a.endY),E.push(a.startX),E.push(a.startY),y.push(E),b.push(Math.abs(a.startX-a.endX)),b.push(Math.abs(a.startY-a.endY)),b.push(Math.abs(a.startX-a.endX)),b.push(Math.abs(a.startY-a.endY)),x.push(b);else if(a.type===xn.F){var z=new jo;z.startX=a.endX,z.startY=(a.startY+a.endY)/2;var tt=new Or(Qr);if(tt.startAngle=0,tt.sweepAngle=360,tt.centerX=(a.startX+a.endX)/2,tt.centerY=(a.startY+a.endY)/2,tt.radiusX=Math.abs(a.startX-a.endX)/2,tt.radiusY=Math.abs(a.startY-a.endY)/2,z.add(tt),a=Ka(tt,z),b=a.length,b===0)E.push(tt.centerX),E.push(tt.centerY);else{tt=z.startX,z=z.startY;for(var rt=0;rt<b;rt++){var ot=a[rt];ue.Qe(tt,z,ot[2],ot[3],ot[4],ot[5],ot[6],ot[7],.5,E),tt=ot[6],z=ot[7]}}y.push(E),x.push(Kl(E))}else for(a=a.figures.iterator;a.next();){b=a.value,E=[],E.push(b.startX),E.push(b.startY),tt=b.startX,z=b.startY,rt=tt,ot=z;for(var st=b.segments.s,ut=st.length,ft=0;ft<ut;ft++){var mt=st[ft];switch(mt.type){case zo:4<=E.length&&(y.push(E),x.push(Kl(E))),E=[],E.push(mt.endX),E.push(mt.endY),tt=mt.endX,z=mt.endY,rt=tt,ot=z;break;case ri:E.push(mt.endX),E.push(mt.endY),tt=mt.endX,z=mt.endY;break;case Ar:ue.Qe(tt,z,mt.point1X,mt.point1Y,mt.point2X,mt.point2Y,mt.endX,mt.endY,.5,E),tt=mt.endX,z=mt.endY;break;case Zr:ue.ep(tt,z,mt.point1X,mt.point1Y,mt.endX,mt.endY,.5,E),tt=mt.endX,z=mt.endY;break;case Qr:var yt=Ka(mt,b),wt=yt.length;if(wt===0){E.push(mt.centerX),E.push(mt.centerY),tt=mt.centerX,z=mt.centerY;break}for(var bt=0;bt<wt;bt++){var Zt=yt[bt];ue.Qe(tt,z,Zt[2],Zt[3],Zt[4],Zt[5],Zt[6],Zt[7],.5,E),tt=Zt[6],z=Zt[7]}break;case Co:if(yt=Ps(mt,b,tt,z),wt=yt.length,bt=mt.endX,Zt=mt.endY,wt===0){E.push(bt),E.push(Zt),tt=bt,z=Zt;break}for(bt=0;bt<wt;bt++)Zt=yt[bt],ue.Qe(tt,z,Zt[2],Zt[3],Zt[4],Zt[5],Zt[6],Zt[7],.5,E),tt=Zt[6],z=Zt[7];break;default:Gt("Segment not of valid type: "+mt.type)}mt.isClosed&&(E.push(rt),E.push(ot))}4<=E.length&&(y.push(E),x.push(Kl(E)))}}}function Kl(a){for(var y=[],x=0,E=0,b=a.length,z=0;z<b;z+=2){var tt=a[z],rt=a[z+1];z!==0&&y.push(Math.sqrt(Mi(x,E,tt,rt))),x=tt,E=rt}return y}Pt.add=function(a){return this.ee.add(a),this},Pt.pm=function(a,y,x,E,b,z,tt,rt){return this._isFrozen&&fe(this),this.fg=new li(a,y,b,z).freeze(),this.gg=new li(x,E,tt,rt).freeze(),this},ge.Object.defineProperties(xn.prototype,{_isFrozen:{get:function(){return(this.l&1)!==0},set:function(a){this.l=a?this.l|1:this.l&-2}},_isInvalidBounds:{get:function(){return(this.l&2)!==0},set:function(a){this.l=a?this.l|2:this.l&-3}},flattenedSegments:{get:function(){return Ds(this),this.tk}},flattenedLengths:{get:function(){return Ds(this),this.ym}},flattenedTotalLength:{get:function(){var a=this.zm;if(isNaN(a)){if(this.type===xn.j){a=Math.abs(this.endX-this.startX);var y=Math.abs(this.endY-this.startY);a=Math.sqrt(a*a+y*y)}else if(this.type===xn.u)a=2*Math.abs(this.endX-this.startX)+2*Math.abs(this.endY-this.startY);else{y=this.flattenedLengths;for(var x=y.length,E=a=0;E<x;E++)for(var b=y[E],z=b.length,tt=0;tt<z;tt++)a+=b[tt]}this.zm=a}return a}},type:{get:function(){return this.na},set:function(a){this.na!==a&&(this._isFrozen&&fe(this,a),this.na=a,a===xn.o?this.ee=new Xe:(xn.V===null&&(xn.V=new Xe().freeze()),this.ee=xn.V),this._isInvalidBounds=!0)}},startX:{get:function(){return this.od},set:function(a){this.od!==a&&(this._isFrozen&&fe(this,a),this.od=a,this._isInvalidBounds=!0)}},startY:{get:function(){return this.pd},set:function(a){this.pd!==a&&(this._isFrozen&&fe(this,a),this.pd=a,this._isInvalidBounds=!0)}},endX:{get:function(){return this.Dc},set:function(a){this.Dc!==a&&(this._isFrozen&&fe(this,a),this.Dc=a,this._isInvalidBounds=!0)}},endY:{get:function(){return this.Ec},set:function(a){this.Ec!==a&&(this._isFrozen&&fe(this,a),this.Ec=a,this._isInvalidBounds=!0)}},figures:{get:function(){return this.ee},set:function(a){this.ee!==a&&(this._isFrozen&&fe(this,a),this.ee=a,this._isInvalidBounds=!0)}},spot1:{get:function(){return this.fg},set:function(a){this._isFrozen&&fe(this,a),this.fg=a.J()}},spot2:{get:function(){return this.gg},set:function(a){this._isFrozen&&fe(this,a),this.gg=a.J()}},defaultStretch:{get:function(){return this.Uf},set:function(a){this._isFrozen&&fe(this,a),this.Uf=a}},bounds:{get:function(){return this.Zu()&&this.computeBounds(),this.Ip}}}),xn.prototype.setSpots=xn.prototype.pm,xn.prototype.add=xn.prototype.add,xn.prototype.getFractionForPoint=xn.prototype.xx,xn.prototype.getPointAndAngleAlongPath=xn.prototype.Qu,xn.prototype.getAngleAlongPath=xn.prototype.wx,xn.prototype.getPointAlongPath=xn.prototype.Pu,xn.prototype.containsPoint=xn.prototype.ca,xn.prototype.transform=xn.prototype.transform,xn.prototype.rotate=xn.prototype.rotate,xn.prototype.scale=xn.prototype.scale,xn.prototype.offset=xn.prototype.offset,xn.prototype.normalize=xn.prototype.normalize,xn.prototype.computeBoundsWithoutOrigin=xn.prototype.ix,xn.prototype.equalsApprox=xn.prototype.Xa,xn.className="Geometry",xn.j=new Ue(xn,"Line",0),xn.u=new Ue(xn,"Rectangle",1),xn.F=new Ue(xn,"Ellipse",2),xn.o=new Ue(xn,"Path",3),xn.V=null,xn.hb="UuBbMmZzLlHhVvCcSsQqTtAaFfXx",xn.className="Geometry",xn.stringify=xn.ia,xn.fillPath=xn.nb,xn.parse=xn.parse,xn.Line=xn.j,xn.Rectangle=xn.u,xn.Ellipse=xn.F,xn.Path=xn.o;function jo(a,y,x,E,b){xi(this),x===void 0&&(x=!0),E===void 0&&(E=!0),b===void 0&&(b=!1),this.l=2|(x?4:0)|(E?8:0)|(b?16:0),a!==void 0?this.od=a:this.od=0,y!==void 0?this.pd=y:this.pd=0,this.pl=new Xe,this.sr=this.pl.Ja,this.fw=null}jo.prototype.copy=function(){var a=new jo;a.l=this.l&-2,a.od=this.od,a.pd=this.pd;for(var y=this.pl.s,x=y.length,E=a.pl,b=0;b<x;b++){var z=y[b].copy();E.add(z)}return a.sr=this.sr,a.fw=this.fw,a},Pt=jo.prototype,Pt.Xa=function(a){if(!(a instanceof jo&&ue.B(this.startX,a.startX)&&ue.B(this.startY,a.startY)))return!1;var y=this.segments.s;a=a.segments.s;var x=y.length;if(x!==a.length)return!1;for(var E=0;E<x;E++)if(!y[E].Xa(a[E]))return!1;return!0},Pt.toString=function(a){a===void 0&&(a=-1);for(var y=0>a?"M"+this.startX.toString()+" "+this.startY.toString():"M"+this.startX.toFixed(a)+" "+this.startY.toFixed(a),x=this.segments.s,E=x.length,b=0;b<E;b++)y+=" "+x[b].toString(a);return y},Pt.freeze=function(){this._isFrozen=!0;var a=this.segments;a.freeze();var y=a.s;a=a.length;for(var x=0;x<a;x++)y[x].freeze();return this},Pt.ka=function(){this._isFrozen=!1;var a=this.segments;a.ka(),a=a.s;for(var y=a.length,x=0;x<y;x++)a[x].ka();return this},Pt.Zu=function(){if(this._isInvalidBounds)return!0;var a=this.segments;if(this.sr!==a.Ja)return!0;a=a.s;for(var y=a.length,x=0;x<y;x++)if(a[x]._isInvalidBounds)return!0;return!1},Pt.add=function(a){return this.pl.add(a),this},Pt.ca=function(a,y,x){for(var E=this.startX,b=this.startY,z=E,tt=b,rt=this.segments.s,ot=rt.length,st=0;st<ot;st++){var ut=rt[st];switch(ut.type){case zo:z=ut.endX,tt=ut.endY,E=ut.endX,b=ut.endY;break;case ri:if(ue.Yb(E,b,ut.endX,ut.endY,x,a,y))return!0;E=ut.endX,b=ut.endY;break;case Ar:if(ue.cs(E,b,ut.point1X,ut.point1Y,ut.point2X,ut.point2Y,ut.endX,ut.endY,.5,a,y,x))return!0;E=ut.endX,b=ut.endY;break;case Zr:if(ue.jv(E,b,ut.point1X,ut.point1Y,ut.endX,ut.endY,.5,a,y,x))return!0;E=ut.endX,b=ut.endY;break;case Qr:case Co:var ft=ut.type===Qr?Ka(ut,this):Ps(ut,this,E,b),mt=ft.length,yt=ut.type===Qr?ut.centerX:ut.endX,wt=ut.type===Qr?ut.centerY:ut.endY;if(mt===0){if(ue.Yb(E,b,yt,wt,x,a,y))return!0;E=yt,b=wt;break}for(yt=null,wt=0;wt<mt;wt++)if(yt=ft[wt],wt===0&&ue.Yb(E,b,yt[0],yt[1],x,a,y)||ue.cs(yt[0],yt[1],yt[2],yt[3],yt[4],yt[5],yt[6],yt[7],.5,a,y,x))return!0;yt!==null&&(E=yt[6],b=yt[7]);break;default:Gt("Unknown Segment type: "+ut.type)}if(ut.isClosed&&(E!==z||b!==tt)&&ue.Yb(E,b,z,tt,x,a,y))return!0}return!1},ge.Object.defineProperties(jo.prototype,{_isFrozen:{get:function(){return(this.l&1)!==0},set:function(a){this.l=a?this.l|1:this.l&-2}},_isInvalidBounds:{get:function(){return(this.l&2)!==0},set:function(a){this.l=a?this.l|2:this.l&-3}},isFilled:{get:function(){return(this.l&4)!==0},set:function(a){this._isFrozen&&fe(this,a),this.l=a?this.l|4:this.l&-5}},isShadowed:{get:function(){return(this.l&8)!==0},set:function(a){this._isFrozen&&fe(this,a),this.l=a?this.l|8:this.l&-9}},isEvenOdd:{get:function(){return(this.l&16)!==0},set:function(a){this._isFrozen&&fe(this,a),this.l=a?this.l|16:this.l&-17}},startX:{get:function(){return this.od},set:function(a){this._isFrozen&&fe(this,a),this.od=a,this._isInvalidBounds=!0}},startY:{get:function(){return this.pd},set:function(a){this._isFrozen&&fe(this,a),this.pd=a,this._isInvalidBounds=!0}},segments:{get:function(){return this.pl},set:function(a){this._isFrozen&&fe(this,a),this.pl=a,this._isInvalidBounds=!0}}}),jo.prototype.add=jo.prototype.add,jo.prototype.equalsApprox=jo.prototype.Xa,jo.className="PathFigure";function Or(a,y,x,E,b,z,tt,rt){xi(this),a===void 0&&(a=ri),this.na=a,this.l=2,y!==void 0?this.Dc=y:this.Dc=0,x!==void 0?this.Ec=x:this.Ec=0,E===void 0&&(E=0),b===void 0&&(b=0),z===void 0&&(z=0),tt===void 0&&(tt=0),a===Co?(a=z%360,0>a&&(a+=360),this.Ne=a,this.Vh=0,this.Wh=Math.max(E,0),this.Pg=Math.max(b,0),typeof tt=="boolean"?tt&&(this.isLargeArc=!0):typeof tt=="number"&&tt&&(this.isLargeArc=!0),rt&&(this.isClockwiseArc=!0)):(this.Ne=E,this.Vh=b,a===Qr&&(z=Math.max(z,0)),this.Wh=z,typeof tt=="number"?(a===Qr&&(tt=Math.max(tt,0)),this.Pg=tt):this.Pg=0),this.ae=null}Or.prototype.copy=function(){var a=new Or;return a.na=this.na,a.l=this.l&-2,a.Dc=this.Dc,a.Ec=this.Ec,a.Ne=this.Ne,a.Vh=this.Vh,a.Wh=this.Wh,a.Pg=this.Pg,a},Pt=Or.prototype,Pt.Xa=function(a){if(!(a instanceof Or)||this.type!==a.type||this.isClosed!==a.isClosed)return!1;switch(this.type){case zo:case ri:return ue.B(this.endX,a.endX)&&ue.B(this.endY,a.endY);case Ar:return ue.B(this.endX,a.endX)&&ue.B(this.endY,a.endY)&&ue.B(this.point1X,a.point1X)&&ue.B(this.point1Y,a.point1Y)&&ue.B(this.point2X,a.point2X)&&ue.B(this.point2Y,a.point2Y);case Zr:return ue.B(this.endX,a.endX)&&ue.B(this.endY,a.endY)&&ue.B(this.point1X,a.point1X)&&ue.B(this.point1Y,a.point1Y);case Qr:return ue.B(this.startAngle,a.startAngle)&&ue.B(this.sweepAngle,a.sweepAngle)&&ue.B(this.centerX,a.centerX)&&ue.B(this.centerY,a.centerY)&&ue.B(this.radiusX,a.radiusX)&&ue.B(this.radiusY,a.radiusY);case Co:return this.isClockwiseArc===a.isClockwiseArc&&this.isLargeArc===a.isLargeArc&&ue.B(this.xAxisRotation,a.xAxisRotation)&&ue.B(this.endX,a.endX)&&ue.B(this.endY,a.endY)&&ue.B(this.radiusX,a.radiusX)&&ue.B(this.radiusY,a.radiusY);default:return!1}},Pt.qb=function(a){a.classType===Or&&(this.type=a)},Pt.toString=function(a){switch(a===void 0&&(a=-1),this.type){case zo:a=0>a?"M"+this.endX.toString()+" "+this.endY.toString():"M"+this.endX.toFixed(a)+" "+this.endY.toFixed(a);break;case ri:a=0>a?"L"+this.endX.toString()+" "+this.endY.toString():"L"+this.endX.toFixed(a)+" "+this.endY.toFixed(a);break;case Ar:a=0>a?"C"+this.point1X.toString()+" "+this.point1Y.toString()+" "+this.point2X.toString()+" "+this.point2Y.toString()+" "+this.endX.toString()+" "+this.endY.toString():"C"+this.point1X.toFixed(a)+" "+this.point1Y.toFixed(a)+" "+this.point2X.toFixed(a)+" "+this.point2Y.toFixed(a)+" "+this.endX.toFixed(a)+" "+this.endY.toFixed(a);break;case Zr:a=0>a?"Q"+this.point1X.toString()+" "+this.point1Y.toString()+" "+this.endX.toString()+" "+this.endY.toString():"Q"+this.point1X.toFixed(a)+" "+this.point1Y.toFixed(a)+" "+this.endX.toFixed(a)+" "+this.endY.toFixed(a);break;case Qr:a=0>a?"B"+this.startAngle.toString()+" "+this.sweepAngle.toString()+" "+this.centerX.toString()+" "+this.centerY.toString()+" "+this.radiusX.toString()+" "+this.radiusY.toString():"B"+this.startAngle.toFixed(a)+" "+this.sweepAngle.toFixed(a)+" "+this.centerX.toFixed(a)+" "+this.centerY.toFixed(a)+" "+this.radiusX.toFixed(a)+" "+this.radiusY.toFixed(a);break;case Co:a=0>a?"A"+this.radiusX.toString()+" "+this.radiusY.toString()+" "+this.xAxisRotation.toString()+" "+(this.isLargeArc?1:0)+" "+(this.isClockwiseArc?1:0)+" "+this.endX.toString()+" "+this.endY.toString():"A"+this.radiusX.toFixed(a)+" "+this.radiusY.toFixed(a)+" "+this.xAxisRotation.toFixed(a)+" "+(this.isLargeArc?1:0)+" "+(this.isClockwiseArc?1:0)+" "+this.endX.toFixed(a)+" "+this.endY.toFixed(a);break;default:a=this.type.toString()}return a+(this.isClosed?"z":"")},Pt.freeze=function(){return this._isFrozen=!0,this},Pt.ka=function(){return this._isFrozen=!1,this},Pt.close=function(){return this.isClosed=!0,this};function Ka(a,y){if(a.ae!==null&&y._isInvalidBounds===!1)return a.ae;var x=a.radiusX,E=a.radiusY;if(E===void 0&&(E=x),x===0||E===0)return a.ae=[],a.ae;y=a.Ne;var b=a.Vh,z=ue.jx(0,0,x<E?x:E,a.startAngle,a.startAngle+a.sweepAngle,!1);if(x!==E){var tt=Ii.alloc();tt.reset(),x<E?tt.scale(1,E/x):tt.scale(x/E,1),xn.Ha(z,tt),Ii.free(tt)}for(x=z.length,E=0;E<x;E++)tt=z[E],tt[0]+=y,tt[1]+=b,tt[2]+=y,tt[3]+=b,tt[4]+=y,tt[5]+=b,tt[6]+=y,tt[7]+=b;return a.ae=z,a.ae}function Ps(a,y,x,E){function b(bt,Zt,It,Yt){return(bt*Yt<Zt*It?-1:1)*Math.acos((bt*It+Zt*Yt)/(Math.sqrt(bt*bt+Zt*Zt)*Math.sqrt(It*It+Yt*Yt)))}if(a.ae!==null&&y._isInvalidBounds===!1)return a.ae;if(a.radiusX===0||a.radiusY===0)return a.ae=[],a.ae;y=a.Wh;var z=a.Pg;y===0&&(y=1e-4),z===0&&(z=1e-4);var tt=Math.PI/180*a.Ne,rt=a.isLargeArc,ot=a.isClockwiseArc,st=a.Dc,ut=a.Ec,ft=Math.cos(tt),mt=Math.sin(tt),yt=ft*(x-st)/2+mt*(E-ut)/2;tt=-mt*(x-st)/2+ft*(E-ut)/2;var wt=yt*yt/(y*y)+tt*tt/(z*z);return 1<wt&&(y*=Math.sqrt(wt),z*=Math.sqrt(wt)),wt=(rt===ot?-1:1)*Math.sqrt((y*y*z*z-y*y*tt*tt-z*z*yt*yt)/(y*y*tt*tt+z*z*yt*yt)),isNaN(wt)&&(wt=0),rt=wt*y*tt/z,wt=wt*-z*yt/y,isNaN(rt)&&(rt=0),isNaN(wt)&&(wt=0),x=(x+st)/2+ft*rt-mt*wt,E=(E+ut)/2+mt*rt+ft*wt,ut=b(1,0,(yt-rt)/y,(tt-wt)/z),ft=(yt-rt)/y,st=(tt-wt)/z,yt=(-yt-rt)/y,rt=(-tt-wt)/z,tt=b(ft,st,yt,rt),yt=(ft*yt+st*rt)/(Math.sqrt(ft*ft+st*st)*Math.sqrt(yt*yt+rt*rt)),-1>=yt?tt=Math.PI:1<=yt&&(tt=0),!ot&&0<tt&&(tt-=2*Math.PI),ot&&0>tt&&(tt+=2*Math.PI),ot=y>z?1:y/z,yt=y>z?z/y:1,y=ue.jx(0,0,y>z?y:z,ut,ut+tt,!0),z=Ii.alloc(),z.reset(),z.translate(x,E),z.rotate(a.Ne,0,0),z.scale(ot,yt),xn.Ha(y,z),Ii.free(z),a.ae=y,a.ae}ge.Object.defineProperties(Or.prototype,{_isFrozen:{get:function(){return(this.l&1)!==0},set:function(a){this.l=a?this.l|1:this.l&-2}},_isInvalidBounds:{get:function(){return(this.l&2)!==0},set:function(a){this.l=a?this.l|2:this.l&-3}},isClosed:{get:function(){return(this.l&8)!==0},set:function(a){this.isClosed!==a&&(this.l=a?this.l|8:this.l&-9,this._isInvalidBounds=!0)}},type:{get:function(){return this.na},set:function(a){this._isFrozen&&fe(this,a),this.na=a,this._isInvalidBounds=!0}},endX:{get:function(){return this.Dc},set:function(a){this._isFrozen&&fe(this,a),this.Dc=a,this._isInvalidBounds=!0}},endY:{get:function(){return this.Ec},set:function(a){this._isFrozen&&fe(this,a),this.Ec=a,this._isInvalidBounds=!0}},point1X:{get:function(){return this.Ne},set:function(a){this._isFrozen&&fe(this,a),this.Ne=a,this._isInvalidBounds=!0}},point1Y:{get:function(){return this.Vh},set:function(a){this._isFrozen&&fe(this,a),this.Vh=a,this._isInvalidBounds=!0}},point2X:{get:function(){return this.Wh},set:function(a){this._isFrozen&&fe(this,a),this.Wh=a,this._isInvalidBounds=!0}},point2Y:{get:function(){return this.Pg},set:function(a){this._isFrozen&&fe(this,a),this.Pg=a,this._isInvalidBounds=!0}},centerX:{get:function(){return this.Ne},set:function(a){this._isFrozen&&fe(this,a),this.Ne=a,this._isInvalidBounds=!0}},centerY:{get:function(){return this.Vh},set:function(a){this._isFrozen&&fe(this,a),this.Vh=a,this._isInvalidBounds=!0}},radiusX:{get:function(){return this.Wh},set:function(a){0>a&&Mn(a,">= zero",Or,"radiusX"),this._isFrozen&&fe(this,a),this.Wh=a,this._isInvalidBounds=!0}},radiusY:{get:function(){return this.Pg},set:function(a){0>a&&Mn(a,">= zero",Or,"radiusY"),this._isFrozen&&fe(this,a),this.Pg=a,this._isInvalidBounds=!0}},startAngle:{get:function(){return this.Dc},set:function(a){this._isFrozen&&fe(this,a),a%=360,0>a&&(a+=360),this.Dc=a,this._isInvalidBounds=!0}},sweepAngle:{get:function(){return this.Ec},set:function(a){this._isFrozen&&fe(this,a),360<a&&(a=360),-360>a&&(a=-360),this.Ec=a,this._isInvalidBounds=!0}},isClockwiseArc:{get:function(){return(this.l&4)!==0},set:function(a){this._isFrozen&&fe(this,a),this.l=a?this.l|4:this.l&-5,this._isInvalidBounds=!0}},isLargeArc:{get:function(){return(this.l&16)!==0},set:function(a){this._isFrozen&&fe(this,a),this.l=a?this.l|16:this.l&-17,this._isInvalidBounds=!0}},xAxisRotation:{get:function(){return this.Ne},set:function(a){this._isFrozen&&fe(this,a),a%=360,0>a&&(a+=360),this.Ne=a,this._isInvalidBounds=!0}}}),Or.prototype.equalsApprox=Or.prototype.Xa;var zo=new Ue(Or,"Move",0),ri=new Ue(Or,"Line",1),Ar=new Ue(Or,"Bezier",2),Zr=new Ue(Or,"QuadraticBezier",3),Qr=new Ue(Or,"Arc",4),Co=new Ue(Or,"SvgArc",4);Or.className="PathSegment",Or.Move=zo,Or.Line=ri,Or.Bezier=Ar,Or.QuadraticBezier=Zr,Or.Arc=Qr,Or.SvgArc=Co;function ia(){this.H=null,this.xu=new At(0,0).freeze(),this.mt=new At(0,0).freeze(),this.Bp=this.Rq=0,this.Cp=1,this.xq="",this.Wr=this.Tp=!1,this.Rp=this.Ep=0,this.xg=this.nq=this.tq=!1,this.Zp=null,this.Rr=0,this.xd=this.Nr=null}ia.prototype.copy=function(){var a=new ia;return this.clone(a)},ia.prototype.clone=function(a){return a.H=this.H,a.xu.assign(this.viewPoint),a.mt.assign(this.documentPoint),a.Rq=this.Rq,a.Bp=this.Bp,a.Cp=this.Cp,a.xq=this.xq,a.Tp=this.Tp,a.Wr=this.Wr,a.Ep=this.Ep,a.Rp=this.Rp,a.tq=this.tq,a.nq=this.nq,a.xg=this.xg,a.Zp=this.Zp,a.Rr=this.Rr,a.Nr=this.Nr,a.xd=this.xd,a},ia.prototype.toString=function(){var a="^";return this.modifiers!==0&&(a+="M:"+this.modifiers),this.button!==0&&(a+="B:"+this.button),this.key!==""&&(a+="K:"+this.key),this.clickCount!==0&&(a+="C:"+this.clickCount),this.delta!==0&&(a+="D:"+this.delta),this.handled&&(a+="h"),this.bubbles&&(a+="b"),this.documentPoint!==null&&(a+="@"+this.documentPoint.toString()),a},ia.prototype.So=function(a,y){var x=this.diagram;return x===null||wg(x,a,y),y},ia.prototype.Bz=function(a,y){var x=this.diagram;return x===null||(wg(x,a,y),y.assign(x.Ps(y))),y},ge.Object.defineProperties(ia.prototype,{diagram:{get:function(){return this.H},set:function(a){this.H=a}},viewPoint:{get:function(){return this.xu},set:function(a){this.xu.assign(a)}},documentPoint:{get:function(){return this.mt},set:function(a){this.mt.assign(a)}},modifiers:{get:function(){return this.Rq},set:function(a){this.Rq=a}},button:{get:function(){return this.Bp},set:function(a){if(this.Bp=a,this.event===null)switch(a){case 0:this.buttons=1;break;case 1:this.buttons=4;break;case 2:this.buttons=2}}},buttons:{get:function(){return this.Cp},set:function(a){this.Cp=a}},key:{get:function(){return this.xq},set:function(a){this.xq=a}},down:{get:function(){return this.Tp},set:function(a){this.Tp=a}},up:{get:function(){return this.Wr},set:function(a){this.Wr=a}},clickCount:{get:function(){return this.Ep},set:function(a){this.Ep=a}},delta:{get:function(){return this.Rp},set:function(a){this.Rp=a}},isMultiTouch:{get:function(){return this.tq},set:function(a){this.tq=a}},handled:{get:function(){return this.nq},set:function(a){this.nq=a}},bubbles:{get:function(){return this.xg},set:function(a){this.xg=a}},event:{get:function(){return this.Zp},set:function(a){this.Zp=a}},isTouchEvent:{get:function(){var a=this.event;return a===null?!1:a.pointerType==="touch"||a.pointerType==="pen"}},timestamp:{get:function(){return this.Rr},set:function(a){this.Rr=a}},targetDiagram:{get:function(){return this.Nr},set:function(a){this.Nr=a}},targetObject:{get:function(){return this.xd},set:function(a){this.xd=a}},control:{get:function(){return(this.modifiers&1)!==0},set:function(a){this.modifiers=a?this.modifiers|1:this.modifiers&-2}},shift:{get:function(){return(this.modifiers&4)!==0},set:function(a){this.modifiers=a?this.modifiers|4:this.modifiers&-5}},alt:{get:function(){return(this.modifiers&2)!==0},set:function(a){this.modifiers=a?this.modifiers|2:this.modifiers&-3}},meta:{get:function(){return(this.modifiers&8)!==0},set:function(a){this.modifiers=a?this.modifiers|8:this.modifiers&-9}},left:{get:function(){var a=this.event;return a===null||a.type!=="mousedown"&&a.type!=="mouseup"&&a.type!=="pointerdown"&&a.type!=="pointerup"?(this.buttons&1)!==0:this.button===0},set:function(a){this.buttons=a?this.buttons|1:this.buttons&-2}},right:{get:function(){var a=this.event;return a===null||a.type!=="mousedown"&&a.type!=="mouseup"&&a.type!=="pointerdown"&&a.type!=="pointerup"?(this.buttons&2)!==0:this.button===2},set:function(a){this.buttons=a?this.buttons|2:this.buttons&-3}},middle:{get:function(){var a=this.event;return a===null||a.type!=="mousedown"&&a.type!=="mouseup"&&a.type!=="pointerdown"&&a.type!=="pointerup"?(this.buttons&4)!==0:this.button===1},set:function(a){this.buttons=a?this.buttons|4:this.buttons&-5}}}),ia.prototype.getMultiTouchDocumentPoint=ia.prototype.Bz,ia.prototype.getMultiTouchViewPoint=ia.prototype.So,ia.className="InputEvent";function Qs(){this.H=null,this.xa="",this.ar=this.Lr=null}Qs.prototype.copy=function(){var a=new Qs;return a.H=this.H,a.xa=this.xa,a.Lr=this.Lr,a.ar=this.ar,a},Qs.prototype.toString=function(){var a="*"+this.name;return this.subject!==null&&(a+=":"+this.subject.toString()),this.parameter!==null&&(a+="("+this.parameter.toString()+")"),a},ge.Object.defineProperties(Qs.prototype,{diagram:{get:function(){return this.H},set:function(a){this.H=a}},name:{get:function(){return this.xa},set:function(a){this.xa=a}},subject:{get:function(){return this.Lr},set:function(a){this.Lr=a}},parameter:{get:function(){return this.ar},set:function(a){this.ar=a}}}),Qs.className="DiagramEvent";function ao(){this.Fm=no,this.rf=this.Qq="",this.Ln=this.Mn=this.Rn=this.Sn=this.Qn=this.H=this.cc=null}ao.prototype.clear=function(){this.Ln=this.Mn=this.Rn=this.Sn=this.Qn=this.H=this.cc=null},ao.prototype.copy=function(){var a=new ao;a.Fm=this.Fm,a.Qq=this.Qq,a.rf=this.rf,a.cc=this.cc,a.H=this.H,a.Qn=this.Qn;var y=this.Sn;return a.Sn=De(y)&&typeof y.J=="function"?y.J():y,y=this.Rn,a.Rn=De(y)&&typeof y.J=="function"?y.J():y,y=this.Mn,a.Mn=De(y)&&typeof y.J=="function"?y.J():y,y=this.Ln,a.Ln=De(y)&&typeof y.J=="function"?y.J():y,a},ao.prototype.qb=function(a){a.classType===ao&&(this.change=a)},ao.prototype.toString=function(){var a="";return a=this.change===fa?a+"* ":this.change===no?a+(this.model!==null?"!m":"!d"):a+((this.model!==null?"!m":"!d")+this.change),this.propertyName&&typeof this.propertyName=="string"&&(a+=" "+this.propertyName),this.modelChange&&this.modelChange!==this.propertyName&&(a+=" "+this.modelChange),a+=": ",this.change===fa?this.oldValue!==null&&(a+=" "+this.oldValue):(this.object!==null&&(a+=Ni(this.object)),this.oldValue!==null&&(a+=" old: "+Ni(this.oldValue)),this.oldParam!==null&&(a+=" "+this.oldParam),this.newValue!==null&&(a+=" new: "+Ni(this.newValue)),this.newParam!==null&&(a+=" "+this.newParam)),a},ao.prototype.I=function(a){return a?this.oldValue:this.newValue},ao.prototype.Dz=function(a){return a?this.oldParam:this.newParam},ao.prototype.canUndo=function(){return this.model!==null||this.diagram!==null},ao.prototype.undo=function(){this.canUndo()&&(this.model!==null?this.model.changeState(this,!0):this.diagram!==null&&this.diagram.changeState(this,!0))},ao.prototype.canRedo=function(){return this.model!==null||this.diagram!==null},ao.prototype.redo=function(){this.canRedo()&&(this.model!==null?this.model.changeState(this,!1):this.diagram!==null&&this.diagram.changeState(this,!1))},ge.Object.defineProperties(ao.prototype,{model:{get:function(){return this.cc},set:function(a){this.cc=a}},diagram:{get:function(){return this.H},set:function(a){this.H=a}},change:{get:function(){return this.Fm},set:function(a){this.Fm=a}},modelChange:{get:function(){return this.Qq},set:function(a){this.Qq=a}},propertyName:{get:function(){return this.rf},set:function(a){this.rf=a}},isTransactionFinished:{get:function(){return this.Fm===fa&&(this.rf==="CommittedTransaction"||this.rf==="FinishedUndo"||this.rf==="FinishedRedo")}},object:{get:function(){return this.Qn},set:function(a){this.Qn=a}},oldValue:{get:function(){return this.Sn},set:function(a){this.Sn=a}},oldParam:{get:function(){return this.Rn},set:function(a){this.Rn=a}},newValue:{get:function(){return this.Mn},set:function(a){this.Mn=a}},newParam:{get:function(){return this.Ln},set:function(a){this.Ln=a}}}),ao.prototype.redo=ao.prototype.redo,ao.prototype.canRedo=ao.prototype.canRedo,ao.prototype.undo=ao.prototype.undo,ao.prototype.canUndo=ao.prototype.canUndo,ao.prototype.getParam=ao.prototype.Dz,ao.prototype.getValue=ao.prototype.I,ao.prototype.clear=ao.prototype.clear;var fa=new Ue(ao,"Transaction",-1),no=new Ue(ao,"Property",0),Po=new Ue(ao,"Insert",1),Eo=new Ue(ao,"Remove",2);ao.className="ChangedEvent",ao.Transaction=fa,ao.Property=no,ao.Insert=Po,ao.Remove=Eo;function To(){this.o=new Xe().freeze(),this.xa="",this.j=!1}To.prototype.toString=function(a){var y="Transaction: "+this.name+" "+this.changes.count.toString()+(this.isComplete?"":", incomplete");if(a!==void 0&&0<a){a=this.changes.count;for(var x=0;x<a;x++){var E=this.changes.M(x);E!==null&&(y+=`
|
|
`+E.toString())}}return y},To.prototype.clear=function(){var a=this.changes;a.ka();for(var y=a.count-1;0<=y;y--){var x=a.M(y);x!==null&&x.clear()}a.clear(),a.freeze()},To.prototype.canUndo=function(){return this.isComplete},To.prototype.undo=function(){if(this.canUndo())for(var a=this.changes.count-1;0<=a;a--){var y=this.changes.M(a);y!==null&&y.undo()}},To.prototype.canRedo=function(){return this.isComplete},To.prototype.redo=function(){if(this.canRedo())for(var a=this.changes.count,y=0;y<a;y++){var x=this.changes.M(y);x!==null&&x.redo()}},To.prototype.ak=function(){if(this.isComplete){var a=this.changes;a.ka();for(var y=new Me,x=0;x<a.count;x++){var E=a.M(x);if(E!==null&&E.change===no&&E.object){var b=y.get(E.object);b||(b=new Me,y.set(E.object,b));var z=b.get(E.propertyName);z===null?b.set(E.propertyName,-1):(0<z&&a.cd(z,null),b.set(E.propertyName,x))}}for(x=y=0;x<a.count;x++)E=a.M(x),E!==null&&(x>y&&a.cd(y,E),y++);for(;a.length>y;)a.pop();a.freeze()}},ge.Object.defineProperties(To.prototype,{changes:{get:function(){return this.o}},name:{get:function(){return this.xa},set:function(a){this.xa=a}},isComplete:{get:function(){return this.j},set:function(a){this.j=a}}}),To.prototype.optimize=To.prototype.ak,To.prototype.redo=To.prototype.redo,To.prototype.canRedo=To.prototype.canRedo,To.prototype.undo=To.prototype.undo,To.prototype.canUndo=To.prototype.canUndo,To.prototype.clear=To.prototype.clear,To.className="Transaction";function uo(){this.Pt=new qe,this.Jd=!1,this.u=new Xe().freeze(),this.Ce=-1,this.o=999,this.Fe=!1,this.Np=null,this.bi=0,this.j=!1,this.Ie=new Xe().freeze(),this.hl=new Xe,this.tt=!0,this.Dt=this.rq=this.Gt=this.Ft=!1}uo.prototype.toString=function(a){var y="UndoManager "+this.historyIndex+"<"+this.history.count+"<="+this.maxHistoryLength;y+="[";for(var x=this.nestedTransactionNames.count,E=0;E<x;E++)0<E&&(y+=" "),y+=this.nestedTransactionNames.M(E);if(y+="]",a!==void 0&&0<a)for(x=this.history.count,E=0;E<x;E++)y+=`
|
|
`+this.history.M(E).toString(a-1);return y},uo.prototype.clear=function(){var a=this.history;a.ka();for(var y=a.count-1;0<=y;y--){var x=a.M(y);x!==null&&x.clear()}a.clear(),this.Ce=-1,a.freeze(),this.Fe=!1,this.Np=null,this.bi=0,this.Ie.ka(),this.Ie.clear(),this.Ie.freeze(),this.hl.clear(),this.Dt=this.rq=this.Gt=this.Ft=!1},uo.prototype.copyProperties=function(a){this.isEnabled=a.isEnabled,this.maxHistoryLength=a.maxHistoryLength,this.checksTransactionLevel=a.checksTransactionLevel},Pt=uo.prototype,Pt.Xw=function(a){this.Pt.add(a)},Pt.Rx=function(a){this.Pt.remove(a)},Pt.Ea=function(a){if(a===void 0&&(a=""),a===null&&(a=""),this.isUndoingRedoing)return!1;this.tt===!0&&(this.tt=!1,this.bi++,this.isInternalTransaction||this.Ob("StartingFirstTransaction",a,this.currentTransaction),0<this.bi&&this.bi--),this.isEnabled&&(this.Ie.ka(),this.Ie.add(a),this.Ie.freeze(),this.currentTransaction===null?this.hl.add(0):this.hl.add(this.currentTransaction.changes.count)),this.bi++;var y=this.transactionLevel===1;return y&&(this.isInternalTransaction||this.Ob("StartedTransaction",a,this.currentTransaction)),y},Pt.eb=function(a){return a===void 0&&(a=""),qs(this,!0,a)},Pt.Kf=function(){return qs(this,!1,"")};function qs(a,y,x){if(a.isUndoingRedoing)return!1;a.checksTransactionLevel&&1>a.transactionLevel&&zn("Ending transaction without having started a transaction: "+x);var E=a.transactionLevel===1,b=a.currentTransaction;E&&y&&(a.isInternalTransaction||a.Ob("CommittingTransaction",x,b));var z=0;if(0<a.transactionLevel&&(a.bi--,a.isEnabled)){var tt=a.Ie.count;0<tt&&(x===""&&(x=a.Ie.M(0)),a.Ie.ka(),a.Ie.mb(tt-1),a.Ie.freeze()),tt=a.hl.count,0<tt&&(z=a.hl.M(tt-1),a.hl.mb(tt-1))}if(E){if(y)a.rq=!1,b===null&&x!==""&&(b=a.currentTransaction),a.isEnabled&&b!==null&&(b.isComplete||(b.isComplete=!0,b.name=x),a.lx(),y=a.history,y.ka(),E=a.maxHistoryLength,0<=E&&(E===0?y.clear():y.count>=E&&(z=y.M(0),z!==null&&z.clear(),y.mb(0),a.Ce--)),E===0||y.count!==0&&y.get(y.count-1)===b||(y.add(b),a.Ce++),y.freeze()),a.isInternalTransaction||a.Ob("CommittedTransaction",x,b);else{a.Fe=!0;try{a.isEnabled&&b!==null&&(b.isComplete=!0,b.undo())}finally{a.isInternalTransaction||a.Ob("RolledBackTransaction",x,b),a.Fe=!1}b!==null&&b.clear()}return a.Np=null,a.isPendingClear&&a.clear(),a.isPendingClear=!1,a.isPendingUnmodified=!1,!0}if(a.isEnabled&&!y&&b!==null){for(a=z,x=b.changes,b=x.count-1;b>=a;b--)y=x.M(b),y!==null&&y.undo(),x.ka(),x.mb(b);x.freeze()}return!1}Pt.lx=function(){if(!this.isUndoingRedoing&&this.canRedo()){var a=this.history;a.ka();for(var y=a.count-1;y>this.historyIndex;y--){var x=a.M(y);x!==null&&x.clear(),a.mb(y),this.rq=!0}a.freeze()}},uo.prototype.canUndo=function(){if(!this.isEnabled||0<this.transactionLevel)return!1;var a=this.transactionToUndo;return!!(a!==null&&a.canUndo())},uo.prototype.undo=function(){if(this.canUndo()){var a=this.transactionToUndo;try{this.Fe=!0,this.Ob("StartingUndo","Undo",a),this.Ce--,a.undo()}catch(y){zn("undo error: "+y.toString())}finally{this.Ob("FinishedUndo","Undo",a),this.Fe=!1}}},uo.prototype.canRedo=function(){if(!this.isEnabled||0<this.transactionLevel)return!1;var a=this.transactionToRedo;return!!(a!==null&&a.canRedo())},uo.prototype.redo=function(){if(this.canRedo()){var a=this.transactionToRedo;try{this.Fe=!0,this.Ob("StartingRedo","Redo",a),this.Ce++,a.redo()}catch(y){zn("redo error: "+y.toString())}finally{this.Ob("FinishedRedo","Redo",a),this.Fe=!1}}},uo.prototype.Ob=function(a,y,x){x===void 0&&(x=null);var E=new ao;for(E.change=fa,E.propertyName=a,E.object=x,E.oldValue=y,a=this.models;a.next();)y=a.value,E.model=y,y.ds(E)},uo.prototype.Tu=function(a){if(this.isEnabled&&!this.isUndoingRedoing&&!this.skipsEvent(a)){var y=this.currentTransaction;y===null&&(this.Np=y=new To);var x=a.copy();y=y.changes,y.ka(),y.add(x),y.freeze(),this.checksTransactionLevel&&0>=this.transactionLevel&&!this.tt&&(a=a.diagram,a!==null&&a.pi===!1||zn("Change not within a transaction: "+x.toString()))}},uo.prototype.skipsEvent=function(a){if(a===null||0>a.change.value)return!0;if(a=a.object,a===null)return!1;if(a.layer!==void 0){if(a=a.layer,a!==null&&a.isTemporary)return!0}else if(a.isTemporary)return!0;return!1},ge.Object.defineProperties(uo.prototype,{models:{get:function(){return this.Pt.iterator}},isEnabled:{get:function(){return this.Jd},set:function(a){this.Jd=a}},transactionToUndo:{get:function(){return 0<=this.historyIndex&&this.historyIndex<=this.history.count-1?this.history.M(this.historyIndex):null}},transactionToRedo:{get:function(){return this.historyIndex<this.history.count-1?this.history.M(this.historyIndex+1):null}},isUndoingRedoing:{get:function(){return this.Fe}},history:{get:function(){return this.u}},maxHistoryLength:{get:function(){return this.o},set:function(a){this.o=a}},historyIndex:{get:function(){return this.Ce}},currentTransaction:{get:function(){return this.Np}},transactionLevel:{get:function(){return this.bi}},isInTransaction:{get:function(){return 0<this.bi}},checksTransactionLevel:{get:function(){return this.j},set:function(a){this.j=a}},nestedTransactionNames:{get:function(){return this.Ie}},isPendingClear:{get:function(){return this.Ft},set:function(a){this.Ft=a}},isPendingUnmodified:{get:function(){return this.Gt},set:function(a){this.Gt=a}},isInternalTransaction:{get:function(){return this.Dt},set:function(a){this.Dt=a}},isJustDiscarded:{get:function(){return this.rq}}}),uo.prototype.handleChanged=uo.prototype.Tu,uo.prototype.redo=uo.prototype.redo,uo.prototype.undo=uo.prototype.undo,uo.prototype.canUndo=uo.prototype.canUndo,uo.prototype.discardHistoryAfterIndex=uo.prototype.lx,uo.prototype.rollbackTransaction=uo.prototype.Kf,uo.prototype.commitTransaction=uo.prototype.eb,uo.prototype.startTransaction=uo.prototype.Ea,uo.prototype.removeModel=uo.prototype.Rx,uo.prototype.addModel=uo.prototype.Xw,uo.prototype.clear=uo.prototype.clear,uo.className="UndoManager";function wr(){xi(this),this.H=Eu,this.xa="",this.Jd=!0,this.nb=!1,this.wm=null,this.yy=new ia,this.Zr=-1}wr.prototype.toString=function(){return this.name!==""?this.name+" Tool":Yn(this.constructor)},wr.prototype.updateAdornments=function(){},wr.prototype.canStart=function(){return this.isEnabled},wr.prototype.doStart=function(){},wr.prototype.doActivate=function(){this.isActive=!0},wr.prototype.doDeactivate=function(){this.isActive=!1},wr.prototype.doStop=function(){},wr.prototype.doCancel=function(){this.transactionResult=null,this.stopTool()},wr.prototype.stopTool=function(){var a=this.diagram;a.currentTool===this&&(a.currentTool=null,a.currentCursor="")},wr.prototype.doMouseDown=function(){!this.isActive&&this.canStart()&&this.doActivate()},wr.prototype.doMouseMove=function(){},wr.prototype.doMouseUp=function(){this.stopTool()},wr.prototype.doMouseWheel=function(){},wr.prototype.canStartMultiTouch=function(){return!0},wr.prototype.standardPinchZoomStart=function(){var a=this.diagram,y=a.lastInput,x=y.So(0,At.allocAt(NaN,NaN)),E=y.So(1,At.allocAt(NaN,NaN));if(x.w()&&E.w()&&(this.doCancel(),a.Ql("hasGestureZoom"))){a.Bw=a.scale;var b=E.x-x.x,z=E.y-x.y;a.Jw=Math.sqrt(b*b+z*z),y.bubbles=!1}At.free(x),At.free(E)},wr.prototype.standardPinchZoomMove=function(){var a=this.diagram,y=a.lastInput,x=y.So(0,At.allocAt(NaN,NaN)),E=y.So(1,At.allocAt(NaN,NaN));if(x.w()&&E.w()&&(this.doCancel(),a.Ql("hasGestureZoom"))){var b=E.x-x.x,z=E.y-x.y;z=Math.sqrt(b*b+z*z)/a.Jw,b=new At((Math.min(E.x,x.x)+Math.max(E.x,x.x))/2,(Math.min(E.y,x.y)+Math.max(E.y,x.y))/2),z*=a.Bw;var tt=a.commandHandler;if(z!==a.scale&&tt.canResetZoom(z)){var rt=a.zoomPoint;a.zoomPoint=b,tt.resetZoom(z),a.zoomPoint=rt}y.bubbles=!1}At.free(x),At.free(E)},wr.prototype.doKeyDown=function(){this.diagram.lastInput.key==="Esc"&&this.doCancel()},wr.prototype.doKeyUp=function(){},wr.prototype.Ea=function(a){return a===void 0&&(a=this.name),this.transactionResult=null,this.diagram.Ea(a)},wr.prototype.stopTransaction=function(){var a=this.diagram;return this.transactionResult===null?a.Kf():a.eb(this.transactionResult)},wr.prototype.standardMouseSelect=function(){var a=this.diagram;if(a.allowSelect){var y=a.lastInput,x=a.Ol(y.documentPoint,!1);if(x!==null){if(dr?y.meta:y.control){for(a.R("ChangingSelection",a.selection),y=x;y!==null&&!y.canSelect();)y=y.containingGroup;y!==null&&(y.isSelected=!y.isSelected),a.R("ChangedSelection",a.selection)}else if(y.shift){if(!x.isSelected){for(a.R("ChangingSelection",a.selection),y=x;y!==null&&!y.canSelect();)y=y.containingGroup;y!==null&&(y.isSelected=!0),a.R("ChangedSelection",a.selection)}}else if(!x.isSelected){for(y=x;y!==null&&!y.canSelect();)y=y.containingGroup;y!==null&&a.select(y)}}else!y.left||(dr?y.meta:y.control)||y.shift||a.clearSelection()}},wr.prototype.standardMouseClick=function(a,y){a===void 0&&(a=null),y===void 0&&(y=function(b){return!b.layer.isTemporary});var x=this.diagram,E=x.lastInput;return a=x.ic(E.documentPoint,a,y),E.targetObject=a,Zl(a,E,x),E.handled};function Zl(a,y,x){if(y.handled=!1,a===null||a.If()){var E=0;y.left?E=y.clickCount===1?1:y.clickCount===2?2:1:y.right&&y.clickCount===1&&(E=3);var b="ObjectSingleClicked";if(a!==null){switch(E){case 1:b="ObjectSingleClicked";break;case 2:b="ObjectDoubleClicked";break;case 3:b="ObjectContextClicked"}E!==0&&x.R(b,a)}else{switch(E){case 1:b="BackgroundSingleClicked";break;case 2:b="BackgroundDoubleClicked";break;case 3:b="BackgroundContextClicked"}E!==0&&x.R(b)}if(a!==null)for(;a!==null;){switch(x=null,E){case 1:x=a.click;break;case 2:x=a.doubleClick?a.doubleClick:a.click;break;case 3:x=a.contextClick}if(x!==null&&(x(y,a),y.handled))break;a=a.panel}else{switch(a=null,E){case 1:a=x.click;break;case 2:a=x.doubleClick?x.doubleClick:x.click;break;case 3:a=x.contextClick}a!==null&&a(y)}}}wr.prototype.standardMouseOver=function(){var a=this.diagram,y=a.lastInput;if(a.animationManager.zb!==!0){var x=a.skipsUndoManager;a.skipsUndoManager=!0;var E=a.viewportBounds.ca(y.documentPoint)?a.ic(y.documentPoint,null,null):null;!y.event||y.event.type!=="pointercancel"&&y.event.type!=="pointerout"||(E=null),y.targetObject=E;var b=!1;if(E!==a.Ck){var z=a.Ck,tt=z;for(a.Ck=E,this.doCurrentObjectChanged(z,E),y.handled=!1;z!==null;){var rt=z.mouseLeave;if(rt!==null&&(E===z||E!==null&&E.rg(z)||(rt(y,z,E),b=!0,y.handled)))break;z=z.panel}for(z=tt,y.handled=!1;E!==null&&(tt=E.mouseEnter,!(tt!==null&&(z===E||z!==null&&z.rg(E)||(tt(y,E,z),b=!0,y.handled))));)E=E.panel;E=a.Ck}if(E!==null){for(z=E,tt="";z!==null&&(tt=z.cursor,tt==="");)z=z.panel;for(a.currentCursor=tt,y.handled=!1,z=E;z!==null&&(E=z.mouseOver,!(E!==null&&(E(y,z),b=!0,y.handled)));)z=z.panel}else this.doUpdateCursor(null),E=a.mouseOver,E!==null&&(E(y),b=!0);b&&a.$b(),a.skipsUndoManager=x}},wr.prototype.doUpdateCursor=function(){var a=this.diagram;a&&(a.currentCursor="")},wr.prototype.doCurrentObjectChanged=function(){},wr.prototype.standardMouseWheel=function(){var a=this.diagram,y=a.lastInput,x=y.delta;if(x!==0&&a.documentBounds.w()){var E=a.commandHandler,b=a.toolManager.mouseWheelBehavior;if(E!==null&&(b===oh&&!y.shift||b===Wl&&y.control))(0<x?E.canIncreaseZoom():E.canDecreaseZoom())&&(b=a.zoomPoint,a.zoomPoint=y.viewPoint,0<x?E.increaseZoom():E.decreaseZoom(),a.zoomPoint=b),y.bubbles=!1;else if(b===oh&&y.shift||b===Wl&&!y.control){E=a.position.copy();var z=y.event;b=z.deltaMode;var tt=z.deltaX;z=z.deltaY;var rt="pixel";if(tt===0&&z===0||y.shift)!y.shift&&a.allowVerticalScroll?(x=3*x*a.scrollVerticalLineChange,a.scroll(rt,0<x?"up":"down",Math.abs(x))):y.shift&&a.allowHorizontalScroll&&(x=3*x*a.scrollHorizontalLineChange,a.scroll(rt,0<x?"left":"right",Math.abs(x)));else{switch(b){case 0:rt="pixel";break;case 1:rt="line";break;case 2:rt="page"}tt!==0&&a.allowHorizontalScroll&&(tt*=a.scrollHorizontalLineChange/16,a.scroll(rt,0<tt?"right":"left",Math.abs(tt))),z!==0&&a.allowVerticalScroll&&(z*=a.scrollVerticalLineChange/16,a.scroll(rt,0<z?"down":"up",Math.abs(z)))}this.doWheelChange(a,E,y)}}},wr.prototype.doWheelChange=function(a,y,x){a.position.D(y)&&x.event.wheelDeltaX===0||(x.bubbles=!1)},wr.prototype.standardWaitAfter=function(a,y){y===void 0&&(y=this.diagram.lastInput),this.cancelWaitAfter();var x=this,E=y.clone(this.yy);this.Zr=ki(function(){x.doWaitAfter(E)},a)},wr.prototype.cancelWaitAfter=function(){this.Zr!==-1&&ln.clearTimeout(this.Zr),this.Zr=-1},wr.prototype.doWaitAfter=function(){},wr.prototype.findToolHandleAt=function(a,y){return a=this.diagram.ic(a,function(x){for(;x!==null&&!(x.panel instanceof Rr);)x=x.panel;return x}),a===null?null:a.part.category===y?a:null},wr.prototype.isBeyondDragSize=function(a,y){var x=this.diagram;a===void 0&&(a=x.firstInput.viewPoint),y===void 0&&(y=x.lastInput.viewPoint);var E=x.toolManager.dragSize,b=E.width;return E=E.height,x.firstInput.isTouchEvent&&(b+=6,E+=6),Math.abs(y.x-a.x)>b||Math.abs(y.y-a.y)>E},ge.Object.defineProperties(wr.prototype,{diagram:{get:function(){return this.H},set:function(a){a instanceof Le&&(this.H=a)}},name:{get:function(){return this.xa},set:function(a){this.xa=a}},isEnabled:{get:function(){return this.Jd},set:function(a){this.Jd=a}},isActive:{get:function(){return this.nb},set:function(a){this.nb=a}},transactionResult:{get:function(){return this.wm},set:function(a){this.wm=a}}}),wr.prototype.startTransaction=wr.prototype.Ea,wr.className="Tool";function qr(){wr.call(this),this.name="ToolManager",this.hb=new Xe,this.ob=new Xe,this.Hb=new Xe,this.F=this.V=850,this.o=new Ke(2,2).ja(),this.Ha=5e3,this.ia=Wl,this.u=Gh,this.Mp=this.j=null,this.zj=-1}we(qr,wr),qr.prototype.initializeStandardTools=function(){},qr.prototype.updateAdornments=function(a){var y=this.currentToolTip;if(y instanceof Rr&&this.Mp===a){var x=y.adornedObject;(a!==null?x.part===a:x===null)?this.showToolTip(y,x):this.hideToolTip()}},qr.prototype.doMouseDown=function(){var a=this.diagram,y=a.lastInput;if(y.isTouchEvent&&this.gestureBehavior===Vl&&(y.bubbles=!1),y.isMultiTouch){if(this.cancelWaitAfter(),this.gestureBehavior===Hu){y.bubbles=!0;return}if(this.gestureBehavior===Vl)return;if(a.currentTool.canStartMultiTouch()){a.currentTool.standardPinchZoomStart();return}}for(var x=this.mouseDownTools.length,E=0;E<x;E++){var b=this.mouseDownTools.M(E);if(b.diagram=this.diagram,b.canStart()){a.doFocus(),a.currentTool=b,a.currentTool===b&&(b.isActive||b.doActivate(),b.doMouseDown());return}}a.lastInput.button===1&&(this.mouseWheelBehavior===Wl?this.mouseWheelBehavior=oh:this.mouseWheelBehavior===oh&&(this.mouseWheelBehavior=Wl)),this.doActivate(),this.standardWaitAfter(this.holdDelay,y)},qr.prototype.doMouseMove=function(){var a=this.diagram,y=a.lastInput;if(y.isMultiTouch){if(this.gestureBehavior===Hu){y.bubbles=!0;return}if(this.gestureBehavior===Vl)return;if(a.currentTool.canStartMultiTouch()){a.currentTool.standardPinchZoomMove();return}}if(this.isActive)for(var x=this.mouseMoveTools.length,E=0;E<x;E++){var b=this.mouseMoveTools.M(E);if(b.diagram=this.diagram,b.canStart()){a.doFocus(),a.currentTool=b,a.currentTool===b&&(b.isActive||b.doActivate(),b.doMouseMove());return}}Nr(this,a),a=y.event,a===null||a.type!=="pointermove"&&a.cancelable||(y.bubbles=!0)};function Nr(a,y){a.standardMouseOver(),a.isBeyondDragSize()&&a.standardWaitAfter(a.isActive?a.holdDelay:a.hoverDelay,y.lastInput)}qr.prototype.doCurrentObjectChanged=function(a,y){a=this.currentToolTip,a===null||y!==null&&a instanceof Rr&&(y===a||y.rg(a))||this.hideToolTip()},qr.prototype.doWaitAfter=function(a){var y=this.diagram;y.ta!==null&&(this.doMouseHover(),this.isActive||this.doToolTip(),a.isTouchEvent&&!y.lastInput.handled&&(a=a.copy(),a.button=2,a.buttons=2,y.lastInput=a,y.qu=!0,y.doMouseUp()))},qr.prototype.doMouseHover=function(){var a=this.diagram,y=a.lastInput;y.targetObject===null&&(y.targetObject=a.ic(y.documentPoint,null,null));var x=y.targetObject;if(x!==null)for(y.handled=!1;x!==null&&(a=this.isActive?x.mouseHold:x.mouseHover,!(a!==null&&(a(y,x),y.handled)));)x=x.panel;else x=this.isActive?a.mouseHold:a.mouseHover,x!==null&&x(y)},qr.prototype.doToolTip=function(){var a=this.diagram,y=a.lastInput;if(y.targetObject===null&&(y.targetObject=a.ic(y.documentPoint,null,null)),y=y.targetObject,y!==null){if(a=this.currentToolTip,!(a instanceof Rr)||y!==a&&!y.rg(a)){for(;y!==null;){if(a=y.toolTip,a!==null){this.showToolTip(a,y);return}y=y.panel}this.hideToolTip()}}else y=a.toolTip,y!==null?this.showToolTip(y,null):this.hideToolTip()},qr.prototype.showToolTip=function(a,y){var x=this.diagram;if(a!==this.currentToolTip&&this.hideToolTip(),a instanceof Rr){a.layerName="Tool",a.selectable=!1,a.scale=1/x.scale,a.category="ToolTip",a.placeholder!==null&&(a.placeholder.scale=x.scale);var E=a.diagram;E!==null&&E!==x&&E.remove(a),x.add(a),y!==null?a.adornedObject=y:a.data=x.model,a.Va(),this.positionToolTip(a,y)}else a instanceof hu&&a!==this.currentToolTip&&a.show(y,x,this);if(this.currentToolTip=a,this.zj!==-1&&(ln.clearTimeout(this.zj),this.zj=-1),a=this.toolTipDuration,0<a&&a!==1/0){var b=this;this.zj=ki(function(){b.hideToolTip()},a)}},qr.prototype.positionToolTip=function(a){if(a.placeholder===null){var y=this.diagram,x=y.lastInput.documentPoint.copy(),E=a.measuredBounds,b=y.viewportBounds;y.lastInput.isTouchEvent&&(x.x-=E.width),x.x+E.width>b.right&&(x.x-=E.width+5/y.scale),x.x<b.x&&(x.x=b.x),x.y=x.y+20/y.scale+E.height>b.bottom?x.y-(E.height+5/y.scale):x.y+20/y.scale,x.y<b.y&&(x.y=b.y),a.position=x}},qr.prototype.hideToolTip=function(){this.zj!==-1&&(ln.clearTimeout(this.zj),this.zj=-1);var a=this.diagram,y=this.currentToolTip;y!==null&&(y instanceof Rr?(a.remove(y),this.Mp!==null&&this.Mp.Jf(y.category),y.data=null,y.adornedObject=null):y instanceof hu&&y.hide!==null&&y.hide(a,this),this.currentToolTip=null)},qr.prototype.doMouseUp=function(){this.cancelWaitAfter();var a=this.diagram;if(this.isActive)for(var y=this.mouseUpTools.length,x=0;x<y;x++){var E=this.mouseUpTools.M(x);if(E.diagram=this.diagram,E.canStart()){a.doFocus(),a.currentTool=E,a.currentTool===E&&(E.isActive||E.doActivate(),E.doMouseUp());return}}a.doFocus(),this.doDeactivate()},qr.prototype.doMouseWheel=function(){this.standardMouseWheel()},qr.prototype.doKeyDown=function(){var a=this.diagram;a.commandHandler!==null&&a.commandHandler.doKeyDown()},qr.prototype.doKeyUp=function(){var a=this.diagram;a.commandHandler!==null&&a.commandHandler.doKeyUp()},qr.prototype.findTool=function(a){for(var y=this.mouseDownTools.length,x=0;x<y;x++){var E=this.mouseDownTools.M(x);if(E.name===a)return E}for(y=this.mouseMoveTools.length,x=0;x<y;x++)if(E=this.mouseMoveTools.M(x),E.name===a)return E;for(y=this.mouseUpTools.length,x=0;x<y;x++)if(E=this.mouseUpTools.M(x),E.name===a)return E;return null},qr.prototype.replaceTool=function(a,y){y!==null&&(y.diagram=this.diagram);for(var x=this.mouseDownTools.length,E=0;E<x;E++){var b=this.mouseDownTools.M(E);if(b.name===a)return y!==null?this.mouseDownTools.cd(E,y):this.mouseDownTools.mb(E),b}for(x=this.mouseMoveTools.length,E=0;E<x;E++)if(b=this.mouseMoveTools.M(E),b.name===a)return y!==null?this.mouseMoveTools.cd(E,y):this.mouseMoveTools.mb(E),b;for(x=this.mouseUpTools.length,E=0;E<x;E++)if(b=this.mouseUpTools.M(E),b.name===a)return y!==null?this.mouseUpTools.cd(E,y):this.mouseUpTools.mb(E),b;return null},qr.prototype.gb=function(a,y,x){y!==null&&(y.name=a,y.diagram=this.diagram),this.findTool(a)?this.replaceTool(a,y):y!==null&&x.add(y)},ge.Object.defineProperties(qr.prototype,{mouseWheelBehavior:{get:function(){return this.ia},set:function(a){this.ia=a}},gestureBehavior:{get:function(){return this.u},set:function(a){this.u=a}},currentToolTip:{get:function(){return this.j},set:function(a){this.j=a,this.Mp=a!==null&&a instanceof Rr?a.adornedPart:null}},mouseDownTools:{get:function(){return this.hb}},mouseMoveTools:{get:function(){return this.ob}},mouseUpTools:{get:function(){return this.Hb}},hoverDelay:{get:function(){return this.V},set:function(a){this.V=a}},holdDelay:{get:function(){return this.F},set:function(a){this.F=a}},dragSize:{get:function(){return this.o},set:function(a){this.o=a.J()}},toolTipDuration:{get:function(){return this.Ha},set:function(a){this.Ha=a}}}),qr.prototype.replaceStandardTool=qr.prototype.gb;var Wl=new Ue(qr,"WheelScroll",0),oh=new Ue(qr,"WheelZoom",1),kd=new Ue(qr,"WheelNone",2),Gh=new Ue(qr,"GestureZoom",3),Vl=new Ue(qr,"GestureCancel",4),Hu=new Ue(qr,"GestureNone",5);qr.className="ToolManager",qr.WheelScroll=Wl,qr.WheelZoom=oh,qr.WheelNone=kd,qr.GestureZoom=Gh,qr.GestureCancel=Vl,qr.GestureNone=Hu;function vo(){wr.call(this),this.name="Dragging",this.u=this.Sw=this.ob=!0,this.o=this.Ha=this.V=this.Oe=null,this.Ym=this.Hb=!1,this.tl=new At(NaN,NaN),this.Fr=new At,this.hb=!0,this.Ik=100,this.Cg=[],this.te=new qe().freeze(),this.ia=new at,this.Bn=null,this.F="copy",this.Oc="",this.Pc="no-drop"}var cl;we(vo,wr),vo.prototype.canStart=function(){if(!this.isEnabled)return!1;var a=this.diagram;if(a.isReadOnly&&!a.allowDragOut||!a.allowMove&&!a.allowCopy&&!a.allowDragOut||!a.allowSelect)return!1;var y=a.lastInput;return!y.left||a.currentTool!==this&&(!this.isBeyondDragSize()||y.isTouchEvent&&y.timestamp-a.firstInput.timestamp<this.Ik)?!1:this.findDraggablePart()!==null},vo.prototype.findDraggablePart=function(){var a=this.diagram;if(a=a.Ol(a.firstInput.documentPoint,!1),a===null)return null;for(;a!==null&&!a.canSelect();)a=a.containingGroup;return a!==null&&(a.canMove()||a.canCopy())?a:null},vo.prototype.standardMouseSelect=function(){var a=this.diagram;if(a.allowSelect){var y=a.Ol(a.firstInput.documentPoint,!1);if(y!==null){for(;y!==null&&!y.canSelect();)y=y.containingGroup;this.currentPart=y,this.currentPart===null||this.currentPart.isSelected||(a.R("ChangingSelection",a.selection),y=a.lastInput,(dr?y.meta:y.control)||y.shift||a.clearSelection(!0),this.currentPart.isSelected=!0,a.R("ChangedSelection",a.selection))}}},vo.prototype.doActivate=function(){var a=this.diagram;this.Bn=null,this.currentPart===null&&this.standardMouseSelect();var y=this.currentPart;y!==null&&(y.canMove()||y.canCopy())&&(a.Fu(!0),xa=null,this.isActive=!0,this.tl.set(a.position),Hh(this,a.selection),this.Cg.length=0,a.animationManager.Cc(),this.draggedParts=this.computeEffectiveCollection(a.selection,this.dragOptions),this.Sw=this.diagram.layout.isRealtime,this.diagram.layout.isRealtime=!1,a.Ns=!0,a.Gf("temporaryPixelRatio")===!0&&30<a.$w&&gs(a),ff(a,this.draggedParts),this.Ea("Drag"),this.startPoint=a.firstInput.documentPoint,a.isMouseCaptured=!0,a.allowDragOut&&(this.isDragOutStarted=!0,this.Ym=!1,xa=this,ah=this.diagram,this.doSimulatedDragOut()))};function Hh(a,y){if(a.dragsLink){var x=a.diagram;x.allowRelink&&(x.model.Wj()&&y.count===1&&y.first()instanceof En?(a.draggedLink=y.first(),a.draggedLink.canRelinkFrom()&&a.draggedLink.canRelinkTo()&&a.draggedLink.Ej(),a.Oe=x.toolManager.findTool("Relinking"),a.Oe===null&&(a.Oe=new Ks,a.Oe.diagram=x),a.Oe.originalLink=a.draggedLink):(a.draggedLink=null,a.Oe=null))}}vo.prototype.computeEffectiveCollection=function(a,y){return this.diagram.commandHandler.computeEffectiveCollection(a,y)},vo.prototype.Pd=function(a){return a===void 0?new Uu(Nn):this.isGridSnapEnabled?new Uu(new At(Math.round(1e3*a.x)/1e3,Math.round(1e3*a.y)/1e3)):new Uu(a.copy())},vo.prototype.doDeactivate=function(){this.isActive=!1;var a=this.diagram;if(this.diagram.layout.isRealtime=this.Sw,a.Fu(!1),a.ug(),su(this),$h(a,this.draggedParts),this.draggedParts=this.currentPart=this.Bn=null,this.Ym=this.isDragOutStarted=!1,0<cl.count){for(var y=cl,x=y.length,E=0;E<x;E++){var b=y.M(E);po(b),to(b),su(b),b.diagram.ug()}y.clear()}po(this),this.tl.h(NaN,NaN),ah!==null&&(ah.currentCursor=""),xa=ah=null,to(this),a.isMouseCaptured=!1,a.currentCursor="",a.Ns=!1,this.stopTransaction(),xc(a,!0)},vo.prototype.stopTransaction=function(){var a=this.diagram,y=wr.prototype.stopTransaction.call(this);return y&&a.undoManager.transactionToUndo!==null&&a.undoManager.transactionToUndo.ak(),y};function su(a){var y=a.diagram,x=y.skipsUndoManager;y.skipsUndoManager=!0,wu(a,y.lastInput,null),y.skipsUndoManager=x,a.Cg.length=0}function Ld(){var a=xa;to(a),Za(a);var y=a.diagram;a.tl.w()&&(y.position=a.tl),y.ug()}vo.prototype.doCancel=function(){to(this),Za(this);var a=this.diagram;this.tl.w()&&(a.position=this.tl),this.stopTool()},vo.prototype.doKeyDown=function(){var a=this.diagram,y=a.lastInput;this.isActive&&(y.key==="Esc"?this.doCancel():y.key!==a.previousInput.key&&this.doMouseMove())},vo.prototype.doKeyUp=function(){this.isActive&&this.doMouseMove()};function lu(a,y){if(a.copiedParts===null){var x=a.diagram;if((!y||!x.isReadOnly&&!x.isModelReadOnly)&&a.draggedParts!==null){var E=x.undoManager;for(E.isEnabled&&E.isInTransaction?E.currentTransaction!==null&&0<E.currentTransaction.changes.count&&(x.undoManager.Kf(),x.Ea("Drag")):Za(a),x.skipsUndoManager=!y,x.partManager.addsToTemporaryLayer=!y,a.startPoint=x.firstInput.documentPoint,y=a.copiesEffectiveCollection?a.draggedParts.Lf():x.selection,y=x.Kj(y,x,!0),x=new Me,E=a.draggedParts.iterator;E.next();){var b=E.key;if(b.Zc()&&b.canCopy()){var z=y.I(b);z!==null&&(z.location=b.location,z.Va(),x.add(z,a.Pd(z.location)))}}for(y=y.iterator;y.next();)E=y.value,E instanceof En&&E.canCopy()&&x.add(E,a.Pd());a.copiedParts=x,Hh(a,x.Lf()),a.draggedLink!==null&&(x=a.draggedLink,y=x.routeBounds,kh(x,a.startPoint.x-(y.x+y.width/2),a.startPoint.y-(y.y+y.height/2))),a.doUpdateCursor(null)}}}function to(a){var y=a.diagram;if(a.copiedParts!==null){if(y.Is(a.copiedParts.Lf(),!1),a.copiedParts=null,a.draggedParts!==null)for(var x=a.draggedParts.iterator;x.next();)x.key instanceof En&&(x.value.point=new At(0,0));a.doUpdateCursor(null)}y.skipsUndoManager=!1,y.partManager.addsToTemporaryLayer=!1,a.startPoint=y.firstInput.documentPoint}function po(a){if(a.draggedLink!==null){if(a.dragsLink&&a.Oe!==null){var y=a.Oe;y.diagram.remove(y.temporaryFromNode),y.diagram.remove(y.temporaryToNode),a.Oe.originalLink=null}a.draggedLink=null,a.Oe=null}}function ra(a,y,x){var E=a.diagram,b=a.startPoint,z=At.alloc();z.assign(E.lastInput.documentPoint),a.moveParts(y,z.re(b),x),At.free(z),E.Gf("temporaryPixelRatio")===!0&&E.Yh===null&&30<E.$w&&(gs(E),E.hk())}vo.prototype.moveParts=function(a,y,x){x===void 0&&(x=!1);var E=this.diagram;E!==null&&qh(E,a,y,this.dragOptions,x)};function Za(a){if(a.draggedParts!==null){for(var y=a.diagram,x=a.draggedParts.iterator;x.next();){var E=x.key;E.Zc()&&(E.location=x.value.point)}for(x=a.draggedParts.iterator;x.next();)if(E=x.key,E instanceof En&&E.suspendsRouting){var b=x.value.point;a.draggedParts.add(E,a.Pd()),kh(E,-b.x,-b.y)}y.bd()}}function Ia(a,y){var x=a.diagram;a.dragsLink&&(a.draggedLink!==null&&(a.draggedLink.fromNode=null,a.draggedLink.toNode=null),fl(a,!1));var E=a.findDragOverObject(y),b=x.lastInput;b.targetObject=E,a.doUpdateCursor(E);var z=x.skipsUndoManager,tt=!1;try{if(x.skipsUndoManager=!0,tt=wu(a,b,E),!a.isActive&&xa===null)return;var rt=E!==null?E.part:null;if(rt===null||x.handlesDragDropForTopLevelParts&&rt.isTopLevel&&!(rt instanceof $i)){var ot=x.mouseDragOver;ot!==null&&(ot(b),tt=!0)}if(!a.isActive&&xa===null||(a.doDragOver(y,E),!a.isActive&&xa===null))return}finally{x.skipsUndoManager=z,tt&&x.bd()}a.Bn=E,x.isReadOnly||!x.allowMove&&!x.allowCopy||!x.allowHorizontalScroll&&!x.allowVerticalScroll||x.gs(b.viewPoint)}vo.prototype.findDragOverObject=function(a){var y=this;return ku(this.diagram,a,null,function(x){return x===null?x=!0:(x=x.part,x=!!(x===null||x instanceof Rr||x.layer.isTemporary||y.draggedParts&&y.draggedParts.contains(x)||y.copiedParts&&y.copiedParts.contains(x))),!x})},vo.prototype.doUpdateCursor=function(a){var y=this.diagram;(a===null||this.Bn!==a)&&(!this.diagram.currentTool.isActive||this.mayCopy()?y.currentCursor=this.copyCursor:this.mayMove()?y.currentCursor=this.moveCursor:this.mayDragOut()&&(y.currentCursor=this.nodropCursor))};function wu(a,y,x){var E=!1,b=a.Cg.length,z=0<b?a.Cg[0]:null;if(x===z)return!1;y.handled=!1;for(var tt=0;tt<b;tt++){var rt=a.Cg[tt],ot=rt.mouseDragLeave;if(ot!==null&&(ot(y,rt,x),E=!0,y.handled))break}if(a.Cg.length=0,!a.isActive&&xa===null||x===null)return E;for(y.handled=!1,b=x;b!==null;)a.Cg.push(b),b=uu(b);for(b=a.Cg.length,x=0;x<b&&(tt=a.Cg[x],rt=tt.mouseDragEnter,rt===null||(rt(y,tt,z),E=!0,!y.handled));x++);return E}function uu(a){var y=a.panel;return y!==null?y:a instanceof Li&&!(a instanceof $i)&&(a=a.containingGroup,a!==null&&a.handlesDragDropForMembers)?a:null}function Pu(a,y,x){var E=a.Oe;if(E===null)return null;var b=a.diagram.og(y,E.portGravity,function(st){return E.findValidLinkablePort(st,x)});a=At.alloc();var z=1/0,tt=null;for(b=b.iterator;b.next();){var rt=b.value;if(rt.part!==null){var ot=rt.ga(er,a);ot=y.Bf(ot),ot<z&&(tt=rt,z=ot)}}return At.free(a),tt}function fl(a,y){var x=a.draggedLink;if(x!==null&&!(2>x.pointsCount)){var E=a.diagram;if(!E.isReadOnly){var b=a.Oe;if(b!==null){var z=null,tt=null;x.fromNode===null&&(z=Pu(a,x.i(0),!1),z!==null&&(tt=z.part));var rt=null,ot=null;x.toNode===null&&(rt=Pu(a,x.i(x.pointsCount-1),!0),rt!==null&&(ot=rt.part)),b.isValidLink(tt,z,ot,rt)?y?(x.defaultFromPoint=x.i(0),x.defaultToPoint=x.i(x.pointsCount-1),x.suspendsRouting=!1,x.fromNode=tt,z!==null&&(x.fromPortId=z.portId),x.toNode=ot,rt!==null&&(x.toPortId=rt.portId),x.fromPort!==E.Mx&&E.R("LinkRelinked",x,E.Mx),x.toPort!==E.Nx&&E.R("LinkRelinked",x,E.Nx)):qc(b,tt,z,ot,rt):qc(b,null,null,null,null)}}}}vo.prototype.doDragOver=function(){};function Ul(a,y){var x=a.diagram;a.dragsLink&&fl(a,!0),su(a);var E=a.findDragOverObject(y),b=x.lastInput;if(b.targetObject=E,E!==null){b.handled=!1;for(var z=E;z!==null;){var tt=z.mouseDrop;if(tt!==null&&(tt(b,z),b.handled))break;_0(a,b,z),z=uu(z)}}else z=x.mouseDrop,z!==null&&z(b);if(a.isActive||xa!==null){for(b=(a.copiedParts||a.draggedParts).iterator;b.next();)z=b.key,z instanceof Un&&z.linksConnected.each(function(rt){rt.suspendsRouting=!1});if(a.doDropOnto(y,E),a.isActive||xa!==null){for(a=Ee.alloc(),y=x.selection.iterator;y.next();)E=y.value,E instanceof Un&&Q0(x,E,a);Ee.free(a)}}}function _0(a,y,x){a=a.diagram,x=x.part,!a.handlesDragDropForTopLevelParts||!x.isTopLevel||x instanceof $i||(x=a.mouseDrop,x!==null&&x(y))}function Q0(a,y,x){var E=!1;if(x=y.getAvoidableRect(x),a.viewportBounds.Re(x)&&(E=!0),a=a.Nu(x,function(b){return b.part},function(b){return b instanceof En},!0,function(b){return b instanceof En},E),a.count!==0)for(a=a.iterator;a.next();)x=a.value,!x.Td(y)&&x.isAvoiding&&x.bb()}vo.prototype.doDropOnto=function(){},vo.prototype.doMouseMove=function(){if(this.isActive){var a=this.diagram,y=a.lastInput;this.simulatedMouseMove(y.event,y.documentPoint,y.targetDiagram)||this.currentPart===null||this.draggedParts===null||(this.mayCopy()?(lu(this,!1),ff(a,this.copiedParts),ra(this,this.copiedParts,!1),$h(a,this.copiedParts)):this.mayMove()?(to(this),ra(this,this.draggedParts,!0)):this.mayDragOut()?(lu(this,!1),ra(this,this.copiedParts,!1)):to(this),Ia(this,a.lastInput.documentPoint))}},vo.prototype.doMouseUp=function(){if(this.isActive){var a=this.diagram,y=a.lastInput;if(!this.simulatedMouseUp(y.event,y.documentPoint,y.targetDiagram)){y=!1;var x=this.mayCopy();if(x&&this.copiedParts!==null?(to(this),lu(this,!0),ff(a,this.copiedParts),ra(this,this.copiedParts,!1),$h(a,this.copiedParts),this.copiedParts!==null&&(a.R("ChangingSelection",a.selection),a.clearSelection(!0),this.copiedParts.iteratorKeys.each(function(b){b.isSelected=!0}))):(y=!0,to(this),this.mayMove()&&(ra(this,this.draggedParts,!0),Ia(this,a.lastInput.documentPoint))),this.Ym=!0,Ul(this,a.lastInput.documentPoint),this.isActive){var E=x?this.copiedParts.Lf():this.draggedParts.Lf();this.copiedParts=null,y&&q0(this),a.Ya(),$h(a,this.draggedParts),this.transactionResult=x?"Copy":"Move",a.R(x?"SelectionCopied":"SelectionMoved",E)}this.stopTool(),x&&a.R("ChangedSelection",a.selection)}}},vo.prototype.simulatedMouseMove=function(a,y,x){if(xa===null)return!1;var E=xa.diagram;x instanceof Le||(x=null);var b=ah;return x!==b&&(b!==null&&b!==E&&(b.ug(),xa.isDragOutStarted=!1,b=b.toolManager.findTool("Dragging"),b!==null&&b.doSimulatedDragLeave()),ah=x,x!==null&&x!==E&&(Ld(),b=x.toolManager.findTool("Dragging"),b!==null&&(cl.contains(b)||cl.add(b),b.doSimulatedDragEnter())),this.doUpdateCursor(null)),x===null||x===E||!x.allowDrop||x.isReadOnly||!x.allowInsert?!1:(E=x.toolManager.findTool("Dragging"),E!==null&&(a!==null&&(a.targetTouches!==void 0&&(0<a.targetTouches.length?a=a.targetTouches[0]:0<a.changedTouches.length&&(a=a.changedTouches[0])),y=x.getMouse(a)),x.lastInput.documentPoint=y,x.lastInput.viewPoint=x.op(y),x.lastInput.down=!1,x.lastInput.up=!1,E.doSimulatedDragOver()),!0)},vo.prototype.simulatedMouseUp=function(a,y,x){if(xa===null)return!1;var E=ah,b=xa.diagram;if(x===null)return xa.doCancel(),!0;if(x!==E){var z=E.toolManager.findTool("Dragging");if(E!==null&&E!==b&&z!==null)return E.ug(),xa.isDragOutStarted=!1,z.doSimulatedDragLeave(),!1;ah=x,E=x.toolManager.findTool("Dragging"),E!==null&&(Ld(),cl.contains(E)||cl.add(E),E.doSimulatedDragEnter())}return x!==this.diagram?(a!==null?(a.targetTouches!==void 0&&(0<a.targetTouches.length?a=a.targetTouches[0]:0<a.changedTouches.length&&(a=a.changedTouches[0])),y=x.getMouse(a)):y===null&&(y=new At),x.lastInput.documentPoint=y,x.lastInput.viewPoint=x.op(y),x.lastInput.down=!1,x.lastInput.up=!0,a=x.toolManager.findTool("Dragging"),a!==null&&a.doSimulatedDrop(),a=xa,a!==null&&(x=a.mayCopy(),a.transactionResult=x?"Copy":"Move",a.stopTool()),!0):!1};function q0(a){if(a.draggedParts!==null)for(var y=a.draggedParts.iterator;y.next();){var x=y.key;x instanceof Un&&(x=x.containingGroup,x===null||x.placeholder===null||a.draggedParts.contains(x)||x.placeholder.v())}}vo.prototype.mayCopy=function(){if(!this.isCopyEnabled)return!1;var a=this.diagram;if(a.isReadOnly||a.isModelReadOnly||!a.allowInsert||!a.allowCopy||(dr?!a.lastInput.alt:!a.lastInput.control))return!1;for(a=a.selection.iterator;a.next();)if(a.value.canCopy())return!0;return!!(this.draggedLink!==null&&this.dragsLink&&this.draggedLink.canCopy())},vo.prototype.mayDragOut=function(){if(!this.isCopyEnabled)return!1;var a=this.diagram;if(!a.allowDragOut||!a.allowCopy||a.allowMove)return!1;for(a=a.selection.iterator;a.next();)if(a.value.canCopy())return!0;return!!(this.draggedLink!==null&&this.dragsLink&&this.draggedLink.canCopy())},vo.prototype.mayMove=function(){var a=this.diagram;if(a.isReadOnly||!a.allowMove)return!1;for(a=a.selection.iterator;a.next();)if(a.value.canMove())return!0;return!!(this.draggedLink!==null&&this.dragsLink&&this.draggedLink.canMove())},vo.prototype.computeBorder=function(a,y,x){return this.Ym||this.draggedParts===null||this.draggedParts.contains(a)?null:x.assign(y)},vo.prototype.Az=function(){return xa},vo.prototype.mayDragIn=function(){var a=this.diagram;if(!a.allowDrop||a.isReadOnly||a.isModelReadOnly||!a.allowInsert)return!1;var y=xa;return!(y===null||y.diagram.model.dataFormat!==a.model.dataFormat)},vo.prototype.doSimulatedDragEnter=function(){if(this.mayDragIn()){var a=this.diagram;a.animationManager.Cc(),el(a),a.animationManager.Cc(),a=xa,a!==null&&(a.diagram.Ns=!1),this.doUpdateCursor(null)}},vo.prototype.doSimulatedDragLeave=function(){var a=xa;a!==null&&a.doSimulatedDragOut(),this.doCancel()},vo.prototype.doSimulatedDragOver=function(){var a=this.diagram;a.animationManager.Dm=!0;var y=xa;if(y!==null&&y.draggedParts!==null){if(!this.mayDragIn())return;Rp(this,y.draggedParts.Lf(),!1,a.firstInput),ra(this,this.copiedParts,!1),Ia(this,a.lastInput.documentPoint)}a.animationManager.Dm=!1},vo.prototype.doSimulatedDrop=function(){var a=this.diagram,y=xa;if(y!==null){var x=y.diagram;if(y.Ym=!0,to(this),!this.mayDragIn())return;a.animationManager.Dm=!0,a.R("ChangingSelection",a.selection),this.Ea("Drop"),Rp(this,y.draggedParts.Lf(),!0,a.lastInput),ra(this,this.copiedParts,!1);var E=new qe;this.copiedParts!==null&&(a.clearSelection(!0),this.copiedParts.iteratorKeys.each(function(b){b.isSelected=!0,E.add(b)})),Ul(this,a.lastInput.documentPoint),a.Ya(),this.copiedParts!==null&&(this.transactionResult="ExternalCopy"),this.copiedParts=null,a.doFocus(),a.R("ExternalObjectsDropped",E,x),this.stopTransaction(),a.R("ChangedSelection",a.selection)}a.animationManager.Dm=!1};function Rp(a,y,x,E){if(a.copiedParts===null){var b=a.diagram;if(!b.isReadOnly&&!b.isModelReadOnly){b.skipsUndoManager=!x,b.partManager.addsToTemporaryLayer=!x,a.startPoint=E.documentPoint,x=b.Kj(y,b,!0);var z=Ee.alloc();b=E=1/0;for(var tt=-1/0,rt=-1/0,ot=y.iterator;ot.next();){var st=ot.value;if(st.isVisible()){var ut=st.location;st=ut.x,ut=ut.y,isNaN(st)||isNaN(ut)||(st<E&&(E=st),ut<b&&(b=ut),st>tt&&(tt=st),ut>rt&&(rt=ut))}}for(E===1/0?z.h(0,0,0,0):z.h(E,b,tt-E,rt-b),E=z.x+z.width/2,b=z.y+z.height/2,Ee.free(z),z=a.Fr,tt=new Me,rt=At.alloc(),ot=y.iterator;ot.next();)st=ot.value,st instanceof En&&st.canCopy()&&(ut=x.I(st),ut!==null&&(ut.points=st.points,kh(ut,z.x-E,z.y-b),ut.suspendsRouting=!0,tt.add(ut,a.Pd())));for(y=y.iterator;y.next();)st=y.value,st.Zc()&&st.canCopy()&&(ot=x.I(st),ot!==null&&(st=st.location,rt.h(z.x-(E-st.x),z.y-(b-st.y)),ot.location=rt,ot.Va(),tt.add(ot,a.Pd(rt))));At.free(rt),a.copiedParts=tt,Hh(a,tt.Lf()),a.draggedLink!==null&&(x=a.draggedLink,y=x.routeBounds,kh(x,a.startPoint.x-(y.x+y.width/2),a.startPoint.y-(y.y+y.height/2))),a.doUpdateCursor(null)}}}vo.prototype.doSimulatedDragOut=function(){var a=this.diagram;a.Ns=!1,this.mayCopy()||this.mayMove()?a.currentCursor="":a.currentCursor=this.nodropCursor,this.Bn=null},vo.prototype.computeMove=function(a,y,x,E){return x=this.diagram,x!==null?x.computeMove(a,y,this.dragOptions,E):new At},ge.Object.defineProperties(vo.prototype,{isCopyEnabled:{get:function(){return this.ob},set:function(a){this.ob=a}},copiesEffectiveCollection:{get:function(){return this.u},set:function(a){this.u=a}},dragOptions:{get:function(){return this.ia},set:function(a){this.ia=a}},isGridSnapEnabled:{get:function(){return this.dragOptions.isGridSnapEnabled},set:function(a){this.dragOptions.isGridSnapEnabled=a}},isComplexRoutingRealtime:{get:function(){return this.hb},set:function(a){this.hb=a}},isGridSnapRealtime:{get:function(){return this.dragOptions.isGridSnapRealtime},set:function(a){this.dragOptions.isGridSnapRealtime=a}},gridSnapCellSize:{get:function(){return this.dragOptions.gridSnapCellSize},set:function(a){this.dragOptions.gridSnapCellSize.D(a)||(a=a.J(),this.dragOptions.gridSnapCellSize=a)}},gridSnapCellSpot:{get:function(){return this.dragOptions.gridSnapCellSpot},set:function(a){this.dragOptions.gridSnapCellSpot.D(a)||(a=a.J(),this.dragOptions.gridSnapCellSpot=a)}},gridSnapOrigin:{get:function(){return this.dragOptions.gridSnapOrigin},set:function(a){this.dragOptions.gridSnapOrigin.D(a)||(a=a.J(),this.dragOptions.gridSnapOrigin=a)}},dragsLink:{get:function(){return this.dragOptions.dragsLink},set:function(a){this.dragOptions.dragsLink=a}},dragsTree:{get:function(){return this.dragOptions.dragsTree},set:function(a){this.dragOptions.dragsTree=a}},copyCursor:{get:function(){return this.F},set:function(a){this.F=a}},moveCursor:{get:function(){return this.Oc},set:function(a){this.Oc=a}},nodropCursor:{get:function(){return this.Pc},set:function(a){this.Pc=a}},currentPart:{get:function(){return this.V},set:function(a){this.V=a}},copiedParts:{get:function(){return this.o},set:function(a){this.o=a}},draggedParts:{get:function(){return this.Ha},set:function(a){this.Ha=a}},draggingParts:{get:function(){return this.copiedParts!==null?this.copiedParts.Lf():this.draggedParts!==null?this.draggedParts.Lf():this.te}},draggedLink:{get:function(){return this.diagram.draggedLink},set:function(a){this.diagram.draggedLink=a}},isDragOutStarted:{get:function(){return this.Hb},set:function(a){this.Hb=a}},startPoint:{get:function(){return this.Fr},set:function(a){this.Fr.D(a)||this.Fr.assign(a)}},delay:{get:function(){return this.Ik},set:function(a){this.Ik=a}}}),vo.prototype.getDraggingSource=vo.prototype.Az;var xa=null,ah=null;vo.className="DraggingTool",cl=new Xe,bi("draggingTool",function(){return this.findTool("Dragging")},function(a){this.gb("Dragging",a,this.mouseMoveTools)}),qr.prototype.doCancel=function(){xa!==null&&xa.doCancel(),wr.prototype.doCancel.call(this)};function Ao(){wr.call(this),this.te=100,this.Ha=!1,this.u="pointer";var a=new En,y=new lr;y.isPanelMain=!0,y.stroke="blue",a.add(y),y=new lr,y.toArrow="Standard",y.fill="blue",y.stroke="blue",a.add(y),a.layerName="Tool",this.Ci=a,a=new Un,y=new lr,y.portId="",y.figure="Rectangle",y.fill=null,y.stroke="magenta",y.strokeWidth=2,y.desiredSize=Ci,a.add(y),a.selectable=!1,a.layerName="Tool",this.Bi=a,this.j=y,a=new Un,y=new lr,y.portId="",y.figure="Rectangle",y.fill=null,y.stroke="magenta",y.strokeWidth=2,y.desiredSize=Ci,a.add(y),a.selectable=!1,a.layerName="Tool",this.Di=a,this.o=y,this.Pc=this.Oc=this.ob=this.hb=this.Hb=null,this.ia=!0,this.hy=new Me,this.Of=this.gj=this.Pf=null}we(Ao,wr),Ao.prototype.doStop=function(){this.diagram.ug(),this.originalToPort=this.originalToNode=this.originalFromPort=this.originalFromNode=this.originalLink=null,this.validPortsCache.clear(),this.targetPort=null},Ao.prototype.copyPortProperties=function(a,y,x,E,b){if(a!==null&&y!==null&&x!==null&&E!==null){var z=y.Df(),tt=Ke.alloc();tt.width=y.naturalBounds.width*z,tt.height=y.naturalBounds.height*z,E.desiredSize=tt,Ke.free(tt),b?(E.toSpot=y.toSpot,E.toEndSegmentLength=y.toEndSegmentLength):(E.fromSpot=y.fromSpot,E.fromEndSegmentLength=y.fromEndSegmentLength),x.locationSpot=er,z=At.alloc(),x.location=y.ga(er,z),At.free(z),E.angle=y.li(),this.portTargeted!==null&&this.portTargeted(a,y,x,E,b)}},Ao.prototype.setNoTargetPortProperties=function(a,y,x){y!==null&&(y.desiredSize=Ci,y.fromSpot=qi,y.toSpot=qi),a!==null&&(a.location=this.diagram.lastInput.documentPoint),this.portTargeted!==null&&this.portTargeted(null,null,a,y,x)},Ao.prototype.doMouseDown=function(){this.isActive&&this.doMouseMove()},Ao.prototype.doMouseMove=function(){if(this.isActive){var a=this.diagram;if(this.targetPort=this.findTargetPort(this.isForwards),this.targetPort!==null&&this.targetPort.part instanceof Un){var y=this.targetPort.part;this.isForwards?this.copyPortProperties(y,this.targetPort,this.temporaryToNode,this.temporaryToPort,!0):this.copyPortProperties(y,this.targetPort,this.temporaryFromNode,this.temporaryFromPort,!1)}else this.isForwards?this.setNoTargetPortProperties(this.temporaryToNode,this.temporaryToPort,!0):this.setNoTargetPortProperties(this.temporaryFromNode,this.temporaryFromPort,!1);(a.allowHorizontalScroll||a.allowVerticalScroll)&&a.gs(a.lastInput.viewPoint)}},Ao.prototype.findValidLinkablePort=function(a,y){if(a===null)return null;var x=a.part;if(!(x instanceof Un))return null;for(;a!==null;){var E=y?a.toLinkable:a.fromLinkable;if(E===!0&&(a.portId!==null||a instanceof Un)&&(y?this.isValidTo(x,a):this.isValidFrom(x,a)))return a;if(E===!1)break;a=a.panel}return null},Ao.prototype.findTargetPort=function(a){var y=this.diagram,x=y.lastInput.documentPoint,E=this.portGravity;0>=E&&(E=.1);var b=this,z=y.og(x,E,function(ft){return b.findValidLinkablePort(ft,a)},null,!0);for(E=1/0,y=null,z=z.iterator;z.next();){var tt=z.value,rt=tt.part;if(rt instanceof Un){var ot=tt.ga(er,At.alloc()),st=x.x-ot.x,ut=x.y-ot.y;At.free(ot),ot=st*st+ut*ut,ot<E&&(st=this.validPortsCache.I(tt),st!==null?st&&(y=tt,E=ot):a&&this.isValidLink(this.originalFromNode,this.originalFromPort,rt,tt)||!a&&this.isValidLink(rt,tt,this.originalToNode,this.originalToPort)?(this.validPortsCache.add(tt,!0),y=tt,E=ot):this.validPortsCache.add(tt,!1))}}return y!==null&&(x=y.part,x instanceof Un&&(x.layer===null||x.layer.allowLink))?y:null},Ao.prototype.isValidFrom=function(a,y){if(a===null||y===null)return this.isUnconnectedLinkValid;if(this.diagram.currentTool===this&&(a.layer!==null&&!a.layer.allowLink||y.fromLinkable!==!0))return!1;var x=y.fromMaxLinks;if(1/0>x){if(this.originalLink!==null&&a===this.originalFromNode&&y===this.originalFromPort)return!0;if(y=y.portId,y===null&&(y=""),a.Mo(y).count>=x)return!1}return!0},Ao.prototype.isValidTo=function(a,y){if(a===null||y===null)return this.isUnconnectedLinkValid;if(this.diagram.currentTool===this&&(a.layer!==null&&!a.layer.allowLink||y.toLinkable!==!0))return!1;var x=y.toMaxLinks;if(1/0>x){if(this.originalLink!==null&&a===this.originalToNode&&y===this.originalToPort)return!0;if(y=y.portId,y===null&&(y=""),a.Sd(y).count>=x)return!1}return!0},Ao.prototype.isInSameNode=function(a,y){return a===null||y===null?!1:a===y?!0:(a=a.part,y=y.part,a!==null&&a===y)},Ao.prototype.isLinked=function(a,y){if(a===null||y===null)return!1;var x=a.part;if(!(x instanceof Un))return!1;a=a.portId,a===null&&(a="");var E=y.part;if(!(E instanceof Un))return!1;for(y=y.portId,y===null&&(y=""),y=E.Sd(y);y.next();)if(E=y.value,E.fromNode===x&&E.fromPortId===a)return!0;return!1},Ao.prototype.isValidLink=function(a,y,x,E){if(!this.isValidFrom(a,y)||!this.isValidTo(x,E)||!(y===null||E===null||(y.fromLinkableSelfNode&&E.toLinkableSelfNode||!this.isInSameNode(y,E))&&(y.fromLinkableDuplicates&&E.toLinkableDuplicates||!this.isLinked(y,E)))||this.originalLink!==null&&(a!==null&&this.isLabelDependentOnLink(a,this.originalLink)||x!==null&&this.isLabelDependentOnLink(x,this.originalLink))||a!==null&&x!==null&&(a.data===null&&x.data!==null||a.data!==null&&x.data===null)||!this.isValidCycle(a,x,this.originalLink))return!1;if(a!==null){var b=a.linkValidation;if(b!==null&&!b(a,y,x,E,this.originalLink))return!1}return x!==null&&(b=x.linkValidation,b!==null&&!b(a,y,x,E,this.originalLink))?!1:(b=this.linkValidation,b!==null?b(a,y,x,E,this.originalLink):!0)},Ao.prototype.isLabelDependentOnLink=function(a,y){if(a===null)return!1;var x=a.labeledLink;if(x===null)return!1;if(x===y)return!0;var E=new qe;return E.add(a),Wa(this,x,y,E)};function Wa(a,y,x,E){if(y===x)return!0;var b=y.fromNode;return b!==null&&b.isLinkLabel&&(E.add(b),Wa(a,b.labeledLink,x,E))?!0:(y=y.toNode,!!(y!==null&&y.isLinkLabel&&(E.add(y),Wa(a,y.labeledLink,x,E))))}Ao.prototype.isValidCycle=function(a,y,x){if(x===void 0&&(x=null),a===null||y===null)return this.isUnconnectedLinkValid;var E=this.diagram.validCycle;if(E!==kc){if(E===Rg){if(E=x||this.temporaryLink,E!==null&&!E.isTreeLink)return!0;for(E=y.linksConnected;E.next();){var b=E.value;if(b!==x&&b.isTreeLink&&b.toNode===y)return!1}return!_a(this,a,y,x,!0)}if(E===jg){if(E=x||this.temporaryLink,E!==null&&!E.isTreeLink)return!0;for(E=a.linksConnected;E.next();)if(b=E.value,b!==x&&b.isTreeLink&&b.fromNode===a)return!1;return!_a(this,a,y,x,!0)}if(E===Tg)return a===y?a=!0:(E=new qe,E.add(y),a=Qa(this,E,a,y,x)),!a;if(E===Og)return!_a(this,a,y,x,!1);if(E===Ig)return a===y?a=!0:(E=new qe,E.add(y),a=bd(this,E,a,y,x)),!a}return!0};function _a(a,y,x,E,b){if(y===x)return!0;if(y===null||x===null)return!1;for(var z=y.linksConnected;z.next();){var tt=z.value;if(tt!==E&&(!b||tt.isTreeLink)&&tt.toNode===y&&(tt=tt.fromNode,tt!==y&&_a(a,tt,x,E,b)))return!0}return!1}function Qa(a,y,x,E,b){if(x===E)return!0;if(x===null||E===null||y.contains(x))return!1;y.add(x);for(var z=x.linksConnected;z.next();){var tt=z.value;if(tt!==b&&tt.toNode===x&&(tt=tt.fromNode,tt!==x&&Qa(a,y,tt,E,b)))return!0}return!1}function bd(a,y,x,E,b){if(x===E)return!0;if(x===null||E===null||y.contains(x))return!1;y.add(x);for(var z=x.linksConnected;z.next();){var tt=z.value;if(tt!==b){var rt=tt.fromNode;if(tt=tt.toNode,rt=rt===x?tt:rt,rt!==x&&bd(a,y,rt,E,b))return!0}}return!1}ge.Object.defineProperties(Ao.prototype,{portGravity:{get:function(){return this.te},set:function(a){0<=a&&(this.te=a)}},isUnconnectedLinkValid:{get:function(){return this.Ha},set:function(a){this.Ha=a}},linkingCursor:{get:function(){return this.u},set:function(a){this.u=a}},temporaryLink:{get:function(){return this.Ci},set:function(a){this.Ci=a}},temporaryFromNode:{get:function(){return this.Bi},set:function(a){(this.Bi=a)&&(this.j=a.port)}},temporaryFromPort:{get:function(){return this.j},set:function(a){if(this.j!==null){var y=this.j.panel;if(y!==null){var x=y.O.indexOf(this.j);y.mb(x),y.Gb(x,a)}}this.j=a}},temporaryToNode:{get:function(){return this.Di},set:function(a){(this.Di=a)&&(this.o=a.port)}},temporaryToPort:{get:function(){return this.o},set:function(a){if(this.o!==null){var y=this.o.panel;if(y!==null){var x=y.O.indexOf(this.o);y.mb(x),y.Gb(x,a)}}this.o=a}},originalLink:{get:function(){return this.Hb},set:function(a){this.Hb=a}},originalFromNode:{get:function(){return this.hb},set:function(a){this.hb=a}},originalFromPort:{get:function(){return this.ob},set:function(a){this.ob=a}},originalToNode:{get:function(){return this.Oc},set:function(a){this.Oc=a}},originalToPort:{get:function(){return this.Pc},set:function(a){this.Pc=a}},isForwards:{get:function(){return this.ia},set:function(a){this.ia=a}},validPortsCache:{get:function(){return this.hy}},targetPort:{get:function(){return this.Pf},set:function(a){this.Pf=a}},linkValidation:{get:function(){return this.gj},set:function(a){this.gj=a}},portTargeted:{get:function(){return this.Of},set:function(a){this.Of=a}}}),Ao.className="LinkingBaseTool";function qa(){Ao.call(this),this.name="Linking",this.V={},this.F=null,this.K=Kh,this.Xd=null}we(qa,Ao),qa.prototype.canStart=function(){if(!this.isEnabled)return!1;var a=this.diagram;return a.isReadOnly||a.isModelReadOnly||!a.allowLink||!a.model.xs()||!a.lastInput.left||a.currentTool!==this&&!this.isBeyondDragSize()?!1:this.findLinkablePort()!==null},qa.prototype.findLinkablePort=function(){var a=this.diagram,y=this.startObject;if(y===null&&(y=a.ic(a.firstInput.documentPoint,null,null)),y===null||(a=y.part,!(a instanceof Un)))return null;var x=this.direction;if(x===Kh||x===jp){var E=this.findValidLinkablePort(y,!1);if(E!==null||this.startObject===a&&(E=a.port,this.findValidLinkablePort(E,!1)))return this.isForwards=!0,E}return(x===Kh||x===zp)&&(y=this.findValidLinkablePort(y,!0),y!==null||this.startObject===a&&(y=a.port,this.findValidLinkablePort(y,!0)))?(this.isForwards=!1,y):null},qa.prototype.doActivate=function(){var a=this.diagram,y=this.findLinkablePort();y===null?this.stopTool():(this.Ea(this.name),a.isMouseCaptured=!0,a.currentCursor=this.linkingCursor,this.isForwards?(this.temporaryToNode!==null&&(this.temporaryToNode.location=a.lastInput.documentPoint),this.originalFromPort=y,y=this.originalFromPort.part,y instanceof Un&&(this.originalFromNode=y),this.copyPortProperties(this.originalFromNode,this.originalFromPort,this.temporaryFromNode,this.temporaryFromPort,!1)):(this.temporaryFromNode!==null&&(this.temporaryFromNode.location=a.lastInput.documentPoint),this.originalToPort=y,y=this.originalToPort.part,y instanceof Un&&(this.originalToNode=y),this.copyPortProperties(this.originalToNode,this.originalToPort,this.temporaryToNode,this.temporaryToPort,!0)),a.add(this.temporaryFromNode),this.temporaryFromNode&&this.temporaryFromNode.Va(),a.add(this.temporaryToNode),this.temporaryToNode&&this.temporaryToNode.Va(),this.temporaryLink!==null&&(this.temporaryFromNode!==null&&(this.temporaryLink.fromNode=this.temporaryFromNode),this.temporaryToNode!==null&&(this.temporaryLink.toNode=this.temporaryToNode),this.temporaryLink.isTreeLink=this.isNewTreeLink(),this.temporaryLink.bb(),a.add(this.temporaryLink)),this.isActive=!0)},qa.prototype.doDeactivate=function(){this.isActive=!1;var a=this.diagram;a.remove(this.temporaryLink),a.remove(this.temporaryFromNode),a.remove(this.temporaryToNode),a.isMouseCaptured=!1,a.currentCursor="",this.stopTransaction()},qa.prototype.doStop=function(){Ao.prototype.doStop.call(this),this.startObject=null},qa.prototype.doMouseUp=function(){if(this.isActive){var a=this.diagram,y=this.transactionResult=null,x=null,E=null,b=null,z=null;try{var tt=this.targetPort=this.findTargetPort(this.isForwards);if(tt!==null){var rt=tt.part;rt instanceof Un&&(this.isForwards?(this.originalFromNode!==null&&(y=this.originalFromNode,x=this.originalFromPort),E=rt,b=tt):(y=rt,x=tt,this.originalToNode!==null&&(E=this.originalToNode,b=this.originalToPort)))}else this.isForwards?this.originalFromNode!==null&&this.isUnconnectedLinkValid&&(y=this.originalFromNode,x=this.originalFromPort):this.originalToNode!==null&&this.isUnconnectedLinkValid&&(E=this.originalToNode,b=this.originalToPort);y!==null||E!==null?(z=this.insertLink(y,x,E,b),z!==null?(tt===null&&(this.isForwards?z.defaultToPoint=a.lastInput.documentPoint:z.defaultFromPoint=a.lastInput.documentPoint),a.allowSelect&&(a.R("ChangingSelection",a.selection),a.clearSelection(!0),z.isSelected=!0),this.transactionResult=this.name,a.R("LinkDrawn",z)):this.doNoLink(y,x,E,b)):this.isForwards?this.doNoLink(this.originalFromNode,this.originalFromPort,null,null):this.doNoLink(null,null,this.originalToNode,this.originalToPort)}finally{this.stopTool(),z&&a.allowSelect&&a.R("ChangedSelection",a.selection)}}},qa.prototype.isNewTreeLink=function(){var a=this.archetypeLinkData;if(a===null)return!0;if(a instanceof En)return a.isTreeLink;var y=this.diagram;return y===null?!0:(a=y.partManager.getLinkCategoryForData(a),y=y.partManager.findLinkTemplateForCategory(a),y!==null?y.isTreeLink:!0)},qa.prototype.insertLink=function(a,y,x,E){return this.diagram.partManager.insertLink(a,y,x,E)},qa.prototype.doNoLink=function(){},ge.Object.defineProperties(qa.prototype,{archetypeLinkData:{get:function(){return this.V},set:function(a){this.V=a}},archetypeLabelNodeData:{get:function(){return this.F},set:function(a){this.F=a}},direction:{get:function(){return this.K},set:function(a){this.K=a}},startObject:{get:function(){return this.Xd},set:function(a){this.Xd=a}}});var Kh=new Ue(qa,"Either",0),jp=new Ue(qa,"ForwardsOnly",0),zp=new Ue(qa,"BackwardsOnly",0);qa.className="LinkingTool",qa.Either=Kh,qa.ForwardsOnly=jp,qa.BackwardsOnly=zp;function Ks(){Ao.call(this),this.name="Relinking";var a=new lr;a.figure="Diamond",a.desiredSize=Oi,a.fill="lightblue",a.stroke="dodgerblue",a.cursor=this.linkingCursor,a.segmentIndex=0,this.V=a,a=new lr,a.figure="Diamond",a.desiredSize=Oi,a.fill="lightblue",a.stroke="dodgerblue",a.cursor=this.linkingCursor,a.segmentIndex=-1,this.Xd=a,this.F=null,this.Ew=new Ee}we(Ks,Ao),Ks.prototype.updateAdornments=function(a){if(a!==null&&a instanceof En){var y="RelinkFrom",x=null;if(a.isSelected&&!this.diagram.isReadOnly){var E=a.selectionObject;E!==null&&a.canRelinkFrom()&&a.actualBounds.w()&&a.isVisible()&&E.actualBounds.w()&&E.Ed()&&(x=a.Pj(y),x===null&&(x=this.makeAdornment(E,!1),a.bh(y,x)))}x===null&&a.Jf(y),y="RelinkTo",x=null,a.isSelected&&!this.diagram.isReadOnly&&(E=a.selectionObject,E!==null&&a.canRelinkTo()&&a.actualBounds.w()&&a.isVisible()&&E.actualBounds.w()&&E.Ed()&&(x=a.Pj(y),x===null?(x=this.makeAdornment(E,!0),a.bh(y,x)):x.v())),x===null&&a.Jf(y)}},Ks.prototype.makeAdornment=function(a,y){var x=new Rr;return x.type=mn.Link,y=y?this.toHandleArchetype:this.fromHandleArchetype,y!==null&&x.add(y.copy()),x.adornedObject=a,x},Ks.prototype.canStart=function(){if(!this.isEnabled)return!1;var a=this.diagram;if(a.isReadOnly||a.isModelReadOnly||!a.allowRelink||!a.model.xs()||!a.lastInput.left)return!1;var y=this.findToolHandleAt(a.firstInput.documentPoint,"RelinkFrom");return y===null&&(y=this.findToolHandleAt(a.firstInput.documentPoint,"RelinkTo")),y!==null},Ks.prototype.doActivate=function(){var a=this.diagram;if(this.originalLink===null){var y=this.handle;if(y===null&&(y=this.findToolHandleAt(a.firstInput.documentPoint,"RelinkFrom"),y===null&&(y=this.findToolHandleAt(a.firstInput.documentPoint,"RelinkTo"))),y===null)return;var x=y.part;if(!(x instanceof Rr&&x.adornedPart instanceof En))return;this.handle=y,this.isForwards=x===null||x.category==="RelinkTo",this.originalLink=x.adornedPart}this.Ea(this.name),a.isMouseCaptured=!0,a.currentCursor=this.linkingCursor,this.originalFromPort=this.originalLink.fromPort,this.originalFromNode=this.originalLink.fromNode,this.originalToPort=this.originalLink.toPort,this.originalToNode=this.originalLink.toNode,this.Ew.set(this.originalLink.actualBounds),this.originalLink!==null&&0<this.originalLink.pointsCount&&(this.originalLink.fromNode===null&&(this.temporaryFromPort!==null&&(this.temporaryFromPort.desiredSize=qn),this.temporaryFromNode!==null&&(this.temporaryFromNode.location=this.originalLink.i(0))),this.originalLink.toNode===null&&(this.temporaryToPort!==null&&(this.temporaryToPort.desiredSize=qn),this.temporaryToNode!==null&&(this.temporaryToNode.location=this.originalLink.i(this.originalLink.pointsCount-1)))),this.copyPortProperties(this.originalFromNode,this.originalFromPort,this.temporaryFromNode,this.temporaryFromPort,!1),this.copyPortProperties(this.originalToNode,this.originalToPort,this.temporaryToNode,this.temporaryToPort,!0),a.add(this.temporaryFromNode),a.add(this.temporaryToNode),this.temporaryLink!==null&&(this.temporaryFromNode!==null&&(this.temporaryLink.fromNode=this.temporaryFromNode),this.temporaryToNode!==null&&(this.temporaryLink.toNode=this.temporaryToNode),this.copyLinkProperties(this.originalLink,this.temporaryLink),this.temporaryLink.bb(),a.add(this.temporaryLink)),this.isActive=!0},Ks.prototype.copyLinkProperties=function(a,y){if(a!==null&&y!==null){y.adjusting=a.adjusting,y.corner=a.corner;var x=a.curve;(x===Rf||x===Lh)&&(x=os),y.curve=x,y.curviness=a.curviness,y.isTreeLink=a.isTreeLink,y.points=a.points,y.routing=a.routing,y.smoothness=a.smoothness,y.fromSpot=a.fromSpot,y.fromEndSegmentLength=a.fromEndSegmentLength,y.fromShortLength=a.fromShortLength,y.toSpot=a.toSpot,y.toEndSegmentLength=a.toEndSegmentLength,y.toShortLength=a.toShortLength}},Ks.prototype.doDeactivate=function(){this.isActive=!1;var a=this.diagram;a.remove(this.temporaryLink),a.remove(this.temporaryFromNode),a.remove(this.temporaryToNode),a.isMouseCaptured=!1,a.currentCursor="",this.stopTransaction()},Ks.prototype.doStop=function(){Ao.prototype.doStop.call(this),this.handle=null},Ks.prototype.doMouseUp=function(){if(this.isActive){var a=this.diagram;this.transactionResult=null;var y=this.originalFromNode,x=this.originalFromPort,E=this.originalToNode,b=this.originalToPort,z=this.originalLink;try{if(this.targetPort=this.findTargetPort(this.isForwards),this.targetPort!==null){var tt=this.targetPort.part;tt instanceof Un&&(this.isForwards?(E=tt,b=this.targetPort):(y=tt,x=this.targetPort))}else this.isUnconnectedLinkValid?this.isForwards?b=E=null:x=y=null:z=null;z!==null?(this.reconnectLink(z,this.isForwards?E:y,this.isForwards?b:x,this.isForwards),this.targetPort===null&&(this.isForwards?z.defaultToPoint=a.lastInput.documentPoint:z.defaultFromPoint=a.lastInput.documentPoint,z.bb()),this.transactionResult=this.name,a.R("LinkRelinked",z,this.isForwards?this.originalToPort:this.originalFromPort)):this.doNoRelink(this.originalLink,this.isForwards),this.originalLink.Xo(this.Ew)}finally{this.stopTool()}}},Ks.prototype.reconnectLink=function(a,y,x,E){return x=x!==null&&x.portId!==null?x.portId:"",E?(a.toNode=y,a.toPortId=x):(a.fromNode=y,a.fromPortId=x),!0},Ks.prototype.doNoRelink=function(){};function qc(a,y,x,E,b){y!==null?(a.copyPortProperties(y,x,a.temporaryFromNode,a.temporaryFromPort,!1),a.diagram.add(a.temporaryFromNode)):a.diagram.remove(a.temporaryFromNode),E!==null?(a.copyPortProperties(E,b,a.temporaryToNode,a.temporaryToPort,!0),a.diagram.add(a.temporaryToNode)):a.diagram.remove(a.temporaryToNode)}ge.Object.defineProperties(Ks.prototype,{fromHandleArchetype:{get:function(){return this.V},set:function(a){this.V=a}},toHandleArchetype:{get:function(){return this.Xd},set:function(a){this.Xd=a}},handle:{get:function(){return this.F},set:function(a){if(a!==null&&!(a.part instanceof Rr))throw Error("new handle is not in an Adornment: "+a);this.F=a}}}),Ks.className="RelinkingTool",bi("linkingTool",function(){return this.findTool("Linking")},function(a){this.gb("Linking",a,this.mouseMoveTools)}),bi("relinkingTool",function(){return this.findTool("Relinking")},function(a){this.gb("Relinking",a,this.mouseDownTools)});function Go(){wr.call(this),this.name="LinkReshaping";var a=new lr;a.figure="Rectangle",a.desiredSize=ar,a.fill="lightblue",a.stroke="dodgerblue",this.o=a,a=new lr,a.figure="Diamond",a.desiredSize=Oi,a.fill="lightblue",a.stroke="dodgerblue",a.cursor="move",this.u=a,this.F=3,this.Ts=this.j=null,this.Fw=new At,this.Yq=new Xe}we(Go,wr),Go.prototype.Ru=function(a){return a&&a.reshapingBehavior.value!==0?a.reshapingBehavior:sg},Go.prototype.om=function(a,y){a.reshapingBehavior=y},Go.prototype.updateAdornments=function(a){if(a!==null&&a instanceof En){var y=null;if(a.isSelected&&!this.diagram.isReadOnly){var x=a.path;x!==null&&a.canReshape()&&a.actualBounds.w()&&a.isVisible()&&x.actualBounds.w()&&x.Ed()&&(y=a.Pj(this.name),y===null||y.Aw!==a.pointsCount||y.Uw!==a.resegmentable)&&(y=this.makeAdornment(x),y!==null&&(y.Aw=a.pointsCount,y.Uw=a.resegmentable,a.bh(this.name,y)))}y===null&&a.Jf(this.name)}},Go.prototype.makeAdornment=function(a){var y=a.part,x=y.pointsCount,E=y.isOrthogonal,b=null;if(y.points!==null&&1<x){b=new Rr,b.type=mn.Link,x=y.firstPickIndex;var z=y.lastPickIndex,tt=E?1:0;if(y.resegmentable&&y.computeCurve()!==Ys)for(var rt=x+tt;rt<z-tt;rt++){var ot=this.makeResegmentHandle(a,rt);ot!==null&&(ot.segmentIndex=rt,ot.segmentFraction=.5,ot.fromMaxLinks=999,b.add(ot))}for(tt=x+1;tt<z;tt++)if(rt=this.makeHandle(a,tt),rt!==null){if(rt.segmentIndex=tt,tt!==x)if(tt===x+1&&E){ot=y.i(x);var st=y.i(x+1);ue.B(ot.x,st.x)&&ue.B(ot.y,st.y)&&(st=y.i(x-1)),ue.B(ot.x,st.x)?(this.om(rt,uh),rt.cursor="n-resize"):ue.B(ot.y,st.y)&&(this.om(rt,lh),rt.cursor="w-resize")}else tt===z-1&&E?(ot=y.i(z-1),st=y.i(z),ue.B(ot.x,st.x)&&ue.B(ot.y,st.y)&&(ot=y.i(z+1)),ue.B(ot.x,st.x)?(this.om(rt,uh),rt.cursor="n-resize"):ue.B(ot.y,st.y)&&(this.om(rt,lh),rt.cursor="w-resize")):tt!==z&&(this.om(rt,$c),rt.cursor="move");b.add(rt)}b.adornedObject=a}return b},Go.prototype.makeHandle=function(){var a=this.handleArchetype;return a===null?null:a.copy()},Go.prototype.makeResegmentHandle=function(){var a=this.midHandleArchetype;return a===null?null:a.copy()},Go.prototype.canStart=function(){if(!this.isEnabled)return!1;var a=this.diagram;return!a.isReadOnly&&a.allowReshape&&a.lastInput.left?this.findToolHandleAt(a.firstInput.documentPoint,this.name)!==null:!1},Go.prototype.doActivate=function(){var a=this.diagram;if(this.handle===null&&(this.handle=this.findToolHandleAt(a.firstInput.documentPoint,this.name)),this.handle!==null){var y=this.handle.part.adornedPart;if(y instanceof En){if(this.Ts=y,a.isMouseCaptured=!0,this.Ea(this.name),y.resegmentable&&this.handle.fromMaxLinks===999){var x=y.points.copy(),E=this.getResegmentingPoint();if(x.Gb(this.handle.segmentIndex+1,E),y.isOrthogonal&&x.Gb(this.handle.segmentIndex+1,E),y.points=x,y.Wb(),y.updateAdornments(),this.handle=this.findToolHandleAt(a.firstInput.documentPoint,this.name),this.handle===null){this.doDeactivate();return}}this.Fw=y.i(this.handle.segmentIndex),this.Yq=y.points.copy(),this.isActive=!0}}},Go.prototype.doDeactivate=function(){this.stopTransaction(),this.Ts=this.handle=null,this.isActive=this.diagram.isMouseCaptured=!1},Go.prototype.stopTransaction=function(){var a=this.diagram,y=wr.prototype.stopTransaction.call(this);return y&&a.undoManager.transactionToUndo!==null&&a.undoManager.transactionToUndo.ak(),y},Go.prototype.doCancel=function(){var a=this.adornedLink;a!==null&&(a.points=this.Yq),this.stopTool()},Go.prototype.getResegmentingPoint=function(){return this.handle.ga(er)},Go.prototype.doMouseMove=function(){var a=this.diagram;this.isActive&&(a=this.computeReshape(a.lastInput.documentPoint),this.reshape(a))},Go.prototype.doMouseUp=function(){var a=this.diagram;if(this.isActive){var y=this.computeReshape(a.lastInput.documentPoint);if(this.reshape(y),y=this.adornedLink,y!==null&&y.resegmentable){var x=this.handle.segmentIndex,E=y.i(x-1),b=y.i(x),z=y.i(x+1);if(y.isOrthogonal){if(x>y.firstPickIndex+1&&x<y.lastPickIndex-1){var tt=y.i(x-2);if(Math.abs(E.x-b.x)<this.resegmentingDistance&&Math.abs(E.y-b.y)<this.resegmentingDistance&&(sh(this,tt,E,b,z,!0)||sh(this,tt,E,b,z,!1))){var rt=y.points.copy();sh(this,tt,E,b,z,!0)?(rt.cd(x-2,new At(tt.x,(z.y+tt.y)/2)),rt.cd(x+1,new At(z.x,(z.y+tt.y)/2))):(rt.cd(x-2,new At((z.x+tt.x)/2,tt.y)),rt.cd(x+1,new At((z.x+tt.x)/2,z.y))),rt.mb(x),rt.mb(x-1),y.points=rt,y.Wb()}else tt=y.i(x+2),Math.abs(b.x-z.x)<this.resegmentingDistance&&Math.abs(b.y-z.y)<this.resegmentingDistance&&(sh(this,E,b,z,tt,!0)||sh(this,E,b,z,tt,!1))&&(rt=y.points.copy(),sh(this,E,b,z,tt,!0)?(rt.cd(x-1,new At(E.x,(E.y+tt.y)/2)),rt.cd(x+2,new At(tt.x,(E.y+tt.y)/2))):(rt.cd(x-1,new At((E.x+tt.x)/2,E.y)),rt.cd(x+2,new At((E.x+tt.x)/2,tt.y))),rt.mb(x+1),rt.mb(x),y.points=rt,y.Wb())}}else tt=At.alloc(),ue.qh(E.x,E.y,z.x,z.y,b.x,b.y,tt)&&tt.Bf(b)<this.resegmentingDistance*this.resegmentingDistance&&(E=y.points.copy(),E.mb(x),y.points=E,y.Wb()),At.free(tt)}a.Ya(),this.transactionResult=this.name,a.R("LinkReshaped",this.adornedLink,this.Yq)}this.stopTool()};function sh(a,y,x,E,b,z){return z?Math.abs(y.y-x.y)<a.resegmentingDistance&&Math.abs(x.y-E.y)<a.resegmentingDistance&&Math.abs(E.y-b.y)<a.resegmentingDistance:Math.abs(y.x-x.x)<a.resegmentingDistance&&Math.abs(x.x-E.x)<a.resegmentingDistance&&Math.abs(E.x-b.x)<a.resegmentingDistance}Go.prototype.reshape=function(a){var y=this.adornedLink;y.uh();var x=this.handle.segmentIndex,E=this.Ru(this.handle);if(y.isOrthogonal)if(x===y.firstPickIndex+1)x=y.firstPickIndex+1,E===uh?(y.L(x,y.i(x-1).x,a.y),y.L(x+1,y.i(x+2).x,a.y)):E===lh&&(y.L(x,a.x,y.i(x-1).y),y.L(x+1,a.x,y.i(x+2).y));else if(x===y.lastPickIndex-1)x=y.lastPickIndex-1,E===uh?(y.L(x-1,y.i(x-2).x,a.y),y.L(x,y.i(x+1).x,a.y)):E===lh&&(y.L(x-1,a.x,y.i(x-2).y),y.L(x,a.x,y.i(x+1).y));else{E=x;var b=y.i(E),z=y.i(E-1),tt=y.i(E+1);ue.B(z.x,b.x)&&ue.B(b.y,tt.y)?(ue.B(z.x,y.i(E-2).x)&&!ue.B(z.y,y.i(E-2).y)?(y.m(E,a.x,z.y),x++,E++):y.L(E-1,a.x,z.y),ue.B(tt.y,y.i(E+2).y)&&!ue.B(tt.x,y.i(E+2).x)?y.m(E+1,tt.x,a.y):y.L(E+1,tt.x,a.y)):ue.B(z.y,b.y)&&ue.B(b.x,tt.x)?(ue.B(z.y,y.i(E-2).y)&&!ue.B(z.x,y.i(E-2).x)?(y.m(E,z.x,a.y),x++,E++):y.L(E-1,z.x,a.y),ue.B(tt.x,y.i(E+2).x)&&!ue.B(tt.y,y.i(E+2).y)?y.m(E+1,a.x,tt.y):y.L(E+1,a.x,tt.y)):ue.B(z.x,b.x)&&ue.B(b.x,tt.x)?(ue.B(z.x,y.i(E-2).x)&&!ue.B(z.y,y.i(E-2).y)?(y.m(E,a.x,z.y),x++,E++):y.L(E-1,a.x,z.y),ue.B(tt.x,y.i(E+2).x)&&!ue.B(tt.y,y.i(E+2).y)?y.m(E+1,a.x,tt.y):y.L(E+1,a.x,tt.y)):ue.B(z.y,b.y)&&ue.B(b.y,tt.y)&&(ue.B(z.y,y.i(E-2).y)&&!ue.B(z.x,y.i(E-2).x)?(y.m(E,z.x,a.y),x++,E++):y.L(E-1,z.x,a.y),ue.B(tt.y,y.i(E+2).y)&&!ue.B(tt.x,y.i(E+2).x)?y.m(E+1,tt.x,a.y):y.L(E+1,tt.x,a.y)),y.L(x,a.x,a.y)}else y.L(x,a.x,a.y),E=y.fromNode,b=y.fromPort,E!==null&&(z=E.findVisibleNode(),z!==null&&z!==E&&(E=z,b=E.port)),x===1&&y.computeSpot(!0,b).Mc()&&(z=b.ga(er,At.alloc()),E=y.getLinkPointFromPoint(E,b,z,a,!0,At.alloc()),y.L(0,E.x,E.y),At.free(z),At.free(E)),E=y.toNode,b=y.toPort,E!==null&&(z=E.findVisibleNode(),z!==null&&z!==E&&(E=z,b=E.port)),x===y.pointsCount-2&&y.computeSpot(!1,b).Mc()&&(x=b.ga(er,At.alloc()),a=y.getLinkPointFromPoint(E,b,x,a,!1,At.alloc()),y.L(y.pointsCount-1,a.x,a.y),At.free(x),At.free(a));y.zf()},Go.prototype.computeReshape=function(a){var y=this.adornedLink,x=this.handle.segmentIndex;switch(this.Ru(this.handle)){case $c:return a;case uh:return new At(y.i(x).x,a.y);case lh:return new At(a.x,y.i(x).y);default:case sg:return y.i(x)}},ge.Object.defineProperties(Go.prototype,{handleArchetype:{get:function(){return this.o},set:function(a){this.o=a}},midHandleArchetype:{get:function(){return this.u},set:function(a){this.u=a}},handle:{get:function(){return this.j},set:function(a){if(a!==null&&!(a.part instanceof Rr))throw Error("new handle is not in an Adornment: "+a);this.j=a}},adornedLink:{get:function(){return this.Ts}},resegmentingDistance:{get:function(){return this.F},set:function(a){this.F=a}},originalPoint:{get:function(){return this.Fw}},originalPoints:{get:function(){return this.Yq}}}),Go.prototype.setReshapingBehavior=Go.prototype.om,Go.prototype.getReshapingBehavior=Go.prototype.Ru;var sg=new Ue(Go,"None",0),lh=new Ue(Go,"Horizontal",1),uh=new Ue(Go,"Vertical",2),$c=new Ue(Go,"All",3);Go.className="LinkReshapingTool",Go.None=sg,Go.Horizontal=lh,Go.Vertical=uh,Go.All=$c,bi("linkReshapingTool",function(){return this.findTool("LinkReshaping")},function(a){this.gb("LinkReshaping",a,this.mouseDownTools)});function Ta(){wr.call(this),this.name="Resizing",this.o=new Ke(1,1).freeze(),this.j=new Ke(9999,9999).freeze(),this.yg=new Ke(NaN,NaN).freeze(),this.V=!1,this.ia=!0,this.ue=null;var a=new lr;a.alignmentFocus=er,a.figure="Rectangle",a.desiredSize=ar,a.fill="lightblue",a.stroke="dodgerblue",a.strokeWidth=1,a.cursor="pointer",this.F=a,this.u=null,this.Xq=new At,this.Dw=new Ke,this.Tn=new At,this.rt=new Ke(0,0),this.qt=new Ke(1/0,1/0),this.pt=new Ke(1,1)}we(Ta,wr),Ta.prototype.updateAdornments=function(a){if(!(a===null||a instanceof En)){if(a.isSelected&&!this.diagram.isReadOnly){var y=a.resizeObject,x=a.Pj(this.name);if(y!==null&&a.canResize()&&a.actualBounds.w()&&a.isVisible()&&y.actualBounds.w()&&y.Ed()&&((x===null||x.adornedObject!==y)&&(x=this.makeAdornment(y)),x!==null)){y=y.li(),od(a)&&this.updateResizeHandles(x,y),a.bh(this.name,x);return}}a.Jf(this.name)}},Ta.prototype.makeAdornment=function(a){var y=a.part.resizeAdornmentTemplate;if(y===null){y=new Rr,y.type=mn.Spot,y.locationSpot=er;var x=new rs;x.isPanelMain=!0,y.add(x),y.add(this.makeHandle(a,Sr)),y.add(this.makeHandle(a,Gr)),y.add(this.makeHandle(a,Hr)),y.add(this.makeHandle(a,Ro)),y.add(this.makeHandle(a,Ma)),y.add(this.makeHandle(a,na)),y.add(this.makeHandle(a,Sa)),y.add(this.makeHandle(a,ya))}else if(Sl(y),y=y.copy(),y===null)return null;return y.adornedObject=a,y},Ta.prototype.makeHandle=function(a,y){return a=this.handleArchetype,a===null?null:(a=a.copy(),a.alignment=y,a)},Ta.prototype.updateResizeHandles=function(a,y){if(a!==null){if(!a.alignment.Xb()&&(a.cursor==="pointer"||0<a.cursor.indexOf("resize")))t:{var x=a.alignment;if(x.Mc()&&(x=er),0>=x.x)y=0>=x.y?y+225:1<=x.y?y+135:y+180;else if(1<=x.x)0>=x.y?y+=315:1<=x.y&&(y+=45);else if(0>=x.y)y+=270;else if(1<=x.y)y+=90;else break t;0>y?y+=360:360<=y&&(y-=360),a.cursor=22.5>y?"e-resize":67.5>y?"se-resize":112.5>y?"s-resize":157.5>y?"sw-resize":202.5>y?"w-resize":247.5>y?"nw-resize":292.5>y?"n-resize":337.5>y?"ne-resize":"e-resize"}else if(a instanceof mn)for(a=a.elements;a.next();)this.updateResizeHandles(a.value,y)}},Ta.prototype.canStart=function(){if(!this.isEnabled)return!1;var a=this.diagram;return!a.isReadOnly&&a.allowResize&&a.lastInput.left?this.findToolHandleAt(a.firstInput.documentPoint,this.name)!==null:!1},Ta.prototype.doActivate=function(){var a=this.diagram;this.handle===null&&(this.handle=this.findToolHandleAt(a.firstInput.documentPoint,this.name)),this.handle!==null&&(this.adornedObject=this.handle.part.adornedObject,this.adornedObject!==null&&(a.isMouseCaptured=!0,a.animationManager.Cc(),this.Ea(this.name),this.Xq.set(this.adornedObject.ga(this.handle.alignment.gv())),this.Tn.set(this.adornedObject.part.location),this.Dw.set(this.adornedObject.desiredSize),this.pt=this.computeCellSize(),this.rt=this.computeMinSize(),this.qt=this.computeMaxSize(),this.isActive=!0))},Ta.prototype.doDeactivate=function(){var a=this.diagram;this.stopTransaction(),this.ue=this.handle=null,this.isActive=a.isMouseCaptured=!1},Ta.prototype.stopTransaction=function(){var a=this.diagram,y=wr.prototype.stopTransaction.call(this);return y&&a.undoManager.transactionToUndo!==null&&a.undoManager.transactionToUndo.ak(),y},Ta.prototype.doCancel=function(){this.adornedObject!==null&&(this.adornedObject.desiredSize=this.originalDesiredSize,this.adornedObject.part.location=this.originalLocation),this.stopTool()},Ta.prototype.doMouseMove=function(){var a=this.diagram;if(this.isActive){var y=this.rt,x=this.qt,E=this.pt,b=this.adornedObject.qs(a.lastInput.documentPoint,At.alloc()),z=this.computeReshape();y=this.computeResize(b,this.handle.alignment,y,x,E,z),this.resize(y),a.bd(),At.free(b)}},Ta.prototype.doMouseUp=function(){var a=this.diagram;if(this.isActive){var y=this.rt,x=this.qt,E=this.pt,b=this.adornedObject.qs(a.lastInput.documentPoint,At.alloc()),z=this.computeReshape();y=this.computeResize(b,this.handle.alignment,y,x,E,z),this.resize(y),At.free(b),a.Ya(),this.transactionResult=this.name,a.R("PartResized",this.adornedObject,this.originalDesiredSize)}this.stopTool()},Ta.prototype.resize=function(a){var y=this.diagram,x=this.adornedObject;if(x!==null){if(x.desiredSize=a.size,a=x.part,a.Va(),x=x.ga(this.handle.alignment.gv()),a instanceof $i){var E=new Xe;if(E.add(a),!this.dragsMembers&&a.placeholder===null){var b=new at;b.dragsMembers=!1}y.moveParts(E,this.oppositePoint.copy().re(x),!0,b)}else a.location=a.location.copy().re(x).add(this.oppositePoint);y.bd()}},Ta.prototype.computeResize=function(a,y,x,E,b,z){y.Mc()&&(y=er);var tt=this.adornedObject.naturalBounds,rt=tt.x,ot=tt.y,st=tt.x+tt.width,ut=tt.y+tt.height,ft=1;if(!z){ft=tt.width;var mt=tt.height;0>=ft&&(ft=1),0>=mt&&(mt=1),ft=mt/ft}return mt=At.alloc(),ue.No(a.x,a.y,rt,ot,b.width,b.height,mt),a=tt.copy(),0>=y.x?0>=y.y?(a.x=Math.max(mt.x,st-E.width),a.x=Math.min(a.x,st-x.width),a.width=Math.max(st-a.x,x.width),a.y=Math.max(mt.y,ut-E.height),a.y=Math.min(a.y,ut-x.height),a.height=Math.max(ut-a.y,x.height),z||(1<=a.height/a.width?(a.height=Math.max(Math.min(ft*a.width,E.height),x.height),a.width=a.height/ft):(a.width=Math.max(Math.min(a.height/ft,E.width),x.width),a.height=ft*a.width),a.x=st-a.width,a.y=ut-a.height)):1<=y.y?(a.x=Math.max(mt.x,st-E.width),a.x=Math.min(a.x,st-x.width),a.width=Math.max(st-a.x,x.width),a.height=Math.max(Math.min(mt.y-ot,E.height),x.height),z||(1<=a.height/a.width?(a.height=Math.max(Math.min(ft*a.width,E.height),x.height),a.width=a.height/ft):(a.width=Math.max(Math.min(a.height/ft,E.width),x.width),a.height=ft*a.width),a.x=st-a.width)):(a.x=Math.max(mt.x,st-E.width),a.x=Math.min(a.x,st-x.width),a.width=st-a.x,z||(a.height=Math.max(Math.min(ft*a.width,E.height),x.height),a.width=a.height/ft,a.y=ot+.5*(ut-ot-a.height))):1<=y.x?0>=y.y?(a.width=Math.max(Math.min(mt.x-rt,E.width),x.width),a.y=Math.max(mt.y,ut-E.height),a.y=Math.min(a.y,ut-x.height),a.height=Math.max(ut-a.y,x.height),z||(1<=a.height/a.width?(a.height=Math.max(Math.min(ft*a.width,E.height),x.height),a.width=a.height/ft):(a.width=Math.max(Math.min(a.height/ft,E.width),x.width),a.height=ft*a.width),a.y=ut-a.height)):1<=y.y?(a.width=Math.max(Math.min(mt.x-rt,E.width),x.width),a.height=Math.max(Math.min(mt.y-ot,E.height),x.height),z||(1<=a.height/a.width?(a.height=Math.max(Math.min(ft*a.width,E.height),x.height),a.width=a.height/ft):(a.width=Math.max(Math.min(a.height/ft,E.width),x.width),a.height=ft*a.width))):(a.width=Math.max(Math.min(mt.x-rt,E.width),x.width),z||(a.height=Math.max(Math.min(ft*a.width,E.height),x.height),a.width=a.height/ft,a.y=ot+.5*(ut-ot-a.height))):0>=y.y?(a.y=Math.max(mt.y,ut-E.height),a.y=Math.min(a.y,ut-x.height),a.height=ut-a.y,z||(a.width=Math.max(Math.min(a.height/ft,E.width),x.width),a.height=ft*a.width,a.x=rt+.5*(st-rt-a.width))):1<=y.y&&(a.height=Math.max(Math.min(mt.y-ot,E.height),x.height),z||(a.width=Math.max(Math.min(a.height/ft,E.width),x.width),a.height=ft*a.width,a.x=rt+.5*(st-rt-a.width))),At.free(mt),a},Ta.prototype.computeReshape=function(){var a=nn;return this.adornedObject instanceof lr&&(a=Ev(this.adornedObject)),!(a===fi||this.diagram.lastInput.shift)},Ta.prototype.computeMinSize=function(){var a=this.adornedObject.minSize.copy(),y=this.minSize;return!isNaN(y.width)&&y.width>a.width&&(a.width=y.width),!isNaN(y.height)&&y.height>a.height&&(a.height=y.height),a},Ta.prototype.computeMaxSize=function(){var a=this.adornedObject.maxSize.copy(),y=this.maxSize;return!isNaN(y.width)&&y.width<a.width&&(a.width=y.width),!isNaN(y.height)&&y.height<a.height&&(a.height=y.height),a},Ta.prototype.computeCellSize=function(){var a=new Ke(NaN,NaN),y=this.adornedObject.part;return y!==null&&(y=y.resizeCellSize,!isNaN(y.width)&&0<y.width&&(a.width=y.width),!isNaN(y.height)&&0<y.height&&(a.height=y.height)),y=this.cellSize,isNaN(a.width)&&!isNaN(y.width)&&0<y.width&&(a.width=y.width),isNaN(a.height)&&!isNaN(y.height)&&0<y.height&&(a.height=y.height),y=this.diagram,(isNaN(a.width)||isNaN(a.height))&&y&&(y=y.grid,y!==null&&y.visible&&this.isGridSnapEnabled&&(y=y.gridCellSize,isNaN(a.width)&&!isNaN(y.width)&&0<y.width&&(a.width=y.width),isNaN(a.height)&&!isNaN(y.height)&&0<y.height&&(a.height=y.height))),(isNaN(a.width)||a.width===0||a.width===1/0)&&(a.width=1),(isNaN(a.height)||a.height===0||a.height===1/0)&&(a.height=1),a},ge.Object.defineProperties(Ta.prototype,{handleArchetype:{get:function(){return this.F},set:function(a){this.F=a}},handle:{get:function(){return this.u},set:function(a){if(a!==null&&!(a.part instanceof Rr))throw Error("new handle is not in an Adornment: "+a);this.u=a}},adornedObject:{get:function(){return this.ue},set:function(a){if(a!==null&&a.part instanceof Rr)throw Error("new handle must not be in an Adornment: "+a);this.ue=a}},minSize:{get:function(){return this.o},set:function(a){if(!this.o.D(a)){var y=a.width;isNaN(y)&&(y=0),a=a.height,isNaN(a)&&(a=0),this.o.h(y,a)}}},maxSize:{get:function(){return this.j},set:function(a){if(!this.j.D(a)){var y=a.width;isNaN(y)&&(y=1/0),a=a.height,isNaN(a)&&(a=1/0),this.j.h(y,a)}}},cellSize:{get:function(){return this.yg},set:function(a){this.yg.D(a)||this.yg.assign(a)}},isGridSnapEnabled:{get:function(){return this.V},set:function(a){this.V=a}},dragsMembers:{get:function(){return this.ia},set:function(a){this.ia=a}},oppositePoint:{get:function(){return this.Xq},set:function(a){this.Xq.D(a)||this.Xq.assign(a)}},originalDesiredSize:{get:function(){return this.Dw}},originalLocation:{get:function(){return this.Tn}}}),Ta.className="ResizingTool",bi("resizingTool",function(){return this.findTool("Resizing")},function(a){this.gb("Resizing",a,this.mouseDownTools)});function $a(){wr.call(this),this.name="Rotating",this.ia=45,this.V=2,this.Tn=new At,this.ue=null;var a=new lr;a.figure="Ellipse",a.desiredSize=Oi,a.fill="lightblue",a.stroke="dodgerblue",a.strokeWidth=1,a.cursor="pointer",this.o=a,this.j=null,this.Cw=0,this.kr=new At(NaN,NaN),this.u=0,this.F=50}we($a,wr),$a.prototype.updateAdornments=function(a){if(a!==null){if(a.ph()){var y=a.rotateObject;if(y===a||y===a.path||y.isPanelMain)return}if(a.isSelected&&!this.diagram.isReadOnly&&(y=a.rotateObject,y!==null&&a.canRotate()&&a.actualBounds.w()&&a.isVisible()&&y.actualBounds.w()&&y.Ed())){var x=a.Pj(this.name);if((x===null||x.adornedObject!==y)&&(x=this.makeAdornment(y)),x!==null){x.angle=y.li(),x.placeholder===null&&(x.location=this.computeAdornmentLocation(y)),a.bh(this.name,x);return}}a.Jf(this.name)}},$a.prototype.makeAdornment=function(a){var y=a.part.rotateAdornmentTemplate;if(y===null){y=new Rr,y.type=mn.Position,y.locationSpot=er;var x=this.handleArchetype;x!==null&&y.add(x.copy())}else if(Sl(y),y=y.copy(),y===null)return null;return y.adornedObject=a,y},$a.prototype.canStart=function(){if(!this.isEnabled)return!1;var a=this.diagram;return!a.isReadOnly&&a.allowRotate&&a.lastInput.left?this.findToolHandleAt(a.firstInput.documentPoint,this.name)!==null:!1},$a.prototype.doActivate=function(){var a=this.diagram;if(this.adornedObject===null){if(this.handle===null&&(this.handle=this.findToolHandleAt(a.firstInput.documentPoint,this.name)),this.handle===null)return;this.adornedObject=this.handle.part.adornedObject}this.adornedObject!==null&&(a.isMouseCaptured=!0,a.delaysLayout=!0,this.Ea(this.name),this.Cw=this.adornedObject.angle,this.kr=this.computeRotationPoint(this.adornedObject),this.Tn=this.adornedObject.part.location.copy(),this.isActive=!0)},$a.prototype.computeRotationPoint=function(a){var y=a.part,x=y.locationObject;return y.rotationSpot.sb()?a.ga(y.rotationSpot):a===y||a===x?x.ga(y.locationSpot):a.ga(er)},$a.prototype.computeAdornmentLocation=function(a){var y=this.rotationPoint;y.w()||(y=this.computeRotationPoint(a)),y=a.qs(y);var x=this.handleAngle;0>x?x+=360:360<=x&&(x-=360),x=Math.round(45*Math.round(x/45));var E=this.handleDistance;return x===0?y.x=a.naturalBounds.width+E:x===45?(y.x=a.naturalBounds.width+E,y.y=a.naturalBounds.height+E):x===90?y.y=a.naturalBounds.height+E:x===135?(y.x=-E,y.y=a.naturalBounds.height+E):x===180?y.x=-E:x===225?(y.x=-E,y.y=-E):x===270?y.y=-E:x===315&&(y.x=a.naturalBounds.width+E,y.y=-E),a.ga(y)},$a.prototype.doDeactivate=function(){var a=this.diagram;this.stopTransaction(),this.ue=this.handle=null,this.kr=new At(NaN,NaN),this.isActive=a.isMouseCaptured=!1},$a.prototype.stopTransaction=function(){var a=this.diagram,y=wr.prototype.stopTransaction.call(this);return y&&a.undoManager.transactionToUndo!==null&&a.undoManager.transactionToUndo.ak(),y},$a.prototype.doCancel=function(){this.diagram.delaysLayout=!1,this.rotate(this.originalAngle),this.stopTool()},$a.prototype.doMouseMove=function(){var a=this.diagram;this.isActive&&(a=this.computeRotate(a.lastInput.documentPoint),this.rotate(a))},$a.prototype.doMouseUp=function(){var a=this.diagram;if(this.isActive){a.delaysLayout=!1;var y=this.computeRotate(a.lastInput.documentPoint);this.rotate(y),a.Ya(),this.transactionResult=this.name,a.R("PartRotated",this.adornedObject,this.originalAngle)}this.stopTool()},$a.prototype.rotate=function(a){var y=this.adornedObject;if(y!==null){y.angle=a,y=y.part,y.Va();var x=y.locationObject,E=y.rotateObject;(x===E||x.rg(E))&&(x=this.Tn.copy(),y.location=x.re(this.rotationPoint).rotate(a-this.originalAngle).add(this.rotationPoint)),this.diagram.bd()}},$a.prototype.computeRotate=function(a){a=this.rotationPoint.ab(a)-this.handleAngle;var y=this.adornedObject.panel;y!==null&&(a-=y.li()),360<=a?a-=360:0>a&&(a+=360),y=Math.min(Math.abs(this.snapAngleMultiple),180);var x=Math.min(Math.abs(this.snapAngleEpsilon),y/2);return!this.diagram.lastInput.shift&&0<y&&0<x&&(a%y<x?a=Math.floor(a/y)*y:a%y>y-x&&(a=(Math.floor(a/y)+1)*y)),360<=a?a-=360:0>a&&(a+=360),a},ge.Object.defineProperties($a.prototype,{handleArchetype:{get:function(){return this.o},set:function(a){this.o=a}},handle:{get:function(){return this.j},set:function(a){if(a!==null&&!(a.part instanceof Rr))throw Error("new handle is not in an Adornment: "+a);this.j=a}},adornedObject:{get:function(){return this.ue},set:function(a){if(a!==null&&a.part instanceof Rr)throw Error("new handle must not be in an Adornment: "+a);this.ue=a}},snapAngleMultiple:{get:function(){return this.ia},set:function(a){this.ia=a}},snapAngleEpsilon:{get:function(){return this.V},set:function(a){this.V=a}},originalAngle:{get:function(){return this.Cw}},rotationPoint:{get:function(){return this.kr},set:function(a){this.kr=a.copy()}},handleAngle:{get:function(){return this.u},set:function(a){this.u=a}},handleDistance:{get:function(){return this.F},set:function(a){this.F=a}}}),$a.className="RotatingTool",bi("rotatingTool",function(){return this.findTool("Rotating")},function(a){this.gb("Rotating",a,this.mouseDownTools)});function Zh(){wr.call(this),this.name="ClickSelecting"}we(Zh,wr),Zh.prototype.canStart=function(){return!(!this.isEnabled||this.isBeyondDragSize())},Zh.prototype.doMouseUp=function(){this.isActive&&(this.standardMouseSelect(),!this.standardMouseClick()&&this.diagram.lastInput.isTouchEvent&&this.diagram.toolManager.doToolTip()),this.stopTool()},Zh.className="ClickSelectingTool";function gl(){wr.call(this),this.name="Action",this.pk=null}we(gl,wr),gl.prototype.canStart=function(){if(!this.isEnabled)return!1;var a=this.diagram,y=a.lastInput,x=a.ic(y.documentPoint,function(E){for(;E.panel!==null&&!E.isActionable;)E=E.panel;return E});return x!==null&&x.isActionable?(this.pk=x,a.Ck=a.ic(y.documentPoint,null,null),!0):!1},gl.prototype.doMouseDown=function(){if(this.isActive){var a=this.diagram.lastInput,y=this.pk;y!==null&&(a.targetObject=y,y.actionDown!==null&&y.actionDown(a,y))}else this.canStart()&&this.doActivate()},gl.prototype.doMouseMove=function(){if(this.isActive){var a=this.diagram.lastInput,y=this.pk;y!==null&&(a.targetObject=y,y.actionMove!==null&&y.actionMove(a,y))}},gl.prototype.doMouseUp=function(){if(this.isActive){var a=this.diagram.lastInput,y=this.pk;if(y===null)return;a.targetObject=y,y.actionUp!==null&&y.actionUp(a,y),this.standardMouseClick(function(x){for(;x.panel!==null&&(!x.isActionable||x!==y);)x=x.panel;return x},function(x){return x===y})}this.stopTool()},gl.prototype.doCancel=function(){var a=this.diagram.lastInput,y=this.pk;y!==null&&(a.targetObject=y,y.actionCancel!==null&&y.actionCancel(a,y),this.stopTool())},gl.prototype.doStop=function(){this.pk=null},gl.className="ActionTool";function hh(){wr.call(this),this.name="ClickCreating",this.Ri=null,this.o=!0,this.j=!1,this.mw=new At(0,0)}we(hh,wr),hh.prototype.canStart=function(){if(!this.isEnabled||this.archetypeNodeData===null)return!1;var a=this.diagram;if(a.isReadOnly||a.isModelReadOnly||!a.allowInsert||!a.lastInput.left||this.isBeyondDragSize())return!1;if(this.isDoubleClick){if(a.lastInput.clickCount===1&&(this.mw=a.lastInput.viewPoint.copy()),a.lastInput.clickCount!==2||this.isBeyondDragSize(this.mw))return!1}else if(a.lastInput.clickCount!==1)return!1;return!(a.currentTool!==this&&a.Ol(a.lastInput.documentPoint,!0)!==null)},hh.prototype.doMouseUp=function(){var a=this.diagram;this.isActive&&this.insertPart(a.lastInput.documentPoint),this.stopTool()},hh.prototype.insertPart=function(a){var y=this.diagram,x=this.archetypeNodeData;if(x===null)return null;var E=null;try{if(y.R("ChangingSelection",y.selection),this.Ea(this.name),x instanceof Li)x.Zc()&&(Sl(x),E=x.copy(),E!==null&&y.add(E));else if(x!==null){var b=y.model.copyNodeData(x);De(b)&&(y.model.xf(b),E=y.Lc(b))}if(E!==null){var z=At.allocAt(a.x,a.y);this.isGridSnapEnabled&&cf(this.diagram,E,a,z),E.location=z,y.allowSelect&&(y.clearSelection(!0),E.isSelected=!0),At.free(z)}y.Ya(),this.transactionResult=this.name,y.R("PartCreated",E)}finally{this.stopTransaction(),y.R("ChangedSelection",y.selection)}return E},ge.Object.defineProperties(hh.prototype,{archetypeNodeData:{get:function(){return this.Ri},set:function(a){this.Ri=a}},isDoubleClick:{get:function(){return this.o},set:function(a){this.o=a}},isGridSnapEnabled:{get:function(){return this.j},set:function(a){this.j=a}}}),hh.className="ClickCreatingTool";function $s(){wr.call(this),this.name="DragSelecting",this.Ik=175,this.o=!1;var a=new Li;a.layerName="Tool",a.selectable=!1;var y=new lr;y.name="SHAPE",y.figure="Rectangle",y.fill=null,y.stroke="magenta",a.add(y),this.j=a}we($s,wr),$s.prototype.canStart=function(){if(!this.isEnabled)return!1;var a=this.diagram;if(!a.allowSelect)return!1;var y=a.lastInput;return!(!y.left||a.currentTool!==this&&(!this.isBeyondDragSize()||y.timestamp-a.firstInput.timestamp<this.delay||a.Ol(y.documentPoint,!0)!==null))},$s.prototype.doActivate=function(){var a=this.diagram;this.isActive=!0,a.isMouseCaptured=!0,a.skipsUndoManager=!0,a.add(this.box),this.doMouseMove()},$s.prototype.doDeactivate=function(){var a=this.diagram;a.ug(),a.remove(this.box),a.skipsUndoManager=!1,this.isActive=a.isMouseCaptured=!1},$s.prototype.doMouseMove=function(){var a=this.diagram;if(this.isActive&&this.box!==null){var y=this.computeBoxBounds(),x=this.box.fb("SHAPE");x===null&&(x=this.box.Pb());var E=Ke.alloc().h(y.width,y.height);x.desiredSize=E,this.box.mm(y.x,y.y,!1),Ke.free(E),(a.allowHorizontalScroll||a.allowVerticalScroll)&&a.gs(a.lastInput.viewPoint)}},$s.prototype.doMouseUp=function(){if(this.isActive){var a=this.diagram;a.remove(this.box);try{a.currentCursor="wait",a.R("ChangingSelection",a.selection),this.selectInRect(this.computeBoxBounds()),a.R("ChangedSelection",a.selection)}finally{a.currentCursor=""}}this.stopTool()},$s.prototype.computeBoxBounds=function(){var a=this.diagram;return new Ee(a.firstInput.documentPoint,a.lastInput.documentPoint)},$s.prototype.selectInRect=function(a){var y=this.diagram,x=y.lastInput;if(a=y.ux(a,this.isPartialInclusion),dr?x.meta:x.control)if(x.shift)for(a=a.iterator;a.next();)y=a.value,y.isSelected&&(y.isSelected=!1);else for(a=a.iterator;a.next();)y=a.value,y.isSelected=!y.isSelected;else if(x.shift)for(a=a.iterator;a.next();)y=a.value,y.isSelected||(y.isSelected=!0);else{for(x=new Xe,y=y.selection.iterator;y.next();){var E=y.value;a.contains(E)||x.add(E)}for(y=x.iterator;y.next();)y.value.isSelected=!1;for(a=a.iterator;a.next();)y=a.value,y.isSelected||(y.isSelected=!0)}},ge.Object.defineProperties($s.prototype,{delay:{get:function(){return this.Ik},set:function(a){this.Ik=a}},isPartialInclusion:{get:function(){return this.o},set:function(a){this.o=a}},box:{get:function(){return this.j},set:function(a){this.j=a}}}),$s.className="DragSelectingTool";function Fa(){wr.call(this),this.name="Panning",this.Xt=new At,this.xy=new At,this.xg=!1;var a=this;this.Kw=function(){var y=a.diagram;y!==null&&y.removeEventListener(ln.document,"scroll",a.Kw,!1),a.stopTool()}}we(Fa,wr),Fa.prototype.canStart=function(){if(!this.isEnabled)return!1;var a=this.diagram;return!(!a.allowHorizontalScroll&&!a.allowVerticalScroll||!a.lastInput.left||a.currentTool!==this&&!this.isBeyondDragSize())},Fa.prototype.doActivate=function(){var a=this.diagram;this.xg?(a.lastInput.bubbles=!0,a.addEventListener(ln.document,"scroll",this.Kw,!1)):(a.currentCursor="move",a.isMouseCaptured=!0,this.Xt.assign(a.position)),this.isActive=!0},Fa.prototype.doDeactivate=function(){var a=this.diagram;a.currentCursor="",this.isActive=a.isMouseCaptured=!1},Fa.prototype.doCancel=function(){var a=this.diagram;a.position=this.Xt,a.isMouseCaptured=!1,this.stopTool()},Fa.prototype.doMouseMove=function(){this.move()},Fa.prototype.doMouseUp=function(){this.move(),this.stopTool()},Fa.prototype.move=function(){var a=this.diagram;if(this.isActive&&a)if(this.xg)a.lastInput.bubbles=!0;else{var y=a.position,x=a.firstInput.documentPoint,E=a.lastInput.documentPoint,b=y.x+x.x-E.x;x=y.y+x.y-E.y,a.allowHorizontalScroll||(b=y.x),a.allowVerticalScroll||(x=y.y),a.position=this.xy.h(b,x)}},ge.Object.defineProperties(Fa.prototype,{bubbles:{get:function(){return this.xg},set:function(a){this.xg=a}},originalPosition:{get:function(){return this.Xt}}}),Fa.className="PanningTool",bi("clickCreatingTool",function(){return this.findTool("ClickCreating")},function(a){this.gb("ClickCreating",a,this.mouseUpTools)}),bi("clickSelectingTool",function(){return this.findTool("ClickSelecting")},function(a){this.gb("ClickSelecting",a,this.mouseUpTools)}),bi("panningTool",function(){return this.findTool("Panning")},function(a){this.gb("Panning",a,this.mouseMoveTools)}),bi("dragSelectingTool",function(){return this.findTool("DragSelecting")},function(a){this.gb("DragSelecting",a,this.mouseMoveTools)}),bi("actionTool",function(){return this.findTool("Action")},function(a){this.gb("Action",a,this.mouseDownTools)});function hu(){this.F=this.u=this.j=this.o=null}ge.Object.defineProperties(hu.prototype,{mainElement:{get:function(){return this.u},set:function(a){this.u=a}},show:{get:function(){return this.o},set:function(a){this.o!==a&&(this.o=a)}},hide:{get:function(){return this.j},set:function(a){this.j!==a&&(this.j=a)}},valueFunction:{get:function(){return this.F},set:function(a){this.F=a}}}),hu.className="HTMLInfo";function pl(a,y,x){this.text=a,this.hx=y,this.visible=x}pl.className="ContextMenuButtonInfo";function ts(){wr.call(this),this.name="ContextMenu",this.o=this.ht=this.j=null,this.yw=new At,this.jt=null,this.Et=!1;var a=this;this.tu=function(){a.stopTool()}}we(ts,wr);function Fl(a){var y=new hu;y.show=function(b,z,tt){tt.showDefaultContextMenu()},y.hide=function(b,z){z.hideDefaultContextMenu()},Wh=y,a.tu=function(){a.stopTool()},y=Ri("div");var x=Ri("div");y.style.cssText="top: 0px;z-index:10002;position: fixed;display: none;text-align: center;left: 25%;width: 50%;background-color: #F5F5F5;padding: 16px;border: 16px solid #444;border-radius: 10px;margin-top: 10px",x.style.cssText="z-index:10001;position: fixed;display: none;top: 0;left: 0;width: 100%;height: 100%;background-color: black;opacity: 0.8;";var E=Ri("style");ln.document.getElementsByTagName("head")[0].appendChild(E),E.sheet.insertRule(".goCXul { list-style: none; }",0),E.sheet.insertRule(".goCXli {font:700 1.5em Helvetica, Arial, sans-serif;position: relative;min-width: 60px; }",0),E.sheet.insertRule(".goCXa {color: #444;display: inline-block;padding: 4px;text-decoration: none;margin: 2px;border: 1px solid gray;border-radius: 10px; }",0),E=a.diagram,E!==null&&(E.addEventListener(y,"contextmenu",Ho,!1),E.addEventListener(y,"selectstart",Ho,!1),E.addEventListener(x,"contextmenu",Ho,!1)),y.className="goCXforeground",x.className="goCXbackground",ln.document.body&&(ln.document.body.appendChild(y),ln.document.body.appendChild(x)),uc=y,Md=x,lc=!0}function Ho(a){return a.preventDefault(),!1}ts.prototype.canStart=function(){if(!this.isEnabled)return!1;var a=this.diagram;return this.isBeyondDragSize()||!a.lastInput.right||1<a.lastInput.clickCount?!1:!!(a.lastInput.isTouchEvent&&this.defaultTouchContextMenu!==null||this.findObjectWithContextMenu()!==null)},ts.prototype.doStart=function(){this.yw.set(this.diagram.firstInput.documentPoint)},ts.prototype.doStop=function(){this.hideContextMenu(),this.currentObject=null},ts.prototype.findObjectWithContextMenu=function(a){a===void 0&&(a=null);var y=this.diagram,x=y.lastInput,E=null;if(a instanceof Le||(a instanceof he?E=a:E=y.ic(x.documentPoint,null,function(b){return!b.layer.isTemporary})),E!==null){for(a=E;a!==null;){if(a.contextMenu!==null)return a;a=a.panel}if(y.lastInput.isTouchEvent&&this.defaultTouchContextMenu)return E.part}else if(y.contextMenu!==null)return y;return null},ts.prototype.doActivate=function(){},ts.prototype.doMouseDown=function(){if(wr.prototype.doMouseDown.call(this),this.isActive&&this.currentContextMenu instanceof Rr){var a=this.diagram.toolManager.findTool("Action");a!==null&&a.canStart()&&(a.doActivate(),a.doMouseDown(),a.doDeactivate())}this.diagram.toolManager.mouseDownTools.contains(this)&&Yl(this)},ts.prototype.doMouseUp=function(){if(this.isActive&&this.currentContextMenu instanceof Rr){var a=this.diagram.toolManager.findTool("Action");a!==null&&a.canStart()&&(a.doActivate(),a.doCancel(),a.doDeactivate())}Yl(this)};function Yl(a){var y=a.diagram;if(a.isActive){var x=a.currentContextMenu;if(x!==null){var E=null;x instanceof hu||(E=y.ic(y.lastInput.documentPoint,null,null),E!==null&&E.rg(x)&&a.standardMouseClick(null,null)),a.maybeStopTool(E)}}else a.canStart()&&(Ku(a,!0),a.isActive||a.stopTool())}ts.prototype.maybeStopTool=function(){this.stopTool(),this.canStart()&&(this.diagram.currentTool=this,this.doMouseUp())};function Ku(a,y,x){if(x===void 0&&(x=null),!a.Et&&(a.Et=!0,y&&a.standardMouseSelect(),y=a.standardMouseClick(),a.Et=!1,!y)){if(a.isActive=!0,y=Wh,x===null&&(x=a.findObjectWithContextMenu()),x!==null){var E=x.contextMenu;E!==null?(a.currentObject=x instanceof he?x:null,a.showContextMenu(E,a.currentObject)):y!==null&&a.showContextMenu(y,a.currentObject)}else y!==null&&a.showContextMenu(y,null);a.currentContextMenu instanceof Rr&&!a.currentContextMenu.visible&&a.stopTool()}}ts.prototype.doMouseMove=function(){var a=this.diagram.toolManager.findTool("Action");a!==null&&a.doMouseMove(),this.isActive&&this.diagram.toolManager.doMouseMove()},ts.prototype.showContextMenu=function(a,y){var x=this.diagram;if(a!==this.currentContextMenu&&this.hideContextMenu(),a instanceof Rr){a.layerName="Tool",a.selectable=!1,a.scale=1/x.scale,a.category=this.name,a.placeholder!==null&&(a.placeholder.scale=x.scale);var E=a.diagram;E!==null&&E!==x&&E.remove(a),x.add(a),y!==null?a.adornedObject=y:a.data=x.model,a.Va(),this.positionContextMenu(a,y)}else a instanceof hu&&a.show(y,x,this);this.currentContextMenu=a},ts.prototype.positionContextMenu=function(a){if(a.placeholder===null){var y=this.diagram,x=y.lastInput.documentPoint.copy(),E=a.measuredBounds,b=y.viewportBounds;y.lastInput.isTouchEvent&&(x.x-=E.width),x.x+E.width>b.right&&(x.x-=E.width+5/y.scale),x.x<b.x&&(x.x=b.x),x.y+E.height>b.bottom&&(x.y-=E.height+5/y.scale),x.y<b.y&&(x.y=b.y),a.position=x}},ts.prototype.hideContextMenu=function(){var a=this.diagram,y=this.currentContextMenu;y!==null&&(y instanceof Rr?(a.remove(y),this.ht!==null&&this.ht.Jf(y.category),y.data=null,y.adornedObject=null):y instanceof hu&&(y.hide!==null?y.hide(a,this):y.mainElement!==null&&(y.mainElement.style.display="none")),this.currentContextMenu=null,this.standardMouseOver())};function dh(a){var y=new Xe;return y.add(new pl("Copy",function(x){x.commandHandler.copySelection()},function(x){return x.commandHandler.canCopySelection()})),y.add(new pl("Cut",function(x){x.commandHandler.cutSelection()},function(x){return x.commandHandler.canCutSelection()})),y.add(new pl("Delete",function(x){x.commandHandler.deleteSelection()},function(x){return x.commandHandler.canDeleteSelection()})),y.add(new pl("Paste",function(x){x.commandHandler.pasteSelection(a.mouseDownPoint)},function(x){return x.commandHandler.canPasteSelection(a.mouseDownPoint)})),y.add(new pl("Select All",function(x){x.commandHandler.selectAll()},function(x){return x.commandHandler.canSelectAll()})),y.add(new pl("Undo",function(x){x.commandHandler.undo()},function(x){return x.commandHandler.canUndo()})),y.add(new pl("Redo",function(x){x.commandHandler.redo()},function(x){return x.commandHandler.canRedo()})),y.add(new pl("Scroll To Part",function(x){x.commandHandler.scrollToPart()},function(x){return x.commandHandler.canScrollToPart()})),y.add(new pl("Zoom To Fit",function(x){x.commandHandler.zoomToFit()},function(x){return x.commandHandler.canZoomToFit()})),y.add(new pl("Reset Zoom",function(x){x.commandHandler.resetZoom()},function(x){return x.commandHandler.canResetZoom()})),y.add(new pl("Group Selection",function(x){x.commandHandler.groupSelection()},function(x){return x.commandHandler.canGroupSelection()})),y.add(new pl("Ungroup Selection",function(x){x.commandHandler.ungroupSelection()},function(x){return x.commandHandler.canUngroupSelection()})),y.add(new pl("Edit Text",function(x){x.commandHandler.editTextBlock()},function(x){return x.commandHandler.canEditTextBlock()})),y}ts.prototype.showDefaultContextMenu=function(){var a=this.diagram;this.jt===null&&(this.jt=dh(this)),uc.innerHTML="",Md.addEventListener("pointerdown",this.tu,!1);var y=this,x=Ri("ul");x.className="goCXul",uc.appendChild(x),x.innerHTML="";for(var E=this.jt.iterator;E.next();){var b=E.value,z=b.visible;if(typeof b.hx=="function"&&(typeof z!="function"||z(a))){z=Ri("li"),z.className="goCXli";var tt=Ri("a");tt.className="goCXa",tt.href="#",tt.ky=b.hx,tt.addEventListener("pointerdown",function(rt){return this.ky(a),y.stopTool(),rt.preventDefault(),!1},!1),tt.textContent=b.text,z.appendChild(tt),x.appendChild(z)}}uc.style.display="block",Md.style.display="block"},ts.prototype.hideDefaultContextMenu=function(){if(this.currentContextMenu!==null&&this.currentContextMenu===Wh){uc.style.display="none",Md.style.display="none";var a=this.diagram;a!==null&&a.removeEventListener(Md,"pointerdown",this.tu,!1),this.currentContextMenu=null}},ge.Object.defineProperties(ts.prototype,{currentContextMenu:{get:function(){return this.j},set:function(a){this.j=a,this.ht=a instanceof Rr?a.adornedPart:null}},defaultTouchContextMenu:{get:function(){return lc===!1&&Wh===null&&Lo&&Fl(this),Wh},set:function(a){a===null&&(lc=!0),Wh=a}},currentObject:{get:function(){return this.o},set:function(a){this.o=a}},mouseDownPoint:{get:function(){return this.yw}}});var Wh=null,lc=!1,Md=null,uc=null;ts.className="ContextMenuTool",bi("contextMenuTool",function(){return this.findTool("ContextMenu")},function(a){this.gb("ContextMenu",a,this.mouseUpTools)});function ho(){wr.call(this),this.name="TextEditing",this.Zh=new io,this.ia=null,this.V=Fd,this.vj=null,this.qa=Ad,this.u=1,this.F=!0,this.o=null,this.j=new hu,this.kt=null,hc(this,this.j)}we(ho,wr);function hc(a,y){if(Lo){var x=Ri("textarea");a.kt=x,x.addEventListener("input",function(){if(a.textBlock!==null){var E=a.Lx(this.value);this.style.width=20+E.measuredBounds.width*this.wA+"px",this.rows=E.lineCount}},!1),x.addEventListener("keydown",function(E){if(!E.isComposing&&a.textBlock!==null){var b=E.key;b==="Enter"?(a.textBlock.isMultiline===!1&&E.preventDefault(),a.acceptText(dc)):b==="Tab"?(a.acceptText(ef),E.preventDefault()):b==="Escape"&&(a.doCancel(),a.diagram!==null&&a.diagram.doFocus())}},!1),x.addEventListener("focus",function(){if(a.currentTextEditor!==null&&a.state!==Ad){var E=a.kt;a.qa===cc&&(a.qa=fc),typeof E.select=="function"&&a.selectsTextOnActivate&&(E.select(),E.setSelectionRange(0,9999))}},!1),x.addEventListener("blur",function(){if(a.currentTextEditor!==null&&a.state!==Ad){var E=a.kt;typeof E.focus=="function"&&E.focus(),typeof E.select=="function"&&a.selectsTextOnActivate&&(E.select(),E.setSelectionRange(0,9999))}},!1),y.valueFunction=function(){return x.value},y.mainElement=x,y.show=function(E,b,z){if(E instanceof io&&z instanceof ho)if(z.state===gc)x.style.border="3px solid red",x.focus();else{var tt=E.ga(er),rt=b.position,ot=b.scale,st=E.Df()*ot;st<z.minimumEditorScale&&(st=z.minimumEditorScale);var ut=E.naturalBounds.width*st+6,ft=E.naturalBounds.height*st+2,mt=(tt.x-rt.x)*ot;tt=(tt.y-rt.y)*ot,rt=E.verticalAlignment,ot=(E.lineHeight+E.spacingAbove+E.spacingBelow)*E.lineCount*st,ft=rt.y*ft-rt.y*ot+rt.offsetY-(.5*ft-.5*ot)-ot/2,x.value=E.text,b.div.style.font=E.font,x.style.position="absolute",x.style.zIndex="100",x.style.font="inherit",x.style.fontSize=100*st+"%",x.style.lineHeight="normal",x.style.width=ut+"px",x.style.left=(mt-ut/2|0)-1+"px",x.style.top=(tt+ft|0)-1+"px",x.style.textAlign=E.textAlign,x.style.margin="0",x.style.padding="1px",x.style.border="0",x.style.outline="none",x.style.whiteSpace="pre-wrap",x.style.overflow="hidden",x.rows=E.lineCount,x.wA=st,x.className="goTXarea",b.div.appendChild(x),x.focus(),z.selectsTextOnActivate&&(x.select(),x.setSelectionRange(0,9999))}},y.hide=function(E){E.div.removeChild(x)}}}ho.prototype.canStart=function(){if(!this.isEnabled)return!1;var a=this.diagram;if(a===null||a.isReadOnly||ch&&ch!==this&&(ch.acceptText(du),ch&&ch!==this)||!a.lastInput.left||this.isBeyondDragSize())return!1;var y=a.ic(a.lastInput.documentPoint);return y!==null&&y instanceof io&&y.editable&&y.part.canEdit()?(y=y.part,!(y===null||this.starting===Fd&&!y.isSelected||this.starting===nf&&2>a.lastInput.clickCount)):!1},ho.prototype.doStart=function(){ch=this,this.textBlock!==null&&this.doActivate()},ho.prototype.doActivate=function(){if(!this.isActive){var a=this.diagram;if(a!==null){var y=this.textBlock;if(y===null&&(y=a.ic(a.lastInput.documentPoint)),y!==null&&y instanceof io&&(this.textBlock=y,y.part!==null)){a.animationManager.Cc(),this.isActive=!0,this.qa=cc;var x=this.defaultTextEditor;y.textEditor!==null&&(x=y.textEditor),this.Zh=this.textBlock.copy();var E=new Ee(this.textBlock.ga(Sr),this.textBlock.ga(Hr));a.tv(E),x.show(y,a,this),this.currentTextEditor=x}}}},ho.prototype.doCancel=function(){this.stopTool()},ho.prototype.doMouseUp=function(){this.canStart()&&this.doActivate()},ho.prototype.doMouseDown=function(){this.isActive&&this.acceptText(du)},ho.prototype.acceptText=function(a){switch(a){case du:this.qa===Nd?this.currentTextEditor instanceof HTMLElement&&this.currentTextEditor.focus():(this.qa===cc||this.qa===gc||this.qa===fc)&&(this.qa=ug,lg(this));break;case tf:case dc:case ef:(dc!==a||this.textBlock.isMultiline!==!0)&&(this.qa===cc||this.qa===gc||this.qa===fc)&&(this.qa=ug,lg(this))}};function lg(a){var y=a.textBlock,x=a.diagram,E=a.currentTextEditor;if(y!==null&&E!==null){var b=y.text,z="";E.valueFunction!==null&&(z=E.valueFunction()),a.isValidText(y,b,z)?(a.Ea(a.name),a.qa=Nd,a.transactionResult=a.name,y.text=z,a.doSuccess(b,z),x!==null&&x.R("TextEdited",y,b),a.stopTransaction(),a.stopTool(),x!==null&&x.doFocus()):(a.qa=gc,a.doError(b,z))}}ho.prototype.doError=function(a,y){var x=this.textBlock;x.errorFunction!==null&&x.errorFunction(this,a,y),(a=this.currentTextEditor)&&a.show(x,this.diagram,this)},ho.prototype.doSuccess=function(a,y){var x=this.textBlock;x.textEdited!==null&&x.textEdited(x,a,y)},ho.prototype.doDeactivate=function(){var a=this.diagram;a!==null&&(this.qa=Ad,this.currentTextEditor!==null&&this.currentTextEditor.hide(a,this),this.textBlock=null,this.isActive=!1)},ho.prototype.doStop=function(){ch=null},ho.prototype.isValidText=function(a,y,x){var E=this.textValidation;return E!==null&&!E(a,y,x)?!1:(E=a.textValidation,!!(E===null||E(a,y,x)))},ho.prototype.Lx=function(a){var y=this.Zh;return y.text=a,y.measure(this.textBlock.Ih,1/0),y},ge.Object.defineProperties(ho.prototype,{textBlock:{get:function(){return this.ia},set:function(a){this.ia=a}},currentTextEditor:{get:function(){return this.o},set:function(a){this.o=a}},defaultTextEditor:{get:function(){return this.j},set:function(a){this.j=a}},starting:{get:function(){return this.V},set:function(a){this.V=a}},textValidation:{get:function(){return this.vj},set:function(a){this.vj=a}},minimumEditorScale:{get:function(){return this.u},set:function(a){this.u=a}},selectsTextOnActivate:{get:function(){return this.F},set:function(a){this.F=a}},state:{get:function(){return this.qa},set:function(a){this.qa!==a&&(this.qa=a)}}}),ho.prototype.measureTemporaryTextBlock=ho.prototype.Lx;var tf=new Ue(ho,"LostFocus",0),du=new Ue(ho,"MouseDown",1),ef=new Ue(ho,"Tab",2),dc=new Ue(ho,"Enter",3),$0=new Ue(ho,"SingleClick",0),Fd=new Ue(ho,"SingleClickSelected",1),nf=new Ue(ho,"DoubleClick",2),Ad=new Ue(ho,"StateNone",0),cc=new Ue(ho,"StateActive",1),fc=new Ue(ho,"StateEditing",2),ug=new Ue(ho,"StateValidating",3),gc=new Ue(ho,"StateInvalid",4),Nd=new Ue(ho,"StateValidated",5),ch=null;ho.className="TextEditingTool",ho.LostFocus=tf,ho.MouseDown=du,ho.Tab=ef,ho.Enter=dc,ho.SingleClick=$0,ho.SingleClickSelected=Fd,ho.DoubleClick=nf,ho.StateNone=Ad,ho.StateActive=cc,ho.StateEditing=fc,ho.StateValidating=ug,ho.StateInvalid=gc,ho.StateValidated=Nd,bi("textEditingTool",function(){return this.findTool("TextEditing")},function(a){this.gb("TextEditing",a,this.mouseUpTools)});function Bs(a){mc||(hg(),mc=!0),this.H=Eu,this.Ok=this.zb=this.vq=this.bc=!1,this.Qw=!0,this.Pk=Wu,this.Dm=!1,this.Gh=this.Jd=!0,this.Dg=600,this.cw=this.Ow=!1,this.Zd=new qe,this.ce=new Aa,this.ce.Yd=this,this.Ei=new qe,this.pu=new qe,this.Sr=new qe,this.pr=new qe,a&&Object.assign(this,a)}Bs.prototype.Xe=function(a){this.H=a},Bs.prototype.canStart=function(){return!0};function Cu(a,y){a.Jd&&a.canStart(y)&&(a.Zd.add(y),a.defaultAnimation.isAnimating&&a.Cc(),Na(a.H),a.zb=!0)}function rf(a){if(a.Jd&&a.zb){var y=a.ce,x=a.H,E=a.Zd.contains("Model");E&&(a.Ok=!0,a.Pk===Wu?(y.isViewportUnconstrained=!0,y.vc.clear(),y.add(x,"position",x.position.copy().offset(0,-200),x.position),y.add(x,"opacity",0,1)):a.Pk===dg&&y.vc.clear(),a.Qw=!!(a.Pk===vc&&x.du.D(x.pa)),x.R("InitialAnimationStarting",a)),E&&!a.Gh||y.vc.count===0?(a.Zd.clear(),a.zb=!1,y.vc.clear(),yc(y,x),a.Ok=!1,x.N()):(a.Zd.clear(),x.kg=!1,E=y.vc.get(x),x.autoScale!==Va&&E!==null&&(delete E.start.scale,delete E.end.scale),ln.requestAnimationFrame(function(){a.zb===!1||y.bc||(x.Gf("temporaryPixelRatio")&&gs(x),mg(x),a.zb=!1,y.start(),y.bc&&(fh(a),x.Ya(),cg(y,0),el(x,!0),Vh(a),x.R("AnimationStarting",a)))}))}}function Zu(a){return a.Zd.contains("Trigger")&&a.Zd.count===1}function of(a,y,x,E){a.isTicking||Zu(a)||y instanceof En&&(y.fromNode!==null||y.toNode!==null)||a.ce.add(y,"position",x,E,!1)}Pt=Bs.prototype,Pt.fv=function(a){return this.ce.fv(a)},Pt.Xu=function(a){return this.ce.Xu(a)};function af(a,y){function x(){if(0<b.Sr.count&&(E.addAll(b.Sr),b.Sr.clear(),b.bc=!0),b.bc!==!1&&E.count!==0){b.pu.addAll(E);for(var z=b.pu.iterator;z.next();){var tt=z.value;if(tt.bc!==!1){t:if(0<tt.yl.count)var rt=!0;else{for(rt=tt.vc.iterator;rt.next();){var ot=rt.key;if(ot instanceof he&&ot.diagram!==null||ot instanceof Le){rt=!0;break t}}rt=!1}rt?Sc(tt,!1):tt.Xk=!0}}b.pu.clear(),b.bc!==!1&&(fh(b),el(b.H),Vh(b)),ln.requestAnimationFrame(x)}}var E=a.Ei,b=a;a.bc?a.Sr.add(y):(a.bc=!0,E.add(y),ln.requestAnimationFrame(function(){x()}))}function Gp(a){for(a=a.Ei.iterator;a.next();)a.value.Xk=!1}function fh(a){if(!a.vq){var y=a.H;a.Ow=y.skipsUndoManager,a.cw=y.skipsModelSourceBindings,y.skipsUndoManager=!0,y.skipsModelSourceBindings=!0,a.vq=!0}}function Vh(a){var y=a.H;y.skipsUndoManager=a.Ow,y.skipsModelSourceBindings=a.cw,a.vq=!1}Pt.Cc=function(a){var y=this.ce;if(this.zb===!0&&(this.Ok=this.zb=!1,this.Zd.clear(),0<y.vc.count&&this.H.$b()),this.bc){if(y.Ml(!0),y.vc.clear(),yc(y,null),a===!0)for(a=this.Ei.Fa(),y=0;y<a.length;y++)a[y].Ml(!0)}else y.vc.clear(),yc(y,this.H)},Pt.Ml=function(a){a===this.defaultAnimation&&this.defaultAnimation.vc.clear(),this.Ei.remove(a),this.Ei.count===0&&(this.bc=!1,this.H.$b()),a===this.defaultAnimation&&(this.defaultAnimation.vc.clear(),this.H.R("AnimationFinished",this))},Pt.Cj=function(a,y){this.zb&&(this.Zd.contains("Expand Tree")||this.Zd.contains("Expand SubGraph"))&&(this.ce.Cj(a,y),Cs(this,a))},Pt.Aj=function(a,y){this.zb&&(this.Zd.contains("Collapse Tree")||this.Zd.contains("Collapse SubGraph"))&&(this.ce.Aj(a,y),gh(this.ce,y,"position",y.position,y.position),Cs(this,a))};function Hp(a,y,x){!a.zb||y.D(x)||Zu(a)||(a.H.pi||(y=x.copy()),gh(a.ce,a.H,"position",y,x))}function sf(a,y,x){y.fd&&(y.Tg=x,a.pr.add(y))}function Cs(a,y){for(y=y.findLinksConnected();y.next();){var x=y.value;x.fd&&(x.Tg=x.points.copy(),a.pr.add(x))}}function Uh(a,y,x,E,b){a===null&&(a=[0,0,0,0]),y===null&&(y=[0,0,0,0]);var z=a[0],tt=a[1],rt=a[2];a=a[3];var ot=y[0],st=y[1],ut=y[2];return y=y[3],rt===0||rt===100?(z=ot,tt=st):(ut===0||ut===100)&&(ot=z,st=tt),180<Math.abs(ot-z)&&(ot>z?z+=360:ot+=360),z=b(x,z,ot-z,E)%360,tt=b(x,tt,st-tt,E),rt=b(x,rt,ut-rt,E),x=b(x,a,y-a,E),"hsla("+z+", "+tt+"%, "+rt+"%, "+x+")"}function hg(){function a(x,E,b,z,tt,rt){x.position=new At(z(tt,E.x,b.x-E.x,rt),z(tt,E.y,b.y-E.y,rt))}var y=new Me;y.add("position:diagram",a),y.add("position",a),y.add("position:part",function(x,E,b,z,tt,rt){tt<rt?x.mm(z(tt,E.x,b.x-E.x,rt),z(tt,E.y,b.y-E.y,rt),!1):x.position=new At(z(tt,E.x,b.x-E.x,rt),z(tt,E.y,b.y-E.y,rt))}),y.add("location",function(x,E,b,z,tt,rt){tt<rt?x.mm(z(tt,E.x,b.x-E.x,rt),z(tt,E.y,b.y-E.y,rt),!0):x.location=new At(z(tt,E.x,b.x-E.x,rt),z(tt,E.y,b.y-E.y,rt))}),y.add("position:placeholder",function(x,E,b,z,tt,rt){tt<rt?x.mm(z(tt,E.x,b.x-E.x,rt),z(tt,E.y,b.y-E.y,rt),!1):x.position=new At(z(tt,E.x,b.x-E.x,rt),z(tt,E.y,b.y-E.y,rt))}),y.add("position:nodeCollapse",function(x,E,b,z,tt,rt){var ot=x.actualBounds,st=b.actualBounds;b=st.x+st.width/2-ot.width/2,ot=st.y+st.height/2-ot.height/2,tt<rt?x.mm(z(tt,E.x,b-E.x,rt),z(tt,E.y,ot-E.y,rt),!1):x.position=new At(z(tt,E.x,b-E.x,rt),z(tt,E.y,ot-E.y,rt))}),y.add("desiredSize",function(x,E,b,z,tt,rt){x.desiredSize=new Ee(z(tt,E.width,b.width-E.width,rt),z(tt,E.height,b.height-E.height,rt))}),y.add("width",function(x,E,b,z,tt,rt){x.width=z(tt,E,b-E,rt)}),y.add("height",function(x,E,b,z,tt,rt){x.height=z(tt,E,b-E,rt)}),y.add("fill",function(x,E,b,z,tt,rt){x.fill=Uh(E,b,tt,rt,z)}),y.add("stroke",function(x,E,b,z,tt,rt){x.stroke=Uh(E,b,tt,rt,z)}),y.add("strokeWidth",function(x,E,b,z,tt,rt){x.strokeWidth=z(tt,E,b-E,rt)}),y.add("strokeDashOffset",function(x,E,b,z,tt,rt){x.strokeDashOffset=z(tt,E,b-E,rt)}),y.add("background",function(x,E,b,z,tt,rt){x.background=Uh(E,b,tt,rt,z)}),y.add("areaBackground",function(x,E,b,z,tt,rt){x.areaBackground=Uh(E,b,tt,rt,z)}),y.add("opacity",function(x,E,b,z,tt,rt){x.opacity=z(tt,E,b-E,rt)}),y.add("scale",function(x,E,b,z,tt,rt){x.scale=z(tt,E,b-E,rt)}),y.add("angle",function(x,E,b,z,tt,rt){x.angle=z(tt,E,b-E,rt)}),pc=y}ge.Object.defineProperties(Bs.prototype,{animationReasons:{get:function(){return this.Zd}},isEnabled:{get:function(){return this.Jd},set:function(a){(this.Jd=a)&&this.Ei.each(function(y){y.isAnimating||y.runCount!==1/0||y.start()})}},duration:{get:function(){return this.Dg},set:function(a){1>a&&Mn(a,">= 1",Bs,"duration"),this.Dg=a}},isAnimating:{get:function(){return this.bc}},isTicking:{get:function(){return this.vq}},isInitial:{get:function(){return this.Gh},set:function(a){this.Gh=a}},defaultAnimation:{get:function(){return this.ce}},activeAnimations:{get:function(){return this.Ei}},initialAnimationStyle:{get:function(){return this.Pk},set:function(a){this.Pk=a}}}),Bs.prototype.stopAnimation=Bs.prototype.Cc;var pc=null,mc=!1,Wu=new Ue(Bs,"Default",1),vc=new Ue(Bs,"AnimateLocations",2),dg=new Ue(Bs,"None",3);Bs.className="AnimationManager",Bs.defineAnimationEffect=function(a,y){mc||(hg(),mc=!0),pc.add(a,y)},Bs.Default=Wu,Bs.AnimateLocations=vc,Bs.None=dg;function Aa(a){this.vu=this.Nw=this.Yd=this.H=null,this.Xk=this.bc=this.j=!1,this.cn=this.Qd=0,this.Lp=this.ot=Dd,this.Wk=this.ho=!1,this.cu=1,this.au=0,this.Gd=this.Dg=NaN,this.gw=0,this.dn=null,this.o=Nn,this.vc=new Me,this.Tt=new Me,this.yl=new qe,this.Ut=new qe,this.dw=vh,a&&Object.assign(this,a)}Aa.prototype.suspend=function(){this.Xk=!0},Aa.prototype.advanceTo=function(a,y){y&&(this.Xk=!1),this.ho&&a>=this.Gd&&(this.Wk=!0,a-=this.Gd),this.gw=a,Sc(this,!0),fh(this.Yd),el(this.H),Vh(this.Yd),this.H.redraw()};function yc(a,y){if(a.Tt.clear(),a.Wk=!1,a.au=0,a.Gd=NaN,0<a.yl.count&&a.yl.clear(),0<a.Ut.count&&a.Ut.clear(),y!==null)for(a=y.links;a.next();)a.value.Tg=null}Pt=Aa.prototype,Pt.start=function(){if(this.vc.count===0||this.bc)return this;for(var a=this.H,y=this.vc.iterator;y.next();){var x=y.key;a===null&&(x instanceof Le?a=x:x instanceof he&&(a=x.diagram))}if(a!==null)this.H=a,this.Yd=a.animationManager;else return this;return y=this.Yd,y.isEnabled===!1?this:(this.Gd=isNaN(this.Dg)?y.duration:this.Dg,this.Lp=this.ot,y.Ok&&y.Pk===Wu&&this===y.defaultAnimation&&(this.Lp=Kp,this.Gd=isNaN(this.Dg)?y.duration===600?900:y.duration:this.Dg),this.dw=a.scrollMode,this.isViewportUnconstrained&&(a.sj=Lc),fh(y),this.yl.each(function(E){E.data=null,a.add(E)}),Vh(y),this.bc=!0,this.Qd=+new Date,this.cn=this.Qd+this.Gd,af(y,this),this)},Pt.Iy=function(a,y){return a.Zc()?(this.yl.add(a),this.H=y,this):this},Pt.add=function(a,y,x,E,b){if(y==="position"&&x.Xa(E))return this;if(this.H===null&&(a instanceof Le?this.H=a:a instanceof he&&a.diagram!==null&&(this.H=a.diagram)),a instanceof Li){if(!a.isAnimated)return this;y==="position"&&(y="position:part")}return gh(this,a,y,x,E,b),this};function gh(a,y,x,E,b,z){var tt=a.vc;if(y instanceof Le&&x==="position"&&(x="position:diagram"),(x==="fill"||x==="stroke"||x==="background"||x==="areaBackground")&&(Xu(E),av(),E=[Us.j,Us.u,Us.o,Us.F],Xu(b),av(),b=[Us.j,Us.u,Us.o,Us.F]),tt.contains(y)){var rt=tt.I(y),ot=rt.start,st=rt.end;ot[x]===void 0&&(ot[x]=Yh(E)),st[x]=Yh(b)}else ot={},st={},ot[x]=Yh(E),st[x]=Yh(b),rt=ot.position,y instanceof he&&rt instanceof At&&!rt.w()&&y.diagram.animationManager.Zd.contains("Expand SubGraph")&&rt.assign(st.position),rt=new Xh(ot,st,z),tt.add(y,rt);tt=ot[x],tt instanceof At&&!tt.w()&&tt.assign(a.o),z&&x.indexOf("position:")===0&&y instanceof Li?rt.Ku.location=Yh(y.location):z&&(rt.Ku[x]=Yh(E))}function Yh(a){return a instanceof At||a instanceof Ke?a.copy():a}Pt.fv=function(a){return this.bc?(a=this.vc.I(a),a!==null&&a.nv):!1},Pt.Xu=function(a){return this.bc?(a=this.vc.I(a),a!==null&&(a.start.position||a.start.location)):!1};function Sc(a,y){if(!a.Xk||y){var x=a.Yd;if(a.bc!==!1){var E=+new Date,b=E>a.cn?a.Gd:E-a.Qd;y&&(b=a.gw,b<a.Gd?(a.Qd=+new Date-b,a.cn=a.Qd+a.Gd):b=a.Gd),fh(x),cg(a,b),el(a.H,!0),Vh(x),E>a.cn&&(a.ho&&!a.Wk?(a.Qd=+new Date,a.cn=a.Qd+a.Gd,a.Wk=!0):a.Ml(!1))}}}function cg(a,y){for(var x=a.Gd,E=a.vc.iterator,b=a.Wk;E.next();){var z=E.key;if(!(z instanceof he&&z.diagram===null)){var tt=E.value,rt=b?tt.end:tt.start;tt=b?tt.start:tt.end;var ot=pc,st;for(st in tt)st==="position"&&(tt["position:placeholder"]||tt["position:nodeCollapse"])||ot.get(st)===null||ot.get(st)(z,rt[st],tt[st],a.Lp,y,x,a)}}}Pt.stop=function(){return this.bc?(this.Ml(!0),this):this},Pt.Ml=function(a){if(this.vu!==null&&this.vu.jo.remove(this.Nw),this.bc){var y=this.H,x=this.Yd;this.Xk=this.bc=x.Ok=!1,fh(x);for(var E=this.vc,b=this.yl.iterator;b.next();)y.remove(b.value);for(b=this.Ut.iterator;b.next();)b.value.v();b=this.ho,E=E.iterator;for(var z=pc;E.next();){var tt=E.key,rt=E.value,ot=b?rt.end:rt.start,st=b?rt.start:rt.end,ut=rt.Ku,ft;for(ft in st)if(z.get(ft)!==null){var mt=ft;!rt.Hu||mt!=="position:nodeCollapse"&&mt!=="position:placeholder"||(mt="position"),z.get(mt)(tt,ot[ft],ut[ft]!==void 0?ut[ft]:rt.Hu?ot[ft]:st[ft],this.Lp,this.Gd,this.Gd,this)}rt.Hu&&ut.location!==void 0&&tt instanceof Li&&(tt.location=ut.location),rt.nv&&tt instanceof Li&&tt.Zb(!1)}if(y.As.clear(),xc(y,!1),y.Ya(),y.N(),el(y,!0),x.defaultAnimation===this){for(ft=x.pr.iterator;ft.next();)b=ft.value,b.Tg!==null&&(b.points=b.Tg,b.Tg=null);x.pr.clear()}el(y,!0),this.isViewportUnconstrained&&(y.scrollMode=this.dw),Vh(x),this.au++,!a&&this.cu>this.au?(this.Wk=!1,this.start()):(this.dn&&this.dn(this),yc(this,null),x.Ml(this),y.$b())}},Pt.Cj=function(a,y){var x=y.actualBounds,E=null;if(y instanceof $i&&(E=y.placeholder),E!==null?(x=E.ga(Sr),E=E.padding,x.x+=E.left,x.y+=E.top,this.add(a,"position",x,a.position,!1)):this.add(a,"position",new At(x.x+x.width/2,x.y+x.height/2),a.position,!1),this.add(a,"scale",.01,a.scale,!1),a instanceof $i)for(a=a.memberParts;a.next();)E=a.value,E instanceof Un&&this.Cj(E,y)},Pt.Aj=function(a,y){if(a.isVisible()){var x=null;if(y instanceof $i&&(x=y.placeholder),x!==null){var E=x.ga(Sr);x=x.padding,E.x+=x.left,E.y+=x.top,this.add(a,"position:placeholder",a.position,E,!0)}else this.add(a,"position:nodeCollapse",a.position,y,!0);if(this.add(a,"scale",a.scale,.01,!0),E=this.vc,E.contains(a)&&(E.I(a).nv=!0),a instanceof $i)for(a=a.memberParts;a.next();)E=a.value,E instanceof Un&&this.Aj(E,y)}},Pt.Ez=function(a){var y=this.Tt.get(a);return y===null&&(y={},this.Tt.add(a,y)),y},ge.Object.defineProperties(Aa.prototype,{duration:{get:function(){return this.Dg},set:function(a){1>a&&Mn(a,">= 1",Aa,"duration"),this.Dg=a}},reversible:{get:function(){return this.ho},set:function(a){this.ho=a}},runCount:{get:function(){return this.cu},set:function(a){0<a?this.cu=a:Gt("Animation.runCount value must be a positive integer.")}},finished:{get:function(){return this.dn},set:function(a){this.dn!==a&&(this.dn=a)}},easing:{get:function(){return this.ot},set:function(a){this.ot=a}},isViewportUnconstrained:{get:function(){return this.j},set:function(a){this.j=a}},isAnimating:{get:function(){return this.bc}}}),Aa.prototype.getTemporaryState=Aa.prototype.Ez,Aa.prototype.stop=Aa.prototype.stop,Aa.prototype.add=Aa.prototype.add,Aa.prototype.addTemporaryPart=Aa.prototype.Iy;function Dd(a,y,x,E){return a/=E/2,1>a?x/2*a*a+y:-x/2*(--a*(a-2)-1)+y}function Kp(a,y,x,E){return a===E?y+x:x*(-Math.pow(2,-10*a/E)+1)+y}Aa.className="Animation",Aa.EaseLinear=function(a,y,x,E){return x*a/E+y},Aa.EaseInOutQuad=Dd,Aa.EaseInQuad=function(a,y,x,E){return x*(a/=E)*a+y},Aa.EaseOutQuad=function(a,y,x,E){return-x*(a/=E)*(a-2)+y},Aa.EaseInExpo=function(a,y,x,E){return a===0?y:x*Math.pow(2,10*(a/E-1))+y},Aa.EaseOutExpo=Kp;function Xh(a,y,x){this.start=a,this.end=y,this.Ku={},this.Hu=x,this.nv=!1}Xh.className="AnimationState";function Al(a,y,x){this.xd=null,this.rf=a,this.so=x||fg,this.uk=null,y!==void 0&&(this.uk=y,x===void 0&&(this.so=Jh))}Al.prototype.copy=function(){var a=new Al(this.rf);a.so=this.so;var y=this.uk;if(y!==null){var x={};y.duration!==void 0&&(x.duration=y.duration),y.finished!==void 0&&(x.finished=y.finished),y.easing!==void 0&&(x.easing=y.easing),a.uk=x}return a};function Zp(a,y){a=a.uk,a!==null&&(a.duration&&(y.duration=a.duration),a.finished&&(y.finished=a.finished),a.easing&&(y.easing=a.easing))}ge.Object.defineProperties(Al.prototype,{propertyName:{get:function(){return this.rf},set:function(a){this.rf=a}},animationSettings:{get:function(){return this.uk},set:function(a){this.uk=a}},startCondition:{get:function(){return this.so},set:function(a){this.so=a}}});var fg=new Ue(Al,"Default",1),Jh=new Ue(Al,"Immediate",2),Bd=new Ue(Al,"Bundled",3);Al.className="AnimationTrigger",Al.Default=fg,Al.Immediate=Jh,Al.Bundled=Bd;function ga(a){xi(this),this.H=null,this.Pa=new Xe,this.xa="",this.pb=1,this.o=!1,this.j=this.Uh=this.u=this.Oi=this.Ni=this.Mi=this.Li=this.Ji=this.Ki=this.Ii=this.Qi=this.Hi=this.Pi=this.Gi=this.Fi=!0,this.Zq=[],a&&Object.assign(this,a)}Pt=ga.prototype,Pt.clear=function(){for(var a=this.Pa,y=0;y<a.length;y++){var x=a.s[y];x.Ig=null,za(x)}a.clear(),this.Zq.length=0},Pt.Xe=function(a){this.H=a},Pt.toString=function(a){a===void 0&&(a=0);var y='Layer "'+this.name+'"';if(0>=a)return y;for(var x=0,E=0,b=0,z=0,tt=0,rt=this.Pa.iterator;rt.next();){var ot=rt.value;ot instanceof $i?b++:ot instanceof Un?E++:ot instanceof En?z++:ot instanceof Rr?tt++:x++}if(rt="",0<x&&(rt+=x+" Parts "),0<E&&(rt+=E+" Nodes "),0<b&&(rt+=b+" Groups "),0<z&&(rt+=z+" Links "),0<tt&&(rt+=tt+" Adornments "),1<a)for(a=this.Pa.iterator;a.next();)x=a.value,rt+=`
|
|
`+x.toString(),E=x.data,E!==null&&fr(E)&&(rt+=" #"+fr(E)),x instanceof Un?rt+=" "+Ni(E):x instanceof En&&(rt+=" "+Ni(x.fromNode)+" "+Ni(x.toNode));return y+" "+this.Pa.count+": "+rt},Pt.ic=function(a,y,x){if(y===void 0&&(y=null),x===void 0&&(x=null),this.Uh===!1)return null;var E=!1;this.diagram!==null&&this.diagram.viewportBounds.ca(a)&&(E=!0);for(var b=At.alloc(),z=this.Pa.s,tt=z.length;tt--;){var rt=z[tt];if((E!==!0||od(rt)!==!1)&&rt.isVisible()&&(b.assign(a),Ln(b,rt.oe),rt=rt.ic(b,y,x),rt!==null&&(y!==null&&(rt=y(rt)),rt!==null&&(x===null||x(rt)))))return At.free(b),rt}return At.free(b),null},Pt.ji=function(a,y,x,E){if(y===void 0&&(y=null),x===void 0&&(x=null),E instanceof Xe||E instanceof qe||(E=new qe),this.Uh===!1)return E;var b=!1;this.diagram!==null&&this.diagram.viewportBounds.ca(a)&&(b=!0);for(var z=At.alloc(),tt=this.Pa.s,rt=tt.length;rt--;){var ot=tt[rt];if((b!==!0||od(ot)!==!1)&&ot.isVisible()){z.assign(a),Ln(z,ot.oe);var st=ot;ot.ji(z,y,x,E)&&(y!==null&&(st=y(st)),st===null||x!==null&&!x(st)||E.add(st))}}return At.free(z),E},Pt.Cf=function(a,y,x,E,b){if(y===void 0&&(y=null),x===void 0&&(x=null),E===void 0&&(E=!1),b instanceof Xe||b instanceof qe||(b=new qe),this.Uh===!1)return b;var z=!1;this.diagram!==null&&this.diagram.viewportBounds.Re(a)&&(z=!0);for(var tt=this.Pa.s,rt=tt.length;rt--;){var ot=tt[rt];if((z!==!0||od(ot)!==!1)&&ot.isVisible()){var st=ot;ot.Cf(a,y,x,E,b)&&(y!==null&&(st=y(st)),st===null||x!==null&&!x(st)||b.add(st))}}return b},Pt.Nu=function(a,y,x,E,b,z,tt){if(this.Uh===!1)return b;for(var rt=this.Pa.s,ot=rt.length;ot--;){var st=rt[ot];if((tt!==!0||od(st)!==!1)&&z(st)&&st.isVisible()){var ut=st;st.Cf(a,y,x,E,b)&&(y!==null&&(ut=y(ut)),ut===null||x!==null&&!x(ut)||b.add(ut))}}return b},Pt.og=function(a,y,x,E,b,z){if(x===void 0&&(x=null),E===void 0&&(E=null),b===void 0&&(b=!0),b!==!1&&b!==!0&&((b instanceof Xe||b instanceof qe)&&(z=b),b=!0),z instanceof Xe||z instanceof qe||(z=new qe),this.Uh===!1)return z;var tt=!1;this.diagram!==null&&this.diagram.viewportBounds.ca(a)&&(tt=!0);for(var rt=At.alloc(),ot=At.alloc(),st=this.Pa.s,ut=st.length;ut--;){var ft=st[ut];if((tt!==!0||od(ft)!==!1)&&ft.isVisible()){rt.assign(a),Ln(rt,ft.oe),ot.h(a.x+y,a.y),Ln(ot,ft.oe);var mt=ft;ft.og(rt,ot,x,E,b,z)&&(x!==null&&(mt=x(mt)),mt===null||E!==null&&!E(mt)||z.add(mt))}}return At.free(rt),At.free(ot),z},Pt.Fd=function(a,y){if(this.visible){var x=this.Pa.s,E=x.length;if(E!==0){a=On();for(var b=On(),z=0;z<E;z++){var tt=x[z];if(tt.vw=z,tt instanceof En){if(tt.fd===!1)continue}else if(tt instanceof Rr&&tt.adornedPart!==null)continue;var rt=tt.actualBounds;tt.isVisible()&&Yr(rt,y)?(tt.Fd(!0),a.push(tt)):(tt.Fd(!1),tt.adornments!==null&&0<tt.adornments.count&&b.push(tt))}for(y=0;y<a.length;y++)for(x=a[y],Ov(x),x=x.adornments;x.next();)E=x.value,E.measure(1/0,1/0),E.arrange(),E.Fd(!0);for(y=0;y<b.length;y++)Ov(b[y]);Qn(a),Qn(b)}}};function Vu(a,y){var x=1;return a.pb!==1&&(x=y.globalAlpha,y.globalAlpha=x*a.pb),x}Pt.gc=function(a,y,x){if(this.visible&&this.pb!==0&&(x===void 0&&(x=!0),x||!this.isTemporary)){x=this.Pa.s;var E=x.length;if(E!==0){if(a.isTemporary)for(var b=0;b<E;b++)x[b].Gj();b=Vu(this,a);var z=this.Zq;z.length=0;for(var tt=y.scale,rt=Ee.alloc(),ot=0;ot<E;ot++)this.Oj(a,x[ot],y,z,tt,rt,!0);if(Ee.free(rt),a.isTemporary)for(y=0;y<E;y++)x[y].Gj();a.globalAlpha=b}}};function Wp(a,y,x,E,b){if(a.visible&&a.pb!==0&&(b||!a.isTemporary)){b=a.Pa.s;var z=b.length;if(z!==0){var tt=Vu(a,y),rt=a.Zq;rt.length=0;for(var ot=x.scale,st=Ee.alloc(),ut=0;ut<z;ut++){var ft=b[ut];E.contains(ft)&&a.Oj(y,ft,x,rt,ot,st,!1)}Ee.free(st),y.globalAlpha=tt}}}Pt.Oj=function(a,y,x,E,b,z,tt){if(tt&&!od(y))a.Hs(y);else{if(E!==null&&y instanceof En&&(y.isOrthogonal&&E.push(y),y.fd===!1)){a.Hs(y);return}for(tt=!1,E=y.containingGroup;E!==null;)tt?E.tb!==null&&z.Ex(E.tb):E.tb!==null&&(tt=!0,z.assign(E.tb)),E=E.containingGroup;var rt=y.actualBounds;if(E=!1,tt&&y.isVisible()){if(!z.Yc(rt)){a.Hs(y);return}E=!z.Re(rt)}E&&(a.save(),a instanceof Ts?a.bk=z.copy():(a.beginPath(),a.rect(z.x,z.y,z.width,z.height),a.clip())),rt.width*b>x.Oq||rt.height*b>x.Oq?y.gc(a,x):(b=y.actualBounds,z=y.naturalBounds,b.width===0||b.height===0||isNaN(b.x)||isNaN(b.y)||!y.isVisible()||(x=y.transform,y.areaBackground!==null&&(Mo(y,a,y.areaBackground,!0,!0,z,b),a.fillRect(b.x,b.y,b.width,b.height)),y.areaBackground===null&&y.background===null&&(Mo(y,a,"rgba(0,0,0,0.3)",!0,!1,z,b),a.fillRect(b.x,b.y,b.width,b.height)),y.background!==null&&(a.transform(x.m11,x.m12,x.m21,x.m22,x.dx,x.dy),Mo(y,a,y.background,!0,!1,z,b),a.fillRect(0,0,z.width/2,z.height/2),x.ws()||(y=1/(x.m11*x.m22-x.m12*x.m21),a.transform(x.m22*y,-x.m12*y,-x.m21*y,x.m11*y,y*(x.m21*x.dy-x.m22*x.dx),y*(x.m12*x.dx-x.m11*x.dy)))))),E&&(a.restore(),a.Vc(!0))}},Pt.g=function(a,y,x,E,b){var z=this.diagram;z!==null&&z.cb(no,a,this,y,x,E,b)},Pt.oi=function(a,y,x){var E=this.Pa;if(y.Ig=this,this===null&&za(y),a>=E.count)a=E.count;else if(E.M(a)===y)return-1;return E.Gb(a,y),y.Vo(x),E=this.diagram,E!==null&&(x?E.N():E.oi(y)),lf(this,a,y),a},Pt.pc=function(a,y,x){if(!x&&y.layer!==this&&y.layer!==null)return y.layer.pc(a,y,x);var E=this.Pa;if(0>a||a>=E.length){if(a=E.indexOf(y),0>a)return-1}else if(E.M(a)!==y&&(a=E.indexOf(y),0>a))return-1;return y.Wo(x),E.mb(a),E=this.diagram,E!==null&&(x?E.N():E.pc(y)),y.Ig=null,za(y),a};function lf(a,y,x){if(y=Vp(a,y,x),x instanceof $i&&x!==null&&isNaN(x.zOrder)){if(x.memberParts.count!==0){for(var E=-1,b=a.Pa.s,z=b.length,tt=0;tt<z;tt++){var rt=b[tt];if(rt===x&&(y=tt,0<=E)||0>E&&rt.containingGroup===x&&(E=tt,0<=y))break}!(0>E)&&E<y&&(b=a.Pa,b.mb(y),b.Gb(E,x))}y=x.containingGroup,y!==null&&lf(a,-1,y)}x.svg!==null&&x.svg.remove()}function Vp(a,y,x){var E=x.zOrder;if(isNaN(E))return y;a=a.Pa;var b=a.count;if(1>=b)return y;if(0>y&&(y=a.indexOf(x)),0>y)return-1;for(var z=y-1,tt=NaN;0<=z&&(tt=a.M(z).zOrder,!!isNaN(tt));)z--;for(var rt=y+1,ot=NaN;rt<b&&(ot=a.M(rt).zOrder,!!isNaN(ot));)rt++;if(!isNaN(tt)&&tt>E)for(;;){if(z===-1||tt<=E){if(z++,z===y)break;return a.mb(y),a.Gb(z,x),z}for(tt=NaN;0<=--z&&(tt=a.M(z).zOrder,isNaN(tt)););}else if(!isNaN(ot)&&ot<E)for(;;){if(rt===b||ot>=E){if(rt--,rt===y)break;return a.mb(y),a.Gb(rt,x),rt}for(ot=NaN;++rt<b&&(ot=a.M(rt).zOrder,isNaN(ot)););}return y}ge.Object.defineProperties(ga.prototype,{parts:{get:function(){return this.Pa.iterator}},partsBackwards:{get:function(){return this.Pa.iteratorBackwards}},diagram:{get:function(){return this.H}},name:{get:function(){return this.xa},set:function(a){var y=this.xa;if(y!==a){var x=this.diagram;if(x!==null)for(y===""&&Gt("Cannot rename default Layer to: "+a),x=x.layers;x.next();)x.value.name===a&&Gt("Layer.name is already present in this diagram: "+a);for(this.xa=a,this.g("name",y,a),a=this.Pa.iterator;a.next();)a.value.layerName=this.xa}}},opacity:{get:function(){return this.pb},set:function(a){var y=this.pb;y!==a&&((0>a||1<a)&&Mn(a,"0 <= value <= 1",ga,"opacity"),this.pb=a,this.g("opacity",y,a),a=this.diagram,a!==null&&a.N())}},isTemporary:{get:function(){return this.o},set:function(a){var y=this.o;y!==a&&((this.o=a)&&(this.isInDocumentBounds=!1),this.g("isTemporary",y,a))}},visible:{get:function(){return this.u},set:function(a){var y=this.u;if(y!==a){for(this.u=a,this.g("visible",y,a),y=this.Pa.iterator;y.next();)y.value.Zb(a);a=this.diagram,a!==null&&a.N()}}},pickable:{get:function(){return this.Uh},set:function(a){var y=this.Uh;y!==a&&(this.Uh=a,this.g("pickable",y,a))}},isInDocumentBounds:{get:function(){return this.j},set:function(a){this.j!==a&&(this.j=a,this.diagram!==null&&this.diagram.Ya())}},allowCopy:{get:function(){return this.Fi},set:function(a){var y=this.Fi;y!==a&&(this.Fi=a,this.g("allowCopy",y,a))}},allowDelete:{get:function(){return this.Gi},set:function(a){var y=this.Gi;y!==a&&(this.Gi=a,this.g("allowDelete",y,a))}},allowTextEdit:{get:function(){return this.Pi},set:function(a){var y=this.Pi;y!==a&&(this.Pi=a,this.g("allowTextEdit",y,a))}},allowGroup:{get:function(){return this.Hi},set:function(a){var y=this.Hi;y!==a&&(this.Hi=a,this.g("allowGroup",y,a))}},allowUngroup:{get:function(){return this.Qi},set:function(a){var y=this.Qi;y!==a&&(this.Qi=a,this.g("allowUngroup",y,a))}},allowLink:{get:function(){return this.Ii},set:function(a){var y=this.Ii;y!==a&&(this.Ii=a,this.g("allowLink",y,a))}},allowRelink:{get:function(){return this.Ki},set:function(a){var y=this.Ki;y!==a&&(this.Ki=a,this.g("allowRelink",y,a))}},allowMove:{get:function(){return this.Ji},set:function(a){var y=this.Ji;y!==a&&(this.Ji=a,this.g("allowMove",y,a))}},allowReshape:{get:function(){return this.Li},set:function(a){var y=this.Li;y!==a&&(this.Li=a,this.g("allowReshape",y,a))}},allowResize:{get:function(){return this.Mi},set:function(a){var y=this.Mi;y!==a&&(this.Mi=a,this.g("allowResize",y,a))}},allowRotate:{get:function(){return this.Ni},set:function(a){var y=this.Ni;y!==a&&(this.Ni=a,this.g("allowRotate",y,a))}},allowSelect:{get:function(){return this.Oi},set:function(a){var y=this.Oi;y!==a&&(this.Oi=a,this.g("allowSelect",y,a))}}}),ga.prototype.findObjectsNear=ga.prototype.og,ga.prototype.findObjectsIn=ga.prototype.Cf,ga.prototype.findObjectsAt=ga.prototype.ji,ga.prototype.findObjectAt=ga.prototype.ic,ga.className="Layer";function Le(a,y){if(om||(Ra(),om=!0),xi(this),Eu=this,this.vb=!0,this.Ka=null,this.ya=this.Aa=0,this.ta=null,Lo){var x=this,E=function(){x.removeEventListener(ln.document,"DOMContentLoaded",E,!1),x.setRTL()};ln.document.body!==null?this.setRTL():x.addEventListener(ln.document,"DOMContentLoaded",E,!1)}this.ol=null,Sf.add("Model",Vr);var b=this;return this.Hb=function(z){var tt=b.partManager;if(z.model===tt.diagram.model&&tt.diagram.aa){tt.diagram.aa=!1;try{var rt=z.change;z.modelChange===""&&rt===no&&tt.updateDataBindings(z.object,z.propertyName)}finally{tt.diagram.aa=!0}}},this.Oc=function(z){b.partManager.doModelChanged(z)},this.hu=this.ku=null,Up(this),this.model=hy(),this.Wg=!0,Xp(this),this.layout=new mo,this.Wg=!1,this.ck=this.ek=this.fk=this.dk=this.ui=this.aA=this.$j=this.Ov=null,this.hk=function(){},this.preventDefault=null,this.rn=!1,this.Yf=new am,a!==void 0&&(typeof a=="string"||ln.Element&&a instanceof Element?pg(this,a):y=a),this.vb=!1,y&&this.nm(y),this}var _h,Eu;function Up(a){a.Yd=new Bs,a.Yd.Xe(a),a.Db=17,a.Gw=!1,a.tn=!1,a.bu="default",a.Wa=new Xe,a.pj=new Me,a.nl="default",a.Tx(),a.Sx(),a.pb=1,a.pa=new At(NaN,NaN).freeze(),a.du=new At(NaN,NaN),a.Ca=1,a.Pp=1,a.zt=new At(NaN,NaN).freeze(),a.At=NaN,a.Ot=1e-4,a.Mt=100,a.Ab=new Ii,a.zu=new At(NaN,NaN).freeze(),a.ut=new Ee(NaN,NaN,NaN,NaN).freeze(),a.rj=new Ji(0,0,0,0).freeze(),a.sj=vh,a.nu=!1,a.Zt=null,a.fu=null,a.yh=Va,a.zk=Bo,a.Fg=Va,a.pq=Bo,a.yt=Sr,a.Bt=Sr,a.Fc=!0,a.pn=!1,a.De=new qe,a.Eh=new Me,a.Xm=!0,a.vp=250,a.vk=-1,a.xp=new Ji(16,16,16,16).freeze(),a.kg=!1,a.Jk=!1,a.fn=!0,a.bq=new ia,a.bq.diagram=a,a.Qg=new ia,a.Qg.diagram=a,a.cj=new ia,a.cj.diagram=a,a.zg=null,a.pf=null,a.qu=!1,ev(a),a.ai=new qe,a.Ht=!0,a.uu=yh,a.pw=!1,a.wu=kc,a.it="auto",a.Op="auto",a.zh=null,a.Fh=null,a.Bh=null,a.Qh=null,a.Oh=null,a.Nh=null,a.Qt=null,a.Lh=null,a.xt=!1,a.Mh=null,a.Ph=null,a.$h=null,a.Ch=null,a.Rt=!1,a.Yt={},a.oj=[null,null],a.Wg=!1,a.Iw=!1,a.ou=!1,a.lt=!1,a.rw=!0,a.ld=!1,a.$i=!1,a.Tw=!0,a.Ce=-2,a.Og=new Me,a.Xn=new Xe,a.Gg=!1,a.Jd=!0,a.Us=!0,a.Fi=!0,a.Gi=!0,a.Vs=!1,a.Ws=!0,a.Pi=!0,a.Hi=!0,a.Qi=!0,a.Ys=!0,a.Ii=!0,a.Ki=!0,a.Ji=!0,a.Li=!0,a.Mi=!0,a.Ni=!0,a.Oi=!0,a.Zs=!0,a.at=!0,a.qw=!1,a.Vk=!1,a.mn=!0,a.nn=!0,a.Xs=!0,a.$s=!0,a.iu=16,a.mu=16,a.qr=!1,a.gu=!1,a.lu=0,a.ju=0,a.yb=new Ji(5).freeze(),a.Hw=new qe().freeze(),a.Nt=999999999,a.nw=new qe().freeze(),a.Zi=!0,a.Ee=!0,a.vd=!0,a.Be=!1,a.gf=!1,a.xh=!0,a.hf=!1,a.sy=new qe,a.ow=new qe,a.Xh=null,a.aw=new Ke(8,8),a.bw=999,a.Bw=1,a.Jw=0,a.fc={scale:1,position:new At,bounds:new Ee,Py:new Ke,bA:new Ke,Oz:!1},a.fc.canvasSize=a.fc.Py,a.fc.newCanvasSize=a.fc.bA,a.fc.isScroll=!1,a.Rw=new Ee(NaN,NaN,NaN,NaN).freeze(),a.wo=new Ke(NaN,NaN).freeze(),a.Sp=new Ee(NaN,NaN,NaN,NaN).freeze(),a.It=!1,a.Lg=new Me;var y=new Un,x=new io;x.bind(new Ko("text","",Ni)),y.add(x),a.ny=y,a.Lg.add("",y),y=new Un,x=new io,x.stroke="brown",x.bind(new Ko("text","",Ni)),y.add(x),a.Lg.add("Comment",y),y=new Un,y.selectable=!1,y.avoidable=!1,x=new lr,x.figure="Ellipse",x.fill="black",x.stroke=null,x.desiredSize=new Ke(3,3).ja(),y.add(x),a.Lg.add("LinkLabel",y),a.Yi=new Me,y=new $i,y.selectionObjectName="GROUPPANEL",y.type=mn.Vertical,x=new io,x.font="bold 12pt sans-serif",x.bind(new Ko("text","",Ni)),y.add(x),x=new mn(mn.Auto),x.name="GROUPPANEL";var E=new lr;E.figure="Rectangle",E.fill="rgba(128,128,128,0.2)",E.stroke="black",x.add(E),E=new rs,E.padding=new Ji(5,5,5,5).ja(),x.add(E),y.add(x),a.ly=y,a.Yi.add("",y),a.Kh=new Me,y=new En,x=new lr,x.isPanelMain=!0,y.add(x),x=new lr,x.toArrow="Standard",x.fill="black",x.stroke=null,x.strokeWidth=0,y.add(x),a.my=y,a.Kh.add("",y),y=new En,x=new lr,x.isPanelMain=!0,x.stroke="brown",y.add(x),a.Kh.add("Comment",y),y=new Rr,y.type=mn.Auto,x=new lr,x.fill=null,x.stroke="dodgerblue",x.strokeWidth=3,y.add(x),x=new rs,x.margin=new Ji(1.5,1.5,1.5,1.5).ja(),y.add(x),a.St=y,a.wt=y,y=new Rr,y.type=mn.Link,x=new lr,x.isPanelMain=!0,x.fill=null,x.stroke="dodgerblue",x.strokeWidth=3,y.add(x),a.Kt=y,a.fe=null,a.mq=!1,a.Ck=null,a.partManager=new Vr,a.toolManager=new qr,a.toolManager.initializeStandardTools(),a.defaultTool=a.toolManager,a.currentTool=a.defaultTool,a.nt=null,a.Wm=new at,a.Vt=null,a.Wt=null,a.Mr=!1,a.commandHandler=Yp(),a.eq=null,a.fq=ti,a.Pw=!1,a.Mb=1,a.Yh=null,a.Oq=1,a.Sq=0,a.zw=[0,0,0,0,0],a.Tq=0,a.yq=1,a.tw=0,a.uw=new At,a.zy=500,a.wp=new At,a.wq=!1}Le.prototype.clear=function(){this.animationManager.Cc(),this.model.clear(),Gd=null,ed="",gg(this,!1),this.Xn.clear(),Df(),this.Og.clear(),this.Xh=null,this.Ya(),this.Va(),this.N()};function gg(a,y){a.animationManager.Cc(!0),a.Hw=new qe().freeze(),a.nw=new qe().freeze();var x=a.skipsUndoManager,E=a.cc!==null&&a.cc!==void 0;E&&(a.skipsUndoManager=!0);var b=null;a.fe!==null&&(b=a.fe.part,b!==null&&a.remove(b));var z=[],tt=a.Wa.length;if(y){for(y=0;y<tt;y++)for(var rt=a.Wa.s[y].parts;rt.next();){var ot=rt.value;ot!==b&&ot.data===null&&z.push(ot)}for(y=0;y<z.length;y++)a.remove(z[y])}for(y=0;y<tt;y++)a.Wa.s[y].clear();return a.partManager.clear(),a.De.clear(),a.Eh.clear(),a.ai.clear(),a.Ck=null,a.Xn.clear(),Df(),a.Og.clear(),br=[],b!==null&&(a.add(b),a.partManager.parts.remove(b)),E&&(a.skipsUndoManager=x),z}function Yp(){return null}Le.prototype.reset=function(){this.clear(),this.vb=!0,Up(this),fu(this),this.Wg=!0,Xp(this),this.layout=new mo,this.Wg=!1,this.model=hy(),this.model.undoManager=new uo,this.vb=this.rn=!1,this.N()},Le.prototype.setRTL=function(a){a=a===void 0?this.div:a,a===null&&(a=ln.document.body);var y=Ri("div");y.dir="rtl",y.style.cssText="font-size: 14px; width: 1px; height: 1px; position: absolute; top: -1000px; overflow: scroll;",y.textContent="A",a.appendChild(y);var x="reverse";0<y.scrollLeft?x="default":(y.scrollLeft=1,y.scrollLeft===0&&(x="negative")),a.removeChild(y),this.bu=x},Le.prototype.setScrollWidth=function(a){a=a===void 0?this.div:a,a===null&&(a=ln.document.body);var y=0;if(Lo){var x=rm;y=_h,x===null&&(x=rm=Ri("p"),x.style.width="100%",x.style.height="200px",x.style.boxSizing="content-box",y=_h=Ri("div"),y.style.position="absolute",y.style.visibility="hidden",y.style.width="200px",y.style.height="150px",y.style.boxSizing="content-box",y.appendChild(x)),y.style.overflow="hidden",a.appendChild(y);var E=x.offsetWidth;y.style.overflow="scroll",x=x.offsetWidth,E===x&&(x=y.clientWidth),a.removeChild(y),y=E-x,y!==0||dr||(y=11)}this.Db=y,this.Gw=!0},Le.prototype.qb=function(a){a.classType===Le&&(this.autoScale=a)},Le.prototype.toString=function(a){a===void 0&&(a=0);var y="";if(this.div&&this.div.id&&(y=this.div.id),y='Diagram "'+y+'"',0>=a)return y;for(var x=this.Wa.iterator;x.next();)y+=`
|
|
`+x.value.toString(a-1);return y};function pg(a,y){if(Lo){if(y!=null||Gt("Diagram setup requires an argument DIV."),a.Ka!==null&&Gt("Diagram has already completed setup."),typeof y=="string"?a.Ka=ln.document.getElementById(y):y instanceof HTMLDivElement?a.Ka=y:Gt("No DIV or DIV id supplied: "+y),a.Ka===null&&Gt("Invalid DIV id; could not get element with id: "+y),a.Ka.H!==void 0&&Gt("Invalid div id; div already has a Diagram associated with it."),!a.ol&&ln.ResizeObserver){var x=ii(function(){a.$b()},250);a.ol=new ln.ResizeObserver(function(){x()}),a.ol.observe(a.Ka)}ln.getComputedStyle(a.Ka,null).position==="static"&&(a.Ka.style.position="relative"),y=5;var E="rgba(2"+y+"5, 255, 255, 0)";y--,a.Ka.style["-webkit-tap-highlight-color"]=E,a.Ka.innerHTML="",a.Ka.H=a,a.Ka.goDiagram=a,a.Ka.go=ln.go;var b=new yl(a);if(b.style!==void 0&&(b.style.position="absolute",b.style.top="0px",b.style.left="0px",ln.getComputedStyle(a.Ka,null).getPropertyValue("direction")==="rtl"&&(a.tn=!0),b.style.zIndex="2",b.style.userSelect="none",b.style.MozUserSelect="none",b.style.touchAction="none",b.style.letterSpacing="normal !important",b.style.wordSpacing="normal !important"),a.ta=b,a.ib=b.context,E=a.ib,a.Mb=a.computePixelRatio(),a.viewSize.w()||(a.Aa=a.Ka.clientWidth||1,a.ya=a.Ka.clientHeight||1),Cg(a,a.Aa,a.ya),a.Ka.insertBefore(b.Oa,a.Ka.firstChild),b=new yl(null),b.width=1,b.height=1,a.jw=b,a.oy=b.context,Lo){b=Ri("div");var z=Ri("div");b.style.position="absolute",b.style.overflow="auto",b.style.width=a.Aa+"px",b.style.height=a.ya+"px",b.style.zIndex="1",z.style.position="absolute",z.style.width="1px",z.style.height="1px",a.Ka.appendChild(b),b.appendChild(z),b.onscroll=_p,b.addEventListener("pointerdown",Qp),b.H=a,b.uy=!0,b.vy=!0,a.ku=b,a.hu=z}a.hk=ii(function(){a.Yh=null,a.N()},300),a.Ov=ii(function(){mg(a)},250),a.preventDefault=function(tt){return tt.preventDefault(),!1},a.$j=function(tt){if(a.isEnabled){var rt=tl(a,tt,!0);rt.bubbles=!0;var ot=0,st=0;rt.delta=0,tt.deltaX!==void 0?(tt.deltaX!==0&&(ot=0<tt.deltaX?1:-1),tt.deltaY!==0&&(st=0<tt.deltaY?1:-1),rt.delta=Math.abs(tt.deltaX)>Math.abs(tt.deltaY)?-ot:-st):tt.wheelDeltaX!==void 0?(tt.wheelDeltaX!==0&&(ot=0<tt.wheelDeltaX?-1:1),tt.wheelDeltaY!==0&&(st=0<tt.wheelDeltaY?-1:1),rt.delta=Math.abs(tt.wheelDeltaX)>Math.abs(tt.wheelDeltaY)?-ot:-st):tt.wheelDelta!==void 0&&tt.wheelDelta!==0&&(rt.delta=0<tt.wheelDelta?1:-1),a.doMouseWheel(),Nl(rt,tt)}},a.aA=function(tt){a.isEnabled&&(a.Vk=!1,tl(a,tt,!0),tt=a.currentTool,tt.cancelWaitAfter(),tt.standardMouseOver())},a.ui=function(tt){if(a.isEnabled){a.Vk=!0;var rt=a.Yt;rt[tt.pointerId]===void 0&&(rt[tt.pointerId]=tt),rt=a.oj;var ot=!1;if(rt[0]===null||rt[0].pointerId!==tt.pointerId&&rt[0].pointerType===tt.pointerType)if(rt[1]!==null&&rt[1].pointerId===tt.pointerId)rt[1]=tt,ot=!0;else if(rt[0]===null)rt[0]=tt;else if(rt[1]===null)rt[1]=tt,ot=!0;else{tt.preventDefault();return}else rt[0]=tt;(rt=tt.pointerType==="touch"||tt.pointerType==="pen")&&(a.qu=!1,a.wq=!0);var st=ot;ot=xg(a,tt,!0,!1,!0,st),Od(a,tt,ot),ot.targetDiagram=Sg(tt,tt.target),ot.targetObject=null,st||ot.clone(a.bq),st=a.uw,rt=rt?25:10,tt.timeStamp-a.tw<a.zy&&!(Math.abs(st.x-tt.screenX)>rt||Math.abs(st.y-tt.screenY)>rt)?a.yq++:a.yq=1,ot.clickCount=a.yq,a.tw=tt.timeStamp,a.uw.sg(tt.screenX,tt.screenY),a.doMouseDown(),tt.button===1?tt.preventDefault():Nl(ot,tt)}},a.dk=function(tt){if(a.isEnabled){a.Vk=!0;var rt=a.oj;if(rt[0]===null||rt[0].pointerId!==tt.pointerId&&rt[0].pointerType===tt.pointerType){if(rt[1]!==null&&rt[1].pointerId===tt.pointerId){rt[1]=tt;return}if(rt[0]===null)rt[0]=tt;else return}else rt[0]=tt;if(rt[0].pointerId===tt.pointerId){rt=xg(a,tt,!1,!1,!1,rt[1]!==null);var ot=ln.document.elementFromPoint(tt.clientX,tt.clientY)||null;ot!==null&&ot.shadowRoot!==void 0&&ot.shadowRoot!==null&&(ot=ot.shadowRoot.elementFromPoint(tt.clientX,tt.clientY));var st=a,ut=tt;ot&&ot.H&&(ut=tt,st=ot.H),rt.targetDiagram=st,Od(a,ut,rt),rt.targetObject=null,a.doMouseMove(),Nl(rt,tt)}}},a.fk=function(tt){if(a.isEnabled){a.Vk=!0;var rt=tt.pointerType==="touch"||tt.pointerType==="pen",ot=a.Yt;if(rt&&a.qu)delete ot[tt.pointerId],tt.preventDefault();else if(ot=a.oj,ot[0]===null||ot[0].pointerId!==tt.pointerId&&ot[0].pointerType===tt.pointerType)ot[1]!==null&&ot[1].pointerId===tt.pointerId&&(ot[1]=null);else{ot[0]=null,ot=xg(a,tt,!1,!0,!0,!1);var st=ln.document.elementFromPoint(tt.clientX,tt.clientY)||null;st!==null&&st.shadowRoot!==void 0&&st.shadowRoot!==null&&(st=st.shadowRoot.elementFromPoint(tt.clientX,tt.clientY)),st!==null&&st.H instanceof Le&&st.H!==a&&Od(st.H,tt,ot),st===null&&(st=tt.target),Od(a,tt,ot),ot.clickCount=a.yq,ot.targetDiagram=Sg(tt,st),ot.targetObject=null,a.doMouseUp(),Nl(ot,tt),rt&&(a.wq=!1)}}},a.ek=function(tt){if(a.isEnabled){a.Vk=!1;var rt=a.Yt;rt[tt.pointerId]&&delete rt[tt.pointerId],rt=a.oj,rt[0]!==null&&rt[0].pointerId===tt.pointerId&&(rt[0]=null),rt[1]!==null&&rt[1].pointerId===tt.pointerId&&(rt[1]=null),tt.pointerType!=="touch"&&tt.pointerType!=="pen"&&(tt=a.currentTool,tt.cancelWaitAfter(),tt.standardMouseOver())}},a.ck=function(tt){var rt=a.oj;rt[0]!==null&&rt[0].pointerId===tt.pointerId?(rt[0]=null,a.wq=!1):rt[1]!==null&&rt[1].pointerId===tt.pointerId&&(rt[1]=null)},a.Vp=E.Z["d"+Mc[1]+Mc[2]+"wI"+Kd.slice(1,5)]["b"+Dx.slice(1,y)](E.Z,bc,y,y),E.Vc(!0),tv(a),a.nl==="svg"&&(y=a.pj.get("svg"),a.Ka.appendChild(y.Oa),a.ib=y.context)}}Le.prototype.addEventListener=function(a,y,x,E){a.addEventListener(y,x,{capture:E,passive:!1})},Le.prototype.removeEventListener=function(a,y,x,E){a.removeEventListener(y,x,{capture:E})};function tv(a){var y=a.ta.Oa;y instanceof HTMLCanvasElement||(y=a.div),a.addEventListener(y,"pointerdown",a.ui,!1),a.addEventListener(y,"pointermove",a.dk,!1),a.addEventListener(y,"pointerup",a.fk,!1),a.addEventListener(y,"pointerout",a.ek,!1),a.addEventListener(y,"pointercancel",a.ck,!1),a.addEventListener(y,"pointerenter",a.bz,!1),a.addEventListener(y,"pointerleave",a.cz,!1),a.addEventListener(y,"wheel",a.$j,!1),a.addEventListener(y,"keydown",a.Qz,!1),a.addEventListener(y,"keyup",a.Rz,!1),a.addEventListener(y,"blur",a.Ny,!1),a.addEventListener(y,"focus",a.Oy,!1),a.addEventListener(y,"selectstart",function(x){return x.preventDefault(),!1},!1),a.addEventListener(y,"contextmenu",function(x){return x.preventDefault(),!1},!1),a.addEventListener(ln,"resize",a.Ov,!1)}function gs(a){30<a.Sq&&(a.Yh=1)}function xc(a,y){a.Yh!==null&&(a.Yh=null,y&&a.hk(),Fi&&Fi.nx||(a.Sq=0,a.zw=[0,0,0,0,0],a.Tq=0))}Le.prototype.computePixelRatio=function(){return this.Yh!==null?this.Yh:ln.devicePixelRatio||1},Le.prototype.doMouseMove=function(){this.currentTool.doMouseMove()},Le.prototype.doMouseDown=function(){this.currentTool.doMouseDown()},Le.prototype.doMouseUp=function(){this.currentTool.doMouseUp()},Le.prototype.doMouseWheel=function(){this.currentTool.doMouseWheel()},Le.prototype.doKeyDown=function(){this.currentTool.doKeyDown()},Le.prototype.doKeyUp=function(){this.currentTool.doKeyUp()},Le.prototype.doFocus=function(){this.focus()},Le.prototype.focus=function(){if(this.ta)if(this.scrollsPageOnFocus)this.ta.focus();else{var a=ln.scrollX||ln.pageXOffset,y=ln.scrollY||ln.pageYOffset;this.ta.focus(),ln.scrollTo(a,y)}},Le.prototype.Oy=function(){this.H.R("GainedFocus")},Le.prototype.Ny=function(){this.H.R("LostFocus")};function mg(a){if(a.ta!==null){var y=a.Ka;if(y!==null&&y.clientWidth!==0&&y.clientHeight!==0){a.Gw||a.setScrollWidth();var x=a.gf?a.Db:0,E=a.Be?a.Db:0,b=a.Mb;a.Mb=a.computePixelRatio(),a.Mb!==b&&(a.pn=!0,a.$b()),(y.clientWidth!==a.Aa+x||y.clientHeight!==a.ya+E)&&(a.Ee=!0,a.Fc=!0,y=a.layout,y!==null&&y.isViewportSized&&a.autoScale===Va&&(a.Jk=!0,y.C()),a.ld||a.$b())}}}function Xp(a){var y=new ga;y.name="Background",a.Al(y),y=new ga,y.name="",a.Al(y),y=new ga,y.name="Foreground",a.Al(y),y=new ga,y.name="Adornment",y.isTemporary=!0,y.isInDocumentBounds=!1,a.Al(y),y=new ga,y.name="Tool",y.isTemporary=!0,y.isInDocumentBounds=!0,a.Al(y),y=new ga,y.name="Grid",y.allowSelect=!1,y.pickable=!1,y.isTemporary=!0,y.isInDocumentBounds=!1,a.Ww(y,a.Qj("Background"))}function Jp(a){var y=new mn(mn.Grid);y.name="GRID";var x=new lr;return x.figure="LineH",x.stroke="lightgray",x.strokeWidth=.5,x.interval=1,y.add(x),x=new lr,x.figure="LineH",x.stroke="gray",x.strokeWidth=.5,x.interval=5,y.add(x),x=new lr,x.figure="LineH",x.stroke="gray",x.strokeWidth=1,x.interval=10,y.add(x),x=new lr,x.figure="LineV",x.stroke="lightgray",x.strokeWidth=.5,x.interval=1,y.add(x),x=new lr,x.figure="LineV",x.stroke="gray",x.strokeWidth=.5,x.interval=5,y.add(x),x=new lr,x.figure="LineV",x.stroke="gray",x.strokeWidth=1,x.interval=10,y.add(x),x=new Li,x.add(y),x.layerName="Grid",x.zOrder=0,x.isInDocumentBounds=!1,x.isAnimated=!1,x.pickable=!1,x.locationObjectName="GRID",a.add(x),a.partManager.parts.remove(x),y.visible=!1,y}function _p(){this.H.gu?this.H.gu=!1:this.H.isEnabled?this.H.kx(this):jd(this.H)}function Qp(a){this.H.isEnabled?(this.H.lu=a.target.scrollTop,this.H.ju=a.target.scrollLeft):jd(this.H)}Le.prototype.kx=function(a){if(this.ta!==null){var y=this.ku,x=this.hu;this.qr=!0;var E=this.documentBounds,b=this.viewportBounds,z=this.rj,tt=E.x-z.left,rt=E.y-z.top,ot=E.width+z.left+z.right,st=E.height+z.top+z.bottom,ut=E.right+z.right;z=E.bottom+z.bottom;var ft=b.x;E=b.y;var mt=b.width,yt=b.height,wt=b.right,bt=b.bottom;b=this.scale;var Zt=a.scrollLeft;if(this.tn)switch(this.bu){case"negative":Zt=Zt+a.scrollWidth-a.clientWidth;break;case"reverse":Zt=a.scrollWidth-Zt-a.clientWidth}var It=Zt;mt<ot||yt<st?(Zt=At.allocAt(this.position.x,this.position.y),this.allowHorizontalScroll&&this.ju!==It&&(Zt.x=It/b+tt,this.ju=It),this.allowVerticalScroll&&this.lu!==a.scrollTop&&(Zt.y=a.scrollTop/b+rt,this.lu=a.scrollTop),this.position=Zt,At.free(Zt),this.Ee=this.qr=!1):(Zt=At.alloc(),a.uy&&this.allowHorizontalScroll&&(tt<ft&&(this.position=Zt.h(It+tt,this.position.y)),ut>wt&&(this.position=Zt.h(-(y.scrollWidth-this.Aa)+It-this.Aa/b+ut,this.position.y))),a.vy&&this.allowVerticalScroll&&(rt<E&&(this.position=Zt.h(this.position.x,a.scrollTop+rt)),z>bt&&(this.position=Zt.h(this.position.x,-(y.scrollHeight-this.ya)+a.scrollTop-this.ya/b+z))),At.free(Zt),this.vd=!0,this.Ee=this.qr=!1,E=this.documentBounds,b=this.viewportBounds,ut=E.right,wt=b.right,z=E.bottom,bt=b.bottom,tt=E.x,ft=b.x,rt=E.y,E=b.y,mt>=ot&&tt>=ft&&ut<=wt&&(x.style.width="1px"),yt>=st&&rt>=E&&z<=bt&&(x.style.height="1px"))}},Le.prototype.computeBounds=function(a){return a===void 0&&(a=new Ee),Na(this),vg(this,a)};function vg(a,y){if(a.fixedBounds.w())return y.assign(a.fixedBounds),y.Co(a.yb),y;for(var x=!0,E=a.Wa.s,b=E.length,z=0;z<b;z++){var tt=E[z];if(tt.visible&&tt.isInDocumentBounds){tt=tt.Pa.s;for(var rt=tt.length,ot=0;ot<rt;ot++){var st=tt[ot];st.isInDocumentBounds&&st.isVisible()&&(st=st.actualBounds,st.w()&&(x?(x=!1,y.assign(st)):y.ed(st)))}}}return x&&y.h(0,0,0,0),y.Co(a.yb),y}Le.prototype.computePartsBounds=function(a,y){y===void 0&&(y=!1);var x=null;if(kn(a))for(var E=0;E<a.length;E++){var b=a[E];!y&&b instanceof En||(b.Va(),x===null?x=b.actualBounds.copy():x.ed(b.actualBounds))}else for(a=a.iterator;a.next();)E=a.value,!y&&E instanceof En||(E.Va(),x===null?x=E.actualBounds.copy():x.ed(E.actualBounds));return x===null?new Ee(NaN,NaN,0,0):x};function ml(a,y){if((y||a.hf)&&!a.vb&&a.ta!==null&&a.documentBounds.w()){if(a.vb=!0,y){var x=a.initialPosition;if(x.w()){a.vb=!1,a.position=x;return}x=At.alloc(),x.xi(a.documentBounds,a.initialDocumentSpot);var E=a.viewportBounds;E=Ee.allocAt(0,0,E.width,E.height);var b=At.alloc();b.xi(E,a.initialViewportSpot),b.h(x.x-b.x,x.y-b.y),a.position=b,Ee.free(E),At.free(b),At.free(x)}x=a.yh,y&&a.Fg!==Va&&(x=a.Fg);var z=x!==Va?Td(a,x):a.scale;x=a.pa.x,E=a.pa.y,b=a.Aa/z;var tt=a.ya/z,rt=a.zk,ot=a.pq;y&&!rt.sb()&&(ot.sb()||ot.Xb())&&(rt=ot.Xb()?er:ot),yg(a,a.documentBounds,b,tt,rt,y),y=a.scale,a.scale=z,a.vb=!1,z=a.viewportBounds,ue.B(z.x,x)&&ue.B(z.y,E)&&ue.B(z.width,b)&&ue.B(z.height,tt)||a.onViewportBoundsChanged(new Ee(x,E,b,tt),z,y,!1)}}function Td(a,y){var x=a.Pp;if(a.ta===null)return x;a.Va();var E=a.documentBounds;if(!E.w())return x;var b=E.width;E=E.height;var z=a.Aa+(a.gf?a.Db:0),tt=a.ya+(a.Be?a.Db:0),rt=z/b,ot=tt/E;return y===Zs?(y=Math.min(ot,rt),y>x&&(y=x),y<a.minScale&&(y=a.minScale),y>a.maxScale&&(y=a.maxScale),y):y===nd?(y=ot>rt?(tt-a.Db)/E:(z-a.Db)/b,y>x&&(y=x),y<a.minScale&&(y=a.minScale),y>a.maxScale&&(y=a.maxScale),y):a.scale}Le.prototype.zoomToFit=function(){var a=this.sj;this.sj=vh,this.scale=Td(this,Zs),a!==vh&&(ml(this,!1),yg(this,this.documentBounds,this.Aa/this.Ca,this.ya/this.Ca,this.zk,!1)),this.sj=a},Pt=Le.prototype,Pt.BA=function(a,y){y===void 0&&(y=Zs);var x=a.width,E=a.height;if(!(x===0||E===0||isNaN(x)&&isNaN(E))){var b=1;if(y===Zs||y===nd)if(isNaN(x))b=this.viewportBounds.height*this.scale/E;else if(isNaN(E))b=this.viewportBounds.width*this.scale/x;else{b=this.Aa;var z=this.ya;b=y===nd?z/E>b/x?(z-(this.Be?this.Db:0))/E:(b-(this.gf?this.Db:0))/x:Math.min(z/E,b/x)}this.scale=b,this.position=new At(a.x,a.y)}},Pt.Jy=function(a,y){this.Va();var x=this.documentBounds,E=this.viewportBounds;this.position=new At(x.x+(a.x*x.width+a.offsetX)-(y.x*E.width-y.offsetX),x.y+(a.y*x.height+a.offsetY)-(y.y*E.height-y.offsetY))},Pt.zz=function(a){if(a instanceof he){this.eq=a;var y=At.alloc();this.fq=this.op(a.ga(Sr,y)),At.free(y)}else this.eq=null,this.fq=ti};function yg(a,y,x,E,b,z){var tt=At.allocAt(a.pa.x,a.pa.y),rt=tt.x,ot=tt.y;if(a.eq!==null){var st=At.alloc();st=a.eq.ga(Sr,st),rt=st.x-a.fq.x/a.scale,ot=st.y-a.fq.y/a.scale,b=qi,At.free(st)}(z||a.scrollMode===vh)&&(b.sb()&&(x>y.width&&(rt=y.x+(b.x*y.width+b.offsetX)-(b.x*x-b.offsetX)),E>y.height&&(ot=y.y+(b.y*y.height+b.offsetY)-(b.y*E-b.offsetY))),b=a.rj,z=x-y.width,x<y.width+b.left+b.right?(rt=Math.min(rt+x/2,y.right+Math.max(z,b.right)-x/2),rt=Math.max(rt,y.left-Math.max(z,b.left)+x/2),rt-=x/2):rt>y.left?rt=y.left:rt<y.right-x&&(rt=y.right-x),x=E-y.height,E<y.height+b.top+b.bottom?(ot=Math.min(ot+E/2,y.bottom+Math.max(x,b.bottom)-E/2),ot=Math.max(ot,y.top-Math.max(x,b.top)+E/2),ot-=E/2):ot>y.top?ot=y.top:ot<y.bottom-E&&(ot=y.bottom-E)),tt.x=isFinite(rt)?rt:-a.yb.left,tt.y=isFinite(ot)?ot:-a.yb.top,a.positionComputation!==null&&(y=a.positionComputation(a,tt),tt.x=y.x,tt.y=y.y),Hp(a.Yd,a.pa,tt),a.pa.h(tt.x,tt.y),fu(a),At.free(tt)}Pt.Ol=function(a,y){if(y===void 0&&(y=!0),y){if(a=ku(this,a,function(x){return x.part},function(x){return x.canSelect()}),a instanceof Li)return a}else if(a=ku(this,a,function(x){return x.part}),a instanceof Li)return a;return null},Pt.ic=function(a,y,x){y===void 0&&(y=null),x===void 0&&(x=null),Na(this);for(var E=this.Wa.iteratorBackwards;E.next();){var b=E.value;if(b.visible&&(b=b.ic(a,y,x),b!==null))return b}return null};function ku(a,y,x,E){for(x===void 0&&(x=null),E===void 0&&(E=null),Na(a),a=a.Wa.iteratorBackwards;a.next();){var b=a.value;if(b.visible&&!b.isTemporary&&(b=b.ic(y,x,E),b!==null))return b}return null}Pt.lz=function(a,y,x){return y===void 0&&(y=!0),wc(this,a,function(E){return E.part},y?function(E){return E instanceof Li&&E.canSelect()}:null,x)};function wc(a,y,x,E,b){for(x===void 0&&(x=null),E===void 0&&(E=null),b instanceof Xe||b instanceof qe||(b=new qe),Na(a),a=a.Wa.iteratorBackwards;a.next();){var z=a.value;z.visible&&!z.isTemporary&&z.ji(y,x,E,b)}return b}Pt.ji=function(a,y,x,E){y===void 0&&(y=null),x===void 0&&(x=null),E instanceof Xe||E instanceof qe||(E=new qe),Na(this);for(var b=this.Wa.iteratorBackwards;b.next();){var z=b.value;z.visible&&z.ji(a,y,x,E)}return E},Pt.ux=function(a,y,x,E){return y===void 0&&(y=!1),x===void 0&&(x=!0),uf(this,a,function(b){return b instanceof Li&&(!x||b.canSelect())},y,E)},Pt.Cf=function(a,y,x,E,b){y===void 0&&(y=null),x===void 0&&(x=null),E===void 0&&(E=!1),b instanceof Xe||b instanceof qe||(b=new qe),Na(this);for(var z=this.Wa.iteratorBackwards;z.next();){var tt=z.value;tt.visible&&tt.Cf(a,y,x,E,b)}return b},Pt.Nu=function(a,y,x,E,b,z){var tt=new qe;Na(this);for(var rt=this.Wa.iteratorBackwards;rt.next();){var ot=rt.value;ot.visible&&ot.Nu(a,y,x,E,tt,b,z)}return tt};function uf(a,y,x,E,b){var z=null;for(z===void 0&&(z=null),x===void 0&&(x=null),E===void 0&&(E=!1),b instanceof Xe||b instanceof qe||(b=new qe),Na(a),a=a.Wa.iteratorBackwards;a.next();){var tt=a.value;tt.visible&&!tt.isTemporary&&tt.Cf(y,z,x,E,b)}return b}Pt.mz=function(a,y,x,E,b){return x===void 0&&(x=!0),E===void 0&&(E=!0),Pc(this,a,y,function(z){return z instanceof Li&&(!E||z.canSelect())},x,b)},Pt.og=function(a,y,x,E,b,z){x===void 0&&(x=null),E===void 0&&(E=null),b===void 0&&(b=!0),b!==!1&&b!==!0&&((b instanceof Xe||b instanceof qe)&&(z=b),b=!0),z instanceof Xe||z instanceof qe||(z=new qe),Na(this);for(var tt=this.Wa.iteratorBackwards;tt.next();){var rt=tt.value;rt.visible&&rt.og(a,y,x,E,b,z)}return z};function Pc(a,y,x,E,b,z){var tt=null;for(tt===void 0&&(tt=null),E===void 0&&(E=null),b===void 0&&(b=!0),b!==!1&&b!==!0&&((b instanceof Xe||b instanceof qe)&&(z=b),b=!0),z instanceof Xe||z instanceof qe||(z=new qe),Na(a),a=a.Wa.iteratorBackwards;a.next();){var rt=a.value;rt.visible&&!rt.isTemporary&&rt.og(y,x,tt,E,b,z)}return z}Le.prototype.acceptEvent=function(a){return tl(this,a,a instanceof MouseEvent)};function tl(a,y,x){var E=a.Qg;return a.Qg=a.cj,a.cj=E,E.diagram=a,E.event=y,x?Od(a,y,E):(E.viewPoint=a.Qg.viewPoint,E.documentPoint=a.Qg.documentPoint),a=0,y.ctrlKey&&(a+=1),y.altKey&&(a+=2),y.shiftKey&&(a+=4),y.metaKey&&(a+=8),E.modifiers=a,E.button=y.button,y.buttons!==void 0&&(E.buttons=y.buttons),dr&&y.button===0&&y.ctrlKey&&(E.button=2),E.down=!1,E.up=!1,E.clickCount=1,E.delta=0,E.handled=!1,E.bubbles=!1,E.timestamp=y.timeStamp,E.isMultiTouch=!1,E.targetDiagram=Sg(y,y.target),E.targetObject=null,E}function Sg(a,y){return y===null?null:(y=y.H)?y:((y=a.path)||typeof a.composedPath!="function"||(y=a.composedPath()),y&&y[0]&&y[0].H?y[0].H:null)}function xg(a,y,x,E,b,z){var tt=a.Qg;return a.Qg=a.cj,a.cj=tt,tt.diagram=a,tt.clickCount=1,a=tt.delta=0,y.ctrlKey&&(a+=1),y.altKey&&(a+=2),y.shiftKey&&(a+=4),y.metaKey&&(a+=8),tt.modifiers=a,tt.event=y,tt.timestamp=y.timeStamp,tt.button=y.button,tt.buttons=y.buttons,dr&&y.button===0&&y.ctrlKey&&(tt.button=2),tt.down=x,tt.up=E,tt.handled=!1,tt.bubbles=b,tt.isMultiTouch=z,tt}function Nl(a,y){return a.bubbles?!0:(y.stopPropagation!==void 0&&y.stopPropagation(),y.cancelable!==!1&&y.preventDefault(),y.cancelBubble=!0,!1)}Le.prototype.Qz=function(a){var y=this.H;if(!this.H.isEnabled)return!1;var x=tl(y,a,!1);switch(x.key=String.fromCharCode(a.which),x.down=!0,a.which){case 8:x.key="Backspace";break;case 33:x.key="PageUp";break;case 34:x.key="PageDown";break;case 35:x.key="End";break;case 36:x.key="Home";break;case 37:x.key="Left";break;case 38:x.key="Up";break;case 39:x.key="Right";break;case 40:x.key="Down";break;case 45:x.key="Insert";break;case 46:x.key="Del";break;case 48:x.key="0";break;case 187:case 61:case 107:x.key="Add";break;case 189:case 173:case 109:x.key="Subtract";break;case 27:x.key="Esc"}return y.doKeyDown(),Nl(x,a)},Le.prototype.Rz=function(a){var y=this.H;if(!y.isEnabled)return!1;var x=tl(y,a,!1);switch(x.key=String.fromCharCode(a.which),x.up=!0,a.which){case 8:x.key="Backspace";break;case 33:x.key="PageUp";break;case 34:x.key="PageDown";break;case 35:x.key="End";break;case 36:x.key="Home";break;case 37:x.key="Left";break;case 38:x.key="Up";break;case 39:x.key="Right";break;case 40:x.key="Down";break;case 45:x.key="Insert";break;case 46:x.key="Del"}return y.doKeyUp(),Nl(x,a)},Le.prototype.bz=function(a){var y=this.H;if(!y.isEnabled)return!1;var x=tl(y,a,!0);return y.mouseEnter!==null&&y.mouseEnter(x),y.currentTool.standardMouseOver(),Nl(x,a)},Le.prototype.cz=function(a){var y=this.H;if(!y.isEnabled)return!1;var x=tl(y,a,!0);return y.mouseLeave!==null&&y.mouseLeave(x),Nl(x,a)},Le.prototype.getMouse=function(a){var y=this.ta;if(y===null)return new At(0,0);var x=y.getBoundingClientRect();return y=a.clientX-this.Aa/x.width*x.left,a=a.clientY-this.ya/x.height*x.top,this.Ab!==null?Ln(new At(y,a),this.Ab):new At(y,a)};function Od(a,y,x){var E=a.ta,b=a.Aa,z=a.ya,tt=0,rt=0;E!==null&&(E=E.getBoundingClientRect(),tt=y.clientX-b/E.width*E.left,rt=y.clientY-z/E.height*E.top),x.viewPoint.h(tt,rt),a.Ab!==null?(y=At.allocAt(tt,rt),a.Ab.Cd(y),x.documentPoint.assign(y),At.free(y)):x.documentPoint.h(tt,rt)}function wg(a,y,x){if(a.oj[0]!==null){y=a.oj[y];var E=a.ta;E!==null&&(E=E.getBoundingClientRect(),x.h(y.clientX-a.Aa/E.width*E.left,y.clientY-a.ya/E.height*E.top))}}Le.prototype.Ya=function(){this.Zi||(this.Zi=!0,this.$b(!1))};function qp(a){a.ld||Na(a),a.Va()}Le.prototype.redraw=function(){this.vb||this.ld||(this.N(),this.bd())},Pt=Le.prototype,Pt.Pz=function(){return this.kg},Pt.Xy=function(a){a===void 0&&(a=null);var y=this.animationManager,x=y.isEnabled;y.Cc(),y.isEnabled=!1,el(this),this.hf=!1,this.du=new At(NaN,NaN),y.isEnabled=x,this.ld=!0;var E=this;a!==null&&ki(function(){E.ld=!1,Cu(y,"Model"),a(E)},1)},Pt.$b=function(a){if(a===void 0&&(a=!1),this.kg!==!0&&!(this.vb||a===!1&&this.ld)){this.kg=!0;var y=this;ln.requestAnimationFrame(function(){y.kg&&y.bd()})}},Pt.bd=function(){(!this.fn||this.kg)&&(this.fn&&(this.fn=!1),el(this))};function Qh(a,y,x){!a.Ee||a.vb||a.animationManager.defaultAnimation.isAnimating||jd(a)||(y&&Na(a),x&&ml(a,!1))}function el(a,y){if(!a.ld&&(a.kg=!1,a.Ka!==null||a.wo.w())){a.ld=!0;var x=a.animationManager,E=a.Xn;if(!x.isAnimating&&E.length!==0){for(var b=E.s,z=b.length,tt=0;tt<z;tt++){var rt=b[tt];Xo(rt,!1),rt.v()}E.clear()}E=a.ow,0<E.count&&(E.each(function(ot){ot.Nv()}),E.clear()),b=E=!1,x.defaultAnimation.isAnimating&&(b=!0,E=a.skipsUndoManager,a.skipsUndoManager=!0),x.zb||mg(a),Qh(a,!1,!0),a.fe!==null&&(a.fe.visible&&!a.mq&&(cu(a),a.mq=!0),!a.fe.visible&&a.mq&&(a.mq=!1)),Na(a),z=!1,(!a.hf||a.xh)&&(a.hf?Ng(a,!a.Jk):(a.Ea("Initial Layout"),x.isEnabled===!1&&x.Cc(),Ng(a,!1)),z=!0),a.Jk=!1,Na(a),a.ou||qp(a),Qh(a,!0,!1),tt=!1,z?(x=Ee.alloc(),x.assign(a.viewportBounds),a.hf||(tt=a.hf=!0,a.skipsUndoManager||(a.undoManager.isPendingClear=!0),a.undoManager.isPendingUnmodified=!0,Pg(a)),a.R("LayoutCompleted"),Qh(a,!0,!1),Ee.free(x)):x.Ok&&x.Qw&&(a.Fg!==Va?a.scale=Td(a,a.Fg):a.yh!==Va?a.scale=Td(a,a.yh):(x=a.initialScale,isFinite(x)&&0<x&&(a.scale=x)),ml(a,!0)),z&&tt&&a.eb("Initial Layout"),Na(a),y||a.gc(a.ib),b&&(a.skipsUndoManager=E),a.ld=!1}}function Pg(a){if(a.Fg!==Va)a.scale=Td(a,a.Fg);else if(a.yh!==Va)a.scale=Td(a,a.yh);else{var y=a.initialScale;isFinite(y)&&0<y&&(a.scale=y)}ml(a,!0),y=a.Wa.s,a.Fd(y,y.length,a,a.viewportBounds),a.R("InitialLayoutCompleted"),a.du.assign(a.pa),cu(a)}function Na(a){if(a.De.count!==0&&(a.ld||!a.animationManager.isTicking)){for(var y=0;23>y;y++){var x=a.De.iterator;if(x===null||a.De.count===0)break;a.De=new qe,a.Nv(x,a.De)}a.nodes.each(function(E){E instanceof $i&&E.U&65536&&(E.U=E.U^65536)})}}Pt.Nv=function(a,y){for(a.reset();a.next();){var x=a.value;!x.Zc()||x instanceof $i||(x.si()?(x.measure(1/0,1/0),x.arrange()):y.add(x))}for(a.reset();a.next();)x=a.value,x instanceof $i&&x.isVisible()&&Cc(this,x);for(a.reset();a.next();)x=a.value,x instanceof En&&x.isVisible()&&(x.si()?(x.measure(1/0,1/0),x.arrange()):y.add(x));for(a.reset();a.next();)x=a.value,x instanceof Rr&&x.isVisible()&&(x.si()?(x.measure(1/0,1/0),x.arrange()):y.add(x))};function Cc(a,y){for(var x=On(),E=On(),b=y.memberParts;b.next();){var z=b.value;z.isVisible()&&(z instanceof $i?(Vs(z)||ns(z)||rd(z))&&Cc(a,z):z instanceof En?z.fromNode===y||z.toNode===y?E.push(z):x.push(z):(z.measure(1/0,1/0),z.arrange()))}for(a=x.length,b=0;b<a;b++)z=x[b],z.measure(1/0,1/0),z.arrange();for(Qn(x),y.measure(1/0,1/0),y.arrange(),a=E.length,y=0;y<a;y++)x=E[y],x.measure(1/0,1/0),x.arrange();Qn(E)}Pt.Fd=function(a,y,x,E){if(this.vd||this.animationManager.isAnimating)for(var b=0;b<y;b++)a[b].Fd(x,E)},Pt.gc=function(a){if(this.Ka!==null){if(this.ta===null&&Gt("No canvas specified"),this.nl==="svg"){if(this.Ka!==null){var y=this.animationManager;if(!y.zb&&(!y.isAnimating||y.isTicking)){Rd(this);var x=this.Aa,E=this.ya;if(a.Gv.resize(x,E,x,E),x=this.Wa.s,E=x.length,this.Fd(x,E,this,this.viewportBounds),this.Fc||y.isAnimating){y=this.pa;var b=this.Ca,z=Math.round(y.x*b)/b,tt=Math.round(y.y*b)/b,rt=this.Ab;for(rt.reset(),b!==1&&rt.scale(b),y.x===0&&y.y===0||rt.translate(-z,-tt),a.ti=null,Xy(a,rt.m11,rt.m12,rt.m21,rt.m22,rt.dx,rt.dy),this.pb!==1&&(a.globalAlpha=this.pb),ph(this,a),y=this.Mb,this.ta.context.setTransform(y,0,0,y,0,0),this.ta.context.clearRect(0,0,this.Aa,this.ya),y=0;y<E;y++)x[y].gc(a,this);a=!1,this.Yf?Zd(this.Yf,this)&&(a=this.Vp()):a=!0,a&&(Ii.prototype.Cd=Ii.prototype.Eu),this.Fc=this.vd=!1}}}}else t:if(z=this.animationManager,!z.zb&&(!z.isAnimating||z.isTicking)&&(x=new Date,Rd(this),this.Ka.style.opacity!=="0")){if(E=a!==this.ib,y=this.Wa.s,b=y.length,this.Fd(y,b,this,this.viewportBounds),E)a.Vc(!0),this.vd=!0;else if(!this.Fc&&!z.isAnimating)break t;z=this.Ab,z.reset(),tt=this.Mb,rt=this.pa;var ot=this.Ca,st=Math.round(rt.x*ot)/ot,ut=Math.round(rt.y*ot)/ot;for(ot!==1&&z.scale(ot),rt.x===0&&rt.y===0||z.translate(-st,-ut),a.setTransform(tt,0,0,tt,0,0),a.clearRect(0,0,this.Aa,this.ya),this.pb!==1&&(a.globalAlpha=this.pb),ph(this,a),rt=0;rt<b;rt++)a.setTransform(tt,0,0,tt,0,0),a.transform(z.m11,z.m12,z.m21,z.m22,z.dx,z.dy),a.yc(),y[rt].gc(a,this);if(y=!1,this.Yf?Zd(this.Yf,this)&&(y=this.Vp()):y=!0,y&&(Ii.prototype.Cd=Ii.prototype.Eu),E?(this.ib.Vc(!0),this.vd=!0):this.Fc=this.vd=!1,y=+new Date-+x,E=Fi&&Fi.nx,x=this.zw,E||this.Yh===null){for(x[this.Tq]=y,this.Tq=(this.Tq+1)%x.length,b=y=0;b<x.length;b++)y+=x[b];this.Sq=y/x.length}if(this.pb!==1&&(a.globalAlpha=1),E)for(a.setTransform(1,0,0,1,0,0),E=0;E<x.length;E++)a.fillText(x[E].toString(),20,150+ +(20*E))}}};function hf(a,y,x,E,b,z,tt,rt,ot,st){if(a.Ka!==null){a.ta===null&&Gt("No canvas specified"),tt===void 0&&(tt=null),rt===void 0&&(rt=null),ot===void 0&&(ot=!1),st===void 0&&(st=!1),Rd(a),a.ib.Vc(!0),a.vd=!0,a.$i=!0;var ut=a.Ca;a.Ca=b;var ft=a.Wa.s,mt=ft.length;try{var yt=new Ee(z.x,z.y,E.width/b,E.height/b),wt=yt.copy();wt.Co(x),cu(a,wt),Na(a),a.Fd(ft,mt,a,yt),y.setTransform(1,0,0,1,0,0),y.clearRect(0,0,E.width,E.height),rt!==null&&rt!==""&&(y.fillStyle=rt,y.ox(0,0,E.width,E.height));var bt=a.Mb;y.scale(bt,bt);var Zt=Ii.alloc();Zt.reset(),Zt.translate(x.left,x.top),Zt.scale(b),z.x===0&&z.y===0||Zt.translate(-z.x,-z.y),y.setTransform(Zt.m11,Zt.m12,Zt.m21,Zt.m22,Zt.dx,Zt.dy),y.yc(),y instanceof Ts&&Xy(y,Zt.m11,Zt.m12,Zt.m21,Zt.m22,Zt.dx,Zt.dy),Ii.free(Zt),ph(a,y),y.globalAlpha=a.pb;var It=a.Qj("Grid");if(tt){var Yt=new qe,Jt=tt.iterator;for(Jt.reset();Jt.next();){var qt=Jt.value;qt instanceof Li&&(st||qt.layer!==It)&&(qt.Gj(),Yt.add(qt))}for(st=0;st<mt;st++)Wp(ft[st],y,a,Yt,ot);Yt.each(function(Ce){return Ce.Gj()})}else for(Yt=0;Yt<mt;Yt++){var ae=ft[Yt];ae===It?st&&ae.gc(y,a,!0):ae.gc(y,a,ot)}a.$i=!1,a.Yf&&Zd(a.Yf,a)&&a.Vp()}finally{a.Ca=ut,a.ib.Vc(!0),a.vd=!0,a.Fd(ft,mt,a,a.viewportBounds),cu(a),a.ib instanceof Ts&&(a.ib.Nj.PA(),a.redraw())}}}Pt.Gf=function(a){return this.Rg[a]},Pt.Xx=function(a,y){a==="minDrawingLength"&&(this.Oq=y),this.Rg[a]=y,this.redraw()},Pt.Tx=function(){this.Rg=new pi,this.Rg.drawShadows=!0,this.Rg.textGreeking=!0,this.Rg.viewportOptimizations=!(dr||Xi),this.Rg.temporaryPixelRatio=!0,this.Rg.pictureRatioOptimization=!0,this.Oq=this.Rg.minDrawingLength=1};function ph(a,y){a=a.Rg,a!==null&&(a.imageSmoothingEnabled!==void 0&&y.Wx(!!a.imageSmoothingEnabled),a=a.defaultFont,a!=null&&(y.font=a))}Pt.Ql=function(a){return this.on[a]},Pt.sA=function(a,y){this.on[a]=y},Pt.Sx=function(){this.on=new pi,this.on.extraTouchArea=10,this.on.extraTouchThreshold=10,this.on.hasGestureZoom=!0},Pt.set=function(a){return Object.assign(this,a),this},Pt.Du=function(a){return this.nm(a)},Pt.nm=function(a){return Id(this,a),this};function Id(a,y){var x=a instanceof mn,E=a instanceof Le,b;for(b in y){b===""&&Gt("Setting properties requires non-empty property names");var z=a,tt=b;if(x||E){var rt=b.indexOf(".");if(0<rt){var ot=b.substring(0,rt);x?z=a.fb(ot):(z=a[ot],z==null&&(z=a.toolManager[ot])),De(z)?tt=b.substr(rt+1):Gt("Unable to find object named: "+ot+" in "+a.toString()+" when trying to set property: "+b)}}if(tt[0]!=="_"&&!Pi(z,tt))if(E&&tt==="ModelChanged"){a.Yw(y[tt]);continue}else if(E&&tt==="Changed"){a.Pe(y[tt]);continue}else if(E&&Pi(a.toolManager,tt))z=a.toolManager;else if(E&&em(a,tt)){a.Bj(tt,y[tt]);continue}else if(a instanceof mi&&tt==="Changed"){a.Pe(y[tt]);continue}else Gt('Trying to set undefined property "'+tt+'" on object: '+z.toString());z[tt]=y[b],tt[0]==="_"&&z instanceof he&&z.Vw(tt)}}Pt.bx=function(){if(this.Eh.count!==0&&!(1<this.undoManager.transactionLevel)){for(;0<this.Eh.count;){var a=this.Eh;for(this.Eh=new Me,a=a.iterator;a.next();){var y=a.key;y.Xo(a.value),y.qc()}}this.N()}},Pt.N=function(a){if(a===void 0)this.Fc=!0,this.$b();else{var y=this.viewportBounds;a.w()&&y.Yc(a)&&(this.Fc=!0,this.$b())}this.R("InvalidateDraw")},Le.prototype.invalidateViewport=function(a,y){if(this.Fc!==!0)if(this.Fc=!0,this.nl==="svg")this.bd();else{var x=this.Gf("temporaryPixelRatio")===!0;if(this.Gf("viewportOptimizations")===!0&&this.scrollMode!==Lc&&this.rj.hi(0,0,0,0)&&y.width===a.width&&y.height===a.height){var E=this.scale,b=Math.max(a.y,y.y),z=Math.min(a.y+a.height,y.y+y.height);if(0<Math.max(0,Math.min(a.x+a.width,y.x+y.width)-Math.max(a.x,y.x))*E&&0<Math.max(0,z-b)*E){if(!(this.ld||(this.kg=!1,this.Ka===null||(this.ld=!0,this.documentBounds.w()||(E=Ee.alloc(),Ag(this,this.computeBounds(E)),Ee.free(E)),E=this.ta,E===null||E instanceof gu)))){var tt=this.Mb;b=this.Aa*tt;var rt=this.ya*tt,ot=this.scale*tt;z=Math.round(Math.round(y.x*ot)-Math.round(a.x*ot)),y=Math.round(Math.round(y.y*ot)-Math.round(a.y*ot)),ot=this.jw,a=this.oy,ot.width!==b&&(ot.width=b),ot.height!==rt&&(ot.height=rt),a.clearRect(0,0,b,rt),ot=190*tt;var st=70*tt,ut=Math.max(z,0),ft=Math.max(y,0),mt=Math.floor(b-ut),yt=Math.floor(rt-ft);a.drawImage(E.Oa,ut,ft,mt,yt,0,0,mt,yt),Zd(this.Yf,this)&&a.clearRect(0,0,ot,st),E=On(),a=On(),yt=Math.abs(z),mt=Math.abs(y);var wt=ut===0?0:b-yt;ut=At.allocAt(wt,0),yt=At.allocAt(yt+wt,rt),a.push(new Ee(Math.min(ut.x,yt.x),Math.min(ut.y,yt.y),Math.abs(ut.x-yt.x),Math.abs(ut.y-yt.y)));var bt=this.Ab;if(bt.reset(),bt.scale(tt,tt),this.Ca!==1&&bt.scale(this.Ca),tt=this.pa,(tt.x!==0||tt.y!==0)&&isFinite(tt.x)&&isFinite(tt.y)&&bt.translate(-tt.x,-tt.y),Ln(ut,bt),Ln(yt,bt),E.push(new Ee(Math.min(ut.x,yt.x),Math.min(ut.y,yt.y),Math.abs(ut.x-yt.x),Math.abs(ut.y-yt.y))),wt=ft===0?0:rt-mt,ut.h(0,wt),yt.h(b,mt+wt),a.push(new Ee(Math.min(ut.x,yt.x),Math.min(ut.y,yt.y),Math.abs(ut.x-yt.x),Math.abs(ut.y-yt.y))),Ln(ut,bt),Ln(yt,bt),E.push(new Ee(Math.min(ut.x,yt.x),Math.min(ut.y,yt.y),Math.abs(ut.x-yt.x),Math.abs(ut.y-yt.y))),Zd(this.Yf,this)&&(b=0<z?0:-z,rt=0<y?0:-y,ut.h(b,rt),yt.h(ot+b,st+rt),a.push(new Ee(Math.min(ut.x,yt.x),Math.min(ut.y,yt.y),Math.abs(ut.x-yt.x),Math.abs(ut.y-yt.y))),Ln(ut,bt),Ln(yt,bt),E.push(new Ee(Math.min(ut.x,yt.x),Math.min(ut.y,yt.y),Math.abs(ut.x-yt.x),Math.abs(ut.y-yt.y)))),At.free(ut),At.free(yt),Qh(this,!1,!0),this.Ka===null&&Gt("No div specified"),this.ta===null&&Gt("No canvas specified"),!this.animationManager.zb&&(b=this.ib,this.Fc)){for(Rd(this),rt=this.Mb,b.setTransform(1,0,0,1,0,0),b.clearRect(0,0,this.Aa*rt,this.ya*rt),b.drawImage(this.jw.Oa,0<z?0:Math.round(-z),0<y?0:Math.round(-y)),z=this.pa,tt=this.Ca,ot=Math.round(z.x*tt)/tt,st=Math.round(z.y*tt)/tt,y=this.Ab,y.reset(),tt!==1&&y.scale(tt),z.x===0&&z.y===0||y.translate(-ot,-st),b.save(),b.beginPath(),z=a.length,tt=0;tt<z;tt++)ot=a[tt],ot.width!==0&&ot.height!==0&&b.rect(Math.floor(ot.x),Math.floor(ot.y),Math.ceil(ot.width),Math.ceil(ot.height));for(b.clip(),b.setTransform(rt,0,0,rt,0,0),b.transform(y.m11,y.m12,y.m21,y.m22,y.dx,y.dy),b.yc(),y=this.Wa.s,z=y.length,this.Fd(y,z,this,this.viewportBounds),ph(this,b),b.globalAlpha=this.pb,rt=0;rt<z;rt++)if(tt=y[rt],ot=E,tt.visible&&tt.pb!==0){st=Vu(tt,b),ft=tt.Zq,ft.length=0,ut=this.scale,mt=Ee.alloc(),yt=tt.Pa.s,bt=yt.length,wt=ot.length;for(var Zt=0;Zt<bt;Zt++){var It=yt[Zt],Yt=_d(It,It.actualBounds);t:{for(var Jt=2/ut,qt=4/ut,ae=0;ae<wt;ae++){var Ce=ot[ae];if(Ce.width!==0&&Ce.height!==0&&Yt.Vu(Ce.x-Jt,Ce.y-Jt,Ce.width+qt,Ce.height+qt)){Yt=!0;break t}}Yt=!1}Yt&&tt.Oj(b,It,this,ft,ut,mt,!0)}Ee.free(mt),b.globalAlpha=st}b.restore(),b.Vc(!0),this.Yf&&Zd(this.Yf,this)&&this.Vp(),this.Fc=this.vd=!1,this.hk()}Qn(E),Qn(a),this.ld=!1}}else this.bd();x&&(gs(this),this.bd(),xc(this,!0))}else x?(gs(this),this.bd(),xc(this,!0)):this.bd()}};function Rd(a){a.pn!==!1&&(a.pn=!1,Cg(a,a.Aa,a.ya))}function Cg(a,y,x){fu(a);var E=a.Mb;a.ta.resize(y*E,x*E,y,x)&&(a.Fc=!0,a.ib.Vc(!0))}function jd(a){var y=a.ta;if(y===null||a.wo.w())return!0;var x=a.Aa,E=a.ya,b=a.Ka,z=!1,tt=a.gf?a.Db:0,rt=a.Be?a.Db:0,ot=b.clientWidth||x+tt,st=b.clientHeight||E+rt,ut=a.viewportBounds;b=ut.x;var ft=ut.y,mt=ut.width,yt=ut.height;if((ot!==x+tt||st!==E+rt)&&(a.gf=!1,a.Be=!1,rt=tt=0,a.Aa=ot,a.ya=st,z=a.pn=!0,fu(a)),!a.hf||!a.viewportBounds.w())return!0;var wt=a.ku,bt=a.hu;if(a.Ee=!1,!(z||a.gf||a.Be||a.mn||a.nn))return!0;var Zt=a.documentBounds,It=0,Yt=0,Jt=0,qt=0,ae=ut.width,Ce=ut.height,In=a.rj;a.contentAlignment.sb()?(Zt.width>ae&&(It=In.left,Yt=In.right),Zt.height>Ce&&(Jt=In.top,qt=In.bottom)):(It=In.left,Yt=In.right,Jt=In.top,qt=In.bottom);var ui=Zt.width+It+Yt,$n=Zt.height+Jt+qt;In=a.scale;var Cn=ui>ot/In,$e=$n>st/In;if(!(z||a.gf||a.Be||Cn||$e))return!0;It=Zt.x-It,ot=ut.x,Yt=Zt.right+Yt,st=ut.right+tt,Jt=Zt.y-Jt;var _i=ut.y;Zt=Zt.bottom+qt,ut=ut.bottom+rt;var zi="1px";if(qt="1px",a.scrollMode===vh&&(Cn||$e)&&(Cn&&a.hasHorizontalScrollbar&&a.allowHorizontalScroll&&(Cn=1,It+1<ot&&(Cn=Math.max((ot-It)*In+a.Aa,Cn)),Yt>st+1&&(Cn=Math.max((Yt-st)*In+a.Aa,Cn)),ae+tt+1<ui&&(Cn=Math.max((ui-ae)*In+a.Aa,Cn)),zi=Cn.toString()+"px"),$e&&a.hasVerticalScrollbar&&a.allowVerticalScroll&&(Cn=1,Jt+1<_i&&(Cn=Math.max((_i-Jt)*In+a.ya,Cn)),Zt>ut+1&&(Cn=Math.max((Zt-ut)*In+a.ya,Cn)),Ce+rt+1<$n&&(Cn=Math.max(($n-Ce)*In+a.ya,Cn)),qt=Cn.toString()+"px")),Cn=zi!=="1px",$e=qt!=="1px",Cn&&$e||!Cn&&!$e||($e&&(st-=a.Db),Cn&&(ut-=a.Db),ui<ae+tt||!a.hasHorizontalScrollbar||!a.allowHorizontalScroll||(tt=1,It+1<ot&&(tt=Math.max((ot-It)*In+a.Aa,tt)),Yt>st+1&&(tt=Math.max((Yt-st)*In+a.Aa,tt)),ae+1<ui&&(tt=Math.max((ui-ae)*In+a.Aa,tt)),zi=tt.toString()+"px"),Cn=zi!=="1px",tt=a.ya,Cn!==a.Be&&(tt=Cn?a.ya-a.Db:a.ya+a.Db),$n<Ce+rt||!a.hasVerticalScrollbar||!a.allowVerticalScroll||(rt=1,Jt+1<_i&&(rt=Math.max((_i-Jt)*In+tt,rt)),Zt>ut+1&&(rt=Math.max((Zt-ut)*In+tt,rt)),Ce+1<$n&&(rt=Math.max(($n-Ce)*In+tt,rt)),qt=rt.toString()+"px"),$e=qt!=="1px"),a.qr&&Cn===a.Be&&$e===a.gf)return x===a.Aa&&E===a.ya||a.bd(),!1;if(Cn!==a.Be&&(zi==="1px"?a.ya=a.ya+a.Db:a.ya=Math.max(a.ya-a.Db,1),z=!0),a.Be=Cn,bt.style.width=zi,$e!==a.gf&&(qt==="1px"?a.Aa=a.Aa+a.Db:a.Aa=Math.max(a.Aa-a.Db,1),z=!0,a.tn&&(rt=At.alloc(),$e?(y.style.left=a.Db+"px",a.position=rt.h(a.pa.x+a.Db/a.scale,a.pa.y)):(y.style.left="0px",a.position=rt.h(a.pa.x-a.Db/a.scale,a.pa.y)),At.free(rt))),z&&fu(a),a.gf=$e,bt.style.height=qt,a.gu=!0,z&&(a.pn=!0),y=wt.scrollLeft,a.hasHorizontalScrollbar&&a.allowHorizontalScroll&&(ae+1<ui?y=(a.position.x-It)*In:It+1<ot?y=wt.scrollWidth-wt.clientWidth:Yt>st+1&&(y=a.position.x*In)),a.tn)switch(a.bu){case"negative":y=-(wt.scrollWidth-y-wt.clientWidth);break;case"reverse":y=wt.scrollWidth-y-wt.clientWidth}return wt.scrollLeft=y,a.hasVerticalScrollbar&&a.allowVerticalScroll&&(Ce+1<$n?wt.scrollTop=(a.position.y-Jt)*In:Jt+1<_i?wt.scrollTop=wt.scrollHeight-wt.clientHeight:Zt>ut+1&&(wt.scrollTop=a.position.y*In)),ot=a.Aa,st=a.ya,wt.style.width=ot+(a.gf?a.Db:0)+"px",wt.style.height=st+(a.Be?a.Db:0)+"px",x!==ot||E!==st||a.animationManager.zb?(x=Ee.allocAt(b,ft,mt,yt),a.onViewportBoundsChanged(x,a.viewportBounds,In,z),Ee.free(x),!1):!0}Pt=Le.prototype,Pt.add=function(a){var y=a.diagram;if(y!==this&&(y!==null&&Gt("Cannot add part "+a.toString()+" to "+this.toString()+". It is already a part of "+y.toString()),y=this.Qj(a.layerName),y===null&&(y=this.Qj("")),y===null&&Gt('Cannot add a Part when unable find a Layer named "'+a.layerName+'" and there is no default Layer'),a.layer!==y)){var x=y.oi(99999999,a,a.diagram===this);0<=x&&this.cb(Po,"parts",y,null,a,null,x),y.isTemporary||this.Ya(),a.C(1),x=a.layerChanged,x!==null&&x(a,null,y)}},Pt.oi=function(a){this.partManager.oi(a);var y=this;Yd(a,function(x){zd(y,x)}),(a instanceof Rr||a instanceof $i&&a.placeholder!==null)&&a.v(),a.data!==null&&Yd(a,function(x){sy(y.partManager,x)}),ns(a)!==!0&&rd(a)!==!0||this.De.add(a),R1(a,!0,this),z1(a)?(a.actualBounds.w()&&this.N(_d(a,a.actualBounds)),this.Ya()):a.isVisible()&&a.actualBounds.w()&&this.N(_d(a,a.actualBounds)),this.$b()},Pt.pc=function(a){a.Ej(),this.partManager.pc(a);var y=this;a.data!==null&&Yd(a,function(x){ly(y.partManager,x,y)}),this.De.remove(a),z1(a)?(a.actualBounds.w()&&this.N(_d(a,a.actualBounds)),this.Ya()):a.isVisible()&&a.actualBounds.w()&&this.N(_d(a,a.actualBounds)),this.$b()},Pt.remove=function(a){Eg(this,a,!0)};function Eg(a,y,x){var E=y.layer;E!==null&&E.diagram===a&&(y.isSelected=!1,y.isHighlighted=!1,y.C(2),x&&y.Lj(),x=E.pc(-1,y,!1),0<=x&&a.cb(Eo,"parts",E,y,null,x,null),a=y.layerChanged,a!==null&&a(y,E,null))}Pt.Is=function(a,y){if(y===void 0&&(y=!1),kn(a))for(var x=a.length,E=0;E<x;E++){var b=a[E];y&&!b.canDelete()||this.remove(b)}else for(x=new qe,x.addAll(a),a=x.iterator;a.next();)x=a.value,y&&!x.canDelete()||this.remove(x)},Pt.Kj=function(a,y,x){return x===void 0&&(x=!1),this.partManager.Kj(a,y,x)},Le.prototype.moveParts=function(a,y,x,E){if(x===void 0&&(x=!1),E===void 0&&(E=df(this)),this.toolManager!==null){var b=new Me;if(a!==null)if(kn(a))for(var z=0;z<a.length;z++)Lu(this,b,a[z],x,E);else for(a=a.iterator;a.next();)Lu(this,b,a.value,x,E);else{for(a=this.parts;a.next();)Lu(this,b,a.value,x,E);for(a=this.nodes;a.next();)Lu(this,b,a.value,x,E);for(a=this.links;a.next();)Lu(this,b,a.value,x,E)}qh(this,b,y,E,x)}};function Lu(a,y,x,E,b,z){if(!y.contains(x)&&(z===void 0&&(z=!1),!E||z||x.canMove()||x.canCopy()))if(b===void 0&&(b=df(a)),x instanceof Un){if(y.add(x,a.Pd(b,x,x.location)),x instanceof $i&&(x.placeholder!==null||b.dragsMembers))for(z=x.memberParts;z.next();)Lu(a,y,z.value,E,b,b.groupsAlwaysMove);for(z=x.linksConnected;z.next();){var tt=z.value;if(!y.contains(tt)){var rt=tt.fromNode,ot=tt.toNode;rt!==null&&y.contains(rt)&&ot!==null&&y.contains(ot)&&Lu(a,y,tt,E,b)}}if(b.dragsTree)for(x=x.Ou();x.next();)Lu(a,y,x.value,E,b)}else if(x instanceof En)for(y.add(x,a.Pd(b,x)),x=x.labelNodes;x.next();)Lu(a,y,x.value,E,b);else x instanceof Rr||y.add(x,a.Pd(b,x,x.location))}function qh(a,y,x,E,b){if(y!==null&&y.count!==0){var z=At.alloc(),tt=At.alloc();tt.assign(x),isNaN(tt.x)&&(tt.x=0),isNaN(tt.y)&&(tt.y=0),(x=a.Mr)||ff(a,y);for(var rt=On(),ot=On(),st=y.iterator,ut=At.alloc();st.next();){var ft=st.key,mt=st.value;if(ft.Zc()){var yt=kg(a,ft,y);yt!==null?rt.push(new it(ft,mt,yt)):(!b||ft.canMove())&&(yt=mt.point,z.assign(yt),a.computeMove(ft,z.add(tt),E,ut),ft.location=ut,mt.shifted===void 0&&(mt.shifted=new At),mt.shifted.assign(ut.re(yt)))}else st.key instanceof En&&ot.push(st.sa)}for(At.free(ut),b=rt.length,st=0;st<b;st++)ft=rt[st],z.assign(ft.info.point),ft.Su.shifted===void 0&&(ft.Su.shifted=new At),ft.node.location=z.add(ft.Su.shifted);for(b=At.alloc(),st=At.alloc(),ft=ot.length,mt=0;mt<ft;mt++){var wt=ot[mt];if(yt=wt.key,yt instanceof En)if(yt.suspendsRouting){yt.Tg=null,ut=yt.fromNode;var bt=yt.toNode;if(a.draggedLink!==null&&E.dragsLink)if(bt=wt.value.point,yt.dragComputation===null)y.add(yt,a.Pd(E,yt,tt)),kh(yt,tt.x-bt.x,tt.y-bt.y);else{wt=At.allocAt(0,0),(ut=yt.i(0))&&ut.w()&&wt.assign(ut);var Zt=ut=At.alloc().assign(wt).add(tt);E.isGridSnapEnabled&&(E.isGridSnapRealtime||a.lastInput.up)&&(Zt=At.alloc(),cf(a,yt,ut,Zt,E)),ut.assign(yt.dragComputation(yt,ut,Zt)).re(wt),y.add(yt,a.Pd(E,yt,ut)),kh(yt,ut.x-bt.x,ut.y-bt.y),At.free(wt),At.free(ut),Zt!==ut&&At.free(Zt)}else ut!==null&&(b.assign(ut.location),Zt=y.I(ut),Zt!==null&&b.re(Zt.point)),bt!==null&&(st.assign(bt.location),Zt=y.I(bt),Zt!==null&&st.re(Zt.point)),ut!==null&&bt!==null?b.Xa(st)?(ut=wt.value.point,bt=z,bt.assign(b),bt.re(ut),y.add(yt,a.Pd(E,yt,b)),kh(yt,bt.x,bt.y)):(yt.suspendsRouting=!1,yt.bb()):(wt=wt.value.point,ut=ut!==null?b:bt!==null?st:tt,y.add(yt,a.Pd(E,yt,ut)),kh(yt,ut.x-wt.x,ut.y-wt.y))}else(yt.fromNode===null||yt.toNode===null)&&(ut=wt.value.point,y.add(yt,a.Pd(E,yt,tt)),kh(yt,tt.x-ut.x,tt.y-ut.y))}At.free(z),At.free(tt),At.free(b),At.free(st),Qn(rt),Qn(ot),x||(Na(a),$h(a,y))}}Le.prototype.computeMove=function(a,y,x,E){if(E===void 0&&(E=new At),E.assign(y),a===null)return E;var b=y,z=x.isGridSnapEnabled;z&&(x.isGridSnapRealtime||this.lastInput.up)&&(b=At.alloc(),cf(this,a,y,b,x)),x=a.dragComputation!==null?a.dragComputation(a,y,b):b;var tt=a.minLocation,rt=tt.x;isNaN(rt)&&(rt=z?Math.round(1e3*a.location.x)/1e3:a.location.x),tt=tt.y,isNaN(tt)&&(tt=z?Math.round(1e3*a.location.y)/1e3:a.location.y);var ot=a.maxLocation,st=ot.x;return isNaN(st)&&(st=z?Math.round(1e3*a.location.x)/1e3:a.location.x),ot=ot.y,isNaN(ot)&&(ot=z?Math.round(1e3*a.location.y)/1e3:a.location.y),E.h(Math.max(rt,Math.min(x.x,st)),Math.max(tt,Math.min(x.y,ot))),b!==y&&At.free(b),E};function df(a){var y=a.toolManager.findTool("Dragging");return y!==null?y.dragOptions:a.Wm}function cf(a,y,x,E,b){if(b===void 0&&(b=df(a)),E.assign(x),y!==null){var z=a.grid;y=b.gridSnapCellSize,a=y.width,y=y.height;var tt=b.gridSnapOrigin,rt=tt.x;if(tt=tt.y,b=b.gridSnapCellSpot,z!==null){var ot=z.gridCellSize;isNaN(a)&&(a=ot.width),isNaN(y)&&(y=ot.height),z=z.gridOrigin,isNaN(rt)&&(rt=z.x),isNaN(tt)&&(tt=z.y)}z=At.allocAt(0,0),z.yi(0,0,a,y,b),ue.No(x.x,x.y,rt+z.x,tt+z.y,a,y,E),At.free(z)}}function ff(a,y){if(y!==null)for(a.Mr=!0,a=y.iterator;a.next();)y=a.key,y instanceof En&&(y.suspendsRouting=!0)}function $h(a,y){if(y!==null){for(y=y.iterator;y.next();){var x=y.key;x instanceof En&&(x.suspendsRouting=!1,Yv(x)&&x.bb())}a.Mr=!1}}function kg(a,y,x){return y=y.containingGroup,y!==null&&(a=kg(a,y,x),a!==null||(a=x.I(y),a!==null))?a:null}Pt=Le.prototype,Pt.Pd=function(a,y,x){if(x===void 0)return new Uu(Nn);var E=a.isGridSnapEnabled;return a.groupsSnapMembers||y.containingGroup===null||(E=!1),E?new Uu(new At(Math.round(1e3*x.x)/1e3,Math.round(1e3*x.y)/1e3)):new Uu(x.copy())};function Lg(a,y,x){if(y.diagram!==null&&y.diagram!==a&&Gt("Cannot share a Layer with another Diagram: "+y+" of "+y.diagram),x===null?y.diagram!==null&&Gt("Cannot add an existing Layer to this Diagram again: "+y):(x.diagram!==a&&Gt("Existing Layer must be in this Diagram: "+x+" not in "+x.diagram),y===x&&Gt("Cannot move a Layer before or after itself: "+y)),y.diagram!==a){y=y.name,a=a.Wa,x=a.count;for(var E=0;E<x;E++)a.M(E).name===y&&Gt("Cannot add Layer with the name '"+y+"'; a Layer with the same name is already present in this Diagram.")}}Pt.Al=function(a){Lg(this,a,null),a.Xe(this);var y=this.Wa,x=y.count-1;if(!a.isTemporary)for(;0<=x&&y.M(x).isTemporary;)x--;return y.Gb(x+1,a),this.cc!==null&&this.cb(Po,"layers",this,null,a,null,x+1),this.N(),this.Ya(),this},Pt.Ww=function(a,y){Lg(this,a,y),a.Xe(this);var x=this.Wa,E=x.indexOf(a);0<=E&&(x.remove(a),this.cc!==null&&this.cb(Eo,"layers",this,a,null,E,null));var b=x.count,z;for(z=0;z<b;z++)if(x.M(z)===y){x.Gb(z,a);break}return this.cc!==null&&this.cb(Po,"layers",this,null,a,null,z),this.N(),0>E&&this.Ya(),this},Pt.Cy=function(a,y){Lg(this,a,y),a.Xe(this);var x=this.Wa,E=x.indexOf(a);0<=E&&(x.remove(a),this.cc!==null&&this.cb(Eo,"layers",this,a,null,E,null));var b=x.count,z;for(z=0;z<b;z++)if(x.M(z)===y){x.Gb(z+1,a);break}return this.cc!==null&&this.cb(Po,"layers",this,null,a,null,z+1),this.N(),0>E&&this.Ya(),this},Pt.kA=function(a){if(a.diagram!==this&&Gt("Cannot remove a Layer from another Diagram: "+a+" of "+a.diagram),a.name!==""){var y=this.Wa,x=y.indexOf(a);if(y.remove(a)){for(y=a.Pa.copy().iterator;y.next();){var E=y.value,b=E.layerName;b!==a.name?E.layerName=b:E.layerName=""}this.cc!==null&&this.cb(Eo,"layers",this,a,null,x,null),this.N(),this.Ya()}}},Pt.Qj=function(a){for(var y=this.layers;y.next();){var x=y.value;if(x.name===a)return x}return null},Pt.Yw=function(a){return this.pf===null&&(this.pf=new Xe),this.pf.add(a),this.model.Pe(a),this},Pt.mA=function(a){this.pf!==null&&(this.pf.remove(a),this.pf.count===0&&(this.pf=null)),this.model.ik(a)},Pt.Pe=function(a){return this.zg===null&&(this.zg=new Xe),this.zg.add(a),this},Pt.ik=function(a){this.zg!==null&&(this.zg.remove(a),this.zg.count===0&&(this.zg=null))},Pt.ds=function(a){if(this.skipsUndoManager||this.model.skipsUndoManager||this.model.undoManager.Tu(a),a.change!==fa&&(this.isModified=!0),this.zg!==null)for(var y=this.zg,x=y.length,E=0;E<x;E++)y.M(E)(a)},Pt.cb=function(a,y,x,E,b,z,tt){z===void 0&&(z=null),tt===void 0&&(tt=null);var rt=new ao;rt.diagram=this,rt.change=a,rt.propertyName=y,rt.object=x,rt.oldValue=E,rt.oldParam=z,rt.newValue=b,rt.newParam=tt,this.ds(rt)},Pt.g=function(a,y,x,E,b){this.cb(no,a,this,y,x,E,b)},Le.prototype.changeState=function(a,y){if(a!==null&&a.diagram===this){var x=this.skipsModelSourceBindings;try{this.skipsModelSourceBindings=!0;var E=a.change;if(E===no){var b=a.object;if(fo(b,a.propertyName,a.I(y)),b instanceof he){var z=b.part;z!==null&&z.Wb()}this.isModified=!0}else if(E===Po){var tt=a.object,rt=a.newParam,ot=a.newValue;if(tt instanceof mn)if(typeof rt=="number"&&ot instanceof he){y?tt.pc(rt):tt.Gb(rt,ot);var st=tt.part;st!==null&&st.Wb()}else typeof rt=="number"&&ot instanceof Jo&&(ot.isRow?h1(tt,rt,y?void 0:ot):d1(tt,rt,y?void 0:ot));else if(tt instanceof ga){var ut=a.oldParam===!0;typeof rt=="number"&&ot instanceof Li&&(y?(ot.isSelected=!1,ot.isHighlighted=!1,ot.Wb(),tt.pc(ut?rt:-1,ot,ut)):tt.oi(rt,ot,ut))}else tt instanceof Le?typeof rt=="number"&&ot instanceof ga&&(y?this.Wa.mb(rt):(ot.Xe(this),this.Wa.Gb(rt,ot))):Gt("unknown ChangedEvent.Insert object: "+a.toString());this.isModified=!0}else if(E===Eo){var ft=a.object,mt=a.oldParam,yt=a.oldValue;if(ft instanceof mn)typeof mt=="number"&&yt instanceof he?y?ft.Gb(mt,yt):ft.pc(mt):typeof mt=="number"&&yt instanceof Jo&&(yt.isRow?h1(ft,mt,y?yt:void 0):d1(ft,mt,y?yt:void 0));else if(ft instanceof ga){var wt=a.newParam===!0;typeof mt=="number"&&yt instanceof Li&&(y?0>ft.Pa.indexOf(yt)&&ft.oi(mt,yt,wt):(yt.isSelected=!1,yt.isHighlighted=!1,yt.Wb(),ft.pc(wt?mt:-1,yt,wt)))}else ft instanceof Le?typeof mt=="number"&&yt instanceof ga&&(y?(yt.Xe(this),this.Wa.Gb(mt,yt)):this.Wa.mb(mt)):Gt("unknown ChangedEvent.Remove object: "+a.toString());this.isModified=!0}else E!==fa&&Gt("unknown ChangedEvent: "+a.toString())}finally{this.skipsModelSourceBindings=x}}},Le.prototype.Ea=function(a){return this.undoManager.Ea(a)},Le.prototype.eb=function(a){return this.undoManager.eb(a)},Le.prototype.Kf=function(){return this.undoManager.Kf()},Le.prototype.commit=function(a,y){y===void 0&&(y="");var x=this.skipsUndoManager;y===null&&(this.skipsUndoManager=!0,y=""),this.undoManager.Ea(y);var E=!1;try{a(this),E=!0}finally{E?this.undoManager.eb(y):this.undoManager.Kf(),this.skipsUndoManager=x}},Le.prototype.updateAllTargetBindings=function(a){this.partManager.updateAllTargetBindings(a)},Le.prototype.rp=function(){this.partManager.rp()};function bg(a,y,x){var E=a.animationManager;if(a.vb||a.ld)a.Ca=x,fu(a),a.N(),a.Ee=!0,E.zb&&(Zu(E)||E.ce.add(E.H,"scale",y,a.Ca));else if(a.ta===null)a.Ca=x,fu(a);else{a.vb=!0;var b=a.viewportBounds.copy(),z=a.Aa,tt=a.ya,rt=a.zoomPoint.x,ot=a.zoomPoint.y,st=a.contentAlignment;isNaN(rt)&&(st.$c()?st.Hf(ba)?rt=0:st.Hf(ko)&&(rt=z-1):rt=st.sb()?st.x*(z-1):z/2),isNaN(ot)&&(st.$c()?st.Hf(Uo)?ot=0:st.Hf(Ha)&&(ot=tt-1):ot=st.sb()?st.y*(tt-1):tt/2),a.scaleComputation===null||a.animationManager.defaultAnimation.isAnimating||(x=a.scaleComputation(a,x)),x<a.minScale&&(x=a.minScale),x>a.maxScale&&(x=a.maxScale),z=At.allocAt(a.pa.x+rt/y-rt/x,a.pa.y+ot/y-ot/x),a.position=z,At.free(z),a.Ca=x,fu(a),a.vb=!1,a.onViewportBoundsChanged(b,a.viewportBounds,y,!1),ml(a,!1),E.zb&&(Zu(E)||E.ce.add(E.H,"scale",y,a.Ca))}}Le.prototype.onViewportBoundsChanged=function(a,y,x,E){if(!a.D(y)){E===void 0&&(E=!1),E||(this.Ee=!0),this.vd=!0;var b=this.layout;b===null||!b.isViewportSized||this.autoScale!==Va||a.width===y.width&&a.height===y.height||b.C(),b=this.currentTool,this.Vk===!0&&b instanceof qr&&(this.lastInput.documentPoint=this.Ps(this.lastInput.viewPoint),Nr(b,this)),this.vb||this.invalidateViewport(a,y),cu(this),this.fc.scale=x,this.fc.position.x=a.x,this.fc.position.y=a.y,this.fc.bounds.assign(a),this.fc.canvasSize.width=Math.round(a.width*x),this.fc.canvasSize.height=Math.round(a.height*x),this.fc.newCanvasSize.width=this.Aa,this.fc.newCanvasSize.height=this.ya,this.fc.isScroll=E,this.R("ViewportBoundsChanged",this.fc,a),this.isVirtualized&&this.links.each(function(z){z.isAvoiding&&z.actualBounds.Yc(y)&&z.bb()})}};function cu(a,y){var x=a.fe;if(x!==null&&x.visible){for(var E=Ke.alloc(),b=1,z=1,tt=x.O.s,rt=tt.length,ot=0;ot<rt;ot++){var st=tt[ot],ut=Math.abs(st.interval);2>ut||(pv(st.figure)?z=z*ut/ue.vx(z,ut):b=b*ut/ue.vx(b,ut))}if(tt=x.gridCellSize,E.h(z*tt.width,b*tt.height),y!==void 0)b=y.width,z=y.height,a=y.x,tt=y.y;else{if(y=Ee.alloc(),a=a.viewportBounds,y.h(a.x,a.y,a.width,a.height),!y.w()){Ee.free(y);return}b=y.width,z=y.height,a=y.x,tt=y.y,Ee.free(y)}x.width=b+2*E.width,x.height=z+2*E.height,y=At.alloc(),ue.No(a,tt,0,0,E.width,E.height,y),y.offset(-E.width,-E.height),Ke.free(E),x.part.location=y,At.free(y)}}Le.prototype.clearSelection=function(a){a===void 0&&(a=!1);var y=this.selection;if(y.count!==0){a||this.R("ChangingSelection",y);for(var x=y.Fa(),E=x.length,b=0;b<E;b++)x[b].isSelected=!1;y.ka(),y.clear(),y.freeze(),a||this.R("ChangedSelection",y)}},Le.prototype.select=function(a){a!==null&&a.diagram===this&&(!a.isSelected||1<this.selection.count)&&(this.R("ChangingSelection",this.selection),this.clearSelection(!0),a.isSelected=!0,this.R("ChangedSelection",this.selection))},Le.prototype.rA=function(a){if(this.R("ChangingSelection",this.selection),this.clearSelection(!0),kn(a))for(var y=a.length,x=0;x<y;x++){var E=a[x];E instanceof Li||Gt("Diagram.selectCollection given something that is not a Part: "+E),E.isSelected=!0}else for(a=a.iterator;a.next();)y=a.value,y instanceof Li||Gt("Diagram.selectCollection given something that is not a Part: "+y),y.isSelected=!0;this.R("ChangedSelection",this.selection)},Le.prototype.clearHighlighteds=function(){var a=this.highlighteds;if(0<a.count){for(var y=a.Fa(),x=y.length,E=0;E<x;E++)y[E].isHighlighted=!1;a.ka(),a.clear(),a.freeze()}},Pt=Le.prototype,Pt.Iz=function(a){a!==null&&a.diagram===this&&(!a.isHighlighted||1<this.highlighteds.count)&&(this.clearHighlighteds(),a.isHighlighted=!0)},Pt.Jz=function(a){a=new qe().addAll(a);for(var y=this.highlighteds.copy().hp(a).iterator;y.next();)y.value.isHighlighted=!1;for(a=a.iterator;a.next();)y=a.value,y instanceof Li||Gt("Diagram.highlightCollection given something that is not a Part: "+y),y.isHighlighted=!0},Pt.scroll=function(a,y,x){x===void 0&&(x=1);var E=y==="up"||y==="down",b=0,z=At.alloc();if(a==="pixel")b=x;else if(a==="line")b=x*(E?this.scrollVerticalLineChange:this.scrollHorizontalLineChange);else if(a==="page")a=E?this.viewportBounds.height:this.viewportBounds.width,a*=this.scale,a!==0&&(b=x*Math.max(a-(E?this.scrollVerticalLineChange:this.scrollHorizontalLineChange),0));else{if(a==="document"){b=this.documentBounds,x=this.viewportBounds,y==="up"?this.position=z.h(x.x,b.y):y==="left"?this.position=z.h(b.x,x.y):y==="down"?this.position=z.h(x.x,b.bottom-x.height):y==="right"&&(this.position=z.h(b.right-x.width,x.y)),At.free(z);return}Gt("scrolling unit must be 'pixel', 'line', 'page', or 'document', not: "+a)}b/=this.scale,x=this.position,y==="up"?this.position=z.h(x.x,x.y-b):y==="down"?this.position=z.h(x.x,x.y+b):y==="left"?this.position=z.h(x.x-b,x.y):y==="right"?this.position=z.h(x.x+b,x.y):Gt("scrolling direction must be 'up', 'down', 'left', or 'right', not: "+y),At.free(z)},Pt.tv=function(a){var y=this.viewportBounds;y.Re(a)||(a=a.center,a.x-=y.width/2,a.y-=y.height/2,this.position=a)},Pt.es=function(a){var y=this.viewportBounds;a=a.center,a.x-=y.width/2,a.y-=y.height/2,this.position=a},Pt.op=function(a){var y=this.Ab;y.reset(),this.Ca!==1&&y.scale(this.Ca);var x=this.pa;return(x.x!==0||x.y!==0)&&isFinite(x.x)&&isFinite(x.y)&&y.translate(-x.x,-x.y),a.copy().transform(this.Ab)},Pt.zA=function(a){var y=this.Ab,x=a.x,E=a.y,b=x+a.width,z=E+a.height,tt=y.m11,rt=y.m12,ot=y.m21,st=y.m22,ut=y.dx,ft=y.dy,mt=x*tt+E*ot+ut;y=x*rt+E*st+ft;var yt=b*tt+E*ot+ut;return a=b*rt+E*st+ft,E=x*tt+z*ot+ut,x=x*rt+z*st+ft,tt=b*tt+z*ot+ut,b=b*rt+z*st+ft,z=Math.min(mt,yt),mt=Math.max(mt,yt),yt=Math.min(y,a),y=Math.max(y,a),z=Math.min(z,E),mt=Math.max(mt,E),yt=Math.min(yt,x),y=Math.max(y,x),z=Math.min(z,tt),mt=Math.max(mt,tt),yt=Math.min(yt,b),y=Math.max(y,b),new Ee(z,yt,mt-z,y-yt)},Pt.Ps=function(a){var y=this.Ab;y.reset(),this.Ca!==1&&y.scale(this.Ca);var x=this.pa;return(x.x!==0||x.y!==0)&&isFinite(x.x)&&isFinite(x.y)&&y.translate(-x.x,-x.y),Ln(a.copy(),this.Ab)};function $p(a){var y=a.isModified;a.Tw!==y&&(a.Tw=y,a.R("Modified"))}function Mg(a){return a=Sf.get(a),a!==null?new a:new Vr}Le.prototype.doModelChanged=function(a){var y=this;if(a.model===this.model){var x=a.change,E=a.propertyName;if(x===fa&&E[0]==="S")if(E==="StartingFirstTransaction"){var b=this;a=this.toolManager,a.mouseDownTools.each(function(ot){return ot.diagram=b}),a.mouseMoveTools.each(function(ot){return ot.diagram=b}),a.mouseUpTools.each(function(ot){return ot.diagram=b}),this.ld||this.hf||(this.Jk=!0,this.fn&&(this.kg=!0))}else E==="StartingUndo"||E==="StartingRedo"?(a=this.animationManager,a.defaultAnimation.isAnimating&&!this.skipsUndoManager&&a.Cc(),this.R("ChangingSelection",this.selection)):E==="StartedTransaction"&&(a=this.animationManager,a.defaultAnimation.isAnimating&&!this.skipsUndoManager&&a.Cc());else if(this.aa){this.aa=!1;try{if(a.modelChange===""&&x===fa){(E==="FinishedUndo"||E==="FinishedRedo")&&(this.R("ChangedSelection",this.selection),Na(this));var z=this.animationManager;E==="RolledBackTransaction"&&z.Cc(),this.bx(),this.Jk=!0,this.bd(),this.undoManager.transactionLevel!==0&&this.undoManager.transactionLevel!==1||rf(z),E==="CommittedTransaction"&&this.undoManager.isJustDiscarded&&(this.Ce=Math.min(this.Ce,this.undoManager.historyIndex-1)),E!=="CommittedTransaction"&&E!=="RolledBackTransaction"||!this.undoManager.isPendingUnmodified||setTimeout(function(){y.isModified=!1},1);var tt=a.isTransactionFinished;if(tt&&($p(this),this.As.clear(),Gp(this.animationManager)),!this.Rt&&tt&&this.lastInput.targetDiagram){this.Rt=!0;var rt=this;ki(function(){rt.currentTool.standardMouseOver(),rt.Rt=!1},10)}}}finally{this.aa=!0}}}};function zd(a,y){y=y.O.s;for(var x=y.length,E=0;E<x;E++)td(a,y[E])}function td(a,y){if(y instanceof ys){var x=y.element;if(x!==null&&x instanceof HTMLImageElement){x.Bg instanceof qe&&x.Bg.add(a);var E=y.Eg;if(E!==null&&E.sq===!0&&y.diagram!==null&&y.diagram.Xn.add(y),x.hn)if(x=x.getAttribute("src")||"",E=a.Og.I(x),E===null)E=[],E.push(y),a.Og.add(x,E);else{for(a=0;a<E.length;a++)if(E[a]===y)return;E.push(y)}}}}function Fg(a,y){if(y instanceof ys){var x=y.element;if(x!==null&&x instanceof HTMLImageElement&&x.hn){var E=x.getAttribute("src")||"",b=a.Og.I(E);if(b!==null){for(var z=0;z<b.length;z++)if(b[z]===y){b.splice(z,1),b.length===0&&(a.Og.remove(E),x.Fq&&x.removeEventListener("load",x.Fq),x.Yp&&x.removeEventListener("error",x.Yp),delete x.Fq,delete x.Yp,x.Bg instanceof qe&&x.Bg.remove(a),Df(E));break}}}}}Le.prototype.Wd=function(){this.partManager.Wd()},Le.prototype.Aj=function(a,y){this.Yd.Aj(a,y)},Le.prototype.Cj=function(a,y){this.Yd.Cj(a,y)},Le.prototype.findPartForKey=function(a){return this.partManager.findPartForKey(a)},Le.prototype.Vb=function(a){return this.partManager.Vb(a)},Le.prototype.findLinkForKey=function(a){return this.partManager.findLinkForKey(a)},Pt=Le.prototype,Pt.Lc=function(a){return this.partManager.Lc(a)},Pt.ii=function(a){return this.partManager.ii(a)},Pt.Kc=function(a){return this.partManager.Kc(a)},Pt.ms=function(a){for(var y=[],x=0;x<arguments.length;++x)y[x]=arguments[x];return this.partManager.ms.apply(this.partManager,y instanceof Array?y:on(Si(y)))},Pt.ls=function(a){for(var y=[],x=0;x<arguments.length;++x)y[x]=arguments[x];return this.partManager.ls.apply(this.partManager,y instanceof Array?y:on(Si(y)))};function fu(a){var y=a.pa,x=a.Ca;a.Rw.h(y.x,y.y,Math.max(a.Aa,0)/x,Math.max(a.ya,0)/x),a.vd=!0}function Ag(a,y){a.Zi=!1;var x=a.Sp;x.D(y)||(x=x.copy(),a.Sp.assign(y),ml(a,!1),a.R("DocumentBoundsChanged",void 0,x),a.Ee=!0,a.N())}Pt.Va=function(){if(this.Zi){var a=Ee.alloc();Ag(this,this.computeBounds(a)),Ee.free(a)}},Pt.rz=function(){for(var a=new qe,y=this.nodes;y.next();){var x=y.value;x.isTopLevel&&a.add(x)}for(y=this.links;y.next();)x=y.value,x.isTopLevel&&a.add(x);return a.iterator},Pt.qz=function(){return this.ai.iterator},Pt.Uz=function(a){Na(this),a&&gf(this,!0),this.ld?Ng(this,!1):(this.Jk=!0,el(this))};function gf(a,y){for(var x=a.ai.iterator;x.next();)tm(a,x.value,y);a.layout&&(y?a.layout.isValidLayout=!1:a.layout.C())}function tm(a,y,x){if(y!==null){for(var E=y.gl.iterator;E.next();)tm(a,E.value,x);y.layout!==null&&(x?y.layout.isValidLayout=!1:y.layout.C())}}function Ng(a,y){if(a.xh&&!a.lt){var x=a.aa;a.aa=!0;var E=a.undoManager.transactionLevel,b=a.layout,z=a.animationManager;try{E===0&&(a.undoManager.isInternalTransaction=!0,a.Ea("Layout")),1>=E&&!z.defaultAnimation.isAnimating&&!z.zb&&(y||Cu(z,"Layout")),a.xh=!1;for(var tt=a.ai.iterator;tt.next();)Dg(a,tt.value,y,E);b.isValidLayout||(!y||b.isRealtime||b.isRealtime===null||E===0?(b.doLayout(a),Na(a),b.isValidLayout=!0):a.xh=!0)}finally{y=a.undoManager.isInternalTransaction,E===0&&(a.eb("Layout"),a.undoManager.isInternalTransaction=!1),!y||E!==0&&E!==1||rf(z),a.aa=x}}}function Dg(a,y,x,E){if(y!==null){for(var b=y.gl.iterator;b.next();)Dg(a,b.value,x,E);b=y.layout,b===null||b.isValidLayout||(!x||b.isRealtime||E===0?(y.rh=!y.location.w(),b.doLayout(y),y.C(32),Cc(a,y),b.isValidLayout=!0):a.xh=!0)}}Pt.yz=function(){for(var a=new Xe,y=this.nodes;y.next();){var x=y.value;x.isTopLevel&&x.kh()===null&&a.add(x)}return a.iterator};function ev(a){function y(b){var z=b.toLowerCase(),tt=new Xe;x.add(b,tt),x.add(z,tt),E.add(b,b),E.add(z,b)}var x=new Me,E=new Me;y("InitialAnimationStarting"),y("AnimationStarting"),y("AnimationFinished"),y("BackgroundSingleClicked"),y("BackgroundDoubleClicked"),y("BackgroundContextClicked"),y("ClipboardChanged"),y("ClipboardPasted"),y("DocumentBoundsChanged"),y("ExternalObjectsDropped"),y("GainedFocus"),y("InitialLayoutCompleted"),y("LayoutCompleted"),y("LinkDrawn"),y("LinkRelinked"),y("LinkReshaped"),y("LostFocus"),y("Modified"),y("ObjectSingleClicked"),y("ObjectDoubleClicked"),y("ObjectContextClicked"),y("PartCreated"),y("PartResized"),y("PartRotated"),y("SelectionMoved"),y("SelectionCopied"),y("SelectionDeleting"),y("SelectionDeleted"),y("SelectionGrouped"),y("SelectionUngrouped"),y("ChangingSelection"),y("ChangedSelection"),y("SubGraphCollapsed"),y("SubGraphExpanded"),y("TextEdited"),y("TreeCollapsed"),y("TreeExpanded"),y("ViewportBoundsChanged"),y("InvalidateDraw"),a.iw=x,a.hw=E}function em(a,y){var x=a.hw.I(y);return x!==null?x:a.hw.I(y.toLowerCase())}function pf(a,y){var x=a.iw.I(y);if(x!==null||(x=a.iw.I(y.toLowerCase()),x!==null))return x;Gt("Unknown DiagramEvent name: "+y)}Pt.Bj=function(a,y){return a=pf(this,a),a!==null&&a.add(y),this},Pt.am=function(a,y){a=pf(this,a),a!==null&&a.remove(y)},Pt.R=function(a,y,x){var E=pf(this,a),b=new Qs;if(b.diagram=this,a=em(this,a),a!==null&&(b.name=a),y!==void 0&&(b.subject=y),x!==void 0&&(b.parameter=x),y=E.length,y===1)E.M(0)(b);else if(y!==0)for(E=E.Fa(),x=0;x<y;x++)(0,E[x])(b)};function mf(a){if(a.animationManager.isTicking)return!1;var y=a.currentTool;return y===a.toolManager.findTool("Dragging")?!a.Mr||y.isComplexRoutingRealtime:!0}Pt.Yj=function(a,y){return vf(this,!1,null,y||null).Yj(a.x,a.y,a.width,a.height)},Le.prototype.computeOccupiedArea=function(a){return this.isVirtualized?this.viewportBounds.copy():this.Zi?vg(this,a):a.assign(this.documentBounds)};function vf(a,y,x,E){var b=a.Xh;if(b===null&&(a.Xh=b=new sp(a.avoidanceCellSize)),b.vs||b.group!==x||b.Yx!==E){if(b.Hx=Math.max(b.Os+1,Math.floor(a.avoidanceLimit/a.avoidanceCellSize.width)),b.Ix=Math.max(b.Os+1,Math.floor(a.avoidanceLimit/a.avoidanceCellSize.height)),x!==null&&(x=nm(a,x)),x===null){y=Ee.alloc(),a.computeOccupiedArea(y),y.Bc(100,100),b.initialize(y);for(var z=a.nodes;z.next();){var tt=z.value,rt=tt.layer;rt!==null&&rt.visible&&!rt.isTemporary&&yf(a,tt,E,y)}Ee.free(y)}else{for(0<x.memberParts.count&&(y=a.computePartsBounds(x.memberParts,!1),y.Bc(20,20),b.initialize(y)),y=Ee.alloc(),z=x.memberParts;z.next();)tt=z.value,tt instanceof Un&&yf(a,tt,E,y);Ee.free(y)}b.group=x,b.Yx=E,b.vs=!1}else y&&rS(b);return b}function nm(a,y){return y.avoidable&&!y.isLinkLabel?y:y.containingGroup!==null?nm(a,y.containingGroup):null}function yf(a,y,x,E){if(y!==x&&y.isVisible()){if(y.avoidable&&!y.isLinkLabel){y=y.getAvoidableRect(E),a=a.Xh;var b=y.x,z=y.y;if(jf(a,b,z))for(x=(z-a.Od)/a.sc|0,E=Math.min((b+y.width-a.Nd)/a.rc|0,a.di),y=Math.min((z+y.height-a.Od)/a.sc|0,a.ei),b=(b-a.Nd)/a.rc|0;b<=E;b++)if(z=a.ac[b],z.fill)z.fill(bh,x,y+1);else for(var tt=x;tt<=y;tt++)z[tt]=bh}else if(y instanceof $i)for(y=y.memberParts;y.next();)b=y.value,b instanceof Un&&yf(a,b,x,E)}}function mh(a,y){a.Xh===null||a.Xh.vs||y!==void 0&&(!y.avoidable||y.isLinkLabel)||(a.Xh.vs=!0)}Le.prototype.gs=function(a){this.wp.assign(a),this.computeAutoScrollPosition(this.wp).Xa(this.position)?this.ug():Bg(this)};function Bg(a){a.vk===-1&&(a.vk=ki(function(){if(a.vk!==-1&&(a.ug(),a.lastInput.event!==null)){var y=a.computeAutoScrollPosition(a.wp);y.Xa(a.position)||(a.position=y,a.lastInput.documentPoint=a.Ps(a.wp),a.doMouseMove(),a.Zi=!0,y=Ee.alloc(),a.computeBounds(y),y.ed(a.documentBounds),Ag(a,y),Ee.free(y),a.Fc=!0,a.bd(),Bg(a))}},a.vp))}Le.prototype.ug=function(){this.vk!==-1&&(ln.clearTimeout(this.vk),this.vk=-1)},Le.prototype.computeAutoScrollPosition=function(a){var y=this.position,x=this.xp;if(0>=x.top&&0>=x.left&&0>=x.right&&0>=x.bottom)return y;var E=this.viewportBounds,b=this.scale;E=Ee.allocAt(0,0,E.width*b,E.height*b);var z=At.allocAt(0,0);if(a.x>=E.x&&a.x<E.x+x.left&&this.allowHorizontalScroll){var tt=Math.max(this.scrollHorizontalLineChange,1);tt|=0,z.x-=tt,a.x<E.x+x.left/2&&(z.x-=tt),a.x<E.x+x.left/4&&(z.x-=4*tt)}else a.x<=E.x+E.width&&a.x>E.x+E.width-x.right&&this.allowHorizontalScroll&&(tt=Math.max(this.scrollHorizontalLineChange,1),tt|=0,z.x+=tt,a.x>E.x+E.width-x.right/2&&(z.x+=tt),a.x>E.x+E.width-x.right/4&&(z.x+=4*tt));return a.y>=E.y&&a.y<E.y+x.top&&this.allowVerticalScroll?(tt=Math.max(this.scrollVerticalLineChange,1),tt|=0,z.y-=tt,a.y<E.y+x.top/2&&(z.y-=tt),a.y<E.y+x.top/4&&(z.y-=4*tt)):a.y<=E.y+E.height&&a.y>E.y+E.height-x.bottom&&this.allowVerticalScroll&&(tt=Math.max(this.scrollVerticalLineChange,1),tt|=0,z.y+=tt,a.y>E.y+E.height-x.bottom/2&&(z.y+=tt),a.y>E.y+E.height-x.bottom/4&&(z.y+=4*tt)),z.Xa(Nn)||(y=new At(y.x+z.x/b,y.y+z.y/b)),Ee.free(E),At.free(z),y},Pt=Le.prototype,Pt.Cs=function(){return null},Pt.av=function(){return null},Pt.bs=function(a,y){this.pj.add(a,y)},Pt.Fu=function(a){(this.Pw=a)||this.nodes.each(function(y){y instanceof $i&&(y.$p=null)})};function Ec(a,y,x){function E(){var ut=+new Date;for(z=!0,tt.reset();tt.next();)if(!tt.value[0].al){z=!1;break}z||ut-st>ot?y(x,b,rt):ln.requestAnimationFrame(E)}for(var b=x.callback,z=!0,tt=a.Og.iterator;tt.next();)if(!tt.value[0].al){z=!1;break}if(typeof b!="function"||z)return y(x,b,a);var rt=a,ot=x.callbackTimeout||300,st=+new Date;return ln.requestAnimationFrame(function(){E()}),null}Pt.Wz=function(a){return Lo?(a===void 0&&(a={}),a.returnType="Image",this.Jx(a)):null},Pt.Jx=function(a){return a===void 0&&(a={}),Ec(this,this.Xz,a)},Pt.Xz=function(a,y,x){var E=im(x,a,"canvas",null);if(E===null)return null;x=E.Z.canvas;var b=null;if(x!==null)switch(b=a.returnType,b===void 0?b="string":b=b.toLowerCase(),b){case Kd+"data":b=E.getImageData(0,0,x.width,x.height);break;case Kd:E=(a.document||document).createElement("img"),E.src=x.toDataURL(a.type,a.details),b=E;break;case"blob":return typeof y!="function"&&Gt('Error: Diagram.makeImageData called with "returnType: toBlob", but no required "callback" function property defined.'),typeof x.toBlob=="function"?(x.toBlob(y,a.type,a.details),"toBlob"):(y(null),null);default:b=x.toDataURL(a.type,a.details)}return typeof y=="function"?(y(b),null):b};function im(a,y,x,E){if(a.animationManager.Cc(),a.bd(),a.ta===null)return null;typeof y!="object"&&Gt("properties argument must be an Object.");var b=y.size||null,z=y.scale||null;y.scale!==void 0&&isNaN(y.scale)&&(z="NaN");var tt=y.maxSize;y.maxSize===void 0&&(tt=x==="SVG"?new Ke(1/0,1/0):new Ke(2e3,2e3));var rt=y.position||null,ot=y.parts||null,st=y.padding===void 0?1:y.padding,ut=y.background||null,ft=y.omitTemporary;ft===void 0&&(ft=!0);var mt=y.document||document,yt=y.elementFinished||null,wt=y.showTemporary;wt===void 0&&(wt=!ft),y=y.showGrid,y===void 0&&(y=wt),b!==null&&isNaN(b.width)&&isNaN(b.height)&&(b=null),typeof st=="number"?st=new Ji(st):st instanceof Ji||Gt("MakeImage padding must be a Margin or a number."),st.left=Math.max(st.left,0),st.right=Math.max(st.right,0),st.top=Math.max(st.top,0),st.bottom=Math.max(st.bottom,0),a.ib.Vc(!0),ft=new yl(null,mt,void 0,!0);var bt=ft.context;if(!(b||z||ot||rt))return ft.width=a.Aa+Math.ceil(st.left+st.right),ft.height=a.ya+Math.ceil(st.top+st.bottom),x==="SVG"?E===null?null:(E.resize(ft.width,ft.height,ft.width,ft.height),E.ownerDocument=mt,E.hs=yt,hf(a,E.context,st,new Ke(ft.width,ft.height),a.Ca,a.pa,ot,ut,wt,y),E.context):(a.Xm=!1,hf(a,bt,st,new Ke(ft.width,ft.height),a.Ca,a.pa,ot,ut,wt,y),a.Xm=!0,ft.context);var Zt=a.Pp,It=a.documentBounds.copy();if(It.Fv(a.yb),wt)for(var Yt=a.Wa.s,Jt=Yt.length,qt=0;qt<Jt;qt++){var ae=Yt[qt];if(ae.visible&&ae.isTemporary){ae=ae.Pa.s;for(var Ce=ae.length,In=0;In<Ce;In++){var ui=ae[In];ui.isInDocumentBounds&&ui.isVisible()&&(ui=ui.actualBounds,ui.w()&&It.ed(ui))}}}if(Yt=new At(It.x,It.y),ot!==null){for(Jt=new Ee(0,0,0,0),qt=!0,ae=ot.iterator,ae.reset();ae.next();)Ce=ae.value,Ce instanceof Li&&(In=Ce.layer,In!==null&&!In.visible||In!==null&&!wt&&In.isTemporary||!Ce.isVisible()||(Ce=Ce.actualBounds,Ce.w()&&(qt?(qt=!1,Jt.assign(Ce)):Jt.ed(Ce))));It.width=Jt.width,It.height=Jt.height,Yt.x=Jt.x,Yt.y=Jt.y}return rt!==null&&rt.w()&&(Yt=rt,z||(z=Zt)),Jt=rt=0,st!==null&&(rt=st.left+st.right,Jt=st.top+st.bottom),qt=ae=0,b!==null&&(ae=b.width,qt=b.height,isFinite(ae)&&(ae=Math.max(0,ae-rt)),isFinite(qt)&&(qt=Math.max(0,qt-Jt))),b!==null&&z!==null?(z==="NaN"&&(z=Zt),b.w()?(b=ae,It=qt):isNaN(qt)?(b=ae,It=It.height*z):(b=It.width*z,It=qt)):b!==null?b.w()?(z=Math.min(ae/It.width,qt/It.height),b=ae,It=qt):isNaN(qt)?(z=ae/It.width,b=ae,It=It.height*z):(z=qt/It.height,b=It.width*z,It=qt):z!==null?z==="NaN"&&tt.w()?(z=Math.min((tt.width-rt)/It.width,(tt.height-Jt)/It.height),z>Zt?(z=Zt,b=It.width,It=It.height):(b=tt.width,It=tt.height)):(b=It.width*z,It=It.height*z):(z=Zt,b=It.width,It=It.height),st!==null?(b+=rt,It+=Jt):st=new Ji(0),tt!==null&&(Zt=tt.width,tt=tt.height,isNaN(Zt)&&(Zt=2e3),isNaN(tt)&&(tt=2e3),isFinite(Zt)&&(b=Math.min(b,Zt)),isFinite(tt)&&(It=Math.min(It,tt))),ft.width=Math.ceil(b),ft.height=Math.ceil(It),x==="SVG"?E===null?null:(E.resize(ft.width,ft.height,ft.width,ft.height),E.ownerDocument=mt,E.hs=yt,hf(a,E.context,st,new Ke(Math.ceil(b),Math.ceil(It)),z,Yt,ot,ut,wt,y),E.context):(a.Xm=!1,hf(a,bt,st,new Ke(Math.ceil(b),Math.ceil(It)),z,Yt,ot,ut,wt,y),a.Xm=!0,ft.context)}ge.Object.defineProperties(Le.prototype,{renderer:{get:function(){return this.nl},set:function(a){this instanceof gt||(a===""&&(a="default"),a=a.toLowerCase(),a!==this.nl&&(this.nl=a,a==="default"||a==="canvas"?(a=this.pj.get("svg"),a!==null&&a.Oa.remove(),this.ta&&(this.ib=this.ta.context)):a==="svg"?(this.pj.contains("svg")?a=this.pj.get("svg"):(a=new gu(this,ln.document),this.bs("svg",a)),this.div!==null&&this.div.appendChild(a.Oa),this.ib=a.context,this.ta&&(this.ta.context.setTransform(this.Mb,0,0,this.Mb,0,0),this.ta.context.clearRect(0,0,this.Aa,this.ya))):a!=="debug"||this.pj.contains("SVG")||(a=new gu(this,ln.document),this.bs("SVG",a),a.Oa.style.backgroundColor="whitesmoke",this.div!==null&&this.div.after(a.Oa)),this.hk()))}},div:{get:function(){return this.Ka},set:function(a){if(this.Ka!==a){var y=this.Ka;y!==null?(y.H=void 0,y.goDiagram=void 0,y.go=void 0,y.innerHTML="",this.ta!==null&&(y=this.ta.Oa,this.removeEventListener(y,"pointermove",this.dk,!1),this.removeEventListener(y,"pointerdown",this.ui,!1),this.removeEventListener(y,"pointerup",this.fk,!1),this.removeEventListener(y,"pointerout",this.ek,!1),this.removeEventListener(y,"pointercancel",this.ck,!1),this.ta.mx()),this.ol&&(this.ol.disconnect(),this.ol=null),y=this.toolManager,y!==null&&(y.mouseDownTools.each(function(x){x.cancelWaitAfter()}),y.mouseMoveTools.each(function(x){x.cancelWaitAfter()}),y.mouseUpTools.each(function(x){x.cancelWaitAfter()})),y.cancelWaitAfter(),this.currentTool.doCancel(),this.ta=null,this.removeEventListener(ln,"resize",this.Ov,!1),this.removeEventListener(ln,"wheel",this.$j,!0),Eu===this&&(Eu=null)):this.ui===null&&(this.hf=!1),this.Ka=null,a!==null&&((y=a.H)&&(y.div=null),pg(this,a),this.hk())}}},$w:{get:function(){return this.Sq}},pi:{get:function(){return this.hf}},draggedLink:{get:function(){return this.nt},set:function(a){this.nt!==a&&(this.nt=a,a!==null&&(this.Vt=a.fromPort,this.Wt=a.toPort))}},Mx:{get:function(){return this.Vt},set:function(a){this.Vt=a}},Nx:{get:function(){return this.Wt},set:function(a){this.Wt=a}},animationManager:{get:function(){return this.Yd}},undoManager:{get:function(){return this.cc.undoManager}},skipsUndoManager:{get:function(){return this.Wg},set:function(a){this.Wg=a,this.cc.skipsUndoManager=a}},delaysLayout:{get:function(){return this.lt},set:function(a){this.lt=a}},opacity:{get:function(){return this.pb},set:function(a){var y=this.pb;y!==a&&((0>a||1<a)&&Mn(a,"0 <= value <= 1",Le,"opacity"),this.pb=a,this.g("opacity",y,a),this.N())}},validCycle:{get:function(){return this.wu},set:function(a){var y=this.wu;y!==a&&(this.wu=a,this.g("validCycle",y,a))}},layers:{get:function(){return this.Wa.iterator}},isModelReadOnly:{get:function(){var a=this.cc;return a===null?!1:a.isReadOnly},set:function(a){var y=this.cc;y!==null&&(y.isReadOnly=a)}},isReadOnly:{get:function(){return this.Gg},set:function(a){var y=this.Gg;y!==a&&(this.Gg=a,this.g("isReadOnly",y,a))}},isEnabled:{get:function(){return this.Jd},set:function(a){var y=this.Jd;y!==a&&(this.Jd=a,this.g("isEnabled",y,a))}},allowClipboard:{get:function(){return this.Us},set:function(a){var y=this.Us;y!==a&&(this.Us=a,this.g("allowClipboard",y,a))}},allowCopy:{get:function(){return this.Fi},set:function(a){var y=this.Fi;y!==a&&(this.Fi=a,this.g("allowCopy",y,a))}},allowDelete:{get:function(){return this.Gi},set:function(a){var y=this.Gi;y!==a&&(this.Gi=a,this.g("allowDelete",y,a))}},allowDragOut:{get:function(){return this.Vs},set:function(a){var y=this.Vs;y!==a&&(this.Vs=a,this.g("allowDragOut",y,a))}},allowDrop:{get:function(){return this.Ws},set:function(a){var y=this.Ws;y!==a&&(this.Ws=a,this.g("allowDrop",y,a))}},allowTextEdit:{get:function(){return this.Pi},set:function(a){var y=this.Pi;y!==a&&(this.Pi=a,this.g("allowTextEdit",y,a))}},allowGroup:{get:function(){return this.Hi},set:function(a){var y=this.Hi;y!==a&&(this.Hi=a,this.g("allowGroup",y,a))}},allowUngroup:{get:function(){return this.Qi},set:function(a){var y=this.Qi;y!==a&&(this.Qi=a,this.g("allowUngroup",y,a))}},allowInsert:{get:function(){return this.Ys},set:function(a){var y=this.Ys;y!==a&&(this.Ys=a,this.g("allowInsert",y,a))}},allowLink:{get:function(){return this.Ii},set:function(a){var y=this.Ii;y!==a&&(this.Ii=a,this.g("allowLink",y,a))}},allowRelink:{get:function(){return this.Ki},set:function(a){var y=this.Ki;y!==a&&(this.Ki=a,this.g("allowRelink",y,a))}},allowMove:{get:function(){return this.Ji},set:function(a){var y=this.Ji;y!==a&&(this.Ji=a,this.g("allowMove",y,a))}},allowReshape:{get:function(){return this.Li},set:function(a){var y=this.Li;y!==a&&(this.Li=a,this.g("allowReshape",y,a))}},allowResize:{get:function(){return this.Mi},set:function(a){var y=this.Mi;y!==a&&(this.Mi=a,this.g("allowResize",y,a))}},allowRotate:{get:function(){return this.Ni},set:function(a){var y=this.Ni;y!==a&&(this.Ni=a,this.g("allowRotate",y,a))}},allowSelect:{get:function(){return this.Oi},set:function(a){var y=this.Oi;y!==a&&(this.Oi=a,this.g("allowSelect",y,a))}},allowUndo:{get:function(){return this.Zs},set:function(a){var y=this.Zs;y!==a&&(this.Zs=a,this.g("allowUndo",y,a))}},allowZoom:{get:function(){return this.at},set:function(a){var y=this.at;y!==a&&(this.at=a,this.g("allowZoom",y,a))}},hasVerticalScrollbar:{get:function(){return this.nn},set:function(a){var y=this.nn;y!==a&&(this.nn=a,this.Ee=!0,this.N(),this.g("hasVerticalScrollbar",y,a),ml(this,!1))}},hasHorizontalScrollbar:{get:function(){return this.mn},set:function(a){var y=this.mn;y!==a&&(this.mn=a,this.Ee=!0,this.N(),this.g("hasHorizontalScrollbar",y,a),ml(this,!1))}},allowHorizontalScroll:{get:function(){return this.Xs},set:function(a){var y=this.Xs;y!==a&&(this.Xs=a,this.g("allowHorizontalScroll",y,a),ml(this,!1))}},allowVerticalScroll:{get:function(){return this.$s},set:function(a){var y=this.$s;y!==a&&(this.$s=a,this.g("allowVerticalScroll",y,a),ml(this,!1))}},scrollHorizontalLineChange:{get:function(){return this.iu},set:function(a){var y=this.iu;y!==a&&(0>a&&Mn(a,">= 0",Le,"scrollHorizontalLineChange"),this.iu=a,this.g("scrollHorizontalLineChange",y,a))}},scrollVerticalLineChange:{get:function(){return this.mu},set:function(a){var y=this.mu;y!==a&&(0>a&&Mn(a,">= 0",Le,"scrollVerticalLineChange"),this.mu=a,this.g("scrollVerticalLineChange",y,a))}},lastInput:{get:function(){return this.cj},set:function(a){this.cj=a}},previousInput:{get:function(){return this.Qg},set:function(a){this.Qg=a}},firstInput:{get:function(){return this.bq},set:function(a){this.bq=a}},currentCursor:{get:function(){return this.it},set:function(a){if(a===""&&(a=this.Op),this.it!==a){var y=this.ta,x=this.Ka;if(y!==null&&x!==null){this.it=a;var E=y.style.cursor;y.style.cursor=a,x.style.cursor=a,y.style.cursor===E&&(y.style.cursor="-webkit-"+a,x.style.cursor="-webkit-"+a,y.style.cursor===E&&(y.style.cursor="-moz-"+a,x.style.cursor="-moz-"+a,y.style.cursor===E&&(y.style.cursor=a,x.style.cursor=a)))}}}},defaultCursor:{get:function(){return this.Op},set:function(a){a===""&&(a="auto");var y=this.Op;y!==a&&(this.Op=a,this.g("defaultCursor",y,a))}},click:{get:function(){return this.zh},set:function(a){var y=this.zh;y!==a&&(this.zh=a,this.g("click",y,a))}},doubleClick:{get:function(){return this.Fh},set:function(a){var y=this.Fh;y!==a&&(this.Fh=a,this.g("doubleClick",y,a))}},contextClick:{get:function(){return this.Bh},set:function(a){var y=this.Bh;y!==a&&(this.Bh=a,this.g("contextClick",y,a))}},mouseOver:{get:function(){return this.Qh},set:function(a){var y=this.Qh;y!==a&&(this.Qh=a,this.g("mouseOver",y,a))}},mouseHover:{get:function(){return this.Oh},set:function(a){var y=this.Oh;y!==a&&(this.Oh=a,this.g("mouseHover",y,a))}},mouseHold:{get:function(){return this.Nh},set:function(a){var y=this.Nh;y!==a&&(this.Nh=a,this.g("mouseHold",y,a))}},mouseDragOver:{get:function(){return this.Qt},set:function(a){var y=this.Qt;y!==a&&(this.Qt=a,this.g("mouseDragOver",y,a))}},mouseDrop:{get:function(){return this.Lh},set:function(a){var y=this.Lh;y!==a&&(this.Lh=a,this.g("mouseDrop",y,a))}},handlesDragDropForTopLevelParts:{get:function(){return this.xt},set:function(a){var y=this.xt;y!==a&&(this.xt=a,this.g("handlesDragDropForTopLevelParts",y,a))}},mouseEnter:{get:function(){return this.Mh},set:function(a){var y=this.Mh;y!==a&&(this.Mh=a,this.g("mouseEnter",y,a))}},mouseLeave:{get:function(){return this.Ph},set:function(a){var y=this.Ph;y!==a&&(this.Ph=a,this.g("mouseLeave",y,a))}},toolTip:{get:function(){return this.$h},set:function(a){var y=this.$h;y!==a&&(this.$h=a,this.g("toolTip",y,a))}},contextMenu:{get:function(){return this.Ch},set:function(a){var y=this.Ch;y!==a&&(this.Ch=a,this.g("contextMenu",y,a))}},commandHandler:{get:function(){return this.nb},set:function(a){this.nb!==a&&(this.nb=a,a.Xe(this))}},toolManager:{get:function(){return this.te},set:function(a){this.te!==a&&(this.te=a,a.diagram=this)}},defaultTool:{get:function(){return this.ob},set:function(a){var y=this.ob;y!==a&&(this.ob=a,a.diagram=this,this.currentTool===y&&(this.currentTool=a))}},currentTool:{get:function(){return this.hb},set:function(a){var y=this.hb;y&&(y.isActive&&y.doDeactivate(),y.cancelWaitAfter(),y.doStop()),a===null&&(a=this.defaultTool),a!==null&&(this.hb=a,a.diagram=this,a.doStart())}},selection:{get:function(){return this.Hw}},maxSelectionCount:{get:function(){return this.Nt},set:function(a){var y=this.Nt;if(y!==a)if(0<=a&&!isNaN(a)){if(this.Nt=a,this.g("maxSelectionCount",y,a),!this.undoManager.isUndoingRedoing&&(a=this.selection.count-a,0<a)){this.R("ChangingSelection",this.selection),y=this.selection.Fa();for(var x=0;x<a;x++)y[x].isSelected=!1;this.R("ChangedSelection",this.selection)}}else Mn(a,">= 0",Le,"maxSelectionCount")}},nodeSelectionAdornmentTemplate:{get:function(){return this.St},set:function(a){var y=this.St;y!==a&&(this.St=a,this.g("nodeSelectionAdornmentTemplate",y,a))}},groupSelectionAdornmentTemplate:{get:function(){return this.wt},set:function(a){var y=this.wt;y!==a&&(this.wt=a,this.g("groupSelectionAdornmentTemplate",y,a))}},linkSelectionAdornmentTemplate:{get:function(){return this.Kt},set:function(a){var y=this.Kt;y!==a&&(this.Kt=a,this.g("linkSelectionAdornmentTemplate",y,a))}},highlighteds:{get:function(){return this.nw}},isModified:{get:function(){var a=this.undoManager;return a.isEnabled?a.currentTransaction!==null?!0:this.rn&&this.Ce!==a.historyIndex:this.rn},set:function(a){if(this.rn!==a){this.rn=a;var y=this.undoManager;!a&&y.isEnabled&&(this.Ce=y.historyIndex),a||$p(this)}}},model:{get:function(){return this.cc},set:function(a){var y=this.cc;if(y!==a){this.currentTool.doCancel(),y&&y.undoManager!==a.undoManager&&y.undoManager.isInTransaction&&Gt("Do not replace a Diagram.model while a transaction is in progress."),this.animationManager.Cc(!0);var x=gg(this,!0);this.hf=!1,this.fn=!0,this.Ce=-2,this.kg=!1;var E=this.vb;this.vb=!0,Cu(this.animationManager,"Model"),y&&(this.pf!==null&&this.pf.each(function(z){return y.ik(z)}),y.ik(this.Oc)),this.cc=a,this.partManager=Mg(this.cc.type);for(var b=0;b<x.length;b++)this.add(x[b]);a.Pe(this.Hb),this.partManager.addAllModeledParts(),a.ik(this.Hb),a.Pe(this.Oc),this.pf!==null&&this.pf.each(function(z){return a.Pe(z)}),this.vb=E,this.Ya(),this.vb||this.N(),y&&a.undoManager.copyProperties(y.undoManager)}}},aa:{get:function(){return this.rw},set:function(a){this.rw=a}},As:{get:function(){return this.sy}},skipsModelSourceBindings:{get:function(){return this.Iw},set:function(a){this.Iw=a}},Ns:{get:function(){return this.ou},set:function(a){this.ou=a}},nodeTemplate:{get:function(){return this.Lg.I("")},set:function(a){var y=this.Lg.I("");y!==a&&(this.Lg.add("",a),this.g("nodeTemplate",y,a),this.undoManager.isUndoingRedoing||this.Wd())}},nodeTemplateMap:{get:function(){return this.Lg},set:function(a){var y=this.Lg;y!==a&&(this.Lg=a,this.g("nodeTemplateMap",y,a),this.undoManager.isUndoingRedoing||this.Wd())}},groupTemplate:{get:function(){return this.Yi.I("")},set:function(a){var y=this.Yi.I("");y!==a&&(this.Yi.add("",a),this.g("groupTemplate",y,a),this.undoManager.isUndoingRedoing||this.Wd())}},groupTemplateMap:{get:function(){return this.Yi},set:function(a){var y=this.Yi;y!==a&&(this.Yi=a,this.g("groupTemplateMap",y,a),this.undoManager.isUndoingRedoing||this.Wd())}},linkTemplate:{get:function(){return this.Kh.I("")},set:function(a){var y=this.Kh.I("");y!==a&&(this.Kh.add("",a),this.g("linkTemplate",y,a),this.undoManager.isUndoingRedoing||this.Wd())}},linkTemplateMap:{get:function(){return this.Kh},set:function(a){var y=this.Kh;y!==a&&(this.Kh=a,this.g("linkTemplateMap",y,a),this.undoManager.isUndoingRedoing||this.Wd())}},isMouseCaptured:{get:function(){return this.qw},set:function(a){var y=this.ta;y!==null&&(y=y.Oa,y instanceof SVGElement||(a?(this.lastInput.bubbles=!1,this.removeEventListener(y,"pointermove",this.dk,!1),this.removeEventListener(y,"pointerdown",this.ui,!1),this.removeEventListener(y,"pointerup",this.fk,!1),this.removeEventListener(y,"pointerout",this.ek,!1),this.removeEventListener(y,"pointercancel",this.ck,!1),this.addEventListener(ln,"pointermove",this.dk,!0),this.addEventListener(ln,"pointerdown",this.ui,!0),this.addEventListener(ln,"pointerup",this.fk,!0),this.addEventListener(ln,"pointerout",this.ek,!0),this.addEventListener(ln,"pointercancel",this.ck,!0),this.removeEventListener(y,"wheel",this.$j,!1),this.addEventListener(ln,"wheel",this.$j,!0),this.addEventListener(ln,"selectstart",this.preventDefault,!1)):(this.removeEventListener(ln,"pointermove",this.dk,!0),this.removeEventListener(ln,"pointerdown",this.ui,!0),this.removeEventListener(ln,"pointerup",this.fk,!0),this.removeEventListener(ln,"pointerout",this.ek,!0),this.removeEventListener(ln,"pointercancel",this.ck,!0),this.addEventListener(y,"pointermove",this.dk,!1),this.addEventListener(y,"pointerdown",this.ui,!1),this.addEventListener(y,"pointerup",this.fk,!1),this.addEventListener(y,"pointerout",this.ek,!1),this.addEventListener(y,"pointercancel",this.ck,!1),this.removeEventListener(ln,"wheel",this.$j,!0),this.removeEventListener(ln,"selectstart",this.preventDefault,!1),this.addEventListener(y,"wheel",this.$j,!1)),this.qw=a))}},position:{get:function(){return this.pa},set:function(a){var y=At.alloc().assign(this.pa);if(!y.D(a)){var x=this.viewportBounds.copy();this.pa.assign(a),Hp(this.animationManager,y,this.pa),this.vb||this.ta===null&&!this.wo.w()?fu(this):(this.vb=!0,a=this.scale,yg(this,this.Sp,this.Aa/a,this.ya/a,this.zk,!1),this.vb=!1),this.vb||this.onViewportBoundsChanged(x,this.viewportBounds,this.Ca,!1)}At.free(y)}},initialPosition:{get:function(){return this.zt},set:function(a){this.zt.D(a)||(this.zt=a.J())}},initialScale:{get:function(){return this.At},set:function(a){this.At!==a&&(this.At=a)}},grid:{get:function(){return this.fe===null&&(this.fe=Jp(this)),this.fe},set:function(a){var y=this.fe;if(y!==a){y===null&&(y=this.fe=Jp(this)),a.type!==mn.Grid&&Gt("Diagram.grid must be a Panel of type Panel.Grid");var x=y.panel;x!==null&&x.remove(y),this.fe=a,a.name="GRID",x!==null&&x.add(a),cu(this),this.N(),this.g("grid",y,a)}}},viewportBounds:{get:function(){return this.Rw}},viewSize:{get:function(){return this.wo},set:function(a){var y=this.viewSize;y.D(a)||(this.wo=a=a.J(),this.ya=this.Aa=0,a.w()?(this.Aa=a.width,this.ya=a.height):this.Ka!==null&&(this.Aa=this.Ka.clientWidth||1,this.ya=this.Ka.clientHeight||1),fu(this),this.Ya(),this.g("viewSize",y,a),this.redraw())}},fixedBounds:{get:function(){return this.ut},set:function(a){var y=this.ut;y.D(a)||(a.width!==-1/0&&a.height!==1/0&&a.height!==-1/0||Gt("fixedBounds width/height must not be Infinity"),this.ut=a=a.J(),this.Ya(),this.g("fixedBounds",y,a))}},scrollMargin:{get:function(){return this.rj},set:function(a){typeof a=="number"&&(a=new Ji(a));var y=this.rj;y.D(a)||(this.rj=a=a.J(),this.g("scrollMargin",y,a),this.hk())}},scrollMode:{get:function(){return this.sj},set:function(a){var y=this.sj;y!==a&&(this.sj=a,a===vh&&ml(this,!1),this.g("scrollMode",y,a),this.Ee=!0,this.N())}},scrollsPageOnFocus:{get:function(){return this.nu},set:function(a){var y=this.nu;y!==a&&(this.nu=a,this.g("scrollsPageOnFocus",y,a))}},positionComputation:{get:function(){return this.Zt},set:function(a){var y=this.Zt;y!==a&&(this.Zt=a,ml(this,!1),this.g("positionComputation",y,a))}},scaleComputation:{get:function(){return this.fu},set:function(a){var y=this.fu;y!==a&&(this.fu=a,bg(this,this.scale,this.scale),this.g("scaleComputation",y,a))}},documentBounds:{get:function(){return this.Sp}},isVirtualized:{get:function(){return this.It},set:function(a){var y=this.It;y!==a&&(this.It=a,this.g("isVirtualized",y,a))}},scale:{get:function(){return this.Ca},set:function(a){var y=this.Ca;y!==a&&bg(this,y,a)}},defaultScale:{get:function(){return this.Pp},set:function(a){this.Pp=a}},autoScale:{get:function(){return this.yh},set:function(a){var y=this.yh;y!==a&&(this.yh=a,this.g("autoScale",y,a),a!==Va&&ml(this,!1))}},initialAutoScale:{get:function(){return this.Fg},set:function(a){var y=this.Fg;y!==a&&(this.Fg=a,this.g("initialAutoScale",y,a))}},initialViewportSpot:{get:function(){return this.Bt},set:function(a){var y=this.Bt;y!==a&&(a.sb()||Gt("initialViewportSpot must be a specific Spot: "+a),this.Bt=a,this.g("initialViewportSpot",y,a))}},initialDocumentSpot:{get:function(){return this.yt},set:function(a){var y=this.yt;y!==a&&(a.sb()||Gt("initialViewportSpot must be a specific Spot: "+a),this.yt=a,this.g("initialDocumentSpot",y,a))}},minScale:{get:function(){return this.Ot},set:function(a){var y=this.Ot;y!==a&&(0<a?(this.Ot=a,this.g("minScale",y,a),a>this.scale&&(this.scale=a)):Mn(a,"> 0",Le,"minScale"))}},maxScale:{get:function(){return this.Mt},set:function(a){var y=this.Mt;y!==a&&(0<a?(this.Mt=a,this.g("maxScale",y,a),a<this.scale&&(this.scale=a)):Mn(a,"> 0",Le,"maxScale"))}},zoomPoint:{get:function(){return this.zu},set:function(a){this.zu.D(a)||(this.zu=a=a.J())}},contentAlignment:{get:function(){return this.zk},set:function(a){var y=this.zk;y.D(a)||(this.zk=a=a.J(),this.g("contentAlignment",y,a),ml(this,!1))}},initialContentAlignment:{get:function(){return this.pq},set:function(a){var y=this.pq;y.D(a)||(this.pq=a=a.J(),this.g("initialContentAlignment",y,a))}},padding:{get:function(){return this.yb},set:function(a){typeof a=="number"&&(a=new Ji(a));var y=this.yb;y.D(a)||(this.yb=a=a.J(),this.Ya(),this.g("padding",y,a))}},partManager:{get:function(){return this.Pc},set:function(a){var y=this.Pc;y!==a&&(a.diagram!==null&&Gt("Cannot share PartManagers between Diagrams: "+a.toString()),y&&y.Xe(null),this.Pc=a,a.Xe(this))}},nodes:{get:function(){return this.partManager.nodes.iterator}},links:{get:function(){return this.partManager.links.iterator}},parts:{get:function(){return this.partManager.parts.iterator}},layout:{get:function(){return this.Sc},set:function(a){var y=this.Sc;y!==a&&(this.Sc=a,a.diagram=this,a.group=null,this.xh=!0,this.g("layout",y,a),this.$b())}},isTreePathToChildren:{get:function(){return this.Ht},set:function(a){var y=this.Ht;if(y!==a&&(this.Ht=a,this.g("isTreePathToChildren",y,a),!this.undoManager.isUndoingRedoing))for(a=this.nodes;a.next();)Qg(a.value)}},treeCollapsePolicy:{get:function(){return this.uu},set:function(a){var y=this.uu;y!==a&&(a!==yh&&a!==Yo&&a!==xf&&Gt("Unknown Diagram.treeCollapsePolicy: "+a),this.uu=a,this.g("treeCollapsePolicy",y,a))}},Ue:{get:function(){return this.pw},set:function(a){this.pw=a}},avoidanceCellSize:{get:function(){return this.aw},set:function(a){this.Xh=null,this.aw=new Ke(Math.max(1,a.width),Math.max(1,a.height))}},avoidanceLimit:{get:function(){return this.bw},set:function(a){this.bw=Math.max(1,a)}},autoScrollInterval:{get:function(){return this.vp},set:function(a){var y=this.vp;y!==a&&(this.vp=a,this.g("autoScrollInterval",y,a))}},autoScrollRegion:{get:function(){return this.xp},set:function(a){typeof a=="number"&&(a=new Ji(a));var y=this.xp;y.D(a)||(this.xp=a=a.J(),this.Ya(),this.g("autoScrollRegion",y,a))}}}),ge.Object.defineProperties(Le,{licenseKey:{get:function(){return zg.jc()},set:function(a){zg.add(a.replace(/\s/g,""))}},version:{get:function(){return Hd}}}),Le.prototype.makeImageData=Le.prototype.Jx,Le.prototype.makeImage=Le.prototype.Wz,Le.prototype.cacheGroupExternalLinks=Le.prototype.Fu,Le.prototype.addRenderer=Le.prototype.bs,Le.prototype.makeSVG=Le.prototype.av,Le.prototype.makeSvg=Le.prototype.Cs,Le.prototype.stopAutoScroll=Le.prototype.ug,Le.prototype.doAutoScroll=Le.prototype.gs,Le.prototype.isUnoccupied=Le.prototype.Yj,Le.prototype.raiseDiagramEvent=Le.prototype.R,Le.prototype.removeDiagramListener=Le.prototype.am,Le.prototype.addDiagramListener=Le.prototype.Bj,Le.prototype.findTreeRoots=Le.prototype.yz,Le.prototype.layoutDiagram=Le.prototype.Uz,Le.prototype.findTopLevelGroups=Le.prototype.qz,Le.prototype.findTopLevelNodesAndLinks=Le.prototype.rz,Le.prototype.ensureBounds=Le.prototype.Va,Le.prototype.findLinksByExample=Le.prototype.ls,Le.prototype.findNodesByExample=Le.prototype.ms,Le.prototype.findLinkForData=Le.prototype.Kc,Le.prototype.findNodeForData=Le.prototype.ii,Le.prototype.findPartForData=Le.prototype.Lc,Le.prototype.findLinkForKey=Le.prototype.findLinkForKey,Le.prototype.findNodeForKey=Le.prototype.Vb,Le.prototype.findPartForKey=Le.prototype.findPartForKey,Le.prototype.rebuildParts=Le.prototype.Wd,Le.prototype.transformViewToDoc=Le.prototype.Ps,Le.prototype.transformRectDocToView=Le.prototype.zA,Le.prototype.transformDocToView=Le.prototype.op,Le.prototype.centerRect=Le.prototype.es,Le.prototype.scrollToRect=Le.prototype.tv,Le.prototype.scroll=Le.prototype.scroll,Le.prototype.highlightCollection=Le.prototype.Jz,Le.prototype.highlight=Le.prototype.Iz,Le.prototype.selectCollection=Le.prototype.rA,Le.prototype.select=Le.prototype.select,Le.prototype.updateAllRelationshipsFromData=Le.prototype.rp,Le.prototype.updateAllTargetBindings=Le.prototype.updateAllTargetBindings,Le.prototype.commit=Le.prototype.commit,Le.prototype.rollbackTransaction=Le.prototype.Kf,Le.prototype.commitTransaction=Le.prototype.eb,Le.prototype.startTransaction=Le.prototype.Ea,Le.prototype.raiseChanged=Le.prototype.g,Le.prototype.raiseChangedEvent=Le.prototype.cb,Le.prototype.removeChangedListener=Le.prototype.ik,Le.prototype.addChangedListener=Le.prototype.Pe,Le.prototype.removeModelChangedListener=Le.prototype.mA,Le.prototype.addModelChangedListener=Le.prototype.Yw,Le.prototype.findLayer=Le.prototype.Qj,Le.prototype.removeLayer=Le.prototype.kA,Le.prototype.addLayerAfter=Le.prototype.Cy,Le.prototype.addLayerBefore=Le.prototype.Ww,Le.prototype.addLayer=Le.prototype.Al,Le.prototype.moveParts=Le.prototype.moveParts,Le.prototype.copyParts=Le.prototype.Kj,Le.prototype.removeParts=Le.prototype.Is,Le.prototype.remove=Le.prototype.remove,Le.prototype.add=Le.prototype.add,Le.prototype.clearDelayedGeometries=Le.prototype.bx,Le.prototype.setProperties=Le.prototype.nm,Le.prototype.attach=Le.prototype.Du,Le.prototype.set=Le.prototype.set,Le.prototype.resetInputOptions=Le.prototype.Sx,Le.prototype.setInputOption=Le.prototype.sA,Le.prototype.getInputOption=Le.prototype.Ql,Le.prototype.resetRenderingHints=Le.prototype.Tx,Le.prototype.setRenderingHint=Le.prototype.Xx,Le.prototype.getRenderingHint=Le.prototype.Gf,Le.prototype.maybeUpdate=Le.prototype.bd,Le.prototype.requestUpdate=Le.prototype.$b,Le.prototype.delayInitialization=Le.prototype.Xy,Le.prototype.isUpdateRequested=Le.prototype.Pz,Le.prototype.invalidateDocumentBounds=Le.prototype.Ya,Le.prototype.findObjectsNear=Le.prototype.og,Le.prototype.findPartsNear=Le.prototype.mz,Le.prototype.findObjectsIn=Le.prototype.Cf,Le.prototype.findPartsIn=Le.prototype.ux,Le.prototype.findObjectsAt=Le.prototype.ji,Le.prototype.findPartsAt=Le.prototype.lz,Le.prototype.findObjectAt=Le.prototype.ic,Le.prototype.findPartAt=Le.prototype.Ol,Le.prototype.focusObject=Le.prototype.zz,Le.prototype.alignDocument=Le.prototype.Jy,Le.prototype.zoomToRect=Le.prototype.BA,Le.prototype.zoomToFit=Le.prototype.zoomToFit,Le.prototype.diagramScroll=Le.prototype.kx,Le.prototype.focus=Le.prototype.focus;var Sf=new Me,rm=null,Lo=ln.document!==void 0,Gd=null,ed="",Va=new Ue(Le,"None",0),Zs=new Ue(Le,"Uniform",1),nd=new Ue(Le,"UniformToFill",2),kc=new Ue(Le,"CycleAll",10),Tg=new Ue(Le,"CycleNotDirected",11),Og=new Ue(Le,"CycleNotDirectedFast",12),Ig=new Ue(Le,"CycleNotUndirected",13),Rg=new Ue(Le,"CycleDestinationTree",14),jg=new Ue(Le,"CycleSourceTree",15),vh=new Ue(Le,"DocumentScroll",1),Lc=new Ue(Le,"InfiniteScroll",2),yh=new Ue(Le,"TreeParentCollapsed",21),Yo=new Ue(Le,"AllParentsCollapsed",22),xf=new Ue(Le,"AnyParentsCollapsed",23),zg=new Xe,Hd="2.3.10",Kd="image",bc=null,om=!1;function Ra(){if(Lo){var a=ln.document.createElement("canvas"),y=a.getContext("2d"),x=Ge("7ca11abfd022028846");y[x]=Ge("398c3597c01238");for(var E=["5da73c80a36455d7038e4972187c3cae51fd22",jn.Dx+"4ae6247590da4bb21c324ba3a84e385776",Ii.xF+"fb236cdfda5de14c134ba1a95a2d4c7cc6f93c1387",ue.za],b=1;5>b;b++)y[Ge("7ca11abfd7330390")](Ge(E[b-1]),10,15*b);for(y[x]=Ge("39f046ebb36e4b"),x=1;5>x;x++)y[Ge("7ca11abfd7330390")](Ge(E[x-1]),10,15*x);(E.length!==4||E[0][0]!=="5"||E[3][0]!=="7")&&(Ii.prototype.Cd=Ii.prototype.Eu),bc=a}}Le.className="Diagram",Le.fromDiv=function(a){var y=a;return typeof a=="string"&&(y=ln.document.getElementById(a)),y instanceof HTMLDivElement&&y.H instanceof Le?y.H:null},Le.inherit=function(a,y){function x(){}if(Object.getPrototypeOf(a).prototype)throw Error(`Used go.Diagram.inherit defining already defined class
|
|
`+a);x.prototype=y.prototype,a.prototype=new x,a.prototype.constructor=a},Le.useDOM=function(a){Lo=a?ln.document!==void 0:!1},Le.isUsingDOM=function(){return Lo},Le.None=Va,Le.Uniform=Zs,Le.UniformToFill=nd,Le.CycleAll=kc,Le.CycleNotDirected=Tg,Le.CycleNotDirectedFast=Og,Le.CycleNotUndirected=Ig,Le.CycleDestinationTree=Rg,Le.CycleSourceTree=jg,Le.DocumentScroll=vh,Le.InfiniteScroll=Lc,Le.TreeParentCollapsed=yh,Le.AllParentsCollapsed=Yo,Le.AnyParentsCollapsed=xf;function am(){this.wy=null,this.j="zz@orderNum",this._tk==="63ad05bbe23a1786468a4c741b6d2"?this.Rc=this.j=!0:this.Rc=null}function Zd(a,y){if(y.ib.setTransform(y.Mb,0,0,y.Mb,0,0),y.ib.yc(),a.Rc===null)t:{y="f";var x=ln[Ge("76a715b2f73f148a")][Ge("72ba13b5")]||"";if(a.Rc=!0,Lo){var E=Le[Ge("76a115b6ed251eaf4692")];if(E)for(var b=zg.iterator;b.next()&&(E=b.value,E=Ge(E).split(Ge("39e9")),!(6>E.length));){var z=Ge(E[1]).split(".");if(E[4]!=="7da71ca0")break;var tt=Ge(jn[Ge("6cae19")]).split(".");if(z[0]>tt[0]||z[0]===tt[0]&&z[1]>=tt[1]){var rt=ln[Ge("74a900bae4370f8b51")][Ge("6fbb13a1c2311e8a57")].toLowerCase();if(tt=rt[Ge("73a612b6fb191d")](Ge("3aad1ab6e022098b4dc4")),z=Ge(E[2]),-1<tt&&(rt=rt[Ge("73a612b6fb191d")](z.toLowerCase()+"/"),a.Rc=!(-1<rt&&rt<tt),!a.Rc))break;for(tt=x[Ge("76ad18b4f73e")],rt=x[Ge("73a612b6fb191d")](Ge("35e7"))+2;rt<tt;rt++)y+=x[rt];if(tt=y[Ge("73a612b6fb191d")](z),0>tt&&z!==Ge("7da71ca0ad381e90")&&(tt=y[Ge("73a612b6fb191d")](Ge("76a715b2ef3e149757"))),0>tt&&(tt=y[Ge("73a612b6fb191d")](Ge("76a715b2ef3e149757"))),0>tt&&(tt=y[Ge("73a612b6fb191d")](Ge("2bfa41fdb3784bca12"))),0>tt&&(tt=x[Ge("73a612b6fb191d")](Ge("7baa19a6f76c1988428554"))),a.Rc=!(0<=tt&&tt<y[Ge("73a612b6fb191d")](Ge("35"))||y[Ge("73a612b6fb191d")](Ge("35"))===-1),!a.Rc||x[Ge("73a612b6fb191d")](Ge("7fb002b6ed25128b4da25b2e"))&&(a.Rc=!(-1<x[Ge("73a612b6fb191d")](z)),!a.Rc)||(tt=ln[Ge("76a715b2f73f148a")][Ge("69ad17a1e03e")],rt=tt[Ge("73a612b6fb191d")](Ge("7fb002b6ed25128b4da25b2e")),-1<rt&&(a.Rc=!(tt[Ge("73a612b6fb191d")](z)>rt),!a.Rc)))break;if(z[0]==="#"){tt=ln.document.createElement("div");for(var ot=E[0].replace(/[A-Za-z]/g,"");4>ot.length;)ot+="9";if(rt=ot,ot=ot.substr(ot.length-4),E="",E+=["gsh","gsf"][parseInt(ot.substr(0,1),10)%2],E+=["Header","Background","Display","Feedback"][parseInt(ot.substr(0,1),10)%4],tt[Ge("79a417a0f0181a8946")]=E,ln.document[Ge("78a712aa")]){ln.document[Ge("78a712aa")][Ge("7bb806b6ed32388c4a875b")](tt),ot=ln.getComputedStyle(tt).getPropertyValue(Ge("78a704b7e62456904c9b12701b6532a8"));var st=ln.getComputedStyle(tt).getPropertyValue(Ge("75b817b0ea2202"));if(ln.document[Ge("78a712aa")][Ge("68ad1bbcf533388c4a875b")](tt),ot){if(tt=ln[Ge("77a902b0eb1b1e804a8a")],st==="0."+parseInt(rt,10)%100||ot.indexOf(parseInt(z[1]+z[2],16))!==-1&&ot.indexOf(parseInt(z[3]+z[4],16))!==-1){a.Rc=!1;break}else if(tt&&tt(Ge("32ae19a1e0331fc94084537c067a67fa59f1386b89d006")).matches)for(E="."+E,z=0;z<document.styleSheets.length;z++){tt=document.styleSheets[z].rules||document.styleSheets[z].cssRules;for(var ut in tt)if(E===tt[ut].selectorText){a.Rc=!1;break t}}}}else a.Rc=null,a.Rc=!1}}}else{for(ut=x[Ge("76ad18b4f73e")],b=x[Ge("73a612b6fb191d")](Ge("35e7"))+2;b<ut;b++)y+=x[b];x=y[Ge("73a612b6fb191d")](Ge("7da71ca0ad381e90")),a.Rc=!(0<=x&&x<y[Ge("73a612b6fb191d")](Ge("35")))}}}return 0<a.Rc&&a!==a.wy}am.className="DiagramHelper";function Uu(a){this.j=a===void 0?new At:a,this.o=new At}ge.Object.defineProperties(Uu.prototype,{point:{get:function(){return this.j},set:function(a){this.j=a}},shifted:{get:function(){return this.o},set:function(a){this.o=a}}});var Mc="DraggingInfo";Uu.className="DraggingInfo";function it(a,y,x){this.node=a,this.info=y,this.Su=x}it.className="DraggingNodeInfoPair";function at(){this.reset()}at.prototype.reset=function(){this.isGridSnapEnabled=!1,this.isGridSnapRealtime=!0,this.gridSnapCellSize=new Ke(NaN,NaN).freeze(),this.gridSnapCellSpot=Sr,this.gridSnapOrigin=new At(NaN,NaN).freeze(),this.groupsSnapMembers=this.dragsTree=this.dragsLink=!1,this.dragsMembers=this.groupsAlwaysMove=!0},at.className="DraggingOptions";function dt(a,y){if(typeof a=="string"||ln.Element&&a instanceof Element)var x=Le.call(this,a)||this;else x=Le.call(this)||this,y=a;return ht(x),y&&x.nm(y),x}we(dt,Le);function ht(a){a.allowDragOut=!0,a.allowMove=!1,a.isReadOnly=!0,a.contentAlignment=Ir,a.layout=new Pa}dt.prototype.reset=function(){Le.prototype.reset.call(this),ht(this)},dt.className="Palette";function gt(a,y){if(typeof a=="string"||ln.Element&&a instanceof Element)var x=Le.call(this,a)||this;else x=Le.call(this)||this,y=a;var E=x;x.animationManager.isEnabled=!1,x.vb=!0,x.V=null,x.mn=!1,x.nn=!1,x.F=!0,x.u=!0,x.ia=0,x.o=!1,x.ql=null,x.Xx("drawShadows",!1),a=new Li;var b=new lr;return b.stroke="magenta",b.strokeWidth=2,b.fill="transparent",b.name="BOXSHAPE",a.selectable=!0,a.selectionAdorned=!1,a.selectionObjectName="BOXSHAPE",a.locationObjectName="BOXSHAPE",a.resizeObjectName="BOXSHAPE",a.cursor="move",a.add(b),x.j=a,x.allowCopy=!1,x.allowDelete=!1,x.allowSelect=!0,x.autoScrollRegion=new Ji(0,0,0,0),x.pa.h(0,0),x.toolManager.gb("Dragging",new Wt,x.toolManager.mouseMoveTools),x.click=function(){var z=E.observed;if(z!==null){var tt=z.viewportBounds,rt=E.lastInput.documentPoint;z.position=new At(rt.x-tt.width/2,rt.y-tt.height/2)}},x.Pf=function(){E.Ya(),Bt(E)},x.Xd=function(){E.observed!==null&&(E.Ya(),E.N())},x.Ha=function(){1>E.updateDelay?E.N():E.o||(E.o=!0,setTimeout(function(){return E.redraw()},E.updateDelay))},x.Of=function(){E.observed!==null&&Bt(E)},x.autoScale=Zs,x.vb=!1,y&&Object.assign(x,y),x}we(gt,Le),gt.prototype.computePixelRatio=function(){return 1},gt.prototype.redraw=function(){if(this.o&&1<=this.updateDelay){this.o=!1;var a=this.ta,y=this.ib;if(a!==null&&y!==null){if(Rd(this),this.ql===null){var x=new yl(null);x.width=a.width,x.height=a.height,this.ql=x}try{this.ta=this.ql,this.ib=this.ta.context,this.ib.Vc(!0),this.ib.setTransform(1,0,0,1,0,0),this.ib.clearRect(0,0,this.ta.width,this.ta.height),Ct(this)}finally{this.ta=a,this.ib=y}}}Le.prototype.redraw.call(this)},gt.prototype.gc=function(){if(this.Ka===null&&Gt("No div specified"),this.ta===null&&Gt("No canvas specified"),!(this.ta instanceof gu)&&(Ov(this.box),this.Fc)){var a=this.observed;if(a!==null&&!a.animationManager.defaultAnimation.isAnimating&&a.pi){Rd(this);var y=this.ta;a=this.ib,a.Vc(!0),a.setTransform(1,0,0,1,0,0),a.clearRect(0,0,y.width,y.height),1>this.updateDelay?Ct(this):this.ql!==null&&(a.drawImage(this.ql.Oa,0,0),y=this.Ab,y.reset(),this.scale!==1&&y.scale(this.scale),this.position.x===0&&this.position.y===0||y.translate(-this.position.x,-this.position.y),a.scale(this.Mb,this.Mb),a.transform(y.m11,y.m12,y.m21,y.m22,y.dx,y.dy),a.yc()),y=this.Wa.s;for(var x=y.length,E=0;E<x;E++)y[E].gc(a,this);this.Fc=this.vd=!1}}};function Ct(a){var y=a.observed;if(y!==null){var x=a.drawsTemporaryLayers,E=a.drawsGrid&&x,b=y.grid;E&&b!==null&&b.visible&&!isNaN(b.width)&&!isNaN(b.height)&&(b=Ee.alloc().assign(a.viewportBounds).ed(y.viewportBounds),cu(y,b),Ee.free(b),Na(y));var z=a.Ab;z.reset(),a.scale!==1&&z.scale(a.scale),a.position.x===0&&a.position.y===0||z.translate(-a.position.x,-a.position.y),b=a.ib,b.scale(a.Mb,a.Mb),b.transform(z.m11,z.m12,z.m21,z.m22,z.dx,z.dy),b.yc(),y=y.Wa.s,z=y.length;for(var tt=0;tt<z;tt++){var rt=y[tt],ot=a;if(rt.visible&&rt.opacity!==0){var st=rt.diagram.grid.part;if(!x&&rt.isTemporary)E&&st.layer===rt&&(rt=Vu(rt,b),st.gc(b,ot),b.globalAlpha=rt);else{for(var ut=Vu(rt,b),ft=ot.scale,mt=Ee.alloc(),yt=rt.Pa.s,wt=yt.length,bt=0;bt<wt;bt++){var Zt=yt[bt];(E||Zt!==st)&&rt.Oj(b,Zt,ot,null,ft,mt,!1)}Ee.free(mt),b.globalAlpha=ut}}}}}function Bt(a){var y=a.box;if(y!==null){var x=a.observed;if(x!==null){a.Fc=!0,x=x.viewportBounds;var E=y.selectionObject,b=Ke.alloc();b.h(x.width,x.height),E.desiredSize=b,Ke.free(b),a=2/a.scale,E instanceof lr&&(E.strokeWidth=a),y.location=new At(x.x-a/2,x.y-a/2),y.isSelected=!0}}}gt.prototype.computeBounds=function(){var a=this.observed;if(a===null)return wo;var y=a.documentBounds.copy();return y.ed(a.viewportBounds),y},gt.prototype.invalidateViewport=function(){this.Fc!==!0&&(this.Fc=!0,this.$b())},gt.prototype.onViewportBoundsChanged=function(a,y,x,E){this.vb||(this.vd=!0,this.N(),this.Ee=!0,this.Ya(),Bt(this),this.fc.scale=x,this.fc.position.x=a.x,this.fc.position.y=a.y,this.fc.bounds.assign(a),this.fc.Oz=E,this.R("ViewportBoundsChanged",this.fc,a))},ge.Object.defineProperties(gt.prototype,{observed:{get:function(){return this.V},set:function(a){var y=this.V;if(a instanceof gt&&Gt("Overview.observed Diagram may not be an Overview itself: "+a),y!==a){if(y!==null&&(this.remove(this.box),y.am("ViewportBoundsChanged",this.Pf),y.am("DocumentBoundsChanged",this.Xd),y.am("InvalidateDraw",this.Ha),y.am("AnimationFinished",this.Of)),this.V=a,a!==null&&(a.Bj("ViewportBoundsChanged",this.Pf),a.Bj("DocumentBoundsChanged",this.Xd),a.Bj("InvalidateDraw",this.Ha),a.Bj("AnimationFinished",this.Of),this.add(this.box)),this.Ya(),a===null){this.ql=null;var x=this.ta,E=this.ib;x&&E&&(E.setTransform(1,0,0,1,0,0),E.clearRect(0,0,x.width,x.height))}else this.Ha(null),Bt(this),this.N();this.g("observed",y,a)}}},box:{get:function(){return this.j},set:function(a){var y=this.j;y!==a&&(this.j=a,this.remove(y),this.add(this.j),Bt(this),this.g("box",y,a))}},drawsTemporaryLayers:{get:function(){return this.F},set:function(a){this.F!==a&&(this.F=a,this.redraw())}},drawsGrid:{get:function(){return this.u},set:function(a){this.u!==a&&(this.u=a,this.redraw())}},updateDelay:{get:function(){return this.ia},set:function(a){0>a&&(a=0),this.ia!==a&&(this.ia=a)}}}),gt.className="Overview";function Wt(){vo.call(this),this.j=null}we(Wt,vo),Wt.prototype.canStart=function(){if(!this.isEnabled)return!1;var a=this.diagram;if(a===null||!a.allowMove||!a.allowSelect)return!1;var y=a.observed;if(y===null)return!1;var x=a.lastInput;return!x.left||a.currentTool!==this&&(!this.isBeyondDragSize()||x.isTouchEvent&&x.timestamp-a.firstInput.timestamp<this.delay)?!1:(this.findDraggablePart()===null&&(x=y.viewportBounds,this.j=new At(x.width/2,x.height/2),a=a.firstInput.documentPoint,y.position=new At(a.x-this.j.x,a.y-this.j.y)),!0)},Wt.prototype.doActivate=function(){this.j=null,vo.prototype.doActivate.call(this)},Wt.prototype.doUpdateCursor=function(){var a=this.diagram,y=a.box;y!==null&&y.cursor&&(a.currentCursor=y.cursor)},Wt.prototype.moveParts=function(){var a=this.diagram,y=a.observed;if(y!==null){var x=a.box;if(x!==null){if(this.j===null){var E=a.firstInput.documentPoint;x=x.location,this.j=new At(E.x-x.x,E.y-x.y)}a=a.lastInput.documentPoint,y.position=new At(a.x-this.j.x,a.y-this.j.y)}}},Wt.className="OverviewDraggingTool";function Kt(){xi(this),this.H=Eu,this.Ha=this.u=this.o=!0,this.F=this.V=this.nb=this.ia=!1,this.ij=this.j=null,this.Hb=1.05,this.Jt=NaN,this.sw=null,this.Au=NaN,this.yu=wo,this.hb=!0,this.cg=null,this.ob=200}Kt.prototype.toString=function(){return"CommandHandler"},Kt.prototype.Xe=function(a){this.H=a},Kt.prototype.doKeyDown=function(){var a=this.diagram,y=a.lastInput,x=dr?y.meta:y.control,E=y.shift,b=y.alt,z=y.key;!x||z!=="C"&&z!=="Insert"?x&&z==="X"||E&&z==="Del"?this.canCutSelection()&&this.cutSelection():x&&z==="V"||E&&z==="Insert"?this.canPasteSelection()&&this.pasteSelection():x&&z==="Y"||b&&E&&z==="Backspace"?this.canRedo()&&this.redo():x&&z==="Z"||b&&z==="Backspace"?this.canUndo()&&this.undo():z==="Del"||z==="Backspace"?this.canDeleteSelection()&&this.deleteSelection():x&&z==="A"?this.canSelectAll()&&this.selectAll():z==="Esc"?this.canStopCommand()&&this.stopCommand():z==="Up"?a.allowVerticalScroll&&(x?a.scroll("pixel","up"):a.scroll("line","up")):z==="Down"?a.allowVerticalScroll&&(x?a.scroll("pixel","down"):a.scroll("line","down")):z==="Left"?a.allowHorizontalScroll&&(x?a.scroll("pixel","left"):a.scroll("line","left")):z==="Right"?a.allowHorizontalScroll&&(x?a.scroll("pixel","right"):a.scroll("line","right")):z==="PageUp"?E&&a.allowHorizontalScroll?a.scroll("page","left"):a.allowVerticalScroll&&a.scroll("page","up"):z==="PageDown"?E&&a.allowHorizontalScroll?a.scroll("page","right"):a.allowVerticalScroll&&a.scroll("page","down"):z==="Home"?x&&a.allowVerticalScroll?a.scroll("document","up"):!x&&a.allowHorizontalScroll&&a.scroll("document","left"):z==="End"?x&&a.allowVerticalScroll?a.scroll("document","down"):!x&&a.allowHorizontalScroll&&a.scroll("document","right"):z===" "?this.canScrollToPart()&&this.scrollToPart():z==="Subtract"?this.canDecreaseZoom()&&this.decreaseZoom():z==="Add"?this.canIncreaseZoom()&&this.increaseZoom():x&&z==="0"?this.canResetZoom()&&this.resetZoom():E&&z==="Z"?this.canZoomToFit()&&this.zoomToFit():x&&!E&&z==="G"?this.canGroupSelection()&&this.groupSelection():x&&E&&z==="G"?this.canUngroupSelection()&&this.ungroupSelection():z==="F2"||y.event&&y.event.key==="F2"?this.canEditTextBlock()&&this.editTextBlock():z==="ContextMenu"||y.event&&y.event.key==="ContextMenu"?this.canShowContextMenu()&&this.showContextMenu():y.bubbles=!0:this.canCopySelection()&&this.copySelection()},Kt.prototype.doKeyUp=function(){this.diagram.lastInput.bubbles=!0},Kt.prototype.stopCommand=function(){var a=this.diagram,y=a.currentTool;y instanceof qr&&a.allowSelect&&a.clearSelection(),y!==null&&y.doCancel()},Kt.prototype.canStopCommand=function(){return!0},Kt.prototype.selectAll=function(){var a=this.diagram;a.N();try{a.currentCursor="wait",a.R("ChangingSelection",a.selection);for(var y=a.parts;y.next();)y.value.isSelected=!0;for(var x=a.nodes;x.next();)x.value.isSelected=!0;for(var E=a.links;E.next();)E.value.isSelected=!0}finally{a.R("ChangedSelection",a.selection),a.currentCursor=""}},Kt.prototype.canSelectAll=function(){return this.diagram.allowSelect},Kt.prototype.deleteSelection=function(){var a=this.diagram;try{a.currentCursor="wait",a.R("ChangingSelection",a.selection),a.Ea("Delete"),a.R("SelectionDeleting",a.selection);for(var y=new qe,x=a.selection.iterator;x.next();)ad(y,x.value,!0,this.deletesTree?1/0:0,this.deletesConnectedLinks?null:!1,function(E){return E.canDelete()});a.Is(y,!0),a.R("SelectionDeleted",y)}finally{a.eb("Delete"),a.R("ChangedSelection",a.selection),a.currentCursor=""}},Kt.prototype.canDeleteSelection=function(){var a=this.diagram;return!(a.isReadOnly||a.isModelReadOnly||!a.allowDelete||a.selection.count===0)},Kt.prototype.copySelection=function(){var a=this.diagram,y=new qe;for(a=a.selection.iterator;a.next();)ad(y,a.value,!0,this.copiesTree?1/0:0,this.copiesConnectedLinks,function(x){return x.canCopy()});this.copyToClipboard(y)},Kt.prototype.canCopySelection=function(){var a=this.diagram;return!!(a.allowCopy&&a.allowClipboard&&a.selection.count!==0)},Kt.prototype.cutSelection=function(){this.copySelection(),this.deleteSelection()},Kt.prototype.canCutSelection=function(){var a=this.diagram;return!!(!a.isReadOnly&&!a.isModelReadOnly&&a.allowCopy&&a.allowDelete&&a.allowClipboard&&a.selection.count!==0)},Kt.prototype.copyToClipboard=function(a){var y=this.diagram,x=null;if(a===null)Gd=null,ed="";else{x=y.model;var E=!1,b=!1,z=null;try{x.Tl()&&(E=x.Jj,x.Jj=this.copiesParentKey),x.Wj()&&(b=x.Ij,x.Ij=this.copiesGroupKey),z=y.Kj(a,null,!0)}finally{x.Tl()&&(x.Jj=E),x.Wj()&&(x.Ij=b),x=new Xe,x.addAll(z),Gd=x,ed=y.model.dataFormat}}y.R("ClipboardChanged",x)},Kt.prototype.pasteFromClipboard=function(){var a=new qe,y=Gd;if(y===null)return a;var x=this.diagram;if(ed!==x.model.dataFormat)return a;var E=x.model,b=!1,z=!1,tt=null;try{E.Tl()&&(b=E.Jj,E.Jj=this.copiesParentKey),E.Wj()&&(z=E.Ij,E.Ij=this.copiesGroupKey),tt=x.Kj(y,x,!1)}finally{for(E.Tl()&&(E.Jj=b),E.Wj()&&(E.Ij=z),y=tt.iterator;y.next();)x=y.value,E=y.key,x.location.w()||(E.location.w()?x.location=E.location:!x.position.w()&&E.position.w()&&(x.position=E.position)),a.add(x)}return a},Kt.prototype.pasteSelection=function(a){a===void 0&&(a=null);var y=this.diagram;try{y.currentCursor="wait",y.R("ChangingSelection",y.selection),y.Ea("Paste");var x=this.pasteFromClipboard();0<x.count&&y.clearSelection(!0);for(var E=x.iterator;E.next();)E.value.isSelected=!0;if(a!==null){var b=y.computePartsBounds(y.selection);if(b.w()){var z=this.computeEffectiveCollection(y.selection,y.Wm);qh(y,z,new At(a.x-b.centerX,a.y-b.centerY),y.Wm,!1)}}y.R("ClipboardPasted",x)}finally{y.eb("Paste"),y.R("ChangedSelection",y.selection),y.currentCursor=""}},Kt.prototype.canPasteSelection=function(){var a=this.diagram;return!(a.isReadOnly||a.isModelReadOnly||!a.allowInsert||!a.allowClipboard||Gd===null||Gd.count===0||ed!==a.model.dataFormat)},Kt.prototype.undo=function(){this.diagram.undoManager.undo()},Kt.prototype.canUndo=function(){var a=this.diagram;return a.isReadOnly||a.isModelReadOnly?!1:a.allowUndo&&a.undoManager.canUndo()},Kt.prototype.redo=function(){this.diagram.undoManager.redo()},Kt.prototype.canRedo=function(){var a=this.diagram;return a.isReadOnly||a.isModelReadOnly?!1:a.allowUndo&&a.undoManager.canRedo()},Kt.prototype.decreaseZoom=function(a){a===void 0&&(a=1/this.zoomFactor);var y=this.diagram;y.autoScale===Va&&(a=y.scale*a,a<y.minScale||a>y.maxScale||(y.scale=a))},Kt.prototype.canDecreaseZoom=function(a){a===void 0&&(a=1/this.zoomFactor);var y=this.diagram;return y.autoScale!==Va?!1:(a=y.scale*a,a<y.minScale||a>y.maxScale?!1:y.allowZoom)},Kt.prototype.increaseZoom=function(a){a===void 0&&(a=this.zoomFactor);var y=this.diagram;y.autoScale===Va&&(a=y.scale*a,a<y.minScale||a>y.maxScale||(y.scale=a))},Kt.prototype.canIncreaseZoom=function(a){a===void 0&&(a=this.zoomFactor);var y=this.diagram;return y.autoScale!==Va?!1:(a=y.scale*a,a<y.minScale||a>y.maxScale?!1:y.allowZoom)},Kt.prototype.resetZoom=function(a){a===void 0&&(a=this.defaultScale);var y=this.diagram;a<y.minScale||a>y.maxScale||(y.scale=a)},Kt.prototype.canResetZoom=function(a){a===void 0&&(a=this.defaultScale);var y=this.diagram;return a<y.minScale||a>y.maxScale?!1:y.allowZoom},Kt.prototype.zoomToFit=function(){var a=this.diagram,y=a.animationManager;y.Cc(),a.redraw();var x=a.position,E=a.scale;Cu(y,"Zoom To Fit"),this.isZoomToFitRestoreEnabled&&E===this.Au&&!isNaN(this.Jt)&&a.documentBounds.D(this.yu)?(a.scale=this.Jt,a.position=this.sw,this.Au=NaN,this.yu=wo):(this.Jt=E,this.sw=x.copy(),a.zoomToFit(),this.Au=a.scale,this.yu=a.documentBounds.copy()),rf(y)},Kt.prototype.canZoomToFit=function(){return this.diagram.allowZoom},Kt.prototype.scrollToPart=function(a){a===void 0&&(a=null);var y=this.diagram;if(y.Va(),a===null){try{this.cg!==null&&(this.cg.next()?a=this.cg.value:this.cg=null)}catch(ot){this.cg=null}a===null&&(0<y.highlighteds.count?this.cg=y.highlighteds.iterator:0<y.selection.count&&(this.cg=y.selection.iterator),this.cg!==null&&this.cg.next()&&(a=this.cg.value))}if(a!==null){var x=y.animationManager;Cu(x,"Scroll To Part");var E=this.scrollToPartPause;if(0<E){var b=$t(this,a,[a]);if(b.length===1)y.Ea(),y.es(a.actualBounds),y.eb("Scroll To Part");else{var z=function(){y.Ea();for(var ot=b.pop();0<b.length&&ot instanceof Un&&ot.isTreeExpanded&&(!(ot instanceof $i)||ot.isSubGraphExpanded);)ot=b.pop();0<b.length?(ot instanceof Li&&y.tv(ot.actualBounds),ot instanceof Un&&!ot.isTreeExpanded&&(ot.isTreeExpanded=!0),ot instanceof $i&&!ot.isSubGraphExpanded&&(ot.isSubGraphExpanded=!0)):(ot instanceof Li&&y.es(ot.actualBounds),y.am("LayoutCompleted",tt)),y.eb("Scroll To Part")},tt=function(){ki(z,(x.isEnabled?x.duration:0)+E)};y.Bj("LayoutCompleted",tt),z()}}else{var rt=y.position.copy();y.es(a.actualBounds),rt.Xa(y.position)&&x.Cc()}}};function $t(a,y,x){if(y.isVisible())return x;if(y instanceof Rr)$t(a,y.adornedPart,x);else if(y instanceof En){var E=y.fromNode;E!==null&&$t(a,E,x),y=y.toNode,y!==null&&$t(a,y,x)}else y instanceof Un&&(E=y.labeledLink,E!==null&&$t(a,E,x),E=y.pg(),E!==null&&(E.isTreeExpanded||E.wasTreeExpanded||x.push(E),$t(a,E,x))),y=y.containingGroup,y!==null&&(y.isSubGraphExpanded||y.wasSubGraphExpanded||x.push(y),$t(a,y,x));return x}Kt.prototype.canScrollToPart=function(a){return a===void 0&&(a=null),a!==null&&!(a instanceof Li)?!1:(a=this.diagram,a.selection.count===0&&a.highlighteds.count===0?!1:a.allowHorizontalScroll&&a.allowVerticalScroll)},Kt.prototype.collapseTree=function(a){a===void 0&&(a=null);var y=this.diagram;try{y.Ea("Collapse Tree"),Cu(y.animationManager,"Collapse Tree");var x=new Xe;if(a!==null&&a.isTreeExpanded)a.collapseTree(),x.add(a);else if(a===null)for(var E=y.selection.iterator;E.next();){var b=E.value;b instanceof Un&&b.isTreeExpanded&&(b.collapseTree(),x.add(b))}y.R("TreeCollapsed",x)}finally{y.eb("Collapse Tree")}},Kt.prototype.canCollapseTree=function(a){a===void 0&&(a=null);var y=this.diagram;if(y.isReadOnly)return!1;if(a!==null){if(!(a instanceof Un&&a.isTreeExpanded))return!1;if(0<a.Qo().count)return!0}else for(a=y.selection.iterator;a.next();)if(y=a.value,y instanceof Un&&y.isTreeExpanded&&0<y.Qo().count)return!0;return!1},Kt.prototype.expandTree=function(a){a===void 0&&(a=null);var y=this.diagram;try{y.Ea("Expand Tree"),Cu(y.animationManager,"Expand Tree");var x=new Xe;if(a!==null&&!a.isTreeExpanded)a.expandTree(),x.add(a);else if(a===null)for(var E=y.selection.iterator;E.next();){var b=E.value;b instanceof Un&&!b.isTreeExpanded&&(b.expandTree(),x.add(b))}y.R("TreeExpanded",x)}finally{y.eb("Expand Tree")}},Kt.prototype.canExpandTree=function(a){a===void 0&&(a=null);var y=this.diagram;if(y.isReadOnly)return!1;if(a!==null){if(!(a instanceof Un)||a.isTreeExpanded)return!1;if(0<a.Qo().count)return!0}else for(a=y.selection.iterator;a.next();)if(y=a.value,y instanceof Un&&!y.isTreeExpanded&&0<y.Qo().count)return!0;return!1},Kt.prototype.groupSelection=function(){var a=this.diagram,y=a.model;if(y.Xj()){var x=this.archetypeGroupData;if(x!==null){var E=null;try{a.currentCursor="wait",a.R("ChangingSelection",a.selection),a.Ea("Group");for(var b=new Xe,z=a.selection.iterator;z.next();){var tt=z.value;tt.Zc()&&tt.canGroup()&&b.add(tt)}for(var rt=new Xe,ot=b.iterator;ot.next();){var st=ot.value;z=!1;for(var ut=b.iterator;ut.next();)if(st.Td(ut.value)){z=!0;break}z||rt.add(st)}if(0<rt.count){var ft=rt.first().containingGroup;if(ft!==null)for(;ft!==null;){b=!1;for(var mt=rt.iterator;mt.next();)if(!mt.value.Td(ft)){b=!0;break}if(b)ft=ft.containingGroup;else break}if(x instanceof $i)Sl(x),E=x.copy(),E!==null&&a.add(E);else if(y.Yu(x)){var yt=y.copyNodeData(x);De(yt)&&(y.xf(yt),E=a.ii(yt))}if(E!==null){ft!==null&&this.isValidMember(ft,E)&&(E.containingGroup=ft);for(var wt=rt.iterator;wt.next();){var bt=wt.value;this.isValidMember(E,bt)&&(bt.containingGroup=E)}a.clearSelection(!0),E.isSelected=!0}}a.R("SelectionGrouped",E)}finally{a.eb("Group"),a.R("ChangedSelection",a.selection),a.currentCursor=""}}}},Kt.prototype.canGroupSelection=function(){var a=this.diagram;if(a.isReadOnly||a.isModelReadOnly||!a.allowInsert||!a.allowGroup||!a.model.Xj()||this.archetypeGroupData===null)return!1;for(a=a.selection.iterator;a.next();){var y=a.value;if(y.Zc()&&y.canGroup())return!0}return!1};function Ie(a){var y=On();for(a=a.iterator;a.next();){var x=a.value;x instanceof En||y.push(x)}a=new qe,x=y.length;for(var E=0;E<x;E++){for(var b=y[E],z=!0,tt=0;tt<x;tt++)if(b.Td(y[tt])){z=!1;break}z&&a.add(b)}return Qn(y),a}Kt.prototype.isValidMember=function(a,y){if(y===null||a===y||y instanceof En)return!1;if(a!==null){if(a===y||a.Td(y))return!1;var x=a.memberValidation;if(x!==null&&!x(a,y)||a.data===null&&y.data!==null||a.data!==null&&y.data===null)return!1}return x=this.memberValidation,x!==null?x(a,y):!0},Kt.prototype.ungroupSelection=function(a){a===void 0&&(a=null);var y=this.diagram,x=y.model;if(x.Xj())try{y.currentCursor="wait",y.R("ChangingSelection",y.selection),y.Ea("Ungroup");var E=new Xe;if(a!==null)E.add(a);else for(var b=y.selection.iterator;b.next();){var z=b.value;z instanceof $i&&z.canUngroup()&&E.add(z)}var tt=new Xe;if(0<E.count){y.clearSelection(!0);for(var rt=E.iterator;rt.next();){var ot=rt.value;ot.expandSubGraph();var st=ot.containingGroup,ut=st!==null&&st.data!==null?x.wa(st.data):void 0;tt.addAll(ot.memberParts);for(var ft=tt.iterator;ft.next();){var mt=ft.value;if(mt.isSelected=!0,!(mt instanceof En)){var yt=mt.data;yt!==null?x.mp(yt,ut):mt.containingGroup=st}}y.remove(ot)}}y.R("SelectionUngrouped",E,tt)}finally{y.eb("Ungroup"),y.R("ChangedSelection",y.selection),y.currentCursor=""}},Kt.prototype.canUngroupSelection=function(a){a===void 0&&(a=null);var y=this.diagram;if(y.isReadOnly||y.isModelReadOnly||!y.allowDelete||!y.allowUngroup||!y.model.Xj())return!1;if(a!==null){if(!(a instanceof $i))return!1;if(a.canUngroup())return!0}else for(a=y.selection.iterator;a.next();)if(y=a.value,y instanceof $i&&y.canUngroup())return!0;return!1},Kt.prototype.addTopLevelParts=function(a,y){var x=!0;for(a=Ie(a).iterator;a.next();){var E=a.value;E.containingGroup!==null&&(!y||this.isValidMember(null,E)?E.containingGroup=null:x=!1)}return x},Kt.prototype.collapseSubGraph=function(a){a===void 0&&(a=null);var y=this.diagram;try{y.Ea("Collapse SubGraph"),Cu(y.animationManager,"Collapse SubGraph");var x=new Xe;if(a!==null&&a.isSubGraphExpanded)a.collapseSubGraph(),x.add(a);else if(a===null)for(var E=y.selection.iterator;E.next();){var b=E.value;b instanceof $i&&b.isSubGraphExpanded&&(b.collapseSubGraph(),x.add(b))}y.R("SubGraphCollapsed",x)}finally{y.eb("Collapse SubGraph")}},Kt.prototype.canCollapseSubGraph=function(a){a===void 0&&(a=null);var y=this.diagram;if(y.isReadOnly)return!1;if(a!==null)return!!(a instanceof $i&&a.isSubGraphExpanded);for(a=y.selection.iterator;a.next();)if(y=a.value,y instanceof $i&&y.isSubGraphExpanded)return!0;return!1},Kt.prototype.expandSubGraph=function(a){a===void 0&&(a=null);var y=this.diagram;try{y.Ea("Expand SubGraph"),Cu(y.animationManager,"Expand SubGraph");var x=new Xe;if(a!==null&&!a.isSubGraphExpanded)a.expandSubGraph(),x.add(a);else if(a===null)for(var E=y.selection.iterator;E.next();){var b=E.value;b instanceof $i&&!b.isSubGraphExpanded&&(b.expandSubGraph(),x.add(b))}y.R("SubGraphExpanded",x)}finally{y.eb("Expand SubGraph")}},Kt.prototype.canExpandSubGraph=function(a){a===void 0&&(a=null);var y=this.diagram;if(y.isReadOnly)return!1;if(a!==null)return a instanceof $i&&!a.isSubGraphExpanded;for(a=y.selection.iterator;a.next();)if(y=a.value,y instanceof $i&&!y.isSubGraphExpanded)return!0;return!1},Kt.prototype.editTextBlock=function(a){a===void 0&&(a=null);var y=this.diagram,x=y.toolManager.findTool("TextEditing");if(x!==null){if(a===null){a=null;for(var E=y.selection.iterator;E.next();){var b=E.value;if(b.canEdit()){a=b;break}}if(a===null)return;a=a.Nl(function(z){return z instanceof io&&z.editable})}a!==null&&(y.currentTool=null,x.textBlock=a,y.currentTool=x)}},Kt.prototype.canEditTextBlock=function(a){a===void 0&&(a=null);var y=this.diagram;if(y.isReadOnly||y.isModelReadOnly||!y.allowTextEdit||y.toolManager.findTool("TextEditing")===null)return!1;if(a!==null){if(!(a instanceof io))return!1;if(a=a.part,a!==null&&a.canEdit())return!0}else for(y=y.selection.iterator;y.next();)if(a=y.value,a.canEdit()&&(a=a.Nl(function(x){return x instanceof io&&x.editable}),a!==null))return!0;return!1},Kt.prototype.showContextMenu=function(a){var y=this.diagram,x=y.toolManager.findTool("ContextMenu");if(x!==null&&(a===void 0&&(a=0<y.selection.count?y.selection.first():y),a=x.findObjectWithContextMenu(a),a!==null)){var E=y.lastInput,b=null;a instanceof he?b=a.ga(er):y.viewportBounds.ca(E.documentPoint)||(b=y.viewportBounds,b=new At(b.x+b.width/2,b.y+b.height/2)),b!==null&&(E.viewPoint=y.op(b),E.documentPoint=b,E.left=!1,E.right=!0,E.up=!0),y.currentTool=x,Ku(x,!1,a)}},Kt.prototype.canShowContextMenu=function(a){var y=this.diagram,x=y.toolManager.findTool("ContextMenu");return x===null?!1:(a===void 0&&(a=0<y.selection.count?y.selection.first():y),x.findObjectWithContextMenu(a)!==null)},Kt.prototype.computeEffectiveCollection=function(a,y){var x=this.diagram,E=x.toolManager.findTool("Dragging"),b=x.currentTool===E;if(y===void 0&&(y=b?E.dragOptions:x.Wm),E=new Me,a===null)return E;for(var z=a.iterator;z.next();)Lu(x,E,z.value,b,y);if(x.draggedLink!==null&&y.dragsLink)return E;for(z=a.iterator;z.next();)a=z.value,a instanceof En&&(y=a.fromNode,y===null||E.contains(y)?(y=a.toNode,y===null||E.contains(y)||E.remove(a)):E.remove(a));return E},ge.Object.defineProperties(Kt.prototype,{diagram:{get:function(){return this.H}},copiesClipboardData:{get:function(){return this.o},set:function(a){this.o=a}},copiesConnectedLinks:{get:function(){return this.u},set:function(a){this.u=a}},deletesConnectedLinks:{get:function(){return this.Ha},set:function(a){this.Ha=a}},copiesTree:{get:function(){return this.ia},set:function(a){this.ia=a}},deletesTree:{get:function(){return this.nb},set:function(a){this.nb=a}},copiesParentKey:{get:function(){return this.V},set:function(a){this.V=a}},copiesGroupKey:{get:function(){return this.F},set:function(a){this.F=a}},archetypeGroupData:{get:function(){return this.j},set:function(a){this.j=a}},memberValidation:{get:function(){return this.ij},set:function(a){this.ij=a}},defaultScale:{get:function(){return this.diagram.defaultScale},set:function(a){this.diagram.defaultScale=a}},zoomFactor:{get:function(){return this.Hb},set:function(a){1<a||Gt("zoomFactor must be larger than 1.0, not: "+a),this.Hb=a}},isZoomToFitRestoreEnabled:{get:function(){return this.hb},set:function(a){this.hb=a}},scrollToPartPause:{get:function(){return this.ob},set:function(a){this.ob=a}}}),Kt.className="CommandHandler",Yp=function(){return new Kt};function he(){xi(this),this.l=30723,this.pb=1,this.bn="",this.Ma=this.Me=null,this.pa=new At(NaN,NaN).freeze(),this.jd=yr,this.Ab=new Ii,this.wh=new Ii,this.Lb=null,this.Ca=this.Kk=1,this.Kb=0,this.Kg=$o,this.uc=new Ee(NaN,NaN,NaN,NaN).freeze(),this.Ib=new Ee(NaN,NaN,NaN,NaN).freeze(),this.dc=new Ee(0,0,NaN,NaN).freeze(),this.ba=this.Yn=this.Zn=null,this.sk=this.Jb=Bo,this.Ag=this.io=0,this.V=this.tb=this.Dh=this.A=this.Ua=null,this.Uc=!1,this.jo=this.Ng=null}var cn,nn,fi,wi,Ti,tr,Er,gr,Dr,Xr;he.prototype.cloneProtected=function(a){a.l=this.l|6144,a.pb=this.pb,a.bn=this.bn,a.Ma=this.Ma,a.pa.assign(this.pa),a.jd=this.jd.J(),this.Lb!==null?a.Lb=this.Lb.copy():a.Lb=null,a.Ca=this.Ca,a.Kb=this.Kb,a.Kg=this.Kg.J(),a.uc.assign(this.uc),a.Ib.assign(this.Ib),a.dc.assign(this.dc),a.Yn=this.Yn,this.ba!==null&&(a.ba=this.ba.copy()),a.Jb=this.Jb.J(),a.sk=this.sk.J(),a.io=this.io,a.Ag=this.Ag,this.Ua!==null&&(a.Ua=this.Ua.copy()),this.A!==null&&(a.A=this.A.nc?this.A:this.A.copy()),this.Dh!==null&&(a.Dh=Sn(this.Dh)),this.tb!==null&&(a.tb=this.tb.copy())},he.prototype.Vw=function(a){var y=this.Dh;if(kn(y)){for(var x=0;x<y.length;x++)if(y[x]===a)return}else this.Dh=y=[];y.push(a)},he.prototype.Af=function(a){a.Zn=null,a.Ng=null,a.v()},he.prototype.clone=function(){var a=new this.constructor;if(this.cloneProtected(a),this.Dh!==null)for(var y=0;y<this.Dh.length;y++){var x=this.Dh[y];a[x]=this[x]}return a},he.prototype.copy=function(){return this.clone()},Pt=he.prototype,Pt.qb=function(a){a.classType===En?a.name.indexOf("Orient")===0?this.segmentOrientation=a:Gt("Unknown Link enum value for GraphObject.segmentOrientation property: "+a):a.classType===he&&(this.stretch=a)},Pt.toString=function(){return Yn(this.constructor)+"#"+fr(this)},Pt.th=function(){this.A!==null&&(this.A.nc=!0)};function cr(a){a.A===null?a.A=new Ac:a.A.nc&&(a.A=a.A.copy())}Pt.Xc=function(){if(this.ba===null){var a=new Gg;a.Xi=qi,a.yj=qi,a.Vi=10,a.wj=10,a.Wi=0,a.xj=0,this.ba=a}},Pt.cb=function(a,y,x,E,b,z,tt){var rt=this.part;if(rt!==null&&(rt.gk(a,y,x,E,b,z,tt),x===this&&a===no&&ka(this)&&co(this,rt,y),z=this.diagram,this.animationTriggers===null||z===null||!z.pi||z.undoManager.isUndoingRedoing||z.animationManager.Dm||(a=this.animationTriggers.get(y),a!==null&&z.animationManager.isEnabled&&!z.animationManager.isTicking&&(this.jo===null&&(this.jo=new Me),tt=z.undoManager.transactionLevel===0,a.startCondition===Jh?tt=!0:a.startCondition===Bd&&(tt=!1),tt?(z=new Aa,Zp(a,z),tt=this.jo.get(a),tt!==null&&tt.stop(),this.jo.add(a,z),z.vu=this,z.Nw=a,z.add(this,y,E,b),z.start()):(Cu(z.animationManager,"Trigger"),z.animationManager.defaultAnimation.add(this,y,E,b)))),this instanceof mn&&x===rt&&(rt.l&16777216)!==0&&rt.data!==null))for(x=this.O.s,E=x.length,b=0;b<E;b++)rt=x[b],rt instanceof mn&&Yd(rt,function(ot){ot.data!==null&&ot.l&16777216&&ot.La(y)})};function co(a,y,x){var E=a.ih();if(E!==null)for(var b=a.localBindings.iterator;b.next();){var z=b.value,tt=null;if(z.sourceName!==null){if(tt=LS(z,E,a),tt===null)continue;z.sp(a,tt,x,null)}else if(z.isToModel){var rt=y.diagram;rt===null||rt.skipsModelSourceBindings||z.sp(a,rt.model.modelData,x,E)}else{if(rt=E.data,rt===null)continue;var ot=y.diagram;ot===null||ot.skipsModelSourceBindings||z.sp(a,rt,x,E)}tt===a&&(rt=E.ks(z.Ai),rt!==null&&z.Mv(rt,tt,x))}}Pt.ks=function(a){return this.bindingId===a?this:null},Pt.g=function(a,y,x){this.cb(no,a,this,y,x)},Pt.Ge=function(a,y,x,E){var b=this.uc;if(b.h(a,y,x,E),this.Ca!==1||this.Kb!==0){this.Lb===null&&(this.Lb=new Ii);var z=this.Lb;z.reset(),this.no(z,a,y,x,E),z.pp(b)}};function oa(a,y,x,E){return a.pickable===!1?!1:(E.multiply(a.transform),x?a.Yc(y,E):a.fh(y,E))}Pt.tx=function(a,y,x){if(this.pickable===!1)return!1;var E=this.naturalBounds;return y=a.Bf(y),x?Zn(a.x,a.y,0,0,0,E.height)<=y||Zn(a.x,a.y,0,E.height,E.width,E.height)<=y||Zn(a.x,a.y,E.width,E.height,E.width,0)<=y||Zn(a.x,a.y,E.width,0,0,0)<=y:a.zd(0,0)<=y&&a.zd(0,E.height)<=y&&a.zd(E.width,0)<=y&&a.zd(E.width,E.height)<=y},Pt.se=function(){return!0},Pt.ca=function(a){var y=At.alloc();y.assign(a),this.transform.Ga(y);var x=this.actualBounds;if(!x.w())return At.free(y),!1;var E=this.diagram;if(E!==null&&E.wq){var b=E.Ql("extraTouchThreshold"),z=E.Ql("extraTouchArea"),tt=z/2,rt=this.naturalBounds;E=this.Df()*E.scale;var ot=1/E;if(rt.width*E<b&&rt.height*E<b)return a=oo(x.x-tt*ot,x.y-tt*ot,x.width+z*ot,x.height+z*ot,y.x,y.y),At.free(y),a}return b=!1,(this instanceof Rr||this instanceof lr?oo(x.x-5,x.y-5,x.width+10,x.height+10,y.x,y.y):x.ca(y))&&(this.tb&&!this.tb.ca(y)?b=!1:this.areaBackground!==null&&x.ca(y)||this.Ma!==null&&this.dc.ca(a)?b=!0:b=this.gh(a)),At.free(y),b},Pt.gh=function(a){var y=this.naturalBounds;return oo(0,0,y.width,y.height,a.x,a.y)},Pt.Re=function(a){if(this.angle===0)return this.actualBounds.Re(a);var y=this.naturalBounds;y=Ee.allocAt(0,0,y.width,y.height);var x=this.transform,E=!1,b=At.allocAt(a.x,a.y);return y.ca(x.Cd(b))&&(b.h(a.x,a.bottom),y.ca(x.Cd(b))&&(b.h(a.right,a.bottom),y.ca(x.Cd(b))&&(b.h(a.right,a.y),y.ca(x.Cd(b))&&(E=!0)))),At.free(b),Ee.free(y),E},Pt.fh=function(a,y){if(y===void 0)return a.Re(this.actualBounds);var x=this.naturalBounds,E=!1,b=At.allocAt(0,0);return a.ca(y.Ga(b))&&(b.h(0,x.height),a.ca(y.Ga(b))&&(b.h(x.width,x.height),a.ca(y.Ga(b))&&(b.h(x.width,0),a.ca(y.Ga(b))&&(E=!0)))),At.free(b),E},Pt.Yc=function(a,y){if(y===void 0&&(y=this.transform,this.angle===0))return a.Yc(this.actualBounds);var x=this.naturalBounds,E=At.allocAt(0,0),b=At.allocAt(0,x.height),z=At.allocAt(x.width,x.height),tt=At.allocAt(x.width,0),rt=!1;if(a.ca(y.Ga(E))||a.ca(y.Ga(b))||a.ca(y.Ga(z))||a.ca(y.Ga(tt)))rt=!0;else{x=Ee.allocAt(0,0,x.width,x.height);var ot=At.allocAt(a.x,a.y);x.ca(y.Cd(ot))?rt=!0:(ot.h(a.x,a.bottom),x.ca(y.Cd(ot))?rt=!0:(ot.h(a.right,a.bottom),x.ca(y.Cd(ot))?rt=!0:(ot.h(a.right,a.y),x.ca(y.Cd(ot))&&(rt=!0)))),At.free(ot),Ee.free(x),!rt&&(ue.us(a,E,b)||ue.us(a,b,z)||ue.us(a,z,tt)||ue.us(a,tt,E))&&(rt=!0)}return At.free(E),At.free(b),At.free(z),At.free(tt),rt},Pt.ga=function(a,y){if(y===void 0&&(y=new At),a instanceof li){var x=this.naturalBounds;y.h(a.x*x.width+a.offsetX,a.y*x.height+a.offsetY)}else y.set(a);return this.oe.Ga(y),y},Pt.mi=function(a){a===void 0&&(a=new Ee);var y=this.naturalBounds,x=this.oe,E=At.allocAt(0,0).transform(x);return a.h(E.x,E.y,0,0),E.h(y.width,0).transform(x),Pr(a,E.x,E.y,0,0),E.h(y.width,y.height).transform(x),Pr(a,E.x,E.y,0,0),E.h(0,y.height).transform(x),Pr(a,E.x,E.y,0,0),At.free(E),a},Pt.li=function(){var a=this.oe;return a.m11===1&&a.m12===0?a=0:(a=180*Math.atan2(a.m12,a.m11)/Math.PI,0>a&&(a+=360)),a},Pt.Df=function(){if(!(this.l&4096))return this.Kk;var a=this.Ca;return this.panel!==null?a*this.panel.Df():a},Pt.qs=function(a,y){return y===void 0&&(y=new At),y.assign(a),this.oe.Cd(y),y},Pt.rs=function(a,y,x){return this.Sj(a.x,a.y,y.x,y.y,x)},Pt.Sj=function(a,y,x,E,b){var z=this.transform,tt=1/(z.m11*z.m22-z.m12*z.m21),rt=z.m22*tt,ot=-z.m12*tt,st=-z.m21*tt,ut=z.m11*tt,ft=tt*(z.m21*z.dy-z.m22*z.dx),mt=tt*(z.m12*z.dx-z.m11*z.dy);return this.areaBackground!==null?(z=this.actualBounds,ue.Ff(z.left,z.top,z.right,z.bottom,a,y,x,E,b)):(tt=a*rt+y*st+ft,a=a*ot+y*ut+mt,y=x*rt+E*st+ft,x=x*ot+E*ut+mt,b.h(0,0),E=this.naturalBounds,x=ue.Ff(0,0,E.width,E.height,tt,a,y,x,b),b.transform(z),x)},he.prototype.measure=function(a,y,x,E){if(Vs(this)!==!1){var b=this.Kg,z=b.right+b.left;b=b.top+b.bottom,a=Math.max(a-z,0),y=Math.max(y-b,0),x=Math.max((x||0)-z,0),E=Math.max((E||0)-b,0),z=this.angle,b=this.desiredSize;var tt=this.kq();z===90||z===270?(a=isFinite(b.height)?b.height+tt:a,y=isFinite(b.width)?b.width+tt:y):(a=isFinite(b.width)?b.width+tt:a,y=isFinite(b.height)?b.height+tt:y),b=x||0,tt=E||0;var rt=this instanceof mn;switch(ms(this,!0)){case nn:tt=b=0,rt&&(y=a=1/0);break;case cn:isFinite(a)&&a>x&&(b=a),isFinite(y)&&y>E&&(tt=y);break;case wi:isFinite(a)&&a>x&&(b=a),tt=0,rt&&(y=1/0);break;case Ti:isFinite(y)&&y>E&&(tt=y),b=0,rt&&(a=1/0)}rt=this.maxSize;var ot=this.minSize;b>rt.width&&ot.width<rt.width&&(b=rt.width),tt>rt.height&&ot.height<rt.height&&(tt=rt.height),x=Math.max(b,ot.width),E=Math.max(tt,ot.height),rt.width<x&&(x=Math.min(ot.width,x)),rt.height<E&&(E=Math.min(ot.height,E)),a=Math.min(rt.width,a),y=Math.min(rt.height,y),a=Math.max(x,a),y=Math.max(E,y),(z===90||z===270)&&(z=a,a=y,y=z,z=x,x=E,E=z),this.uc.ka(),this.Wl(a,y,x,E),this.uc.freeze(),this.uc.w()||Gt("Non-real measuredBounds has been set. Object "+this+", measuredBounds: "+this.uc.toString()),Xo(this,!1)}},he.prototype.Wl=function(){},he.prototype.Dd=function(){return!1},he.prototype.arrange=function(a,y,x,E,b){this.Uk();var z=Ee.alloc();z.assign(this.Ib),this.Ib.ka(),ns(this)===!1?this.Ib.h(a,y,x,E):this.eh(a,y,x,E),this.Ib.freeze(),b===void 0?this.tb=null:this.tb=b,x=!1,b!==void 0?x=!0:(b=this.panel,b!==null&&wh(b)&&(b=b.panel),b!==null&&(b=b.dc,E=this.measuredBounds,this.areaBackground!==null&&(E=this.Ib),x=y+E.height,E=a+E.width,x=!(0<=a+.05&&E<=b.width+.05&&0<=y+.05&&x<=b.height+.05),this instanceof io&&(a=this.naturalBounds,this.Lq>a.height||this.Cb>a.width))&&(x=!0)),this.l=x?this.l|256:this.l&-257,this.Ib.w()||Gt("Non-real actualBounds has been set. Object "+this+", actualBounds: "+this.Ib.toString()),this.Xl(z,this.Ib),bu(this,!1),Ee.free(z)},Pt=he.prototype,Pt.eh=function(){};function Ua(a,y,x,E,b){if(a.Ib.h(y,x,E,b),!a.desiredSize.w()){var z=a.uc;x=a.Kg,y=x.right+x.left;var tt=x.top+x.bottom;switch(x=z.width+y,z=z.height+tt,E+=y,b+=tt,y=ms(a,!0),x===E&&z===b&&(y=nn),y){case nn:(x>E||z>b)&&(Xo(a,!0),a.measure(x>E?E:x,z>b?b:z,0,0));break;case cn:Xo(a,!0),a.measure(E,b,0,0);break;case wi:Xo(a,!0),a.measure(E,z,0,0);break;case Ti:Xo(a,!0),a.measure(x,b,0,0)}}}Pt.Xl=function(a,y){var x=this.part;x!==null&&x.diagram!==null&&(x.selectionObject!==this&&x.resizeObject!==this&&x.rotateObject!==this||jv(x,!0),this.N(),vr(a,y)||(x.oh(),this.Pn(x)))},Pt.Pn=function(a){this.portId!==null&&(jv(a,!0),a instanceof Un&&Z1(a,this))},Pt.gc=function(a,y){if(!nl(this,a,y)&&this.visible){var x=this.opacity;if(x!==0){var E=1;x!==1&&(E=a.globalAlpha,a.globalAlpha=E*x);var b="";this.filter!==""&&(b=a.filter,a.filter=this.filter);var z=this instanceof mn&&wh(this),tt=this.Ib;if(z){var rt=this.Ib,ot=this.dc,st=this.areaBackground,ut=this.Ma;st===null&&ut===null||a.yc(),st!==null&&(Mo(this,a,st,!0,!0,ot,rt),st instanceof Wr&&st.type===ol?(a.beginPath(),a.rect(rt.x,rt.y,rt.width,rt.height),a.ng(st)):a.fillRect(rt.x,rt.y,rt.width,rt.height)),ut!==null&&(Mo(this,a,ut,!0,!1,ot,rt),ut instanceof Wr&&ut.type===ol?(a.beginPath(),a.rect(rt.x,rt.y,rt.width,rt.height),a.ng(ut)):a.fillRect(rt.x,rt.y,rt.width,rt.height)),this.hh(a,y)}if(!z&&(z||tt.width!==0&&tt.height!==0&&!isNaN(tt.x)&&!isNaN(tt.y))){z=this.transform,rt=this.panel,this.l&4096&&wa(this),st=this.part,ot=!1;var ft=0;st&&y.Gf("drawShadows")&&(ot=st.isShadowed)&&(ut=st.shadowOffset,ft=Math.max(ut.y,ut.x)*y.scale*y.Mb),ut=this.Dd();var mt;if(!(mt=y.$i||!ut)){var yt=this.naturalBounds;mt=this.wh;var wt=mt.m11,bt=mt.m21,Zt=mt.dx,It=mt.m12,Yt=mt.m22,Jt=mt.dy,qt,ae=qt=0;mt=qt*wt+ae*bt+Zt;var Ce=qt*It+ae*Yt+Jt;qt=yt.width+ft,ae=0;var In=qt*wt+ae*bt+Zt;qt=qt*It+ae*Yt+Jt,ae=Math.min(mt,In);var ui=Math.min(Ce,qt),$n=Math.max(mt+0,In)-ae,Cn=Math.max(Ce+0,qt)-ui;mt=ae,Ce=ui,qt=yt.width+ft,ae=yt.height+ft,In=qt*wt+ae*bt+Zt,qt=qt*It+ae*Yt+Jt,ae=Math.min(mt,In),ui=Math.min(Ce,qt),$n=Math.max(mt+$n,In)-ae,Cn=Math.max(Ce+Cn,qt)-ui,mt=ae,Ce=ui,qt=0,ae=yt.height+ft,In=qt*wt+ae*bt+Zt,qt=qt*It+ae*Yt+Jt,ae=Math.min(mt,In),ui=Math.min(Ce,qt),$n=Math.max(mt+$n,In)-ae,Cn=Math.max(Ce+Cn,qt)-ui,mt=ae,Ce=ui,ft=y.viewportBounds,yt=ft.x,wt=ft.y,mt=!(mt>ft.width+yt||yt>$n+mt||Ce>ft.height+wt||wt>Cn+Ce)}if(mt){if(mt=(this.l&256)!==0,a.clipInsteadOfFill&&(mt=!1),this instanceof io&&(a.font=this.font),mt){if(Ce=rt.se()?rt.naturalBounds:rt.actualBounds,$n=Math.max(tt.x,Ce.x),Cn=Math.max(tt.y,Ce.y),ft=Math.min(tt.right,Ce.right)-$n,yt=Math.min(tt.bottom,Ce.bottom)-Cn,wt=this.tb,wt!==null&&($n=wt.x,Cn=wt.y,ft=wt.width,yt=wt.height),$n>tt.width+tt.x||tt.x>Ce.width+Ce.x){x!==1&&(a.globalAlpha=E),this.filter!==""&&(a.filter=b);return}a.save(),a.beginPath(),a.rect($n,Cn,ft,yt),a.clip()}if(ut){if(!st.isVisible()){x!==1&&(a.globalAlpha=E),this.filter!==""&&(a.filter=b);return}ot&&(Ce=st.shadowOffset,a.Ev(Ce.x*y.scale*this.scale*y.Mb,Ce.y*y.scale*this.scale*y.Mb,st.shadowBlur),Yu(a),a.shadowColor=st.shadowColor)}ot&&this.shadowVisible===!0?Yu(a):ot&&this.shadowVisible===!1&&Mu(a),st=this.naturalBounds,this.areaBackground!==null&&(a.yc(),Ws(this,a,st,tt)),a.transform(z.m11,z.m12,z.m21,z.m22,z.dx,z.dy),ot&&pa(this,rt)&&this.shadowVisible===null&&Mu(a),this.Ma!==null&&(a.yc(),Es(this,a,st,tt)),ot&&(this.Ma!==null||this.areaBackground!==null||pa(this,rt))?(Dl(this,!0),this.shadowVisible===null&&Mu(a)):Dl(this,!1),this.hh(a,y),ot&&this.l&512&&Yu(a),ut&&ot&&Mu(a),mt&&(a.restore(),a.Vc(this instanceof mn)),z.ws()||(y=1/(z.m11*z.m22-z.m12*z.m21),a.transform(z.m22*y,-z.m12*y,-z.m21*y,z.m11*y,y*(z.m21*z.dy-z.m22*z.dx),y*(z.m12*z.dx-z.m11*z.dy)))}}x!==1&&(a.globalAlpha=E),this.filter!==""&&(a.filter=b)}}};function pa(a,y){return y===null?!1:(wh(y)&&(y=y.panel),(y.l&512)!==0||(y.type===mn.Auto||y.type===mn.Spot)&&y.Pb()!==a)}Pt.Dv=function(){};function Ws(a,y,x,E){Mo(a,y,a.areaBackground,!0,!0,x,E),a.areaBackground instanceof Wr&&a.areaBackground.type===ol?(y.beginPath(),y.rect(E.x,E.y,E.width,E.height),y.ng(a.areaBackground)):y.fillRect(E.x,E.y,E.width,E.height)}function Es(a,y,x,E){var b=a.kq(),z=x.x,tt=x.y,rt=x.width+b,ot=x.height+b;Mo(a,y,a.Ma,!0,!1,x,E),a.Ma instanceof Wr&&a.Ma.type===ol?(y.beginPath(),y.rect(z-b/2,tt-b/2,rt,ot),y.ng(a.Ma)):y.fillRect(z-b/2,tt-b/2,rt,ot)}function ja(a,y,x){for(var E=y.O.s,b=E.length,z=-1,tt=0;tt<b;tt++)if(E[tt]===a){z=tt;break}if(a=z,a!==-1)if(a===0)y.svg.gd?y.svg.gd.after(x):y.svg.Ma?y.svg.Ma.after(x):y.type===mn.Table?(y=y.svg.getElementsByClassName("gojs-ts"),y=y.length!==0?y[0]:null,y!==null&&y.after(x)):y.svg.prepend(x);else{for(;a!==0&&!y.M(a-1).Ed();)a--;a===0?y.svg.prepend(x):(a=y.M(a-1).svg,a!==null?a.after(x):y.svg.appendChild(x))}}function nl(a,y,x){if(!(y instanceof Ts))return!1;if(!a.visible||a.opacity===0||a.Dd()&&!a.isVisible())return a.svg!==null&&a.svg.parentNode!==null&&a.svg.remove(),!0;var E=a.panel,b=a.nk(y);if(a.kk(y,x,b))return a.svg.parentElement!==null?(a.Dd()&&(y.ti=a.svg),!0):(a.Dd()?(y.ti!==null?y.ti.after(a.svg):y.Nj.prepend(a.svg),y.ti=a.svg):E&&ja(a,E,a.svg),!0);if(a.Dd()&&a.isShadowed){var z=a.shadowOffset;y.Ev(z.x*x.scale*a.scale*x.Mb,z.y*x.scale*a.scale*x.Mb,a.shadowBlur),Yu(y),y.shadowColor=a.shadowColor}a instanceof io&&(y.font=a.font),y.yd=null;var tt=a.transform;z=a instanceof mn;var rt=a instanceof mn?wh(a):!1;a.l&4096&&wa(a);var ot=a.Ib;if(y.rb.ha=[1,0,0,1,0,0],y.o=!1,b&&(y.o=!0,z&&rt?(Hg(y,1,0,0,1,0,0),a.svg=y.ad):z?(Hg(y,tt.m11,tt.m12,tt.m21,tt.m22,tt.dx,tt.dy),a.svg=y.ad):Hg(y,1,0,0,1,0,0)),b=a.naturalBounds,a.areaBackground!==null){var st=tt.copy().Vj();y.rb.ha=[st.m11,st.m12,st.m21,st.m22,st.dx,st.dy],Ws(a,y,b,ot),y.rb.ha=[1,0,0,1,0,0],y.yd.gd=y.ad,y.yd.prepend(y.ad)}return z||(y.rb.ha=[tt.m11,tt.m12,tt.m21,tt.m22,tt.dx,tt.dy]),a.background!==null&&(z?(rt&&(y.rb.ha=[tt.m11,tt.m12,tt.m21,tt.m22,tt.dx,tt.dy]),Es(a,y,b,ot),rt&&(y.rb.ha=[1,0,0,1,0,0])):(y.rb.ha=[tt.m11,tt.m12,tt.m21,tt.m22,tt.dx,tt.dy],Es(a,y,b,ot)),y.yd.Ma=y.ad,y.yd.prepend(y.ad)),tt=y.yd,b=a.part,rt=!1,b&&x.Gf("drawShadows")&&(rt=b.isShadowed),y.clipInsteadOfFill&&(rt=!1),a.Dd()&&rt&&Yu(y),rt&&a.shadowVisible===!0?Yu(y):rt&&a.shadowVisible===!1&&Mu(y),b=a.panel,rt&&pa(a,b)&&a.shadowVisible===null&&Mu(y),y.Il&&(st=x.computePixelRatio(),st="drop-shadow("+y.shadowOffsetX/st+"px "+y.shadowOffsetY/st+"px "+y.shadowBlur/st/2+"px "+y.shadowColor+")",a.background!==null&&tt.Ma.setAttributeNS(null,"filter",st),a.areaBackground!==null&&tt.gd.setAttributeNS(null,"filter",st)),rt&&(a.Ma!==null||a.areaBackground!==null||pa(a,b))?(Dl(a,!0),a.shadowVisible===null&&Mu(y)):Dl(a,!1),b=rt,a.hh(y,x),z&&y.nh.pop(),y.o&&y.nh.pop(),tt=y.Gv.hs,rt=z?a.svg:y.yd,st=a.svg,!z&&st!==null&&rt!==st&&st.parentNode===a.panel.svg?(a.svg.replaceWith(rt),a.svg=rt,rt!==null&&a.$o(y,E,ot,rt),ps(y,st),!0):(a.svg=rt,tt!==null&&rt===null&&(lm(y),y.nh.pop()),rt===null||(a.$o(y,E,ot,rt),y.Il&&(x=x.computePixelRatio(),a.Dv(rt,"drop-shadow("+y.shadowOffsetX/x+"px "+y.shadowOffsetY/x+"px "+y.shadowBlur/x/2+"px "+y.shadowColor+")")),b&&a.l&512&&Yu(y),a.Dd()&&Mu(y),x=a.Dd()?a.opacity*y.globalAlpha:a.opacity,x!==1&&rt.setAttributeNS(null,"opacity",x.toString()),a.filter!==""&&rt.setAttributeNS(null,"filter",a.filter),a.Dd()?(y.ti?y.ti.after(rt):y.Nj.prepend(rt),y.ti=rt):E!==null&&ja(a,E,rt),tt!==null&&tt(a,rt)),!0)}Pt.$o=function(a,y,x,E){var b=(this.l&256)!==0;if(a.clipInsteadOfFill&&(b=!1),b){var z=y.se()?y.naturalBounds:y.actualBounds;y=Math.max(x.x,z.x),b=Math.max(x.y,z.y);var tt=Math.min(x.right,z.right)-y;x=Math.min(x.bottom,z.bottom)-b,z=this.tb,z!==null&&(y=z.x,b=z.y,tt=z.width,x=z.height),z=E.getAttribute("clip-path");var rt=null;z!==null&&(rt=a.svg.getElementById(z.split("#")[1].slice(0,-1))),rt===null?(z="CLIP"+Br++,rt=a.Ud("clipPath",{id:z}),y=a.Ud("rect",{x:y,y:b,width:tt,height:x}),this instanceof mn&&(b=this.transform.copy().Vj(),y.setAttribute("transform","matrix("+b.m11+", "+b.m12+", "+b.m21+", "+b.m22+", "+b.dx+", "+b.dy+")")),rt.appendChild(y),a.svg.appendChild(rt),E.setAttributeNS(null,"clip-path","url(#"+z+")")):(a=rt.firstElementChild,a.setAttribute("x",y.toString()),a.setAttribute("y",b.toString()),a.setAttribute("width",tt.toString()),a.setAttribute("height",x.toString()))}else E.removeAttributeNS(null,"clip-path"),ps(a,E)};function ps(a,y){y=y.getAttribute("clip-path"),y!==null&&(a=a.svg.getElementById(y.split("#")[1].slice(0,-1)),a!==null&&a.remove())}function za(a){if(a.svg!==null){var y=a.svg.innerHTML.match(/url\(#((CLIP|GRAD).+?)\)/g),x=a.svg.ownerDocument;if(y!==null){y=Si(y);for(var E=y.next();!E.done;E=y.next())E=x.getElementById(E.value.split("#")[1].slice(0,-1)),E!==null&&E.remove()}a.svg.remove()}}Pt.hh=function(){},Pt.lv=function(){this.Uc=!0},Pt.kk=function(a,y,x){if(this.Uc)return this.lv(),this.Uc=!1;if(y=this.svg,y===null)return!1;if(!this.visible)return y.remove(),!1;if(y.nodeName!=="g"&&x||y.nodeName==="g"&&!x)return!1;var E=this.transform,b=this instanceof mn?wh(this):!1;if(!(this instanceof mn&&b))if(this instanceof ys){var z=this.bt;a.rb.ha=[E.m11,E.m12,E.m21,E.m22,E.dx,E.dy],z!==null&&Jy(a,z[0],z[1],z[2],z[3],z[4],z[5],z[6],z[7]),x?y.lastElementChild.setAttributeNS(null,"transform",_y(a)):y.setAttributeNS(null,"transform",_y(a))}else if(!x||this instanceof mn)y.setAttributeNS(null,"transform","matrix("+E.m11+", "+E.m12+", "+E.m21+", "+E.m22+", "+E.dx+", "+E.dy+")");else if(this instanceof lr){z=y.getElementsByTagName("path");for(var tt=0;tt<z.length;tt++)z[tt].setAttributeNS(null,"transform","matrix("+E.m11+", "+E.m12+", "+E.m21+", "+E.m22+", "+E.dx+", "+E.dy+")")}else y.lastElementChild.setAttributeNS(null,"transform","matrix("+E.m11+", "+E.m12+", "+E.m21+", "+E.m22+", "+E.dx+", "+E.dy+")");return z=this.Dd()?this.opacity*a.globalAlpha:this.opacity,z===1?y.removeAttribute("opacity"):y.setAttributeNS(null,"opacity",z.toString()),a.rb.ha=[1,0,0,1,0,0],(this.areaBackground!==null||y.gd!==void 0)&&(z=y.gd,this.areaBackground===null?(y.gd.remove(),y.gd=void 0):(tt=E.copy().Vj(),a.rb.ha=[tt.m11,tt.m12,tt.m21,tt.m22,tt.dx,tt.dy],Ws(this,a,this.naturalBounds,this.actualBounds),a.rb.ha=[1,0,0,1,0,0],y.gd?(tt=y.gd.getAttribute("filter"),tt!==null&&a.ad.setAttribute("filter",tt),y.gd.replaceWith(a.ad)):y.prepend(a.ad),y.gd=a.ad),z&&um(a,z)),(this.background!==null||y.Ma!==void 0)&&(z=y.Ma,this.background===null?(um(a,y.Ma),y.Ma.remove(),y.Ma=void 0):((b||x&&!(this instanceof mn))&&(a.rb.ha=[E.m11,E.m12,E.m21,E.m22,E.dx,E.dy]),Es(this,a,this.naturalBounds,this.actualBounds),y.Ma?(um(a,y.Ma),x=y.Ma.getAttribute("filter"),x!==null&&a.ad.setAttribute("filter",x),y.Ma.replaceWith(a.ad)):y.prepend(a.ad),y.Ma=a.ad),z&&um(a,z)),this.$o(a,this.panel,this.actualBounds,y),!0},Pt.nk=function(a){if(this.background!==null||this.areaBackground!==null)return!0;var y=(this.l&256)!==0;return a.clipInsteadOfFill&&(y=!1),!!y};function Mo(a,y,x,E,b,z,tt){if(x!==null){var rt=1,ot=1;if(typeof x=="string")E?y.fillStyle=x:y.strokeStyle=x;else if(x.type===xh)E?y.fillStyle=x.color:y.strokeStyle=x.color;else{var st=a.kq();if(rt=z.width,ot=z.height,b?(rt=tt.width,ot=tt.height):E||(rt+=st,ot+=st),(z=y instanceof Ud)&&x.xe&&(x.type===bf||x.yk===rt&&x.ft===ot))var ut=x.xe;else{var ft=0,mt=0,yt=0,wt=0,bt=0,Zt=0;if(Zt=bt=0,b?(bt=tt.x,Zt=tt.y):E||(bt-=st/2,Zt-=st/2),ft=x.start.x*rt+x.start.offsetX,mt=x.start.y*ot+x.start.offsetY,yt=x.end.x*rt+x.end.offsetX,wt=x.end.y*ot+x.end.offsetY,ft+=bt,yt+=bt,mt+=Zt,wt+=Zt,x.type===Ju)ut=y.createLinearGradient(ft,mt,yt,wt);else if(x.type===ol)Zt=isNaN(x.endRadius)?Math.max(rt,ot)/2:x.endRadius,isNaN(x.startRadius)?(bt=0,Zt=Math.max(rt,ot)/2):bt=x.startRadius,ut=y.createRadialGradient(ft,mt,bt,yt,wt,Zt);else if(x.type===bf)try{ut=y.createPattern(x.pattern,"repeat")}catch(Yt){ut=null}if(x.type!==bf&&(b=x.colorStops,b!==null))for(b=b.iterator;b.next();)ut.addColorStop(b.key,b.value);if(z&&(x.xe=ut,ut!==null&&(x.yk=rt,x.ft=ot),ut===null&&x.type===bf&&x.yk!==-1)){x.yk=-1;var It=a.diagram;It!==null&&x.yk===-1&&ki(function(){It.redraw()},600)}}E?y.fillStyle=ut:y.strokeStyle=ut}}}Pt.rg=function(a){if(a instanceof mn)t:{if(this!==a&&a!==null)for(var y=this.panel;y!==null;){if(y===a){a=!0;break t}y=y.panel}a=!1}else a=!1;return a},Pt.Ed=function(){if(!this.visible)return!1;var a=this.panel;return a!==null?a.Ed():!0},Pt.If=function(){for(var a=this instanceof mn?this:this.panel;a!==null&&a.isEnabled;)a=a.panel;return a===null};function wa(a){if(a.l&2048){var y=a.Ab;if(y.reset(),!a.Ib.w()||!a.uc.w()){vl(a,!1);return}if(y.translate(a.Ib.x-a.uc.x,a.Ib.y-a.uc.y),a.scale!==1||a.angle!==0){var x=a.naturalBounds;a.no(y,x.x,x.y,x.width,x.height)}vl(a,!1),il(a,!0)}a.l&4096&&(y=a.panel,y===null?(a.wh.set(a.Ab),a.Kk=a.scale,il(a,!1)):y.oe!==null&&(x=a.wh,x.reset(),y.se()?x.multiply(y.wh):y.panel!==null&&x.multiply(y.panel.wh),x.multiply(a.Ab),a.Kk=a.scale*y.Kk,il(a,!1)))}Pt.no=function(a,y,x,E,b){if(this.Ca!==1&&a.scale(this.Ca),this.Kb!==0){var z=At.alloc();z.yi(y,x,E,b,er),a.rotate(this.Kb,z.x,z.y),At.free(z)}},Pt.v=function(a){if(!Vs(this)){a===void 0&&(a=!1),Xo(this,!0),bu(this,!0);var y=this.panel;y===null||a||y.v()}},Pt.Uj=function(){Vs(this)||(Xo(this,!0),bu(this,!0))};function es(a){if(!ns(a)){var y=a.panel;y!==null?y.v():a.Dd()&&(y=a.diagram,y!==null&&(y.De.add(a),a instanceof Un&&a.Bd(),y.$b())),bu(a,!0)}}Pt.Uk=function(){!(this.l&2048)&&(vl(this,!0),il(this,!0))},Pt.Wu=function(){il(this,!0)},Pt.N=function(){var a=this.part;a!==null&&a.N()};function ms(a,y){var x=a.stretch,E=a.panel;return E!==null&&E.type===mn.Table?Xl(a,E.Fb(a.row),E.Eb(a.column),y):E!==null&&E.type===mn.Auto&&E.Pb()===a?ma(a,cn,y):x===tr?E!==null?E.type===mn.Spot&&E.Pb()===a?ma(a,cn,y):(x=E.defaultStretch,x===tr?ma(a,nn,y):ma(a,x,y)):ma(a,nn,y):ma(a,x,y)}function Xl(a,y,x,E){var b=a.stretch;if(b!==tr)return ma(a,b,E);var z=b=null;switch(y.stretch){case Ti:z=!0;break;case cn:z=!0}switch(x.stretch){case wi:b=!0;break;case cn:b=!0}return y=a.panel.defaultStretch,b===null&&(b=y===wi||y===cn),z===null&&(z=y===Ti||y===cn),b===!0&&z===!0?ma(a,cn,E):b===!0?ma(a,wi,E):z===!0?ma(a,Ti,E):ma(a,nn,E)}function ma(a,y,x){if(x)return y;if(y===nn||(x=a.desiredSize,x.w()))return nn;if(a=a.angle,!isNaN(x.width))if(a!==90&&a!==270){if(y===wi)return nn;if(y===cn)return Ti}else{if(y===Ti)return nn;if(y===cn)return wi}if(!isNaN(x.height))if(a!==90&&a!==270){if(y===Ti)return nn;if(y===cn)return wi}else{if(y===wi)return nn;if(y===cn)return Ti}return y}function Dl(a,y){a.l=y?a.l|512:a.l&-513}function ka(a){return(a.l&1024)!==0}function Fc(a,y){a.l=y?a.l|1024:a.l&-1025}function vl(a,y){a.l=y?a.l|2048:a.l&-2049}function il(a,y){a.l=y?a.l|4096:a.l&-4097}function Vs(a){return(a.l&8192)!==0}function Xo(a,y){a.l=y?a.l|8192:a.l&-8193}function ns(a){return(a.l&16384)!==0}function bu(a,y){a.l=y?a.l|16384:a.l&-16385}Pt.Gj=function(){this.svg=null},Pt.wi=function(a){this.Me=a,this.svg!==null&&this.svg.remove()},Pt.Av=function(){},Pt.zv=function(a){return this.pa=a,es(this),!0},Pt.mm=function(a,y){(this.pa.x!==a||this.pa.y!==y)&&(this.pa.h(a,y),this.Uk())},Pt.kq=function(){return 0};function Wd(a){var y=a.part;if(y instanceof Un&&(a.portId!==null||a===y.port)){var x=y.diagram;x===null||x.undoManager.isUndoingRedoing||Z1(y,a)}}function Yy(a){var y=a.diagram;y===null||y.undoManager.isUndoingRedoing||(a instanceof mn?a instanceof Un?a.Bd():a.qm(a,function(x){Wd(x)}):Wd(a))}Pt.bind=function(a,y,x,E){var b=null;return typeof a=="string"?b=new Ko(a,y,x,E):b=a,b.xd=this,a=this.ih(),a!==null&&c1(a)&&Gt("Cannot add a Binding to a template that has already been copied: "+b),this.localBindings===null&&(this.localBindings=new Xe),this.localBindings.add(b),this},Pt.set=function(a){return Object.assign(this,a),this},Pt.Du=function(a){return nv(this,a),this},Pt.apply=function(a){return a(this),this},Pt.nm=function(a){return Id(this,a),this},Pt.pz=function(){return this.ih()},Pt.ih=function(){for(var a=this instanceof mn?this:this.panel;a!==null;){if(a.allBindings!==null)return a;a=a.panel}return null},Pt.Jv=function(a){return a.xd=this,this.animationTriggers===null&&(this.animationTriggers=new Me),this.animationTriggers.add(a.propertyName,a),this};function rl(a,y){for(var x=1;x<arguments.length;++x);x=arguments;var E=null,b=null;if(typeof a=="function")b=a;else if(typeof a=="string"){var z=wf.I(a);typeof z=="function"?(x=Sn(arguments),E=z(x),De(E)||Gt('GraphObject.make invoked object builder "'+a+'", but it did not return an Object')):b=ln.go[a]}if(E===null&&(b!=null&&b.constructor||Gt("GraphObject.make requires a class function or GoJS class name or name of an object builder, not: "+a),E=new b),b=1,E instanceof Le&&1<x.length){z=E;var tt=x[1];(typeof tt=="string"||tt instanceof HTMLDivElement)&&(pg(z,tt),b++)}for(;b<x.length;b++)z=x[b],z===void 0?Gt("Undefined value at argument "+b+" for object being constructed by GraphObject.make: "+E):nv(E,z);return E}function nv(a,y){if(typeof y=="string")if(a instanceof io)a.text=y;else if(a instanceof lr)a.figure=y;else if(a instanceof ys)a.source=y;else if(a instanceof mn)y=Bl.I(y),y!==null&&(a.type=y);else if(a instanceof Wr){var x=Vn(Wr,y);x!==null?a.type=x:Gt("Unknown Brush type as an argument to GraphObject.make: "+y)}else a instanceof xn?(y=Vn(xn,y),y!==null&&(a.type=y)):a instanceof Or&&(y=Vn(Or,y),y!==null&&(a.type=y));else if(y instanceof he)a instanceof mn||Gt("A GraphObject can only be added to a Panel, not to: "+a),a.add(y);else if(y instanceof Jo){var E;y.isRow&&typeof a.getRowDefinition=="function"?E=a.getRowDefinition(y.index):y.isRow||typeof a.getColumnDefinition!="function"||(E=a.getColumnDefinition(y.index)),E instanceof Jo?km(E,y):Gt("A RowColumnDefinition can only be added to an object that implements getRowDefinition/getColumnDefinition, not to: "+a)}else if(y instanceof Ue)typeof a.qb=="function"&&a.qb(y);else if(y instanceof Qo)a.type=y;else if(y instanceof Ko)a instanceof he||a instanceof Jo?a.bind(y):Gt("A Binding can only be applied to a GraphObject or RowColumnDefinition, not to: "+a);else if(y instanceof Al)a instanceof he?a.Jv(y):Gt("An AnimationTrigger can only be applied to a GraphObject, not to: "+a);else if(y instanceof jo)a instanceof xn&&a.type===xn.o?a.figures.add(y):Gt("A PathFigure can only be added to a Path Geometry, not to: "+a);else if(y instanceof Or)a instanceof jo?a.segments.add(y):Gt("A PathSegment can only be added to a PathFigure, not to: "+a);else if(y instanceof mo)a instanceof Le||a instanceof $i?a.layout=y:Gt("A Layout can only be assigned to a Diagram or a Group, not to: "+a);else if(Array.isArray(y))for(x=0;x<y.length;x++)nv(a,y[x]);else if(typeof y=="object"&&y!==null)if(a instanceof Wr){x=new pi;for(var b in y)E=parseFloat(b),isNaN(E)?x[b]=y[b]:a.addColorStop(E,y[b]);Id(a,x)}else if(a instanceof Jo){y.row!==void 0?(b=y.row,(b==null||b===1/0||isNaN(b)||0>b)&&Gt("Must specify non-negative integer row for RowColumnDefinition "+y+", not: "+b),a.isRow=!0,a.index=b):y.column!==void 0&&(b=y.column,(b==null||b===1/0||isNaN(b)||0>b)&&Gt("Must specify non-negative integer column for RowColumnDefinition "+y+", not: "+b),a.isRow=!1,a.index=b),b=new pi;for(x in y)x!=="row"&&x!=="column"&&(b[x]=y[x]);Id(a,b)}else Id(a,y);else Gt('Unknown initializer "'+y+'" for object being constructed by GraphObject.make: '+a)}function Sh(a,y){wf.add(a,y)}function sm(a,y,x){x===void 0&&(x=null);var E=a[1];if(typeof x=="function"?x(E):typeof E=="string")return a.splice(1,1),E;if(y===void 0)throw Error("no "+(typeof x=="function"?"satisfactory":"string")+" argument for GraphObject builder "+a[0]);return y}ge.Object.defineProperties(he.prototype,{bindingId:{get:function(){return this.A!==null?this.A.zp:-1},set:function(a){this.bindingId!==a&&(this.A===null&&(this.A=new Ac),this.A.zp=a)}},localBindings:{get:function(){return this.A!==null?this.A.te:null},set:function(a){this.localBindings!==a&&(this.A===null&&(this.A=new Ac),this.A.te=a)}},srcBindings:{get:function(){return this.A!==null?this.A.wm:null},set:function(a){this.srcBindings!==a&&(this.A===null&&(this.A=new Ac),this.A.wm=a)}},shadowVisible:{get:function(){return this.A!==null?this.A.Ci:null},set:function(a){var y=this.shadowVisible;y!==a&&(cr(this),this.A.Ci=a,this.Uc=!0,this.N(),this.g("shadowVisible",y,a))}},enabledChanged:{get:function(){return this.A!==null?this.A.Hb:null},set:function(a){var y=this.enabledChanged;y!==a&&(cr(this),this.A.Hb=a,this.g("enabledChanged",y,a))}},segmentOrientation:{get:function(){return this.Ua!==null?this.Ua.rr:os},set:function(a){var y=this.segmentOrientation;y!==a&&(this.Ua===null&&(this.Ua=new id),this.Ua.rr=a,this.v(),this.g("segmentOrientation",y,a),a===os&&(this.angle=0))}},segmentIndex:{get:function(){return this.Ua!==null?this.Ua.u:-1/0},set:function(a){a=Math.round(a);var y=this.segmentIndex;y!==a&&(this.Ua===null&&(this.Ua=new id),this.Ua.u=a,this.v(),this.g("segmentIndex",y,a))}},segmentFraction:{get:function(){return this.Ua!==null?this.Ua.o:0},set:function(a){isNaN(a)||0>a?a=0:1<a&&(a=1);var y=this.segmentFraction;y!==a&&(this.Ua===null&&(this.Ua=new id),this.Ua.o=a,this.v(),this.g("segmentFraction",y,a))}},segmentOffset:{get:function(){return this.Ua!==null?this.Ua.F:Nn},set:function(a){var y=this.segmentOffset;y.D(a)||(a=a.J(),this.Ua===null&&(this.Ua=new id),this.Ua.F=a,this.v(),this.g("segmentOffset",y,a))}},stretch:{get:function(){return this.A!==null?this.A.hg:tr},set:function(a){var y=this.stretch;y!==a&&(cr(this),this.A.hg=a,this.v(),this.g("stretch",y,a))}},name:{get:function(){return this.A!==null?this.A.xa:""},set:function(a){var y=this.name;y!==a&&(cr(this),this.A.xa=a,this.part!==null&&(this.part.Rh=null),this.g("name",y,a))}},opacity:{get:function(){return this.pb},set:function(a){var y=this.pb;y!==a&&((0>a||1<a)&&Mn(a,"0 <= value <= 1",he,"opacity"),this.pb=a,this.g("opacity",y,a),a=this.diagram,y=this.part,a!==null&&y!==null&&a.N(_d(y,y.actualBounds)))}},filter:{get:function(){return this.bn},set:function(a){var y=this.bn;y!==a&&(this.bn=a,this.Uc=!0,this.g("filter",y,a),a=this.diagram,y=this.part,a!==null&&y!==null&&a.N(_d(y,y.actualBounds)))}},visible:{get:function(){return(this.l&1)!==0},set:function(a){var y=(this.l&1)!==0;y!==a&&(this.l^=1,this.g("visible",y,a),y=this.panel,y!==null?y.v():this.Dd()&&this.Zb(a),this.N(),Yy(this))}},pickable:{get:function(){return(this.l&2)!==0},set:function(a){var y=(this.l&2)!==0;y!==a&&(this.l^=2,this.g("pickable",y,a))}},fromLinkableDuplicates:{get:function(){return(this.l&4)!==0},set:function(a){var y=(this.l&4)!==0;y!==a&&(this.l^=4,this.g("fromLinkableDuplicates",y,a))}},fromLinkableSelfNode:{get:function(){return(this.l&8)!==0},set:function(a){var y=(this.l&8)!==0;y!==a&&(this.l^=8,this.g("fromLinkableSelfNode",y,a))}},toLinkableDuplicates:{get:function(){return(this.l&16)!==0},set:function(a){var y=(this.l&16)!==0;y!==a&&(this.l^=16,this.g("toLinkableDuplicates",y,a))}},toLinkableSelfNode:{get:function(){return(this.l&32)!==0},set:function(a){var y=(this.l&32)!==0;y!==a&&(this.l^=32,this.g("toLinkableSelfNode",y,a))}},isPanelMain:{get:function(){return(this.l&64)!==0},set:function(a){var y=(this.l&64)!==0;y!==a&&(this.l^=64,this.v(),this.g("isPanelMain",y,a))}},isActionable:{get:function(){return(this.l&128)!==0},set:function(a){var y=(this.l&128)!==0;y!==a&&(this.l^=128,this.g("isActionable",y,a))}},areaBackground:{get:function(){return this.A!==null?this.A.gd:null},set:function(a){var y=this.areaBackground;y!==a&&(a!==null&&Dc(a,"GraphObject.areaBackground"),a instanceof Wr&&a.freeze(),cr(this),this.A.gd=a,this.N(),this.g("areaBackground",y,a))}},background:{get:function(){return this.Ma},set:function(a){var y=this.Ma;y!==a&&(a!==null&&Dc(a,"GraphObject.background"),a instanceof Wr&&a.freeze(),this.Ma=a,this.N(),this.g("background",y,a))}},part:{get:function(){if(this.Dd())return this;if(this.Ng!==null)return this.Ng;var a;for(a=this.panel;a;){if(a instanceof Li)return this.Ng=a;a=a.panel}return null}},svg:{get:function(){return this.V},set:function(a){this.V=a}},panel:{get:function(){return this.Me}},layer:{get:function(){var a=this.part;return a!==null?a.layer:null}},diagram:{get:function(){var a=this.part;return a!==null?a.diagram:null}},position:{get:function(){return this.pa},set:function(a){var y=a.x,x=a.y,E=this.pa,b=E.x;E=E.y,(b===y||isNaN(b)&&isNaN(y))&&(E===x||isNaN(E)&&isNaN(x))?this.Av():(a=a.copy(),this.zv(a,b,E)&&this.g("position",new At(b,E),a))}},actualBounds:{get:function(){return this.Ib}},scale:{get:function(){return this.Ca},set:function(a){var y=this.Ca;y!==a&&(0>=a&&Gt("GraphObject.scale for "+this+" must be greater than zero, not: "+a),this.Ca=a,this.v(),this.g("scale",y,a))}},angle:{get:function(){return this.Kb},set:function(a){var y=this.Kb;y!==a&&(a%=360,0>a&&(a+=360),y!==a&&(this.Kb=a,Yy(this),this.v(),this.g("angle",y,a)))}},desiredSize:{get:function(){return this.jd},set:function(a){var y=a.width,x=a.height,E=this.jd,b=E.width,z=E.height;(b===y||isNaN(b)&&isNaN(y))&&(z===x||isNaN(z)&&isNaN(x))||(this.jd=a=a.J(),this.v(),this instanceof lr&&this.qc(),this.g("desiredSize",E,a),ka(this)&&(a=this.part,a!==null&&(co(this,a,"width"),co(this,a,"height"))))}},width:{get:function(){return this.jd.width},set:function(a){var y=this.jd.width;y===a||isNaN(y)&&isNaN(a)||(y=this.jd,this.jd=a=new Ke(a,this.jd.height).freeze(),this.v(),this instanceof lr&&this.qc(),this.g("desiredSize",y,a),ka(this)&&(a=this.part,a!==null&&co(this,a,"width")))}},height:{get:function(){return this.jd.height},set:function(a){var y=this.jd.height;y===a||isNaN(y)&&isNaN(a)||(y=this.jd,this.jd=a=new Ke(this.jd.width,a).freeze(),this.v(),this instanceof lr&&this.qc(),this.g("desiredSize",y,a),ka(this)&&(a=this.part,a!==null&&co(this,a,"height")))}},minSize:{get:function(){return this.A!==null?this.A.u:qn},set:function(a){var y=this.minSize;y.D(a)||(a=a.copy(),isNaN(a.width)&&(a.width=0),isNaN(a.height)&&(a.height=0),a.freeze(),cr(this),this.A.u=a,this.v(),this.g("minSize",y,a))}},maxSize:{get:function(){return this.A!==null?this.A.o:sr},set:function(a){var y=this.maxSize;y.D(a)||(a=a.copy(),isNaN(a.width)&&(a.width=1/0),isNaN(a.height)&&(a.height=1/0),a.freeze(),cr(this),this.A.o=a,this.v(),this.g("maxSize",y,a))}},measuredBounds:{get:function(){return this.uc}},naturalBounds:{get:function(){return this.dc}},margin:{get:function(){return this.Kg},set:function(a){typeof a=="number"&&(a=new Ji(a));var y=this.Kg;y.D(a)||(this.Kg=a=a.J(),this.v(),this.g("margin",y,a))}},transform:{get:function(){return this.l&2048&&wa(this),this.Ab}},oe:{get:function(){return this.l&4096&&wa(this),this.wh}},animationTriggers:{get:function(){return this.A!==null?this.A.hb:null},set:function(a){this.animationTriggers!==a&&(cr(this),this.A.hb=a)}},reshapingBehavior:{get:function(){return this.A!==null?this.A.Pf:nn},set:function(a){this.reshapingBehavior!==a&&(cr(this),this.A.Pf=a)}},alignment:{get:function(){return this.Jb},set:function(a){var y=this.Jb;y.D(a)||(a.Mc()&&!a.Xb()&&Gt("GraphObject.alignment for "+this+" must be a real Spot or Spot.Default, not: "+a),this.Jb=a=a.J(),es(this),this.g("alignment",y,a))}},column:{get:function(){return this.Ag},set:function(a){a=Math.round(a);var y=this.Ag;y!==a&&(0>a&&Mn(a,">= 0",he,"column"),this.Ag=a,this.v(),this.g("column",y,a),this.svg!==null&&this.svg.remove())}},columnSpan:{get:function(){return this.A!==null?this.A.ob:1},set:function(a){a=Math.round(a);var y=this.columnSpan;y!==a&&(1>a&&Mn(a,">= 1",he,"columnSpan"),cr(this),this.A.ob=a,this.v(),this.g("columnSpan",y,a))}},row:{get:function(){return this.io},set:function(a){a=Math.round(a);var y=this.io;y!==a&&(0>a&&Mn(a,">= 0",he,"row"),this.io=a,this.v(),this.g("row",y,a),this.svg!==null&&this.svg.remove())}},rowSpan:{get:function(){return this.A!==null?this.A.Bi:1},set:function(a){a=Math.round(a);var y=this.rowSpan;y!==a&&(1>a&&Mn(a,">= 1",he,"rowSpan"),cr(this),this.A.Bi=a,this.v(),this.g("rowSpan",y,a))}},spanAllocation:{get:function(){return this.A!==null?this.A.Di:null},set:function(a){var y=this.spanAllocation;y!==a&&(cr(this),this.A.Di=a,this.v(),this.g("spanAllocation",y,a))}},alignmentFocus:{get:function(){return this.sk},set:function(a){var y=this.sk;y.D(a)||(this.sk=a=a.J(),this.v(),this.g("alignmentFocus",y,a))}},portId:{get:function(){return this.Yn},set:function(a){var y=this.Yn;if(y!==a){var x=this.part;x===null||x instanceof Un||Gt("Cannot set portID on a Link: "+a),y!==null&&x!==null&&Kv(x,this),this.Yn=a,a!==null&&x!==null&&(x.Te=!0,U1(x,this)),this.g("portId",y,a)}}},toSpot:{get:function(){return this.ba!==null?this.ba.yj:qi},set:function(a){var y=this.toSpot;y.D(a)||(a=a.J(),this.Xc(),this.ba.yj=a,this.g("toSpot",y,a),Wd(this))}},toEndSegmentLength:{get:function(){return this.ba!==null?this.ba.wj:10},set:function(a){var y=this.toEndSegmentLength;y!==a&&(0>a&&Mn(a,">= 0",he,"toEndSegmentLength"),this.Xc(),this.ba.wj=a,this.g("toEndSegmentLength",y,a),Wd(this))}},toShortLength:{get:function(){return this.ba!==null?this.ba.xj:0},set:function(a){var y=this.toShortLength;y!==a&&(this.Xc(),this.ba.xj=a,this.g("toShortLength",y,a),Wd(this))}},toLinkable:{get:function(){return this.ba!==null?this.ba.Tr:null},set:function(a){var y=this.toLinkable;y!==a&&(this.Xc(),this.ba.Tr=a,this.g("toLinkable",y,a))}},toMaxLinks:{get:function(){return this.ba!==null?this.ba.Ur:1/0},set:function(a){var y=this.toMaxLinks;y!==a&&(0>a&&Mn(a,">= 0",he,"toMaxLinks"),this.Xc(),this.ba.Ur=a,this.g("toMaxLinks",y,a))}},fromSpot:{get:function(){return this.ba!==null?this.ba.Xi:qi},set:function(a){var y=this.fromSpot;y.D(a)||(a=a.J(),this.Xc(),this.ba.Xi=a,this.g("fromSpot",y,a),Wd(this))}},fromEndSegmentLength:{get:function(){return this.ba!==null?this.ba.Vi:10},set:function(a){var y=this.fromEndSegmentLength;y!==a&&(0>a&&Mn(a,">= 0",he,"fromEndSegmentLength"),this.Xc(),this.ba.Vi=a,this.g("fromEndSegmentLength",y,a),Wd(this))}},fromShortLength:{get:function(){return this.ba!==null?this.ba.Wi:0},set:function(a){var y=this.fromShortLength;y!==a&&(this.Xc(),this.ba.Wi=a,this.g("fromShortLength",y,a),Wd(this))}},fromLinkable:{get:function(){return this.ba!==null?this.ba.hq:null},set:function(a){var y=this.fromLinkable;y!==a&&(this.Xc(),this.ba.hq=a,this.g("fromLinkable",y,a))}},fromMaxLinks:{get:function(){return this.ba!==null?this.ba.iq:1/0},set:function(a){var y=this.fromMaxLinks;y!==a&&(0>a&&Mn(a,">= 0",he,"fromMaxLinks"),this.Xc(),this.ba.iq=a,this.g("fromMaxLinks",y,a))}},cursor:{get:function(){return this.A!==null?this.A.j:""},set:function(a){var y=this.cursor;y!==a&&(cr(this),this.A.j=a,this.g("cursor",y,a))}},click:{get:function(){return this.A!==null?this.A.zh:null},set:function(a){var y=this.click;y!==a&&(cr(this),this.A.zh=a,this.g("click",y,a))}},doubleClick:{get:function(){return this.A!==null?this.A.Fh:null},set:function(a){var y=this.doubleClick;y!==a&&(cr(this),this.A.Fh=a,this.g("doubleClick",y,a))}},contextClick:{get:function(){return this.A!==null?this.A.Bh:null},set:function(a){var y=this.contextClick;y!==a&&(cr(this),this.A.Bh=a,this.g("contextClick",y,a))}},mouseEnter:{get:function(){return this.A!==null?this.A.Mh:null},set:function(a){var y=this.mouseEnter;y!==a&&(cr(this),this.A.Mh=a,this.g("mouseEnter",y,a))}},mouseLeave:{get:function(){return this.A!==null?this.A.Ph:null},set:function(a){var y=this.mouseLeave;y!==a&&(cr(this),this.A.Ph=a,this.g("mouseLeave",y,a))}},mouseOver:{get:function(){return this.A!==null?this.A.Qh:null},set:function(a){var y=this.mouseOver;y!==a&&(cr(this),this.A.Qh=a,this.g("mouseOver",y,a))}},mouseHover:{get:function(){return this.A!==null?this.A.Oh:null},set:function(a){var y=this.mouseHover;y!==a&&(cr(this),this.A.Oh=a,this.g("mouseHover",y,a))}},mouseHold:{get:function(){return this.A!==null?this.A.Nh:null},set:function(a){var y=this.mouseHold;y!==a&&(cr(this),this.A.Nh=a,this.g("mouseHold",y,a))}},mouseDragEnter:{get:function(){return this.A!==null?this.A.Of:null},set:function(a){var y=this.mouseDragEnter;y!==a&&(cr(this),this.A.Of=a,this.g("mouseDragEnter",y,a))}},mouseDragLeave:{get:function(){return this.A!==null?this.A.Xd:null},set:function(a){var y=this.mouseDragLeave;y!==a&&(cr(this),this.A.Xd=a,this.g("mouseDragLeave",y,a))}},mouseDrop:{get:function(){return this.A!==null?this.A.Lh:null},set:function(a){var y=this.mouseDrop;y!==a&&(cr(this),this.A.Lh=a,this.g("mouseDrop",y,a))}},actionDown:{get:function(){return this.A!==null?this.A.V:null},set:function(a){var y=this.actionDown;y!==a&&(cr(this),this.A.V=a,this.g("actionDown",y,a))}},actionMove:{get:function(){return this.A!==null?this.A.ia:null},set:function(a){var y=this.actionMove;y!==a&&(cr(this),this.A.ia=a,this.g("actionMove",y,a))}},actionUp:{get:function(){return this.A!==null?this.A.Ha:null},set:function(a){var y=this.actionUp;y!==a&&(cr(this),this.A.Ha=a,this.g("actionUp",y,a))}},actionCancel:{get:function(){return this.A!==null?this.A.F:null},set:function(a){var y=this.actionCancel;y!==a&&(cr(this),this.A.F=a,this.g("actionCancel",y,a))}},toolTip:{get:function(){return this.A!==null?this.A.$h:null},set:function(a){var y=this.toolTip;y!==a&&(cr(this),this.A.$h=a,this.g("toolTip",y,a))}},contextMenu:{get:function(){return this.A!==null?this.A.Ch:null},set:function(a){var y=this.contextMenu;y!==a&&(cr(this),this.A.Ch=a,this.g("contextMenu",y,a))}}}),he.prototype.trigger=he.prototype.Jv,he.prototype.findBindingPanel=he.prototype.ih,he.prototype.findTemplateBinder=he.prototype.pz,he.prototype.setProperties=he.prototype.nm,he.prototype.apply=he.prototype.apply,he.prototype.attach=he.prototype.Du,he.prototype.set=he.prototype.set,he.prototype.isEnabledObject=he.prototype.If,he.prototype.isVisibleObject=he.prototype.Ed,he.prototype.isContainedBy=he.prototype.rg,he.prototype.getNearestIntersectionPoint=he.prototype.rs,he.prototype.getLocalPoint=he.prototype.qs,he.prototype.getDocumentScale=he.prototype.Df,he.prototype.getDocumentAngle=he.prototype.li,he.prototype.getDocumentBounds=he.prototype.mi,he.prototype.getDocumentPoint=he.prototype.ga,he.prototype.intersectsRect=he.prototype.Yc,he.prototype.containedInRect=he.prototype.fh,he.prototype.containsRect=he.prototype.Re,he.prototype.containsPoint=he.prototype.ca,he.prototype.raiseChanged=he.prototype.g,he.prototype.raiseChangedEvent=he.prototype.cb,he.prototype.addCopyProperty=he.prototype.Vw;var wf=null;he.className="GraphObject",wf=new Me,Sh("Button",function(){function a(x,E){return x.diagram.ic(x.documentPoint,function(b){for(;b.panel!==null&&!b.isActionable;)b=b.panel;return b},function(b){return b===E})!==null}var y=rl(mn,mn.Auto,{isActionable:!0,enabledChanged:function(x,E){if(x instanceof mn){var b=x.fb("ButtonBorder");b!==null&&(b.fill=E?x._buttonFillNormal:x._buttonFillDisabled)}},cursor:"pointer",_buttonFillNormal:"#F5F5F5",_buttonStrokeNormal:"#BDBDBD",_buttonFillOver:"#E0E0E0",_buttonStrokeOver:"#9E9E9E",_buttonFillPressed:"#BDBDBD",_buttonStrokePressed:"#9E9E9E",_buttonFillDisabled:"#E5E5E5"},rl(lr,{name:"ButtonBorder",figure:"RoundedRectangle",spot1:new li(0,0,2.76142374915397,2.761423749153969),spot2:new li(1,1,-2.76142374915397,-2.761423749153969),parameter1:2,parameter2:2,fill:"#F5F5F5",stroke:"#BDBDBD"}));return y.mouseEnter=function(x,E){if(E.If()&&E instanceof mn&&(x=E.fb("ButtonBorder"),x instanceof lr)){var b=E._buttonFillOver;E._buttonFillNormal=x.fill,x.fill=b,b=E._buttonStrokeOver,E._buttonStrokeNormal=x.stroke,x.stroke=b}},y.mouseLeave=function(x,E){E.If()&&E instanceof mn&&(x=E.fb("ButtonBorder"),x instanceof lr&&(x.fill=E._buttonFillNormal,x.stroke=E._buttonStrokeNormal))},y.actionDown=function(x,E){if(E.If()&&E instanceof mn&&E._buttonFillPressed!==null&&x.button===0){var b=E.fb("ButtonBorder");if(b instanceof lr){x=x.diagram;var z=x.skipsUndoManager;x.skipsUndoManager=!0;var tt=E._buttonFillPressed;E._buttonFillOver=b.fill,b.fill=tt,tt=E._buttonStrokePressed,E._buttonStrokeOver=b.stroke,b.stroke=tt,x.skipsUndoManager=z}}},y.actionUp=function(x,E){if(E.If()&&E instanceof mn&&E._buttonFillPressed!==null&&x.button===0){var b=E.fb("ButtonBorder");if(b instanceof lr){var z=x.diagram,tt=z.skipsUndoManager;z.skipsUndoManager=!0,a(x,E)?(b.fill=E._buttonFillOver,b.stroke=E._buttonStrokeOver):(b.fill=E._buttonFillNormal,b.stroke=E._buttonStrokeNormal),z.skipsUndoManager=tt}}},y.actionCancel=function(x,E){if(E.If()&&E instanceof mn&&E._buttonFillPressed!==null){var b=E.fb("ButtonBorder");if(b instanceof lr){var z=x.diagram,tt=z.skipsUndoManager;z.skipsUndoManager=!0,a(x,E)?(b.fill=E._buttonFillOver,b.stroke=E._buttonStrokeOver):(b.fill=E._buttonFillNormal,b.stroke=E._buttonStrokeNormal),z.skipsUndoManager=tt}}},y.actionMove=function(x,E){if(E.If()&&E instanceof mn&&E._buttonFillPressed!==null){var b=x.diagram;if(b.firstInput.button===0&&(b.currentTool.standardMouseOver(),a(x,E)&&(x=E.fb("ButtonBorder"),x instanceof lr))){var z=b.skipsUndoManager;b.skipsUndoManager=!0;var tt=E._buttonFillPressed;x.fill!==tt&&(x.fill=tt),tt=E._buttonStrokePressed,x.stroke!==tt&&(x.stroke=tt),b.skipsUndoManager=z}}},y}),Sh("TreeExpanderButton",function(){var a=rl("Button",{_treeExpandedFigure:"MinusLine",_treeCollapsedFigure:"PlusLine"},rl(lr,{name:"ButtonIcon",figure:"MinusLine",stroke:"#424242",strokeWidth:2,desiredSize:Oi},new Ko("figure","isTreeExpanded",function(y,x){return x=x.panel,y?x._treeExpandedFigure:x._treeCollapsedFigure}).cp()),{visible:!1},new Ko("visible","isTreeLeaf",function(y){return!y}).cp());return a.click=function(y,x){if(x=x.part,x instanceof Rr&&(x=x.adornedPart),x instanceof Un){var E=x.diagram;if(E!==null){if(E=E.commandHandler,x.isTreeExpanded){if(!E.canCollapseTree(x))return}else if(!E.canExpandTree(x))return;y.handled=!0,x.isTreeExpanded?E.collapseTree(x):E.expandTree(x)}}},a}),Sh("SubGraphExpanderButton",function(){var a=rl("Button",{_subGraphExpandedFigure:"MinusLine",_subGraphCollapsedFigure:"PlusLine"},rl(lr,{name:"ButtonIcon",figure:"MinusLine",stroke:"#424242",strokeWidth:2,desiredSize:Oi},new Ko("figure","isSubGraphExpanded",function(y,x){return x=x.panel,y?x._subGraphExpandedFigure:x._subGraphCollapsedFigure}).cp()));return a.click=function(y,x){if(x=x.part,x instanceof Rr&&(x=x.adornedPart),x instanceof $i){var E=x.diagram;if(E!==null){if(E=E.commandHandler,x.isSubGraphExpanded){if(!E.canCollapseSubGraph(x))return}else if(!E.canExpandSubGraph(x))return;y.handled=!0,x.isSubGraphExpanded?E.collapseSubGraph(x):E.expandSubGraph(x)}}},a}),Sh("ToolTip",function(){return rl(Rr,mn.Auto,{isShadowed:!0,shadowColor:"rgba(0, 0, 0, .4)",shadowOffset:new At(0,3),shadowBlur:5},rl(lr,{name:"Border",figure:"RoundedRectangle",parameter1:1,parameter2:1,fill:"#F5F5F5",stroke:"#F0F0F0",spot1:new li(0,0,4,6),spot2:new li(1,1,-4,-4)}))}),Sh("ContextMenu",function(){return rl(Rr,mn.Vertical,{background:"#F5F5F5",isShadowed:!0,shadowColor:"rgba(0, 0, 0, .4)",shadowOffset:new At(0,3),shadowBlur:5},new Ko("background","",function(a){return a.adornedPart!==null&&a.placeholder!==null?null:"#F5F5F5"}))}),Sh("ContextMenuButton",function(){var a=rl("Button");a.stretch=wi;var y=a.fb("ButtonBorder");return y instanceof lr&&(y.figure="Rectangle",y.strokeWidth=0,y.spot1=new li(0,0,2,3),y.spot2=new li(1,1,-2,-2)),a}),Sh("PanelExpanderButton",function(a){var y=sm(a,"COLLAPSIBLE"),x=rl("Button",{_buttonExpandedFigure:"M0 0 M0 6 L4 2 8 6 M8 8",_buttonCollapsedFigure:"M0 0 M0 2 L4 6 8 2 M8 8",_buttonFillNormal:"rgba(0, 0, 0, 0)",_buttonStrokeNormal:null,_buttonFillOver:"rgba(0, 0, 0, .2)",_buttonStrokeOver:null,_buttonFillPressed:"rgba(0, 0, 0, .4)",_buttonStrokePressed:null},rl(lr,{name:"ButtonIcon",strokeWidth:2},new Ko("geometryString","visible",function(E){return E?x._buttonExpandedFigure:x._buttonCollapsedFigure}).cp(y)));return a=x.fb("ButtonBorder"),a instanceof lr&&(a.stroke=null,a.fill="rgba(0, 0, 0, 0)"),x.click=function(E,b){var z=b.diagram;if(z!==null&&!z.isReadOnly){var tt=b.ih();tt===null&&(tt=b.part),tt!==null&&(b=tt.fb(y),b!==null&&(E.handled=!0,z.Ea("Collapse/Expand Panel"),b.visible=!b.visible,z.eb("Collapse/Expand Panel")))}},x}),Sh("CheckBoxButton",function(a){var y=sm(a);return a=rl("Button",{desiredSize:new Ke(14,14)},rl(lr,{name:"ButtonIcon",geometryString:"M0 0 M0 8.85 L4.9 13.75 16.2 2.45 M16.2 16.2",strokeWidth:2,stretch:cn,geometryStretch:fi,visible:!1},y!==""?new Ko("visible",y).Kx():[])),a.click=function(x,E){if(E instanceof mn){var b=x.diagram;if(!(b===null||b.isReadOnly||y!==""&&b.model.isReadOnly)){x.handled=!0;var z=E.fb("ButtonIcon");b.Ea("checkbox"),z.visible=!z.visible,typeof E._doClick=="function"&&E._doClick(x,E),b.eb("checkbox")}}},a}),Sh("CheckBox",function(a){a=sm(a),a=rl("CheckBoxButton",a,{name:"Button",isActionable:!1,margin:new Ji(0,1,0,0)});var y=rl(mn,"Horizontal",a,{isActionable:!0,cursor:a.cursor,margin:new Ji(1),_buttonFillNormal:a._buttonFillNormal,_buttonStrokeNormal:a._buttonStrokeNormal,_buttonFillOver:a._buttonFillOver,_buttonStrokeOver:a._buttonStrokeOver,_buttonFillPressed:a._buttonFillPressed,_buttonStrokePressed:a._buttonStrokePressed,_buttonFillDisabled:a._buttonFillDisabled,mouseEnter:a.mouseEnter,mouseLeave:a.mouseLeave,actionDown:a.actionDown,actionUp:a.actionUp,actionCancel:a.actionCancel,actionMove:a.actionMove,click:a.click,_buttonClick:a.click});return a.mouseEnter=null,a.mouseLeave=null,a.actionDown=null,a.actionUp=null,a.actionCancel=null,a.actionMove=null,a.click=null,y}),he.None=nn=new Ue(he,"None",0),he.Default=tr=new Ue(he,"Default",0),he.Vertical=Ti=new Ue(he,"Vertical",4),he.Horizontal=wi=new Ue(he,"Horizontal",5),he.Fill=cn=new Ue(he,"Fill",3),he.Uniform=fi=new Ue(he,"Uniform",1),he.UniformToFill=Er=new Ue(he,"UniformToFill",2),he.FlipVertical=gr=new Ue(he,"FlipVertical",1),he.FlipHorizontal=Dr=new Ue(he,"FlipHorizontal",2),he.FlipBoth=Xr=new Ue(he,"FlipBoth",3),he.make=rl,he.getBuilders=function(){var a=new Me,y;for(y in wf)if(y!==y.toLowerCase()){var x=wf.I(y);typeof x=="function"&&a.add(y,x)}return a.freeze(),a},he.defineBuilder=Sh,he.build=function(a,y,x){for(var E=[],b=2;b<arguments.length;++b)E[b-2]=arguments[b];if(b=wf.I(a),typeof b=="function"&&(E=b([a].concat(E)),E instanceof he))return y&&E.set(y),E;Gt('GraphObject.build invoked object builder "'+a+'", but it did not return an Object')},he.takeBuilderArgument=sm;function Ac(){this.nc=!1,this.xa="",this.zp=-1,this.nb=this.wm=this.te=null,this.j="",this.hb=this.Di=this.Hb=this.Ch=this.$h=this.F=this.Ha=this.ia=this.V=this.Lh=this.Xd=this.Of=this.Nh=this.Oh=this.Qh=this.Ph=this.Mh=this.Bh=this.Fh=this.zh=null,this.u=qn,this.o=sr,this.hg=tr,this.ob=this.Bi=1,this.Pf=nn,this.Pc=this.Ci=this.gd=null,this.Oc="category"}Ac.prototype.copy=function(){var a=new Ac;return a.xa=this.xa,a.zp=this.zp,a.te=this.te,a.nb=this.nb,a.j=this.j,a.zh=this.zh,a.Fh=this.Fh,a.Bh=this.Bh,a.Mh=this.Mh,a.Ph=this.Ph,a.Qh=this.Qh,a.Oh=this.Oh,a.Nh=this.Nh,a.Of=this.Of,a.Xd=this.Xd,a.Lh=this.Lh,a.V=this.V,a.ia=this.ia,a.Ha=this.Ha,a.F=this.F,a.$h=this.$h,a.Ch=this.Ch,a.Hb=this.Hb,a.Di=this.Di,a.hb=this.hb,a.u=this.u.J(),a.o=this.o.J(),a.hg=this.hg,a.Bi=this.Bi,a.ob=this.ob,a.Pf=this.Pf,a.gd=this.gd,a.Ci=this.Ci,a.Pc=this.Pc,a.Oc=this.Oc,a};function id(){this.u=-1/0,this.o=0,this.F=Nn,this.rr=os,this.j=this.V="None"}id.prototype.copy=function(){var a=new id;return a.u=this.u,a.o=this.o,a.F=this.F.J(),a.rr=this.rr,a.V=this.V,a.j=this.j,a},id.className="LinkElementSettings";function Gg(){this.yj=this.Xi=Bo,this.xj=this.Wi=this.wj=this.Vi=NaN,this.Tr=this.hq=null,this.Ur=this.iq=1/0}Gg.prototype.copy=function(){var a=new Gg;return a.Xi=this.Xi.J(),a.yj=this.yj.J(),a.Vi=this.Vi,a.wj=this.wj,a.Wi=this.Wi,a.xj=this.xj,a.hq=this.hq,a.Tr=this.Tr,a.iq=this.iq,a.Ur=this.Ur,a},Gg.className="LinkSettings";function Vd(){this.ha=[1,0,0,1,0,0]}Vd.prototype.copy=function(){var a=new Vd;return a.ha[0]=this.ha[0],a.ha[1]=this.ha[1],a.ha[2]=this.ha[2],a.ha[3]=this.ha[3],a.ha[4]=this.ha[4],a.ha[5]=this.ha[5],a},Vd.prototype.translate=function(a,y){this.ha[4]+=this.ha[0]*a+this.ha[2]*y,this.ha[5]+=this.ha[1]*a+this.ha[3]*y},Vd.prototype.scale=function(a,y){this.ha[0]*=a,this.ha[1]*=a,this.ha[2]*=y,this.ha[3]*=y},Vd.prototype.rotate=function(a,y,x){if(360<=a?a-=360:0>a&&(a+=360),a!==0){if(this.translate(y,x),a===90){a=0;var E=1}else a===180?(a=-1,E=0):a===270?(a=0,E=-1):(E=a*Math.PI/180,a=Math.cos(E),E=Math.sin(E));var b=this.ha[1]*a+this.ha[3]*E,z=this.ha[0]*-E+this.ha[2]*a,tt=this.ha[1]*-E+this.ha[3]*a;this.ha[0]=this.ha[0]*a+this.ha[2]*E,this.ha[1]=b,this.ha[2]=z,this.ha[3]=tt,this.translate(-y,-x)}},Vd.className="STransform";function Nc(a){this.type=a,this.r2=this.y2=this.x2=this.r1=this.y1=this.x1=0,this.gx=[],this.pattern=null}Nc.prototype.addColorStop=function(a,y){this.gx.push({offset:a,color:y})},Nc.className="SGradient";function gu(a,y,x){this.ownerDocument=a=y===void 0?ln.document:y,this.cA="http://www.w3.org/2000/svg",a!==void 0&&(this.Oa=this.Ud("svg",{width:"1px",height:"1px",viewBox:"0 0 1 1"}),this.style.display="block",this.style.letterSpacing="normal",this.style.wordSpacing="normal",this.Oa.setAttributeNS("http://www.w3.org/2000/xmlns/","xmlns","http://www.w3.org/2000/svg"),this.Oa.setAttributeNS("http://www.w3.org/2000/xmlns/","xmlns:xlink","http://www.w3.org/1999/xlink")),this.hs=null,this.context=new Ts(this,x)}gu.prototype.resize=function(a,y,x,E){return this.width!==a||this.height!==y?(this.width=a,this.height=y,this.style.width=x+"px",this.style.height=E+"px",this.Oa.setAttributeNS(null,"width",x+"px"),this.Oa.setAttributeNS(null,"height",E+"px"),this.Oa.setAttributeNS(null,"viewBox","0 0 "+x+" "+E),this.context.ww.firstElementChild.setAttributeNS(null,"width",x+"px"),this.context.ww.firstElementChild.setAttributeNS(null,"height",E+"px"),!0):!1},gu.prototype.Ud=function(a,y,x){if(a=this.ownerDocument.createElementNS(this.cA,a),De(y))for(var E in y)a.setAttributeNS(E==="href"?"http://www.w3.org/1999/xlink":"",E,y[E]);return x!==void 0&&(a.textContent=x),a},gu.prototype.getBoundingClientRect=function(){return this.Oa.getBoundingClientRect()},gu.prototype.focus=function(){this.Oa.focus()},gu.prototype.mx=function(){this.ownerDocument=null},ge.Object.defineProperties(gu.prototype,{width:{get:function(){return this.Oa.width.baseVal.value},set:function(a){this.Oa.setAttribute("width",a+"px")}},height:{get:function(){return this.Oa.height.baseVal.value},set:function(a){this.Oa.setAttribute("height",a+"px")}},style:{get:function(){return this.Oa.style}}}),gu.className="SVGSurface";function Ts(a,y){this.Gv=a,this.svg=a.Oa,this.stack=[],this.nh=[],this.fillStyle="#000000",this.font="10px sans-serif",this.globalAlpha=1,this.lineCap="butt",this.lineDashOffset=0,this.lineJoin="miter",this.lineWidth=1,this.miterLimit=10,this.shadowBlur=0,this.shadowColor="rgba(0, 0, 0, 0)",this.shadowOffsetY=this.shadowOffsetX=0,this.Il=!1,this.strokeStyle="#000000",this.textAlign="start",this.clipInsteadOfFill=!1,this.Vg=this.Br=this.Ar=0,this.yd=this.ad=null,this.path=[],this.Yl={},this.Ct=!1,this.Yg=null,this.uj=0,this.rb=new Vd,this.j=lm(this),this.Nj=lm(this,"gojs-diagram"),this.Hl=this.ti=null;var x=Br++,E=this.Ud("clipPath",{id:"mainClip"+x});E.appendChild(this.Ud("rect",{x:0,y:0,width:a.width,height:a.height})),this.ww=E,this.svg.appendChild(this.j),this.j.appendChild(this.Nj),this.svg.appendChild(E),this.j.setAttributeNS(null,"clip-path","url(#mainClip"+x+")"),this.eA={},this.isTemporary=!!y,this.filter="",this.bk=null}function Xy(a,y,x,E,b,z,tt){a.Nj===void 0?Hg(a,y,x,E,b,z,tt):a.Nj.setAttribute("transform","matrix("+y+", "+x+", "+E+", "+b+", "+z+", "+tt+")")}Pt=Ts.prototype,Pt.arc=function(a,y,x,E,b,z,tt,rt){var ot=2*Math.PI,st=ot-1e-6,ut=x*Math.cos(E),ft=x*Math.sin(E),mt=a+ut,yt=y+ft,wt=z?0:1;E=z?E-b:b-E,(1e-6<Math.abs(tt-mt)||1e-6<Math.abs(rt-yt))&&this.path.push(["L",mt,+yt]),0>E&&(E=E%ot+ot),E>st?(this.path.push(["A",x,x,0,1,wt,a-ut,y-ft]),this.path.push(["A",x,x,0,1,wt,mt,yt])):1e-6<E&&this.path.push(["A",x,x,0,+(E>=Math.PI),wt,a+x*Math.cos(b),y+x*Math.sin(b)])},Pt.beginPath=function(){this.path=[],this.Yl={stroke:"none",fill:"none"}},Pt.Se=function(a){this.addPath(this.path,this.rb,a||0)},Pt.bezierCurveTo=function(a,y,x,E,b,z){this.path.push(["C",a,y,x,E,b,z])},Pt.clearRect=function(){},Pt.clip=function(){this.Yl.clipPath=!0},Pt.closePath=function(){this.path.push(["z"])},Pt.createLinearGradient=function(a,y,x,E){var b=new Nc("linear");return b.x1=a,b.y1=y,b.x2=x,b.y2=E,b},Pt.createPattern=function(a){var y="";a instanceof HTMLCanvasElement&&(y=a.toDataURL()),a instanceof HTMLImageElement&&(y=a.getAttribute("src"));var x=this.eA;if(x[y])return"url(#"+x[y]+")";var E="PATTERN"+Br++,b={x:0,y:0,width:a.width,height:a.height,href:y};return a=this.Ud("pattern",{width:a.width,height:a.height,id:E,patternUnits:"userSpaceOnUse"}),a.appendChild(this.Ud(Kd,b)),this.svg.appendChild(a),x[y]=E,"url(#"+E+")"},Pt.createRadialGradient=function(a,y,x,E,b,z){var tt=new Nc("radial");return tt.x1=a,tt.y1=y,tt.r1=x,tt.x2=E,tt.y2=b,tt.r2=z,tt};function Jy(a,y,x,E,b,z,tt,rt,ot){E=rt/E,b=ot/b,z===0&&tt===0||a.rb.translate(z,tt),E===1&&b===1||a.rb.scale(E,b),y===0&&x===0||a.rb.translate(-y,-x)}Pt.drawImage=function(a,y,x,E,b,z,tt,rt,ot){var st="";a instanceof HTMLCanvasElement&&(st=a.toDataURL()),a instanceof HTMLImageElement&&(st=a.getAttribute("src"));var ut=a instanceof HTMLImageElement?a.naturalWidth:a.width;a=a instanceof HTMLImageElement?a.naturalHeight:a.height,E===void 0&&(z=y,tt=x,rt=E=ut,ot=b=a),E=E||0,b=b||0,rt=rt||0,ot=ot||0,Jy(this,y,x,E,b,z||0,tt||0,rt,ot),z={x:0,y:0,width:ut||E,height:a||b,href:st},ue.$(E,rt)&&ue.$(b,ot)?st.toLowerCase().indexOf(".svg")===-1&&st.toLowerCase().indexOf("data:image/svg")===-1&&(z.preserveAspectRatio="xMidYMid slice"):z.preserveAspectRatio="none",(y!==0||x!==0||E!==ut||b!==a)&&(E+=y,b+=x,z["clip-path"]="path('M "+y+","+x+" L "+E+" "+x+" L "+E+" "+b+" L "+y+" "+b+" z')"),Pf(this,Kd,z,this.rb),this.addElement(Kd,z)},Pt.fill=function(a){a&&(this.Yl["fill-rule"]="evenodd"),iv(this,this.Yl)},Pt.ng=function(a,y){this.clipInsteadOfFill?this.clip():this.fill(y)},Pt.fillRect=function(a,y,x,E){a=[a,y,x,E],a={x:a[0],y:a[1],width:a[2],height:a[3]},Pf(this,"fill",a,this.rb),this.addElement("rect",a)},Pt.ox=function(a,y,x,E){a={x:a,y,width:x,height:E},Pf(this,"fill",a,this.rb),iv(this,a),this.svg.prepend(this.Ud("rect",a))},Pt.fillText=function(a,y,x){a=[a,y,x],y=this.textAlign,y==="left"?y="start":y==="right"?y="end":y==="center"&&(y="middle"),y={x:a[1],y:a[2],style:"font: "+this.font,"text-anchor":y},Pf(this,"fill",y,this.rb),this.addElement("text",y,a[0])},Pt.lineTo=function(a,y){this.path.push(["L",a,y])},Pt.moveTo=function(a,y){this.path.push(["M",a,y])},Pt.quadraticCurveTo=function(a,y,x,E){this.path.push(["Q",a,y,x,E])},Pt.rect=function(a,y,x,E){this.path.push(["M",a,y],["L",a+x,y],["L",a+x,y+E],["L",a,y+E],["z"])},Pt.restore=function(){this.rb=this.stack.pop(),this.path=this.stack.pop();var a=this.stack.pop();this.fillStyle=a.fillStyle,this.font=a.font,this.globalAlpha=a.globalAlpha,this.lineCap=a.lineCap,this.lineDashOffset=a.lineDashOffset,this.lineJoin=a.lineJoin,this.lineWidth=a.lineWidth,this.miterLimit=a.miterLimit,this.shadowBlur=a.shadowBlur,this.shadowColor=a.shadowColor,this.shadowOffsetX=a.shadowOffsetX,this.shadowOffsetY=a.shadowOffsetY,this.strokeStyle=a.strokeStyle,this.textAlign=a.textAlign,this.bk=a.bk},Pt.save=function(){this.stack.push({fillStyle:this.fillStyle,font:this.font,globalAlpha:this.globalAlpha,lineCap:this.lineCap,lineDashOffset:this.lineDashOffset,lineJoin:this.lineJoin,lineWidth:this.lineWidth,miterLimit:this.miterLimit,shadowBlur:this.shadowBlur,shadowColor:this.shadowColor,shadowOffsetX:this.shadowOffsetX,shadowOffsetY:this.shadowOffsetY,strokeStyle:this.strokeStyle,textAlign:this.textAlign,bk:this.bk});for(var a=[],y=0;y<this.path.length;y++)a.push(this.path[y]);this.stack.push(a),this.stack.push(this.rb.copy())},Pt.setTransform=function(a,y,x,E,b,z){a===1&&y===0&&x===0&&E===1&&b===0&&z===0||Hg(this,a,y,x,E,b,z)};function _y(a){return a=a.rb.ha,"matrix("+a[0]+", "+a[1]+", "+a[2]+", "+a[3]+", "+a[4]+", "+a[5]+")"}Pt.scale=function(a,y){this.rb.scale(a,y)},Pt.translate=function(a,y){this.rb.translate(a,y)},Pt.transform=function(){},Pt.yc=function(){},Pt.stroke=function(){qy(this,this.Yl)},Pt.jk=function(){this.clipInsteadOfFill||this.stroke()},Pt.Ud=function(a,y,x){return this.Gv.Ud(a,y,x)},Pt.addElement=function(a,y,x){return a=this.Ud(a,y,x),this.yd!==null?this.yd.appendChild(a):this.yd=a,this.ad=a};function Pf(a,y,x,E){y==="fill"?iv(a,x):y==="stroke"&&qy(a,x),E!==null&&(a=E.ha,x.transform="matrix("+a[0]+", "+a[1]+", "+a[2]+", "+a[3]+", "+a[4]+", "+a[5]+")")}function iv(a,y){a.fillStyle instanceof Nc?y.fill=rv(a,a.fillStyle,!0):/^rgba\(/.test(a.fillStyle)?(a=/^\s*rgba\s*\(([^,\s]+)\s*,\s*([^,\s]+)\s*,\s*([^,\s]+)\s*,\s*([^,\s]+)\)\s*$/i.exec(a.fillStyle),y.fill="rgb("+a[1]+","+a[2]+","+a[3]+")",y["fill-opacity"]=a[4]):y.fill=a.fillStyle}function Qy(a,y,x){x=x?"fill":"stroke",a.fillStyle instanceof Nc?y.setAttributeNS(null,"fill",rv(a,a.fillStyle,!0)):/^rgba\(/.test(a.fillStyle)?(a=/^\s*rgba\s*\(([^,\s]+)\s*,\s*([^,\s]+)\s*,\s*([^,\s]+)\s*,\s*([^,\s]+)\)\s*$/i.exec(a.fillStyle),y.setAttributeNS(null,x,"rgb("+a[1]+","+a[2]+","+a[3]+")"),y.setAttributeNS(null,x+"-opacity",a[4])):y.setAttributeNS(null,x,a.fillStyle)}function qy(a,y){if(a.strokeStyle instanceof Nc)y.stroke=rv(a,a.strokeStyle,!1);else if(/^rgba\(/.test(a.strokeStyle)){var x=/^\s*rgba\s*\(([^,\s]+)\s*,\s*([^,\s]+)\s*,\s*([^,\s]+)\s*,\s*([^,\s]+)\)\s*$/i.exec(a.strokeStyle);y.stroke="rgb("+x[1]+","+x[2]+","+x[3]+")",y["stroke-opacity"]=x[4]}else y.stroke=a.strokeStyle;y["stroke-width"]=a.lineWidth,y["stroke-linecap"]=a.lineCap,y["stroke-linejoin"]=a.lineJoin,y["stroke-miterlimit"]=a.miterLimit,a.Ct&&(y["stroke-dasharray"]=a.Yg.toString(),y["stroke-dashoffset"]=a.uj)}function rv(a,y,x){var E="";if(E=a.Hl!==null?a.Hl.getAttribute(x?"fill":"stroke"):null,E!==null&&E.indexOf("GRAD")!==-1?(E=E.split("#")[1].slice(0,-1),x=a.svg.getElementById(E),x!==null&&x.remove()):E="GRAD"+Br++,y.type==="linear")x=a.Ud("linearGradient",{x1:y.x1,x2:y.x2,y1:y.y1,y2:y.y2,id:E,gradientUnits:"userSpaceOnUse"});else if(y.type==="radial")x=a.Ud("radialGradient",{x1:y.x1,x2:y.x2,y1:y.y1,y2:y.y2,r1:y.r1,r2:y.r2,id:E});else throw Error("invalid gradient");var b=y.gx;y=b.length;for(var z=[],tt=0;tt<y;tt++){var rt=b[tt],ot=rt.color;rt={offset:rt.offset,"stop-color":ot},/^rgba\(/.test(ot)&&(ot=/^\s*rgba\s*\(([^,\s]+)\s*,\s*([^,\s]+)\s*,\s*([^,\s]+)\s*,\s*([^,\s]+)\)\s*$/i.exec(ot),rt["stop-color"]="rgb("+ot[1]+","+ot[2]+","+ot[3]+")",rt["stop-opacity"]=ot[4]),z.push(rt)}for(z.sort(function(st,ut){return st.offset>ut.offset?1:-1}),b=0;b<y;b++)x.appendChild(a.Ud("stop",z[b]));return a.svg.appendChild(x),"url(#"+E+")"}Pt.addPath=function(a,y,x){for(var E=[],b=0;b<a.length;b++){var z=Sn(a[b]),tt=[z.shift()];if(tt[0]==="A")tt.push(z.shift()+","+z.shift(),z.shift(),z.shift()+","+z.shift(),z.shift()+","+z.shift());else for(;z.length;)tt.push(z.shift()+","+z.shift());E.push(tt.join(" "))}if(E=E.join(" "),a=this.Yl,a.clipPath)0<this.nh.length&&this.nh[this.nh.length-1].setAttributeNS(null,"clip-path",'path("'+E+'")');else if(a.d=E,Pf(this,"",a,y),this.Hl!==null)if(y=this.Hl,y.nodeName!=="g")for(var rt in a)rt!=="transform"&&y.setAttributeNS(null,rt,a[rt]);else{rt=y.getElementsByTagName("path");for(var ot in a)ot!=="transform"&&rt[x].setAttributeNS(null,ot,a[ot])}else this.addElement("path",a)};function Hg(a,y,x,E,b,z,tt){var rt=new Vd;rt.ha=[y,x,E,b,z,tt],y={},Pf(a,"g",y,rt),rt=a.addElement("g",y),a.nh.push(rt)}function lm(a,y){var x={};return y&&(x.class=y),y=a.addElement("g",x),a.nh.push(y),y}Pt.Ev=function(a,y,x){this.Ar=a,this.Br=y,this.Vg=x};function Mu(a){a.Il=!1,a.shadowOffsetX=0,a.shadowOffsetY=0,a.shadowBlur=0}function Yu(a){a.Il=!0,a.shadowOffsetX=a.Ar,a.shadowOffsetY=a.Br,a.shadowBlur=a.Vg}Pt.js=function(a,y){this.Ct=!0,this.Yg=a,this.uj=y},Pt.fs=function(){this.Ct=!1},Pt.Vc=function(){},Pt.Wx=function(){},Ts.prototype.rotate=function(a){this.rb.rotate(57.2958*a,0,0)},Ts.prototype.getImageData=function(){return null},Ts.prototype.measureText=function(){return null};function um(a,y){y=y.getAttribute("fill"),y!==null&&(y=y.split("#"),y.length!==1&&(y=a.svg.getElementById(y[1].slice(0,-1)),y!==null&&a.svg.innerHTML.match(new RegExp(y.id,"g")).length===1&&y.remove()))}Ts.prototype.Hs=function(a){a.svg!==null&&a.svg.parentNode===this.Nj&&a.svg.remove()},Ts.className="SVGContext",Le.prototype.Cs=function(a){this.pj.contains("SVG")||this.bs("SVG",new gu(this,ln.document));var y=new gu(this,ln.document,!0);a===void 0&&(a=new pi);var x=this;return Ec(this,function(E,b){return E=im(x,E,"SVG",y),E=E!==null?E.svg:null,typeof b=="function"?(b(E),null):E},a)},Le.prototype.makeSvg=Le.prototype.Cs,Le.prototype.av=function(a){return this.Cs(a)},Le.prototype.makeSVG=Le.prototype.av;function yl(a,y,x,E){this.ownerDocument=y=y===void 0?ln.document:y,this.hs=null,y=y.createElement("canvas"),y.tabIndex=0,this.Oa=y,this.context=new Ud(y,x,E),y.H=a}yl.prototype.resize=function(a,y,x,E){return this.width!==a||this.height!==y?(this.width=a,this.height=y,this.style.width=x+"px",this.style.height=E+"px",!0):!1},yl.prototype.toDataURL=function(a,y){return this.Oa.toDataURL(a,y)},yl.prototype.getBoundingClientRect=function(){return this.Oa.getBoundingClientRect()},yl.prototype.focus=function(){this.Oa.focus()},yl.prototype.mx=function(){this.ownerDocument=this.Oa.H=null},ge.Object.defineProperties(yl.prototype,{width:{get:function(){return this.Oa.width},set:function(a){this.Oa.width=a}},height:{get:function(){return this.Oa.height},set:function(a){this.Oa.height=a}},style:{get:function(){return this.Oa.style}}}),yl.className="CanvasSurface";function Ud(a,y,x){this.Z=a.getContext?a.getContext("2d",y):null,this.Z===null&&Gt("Browser does not support HTML Canvas Element"),this.ct=this.et=this.dt="",this.Hm=!1,this.Vg=this.Br=this.Ar=0,this.Il=!1,this.El=new Ii,this.isTemporary=!!x}Pt=Ud.prototype,Pt.Wx=function(a){this.Z.imageSmoothingEnabled=a},Pt.arc=function(a,y,x,E,b,z){this.Z.arc(a,y,x,E,b,z)},Pt.beginPath=function(){this.Z.beginPath()},Pt.Se=function(){},Pt.bezierCurveTo=function(a,y,x,E,b,z){this.Z.bezierCurveTo(a,y,x,E,b,z)},Pt.clearRect=function(a,y,x,E){this.yc(),this.Z.clearRect(a,y,x,E)},Pt.clip=function(){this.Z.clip()},Pt.closePath=function(){this.Z.closePath()},Pt.createLinearGradient=function(a,y,x,E){return this.Z.createLinearGradient(a,y,x,E)},Pt.createPattern=function(a,y){return this.Z.createPattern(a,y)},Pt.createRadialGradient=function(a,y,x,E,b,z){return this.Z.createRadialGradient(a,y,x,E,b,z)},Pt.drawImage=function(a,y,x,E,b,z,tt,rt,ot){E===void 0?this.Z.drawImage(a,y,x):this.Z.drawImage(a,y,x,E,b,z,tt,rt,ot)},Pt.fill=function(a){this.Z.fill(a?"evenodd":"nonzero")},Pt.fillRect=function(a,y,x,E){this.Z.fillRect(a,y,x,E)},Pt.ox=function(a,y,x,E){this.Z.fillRect(a,y,x,E)},Pt.fillText=function(a,y,x){this.Z.fillText(a,y,x)},Pt.getImageData=function(a,y,x,E){return this.Z.getImageData(a,y,x,E)},Pt.lineTo=function(a,y){this.Z.lineTo(a,y)},Pt.measureText=function(a){return this.Z.measureText(a)},Pt.moveTo=function(a,y){this.Z.moveTo(a,y)},Pt.quadraticCurveTo=function(a,y,x,E){this.Z.quadraticCurveTo(a,y,x,E)},Pt.rect=function(a,y,x,E){this.Z.rect(a,y,x,E)},Pt.restore=function(){this.Z.restore()},Pt.save=function(){this.yc(),this.Z.save()},Ud.prototype.rotate=function(a){this.El.rotate(57.2958*a,0,0)},Pt=Ud.prototype,Pt.setTransform=function(a,y,x,E,b,z){this.El.setTransform(a,y,x,E,b,z)},Pt.scale=function(a,y){this.El.scale(a,y)},Pt.translate=function(a,y){this.El.translate(a,y)},Pt.stroke=function(){this.Z.stroke()},Pt.transform=function(a,y,x,E,b,z){if(a!==1||y!==0||x!==0||E!==1||b!==0||z!==0){var tt=this.El,rt=tt.m11*a+tt.m21*y;a=tt.m12*a+tt.m22*y,y=tt.m11*x+tt.m21*E,x=tt.m12*x+tt.m22*E,tt.dx=tt.m11*b+tt.m21*z+tt.dx,tt.dy=tt.m12*b+tt.m22*z+tt.dy,tt.m11=rt,tt.m12=a,tt.m21=y,tt.m22=x}},Pt.yc=function(){var a=this.El;this.Z.setTransform(a.m11,a.m12,a.m21,a.m22,a.dx,a.dy)},Pt.ng=function(a,y){if(a instanceof Wr&&a.type===ol){var x=a.yk;a=a.ft,a>x?(this.scale(x/a,1),this.translate((a-x)/2,0)):x>a&&(this.scale(1,a/x),this.translate(0,(x-a)/2)),this.Hm?this.clip():this.fill(y),a>x?(this.translate(-(a-x)/2,0),this.scale(1/(x/a),1)):x>a&&(this.translate(0,-(x-a)/2),this.scale(1,1/(a/x)))}else this.Hm?this.clip():this.fill(y)},Pt.jk=function(){this.Hm||this.stroke()},Pt.Ev=function(a,y,x){this.Ar=a,this.Br=y,this.Vg=x},Pt.js=function(a,y){var x=this.Z;x.setLineDash!==void 0&&(x.setLineDash(a),x.lineDashOffset=y)},Pt.fs=function(){var a=this.Z;a.setLineDash!==void 0&&(a.setLineDash(mx),a.lineDashOffset=0)},Pt.Vc=function(a){a&&(this.dt=""),this.ct=this.et=""},Pt.Hs=function(){},ge.Object.defineProperties(Ud.prototype,{fillStyle:{get:function(){return this.Z.fillStyle},set:function(a){this.ct!==a&&(this.ct=this.Z.fillStyle=a)}},font:{get:function(){return this.Z.font},set:function(a){this.dt!==a&&(this.dt=this.Z.font=a)}},globalAlpha:{get:function(){return this.Z.globalAlpha},set:function(a){this.Z.globalAlpha=a}},lineCap:{get:function(){return this.Z.lineCap},set:function(a){this.Z.lineCap=a}},lineDashOffset:{get:function(){return this.Z.lineDashOffset},set:function(a){this.Z.lineDashOffset=a}},lineJoin:{get:function(){return this.Z.lineJoin},set:function(a){this.Z.lineJoin=a}},lineWidth:{get:function(){return this.Z.lineWidth},set:function(a){this.Z.lineWidth=a}},miterLimit:{get:function(){return this.Z.miterLimit},set:function(a){this.Z.miterLimit=a}},shadowBlur:{get:function(){return this.Z.shadowBlur},set:function(a){this.Z.shadowBlur=a}},shadowColor:{get:function(){return this.Z.shadowColor},set:function(a){this.Z.shadowColor=a}},shadowOffsetX:{get:function(){return this.Z.shadowOffsetX},set:function(a){this.Z.shadowOffsetX=a}},shadowOffsetY:{get:function(){return this.Z.shadowOffsetY},set:function(a){this.Z.shadowOffsetY=a}},strokeStyle:{get:function(){return this.Z.strokeStyle},set:function(a){this.et!==a&&(this.et=this.Z.strokeStyle=a)}},textAlign:{get:function(){return this.Z.textAlign},set:function(a){this.Z.textAlign=a}},imageSmoothingEnabled:{get:function(){return this.Z.imageSmoothingEnabled},set:function(a){this.Z.imageSmoothingEnabled=a}},filter:{get:function(){return this.Z.filter},set:function(a){this.Z.filter=a===""?"none":a}},clipInsteadOfFill:{get:function(){return this.Hm},set:function(a){this.Hm=a}}});var mx=Object.freeze([]);Ud.className="CanvasSurfaceContext";function Kg(){this.F=this.o=this.u=this.j=0}Kg.className="ColorNumbers";function Wr(a,y){Lf||(hv(),Lf=!0),xi(this),this._isFrozen=!1,a===void 0?(this.na=xh,this.xk="black"):typeof a=="string"?(this.na=xh,this.xk=a):(this.na=a,this.xk="black"),a=this.na,a===Ju?(this.Qd=Ir,this.Lk=bo):this.Lk=a===ol?this.Qd=er:this.Qd=qi,this.Gr=0,this.Xp=NaN,this.xe=this.cr=this.we=null,this.ft=this.yk=0,y&&Object.assign(this,y)}Wr.prototype.copy=function(){var a=new Wr;return a.na=this.na,a.xk=this.xk,a.Qd=this.Qd.J(),a.Lk=this.Lk.J(),a.Gr=this.Gr,a.Xp=this.Xp,this.we!==null&&(a.we=this.we.copy()),a.cr=this.cr,a},Pt=Wr.prototype,Pt.freeze=function(){return this._isFrozen=!0,this.we!==null&&this.we.freeze(),this},Pt.ka=function(){return Object.isFrozen(this)&&Gt("cannot thaw constant: "+this),this._isFrozen=!1,this.we!==null&&this.we.ka(),this},Pt.qb=function(a){a.classType===Wr&&(this.type=a)},Pt.toString=function(){var a="Brush(";if(this.type===xh)a+=this.color;else if(a=this.type===Ju?a+"Linear ":this.type===ol?a+"Radial ":this.type===bf?a+"Pattern ":a+"(unknown) ",a+=this.start+" "+this.end,this.colorStops!==null)for(var y=this.colorStops.iterator;y.next();)a+=" "+y.key+":"+y.value;return a+")"},Pt.addColorStop=function(a,y){return this._isFrozen&&fe(this),(typeof a!="number"||!isFinite(a)||1<a||0>a)&&Mn(a,"0 <= loc <= 1",Wr,"addColorStop:loc"),this.we===null&&(this.we=new Me),this.we.add(a,y),this.na===xh&&(this.type=Ju),this.xe=null,this},Pt.Vz=function(a,y){if(this._isFrozen&&fe(this),a=a===void 0||typeof a!="number"?.2:a,y=y===void 0?Mf:y,this.type===xh)Xu(this.color),this.color=Ef(a,y);else if((this.type===Ju||this.type===ol)&&this.colorStops!==null)for(var x=this.colorStops.iterator;x.next();)Xu(x.value),this.addColorStop(x.key,Ef(a,y));return this};function $y(a,y,x){return y=y===void 0||typeof y!="number"?.2:y,x=x===void 0?Mf:x,Xu(a),Ef(y,x)}Pt.Wy=function(a,y){if(this._isFrozen&&fe(this),a=a===void 0||typeof a!="number"?.2:a,y=y===void 0?Mf:y,this.type===xh)Xu(this.color),this.color=Ef(-a,y);else if((this.type===Ju||this.type===ol)&&this.colorStops!==null)for(var x=this.colorStops.iterator;x.next();)Xu(x.value),this.addColorStop(x.key,Ef(-a,y));return this};function t1(a,y,x){return y=y===void 0||typeof y!="number"?.2:y,x=x===void 0?Mf:x,Xu(a),Ef(-y,x)}function ov(a,y,x){Xu(a),a=so.j;var E=so.u,b=so.o,z=so.F;return Xu(y),x===void 0&&(x=.5),"rgba("+Math.round((so.j-a)*x+a)+", "+Math.round((so.u-E)*x+E)+", "+Math.round((so.o-b)*x+b)+", "+Math.round((so.F-z)*x+z)+")"}Pt.Gx=function(){if(this.type===xh)return Cf(this.color);if((this.type===Ju||this.type===ol)&&this.colorStops!==null){var a=this.colorStops;if(this.type===ol)return Cf(a.first().value);if(a.get(.5)!==null)return Cf(a.get(.5));if(a.count===2)return a=a.Fa(),Cf(ov(a[0].value,a[1].value));for(var y=a.iterator,x=-1,E=-1,b=1,z=1;y.next();){var tt=y.key,rt=Math.abs(.5-y.key);b>z&&rt<b?(x=tt,b=rt):z>=b&&rt<z&&(E=tt,z=rt)}return x>E&&(z=x,x=E,E=z,z=b),b=E-x,Cf(ov(a.get(x),a.get(E),1-z/b))}return!1};function Cf(a){return a?a instanceof Wr?a.Gx():(Xu(a),128>(299*so.j+587*so.u+114*so.o)/1e3):!1}function Ef(a,y){switch(y){case Mf:y=100*sv(so.j);var x=100*sv(so.u),E=100*sv(so.o);return is.j=.4124564*y+.3575761*x+.1804375*E,is.u=.2126729*y+.7151522*x+.072175*E,is.o=.0193339*y+.119192*x+.9503041*E,is.F=so.F,y=uv(is.j/kf[0]),x=uv(is.u/kf[1]),E=uv(is.o/kf[2]),Fu.j=116*x-16,Fu.u=500*(y-x),Fu.o=200*(x-E),Fu.F=is.F,Fu.j=Math.min(100,Math.max(0,Fu.j+100*a)),a=(Fu.j+16)/116,y=a-Fu.o/200,is.j=kf[0]*e1(Fu.u/500+a),is.u=kf[1]*(Fu.j>hm*dv?Math.pow(a,3):Fu.j/hm),is.o=kf[2]*e1(y),is.F=Fu.F,a=-.969266*is.j+1.8760108*is.u+.041556*is.o,y=.0556434*is.j+-.2040259*is.u+1.0572252*is.o,so.j=255*lv((3.2404542*is.j+-1.5371385*is.u+-.4985314*is.o)/100),so.u=255*lv(a/100),so.o=255*lv(y/100),so.F=is.F,so.j=Math.round(so.j),255<so.j?so.j=255:0>so.j&&(so.j=0),so.u=Math.round(so.u),255<so.u?so.u=255:0>so.u&&(so.u=0),so.o=Math.round(so.o),255<so.o?so.o=255:0>so.o&&(so.o=0),"rgba("+so.j+", "+so.u+", "+so.o+", "+so.F+")";case n1:return av(),Us.o=Math.min(100,Math.max(0,Us.o+100*a)),"hsla("+Us.j+", "+Us.u+"%, "+Us.o+"%, "+Us.F+")";default:Gt("Unknown color space: "+y)}}function Xu(a){Lf||(hv(),Lf=!0);var y=cv;if(y!==null){y.clearRect(0,0,1,1),y.fillStyle="#000000";var x=y.fillStyle;y.fillStyle=a,y.fillStyle!==x?(y.fillRect(0,0,1,1),a=y.getImageData(0,0,1,1).data,so.j=a[0],so.u=a[1],so.o=a[2],so.F=a[3]/255):(y.fillStyle="#FFFFFF",y.fillStyle=a,so.j=0,so.u=0,so.o=0,so.F=1)}}function av(){var a=so.j/255,y=so.u/255,x=so.o/255,E=Math.max(a,y,x),b=Math.min(a,y,x),z=E-b;if(b=(E+b)/2,z===0)var tt=a=0;else{switch(E){case a:tt=(y-x)/z%6;break;case y:tt=(x-a)/z+2;break;case x:tt=(a-y)/z+4}tt*=60,0>tt&&(tt+=360),a=z/(1-Math.abs(2*b-1))}Us.j=Math.round(tt),Us.u=Math.round(100*a),Us.o=Math.round(100*b),Us.F=so.F}function sv(a){return a/=255,.04045>=a?a/12.92:Math.pow((a+.055)/1.055,2.4)}function lv(a){return .0031308>=a?12.92*a:1.055*Math.pow(a,1/2.4)-.055}function uv(a){return a>dv?Math.pow(a,1/3):(hm*a+16)/116}function e1(a){var y=a*a*a;return y>dv?y:(116*a-16)/hm}function Dc(a,y){typeof a!="string"&&(a instanceof Wr||Gt("Value for "+y+" must be a color string or a Brush, not "+a))}function hv(){cv=Lo?new yl(null,void 0,{willReadFrequently:!0}).context:null}ge.Object.defineProperties(Wr.prototype,{type:{get:function(){return this.na},set:function(a){this._isFrozen&&fe(this,a),this.na=a,this.start.Mc()&&(a===Ju?this.start=Ir:a===ol&&(this.start=er)),this.end.Mc()&&(a===Ju?this.end=bo:a===ol&&(this.end=er)),this.xe=null}},color:{get:function(){return this.xk},set:function(a){this._isFrozen&&fe(this,a),this.xk=a,this.xe=null}},start:{get:function(){return this.Qd},set:function(a){this._isFrozen&&fe(this,a),this.Qd=a.J(),this.xe=null}},end:{get:function(){return this.Lk},set:function(a){this._isFrozen&&fe(this,a),this.Lk=a.J(),this.xe=null}},startRadius:{get:function(){return this.Gr},set:function(a){this._isFrozen&&fe(this,a),0>a&&Mn(a,">= zero",Wr,"startRadius"),this.Gr=a,this.xe=null}},endRadius:{get:function(){return this.Xp},set:function(a){this._isFrozen&&fe(this,a),0>a&&Mn(a,">= zero",Wr,"endRadius"),this.Xp=a,this.xe=null}},colorStops:{get:function(){return this.we},set:function(a){this._isFrozen&&fe(this,a),this.we=a,this.xe=null}},pattern:{get:function(){return this.cr},set:function(a){this._isFrozen&&fe(this,a),this.cr=a,this.xe=null}}}),Wr.prototype.isDark=Wr.prototype.Gx,Wr.prototype.darkenBy=Wr.prototype.Wy,Wr.prototype.lightenBy=Wr.prototype.Vz,Wr.prototype.addColorStop=Wr.prototype.addColorStop;var dv=216/24389,hm=24389/27,kf=[95.047,100,108.883],cv=null,so=new Kg,Us=new Kg,is=new Kg,Fu=new Kg,Lf=!1;Wr.className="Brush";var xh;Wr.Solid=xh=new Ue(Wr,"Solid",0);var Ju;Wr.Linear=Ju=new Ue(Wr,"Linear",1);var ol;Wr.Radial=ol=new Ue(Wr,"Radial",2);var bf;Wr.Pattern=bf=new Ue(Wr,"Pattern",4);var Mf;Wr.Lab=Mf=new Ue(Wr,"Lab",5);var n1;Wr.HSL=n1=new Ue(Wr,"HSL",6),Wr.randomColor=function(a,y){a===void 0&&(a=128),y===void 0&&(y=Math.max(a,255));var x=Math.abs(y-a);y=Math.floor(a+Math.random()*x).toString(16);var E=Math.floor(a+Math.random()*x).toString(16);return a=Math.floor(a+Math.random()*x).toString(16),2>y.length&&(y="0"+y),2>E.length&&(E="0"+E),2>a.length&&(a="0"+a),"#"+y+E+a},Wr.isValidColor=function(a){if(a==="black")return!0;if(a==="")return!1;Lf||(hv(),Lf=!0);var y=cv;if(y===null)return!0;y.fillStyle="#000000";var x=y.fillStyle;return y.fillStyle=a,y.fillStyle!==x?!0:(y.fillStyle="#FFFFFF",x=y.fillStyle,y.fillStyle=a,y.fillStyle!==x)},Wr.lighten=function(a){return $y(a)},Wr.lightenBy=$y,Wr.darken=function(a){return t1(a)},Wr.darkenBy=t1,Wr.mix=ov,Wr.isDark=Cf;function Qo(){this.xa="Base"}Qo.prototype.measure=function(){},Qo.prototype.Yz=function(a,y,x,E,b){a.measure(y,x,E,b)},Qo.prototype.arrange=function(){},Qo.prototype.Ly=function(a,y,x,E,b,z){a.arrange(y,x,E,b,z)},Qo.prototype.iA=function(a){a.Uj()},Qo.prototype.gc=function(){},ge.Object.defineProperties(Qo.prototype,{name:{get:function(){return this.xa},set:function(a){this.xa=a}},classType:{get:function(){return mn}}}),Qo.prototype.remeasureObject=Qo.prototype.iA,Qo.prototype.arrangeElement=Qo.prototype.Ly,Qo.prototype.measureElement=Qo.prototype.Yz,Qo.className="PanelLayout";function dm(){this.xa="Base"}we(dm,Qo),dm.prototype.measure=function(a,y,x,E,b,z,tt){var rt=E.length;a=_u(a);for(var ot=0;ot<rt;ot++){var st=E[ot];if(st.visible||st===a){var ut=st.margin,ft=ut.right+ut.left;ut=ut.top+ut.bottom,st.measure(y,x,z,tt);var mt=st.measuredBounds;ft=Math.max(mt.width+ft,0),ut=Math.max(mt.height+ut,0),mt=st.position.x;var yt=st.position.y;isFinite(mt)||(mt=0),isFinite(yt)||(yt=0),st instanceof lr&&st.isGeometryPositioned&&(st=st.strokeWidth/2,mt-=st,yt-=st),Pr(b,mt,yt,ft,ut)}}},dm.prototype.arrange=function(a,y,x){var E=y.length,b=a.padding;for(a=x.x-b.left,x=x.y-b.top,b=0;b<E;b++){var z=y[b],tt=z.measuredBounds,rt=z.margin,ot=z.position.x,st=z.position.y;if(ot=isNaN(ot)?-a:ot-a,st=isNaN(st)?-x:st-x,z instanceof lr&&z.isGeometryPositioned){var ut=z.strokeWidth/2;ot-=ut,st-=ut}z.visible&&z.arrange(ot+rt.left,st+rt.top,tt.width,tt.height)}};function cm(){this.xa="Base"}we(cm,Qo),cm.prototype.measure=function(a,y,x,E,b,z,tt){var rt=E.length;y=On(),z=_u(a);for(var ot=0;ot<rt;ot++){var st=E[ot];if(st.visible||st===z){var ut=ms(st,!1);if(ut!==nn&&ut!==wi)y.push(st);else{st.measure(1/0,x,0,tt),ut=st.margin,st=st.measuredBounds;var ft=Math.max(st.height+ut.top+ut.bottom,0);b.width+=Math.max(st.width+ut.right+ut.left,0),b.height=Math.max(b.height,ft)}}}for(E=y.length,a.desiredSize.height?x=Math.min(a.desiredSize.height,a.maxSize.height):b.height!==0&&(x=Math.min(b.height,a.maxSize.height)),a=0;a<E;a++)ot=y[a],(ot.visible||ot===z)&&(ut=ot.margin,rt=ut.right+ut.left,ut=ut.top+ut.bottom,ot.measure(1/0,x,0,tt),ot=ot.measuredBounds,ut=Math.max(ot.height+ut,0),b.width+=Math.max(ot.width+rt,0),b.height=Math.max(b.height,ut));Qn(y)},cm.prototype.arrange=function(a,y,x){for(var E=y.length,b=a.padding,z=b.top,tt=a.isOpposite,rt=tt?x.width:b.left,ot=0;ot<E;ot++){var st=z,ut=y[ot];if(ut.visible){var ft=ut.measuredBounds,mt=ut.margin,yt=mt.top+mt.bottom,wt=z+b.bottom,bt=ft.height,Zt=ms(ut,!1);(isNaN(ut.desiredSize.height)&&Zt===cn||Zt===Ti)&&(bt=Math.max(x.height-yt-wt,0)),yt=bt+yt+wt,wt=ut.alignment,wt.Xb()&&(wt=a.defaultAlignment),wt.sb()||(wt=er),tt&&(rt-=ft.width+mt.left+mt.right),ut.arrange(rt+wt.offsetX+mt.left,st+wt.offsetY+mt.top+(x.height*wt.y-yt*wt.y),ft.width,bt),tt||(rt+=ft.width+mt.left+mt.right)}}};function fm(){this.xa="Base"}we(fm,Qo),fm.prototype.measure=function(a,y,x,E,b,z){var tt=E.length;x=On();for(var rt=_u(a),ot=0;ot<tt;ot++){var st=E[ot];if(st.visible||st===rt){var ut=ms(st,!1);if(ut!==nn&&ut!==Ti)x.push(st);else{var ft=st.margin;ut=ft.right+ft.left,ft=ft.top+ft.bottom,st.measure(y,1/0,z,0),st=st.measuredBounds,Fr(b,Math.max(b.width,Math.max(st.width+ut,0)),b.height+Math.max(st.height+ft,0))}}}if(E=x.length,E!==0){for(a.desiredSize.width?y=Math.min(a.desiredSize.width,a.maxSize.width):b.width!==0&&(y=Math.min(b.width,a.maxSize.width)),a=0;a<E;a++)ot=x[a],(ot.visible||ot===rt)&&(st=ot.margin,tt=st.right+st.left,st=st.top+st.bottom,ot.measure(y,1/0,z,0),ot=ot.measuredBounds,st=Math.max(ot.height+st,0),b.width=Math.max(b.width,Math.max(ot.width+tt,0)),b.height+=st);Qn(x)}},fm.prototype.arrange=function(a,y,x){for(var E=y.length,b=a.padding,z=b.left,tt=a.isOpposite,rt=tt?x.height:b.top,ot=0;ot<E;ot++){var st=z,ut=y[ot];if(ut.visible){var ft=ut.measuredBounds,mt=ut.margin,yt=mt.left+mt.right,wt=z+b.right,bt=ft.width,Zt=ms(ut,!1);(isNaN(ut.desiredSize.width)&&Zt===cn||Zt===wi)&&(bt=Math.max(x.width-yt-wt,0)),yt=bt+yt+wt,wt=ut.alignment,wt.Xb()&&(wt=a.defaultAlignment),wt.sb()||(wt=er),tt&&(rt-=ft.height+mt.bottom+mt.top),ut.arrange(st+wt.offsetX+mt.left+(x.width*wt.x-yt*wt.x),rt+wt.offsetY+mt.top,bt,ft.height),tt||(rt+=ft.height+mt.bottom+mt.top)}}};function gm(){this.xa="Base"}we(gm,Qo),gm.prototype.measure=function(a,y,x,E,b,z,tt){var rt=E.length,ot=a.Pb(),st=ot.margin,ut=st.right+st.left,ft=st.top+st.bottom;ot.measure(y,x,z,tt);var mt=ot.measuredBounds;z=mt.width,tt=mt.height;var yt=Math.max(z+ut,0),wt=Math.max(tt+ft,0),bt=a.isClipping,Zt=Ee.allocAt(-st.left,-st.top,yt,wt),It=Ee.allocAt(0,0,z,tt);fv(ot,It,!0),z=It.width,tt=It.height;for(var Yt=!0,Jt=_u(a),qt=0;qt<rt;qt++){var ae=E[qt];mt=y;var Ce=x;if(ae!==ot&&(ae.visible||ae===Jt)){st=ae.margin;var In=st.left,ui=st.top;switch(yt=st.right+st.left,wt=st.top+st.bottom,st=ms(ae,!1),st){case cn:mt=z,Ce=tt,ui=In=wt=yt=0;break;case wi:mt=z,In=yt=0;break;case Ti:Ce=tt,ui=wt=0}ae.measure(mt,Ce,0,0),mt=ae.measuredBounds,yt=Math.max(mt.width+yt,0),wt=Math.max(mt.height+wt,0),st=ae.alignment,st.Xb()&&(st=a.defaultAlignment),st.sb()||(st=er);var $n=ae.alignmentFocus;if($n.Xb()&&($n=er),Ce=null,ae instanceof mn&&ae.$e!==""&&(Ce=ae.fb(ae.$e),Ce===ae&&(Ce=null)),In=It.x-In,ui=It.y-ui,Ce!==null){for(ae.arrange(0,0,mt.width,mt.height),mt=Ce.actualBounds,mt=At.allocAt(mt.x+($n.x*mt.width-$n.offsetX),mt.y+($n.y*mt.height-$n.offsetY)),Ce=Ce.panel;Ce!==ae;)Ce.transform.Ga(mt),Ce=Ce.panel;In+=st.x*z+st.offsetX-mt.x,ui+=st.y*tt+st.offsetY-mt.y,At.free(mt)}else In+=st.x*z+st.offsetX-($n.x*mt.width+$n.offsetX),ui+=st.y*tt+st.offsetY-($n.y*mt.height+$n.offsetY);Yt?(Yt=!1,b.h(In,ui,yt,wt)):Pr(b,In,ui,yt,wt)}}switch(Yt?b.assign(Zt):bt?b.Uu(It.x,It.y,It.width,It.height):Pr(b,Zt.x,Zt.y,Zt.width,Zt.height),Ee.free(Zt),Ee.free(It),st=ot.stretch,st===tr&&(st=ms(ot,!1)),st){case nn:return;case cn:if(!isFinite(y)&&!isFinite(x))return;break;case wi:if(!isFinite(y))return;break;case Ti:if(!isFinite(x))return}for(mt=ot.measuredBounds,z=mt.width,tt=mt.height,yt=Math.max(z+ut,0),wt=Math.max(tt+ft,0),st=ot.margin,It=Ee.allocAt(-st.left,-st.top,yt,wt),fv(ot,It,!0),z=It.width,tt=It.height,y=0;y<rt;y++)x=E[y],x===ot||!x.visible&&x!==Jt||(st=x.margin,yt=st.right+st.left,wt=st.top+st.bottom,mt=x.measuredBounds,yt=Math.max(mt.width+yt,0),wt=Math.max(mt.height+wt,0),ut=x.alignment,ut.Xb()&&(ut=a.defaultAlignment),ut.sb()||(ut=er),x=x.alignmentFocus,x.Xb()&&(x=er),Yt?(Yt=!1,b.h(ut.x*z+ut.offsetX-(x.x*mt.width+x.offsetX)-st.left,ut.y*tt+ut.offsetY-(x.y*mt.height+x.offsetY)-st.top,yt,wt)):Pr(b,ut.x*z+ut.offsetX-(x.x*mt.width+x.offsetX)-st.left,ut.y*tt+ut.offsetY-(x.y*mt.height+x.offsetY)-st.top,yt,wt));Yt?b.assign(Zt):bt?b.Uu(It.x,It.y,It.width,It.height):Pr(b,Zt.x,Zt.y,Zt.width,Zt.height),Ee.free(It)},gm.prototype.arrange=function(a,y,x){var E=y.length,b=a.Pb(),z=b.measuredBounds,tt=z.width,rt=z.height,ot=a.padding;z=ot.left,ot=ot.top;var st=z-x.x,ut=ot-x.y;for(b.arrange(st,ut,tt,rt),tt=Ee.allocAt(0,0,tt,rt),fv(b,tt,!1),rt=0;rt<E;rt++){var ft=y[rt];if(ft!==b){st=ft.measuredBounds;var mt=st.width,yt=st.height;ut=ft.alignment,ut.Xb()&&(ut=a.defaultAlignment),ut.sb()||(ut=er);var wt=ft.alignmentFocus;if(wt.Xb()&&(wt=er),st=null,ft instanceof mn&&ft.$e!==""&&(st=ft.fb(ft.$e),st===ft&&(st=null)),st!==null){var bt=st.actualBounds;for(wt=At.allocAt(bt.x+(wt.x*bt.width-wt.offsetX),bt.y+(wt.y*bt.height-wt.offsetY)),st=st.panel;st!==ft;)st.transform.Ga(wt),st=st.panel;st=ut.x*tt.width+ut.offsetX-wt.x,ut=ut.y*tt.height+ut.offsetY-wt.y,At.free(wt)}else st=ut.x*tt.width+ut.offsetX-(wt.x*mt+wt.offsetX),ut=ut.y*tt.height+ut.offsetY-(wt.y*yt+wt.offsetY);st+=tt.x-x.x,ut+=tt.y-x.y,ft.visible&&ft.arrange(z+st,ot+ut,mt,yt)}}Ee.free(tt)};function fv(a,y,x){var E=null;if(a instanceof mn&&a.$e!==""&&(E=a.fb(a.$e),E===a&&(E=null)),E!==null)for(x&&a.arrange(0,0,y.width,y.height),y.assign(E.actualBounds),E=E.panel;E!==a;)E.transform.pp(y),E=E.panel}function pm(){this.xa="Base"}we(pm,Qo),pm.prototype.measure=function(a,y,x,E,b,z,tt){var rt=E.length,ot=a.Pb(),st=ot.margin,ut=y,ft=x,mt=st.right+st.left,yt=st.top+st.bottom;ot.measure(y,x,z,tt),st=ot.measuredBounds;var wt=0,bt=null;ot instanceof lr&&(bt=ot,wt=bt.strokeWidth*bt.scale);var Zt=Math.max(st.width+mt,0);st=Math.max(st.height+yt,0);var It=vv(ot),Yt=It.x*Zt+It.offsetX;It=It.y*st+It.offsetY;var Jt=yv(ot),qt=Jt.x*Zt+Jt.offsetX;for(Jt=Jt.y*st+Jt.offsetY,isFinite(y)&&(ut=Math.max(Math.abs(Yt-qt)-wt,0)),isFinite(x)&&(ft=Math.max(Math.abs(It-Jt)-wt,0)),wt=Ke.alloc(),wt.h(0,0),a=_u(a),Jt=0;Jt<rt;Jt++)It=E[Jt],It===ot||!It.visible&&It!==a||(st=It.margin,Zt=st.right+st.left,Yt=st.top+st.bottom,It.measure(ut,ft,0,0),st=It.measuredBounds,Zt=Math.max(st.width+Zt,0),st=Math.max(st.height+Yt,0),wt.h(Math.max(Zt,wt.width),Math.max(st,wt.height)));if(rt===1)b.width=Zt,b.height=st,Ke.free(wt);else{switch(It=vv(ot),Jt=yv(ot),rt=E=0,Jt.x!==It.x&&Jt.y!==It.y&&(E=wt.width/Math.abs(Jt.x-It.x),rt=wt.height/Math.abs(Jt.y-It.y)),Ke.free(wt),wt=0,bt!==null&&(wt=bt.strokeWidth*bt.scale,Ev(bt)===fi&&(E=rt=Math.max(E,rt))),E+=Math.abs(It.offsetX)+Math.abs(Jt.offsetX)+wt,rt+=Math.abs(It.offsetY)+Math.abs(Jt.offsetY)+wt,bt=ot.stretch,bt===tr&&(bt=ms(ot,!1)),bt){case nn:tt=z=0;break;case cn:isFinite(y)&&(E=y),isFinite(x)&&(rt=x);break;case wi:isFinite(y)&&(E=y),tt=0;break;case Ti:z=0,isFinite(x)&&(rt=x)}ot.Uj(),ot.measure(E,rt,z,tt),b.width=ot.measuredBounds.width+mt,b.height=ot.measuredBounds.height+yt}},pm.prototype.arrange=function(a,y){var x=y.length,E=a.Pb(),b=E.measuredBounds,z=Ee.alloc();z.h(0,0,1,1);var tt=E.margin,rt=tt.left;tt=tt.top;var ot=a.padding,st=ot.left;ot=ot.top,E.arrange(st+rt,ot+tt,b.width,b.height);var ut=vv(E),ft=yv(E),mt=ut.y*b.height+ut.offsetY,yt=ft.x*b.width+ft.offsetX;for(ft=ft.y*b.height+ft.offsetY,z.x=ut.x*b.width+ut.offsetX,z.y=mt,Pr(z,yt,ft,0,0),z.x+=rt+st,z.y+=tt+ot,b=0;b<x;b++)rt=y[b],rt!==E&&(st=rt.measuredBounds,tt=rt.margin,ot=Math.max(st.width+tt.right+tt.left,0),ut=Math.max(st.height+tt.top+tt.bottom,0),mt=rt.alignment,mt.Xb()&&(mt=a.defaultAlignment),mt.sb()||(mt=er),ot=z.width*mt.x+mt.offsetX-ot*mt.x+tt.left+z.x,tt=z.height*mt.y+mt.offsetY-ut*mt.y+tt.top+z.y,rt.visible&&(oo(z.x,z.y,z.width,z.height,ot,tt,st.width,st.height)?rt.arrange(ot,tt,st.width,st.height):rt.arrange(ot,tt,st.width,st.height,new Ee(z.x,z.y,z.width,z.height))));Ee.free(z)};function mm(){this.xa="Base",this.name="Table"}we(mm,Qo),mm.prototype.measure=function(a,y,x,E,b){for(var z=E.length,tt=On(),rt=On(),ot=0;ot<z;ot++){var st=E[ot],ut=st instanceof mn?st:null;if(ut!==null&&wh(ut)&&st.visible){rt.push(ut);for(var ft=ut.O.s,mt=ft.length,yt=0;yt<mt;yt++){var wt=ft[yt];ut.type===mn.TableRow?wt.row=st.row:ut.type===mn.TableColumn&&(wt.column=st.column),tt.push(wt)}}else tt.push(st)}z=tt.length,z===0&&(a.Fb(0),a.Eb(0));for(var bt=[],Zt=0;Zt<z;Zt++){var It=tt[Zt];It.visible&&(Xo(It,!0),bu(It,!0),bt[It.row]||(bt[It.row]=[]),bt[It.row][It.column]||(bt[It.row][It.column]=[]),bt[It.row][It.column].push(It))}Qn(tt);var Yt=On(),Jt=On(),qt=On(),ae={count:0},Ce={count:0},In=y,ui=x,$n=a.rowDefs,Cn=a.colDefs,$e=null;z=$n.length;for(var _i=0;_i<z;_i++)$e=$n[_i],$e!==void 0&&($e.actual=0);z=Cn.length;for(var zi=0;zi<z;zi++)$e=Cn[zi],$e!==void 0&&($e.actual=0);for(var zr=bt.length,eo=0,aa=0;aa<zr;aa++)bt[aa]&&(eo=Math.max(eo,bt[aa].length));var ua=Math.min(a.topIndex,zr-1),Ya=Math.min(a.leftIndex,eo-1),sa=0;zr=bt.length;for(var Nh=_u(a),Zo=0;Zo<zr;Zo++)if(bt[Zo]){eo=bt[Zo].length;var $l=a.Fb(Zo);$l.actual=0;for(var Xa=$l.oc=0;Xa<eo;Xa++)if(bt[Zo][Xa]){var Dh=a.Eb(Xa);Yt[Xa]===void 0&&(Dh.actual=0,Dh.oc=0,Yt[Xa]=!0);for(var Js=bt[Zo][Xa],Pl=Js.length,Rs=0;Rs<Pl;Rs++){var Ls=Js[Rs];if(Ls.visible||Ls===Nh){var vd=1<Ls.rowSpan||1<Ls.columnSpan;vd&&(Zo<ua||Xa<Ya||Jt.push(Ls));var tu=Ls.margin,Qf=tu.right+tu.left,js=tu.top+tu.bottom,Ja=Xl(Ls,$l,Dh,!1),Fp=Ls.desiredSize,Wc=!isNaN(Fp.height),vu=!isNaN(Fp.width)&&Wc;if(vd||Ja===nn||vu||Zo<ua||Xa<Ya||(ae[Xa]!==void 0||Ja!==cn&&Ja!==wi||(ae[Xa]=-1,ae.count++),Ce[Zo]!==void 0||Ja!==cn&&Ja!==Ti||(Ce[Zo]=-1,Ce.count++),qt.push(Ls)),Ls.measure(1/0,1/0,0,0),!(Zo<ua||Xa<Ya)){var bs=Ls.measuredBounds,ec=Math.max(bs.width+Qf,0),zs=Math.max(bs.height+js,0);if(Ls.rowSpan===1&&(Ja===nn||Ja===wi)){$e=a.Fb(Zo);var yd=$e.Wc();sa=Math.max(zs-$e.actual,0),sa+yd>ui&&(sa=Math.max(ui-yd,0));var z0=$e.oa===0;$e.oc=$e.oc+sa,$e.actual=$e.oa+sa,ui=Math.max(ui-(sa+(z0?yd:0)),0)}if(Ls.columnSpan===1&&(Ja===nn||Ja===Ti)){$e=a.Eb(Xa);var Ap=$e.Wc();sa=Math.max(ec-$e.actual,0),sa+Ap>In&&(sa=Math.max(In-Ap,0));var Gy=$e.oa===0;$e.oc=$e.oc+sa,$e.actual=$e.oa+sa,In=Math.max(In-(sa+(Gy?Ap:0)),0)}vd&&Ls.Uj()}}}}}Qn(Yt);var ju=0,$u=0;z=a.columnCount;for(var Vc=0;Vc<z;Vc++){var Sd=Cn[Vc];Sd!==void 0&&(ju+=isNaN(Sd.Hc)?Sd.oc:Sd.Hc,Sd.oc!==0&&(ju+=Sd.Wc()))}z=a.rowCount;for(var qf=0;qf<z;qf++){var xd=$n[qf];xd!==void 0&&($u+=isNaN(xd.Hc)?xd.oc:xd.Hc,xd.oc!==0&&($u+=xd.Wc()))}In=Math.max(y-ju,0);var zu=ui=Math.max(x-$u,0),Bh=In;z=qt.length;for(var Ms=0;Ms<z;Ms++){var yu=qt[Ms],G0=a.Fb(yu.row),th=a.Eb(yu.column),$f=yu.measuredBounds,eu=yu.margin,nc=eu.right+eu.left,Su=eu.top+eu.bottom;ae[yu.column]=th.oc===0&&ae[yu.column]!==void 0?Math.max($f.width+nc,ae[yu.column]):null,Ce[yu.row]=G0.oc===0&&Ce[yu.row]!==void 0?Math.max($f.height+Su,Ce[yu.row]):null}var Uc=0,tg=0,zl;for(zl in Ce)zl!=="count"&&(Uc+=Ce[zl]);for(zl in ae)zl!=="count"&&(tg+=ae[zl]);for(var Ca=Ke.alloc(),Np=0;Np<z;Np++){var hs=qt[Np];if(hs.visible||hs===Nh){var Wo=a.Fb(hs.row),ds=a.Eb(hs.column),eh=0;isFinite(ds.width)?eh=ds.width:(isFinite(In)&&ae[hs.column]!==null?tg===0?eh=ds.actual+In:eh=ae[hs.column]/tg*Bh:ae[hs.column]!==null?eh=In:eh=ds.actual||In,eh=Math.max(0,eh-ds.Wc()));var Th=0;switch(isFinite(Wo.height)?Th=Wo.height:(isFinite(ui)&&Ce[hs.row]!==null?Uc===0?Th=Wo.actual+ui:Th=Ce[hs.row]/Uc*zu:Ce[hs.row]!==null?Th=ui:Th=Wo.actual||ui,Th=Math.max(0,Th-Wo.Wc())),Ca.h(Math.max(ds.minimum,Math.min(eh,ds.maximum)),Math.max(Wo.minimum,Math.min(Th,Wo.maximum))),Ja=Xl(hs,Wo,ds,!1),Ja){case wi:Ca.height=Math.max(Ca.height,Wo.actual+ui);break;case Ti:Ca.width=Math.max(Ca.width,ds.actual+In)}var ic=hs.margin,Hy=ic.right+ic.left,H0=ic.top+ic.bottom;hs.Uj(),hs.measure(Ca.width,Ca.height,ds.minimum,Wo.minimum);var eg=hs.measuredBounds,rc=Math.max(eg.width+Hy,0),Yc=Math.max(eg.height+H0,0);isFinite(In)&&(rc=Math.min(rc,Ca.width)),isFinite(ui)&&(Yc=Math.min(Yc,Ca.height));var Fs=0;Fs=Wo.actual,Wo.actual=Math.max(Wo.actual,Yc),Wo.oc=Math.max(Wo.oc,Yc),sa=Wo.actual-Fs,ui=Math.max(ui-sa,0),Ce[hs.row]===null&&(zu=Math.max(zu-sa,0)),Fs=ds.actual,ds.actual=Math.max(ds.actual,rc),ds.oc=Math.max(ds.oc,rc),sa=ds.actual-Fs,In=Math.max(In-sa,0),ae[hs.column]===null&&(Bh=Math.max(Bh-sa,0))}}Qn(qt);var nh=Ke.alloc(),nu=On(),hl=On();if(z=Jt.length,z!==0){for(var wd=0;wd<zr;wd++)if(bt[wd]){eo=bt[wd].length;var ng=a.Fb(wd);nu[wd]=ng.actual;for(var Pd=0;Pd<eo;Pd++)if(bt[wd][Pd]){var K0=a.Eb(Pd);hl[Pd]=K0.actual}}}for(var ig=0;ig<z;ig++){var No=Jt[ig];if(No.visible||No===Nh){var Gl=a.Fb(No.row),Cl=a.Eb(No.column);switch(Ca.h(Math.max(Cl.minimum,Math.min(y,Cl.maximum)),Math.max(Gl.minimum,Math.min(x,Gl.maximum))),Ja=Xl(No,Gl,Cl,!1),Ja){case cn:hl[Cl.index]!==0&&(Ca.width=Math.min(Ca.width,hl[Cl.index])),nu[Gl.index]!==0&&(Ca.height=Math.min(Ca.height,nu[Gl.index]));break;case wi:hl[Cl.index]!==0&&(Ca.width=Math.min(Ca.width,hl[Cl.index]));break;case Ti:nu[Gl.index]!==0&&(Ca.height=Math.min(Ca.height,nu[Gl.index]))}isFinite(Cl.width)&&(Ca.width=Cl.width),isFinite(Gl.height)&&(Ca.height=Gl.height),nh.h(0,0);for(var Z0=Cl.minimum,Gs=Gl.minimum,Oh=1;Oh<No.rowSpan&&!(No.row+Oh>=a.rowCount);Oh++)$e=a.Fb(No.row+Oh),sa=0,sa=Ja===cn||Ja===Ti?Math.max($e.minimum,nu[No.row+Oh]===0?$e.maximum:Math.min(nu[No.row+Oh],$e.maximum)):Math.max($e.minimum,isNaN($e.Hc)?$e.maximum:Math.min($e.Hc,$e.maximum)),nh.height+=sa,Gs+=$e.minimum;for(var El=1;El<No.columnSpan&&!(No.column+El>=a.columnCount);El++)$e=a.Eb(No.column+El),sa=0,sa=Ja===cn||Ja===wi?Math.max($e.minimum,hl[No.column+El]===0?$e.maximum:Math.min(hl[No.column+El],$e.maximum)):Math.max($e.minimum,isNaN($e.Hc)?$e.maximum:Math.min($e.Hc,$e.maximum)),nh.width+=sa,Z0+=$e.minimum;Ca.width+=nh.width,Ca.height+=nh.height;var rg=No.margin,Cd=rg.right+rg.left,Dp=rg.top+rg.bottom;No.measure(Ca.width,Ca.height,Z0,Gs);for(var og=No.measuredBounds,xu=Math.max(og.width+Cd,0),oc=Math.max(og.height+Dp,0),Ed=0,ag=0;ag<No.rowSpan&&!(No.row+ag>=a.rowCount);ag++)$e=a.Fb(No.row+ag),Ed+=$e.total||0;if(Ed<oc){var Ih=oc-Ed,Gu=oc-Ed;if(No.spanAllocation!==null)for(var Rh=No.spanAllocation,ih=0;ih<No.rowSpan&&!(0>=Ih)&&!(No.row+ih>=a.rowCount);ih++){$e=a.Fb(No.row+ih);var jh=$e.oa||0,ac=Rh(No,$e,Gu);$e.actual=Math.min($e.maximum,jh+ac),$e.oa!==jh&&(Ih-=$e.oa-jh)}for(;0<Ih;){var iu=$e.oa||0;if(isNaN($e.height)&&$e.maximum>iu&&($e.actual=Math.min($e.maximum,iu+Ih),$e.oa!==iu&&(Ih-=$e.oa-iu)),$e.index===0)break;$e=a.Fb($e.index-1)}}for(var Xc=0,zh=0;zh<No.columnSpan&&!(No.column+zh>=a.columnCount);zh++)$e=a.Eb(No.column+zh),Xc+=$e.total||0;if(Xc<xu){var Jc=xu-Xc,Ky=xu-Xc;if(No.spanAllocation!==null)for(var rh=No.spanAllocation,sc=0;sc<No.columnSpan&&!(0>=Jc)&&!(No.column+sc>=a.columnCount);sc++){$e=a.Eb(No.column+sc);var Bp=$e.oa||0,Zy=rh(No,$e,Ky);$e.actual=Math.min($e.maximum,Bp+Zy),$e.oa!==Bp&&(Jc-=$e.oa-Bp)}for(;0<Jc;){var W0=$e.oa||0;if(isNaN($e.width)&&$e.maximum>W0&&($e.actual=Math.min($e.maximum,W0+Jc),$e.oa!==W0&&(Jc-=$e.oa-W0)),$e.index===0)break;$e=a.Eb($e.index-1)}}}}Qn(Jt),Ke.free(nh),Ke.free(Ca),nu!==void 0&&Qn(nu),hl!==void 0&&Qn(hl);var _c=0,Qc=0,V0=a.desiredSize,gx=a.maxSize;Ja=ms(a,!0);var Tp=$u=ju=0,Op=0;z=a.columnCount;for(var U0=0;U0<z;U0++)Cn[U0]!==void 0&&($e=a.Eb(U0),isFinite($e.width)?(Tp+=$e.width,Tp+=$e.Wc()):Lm($e)===Ug?(Tp+=$e.oa,Tp+=$e.Wc()):$e.oa!==0&&(ju+=$e.oa,ju+=$e.Wc()));isFinite(V0.width)?_c=Math.min(V0.width,gx.width):_c=Ja!==nn&&isFinite(y)?y:ju,_c=Math.max(_c,a.minSize.width),_c=Math.max(_c-Tp,0);for(var Qx=ju===0?1:Math.max(_c/ju,1),Y0=0;Y0<z;Y0++)Cn[Y0]!==void 0&&($e=a.Eb(Y0),isFinite($e.width)||Lm($e)===Ug||($e.actual=$e.oa*Qx),$e.position=b.width,$e.oa!==0&&(b.width+=$e.oa,b.width+=$e.Wc()));z=a.rowCount;for(var X0=0;X0<z;X0++)$n[X0]!==void 0&&($e=a.Fb(X0),isFinite($e.height)?(Op+=$e.height,Op+=$e.Wc()):Lm($e)===Ug?(Op+=$e.oa,Op+=$e.Wc()):$e.oa!==0&&($u+=$e.oa,$u+=$e.Wc()));isFinite(V0.height)?Qc=Math.min(V0.height,gx.height):Qc=Ja!==nn&&isFinite(x)?x:$u,Qc=Math.max(Qc,a.minSize.height),Qc=Math.max(Qc-Op,0);for(var qx=$u===0?1:Math.max(Qc/$u,1),J0=0;J0<z;J0++)$n[J0]!==void 0&&($e=a.Fb(J0),isFinite($e.height)||Lm($e)===Ug||($e.actual=$e.oa*qx),$e.position=b.height,$e.oa!==0&&(b.height+=$e.oa,b.height+=$e.Wc()));z=rt.length;for(var Wy=0;Wy<z;Wy++){var Ip=rt[Wy],Vy=0,Uy=0;Ip.type===mn.TableRow?(Vy=b.width,$e=a.Fb(Ip.row),Uy=$e.actual):($e=a.Eb(Ip.column),Vy=$e.actual,Uy=b.height),Ip.measuredBounds.h(0,0,Vy,Uy),Xo(Ip,!1)}Qn(rt),a.inRowsCols=bt},mm.prototype.arrange=function(a,y,x){var E=y.length,b=a.padding,z=b.left;b=b.top;var tt=a.inRowsCols;if(tt!==null){for(var rt,ot,st=tt.length,ut=0,ft=0;ft<st;ft++)tt[ft]&&(ut=Math.max(ut,tt[ft].length));ot=a.rowDefs,rt=a.colDefs;var mt=ft=0,yt=Math.min(a.topIndex,st-1);if(0<ot.length){for(;yt!==st&&(ot[yt]===void 0||ot[yt].oa===0);)yt++;yt=Math.max(Math.min(yt,st-1),0),ft=-ot[yt].position}var wt=Math.min(a.leftIndex,ut-1);if(0<rt.length){for(;wt!==ut&&(rt[wt]===void 0||rt[wt].oa===0);)wt++;wt=Math.max(Math.min(wt,ut-1),0),mt=-rt[wt].position}for(var bt=0,Zt=0;bt!==st&&ot[bt]===void 0;)bt++;for(;Zt!==st&&rt[Zt]===void 0;)Zt++;ut=a.part,a.Fb(bt),a.Eb(Zt);for(var It=0;It<y.length;It++){var Yt=y[It];if(Yt instanceof mn&&Yt.visible&&wh(Yt)){if(Yt.type===mn.TableRow){rt=a.Fb(Yt.row);var Jt=a.Eb(Zt)}else rt=a.Fb(bt),Jt=a.Eb(Yt.column);ot=rt.position+ft+b,rt.oa!==0&&(ot+=rt.Io(Math.max(bt,yt))),rt=Jt.position+mt+z,Jt.oa!==0&&(rt+=Jt.Io(Math.max(Zt,wt))),Jt=Yt.measuredBounds,Yt.Uk(),Yt.actualBounds.ka();var qt=Yt.actualBounds,ae=Ee.allocAt(qt.x,qt.y,qt.width,qt.height);qt.x=Yt.type===mn.TableRow?z:rt,qt.y=Yt.type===mn.TableColumn?b:ot,qt.width=Jt.width,qt.height=Jt.height,Yt.actualBounds.freeze(),bu(Yt,!1),vr(ae,qt)||ut===null||(ut.oh(),Yt.Pn(ut)),Ee.free(ae)}}for(It=Ke.alloc(),Yt=0;Yt<st;Yt++)if(tt[Yt]){for(ut=tt[Yt].length,Jt=a.Fb(Yt),ot=Jt.position+ft+b,Jt.oa!==0&&(ot+=Jt.Io(Math.max(bt,yt))),qt=0;qt<ut;qt++)if(tt[Yt][qt]){ae=a.Eb(qt),rt=ae.position+mt+z,ae.oa!==0&&(rt+=ae.Io(Math.max(Zt,wt)));for(var Ce=tt[Yt][qt],In=Ce.length,ui=0;ui<In;ui++){var $n=Ce[ui],Cn=$n.measuredBounds;It.h(0,0);for(var $e=1;$e<$n.rowSpan&&!(Yt+$e>=a.rowCount);$e++){var _i=a.Fb(Yt+$e);_i.oa!==0&&(It.height+=_i.total)}for($e=1;$e<$n.columnSpan&&!(qt+$e>=a.columnCount);$e++)_i=a.Eb(qt+$e),_i.oa!==0&&(It.width+=_i.total);var zi=ae.oa+It.width,zr=Jt.oa+It.height;$e=rt,_i=ot;var eo=zi,aa=zr,ua=rt,Ya=ot,sa=zi,Nh=zr;rt+zi>x.width&&(sa=Math.max(x.width-rt,0)),ot+zr>x.height&&(Nh=Math.max(x.height-ot,0));var Zo=$n.alignment;if(Zo.Xb()){Zo=a.defaultAlignment,Zo.sb()||(Zo=er);var $l=Zo.x,Xa=Zo.y,Dh=Zo.offsetX;Zo=Zo.offsetY;var Js=ae.alignment,Pl=Jt.alignment;Js.sb()&&($l=Js.x,Dh=Js.offsetX),Pl.sb()&&(Xa=Pl.y,Zo=Pl.offsetY)}else $l=Zo.x,Xa=Zo.y,Dh=Zo.offsetX,Zo=Zo.offsetY;(isNaN($l)||isNaN(Xa))&&(Xa=$l=.5,Zo=Dh=0),Js=Cn.width,Pl=Cn.height;var Rs=$n.margin,Ls=Rs.left+Rs.right,vd=Rs.top+Rs.bottom,tu=Xl($n,Jt,ae,!1);!isNaN($n.desiredSize.width)||tu!==cn&&tu!==wi||(Js=Math.max(zi-Ls,0)),!isNaN($n.desiredSize.height)||tu!==cn&&tu!==Ti||(Pl=Math.max(zr-vd,0)),zi=$n.maxSize,zr=$n.minSize,Js=Math.min(zi.width,Js),Pl=Math.min(zi.height,Pl),Js=Math.max(zr.width,Js),Pl=Math.max(zr.height,Pl),zi=Pl+vd,$e+=eo*$l-(Js+Ls)*$l+Dh+Rs.left,_i+=aa*Xa-zi*Xa+Zo+Rs.top,$n.visible&&(oo(ua,Ya,sa,Nh,$e,_i,Cn.width,Cn.height)?$n.arrange($e,_i,Js,Pl):$n.arrange($e,_i,Js,Pl,new Ee(ua,Ya,sa,Nh)))}}}for(Ke.free(It),a=0;a<E;a++)x=y[a],z=x instanceof mn?x:null,z!==null&&wh(z)&&(z=x.actualBounds,x.naturalBounds.ka(),x.naturalBounds.h(0,0,z.width,z.height),x.naturalBounds.freeze())}};function vm(){this.xa="Base"}we(vm,Qo),vm.prototype.measure=function(){},vm.prototype.arrange=function(){};function ym(){this.xa="Base"}we(ym,Qo),ym.prototype.measure=function(){},ym.prototype.arrange=function(){};function Sm(){this.xa="Base"}we(Sm,Qo),Sm.prototype.measure=function(a,y,x,E,b,z,tt){1<E.length&&Gt("Viewbox Panel cannot contain more than one GraphObject."),E=E[0],E.Ca=1,E.Uj(),E.measure(1/0,1/0,z,tt);var rt=E.measuredBounds,ot=E.margin,st=ot.right+ot.left;if(ot=ot.top+ot.bottom,isFinite(y)||isFinite(x)){var ut=E.scale,ft=rt.width;rt=rt.height;var mt=Math.max(y-st,0),yt=Math.max(x-ot,0),wt=1;a.viewboxStretch===fi?ft!==0&&rt!==0&&(wt=Math.min(mt/ft,yt/rt)):ft!==0&&rt!==0&&(wt=Math.max(mt/ft,yt/rt)),wt===0&&(wt=1e-4),E.Ca*=wt,ut!==E.scale&&(Xo(E,!0),E.measure(1/0,1/0,z,tt))}rt=E.measuredBounds,b.width=isFinite(y)?y:Math.max(rt.width+st,0),b.height=isFinite(x)?x:Math.max(rt.height+ot,0)},Sm.prototype.arrange=function(a,y,x){y=y[0];var E=y.measuredBounds,b=y.margin,z=Math.max(E.width+(b.right+b.left),0);b=Math.max(E.height+(b.top+b.bottom),0);var tt=y.alignment;tt.Xb()&&(tt=a.defaultAlignment),tt.sb()||(tt=er),y.arrange(x.width*tt.x-z*tt.x+tt.offsetX,x.height*tt.y-b*tt.y+tt.offsetY,E.width,E.height)};function Zg(){this.xa="Base"}we(Zg,Qo),Zg.prototype.measure=function(){},Zg.prototype.arrange=function(){},Zg.prototype.gc=function(a,y,x){x=a.Df()*x.scale,0>=x&&(x=1);var E=a.gridCellSize,b=E.width;E=E.height;var z=a.naturalBounds,tt=a.actualBounds,rt=z.width,ot=z.height,st=Math.ceil(rt/b),ut=Math.ceil(ot/E),ft=a.gridOrigin,mt=ft.x;ft=ft.y,y.save(),y.beginPath(),y.rect(0,0,rt,ot),y.clip(),y.Se();for(var yt=[],wt=a.O.s,bt=wt.length,Zt=0;Zt<bt;Zt++){var It=wt[Zt],Yt=[];if(yt.push(Yt),It.visible){var Jt=It.interval;if(!(0>Jt)){It=pv(It.figure);for(var qt=0;qt<bt;qt++)if(qt!==Zt){var ae=wt[qt];ae.visible&&pv(ae.figure)===It&&(ae=ae.interval,ae>Jt&&Yt.push(ae))}}}}for(wt=a.O.s,bt=wt.length,Zt=0;Zt<bt;Zt++){var Ce=wt[Zt];if(Ce.visible&&(Yt=Ce.interval||1,It=Math.abs(Yt),!(2>b*It*x))){if(Jt=Ce.segmentIndex,(!isFinite(Jt)||isNaN(Jt))&&(Jt=0),0>Jt&&(Jt=It-Math.min(-Jt,It)),Jt=Math.round(Jt%It),It=Ce.opacity,qt=1,It!==1){if(It===0)continue;qt=y.globalAlpha,y.globalAlpha=qt*It}ae=yt[Zt];var In=!1,ui=Ce.strokeDashArray;if(ui!==null&&(In=!0,y.js(ui,Ce.strokeDashOffset)),Ce.figure==="LineV"&&Ce.stroke!==null&&0<Ce.strokeWidth){for(y.lineWidth=Ce.strokeWidth,Mo(a,y,Ce.stroke,!1,!1,z,tt),y.beginPath(),ui=Ce=Math.floor((mt-b)/b);ui<=Ce+st;ui++){var $n=ui*b+mt;0<=$n&&$n<=rt&&xm(ui,Yt,Jt,ae)&&(y.moveTo($n,0),y.lineTo($n,ot))}y.stroke(),y.Se()}else if(Ce.figure==="LineH"&&Ce.stroke!==null&&0<Ce.strokeWidth){for(y.lineWidth=Ce.strokeWidth,Mo(a,y,Ce.stroke,!1,!1,z,tt),y.beginPath(),ui=Ce=Math.floor((ft-E)/E);ui<=Ce+ut;ui++)$n=ui*E+ft,0<=$n&&$n<=ot&&xm(ui,Yt,Jt,ae)&&(y.moveTo(0,$n),y.lineTo(rt,$n));y.stroke(),y.Se()}else if(Ce.figure==="BarV"&&Ce.fill!==null)for(Mo(a,y,Ce.fill,!0,!1,z,tt),Ce=Ce.width,isNaN(Ce)&&(Ce=b),$n=ui=Math.floor((mt-b)/b);$n<=ui+st;$n++){var Cn=$n*b+mt;0<=Cn+Ce&&Cn<=rt&&xm($n,Yt,Jt,ae)&&y.fillRect(Cn,0,Ce,ot)}else if(Ce.figure==="BarH"&&Ce.fill!==null)for(Mo(a,y,Ce.fill,!0,!1,z,tt),Ce=Ce.height,isNaN(Ce)&&(Ce=E),$n=ui=Math.floor((ft-E)/E);$n<=ui+ut;$n++)Cn=$n*E+ft,0<=Cn+Ce&&Cn<=ot&&xm($n,Yt,Jt,ae)&&y.fillRect(0,Cn,rt,Ce);In&&y.fs(),It!==1&&(y.globalAlpha=qt)}}y.restore(),y.Vc(!1)};function xm(a,y,x,E){if(0>y)return a%y===x;if(a%y!==x)return!1;y=E.length;for(var b=0;b<y;b++)if(a%E[b]===x)return!1;return!0}function wm(){this.xa="Base"}we(wm,Qo),wm.prototype.measure=function(a,y,x,E,b){var z=E.length;if(a instanceof Rr||a instanceof En){var tt=null,rt=null;if(a instanceof En&&(tt=a),a instanceof Rr&&(rt=a,tt=rt.adornedPart,a.j===null&&(a.j=[])),tt instanceof En){var ot=tt;if(z===0)Fr(a.naturalBounds,0,0),a.measuredBounds.h(0,0,0,0);else{var st=a instanceof Rr?null:tt.path;y=tt.routeBounds,x=a.jg,x.h(0,0,y.width,y.height);var ut=ot.points,ft=tt.pointsCount;rt!==null?rt.Ul(!1):tt!==null&&tt.Ul(!1),rt=y.width;var mt=y.height,yt=a.j;if(yt.length=0,st!==null){i1(a,rt,mt,st);var wt=st.measuredBounds;x.ed(wt),yt.push(wt)}wt=Ii.alloc();for(var bt=At.alloc(),Zt=At.alloc(),It=0;It<z;It++){var Yt=E[It];if(Yt!==st)if(Yt.isPanelMain&&Yt instanceof lr){i1(a,rt,mt,Yt);var Jt=Yt.measuredBounds;x.ed(Jt),yt.push(Jt)}else if(2>ft)Yt.measure(1/0,1/0,0,0),Jt=Yt.measuredBounds,x.ed(Jt),yt.push(Jt);else{var qt=Yt.segmentIndex,ae=Yt.segmentFraction,Ce=Yt.alignmentFocus;Ce.Mc()&&(Ce=er);var In=Yt.segmentOrientation,ui=Yt.segmentOffset;if(isNaN(qt)){var $n=ot.ua;Jt=On(),$n.Qu(ae,Jt);var Cn=At.allocAt(Jt[0],Jt[1]);if(Cn.add(ot.i(0)),$n.type===xn.j?Cn.offset(-$n.startX,-$n.startY):($n=$n.figures.first(),$n!==null&&Cn.offset(-$n.startX,-$n.startY)),$n=Jt[2],In!==os){var $e=ot.computeAngle(Yt,In,$n);Yt.Kb=$e}$e=Cn.x-y.x;var _i=Cn.y-y.y;At.free(Cn),Qn(Jt)}else if(qt<-ft||qt>=ft)Jt=At.alloc(),ot.vg(),ot.computeMidPoint(Jt),$n=ot.midAngle,In!==os&&($e=ot.computeAngle(Yt,In,$n),Yt.Kb=$e),$e=Jt.x-y.x,_i=Jt.y-y.y,At.free(Jt);else{if($e=0,0<=qt?(_i=ut.M(qt),Jt=qt<ft-1?ut.M(qt+1):_i):($e=ft+qt,_i=ut.M($e),Jt=0<$e?ut.M($e-1):_i),_i.Xa(Jt)){0<=qt?($n=0<qt?ut.M(qt-1):_i,$e=qt<ft-2?ut.M(qt+2):Jt):($n=$e<ft-1?ut.M($e+1):_i,$e=1<$e?ut.M($e-2):Jt),Cn=$n.Bf(_i);var zi=Jt.Bf($e);$n=Cn>zi+10?0<=qt?$n.ab(_i):_i.ab($n):zi>Cn+10?0<=qt?Jt.ab($e):$e.ab(Jt):0<=qt?$n.ab($e):$e.ab($n)}else $n=0<=qt?_i.ab(Jt):Jt.ab(_i);In!==os&&($e=ot.computeAngle(Yt,In,$n),Yt.Kb=$e),$e=_i.x+(Jt.x-_i.x)*ae-y.x,_i=_i.y+(Jt.y-_i.y)*ae-y.y}Yt.measure(1/0,1/0,0,0),Jt=Yt.measuredBounds,Cn=Yt.naturalBounds;var zr=0;Yt instanceof lr&&(zr=Yt.strokeWidth),zi=Cn.width+zr;var eo=Cn.height+zr;wt.reset(),wt.translate(-Jt.x,-Jt.y),wt.scale(Yt.scale,Yt.scale),wt.rotate(In===os?Yt.angle:$n,zi/2,eo/2),In!==np&&In!==rp||wt.rotate(90,zi/2,eo/2),In!==ip&&In!==op||wt.rotate(-90,zi/2,eo/2),In===Qm&&(45<$n&&135>$n||225<$n&&315>$n)&&wt.rotate(-$n,zi/2,eo/2),Cn=new Ee(0,0,zi,eo),bt.xi(Cn,Ce),wt.Ga(bt),Ce=-bt.x+zr/2*Yt.scale,Yt=-bt.y+zr/2*Yt.scale,Zt.assign(ui),zr=isNaN(ui.x);var aa=isNaN(ui.y);if(zr||aa){zi=zi/2+3,eo=eo/2+3;var ua=45<=$n&&135>=$n,Ya=225<=$n&&315>=$n;In===os&&(ua||Ya)?(Zt.x=aa?zi:ui.y,Zt.y=zr?eo:ui.x,ua?0<=qt||isNaN(qt)&&.5>ae||!zr||(Zt.y=-eo):Ya&&((0<=qt||isNaN(qt)&&.5>ae)&&zr&&(Zt.y=-eo),aa&&(Zt.x=-zi))):(zr&&(Zt.x=0<=qt||isNaN(qt)&&.5>ae?zi:-zi),aa&&(Zt.y=-eo),Zt.rotate($n))}else Zt.rotate($n);$e+=Zt.x,_i+=Zt.y,Cn.set(Jt),Cn.h($e+Ce,_i+Yt,Jt.width,Jt.height),yt.push(Cn),x.ed(Cn)}}if(tt!==null)for(E=tt.labelNodes;E.next();)E.value.measure(1/0,1/0);a.jg=x,a.position.h(y.x+x.x,y.y+x.y),Fr(b,x.width||0,x.height||0),Ii.free(wt),At.free(bt),At.free(Zt)}}}},wm.prototype.arrange=function(a,y){var x=y.length;if(a instanceof Rr||a instanceof En){var E=a,b=null;a instanceof Rr&&(b=a,E=b.adornedPart);var z=a instanceof Rr?null:E.path,tt=a.j;if(tt.length!==0){var rt=0;if(z!==null&&rt<tt.length){var ot=tt[rt];rt++,z.arrange(ot.x-a.jg.x,ot.y-a.jg.y,ot.width,ot.height)}for(ot=0;ot<x;ot++){var st=y[ot];if(st!==z&&rt<tt.length){var ut=tt[rt];rt++,st.arrange(ut.x-a.jg.x,ut.y-a.jg.y,ut.width,ut.height)}}}if(y=E.points,x=y.count,2<=x&&a instanceof En)for(z=a.labelNodes;z.next();){var ft=a;tt=z.value,rt=tt.segmentIndex,ot=tt.segmentFraction;var mt=tt.alignmentFocus;if(st=tt.segmentOrientation,ut=tt.segmentOffset,isNaN(rt)){var yt=ft.ua,wt=On();yt.Qu(ot,wt);var bt=At.allocAt(wt[0],wt[1]);bt.add(ft.i(0)),yt.type===xn.j||(yt=yt.figures.first()),bt.offset(-yt.startX,-yt.startY),yt=wt[2],st!==os&&(ft=ft.computeAngle(tt,st,yt),tt.angle=ft),ft=bt.x;var Zt=bt.y;At.free(bt),Qn(wt)}else if(rt<-x||rt>=x)wt=At.alloc(),yt=ft,Zt=wt,yt.vg(),yt.computeMidPoint(Zt),yt=ft.midAngle,st!==os&&(ft=ft.computeAngle(tt,st,yt),tt.angle=ft),ft=wt.x,Zt=wt.y,At.free(wt);else{if(bt=0,0<=rt?(wt=y.s[rt],Zt=rt<x-1?y.s[rt+1]:wt):(bt=x+rt,wt=y.s[bt],Zt=0<bt?y.s[bt-1]:wt),wt.Xa(Zt)){0<=rt?(yt=0<rt?y.s[rt-1]:wt,bt=rt<x-2?y.s[rt+2]:Zt):(yt=bt<x-1?y.s[bt+1]:wt,bt=1<bt?y.s[bt-2]:Zt);var It=yt.Bf(wt),Yt=Zt.Bf(bt);yt=It>Yt+10?0<=rt?yt.ab(wt):wt.ab(yt):Yt>It+10?0<=rt?Zt.ab(bt):bt.ab(Zt):0<=rt?yt.ab(bt):bt.ab(yt)}else yt=0<=rt?wt.ab(Zt):Zt.ab(wt);st!==os&&(ft=ft.computeAngle(tt,st,yt),tt.angle=ft),ft=wt.x+(Zt.x-wt.x)*ot,Zt=wt.y+(Zt.y-wt.y)*ot}if(mt.ys())tt.location=new At(ft,Zt);else{mt.Mc()&&(mt=er),wt=Ii.alloc(),wt.reset(),wt.scale(tt.scale,tt.scale),wt.rotate(tt.angle,0,0);var Jt=tt.naturalBounds;bt=Ee.allocAt(0,0,Jt.width,Jt.height),It=At.alloc(),It.xi(bt,mt),wt.Ga(It),mt=-It.x,Yt=-It.y;var qt=Jt.width,ae=Jt.height;Jt=At.alloc(),Jt.assign(ut);var Ce=isNaN(ut.x),In=isNaN(ut.y);if(Ce||In){qt=qt/2+3,ae=ae/2+3;var ui=45<=yt&&135>=yt,$n=225<=yt&&315>=yt;st===os&&(ui||$n)?(Jt.x=In?qt:ut.y,Jt.y=Ce?ae:ut.x,ui?0<=rt||isNaN(rt)&&.5>ot||!Ce||(Jt.y=-ae):$n&&((0<=rt||isNaN(rt)&&.5>ot)&&Ce&&(Jt.y=-ae),In&&(Jt.x=-qt))):(Ce&&(Jt.x=0<=rt||isNaN(rt)&&.5>ot?qt:-qt),In&&(Jt.y=-ae),Jt.rotate(yt))}else Jt.rotate(yt);ft+=Jt.x,Zt+=Jt.y,wt.pp(bt),mt+=bt.x,Yt+=bt.y,rt=At.allocAt(ft+mt,Zt+Yt),tt.move(rt),At.free(rt),At.free(Jt),At.free(It),Ee.free(bt),Ii.free(wt)}}b!==null?b.Ul(!1):E.Ul(!1),E=D1(a),a.location.h(a.position.x+E.x,a.position.y+E.y),At.free(E)}};function i1(a,y,x,E){if(Vs(E)!==!1){var b=E.strokeWidth;b===0&&a instanceof Rr&&a.type===mn.Link&&a.adornedObject instanceof lr&&(b=a.adornedObject.strokeWidth),b*=E.Ca,a instanceof En&&a.ua!==null?(a=a.geometry.bounds,E.Ge(a.x-b/2,a.y-b/2,a.width+b,a.height+b)):a instanceof Rr&&a.adornedPart.ua!==null?(a=a.adornedPart.ua.bounds,E.Ge(a.x-b/2,a.y-b/2,a.width+b,a.height+b)):E.Ge(-(b/2),-(b/2),y+b,x+b),b=E.desiredSize,b.w()||E.ua===null?E.dc.h(0,0,b.width,b.height):E.dc.assign(E.ua.bounds),Xo(E,!1)}}function Wg(){this.xa="Base"}we(Wg,Qo),Wg.prototype.measure=function(a,y,x,E,b,z,tt){var rt=a.Pb();a.graduatedBounds=[];var ot=rt.margin,st=ot.right+ot.left,ut=ot.top+ot.bottom;rt.measure(y,x,z,tt);var ft=rt.measuredBounds,mt=new Ee(-ot.left,-ot.top,Math.max(ft.width+st,0),Math.max(ft.height+ut,0));a.graduatedBounds.push(mt),b.assign(mt);for(var yt=rt.geometry,wt=rt.strokeWidth,bt=yt.flattenedSegments,Zt=yt.flattenedLengths,It=yt.flattenedTotalLength,Yt=bt.length,Jt=0,qt=0,ae=On(),Ce=0;Ce<Yt;Ce++){var In=bt[Ce],ui=[];qt=Jt=0;for(var $n=In.length,Cn=0;Cn<$n;Cn+=2){var $e=In[Cn],_i=In[Cn+1];if(Cn!==0){var zi=180*Math.atan2(_i-qt,$e-Jt)/Math.PI;0>zi&&(zi+=360),ui.push(zi)}Jt=$e,qt=_i}ae.push(ui)}if(a.graduatedIntervals===null){for(var zr=[],eo=a.O.s,aa=eo.length,ua=0;ua<aa;ua++){var Ya=eo[ua],sa=[];if(zr.push(sa),Ya.visible){var Nh=Ya.interval;if(!(0>Nh)){for(var Zo=0;Zo<aa;Zo++)if(Zo!==ua){var $l=eo[Zo];if($l.visible&&Ya.constructor===$l.constructor){var Xa=$l.interval;Xa>Nh&&sa.push(Xa)}}}}}a.graduatedIntervals=zr}var Dh=a.graduatedIntervals,Js=a.O.s,Pl=Js.length,Rs=0,Ls=0,vd=It;a.graduatedMarks=[];for(var tu,Qf=0;Qf<Pl;Qf++){var js=Js[Qf];if(tu=[],js.visible&&js!==rt){var Ja=Math.abs(js.interval),Fp=a.graduatedTickUnit;if(!(2>Fp*Ja*It/a.graduatedRange&&js.graduatedSkip===null)){var Wc=Zt[0][0],vu=0,bs=0;Ls=It*js.graduatedStart-1e-4,vd=It*js.graduatedEnd+1e-4;var ec=Fp*Ja,zs=a.graduatedTickBase;if(zs<a.graduatedMin){var yd=(a.graduatedMin-zs)/ec;yd=yd%1===0?yd:Math.floor(yd+1),zs+=yd*ec}else zs>a.graduatedMin+ec&&(zs-=Math.floor((zs-a.graduatedMin)/ec)*ec);for(var z0=Dh[Qf],Ap=zs,Gy=1e-6*a.graduatedMax,ju=1;zs<=a.graduatedMax+Gy;ju++){t:{for(var $u=z0.length,Vc=0;Vc<$u;Vc++){var Sd=(zs-a.graduatedTickBase)%(z0[Vc]*a.graduatedTickUnit),qf=1e-6*a.graduatedTickUnit;if(Sd<qf&&Sd>-qf){var xd=!1;break t}}xd=!0}if(xd&&(zs>a.graduatedMax&&(zs=a.graduatedMax),js.graduatedSkip===null||js instanceof io&&!js.graduatedSkip(zs,js)||js instanceof lr&&!js.graduatedSkip(zs,js))&&(Rs=(zs-a.graduatedMin)*It/a.graduatedRange,Rs>It&&(Rs=It),Ls<=Rs&&Rs<=vd)){for(var zu=ae[vu][bs],Bh=Zt[vu][bs];vu<Zt.length;){for(;Rs>Wc&&bs<Zt[vu].length-1;)bs++,zu=ae[vu][bs],Bh=Zt[vu][bs],Wc+=Bh;if(Rs<=Wc)break;vu++,bs=0,zu=ae[vu][bs],Bh=Zt[vu][bs],Wc+=Bh}var Ms=bt[vu],yu=Ms[2*bs],G0=Ms[2*bs+1],th=(Rs-(Wc-Bh))/Bh,$f=new At(yu+(Ms[2*bs+2]-yu)*th+wt/2-yt.bounds.x,G0+(Ms[2*bs+3]-G0)*th+wt/2-yt.bounds.y);$f.scale(rt.scale,rt.scale);t:{var eu=zu,nc=ae[vu];if(!(.5005>th&&.4995<th)){var Su=eu;if(.5>th?0<bs?Su=nc[bs-1]:ue.$(Ms[0],Ms[Ms.length-2])&&ue.$(Ms[1],Ms[Ms.length-1])&&(Su=nc[nc.length-1]):.5<th&&(bs+1<nc.length?Su=nc[bs+1]:ue.$(Ms[0],Ms[Ms.length-2])&&ue.$(Ms[1],Ms[Ms.length-1])&&(Su=nc[0])),eu!==Su){var Uc=Math.abs(eu-Su);if(180<Uc&&(eu<Su?eu+=360:Su+=360,Uc=Math.abs(eu-Su)),5e-4>th||.9995<th){zu=(eu+Su)/2%360;break t}if(10>Uc){var tg=1-Math.abs(.5-th);zu=(eu*tg+Su*(1-tg))%360;break t}}}zu=eu}if(js instanceof io){var zl="";js.graduatedFunction!==null?(zl=js.graduatedFunction(zs,js),zl=zl!=null?zl.toString():""):zl=(+zs.toFixed(2)).toString(),zl!==""&&tu.push({$l:$f,angle:zu,text:zl})}else tu.push({$l:$f,angle:zu})}zs=Ap+ju*ec}}}a.graduatedMarks.push(tu)}Qn(ae);var Ca=a.graduatedMarks;if(Ca!==null)for(var Np=E.length,hs=0;hs<Np;hs++){var Wo=E[hs],ds=Ca[hs];if(Wo.visible&&Wo!==rt&&ds.length!==0){if(Wo instanceof lr){var eh=a,Th=b,ic=Wo.alignmentFocus;ic.Mc()&&(ic=Ir);var Hy=Wo.angle;Wo.Kb=0,Wo.measure(1/0,1/0,0,0),Wo.Kb=Hy;var H0=Wo.measuredBounds,eg=H0.width,rc=H0.height,Yc=Ee.allocAt(0,0,eg,rc),Fs=At.alloc();Fs.xi(Yc,ic),Ee.free(Yc);for(var nh=-Fs.x,nu=-Fs.y,hl=new Ee,wd=ds.length,ng=0;ng<wd;ng++)for(var Pd=ds[ng],K0=Pd.$l.x,ig=Pd.$l.y,No=Pd.angle,Gl=0;4>Gl;Gl++){switch(Gl){case 0:Fs.h(nh,nu);break;case 1:Fs.h(nh+eg,nu);break;case 2:Fs.h(nh,nu+rc);break;case 3:Fs.h(nh+eg,nu+rc)}Fs.rotate(No+Wo.angle),Fs.offset(K0,ig),ng===0&&Gl===0?hl.h(Fs.x,Fs.y,0,0):hl.Ye(Fs),Fs.offset(-K0,-ig),Fs.rotate(-No-Wo.angle)}At.free(Fs),eh.graduatedBounds!==null&&eh.graduatedBounds.push(hl),Pr(Th,hl.x,hl.y,hl.width,hl.height)}else if(Wo instanceof io){var Cl=a,Z0=b;Cl.temporaryTextBlock===null&&(Cl.temporaryTextBlock=new io);var Gs=Cl.temporaryTextBlock;y1(Gs,Wo);var Oh=Wo.alignmentFocus;Oh.Mc()&&(Oh=Ir);for(var El=Wo.segmentOrientation,rg=Wo.segmentOffset,Cd=new Ee,Dp=0,og=0,xu=0,oc=0,Ed=0,ag=ds.length,Ih=0;Ih<ag;Ih++){var Gu=ds[Ih];Dp=Gu.$l.x,og=Gu.$l.y,xu=Gu.angle,Ed=oc=Wo.angle,El!==os&&(Ed=El===ep||El===_m?xu+Wo.angle:xu,oc=En.computeAngle(El,Ed)),Gs.Kb=oc,Gs.text=Gu.text||"",Gs.measure(1/0,1/0,0,0);var Rh=Gs.measuredBounds,ih=Gs.naturalBounds,jh=ih.width,ac=ih.height,iu=Ii.alloc();iu.reset(),iu.translate(-Rh.x,-Rh.y),iu.scale(Gs.scale,Gs.scale),iu.rotate(Ed,jh/2,ac/2),El!==np&&El!==rp||iu.rotate(90,jh/2,ac/2),El!==ip&&El!==op||iu.rotate(-90,jh/2,ac/2),El===Qm&&(45<xu&&135>xu||225<xu&&315>xu)&&iu.rotate(-xu,jh/2,ac/2);var Xc=Ee.allocAt(0,0,jh,ac),zh=At.alloc();zh.xi(Xc,Oh),iu.Ga(zh);var Jc=-zh.x,Ky=-zh.y,rh=At.alloc();rh.assign(rg),isNaN(rh.x)&&(rh.x=jh/2+3),isNaN(rh.y)&&(rh.y=-(ac/2+3)),rh.rotate(xu),Dp+=rh.x+Jc,og+=rh.y+Ky;var sc=new Ee(Dp,og,Rh.width,Rh.height),Bp=new Ee(Rh.x,Rh.y,Rh.width,Rh.height),Zy=new Ee(ih.x,ih.y,ih.width,ih.height);Gu.Sz=oc,Gu.lineCount=Gs.lineCount,Gu.lines=[Gs.Cb,Gs.Ih,Gs.df,Gs.Le,Gs.Qc,Gs.Qb,Gs.ze],Gu.actualBounds=sc,Gu.measuredBounds=Bp,Gu.naturalBounds=Zy,Ih===0?Cd.assign(sc):Cd.ed(sc),At.free(rh),At.free(zh),Ee.free(Xc),Ii.free(iu)}Cl.graduatedBounds!==null&&Cl.graduatedBounds.push(Cd),Pr(Z0,Cd.x,Cd.y,Cd.width,Cd.height)}Xo(Wo,!1)}}},Wg.prototype.arrange=function(a,y,x){if(a.graduatedBounds!==null){var E=a.Pb(),b=a.graduatedMarks;if(b!==null){var z=a.graduatedBounds,tt=0,rt=z[tt];tt++,E!==null&&E.arrange(rt.x-x.x,rt.y-x.y,rt.width,rt.height);for(var ot=y.length,st=0;st<ot;st++){var ut=y[st];rt=b[st],ut.visible&&ut!==E&&rt.length!==0&&(rt=z[tt],tt++,ut.arrange(rt.x-x.x,rt.y-x.y,rt.width,rt.height))}a.graduatedBounds=null}}},Wg.prototype.gc=function(a,y,x){var E=x.$i;x.$i=!0;var b=a.naturalBounds,z=b.width,tt=b.height;b=y instanceof Ts,y.save(),y.beginPath(),y.rect(-1,-1,z+1,tt+1),y.clip(),y.Se(),z=a.Pb(),z.gc(y,x),tt=a.Df()*x.scale,0>=tt&&(tt=1);for(var rt=z.actualBounds,ot=a.O.s,st=a.graduatedMarks,ut=ot.length,ft=0;ft<ut;ft++){var mt=ot[ft],yt=st[ft],wt=yt.length;if(mt.visible&&mt!==z&&yt.length!==0){if(mt instanceof lr){if(!(2>a.graduatedTickUnit*mt.interval*z.geometry.flattenedTotalLength/a.graduatedRange*tt&&mt.graduatedSkip===null)){var bt=mt.measuredBounds,Zt=mt.strokeWidth*mt.scale,It=mt.alignmentFocus;It.Mc()&&(It=Ir);for(var Yt=0;Yt<wt;Yt++){var Jt=yt[Yt].$l,qt=yt[Yt].angle,ae=It,Ce=mt.Ab;Ce.reset(),Ce.translate(Jt.x+rt.x,Jt.y+rt.y),Ce.rotate(qt+mt.angle,0,0),Ce.translate(-bt.width*ae.x+ae.offsetX+Zt/2,-bt.height*ae.y+ae.offsetY+Zt/2),Ce.scale(mt.scale,mt.scale),vl(mt,!1),mt.wh.set(mt.Ab),mt.Kk=mt.scale,il(mt,!1),mt.gc(y,x),b&&(a.svg.appendChild(mt.svg),mt.svg=null),mt.Ab.reset()}}}else if(mt instanceof io)for(a.temporaryTextBlock===null&&(a.temporaryTextBlock=new io),bt=a.temporaryTextBlock,y1(bt,mt),Zt=0;Zt<wt;Zt++)It=yt[Zt],It.actualBounds&&It.measuredBounds&&It.naturalBounds&&(bt.ec=It.text||"",bt.Kb=It.Sz||0,bt.Gc=It.lineCount||0,Yt=It.lines,Yt!==void 0&&(bt.Cb=Yt[0],bt.Ih=Yt[1],bt.df=Yt[2],bt.Le=Yt[3],bt.Qc=Yt[4],bt.Qb=Yt[5],bt.ze=Yt[6]),It.naturalBounds&&(bt.dc=It.naturalBounds),It.actualBounds&&(Yt=It.actualBounds,bt.arrange(Yt.x,Yt.y,Yt.width,Yt.height)),Yt=It.actualBounds,bt.arrange(Yt.x,Yt.y,Yt.width,Yt.height),Jt=It.measuredBounds,It=It.naturalBounds,qt=bt.Ab,qt.reset(),qt.translate(Yt.x+rt.x,Yt.y+rt.y),qt.translate(-Jt.x,-Jt.y),bt.no(qt,It.x,It.y,It.width,It.height),vl(bt,!1),bt.wh.set(bt.Ab),bt.Kk=bt.scale,il(bt,!1),bt.Ng=mt.part,bt.Me=mt.panel,bt.gc(y,x),bt.Me=null,bt.Ng=null,b&&(a.svg.appendChild(bt.svg),bt.svg=null))}}x.$i=E,y.restore(),y.Vc(!0)};function mn(a,y){if(he.call(this),this.na=null,a===void 0)this.na=mn.Position;else if(typeof a=="string"){var x=Bl.I(a);x!==null&&(this.na=x)}else a instanceof Qo?this.na=a:a&&(this.na=mn.Position,y=a);this.na===null&&Gt("Panel type not specified or PanelLayout not loaded: "+a),this.l=this.l|4194304|(this.na===mn.Grid?1048576:0),this.O=new Xe,this.yb=$o,this.Tm=Bo,this.Uf=tr,this.$g=null,this.$e="",this.jg=new Ee(NaN,NaN,NaN,NaN),this.T=this.F=null,this.xo=fi,this.jn=ur,this.kn=Nn,this.ub=this.ra=null,this.zn=NaN,this.ge=this.Hh=null,y&&Object.assign(this,y)}we(mn,he),mn.prototype.cloneProtected=function(a){he.prototype.cloneProtected.call(this,a),a.na=this.na,a.yb=this.yb.J(),a.Tm=this.Tm.J(),a.Uf=this.Uf,a.$e=this.$e,a.jg.assign(this.jg),this.T!==null&&(a.T=this.T.copy(a)),a.xo=this.xo,a.jn=this.jn.J(),a.kn=this.kn.J(),this.ra!==null&&(a.ra=this.ra.copy()),a.ub=this.ub,a.zn=this.zn,a.Hh=this.Hh},mn.prototype.Af=function(a){he.prototype.Af.call(this,a),a.O=this.O;for(var y=a.O.s,x=y.length,E=0;E<x;E++)y[E].Me=a;a.$g=null},mn.prototype.copy=function(){var a=he.prototype.copy.call(this);if(a!==null){for(var y=this.O.s,x=y.length,E=0;E<x;E++){var b=y[E].copy();b.wi(a),b.Ng=null;var z=a.O,tt=z.count;if(z.Gb(tt,b),z=a.part,z!==null){z.Rh=null,b.portId!==null&&z instanceof Un&&(z.Te=!0);var rt=a.diagram;rt!==null&&rt.undoManager.isUndoingRedoing||z.cb(Po,"elements",a,null,b,null,tt)}}return a}return null},Pt=mn.prototype,Pt.toString=function(){return"Panel("+this.type.name+")#"+fr(this)},Pt.Pn=function(a){he.prototype.Pn.call(this,a);for(var y=this.O.s,x=y.length,E=0;E<x;E++)y[E].Pn(a)},Pt.hh=function(a,y){if(this.na===mn.Grid)a.yc(),this.na.gc(this,a,y);else if(this.na===mn.Graduated)a.yc(),this.na.gc(this,a,y);else{if(this.na===mn.Table)if(a.yc(),a instanceof Ts){var x=a.yd;a.yd=lm(a,"gojs-ts"),gv(this,a),a.nh.pop(),a.yd=x}else gv(this,a);(x=this.isClipping&&this.na===mn.Spot)&&a.save();for(var E=this.Pb(),b=this.O.s,z=b.length,tt=0;tt<z;tt++){var rt=b[tt];x&&rt===E&&(a.clipInsteadOfFill=!0),rt.gc(a,y),x&&rt===E&&(a.clipInsteadOfFill=!1)}x&&(a.restore(),a.Vc(!0))}};function gv(a,y){y.lineCap="butt";var x=0<a.rowCount?a.rowDefs:null,E=0<a.columnCount?a.colDefs:null;x!==null&&Pm(a,y,!0,x,!0),E!==null&&Pm(a,y,!1,E,!0),x!==null&&r1(a,y,!0,x),E!==null&&r1(a,y,!1,E),x!==null&&Pm(a,y,!0,x,!1),E!==null&&Pm(a,y,!1,E,!1)}function r1(a,y,x,E){for(var b=E.length,z=a.actualBounds,tt=a.naturalBounds,rt=!0,ot=0;ot<b;ot++){var st=E[ot];if(st!==void 0&&st.actual!==0)if(rt)rt=!1;else{if(x){if(st.position>tt.height)continue}else if(st.position>tt.width)continue;var ut=st.separatorStrokeWidth;isNaN(ut)&&(ut=x?a.defaultRowSeparatorStrokeWidth:a.defaultColumnSeparatorStrokeWidth);var ft=st.separatorStroke;if(ft===null&&(ft=x?a.defaultRowSeparatorStroke:a.defaultColumnSeparatorStroke),ut!==0&&ft!==null){Mo(a,y,ft,!1,!1,tt,z),ft=!1;var mt=st.separatorDashArray;mt===null&&(mt=x?a.defaultRowSeparatorDashArray:a.defaultColumnSeparatorDashArray),mt!==null&&(ft=!0,y.js(mt,0)),y.beginPath(),mt=st.position+ut,x?mt>tt.height&&(ut-=mt-tt.height):mt>tt.width&&(ut-=mt-tt.width),st=st.position+ut/2,y.lineWidth=ut,ut=a.yb,x?(st+=ut.top,mt=tt.width-ut.right,y.moveTo(ut.left,st),y.lineTo(mt,st)):(st+=ut.left,mt=tt.height-ut.bottom,y.moveTo(st,ut.top),y.lineTo(st,mt)),y.stroke(),y.Se(),ft&&y.fs()}}}}function Pm(a,y,x,E,b){for(var z=E.length,tt=a.actualBounds,rt=a.naturalBounds,ot=o1(a,!0),st=o1(a,!1),ut=0;ut<z;ut++){var ft=E[ut];if(ft!==void 0&&ft.background!==null&&ft.coversSeparators!==b&&ft.actual!==0){var mt=x?tt.height:tt.width;if(!(ft.position>mt)){var yt=ft.Wc(),wt=ft.separatorStrokeWidth;isNaN(wt)&&(wt=x?a.defaultRowSeparatorStrokeWidth:a.defaultColumnSeparatorStrokeWidth);var bt=ft.separatorStroke;bt===null&&(bt=x?a.defaultRowSeparatorStroke:a.defaultColumnSeparatorStroke),(bt===null||ft.index===(x?ot:st))&&(wt=0),yt-=wt,wt=ft.position+wt,yt+=ft.actual,wt+yt>mt&&(yt=mt-wt),0>=yt||(mt=a.yb,Mo(a,y,ft.background,!0,!1,rt,tt),x?y.fillRect(mt.left,wt+mt.top,tt.width-(mt.left+mt.right),yt):y.fillRect(wt+mt.left,mt.top,yt,tt.height-(mt.top+mt.bottom)))}}}}function o1(a,y){for(var x=y?a.rowCount:a.columnCount,E=0;E<x;E++){var b=y?a.rowDefs[E]:a.colDefs[E];if(b!==void 0)return b.index}return 0}function pv(a){return a==="LineV"||a==="BarV"}Pt.lv=function(){for(var a=this.O.s,y=a.length,x=0;x<y;x++)a[x].lv();this.Uc=!0},Pt.kk=function(a,y,x){if(!he.prototype.kk.call(this,a,y,x))return!1;if(this.type===mn.Table)x=this.svg.getElementsByClassName("gojs-ts"),x=x.length!==0?x[0]:null,x!==null&&(x.innerHTML=""),a.yd=x,gv(this,a),a.yd=null;else if(this.na===mn.Grid||this.na===mn.Graduated)return this.svg.innerHTML="",this.svg.remove(),!1;x=this.O.s;for(var E=x.length,b=0;b<E;b++)x[b].gc(a,y);return!0},Pt.nk=function(){return!0},Pt.$o=function(a,y,x,E){if(!this.isClipping)if(this.Dd()&&a.bk!==null){a=a.bk,y=this.O.s;for(var b=0,z=0,tt=0;tt<y.length;tt++)if(y[tt].Ed()){var rt=y[tt].actualBounds;b=tt===0?rt.x:Math.min(rt.x,b),z=tt===0?rt.y:Math.min(rt.y,z)}E.setAttributeNS(null,"clip-path","path('M "+(a.x-x.x-b)+","+(a.y-x.y-z)+" l "+a.width+" 0 l 0 "+a.height+" l -"+a.width+" 0 z')")}else he.prototype.$o.call(this,a,y,x,E)},Pt.Sj=function(a,y,x,E,b){var z=this.se(),tt=this.transform,rt=1/(tt.m11*tt.m22-tt.m12*tt.m21),ot=tt.m22*rt,st=-tt.m12*rt,ut=-tt.m21*rt,ft=tt.m11*rt,mt=rt*(tt.m21*tt.dy-tt.m22*tt.dx),yt=rt*(tt.m12*tt.dx-tt.m11*tt.dy);if(this.areaBackground!==null)return tt=this.actualBounds,ue.Ff(tt.left,tt.top,tt.right,tt.bottom,a,y,x,E,b);if(this.background!==null)return z=a*ot+y*ut+mt,rt=a*st+y*ft+yt,a=x*ot+E*ut+mt,ot=x*st+E*ft+yt,b.h(0,0),x=this.naturalBounds,z=ue.Ff(0,0,x.width,x.height,z,rt,a,ot,b),b.transform(tt),z;z||(ot=1,ut=st=0,ft=1,yt=mt=0),rt=a*ot+y*ut+mt,a=a*st+y*ft+yt,ot=x*ot+E*ut+mt,x=x*st+E*ft+yt,b.h(ot,x),E=(ot-rt)*(ot-rt)+(x-a)*(x-a),st=!1,ft=this.O.s,yt=ft.length,ut=At.alloc(),mt=null,y=1/0;var wt=null,bt=this.isClipping&&this.na===mn.Spot;bt&&(wt=At.alloc(),mt=this.Pb(),(st=mt.Sj(rt,a,ot,x,wt))&&(y=(rt-wt.x)*(rt-wt.x)+(a-wt.y)*(a-wt.y)));for(var Zt=0;Zt<yt;Zt++){var It=ft[Zt];It.visible&&It!==mt&&It.Sj(rt,a,ot,x,ut)&&(st=!0,It=(rt-ut.x)*(rt-ut.x)+(a-ut.y)*(a-ut.y),It<E&&(E=It,b.set(ut)))}return bt&&(y>E&&b.set(wt),At.free(wt)),At.free(ut),z&&b.transform(tt),st},Pt.Gj=function(){for(var a=this.O.s,y=a.length,x=0;x<y;x++)a[x].Gj();he.prototype.Gj.call(this)},Pt.v=function(a){if(!Vs(this)){he.prototype.v.call(this,a),a=null,(this.na===mn.Auto||this.na===mn.Link)&&(a=this.Pb());for(var y=this.O.s,x=y.length,E=0;E<x;E++){var b=y[E];if((b===a||b.isPanelMain)&&b.v(!0),!b.desiredSize.w()){var z=ms(b,!1);(b instanceof rs||b instanceof mn||b instanceof io||z!==nn)&&b.v(!0)}}}},Pt.Uj=function(){if(!Vs(this)){Xo(this,!0),bu(this,!0);for(var a=this.O.s,y=a.length,x=0;x<y;x++)a[x].Uj()}},Pt.Uk=function(){if(!(this.l&2048)){vl(this,!0),il(this,!0);for(var a=this.O.s,y=a.length,x=0;x<y;x++)a[x].Wu()}},Pt.Wu=function(){il(this,!0);for(var a=this.O.s,y=a.length,x=0;x<y;x++)a[x].Wu()},Pt.Wl=function(a,y,x,E){var b=this.jg;b.h(0,0,0,0);var z=this.desiredSize,tt=this.minSize;x===void 0&&(x=tt.width,E=tt.height),x=Math.max(x,tt.width),E=Math.max(E,tt.height);var rt=this.maxSize;isNaN(z.width)||(a=Math.min(z.width,rt.width)),isNaN(z.height)||(y=Math.min(z.height,rt.height)),a=Math.max(x,a),y=Math.max(E,y);var ot=this.yb;a=Math.max(a-ot.left-ot.right,0),y=Math.max(y-ot.top-ot.bottom,0);var st=this.O.s;st.length!==0&&this.na.measure(this,a,y,st,b,x,E),a=b.width+ot.left+ot.right,ot=b.height+ot.top+ot.bottom,isFinite(z.width)&&(a=z.width),isFinite(z.height)&&(ot=z.height),a=Math.min(rt.width,a),ot=Math.min(rt.height,ot),a=Math.max(tt.width,a),ot=Math.max(tt.height,ot),a=Math.max(x,a),ot=Math.max(E,ot),Fr(b,a,ot),Fr(this.naturalBounds,a,ot),this.Ge(0,0,a,ot)},Pt.Pb=function(){if(this.$g===null){var a=this.O.s,y=a.length;if(y===0)return null;for(var x=0;x<y;x++){var E=a[x];if(E.isPanelMain===!0)return this.$g=E}this.$g=a[0]}return this.$g};function _u(a){return a.part!==null?a.part.locationObject:null}Pt.eh=function(a,y,x,E){var b=this.O.s;if(this.actualBounds.h(a,y,x,E),b.length!==0){if(!this.desiredSize.w()){a=ms(this,!0);var z=this.measuredBounds;y=z.width,z=z.height;var tt=this.Kg,rt=tt.left+tt.right;switch(tt=tt.top+tt.bottom,y===x&&z===E&&(a=nn),a){case nn:(y>x||z>E)&&(this.v(),this.measure(y>x?x:y,z>E?E:z,0,0));break;case cn:this.v(!0),this.measure(x+rt,E+tt,0,0);break;case wi:this.v(!0),this.measure(x+rt,z+tt,0,0);break;case Ti:this.v(!0),this.measure(y+rt,E+tt,0,0)}}this.na.arrange(this,b,this.jg)}},Pt.gh=function(a){var y=this.naturalBounds,x=_u(this);if(oo(0,0,y.width,y.height,a.x,a.y)){y=this.O.s;for(var E=y.length,b=At.allocAt(0,0);E--;){var z=y[E];if((z.visible||z===x)&&(Ln(b.set(a),z.transform),z.ca(b)))return At.free(b),!0}return At.free(b),!(this.Ma===null&&this.areaBackground===null)}return!1},Pt.ks=function(a){if(this.bindingId===a)return this;for(var y=this.O.s,x=y.length,E=0;E<x;E++){var b=y[E].ks(a);if(b!==null)return b}return null},Pt.qm=function(a,y){if(y(this,a),a instanceof mn){a=a.O.s;for(var x=a.length,E=0;E<x;E++)this.qm(a[E],y)}};function Yd(a,y){a1(a,a,y)}function a1(a,y,x){x(y),y=y.O.s;for(var E=y.length,b=0;b<E;b++){var z=y[b];z instanceof mn&&a1(a,z,x)}}function vx(a,y){s1(a,a,y)}function s1(a,y,x){if(x(y),y instanceof mn){y=y.O.s;for(var E=y.length,b=0;b<E;b++)s1(a,y[b],x)}}Pt.Nl=function(a){return l1(this,this,a)};function l1(a,y,x){if(x(y))return y;if(y instanceof mn){y=y.O.s;for(var E=y.length,b=0;b<E;b++){var z=l1(a,y[b],x);if(z!==null)return z}}return null}Pt.fb=function(a){if(this.name===a)return this;var y=this.O.s,x=y.length;this.Hh===null&&this.itemTemplateMap===null||(x=Vg(this));for(var E=0;E<x;E++){var b=y[E];if(b instanceof mn){var z=b.fb(a);if(z!==null)return z}if(b.name===a)return b}return null};function u1(a){a=a.O.s;for(var y=a.length,x=0,E=0;E<y;E++){var b=a[E];b instanceof mn?x=Math.max(x,u1(b)):b instanceof lr&&(x=Math.max(x,b.ig/2*b.strokeMiterLimit*b.Df()))}return x}Pt.se=function(){return!(this.type===mn.TableRow||this.type===mn.TableColumn)};function wh(a){return a.type===mn.TableRow||a.type===mn.TableColumn}Pt.ic=function(a,y,x){if(this.pickable===!1||(y===void 0&&(y=null),x===void 0&&(x=null),ns(this)))return null;var E=this.naturalBounds,b=1/this.Df(),z=this.se(),tt=z?a:Ln(At.allocAt(a.x,a.y),this.transform),rt=this.diagram,ot=10,st=5;if(rt!==null&&(ot=rt.Ql("extraTouchArea"),st=ot/2),oo(-(st*b),-(st*b),E.width+ot*b,E.height+ot*b,tt.x,tt.y)){if(!this.isAtomic){b=this.O.s;var ut=b.length;if(rt=At.alloc(),st=(ot=this.isClipping&&this.na===mn.Spot)?this.Pb():null,ot&&(st.se()?Ln(rt.set(a),st.transform):rt.set(a),!st.ca(rt)))return At.free(rt),z||At.free(tt),null;for(var ft=_u(this);ut--;){var mt=b[ut];if((mt.visible||mt===ft)&&(mt.se()?Ln(rt.set(a),mt.transform):rt.set(a),!ot||mt!==st)){var yt=null;if(mt instanceof mn?yt=mt.ic(rt,y,x):mt.pickable===!0&&mt.ca(rt)&&(yt=mt),yt!==null&&(y!==null&&(yt=y(yt)),yt!==null&&(x===null||x(yt))))return At.free(rt),z||At.free(tt),yt}}At.free(rt)}return this.background===null&&this.areaBackground===null?(z||At.free(tt),null):(a=oo(0,0,E.width,E.height,tt.x,tt.y)?this:null,z||At.free(tt),a)}return z||At.free(tt),null},Pt.ji=function(a,y,x,E){if(this.pickable===!1)return!1;y===void 0&&(y=null),x===void 0&&(x=null);var b=this.naturalBounds,z=this.se(),tt=z?a:Ln(At.allocAt(a.x,a.y),this.transform);if(b=oo(0,0,b.width,b.height,tt.x,tt.y),wh(this)||b){if(!this.isAtomic){for(var rt=this.O.s,ot=rt.length,st=At.alloc(),ut=_u(this);ot--;){var ft=rt[ot];if(ft.visible||ft===ut){ft.se()?Ln(st.set(a),ft.transform):st.set(a);var mt=ft;ft=ft instanceof mn?ft:null,(ft!==null?ft.ji(st,y,x,E):mt.ca(st))&&mt.pickable!==!1&&(y!==null&&(mt=y(mt)),mt===null||x!==null&&!x(mt)||E.add(mt))}}At.free(st)}return z||At.free(tt),b&&(this.background!==null||this.areaBackground!==null)}return z||At.free(tt),!1},Pt.Cf=function(a,y,x,E,b,z){if(this.pickable===!1)return!1;y===void 0&&(y=null),x===void 0&&(x=null);var tt=z;if(z===void 0&&(tt=Ii.alloc(),tt.reset()),tt.multiply(this.transform),this.fh(a,tt))return mv(this,y,x,b),z===void 0&&Ii.free(tt),!0;if(this.Yc(a,tt)){if(!this.isAtomic)for(var rt=_u(this),ot=this.O.s,st=ot.length;st--;){var ut=ot[st];if(ut.visible||ut===rt){var ft=ut.actualBounds,mt=this.naturalBounds;ft.x>mt.width||ft.y>mt.height||0>ft.x+ft.width||0>ft.y+ft.height||(ft=ut,ut=ut instanceof mn?ut:null,mt=Ii.alloc(),mt.set(tt),(ut!==null?ut.Cf(a,y,x,E,b,mt):oa(ft,a,E,mt))&&(y!==null&&(ft=y(ft)),ft===null||x!==null&&!x(ft)||b.add(ft)),Ii.free(mt))}}return z===void 0&&Ii.free(tt),E}return z===void 0&&Ii.free(tt),!1};function mv(a,y,x,E){for(var b=a.O.s,z=b.length;z--;){var tt=b[z];if(tt.visible){var rt=tt.actualBounds,ot=a.naturalBounds;rt.x>ot.width||rt.y>ot.height||0>rt.x+rt.width||0>rt.y+rt.height||(tt instanceof mn&&mv(tt,y,x,E),y!==null&&(tt=y(tt)),tt===null||x!==null&&!x(tt)||E.add(tt))}}}Pt.og=function(a,y,x,E,b,z){if(this.pickable===!1)return!1;x===void 0&&(x=null),E===void 0&&(E=null);var tt=this.naturalBounds,rt=this.se(),ot=rt?a:Ln(At.allocAt(a.x,a.y),this.transform),st=rt?y:Ln(At.allocAt(y.x,y.y),this.transform),ut=ot.Bf(st),ft=0<ot.x&&ot.x<tt.width&&0<ot.y&&ot.y<tt.height||Zn(ot.x,ot.y,0,0,0,tt.height)<=ut||Zn(ot.x,ot.y,0,tt.height,tt.width,tt.height)<=ut||Zn(ot.x,ot.y,tt.width,tt.height,tt.width,0)<=ut||Zn(ot.x,ot.y,tt.width,0,0,0)<=ut;if(tt=ot.zd(0,0)<=ut&&ot.zd(0,tt.height)<=ut&&ot.zd(tt.width,0)<=ut&&ot.zd(tt.width,tt.height)<=ut,rt||(At.free(ot),At.free(st)),ft){if(!this.isAtomic){ot=At.alloc(),st=At.alloc(),ut=_u(this);for(var mt=this.O.s,yt=mt.length;yt--;){var wt=mt[yt];if(wt.visible||wt===ut){var bt=wt.actualBounds,Zt=this.naturalBounds;(!rt||!(bt.x>Zt.width||bt.y>Zt.height||0>bt.x+bt.width||0>bt.y+bt.height))&&(wt.se()?(bt=wt.transform,Ln(ot.set(a),bt),Ln(st.set(y),bt)):(ot.set(a),st.set(y)),bt=wt,wt=wt instanceof mn?wt:null,(wt!==null?wt.og(ot,st,x,E,b,z):bt.tx(ot,st,b))&&(x!==null&&(bt=x(bt)),bt===null||E!==null&&!E(bt)||z.add(bt)))}}At.free(ot),At.free(st)}return b?ft:tt}return!1};function vv(a){var y=null;return a instanceof lr&&(y=a.spot1,y===Bo&&(y=null),a=a.geometry,a!==null&&y===null&&(y=a.spot1)),y===null&&(y=Sr),y}function yv(a){var y=null;return a instanceof lr&&(y=a.spot2,y===Bo&&(y=null),a=a.geometry,a!==null&&y===null&&(y=a.spot2)),y===null&&(y=Hr),y}Pt.add=function(a){for(var y=[],x=0;x<arguments.length;++x)y[x]=arguments[x];for(x=0;x<y.length;x++)this.Gb(this.O.count,y[x]);return this},Pt.M=function(a){return this.O.M(a)},Pt.Gb=function(a,y){y instanceof Li&&Gt("Cannot add a Part to a Panel: "+y+"; use a Panel instead"),(this===y||this.rg(y))&&(this===y&&Gt("Cannot make a Panel contain itself: "+this.toString()),Gt("Cannot make a Panel indirectly contain itself: "+this.toString()+" already contains "+y.toString()));var x=y.panel;if(x!==null&&x!==this&&Gt("Cannot add a GraphObject that already belongs to another Panel to this Panel: "+y.toString()+", already contained by "+x.toString()+", cannot be shared by this Panel: "+this.toString()),this.na!==mn.Grid||y instanceof lr||Gt("Can only add Shapes to a Grid Panel, not: "+y),this.na!==mn.Graduated||y instanceof lr||y instanceof io||Gt("Can only add Shapes or TextBlocks to a Graduated Panel, not: "+y),y.wi(this),y.Ng=null,this.itemArray!==null){var E=y.data;E!==null&&typeof E=="object"&&(this.ge===null&&(this.ge=new Me),this.ge.add(E,y))}var b=this.O;if(E=-1,x===this){for(var z=-1,tt=this.O.s,rt=tt.length,ot=0;ot<rt;ot++)if(tt[ot]===y){z=ot;break}if(z!==-1){if(z===a||z+1>=b.count&&a>=b.count)return;b.mb(z),E=z}else Gt("element "+y.toString()+" has panel "+x.toString()+" but is not contained by it.")}(0>a||a>b.count)&&(a=b.count),b.Gb(a,y),(a===0||y.isPanelMain)&&(this.$g=null),Vs(this)||this.v(),y.v(!1),y.portId!==null?this.Te=!0:y instanceof mn&&y.Te===!0&&(this.Te=!0),this.graduatedIntervals=null,this.If()||Em(this,y,!1),x=this.part,x!==null&&(x.Rh=null,x.ag=NaN,this.Te&&x instanceof Un&&(x.Te=!0),x.Te&&x instanceof Un&&(x.wc=null),b=this.diagram,b!==null&&b.undoManager.isUndoingRedoing||(E!==-1&&x.cb(Eo,"elements",this,y,null,E,null),x.cb(Po,"elements",this,null,y,null,a)))};function Sv(a,y){a.l=y?a.l|16777216:a.l&-16777217}Pt.remove=function(a){for(var y=this.O.s,x=y.length,E=-1,b=0;b<x;b++)if(y[b]===a){E=b;break}E!==-1&&this.pc(E,!0)},Pt.mb=function(a){0<=a&&this.pc(a,!0)},Pt.pc=function(a,y){var x=this.O,E=x.M(a);if(E.Ng=null,E.wi(null),this.ge!==null){var b=E.data;typeof b=="object"&&this.ge.remove(b)}x.mb(a),Xo(this,!1),this.v(),this.$g===E&&(this.$g=null),this.graduatedIntervals=null;var z=this.part;z!==null&&(z.Rh=null,z.ag=NaN,z.Wb(),z instanceof Un&&(E instanceof mn?E.qm(E,function(tt,rt){Kv(z,rt,y)}):Kv(z,E,y)),x=this.diagram,x!==null&&x.undoManager.isUndoingRedoing||z.cb(Eo,"elements",this,E,null,a,null))},Pt.Fb=function(a){0>a&&Mn(a,">= 0",mn,"getRowDefinition:idx"),a=Math.round(a);var y=this.rowDefs;if(y[a]===void 0){var x=new Jo;x.wi(this),x.isRow=!0,x.index=a,y[a]=x,this.cb(Po,"rowdefs",this,null,x,null,a)}return y[a]},Pt.oA=function(a){if(0>a&&Mn(a,">= 0",mn,"removeRowDefinition:idx"),this.rowCount!==0){a=Math.round(a);var y=this.rowDefs,x=y[a];if(x){y[a]=void 0;for(var E=y.length-1;0<=E&&y[E--]===void 0;)y.length--;this.cb(Eo,"rowdefs",this,x,null,a,null),this.v()}}};function h1(a,y,x){var E=a.rowDefs;if(!(0>y)){if(E[y]=x instanceof Jo?x:void 0,!x)for(y=E.length-1;0<=y&&E[y--]===void 0;)E.length--;a.v()}}Pt.Eb=function(a){0>a&&Mn(a,">= 0",mn,"getColumnDefinition:idx"),a=Math.round(a);var y=this.colDefs;if(y[a]===void 0){var x=new Jo;x.wi(this),x.isRow=!1,x.index=a,y[a]=x,this.cb(Po,"coldefs",this,null,x,null,a)}return y[a]},Pt.jA=function(a){if(0>a&&Mn(a,">= 0",mn,"removeColumnDefinition:idx"),this.columnCount!==0){a=Math.round(a);var y=this.colDefs,x=y[a];if(x){y[a]=void 0;for(var E=y.length-1;0<=E&&y[E--]===void 0;)y.length--;this.cb(Eo,"coldefs",this,x,null,a,null),this.v()}}};function d1(a,y,x){var E=a.colDefs;if(!(0>y)){if(E[y]=x instanceof Jo?x:void 0,!x)for(y=E.length-1;0<=y&&E[y--]===void 0;)E.length--;a.v()}}Pt.Gy=function(a){var y=null;return a.isRow?y=this.Fb(a.index):a.isRow||(y=this.Eb(a.index)),y&&km(y,a),this},Pt.Hy=function(a,y){return(a=this.Fb(a))&&km(a,new Jo(y)),this},Pt.By=function(a,y){return(a=this.Eb(a))&&km(a,new Jo(y)),this},Pt.nz=function(a){if(0>a||this.type!==mn.Table||this.rowCount===0)return-1;for(var y=0,x=this.rowDefs,E=x.length,b=this.topIndex;b<E;b++){var z=x[b];if(z!==void 0&&(y+=z.total,a<y))break}return b},Pt.fz=function(a){if(0>a||this.type!==mn.Table||this.columnCount===0)return-1;for(var y=0,x=this.colDefs,E=x.length,b=this.leftIndex;b<E;b++){var z=x[b];if(z!==void 0&&(y+=z.total,a<y))break}return b},Pt.Fz=function(a,y){if(y===void 0&&(y=new At(NaN,NaN)),this.type!==mn.Graduated)return y.h(NaN,NaN),y;a=Math.min(Math.max(a,this.graduatedMin),this.graduatedMax);var x=this.Pb();return x.geometry.Pu((a-this.graduatedMin)/this.graduatedRange,y),x.transform.Ga(y)},Pt.Gz=function(a){if(this.type!==mn.Graduated)return NaN;var y=this.Pb();return y.transform.Cd(a),y.geometry.xx(a)*this.graduatedRange+this.graduatedMin};function c1(a){return a=a.allBindings,a!==null&&a._isFrozen}function Sl(a){var y=a.allBindings;if(y===null)a.data!==null&&Gt("Template cannot have .data be non-null: "+a),a.allBindings=y=new Xe;else if(y._isFrozen)return;var x=new Xe;Sv(a,!1),a.qm(a,function(st,ut){ut.th();var ft=ut.localBindings;if(ft!==null)for(Fc(ut,!1),ft=ft.iterator;ft.next();){var mt=ft.value;mt.mode===fp&&Fc(ut,!0);var yt=mt.sourceName;yt!==null&&(yt==="/"&&Sv(st,!0),yt=LS(mt,st,ut),yt!==null&&(x.add(yt),yt.srcBindings===null&&(yt.srcBindings=new Xe),yt.srcBindings.add(mt))),y.add(mt)}if(ut instanceof mn&&ut.type===mn.Table){if(0<ut.rowCount){for(st=ut.rowDefs,ft=st.length,mt=0;mt<ft;mt++)if(yt=st[mt],yt!==void 0&&yt.be!==null)for(var wt=yt.be.iterator;wt.next();){var bt=wt.value;bt.xd=yt,bt.to=2,bt.wl=yt.index,y.add(bt)}}if(0<ut.columnCount){for(ut=ut.colDefs,st=ut.length,ft=0;ft<st;ft++)if(mt=ut[ft],mt!==void 0&&mt.be!==null)for(yt=mt.be.iterator;yt.next();)wt=yt.value,wt.xd=mt,wt.to=1,wt.wl=mt.index,y.add(wt)}}});for(var E=x.iterator;E.next();){var b=E.value;if(b.srcBindings!==null){Fc(b,!0);for(var z=b.srcBindings.iterator;z.next();){var tt=z.value;b.localBindings===null&&(b.localBindings=new Xe),b.localBindings.add(tt)}}b.srcBindings=null}for(E=y.iterator;E.next();)if(b=E.value,z=b.xd,z!==null){b.xd=null;var rt=b.targetProperty,ot=rt.indexOf(".");0<ot&&z instanceof mn&&(tt=rt.substring(0,ot),rt=rt.substr(ot+1),ot=z.fb(tt),ot!==null?(z=ot,b.targetProperty=rt):zn('Warning: unable to find GraphObject named "'+tt+'" for Binding: '+b.toString())),z instanceof Jo?(tt=fr(z.panel),b.Ai=tt===void 0?-1:tt,z.panel.bindingId=b.Ai):z instanceof he?(tt=fr(z),b.Ai=tt===void 0?-1:tt,z.bindingId=b.Ai):Gt("Unknown type of binding target: "+z)}y.freeze(),a instanceof Li&&a.Zc()&&a.Va()}Pt.Uy=function(a){a===void 0&&(a=!1);var y=this.copy();return vx(y,function(x){x instanceof mn&&(x.allBindings=null,x.ub=null);var E=x.localBindings;E!==null&&(x.localBindings=null,E.each(function(b){x.bind(b.copy())})),E=x.animationTriggers,E!==null&&(x.animationTriggers=null,E.each(function(b){x.Jv(b.value.copy())}))}),a&&Sl(y),y},Pt.La=function(a){var y=this.allBindings;if(y!==null)for(a===void 0&&(a=""),y=y.iterator;y.next();){var x=y.value,E=x.sourceProperty;if((a===""||E===""||E===a)&&(E=x.targetProperty,x.converter!==null||E!=="")){E=this.data;var b=x.sourceName;if(b!==null){if(b==="")E=this;else if(b==="/")E=this;else if(b===".")E=this;else if(b==="..")E=this;else if(E=this.fb(b),E===null)continue}else if(x.isToModel)if(E=this.diagram,E!==null)E=E.model.modelData;else continue;var z=this,tt=x.Ai;if(tt!==-1){if(z=this.ks(tt),z===null)continue}else x.xd!==null&&(z=x.xd);if(b==="/"?E=z.part:b==="."?E=z:b===".."&&(E=z.panel),b=x.to,b!==0){if(!(z instanceof mn))continue;b===1?z=z.Eb(x.wl):b===2&&(z=z.Fb(x.wl))}z!==void 0&&x.Mv(z,E)}}},Pt.sx=function(a){return a==null||this.ge===null?null:this.ge.I(a)};function yx(a,y){a=a.O.s;for(var x=a.length,E=y.length,b=0,z=null;b<x&&(z=a[b],!(z instanceof mn&&z.data!==null));)b++,z=a[b];if(x-b!==E)return!0;if(z===null)return 0<E;for(var tt=0;b<x&&tt<E;){if(z=a[b],!(z instanceof mn)||z.data!==y[tt])return!0;b++,tt++}return!1}function Vg(a){if(a.type===mn.Spot||a.type===mn.Auto)return Math.min(a.O.length,1);if(a.type===mn.Link){a=a.O;for(var y=a.length,x=0;x<y;x++){var E=a.M(x);if(!(E instanceof lr&&E.isPanelMain))break}return x}return a.type===mn.Table&&0<a.O.length&&(a=a.O.M(0),a.isPanelMain&&a instanceof mn&&wh(a))?1:0}Pt.mv=function(){for(var a=Vg(this);this.O.length>a;)this.pc(this.O.length-1,!1);f1(this,this.itemArray)};function f1(a,y){var x=Vg(a);if(y===null||y.length===0)for(;a.O.length>x;)a.pc(a.O.length-1,!1);else if(a.O.length<=x){x=y.length;for(var E=0;E<x;E++)Cm(a,y[E],E,!0)}else{E=x;for(var b=0;b<y.length;b++,E++){var z=y[b],tt=E<a.O.length?a.O.M(E):null;if(tt instanceof mn){if(tt.data!==z){var rt=wv(a,tt.data),ot=wv(a,z),st=ot!==rt;st||(rt=Pv(a,rt),st=Pv(a,ot)!==rt),st?(a.pc(E,!1),Cm(a,z,b,!1)):tt.data=z}}else Cm(a,z,b,!1)}for(;E<a.O.length;)a.pc(E,!1);a.$g=null,xv(a,x,0),Vs(a)||a.v(),a.graduatedIntervals=null,a.If()||Em(a,a,!1),y=a.part,y!==null&&(y.Rh=null,y.ag=NaN,a.Te&&y instanceof Un&&(y.Te=!0),y.Te&&y instanceof Un&&(y.wc=null))}}function Cm(a,y,x,E){if(!(y==null||0>x)){var b=wv(a,y);if(b=Pv(a,b),b!==null){if(Sl(b),b=b.copy(),b.l&16777216){var z=a.ih();z!==null&&Sv(z,!0)}typeof y=="object"&&(a.ge===null&&(a.ge=new Me),a.ge.add(y,b)),z=x+Vg(a),a.Gb(z,b),E&&(b.ub=y,xv(a,z,x),b.ub=null),b.data=y}}}function xv(a,y,x){for(a=a.O;y<a.length;){var E=a.M(y);if(E instanceof mn){var b=y,z=x;E.type===mn.TableRow?E.row=b:E.type===mn.TableColumn&&(E.column=b),E.itemIndex=z}y++,x++}}function wv(a,y){if(y===null)return"";if(a=a.itemCategoryProperty,typeof a=="function")a=a(y);else if(typeof a=="string"&&typeof y=="object"){if(a==="")return"";a=Io(y,a)}else return"";if(a===void 0)return"";if(typeof a=="string")return a;Gt("Panel.getCategoryForItemData found a non-string category for "+y+": "+a)}function Pv(a,y){var x=a.itemTemplateMap,E=null;return x!==null&&(E=x.I(y)),E===null&&(x!==null&&(E=x.I("")),E===null&&(g1||(g1=!0,zn('No item template Panel found for category "'+y+'" on '+a),zn(" Using default item template."),a=new mn,y=new io,y.bind(new Ko("text","",Ni)),a.add(y),p1=a),E=p1)),E}function Em(a,y,x){var E=y.enabledChanged;if(E!==null&&E(y,x),y instanceof mn){y=y.O.s,E=y.length;for(var b=0;b<E;b++){var z=y[b];x&&z instanceof mn&&!z.isEnabled||Em(a,z,x)}}}function pu(a,y){y.name=a,Bl.add(a,y)}ge.Object.defineProperties(mn.prototype,{type:{get:function(){return this.na},set:function(a){var y=this.na;y!==a&&(this.na=a,this.isAtomic=this.na===mn.Grid,this.v(),this.g("type",y,a))}},elements:{get:function(){return this.O.iterator}},naturalBounds:{get:function(){return this.dc}},padding:{get:function(){return this.yb},set:function(a){typeof a=="number"?(0>a&&Mn(a,">= 0",mn,"padding"),a=new Ji(a)):(0>a.left&&Mn(a.left,">= 0",mn,"padding:value.left"),0>a.right&&Mn(a.right,">= 0",mn,"padding:value.right"),0>a.top&&Mn(a.top,">= 0",mn,"padding:value.top"),0>a.bottom&&Mn(a.bottom,">= 0",mn,"padding:value.bottom"));var y=this.yb;y.D(a)||(this.yb=a=a.J(),this.v(),this.g("padding",y,a))}},defaultAlignment:{get:function(){return this.Tm},set:function(a){var y=this.Tm;y.D(a)||(this.Tm=a=a.J(),this.v(),this.g("defaultAlignment",y,a))}},defaultStretch:{get:function(){return this.Uf},set:function(a){var y=this.Uf;y!==a&&(this.Uf=a,this.v(),this.g("defaultStretch",y,a))}},defaultSeparatorPadding:{get:function(){return this.T!==null?this.T.Qp:$o},set:function(a){typeof a=="number"&&(a=new Ji(a));var y=this.defaultSeparatorPadding;y.D(a)||(a=a.J(),this.T===null&&(this.T=new al),this.T.Qp=a,this.v(),this.g("defaultSeparatorPadding",y,a))}},defaultRowSeparatorStroke:{get:function(){return this.T!==null?this.T.ia:null},set:function(a){var y=this.defaultRowSeparatorStroke;y!==a&&(a===null||typeof a=="string"||a instanceof Wr)&&(a instanceof Wr&&a.freeze(),this.T===null&&(this.T=new al),this.T.ia=a,this.N(),this.g("defaultRowSeparatorStroke",y,a))}},defaultRowSeparatorStrokeWidth:{get:function(){return this.T!==null?this.T.Ha:1},set:function(a){var y=this.defaultRowSeparatorStrokeWidth;y!==a&&isFinite(a)&&0<=a&&(this.T===null&&(this.T=new al),this.T.Ha=a,this.v(),this.g("defaultRowSeparatorStrokeWidth",y,a))}},defaultRowSeparatorDashArray:{get:function(){return this.T!==null?this.T.V:null},set:function(a){var y=this.defaultRowSeparatorDashArray;if(y!==a){if(a!==null){for(var x=a.length,E=0,b=0;b<x;b++){var z=a[b];typeof z=="number"&&0<=z&&isFinite(z)||Gt("defaultRowSeparatorDashArray value "+z+" at index "+b+" must be a positive number or zero."),E+=z}if(E===0){if(y===null)return;a=null}}this.T===null&&(this.T=new al),this.T.V=a,this.N(),this.g("defaultRowSeparatorDashArray",y,a)}}},defaultColumnSeparatorStroke:{get:function(){return this.T!==null?this.T.u:null},set:function(a){var y=this.defaultColumnSeparatorStroke;y!==a&&(a===null||typeof a=="string"||a instanceof Wr)&&(a instanceof Wr&&a.freeze(),this.T===null&&(this.T=new al),this.T.u=a,this.N(),this.g("defaultColumnSeparatorStroke",y,a))}},defaultColumnSeparatorStrokeWidth:{get:function(){return this.T!==null?this.T.F:1},set:function(a){var y=this.defaultColumnSeparatorStrokeWidth;y!==a&&isFinite(a)&&0<=a&&(this.T===null&&(this.T=new al),this.T.F=a,this.v(),this.g("defaultColumnSeparatorStrokeWidth",y,a))}},defaultColumnSeparatorDashArray:{get:function(){return this.T!==null?this.T.o:null},set:function(a){var y=this.defaultColumnSeparatorDashArray;if(y!==a){if(a!==null){for(var x=a.length,E=0,b=0;b<x;b++){var z=a[b];typeof z=="number"&&0<=z&&isFinite(z)||Gt("defaultColumnSeparatorDashArray value "+z+" at index "+b+" must be a positive number or zero."),E+=z}if(E===0){if(y===null)return;a=null}}this.T===null&&(this.T=new al),this.T.o=a,this.N(),this.g("defaultColumnSeparatorDashArray",y,a)}}},inRowsCols:{get:function(){return this.T!==null?this.T.nb:null},set:function(a){this.T===null&&(this.T=new al),this.T.nb=a}},viewboxStretch:{get:function(){return this.xo},set:function(a){var y=this.xo;y!==a&&(this.xo=a,this.v(),this.g("viewboxStretch",y,a))}},gridCellSize:{get:function(){return this.jn},set:function(a){var y=this.jn;if(!y.D(a)){a.w()&&a.width!==0&&a.height!==0||Gt("Invalid Panel.gridCellSize: "+a),this.jn=a.J();var x=this.diagram;x!==null&&this===x.grid&&cu(x),this.N(),this.g("gridCellSize",y,a)}}},gridOrigin:{get:function(){return this.kn},set:function(a){var y=this.kn;if(!y.D(a)){a.w()||Gt("Invalid Panel.gridOrigin: "+a),this.kn=a.J();var x=this.diagram;x!==null&&this===x.grid&&cu(x),this.N(),this.g("gridOrigin",y,a)}}},graduatedMin:{get:function(){return this.ra!==null?this.ra.lq:0},set:function(a){var y=this.graduatedMin;y!==a&&(this.ra===null&&(this.ra=new Qu),this.ra.lq=a,this.v(),this.g("graduatedMin",y,a),ka(this)&&(a=this.part,a!==null&&co(this,a,"graduatedRange")))}},graduatedMax:{get:function(){return this.ra!==null?this.ra.F:100},set:function(a){var y=this.graduatedMax;y!==a&&(this.ra===null&&(this.ra=new Qu),this.ra.F=a,this.v(),this.g("graduatedMax",y,a),ka(this)&&(a=this.part,a!==null&&co(this,a,"graduatedRange")))}},graduatedRange:{get:function(){return this.graduatedMax-this.graduatedMin}},graduatedTickUnit:{get:function(){return this.ra!==null?this.ra.ia:10},set:function(a){var y=this.graduatedTickUnit;y!==a&&0<a&&(this.ra===null&&(this.ra=new Qu),this.ra.ia=a,this.v(),this.g("graduatedTickUnit",y,a))}},graduatedTickBase:{get:function(){return this.ra!==null?this.ra.V:0},set:function(a){var y=this.graduatedTickBase;y!==a&&(this.ra===null&&(this.ra=new Qu),this.ra.V=a,this.v(),this.g("graduatedTickBase",y,a))}},graduatedMarks:{get:function(){return this.ra!==null?this.ra.u:null},set:function(a){this.ra!==null?this.ra.u=a:a!==null&&(this.ra=new Qu,this.ra.u=a)}},graduatedBounds:{get:function(){return this.ra!==null?this.ra.j:null},set:function(a){this.ra!==null?this.ra.j=a:a!==null&&(this.ra=new Qu,this.ra.j=a)}},graduatedIntervals:{get:function(){return this.ra!==null?this.ra.o:null},set:function(a){this.ra!==null?this.ra.o=a:a!==null&&(this.ra=new Qu,this.ra.o=a)}},temporaryTextBlock:{get:function(){return this.ra!==null?this.ra.Zh:null},set:function(a){this.ra!==null?this.ra.Zh=a:a!==null&&(this.ra=new Qu,this.ra.Zh=a)}},panelLayoutState:{get:function(){return this.F},set:function(a){this.F=a}},Te:{get:function(){return(this.l&8388608)!==0},set:function(a){(this.l&8388608)!==0!==a&&(this.l^=8388608)}},rowDefs:{get:function(){return this.T===null&&(this.T=new al),this.T.Pc}},rowCount:{get:function(){return this.T===null?0:this.rowDefs.length}},colDefs:{get:function(){return this.T===null&&(this.T=new al),this.T.Oc}},columnCount:{get:function(){return this.T===null?0:this.colDefs.length}},rowSizing:{get:function(){return this.T!==null?this.T.ob:bm},set:function(a){var y=this.rowSizing;y!==a&&(this.T===null&&(this.T=new al),this.T.ob=a,this.v(),this.g("rowSizing",y,a))}},columnSizing:{get:function(){return this.T!==null?this.T.j:bm},set:function(a){var y=this.columnSizing;y!==a&&(this.T===null&&(this.T=new al),this.T.j=a,this.v(),this.g("columnSizing",y,a))}},topIndex:{get:function(){return this.T!==null?this.T.Hb:0},set:function(a){var y=this.topIndex;y!==a&&((!isFinite(a)||0>a)&&Gt("Panel.topIndex must be greater than zero and a real number, not: "+a),this.T===null&&(this.T=new al),this.T.Hb=a,this.v(),this.g("topIndex",y,a))}},leftIndex:{get:function(){return this.T!==null?this.T.hb:0},set:function(a){var y=this.leftIndex;y!==a&&((!isFinite(a)||0>a)&&Gt("Panel.leftIndex must be greater than zero and a real number, not: "+a),this.T===null&&(this.T=new al),this.T.hb=a,this.v(),this.g("leftIndex",y,a))}},data:{get:function(){return this.ub},set:function(a){var y=this.ub;if(y!==a){var x=this instanceof Li&&!(this instanceof Rr);Sl(this),this.ub=a;var E=this.diagram;E!==null&&(x?(x=E.partManager,this instanceof En?(y!==null&&x.bf.remove(y),a!==null&&x.bf.add(a,this)):this instanceof Li&&(y!==null&&x.cf.remove(y),a!==null&&x.cf.add(a,this))):(x=this.panel,x!==null&&x.ge!==null&&(y!==null&&x.ge.remove(y),a!==null&&x.ge.add(a,this)))),this.g("data",y,a),E!==null&&E.undoManager.isUndoingRedoing||a!==null&&this.La()}}},itemIndex:{get:function(){return this.zn},set:function(a){var y=this.zn;y!==a&&(this.zn=a,this.g("itemIndex",y,a))}},allBindings:{get:function(){return this.A!==null?this.A.nb:null},set:function(a){this.localBindings!==a&&(this.A===null&&(this.A=new Ac),this.A.nb=a)}},itemArray:{get:function(){return this.Hh},set:function(a){var y=this.Hh;if(y!==a||a!==null&&yx(this,a)){var x=this.diagram;y!==a&&(x!==null&&y!==null&&ly(x.partManager,this,x),this.Hh=a,x!==null&&a!==null&&sy(x.partManager,this)),this.g("itemArray",y,a),x!==null&&x.undoManager.isUndoingRedoing||f1(this,a)}}},itemTemplate:{get:function(){return this.itemTemplateMap===null?null:this.itemTemplateMap.I("")},set:function(a){if(this.itemTemplateMap===null){if(a===null)return;this.itemTemplateMap=new Me}var y=this.itemTemplateMap.I("");y!==a&&((a instanceof Li||a.isPanelMain)&&Gt("Panel.itemTemplate must not be a Part or be Panel.isPanelMain: "+a),this.itemTemplateMap.add("",a),this.g("itemTemplate",y,a),a=this.diagram,a!==null&&a.undoManager.isUndoingRedoing||this.mv())}},itemTemplateMap:{get:function(){return this.A!==null?this.A.Pc:null},set:function(a){var y=this.itemTemplateMap;if(y!==a){for(var x=a.iterator;x.next(););cr(this),this.A.Pc=a,this.g("itemTemplateMap",y,a),a=this.diagram,a!==null&&a.undoManager.isUndoingRedoing||this.mv()}}},itemCategoryProperty:{get:function(){return this.A!==null?this.A.Oc:"category"},set:function(a){var y=this.itemCategoryProperty;y!==a&&(cr(this),this.A.Oc=a,this.g("itemCategoryProperty",y,a))}},isAtomic:{get:function(){return(this.l&1048576)!==0},set:function(a){var y=(this.l&1048576)!==0;y!==a&&(this.l^=1048576,this.g("isAtomic",y,a))}},isClipping:{get:function(){return(this.l&2097152)!==0},set:function(a){var y=(this.l&2097152)!==0;y!==a&&(this.l^=2097152,this instanceof $i&&(this.tb=null),this.v(),this.g("isClipping",y,a))}},isOpposite:{get:function(){return(this.l&33554432)!==0},set:function(a){var y=(this.l&33554432)!==0;y!==a&&(this.l^=33554432,this.v(),this.g("isOpposite",y,a))}},isEnabled:{get:function(){return(this.l&4194304)!==0},set:function(a){var y=(this.l&4194304)!==0;if(y!==a){var x=this.panel===null||this.panel.If();this.l^=4194304,this.g("isEnabled",y,a),y=this.diagram,y!==null&&y.undoManager.isUndoingRedoing||x&&Em(this,this,a)}}},alignmentFocusName:{get:function(){return this.$e},set:function(a){var y=this.$e;y!==a&&(this.$e=a,this.v(),this.g("alignmentFocusName",y,a))}}}),ge.Object.defineProperties(mn,{Position:{get:function(){return Bl.I("Position")}},Horizontal:{get:function(){return Bl.I("Horizontal")}},Vertical:{get:function(){return Bl.I("Vertical")}},Spot:{get:function(){return Bl.I("Spot")}},Auto:{get:function(){return Bl.I("Auto")}},Table:{get:function(){return Bl.I("Table")}},Viewbox:{get:function(){return Bl.I("Viewbox")}},TableRow:{get:function(){return Bl.I("TableRow")}},TableColumn:{get:function(){return Bl.I("TableColumn")}},Link:{get:function(){return Bl.I("Link")}},Grid:{get:function(){return Bl.I("Grid")}},Graduated:{get:function(){return Bl.I("Graduated")}}}),mn.prototype.rebuildItemElements=mn.prototype.mv,mn.prototype.findItemPanelForData=mn.prototype.sx,mn.prototype.updateTargetBindings=mn.prototype.La,mn.prototype.copyTemplate=mn.prototype.Uy,mn.prototype.graduatedValueForPoint=mn.prototype.Gz,mn.prototype.graduatedPointForValue=mn.prototype.Fz,mn.prototype.findColumnForLocalX=mn.prototype.fz,mn.prototype.findRowForLocalY=mn.prototype.nz,mn.prototype.addColumnDefinition=mn.prototype.By,mn.prototype.addRowDefinition=mn.prototype.Hy,mn.prototype.addRowColumnDefinition=mn.prototype.Gy,mn.prototype.removeColumnDefinition=mn.prototype.jA,mn.prototype.getColumnDefinition=mn.prototype.Eb,mn.prototype.removeRowDefinition=mn.prototype.oA,mn.prototype.getRowDefinition=mn.prototype.Fb,mn.prototype.removeAt=mn.prototype.mb,mn.prototype.remove=mn.prototype.remove,mn.prototype.insertAt=mn.prototype.Gb,mn.prototype.elt=mn.prototype.M,mn.prototype.add=mn.prototype.add,mn.prototype.findObject=mn.prototype.fb,mn.prototype.findInVisualTree=mn.prototype.Nl,mn.prototype.walkVisualTreeFrom=mn.prototype.qm,mn.prototype.findMainElement=mn.prototype.Pb;var g1=!1,p1=null,Bl=new Me;mn.className="Panel",mn.definePanelLayout=pu,pu("Position",new dm),pu("Vertical",new fm),pu("Auto",new pm),pu("Link",new wm);function Qu(){this.lq=0,this.F=100,this.ia=10,this.V=0,this.Zh=this.o=this.j=this.u=null}Qu.prototype.copy=function(){var a=new Qu;return a.lq=this.lq,a.F=this.F,a.ia=this.ia,a.V=this.V,a.u=this.u,a.j=this.j,a.o=this.o,a.Zh=this.Zh,a},Qu.className="GradPanelSettings";function al(){this.Pc=[],this.Oc=[],this.j=this.ob=bm,this.hb=this.Hb=0,this.Qp=$o,this.Ha=1,this.V=this.ia=null,this.F=1,this.nb=this.o=this.u=null}al.prototype.copy=function(a){for(var y=new al,x=this.Pc,E=x.length,b=y.Pc,z=0;z<E;z++)if(x[z]!==void 0){var tt=x[z].copy();tt.wi(a),b[z]=tt}for(x=this.Oc,E=x.length,b=y.Oc,z=0;z<E;z++)x[z]!==void 0&&(tt=x[z].copy(),tt.wi(a),b[z]=tt);return y.ob=this.ob,y.j=this.j,y.Hb=this.Hb,y.hb=this.hb,y.Qp=this.Qp.J(),y.Ha=this.Ha,y.ia=this.ia,y.V=this.V,y.F=this.F,y.u=this.u,y.o=this.o,y.nb=this.nb,y},al.className="TablePanelSettings";function Jo(a){xi(this),this.Me=null,this.uq=!0,this.Za=0,this.Hc=NaN,this.jj=0,this.hj=1/0,this.Jb=Bo,this.pa=this.oc=this.oa=0,this.be=null,this.oo=Cv,this.hg=tr,this.lo=this.dg=null,this.mo=NaN,this.Ma=this.tj=null,this.Pm=!1,a&&(Object.assign(this,a),a.column!==void 0?(this.isRow=!1,this.index=a.column):a.row!==void 0&&(this.isRow=!0,this.index=a.row))}Jo.prototype.copy=function(){var a=new Jo;return a.uq=this.uq,a.Za=this.Za,a.Hc=this.Hc,a.jj=this.jj,a.hj=this.hj,a.Jb=this.Jb,a.oa=this.oa,a.oc=this.oc,a.pa=this.pa,a.hg=this.hg,a.oo=this.oo,this.dg===null?a.dg=null:a.dg=this.dg.J(),a.lo=this.lo,a.mo=this.mo,a.tj=null,this.tj!==null&&(a.separatorDashArray=Sn(this.separatorDashArray)),a.Ma=this.Ma,a.Pm=this.Pm,a.be=this.be,a};function km(a,y){y.isRow?a.height=y.height:a.width=y.width,a.minimum=y.minimum,a.maximum=y.maximum,a.alignment=y.alignment,a.stretch=y.stretch,a.sizing=y.sizing,a.dg=y.separatorPadding===null?null:y.separatorPadding.J(),a.separatorStroke=y.separatorStroke,a.separatorStrokeWidth=y.separatorStrokeWidth,a.tj=null,y.separatorDashArray&&(a.tj=Sn(y.separatorDashArray)),a.background=y.background,a.coversSeparators=y.coversSeparators,a.be=y.be}Pt=Jo.prototype,Pt.qb=function(a){a.classType===Jo&&(this.sizing=a)},Pt.toString=function(){return"RowColumnDefinition "+(this.isRow?"(Row ":"(Column ")+this.index+") #"+fr(this)},Pt.wi=function(a){this.Me=a},Pt.Io=function(a){var y=0,x=this.Me;if(this.index!==a&&(a=this.separatorStroke,a===null&&x!==null&&(a=this.isRow?x.defaultRowSeparatorStroke:x.defaultColumnSeparatorStroke),a!==null&&(y=this.separatorStrokeWidth,isNaN(y)&&(x!==null?y=this.isRow?x.defaultRowSeparatorStrokeWidth:x.defaultColumnSeparatorStrokeWidth:y=0))),a=this.dg,a===null)if(x!==null)a=x.defaultSeparatorPadding;else return y;return y+(this.isRow?a.top:a.left)},Pt.Wc=function(){var a=0,y=this.Me,x=0,E=this.isRow;if(y!==null&&y.type===mn.Table)for(var b=E?y.rowDefs.length:y.colDefs.length,z=0;z<b;z++){var tt=E?y.rowDefs[z]:y.colDefs[z];if(tt!==void 0&&tt.oa!==0){x=tt.index;break}}if(this.index!==x&&(x=this.separatorStroke,x===null&&y!==null&&(x=E?y.defaultRowSeparatorStroke:y.defaultColumnSeparatorStroke),x!==null&&(a=this.separatorStrokeWidth,isNaN(a)&&(y!==null?a=E?y.defaultRowSeparatorStrokeWidth:y.defaultColumnSeparatorStrokeWidth:a=0))),E=this.dg,E===null)if(y!==null)E=y.defaultSeparatorPadding;else return a;return a+(this.isRow?E.top+E.bottom:E.left+E.right)},Pt.Ob=function(a,y,x){var E=this.Me;if(E!==null&&(E.cb(no,a,this,y,x,void 0,void 0),this.be!==null&&(y=E.diagram,y!==null&&!y.skipsModelSourceBindings&&(E=E.ih(),E!==null&&(y=E.data,y!==null)))))for(x=this.be.iterator;x.next();)x.value.sp(this,y,a,E)};function Lm(a){if(a.sizing===Cv){var y=a.Me;return a.isRow?y.rowSizing:y.columnSizing}return a.sizing}Pt.bind=function(a,y,x,E){var b=null;return typeof a=="string"?b=new Ko(a,y,x,E):b=a,b.xd=this,a=this.panel,a!==null&&(y=a.ih(),y!==null&&c1(y)&&Gt("Cannot add a Binding to a RowColumnDefinition that is already frozen: "+b+" on "+a)),this.be===null&&(this.be=new Xe),this.be.add(b),this},ge.Object.defineProperties(Jo.prototype,{panel:{get:function(){return this.Me}},isRow:{get:function(){return this.uq},set:function(a){this.uq=a}},index:{get:function(){return this.Za},set:function(a){this.Za=a}},height:{get:function(){return this.Hc},set:function(a){var y=this.Hc;y!==a&&(0>a&&Mn(a,">= 0",Jo,"height"),this.Hc=a,this.actual=this.oa,this.panel!==null&&this.panel.v(),this.Ob("height",y,a))}},width:{get:function(){return this.Hc},set:function(a){var y=this.Hc;y!==a&&(0>a&&Mn(a,">= 0",Jo,"width"),this.Hc=a,this.actual=this.oa,this.panel!==null&&this.panel.v(),this.Ob("width",y,a))}},minimum:{get:function(){return this.jj},set:function(a){var y=this.jj;y!==a&&((0>a||!isFinite(a))&&Mn(a,">= 0",Jo,"minimum"),this.jj=a,this.actual=this.oa,this.panel!==null&&this.panel.v(),this.Ob("minimum",y,a))}},maximum:{get:function(){return this.hj},set:function(a){var y=this.hj;y!==a&&(0>a&&Mn(a,">= 0",Jo,"maximum"),this.hj=a,this.actual=this.oa,this.panel!==null&&this.panel.v(),this.Ob("maximum",y,a))}},alignment:{get:function(){return this.Jb},set:function(a){var y=this.Jb;y.D(a)||(this.Jb=a.J(),this.panel!==null&&this.panel.v(),this.Ob("alignment",y,a))}},stretch:{get:function(){return this.hg},set:function(a){var y=this.hg;y!==a&&(this.hg=a,this.panel!==null&&this.panel.v(),this.Ob("stretch",y,a))}},separatorPadding:{get:function(){return this.dg},set:function(a){typeof a=="number"&&(a=new Ji(a));var y=this.dg;a!==null&&y!==null&&y.D(a)||(a!==null&&(a=a.J()),this.dg=a,this.panel!==null&&this.panel.v(),this.Ob("separatorPadding",y,a))}},separatorStroke:{get:function(){return this.lo},set:function(a){var y=this.lo;y!==a&&(a!==null&&Dc(a,"RowColumnDefinition.separatorStroke"),a instanceof Wr&&a.freeze(),this.lo=a,this.panel!==null&&this.panel.v(),this.Ob("separatorStroke",y,a))}},separatorStrokeWidth:{get:function(){return this.mo},set:function(a){var y=this.mo;y!==a&&(this.mo=a,this.panel!==null&&this.panel.v(),this.Ob("separatorStrokeWidth",y,a))}},separatorDashArray:{get:function(){return this.tj},set:function(a){var y=this.tj;if(y!==a){if(a!==null){for(var x=a.length,E=0,b=0;b<x;b++){var z=a[b];typeof z=="number"&&0<=z&&isFinite(z)||Gt("separatorDashArray value "+z+" at index "+b+" must be a positive number or zero."),E+=z}if(E===0){if(y===null)return;a=null}}this.tj=a,this.panel!==null&&this.panel.N(),this.Ob("separatorDashArray",y,a)}}},background:{get:function(){return this.Ma},set:function(a){var y=this.Ma;y!==a&&(a!==null&&Dc(a,"RowColumnDefinition.background"),a instanceof Wr&&a.freeze(),this.Ma=a,this.panel!==null&&this.panel.N(),this.Ob("background",y,a))}},coversSeparators:{get:function(){return this.Pm},set:function(a){var y=this.Pm;y!==a&&(this.Pm=a,this.panel!==null&&this.panel.N(),this.Ob("coversSeparators",y,a))}},sizing:{get:function(){return this.oo},set:function(a){var y=this.oo;y!==a&&(this.oo=a,this.panel!==null&&this.panel.v(),this.Ob("sizing",y,a))}},actual:{get:function(){return this.oa},set:function(a){this.oa=isNaN(this.Hc)?Math.max(Math.min(this.hj,a),this.jj):Math.max(Math.min(this.hj,this.Hc),this.jj)}},measured:{get:function(){return this.oc},set:function(a){this.oc=a}},total:{get:function(){return this.oa+this.Wc()}},position:{get:function(){return this.pa},set:function(a){this.pa=a}}}),Jo.prototype.computeEffectiveSpacing=Jo.prototype.Wc,Jo.prototype.computeEffectiveSpacingTop=Jo.prototype.Io;var Cv=new Ue(Jo,"Default",0),Ug=new Ue(Jo,"None",1),bm=new Ue(Jo,"ProportionalExtra",2);Jo.className="RowColumnDefinition",Jo.Default=Cv,Jo.None=Ug,Jo.ProportionalExtra=bm;function lr(a,y){he.call(this),this.Rd=this.ua=null,this.an="None",this.xc=this.Ui="black",this.ig=1,this.Na=this.Yg=null,this.Vn=this.Un=NaN,this.fa=null,typeof a=="string"?this.figure=a:a&&Object.assign(this,a),y&&Object.assign(this,y)}we(lr,he),lr.prototype.cloneProtected=function(a){he.prototype.cloneProtected.call(this,a),a.ua=this.ua,a.Rd=this.Rd,a.an=this.an,a.Ui=this.Ui,a.xc=this.xc,a.ig=this.ig,this.Yg!==null&&(a.Yg=Sn(this.Yg)),this.Na!==null&&(a.Na=this.Na.nc?this.Na:this.Na.copy()),a.Un=this.Un,a.Vn=this.Vn,this.fa!==null&&(a.fa=this.fa.copy())};function Xd(a){a.Na===null?a.Na=new Lv:a.Na.nc&&(a.Na=a.Na.copy())}Pt=lr.prototype,Pt.th=function(){he.prototype.th.call(this),this.Na!==null&&(this.Na.nc=!0)},Pt.qb=function(a){a===nn||a===fi||a===Er||a===tr?this.geometryStretch=a:he.prototype.qb.call(this,a)},Pt.toString=function(){return"Shape("+(this.figure!=="None"?this.figure:this.toArrow!=="None"?this.toArrow:this.fromArrow)+")#"+fr(this)};function Ff(a,y,x,E){var b=x.length;if(!(4>b)){var z=E.measuredBounds,tt=Math.max(1,z.width);z=z.height;for(var rt=x[0],ot=x[1],st,ut,ft,mt,yt,wt,bt=0,Zt=On(),It=2;It<b;It+=2)st=x[It],ut=x[It+1],ft=st-rt,rt=ut-ot,ft===0&&(ft=.001),mt=rt/ft,yt=Math.atan2(rt,ft),wt=Math.sqrt(ft*ft+rt*rt),Zt.push([ft,yt,mt,wt]),bt+=wt,rt=st,ot=ut;rt=x[0],ot=x[1],ft=E.measuredBounds.width,E instanceof lr&&(ft-=E.strokeWidth),1>ft&&(ft=1),b=x=ft,st=tt/2,ut=st!==0,It=0,wt=Zt[It],ft=wt[0],yt=wt[1],mt=wt[2],wt=wt[3];for(var Yt=0;.1<=bt;){if(Yt===0&&(ut?(b=x,b-=st,bt-=st,ut=!1):b=x,b===0&&(b=1)),b>bt){Qn(Zt);return}b>wt?(Yt=b-wt,b=wt):Yt=0;var Jt=Math.sqrt(b*b/(1+mt*mt));if(0>ft&&(Jt=-Jt),rt+=Jt,ot+=mt*Jt,a.translate(rt,ot),a.rotate(yt),a.translate(-(tt/2),-(z/2)),Yt===0&&E.hh(a,y),a.translate(tt/2,z/2),a.rotate(-yt),a.translate(-rt,-ot),bt-=b,wt-=b,Yt!==0){if(It++,It===Zt.length){Qn(Zt);return}wt=Zt[It],ft=wt[0],yt=wt[1],mt=wt[2],wt=wt[3],b=Yt}}Qn(Zt)}}Pt.hh=function(a,y){var x=this.xc,E=this.Ui;if(x!==null||E!==null){var b=this.ua;if(b!==null){a.yc();var z=this.actualBounds,tt=this.naturalBounds;E!==null&&Mo(this,a,E,!0,!1,tt,z);var rt=this.part,ot=this.ig;if(x===null||ot!==0||rt===null||!this.isPanelMain&&rt.Pb()!==this||(ot=rt.type===mn.Link&&rt instanceof Rr&&rt.category==="Selection"&&rt.adornedObject instanceof lr&&rt.adornedPart.Pb()===rt.adornedObject?rt.adornedObject.strokeWidth:0),ot===0&&(x=null),x!==null&&ot!==0&&(Mo(this,a,x,!1,!1,tt,z),a.lineWidth=ot,a.lineJoin=this.strokeJoin,a.lineCap=this.strokeCap,a.miterLimit=this.strokeMiterLimit),z=!1,rt&&y.Gf("drawShadows")&&(z=rt.isShadowed),a.Il===!1&&(z=!1),rt=!0,x===null||E!==null&&E!=="transparent"||(rt=!1),tt=!1,ot=this.strokeDashArray,ot!==null&&(tt=!0,a.js(ot,this.strokeDashOffset)),b.type===xn.j)a.beginPath(),a.moveTo(b.startX,b.startY),a.lineTo(b.endX,b.endY),x!==null&&a.jk(),a.Se();else if(b.type===xn.u){var st=b.startX;ot=b.startY;var ut=b.endX,ft=b.endY;b=Math.min(st,ut);var mt=Math.min(ot,ft);st=Math.abs(ut-st),ot=Math.abs(ft-ot),a.beginPath(),a.rect(b,mt,st,ot),E!==null&&a.ng(E),x!==null&&(rt&&z&&Mu(a),a.jk(),rt&&z&&Yu(a)),a.Se()}else if(b.type===xn.F)st=b.startX,ot=b.startY,ut=b.endX,ft=b.endY,b=Math.abs(ut-st)/2,mt=Math.abs(ft-ot)/2,st=Math.min(st,ut)+b,ot=Math.min(ot,ft)+mt,a.beginPath(),a.moveTo(st,ot-mt),a.bezierCurveTo(st+ue.wg*b,ot-mt,st+b,ot-ue.wg*mt,st+b,ot),a.bezierCurveTo(st+b,ot+ue.wg*mt,st+ue.wg*b,ot+mt,st,ot+mt),a.bezierCurveTo(st-ue.wg*b,ot+mt,st-b,ot+ue.wg*mt,st-b,ot),a.bezierCurveTo(st-b,ot-ue.wg*mt,st-ue.wg*b,ot-mt,st,ot-mt),a.closePath(),E!==null&&a.ng(E),x!==null&&(rt&&z&&Mu(a),a.jk(),rt&&z&&Yu(a)),a.Se();else if(b.type===xn.o)for(b=b.figures,ot=b.length,mt=0;mt<ot;mt++){st=b.s[mt],a.beginPath(),a.moveTo(st.startX,st.startY),ut=st.segments.s,ft=ut.length;for(var yt=null,wt=0;wt<ft;wt++){var bt=ut[wt];switch(bt.type){case zo:a.moveTo(bt.endX,bt.endY);break;case ri:a.lineTo(bt.endX,bt.endY);break;case Ar:a.bezierCurveTo(bt.point1X,bt.point1Y,bt.point2X,bt.point2Y,bt.endX,bt.endY);break;case Zr:a.quadraticCurveTo(bt.point1X,bt.point1Y,bt.endX,bt.endY);break;case Qr:if(bt.radiusX===bt.radiusY){var Zt=Math.PI/180;a.arc(bt.point1X,bt.point1Y,bt.radiusX,bt.startAngle*Zt,(bt.startAngle+bt.sweepAngle)*Zt,0>bt.sweepAngle,yt!==null?yt.endX:st.startX,yt!==null?yt.endY:st.startY)}else if(yt=Ka(bt,st),Zt=yt.length,Zt===0)a.lineTo(bt.centerX,bt.centerY);else for(var It=0;It<Zt;It++){var Yt=yt[It];It===0&&a.lineTo(Yt[0],Yt[1]),a.bezierCurveTo(Yt[2],Yt[3],Yt[4],Yt[5],Yt[6],Yt[7])}break;case Co:if(It=Zt=0,yt!==null&&yt.type===Qr){if(yt=Ka(yt,st),Yt=yt.length,Yt===0){a.lineTo(bt.endX,bt.endY);break}yt=yt[Yt-1]||null,yt!==null&&(Zt=yt[6],It=yt[7])}else Zt=yt!==null?yt.endX:st.startX,It=yt!==null?yt.endY:st.startY;if(yt=Ps(bt,st,Zt,It),Zt=yt.length,Zt===0){a.lineTo(bt.endX,bt.endY);break}for(It=0;It<Zt;It++)Yt=yt[It],a.bezierCurveTo(Yt[2],Yt[3],Yt[4],Yt[5],Yt[6],Yt[7]);break;default:Gt("Segment not of valid type: "+bt.type)}bt.isClosed&&a.closePath(),yt=bt}ut=st.isFilled,z?st.isShadowed?(ut===!0&&E!=="transparent"&&E!==null&&a.ng(E,st.isEvenOdd),x!==null&&(ut&&rt&&Mu(a),a.jk(),ut&&rt&&Yu(a))):(Mu(a),ut&&E!=="transparent"&&E!==null&&a.ng(E,st.isEvenOdd),x!==null&&a.jk(),Yu(a)):(ut&&E!==null&&a.ng(E,st.isEvenOdd),x!==null&&a.jk()),a.Se(mt)}if(tt&&a.fs(),this.pathPattern!==null){if(x=this.pathPattern,x.measure(1/0,1/0),E=x.measuredBounds,x.arrange(0,0,E.width,E.height),z=this.geometry,a.save(),a.beginPath(),E=On(),z.type===xn.j)E.push(z.startX),E.push(z.startY),E.push(z.endX),E.push(z.endY),Ff(a,y,E,x);else if(z.type===xn.o)for(z=z.figures.iterator;z.next();){for(rt=z.value,E.length=0,E.push(rt.startX),E.push(rt.startY),tt=rt.startX,b=rt.startY,ot=tt,mt=b,st=rt.segments.s,ut=st.length,ft=0;ft<ut;ft++){switch(wt=st[ft],wt.type){case zo:Ff(a,y,E,x),E.length=0,E.push(wt.endX),E.push(wt.endY),tt=wt.endX,b=wt.endY,ot=tt,mt=b;break;case ri:E.push(wt.endX),E.push(wt.endY),tt=wt.endX,b=wt.endY;break;case Ar:ue.Qe(tt,b,wt.point1X,wt.point1Y,wt.point2X,wt.point2Y,wt.endX,wt.endY,.5,E),tt=wt.endX,b=wt.endY;break;case Zr:ue.ep(tt,b,wt.point1X,wt.point1Y,wt.endX,wt.endY,.5,E),tt=wt.endX,b=wt.endY;break;case Qr:if(bt=Ka(wt,rt),yt=bt.length,yt===0){E.push(wt.centerX),E.push(wt.centerY),tt=wt.centerX,b=wt.centerY;break}for(Zt=0;Zt<yt;Zt++)It=bt[Zt],ue.Qe(tt,b,It[2],It[3],It[4],It[5],It[6],It[7],.5,E),tt=It[6],b=It[7];break;case Co:if(bt=Ps(wt,rt,tt,b),yt=bt.length,yt===0){E.push(wt.endX),E.push(wt.endY),tt=wt.endX,b=wt.endY;break}for(Zt=0;Zt<yt;Zt++)It=bt[Zt],ue.Qe(tt,b,It[2],It[3],It[4],It[5],It[6],It[7],.5,E),tt=It[6],b=It[7];break;default:Gt("Segment not of valid type: "+wt.type)}wt.isClosed&&(E.push(ot),E.push(mt),Ff(a,y,E,x))}Ff(a,y,E,x)}else if(z.type===xn.u)E.push(z.startX),E.push(z.startY),E.push(z.endX),E.push(z.startY),E.push(z.endX),E.push(z.endY),E.push(z.startX),E.push(z.endY),E.push(z.startX),E.push(z.startY),Ff(a,y,E,x);else if(z.type===xn.F){if(b=new jo,b.startX=z.endX,b.startY=(z.startY+z.endY)/2,tt=new Or(Qr),tt.startAngle=0,tt.sweepAngle=360,tt.centerX=(z.startX+z.endX)/2,tt.centerY=(z.startY+z.endY)/2,tt.radiusX=Math.abs(z.startX-z.endX)/2,tt.radiusY=Math.abs(z.startY-z.endY)/2,b.add(tt),z=Ka(tt,b),rt=z.length,rt===0)E.push(tt.centerX),E.push(tt.centerY);else for(tt=b.startX,b=b.startY,ot=0;ot<rt;ot++)mt=z[ot],ue.Qe(tt,b,mt[2],mt[3],mt[4],mt[5],mt[6],mt[7],.5,E),tt=mt[6],b=mt[7];Ff(a,y,E,x)}Qn(E),a.restore(),a.Vc(!1)}}}},Pt.kk=function(a,y,x){return!he.prototype.kk.call(this,a,y,x)||this.xc===null&&this.Ui===null||this.ua===null||this.pathPattern!==null||this.geometry.figures.length!==this.svg.getElementsByTagName("path").length?!1:(a.Hl=this.svg,this.hh(a,y),a.Hl=null,!0)},Pt.nk=function(a){return this.geometry!==null&&1<this.geometry.figures.length||this.pathPattern!==null?!0:he.prototype.nk.call(this,a)},Pt.Dv=function(a,y){if(a.nodeName!=="g")a.setAttributeNS(null,"filter",y);else{a=a.getElementsByTagName("path");for(var x=0;x<a.length;x++)a[x].setAttributeNS(null,"filter",y)}},Pt.ga=function(a,y){if(y===void 0&&(y=new At),a instanceof li){a.Mc()&&Gt("getDocumentPoint Spot must be a real, specific Spot, not: "+a.toString());var x=this.naturalBounds,E=this.strokeWidth;y.h(a.x*(x.width+E)-E/2+x.x+a.offsetX,a.y*(x.height+E)-E/2+x.y+a.offsetY)}else y.set(a);return this.oe.Ga(y),y},Pt.mi=function(a){a===void 0&&(a=new Ee);var y=this.naturalBounds,x=this.oe;y=Ee.allocAt(y.x,y.y,y.width,y.height);var E=this.strokeWidth;return y.Bc(E/2,E/2),E=At.allocAt(y.x,y.y).transform(x),a.h(E.x,E.y,0,0),E.h(y.right,y.y).transform(x),Pr(a,E.x,E.y,0,0),E.h(y.right,y.bottom).transform(x),Pr(a,E.x,E.y,0,0),E.h(y.x,y.bottom).transform(x),Pr(a,E.x,E.y,0,0),Ee.free(y),At.free(E),a},Pt.gh=function(a,y){var x=this.geometry;if(x===null||this.fill===null&&this.stroke===null)return!1;var E=x.bounds,b=this.strokeWidth/2;x.type!==xn.j||y||(b+=2);var z=Ee.alloc();if(z.assign(E),z.Bc(b+2,b+2),!z.ca(a))return Ee.free(z),!1;if(E=b+1e-4,x.type===xn.j)return this.stroke===null||(E=(x.endX-x.startX)*(a.x-x.startX)+(x.endY-x.startY)*(a.y-x.startY),0>(x.startX-x.endX)*(a.x-x.endX)+(x.startY-x.endY)*(a.y-x.endY)||0>E)?!1:(Ee.free(z),ue.Yb(x.startX,x.startY,x.endX,x.endY,b,a.x,a.y));if(x.type===xn.u){y=x.startX;var tt=x.startY,rt=x.endX;if(x=x.endY,z.x=Math.min(y,rt),z.y=Math.min(tt,x),z.width=Math.abs(rt-y),z.height=Math.abs(x-tt),this.fill===null){if(z.Bc(-E,-E),z.ca(a))return Ee.free(z),!1;z.Bc(E,E)}return this.stroke!==null&&z.Bc(b,b),a=z.ca(a),Ee.free(z),a}if(x.type===xn.F){tt=x.startX,b=x.startY,rt=x.endX;var ot=x.endY;if(x=Math.min(tt,rt),y=Math.min(b,ot),tt=Math.abs(rt-tt)/2,b=Math.abs(ot-b)/2,x=a.x-(x+tt),y=a.y-(y+b),this.fill===null){if(tt-=E,b-=E,0>=tt||0>=b||1>=x*x/(tt*tt)+y*y/(b*b))return Ee.free(z),!1;tt+=E,b+=E}return this.stroke!==null&&(tt+=E,b+=E),Ee.free(z),0>=tt||0>=b?!1:1>=x*x/(tt*tt)+y*y/(b*b)}if(x.type===xn.o)return Ee.free(z),this.fill===null?ws(x,a.x,a.y,b):ta(x,a,b,1<this.strokeWidth,y);Gt("Unknown Geometry type: "+x.type)},Pt.Wl=function(a,y,x,E){var b=this.desiredSize,z=this.ig;if(a=Math.max(a,0),y=Math.max(y,0),this.Rd!==null)var tt=this.geometry.bounds;else{var rt=this.figure,ot=kv[rt];if(ot===void 0){var st=ue.Ze[rt];typeof st=="string"&&(st=ue.Ze[st]),typeof st=="function"?(ot=st(null,100,100),kv[rt]=ot):Gt("Unsupported Figure: "+rt)}tt=ot.bounds}rt=tt.width,ot=tt.height,st=tt.width;var ut=tt.height;switch(ms(this,!0)){case nn:E=x=0;break;case cn:st=Math.max(a-z,0),ut=Math.max(y-z,0);break;case wi:st=Math.max(a-z,0),E=0;break;case Ti:x=0,ut=Math.max(y-z,0)}isFinite(b.width)&&(st=b.width),isFinite(b.height)&&(ut=b.height);var ft=this.maxSize,mt=this.minSize;switch(x=Math.max(x-z,mt.width),E=Math.max(E-z,mt.height),st=Math.min(ft.width,st),ut=Math.min(ft.height,ut),st=isFinite(st)?Math.max(x,st):Math.max(rt,x),ut=isFinite(ut)?Math.max(E,ut):Math.max(ot,E),x=Ev(this),x){case nn:break;case cn:rt=st,ot=ut;break;case fi:x=Math.min(st/rt,ut/ot),isFinite(x)||(x=1),rt*=x,ot*=x;break;default:Gt(x+" is not a valid geometryStretch.")}this.Rd!==null?(rt===0&&(rt=.001),ot===0&&(ot=.001),x=this.Rd!==null?this.Rd:this.ua,tt=x.bounds,E=rt/tt.width,tt=ot/tt.height,isFinite(E)||(E=1),isFinite(tt)||(tt=1),this.ua=E===1&&tt===1?x:x.copy().scale(E,tt)):this.ua!==null&&ue.$(this.ua.Sk,a-z)&&ue.$(this.ua.Rk,y-z)||(this.ua=lr.makeGeometry(this,rt,ot)),tt=this.ua.bounds,a===1/0||y===1/0?this.Ge(tt.x-z/2,tt.y-z/2,a===0&&rt===0?0:tt.width+z,y===0&&ot===0?0:tt.height+z):this.Ge(-(z/2),-(z/2),st+z,ut+z),b.w()?(st=b.width,ut=b.height,st=Math.min(ft.width,st),ut=Math.min(ft.height,ut),st=Math.max(mt.width,st),ut=Math.max(mt.height,ut),this.dc.h(0,0,st,ut)):this.dc.assign(tt)};function Ev(a){var y=a.geometryStretch;return a.Rd!==null?y===tr?cn:y:y===tr?kv[a.figure].defaultStretch:y}Pt.eh=function(a,y,x,E){Ua(this,a,y,x,E)},Pt.rs=function(a,y,x){return this.Sj(a.x,a.y,y.x,y.y,x)},Pt.Sj=function(a,y,x,E,b){var z=this.transform,tt=1/(z.m11*z.m22-z.m12*z.m21),rt=z.m22*tt,ot=-z.m12*tt,st=-z.m21*tt,ut=z.m11*tt,ft=tt*(z.m21*z.dy-z.m22*z.dx),mt=tt*(z.m12*z.dx-z.m11*z.dy);z=a*rt+y*st+ft,tt=a*ot+y*ut+mt,rt=x*rt+E*st+ft,ot=x*ot+E*ut+mt,ft=this.ig/2,st=this.ua,st===null&&(this.measure(1/0,1/0),st=this.ua);var yt=st.bounds;if(ut=!1,st.type===xn.j)if(1.5>=this.strokeWidth)ut=ue.Ve(st.startX,st.startY,st.endX,st.endY,z,tt,rt,ot,b);else{if(st.startX===st.endX?(E=ft,ut=0):(y=(st.endY-st.startY)/(st.endX-st.startX),ut=ft/Math.sqrt(1+y*y),E=ut*y),y=On(),a=new At,ue.Ve(st.startX+E,st.startY+ut,st.endX+E,st.endY+ut,z,tt,rt,ot,a)&&y.push(a),a=new At,ue.Ve(st.startX-E,st.startY-ut,st.endX-E,st.endY-ut,z,tt,rt,ot,a)&&y.push(a),a=new At,ue.Ve(st.startX+E,st.startY+ut,st.startX-E,st.startY-ut,z,tt,rt,ot,a)&&y.push(a),a=new At,ue.Ve(st.endX+E,st.endY+ut,st.endX-E,st.endY-ut,z,tt,rt,ot,a)&&y.push(a),rt=y.length,rt===0)return Qn(y),!1;for(ut=!0,ot=1/0,E=0;E<rt;E++)a=y[E],x=(a.x-z)*(a.x-z)+(a.y-tt)*(a.y-tt),x<ot&&(ot=x,b.x=a.x,b.y=a.y);Qn(y)}else if(st.type===xn.u)ut=ue.Ff(yt.x-ft,yt.y-ft,yt.x+yt.width+ft,yt.y+yt.height+ft,z,tt,rt,ot,b);else if(st.type===xn.F){y=Ee.allocAt(yt.x,yt.y,yt.width,yt.height).Bc(ft,ft);t:if(y.width===0)ut=ue.Ve(y.x,y.y,y.x,y.y+y.height,z,tt,rt,ot,b);else if(y.height===0)ut=ue.Ve(y.x,y.y,y.x+y.width,y.y,z,tt,rt,ot,b);else{if(a=y.width/2,st=y.height/2,E=y.x+a,ut=y.y+st,x=9999,z!==rt&&(x=(tt-ot)/(z-rt)),9999>Math.abs(x)){if(ot=tt-ut-x*(z-E),0>a*a*x*x+st*st-ot*ot){b.x=NaN,b.y=NaN,ut=!1;break t}ft=Math.sqrt(a*a*x*x+st*st-ot*ot),rt=(-(a*a*x*ot)+a*st*ft)/(st*st+a*a*x*x)+E,a=(-(a*a*x*ot)-a*st*ft)/(st*st+a*a*x*x)+E,st=x*(rt-E)+ot+ut,ot=x*(a-E)+ot+ut,Math.abs((z-rt)*(z-rt))+Math.abs((tt-st)*(tt-st))<Math.abs((z-a)*(z-a))+Math.abs((tt-ot)*(tt-ot))?(b.x=rt,b.y=st):(b.x=a,b.y=ot)}else{if(rt=st*st,ot=z-E,rt-=rt/(a*a)*ot*ot,0>rt){b.x=NaN,b.y=NaN,ut=!1;break t}ot=Math.sqrt(rt),rt=ut+ot,ot=ut-ot,Math.abs(rt-tt)<Math.abs(ot-tt)?(b.x=z,b.y=rt):(b.x=z,b.y=ot)}ut=!0}Ee.free(y)}else if(st.type===xn.o){mt=At.alloc();var wt=rt-z,bt=ot-tt,Zt=wt*wt+bt*bt,It=z,Yt=tt;if(0<Zt&&yt.contains(It,Yt)&&(mt.x=It,mt.y=Yt,this.ca(mt)))for(wt!==0&&.5>Math.abs(wt)?(bt*=.5/wt,wt=.5):bt!==0&&.5>Math.abs(bt)&&(wt*=.5/bt,bt=.5),It-=wt,Yt-=bt;yt.contains(It,Yt);)It-=wt,Yt-=bt;for(b.x=rt,b.y=ot,bt=0;bt<st.figures.count;bt++){var Jt=st.figures.s[bt],qt=Jt.isFilled?It:z,ae=Jt.isFilled?Yt:tt,Ce=Jt.segments;yt=Jt.startX,wt=Jt.startY;for(var In=yt,ui=wt,$n=0;$n<Ce.count;$n++){var Cn=Ce.s[$n],$e=Cn.type,_i=Cn.endX,zi=Cn.endY,zr=!1;switch($e){case zo:In=_i,ui=zi;break;case ri:zr=Fm(yt,wt,_i,zi,qt,ae,rt,ot,mt);break;case Ar:zr=ue.Eo(yt,wt,Cn.point1X,Cn.point1Y,Cn.point2X,Cn.point2Y,_i,zi,qt,ae,rt,ot,.6,mt);break;case Zr:zr=ue.Eo(yt,wt,yt+2/3*(Cn.point1X-yt),wt+2/3*(Cn.point1Y-wt),_i+2/3*(Cn.point1X-_i),zi+2/3*(Cn.point1Y-zi),_i,zi,qt,ae,rt,ot,.6,mt);break;case Qr:case Co:$e=Cn.type===Qr?Ka(Cn,Jt):Ps(Cn,Jt,yt,wt);var eo=$e.length;if(eo===0){zr=Fm(yt,wt,Cn.type===Qr?Cn.centerX:Cn.endX,Cn.type===Qr?Cn.centerY:Cn.endY,qt,ae,rt,ot,mt);break}for(zi=null,_i=0;_i<eo;_i++){if(zi=$e[_i],_i===0&&Fm(yt,wt,zi[0],zi[1],qt,ae,rt,ot,mt)){var aa=Mm(qt,ae,mt,Zt,b);aa<Zt&&(Zt=aa,ut=!0)}ue.Eo(zi[0],zi[1],zi[2],zi[3],zi[4],zi[5],zi[6],zi[7],qt,ae,rt,ot,.6,mt)&&(aa=Mm(qt,ae,mt,Zt,b),aa<Zt&&(Zt=aa,ut=!0))}_i=zi[6],zi=zi[7];break;default:Gt("Unknown Segment type: "+$e)}yt=_i,wt=zi,zr&&(zr=Mm(qt,ae,mt,Zt,b),zr<Zt&&(Zt=zr,ut=!0)),Cn.isClosed&&(_i=In,zi=ui,Fm(yt,wt,_i,zi,qt,ae,rt,ot,mt)&&(Cn=Mm(qt,ae,mt,Zt,b),Cn<Zt&&(Zt=Cn,ut=!0)))}}z=x-a,tt=E-y,rt=Math.sqrt(z*z+tt*tt),rt!==0&&(z/=rt,tt/=rt),b.x-=z*ft,b.y-=tt*ft,At.free(mt)}else Gt("Unknown Geometry type: "+st.type);return ut?(this.transform.Ga(b),!0):!1};function Mm(a,y,x,E,b){return a=x.x-a,y=x.y-y,y=a*a+y*y,y<E?(b.x=x.x,b.y=x.y,y):E}function Fm(a,y,x,E,b,z,tt,rt,ot){if(ue.$(a,x)&&ue.$(y,E)||ue.$(b,tt)&&ue.$(z,rt))return!1;var st=!1,ut=(b-tt)*(y-E)-(z-rt)*(a-x);return ut===0?!1:(ot.x=((b*rt-z*tt)*(a-x)-(b-tt)*(a*E-y*x))/ut,ot.y=((b*rt-z*tt)*(y-E)-(z-rt)*(a*E-y*x))/ut,(a>x?a-x:x-a)<(y>E?y-E:E-y)?(a=y<E?y:E,y=y<E?E:y,(ot.y>a||ue.$(ot.y,a))&&(ot.y<y||ue.$(ot.y,y))&&(st=!0)):(y=a<x?a:x,a=a<x?x:a,(ot.x>y||ue.$(ot.x,y))&&(ot.x<a||ue.$(ot.x,a))&&(st=!0)),st)}Pt.fh=function(a,y){if(y===void 0)return a.Re(this.actualBounds);var x=this.ua;x===null&&(this.measure(1/0,1/0),x=this.ua),x=x.bounds;var E=this.strokeWidth/2,b=!1,z=At.alloc();return z.h(x.x-E,x.y-E),a.ca(y.Ga(z))&&(z.h(x.x-E,x.bottom+E),a.ca(y.Ga(z))&&(z.h(x.right+E,x.bottom+E),a.ca(y.Ga(z))&&(z.h(x.right+E,x.y-E),a.ca(y.Ga(z))&&(b=!0)))),At.free(z),b},Pt.Yc=function(a,y){if(this.fh(a,y)||y===void 0&&(y=this.transform,a.Re(this.actualBounds)))return!0;var x=Ii.alloc();x.set(y),x.Vj();var E=a.left,b=a.right,z=a.top;a=a.bottom;var tt=At.alloc();if(tt.h(E,z),x.Ga(tt),this.gh(tt,!0)||(tt.h(b,z),x.Ga(tt),this.gh(tt,!0))||(tt.h(E,a),x.Ga(tt),this.gh(tt,!0))||(tt.h(b,a),x.Ga(tt),this.gh(tt,!0)))return At.free(tt),!0;var rt=At.alloc(),ot=At.alloc();return x.set(y),x.bv(this.transform),x.Vj(),rt.x=b,rt.y=z,rt.transform(x),tt.x=E,tt.y=z,tt.transform(x),y=!1,Jd(this,tt,rt,ot)?y=!0:(tt.x=b,tt.y=a,tt.transform(x),Jd(this,tt,rt,ot)?y=!0:(rt.x=E,rt.y=a,rt.transform(x),Jd(this,tt,rt,ot)?y=!0:(tt.x=E,tt.y=z,tt.transform(x),Jd(this,tt,rt,ot)&&(y=!0)))),At.free(tt),Ii.free(x),At.free(rt),At.free(ot),y};function Jd(a,y,x,E){if(!a.rs(y,x,E))return!1;a=y.x,y=y.y;var b=x.x,z=x.y;return x=E.x,E=E.y,a===b?(y<z?(a=y,y=z):a=z,E>=a&&E<=y):(a<b?(E=a,a=b):E=b,x>=E&&x<=a)}Pt.tx=function(a,y,x){function E(Zt,It){for(var Yt=Zt.length,Jt=0;Jt<Yt;Jt+=2)if(It.zd(Zt[Jt],Zt[Jt+1])>b)return!0;return!1}if(x&&this.fill!==null&&this.gh(a,!0))return!0;var b=a.Bf(y),z=b;if(1.5<this.strokeWidth&&(b=this.strokeWidth/2+Math.sqrt(b),b*=b),y=this.ua,y===null&&(this.measure(1/0,1/0),y=this.ua,y===null))return!1;if(!x){var tt=y.bounds,rt=tt.x,ot=tt.y,st=tt.x+tt.width;if(tt=tt.y+tt.height,Mi(a.x,a.y,rt,ot)<=b&&Mi(a.x,a.y,st,ot)<=b&&Mi(a.x,a.y,rt,tt)<=b&&Mi(a.x,a.y,st,tt)<=b)return!0}if(rt=y.startX,ot=y.startY,st=y.endX,tt=y.endY,y.type===xn.j){if(x=(rt-st)*(a.x-st)+(ot-tt)*(a.y-tt),Zn(a.x,a.y,rt,ot,st,tt)<=(0<=(st-rt)*(a.x-rt)+(tt-ot)*(a.y-ot)&&0<=x?b:z))return!0}else{if(y.type===xn.u)return y=!1,x&&(y=Zn(a.x,a.y,rt,ot,rt,tt)<=b||Zn(a.x,a.y,rt,ot,st,ot)<=b||Zn(a.x,a.y,st,ot,st,tt)<=b||Zn(a.x,a.y,rt,tt,st,tt)<=b),y;if(y.type===xn.F){y=a.x-(rt+st)/2,z=a.y-(ot+tt)/2;var ut=Math.abs(st-rt)/2,ft=Math.abs(tt-ot)/2;if(ut===0||ft===0)return Zn(a.x,a.y,rt,ot,st,tt)<=b;if(x){if(a=ue.$y(ut,ft,y,z),a*a<=b)return!0}else return!(Mi(y,z,-ut,0)>=b||Mi(y,z,0,-ft)>=b||Mi(y,z,0,ft)>=b||Mi(y,z,ut,0)>=b)}else if(y.type===xn.o){if(st=y.bounds,z=st.x,rt=st.y,ot=st.x+st.width,st=st.y+st.height,a.x>ot&&a.x<z&&a.y>st&&a.y<rt&&Zn(a.x,a.y,z,rt,z,st)>b&&Zn(a.x,a.y,z,rt,ot,rt)>b&&Zn(a.x,a.y,ot,st,z,st)>b&&Zn(a.x,a.y,ot,st,ot,rt)>b)return!1;if(z=Math.sqrt(b),x){if(this.fill===null?ws(y,a.x,a.y,z):ta(y,a,z,!0,!1))return!0}else{for(x=y.figures,y=0;y<x.count;y++){if(z=x.s[y],tt=z.startX,ut=z.startY,a.zd(tt,ut)>b)return!1;for(rt=z.segments.s,ot=rt.length,st=0;st<ot;st++)switch(ft=rt[st],ft.type){case zo:case ri:if(tt=ft.endX,ut=ft.endY,a.zd(tt,ut)>b)return!1;break;case Ar:var mt=On();if(ue.Qe(tt,ut,ft.point1X,ft.point1Y,ft.point2X,ft.point2Y,ft.endX,ft.endY,.8,mt),tt=E(mt,a),Qn(mt),tt||(tt=ft.endX,ut=ft.endY,a.zd(tt,ut)>b))return!1;break;case Zr:if(mt=On(),ue.ep(tt,ut,ft.point1X,ft.point1Y,ft.endX,ft.endY,.8,mt),tt=E(mt,a),Qn(mt),tt||(tt=ft.endX,ut=ft.endY,a.zd(tt,ut)>b))return!1;break;case Qr:case Co:mt=ft.type===Qr?Ka(ft,z):Ps(ft,z,tt,ut);var yt=mt.length;if(yt===0){if(tt=ft.type===Qr?ft.centerX:ft.endX,ut=ft.type===Qr?ft.centerY:ft.endY,a.zd(tt,ut)>b)return!1;break}ft=null;for(var wt=On(),bt=0;bt<yt;bt++)if(ft=mt[bt],wt.length=0,ue.Qe(ft[0],ft[1],ft[2],ft[3],ft[4],ft[5],ft[6],ft[7],.8,wt),E(wt,a))return Qn(wt),!1;Qn(wt),ft!==null&&(tt=ft[6],ut=ft[7]);break;default:Gt("Unknown Segment type: "+ft.type)}}return!0}}}return!1},Pt.qc=function(){this.ua=null},Pt.kq=function(){return this.ig};function m1(a){var y=a.diagram;y!==null&&y.undoManager.isUndoingRedoing||(a.segmentOrientation=ep,a.toArrow!=="None"?(a.segmentIndex=-1,a.alignmentFocus=na):a.fromArrow!=="None"&&(a.segmentIndex=0,a.alignmentFocus=new li(1-na.x,na.y)))}lr.makeGeometry=function(a,y,x){if(a.toArrow!=="None")var E=Au[a.toArrow];else a.fromArrow!=="None"?E=Au[a.fromArrow]:(E=ue.Ze[a.figure],typeof E=="string"&&(E=ue.Ze[E]),E===void 0&&Gt("Unknown Shape.figure: "+a.figure),E=E(a,y,x),E.Sk=y,E.Rk=x);if(E===null){var b=ue.Ze.Rectangle;typeof b=="function"&&(E=b(a,y,x))}return E};function v1(a){var y=Au[a];if(y===void 0){var x=a.toLowerCase();if(x==="none")return"None";if(y=Au[x],y===void 0){var E=null,b;for(b in ue.um)if(b.toLowerCase()===x){E=b;break}if(E!==null)return a=xn.parse(ue.um[E],!1),Au[E]=a,x!==E&&(Au[x]=E),E}}return typeof y=="string"?y:y instanceof xn?a:null}ge.Object.defineProperties(lr.prototype,{geometry:{get:function(){return this.ua!==null?this.ua:this.Rd},set:function(a){var y=this.ua,x=this.Rd;if(y!==a){a!==null?this.Rd=this.ua=a.freeze():this.Rd=this.ua=null;var E=this.part;E!==null&&(E.ag=NaN),this.v(),this.g("geometry",y||x,a),ka(this)&&(a=this.part,a!==null&&co(this,a,"geometryString"))}}},geometryString:{get:function(){return this.geometry===null?"":this.geometry.toString()},set:function(a){a=xn.parse(a);var y=a.normalize();this.geometry=a,this.position=a=At.allocAt(-y.x,-y.y),At.free(a)}},isGeometryPositioned:{get:function(){return(this.l&1048576)!==0},set:function(a){var y=(this.l&1048576)!==0;y!==a&&(this.l^=1048576,this.v(),this.g("isGeometryPositioned",y,a))}},fill:{get:function(){return this.Ui},set:function(a){var y=this.Ui;y!==a&&(a!==null&&Dc(a,"Shape.fill"),a instanceof Wr&&a.freeze(),this.Ui=a,this.N(),this.g("fill",y,a))}},stroke:{get:function(){return this.xc},set:function(a){var y=this.xc;y!==a&&(a!==null&&Dc(a,"Shape.stroke"),a instanceof Wr&&a.freeze(),this.xc=a,this.N(),this.g("stroke",y,a))}},strokeWidth:{get:function(){return this.ig},set:function(a){var y=this.ig;if(y!==a)if(0<=a){this.ig=a,this.v();var x=this.part;x!==null&&(x.ag=NaN),this.g("strokeWidth",y,a)}else Mn(a,"value >= 0",lr,"strokeWidth:value")}},strokeCap:{get:function(){return this.Na!==null?this.Na.Hr:"butt"},set:function(a){var y=this.strokeCap;y!==a&&(typeof a!="string"||a!=="butt"&&a!=="round"&&a!=="square"?Mn(a,'"butt", "round", or "square"',lr,"strokeCap"):(Xd(this),this.Na.Hr=a,this.N(),this.g("strokeCap",y,a)))}},strokeJoin:{get:function(){return this.Na!==null?this.Na.Ir:"miter"},set:function(a){var y=this.strokeJoin;y!==a&&(typeof a!="string"||a!=="miter"&&a!=="bevel"&&a!=="round"?Mn(a,'"miter", "bevel", or "round"',lr,"strokeJoin"):(Xd(this),this.Na.Ir=a,this.N(),this.g("strokeJoin",y,a)))}},strokeMiterLimit:{get:function(){return this.Na!==null?this.Na.Jr:10},set:function(a){var y=this.strokeMiterLimit;if(y!==a&&1<=a){Xd(this),this.Na.Jr=a,this.N();var x=this.part;x!==null&&(x.ag=NaN),this.g("strokeMiterLimit",y,a)}}},strokeDashArray:{get:function(){return this.Yg},set:function(a){var y=this.Yg;if(y!==a){if(a!==null){for(var x=a.length,E=0,b=0;b<x;b++){var z=a[b];0<=z&&isFinite(z)||Gt("strokeDashArray:value "+z+" at index "+b+" must be a positive number or zero."),E+=z}if(E===0){if(y===null)return;a=null}}this.Yg=a,this.N(),this.g("strokeDashArray",y,a)}}},strokeDashOffset:{get:function(){return this.Na!==null?this.Na.uj:0},set:function(a){var y=this.strokeDashOffset;y!==a&&0<=a&&(Xd(this),this.Na.uj=a,this.N(),this.g("strokeDashOffset",y,a))}},figure:{get:function(){return this.an},set:function(a){var y=this.an;if(y!==a){var x=ue.Ze[a];typeof x=="function"?x=a:(x=ue.Ze[a.toLowerCase()])||Gt("Unknown Shape.figure: "+a),y!==x&&(a=this.part,a!==null&&(a.ag=NaN),this.an=x,this.Rd=null,this.qc(),this.v(),this.g("figure",y,x))}}},toArrow:{get:function(){return this.Ua!==null?this.Ua.V:"None"},set:function(a){var y=this.toArrow;if(a===!0?a="Standard":a===!1&&(a=""),y!==a){var x=v1(a);x===null?Gt("Unknown Shape.toArrow: "+a):y!==x&&(this.Ua===null&&(this.Ua=new id),this.Ua.V=x,this.Rd=null,this.qc(),this.v(),m1(this),this.g("toArrow",y,x))}}},fromArrow:{get:function(){return this.Ua!==null?this.Ua.j:"None"},set:function(a){var y=this.fromArrow;if(a===!0?a="Standard":a===!1&&(a=""),y!==a){var x=v1(a);x===null?Gt("Unknown Shape.fromArrow: "+a):y!==x&&(this.Ua===null&&(this.Ua=new id),this.Ua.j=x,this.Rd=null,this.qc(),this.v(),m1(this),this.g("fromArrow",y,x))}}},spot1:{get:function(){return this.Na!==null?this.Na.fg:Bo},set:function(a){var y=this.spot1;y.D(a)||(a=a.J(),Xd(this),this.Na.fg=a,this.v(),this.g("spot1",y,a))}},spot2:{get:function(){return this.Na!==null?this.Na.gg:Bo},set:function(a){var y=this.spot2;y.D(a)||(a=a.J(),Xd(this),this.Na.gg=a,this.v(),this.g("spot2",y,a))}},parameter1:{get:function(){return this.Un},set:function(a){var y=this.Un;y!==a&&(this.Un=a,this.qc(),this.v(),this.g("parameter1",y,a))}},parameter2:{get:function(){return this.Vn},set:function(a){var y=this.Vn;y!==a&&(this.Vn=a,this.qc(),this.v(),this.g("parameter2",y,a))}},naturalBounds:{get:function(){return this.dc}},pathPattern:{get:function(){return this.Na!==null?this.Na.br:null},set:function(a){var y=this.pathPattern;y!==a&&(Xd(this),this.Na.br=a,this.N(),this.g("pathPattern",y,a))}},geometryStretch:{get:function(){return this.Na!==null?this.Na.jq:tr},set:function(a){var y=this.geometryStretch;y!==a&&(Xd(this),this.Na.jq=a,this.v(),this.g("geometryStretch",y,a))}},interval:{get:function(){return this.fa!==null?this.fa.Tk:1},set:function(a){var y=this.interval;if(a=Math.round(a),y!==a&&a!==0&&isFinite(a)){this.fa===null&&(this.fa=new Nu),this.fa.Tk=a;var x=this.diagram;x!==null&&this.panel===x.grid&&cu(x),this.v(),x=this.panel,x!==null&&(x.graduatedIntervals=null),this.g("interval",y,a)}}},graduatedStart:{get:function(){return this.fa!==null?this.fa.u:0},set:function(a){var y=this.graduatedStart;y!==a&&(0>a?a=0:1<a&&(a=1),this.fa===null&&(this.fa=new Nu),this.fa.u=a,this.v(),this.g("graduatedStart",y,a))}},graduatedEnd:{get:function(){return this.fa!==null?this.fa.j:1},set:function(a){var y=this.graduatedEnd;y!==a&&(0>a?a=0:1<a&&(a=1),this.fa===null&&(this.fa=new Nu),this.fa.j=a,this.v(),this.g("graduatedEnd",y,a))}},graduatedSkip:{get:function(){return this.fa!==null?this.fa.o:null},set:function(a){var y=this.graduatedSkip;y!==a&&(this.fa===null&&(this.fa=new Nu),this.fa.o=a,this.v(),this.g("graduatedSkip",y,a))}}}),lr.prototype.intersectsRect=lr.prototype.Yc,lr.prototype.containedInRect=lr.prototype.fh,lr.prototype.getNearestIntersectionPoint=lr.prototype.rs,lr.prototype.getDocumentBounds=lr.prototype.mi,lr.prototype.getDocumentPoint=lr.prototype.ga;var Au=new pi,kv=new pi;lr.className="Shape",lr.getFigureGenerators=function(){var a=new Me,y;for(y in ue.Ze)y!==y.toLowerCase()&&a.add(y,ue.Ze[y]);return a.freeze(),a},lr.defineFigureGenerator=function(a,y){var x=a.toLowerCase(),E=ue.Ze;E[a]=y,E[x]=a},lr.getArrowheadGeometries=function(){var a=new Me;for(E in ue.um)if(Au[E]===void 0){var y=xn.parse(ue.um[E],!1);Au[E]=y,y=E.toLowerCase(),y!==E&&(Au[y]=E)}for(var x in Au)if(x!==x.toLowerCase()){var E=Au[x];E instanceof xn&&a.add(x,E)}return a.freeze(),a},lr.defineArrowheadGeometry=function(a,y){var x=null;typeof y=="string"?x=xn.parse(y,!1):x=y,y=a.toLowerCase(),y!=="none"&&a!==y||Gt("Shape.defineArrowheadGeometry name must not be empty or None or all-lower-case: "+a);var E=Au;E[a]=x,E[y]=a};function Lv(){this.nc=!1,this.Hr="butt",this.Ir="miter",this.Jr=10,this.uj=0,this.br=null,this.jq=tr,this.gg=this.fg=Bo}Lv.prototype.copy=function(){var a=new Lv;return a.Hr=this.Hr,a.Ir=this.Ir,a.Jr=this.Jr,a.uj=this.uj,a.br=this.br,a.jq=this.jq,a.fg=this.fg.J(),a.gg=this.gg.J(),a};function io(a,y){return he.call(this),Tm||(vs=Lo?new yl(null).context:null,Tm=!0),this.l|=2097152,this.ec="",this.xc="black",this.Ae="13px sans-serif",this.Lq=this.Cb=this.Gc=0,this.da=this.fa=this.Gm=null,this.Ih=0,this.df=null,this.Le=0,this.ze=this.Qb=this.Qc=null,typeof a=="string"?this.text=a:a&&Object.assign(this,a),y&&Object.assign(this,y),this}we(io,he),io.prototype.cloneProtected=function(a){he.prototype.cloneProtected.call(this,a),a.ec=this.ec,a.xc=this.xc,a.Ae=this.Ae,a.Gc=this.Gc,a.Cb=this.Cb,a.Lq=this.Lq,a.Gm=this.Gm,this.fa!==null&&(a.fa=this.fa.copy()),this.da!==null&&(a.da=this.da.nc?this.da:this.da.copy()),a.Ih=this.Ih,a.df=this.df,a.Le=this.Le,a.Qc=this.Qc,a.Qb=this.Qb,a.ze=this.ze};function mu(a){a.da===null?a.da=new Bv:a.da.nc&&(a.da=a.da.copy())}Pt=io.prototype,Pt.th=function(){he.prototype.th.call(this),this.da!==null&&(this.da.nc=!0)};function y1(a,y){a.l=y.l|6144,a.pb=y.opacity,a.Ma=y.background,a.areaBackground=y.areaBackground,a.jd=y.desiredSize.J(),a.minSize=y.minSize.J(),a.maxSize=y.maxSize.J(),y.Lb!==null?a.Lb=y.Lb.copy():a.Lb=null,a.Ca=y.scale,a.Kb=y.angle,a.stretch=y.stretch,a.Kg=y.margin.J(),a.Jb=y.alignment.J(),a.sk=y.alignmentFocus.J(),a.segmentFraction=y.segmentFraction,a.segmentOffset=y.segmentOffset.J(),a.segmentOrientation=y.segmentOrientation,y.tb!==null&&(a.tb=y.tb.copy()),a.shadowVisible=y.shadowVisible,a.ec=y.ec,a.xc=y.xc,a.Ae=y.Ae,a.fa!==null&&(a.fa=y.fa.copy()),y.da!==null&&(a.da=y.da.nc?y.da:y.da.copy()),a.Ih=y.Ih}Pt.qb=function(a){a.classType===io?this.wrap=a:he.prototype.qb.call(this,a)},Pt.toString=function(){return 22<this.ec.length?'TextBlock("'+this.ec.substring(0,20)+'"...)':'TextBlock("'+this.ec+'")'},Pt.v=function(){he.prototype.v.call(this)},Pt.hh=function(a,y){if(this.xc!==null&&this.ec.length!==0&&this.Ae!==null){var x=this.naturalBounds,E=this.actualBounds,b=x.width,z=x.height,tt=Xg(this),rt=a.textAlign=this.textAlign,ot=y.tn;rt==="start"?rt=ot?"right":"left":rt==="end"&&(rt=ot?"left":"right"),ot=this.isUnderline;var st=this.isStrikethrough;Mo(this,a,this.xc,!0,!1,x,E),(ot||st)&&Mo(this,a,this.xc,!1,!1,x,E),E=0,x=!1;var ut=this.oe,ft=ut.dx-(tt*ut.m21+ut.dx);ut=ut.dy-(tt*ut.m22+ut.dy);var mt=y.scale;switch(8>(ft*ft+ut*ut)*mt*mt&&(x=!0),y.ib!==a&&(x=!1),y.ib instanceof Ts&&(x=!1),y.Gf("textGreeking")===!1&&(x=!1),y=this.spacingAbove,ft=this.spacingBelow,this.flip){case Dr:a.translate(b,0),a.scale(-1,1);break;case gr:a.translate(0,z),a.scale(1,-1);break;case Xr:a.translate(b,z),a.scale(-1,-1)}if(a.yc(),ut=this.Gc,mt=(y+tt+ft)*ut,z>mt&&(E=this.verticalAlignment,E=E.y*z-E.y*mt+E.offsetY),ut===1&&this.ze!==null)ft=this.Cb,ft>b&&(ft=b),this.Oj(this.ze,a,0,E+y,b,tt,ft,x,rt,ot,st);else if(this.Qc!==null&&this.Qb!==null)for(mt=0;mt<ut;mt++){var yt=this.Qc[mt];yt>b&&(yt=b),E+=y,this.Oj(this.Qb[mt],a,0,E,b,tt,yt,x,rt,ot,st),E+=tt+ft}switch(this.flip){case Dr:a.scale(-1,1),a.translate(-b,0);break;case gr:a.scale(1,-1),a.translate(0,-z);break;case Xr:a.scale(-1,-1),a.translate(-b,-z)}}},Pt.Oj=function(a,y,x,E,b,z,tt,rt,ot,st,ut){var ft=0;if(rt)ot==="left"?ft=0:ot==="right"?ft=b-tt:ot==="center"&&(ft=(b-tt)/2),y.fillRect(x+ft,E+.25*z,tt,1);else{if(ot==="left"?ft=0:ot==="right"?ft=b:ot==="center"&&(ft=b/2),b=Am!==null?Am(this,z):.75*z,y.fillText(a,x+ft,E+b),a=z/20|0,a===0&&(a=1),ot==="right"?ft-=tt:ot==="center"&&(ft-=tt/2),st){rt=Nm!==null?Nm(this,z):.8*z,ot=x+ft,st=E+rt,b=x+ft+tt,rt=E+rt;var mt=a;y.beginPath(),y.lineWidth=mt,y.moveTo(ot,st),y.lineTo(b,rt),y.stroke(),y.Se(),y instanceof Ts&&y.ad.classList.add("gojs-td")}ut&&(ut=E+z-z/2.2|0,a%2!==0&&(ut+=.5),E=x+ft,z=ut,x=x+ft+tt,tt=ut,ft=a,y.beginPath(),y.lineWidth=ft,y.moveTo(E,z),y.lineTo(x,tt),y.stroke(),y.Se(),y instanceof Ts&&y.ad.classList.add("gojs-td"))}},Pt.kk=function(a,y,x){if(!he.prototype.kk.call(this,a,y,x))return!1;if(Mo(this,a,this.xc,!0,!1,this.naturalBounds,this.actualBounds),x){if(this.svg.getElementsByTagName("text").length===0)return!0;for(y=this.svg.getElementsByClassName("gojs-td"),x=0;x<y.length;x++)Qy(a,y[x],!1)}else y=this.svg,y.innerHTML=this.text,Qy(a,y,!0);return!0},Pt.nk=function(a){return 1<this.lineCount||this.isUnderline||this.isStrikethrough?!0:he.prototype.nk.call(this,a)},Pt.Dv=function(a,y){if(a.nodeName!=="g")a.setAttributeNS(null,"filter",y);else{a=a.getElementsByTagName("text");for(var x=0;x<a.length;x++)a[x].setAttributeNS(null,"filter",y)}},Pt.Wl=function(a,y,x,E){var b=this.Gc;this.Ih=a,this.l&=-16777217;var z=this.Ae;vs!==null&&k1!==z&&(k1=vs.font=z),this.Cb=this.Le=0,this.ze=this.Qb=this.Qc=this.df=null;var tt;if(isNaN(this.desiredSize.width)){if(z=this.ec.replace(/\r\n/g,`
|
|
`).replace(/\r/g,`
|
|
`),z.length===0)z=8;else if(this.isMultiline){for(var rt=tt=0,ot=!1;!ot;){var st=z.indexOf(`
|
|
`,rt);st===-1&&(st=z.length,ot=!0),rt=z.substr(rt,st-rt),this.formatting===Jg&&(rt=rt.trim()),tt=Math.max(tt,Tl(rt)),rt=st+1}z=tt}else tt=z.indexOf(`
|
|
`,0),0<=tt&&(z=z.substr(0,tt)),z=Tl(z);z=Math.min(z,a/this.scale)}else z=this.desiredSize.width;if(this.panel!==null&&(z=Math.min(z,this.panel.maxSize.width)),tt=x1(this,z),isNaN(this.desiredSize.height)?tt=Math.min(tt,y/this.scale):tt=this.desiredSize.height,ot=tt,this.Cb!==0&&this.Qc!==null&&this.Qb!==null&&this.overflow===Dm&&(y=this.Ae,y=this.overflow===Dm?S1(y):0,st=this.spacingAbove+this.spacingBelow,st=Math.max(0,Xg(this)+st),ot=Math.min(this.maxLines-1,Math.max(Math.floor(ot/st+.01)-1,0)),!(ot+1>=this.Qb.length))){for(this.l|=16777216,st=this.Qb[ot],y=Math.max(1,a-y);Tl(st)>y&&1<st.length;)st=st.substr(0,st.length-1);st+=_g,y=Tl(st),this.Qb[ot]=st,this.Qb=this.Qb.slice(0,ot+1),this.Qc[ot]=y,this.Qc=this.Qc.slice(0,ot+1),this.Le=this.Qb.length,this.Cb=Math.max(this.Cb,y),this.Gc=this.Le,this.Gc===1&&(this.ze=this.Qb[0])}(this.wrap===w1||isNaN(this.desiredSize.width))&&(z=isNaN(a)?this.Cb:Math.min(a,this.Cb)),z=Math.max(x,z),tt=Math.max(E,tt),Fr(this.dc,z,tt),this.Ge(0,0,z,tt),this.svg!==null&&b!==this.Gc&&(this.Uc=!0)},Pt.eh=function(a,y,x,E){Ua(this,a,y,x,E)};function Yg(a,y,x){a.ze===null?(a.ze=y,a.Cb=x):((a.Qb===null||a.Qc===null)&&(a.Qb=[],a.Qc=[],a.Qb.push(a.ze),a.Qc.push(a.Cb)),a.Qb.push(y),a.Qc.push(x),a.Qb.length>a.maxLines&&(a.l|=16777216))}function bv(a,y,x,E){var b=a.formatting===Jg;b&&(y=y.trim());var z=0,tt=a.Ae,rt=a.spacingAbove+a.spacingBelow;rt=Math.max(0,Xg(a)+rt);var ot=a.overflow===Dm?S1(tt):0;if(a.Gc>=a.maxLines)E!==null&&E.h(0,rt);else if(tt=y,a.wrap===Mv){a.Le=1;var st=Tl(y);if(ot===0||st<=x)a.Cb=Math.max(a.Cb,st),Yg(a,y,a.Cb),E!==null&&E.h(st,rt);else{for(z=Af(a,tt),tt=tt.substr(z.length),y=Af(a,tt),st=Tl(z+y);0<y.length&&st<=x;)z+=y,tt=tt.substr(y.length),y=Af(a,tt),st=z+y,b&&(st=st.trim()),st=Tl(st);for(b&&(y=y.trim()),z+=y,x=Math.max(1,x-ot);Tl(z)>x&&1<z.length;)z=z.substr(0,z.length-1);a.l|=16777216,z+=_g;var ut=Tl(z);a.Cb=ut,Yg(a,z,ut),E!==null&&E.h(ut,rt)}}else{for(ot=0,tt.length===0&&(ot=1,Yg(a,tt,0));0<tt.length;){for(y=Af(a,tt),tt=tt.substr(y.length);Tl(y)>x;){var ft=1;for(st=Tl(y.substr(0,ft)),ut=0;st<=x;)ft++,ut=st,st=Tl(y.substr(0,ft));if(ft===1){var mt=st;z=Math.max(z,st)}else mt=ut,z=Math.max(z,ut);if(ft--,1>ft&&(ft=1),Yg(a,y.substr(0,ft),mt),ot++,y=y.substr(ft),a.Gc+ot>a.maxLines)break}for(ut=Af(a,tt),st=Tl(y+ut);0<ut.length&&st<=x;)y+=ut,tt=tt.substr(ut.length),ut=Af(a,tt),st=y+ut,b&&(st=st.trim()),st=Tl(st);if(b&&(y=y.trim()),y!==""&&(y[y.length-1]==="\xAD"&&(y=y.substring(0,y.length-1)+"\u2010"),ut.length===0?(ft=st,z=Math.max(z,st)):(ft=ut=Tl(y),z=Math.max(z,ut)),Yg(a,y,ft),ot++,a.Gc+ot>a.maxLines))break}a.Le=Math.min(a.maxLines,ot),a.Cb=Math.max(a.Cb,z),E!==null&&E.h(a.Cb,rt*a.Le)}}function Af(a,y){if(a.wrap===P1)return y.substr(0,1);for(var x=y.length,E=0,b=Sx;E<x&&!b.test(y.charAt(E));)E++;for(a.formatting===C1&&(x=Math.min(x,E+1));E<x&&b.test(y.charAt(E));)E++;return E>=y.length?y:y.substr(0,E)}function Tl(a){return vs===null?8*a.length:vs.measureText(a).width}function Xg(a){if(a.df!==null)return a.df;var y=a.Ae;if(vs===null){var x=16;return a.df=x}return Nv[y]!==void 0&&5e3>E1?x=Nv[y]:(x=1.3*vs.measureText("M").width,Nv[y]=x,E1++),a.df=x}function S1(a){if(vs===null)return 6;if(Bm[a]!==void 0&&5e3>Dv)var y=Bm[a];else y=vs.measureText(_g).width,Bm[a]=y,Dv++;return y}function x1(a,y){var x=a.ec.replace(/\r\n/g,`
|
|
`).replace(/\r/g,`
|
|
`),E=a.spacingAbove+a.spacingBelow;if(E=Math.max(0,Xg(a)+E),x.length===0)return a.Cb=0,a.Gc=1,E;if(!a.isMultiline){var b=x.indexOf(`
|
|
`,0);0<=b&&(x=x.substr(0,b))}b=0;for(var z=a.Gc=0,tt,rt=!1;!rt;){if(tt=x.indexOf(`
|
|
`,z),tt===-1&&(tt=x.length,rt=!0),z<=tt){if(z=x.substr(z,tt-z),a.wrap!==Mv){a.Le=0;var ot=Ke.alloc();bv(a,z,y,ot),b+=ot.height,Ke.free(ot),a.Gc+=a.Le}else bv(a,z,y,null),b+=E,a.Gc++;a.Gc===a.maxLines&&(rt=!0)}z=tt+1}return a.Lq=b}ge.Object.defineProperties(io.prototype,{font:{get:function(){return this.Ae},set:function(a){var y=this.Ae;y!==a&&(this.Ae=a,this.df=null,this.v(),this.g("font",y,a))}},text:{get:function(){return this.ec},set:function(a){var y=this.ec;a!=null?a=a.toString():a="",y!==a&&(this.ec=a,this.v(),this.g("text",y,a),this.Uc=!0)}},textAlign:{get:function(){return this.da!==null?this.da.Or:"start"},set:function(a){var y=this.textAlign;y===a||a!=="start"&&a!=="end"&&a!=="left"&&a!=="right"&&a!=="center"||(mu(this),this.da.Or=a,this.N(),this.g("textAlign",y,a))}},flip:{get:function(){return this.da!==null?this.da.Xf:nn},set:function(a){var y=this.flip;y!==a&&(mu(this),this.da.Xf=a,this.N(),this.g("flip",y,a))}},verticalAlignment:{get:function(){return this.da!==null?this.da.Yr:bl},set:function(a){var y=this.verticalAlignment;y.D(a)||(a=a.J(),mu(this),this.da.Yr=a,es(this),this.g("verticalAlignment",y,a))}},naturalBounds:{get:function(){if(!this.dc.w()){var a=Ke.alloc();bv(this,this.ec,999999,a);var y=a.width;Ke.free(a),a=x1(this,y);var x=this.desiredSize;isNaN(x.width)||(y=x.width),isNaN(x.height)||(a=x.height),Fr(this.dc,y,a)}return this.dc}},isMultiline:{get:function(){return(this.l&2097152)!==0},set:function(a){var y=(this.l&2097152)!==0;y!==a&&(this.l^=2097152,this.v(),this.g("isMultiline",y,a))}},isUnderline:{get:function(){return(this.l&4194304)!==0},set:function(a){var y=(this.l&4194304)!==0;y!==a&&(this.l^=4194304,this.Uc=!0,this.N(),this.g("isUnderline",y,a))}},isStrikethrough:{get:function(){return(this.l&8388608)!==0},set:function(a){var y=(this.l&8388608)!==0;y!==a&&(this.l^=8388608,this.Uc=!0,this.N(),this.g("isStrikethrough",y,a))}},wrap:{get:function(){return this.da!==null?this.da.$r:Fv},set:function(a){var y=this.wrap;y!==a&&(mu(this),this.da.$r=a,this.v(),this.g("wrap",y,a))}},overflow:{get:function(){return this.da!==null?this.da.$q:Av},set:function(a){var y=this.overflow;y!==a&&(mu(this),this.da.$q=a,this.v(),this.g("overflow",y,a))}},isOverflowed:{get:function(){return(this.l&16777216)!==0}},stroke:{get:function(){return this.xc},set:function(a){var y=this.xc;y!==a&&(a!==null&&Dc(a,"TextBlock.stroke"),a instanceof Wr&&a.freeze(),this.xc=a,this.N(),this.g("stroke",y,a))}},lineCount:{get:function(){return this.Gc}},lineHeight:{get:function(){return Xg(this)}},editable:{get:function(){return(this.l&1048576)!==0},set:function(a){var y=(this.l&1048576)!==0;y!==a&&(this.l^=1048576,this.g("editable",y,a))}},textEditor:{get:function(){return this.da!==null?this.da.Qr:null},set:function(a){var y=this.textEditor;y!==a&&(mu(this),this.da.Qr=a,this.g("textEditor",y,a))}},errorFunction:{get:function(){return this.da!==null?this.da.Hd:null},set:function(a){var y=this.errorFunction;y!==a&&(mu(this),this.da.Hd=a,this.g("errorFunction",y,a))}},interval:{get:function(){return this.fa!==null?this.fa.Tk:1},set:function(a){var y=this.interval;if(a=Math.round(a),y!==a&&a!==0&&isFinite(a)){this.fa===null&&(this.fa=new Nu),this.fa.Tk=a,this.v();var x=this.panel;x!==null&&(x.graduatedIntervals=null),this.g("interval",y,a)}}},graduatedStart:{get:function(){return this.fa!==null?this.fa.u:0},set:function(a){var y=this.graduatedStart;y!==a&&(0>a?a=0:1<a&&(a=1),this.fa===null&&(this.fa=new Nu),this.fa.u=a,this.v(),this.g("graduatedStart",y,a))}},graduatedEnd:{get:function(){return this.fa!==null?this.fa.j:1},set:function(a){var y=this.graduatedEnd;y!==a&&(0>a?a=0:1<a&&(a=1),this.fa===null&&(this.fa=new Nu),this.fa.j=a,this.v(),this.g("graduatedEnd",y,a))}},graduatedFunction:{get:function(){return this.fa!==null?this.fa.F:null},set:function(a){var y=this.graduatedFunction;y!==a&&(this.fa===null&&(this.fa=new Nu),this.fa.F=a,this.v(),this.g("graduatedFunction",y,a))}},graduatedSkip:{get:function(){return this.fa!==null?this.fa.o:null},set:function(a){var y=this.graduatedSkip;y!==a&&(this.fa===null&&(this.fa=new Nu),this.fa.o=a,this.v(),this.g("graduatedSkip",y,a))}},textValidation:{get:function(){return this.da!==null?this.da.vj:null},set:function(a){var y=this.textValidation;y!==a&&(mu(this),this.da.vj=a,this.g("textValidation",y,a))}},textEdited:{get:function(){return this.da!==null?this.da.Pr:null},set:function(a){var y=this.textEdited;y!==a&&(mu(this),this.da.Pr=a,this.g("textEdited",y,a))}},spacingAbove:{get:function(){return this.da!==null?this.da.Dr:0},set:function(a){var y=this.spacingAbove;y!==a&&(mu(this),this.da.Dr=a,this.v(),this.g("spacingAbove",y,a))}},spacingBelow:{get:function(){return this.da!==null?this.da.Er:0},set:function(a){var y=this.spacingBelow;y!==a&&(mu(this),this.da.Er=a,this.v(),this.g("spacingBelow",y,a))}},formatting:{get:function(){return this.da!==null?this.da.gq:Jg},set:function(a){var y=this.formatting;y!==a&&(mu(this),this.da.gq=a,this.v(),this.g("formatting",y,a))}},maxLines:{get:function(){return this.da!==null?this.da.Jq:1/0},set:function(a){var y=this.maxLines;y!==a&&(a=Math.floor(a),0>=a&&Mn(a,"> 0",io,"maxLines"),mu(this),this.da.Jq=a,this.v(),this.g("maxLines",y,a))}},metrics:{get:function(){return{arrSize:this.Qc!==null?this.Qc:[this.Cb],arrText:this.Qb!==null?this.Qb:[this.ze],maxLineWidth:this.Cb,fontHeight:this.df}}},choices:{get:function(){return this.Gm},set:function(a){var y=this.Gm;y!==a&&(this.Gm=a,this.g("choices",y,a))}}});var Am=null,Nm=null,Mv=new Ue(io,"None",0),w1=new Ue(io,"WrapFit",1),Fv=new Ue(io,"WrapDesiredSize",2),P1=new Ue(io,"WrapBreakAll",3),Av=new Ue(io,"OverflowClip",0),Dm=new Ue(io,"OverflowEllipsis",1),Jg=new Ue(io,"FormatTrim",0),C1=new Ue(io,"FormatNone",0),Sx=/[ \u200b\u00ad]/,Nv=new pi,E1=0,Bm=new pi,Dv=0,_g="...",k1="",vs=null,Tm=!1;io.className="TextBlock";function Bv(){this.nc=!1,this.Hd=null,this.Xf=nn,this.gq=Jg,this.Jq=1/0,this.$q=Av,this.Er=this.Dr=0,this.Or="start",this.vj=this.Qr=this.Pr=null,this.Yr=bl,this.$r=Fv}Bv.prototype.copy=function(){var a=new Bv;return a.Hd=this.Hd,a.Xf=this.Xf,a.gq=this.gq,a.Jq=this.Jq,a.$q=this.$q,a.Dr=this.Dr,a.Er=this.Er,a.Or=this.Or,a.Pr=this.Pr,a.Qr=this.Qr,a.vj=this.vj,a.Yr=this.Yr,a.$r=this.$r,a},io.getEllipsis=function(){return _g},io.setEllipsis=function(a){_g=a,Bm=new pi,Dv=0},io.getBaseline=function(){return Am},io.setBaseline=function(a){Am=a},io.getUnderline=function(){return Nm},io.setUnderline=function(a){Nm=a},io.isValidFont=function(a){if(Tm||(vs=Lo?new yl(null).context:null,Tm=!0),vs===null)return!0;var y=vs.font;if(a===y||a==="10px sans-serif")return!0;vs.font="10px sans-serif",vs.font=a;var x=vs.font;if(x!=="10px sans-serif")return vs.font=y,!0;vs.font="19px serif";var E=vs.font;return vs.font=a,x=vs.font,vs.font=y,x!==E},io.FormatNone=C1,io.FormatTrim=Jg,io.None=Mv,io.OverflowClip=Av,io.OverflowEllipsis=Dm,io.WrapBreakAll=P1,io.WrapDesiredSize=Fv,io.WrapFit=w1;function Nu(){this.Tk=1,this.u=0,this.j=1,this.o=this.F=null}Nu.prototype.copy=function(){var a=new Nu;return a.Tk=this.Tk,a.u=this.u,a.j=this.j,a.F=this.F,a.o=this.o,a},Nu.className="GradElementSettings";function ys(a,y){he.call(this),this.Eg=null,this.qo="",this.Xg=ha,this.Nk=cn,this.Zg=this.Hd=null,this.Mk=er,this.Xf=nn,this.vl=null,this.qn=!1,this.en=!0,this.al=!1,this.bt=this.rl=null,typeof a=="string"?this.source=a:a&&Object.assign(this,a),y&&Object.assign(this,y)}var Nf;we(ys,he),ys.prototype.cloneProtected=function(a){he.prototype.cloneProtected.call(this,a),a.qo=this.qo,a.element=this.Eg,a.Xg=this.Xg.J(),a.Nk=this.Nk,a.Xf=this.Xf,a.Hd=this.Hd,a.Zg=this.Zg,a.Mk=this.Mk.J(),a.en=this.en,a.rl=this.rl},ys.prototype.qb=function(a){a===nn||a===fi||a===Er?this.imageStretch=a:he.prototype.qb.call(this,a)},ys.prototype.toString=function(){return"Picture("+this.source+")#"+fr(this)};function Df(a){a===void 0&&(a=""),a!==""?Nf[a]&&(delete Nf[a],Om--):(Nf=new pi,Om=0)}function L1(a,y){y.qy||(y.Fq=function(x){y.sq=!0,y.ln=!1;var E=y.Bg.copy();if(E!=null){for(E=E.iterator;E.next();){var b=E.value;b.N();var z=y.getAttribute("src")||"",tt=b.Og.I(z);if(tt!==null)for(var rt=tt.length,ot=0;ot<rt;ot++)z=tt[ot],b.Xn.add(z),z.Uc=!0,b.$b(),y.hn&&(y.eu===void 0&&(y.eu=x),z.Zg!==null&&z.Zg(z,x))}y.Bg.clear()}a.desiredSize.w()||(Xo(a,!1),a.v())},y.Yp=function(x){y.ln=x;var E=y.Bg.copy();if(E!=null){for(E=E.iterator;E.next();){var b=E.value,z=y.getAttribute("src")||"",tt=b.Og.I(z);if(tt!==null){b=tt.length,z=On();for(var rt=0;rt<b;rt++)z.push(tt[rt]);if(y.hn)for(rt=0;rt<b;rt++)tt=z[rt],tt.Hd!==null&&tt.Hd(tt,x);Qn(z)}}y.Bg.clear()}},y.addEventListener("load",y.Fq),y.addEventListener("error",y.Yp),y.qy=!0)}ys.prototype.hA=function(){if(this.source!==""){Df(this.source);var a=this.source;this.source="",this.source=a}},ys.prototype.redraw=function(){this.N(),this.Uc=!0},ys.prototype.hh=function(a,y){var x=this.Eg;if(x!==null){var E=x.getAttribute("src");if(!(x instanceof HTMLImageElement&&(E===null||E==="")||x.ln instanceof Event&&a instanceof Ud)){var b=a instanceof Ts;E=this.naturalBounds;var z=0,tt=0,rt=this.qn,ot=rt?+x.width:x.naturalWidth;if(rt=rt?+x.height:x.naturalHeight,ot===void 0&&x.videoWidth&&(ot=x.videoWidth),rt===void 0&&x.videoHeight&&(rt=x.videoHeight),ot=ot||E.width,rt=rt||E.height,ot!==0&&rt!==0){var st=ot,ut=rt;this.sourceRect.w()&&(z=this.Xg.x,tt=this.Xg.y,ot=this.Xg.width,rt=this.Xg.height);var ft=ot,mt=rt,yt=this.Nk,wt=this.Mk;switch(yt){case nn:if(this.sourceRect.w())break;ft>=E.width&&(z=z+wt.offsetX+(ft*wt.x-E.width*wt.x)),mt>=E.height&&(tt=tt+wt.offsetY+(mt*wt.y-E.height*wt.y)),ot=Math.min(E.width,ft),rt=Math.min(E.height,mt);break;case cn:ft=E.width,mt=E.height;break;case fi:case Er:yt===fi?(yt=Math.min(E.height/mt,E.width/ft),ft*=yt,mt*=yt):yt===Er&&(yt=Math.max(E.height/mt,E.width/ft),ft*=yt,mt*=yt,ft>=E.width&&(z=(z+wt.offsetX+(ft*wt.x-E.width*wt.x)/ft)*ot),mt>=E.height&&(tt=(tt+wt.offsetY+(mt*wt.y-E.height*wt.y)/mt)*rt),ot*=1/(ft/E.width),rt*=1/(mt/E.height),ft=E.width,mt=E.height)}yt=this.Df()*y.scale;var bt=ft*yt*mt*yt,Zt=ot*rt/bt,It=x.__goCache;yt=null;var Yt=xx;if(!b){if(x.sq&&It!==void 0&&4<bt&&Zt>Yt*Yt)for(It.gi===null&&(M1(It,4,st,ut,x),M1(It,16,st,ut,x)),b=It.gi,st=b.length,ut=0;ut<st&&b[ut].ratio*b[ut].ratio<Zt;ut++)yt=b[ut];if(!y.Xm){if(this.vl===null)if(this.Eg===null)this.vl=!1;else{b=new yl(null).context;try{b.drawImage(this.Eg,0,0)}catch(Jt){this.en=!1}try{b.getImageData(0,0,1,1).data[3]&&(this.vl=!1),this.vl=!1}catch(Jt){this.vl=!0}}if(this.vl)return}}switch(b=ft<E.width?wt.offsetX+(E.width*wt.x-ft*wt.x):0,wt=mt<E.height?wt.offsetY+(E.height*wt.y-mt*wt.y):0,this.flip){case Dr:a.translate(Math.min(E.width,ft),0),a.scale(-1,1);break;case gr:a.translate(0,Math.min(E.height,mt)),a.scale(1,-1);break;case Xr:a.translate(Math.min(E.width,ft),Math.min(E.height,mt)),a.scale(-1,-1)}if(a.yc(),y.Gf("pictureRatioOptimization")&&!y.$i&&It!==void 0&&yt!==null&&yt.ratio!==1){a.save(),y=yt.ratio;try{a.drawImage(yt.source,z/y,tt/y,Math.min(yt.source.width,ot/y),Math.min(yt.source.height,rt/y),b,wt,Math.min(E.width,ft),Math.min(E.height,mt)),a instanceof Ts&&(this.bt=[z/y,tt/y,Math.min(yt.source.width,ot/y),Math.min(yt.source.height,rt/y),b,wt,Math.min(E.width,ft),Math.min(E.height,mt)])}catch(Jt){this.en=!1}a.restore()}else try{a.drawImage(x,z,tt,ot,rt,b,wt,Math.min(E.width,ft),Math.min(E.height,mt)),a instanceof Ts&&(this.bt=[z,tt,ot,rt,b,wt,Math.min(E.width,ft),Math.min(E.height,mt)])}catch(Jt){this.en=!1}switch(this.flip){case Dr:a.scale(-1,1),a.translate(-Math.min(E.width,ft),0);break;case gr:a.scale(1,-1),a.translate(0,-Math.min(E.height,mt));break;case Xr:a.scale(-1,-1),a.translate(-Math.min(E.width,ft),-Math.min(E.height,mt))}}}}},ys.prototype.Wl=function(a,y,x,E){var b=this.desiredSize,z=ms(this,!0),tt=this.Eg,rt=this.qn,ot=0,st=0;(rt||!this.al&&tt&&tt.complete)&&(this.al=!0),tt===null?(isFinite(b.width)||(a=0),isFinite(b.height)||(y=0)):(ot=rt?+tt.width:tt.naturalWidth,st=rt?+tt.height:tt.naturalHeight),isFinite(b.width)||z===cn||z===wi?(isFinite(a)||(this.sourceRect.w()?a=this.sourceRect.width:tt!==null&&(a=ot)),x=0):tt!==null&&this.al!==!1&&(a=this.sourceRect.w()?this.sourceRect.width:ot),isFinite(b.height)||z===cn||z===Ti?(isFinite(y)||(this.sourceRect.w()?y=this.sourceRect.height:tt!==null&&(y=st)),E=0):tt!==null&&this.al!==!1&&(y=this.sourceRect.w()?this.sourceRect.height:st),isFinite(b.width)&&(a=b.width),isFinite(b.height)&&(y=b.height),b=this.maxSize,z=this.minSize,x=Math.max(x||0,z.width),E=Math.max(E||0,z.height),a=Math.min(b.width,a),y=Math.min(b.height,y),a=Math.max(x,a),y=Math.max(E,y),tt===null||tt.complete||(isFinite(a)||(a=0),isFinite(y)||(y=0)),Fr(this.dc,a,y),this.Ge(0,0,a,y)},ys.prototype.eh=function(a,y,x,E){Ua(this,a,y,x,E)},ge.Object.defineProperties(ys.prototype,{element:{get:function(){return this.Eg},set:function(a){var y=this.Eg;if(this.Uc=!0,y!==a){this.qn=a instanceof HTMLCanvasElement;var x=a instanceof HTMLImageElement;a===null||x||a instanceof HTMLVideoElement||this.qn||Gt("Picture.element must be an instance of Image, Canvas, or Video, not: "+a);var E=this.diagram;E!==null&&Fg(E,this),this.Eg=a,a!==null&&x&&a.Bg===void 0&&(a.Bg=new qe),E!==null&&x&&td(E,this),a!==null&&(this.qn||a.complete===!0?(a.hn&&(a.ln instanceof Event&&this.Hd!==null?this.Hd(this,a.ln):a.sq===!0&&!a.ln&&this.Zg!==null&&a.eu&&this.Zg(this,a.eu)),a.sq=!0,this.desiredSize.w()||(Xo(this,!1),this.v())):x&&L1(this,a)),this.g("element",y,a),this.N()}}},source:{get:function(){return this.qo},set:function(a){var y=this.qo;if(y!==a){this.Uc=!0,this.qo=a;var x=Nf;if(Lo){var E=null;if(x[a]!==void 0)E=x[a];else if(a!==""){30<Om&&(Df(),x=Nf),E=Ri("img"),E.hn=!0,L1(this,E);var b=this.rl;b!==null&&(E.crossOrigin=b(this)),E.src=a,x[a]=E,Om++}this.element=E,E!==null&&E.__goCache===void 0&&(E.__goCache=new b1),this.v(),this.N()}this.g("source",y,a)}}},sourceCrossOrigin:{get:function(){return this.rl},set:function(a){if(this.rl!==a&&(this.rl=a,this.element!==null)){var y=this.element.getAttribute("src");a===null&&typeof y=="string"?this.element.crossOrigin=null:a!==null&&(this.element.crossOrigin=a(this)),this.element.src=y}}},sourceRect:{get:function(){return this.Xg},set:function(a){var y=this.Xg;y.D(a)||(this.Xg=a=a.J(),this.N(),this.g("sourceRect",y,a))}},imageStretch:{get:function(){return this.Nk},set:function(a){var y=this.Nk;y!==a&&(this.Nk=a,this.N(),this.g("imageStretch",y,a))}},flip:{get:function(){return this.Xf},set:function(a){var y=this.Xf;y!==a&&(this.Xf=a,this.N(),this.g("flip",y,a))}},imageAlignment:{get:function(){return this.Mk},set:function(a){var y=this.Mk;y.D(a)||(this.Mk=a=a.J(),this.N(),this.g("imageAlignment",y,a))}},errorFunction:{get:function(){return this.Hd},set:function(a){var y=this.Hd;y!==a&&(this.Hd=a,this.g("errorFunction",y,a))}},successFunction:{get:function(){return this.Zg},set:function(a){var y=this.Zg;y!==a&&(this.Zg=a,this.g("successFunction",y,a))}},naturalBounds:{get:function(){return this.dc}}}),ys.prototype.redraw=ys.prototype.redraw,ys.prototype.reloadSource=ys.prototype.hA;var Om=0,xx=4;ys.className="Picture",Nf=new pi,ys.clearCache=Df;function b1(){this.gi=null}function M1(a,y,x,E,b){a.gi===null&&(a.gi=[]);var z=new yl(null),tt=z.context,rt=1/y;z.width=x/y,z.height=E/y,z.width!==0&&z.height!==0&&(y=new F1(z.Oa,y),x=1,0<a.gi.length&&(x=a.gi[a.gi.length-1],b=x.source,x=x.ratio),tt.setTransform(rt*x,0,0,rt*x,0,0),tt.yc(),tt.drawImage(b,0,0),a.gi.push(y))}b1.className="PictureCacheArray";function F1(a,y){this.source=a,this.ratio=y}F1.className="PictureCacheInstance";function Bf(){this.os=new xn,this.mc=null}Bf.prototype.reset=function(a){a!==null?(a.ka(),this.os=a,a.figures.clear()):this.os=new xn,this.mc=null};function Tf(a,y,x,E,b,z){a.mc=new jo,a.mc.startX=y,a.mc.startY=x,a.mc.isFilled=E,a.mc.isEvenOdd=z||!1,a.os.figures.add(a.mc),b!==void 0&&(a.mc.isShadowed=b)}function wx(a){var y=a.mc.segments.length;0<y&&a.mc.segments.M(y-1).close()}Bf.prototype.moveTo=function(a,y,x){x===void 0&&(x=!1);var E=new Or(zo);E.endX=a,E.endY=y,x&&E.close(),this.mc.segments.add(E)},Bf.prototype.lineTo=function(a,y,x){x===void 0&&(x=!1);var E=new Or(ri);E.endX=a,E.endY=y,x&&E.close(),this.mc.segments.add(E)};function Ph(a,y,x,E,b,z,tt){var rt;rt===void 0&&(rt=!1);var ot=new Or(Ar);ot.point1X=y,ot.point1Y=x,ot.point2X=E,ot.point2Y=b,ot.endX=z,ot.endY=tt,rt&&ot.close(),a.mc.segments.add(ot)}function Im(a,y,x,E,b){var z;z===void 0&&(z=!1);var tt=new Or(Zr);tt.point1X=y,tt.point1Y=x,tt.endX=E,tt.endY=b,z&&tt.close(),a.mc.segments.add(tt)}Bf.prototype.arcTo=function(a,y,x,E,b,z,tt){z===void 0&&(z=0),tt===void 0&&(tt=!1);var rt=new Or(Qr);rt.startAngle=a,rt.sweepAngle=y,rt.centerX=x,rt.centerY=E,rt.radiusX=b,rt.radiusY=z!==0?z:b,tt&&rt.close(),this.mc.segments.add(rt)};function Px(a,y,x,E,b,z,tt,rt){var ot;ot===void 0&&(ot=!1),y=new Or(Co,tt,rt,y,x,E,b,z),ot&&y.close(),a.mc.segments.add(y)}function A1(a){var y=Rm;return y!==null?(Rm=null,y.reset(a),y):(y=new Bf,y.reset(a),y)}var Rm=null;Bf.className="StreamGeometryContext";function Ga(a,y){var x=a.toLowerCase(),E=ue.Ze;E[a]=y,E[x]=a}Ga("Rectangle",function(a,y,x){a="r"+y+","+x;var E=ue.Mf[a];return E!==void 0||(E=new xn(xn.u),E.endX=y,E.endY=x,ue.Nf<ue.vm&&(ue.Mf[a]=E,ue.Nf++)),E}),Ga("Square",function(a,y,x){a="s"+y+","+x;var E=ue.Mf[a];return E!==void 0||(E=new xn(xn.u),E.endX=y,E.endY=x,E.defaultStretch=fi,ue.Nf<ue.vm&&(ue.Mf[a]=E,ue.Nf++)),E}),Ga("RoundedRectangle",function(a,y,x){a=a?a.parameter1:NaN,(isNaN(a)||0>a)&&(a=5),a=Math.min(a,y/3),a=Math.min(a,x/3);var E="rr"+y+","+x+","+a,b=ue.Mf[E];if(b!==void 0)return b;var z=a*ue.wg;return b=new xn().add(new jo(a,0,!0).add(new Or(ri,y-a,0)).add(new Or(Ar,y,a,y-z,0,y,z)).add(new Or(ri,y,x-a)).add(new Or(Ar,y-a,x,y,x-z,y-z,x)).add(new Or(ri,a,x)).add(new Or(Ar,0,x-a,z,x,0,x-z)).add(new Or(ri,0,a)).add(new Or(Ar,a,0,0,z,z,0).close())),1<z&&(b.spot1=new li(0,0,z,z),b.spot2=new li(1,1,-z,-z)),ue.Nf<ue.vm&&(ue.Mf[E]=b,ue.Nf++),b}),Ga("Border","RoundedRectangle"),Ga("Ellipse",function(a,y,x){a="e"+y+","+x;var E=ue.Mf[a];return E!==void 0||(E=new xn(xn.F),E.endX=y,E.endY=x,E.spot1=_s,E.spot2=Oa,ue.Nf<ue.vm&&(ue.Mf[a]=E,ue.Nf++)),E}),Ga("Circle",function(a,y,x){a="c"+y+","+x;var E=ue.Mf[a];return E!==void 0||(E=new xn(xn.F),E.endX=y,E.endY=x,E.spot1=_s,E.spot2=Oa,E.defaultStretch=fi,ue.Nf<ue.vm&&(ue.Mf[a]=E,ue.Nf++)),E}),Ga("TriangleRight",function(a,y,x){return new xn().add(new jo(0,0).add(new Or(ri,y,.5*x)).add(new Or(ri,0,x).close())).pm(0,.25,.5,.75)}),Ga("TriangleDown",function(a,y,x){return new xn().add(new jo(0,0).add(new Or(ri,y,0)).add(new Or(ri,.5*y,x).close())).pm(.25,0,.75,.5)}),Ga("TriangleLeft",function(a,y,x){return new xn().add(new jo(y,x).add(new Or(ri,0,.5*x)).add(new Or(ri,y,0).close())).pm(.5,.25,1,.75)}),Ga("TriangleUp",function(a,y,x){return new xn().add(new jo(y,x).add(new Or(ri,0,x)).add(new Or(ri,.5*y,0).close())).pm(.25,.5,.75,1)}),Ga("Triangle","TriangleUp"),Ga("Diamond",function(a,y,x){return new xn().add(new jo(.5*y,0).add(new Or(ri,0,.5*x)).add(new Or(ri,.5*y,x)).add(new Or(ri,y,.5*x).close())).pm(.25,.25,.75,.75)}),Ga("LineH",function(a,y,x){return a=new xn(xn.j),a.startX=0,a.startY=x/2,a.endX=y,a.endY=x/2,a}),Ga("LineV",function(a,y,x){return a=new xn(xn.j),a.startX=y/2,a.startY=0,a.endX=y/2,a.endY=x,a}),Ga("None","Rectangle"),Ga("BarH","Rectangle"),Ga("BarV","Rectangle"),Ga("MinusLine","LineH"),Ga("PlusLine",function(a,y,x){return new xn().add(new jo(0,x/2,!1).add(new Or(ri,y,x/2)).add(new Or(zo,y/2,0)).add(new Or(ri,y/2,x)))}),Ga("XLine",function(a,y,x){return new xn().add(new jo(0,x,!1).add(new Or(ri,y,0)).add(new Or(zo,0,0)).add(new Or(ri,y,x)))}),Ga("LineRight",function(a,y,x){return new xn().add(new jo(.25*y,0,!1).add(new Or(ri,.75*y,.5*x)).add(new Or(ri,.25*y,x)))}),Ga("LineDown",function(a,y,x){return new xn().add(new jo(0,.25*x,!1).add(new Or(ri,.5*y,.75*x)).add(new Or(ri,y,.25*x)))}),Ga("LineLeft",function(a,y,x){return new xn().add(new jo(.75*y,0,!1).add(new Or(ri,.25*y,.5*x)).add(new Or(ri,.75*y,x)))}),Ga("LineUp",function(a,y,x){return new xn().add(new jo(0,.75*x,!1).add(new Or(ri,.5*y,.25*x)).add(new Or(ri,y,.75*x)))}),ue.um={"":"",Standard:"F1 m 0,0 l 8,4 -8,4 2,-4 z",Backward:"F1 m 8,0 l -2,4 2,4 -8,-4 z",Triangle:"F1 m 0,0 l 8,4.62 -8,4.62 z",BackwardTriangle:"F1 m 8,4 l 0,4 -8,-4 8,-4 0,4 z",Boomerang:"F1 m 0,0 l 8,4 -8,4 4,-4 -4,-4 z",BackwardBoomerang:"F1 m 8,0 l -8,4 8,4 -4,-4 4,-4 z",SidewaysV:"m 0,0 l 8,4 -8,4 0,-1 6,-3 -6,-3 0,-1 z",BackwardV:"m 8,0 l -8,4 8,4 0,-1 -6,-3 6,-3 0,-1 z",OpenTriangle:"m 0,0 l 8,4 -8,4",BackwardOpenTriangle:"m 8,0 l -8,4 8,4",OpenTriangleLine:"m 0,0 l 8,4 -8,4 m 8.5,0 l 0,-8",BackwardOpenTriangleLine:"m 8,0 l -8,4 8,4 m -8.5,0 l 0,-8",OpenTriangleTop:"m 0,0 l 8,4 m 0,4",BackwardOpenTriangleTop:"m 8,0 l -8,4 m 0,4",OpenTriangleBottom:"m 0,8 l 8,-4",BackwardOpenTriangleBottom:"m 0,4 l 8,4",HalfTriangleTop:"F1 m 0,0 l 0,4 8,0 z m 0,8",BackwardHalfTriangleTop:"F1 m 8,0 l 0,4 -8,0 z m 0,8",HalfTriangleBottom:"F1 m 0,4 l 0,4 8,-4 z",BackwardHalfTriangleBottom:"F1 m 8,4 l 0,4 -8,-4 z",ForwardSemiCircle:"m 4,0 b 270 180 0 4 4",BackwardSemiCircle:"m 4,8 b 90 180 0 -4 4",Feather:"m 0,0 l 3,4 -3,4",BackwardFeather:"m 3,0 l -3,4 3,4",DoubleFeathers:"m 0,0 l 3,4 -3,4 m 3,-8 l 3,4 -3,4",BackwardDoubleFeathers:"m 3,0 l -3,4 3,4 m 3,-8 l -3,4 3,4",TripleFeathers:"m 0,0 l 3,4 -3,4 m 3,-8 l 3,4 -3,4 m 3,-8 l 3,4 -3,4",BackwardTripleFeathers:"m 3,0 l -3,4 3,4 m 3,-8 l -3,4 3,4 m 3,-8 l -3,4 3,4",ForwardSlash:"m 0,8 l 5,-8",BackSlash:"m 0,0 l 5,8",DoubleForwardSlash:"m 0,8 l 4,-8 m -2,8 l 4,-8",DoubleBackSlash:"m 0,0 l 4,8 m -2,-8 l 4,8",TripleForwardSlash:"m 0,8 l 4,-8 m -2,8 l 4,-8 m -2,8 l 4,-8",TripleBackSlash:"m 0,0 l 4,8 m -2,-8 l 4,8 m -2,-8 l 4,8",Fork:"m 0,4 l 8,0 m -8,0 l 8,-4 m -8,4 l 8,4",BackwardFork:"m 8,4 l -8,0 m 8,0 l -8,-4 m 8,4 l -8,4",LineFork:"m 0,0 l 0,8 m 0,-4 l 8,0 m -8,0 l 8,-4 m -8,4 l 8,4",BackwardLineFork:"m 8,4 l -8,0 m 8,0 l -8,-4 m 8,4 l -8,4 m 8,-8 l 0,8",CircleFork:"F1 m 6,4 b 0 360 -3 0 3 z m 0,0 l 6,0 m -6,0 l 6,-4 m -6,4 l 6,4",BackwardCircleFork:"F1 m 0,4 l 6,0 m -6,-4 l 6,4 m -6,4 l 6,-4 m 6,0 b 0 360 -3 0 3",CircleLineFork:"F1 m 6,4 b 0 360 -3 0 3 z m 1,-4 l 0,8 m 0,-4 l 6,0 m -6,0 l 6,-4 m -6,4 l 6,4",BackwardCircleLineFork:"F1 m 0,4 l 6,0 m -6,-4 l 6,4 m -6,4 l 6,-4 m 0,-4 l 0,8 m 7,-4 b 0 360 -3 0 3",Circle:"F1 m 8,4 b 0 360 -4 0 4 z",Block:"F1 m 0,0 l 0,8 8,0 0,-8 z",StretchedDiamond:"F1 m 0,3 l 5,-3 5,3 -5,3 -5,-3 z",Diamond:"F1 m 0,4 l 4,-4 4,4 -4,4 -4,-4 z",Chevron:"F1 m 0,0 l 5,0 3,4 -3,4 -5,0 3,-4 -3,-4 z",StretchedChevron:"F1 m 0,0 l 8,0 3,4 -3,4 -8,0 3,-4 -3,-4 z",NormalArrow:"F1 m 0,2 l 4,0 0,-2 4,4 -4,4 0,-2 -4,0 z",X:"m 0,0 l 8,8 m 0,-8 l -8,8",TailedNormalArrow:"F1 m 0,0 l 2,0 1,2 3,0 0,-2 2,4 -2,4 0,-2 -3,0 -1,2 -2,0 1,-4 -1,-4 z",DoubleTriangle:"F1 m 0,0 l 4,4 -4,4 0,-8 z m 4,0 l 4,4 -4,4 0,-8 z",BigEndArrow:"F1 m 0,0 l 5,2 0,-2 3,4 -3,4 0,-2 -5,2 0,-8 z",ConcaveTailArrow:"F1 m 0,2 h 4 v -2 l 4,4 -4,4 v -2 h -4 l 2,-2 -2,-2 z",RoundedTriangle:"F1 m 0,1 a 1,1 0 0 1 1,-1 l 7,3 a 0.5,1 0 0 1 0,2 l -7,3 a 1,1 0 0 1 -1,-1 l 0,-6 z",SimpleArrow:"F1 m 1,2 l -1,-2 2,0 1,2 -1,2 -2,0 1,-2 5,0 0,-2 2,2 -2,2 0,-2 z",AccelerationArrow:"F1 m 0,0 l 0,8 0.2,0 0,-8 -0.2,0 z m 2,0 l 0,8 1,0 0,-8 -1,0 z m 3,0 l 2,0 2,4 -2,4 -2,0 0,-8 z",BoxArrow:"F1 m 0,0 l 4,0 0,2 2,0 0,-2 2,4 -2,4 0,-2 -2,0 0,2 -4,0 0,-8 z",TriangleLine:"F1 m 8,4 l -8,-4 0,8 8,-4 z m 0.5,4 l 0,-8",CircleEndedArrow:"F1 m 10,4 l -2,-3 0,2 -2,0 0,2 2,0 0,2 2,-3 z m -4,0 b 0 360 -3 0 3 z",DynamicWidthArrow:"F1 m 0,3 l 2,0 2,-1 2,-2 2,4 -2,4 -2,-2 -2,-1 -2,0 0,-2 z",EquilibriumArrow:"m 0,3 l 8,0 -3,-3 m 3,5 l -8,0 3,3",FastForward:"F1 m 0,0 l 3.5,4 0,-4 3.5,4 0,-4 1,0 0,8 -1,0 0,-4 -3.5,4 0,-4 -3.5,4 0,-8 z",Kite:"F1 m 0,4 l 2,-4 6,4 -6,4 -2,-4 z",HalfArrowTop:"F1 m 0,0 l 4,4 4,0 -8,-4 z m 0,8",HalfArrowBottom:"F1 m 0,8 l 4,-4 4,0 -8,4 z",OpposingDirectionDoubleArrow:"F1 m 0,4 l 2,-4 0,2 4,0 0,-2 2,4 -2,4 0,-2 -4,0 0,2 -2,-4 z",PartialDoubleTriangle:"F1 m 0,0 4,3 0,-3 4,4 -4,4 0,-3 -4,3 0,-8 z",LineCircle:"F1 m 0,0 l 0,8 m 7 -4 b 0 360 -3 0 3 z",DoubleLineCircle:"F1 m 0,0 l 0,8 m 2,-8 l 0,8 m 7 -4 b 0 360 -3 0 3 z",TripleLineCircle:"F1 m 0,0 l 0,8 m 2,-8 l 0,8 m 2,-8 l 0,8 m 7 -4 b 0 360 -3 0 3 z",CircleLine:"F1 m 6 4 b 0 360 -3 0 3 z m 1,-4 l 0,8",DiamondCircle:"F1 m 8,4 l -4,4 -4,-4 4,-4 4,4 m 8,0 b 0 360 -4 0 4 z",PlusCircle:"F1 m 8,4 b 0 360 -4 0 4 l -8 0 z m -4 -4 l 0 8",OpenRightTriangleTop:"m 8,0 l 0,4 -8,0 m 0,4",OpenRightTriangleBottom:"m 8,8 l 0,-4 -8,0",Line:"m 0,0 l 0,8",DoubleLine:"m 0,0 l 0,8 m 2,0 l 0,-8",TripleLine:"m 0,0 l 0,8 m 2,0 l 0,-8 m 2,0 l 0,8",PentagonArrow:"F1 m 8,4 l -4,-4 -4,0 0,8 4,0 4,-4 z"};function Tv(){this.nc=!1,this.tr=this.Kp=this.zq=null,this.vr="",this.fr=this.oq=this.ur=null,this.hr="",this.gr=yr,this.ir=null,this.jr="",this.lr=Bo,this.Gq="",this.Hq=Sr,this.Pq=Hn,this.Kq=gi,this.Up=null,this.Cq=127,this.zr=ci,this.yr="gray",this.Vg=4}Tv.prototype.copy=function(){var a=new Tv;return a.zq=this.zq,a.Kp=this.Kp,a.tr=this.tr,a.vr=this.vr,a.ur=this.ur,a.oq=this.oq,a.fr=this.fr,a.hr=this.hr,a.gr=this.gr.J(),a.ir=this.ir,a.jr=this.jr,a.lr=this.lr.J(),a.Gq=this.Gq,a.Hq=this.Hq.J(),a.Pq=this.Pq.J(),a.Kq=this.Kq.J(),a.Up=this.Up,a.Cq=this.Cq,a.zr=this.zr.J(),a.yr=this.yr,a.Vg=this.Vg,a};function Li(a,y){a===void 0||a instanceof Qo||typeof a=="string"?mn.call(this,a):(mn.call(this),a&&(y=a)),this.G=2408959,this.Tf="",this.P=null,this.Jg="",this.Qf=this.Ug=null,this.ec="",this.Ah=this.Ig=null,this.ke=new At(NaN,NaN).freeze(),this.nf=null,this.Ao=NaN,this.vw=-1,this.py=new Ee,this.Rh=null,this.ag=NaN,y&&Object.assign(this,y)}we(Li,mn),Li.prototype.cloneProtected=function(a){mn.prototype.cloneProtected.call(this,a),a.G=this.G&-4097|49152,a.Tf=this.Tf,this.P!==null&&(a.P=this.P.nc?this.P:this.P.copy()),a.Jg=this.Jg,a.Qf=null,a.ec=this.ec,a.ke.assign(this.ke),a.Ao=this.Ao},Pt=Li.prototype,Pt.Af=function(a){mn.prototype.Af.call(this,a),a.oh(),a.Ug=null,a.nf=null,a.Rh=null},Pt.toString=function(){var a=Yn(this.constructor)+"#"+fr(this);return this.data!==null&&(a+="("+Ni(this.data)+")"),a};function Ss(a){a.P===null?a.P=new Tv:a.P.nc&&(a.P=a.P.copy())}Pt.th=function(){mn.prototype.th.call(this),this.P!==null&&(this.P.nc=!0)},Pt.gk=function(a,y,x,E,b,z,tt){var rt=this.diagram;rt!==null&&(a===Po&&y==="elements"?b instanceof mn?Yd(b,function(ot){sy(rt.partManager,ot),zd(rt,ot)}):td(rt,b):a===Eo&&y==="elements"&&(b instanceof mn?Yd(b,function(ot){ly(rt.partManager,ot,rt)}):Fg(rt,b)),rt.cb(a,y,x,E,b,z,tt))},Pt.La=function(a){if(mn.prototype.La.call(this,a),this.data!==null){for(var y=this.O.s,x=y.length,E=0;E<x;E++){var b=y[E];b instanceof mn&&Yd(b,function(z){z.data!==null&&z.La()})}for(y=this.adornments;y.next();)y.value.La(a)}},Li.prototype.updateRelationshipsFromData=function(){var a;this.data!==null&&((a=this.diagram)===null||a===void 0||a.partManager.updateRelationshipsFromData(this))},Li.prototype.Pj=function(a){var y=this.Qf;return y===null?null:y.I(a)},Li.prototype.bh=function(a,y){if(y!==null){var x=null,E=this.Qf;if(E!==null&&(x=E.I(a)),x!==y){if(x!==null){var b=x.diagram;b!==null&&b.remove(x)}E===null&&(this.Qf=E=new Me),y.Tf!==a&&(y.category=a),E.add(a,y),a=this.diagram,a!==null&&(a.add(y),a=y.adornedObject,a!==null&&(a=a.ih(),a!==null&&(y.data=a.data)))}}},Li.prototype.Jf=function(a){var y=this.Qf;if(y!==null){var x=y.I(a);if(x!==null){var E=x.diagram;E!==null&&E.remove(x)}y.remove(a),y.count===0&&(this.Qf=null)}},Li.prototype.Ej=function(){var a=this.Qf;if(a!==null){var y=On();for(a=a.iterator;a.next();)y.push(a.key);a=y.length;for(var x=0;x<a;x++)this.Jf(y[x]);Qn(y)}},Li.prototype.updateAdornments=function(){var a=this.diagram;if(a!==null){for(var y=this.adornments;y.next();){var x=y.value;x.v(),x.placeholder&&x.placeholder.v()}t:{if(this.isSelected&&this.selectionAdorned&&(y=this.selectionObject,y!==null&&this.actualBounds.w()&&this.isVisible()&&y.Ed()&&y.actualBounds.w())){if(x=this.Pj("Selection"),x===null){if(x=this.selectionAdornmentTemplate,x===null&&(x=this.ph()?a.linkSelectionAdornmentTemplate:this instanceof $i?a.groupSelectionAdornmentTemplate:a.nodeSelectionAdornmentTemplate),!(x instanceof Rr))break t;Sl(x),x=x.copy(),x!==null&&(this.ph()&&this.selectionObject===this.path&&(x.type=mn.Link),x.adornedObject=y)}if(x!==null){x.type===mn.Link&&x.v(),this.bh("Selection",x);break t}}this.Jf("Selection")}for(Cx(this,a),y=this.adornments;y.next();)y.value.La()}},Li.prototype.Wb=function(){var a=this.diagram;a!==null&&(a.vd=!0,!(this.G&16384)&&(this.G|=16384))};function Ov(a){a.G&16384&&(a.updateAdornments(),a.G&=-16385)}function Cx(a,y){y.toolManager.mouseDownTools.each(function(x){x.isEnabled&&x.updateAdornments(a)}),y.toolManager.updateAdornments(a)}function jm(a){if(rd(a)===!1){Rv(a,!0),a.Uk();var y=a.diagram;y!==null&&(y.De.add(a),y.$b())}}function N1(a){if(a.G|=2097152,rd(a)!==!1){var y=a.position,x=a.location;x.w()&&y.w()||T1(a,y,x),x=a.Ib;var E=Ee.alloc().assign(x);x.ka(),x.x=y.x,x.y=y.y,x.freeze(),a.Xl(E,x),Ee.free(E),Rv(a,!1)}}Li.prototype.Ge=function(a,y,x,E){var b=this.uc;b.h(a,y,x,E),this.Lb===null&&(this.Lb=new Ii);var z=this.Lb;z.reset(),this.no(z,a,y,x,E),this.Lb=z,z.ws()||z.pp(b)},Li.prototype.no=function(a,y,x,E,b){if(this.Ca!==1&&a.scale(this.Ca),this.Kb!==0){var z=er;this.locationSpot.sb()&&(z=this.locationSpot);var tt=At.alloc();if(this.locationObject!==this)for(y=this.locationObject,x=y.naturalBounds,tt.yi(x.x,x.y,x.width,x.height,z),y.Lb!==null&&y.Lb.Ga(tt),tt.offset(-y.measuredBounds.x,-y.measuredBounds.y),z=y.panel;z!==null&&z!==this;)z.Lb!==null&&z.Lb.Ga(tt),tt.offset(-z.measuredBounds.x,-z.measuredBounds.y),z=z.panel;else tt.yi(y,x,E,b,z);a.rotate(this.Kb,tt.x,tt.y),At.free(tt)}},Li.prototype.move=function(a,y){y===!0?this.location=a:this.position=a},Li.prototype.moveTo=function(a,y,x){a=At.allocAt(a,y),this.move(a,x),At.free(a)},Li.prototype.isVisible=function(){if(!this.visible)return!1;var a=this.layer;if(a!==null){if(!a.visible)return!1;if(a=a.diagram,a!==null&&a.animationManager.fv(this))return!0}return a=this.containingGroup,!!(a===null||a.isSubGraphExpanded&&a.isVisible())},Li.prototype.Zb=function(a){var y=this.diagram;a?(this.C(4),this.Wb(),y!==null&&y.De.add(this)):(this.C(8),this.Ej()),this.oh(),y!==null&&(y.Ya(),y.N())},Li.prototype.fb=function(a){if(this.name===a)return this;var y=this.Rh;if(y===null&&(this.Rh=y=new Me),y.I(a)!==null)return y.I(a);var x=mn.prototype.fb.call(this,a);return x!==null?(y.set(a,x),x):(y.set(a,null),null)};function Ch(a,y,x,E){E===void 0&&(E=new At),x=x.Mc()?er:x;var b=y.naturalBounds;if(E.h(b.width*x.x+x.offsetX,b.height*x.y+x.offsetY),y===null||y===a)return E;for(y.transform.Ga(E),y=y.panel;y!==null&&y!==a;)y.transform.Ga(E),y=y.panel;return a.Lb!==null&&a.Lb.Ga(E),E.offset(-a.uc.x,-a.uc.y),E}Li.prototype.mi=function(a){return a===void 0&&(a=new Ee),a.assign(this.actualBounds)},Li.prototype.Va=function(){this.measure(1/0,1/0),this.arrange()};function D1(a){var y=At.alloc(),x=a.locationObject,E=x.naturalBounds,b=x instanceof lr?x.strokeWidth:0;if(y.yi(0,0,E.width+b,E.height+b,a.locationSpot),x!==a)for(y.offset(-b/2,-b/2),x.transform.Ga(y),x=x.panel;x!==null&&x!==a;)x.transform.Ga(y),x=x.panel;return a.Lb!==null&&a.Lb.Ga(y),y.offset(-a.uc.x,-a.uc.y),y}function _d(a,y){var x=a.py;isNaN(a.ag)&&(a.ag=u1(a));var E=a.ag,b=2*E;if(!a.isShadowed)return x.h(y.x-1-E,y.y-1-E,y.width+2+b,y.height+2+b),x;E=y.x,b=y.y;var z=y.width;y=y.height;var tt=a.shadowBlur;return a=a.shadowOffset,z+=tt,y+=tt,E-=tt/2,b-=tt/2,0<a.x?z+=a.x:(E+=a.x,z-=a.x),0<a.y?y+=a.y:(b+=a.y,y-=a.y),x.h(E-1,b-1,z+2,y+2),x}Li.prototype.arrange=function(){if(ns(this)===!1)N1(this);else{bu(this,!1);var a=this.Ib,y=Ee.alloc();y.assign(a);var x=od(this);this.eh(0,0,this.uc.width,this.uc.height);var E=this.position;T1(this,E,this.location),a.ka(),a.x=E.x,a.y=E.y,a.freeze(),this.Xl(y,a),y.D(a)?this.Fd(x):!this.Zc()||ue.B(y.width,a.width)&&ue.B(y.height,a.height)||0<=this.vw&&this.C(16),Ee.free(y),Rv(this,!1)}},Pt=Li.prototype,Pt.Xl=function(a,y){var x=this.diagram;if(x!==null){var E=!1;if(x.Zi===!1&&a.w()){var b=Ee.alloc();b.assign(x.documentBounds),b.Fv(x.padding),a.x>b.x&&a.y>b.y&&a.right<b.right&&a.bottom<b.bottom&&y.x>b.x&&y.y>b.y&&y.right<b.right&&y.bottom<b.bottom&&(E=!0),Ee.free(b)}!(this.G&65536)&&a.D(y)||R1(this,E,x),x.N(),!a.w()&&!y.w()||vr(a,y)||(this instanceof Un&&!x.undoManager.isUndoingRedoing&&this.Bd(),this.oh())}},Pt.zv=function(a,y,x){if(this.ph()||!a.w())return!1;var E=this.diagram;return E!==null&&B1(this,E,a,y,x),this.pa=a,this.G&=-2097153,!this.ke.w()||E!==null&&!E.animationManager.isTicking&&E.undoManager.isUndoingRedoing||(E=this.ke,this.ke=new At(E.x+(a.x-y),E.y+(a.y-x)),this.g("location",E,this.ke.copy())),rd(this)===!1&&ns(this)===!1&&(jm(this),N1(this)),!0};function B1(a,y,x,E,b){y===null||a instanceof Rr||(y=y.animationManager,y.zb&&of(y,a,new At(E,b),x))}Pt.mm=function(a,y,x){var E=this.ke,b=this.pa;if(x){if(E.x===a&&E.y===y)return;rd(this)||ns(this)?b.h(NaN,NaN):b.h(b.x+a-E.x,b.y+y-E.y),E.h(a,y)}else{if(b.x===a&&b.y===y)return;E.h(E.x+a-b.x,E.y+y-b.y),b.h(a,y)}jm(this)},Pt.Av=function(){this.G&=-2097153,jm(this)};function T1(a,y,x){var E=D1(a),b=a.diagram,z=x.w(),tt=y.w();z&&tt?a.G&2097152?O1(a,y,x,b,E):I1(a,y,x,b,E):z?O1(a,y,x,b,E):tt&&I1(a,y,x,b,E),a.G|=2097152,At.free(E),a.Uk()}function O1(a,y,x,E,b){var z=y.x,tt=y.y;y.h(x.x-b.x,x.y-b.y),E!==null&&(x=E.animationManager,(E=x.defaultAnimation.isAnimating)||!x.zb||a instanceof Rr||of(x,a,new At(z,tt),y),E||y.x===z&&y.y===tt||a.g("position",new At(z,tt),y.copy()))}function I1(a,y,x,E,b){var z=x.copy();x.h(y.x+b.x,y.y+b.y),x.D(z)||E===null||a.g("location",z,x.copy())}function R1(a,y,x){jv(a,!1),a instanceof Un&&mh(x,a),a.layer.isTemporary||y||x.Ya(),y=a.Ib;var E=x.viewportBounds;E.w()?od(a)?(Yr(y,E)||a.Fd(!1),a.updateAdornments()):a.isVisible()&&y.Yc(E)?(a.Fd(!0),a.updateAdornments()):a.Wb():x.vd=!0}Pt.si=function(){return!0},Pt.Zc=function(){return!0},Pt.ph=function(){return!1},Pt.Dd=function(){return!0};function Iv(a,y,x,E){y.constructor===a.constructor||G1||(G1=!0,zn('Should not change the class of the Part when changing category from "'+x+'" to "'+E+'"'),zn(" Old class: "+Yn(a.constructor)+", new class: "+Yn(y.constructor)+", part: "+a.toString())),a.Ej();var b=a.data;x=a.layerName;var z=a.isSelected,tt=a.isHighlighted,rt=!0,ot=!0,st=!1;a instanceof Un&&(rt=a.isTreeLeaf,ot=a.isTreeExpanded,st=a.wasTreeExpanded),y.Af(a),y.cloneProtected(a),a.Tf=E,a.svg!==null&&(a.svg.remove(),a.svg=null,a.Uc=!0),a.v(),a.N(),y=a.diagram,E=!0,y!==null&&(E=y.skipsUndoManager,y.skipsUndoManager=!0),a.ub=b,a.G=z?a.G|4096:a.G&-4097,a.G=tt?a.G|524288:a.G&-524289,a instanceof Un&&(a.U=rt?a.U|4:a.U&-5,a.U=ot?a.U|1:a.U&-2,a.U=st?a.U|2:a.U&-3),b!==null&&a.La(),b=a.layerName,b!==x&&(a.Jg=x,a.layerName=b),y!==null&&(y.skipsUndoManager=E),a.Zc()&&a.C(64)}Li.prototype.canCopy=function(){if(!this.copyable)return!1;var a=this.layer;return a===null?!0:a.allowCopy?(a=a.diagram,a===null?!0:!!a.allowCopy):!1},Li.prototype.canDelete=function(){if(!this.deletable)return!1;var a=this.layer;return a===null?!0:a.allowDelete?(a=a.diagram,a===null?!0:!!a.allowDelete):!1},Li.prototype.canEdit=function(){if(!this.textEditable)return!1;var a=this.layer;return a===null?!0:a.allowTextEdit?(a=a.diagram,a===null?!0:!!a.allowTextEdit):!1},Li.prototype.canGroup=function(){if(!this.groupable)return!1;var a=this.layer;return a===null?!0:a.allowGroup?(a=a.diagram,a===null?!0:!!a.allowGroup):!1},Li.prototype.canMove=function(){if(!this.movable)return!1;var a=this.layer;return a===null?!0:a.allowMove?(a=a.diagram,a===null?!0:!!a.allowMove):!1},Li.prototype.canReshape=function(){if(!this.reshapable)return!1;var a=this.layer;return a===null?!0:a.allowReshape?(a=a.diagram,a===null?!0:!!a.allowReshape):!1},Li.prototype.canResize=function(){if(!this.resizable)return!1;var a=this.layer;return a===null?!0:a.allowResize?(a=a.diagram,a===null?!0:!!a.allowResize):!1},Li.prototype.canRotate=function(){if(!this.rotatable)return!1;var a=this.layer;return a===null?!0:a.allowRotate?(a=a.diagram,a===null?!0:!!a.allowRotate):!1},Li.prototype.canSelect=function(){if(!this.selectable)return!1;var a=this.layer;return a===null?!0:a.allowSelect?(a=a.diagram,a===null?!0:!!a.allowSelect):!1};function rd(a){return(a.G&32768)!==0}function Rv(a,y){a.G=y?a.G|32768:a.G&-32769}function jv(a,y){a.G=y?a.G|65536:a.G&-65537}function od(a){return(a.G&131072)!==0}Pt=Li.prototype,Pt.Fd=function(a){this.G=a?this.G|131072:this.G&-131073};function zm(a,y){a.G=y?a.G|1048576:a.G&-1048577}Pt.oh=function(){var a=this.containingGroup;a!==null&&(a.v(),a.placeholder!==null&&a.placeholder.v(),a.Bd())},Pt.N=function(){var a=this.diagram;a!==null&&!ns(this)&&!rd(this)&&this.isVisible()&&this.Ib.w()&&a.N(_d(this,this.Ib))},Pt.v=function(){mn.prototype.v.call(this);var a=this.diagram;a!==null&&(a.De.add(this),this instanceof Un&&this.labeledLink!==null&&es(this.labeledLink),a.$b(!0))},Pt.Vo=function(a){a||(a=this.Ah,a!==null&&Wv(a,this))},Pt.Wo=function(a){a||(a=this.Ah,a!==null&&Vv(a,this))},Pt.Lj=function(){var a=this.data;if(a!==null){var y=this.diagram;y!==null&&(y=y.model,y!==null&&y.cm(a))}},Pt.oz=function(){return zv(this,this)};function zv(a,y){var x=y.containingGroup;return x!==null?1+zv(a,x):y instanceof Un&&(y=y.labeledLink,y!==null)?zv(a,y):0}Pt.sz=function(){return j1(this,this)};function j1(a,y){var x=y.containingGroup;return x!==null||y instanceof Un&&(x=y.labeledLink,x!==null)?j1(a,x):y}Pt.Td=function(a){return a instanceof $i?Gv(this,this,a):!1};function Gv(a,y,x){if(y===x||x===null)return!1;var E=y.containingGroup;return E===null||E!==x&&!Gv(a,E,x)?y instanceof Un&&(y=y.labeledLink,y!==null)?Gv(a,y,x):!1:!0}Pt.px=function(a){if(a===null)return null;if(this===a)return this.containingGroup;for(var y=this;y!==null;){if(y instanceof $i&&zm(y,!0),y instanceof Un){var x=y.labeledLink;x!==null&&(y=x)}y=y.containingGroup}for(x=null,y=a;y!==null;){if(y.G&1048576){x=y;break}y instanceof Un&&(a=y.labeledLink,a!==null&&(y=a)),y=y.containingGroup}for(y=this;y!==null;)y instanceof $i&&zm(y,!1),y instanceof Un&&(a=y.labeledLink,a!==null&&(y=a)),y=y.containingGroup;return x},Li.prototype.canLayout=function(){if(!this.isLayoutPositioned||!this.isVisible())return!1;var a=this.layer;return!(a!==null&&a.isTemporary||this instanceof Un&&this.isLinkLabel)},Li.prototype.C=function(a){if(a===void 0&&(a=16777215),this.isLayoutPositioned&&a&this.layoutConditions){var y=this.layer;y!==null&&y.isTemporary||this instanceof Un&&this.isLinkLabel?y=!1:(y=this.diagram,y=!(y!==null&&y.undoManager.isUndoingRedoing))}else y=!1;if(y)if(y=this.Ah,y!==null){var x=y.layout;x!==null?x.C():y.C(a)}else a=this.diagram,a!==null&&(a=a.layout,a!==null&&a.C())};function z1(a){return a.isVisible()?(a=a.layer,!(a!==null&&a.isTemporary)):!1}function ad(a,y,x,E,b,z){if(z===void 0&&(z=null),!(a.contains(y)||z!==null&&!z(y)||y instanceof Rr)){if(a.add(y),y instanceof Un){if(x&&y instanceof $i)for(var tt=y.memberParts;tt.next();)ad(a,tt.value,x,E,b,z);if(b!==!1)for(tt=y.linksConnected;tt.next();){var rt=tt.value;if(!a.contains(rt)){var ot=rt.fromNode,st=rt.toNode;ot=ot===null||a.contains(ot),st=st===null||a.contains(st),(b?ot&&st:ot||st)&&ad(a,rt,x,E,b,z)}}if(1<E)for(y=y.Ou();y.next();)ad(a,y.value,x,E-1,b,z)}else if(y instanceof En)for(y=y.labelNodes;y.next();)ad(a,y.value,x,E,b,z)}}ge.Object.defineProperties(Li.prototype,{key:{get:function(){var a=this.diagram;if(a!==null)return a.model.wa(this.data)}},adornments:{get:function(){return this.Qf===null?Vi:this.Qf.iteratorValues}},layer:{get:function(){return this.Ig}},diagram:{get:function(){var a=this.Ig;return a==null?null:a.diagram}},layerName:{get:function(){return this.Jg},set:function(a){var y=this.Jg;if(y!==a){var x=this.diagram;if((x===null||x.Qj(a)!==null&&!x.partManager.addsToTemporaryLayer)&&(this.Jg=a,x!==null&&x.Ya(),this.g("layerName",y,a),y=this.layer,y!==null&&y.name!==a&&(x=y.diagram,x!==null&&(a=x.Qj(a),a!==null&&a!==y)))){var E=y.pc(-1,this,!0);if(0<=E&&x.cb(Eo,"parts",y,this,null,E,!0),E=a.oi(99999999,this,!0),y.visible!==a.visible&&this.Zb(a.visible),0<=E&&x.cb(Po,"parts",a,null,this,!0,E),E=this.layerChanged,E!==null){var b=x.aa;x.aa=!0,E(this,y,a),x.aa=b}}}}},layerChanged:{get:function(){return this.P!==null?this.P.zq:null},set:function(a){var y=this.layerChanged;y!==a&&(Ss(this),this.P.zq=a,this.g("layerChanged",y,a))}},zOrder:{get:function(){return this.Ao},set:function(a){var y=this.Ao;if(y!==a){this.Ao=a;var x=this.layer;x!==null&&lf(x,-1,this),this.g("zOrder",y,a),a=this.diagram,a!==null&&a.N()}}},locationObject:{get:function(){if(this.nf===null){var a=this.locationObjectName;a!==""?(a=this.fb(a),a!==null?this.nf=a:this.nf=this):this instanceof Rr?this.type!==mn.Link&&this.placeholder!==null?this.nf=this.placeholder:this.nf=this:this.nf=this}return this.nf.visible?this.nf:this}},minLocation:{get:function(){return this.P!==null?this.P.Pq:Hn},set:function(a){var y=this.minLocation;y.D(a)||(a=a.J(),Ss(this),this.P.Pq=a,this.g("minLocation",y,a))}},maxLocation:{get:function(){return this.P!==null?this.P.Kq:gi},set:function(a){var y=this.maxLocation;y.D(a)||(a=a.J(),Ss(this),this.P.Kq=a,this.g("maxLocation",y,a))}},locationObjectName:{get:function(){return this.P!==null?this.P.Gq:""},set:function(a){var y=this.locationObjectName;y!==a&&(Ss(this),this.P.Gq=a,this.nf=null,this.v(),this.g("locationObjectName",y,a))}},locationSpot:{get:function(){return this.P!==null?this.P.Hq:Sr},set:function(a){var y=this.locationSpot;y.D(a)||(a=a.J(),Ss(this),this.P.Hq=a,this.v(),this.g("locationSpot",y,a))}},location:{get:function(){return this.ke},set:function(a){var y=a.x,x=a.y,E=this.ke;if(!(E.x===y||isNaN(E.x)&&isNaN(y))||!(E.y===x||isNaN(E.y)&&isNaN(x))){if(a=a.copy(),y=a,this.ph())y=!1;else{if(this.ke=y,this.G|=2097152,ns(this)===!1&&(jm(this),x=this.pa,x.w())){var b=this.diagram;if(b===null||b.animationManager.isTicking||!b.undoManager.isUndoingRedoing){var z=x.copy();x.h(x.x+(y.x-E.x),x.y+(y.y-E.y)),B1(this,b,x,z.x,z.y),this.g("position",z,x.copy())}}y=!0}y&&this.g("location",E,a.copy())}}},category:{get:function(){return this.Tf},set:function(a){var y=this.Tf;if(y!==a){this.svg!==null&&(this.svg.remove(),this.Uc=!0);var x=this.diagram,E=this.data,b=null;if(x!==null&&E!==null&&!(this instanceof Rr)){var z=x.model.undoManager;z.isEnabled&&!z.isUndoingRedoing&&(b=this.clone(),b.O.addAll(this.O))}this.Tf=a,this.g("category",y,a),x===null||E===null||this instanceof Rr?this instanceof Rr&&(b=this.adornedPart,b!==null&&(a=b.Qf,a!==null&&a.remove(y),b.bh(this.category,this))):(z=x.model,z.undoManager.isUndoingRedoing||(this.ph()?(x.partManager.setLinkCategoryForData(E,a),x=x.partManager.findLinkTemplateForCategory(a),x!==null&&(Sl(x),x=x.copy(),x!==null&&Iv(this,x,y,a))):(z!==null&&z.jm(E,a),x=dS(x.partManager,E,a),x!==null&&(Sl(x),x=x.copy(),x===null||x instanceof En||(E=this.location.copy(),Iv(this,x,y,a),this.location.w()||(this.location=E)))),b!==null&&(y=this.clone(),y.O.addAll(this.O),this.g("self",b,y))))}}},self:{get:function(){return this},set:function(a){Iv(this,a,this.category,a.category)}},copyable:{get:function(){return(this.G&1)!==0},set:function(a){var y=(this.G&1)!==0;y!==a&&(this.G^=1,this.g("copyable",y,a))}},deletable:{get:function(){return(this.G&2)!==0},set:function(a){var y=(this.G&2)!==0;y!==a&&(this.G^=2,this.g("deletable",y,a))}},textEditable:{get:function(){return(this.G&4)!==0},set:function(a){var y=(this.G&4)!==0;y!==a&&(this.G^=4,this.g("textEditable",y,a),this.Wb())}},groupable:{get:function(){return(this.G&8)!==0},set:function(a){var y=(this.G&8)!==0;y!==a&&(this.G^=8,this.g("groupable",y,a))}},movable:{get:function(){return(this.G&16)!==0},set:function(a){var y=(this.G&16)!==0;y!==a&&(this.G^=16,this.g("movable",y,a))}},selectionAdorned:{get:function(){return(this.G&32)!==0},set:function(a){var y=(this.G&32)!==0;y!==a&&(this.G^=32,this.g("selectionAdorned",y,a),this.Wb())}},isInDocumentBounds:{get:function(){return(this.G&64)!==0},set:function(a){var y=(this.G&64)!==0;if(y!==a){this.G^=64;var x=this.diagram;x!==null&&x.Ya(),this.g("isInDocumentBounds",y,a)}}},isLayoutPositioned:{get:function(){return(this.G&128)!==0},set:function(a){var y=(this.G&128)!==0;y!==a&&(this.G^=128,this.g("isLayoutPositioned",y,a),this.C(a?4:8))}},selectable:{get:function(){return(this.G&256)!==0},set:function(a){var y=(this.G&256)!==0;y!==a&&(this.G^=256,this.g("selectable",y,a),this.Wb())}},reshapable:{get:function(){return(this.G&512)!==0},set:function(a){var y=(this.G&512)!==0;y!==a&&(this.G^=512,this.g("reshapable",y,a),this.Wb())}},resizable:{get:function(){return(this.G&1024)!==0},set:function(a){var y=(this.G&1024)!==0;y!==a&&(this.G^=1024,this.g("resizable",y,a),this.Wb())}},rotatable:{get:function(){return(this.G&2048)!==0},set:function(a){var y=(this.G&2048)!==0;y!==a&&(this.G^=2048,this.g("rotatable",y,a),this.Wb())}},isSelected:{get:function(){return(this.G&4096)!==0},set:function(a){var y=(this.G&4096)!==0;if(y!==a){var x=this.diagram;if(!a||this.canSelect()&&!(x!==null&&x.selection.count>=x.maxSelectionCount)){this.G^=4096;var E=!1;if(x!==null){E=x.skipsUndoManager,x.skipsUndoManager=!0;var b=x.selection;b.ka(),a?b.add(this):b.remove(this),b.freeze()}this.g("isSelected",y,a),this.Wb(),a=this.selectionChanged,a!==null&&a(this),x!==null&&(x.$b(),x.skipsUndoManager=E)}}}},isHighlighted:{get:function(){return(this.G&524288)!==0},set:function(a){var y=(this.G&524288)!==0;if(y!==a){this.G^=524288;var x=this.diagram;x!==null&&(x=x.highlighteds,x.ka(),a?x.add(this):x.remove(this),x.freeze()),this.g("isHighlighted",y,a),this.N(),a=this.highlightedChanged,a!==null&&a(this)}}},isShadowed:{get:function(){return(this.G&8192)!==0},set:function(a){var y=(this.G&8192)!==0;y!==a&&(this.G^=8192,this.Uc=!0,this.g("isShadowed",y,a),this.N())}},isAnimated:{get:function(){return(this.G&262144)!==0},set:function(a){var y=(this.G&262144)!==0;y!==a&&(this.G^=262144,this.g("isAnimated",y,a))}},highlightedChanged:{get:function(){return this.P!==null?this.P.oq:null},set:function(a){var y=this.highlightedChanged;y!==a&&(Ss(this),this.P.oq=a,this.g("highlightedChanged",y,a))}},selectionObjectName:{get:function(){return this.P!==null?this.P.vr:""},set:function(a){var y=this.selectionObjectName;y!==a&&(Ss(this),this.P.vr=a,this.Ug=null,this.g("selectionObjectName",y,a))}},selectionAdornmentTemplate:{get:function(){return this.P!==null?this.P.tr:null},set:function(a){var y=this.selectionAdornmentTemplate;y!==a&&(Ss(this),this.P.tr=a,this.g("selectionAdornmentTemplate",y,a))}},selectionObject:{get:function(){if(this.Ug===null){var a=this.selectionObjectName;a!==null&&a!==""?(a=this.fb(a),a!==null?this.Ug=a:this.Ug=this):this instanceof En?(a=this.path,a!==null?this.Ug=a:this.Ug=this):this.Ug=this}return this.Ug}},selectionChanged:{get:function(){return this.P!==null?this.P.ur:null},set:function(a){var y=this.selectionChanged;y!==a&&(Ss(this),this.P.ur=a,this.g("selectionChanged",y,a))}},resizeAdornmentTemplate:{get:function(){return this.P!==null?this.P.fr:null},set:function(a){var y=this.resizeAdornmentTemplate;y!==a&&(Ss(this),this.P.fr=a,this.g("resizeAdornmentTemplate",y,a))}},resizeObjectName:{get:function(){return this.P!==null?this.P.hr:""},set:function(a){var y=this.resizeObjectName;y!==a&&(Ss(this),this.P.hr=a,this.g("resizeObjectName",y,a))}},resizeObject:{get:function(){var a=this.resizeObjectName;return a!==""&&(a=this.fb(a),a!==null)?a:this}},resizeCellSize:{get:function(){return this.P!==null?this.P.gr:yr},set:function(a){var y=this.resizeCellSize;y.D(a)||(a=a.J(),Ss(this),this.P.gr=a,this.g("resizeCellSize",y,a))}},rotateAdornmentTemplate:{get:function(){return this.P!==null?this.P.ir:null},set:function(a){var y=this.rotateAdornmentTemplate;y!==a&&(Ss(this),this.P.ir=a,this.g("rotateAdornmentTemplate",y,a))}},rotateObjectName:{get:function(){return this.P!==null?this.P.jr:""},set:function(a){var y=this.rotateObjectName;y!==a&&(Ss(this),this.P.jr=a,this.g("rotateObjectName",y,a))}},rotateObject:{get:function(){var a=this.rotateObjectName;return a!==""&&(a=this.fb(a),a!==null)?a:this}},rotationSpot:{get:function(){return this.P!==null?this.P.lr:Bo},set:function(a){var y=this.rotationSpot;y.D(a)||(a=a.J(),Ss(this),this.P.lr=a,this.g("rotationSpot",y,a))}},text:{get:function(){return this.ec},set:function(a){var y=this.ec;y!==a&&(this.ec=a,this.g("text",y,a))}},containingGroup:{get:function(){return this.Ah},set:function(a){if(this.Zc()){var y=this.Ah;if(y!==a){a===null||this!==a&&!a.Td(this)||(this===a&&Gt("Cannot make a Group a member of itself: "+this.toString()),Gt("Cannot make a Group indirectly contain itself: "+this.toString()+" already contains "+a.toString())),this.C(2);var x=this.diagram;if(y!==null?Vv(y,this):this instanceof $i&&x!==null&&x.ai.remove(this),this.Ah=a,a!==null?Wv(a,this):this instanceof $i&&x!==null&&x.ai.add(this),this.C(1),x!==null&&x.aa){var E=this.data,b=x.model;if(E!==null&&b.Xj()){var z=b.wa(a!==null?a.data:null);b.mp(E,z)}}if(E=this.containingGroupChanged,E!==null&&(b=!0,x!==null&&(b=x.aa,x.aa=!0),E(this,y,a),x!==null&&(x.aa=b)),this instanceof $i){for(x=new qe,ad(x,this,!0,0,!0),x=x.iterator;x.next();)if(E=x.value,E instanceof Un)for(E=E.linksConnected;E.next();)Of(E.value)}if(this instanceof Un){for(x=this.linksConnected;x.next();)Of(x.value);x=this.labeledLink,x!==null&&Of(x)}this.g("containingGroup",y,a),a!==null&&(y=a.layer,y!==null&&lf(y,-1,a))}}else Gt("cannot set the Part.containingGroup of a Link or Adornment")}},containingGroupChanged:{get:function(){return this.P!==null?this.P.Kp:null},set:function(a){var y=this.containingGroupChanged;y!==a&&(Ss(this),this.P.Kp=a,this.g("containingGroupChanged",y,a))}},isTopLevel:{get:function(){return!(this.containingGroup!==null||this instanceof Un&&this.labeledLink!==null)}},layoutConditions:{get:function(){return this.P!==null?this.P.Cq:127},set:function(a){var y=this.layoutConditions;y!==a&&(Ss(this),this.P.Cq=a,this.g("layoutConditions",y,a))}},dragComputation:{get:function(){return this.P!==null?this.P.Up:null},set:function(a){var y=this.dragComputation;y!==a&&(Ss(this),this.P.Up=a,this.g("dragComputation",y,a))}},shadowOffset:{get:function(){return this.P!==null?this.P.zr:ci},set:function(a){var y=this.shadowOffset;y.D(a)||(a=a.J(),Ss(this),this.P.zr=a,this.N(),this.g("shadowOffset",y,a))}},shadowColor:{get:function(){return this.P!==null?this.P.yr:"gray"},set:function(a){var y=this.shadowColor;y!==a&&(Ss(this),this.P.yr=a,this.N(),this.g("shadowColor",y,a))}},shadowBlur:{get:function(){return this.P!==null?this.P.Vg:4},set:function(a){var y=this.shadowBlur;y!==a&&(Ss(this),this.P.Vg=a,this.N(),this.g("shadowBlur",y,a))}}}),Li.prototype.invalidateLayout=Li.prototype.C,Li.prototype.findCommonContainingGroup=Li.prototype.px,Li.prototype.isMemberOf=Li.prototype.Td,Li.prototype.findTopLevelPart=Li.prototype.sz,Li.prototype.findSubGraphLevel=Li.prototype.oz,Li.prototype.ensureBounds=Li.prototype.Va,Li.prototype.getDocumentBounds=Li.prototype.mi,Li.prototype.findObject=Li.prototype.fb,Li.prototype.moveTo=Li.prototype.moveTo,Li.prototype.invalidateAdornments=Li.prototype.Wb,Li.prototype.clearAdornments=Li.prototype.Ej,Li.prototype.removeAdornment=Li.prototype.Jf,Li.prototype.addAdornment=Li.prototype.bh,Li.prototype.findAdornment=Li.prototype.Pj,Li.prototype.updateTargetBindings=Li.prototype.La;var G1=!1;Li.className="Part",Li.LayoutNone=0,Li.LayoutAdded=1,Li.LayoutRemoved=2,Li.LayoutShown=4,Li.LayoutHidden=8,Li.LayoutNodeSized=16,Li.LayoutGroupLayout=32,Li.LayoutNodeReplaced=64,Li.LayoutStandard=127,Li.LayoutAll=16777215;function Rr(a,y){a===void 0||a instanceof Qo||typeof a=="string"?Li.call(this,a):(Li.call(this),a&&(y=a)),this.G&=-257,this.Jg="Adornment",this.ue=null,this.Aw=0,this.Uw=!1,this.j=this.$a=null,y&&Object.assign(this,y)}we(Rr,Li),Rr.prototype.toString=function(){var a=this.adornedPart;return"Adornment("+this.category+")"+(a!==null?a.toString():"")},Rr.prototype.updateRelationshipsFromData=function(){},Rr.prototype.Ul=function(a){var y=this.adornedObject,x=y==null?void 0:y.part;if(x instanceof En&&y instanceof lr){y=x.path,x.Ul(a),a=y.geometry,x=this.O.s,y=x.length;for(var E=0;E<y;E++){var b=x[E];b.isPanelMain&&b instanceof lr&&(b.ua=a)}}},Rr.prototype.si=function(){var a=this.ue;return a===null?!0:(a=a.part,a===null||!ns(a))},Rr.prototype.Zc=function(){return!1},Rr.prototype.gk=function(a,y,x,E,b,z,tt){if(a===Po&&y==="elements"){if(b instanceof rs)this.$a===null&&(this.$a=b);else if(b instanceof mn){var rt=b.Nl(function(ot){return ot instanceof rs});rt instanceof rs&&this.$a===null&&(this.$a=rt)}}else a===Eo&&y==="elements"&&this.$a!==null&&(E===this.$a?this.$a=null:E instanceof mn&&this.$a.rg(E)&&(this.$a=null));Li.prototype.gk.call(this,a,y,x,E,b,z,tt)},Rr.prototype.updateAdornments=function(){},Rr.prototype.Lj=function(){},ge.Object.defineProperties(Rr.prototype,{placeholder:{get:function(){return this.$a}},adornedObject:{get:function(){return this.ue},set:function(a){var y=this.adornedPart,x=null;a!==null&&(x=a.part),y===null||a!==null&&y===x||y.Jf(this.category),this.ue=a,x!==null&&x.bh(this.category,this)}},adornedPart:{get:function(){var a=this.ue;return a!==null?a.part:null}},containingGroup:{get:function(){return null}}}),Rr.className="Adornment";function Hv(){this.nc=!1,this.Vr=this.gj=this.Eq=this.Dq=null,this.yp=Do,this.er=Km,this.Kr=this.ij=this.Nq=this.Mq=null}Hv.prototype.copy=function(){var a=new Hv;return a.Dq=this.Dq,a.Eq=this.Eq,a.gj=this.gj,a.Vr=this.Vr,a.yp=this.yp.J(),a.er=this.er,a.Mq=this.Mq,a.Nq=this.Nq,a.ij=this.ij,a.Kr=this.Kr,a};function Un(a,y){a===void 0||a instanceof Qo||typeof a=="string"?Li.call(this,a):(Li.call(this),a&&(y=a)),this.U=13,this.Ba=null,this.jb=new Xe,this.wc=this.af=this.Yk=null,this.ci=!1,y&&Object.assign(this,y)}we(Un,Li),Un.prototype.cloneProtected=function(a){Li.prototype.cloneProtected.call(this,a),a.U=this.U,this.Ba!==null&&(a.Ba=this.Ba.nc?this.Ba:this.Ba.copy())},Pt=Un.prototype,Pt.Af=function(a){Li.prototype.Af.call(this,a),a.Bd(),a.af=this.af,a.wc=null};function Eh(a){a.Ba===null?a.Ba=new Hv:a.Ba.nc&&(a.Ba=a.Ba.copy())}Pt.th=function(){Li.prototype.th.call(this),this.Ba!==null&&(this.Ba.nc=!0)};function H1(a,y){y!==null&&(a.af===null&&(a.af=new qe),a.af.add(y))}function K1(a,y,x,E){if(y===null||a.af===null)return null;for(var b=a.af.iterator;b.next();){var z=b.value;if(z.Ds===a&&z.cv===y&&z.Ox===x&&z.Px===E||z.Ds===y&&z.cv===a&&z.Ox===E&&z.Px===x)return z}return null}Pt.Lz=function(a,y,x){y==null&&(y=""),x==null&&(x=""),a=K1(this,a,y,x),a!==null&&a.Sl()},Pt.gk=function(a,y,x,E,b,z,tt){a===Po&&y==="elements"?this.wc=null:a===Eo&&y==="elements"&&(this.wc=null),Li.prototype.gk.call(this,a,y,x,E,b,z,tt)},Pt.Bd=function(a){for(var y=this.linksConnected;y.next();){var x=y.value;a!==void 0&&a.contains(x)||(Os(x.fromPort),Os(x.toPort),x.bb())}};function Z1(a,y){for(a=a.linksConnected;a.next();){var x=a.value;(x.fromPort===y||x.toPort===y)&&(Os(x.fromPort),Os(x.toPort),x.bb())}}function Os(a){if(a!==null){var y=a.Zn;y!==null&&y.Sl(),a=a.part,y=a.containingGroup,y===null||a.isVisible()||Os(y.port)}}Pt.si=function(){return!0},Un.prototype.getAvoidableRect=function(a){return a.set(this.actualBounds),a.Co(this.avoidableMargin),a},Un.prototype.findVisibleNode=function(){for(var a=this;a!==null&&!a.isVisible();)a=a.containingGroup;return a},Un.prototype.isVisible=function(){if(!Li.prototype.isVisible.call(this))return!1;var a=!0,y=yh,x=this.diagram;if(x!==null&&(a=x.isTreePathToChildren,y=x.treeCollapsePolicy),y===yh){if(a=this.pg(),a!==null&&!a.isTreeExpanded)return!1}else if(y===Yo){if(a=a?this.Oo():this.Po(),0<a.count&&a.all(function(E){return!E.isTreeExpanded}))return!1}else if(y===xf&&(a=a?this.Oo():this.Po(),0<a.count&&a.any(function(E){return!E.isTreeExpanded})))return!1;return a=this.labeledLink,a!==null?a.isVisible():!0},Un.prototype.Zb=function(a){Li.prototype.Zb.call(this,a);for(var y=this.linksConnected;y.next();){var x=y.value;if(a&&this.containingGroup!==null){var E=x.To(this);E===null||E.Td(this.containingGroup)||x.bb()}x.Zb(a)}},Un.prototype.qx=function(){var a=new qe,y=new qe;return W1(this,this,a,y),y.iterator};function W1(a,y,x,E){if(y!==null&&!x.has(y)){x.add(y);var b=!0,z=a.diagram;z!==null&&(b=z.isTreePathToChildren),y.linksConnected.each(function(tt){tt.isTreeLink?(b?tt.fromNode===y:tt.toNode===y)&&W1(a,b?tt.toNode:tt.fromNode,x,E):E.add(tt)})}}Un.prototype.findLinksConnected=function(a){if(a===void 0&&(a=null),a===null)return this.jb.iterator;var y=new or(this.jb),x=this;return y.predicate=function(E){return E.fromNode===x&&E.fromPortId===a||E.toNode===x&&E.toPortId===a},y},Pt=Un.prototype,Pt.Mo=function(a){a===void 0&&(a=null);var y=new or(this.jb),x=this;return y.predicate=function(E){return E.fromNode!==x?!1:a===null?!0:E.fromPortId===a},y},Pt.Sd=function(a){a===void 0&&(a=null);var y=new or(this.jb),x=this;return y.predicate=function(E){return E.toNode!==x?!1:a===null?!0:E.toPortId===a},y},Pt.Mu=function(a){a===void 0&&(a=null);for(var y=null,x=null,E=this.jb.iterator;E.next();){var b=E.value;b.fromNode===this?(a===null||b.fromPortId===a)&&(b=b.toNode,y!==null?y.add(b):x!==null&&x!==b?(y=new qe,y.add(x),y.add(b)):x=b):b.toNode!==this||a!==null&&b.toPortId!==a||(b=b.fromNode,y!==null?y.add(b):x!==null&&x!==b?(y=new qe,y.add(x),y.add(b)):x=b)}return y!==null?y.iterator:x!==null?new pr(x):Vi},Pt.Po=function(a){a===void 0&&(a=null);for(var y=null,x=null,E=this.jb.iterator;E.next();){var b=E.value;b.fromNode!==this||a!==null&&b.fromPortId!==a||(b=b.toNode,y!==null?y.add(b):x!==null&&x!==b?(y=new qe,y.add(x),y.add(b)):x=b)}return y!==null?y.iterator:x!==null?new pr(x):Vi},Pt.Oo=function(a){a===void 0&&(a=null);for(var y=null,x=null,E=this.jb.iterator;E.next();){var b=E.value;b.toNode!==this||a!==null&&b.toPortId!==a||(b=b.fromNode,y!==null?y.add(b):x!==null&&x!==b?(y=new qe,y.add(x),y.add(b)):x=b)}return y!==null?y.iterator:x!==null?new pr(x):Vi},Pt.jz=function(a,y,x){y===void 0&&(y=null),x===void 0&&(x=null);var E=new or(this.jb),b=this;return E.predicate=function(z){return!((z.fromNode!==b||z.toNode!==a||y!==null&&z.fromPortId!==y||x!==null&&z.toPortId!==x)&&(z.fromNode!==a||z.toNode!==b||x!==null&&z.fromPortId!==x||y!==null&&z.toPortId!==y))},E},Pt.kz=function(a,y,x){y===void 0&&(y=null),x===void 0&&(x=null);var E=new or(this.jb),b=this;return E.predicate=function(z){return!(z.fromNode!==b||z.toNode!==a||y!==null&&z.fromPortId!==y||x!==null&&z.toPortId!==x)},E};function Gm(a,y,x){Os(x);var E=a.jb.contains(y);if(E||a.jb.add(y),!E||y.fromNode===y.toNode){var b=a.linkConnected;if(b!==null){var z=!0,tt=a.diagram;tt!==null&&(z=tt.aa,tt.aa=!0),b(a,y,x),tt!==null&&(tt.aa=z)}}!E&&y.isTreeLink&&(x=y.fromNode,y=y.toNode,x!==null&&y!==null&&x!==y&&(E=!0,a=a.diagram,a!==null&&(E=a.isTreePathToChildren),b=E?y:x,z=E?x:y,b.ci||(b.ci=z),!z.isTreeLeaf||a!==null&&a.undoManager.isUndoingRedoing||(E?x===z&&(z.isTreeLeaf=!1):y===z&&(z.isTreeLeaf=!1))))}function Hm(a,y,x){Os(x);var E=a.jb.remove(y),b=null;if(E||y.toNode===y.fromNode){var z=a.linkDisconnected;if(b=a.diagram,z!==null){var tt=!0;b!==null&&(tt=b.aa,b.aa=!0),z(a,y,x),b!==null&&(b.aa=tt)}}E&&y.isTreeLink&&(x=!0,b!==null&&(x=b.isTreePathToChildren),a=x?y.toNode:y.fromNode,y=x?y.fromNode:y.toNode,a!==null&&(a.ci=!1),y===null||y.isTreeLeaf||(y.jb.count===0?(y.ci=null,b!==null&&b.undoManager.isUndoingRedoing||(y.isTreeLeaf=!0)):Qg(y)))}function Qg(a){if(a.ci=!1,a.jb.count!==0){var y=!0,x=a.diagram;if(x===null||!x.undoManager.isUndoingRedoing){for(x!==null&&(y=x.isTreePathToChildren),x=a.jb.iterator;x.next();){var E=x.value;if(E.isTreeLink){if(y){if(E.fromNode===a){a.isTreeLeaf=!1;return}}else if(E.toNode===a){a.isTreeLeaf=!1;return}}}a.isTreeLeaf=!0}}}Un.prototype.updateRelationshipsFromData=function(){var a=this.diagram;a!==null&&a.partManager.updateRelationshipsFromData(this)},Pt=Un.prototype,Pt.Vo=function(a){Li.prototype.Vo.call(this,a),a||(Qg(this),a=this.Yk,a!==null&&$1(a,this))},Pt.Wo=function(a){Li.prototype.Wo.call(this,a),a||(a=this.Yk,a!==null&&a.wd!==null&&(a.wd.remove(this),a.v()))},Pt.Lj=function(){if(0<this.jb.count){var a=this.diagram;if(a!==null)for(var y=a.commandHandler!==null?a.commandHandler.deletesConnectedLinks:!0,x=this.jb.copy().iterator;x.next();){var E=x.value;y?a.remove(E):(E.fromNode===this&&(E.fromNode=null),E.toNode===this&&(E.toNode=null))}}this.labeledLink=null,Li.prototype.Lj.call(this)},Pt.ns=function(a){if(this.wc===null){if(a===""&&this.Te===!1)return this;V1(this)}var y=this.wc.I(a);return y!==null||a!==""&&(y=this.wc.I(""),y!==null)?y:this};function V1(a){a.wc===null?a.wc=new Me:a.wc.clear(),a.qm(a,function(y,x){U1(y,x)}),a.wc.count===0&&a.wc.add("",a)}function U1(a,y){var x=y.portId;x!==null&&a.wc!==null&&a.wc.add(x,y)}function Kv(a,y,x){var E=y.portId;if(E!==null&&(a.wc!==null&&a.wc.remove(E),y=a.diagram,y!==null&&x)){for(x=null,a=a.findLinksConnected(E);a.next();)E=a.value,x===null&&(x=On()),x.push(E);if(x!==null){for(a=0;a<x.length;a++)y.remove(x[a]);Qn(x)}}}Pt.Nz=function(a){if(a===null||a===this)return!1;var y=!0,x=this.diagram;if(x!==null&&(y=x.isTreePathToChildren),x=this,y)for(;x!==a;){y=null;for(var E=x.jb.iterator;E.next();){var b=E.value;if(b.isTreeLink&&(y=b.fromNode,y!==x&&y!==this))break}if(y===this||y===null||y===x)return!1;x=y}else for(;x!==a;){for(y=null,E=x.jb.iterator;E.next()&&(b=E.value,!b.isTreeLink||(y=b.toNode,y===x||y===this)););if(y===this||y===null||y===x)return!1;x=y}return!0},Pt.xz=function(){var a=!0,y=this.diagram;if(y!==null&&(a=y.isTreePathToChildren),y=this,a)for(;;){a=null;for(var x=y.jb.iterator;x.next();){var E=x.value;if(E.isTreeLink&&(a=E.fromNode,a!==y&&a!==this))break}if(a===this)return this;if(a===null||a===y)return y;y=a}else for(;;){for(a=null,x=y.jb.iterator;x.next()&&(E=x.value,!E.isTreeLink||(a=E.toNode,a===y||a===this)););if(a===this)return this;if(a===null||a===y)return y;y=a}},Pt.gz=function(a){if(a===null)return null;if(this===a)return this;for(var y=this;y!==null;)zm(y,!0),y=y.pg();var x=null;for(y=a;y!==null;){if(y.G&1048576){x=y;break}y=y.pg()}for(y=this;y!==null;)zm(y,!1),y=y.pg();return x},Pt.kh=function(){var a=!0,y=this.diagram;if(y!==null&&(a=y.isTreePathToChildren),y=this.jb.iterator,a){for(;y.next();)if(a=y.value,a.isTreeLink&&a.fromNode!==this)return a}else for(;y.next();)if(a=y.value,a.isTreeLink&&a.toNode!==this)return a;return null},Pt.pg=function(){var a=this.ci;if(a===null)return null;if(a instanceof Un)return a;a=this.diagram,a=a!==null?a.isTreePathToChildren:!0;for(var y=this.jb.iterator;y.next();){var x=y.value;if(x.isTreeLink&&(x=a?x.fromNode:x.toNode,x!==this))return this.ci=x}return this.ci=null},Pt.vz=function(){function a(x,E){E.add(x);var b=x.kh();b!==null&&(E.add(b),x=x.pg(),x!==null&&a(x,E))}var y=new qe;return a(this,y),y},Pt.uz=function(){return Y1(this,this)};function Y1(a,y){return y=y.pg(),y===null?0:1+Y1(a,y)}Pt.Qo=function(){var a=!0,y=this.diagram;y!==null&&(a=y.isTreePathToChildren),y=new or(this.jb);var x=this;return y.predicate=a?function(E){return!!(E.isTreeLink&&E.fromNode===x)}:function(E){return!!(E.isTreeLink&&E.toNode===x)},y},Pt.Ou=function(){var a=!0,y=this.diagram;y!==null&&(a=y.isTreePathToChildren);var x=y=null,E=this.jb.iterator;if(a)for(;E.next();)a=E.value,a.isTreeLink&&a.fromNode===this&&(a=a.toNode,y!==null?y.add(a):x!==null&&x!==a?(y=new Xe,y.add(x),y.add(a)):x=a);else for(;E.next();)a=E.value,a.isTreeLink&&a.toNode===this&&(a=a.fromNode,y!==null?y.add(a):x!==null&&x!==a?(y=new Xe,y.add(x),y.add(a)):x=a);return y!==null?y.iterator:x!==null?new pr(x):Vi},Pt.wz=function(a){a===void 0&&(a=1/0);var y=new qe;return ad(y,this,!1,a,!0),y},Un.prototype.collapseTree=function(a){a===void 0&&(a=1),1>a&&(a=1);var y=this.diagram;if(y!==null&&!y.Ue){y.Ue=!0;var x=new qe;x.add(this),X1(this,x,y.isTreePathToChildren,a,y,this,y.treeCollapsePolicy===yh),y.Ue=!1}};function X1(a,y,x,E,b,z,tt){if(1<E)for(var rt=x?a.Mo():a.Sd();rt.next();){var ot=rt.value;ot.isTreeLink&&(ot=ot.To(a),ot===null||ot===a||y.contains(ot)||(y.add(ot),X1(ot,y,x,E-1,b,z,tt)))}else J1(a,y,x,b,z,tt)}function J1(a,y,x,E,b,z){for(var tt=b===a?!0:a.isTreeExpanded,rt=x?a.Mo():a.Sd(),ot={};rt.next();){var st=rt.value;if(st.isTreeLink&&(st=st.To(a),st!==null&&st!==a)){var ut=y.contains(st);if(ut||y.add(st),tt){var ft=x?st.Oo():st.Po();ot.uv=a,ft.all(function(mt){return function(yt){return yt===mt.uv||!yt.isTreeExpanded}}(ot))&&E.Aj(st,b),st.oh(),st.Zb(!1)}st.isTreeExpanded&&(st.wasTreeExpanded=st.isTreeExpanded,ut||J1(st,y,x,E,b,z))}ot={uv:ot.uv}}a.isTreeExpanded=!1}Un.prototype.expandTree=function(a){a===void 0&&(a=2),2>a&&(a=2);var y=this.diagram;if(y!==null&&!y.Ue){y.Ue=!0;var x=new qe;x.add(this),_1(this,x,y.isTreePathToChildren,a,y,this,y.treeCollapsePolicy===yh),y.Ue=!1}};function _1(a,y,x,E,b,z,tt){for(var rt=z===a?!1:a.isTreeExpanded,ot=x?a.Mo():a.Sd(),st={};ot.next();){var ut=ot.value;if(ut.isTreeLink&&(rt||ut.fd||ut.bb(),ut=ut.To(a),ut!==null&&ut!==a&&!y.contains(ut))){if(y.add(ut),!rt){ut.Zb(!0),ut.oh();var ft=x?ut.Oo():ut.Po();st.vv=a,ft.all(function(mt){return function(yt){return yt===mt.vv||!yt.isTreeExpanded}}(st))&&b.Cj(ut,z)}(2<E||ut.wasTreeExpanded)&&(ut.wasTreeExpanded=!1,_1(ut,y,x,E-1,b,z,tt))}st={vv:st.vv}}a.isTreeExpanded=!0}ge.Object.defineProperties(Un.prototype,{portSpreading:{get:function(){return this.Ba!==null?this.Ba.er:Km},set:function(a){var y=this.portSpreading;y!==a&&(Eh(this),this.Ba.er=a,this.g("portSpreading",y,a),a=this.diagram,a!==null&&a.undoManager.isUndoingRedoing||this.Bd())}},avoidable:{get:function(){return(this.U&8)!==0},set:function(a){var y=(this.U&8)!==0;if(y!==a){this.U^=8;var x=this.diagram;x!==null&&mh(x,this),this.g("avoidable",y,a)}}},avoidableMargin:{get:function(){return this.Ba!==null?this.Ba.yp:Do},set:function(a){typeof a=="number"&&(a=new Ji(a));var y=this.avoidableMargin;if(!y.D(a)){a=a.J(),Eh(this),this.Ba.yp=a;var x=this.diagram;x!==null&&mh(x,this),this.g("avoidableMargin",y,a)}}},linksConnected:{get:function(){return this.jb.iterator}},linkConnected:{get:function(){return this.Ba!==null?this.Ba.Dq:null},set:function(a){var y=this.linkConnected;y!==a&&(Eh(this),this.Ba.Dq=a,this.g("linkConnected",y,a))}},linkDisconnected:{get:function(){return this.Ba!==null?this.Ba.Eq:null},set:function(a){var y=this.linkDisconnected;y!==a&&(Eh(this),this.Ba.Eq=a,this.g("linkDisconnected",y,a))}},linkValidation:{get:function(){return this.Ba!==null?this.Ba.gj:null},set:function(a){var y=this.linkValidation;y!==a&&(Eh(this),this.Ba.gj=a,this.g("linkValidation",y,a))}},isLinkLabel:{get:function(){return this.Yk!==null}},labeledLink:{get:function(){return this.Yk},set:function(a){var y=this.Yk;if(y!==a){var x=this.diagram,E=this.data;if(y!==null){if(y.wd!==null&&(y.wd.remove(this),y.v()),x!==null&&E!==null&&!x.undoManager.isUndoingRedoing){var b=y.data,z=x.model;if(b!==null&&z.ri()){var tt=z.wa(E);tt!==void 0&&z.Qx(b,tt)}}this.containingGroup=null}this.Yk=a,a!==null&&($1(a,this),x===null||E===null||x.undoManager.isUndoingRedoing||(b=a.data,x=x.model,b!==null&&x.ri()&&(E=x.wa(E),E!==void 0&&x.Bu(b,E))),this.containingGroup=a.containingGroup),es(this),this.g("labeledLink",y,a)}}},port:{get:function(){return this.ns("")}},ports:{get:function(){return this.wc===null&&V1(this),this.wc.iteratorValues}},isTreeExpanded:{get:function(){return(this.U&1)!==0},set:function(a){var y=(this.U&1)!==0;if(y!==a){this.U^=1;var x=this.diagram;if(this.g("isTreeExpanded",y,a),y=this.treeExpandedChanged,y!==null){var E=!0;x!==null&&(E=x.aa,x.aa=!0),y(this),x!==null&&(x.aa=E)}x!==null&&x.undoManager.isUndoingRedoing?this.Zb(a):a?this.expandTree():this.collapseTree()}}},wasTreeExpanded:{get:function(){return(this.U&2)!==0},set:function(a){var y=(this.U&2)!==0;y!==a&&(this.U^=2,this.g("wasTreeExpanded",y,a))}},treeExpandedChanged:{get:function(){return this.Ba!==null?this.Ba.Vr:null},set:function(a){var y=this.treeExpandedChanged;y!==a&&(Eh(this),this.Ba.Vr=a,this.g("treeExpandedChanged",y,a))}},isTreeLeaf:{get:function(){return(this.U&4)!==0},set:function(a){var y=(this.U&4)!==0;y!==a&&(this.U^=4,this.g("isTreeLeaf",y,a))}}}),Un.prototype.expandTree=Un.prototype.expandTree,Un.prototype.collapseTree=Un.prototype.collapseTree,Un.prototype.findTreeParts=Un.prototype.wz,Un.prototype.findTreeChildrenNodes=Un.prototype.Ou,Un.prototype.findTreeChildrenLinks=Un.prototype.Qo,Un.prototype.findTreeLevel=Un.prototype.uz,Un.prototype.findTreeParentChain=Un.prototype.vz,Un.prototype.findTreeParentNode=Un.prototype.pg,Un.prototype.findTreeParentLink=Un.prototype.kh,Un.prototype.findCommonTreeParent=Un.prototype.gz,Un.prototype.findTreeRoot=Un.prototype.xz,Un.prototype.isInTreeOf=Un.prototype.Nz,Un.prototype.findPort=Un.prototype.ns,Un.prototype.findLinksTo=Un.prototype.kz,Un.prototype.findLinksBetween=Un.prototype.jz,Un.prototype.findNodesInto=Un.prototype.Oo,Un.prototype.findNodesOutOf=Un.prototype.Po,Un.prototype.findNodesConnected=Un.prototype.Mu,Un.prototype.findLinksInto=Un.prototype.Sd,Un.prototype.findLinksOutOf=Un.prototype.Mo,Un.prototype.findExternalTreeLinksConnected=Un.prototype.qx,Un.prototype.invalidateConnectedLinks=Un.prototype.Bd,Un.prototype.invalidateLinkBundle=Un.prototype.Lz;var Ex=new Ue(Un,"SpreadingNone",10),Km=new Ue(Un,"SpreadingEvenly",11),Zv=new Ue(Un,"SpreadingPacked",12);Un.className="Node",Un.SpreadingNone=Ex,Un.SpreadingEvenly=Km,Un.SpreadingPacked=Zv;function $i(a,y){a===void 0||a instanceof Qo||typeof a=="string"?Un.call(this,a):(Un.call(this),a&&(y=a)),this.U|=4608,this.Gn=new qe,this.$a=null,this.Sc=new mo,this.Sc.group=this,this.gl=new qe,this.tb=this.$p=null,y&&Object.assign(this,y)}we($i,Un),$i.prototype.cloneProtected=function(a){Un.prototype.cloneProtected.call(this,a),this.U=this.U&-32769;var y=a.Nl(function(x){return x instanceof rs});y instanceof rs?a.$a=y:a.$a=null,this.Sc!==null?(a.Sc=this.Sc.copy(),a.Sc.group=a):(a.Sc!==null&&(a.Sc.group=null),a.Sc=null),this.tb!==null&&(a.tb=this.tb.copy())},Pt=$i.prototype,Pt.Af=function(a){Un.prototype.Af.call(this,a);var y=a.Rj();for(a=a.memberParts;a.next();){var x=a.value;if(x.v(),x.C(8),x.Ej(),x instanceof Un)x.Bd(y);else if(x instanceof En)for(x=x.labelNodes;x.next();)x.value.Bd(y)}},Pt.gk=function(a,y,x,E,b,z,tt){if(a===Po&&y==="elements"){if(b instanceof rs)this.$a===null?this.$a=b:this.$a!==b&&Gt("Cannot insert a second Placeholder into the visual tree of a Group.");else if(b instanceof mn){var rt=b.Nl(function(ot){return ot instanceof rs});rt instanceof rs&&(this.$a===null?this.$a=rt:this.$a!==rt&&Gt("Cannot insert a second Placeholder into the visual tree of a Group."))}}else a===Eo&&y==="elements"&&this.$a!==null&&(E===this.$a?this.$a=null:E instanceof mn&&this.$a.rg(E)&&(this.$a=null));Un.prototype.gk.call(this,a,y,x,E,b,z,tt)},Pt.Xl=function(a,y){Un.prototype.Xl.call(this,a,y),this.isClipping&&this.type!==mn.Spot&&this.isSubGraphExpanded&&(a=this.resizeObject,a instanceof mn&&(a=a.Pb()),this.tb===null&&(this.tb=new Ee),a.mi(this.tb),a instanceof lr&&this.tb.Bc(-a.strokeWidth,-a.strokeWidth))},Pt.eh=function(a,y,x,E){this.nf=this.$a,Un.prototype.eh.call(this,a,y,x,E)},Pt.Va=function(){var a=this;a.isSubGraphExpanded&&this.memberParts.each(function(y){!a.computesBoundsIncludingLinks&&y instanceof En||y.Va()}),Un.prototype.Va.call(this)},Pt.si=function(){if(!Un.prototype.si.call(this))return!1;for(var a=this.memberParts;a.next();){var y=a.value;if(y instanceof Un){if(y.isVisible()&&ns(y))return!1}else if(y instanceof En&&y.isVisible()&&ns(y)&&y.fromNode!==this&&y.toNode!==this)return!1}return!0};function Wv(a,y){if(a.Gn.add(y)){y instanceof $i&&a.gl.add(y);var x=a.memberAdded;if(x!==null){var E=!0,b=a.diagram;b!==null&&(E=b.aa,b.aa=!0),x(a,y),b!==null&&(b.aa=E)}a.isVisible()&&a.isSubGraphExpanded||y.Zb(!1)}y instanceof En&&!a.computesBoundsIncludingLinks||(y=a.$a,y===null&&(y=a),y.v())}function Vv(a,y){if(a.Gn.remove(y)){y instanceof $i&&a.gl.remove(y);var x=a.memberRemoved;if(x!==null){var E=!0,b=a.diagram;b!==null&&(E=b.aa,b.aa=!0),x(a,y),b!==null&&(b.aa=E)}a.isVisible()&&a.isSubGraphExpanded||y.Zb(!0)}y instanceof En&&!a.computesBoundsIncludingLinks||(y=a.$a,y===null&&(y=a),y.v())}Pt.Lj=function(){if(0<this.Gn.count){var a=this.diagram;if(a!==null)for(var y=this.Gn.copy().iterator;y.next();)a.remove(y.value)}Un.prototype.Lj.call(this)},$i.prototype.canAddMembers=function(a){var y=this.diagram;if(y===null)return!1;for(y=y.commandHandler,a=Ie(a).iterator;a.next();)if(!y.isValidMember(this,a.value))return!1;return!0},$i.prototype.addMembers=function(a,y){var x=this.diagram;if(x===null)return!1;x=x.commandHandler;var E=!0;for(a=Ie(a).iterator;a.next();){var b=a.value;!y||x.isValidMember(this,b)?b.containingGroup=this:E=!1}return E},$i.prototype.canUngroup=function(){if(!this.ungroupable)return!1;var a=this.layer;return a===null||!a.allowUngroup?!1:(a=a.diagram,!!(a===null||a.allowUngroup))},Pt=$i.prototype,Pt.Bd=function(a){var y=(this.U&65536)!==0;if(Un.prototype.Bd.call(this,a),!y)for(!(this.U&65536)&&(this.U=this.U^65536),y=this.Lu();y.next();){var x=y.value;if(a===void 0||!a.contains(x)){var E=x.fromNode;E!==null&&E!==this&&E.Td(this)&&!E.isVisible()?(Os(x.fromPort),Os(x.toPort),x.bb()):(E=x.toNode,E!==null&&E!==this&&E.Td(this)&&!E.isVisible()&&(Os(x.fromPort),Os(x.toPort),x.bb()))}}},Pt.Lu=function(){var a=this.diagram!==null&&this.diagram.Pw;if(a&&this.$p!==null)return this.$p.iterator;var y=this.Rj();y.add(this);for(var x=new qe,E=y.iterator;E.next();){var b=E.value;if(b instanceof Un)for(b=b.linksConnected;b.next();){var z=b.value;y.contains(z)||x.add(z)}}return a&&(this.$p=x),x.iterator},Pt.iz=function(){var a=this.Rj();a.add(this);for(var y=new qe,x=a.iterator;x.next();){var E=x.value;if(E instanceof Un)for(E=E.linksConnected;E.next();){var b=E.value,z=b.fromNode;z===null||a.contains(z)&&z!==this||y.add(z),b=b.toNode,b===null||a.contains(b)&&b!==this||y.add(b)}}return y.iterator},Pt.hz=function(){function a(x,E){x!==null&&(E.add(x),a(x.containingGroup,E))}var y=new qe;return a(this,y),y},Pt.Rj=function(){var a=new qe;return ad(a,this,!0,0,!0),a.remove(this),a},Pt.Zb=function(a){Un.prototype.Zb.call(this,a);for(var y=this.memberParts;y.next();)y.value.Zb(a)},$i.prototype.collapseSubGraph=function(){var a=this.diagram;if(a!==null&&!a.Ue){a.Ue=!0;var y=this.Rj();Q1(this,y,a,this),a.Ue=!1}};function Q1(a,y,x,E){for(var b=a.memberParts;b.next();){var z=b.value;if(z.Zb(!1),z instanceof $i&&z.isSubGraphExpanded&&(z.wasSubGraphExpanded=z.isSubGraphExpanded,Q1(z,y,x,E)),z instanceof Un)z.Bd(y),x.Aj(z,E);else if(z instanceof En)for(z=z.labelNodes;z.next();)z.value.Bd(y)}a.isSubGraphExpanded=!1}$i.prototype.expandSubGraph=function(){var a=this.diagram;if(a!==null&&!a.Ue){a.Ue=!0;var y=this.Rj();q1(this,y,a,this),a.Ue=!1}};function q1(a,y,x,E){for(var b=a.memberParts;b.next();){var z=b.value;if(z.Zb(!0),z instanceof $i&&z.wasSubGraphExpanded&&(z.wasSubGraphExpanded=!1,q1(z,y,x,E)),z instanceof Un)z.Bd(y),x.Cj(z,E);else if(z instanceof En)for(z=z.labelNodes;z.next();)z.value.Bd(y)}a.isSubGraphExpanded=!0}$i.prototype.move=function(a,y){y===void 0&&(y=!1);var x=y?this.location:this.position,E=x.x;x=x.y;var b=a.x,z=a.y;if(!(E===b||isNaN(E)&&isNaN(b))||!(x===z||isNaN(x)&&isNaN(z))){for(E=b-(isNaN(E)?0:E),x=z-(isNaN(x)?0:x),z=At.alloc(),Un.prototype.move.call(this,a,y),a=new qe,y=this.Rj().iterator;y.next();)b=y.value,b instanceof En&&(b.suspendsRouting&&a.add(b),b.fd||b.fromNode!==this&&b.toNode!==this)&&(b.suspendsRouting=!0);for(y.reset();y.next();)if(b=y.value,!(b.ph()||b instanceof Un&&b.isLinkLabel)){var tt=b.position,rt=b.location;tt.w()?(z.x=tt.x+E,z.y=tt.y+x,b.position=z):rt.w()&&(z.x=rt.x+E,z.y=rt.y+x,b.location=z)}for(y.reset();y.next();)b=y.value,b instanceof En&&(b.suspendsRouting=a.contains(b),b.fd||b.fromNode!==this&&b.toNode!==this)&&(tt=b.position,z.x=tt.x+E,z.y=tt.y+x,z.w()?b.move(z):b.bb(),Yv(b)&&b.bb());At.free(z)}},ge.Object.defineProperties($i.prototype,{placeholder:{get:function(){return this.$a}},computesBoundsAfterDrag:{get:function(){return(this.U&2048)!==0},set:function(a){var y=(this.U&2048)!==0;y!==a&&(this.U^=2048,this.g("computesBoundsAfterDrag",y,a))}},computesBoundsIncludingLinks:{get:function(){return(this.U&4096)!==0},set:function(a){var y=(this.U&4096)!==0;y!==a&&(this.U^=4096,this.g("computesBoundsIncludingLinks",y,a))}},computesBoundsIncludingLocation:{get:function(){return(this.U&8192)!==0},set:function(a){var y=(this.U&8192)!==0;y!==a&&(this.U^=8192,this.g("computesBoundsIncludingLocation",y,a))}},handlesDragDropForMembers:{get:function(){return(this.U&16384)!==0},set:function(a){var y=(this.U&16384)!==0;y!==a&&(this.U^=16384,this.g("handlesDragDropForMembers",y,a))}},memberParts:{get:function(){return this.Gn.iterator}},layout:{get:function(){return this.Sc},set:function(a){var y=this.Sc;if(y!==a){a!==null&&a.diagram!==null&&a.diagram.layout===a&&Gt("A layout cannot be both the Diagram.layout and a Group.layout: "+a),y!==null&&(y.diagram=null,y.group=null),this.Sc=a;var x=this.diagram;a!==null&&(a.diagram=x,a.group=this),x!==null&&(x.xh=!0),this.g("layout",y,a),x!==null&&x.$b()}}},memberAdded:{get:function(){return this.Ba!==null?this.Ba.Mq:null},set:function(a){var y=this.memberAdded;y!==a&&(Eh(this),this.Ba.Mq=a,this.g("memberAdded",y,a))}},memberRemoved:{get:function(){return this.Ba!==null?this.Ba.Nq:null},set:function(a){var y=this.memberRemoved;y!==a&&(Eh(this),this.Ba.Nq=a,this.g("memberRemoved",y,a))}},memberValidation:{get:function(){return this.Ba!==null?this.Ba.ij:null},set:function(a){var y=this.memberValidation;y!==a&&(Eh(this),this.Ba.ij=a,this.g("memberValidation",y,a))}},ungroupable:{get:function(){return(this.U&256)!==0},set:function(a){var y=(this.U&256)!==0;y!==a&&(this.U^=256,this.g("ungroupable",y,a))}},isSubGraphExpanded:{get:function(){return(this.U&512)!==0},set:function(a){var y=(this.U&512)!==0;if(y!==a){this.U^=512;var x=this.diagram;if(this.g("isSubGraphExpanded",y,a),y=this.subGraphExpandedChanged,y!==null){var E=!0;x!==null&&(E=x.aa,x.aa=!0),y(this),x!==null&&(x.aa=E)}x!==null&&x.undoManager.isUndoingRedoing?(this.$a!==null&&this.$a.v(),this.memberParts.each(function(b){b.updateAdornments()})):a?this.expandSubGraph():this.collapseSubGraph()}}},wasSubGraphExpanded:{get:function(){return(this.U&1024)!==0},set:function(a){var y=(this.U&1024)!==0;y!==a&&(this.U^=1024,this.g("wasSubGraphExpanded",y,a))}},subGraphExpandedChanged:{get:function(){return this.Ba!==null?this.Ba.Kr:null},set:function(a){var y=this.subGraphExpandedChanged;y!==a&&(Eh(this),this.Ba.Kr=a,this.g("subGraphExpandedChanged",y,a))}},rh:{get:function(){return(this.U&32768)!==0},set:function(a){(this.U&32768)!==0!==a&&(this.U^=32768)}}}),$i.prototype.expandSubGraph=$i.prototype.expandSubGraph,$i.prototype.collapseSubGraph=$i.prototype.collapseSubGraph,$i.prototype.findSubGraphParts=$i.prototype.Rj,$i.prototype.findContainingGroupChain=$i.prototype.hz,$i.prototype.findExternalNodesConnected=$i.prototype.iz,$i.prototype.findExternalLinksConnected=$i.prototype.Lu,$i.prototype.ensureBounds=$i.prototype.Va,$i.className="Group";function rs(a){he.call(this),this.yb=$o,this.ko=new Ee(NaN,NaN,NaN,NaN),a&&Object.assign(this,a)}we(rs,he),rs.prototype.cloneProtected=function(a){he.prototype.cloneProtected.call(this,a),a.yb=this.yb.J(),a.ko=this.ko.copy()},rs.prototype.gh=function(a){if(this.background===null&&this.areaBackground===null)return!1;var y=this.naturalBounds;return oo(0,0,y.width,y.height,a.x,a.y)},rs.prototype.Wl=function(){var a=this.part;if(a!==null&&(a instanceof $i||a instanceof Rr)||Gt("Placeholder is not inside a Group or Adornment."),a instanceof $i){var y=this.computeBorder(this.ko),x=this.minSize,E=this.dc;for(Fr(E,(isFinite(x.width)?Math.max(x.width,y.width):y.width)||0,(isFinite(x.height)?Math.max(x.height,y.height):y.height)||0),this.Ge(0,0,E.width,E.height),E=a.memberParts,x=!1;E.next();)if(E.value.isVisible()){x=!0;break}E=a.diagram,!x||E===null||E.animationManager.Xu(a)||isNaN(y.x)||isNaN(y.y)||(x=At.alloc(),x.xi(y,a.locationSpot),x.D(a.location)||(a.location=x),At.free(x))}else{y=this.dc,x=this.yb,E=x.left+x.right;var b=x.top+x.bottom,z=a.adornedObject;a.angle=z.li();var tt=0;z instanceof lr&&(tt=z.strokeWidth);var rt=z.Df(),ot=z.naturalBounds,st=(ot.width+tt)*rt;tt=(ot.height+tt)*rt,a.type!==mn.Link&&(rt=z.ga(a.category==="Selection"?Sr:a.locationSpot,At.alloc()),a.location=rt,At.free(rt)),isNaN(st)||isNaN(tt)?(a=z.ga(Sr,At.alloc()),st=Ee.allocAt(a.x,a.y,0,0),st.Ye(z.ga(Hr,a)),st.Ye(z.ga(Gr,a)),st.Ye(z.ga(Ro,a)),Fr(y,st.width+E||0,st.height+b||0),this.Ge(-x.left,-x.top,y.width,y.height),At.free(a),Ee.free(st)):(Fr(y,st+E||0,tt+b||0),this.Ge(-x.left,-x.top,y.width,y.height))}},rs.prototype.eh=function(a,y,x,E){this.actualBounds.h(a,y,x,E)},rs.prototype.computeBorder=function(a){var y=this.part,x=y.diagram,E=x===null||!x.animationManager.isAnimating;if(x!==null&&y instanceof $i&&!y.layer.isTemporary&&y.computesBoundsAfterDrag&&this.ko.w()){var b=x.toolManager.findTool("Dragging");if(b===x.currentTool&&(x=b.computeBorder(y,this.ko,a),x!==null))return x}x=Ee.alloc(),b=this.computeMemberBounds(x);var z=this.yb;return y instanceof $i&&!y.isSubGraphExpanded?a.h(b.x-z.left,b.y-z.top,0,0):a.h(b.x-z.left,b.y-z.top,Math.max(b.width+z.left+z.right,0),Math.max(b.height+z.top+z.bottom,0)),Ee.free(x),E&&y instanceof $i&&y.computesBoundsIncludingLocation&&y.location.w()&&a.Ye(y.location),a},rs.prototype.computeMemberBounds=function(a){if(!(this.part instanceof $i))return a.h(0,0,0,0),a;for(var y=this.part,x=1/0,E=1/0,b=-1/0,z=-1/0,tt=y.memberParts;tt.next();){var rt=tt.value;if(rt.isVisible()){if(rt instanceof En&&(!y.computesBoundsIncludingLinks||Vs(rt)||rt.fromNode===y||rt.toNode===y))continue;rt=rt.actualBounds,rt.left<x&&(x=rt.left),rt.top<E&&(E=rt.top),rt.right>b&&(b=rt.right),rt.bottom>z&&(z=rt.bottom)}}return isFinite(x)&&isFinite(E)?a.h(x,E,b-x,z-E):(y=y.location,a.h(y.x,y.y,0,0)),a},ge.Object.defineProperties(rs.prototype,{padding:{get:function(){return this.yb},set:function(a){typeof a=="number"&&(a=new Ji(a));var y=this.yb;y.D(a)||(this.yb=a=a.J(),this.g("padding",y,a),this.v())}}}),rs.className="Placeholder";function En(a){Li.call(this,mn.Link),this.Qa=8,this.ef=null,this.ff="",this.uf=this.gn=null,this.vf="",this.uo=null,this.qk=os,this.Om=0,this.Qm=os,this.Rm=NaN,this.qj=_v,this.po=.5,this.wd=null,this.Nb=new Xe().freeze(),this.Tg=this.Mg=null,this.ml=new Ee,this.ua=new xn,this.u=this.o=this.Sf=this.Wf=null,this.su=new At,this.cq=this.Mw=this.Lw=null,this.vt=NaN,this.ba=null,this.j=[],a&&Object.assign(this,a)}we(En,Li),En.prototype.cloneProtected=function(a){Li.prototype.cloneProtected.call(this,a),a.Qa=this.Qa&-113,a.ff=this.ff,a.gn=this.gn,a.vf=this.vf,a.uo=this.uo,a.qk=this.qk,a.Om=this.Om,a.Qm=this.Qm,a.Rm=this.Rm,a.qj=this.qj,a.po=this.po,this.ba!==null&&(a.ba=this.ba.copy())},Pt=En.prototype,Pt.Af=function(a){Li.prototype.Af.call(this,a),this.ff=a.ff,this.vf=a.vf,a.Mg=null,a.bb(),a.Sf=this.Sf;var y=a.fromPort;y!==null&&Os(y),a=a.toPort,a!==null&&Os(a)},Pt.qb=function(a){a.classType===En?(a.value&2)===2?this.routing=a:a===Ys||a===Lh||a===Rf?this.curve=a:a===tp||a===Xm||a===Jm?this.adjusting=a:a!==_v&&a!==os&&Gt("Unknown Link enum value for a Link property: "+a):Li.prototype.qb.call(this,a)},Pt.Xc=function(){this.ba===null&&(this.ba=new Gg)},Pt.si=function(){var a=this.fromNode;if(a!==null){var y=a.findVisibleNode();if(y!==null&&(a=y),ns(a)||rd(a))return!1}return a=this.toNode,!(a!==null&&(y=a.findVisibleNode(),y!==null&&(a=y),ns(a)||rd(a)))},Pt.zv=function(){return!1},Pt.Av=function(){},Pt.Zc=function(){return!1},En.prototype.computeAngle=function(a,y,x){return En.computeAngle(y,x)},En.computeAngle=function(a,y){switch(a){default:case os:a=0;break;case ep:a=y;break;case np:a=y+90;break;case ip:a=y-90;break;case Qv:a=y+180;break;case _m:a=ue.bp(y),90<a&&270>a&&(a-=180);break;case rp:a=ue.bp(y+90),90<a&&270>a&&(a-=180);break;case op:a=ue.bp(y-90),90<a&&270>a&&(a-=180);break;case Qm:if(a=ue.bp(y),45<a&&135>a||225<a&&315>a)return 0;90<a&&270>a&&(a-=180)}return ue.bp(a)};function Of(a){var y=a.fromNode,x=a.toNode,E=null;if(y!==null?E=x!==null?y.px(x):y.containingGroup:x!==null?E=x.containingGroup:E=null,y=E,x=a.Ah,x!==y){x!==null&&Vv(x,a),a.Ah=y,y!==null&&Wv(y,a);var b=a.containingGroupChanged;if(b!==null){var z=!0,tt=a.diagram;tt!==null&&(z=tt.aa,tt.aa=!0),b(a,x,y),tt!==null&&(tt.aa=z)}!a.fd||a.Lw!==x&&a.Mw!==x||a.bb()}if(a.isLabeledLink)for(a=a.labelNodes;a.next();)a.value.containingGroup=E}Pt=En.prototype,Pt.oh=function(){var a=this.containingGroup;a!==null&&this.fromNode!==a&&this.toNode!==a&&a.computesBoundsIncludingLinks&&Li.prototype.oh.call(this)},Pt.To=function(a){var y=this.fromNode;return a===y?this.toNode:y},Pt.Cz=function(a){var y=this.fromPort;return a===y?this.toPort:y};function $1(a,y){a.wd===null&&(a.wd=new qe),a.wd.add(y),a.v()}Pt.Vo=function(a){if(Li.prototype.Vo.call(this,a),Qd(this)&&this.Xo(this.actualBounds),!a){a=this.ef;var y=null;a!==null&&(y=this.fromPort,Gm(a,this,y));var x=this.uf;if(x!==null){var E=this.toPort;x===a&&E===y||Gm(x,this,E)}qg(this)}},Pt.Wo=function(a){if(Li.prototype.Wo.call(this,a),Qd(this)&&this.Xo(this.actualBounds),!a){a=this.ef;var y=null;a!==null&&(y=this.fromPort,Hm(a,this,y));var x=this.uf;if(x!==null){var E=this.toPort;x===a&&E===y||Hm(x,this,E)}$g(this)}},Pt.Lj=function(){if(this.fd=!0,this.wd!==null){var a=this.diagram;if(a!==null)for(var y=this.wd.copy().iterator;y.next();)a.remove(y.value)}this.data!==null&&(a=this.diagram,a!==null&&a.partManager.removeDataForLink(this))},En.prototype.updateRelationshipsFromData=function(){if(this.data!==null){var a=this.diagram;a!==null&&a.partManager.updateRelationshipsFromData(this)}},En.prototype.move=function(a,y){var x=y?this.location:this.position,E=x.x;isNaN(E)&&(E=0);var b=x.y;for(isNaN(b)&&(b=0),E=a.x-E,b=a.y-b,y===!0?Li.prototype.move.call(this,a,!1):(a=At.allocAt(x.x+E,x.y+b),Li.prototype.move.call(this,a,!1),At.free(a)),kh(this,E,b),a=this.labelNodes;a.next();)y=a.value,x=y.position,y.moveTo(x.x+E,x.y+b)},En.prototype.canRelinkFrom=function(){if(!this.relinkableFrom)return!1;var a=this.layer;return a===null?!0:a.allowRelink?(a=a.diagram,!!(a===null||a.allowRelink)):!1},En.prototype.canRelinkTo=function(){if(!this.relinkableTo)return!1;var a=this.layer;return a===null?!0:a.allowRelink?(a=a.diagram,!!(a===null||a.allowRelink)):!1},En.prototype.computeMidPoint=function(a){var y=this.pointsCount;if(y===0)return a.assign(ti),a;if(y===1)return a.assign(this.i(0)),a;if(y===2){var x=this.i(0),E=this.i(1);return a.h((x.x+E.x)/2,(x.y+E.y)/2),a}if(this.isOrthogonal&&(15<=this.computeCorner()||this.computeCurve()===Ys))return this.ua.Pu(.5,a),a.add(this.i(0)),x=this.ua.figures.first(),a.offset(-x.startX,-x.startY),a;if(this.computeCurve()===Ys){if(y===3){x=this.i(0),E=this.i(1);var b=this.i(2);return ue.ax(x.x,x.y,E.x,E.y,E.x,E.y,b.x,b.y,a),a}if(E=(y-1)/3|0,x=3*(E/2|0),E%2===1){E=this.i(x),b=this.i(x+1);var z=this.i(x+2);x=this.i(x+3),ue.ax(E.x,E.y,b.x,b.y,z.x,z.y,x.x,x.y,a)}else a.assign(this.i(x));return a}var tt=this.flattenedLengths;for(x=this.flattenedTotalLength,b=z=E=0;E<x/2&&z<y&&(b=tt[z],!(E+b>x/2));)E+=b,z++;return y=this.i(z),z=this.i(z+1),1>Math.abs(y.x-z.x)?y.y>z.y?a.h(y.x,y.y-(x/2-E)):a.h(y.x,y.y+(x/2-E)):1>Math.abs(y.y-z.y)?y.x>z.x?a.h(y.x-(x/2-E),y.y):a.h(y.x+(x/2-E),y.y):(x=(x/2-E)/b,a.h(y.x+x*(z.x-y.x),y.y+x*(z.y-y.y))),a},En.prototype.computeMidAngle=function(){var a=this.pointsCount;if(2>a)return NaN;if(a===2)return this.i(0).ab(this.i(1));if(this.isOrthogonal&&(15<=this.computeCorner()||this.computeCurve()===Ys))return this.ua.wx(.5);if(this.computeCurve()===Ys&&4<=a){var y=(a-1)/3|0,x=3*(y/2|0);if(y%2===1){x=Math.floor(x),a=this.i(x),y=this.i(x+1);var E=this.i(x+2);return x=this.i(x+3),ue.My(a.x,a.y,y.x,y.y,E.x,E.y,x.x,x.y)}if(0<x&&x+1<a)return this.i(x-1).ab(this.i(x+1))}y=this.flattenedLengths,E=this.flattenedTotalLength;var b=0;x=0;for(var z;b<E/2&&x<a&&(z=y[x],!(b+z>E/2));)b+=z,x++;if(y=this.i(x),E=this.i(x+1),1>Math.abs(y.x-E.x)&&1>Math.abs(y.y-E.y)){if(0<x&&x+2<a)return this.i(x-1).ab(this.i(x+2))}else{if(1>Math.abs(y.x-E.x))return y.y>E.y?270:90;if(1>Math.abs(y.y-E.y))return y.x>E.x?180:0}return y.ab(E)},Pt=En.prototype,Pt.i=function(a){return this.Nb.s[a]},Pt.dd=function(a,y){this.Nb.cd(a,y)},Pt.L=function(a,y,x){this.Nb.cd(a,new At(y,x))},Pt.Kz=function(a,y){this.Nb.Gb(a,y)},Pt.m=function(a,y,x){this.Nb.Gb(a,new At(y,x))},Pt.ne=function(a){this.Nb.add(a)},Pt.yf=function(a,y){this.Nb.add(new At(a,y))},Pt.pv=function(a){this.Nb.mb(a)},Pt.Fj=function(){this.Nb.clear()};function kh(a,y,x){if(y!==0||x!==0)if(a.pointsCount===0)a.defaultFromPoint&&a.defaultFromPoint.offset(y,x),a.defaultToPoint&&a.defaultToPoint.offset(y,x);else{for(var E=a.fd,b=new Xe,z=a.Nb.iterator;z.next();){var tt=z.value;b.add(new At(tt.x+y,tt.y+x).freeze())}b.freeze(),z=a.Nb,a.Nb=b,tt=a.diagram,isNaN(y)||isNaN(x)||tt!==null&&tt.animationManager.zb?a.v():(a.ke.h(a.ke.x+y,a.ke.y+x),a.pa.h(a.pa.x+y,a.pa.y+x),es(a)),E?Zm(a):(a.defaultFromPoint&&(a.defaultFromPoint=a.i(0)),a.defaultToPoint&&(a.defaultToPoint=a.i(a.pointsCount-1))),tt!==null&&tt.animationManager.zb&&sf(tt.animationManager,a,b),a.g("points",z,b)}}Pt.uh=function(){this.Mg===null&&(this.Mg=this.Nb,this.Nb=this.Nb.copy())},Pt.zf=function(){if(this.Mg!==null){for(var a=this.Mg,y=this.Nb,x=1/0,E=1/0,b=a.s,z=b.length,tt=0;tt<z;tt++){var rt=b[tt];x=Math.min(rt.x,x),E=Math.min(rt.y,E)}rt=tt=1/0;for(var ot=y.s,st=ot.length,ut=0;ut<st;ut++){var ft=ot[ut];tt=Math.min(ft.x,tt),rt=Math.min(ft.y,rt),ft.freeze()}if(y.freeze(),st===z){for(z=0;z<st;z++)if(ut=b[z],ft=ot[z],ut.x-x!==ft.x-tt||ut.y-E!==ft.y-rt){this.qc();break}}else this.qc();this.Mg=null,x=this.diagram,x!==null&&x.animationManager.zb&&sf(x.animationManager,this,y),Zm(this),this.g("points",a,y)}},Pt.rv=function(){this.Mg!==null&&(this.Nb=this.Mg,this.Mg=null)};function Zm(a){a.Nb.count===0?a.fd=!1:(a.fd=!0,a.cq=null,a.vt=NaN,a.defaultFromPoint=a.i(0),a.defaultToPoint=a.i(a.pointsCount-1),Ym(a,!1))}Pt.bb=function(){if(!this.suspendsRouting){var a=this.diagram;if(a){if(a.As.contains(this)||a.undoManager.isUndoingRedoing||(a=a.animationManager,a.isTicking&&!a.isAnimating))return;this.Tg===null||a.isTicking||(this.Tg=null)}a=this.path,a!==null&&(this.fd=!1,this.v(),a.v())}},Pt.vg=function(){if(!this.fd&&!this.computingPoints){var a=!0;try{this.computingPoints=!0,this.uh(),a=this.computePoints()}catch(y){this.computingPoints=!1,this.rv()}finally{this.computingPoints=!1,a?this.zf():this.rv()}}},En.prototype.computePoints=function(){if(this.diagram===null)return!1;var a=this.fromNode,y=null;if(a===null?(Oc||(Oc=new Un,Oc.desiredSize=qn,Oc.Va()),this.defaultFromPoint&&(Oc.location=this.defaultFromPoint,Oc.Va(),y=a=Oc)):y=this.fromPort,y!==null&&!a.isVisible()){var x=a.findVisibleNode();x!==null&&x!==a?(a=x,y=x.port):a=x}if(this.Lw=a,a===null||!a.location.w())return!1;for(;!(y===null||y.actualBounds.w()&&y.Ed());)y=y.panel;if(y===null)return!1;var E=this.toNode,b=null;if(E===null?(Ic||(Ic=new Un,Ic.desiredSize=qn,Ic.Va()),this.defaultToPoint&&(Ic.location=this.defaultToPoint,Ic.Va(),b=E=Ic)):b=this.toPort,b===null||E.isVisible()||(x=E.findVisibleNode(),x!==null&&x!==E?(E=x,b=x.port):E=x),this.Mw=E,E===null||!E.location.w())return!1;for(;!(b===null||b.actualBounds.w()&&b.Ed());)b=b.panel;if(b===null)return!1;var z=this.pointsCount,tt=this.computeSpot(!0,y);x=this.computeSpot(!1,b);var rt=If(tt),ot=If(x),st=y===b&&y!==null,ut=this.isOrthogonal,ft=this.curve===Ys;this.Wf=st&&!ut?ft=!0:!1;var mt=this.computeAdjusting()===os||st;if(!ut&&!st&&rt&&ot){if(rt=!1,!mt&&3<=z&&(mt=this.getLinkPoint(a,y,tt,!0,!1,E,b),ot=this.getLinkPoint(E,b,x,!1,!1,a,y),rt=this.adjustPoints(0,mt,z-1,ot))&&(mt=this.getLinkPoint(a,y,tt,!0,!1,E,b),ot=this.getLinkPoint(E,b,x,!1,!1,a,y),this.adjustPoints(0,mt,z-1,ot)),!rt)if(this.Fj(),ft){z=this.getLinkPoint(a,y,tt,!0,!1,E,b),mt=this.getLinkPoint(E,b,x,!1,!1,a,y),rt=mt.x-z.x,ot=mt.y-z.y,st=this.computeCurviness(),ft=ut=0;var yt=z.x+rt/3,wt=z.y+ot/3,bt=yt,Zt=wt;ue.B(ot,0)?Zt=0<rt?Zt-st:Zt+st:(ut=-rt/ot,ft=Math.sqrt(st*st/(ut*ut+1)),0>st&&(ft=-ft),bt=(0>ot?-1:1)*ft+yt,Zt=ut*(bt-yt)+wt),yt=z.x+2*rt/3,wt=z.y+2*ot/3;var It=yt,Yt=wt;ue.B(ot,0)?Yt=0<rt?Yt-st:Yt+st:(It=(0>ot?-1:1)*ft+yt,Yt=ut*(It-yt)+wt),this.Fj(),this.ne(z),this.yf(bt,Zt),this.yf(It,Yt),this.ne(mt),this.dd(0,this.getLinkPoint(a,y,tt,!0,!1,E,b)),this.dd(3,this.getLinkPoint(E,b,x,!1,!1,a,y))}else z=E,mt=b,E=this.getLinkPoint(a,y,tt,!0,!1,z,mt),b=this.getLinkPoint(z,mt,x,!1,!1,a,y),this.hasCurviness()?(mt=b.x-E.x,x=b.y-E.y,tt=this.computeCurviness(),a=E.x+mt/2,y=E.y+x/2,z=a,rt=y,ue.B(x,0)?rt=0<mt?rt-tt:rt+tt:(mt=-mt/x,z=Math.sqrt(tt*tt/(mt*mt+1)),0>tt&&(z=-z),z=(0>x?-1:1)*z+a,rt=mt*(z-a)+y),this.ne(E),this.yf(z,rt),this.ne(b)):(this.ne(E),this.ne(b),rt=Ee.alloc(),y.mi(rt),ot=rt.ca(b),mt.mi(rt),st=rt.ca(E),(ot||st)&&(tt=y.ga(Vm(tt),new At),this.dd(0,this.getLinkPointFromPoint(a,y,tt,b,!0,tt)),x=mt.ga(Vm(x),new At),this.dd(1,this.getLinkPointFromPoint(z,mt,x,E,!1,x))),Ee.free(rt))}else{ft=this.isAvoiding,mt&&(ut&&ft||st)&&this.Fj();var Jt=st?this.computeCurviness():0;ft=this.getLinkPoint(a,y,tt,!0,ut,E,b),yt=bt=wt=0,(ut||!rt||st)&&(Zt=this.computeEndSegmentLength(a,y,tt,!0),yt=this.getLinkDirection(a,y,ft,tt,!0,ut,E,b),st&&(rt||tt.D(x)||!ut&&tt.x+x.x===1&&tt.y+x.y===1)&&(yt-=ut?90:30,0>Jt&&(yt-=180)),0>yt?yt+=360:360<=yt&&(yt-=360),st&&(Zt+=Math.abs(Jt)*(ut?1:2)),yt===0?wt=Zt:yt===90?bt=Zt:yt===180?wt=-Zt:yt===270?bt=-Zt:(wt=Zt*Math.cos(yt*Math.PI/180),bt=Zt*Math.sin(yt*Math.PI/180)),tt.Mc()&&st&&(Zt=y.ga(er,At.alloc()),It=At.allocAt(Zt.x+1e3*wt,Zt.y+1e3*bt),this.getLinkPointFromPoint(a,y,Zt,It,!0,ft),At.free(Zt),At.free(It))),Zt=this.getLinkPoint(E,b,x,!1,ut,a,y);var qt=Yt=It=0;if(ut||!ot||st){var ae=this.computeEndSegmentLength(E,b,x,!1);qt=this.getLinkDirection(E,b,Zt,x,!1,ut,a,y),st&&(ot||tt.D(x)||!ut&&tt.x+x.x===1&&tt.y+x.y===1)&&(qt+=ut?0:30,0>Jt&&(qt+=180)),0>qt?qt+=360:360<=qt&&(qt-=360),st&&(ae+=Math.abs(Jt)*(ut?1:2)),qt===0?It=ae:qt===90?Yt=ae:qt===180?It=-ae:qt===270?Yt=-ae:(It=ae*Math.cos(qt*Math.PI/180),Yt=ae*Math.sin(qt*Math.PI/180)),x.Mc()&&st&&(x=b.ga(er,At.alloc()),tt=At.allocAt(x.x+1e3*It,x.y+1e3*Yt),this.getLinkPointFromPoint(E,b,x,tt,!1,Zt),At.free(x),At.free(tt))}x=ft,(ut||!rt||st)&&(x=new At(ft.x+wt,ft.y+bt)),tt=Zt,(ut||!ot||st)&&(tt=new At(Zt.x+It,Zt.y+Yt)),!mt&&!ut&&rt&&3<z&&this.adjustPoints(0,ft,z-2,tt)?this.dd(z-1,Zt):!mt&&!ut&&ot&&3<z&&this.adjustPoints(1,x,z-1,Zt)?this.dd(0,ft):!mt&&(ut?6<=z:4<z)&&this.adjustPoints(1,x,z-2,tt)?(this.dd(0,ft),this.dd(z-1,Zt)):(this.Fj(),this.ne(ft),(ut||!rt||st)&&this.ne(x),ut&&this.addOrthoPoints(x,yt,tt,qt,a,E),(ut||!ot||st)&&this.ne(tt),this.ne(Zt))}return!0};function Uv(a,y){return Math.abs(y.x-a.x)>Math.abs(y.y-a.y)?(y.x>=a.x?y.x=a.x+9e9:y.x=a.x-9e9,y.y=a.y):(y.y>=a.y?y.y=a.y+9e9:y.y=a.y-9e9,y.x=a.x),y}En.prototype.getLinkPointFromPoint=function(a,y,x,E,b,z){if(z===void 0&&(z=new At),a===null||y===null)return z.assign(x),z;if(a.isVisible()||(b=a.findVisibleNode(),b!==null&&b!==a&&(y=b.port)),a=null,b=y.panel,b===null||b.se()||(b=b.panel),b===null){b=E.x,E=E.y;var tt=x.x;x=x.y}else{a=b.oe,b=1/(a.m11*a.m22-a.m12*a.m21),tt=a.m22*b;var rt=-a.m12*b,ot=-a.m21*b,st=a.m11*b,ut=b*(a.m21*a.dy-a.m22*a.dx),ft=b*(a.m12*a.dx-a.m11*a.dy);b=E.x*tt+E.y*ot+ut,E=E.x*rt+E.y*st+ft,tt=x.x*tt+x.y*ot+ut,x=x.x*rt+x.y*st+ft}return y.Sj(b,E,tt,x,z),a!==null&&z.transform(a),z};function Wm(a,y){var x=y.Zn;return x===null&&(x=new Rc,x.port=y,x.node=y.part,y.Zn=x),sS(x,a)}En.prototype.getLinkPoint=function(a,y,x,E,b,z,tt,rt){if(rt===void 0&&(rt=new At),x.sb()&&!If(x))return y.ga(x,rt),rt;if(x.$c()){var ot=Wm(this,y);if(ot!==null){if(rt.assign(ot.Zo),b&&this.routing===eS){var st=Wm(this,tt);if(st!==null&&ot.Gl<st.Gl){ot=At.alloc(),st=At.alloc();var ut=new Ee(y.ga(Sr,ot),y.ga(Hr,st)),ft=this.computeSpot(!E,tt);a=this.getLinkPoint(z,tt,ft,!E,b,a,y,st),(x.Hf(ba)||x.Hf(ko))&&a.y>=ut.y&&a.y<=ut.y+ut.height?rt.y=a.y:(x.Hf(Uo)||x.Hf(Ha))&&a.x>=ut.x&&a.x<=ut.x+ut.width&&(rt.x=a.x),At.free(ot),At.free(st)}}return rt}}return x=y.ga(Vm(x),At.alloc()),this.pointsCount>(b?6:2)?(tt=E?this.i(1):this.i(this.pointsCount-2),b&&(tt=Uv(x,tt.copy()))):(ot=this.computeSpot(!E,tt),z=At.alloc(),tt=tt.ga(Vm(ot),z),b&&(tt=Uv(x,tt)),At.free(z)),this.getLinkPointFromPoint(a,y,x,tt,E,rt),At.free(x),rt},En.prototype.getLinkDirection=function(a,y,x,E,b,z,tt,rt){t:if(E.sb())var ot=E.x>E.y?E.x>1-E.y?0:E.x<1-E.y?270:315:E.x<E.y?E.x>1-E.y?90:E.x<1-E.y?180:135:.5>E.x?225:.5<E.x?45:0;else{if(E.$c()&&(ot=Wm(this,y),ot!==null))switch(ot.Nc){case 1:ot=270;break t;case 2:ot=180;break t;default:case 4:ot=0;break t;case 8:ot=90;break t}ot=y.ga(er,At.alloc()),this.pointsCount>(z?6:2)?(rt=b?this.i(1):this.i(this.pointsCount-2),rt=z?Uv(ot,rt.copy()):x):(x=At.alloc(),rt=rt.ga(er,x),At.free(x)),x=Math.abs(rt.x-ot.x)>Math.abs(rt.y-ot.y)?rt.x>=ot.x?0:180:rt.y>=ot.y?90:270,At.free(ot),ot=x}return E.Mc()&&tt.Td(a)&&(ot+=180,360<=ot&&(ot-=360)),If(E)||(a=y.li(),a===0)||(45<=a&&135>a?ot+=90:135<=a&&225>a?ot+=180:225<=a&&315>a&&(ot+=270),360<=ot&&(ot-=360)),ot},En.prototype.computeEndSegmentLength=function(a,y,x,E){return y!==null&&x.$c()&&(a=Wm(this,y),a!==null)?a.Ju:(a=E?this.fromEndSegmentLength:this.toEndSegmentLength,y!==null&&isNaN(a)&&(a=E?y.fromEndSegmentLength:y.toEndSegmentLength),isNaN(a)&&(a=10),a)},En.prototype.computeSpot=function(a,y){return y===void 0&&(y=null),a?(a=y||this.fromPort,a===null?a=er:(y=this.fromSpot,y.Xb()&&(y=a.fromSpot),a=y===Bo?qi:y)):(a=y||this.toPort,a===null?a=er:(y=this.toSpot,y.Xb()&&(y=a.toSpot),a=y===Bo?qi:y)),a};function If(a){return a===qi||a.x===.5&&a.y===.5}function Vm(a){return a.x===.5&&a.y===.5?a:er}En.prototype.computeOtherPoint=function(a,y){return this.computeAdjusting()!==os&&4<this.pointsCount?this.computeMidPoint(new At):(a=y.Zn,a=a!==null?sS(a,this):null,a!==null?a.Zo:y.ga(er))},En.prototype.computeShortLength=function(a){if(a){if(a=this.fromShortLength,isNaN(a)){var y=this.fromPort;y!==null&&(a=y.fromShortLength)}return isNaN(a)?0:a}return a=this.toShortLength,isNaN(a)&&(y=this.toPort,y!==null&&(a=y.toShortLength)),isNaN(a)?0:a},En.prototype.Cf=function(a,y,x,E,b,z){if(this.pickable===!1)return!1;y===void 0&&(y=null),x===void 0&&(x=null);var tt=z;if(z===void 0&&(tt=Ii.alloc(),tt.reset()),tt.multiply(this.transform),this.fh(a,tt))return mv(this,y,x,b),z===void 0&&Ii.free(tt),!0;if(this.Yc(a,tt)){var rt=!1;if(!this.isAtomic)for(var ot=this.O.s,st=ot.length;st--;){var ut=ot[st];if(ut.visible||ut===this.locationObject){var ft=ut.actualBounds,mt=this.naturalBounds;if(!(ft.x>mt.width||ft.y>mt.height||0>ft.x+ft.width||0>ft.y+ft.height)){if(ft=Ii.alloc(),ft.set(tt),ut instanceof mn)rt=ut.Cf(a,y,x,E,b,ft);else if(this.path===ut){if(ut instanceof lr)if(rt=a,mt=E,ut.pickable===!1)rt=!1;else if(ft.multiply(ut.transform),mt)t:{var yt=rt,wt=ft;if(ut.fh(yt,wt))rt=!0;else{if(wt===void 0&&(wt=ut.transform,yt.Re(ut.actualBounds))){rt=!0;break t}rt=yt.left,mt=yt.right;var bt=yt.top;yt=yt.bottom;var Zt=At.alloc(),It=At.alloc(),Yt=At.alloc(),Jt=Ii.alloc();Jt.set(wt),Jt.bv(ut.transform),Jt.Vj(),It.x=mt,It.y=bt,It.transform(Jt),Zt.x=rt,Zt.y=bt,Zt.transform(Jt),wt=!1,Jd(ut,Zt,It,Yt)?wt=!0:(Zt.x=mt,Zt.y=yt,Zt.transform(Jt),Jd(ut,Zt,It,Yt)?wt=!0:(It.x=rt,It.y=yt,It.transform(Jt),Jd(ut,Zt,It,Yt)?wt=!0:(Zt.x=rt,Zt.y=bt,Zt.transform(Jt),Jd(ut,Zt,It,Yt)&&(wt=!0)))),Ii.free(Jt),At.free(Zt),At.free(It),At.free(Yt),rt=wt}}else rt=ut.fh(rt,ft)}else rt=oa(ut,a,E,ft);rt&&(mt=ut,y!==null&&(mt=y(ut)),mt&&(x===null||x(mt))&&b.add(mt)),Ii.free(ft)}}}return z===void 0&&Ii.free(tt),rt||this.background!==null||this.areaBackground!==null}return z===void 0&&Ii.free(tt),!1},En.prototype.computeCurve=function(){if(this.Wf===null){var a=this.fromPort,y=this.isOrthogonal;this.Wf=a!==null&&a===this.toPort&&!y}return this.Wf?Ys:this.curve},En.prototype.computeCorner=function(){if(this.curve===Ys)return 0;var a=this.corner;return(isNaN(a)||0>a)&&(a=10),a},En.prototype.findMidLabel=function(){for(var a=this.path,y=this.O.s,x=y.length,E=0;E<x;E++){var b=y[E];if(b!==a&&!b.isPanelMain&&(b.segmentIndex===-1/0||isNaN(b.segmentIndex)))return b}for(a=this.labelNodes;a.next();)if(y=a.value,y.segmentIndex===-1/0||isNaN(y.segmentIndex))return y;return null},En.prototype.computeSpacing=function(){if(!this.isVisible())return 0;var a=iS;a=Math.max(a,this.computeThickness());var y=this.fromPort,x=this.toPort;if(y!==null&&x!==null){var E=this.findMidLabel();if(E!==null){var b=E.naturalBounds,z=E.margin,tt=isNaN(b.width)?30:b.width*E.scale+z.left+z.right;b=isNaN(b.height)?14:b.height*E.scale+z.top+z.bottom,E=E.segmentOrientation,E===ep||E===_m||E===Qv?a=Math.max(a,b):E===ip||E===op||E===np||E===rp?a=Math.max(a,tt):(y=y.ga(er).ab(x.ga(er))/180*Math.PI,a=Math.max(a,Math.abs(Math.sin(y)*tt)+Math.abs(Math.cos(y)*b)+1)),this.curve===Ys&&(a*=1.333)}}return a},En.prototype.arrangeBundledLinks=function(a,y){if(y)for(y=0;y<a.length;y++){var x=a[y];x.computeAdjusting()===os&&x.bb()}},En.prototype.computeCurviness=function(){var a=this.curviness;if(isNaN(a)){a=nS;var y=this.Sf;if(y!==null){for(var x=On(),E=0,b=y.links,z=0;z<b.length;z++){var tt=b[z].computeSpacing();x.push(tt),E+=tt}for(E=-E/2,z=0;z<b.length;z++){if(b[z]===this){a=E+x[z]/2;break}E+=x[z]}y.Ds===this.fromNode&&(a=-a),Qn(x)}}return a},En.prototype.computeThickness=function(){if(!this.isVisible())return 0;var a=this.path;return a!==null?Math.max(a.strokeWidth,1):1},En.prototype.hasCurviness=function(){return!isNaN(this.curviness)||this.Sf!==null},En.prototype.adjustPoints=function(a,y,x,E){var b=this.computeAdjusting();if(this.isOrthogonal){if(b===Xm)return!1;b===Jm&&(b=tp)}switch(b){case Xm:var z=this.i(a),tt=this.i(x);if(!z.Xa(y)||!tt.Xa(E)){b=z.x,z=z.y;var rt=tt.x-b,ot=tt.y-z,st=Math.sqrt(rt*rt+ot*ot);if(!ue.$(st,0)){if(ue.$(rt,0))var ut=0>ot?-Math.PI/2:Math.PI/2;else ut=Math.atan(ot/Math.abs(rt)),0>rt&&(ut=Math.PI-ut);tt=y.x;var ft=y.y;rt=E.x-tt;var mt=E.y-ft;for(ot=Math.sqrt(rt*rt+mt*mt),ue.$(rt,0)?mt=0>mt?-Math.PI/2:Math.PI/2:(mt=Math.atan(mt/Math.abs(rt)),0>rt&&(mt=Math.PI-mt)),st=ot/st,ut=mt-ut,this.dd(a,y),a+=1;a<x;a++)y=this.i(a),rt=y.x-b,ot=y.y-z,y=Math.sqrt(rt*rt+ot*ot),ue.$(y,0)||(ue.$(rt,0)?ot=0>ot?-Math.PI/2:Math.PI/2:(ot=Math.atan(ot/Math.abs(rt)),0>rt&&(ot=Math.PI-ot)),rt=ot+ut,y*=st,this.L(a,tt+y*Math.cos(rt),ft+y*Math.sin(rt)));this.dd(x,E)}}return!0;case Jm:if(z=this.i(a),ft=this.i(x),!z.Xa(y)||!ft.Xa(E)){b=z.x,z=z.y,tt=ft.x,ft=ft.y,st=(tt-b)*(tt-b)+(ft-z)*(ft-z),rt=y.x,ut=y.y,ot=E.x,mt=E.y;var yt=1;if(ot-rt!==0){var wt=(mt-ut)/(ot-rt);yt=Math.sqrt(1+1/(wt*wt))}else wt=9e9;for(this.dd(a,y),a+=1;a<x;a++){y=this.i(a);var bt=y.x,Zt=y.y,It=.5;st!==0&&(It=((b-bt)*(b-tt)+(z-Zt)*(z-ft))/st);var Yt=b+It*(tt-b),Jt=z+It*(ft-z);y=Math.sqrt((bt-Yt)*(bt-Yt)+(Zt-Jt)*(Zt-Jt)),Zt<wt*(bt-Yt)+Jt&&(y=-y),0<wt&&(y=-y),bt=rt+It*(ot-rt),It=ut+It*(mt-ut),wt!==0?(y=bt+y/yt,this.L(a,y,It-(y-bt)/wt)):this.L(a,bt,It+y)}this.dd(x,E)}return!0;case tp:t:{if(this.isOrthogonal&&(b=this.i(a),z=this.i(a+1),tt=this.i(a+2),rt=z.x,ut=z.y,ft=rt,st=ut,ue.B(b.y,z.y)?ue.B(z.x,tt.x)?ut=y.y:ue.B(z.y,tt.y)&&(rt=y.x):ue.B(b.x,z.x)&&(ue.B(z.y,tt.y)?rt=y.x:ue.B(z.x,tt.x)&&(ut=y.y)),this.L(a+1,rt,ut),b=this.i(x),z=this.i(x-1),tt=this.i(x-2),rt=z.x,ut=z.y,ot=rt,mt=ut,ue.B(b.y,z.y)?ue.B(z.x,tt.x)?ut=E.y:ue.B(z.y,tt.y)&&(rt=E.x):ue.B(b.x,z.x)&&(ue.B(z.y,tt.y)?rt=E.x:ue.B(z.x,tt.x)&&(ut=E.y)),this.L(x-1,rt,ut),Yv(this))){this.L(a+1,ft,st),this.L(x-1,ot,mt),x=!1;break t}this.dd(a,y),this.dd(x,E),x=!0}return x;default:return!1}},En.prototype.addOrthoPoints=function(a,y,x,E,b,z){0>y?y+=360:360<=y&&(y-=360),0>E?E+=360:360<=E&&(E-=360);var tt=E;y=315<=y||45>y?0:45<=y&&135>y?90:135<=y&&225>y?180:270,E=315<=E||45>E?0:45<=E&&135>E?90:135<=E&&225>E?180:270;var rt=b.actualBounds.copy(),ot=z.actualBounds.copy();if(rt.w()&&ot.w()){rt.Bc(ap,ap),ot.Bc(ap,ap),rt.Ye(a),ot.Ye(x);var st=At.alloc(),ut=At.alloc();y===0?x.x>a.x||E===270&&x.y<a.y&&ot.right>a.x||E===90&&x.y>a.y&&ot.right>a.x?(st.h(x.x,a.y),ut.h(x.x,(a.y+x.y)/2),E===180?(st.x=this.computeMidOrthoPosition(a.x,a.y,x.x,x.y,!1),ut.x=st.x,ut.y=x.y):E===270&&x.y<a.y||E===90&&x.y>a.y?(st.x=a.x<ot.left?this.computeMidOrthoPosition(a.x,a.y,ot.left,x.y,!1):a.x<ot.right&&(E===270&&a.y<ot.top||E===90&&a.y>ot.bottom)?this.computeMidOrthoPosition(a.x,a.y,x.x,x.y,!1):ot.right,ut.x=st.x,ut.y=x.y):E===0&&a.x<ot.left&&a.y>ot.top&&a.y<ot.bottom&&(st.x=a.x,st.y=a.y<x.y?Math.min(x.y,ot.top):Math.max(x.y,ot.bottom),ut.y=st.y)):(st.h(a.x,x.y),ut.h((a.x+x.x)/2,x.y),(E===180||E===90&&x.y<rt.top||E===270&&x.y>rt.bottom)&&(E===180&&(ot.ca(a)||rt.ca(x))?st.y=this.computeMidOrthoPosition(a.x,a.y,x.x,x.y,!0):x.y<a.y&&(E===180||E===90)?st.y=this.computeMidOrthoPosition(a.x,rt.top,x.x,Math.max(x.y,ot.bottom),!0):x.y>a.y&&(E===180||E===270)&&(st.y=this.computeMidOrthoPosition(a.x,rt.bottom,x.x,Math.min(x.y,ot.top),!0)),ut.x=x.x,ut.y=st.y),st.y>rt.top&&st.y<rt.bottom&&(x.x>=rt.left&&x.x<=a.x||a.x<=ot.right&&a.x>=x.x?(E===90||E===270)&&(st.h(Math.max((a.x+x.x)/2,a.x),a.y),ut.h(st.x,x.y)):(st.y=E===270||(E===0||E===180)&&x.y<a.y?Math.min(x.y,E===0?rt.top:Math.min(rt.top,ot.top)):Math.max(x.y,E===0?rt.bottom:Math.max(rt.bottom,ot.bottom)),ut.x=x.x,ut.y=st.y))):y===180?x.x<a.x||E===270&&x.y<a.y&&ot.left<a.x||E===90&&x.y>a.y&&ot.left<a.x?(st.h(x.x,a.y),ut.h(x.x,(a.y+x.y)/2),E===0?(st.x=this.computeMidOrthoPosition(a.x,a.y,x.x,x.y,!1),ut.x=st.x,ut.y=x.y):E===270&&x.y<a.y||E===90&&x.y>a.y?(st.x=a.x>ot.right?this.computeMidOrthoPosition(a.x,a.y,ot.right,x.y,!1):a.x>ot.left&&(E===270&&a.y<ot.top||E===90&&a.y>ot.bottom)?this.computeMidOrthoPosition(a.x,a.y,x.x,x.y,!1):ot.left,ut.x=st.x,ut.y=x.y):E===180&&a.x>ot.right&&a.y>ot.top&&a.y<ot.bottom&&(st.x=a.x,st.y=a.y<x.y?Math.min(x.y,ot.top):Math.max(x.y,ot.bottom),ut.y=st.y)):(st.h(a.x,x.y),ut.h((a.x+x.x)/2,x.y),(E===0||E===90&&x.y<rt.top||E===270&&x.y>rt.bottom)&&(E===0&&(ot.ca(a)||rt.ca(x))?st.y=this.computeMidOrthoPosition(a.x,a.y,x.x,x.y,!0):x.y<a.y&&(E===0||E===90)?st.y=this.computeMidOrthoPosition(a.x,rt.top,x.x,Math.max(x.y,ot.bottom),!0):x.y>a.y&&(E===0||E===270)&&(st.y=this.computeMidOrthoPosition(a.x,rt.bottom,x.x,Math.min(x.y,ot.top),!0)),ut.x=x.x,ut.y=st.y),st.y>rt.top&&st.y<rt.bottom&&(x.x<=rt.right&&x.x>=a.x||a.x>=ot.left&&a.x<=x.x?(E===90||E===270)&&(st.h(Math.min((a.x+x.x)/2,a.x),a.y),ut.h(st.x,x.y)):(st.y=E===270||(E===0||E===180)&&x.y<a.y?Math.min(x.y,E===180?rt.top:Math.min(rt.top,ot.top)):Math.max(x.y,E===180?rt.bottom:Math.max(rt.bottom,ot.bottom)),ut.x=x.x,ut.y=st.y))):y===90?x.y>a.y||E===180&&x.x<a.x&&ot.bottom>a.y||E===0&&x.x>a.x&&ot.bottom>a.y?(st.h(a.x,x.y),ut.h((a.x+x.x)/2,x.y),E===270?(st.y=this.computeMidOrthoPosition(a.x,a.y,x.x,x.y,!0),ut.x=x.x,ut.y=st.y):E===180&&x.x<a.x||E===0&&x.x>a.x?(st.y=a.y<ot.top?this.computeMidOrthoPosition(a.x,a.y,x.x,ot.top,!0):a.y<ot.bottom&&(E===180&&a.x<ot.left||E===0&&a.x>ot.right)?this.computeMidOrthoPosition(a.x,a.y,x.x,x.y,!0):ot.bottom,ut.x=x.x,ut.y=st.y):E===90&&a.y<ot.top&&a.x>ot.left&&a.x<ot.right&&(st.x=a.x<x.x?Math.min(x.x,ot.left):Math.max(x.x,ot.right),st.y=a.y,ut.x=st.x)):(st.h(x.x,a.y),ut.h(x.x,(a.y+x.y)/2),(E===270||E===0&&x.x<rt.left||E===180&&x.x>rt.right)&&(E===270&&(ot.ca(a)||rt.ca(x))?st.x=this.computeMidOrthoPosition(a.x,a.y,x.x,x.y,!1):x.x<a.x&&(E===270||E===0)?st.x=this.computeMidOrthoPosition(rt.left,a.y,Math.max(x.x,ot.right),x.y,!1):x.x>a.x&&(E===270||E===180)&&(st.x=this.computeMidOrthoPosition(rt.right,a.y,Math.min(x.x,ot.left),x.y,!1)),ut.x=st.x,ut.y=x.y),st.x>rt.left&&st.x<rt.right&&(x.y>=rt.top&&x.y<=a.y||a.y<=ot.bottom&&a.y>=x.y?(E===0||E===180)&&(st.h(a.x,Math.max((a.y+x.y)/2,a.y)),ut.h(x.x,st.y)):(st.x=E===180||(E===90||E===270)&&x.x<a.x?Math.min(x.x,E===90?rt.left:Math.min(rt.left,ot.left)):Math.max(x.x,E===90?rt.right:Math.max(rt.right,ot.right)),ut.x=st.x,ut.y=x.y))):x.y<a.y||E===180&&x.x<a.x&&ot.top<a.y||E===0&&x.x>a.x&&ot.top<a.y?(st.h(a.x,x.y),ut.h((a.x+x.x)/2,x.y),E===90?(st.y=this.computeMidOrthoPosition(a.x,a.y,x.x,x.y,!0),ut.x=x.x,ut.y=st.y):E===180&&x.x<a.x||E===0&&x.x>=a.x?(st.y=a.y>ot.bottom?this.computeMidOrthoPosition(a.x,a.y,x.x,ot.bottom,!0):a.y>ot.top&&(E===180&&a.x<ot.left||E===0&&a.x>ot.right)?this.computeMidOrthoPosition(a.x,a.y,x.x,x.y,!0):ot.top,ut.x=x.x,ut.y=st.y):E===270&&a.y>ot.bottom&&a.x>ot.left&&a.x<ot.right&&(st.x=a.x<x.x?Math.min(x.x,ot.left):Math.max(x.x,ot.right),st.y=a.y,ut.x=st.x)):(st.h(x.x,a.y),ut.h(x.x,(a.y+x.y)/2),(E===90||E===0&&x.x<rt.left||E===180&&x.x>rt.right)&&(E===90&&(ot.ca(a)||rt.ca(x))?st.x=this.computeMidOrthoPosition(a.x,a.y,x.x,x.y,!1):x.x<a.x&&(E===90||E===0)?st.x=this.computeMidOrthoPosition(rt.left,a.y,Math.max(x.x,ot.right),x.y,!1):x.x>a.x&&(E===90||E===180)&&(st.x=this.computeMidOrthoPosition(rt.right,a.y,Math.min(x.x,ot.left),x.y,!1)),ut.x=st.x,ut.y=x.y),st.x>rt.left&&st.x<rt.right&&(x.y<=rt.bottom&&x.y>=a.y||a.y>=ot.top&&a.y<=x.y?(E===0||E===180)&&(st.h(a.x,Math.min((a.y+x.y)/2,a.y)),ut.h(x.x,st.y)):(st.x=E===180||(E===90||E===270)&&x.x<a.x?Math.min(x.x,E===270?rt.left:Math.min(rt.left,ot.left)):Math.max(x.x,E===270?rt.right:Math.max(rt.right,ot.right)),ut.x=st.x,ut.y=x.y)));var ft=x;if(this.isAvoiding){var mt=this.diagram;if(mt===null||b===z||this.layer.isTemporary||!mf(mt)||rt.ca(ft)&&!z.Td(b)||ot.ca(a)&&!b.Td(z))y=!1;else{var yt=vf(mt,!0,this.containingGroup,null);if(this.segmentIndex!==17&&yt.Yj(Math.min(a.x,st.x),Math.min(a.y,st.y),Math.abs(a.x-st.x),Math.abs(a.y-st.y))&&yt.Yj(Math.min(st.x,ut.x),Math.min(st.y,ut.y),Math.abs(st.x-ut.x),Math.abs(st.y-ut.y))&&yt.Yj(Math.min(ut.x,ft.x),Math.min(ut.y,ft.y),Math.abs(ut.x-ft.x),Math.abs(ut.y-ft.y)))y=!1;else{b=a,z=ft;var wt=x=null;if(mt.isVirtualized){mt=yt.bounds.copy(),mt.Bc(-yt.Ho,-yt.Go);var bt=At.alloc();jf(yt,a.x,a.y)||(ue.Ff(mt.x,mt.y,mt.x+mt.width,mt.y+mt.height,a.x,a.y,st.x,st.y,bt)?(x=a=bt.copy(),y=bt.ab(st)):ue.Ff(mt.x,mt.y,mt.x+mt.width,mt.y+mt.height,st.x,st.y,ut.x,ut.y,bt)?(x=a=bt.copy(),y=bt.ab(ut)):ue.Ff(mt.x,mt.y,mt.x+mt.width,mt.y+mt.height,ut.x,ut.y,ft.x,ft.y,bt)&&(x=a=bt.copy(),y=bt.ab(ft))),jf(yt,ft.x,ft.y)||(ue.Ff(mt.x,mt.y,mt.x+mt.width,mt.y+mt.height,ft.x,ft.y,ut.x,ut.y,bt)?(wt=ft=bt.copy(),E=ut.ab(bt)):ue.Ff(mt.x,mt.y,mt.x+mt.width,mt.y+mt.height,ut.x,ut.y,st.x,st.y,bt)?(wt=ft=bt.copy(),E=st.ab(bt)):ue.Ff(mt.x,mt.y,mt.x+mt.width,mt.y+mt.height,st.x,st.y,a.x,a.y,bt)&&(wt=ft=bt.copy(),E=a.ab(bt))),At.free(bt)}rt=rt.copy().ed(ot),rt.Bc(yt.Ho*yt.Os,yt.Go*yt.Os),oS(yt,a,y,ft,E,rt,!0),ot=Du(yt,ft.x,ft.y),!yt.abort&&ot>=zf&&(rS(yt),rt.Bc(yt.Ho*yt.Hx,yt.Go*yt.Ix),oS(yt,a,y,ft,E,rt,!1),ot=Du(yt,ft.x,ft.y)),!yt.abort&&ot<zf&&Du(yt,ft.x,ft.y)!==bh?(Xv(this,yt,ft.x,ft.y,E,!0,tt),rt=this.i(2),4>this.pointsCount?(y===0||y===180?(rt.x=a.x,rt.y=ft.y):(rt.x=ft.x,rt.y=a.y),this.L(2,rt.x,rt.y),this.m(3,rt.x,rt.y)):(tt=this.i(3),y===0||y===180?ue.B(rt.x,tt.x)?(rt=y===0?Math.max(rt.x,a.x):Math.min(rt.x,a.x),this.L(2,rt,a.y),this.L(3,rt,tt.y)):ue.B(rt.y,tt.y)?(Math.abs(a.y-rt.y)<=yt.Go/2&&(this.L(2,rt.x,a.y),this.L(3,tt.x,a.y)),this.m(2,rt.x,a.y)):this.L(2,a.x,rt.y):(y===90||y===270)&&(ue.B(rt.y,tt.y)?(rt=y===90?Math.max(rt.y,a.y):Math.min(rt.y,a.y),this.L(2,a.x,rt),this.L(3,tt.x,rt)):ue.B(rt.x,tt.x)?(Math.abs(a.x-rt.x)<=yt.Ho/2&&(this.L(2,a.x,rt.y),this.L(3,a.x,tt.y)),this.m(2,a.x,rt.y)):this.L(2,rt.x,a.y))),x!==null&&(a=this.i(1),tt=this.i(2),a.x!==tt.x&&a.y!==tt.y?y===0||y===180?this.m(2,a.x,tt.y):this.m(2,tt.x,a.y):y===0||y===180?this.m(2,b.x,x.y):this.m(2,x.x,b.y)),wt!==null&&(E===0||E===180?this.yf(z.x,wt.y):this.yf(wt.x,z.y)),y=!0):y=!1}}}else y=!1;y||(this.ne(st.copy()),this.ne(ut.copy())),At.free(st),At.free(ut)}},En.prototype.computeMidOrthoPosition=function(a,y,x,E,b){var z=0;return!this.hasCurviness()||this.computeSpot(!0,this.fromPort).$c()||this.computeSpot(!1,this.toPort).$c()||(z=this.computeCurviness()),b?(y+E)/2+z:(a+x)/2+z};function Yv(a){if(a.diagram===null||!a.isAvoiding||!mf(a.diagram))return!1;var y=a.points.s,x=y.length;if(4>x)return!1;a=vf(a.diagram,!0,a.containingGroup,null);for(var E=1;E<x-2;E++){var b=y[E],z=y[E+1];if(!a.Yj(Math.min(b.x,z.x),Math.min(b.y,z.y),Math.abs(b.x-z.x),Math.abs(b.y-z.y)))return!0}return!1}function Xv(a,y,x,E,b,z,tt){var rt=y.Ho,ot=y.Go,st=Du(y,x,E),ut=x,ft=E;for(b===0?ut+=rt:b===90?ft+=ot:b===180?ut-=rt:ft-=ot,b!==tt&&st>qd&&Du(y,ut,ft)!==st-1&&(Du(y,x-rt,E)===st-1?(b=180,ut=x-rt,ft=E):Du(y,x+rt,E)===st-1?(b=0,ut=x+rt,ft=E):Du(y,x,E-ot)===st-1?(b=270,ut=x,ft=E-ot):Du(y,x,E+ot)===st-1&&(b=90,ut=x,ft=E+ot));st>qd&&Du(y,ut,ft)===st-1;)x=ut,E=ft,b===0?ut+=rt:b===90?ft+=ot:b===180?ut-=rt:ft-=ot,--st;z?st>qd&&(b===180||b===0?x=Math.floor(x/rt)*rt+rt/2:(b===90||b===270)&&(E=Math.floor(E/ot)*ot+ot/2)):(x=Math.floor(x/rt)*rt+rt/2,E=Math.floor(E/ot)*ot+ot/2),st>qd&&(z=b,tt=x,ut=E,b===0?(z=90,ut+=ot):b===90?(z=180,tt-=rt):b===180?(z=270,ut-=ot):b===270&&(z=0,tt+=rt),Du(y,tt,ut)===st-1?Xv(a,y,tt,ut,z,!1,z):(tt=x,ut=E,b===0?(z=270,ut-=ot):b===90?(z=0,tt+=rt):b===180?(z=90,ut+=ot):b===270&&(z=180,tt-=rt),Du(y,tt,ut)===st-1&&Xv(a,y,tt,ut,z,!1,z))),a.yf(x,E)}En.prototype.ez=function(a){var y=a.x;a=a.y;for(var x=this.i(0),E=this.i(1),b=Zn(y,a,x.x,x.y,E.x,E.y),z=0,tt=1;tt<this.pointsCount-1;tt++){x=this.i(tt+1);var rt=Zn(y,a,E.x,E.y,x.x,x.y);E=x,rt<b&&(z=tt,b=rt)}return z},En.prototype.qc=function(){this.lk=!1,this.v()},En.prototype.Ul=function(a){if(!(!a&&(this.fd===!1||(a=this.Pb(),this.lk&&(a===null||a.geometry!==null))))&&(2>this.pointsCount?this.lk=!0:this.ua=this.makeGeometry(),a=this.path,a!==null)){a.ua=this.ua;for(var y=this.O.s,x=y.length,E=0;E<x;E++){var b=y[E];b!==a&&b.isPanelMain&&b instanceof lr&&(b.ua=this.ua)}}},En.prototype.makeGeometry=function(){var a=this.ua,y=this.pointsCount,x=!1,E=this.diagram;E!==null&&Qd(this)&&E.Eh.contains(this)&&(this.ml.width!==0||this.ml.height!==0)&&(E.animationManager.isAnimating||E.currentTool!==E.toolManager)&&(x=!0);var b=this.i(0).copy(),z=b.copy();E=this.Nb.s;var tt=this.computeCurve();if(tt===Ys&&3<=y&&!ue.$(this.smoothness,0))if(y===3){var rt=this.i(1);E=Math.min(b.x,rt.x);var ot=Math.min(b.y,rt.y);rt=this.i(2),E=Math.min(E,rt.x),ot=Math.min(ot,rt.y)}else{if(this.isOrthogonal)for(ot=0;ot<y;ot++)rt=E[ot],z.x=Math.min(rt.x,z.x),z.y=Math.min(rt.y,z.y);else for(E=3;E<y;E+=3)E+3>=y&&(E=y-1),ot=this.i(E),z.x=Math.min(ot.x,z.x),z.y=Math.min(ot.y,z.y);E=z.x,ot=z.y}else{for(ot=0;ot<y;ot++)rt=E[ot],z.x=Math.min(rt.x,z.x),z.y=Math.min(rt.y,z.y);E=z.x,ot=z.y}if(E-=this.su.x,ot-=this.su.y,b.x-=E,b.y-=ot,y!==2||Qd(this)){if(a.type=xn.o,rt=A1(a),this.computeShortLength(!0)!==0&&(b=Bc(this,b,!0,z)),Tf(rt,b.x,b.y,!1),tt===Ys&&3<=y&&!ue.$(this.smoothness,0))if(y===3)x=this.i(1),y=x.x-E,x=x.y-ot,b=this.i(2).copy(),b.x-=E,b.y-=ot,this.computeShortLength(!1)!==0&&(b=Bc(this,b,!1,z)),Ph(rt,y,x,y,x,b.x,b.y);else if(this.isOrthogonal){y=At.allocAt(E,ot),x=At.alloc(),x.assign(this.i(1)),z=At.allocAt(E,ot),b=At.allocAt(E,ot),tt=this.i(0);for(var st,ut=this.smoothness/3,ft=1;ft<this.pointsCount-1;ft++){st=this.i(ft);var mt=tt,yt=st,wt=this.i(Jv(this,st,ft,!1));if((!ue.$(mt.x,yt.x)||!ue.$(yt.x,wt.x))&&(!ue.$(mt.y,yt.y)||!ue.$(yt.y,wt.y))){var bt=ut;isNaN(bt)&&(bt=this.smoothness/3);var Zt=mt.x;mt=mt.y;var It=yt.x;yt=yt.y;var Yt=wt.x;wt=wt.y;var Jt=bt*Um(Zt,mt,It,yt);bt*=Um(It,yt,Yt,wt),ue.$(mt,yt)&&ue.$(It,Yt)&&(It>Zt?wt>yt?(z.x=It-Jt,z.y=yt-Jt,b.x=It+bt,b.y=yt+bt):(z.x=It-Jt,z.y=yt+Jt,b.x=It+bt,b.y=yt-bt):wt>yt?(z.x=It+Jt,z.y=yt-Jt,b.x=It-bt,b.y=yt+bt):(z.x=It+Jt,z.y=yt+Jt,b.x=It-bt,b.y=yt-bt)),ue.$(Zt,It)&&ue.$(yt,wt)&&(yt>mt?(Yt>It?(z.x=It-Jt,z.y=yt-Jt,b.x=It+bt):(z.x=It+Jt,z.y=yt-Jt,b.x=It-bt),b.y=yt+bt):(Yt>It?(z.x=It-Jt,z.y=yt+Jt,b.x=It+bt):(z.x=It+Jt,z.y=yt+Jt,b.x=It-bt),b.y=yt-bt)),(ue.$(Zt,It)&&ue.$(It,Yt)||ue.$(mt,yt)&&ue.$(yt,wt))&&(Zt=.5*(Zt+Yt),mt=.5*(mt+wt),z.x=Zt,z.y=mt,b.x=Zt,b.y=mt),(ft===1||ft===2&&ue.$(tt.x,this.i(0).x)&&ue.$(tt.y,this.i(0).y))&&(x.x=.5*(tt.x+st.x),x.y=.5*(tt.y+st.y)),Ph(rt,x.x-E,x.y-ot,z.x-E,z.y-ot,st.x-E,st.y-ot),y.set(z),x.set(b),tt=st}}st=tt.x,tt=tt.y,ut=this.i(this.pointsCount-1),this.computeShortLength(!1)!==0&&(ut=Bc(this,ut.copy(),!1,Nn)),st=.5*(st+ut.x),tt=.5*(tt+ut.y),Ph(rt,b.x-E,b.y-ot,st-E,tt-ot,ut.x-E,ut.y-ot),At.free(y),At.free(x),At.free(z),At.free(b)}else for(x=3;x<y;x+=3)z=this.i(x-2),x+3>=y&&(x=y-1),b=this.i(x-1),tt=this.i(x),x===y-1&&this.computeShortLength(!1)!==0&&(tt=Bc(this,tt.copy(),!1,Nn)),Ph(rt,z.x-E,z.y-ot,b.x-E,b.y-ot,tt.x-E,tt.y-ot);else{for(z=At.alloc(),z.assign(this.i(0)),b=At.alloc(),b.assign(z),tt=this.computeCorner(),ft=1,st=0;ft<y;){if(ft=Jv(this,z,ft,1<ft),ut=this.i(ft),ft>=y-1){if(!z.D(ut))this.computeShortLength(!1)!==0&&(ut=Bc(this,ut.copy(),!1,Nn)),Tc(this,rt,-E,-ot,z,ut,x);else if(st===0)for(ft=1;ft<y;)b.assign(z),ut=this.i(ft++),Tc(this,rt,-E,-ot,z,ut,x),z.assign(ut);break}if(st=Jv(this,ut,ft+1,ft<y-3),ft=-E,Zt=-ot,mt=ut,It=this.i(st),bt=x,ue.B(z.y,mt.y)&&ue.B(mt.x,It.x))if(wt=Math.min(tt,Math.abs(mt.x-b.x)/2),wt=Jt=Math.min(wt,Math.abs(It.y-mt.y)/2),ue.B(wt,0))Tc(this,rt,ft,Zt,z,mt,bt),z.assign(mt);else{var qt=mt.x,ae=mt.y;yt=qt,Yt=ae,mt.x>z.x?qt=mt.x-wt:qt=mt.x+wt,It.y>mt.y?Yt=mt.y+Jt:Yt=mt.y-Jt,It=At.allocAt(qt,ae),Tc(this,rt,ft,Zt,z,It,bt),At.free(It),Im(rt,mt.x+ft,mt.y+Zt,yt+ft,Yt+Zt),z.h(yt,Yt)}else ue.B(z.x,mt.x)&&ue.B(mt.y,It.y)?(wt=Math.min(tt,Math.abs(mt.y-b.y)/2),wt=Jt=Math.min(wt,Math.abs(It.x-mt.x)/2),ue.B(Jt,0)?(Tc(this,rt,ft,Zt,z,mt,bt),z.assign(mt)):(qt=mt.x,ae=mt.y,yt=qt,Yt=ae,mt.y>z.y?ae=mt.y-wt:ae=mt.y+wt,It.x>mt.x?yt=mt.x+Jt:yt=mt.x-Jt,It=At.allocAt(qt,ae),Tc(this,rt,ft,Zt,z,It,bt),At.free(It),Im(rt,mt.x+ft,mt.y+Zt,yt+ft,Yt+Zt),z.h(yt,Yt))):(Tc(this,rt,ft,Zt,z,mt,bt),z.assign(mt));b.assign(ut),ft=st}At.free(z)}Rm=rt}else rt=this.i(1).copy(),rt.x-=E,rt.y-=ot,this.computeShortLength(!0)!==0&&(b=Bc(this,b,!0,z)),this.computeShortLength(!1)!==0&&(rt=Bc(this,rt,!1,z)),a.type=xn.j,a.startX=b.x,a.startY=b.y,a.endX=rt.x,a.endY=rt.y;return this.lk=!0,a};function Um(a,y,x,E){return a=x-a,isNaN(a)||a===1/0||a===-1/0?NaN:(0>a&&(a=-a),y=E-y,isNaN(y)||y===1/0||y===-1/0?NaN:(0>y&&(y=-y),ue.$(a,0)?y:ue.$(y,0)?a:Math.sqrt(a*a+y*y)))}function Bc(a,y,x,E){var b=a.pointsCount;if(2>b)return y;if(x){var z=a.i(1);if(x=z.x-E.x,z=z.y-E.y,E=Um(y.x,y.y,x,z),E===0)return y;b=b===2?.5*E:E,a=a.computeShortLength(!0),a>b&&(a=b),b=a*(z-y.y)/E,y.x+=a*(x-y.x)/E,y.y+=b}else{if(z=a.i(b-2),x=z.x-E.x,z=z.y-E.y,E=Um(y.x,y.y,x,z),E===0)return y;b=b===2?.5*E:E,a=a.computeShortLength(!1),a>b&&(a=b),b=a*(y.y-z)/E,y.x-=a*(y.x-x)/E,y.y-=b}return y}function Jv(a,y,x,E){for(var b=a.pointsCount,z=y;ue.$(y.x,z.x)&&ue.$(y.y,z.y);){if(x>=b)return b-1;z=a.i(x++)}if(!ue.$(y.x,z.x)&&!ue.$(y.y,z.y))return x-1;for(var tt=z;ue.$(y.x,z.x)&&ue.$(z.x,tt.x)&&(!E||(y.y>=z.y?z.y>=tt.y:z.y<=tt.y))||ue.$(y.y,z.y)&&ue.$(z.y,tt.y)&&(!E||(y.x>=z.x?z.x>=tt.x:z.x<=tt.x));){if(x>=b)return b-1;tt=a.i(x++)}return x-2}En.prototype.computeJumpLength=function(){return 10};function Tc(a,y,x,E,b,z,tt){if(!tt&&Qd(a)){tt=a.computeJumpLength();var rt=tt/2,ot=[],st=0;if(a.isVisible()&&(st=kx(a,b,z,ot)),0<st){if(ue.B(b.y,z.y))if(b.x<z.x)for(var ut=0;ut<st;){var ft=Math.max(b.x,Math.min(ot[ut++]-rt,z.x-tt));y.lineTo(ft+x,z.y+E);for(var mt=ft+x,yt=Math.min(ft+tt,z.x);ut<st&&(ft=ot[ut],ft<yt+tt);)ut++,yt=Math.min(ft+rt,z.x);ft=z.y-tt+E,yt+=x;var wt=z.y+E;a.curve===Lh?Tf(y,yt,wt,!1):Ph(y,mt,ft,yt,ft,yt,wt)}else for(--st;0<=st;){for(ut=Math.min(b.x,Math.max(ot[st--]+rt,z.x+tt)),y.lineTo(ut+x,z.y+E),mt=ut+x,ft=Math.max(ut-tt,z.x);0<=st&&(ut=ot[st],ut>ft-tt);)st--,ft=Math.max(ut-rt,z.x);ut=z.y-tt+E,ft+=x,yt=z.y+E,a.curve===Lh?Tf(y,ft,yt,!1):Ph(y,mt,ut,ft,ut,ft,yt)}else if(ue.B(b.x,z.x))if(b.y<z.y)for(ut=0;ut<st;){for(ft=Math.max(b.y,Math.min(ot[ut++]-rt,z.y-tt)),y.lineTo(z.x+x,ft+E),mt=ft+E,ft=Math.min(ft+tt,z.y);ut<st&&(yt=ot[ut],yt<ft+tt);)ut++,ft=Math.min(yt+rt,z.y);yt=z.x-tt+x,wt=z.x+x,ft+=E,a.curve===Lh?Tf(y,wt,ft,!1):Ph(y,yt,mt,yt,ft,wt,ft)}else for(--st;0<=st;){for(ut=Math.min(b.y,Math.max(ot[st--]+rt,z.y+tt)),y.lineTo(z.x+x,ut+E),mt=ut+E,ut=Math.max(ut-tt,z.y);0<=st&&(ft=ot[st],ft>ut-tt);)st--,ut=Math.max(ft-rt,z.y);ft=z.x-tt+x,yt=z.x+x,ut+=E,a.curve===Lh?Tf(y,yt,ut,!1):Ph(y,ft,mt,ft,ut,yt,ut)}}}y.lineTo(z.x+x,z.y+E)}function kx(a,y,x,E){var b=a.diagram;if(b===null||y.D(x))return 0;for(b=b.layers;b.next();){var z=b.value;if(z!==null&&z.visible){z=z.Pa.s;for(var tt=z.length,rt=0;rt<tt;rt++){var ot=z[rt];if(ot instanceof En){if(ot===a)return 0<E.length&&E.sort(function(ut,ft){return ut-ft}),E.length;if(ot.isVisible()&&Qd(ot)){var st=ot.routeBounds;st.w()&&a.routeBounds.Yc(st)&&!a.usesSamePort(ot)&&(st=ot.path,st!==null&&st.Ed()&&Lx(y,x,E,ot))}}}}}return 0<E.length&&E.sort(function(ut,ft){return ut-ft}),E.length}function Lx(a,y,x,E){for(var b=ue.B(a.y,y.y),z=E.pointsCount,tt=E.i(0),rt=At.alloc(),ot=1;ot<z;ot++){var st=E.i(ot);if(ot<z-1){var ut=E.i(ot+1);if(tt.y===st.y&&st.y===ut.y){if(st.x>tt.x&&ut.x>=st.x||st.x<tt.x&&ut.x<=st.x)continue}else if(tt.x===st.x&&st.x===ut.x&&(st.y>tt.y&&ut.y>=st.y||st.y<tt.y&&ut.y<=st.y))continue}t:{ut=a.x;var ft=a.y,mt=y.x,yt=y.y,wt=tt.x;tt=tt.y;var bt=st.x,Zt=st.y;if(ue.B(ut,mt)){if(!ue.B(ft,yt)&&ue.B(tt,Zt)&&Math.min(ft,yt)<tt&&Math.max(ft,yt)>tt&&Math.min(wt,bt)<ut&&Math.max(wt,bt)>ut&&!ue.B(wt,bt)){rt.x=ut,rt.y=tt,ut=!0;break t}}else if(ue.B(ft,yt)&&ue.B(wt,bt)&&Math.min(ut,mt)<wt&&Math.max(ut,mt)>wt&&Math.min(tt,Zt)<ft&&Math.max(tt,Zt)>ft&&!ue.B(tt,Zt)){rt.x=wt,rt.y=ft,ut=!0;break t}rt.x=0,rt.y=0,ut=!1}ut&&(b?x.push(rt.x):x.push(rt.y)),tt=st}At.free(rt)}function Qd(a){return a=a.curve,a===Rf||a===Lh}function Ym(a,y){(y||Qd(a))&&(y=a.diagram,y===null||y.animationManager.isTicking||y.Eh.contains(a)||a.ml.width===0&&a.ml.height===0||y.Eh.add(a,a.ml.copy()))}En.prototype.Xo=function(a){var y=this.layer;if(y!==null&&y.visible&&!y.isTemporary){var x=y.diagram;if(x!==null&&!x.animationManager.isTicking){var E=!1;for(x=x.layers;x.next();){var b=x.value;if(b.visible){if(b===y){E=!0;var z=!1;b=b.Pa.s;for(var tt=b.length,rt=0;rt<tt;rt++){var ot=b[rt];ot instanceof En&&(ot===this?z=!0:z&&tS(this,ot,a))}}else if(E)for(z=b.Pa.s,b=z.length,tt=0;tt<b;tt++)rt=z[tt],rt instanceof En&&tS(this,rt,a)}}}}};function tS(a,y,x){if(y!==null&&y.lk&&y.fd&&Qd(y)){var E=y.routeBounds;E.w()&&(a.routeBounds.Yc(E)||x.Yc(E))&&(a.usesSamePort(y)||y.qc())}}En.prototype.usesSamePort=function(a){var y=this.pointsCount,x=a.pointsCount;if(0<y&&0<x){var E=this.i(0),b=a.i(0);if(E.Xa(b)||(y=this.i(y-1),a=a.i(x-1),y.Xa(a)||E.Xa(a)||y.Xa(b)))return!0}else if(this.fromNode===a.fromNode||this.toNode===a.toNode||this.fromNode===a.toNode||this.toNode===a.fromNode)return!0;return!1},En.prototype.isVisible=function(){if(!Li.prototype.isVisible.call(this))return!1;var a=this.containingGroup,y=!0,x=this.diagram;if(x!==null&&(y=x.isTreePathToChildren),x=this.fromNode,x!==null){if(this.isTreeLink&&y&&!x.isTreeExpanded)return!1;if(x===a)return!0;for(var E=x;E!==null;){if(E.labeledLink===this)return!0;E=E.containingGroup}if(x=x.findVisibleNode(),x===null||x===a)return!1}if(x=this.toNode,x!==null){if(this.isTreeLink&&!y&&!x.isTreeExpanded)return!1;if(x===a)return!0;for(y=x;y!==null;){if(y.labeledLink===this)return!0;y=y.containingGroup}if(y=x.findVisibleNode(),y===null||y===a)return!1}return!0},En.prototype.Zb=function(a){if(Li.prototype.Zb.call(this,a),a&&Ym(this,!1),this.Sf!==null&&this.Sf.Sl(),this.wd!==null)for(var y=this.wd.iterator;y.next();)y.value.Zb(a)},En.prototype.computeAdjusting=function(){return this.isAvoiding&&this.diagram!==null&&this.diagram.animationManager.defaultAnimation.isAnimating?tp:this.qk};function qg(a){var y=a.ef;if(y!==null){var x=a.uf;if(x!==null&&isNaN(a.curviness)){for(var E=a.ff,b=a.vf,z=a=null,tt=y.jb.s,rt=tt.length,ot=0;ot<rt;ot++){var st=tt[ot];(st.ef===y&&st.ff===E&&st.uf===x&&st.vf===b||st.ef===x&&st.ff===b&&st.uf===y&&st.vf===E)&&(z===null?z=st:(a===null&&(a=[],a.push(z)),a.push(st)))}if(a!==null){for(z=K1(y,x,E,b),z===null&&(z=new qm(y,E,x,b),H1(y,z),H1(x,z)),z.links=a,y=0;y<a.length;y++)a[y].Sf=z;z.Sl()}}}}function $g(a){var y=a.Sf;y!==null&&isNaN(a.curviness)&&(a.Sf=null,a=y.links.indexOf(a),0<=a&&(ei(y.links,a),y.Sl()))}En.prototype.ph=function(){return!0},ge.Object.defineProperties(En.prototype,{fromNode:{get:function(){return this.ef},set:function(a){var y=this.ef;if(y!==a){var x=this.fromPort;y!==null&&(this.uf!==y&&Hm(y,this,x),$g(this),this.C(2)),this.ef=a,a!==null&&this.Zb(a.isVisible()),this.Wf=null,this.bb();var E=this.diagram;E!==null&&E.aa&&E.partManager.setFromNodeForLink(this,a,y);var b=this.fromPort,z=this.fromPortChanged;if(z!==null){var tt=!0;E!==null&&(tt=E.aa,E.aa=!0),z(this,x,b),E!==null&&(E.aa=tt)}a!==null&&(this.uf!==a&&Gm(a,this,b),qg(this),this.C(1)),this.g("fromNode",y,a),Of(this)}}},fromPortId:{get:function(){return this.ff},set:function(a){var y=this.ff;if(y!==a){var x=this.fromPort;x!==null&&Os(x),$g(this),this.ff=a;var E=this.fromPort;E!==null&&Os(E);var b=this.diagram;if(b!==null){var z=this.data,tt=b.model;z!==null&&tt.ri()&&tt.xv(z,a)}x!==E&&(this.Wf=null,this.bb(),z=this.fromPortChanged,z!==null&&(tt=!0,b!==null&&(tt=b.aa,b.aa=!0),z(this,x,E),b!==null&&(b.aa=tt))),qg(this),this.g("fromPortId",y,a)}}},fromPort:{get:function(){var a=this.ef;return a===null?null:a.ns(this.ff)}},fromPortChanged:{get:function(){return this.gn},set:function(a){var y=this.gn;y!==a&&(this.gn=a,this.g("fromPortChanged",y,a))}},toNode:{get:function(){return this.uf},set:function(a){var y=this.uf;if(y!==a){var x=this.toPort;y!==null&&(this.ef!==y&&Hm(y,this,x),$g(this),this.C(2)),this.uf=a,a!==null&&this.Zb(a.isVisible()),this.Wf=null,this.bb();var E=this.diagram;E!==null&&E.aa&&E.partManager.setToNodeForLink(this,a,y);var b=this.toPort,z=this.toPortChanged;if(z!==null){var tt=!0;E!==null&&(tt=E.aa,E.aa=!0),z(this,x,b),E!==null&&(E.aa=tt)}a!==null&&(this.ef!==a&&Gm(a,this,b),qg(this),this.C(1)),this.g("toNode",y,a),Of(this)}}},toPortId:{get:function(){return this.vf},set:function(a){var y=this.vf;if(y!==a){var x=this.toPort;x!==null&&Os(x),$g(this),this.vf=a;var E=this.toPort;E!==null&&Os(E);var b=this.diagram;if(b!==null){var z=this.data,tt=b.model;z!==null&&tt.ri()&&tt.Cv(z,a)}x!==E&&(this.Wf=null,this.bb(),z=this.toPortChanged,z!==null&&(tt=!0,b!==null&&(tt=b.aa,b.aa=!0),z(this,x,E),b!==null&&(b.aa=tt))),qg(this),this.g("toPortId",y,a)}}},toPort:{get:function(){var a=this.uf;return a===null?null:a.ns(this.vf)}},toPortChanged:{get:function(){return this.uo},set:function(a){var y=this.uo;y!==a&&(this.uo=a,this.g("toPortChanged",y,a))}},fromSpot:{get:function(){return this.ba!==null?this.ba.Xi:Bo},set:function(a){var y=this.fromSpot;y.D(a)||(a=a.J(),this.Xc(),this.ba.Xi=a,this.g("fromSpot",y,a),(y.$c()||a.$c())&&this.fromNode!==null&&Os(this.fromPort),this.bb())}},fromEndSegmentLength:{get:function(){return this.ba!==null?this.ba.Vi:NaN},set:function(a){var y=this.fromEndSegmentLength;y!==a&&(0>a&&Mn(a,">= 0",En,"fromEndSegmentLength"),this.Xc(),this.ba.Vi=a,this.g("fromEndSegmentLength",y,a),this.bb())}},fromShortLength:{get:function(){return this.ba!==null?this.ba.Wi:NaN},set:function(a){var y=this.fromShortLength;y!==a&&(this.Xc(),this.ba.Wi=a,this.qc(),this.g("fromShortLength",y,a))}},toSpot:{get:function(){return this.ba!==null?this.ba.yj:Bo},set:function(a){var y=this.toSpot;y.D(a)||(a=a.J(),this.Xc(),this.ba.yj=a,this.g("toSpot",y,a),(y.$c()||a.$c())&&this.toNode!==null&&Os(this.toPort),this.bb())}},toEndSegmentLength:{get:function(){return this.ba!==null?this.ba.wj:NaN},set:function(a){var y=this.toEndSegmentLength;y!==a&&(0>a&&Mn(a,">= 0",En,"toEndSegmentLength"),this.Xc(),this.ba.wj=a,this.g("toEndSegmentLength",y,a),this.bb())}},toShortLength:{get:function(){return this.ba!==null?this.ba.xj:NaN},set:function(a){var y=this.toShortLength;y!==a&&(this.Xc(),this.ba.xj=a,this.qc(),this.g("toShortLength",y,a))}},isLabeledLink:{get:function(){return this.wd===null?!1:0<this.wd.count}},labelNodes:{get:function(){return this.wd===null?Vi:this.wd.iterator}},relinkableFrom:{get:function(){return(this.Qa&1)!==0},set:function(a){var y=(this.Qa&1)!==0;y!==a&&(this.Qa^=1,this.g("relinkableFrom",y,a),this.Wb())}},relinkableTo:{get:function(){return(this.Qa&2)!==0},set:function(a){var y=(this.Qa&2)!==0;y!==a&&(this.Qa^=2,this.g("relinkableTo",y,a),this.Wb())}},resegmentable:{get:function(){return(this.Qa&4)!==0},set:function(a){var y=(this.Qa&4)!==0;y!==a&&(this.Qa^=4,this.g("resegmentable",y,a),this.Wb())}},isTreeLink:{get:function(){return(this.Qa&8)!==0},set:function(a){var y=(this.Qa&8)!==0;y!==a&&(this.Qa^=8,this.g("isTreeLink",y,a),this.fromNode!==null&&Qg(this.fromNode),this.toNode!==null&&Qg(this.toNode))}},path:{get:function(){var a=this.Pb();return a instanceof lr?a:null}},routeBounds:{get:function(){this.vg();var a=this.ml,y=1/0,x=1/0,E=this.pointsCount;if(E===0)a.h(NaN,NaN,0,0);else{if(E===1)E=this.i(0),y=Math.min(E.x,y),x=Math.min(E.y,x),a.h(E.x,E.y,0,0);else if(E===2){E=this.i(0);var b=this.i(1);y=Math.min(E.x,b.x),x=Math.min(E.y,b.y),a.h(E.x,E.y,0,0),a.Ye(b)}else if(this.computeCurve()===Ys&&3<=E&&!this.isOrthogonal)if(b=this.i(0),y=b.x,x=b.y,a.h(y,x,0,0),E===3){E=this.i(1),y=Math.min(E.x,y),x=Math.min(E.y,x);var z=this.i(2);y=Math.min(z.x,y),x=Math.min(z.y,x),ue.Dl(b.x,b.y,E.x,E.y,E.x,E.y,z.x,z.y,.5,a)}else for(z=3;z<E;z+=3){var tt=this.i(z-2);z+3>=E&&(z=E-1);var rt=this.i(z-1),ot=this.i(z);ue.Dl(b.x,b.y,tt.x,tt.y,rt.x,rt.y,ot.x,ot.y,.5,a),y=Math.min(ot.x,y),x=Math.min(ot.y,x),b=ot}else for(b=this.i(0),z=this.i(1),y=Math.min(b.x,z.x),x=Math.min(b.y,z.y),a.h(b.x,b.y,0,0),a.Ye(z),b=2;b<E;b++)z=this.i(b),y=Math.min(z.x,y),x=Math.min(z.y,x),a.Ye(z);this.su.h(y-a.x,x-a.y)}return a}},midPoint:{get:function(){return this.vg(),this.computeMidPoint(new At)}},midAngle:{get:function(){return this.vg(),this.computeMidAngle()}},flattenedLengths:{get:function(){if(this.cq===null){this.fd||Zm(this);for(var a=this.cq=[],y=this.pointsCount,x=0;x<y-1;x++){var E=this.i(x),b=this.i(x+1);ue.$(E.x,b.x)?(E=b.y-E.y,0>E&&(E=-E)):ue.$(E.y,b.y)?(E=b.x-E.x,0>E&&(E=-E)):E=Math.sqrt(E.Bf(b)),a.push(E)}}return this.cq}},flattenedTotalLength:{get:function(){var a=this.vt;if(isNaN(a)){for(var y=this.flattenedLengths,x=y.length,E=a=0;E<x;E++)a+=y[E];this.vt=a}return a}},points:{get:function(){return this.Nb},set:function(a){var y=this.Nb;if(y!==a){var x=null;if(Array.isArray(a)){var E=a.length%2===0;if(E){for(var b=0;b<a.length;b++)if(typeof a[b]!="number"||isNaN(a[b])){E=!1;break}}if(E)for(x=new Xe,E=0;E<a.length/2;E++)b=new At(a[2*E],a[2*E+1]).freeze(),x.add(b);else{for(E=!0,b=0;b<a.length;b++){var z=a[b];if(!De(z)||typeof z.x!="number"||isNaN(z.x)||typeof z.y!="number"||isNaN(z.y)){E=!1;break}}if(E)for(x=new Xe,E=0;E<a.length;E++)b=a[E],x.add(new At(b.x,b.y).freeze())}}else if(a instanceof Xe)for(x=a.copy(),a=x.iterator;a.next();)a.value.freeze();else Gt("Link.points value is not an instance of List or Array: "+a);x.freeze(),this.Nb=x,this.qc(),Zm(this),a=this.diagram,a!==null&&(a.pi||a.undoManager.isUndoingRedoing||a.As.add(this),a.animationManager.zb&&sf(a.animationManager,this,x)),this.g("points",y,x)}}},pointsCount:{get:function(){return this.Nb.count}},fd:{get:function(){return(this.Qa&16)!==0},set:function(a){(this.Qa&16)!==0!==a&&(this.Qa^=16)}},suspendsRouting:{get:function(){return(this.Qa&32)!==0},set:function(a){(this.Qa&32)!==0!==a&&(this.Qa^=32)}},computingPoints:{get:function(){return(this.Qa&64)!==0},set:function(a){(this.Qa&64)!==0!==a&&(this.Qa^=64)}},defaultFromPoint:{get:function(){return this.o},set:function(a){this.o=a.copy()}},defaultToPoint:{get:function(){return this.u},set:function(a){this.u=a.copy()}},isOrthogonal:{get:function(){return(this.qj.value&2)===2}},isAvoiding:{get:function(){return(this.qj.value&4)===4}},lk:{get:function(){return(this.Qa&128)!==0},set:function(a){(this.Qa&128)!==0!==a&&(this.Qa^=128)}},geometry:{get:function(){if(!this.lk){if(this.vg(),2>this.pointsCount)return this.lk=!0,this.ua;this.ua=this.makeGeometry()}return this.ua}},firstPickIndex:{get:function(){return 2>=this.pointsCount?0:this.isOrthogonal||!If(this.computeSpot(!0))?1:0}},lastPickIndex:{get:function(){var a=this.pointsCount;return a===0?0:2>=a?a-1:this.isOrthogonal||!If(this.computeSpot(!1))?a-2:a-1}},adjusting:{get:function(){return this.qk},set:function(a){var y=this.qk;y!==a&&(this.qk=a,this.g("adjusting",y,a))}},corner:{get:function(){return this.Om},set:function(a){var y=this.Om;y!==a&&(this.Om=a,this.qc(),this.g("corner",y,a))}},curve:{get:function(){return this.Qm},set:function(a){var y=this.Qm;y!==a&&(this.Qm=a,this.bb(),this.qc(),Ym(this,y===Lh||y===Rf||a===Lh||a===Rf),this.g("curve",y,a))}},curviness:{get:function(){return this.Rm},set:function(a){var y=this.Rm;y!==a&&(this.Rm=a,this.bb(),this.qc(),this.g("curviness",y,a))}},routing:{get:function(){return this.qj},set:function(a){var y=this.qj;y!==a&&(this.qj=a,this.Wf=null,this.bb(),Ym(this,(y.value&2)===2||(a.value&2)===2),this.g("routing",y,a))}},smoothness:{get:function(){return this.po},set:function(a){var y=this.po;y!==a&&(this.po=a,this.qc(),this.g("smoothness",y,a))}},key:{get:function(){var a=this.diagram;if(a!==null&&a.model.ri())return a.model.Ac(this.data)}}}),En.prototype.invalidateOtherJumpOvers=En.prototype.Xo,En.prototype.findClosestSegment=En.prototype.ez,En.prototype.updateRoute=En.prototype.vg,En.prototype.invalidateRoute=En.prototype.bb,En.prototype.rollbackRoute=En.prototype.rv,En.prototype.commitRoute=En.prototype.zf,En.prototype.startRoute=En.prototype.uh,En.prototype.clearPoints=En.prototype.Fj,En.prototype.removePoint=En.prototype.pv,En.prototype.addPointAt=En.prototype.yf,En.prototype.addPoint=En.prototype.ne,En.prototype.insertPointAt=En.prototype.m,En.prototype.insertPoint=En.prototype.Kz,En.prototype.setPointAt=En.prototype.L,En.prototype.setPoint=En.prototype.dd,En.prototype.getPoint=En.prototype.i,En.prototype.getOtherPort=En.prototype.Cz,En.prototype.getOtherNode=En.prototype.To;var Oc=null,Ic=null,_v=new Ue(En,"Normal",1),bx=new Ue(En,"Orthogonal",2),Mx=new Ue(En,"AvoidsNodes",6),eS=new Ue(En,"AvoidsNodesStraight",7),os=new Ue(En,"None",0),Ys=new Ue(En,"Bezier",9),Lh=new Ue(En,"JumpGap",10),Rf=new Ue(En,"JumpOver",11),tp=new Ue(En,"End",17),Xm=new Ue(En,"Scale",18),Jm=new Ue(En,"Stretch",19),ep=new Ue(En,"OrientAlong",21),np=new Ue(En,"OrientPlus90",22),ip=new Ue(En,"OrientMinus90",23),Qv=new Ue(En,"OrientOpposite",24),_m=new Ue(En,"OrientUpright",25),rp=new Ue(En,"OrientPlus90Upright",26),op=new Ue(En,"OrientMinus90Upright",27),Qm=new Ue(En,"OrientUpright45",28),nS=16,iS=14,ap=8;En.className="Link",En.Normal=_v,En.Orthogonal=bx,En.AvoidsNodes=Mx,En.AvoidsNodesStraight=eS,En.None=os,En.Bezier=Ys,En.JumpGap=Lh,En.JumpOver=Rf,En.End=tp,En.Scale=Xm,En.Stretch=Jm,En.OrientAlong=ep,En.OrientPlus90=np,En.OrientMinus90=ip,En.OrientOpposite=Qv,En.OrientUpright=_m,En.OrientPlus90Upright=rp,En.OrientMinus90Upright=op,En.OrientUpright45=Qm,En.EndSegmentStep=8,En.CurvinessStart=nS,En.SpacingMin=iS,En.OrthoShortCut=ap;function qm(a,y,x,E){xi(this),this.Fe=this.qq=!1,this.Ds=a,this.Ox=y,this.cv=x,this.Px=E,this.links=[]}qm.prototype.Sl=function(){if(!this.qq){var a=this.links;0<a.length&&(a=a[0].diagram,a!==null&&(a.ow.add(this),this.Fe=a.undoManager.isUndoingRedoing))}this.qq=!0},qm.prototype.Nv=function(){if(this.qq){this.qq=!1;var a=this.links;if(0<a.length){var y=a[0],x=y.diagram;x=x===null||x.pi&&!this.Fe,this.Fe=!1,y.arrangeBundledLinks(a,x),a.length===1&&(y.Sf=null,a.length=0)}a.length===0&&(a=this.Ds,this!==null&&a.af!==null&&a.af.remove(this),a=this.cv,this!==null&&a.af!==null&&a.af.remove(this))}},qm.className="LinkBundle";function sp(a){xi(this),this.Yx=this.group=null,this.vs=!0,this.abort=!1,this.Od=this.Nd=1,this.Fn=this.En=-1,this.rc=a.width,this.sc=a.height,this.ac=null,this.ei=this.di=0,this.Os=11,this.Ix=this.Hx=22}sp.prototype.initialize=function(a){if(!(0>=a.width||0>=a.height)){var y=a.y,x=a.x+a.width,E=a.y+a.height;if(this.Nd=Math.floor((a.x-this.rc)/this.rc)*this.rc,this.Od=Math.floor((y-this.sc)/this.sc)*this.sc,this.En=Math.ceil((x+2*this.rc)/this.rc)*this.rc,this.Fn=Math.ceil((E+2*this.sc)/this.sc)*this.sc,a=1+(Math.ceil((this.En-this.Nd)/this.rc)|0),y=1+(Math.ceil((this.Fn-this.Od)/this.sc)|0),this.ac===null||this.di<a-1||this.ei<y-1){for(x=[],E=0;E<=a;E++)x[E]=new Uint32Array(y);this.ac=x,this.di=a-1,this.ei=y-1}if(a=qv,this.ac!==null)for(y=0;y<=this.di;y++)if(x=this.ac[y],x.fill)x.fill(a);else for(E=0;E<=this.ei;E++)x[E]=a}};function jf(a,y,x){return a.Nd<=y&&y<=a.En&&a.Od<=x&&x<=a.Fn}function Du(a,y,x){return jf(a,y,x)?(y-=a.Nd,y/=a.rc,x-=a.Od,x/=a.sc,a.ac[y|0][x|0]):qv}function rS(a){if(a.ac!==null)for(var y=0;y<=a.di;y++)for(var x=a.ac[y],E=0;E<=a.ei;E++)x[E]>=qd&&(x[E]=qv)}sp.prototype.Yj=function(a,y,x,E){if(a>this.En||a+x<this.Nd||y>this.Fn||y+E<this.Od)return!0;a=(a-this.Nd)/this.rc|0,y=(y-this.Od)/this.sc|0,x=Math.max(0,x)/this.rc+1|0;var b=Math.max(0,E)/this.sc+1|0;if(0>a&&(x+=a,a=0),0>y&&(b+=y,y=0),0>x||0>b)return!0;for(E=Math.min(a+x-1,this.di)|0,x=Math.min(y+b-1,this.ei)|0;a<=E;a++){b=this.ac[a];for(var z=y;z<=x;z++)if(b[z]===bh)return!1}return!0};function Bu(a,y,x,E,b,z,tt,rt,ot){if(!(y<z||y>tt||x<rt||x>ot)){var st=y|0,ut=x|0,ft=a.ac[st][ut];if(ft>=qd&&ft<zf)for(b?ut+=E:st+=E,ft+=1;z<=st&&st<=tt&&rt<=ut&&ut<=ot&&!(ft>=a.ac[st][ut]);)a.ac[st][ut]=ft,ft+=1,b?ut+=E:st+=E;if(st=b?ut:st,b)if(0<E)for(x+=E;x<st;x+=E)Bu(a,y,x,1,!b,z,tt,rt,ot),Bu(a,y,x,-1,!b,z,tt,rt,ot);else for(x+=E;x>st;x+=E)Bu(a,y,x,1,!b,z,tt,rt,ot),Bu(a,y,x,-1,!b,z,tt,rt,ot);else if(0<E)for(y+=E;y<st;y+=E)Bu(a,y,x,1,!b,z,tt,rt,ot),Bu(a,y,x,-1,!b,z,tt,rt,ot);else for(y+=E;y>st;y+=E)Bu(a,y,x,1,!b,z,tt,rt,ot),Bu(a,y,x,-1,!b,z,tt,rt,ot)}}function $m(a,y,x,E,b,z,tt,rt,ot){y|=0,x|=0;var st=bh,ut=qd;for(a.ac[y][x]=ut;st===bh&&y>z&&y<tt&&x>rt&&x<ot;)ut+=1,a.ac[y][x]=ut,b?x+=E:y+=E,st=a.ac[y][x]}function t0(a,y,x,E,b,z,tt,rt,ot){y|=0,x|=0;var st=bh,ut=zf;for(a.ac[y][x]=ut;st===bh&&y>z&&y<tt&&x>rt&&x<ot;)a.ac[y][x]=ut,b?x+=E:y+=E,st=a.ac[y][x]}function oS(a,y,x,E,b,z,tt){if(a.ac!==null){a.abort=!1;var rt=y.x,ot=y.y;if(jf(a,rt,ot)){rt-=a.Nd,rt/=a.rc,ot-=a.Od,ot/=a.sc;var st=E.x,ut=E.y;if(jf(a,st,ut))if(st-=a.Nd,st/=a.rc,ut-=a.Od,ut/=a.sc,1>=Math.abs(rt-st)&&1>=Math.abs(ot-ut))a.abort=!0;else{var ft=z.x;E=z.y,y=z.x+z.width;var mt=z.y+z.height;ft-=a.Nd,ft/=a.rc,E-=a.Od,E/=a.sc,y-=a.Nd,y/=a.rc,mt-=a.Od,mt/=a.sc,z=Math.max(0,Math.min(a.di,ft|0)),y=Math.min(a.di,Math.max(0,y|0)),ft=Math.max(0,Math.min(a.ei,E|0)),mt=Math.min(a.ei,Math.max(0,mt|0)),E=a.ac,rt|=0,ot|=0,st|=0,ut|=0;var yt=x===0||x===90?1:-1;if(x=x===90||x===270,E[rt][ot]===bh?($m(a,rt,ot,yt,x,z,y,ft,mt),$m(a,rt,ot,1,!x,z,y,ft,mt),$m(a,rt,ot,-1,!x,z,y,ft,mt)):$m(a,rt,ot,yt,x,rt,ot,rt,ot),E[st][ut]===bh?(t0(a,st,ut,b===0||b===90?1:-1,b===90||b===270,z,y,ft,mt),t0(a,st,ut,1,!(b===90||b===270),z,y,ft,mt),t0(a,st,ut,-1,!(b===90||b===270),z,y,ft,mt)):t0(a,st,ut,yt,x,st,ut,st,ut),x=On(),tt&&aS(a,st,ut,b,rt,ot,x))for((x[0]!==st||x[1]!==ut)&&(x.unshift(ut),x.unshift(st)),(x[x.length-2]!==rt||x[x.length-1]!==ot)&&(x.push(rt),x.push(ot)),a=qd,b=x[x.length-2],tt=x[x.length-1],E[b][tt]=a++,z=x.length-4;0<=z;z-=2)for(b=x[z+2],tt=x[z+3],y=x[z],st=x[z+1];y>b?b++:y<b?b--:st>tt?tt++:st<tt&&tt--,E[b][tt]=a++,b!==y||tt!==st;);else Bu(a,rt,ot,1,!1,z,y,ft,mt),Bu(a,rt,ot,-1,!1,z,y,ft,mt),Bu(a,rt,ot,1,!0,z,y,ft,mt),Bu(a,rt,ot,-1,!0,z,y,ft,mt);Qn(x)}}}}function aS(a,y,x,E,b,z,tt){for(var rt=a.ac,ot=y,st=x;;){if(ot===b&&st===z)return!0;var ut=ot,ft=st;if(E===0)if(ut<b)ut++;else break;else if(E===90)if(ft<z)ft++;else break;else if(E===180)if(ut>b)ut--;else break;else if(ft>z)ft--;else break;var mt=rt[ut][ft];if(mt===0||mt===$v)break;ot=ut,st=ft}for(;;){if(ut=E,ft=ot,mt=st,E===0?mt<z?(ut=90,mt++):mt>z&&(ut=270,mt--):E===90?ft<b?(ut=0,ft++):ft>b&&(ut=180,ft--):E===180?mt<z?(ut=90,mt++):mt>z&&(ut=270,mt--):ft<b?(ut=0,ft++):ft>b&&(ut=180,ft--),ft=rt[ft][mt],ut!==E&&ft!==0&&ft!==$v){if(tt.push(ot),tt.push(st),aS(a,ot,st,ut,b,z,tt))return!0;tt.pop(),tt.pop()}if(rt[ot][st]=$v,E===0){if(ot===y)return!1;ot--}else if(E===90){if(st===x)return!1;st--}else if(E===180){if(ot===y)return!1;ot++}else{if(st===x)return!1;st++}}}ge.Object.defineProperties(sp.prototype,{bounds:{get:function(){return new Ee(this.Nd,this.Od,this.En-this.Nd,this.Fn-this.Od)}},Ho:{get:function(){return this.rc},set:function(a){0<a&&a!==this.rc&&(this.rc=a,this.initialize(this.bounds))}},Go:{get:function(){return this.sc},set:function(a){0<a&&a!==this.sc&&(this.sc=a,this.initialize(this.bounds))}}});var bh=0,qd=1,zf=999999,qv=zf+1,$v=zf+2;sp.className="PositionArray";function Rc(){xi(this),this.port=this.node=null,this.pe=[],this.ap=!1}Rc.prototype.toString=function(){for(var a=this.pe,y=this.node.toString()+" "+a.length.toString()+":",x=0;x<a.length;x++){var E=a[x];E!==null&&(y+=`
|
|
`+E.toString())}return y};function Fx(a,y,x,E){switch(y=y.offsetY,y){case 8:return 90;case 2:return 180;case 1:return 270;case 4:return 0}switch(y){case 9:return 180<x?270:90;case 6:return 90<x&&270>=x?180:0}switch(a=180*Math.atan2(a.height,a.width)/Math.PI,y){case 3:return x>a&&x<=180+a?180:270;case 5:return x>180-a&&x<=360-a?270:0;case 12:return x>a&&x<=180+a?90:0;case 10:return x>180-a&&x<=360-a?180:90;case 7:return 90<x&&x<=180+a?180:x>180+a&&x<=360-a?270:0;case 13:return 180<x&&x<=360-a?270:x>a&&180>=x?90:0;case 14:return x>a&&x<=180-a?90:x>180-a&&270>=x?180:0;case 11:return x>180-a&&x<=180+a?180:x>180+a?270:90}return E&&y!==15&&(x-=15,0>x&&(x+=360)),x>a&&x<180-a?90:x>=180-a&&x<=180+a?180:x>180+a&&x<360-a?270:0}Rc.prototype.Sl=function(){this.pe.length=0};function sS(a,y){var x=a.pe;if(x.length===0){t:if(!a.ap){x=a.ap,a.ap=!0;var E=null,b=a.node,z=b instanceof $i?b:null;if(z===null||z.isSubGraphExpanded)var tt=b.isTreeExpanded?b.findLinksConnected(a.port.portId):b.qx();else{if(!z.actualBounds.w()){a.ap=x;break t}E=z,tt=E.Lu()}z=a.pe.length=0;var rt=a.port.ga(Sr,At.alloc()),ot=a.port.ga(Hr,At.alloc());for(b=Ee.allocAt(rt.x,rt.y,0,0),b.Ye(ot),At.free(rt),At.free(ot),rt=At.allocAt(b.x+b.width/2,b.y+b.height/2),ot=a.port.li(),tt=tt.iterator;tt.next();){var st=tt.value;if(st.isVisible()&&st.fromPort!==st.toPort){var ut=st.fromPort===a.port||st.fromNode!==null&&st.fromNode.Td(E),ft=st.computeSpot(ut,a.port);if(ft.$c()&&(ut=ut?st.toPort:st.fromPort,ut!==null)){var mt=ut.part;if(mt!==null){var yt=mt.findVisibleNode();yt!==null&&yt!==mt&&(mt=yt,ut=mt.port),ut=st.computeOtherPoint(mt,ut),mt=rt.ab(ut),mt-=ot,0>mt?mt+=360:360<=mt&&(mt-=360),ft=Fx(b,ft,mt,st.isOrthogonal),ft===0?(ft=4,180<mt&&(mt-=360)):ft===90?(ft=8,270<mt&&(mt-=360)):ft===180?ft=2:(ft=1,90>mt&&(mt+=360)),yt=a.pe[z],yt===void 0?(yt=new ty(st,mt,ft),a.pe[z]=yt):(yt.link=st,yt.angle=mt,yt.Nc=ft),yt.hv.set(ut),z++}}}}for(At.free(rt),a.pe.sort(Rc.prototype.j),ot=a.pe.length,E=-1,z=rt=0;z<ot;z++)tt=a.pe[z],tt!==void 0&&(tt.Nc!==E&&(E=tt.Nc,rt=0),tt.Uo=rt,rt++);for(E=-1,rt=0,z=ot-1;0<=z;z--)ot=a.pe[z],ot!==void 0&&(ot.Nc!==E&&(E=ot.Nc,rt=ot.Uo+1),ot.Gl=rt);if(z=a.pe,ft=a.port,E=a.node.portSpreading,rt=At.alloc(),ot=At.alloc(),tt=At.alloc(),st=At.alloc(),ft.ga(Sr,rt),ft.ga(Gr,ot),ft.ga(Hr,tt),ft.ga(Ro,st),yt=mt=ut=ft=0,E===Zv)for(var wt=0;wt<z.length;wt++){var bt=z[wt];if(bt!==null){var Zt=bt.link.computeThickness();switch(bt.Nc){case 8:mt+=Zt;break;case 2:yt+=Zt;break;case 1:ft+=Zt;break;default:case 4:ut+=Zt}}}var It=wt=0,Yt=1,Jt=bt=0;for(Zt=0;Zt<z.length;Zt++){var qt=z[Zt];if(qt!==null){if(wt!==qt.Nc){switch(wt=qt.Nc,wt){case 8:var ae=tt;It=st;break;case 2:ae=st,It=rt;break;case 1:ae=rt,It=ot;break;default:case 4:ae=ot,It=tt}switch(bt=It.x-ae.x,Jt=It.y-ae.y,wt){case 8:mt>Math.abs(bt)?(Yt=Math.abs(bt)/mt,mt=Math.abs(bt)):Yt=1;break;case 2:yt>Math.abs(Jt)?(Yt=Math.abs(Jt)/yt,yt=Math.abs(Jt)):Yt=1;break;case 1:ft>Math.abs(bt)?(Yt=Math.abs(bt)/ft,ft=Math.abs(bt)):Yt=1;break;default:case 4:ut>Math.abs(Jt)?(Yt=Math.abs(Jt)/ut,ut=Math.abs(Jt)):Yt=1}It=0}var Ce=qt.Zo;if(E===Zv){switch(qt=qt.link.computeThickness(),qt*=Yt,Ce.set(ae),wt){case 8:Ce.x=ae.x+bt/2+mt/2-It-qt/2;break;case 2:Ce.y=ae.y+Jt/2+yt/2-It-qt/2;break;case 1:Ce.x=ae.x+bt/2-ft/2+It+qt/2;break;default:case 4:Ce.y=ae.y+Jt/2-ut/2+It+qt/2}It+=qt}else{var In=.5;E===Km&&(In=(qt.Uo+1)/(qt.Gl+1)),Ce.x=ae.x+bt*In,Ce.y=ae.y+Jt*In}}}for(At.free(rt),At.free(ot),At.free(tt),At.free(st),ae=a.pe,z=0;z<ae.length;z++)E=ae[z],E!==null&&(E.Ju=a.computeEndSegmentLength(E));a.ap=x,Ee.free(b)}x=a.pe}for(a=0;a<x.length;a++)if(b=x[a],b!==null&&b.link===y)return b;return null}Rc.prototype.j=function(a,y){return a===y?0:a===null?-1:y===null?1:a.Nc<y.Nc?-1:a.Nc>y.Nc?1:a.angle<y.angle?-1:a.angle>y.angle?1:0},Rc.prototype.computeEndSegmentLength=function(a){var y=a.link,x=y.computeEndSegmentLength(this.node,this.port,qi,y.fromPort===this.port),E=a.Uo;if(0>E)return x;var b=a.Gl;if(1>=b||!y.isOrthogonal)return x;y=a.hv;var z=a.Zo;return(a.Nc===2||a.Nc===8)&&(E=b-1-E),((a=a.Nc===2||a.Nc===4)?y.y<z.y:y.x<z.x)?x+8*E:(a?y.y===z.y:y.x===z.x)?x:x+8*(b-1-E)},Rc.className="Knot";function ty(a,y,x){this.link=a,this.angle=y,this.Nc=x,this.hv=new At,this.Gl=this.Uo=0,this.Zo=new At,this.Ju=0}ty.prototype.toString=function(){return this.link.toString()+" "+this.angle.toString()+" "+this.Nc.toString()+":"+this.Uo.toString()+"/"+this.Gl.toString()+" "+this.Zo.toString()+" "+this.Ju.toString()+" "+this.hv.toString()},ty.className="LinkInfo";function mo(a){xi(this),this.o=this.H=null,this.Gh=this.sn=!0,this.yn=!1,this.Am=new At(0,0).freeze(),this.vn=!0,this.Em=this.un=null,this.xn=!1,this.j=null,a&&Object.assign(this,a)}mo.prototype.cloneProtected=function(a){a.sn=this.sn,a.Gh=this.Gh,a.yn=this.yn,a.Am.assign(this.Am),a.vn=this.vn,a.un=this.un,a.Em=this.Em,a.xn=!0},mo.prototype.copy=function(){var a=new this.constructor;return this.cloneProtected(a),a},mo.prototype.qb=function(){},mo.prototype.toString=function(){var a=Yn(this.constructor);return a+="(",this.group!==null&&(a+=" in "+this.group),this.diagram!==null&&(a+=" for "+this.diagram),a+")"},mo.prototype.C=function(){if(this.isValidLayout){var a=this.diagram;if(a!==null&&!a.undoManager.isUndoingRedoing){var y=a.animationManager;!y.isTicking&&(y.defaultAnimation.isAnimating&&y.Cc(),this.isOngoing&&a.pi||this.isInitial&&!a.pi)&&(this.isValidLayout=!1,a.$b())}}},mo.prototype.createNetwork=function(){return new ro(this)},mo.prototype.makeNetwork=function(a){var y=this.createNetwork();return a instanceof Le?(y.lg(a.nodes,!0),y.lg(a.links,!0)):a instanceof $i?y.lg(a.memberParts):y.lg(a.iterator),y},mo.prototype.updateParts=function(){this.isValidLayout=!0;var a=this.diagram;if(a===null&&this.network!==null)for(var y=this.network.vertexes.iterator;y.next();){var x=y.value.node;if(x!==null&&(a=x.diagram,a!==null))break}try{a!==null&&a.Ea("Layout"),this.commitLayout()}finally{a!==null&&a.eb("Layout")}},mo.prototype.commitLayout=function(){if(this.network!==null){for(var a=this.network.vertexes.iterator;a.next();)a.value.commit();if(this.isRouting)for(a=this.network.edges.iterator;a.next();)a.value.commit()}},mo.prototype.doLayout=function(a){var y=new qe;a instanceof Le?(sd(this,y,a.nodes,!0,this.rh,!0,!1,!0),sd(this,y,a.parts,!0,this.rh,!0,!1,!0)):a instanceof $i?sd(this,y,a.memberParts,!1,this.rh,!0,!1,!0):y.addAll(a.iterator),0<y.count&&(a=this.diagram,a!==null&&a.Ea("Layout"),this.doMinimalNoNetworkLayout(y),a!==null&&a.eb("Layout")),this.isValidLayout=!0},mo.prototype.doMinimalNoNetworkLayout=function(a){var y=Math.ceil(Math.sqrt(a.count));this.arrangementOrigin=this.initialOrigin(this.arrangementOrigin);var x=this.arrangementOrigin.x,E=x,b=this.arrangementOrigin.y,z=0,tt=0;for(a=a.iterator;a.next();){var rt=a.value;lp(rt);var ot=rt.measuredBounds,st=ot.width;ot=ot.height,rt.moveTo(E,b),rt instanceof $i&&(rt.rh=!1),E+=Math.max(st,50)+20,tt=Math.max(tt,Math.max(ot,50)),z>=y-1?(z=0,E=x,b+=tt+20,tt=0):z++}},mo.prototype.doMinimalNetworkLayout=function(){var a=Math.ceil(Math.sqrt(this.network.vertexes.count));this.arrangementOrigin=this.initialOrigin(this.arrangementOrigin);for(var y=this.arrangementOrigin.x,x=y,E=this.arrangementOrigin.y,b=0,z=0,tt=this.network.vertexes.iterator;tt.next();){var rt=tt.value.node;if(!(rt===null||rt instanceof En)&&(lp(rt),this.rh(rt))){var ot=rt.measuredBounds,st=ot.width;ot=ot.height,rt.moveTo(x,E),rt instanceof $i&&(rt.rh=!1),x+=Math.max(st,50)+20,z=Math.max(z,Math.max(ot,50)),b>=a-1?(b=0,x=y,E+=z+20,z=0):b++}}},mo.prototype.rh=function(a){return!!(!a.location.w()||a instanceof $i&&a.rh)};function sd(a,y,x,E,b,z,tt,rt){for(x=x.iterator;x.next();){var ot=x.value;E&&!ot.isTopLevel||b!==null&&!b(ot)||!ot.canLayout()||(z&&ot instanceof Un?ot.isLinkLabel||(ot instanceof $i&&ot.layout===null?sd(a,y,ot.memberParts,!1,b,z,tt,rt):(lp(ot),y.add(ot))):tt&&ot instanceof En?y.add(ot):!rt||!ot.Zc()||ot instanceof Un||(lp(ot),y.add(ot)))}}function lp(a){var y=a.actualBounds;(y.width===0||y.height===0||isNaN(y.width)||isNaN(y.height))&&a.Va()}mo.prototype.ni=function(a,y){var x=this.boundsComputation;return x!==null?(y||(y=new Ee),x(a,this,y)):y?(y.set(a.actualBounds),y):a.actualBounds},mo.prototype.ex=function(a){var y=new qe;return a instanceof Le?(sd(this,y,a.nodes,!0,null,!0,!0,!0),sd(this,y,a.links,!0,null,!0,!0,!0),sd(this,y,a.parts,!0,null,!0,!0,!0)):a instanceof $i?sd(this,y,a.memberParts,!1,null,!0,!0,!0):sd(this,y,a.iterator,!1,null,!0,!0,!0),y},mo.prototype.initialOrigin=function(a){var y=this.group;if(y!==null){var x=y.position.copy();return(isNaN(x.x)||isNaN(x.y))&&x.set(a),y=y.placeholder,y!==null&&(x=y.ga(Sr),(isNaN(x.x)||isNaN(x.y))&&x.set(a),a=y.padding,x.x+=a.left,x.y+=a.top),x}return a},ge.Object.defineProperties(mo.prototype,{diagram:{get:function(){return this.H},set:function(a){this.H=a}},group:{get:function(){return this.o},set:function(a){this.o!==a&&(this.o=a,a!==null&&(this.H=a.diagram))}},isOngoing:{get:function(){return this.sn},set:function(a){this.sn!==a&&(this.sn=a)}},isInitial:{get:function(){return this.Gh},set:function(a){this.Gh=a,a||(this.xn=!0)}},isViewportSized:{get:function(){return this.yn},set:function(a){this.yn!==a&&(this.yn=a)&&this.C()}},isRouting:{get:function(){return this.vn},set:function(a){this.vn!==a&&(this.vn=a)}},isRealtime:{get:function(){return this.un},set:function(a){this.un!==a&&(this.un=a)}},isValidLayout:{get:function(){return this.xn},set:function(a){this.xn!==a&&(this.xn=a,a||(a=this.diagram,a!==null&&(a.xh=!0)))}},network:{get:function(){return this.j},set:function(a){this.j!==a&&(this.j=a,a!==null&&(a.layout=this))}},boundsComputation:{get:function(){return this.Em},set:function(a){this.Em!==a&&(this.Em=a,this.C())}},arrangementOrigin:{get:function(){return this.Am},set:function(a){this.Am.D(a)||(this.Am.assign(a),this.C())}}}),mo.prototype.collectParts=mo.prototype.ex,mo.prototype.getLayoutBounds=mo.prototype.ni,mo.prototype.invalidateLayout=mo.prototype.C,mo.className="Layout";function ro(a){xi(this),this.Sc=a,this.wf=new qe,this.ye=new qe,this.Es=new Me,this.zs=new Me}ro.prototype.clear=function(){if(this.wf)for(var a=this.wf.iterator;a.next();)a.value.clear();if(this.ye)for(a=this.ye.iterator;a.next();)a.value.clear();this.wf=new qe,this.ye=new qe,this.Es=new Me,this.zs=new Me},ro.prototype.toString=function(a){a===void 0&&(a=0);var y="LayoutNetwork"+(this.layout!==null?"("+this.layout.toString()+")":"");if(0>=a)return y;if(y+=" vertexes: "+this.wf.count+" edges: "+this.ye.count,1<a){for(var x=this.wf.iterator;x.next();)y+=`
|
|
`+x.value.toString(a-1);for(x=this.ye.iterator;x.next();)y+=`
|
|
`+x.value.toString(a-1)}return y},ro.prototype.createVertex=function(){return new qo(this)},ro.prototype.createEdge=function(){return new Is(this)},ro.prototype.lg=function(a,y,x){if(a!==null){for(y===void 0&&(y=!1),x===void 0&&(x=null),x===null&&(x=function(tt){if(tt instanceof Un)return!tt.isLinkLabel;if(tt instanceof En){var rt=tt.fromNode;return rt===null||rt.isLinkLabel?!1:(tt=tt.toNode,!(tt===null||tt.isLinkLabel))}return!1}),a=a.iterator;a.next();){var E=a.value;if(E instanceof Un&&(!y||E.isTopLevel)&&E.canLayout()&&x(E)){if(E instanceof $i&&E.layout===null)this.lg(E.memberParts,!1);else if(this.ki(E)===null){var b=this.createVertex();b.node=E,this.dh(b)}}}for(a.reset();a.next();)if(E=a.value,E instanceof En&&(!y||E.isTopLevel)&&E.canLayout()&&x(E)&&this.Lo(E)===null){var z=E.fromNode;b=E.toNode,z!==null&&b!==null&&z!==b&&(z=this.findGroupVertex(z),b=this.findGroupVertex(b),z!==null&&b!==null&&this.Zj(z,b,E))}}},ro.prototype.findGroupVertex=function(a){if(a===null)return null;var y=a.findVisibleNode();if(y===null)return null;if(a=this.ki(y),a!==null)return a;for(y=y.containingGroup;y!==null;){if(a=this.ki(y),a!==null)return a;y=y.containingGroup}return null},Pt=ro.prototype,Pt.dh=function(a){if(a!==null){this.wf.add(a);var y=a.node;y!==null&&this.Es.add(y,a),a.network=this}},Pt.Bl=function(a){if(a===null)return null;var y=this.ki(a);return y===null&&(y=this.createVertex(),y.node=a,this.dh(y)),y},Pt.Iu=function(a){if(a!==null&&lS(this,a)){for(var y=a.tg,x=y.count-1;0<=x;x--){var E=y.M(x);this.Mj(E)}for(y=a.mg,a=y.count-1;0<=a;a--)x=y.M(a),this.Mj(x)}};function lS(a,y){if(y===null)return!1;var x=a.wf.remove(y);return x&&(y=y.node,y!==null&&a.Es.remove(y)),x}Pt.Zy=function(a){a!==null&&(a=this.ki(a),a!==null&&this.Iu(a))},Pt.ki=function(a){return a===null?null:this.Es.I(a)},Pt.Bo=function(a){if(a!==null){ey(this,a);var y=a.toVertex;y!==null&&y.Cl(a),y=a.fromVertex,y!==null&&y.zl(a)}};function ey(a,y){if(y!==null){a.ye.add(y);var x=y.link;x!==null&&a.Lo(x)===null&&a.zs.add(x,y),y.network=a}}Pt.Dy=function(a){if(a===null)return null;var y=a.fromNode,x=a.toNode,E=this.Lo(a);return E===null?(E=this.createEdge(),E.link=a,y!==null&&(E.fromVertex=this.Bl(y)),x!==null&&(E.toVertex=this.Bl(x)),this.Bo(E)):(y!==null?E.fromVertex=this.Bl(y):E.fromVertex=null,x!==null?E.toVertex=this.Bl(x):E.toVertex=null),E},Pt.Mj=function(a){if(a!==null){var y=a.toVertex;y!==null&&y.Kl(a),y=a.fromVertex,y!==null&&y.Jl(a),ny(this,a)}};function ny(a,y){y!==null&&a.ye.remove(y)&&(y=y.link,y!==null&&a.zs.remove(y))}Pt.Yy=function(a){a!==null&&(a=this.Lo(a),a!==null&&this.Mj(a))},Pt.Lo=function(a){return a===null?null:this.zs.I(a)},Pt.Zj=function(a,y,x){if(a===null||y===null)return null;if(a.network===this&&y.network===this){var E=this.createEdge();return E.link=x,E.fromVertex=a,E.toVertex=y,this.Bo(E),E}return null},Pt.gm=function(a){if(a!==null){var y=a.fromVertex,x=a.toVertex;y!==null&&x!==null&&(y.Jl(a),x.Kl(a),a.gm(),y.Cl(a),x.zl(a))}},Pt.Ko=function(){for(var a=On(),y=this.ye.iterator;y.next();){var x=y.value;x.fromVertex===x.toVertex&&a.push(x)}for(y=a.length,x=0;x<y;x++)this.Mj(a[x]);Qn(a)},ro.prototype.deleteArtificialVertexes=function(){for(var a=On(),y=this.wf.iterator;y.next();){var x=y.value;x.node===null&&x.data===null&&a.push(x)}for(x=a.length,y=0;y<x;y++)this.Iu(a[y]);for(y=On(),x=this.ye.iterator;x.next();){var E=x.value;E.link===null&&E.data===null&&y.push(E)}for(x=y.length,E=0;E<x;E++)this.Mj(y[E]);Qn(a),Qn(y)};function Ax(a){for(var y=On(),x=a.ye.iterator;x.next();){var E=x.value;E.fromVertex!==null&&E.toVertex!==null||y.push(E)}for(x=y.length,E=0;E<x;E++)a.Mj(y[E]);Qn(y)}ro.prototype.Zx=function(a){a===void 0&&(a=!0),a&&(this.deleteArtificialVertexes(),Ax(this),this.Ko()),a=new Xe;for(var y=!0;y;){y=!1;for(var x=this.wf.iterator;x.next();){var E=x.value;if(0<E.tg.count||0<E.mg.count){y=this.layout.createNetwork(),a.add(y),iy(this,y,E),y=!0;break}}}return a.sort(function(b,z){return b===null||z===null||b===z?0:z.vertexes.count-b.vertexes.count}),a};function iy(a,y,x){if(x!==null&&x.network!==y){lS(a,x),y.dh(x);for(var E=x.sourceEdges;E.next();){var b=E.value;b.network!==y&&(ny(a,b),ey(y,b),iy(a,y,b.fromVertex))}for(E=x.destinationEdges;E.next();)x=E.value,x.network!==y&&(ny(a,x),ey(y,x),iy(a,y,x.toVertex))}}ro.prototype.dz=function(){for(var a=new qe,y=this.wf.iterator;y.next();)a.add(y.value.node);for(y=this.ye.iterator;y.next();)a.add(y.value.link);return a},ge.Object.defineProperties(ro.prototype,{layout:{get:function(){return this.Sc},set:function(a){a!==null&&(this.Sc=a)}},vertexes:{get:function(){return this.wf}},edges:{get:function(){return this.ye}}}),ro.prototype.findAllParts=ro.prototype.dz,ro.prototype.splitIntoSubNetworks=ro.prototype.Zx,ro.prototype.deleteSelfEdges=ro.prototype.Ko,ro.prototype.reverseEdge=ro.prototype.gm,ro.prototype.linkVertexes=ro.prototype.Zj,ro.prototype.findEdge=ro.prototype.Lo,ro.prototype.deleteLink=ro.prototype.Yy,ro.prototype.deleteEdge=ro.prototype.Mj,ro.prototype.addLink=ro.prototype.Dy,ro.prototype.addEdge=ro.prototype.Bo,ro.prototype.findVertex=ro.prototype.ki,ro.prototype.deleteNode=ro.prototype.Zy,ro.prototype.deleteVertex=ro.prototype.Iu,ro.prototype.addNode=ro.prototype.Bl,ro.prototype.addVertex=ro.prototype.dh,ro.prototype.addParts=ro.prototype.lg,ro.className="LayoutNetwork";function qo(a){xi(this),this.ob=a,this.j=new Ee(0,0,10,10).freeze(),this.o=new At(5,5).freeze(),this.Sh=this.ub=null,this.tg=new Xe,this.mg=new Xe}qo.prototype.clear=function(){this.Sh=this.ub=null,this.tg=new Xe,this.mg=new Xe},qo.prototype.toString=function(a){a===void 0&&(a=0);var y="LayoutVertex#"+fr(this);if(0<a&&(y+=this.node!==null?"("+this.node.toString()+")":"",1<a)){a="";for(var x=!0,E=this.tg.iterator;E.next();){var b=E.value;x?x=!1:a+=",",a+=b.toString(0)}for(b="",x=!0,E=this.mg.iterator;E.next();){var z=E.value;x?x=!1:b+=",",b+=z.toString(0)}y+=" sources: "+a+" destinations: "+b}return y},qo.prototype.commit=function(){var a=this.ub;if(a!==null){var y=this.bounds,x=a.bounds;De(x)?(x.x=y.x,x.y=y.y,x.width=y.width,x.height=y.height):a.bounds=y.copy()}else if(a=this.node,a!==null){if(y=this.bounds,!(a instanceof $i)){x=Ee.alloc(),a.Va();var E=this.network.layout.ni(a,x),b=a.locationObject.ga(er);if(E.w()&&b.w()){a.moveTo(y.x+this.focusX-(b.x-E.x),y.y+this.focusY-(b.y-E.y)),Ee.free(x);return}Ee.free(x)}a.moveTo(y.x,y.y)}},qo.prototype.Cl=function(a){a!==null&&(this.tg.contains(a)||this.tg.add(a))},qo.prototype.Kl=function(a){a!==null&&this.tg.remove(a)},qo.prototype.zl=function(a){a!==null&&(this.mg.contains(a)||this.mg.add(a))},qo.prototype.Jl=function(a){a!==null&&this.mg.remove(a)};function ry(a,y){return a=a.Sh,y=y.Sh,a?y?(a=a.text,y=y.text,a<y?-1:a>y?1:0):1:y!==null?-1:0}ge.Object.defineProperties(qo.prototype,{sourceEdgesArrayAccess:{get:function(){return this.tg._dataArray}},destinationEdgesArrayAccess:{get:function(){return this.mg._dataArray}},data:{get:function(){return this.ub},set:function(a){if(this.ub=a,a!==null&&a.bounds){var y=a.bounds;a=y.x;var x=y.y,E=y.width;y=y.height,this.o.h(E/2,y/2),this.j.h(a,x,E,y)}}},node:{get:function(){return this.Sh},set:function(a){if(this.Sh!==a){this.Sh=a,a.Va();var y=this.network.layout,x=Ee.alloc(),E=y.ni(a,x);y=E.x;var b=E.y,z=E.width;if(E=E.height,isNaN(y)&&(y=0),isNaN(b)&&(b=0),this.j.h(y,b,z,E),Ee.free(x),!(a instanceof $i)&&(a=a.locationObject.ga(er),a.w())){this.o.h(a.x-y,a.y-b);return}this.o.h(z/2,E/2)}}},bounds:{get:function(){return this.j},set:function(a){this.j.D(a)||this.j.assign(a)}},focus:{get:function(){return this.o},set:function(a){this.o.D(a)||this.o.assign(a)}},centerX:{get:function(){return this.j.x+this.o.x},set:function(a){var y=this.j;y.x+this.o.x!==a&&(y.ka(),y.x=a-this.o.x,y.freeze())}},centerY:{get:function(){return this.j.y+this.o.y},set:function(a){var y=this.j;y.y+this.o.y!==a&&(y.ka(),y.y=a-this.o.y,y.freeze())}},focusX:{get:function(){return this.o.x},set:function(a){var y=this.o;y.x!==a&&(y.ka(),y.x=a,y.freeze())}},focusY:{get:function(){return this.o.y},set:function(a){var y=this.o;y.y!==a&&(y.ka(),y.y=a,y.freeze())}},x:{get:function(){return this.j.x},set:function(a){var y=this.j;y.x!==a&&(y.ka(),y.x=a,y.freeze())}},y:{get:function(){return this.j.y},set:function(a){var y=this.j;y.y!==a&&(y.ka(),y.y=a,y.freeze())}},width:{get:function(){return this.j.width},set:function(a){var y=this.j;y.width!==a&&(y.ka(),y.width=a,y.freeze())}},height:{get:function(){return this.j.height},set:function(a){var y=this.j;y.height!==a&&(y.ka(),y.height=a,y.freeze())}},network:{get:function(){return this.ob},set:function(a){this.ob=a}},sourceVertexes:{get:function(){for(var a=new qe,y=this.sourceEdges;y.next();)a.add(y.value.fromVertex);return a.iterator}},destinationVertexes:{get:function(){for(var a=new qe,y=this.destinationEdges;y.next();)a.add(y.value.toVertex);return a.iterator}},vertexes:{get:function(){for(var a=new qe,y=this.sourceEdges;y.next();)a.add(y.value.fromVertex);for(y=this.destinationEdges;y.next();)a.add(y.value.toVertex);return a.iterator}},sourceEdges:{get:function(){return this.tg.iterator}},destinationEdges:{get:function(){return this.mg.iterator}},edges:{get:function(){for(var a=new Xe,y=this.sourceEdges;y.next();)a.add(y.value);for(y=this.destinationEdges;y.next();)a.add(y.value);return a.iterator}},edgesCount:{get:function(){return this.tg.count+this.mg.count}}}),qo.prototype.deleteDestinationEdge=qo.prototype.Jl,qo.prototype.addDestinationEdge=qo.prototype.zl,qo.prototype.deleteSourceEdge=qo.prototype.Kl,qo.prototype.addSourceEdge=qo.prototype.Cl,qo.className="LayoutVertex",qo.standardComparer=ry,qo.smartComparer=function(a,y){if(a!==null){if(y!==null){a=a.Sh;var x=y.Sh;if(a!==null){if(x!==null){for(y=a.text.toLocaleLowerCase().split(/([+-]?[.]?\d+(?:\.\d*)?(?:e[+-]?\d+)?)/),a=x.text.toLocaleLowerCase().split(/([+-]?[.]?\d+(?:\.\d*)?(?:e[+-]?\d+)?)/),x=0;x<y.length;x++)if(a[x]!==""&&a[x]!==void 0){var E=parseFloat(y[x]),b=parseFloat(a[x]);if(isNaN(E))if(isNaN(b)){if(y[x].localeCompare(a[x])!==0)return y[x].localeCompare(a[x])}else return 1;else{if(isNaN(b))return-1;if(E-b!==0)return E-b}}else if(y[x]!=="")return 1;return a[x]!==""&&a[x]!==void 0?-1:0}return 1}return x!==null?-1:0}return 1}return y!==null?-1:0};function Is(a){xi(this),this.nb=a,this.qd=this.kd=this.$k=this.ub=null}Is.prototype.clear=function(){this.qd=this.kd=this.$k=this.ub=null},Is.prototype.toString=function(a){a===void 0&&(a=0);var y="LayoutEdge#"+fr(this);return 0<a&&(y+=this.$k!==null?"("+this.$k.toString()+")":"",1<a&&(y+=" "+(this.kd?this.kd.toString():"null")+" --> "+(this.qd?this.qd.toString():"null"))),y},Is.prototype.gm=function(){var a=this.kd;this.kd=this.qd,this.qd=a},Is.prototype.commit=function(){},Is.prototype.Ax=function(a){return this.qd===a?this.kd:this.kd===a?this.qd:null},ge.Object.defineProperties(Is.prototype,{network:{get:function(){return this.nb},set:function(a){this.nb=a}},data:{get:function(){return this.ub},set:function(a){this.ub!==a&&(this.ub=a)}},link:{get:function(){return this.$k},set:function(a){this.$k!==a&&(this.$k=a)}},fromVertex:{get:function(){return this.kd},set:function(a){this.kd!==a&&(this.kd=a)}},toVertex:{get:function(){return this.qd},set:function(a){this.qd!==a&&(this.qd=a)}}}),Is.prototype.getOtherVertex=Is.prototype.Ax,Is.className="LayoutEdge";function Pa(a){mo.call(this),this.isViewportSized=!0,this.yo=this.zo=NaN,this.yg=new Ke(NaN,NaN).freeze(),this.tf=new Ke(10,10).freeze(),this.Jb=up,this.Rb=n0,this.nd=hp,this.hd=uS,a&&Object.assign(this,a)}we(Pa,mo),Pa.prototype.cloneProtected=function(a){mo.prototype.cloneProtected.call(this,a),a.zo=this.zo,a.yo=this.yo,a.yg.assign(this.yg),a.tf.assign(this.tf),a.Jb=this.Jb,a.Rb=this.Rb,a.nd=this.nd,a.hd=this.hd},Pa.prototype.qb=function(a){a.classType===Pa?a===hp||a===r0||a===oy||a===i0?this.sorting=a:a===n0||a===Jl?this.arrangement=a:a===up||a===e0?this.alignment=a:Gt("Unknown enum value: "+a):mo.prototype.qb.call(this,a)},Pa.prototype.doLayout=function(a){this.arrangementOrigin=this.initialOrigin(this.arrangementOrigin);var y=this.ex(a);a=this.diagram;for(var x=y.copy().iterator;x.next();){var E=x.value;if(!E.ph()||E.fromNode===null&&E.toNode===null){if(E.Va(),E instanceof $i)for(E=E.memberParts;E.next();)y.remove(E.value)}else y.remove(E)}var b=y.Fa();if(b.length!==0){switch(this.sorting){case i0:b.reverse();break;case hp:b.sort(this.comparer);break;case r0:b.sort(this.comparer),b.reverse()}var z=this.wrappingColumn;isNaN(z)&&(z=0);var tt=this.wrappingWidth;switch(isNaN(tt)&&a!==null?(y=a.padding,tt=Math.max(a.viewportBounds.width-y.left-y.right,0)):tt=Math.max(this.wrappingWidth,0),0>=z&&0>=tt&&(z=1),y=this.spacing.width,isFinite(y)||(y=0),x=this.spacing.height,isFinite(x)||(x=0),a!==null&&a.Ea("Layout"),E=[],this.alignment){case e0:var rt=y,ot=x,st=Ee.alloc(),ut=Math.max(this.cellSize.width,1);if(!isFinite(ut))for(var ft=ut=0;ft<b.length;ft++){var mt=this.ni(b[ft],st);ut=Math.max(ut,mt.width)}if(ut=Math.max(ut+rt,1),ft=Math.max(this.cellSize.height,1),!isFinite(ft))for(mt=ft=0;mt<b.length;mt++){var yt=this.ni(b[mt],st);ft=Math.max(ft,yt.height)}ft=Math.max(ft+ot,1),mt=this.arrangement;for(var wt=yt=this.arrangementOrigin.x,bt=this.arrangementOrigin.y,Zt=0,It=0,Yt=0;Yt<b.length;Yt++){var Jt=b[Yt],qt=this.ni(Jt,st),ae=Math.ceil((qt.width+rt)/ut)*ut,Ce=Math.ceil((qt.height+ot)/ft)*ft;switch(mt){case Jl:var In=Math.abs(wt-qt.width);break;default:In=wt+qt.width}switch((0<z&&Zt>z-1||0<tt&&0<Zt&&In-yt>tt)&&(E.push(new Ee(0,bt,tt+rt,It)),Zt=0,wt=yt,bt+=It,It=0),It=Math.max(It,Ce),mt){case Jl:qt=-qt.width;break;default:qt=0}switch(Jt.moveTo(wt+qt,bt),mt){case Jl:wt-=ae;break;default:wt+=ae}Zt++}E.push(new Ee(0,bt,tt+rt,It)),Ee.free(st);break;case up:for(ot=tt,ut=z,ft=y,mt=x,tt=Ee.alloc(),yt=Math.max(this.cellSize.width,1),z=bt=st=0,rt=At.alloc(),wt=0;wt<b.length;wt++)It=b[wt],Zt=this.ni(It,tt),It=Ch(It,It.locationObject,It.locationSpot,rt),st=Math.max(st,It.x),bt=Math.max(bt,Zt.width-It.x),z=Math.max(z,It.y);switch(wt=this.arrangement,wt){case Jl:st+=ft;break;default:bt+=ft}yt=isFinite(yt)?Math.max(yt+ft,1):Math.max(st+bt,1);var ui=It=this.arrangementOrigin.x;for(Yt=this.arrangementOrigin.y,bt=0,ot>=st&&(ot-=st),st=Jt=0,ae=Math.max(this.cellSize.height,1),qt=z=0,Ce=!0,Zt=At.alloc(),In=0;In<b.length;In++){var $n=b[In],Cn=this.ni($n,tt),$e=Ch($n,$n.locationObject,$n.locationSpot,rt);if(0<bt)switch(wt){case Jl:ui=(ui-It-(Cn.width-$e.x))/yt,ui=ue.$(Math.round(ui),ui)?Math.round(ui):Math.floor(ui),ui=ui*yt+It;break;default:ui=(ui-It+$e.x)/yt,ui=ue.$(Math.round(ui),ui)?Math.round(ui):Math.ceil(ui),ui=ui*yt+It}else switch(wt){case Jl:Jt=ui+$e.x+Cn.width;break;default:Jt=ui-$e.x}switch(wt){case Jl:var _i=-(ui+$e.x)+Jt;break;default:_i=ui+Cn.width-$e.x-Jt}if(0<ut&&bt>ut-1||0<ot&&0<bt&&_i>ot){for(E.push(new Ee(0,Ce?Yt-z:Yt,ot+ft,qt+z+mt)),ui=0;ui<bt&&In!==bt;ui++){_i=b[In-bt+ui];var zi=Ch(_i,_i.locationObject,_i.locationSpot,Zt);_i.moveTo(_i.position.x,_i.position.y+z-zi.y)}qt+=mt,Yt=Ce?Yt+qt:Yt+(qt+z),bt=qt=z=0,ui=It,Ce=!1}switch(ui===It&&(st=wt===Jl?Math.max(st,Cn.width-$e.x):Math.min(st,-$e.x)),z=Math.max(z,$e.y),qt=Math.max(qt,Cn.height-$e.y),isFinite(ae)&&(qt=Math.max(qt,Math.max(Cn.height,ae)-$e.y)),Ce?$n.moveTo(ui-$e.x,Yt-$e.y):$n.moveTo(ui-$e.x,Yt),wt){case Jl:ui-=$e.x+ft;break;default:ui+=Cn.width-$e.x+ft}bt++}if(E.push(new Ee(0,Yt,ot+ft,(Ce?qt:qt+z)+mt)),b.length!==bt)for(ot=0;ot<bt;ot++)ut=b[b.length-bt+ot],ft=Ch(ut,ut.locationObject,ut.locationSpot,rt),ut.moveTo(ut.position.x,ut.position.y+z-ft.y);if(At.free(rt),At.free(Zt),wt===Jl)for(b=0;b<E.length;b++)z=E[b],z.width+=st,z.x-=st;else for(b=0;b<E.length;b++)z=E[b],z.x>st&&(z.width+=z.x-st,z.x=st);Ee.free(tt)}for(rt=z=tt=b=0;rt<E.length;rt++)ot=E[rt],b=Math.min(b,ot.x),tt=Math.min(tt,ot.y),z=Math.max(z,ot.x+ot.width);this.arrangement===Jl?this.commitLayers(E,new At(b+y/2-(z+b),tt-x/2)):this.commitLayers(E,new At(b-y/2,tt-x/2)),a!==null&&a.eb("Layout"),this.isValidLayout=!0}},Pa.prototype.commitLayers=function(){};function uS(a,y){return a=a.text,y=y.text,a<y?-1:a>y?1:0}ge.Object.defineProperties(Pa.prototype,{wrappingWidth:{get:function(){return this.zo},set:function(a){this.zo!==a&&(0<a||isNaN(a))&&(this.zo=a,this.isViewportSized=isNaN(a),this.C())}},wrappingColumn:{get:function(){return this.yo},set:function(a){this.yo!==a&&(0<a||isNaN(a))&&(this.yo=a,this.C())}},cellSize:{get:function(){return this.yg},set:function(a){this.yg.D(a)||(this.yg.assign(a),this.C())}},spacing:{get:function(){return this.tf},set:function(a){this.tf.D(a)||(this.tf.assign(a),this.C())}},alignment:{get:function(){return this.Jb},set:function(a){this.Jb===a||a!==up&&a!==e0||(this.Jb=a,this.C())}},arrangement:{get:function(){return this.Rb},set:function(a){this.Rb===a||a!==n0&&a!==Jl||(this.Rb=a,this.C())}},sorting:{get:function(){return this.nd},set:function(a){this.nd===a||a!==oy&&a!==i0&&a!==hp&&a!==r0||(this.nd=a,this.C())}},comparer:{get:function(){return this.hd},set:function(a){this.hd!==a&&(this.hd=a,this.C())}}});var e0=new Ue(Pa,"Position",0),up=new Ue(Pa,"Location",1),n0=new Ue(Pa,"LeftToRight",2),Jl=new Ue(Pa,"RightToLeft",3),oy=new Ue(Pa,"Forward",4),i0=new Ue(Pa,"Reverse",5),hp=new Ue(Pa,"Ascending",6),r0=new Ue(Pa,"Descending",7);Pa.className="GridLayout",Pa.standardComparer=uS,Pa.smartComparer=function(a,y){if(a!==null){if(y!==null){a=a.text.toLocaleLowerCase().split(/([+-]?[.]?\d+(?:\.\d*)?(?:e[+-]?\d+)?)/),y=y.text.toLocaleLowerCase().split(/([+-]?[.]?\d+(?:\.\d*)?(?:e[+-]?\d+)?)/);for(var x=0;x<a.length;x++)if(y[x]!==""&&y[x]!==void 0){var E=parseFloat(a[x]),b=parseFloat(y[x]);if(isNaN(E))if(isNaN(b)){if(a[x].localeCompare(y[x])!==0)return a[x].localeCompare(y[x])}else return 1;else{if(isNaN(b))return-1;if(E-b!==0)return E-b}}else if(a[x]!=="")return 1;return y[x]!==""&&y[x]!==void 0?-1:0}return 1}return y!==null?-1:0},Pa.Position=e0,Pa.Location=up,Pa.LeftToRight=n0,Pa.RightToLeft=Jl,Pa.Forward=oy,Pa.Reverse=i0,Pa.Ascending=hp,Pa.Descending=r0;function Vr(){this.On=new qe,this.Dn=new qe,this.Pa=new qe,this.cf=new Me,this.bf=new Me,this.aj=new Me,this.H=null,this.tp=!1}Pt=Vr.prototype,Pt.clear=function(){this.On.clear(),this.Dn.clear(),this.Pa.clear(),this.cf.clear(),this.bf.clear(),this.aj.clear()},Pt.Xe=function(a){this.H=a},Pt.oi=function(a){if(a instanceof Un){if(this.On.add(a),a instanceof $i){var y=a.containingGroup;y===null?this.H.ai.add(a):y.gl.add(a),y=a.layout,y!==null&&(y.diagram=this.H)}}else a instanceof En?this.Dn.add(a):a instanceof Rr||this.Pa.add(a);y=a.data,y===null||a instanceof Rr||(a instanceof En?this.bf.add(y,a):this.cf.add(y,a))},Pt.pc=function(a){if(a.Ej(),a instanceof Un){if(this.On.remove(a),a instanceof $i){var y=a.containingGroup;y===null?this.H.ai.remove(a):y.gl.remove(a),y=a.layout,y!==null&&(y.diagram=null)}}else a instanceof En?this.Dn.remove(a):a instanceof Rr||this.Pa.remove(a);y=a.data,y===null||a instanceof Rr||(a instanceof En?this.bf.remove(y):this.cf.remove(y))},Pt.Wd=function(){var a=this.H;if(a!==null){for(var y=a.nodeTemplateMap.iterator;y.next();){var x=y.value,E=y.key;(!x.Zc()||x instanceof $i)&&Gt('Invalid node template in Diagram.nodeTemplateMap: template for "'+E+'" must be a Node or a simple Part, not a Group or Link: '+x)}for(y=a.groupTemplateMap.iterator;y.next();)x=y.value,E=y.key,x instanceof $i||Gt('Invalid group template in Diagram.groupTemplateMap: template for "'+E+'" must be a Group, not a normal Node or Link: '+x);for(y=a.linkTemplateMap.iterator;y.next();)x=y.value,E=y.key,x instanceof En||Gt('Invalid link template in Diagram.linkTemplateMap: template for "'+E+'" must be a Link, not a normal Node or simple Part: '+x);for(y=On(),x=a.selection.iterator;x.next();)(E=x.value.data)&&y.push(E);for(x=On(),a=a.highlighteds.iterator;a.next();)(E=a.value.data)&&x.push(E);for(a=On(),E=this.nodes.iterator;E.next();){var b=E.value;b.data!==null&&(a.push(b.data),a.push(b.location))}for(E=this.links.iterator;E.next();)b=E.value,b.data!==null&&(a.push(b.data),a.push(b.location));for(E=this.parts.iterator;E.next();)b=E.value,b.data!==null&&(a.push(b.data),a.push(b.location));for(this.removeAllModeledParts(),this.addAllModeledParts(),E=0;E<y.length;E++)b=this.Lc(y[E]),b!==null&&(b.isSelected=!0);for(E=0;E<x.length;E++)b=this.Lc(x[E]),b!==null&&(b.isHighlighted=!0);for(E=0;E<a.length;E+=2)b=this.Lc(a[E]),b!==null&&(b.location=a[E+1]);Qn(y),Qn(x),Qn(a)}},Vr.prototype.addAllModeledParts=function(){this.addModeledParts(this.diagram.model.nodeDataArray)},Vr.prototype.addModeledParts=function(a,y){var x=this,E=this.diagram.model;a.forEach(function(b){E.lb(b)&&hS(x,b,!1)}),a.forEach(function(b){E.lb(b)&&x.resolveReferencesForData(b)}),y!==!1&&gf(this.diagram,!1)};function hS(a,y,x){if(y!=null&&!a.diagram.undoManager.isUndoingRedoing&&!a.cf.contains(y)){x===void 0&&(x=!0);t:{if(y!=null&&!a.H.undoManager.isUndoingRedoing&&!a.cf.contains(y)){var E=a.Ro(y),b=dS(a,y,E);if(b!==null&&(Sl(b),b=b.copy(),b!==null)){var z=a.diagram.skipsModelSourceBindings;a.diagram.skipsModelSourceBindings=!0,b.Tf=E,b.ub=y,a.tp&&(b.Jg="Tool"),a.diagram.add(b),b.ub=null,b.data=y,a.diagram.skipsModelSourceBindings=z,E=b;break t}}E=null}E!==null&&x&&a.resolveReferencesForData(y)}}Vr.prototype.insertLink=function(){return null},Vr.prototype.resolveReferencesForData=function(){},Vr.prototype.Ro=function(a){return this.H.model.Ro(a)};function dS(a,y,x){a=a.H;var E=a.model;return E.Xj()&&E.Yu(y)?(y=a.groupTemplateMap.I(x),y===null&&(y=a.groupTemplateMap.I(""),y===null&&(gS||(gS=!0,zn('No Group template found for category "'+x+'"'),zn(" Using default group template")),y=a.ly))):(y=a.nodeTemplateMap.I(x),y===null&&(y=a.nodeTemplateMap.I(""),y===null&&(fS||(fS=!0,zn('No Node template found for category "'+x+'"'),zn(" Using default node template")),y=a.ny))),y}Vr.prototype.getLinkCategoryForData=function(){return""},Vr.prototype.setLinkCategoryForData=function(){},Vr.prototype.setFromNodeForLink=function(){},Vr.prototype.setToNodeForLink=function(){},Vr.prototype.findLinkTemplateForCategory=function(a){var y=this.H,x=y.linkTemplateMap.I(a);return x===null&&(x=y.linkTemplateMap.I(""),x===null&&(pS||(pS=!0,zn('No Link template found for category "'+a+'"'),zn(" Using default link template")),x=y.my)),x},Vr.prototype.removeAllModeledParts=function(){this.Gs(this.diagram.model.nodeDataArray)},Vr.prototype.Gs=function(a){var y=this;a.forEach(function(x){y.ip(x)})},Vr.prototype.ip=function(a){a=this.Lc(a),a!==null&&(Eg(this.diagram,a,!1),this.unresolveReferencesForPart(a))},Vr.prototype.unresolveReferencesForPart=function(){},Vr.prototype.removeDataForLink=function(){},Vr.prototype.findPartForKey=function(a){return a==null?null:(a=this.H.model.hc(a),a!==null?this.cf.I(a):null)},Vr.prototype.Vb=function(a){return a==null||(a=this.H.model.hc(a),a===null)?null:(a=this.cf.I(a),a instanceof Un?a:null)},Vr.prototype.findLinkForKey=function(){return null},Pt=Vr.prototype,Pt.Lc=function(a){if(a===null)return null;var y=this.cf.I(a);return y!==null?y:y=this.bf.I(a)},Pt.ii=function(a){return a===null?null:(a=this.cf.I(a),a instanceof Un?a:null)},Pt.Kc=function(a){return a===null?null:this.bf.I(a)},Pt.ms=function(a){for(var y=0;y<arguments.length;++y);y=new qe;for(var x=this.On.iterator;x.next();){var E=x.value,b=E.data;if(b!==null)for(var z=0;z<arguments.length;z++){var tt=arguments[z];if(De(tt)&&ay(this,b,tt)){y.add(E);break}}}return y.iterator},Pt.ls=function(a){for(var y=0;y<arguments.length;++y);y=new qe;for(var x=this.Dn.iterator;x.next();){var E=x.value,b=E.data;if(b!==null)for(var z=0;z<arguments.length;z++){var tt=arguments[z];if(De(tt)&&ay(this,b,tt)){y.add(E);break}}}return y.iterator};function ay(a,y,x){for(var E in x){var b=y[E],z=x[E];if(kn(z)){if(!kn(b)||b.length<z.length)return!1;for(var tt=0;tt<b.length;tt++){var rt=z[tt];if(rt!==void 0&&!cS(a,b[tt],rt))return!1}}else if(!cS(a,b,z))return!1}return!0}function cS(a,y,x){if(typeof x=="function"){if(!x(y))return!1}else if(x instanceof RegExp){if(!y||!x.test(y.toString()))return!1}else if(De(y)&&De(x)){if(!ay(a,y,x))return!1}else if(y!==x)return!1;return!0}Vr.prototype.doModelChanged=function(a){if(this.H){var y=this.H;if(a.model===y.model){var x=a.change;if(y.doModelChanged(a),y.aa){y.aa=!1;try{var E=a.modelChange;if(E!=="")if(x===no){if(E==="nodeCategory"){var b=this.Lc(a.object),z=a.newValue;b!==null&&typeof z=="string"&&(b.category=z)}else E==="nodeDataArray"&&(this.Gs(a.oldValue),this.addModeledParts(a.newValue));y.isModified=!0}else if(x===Po){var tt=a.newValue;E==="nodeDataArray"&&De(tt)&&hS(this,tt),y.isModified=!0}else if(x===Eo){var rt=a.oldValue;E==="nodeDataArray"&&De(rt)&&this.ip(rt),y.isModified=!0}else x===fa&&(E==="SourceChanged"?a.object!==null?this.updateDataBindings(a.object,a.propertyName):(this.rp(),this.updateAllTargetBindings()):E==="ModelDisplaced"&&this.Wd());else if(x===no){var ot=a.propertyName,st=a.object;st===y.model?(ot==="nodeKeyProperty"||ot==="nodeCategoryProperty")&&(y.undoManager.isUndoingRedoing||this.Wd()):this.updateDataBindings(st,ot),y.isModified=!0}else if(x===Po||x===Eo){var ut=a.change===Po,ft=ut?a.newParam:a.oldParam,mt=ut?a.newValue:a.oldValue,yt=this.aj.I(a.object);if(Array.isArray(yt))for(a=0;a<yt.length;a++){var wt=yt[a];if(ut)Cm(wt,mt,ft,!0);else if(!(0>ft)){var bt=ft+Vg(wt);wt.pc(bt,!0),xv(wt,bt,ft)}}y.isModified=!0}}finally{y.aa=!0}}}}},Vr.prototype.updateAllTargetBindings=function(a){a===void 0&&(a="");for(var y=this.parts.iterator;y.next();)y.value.La(a);for(y=this.nodes.iterator;y.next();)y.value.La(a);for(y=this.links.iterator;y.next();)y.value.La(a)},Vr.prototype.rp=function(){for(var a=this.H.model,y=new qe,x=a.nodeDataArray,E=0;E<x.length;E++)y.add(x[E]);var b=[];for(this.nodes.each(function(tt){tt.data===null||y.contains(tt.data)||b.push(tt.data)}),this.parts.each(function(tt){tt.data===null||y.contains(tt.data)||b.push(tt.data)}),b.forEach(function(tt){ES(a,tt,!1)}),E=0;E<x.length;E++){var z=x[E];this.Lc(z)===null&&CS(a,z,!1)}for(this.refreshDataBoundLinks(),x=this.parts.iterator;x.next();)x.value.updateRelationshipsFromData();for(x=this.nodes.iterator;x.next();)x.value.updateRelationshipsFromData();for(x=this.links.iterator;x.next();)x.value.updateRelationshipsFromData()},Vr.prototype.refreshDataBoundLinks=function(){},Vr.prototype.updateRelationshipsFromData=function(){},Vr.prototype.updateDataBindings=function(a,y){if(typeof y=="string"){var x=this.Lc(a);if(x!==null)x.La(y);else{x=null;for(var E=this.aj.iterator;E.next();){for(var b=E.value,z=0;z<b.length;z++){var tt=b[z].sx(a);tt!==null&&(x===null&&(x=On()),x.push(tt))}if(x!==null)break}if(x!==null){for(E=0;E<x.length;E++)x[E].La(y);Qn(x)}}a===this.diagram.model.modelData&&this.updateAllTargetBindings(y)}};function sy(a,y){var x=y.Hh;if(kn(x)){var E=a.aj.I(x);if(E===null)E=[],E.push(y),a.aj.add(x,E);else{for(a=0;a<E.length;a++)if(E[a]===y)return;E.push(y)}}}function ly(a,y,x){Yd(y,function(tt){tt=tt.O.s;for(var rt=tt.length,ot=0;ot<rt;ot++)Fg(x,tt[ot])});var E=y.Hh;if(kn(E)){var b=a.aj.I(E);if(b!==null){for(var z=0;z<b.length;z++)if(b[z]===y){b.splice(z,1),b.length===0&&a.aj.remove(E);break}}}}Vr.prototype.Kj=function(a,y,x){x===void 0&&(x=!1);var E=new Me;if(kn(a))for(var b=0;b<a.length;b++)o0(this,a[b],y,E,x);else for(a=a.iterator;a.next();)o0(this,a.value,y,E,x);if(y!==null){x=y.model,a=y.toolManager.findTool("Dragging"),a=a!==null?a.dragOptions.dragsLink:y.Wm.dragsLink,b=new qe;for(var z=new Me,tt=E.iterator;tt.next();){var rt=tt.value;if(rt instanceof En)a||rt.fromNode!==null&&rt.toNode!==null||b.add(rt);else if(rt instanceof Un&&rt.data!==null&&x.Tl()){var ot=rt;rt=tt.key;var st=rt.pg();st!==null&&(st=E.I(st),st!==null?(x.qe(ot.data,x.wa(st.data)),ot=y.Kc(ot.data),rt=rt.kh(),rt!==null&&ot!==null&&z.add(rt,ot)):x.qe(ot.data,void 0))}}if(0<b.count&&y.Is(b,!1),0<z.count)for(x=z.iterator;x.next();)E.add(x.key,x.value)}if(y!==null&&this.H!==null&&(y=y.model,x=y.afterCopyFunction,x!==null)){var ut=new Me;E.each(function(ft){ft.key.data!==null&&ut.add(ft.key.data,ft.value.data)}),x(ut,y,this.H.model)}for(y=E.iterator;y.next();)y.value.La();return E};function o0(a,y,x,E,b){if(y===null||b&&!y.canCopy())return null;if(E.contains(y))return E.I(y);var z=a.copyPartData(y,x);if(!(z instanceof Li))return null;if(z.isSelected=!1,z.isHighlighted=!1,E.add(y,z),y instanceof Un){for(var tt=y.linksConnected;tt.next();){var rt=tt.value;if(rt.fromNode===y){var ot=E.I(rt);ot!==null&&(ot.fromNode=z)}rt.toNode===y&&(rt=E.I(rt),rt!==null&&(rt.toNode=z))}if(y instanceof $i&&z instanceof $i)for(y=y.memberParts;y.next();)tt=o0(a,y.value,x,E,b),tt instanceof En||tt===null||(tt.containingGroup=z)}else if(y instanceof En&&z instanceof En)for(tt=y.fromNode,tt!==null&&(tt=E.I(tt),tt!==null&&(z.fromNode=tt)),tt=y.toNode,tt!==null&&(tt=E.I(tt),tt!==null&&(z.toNode=tt)),y=y.labelNodes;y.next();)tt=o0(a,y.value,x,E,b),tt!==null&&tt instanceof Un&&(tt.labeledLink=z);return z}Vr.prototype.copyPartData=function(a,y){var x=null,E=a.data;if(E!==null&&y!==null){var b=y.model;a instanceof En||(E=b.copyNodeData(E),De(E)&&(b.xf(E),x=y.Lc(E)))}else Sl(a),x=a.copy(),x!==null&&(b=this.H,y!==null?y.add(x):E!==null&&b!==null&&b.commandHandler!==null&&b.commandHandler.copiesClipboardData&&(y=b.model,b=null,x instanceof En||(b=y.copyNodeData(E)),De(b)&&(x.data=b)));return x},ge.Object.defineProperties(Vr.prototype,{nodes:{get:function(){return this.On}},links:{get:function(){return this.Dn}},parts:{get:function(){return this.Pa}},diagram:{get:function(){return this.H}},addsToTemporaryLayer:{get:function(){return this.tp},set:function(a){this.tp=a}}}),Vr.prototype.updateAllRelationshipsFromData=Vr.prototype.rp,Vr.prototype.findLinksByExample=Vr.prototype.ls,Vr.prototype.findNodesByExample=Vr.prototype.ms,Vr.prototype.findLinkForData=Vr.prototype.Kc,Vr.prototype.findNodeForData=Vr.prototype.ii,Vr.prototype.findPartForData=Vr.prototype.Lc,Vr.prototype.findNodeForKey=Vr.prototype.Vb,Vr.prototype.removeModeledPart=Vr.prototype.ip,Vr.prototype.removeModeledParts=Vr.prototype.Gs,Vr.prototype.rebuildParts=Vr.prototype.Wd;var fS=!1,gS=!1,pS=!1;Vr.className="PartManager";function la(a){Vr.apply(this,arguments)}we(la,Vr),la.prototype.addAllModeledParts=function(){var a=this.diagram.model;this.addModeledParts(a.nodeDataArray),mS(this,a.linkDataArray)},la.prototype.addModeledParts=function(a){for(Vr.prototype.addModeledParts.call(this,a,!1),a=this.links.iterator;a.next();)Of(a.value);gf(this.diagram,!1)};function mS(a,y){y.forEach(function(x){vS(a,x)}),gf(a.diagram,!1)}function vS(a,y){if(y!=null&&!a.diagram.undoManager.isUndoingRedoing&&!a.bf.contains(y)){var x=a.getLinkCategoryForData(y),E=a.findLinkTemplateForCategory(x);if(E!==null){Sl(E);var b=E.copy();if(b!==null){E=a.diagram.skipsModelSourceBindings,a.diagram.skipsModelSourceBindings=!0,b.Tf=x,b.ub=y,x=a.diagram.model;var z=u0(x,y,!0);z!==""&&(b.fromPortId=z),z=Xs(x,y,!0),z!==void 0&&(z=a.Vb(z),z instanceof Un&&(b.fromNode=z)),z=u0(x,y,!1),z!==""&&(b.toPortId=z),z=Xs(x,y,!1),z!==void 0&&(z=a.Vb(z),z instanceof Un&&(b.toNode=z)),x=x.Ef(y),Array.isArray(x)&&x.forEach(function(tt){tt=a.Vb(tt),tt!==null&&(tt.labeledLink=b)}),a.tp&&(b.Jg="Tool"),a.diagram.add(b),b.ub=null,b.data=y,a.diagram.skipsModelSourceBindings=E}}}}la.prototype.removeAllModeledParts=function(){var a=this.diagram.model;yS(this,a.linkDataArray),this.Gs(a.nodeDataArray)};function yS(a,y){y.forEach(function(x){a.ip(x)})}la.prototype.getLinkCategoryForData=function(a){return this.diagram.model.ps(a)},la.prototype.setLinkCategoryForData=function(a,y){return this.diagram.model.lp(a,y)},la.prototype.setFromNodeForLink=function(a,y){var x=this.diagram.model;x.wv(a.data,x.wa(y!==null?y.data:null))},la.prototype.setToNodeForLink=function(a,y){var x=this.diagram.model;x.Bv(a.data,x.wa(y!==null?y.data:null))},la.prototype.removeDataForLink=function(a){this.diagram.model.bm(a.data)},la.prototype.findPartForKey=function(a){var y=Vr.prototype.findPartForKey.call(this,a);return y===null&&(a=this.diagram.model.jh(a),a!==null)?this.bf.I(a):y},la.prototype.findLinkForKey=function(a){return a==null?null:(a=this.diagram.model.jh(a),a!==null?this.bf.I(a):null)},la.prototype.doModelChanged=function(a){var y=this;if(Vr.prototype.doModelChanged.call(this,a),this.diagram){var x=this.diagram;if(a.model===x.model){var E=a.change;if(x.aa){x.aa=!1;try{var b=a.modelChange;if(b!==""){if(E===no){if(b==="linkFromKey"){var z=this.Kc(a.object);if(z!==null){var tt=this.Vb(a.newValue);z.fromNode=tt}}else if(b==="linkToKey"){var rt=this.Kc(a.object);if(rt!==null){var ot=this.Vb(a.newValue);rt.toNode=ot}}else if(b==="linkFromPortId"){var st=this.Kc(a.object);if(st!==null){var ut=a.newValue;typeof ut=="string"&&(st.fromPortId=ut)}}else if(b==="linkToPortId"){var ft=this.Kc(a.object);if(ft!==null){var mt=a.newValue;typeof mt=="string"&&(ft.toPortId=mt)}}else if(b==="nodeGroupKey"){var yt=this.Lc(a.object);if(yt!==null){var wt=a.newValue;if(wt!==void 0){var bt=this.Vb(wt);bt instanceof $i?yt.containingGroup=bt:yt.containingGroup=null}else yt.containingGroup=null}}else if(b==="linkLabelKeys"){var Zt=this.Kc(a.object);if(Zt!==null){var It=a.oldValue,Yt=a.newValue;Array.isArray(It)&&It.forEach(function($e){0<=Yt.indexOf($e)||($e=y.Vb($e),$e!==null&&($e.labeledLink=null))}),Array.isArray(Yt)&&Yt.forEach(function($e){$e=y.Vb($e),$e!==null&&($e.labeledLink=Zt)})}}else if(b==="linkCategory"){var Jt=this.Kc(a.object),qt=a.newValue;Jt!==null&&typeof qt=="string"&&(Jt.category=qt)}else b==="linkDataArray"&&(yS(this,a.oldValue),mS(this,a.newValue));x.isModified=!0}else if(E===Po){var ae=a.newValue;if(b==="linkDataArray"&&typeof ae=="object"&&ae!==null)vS(this,ae);else if(b==="linkLabelKeys"&&ud(ae)){var Ce=this.Kc(a.object),In=this.Vb(ae);Ce!==null&&In!==null&&(In.labeledLink=Ce)}x.isModified=!0}else if(E===Eo){var ui=a.oldValue;if(b==="linkDataArray"&&typeof ui=="object"&&ui!==null)this.ip(ui);else if(b==="linkLabelKeys"&&ud(ui)){var $n=this.Vb(ui);$n!==null&&($n.labeledLink=null)}x.isModified=!0}}else if(E===no){var Cn=a.propertyName;a.object!==x.model||Cn!=="linkFromKeyProperty"&&Cn!=="linkToKeyProperty"&&Cn!=="linkFromPortIdProperty"&&Cn!=="linkToPortIdProperty"&&Cn!=="linkLabelKeysProperty"&&Cn!=="nodeIsGroupProperty"&&Cn!=="nodeGroupKeyProperty"&&Cn!=="linkCategoryProperty"||x.undoManager.isUndoingRedoing||this.Wd(),x.isModified=!0}}finally{x.aa=!0}}}}},la.prototype.refreshDataBoundLinks=function(){var a=this,y=this.diagram.model,x=new qe,E=y.linkDataArray;E.forEach(function(z){x.add(z)});var b=[];this.links.each(function(z){z.data===null||x.contains(z.data)||b.push(z.data)}),b.forEach(function(z){AS(y,z,!1)}),E.forEach(function(z){a.Kc(z)===null&&FS(y,z,!1)})},la.prototype.updateRelationshipsFromData=function(a){var y=a.data;if(y!==null){var x=a.diagram;if(x!==null){var E=x.model;if(a instanceof En){var b=Xs(E,y,!0);if(b=x.Vb(b),a.fromNode=b,b=Xs(E,y,!1),b=x.Vb(b),a.toNode=b,y=E.Ef(y),0<y.length||0<a.labelNodes.count){if(y.length===1&&a.labelNodes.count===1){b=y[0];var z=a.labelNodes.first();if(E.wa(z.data)===b)return}b=new qe().addAll(y);var tt=new qe;a.labelNodes.each(function(rt){rt.data!==null&&(rt=E.wa(rt.data),rt!==void 0&&tt.add(rt))}),y=tt.copy(),y.hp(b),b=b.copy(),b.hp(tt),(0<y.count||0<b.count)&&(y.each(function(rt){rt=x.Vb(rt),rt!==null&&rt.labeledLink===a&&(rt.labeledLink=null)}),b.each(function(rt){rt=x.Vb(rt),rt!==null&&rt.labeledLink!==a&&(rt.labeledLink=a)}))}}else!(a instanceof Rr)&&(y=E.lh(y),y=x.findPartForKey(y),y===null||y instanceof $i)&&(a.containingGroup=y)}}},la.prototype.resolveReferencesForData=function(a){var y=this.diagram.model,x=y.wa(a);if(x!==void 0){var E=dp(y,x),b=this.Lc(a);if(E!==null&&b!==null){E=E.iterator;for(var z={};E.next();){var tt=E.value;y.lb(tt)?b instanceof $i&&y.lh(tt)===x&&(tt=this.Lc(tt),tt!==null&&(tt.containingGroup=b)):(z.link=this.Kc(tt),z.link!==null&&b instanceof Un&&(Xs(y,tt,!0)===x&&(z.link.fromNode=b),Xs(y,tt,!1)===x&&(z.link.toNode=b),tt=y.Ef(tt),Array.isArray(tt)&&tt.some(function(rt){return function(ot){return ot===x?(b.labeledLink=rt.link,!0):!1}}(z)))),z={link:z.link}}Ql(y,x)}a=y.lh(a),a!==void 0&&(a=this.Vb(a),a instanceof $i&&(b.containingGroup=a))}},la.prototype.unresolveReferencesForPart=function(a){var y=this.diagram.model;if(a instanceof Un){var x=y.wa(a.data);if(x!==void 0){for(var E=a.linksConnected;E.next();)_l(y,x,E.value.data);if(a.isLinkLabel&&(E=a.labeledLink,E!==null&&_l(y,x,E.data)),a instanceof $i)for(a=a.memberParts;a.next();)E=a.value.data,y.lb(E)&&_l(y,x,E)}}},la.prototype.copyPartData=function(a,y){var x=Vr.prototype.copyPartData.call(this,a,y);if(a instanceof En)if(a=a.data,a!==null&&y!==null){var E=y.model;a=E.Jo(a),typeof a=="object"&&a!==null&&(E.fi(a),x=y.Kc(a))}else x!==null&&(y=this.diagram,a!==null&&y!==null&&y.commandHandler!==null&&y.commandHandler.copiesClipboardData&&(y=y.model.Jo(a),typeof y=="object"&&y!==null&&(x.data=y)));return x},la.prototype.insertLink=function(a,y,x,E){var b=this.diagram,z=b.model,tt=b.toolManager.findTool("Linking"),rt="";if(a!==null&&(y===null&&(y=a),rt=y.portId,rt===null&&(rt="")),y="",x!==null&&(E===null&&(E=x),y=E.portId,y===null&&(y="")),E=tt.archetypeLinkData,E instanceof En){if(Sl(E),z=E.copy(),z!==null)return z.fromNode=a,z.fromPortId=rt,z.toNode=x,z.toPortId=y,b.add(z),a=tt.archetypeLabelNodeData,a instanceof Un&&(Sl(a),a=a.copy(),a!==null&&(a.labeledLink=z,b.add(a))),z}else if(E!==null&&(E=z.Jo(E),typeof E=="object"&&E!==null))return a!==null&&Hf(z,E,z.wa(a.data),!0),Kf(z,E,rt,!0),x!==null&&Hf(z,E,z.wa(x.data),!1),Kf(z,E,y,!1),z.fi(E),a=tt.archetypeLabelNodeData,a===null||a instanceof Un||(a=z.copyNodeData(a),typeof a=="object"&&a!==null&&(z.xf(a),a=z.wa(a),a!==void 0&&z.Bu(E,a))),b.Kc(E);return null},la.prototype.findLinkForKey=la.prototype.findLinkForKey,la.prototype.findPartForKey=la.prototype.findPartForKey,la.prototype.removeAllModeledParts=la.prototype.removeAllModeledParts,la.prototype.addModeledParts=la.prototype.addModeledParts,la.prototype.addAllModeledParts=la.prototype.addAllModeledParts,la.className="GraphLinksPartManager";function sl(){Vr.apply(this,arguments),this.Sg=null}we(sl,Vr);function a0(a,y,x){if(y!==null&&x!==null&&x.kh()===null){var E=a.diagram.toolManager.findTool("Linking"),b=y,z=x;if(a.diagram.isTreePathToChildren||(b=x,z=y),(E===null||!_a(E,b,z,null,!0))&&(y=a.getLinkCategoryForData(x.data),E=a.findLinkTemplateForCategory(y),E!==null&&(Sl(E),E=E.copy(),E!==null))){var tt=a.diagram.skipsModelSourceBindings;a.diagram.skipsModelSourceBindings=!0,E.Tf=y,E.ub=x.data,E.fromNode=b,E.toNode=z,a.diagram.add(E),E.ub=null,E.data=x.data,a.diagram.skipsModelSourceBindings=tt}}}sl.prototype.getLinkCategoryForData=function(a){return this.diagram.model.ss(a)},sl.prototype.setLinkCategoryForData=function(a,y){this.diagram.model.Ms(a,y)},sl.prototype.setFromNodeForLink=function(a,y,x){var E=this.diagram.model;if(x===void 0&&(x=null),y=y!==null?y.data:null,this.diagram.isTreePathToChildren)E.qe(a.data,E.wa(y));else{var b=this.Sg;this.Sg=a,x!==null&&E.qe(x.data,void 0),E.qe(y,E.wa(a.toNode!==null?a.toNode.data:null)),this.Sg=b}},sl.prototype.setToNodeForLink=function(a,y,x){var E=this.diagram.model;if(x===void 0&&(x=null),y=y!==null?y.data:null,this.diagram.isTreePathToChildren){var b=this.Sg;this.Sg=a,x!==null&&E.qe(x.data,void 0),E.qe(y,E.wa(a.fromNode!==null?a.fromNode.data:null)),this.Sg=b}else E.qe(a.data,E.wa(y))},sl.prototype.removeDataForLink=function(a){this.diagram.model.qe(a.data,void 0)},sl.prototype.findLinkForKey=function(a){return a==null?null:(a=this.diagram.model.hc(a),a!==null?this.bf.I(a):null)},sl.prototype.doModelChanged=function(a){if(Vr.prototype.doModelChanged.call(this,a),this.diagram){var y=this.diagram;if(a.model===y.model){var x=a.change;if(y.aa){y.aa=!1;try{var E=a.modelChange;if(E!==""){if(x===no){if(E==="nodeParentKey"){var b=a.object,z=this.Vb(a.newValue),tt=this.ii(b);if(this.Sg!==null)z!==null&&(this.Sg.data=b,this.Sg.category=this.getLinkCategoryForData(b));else if(tt!==null){var rt=tt.kh();rt!==null?z===null?y.remove(rt):y.isTreePathToChildren?rt.fromNode=z:rt.toNode=z:a0(this,z,tt)}}else if(E==="parentLinkCategory"){var ot=this.ii(a.object),st=a.newValue;if(ot!==null&&typeof st=="string"){var ut=ot.kh();ut!==null&&(ut.category=st)}}y.isModified=!0}}else if(x===no){var ft=a.propertyName;a.object===y.model&&ft==="nodeParentKeyProperty"&&(y.undoManager.isUndoingRedoing||this.Wd()),y.isModified=!0}}finally{y.aa=!0}}}}},sl.prototype.updateRelationshipsFromData=function(a){var y=a.data;if(y!==null){var x=a.diagram;if(x!==null){var E=x.model;a instanceof Un&&(y=E.mh(y),y=x.Vb(y),E=a.pg(),y!==E&&(E=a.kh(),y!==null?E!==null?x.isTreePathToChildren?E.fromNode=y:E.toNode=y:a0(this,y,a):E!==null&&Eg(x,E,!1)))}}},sl.prototype.updateDataBindings=function(a,y){Vr.prototype.updateDataBindings.call(this,a,y),typeof y=="string"&&this.Lc(a)!==null&&(a=this.Kc(a),a!==null&&a.La(y))},sl.prototype.resolveReferencesForData=function(a){var y=this.diagram.model,x=y.wa(a);if(x!==void 0){var E=dp(y,x),b=this.Lc(a);if(E!==null&&b!==null){for(E=E.iterator;E.next();){var z=E.value;y.lb(z)&&b instanceof Un&&y.mh(z)===x&&a0(this,b,this.ii(z))}Ql(y,x)}a=y.mh(a),a!==void 0&&b instanceof Un&&(a=this.Vb(a),a0(this,a,b))}},sl.prototype.unresolveReferencesForPart=function(a){var y=this.diagram.model;if(a instanceof Un){var x=y.wa(a.data),E=this.Kc(a.data);if(E!==null){E.isSelected=!1,E.isHighlighted=!1;var b=E.layer;if(b!==null){var z=b.pc(-1,E,!1);0<=z&&this.diagram.cb(Eo,"parts",b,E,null,z,null),z=E.layerChanged,z!==null&&z(E,b,null)}}for(E=this.diagram.isTreePathToChildren,a=a.linksConnected;a.next();)b=a.value,b=(E?b.toNode:b.fromNode).data,y.lb(b)&&_l(y,x,b)}},sl.prototype.insertLink=function(a,y,x){y=this.diagram.model;var E=a,b=x;return this.diagram.isTreePathToChildren||(E=x,b=a),E!==null&&b!==null?(y.qe(b.data,y.wa(E.data)),b.kh()):null},sl.prototype.findLinkForKey=sl.prototype.findLinkForKey,sl.className="TreePartManager";function mi(a,y){this.kl=new qe,this.il=new qe,this.Wv=`,
|
|
"insertedNodeKeys": `,this.jy=`,
|
|
"modifiedNodeData": `,this.Yv=`,
|
|
"removedNodeKeys": `,this.vh=null,xi(this),this.Sm=this.xa="",this.Gg=!1,this.j={},this.Tc=[],this.kb=new Me,this.Th="key",this.Bk=this.bl=null,this.Jm=this.Km=!1,this.Mm=!0,this.xm=null,this.lj="category",this.Vf=new Me,this.Lt=new Xe,this.Wg=!1,this.o=null,this.undoManager=new uo,a!==void 0&&(kn(a)?this.nodeDataArray=a:y=a),y&&(Object.assign(this,y),a=y.Changed)&&(delete this.Changed,this.Pe(a))}mi.prototype.cloneProtected=function(a){a.xa=this.xa,a.Sm=this.Sm,a.Gg=this.Gg,a.Th=this.Th,a.bl=this.bl,a.Bk=this.Bk,a.Km=this.Km,a.Jm=this.Jm,a.Mm=this.Mm,a.xm=this.xm,a.lj=this.lj},mi.prototype.copy=function(){var a=new this.constructor;return this.cloneProtected(a),a},mi.prototype.clear=function(){this.Tc=[],this.kb.clear(),this.Vf.clear(),this.undoManager.clear()},mi.prototype.toString=function(a){if(a===void 0&&(a=0),1<a)return this.np();var y=(this.name!==""?this.name:"")+" Model";if(0<a){y+=`
|
|
node data:`,a=this.nodeDataArray;for(var x=a.length,E=0;E<x;E++){var b=a[E];y+=" "+this.wa(b)+":"+Ni(b)}}return y},mi.prototype.xA=function(a){a.change!==fa&&Gt("Model.toIncrementalData argument is not a Transaction ChangedEvent:"+a.toString());var y=a.object;return a.isTransactionFinished&&y instanceof To?(xS(this,y),a=this.Qv(y,a.propertyName==="FinishedUndo"),this.vh=null,a):null},mi.prototype.Qv=function(a,y){var x=this,E=!1,b=new qe,z=new qe,tt=new qe,rt=this.vh;a.changes.each(function(ft){ft.model===x&&(ft.modelChange==="nodeDataArray"?ft.change===Po?b.add(ft.newValue):ft.change===Eo&&tt.add(ft.oldValue):x.lb(ft.object)?z.add(ft.object):ft.change!==no||x.modelData!==ft.object&&ft.propertyName!=="modelData"?ft.object!==null&&(rt&&rt.contains(ft.object)?rt.get(ft.object).each(function(mt){x.lb(mt)&&z.add(mt)}):ft.object instanceof mi||x.ri()&&x.Jc(ft.object)||wS(x,ft.object).each(function(mt){z.add(mt)})):E=!0)});var ot=this.il;ot.clear(),b.each(function(ft){ot.add(x.wa(ft)),y||z.add(ft)});var st=this.kl;st.clear(),tt.each(function(ft){st.add(x.wa(ft)),y&&z.add(ft)}),a=x.cloneDeep(z.Fa());var ut=null;return E&&(ut===null&&(ut={}),ut.modelData=this.cloneDeep(this.modelData)),0<ot.count&&(ut===null&&(ut={}),y?ut.removedNodeKeys=ot.Fa():ut.insertedNodeKeys=ot.Fa()),0<a.length&&(ut===null&&(ut={}),ut.modifiedNodeData=a),0<st.count&&(ut===null&&(ut={}),y?ut.insertedNodeKeys=st.Fa():ut.removedNodeKeys=st.Fa()),st.clear(),ot.clear(),ut},mi.prototype.cloneDeep=function(a){return Gf(this,a,!0)};function Gf(a,y,x,E,b,z){function tt(ft,mt){rt?(ft.__gohashid===void 0&&z.push(ft),E.set(ft,mt)):(ft=Br++,E.set(ft,mt),b.set(ft,y))}if(!De(y))return y;z||(z=[]);var rt=Object.isExtensible(y);if(E||(E=new Me),rt){var ot=E.get(y);if(ot)return ot}else for(b||(b=new Me),ot=b.iterator;ot.next();){var st=ot.key;if(ot.value===y&&(st=E.get(st)))return st}if(Array.isArray(y)){ot=[],tt(y,ot);for(var ut=0;ut<y.length;ut++)ot.push(Gf(a,y[ut],!1,E,b,z))}else if(y instanceof At||y instanceof Ke||y instanceof Ee||y instanceof Ji||y instanceof li)ot=y.copy(),tt(y,ot);else{if(y instanceof Wr||y instanceof xn||y instanceof Ue)return y;if(y instanceof Xe)ot=new Xe().addAll(Gf(a,y.Fa(),!1,E,b,z)),tt(y,ot);else if(y instanceof qe)ot=new qe().addAll(Gf(a,y.Fa(),!1,E,b,z)),tt(y,ot);else if(y instanceof Me)ot=new Me().addAll(Gf(a,y.Fa(),!1,E,b,z)),tt(y,ot);else if(y instanceof Date)ot=new Date(y.getTime()),tt(y,ot);else if(y instanceof RegExp)ot=new RegExp(y),tt(y,ot),ot.lastIndex=y.lastIndex;else if(typeof y.copy=="function")ot=y.copy(),tt(y,ot);else for(ut in ot={},tt(y,ot),y)ut!=="__gohashid"&&(ot[ut]=Gf(a,y[ut],!1,E,b,z))}return x&&z.forEach(function(ft){delete ft.__gohashid}),ot}Pt=mi.prototype,Pt.quote=function(a){return JSON.stringify(a).replace(/[\u007F-\uFFFF]/g,function(y){return"\\u"+("0000"+y.charCodeAt(0).toString(16)).substr(-4)})},Pt.rm=function(){var a="";return this.name!==""&&(a+=`,
|
|
"name": `+this.quote(this.name)),this.dataFormat!==""&&(a+=`,
|
|
"dataFormat": `+this.quote(this.dataFormat)),this.isReadOnly&&(a+=`,
|
|
"isReadOnly": `+this.isReadOnly),this.nodeKeyProperty!=="key"&&typeof this.nodeKeyProperty=="string"&&(a+=`,
|
|
"nodeKeyProperty": `+this.quote(this.nodeKeyProperty)),this.copiesArrays&&(a+=`,
|
|
"copiesArrays": true`),this.copiesArrayObjects&&(a+=`,
|
|
"copiesArrayObjects": true`),this.copiesKey||(a+=`,
|
|
"copiesKey": false`),this.nodeCategoryProperty!=="category"&&typeof this.nodeCategoryProperty=="string"&&(a+=`,
|
|
"nodeCategoryProperty": `+this.quote(this.nodeCategoryProperty)),a},Pt.gp=function(a){a.name&&(this.name=a.name),a.dataFormat&&(this.dataFormat=a.dataFormat),a.isReadOnly&&(this.isReadOnly=!0),a.nodeKeyProperty&&(this.nodeKeyProperty=a.nodeKeyProperty),a.copiesArrays&&(this.copiesArrays=!0),a.copiesArrayObjects&&(this.copiesArrayObjects=!0),a.copiesKey===!1&&(this.copiesKey=!1),a.nodeCategoryProperty&&(this.nodeCategoryProperty=a.nodeCategoryProperty)};function SS(a,y){y=y.modelData,De(y)&&(a.dm(y),a.modelData=y)}Pt.Rv=function(){var a=this.modelData,y=!1,x;for(x in a)if(!PS(x,a[x])){y=!0;break}return a="",y&&(a=`,
|
|
"modelData": `+uy(this,this.modelData)),a+`,
|
|
"nodeDataArray": `+ld(this,this.nodeDataArray,!0)},Pt.kv=function(a){SS(this,a),a=a.nodeDataArray,kn(a)&&(this.dm(a),this.nodeDataArray=a)};function xS(a,y){function x(b,z){if((z=z.part)&&(z=z.data,b!==z)){var tt=E.get(b);tt===null?(tt=new qe,tt.add(z),E.add(b,tt)):tt.add(z)}}var E=a.vh;E===null&&(E=new Me,y.changes.each(function(b){if(b.diagram!==null){var z=b.change;z===no?(b=b.object.panel)&&(z=b.data)&&x(z,b):(z===Po||z===Eo)&&(b=b.object,(z=b.itemArray)&&x(z,b))}}),a.vh=E)}function wS(a,y){for(var x=new qe,E=0;E<a.nodeDataArray.length;E++){var b=a.nodeDataArray[E];s0(a,y,b,b,x)}return x}function s0(a,y,x,E,b){if(Array.isArray(x))for(var z=0;z<x.length;z++){var tt=x[z];if(tt===y)return b.add(E),!0;if(s0(a,y,tt,E,b))return!0}else if(De(x)&&Object.getPrototypeOf(x)===Object.prototype)for(z in x){if(tt=x[z],tt===y)return b.add(E),!0;if(s0(a,y,tt,E,b))return!0}return!1}Pt.Pv=function(a,y){var x=this,E=!1,b=new qe,z=new qe,tt=new qe,rt=this.vh;a.changes.each(function(ut){ut.model===x&&(ut.modelChange==="nodeDataArray"?ut.change===Po?b.add(ut.newValue):ut.change===Eo&&tt.add(ut.oldValue):x.lb(ut.object)?z.add(ut.object):ut.change!==no||x.modelData!==ut.object&&ut.propertyName!=="modelData"?ut.object!==null&&(rt&&rt.contains(ut.object)?rt.get(ut.object).each(function(ft){x.lb(ft)&&z.add(ft)}):ut.object instanceof mi||x.ri()&&x.Jc(ut.object)||wS(x,ut.object).each(function(ft){z.add(ft)})):E=!0)});var ot=this.il;ot.clear(),b.each(function(ut){ot.add(x.wa(ut)),y||z.add(ut)});var st=this.kl;return st.clear(),tt.each(function(ut){st.add(x.wa(ut)),y&&z.add(ut)}),a="",E&&(a+=`,
|
|
"modelData": `+uy(this,this.modelData)),0<ot.count&&(a+=(y?this.Yv:this.Wv)+ld(this,ot.Fa(),!0)),0<z.count&&(a+=this.jy+ld(this,z.Fa(),!0)),0<st.count&&(a+=(y?this.Wv:this.Yv)+ld(this,st.Fa(),!0)),st.clear(),ot.clear(),a},Pt.fp=function(a){(a.name!==void 0&&a.name!==this.name||a.dataFormat!==void 0&&a.dataFormat!==this.dataFormat||a.isReadOnly!==void 0&&a.isReadOnly!==this.isReadOnly||a.nodeKeyProperty!==void 0&&a.nodeKeyProperty!==this.nodeKeyProperty||a.copiesArrays!==void 0&&a.copiesArrays!==this.copiesArrays||a.copiesArrayObjects!==void 0&&a.copiesArrayObjects!==this.copiesArrayObjects||a.copiesKey!==void 0&&a.copiesKey!==this.copiesKey||a.nodeCategoryProperty!==void 0&&a.nodeCategoryProperty!==this.nodeCategoryProperty)&&Gt("applyIncrementalJson cannot change Model properties"),SS(this,a);var y=a.insertedNodeKeys,x=a.modifiedNodeData,E=new Me;if(Array.isArray(x))for(var b=0;b<x.length;b++){var z=x[b],tt=this.wa(z);tt!=null&&E.set(tt,z)}if(Array.isArray(y))for(b=y.length,z=0;z<b;z++){tt=y[z];var rt=this.hc(tt);rt===null&&(rt=(rt=E.get(tt))?rt:this.copyNodeData({}),this.km(rt,tt),this.xf(rt))}if(Array.isArray(x)){for(y=x.length,E=0;E<y;E++)if(b=x[E],z=this.wa(b),z=this.hc(z),z!==null){for(var ot in b)ot==="__gohashid"||ot===this.nodeKeyProperty||this.Wj()&&ot===this.nodeIsGroupProperty||this.setDataProperty(z,ot,b[ot]);this.lm(b,z)}}if(a=a.removedNodeKeys,Array.isArray(a))for(x=a.length,ot=0;ot<x;ot++)y=this.hc(a[ot]),y!==null&&this.cm(y)},Pt.$x=function(a,y){a.change!==fa&&Gt("Model.toIncrementalJson argument is not a Transaction ChangedEvent:"+a.toString());var x=a.object;return a.isTransactionFinished&&x instanceof To?(y===void 0&&(y=cp(this,this)),xS(this,x),a=this.Pv(x,a.propertyName==="FinishedUndo"),this.vh=null,y==="2"?'{ "incremental": 2'+a+"}":'{ "class": '+this.quote(y)+', "incremental": 1'+this.rm()+a+"}"):'{ "incremental": 0 }'},Pt.yA=function(a,y){return this.$x(a,y)},Pt.np=function(a){return a===void 0&&(a=cp(this,this)),'{ "class": '+this.quote(a)+this.rm()+this.Rv()+"}"},Pt.toJSON=function(a){return this.np(a)},Pt.Zw=function(a){var y=null;if(typeof a=="string")try{y=ln.JSON.parse(a)}catch(E){}else typeof a=="object"?y=a:Gt("Unable to modify a Model from: "+a);var x=y.incremental;typeof x!="number"&&Gt("Unable to apply non-incremental changes to Model: "+a),x!==0&&(this.Ea("applyIncrementalJson"),this.fp(y),this.eb("applyIncrementalJson"))},Pt.Ky=function(a){return this.Zw(a)},mi.constructGraphLinksModel=function(){return new mi},Pt=mi.prototype,Pt.dm=function(a){if(kn(a))for(var y=a.length,x=0;x<y;x++){var E=a[x];if(De(E)){var b=x;E=this.dm(E),Array.isArray(a)?a[b]=E:Gt("Cannot replace an object in an HTMLCollection or NodeList at "+b)}}else if(De(a)){for(y in a)if(x=a[y],De(x)&&(x=this.dm(x),a[y]=x,y==="points"&&Array.isArray(x))){for(b=x.length%2===0,E=0;E<x.length;E++)if(typeof x[E]!="number"){b=!1;break}if(b){for(b=new Xe,E=0;E<x.length/2;E++)b.add(new At(x[2*E],x[2*E+1]));b.freeze(),a[y]=b}}return Nx(a)}return a},Pt.sm=function(a){return a===void 0?"undefined":a===null?"null":a===!0?"true":a===!1?"false":typeof a=="string"?this.quote(a):typeof a=="number"?a===1/0?"9e9999":a===-1/0?"-9e9999":isNaN(a)?'{"class":"NaN"}':a.toString():a instanceof Date?'{"class":"Date", "value":"'+a.toJSON()+'"}':a instanceof Number?this.sm(a.valueOf()):kn(a)?ld(this,a):De(a)?uy(this,a):typeof a=="function"?"null":a.toString()};function ld(a,y,x){x===void 0&&(x=!1);var E=y.length;if(0>=E)return"[]";var b=new vi;b.add("["),x&&1<E&&b.add(`
|
|
`);for(var z=0;z<E;z++){var tt=y[z];tt!==void 0&&(0<z&&(b.add(","),x&&b.add(`
|
|
`)),b.add(a.sm(tt)))}return x&&1<E&&b.add(`
|
|
`),b.add("]"),b.toString()}function PS(a,y){return y===void 0||a==="__gohashid"||a[0]==="_"||typeof y=="function"}function as(a){return isNaN(a)?"NaN":a===1/0?"9e9999":a===-1/0?"-9e9999":a}function uy(a,y){var x=y;if(x instanceof At)y={class:"go.Point",x:as(x.x),y:as(x.y)};else if(x instanceof Ke)y={class:"go.Size",width:as(x.width),height:as(x.height)};else if(x instanceof Ee)y={class:"go.Rect",x:as(x.x),y:as(x.y),width:as(x.width),height:as(x.height)};else if(x instanceof Ji)y={class:"go.Margin",top:as(x.top),right:as(x.right),bottom:as(x.bottom),left:as(x.left)};else if(x instanceof li)x.sb()?y={class:"go.Spot",x:as(x.x),y:as(x.y),offsetX:as(x.offsetX),offsetY:as(x.offsetY)}:y={class:"go.Spot",enum:x.toString()};else if(x instanceof Wr){if(y={class:"go.Brush",type:x.type.name},x.type===xh?y.color=x.color:(x.type===Ju||x.type===ol)&&(y.start=x.start,y.end=x.end,x.type===ol&&(x.startRadius!==0&&(y.startRadius=as(x.startRadius)),isNaN(x.endRadius)||(y.endRadius=as(x.endRadius)))),x.colorStops!==null){var E={};for(x=x.colorStops.iterator;x.next();)E[x.key]=x.value;y.colorStops=E}}else x instanceof xn?(y={class:"go.Geometry",type:x.type.name},x.startX!==0&&(y.startX=as(x.startX)),x.startY!==0&&(y.startY=as(x.startY)),x.endX!==0&&(y.endX=as(x.endX)),x.endY!==0&&(y.endY=as(x.endY)),x.spot1.D(Sr)||(y.spot1=x.spot1),x.spot2.D(Hr)||(y.spot2=x.spot2),x.type===xn.o&&(y.path=xn.ia(x))):x instanceof Ue&&(y={class:"go.EnumValue",classType:cp(a,x.classType),name:x.name});E="{",x=!0;for(var b in y){var z=Io(y,b);if(!PS(b,z))if(x?x=!1:E+=",",E+=a.quote(b)+":",b==="points"&&z instanceof Xe){var tt="[";for(z=z.iterator;z.next();){var rt=z.value;1<tt.length&&(tt+=","),tt+=a.sm(rt.x),tt+=",",tt+=a.sm(rt.y)}tt+="]",E+=tt}else E+=a.sm(z)}return E+"}"}function ss(a){return typeof a=="number"?a:a==="NaN"?NaN:a==="9e9999"?1/0:a==="-9e9999"?-1/0:parseFloat(a)}function Nx(a){if(typeof a!="object")return a;var y=a.class||"";if(y==="NaN")return NaN;if(y==="Date")return new Date(a.value);if(y.indexOf("go.")!==0)return a;y=y.substr(3);var x=a;if(y==="Point")x=new At(ss(a.x),ss(a.y));else if(y==="Size")x=new Ke(ss(a.width),ss(a.height));else if(y==="Rect")x=new Ee(ss(a.x),ss(a.y),ss(a.width),ss(a.height));else if(y==="Margin")x=new Ji(ss(a.top),ss(a.right),ss(a.bottom),ss(a.left));else if(y==="Spot")typeof a.enum=="string"?x=Cr(a.enum):x=new li(ss(a.x),ss(a.y),ss(a.offsetX),ss(a.offsetY));else if(y==="Brush"){if(x=new Wr,x.type=Vn(Wr,a.type),typeof a.color=="string"&&(x.color=a.color),a.start instanceof li&&(x.start=a.start),a.end instanceof li&&(x.end=a.end),typeof a.startRadius=="number"&&(x.startRadius=ss(a.startRadius)),typeof a.endRadius=="number"&&(x.endRadius=ss(a.endRadius)),a=a.colorStops,De(a))for(var E in a)x.addColorStop(parseFloat(E),a[E])}else y==="Geometry"?(x=null,typeof a.path=="string"?x=xn.parse(a.path):x=new xn,x.type=Vn(xn,a.type),typeof a.startX=="number"&&(x.startX=ss(a.startX)),typeof a.startY=="number"&&(x.startY=ss(a.startY)),typeof a.endX=="number"&&(x.endX=ss(a.endX)),typeof a.endY=="number"&&(x.endY=ss(a.endY)),a.spot1 instanceof li&&(x.spot1=a.spot1),a.spot2 instanceof li&&(x.spot2=a.spot2)):y==="EnumValue"&&(E=a.classType,E.indexOf("go.")===0&&(E=E.substr(3)),E=dy(E),typeof E=="function"&&(x=Vn(E,a.name)));return x}Pt.Pe=function(a){return this.Lt.add(a),this},Pt.ik=function(a){this.Lt.remove(a)},Pt.ds=function(a){this.skipsUndoManager||this.undoManager.Tu(a);for(var y=this.Lt,x=y.length,E=0;E<x;E++)y.M(E)(a)},Pt.cb=function(a,y,x,E,b,z,tt){_o(this,"",a,y,x,E,b,z,tt)},Pt.g=function(a,y,x,E,b){_o(this,"",no,a,this,y,x,E,b)},Pt.Fs=function(a,y,x,E,b,z){_o(this,"",no,y,a,x,E,b,z)};function _o(a,y,x,E,b,z,tt,rt,ot){rt===void 0&&(rt=null),ot===void 0&&(ot=null);var st=new ao;st.model=a,st.change=x,st.modelChange=y,st.propertyName=E,st.object=b,st.oldValue=z,st.oldParam=rt,st.newValue=tt,st.newParam=ot,a.ds(st)}mi.prototype.changeState=function(a,y){if(a!==null&&a.model===this)if(a.change===no){var x=a.object,E=a.propertyName,b=a.I(y);E===this.nodeKeyProperty&&this.lb(x)&&(y=a.I(!y),y!==void 0&&this.kb.remove(y),b!==void 0&&this.kb.add(b,x)),fo(x,E,b)}else a.change===Po?(x=a.newParam,a.modelChange==="nodeDataArray"?(a=a.newValue,De(a)&&typeof x=="number"&&(E=this.wa(a),y?(this.Tc[x]===a&&ei(this.Tc,x),E!==void 0&&this.kb.remove(E)):(this.Tc[x]!==a&&Fn(this.Tc,x,a),E!==void 0&&this.kb.add(E,a)))):a.modelChange===""?((E=a.object)&&!kn(E)&&a.propertyName&&(E=Io(a.object,a.propertyName)),kn(E)&&typeof x=="number"&&(a=a.newValue,y?ei(E,x):Fn(E,x,a))):Gt("unknown ChangedEvent.Insert modelChange: "+a.toString())):a.change===Eo?(x=a.oldParam,a.modelChange==="nodeDataArray"?(a=a.oldValue,De(a)&&typeof x=="number"&&(E=this.wa(a),y?(this.Tc[x]!==a&&Fn(this.Tc,x,a),E!==void 0&&this.kb.add(E,a)):(this.Tc[x]===a&&ei(this.Tc,x),E!==void 0&&this.kb.remove(E)))):a.modelChange===""?((E=a.object)&&!kn(E)&&a.propertyName&&(E=Io(a.object,a.propertyName)),kn(E)&&typeof x=="number"&&(a=a.oldValue,y?Fn(E,x,a):ei(E,x))):Gt("unknown ChangedEvent.Remove modelChange: "+a.toString())):a.change!==fa&&Gt("unknown ChangedEvent: "+a.toString())},mi.prototype.Ea=function(a){return this.undoManager.Ea(a)},mi.prototype.eb=function(a){return this.undoManager.eb(a)},mi.prototype.Kf=function(){return this.undoManager.Kf()},mi.prototype.commit=function(a,y){y===void 0&&(y="");var x=this.skipsUndoManager;y===null&&(this.skipsUndoManager=!0,y=""),this.undoManager.Ea(y);var E=!1;try{a(this),E=!0}finally{E?this.undoManager.eb(y):this.undoManager.Kf(),this.skipsUndoManager=x}},Pt=mi.prototype,Pt.La=function(a,y){y===void 0&&(y=""),_o(this,"SourceChanged",fa,y,a,null,null)},Pt.wa=function(a){if(a!==null){var y=this.Th;if(y!==""&&(y=Io(a,y),y!==void 0)){if(ud(y))return y;Gt("Key value for node data "+a+" is not a number or a string: "+y)}}},Pt.km=function(a,y){if(a!==null){var x=this.Th;if(x!=="")if(this.lb(a)){var E=Io(a,x);E!==y&&this.hc(y)===null&&(fo(a,x,y),E!==void 0&&this.kb.remove(E),this.kb.add(y,a),_o(this,"nodeKey",no,x,a,E,y),typeof x=="string"&&this.La(a,x),this.jp(E,y))}else fo(a,x,y)}};function ud(a){return typeof a=="number"||typeof a=="string"}Pt.lb=function(a){var y=this.wa(a);return y===void 0?!1:this.kb.I(y)===a},Pt.hc=function(a){return a===null&&Gt("Model.findNodeDataForKey:key must not be null"),a!==void 0&&ud(a)?this.kb.I(a):null},Pt.$u=function(a){if(a!==null){var y=this.Th;if(y!==""){var x=this.wa(a);if(x===void 0||this.kb.contains(x)){var E=this.bl;if(E!==null&&(x=E(this,a),x!=null&&!this.kb.contains(x))){fo(a,y,x);return}if(typeof x=="string"){for(E=2;this.kb.contains(x+E);)E++;fo(a,y,x+E)}else if(x===void 0||typeof x=="number"){for(x=-this.kb.count-1;this.kb.contains(x);)x--;fo(a,y,x)}}}}},Pt.xf=function(a){a!==null&&(ir(a),this.lb(a)||CS(this,a,!0))};function CS(a,y,x){var E=a.wa(y);(E===void 0||a.kb.I(E)!==y)&&(a.$u(y),E=a.wa(y),E===void 0&&Gt("Model.makeNodeDataKeyUnique failed on "+y+". Data not added to Model."),a.kb.add(E,y),E=null,x&&(E=a.Tc.length,Fn(a.Tc,E,y)),_o(a,"nodeDataArray",Po,"nodeDataArray",a,null,y,null,E),a.fm(y),a.em(y))}Pt.Fy=function(a){if(kn(a))for(var y=a.length,x=0;x<y;x++)this.xf(a[x]);else for(a=a.iterator;a.next();)this.xf(a.value)},Pt.cm=function(a){a!==null&&ES(this,a,!0)};function ES(a,y,x){var E=a.wa(y);if(E!==void 0&&a.kb.remove(E),E=null,x){t:if(x=a.Tc,Array.isArray(x))E=x.indexOf(y);else{E=x.length;for(var b=0;b<E;b++)if(x[b]===y){E=b;break t}E=-1}if(0>E)return;ei(a.Tc,E)}_o(a,"nodeDataArray",Eo,"nodeDataArray",a,y,null,E,null),a.qp(y)}Pt.nA=function(a){if(kn(a))for(var y=a.length,x=0;x<y;x++)this.cm(a[x]);else for(a=a.iterator;a.next();)this.cm(a.value)},Pt.$z=function(a){if(a!==this.nodeDataArray&&kn(a)){var y=this.kl;y.clear(),y.addAll(this.kb.iteratorKeys);var x=this.il;x.clear();for(var E=a.length,b=0;b<E;b++){var z=a[b],tt=this.wa(z);if(tt!==void 0){x.add(tt);var rt=this.hc(tt);rt!==z&&(rt!==null?(this.Do(rt,z),this.lm(z,rt)):(z=this.cloneDeep(z),this.km(z,tt),this.xf(z)))}else tt=this.cloneDeep(z),this.xf(tt),x.add(this.wa(tt))}for(a=y.iterator;a.next();)E=a.value,x.contains(E)||(E=this.hc(E))&&this.cm(E);y.clear(),x.clear()}},Pt.jp=function(a,y){y!==void 0&&(a=dp(this,a),a instanceof qe&&this.Vf.add(y,a))},Pt.Lv=function(){},Pt.fm=function(){},Pt.em=function(){},Pt.qp=function(){};function _l(a,y,x){if(y!==void 0){var E=a.Vf.I(y);E===null&&(E=new qe,a.Vf.add(y,E)),E.add(x)}}function Ql(a,y,x){if(y!==void 0){var E=a.Vf.I(y);E instanceof qe&&(x==null?a.Vf.remove(y):(E.remove(x),E.count===0&&a.Vf.remove(y)))}}function dp(a,y){return y===void 0?null:(a=a.Vf.I(y),a instanceof qe?a:null)}Pt.Qy=function(a){a===void 0?this.Vf.clear():this.Vf.remove(a)},mi.prototype.copyNodeData=function(a){if(a===null)return null;var y=this.Bk;return a=y!==null?y(a,this):l0(this,a,!0),De(a)&&xi(a),a};function l0(a,y,x){if(a.copiesArrays&&Array.isArray(y)){var E=[];for(x=0;x<y.length;x++){var b=l0(a,y[x],a.copiesArrayObjects);E.push(b)}return xi(E),E}if(x&&De(y)){x=(x=y.constructor)?new x:{},b=a.copiesKey||typeof a.nodeKeyProperty!="string"?null:a.nodeKeyProperty;for(E in y)if(E==="__gohashid")x.__gohashid=void 0;else if(E===b)x[b]=void 0;else{var z=Io(y,E),tt=cp(a,z);tt==="GraphObject"||tt==="Diagram"||tt==="Layer"||tt==="RowColumnDefinition"||tt==="AnimationManager"||tt==="Tool"||tt==="CommandHandler"||tt==="Layout"||tt==="InputEvent"||tt==="DiagramEvent"||z instanceof mi||z instanceof uo||z instanceof To||z instanceof ao||(z=l0(a,z,!1)),fo(x,E,z)}return xi(x),x}return y instanceof At||y instanceof Ke||y instanceof Ee||y instanceof li||y instanceof Ji?y.copy():y}mi.prototype.setDataProperty=function(a,y,x){if(this.lb(a)){if(y===this.nodeKeyProperty){this.km(a,x);return}if(y===this.nodeCategoryProperty){this.jm(a,x);return}}else!kS&&a instanceof he&&(kS=!0,zn('Model.setDataProperty is modifying a GraphObject, "'+a.toString()+'"'),zn(" Is that really your intent?"));var E=Io(a,y);E!==x&&(fo(a,y,x),this.Fs(a,y,E,x))},Pt=mi.prototype,Pt.set=function(a,y,x){this.setDataProperty(a,y,x)},Pt.Do=function(a,y){if(y){var x=this.lb(a),E;for(E in y)E==="__gohashid"||x&&E===this.nodeKeyProperty||this.setDataProperty(a,E,y[E])}},Pt.Ay=function(a,y){this.ts(a,-1,y)},Pt.ts=function(a,y,x){0>y&&(y=a.length),Fn(a,y,x),_o(this,"",Po,"",a,null,x,null,y)},Pt.ov=function(a,y){y===void 0&&(y=-1),a===this.Tc&&Gt("Model.removeArrayItem should not be called on the Model.nodeDataArray"),y===-1&&(y=a.length-1);var x=a[y];ei(a,y),_o(this,"",Eo,"",a,x,null,y,null)},Pt.Ro=function(a){if(a===null)return"";var y=this.lj;if(y===""||(y=Io(a,y),y===void 0))return"";if(typeof y=="string")return y;Gt("getCategoryForNodeData found a non-string category for "+a+": "+y)},Pt.jm=function(a,y){if(a!==null){var x=this.lj;if(x!=="")if(this.lb(a)){var E=Io(a,x);E===void 0&&(E=""),E!==y&&(fo(a,x,y),_o(this,"nodeCategory",no,x,a,E,y))}else fo(a,x,y)}},Pt.lm=function(a,y){this.jm(y,this.Ro(a))},Pt.Tl=function(){return!1},Pt.Wj=function(){return!1},Pt.ri=function(){return!1},Pt.xs=function(){return!1},Pt.Xj=function(){return!1};function hy(){return new mi}function cp(a,y){if(typeof y=="function"){if(y.className)return y.className;if(y.name)return y.name}else if(typeof y=="object"&&y!==null&&y.constructor)return cp(a,y.constructor);return typeof y}function dy(a){return Ol[a]?Ol[a]:ln.go!==void 0&&ln.go[a]?ln.go[a]:null}function Io(a,y){if(!a||!y)return null;try{if(typeof y=="function")var x=y(a);else typeof a.getAttribute=="function"?(x=a.getAttribute(y),x===null&&(x=void 0)):x=a[y]}catch(E){}return x}function fo(a,y,x){if(a&&y)try{typeof y=="function"?y(a,x):typeof a.setAttribute=="function"?a.setAttribute(y,x):a[y]=x}catch(E){}}ge.Object.defineProperties(mi.prototype,{name:{get:function(){return this.xa},set:function(a){var y=this.xa;y!==a&&(this.xa=a,this.g("name",y,a))}},dataFormat:{get:function(){return this.Sm},set:function(a){var y=this.Sm;y!==a&&(this.Sm=a,this.g("dataFormat",y,a))}},isReadOnly:{get:function(){return this.Gg},set:function(a){var y=this.Gg;y!==a&&(this.Gg=a,this.g("isReadOnly",y,a))}},modelData:{get:function(){return this.j},set:function(a){var y=this.j;y!==a&&(this.j=a,this.g("modelData",y,a),this.La(a))}},undoManager:{get:function(){return this.o},set:function(a){var y=this.o;y!==a&&(y!==null&&y.Rx(this),this.o=a,a!==null&&a.Xw(this))}},skipsUndoManager:{get:function(){return this.Wg},set:function(a){this.Wg=a}},nodeKeyProperty:{get:function(){return this.Th},set:function(a){var y=this.Th;y!==a&&(a===""&&Gt("Model.nodeKeyProperty may not be the empty string"),0<this.kb.count&&Gt("Cannot set Model.nodeKeyProperty when there is existing node data"),this.Th=a,this.g("nodeKeyProperty",y,a))}},makeUniqueKeyFunction:{get:function(){return this.bl},set:function(a){var y=this.bl;y!==a&&(this.bl=a,this.g("makeUniqueKeyFunction",y,a))}},nodeDataArray:{get:function(){return this.Tc},set:function(a){var y=this.Tc;if(y!==a){this.kb.clear(),this.Lv();for(var x=a.length,E=0;E<x;E++){var b=a[E];De(b)||Gt("Model.nodeDataArray must only contain Objects, not: "+b),ir(b)}for(this.Tc=a,E=new Xe,b=0;b<x;b++){var z=a[b],tt=this.wa(z);tt===void 0||this.kb.I(tt)!==null?E.add(z):this.kb.add(tt,z)}for(E=E.iterator;E.next();)b=E.value,this.$u(b),z=this.wa(b),z!==void 0&&this.kb.add(z,b);for(_o(this,"nodeDataArray",no,"nodeDataArray",this,y,a),y=0;y<x;y++)E=a[y],this.fm(E),this.em(E);Array.isArray(a)||(this.isReadOnly=!0)}}},copyNodeDataFunction:{get:function(){return this.Bk},set:function(a){var y=this.Bk;y!==a&&(this.Bk=a,this.g("copyNodeDataFunction",y,a))}},copiesArrays:{get:function(){return this.Km},set:function(a){var y=this.Km;y!==a&&(this.Km=a,this.g("copiesArrays",y,a))}},copiesArrayObjects:{get:function(){return this.Jm},set:function(a){var y=this.Jm;y!==a&&(this.Jm=a,this.g("copiesArrayObjects",y,a))}},copiesKey:{get:function(){return this.Mm},set:function(a){var y=this.Mm;y!==a&&(this.Mm=a,this.g("copiesKey",y,a))}},afterCopyFunction:{get:function(){return this.xm},set:function(a){var y=this.xm;y!==a&&(this.xm=a,this.g("afterCopyFunction",y,a))}},nodeCategoryProperty:{get:function(){return this.lj},set:function(a){var y=this.lj;y!==a&&(this.lj=a,this.g("nodeCategoryProperty",y,a))}},type:{get:function(){return"Model"}}}),mi.prototype.setCategoryForNodeData=mi.prototype.jm,mi.prototype.getCategoryForNodeData=mi.prototype.Ro,mi.prototype.removeArrayItem=mi.prototype.ov,mi.prototype.insertArrayItem=mi.prototype.ts,mi.prototype.addArrayItem=mi.prototype.Ay,mi.prototype.assignAllDataProperties=mi.prototype.Do,mi.prototype.set=mi.prototype.set,mi.prototype.clearUnresolvedReferences=mi.prototype.Qy,mi.prototype.mergeNodeDataArray=mi.prototype.$z,mi.prototype.removeNodeDataCollection=mi.prototype.nA,mi.prototype.removeNodeData=mi.prototype.cm,mi.prototype.addNodeDataCollection=mi.prototype.Fy,mi.prototype.addNodeData=mi.prototype.xf,mi.prototype.makeNodeDataKeyUnique=mi.prototype.$u,mi.prototype.findNodeDataForKey=mi.prototype.hc,mi.prototype.containsNodeData=mi.prototype.lb,mi.prototype.setKeyForNodeData=mi.prototype.km,mi.prototype.getKeyForNodeData=mi.prototype.wa,mi.prototype.updateTargetBindings=mi.prototype.La,mi.prototype.commit=mi.prototype.commit,mi.prototype.rollbackTransaction=mi.prototype.Kf,mi.prototype.commitTransaction=mi.prototype.eb,mi.prototype.startTransaction=mi.prototype.Ea,mi.prototype.raiseDataChanged=mi.prototype.Fs,mi.prototype.raiseChanged=mi.prototype.g,mi.prototype.raiseChangedEvent=mi.prototype.cb,mi.prototype.removeChangedListener=mi.prototype.ik,mi.prototype.addChangedListener=mi.prototype.Pe,mi.prototype.writeJsonValue=mi.prototype.sm,mi.prototype.replaceJsonObjects=mi.prototype.dm,mi.prototype.applyIncrementalJSON=mi.prototype.Ky,mi.prototype.applyIncrementalJson=mi.prototype.Zw,mi.prototype.toJSON=mi.prototype.toJSON,mi.prototype.toJson=mi.prototype.np,mi.prototype.toIncrementalJSON=mi.prototype.yA,mi.prototype.toIncrementalJson=mi.prototype.$x,mi.prototype.toIncrementalData=mi.prototype.xA,mi.prototype.clear=mi.prototype.clear;var kS=!1,Ol={};mi.className="Model",mi.fromJSON=mi.fromJson=function(a,y){y===void 0&&(y=null);var x=null;if(typeof a=="string")try{x=ln.JSON.parse(a)}catch(z){}else typeof a=="object"?x=a:Gt("Unable to construct a Model from: "+a);if(y===null){a=null;var E=x.class;if(typeof E=="string")try{var b=null;E.indexOf("go.")===0?(E=E.substr(3),b=dy(E)):(b=dy(E),b===null&&(b=ln[E])),typeof b=="function"&&(a=new b)}catch(z){}a===null||a instanceof mi?y=a:Gt("Unable to construct a Model of declared class: "+x.class)}return y===null&&(y=mi.constructGraphLinksModel()),y.gp(x),y.kv(x),y},mi.safePropertyValue=Io,mi.safePropertySet=fo,Ol.Brush=Wr,Ol.ChangedEvent=ao,Ol.Geometry=xn,Ol.Margin=Ji,Ol.Panel=mn,Ol.Point=At,Ol.Rect=Ee,Ol.Size=Ke,Ol.Spot=li,Ol.Transaction=To,Ol.UndoManager=uo;function Ko(a,y,x,E){xi(this),this._isFrozen=!1,a===void 0&&(a=""),y===void 0&&(y=a),x===void 0&&(x=null),this.j=-1,this.xd=null,this.xl=a,this.wl=this.to=0,this.Cr=null,this.wn=!1,this.sl=y,this.Im=x,E===void 0?(this.el=bS,this.wk=null):(this.el=fp,this.wk=E),this.st=new qe}Ko.prototype.copy=function(){var a=new Ko;return a.xl=this.xl,a.to=this.to,a.wl=this.wl,a.Cr=this.Cr,a.wn=this.wn,a.sl=this.sl,a.Im=this.Im,a.el=this.el,a.wk=this.wk,a},Pt=Ko.prototype,Pt.qb=function(a){a.classType===Ko&&(this.mode=a)},Pt.toString=function(){return"Binding("+this.targetProperty+":"+this.sourceProperty+(this.Ai!==-1?" "+this.Ai:"")+" "+this.mode.name+")"},Pt.freeze=function(){return this._isFrozen=!0,this},Pt.ka=function(){return this._isFrozen=!1,this},Pt.Kx=function(a){return a===void 0&&(a=null),this.mode=fp,this.backConverter=a,this},Pt.cp=function(a){return a===void 0&&(a=""),this.sourceName=a,this.isToModel=!1,this},Pt.dA=function(){return this.sourceName=null,this.isToModel=!0,this};function LS(a,y,x){return a=a.sourceName,a===null||a===""?y:a==="/"?x.part:a==="."?x:a===".."?x.panel:y.fb(a)}Pt.Mv=function(a,y,x){var E=this.sl;if(x===void 0||E===""||E===x){x=this.xl;var b=this.Im;if(b===null&&x==="")zn("Binding error: target property is the empty string: "+this.toString());else{var z=y;if(E!==""&&(z=Io(y,E)),z!==void 0)if(b===null)x!==""&&fo(a,x,z);else try{if(x!==""){var tt=b(z,a);fo(a,x,tt)}else b(z,a)}catch(rt){}}}},Pt.sp=function(a,y,x,E){if(this.el===fp){var b=this.xl;if(x===void 0||b===x){x=this.sl;var z=this.wk,tt=a;if(b!==""&&(tt=Io(a,b)),tt!==void 0&&!this.st.contains(a))try{this.st.add(a);var rt=E!==null?E.diagram:null,ot=rt!==null?rt.model:null;if(z===null){if(x!=="")ot!==null?ot.setDataProperty(y,x,tt):fo(y,x,tt);else if(ot!==null&&E!==null&&0<=E.itemIndex&&E.panel!==null&&Array.isArray(E.panel.itemArray)){var st=E.itemIndex,ut=E.panel.itemArray;ot.ov(ut,st),ot.ts(ut,st,tt)}}else try{if(x!==""){var ft=z(tt,y,ot);ot!==null?ot.setDataProperty(y,x,ft):fo(y,x,ft)}else{var mt=z(tt,y,ot);if(mt!==void 0&&ot!==null&&E!==null&&0<=E.itemIndex&&E.panel!==null&&Array.isArray(E.panel.itemArray)){var yt=E.itemIndex,wt=E.panel.itemArray;ot.ov(wt,yt),ot.ts(wt,yt,mt)}}}catch(bt){}}finally{this.st.remove(a)}}}},ge.Object.defineProperties(Ko.prototype,{Ai:{get:function(){return this.j},set:function(a){this._isFrozen&&fe(this),this.j=a}},targetProperty:{get:function(){return this.xl},set:function(a){this._isFrozen&&fe(this),this.xl=a}},sourceName:{get:function(){return this.Cr},set:function(a){this._isFrozen&&fe(this),this.Cr=a,a!==null&&(this.wn=!1)}},isToModel:{get:function(){return this.wn},set:function(a){this._isFrozen&&fe(this),this.wn=a}},sourceProperty:{get:function(){return this.sl},set:function(a){this._isFrozen&&fe(this),this.sl=a}},converter:{get:function(){return this.Im},set:function(a){this._isFrozen&&fe(this),this.Im=a}},backConverter:{get:function(){return this.wk},set:function(a){this._isFrozen&&fe(this),this.wk=a}},mode:{get:function(){return this.el},set:function(a){this._isFrozen&&fe(this),this.el=a}}}),Ko.prototype.updateSource=Ko.prototype.sp,Ko.prototype.updateTarget=Ko.prototype.Mv,Ko.prototype.ofModel=Ko.prototype.dA,Ko.prototype.ofObject=Ko.prototype.cp,Ko.prototype.makeTwoWay=Ko.prototype.Kx;var Dx="Binding",bS=new Ue(Ko,"OneWay",1),fp=new Ue(Ko,"TwoWay",2);Ko.className="Binding",Ko.parseEnum=function(a,y){return function(x){return x=Vn(a,x),x===null?y:x}},Ko.toString=Ni,Ko.OneWay=bS,Ko.TwoWay=fp;function Lr(a,y,x){mi.call(this),this.Vv=`,
|
|
"insertedLinkKeys": `,this.iy=`,
|
|
"modifiedLinkData": `,this.Xv=`,
|
|
"removedLinkKeys": `,this.md=[],this.$f=new qe,this.wb=new Me,this.Jh="",this.Ri=this.Ak=this.cl=null,this.lf="from",this.mf="to",this.fj=this.ej="",this.dj="category",this.je="",this.jl="isGroup",this.Je="group",this.Lm=!1,y!==void 0&&(this.linkDataArray=y),a!==void 0&&(kn(a)?this.nodeDataArray=a:x=a),x&&(Object.assign(this,x),a=x.Changed)&&(delete this.Changed,this.Pe(a))}we(Lr,mi),Lr.constructGraphLinksModel=mi.constructGraphLinksModel,Lr.prototype.cloneProtected=function(a){mi.prototype.cloneProtected.call(this,a),a.Jh=this.Jh,a.cl=this.cl,a.Ak=this.Ak,a.lf=this.lf,a.mf=this.mf,a.ej=this.ej,a.fj=this.fj,a.dj=this.dj,a.je=this.je,a.jl=this.jl,a.Je=this.Je,a.Lm=this.Lm},Pt=Lr.prototype,Pt.clear=function(){mi.prototype.clear.call(this),this.md=[],this.wb.clear(),this.$f.clear()},Pt.toString=function(a){if(a===void 0&&(a=0),2<=a)return this.np();var y=(this.name!==""?this.name:"")+" GraphLinksModel";if(0<a){y+=`
|
|
node data:`,a=this.nodeDataArray;var x=a.length,E;for(E=0;E<x;E++){var b=a[E];y+=" "+this.wa(b)+":"+Ni(b)}for(y+=`
|
|
link data:`,a=this.linkDataArray,x=a.length,E=0;E<x;E++)b=a[E],y+=" "+Xs(this,b,!0)+"-->"+Xs(this,b,!1)}return y},Pt.Qv=function(a,y){this.linkKeyProperty===""&&Gt("GraphLinksModel.linkKeyProperty must not be an empty string for .toIncrementalData() to succeed.");var x=mi.prototype.Qv.call(this,a,y),E=this,b=new qe,z=new qe,tt=new qe,rt=this.vh;a.changes.each(function(ut){ut.model===E&&(ut.modelChange==="linkDataArray"?ut.change===Po?b.add(ut.newValue):ut.change===Eo&&tt.add(ut.oldValue):E.Jc(ut.object)?z.add(ut.object):ut.object!==null&&(ut.object!==null&&rt&&rt.contains(ut.object)?rt.get(ut.object).each(function(ft){E.Jc(ft)&&z.add(ft)}):ut.object instanceof mi||E.lb(ut.object)||MS(E,ut.object).each(function(ft){z.add(ft)})))});var ot=this.il;ot.clear(),b.each(function(ut){ot.add(E.Ac(ut)),y||z.add(ut)});var st=this.kl;return st.clear(),tt.each(function(ut){st.add(E.Ac(ut)),y&&z.add(ut)}),a=E.cloneDeep(z.Fa()),0<ot.count&&(x===null&&(x={}),y?x.removedLinkKeys=ot.Fa():x.insertedLinkKeys=ot.Fa()),0<a.length&&(x===null&&(x={}),x.modifiedLinkData=a),0<st.count&&(x===null&&(x={}),y?x.insertedLinkKeys=st.Fa():x.removedLinkKeys=st.Fa()),st.clear(),ot.clear(),x},Pt.rm=function(){var a=mi.prototype.rm.call(this),y="";return this.linkCategoryProperty!=="category"&&typeof this.linkCategoryProperty=="string"&&(y+=`,
|
|
"linkCategoryProperty": `+this.quote(this.linkCategoryProperty)),this.linkKeyProperty!==""&&typeof this.linkKeyProperty=="string"&&(y+=`,
|
|
"linkKeyProperty": `+this.quote(this.linkKeyProperty)),this.linkFromKeyProperty!=="from"&&typeof this.linkFromKeyProperty=="string"&&(y+=`,
|
|
"linkFromKeyProperty": `+this.quote(this.linkFromKeyProperty)),this.linkToKeyProperty!=="to"&&typeof this.linkToKeyProperty=="string"&&(y+=`,
|
|
"linkToKeyProperty": `+this.quote(this.linkToKeyProperty)),this.linkFromPortIdProperty!==""&&typeof this.linkFromPortIdProperty=="string"&&(y+=`,
|
|
"linkFromPortIdProperty": `+this.quote(this.linkFromPortIdProperty)),this.linkToPortIdProperty!==""&&typeof this.linkToPortIdProperty=="string"&&(y+=`,
|
|
"linkToPortIdProperty": `+this.quote(this.linkToPortIdProperty)),this.linkLabelKeysProperty!==""&&typeof this.linkLabelKeysProperty=="string"&&(y+=`,
|
|
"linkLabelKeysProperty": `+this.quote(this.linkLabelKeysProperty)),this.nodeIsGroupProperty!=="isGroup"&&typeof this.nodeIsGroupProperty=="string"&&(y+=`,
|
|
"nodeIsGroupProperty": `+this.quote(this.nodeIsGroupProperty)),this.nodeGroupKeyProperty!=="group"&&typeof this.nodeGroupKeyProperty=="string"&&(y+=`,
|
|
"nodeGroupKeyProperty": `+this.quote(this.nodeGroupKeyProperty)),a+y},Pt.gp=function(a){mi.prototype.gp.call(this,a),a.linkKeyProperty&&(this.linkKeyProperty=a.linkKeyProperty),a.linkFromKeyProperty&&(this.linkFromKeyProperty=a.linkFromKeyProperty),a.linkToKeyProperty&&(this.linkToKeyProperty=a.linkToKeyProperty),a.linkFromPortIdProperty&&(this.linkFromPortIdProperty=a.linkFromPortIdProperty),a.linkToPortIdProperty&&(this.linkToPortIdProperty=a.linkToPortIdProperty),a.linkCategoryProperty&&(this.linkCategoryProperty=a.linkCategoryProperty),a.linkLabelKeysProperty&&(this.linkLabelKeysProperty=a.linkLabelKeysProperty),a.nodeIsGroupProperty&&(this.nodeIsGroupProperty=a.nodeIsGroupProperty),a.nodeGroupKeyProperty&&(this.nodeGroupKeyProperty=a.nodeGroupKeyProperty)},Pt.Rv=function(){var a=mi.prototype.Rv.call(this),y=`,
|
|
"linkDataArray": `+ld(this,this.linkDataArray,!0);return a+y},Pt.kv=function(a){mi.prototype.kv.call(this,a),a=a.linkDataArray,Array.isArray(a)&&(this.dm(a),this.linkDataArray=a)};function MS(a,y){for(var x=new qe,E=0;E<a.linkDataArray.length;E++){var b=a.linkDataArray[E];s0(a,y,b,b,x)}return x}Pt.Pv=function(a,y){this.linkKeyProperty===""&&Gt("GraphLinksModel.linkKeyProperty must not be an empty string for .toIncrementalJson() to succeed.");var x=mi.prototype.Pv.call(this,a,y),E=this,b=new qe,z=new qe,tt=new qe,rt=this.vh;a.changes.each(function(ut){ut.model===E&&(ut.modelChange==="linkDataArray"?ut.change===Po?b.add(ut.newValue):ut.change===Eo&&tt.add(ut.oldValue):E.Jc(ut.object)?z.add(ut.object):ut.object!==null&&(ut.object!==null&&rt&&rt.contains(ut.object)?rt.get(ut.object).each(function(ft){E.Jc(ft)&&z.add(ft)}):ut.object instanceof mi||E.lb(ut.object)||MS(E,ut.object).each(function(ft){z.add(ft)})))});var ot=this.il;ot.clear(),b.each(function(ut){ot.add(E.Ac(ut)),y||z.add(ut)});var st=this.kl;return st.clear(),tt.each(function(ut){st.add(E.Ac(ut)),y&&z.add(ut)}),a=x,0<ot.count&&(a+=(y?this.Xv:this.Vv)+ld(this,ot.Fa(),!0)),0<z.count&&(a+=this.iy+ld(this,z.Fa(),!0)),0<st.count&&(a+=(y?this.Vv:this.Xv)+ld(this,st.Fa(),!0)),st.clear(),ot.clear(),a},Pt.fp=function(a){(a.linkCategoryProperty!==void 0&&a.linkCategoryProperty!==this.linkCategoryProperty||a.linkKeyProperty!==void 0&&a.linkKeyProperty!==this.linkKeyProperty||a.linkFromKeyProperty!==void 0&&a.linkFromKeyProperty!==this.linkFromKeyProperty||a.linkToKeyProperty!==void 0&&a.linkToKeyProperty!==this.linkToKeyProperty||a.linkFromPortIdProperty!==void 0&&a.linkFromPortIdProperty!==this.linkFromPortIdProperty||a.linkToPortIdProperty!==void 0&&a.linkToPortIdProperty!==this.linkToPortIdProperty||a.linkLabelKeysProperty!==void 0&&a.linkLabelKeysProperty!==this.linkLabelKeysProperty||a.nodeIsGroupProperty!==void 0&&a.nodeIsGroupProperty!==this.nodeIsGroupProperty||a.nodeGroupKeyProperty!==void 0&&a.nodeGroupKeyProperty!==this.nodeGroupKeyProperty)&&Gt("applyIncrementalJson cannot change Model properties"),mi.prototype.fp.call(this,a);var y=a.insertedLinkKeys;if(Array.isArray(y))for(var x=y.length,E=0;E<x;E++){var b=y[E],z=this.jh(b);z===null&&(z=this.Jo({}),this.Ks(z,b),this.fi(z))}if(y=a.modifiedLinkData,Array.isArray(y)){for(x=y.length,E=0;E<x;E++)if(b=y[E],z=this.Ac(b),z=this.jh(z),z!==null){for(var tt in b)tt!=="__gohashid"&&tt!==this.linkKeyProperty&&this.setDataProperty(z,tt,b[tt]);NS(this,b,z)}}if(a=a.removedLinkKeys,Array.isArray(a))for(tt=a.length,y=0;y<tt;y++)x=this.jh(a[y]),x!==null&&this.bm(x)},Lr.prototype.changeState=function(a,y){if(a!==null&&a.model===this){if(a.change===no){var x=a.object,E=a.propertyName;if(E===this.linkKeyProperty&&this.Jc(x)){var b=a.I(y);y=a.I(!y),y!==void 0&&this.wb.remove(y),b!==void 0&&this.wb.add(b,x),fo(x,E,b);return}}else if(a.change===Po){if(x=a.newParam,a.modelChange==="linkDataArray"){a=a.newValue,De(a)&&typeof x=="number"&&(E=this.Ac(a),y?(this.$f.remove(a),this.md[x]===a&&this.md.splice(x,1),E!==void 0&&this.wb.remove(E)):(this.$f.add(a),this.md[x]!==a&&this.md.splice(x,0,a),E!==void 0&&this.wb.add(E,a)));return}if(a.modelChange==="linkLabelKeys"){E=this.Ef(a.object),Array.isArray(E)&&typeof x=="number"&&(y?(x=E.indexOf(a.newValue),0<=x&&E.splice(x,1)):0>E.indexOf(a.newValue)&&E.splice(x,0,a.newValue));return}}else if(a.change===Eo){if(x=a.oldParam,a.modelChange==="linkDataArray"){a=a.oldValue,De(a)&&typeof x=="number"&&(E=this.Ac(a),y?(this.$f.add(a),this.md[x]!==a&&this.md.splice(x,0,a),E!==void 0&&this.wb.add(E,a)):(this.$f.remove(a),this.md[x]===a&&this.md.splice(x,1),E!==void 0&&this.wb.remove(E)));return}if(a.modelChange==="linkLabelKeys"){E=this.Ef(a.object),Array.isArray(E)&&typeof x=="number"&&(y?0>E.indexOf(a.newValue)&&E.splice(x,0,a.newValue):(x=E.indexOf(a.newValue),0<=x&&E.splice(x,1)));return}}mi.prototype.changeState.call(this,a,y)}},Pt=Lr.prototype,Pt.Vl=function(a){if(a!==void 0){var y=this.Ri;if(y!==null){var x=this.hc(a);x===null&&(x=this.copyNodeData(y),fo(x,this.nodeKeyProperty,a),this.xf(x))}return a}},Pt.yx=function(a){return Xs(this,a,!0)},Pt.wv=function(a,y){Hf(this,a,y,!0)},Pt.Bx=function(a){return Xs(this,a,!1)},Pt.Bv=function(a,y){Hf(this,a,y,!1)};function Xs(a,y,x){if(y!==null&&(a=x?a.lf:a.mf,a!==""&&(a=Io(y,a),a!==void 0))){if(ud(a))return a;Gt((x?"FromKey":"ToKey")+" value for link data "+y+" is not a number or a string: "+a)}}function Hf(a,y,x,E){if(x===null&&(x=void 0),y!==null){var b=E?a.lf:a.mf;if(b!=="")if(x=a.Vl(x),a.Jc(y)){var z=Io(y,b);z!==x&&(Ql(a,z,y),fo(y,b,x),a.hc(x)===null&&_l(a,x,y),_o(a,E?"linkFromKey":"linkToKey",no,b,y,z,x),typeof b=="string"&&a.La(y,b))}else fo(y,b,x)}}Pt.zx=function(a){return u0(this,a,!0)},Pt.xv=function(a,y){Kf(this,a,y,!0)},Pt.Cx=function(a){return u0(this,a,!1)},Pt.Cv=function(a,y){Kf(this,a,y,!1)};function u0(a,y,x){return y===null||(a=x?a.ej:a.fj,a==="")?"":(y=Io(y,a),y===void 0?"":y)}function Kf(a,y,x,E){if(y!==null){var b=E?a.ej:a.fj;if(b!=="")if(a.Jc(y)){var z=Io(y,b);z===void 0&&(z=""),z!==x&&(fo(y,b,x),_o(a,E?"linkFromPortId":"linkToPortId",no,b,y,z,x),typeof b=="string"&&a.La(y,b))}else fo(y,b,x)}}Pt.Ef=function(a){if(a===null)return h0;var y=this.je;return y===""?h0:(a=Io(a,y),a===void 0?h0:a)},Pt.Ls=function(a,y){if(a!==null){var x=this.je;if(x!=="")if(this.Jc(a)){var E=Io(a,x);if(E===void 0&&(E=h0),E!==y){if(Array.isArray(E))for(var b=E.length,z=0;z<b;z++)Ql(this,E[z],a);for(fo(a,x,y),b=y.length,z=0;z<b;z++){var tt=y[z];this.hc(tt)===null&&_l(this,tt,a)}_o(this,"linkLabelKeys",no,x,a,E,y),typeof x=="string"&&this.La(a,x)}}else fo(a,x,y)}},Pt.Bu=function(a,y){if(y!=null&&a!==null){var x=this.je;if(x!==""){var E=Io(a,x);if(E===void 0)x=[],x.push(y),this.Ls(a,x);else if(Array.isArray(E)){var b=E.indexOf(y);0<=b||(b=E.length,E.push(y),this.Jc(a)&&(this.hc(y)===null&&_l(this,y,a),_o(this,"linkLabelKeys",Po,x,a,null,y,null,b)))}else Gt(x+" property is not an Array; cannot addLabelKeyForLinkData: "+a)}}},Pt.Qx=function(a,y){if(y!=null&&a!==null){var x=this.je;if(x!==""){var E=Io(a,x);if(Array.isArray(E)){var b=E.indexOf(y);0>b||(E.splice(b,1),this.Jc(a)&&(Ql(this,y,a),_o(this,"linkLabelKeys",Eo,x,a,y,null,b,null)))}else E!==void 0&&Gt(x+" property is not an Array; cannot removeLabelKeyforLinkData: "+a)}}},Pt.Ac=function(a){if(a!==null){var y=this.Jh;if(y!==""&&(y=Io(a,y),y!==void 0)){if(ud(y))return y;Gt("Key value for link data "+a+" is not a number or a string: "+y)}}},Pt.Ks=function(a,y){if(a!==null){var x=this.Jh;if(x!=="")if(this.Jc(a)){var E=Io(a,x);E!==y&&this.jh(y)===null&&(fo(a,x,y),E!==void 0&&this.wb.remove(E),this.wb.add(y,a),_o(this,"linkKey",no,x,a,E,y),typeof x=="string"&&this.La(a,x))}else fo(a,x,y)}},Pt.jh=function(a){return a===null&&Gt("GraphLinksModel.findLinkDataForKey:key must not be null"),a!==void 0&&ud(a)?this.wb.I(a):null},Pt.Bs=function(a){if(a!==null){var y=this.Jh;if(y!==""){var x=this.Ac(a);if(x===void 0||this.wb.contains(x)){var E=this.cl;if(E!==null&&(x=E(this,a),x!=null&&!this.wb.contains(x))){fo(a,y,x);return}if(typeof x=="string"){for(E=2;this.wb.contains(x+E);)E++;fo(a,y,x+E)}else if(x===void 0||typeof x=="number"){for(x=-this.wb.count-1;this.wb.contains(x);)x--;fo(a,y,x)}}}}},Pt.Jc=function(a){return a===null?!1:this.$f.contains(a)},Pt.fi=function(a){a!==null&&(ir(a),this.Jc(a)||FS(this,a,!0))};function FS(a,y,x){if(a.linkKeyProperty!==""){var E=a.Ac(y);if(E!==void 0&&a.wb.I(E)===y)return;a.Bs(y),E=a.Ac(y),E===void 0&&Gt("GraphLinksModel.makeLinkDataKeyUnique failed on "+y+". Data not added to model."),a.wb.add(E,y)}a.$f.add(y),E=null,x&&(E=a.md.length,a.md.splice(E,0,y)),_o(a,"linkDataArray",Po,"linkDataArray",a,null,y,null,E),cy(a,y)}Pt.Ey=function(a){if(Array.isArray(a))for(var y=a.length,x=0;x<y;x++)this.fi(a[x]);else for(a=a.iterator;a.next();)this.fi(a.value)},Pt.bm=function(a){a!==null&&AS(this,a,!0)};function AS(a,y,x){a.$f.remove(y);var E=a.Ac(y);if(E!==void 0&&a.wb.remove(E),E=null,x){if(E=a.md.indexOf(y),0>E)return;a.md.splice(E,1)}if(_o(a,"linkDataArray",Eo,"linkDataArray",a,y,null,E,null),x=Xs(a,y,!0),Ql(a,x,y),x=Xs(a,y,!1),Ql(a,x,y),E=a.Ef(y),Array.isArray(E))for(var b=E.length,z=0;z<b;z++)x=E[z],Ql(a,x,y)}Pt.lA=function(a){if(Array.isArray(a))for(var y=a.length,x=0;x<y;x++)this.bm(a[x]);else for(a=a.iterator;a.next();)this.bm(a.value)},Pt.Zz=function(a){if(this.linkKeyProperty===""&&Gt("GraphLinksModel.linkKeyProperty must not be an empty string for .mergeLinkDataArray() to succeed."),a!==this.linkDataArray&&kn(a)){var y=this.kl;y.clear(),y.addAll(this.wb.iteratorKeys);var x=this.il;x.clear();for(var E=a.length,b=0;b<E;b++){var z=a[b],tt=this.Ac(z);if(tt!==void 0){x.add(tt);var rt=this.jh(tt);rt!==z&&(rt!==null?(this.Do(rt,z),NS(this,z,rt)):(z=this.cloneDeep(z),this.Ks(z,tt),this.fi(z)))}else tt=this.cloneDeep(z),this.fi(tt),x.add(this.Ac(tt))}for(a=y.iterator;a.next();)E=a.value,x.contains(E)||(E=this.jh(E))&&this.bm(E);y.clear(),x.clear()}};function cy(a,y){var x=Xs(a,y,!0);x=a.Vl(x),a.hc(x)===null&&_l(a,x,y),x=Xs(a,y,!1),x=a.Vl(x),a.hc(x)===null&&_l(a,x,y);var E=a.Ef(y);if(Array.isArray(E))for(var b=E.length,z=0;z<b;z++)x=E[z],a.hc(x)===null&&_l(a,x,y)}Pt.Jo=function(a){if(a===null)return null;var y=this.Ak;return a=y!==null?y(a,this):l0(this,a,!0),De(a)&&(xi(a),this.lf!==""&&fo(a,this.lf,void 0),this.mf!==""&&fo(a,this.mf,void 0),this.je!==""&&fo(a,this.je,[])),a},Pt.Yu=function(a){if(a===null)return!1;var y=this.jl;return y===""?!1:!!Io(a,y)},Pt.lh=function(a){if(a!==null){var y=this.Je;if(y!==""&&(y=Io(a,y),y!==void 0)){if(ud(y))return y;Gt("GroupKey value for node data "+a+" is not a number or a string: "+y)}}},Pt.mp=function(a,y){if(y===null&&(y=void 0),a!==null){var x=this.Je;if(x!=="")if(this.lb(a)){var E=Io(a,x);E!==y&&(Ql(this,E,a),fo(a,x,y),this.hc(y)===null&&_l(this,y,a),_o(this,"nodeGroupKey",no,x,a,E,y),typeof x=="string"&&this.La(a,x))}else fo(a,x,y)}},Lr.prototype.copyNodeData=function(a){return a===null?null:(a=mi.prototype.copyNodeData.call(this,a),this.Ij||this.Je===""||Io(a,this.Je)===void 0||fo(a,this.Je,void 0),a)},Lr.prototype.setDataProperty=function(a,y,x){if(this.lb(a)){if(y===this.nodeKeyProperty){this.km(a,x);return}if(y===this.nodeCategoryProperty){this.jm(a,x);return}if(y===this.nodeGroupKeyProperty){this.mp(a,x);return}}else if(this.Jc(a)){if(y===this.linkFromKeyProperty){Hf(this,a,x,!0);return}if(y===this.linkToKeyProperty){Hf(this,a,x,!1);return}if(y===this.linkFromPortIdProperty){Kf(this,a,x,!0);return}if(y===this.linkToPortIdProperty){Kf(this,a,x,!1);return}if(y===this.linkKeyProperty){this.Ks(a,x);return}if(y===this.linkCategoryProperty){this.lp(a,x);return}if(y===this.linkLabelKeysProperty){this.Ls(a,x);return}}var E=Io(a,y);E!==x&&(fo(a,y,x),this.Fs(a,y,E,x))},Pt=Lr.prototype,Pt.Do=function(a,y){if(y){var x=this.lb(a),E=this.Jc(a),b;for(b in y)b==="__gohashid"||x&&b===this.nodeKeyProperty||x&&b===this.nodeIsGroupProperty&&Io(a,b)===y[b]||E&&b===this.linkKeyProperty||this.setDataProperty(a,b,y[b])}},Pt.jp=function(a,y){mi.prototype.jp.call(this,a,y);for(var x=this.kb.iterator;x.next();)this.qv(x.value,a,y);for(x=this.$f.iterator;x.next();){var E=x.value,b=a,z=y;if(Xs(this,E,!0)===b){var tt=this.lf;fo(E,tt,z),_o(this,"linkFromKey",no,tt,E,b,z),typeof tt=="string"&&this.La(E,tt)}if(Xs(this,E,!1)===b&&(tt=this.mf,fo(E,tt,z),_o(this,"linkToKey",no,tt,E,b,z),typeof tt=="string"&&this.La(E,tt)),tt=this.Ef(E),Array.isArray(tt))for(var rt=tt.length,ot=this.je,st=0;st<rt;st++)tt[st]===b&&(tt[st]=z,_o(this,"linkLabelKeys",Po,ot,E,b,z,st,st))}},Pt.qv=function(a,y,x){if(this.lh(a)===y){var E=this.Je;fo(a,E,x),_o(this,"nodeGroupKey",no,E,a,y,x),typeof E=="string"&&this.La(a,E)}},Pt.Lv=function(){mi.prototype.Lv.call(this);for(var a=this.linkDataArray,y=a.length,x=0;x<y;x++)cy(this,a[x])},Pt.fm=function(a){mi.prototype.fm.call(this,a),a=this.wa(a);var y=dp(this,a);if(y!==null){var x=On();for(y=y.iterator;y.next();){var E=y.value;if(this.lb(E)){if(this.lh(E)===a){var b=this.Je;_o(this,"nodeGroupKey",no,b,E,a,a),typeof b=="string"&&this.La(E,b),x.push(E)}}else if(Xs(this,E,!0)===a&&(b=this.lf,_o(this,"linkFromKey",no,b,E,a,a),typeof b=="string"&&this.La(E,b),x.push(E)),Xs(this,E,!1)===a&&(b=this.mf,_o(this,"linkToKey",no,b,E,a,a),typeof b=="string"&&this.La(E,b),x.push(E)),b=this.Ef(E),Array.isArray(b))for(var z=b.length,tt=this.je,rt=0;rt<z;rt++)b[rt]===a&&(_o(this,"linkLabelKeys",Po,tt,E,a,a,rt,rt),x.push(E))}for(y=0;y<x.length;y++)Ql(this,a,x[y]);Qn(x)}},Pt.em=function(a){mi.prototype.em.call(this,a);var y=this.lh(a);this.hc(y)===null&&_l(this,y,a)},Pt.qp=function(a){mi.prototype.qp.call(this,a);var y=this.lh(a);Ql(this,y,a)},Pt.ps=function(a){if(a===null)return"";var y=this.dj;if(y===""||(y=Io(a,y),y===void 0))return"";if(typeof y=="string")return y;Gt("getCategoryForLinkData found a non-string category for "+a+": "+y)},Lr.prototype.getLinkCategoryForData=function(a){return this.ps(a)},Lr.prototype.lp=function(a,y){if(a!==null){var x=this.dj;if(x!=="")if(this.Jc(a)){var E=Io(a,x);E===void 0&&(E=""),E!==y&&(fo(a,x,y),_o(this,"linkCategory",no,x,a,E,y),typeof x=="string"&&this.La(a,x))}else fo(a,x,y)}},Lr.prototype.setLinkCategoryForData=function(a,y){this.lp(a,y)},Pt=Lr.prototype,Pt.lm=function(a,y){mi.prototype.lm.call(this,a,y),this.mp(y,this.lh(a))};function NS(a,y,x){a.lp(x,a.ps(y)),a.wv(x,a.yx(y)),a.Bv(x,a.Bx(y)),a.Ls(x,a.Ef(y)),a.xv(x,a.zx(y)),a.Cv(x,a.Cx(y))}Pt.Wj=function(){return!0},Pt.ri=function(){return!0},Pt.xs=function(){return!0},Pt.Xj=function(){return!0},ge.Object.defineProperties(Lr.prototype,{archetypeNodeData:{get:function(){return this.Ri},set:function(a){var y=this.Ri;y!==a&&(this.Ri=a,this.g("archetypeNodeData",y,a))}},linkFromKeyProperty:{get:function(){return this.lf},set:function(a){var y=this.lf;y!==a&&(this.lf=a,this.g("linkFromKeyProperty",y,a))}},linkToKeyProperty:{get:function(){return this.mf},set:function(a){var y=this.mf;y!==a&&(this.mf=a,this.g("linkToKeyProperty",y,a))}},linkFromPortIdProperty:{get:function(){return this.ej},set:function(a){var y=this.ej;y!==a&&(this.ej=a,this.g("linkFromPortIdProperty",y,a))}},linkToPortIdProperty:{get:function(){return this.fj},set:function(a){var y=this.fj;y!==a&&(this.fj=a,this.g("linkToPortIdProperty",y,a))}},linkLabelKeysProperty:{get:function(){return this.je},set:function(a){var y=this.je;y!==a&&(this.je=a,this.g("linkLabelKeysProperty",y,a))}},linkDataArray:{get:function(){return this.md},set:function(a){var y=this.md;if(y!==a){this.wb.clear();for(var x=a.length,E=0;E<x;E++){var b=a[E];De(b)||Gt("GraphLinksModel.linkDataArray must only contain Objects, not: "+b),ir(b)}if(this.md=a,this.linkKeyProperty!==""){for(E=new Xe,b=0;b<x;b++){var z=a[b],tt=this.Ac(z);tt===void 0||this.wb.I(tt)!==null?E.add(z):this.wb.add(tt,z)}for(E=E.iterator;E.next();)b=E.value,this.Bs(b),z=this.Ac(b),z!==void 0&&this.wb.add(z,b)}for(E=new qe,b=0;b<x;b++)E.add(a[b]);for(this.$f=E,_o(this,"linkDataArray",no,"linkDataArray",this,y,a),y=0;y<x;y++)cy(this,a[y])}}},linkKeyProperty:{get:function(){return this.Jh},set:function(a){var y=this.Jh;if(y!==a){this.Jh=a,this.wb.clear();for(var x=this.linkDataArray.length,E=0;E<x;E++){var b=this.linkDataArray[E],z=this.Ac(b);z===void 0&&(this.Bs(b),z=this.Ac(b)),z!==void 0&&this.wb.add(z,b)}this.g("linkKeyProperty",y,a)}}},makeUniqueLinkKeyFunction:{get:function(){return this.cl},set:function(a){var y=this.cl;y!==a&&(this.cl=a,this.g("makeUniqueLinkKeyFunction",y,a))}},copyLinkDataFunction:{get:function(){return this.Ak},set:function(a){var y=this.Ak;y!==a&&(this.Ak=a,this.g("copyLinkDataFunction",y,a))}},nodeIsGroupProperty:{get:function(){return this.jl},set:function(a){var y=this.jl;y!==a&&(this.jl=a,this.g("nodeIsGroupProperty",y,a))}},nodeGroupKeyProperty:{get:function(){return this.Je},set:function(a){var y=this.Je;y!==a&&(this.Je=a,this.g("nodeGroupKeyProperty",y,a))}},Ij:{get:function(){return this.Lm},set:function(a){this.Lm!==a&&(this.Lm=a)}},linkCategoryProperty:{get:function(){return this.dj},set:function(a){var y=this.dj;y!==a&&(this.dj=a,this.g("linkCategoryProperty",y,a))}},type:{get:function(){return"GraphLinksModel"}}}),Lr.prototype.setCategoryForLinkData=Lr.prototype.lp,Lr.prototype.getCategoryForLinkData=Lr.prototype.ps,Lr.prototype.assignAllDataProperties=Lr.prototype.Do,Lr.prototype.setGroupKeyForNodeData=Lr.prototype.mp,Lr.prototype.getGroupKeyForNodeData=Lr.prototype.lh,Lr.prototype.isGroupForNodeData=Lr.prototype.Yu,Lr.prototype.copyLinkData=Lr.prototype.Jo,Lr.prototype.mergeLinkDataArray=Lr.prototype.Zz,Lr.prototype.removeLinkDataCollection=Lr.prototype.lA,Lr.prototype.removeLinkData=Lr.prototype.bm,Lr.prototype.addLinkDataCollection=Lr.prototype.Ey,Lr.prototype.addLinkData=Lr.prototype.fi,Lr.prototype.containsLinkData=Lr.prototype.Jc,Lr.prototype.makeLinkDataKeyUnique=Lr.prototype.Bs,Lr.prototype.findLinkDataForKey=Lr.prototype.jh,Lr.prototype.setKeyForLinkData=Lr.prototype.Ks,Lr.prototype.getKeyForLinkData=Lr.prototype.Ac,Lr.prototype.removeLabelKeyForLinkData=Lr.prototype.Qx,Lr.prototype.addLabelKeyForLinkData=Lr.prototype.Bu,Lr.prototype.setLabelKeysForLinkData=Lr.prototype.Ls,Lr.prototype.getLabelKeysForLinkData=Lr.prototype.Ef,Lr.prototype.setToPortIdForLinkData=Lr.prototype.Cv,Lr.prototype.getToPortIdForLinkData=Lr.prototype.Cx,Lr.prototype.setFromPortIdForLinkData=Lr.prototype.xv,Lr.prototype.getFromPortIdForLinkData=Lr.prototype.zx,Lr.prototype.setToKeyForLinkData=Lr.prototype.Bv,Lr.prototype.getToKeyForLinkData=Lr.prototype.Bx,Lr.prototype.setFromKeyForLinkData=Lr.prototype.wv,Lr.prototype.getFromKeyForLinkData=Lr.prototype.yx,Lr.prototype.clear=Lr.prototype.clear;var h0=Object.freeze([]);Lr.className="GraphLinksModel",Ol.GraphLinksModel=Lr,mi.constructGraphLinksModel=mi.constructGraphLinksModel=function(){return new Lr},mi.initDiagramModel=hy=function(){return new Lr};function ls(a,y){mi.call(this),this.Ke="parent",this.Nm=!1,this.nj="parentLinkCategory",a!==void 0&&(kn(a)?this.nodeDataArray=a:y=a),y&&(Object.assign(this,y),a=y.Changed)&&(delete this.Changed,this.Pe(a))}we(ls,mi),ls.constructGraphLinksModel=mi.constructGraphLinksModel,ls.prototype.cloneProtected=function(a){mi.prototype.cloneProtected.call(this,a),a.Ke=this.Ke,a.Nm=this.Nm,a.nj=this.nj},Pt=ls.prototype,Pt.toString=function(a){if(a===void 0&&(a=0),2<=a)return this.np();var y=(this.name!==""?this.name:"")+" TreeModel";if(0<a){y+=`
|
|
node data:`,a=this.nodeDataArray;for(var x=a.length,E=0;E<x;E++){var b=a[E];y+=" "+this.wa(b)+":"+Ni(b)}}return y},Pt.rm=function(){var a=mi.prototype.rm.call(this),y="";return this.nodeParentKeyProperty!=="parent"&&typeof this.nodeParentKeyProperty=="string"&&(y+=`,
|
|
"nodeParentKeyProperty": `+this.quote(this.nodeParentKeyProperty)),a+y},Pt.gp=function(a){mi.prototype.gp.call(this,a),a.nodeParentKeyProperty&&(this.nodeParentKeyProperty=a.nodeParentKeyProperty)},Pt.fp=function(a){a.nodeParentKeyProperty!==void 0&&a.nodeParentKeyProperty!==this.nodeParentKeyProperty&&Gt("applyIncrementalJson cannot change Model properties"),mi.prototype.fp.call(this,a)},Pt.Vl=function(a){return a},Pt.mh=function(a){if(a!==null){var y=this.Ke;if(y!==""&&(y=Io(a,y),y!==void 0)){if(ud(y))return y;Gt("ParentKey value for node data "+a+" is not a number or a string: "+y)}}},Pt.qe=function(a,y){if(y===null&&(y=void 0),a!==null){var x=this.Ke;if(x!=="")if(y=this.Vl(y),this.lb(a)){var E=Io(a,x);E!==y&&(Ql(this,E,a),fo(a,x,y),this.hc(y)===null&&_l(this,y,a),_o(this,"nodeParentKey",no,x,a,E,y),typeof x=="string"&&this.La(a,x))}else fo(a,x,y)}},Pt.ss=function(a){if(a===null)return"";var y=this.nj;return y===""||(y=Io(a,y),y===void 0)?"":typeof y=="string"?y:(Gt("getParentLinkCategoryForNodeData found a non-string category for "+a+": "+y),"")},ls.prototype.getLinkCategoryForData=function(a){return this.ss(a)},ls.prototype.Ms=function(a,y){if(a!==null){var x=this.nj;if(x!=="")if(this.lb(a)){var E=Io(a,x);E===void 0&&(E=""),E!==y&&(fo(a,x,y),_o(this,"parentLinkCategory",no,x,a,E,y),typeof x=="string"&&this.La(a,x))}else fo(a,x,y)}},ls.prototype.setLinkCategoryForData=function(a,y){this.Ms(a,y)},ls.prototype.copyNodeData=function(a){return a===null?null:(a=mi.prototype.copyNodeData.call(this,a),this.Jj||this.Ke===""||Io(a,this.Ke)===void 0||fo(a,this.Ke,void 0),a)},ls.prototype.setDataProperty=function(a,y,x){if(this.lb(a)){if(y===this.nodeKeyProperty){this.km(a,x);return}if(y===this.nodeCategoryProperty){this.jm(a,x);return}if(y===this.nodeParentKeyProperty){this.qe(a,x);return}}var E=Io(a,y);E!==x&&(fo(a,y,x),this.Fs(a,y,E,x))},Pt=ls.prototype,Pt.jp=function(a,y){mi.prototype.jp.call(this,a,y);for(var x=this.kb.iterator;x.next();)this.qv(x.value,a,y)},Pt.qv=function(a,y,x){if(this.mh(a)===y){var E=this.Ke;fo(a,E,x),_o(this,"nodeParentKey",no,E,a,y,x),typeof E=="string"&&this.La(a,E)}},Pt.fm=function(a){mi.prototype.fm.call(this,a),a=this.wa(a);var y=dp(this,a);if(y!==null){var x=On();for(y=y.iterator;y.next();){var E=y.value;if(this.lb(E)&&this.mh(E)===a){var b=this.Ke;_o(this,"nodeParentKey",no,b,E,a,a),typeof b=="string"&&this.La(E,b),x.push(E)}}for(y=0;y<x.length;y++)Ql(this,a,x[y]);Qn(x)}},Pt.em=function(a){mi.prototype.em.call(this,a);var y=this.mh(a);y=this.Vl(y),this.hc(y)===null&&_l(this,y,a)},Pt.qp=function(a){mi.prototype.qp.call(this,a);var y=this.mh(a);Ql(this,y,a)},Pt.lm=function(a,y){mi.prototype.lm.call(this,a,y),this.Ms(y,this.ss(a)),this.qe(y,this.mh(a))},Pt.Tl=function(){return!0},Pt.xs=function(){return!0},ge.Object.defineProperties(ls.prototype,{nodeParentKeyProperty:{get:function(){return this.Ke},set:function(a){var y=this.Ke;y!==a&&(this.Ke=a,this.g("nodeParentKeyProperty",y,a))}},Jj:{get:function(){return this.Nm},set:function(a){this.Nm!==a&&(this.Nm=a)}},parentLinkCategoryProperty:{get:function(){return this.nj},set:function(a){var y=this.nj;y!==a&&(this.nj=a,this.g("parentLinkCategoryProperty",y,a))}},linkCategoryProperty:{get:function(){return this.parentLinkCategoryProperty},set:function(a){this.parentLinkCategoryProperty=a}},type:{get:function(){return"TreeModel"}}}),ls.prototype.setParentLinkCategoryForNodeData=ls.prototype.Ms,ls.prototype.getParentLinkCategoryForNodeData=ls.prototype.ss,ls.prototype.setParentKeyForNodeData=ls.prototype.qe,ls.prototype.getParentKeyForNodeData=ls.prototype.mh,ls.className="TreeModel",Ol.TreeModel=ls;function xo(a){mo.call(this),this.lw=this.Zm=this.lc=0,this.Wp=360,this.kw=Il,this.Ti=0,this.Zv=new At,this.Jp=this.me=0,this.Xr=new vp,this.gt=this.mj=0,this.ty=600,this.eo=NaN,this.Cm=1,this.ro=0,this.ul=360,this.Rb=Il,this.K=us,this.nd=Wf,this.hd=ry,this.tf=6,this.Nn=v0,a&&Object.assign(this,a)}we(xo,mo),xo.prototype.cloneProtected=function(a){mo.prototype.cloneProtected.call(this,a),a.eo=this.eo,a.Cm=this.Cm,a.ro=this.ro,a.ul=this.ul,a.Rb=this.Rb,a.K=this.K,a.nd=this.nd,a.hd=this.hd,a.tf=this.tf,a.Nn=this.Nn},xo.prototype.qb=function(a){a.classType===xo?a===p0||a===m0||a===f0||a===g0||a===Wf?this.sorting=a:a===$d||a===Zf||a===us||a===dd?this.direction=a:a===Mh||a===hd||a===Il||a===Rl?this.arrangement=a:(a===jc||a===v0)&&(this.nodeDiameterFormula=a):mo.prototype.qb.call(this,a)},xo.prototype.createNetwork=function(){return new Vf(this)},xo.prototype.doLayout=function(a){if(this.network===null&&(this.network=this.makeNetwork(a)),this.arrangementOrigin=this.initialOrigin(this.arrangementOrigin),a=this.network.vertexes,1>=a.count)a.count===1&&(a=a.first(),a.centerX=0,a.centerY=0);else{var y=new Xe;y.addAll(a.iterator),a=new Xe;var x=new Xe,E=this.sort(y),b,z,tt=this.Jp,rt=this.arrangement,ot=this.nodeDiameterFormula,st=this.radius;(!isFinite(st)||0>=st)&&(st=NaN);var ut=this.aspectRatio;(!isFinite(ut)||0>=ut)&&(ut=1);var ft=this.startAngle;isFinite(ft)||(ft=0);var mt=this.sweepAngle;if((!isFinite(mt)||360<mt||1>mt)&&(mt=360),y=this.spacing,isFinite(y)||(y=NaN),rt===Rl&&ot===jc?rt=Il:rt===Rl&&ot!==jc&&(rt=this.arrangement),(this.direction===$d||this.direction===Zf)&&this.sorting!==Wf){for(ot=0;!(ot>=E.length)&&(a.add(E.M(ot)),!(ot+1>=E.length));ot+=2)x.add(E.M(ot+1));this.direction===$d?(this.arrangement===Rl&&a.reverse(),E=new Xe,E.addAll(a),E.addAll(x)):(this.arrangement===Rl&&x.reverse(),E=new Xe,E.addAll(x),E.addAll(a))}ot=E.length;for(var yt=z=b=0;yt<E.length;yt++){var wt=ft+mt*z*(this.direction===us?1:-1)/ot,bt=E.M(yt).diameter;isNaN(bt)&&(bt=cd(E.M(yt),wt)),360>mt&&(yt===0||yt===E.length-1)&&(bt/=2),b+=bt,z++}if(isNaN(st)||rt===Rl){if(isNaN(y)&&(y=6),rt!==Il&&rt!==Rl){for(z=-1/0,tt=0;tt<ot;tt++)yt=E.M(tt),b=E.M(tt===ot-1?0:tt+1),isNaN(yt.diameter)&&cd(yt,0),isNaN(b.diameter)&&cd(b,0),z=Math.max(z,(yt.diameter+b.diameter)/2);tt=z+y,rt===Mh?st=(z+y)/(2*Math.PI/ot):st=d0(this,tt*(360<=mt?ot:ot-1),ut,ft*Math.PI/180,mt*Math.PI/180)}else st=d0(this,b+(360<=mt?ot:ot-1)*(rt!==Rl?y:1.6*y),ut,ft*Math.PI/180,mt*Math.PI/180);z=st*ut}else if(z=st*ut,yt=fy(this,st,z,ft*Math.PI/180,mt*Math.PI/180),isNaN(y))(rt===Il||rt===Rl)&&(y=(yt-b)/(360<=mt?ot:ot-1));else if(rt===Il||rt===Rl)yt=(yt-b)/(360<=mt?ot:ot-1),yt<y?(st=d0(this,b+y*(360<=mt?ot:ot-1),ut,ft*Math.PI/180,mt*Math.PI/180),z=st*ut):y=yt;else{for(tt=-1/0,b=0;b<ot;b++)wt=E.M(b),bt=E.M(b===ot-1?0:b+1),isNaN(wt.diameter)&&cd(wt,0),isNaN(bt.diameter)&&cd(bt,0),tt=Math.max(tt,(wt.diameter+bt.diameter)/2);tt+=y,b=d0(this,tt*(360<=mt?ot:ot-1),ut,ft*Math.PI/180,mt*Math.PI/180),b>st?(st=b,z=st*ut):tt=yt/(360<=mt?ot:ot-1)}if(this.kw=rt,this.lc=st,this.Zm=ut,this.lw=ft,this.Wp=mt,this.Ti=y,this.me=z,this.Jp=tt,y=E,E=this.kw,rt=this.lc,st=this.lw,ut=this.Wp,ft=this.Ti,mt=this.me,ot=this.Jp,this.direction!==$d&&this.direction!==Zf||E!==Rl)if(this.direction===$d||this.direction===Zf){switch(tt=0,E){case hd:tt=180*c0(this,rt,mt,st,ot)/Math.PI;break;case Il:ot=y=0,tt=a.first(),tt!==null&&(y=cd(tt,Math.PI/2)),tt=x.first(),tt!==null&&(ot=cd(tt,Math.PI/2)),tt=180*c0(this,rt,mt,st,ft+(y+ot)/2)/Math.PI;break;case Mh:tt=ut/y.length}if(this.direction===$d){switch(E){case hd:mp(this,a,st,dd);break;case Il:pp(this,a,st,dd);break;case Mh:gp(this,a,ut/2,st,dd)}switch(E){case hd:mp(this,x,st+tt,us);break;case Il:pp(this,x,st+tt,us);break;case Mh:gp(this,x,ut/2,st+tt,us)}}else{switch(E){case hd:mp(this,x,st,dd);break;case Il:pp(this,x,st,dd);break;case Mh:gp(this,x,ut/2,st,dd)}switch(E){case hd:mp(this,a,st+tt,us);break;case Il:pp(this,a,st+tt,us);break;case Mh:gp(this,a,ut/2,st+tt,us)}}}else switch(E){case hd:mp(this,y,st,this.direction);break;case Il:pp(this,y,st,this.direction);break;case Mh:gp(this,y,ut,st,this.direction);break;case Rl:DS(this,y,ut,st,this.direction)}else DS(this,y,ut,st-ut/2,us)}this.updateParts(),this.network=null,this.isValidLayout=!0};function gp(a,y,x,E,b){var z=a.Wp,tt=a.lc;a=a.me,E=E*Math.PI/180,x=x*Math.PI/180;for(var rt=y.length,ot=0;ot<rt;ot++){var st=E+(b===us?ot*x/(360<=z?rt:rt-1):-(ot*x)/rt),ut=y.M(ot),ft=tt*Math.tan(st)/a;ft=Math.sqrt((tt*tt+a*a*ft*ft)/(1+ft*ft)),ut.centerX=ft*Math.cos(st),ut.centerY=ft*Math.sin(st),ut.actualAngle=180*st/Math.PI}}function pp(a,y,x,E){var b=a.lc,z=a.me,tt=a.Ti;x=x*Math.PI/180;for(var rt=y.length,ot=0;ot<rt;ot++){var st=y.M(ot),ut=y.M(ot===rt-1?0:ot+1),ft=z*Math.sin(x);st.centerX=b*Math.cos(x),st.centerY=ft,st.actualAngle=180*x/Math.PI,isNaN(st.diameter)&&cd(st,0),isNaN(ut.diameter)&&cd(ut,0),st=c0(a,b,z,E===us?x:-x,(st.diameter+ut.diameter)/2+tt),x+=E===us?st:-st}}function mp(a,y,x,E){var b=a.lc,z=a.me,tt=a.Jp;x=x*Math.PI/180;for(var rt=y.length,ot=0;ot<rt;ot++){var st=y.M(ot);st.centerX=b*Math.cos(x),st.centerY=z*Math.sin(x),st.actualAngle=180*x/Math.PI,st=c0(a,b,z,E===us?x:-x,tt),x+=E===us?st:-st}}function DS(a,y,x,E,b){var z=a.Wp;if(a.mj=0,a.Xr=new vp,360>x){for(z=E+(b===us?z:-z);0>z;)z+=360;z%=360,180<z&&(z-=360),z*=Math.PI/180,a.gt=z,TS(a,y,x,E,b)}else BS(a,y,x,E,b);a.Xr.commit(y)}function BS(a,y,x,E,b){var z=a.lc,tt=a.Ti,rt=a.Zm,ot=z*Math.cos(E*Math.PI/180),st=a.me*Math.sin(E*Math.PI/180),ut=y.Fa();if(ut.length===3)ut[0].centerX=z,ut[0].centerY=0,ut[1].centerX=ut[0].centerX-ut[0].width/2-ut[1].width/2-tt,ut[1].y=ut[0].y,ut[2].centerX=(ut[0].centerX+ut[1].centerX)/2,ut[2].y=ut[0].y-ut[2].height-tt;else if(ut.length===4)ut[0].centerX=z,ut[0].centerY=0,ut[2].centerX=-ut[0].centerX,ut[2].centerY=ut[0].centerY,ut[1].centerX=0,ut[1].y=Math.min(ut[0].y,ut[2].y)-ut[1].height-tt,ut[3].centerX=0,ut[3].y=Math.max(ut[0].y+ut[0].height+tt,ut[2].y+ut[2].height+tt);else{z=At.alloc();for(var ft=0;ft<ut.length&&(ut[ft].centerX=ot,ut[ft].centerY=st,!(ft>=ut.length-1));ft++)OS(a,ot,st,ut,ft,b,z)||IS(a,ot,st,ut,ft,b,z),ot=z.x,st=z.y;if(At.free(z),a.mj++,!(23<a.mj)){ot=ut[0].centerX,st=ut[0].centerY,z=ut[ut.length-1].centerX,ft=ut[ut.length-1].centerY;var mt=Math.abs(ot-z)-((ut[0].width+ut[ut.length-1].width)/2+tt),yt=Math.abs(st-ft)-((ut[0].height+ut[ut.length-1].height)/2+tt);tt=0,1>Math.abs(yt)?Math.abs(ot-z)<(ut[0].width+ut[ut.length-1].width)/2&&(tt=0):tt=0<yt?yt:1>Math.abs(mt)?0:mt,ot=Math.abs(z)>Math.abs(ft)?0<z!=st>ft:0<ft!=ot<z,(ot=b===us?ot:!ot)&&(tt=-Math.abs(tt),tt=Math.min(tt,-ut[ut.length-1].width),tt=Math.min(tt,-ut[ut.length-1].height)),a.Xr.compare(tt,ut),1<Math.abs(tt)&&(a.lc=8>a.mj?a.lc-tt/(2*Math.PI):5>ut.length&&10<tt?a.lc/2:a.lc-(0<tt?1.7:-2.3),a.me=a.lc*rt,BS(a,y,x,E,b))}}}function TS(a,y,x,E,b){for(var z=a.lc,tt=a.me,rt=a.Zm,ot=z*Math.cos(E*Math.PI/180),st=tt*Math.sin(E*Math.PI/180),ut=At.alloc(),ft=y.Fa(),mt=0;mt<ft.length&&(ft[mt].centerX=ot,ft[mt].centerY=st,!(mt>=ft.length-1));mt++)OS(a,ot,st,ft,mt,b,ut)||IS(a,ot,st,ft,mt,b,ut),ot=ut.x,st=ut.y;if(At.free(ut),a.mj++,!(23<a.mj)){if(ot=Math.atan2(st,ot),ot=b===us?a.gt-ot:ot-a.gt,ot=Math.abs(ot)<Math.abs(ot-2*Math.PI)?ot:ot-2*Math.PI,z=ot*(z+tt)/2,tt=a.Xr,Math.abs(z)<Math.abs(tt.Pl))for(tt.Pl=z,tt.mk=[],tt.tm=[],ot=0;ot<ft.length;ot++)tt.mk[ot]=ft[ot].bounds.x,tt.tm[ot]=ft[ot].bounds.y;1<Math.abs(z)&&(a.lc=8>a.mj?a.lc-z/(2*Math.PI):a.lc-(0<z?1.7:-2.3),a.me=a.lc*rt,TS(a,y,x,E,b))}}function OS(a,y,x,E,b,z,tt){var rt=a.lc,ot=a.me,st=0;a=(E[b].width+E[b+1].width)/2+a.Ti;var ut=!1;if(0<=x!=(z===us)){if(z=y+a,z>rt){if(z=y-a,z<-rt)return tt.x=z,tt.y=st,!1;ut=!0}}else if(z=y-a,z<-rt){if(z=y+a,z>rt)return tt.x=z,tt.y=st,!1;ut=!0}return st=Math.sqrt(1-Math.min(1,z*z/(rt*rt)))*ot,0>x!==ut&&(st=-st),Math.abs(x-st)>(E[b].height+E[b+1].height)/2?(tt.x=z,tt.y=st,!1):(tt.x=z,tt.y=st,!0)}function IS(a,y,x,E,b,z,tt){var rt=a.lc,ot=a.me,st=0;if(a=(E[b].height+E[b+1].height)/2+a.Ti,E=!1,0<=y!=(z===us)){if(z=x-a,z<-ot){if(z=x+a,z>ot){tt.x=st,tt.y=z;return}E=!0}}else if(z=x+a,z>ot){if(z=x-a,z<-ot){tt.x=st,tt.y=z;return}E=!0}st=Math.sqrt(1-Math.min(1,z*z/(ot*ot)))*rt,0>y!==E&&(st=-st),tt.x=st,tt.y=z}xo.prototype.commitLayout=function(){this.commitNodes(),this.isRouting&&this.commitLinks()},xo.prototype.commitNodes=function(){var a=this.group!==null&&this.group.placeholder!==null&&this.group.isSubGraphExpanded,y=a?this.group.location.copy():null,x=this.actualCenter;a?x=new At(0,0):(x.x=this.arrangementOrigin.x+this.lc,x.y=this.arrangementOrigin.y+this.me);for(var E=this.network.vertexes.iterator;E.next();){var b=E.value;b.x+=x.x,b.y+=x.y,b.commit()}a&&(this.group.Va(),a=this.group.position.copy(),x=this.group.location.copy(),y=y.re(x.re(a)),this.group.move(y),this.Zv=y.re(a))},xo.prototype.commitLinks=function(){for(var a=this.network.edges.iterator;a.next();)a.value.commit()};function fy(a,y,x,E,b){var z=a.ty;if(.001>Math.abs(a.Zm-1))return E!==void 0&&b!==void 0?b*y:2*Math.PI*y;a=y>x?Math.sqrt(y*y-x*x)/y:Math.sqrt(x*x-y*y)/x;for(var tt=0,rt=E!==void 0&&b!==void 0?b/(z+1):Math.PI/(2*(z+1)),ot=0,st=0;st<=z;st++){E!==void 0&&b!==void 0?ot=E+st*b/z:ot=st*Math.PI/(2*z);var ut=Math.sin(ot);tt+=Math.sqrt(1-a*a*ut*ut)*rt}return E!==void 0&&b!==void 0?(y>x?y:x)*tt:4*(y>x?y:x)*tt}function d0(a,y,x,E,b){return y/(E!==void 0&&b!==void 0?fy(a,1,x,E,b):fy(a,1,x))}function c0(a,y,x,E,b){if(.001>Math.abs(a.Zm-1))return b/y;var z=y>x?Math.sqrt(y*y-x*x)/y:Math.sqrt(x*x-y*y)/x,tt=0;a=2*Math.PI/(700*a.network.vertexes.count),y>x&&(E+=Math.PI/2);for(var rt=0;;rt++){var ot=Math.sin(E+rt*a);if(tt+=(y>x?y:x)*Math.sqrt(1-z*z*ot*ot)*a,tt>=b)return rt*a}}xo.prototype.sort=function(a){switch(this.sorting){case f0:break;case g0:a.reverse();break;case p0:a.sort(this.comparer);break;case m0:a.sort(this.comparer),a.reverse();break;case Wf:return this.ak(Bx(a));default:Gt("Invalid sorting type.")}return a};function Bx(a){for(var y=[],x=0;x<a.length;x++)y.push(0);x=new Xe;for(var E=0;E<a.length;E++){var b=-1,z=-1;if(E===0)for(var tt=0;tt<a.length;tt++){var rt=a.M(tt).edgesCount;rt>b&&(b=rt,z=tt)}else for(tt=0;tt<a.length;tt++)rt=y[tt],rt>b&&(b=rt,z=tt);for(x.add(a.M(z)),y[z]=-1,z=a.M(z),tt=z.sourceEdges;tt.next();)b=a.indexOf(tt.value.fromVertex),0>b||0<=y[b]&&y[b]++;for(z=z.destinationEdges;z.next();)b=a.indexOf(z.value.toVertex),0>b||0<=y[b]&&y[b]++}return x}xo.prototype.ak=function(a){for(var y=[],x=0;x<a.length;x++){var E=a.M(x);y[x]=[];for(var b,z=E.destinationEdges;z.next();)b=a.indexOf(z.value.toVertex),b!==x&&0>y[x].indexOf(b)&&y[x].push(b);for(E=E.sourceEdges;E.next();)b=a.indexOf(E.value.fromVertex),b!==x&&0>y[x].indexOf(b)&&y[x].push(b)}for(z=[],x=0;x<y.length;x++)z[x]=0;x=[];var tt=[],rt=[];E=[],b=new Xe;for(var ot=0,st=0;st<y.length;st++){var ut=y[st].length;if(ut===1)E.push(st);else if(ut===0)b.add(a.M(st));else{if(ot===0)x.push(st);else{for(var ft=ut=1/0,mt=-1,yt=[],wt=0;wt<x.length;wt++)0>y[x[wt]].indexOf(x[wt===x.length-1?0:wt+1])&&yt.push(wt===x.length-1?0:wt+1);if(yt.length===0)for(wt=0;wt<x.length;wt++)yt.push(wt);for(wt=0;wt<yt.length;wt++){for(var bt=yt[wt],Zt=y[st],It=0,Yt=0;Yt<tt.length;Yt++){var Jt=z[tt[Yt]],qt=z[rt[Yt]];if(Jt<qt){var ae=Jt;Jt=qt}else ae=qt;if(ae<bt&&bt<=Jt)for(qt=0;qt<Zt.length;qt++){var Ce=Zt[qt];0>x.indexOf(Ce)||ae<z[Ce]&&z[Ce]<Jt||ae===z[Ce]||Jt===z[Ce]||It++}else for(qt=0;qt<Zt.length;qt++)Ce=Zt[qt],0>x.indexOf(Ce)||ae<z[Ce]&&z[Ce]<Jt&&ae!==z[Ce]&&Jt!==z[Ce]&&It++}for(Zt=It,Yt=It=0;Yt<y[st].length;Yt++)ae=x.indexOf(y[st][Yt]),0<=ae&&(ae=Math.abs(bt-(ae>=bt?ae+1:ae)),It+=ae<x.length+1-ae?ae:x.length+1-ae);for(Yt=0;Yt<tt.length;Yt++)ae=z[tt[Yt]],Jt=z[rt[Yt]],ae>=bt&&ae++,Jt>=bt&&Jt++,ae>Jt&&(qt=Jt,Jt=ae,ae=qt),Jt-ae<(x.length+2)/2==(ae<bt&&bt<=Jt)&&It++;(Zt<ut||Zt===ut&&It<ft)&&(ut=Zt,ft=It,mt=bt)}for(x.splice(mt,0,st),ut=0;ut<x.length;ut++)z[x[ut]]=ut;for(ut=0;ut<y[st].length;ut++)ft=y[st][ut],0<=x.indexOf(ft)&&(tt.push(st),rt.push(ft))}ot++}}for(tt=x.length;;){for(z=!0,rt=0;rt<E.length;rt++)if(ot=E[rt],st=y[ot][0],ut=x.indexOf(st),0<=ut){for(mt=ft=0;mt<y[st].length;mt++)yt=x.indexOf(y[st][mt]),0>yt||yt===ut||(wt=yt>ut?yt-ut:ut-yt,ft+=yt<ut!=wt>tt-wt?1:-1);x.splice(0>ft?ut:ut+1,0,ot),E.splice(rt,1),rt--}else z=!1;if(z)break;x.push(E[0]),E.splice(0,1)}for(y=0;y<x.length;y++)b.add(a.M(x[y]));return b},ge.Object.defineProperties(xo.prototype,{radius:{get:function(){return this.eo},set:function(a){this.eo!==a&&(0<a||isNaN(a))&&(this.eo=a,this.C())}},aspectRatio:{get:function(){return this.Cm},set:function(a){this.Cm!==a&&0<a&&(this.Cm=a,this.C())}},startAngle:{get:function(){return this.ro},set:function(a){this.ro!==a&&(this.ro=a,this.C())}},sweepAngle:{get:function(){return this.ul},set:function(a){this.ul!==a&&(0<a&&360>=a?this.ul=a:this.ul=360,this.C())}},arrangement:{get:function(){return this.Rb},set:function(a){this.Rb===a||a!==Rl&&a!==Il&&a!==hd&&a!==Mh||(this.Rb=a,this.C())}},direction:{get:function(){return this.K},set:function(a){this.K===a||a!==us&&a!==dd&&a!==$d&&a!==Zf||(this.K=a,this.C())}},sorting:{get:function(){return this.nd},set:function(a){this.nd===a||a!==f0&&a!==g0&&a!==p0&&!m0&&a!==Wf||(this.nd=a,this.C())}},comparer:{get:function(){return this.hd},set:function(a){this.hd!==a&&(this.hd=a,this.C())}},spacing:{get:function(){return this.tf},set:function(a){this.tf!==a&&(this.tf=a,this.C())}},nodeDiameterFormula:{get:function(){return this.Nn},set:function(a){this.Nn===a||a!==v0&&a!==jc||(this.Nn=a,this.C())}},actualXRadius:{get:function(){return this.lc}},actualYRadius:{get:function(){return this.me}},actualSpacing:{get:function(){return this.Ti}},actualCenter:{get:function(){return this.Zv}}});var Il=new Ue(xo,"ConstantSpacing",0),hd=new Ue(xo,"ConstantDistance",1),Mh=new Ue(xo,"ConstantAngle",2),Rl=new Ue(xo,"Packed",3),us=new Ue(xo,"Clockwise",4),dd=new Ue(xo,"Counterclockwise",5),$d=new Ue(xo,"BidirectionalLeft",6),Zf=new Ue(xo,"BidirectionalRight",7),f0=new Ue(xo,"Forwards",8),g0=new Ue(xo,"Reverse",9),p0=new Ue(xo,"Ascending",10),m0=new Ue(xo,"Descending",11),Wf=new Ue(xo,"Optimized",12),v0=new Ue(xo,"Pythagorean",13),jc=new Ue(xo,"Circular",14);xo.className="CircularLayout",xo.ConstantSpacing=Il,xo.ConstantDistance=hd,xo.ConstantAngle=Mh,xo.Packed=Rl,xo.Clockwise=us,xo.Counterclockwise=dd,xo.BidirectionalLeft=$d,xo.BidirectionalRight=Zf,xo.Forwards=f0,xo.Reverse=g0,xo.Ascending=p0,xo.Descending=m0,xo.Optimized=Wf,xo.Pythagorean=v0,xo.Circular=jc;function vp(){this.Pl=-1/0,this.tm=this.mk=null}vp.prototype.compare=function(a,y){if(0<a&&0>this.Pl||Math.abs(a)<Math.abs(this.Pl)&&!(0>a&&0<this.Pl))for(this.Pl=a,this.mk=[],this.tm=[],a=0;a<y.length;a++)this.mk[a]=y[a].bounds.x,this.tm[a]=y[a].bounds.y},vp.prototype.commit=function(a){if(this.mk!==null&&this.tm!==null)for(var y=0;y<this.mk.length;y++){var x=a.M(y);x.x=this.mk[y],x.y=this.tm[y]}},vp.className="VertexArrangement";function Vf(a){ro.call(this,a)}we(Vf,ro),Vf.prototype.createVertex=function(){return new yp(this)},Vf.prototype.createEdge=function(){return new y0(this)},Vf.className="CircularNetwork";function yp(a){qo.call(this,a),this.u=this.Si=NaN}we(yp,qo);function cd(a,y){var x=a.network;if(x===null)return NaN;if(x=x.layout,x===null)return NaN;if(x.arrangement===Rl)if(x.nodeDiameterFormula===jc)a.Si=Math.max(a.width,a.height);else{if(x=Math.abs(Math.sin(y)),y=Math.abs(Math.cos(y)),x===0)return a.width;if(y===0)return a.height;a.Si=Math.min(a.height/x,a.width/y)}else a.Si=x.nodeDiameterFormula===jc?Math.max(a.width,a.height):Math.sqrt(a.width*a.width+a.height*a.height);return a.Si}ge.Object.defineProperties(yp.prototype,{diameter:{get:function(){return this.Si},set:function(a){this.Si!==a&&(this.Si=a)}},actualAngle:{get:function(){return this.u},set:function(a){this.u!==a&&(this.u=a)}}}),yp.className="CircularVertex";function y0(a){Is.call(this,a)}we(y0,Is),y0.className="CircularEdge";function Da(a){mo.call(this),this.ah=null,this.An=0,this.$d=new Ke(100,100).freeze(),this.Bm=!1,this.sf=!0,this.td=!1,this.dl=100,this.$m=1,this.Zf=1e3,this.In=10,this.fo=Math,this.Hk=.05,this.Gk=50,this.Ek=150,this.Fk=0,this.Vm=10,this.Um=5,a&&Object.assign(this,a)}we(Da,mo),Da.prototype.cloneProtected=function(a){mo.prototype.cloneProtected.call(this,a),a.$d.assign(this.$d),a.Bm=this.Bm,a.sf=this.sf,a.td=this.td,a.dl=this.dl,a.$m=this.$m,a.Zf=this.Zf,a.In=this.In,a.fo=this.fo,a.Hk=this.Hk,a.Gk=this.Gk,a.Ek=this.Ek,a.Fk=this.Fk,a.Vm=this.Vm,a.Um=this.Um},Da.prototype.createNetwork=function(){return new zc(this)},Da.prototype.doLayout=function(a){if(this.network===null&&(this.network=this.makeNetwork(a)),a=this.maxIterations,0<this.network.vertexes.count){this.network.Ko();for(var y=this.network.vertexes.iterator;y.next();){var x=y.value;x.charge=this.electricalCharge(x),x.mass=this.gravitationalMass(x)}for(y=this.network.edges.iterator;y.next();)x=y.value,x.stiffness=this.springStiffness(x),x.length=this.springLength(x);if(this.Cu(),this.An=0,this.needsClusterLayout()){y=this.network,x=y.Zx();for(var E=x.iterator;E.next();){this.network=E.value;for(var b=this.network.vertexes.iterator;b.next();){var z=b.value;z.Vd=z.vertexes.count,z.sh=1,z.Hj=null,z.We=null}RS(this,0,a)}this.network=y;var tt=E=x.iterator;E=this.arrangementSpacing;var rt=tt.count,ot=!0;z=b=0;for(var st=On(),ut=0;ut<rt+y.vertexes.count+2;ut++)st[ut]=null;rt=0,tt.reset();for(var ft=Ee.alloc();tt.next();)if(ut=tt.value,this.computeBounds(ut,ft),ot)ot=!1,b=ft.x+ft.width/2,z=ft.y+ft.height/2,st[0]=new At(ft.x+ft.width+E.width,ft.y),st[1]=new At(ft.x,ft.y+ft.height+E.height),rt=2;else{var mt=jS(st,rt,b,z,ft.width,ft.height,E),yt=st[mt],wt=new At(yt.x+ft.width+E.width,yt.y),bt=new At(yt.x,yt.y+ft.height+E.height);for(mt+1<rt&&st.splice(mt+1,0,null),st[mt]=wt,st[mt+1]=bt,rt++,mt=yt.x-ft.x,yt=yt.y-ft.y,ut=ut.vertexes.iterator;ut.next();)wt=ut.value,wt.centerX+=mt,wt.centerY+=yt}for(Ee.free(ft),ut=y.vertexes.iterator;ut.next();)tt=ut.value,mt=tt.bounds,2>rt?(b=mt.x+mt.width/2,z=mt.y+mt.height/2,st[0]=new At(mt.x+mt.width+E.width,mt.y),st[1]=new At(mt.x,mt.y+mt.height+E.height),rt=2):(ot=jS(st,rt,b,z,mt.width,mt.height,E),ft=st[ot],yt=new At(ft.x+mt.width+E.width,ft.y),mt=new At(ft.x,ft.y+mt.height+E.height),ot+1<rt&&st.splice(ot+1,0,null),st[ot]=yt,st[ot+1]=mt,rt++,tt.centerX=ft.x+tt.width/2,tt.centerY=ft.y+tt.height/2);for(Qn(st),E=x.iterator;E.next();){for(x=E.value,b=x.vertexes.iterator;b.next();)y.dh(b.value);for(x=x.edges.iterator;x.next();)y.Bo(x.value)}}GS(this,a),this.updateParts()}this.dl=a,this.network=null,this.isValidLayout=!0},Da.prototype.needsClusterLayout=function(){if(3>this.network.vertexes.count)return!1;for(var a=0,y=0,x=this.network.vertexes.first().bounds,E=this.network.vertexes.iterator;E.next();){if(E.value.bounds.Yc(x)&&(a++,2<a))return!0;if(10<y)break;y++}return!1},Da.prototype.computeBounds=function(a,y){var x=!0;for(a=a.vertexes.iterator;a.next();){var E=a.value;x?(x=!1,y.set(E.bounds)):y.ed(E.bounds)}return y};function RS(a,y,x){if(Tx(a,y)){var E=a.Zf;a.Zf*=1+1/(y+1);var b=Ox(a,y),z=Math.max(0,Math.max(Math.min(a.network.vertexes.count,x*(y+1)/11),10));for(a.maxIterations+=z,RS(a,y+1,x),GS(a,z),Ix(a,b),y=b.vertexes.Fa(),y.sort(function(tt,rt){return tt===null||rt===null||tt===rt?0:rt.Vd-tt.Vd}),x=0;x<y.length;x++)Rx(a,y[x]);a.Zf=E}}function Tx(a,y){if(10<y||3>a.network.vertexes.count)return!1;for(a.ah=a.network.vertexes.Fa(),a=a.ah,a.sort(function(x,E){return x===null||E===null||x===E?0:E.Vd-x.Vd}),y=a.length-1;0<=y&&1>=a[y].Vd;)y--;return 1<a.length-y}function Ox(a,y){for(var x=a.network,E=new zc(a),b=0;b<a.ah.length;b++){var z=a.ah[b];if(1<z.Vd){E.dh(z);var tt=new HS;tt.Rs=z.Vd,tt.Ss=z.width,tt.Qs=z.height,tt.Sv=z.focus.x,tt.Tv=z.focus.y,z.We===null&&(z.We=new Xe),z.We.add(tt),z.sv=z.We.count-1}else break}for(z=x.edges.iterator;z.next();){var rt=z.value;b=rt.fromVertex,tt=rt.toVertex,b.network===E&&tt.network===E?E.Bo(rt):b.network===E?(rt=b.Hj,rt===null&&(rt=new Xe,b.Hj=rt),rt.add(tt),b.Vd--,b.sh+=tt.sh):tt.network===E&&(rt=tt.Hj,rt===null&&(rt=new Xe,tt.Hj=rt),rt.add(b),tt.Vd--,tt.sh+=b.sh)}for(b=E.edges.iterator;b.next();)z=b.value,z.length*=Math.max(1,ue.sqrt((z.fromVertex.sh+z.toVertex.sh)/(4*y+1)));for(y=E.vertexes.iterator;y.next();){b=y.value;var ot=b.Hj;if(ot!==null&&0<ot.count&&(tt=b.We.M(b.We.count-1).Rs-b.Vd,!(0>=tt))){for(var st=rt=0,ut=ot.count-tt;ut<ot.count;ut++){var ft=ot.M(ut),mt=null;for(z=ft.edges.iterator;z.next();){var yt=z.value;if(yt.Ax(ft)===b){mt=yt;break}}mt!==null&&(st+=mt.length,rt+=ft.width*ft.height)}z=b.centerX,ot=b.centerY,ut=b.width,ft=b.height,mt=b.focus,yt=ut*ft,1>yt&&(yt=1),rt=ue.sqrt((rt+yt+st*st*4/(tt*tt))/yt),tt=(rt-1)*ut/2,rt=(rt-1)*ft/2,b.bounds=new Ee(z-mt.x-tt,ot-mt.y-rt,ut+2*tt,ft+2*rt),b.focus=new At(mt.x+tt,mt.y+rt)}}return a.network=E,x}function Ix(a,y){for(var x=a.network.vertexes.iterator;x.next();){var E=x.value;if(E.network=y,E.We!==null){var b=E.We.M(E.sv);E.Vd=b.Rs;var z=b.Sv,tt=b.Tv;E.bounds=new Ee(E.centerX-z,E.centerY-tt,b.Ss,b.Qs),E.focus=new At(z,tt),E.sv--}}for(x=a.network.edges.iterator;x.next();)x.value.network=y;a.network=y}function Rx(a,y){var x=y.Hj;if(x!==null&&x.count!==0){var E=y.centerX,b=y.centerY,z=y.width,tt=y.height;y.We!==null&&0<y.We.count&&(tt=y.We.M(0),z=tt.Ss,tt=tt.Qs),z=ue.sqrt(z*z+tt*tt)/2;for(var rt=!1,ot=tt=0,st=0,ut=y.vertexes.iterator;ut.next();){var ft=ut.value;1>=ft.Vd?ot++:(rt=!0,st++,tt+=Math.atan2(y.centerY-ft.centerY,y.centerX-ft.centerX))}if(ot!==0){for(0<st&&(tt/=st),st=y=0,y=rt?2*Math.PI/(ot+1):2*Math.PI/ot,ot%2===0&&(st=y/2),1<x.count&&x.sort(function(yt,wt){return yt===null||wt===null||yt===wt?0:wt.width*wt.height-yt.width*yt.height}),rt=ot%2===0?0:1,x=x.iterator;x.next();)if(ot=x.value,!(1<ot.Vd||a.isFixed(ot))){for(ut=null,ft=ot.edges.iterator;ft.next();){ut=ft.value;break}ft=ot.width;var mt=ot.height;ft=ue.sqrt(ft*ft+mt*mt)/2,ut=z+ut.length+ft,ft=tt+(y*(rt/2>>1)+st)*(rt%2===0?1:-1),ot.centerX=E+ut*Math.cos(ft),ot.centerY=b+ut*Math.sin(ft),rt++}}}}function jS(a,y,x,E,b,z,tt){var rt=9e19,ot=-1,st=0;t:for(;st<y;st++){var ut=a[st],ft=ut.x-x,mt=ut.y-E;if(ft=ft*ft+mt*mt,ft<rt){for(mt=st-1;0<=mt;mt--)if(a[mt].y>ut.y&&a[mt].x-ut.x<b+tt.width)continue t;for(mt=st+1;mt<y;mt++)if(a[mt].x>ut.x&&a[mt].y-ut.y<z+tt.height)continue t;ot=st,rt=ft}}return ot}Da.prototype.Cu=function(){if(this.comments)for(var a=this.network.vertexes.iterator;a.next();)this.addComments(a.value)},Da.prototype.addComments=function(a){var y=a.node;if(y!==null)for(y=y.Mu();y.next();){var x=y.value;if(x.category==="Comment"&&x.isVisible()){var E=this.network.ki(x);E===null&&(E=this.network.Bl(x)),E.charge=this.defaultCommentElectricalCharge,x=null;for(var b=E.destinationEdges;b.next();){var z=b.value;if(z.toVertex===a){x=z;break}}if(x===null){for(b=E.sourceEdges;b.next();)if(z=b.value,z.fromVertex===a){x=z;break}}x===null&&(x=this.network.Zj(a,E,null)),x.length=this.defaultCommentSpringLength}}};function zS(a,y){var x=a.bounds,E=x.x;a=x.y;var b=x.width;x=x.height;var z=y.bounds,tt=z.x;y=z.y;var rt=z.width;return z=z.height,E+b<tt?a>y+z?(x=E+b-tt,a=a-y-z,ue.sqrt(x*x+a*a)):a+x<y?(E=E+b-tt,a=a+x-y,ue.sqrt(E*E+a*a)):tt-(E+b):E>tt+rt?a>y+z?(x=E-tt-rt,a=a-y-z,ue.sqrt(x*x+a*a)):a+x<y?(E=E-tt-rt,a=a+x-y,ue.sqrt(E*E+a*a)):E-(tt+rt):a>y+z?a-(y+z):a+x<y?y-(a+x):.1}function GS(a,y){for(a.ah=null,y=a.An+y;a.An<y&&(a.An++,jx(a)););a.ah=null}function jx(a){a.ah===null&&(a.ah=a.network.vertexes.Fa());var y=a.ah;if(0>=y.length)return!1;var x=y[0];x.forceX=0,x.forceY=0;for(var E=x.centerX,b=E,z=x=x.centerY,tt=1;tt<y.length;tt++){var rt=y[tt];rt.forceX=0,rt.forceY=0;var ot=rt.centerX;rt=rt.centerY,E=Math.min(E,ot),b=Math.max(b,ot),x=Math.min(x,rt),z=Math.max(z,rt)}(b=b-E>z-x)?y.sort(function(bt,Zt){return bt===null||Zt===null||bt===Zt?0:bt.centerX-Zt.centerX}):y.sort(function(bt,Zt){return bt===null||Zt===null||bt===Zt?0:bt.centerY-Zt.centerY}),x=a.Zf;var st=E=rt=0;for(z=0;z<y.length;z++){tt=y[z],E=tt.bounds,rt=tt.focus,ot=E.x+rt.x;var ut=E.y+rt.y;E=tt.charge*a.electricalFieldX(ot,ut),st=tt.charge*a.electricalFieldY(ot,ut),E+=tt.mass*a.gravitationalFieldX(ot,ut),st+=tt.mass*a.gravitationalFieldY(ot,ut),tt.forceX+=E,tt.forceY+=st;for(var ft=z+1;ft<y.length;ft++){var mt=y[ft];if(mt!==tt){E=mt.bounds,rt=mt.focus,st=E.x+rt.x;var yt=E.y+rt.y;if(ot-st>x||st-ot>x){if(b)break}else if(ut-yt>x||yt-ut>x){if(!b)break}else{var wt=zS(tt,mt);1>wt?(E=a.randomNumberGenerator,E===null&&(a.randomNumberGenerator=E=new S0),wt=E.random(),rt=E.random(),ot>st?(E=Math.abs(mt.bounds.right-tt.bounds.x),E=(1+E)*wt):ot<st?(E=Math.abs(mt.bounds.x-tt.bounds.right),E=-(1+E)*wt):(E=Math.max(mt.width,tt.width),E=(1+E)*wt-E/2),ut>yt?(st=Math.abs(mt.bounds.bottom-tt.bounds.y),st=(1+st)*rt):ot<st?(st=Math.abs(mt.bounds.y-tt.bounds.bottom),st=-(1+st)*rt):(st=Math.max(mt.height,tt.height),st=(1+st)*rt-st/2)):(rt=-(tt.charge*mt.charge)/(wt*wt),E=(st-ot)/wt*rt,st=(yt-ut)/wt*rt),tt.forceX+=E,tt.forceY+=st,mt.forceX-=E,mt.forceY-=st}}}}for(b=a.network.edges.iterator;b.next();)rt=b.value,x=rt.fromVertex,z=rt.toVertex,tt=x.bounds,ot=x.focus,E=tt.x+ot.x,tt=tt.y+ot.y,ut=z.bounds,ft=z.focus,ot=ut.x+ft.x,ut=ut.y+ft.y,ft=zS(x,z),1>ft?(ft=a.randomNumberGenerator,ft===null&&(a.randomNumberGenerator=ft=new S0),rt=ft.random(),ft=ft.random(),E=(E>ot?1:-1)*(1+(z.width>x.width?z.width:x.width))*rt,st=(tt>ut?1:-1)*(1+(z.height>x.height?z.height:x.height))*ft):(rt=rt.stiffness*(ft-rt.length),E=(ot-E)/ft*rt,st=(ut-tt)/ft*rt),x.forceX+=E,x.forceY+=st,z.forceX-=E,z.forceY-=st;for(b=E=0;b<y.length;b++)x=y[b],a.isFixed(x)?a.moveFixedVertex(x):E=Math.max(E,a.moveVertex(x)||0);return E>a.epsilonDistance*a.epsilonDistance}Da.prototype.moveVertex=function(a){var y=a.forceX,x=a.forceY,E=this.moveLimit;return y<-E?y=-E:y>E&&(y=E),x<-E?x=-E:x>E&&(x=E),a.centerX+=y,a.centerY+=x,y*y+x*x},Da.prototype.moveFixedVertex=function(){},Da.prototype.commitLayout=function(){this.yv(),this.commitNodes(),this.isRouting&&this.commitLinks()},Da.prototype.yv=function(){if(this.setsPortSpots)for(var a=this.network.edges.iterator;a.next();){var y=a.value.link;y!==null&&(y.fromSpot=Bo,y.toSpot=Bo)}},Da.prototype.commitNodes=function(){var a=0,y=0;if(this.arrangesToOrigin){var x=Ee.alloc();this.computeBounds(this.network,x),y=this.arrangementOrigin,a=y.x-x.x,y=y.y-x.y,Ee.free(x)}x=Ee.alloc();for(var E=this.network.vertexes.iterator;E.next();){var b=E.value;(a!==0||y!==0)&&(x.assign(b.bounds),x.x+=a,x.y+=y,b.bounds=x),b.commit()}Ee.free(x)},Da.prototype.commitLinks=function(){for(var a=this.network.edges.iterator;a.next();)a.value.commit()},Da.prototype.springStiffness=function(a){return a=a.stiffness,isNaN(a)?this.Hk:a},Da.prototype.springLength=function(a){return a=a.length,isNaN(a)?this.Gk:a},Da.prototype.electricalCharge=function(a){return a=a.charge,isNaN(a)?this.Ek:a},Da.prototype.electricalFieldX=function(){return 0},Da.prototype.electricalFieldY=function(){return 0},Da.prototype.gravitationalMass=function(a){return a=a.mass,isNaN(a)?this.Fk:a},Da.prototype.gravitationalFieldX=function(){return 0},Da.prototype.gravitationalFieldY=function(){return 0},Da.prototype.isFixed=function(a){return a.isFixed},ge.Object.defineProperties(Da.prototype,{currentIteration:{get:function(){return this.An}},arrangementSpacing:{get:function(){return this.$d},set:function(a){this.$d.D(a)||(this.$d.assign(a),this.C())}},arrangesToOrigin:{get:function(){return this.Bm},set:function(a){this.Bm!==a&&(this.Bm=a,this.C())}},setsPortSpots:{get:function(){return this.sf},set:function(a){this.sf!==a&&(this.sf=a,this.C())}},comments:{get:function(){return this.td},set:function(a){this.td!==a&&(this.td=a,this.C())}},maxIterations:{get:function(){return this.dl},set:function(a){this.dl!==a&&0<=a&&(this.dl=a,this.C())}},epsilonDistance:{get:function(){return this.$m},set:function(a){this.$m!==a&&0<a&&(this.$m=a,this.C())}},infinityDistance:{get:function(){return this.Zf},set:function(a){this.Zf!==a&&1<a&&(this.Zf=a,this.C())}},moveLimit:{get:function(){return this.In},set:function(a){this.In!==a&&1<a&&(this.In=a,this.C())}},randomNumberGenerator:{get:function(){return this.fo},set:function(a){this.fo!==a&&(a!==null&&typeof a.random!="function"&&Gt('ForceDirectedLayout.randomNumberGenerator must have a "random()" function on it: '+a),this.fo=a)}},defaultSpringStiffness:{get:function(){return this.Hk},set:function(a){this.Hk!==a&&(this.Hk=a,this.C())}},defaultSpringLength:{get:function(){return this.Gk},set:function(a){this.Gk!==a&&(this.Gk=a,this.C())}},defaultElectricalCharge:{get:function(){return this.Ek},set:function(a){this.Ek!==a&&(this.Ek=a,this.C())}},defaultGravitationalMass:{get:function(){return this.Fk},set:function(a){this.Fk!==a&&(this.Fk=a,this.C())}},defaultCommentSpringLength:{get:function(){return this.Vm},set:function(a){this.Vm!==a&&(this.Vm=a,this.C())}},defaultCommentElectricalCharge:{get:function(){return this.Um},set:function(a){this.Um!==a&&(this.Um=a,this.C())}}}),Da.className="ForceDirectedLayout";function HS(){this.Tv=this.Sv=this.Qs=this.Ss=this.Rs=0}HS.className="ForceDirectedSubnet";function zc(a){ro.call(this,a)}we(zc,ro),zc.prototype.createVertex=function(){return new Sp(this)},zc.prototype.createEdge=function(){return new xp(this)},zc.className="ForceDirectedNetwork";function Sp(a){qo.call(this,a),this.ia=!1,this.Ha=this.u=NaN,this.sh=this.Vd=this.V=this.F=0,this.We=this.Hj=null,this.sv=0}we(Sp,qo),ge.Object.defineProperties(Sp.prototype,{isFixed:{get:function(){return this.ia},set:function(a){this.ia!==a&&(this.ia=a)}},charge:{get:function(){return this.u},set:function(a){this.u!==a&&(this.u=a)}},mass:{get:function(){return this.Ha},set:function(a){this.Ha!==a&&(this.Ha=a)}},forceX:{get:function(){return this.F},set:function(a){this.F!==a&&(this.F=a)}},forceY:{get:function(){return this.V},set:function(a){this.V!==a&&(this.V=a)}}}),Sp.className="ForceDirectedVertex";function xp(a){Is.call(this,a),this.j=this.o=NaN}we(xp,Is),ge.Object.defineProperties(xp.prototype,{stiffness:{get:function(){return this.o},set:function(a){this.o!==a&&(this.o=a)}},length:{get:function(){return this.j},set:function(a){this.j!==a&&(this.j=a)}}}),xp.className="ForceDirectedEdge";function S0(){var a=0;a===void 0&&(a=42),this.seed=a,this.ay=48271,this.ey=2147483647,this.Q=44488.07041494893,this.gy=3399,this.by=1/2147483647,this.random()}S0.prototype.random=function(){var a=this.seed%this.Q*this.ay-this.seed/this.Q*this.gy;return 0<a?this.seed=a:this.seed=a+this.ey,this.seed*this.by},S0.className="RandomNumberGenerator";function Ur(a){mo.call(this),this.kc=this.ie=25,this.K=0,this.Dk=E0,this.Zk=k0,this.Qk=L0,this.bj=4,this.rk=b0,this.bg=15,this.sf=!0,this.Cn=4,this.Ra=this.Iq=this.Ia=-1,this.Md=this.Hn=0,this.Ta=this.Kd=this.Ld=this.he=this.tc=null,this.Kn=0,this.Jn=this.kj=null,this.le=0,this.fl=null,this.Rf=new At,this.He=[],this.He.length=100,this.xw=this.ve=0,a&&Object.assign(this,a)}we(Ur,mo),Ur.prototype.cloneProtected=function(a){mo.prototype.cloneProtected.call(this,a),a.ie=this.ie,a.kc=this.kc,a.K=this.K,a.Dk=this.Dk,a.Zk=this.Zk,a.Qk=this.Qk,a.bj=this.bj,a.rk=this.rk,a.bg=this.bg,a.sf=this.sf,a.Cn=this.Cn,a.ve=this.ve},Ur.prototype.qb=function(a){a.classType===Ur?a.name.indexOf("Aggressive")===0?this.aggressiveOption=a:a.name.indexOf("Cycle")===0?this.cycleRemoveOption=a:a.name.indexOf("Init")===0?this.initializeOption=a:a.name.indexOf("Layer")===0?this.layeringOption=a:Gt("Unknown enum value: "+a):mo.prototype.qb.call(this,a)},Ur.prototype.createNetwork=function(){return new Yf(this)},Ur.prototype.doLayout=function(a){for(this.network===null&&(this.network=this.makeNetwork(a)),this.arrangementOrigin=this.initialOrigin(this.arrangementOrigin),this.Iq=-1,this.Md=this.Hn=0,this.fl=this.Jn=this.kj=null,a=0;a<this.He.length;a++)this.He[a]=null;if(0<this.network.vertexes.count){for(this.network.Ko(),this.cycleRemoveOption!==Pp&&this.removeCycles(),a=this.network.vertexes.iterator;a.next();)a.value.layer=-1;for(this.Ia=-1,this.assignLayers(),a.reset();a.next();)this.Ia=Math.max(this.Ia,a.value.layer);this.cycleRemoveOption===Pp&&this.removeCycles(),a=this.network;for(var y=[],x=a.edges.iterator;x.next();){var E=x.value;E.valid=!1,y.push(E)}for(x=0;x<y.length;x++){E=y[x];var b=E.fromVertex,z=E.toVertex;if(!(E.valid||(b.node===null&&b.data===null||z.node===null&&z.data===null)&&b.layer===z.layer)){var tt=0,rt=0,ot=0,st=0;if(E.link!==null){if(rt=E.link,rt===null)continue;var ut=b.node;if(tt=z.node,ut===null||tt===null)continue;var ft=rt.fromNode;ot=rt.toNode;for(var mt=rt.fromPort;mt!==null&&!mt.Ed();)mt=mt.panel;for(rt=rt.toPort;rt!==null&&!rt.Ed();)rt=rt.panel;if(E.rev){st=ft;var yt=mt;ft=ot,mt=rt,ot=st,rt=yt}var wt=b.focus;st=z.focus;var bt=E.rev?z.bounds:b.bounds;yt=At.alloc(),ut!==ft?bt.w()&&ft.isVisible()?ft.actualBounds.w()?(Ch(ft,mt,er,yt),yt.x+=ft.actualBounds.x-bt.x,yt.y+=ft.actualBounds.y-bt.y):(Ch(ft,mt,er,yt),yt.w()||yt.assign(wt)):yt.assign(wt):bt.w()?(Ch(ft,mt,er,yt),yt.w()||yt.assign(wt)):yt.assign(wt),ft=E.rev?b.bounds:z.bounds,ut=At.alloc(),tt!==ot?ft.w()&&ot.isVisible()?ot.actualBounds.w()?(Ch(ot,rt,er,ut),ut.x+=ot.actualBounds.x-ft.x,ut.y+=ot.actualBounds.y-ft.y):(Ch(ot,rt,er,ut),ut.w()||ut.assign(st)):ut.assign(st):ft.w()?(Ch(ot,rt,er,ut),ut.w()||ut.assign(st)):ut.assign(st),this.K===90||this.K===270?(tt=Math.round((yt.x-wt.x)/this.kc),ot=yt.x,rt=Math.round((ut.x-st.x)/this.kc),st=ut.x):(tt=Math.round((yt.y-wt.y)/this.kc),ot=yt.y,rt=Math.round((ut.y-st.y)/this.kc),st=ut.y),At.free(yt),At.free(ut),E.portFromColOffset=tt,E.portFromPos=ot,E.portToColOffset=rt,E.portToPos=st}else E.portFromColOffset=0,E.portFromPos=0,E.portToColOffset=0,E.portToPos=0;if(yt=b.layer,ut=z.layer,ft=0,bt=E.link,bt!==null){var Zt=bt.fromPort,It=bt.toPort;if(Zt!==null&&It!==null){var Yt=bt.fromNode;if(mt=bt.toNode,Yt!==null&&mt!==null){var Jt=C0(this,!0),qt=C0(this,!1),ae=this.setsPortSpots?Jt:bt.computeSpot(!0,Zt);wt=this.setsPortSpots?qt:bt.computeSpot(!1,It);var Ce=bt.isOrthogonal;ae.$c()&&ae.Hf(qt)&&wt.$c()&&wt.Hf(Jt)?ft=0:(Jt=bt.getLinkPoint(Yt,Zt,ae,!0,Ce,mt,It,At.alloc()),qt=bt.getLinkDirection(Yt,Zt,Jt,ae,!0,Ce,mt,It),At.free(Jt),ae.ys()||qt!==_S(this,E,!0)?this.setsPortSpots&&Yt!==null&&Yt.ports.count===1&&E.rev&&(ft+=1):ft+=1,ae=bt.getLinkPoint(mt,It,wt,!1,Ce,Yt,Zt,At.alloc()),bt=bt.getLinkDirection(mt,It,ae,wt,!1,Ce,Yt,Zt),At.free(ae),wt.ys()||bt!==_S(this,E,!1)?this.setsPortSpots&&mt!==null&&mt.ports.count===1&&E.rev&&(ft+=2):ft+=2)}}}if(mt=ft,ft=mt===1||mt===3,(mt=mt===2||mt===3)&&(wt=a.createVertex(),wt.node=null,wt.Dj=1,wt.layer=yt,wt.near=b,a.dh(wt),b=a.Zj(b,wt,E.link),b.valid=!1,b.rev=E.rev,b.portFromColOffset=tt,b.portToColOffset=0,b.portFromPos=ot,b.portToPos=0,b=wt),bt=1,ft&&bt--,yt-ut>bt&&0<yt){for(E.valid=!1,wt=a.createVertex(),wt.node=null,wt.Dj=2,wt.layer=yt-1,a.dh(wt),b=a.Zj(b,wt,E.link),b.valid=!0,b.rev=E.rev,b.portFromColOffset=mt?0:tt,b.portToColOffset=0,b.portFromPos=mt?0:ot,b.portToPos=0,b=wt,yt--;yt-ut>bt&&0<yt;)wt=a.createVertex(),wt.node=null,wt.Dj=3,wt.layer=yt-1,a.dh(wt),b=a.Zj(b,wt,E.link),b.valid=!0,b.rev=E.rev,b.portFromColOffset=0,b.portToColOffset=0,b.portFromPos=0,b.portToPos=0,b=wt,yt--;b=a.Zj(wt,z,E.link),b.valid=!ft,ft&&(wt.near=z),b.rev=E.rev,b.portFromColOffset=0,b.portToColOffset=rt,b.portFromPos=0,b.portToPos=st}else E.valid=!0}}for(a=this.tc=[],y=0;y<=this.Ia;y++)a[y]=0;for(y=this.network.vertexes.iterator;y.next();)y.value.index=-1;for(this.initializeIndices(),this.Iq=-1,x=this.Md=this.Hn=0;x<=this.Ia;x++)a[x]>a[this.Md]&&(this.Iq=a[x]-1,this.Md=x),a[x]<a[this.Hn]&&(this.Hn=x);for(this.fl=[],x=0;x<a.length;x++)this.fl[x]=[];for(y.reset();y.next();)a=y.value,this.fl[a.layer][a.index]=a;for(this.Ra=-1,a=0;a<=this.Ia;a++){for(y=fd(this,a),x=0,E=this.tc[a],z=0;z<E;z++)b=y[z],x+=this.nodeMinColumnSpace(b,!0),b.column=x,x+=1,x+=this.nodeMinColumnSpace(b,!1);this.Ra=Math.max(this.Ra,x-1),gd(this,a,y)}this.reduceCrossings(),this.straightenAndPack(),this.updateParts()}this.network=null,this.isValidLayout=!0},Ur.prototype.linkMinLength=function(){return 1};function gy(a){var y=a.fromVertex.node||a.fromVertex.data;return a=a.toVertex.node||a.toVertex.data,y===null&&a===null?8:y===null||a===null?4:1}Ur.prototype.nodeMinLayerSpace=function(a,y){return a.node===null&&a.data===null?0:this.K===90||this.K===270?y?a.focus.y+10:a.bounds.height-a.focus.y+10:y?a.focus.x+10:a.bounds.width-a.focus.x+10},Ur.prototype.nodeMinColumnSpace=function(a,y){if(a.node===null&&a.data===null)return 0;var x=y?a.ev:a.dv;return x!==null?x:(x=this.K,x===90||x===270?y?a.ev=a.focus.x/this.kc+1|0:a.dv=(a.bounds.width-a.focus.x)/this.kc+1|0:y?a.ev=a.focus.y/this.kc+1|0:a.dv=(a.bounds.height-a.focus.y)/this.kc+1|0)};function xs(a){a.kj===null&&(a.kj=[]);for(var y=0,x=a.network.vertexes.iterator;x.next();){var E=x.value;a.kj[y]=E.layer,y++,a.kj[y]=E.column,y++,a.kj[y]=E.index,y++}return a.kj}function ll(a,y){var x=0;for(a=a.network.vertexes.iterator;a.next();){var E=a.value;E.layer=y[x],x++,E.column=y[x],x++,E.index=y[x],x++}}function KS(a,y,x){var E=fd(a,y),b=a.tc[y];(a.Jn===null||a.Jn.length<b*b)&&(a.Jn=[]);for(var z=a.Jn,tt=0;tt<b;tt++){var rt=0,ot=E[tt],st=ot.near;if(st!==null&&st.layer===ot.layer)if(ot=st.index,ot>tt)for(var ut=tt+1;ut<ot;ut++){var ft=E[ut];ft.near===st&&ft.Dj===st.Dj||rt++}else for(ut=tt-1;ut>ot;ut--)ft=E[ut],ft.near===st&&ft.Dj===st.Dj||rt++;var mt;if(0<=x)for(ot=E[tt].sourceEdgesArrayAccess,st=0;st<ot.length;st++){var yt=ot[st];if(yt.valid&&yt.fromVertex.layer!==y)for(ft=yt.fromVertex.index,ut=yt.portToPos,yt=yt.portFromPos,mt=st+1;mt<ot.length;mt++){var wt=ot[mt];if(wt.valid&&wt.fromVertex.layer!==y){var bt=wt.fromVertex.index,Zt=wt.portToPos;wt=wt.portFromPos,ut<Zt&&(ft>bt||ft===bt&&yt>wt)&&rt++,Zt<ut&&(bt>ft||bt===ft&&wt>yt)&&rt++}}}if(0>=x){for(ot=E[tt].destinationEdgesArrayAccess,st=0;st<ot.length;st++)if(yt=ot[st],yt.valid&&yt.toVertex.layer!==y)for(ft=yt.toVertex.index,ut=yt.portToPos,yt=yt.portFromPos,mt=st+1;mt<ot.length;mt++)wt=ot[mt],wt.valid&&wt.toVertex.layer!==y&&(bt=wt.toVertex.index,Zt=wt.portToPos,wt=wt.portFromPos,yt<wt&&(ft>bt||ft===bt&&ut>Zt)&&rt++,wt<yt&&(bt>ft||bt===ft&&Zt>ut)&&rt++)}for(z[tt*b+tt]=rt,ot=tt+1;ot<b;ot++){var It=0,Yt=0;if(0<=x){rt=E[tt].sourceEdgesArrayAccess;var Jt=E[ot].sourceEdgesArrayAccess;for(st=0;st<rt.length;st++)if(yt=rt[st],yt.valid&&yt.fromVertex.layer!==y)for(ft=yt.fromVertex.index,yt=yt.portFromPos,mt=0;mt<Jt.length;mt++)wt=Jt[mt],wt.valid&&wt.fromVertex.layer!==y&&(bt=wt.fromVertex.index,wt=wt.portFromPos,(ft<bt||ft===bt&&yt<wt)&&Yt++,(bt<ft||bt===ft&&wt<yt)&&It++)}if(0>=x){for(rt=E[tt].destinationEdgesArrayAccess,Jt=E[ot].destinationEdgesArrayAccess,st=0;st<rt.length;st++)if(yt=rt[st],yt.valid&&yt.toVertex.layer!==y)for(ft=yt.toVertex.index,ut=yt.portToPos,mt=0;mt<Jt.length;mt++)wt=Jt[mt],wt.valid&&wt.toVertex.layer!==y&&(bt=wt.toVertex.index,Zt=wt.portToPos,(ft<bt||ft===bt&&ut<Zt)&&Yt++,(bt<ft||bt===ft&&Zt<ut)&&It++)}z[tt*b+ot]=It,z[ot*b+tt]=Yt}}return gd(a,y,E),z}Ur.prototype.countCrossings=function(){for(var a=0,y=0;y<=this.Ia;y++)for(var x=KS(this,y,1),E=this.tc[y],b=0;b<E;b++)for(var z=b;z<E;z++)a+=x[b*E+z];return a};function x0(a){for(var y=0,x=0;x<=a.Ia;x++){for(var E=a,b=x,z=fd(E,b),tt=E.tc[b],rt=0,ot=0;ot<tt;ot++){var st=z[ot].destinationEdgesArrayAccess;if(st!==null)for(var ut=0;ut<st.length;ut++){var ft=st[ut];if(ft.valid&&ft.toVertex.layer!==b){var mt=ft.fromVertex.column+ft.portFromColOffset,yt=ft.toVertex.column+ft.portToColOffset;rt+=(Math.abs(mt-yt)+1)*gy(ft)}}}gd(E,b,z),y+=rt}return y}Ur.prototype.normalize=function(){var a=1/0;this.Ra=-1;for(var y=this.network.vertexes.iterator;y.next();){var x=y.value;a=Math.min(a,x.column-this.nodeMinColumnSpace(x,!0)),this.Ra=Math.max(this.Ra,x.column+this.nodeMinColumnSpace(x,!1))}for(y.reset();y.next();)y.value.column-=a;this.Ra-=a};function py(a,y,x){for(var E=fd(a,y),b=a.tc[y],z=[],tt=0;tt<b;tt++){var rt=E[tt],ot=null;0>=x&&(ot=rt.sourceEdgesArrayAccess);var st=null;0<=x&&(st=rt.destinationEdgesArrayAccess);var ut=0,ft=0,mt=rt.near;if(mt!==null&&mt.layer===rt.layer&&(ut+=mt.column-1,ft++),ot!==null)for(mt=0;mt<ot.length;mt++){rt=ot[mt];var yt=rt.fromVertex;rt.valid&&!rt.rev&&yt.layer!==y&&(ut+=yt.column,ft++)}if(st!==null)for(ot=0;ot<st.length;ot++)rt=st[ot],mt=rt.toVertex,rt.valid&&!rt.rev&&mt.layer!==y&&(ut+=mt.column,ft++);z[tt]=ft===0?-1:ut/ft}return gd(a,y,E),z}function ZS(a,y,x){for(var E=fd(a,y),b=a.tc[y],z=[],tt=0;tt<b;tt++){var rt=E[tt],ot=null;0>=x&&(ot=rt.sourceEdgesArrayAccess);var st=null;0<=x&&(st=rt.destinationEdgesArrayAccess);var ut=0,ft=[],mt=rt.near;if(mt!==null&&mt.layer===rt.layer&&(ft[ut]=mt.column-1,ut++),rt=void 0,ot!==null)for(mt=0;mt<ot.length;mt++){rt=ot[mt];var yt=rt.fromVertex;rt.valid&&!rt.rev&&yt.layer!==y&&(ft[ut]=yt.column+rt.portFromColOffset,ut++)}if(st!==null)for(ot=0;ot<st.length;ot++)rt=st[ot],mt=rt.toVertex,rt.valid&&!rt.rev&&mt.layer!==y&&(ft[ut]=mt.column+rt.portToColOffset,ut++);ut===0?z[tt]=-1:(ft.sort(function(wt,bt){return wt-bt}),st=ut>>1,z[tt]=ut&1?ft[st]:ft[st-1]+ft[st]>>1)}return gd(a,y,E),z}function wp(a,y,x,E,b,z){if(y.component===E){if(y.component=x,b)for(var tt=y.destinationEdges;tt.next();){var rt=tt.value,ot=rt.toVertex,st=y.layer-ot.layer;rt=a.linkMinLength(rt),st===rt&&wp(a,ot,x,E,b,z)}if(z)for(tt=y.sourceEdges;tt.next();)rt=tt.value,ot=rt.fromVertex,st=ot.layer-y.layer,rt=a.linkMinLength(rt),st===rt&&wp(a,ot,x,E,b,z)}}function my(a,y,x,E,b,z){if(y.component===E){if(y.component=x,b)for(var tt=y.destinationEdges;tt.next();)my(a,tt.value.toVertex,x,E,b,z);if(z)for(y=y.sourceEdges;y.next();)my(a,y.value.fromVertex,x,E,b,z)}}Ur.prototype.removeCycles=function(){for(var a=this.network.edges.iterator;a.next();)a.value.rev=!1;switch(this.Dk){default:case Sy:a=this.network;var y=0,x=a.vertexes.count-1,E=[];E.length=x+1;for(var b=a.vertexes.iterator;b.next();)b.value.valid=!0;for(;zx(a)!==null;){for(b=WS(a);b!==null;)E[x]=b,x--,b.valid=!1,b=WS(a);for(b=VS(a);b!==null;)E[y]=b,y++,b.valid=!1,b=VS(a);b=null;for(var z=0,tt=this.network.vertexes.iterator;tt.next();){var rt=tt.value;if(rt.valid){for(var ot=0,st=rt.destinationEdges;st.next();)st.value.toVertex.valid&&ot++;st=0;for(var ut=rt.sourceEdges;ut.next();)ut.value.fromVertex.valid&&st++;(b===null||z<ot-st)&&(b=rt,z=ot-st)}}b!==null&&(E[y]=b,y++,b.valid=!1)}for(y=0;y<a.vertexes.count;y++)E[y].index=y;for(E=a.edges.iterator;E.next();)y=E.value,y.fromVertex.index>y.toVertex.index&&(a.gm(y),y.rev=!0);break;case E0:for(E=this.network.vertexes.iterator;E.next();)a=E.value,a.Ll=-1,a.finish=-1;for(a=this.network.edges.iterator;a.next();)a.value.forest=!1;for(this.Kn=0,E.reset();E.next();)y=E.value,y.sourceEdges.count===0&&vy(this,y);for(E.reset();E.next();)y=E.value,y.Ll===-1&&vy(this,y);for(a.reset();a.next();)E=a.value,E.forest||(y=E.fromVertex,x=y.finish,b=E.toVertex,z=b.finish,b.Ll<y.Ll&&x<z&&(this.network.gm(E),E.rev=!0));break;case Pp:for(a=this.network,y=a.vertexes.iterator,E=1/0;y.next();)E=Math.min(E,y.value.layer);if(1/0>E){if(0>E)for(y.reset();y.next();)y.value.layer-=E;for(E=[],y.reset();y.next();)x=y.value,b=E[x.layer],b===void 0?E[x.layer]=[x]:b.push(x);for(x=y=0;x<E.length;x++)if(b=E[x],!b||b.length===0)y++;else if(0<x)for(z=0;z<b.length;z++)b[z].layer-=y;for(E=a.edges.iterator;E.next();)y=E.value,y.fromVertex.layer<y.toVertex.layer&&(a.gm(y),y.rev=!0)}}};function zx(a){for(a=a.vertexes.iterator;a.next();){var y=a.value;if(y.valid)return y}return null}function WS(a){for(a=a.vertexes.iterator;a.next();){var y=a.value;if(y.valid){for(var x=!0,E=y.destinationEdges;E.next();)if(E.value.toVertex.valid){x=!1;break}if(x)return y}}return null}function VS(a){for(a=a.vertexes.iterator;a.next();){var y=a.value;if(y.valid){for(var x=!0,E=y.sourceEdges;E.next();)if(E.value.fromVertex.valid){x=!1;break}if(x)return y}}return null}function vy(a,y){y.Ll=a.Kn,a.Kn++;for(var x=y.destinationEdges;x.next();){var E=x.value,b=E.toVertex;b.Ll===-1&&(E.forest=!0,vy(a,b))}y.finish=a.Kn,a.Kn++}Ur.prototype.assignLayers=function(){switch(this.Zk){case xy:US(this);break;case wy:for(var a,y=this.network.vertexes.iterator;y.next();)a=XS(this,y.value),this.Ia=Math.max(a,this.Ia);for(y.reset();y.next();)a=y.value,a.layer=this.Ia-a.layer;break;default:case k0:for(US(this),y=this.network.vertexes.iterator;y.next();)y.value.valid=!1;for(y.reset();y.next();)a=y.value,a.sourceEdges.count===0&&JS(this,a);for(a=1/0,y.reset();y.next();)a=Math.min(a,y.value.layer);for(this.Ia=-1,y.reset();y.next();){var x=y.value;x.layer-=a,this.Ia=Math.max(this.Ia,x.layer)}}};function US(a){for(var y=a.network.vertexes.iterator;y.next();){var x=YS(a,y.value);a.Ia=Math.max(x,a.Ia)}}function YS(a,y){var x=0;if(y.layer===-1){for(var E=y.destinationEdges;E.next();){var b=E.value,z=b.toVertex;b=a.linkMinLength(b),x=Math.max(x,YS(a,z)+b)}y.layer=x}else x=y.layer;return x}function XS(a,y){var x=0;if(y.layer===-1){for(var E=y.sourceEdges;E.next();){var b=E.value,z=b.fromVertex;b=a.linkMinLength(b),x=Math.max(x,XS(a,z)+b)}y.layer=x}else x=y.layer;return x}function JS(a,y){if(!y.valid){y.valid=!0;for(var x=y.destinationEdges;x.next();)JS(a,x.value.toVertex);for(x=a.network.vertexes.iterator;x.next();)x.value.component=-1;for(var E=y.sourceEdgesArrayAccess,b=E.length,z=0;z<b;z++){var tt=E[z],rt=tt.fromVertex,ot=tt.toVertex;tt=a.linkMinLength(tt),rt.layer-ot.layer>tt&&wp(a,rt,0,-1,!0,!1)}for(wp(a,y,1,-1,!0,!0);y.component!==0;){for(z=0,E=1/0,rt=0,ot=null,tt=a.network.vertexes.iterator;tt.next();){var st=tt.value;if(st.component===1){var ut=0,ft=!1,mt=st.sourceEdgesArrayAccess;b=mt.length;for(var yt=0;yt<b;yt++){var wt=mt[yt],bt=wt.fromVertex;ut+=1,bt.component!==1&&(z+=1,bt=bt.layer-st.layer,wt=a.linkMinLength(wt),E=Math.min(E,bt-wt))}for(mt=st.destinationEdgesArrayAccess,b=mt.length,yt=0;yt<b;yt++)wt=mt[yt].toVertex,--ut,wt.component!==1?--z:ft=!0;(ot===null||ut<rt)&&!ft&&(ot=st,rt=ut)}}if(0<z){for(x.reset();x.next();)b=x.value,b.component===1&&(b.layer+=E);y.component=0}else ot.component=0}for(x=a.network.vertexes.iterator;x.next();)x.value.component=-1;for(wp(a,y,1,-1,!0,!1);y.component!==0;){for(E=0,b=1/0,z=0,rt=null,ot=a.network.vertexes.iterator;ot.next();)if(tt=ot.value,tt.component===1){for(st=0,ut=!1,mt=tt.sourceEdgesArrayAccess,ft=mt.length,yt=0;yt<ft;yt++)wt=mt[yt].fromVertex,st+=1,wt.component!==1?E+=1:ut=!0;for(mt=tt.destinationEdgesArrayAccess,ft=mt.length,yt=0;yt<ft;yt++)wt=mt[yt],bt=wt.toVertex,--st,bt.component!==1&&(--E,bt=tt.layer-bt.layer,wt=a.linkMinLength(wt),b=Math.min(b,bt-wt));(rt===null||st>z)&&!ut&&(rt=tt,z=st)}if(0>E){for(x.reset();x.next();)E=x.value,E.component===1&&(E.layer-=b);y.component=0}else rt.component=0}}}function _S(a,y,x){return a.K===90?x&&!y.rev||!x&&y.rev?270:90:a.K===180?x&&!y.rev||!x&&y.rev?0:180:a.K===270?x&&!y.rev||!x&&y.rev?90:270:x&&!y.rev||!x&&y.rev?180:0}Ur.prototype.initializeIndices=function(){switch(this.Qk){default:case Cy:for(var a=this.network.vertexes.iterator;a.next();){var y=a.value,x=y.layer;y.index=this.tc[x],this.tc[x]++}break;case L0:for(a=this.network.vertexes.iterator,y=this.Ia;0<=y;y--)for(a.reset();a.next();)x=a.value,x.layer===y&&x.index===-1&&QS(this,x);break;case Py:for(a=this.network.vertexes.iterator,y=0;y<=this.Ia;y++)for(a.reset();a.next();)x=a.value,x.layer===y&&x.index===-1&&qS(this,x)}};function QS(a,y){var x=y.layer;for(y.index=a.tc[x],a.tc[x]++,y=y.destinationEdgesArrayAccess,x=!0;x;){x=!1;for(var E=0;E<y.length-1;E++){var b=y[E],z=y[E+1];b.portFromColOffset>z.portFromColOffset&&(x=!0,y[E]=z,y[E+1]=b)}}for(x=0;x<y.length;x++)E=y[x],E.valid&&(E=E.toVertex,E.index===-1&&QS(a,E))}function qS(a,y){var x=y.layer;y.index=a.tc[x],a.tc[x]++,y=y.sourceEdgesArrayAccess;for(var E=!0;E;)for(E=!1,x=0;x<y.length-1;x++){var b=y[x],z=y[x+1];b.portToColOffset>z.portToColOffset&&(E=!0,y[x]=z,y[x+1]=b)}for(x=0;x<y.length;x++)E=y[x],E.valid&&(E=E.fromVertex,E.index===-1&&qS(a,E))}Ur.prototype.reduceCrossings=function(){var a=this.countCrossings(),y=xs(this),x,E;for(x=0;x<this.bj;x++){for(E=0;E<=this.Ia;E++)w0(this,E,1),xl(this,E,1);var b=this.countCrossings();for(b<a&&(a=b,y=xs(this)),E=this.Ia;0<=E;E--)w0(this,E,-1),xl(this,E,-1);b=this.countCrossings(),b<a&&(a=b,y=xs(this))}for(ll(this,y),x=0;x<this.bj;x++){for(E=0;E<=this.Ia;E++)w0(this,E,0),xl(this,E,0);for(b=this.countCrossings(),b<a&&(a=b,y=xs(this)),E=this.Ia;0<=E;E--)w0(this,E,0),xl(this,E,0);b=this.countCrossings(),b<a&&(a=b,y=xs(this))}ll(this,y);var z,tt,rt;switch(this.rk){case Ey:break;case ky:for(rt=a+1;(E=this.countCrossings())<rt;)for(rt=E,x=this.Ia;0<=x;x--)for(tt=0;tt<=x;tt++){for(z=!0;z;)for(z=!1,E=x;E>=tt;E--)z=xl(this,E,-1)||z;for(b=this.countCrossings(),b>=a?ll(this,y):(a=b,y=xs(this)),z=!0;z;)for(z=!1,E=x;E>=tt;E--)z=xl(this,E,1)||z;for(b=this.countCrossings(),b>=a?ll(this,y):(a=b,y=xs(this)),z=!0;z;)for(z=!1,E=tt;E<=x;E++)z=xl(this,E,1)||z;for(b>=a?ll(this,y):(a=b,y=xs(this)),z=!0;z;)for(z=!1,E=tt;E<=x;E++)z=xl(this,E,-1)||z;for(b>=a?ll(this,y):(a=b,y=xs(this)),z=!0;z;)for(z=!1,E=x;E>=tt;E--)z=xl(this,E,0)||z;for(b>=a?ll(this,y):(a=b,y=xs(this)),z=!0;z;)for(z=!1,E=tt;E<=x;E++)z=xl(this,E,0)||z;b>=a?ll(this,y):(a=b,y=xs(this))}break;default:case b0:for(x=this.Ia,tt=0,rt=a+1;(E=this.countCrossings())<rt;){for(rt=E,z=!0;z;)for(z=!1,E=x;E>=tt;E--)z=xl(this,E,-1)||z;for(b=this.countCrossings(),b>=a?ll(this,y):(a=b,y=xs(this)),z=!0;z;)for(z=!1,E=x;E>=tt;E--)z=xl(this,E,1)||z;for(b=this.countCrossings(),b>=a?ll(this,y):(a=b,y=xs(this)),z=!0;z;)for(z=!1,E=tt;E<=x;E++)z=xl(this,E,1)||z;for(b>=a?ll(this,y):(a=b,y=xs(this)),z=!0;z;)for(z=!1,E=tt;E<=x;E++)z=xl(this,E,-1)||z;for(b>=a?ll(this,y):(a=b,y=xs(this)),z=!0;z;)for(z=!1,E=x;E>=tt;E--)z=xl(this,E,0)||z;for(b>=a?ll(this,y):(a=b,y=xs(this)),z=!0;z;)for(z=!1,E=tt;E<=x;E++)z=xl(this,E,0)||z;b>=a?ll(this,y):(a=b,y=xs(this))}}ll(this,y)};function w0(a,y,x){var E=fd(a,y),b=a.tc[y],z=ZS(a,y,x),tt=py(a,y,x);for(x=0;x<b;x++)tt[x]===-1&&(tt[x]=E[x].column),z[x]===-1&&(z[x]=E[x].column);for(var rt=!0,ot;rt;)for(rt=!1,x=0;x<b-1;x++)(z[x+1]<z[x]||z[x+1]===z[x]&&tt[x+1]<tt[x])&&(rt=!0,ot=z[x],z[x]=z[x+1],z[x+1]=ot,ot=tt[x],tt[x]=tt[x+1],tt[x+1]=ot,ot=E[x],E[x]=E[x+1],E[x+1]=ot);for(x=z=0;x<b;x++)ot=E[x],ot.index=x,z+=a.nodeMinColumnSpace(ot,!0),ot.column=z,z+=1,z+=a.nodeMinColumnSpace(ot,!1);gd(a,y,E)}function xl(a,y,x){var E=fd(a,y),b=a.tc[y];x=KS(a,y,x);var z,tt=[];for(z=0;z<b;z++)tt[z]=-1;var rt=[];for(z=0;z<b;z++)rt[z]=-1;for(var ot=!1,st=!0;st;)for(st=!1,z=0;z<b-1;z++){var ut=x[E[z].index*b+E[z+1].index],ft=x[E[z+1].index*b+E[z].index],mt=0,yt=0,wt=E[z].column,bt=E[z+1].column,Zt=a.nodeMinColumnSpace(E[z],!0),It=a.nodeMinColumnSpace(E[z],!1),Yt=a.nodeMinColumnSpace(E[z+1],!0),Jt=a.nodeMinColumnSpace(E[z+1],!1);Zt=wt-Zt+Yt,It=bt-It+Jt;var qt=E[z].sourceEdges.iterator;for(qt.reset();qt.next();)if(Yt=qt.value,Jt=Yt.fromVertex,Yt.valid&&Jt.layer===y){for(Yt=0;E[Yt]!==Jt;)Yt++;Yt<z&&(mt+=2*(z-Yt),yt+=2*(z+1-Yt)),Yt===z+1&&(mt+=1),Yt>z+1&&(mt+=4*(Yt-z),yt+=4*(Yt-(z+1)))}for(qt=E[z].destinationEdges.iterator,qt.reset();qt.next();)if(Yt=qt.value,Jt=Yt.toVertex,Yt.valid&&Jt.layer===y){for(Yt=0;E[Yt]!==Jt;)Yt++;Yt===z+1&&(yt+=1)}for(qt=E[z+1].sourceEdges.iterator,qt.reset();qt.next();)if(Yt=qt.value,Jt=Yt.fromVertex,Yt.valid&&Jt.layer===y){for(Yt=0;E[Yt]!==Jt;)Yt++;Yt<z&&(mt+=2*(z+1-Yt),yt+=2*(z-Yt)),Yt===z&&(yt+=1),Yt>z+1&&(mt+=4*(Yt-(z+1)),yt+=4*(Yt-z))}for(qt=E[z+1].destinationEdges.iterator,qt.reset();qt.next();)if(Yt=qt.value,Jt=Yt.toVertex,Yt.valid&&Jt.layer===y){for(Yt=0;E[Yt]!==Jt;)Yt++;Yt===z&&(mt+=1)}Yt=Jt=0,qt=tt[E[z].index];var ae=rt[E[z].index],Ce=tt[E[z+1].index],In=rt[E[z+1].index];qt!==-1&&(Jt+=Math.abs(qt-wt),Yt+=Math.abs(qt-It)),ae!==-1&&(Jt+=Math.abs(ae-wt),Yt+=Math.abs(ae-It)),Ce!==-1&&(Jt+=Math.abs(Ce-bt),Yt+=Math.abs(Ce-Zt)),In!==-1&&(Jt+=Math.abs(In-bt),Yt+=Math.abs(In-Zt)),(yt<mt-.5||yt===mt&&ft<ut-.5||yt===mt&&ft===ut&&Yt<Jt-.5)&&(st=ot=!0,E[z].column=It,E[z+1].column=Zt,ut=E[z],E[z]=E[z+1],E[z+1]=ut)}for(z=0;z<b;z++)E[z].index=z;return gd(a,y,E),ot}Ur.prototype.straightenAndPack=function(){if(this.ve===0){var a=(this.bg&1)!==0,y=(this.bg&Yx)!==0;if(1e3<this.network.edges.count&&y&&(a=!1),a){var x=[];for(y=0;y<=this.Ia;y++)x[y]=0;for(var E,b=this.network.vertexes.iterator;b.next();){var z=b.value;y=z.layer,E=z.column,z=this.nodeMinColumnSpace(z,!1),x[y]=Math.max(x[y],E+z)}for(b.reset();b.next();)z=b.value,y=z.layer,E=z.column,z.column=(8*(this.Ra-x[y])>>1)+8*E;this.Ra*=8}if(this.bg&2)for(x=!0;x;){for(x=!1,y=this.Md+1;y<=this.Ia;y++)x=Uf(this,y,1)||x;for(y=this.Md-1;0<=y;y--)x=Uf(this,y,-1)||x;x=Uf(this,this.Md,0)||x}if(this.bg&4){for(y=this.Md+1;y<=this.Ia;y++)yy(this,y,1);for(y=this.Md-1;0<=y;y--)yy(this,y,-1);yy(this,this.Md,0)}if(a&&($S(this,-1),$S(this,1)),this.bg&2)for(x=!0;x;){for(x=!1,x=Uf(this,this.Md,0)||x,y=this.Md+1;y<=this.Ia;y++)x=Uf(this,y,0)||x;for(y=this.Md-1;0<=y;y--)x=Uf(this,y,0)||x}}else Zx(this)};function Uf(a,y,x){for(var E=!1;Gx(a,y,x);)E=!0;return E}function Gx(a,y,x){var E,b=fd(a,y),z=a.tc[y],tt=py(a,y,-1);if(0<x)for(E=0;E<z;E++)tt[E]=-1;var rt=py(a,y,1);if(0>x)for(E=0;E<z;E++)rt[E]=-1;for(var ot=!1,st=!0;st;)for(st=!1,E=0;E<z;E++){var ut=b[E].column,ft=a.nodeMinColumnSpace(b[E],!0),mt=a.nodeMinColumnSpace(b[E],!1),yt=0;0>E-1||ut-b[E-1].column-1>ft+a.nodeMinColumnSpace(b[E-1],!1)?yt=ut-1:yt=ut,ft=E+1>=z||b[E+1].column-ut-1>mt+a.nodeMinColumnSpace(b[E+1],!0)?ut+1:ut;var wt=mt=0,bt=0;if(0>=x)for(var Zt=b[E].sourceEdges.iterator;Zt.next();){var It=Zt.value,Yt=It.fromVertex;if(It.valid&&Yt.layer!==y){var Jt=gy(It),qt=It.portFromColOffset;It=It.portToColOffset,Yt=Yt.column,mt+=(Math.abs(ut+It-(Yt+qt))+1)*Jt,wt+=(Math.abs(yt+It-(Yt+qt))+1)*Jt,bt+=(Math.abs(ft+It-(Yt+qt))+1)*Jt}}if(0<=x)for(Zt=b[E].destinationEdges.iterator;Zt.next();)It=Zt.value,Yt=It.toVertex,It.valid&&Yt.layer!==y&&(Jt=gy(It),qt=It.portFromColOffset,It=It.portToColOffset,Yt=Yt.column,mt+=(Math.abs(ut+qt-(Yt+It))+1)*Jt,wt+=(Math.abs(yt+qt-(Yt+It))+1)*Jt,bt+=(Math.abs(ft+qt-(Yt+It))+1)*Jt);It=qt=Jt=0,Zt=tt[b[E].index],Yt=rt[b[E].index],Zt!==-1&&(Jt+=Math.abs(Zt-ut),qt+=Math.abs(Zt-yt),It+=Math.abs(Zt-ft)),Yt!==-1&&(Jt+=Math.abs(Yt-ut),qt+=Math.abs(Yt-yt),It+=Math.abs(Yt-ft)),wt<mt||wt===mt&&qt<Jt?(st=ot=!0,b[E].column=yt):(bt<mt||bt===mt&&It<Jt)&&(st=ot=!0,b[E].column=ft)}return gd(a,y,b),a.normalize(),ot}function yy(a,y,x){var E=fd(a,y),b=a.tc[y],z=ZS(a,y,x),tt=[];for(x=0;x<b;x++)tt[x]=z[x];for(z=!0;z;)for(z=!1,x=0;x<b;x++){var rt=E[x].column,ot=a.nodeMinColumnSpace(E[x],!0),st=a.nodeMinColumnSpace(E[x],!1),ut=0;if(tt[x]===-1)if(x===0&&x===b-1)ut=rt;else if(x===0){var ft=E[x+1].column;ft-rt===st+a.nodeMinColumnSpace(E[x+1],!0)?ut=rt-1:ut=rt}else x===b-1?(ft=E[x-1].column,ut=rt-ft===ot+a.nodeMinColumnSpace(E[x-1],!1)?rt+1:rt):(ft=E[x-1].column,ot=ft+a.nodeMinColumnSpace(E[x-1],!1)+ot+1,ft=E[x+1].column,st=ft-a.nodeMinColumnSpace(E[x+1],!0)-st-1,ut=(ot+st)/2|0);else x===0&&x===b-1?ut=tt[x]:x===0?(ft=E[x+1].column,st=ft-a.nodeMinColumnSpace(E[x+1],!0)-st-1,ut=Math.min(tt[x],st)):x===b-1?(ft=E[x-1].column,ot=ft+a.nodeMinColumnSpace(E[x-1],!1)+ot+1,ut=Math.max(tt[x],ot)):(ft=E[x-1].column,ot=ft+a.nodeMinColumnSpace(E[x-1],!1)+ot+1,ft=E[x+1].column,st=ft-a.nodeMinColumnSpace(E[x+1],!0)-st-1,ot<tt[x]&&tt[x]<st?ut=tt[x]:ot>=tt[x]?ut=ot:st<=tt[x]&&(ut=st));ut!==rt&&(z=!0,E[x].column=ut)}gd(a,y,E),a.normalize()}function Hx(a,y){for(var x=!0,E=a.network.vertexes.iterator;E.next();){var b=E.value,z=a.nodeMinColumnSpace(b,!0),tt=a.nodeMinColumnSpace(b,!1);if(b.column-z<=y&&b.column+tt>=y){x=!1;break}}if(a=!1,x)for(E.reset();E.next();)x=E.value,x.column>y&&(--x.column,a=!0);return a}function Kx(a,y){var x=y+1,E,b=[],z=[];for(E=0;E<=a.Ia;E++)b[E]=!1,z[E]=!1;for(var tt=a.network.vertexes.iterator;tt.next();){E=tt.value;var rt=E.column-a.nodeMinColumnSpace(E,!0),ot=E.column+a.nodeMinColumnSpace(E,!1);rt<=y&&ot>=y&&(b[E.layer]=!0),rt<=x&&ot>=x&&(z[E.layer]=!0)}for(rt=!0,x=!1,E=0;E<=a.Ia;E++)rt=rt&&!(b[E]&&z[E]);if(rt)for(tt.reset();tt.next();)a=tt.value,a.column>y&&(--a.column,x=!0);return x}function $S(a,y){for(var x=0;x<=a.Ra;x++)for(;Hx(a,x););for(a.normalize(),x=0;x<a.Ra;x++)for(;Kx(a,x););a.normalize();var E;if(0<y)for(x=0;x<=a.Ra;x++){var b=xs(a),z=x0(a);for(E=z+1;z<E;){E=z,tx(a,x,1);var tt=x0(a);tt>z?ll(a,b):tt<z&&(z=tt,b=xs(a))}}if(0>y)for(x=a.Ra;0<=x;x--)for(b=xs(a),z=x0(a),E=z+1;z<E;)E=z,tx(a,x,-1),tt=x0(a),tt>z?ll(a,b):tt<z&&(z=tt,b=xs(a));a.normalize()}function tx(a,y,x){a.le=0;for(var E=a.network.vertexes.iterator;E.next();)E.value.component=-1;if(0<x)for(E.reset();E.next();){var b=E.value;b.column-a.nodeMinColumnSpace(b,!0)<=y&&(b.component=a.le)}if(0>x)for(E.reset();E.next();)b=E.value,b.column+a.nodeMinColumnSpace(b,!1)>=y&&(b.component=a.le);for(a.le++,E.reset();E.next();)y=E.value,y.component===-1&&(my(a,y,a.le,-1,!0,!0),a.le++);var z;for(y=[],z=0;z<a.le*a.le;z++)y[z]=!1;for(b=[],z=0;z<(a.Ia+1)*(a.Ra+1);z++)b[z]=-1;for(E.reset();E.next();){z=E.value;for(var tt=z.layer,rt=Math.max(0,z.column-a.nodeMinColumnSpace(z,!0)),ot=Math.min(a.Ra,z.column+a.nodeMinColumnSpace(z,!1));rt<=ot;rt++)b[tt*(a.Ra+1)+rt]=z.component}for(z=0;z<=a.Ia;z++){if(0<x)for(tt=0;tt<a.Ra;tt++)b[z*(a.Ra+1)+tt]!==-1&&b[z*(a.Ra+1)+tt+1]!==-1&&b[z*(a.Ra+1)+tt]!==b[z*(a.Ra+1)+tt+1]&&(y[b[z*(a.Ra+1)+tt]*a.le+b[z*(a.Ra+1)+tt+1]]=!0);if(0>x)for(tt=a.Ra;0<tt;tt--)b[z*(a.Ra+1)+tt]!==-1&&b[z*(a.Ra+1)+tt-1]!==-1&&b[z*(a.Ra+1)+tt]!==b[z*(a.Ra+1)+tt-1]&&(y[b[z*(a.Ra+1)+tt]*a.le+b[z*(a.Ra+1)+tt-1]]=!0)}for(b=[],z=0;z<a.le;z++)b[z]=!0;for(tt=[],tt.push(0);tt.length!==0;)if(ot=tt[tt.length-1],tt.pop(),b[ot])for(b[ot]=!1,z=0;z<a.le;z++)y[ot*a.le+z]&&tt.splice(0,0,z);if(0<x)for(E.reset();E.next();)a=E.value,b[a.component]&&--a.column;if(0>x)for(E.reset();E.next();)x=E.value,b[x.component]&&(x.column+=1)}function Zx(a){for(var y=On(),x=a.fl.length,E=0;E<=x;E++)y[E]=[];for(E=a.network.vertexes.iterator;E.next();){var b=E.value;y[x-b.layer][b.index]=b}x=new qe,Wx(y,x);var z=null,tt=null,rt=null,ot=null,st=(a.ve&1)!==0,ut=(a.ve&2)!==0,ft=(a.ve&4)!==0,mt=(a.ve&8)!==0;for(st&&(a.verticalAlignment(y,x,!0),z=P0(a,y,!0,!1)),y.reverse(),ft&&(a.verticalAlignment(y,x,!1),rt=P0(a,y,!1,!1)),E=Si(y),b=E.next();!b.done;b=E.next())b.value.reverse();mt&&(a.verticalAlignment(y,x,!1),ot=P0(a,y,!1,!0)),y.reverse(),ut&&(a.verticalAlignment(y,x,!0),tt=P0(a,y,!0,!0)),Qn(y),a.u(z,tt,rt,ot),a.network.vertexes.each(function(yt){var wt=On();st&&wt.push(z.get(yt)),ut&&wt.push(tt.get(yt)),ft&&wt.push(rt.get(yt)),mt&&wt.push(ot.get(yt)),wt.sort(function(Zt,It){return Zt-It});var bt=wt.length;bt=(wt[Math.floor((bt-1)/2)]+wt[Math.ceil((bt-1)/2)])/2,Qn(wt),yt.zc=bt})}function Wx(a,y){for(var x=a.length,E=1;E<x-1;E++)for(var b=0,z=0,tt=a[E],rt=a[E+1],ot=0;z<rt.length;ot++){var st=rt[ot];t:{if(st.node===null){var ut=Ly(st);if(0<ut.length){ut=ut[0].node===null;break t}}ut=!1}var ft=ut;if(ot===rt.length-1||ft){for(ut=tt.length-1,ft&&(ut=Ly(st)[0].index);z<=ot;){if(st=rt[z],!st.bo){ft=[];for(var mt=Si(st.sourceEdgesArrayAccess),yt=mt.next();!yt.done;yt=mt.next())yt=yt.value,yt.valid&&ft.push(yt);st.bo=ft}for(st=Si(st.bo),ft=st.next();!ft.done;ft=st.next())ft=ft.value,mt=ft.fromVertex.index,(mt<b||mt>ut)&&y.add(ft);z++}b=ut}}}Ur.prototype.verticalAlignment=function(a,y,x){Vx(a),a=Si(a);for(var E=a.next();!E.done;E=a.next()){var b=-1;E=Si(E.value);for(var z=E.next();!z.done;z=E.next()){z=z.value;var tt=x?Ly(z):Xx(z),rt=tt.length;if(0<rt){tt.sort(function(ft,mt){return ft.vi-mt.vi});var ot=(rt-1)/2;for(rt=Math.floor(ot),ot=Math.ceil(ot);rt<=ot;rt++)if(z.align===z){var st=tt[rt],ut=void 0;ut=x?M0(st,z):M0(z,st),!y.contains(ut)&&b<st.vi&&(st.align=z,z.root=st.root,z.align=st.root,b=st.vi)}}}}};function Vx(a){for(var y=0;y<a.length;y++)for(var x=a[y],E=0;E<x.length;E++){var b=x[E];b.root=b,b.align=b,b.Tz=y,b.vi=E}}function P0(a,y,x,E){for(var b=a.K===90||a.K===270,z=Si(y),tt=z.next();!tt.done;tt=z.next()){var rt=Si(tt.value);for(tt=rt.next();!tt.done;tt=rt.next())tt=tt.value,tt.sd=tt,tt.shift=1/0,tt.zc=NaN,tt.qg=0}for(tt=a.K===90||a.K===270,z=Si(y),rt=z.next();!rt.done;rt=z.next()){rt=Si(rt.value);for(var ot=rt.next();!ot.done;ot=rt.next())if(ot=ot.value,ot.root===ot){for(var st=0,ut=ot;ut.align!==ot;){var ft=ut.align,mt=tt?ut.width:ut.height,yt=tt?ft.width:ft.height;if(x){var wt=M0(ut,ft),bt=wt.portFromPos,Zt=wt.portToPos;wt.link!==null&&(ut.node&&ut.node!==wt.link.fromNode&&(bt=tt?ut.focusX:ut.focusY),ft.node&&ft.node!==wt.link.toNode&&(Zt=tt?ft.focusX:ft.focusY))}else wt=M0(ft,ut),bt=wt.portToPos,Zt=wt.portFromPos,wt.link!==null&&(ut.node&&ut.node!==wt.link.toNode&&(bt=tt?ut.focusX:ut.focusY),ft.node&&ft.node!==wt.link.fromNode&&(Zt=tt?ft.focusX:ft.focusY));mt=E?ut.qg+(mt-bt)-(yt-Zt):ut.qg+bt-Zt,ft.qg=mt,st=Math.min(st,mt),ut=ut.align}ut=ot;do ut.qg=ut.qg-st,ut=ut.align;while(ut!==ot)}}for(x=Si(y),tt=x.next();!tt.done;tt=x.next())for(z=Si(tt.value),tt=z.next();!tt.done;tt=z.next())tt=tt.value,tt.root===tt&&ex(a,tt,y);for(x=0;x<y.length;x++)if(!(0>=y[x].length)&&(tt=y[x][0],tt.sd===tt)){tt.sd.shift===1/0&&(tt.sd.shift=0),tt=x,rt=0;do{for(z=y[tt][rt];z.align!==z.root;)z=z.align,tt++,0<z.vi&&(rt=nx(z,y),rt.sd.shift=Math.min(rt.sd.shift,z.sd.shift+z.zc+z.qg-(rt.zc+rt.qg+(b?rt.width:rt.height)+a.columnSpacing)));rt=z.vi+1}while(tt<y.length&&rt<y[tt].length&&z.sd===y[tt][rt].sd)}for(a=new Me,y=Si(y),tt=y.next();!tt.done;tt=y.next())for(x=Si(tt.value),tt=x.next();!tt.done;tt=x.next())tt=tt.value,tt.zc=tt.zc+tt.sd.shift+tt.qg,z=b?tt.width:tt.height,a.add(tt,E?-tt.zc-z:tt.zc);return a}function ex(a,y,x){if(isNaN(y.zc)){y.zc=0;var E=y;do{if(0<E.vi){var b=nx(E,x),z=b.root;ex(a,z,x),y.sd===y&&(y.sd=z.sd);var tt=a.K===90||a.K===270?b.width:b.height;y.sd===z.sd&&(y.zc=Math.max(y.zc,z.zc+b.qg+tt-E.qg+a.columnSpacing))}E=E.align}while(E!==y);for(;E.align!==y;)E=E.align,E.zc=y.zc,E.sd=y.sd}}function nx(a,y){var x=a.Tz;return a=a.vi,1>a&&Gt("Could not determine previous vertex in layer"),y[x][a-1]}Ur.prototype.u=function(a){for(var y=[],x=0;x<arguments.length;++x)y[x]=arguments[x];x=-1;for(var E=On(),b=On(),z=1/0,tt=0;4>tt;tt++)if(y[tt]){var rt=Ux(this,y[tt],E,b,tt);rt<z&&(x=tt,z=rt)}for(z={},tt=0;4>tt;z={delta:z.delta},tt++)y[tt]&&(z.delta=tt===0||tt===2?E[x]-E[tt]:b[x]-b[tt],z.delta!==0&&y[tt].each(function(ot){return function(st){st.value+=ot.delta}}(z)));Qn(E),Qn(b)};function Ux(a,y,x,E,b){if(!y||y.count===0)return x[b]=0,E[b]=0,1/0;var z=1/0,tt=-1/0;return y.each(function(rt){var ot=rt.key;rt=rt.value,ot=a.K===90||a.K===270?ot.width:ot.height,rt<z&&(z=rt),rt+ot>tt&&(tt=rt+ot)}),x[b]=z,E[b]=tt,tt-z}Ur.prototype.commitLayout=function(){if(this.setsPortSpots)for(var a=C0(this,!0),y=C0(this,!1),x=this.network.edges.iterator;x.next();){var E=x.value.link;E!==null&&(E.fromSpot=a,E.toSpot=y)}this.commitNodes(),this.Gu(),this.isRouting&&this.commitLinks()};function C0(a,y){return a.K===270?y?Ma:Sa:a.K===90?y?Sa:Ma:a.K===180?y?ya:na:y?na:ya}Ur.prototype.commitNodes=function(){this.he=[],this.Ld=[],this.Kd=[],this.Ta=[];for(var a=0;a<=this.Ia;a++)this.he[a]=0,this.Ld[a]=0,this.Kd[a]=0,this.Ta[a]=0;for(a=this.network.vertexes.iterator;a.next();){var y=a.value,x=y.layer;this.he[x]=Math.max(this.he[x],this.nodeMinLayerSpace(y,!0)),this.Ld[x]=Math.max(this.Ld[x],this.nodeMinLayerSpace(y,!1))}y=0,x=this.ie;for(var E=0;E<=this.Ia;E++){var b=x;0>=this.he[E]+this.Ld[E]&&(b=0),0<E&&(y+=b/2),this.K===90||this.K===0?(y+=this.Ld[E],this.Kd[E]=y,y+=this.he[E]):(y+=this.he[E],this.Kd[E]=y,y+=this.Ld[E]),E<this.Ia&&(y+=b/2),this.Ta[E]=y}for(x=y,y=this.arrangementOrigin,E=0;E<=this.Ia;E++)this.K===270?this.Kd[E]=y.y+this.Kd[E]:this.K===90?(this.Kd[E]=y.y+x-this.Kd[E],this.Ta[E]=x-this.Ta[E]):this.K===180?this.Kd[E]=y.x+this.Kd[E]:(this.Kd[E]=y.x+x-this.Kd[E],this.Ta[E]=x-this.Ta[E]);x=this.ve!==0,a.reset(),E=this.K===270||this.K===90;for(var z=1/0,tt=b=1/0,rt=-1/0;a.next();){var ot=a.value,st=ot.layer,ut=ot.column|0;E?(tt=y.x+this.kc*ut,st=this.Kd[st]):(tt=this.Kd[st],st=y.y+this.kc*ut),ot.centerX=tt,ot.centerY=st,x&&isFinite(ot.zc)&&(E?ot.node?ot.x=y.x+ot.zc:ot.centerX=y.x+ot.zc:ot.node?ot.y=y.y+ot.zc:ot.centerY=y.y+ot.zc),z=Math.min(ot.x,z),b=Math.min(ot.y,b),E?(tt=z,rt=Math.max(rt,ot.bounds.right)):(tt=b,rt=Math.max(rt,ot.bounds.bottom))}for(this.xw=rt-tt,z=y.x-z,y=y.y-b,this.Rf=new At(x&&E?0:z,x&&!E?0:y),a.reset();a.next();)x=a.value,x.x+=z,x.y+=y,x.commit()},Ur.prototype.Gu=function(){for(var a=0,y=this.ie,x=0;x<=this.Ia;x++)a+=this.he[x],a+=this.Ld[x];a+=this.Ia*y,y=[],x=this.ve!==0?this.xw:this.kc*this.Ra;for(var E=this.maxLayer;0<=E;E--)this.K===270?E===0?y.push(new Ee(0,0,x,Math.abs(this.Ta[0]))):y.push(new Ee(0,this.Ta[E-1],x,Math.abs(this.Ta[E-1]-this.Ta[E]))):this.K===90?E===0?y.push(new Ee(0,this.Ta[0],x,Math.abs(this.Ta[0]-a))):y.push(new Ee(0,this.Ta[E],x,Math.abs(this.Ta[E-1]-this.Ta[E]))):this.K===180?E===0?y.push(new Ee(0,0,Math.abs(this.Ta[0]),x)):y.push(new Ee(this.Ta[E-1],0,Math.abs(this.Ta[E-1]-this.Ta[E]),x)):E===0?y.push(new Ee(this.Ta[0],0,Math.abs(this.Ta[0]-a),x)):y.push(new Ee(this.Ta[E],0,Math.abs(this.Ta[E-1]-this.Ta[E]),x));this.commitLayers(y,this.Rf)},Ur.prototype.commitLayers=function(){},Ur.prototype.commitLinks=function(){for(var a=this.network.edges.iterator,y;a.next();)y=a.value.link,y!==null&&(y.uh(),y.Fj(),y.zf());for(a.reset();a.next();)y=a.value.link,y!==null&&y.vg();for(a.reset();a.next();){var x=a.value;if(y=x.link,y!==null){y.uh();var E=y,b=E.fromNode,z=E.toNode,tt=E.fromPort,rt=E.toPort;if(b!==null){var ot=b.findVisibleNode();ot!==null&&ot!==b&&(b=ot,tt=ot.port)}z!==null&&(ot=z.findVisibleNode(),ot!==null&&ot!==z&&(z=ot,rt=ot.port));var st=y.computeSpot(!0,tt);ot=y.computeSpot(!1,rt);var ut=x.fromVertex,ft=x.toVertex;if(x.valid)y.curve===Ys&&y.pointsCount===4&&(ut.column===ft.column&&this.alignOption===0?(x=y.getLinkPoint(b,tt,st,!0,!1,z,rt),rt=y.getLinkPoint(z,rt,ot,!1,!1,b,tt),x.w()||x.set(b.actualBounds.center),rt.w()||rt.set(z.actualBounds.center),y.Fj(),y.yf(x.x,x.y),y.yf((2*x.x+rt.x)/3,(2*x.y+rt.y)/3),y.yf((x.x+2*rt.x)/3,(x.y+2*rt.y)/3),y.yf(rt.x,rt.y)):(x=E=!1,tt!==null&&st===qi&&(E=!0),rt!==null&&ot===qi&&(x=!0),(E||x)&&(ot=null,E&&(ot=y.getLinkPointFromPoint(b,tt,tt.ga(er),y.i(3),!0),ot.w()||ot.set(b.actualBounds.center),y.L(0,ot.x,ot.y)),b=null,x&&(b=y.getLinkPointFromPoint(z,rt,rt.ga(er),y.i(0),!1),b.w()||b.set(z.actualBounds.center),y.L(3,b.x,b.y)),ot&&(z=y.i(2),y.L(1,(2*ot.x+z.x)/3,(2*ot.y+z.y)/3)),b&&(z=y.i(1),y.L(2,(2*b.x+z.x)/3,(2*b.y+z.y)/3))))),y.zf();else if(ut.layer===ft.layer)y.zf();else{var mt=!1,yt=!1,wt=this.ie,bt=y.firstPickIndex+1;if(y.isOrthogonal){yt=!0;var Zt=y.pointsCount;4<Zt&&y.points.removeRange(2,Zt-3)}else if(y.curve===Ys)mt=!0,Zt=y.pointsCount,4<Zt&&y.points.removeRange(2,Zt-3),Zt===4&&(bt=2);else{Zt=y.pointsCount;var It=st===qi,Yt=ot===qi;2<Zt&&It&&Yt?y.points.removeRange(1,Zt-2):3<Zt&&It&&!Yt?y.points.removeRange(1,Zt-3):3<Zt&&!It&&Yt?y.points.removeRange(2,Zt-2):4<Zt&&!It&&!Yt&&y.points.removeRange(2,Zt-3)}if(x.rev){for(;ft!==null&&ut!==ft;){var Jt=Zt=null;for(It=ft.sourceEdges.iterator;It.next()&&(Yt=It.value,Yt.link!==x.link||(Zt=Yt.fromVertex,Jt=Yt.toVertex,Zt.node!==null)););if(Zt===null)break;if(Zt!==ut){It=y.i(bt-1).x,Yt=y.i(bt-1).y;var qt=Zt.centerX,ae=Zt.centerY;if(yt)this.K===180||this.K===0?bt===y.firstPickIndex+1?(y.m(bt++,It,Yt),y.m(bt++,It,ae)):(Jt!==null?Jt.centerY:Yt)!==ae&&(Jt=this.Ta[Zt.layer-1]+this.Rf.x,y.m(bt++,Jt,Yt),y.m(bt++,Jt,ae)):bt===y.firstPickIndex+1?(y.m(bt++,It,Yt),y.m(bt++,qt,Yt)):(Jt!==null?Jt.centerX:It)!==qt&&(Jt=this.Ta[Zt.layer-1]+this.Rf.y,y.m(bt++,It,Jt),y.m(bt++,qt,Jt));else if(bt===y.firstPickIndex+1){Jt=Math.max(10,this.he[ft.layer]);var Ce=Math.max(10,this.Ld[ft.layer]);if(mt)this.K===180?qt<=ft.bounds.x?(ft=ft.bounds.x,y.m(bt++,ft-Jt,ae),y.m(bt++,ft,ae),y.m(bt++,ft+Ce,ae)):(y.m(bt++,qt-Jt,ae),y.m(bt++,qt,ae),y.m(bt++,qt+Ce,ae)):this.K===90?ae>=ft.bounds.bottom?(ft=ft.bounds.y+ft.bounds.height,y.m(bt++,qt,ft+Ce),y.m(bt++,qt,ft),y.m(bt++,qt,ft-Jt)):(y.m(bt++,qt,ae+Ce),y.m(bt++,qt,ae),y.m(bt++,qt,ae-Jt)):this.K===270?ae<=ft.bounds.y?(ft=ft.bounds.y,y.m(bt++,qt,ft-Jt),y.m(bt++,qt,ft),y.m(bt++,qt,ft+Ce)):(y.m(bt++,qt,ae-Jt),y.m(bt++,qt,ae),y.m(bt++,qt,ae+Ce)):this.K===0&&(qt>=ft.bounds.right?(ft=ft.bounds.x+ft.bounds.width,y.m(bt++,ft+Ce,ae),y.m(bt++,ft,ae),y.m(bt++,ft-Jt,ae)):(y.m(bt++,qt+Ce,ae),y.m(bt++,qt,ae),y.m(bt++,qt-Jt,ae)));else{y.m(bt++,It,Yt);var In=0;this.K===180||this.K===0?((this.K===180?qt>=ft.bounds.right:qt<=ft.bounds.x)&&(In=(this.K===0?-Jt:Ce)/2),y.m(bt++,It+In,ae)):((this.K===270?ae>=ft.bounds.bottom:ae<=ft.bounds.y)&&(In=(this.K===90?-Jt:Ce)/2),y.m(bt++,qt,Yt+In)),y.m(bt++,qt,ae)}}else Jt=Math.max(10,this.he[Zt.layer]),Ce=Math.max(10,this.Ld[Zt.layer]),mt?this.K===180?(y.m(bt++,qt-Jt-wt,ae),y.m(bt++,Math.min(qt-Jt+wt/2,qt),ae),y.m(bt++,qt,ae),y.m(bt++,qt,ae),y.m(bt++,Math.max(qt+Ce-wt/2,qt),ae),y.m(bt++,qt+Ce+wt,ae)):this.K===90?(y.m(bt++,qt,ae+Ce+wt),y.m(bt++,qt,Math.max(ae+Ce-wt/2,ae)),y.m(bt++,qt,ae),y.m(bt++,qt,ae),y.m(bt++,qt,Math.min(ae-Jt+wt/2,ae)),y.m(bt++,qt,ae-Jt-wt)):this.K===270?(y.m(bt++,qt,ae-Jt-wt),y.m(bt++,qt,Math.min(ae-Jt+wt/2,ae)),y.m(bt++,qt,ae),y.m(bt++,qt,ae),y.m(bt++,qt,Math.max(ae+Ce-wt/2,ae)),y.m(bt++,qt,ae+Ce+wt)):(y.m(bt++,qt+Ce+wt,ae),y.m(bt++,Math.max(qt+Ce-wt/2,qt),ae),y.m(bt++,qt,ae),y.m(bt++,qt,ae),y.m(bt++,Math.min(qt-Jt+wt/2,qt),ae),y.m(bt++,qt-Jt-wt,ae)):y.m(bt++,qt,ae)}ft=Zt}(rt===null||st!==qi||yt)&&(It=y.i(bt-1).x,Yt=y.i(bt-1).y,qt=y.i(bt).x,ae=y.i(bt).y,yt?(wt=this.Ld[ut.layer],this.K===180||this.K===0?(yt=Yt,yt>=ut.bounds.y&&yt<=ut.bounds.bottom&&(this.K===180?qt>=ut.bounds.x:qt<=ut.bounds.right)&&(ft=ut.centerX+(this.K===180?-wt:wt),yt<ut.bounds.y+ut.bounds.height/2?yt=ut.bounds.y-this.kc/2:yt=ut.bounds.bottom+this.kc/2,y.m(bt++,ft,Yt),y.m(bt++,ft,yt)),y.m(bt++,qt,yt)):(yt=It,yt>=ut.bounds.x&&yt<=ut.bounds.right&&(this.K===270?ae>=ut.bounds.y:ae<=ut.bounds.bottom)&&(ft=ut.centerY+(this.K===270?-wt:wt),yt<ut.bounds.x+ut.bounds.width/2?yt=ut.bounds.x-this.kc/2:yt=ut.bounds.right+this.kc/2,y.m(bt++,It,ft),y.m(bt++,yt,ft)),y.m(bt++,yt,ae)),y.m(bt++,qt,ae)):mt?(Jt=Math.max(10,this.he[ut.layer]),Ce=Math.max(10,this.Ld[ut.layer]),this.K===180&&qt>=ut.bounds.x?(ft=ut.bounds.x+ut.bounds.width,y.L(bt-2,ft,Yt),y.L(bt-1,ft+Ce,Yt)):this.K===90&&ae<=ut.bounds.bottom?(ft=ut.bounds.y,y.L(bt-2,It,ft),y.L(bt-1,It,ft-Jt)):this.K===270&&ae>=ut.bounds.y?(ft=ut.bounds.y+ut.bounds.height,y.L(bt-2,It,ft),y.L(bt-1,It,ft+Ce)):this.K===0&&qt<=ut.bounds.right&&(ft=ut.bounds.x,y.L(bt-2,ft,Yt),y.L(bt-1,ft-Jt,Yt))):(Jt=Math.max(10,this.he[ut.layer]),Ce=Math.max(10,this.Ld[ut.layer]),yt=0,this.K===180||this.K===0?((this.K===180?qt<=ut.bounds.x:qt>=ut.bounds.right)&&(yt=(this.K===0?Ce:-Jt)/2),y.m(bt++,qt+yt,Yt)):((this.K===270?ae<=ut.bounds.y:ae>=ut.bounds.bottom)&&(yt=(this.K===90?Ce:-Jt)/2),y.m(bt++,It,ae+yt)),y.m(bt++,qt,ae)))}else{for(;ut!==null&&ut!==ft;){for(Jt=Zt=null,ut=ut.destinationEdges.iterator;ut.next()&&(It=ut.value,It.link!==x.link||(Zt=It.toVertex,Jt=It.fromVertex,Jt.node!==null&&(Jt=null),Zt.node!==null)););if(Zt===null)break;Zt!==ft&&(It=y.i(bt-1).x,Yt=y.i(bt-1).y,qt=Zt.centerX,ae=Zt.centerY,yt?this.K===180||this.K===0?(Jt!==null?Jt.centerY:Yt)!==ae&&(Jt=this.Ta[Zt.layer]+this.Rf.x,bt===y.firstPickIndex+1&&(Jt=this.K===0?Math.max(Jt,It):Math.min(Jt,It)),y.m(bt++,Jt,Yt),y.m(bt++,Jt,ae)):(Jt!==null?Jt.centerX:It)!==qt&&(Jt=this.Ta[Zt.layer]+this.Rf.y,bt===y.firstPickIndex+1&&(Jt=this.K===90?Math.max(Jt,Yt):Math.min(Jt,Yt)),y.m(bt++,It,Jt),y.m(bt++,qt,Jt)):(Jt=Math.max(10,this.he[Zt.layer]),Ce=Math.max(10,this.Ld[Zt.layer]),mt?this.K===180?(y.m(bt++,qt+Ce+wt,ae),y.m(bt++,Math.max(qt+Ce-wt/2,qt),ae),y.m(bt++,qt,ae),y.m(bt++,qt,ae),y.m(bt++,Math.min(qt-Jt+wt/2,qt),ae),y.m(bt++,qt-Jt-wt,ae)):this.K===90?(y.m(bt++,qt,ae-Jt-wt),y.m(bt++,qt,Math.min(ae-Jt+wt/2,ae)),y.m(bt++,qt,ae),y.m(bt++,qt,ae),y.m(bt++,qt,Math.max(ae+Ce-wt/2,ae)),y.m(bt++,qt,ae+Ce+wt)):this.K===270?(y.m(bt++,qt,ae+Ce+wt),y.m(bt++,qt,Math.max(ae+Ce-wt/2,ae)),y.m(bt++,qt,ae),y.m(bt++,qt,ae),y.m(bt++,qt,Math.min(ae-Jt+wt/2,ae)),y.m(bt++,qt,ae-Jt-wt)):(y.m(bt++,qt-Jt-wt,ae),y.m(bt++,Math.min(qt-Jt+wt/2,qt),ae),y.m(bt++,qt,ae),y.m(bt++,qt,ae),y.m(bt++,Math.max(qt+Ce-wt/2,qt),ae),y.m(bt++,qt+Ce+wt,ae)):this.K===180?(y.m(bt++,qt+Ce,ae),y.m(bt++,qt-Jt,ae)):this.K===90?(y.m(bt++,qt,ae-Jt),y.m(bt++,qt,ae+Ce)):this.K===270?(y.m(bt++,qt,ae+Ce),y.m(bt++,qt,ae-Jt)):(y.m(bt++,qt-Jt,ae),y.m(bt++,qt+Ce,ae)))),ut=Zt}yt&&(It=y.i(bt-1).x,Yt=y.i(bt-1).y,qt=y.i(bt).x,ae=y.i(bt).y,this.K===180||this.K===0?Yt!==ae&&(Jt=this.K===0?Math.min(Math.max((qt+It)/2,this.Ta[ft.layer]+this.Rf.x),qt):Math.max(Math.min((qt+It)/2,this.Ta[ft.layer]+this.Rf.x),qt),y.m(bt++,Jt,Yt),y.m(bt++,Jt,ae)):It!==qt&&(Jt=this.K===90?Math.min(Math.max((ae+Yt)/2,this.Ta[ft.layer]+this.Rf.y),ae):Math.max(Math.min((ae+Yt)/2,this.Ta[ft.layer]+this.Rf.y),ae),y.m(bt++,It,Jt),y.m(bt++,qt,Jt)))}E!==null&&mt&&4<=y.pointsCount&&(tt!==null&&(tt=st===qi?y.getLinkPointFromPoint(b,tt,tt.ga(er),y.i(3),!0):y.i(0),st===qi&&(st=y.i(2),E=y.i(3),this.direction===90||this.direction===270?(y.L(1,(tt.x+st.x)/2,st.y),y.L(2,E.x,(st.y+E.y)/2)):(y.L(1,st.x,(tt.y+st.y)/2),y.L(2,(st.x+E.x)/2,E.y))),tt.w()||tt.set(b.actualBounds.center),y.L(0,tt.x,tt.y)),rt!==null&&(b=ot===qi?y.getLinkPointFromPoint(z,rt,rt.ga(er),y.i(y.pointsCount-4),!1):y.i(y.pointsCount-1),ot===qi&&(rt=y.i(y.pointsCount-3),ot=y.i(y.pointsCount-4),this.direction===90||this.direction===270?(y.L(y.pointsCount-2,(b.x+rt.x)/2,rt.y),y.L(y.pointsCount-2,ot.x,(rt.y+ot.y)/2)):(y.L(y.pointsCount-2,rt.x,(b.y+rt.y)/2),y.L(y.pointsCount-3,(rt.x+ot.x)/2,ot.y))),b.w()||b.set(z.actualBounds.center),y.L(y.pointsCount-1,b.x,b.y))),y.zf(),x.commit()}}}this.avoidOrthogonalOverlaps()},Ur.prototype.avoidOrthogonalOverlaps=function(){if(!(0>=this.linkSpacing)){for(var a=new Xe,y=this.network.edges.iterator;y.next();){var x=y.value.link;x!==null&&x.isOrthogonal&&!a.contains(x)&&a.add(x)}if(0<a.count)if(this.K===90||this.K===270){for(y=0,x=[],a=a.iterator;a.next();){var E=a.value;if(E!==null&&E.isOrthogonal)for(var b=2;b<E.pointsCount-3;b++){var z=E.i(b),tt=E.i(b+1);if(this.B(z.y,tt.y)&&!this.B(z.x,tt.x)){var rt=new pd;rt.layer=Math.floor(z.y/2);var ot=E.i(0),st=E.i(E.pointsCount-1);if(rt.first=ot.x*ot.x+ot.y,rt.jc=st.x*st.x+st.y,rt.rd=Math.min(z.x,tt.x),rt.Ic=Math.max(z.x,tt.x),rt.index=b,rt.link=E,b+2<E.pointsCount){ot=E.i(b-1),st=E.i(b+2);var ut=0;ot.y<z.y?ut=st.y<z.y?3:z.x<tt.x?2:1:ot.y>z.y&&(ut=st.y>z.y?0:tt.x<z.x?2:1),rt.j=ut}x.push(rt)}}}if(1<x.length)for(x.sort(this.Vx),a=0;a<x.length;){for(z=x[a].layer,E=a+1;E<x.length&&x[E].layer===z;)E++;if(1<E-a)for(z=a;z<E;){for(tt=x[z].Ic,b=a+1;b<E&&x[b].rd<tt;)tt=Math.max(tt,x[b].Ic),b++;if(tt=b-z,1<tt){for(this.zi(x,this.Js,z,z+tt),ut=1,rt=x[z].jc,ot=z;ot<b;ot++)st=x[ot],st.jc!==rt&&(ut++,rt=st.jc);this.zi(x,this.Ux,z,z+tt);var ft=1;for(rt=x[z].first,ot=z;ot<b;ot++)st=x[ot],st.first!==rt&&(ft++,rt=st.first);for(ot=!0,st=ft,ut<ft?(ot=!1,st=ut,rt=x[z].jc,this.zi(x,this.Js,z,z+tt)):rt=x[z].first,ut=0,ft=z;ft<b;ft++){var mt=x[ft];(ot?mt.first:mt.jc)!==rt&&(ut++,rt=ot?mt.first:mt.jc);var yt=mt.link;z=yt.i(mt.index),tt=yt.i(mt.index+1);var wt=this.linkSpacing*(ut-(st-1)/2);y++,yt.uh(),yt.L(mt.index,z.x,z.y+wt),yt.L(mt.index+1,tt.x,tt.y+wt),yt.zf()}}z=b}a=E}}else{for(y=0,x=[],a=a.iterator;a.next();)if(E=a.value,E!==null&&E.isOrthogonal)for(b=2;b<E.pointsCount-3;b++)z=E.i(b),tt=E.i(b+1),this.B(z.x,tt.x)&&!this.B(z.y,tt.y)&&(rt=new pd,rt.layer=Math.floor(z.x/2),ot=E.i(0),st=E.i(E.pointsCount-1),rt.first=ot.x+ot.y*ot.y,rt.jc=st.x+st.y*st.y,rt.rd=Math.min(z.y,tt.y),rt.Ic=Math.max(z.y,tt.y),rt.index=b,rt.link=E,b+2<E.pointsCount&&(ot=E.i(b-1),st=E.i(b+2),ut=0,ot.x<z.x?ut=st.x<z.x?3:z.y<tt.y?2:1:ot.x>z.x&&(ut=st.x>z.x?0:tt.y<z.y?2:1),rt.j=ut),x.push(rt));if(1<x.length)for(x.sort(this.Vx),a=0;a<x.length;){for(z=x[a].layer,E=a+1;E<x.length&&x[E].layer===z;)E++;if(1<E-a)for(z=a;z<E;){for(tt=x[z].Ic,b=a+1;b<E&&x[b].rd<tt;)tt=Math.max(tt,x[b].Ic),b++;if(tt=b-z,1<tt){for(this.zi(x,this.Js,z,z+tt),ut=1,rt=x[z].jc,ot=z;ot<b;ot++)st=x[ot],st.jc!==rt&&(ut++,rt=st.jc);for(this.zi(x,this.Ux,z,z+tt),ft=1,rt=x[z].first,ot=z;ot<b;ot++)st=x[ot],st.first!==rt&&(ft++,rt=st.first);for(ot=!0,st=ft,ut<ft?(ot=!1,st=ut,rt=x[z].jc,this.zi(x,this.Js,z,z+tt)):rt=x[z].first,ut=0,ft=z;ft<b;ft++)mt=x[ft],(ot?mt.first:mt.jc)!==rt&&(ut++,rt=ot?mt.first:mt.jc),yt=mt.link,z=yt.i(mt.index),tt=yt.i(mt.index+1),wt=this.linkSpacing*(ut-(st-1)/2),y++,yt.uh(),yt.L(mt.index,z.x+wt,z.y),yt.L(mt.index+1,tt.x+wt,tt.y),yt.zf()}z=b}a=E}}}},Pt=Ur.prototype,Pt.Vx=function(a,y){return a instanceof pd&&y instanceof pd&&a!==y?a.layer<y.layer?-1:a.layer>y.layer?1:a.rd<y.rd?-1:a.rd>y.rd?1:a.Ic<y.Ic?-1:a.Ic>y.Ic?1:0:0},Pt.Ux=function(a,y){return a instanceof pd&&y instanceof pd&&a!==y?a.first<y.first?-1:a.first>y.first||a.j<y.j?1:a.j>y.j||a.rd<y.rd?-1:a.rd>y.rd?1:a.Ic<y.Ic?-1:a.Ic>y.Ic?1:0:0},Pt.Js=function(a,y){return a instanceof pd&&y instanceof pd&&a!==y?a.jc<y.jc?-1:a.jc>y.jc||a.j<y.j?1:a.j>y.j||a.rd<y.rd?-1:a.rd>y.rd?1:a.Ic<y.Ic?-1:a.Ic>y.Ic?1:0:0},Pt.B=function(a,y){return a-=y,-1<a&&1>a},Pt.zi=function(a,y,x,E){var b=a.length,z=E-x;if(!(1>=z))if((0>x||x>=b-1)&&Gt("not in range 0 <= from < length: "+x),z===2)E=a[x],b=a[x+1],0<y(E,b)&&(a[x]=b,a[x+1]=E);else if(x===0)if(E>=b)a.sort(y);else for(x=a.slice(0,E),x.sort(y),y=0;y<E;y++)a[y]=x[y];else if(E>=b)for(E=a.slice(x),E.sort(y),y=x;y<b;y++)a[y]=E[y-x];else for(b=a.slice(x,E),b.sort(y),y=x;y<E;y++)a[y]=b[y-x]};function fd(a,y){var x=a.tc[y];if(x>=a.He.length){for(var E=[],b=0;b<a.He.length;b++)E[b]=a.He[b];a.He=E}for(a.He[x]===void 0||a.He[x]===null?E=[]:(E=a.He[x],a.He[x]=null),a=a.fl[y],y=0;y<a.length;y++)x=a[y],E[x.index]=x;return E}function gd(a,y,x){a.He[a.tc[y]]=x}ge.Object.defineProperties(Ur.prototype,{layerSpacing:{get:function(){return this.ie},set:function(a){this.ie!==a&&0<=a&&(this.ie=a,this.C())}},columnSpacing:{get:function(){return this.kc},set:function(a){this.kc!==a&&0<a&&(this.kc=a,this.C())}},direction:{get:function(){return this.K},set:function(a){this.K!==a&&(a===0||a===90||a===180||a===270?(this.K=a,this.C()):Gt("LayeredDigraphLayout.direction must be 0, 90, 180, or 270"))}},cycleRemoveOption:{get:function(){return this.Dk},set:function(a){this.Dk===a||a!==Sy&&a!==E0&&a!==Pp||(this.Dk=a,this.C())}},layeringOption:{get:function(){return this.Zk},set:function(a){this.Zk===a||a!==k0&&a!==xy&&a!==wy||(this.Zk=a,this.C())}},initializeOption:{get:function(){return this.Qk},set:function(a){this.Qk===a||a!==L0&&a!==Py&&a!==Cy||(this.Qk=a,this.C())}},iterations:{get:function(){return this.bj},set:function(a){this.bj!==a&&0<=a&&(this.bj=a,this.C())}},aggressiveOption:{get:function(){return this.rk},set:function(a){this.rk===a||a!==Ey&&a!==b0&&a!==ky||(this.rk=a,this.C())}},packOption:{get:function(){return this.bg},set:function(a){this.bg!==a&&0<=a&&8>a&&(this.bg=a,this.C())}},alignOption:{get:function(){return this.ve},set:function(a){this.ve!==a&&0<=a&&16>a&&(this.ve=a,this.C())}},setsPortSpots:{get:function(){return this.sf},set:function(a){this.sf!==a&&(this.sf=a,this.C())}},linkSpacing:{get:function(){return this.Cn},set:function(a){this.Cn!==a&&0<=a&&(this.Cn=a,this.C())}},maxLayer:{get:function(){return this.Ia}},maxIndex:{get:function(){return this.Iq}},maxColumn:{get:function(){return this.Ra}},minIndexLayer:{get:function(){return this.Hn}},maxIndexLayer:{get:function(){return this.Md}}});var E0=new Ue(Ur,"CycleDepthFirst",0),Sy=new Ue(Ur,"CycleGreedy",1),Pp=new Ue(Ur,"CycleFromLayers",2),k0=new Ue(Ur,"LayerOptimalLinkLength",0),xy=new Ue(Ur,"LayerLongestPathSink",1),wy=new Ue(Ur,"LayerLongestPathSource",2),L0=new Ue(Ur,"InitDepthFirstOut",0),Py=new Ue(Ur,"InitDepthFirstIn",1),Cy=new Ue(Ur,"InitNaive",2),Ey=new Ue(Ur,"AggressiveNone",0),b0=new Ue(Ur,"AggressiveLess",1),ky=new Ue(Ur,"AggressiveMore",2),Yx=8;Ur.className="LayeredDigraphLayout",Ur.CycleDepthFirst=E0,Ur.CycleGreedy=Sy,Ur.CycleFromLayers=Pp,Ur.LayerOptimalLinkLength=k0,Ur.LayerLongestPathSink=xy,Ur.LayerLongestPathSource=wy,Ur.InitDepthFirstOut=L0,Ur.InitDepthFirstIn=Py,Ur.InitNaive=Cy,Ur.AggressiveNone=Ey,Ur.AggressiveLess=b0,Ur.AggressiveMore=ky,Ur.PackNone=0,Ur.PackExpand=1,Ur.PackStraighten=2,Ur.PackMedian=4,Ur.PackAll=15,Ur.AlignNone=0,Ur.AlignUpperLeft=1,Ur.AlignUpperRight=2,Ur.AlignLowerLeft=4,Ur.AlignLowerRight=8,Ur.AlignAll=15;function pd(){this.index=this.Ic=this.rd=this.jc=this.first=this.layer=0,this.link=null,this.j=0}pd.className="SegInfo";function Yf(a){ro.call(this,a)}we(Yf,ro),Yf.prototype.createVertex=function(){return new ul(this)},Yf.prototype.createEdge=function(){return new Cp(this)},Yf.className="LayeredDigraphNetwork";function ul(a){qo.call(this,a),this.$n=this.bo=this.ao=this.co=null,this.Za=this.Ag=this.Ig=-1,this.u=NaN,this.F=null,this.valid=!1,this.finish=this.Ll=NaN,this.Dj=0,this.dv=this.ev=null}we(ul,qo);function ix(a,y){return a.index-y.index}function M0(a,y){if(!a.$n){for(var x=[],E=Si(a.destinationEdgesArrayAccess),b=E.next();!b.done;b=E.next())b=b.value,b.valid&&x.push(b);a.$n=x}for(a=Si(a.$n),x=a.next();!x.done;x=a.next())if(x=x.value,x.toVertex===y)return x;Gt("Unable to find destination edge to given vertex")}function Ly(a){if(!a.co){for(var y=[],x=Si(a.sourceEdgesArrayAccess),E=x.next();!E.done;E=x.next())E=E.value,E.valid&&y.push(E.fromVertex);y.sort(ix),a.co=y}return a.co}function Xx(a){if(!a.ao){for(var y=[],x=Si(a.destinationEdgesArrayAccess),E=x.next();!E.done;E=x.next())E=E.value,E.valid&&y.push(E.toVertex);y.sort(ix),a.ao=y}return a.ao}ul.prototype.Cl=function(a){qo.prototype.Cl.call(this,a),this.bo=this.co=null},ul.prototype.Kl=function(a){qo.prototype.Kl.call(this,a),this.bo=this.co=null},ul.prototype.zl=function(a){qo.prototype.zl.call(this,a),this.$n=this.ao=null},ul.prototype.Jl=function(a){qo.prototype.Jl.call(this,a),this.$n=this.ao=null},ge.Object.defineProperties(ul.prototype,{layer:{get:function(){return this.Ig},set:function(a){this.Ig!==a&&(this.Ig=a)}},column:{get:function(){return this.Ag},set:function(a){this.Ag!==a&&(this.Ag=a)}},index:{get:function(){return this.Za},set:function(a){this.Za!==a&&(this.Za=a)}},component:{get:function(){return this.u},set:function(a){this.u!==a&&(this.u=a)}},near:{get:function(){return this.F},set:function(a){this.F!==a&&(this.F=a)}}}),ul.prototype.deleteDestinationEdge=ul.prototype.Jl,ul.prototype.addDestinationEdge=ul.prototype.zl,ul.prototype.deleteSourceEdge=ul.prototype.Kl,ul.prototype.addSourceEdge=ul.prototype.Cl,ul.className="LayeredDigraphVertex";function Cp(a){Is.call(this,a),this.j=this.ia=this.Ha=!1,this.V=this.u=NaN,this.F=this.o=0}we(Cp,Is),ge.Object.defineProperties(Cp.prototype,{fromVertex:{get:function(){return this.kd},set:function(a){this.kd!==a&&(this.kd=a)}},toVertex:{get:function(){return this.qd},set:function(a){this.qd!==a&&(this.qd=a)}},valid:{get:function(){return this.Ha},set:function(a){this.Ha!==a&&(this.Ha=a)}},rev:{get:function(){return this.ia},set:function(a){this.ia!==a&&(this.ia=a)}},forest:{get:function(){return this.j},set:function(a){this.j!==a&&(this.j=a)}},portFromPos:{get:function(){return this.u},set:function(a){this.u!==a&&(this.u=a)}},portToPos:{get:function(){return this.V},set:function(a){this.V!==a&&(this.V=a)}},portFromColOffset:{get:function(){return this.o},set:function(a){this.o!==a&&(this.o=a)}},portToColOffset:{get:function(){return this.F},set:function(a){this.F!==a&&(this.F=a)}}}),Cp.className="LayeredDigraphEdge";function xr(a){mo.call(this),this.Ub=new qe,this.Wn=D0,this.ud=Tu,this.vo=T0,this.Bq=Ry,this.$v=[],this.td=!0,this.Rb=O0,this.$d=new Ke(10,10).freeze();var y=new Zc(this);this.W=new wl(y),this.Y=new wl(y),this.ru=[],a&&Object.assign(this,a)}we(xr,mo),xr.prototype.cloneProtected=function(a){mo.prototype.cloneProtected.call(this,a),a.Wn=this.Wn,a.vo=this.vo,a.Bq=this.Bq,a.td=this.td,a.Rb=this.Rb,a.$d.assign(this.$d),a.W.copyInheritedPropertiesFrom(this.W),a.Y.copyInheritedPropertiesFrom(this.Y)},xr.prototype.qb=function(a){a.classType===xr?a.name.indexOf("Alignment")===0?this.alignment=a:a.name.indexOf("Arrangement")===0?this.arrangement=a:a.name.indexOf("Compaction")===0?this.compaction=a:a.name.indexOf("Path")===0?this.path=a:a.name.indexOf("Sorting")===0?this.sorting=a:a.name.indexOf("Style")===0?this.treeStyle=a:Gt("Unknown enum value: "+a):mo.prototype.qb.call(this,a)},xr.prototype.createNetwork=function(){return new Zc(this)},xr.prototype.makeNetwork=function(a){function y(E){if(E instanceof Un)return!E.isLinkLabel&&E.category!=="Comment";if(E instanceof En){var b=E.fromNode;return b===null||b.isLinkLabel||b.category==="Comment"?!1:(E=E.toNode,!(E===null||E.isLinkLabel||E.category==="Comment"))}return!1}var x=this.createNetwork();return a instanceof Le?(x.lg(a.nodes,!0,y),x.lg(a.links,!0,y)):a instanceof $i?x.lg(a.memberParts,!1,y):x.lg(a.iterator,!1,y),x},xr.prototype.doLayout=function(a){this.network===null&&(this.network=this.makeNetwork(a)),this.arrangement!==I0&&(this.arrangementOrigin=this.initialOrigin(this.arrangementOrigin));var y=this.diagram;if(y===null&&a instanceof Le&&(y=a),this.path===D0&&y!==null?this.ud=y.isTreePathToChildren?Tu:Hc:this.ud=this.path===D0?Tu:this.path,0<this.network.vertexes.count){for(this.network.Ko(),a=this.network.vertexes.iterator;a.next();)y=a.value,y.initialized=!1,y.level=0,y.parent=null,y.children=[];if(0<this.Ub.count){for(a=new qe,y=this.Ub.iterator;y.next();){var x=y.value;x instanceof Un?(x=this.network.ki(x),x!==null&&a.add(x)):x instanceof wl&&a.add(x)}this.Ub=a}for(this.Ub.count===0&&this.findRoots(),a=this.Ub.copy().iterator;a.next();)y=a.value,y.initialized||(y.initialized=!0,by(this,y));for(y=this.network.vertexes,a=null;a=Jx(y),0<a.count;)y=rx(this,a),y!==null&&this.Ub.add(y),y.initialized=!0,by(this,y),y=a;for(a=this.Ub.iterator;a.next();)y=a.value,y instanceof wl&&ax(this,y);for(a=this.Ub.iterator;a.next();)y=a.value,y instanceof wl&&sx(this,y);for(a=this.Ub.iterator;a.next();)y=a.value,y instanceof wl&&lx(this,y);if(this.Cu(),this.layerStyle===R0){for(a=[],y=this.network.vertexes.iterator;y.next();){x=y.value;var E=x.parent;E===null&&(E=x),E=E.angle===0||E.angle===180;var b=a[x.level];b===void 0&&(b=0),a[x.level]=Math.max(b,E?x.width:x.height)}for(y=0;y<a.length;y++)a[y]===void 0&&(a[y]=0);for(this.$v=a,y=this.network.vertexes.iterator;y.next();)x=y.value,E=x.parent,E===null&&(E=x),E.angle===0||E.angle===180?(E.angle===180&&(x.focusX+=a[x.level]-x.width),x.width=a[x.level]):(E.angle===270&&(x.focusY+=a[x.level]-x.height),x.height=a[x.level])}else if(this.layerStyle===jy)for(a=this.network.vertexes.iterator;a.next();){for(y=a.value,x=y.angle===0||y.angle===180,E=-1,b=0;b<y.children.length;b++){var z=y.children[b];E=Math.max(E,x?z.width:z.height)}if(0<=E)for(b=0;b<y.children.length;b++)z=y.children[b],x?(y.angle===180&&(z.focusX+=E-z.width),z.width=E):(y.angle===270&&(z.focusY+=E-z.height),z.height=E)}for(a=this.Ub.iterator;a.next();)y=a.value,y instanceof wl&&this.layoutTree(y);this.arrangeTrees(),this.updateParts()}this.network=null,this.Ub=new qe,this.isValidLayout=!0};function Jx(a){var y=new qe;for(a=a.iterator;a.next();){var x=a.value;x.initialized||y.add(x)}return y}xr.prototype.findRoots=function(){for(var a=this.network.vertexes,y=a.iterator;y.next();){var x=y.value;switch(this.ud){case Tu:x.sourceEdges.count===0&&this.Ub.add(x);break;case Hc:x.destinationEdges.count===0&&this.Ub.add(x);break;default:Gt("Unhandled path value "+this.ud.toString())}}this.Ub.count===0&&(a=rx(this,a),a!==null&&this.Ub.add(a))};function rx(a,y){var x=999999,E=null;for(y=y.iterator;y.next();){var b=y.value;switch(a.ud){case Tu:b.sourceEdges.count<x&&(x=b.sourceEdges.count,E=b);break;case Hc:b.destinationEdges.count<x&&(x=b.destinationEdges.count,E=b);break;default:Gt("Unhandled path value "+a.ud.toString())}}return E}function by(a,y){if(y!==null){switch(a.ud){case Tu:if(0<y.destinationEdges.count){for(var x=new Xe,E=y.destinationVertexes;E.next();){var b=E.value;ox(a,y,b)&&x.add(b)}0<x.count&&(y.children=x.Fa())}break;case Hc:if(0<y.sourceEdges.count){for(x=new Xe,E=y.sourceVertexes;E.next();)b=E.value,ox(a,y,b)&&x.add(b);0<x.count&&(y.children=x.Fa())}break;default:Gt("Unhandled path value"+a.ud.toString())}for(x=y.children,E=x.length,b=0;b<E;b++){var z=x[b];z.initialized=!0,z.level=y.level+1,z.parent=y,a.Ub.remove(z)}for(y=0;y<E;y++)by(a,x[y])}}function ox(a,y,x){if(x.initialized){if(y===null)var E=!1;else{for(E=y.parent;E!==null&&E!==x;)E=E.parent;E=E===x}if(E||x.level>y.level)return!1;a.removeChild(x.parent,x)}return!0}xr.prototype.removeChild=function(a,y){if(a!==null&&y!==null){for(var x=a.children,E=0,b=0;b<x.length;b++)x[b]===y&&E++;if(0<E){E=Array(x.length-E);for(var z=b=0;z<x.length;z++)x[z]!==y&&(E[b++]=x[z]);a.children=E}}};function ax(a,y){if(y!==null){a.initializeTreeVertexValues(y),y.alignment===Ru&&a.sortTreeVertexChildren(y);for(var x=0,E=y.childrenCount,b=0,z=y.children,tt=z.length,rt=0;rt<tt;rt++){var ot=z[rt];ax(a,ot),x+=ot.descendantCount+1,E=Math.max(E,ot.maxChildrenCount),b=Math.max(b,ot.maxGenerationCount)}y.descendantCount=x,y.maxChildrenCount=E,y.maxGenerationCount=0<E?b+1:0}}function _x(a,y){switch(a.vo){default:case T0:return y.parent!==null?y.parent:a.W;case Oy:return y.parent===null?a.W:y.parent.parent===null?a.Y:y.parent;case Ty:return y.parent!==null?y.parent.parent!==null?y.parent.parent:a.Y:a.W;case By:var x=!0;if(y.childrenCount===0)x=!1;else for(var E=y.children,b=E.length,z=0;z<b;z++)if(0<E[z].childrenCount){x=!1;break}return x&&y.parent!==null?a.Y:y.parent!==null?y.parent:a.W}}xr.prototype.initializeTreeVertexValues=function(a){if(a.copyInheritedPropertiesFrom(_x(this,a)),a.parent!==null&&a.parent.alignment===Ru){for(var y=a.angle,x=a.parent.children,E=0;E<x.length&&a!==x[E];)E++;E%2===0?E!==x.length-1&&(y=y===90?180:y===180?270:y===270?180:270):y=y===90?0:y===180?90:y===270?0:90,a.angle=y}a.initialized=!0};function sx(a,y){if(y!==null){a.assignTreeVertexValues(y),y=y.children;for(var x=y.length,E=0;E<x;E++)sx(a,y[E])}}xr.prototype.assignTreeVertexValues=function(){};function lx(a,y){if(y!==null){y.alignment!==Ru&&a.sortTreeVertexChildren(y),y=y.children;for(var x=y.length,E=0;E<x;E++)lx(a,y[E])}}xr.prototype.sortTreeVertexChildren=function(a){switch(a.sorting){case Xf:break;case kp:a.children.reverse();break;case Lp:a.children.sort(a.comparer);break;case bp:a.children.sort(a.comparer),a.children.reverse();break;default:Gt("Unhandled sorting value "+a.sorting.toString())}},xr.prototype.Cu=function(){if(this.comments)for(var a=this.network.vertexes.iterator;a.next();)this.addComments(a.value)},xr.prototype.addComments=function(a){var y=a.angle,x=a.parent,E=0,b=!1;x!==null&&(E=x.angle,b=x.alignment,b=md(b)),y=y===90||y===270,E=E===90||E===270,x=a.childrenCount===0;var z=0,tt=0,rt=0,ot=a.commentSpacing;if(a.node!==null)for(var st=a.node.Mu();st.next();){var ut=st.value;ut.category==="Comment"&&ut.canLayout()&&(a.comments===null&&(a.comments=[]),a.comments.push(ut),ut.Va(),ut=ut.measuredBounds,y&&!x||!b&&!E&&x||b&&E&&x?(z=Math.max(z,ut.width),tt+=ut.height+Math.abs(rt)):(z+=ut.width+Math.abs(rt),tt=Math.max(tt,ut.height)),rt=ot)}a.comments!==null&&(y&&!x||!b&&!E&&x||b&&E&&x?(z+=Math.abs(a.commentMargin),tt=Math.max(0,tt-a.height)):(tt+=Math.abs(a.commentMargin),z=Math.max(0,z-a.width)),b=Ee.allocAt(0,0,a.bounds.width+z,a.bounds.height+tt),a.bounds=b,Ee.free(b))};function md(a){return a===Fh||a===Ru||a===Ah||a===qu}function Ep(a){return a===Fh||a===Ru}function My(a){var y=a.parent;if(y!==null){var x=y.alignment;if(md(x)){if(Ep(x)){for(y=y.children,x=0;x<y.length&&a!==y[x];)x++;return x%2===0}if(x===Ah)return!0}}return!1}xr.prototype.layoutComments=function(a){if(a.comments!==null){var y=a.node.measuredBounds,x=a.parent,E=a.angle,b=0,z=!1;x!==null&&(b=x.angle,z=x.alignment,z=md(z)),E=E===90||E===270,x=b===90||b===270;for(var tt=a.childrenCount===0,rt=My(a),ot=0,st=a.comments,ut=st.length,ft=At.alloc(),mt=0;mt<ut;mt++){var yt=st[mt],wt=yt.measuredBounds;if(E&&!tt||!z&&!x&&tt||z&&x&&tt){if(135<b&&!z||x&&rt)if(0<=a.commentMargin)for(ft.h(a.bounds.x-a.commentMargin-wt.width,a.bounds.y+ot),yt.move(ft),yt=yt.Sd();yt.next();){var bt=yt.value;bt.fromSpot=ya,bt.toSpot=na}else for(ft.h(a.bounds.x+2*a.focus.x-a.commentMargin,a.bounds.y+ot),yt.move(ft),yt=yt.Sd();yt.next();)bt=yt.value,bt.fromSpot=na,bt.toSpot=ya;else if(0<=a.commentMargin)for(ft.h(a.bounds.x+2*a.focus.x+a.commentMargin,a.bounds.y+ot),yt.move(ft),yt=yt.Sd();yt.next();)bt=yt.value,bt.fromSpot=na,bt.toSpot=ya;else for(ft.h(a.bounds.x+a.commentMargin-wt.width,a.bounds.y+ot),yt.move(ft),yt=yt.Sd();yt.next();)bt=yt.value,bt.fromSpot=ya,bt.toSpot=na;ot=0<=a.commentSpacing?ot+(wt.height+a.commentSpacing):ot+(a.commentSpacing-wt.height)}else{if(135<b&&!z||!x&&rt)if(0<=a.commentMargin)for(ft.h(a.bounds.x+ot,a.bounds.y-a.commentMargin-wt.height),yt.move(ft),yt=yt.Sd();yt.next();)bt=yt.value,bt.fromSpot=Ma,bt.toSpot=Sa;else for(ft.h(a.bounds.x+ot,a.bounds.y+2*a.focus.y-a.commentMargin),yt.move(ft),yt=yt.Sd();yt.next();)bt=yt.value,bt.fromSpot=Sa,bt.toSpot=Ma;else if(0<=a.commentMargin)for(ft.h(a.bounds.x+ot,a.bounds.y+2*a.focus.y+a.commentMargin),yt.move(ft),yt=yt.Sd();yt.next();)bt=yt.value,bt.fromSpot=Sa,bt.toSpot=Ma;else for(ft.h(a.bounds.x+ot,a.bounds.y+a.commentMargin-wt.height),yt.move(ft),yt=yt.Sd();yt.next();)bt=yt.value,bt.fromSpot=Ma,bt.toSpot=Sa;ot=0<=a.commentSpacing?ot+(wt.width+a.commentSpacing):ot+(a.commentSpacing-wt.width)}}if(At.free(ft),y=ot-a.commentSpacing-(E?y.height:y.width),this.ud===Tu)for(a=a.destinationEdges;a.next();)b=a.value.link,b===null||b.isAvoiding||(b.fromEndSegmentLength=0<y?y:NaN);else for(a=a.sourceEdges;a.next();)b=a.value.link,b===null||b.isAvoiding||(b.toEndSegmentLength=0<y?y:NaN)}},xr.prototype.layoutTree=function(a){if(a!==null){for(var y=a.children,x=y.length,E=0;E<x;E++)this.layoutTree(y[E]);switch(a.compaction){case B0:ux(this,a);break;case Mp:if(a.alignment===Ru)ux(this,a);else if(a.childrenCount===0)E=a.parent,x=!1,y=0,E!==null&&(y=E.angle,x=E.alignment,x=md(x)),E=My(a),a.S.h(0,0),a.Da.h(a.width,a.height),a.parent===null||a.comments===null||(y!==180&&y!==270||x)&&!E?a.la.h(0,0):y===180&&!x||(y===90||y===270)&&E?a.la.h(a.width-2*a.focus.x,0):a.la.h(0,a.height-2*a.focus.y),a.Yo=null,a.kp=null;else{var b=jl(a);y=b===90||b===270;var z=0,tt=a.children,rt=tt.length;for(x=0;x<rt;x++)E=tt[x],z=Math.max(z,y?E.Da.width:E.Da.height);var ot=a.alignment;E=ot===Ou;var st=ot===Iu,ut=md(ot),ft=Math.max(0,a.breadthLimit);x=this.computeLayerSpacing(a);var mt=a.nodeSpacing,yt=this.computeNodeIndent(a),wt=a.rowSpacing,bt=0;(E||st||a.hm||a.im&&a.maxGenerationCount===1)&&(bt=Math.max(0,a.rowIndent)),E=a.width;var Zt=a.height,It=0,Yt=0,Jt=0,qt=null,ae=null,Ce=0,In=0,ui=0,$n=0,Cn=0,$e=0,_i=0,zi=0;if(ut&&!Ep(ot)&&135<b&&tt.reverse(),Ep(ot))if(1<rt)for(var zr=0;zr<rt;zr++)zr%2===0&&zr!==rt-1&&(zi=Math.max(zi,y?tt[zr].Da.width:tt[zr].Da.height));else rt===1&&(zi=y?tt[0].Da.width:tt[0].Da.height);if(ut){switch(ot){case Fh:Yt=135>b?hx(this,a,tt,zi,It,Yt):dx(this,a,tt,zi,It,Yt),zi=Yt.x,It=Yt.width,Yt=Yt.height;break;case Ah:for(qt=0;qt<rt;qt++)ae=tt[qt],ft=ae.Da,Jt=$e===0?0:wt,y?(ae.S.h(z-ft.width,$n+Jt),It=Math.max(It,ft.width),Yt=Math.max(Yt,$n+Jt+ft.height),$n+=Jt+ft.height):(ae.S.h(ui+Jt,z-ft.height),It=Math.max(It,ui+Jt+ft.width),Yt=Math.max(Yt,ft.height),ui+=Jt+ft.width),$e++;break;case qu:for(qt=0;qt<rt;qt++)ae=tt[qt],z=ae.Da,ft=$e===0?0:wt,y?(ae.S.h(mt/2+a.focus.x,$n+ft),It=Math.max(It,z.width),Yt=Math.max(Yt,$n+ft+z.height),$n+=ft+z.height):(ae.S.h(ui+ft,mt/2+a.focus.y),It=Math.max(It,ui+ft+z.width),Yt=Math.max(Yt,z.height),ui+=ft+z.width),$e++}qt=ks(this,2),ae=ks(this,2),y?(qt[0].h(0,0),qt[1].h(0,Yt),ae[0].h(It,0)):(qt[0].h(0,0),qt[1].h(It,0),ae[0].h(0,Yt)),ae[1].h(It,Yt)}else for(zr=0;zr<rt;zr++){var eo=tt[zr],aa=eo.Da;if(y){0<ft&&0<$e&&ui+mt+aa.width>ft&&(ui<z&&tc(a,ot,z-ui,0,_i,zr-1),Cn++,$e=0,_i=zr,Jt=Yt,ui=0,$n=135<b?-Yt-wt:Yt+wt),A0(this,eo,0,$n);var ua=0;if($e===0)qt=eo.Yo,ae=eo.kp,Ce=aa.width,In=aa.height,(qt===null||ae===null||b!==jl(eo))&&(qt=ks(this,2),ae=ks(this,2),qt[0].h(0,0),qt[1].h(0,In),ae[0].h(Ce,0),ae[1].h(Ce,In));else{var Ya=On();In=cx(this,a,eo,qt,ae,Ce,In,Ya),ua=In.x,qt=Ya[0],ae=Ya[1],Ce=In.width,In=In.height,Qn(Ya),ui<aa.width&&0>ua&&(Gc(a,-ua,0,_i,zr-1),N0(qt,-ua,0),N0(ae,-ua,0),ua=0)}eo.S.h(ua,$n),It=Math.max(It,Ce),Yt=Math.max(Yt,Jt+(Cn===0?0:wt)+aa.height),ui=Ce}else 0<ft&&0<$e&&$n+mt+aa.height>ft&&($n<z&&tc(a,ot,0,z-$n,_i,zr-1),Cn++,$e=0,_i=zr,Jt=It,$n=0,ui=135<b?-It-wt:It+wt),A0(this,eo,ui,0),ua=0,$e===0?(qt=eo.Yo,ae=eo.kp,Ce=aa.width,In=aa.height,(qt===null||ae===null||b!==jl(eo))&&(qt=ks(this,2),ae=ks(this,2),qt[0].h(0,0),qt[1].h(Ce,0),ae[0].h(0,In),ae[1].h(Ce,In))):(Ya=On(),In=cx(this,a,eo,qt,ae,Ce,In,Ya),ua=In.x,qt=Ya[0],ae=Ya[1],Ce=In.width,In=In.height,Qn(Ya),$n<aa.height&&0>ua&&(Gc(a,0,-ua,_i,zr-1),N0(qt,0,-ua),N0(ae,0,-ua),ua=0)),eo.S.h(ui,ua),Yt=Math.max(Yt,In),It=Math.max(It,Jt+(Cn===0?0:wt)+aa.width),$n=In;$e++}switch(0<Cn&&(y?(Yt+=Math.max(0,x),ui<It&&tc(a,ot,It-ui,0,_i,rt-1),0<bt&&(st||Gc(a,bt,0,0,rt-1),It+=bt)):(It+=Math.max(0,x),$n<Yt&&tc(a,ot,0,Yt-$n,_i,rt-1),0<bt&&(st||Gc(a,0,bt,0,rt-1),Yt+=bt))),bt=st=0,ot){case Jf:y?st+=It/2-a.focus.x-yt/2:bt+=Yt/2-a.focus.y-yt/2;break;case Kc:0<Cn?y?st+=It/2-a.focus.x-yt/2:bt+=Yt/2-a.focus.y-yt/2:y?(zi=tt[0].S.x+tt[0].la.x,st+=zi+(tt[rt-1].S.x+tt[rt-1].la.x+2*tt[rt-1].focus.x-zi)/2-a.focus.x-yt/2):(zi=tt[0].S.y+tt[0].la.y,bt+=zi+(tt[rt-1].S.y+tt[rt-1].la.y+2*tt[rt-1].focus.y-zi)/2-a.focus.y-yt/2);break;case Ou:y?(st-=yt,It+=yt):(bt-=yt,Yt+=yt);break;case Iu:y?(st+=It-a.width+yt,It+=yt):(bt+=Yt-a.height+yt,Yt+=yt);break;case Fh:y?1<rt?st+=zi+mt/2-a.focus.x:st+=tt[0].focus.x-a.focus.x+tt[0].la.x:1<rt?bt+=zi+mt/2-a.focus.y:bt+=tt[0].focus.y-a.focus.y+tt[0].la.y;break;case Ah:y?st+=It+mt/2-a.focus.x:bt+=Yt+mt/2-a.focus.y;break;case qu:break;default:Yt=this.customAlignment(a,st,bt,It,Yt),st=Yt[0],bt=Yt[1],It=Yt[2],Yt=Yt[3]}for(yt=0;yt<rt;yt++)zi=tt[yt],y?zi.S.h(zi.S.x+zi.la.x-st,zi.S.y+(135<b?(ut?-Yt:-zi.Da.height)+zi.la.y-x:Zt+x+zi.la.y)):zi.S.h(zi.S.x+(135<b?(ut?-It:-zi.Da.width)+zi.la.x-x:E+x+zi.la.x),zi.S.y+zi.la.y-bt);if(rt=tt=0,ut?y?(It=Fy(a,It,st),0>st&&(st=0),135<b&&(bt+=Yt+x),Yt+=Zt+x,ot===qu&&(tt+=mt/2+a.focus.x),rt+=Zt+x):(135<b&&(st+=It+x),It+=E+x,Yt=Ay(a,Yt,bt),0>bt&&(bt=0),ot===qu&&(rt+=mt/2+a.focus.y),tt+=E+x):y?(a.comments===null?E>It&&(It=Ny(ot,E-It,0),tt=It.x,rt=It.y,It=E,st=0):It=Fy(a,It,st),0>st&&(tt-=st,st=0),135<b&&(bt+=Yt+x),Yt=Math.max(Math.max(Yt,Zt),Yt+Zt+x),rt+=Zt+x):(135<b&&(st+=It+x),It=Math.max(Math.max(It,E),It+E+x),a.comments===null?Zt>Yt&&(Yt=Ny(ot,0,Zt-Yt),tt=Yt.x,rt=Yt.y,Yt=Zt,bt=0):Yt=Ay(a,Yt,bt),0>bt&&(rt-=bt,bt=0),tt+=E+x),0<Cn)b=ks(this,4),Cn=ks(this,4),y?(b[2].h(0,Zt+x),b[3].h(b[2].x,Yt),Cn[2].h(It,b[2].y),Cn[3].h(Cn[2].x,b[3].y)):(b[2].h(E+x,0),b[3].h(It,b[2].y),Cn[2].h(b[2].x,Yt),Cn[3].h(b[3].x,Cn[2].y));else{for(b=ks(this,qt.length+2),Cn=ks(this,ae.length+2),ot=0;ot<qt.length;ot++)ut=qt[ot],b[ot+2].h(ut.x+tt,ut.y+rt);for(ot=0;ot<ae.length;ot++)ut=ae[ot],Cn[ot+2].h(ut.x+tt,ut.y+rt)}y?(b[0].h(st,0),b[1].h(b[0].x,Zt),b[2].y<b[1].y&&(b[2].x>b[0].x?b[2].assign(b[1]):b[1].assign(b[2])),b[3].y<b[2].y&&(b[3].x>b[0].x?b[3].assign(b[2]):b[2].assign(b[3])),Cn[0].h(st+E,0),Cn[1].h(Cn[0].x,Zt),Cn[2].y<Cn[1].y&&(Cn[2].x<Cn[0].x?Cn[2].assign(Cn[1]):Cn[1].assign(Cn[2])),Cn[3].y<Cn[2].y&&(Cn[3].x<Cn[0].x?Cn[3].assign(Cn[2]):Cn[2].assign(Cn[3])),b[2].y-=x/2,Cn[2].y-=x/2):(b[0].h(0,bt),b[1].h(E,b[0].y),b[2].x<b[1].x&&(b[2].y>b[0].y?b[2].assign(b[1]):b[1].assign(b[2])),b[3].x<b[2].x&&(b[3].y>b[0].y?b[3].assign(b[2]):b[2].assign(b[3])),Cn[0].h(0,bt+Zt),Cn[1].h(E,Cn[0].y),Cn[2].x<Cn[1].x&&(Cn[2].y<Cn[0].y?Cn[2].assign(Cn[1]):Cn[1].assign(Cn[2])),Cn[3].x<Cn[2].x&&(Cn[3].y<Cn[0].y?Cn[3].assign(Cn[2]):Cn[2].assign(Cn[3])),b[2].x-=x/2,Cn[2].x-=x/2),ql(this,qt),ql(this,ae),a.Yo=b,a.kp=Cn,a.la.h(st,bt),a.Da.h(It,Yt)}break;default:Gt("Unhandled compaction value "+a.compaction.toString())}}};function ux(a,y){if(y.childrenCount===0){var x=!1,E=0;y.parent!==null&&(E=y.parent.angle,x=y.parent.alignment,x=md(x));var b=My(y);y.S.h(0,0),y.Da.h(y.width,y.height),y.parent===null||y.comments===null||(E!==180&&E!==270||x)&&!b?y.la.h(0,0):E===180&&!x||(E===90||E===270)&&b?y.la.h(y.width-2*y.focus.x,0):y.la.h(0,y.height-2*y.focus.y)}else{E=jl(y),x=E===90||E===270;var z=0;b=y.children;for(var tt=b.length,rt=0;rt<tt;rt++){var ot=b[rt];z=Math.max(z,x?ot.Da.width:ot.Da.height)}var st=y.alignment,ut=st===Ou,ft=st===Iu;rt=md(st);var mt=Math.max(0,y.breadthLimit);ot=a.computeLayerSpacing(y);var yt=y.nodeSpacing,wt=a.computeNodeIndent(y),bt=ut||ft?0:wt/2,Zt=y.rowSpacing,It=0;(ut||ft||y.hm||y.im&&y.maxGenerationCount===1)&&(It=Math.max(0,y.rowIndent)),ut=y.width;var Yt=y.height,Jt=0,qt=0,ae=0,Ce=0,In=0,ui=0,$n=0,Cn=0,$e=0,_i=0;if(rt&&!Ep(st)&&135<E&&b.reverse(),Ep(st))if(1<tt)for(var zi=0;zi<tt;zi++){var zr=b[zi],eo=zr.Da;zi%2===0&&zi!==tt-1?$e=Math.max($e,(x?eo.width:eo.height)+a.computeBusNodeSpacing(zr)-yt):zi%2!==0&&(_i=Math.max(_i,(x?eo.width:eo.height)+a.computeBusNodeSpacing(zr)-yt))}else tt===1&&($e=x?b[0].Da.width:b[0].Da.height);if(rt)switch(st){case Fh:case Ru:qt=135>E?hx(a,y,b,$e,Jt,qt):dx(a,y,b,$e,Jt,qt),$e=qt.x,Jt=qt.width,qt=qt.height;break;case Ah:for(mt=0;mt<tt;mt++)bt=b[mt],ae=bt.Da,_i=$n===0?0:Zt,x?(bt.S.h(z-ae.width,In+_i),Jt=Math.max(Jt,ae.width),qt=Math.max(qt,In+_i+ae.height),In+=_i+ae.height):(bt.S.h(Ce+_i,z-ae.height),Jt=Math.max(Jt,Ce+_i+ae.width),qt=Math.max(qt,ae.height),Ce+=_i+ae.width),$n++;break;case qu:for(z=0;z<tt;z++)mt=b[z],bt=mt.Da,ae=$n===0?0:Zt,x?(mt.S.h(yt/2+y.focus.x,In+ae),Jt=Math.max(Jt,bt.width),qt=Math.max(qt,In+ae+bt.height),In+=ae+bt.height):(mt.S.h(Ce+ae,yt/2+y.focus.y),Jt=Math.max(Jt,Ce+ae+bt.width),qt=Math.max(qt,bt.height),Ce+=ae+bt.width),$n++}else for(_i=0;_i<tt;_i++)zi=b[_i],zr=zi.Da,x?(0<mt&&0<$n&&Ce+yt+zr.width>mt&&(Ce<z&&tc(y,st,z-Ce,0,Cn,_i-1),ui++,$n=0,Cn=_i,ae=qt,Ce=0,In=135<E?-qt-Zt:qt+Zt),eo=$n===0?bt:yt,A0(a,zi,0,In),zi.S.h(Ce+eo,In),Jt=Math.max(Jt,Ce+eo+zr.width),qt=Math.max(qt,ae+(ui===0?0:Zt)+zr.height),Ce+=eo+zr.width):(0<mt&&0<$n&&In+yt+zr.height>mt&&(In<z&&tc(y,st,0,z-In,Cn,_i-1),ui++,$n=0,Cn=_i,ae=Jt,In=0,Ce=135<E?-Jt-Zt:Jt+Zt),eo=$n===0?bt:yt,A0(a,zi,Ce,0),zi.S.h(Ce,In+eo),qt=Math.max(qt,In+eo+zr.height),Jt=Math.max(Jt,ae+(ui===0?0:Zt)+zr.width),In+=eo+zr.height),$n++;switch(0<ui&&(x?(qt+=Math.max(0,ot),Ce<Jt&&tc(y,st,Jt-Ce,0,Cn,tt-1),0<It&&(ft||Gc(y,It,0,0,tt-1),Jt+=It)):(Jt+=Math.max(0,ot),In<qt&&tc(y,st,0,qt-In,Cn,tt-1),0<It&&(ft||Gc(y,0,It,0,tt-1),qt+=It))),It=ft=0,st){case Jf:x?ft+=Jt/2-y.focus.x-wt/2:It+=qt/2-y.focus.y-wt/2;break;case Kc:0<ui?x?ft+=Jt/2-y.focus.x-wt/2:It+=qt/2-y.focus.y-wt/2:x?(a=b[0].S.x+b[0].la.x,ft+=a+(b[tt-1].S.x+b[tt-1].la.x+2*b[tt-1].focus.x-a)/2-y.focus.x-wt/2):(a=b[0].S.y+b[0].la.y,It+=a+(b[tt-1].S.y+b[tt-1].la.y+2*b[tt-1].focus.y-a)/2-y.focus.y-wt/2);break;case Ou:x?(ft-=wt,Jt+=wt):(It-=wt,qt+=wt);break;case Iu:x?(ft+=Jt-y.width+wt,Jt+=wt):(It+=qt-y.height+wt,qt+=wt);break;case Fh:case Ru:x?1<tt?ft+=$e+yt/2-y.focus.x:ft+=b[0].focus.x-y.focus.x+b[0].la.x:1<tt?It+=$e+yt/2-y.focus.y:It+=b[0].focus.y-y.focus.y+b[0].la.y;break;case Ah:x?ft+=Jt+yt/2-y.focus.x:It+=qt+yt/2-y.focus.y;break;case qu:break;default:a=a.customAlignment(y,ft,It,Jt,qt),ft=a[0],It=a[1],Jt=a[2],qt=a[3]}for(a=0;a<tt;a++)wt=b[a],x?wt.S.h(wt.S.x+wt.la.x-ft,wt.S.y+(135<E?(rt?-qt:-wt.Da.height)+wt.la.y-ot:Yt+ot+wt.la.y)):wt.S.h(wt.S.x+(135<E?(rt?-Jt:-wt.Da.width)+wt.la.x-ot:ut+ot+wt.la.x),wt.S.y+wt.la.y-It);x?(Jt=Fy(y,Jt,ft),0>ft&&(ft=0),135<E&&(It+=qt+ot),qt=Math.max(Math.max(qt,Yt),qt+Yt+ot)):(135<E&&(ft+=Jt+ot),Jt=Math.max(Math.max(Jt,ut),Jt+ut+ot),qt=Ay(y,qt,It),0>It&&(It=0)),y.la.h(ft,It),y.Da.h(Jt,qt)}}xr.prototype.customAlignment=function(a,y,x,E,b){return[y,x,E,b]};function hx(a,y,x,E,b,z){var tt=x.length;if(tt===0)return new Ee(E,0,b,z);if(tt===1)return y=x[0],b=y.Da.width,z=y.Da.height,new Ee(E,0,b,z);for(var rt=y.nodeSpacing,ot=y.rowSpacing,st=jl(y)===90,ut=0,ft=0,mt=0,yt=0;yt<tt;yt++)if(!(yt%2!==0||1<tt&&yt===tt-1)){var wt=x[yt],bt=wt.Da,Zt=ut===0?0:ot;if(st){var It=a.computeBusNodeSpacing(wt)-rt;wt.S.h(E-(bt.width+It),mt+Zt),b=Math.max(b,bt.width+It),z=Math.max(z,mt+Zt+bt.height),mt+=Zt+bt.height}else It=a.computeBusNodeSpacing(wt)-rt,wt.S.h(ft+Zt,E-(bt.height+It)),z=Math.max(z,bt.height+It),b=Math.max(b,ft+Zt+bt.width),ft+=Zt+bt.width;ut++}for(ut=0,wt=ft,yt=mt,st?(ft=E+rt,mt=0):(ft=0,mt=E+rt),bt=0;bt<tt;bt++)if(bt%2!==0){Zt=x[bt],It=Zt.Da;var Yt=ut===0?0:ot;if(st){var Jt=a.computeBusNodeSpacing(Zt)-rt;Zt.S.h(ft+Jt,mt+Yt),b=Math.max(b,ft+It.width+Jt),z=Math.max(z,mt+Yt+It.height),mt+=Yt+It.height}else Jt=a.computeBusNodeSpacing(Zt)-rt,Zt.S.h(ft+Yt,mt+Jt),b=Math.max(b,ft+Yt+It.width),z=Math.max(z,mt+It.height+Jt),ft+=Yt+It.width;ut++}return 1<tt&&tt%2===1&&(x=x[tt-1],tt=x.Da,a=a.computeBusLastRowSpacing(x,st?Math.max(Math.abs(yt),Math.abs(mt)):Math.max(Math.abs(wt),Math.abs(ft))),st?(x.S.h(E+rt/2-x.focus.x-x.la.x,z+a),st=E+rt/2-x.focus.x-x.la.x,b=Math.max(b,st+tt.width),0>st&&(b-=st),z=Math.max(z,Math.max(yt,mt)+a+tt.height),0>x.S.x&&(E=F0(y,x.S.x,!1,E,rt))):(x.S.h(b+a,E+rt/2-x.focus.y-x.la.y),b=Math.max(b,Math.max(wt,ft)+a+tt.width),mt=E+rt/2-x.focus.y-x.la.y,z=Math.max(z,mt+tt.height),0>mt&&(z-=mt),0>x.S.y&&(E=F0(y,x.S.y,!0,E,rt)))),new Ee(E,0,b,z)}function dx(a,y,x,E,b,z){var tt=x.length;if(tt===0)return new Ee(E,0,b,z);if(tt===1)return x=x[0],b=x.Da.width,z=x.Da.height,new Ee(E,0,b,z);for(var rt=y.nodeSpacing,ot=y.rowSpacing,st=jl(y)===270,ut=0,ft=0,mt=0,yt=0;yt<tt;yt++)if(!(yt%2!==0||1<tt&&yt===tt-1)){var wt=x[yt],bt=wt.Da,Zt=ut===0?0:ot;if(st){var It=a.computeBusNodeSpacing(wt)-rt;mt-=Zt+bt.height,wt.S.h(E-(bt.width+It),mt),b=Math.max(b,bt.width+It),z=Math.max(z,Math.abs(mt))}else It=a.computeBusNodeSpacing(wt)-rt,ft-=Zt+bt.width,wt.S.h(ft,E-(bt.height+It)),z=Math.max(z,bt.height+It),b=Math.max(b,Math.abs(ft));ut++}for(ut=0,wt=ft,yt=mt,st?(ft=E+rt,mt=0):(ft=0,mt=E+rt),bt=0;bt<tt;bt++)if(bt%2!==0){Zt=x[bt],It=Zt.Da;var Yt=ut===0?0:ot;if(st){var Jt=a.computeBusNodeSpacing(Zt)-rt;mt-=Yt+It.height,Zt.S.h(ft+Jt,mt),b=Math.max(b,ft+It.width+Jt),z=Math.max(z,Math.abs(mt))}else Jt=a.computeBusNodeSpacing(Zt)-rt,ft-=Yt+It.width,Zt.S.h(ft,mt+Jt),z=Math.max(z,mt+It.height+Jt),b=Math.max(b,Math.abs(ft));ut++}for(1<tt&&tt%2===1&&(ot=x[tt-1],ut=ot.Da,a=a.computeBusLastRowSpacing(ot,st?Math.max(Math.abs(yt),Math.abs(mt)):Math.max(Math.abs(wt),Math.abs(ft))),st?(ot.S.h(E+rt/2-ot.focus.x-ot.la.x,-z-ut.height-a),ft=E+rt/2-ot.focus.x-ot.la.x,b=Math.max(b,ft+ut.width),0>ft&&(b-=ft),z=Math.max(z,Math.abs(Math.min(yt,mt))+a+ut.height),0>ot.S.x&&(E=F0(y,ot.S.x,!1,E,rt))):(ot.S.h(-b-ut.width-a,E+rt/2-ot.focus.y-ot.la.y),b=Math.max(b,Math.abs(Math.min(wt,ft))+a+ut.width),mt=E+rt/2-ot.focus.y-ot.la.y,z=Math.max(z,mt+ut.height),0>mt&&(z-=mt),0>ot.S.y&&(E=F0(y,ot.S.y,!0,E,rt)))),y=0;y<tt;y++)rt=x[y],st?rt.S.h(rt.S.x,rt.S.y+z):rt.S.h(rt.S.x+b,rt.S.y);return new Ee(E,0,b,z)}xr.prototype.computeBusNodeSpacing=function(a){return a.parent===null?0:a.parent.nodeSpacing},xr.prototype.computeBusLastRowSpacing=function(a){return a.parent===null?0:a.parent.rowSpacing};function F0(a,y,x,E,b){a=a.children;for(var z=a.length,tt=0;tt<z;tt++)x?a[tt].S.h(a[tt].S.x,a[tt].S.y-y):a[tt].S.h(a[tt].S.x-y,a[tt].S.y);return y=a[z-1],Math.max(E,x?y.la.y+y.focus.y-b/2:y.la.x+y.focus.x-b/2)}function Fy(a,y,x){switch(a.alignment){case Kc:case Jf:return x+a.width>y&&(y=x+a.width),0>x&&(y-=x),y;case Ou:return a.width>y?a.width:y;case Iu:return 2*a.focus.x>y?a.width:y+a.width-2*a.focus.x;case Fh:case Ru:return Math.max(a.width,Math.max(y,x+a.width)-Math.min(0,x));case Ah:return a.width-a.focus.x+a.nodeSpacing/2+y;case qu:return Math.max(a.width,a.focus.x+a.nodeSpacing/2+y);default:return y}}function Ay(a,y,x){switch(a.alignment){case Kc:case Jf:return x+a.height>y&&(y=x+a.height),0>x&&(y-=x),y;case Ou:return a.height>y?a.height:y;case Iu:return 2*a.focus.y>y?a.height:y+a.height-2*a.focus.y;case Fh:case Ru:return Math.max(a.height,Math.max(y,x+a.height)-Math.min(0,x));case Ah:return a.height-a.focus.y+a.nodeSpacing/2+y;case qu:return Math.max(a.height,a.focus.y+a.nodeSpacing/2+y);default:return y}}function Ny(a,y,x){switch(a){case Jf:y/=2,x/=2;break;case Kc:y/=2,x/=2;break;case Ou:x=y=0;break;case Iu:break;default:Gt("Unhandled alignment value "+a.toString())}return new At(y,x)}function tc(a,y,x,E,b,z){y=Ny(y,x,E),Gc(a,y.x,y.y,b,z)}function Gc(a,y,x,E,b){if(y!==0||x!==0)for(a=a.children;E<=b;E++){var z=a[E].S;z.x+=y,z.y+=x}}function A0(a,y,x,E){var b=y.parent;switch(a.ud){case Tu:for(a=y.sourceEdges;a.next();)y=a.value,y.fromVertex===b&&y.relativePoint.h(x,E);break;case Hc:for(a=y.destinationEdges;a.next();)y=a.value,y.toVertex===b&&y.relativePoint.h(x,E);break;default:Gt("Unhandled path value "+a.ud.toString())}}function N0(a,y,x){for(var E=0;E<a.length;E++){var b=a[E];b.x+=y,b.y+=x}}function cx(a,y,x,E,b,z,tt,rt){var ot=jl(y),st=ot===90||ot===270,ut=y.nodeSpacing;y=E;var ft=b;E=z;var mt=tt,yt=x.Yo,wt=x.kp;tt=x.Da;var bt=st?Math.max(mt,tt.height):Math.max(E,tt.width);if((yt===null||ot!==jl(x))&&(yt=ks(a,2),wt=ks(a,2),st?(yt[0].h(0,0),yt[1].h(0,tt.height),wt[0].h(tt.width,0),wt[1].h(wt[0].x,yt[1].y)):(yt[0].h(0,0),yt[1].h(tt.width,0),wt[0].h(0,tt.height),wt[1].h(yt[1].x,wt[0].y))),st){if(mt=9999999,!(ft===null||2>ft.length||yt===null||2>yt.length))for(b=x=0;x<ft.length&&b<yt.length;){z=ft[x];var Zt=yt[b];ot=Zt.x,st=Zt.y,ot+=E;var It=z;x+1<ft.length&&(It=ft[x+1]);var Yt=Zt;Zt=Yt.x,Yt=Yt.y,b+1<yt.length&&(Yt=yt[b+1],Zt=Yt.x,Yt=Yt.y,Zt+=E);var Jt=mt;z.y===st?Jt=ot-z.x:z.y>st&&z.y<Yt?Jt=ot+(z.y-st)/(Yt-st)*(Zt-ot)-z.x:st>z.y&&st<It.y&&(Jt=ot-(z.x+(st-z.y)/(It.y-z.y)*(It.x-z.x))),Jt<mt&&(mt=Jt),It.y<=z.y?x++:Yt<=st?b++:(It.y<=Yt&&x++,Yt<=It.y&&b++)}if(mt=E-mt,mt+=ut,x=yt,b=mt,y===null||2>y.length||x===null||2>x.length)E=null;else{for(ut=ks(a,y.length+x.length),E=z=ot=0;z<x.length&&x[z].y<y[0].y;)st=x[z++],ut[E++].h(st.x+b,st.y);for(;ot<y.length;)st=y[ot++],ut[E++].h(st.x,st.y);for(ot=y[y.length-1].y;z<x.length&&x[z].y<=ot;)z++;for(;z<x.length&&x[z].y>ot;)st=x[z++],ut[E++].h(st.x+b,st.y);for(x=ks(a,E),ot=0;ot<E;ot++)x[ot].assign(ut[ot]);ql(a,ut),E=x}if(z=wt,ot=mt,ft===null||2>ft.length||z===null||2>z.length)b=null;else{for(ut=ks(a,ft.length+z.length),b=st=x=0;x<ft.length&&ft[x].y<z[0].y;)It=ft[x++],ut[b++].h(It.x,It.y);for(;st<z.length;)It=z[st++],ut[b++].h(It.x+ot,It.y);for(z=z[z.length-1].y;x<ft.length&&ft[x].y<=z;)x++;for(;x<ft.length&&ft[x].y>z;)ot=ft[x++],ut[b++].h(ot.x,ot.y);for(z=ks(a,b),x=0;x<b;x++)z[x].assign(ut[x]);ql(a,ut),b=z}return z=Math.max(0,mt)+tt.width,tt=bt,ql(a,y),ql(a,yt),ql(a,ft),ql(a,wt),rt[0]=E,rt[1]=b,new Ee(mt,0,z,tt)}if(E=9999999,!(ft===null||2>ft.length||yt===null||2>yt.length))for(b=x=0;x<ft.length&&b<yt.length;)z=ft[x],Zt=yt[b],ot=Zt.x,st=Zt.y,st+=mt,It=z,x+1<ft.length&&(It=ft[x+1]),Yt=Zt,Zt=Yt.x,Yt=Yt.y,b+1<yt.length&&(Yt=yt[b+1],Zt=Yt.x,Yt=Yt.y,Yt+=mt),Jt=E,z.x===ot?Jt=st-z.y:z.x>ot&&z.x<Zt?Jt=st+(z.x-ot)/(Zt-ot)*(Yt-st)-z.y:ot>z.x&&ot<It.x&&(Jt=st-(z.y+(ot-z.x)/(It.x-z.x)*(It.y-z.y))),Jt<E&&(E=Jt),It.x<=z.x?x++:Zt<=ot?b++:(It.x<=Zt&&x++,Zt<=It.x&&b++);if(mt-=E,mt+=ut,x=yt,b=mt,y===null||2>y.length||x===null||2>x.length)E=null;else{for(ut=ks(a,y.length+x.length),E=z=ot=0;z<x.length&&x[z].x<y[0].x;)st=x[z++],ut[E++].h(st.x,st.y+b);for(;ot<y.length;)st=y[ot++],ut[E++].h(st.x,st.y);for(ot=y[y.length-1].x;z<x.length&&x[z].x<=ot;)z++;for(;z<x.length&&x[z].x>ot;)st=x[z++],ut[E++].h(st.x,st.y+b);for(x=ks(a,E),ot=0;ot<E;ot++)x[ot].assign(ut[ot]);ql(a,ut),E=x}if(z=wt,ot=mt,ft===null||2>ft.length||z===null||2>z.length)b=null;else{for(ut=ks(a,ft.length+z.length),b=st=x=0;x<ft.length&&ft[x].x<z[0].x;)It=ft[x++],ut[b++].h(It.x,It.y);for(;st<z.length;)It=z[st++],ut[b++].h(It.x,It.y+ot);for(z=z[z.length-1].x;x<ft.length&&ft[x].x<=z;)x++;for(;x<ft.length&&ft[x].x>z;)ot=ft[x++],ut[b++].h(ot.x,ot.y);for(z=ks(a,b),x=0;x<b;x++)z[x].assign(ut[x]);ql(a,ut),b=z}return z=bt,tt=Math.max(0,mt)+tt.height,ql(a,y),ql(a,yt),ql(a,ft),ql(a,wt),rt[0]=E,rt[1]=b,new Ee(mt,0,z,tt)}function ks(a,y){if(a=a.ru[y],a!==void 0&&(a=a.pop(),a!==void 0))return a;a=[];for(var x=0;x<y;x++)a[x]=new At;return a}function ql(a,y){var x=y.length,E=a.ru[x];E===void 0&&(E=[],a.ru[x]=E),E.push(y)}xr.prototype.arrangeTrees=function(){if(this.Rb===I0)for(var a=this.Ub.iterator;a.next();){var y=a.value;if(y instanceof wl){var x=y.node;if(x!==null){var E=x.position;x=E.x,E=E.y,isFinite(x)||(x=0),isFinite(E)||(E=0),Dy(this,y,x,E)}}}else{for(a=[],y=this.Ub.iterator;y.next();)x=y.value,x instanceof wl&&a.push(x);switch(this.sorting){case Xf:break;case kp:a.reverse();break;case Lp:a.sort(this.comparer);break;case bp:a.sort(this.comparer),a.reverse();break;default:Gt("Unhandled sorting value "+this.sorting.toString())}for(x=this.arrangementOrigin,y=x.x,x=x.y,E=0;E<a.length;E++){var b=a[E];switch(Dy(this,b,y+b.la.x,x+b.la.y),this.Rb){case O0:x+=b.Da.height+this.$d.height;break;case Iy:y+=b.Da.width+this.$d.width;break;default:Gt("Unhandled arrangement value "+this.Rb.toString())}}}};function Dy(a,y,x,E){if(y!==null){y.x=x,y.y=E,y=y.children;for(var b=y.length,z=0;z<b;z++){var tt=y[z];Dy(a,tt,x+tt.S.x,E+tt.S.y)}}}xr.prototype.commitLayout=function(){this.yv(),this.commitNodes(),this.Gu(),this.isRouting&&this.commitLinks()},xr.prototype.commitNodes=function(){for(var a=this.network.vertexes.iterator;a.next();)a.value.commit();for(a.reset();a.next();)this.layoutComments(a.value)},xr.prototype.Gu=function(){if(this.layerStyle===R0){for(var a=this.$v,y=[],x=null,E=this.network.vertexes.iterator;E.next();){var b=E.value;x===null?x=b.bounds.copy():x.ed(b.bounds);var z=y[b.level];z===void 0?z=this.computeLayerSpacing(b):z=Math.max(z,this.computeLayerSpacing(b)),y[b.level]=z}for(E=0;E<y.length;E++)y[E]===void 0&&(y[E]=0);if(this.angle===90||this.angle===270?(x.Bc(this.nodeSpacing/2,this.layerSpacing),E=new At(-this.nodeSpacing/2,-this.layerSpacing/2)):(x.Bc(this.layerSpacing,this.nodeSpacing/2),E=new At(-this.layerSpacing/2,-this.nodeSpacing/2)),b=[],x=this.angle===90||this.angle===270?x.width:x.height,z=0,this.angle===180||this.angle===270)for(var tt=0;tt<a.length;tt++)z+=a[tt]+y[tt];for(tt=0;tt<a.length;tt++){var rt=a[tt]+y[tt];this.angle===270?(z-=rt,b.push(new Ee(0,z,x,rt))):this.angle===90?(b.push(new Ee(0,z,x,rt)),z+=rt):this.angle===180?(z-=rt,b.push(new Ee(z,0,rt,x))):(b.push(new Ee(z,0,rt,x)),z+=rt)}this.commitLayers(b,E)}},xr.prototype.commitLayers=function(){},xr.prototype.commitLinks=function(){for(var a=this.network.edges.iterator;a.next();)a.value.commit()},xr.prototype.yv=function(){for(var a=this.Ub.iterator;a.next();){var y=a.value;y instanceof wl&&fx(this,y)}};function fx(a,y){if(y!==null){a.setPortSpots(y),y=y.children;for(var x=y.length,E=0;E<x;E++)fx(a,y[E])}}xr.prototype.setPortSpots=function(a){var y=a.alignment;if(md(y)){var x=this.ud===Tu,E=jl(a);switch(E){case 0:var b=na;break;case 90:b=Sa;break;case 180:b=ya;break;default:b=Ma}var z=a.children,tt=z.length;switch(y){case Fh:case Ru:for(y=0;y<tt;y++){var rt=z[y];if(rt=(x?rt.sourceEdges:rt.destinationEdges).first(),rt!==null&&(rt=rt.link,rt!==null)){var ot=E===90||E===270?ya:Ma;if(tt===1||y===tt-1&&tt%2===1)switch(E){case 0:ot=ya;break;case 90:ot=Ma;break;case 180:ot=na;break;default:ot=Sa}else y%2===0&&(ot=E===90||E===270?na:Sa);x?(a.setsPortSpot&&(rt.fromSpot=b),a.setsChildPortSpot&&(rt.toSpot=ot)):(a.setsPortSpot&&(rt.fromSpot=ot),a.setsChildPortSpot&&(rt.toSpot=b))}}break;case Ah:for(E=E===90||E===270?na:Sa,z=x?a.destinationEdges:a.sourceEdges;z.next();)tt=z.value.link,tt!==null&&(x?(a.setsPortSpot&&(tt.fromSpot=b),a.setsChildPortSpot&&(tt.toSpot=E)):(a.setsPortSpot&&(tt.fromSpot=E),a.setsChildPortSpot&&(tt.toSpot=b)));break;case qu:for(E=E===90||E===270?ya:Ma,z=x?a.destinationEdges:a.sourceEdges;z.next();)tt=z.value.link,tt!==null&&(x?(a.setsPortSpot&&(tt.fromSpot=b),a.setsChildPortSpot&&(tt.toSpot=E)):(a.setsPortSpot&&(tt.fromSpot=E),a.setsChildPortSpot&&(tt.toSpot=b)))}}else if(x=jl(a),this.ud===Tu){for(b=a.destinationEdges;b.next();)if(E=b.value.link,E!==null){if(a.setsPortSpot)if(a.portSpot.Xb())switch(x){case 0:E.fromSpot=na;break;case 90:E.fromSpot=Sa;break;case 180:E.fromSpot=ya;break;default:E.fromSpot=Ma}else E.fromSpot=a.portSpot;if(a.setsChildPortSpot)if(a.childPortSpot.Xb())switch(x){case 0:E.toSpot=ya;break;case 90:E.toSpot=Ma;break;case 180:E.toSpot=na;break;default:E.toSpot=Sa}else E.toSpot=a.childPortSpot}}else for(b=a.sourceEdges;b.next();)if(E=b.value.link,E!==null){if(a.setsPortSpot)if(a.portSpot.Xb())switch(x){case 0:E.toSpot=na;break;case 90:E.toSpot=Sa;break;case 180:E.toSpot=ya;break;default:E.toSpot=Ma}else E.toSpot=a.portSpot;if(a.setsChildPortSpot)if(a.childPortSpot.Xb())switch(x){case 0:E.fromSpot=ya;break;case 90:E.fromSpot=Ma;break;case 180:E.fromSpot=na;break;default:E.fromSpot=Sa}else E.fromSpot=a.childPortSpot}};function jl(a){return a=a.angle,45>=a?0:135>=a?90:225>=a?180:315>=a?270:0}xr.prototype.computeLayerSpacing=function(a){var y=jl(a);y=y===90||y===270;var x=a.layerSpacing;if(0<a.layerSpacingParentOverlap){var E=Math.min(1,a.layerSpacingParentOverlap);x-=y?a.height*E:a.width*E}return x<(y?-a.height:-a.width)&&(x=y?-a.height:-a.width),x},xr.prototype.computeNodeIndent=function(a){var y=jl(a),x=a.nodeIndent;if(0<a.nodeIndentPastParent){var E=Math.min(1,a.nodeIndentPastParent);x+=y===90||y===270?a.width*E:a.height*E}return x=Math.max(0,x)},ge.Object.defineProperties(xr.prototype,{roots:{get:function(){return this.Ub},set:function(a){this.Ub!==a&&(this.Ub=a,this.C())}},path:{get:function(){return this.Wn},set:function(a){this.Wn!==a&&(this.Wn=a,this.C())}},treeStyle:{get:function(){return this.vo},set:function(a){this.Rb===a||a!==T0&&a!==Ty&&a!==By&&a!==Oy||(this.vo=a,this.C())}},layerStyle:{get:function(){return this.Bq},set:function(a){this.Rb===a||a!==Ry&&a!==jy&&a!==R0||(this.Bq=a,this.C())}},comments:{get:function(){return this.td},set:function(a){this.td!==a&&(this.td=a,this.C())}},arrangement:{get:function(){return this.Rb},set:function(a){this.Rb===a||a!==O0&&a!==Iy&&a!==I0||(this.Rb=a,this.C())}},arrangementSpacing:{get:function(){return this.$d},set:function(a){this.$d.D(a)||(this.$d.assign(a),this.C())}},rootDefaults:{get:function(){return this.W},set:function(a){this.W!==a&&(this.W=a,this.C())}},alternateDefaults:{get:function(){return this.Y},set:function(a){this.Y!==a&&(this.Y=a,this.C())}},sorting:{get:function(){return this.W.sorting},set:function(a){this.W.sorting===a||a!==Xf&&a!==kp&&a!==Lp&&!bp||(this.W.sorting=a,this.C())}},comparer:{get:function(){return this.W.comparer},set:function(a){this.W.comparer!==a&&(this.W.comparer=a,this.C())}},angle:{get:function(){return this.W.angle},set:function(a){this.W.angle!==a&&(a===0||a===90||a===180||a===270?(this.W.angle=a,this.C()):Gt("TreeLayout.angle must be 0, 90, 180, or 270"))}},alignment:{get:function(){return this.W.alignment},set:function(a){this.W.alignment!==a&&(this.W.alignment=a,this.C())}},nodeIndent:{get:function(){return this.W.nodeIndent},set:function(a){this.W.nodeIndent!==a&&0<=a&&(this.W.nodeIndent=a,this.C())}},nodeIndentPastParent:{get:function(){return this.W.nodeIndentPastParent},set:function(a){this.W.nodeIndentPastParent!==a&&0<=a&&1>=a&&(this.W.nodeIndentPastParent=a,this.C())}},nodeSpacing:{get:function(){return this.W.nodeSpacing},set:function(a){this.W.nodeSpacing!==a&&(this.W.nodeSpacing=a,this.C())}},layerSpacing:{get:function(){return this.W.layerSpacing},set:function(a){this.W.layerSpacing!==a&&(this.W.layerSpacing=a,this.C())}},layerSpacingParentOverlap:{get:function(){return this.W.layerSpacingParentOverlap},set:function(a){this.W.layerSpacingParentOverlap!==a&&0<=a&&1>=a&&(this.W.layerSpacingParentOverlap=a,this.C())}},compaction:{get:function(){return this.W.compaction},set:function(a){this.W.compaction===a||a!==B0&&a!==Mp||(this.W.compaction=a,this.C())}},breadthLimit:{get:function(){return this.W.breadthLimit},set:function(a){this.W.breadthLimit!==a&&0<=a&&(this.W.breadthLimit=a,this.C())}},rowSpacing:{get:function(){return this.W.rowSpacing},set:function(a){this.W.rowSpacing!==a&&(this.W.rowSpacing=a,this.C())}},rowIndent:{get:function(){return this.W.rowIndent},set:function(a){this.W.rowIndent!==a&&0<=a&&(this.W.rowIndent=a,this.C())}},commentSpacing:{get:function(){return this.W.commentSpacing},set:function(a){this.W.commentSpacing!==a&&(this.W.commentSpacing=a,this.C())}},commentMargin:{get:function(){return this.W.commentMargin},set:function(a){this.W.commentMargin!==a&&(this.W.commentMargin=a,this.C())}},setsPortSpot:{get:function(){return this.W.setsPortSpot},set:function(a){this.W.setsPortSpot!==a&&(this.W.setsPortSpot=a,this.C())}},portSpot:{get:function(){return this.W.portSpot},set:function(a){this.W.portSpot.D(a)||(this.W.portSpot=a,this.C())}},setsChildPortSpot:{get:function(){return this.W.setsChildPortSpot},set:function(a){this.W.setsChildPortSpot!==a&&(this.W.setsChildPortSpot=a,this.C())}},childPortSpot:{get:function(){return this.W.childPortSpot},set:function(a){this.W.childPortSpot.D(a)||(this.W.childPortSpot=a,this.C())}},alternateSorting:{get:function(){return this.Y.sorting},set:function(a){this.Y.sorting===a||a!==Xf&&a!==kp&&a!==Lp&&!bp||(this.Y.sorting=a,this.C())}},alternateComparer:{get:function(){return this.Y.comparer},set:function(a){this.Y.comparer!==a&&(this.Y.comparer=a,this.C())}},alternateAngle:{get:function(){return this.Y.angle},set:function(a){this.Y.angle===a||a!==0&&a!==90&&a!==180&&a!==270||(this.Y.angle=a,this.C())}},alternateAlignment:{get:function(){return this.Y.alignment},set:function(a){this.Y.alignment!==a&&(this.Y.alignment=a,this.C())}},alternateNodeIndent:{get:function(){return this.Y.nodeIndent},set:function(a){this.Y.nodeIndent!==a&&0<=a&&(this.Y.nodeIndent=a,this.C())}},alternateNodeIndentPastParent:{get:function(){return this.Y.nodeIndentPastParent},set:function(a){this.Y.nodeIndentPastParent!==a&&0<=a&&1>=a&&(this.Y.nodeIndentPastParent=a,this.C())}},alternateNodeSpacing:{get:function(){return this.Y.nodeSpacing},set:function(a){this.Y.nodeSpacing!==a&&(this.Y.nodeSpacing=a,this.C())}},alternateLayerSpacing:{get:function(){return this.Y.layerSpacing},set:function(a){this.Y.layerSpacing!==a&&(this.Y.layerSpacing=a,this.C())}},alternateLayerSpacingParentOverlap:{get:function(){return this.Y.layerSpacingParentOverlap},set:function(a){this.Y.layerSpacingParentOverlap!==a&&0<=a&&1>=a&&(this.Y.layerSpacingParentOverlap=a,this.C())}},alternateCompaction:{get:function(){return this.Y.compaction},set:function(a){this.Y.compaction===a||a!==B0&&a!==Mp||(this.Y.compaction=a,this.C())}},alternateBreadthLimit:{get:function(){return this.Y.breadthLimit},set:function(a){this.Y.breadthLimit!==a&&0<=a&&(this.Y.breadthLimit=a,this.C())}},alternateRowSpacing:{get:function(){return this.Y.rowSpacing},set:function(a){this.Y.rowSpacing!==a&&(this.Y.rowSpacing=a,this.C())}},alternateRowIndent:{get:function(){return this.Y.rowIndent},set:function(a){this.Y.rowIndent!==a&&0<=a&&(this.Y.rowIndent=a,this.C())}},alternateCommentSpacing:{get:function(){return this.Y.commentSpacing},set:function(a){this.Y.commentSpacing!==a&&(this.Y.commentSpacing=a,this.C())}},alternateCommentMargin:{get:function(){return this.Y.commentMargin},set:function(a){this.Y.commentMargin!==a&&(this.Y.commentMargin=a,this.C())}},alternateSetsPortSpot:{get:function(){return this.Y.setsPortSpot},set:function(a){this.Y.setsPortSpot!==a&&(this.Y.setsPortSpot=a,this.C())}},alternatePortSpot:{get:function(){return this.Y.portSpot},set:function(a){this.Y.portSpot.D(a)||(this.Y.portSpot=a,this.C())}},alternateSetsChildPortSpot:{get:function(){return this.Y.setsChildPortSpot},set:function(a){this.Y.setsChildPortSpot!==a&&(this.Y.setsChildPortSpot=a,this.C())}},alternateChildPortSpot:{get:function(){return this.Y.childPortSpot},set:function(a){this.Y.childPortSpot.D(a)||(this.Y.childPortSpot=a,this.C())}}});var D0=new Ue(xr,"PathDefault",-1),Tu=new Ue(xr,"PathDestination",0),Hc=new Ue(xr,"PathSource",1),Xf=new Ue(xr,"SortingForwards",10),kp=new Ue(xr,"SortingReverse",11),Lp=new Ue(xr,"SortingAscending",12),bp=new Ue(xr,"SortingDescending",13),Jf=new Ue(xr,"AlignmentCenterSubtrees",20),Kc=new Ue(xr,"AlignmentCenterChildren",21),Ou=new Ue(xr,"AlignmentStart",22),Iu=new Ue(xr,"AlignmentEnd",23),Fh=new Ue(xr,"AlignmentBus",24),Ru=new Ue(xr,"AlignmentBusBranching",25),Ah=new Ue(xr,"AlignmentTopLeftBus",26),qu=new Ue(xr,"AlignmentBottomRightBus",27),B0=new Ue(xr,"CompactionNone",30),Mp=new Ue(xr,"CompactionBlock",31),T0=new Ue(xr,"StyleLayered",40),By=new Ue(xr,"StyleLastParents",41),Ty=new Ue(xr,"StyleAlternating",42),Oy=new Ue(xr,"StyleRootOnly",43),O0=new Ue(xr,"ArrangementVertical",50),Iy=new Ue(xr,"ArrangementHorizontal",51),I0=new Ue(xr,"ArrangementFixedRoots",52),Ry=new Ue(xr,"LayerIndividual",60),jy=new Ue(xr,"LayerSiblings",61),R0=new Ue(xr,"LayerUniform",62);xr.className="TreeLayout",xr.PathDefault=D0,xr.PathDestination=Tu,xr.PathSource=Hc,xr.SortingForwards=Xf,xr.SortingReverse=kp,xr.SortingAscending=Lp,xr.SortingDescending=bp,xr.AlignmentCenterSubtrees=Jf,xr.AlignmentCenterChildren=Kc,xr.AlignmentStart=Ou,xr.AlignmentEnd=Iu,xr.AlignmentBus=Fh,xr.AlignmentBusBranching=Ru,xr.AlignmentTopLeftBus=Ah,xr.AlignmentBottomRightBus=qu,xr.CompactionNone=B0,xr.CompactionBlock=Mp,xr.StyleLayered=T0,xr.StyleLastParents=By,xr.StyleAlternating=Ty,xr.StyleRootOnly=Oy,xr.ArrangementVertical=O0,xr.ArrangementHorizontal=Iy,xr.ArrangementFixedRoots=I0,xr.LayerIndividual=Ry,xr.LayerSiblings=jy,xr.LayerUniform=R0;function Zc(a){ro.call(this,a)}we(Zc,ro),Zc.prototype.createVertex=function(){return new wl(this)},Zc.prototype.createEdge=function(){return new _f(this)},Zc.className="TreeNetwork";function wl(a){qo.call(this,a),this.V=!1,this.hb=null,this.u=[],this.nb=this.Ha=this.F=this.ia=0,this.td=null,this.S=new At(0,0),this.Da=new Ke(0,0),this.la=new At(0,0),this.im=this.hm=this.qA=!1,this.kp=this.Yo=null,this.nd=Xf,this.hd=ry,this.Kb=0,this.Jb=Kc,this.Vq=this.Uq=0,this.Wq=20,this.ie=50,this.Aq=0,this.Hp=Mp,this.Ap=0,this.nr=25,this.Gp=this.mr=10,this.Fp=20,this.xr=!0,this.dr=Bo,this.wr=!0,this.Dp=Bo}we(wl,qo),wl.prototype.copyInheritedPropertiesFrom=function(a){a!==null&&(this.nd=a.sorting,this.hd=a.comparer,this.Kb=a.angle,this.Jb=a.alignment,this.Uq=a.nodeIndent,this.Vq=a.nodeIndentPastParent,this.Wq=a.nodeSpacing,this.ie=a.layerSpacing,this.Aq=a.layerSpacingParentOverlap,this.Hp=a.compaction,this.Ap=a.breadthLimit,this.nr=a.rowSpacing,this.mr=a.rowIndent,this.Gp=a.commentSpacing,this.Fp=a.commentMargin,this.xr=a.setsPortSpot,this.dr=a.portSpot,this.wr=a.setsChildPortSpot,this.Dp=a.childPortSpot)},ge.Object.defineProperties(wl.prototype,{initialized:{get:function(){return this.V},set:function(a){this.V!==a&&(this.V=a)}},parent:{get:function(){return this.hb},set:function(a){this.hb!==a&&(this.hb=a)}},children:{get:function(){return this.u},set:function(a){if(this.u!==a){if(a!==null)for(var y=a.length,x=0;x<y;x++);this.u=a}}},level:{get:function(){return this.ia},set:function(a){this.ia!==a&&(this.ia=a)}},descendantCount:{get:function(){return this.F},set:function(a){this.F!==a&&(this.F=a)}},maxChildrenCount:{get:function(){return this.Ha},set:function(a){this.Ha!==a&&(this.Ha=a)}},maxGenerationCount:{get:function(){return this.nb},set:function(a){this.nb!==a&&(this.nb=a)}},comments:{get:function(){return this.td},set:function(a){if(this.td!==a){if(a!==null)for(var y=a.length,x=0;x<y;x++);this.td=a}}},sorting:{get:function(){return this.nd},set:function(a){this.nd!==a&&(this.nd=a)}},comparer:{get:function(){return this.hd},set:function(a){this.hd!==a&&(this.hd=a)}},angle:{get:function(){return this.Kb},set:function(a){this.Kb!==a&&(this.Kb=a)}},alignment:{get:function(){return this.Jb},set:function(a){this.Jb!==a&&(this.Jb=a)}},nodeIndent:{get:function(){return this.Uq},set:function(a){this.Uq!==a&&(this.Uq=a)}},nodeIndentPastParent:{get:function(){return this.Vq},set:function(a){this.Vq!==a&&(this.Vq=a)}},nodeSpacing:{get:function(){return this.Wq},set:function(a){this.Wq!==a&&(this.Wq=a)}},layerSpacing:{get:function(){return this.ie},set:function(a){this.ie!==a&&(this.ie=a)}},layerSpacingParentOverlap:{get:function(){return this.Aq},set:function(a){this.Aq!==a&&(this.Aq=a)}},compaction:{get:function(){return this.Hp},set:function(a){this.Hp!==a&&(this.Hp=a)}},breadthLimit:{get:function(){return this.Ap},set:function(a){this.Ap!==a&&(this.Ap=a)}},rowSpacing:{get:function(){return this.nr},set:function(a){this.nr!==a&&(this.nr=a)}},rowIndent:{get:function(){return this.mr},set:function(a){this.mr!==a&&(this.mr=a)}},commentSpacing:{get:function(){return this.Gp},set:function(a){this.Gp!==a&&(this.Gp=a)}},commentMargin:{get:function(){return this.Fp},set:function(a){this.Fp!==a&&(this.Fp=a)}},setsPortSpot:{get:function(){return this.xr},set:function(a){this.xr!==a&&(this.xr=a)}},portSpot:{get:function(){return this.dr},set:function(a){this.dr.D(a)||(this.dr=a)}},setsChildPortSpot:{get:function(){return this.wr},set:function(a){this.wr!==a&&(this.wr=a)}},childPortSpot:{get:function(){return this.Dp},set:function(a){this.Dp.D(a)||(this.Dp=a)}},childrenCount:{get:function(){return this.children.length}},relativePosition:{get:function(){return this.S},set:function(a){this.S.set(a)}},subtreeSize:{get:function(){return this.Da},set:function(a){this.Da.set(a)}},subtreeOffset:{get:function(){return this.la},set:function(a){this.la.set(a)}}}),wl.className="TreeVertex";function _f(a){Is.call(this,a),this.$t=new At(0,0)}we(_f,Is),_f.prototype.commit=function(){var a=this.link;if(a!==null&&!a.isAvoiding){var y=this.network.layout,x=null,E=null;switch(y.ud){case Tu:x=this.fromVertex,E=this.toVertex;break;case Hc:x=this.toVertex,E=this.fromVertex;break;default:Gt("Unhandled path value "+y.ud.toString())}if(x!==null&&E!==null){var b=this.$t;if(b.x!==0||b.y!==0||x.qA){E=x.bounds;var z=jl(x),tt=y.computeLayerSpacing(x),rt=x.rowSpacing;a.vg();var ot=a.curve===Ys,st=a.isOrthogonal,ut;if(a.uh(),st||ot){for(ut=2;4<a.pointsCount;)a.pv(2);var ft=a.i(1),mt=a.i(2)}else{for(ut=1;3<a.pointsCount;)a.pv(1);ft=a.i(0),mt=a.i(a.pointsCount-1)}var yt=a.i(a.pointsCount-1);z===0?(x.alignment===Iu?(z=E.bottom+b.y,b.y===0&&ft.y>yt.y+x.rowIndent&&(z=Math.min(z,Math.max(ft.y,z-y.computeNodeIndent(x))))):x.alignment===Ou?(z=E.top+b.y,b.y===0&&ft.y<yt.y-x.rowIndent&&(z=Math.max(z,Math.min(ft.y,z+y.computeNodeIndent(x))))):z=x.hm||x.im&&x.maxGenerationCount===1?E.top-x.la.y+b.y:E.y+E.height/2+b.y,ot?(a.m(ut,ft.x,z),ut++,a.m(ut,E.right+tt,z),ut++,a.m(ut,E.right+tt+(b.x-rt)/3,z),ut++,a.m(ut,E.right+tt+2*(b.x-rt)/3,z),ut++,a.m(ut,E.right+tt+(b.x-rt),z),ut++,a.m(ut,mt.x,z)):(st&&(a.m(ut,E.right+tt/2,ft.y),ut++),a.m(ut,E.right+tt/2,z),ut++,a.m(ut,E.right+tt+b.x-(st?rt/2:rt),z),ut++,st&&a.m(ut,a.i(ut-1).x,mt.y))):z===90?(x.alignment===Iu?(z=E.right+b.x,b.x===0&&ft.x>yt.x+x.rowIndent&&(z=Math.min(z,Math.max(ft.x,z-y.computeNodeIndent(x))))):x.alignment===Ou?(z=E.left+b.x,b.x===0&&ft.x<yt.x-x.rowIndent&&(z=Math.max(z,Math.min(ft.x,z+y.computeNodeIndent(x))))):z=x.hm||x.im&&x.maxGenerationCount===1?E.left-x.la.x+b.x:E.x+E.width/2+b.x,ot?(a.m(ut,z,ft.y),ut++,a.m(ut,z,E.bottom+tt),ut++,a.m(ut,z,E.bottom+tt+(b.y-rt)/3),ut++,a.m(ut,z,E.bottom+tt+2*(b.y-rt)/3),ut++,a.m(ut,z,E.bottom+tt+(b.y-rt)),ut++,a.m(ut,z,mt.y)):(st&&(a.m(ut,ft.x,E.bottom+tt/2),ut++),a.m(ut,z,E.bottom+tt/2),ut++,a.m(ut,z,E.bottom+tt+b.y-(st?rt/2:rt)),ut++,st&&a.m(ut,mt.x,a.i(ut-1).y))):z===180?(x.alignment===Iu?(z=E.bottom+b.y,b.y===0&&ft.y>yt.y+x.rowIndent&&(z=Math.min(z,Math.max(ft.y,z-y.computeNodeIndent(x))))):x.alignment===Ou?(z=E.top+b.y,b.y===0&&ft.y<yt.y-x.rowIndent&&(z=Math.max(z,Math.min(ft.y,z+y.computeNodeIndent(x))))):z=x.hm||x.im&&x.maxGenerationCount===1?E.top-x.la.y+b.y:E.y+E.height/2+b.y,ot?(a.m(ut,ft.x,z),ut++,a.m(ut,E.left-tt,z),ut++,a.m(ut,E.left-tt+(b.x+rt)/3,z),ut++,a.m(ut,E.left-tt+2*(b.x+rt)/3,z),ut++,a.m(ut,E.left-tt+(b.x+rt),z),ut++,a.m(ut,mt.x,z)):(st&&(a.m(ut,E.left-tt/2,ft.y),ut++),a.m(ut,E.left-tt/2,z),ut++,a.m(ut,E.left-tt+b.x+(st?rt/2:rt),z),ut++,st&&a.m(ut,a.i(ut-1).x,mt.y))):z===270?(x.alignment===Iu?(z=E.right+b.x,b.x===0&&ft.x>yt.x+x.rowIndent&&(z=Math.min(z,Math.max(ft.x,z-y.computeNodeIndent(x))))):x.alignment===Ou?(z=E.left+b.x,b.x===0&&ft.x<yt.x-x.rowIndent&&(z=Math.max(z,Math.min(ft.x,z+y.computeNodeIndent(x))))):z=x.hm||x.im&&x.maxGenerationCount===1?E.left-x.la.x+b.x:E.x+E.width/2+b.x,ot?(a.m(ut,z,ft.y),ut++,a.m(ut,z,E.top-tt),ut++,a.m(ut,z,E.top-tt+(b.y+rt)/3),ut++,a.m(ut,z,E.top-tt+2*(b.y+rt)/3),ut++,a.m(ut,z,E.top-tt+(b.y+rt)),ut++,a.m(ut,z,mt.y)):(st&&(a.m(ut,ft.x,E.top-tt/2),ut++),a.m(ut,z,E.top-tt/2),ut++,a.m(ut,z,E.top-tt+b.y+(st?rt/2:rt)),ut++,st&&a.m(ut,mt.x,a.i(ut-1).y))):Gt("Invalid angle "+z),a.zf()}else b=E,a=this.link,E=this.network.layout,y=jl(x),y!==jl(b)&&(tt=E.computeLayerSpacing(x),rt=x.bounds,x=b.bounds,y===0&&x.left-rt.right<tt+1||y===90&&x.top-rt.bottom<tt+1||y===180&&rt.left-x.right<tt+1||y===270&&rt.top-x.bottom<tt+1||(a.vg(),x=a.curve===Ys,b=a.isOrthogonal,E=md(this.fromVertex.alignment),a.uh(),y===0?(y=rt.right+tt/2,x?a.pointsCount===4&&(x=a.i(3).y,a.L(1,y-20,a.i(1).y),a.m(2,y-20,x),a.m(3,y,x),a.m(4,y+20,x),a.L(5,a.i(5).x,x)):b?E?a.L(3,a.i(2).x,a.i(4).y):a.pointsCount===6&&(a.L(2,y,a.i(2).y),a.L(3,y,a.i(3).y)):a.pointsCount===4?a.m(2,y,a.i(2).y):a.pointsCount===3?a.L(1,y,a.i(2).y):a.pointsCount===2&&a.m(1,y,a.i(1).y)):y===90?(y=rt.bottom+tt/2,x?a.pointsCount===4&&(x=a.i(3).x,a.L(1,a.i(1).x,y-20),a.m(2,x,y-20),a.m(3,x,y),a.m(4,x,y+20),a.L(5,x,a.i(5).y)):b?E?a.L(3,a.i(2).x,a.i(4).y):a.pointsCount===6&&(a.L(2,a.i(2).x,y),a.L(3,a.i(3).x,y)):a.pointsCount===4?a.m(2,a.i(2).x,y):a.pointsCount===3?a.L(1,a.i(2).x,y):a.pointsCount===2&&a.m(1,a.i(1).x,y)):y===180?(y=rt.left-tt/2,x?a.pointsCount===4&&(x=a.i(3).y,a.L(1,y+20,a.i(1).y),a.m(2,y+20,x),a.m(3,y,x),a.m(4,y-20,x),a.L(5,a.i(5).x,x)):b?E?a.L(3,a.i(2).x,a.i(4).y):a.pointsCount===6&&(a.L(2,y,a.i(2).y),a.L(3,y,a.i(3).y)):a.pointsCount===4?a.m(2,y,a.i(2).y):a.pointsCount===3?a.L(1,y,a.i(2).y):a.pointsCount===2&&a.m(1,y,a.i(1).y)):y===270&&(y=rt.top-tt/2,x?a.pointsCount===4&&(x=a.i(3).x,a.L(1,a.i(1).x,y+20),a.m(2,x,y+20),a.m(3,x,y),a.m(4,x,y-20),a.L(5,x,a.i(5).y)):b?E?a.L(3,a.i(2).x,a.i(4).y):a.pointsCount===6&&(a.L(2,a.i(2).x,y),a.L(3,a.i(3).x,y)):a.pointsCount===4?a.m(2,a.i(2).x,y):a.pointsCount===3?a.L(1,a.i(2).x,y):a.pointsCount===2&&a.m(1,a.i(1).x,y)),a.zf()))}}},ge.Object.defineProperties(_f.prototype,{fromVertex:{get:function(){return this.kd},set:function(a){this.kd!==a&&(this.kd=a)}},toVertex:{get:function(){return this.qd},set:function(a){this.qd!==a&&(this.qd=a)}},relativePoint:{get:function(){return this.$t},set:function(a){this.$t.set(a)}}}),_f.className="TreeEdge",qr.prototype.initializeStandardTools=function(){this.gb("Action",new gl,this.mouseDownTools),this.gb("Relinking",new Ks,this.mouseDownTools),this.gb("LinkReshaping",new Go,this.mouseDownTools),this.gb("Rotating",new $a,this.mouseDownTools),this.gb("Resizing",new Ta,this.mouseDownTools),this.gb("Linking",new qa,this.mouseMoveTools),this.gb("Dragging",new vo,this.mouseMoveTools),this.gb("DragSelecting",new $s,this.mouseMoveTools),this.gb("Panning",new Fa,this.mouseMoveTools),this.gb("ContextMenu",new ts,this.mouseUpTools),this.gb("TextEditing",new ho,this.mouseUpTools),this.gb("ClickCreating",new hh,this.mouseUpTools),this.gb("ClickSelecting",new Zh,this.mouseUpTools)},pu("Horizontal",new cm),pu("Spot",new gm),pu("Table",new mm),pu("Viewbox",new Sm),pu("TableRow",new vm),pu("TableColumn",new ym),pu("Graduated",new Wg),pu("Grid",new Zg),Sf.add("GraphLinksModel",la),Sf.add("TreeModel",sl);var j0=ln.go,zy={get licenseKey(){return Le.licenseKey},set licenseKey(a){Le.licenseKey=a},get version(){return Le.version},Group:$i,EnumValue:Ue,List:Xe,Set:qe,Map:Me,Point:At,Size:Ke,Rect:Ee,Margin:Ji,Spot:li,Geometry:xn,PathFigure:jo,PathSegment:Or,InputEvent:ia,DiagramEvent:Qs,ChangedEvent:ao,Model:mi,GraphLinksModel:Lr,TreeModel:ls,Binding:Ko,Transaction:To,UndoManager:uo,CommandHandler:Kt,Tool:wr,DraggingTool:vo,DraggingInfo:Uu,DraggingOptions:at,LinkingBaseTool:Ao,LinkingTool:qa,RelinkingTool:Ks,LinkReshapingTool:Go,ResizingTool:Ta,RotatingTool:$a,ClickSelectingTool:Zh,ActionTool:gl,ClickCreatingTool:hh,HTMLInfo:hu,ContextMenuTool:ts,DragSelectingTool:$s,PanningTool:Fa,TextEditingTool:ho,ToolManager:qr,Animation:Aa,AnimationManager:Bs,AnimationTrigger:Al,Layer:ga,Diagram:Le,Palette:dt,Overview:gt,Brush:Wr,GraphObject:he,Panel:mn,RowColumnDefinition:Jo,Shape:lr,TextBlock:io,Picture:ys,Part:Li,Adornment:Rr,Node:Un,Link:En,Placeholder:rs,Layout:mo,LayoutNetwork:ro,LayoutVertex:qo,LayoutEdge:Is,GridLayout:Pa,PanelLayout:Qo,CircularLayout:xo,CircularNetwork:Vf,CircularVertex:yp,CircularEdge:y0,ForceDirectedLayout:Da,ForceDirectedNetwork:zc,ForceDirectedVertex:Sp,ForceDirectedEdge:xp,LayeredDigraphLayout:Ur,LayeredDigraphNetwork:Yf,LayeredDigraphVertex:ul,LayeredDigraphEdge:Cp,TreeLayout:xr,TreeNetwork:Zc,TreeVertex:wl,TreeEdge:_f};typeof j0=="object"&&j0.version&&zn("WARNING: a `go` object on the root object is already defined. "+("Debug"in j0?"debug ":"")+"version: "+j0.version+", replaced with version: "+zy.version),Le.prototype.go=zy,ln.go=zy,typeof Tn.exports=="object"&&(Tn.exports=typeof Dt.g!="undefined"?Dt.g.go:self.go)}();var Ft=typeof Dt.g!="undefined"?Dt.g.go:self.go;const se=typeof Dt.g!="undefined"?Dt.g.go:self.go,ye=se.Group,Be=se.EnumValue,Se=se.List,Rt=se.Set,ie=se.Map,je=se.Point,ce=se.Size,Vt=se.Rect,Qe=se.Margin,Qt=se.Spot,Je=se.Geometry,Nt=se.PathFigure,nt=se.PathSegment,et=se.InputEvent,ct=se.DiagramEvent,lt=se.ChangedEvent,pt=se.Model,vt=se.GraphLinksModel,xt=se.TreeModel,Lt=se.Binding,Ot=se.Transaction,Ht=se.UndoManager,te=se.CommandHandler,_t=se.Tool,Xt=se.DraggingTool,ve=se.DraggingInfo,oe=se.LinkingBaseTool,Re=se.LinkingTool,Ye=se.RelinkingTool,en=se.LinkReshapingTool,Rn=se.ResizingTool,wn=se.RotatingTool,un=se.ClickSelectingTool,vn=se.ActionTool,ne=se.ClickCreatingTool,jt=se.HTMLInfo,Fe=se.ContextMenuTool,We=se.DragSelectingTool,Pn=se.PanningTool,ke=se.TextEditingTool,tn=se.ToolManager,fn=se.Animation,Jn=se.AnimationManager,Pe=se.AnimationTrigger,an=se.Layer,re=se.Diagram,hn=se.Palette,di=se.Overview,Tt=se.Brush,Et=se.GraphObject,St=se.Panel,Mt=se.RowColumnDefinition,zt=se.Shape,kt=se.TextBlock,Ut=se.TextBlockMetrics,Oe=se.Picture,Te=se.Part,_e=se.Adornment,ee=se.Node,de=se.Link,pe=se.Placeholder,be=se.Layout,ze=se.LayoutNetwork,rn=se.LayoutVertex,He=se.LayoutEdge,yn=se.GridLayout,xe=se.PanelLayout,Ne=se.CircularLayout,Ze=se.CircularNetwork,Bn=se.CircularVertex,le=se.CircularEdge,An=se.ForceDirectedLayout,Kn=se.ForceDirectedNetwork,yi=se.ForceDirectedVertex,Xn=se.ForceDirectedEdge,Ei=se.LayeredDigraphLayout,Yi=se.LayeredDigraphNetwork,Gi=se.LayeredDigraphVertex,Hi=se.LayeredDigraphEdge,Ki=se.TreeLayout,Qi=se.TreeNetwork,ji=se.TreeVertex,Ai=se.TreeEdge,Zi=se.version},2859:function(Tn,oi,Dt){"use strict";Dt.d(oi,{hP:function(){return di}});var Ft=function(Tt,Et){return(Ft=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(St,Mt){St.__proto__=Mt}||function(St,Mt){for(var zt in Mt)Object.prototype.hasOwnProperty.call(Mt,zt)&&(St[zt]=Mt[zt])})(Tt,Et)};function se(Tt,Et){function St(){this.constructor=Tt}Ft(Tt,Et),Tt.prototype=Et===null?Object.create(Et):(St.prototype=Et.prototype,new St)}function ye(Tt,Et,St,Mt){return new(St||(St=Promise))(function(zt,kt){function Ut(_e){try{Te(Mt.next(_e))}catch(ee){kt(ee)}}function Oe(_e){try{Te(Mt.throw(_e))}catch(ee){kt(ee)}}function Te(_e){var ee;_e.done?zt(_e.value):(ee=_e.value,ee instanceof St?ee:new St(function(de){de(ee)})).then(Ut,Oe)}Te((Mt=Mt.apply(Tt,Et||[])).next())})}function Be(Tt,Et){var St,Mt,zt,kt,Ut={label:0,sent:function(){if(1&zt[0])throw zt[1];return zt[1]},trys:[],ops:[]};return kt={next:Oe(0),throw:Oe(1),return:Oe(2)},typeof Symbol=="function"&&(kt[Symbol.iterator]=function(){return this}),kt;function Oe(Te){return function(_e){return function(ee){if(St)throw new TypeError("Generator is already executing.");for(;Ut;)try{if(St=1,Mt&&(zt=2&ee[0]?Mt.return:ee[0]?Mt.throw||((zt=Mt.return)&&zt.call(Mt),0):Mt.next)&&!(zt=zt.call(Mt,ee[1])).done)return zt;switch(Mt=0,zt&&(ee=[2&ee[0],zt.value]),ee[0]){case 0:case 1:zt=ee;break;case 4:return Ut.label++,{value:ee[1],done:!1};case 5:Ut.label++,Mt=ee[1],ee=[0];continue;case 7:ee=Ut.ops.pop(),Ut.trys.pop();continue;default:if(zt=Ut.trys,!((zt=zt.length>0&&zt[zt.length-1])||ee[0]!==6&&ee[0]!==2)){Ut=0;continue}if(ee[0]===3&&(!zt||ee[1]>zt[0]&&ee[1]<zt[3])){Ut.label=ee[1];break}if(ee[0]===6&&Ut.label<zt[1]){Ut.label=zt[1],zt=ee;break}if(zt&&Ut.label<zt[2]){Ut.label=zt[2],Ut.ops.push(ee);break}zt[2]&&Ut.ops.pop(),Ut.trys.pop();continue}ee=Et.call(Tt,Ut)}catch(de){ee=[6,de],Mt=0}finally{St=zt=0}if(5&ee[0])throw ee[1];return{value:ee[0]?ee[1]:void 0,done:!0}}([Te,_e])}}}function Se(){for(var Tt=0,Et=0,St=arguments.length;Et<St;Et++)Tt+=arguments[Et].length;var Mt=Array(Tt),zt=0;for(Et=0;Et<St;Et++)for(var kt=arguments[Et],Ut=0,Oe=kt.length;Ut<Oe;Ut++,zt++)Mt[zt]=kt[Ut];return Mt}var Rt=function(){function Tt(){}return Tt.createDefs=function(){return document.createElementNS("http://www.w3.org/2000/svg","defs")},Tt.setAttributes=function(Et,St){for(var Mt=0,zt=St;Mt<zt.length;Mt++){var kt=zt[Mt],Ut=kt[0],Oe=kt[1];Et.setAttribute(Ut,Oe)}},Tt.createRect=function(Et,St,Mt){var zt=document.createElementNS("http://www.w3.org/2000/svg","rect");return zt.setAttribute("width",Et.toString()),zt.setAttribute("height",St.toString()),Mt&&Tt.setAttributes(zt,Mt),zt},Tt.createLine=function(Et,St,Mt,zt,kt){var Ut=document.createElementNS("http://www.w3.org/2000/svg","line");return Ut.setAttribute("x1",Et.toString()),Ut.setAttribute("y1",St.toString()),Ut.setAttribute("x2",Mt.toString()),Ut.setAttribute("y2",zt.toString()),kt&&Tt.setAttributes(Ut,kt),Ut},Tt.createPolygon=function(Et,St){var Mt=document.createElementNS("http://www.w3.org/2000/svg","polygon");return Mt.setAttribute("points",Et),St&&Tt.setAttributes(Mt,St),Mt},Tt.createCircle=function(Et,St){var Mt=document.createElementNS("http://www.w3.org/2000/svg","circle");return Mt.setAttribute("cx",(Et/2).toString()),Mt.setAttribute("cy",(Et/2).toString()),Mt.setAttribute("r",Et.toString()),St&&Tt.setAttributes(Mt,St),Mt},Tt.createEllipse=function(Et,St,Mt){var zt=document.createElementNS("http://www.w3.org/2000/svg","ellipse");return zt.setAttribute("cx",(Et/2).toString()),zt.setAttribute("cy",(St/2).toString()),zt.setAttribute("rx",(Et/2).toString()),zt.setAttribute("ry",(St/2).toString()),Mt&&Tt.setAttributes(zt,Mt),zt},Tt.createGroup=function(Et){var St=document.createElementNS("http://www.w3.org/2000/svg","g");return Et&&Tt.setAttributes(St,Et),St},Tt.createTransform=function(){return document.createElementNS("http://www.w3.org/2000/svg","svg").createSVGTransform()},Tt.createMarker=function(Et,St,Mt,zt,kt,Ut,Oe){var Te=document.createElementNS("http://www.w3.org/2000/svg","marker");return Tt.setAttributes(Te,[["id",Et],["orient",St],["markerWidth",Mt.toString()],["markerHeight",zt.toString()],["refX",kt.toString()],["refY",Ut.toString()]]),Te.appendChild(Oe),Te},Tt.createText=function(Et){var St=document.createElementNS("http://www.w3.org/2000/svg","text");return St.setAttribute("x","0"),St.setAttribute("y","0"),Et&&Tt.setAttributes(St,Et),St},Tt.createTSpan=function(Et,St){var Mt=document.createElementNS("http://www.w3.org/2000/svg","tspan");return Mt.textContent=Et,St&&Tt.setAttributes(Mt,St),Mt},Tt.createImage=function(Et){var St=document.createElementNS("http://www.w3.org/2000/svg","image");return Et&&Tt.setAttributes(St,Et),St},Tt.createPoint=function(Et,St){var Mt=document.createElementNS("http://www.w3.org/2000/svg","svg").createSVGPoint();return Mt.x=Et,Mt.y=St,Mt},Tt.createPath=function(Et,St){var Mt=document.createElementNS("http://www.w3.org/2000/svg","path");return Mt.setAttribute("d",Et),St&&Tt.setAttributes(Mt,St),Mt},Tt}(),ie=function(){function Tt(){}return Tt.addKey=function(Et){Tt.key=Et},Object.defineProperty(Tt,"isLicensed",{get:function(){return!!Tt.key&&new RegExp(/^MJS2-[A-Z][0-9]{3}-[A-Z][0-9]{3}-[0-9]{4}$/,"i").test(Tt.key)},enumerable:!1,configurable:!0}),Tt}(),je=function(){function Tt(){this.naturalSize=!1,this.imageType="image/png",this.markersOnly=!1}return Tt.prototype.rasterize=function(Et,St,Mt){var zt=this;return new Promise(function(kt){var Ut=Mt!==void 0?Mt:document.createElement("canvas");Et===null&&(zt.markersOnly=!0,zt.naturalSize=!1);var Oe=document.createElementNS("http://www.w3.org/2000/svg","svg");Oe.setAttribute("xmlns","http://www.w3.org/2000/svg"),Oe.setAttribute("width",St.width.baseVal.valueAsString),Oe.setAttribute("height",St.height.baseVal.valueAsString),Oe.setAttribute("viewBox","0 0 "+St.viewBox.baseVal.width.toString()+" "+St.viewBox.baseVal.height.toString()),Oe.innerHTML=St.innerHTML,zt.naturalSize===!0?(Oe.width.baseVal.value=Et.naturalWidth,Oe.height.baseVal.value=Et.naturalHeight):zt.width!==void 0&&zt.height!==void 0&&(Oe.width.baseVal.value=zt.width,Oe.height.baseVal.value=zt.height),Ut.width=Oe.width.baseVal.value,Ut.height=Oe.height.baseVal.value;var Te=Oe.outerHTML,_e=Ut.getContext("2d");zt.markersOnly!==!0&&_e.drawImage(Et,0,0,Ut.width,Ut.height);var ee=window.URL,de=new Image(Ut.width,Ut.height);de.setAttribute("crossOrigin","anonymous");var pe=new Blob([Te],{type:"image/svg+xml"}),be=ee.createObjectURL(pe);de.onload=function(){_e.drawImage(de,0,0),ee.revokeObjectURL(be);var ze=Ut.toDataURL(zt.imageType,zt.imageQuality);kt(ze)},de.src=be})},Tt}(),ce=function(){},Vt=function(){function Tt(Et){this._classNamePrefixBase="__markerjs2_",this.classes=[],this.rules=[],this.settings=this.defaultSettings,this._classNamePrefix=this._classNamePrefixBase+"_"+Et+"_"}return Object.defineProperty(Tt.prototype,"classNamePrefixBase",{get:function(){return this._classNamePrefixBase},enumerable:!1,configurable:!0}),Object.defineProperty(Tt.prototype,"classNamePrefix",{get:function(){return this._classNamePrefix},enumerable:!1,configurable:!0}),Object.defineProperty(Tt.prototype,"defaultSettings",{get:function(){return{canvasBackgroundColor:"#ffffff",toolbarBackgroundColor:"#111111",toolbarBackgroundHoverColor:"#333333",toolbarColor:"#eeeeee",toolbarHeight:40,toolboxColor:"#eeeeee",toolboxAccentColor:"#3080c3",undoButtonVisible:!0,redoButtonVisible:!1,zoomButtonVisible:!1,zoomOutButtonVisible:!1,clearButtonVisible:!1,resultButtonBlockVisible:!0,logoPosition:"left"}},enumerable:!1,configurable:!0}),Object.defineProperty(Tt.prototype,"fadeInAnimationClassName",{get:function(){return this.classNamePrefix+"fade_in"},enumerable:!1,configurable:!0}),Object.defineProperty(Tt.prototype,"fadeOutAnimationClassName",{get:function(){return this.classNamePrefix+"fade_out"},enumerable:!1,configurable:!0}),Tt.prototype.addClass=function(Et){return this.styleSheet===void 0&&this.addStyleSheet(),Et.name=""+this.classNamePrefix+Et.localName,this.classes.push(Et),this.styleSheet.sheet.insertRule("."+Et.name+" {"+Et.style+"}",this.styleSheet.sheet.cssRules.length),Et},Tt.prototype.addRule=function(Et){this.styleSheet===void 0&&this.addStyleSheet(),this.rules.push(Et),this.styleSheet.sheet.insertRule(Et.selector+" {"+Et.style+"}",this.styleSheet.sheet.cssRules.length)},Tt.prototype.addStyleSheet=function(){var Et;this.styleSheet=document.createElement("style"),((Et=this.styleSheetRoot)!==null&&Et!==void 0?Et:document.head).appendChild(this.styleSheet),this.addRule(new Qe("."+this.classNamePrefix+" h3","font-family: sans-serif")),this.addRule(new Qe("@keyframes "+this.classNamePrefix+"_fade_in_animation_frames",`
|
|
from {
|
|
opacity: 0;
|
|
}
|
|
to {
|
|
opacity: 1;
|
|
}
|
|
`)),this.addRule(new Qe("@keyframes "+this.classNamePrefix+"_fade_out_animation_frames",`
|
|
from {
|
|
opacity: 1;
|
|
}
|
|
to {
|
|
opacity: 0;
|
|
}
|
|
`)),this.addClass(new Qt("fade_in",`
|
|
animation-duration: 0.3s;
|
|
animation-name: `+this.classNamePrefix+`_fade_in_animation_frames;
|
|
`)),this.addClass(new Qt("fade_out",`
|
|
animation-duration: 0.3s;
|
|
animation-name: `+this.classNamePrefix+`_fade_out_animation_frames;
|
|
`))},Tt.prototype.removeStyleSheet=function(){var Et;this.styleSheet&&(((Et=this.styleSheetRoot)!==null&&Et!==void 0?Et:document.head).removeChild(this.styleSheet),this.styleSheet=void 0)},Tt}(),Qe=function(Tt,Et){this.selector=Tt,this.style=Et},Qt=function(Tt,Et){this.localName=Tt,this.style=Et},Je=function(){function Tt(Et,St,Mt,zt,kt){this.buttons=[],this.markerButtons=[],this.buttonClickListeners=[],this.markerjsContainer=Et,this.displayMode=St,this.markerItems=Mt,this.uiStyleSettings=zt,this.styles=kt,this.addStyles(),this.adjustLayout=this.adjustLayout.bind(this),this.overflowButtonClicked=this.overflowButtonClicked.bind(this),this.setCurrentMarker=this.setCurrentMarker.bind(this)}return Tt.prototype.show=function(Et){var St=this;this.uiContainer=document.createElement("div"),this.uiContainer.style.visibility=Et,this.uiContainer.className=this.toolbarStyleClass.name+" "+this.styles.fadeInAnimationClassName+" "+(this.uiStyleSettings.toolbarStyleColorsClassName?this.uiStyleSettings.toolbarStyleColorsClassName:this.toolbarStyleColorsClass.name);var Mt=document.createElement("div");Mt.className=this.toolbarBlockStyleClass.name,Mt.style.whiteSpace="nowrap",this.uiContainer.appendChild(Mt),this.addActionButton(Mt,'<svg viewBox="0 0 24 24"><path d="M10.07 14.27a.997.997 0 011.33.48l2.3 4.99 1.8-.85-2.31-4.98c-.24-.5-.02-1.1.48-1.33l.28-.08 2.3-.45L8 5.12V15.9l1.82-1.47.25-.16m3.57 7.7a.99.99 0 01-1.33-.47l-2.18-4.74-2.51 2.02c-.17.14-.38.22-.62.22a1 1 0 01-1-1V3a1 1 0 011-1c.24 0 .47.09.64.23l.01-.01 11.49 9.64a1.001 1.001 0 01-.44 1.75l-3.16.62 2.2 4.73c.26.5.02 1.09-.48 1.32l-3.62 1.69z"/></svg>',"select"),this.addActionButton(Mt,'<svg viewBox="0 0 24 24"><path d="M9 3v1H4v2h1v13a2 2 0 002 2h10a2 2 0 002-2V6h1V4h-5V3H9M7 6h10v13H7V6m2 2v9h2V8H9m4 0v9h2V8h-2z"/></svg>',"delete"),this.uiStyleSettings.clearButtonVisible&&this.addActionButton(Mt,'<svg viewBox="0 0 24 24"><path d="M19.36 2.72l1.42 1.42-5.72 5.71c1.07 1.54 1.22 3.39.32 4.59L9.06 8.12c1.2-.9 3.05-.75 4.59.32l5.71-5.72M5.93 17.57c-2.01-2.01-3.24-4.41-3.58-6.65l4.88-2.09 7.44 7.44-2.09 4.88c-2.24-.34-4.64-1.57-6.65-3.58z"/></svg>',"clear"),this.uiStyleSettings.undoButtonVisible&&this.addActionButton(Mt,'<svg viewBox="0 0 24 24"><path d="M12.5 8c-2.65 0-5.05 1-6.9 2.6L2 7v9h9l-3.62-3.62c1.39-1.16 3.16-1.88 5.12-1.88 3.54 0 6.55 2.31 7.6 5.5l2.37-.78C21.08 11.03 17.15 8 12.5 8z"/></svg>',"undo"),this.uiStyleSettings.redoButtonVisible&&this.addActionButton(Mt,'<svg viewBox="0 0 24 24"><path d="M18.4 10.6C16.55 9 14.15 8 11.5 8c-4.65 0-8.58 3.03-9.96 7.22L3.9 16a8.002 8.002 0 017.6-5.5c1.95 0 3.73.72 5.12 1.88L13 16h9V7l-3.6 3.6z"/></svg>',"redo"),this.uiStyleSettings.zoomButtonVisible&&this.addActionButton(Mt,'<svg viewBox="0 0 24 24"><path d="M15.5 14l5 5-1.5 1.5-5-5v-.79l-.27-.28A6.471 6.471 0 019.5 16 6.5 6.5 0 013 9.5 6.5 6.5 0 019.5 3 6.5 6.5 0 0116 9.5c0 1.61-.59 3.09-1.57 4.23l.28.27h.79m-6 0C12 14 14 12 14 9.5S12 5 9.5 5 5 7 5 9.5 7 14 9.5 14m2.5-4h-2v2H9v-2H7V9h2V7h1v2h2v1z"/></svg>',"zoom"),this.uiStyleSettings.zoomButtonVisible&&this.uiStyleSettings.zoomOutButtonVisible&&this.addActionButton(Mt,'<svg viewBox="0 0 24 24"><path d="M15.5 14h-.79l-.28-.27A6.471 6.471 0 0016 9.5 6.5 6.5 0 009.5 3 6.5 6.5 0 003 9.5 6.5 6.5 0 009.5 16c1.61 0 3.09-.59 4.23-1.57l.27.28v.79l5 5 1.5-1.5-5-5m-6 0C7 14 5 12 5 9.5S7 5 9.5 5 14 7 14 9.5 12 14 9.5 14M7 9h5v1H7V9z"/></svg>',"zoom-out"),this.uiStyleSettings.notesButtonVisible&&this.addActionButton(Mt,'<svg viewBox="0 0 24 24"><path d="M18.13 12l1.26-1.26c.44-.44 1-.68 1.61-.74V9l-6-6H5c-1.11 0-2 .89-2 2v14a2 2 0 002 2h6v-1.87l.13-.13H5V5h7v7h6.13M14 4.5l5.5 5.5H14V4.5m5.13 9.33l2.04 2.04L15.04 22H13v-2.04l6.13-6.13m3.72.36l-.98.98-2.04-2.04.98-.98c.19-.2.52-.2.72 0l1.32 1.32c.2.2.2.53 0 .72z"/></svg>',"notes"),this.markerButtonBlock=document.createElement("div"),this.markerButtonBlock.className=this.toolbarBlockStyleClass.name,this.markerButtonBlock.style.flexGrow="2",this.markerButtonBlock.style.textAlign="center",this.uiContainer.appendChild(this.markerButtonBlock),this.markerButtonOverflowBlock=document.createElement("div"),this.markerButtonOverflowBlock.className=this.toolbarOverflowBlockStyleClass.name+" "+(this.uiStyleSettings.toolbarOverflowBlockStyleColorsClassName?this.uiStyleSettings.toolbarOverflowBlockStyleColorsClassName:this.toolbarOverflowBlockStyleColorsClass.name),this.markerButtonOverflowBlock.style.display="none",this.uiContainer.appendChild(this.markerButtonOverflowBlock),this.markerItems&&(this.markerItems.forEach(function(kt){var Ut=document.createElement("div");Ut.className=""+St.toolbarButtonStyleClass.name,Ut.setAttribute("data-type-name",kt.typeName),Ut.innerHTML=kt.icon,Ut.addEventListener("click",function(){St.markerToolbarButtonClicked(Ut,kt)}),St.buttons.push(Ut),St.markerButtons.push(Ut)}),this.overflowButton=document.createElement("div"),this.overflowButton.className=this.toolbarButtonStyleClass.name+" "+(this.uiStyleSettings.toolbarButtonStyleColorsClassName?this.uiStyleSettings.toolbarButtonStyleColorsClassName:this.toolbarButtonStyleColorsClass.name),this.overflowButton.innerHTML='<svg viewBox="0 0 24 24"><path d="M12 16a2 2 0 012 2 2 2 0 01-2 2 2 2 0 01-2-2 2 2 0 012-2m0-6a2 2 0 012 2 2 2 0 01-2 2 2 2 0 01-2-2 2 2 0 012-2m0-6a2 2 0 012 2 2 2 0 01-2 2 2 2 0 01-2-2 2 2 0 012-2z"/></svg>',this.overflowButton.addEventListener("click",this.overflowButtonClicked),this.markerButtonBlock.appendChild(this.overflowButton));var zt=document.createElement("div");zt.className=this.toolbarBlockStyleClass.name,zt.style.whiteSpace="nowrap",zt.style.display=this.uiStyleSettings.resultButtonBlockVisible!==!1?"":"none",this.uiContainer.appendChild(zt),this.addActionButton(zt,'<svg viewBox="0 0 24 24"><path d="M9 20.42l-6.21-6.21 2.83-2.83L9 14.77l9.88-9.89 2.83 2.83L9 20.42z"/></svg>',"render"),this.addActionButton(zt,'<svg viewBox="0 0 24 24"><path d="M20 6.91L17.09 4 12 9.09 6.91 4 4 6.91 9.09 12 4 17.09 6.91 20 12 14.91 17.09 20 20 17.09 14.91 12 20 6.91z"/></svg>',"close"),this.markerjsContainer.appendChild(this.uiContainer),this.setSelectMode(),this.setCurrentMarker(),this.adjustLayout()},Tt.prototype.addButtonClickListener=function(Et){this.buttonClickListeners.push(Et)},Tt.prototype.removeButtonClickListener=function(Et){this.buttonClickListeners.indexOf(Et)>-1&&this.buttonClickListeners.splice(this.buttonClickListeners.indexOf(Et),1)},Tt.prototype.setSelectMode=function(){this.resetButtonStyles(),this.setActiveButton(this.buttons[0])},Tt.prototype.adjustLayout=function(){if(this.markerButtons&&this.markerButtons.length>0){var Et=Math.floor(this.markerButtonBlock.clientWidth/this.uiStyleSettings.toolbarHeight)-1;this.markerButtonBlock.innerHTML="",this.markerButtonOverflowBlock.innerHTML="";for(var St=0;St<this.markerButtons.length;St++)St<Et||St===Et&&this.markerButtons.length-1===Et?this.markerButtonBlock.appendChild(this.markerButtons[St]):(St===Et&&this.markerButtonBlock.appendChild(this.overflowButton),this.markerButtonOverflowBlock.appendChild(this.markerButtons[St]))}},Tt.prototype.overflowButtonClicked=function(){this.markerButtonOverflowBlock.style.display!=="none"?(this.markerButtonOverflowBlock.className=this.markerButtonOverflowBlock.className.replace(this.styles.fadeInAnimationClassName,""),this.markerButtonOverflowBlock.style.display="none"):(this.markerButtonOverflowBlock.className+=" "+this.styles.fadeInAnimationClassName,this.markerButtonOverflowBlock.style.top=this.uiContainer.offsetTop+this.overflowButton.offsetHeight+"px",this.markerButtonOverflowBlock.style.right=this.uiContainer.offsetWidth-this.overflowButton.offsetLeft-this.overflowButton.offsetWidth+2*this.uiContainer.offsetLeft+"px",this.markerButtonOverflowBlock.style.display="inline-block")},Tt.prototype.resetButtonStyles=function(){var Et=this;this.buttons.forEach(function(St){St.className=St.className.replace(Et.uiStyleSettings.toolbarButtonStyleColorsClassName?Et.uiStyleSettings.toolbarButtonStyleColorsClassName:Et.toolbarButtonStyleColorsClass.name,"").trim(),St.className=St.className.replace(Et.uiStyleSettings.toolbarActiveButtonStyleColorsClassName?Et.uiStyleSettings.toolbarActiveButtonStyleColorsClassName:Et.toolbarActiveButtonStyleColorsClass.name,"").trim(),St.className+=" "+(Et.uiStyleSettings.toolbarButtonStyleColorsClassName?Et.uiStyleSettings.toolbarButtonStyleColorsClassName:Et.toolbarButtonStyleColorsClass.name)})},Tt.prototype.addActionButton=function(Et,St,Mt){var zt=this,kt=document.createElement("div");switch(kt.className=""+this.toolbarButtonStyleClass.name,kt.innerHTML=St,kt.setAttribute("data-action",Mt),kt.addEventListener("click",function(){zt.actionToolbarButtonClicked(kt,Mt)}),Mt){case"select":kt.style.fill=this.uiStyleSettings.selectButtonColor;break;case"delete":case"clear":kt.style.fill=this.uiStyleSettings.deleteButtonColor;break;case"undo":case"redo":kt.style.fill=this.uiStyleSettings.selectButtonColor;break;case"render":kt.style.fill=this.uiStyleSettings.okButtonColor;break;case"close":kt.style.fill=this.uiStyleSettings.closeButtonColor}Et.appendChild(kt),this.buttons.push(kt)},Tt.prototype.addStyles=function(){this.toolbarStyleClass=this.styles.addClass(new Qt("toolbar",`
|
|
width: 100%;
|
|
flex-shrink: 0;
|
|
display: flex;
|
|
flex-direction: row;
|
|
justify-content: space-between;
|
|
height: `+this.uiStyleSettings.toolbarHeight+`px;
|
|
box-sizing: content-box;
|
|
`+(this.displayMode==="inline"?"border-top-left-radius: "+Math.round(this.uiStyleSettings.toolbarHeight/10)+"px;":"")+`
|
|
`+(this.displayMode==="inline"?"border-top-right-radius: "+Math.round(this.uiStyleSettings.toolbarHeight/10)+"px;":"")+`
|
|
overflow: hidden;
|
|
`)),this.toolbarStyleColorsClass=this.styles.addClass(new Qt("toolbar_colors",`
|
|
background-color: `+this.uiStyleSettings.toolbarBackgroundColor+`;
|
|
box-shadow: 0px 3px rgba(33, 33, 33, 0.1);
|
|
`)),this.toolbarBlockStyleClass=this.styles.addClass(new Qt("toolbar-block",`
|
|
display: inline-block;
|
|
box-sizing: content-box;
|
|
`)),this.toolbarOverflowBlockStyleClass=this.styles.addClass(new Qt("toolbar-overflow-block",`
|
|
position: absolute;
|
|
top: `+this.uiStyleSettings.toolbarHeight+`px;
|
|
max-width: `+2*this.uiStyleSettings.toolbarHeight+`px;
|
|
z-index: 10;
|
|
box-sizing: content-box;
|
|
`)),this.toolbarOverflowBlockStyleColorsClass=this.styles.addClass(new Qt("toolbar-overflow-block_colors",`
|
|
background-color: `+this.uiStyleSettings.toolbarBackgroundColor+`;
|
|
`));var Et=this.uiStyleSettings.toolbarHeight/4;this.toolbarButtonStyleClass=this.styles.addClass(new Qt("toolbar_button",`
|
|
display: inline-block;
|
|
width: `+(this.uiStyleSettings.toolbarHeight-2*Et)+`px;
|
|
height: `+(this.uiStyleSettings.toolbarHeight-2*Et)+`px;
|
|
padding: `+Et+`px;
|
|
box-sizing: content-box;
|
|
`)),this.toolbarButtonStyleColorsClass=this.styles.addClass(new Qt("toolbar_button_colors",`
|
|
fill: `+this.uiStyleSettings.toolbarColor+`;
|
|
`)),this.toolbarActiveButtonStyleColorsClass=this.styles.addClass(new Qt("toolbar_active_button",`
|
|
fill: `+this.uiStyleSettings.toolbarColor+`;
|
|
background-color: `+this.uiStyleSettings.toolbarBackgroundHoverColor+`
|
|
`)),this.styles.addRule(new Qe("."+this.toolbarButtonStyleClass.name+" svg",`
|
|
height: `+this.uiStyleSettings.toolbarHeight/2+`px;
|
|
`)),this.styles.addRule(new Qe("."+this.toolbarButtonStyleColorsClass.name+":hover",`
|
|
background-color: `+this.uiStyleSettings.toolbarBackgroundHoverColor+`
|
|
`))},Tt.prototype.markerToolbarButtonClicked=function(Et,St){this.setActiveButton(Et),this.buttonClickListeners&&this.buttonClickListeners.length>0&&this.buttonClickListeners.forEach(function(Mt){return Mt("marker",St)}),this.markerButtonOverflowBlock.style.display="none"},Tt.prototype.actionToolbarButtonClicked=function(Et,St){this.buttonClickListeners&&this.buttonClickListeners.length>0&&this.buttonClickListeners.forEach(function(Mt){return Mt("action",St)}),this.markerButtonOverflowBlock.style.display="none",this.setActiveButton(this.buttons[0])},Tt.prototype.setActiveButton=function(Et){this.resetButtonStyles(),Et.className=Et.className.replace(this.uiStyleSettings.toolbarButtonStyleColorsClassName?this.uiStyleSettings.toolbarButtonStyleColorsClassName:this.toolbarButtonStyleColorsClass.name,"").trim(),Et.className+=" "+(this.uiStyleSettings.toolbarActiveButtonStyleColorsClassName?this.uiStyleSettings.toolbarActiveButtonStyleColorsClassName:this.toolbarActiveButtonStyleColorsClass.name)},Tt.prototype.setActiveMarkerButton=function(Et){var St=this.markerButtons.find(function(Mt){return Mt.getAttribute("data-type-name")===Et});St&&this.setActiveButton(St)},Tt.prototype.setCurrentMarker=function(Et){var St=this;this.currentMarker=Et,this.buttons.filter(function(Mt){return/delete|notes/.test(Mt.getAttribute("data-action"))}).forEach(function(Mt){St.currentMarker===void 0?(Mt.style.fillOpacity="0.4",Mt.style.pointerEvents="none"):(Mt.style.fillOpacity="1",Mt.style.pointerEvents="all")})},Tt}(),Nt=function(){function Tt(Et,St,Mt,zt){this.panels=[],this.panelButtons=[],this.markerjsContainer=Et,this.displayMode=St,this.uiStyleSettings=Mt,this.styles=zt,this.panelButtonClick=this.panelButtonClick.bind(this),this.addStyles()}return Tt.prototype.addStyles=function(){var Et;this.toolboxStyleClass=this.styles.addClass(new Qt("toolbox",`
|
|
width: 100%;
|
|
flex-shrink: 0;
|
|
display: flex;
|
|
flex-direction: column;
|
|
font-family: sans-serif;
|
|
`+(this.displayMode==="popup"?"height:"+2.5*this.uiStyleSettings.toolbarHeight+"px;":"")+`
|
|
box-sizing: content-box;
|
|
`+(this.displayMode==="popup"?"background-color: "+this.uiStyleSettings.canvasBackgroundColor+";":"")+`
|
|
`+(this.displayMode==="inline"?"border-bottom-left-radius: "+Math.round(this.uiStyleSettings.toolbarHeight/10)+"px;":"")+`
|
|
`+(this.displayMode==="inline"?"border-bottom-right-radius: "+Math.round(this.uiStyleSettings.toolbarHeight/10)+"px;":"")+`
|
|
overflow: hidden;
|
|
`)),this.toolboxStyleColorsClass=this.styles.addClass(new Qt("toolbox_colors",`
|
|
color: `+this.uiStyleSettings.toolboxColor+`;
|
|
`));var St=this.uiStyleSettings.toolbarHeight/4;this.toolboxButtonRowStyleClass=this.styles.addClass(new Qt("toolbox-button-row",`
|
|
display: flex;
|
|
cursor: default;
|
|
box-sizing: content-box;
|
|
`)),this.toolboxButtonRowStyleColorsClass=this.styles.addClass(new Qt("toolbox-button-row_colors",`
|
|
background-color: `+this.uiStyleSettings.toolbarBackgroundColor+`;
|
|
`)),this.toolboxPanelRowStyleClass=this.styles.addClass(new Qt("toolbox-panel-row",`
|
|
display: flex;
|
|
`+(this.displayMode==="inline"?"position: absolute;":"")+`
|
|
`+(this.displayMode==="inline"?"bottom: "+this.uiStyleSettings.toolbarHeight+"px;":"")+`
|
|
cursor: default;
|
|
height: `+1.5*this.uiStyleSettings.toolbarHeight+`px;
|
|
`+(this.displayMode==="inline"?"width: 100%;":"")+`
|
|
box-sizing: content-box;
|
|
`)),this.toolboxPanelRowStyleColorsClass=this.styles.addClass(new Qt("toolbox-panel-row_colors",`
|
|
background-color: `+((Et=this.uiStyleSettings.toolboxBackgroundColor)!==null&&Et!==void 0?Et:this.uiStyleSettings.toolbarBackgroundHoverColor)+`;
|
|
`)),this.toolboxButtonStyleClass=this.styles.addClass(new Qt("toolbox_button",`
|
|
display: inline-block;
|
|
width: `+(this.uiStyleSettings.toolbarHeight-2*St)+`px;
|
|
height: `+(this.uiStyleSettings.toolbarHeight-2*St)+`px;
|
|
padding: `+St+`px;
|
|
box-sizing: content-box;
|
|
`)),this.toolboxButtonStyleColorsClass=this.styles.addClass(new Qt("toolbox-button_colors",`
|
|
fill: `+this.uiStyleSettings.toolbarColor+`;
|
|
`)),this.toolboxActiveButtonStyleColorsClass=this.styles.addClass(new Qt("toolbox-active-button_colors",`
|
|
background-color: `+this.uiStyleSettings.toolbarBackgroundHoverColor+`;
|
|
fill: `+this.uiStyleSettings.toolbarColor+`;
|
|
`)),this.styles.addRule(new Qe("."+this.toolboxButtonStyleColorsClass.name+":hover",`
|
|
background-color: `+this.uiStyleSettings.toolbarBackgroundHoverColor+`
|
|
`)),this.styles.addRule(new Qe("."+this.toolboxButtonStyleClass.name+" svg",`
|
|
height: `+this.uiStyleSettings.toolbarHeight/2+`px;
|
|
`))},Tt.prototype.show=function(Et){var St;this.uiContainer=document.createElement("div"),this.uiContainer.style.visibility=Et,this.uiContainer.className=this.toolboxStyleClass.name+" "+((St=this.uiStyleSettings.toolboxStyleColorsClassName)!==null&&St!==void 0?St:this.toolboxStyleColorsClass.name),this.markerjsContainer.appendChild(this.uiContainer)},Tt.prototype.setPanelButtons=function(Et){var St,Mt,zt=this;this.panels=Et,this.uiContainer!==void 0&&(this.uiContainer.innerHTML="",this.panelRow=document.createElement("div"),this.panelRow.className=this.toolboxPanelRowStyleClass.name+" "+((St=this.uiStyleSettings.toolboxPanelRowStyleColorsClassName)!==null&&St!==void 0?St:this.toolboxPanelRowStyleColorsClass.name),this.uiContainer.appendChild(this.panelRow),this.buttonRow=document.createElement("div"),this.buttonRow.className=this.toolboxButtonRowStyleClass.name+" "+((Mt=this.uiStyleSettings.toolboxButtonRowStyleColorsClassName)!==null&&Mt!==void 0?Mt:this.toolboxButtonRowStyleColorsClass.name)+" ",this.uiContainer.appendChild(this.buttonRow),this.panelButtons.splice(0),this.panels.forEach(function(kt){var Ut;kt.uiStyleSettings=zt.uiStyleSettings;var Oe=document.createElement("div");Oe.className=zt.toolboxButtonStyleClass.name+" "+((Ut=zt.uiStyleSettings.toolboxButtonStyleColorsClassName)!==null&&Ut!==void 0?Ut:zt.toolboxButtonStyleColorsClass.name),Oe.innerHTML=kt.icon,Oe.title=kt.title,Oe.addEventListener("click",function(){zt.panelButtonClick(kt)}),zt.panelButtons.push(Oe),zt.buttonRow.appendChild(Oe)}),this.displayMode==="inline"?this.panelRow.style.display="none":this.panelRow.style.visibility="hidden")},Tt.prototype.panelButtonClick=function(Et){var St=this,Mt=-1;if(Et!==this.activePanel){Mt=this.panels.indexOf(Et),this.panelRow.innerHTML="";var zt=Et.getUi();zt.style.margin=this.uiStyleSettings.toolbarHeight/4+"px",this.panelRow.appendChild(zt),this.panelRow.style.display="flex",this.panelRow.style.visibility="visible",this.panelRow.className=this.panelRow.className.replace(this.styles.fadeOutAnimationClassName,""),this.panelRow.className+=" "+this.styles.fadeInAnimationClassName,this.activePanel=Et}else this.activePanel=void 0,this.panelRow.className=this.panelRow.className.replace(this.styles.fadeInAnimationClassName,""),this.panelRow.className+=" "+this.styles.fadeOutAnimationClassName,setTimeout(function(){St.displayMode==="inline"?St.panelRow.style.display="none":St.panelRow.style.visibility="hidden"},200);this.panelButtons.forEach(function(kt,Ut){var Oe,Te;kt.className=St.toolboxButtonStyleClass.name+" "+(Ut===Mt?""+((Oe=St.uiStyleSettings.toolboxActiveButtonStyleColorsClassName)!==null&&Oe!==void 0?Oe:St.toolboxActiveButtonStyleColorsClass.name):""+((Te=St.uiStyleSettings.toolboxButtonStyleColorsClassName)!==null&&Te!==void 0?Te:St.toolboxButtonStyleColorsClass.name))})},Tt}(),nt=function(Tt,Et){this.title=Tt,this.icon=Et},et=function(Tt){function Et(St,Mt,zt,kt){var Ut=Tt.call(this,St,kt||'<svg viewBox="0 0 24 24"><path d="M17.5 12a1.5 1.5 0 01-1.5-1.5A1.5 1.5 0 0117.5 9a1.5 1.5 0 011.5 1.5 1.5 1.5 0 01-1.5 1.5m-3-4A1.5 1.5 0 0113 6.5 1.5 1.5 0 0114.5 5 1.5 1.5 0 0116 6.5 1.5 1.5 0 0114.5 8m-5 0A1.5 1.5 0 018 6.5 1.5 1.5 0 019.5 5 1.5 1.5 0 0111 6.5 1.5 1.5 0 019.5 8m-3 4A1.5 1.5 0 015 10.5 1.5 1.5 0 016.5 9 1.5 1.5 0 018 10.5 1.5 1.5 0 016.5 12M12 3a9 9 0 00-9 9 9 9 0 009 9 1.5 1.5 0 001.5-1.5c0-.39-.15-.74-.39-1-.23-.27-.38-.62-.38-1a1.5 1.5 0 011.5-1.5H16a5 5 0 005-5c0-4.42-4.03-8-9-8z"/></svg>')||this;return Ut.colors=[],Ut.addTransparent=!1,Ut.colorBoxes=[],Ut.colors=Mt,Ut.currentColor=zt,Ut.setCurrentColor=Ut.setCurrentColor.bind(Ut),Ut.getColorBox=Ut.getColorBox.bind(Ut),Ut}return se(Et,Tt),Et.prototype.getUi=function(){var St=this,Mt=document.createElement("div");return Mt.style.overflow="hidden",Mt.style.whiteSpace="nowrap",this.colors.forEach(function(zt){var kt=St.getColorBox(zt);Mt.appendChild(kt),St.colorBoxes.push(kt)}),Mt},Et.prototype.getColorBox=function(St){var Mt=this,zt=this.uiStyleSettings.toolbarHeight/4,kt=this.uiStyleSettings.toolbarHeight-zt,Ut=document.createElement("div");Ut.style.display="inline-block",Ut.style.boxSizing="content-box",Ut.style.width=kt-2+"px",Ut.style.height=kt-2+"px",Ut.style.padding="1px",Ut.style.marginRight="2px",Ut.style.marginBottom="2px",Ut.style.borderWidth="2px",Ut.style.borderStyle="solid",Ut.style.borderRadius=(kt+2)/2+"px",Ut.style.borderColor=St===this.currentColor?this.uiStyleSettings.toolboxAccentColor:"transparent",Ut.addEventListener("click",function(){Mt.setCurrentColor(St,Ut)});var Oe=document.createElement("div");return Oe.style.display="inline-block",Oe.style.width=kt-2+"px",Oe.style.height=kt-2+"px",Oe.style.backgroundColor=St,Oe.style.borderRadius=kt/2+"px",St==="transparent"&&(Oe.style.fill=this.uiStyleSettings.toolboxAccentColor,Oe.innerHTML=`<svg viewBox="0 0 24 24">
|
|
<path d="M2,5.27L3.28,4L20,20.72L18.73,22L15.65,18.92C14.5,19.3 13.28,19.5 12,19.5C7,19.5 2.73,16.39 1,12C1.69,10.24 2.79,8.69 4.19,7.46L2,5.27M12,9A3,3 0 0,1 15,12C15,12.35 14.94,12.69 14.83,13L11,9.17C11.31,9.06 11.65,9 12,9M12,4.5C17,4.5 21.27,7.61 23,12C22.18,14.08 20.79,15.88 19,17.19L17.58,15.76C18.94,14.82 20.06,13.54 20.82,12C19.17,8.64 15.76,6.5 12,6.5C10.91,6.5 9.84,6.68 8.84,7L7.3,5.47C8.74,4.85 10.33,4.5 12,4.5M3.18,12C4.83,15.36 8.24,17.5 12,17.5C12.69,17.5 13.37,17.43 14,17.29L11.72,15C10.29,14.85 9.15,13.71 9,12.28L5.6,8.87C4.61,9.72 3.78,10.78 3.18,12Z" />
|
|
</svg>`),Ut.appendChild(Oe),Ut},Et.prototype.setCurrentColor=function(St,Mt){var zt=this;this.currentColor=St,this.colorBoxes.forEach(function(kt){kt.style.borderColor=kt===Mt?zt.uiStyleSettings.toolboxAccentColor:"transparent"}),this.onColorChanged&&this.onColorChanged(St)},Et}(nt),ct=function(){function Tt(Et,St,Mt){this._state="new",this._isSelected=!1,this._container=Et,this._overlayContainer=St,this.globalSettings=Mt,this.stateChanged=this.stateChanged.bind(this),this.colorChanged=this.colorChanged.bind(this),this.fillColorChanged=this.fillColorChanged.bind(this)}return Object.defineProperty(Tt.prototype,"typeName",{get:function(){return Object.getPrototypeOf(this).constructor.typeName},enumerable:!1,configurable:!0}),Object.defineProperty(Tt.prototype,"container",{get:function(){return this._container},enumerable:!1,configurable:!0}),Object.defineProperty(Tt.prototype,"overlayContainer",{get:function(){return this._overlayContainer},enumerable:!1,configurable:!0}),Object.defineProperty(Tt.prototype,"state",{get:function(){return this._state},enumerable:!1,configurable:!0}),Object.defineProperty(Tt.prototype,"toolboxPanels",{get:function(){return[]},enumerable:!1,configurable:!0}),Tt.prototype.ownsTarget=function(Et){return!1},Object.defineProperty(Tt.prototype,"isSelected",{get:function(){return this._isSelected},enumerable:!1,configurable:!0}),Tt.prototype.select=function(){this.container.style.cursor="move",this._isSelected=!0,this.manipulationStartState=this.getState()},Tt.prototype.deselect=function(){this.container.style.cursor="default",this._isSelected=!1,this.stateChanged()},Tt.prototype.pointerDown=function(Et,St){},Tt.prototype.dblClick=function(Et,St){},Tt.prototype.manipulate=function(Et){},Tt.prototype.pointerUp=function(Et){this.stateChanged()},Tt.prototype.dispose=function(){},Tt.prototype.addMarkerVisualToContainer=function(Et){this.container.childNodes.length>0?this.container.insertBefore(Et,this.container.childNodes[0]):this.container.appendChild(Et)},Tt.prototype.getState=function(){return{typeName:Tt.typeName,state:this.state,notes:this.notes}},Tt.prototype.restoreState=function(Et){this._state=Et.state,this.notes=Et.notes},Tt.prototype.scale=function(Et,St){},Tt.prototype.colorChanged=function(Et){this.onColorChanged&&this.onColorChanged(Et),this.stateChanged()},Tt.prototype.fillColorChanged=function(Et){this.onFillColorChanged&&this.onFillColorChanged(Et),this.stateChanged()},Tt.prototype.stateChanged=function(){if(this.onStateChanged&&this.state!=="creating"&&this.state!=="new"){var Et=this.getState();this.manipulationStartState!==void 0&&(this.manipulationStartState.state="select"),Et.state="select",JSON.stringify(this.manipulationStartState)!=JSON.stringify(Et)&&this.onStateChanged(this)}},Tt.typeName="MarkerBase",Tt}(),lt=function(){function Tt(){this.findGripByVisual=this.findGripByVisual.bind(this)}return Tt.prototype.findGripByVisual=function(Et){return this.topLeft.ownsTarget(Et)?this.topLeft:this.topCenter.ownsTarget(Et)?this.topCenter:this.topRight.ownsTarget(Et)?this.topRight:this.centerLeft.ownsTarget(Et)?this.centerLeft:this.centerRight.ownsTarget(Et)?this.centerRight:this.bottomLeft.ownsTarget(Et)?this.bottomLeft:this.bottomCenter.ownsTarget(Et)?this.bottomCenter:this.bottomRight.ownsTarget(Et)?this.bottomRight:void 0},Tt}(),pt=function(){function Tt(){this.GRIP_SIZE=10,this.visual=Rt.createGroup(),this.visual.appendChild(Rt.createCircle(1.5*this.GRIP_SIZE,[["fill","transparent"]])),this.visual.appendChild(Rt.createCircle(this.GRIP_SIZE,[["fill","#cccccc"],["fill-opacity","0.7"],["stroke","#333333"],["stroke-width","2"],["stroke-opacity","0.7"]]))}return Tt.prototype.ownsTarget=function(Et){return Et===this.visual||Et===this.visual.childNodes[0]||Et===this.visual.childNodes[1]},Tt}(),vt=function(){function Tt(){}return Tt.toITransformMatrix=function(Et){return{a:Et.a,b:Et.b,c:Et.c,d:Et.d,e:Et.e,f:Et.f}},Tt.toSVGMatrix=function(Et,St){return Et.a=St.a,Et.b=St.b,Et.c=St.c,Et.d=St.d,Et.e=St.e,Et.f=St.f,Et},Tt}(),xt=function(Tt){function Et(St,Mt,zt){var kt=Tt.call(this,St,Mt,zt)||this;return kt.left=0,kt.top=0,kt.width=0,kt.height=0,kt.defaultSize={x:50,y:20},kt.offsetX=0,kt.offsetY=0,kt.rotationAngle=0,kt.CB_DISTANCE=10,kt._suppressMarkerCreateEvent=!1,kt.container.transform.baseVal.appendItem(Rt.createTransform()),kt.setupControlBox(),kt}return se(Et,Tt),Object.defineProperty(Et.prototype,"centerX",{get:function(){return this.left+this.width/2},enumerable:!1,configurable:!0}),Object.defineProperty(Et.prototype,"centerY",{get:function(){return this.top+this.height/2},enumerable:!1,configurable:!0}),Object.defineProperty(Et.prototype,"visual",{get:function(){return this._visual},set:function(St){this._visual=St;var Mt=Rt.createTransform();this._visual.transform.baseVal.appendItem(Mt)},enumerable:!1,configurable:!0}),Et.prototype.ownsTarget=function(St){return!!Tt.prototype.ownsTarget.call(this,St)||!!(this.controlGrips.findGripByVisual(St)!==void 0||this.rotatorGrip!==void 0&&this.rotatorGrip.ownsTarget(St))},Et.prototype.pointerDown=function(St,Mt){Tt.prototype.pointerDown.call(this,St,Mt),this.state==="new"&&(this.left=St.x,this.top=St.y),this.manipulationStartLeft=this.left,this.manipulationStartTop=this.top,this.manipulationStartWidth=this.width,this.manipulationStartHeight=this.height;var zt=this.unrotatePoint(St);if(this.manipulationStartX=zt.x,this.manipulationStartY=zt.y,this.offsetX=zt.x-this.left,this.offsetY=zt.y-this.top,this.state!=="new")if(this.select(),this.activeGrip=this.controlGrips.findGripByVisual(Mt),this.activeGrip!==void 0)this._state="resize";else if(this.rotatorGrip!==void 0&&this.rotatorGrip.ownsTarget(Mt)){this.activeGrip=this.rotatorGrip;var kt=this.rotatePoint({x:this.centerX,y:this.centerY});this.left=kt.x-this.width/2,this.top=kt.y-this.height/2,this.moveVisual({x:this.left,y:this.top});var Ut=this.container.transform.baseVal.getItem(0);Ut.setRotate(this.rotationAngle,this.centerX,this.centerY),this.container.transform.baseVal.replaceItem(Ut,0),this.adjustControlBox(),this._state="rotate"}else this._state="move"},Et.prototype.pointerUp=function(St){var Mt=this.state;Tt.prototype.pointerUp.call(this,St),this.state==="creating"&&this.width<10&&this.height<10?(this.width=this.defaultSize.x,this.height=this.defaultSize.y):this.manipulate(St),this._state="select",Mt==="creating"&&this.onMarkerCreated&&this._suppressMarkerCreateEvent===!1&&this.onMarkerCreated(this)},Et.prototype.moveVisual=function(St){this.visual.style.transform="translate("+St.x+"px, "+St.y+"px)"},Et.prototype.manipulate=function(St){var Mt=this.unrotatePoint(St);this.state==="creating"?this.resize(St):this.state==="move"?(this.left=this.manipulationStartLeft+(Mt.x-this.manipulationStartLeft)-this.offsetX,this.top=this.manipulationStartTop+(Mt.y-this.manipulationStartTop)-this.offsetY,this.moveVisual({x:this.left,y:this.top}),this.adjustControlBox()):this.state==="resize"?this.resize(Mt):this.state==="rotate"&&this.rotate(St)},Et.prototype.resize=function(St){var Mt=this.manipulationStartLeft,zt=this.manipulationStartWidth,kt=this.manipulationStartTop,Ut=this.manipulationStartHeight;switch(this.activeGrip){case this.controlGrips.bottomLeft:case this.controlGrips.centerLeft:case this.controlGrips.topLeft:Mt=this.manipulationStartLeft+St.x-this.manipulationStartX,zt=this.manipulationStartWidth+this.manipulationStartLeft-Mt;break;case this.controlGrips.bottomRight:case this.controlGrips.centerRight:case this.controlGrips.topRight:case void 0:zt=this.manipulationStartWidth+St.x-this.manipulationStartX}switch(this.activeGrip){case this.controlGrips.topCenter:case this.controlGrips.topLeft:case this.controlGrips.topRight:kt=this.manipulationStartTop+St.y-this.manipulationStartY,Ut=this.manipulationStartHeight+this.manipulationStartTop-kt;break;case this.controlGrips.bottomCenter:case this.controlGrips.bottomLeft:case this.controlGrips.bottomRight:case void 0:Ut=this.manipulationStartHeight+St.y-this.manipulationStartY}zt>=0?(this.left=Mt,this.width=zt):(this.left=Mt+zt,this.width=-zt),Ut>=0?(this.top=kt,this.height=Ut):(this.top=kt+Ut,this.height=-Ut),this.setSize()},Et.prototype.setSize=function(){this.moveVisual({x:this.left,y:this.top}),this.adjustControlBox()},Et.prototype.rotate=function(St){if(Math.abs(St.x-this.centerX)>.1){var Mt=Math.sign(St.x-this.centerX);this.rotationAngle=180*Math.atan((St.y-this.centerY)/(St.x-this.centerX))/Math.PI+90*Mt,this.applyRotation()}},Et.prototype.applyRotation=function(){var St=this.container.transform.baseVal.getItem(0);St.setRotate(this.rotationAngle,this.centerX,this.centerY),this.container.transform.baseVal.replaceItem(St,0)},Et.prototype.rotatePoint=function(St){if(this.rotationAngle===0)return St;var Mt=this.container.getCTM(),zt=Rt.createPoint(St.x,St.y);return{x:(zt=zt.matrixTransform(Mt)).x,y:zt.y}},Et.prototype.unrotatePoint=function(St){if(this.rotationAngle===0)return St;var Mt=this.container.getCTM();Mt=Mt.inverse();var zt=Rt.createPoint(St.x,St.y);return{x:(zt=zt.matrixTransform(Mt)).x,y:zt.y}},Et.prototype.select=function(){Tt.prototype.select.call(this),this.adjustControlBox(),this.controlBox.style.display=""},Et.prototype.deselect=function(){Tt.prototype.deselect.call(this),this.controlBox.style.display="none"},Et.prototype.setupControlBox=function(){this.controlBox=Rt.createGroup();var St=Rt.createTransform();St.setTranslate(-this.CB_DISTANCE/2,-this.CB_DISTANCE/2),this.controlBox.transform.baseVal.appendItem(St),this.container.appendChild(this.controlBox),this.controlRect=Rt.createRect(this.width+this.CB_DISTANCE,this.height+this.CB_DISTANCE,[["stroke","black"],["stroke-width","1"],["stroke-opacity","0.5"],["stroke-dasharray","3, 2"],["fill","transparent"],["pointer-events","none"]]),this.controlBox.appendChild(this.controlRect),this.globalSettings.disableRotation!==!0&&(this.rotatorGripLine=Rt.createLine((this.width+2*this.CB_DISTANCE)/2,this.top-this.CB_DISTANCE,(this.width+2*this.CB_DISTANCE)/2,this.top-3*this.CB_DISTANCE,[["stroke","black"],["stroke-width","1"],["stroke-opacity","0.5"],["stroke-dasharray","3, 2"]]),this.controlBox.appendChild(this.rotatorGripLine)),this.controlGrips=new lt,this.addControlGrips(),this.controlBox.style.display="none"},Et.prototype.adjustControlBox=function(){var St=this.controlBox.transform.baseVal.getItem(0);St.setTranslate(this.left-this.CB_DISTANCE/2,this.top-this.CB_DISTANCE/2),this.controlBox.transform.baseVal.replaceItem(St,0),this.controlRect.setAttribute("width",(this.width+this.CB_DISTANCE).toString()),this.controlRect.setAttribute("height",(this.height+this.CB_DISTANCE).toString()),this.rotatorGripLine!==void 0&&(this.rotatorGripLine.setAttribute("x1",((this.width+this.CB_DISTANCE)/2).toString()),this.rotatorGripLine.setAttribute("y1",(-this.CB_DISTANCE/2).toString()),this.rotatorGripLine.setAttribute("x2",((this.width+this.CB_DISTANCE)/2).toString()),this.rotatorGripLine.setAttribute("y2",(3*-this.CB_DISTANCE).toString())),this.positionGrips()},Et.prototype.addControlGrips=function(){this.controlGrips.topLeft=this.createGrip(),this.controlGrips.topCenter=this.createGrip(),this.controlGrips.topRight=this.createGrip(),this.controlGrips.centerLeft=this.createGrip(),this.controlGrips.centerRight=this.createGrip(),this.controlGrips.bottomLeft=this.createGrip(),this.controlGrips.bottomCenter=this.createGrip(),this.controlGrips.bottomRight=this.createGrip(),this.globalSettings.disableRotation!==!0&&(this.rotatorGrip=this.createGrip()),this.positionGrips()},Et.prototype.createGrip=function(){var St=new pt;return St.visual.transform.baseVal.appendItem(Rt.createTransform()),this.controlBox.appendChild(St.visual),St},Et.prototype.positionGrips=function(){var St=this.controlGrips.topLeft.GRIP_SIZE,Mt=-St/2,zt=Mt,kt=(this.width+this.CB_DISTANCE)/2-St/2,Ut=(this.height+this.CB_DISTANCE)/2-St/2,Oe=this.height+this.CB_DISTANCE-St/2,Te=this.width+this.CB_DISTANCE-St/2;this.positionGrip(this.controlGrips.topLeft.visual,Mt,zt),this.positionGrip(this.controlGrips.topCenter.visual,kt,zt),this.positionGrip(this.controlGrips.topRight.visual,Te,zt),this.positionGrip(this.controlGrips.centerLeft.visual,Mt,Ut),this.positionGrip(this.controlGrips.centerRight.visual,Te,Ut),this.positionGrip(this.controlGrips.bottomLeft.visual,Mt,Oe),this.positionGrip(this.controlGrips.bottomCenter.visual,kt,Oe),this.positionGrip(this.controlGrips.bottomRight.visual,Te,Oe),this.rotatorGrip!==void 0&&this.positionGrip(this.rotatorGrip.visual,kt,zt-3*this.CB_DISTANCE)},Et.prototype.positionGrip=function(St,Mt,zt){var kt=St.transform.baseVal.getItem(0);kt.setTranslate(Mt,zt),St.transform.baseVal.replaceItem(kt,0)},Et.prototype.hideControlBox=function(){this.controlBox.style.display="none"},Et.prototype.showControlBox=function(){this.controlBox.style.display=""},Et.prototype.getState=function(){return Object.assign({left:this.left,top:this.top,width:this.width,height:this.height,rotationAngle:this.rotationAngle,visualTransformMatrix:vt.toITransformMatrix(this.visual.transform.baseVal.getItem(0).matrix),containerTransformMatrix:vt.toITransformMatrix(this.container.transform.baseVal.getItem(0).matrix)},Tt.prototype.getState.call(this))},Et.prototype.restoreState=function(St){Tt.prototype.restoreState.call(this,St);var Mt=St;this.left=Mt.left,this.top=Mt.top,this.width=Mt.width,this.height=Mt.height,this.rotationAngle=Mt.rotationAngle,this.visual.transform.baseVal.getItem(0).setMatrix(vt.toSVGMatrix(this.visual.transform.baseVal.getItem(0).matrix,Mt.visualTransformMatrix)),this.container.transform.baseVal.getItem(0).setMatrix(vt.toSVGMatrix(this.container.transform.baseVal.getItem(0).matrix,Mt.containerTransformMatrix))},Et.prototype.scale=function(St,Mt){Tt.prototype.scale.call(this,St,Mt);var zt=this.rotatePoint({x:this.left,y:this.top}),kt=this.unrotatePoint({x:zt.x*St,y:zt.y*Mt});this.left=kt.x,this.top=kt.y,this.width=this.width*St,this.height=this.height*Mt,this.adjustControlBox()},Et}(ct),Lt=function(Tt){function Et(St,Mt,zt){var kt=Tt.call(this,St,Mt,zt)||this;return kt.fillColor="transparent",kt.strokeColor="transparent",kt.strokeWidth=0,kt.strokeDasharray="",kt.opacity=1,kt.setStrokeColor=kt.setStrokeColor.bind(kt),kt.setFillColor=kt.setFillColor.bind(kt),kt.setStrokeWidth=kt.setStrokeWidth.bind(kt),kt.setStrokeDasharray=kt.setStrokeDasharray.bind(kt),kt.createVisual=kt.createVisual.bind(kt),kt}return se(Et,Tt),Et.prototype.ownsTarget=function(St){return!(!Tt.prototype.ownsTarget.call(this,St)&&St!==this.visual)},Et.prototype.createVisual=function(){this.visual=Rt.createRect(1,1,[["fill",this.fillColor],["stroke",this.strokeColor],["stroke-width",this.strokeWidth.toString()],["stroke-dasharray",this.strokeDasharray],["opacity",this.opacity.toString()]]),this.addMarkerVisualToContainer(this.visual)},Et.prototype.pointerDown=function(St,Mt){Tt.prototype.pointerDown.call(this,St,Mt),this.state==="new"&&(this.createVisual(),this.moveVisual(St),this._state="creating")},Et.prototype.manipulate=function(St){Tt.prototype.manipulate.call(this,St)},Et.prototype.resize=function(St){Tt.prototype.resize.call(this,St),this.setSize()},Et.prototype.setSize=function(){Tt.prototype.setSize.call(this),Rt.setAttributes(this.visual,[["width",this.width.toString()],["height",this.height.toString()]])},Et.prototype.pointerUp=function(St){Tt.prototype.pointerUp.call(this,St),this.setSize()},Et.prototype.setStrokeColor=function(St){this.strokeColor=St,this.visual&&Rt.setAttributes(this.visual,[["stroke",this.strokeColor]]),this.colorChanged(St),this.stateChanged()},Et.prototype.setFillColor=function(St){this.fillColor=St,this.visual&&Rt.setAttributes(this.visual,[["fill",this.fillColor]]),this.stateChanged()},Et.prototype.setStrokeWidth=function(St){this.strokeWidth=St,this.visual&&Rt.setAttributes(this.visual,[["stroke-width",this.strokeWidth.toString()]]),this.stateChanged()},Et.prototype.setStrokeDasharray=function(St){this.strokeDasharray=St,this.visual&&Rt.setAttributes(this.visual,[["stroke-dasharray",this.strokeDasharray]]),this.stateChanged()},Et.prototype.getState=function(){return Object.assign({fillColor:this.fillColor,strokeColor:this.strokeColor,strokeWidth:this.strokeWidth,strokeDasharray:this.strokeDasharray,opacity:this.opacity},Tt.prototype.getState.call(this))},Et.prototype.restoreState=function(St){var Mt=St;this.fillColor=Mt.fillColor,this.strokeColor=Mt.strokeColor,this.strokeWidth=Mt.strokeWidth,this.strokeDasharray=Mt.strokeDasharray,this.opacity=Mt.opacity,this.createVisual(),Tt.prototype.restoreState.call(this,St),this.setSize()},Et.prototype.scale=function(St,Mt){Tt.prototype.scale.call(this,St,Mt),this.setSize()},Et.title="Rectangle marker",Et}(xt),Ot=function(Tt){function Et(St,Mt,zt,kt){var Ut=Tt.call(this,St,kt||'<svg viewBox="0 0 24 24"><path d="M3 17h18v-2H3v2m0 3h18v-1H3v1m0-7h18v-3H3v3m0-9v4h18V4H3z"/></svg>')||this;return Ut.widths=[],Ut.widthBoxes=[],Ut.widths=Mt,Ut.currentWidth=zt,Ut.setCurrentWidth=Ut.setCurrentWidth.bind(Ut),Ut}return se(Et,Tt),Et.prototype.getUi=function(){var St=this,Mt=document.createElement("div");return Mt.style.display="flex",Mt.style.overflow="hidden",Mt.style.flexGrow="2",this.widths.forEach(function(zt){var kt=document.createElement("div");kt.style.display="flex",kt.style.flexGrow="2",kt.style.alignItems="center",kt.style.justifyContent="space-between",kt.style.padding="5px",kt.style.borderWidth="2px",kt.style.borderStyle="solid",kt.style.borderColor=zt===St.currentWidth?St.uiStyleSettings.toolboxAccentColor:"transparent",kt.addEventListener("click",function(){St.setCurrentWidth(zt,kt)}),Mt.appendChild(kt);var Ut=document.createElement("div");Ut.innerText=zt.toString(),Ut.style.marginRight="5px",kt.appendChild(Ut);var Oe=document.createElement("div");Oe.style.minHeight="20px",Oe.style.flexGrow="2",Oe.style.display="flex",Oe.style.alignItems="center";var Te=document.createElement("hr");Te.style.minWidth="20px",Te.style.border="0px",Te.style.borderTop=zt+"px solid "+St.uiStyleSettings.toolboxColor,Te.style.flexGrow="2",Oe.appendChild(Te),kt.appendChild(Oe),St.widthBoxes.push(kt)}),Mt},Et.prototype.setCurrentWidth=function(St,Mt){var zt=this;this.currentWidth=St,this.widthBoxes.forEach(function(kt){kt.style.borderColor=kt===Mt?zt.uiStyleSettings.toolboxAccentColor:"transparent"}),this.onWidthChanged&&this.onWidthChanged(this.currentWidth)},Et}(nt),Ht=function(Tt){function Et(St,Mt,zt,kt){var Ut=Tt.call(this,St,kt||'<svg viewBox="0 0 24 24"><path d="M3 16h5v-2H3v2m6.5 0h5v-2h-5v2m6.5 0h5v-2h-5v2M3 20h2v-2H3v2m4 0h2v-2H7v2m4 0h2v-2h-2v2m4 0h2v-2h-2v2m4 0h2v-2h-2v2M3 12h8v-2H3v2m10 0h8v-2h-8v2M3 4v4h18V4H3z"/></svg>')||this;return Ut.styles=[],Ut.styleBoxes=[],Ut.styles=Mt,Ut.currentStyle=zt,Ut.setCurrentStyle=Ut.setCurrentStyle.bind(Ut),Ut}return se(Et,Tt),Et.prototype.getUi=function(){var St=this,Mt=document.createElement("div");return Mt.style.display="flex",Mt.style.overflow="hidden",Mt.style.flexGrow="2",this.styles.forEach(function(zt){var kt=document.createElement("div");kt.style.display="flex",kt.style.alignItems="center",kt.style.justifyContent="space-between",kt.style.padding="5px",kt.style.borderWidth="2px",kt.style.borderStyle="solid",kt.style.overflow="hidden",kt.style.maxWidth=100/St.styles.length-5+"%",kt.style.borderColor=zt===St.currentStyle?St.uiStyleSettings.toolboxAccentColor:"transparent",kt.addEventListener("click",function(){St.setCurrentStyle(zt,kt)}),Mt.appendChild(kt);var Ut=document.createElement("div");Ut.style.minHeight="20px",Ut.style.flexGrow="2",Ut.style.overflow="hidden";var Oe=`<svg width="100" height="20">
|
|
<line x1="0" y1="10" x2="100" y2="10" stroke="`+St.uiStyleSettings.toolboxColor+'" stroke-width="3" '+(zt!==""?'stroke-dasharray="'+zt+'"':"")+` />
|
|
</svg>`;Ut.innerHTML=Oe,kt.appendChild(Ut),St.styleBoxes.push(kt)}),Mt},Et.prototype.setCurrentStyle=function(St,Mt){var zt=this;this.currentStyle=St,this.styleBoxes.forEach(function(kt){kt.style.borderColor=kt===Mt?zt.uiStyleSettings.toolboxAccentColor:"transparent"}),this.onStyleChanged&&this.onStyleChanged(this.currentStyle)},Et}(nt),te=function(Tt){function Et(St,Mt,zt){var kt=Tt.call(this,St,Mt,zt)||this;return kt.strokeColor=zt.defaultColor,kt.strokeWidth=zt.defaultStrokeWidth,kt.strokeDasharray=zt.defaultStrokeDasharray,kt.strokePanel=new et("Line color",zt.defaultColorSet,zt.defaultColor),kt.strokePanel.onColorChanged=kt.setStrokeColor,kt.strokeWidthPanel=new Ot("Line width",zt.defaultStrokeWidths,zt.defaultStrokeWidth),kt.strokeWidthPanel.onWidthChanged=kt.setStrokeWidth,kt.strokeStylePanel=new Ht("Line style",zt.defaultStrokeDasharrays,zt.defaultStrokeDasharray),kt.strokeStylePanel.onStyleChanged=kt.setStrokeDasharray,kt}return se(Et,Tt),Object.defineProperty(Et.prototype,"toolboxPanels",{get:function(){return[this.strokePanel,this.strokeWidthPanel,this.strokeStylePanel]},enumerable:!1,configurable:!0}),Et.prototype.getState=function(){var St=Tt.prototype.getState.call(this);return St.typeName=Et.typeName,St},Et.typeName="FrameMarker",Et.title="Frame marker",Et.icon='<svg viewBox="0 0 24 24"><path d="M4 6v13h16V6H4m14 11H6V8h12v9z"/></svg>',Et}(Lt),_t=function(){this.defaultColorSet=["#EF4444","#10B981","#2563EB","#FFFF00","#7C3AED","#F472B6","#000000","#FFFFFF"],this.defaultColor=this.defaultColorSet[0],this.defaultFillColor=this.defaultColorSet[0],this.defaultStrokeColor=this.defaultColorSet[7],this.defaultHighlightColor=this.defaultColorSet[3],this.defaultStrokeWidth=3,this.defaultStrokeDasharray="",this.defaultHighlightOpacity=.5,this.defaultFontFamily="Helvetica, Arial, sans-serif",this.defaultStrokeWidths=[1,2,3,5,10],this.defaultStrokeDasharrays=["","3","12 3","9 6 3 6"],this.defaultOpacitySteps=[.1,.25,.5,.75,1],this.displayMode="inline",this.defaultFontFamilies=['Times, "Times New Roman", serif',"Helvetica, Arial, sans-serif",'Courier, "Courier New", monospace',"cursive","fantasy"],this.popupMargin=30,this.newFreehandMarkerOnPointerUp=!1,this.defaultColorsFollowCurrentColors=!1,this.freehandPixelRatio=1,this.disableRotation=!1,this.defaultCaptionFontSize="1rem",this.defaultCaptionText="Text"},Xt=function(Tt){function Et(St,Mt,zt){var kt=Tt.call(this,St,Mt,zt)||this;return kt.x1=0,kt.y1=0,kt.x2=0,kt.y2=0,kt.defaultLength=50,kt.manipulationStartX=0,kt.manipulationStartY=0,kt.manipulationStartX1=0,kt.manipulationStartY1=0,kt.manipulationStartX2=0,kt.manipulationStartY2=0,kt.setupControlBox(),kt}return se(Et,Tt),Et.prototype.ownsTarget=function(St){return!!Tt.prototype.ownsTarget.call(this,St)||!(!this.grip1.ownsTarget(St)&&!this.grip2.ownsTarget(St))},Et.prototype.pointerDown=function(St,Mt){Tt.prototype.pointerDown.call(this,St,Mt),this.manipulationStartX=St.x,this.manipulationStartY=St.y,this.state==="new"&&(this.x1=St.x,this.y1=St.y,this.x2=St.x,this.y2=St.y),this.manipulationStartX1=this.x1,this.manipulationStartY1=this.y1,this.manipulationStartX2=this.x2,this.manipulationStartY2=this.y2,this.state!=="new"&&(this.select(),this.grip1.ownsTarget(Mt)?this.activeGrip=this.grip1:this.grip2.ownsTarget(Mt)?this.activeGrip=this.grip2:this.activeGrip=void 0,this.activeGrip?this._state="resize":this._state="move")},Et.prototype.pointerUp=function(St){var Mt=this.state;Tt.prototype.pointerUp.call(this,St),this.state==="creating"&&Math.abs(this.x1-this.x2)<10&&Math.abs(this.y1-this.y2)<10?(this.x2=this.x1+this.defaultLength,this.adjustVisual(),this.adjustControlBox()):this.manipulate(St),this._state="select",Mt==="creating"&&this.onMarkerCreated&&this.onMarkerCreated(this)},Et.prototype.adjustVisual=function(){},Et.prototype.manipulate=function(St){this.state==="creating"?this.resize(St):this.state==="move"?(this.x1=this.manipulationStartX1+St.x-this.manipulationStartX,this.y1=this.manipulationStartY1+St.y-this.manipulationStartY,this.x2=this.manipulationStartX2+St.x-this.manipulationStartX,this.y2=this.manipulationStartY2+St.y-this.manipulationStartY,this.adjustVisual(),this.adjustControlBox()):this.state==="resize"&&this.resize(St)},Et.prototype.resize=function(St){switch(this.activeGrip){case this.grip1:this.x1=St.x,this.y1=St.y;break;case this.grip2:case void 0:this.x2=St.x,this.y2=St.y}this.adjustVisual(),this.adjustControlBox()},Et.prototype.select=function(){Tt.prototype.select.call(this),this.adjustControlBox(),this.controlBox.style.display=""},Et.prototype.deselect=function(){Tt.prototype.deselect.call(this),this.controlBox.style.display="none"},Et.prototype.setupControlBox=function(){this.controlBox=Rt.createGroup(),this.container.appendChild(this.controlBox),this.addControlGrips(),this.controlBox.style.display="none"},Et.prototype.adjustControlBox=function(){this.positionGrips()},Et.prototype.addControlGrips=function(){this.grip1=this.createGrip(),this.grip2=this.createGrip(),this.positionGrips()},Et.prototype.createGrip=function(){var St=new pt;return St.visual.transform.baseVal.appendItem(Rt.createTransform()),this.controlBox.appendChild(St.visual),St},Et.prototype.positionGrips=function(){var St=this.grip1.GRIP_SIZE;this.positionGrip(this.grip1.visual,this.x1-St/2,this.y1-St/2),this.positionGrip(this.grip2.visual,this.x2-St/2,this.y2-St/2)},Et.prototype.positionGrip=function(St,Mt,zt){var kt=St.transform.baseVal.getItem(0);kt.setTranslate(Mt,zt),St.transform.baseVal.replaceItem(kt,0)},Et.prototype.getState=function(){return Object.assign({x1:this.x1,y1:this.y1,x2:this.x2,y2:this.y2},Tt.prototype.getState.call(this))},Et.prototype.restoreState=function(St){Tt.prototype.restoreState.call(this,St);var Mt=St;this.x1=Mt.x1,this.y1=Mt.y1,this.x2=Mt.x2,this.y2=Mt.y2},Et.prototype.scale=function(St,Mt){Tt.prototype.scale.call(this,St,Mt),this.x1=this.x1*St,this.y1=this.y1*Mt,this.x2=this.x2*St,this.y2=this.y2*Mt,this.adjustVisual(),this.adjustControlBox()},Et}(ct),ve=function(Tt){function Et(St,Mt,zt){var kt=Tt.call(this,St,Mt,zt)||this;return kt.strokeColor="transparent",kt.strokeWidth=0,kt.strokeDasharray="",kt.setStrokeColor=kt.setStrokeColor.bind(kt),kt.setStrokeWidth=kt.setStrokeWidth.bind(kt),kt.setStrokeDasharray=kt.setStrokeDasharray.bind(kt),kt.strokeColor=zt.defaultColor,kt.strokeWidth=zt.defaultStrokeWidth,kt.strokeDasharray=zt.defaultStrokeDasharray,kt.strokePanel=new et("Line color",zt.defaultColorSet,zt.defaultColor),kt.strokePanel.onColorChanged=kt.setStrokeColor,kt.strokeWidthPanel=new Ot("Line width",zt.defaultStrokeWidths,zt.defaultStrokeWidth),kt.strokeWidthPanel.onWidthChanged=kt.setStrokeWidth,kt.strokeStylePanel=new Ht("Line style",zt.defaultStrokeDasharrays,zt.defaultStrokeDasharray),kt.strokeStylePanel.onStyleChanged=kt.setStrokeDasharray,kt}return se(Et,Tt),Et.prototype.ownsTarget=function(St){return!(!Tt.prototype.ownsTarget.call(this,St)&&St!==this.visual&&St!==this.selectorLine&&St!==this.visibleLine)},Et.prototype.createVisual=function(){this.visual=Rt.createGroup(),this.selectorLine=Rt.createLine(this.x1,this.y1,this.x2,this.y2,[["stroke","transparent"],["stroke-width",(this.strokeWidth+10).toString()]]),this.visibleLine=Rt.createLine(this.x1,this.y1,this.x2,this.y2,[["stroke",this.strokeColor],["stroke-width",this.strokeWidth.toString()]]),this.visual.appendChild(this.selectorLine),this.visual.appendChild(this.visibleLine),this.addMarkerVisualToContainer(this.visual)},Et.prototype.pointerDown=function(St,Mt){Tt.prototype.pointerDown.call(this,St,Mt),this.state==="new"&&(this.createVisual(),this.adjustVisual(),this._state="creating")},Et.prototype.adjustVisual=function(){this.selectorLine&&this.visibleLine&&(this.selectorLine.setAttribute("x1",this.x1.toString()),this.selectorLine.setAttribute("y1",this.y1.toString()),this.selectorLine.setAttribute("x2",this.x2.toString()),this.selectorLine.setAttribute("y2",this.y2.toString()),this.visibleLine.setAttribute("x1",this.x1.toString()),this.visibleLine.setAttribute("y1",this.y1.toString()),this.visibleLine.setAttribute("x2",this.x2.toString()),this.visibleLine.setAttribute("y2",this.y2.toString()),Rt.setAttributes(this.visibleLine,[["stroke",this.strokeColor]]),Rt.setAttributes(this.visibleLine,[["stroke-width",this.strokeWidth.toString()]]),Rt.setAttributes(this.visibleLine,[["stroke-dasharray",this.strokeDasharray.toString()]]))},Et.prototype.setStrokeColor=function(St){this.strokeColor=St,this.adjustVisual(),this.colorChanged(St)},Et.prototype.setStrokeWidth=function(St){this.strokeWidth=St,this.adjustVisual()},Et.prototype.setStrokeDasharray=function(St){this.strokeDasharray=St,this.adjustVisual(),this.stateChanged()},Object.defineProperty(Et.prototype,"toolboxPanels",{get:function(){return[this.strokePanel,this.strokeWidthPanel,this.strokeStylePanel]},enumerable:!1,configurable:!0}),Et.prototype.getState=function(){var St=Object.assign({strokeColor:this.strokeColor,strokeWidth:this.strokeWidth,strokeDasharray:this.strokeDasharray},Tt.prototype.getState.call(this));return St.typeName=Et.typeName,St},Et.prototype.restoreState=function(St){Tt.prototype.restoreState.call(this,St);var Mt=St;this.strokeColor=Mt.strokeColor,this.strokeWidth=Mt.strokeWidth,this.strokeDasharray=Mt.strokeDasharray,this.createVisual(),this.adjustVisual()},Et.typeName="LineMarker",Et.title="Line marker",Et.icon='<svg viewBox="0 0 24 24"><path d="M19 13H5v-2h14v2z"/></svg>',Et}(Xt),oe=function(Tt){function Et(St,Mt,zt,kt){var Ut=Tt.call(this,St,kt||'<svg viewBox="0 0 24 24"><path d="M17 8h3v12h1v1h-4v-1h1v-3h-4l-1.5 3H14v1h-4v-1h1l6-12m1 1l-3.5 7H18V9M5 3h5c1.11 0 2 .89 2 2v11H9v-5H6v5H3V5c0-1.11.89-2 2-2m1 2v4h3V5H6z"/></svg>')||this;return Ut.fonts=[],Ut.fontBoxes=[],Ut.fonts=Mt,Ut.currentFont=zt,Ut.setCurrentFont=Ut.setCurrentFont.bind(Ut),Ut}return se(Et,Tt),Et.prototype.getUi=function(){var St=this,Mt=document.createElement("div");return Mt.style.overflow="hidden",Mt.style.flexGrow="2",this.fonts.forEach(function(zt){var kt=document.createElement("div");kt.style.display="inline-block",kt.style.alignItems="center",kt.style.justifyContent="space-between",kt.style.padding="5px",kt.style.borderWidth="2px",kt.style.borderStyle="solid",kt.style.overflow="hidden",kt.style.maxWidth=100/St.fonts.length-5+"%",kt.style.borderColor=zt===St.currentFont?St.uiStyleSettings.toolboxAccentColor:"transparent",kt.addEventListener("click",function(){St.setCurrentFont(zt,kt)}),Mt.appendChild(kt);var Ut=document.createElement("div");Ut.style.display="flex",Ut.style.minHeight="20px",Ut.style.flexGrow="2",Ut.style.fontFamily=zt,Ut.style.overflow="hidden";var Oe=document.createElement("div");Oe.style.whiteSpace="nowrap",Oe.style.overflow="hidden",Oe.style.textOverflow="ellipsis",Oe.innerHTML="The quick brown fox jumps over the lazy dog",Ut.appendChild(Oe),kt.appendChild(Ut),St.fontBoxes.push(kt)}),Mt},Et.prototype.setCurrentFont=function(St,Mt){var zt=this;this.currentFont=St,this.fontBoxes.forEach(function(kt){kt.style.borderColor=kt===Mt?zt.uiStyleSettings.toolboxAccentColor:"transparent"}),this.onFontChanged&&this.onFontChanged(this.currentFont)},Et}(nt),Re=function(Tt){function Et(St,Mt,zt){var kt=Tt.call(this,St,Mt,zt)||this;return kt.color="transparent",kt.padding=5,kt.DEFAULT_TEXT="\u8BF7\u8F93\u5165\u6587\u672C",kt.text=kt.DEFAULT_TEXT,kt.isMoved=!1,kt.color=zt.defaultColor,kt.fontFamily=zt.defaultFontFamily,kt.defaultSize={x:100,y:30},kt.setColor=kt.setColor.bind(kt),kt.setFont=kt.setFont.bind(kt),kt.renderText=kt.renderText.bind(kt),kt.sizeText=kt.sizeText.bind(kt),kt.textEditDivClicked=kt.textEditDivClicked.bind(kt),kt.showTextEditor=kt.showTextEditor.bind(kt),kt.setSize=kt.setSize.bind(kt),kt.positionTextEditor=kt.positionTextEditor.bind(kt),kt.colorPanel=new et("Color",zt.defaultColorSet,zt.defaultColor),kt.colorPanel.onColorChanged=kt.setColor,kt.fontFamilyPanel=new oe("Font",zt.defaultFontFamilies,zt.defaultFontFamily),kt.fontFamilyPanel.onFontChanged=kt.setFont,kt}return se(Et,Tt),Et.prototype.ownsTarget=function(St){if(Tt.prototype.ownsTarget.call(this,St)||St===this.visual||St===this.textElement||St===this.bgRectangle)return!0;var Mt=!1;return this.textElement.childNodes.forEach(function(zt){zt===St&&(Mt=!0)}),Mt},Et.prototype.createVisual=function(){this.visual=Rt.createGroup(),this.bgRectangle=Rt.createRect(1,1,[["fill","transparent"]]),this.visual.appendChild(this.bgRectangle),this.textElement=Rt.createText([["fill",this.color],["font-family",this.fontFamily],["font-size","16px"],["x","0"],["y","0"]]),this.textElement.transform.baseVal.appendItem(Rt.createTransform()),this.textElement.transform.baseVal.appendItem(Rt.createTransform()),this.visual.appendChild(this.textElement),this.addMarkerVisualToContainer(this.visual),this.renderText()},Et.prototype.pointerDown=function(St,Mt){Tt.prototype.pointerDown.call(this,St,Mt),this.isMoved=!1,this.pointerDownPoint=St,this.pointerDownTimestamp=Date.now(),this.state==="new"&&(this.createVisual(),this.moveVisual(St),this._state="creating")},Et.prototype.renderText=function(){var St=this;if(this.textElement){for(;this.textElement.lastChild;)this.textElement.removeChild(this.textElement.lastChild);this.text.split(/\r\n|[\n\v\f\r\x85\u2028\u2029]/).forEach(function(Mt){St.textElement.appendChild(Rt.createTSpan(Mt.trim()===""?" ":Mt.trim(),[["x","0"],["dy","1.2em"]]))}),setTimeout(this.sizeText,10)}},Et.prototype.getTextScale=function(){var St=this.textElement.getBBox(),Mt=1;if(St.width>0&&St.height>0){var zt=(1*this.width-this.width*this.padding*2/100)/St.width,kt=(1*this.height-this.height*this.padding*2/100)/St.height;Mt=Math.min(zt,kt)}return Mt},Et.prototype.getTextPosition=function(St){var Mt=this.textElement.getBBox(),zt=0,kt=0;return Mt.width>0&&Mt.height>0&&(zt=(this.width-Mt.width*St)/2,kt=this.height/2-Mt.height*St/2),{x:zt,y:kt}},Et.prototype.sizeText=function(){var St=this.textElement.getBBox(),Mt=this.getTextScale(),zt=this.getTextPosition(Mt);zt.y-=St.y*Mt,navigator.userAgent.indexOf("Edge/")>-1?this.textElement.style.transform="translate("+zt.x+"px, "+zt.y+"px) scale("+Mt+", "+Mt+")":(this.textElement.transform.baseVal.getItem(0).setTranslate(zt.x,zt.y),this.textElement.transform.baseVal.getItem(1).setScale(Mt,Mt))},Et.prototype.manipulate=function(St){Tt.prototype.manipulate.call(this,St),this.pointerDownPoint!==void 0&&(this.isMoved=Math.abs(St.x-this.pointerDownPoint.x)>5||Math.abs(St.y-this.pointerDownPoint.y)>5)},Et.prototype.resize=function(St){Tt.prototype.resize.call(this,St),this.isMoved=!0,this.setSize(),this.sizeText()},Et.prototype.setSize=function(){Tt.prototype.setSize.call(this),this.visual&&this.bgRectangle&&(Rt.setAttributes(this.visual,[["width",this.width.toString()],["height",this.height.toString()]]),Rt.setAttributes(this.bgRectangle,[["width",this.width.toString()],["height",this.height.toString()]]))},Et.prototype.pointerUp=function(St){var Mt=this.state;Mt==="creating"&&(this._suppressMarkerCreateEvent=!0),Tt.prototype.pointerUp.call(this,St),this.setSize(),(Mt==="creating"||!this.isMoved&&Date.now()-this.pointerDownTimestamp>500)&&this.showTextEditor(),this.pointerDownPoint=void 0},Et.prototype.showTextEditor=function(){var St=this;this._state="edit",this.overlayContainer.innerHTML="",this.textEditDiv=document.createElement("div"),this.textEditDiv.style.flexGrow="2",this.textEditDiv.style.alignItems="center",this.textEditDiv.style.justifyContent="center",this.textEditDiv.style.pointerEvents="auto",this.textEditDiv.style.overflow="hidden",this.textEditor=document.createElement("div"),this.textEditor.style.position="absolute",this.textEditor.style.fontFamily=this.fontFamily,this.textEditor.style.lineHeight="1em",this.textEditor.innerText=this.text,this.textEditor.contentEditable="true",this.textEditor.style.color=this.color,this.textEditor.style.whiteSpace="pre",this.positionTextEditor(),this.textEditor.addEventListener("pointerup",function(Mt){Mt.stopPropagation()}),this.textEditor.addEventListener("input",function(){for(var Mt=Number.parseFloat(St.textEditor.style.fontSize);St.textEditor.clientWidth>=Number.parseInt(St.textEditor.style.maxWidth)&&Mt>.9;)Mt-=.1,St.textEditor.style.fontSize=Math.max(Mt,.9)+"em"}),this.textEditor.addEventListener("keyup",function(Mt){Mt.cancelBubble=!0}),this.textEditor.addEventListener("paste",function(Mt){if(Mt.clipboardData){var zt=Mt.clipboardData.getData("text"),kt=window.getSelection();if(!kt.rangeCount)return!1;kt.deleteFromDocument(),kt.getRangeAt(0).insertNode(document.createTextNode(zt)),Mt.preventDefault()}}),this.textEditDiv.addEventListener("pointerup",function(){St.textEditDivClicked(St.textEditor.innerText)}),this.textEditDiv.appendChild(this.textEditor),this.overlayContainer.appendChild(this.textEditDiv),this.hideVisual(),this.textEditor.focus(),document.execCommand("selectAll")},Et.prototype.positionTextEditor=function(){if(this.state==="edit")if(this.textEditor===void 0)this.showTextEditor();else{this.textElement.style.display="";var St=this.getTextScale(),Mt=this.rotatePoint({x:this.left+this.width/2,y:this.top+this.height/2}),zt=this.textElement.getBBox(),kt={x:zt.width*St,y:zt.height*St};Mt.x-=kt.x/2,Mt.y-=kt.y/2,this.textEditor.style.top=Mt.y+"px",this.textEditor.style.left=Mt.x+"px",this.textEditor.style.maxWidth=this.overlayContainer.offsetWidth-Mt.x+"px",this.textEditor.style.fontSize=Math.max(16*St,12)+"px",this.textElement.style.display="none"}},Et.prototype.textEditDivClicked=function(St){this.text=St.trim(),this.overlayContainer.innerHTML="",this.renderText(),this.showVisual(),this._suppressMarkerCreateEvent&&(this._suppressMarkerCreateEvent=!1,this.onMarkerCreated&&this.onMarkerCreated(this)),this.stateChanged()},Et.prototype.select=function(){Tt.prototype.select.call(this),this.state==="edit"&&this.textEditDivClicked(this.textEditor.innerText)},Et.prototype.deselect=function(){this.state==="edit"&&this.textEditDivClicked(this.textEditor.innerText),Tt.prototype.deselect.call(this)},Et.prototype.dblClick=function(St,Mt){Tt.prototype.dblClick.call(this,St,Mt),this.showTextEditor()},Et.prototype.setColor=function(St){this.textElement&&Rt.setAttributes(this.textElement,[["fill",St]]),this.color=St,this.textEditor&&(this.textEditor.style.color=this.color),this.colorChanged(St)},Et.prototype.setFont=function(St){this.textElement&&Rt.setAttributes(this.textElement,[["font-family",St]]),this.fontFamily=St,this.textEditor&&(this.textEditor.style.fontFamily=this.fontFamily),this.renderText(),this.stateChanged()},Et.prototype.hideVisual=function(){this.textElement.style.display="none",this.hideControlBox()},Et.prototype.showVisual=function(){this.state==="edit"&&(this._state="select"),this.textElement.style.display="",this.showControlBox()},Object.defineProperty(Et.prototype,"toolboxPanels",{get:function(){return[this.colorPanel,this.fontFamilyPanel]},enumerable:!1,configurable:!0}),Et.prototype.getState=function(){var St=Object.assign({color:this.color,fontFamily:this.fontFamily,padding:this.padding,text:this.text},Tt.prototype.getState.call(this));return St.typeName=Et.typeName,St},Et.prototype.restoreState=function(St){var Mt=St;this.color=Mt.color,this.fontFamily=Mt.fontFamily,this.padding=Mt.padding,this.text=Mt.text,this.createVisual(),Tt.prototype.restoreState.call(this,St),this.setSize()},Et.prototype.scale=function(St,Mt){Tt.prototype.scale.call(this,St,Mt),this.setSize(),this.sizeText(),this.positionTextEditor()},Et.typeName="TextMarker",Et.title="Text marker",Et.icon='<svg viewBox="0 0 24 24"><path d="M9.6 14L12 7.7l2.4 6.3M11 5L5.5 19h2.2l1.1-3H15l1.1 3h2.2L13 5h-2z"/></svg>',Et}(xt),Ye=function(Tt){function Et(St,Mt,zt){var kt=Tt.call(this,St,Mt,zt)||this;return kt.color="transparent",kt.lineWidth=3,kt.drawing=!1,kt.pixelRatio=1,kt.color=zt.defaultColor,kt.lineWidth=zt.defaultStrokeWidth,kt.pixelRatio=zt.freehandPixelRatio,kt.setColor=kt.setColor.bind(kt),kt.addCanvas=kt.addCanvas.bind(kt),kt.finishCreation=kt.finishCreation.bind(kt),kt.setLineWidth=kt.setLineWidth.bind(kt),kt.colorPanel=new et("Color",zt.defaultColorSet,zt.defaultColor),kt.colorPanel.onColorChanged=kt.setColor,kt.lineWidthPanel=new Ot("Line width",zt.defaultStrokeWidths,zt.defaultStrokeWidth),kt.lineWidthPanel.onWidthChanged=kt.setLineWidth,kt}return se(Et,Tt),Et.prototype.ownsTarget=function(St){return!(!Tt.prototype.ownsTarget.call(this,St)&&St!==this.visual&&St!==this.drawingImage)},Et.prototype.createVisual=function(){this.visual=Rt.createGroup(),this.drawingImage=Rt.createImage(),this.visual.appendChild(this.drawingImage);var St=Rt.createTransform();this.visual.transform.baseVal.appendItem(St),this.addMarkerVisualToContainer(this.visual)},Et.prototype.pointerDown=function(St,Mt){this.state==="new"&&(this.addCanvas(),this.createVisual(),this._state="creating"),this.state==="creating"?(this.canvasContext.strokeStyle=this.color,this.canvasContext.lineWidth=this.lineWidth,this.canvasContext.beginPath(),this.canvasContext.moveTo(St.x,St.y),this.drawing=!0):Tt.prototype.pointerDown.call(this,St,Mt)},Et.prototype.manipulate=function(St){this.state==="creating"?this.drawing&&(this.canvasContext.lineTo(St.x,St.y),this.canvasContext.stroke()):Tt.prototype.manipulate.call(this,St)},Et.prototype.resize=function(St){Tt.prototype.resize.call(this,St),Rt.setAttributes(this.visual,[["width",this.width.toString()],["height",this.height.toString()]]),Rt.setAttributes(this.drawingImage,[["width",this.width.toString()],["height",this.height.toString()]])},Et.prototype.pointerUp=function(St){this._state==="creating"?this.drawing&&(this.canvasContext.closePath(),this.drawing=!1,this.globalSettings.newFreehandMarkerOnPointerUp&&this.finishCreation()):Tt.prototype.pointerUp.call(this,St)},Et.prototype.addCanvas=function(){this.overlayContainer.innerHTML="",this.canvasElement=document.createElement("canvas"),this.canvasElement.width=this.overlayContainer.clientWidth*this.pixelRatio,this.canvasElement.height=this.overlayContainer.clientHeight*this.pixelRatio,this.canvasContext=this.canvasElement.getContext("2d"),this.canvasContext.scale(this.pixelRatio,this.pixelRatio),this.overlayContainer.appendChild(this.canvasElement)},Et.prototype.select=function(){this.state==="creating"&&this.finishCreation(),Tt.prototype.select.call(this)},Et.prototype.deselect=function(){this.state==="creating"&&this.finishCreation(),Tt.prototype.deselect.call(this)},Et.prototype.finishCreation=function(){for(var St=this.canvasContext.getImageData(0,0,this.canvasElement.width,this.canvasElement.height),Mt=[this.canvasElement.width+1,this.canvasElement.height+1,-1,-1],zt=Mt[0],kt=Mt[1],Ut=Mt[2],Oe=Mt[3],Te=!1,_e=0;_e<this.canvasElement.height;_e++)for(var ee=0;ee<this.canvasElement.width;ee++)St.data[_e*this.canvasElement.width*4+4*ee+3]>0&&(Te=!0,_e<kt&&(kt=_e),ee<zt&&(zt=ee),_e>Oe&&(Oe=_e),ee>Ut&&(Ut=ee));if(Te){this.left=zt/this.pixelRatio,this.top=kt/this.pixelRatio,this.width=(Ut-zt)/this.pixelRatio,this.height=(Oe-kt)/this.pixelRatio;var de=document.createElement("canvas");de.width=Ut-zt,de.height=Oe-kt,de.getContext("2d").putImageData(this.canvasContext.getImageData(zt,kt,Ut-zt,Oe-kt),0,0),this.drawingImgUrl=de.toDataURL("image/png"),this.setDrawingImage(),this._state="select",this.onMarkerCreated&&this.onMarkerCreated(this)}this.overlayContainer.innerHTML=""},Et.prototype.setDrawingImage=function(){Rt.setAttributes(this.drawingImage,[["width",this.width.toString()],["height",this.height.toString()]]),Rt.setAttributes(this.drawingImage,[["href",this.drawingImgUrl]]),this.moveVisual({x:this.left,y:this.top})},Et.prototype.setColor=function(St){this.color=St,this.colorChanged(St)},Et.prototype.setLineWidth=function(St){this.lineWidth=St},Object.defineProperty(Et.prototype,"toolboxPanels",{get:function(){return this.state==="new"||this.state==="creating"?[this.colorPanel,this.lineWidthPanel]:[]},enumerable:!1,configurable:!0}),Et.prototype.getState=function(){var St=Object.assign({drawingImgUrl:this.drawingImgUrl},Tt.prototype.getState.call(this));return St.typeName=Et.typeName,St},Et.prototype.restoreState=function(St){this.createVisual(),Tt.prototype.restoreState.call(this,St),this.drawingImgUrl=St.drawingImgUrl,this.setDrawingImage()},Et.prototype.scale=function(St,Mt){Tt.prototype.scale.call(this,St,Mt),this.setDrawingImage()},Et.typeName="FreehandMarker",Et.title="Freehand marker",Et.icon='<svg viewBox="0 0 24 24"><path d="M9.75 20.85c1.78-.7 1.39-2.63.49-3.85-.89-1.25-2.12-2.11-3.36-2.94A9.817 9.817 0 014.54 12c-.28-.33-.85-.94-.27-1.06.59-.12 1.61.46 2.13.68.91.38 1.81.82 2.65 1.34l1.01-1.7C8.5 10.23 6.5 9.32 4.64 9.05c-1.06-.16-2.18.06-2.54 1.21-.32.99.19 1.99.77 2.77 1.37 1.83 3.5 2.71 5.09 4.29.34.33.75.72.95 1.18.21.44.16.47-.31.47-1.24 0-2.79-.97-3.8-1.61l-1.01 1.7c1.53.94 4.09 2.41 5.96 1.79m11.09-15.6c.22-.22.22-.58 0-.79l-1.3-1.3a.562.562 0 00-.78 0l-1.02 1.02 2.08 2.08M11 10.92V13h2.08l6.15-6.15-2.08-2.08L11 10.92z"/></svg>',Et}(xt),en=function(Tt){function Et(St,Mt,zt){var kt=Tt.call(this,St,zt||'<svg viewBox="0 0 24 24"><path d="M8 14v4l-6-6 6-6v4h8V6l6 6-6 6v-4H8z"/></svg>')||this;return kt.typeBoxes=[],kt.currentType=Mt,kt.setCurrentType=kt.setCurrentType.bind(kt),kt}return se(Et,Tt),Et.prototype.getUi=function(){var St=this,Mt=document.createElement("div");Mt.style.display="flex",Mt.style.overflow="hidden",Mt.style.flexGrow="2";for(var zt=function(Oe){var Te="both";switch(Oe){case 0:Te="both";break;case 1:Te="start";break;case 2:Te="end";break;case 3:Te="none"}var _e=document.createElement("div");if(_e.style.display="flex",_e.style.flexGrow="2",_e.style.alignItems="center",_e.style.justifyContent="space-between",_e.style.padding="5px",_e.style.borderWidth="2px",_e.style.borderStyle="solid",_e.style.borderColor=Te===kt.currentType?kt.uiStyleSettings.toolboxAccentColor:"transparent",_e.addEventListener("click",function(){St.setCurrentType(Te,_e)}),Mt.appendChild(_e),Te==="both"||Te==="start"){var ee=document.createElement("div");ee.style.display="flex",ee.style.alignItems="center",ee.style.minHeight="20px",ee.innerHTML=`<svg viewBox="0 0 10 10" width="10" height="10" xmlns="http://www.w3.org/2000/svg">
|
|
<polygon points="0,5 10,0 10,10" fill="`+(kt.uiStyleSettings!==void 0?kt.uiStyleSettings.toolboxColor:"#eeeeee")+`" />
|
|
</svg>`,ee.style.marginLeft="5px",_e.appendChild(ee)}var de=document.createElement("div");de.style.display="flex",de.style.alignItems="center",de.style.minHeight="20px",de.style.flexGrow="2";var pe=document.createElement("hr");if(pe.style.minWidth="20px",pe.style.border="0px",pe.style.borderTop="3px solid "+(kt.uiStyleSettings!==void 0?kt.uiStyleSettings.toolboxColor:"#eeeeee"),pe.style.flexGrow="2",de.appendChild(pe),_e.appendChild(de),Te==="both"||Te==="end"){var be=document.createElement("div");be.style.display="flex",be.style.alignItems="center",be.style.minHeight="20px",be.innerHTML=`<svg viewBox="0 0 10 10" width="10" height="10" xmlns="http://www.w3.org/2000/svg">
|
|
<polygon points="0,0 10,5 0,10" fill="`+(kt.uiStyleSettings!==void 0?kt.uiStyleSettings.toolboxColor:"#eeeeee")+`" />
|
|
</svg>`,be.style.marginRight="5px",_e.appendChild(be)}kt.typeBoxes.push(_e)},kt=this,Ut=0;Ut<4;Ut++)zt(Ut);return Mt},Et.prototype.setCurrentType=function(St,Mt){var zt=this;this.currentType=St,this.typeBoxes.forEach(function(kt){kt.style.borderColor=kt===Mt?zt.uiStyleSettings!==void 0?zt.uiStyleSettings.toolboxAccentColor:"#3080c3":"transparent"}),this.onArrowTypeChanged&&this.onArrowTypeChanged(this.currentType)},Et}(nt),Rn=function(Tt){function Et(St,Mt,zt){var kt=Tt.call(this,St,Mt,zt)||this;return kt.arrowType="end",kt.arrowBaseHeight=10,kt.arrowBaseWidth=10,kt.getArrowPoints=kt.getArrowPoints.bind(kt),kt.setArrowType=kt.setArrowType.bind(kt),kt.arrowTypePanel=new en("Arrow type","end"),kt.arrowTypePanel.onArrowTypeChanged=kt.setArrowType,kt}return se(Et,Tt),Et.prototype.ownsTarget=function(St){return!(!Tt.prototype.ownsTarget.call(this,St)&&St!==this.arrow1&&St!==this.arrow2)},Et.prototype.getArrowPoints=function(St,Mt){var zt=this.arrowBaseWidth+2*this.strokeWidth,kt=this.arrowBaseHeight+2*this.strokeWidth;return St-zt/2+","+(Mt+kt/2)+" "+St+","+(Mt-kt/2)+" "+(St+zt/2)+","+(Mt+kt/2)},Et.prototype.createTips=function(){this.arrow1=Rt.createPolygon(this.getArrowPoints(this.x1,this.y1),[["fill",this.strokeColor]]),this.arrow1.transform.baseVal.appendItem(Rt.createTransform()),this.visual.appendChild(this.arrow1),this.arrow2=Rt.createPolygon(this.getArrowPoints(this.x2,this.y2),[["fill",this.strokeColor]]),this.arrow2.transform.baseVal.appendItem(Rt.createTransform()),this.visual.appendChild(this.arrow2)},Et.prototype.pointerDown=function(St,Mt){Tt.prototype.pointerDown.call(this,St,Mt),this.state==="creating"&&this.createTips()},Et.prototype.adjustVisual=function(){if(Tt.prototype.adjustVisual.call(this),this.arrow1&&this.arrow2){this.arrow1.style.display=this.arrowType==="both"||this.arrowType==="start"?"":"none",this.arrow2.style.display=this.arrowType==="both"||this.arrowType==="end"?"":"none",Rt.setAttributes(this.arrow1,[["points",this.getArrowPoints(this.x1,this.y1)],["fill",this.strokeColor]]),Rt.setAttributes(this.arrow2,[["points",this.getArrowPoints(this.x2,this.y2)],["fill",this.strokeColor]]);var St=0;Math.abs(this.x1-this.x2)>.1&&(St=180*Math.atan((this.y2-this.y1)/(this.x2-this.x1))/Math.PI+90*Math.sign(this.x1-this.x2));var Mt=this.arrow1.transform.baseVal.getItem(0);Mt.setRotate(St,this.x1,this.y1),this.arrow1.transform.baseVal.replaceItem(Mt,0);var zt=this.arrow2.transform.baseVal.getItem(0);zt.setRotate(St+180,this.x2,this.y2),this.arrow2.transform.baseVal.replaceItem(zt,0)}},Et.prototype.setArrowType=function(St){this.arrowType=St,this.adjustVisual(),this.stateChanged()},Object.defineProperty(Et.prototype,"toolboxPanels",{get:function(){return[this.strokePanel,this.strokeWidthPanel,this.strokeStylePanel,this.arrowTypePanel]},enumerable:!1,configurable:!0}),Et.prototype.getState=function(){var St=Object.assign({arrowType:this.arrowType},Tt.prototype.getState.call(this));return St.typeName=Et.typeName,St},Et.prototype.restoreState=function(St){Tt.prototype.restoreState.call(this,St);var Mt=St;this.arrowType=Mt.arrowType,this.createTips(),this.adjustVisual()},Et.typeName="ArrowMarker",Et.title="Arrow marker",Et.icon='<svg viewBox="0 0 24 24"><path d="M19 6.41L17.59 5 7 15.59V9H5v10h10v-2H8.41L19 6.41z"/></svg>',Et}(ve),wn=function(Tt){function Et(St,Mt,zt){var kt=Tt.call(this,St,Mt,zt)||this;return kt.fillColor=zt.defaultFillColor,kt.strokeWidth=0,kt.fillPanel=new et("Color",zt.defaultColorSet,zt.defaultFillColor),kt.fillPanel.onColorChanged=kt.setFillColor,kt}return se(Et,Tt),Object.defineProperty(Et.prototype,"toolboxPanels",{get:function(){return[this.fillPanel]},enumerable:!1,configurable:!0}),Et.prototype.getState=function(){var St=Tt.prototype.getState.call(this);return St.typeName=Et.typeName,St},Et.typeName="CoverMarker",Et.title="Cover marker",Et.icon='<svg viewBox="0 0 24 24"><path d="M4 6v13h16V6H4z"/></svg>',Et}(Lt),un=function(Tt){function Et(St,Mt,zt,kt){var Ut=Tt.call(this,St,kt||'<svg viewBox="0 0 24 24"><path d="M17.66 8L12 2.35 6.34 8A8.02 8.02 0 004 13.64c0 2 .78 4.11 2.34 5.67a7.99 7.99 0 0011.32 0c1.56-1.56 2.34-3.67 2.34-5.67S19.22 9.56 17.66 8M6 14c0-2 .62-3.27 1.76-4.4L12 5.27l4.24 4.38C17.38 10.77 18 12 18 14H6z"/></svg>')||this;return Ut.opacities=[],Ut.opacityBoxes=[],Ut.opacities=Mt,Ut.currentOpacity=zt,Ut.setCurrentOpacity=Ut.setCurrentOpacity.bind(Ut),Ut}return se(Et,Tt),Et.prototype.getUi=function(){var St=this,Mt=document.createElement("div");return Mt.style.display="flex",Mt.style.overflow="hidden",Mt.style.flexGrow="2",Mt.style.justifyContent="space-between",this.opacities.forEach(function(zt){var kt=document.createElement("div");kt.style.display="flex",kt.style.alignItems="center",kt.style.justifyContent="center",kt.style.padding="5px",kt.style.borderWidth="2px",kt.style.borderStyle="solid",kt.style.borderColor=zt===St.currentOpacity?St.uiStyleSettings.toolboxAccentColor:"transparent",kt.addEventListener("click",function(){St.setCurrentOpacity(zt,kt)}),Mt.appendChild(kt);var Ut=document.createElement("div");Ut.innerText=100*zt+"%",kt.appendChild(Ut),St.opacityBoxes.push(kt)}),Mt},Et.prototype.setCurrentOpacity=function(St,Mt){var zt=this;this.currentOpacity=St,this.opacityBoxes.forEach(function(kt){kt.style.borderColor=kt===Mt?zt.uiStyleSettings.toolboxAccentColor:"transparent"}),this.onOpacityChanged&&this.onOpacityChanged(this.currentOpacity)},Et}(nt),vn=function(Tt){function Et(St,Mt,zt){var kt=Tt.call(this,St,Mt,zt)||this;return kt.setOpacity=kt.setOpacity.bind(kt),kt.fillColor=zt.defaultHighlightColor,kt.strokeWidth=0,kt.opacity=zt.defaultHighlightOpacity,kt.fillPanel=new et("Color",zt.defaultColorSet,kt.fillColor),kt.fillPanel.onColorChanged=kt.setFillColor,kt.opacityPanel=new un("Opacity",zt.defaultOpacitySteps,kt.opacity),kt.opacityPanel.onOpacityChanged=kt.setOpacity,kt}return se(Et,Tt),Et.prototype.setOpacity=function(St){this.opacity=St,this.visual&&Rt.setAttributes(this.visual,[["opacity",this.opacity.toString()]]),this.stateChanged()},Object.defineProperty(Et.prototype,"toolboxPanels",{get:function(){return[this.fillPanel,this.opacityPanel]},enumerable:!1,configurable:!0}),Et.prototype.getState=function(){var St=Tt.prototype.getState.call(this);return St.typeName=Et.typeName,St},Et.typeName="HighlightMarker",Et.title="Highlight marker",Et.icon='<svg viewBox="0 0 24 24"><path d="M18.5 1.15c-.53 0-1.04.19-1.43.58l-5.81 5.82 5.65 5.65 5.82-5.81c.77-.78.77-2.04 0-2.83l-2.84-2.83c-.39-.39-.89-.58-1.39-.58M10.3 8.5l-5.96 5.96c-.78.78-.78 2.04.02 2.85C3.14 18.54 1.9 19.77.67 21h5.66l.86-.86c.78.76 2.03.75 2.81-.02l5.95-5.96"/></svg>',Et}(wn),ne='<svg viewBox="0 0 24 24"><path d="M9.62 12L12 5.67 14.37 12M11 3L5.5 17h2.25l1.12-3h6.25l1.13 3h2.25L13 3h-2z"/></svg>',jt='<svg viewBox="0 0 24 24"><path d="M19 11.5s-2 2.17-2 3.5a2 2 0 002 2 2 2 0 002-2c0-1.33-2-3.5-2-3.5M5.21 10L10 5.21 14.79 10m1.77-1.06L7.62 0 6.21 1.41l2.38 2.38-5.15 5.15c-.59.56-.59 1.53 0 2.12l5.5 5.5c.29.29.68.44 1.06.44s.77-.15 1.06-.44l5.5-5.5c.59-.59.59-1.56 0-2.12z"/></svg>',Fe=function(Tt){function Et(St,Mt,zt){var kt=Tt.call(this,St,Mt,zt)||this;return kt.bgColor="transparent",kt.tipPosition={x:0,y:0},kt.tipBase1Position={x:0,y:0},kt.tipBase2Position={x:0,y:0},kt.tipMoving=!1,kt.color=zt.defaultStrokeColor,kt.bgColor=zt.defaultFillColor,kt.fontFamily=zt.defaultFontFamily,kt.defaultSize={x:100,y:30},kt.setBgColor=kt.setBgColor.bind(kt),kt.getTipPoints=kt.getTipPoints.bind(kt),kt.positionTip=kt.positionTip.bind(kt),kt.setTipPoints=kt.setTipPoints.bind(kt),kt.colorPanel=new et("Text color",zt.defaultColorSet,kt.color,ne),kt.colorPanel.onColorChanged=kt.setColor,kt.bgColorPanel=new et("Fill color",zt.defaultColorSet,kt.bgColor,jt),kt.bgColorPanel.onColorChanged=kt.setBgColor,kt.fontFamilyPanel=new oe("Font",zt.defaultFontFamilies,zt.defaultFontFamily),kt.fontFamilyPanel.onFontChanged=kt.setFont,kt.tipGrip=new pt,kt.tipGrip.visual.transform.baseVal.appendItem(Rt.createTransform()),kt.controlBox.appendChild(kt.tipGrip.visual),kt}return se(Et,Tt),Et.prototype.ownsTarget=function(St){return Tt.prototype.ownsTarget.call(this,St)||this.tipGrip.ownsTarget(St)||this.tip===St},Et.prototype.createTip=function(){Rt.setAttributes(this.bgRectangle,[["fill",this.bgColor],["rx","10px"]]),this.tip=Rt.createPolygon(this.getTipPoints(),[["fill",this.bgColor]]),this.visual.appendChild(this.tip)},Et.prototype.pointerDown=function(St,Mt){this.state==="new"&&Tt.prototype.pointerDown.call(this,St,Mt),this.state==="creating"?this.createTip():this.tipGrip.ownsTarget(Mt)?(this.manipulationStartLeft=this.left,this.manipulationStartTop=this.top,this.tipMoving=!0):Tt.prototype.pointerDown.call(this,St,Mt)},Et.prototype.pointerUp=function(St){if(this.tipMoving)this.tipMoving=!1,this.isMoved=!0,Tt.prototype.pointerUp.call(this,St);else{var Mt=this.state==="creating";Tt.prototype.pointerUp.call(this,St),this.setTipPoints(Mt),this.positionTip()}},Et.prototype.manipulate=function(St){if(this.tipMoving){var Mt=this.unrotatePoint(St);this.tipPosition={x:Mt.x-this.manipulationStartLeft,y:Mt.y-this.manipulationStartTop},this.positionTip()}else Tt.prototype.manipulate.call(this,St)},Et.prototype.setBgColor=function(St){this.bgRectangle&&this.tip&&(Rt.setAttributes(this.bgRectangle,[["fill",St]]),Rt.setAttributes(this.tip,[["fill",St]])),this.bgColor=St,this.fillColorChanged(St)},Et.prototype.getTipPoints=function(){return this.setTipPoints(this.state==="creating"),this.tipBase1Position.x+","+this.tipBase1Position.y+" "+this.tipBase2Position.x+","+this.tipBase2Position.y+" "+this.tipPosition.x+","+this.tipPosition.y},Et.prototype.setTipPoints=function(St){St===void 0&&(St=!1);var Mt=Math.min(this.height/2,15),zt=this.height/5;St&&(this.tipPosition={x:Mt+zt/2,y:this.height+20});var kt=Math.atan(this.height/2/(this.width/2));this.tipPosition.x<this.width/2&&this.tipPosition.y<this.height/2?kt<Math.atan((this.height/2-this.tipPosition.y)/(this.width/2-this.tipPosition.x))?(zt=this.width/5,Mt=Math.min(this.width/2,15),this.tipBase1Position={x:Mt,y:0},this.tipBase2Position={x:Mt+zt,y:0}):(this.tipBase1Position={x:0,y:Mt},this.tipBase2Position={x:0,y:Mt+zt}):this.tipPosition.x>=this.width/2&&this.tipPosition.y<this.height/2?kt<Math.atan((this.height/2-this.tipPosition.y)/(this.tipPosition.x-this.width/2))?(zt=this.width/5,Mt=Math.min(this.width/2,15),this.tipBase1Position={x:this.width-Mt-zt,y:0},this.tipBase2Position={x:this.width-Mt,y:0}):(this.tipBase1Position={x:this.width,y:Mt},this.tipBase2Position={x:this.width,y:Mt+zt}):this.tipPosition.x>=this.width/2&&this.tipPosition.y>=this.height/2?kt<Math.atan((this.tipPosition.y-this.height/2)/(this.tipPosition.x-this.width/2))?(zt=this.width/5,Mt=Math.min(this.width/2,15),this.tipBase1Position={x:this.width-Mt-zt,y:this.height},this.tipBase2Position={x:this.width-Mt,y:this.height}):(this.tipBase1Position={x:this.width,y:this.height-Mt-zt},this.tipBase2Position={x:this.width,y:this.height-Mt}):kt<Math.atan((this.tipPosition.y-this.height/2)/(this.width/2-this.tipPosition.x))?(zt=this.width/5,Mt=Math.min(this.width/2,15),this.tipBase1Position={x:Mt,y:this.height},this.tipBase2Position={x:Mt+zt,y:this.height}):(this.tipBase1Position={x:0,y:this.height-Mt},this.tipBase2Position={x:0,y:this.height-Mt-zt})},Et.prototype.resize=function(St){Tt.prototype.resize.call(this,St),this.positionTip()},Et.prototype.positionTip=function(){Rt.setAttributes(this.tip,[["points",this.getTipPoints()]]);var St=this.tipGrip.visual.transform.baseVal.getItem(0);St.setTranslate(this.tipPosition.x,this.tipPosition.y),this.tipGrip.visual.transform.baseVal.replaceItem(St,0)},Object.defineProperty(Et.prototype,"toolboxPanels",{get:function(){return[this.colorPanel,this.bgColorPanel,this.fontFamilyPanel]},enumerable:!1,configurable:!0}),Et.prototype.select=function(){this.positionTip(),Tt.prototype.select.call(this)},Et.prototype.getState=function(){var St=Object.assign({bgColor:this.bgColor,tipPosition:this.tipPosition},Tt.prototype.getState.call(this));return St.typeName=Et.typeName,St},Et.prototype.restoreState=function(St){var Mt=St;this.bgColor=Mt.bgColor,this.tipPosition=Mt.tipPosition,Tt.prototype.restoreState.call(this,St),this.createTip(),this.setTipPoints()},Et.prototype.scale=function(St,Mt){Tt.prototype.scale.call(this,St,Mt),this.tipPosition={x:this.tipPosition.x*St,y:this.tipPosition.y*Mt},this.positionTip()},Et.typeName="CalloutMarker",Et.title="Callout marker",Et.icon='<svg viewBox="0 0 24 24"><path d="M4 2h16a2 2 0 012 2v12a2 2 0 01-2 2h-4l-4 4-4-4H4a2 2 0 01-2-2V4a2 2 0 012-2m0 2v12h4.83L12 19.17 15.17 16H20V4H4m2 3h12v2H6V7m0 4h10v2H6v-2z"/></svg>',Et}(Re),We=function(Tt){function Et(St,Mt,zt){var kt=Tt.call(this,St,Mt,zt)||this;return kt.fillColor="transparent",kt.strokeColor="transparent",kt.strokeWidth=0,kt.strokeDasharray="",kt.opacity=1,kt.strokeColor=zt.defaultColor,kt.strokeWidth=zt.defaultStrokeWidth,kt.strokeDasharray=zt.defaultStrokeDasharray,kt.fillColor=zt.defaultFillColor,kt.setStrokeColor=kt.setStrokeColor.bind(kt),kt.setFillColor=kt.setFillColor.bind(kt),kt.setStrokeWidth=kt.setStrokeWidth.bind(kt),kt.setStrokeDasharray=kt.setStrokeDasharray.bind(kt),kt.setOpacity=kt.setOpacity.bind(kt),kt.createVisual=kt.createVisual.bind(kt),kt.strokePanel=new et("Line color",Se(zt.defaultColorSet,["transparent"]),zt.defaultColor),kt.strokePanel.onColorChanged=kt.setStrokeColor,kt.fillPanel=new et("Fill color",Se(zt.defaultColorSet,["transparent"]),kt.fillColor,jt),kt.fillPanel.onColorChanged=kt.setFillColor,kt.strokeWidthPanel=new Ot("Line width",zt.defaultStrokeWidths,zt.defaultStrokeWidth),kt.strokeWidthPanel.onWidthChanged=kt.setStrokeWidth,kt.strokeStylePanel=new Ht("Line style",zt.defaultStrokeDasharrays,zt.defaultStrokeDasharray),kt.strokeStylePanel.onStyleChanged=kt.setStrokeDasharray,kt.opacityPanel=new un("Opacity",zt.defaultOpacitySteps,kt.opacity),kt.opacityPanel.onOpacityChanged=kt.setOpacity,kt}return se(Et,Tt),Et.prototype.ownsTarget=function(St){return!(!Tt.prototype.ownsTarget.call(this,St)&&St!==this.visual)},Et.prototype.createVisual=function(){this.visual=Rt.createEllipse(this.width/2,this.height/2,[["fill",this.fillColor],["stroke",this.strokeColor],["stroke-width",this.strokeWidth.toString()],["stroke-dasharray",this.strokeDasharray],["opacity",this.opacity.toString()]]),this.addMarkerVisualToContainer(this.visual)},Et.prototype.pointerDown=function(St,Mt){Tt.prototype.pointerDown.call(this,St,Mt),this.state==="new"&&(this.createVisual(),this.moveVisual(St),this._state="creating")},Et.prototype.manipulate=function(St){Tt.prototype.manipulate.call(this,St)},Et.prototype.resize=function(St){Tt.prototype.resize.call(this,St),this.setSize()},Et.prototype.setSize=function(){Tt.prototype.setSize.call(this),Rt.setAttributes(this.visual,[["cx",(this.width/2).toString()],["cy",(this.height/2).toString()],["rx",(this.width/2).toString()],["ry",(this.height/2).toString()]])},Et.prototype.pointerUp=function(St){Tt.prototype.pointerUp.call(this,St),this.setSize()},Et.prototype.setStrokeColor=function(St){this.strokeColor=St,this.visual&&Rt.setAttributes(this.visual,[["stroke",this.strokeColor]]),this.colorChanged(St),this.stateChanged()},Et.prototype.setFillColor=function(St){this.fillColor=St,this.visual&&Rt.setAttributes(this.visual,[["fill",this.fillColor]]),this.fillColorChanged(St),this.stateChanged()},Et.prototype.setStrokeWidth=function(St){this.strokeWidth=St,this.visual&&Rt.setAttributes(this.visual,[["stroke-width",this.strokeWidth.toString()]]),this.stateChanged()},Et.prototype.setStrokeDasharray=function(St){this.strokeDasharray=St,this.visual&&Rt.setAttributes(this.visual,[["stroke-dasharray",this.strokeDasharray]]),this.stateChanged()},Et.prototype.setOpacity=function(St){this.opacity=St,this.visual&&Rt.setAttributes(this.visual,[["opacity",this.opacity.toString()]]),this.stateChanged()},Object.defineProperty(Et.prototype,"toolboxPanels",{get:function(){return[this.strokePanel,this.fillPanel,this.strokeWidthPanel,this.strokeStylePanel,this.opacityPanel]},enumerable:!1,configurable:!0}),Et.prototype.getState=function(){var St=Object.assign({fillColor:this.fillColor,strokeColor:this.strokeColor,strokeWidth:this.strokeWidth,strokeDasharray:this.strokeDasharray,opacity:this.opacity},Tt.prototype.getState.call(this));return St.typeName=Et.typeName,St},Et.prototype.restoreState=function(St){var Mt=St;this.fillColor=Mt.fillColor,this.strokeColor=Mt.strokeColor,this.strokeWidth=Mt.strokeWidth,this.strokeDasharray=Mt.strokeDasharray,this.opacity=Mt.opacity,this.createVisual(),Tt.prototype.restoreState.call(this,St),this.setSize()},Et.prototype.scale=function(St,Mt){Tt.prototype.scale.call(this,St,Mt),this.setSize()},Et.typeName="EllipseMarker",Et.title="Ellipse marker",Et.icon='<svg viewBox="0 0 24 24"><path d="M12 4C6.5 4 2 7.58 2 12s4.5 8 10 8 10-3.58 10-8-4.5-8-10-8z"/></svg>',Et}(xt),Pn=function(Tt){function Et(St,Mt,zt){return Tt.call(this,St,Mt,zt)||this}return se(Et,Tt),Object.defineProperty(Et.prototype,"tipLength",{get:function(){return 10+3*this.strokeWidth},enumerable:!1,configurable:!0}),Et.prototype.ownsTarget=function(St){return!(!Tt.prototype.ownsTarget.call(this,St)&&St!==this.tip1&&St!==this.tip2)},Et.prototype.createTips=function(){this.tip1=Rt.createLine(this.x1-this.tipLength/2,this.y1,this.x1+this.tipLength/2,this.y1,[["stroke",this.strokeColor],["stroke-width",this.strokeWidth.toString()]]),this.tip1.transform.baseVal.appendItem(Rt.createTransform()),this.visual.appendChild(this.tip1),this.tip2=Rt.createLine(this.x2-this.tipLength/2,this.y2,this.x2+this.tipLength/2,this.y2,[["stroke",this.strokeColor],["stroke-width",this.strokeWidth.toString()]]),this.tip2.transform.baseVal.appendItem(Rt.createTransform()),this.visual.appendChild(this.tip2)},Et.prototype.pointerDown=function(St,Mt){Tt.prototype.pointerDown.call(this,St,Mt),this.state==="creating"&&this.createTips()},Et.prototype.adjustVisual=function(){if(Tt.prototype.adjustVisual.call(this),this.tip1&&this.tip2&&(Rt.setAttributes(this.tip1,[["x1",(this.x1-this.tipLength/2).toString()],["y1",this.y1.toString()],["x2",(this.x1+this.tipLength/2).toString()],["y2",this.y1.toString()],["stroke",this.strokeColor],["stroke-width",this.strokeWidth.toString()]]),Rt.setAttributes(this.tip2,[["x1",(this.x2-this.tipLength/2).toString()],["y1",this.y2.toString()],["x2",(this.x2+this.tipLength/2).toString()],["y2",this.y2.toString()],["stroke",this.strokeColor],["stroke-width",this.strokeWidth.toString()]]),Math.abs(this.x1-this.x2)>.1)){var St=180*Math.atan((this.y2-this.y1)/(this.x2-this.x1))/Math.PI+90*Math.sign(this.x1-this.x2),Mt=this.tip1.transform.baseVal.getItem(0);Mt.setRotate(St,this.x1,this.y1),this.tip1.transform.baseVal.replaceItem(Mt,0);var zt=this.tip2.transform.baseVal.getItem(0);zt.setRotate(St+180,this.x2,this.y2),this.tip2.transform.baseVal.replaceItem(zt,0)}},Object.defineProperty(Et.prototype,"toolboxPanels",{get:function(){return[this.strokePanel,this.strokeWidthPanel,this.strokeStylePanel]},enumerable:!1,configurable:!0}),Et.prototype.getState=function(){var St=Tt.prototype.getState.call(this);return St.typeName=Et.typeName,St},Et.prototype.restoreState=function(St){Tt.prototype.restoreState.call(this,St),this.createTips(),this.adjustVisual()},Et.typeName="MeasurementMarker",Et.title="Measurement marker",Et.icon='<svg viewBox="0 0 24 24"><path d="M1.39 18.36l1.77-1.76L4.58 18l1.06-1.05-1.42-1.41 1.42-1.42 2.47 2.48 1.06-1.06-2.47-2.48 1.41-1.41 1.42 1.41L10.59 12l-1.42-1.41 1.42-1.42 2.47 2.48 1.06-1.06-2.47-2.48 1.41-1.41 1.41 1.41 1.07-1.06-1.42-1.41 1.42-1.42L18 6.7l1.07-1.06-2.47-2.48 1.76-1.77 4.25 4.25L5.64 22.61l-4.25-4.25z"/></svg>',Et}(ve),ke=function(Tt){function Et(St,Mt,zt){var kt=Tt.call(this,St,Mt,zt)||this;return kt.strokePanel.colors=zt.defaultColorSet,kt.fillColor="transparent",kt}return se(Et,Tt),Object.defineProperty(Et.prototype,"toolboxPanels",{get:function(){return[this.strokePanel,this.strokeWidthPanel,this.strokeStylePanel]},enumerable:!1,configurable:!0}),Et.prototype.getState=function(){var St=Tt.prototype.getState.call(this);return St.typeName=Et.typeName,St},Et.typeName="EllipseFrameMarker",Et.title="Ellipse frame marker",Et.icon='<svg viewBox="0 0 24 24"><path d="M12 6c4.41 0 8 2.69 8 6s-3.59 6-8 6-8-2.69-8-6 3.59-6 8-6m0-2C6.5 4 2 7.58 2 12s4.5 8 10 8 10-3.58 10-8-4.5-8-10-8z"/></svg>',Et}(We),tn=function(){function Tt(){this.undoStack=[],this.redoStack=[]}return Object.defineProperty(Tt.prototype,"isUndoPossible",{get:function(){return this.undoStack.length>0},enumerable:!1,configurable:!0}),Object.defineProperty(Tt.prototype,"isRedoPossible",{get:function(){return this.redoStack.length>0},enumerable:!1,configurable:!0}),Object.defineProperty(Tt.prototype,"undoStepCount",{get:function(){return this.undoStack.length},enumerable:!1,configurable:!0}),Object.defineProperty(Tt.prototype,"redoStepCount",{get:function(){return this.redoStack.length},enumerable:!1,configurable:!0}),Tt.prototype.addUndoStep=function(Et){this.undoStack.length!==0&&JSON.stringify(this.undoStack[this.undoStack.length-1])===JSON.stringify(Et)||(this.undoStack.push(Et),JSON.stringify(this.lastRedoStep)!==JSON.stringify(Et)&&this.redoStack.splice(0,this.redoStack.length))},Tt.prototype.replaceLastUndoStep=function(Et){this.undoStack.length>0&&(this.undoStack[this.undoStack.length-1]=Et)},Tt.prototype.getLastUndoStep=function(){return this.undoStack.length>0?this.undoStack[this.undoStack.length-1]:void 0},Tt.prototype.undo=function(){if(this.undoStack.length>1){var Et=this.undoStack.pop();return Et!==void 0&&this.redoStack.push(Et),this.undoStack.length>0?this.undoStack[this.undoStack.length-1]:void 0}},Tt.prototype.redo=function(){return this.lastRedoStep=this.redoStack.pop(),this.lastRedoStep},Tt}(),fn=function(Tt){function Et(St,Mt,zt){var kt=Tt.call(this,St,Mt,zt)||this;return kt.strokeColor="transparent",kt.strokeWidth=0,kt.strokeDasharray="",kt.curveX=0,kt.curveY=0,kt.manipulationStartCurveX=0,kt.manipulationStartCurveY=0,kt.setStrokeColor=kt.setStrokeColor.bind(kt),kt.setStrokeWidth=kt.setStrokeWidth.bind(kt),kt.setStrokeDasharray=kt.setStrokeDasharray.bind(kt),kt.positionGrips=kt.positionGrips.bind(kt),kt.addControlGrips=kt.addControlGrips.bind(kt),kt.adjustVisual=kt.adjustVisual.bind(kt),kt.setupControlBox=kt.setupControlBox.bind(kt),kt.resize=kt.resize.bind(kt),kt.strokeColor=zt.defaultColor,kt.strokeWidth=zt.defaultStrokeWidth,kt.strokeDasharray=zt.defaultStrokeDasharray,kt.strokePanel=new et("Line color",zt.defaultColorSet,zt.defaultColor),kt.strokePanel.onColorChanged=kt.setStrokeColor,kt.strokeWidthPanel=new Ot("Line width",zt.defaultStrokeWidths,zt.defaultStrokeWidth),kt.strokeWidthPanel.onWidthChanged=kt.setStrokeWidth,kt.strokeStylePanel=new Ht("Line style",zt.defaultStrokeDasharrays,zt.defaultStrokeDasharray),kt.strokeStylePanel.onStyleChanged=kt.setStrokeDasharray,kt}return se(Et,Tt),Et.prototype.ownsTarget=function(St){return!(!Tt.prototype.ownsTarget.call(this,St)&&St!==this.visual&&St!==this.selectorCurve&&St!==this.visibleCurve&&!this.curveGrip.ownsTarget(St))},Et.prototype.getPathD=function(){return"M "+this.x1+" "+this.y1+" Q "+this.curveX+" "+this.curveY+", "+this.x2+" "+this.y2},Et.prototype.createVisual=function(){this.visual=Rt.createGroup(),this.selectorCurve=Rt.createPath(this.getPathD(),[["stroke","transparent"],["stroke-width",(this.strokeWidth+10).toString()],["fill","transparent"]]),this.visibleCurve=Rt.createPath(this.getPathD(),[["stroke",this.strokeColor],["stroke-width",this.strokeWidth.toString()],["fill","transparent"]]),this.visual.appendChild(this.selectorCurve),this.visual.appendChild(this.visibleCurve),this.addMarkerVisualToContainer(this.visual)},Et.prototype.pointerDown=function(St,Mt){Tt.prototype.pointerDown.call(this,St,Mt),this.manipulationStartCurveX=this.curveX,this.manipulationStartCurveY=this.curveY,this.state==="new"&&(this.curveX=St.x,this.curveY=St.y),this.state==="new"?(this.createVisual(),this.adjustVisual(),this._state="creating"):this.curveGrip.ownsTarget(Mt)&&(this.activeGrip=this.curveGrip,this._state="resize")},Et.prototype.adjustVisual=function(){this.selectorCurve&&this.visibleCurve&&(this.selectorCurve.setAttribute("d",this.getPathD()),this.visibleCurve.setAttribute("d",this.getPathD()),Rt.setAttributes(this.visibleCurve,[["stroke",this.strokeColor]]),Rt.setAttributes(this.visibleCurve,[["stroke-width",this.strokeWidth.toString()]]),Rt.setAttributes(this.visibleCurve,[["stroke-dasharray",this.strokeDasharray.toString()]]))},Et.prototype.setupControlBox=function(){Tt.prototype.setupControlBox.call(this),this.curveControlLine1=Rt.createLine(this.x1,this.y1,this.curveX,this.curveY,[["stroke","black"],["stroke-width","1"],["stroke-opacity","0.5"],["stroke-dasharray","3, 2"]]),this.curveControlLine2=Rt.createLine(this.x2,this.y2,this.curveX,this.curveY,[["stroke","black"],["stroke-width","1"],["stroke-opacity","0.5"],["stroke-dasharray","3, 2"]]),this.controlBox.insertBefore(this.curveControlLine1,this.controlBox.firstChild),this.controlBox.insertBefore(this.curveControlLine2,this.controlBox.firstChild)},Et.prototype.addControlGrips=function(){this.curveGrip=this.createGrip(),this.curveX=0,this.curveY=0,Tt.prototype.addControlGrips.call(this)},Et.prototype.positionGrips=function(){Tt.prototype.positionGrips.call(this);var St=this.curveGrip.GRIP_SIZE;this.positionGrip(this.curveGrip.visual,this.curveX-St/2,this.curveY-St/2),this.curveControlLine1&&this.curveControlLine2&&(this.curveControlLine1.setAttribute("x1",this.x1.toString()),this.curveControlLine1.setAttribute("y1",this.y1.toString()),this.curveControlLine1.setAttribute("x2",this.curveX.toString()),this.curveControlLine1.setAttribute("y2",this.curveY.toString()),this.curveControlLine2.setAttribute("x1",this.x2.toString()),this.curveControlLine2.setAttribute("y1",this.y2.toString()),this.curveControlLine2.setAttribute("x2",this.curveX.toString()),this.curveControlLine2.setAttribute("y2",this.curveY.toString()))},Et.prototype.manipulate=function(St){this.state==="move"&&(this.curveX=this.manipulationStartCurveX+St.x-this.manipulationStartX,this.curveY=this.manipulationStartCurveY+St.y-this.manipulationStartY),Tt.prototype.manipulate.call(this,St)},Et.prototype.resize=function(St){this.activeGrip===this.curveGrip&&(this.curveX=St.x,this.curveY=St.y),Tt.prototype.resize.call(this,St),this.state==="creating"&&(this.curveX=this.x1+(this.x2-this.x1)/2,this.curveY=this.y1+(this.y2-this.y1)/2)},Et.prototype.setStrokeColor=function(St){this.strokeColor=St,this.adjustVisual(),this.colorChanged(St)},Et.prototype.setStrokeWidth=function(St){this.strokeWidth=St,this.adjustVisual()},Et.prototype.setStrokeDasharray=function(St){this.strokeDasharray=St,this.adjustVisual()},Et.prototype.scale=function(St,Mt){this.curveX=this.curveX*St,this.curveY=this.curveY*Mt,Tt.prototype.scale.call(this,St,Mt)},Object.defineProperty(Et.prototype,"toolboxPanels",{get:function(){return[this.strokePanel,this.strokeWidthPanel,this.strokeStylePanel]},enumerable:!1,configurable:!0}),Et.prototype.getState=function(){var St=Object.assign({strokeColor:this.strokeColor,strokeWidth:this.strokeWidth,strokeDasharray:this.strokeDasharray,curveX:this.curveX,curveY:this.curveY},Tt.prototype.getState.call(this));return St.typeName=Et.typeName,St},Et.prototype.restoreState=function(St){Tt.prototype.restoreState.call(this,St);var Mt=St;this.strokeColor=Mt.strokeColor,this.strokeWidth=Mt.strokeWidth,this.strokeDasharray=Mt.strokeDasharray,this.curveX=Mt.curveX,this.curveY=Mt.curveY,this.createVisual(),this.adjustVisual()},Et.typeName="CurveMarker",Et.title="Curve marker",Et.icon='<svg viewBox="0 0 24 24"><path d="M18.5 2A1.5 1.5 0 0120 3.5 1.5 1.5 0 0118.5 5c-.23 0-.45-.05-.65-.15l-3.69 3.7.34.45c2.19-1.26 4.76-2 7.5-2l1 .03v2.01L22 9c-2.58 0-5 .75-7 2.04A3.96 3.96 0 0111.04 15C9.75 17 9 19.42 9 22l.04 1H7.03L7 22c0-2.74.74-5.31 2-7.5l-.45-.34-3.7 3.69c.1.2.15.42.15.65A1.5 1.5 0 013.5 20 1.5 1.5 0 012 18.5 1.5 1.5 0 013.5 17c.23 0 .45.05.65.15l3.69-3.7C7.31 12.78 7 11.92 7 11a4 4 0 014-4c.92 0 1.78.31 2.45.84l3.7-3.69c-.1-.2-.15-.42-.15-.65A1.5 1.5 0 0118.5 2M11 9a2 2 0 00-2 2 2 2 0 002 2 2 2 0 002-2 2 2 0 00-2-2z"/></svg>',Et}(Xt),Jn=function(Tt){function Et(St,Mt,zt){var kt=Tt.call(this,St,Mt,zt)||this;return kt.fillColor="transparent",kt.strokeColor="transparent",kt.strokeWidth=0,kt.strokeDasharray="",kt.textColor="transparent",kt.fontSize="1rem",kt.isMoved=!1,kt.captionText="Caption",kt.PADDING=5,kt.captionBoxWidth=0,kt.captionBoxHeight=0,kt.strokeColor=zt.defaultColor,kt.strokeWidth=zt.defaultStrokeWidth,kt.strokeDasharray=zt.defaultStrokeDasharray,kt.fillColor=zt.defaultFillColor,kt.textColor=zt.defaultStrokeColor,kt.fontFamily=zt.defaultFontFamily,kt.fontSize=zt.defaultCaptionFontSize,kt.captionText=zt.defaultCaptionText,kt.setStrokeColor=kt.setStrokeColor.bind(kt),kt.setFillColor=kt.setFillColor.bind(kt),kt.setStrokeWidth=kt.setStrokeWidth.bind(kt),kt.setStrokeDasharray=kt.setStrokeDasharray.bind(kt),kt.createVisual=kt.createVisual.bind(kt),kt.sizeCaption=kt.sizeCaption.bind(kt),kt.setCaptionText=kt.setCaptionText.bind(kt),kt.showTextEditor=kt.showTextEditor.bind(kt),kt.positionTextEditor=kt.positionTextEditor.bind(kt),kt.finishTextEditing=kt.finishTextEditing.bind(kt),kt.setFont=kt.setFont.bind(kt),kt.setTextColor=kt.setTextColor.bind(kt),kt.strokePanel=new et("Line color",Se(zt.defaultColorSet,["transparent"]),kt.strokeColor),kt.strokePanel.onColorChanged=kt.setStrokeColor,kt.fillPanel=new et("Fill color",Se(zt.defaultColorSet,["transparent"]),kt.fillColor,jt),kt.fillPanel.onColorChanged=kt.setFillColor,kt.strokeWidthPanel=new Ot("Line width",zt.defaultStrokeWidths,zt.defaultStrokeWidth),kt.strokeWidthPanel.onWidthChanged=kt.setStrokeWidth,kt.strokeStylePanel=new Ht("Line style",zt.defaultStrokeDasharrays,zt.defaultStrokeDasharray),kt.strokeStylePanel.onStyleChanged=kt.setStrokeDasharray,kt.fontFamilyPanel=new oe("Font",zt.defaultFontFamilies,zt.defaultFontFamily),kt.fontFamilyPanel.onFontChanged=kt.setFont,kt.textColorPanel=new et("Text color",zt.defaultColorSet,kt.textColor,ne),kt.textColorPanel.onColorChanged=kt.setTextColor,kt}return se(Et,Tt),Et.prototype.ownsTarget=function(St){return!(!Tt.prototype.ownsTarget.call(this,St)&&St!==this.visual&&St!==this.frame&&St!==this.captionBg&&St!==this.captionElement)},Et.prototype.createVisual=function(){this.visual=Rt.createGroup(),this.addMarkerVisualToContainer(this.visual),this.captionBg=Rt.createRect(1,1,[["fill",this.fillColor]]),this.visual.appendChild(this.captionBg),this.captionElement=Rt.createText([["fill",this.textColor],["font-family",this.fontFamily]]),this.captionElement.style.fontSize=this.fontSize,this.captionElement.style.textAnchor="start",this.captionElement.style.dominantBaseline="text-before-edge",this.captionElement.textContent=this.captionText,this.visual.appendChild(this.captionElement),this.frame=Rt.createRect(this.width,this.height,[["fill","transparent"],["stroke",this.strokeColor],["stroke-width",this.strokeWidth.toString()],["stroke-dasharray",this.strokeDasharray]]),this.visual.appendChild(this.frame),this.sizeCaption()},Et.prototype.setCaptionText=function(St){this.captionText=St,this.captionElement.textContent=this.captionText,this.sizeCaption()},Et.prototype.pointerDown=function(St,Mt){Tt.prototype.pointerDown.call(this,St,Mt),this.isMoved=!1,this.pointerDownPoint=St,this.pointerDownTimestamp=Date.now(),this.state==="new"&&(this.createVisual(),this.moveVisual(St),this._state="creating")},Et.prototype.manipulate=function(St){Tt.prototype.manipulate.call(this,St),this.pointerDownPoint!==void 0&&(this.isMoved=Math.abs(St.x-this.pointerDownPoint.x)>5||Math.abs(St.y-this.pointerDownPoint.y)>5)},Et.prototype.resize=function(St){Tt.prototype.resize.call(this,St),this.setSize()},Et.prototype.sizeCaption=function(){var St=this.captionElement.getBBox();this.captionText.trim()!==""?(this.captionBoxWidth=St.width+2*this.PADDING,this.captionBoxHeight=St.height+2*this.PADDING):(this.captionBoxWidth=0,this.captionBoxHeight=0),Rt.setAttributes(this.captionBg,[["width",this.captionBoxWidth.toString()],["height",this.captionBoxHeight.toString()],["clip-path","path('M0,0 H"+this.width+" V"+this.height+" H"+-this.width+" Z')"]]),Rt.setAttributes(this.captionElement,[["x",this.PADDING.toString()],["y",this.PADDING.toString()],["clip-path","path('M0,0 H"+(this.width-this.PADDING)+" V"+this.height+" H"+(-this.width-this.PADDING)+" Z')"]])},Et.prototype.showTextEditor=function(){var St=this;this._state="edit",this.overlayContainer.innerHTML="",this.textEditDiv=document.createElement("div"),this.textEditDiv.style.flexGrow="2",this.textEditDiv.style.alignItems="center",this.textEditDiv.style.justifyContent="center",this.textEditDiv.style.pointerEvents="auto",this.textEditDiv.style.overflow="hidden",this.textEditBox=document.createElement("input"),this.textEditBox.style.position="absolute",this.textEditBox.style.width=this.width+"px",this.captionBoxHeight>0&&(this.textEditBox.style.height=this.captionBoxHeight+"px"),this.textEditBox.style.fontSize=this.fontSize,this.textEditBox.style.fontFamily=this.fontFamily,this.textEditBox.style.backgroundColor=this.fillColor,this.textEditBox.style.color=this.textColor,this.textEditBox.style.borderWidth="0",this.textEditBox.setAttribute("value",this.captionText),this.textEditBox.select(),this.textEditDiv.appendChild(this.textEditBox),this.overlayContainer.appendChild(this.textEditDiv),this.textEditBox.addEventListener("pointerup",function(Mt){Mt.stopPropagation()}),this.textEditBox.addEventListener("keypress",function(Mt){Mt.key==="Enter"&&St.finishTextEditing(St.textEditBox.value)}),this.textEditBox.addEventListener("keyup",function(Mt){Mt.cancelBubble=!0}),this.textEditBox.addEventListener("blur",function(){St.finishTextEditing(St.textEditBox.value)}),this.textEditDiv.addEventListener("pointerup",function(){St.finishTextEditing(St.textEditBox.value)}),this.positionTextEditor(),this.textEditBox.focus()},Et.prototype.positionTextEditor=function(){this.state==="edit"&&(this.textEditBox===void 0?this.showTextEditor():(this.textEditBox.style.left=this.left+"px",this.textEditBox.style.top=this.top+"px",this.textEditBox.style.transform="rotate("+this.rotationAngle+"deg)",this.textEditBox.style.transformOrigin=this.width/2+"px "+this.height/2+"px"))},Et.prototype.finishTextEditing=function(St){this.setCaptionText(St.trim()),this.overlayContainer.innerHTML="",this.stateChanged()},Et.prototype.setFont=function(St){this.captionElement&&Rt.setAttributes(this.captionElement,[["font-family",St]]),this.fontFamily=St,this.textEditBox&&(this.textEditBox.style.fontFamily=this.fontFamily),this.sizeCaption(),this.stateChanged()},Et.prototype.setTextColor=function(St){this.captionElement&&Rt.setAttributes(this.captionElement,[["fill",St]]),this.textColor=St,this.textEditBox&&(this.textEditBox.style.color=this.textColor),this.stateChanged()},Et.prototype.setSize=function(){Tt.prototype.setSize.call(this),Rt.setAttributes(this.frame,[["width",this.width.toString()],["height",this.height.toString()]]),this.sizeCaption()},Et.prototype.pointerUp=function(St){Tt.prototype.pointerUp.call(this,St),this.setSize(),!this.isMoved&&Date.now()-this.pointerDownTimestamp>500&&this.showTextEditor(),this.pointerDownPoint=void 0},Et.prototype.dblClick=function(St,Mt){Tt.prototype.dblClick.call(this,St,Mt),this.showTextEditor()},Et.prototype.setStrokeColor=function(St){this.strokeColor=St,this.frame&&Rt.setAttributes(this.frame,[["stroke",this.strokeColor]]),this.colorChanged(St),this.stateChanged()},Et.prototype.setFillColor=function(St){this.fillColor=St,this.captionBg&&Rt.setAttributes(this.captionBg,[["fill",this.fillColor]]),this.fillColorChanged(St),this.stateChanged()},Et.prototype.setStrokeWidth=function(St){this.strokeWidth=St,this.frame&&Rt.setAttributes(this.frame,[["stroke-width",this.strokeWidth.toString()]]),this.stateChanged()},Et.prototype.setStrokeDasharray=function(St){this.strokeDasharray=St,this.frame&&Rt.setAttributes(this.frame,[["stroke-dasharray",this.strokeDasharray]]),this.stateChanged()},Object.defineProperty(Et.prototype,"toolboxPanels",{get:function(){return[this.strokePanel,this.fillPanel,this.strokeWidthPanel,this.strokeStylePanel,this.fontFamilyPanel,this.textColorPanel]},enumerable:!1,configurable:!0}),Et.prototype.getState=function(){var St=Object.assign({fillColor:this.fillColor,strokeColor:this.strokeColor,strokeWidth:this.strokeWidth,strokeDasharray:this.strokeDasharray,opacity:1,textColor:this.textColor,fontFamily:this.fontFamily,fontSize:this.fontSize,captionText:this.captionText},Tt.prototype.getState.call(this));return St.typeName=this.typeName,St},Et.prototype.restoreState=function(St){var Mt=St;this.fillColor=Mt.fillColor,this.strokeColor=Mt.strokeColor,this.strokeWidth=Mt.strokeWidth,this.strokeDasharray=Mt.strokeDasharray,this.textColor=Mt.textColor,this.fontFamily=Mt.fontFamily,this.captionText=Mt.captionText,this.fontSize=Mt.fontSize,this.createVisual(),Tt.prototype.restoreState.call(this,St),this.setSize()},Et.prototype.scale=function(St,Mt){Tt.prototype.scale.call(this,St,Mt),this.setSize()},Et.typeName="CaptionFrameMarker",Et.title="Caption frame marker",Et.icon='<svg viewBox="0 0 24 24"><path d="M5 3c-1.11 0-2 .89-2 2v14c0 1.11.89 2 2 2h14c1.11 0 2-.89 2-2V5c0-1.11-.89-2-2-2H5m0 2h14v14H5V5m2 2v2h10V7H7z"/></svg>',Et}(xt),Pe=function(){function Tt(Et,St){St===void 0&&(St=!1),this.cancelable=!1,this._defaultPrevented=!1,this.markerArea=Et,this.cancelable=St}return Object.defineProperty(Tt.prototype,"defaultPrevented",{get:function(){return this._defaultPrevented},enumerable:!1,configurable:!0}),Tt.prototype.preventDefault=function(){this._defaultPrevented=!0},Tt}(),an=function(Tt){function Et(St,Mt,zt){var kt=Tt.call(this,St,!1)||this;return kt.dataUrl=Mt,kt.state=zt,kt}return se(Et,Tt),Et}(Pe),re=function(Tt){function Et(St,Mt,zt){zt===void 0&&(zt=!1);var kt=Tt.call(this,St,zt)||this;return kt.marker=Mt,kt}return se(Et,Tt),Et}(Pe),hn=function(){function Tt(){this.render=[],this.beforeclose=[],this.close=[],this.show=[],this.restorestate=[],this.statechange=[],this.markerselect=[],this.markerdeselect=[],this.markercreating=[],this.markercreate=[],this.markerbeforedelete=[],this.markerdelete=[],this.markerchange=[],this.focus=[],this.blur=[]}return Tt.prototype.addEventListener=function(Et,St){this[Et].push(St)},Tt.prototype.removeEventListener=function(Et,St){var Mt=this[Et].indexOf(St);Mt>-1&&this[Et].splice(Mt,1)},Tt}(),di=function(){function Tt(Et){this.touchPoints=0,this._availableMarkerTypes=this.DEFAULT_MARKER_TYPES,this.mode="select",this.markers=[],this.isDragging=!1,this.renderEventListeners=[],this.closeEventListeners=[],this.settings=new _t,this._isOpen=!1,this.undoRedoManager=new tn,this.renderAtNaturalSize=!1,this.renderImageType="image/png",this.renderMarkersOnly=!1,this.zoomSteps=[1,1.5,2,4],this._zoomLevel=1,this._isResizing=!1,this.prevPanPoint={x:0,y:0},this.eventListeners=new hn,this._silentRenderMode=!1,this._isFocused=!1,this._instanceNo=Tt.instanceCounter++,this.styles=new Vt(this.instanceNo),this.uiStyleSettings=this.styles.settings,this.target=Et,this.targetRoot=document.body,this.width=Et.clientWidth,this.height=Et.clientHeight,this.styles.removeStyleSheet(),this.open=this.open.bind(this),this.setTopLeft=this.setTopLeft.bind(this),this.toolbarButtonClicked=this.toolbarButtonClicked.bind(this),this.createNewMarker=this.createNewMarker.bind(this),this.addNewMarker=this.addNewMarker.bind(this),this.markerCreated=this.markerCreated.bind(this),this.setCurrentMarker=this.setCurrentMarker.bind(this),this.onPointerDown=this.onPointerDown.bind(this),this.onDblClick=this.onDblClick.bind(this),this.onPointerMove=this.onPointerMove.bind(this),this.onPointerUp=this.onPointerUp.bind(this),this.onPointerOut=this.onPointerOut.bind(this),this.onKeyUp=this.onKeyUp.bind(this),this.overrideOverflow=this.overrideOverflow.bind(this),this.restoreOverflow=this.restoreOverflow.bind(this),this.close=this.close.bind(this),this.closeUI=this.closeUI.bind(this),this.addCloseEventListener=this.addCloseEventListener.bind(this),this.removeCloseEventListener=this.removeCloseEventListener.bind(this),this.addRenderEventListener=this.addRenderEventListener.bind(this),this.removeRenderEventListener=this.removeRenderEventListener.bind(this),this.clientToLocalCoordinates=this.clientToLocalCoordinates.bind(this),this.onWindowResize=this.onWindowResize.bind(this),this.deleteSelectedMarker=this.deleteSelectedMarker.bind(this),this.setWindowHeight=this.setWindowHeight.bind(this),this.removeMarker=this.removeMarker.bind(this),this.colorChanged=this.colorChanged.bind(this),this.fillColorChanged=this.fillColorChanged.bind(this),this.onPopupTargetResize=this.onPopupTargetResize.bind(this),this.showNotesEditor=this.showNotesEditor.bind(this),this.hideNotesEditor=this.hideNotesEditor.bind(this),this.stepZoom=this.stepZoom.bind(this),this.focus=this.focus.bind(this),this.blur=this.blur.bind(this),this.markerStateChanged=this.markerStateChanged.bind(this),this.switchToSelectMode=this.switchToSelectMode.bind(this),this.addDefs=this.addDefs.bind(this),this.addDefsToImage=this.addDefsToImage.bind(this)}return Object.defineProperty(Tt.prototype,"ALL_MARKER_TYPES",{get:function(){return[te,Ye,Rn,Re,ke,We,vn,Fe,Pn,wn,ve,fn,Jn]},enumerable:!1,configurable:!0}),Object.defineProperty(Tt.prototype,"DEFAULT_MARKER_TYPES",{get:function(){return[te,Ye,Rn,Re,We,vn,Fe]},enumerable:!1,configurable:!0}),Object.defineProperty(Tt.prototype,"BASIC_MARKER_TYPES",{get:function(){return[te,Ye,Rn,Re,vn]},enumerable:!1,configurable:!0}),Object.defineProperty(Tt.prototype,"availableMarkerTypes",{get:function(){return this._availableMarkerTypes},set:function(Et){var St=this;this._availableMarkerTypes.splice(0),Et.forEach(function(Mt){if(typeof Mt=="string"){var zt=St.ALL_MARKER_TYPES.find(function(kt){return kt.typeName===Mt});zt!==void 0&&St._availableMarkerTypes.push(zt)}else St._availableMarkerTypes.push(Mt)})},enumerable:!1,configurable:!0}),Object.defineProperty(Tt.prototype,"currentMarker",{get:function(){return this._currentMarker},enumerable:!1,configurable:!0}),Object.defineProperty(Tt.prototype,"isOpen",{get:function(){return this._isOpen},enumerable:!1,configurable:!0}),Object.defineProperty(Tt.prototype,"isUndoPossible",{get:function(){return!(!this.undoRedoManager||!this.undoRedoManager.isUndoPossible)},enumerable:!1,configurable:!0}),Object.defineProperty(Tt.prototype,"isRedoPossible",{get:function(){return!(!this.undoRedoManager||!this.undoRedoManager.isRedoPossible)},enumerable:!1,configurable:!0}),Object.defineProperty(Tt.prototype,"zoomLevel",{get:function(){return this._zoomLevel},set:function(Et){this._zoomLevel=Et,this.editorCanvas&&this.contentDiv&&(this.editorCanvas.style.transform="scale("+this._zoomLevel+")",this.contentDiv.scrollTo({left:(this.editorCanvas.clientWidth*this._zoomLevel-this.contentDiv.clientWidth)/2,top:(this.editorCanvas.clientHeight*this._zoomLevel-this.contentDiv.clientHeight)/2}))},enumerable:!1,configurable:!0}),Object.defineProperty(Tt.prototype,"instanceNo",{get:function(){return this._instanceNo},enumerable:!1,configurable:!0}),Tt.prototype.open=function(){this.setupResizeObserver(),this.setEditingTarget(),this.setTopLeft(),this.initMarkerCanvas(),this.initOverlay(),this.attachEvents(),this.settings.displayMode==="popup"&&this.onPopupTargetResize(),ie.isLicensed||this.addLogo(),this._isOpen=!0,this._isFocused=!0},Tt.prototype.show=function(){var Et=this;this.styles.styleSheetRoot===void 0&&ce.styleSheetRoot!==void 0&&(this.styles.styleSheetRoot=ce.styleSheetRoot),this.setWindowHeight(),this.showUI(),this.open(),this.eventListeners.show.forEach(function(St){return St(new Pe(Et))})},Tt.prototype.render=function(){return ye(this,void 0,void 0,function(){var Et;return Be(this,function(St){switch(St.label){case 0:return this.setCurrentMarker(),(Et=new je).naturalSize=this.renderAtNaturalSize,Et.imageType=this.renderImageType,Et.imageQuality=this.renderImageQuality,Et.markersOnly=this.renderMarkersOnly,Et.width=this.renderWidth,Et.height=this.renderHeight,[4,Et.rasterize(this.target instanceof HTMLImageElement?this.target:null,this.markerImage,this.renderTarget)];case 1:return St.sent(),[4,Et.rasterize(this.target instanceof HTMLImageElement?this.target:null,this.markerImage,this.renderTarget)];case 2:return[2,St.sent()]}})})},Tt.prototype.close=function(Et){var St=this;if(Et===void 0&&(Et=!1),this.isOpen){var Mt=!1;Et||this.eventListeners.beforeclose.forEach(function(zt){var kt=new Pe(St,!0);zt(kt),kt.defaultPrevented&&(Mt=!0)}),Mt||(this.coverDiv&&this.closeUI(),this.targetObserver&&(this.targetObserver.unobserve(this.target),this.targetObserver.unobserve(this.editorCanvas)),this.settings.displayMode==="popup"&&window.removeEventListener("resize",this.setWindowHeight),this.eventListeners.close.forEach(function(zt){return zt(new Pe(St))}),this.detachEvents(),this._isOpen=!1)}},Tt.prototype.addMarkersToToolbar=function(){for(var Et,St=[],Mt=0;Mt<arguments.length;Mt++)St[Mt]=arguments[Mt];(Et=this._availableMarkerTypes).push.apply(Et,St)},Tt.prototype.addRenderEventListener=function(Et){this.addEventListener("render",function(St){Et(St.dataUrl,St.state)})},Tt.prototype.removeRenderEventListener=function(Et){},Tt.prototype.addCloseEventListener=function(Et){this.addEventListener("close",function(){Et()})},Tt.prototype.removeCloseEventListener=function(Et){},Tt.prototype.setupResizeObserver=function(){var Et=this;this.settings.displayMode==="inline"?window.ResizeObserver&&(this.targetObserver=new ResizeObserver(function(){Et.resize(Et.target.clientWidth,Et.target.clientHeight)}),this.targetObserver.observe(this.target)):this.settings.displayMode==="popup"&&(window.ResizeObserver&&(this.targetObserver=new ResizeObserver(function(){return Et.onPopupTargetResize()}),this.targetObserver.observe(this.editorCanvas)),window.addEventListener("resize",this.setWindowHeight))},Tt.prototype.onPopupTargetResize=function(){var Et=1*this.target.clientWidth/this.target.clientHeight,St=this.editorCanvas.clientWidth/Et>this.editorCanvas.clientHeight?this.editorCanvas.clientHeight*Et:this.editorCanvas.clientWidth,Mt=St<this.editorCanvas.clientWidth?this.editorCanvas.clientHeight:this.editorCanvas.clientWidth/Et;this.resize(St,Mt)},Tt.prototype.setWindowHeight=function(){this.windowHeight=window.innerHeight},Tt.prototype.resize=function(Et,St){this._isResizing=!0;var Mt=Et/this.imageWidth,zt=St/this.imageHeight;this.imageWidth=Math.round(Et),this.imageHeight=Math.round(St),this.target instanceof HTMLImageElement&&this.editingTarget instanceof HTMLImageElement&&(this.editingTarget.src=this.target.src),this.editingTarget.width=this.imageWidth,this.editingTarget.height=this.imageHeight,this.editingTarget.style.width=this.imageWidth+"px",this.editingTarget.style.height=this.imageHeight+"px",this.markerImage.setAttribute("width",this.imageWidth.toString()),this.markerImage.setAttribute("height",this.imageHeight.toString()),this.markerImage.setAttribute("viewBox","0 0 "+this.imageWidth.toString()+" "+this.imageHeight.toString()),this.markerImageHolder.style.width=this.imageWidth+"px",this.markerImageHolder.style.height=this.imageHeight+"px",this.overlayContainer.style.width=this.imageWidth+"px",this.overlayContainer.style.height=this.imageHeight+"px",this.settings.displayMode!=="popup"?this.coverDiv.style.width=this.imageWidth.toString()+"px":(this.setTopLeft(),this.positionMarkerImage()),this.toolbar!==void 0&&this.toolbar.adjustLayout(),this.positionLogo(),this.scaleMarkers(Mt,zt),this._isResizing=!1},Tt.prototype.scaleMarkers=function(Et,St){var Mt,zt=this;this._currentMarker&&this._currentMarker instanceof Re?this._currentMarker.scale(Et,St):(Mt=this._currentMarker,this.setCurrentMarker()),this.markers.forEach(function(kt){kt!==zt._currentMarker&&kt.scale(Et,St)}),Mt!==void 0&&this.setCurrentMarker(Mt)},Tt.prototype.setEditingTarget=function(){this.imageWidth=Math.round(this.target.clientWidth),this.imageHeight=Math.round(this.target.clientHeight),this.target instanceof HTMLImageElement&&this.editingTarget instanceof HTMLImageElement&&(this.editingTarget.src=this.target.src),this.editingTarget.width=this.imageWidth,this.editingTarget.height=this.imageHeight,this.editingTarget.style.width=this.imageWidth+"px",this.editingTarget.style.height=this.imageHeight+"px"},Tt.prototype.setTopLeft=function(){var Et=this.editingTarget.getBoundingClientRect(),St=this.editorCanvas.getBoundingClientRect();this.left=Et.left-St.left,this.top=Et.top-St.top},Tt.prototype.initMarkerCanvas=function(){this.markerImageHolder=document.createElement("div"),this.markerImageHolder.style.setProperty("touch-action","pinch-zoom"),this.markerImage=document.createElementNS("http://www.w3.org/2000/svg","svg"),this.markerImage.setAttribute("xmlns","http://www.w3.org/2000/svg"),this.markerImage.setAttribute("width",this.imageWidth.toString()),this.markerImage.setAttribute("height",this.imageHeight.toString()),this.markerImage.setAttribute("viewBox","0 0 "+this.imageWidth.toString()+" "+this.imageHeight.toString()),this.markerImage.style.pointerEvents="auto",this.markerImageHolder.style.position="absolute",this.markerImageHolder.style.width=this.imageWidth+"px",this.markerImageHolder.style.height=this.imageHeight+"px",this.markerImageHolder.style.transformOrigin="top left",this.positionMarkerImage(),this.markerImageHolder.appendChild(this.markerImage),this.editorCanvas.appendChild(this.markerImageHolder)},Tt.prototype.addDefs=function(){for(var Et,St=[],Mt=0;Mt<arguments.length;Mt++)St[Mt]=arguments[Mt];this.defs=Rt.createDefs(),this.addDefsToImage(),(Et=this.defs).append.apply(Et,St)},Tt.prototype.addDefsToImage=function(){this.defs&&this.markerImage.insertBefore(this.defs,this.markerImage.firstChild)},Tt.prototype.initOverlay=function(){this.overlayContainer=document.createElement("div"),this.overlayContainer.style.position="absolute",this.overlayContainer.style.left="0px",this.overlayContainer.style.top="0px",this.overlayContainer.style.width=this.imageWidth+"px",this.overlayContainer.style.height=this.imageHeight+"px",this.overlayContainer.style.display="flex",this.markerImageHolder.appendChild(this.overlayContainer)},Tt.prototype.positionMarkerImage=function(){this.markerImageHolder.style.top=this.top/this.zoomLevel+"px",this.markerImageHolder.style.left=this.left/this.zoomLevel+"px"},Tt.prototype.attachEvents=function(){this.markerImage.addEventListener("pointerdown",this.onPointerDown),this.markerImage.addEventListener("dblclick",this.onDblClick),this.attachWindowEvents()},Tt.prototype.attachWindowEvents=function(){window.addEventListener("pointermove",this.onPointerMove),window.addEventListener("pointerup",this.onPointerUp),window.addEventListener("pointercancel",this.onPointerOut),window.addEventListener("pointerout",this.onPointerOut),window.addEventListener("pointerleave",this.onPointerUp),window.addEventListener("resize",this.onWindowResize),window.addEventListener("keyup",this.onKeyUp)},Tt.prototype.detachEvents=function(){this.markerImage.removeEventListener("pointerdown",this.onPointerDown),this.markerImage.removeEventListener("dblclick",this.onDblClick),this.detachWindowEvents()},Tt.prototype.detachWindowEvents=function(){window.removeEventListener("pointermove",this.onPointerMove),window.removeEventListener("pointerup",this.onPointerUp),window.removeEventListener("pointercancel",this.onPointerOut),window.removeEventListener("pointerout",this.onPointerOut),window.removeEventListener("pointerleave",this.onPointerUp),window.removeEventListener("resize",this.onWindowResize),window.removeEventListener("keyup",this.onKeyUp)},Tt.prototype.addLogo=function(){this.logoUI=document.createElement("div"),this.logoUI.style.display="inline-block",this.logoUI.style.margin="0px",this.logoUI.style.padding="0px",this.logoUI.style.fill="#333333";var Et=document.createElement("a");Et.href="https://markerjs.com/",Et.target="_blank",Et.innerHTML='<svg viewBox="0 0 112 96" xmlns="http://www.w3.org/2000/svg" fill-rule="evenodd" clip-rule="evenodd" stroke-linejoin="round" stroke-miterlimit="1.414"><path fill="#e5f20d" fill-opacity=".647" d="M0 40.386h111.96V95.62H0z"/><path d="M93.61 61.452c0 .987-.328 1.831-.987 2.53-.657.7-1.52 1.048-2.591 1.048-1.481 0-2.222-.74-2.222-2.22 0-16.617-.533-29.347-1.604-38.192-1.068-8.842-2.92-13.265-5.552-13.265-4.443 0-10.94 15.509-19.497 46.52v.124c0 .987-.328 1.831-.987 2.53-.657.7-1.52 1.048-2.592 1.048-1.48 0-2.22-.74-2.22-2.22 0-3.29.165-8.392.493-15.302.33-7.732.494-13.82.494-18.262 0-6.17-.186-10.55-.556-13.142-.37-2.591-1.172-3.887-2.406-3.887-2.796 0-6.333 5.12-10.612 15.363C38.494 34.367 34.01 46.44 29.32 60.34l-1.11 3.209a5.714 5.714 0 01-1.42 2.097c-.617.578-1.295.864-2.036.864-.987 0-1.644-.081-1.974-.247-.328-.162-.533-.656-.617-1.48-.41-4.03-.74-9.418-.987-16.165-.163-1.728-.329-4.566-.494-8.515-.822-13.901-1.562-23.3-2.221-28.196-.657-4.893-.987-7.628-.987-8.205 0-.657.33-1.44.987-2.345.659-.903 1.276-1.357 1.85-1.357 1.319 0 2.387.947 3.21 2.838.411.906.863 4.526 1.357 10.859.493 6.335.905 14.19 1.233 23.568l.617 18.88c4.527-13.983 9.216-26.673 14.068-38.068C45.65 6.686 50.093.988 54.123.988c2.715 0 4.566 1.974 5.553 5.923.987 3.949 1.481 9.667 1.481 17.152 0 3.949-.081 9.625-.247 17.029l-.123 5.676c3.373-11.762 6.725-21.634 10.057-29.615 3.331-7.979 6.685-11.97 10.056-11.97 8.475 0 12.71 18.757 12.71 56.269z" fill-rule="nonzero"/></svg>',Et.title="Powered by marker.js",Et.style.display="grid",Et.style.alignItems="center",Et.style.justifyItems="center",Et.style.padding="3px",Et.style.width="20px",Et.style.height="20px",this.logoUI.appendChild(Et),this.editorCanvas.appendChild(this.logoUI),this.logoUI.style.position="absolute",this.logoUI.style.pointerEvents="all",this.positionLogo()},Tt.prototype.positionLogo=function(){this.logoUI&&(this.uiStyleSettings.logoPosition!=="right"?this.logoUI.style.left=this.markerImageHolder.offsetLeft+10+"px":this.logoUI.style.left=this.markerImageHolder.offsetLeft+this.markerImageHolder.offsetWidth-this.logoUI.clientWidth-10+"px",this.logoUI.style.top=this.markerImageHolder.offsetTop+this.markerImageHolder.offsetHeight-this.logoUI.clientHeight-10+"px")},Tt.prototype.overrideOverflow=function(){this.scrollXState=window.scrollX,this.scrollYState=window.scrollY,this.bodyOverflowState=document.body.style.overflow,window.scroll({top:0,left:0}),document.body.style.overflow="hidden"},Tt.prototype.restoreOverflow=function(){document.body.style.overflow=this.bodyOverflowState,window.scroll({top:this.scrollYState,left:this.scrollXState})},Tt.prototype.showUI=function(){switch(this.settings.displayMode==="popup"&&this.overrideOverflow(),this.coverDiv=document.createElement("div"),this.coverDiv.style.visibility=this._silentRenderMode?"hidden":"visible",this.coverDiv.className=this.styles.classNamePrefixBase+" "+this.styles.classNamePrefix,this.coverDiv.style.fontSize="16px",this.coverDiv.style.userSelect="none",this.settings.displayMode){case"inline":this.coverDiv.style.position="absolute";var Et=this.settings.uiOffsetTop!==void 0?this.target.offsetTop+this.settings.uiOffsetTop:this.target.offsetTop>this.styles.settings.toolbarHeight?this.target.offsetTop-this.styles.settings.toolbarHeight:0;this.coverDiv.style.top=Et+"px",this.coverDiv.style.left=this.target.offsetLeft.toString()+"px",this.coverDiv.style.width=this.target.offsetWidth.toString()+"px",this.coverDiv.style.zIndex=this.uiStyleSettings.zIndex!==void 0?this.uiStyleSettings.zIndex:"5";break;case"popup":this.coverDiv.style.position="absolute",this.coverDiv.style.top="0px",this.coverDiv.style.left="0px",this.coverDiv.style.width="100vw",this.coverDiv.style.height=window.innerHeight+"px",this.coverDiv.style.backgroundColor="rgba(0, 0, 0, 0.75)",this.coverDiv.style.zIndex=this.uiStyleSettings.zIndex!==void 0?this.uiStyleSettings.zIndex:"1000",this.coverDiv.style.display="flex"}this.targetRoot.appendChild(this.coverDiv),this.uiDiv=document.createElement("div"),this.uiDiv.style.display="flex",this.uiDiv.style.flexDirection="column",this.uiDiv.style.flexGrow="2",this.uiDiv.style.margin=this.settings.displayMode==="popup"?this.settings.popupMargin+"px":"0px",this.uiDiv.style.border="0px",this.coverDiv.appendChild(this.uiDiv),this.toolbar=new Je(this.uiDiv,this.settings.displayMode,this._availableMarkerTypes,this.uiStyleSettings,this.styles),this.toolbar.addButtonClickListener(this.toolbarButtonClicked),this.toolbar.show(this._silentRenderMode||this.uiStyleSettings.hideToolbar?"hidden":"visible"),this.contentDiv=document.createElement("div"),this.contentDiv.style.display="flex",this.contentDiv.style.flexDirection="row",this.contentDiv.style.flexGrow="2",this.contentDiv.style.flexShrink="1",this.settings.displayMode==="popup"&&(this.contentDiv.style.backgroundColor=this.uiStyleSettings.canvasBackgroundColor,this.contentDiv.style.maxHeight=this.windowHeight-2*this.settings.popupMargin-3.5*this.uiStyleSettings.toolbarHeight+"px",this.contentDiv.style.maxWidth="calc(100vw - "+2*this.settings.popupMargin+"px)"),this.contentDiv.style.overflow="auto",this.uiDiv.appendChild(this.contentDiv),this.editorCanvas=document.createElement("div"),this.editorCanvas.style.flexGrow="2",this.editorCanvas.style.flexShrink="1",this.editorCanvas.style.position="relative",this.editorCanvas.style.overflow="hidden",this.editorCanvas.style.display="flex",this.settings.displayMode==="popup"&&(this.editorCanvas.style.alignItems="center",this.editorCanvas.style.justifyContent="center"),this.editorCanvas.style.pointerEvents="none",this.editorCanvas.style.transformOrigin="left top",this.editorCanvas.style.transform="scale("+this.zoomLevel+")",this.contentDiv.appendChild(this.editorCanvas),this.editingTarget=this.target instanceof HTMLImageElement?document.createElement("img"):document.createElement("canvas"),this.settings.uiOffsetTop===void 0&&this.target.offsetTop<this.styles.settings.toolbarHeight&&(this.editingTarget.style.marginTop=this.target.offsetTop-this.styles.settings.toolbarHeight+"px"),this.editorCanvas.appendChild(this.editingTarget),this.toolbox=new Nt(this.uiDiv,this.settings.displayMode,this.uiStyleSettings,this.styles),this.toolbox.show(this._silentRenderMode||this.uiStyleSettings.hideToolbox?"hidden":"visible")},Tt.prototype.closeUI=function(){this.settings.displayMode==="popup"&&this.restoreOverflow(),this.targetRoot.removeChild(this.coverDiv)},Tt.prototype.removeMarker=function(Et){this.markerImage.removeChild(Et.container),this.markers.indexOf(Et)>-1&&this.markers.splice(this.markers.indexOf(Et),1),Et.dispose()},Tt.prototype.switchToSelectMode=function(){this.mode="select",this.hideNotesEditor(),this._currentMarker!==void 0&&(this._currentMarker.state!=="new"?this._currentMarker.select():(this.removeMarker(this._currentMarker),this.setCurrentMarker(),this.markerImage.style.cursor="default"),this.addUndoStep())},Tt.prototype.toolbarButtonClicked=function(Et,St){if(Et==="marker"&&St!==void 0)this.createNewMarker(St);else if(Et==="action")switch(St){case"select":this.switchToSelectMode(),this.switchToSelectMode();break;case"delete":this.deleteSelectedMarker();break;case"clear":this.clear();break;case"undo":this.undo();break;case"redo":this.redo();break;case"zoom":this.stepZoom();break;case"zoom-out":this.zoomLevel=1;break;case"notes":this.notesArea===void 0?(this.switchToSelectMode(),this.zoomLevel=1,this.showNotesEditor()):this.switchToSelectMode();break;case"close":this.close();break;case"render":this.switchToSelectMode(),this.startRenderAndClose()}},Tt.prototype.deleteSelectedMarker=function(){var Et=this;if(this._currentMarker!==void 0){var St=!1;if(this.eventListeners.markerbeforedelete.forEach(function(zt){var kt=new re(Et,Et._currentMarker,!0);zt(kt),kt.defaultPrevented&&(St=!0)}),!St){var Mt=this._currentMarker;this._currentMarker.dispose(),this.markerImage.removeChild(this._currentMarker.container),this.markers.splice(this.markers.indexOf(this._currentMarker),1),this.setCurrentMarker(),this.addUndoStep(),this.eventListeners.markerdelete.forEach(function(zt){return zt(new re(Et,Mt))})}}},Tt.prototype.clear=function(){var Et=this,St=!1;if(this.markers.length>0&&(this.eventListeners.markerbeforedelete.forEach(function(Ut){var Oe=new re(Et,void 0,!0);Ut(Oe),Oe.defaultPrevented&&(St=!0)}),!St)){this.setCurrentMarker();for(var Mt=function(Ut){var Oe=zt.markers[Ut];zt.setCurrentMarker(zt.markers[Ut]),zt._currentMarker.dispose(),zt.markerImage.removeChild(zt._currentMarker.container),zt.markers.splice(zt.markers.indexOf(zt._currentMarker),1),zt.eventListeners.markerdelete.forEach(function(Te){return Te(new re(Et,Oe))})},zt=this,kt=this.markers.length-1;kt>=0;kt--)Mt(kt);this.addUndoStep()}},Object.defineProperty(Tt.prototype,"isNotesAreaOpen",{get:function(){return this.notesArea!==void 0},enumerable:!1,configurable:!0}),Tt.prototype.showNotesEditor=function(){var Et;this._currentMarker!==void 0&&(this.overlayContainer.innerHTML="",this.notesArea=document.createElement("textarea"),this.notesArea.className=this.uiStyleSettings.notesAreaStyleClassName,this.notesArea.style.pointerEvents="auto",this.notesArea.style.alignSelf="stretch",this.notesArea.style.width="100%",this.notesArea.style.margin=this.uiStyleSettings.toolbarHeight/4+"px",this.notesArea.value=(Et=this._currentMarker.notes)!==null&&Et!==void 0?Et:"",this.overlayContainer.appendChild(this.notesArea))},Tt.prototype.hideNotesEditor=function(){this.isNotesAreaOpen&&(this._currentMarker!==void 0&&(this._currentMarker.notes=this.notesArea.value.trim()!==""?this.notesArea.value:void 0),this.overlayContainer.removeChild(this.notesArea),this.notesArea=void 0)},Tt.prototype.selectLastMarker=function(){this.markers.length>0?this.setCurrentMarker(this.markers[this.markers.length-1]):this.setCurrentMarker()},Tt.prototype.addUndoStep=function(){var Et=this;if(this._currentMarker===void 0||this._currentMarker.state!=="edit"){var St=this.getState(),Mt=this.undoRedoManager.getLastUndoStep();if(!Mt||Mt.width===St.width&&Mt.height===St.height){var zt=this.undoRedoManager.undoStepCount;this.undoRedoManager.addUndoStep(St),zt<this.undoRedoManager.undoStepCount&&this.eventListeners.statechange.forEach(function(kt){return kt(new Pe(Et))})}else this.undoRedoManager.replaceLastUndoStep(St),this.eventListeners.statechange.forEach(function(kt){return kt(new Pe(Et))})}},Tt.prototype.undo=function(){this.switchToSelectMode(),this.addUndoStep(),this.undoStep()},Tt.prototype.undoStep=function(){var Et=this,St=this.undoRedoManager.undo();St!==void 0&&(this.restoreState(St),this.addDefsToImage(),this.selectLastMarker(),this.eventListeners.statechange.forEach(function(Mt){return Mt(new Pe(Et))}))},Tt.prototype.redo=function(){this.switchToSelectMode(),this.redoStep()},Tt.prototype.redoStep=function(){var Et=this,St=this.undoRedoManager.redo();St!==void 0&&(this.restoreState(St),this.addDefsToImage(),this.selectLastMarker(),this.eventListeners.statechange.forEach(function(Mt){return Mt(new Pe(Et))}))},Tt.prototype.stepZoom=function(){var Et=this.zoomSteps.indexOf(this.zoomLevel);this.zoomLevel=Et<this.zoomSteps.length-1?this.zoomSteps[Et+1]:this.zoomSteps[0]},Tt.prototype.panTo=function(Et){this.contentDiv.scrollBy({left:this.prevPanPoint.x-Et.x,top:this.prevPanPoint.y-Et.y}),this.prevPanPoint=Et},Tt.prototype.startRenderAndClose=function(){return ye(this,void 0,void 0,function(){var Et,St,Mt=this;return Be(this,function(zt){switch(zt.label){case 0:return[4,this.render()];case 1:return Et=zt.sent(),St=this.getState(),this.eventListeners.render.forEach(function(kt){return kt(new an(Mt,Et,St))}),this.close(!0),[2]}})})},Tt.prototype.getState=function(Et){Et===!0&&this.setCurrentMarker();var St={width:this.imageWidth,height:this.imageHeight,markers:[]};return this.markers.forEach(function(Mt){return St.markers.push(Mt.getState())}),St},Tt.prototype.restoreState=function(Et){var St=this;for(this.markers.splice(0);this.markerImage.lastChild;)this.markerImage.removeChild(this.markerImage.lastChild);Et.markers.forEach(function(Mt){var zt=St._availableMarkerTypes.find(function(Ut){return Ut.typeName===Mt.typeName});if(zt!==void 0){var kt=St.addNewMarker(zt);kt.restoreState(Mt),St.markers.push(kt)}}),Et.width&&Et.height&&(Et.width!==this.imageWidth||Et.height!==this.imageHeight)&&this.scaleMarkers(this.imageWidth/Et.width,this.imageHeight/Et.height),this.eventListeners.restorestate.forEach(function(Mt){return Mt(new Pe(St))})},Tt.prototype.addNewMarker=function(Et){var St=Rt.createGroup();return this.markerImage.appendChild(St),new Et(St,this.overlayContainer,this.settings)},Tt.prototype.createNewMarker=function(Et){var St,Mt=this;(St=typeof Et=="string"?this._availableMarkerTypes.find(function(zt){return zt.typeName===Et}):Et)&&(this.setCurrentMarker(),this.addUndoStep(),this._currentMarker=this.addNewMarker(St),this._currentMarker.onMarkerCreated=this.markerCreated,this._currentMarker.onColorChanged=this.colorChanged,this._currentMarker.onFillColorChanged=this.fillColorChanged,this._currentMarker.onStateChanged=this.markerStateChanged,this.markerImage.style.cursor="crosshair",this.toolbar.setActiveMarkerButton(St.typeName),this.toolbox.setPanelButtons(this._currentMarker.toolboxPanels),this.eventListeners.markercreating.forEach(function(zt){return zt(new re(Mt,Mt._currentMarker))}))},Tt.prototype.markerCreated=function(Et){var St=this;this.mode="select",this.markerImage.style.cursor="default",this.markers.push(Et),this.setCurrentMarker(Et),Et instanceof Ye&&this.settings.newFreehandMarkerOnPointerUp?this.createNewMarker(Ye):this.toolbar.setSelectMode(),this.addUndoStep(),this.eventListeners.markercreate.forEach(function(Mt){return Mt(new re(St,St._currentMarker))})},Tt.prototype.colorChanged=function(Et){this.settings.defaultColorsFollowCurrentColors&&(this.settings.defaultColor=Et,this.settings.defaultStrokeColor=Et)},Tt.prototype.fillColorChanged=function(Et){this.settings.defaultColorsFollowCurrentColors&&(this.settings.defaultFillColor=Et)},Tt.prototype.markerStateChanged=function(Et){var St=this;this.eventListeners.markerchange.forEach(function(Mt){return Mt(new re(St,Et))})},Tt.prototype.setCurrentMarker=function(Et){var St=this;this._currentMarker!==Et&&this._currentMarker!==void 0&&(this._currentMarker.deselect(),this.toolbar.setCurrentMarker(),this.toolbox.setPanelButtons([]),this._isResizing||this.eventListeners.markerdeselect.forEach(function(Mt){return Mt(new re(St,St._currentMarker))})),this._currentMarker=Et,this._currentMarker===void 0||this._currentMarker.isSelected||(this._currentMarker.state!=="new"&&this._currentMarker.select(),this.toolbar.setCurrentMarker(this._currentMarker),this.toolbox.setPanelButtons(this._currentMarker.toolboxPanels),this._isResizing||this.eventListeners.markerselect.forEach(function(Mt){return Mt(new re(St,St._currentMarker))}))},Tt.prototype.onPointerDown=function(Et){if(this._isFocused||this.focus(),this.touchPoints++,this.touchPoints===1||Et.pointerType!=="touch")if(this._currentMarker===void 0||this._currentMarker.state!=="new"&&this._currentMarker.state!=="creating"){if(this.mode==="select"){var St=this.markers.find(function(Mt){return Mt.ownsTarget(Et.target)});St!==void 0?(this.setCurrentMarker(St),this.isDragging=!0,this._currentMarker.pointerDown(this.clientToLocalCoordinates(Et.clientX,Et.clientY),Et.target)):(this.setCurrentMarker(),this.isDragging=!0,this.prevPanPoint={x:Et.clientX,y:Et.clientY})}}else this.isDragging=!0,this._currentMarker.pointerDown(this.clientToLocalCoordinates(Et.clientX,Et.clientY))},Tt.prototype.onDblClick=function(Et){if(this._isFocused||this.focus(),this.mode==="select"){var St=this.markers.find(function(Mt){return Mt.ownsTarget(Et.target)});St!==void 0&&St!==this._currentMarker&&this.setCurrentMarker(St),this._currentMarker!==void 0?this._currentMarker.dblClick(this.clientToLocalCoordinates(Et.clientX,Et.clientY),Et.target):this.setCurrentMarker()}},Tt.prototype.onPointerMove=function(Et){this.touchPoints!==1&&Et.pointerType==="touch"||(this._currentMarker!==void 0||this.isDragging)&&(this._currentMarker!==void 0&&this._currentMarker.state==="edit"||Et.preventDefault(),this._currentMarker!==void 0?this._currentMarker.manipulate(this.clientToLocalCoordinates(Et.clientX,Et.clientY)):this.zoomLevel>1&&this.panTo({x:Et.clientX,y:Et.clientY}))},Tt.prototype.onPointerUp=function(Et){this.touchPoints>0&&this.touchPoints--,this.touchPoints===0&&this.isDragging&&this._currentMarker!==void 0&&this._currentMarker.pointerUp(this.clientToLocalCoordinates(Et.clientX,Et.clientY)),this.isDragging=!1,this.addUndoStep()},Tt.prototype.onPointerOut=function(){this.touchPoints>0&&this.touchPoints--},Tt.prototype.onKeyUp=function(Et){this._currentMarker===void 0||this.notesArea!==void 0||Et.key!=="Delete"&&Et.key!=="Backspace"||this.deleteSelectedMarker()},Tt.prototype.clientToLocalCoordinates=function(Et,St){var Mt=this.markerImage.getBoundingClientRect();return{x:(Et-Mt.left)/this.zoomLevel,y:(St-Mt.top)/this.zoomLevel}},Tt.prototype.onWindowResize=function(){this.positionUI()},Tt.prototype.positionUI=function(){switch(this.setTopLeft(),this.settings.displayMode){case"inline":var Et=this.target.getClientRects().item(0).y>this.styles.settings.toolbarHeight?this.target.offsetTop-this.styles.settings.toolbarHeight:0;this.coverDiv.style.top=Et+"px",this.coverDiv.style.left=this.target.offsetLeft.toString()+"px";break;case"popup":this.coverDiv.style.top="0px",this.coverDiv.style.left="0px",this.coverDiv.style.width="100vw",this.coverDiv.style.height=this.windowHeight+"px",this.contentDiv.style.maxHeight=this.windowHeight-2*this.settings.popupMargin-3.5*this.styles.settings.toolbarHeight+"px"}this.positionMarkerImage(),this.positionLogo()},Tt.prototype.addLicenseKey=function(Et){ie.addKey(Et)},Tt.prototype.addEventListener=function(Et,St){this.eventListeners.addEventListener(Et,St)},Tt.prototype.removeEventListener=function(Et,St){this.eventListeners.removeEventListener(Et,St)},Tt.prototype.renderState=function(Et){this._silentRenderMode=!0,this.settings.displayMode="inline",this.isOpen||this.show(),this.restoreState(Et),this.startRenderAndClose(),this._silentRenderMode=!1},Object.defineProperty(Tt.prototype,"isFocused",{get:function(){return this._isFocused},enumerable:!1,configurable:!0}),Tt.prototype.focus=function(){var Et=this;this._isFocused||(this.attachWindowEvents(),this._isFocused=!0,this._previousCurrentMarker!==void 0&&this.setCurrentMarker(this._previousCurrentMarker),this.eventListeners.focus.forEach(function(St){return St(new Pe(Et))}))},Tt.prototype.blur=function(){var Et=this;this._isFocused&&(this.detachWindowEvents(),this._isFocused=!1,this._previousCurrentMarker=this._currentMarker,this.setCurrentMarker(),this.eventListeners.blur.forEach(function(St){return St(new Pe(Et))}))},Tt.instanceCounter=0,Tt}()},63727:function(Tn,oi,Dt){"use strict";Dt.d(oi,{s:function(){return ee},default:function(){return yn}});var Ft=Dt(71409),se=Dt(89490),ye=Dt(62730),Be=Dt(11036),Se=Dt(39224),Rt=Dt(37463),ie=Dt(6551),je=Dt(6089),ce=Dt(18929),Vt=Dt(59301),Qe=Vt.createContext({}),Qt=Qe,Je=Dt(28788),Nt=Dt(87075),nt="__rc_cascader_search_mark__",et=function(Ne,Ze,Bn){var le=Bn.label,An=le===void 0?"":le;return Ze.some(function(Kn){return String(Kn[An]).toLowerCase().includes(Ne.toLowerCase())})},ct=function(Ne,Ze,Bn,le){return Ze.map(function(An){return An[le.label]}).join(" / ")},lt=function(Ne,Ze,Bn,le,An,Kn){var yi=An.filter,Xn=yi===void 0?et:yi,Ei=An.render,Yi=Ei===void 0?ct:Ei,Gi=An.limit,Hi=Gi===void 0?50:Gi,Ki=An.sort;return Vt.useMemo(function(){var Qi=[];if(!Ne)return[];function ji(Ai,Zi){var Pt=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1;Ai.forEach(function(ni){if(!(!Ki&&Hi!==!1&&Hi>0&&Qi.length>=Hi)){var Si=[].concat((0,ye.Z)(Zi),[ni]),on=ni[Bn.children],dn=Pt||ni.disabled;if((!on||on.length===0||Kn)&&Xn(Ne,Si,{label:Bn.label})){var pn;Qi.push((0,se.Z)((0,se.Z)({},ni),{},(pn={disabled:dn},(0,Nt.Z)(pn,Bn.label,Yi(Ne,Si,le,Bn)),(0,Nt.Z)(pn,nt,Si),(0,Nt.Z)(pn,Bn.children,void 0),pn)))}on&&ji(ni[Bn.children],Si,dn)}})}return ji(Ze,[]),Ki&&Qi.sort(function(Ai,Zi){return Ki(Ai[nt],Zi[nt],Ne,Bn)}),Hi!==!1&&Hi>0?Qi.slice(0,Hi):Qi},[Ne,Ze,Bn,le,Yi,Kn,Xn,Ki,Hi])},pt=lt,vt="__RC_CASCADER_SPLIT__",xt="SHOW_PARENT",Lt="SHOW_CHILD";function Ot(xe){return xe.join(vt)}function Ht(xe){return xe.map(Ot)}function te(xe){return xe.split(vt)}function _t(xe){var Ne=xe||{},Ze=Ne.label,Bn=Ne.value,le=Ne.children,An=Bn||"value";return{label:Ze||"label",value:An,key:An,children:le||"children"}}function Xt(xe,Ne){var Ze,Bn;return(Ze=xe.isLeaf)!==null&&Ze!==void 0?Ze:!((Bn=xe[Ne.children])!==null&&Bn!==void 0&&Bn.length)}function ve(xe){var Ne=xe.parentElement;if(Ne){var Ze=xe.offsetTop-Ne.offsetTop;Ze-Ne.scrollTop<0?Ne.scrollTo({top:Ze}):Ze+xe.offsetHeight-Ne.scrollTop>Ne.offsetHeight&&Ne.scrollTo({top:Ze+xe.offsetHeight-Ne.offsetHeight})}}function oe(xe,Ne){return xe.map(function(Ze){var Bn;return(Bn=Ze[nt])===null||Bn===void 0?void 0:Bn.map(function(le){return le[Ne.value]})})}function Re(xe){return Array.isArray(xe)&&Array.isArray(xe[0])}function Ye(xe){return xe?Re(xe)?xe:(xe.length===0?[]:[xe]).map(function(Ne){return Array.isArray(Ne)?Ne:[Ne]}):[]}function en(xe,Ne,Ze){var Bn=new Set(xe),le=Ne();return xe.filter(function(An){var Kn=le[An],yi=Kn?Kn.parent:null,Xn=Kn?Kn.children:null;return Kn&&Kn.node.disabled?!0:Ze===Lt?!(Xn&&Xn.some(function(Ei){return Ei.key&&Bn.has(Ei.key)})):!(yi&&!yi.node.disabled&&Bn.has(yi.key))})}function Rn(xe,Ne,Ze){for(var Bn=arguments.length>3&&arguments[3]!==void 0?arguments[3]:!1,le=Ne,An=[],Kn=function(){var Ei,Yi,Gi,Hi=xe[yi],Ki=(Ei=le)===null||Ei===void 0?void 0:Ei.findIndex(function(ji){var Ai=ji[Ze.value];return Bn?String(Ai)===String(Hi):Ai===Hi}),Qi=Ki!==-1?(Yi=le)===null||Yi===void 0?void 0:Yi[Ki]:null;An.push({value:(Gi=Qi==null?void 0:Qi[Ze.value])!==null&&Gi!==void 0?Gi:Hi,index:Ki,option:Qi}),le=Qi==null?void 0:Qi[Ze.children]},yi=0;yi<xe.length;yi+=1)Kn();return An}var wn=function(xe,Ne,Ze,Bn,le){return Vt.useMemo(function(){var An=le||function(Kn){var yi=Bn?Kn.slice(-1):Kn,Xn=" / ";return yi.every(function(Ei){return["string","number"].includes((0,Je.Z)(Ei))})?yi.join(Xn):yi.reduce(function(Ei,Yi,Gi){var Hi=Vt.isValidElement(Yi)?Vt.cloneElement(Yi,{key:Gi}):Yi;return Gi===0?[Hi]:[].concat((0,ye.Z)(Ei),[Xn,Hi])},[])};return xe.map(function(Kn){var yi,Xn=Rn(Kn,Ne,Ze),Ei=An(Xn.map(function(Gi){var Hi,Ki=Gi.option,Qi=Gi.value;return(Hi=Ki==null?void 0:Ki[Ze.label])!==null&&Hi!==void 0?Hi:Qi}),Xn.map(function(Gi){var Hi=Gi.option;return Hi})),Yi=Ot(Kn);return{label:Ei,value:Yi,key:Yi,valueCells:Kn,disabled:(yi=Xn[Xn.length-1])===null||yi===void 0||(yi=yi.option)===null||yi===void 0?void 0:yi.disabled}})},[xe,Ne,Ze,le,Bn])};function un(xe,Ne){return Vt.useCallback(function(Ze){var Bn=[],le=[];return Ze.forEach(function(An){var Kn=Rn(An,xe,Ne);Kn.every(function(yi){return yi.option})?le.push(An):Bn.push(An)}),[le,Bn]},[xe,Ne])}var vn=Dt(34061),ne=function(xe,Ne){var Ze=Vt.useRef({options:[],info:{keyEntities:{},pathKeyEntities:{}}}),Bn=Vt.useCallback(function(){return Ze.current.options!==xe&&(Ze.current.options=xe,Ze.current.info=(0,vn.I8)(xe,{fieldNames:Ne,initWrapper:function(An){return(0,se.Z)((0,se.Z)({},An),{},{pathKeyEntities:{}})},processEntity:function(An,Kn){var yi=An.nodes.map(function(Xn){return Xn[Ne.value]}).join(vt);Kn.pathKeyEntities[yi]=An,An.key=yi}})),Ze.current.info.pathKeyEntities},[Ne,xe]);return Bn};function jt(xe,Ne){var Ze=Vt.useMemo(function(){return Ne||[]},[Ne]),Bn=ne(Ze,xe),le=Vt.useCallback(function(An){var Kn=Bn();return An.map(function(yi){var Xn=Kn[yi].nodes;return Xn.map(function(Ei){return Ei[xe.value]})})},[Bn,xe]);return[Ze,Bn,le]}var Fe=Dt(48736);function We(xe){return Vt.useMemo(function(){if(!xe)return[!1,{}];var Ne={matchInputWidth:!0,limit:50};return xe&&(0,Je.Z)(xe)==="object"&&(Ne=(0,se.Z)((0,se.Z)({},Ne),xe)),Ne.limit<=0&&(Ne.limit=!1),[!0,Ne]},[xe])}var Pn=Dt(34643);function ke(xe,Ne,Ze,Bn,le,An,Kn,yi){return function(Xn){if(!xe)Ne(Xn);else{var Ei=Ot(Xn),Yi=Ht(Ze),Gi=Ht(Bn),Hi=Yi.includes(Ei),Ki=le.some(function(dn){return Ot(dn)===Ei}),Qi=Ze,ji=le;if(Ki&&!Hi)ji=le.filter(function(dn){return Ot(dn)!==Ei});else{var Ai=Hi?Yi.filter(function(dn){return dn!==Ei}):[].concat((0,ye.Z)(Yi),[Ei]),Zi=An(),Pt;if(Hi){var ni=(0,Pn.S)(Ai,{checked:!1,halfCheckedKeys:Gi},Zi);Pt=ni.checkedKeys}else{var Si=(0,Pn.S)(Ai,!0,Zi);Pt=Si.checkedKeys}var on=en(Pt,An,yi);Qi=Kn(on)}Ne([].concat((0,ye.Z)(ji),(0,ye.Z)(Qi)))}}}function tn(xe,Ne,Ze,Bn,le){return Vt.useMemo(function(){var An=le(Ne),Kn=(0,Be.Z)(An,2),yi=Kn[0],Xn=Kn[1];if(!xe||!Ne.length)return[yi,[],Xn];var Ei=Ht(yi),Yi=Ze(),Gi=(0,Pn.S)(Ei,!0,Yi),Hi=Gi.checkedKeys,Ki=Gi.halfCheckedKeys;return[Bn(Hi),Bn(Ki),Xn]},[xe,Ne,Ze,Bn,le])}var fn=Dt(92310),Jn=Dt.n(fn),Pe=Vt.memo(function(xe){var Ne=xe.children;return Ne},function(xe,Ne){return!Ne.open}),an=Pe;function re(xe){var Ne,Ze=xe.prefixCls,Bn=xe.checked,le=xe.halfChecked,An=xe.disabled,Kn=xe.onClick,yi=xe.disableCheckbox,Xn=Vt.useContext(Qt),Ei=Xn.checkable,Yi=typeof Ei!="boolean"?Ei:null;return Vt.createElement("span",{className:Jn()("".concat(Ze),(Ne={},(0,Nt.Z)(Ne,"".concat(Ze,"-checked"),Bn),(0,Nt.Z)(Ne,"".concat(Ze,"-indeterminate"),!Bn&&le),(0,Nt.Z)(Ne,"".concat(Ze,"-disabled"),An||yi),Ne)),onClick:Kn},Yi)}var hn="__cascader_fix_label__";function di(xe){var Ne=xe.prefixCls,Ze=xe.multiple,Bn=xe.options,le=xe.activeValue,An=xe.prevValuePath,Kn=xe.onToggleOpen,yi=xe.onSelect,Xn=xe.onActive,Ei=xe.checkedSet,Yi=xe.halfCheckedSet,Gi=xe.loadingKeys,Hi=xe.isSelectable,Ki=xe.disabled,Qi="".concat(Ne,"-menu"),ji="".concat(Ne,"-menu-item"),Ai=Vt.useContext(Qt),Zi=Ai.fieldNames,Pt=Ai.changeOnSelect,ni=Ai.expandTrigger,Si=Ai.expandIcon,on=Ai.loadingIcon,dn=Ai.dropdownMenuColumnStyle,pn=Ai.optionRender,_n=ni==="hover",Di=function(we){return Ki||we},Bi=Vt.useMemo(function(){return Bn.map(function(me){var we,ge=me.disabled,Wn=me.disableCheckbox,ai=me[nt],si=(we=me[hn])!==null&&we!==void 0?we:me[Zi.label],ln=me[Zi.value],jn=Xt(me,Zi),ii=ai?ai.map(function(Mn){return Mn[Zi.value]}):[].concat((0,ye.Z)(An),[ln]),ki=Ot(ii),Ri=Gi.includes(ki),Gt=Ei.has(ki),fe=Yi.has(ki);return{disabled:ge,label:si,value:ln,isLeaf:jn,isLoading:Ri,checked:Gt,halfChecked:fe,option:me,disableCheckbox:Wn,fullPath:ii,fullPathKey:ki}})},[Bn,Ei,Zi,Yi,Gi,An]);return Vt.createElement("ul",{className:Qi,role:"menu"},Bi.map(function(me){var we,ge=me.disabled,Wn=me.label,ai=me.value,si=me.isLeaf,ln=me.isLoading,jn=me.checked,ii=me.halfChecked,ki=me.option,Ri=me.fullPath,Gt=me.fullPathKey,fe=me.disableCheckbox,Mn=function(){if(!Di(ge)){var Sn=(0,ye.Z)(Ri);_n&&si&&Sn.pop(),Xn(Sn)}},zn=function(){Hi(ki)&&!Di(ge)&&yi(Ri,si)},De;return typeof ki.title=="string"?De=ki.title:typeof Wn=="string"&&(De=Wn),Vt.createElement("li",{key:Gt,className:Jn()(ji,(we={},(0,Nt.Z)(we,"".concat(ji,"-expand"),!si),(0,Nt.Z)(we,"".concat(ji,"-active"),le===ai||le===Gt),(0,Nt.Z)(we,"".concat(ji,"-disabled"),Di(ge)),(0,Nt.Z)(we,"".concat(ji,"-loading"),ln),we)),style:dn,role:"menuitemcheckbox",title:De,"aria-checked":jn,"data-path-key":Gt,onClick:function(){Mn(),!fe&&(!Ze||si)&&zn()},onDoubleClick:function(){Pt&&Kn(!1)},onMouseEnter:function(){_n&&Mn()},onMouseDown:function(Sn){Sn.preventDefault()}},Ze&&Vt.createElement(re,{prefixCls:"".concat(Ne,"-checkbox"),checked:jn,halfChecked:ii,disabled:Di(ge)||fe,disableCheckbox:fe,onClick:function(Sn){fe||(Sn.stopPropagation(),zn())}}),Vt.createElement("div",{className:"".concat(ji,"-content")},pn?pn(ki):Wn),!ln&&Si&&!si&&Vt.createElement("div",{className:"".concat(ji,"-expand-icon")},Si),ln&&on&&Vt.createElement("div",{className:"".concat(ji,"-loading-icon")},on))}))}var Tt=function(Ne,Ze){var Bn=Vt.useContext(Qt),le=Bn.values,An=le[0],Kn=Vt.useState([]),yi=(0,Be.Z)(Kn,2),Xn=yi[0],Ei=yi[1];return Vt.useEffect(function(){Ne||Ei(An||[])},[Ze,An]),[Xn,Ei]},Et=Tt,St=Dt(10228),Mt=function(xe,Ne,Ze,Bn,le,An,Kn){var yi=Kn.direction,Xn=Kn.searchValue,Ei=Kn.toggleOpen,Yi=Kn.open,Gi=yi==="rtl",Hi=Vt.useMemo(function(){for(var dn=-1,pn=Ne,_n=[],Di=[],Bi=Bn.length,me=oe(Ne,Ze),we=function(ln){var jn=pn.findIndex(function(ii,ki){return(me[ki]?Ot(me[ki]):ii[Ze.value])===Bn[ln]});if(jn===-1)return 1;dn=jn,_n.push(dn),Di.push(Bn[ln]),pn=pn[dn][Ze.children]},ge=0;ge<Bi&&pn&&!we(ge);ge+=1);for(var Wn=Ne,ai=0;ai<_n.length-1;ai+=1)Wn=Wn[_n[ai]][Ze.children];return[Di,dn,Wn,me]},[Bn,Ze,Ne]),Ki=(0,Be.Z)(Hi,4),Qi=Ki[0],ji=Ki[1],Ai=Ki[2],Zi=Ki[3],Pt=function(pn){le(pn)},ni=function(pn){var _n=Ai.length,Di=ji;Di===-1&&pn<0&&(Di=_n);for(var Bi=0;Bi<_n;Bi+=1){Di=(Di+pn+_n)%_n;var me=Ai[Di];if(me&&!me.disabled){var we=Qi.slice(0,-1).concat(Zi[Di]?Ot(Zi[Di]):me[Ze.value]);Pt(we);return}}},Si=function(){if(Qi.length>1){var pn=Qi.slice(0,-1);Pt(pn)}else Ei(!1)},on=function(){var pn,_n=((pn=Ai[ji])===null||pn===void 0?void 0:pn[Ze.children])||[],Di=_n.find(function(me){return!me.disabled});if(Di){var Bi=[].concat((0,ye.Z)(Qi),[Di[Ze.value]]);Pt(Bi)}};Vt.useImperativeHandle(xe,function(){return{onKeyDown:function(pn){var _n=pn.which;switch(_n){case St.Z.UP:case St.Z.DOWN:{var Di=0;_n===St.Z.UP?Di=-1:_n===St.Z.DOWN&&(Di=1),Di!==0&&ni(Di);break}case St.Z.LEFT:{if(Xn)break;Gi?on():Si();break}case St.Z.RIGHT:{if(Xn)break;Gi?Si():on();break}case St.Z.BACKSPACE:{Xn||Si();break}case St.Z.ENTER:{if(Qi.length){var Bi=Ai[ji],me=(Bi==null?void 0:Bi[nt])||[];me.length?An(me.map(function(we){return we[Ze.value]}),me[me.length-1]):An(Qi,Ai[ji])}break}case St.Z.ESC:Ei(!1),Yi&&pn.stopPropagation()}},onKeyUp:function(){}}})},zt=Vt.forwardRef(function(xe,Ne){var Ze,Bn,le,An=xe.prefixCls,Kn=xe.multiple,yi=xe.searchValue,Xn=xe.toggleOpen,Ei=xe.notFoundContent,Yi=xe.direction,Gi=xe.open,Hi=xe.disabled,Ki=Vt.useRef(null),Qi=Yi==="rtl",ji=Vt.useContext(Qt),Ai=ji.options,Zi=ji.values,Pt=ji.halfValues,ni=ji.fieldNames,Si=ji.changeOnSelect,on=ji.onSelect,dn=ji.searchOptions,pn=ji.dropdownPrefixCls,_n=ji.loadData,Di=ji.expandTrigger,Bi=pn||An,me=Vt.useState([]),we=(0,Be.Z)(me,2),ge=we[0],Wn=we[1],ai=function(Ni){if(!(!_n||yi)){var Pi=Rn(Ni,Ai,ni),bi=Pi.map(function(dr){var br=dr.option;return br}),Ge=bi[bi.length-1];if(Ge&&!Xt(Ge,ni)){var Xi=Ot(Ni);Wn(function(dr){return[].concat((0,ye.Z)(dr),[Xi])}),_n(bi)}}};Vt.useEffect(function(){ge.length&&ge.forEach(function(Yn){var Ni=te(Yn),Pi=Rn(Ni,Ai,ni,!0).map(function(Ge){var Xi=Ge.option;return Xi}),bi=Pi[Pi.length-1];(!bi||bi[ni.children]||Xt(bi,ni))&&Wn(function(Ge){return Ge.filter(function(Xi){return Xi!==Yn})})})},[Ai,ge,ni]);var si=Vt.useMemo(function(){return new Set(Ht(Zi))},[Zi]),ln=Vt.useMemo(function(){return new Set(Ht(Pt))},[Pt]),jn=Et(Kn,Gi),ii=(0,Be.Z)(jn,2),ki=ii[0],Ri=ii[1],Gt=function(Ni){Ri(Ni),ai(Ni)},fe=function(Ni){if(Hi)return!1;var Pi=Ni.disabled,bi=Xt(Ni,ni);return!Pi&&(bi||Si||Kn)},Mn=function(Ni,Pi){var bi=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1;on(Ni),!Kn&&(Pi||Si&&(Di==="hover"||bi))&&Xn(!1)},zn=Vt.useMemo(function(){return yi?dn:Ai},[yi,dn,Ai]),De=Vt.useMemo(function(){for(var Yn=[{options:zn}],Ni=zn,Pi=oe(Ni,ni),bi=function(){var dr=ki[Ge],br=Ni.find(function(Vn,vi){return(Pi[vi]?Ot(Pi[vi]):Vn[ni.value])===dr}),Ue=br==null?void 0:br[ni.children];if(!(Ue!=null&&Ue.length))return 1;Ni=Ue,Yn.push({options:Ue})},Ge=0;Ge<ki.length&&!bi();Ge+=1);return Yn},[zn,ki,ni]),kn=function(Ni,Pi){fe(Pi)&&Mn(Ni,Xt(Pi,ni),!0)};Mt(Ne,zn,ni,ki,Gt,kn,{direction:Yi,searchValue:yi,toggleOpen:Xn,open:Gi}),Vt.useEffect(function(){if(!yi)for(var Yn=0;Yn<ki.length;Yn+=1){var Ni,Pi=ki.slice(0,Yn+1),bi=Ot(Pi),Ge=(Ni=Ki.current)===null||Ni===void 0?void 0:Ni.querySelector('li[data-path-key="'.concat(bi.replace(/\\{0,2}"/g,'\\"'),'"]'));Ge&&ve(Ge)}},[ki,yi]);var Sn=!((Ze=De[0])!==null&&Ze!==void 0&&(Ze=Ze.options)!==null&&Ze!==void 0&&Ze.length),Fn=[(Bn={},(0,Nt.Z)(Bn,ni.value,"__EMPTY__"),(0,Nt.Z)(Bn,hn,Ei),(0,Nt.Z)(Bn,"disabled",!0),Bn)],ei=(0,se.Z)((0,se.Z)({},xe),{},{multiple:!Sn&&Kn,onSelect:Mn,onActive:Gt,onToggleOpen:Xn,checkedSet:si,halfCheckedSet:ln,loadingKeys:ge,isSelectable:fe}),On=Sn?[{options:Fn}]:De,Qn=On.map(function(Yn,Ni){var Pi=ki.slice(0,Ni),bi=ki[Ni];return Vt.createElement(di,(0,Ft.Z)({key:Ni},ei,{prefixCls:Bi,options:Yn.options,prevValuePath:Pi,activeValue:bi}))});return Vt.createElement(an,{open:Gi},Vt.createElement("div",{className:Jn()("".concat(Bi,"-menus"),(le={},(0,Nt.Z)(le,"".concat(Bi,"-menu-empty"),Sn),(0,Nt.Z)(le,"".concat(Bi,"-rtl"),Qi),le)),ref:Ki},Qn))}),kt=zt,Ut=Vt.forwardRef(function(xe,Ne){var Ze=(0,Rt.lk)();return Vt.createElement(kt,(0,Ft.Z)({},xe,Ze,{ref:Ne}))}),Oe=Ut,Te=Dt(70425);function _e(){}function ee(xe){var Ne,Ze=xe,Bn=Ze.prefixCls,le=Bn===void 0?"rc-cascader":Bn,An=Ze.style,Kn=Ze.className,yi=Ze.options,Xn=Ze.checkable,Ei=Ze.defaultValue,Yi=Ze.value,Gi=Ze.fieldNames,Hi=Ze.changeOnSelect,Ki=Ze.onChange,Qi=Ze.showCheckedStrategy,ji=Ze.loadData,Ai=Ze.expandTrigger,Zi=Ze.expandIcon,Pt=Zi===void 0?">":Zi,ni=Ze.loadingIcon,Si=Ze.direction,on=Ze.notFoundContent,dn=on===void 0?"Not Found":on,pn=Ze.disabled,_n=!!Xn,Di=(0,Te.C8)(Ei,{value:Yi,postState:Ye}),Bi=(0,Be.Z)(Di,2),me=Bi[0],we=Bi[1],ge=Vt.useMemo(function(){return _t(Gi)},[JSON.stringify(Gi)]),Wn=jt(ge,yi),ai=(0,Be.Z)(Wn,3),si=ai[0],ln=ai[1],jn=ai[2],ii=un(si,ge),ki=tn(_n,me,ln,jn,ii),Ri=(0,Be.Z)(ki,3),Gt=Ri[0],fe=Ri[1],Mn=Ri[2],zn=(0,Te.zX)(function(On){if(we(On),Ki){var Qn=Ye(On),Yn=Qn.map(function(bi){return Rn(bi,si,ge).map(function(Ge){return Ge.option})}),Ni=_n?Qn:Qn[0],Pi=_n?Yn:Yn[0];Ki(Ni,Pi)}}),De=ke(_n,zn,Gt,fe,Mn,ln,jn,Qi),kn=(0,Te.zX)(function(On){De(On)}),Sn=Vt.useMemo(function(){return{options:si,fieldNames:ge,values:Gt,halfValues:fe,changeOnSelect:Hi,onSelect:kn,checkable:Xn,searchOptions:[],dropdownPrefixCls:void 0,loadData:ji,expandTrigger:Ai,expandIcon:Pt,loadingIcon:ni,dropdownMenuColumnStyle:void 0}},[si,ge,Gt,fe,Hi,kn,Xn,ji,Ai,Pt,ni]),Fn="".concat(le,"-panel"),ei=!si.length;return Vt.createElement(Qt.Provider,{value:Sn},Vt.createElement("div",{className:Jn()(Fn,(Ne={},(0,Nt.Z)(Ne,"".concat(Fn,"-rtl"),Si==="rtl"),(0,Nt.Z)(Ne,"".concat(Fn,"-empty"),ei),Ne),Kn),style:An},ei?dn:Vt.createElement(kt,{prefixCls:le,searchValue:"",multiple:_n,toggleOpen:_e,open:!0,direction:Si,disabled:pn})))}function de(xe){var Ne=xe.onPopupVisibleChange,Ze=xe.popupVisible,Bn=xe.popupClassName,le=xe.popupPlacement;warning(!Ne,"`onPopupVisibleChange` is deprecated. Please use `onDropdownVisibleChange` instead."),warning(Ze===void 0,"`popupVisible` is deprecated. Please use `open` instead."),warning(Bn===void 0,"`popupClassName` is deprecated. Please use `dropdownClassName` instead."),warning(le===void 0,"`popupPlacement` is deprecated. Please use `placement` instead.")}function pe(xe,Ne){if(xe){var Ze=function Bn(le){for(var An=0;An<le.length;An++){var Kn=le[An];if(Kn[Ne==null?void 0:Ne.value]===null)return warning(!1,"`value` in Cascader options should not be `null`."),!0;if(Array.isArray(Kn[Ne==null?void 0:Ne.children])&&Bn(Kn[Ne==null?void 0:Ne.children]))return!0}};Ze(xe)}}var be=null,ze=["id","prefixCls","fieldNames","defaultValue","value","changeOnSelect","onChange","displayRender","checkable","autoClearSearchValue","searchValue","onSearch","showSearch","expandTrigger","options","dropdownPrefixCls","loadData","popupVisible","open","popupClassName","dropdownClassName","dropdownMenuColumnStyle","dropdownStyle","popupPlacement","placement","onDropdownVisibleChange","onPopupVisibleChange","expandIcon","loadingIcon","children","dropdownMatchSelectWidth","showCheckedStrategy","optionRender"],rn=Vt.forwardRef(function(xe,Ne){var Ze=xe.id,Bn=xe.prefixCls,le=Bn===void 0?"rc-cascader":Bn,An=xe.fieldNames,Kn=xe.defaultValue,yi=xe.value,Xn=xe.changeOnSelect,Ei=xe.onChange,Yi=xe.displayRender,Gi=xe.checkable,Hi=xe.autoClearSearchValue,Ki=Hi===void 0?!0:Hi,Qi=xe.searchValue,ji=xe.onSearch,Ai=xe.showSearch,Zi=xe.expandTrigger,Pt=xe.options,ni=xe.dropdownPrefixCls,Si=xe.loadData,on=xe.popupVisible,dn=xe.open,pn=xe.popupClassName,_n=xe.dropdownClassName,Di=xe.dropdownMenuColumnStyle,Bi=xe.dropdownStyle,me=xe.popupPlacement,we=xe.placement,ge=xe.onDropdownVisibleChange,Wn=xe.onPopupVisibleChange,ai=xe.expandIcon,si=ai===void 0?">":ai,ln=xe.loadingIcon,jn=xe.children,ii=xe.dropdownMatchSelectWidth,ki=ii===void 0?!1:ii,Ri=xe.showCheckedStrategy,Gt=Ri===void 0?xt:Ri,fe=xe.optionRender,Mn=(0,Se.Z)(xe,ze),zn=(0,ie.ZP)(Ze),De=!!Gi,kn=(0,ce.Z)(Kn,{value:yi,postState:Ye}),Sn=(0,Be.Z)(kn,2),Fn=Sn[0],ei=Sn[1],On=Vt.useMemo(function(){return _t(An)},[JSON.stringify(An)]),Qn=jt(On,Pt),Yn=(0,Be.Z)(Qn,3),Ni=Yn[0],Pi=Yn[1],bi=Yn[2],Ge=(0,ce.Z)("",{value:Qi,postState:function(gi){return gi||""}}),Xi=(0,Be.Z)(Ge,2),dr=Xi[0],br=Xi[1],Ue=function(gi,ci){br(gi),ci.source!=="blur"&&ji&&ji(gi)},Vn=We(Ai),vi=(0,Be.Z)(Vn,2),pi=vi[0],Fi=vi[1],Wi=pt(dr,Ni,On,ni||le,Fi,Xn||De),Vi=un(Ni,On),pr=tn(De,Fn,Pi,bi,Vi),or=(0,Be.Z)(pr,3),hr=or[0],Xe=or[1],nr=or[2],qe=Vt.useMemo(function(){var Hn=Ht(hr),gi=en(Hn,Pi,Gt);return[].concat((0,ye.Z)(nr),(0,ye.Z)(bi(gi)))},[hr,Pi,bi,nr,Gt]),xi=wn(qe,Ni,On,De,Yi),ir=(0,je.Z)(function(Hn){if(ei(Hn),Ei){var gi=Ye(Hn),ci=gi.map(function(Dn){return Rn(Dn,Ni,On).map(function(Gn){return Gn.option})}),ti=De?gi:gi[0],sn=De?ci:ci[0];Ei(ti,sn)}}),fr=ke(De,ir,hr,Xe,nr,Pi,bi,Gt),Br=(0,je.Z)(function(Hn){(!De||Ki)&&br(""),fr(Hn)}),kr=function(gi,ci){if(ci.type==="clear"){ir([]);return}var ti=ci.values[0],sn=ti.valueCells;Br(sn)},rr=dn!==void 0?dn:on,Kr=_n||pn,Ae=we||me,gn=function(gi){ge==null||ge(gi),Wn==null||Wn(gi)},Me=Vt.useMemo(function(){return{options:Ni,fieldNames:On,values:hr,halfValues:Xe,changeOnSelect:Xn,onSelect:Br,checkable:Gi,searchOptions:Wi,dropdownPrefixCls:ni,loadData:Si,expandTrigger:Zi,expandIcon:si,loadingIcon:ln,dropdownMenuColumnStyle:Di,optionRender:fe}},[Ni,On,hr,Xe,Xn,Br,Gi,Wi,ni,Si,Zi,si,ln,Di,fe]),At=!(dr?Wi:Ni).length,Nn=dr&&Fi.matchInputWidth||At?{}:{minWidth:"auto"};return Vt.createElement(Qt.Provider,{value:Me},Vt.createElement(Rt.Ac,(0,Ft.Z)({},Mn,{ref:Ne,id:zn,prefixCls:le,autoClearSearchValue:Ki,dropdownMatchSelectWidth:ki,dropdownStyle:(0,se.Z)((0,se.Z)({},Nn),Bi),displayValues:xi,onDisplayValuesChange:kr,mode:De?"multiple":void 0,searchValue:dr,onSearch:Ue,showSearch:pi,OptionList:Oe,emptyOptions:At,open:rr,dropdownClassName:Kr,placement:Ae,onDropdownVisibleChange:gn,getRawInputElement:function(){return jn}})))});rn.SHOW_PARENT=xt,rn.SHOW_CHILD=Lt,rn.Panel=ee;var He=rn,yn=He},23425:function(Tn,oi,Dt){"use strict";Dt.d(oi,{Z:function(){return Ht}});var Ft=Dt(87075),se=Dt(71409),ye=Dt(28788),Be=Dt(89490),Se=Dt(11036),Rt=Dt(92310),ie=Dt.n(Rt),je=Dt(18929),ce=Dt(10228),Vt=Dt(26112),Qe=Dt(48736),Qt=Dt(59301),Je=Dt(17119),Nt=[10,20,50,100],nt=function(_t){var Xt=_t.pageSizeOptions,ve=Xt===void 0?Nt:Xt,oe=_t.locale,Re=_t.changeSize,Ye=_t.pageSize,en=_t.goButton,Rn=_t.quickGo,wn=_t.rootPrefixCls,un=_t.disabled,vn=_t.buildOptionText,ne=_t.showSizeChanger,jt=_t.sizeChangerRender,Fe=Qt.useState(""),We=(0,Se.Z)(Fe,2),Pn=We[0],ke=We[1],tn=function(){return!Pn||Number.isNaN(Pn)?void 0:Number(Pn)},fn=typeof vn=="function"?vn:function(St){return"".concat(St," ").concat(oe.items_per_page)},Jn=function(Mt){ke(Mt.target.value)},Pe=function(Mt){en||Pn===""||(ke(""),!(Mt.relatedTarget&&(Mt.relatedTarget.className.indexOf("".concat(wn,"-item-link"))>=0||Mt.relatedTarget.className.indexOf("".concat(wn,"-item"))>=0))&&(Rn==null||Rn(tn())))},an=function(Mt){Pn!==""&&(Mt.keyCode===ce.Z.ENTER||Mt.type==="click")&&(ke(""),Rn==null||Rn(tn()))},re=function(){return ve.some(function(Mt){return Mt.toString()===Ye.toString()})?ve:ve.concat([Ye]).sort(function(Mt,zt){var kt=Number.isNaN(Number(Mt))?0:Number(Mt),Ut=Number.isNaN(Number(zt))?0:Number(zt);return kt-Ut})},hn="".concat(wn,"-options");if(!ne&&!Rn)return null;var di=null,Tt=null,Et=null;return ne&&jt&&(di=jt({disabled:un,size:Ye,onSizeChange:function(Mt){Re==null||Re(Number(Mt))},"aria-label":oe.page_size,className:"".concat(hn,"-size-changer"),options:re().map(function(St){return{label:fn(St),value:St}})})),Rn&&(en&&(Et=typeof en=="boolean"?Qt.createElement("button",{type:"button",onClick:an,onKeyUp:an,disabled:un,className:"".concat(hn,"-quick-jumper-button")},oe.jump_to_confirm):Qt.createElement("span",{onClick:an,onKeyUp:an},en)),Tt=Qt.createElement("div",{className:"".concat(hn,"-quick-jumper")},oe.jump_to,Qt.createElement("input",{disabled:un,type:"text",value:Pn,onChange:Jn,onKeyUp:an,onBlur:Pe,"aria-label":oe.page}),oe.page,Et)),Qt.createElement("li",{className:hn},di,Tt)},et=nt,ct=function(_t){var Xt=_t.rootPrefixCls,ve=_t.page,oe=_t.active,Re=_t.className,Ye=_t.showTitle,en=_t.onClick,Rn=_t.onKeyPress,wn=_t.itemRender,un="".concat(Xt,"-item"),vn=ie()(un,"".concat(un,"-").concat(ve),(0,Ft.Z)((0,Ft.Z)({},"".concat(un,"-active"),oe),"".concat(un,"-disabled"),!ve),Re),ne=function(){en(ve)},jt=function(Pn){Rn(Pn,en,ve)},Fe=wn(ve,"page",Qt.createElement("a",{rel:"nofollow"},ve));return Fe?Qt.createElement("li",{title:Ye?String(ve):null,className:vn,onClick:ne,onKeyDown:jt,tabIndex:0},Fe):null},lt=ct,pt=function(_t,Xt,ve){return ve};function vt(){}function xt(te){var _t=Number(te);return typeof _t=="number"&&!Number.isNaN(_t)&&isFinite(_t)&&Math.floor(_t)===_t}function Lt(te,_t,Xt){var ve=typeof te=="undefined"?_t:te;return Math.floor((Xt-1)/ve)+1}var Ot=function(_t){var Xt=_t.prefixCls,ve=Xt===void 0?"rc-pagination":Xt,oe=_t.selectPrefixCls,Re=oe===void 0?"rc-select":oe,Ye=_t.className,en=_t.current,Rn=_t.defaultCurrent,wn=Rn===void 0?1:Rn,un=_t.total,vn=un===void 0?0:un,ne=_t.pageSize,jt=_t.defaultPageSize,Fe=jt===void 0?10:jt,We=_t.onChange,Pn=We===void 0?vt:We,ke=_t.hideOnSinglePage,tn=_t.align,fn=_t.showPrevNextJumpers,Jn=fn===void 0?!0:fn,Pe=_t.showQuickJumper,an=_t.showLessItems,re=_t.showTitle,hn=re===void 0?!0:re,di=_t.onShowSizeChange,Tt=di===void 0?vt:di,Et=_t.locale,St=Et===void 0?Je.Z:Et,Mt=_t.style,zt=_t.totalBoundaryShowSizeChanger,kt=zt===void 0?50:zt,Ut=_t.disabled,Oe=_t.simple,Te=_t.showTotal,_e=_t.showSizeChanger,ee=_e===void 0?vn>kt:_e,de=_t.sizeChangerRender,pe=_t.pageSizeOptions,be=_t.itemRender,ze=be===void 0?pt:be,rn=_t.jumpPrevIcon,He=_t.jumpNextIcon,yn=_t.prevIcon,xe=_t.nextIcon,Ne=Qt.useRef(null),Ze=(0,je.Z)(10,{value:ne,defaultValue:Fe}),Bn=(0,Se.Z)(Ze,2),le=Bn[0],An=Bn[1],Kn=(0,je.Z)(1,{value:en,defaultValue:wn,postState:function(ir){return Math.max(1,Math.min(ir,Lt(void 0,le,vn)))}}),yi=(0,Se.Z)(Kn,2),Xn=yi[0],Ei=yi[1],Yi=Qt.useState(Xn),Gi=(0,Se.Z)(Yi,2),Hi=Gi[0],Ki=Gi[1];(0,Qt.useEffect)(function(){Ki(Xn)},[Xn]);var Qi=Pn!==vt,ji="current"in _t,Ai=Math.max(1,Xn-(an?3:5)),Zi=Math.min(Lt(void 0,le,vn),Xn+(an?3:5));function Pt(xi,ir){var fr=xi||Qt.createElement("button",{type:"button","aria-label":ir,className:"".concat(ve,"-item-link")});return typeof xi=="function"&&(fr=Qt.createElement(xi,(0,Be.Z)({},_t))),fr}function ni(xi){var ir=xi.target.value,fr=Lt(void 0,le,vn),Br;return ir===""?Br=ir:Number.isNaN(Number(ir))?Br=Hi:ir>=fr?Br=fr:Br=Number(ir),Br}function Si(xi){return xt(xi)&&xi!==Xn&&xt(vn)&&vn>0}var on=vn>le?Pe:!1;function dn(xi){(xi.keyCode===ce.Z.UP||xi.keyCode===ce.Z.DOWN)&&xi.preventDefault()}function pn(xi){var ir=ni(xi);switch(ir!==Hi&&Ki(ir),xi.keyCode){case ce.Z.ENTER:Bi(ir);break;case ce.Z.UP:Bi(ir-1);break;case ce.Z.DOWN:Bi(ir+1);break;default:break}}function _n(xi){Bi(ni(xi))}function Di(xi){var ir=Lt(xi,le,vn),fr=Xn>ir&&ir!==0?ir:Xn;An(xi),Ki(fr),Tt==null||Tt(Xn,xi),Ei(fr),Pn==null||Pn(fr,xi)}function Bi(xi){if(Si(xi)&&!Ut){var ir=Lt(void 0,le,vn),fr=xi;return xi>ir?fr=ir:xi<1&&(fr=1),fr!==Hi&&Ki(fr),Ei(fr),Pn==null||Pn(fr,le),fr}return Xn}var me=Xn>1,we=Xn<Lt(void 0,le,vn);function ge(){me&&Bi(Xn-1)}function Wn(){we&&Bi(Xn+1)}function ai(){Bi(Ai)}function si(){Bi(Zi)}function ln(xi,ir){if(xi.key==="Enter"||xi.charCode===ce.Z.ENTER||xi.keyCode===ce.Z.ENTER){for(var fr=arguments.length,Br=new Array(fr>2?fr-2:0),kr=2;kr<fr;kr++)Br[kr-2]=arguments[kr];ir.apply(void 0,Br)}}function jn(xi){ln(xi,ge)}function ii(xi){ln(xi,Wn)}function ki(xi){ln(xi,ai)}function Ri(xi){ln(xi,si)}function Gt(xi){var ir=ze(xi,"prev",Pt(yn,"prev page"));return Qt.isValidElement(ir)?Qt.cloneElement(ir,{disabled:!me}):ir}function fe(xi){var ir=ze(xi,"next",Pt(xe,"next page"));return Qt.isValidElement(ir)?Qt.cloneElement(ir,{disabled:!we}):ir}function Mn(xi){(xi.type==="click"||xi.keyCode===ce.Z.ENTER)&&Bi(Hi)}var zn=null,De=(0,Vt.Z)(_t,{aria:!0,data:!0}),kn=Te&&Qt.createElement("li",{className:"".concat(ve,"-total-text")},Te(vn,[vn===0?0:(Xn-1)*le+1,Xn*le>vn?vn:Xn*le])),Sn=null,Fn=Lt(void 0,le,vn);if(ke&&vn<=le)return null;var ei=[],On={rootPrefixCls:ve,onClick:Bi,onKeyPress:ln,showTitle:hn,itemRender:ze,page:-1},Qn=Xn-1>0?Xn-1:0,Yn=Xn+1<Fn?Xn+1:Fn,Ni=Pe&&Pe.goButton,Pi=(0,ye.Z)(Oe)==="object"?Oe.readOnly:!Oe,bi=Ni,Ge=null;Oe&&(Ni&&(typeof Ni=="boolean"?bi=Qt.createElement("button",{type:"button",onClick:Mn,onKeyUp:Mn},St.jump_to_confirm):bi=Qt.createElement("span",{onClick:Mn,onKeyUp:Mn},Ni),bi=Qt.createElement("li",{title:hn?"".concat(St.jump_to).concat(Xn,"/").concat(Fn):null,className:"".concat(ve,"-simple-pager")},bi)),Ge=Qt.createElement("li",{title:hn?"".concat(Xn,"/").concat(Fn):null,className:"".concat(ve,"-simple-pager")},Pi?Hi:Qt.createElement("input",{type:"text","aria-label":St.jump_to,value:Hi,disabled:Ut,onKeyDown:dn,onKeyUp:pn,onChange:pn,onBlur:_n,size:3}),Qt.createElement("span",{className:"".concat(ve,"-slash")},"/"),Fn));var Xi=an?1:2;if(Fn<=3+Xi*2){Fn||ei.push(Qt.createElement(lt,(0,se.Z)({},On,{key:"noPager",page:1,className:"".concat(ve,"-item-disabled")})));for(var dr=1;dr<=Fn;dr+=1)ei.push(Qt.createElement(lt,(0,se.Z)({},On,{key:dr,page:dr,active:Xn===dr})))}else{var br=an?St.prev_3:St.prev_5,Ue=an?St.next_3:St.next_5,Vn=ze(Ai,"jump-prev",Pt(rn,"prev page")),vi=ze(Zi,"jump-next",Pt(He,"next page"));Jn&&(zn=Vn?Qt.createElement("li",{title:hn?br:null,key:"prev",onClick:ai,tabIndex:0,onKeyDown:ki,className:ie()("".concat(ve,"-jump-prev"),(0,Ft.Z)({},"".concat(ve,"-jump-prev-custom-icon"),!!rn))},Vn):null,Sn=vi?Qt.createElement("li",{title:hn?Ue:null,key:"next",onClick:si,tabIndex:0,onKeyDown:Ri,className:ie()("".concat(ve,"-jump-next"),(0,Ft.Z)({},"".concat(ve,"-jump-next-custom-icon"),!!He))},vi):null);var pi=Math.max(1,Xn-Xi),Fi=Math.min(Xn+Xi,Fn);Xn-1<=Xi&&(Fi=1+Xi*2),Fn-Xn<=Xi&&(pi=Fn-Xi*2);for(var Wi=pi;Wi<=Fi;Wi+=1)ei.push(Qt.createElement(lt,(0,se.Z)({},On,{key:Wi,page:Wi,active:Xn===Wi})));if(Xn-1>=Xi*2&&Xn!==3&&(ei[0]=Qt.cloneElement(ei[0],{className:ie()("".concat(ve,"-item-after-jump-prev"),ei[0].props.className)}),ei.unshift(zn)),Fn-Xn>=Xi*2&&Xn!==Fn-2){var Vi=ei[ei.length-1];ei[ei.length-1]=Qt.cloneElement(Vi,{className:ie()("".concat(ve,"-item-before-jump-next"),Vi.props.className)}),ei.push(Sn)}pi!==1&&ei.unshift(Qt.createElement(lt,(0,se.Z)({},On,{key:1,page:1}))),Fi!==Fn&&ei.push(Qt.createElement(lt,(0,se.Z)({},On,{key:Fn,page:Fn})))}var pr=Gt(Qn);if(pr){var or=!me||!Fn;pr=Qt.createElement("li",{title:hn?St.prev_page:null,onClick:ge,tabIndex:or?null:0,onKeyDown:jn,className:ie()("".concat(ve,"-prev"),(0,Ft.Z)({},"".concat(ve,"-disabled"),or)),"aria-disabled":or},pr)}var hr=fe(Yn);if(hr){var Xe,nr;Oe?(Xe=!we,nr=me?0:null):(Xe=!we||!Fn,nr=Xe?null:0),hr=Qt.createElement("li",{title:hn?St.next_page:null,onClick:Wn,tabIndex:nr,onKeyDown:ii,className:ie()("".concat(ve,"-next"),(0,Ft.Z)({},"".concat(ve,"-disabled"),Xe)),"aria-disabled":Xe},hr)}var qe=ie()(ve,Ye,(0,Ft.Z)((0,Ft.Z)((0,Ft.Z)((0,Ft.Z)((0,Ft.Z)({},"".concat(ve,"-start"),tn==="start"),"".concat(ve,"-center"),tn==="center"),"".concat(ve,"-end"),tn==="end"),"".concat(ve,"-simple"),Oe),"".concat(ve,"-disabled"),Ut));return Qt.createElement("ul",(0,se.Z)({className:qe,style:Mt,ref:Ne},De),kn,pr,Oe?Ge:ei,hr,Qt.createElement(et,{locale:St,rootPrefixCls:ve,disabled:Ut,selectPrefixCls:Re,changeSize:Di,pageSize:le,pageSizeOptions:pe,quickGo:on?Bi:null,goButton:bi,showSizeChanger:ee,sizeChangerRender:de}))},Ht=Ot},25930:function(Tn,oi,Dt){"use strict";Dt.d(oi,{Cd:function(){return ve}});var Ft=Dt(71409),se=Dt(89490),ye=Dt(39224),Be=Dt(59301),Se=Dt(92310),Rt=Dt.n(Se),ie={percent:0,prefixCls:"rc-progress",strokeColor:"#2db7f5",strokeLinecap:"round",strokeWidth:1,trailColor:"#D9D9D9",trailWidth:1,gapPosition:"bottom"},je=function(){var Ye=(0,Be.useRef)([]),en=(0,Be.useRef)(null);return(0,Be.useEffect)(function(){var Rn=Date.now(),wn=!1;Ye.current.forEach(function(un){if(un){wn=!0;var vn=un.style;vn.transitionDuration=".3s, .3s, .3s, .06s",en.current&&Rn-en.current<100&&(vn.transitionDuration="0s, 0s")}}),wn&&(en.current=Date.now())}),Ye.current},ce=["className","percent","prefixCls","strokeColor","strokeLinecap","strokeWidth","style","trailColor","trailWidth","transition"],Vt=function(Ye){var en=(0,se.Z)((0,se.Z)({},ie),Ye),Rn=en.className,wn=en.percent,un=en.prefixCls,vn=en.strokeColor,ne=en.strokeLinecap,jt=en.strokeWidth,Fe=en.style,We=en.trailColor,Pn=en.trailWidth,ke=en.transition,tn=(0,ye.Z)(en,ce);delete tn.gapPosition;var fn=Array.isArray(wn)?wn:[wn],Jn=Array.isArray(vn)?vn:[vn],Pe=je(),an=jt/2,re=100-jt/2,hn="M ".concat(ne==="round"?an:0,",").concat(an,`
|
|
L `).concat(ne==="round"?re:100,",").concat(an),di="0 0 100 ".concat(jt),Tt=0;return Be.createElement("svg",(0,Ft.Z)({className:Rt()("".concat(un,"-line"),Rn),viewBox:di,preserveAspectRatio:"none",style:Fe},tn),Be.createElement("path",{className:"".concat(un,"-line-trail"),d:hn,strokeLinecap:ne,stroke:We,strokeWidth:Pn||jt,fillOpacity:"0"}),fn.map(function(Et,St){var Mt=1;switch(ne){case"round":Mt=1-jt/100;break;case"square":Mt=1-jt/2/100;break;default:Mt=1;break}var zt={strokeDasharray:"".concat(Et*Mt,"px, 100px"),strokeDashoffset:"-".concat(Tt,"px"),transition:ke||"stroke-dashoffset 0.3s ease 0s, stroke-dasharray .3s ease 0s, stroke 0.3s linear"},kt=Jn[St]||Jn[Jn.length-1];return Tt+=Et,Be.createElement("path",{key:St,className:"".concat(un,"-line-path"),d:hn,strokeLinecap:ne,stroke:kt,strokeWidth:jt,fillOpacity:"0",ref:function(Oe){Pe[St]=Oe},style:zt})}))},Qe=Vt,Qt=Dt(28788),Je=Dt(11036),Nt=Dt(47273),nt=0,et=(0,Nt.Z)();function ct(){var Re;return et?(Re=nt,nt+=1):Re="TEST_OR_SSR",Re}var lt=function(Re){var Ye=Be.useState(),en=(0,Je.Z)(Ye,2),Rn=en[0],wn=en[1];return Be.useEffect(function(){wn("rc_progress_".concat(ct()))},[]),Re||Rn},pt=function(Ye){var en=Ye.bg,Rn=Ye.children;return Be.createElement("div",{style:{width:"100%",height:"100%",background:en}},Rn)};function vt(Re,Ye){return Object.keys(Re).map(function(en){var Rn=parseFloat(en),wn="".concat(Math.floor(Rn*Ye),"%");return"".concat(Re[en]," ").concat(wn)})}var xt=Be.forwardRef(function(Re,Ye){var en=Re.prefixCls,Rn=Re.color,wn=Re.gradientId,un=Re.radius,vn=Re.style,ne=Re.ptg,jt=Re.strokeLinecap,Fe=Re.strokeWidth,We=Re.size,Pn=Re.gapDegree,ke=Rn&&(0,Qt.Z)(Rn)==="object",tn=ke?"#FFF":void 0,fn=We/2,Jn=Be.createElement("circle",{className:"".concat(en,"-circle-path"),r:un,cx:fn,cy:fn,stroke:tn,strokeLinecap:jt,strokeWidth:Fe,opacity:ne===0?0:1,style:vn,ref:Ye});if(!ke)return Jn;var Pe="".concat(wn,"-conic"),an=Pn?"".concat(180+Pn/2,"deg"):"0deg",re=vt(Rn,(360-Pn)/360),hn=vt(Rn,1),di="conic-gradient(from ".concat(an,", ").concat(re.join(", "),")"),Tt="linear-gradient(to ".concat(Pn?"bottom":"top",", ").concat(hn.join(", "),")");return Be.createElement(Be.Fragment,null,Be.createElement("mask",{id:Pe},Jn),Be.createElement("foreignObject",{x:0,y:0,width:We,height:We,mask:"url(#".concat(Pe,")")},Be.createElement(pt,{bg:Tt},Be.createElement(pt,{bg:di}))))}),Lt=xt,Ot=100,Ht=function(Ye,en,Rn,wn,un,vn,ne,jt,Fe,We){var Pn=arguments.length>10&&arguments[10]!==void 0?arguments[10]:0,ke=Rn/100*360*((360-vn)/360),tn=vn===0?0:{bottom:0,top:180,left:90,right:-90}[ne],fn=(100-wn)/100*en;Fe==="round"&&wn!==100&&(fn+=We/2,fn>=en&&(fn=en-.01));var Jn=Ot/2;return{stroke:typeof jt=="string"?jt:void 0,strokeDasharray:"".concat(en,"px ").concat(Ye),strokeDashoffset:fn+Pn,transform:"rotate(".concat(un+ke+tn,"deg)"),transformOrigin:"".concat(Jn,"px ").concat(Jn,"px"),transition:"stroke-dashoffset .3s ease 0s, stroke-dasharray .3s ease 0s, stroke .3s, stroke-width .06s ease .3s, opacity .3s ease 0s",fillOpacity:0}},te=["id","prefixCls","steps","strokeWidth","trailWidth","gapDegree","gapPosition","trailColor","strokeLinecap","style","className","strokeColor","percent"];function _t(Re){var Ye=Re!=null?Re:[];return Array.isArray(Ye)?Ye:[Ye]}var Xt=function(Ye){var en=(0,se.Z)((0,se.Z)({},ie),Ye),Rn=en.id,wn=en.prefixCls,un=en.steps,vn=en.strokeWidth,ne=en.trailWidth,jt=en.gapDegree,Fe=jt===void 0?0:jt,We=en.gapPosition,Pn=en.trailColor,ke=en.strokeLinecap,tn=en.style,fn=en.className,Jn=en.strokeColor,Pe=en.percent,an=(0,ye.Z)(en,te),re=Ot/2,hn=lt(Rn),di="".concat(hn,"-gradient"),Tt=re-vn/2,Et=Math.PI*2*Tt,St=Fe>0?90+Fe/2:-90,Mt=Et*((360-Fe)/360),zt=(0,Qt.Z)(un)==="object"?un:{count:un,gap:2},kt=zt.count,Ut=zt.gap,Oe=_t(Pe),Te=_t(Jn),_e=Te.find(function(He){return He&&(0,Qt.Z)(He)==="object"}),ee=_e&&(0,Qt.Z)(_e)==="object",de=ee?"butt":ke,pe=Ht(Et,Mt,0,100,St,Fe,We,Pn,de,vn),be=je(),ze=function(){var yn=0;return Oe.map(function(xe,Ne){var Ze=Te[Ne]||Te[Te.length-1],Bn=Ht(Et,Mt,yn,xe,St,Fe,We,Ze,de,vn);return yn+=xe,Be.createElement(Lt,{key:Ne,color:Ze,ptg:xe,radius:Tt,prefixCls:wn,gradientId:di,style:Bn,strokeLinecap:de,strokeWidth:vn,gapDegree:Fe,ref:function(An){be[Ne]=An},size:Ot})}).reverse()},rn=function(){var yn=Math.round(kt*(Oe[0]/100)),xe=100/kt,Ne=0;return new Array(kt).fill(null).map(function(Ze,Bn){var le=Bn<=yn-1?Te[0]:Pn,An=le&&(0,Qt.Z)(le)==="object"?"url(#".concat(di,")"):void 0,Kn=Ht(Et,Mt,Ne,xe,St,Fe,We,le,"butt",vn,Ut);return Ne+=(Mt-Kn.strokeDashoffset+Ut)*100/Mt,Be.createElement("circle",{key:Bn,className:"".concat(wn,"-circle-path"),r:Tt,cx:re,cy:re,stroke:An,strokeWidth:vn,opacity:1,style:Kn,ref:function(Xn){be[Bn]=Xn}})})};return Be.createElement("svg",(0,Ft.Z)({className:Rt()("".concat(wn,"-circle"),fn),viewBox:"0 0 ".concat(Ot," ").concat(Ot),style:tn,id:Rn,role:"presentation"},an),!kt&&Be.createElement("circle",{className:"".concat(wn,"-circle-trail"),r:Tt,cx:re,cy:re,stroke:Pn,strokeLinecap:de,strokeWidth:ne||vn,style:pe}),kt?rn():ze())},ve=Xt,oe={Line:Qe,Circle:ve}},738:function(Tn,oi,Dt){"use strict";Dt.d(oi,{Z:function(){return vt}});var Ft=Dt(71409),se=Dt(87075),ye=Dt(11036),Be=Dt(39224),Se=Dt(92310),Rt=Dt.n(Se),ie=Dt(18929),je=Dt(10228),ce=Dt(26112),Vt=Dt(59301);function Qe(xt,Lt){var Ot=xt.disabled,Ht=xt.prefixCls,te=xt.character,_t=xt.characterRender,Xt=xt.index,ve=xt.count,oe=xt.value,Re=xt.allowHalf,Ye=xt.focused,en=xt.onHover,Rn=xt.onClick,wn=function(ke){en(ke,Xt)},un=function(ke){Rn(ke,Xt)},vn=function(ke){ke.keyCode===je.Z.ENTER&&Rn(ke,Xt)},ne=Xt+1,jt=new Set([Ht]);oe===0&&Xt===0&&Ye?jt.add("".concat(Ht,"-focused")):Re&&oe+.5>=ne&&oe<ne?(jt.add("".concat(Ht,"-half")),jt.add("".concat(Ht,"-active")),Ye&&jt.add("".concat(Ht,"-focused"))):(ne<=oe?jt.add("".concat(Ht,"-full")):jt.add("".concat(Ht,"-zero")),ne===oe&&Ye&&jt.add("".concat(Ht,"-focused")));var Fe=typeof te=="function"?te(xt):te,We=Vt.createElement("li",{className:Rt()(Array.from(jt)),ref:Lt},Vt.createElement("div",{onClick:Ot?null:un,onKeyDown:Ot?null:vn,onMouseMove:Ot?null:wn,role:"radio","aria-checked":oe>Xt?"true":"false","aria-posinset":Xt+1,"aria-setsize":ve,tabIndex:Ot?-1:0},Vt.createElement("div",{className:"".concat(Ht,"-first")},Fe),Vt.createElement("div",{className:"".concat(Ht,"-second")},Fe)));return _t&&(We=_t(We,xt)),We}var Qt=Vt.forwardRef(Qe);function Je(){var xt=Vt.useRef({});function Lt(Ht){return xt.current[Ht]}function Ot(Ht){return function(te){xt.current[Ht]=te}}return[Lt,Ot]}function Nt(xt){var Lt=xt.pageXOffset,Ot="scrollLeft";if(typeof Lt!="number"){var Ht=xt.document;Lt=Ht.documentElement[Ot],typeof Lt!="number"&&(Lt=Ht.body[Ot])}return Lt}function nt(xt){var Lt,Ot,Ht=xt.ownerDocument,te=Ht.body,_t=Ht&&Ht.documentElement,Xt=xt.getBoundingClientRect();return Lt=Xt.left,Ot=Xt.top,Lt-=_t.clientLeft||te.clientLeft||0,Ot-=_t.clientTop||te.clientTop||0,{left:Lt,top:Ot}}function et(xt){var Lt=nt(xt),Ot=xt.ownerDocument,Ht=Ot.defaultView||Ot.parentWindow;return Lt.left+=Nt(Ht),Lt.left}var ct=["prefixCls","className","defaultValue","value","count","allowHalf","allowClear","keyboard","character","characterRender","disabled","direction","tabIndex","autoFocus","onHoverChange","onChange","onFocus","onBlur","onKeyDown","onMouseLeave"];function lt(xt,Lt){var Ot=xt.prefixCls,Ht=Ot===void 0?"rc-rate":Ot,te=xt.className,_t=xt.defaultValue,Xt=xt.value,ve=xt.count,oe=ve===void 0?5:ve,Re=xt.allowHalf,Ye=Re===void 0?!1:Re,en=xt.allowClear,Rn=en===void 0?!0:en,wn=xt.keyboard,un=wn===void 0?!0:wn,vn=xt.character,ne=vn===void 0?"\u2605":vn,jt=xt.characterRender,Fe=xt.disabled,We=xt.direction,Pn=We===void 0?"ltr":We,ke=xt.tabIndex,tn=ke===void 0?0:ke,fn=xt.autoFocus,Jn=xt.onHoverChange,Pe=xt.onChange,an=xt.onFocus,re=xt.onBlur,hn=xt.onKeyDown,di=xt.onMouseLeave,Tt=(0,Be.Z)(xt,ct),Et=Je(),St=(0,ye.Z)(Et,2),Mt=St[0],zt=St[1],kt=Vt.useRef(null),Ut=function(){if(!Fe){var Ai;(Ai=kt.current)===null||Ai===void 0||Ai.focus()}};Vt.useImperativeHandle(Lt,function(){return{focus:Ut,blur:function(){if(!Fe){var Ai;(Ai=kt.current)===null||Ai===void 0||Ai.blur()}}}});var Oe=(0,ie.Z)(_t||0,{value:Xt}),Te=(0,ye.Z)(Oe,2),_e=Te[0],ee=Te[1],de=(0,ie.Z)(null),pe=(0,ye.Z)(de,2),be=pe[0],ze=pe[1],rn=function(Ai,Zi){var Pt=Pn==="rtl",ni=Ai+1;if(Ye){var Si=Mt(Ai),on=et(Si),dn=Si.clientWidth;(Pt&&Zi-on>dn/2||!Pt&&Zi-on<dn/2)&&(ni-=.5)}return ni},He=function(Ai){ee(Ai),Pe==null||Pe(Ai)},yn=Vt.useState(!1),xe=(0,ye.Z)(yn,2),Ne=xe[0],Ze=xe[1],Bn=function(){Ze(!0),an==null||an()},le=function(){Ze(!1),re==null||re()},An=Vt.useState(null),Kn=(0,ye.Z)(An,2),yi=Kn[0],Xn=Kn[1],Ei=function(Ai,Zi){var Pt=rn(Zi,Ai.pageX);Pt!==be&&(Xn(Pt),ze(null)),Jn==null||Jn(Pt)},Yi=function(Ai){Fe||(Xn(null),ze(null),Jn==null||Jn(void 0)),Ai&&(di==null||di(Ai))},Gi=function(Ai,Zi){var Pt=rn(Zi,Ai.pageX),ni=!1;Rn&&(ni=Pt===_e),Yi(),He(ni?0:Pt),ze(ni?Pt:null)},Hi=function(Ai){var Zi=Ai.keyCode,Pt=Pn==="rtl",ni=Ye?.5:1;un&&(Zi===je.Z.RIGHT&&_e<oe&&!Pt?(He(_e+ni),Ai.preventDefault()):Zi===je.Z.LEFT&&_e>0&&!Pt||Zi===je.Z.RIGHT&&_e>0&&Pt?(He(_e-ni),Ai.preventDefault()):Zi===je.Z.LEFT&&_e<oe&&Pt&&(He(_e+ni),Ai.preventDefault())),hn==null||hn(Ai)};Vt.useEffect(function(){fn&&!Fe&&Ut()},[]);var Ki=new Array(oe).fill(0).map(function(ji,Ai){return Vt.createElement(Qt,{ref:zt(Ai),index:Ai,count:oe,disabled:Fe,prefixCls:"".concat(Ht,"-star"),allowHalf:Ye,value:yi===null?_e:yi,onClick:Gi,onHover:Ei,key:ji||Ai,character:ne,characterRender:jt,focused:Ne})}),Qi=Rt()(Ht,te,(0,se.Z)((0,se.Z)({},"".concat(Ht,"-disabled"),Fe),"".concat(Ht,"-rtl"),Pn==="rtl"));return Vt.createElement("ul",(0,Ft.Z)({className:Qi,onMouseLeave:Yi,tabIndex:Fe?-1:tn,onFocus:Fe?null:Bn,onBlur:Fe?null:le,onKeyDown:Fe?null:Hi,ref:kt},(0,ce.Z)(Tt,{aria:!0,data:!0,attr:!0})),Ki)}var pt=Vt.forwardRef(lt),vt=pt},6551:function(Tn,oi,Dt){"use strict";Dt.d(oi,{ZP:function(){return ie}});var Ft=Dt(11036),se=Dt(59301),ye=Dt(47273),Be=0,Se=(0,ye.Z)();function Rt(){var je;return Se?(je=Be,Be+=1):je="TEST_OR_SSR",je}function ie(je){var ce=se.useState(),Vt=(0,Ft.Z)(ce,2),Qe=Vt[0],Qt=Vt[1];return se.useEffect(function(){Qt("rc_select_".concat(Rt()))},[]),je||Qe}},37463:function(Tn,oi,Dt){"use strict";Dt.d(oi,{Ac:function(){return Ze},Xo:function(){return le},Wx:function(){return Kn},ZP:function(){return Ri},lk:function(){return vt}});var Ft=Dt(71409),se=Dt(62730),ye=Dt(87075),Be=Dt(89490),Se=Dt(11036),Rt=Dt(39224),ie=Dt(28788),je=Dt(18929),ce=Dt(48736),Vt=Dt(59301),Qe=Dt(92310),Qt=Dt.n(Qe),Je=Dt(34280),Nt=Dt(49658),nt=Dt(8654),et=function(fe){var Mn=fe.className,zn=fe.customizeIcon,De=fe.customizeIconProps,kn=fe.children,Sn=fe.onMouseDown,Fn=fe.onClick,ei=typeof zn=="function"?zn(De):zn;return Vt.createElement("span",{className:Mn,onMouseDown:function(Qn){Qn.preventDefault(),Sn==null||Sn(Qn)},style:{userSelect:"none",WebkitUserSelect:"none"},unselectable:"on",onClick:Fn,"aria-hidden":!0},ei!==void 0?ei:Vt.createElement("span",{className:Qt()(Mn.split(/\s+/).map(function(On){return"".concat(On,"-icon")}))},kn))},ct=et,lt=function(fe,Mn,zn,De,kn){var Sn=arguments.length>5&&arguments[5]!==void 0?arguments[5]:!1,Fn=arguments.length>6?arguments[6]:void 0,ei=arguments.length>7?arguments[7]:void 0,On=Vt.useMemo(function(){if((0,ie.Z)(De)==="object")return De.clearIcon;if(kn)return kn},[De,kn]),Qn=Vt.useMemo(function(){return!!(!Sn&&De&&(zn.length||Fn)&&!(ei==="combobox"&&Fn===""))},[De,Sn,zn.length,Fn,ei]);return{allowClear:Qn,clearIcon:Vt.createElement(ct,{className:"".concat(fe,"-clear"),onMouseDown:Mn,customizeIcon:On},"\xD7")}},pt=Vt.createContext(null);function vt(){return Vt.useContext(pt)}function xt(){var Gt=arguments.length>0&&arguments[0]!==void 0?arguments[0]:10,fe=Vt.useState(!1),Mn=(0,Se.Z)(fe,2),zn=Mn[0],De=Mn[1],kn=Vt.useRef(null),Sn=function(){window.clearTimeout(kn.current)};Vt.useEffect(function(){return Sn},[]);var Fn=function(On,Qn){Sn(),kn.current=window.setTimeout(function(){De(On),Qn&&Qn()},Gt)};return[zn,Fn,Sn]}function Lt(){var Gt=arguments.length>0&&arguments[0]!==void 0?arguments[0]:250,fe=Vt.useRef(null),Mn=Vt.useRef(null);Vt.useEffect(function(){return function(){window.clearTimeout(Mn.current)}},[]);function zn(De){(De||fe.current===null)&&(fe.current=De),window.clearTimeout(Mn.current),Mn.current=window.setTimeout(function(){fe.current=null},Gt)}return[function(){return fe.current},zn]}function Ot(Gt,fe,Mn,zn){var De=Vt.useRef(null);De.current={open:fe,triggerOpen:Mn,customizedTrigger:zn},Vt.useEffect(function(){function kn(Sn){var Fn;if(!((Fn=De.current)!==null&&Fn!==void 0&&Fn.customizedTrigger)){var ei=Sn.target;ei.shadowRoot&&Sn.composed&&(ei=Sn.composedPath()[0]||ei),De.current.open&&Gt().filter(function(On){return On}).every(function(On){return!On.contains(ei)&&On!==ei})&&De.current.triggerOpen(!1)}}return window.addEventListener("mousedown",kn),function(){return window.removeEventListener("mousedown",kn)}},[])}var Ht=Dt(10228);function te(Gt){return Gt&&![Ht.Z.ESC,Ht.Z.SHIFT,Ht.Z.BACKSPACE,Ht.Z.TAB,Ht.Z.WIN_KEY,Ht.Z.ALT,Ht.Z.META,Ht.Z.WIN_KEY_RIGHT,Ht.Z.CTRL,Ht.Z.SEMICOLON,Ht.Z.EQUALS,Ht.Z.CAPS_LOCK,Ht.Z.CONTEXT_MENU,Ht.Z.F1,Ht.Z.F2,Ht.Z.F3,Ht.Z.F4,Ht.Z.F5,Ht.Z.F6,Ht.Z.F7,Ht.Z.F8,Ht.Z.F9,Ht.Z.F10,Ht.Z.F11,Ht.Z.F12].includes(Gt)}var _t=Dt(26112),Xt=Dt(11780);function ve(Gt,fe,Mn){var zn=(0,Be.Z)((0,Be.Z)({},Gt),Mn?fe:{});return Object.keys(fe).forEach(function(De){var kn=fe[De];typeof kn=="function"&&(zn[De]=function(){for(var Sn,Fn=arguments.length,ei=new Array(Fn),On=0;On<Fn;On++)ei[On]=arguments[On];return kn.apply(void 0,ei),(Sn=Gt[De])===null||Sn===void 0?void 0:Sn.call.apply(Sn,[Gt].concat(ei))})}),zn}var oe=ve,Re=["prefixCls","id","inputElement","autoFocus","autoComplete","editable","activeDescendantId","value","open","attrs"],Ye=function(fe,Mn){var zn=fe.prefixCls,De=fe.id,kn=fe.inputElement,Sn=fe.autoFocus,Fn=fe.autoComplete,ei=fe.editable,On=fe.activeDescendantId,Qn=fe.value,Yn=fe.open,Ni=fe.attrs,Pi=(0,Rt.Z)(fe,Re),bi=kn||Vt.createElement("input",null),Ge=bi,Xi=Ge.ref,dr=Ge.props;return(0,ce.Kp)(!("maxLength"in bi.props),"Passing 'maxLength' to input element directly may not work because input in BaseSelect is controlled."),bi=Vt.cloneElement(bi,(0,Be.Z)((0,Be.Z)((0,Be.Z)({type:"search"},oe(Pi,dr,!0)),{},{id:De,ref:(0,nt.sQ)(Mn,Xi),autoComplete:Fn||"off",autoFocus:Sn,className:Qt()("".concat(zn,"-selection-search-input"),dr==null?void 0:dr.className),role:"combobox","aria-expanded":Yn||!1,"aria-haspopup":"listbox","aria-owns":"".concat(De,"_list"),"aria-autocomplete":"list","aria-controls":"".concat(De,"_list"),"aria-activedescendant":Yn?On:void 0},Ni),{},{value:ei?Qn:"",readOnly:!ei,unselectable:ei?null:"on",style:(0,Be.Z)((0,Be.Z)({},dr.style),{},{opacity:ei?null:0})})),bi},en=Vt.forwardRef(Ye),Rn=en;function wn(Gt){return Array.isArray(Gt)?Gt:Gt!==void 0?[Gt]:[]}var un=typeof window!="undefined"&&window.document&&window.document.documentElement,vn=un;function ne(Gt){return Gt!=null}function jt(Gt){return!Gt&&Gt!==0}function Fe(Gt){return["string","number"].includes((0,ie.Z)(Gt))}function We(Gt){var fe=void 0;return Gt&&(Fe(Gt.title)?fe=Gt.title.toString():Fe(Gt.label)&&(fe=Gt.label.toString())),fe}function Pn(Gt,fe){vn?Vt.useLayoutEffect(Gt,fe):Vt.useEffect(Gt,fe)}function ke(Gt){var fe;return(fe=Gt.key)!==null&&fe!==void 0?fe:Gt.value}var tn=function(fe){fe.preventDefault(),fe.stopPropagation()},fn=function(fe){var Mn=fe.id,zn=fe.prefixCls,De=fe.values,kn=fe.open,Sn=fe.searchValue,Fn=fe.autoClearSearchValue,ei=fe.inputRef,On=fe.placeholder,Qn=fe.disabled,Yn=fe.mode,Ni=fe.showSearch,Pi=fe.autoFocus,bi=fe.autoComplete,Ge=fe.activeDescendantId,Xi=fe.tabIndex,dr=fe.removeIcon,br=fe.maxTagCount,Ue=fe.maxTagTextLength,Vn=fe.maxTagPlaceholder,vi=Vn===void 0?function(Gn){return"+ ".concat(Gn.length," ...")}:Vn,pi=fe.tagRender,Fi=fe.onToggleOpen,Wi=fe.onRemove,Vi=fe.onInputChange,pr=fe.onInputPaste,or=fe.onInputKeyDown,hr=fe.onInputMouseDown,Xe=fe.onInputCompositionStart,nr=fe.onInputCompositionEnd,qe=fe.onInputBlur,xi=Vt.useRef(null),ir=(0,Vt.useState)(0),fr=(0,Se.Z)(ir,2),Br=fr[0],kr=fr[1],rr=(0,Vt.useState)(!1),Kr=(0,Se.Z)(rr,2),Ae=Kr[0],gn=Kr[1],Me="".concat(zn,"-selection"),At=kn||Yn==="multiple"&&Fn===!1||Yn==="tags"?Sn:"",Nn=Yn==="tags"||Yn==="multiple"&&Fn===!1||Ni&&(kn||Ae);Pn(function(){kr(xi.current.scrollWidth)},[At]);var Hn=function(Ln,Zn,Mi,hi,bn){return Vt.createElement("span",{title:We(Ln),className:Qt()("".concat(Me,"-item"),(0,ye.Z)({},"".concat(Me,"-item-disabled"),Mi))},Vt.createElement("span",{className:"".concat(Me,"-item-content")},Zn),hi&&Vt.createElement(ct,{className:"".concat(Me,"-item-remove"),onMouseDown:tn,onClick:bn,customizeIcon:dr},"\xD7"))},gi=function(Ln,Zn,Mi,hi,bn,Ke){var qn=function(ar){tn(ar),Fi(!kn)};return Vt.createElement("span",{onMouseDown:qn},pi({label:Zn,value:Ln,disabled:Mi,closable:hi,onClose:bn,isMaxTag:!!Ke}))},ci=function(Ln){var Zn=Ln.disabled,Mi=Ln.label,hi=Ln.value,bn=!Qn&&!Zn,Ke=Mi;if(typeof Ue=="number"&&(typeof Mi=="string"||typeof Mi=="number")){var qn=String(Ke);qn.length>Ue&&(Ke="".concat(qn.slice(0,Ue),"..."))}var Ci=function(Oi){Oi&&Oi.stopPropagation(),Wi(Ln)};return typeof pi=="function"?gi(hi,Ke,Zn,bn,Ci):Hn(Ln,Ke,Zn,bn,Ci)},ti=function(Ln){if(!De.length)return null;var Zn=typeof vi=="function"?vi(Ln):vi;return typeof pi=="function"?gi(void 0,Zn,!1,!1,void 0,!0):Hn({title:Zn},Zn,!1)},sn=Vt.createElement("div",{className:"".concat(Me,"-search"),style:{width:Br},onFocus:function(){gn(!0)},onBlur:function(){gn(!1)}},Vt.createElement(Rn,{ref:ei,open:kn,prefixCls:zn,id:Mn,inputElement:null,disabled:Qn,autoFocus:Pi,autoComplete:bi,editable:Nn,activeDescendantId:Ge,value:At,onKeyDown:or,onMouseDown:hr,onChange:Vi,onPaste:pr,onCompositionStart:Xe,onCompositionEnd:nr,onBlur:qe,tabIndex:Xi,attrs:(0,_t.Z)(fe,!0)}),Vt.createElement("span",{ref:xi,className:"".concat(Me,"-search-mirror"),"aria-hidden":!0},At,"\xA0")),Dn=Vt.createElement(Xt.Z,{prefixCls:"".concat(Me,"-overflow"),data:De,renderItem:ci,renderRest:ti,suffix:sn,itemKey:ke,maxCount:br});return Vt.createElement("span",{className:"".concat(Me,"-wrap")},Dn,!De.length&&!At&&Vt.createElement("span",{className:"".concat(Me,"-placeholder")},On))},Jn=fn,Pe=function(fe){var Mn=fe.inputElement,zn=fe.prefixCls,De=fe.id,kn=fe.inputRef,Sn=fe.disabled,Fn=fe.autoFocus,ei=fe.autoComplete,On=fe.activeDescendantId,Qn=fe.mode,Yn=fe.open,Ni=fe.values,Pi=fe.placeholder,bi=fe.tabIndex,Ge=fe.showSearch,Xi=fe.searchValue,dr=fe.activeValue,br=fe.maxLength,Ue=fe.onInputKeyDown,Vn=fe.onInputMouseDown,vi=fe.onInputChange,pi=fe.onInputPaste,Fi=fe.onInputCompositionStart,Wi=fe.onInputCompositionEnd,Vi=fe.onInputBlur,pr=fe.title,or=Vt.useState(!1),hr=(0,Se.Z)(or,2),Xe=hr[0],nr=hr[1],qe=Qn==="combobox",xi=qe||Ge,ir=Ni[0],fr=Xi||"";qe&&dr&&!Xe&&(fr=dr),Vt.useEffect(function(){qe&&nr(!1)},[qe,dr]);var Br=Qn!=="combobox"&&!Yn&&!Ge?!1:!!fr,kr=pr===void 0?We(ir):pr,rr=Vt.useMemo(function(){return ir?null:Vt.createElement("span",{className:"".concat(zn,"-selection-placeholder"),style:Br?{visibility:"hidden"}:void 0},Pi)},[ir,Br,Pi,zn]);return Vt.createElement("span",{className:"".concat(zn,"-selection-wrap")},Vt.createElement("span",{className:"".concat(zn,"-selection-search")},Vt.createElement(Rn,{ref:kn,prefixCls:zn,id:De,open:Yn,inputElement:Mn,disabled:Sn,autoFocus:Fn,autoComplete:ei,editable:xi,activeDescendantId:On,value:fr,onKeyDown:Ue,onMouseDown:Vn,onChange:function(Ae){nr(!0),vi(Ae)},onPaste:pi,onCompositionStart:Fi,onCompositionEnd:Wi,onBlur:Vi,tabIndex:bi,attrs:(0,_t.Z)(fe,!0),maxLength:qe?br:void 0})),!qe&&ir?Vt.createElement("span",{className:"".concat(zn,"-selection-item"),title:kr,style:Br?{visibility:"hidden"}:void 0},ir.label):null,rr)},an=Pe,re=function(fe,Mn){var zn=(0,Vt.useRef)(null),De=(0,Vt.useRef)(!1),kn=fe.prefixCls,Sn=fe.open,Fn=fe.mode,ei=fe.showSearch,On=fe.tokenWithEnter,Qn=fe.disabled,Yn=fe.prefix,Ni=fe.autoClearSearchValue,Pi=fe.onSearch,bi=fe.onSearchSubmit,Ge=fe.onToggleOpen,Xi=fe.onInputKeyDown,dr=fe.onInputBlur,br=fe.domRef;Vt.useImperativeHandle(Mn,function(){return{focus:function(kr){zn.current.focus(kr)},blur:function(){zn.current.blur()}}});var Ue=Lt(0),Vn=(0,Se.Z)(Ue,2),vi=Vn[0],pi=Vn[1],Fi=function(kr){var rr=kr.which,Kr=zn.current instanceof HTMLTextAreaElement;!Kr&&Sn&&(rr===Ht.Z.UP||rr===Ht.Z.DOWN)&&kr.preventDefault(),Xi&&Xi(kr),rr===Ht.Z.ENTER&&Fn==="tags"&&!De.current&&!Sn&&(bi==null||bi(kr.target.value)),!(Kr&&!Sn&&~[Ht.Z.UP,Ht.Z.DOWN,Ht.Z.LEFT,Ht.Z.RIGHT].indexOf(rr))&&te(rr)&&Ge(!0)},Wi=function(){pi(!0)},Vi=(0,Vt.useRef)(null),pr=function(kr){Pi(kr,!0,De.current)!==!1&&Ge(!0)},or=function(){De.current=!0},hr=function(kr){De.current=!1,Fn!=="combobox"&&pr(kr.target.value)},Xe=function(kr){var rr=kr.target.value;if(On&&Vi.current&&/[\r\n]/.test(Vi.current)){var Kr=Vi.current.replace(/[\r\n]+$/,"").replace(/\r\n/g," ").replace(/[\r\n]/g," ");rr=rr.replace(Kr,Vi.current)}Vi.current=null,pr(rr)},nr=function(kr){var rr=kr.clipboardData,Kr=rr==null?void 0:rr.getData("text");Vi.current=Kr||""},qe=function(kr){var rr=kr.target;if(rr!==zn.current){var Kr=document.body.style.msTouchAction!==void 0;Kr?setTimeout(function(){zn.current.focus()}):zn.current.focus()}},xi=function(kr){var rr=vi();kr.target!==zn.current&&!rr&&!(Fn==="combobox"&&Qn)&&kr.preventDefault(),(Fn!=="combobox"&&(!ei||!rr)||!Sn)&&(Sn&&Ni!==!1&&Pi("",!0,!1),Ge())},ir={inputRef:zn,onInputKeyDown:Fi,onInputMouseDown:Wi,onInputChange:Xe,onInputPaste:nr,onInputCompositionStart:or,onInputCompositionEnd:hr,onInputBlur:dr},fr=Fn==="multiple"||Fn==="tags"?Vt.createElement(Jn,(0,Ft.Z)({},fe,ir)):Vt.createElement(an,(0,Ft.Z)({},fe,ir));return Vt.createElement("div",{ref:br,className:"".concat(kn,"-selector"),onClick:qe,onMouseDown:xi},Yn&&Vt.createElement("div",{className:"".concat(kn,"-prefix")},Yn),fr)},hn=Vt.forwardRef(re),di=hn,Tt=Dt(65352),Et=["prefixCls","disabled","visible","children","popupElement","animation","transitionName","dropdownStyle","dropdownClassName","direction","placement","builtinPlacements","dropdownMatchSelectWidth","dropdownRender","dropdownAlign","getPopupContainer","empty","getTriggerDOMNode","onPopupVisibleChange","onPopupMouseEnter"],St=function(fe){var Mn=fe===!0?0:1;return{bottomLeft:{points:["tl","bl"],offset:[0,4],overflow:{adjustX:Mn,adjustY:1},htmlRegion:"scroll"},bottomRight:{points:["tr","br"],offset:[0,4],overflow:{adjustX:Mn,adjustY:1},htmlRegion:"scroll"},topLeft:{points:["bl","tl"],offset:[0,-4],overflow:{adjustX:Mn,adjustY:1},htmlRegion:"scroll"},topRight:{points:["br","tr"],offset:[0,-4],overflow:{adjustX:Mn,adjustY:1},htmlRegion:"scroll"}}},Mt=function(fe,Mn){var zn=fe.prefixCls,De=fe.disabled,kn=fe.visible,Sn=fe.children,Fn=fe.popupElement,ei=fe.animation,On=fe.transitionName,Qn=fe.dropdownStyle,Yn=fe.dropdownClassName,Ni=fe.direction,Pi=Ni===void 0?"ltr":Ni,bi=fe.placement,Ge=fe.builtinPlacements,Xi=fe.dropdownMatchSelectWidth,dr=fe.dropdownRender,br=fe.dropdownAlign,Ue=fe.getPopupContainer,Vn=fe.empty,vi=fe.getTriggerDOMNode,pi=fe.onPopupVisibleChange,Fi=fe.onPopupMouseEnter,Wi=(0,Rt.Z)(fe,Et),Vi="".concat(zn,"-dropdown"),pr=Fn;dr&&(pr=dr(Fn));var or=Vt.useMemo(function(){return Ge||St(Xi)},[Ge,Xi]),hr=ei?"".concat(Vi,"-").concat(ei):On,Xe=typeof Xi=="number",nr=Vt.useMemo(function(){return Xe?null:Xi===!1?"minWidth":"width"},[Xi,Xe]),qe=Qn;Xe&&(qe=(0,Be.Z)((0,Be.Z)({},qe),{},{width:Xi}));var xi=Vt.useRef(null);return Vt.useImperativeHandle(Mn,function(){return{getPopupElement:function(){var fr;return(fr=xi.current)===null||fr===void 0?void 0:fr.popupElement}}}),Vt.createElement(Tt.Z,(0,Ft.Z)({},Wi,{showAction:pi?["click"]:[],hideAction:pi?["click"]:[],popupPlacement:bi||(Pi==="rtl"?"bottomRight":"bottomLeft"),builtinPlacements:or,prefixCls:Vi,popupTransitionName:hr,popup:Vt.createElement("div",{onMouseEnter:Fi},pr),ref:xi,stretch:nr,popupAlign:br,popupVisible:kn,getPopupContainer:Ue,popupClassName:Qt()(Yn,(0,ye.Z)({},"".concat(Vi,"-empty"),Vn)),popupStyle:qe,getTriggerDOMNode:vi,onPopupVisibleChange:pi}),Sn)},zt=Vt.forwardRef(Mt),kt=zt,Ut=Dt(67900);function Oe(Gt,fe){var Mn=Gt.key,zn;return"value"in Gt&&(zn=Gt.value),Mn!=null?Mn:zn!==void 0?zn:"rc-index-key-".concat(fe)}function Te(Gt){return typeof Gt!="undefined"&&!Number.isNaN(Gt)}function _e(Gt,fe){var Mn=Gt||{},zn=Mn.label,De=Mn.value,kn=Mn.options,Sn=Mn.groupLabel,Fn=zn||(fe?"children":"label");return{label:Fn,value:De||"value",options:kn||"options",groupLabel:Sn||Fn}}function ee(Gt){var fe=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},Mn=fe.fieldNames,zn=fe.childrenAsData,De=[],kn=_e(Mn,!1),Sn=kn.label,Fn=kn.value,ei=kn.options,On=kn.groupLabel;function Qn(Yn,Ni){Array.isArray(Yn)&&Yn.forEach(function(Pi){if(Ni||!(ei in Pi)){var bi=Pi[Fn];De.push({key:Oe(Pi,De.length),groupOption:Ni,data:Pi,label:Pi[Sn],value:bi})}else{var Ge=Pi[On];Ge===void 0&&zn&&(Ge=Pi.label),De.push({key:Oe(Pi,De.length),group:!0,data:Pi,label:Ge}),Qn(Pi[ei],!0)}})}return Qn(Gt,!1),De}function de(Gt){var fe=(0,Be.Z)({},Gt);return"props"in fe||Object.defineProperty(fe,"props",{get:function(){return(0,ce.ZP)(!1,"Return type is option instead of Option instance. Please read value directly instead of reading from `props`."),fe}}),fe}var pe=function(fe,Mn,zn){if(!Mn||!Mn.length)return null;var De=!1,kn=function Fn(ei,On){var Qn=(0,Ut.Z)(On),Yn=Qn[0],Ni=Qn.slice(1);if(!Yn)return[ei];var Pi=ei.split(Yn);return De=De||Pi.length>1,Pi.reduce(function(bi,Ge){return[].concat((0,se.Z)(bi),(0,se.Z)(Fn(Ge,Ni)))},[]).filter(Boolean)},Sn=kn(fe,Mn);return De?typeof zn!="undefined"?Sn.slice(0,zn):Sn:null},be=Vt.createContext(null),ze=be;function rn(Gt){var fe=Gt.visible,Mn=Gt.values;if(!fe)return null;var zn=50;return Vt.createElement("span",{"aria-live":"polite",style:{width:0,height:0,position:"absolute",overflow:"hidden",opacity:0}},"".concat(Mn.slice(0,zn).map(function(De){var kn=De.label,Sn=De.value;return["number","string"].includes((0,ie.Z)(kn))?kn:Sn}).join(", ")),Mn.length>zn?", ...":null)}var He=["id","prefixCls","className","showSearch","tagRender","direction","omitDomProps","displayValues","onDisplayValuesChange","emptyOptions","notFoundContent","onClear","mode","disabled","loading","getInputElement","getRawInputElement","open","defaultOpen","onDropdownVisibleChange","activeValue","onActiveValueChange","activeDescendantId","searchValue","autoClearSearchValue","onSearch","onSearchSplit","tokenSeparators","allowClear","prefix","suffixIcon","clearIcon","OptionList","animation","transitionName","dropdownStyle","dropdownClassName","dropdownMatchSelectWidth","dropdownRender","dropdownAlign","placement","builtinPlacements","getPopupContainer","showAction","onFocus","onBlur","onKeyUp","onKeyDown","onMouseDown"],yn=["value","onChange","removeIcon","placeholder","autoFocus","maxTagCount","maxTagTextLength","maxTagPlaceholder","choiceTransitionName","onInputKeyDown","onPopupScroll","tabIndex"],xe=function(fe){return fe==="tags"||fe==="multiple"},Ne=Vt.forwardRef(function(Gt,fe){var Mn,zn=Gt.id,De=Gt.prefixCls,kn=Gt.className,Sn=Gt.showSearch,Fn=Gt.tagRender,ei=Gt.direction,On=Gt.omitDomProps,Qn=Gt.displayValues,Yn=Gt.onDisplayValuesChange,Ni=Gt.emptyOptions,Pi=Gt.notFoundContent,bi=Pi===void 0?"Not Found":Pi,Ge=Gt.onClear,Xi=Gt.mode,dr=Gt.disabled,br=Gt.loading,Ue=Gt.getInputElement,Vn=Gt.getRawInputElement,vi=Gt.open,pi=Gt.defaultOpen,Fi=Gt.onDropdownVisibleChange,Wi=Gt.activeValue,Vi=Gt.onActiveValueChange,pr=Gt.activeDescendantId,or=Gt.searchValue,hr=Gt.autoClearSearchValue,Xe=Gt.onSearch,nr=Gt.onSearchSplit,qe=Gt.tokenSeparators,xi=Gt.allowClear,ir=Gt.prefix,fr=Gt.suffixIcon,Br=Gt.clearIcon,kr=Gt.OptionList,rr=Gt.animation,Kr=Gt.transitionName,Ae=Gt.dropdownStyle,gn=Gt.dropdownClassName,Me=Gt.dropdownMatchSelectWidth,At=Gt.dropdownRender,Nn=Gt.dropdownAlign,Hn=Gt.placement,gi=Gt.builtinPlacements,ci=Gt.getPopupContainer,ti=Gt.showAction,sn=ti===void 0?[]:ti,Dn=Gt.onFocus,Gn=Gt.onBlur,Ln=Gt.onKeyUp,Zn=Gt.onKeyDown,Mi=Gt.onMouseDown,hi=(0,Rt.Z)(Gt,He),bn=xe(Xi),Ke=(Sn!==void 0?Sn:bn)||Xi==="combobox",qn=(0,Be.Z)({},hi);yn.forEach(function(Cr){delete qn[Cr]}),On==null||On.forEach(function(Cr){delete qn[Cr]});var Ci=Vt.useState(!1),ar=(0,Se.Z)(Ci,2),Oi=ar[0],ur=ar[1];Vt.useEffect(function(){ur((0,Nt.Z)())},[]);var sr=Vt.useRef(null),yr=Vt.useRef(null),Tr=Vt.useRef(null),jr=Vt.useRef(null),Jr=Vt.useRef(null),Ee=Vt.useRef(!1),Fr=xt(),Mr=(0,Se.Z)(Fr,3),Ui=Mr[0],vr=Mr[1],mr=Mr[2];Vt.useImperativeHandle(fe,function(){var Cr,$r;return{focus:(Cr=jr.current)===null||Cr===void 0?void 0:Cr.focus,blur:($r=jr.current)===null||$r===void 0?void 0:$r.blur,scrollTo:function(Ii){var ca;return(ca=Jr.current)===null||ca===void 0?void 0:ca.scrollTo(Ii)},nativeElement:sr.current||yr.current}});var _r=Vt.useMemo(function(){var Cr;if(Xi!=="combobox")return or;var $r=(Cr=Qn[0])===null||Cr===void 0?void 0:Cr.value;return typeof $r=="string"||typeof $r=="number"?String($r):""},[or,Xi,Qn]),Yr=Xi==="combobox"&&typeof Ue=="function"&&Ue()||null,Pr=typeof Vn=="function"&&Vn(),oo=(0,nt.x1)(yr,Pr==null||(Mn=Pr.props)===null||Mn===void 0?void 0:Mn.ref),va=Vt.useState(!1),wo=(0,Se.Z)(va,2),ha=wo[0],da=wo[1];(0,Je.Z)(function(){da(!0)},[]);var Ji=(0,je.Z)(!1,{defaultValue:pi,value:vi}),Fo=(0,Se.Z)(Ji,2),So=Fo[0],$o=Fo[1],Do=ha?So:!1,Vo=!bi&&Ni;(dr||Vo&&Do&&Xi==="combobox")&&(Do=!1);var li=Vo?!1:Do,qi=Vt.useCallback(function(Cr){var $r=Cr!==void 0?Cr:!Do;dr||($o($r),Do!==$r&&(Fi==null||Fi($r)))},[dr,Do,$o,Fi]),Sr=Vt.useMemo(function(){return(qe||[]).some(function(Cr){return[`
|
|
`,`\r
|
|
`].includes(Cr)})},[qe]),Ir=Vt.useContext(ze)||{},Gr=Ir.maxCount,lo=Ir.rawValues,er=function($r,Oo,Ii){if(!(bn&&Te(Gr)&&(lo==null?void 0:lo.size)>=Gr)){var ca=!0,ue=$r;Vi==null||Vi(null);var xn=pe($r,qe,Te(Gr)?Gr-lo.size:void 0),Ns=Ii?null:xn;return Xi!=="combobox"&&Ns&&(ue="",nr==null||nr(Ns),qi(!1),ca=!1),Xe&&_r!==ue&&Xe(ue,{source:Oo?"typing":"effect"}),ca}},La=function($r){!$r||!$r.trim()||Xe($r,{source:"submit"})};Vt.useEffect(function(){!Do&&!bn&&Xi!=="combobox"&&er("",!1,!1)},[Do]),Vt.useEffect(function(){So&&dr&&$o(!1),dr&&!Ee.current&&vr(!1)},[dr]);var Ro=Lt(),bo=(0,Se.Z)(Ro,2),Hr=bo[0],Uo=bo[1],ba=Vt.useRef(!1),ko=function($r){var Oo=Hr(),Ii=$r.key,ca=Ii==="Enter";if(ca&&(Xi!=="combobox"&&$r.preventDefault(),Do||qi(!0)),Uo(!!_r),Ii==="Backspace"&&!Oo&&bn&&!_r&&Qn.length){for(var ue=(0,se.Z)(Qn),xn=null,Ns=ue.length-1;Ns>=0;Ns-=1){var dl=ue[Ns];if(!dl.disabled){ue.splice(Ns,1),xn=dl;break}}xn&&Yn(ue,{type:"remove",values:[xn]})}for(var ta=arguments.length,Ea=new Array(ta>1?ta-1:0),ws=1;ws<ta;ws++)Ea[ws-1]=arguments[ws];if(Do&&(!ca||!ba.current)){var Ds;ca&&(ba.current=!0),(Ds=Jr.current)===null||Ds===void 0||Ds.onKeyDown.apply(Ds,[$r].concat(Ea))}Zn==null||Zn.apply(void 0,[$r].concat(Ea))},Ha=function($r){for(var Oo=arguments.length,Ii=new Array(Oo>1?Oo-1:0),ca=1;ca<Oo;ca++)Ii[ca-1]=arguments[ca];if(Do){var ue;(ue=Jr.current)===null||ue===void 0||ue.onKeyUp.apply(ue,[$r].concat(Ii))}$r.key==="Enter"&&(ba.current=!1),Ln==null||Ln.apply(void 0,[$r].concat(Ii))},Ba=function($r){var Oo=Qn.filter(function(Ii){return Ii!==$r});Yn(Oo,{type:"remove",values:[$r]})},cs=function(){ba.current=!1},ea=Vt.useRef(!1),ru=function(){vr(!0),dr||(Dn&&!ea.current&&Dn.apply(void 0,arguments),sn.includes("focus")&&qi(!0)),ea.current=!0},Hl=function(){Ee.current=!0,vr(!1,function(){ea.current=!1,Ee.current=!1,qi(!1)}),!dr&&(_r&&(Xi==="tags"?Xe(_r,{source:"submit"}):Xi==="multiple"&&Xe("",{source:"blur"})),Gn&&Gn.apply(void 0,arguments))},As=[];Vt.useEffect(function(){return function(){As.forEach(function(Cr){return clearTimeout(Cr)}),As.splice(0,As.length)}},[]);var Hs=function($r){var Oo,Ii=$r.target,ca=(Oo=Tr.current)===null||Oo===void 0?void 0:Oo.getPopupElement();if(ca&&ca.contains(Ii)){var ue=setTimeout(function(){var ta=As.indexOf(ue);if(ta!==-1&&As.splice(ta,1),mr(),!Oi&&!ca.contains(document.activeElement)){var Ea;(Ea=jr.current)===null||Ea===void 0||Ea.focus()}});As.push(ue)}for(var xn=arguments.length,Ns=new Array(xn>1?xn-1:0),dl=1;dl<xn;dl++)Ns[dl-1]=arguments[dl];Mi==null||Mi.apply(void 0,[$r].concat(Ns))},fs=Vt.useState({}),kl=(0,Se.Z)(fs,2),ou=kl[1];function Ll(){ou({})}var Bo;Pr&&(Bo=function($r){qi($r)}),Ot(function(){var Cr;return[sr.current,(Cr=Tr.current)===null||Cr===void 0?void 0:Cr.getPopupElement()]},li,qi,!!Pr);var Ve=Vt.useMemo(function(){return(0,Be.Z)((0,Be.Z)({},Gt),{},{notFoundContent:bi,open:Do,triggerOpen:li,id:zn,showSearch:Ke,multiple:bn,toggleOpen:qi})},[Gt,bi,li,Do,zn,Ke,bn,qi]),au=!!fr||br,bl;au&&(bl=Vt.createElement(ct,{className:Qt()("".concat(De,"-arrow"),(0,ye.Z)({},"".concat(De,"-arrow-loading"),br)),customizeIcon:fr,customizeIconProps:{loading:br,searchValue:_r,open:Do,focused:Ui,showSearch:Ke}}));var Ml=function(){var $r;Ge==null||Ge(),($r=jr.current)===null||$r===void 0||$r.focus(),Yn([],{type:"clear",values:Qn}),er("",!1,!1)},Ma=lt(De,Ml,Qn,xi,Br,dr,_r,Xi),ya=Ma.allowClear,na=Ma.clearIcon,Sa=Vt.createElement(kr,{ref:Jr}),_s=Qt()(De,kn,(0,ye.Z)((0,ye.Z)((0,ye.Z)((0,ye.Z)((0,ye.Z)((0,ye.Z)((0,ye.Z)((0,ye.Z)((0,ye.Z)((0,ye.Z)({},"".concat(De,"-focused"),Ui),"".concat(De,"-multiple"),bn),"".concat(De,"-single"),!bn),"".concat(De,"-allow-clear"),xi),"".concat(De,"-show-arrow"),au),"".concat(De,"-disabled"),dr),"".concat(De,"-loading"),br),"".concat(De,"-open"),Do),"".concat(De,"-customize-input"),Yr),"".concat(De,"-show-search"),Ke)),Oa=Vt.createElement(kt,{ref:Tr,disabled:dr,prefixCls:De,visible:li,popupElement:Sa,animation:rr,transitionName:Kr,dropdownStyle:Ae,dropdownClassName:gn,direction:ei,dropdownMatchSelectWidth:Me,dropdownRender:At,dropdownAlign:Nn,placement:Hn,builtinPlacements:gi,getPopupContainer:ci,empty:Ni,getTriggerDOMNode:function($r){return yr.current||$r},onPopupVisibleChange:Bo,onPopupMouseEnter:Ll},Pr?Vt.cloneElement(Pr,{ref:oo}):Vt.createElement(di,(0,Ft.Z)({},Gt,{domRef:yr,prefixCls:De,inputElement:Yr,ref:jr,id:zn,prefix:ir,showSearch:Ke,autoClearSearchValue:hr,mode:Xi,activeDescendantId:pr,tagRender:Fn,values:Qn,open:Do,onToggleOpen:qi,activeValue:Wi,searchValue:_r,onSearch:er,onSearchSubmit:La,onRemove:Ba,tokenWithEnter:Sr,onInputBlur:cs}))),yo;return Pr?yo=Oa:yo=Vt.createElement("div",(0,Ft.Z)({className:_s},qn,{ref:sr,onMouseDown:Hs,onKeyDown:ko,onKeyUp:Ha,onFocus:ru,onBlur:Hl}),Vt.createElement(rn,{visible:Ui&&!Do,values:Qn}),Oa,bl,ya&&na),Vt.createElement(pt.Provider,{value:Ve},yo)}),Ze=Ne,Bn=function(){return null};Bn.isSelectOptGroup=!0;var le=Bn,An=function(){return null};An.isSelectOption=!0;var Kn=An,yi=Dt(80547),Xn=Dt(2738),Ei=Dt(65283);function Yi(){return/(mac\sos|macintosh)/i.test(navigator.appVersion)}var Gi=["disabled","title","children","style","className"];function Hi(Gt){return typeof Gt=="string"||typeof Gt=="number"}var Ki=function(fe,Mn){var zn=vt(),De=zn.prefixCls,kn=zn.id,Sn=zn.open,Fn=zn.multiple,ei=zn.mode,On=zn.searchValue,Qn=zn.toggleOpen,Yn=zn.notFoundContent,Ni=zn.onPopupScroll,Pi=Vt.useContext(ze),bi=Pi.maxCount,Ge=Pi.flattenOptions,Xi=Pi.onActiveValue,dr=Pi.defaultActiveFirstOption,br=Pi.onSelect,Ue=Pi.menuItemSelectedIcon,Vn=Pi.rawValues,vi=Pi.fieldNames,pi=Pi.virtual,Fi=Pi.direction,Wi=Pi.listHeight,Vi=Pi.listItemHeight,pr=Pi.optionRender,or="".concat(De,"-item"),hr=(0,yi.Z)(function(){return Ge},[Sn,Ge],function(ti,sn){return sn[0]&&ti[1]!==sn[1]}),Xe=Vt.useRef(null),nr=Vt.useMemo(function(){return Fn&&Te(bi)&&(Vn==null?void 0:Vn.size)>=bi},[Fn,bi,Vn==null?void 0:Vn.size]),qe=function(sn){sn.preventDefault()},xi=function(sn){var Dn;(Dn=Xe.current)===null||Dn===void 0||Dn.scrollTo(typeof sn=="number"?{index:sn}:sn)},ir=Vt.useCallback(function(ti){return ei==="combobox"?!1:Vn.has(ti)},[ei,(0,se.Z)(Vn).toString(),Vn.size]),fr=function(sn){for(var Dn=arguments.length>1&&arguments[1]!==void 0?arguments[1]:1,Gn=hr.length,Ln=0;Ln<Gn;Ln+=1){var Zn=(sn+Ln*Dn+Gn)%Gn,Mi=hr[Zn]||{},hi=Mi.group,bn=Mi.data;if(!hi&&!(bn!=null&&bn.disabled)&&(ir(bn.value)||!nr))return Zn}return-1},Br=Vt.useState(function(){return fr(0)}),kr=(0,Se.Z)(Br,2),rr=kr[0],Kr=kr[1],Ae=function(sn){var Dn=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;Kr(sn);var Gn={source:Dn?"keyboard":"mouse"},Ln=hr[sn];if(!Ln){Xi(null,-1,Gn);return}Xi(Ln.value,sn,Gn)};(0,Vt.useEffect)(function(){Ae(dr!==!1?fr(0):-1)},[hr.length,On]);var gn=Vt.useCallback(function(ti){return ei==="combobox"?String(ti).toLowerCase()===On.toLowerCase():Vn.has(ti)},[ei,On,(0,se.Z)(Vn).toString(),Vn.size]);(0,Vt.useEffect)(function(){var ti=setTimeout(function(){if(!Fn&&Sn&&Vn.size===1){var Dn=Array.from(Vn)[0],Gn=hr.findIndex(function(Ln){var Zn=Ln.data;return On?String(Zn.value).startsWith(On):Zn.value===Dn});Gn!==-1&&(Ae(Gn),xi(Gn))}});if(Sn){var sn;(sn=Xe.current)===null||sn===void 0||sn.scrollTo(void 0)}return function(){return clearTimeout(ti)}},[Sn,On]);var Me=function(sn){sn!==void 0&&br(sn,{selected:!Vn.has(sn)}),Fn||Qn(!1)};if(Vt.useImperativeHandle(Mn,function(){return{onKeyDown:function(sn){var Dn=sn.which,Gn=sn.ctrlKey;switch(Dn){case Ht.Z.N:case Ht.Z.P:case Ht.Z.UP:case Ht.Z.DOWN:{var Ln=0;if(Dn===Ht.Z.UP?Ln=-1:Dn===Ht.Z.DOWN?Ln=1:Yi()&&Gn&&(Dn===Ht.Z.N?Ln=1:Dn===Ht.Z.P&&(Ln=-1)),Ln!==0){var Zn=fr(rr+Ln,Ln);xi(Zn),Ae(Zn,!0)}break}case Ht.Z.TAB:case Ht.Z.ENTER:{var Mi,hi=hr[rr];hi&&!(hi!=null&&(Mi=hi.data)!==null&&Mi!==void 0&&Mi.disabled)&&!nr?Me(hi.value):Me(void 0),Sn&&sn.preventDefault();break}case Ht.Z.ESC:Qn(!1),Sn&&sn.stopPropagation()}},onKeyUp:function(){},scrollTo:function(sn){xi(sn)}}}),hr.length===0)return Vt.createElement("div",{role:"listbox",id:"".concat(kn,"_list"),className:"".concat(or,"-empty"),onMouseDown:qe},Yn);var At=Object.keys(vi).map(function(ti){return vi[ti]}),Nn=function(sn){return sn.label};function Hn(ti,sn){var Dn=ti.group;return{role:Dn?"presentation":"option",id:"".concat(kn,"_list_").concat(sn)}}var gi=function(sn){var Dn=hr[sn];if(!Dn)return null;var Gn=Dn.data||{},Ln=Gn.value,Zn=Dn.group,Mi=(0,_t.Z)(Gn,!0),hi=Nn(Dn);return Dn?Vt.createElement("div",(0,Ft.Z)({"aria-label":typeof hi=="string"&&!Zn?hi:null},Mi,{key:sn},Hn(Dn,sn),{"aria-selected":gn(Ln)}),Ln):null},ci={role:"listbox",id:"".concat(kn,"_list")};return Vt.createElement(Vt.Fragment,null,pi&&Vt.createElement("div",(0,Ft.Z)({},ci,{style:{height:0,width:0,overflow:"hidden"}}),gi(rr-1),gi(rr),gi(rr+1)),Vt.createElement(Ei.Z,{itemKey:"key",ref:Xe,data:hr,height:Wi,itemHeight:Vi,fullHeight:!1,onMouseDown:qe,onScroll:Ni,virtual:pi,direction:Fi,innerProps:pi?null:ci},function(ti,sn){var Dn=ti.group,Gn=ti.groupOption,Ln=ti.data,Zn=ti.label,Mi=ti.value,hi=Ln.key;if(Dn){var bn,Ke=(bn=Ln.title)!==null&&bn!==void 0?bn:Hi(Zn)?Zn.toString():void 0;return Vt.createElement("div",{className:Qt()(or,"".concat(or,"-group"),Ln.className),title:Ke},Zn!==void 0?Zn:hi)}var qn=Ln.disabled,Ci=Ln.title,ar=Ln.children,Oi=Ln.style,ur=Ln.className,sr=(0,Rt.Z)(Ln,Gi),yr=(0,Xn.Z)(sr,At),Tr=ir(Mi),jr=qn||!Tr&&nr,Jr="".concat(or,"-option"),Ee=Qt()(or,Jr,ur,(0,ye.Z)((0,ye.Z)((0,ye.Z)((0,ye.Z)({},"".concat(Jr,"-grouped"),Gn),"".concat(Jr,"-active"),rr===sn&&!jr),"".concat(Jr,"-disabled"),jr),"".concat(Jr,"-selected"),Tr)),Fr=Nn(ti),Mr=!Ue||typeof Ue=="function"||Tr,Ui=typeof Fr=="number"?Fr:Fr||Mi,vr=Hi(Ui)?Ui.toString():void 0;return Ci!==void 0&&(vr=Ci),Vt.createElement("div",(0,Ft.Z)({},(0,_t.Z)(yr),pi?{}:Hn(ti,sn),{"aria-selected":gn(Mi),className:Ee,title:vr,onMouseMove:function(){rr===sn||jr||Ae(sn)},onClick:function(){jr||Me(Mi)},style:Oi}),Vt.createElement("div",{className:"".concat(Jr,"-content")},typeof pr=="function"?pr(ti,{index:sn}):Ui),Vt.isValidElement(Ue)||Tr,Mr&&Vt.createElement(ct,{className:"".concat(or,"-option-state"),customizeIcon:Ue,customizeIconProps:{value:Mi,disabled:jr,isSelected:Tr}},Tr?"\u2713":null))}))},Qi=Vt.forwardRef(Ki),ji=Qi,Ai=function(Gt,fe){var Mn=Vt.useRef({values:new Map,options:new Map}),zn=Vt.useMemo(function(){var kn=Mn.current,Sn=kn.values,Fn=kn.options,ei=Gt.map(function(Yn){if(Yn.label===void 0){var Ni;return(0,Be.Z)((0,Be.Z)({},Yn),{},{label:(Ni=Sn.get(Yn.value))===null||Ni===void 0?void 0:Ni.label})}return Yn}),On=new Map,Qn=new Map;return ei.forEach(function(Yn){On.set(Yn.value,Yn),Qn.set(Yn.value,fe.get(Yn.value)||Fn.get(Yn.value))}),Mn.current.values=On,Mn.current.options=Qn,ei},[Gt,fe]),De=Vt.useCallback(function(kn){return fe.get(kn)||Mn.current.options.get(kn)},[fe]);return[zn,De]};function Zi(Gt,fe){return wn(Gt).join("").toUpperCase().includes(fe)}var Pt=function(Gt,fe,Mn,zn,De){return Vt.useMemo(function(){if(!Mn||zn===!1)return Gt;var kn=fe.options,Sn=fe.label,Fn=fe.value,ei=[],On=typeof zn=="function",Qn=Mn.toUpperCase(),Yn=On?zn:function(Pi,bi){return De?Zi(bi[De],Qn):bi[kn]?Zi(bi[Sn!=="children"?Sn:"label"],Qn):Zi(bi[Fn],Qn)},Ni=On?function(Pi){return de(Pi)}:function(Pi){return Pi};return Gt.forEach(function(Pi){if(Pi[kn]){var bi=Yn(Mn,Ni(Pi));if(bi)ei.push(Pi);else{var Ge=Pi[kn].filter(function(Xi){return Yn(Mn,Ni(Xi))});Ge.length&&ei.push((0,Be.Z)((0,Be.Z)({},Pi),{},(0,ye.Z)({},kn,Ge)))}return}Yn(Mn,Ni(Pi))&&ei.push(Pi)}),ei},[Gt,zn,De,Mn,fe])},ni=Dt(6551),Si=Dt(11592),on=["children","value"],dn=["children"];function pn(Gt){var fe=Gt,Mn=fe.key,zn=fe.props,De=zn.children,kn=zn.value,Sn=(0,Rt.Z)(zn,on);return(0,Be.Z)({key:Mn,value:kn!==void 0?kn:Mn,children:De},Sn)}function _n(Gt){var fe=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;return(0,Si.Z)(Gt).map(function(Mn,zn){if(!Vt.isValidElement(Mn)||!Mn.type)return null;var De=Mn,kn=De.type.isSelectOptGroup,Sn=De.key,Fn=De.props,ei=Fn.children,On=(0,Rt.Z)(Fn,dn);return fe||!kn?pn(Mn):(0,Be.Z)((0,Be.Z)({key:"__RC_SELECT_GRP__".concat(Sn===null?zn:Sn,"__"),label:Sn},On),{},{options:_n(ei)})}).filter(function(Mn){return Mn})}var Di=function(fe,Mn,zn,De,kn){return Vt.useMemo(function(){var Sn=fe,Fn=!fe;Fn&&(Sn=_n(Mn));var ei=new Map,On=new Map,Qn=function(Pi,bi,Ge){Ge&&typeof Ge=="string"&&Pi.set(bi[Ge],bi)},Yn=function Ni(Pi){for(var bi=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,Ge=0;Ge<Pi.length;Ge+=1){var Xi=Pi[Ge];!Xi[zn.options]||bi?(ei.set(Xi[zn.value],Xi),Qn(On,Xi,zn.label),Qn(On,Xi,De),Qn(On,Xi,kn)):Ni(Xi[zn.options],!0)}};return Yn(Sn),{options:Sn,valueOptions:ei,labelOptions:On}},[fe,Mn,zn,De,kn])},Bi=Di;function me(Gt){var fe=Vt.useRef();fe.current=Gt;var Mn=Vt.useCallback(function(){return fe.current.apply(fe,arguments)},[]);return Mn}function we(Gt){var fe=Gt.mode,Mn=Gt.options,zn=Gt.children,De=Gt.backfill,kn=Gt.allowClear,Sn=Gt.placeholder,Fn=Gt.getInputElement,ei=Gt.showSearch,On=Gt.onSearch,Qn=Gt.defaultOpen,Yn=Gt.autoFocus,Ni=Gt.labelInValue,Pi=Gt.value,bi=Gt.inputValue,Ge=Gt.optionLabelProp,Xi=isMultiple(fe),dr=ei!==void 0?ei:Xi||fe==="combobox",br=Mn||convertChildrenToData(zn);if(warning(fe!=="tags"||br.every(function(pi){return!pi.disabled}),"Please avoid setting option to disabled in tags mode since user can always type text as tag."),fe==="tags"||fe==="combobox"){var Ue=br.some(function(pi){return pi.options?pi.options.some(function(Fi){return typeof("value"in Fi?Fi.value:Fi.key)=="number"}):typeof("value"in pi?pi.value:pi.key)=="number"});warning(!Ue,"`value` of Option should not use number type when `mode` is `tags` or `combobox`.")}if(warning(fe!=="combobox"||!Ge,"`combobox` mode not support `optionLabelProp`. Please set `value` on Option directly."),warning(fe==="combobox"||!De,"`backfill` only works with `combobox` mode."),warning(fe==="combobox"||!Fn,"`getInputElement` only work with `combobox` mode."),noteOnce(fe!=="combobox"||!Fn||!kn||!Sn,"Customize `getInputElement` should customize clear and placeholder logic instead of configuring `allowClear` and `placeholder`."),On&&!dr&&fe!=="combobox"&&fe!=="tags"&&warning(!1,"`onSearch` should work with `showSearch` instead of use alone."),noteOnce(!Qn||Yn,"`defaultOpen` makes Select open without focus which means it will not close by click outside. You can set `autoFocus` if needed."),Pi!=null){var Vn=toArray(Pi);warning(!Ni||Vn.every(function(pi){return _typeof(pi)==="object"&&("key"in pi||"value"in pi)}),"`value` should in shape of `{ value: string | number, label?: ReactNode }` when you set `labelInValue` to `true`"),warning(!Xi||Array.isArray(Pi),"`value` should be array when `mode` is `multiple` or `tags`")}if(zn){var vi=null;toNodeArray(zn).some(function(pi){if(!React.isValidElement(pi)||!pi.type)return!1;var Fi=pi,Wi=Fi.type;if(Wi.isSelectOption)return!1;if(Wi.isSelectOptGroup){var Vi=toNodeArray(pi.props.children).every(function(pr){return!React.isValidElement(pr)||!pi.type||pr.type.isSelectOption?!0:(vi=pr.type,!1)});return!Vi}return vi=Wi,!0}),vi&&warning(!1,"`children` should be `Select.Option` or `Select.OptGroup` instead of `".concat(vi.displayName||vi.name||vi,"`.")),warning(bi===void 0,"`inputValue` is deprecated, please use `searchValue` instead.")}}function ge(Gt,fe){if(Gt){var Mn=function zn(De){for(var kn=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,Sn=0;Sn<De.length;Sn++){var Fn=De[Sn];if(Fn[fe==null?void 0:fe.value]===null)return warning(!1,"`value` in Select options should not be `null`."),!0;if(!kn&&Array.isArray(Fn[fe==null?void 0:fe.options])&&zn(Fn[fe==null?void 0:fe.options],!0))break}};Mn(Gt)}}var Wn=null,ai=["id","mode","prefixCls","backfill","fieldNames","inputValue","searchValue","onSearch","autoClearSearchValue","onSelect","onDeselect","dropdownMatchSelectWidth","filterOption","filterSort","optionFilterProp","optionLabelProp","options","optionRender","children","defaultActiveFirstOption","menuItemSelectedIcon","virtual","direction","listHeight","listItemHeight","labelRender","value","defaultValue","labelInValue","onChange","maxCount"],si=["inputValue"];function ln(Gt){return!Gt||(0,ie.Z)(Gt)!=="object"}var jn=Vt.forwardRef(function(Gt,fe){var Mn=Gt.id,zn=Gt.mode,De=Gt.prefixCls,kn=De===void 0?"rc-select":De,Sn=Gt.backfill,Fn=Gt.fieldNames,ei=Gt.inputValue,On=Gt.searchValue,Qn=Gt.onSearch,Yn=Gt.autoClearSearchValue,Ni=Yn===void 0?!0:Yn,Pi=Gt.onSelect,bi=Gt.onDeselect,Ge=Gt.dropdownMatchSelectWidth,Xi=Ge===void 0?!0:Ge,dr=Gt.filterOption,br=Gt.filterSort,Ue=Gt.optionFilterProp,Vn=Gt.optionLabelProp,vi=Gt.options,pi=Gt.optionRender,Fi=Gt.children,Wi=Gt.defaultActiveFirstOption,Vi=Gt.menuItemSelectedIcon,pr=Gt.virtual,or=Gt.direction,hr=Gt.listHeight,Xe=hr===void 0?200:hr,nr=Gt.listItemHeight,qe=nr===void 0?20:nr,xi=Gt.labelRender,ir=Gt.value,fr=Gt.defaultValue,Br=Gt.labelInValue,kr=Gt.onChange,rr=Gt.maxCount,Kr=(0,Rt.Z)(Gt,ai),Ae=(0,ni.ZP)(Mn),gn=xe(zn),Me=!!(!vi&&Fi),At=Vt.useMemo(function(){return dr===void 0&&zn==="combobox"?!1:dr},[dr,zn]),Nn=Vt.useMemo(function(){return _e(Fn,Me)},[JSON.stringify(Fn),Me]),Hn=(0,je.Z)("",{value:On!==void 0?On:ei,postState:function(Sr){return Sr||""}}),gi=(0,Se.Z)(Hn,2),ci=gi[0],ti=gi[1],sn=Bi(vi,Fi,Nn,Ue,Vn),Dn=sn.valueOptions,Gn=sn.labelOptions,Ln=sn.options,Zn=Vt.useCallback(function(qi){var Sr=wn(qi);return Sr.map(function(Ir){var Gr,lo,er,La,Ro;if(ln(Ir))Gr=Ir;else{var bo;er=Ir.key,lo=Ir.label,Gr=(bo=Ir.value)!==null&&bo!==void 0?bo:er}var Hr=Dn.get(Gr);if(Hr){var Uo;if(lo===void 0&&(lo=Hr==null?void 0:Hr[Vn||Nn.label]),er===void 0&&(er=(Uo=Hr==null?void 0:Hr.key)!==null&&Uo!==void 0?Uo:Gr),La=Hr==null?void 0:Hr.disabled,Ro=Hr==null?void 0:Hr.title,0)var ba}return{label:lo,value:Gr,key:er,disabled:La,title:Ro}})},[Nn,Vn,Dn]),Mi=(0,je.Z)(fr,{value:ir}),hi=(0,Se.Z)(Mi,2),bn=hi[0],Ke=hi[1],qn=Vt.useMemo(function(){var qi,Sr=gn&&bn===null?[]:bn,Ir=Zn(Sr);return zn==="combobox"&&jt((qi=Ir[0])===null||qi===void 0?void 0:qi.value)?[]:Ir},[bn,Zn,zn,gn]),Ci=Ai(qn,Dn),ar=(0,Se.Z)(Ci,2),Oi=ar[0],ur=ar[1],sr=Vt.useMemo(function(){if(!zn&&Oi.length===1){var qi=Oi[0];if(qi.value===null&&(qi.label===null||qi.label===void 0))return[]}return Oi.map(function(Sr){var Ir;return(0,Be.Z)((0,Be.Z)({},Sr),{},{label:(Ir=typeof xi=="function"?xi(Sr):Sr.label)!==null&&Ir!==void 0?Ir:Sr.value})})},[zn,Oi,xi]),yr=Vt.useMemo(function(){return new Set(Oi.map(function(qi){return qi.value}))},[Oi]);Vt.useEffect(function(){if(zn==="combobox"){var qi,Sr=(qi=Oi[0])===null||qi===void 0?void 0:qi.value;ti(ne(Sr)?String(Sr):"")}},[Oi]);var Tr=me(function(qi,Sr){var Ir=Sr!=null?Sr:qi;return(0,ye.Z)((0,ye.Z)({},Nn.value,qi),Nn.label,Ir)}),jr=Vt.useMemo(function(){if(zn!=="tags")return Ln;var qi=(0,se.Z)(Ln),Sr=function(Gr){return Dn.has(Gr)};return(0,se.Z)(Oi).sort(function(Ir,Gr){return Ir.value<Gr.value?-1:1}).forEach(function(Ir){var Gr=Ir.value;Sr(Gr)||qi.push(Tr(Gr,Ir.label))}),qi},[Tr,Ln,Dn,Oi,zn]),Jr=Pt(jr,Nn,ci,At,Ue),Ee=Vt.useMemo(function(){return zn!=="tags"||!ci||Jr.some(function(qi){return qi[Ue||"value"]===ci})||Jr.some(function(qi){return qi[Nn.value]===ci})?Jr:[Tr(ci)].concat((0,se.Z)(Jr))},[Tr,Ue,zn,Jr,ci,Nn]),Fr=function qi(Sr){var Ir=(0,se.Z)(Sr).sort(function(Gr,lo){return br(Gr,lo,{searchValue:ci})});return Ir.map(function(Gr){return Array.isArray(Gr.options)?(0,Be.Z)((0,Be.Z)({},Gr),{},{options:Gr.options.length>0?qi(Gr.options):Gr.options}):Gr})},Mr=Vt.useMemo(function(){return br?Fr(Ee):Ee},[Ee,br,ci]),Ui=Vt.useMemo(function(){return ee(Mr,{fieldNames:Nn,childrenAsData:Me})},[Mr,Nn,Me]),vr=function(Sr){var Ir=Zn(Sr);if(Ke(Ir),kr&&(Ir.length!==Oi.length||Ir.some(function(er,La){var Ro;return((Ro=Oi[La])===null||Ro===void 0?void 0:Ro.value)!==(er==null?void 0:er.value)}))){var Gr=Br?Ir:Ir.map(function(er){return er.value}),lo=Ir.map(function(er){return de(ur(er.value))});kr(gn?Gr:Gr[0],gn?lo:lo[0])}},mr=Vt.useState(null),_r=(0,Se.Z)(mr,2),Yr=_r[0],Pr=_r[1],oo=Vt.useState(0),va=(0,Se.Z)(oo,2),wo=va[0],ha=va[1],da=Wi!==void 0?Wi:zn!=="combobox",Ji=Vt.useCallback(function(qi,Sr){var Ir=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},Gr=Ir.source,lo=Gr===void 0?"keyboard":Gr;ha(Sr),Sn&&zn==="combobox"&&qi!==null&&lo==="keyboard"&&Pr(String(qi))},[Sn,zn]),Fo=function(Sr,Ir,Gr){var lo=function(){var Ba,cs=ur(Sr);return[Br?{label:cs==null?void 0:cs[Nn.label],value:Sr,key:(Ba=cs==null?void 0:cs.key)!==null&&Ba!==void 0?Ba:Sr}:Sr,de(cs)]};if(Ir&&Pi){var er=lo(),La=(0,Se.Z)(er,2),Ro=La[0],bo=La[1];Pi(Ro,bo)}else if(!Ir&&bi&&Gr!=="clear"){var Hr=lo(),Uo=(0,Se.Z)(Hr,2),ba=Uo[0],ko=Uo[1];bi(ba,ko)}},So=me(function(qi,Sr){var Ir,Gr=gn?Sr.selected:!0;Gr?Ir=gn?[].concat((0,se.Z)(Oi),[qi]):[qi]:Ir=Oi.filter(function(lo){return lo.value!==qi}),vr(Ir),Fo(qi,Gr),zn==="combobox"?Pr(""):(!xe||Ni)&&(ti(""),Pr(""))}),$o=function(Sr,Ir){vr(Sr);var Gr=Ir.type,lo=Ir.values;(Gr==="remove"||Gr==="clear")&&lo.forEach(function(er){Fo(er.value,!1,Gr)})},Do=function(Sr,Ir){if(ti(Sr),Pr(null),Ir.source==="submit"){var Gr=(Sr||"").trim();if(Gr){var lo=Array.from(new Set([].concat((0,se.Z)(yr),[Gr])));vr(lo),Fo(Gr,!0),ti("")}return}Ir.source!=="blur"&&(zn==="combobox"&&vr(Sr),Qn==null||Qn(Sr))},Vo=function(Sr){var Ir=Sr;zn!=="tags"&&(Ir=Sr.map(function(lo){var er=Gn.get(lo);return er==null?void 0:er.value}).filter(function(lo){return lo!==void 0}));var Gr=Array.from(new Set([].concat((0,se.Z)(yr),(0,se.Z)(Ir))));vr(Gr),Gr.forEach(function(lo){Fo(lo,!0)})},li=Vt.useMemo(function(){var qi=pr!==!1&&Xi!==!1;return(0,Be.Z)((0,Be.Z)({},sn),{},{flattenOptions:Ui,onActiveValue:Ji,defaultActiveFirstOption:da,onSelect:So,menuItemSelectedIcon:Vi,rawValues:yr,fieldNames:Nn,virtual:qi,direction:or,listHeight:Xe,listItemHeight:qe,childrenAsData:Me,maxCount:rr,optionRender:pi})},[rr,sn,Ui,Ji,da,So,Vi,yr,Nn,pr,Xi,or,Xe,qe,Me,pi]);return Vt.createElement(ze.Provider,{value:li},Vt.createElement(Ze,(0,Ft.Z)({},Kr,{id:Ae,prefixCls:kn,ref:fe,omitDomProps:si,mode:zn,displayValues:sr,onDisplayValuesChange:$o,direction:or,searchValue:ci,onSearch:Do,autoClearSearchValue:Ni,onSearchSplit:Vo,dropdownMatchSelectWidth:Xi,OptionList:ji,emptyOptions:!Ui.length,activeValue:Yr,activeDescendantId:"".concat(Ae,"_list_").concat(wo)})))}),ii=jn;ii.Option=Kn,ii.OptGroup=le;var ki=ii,Ri=ki},63158:function(Tn,oi,Dt){"use strict";var Ft=Dt(71409),se=Dt(87075),ye=Dt(11036),Be=Dt(39224),Se=Dt(59301),Rt=Dt(92310),ie=Dt.n(Rt),je=Dt(18929),ce=Dt(10228),Vt=["prefixCls","className","checked","defaultChecked","disabled","loadingIcon","checkedChildren","unCheckedChildren","onClick","onChange","onKeyDown"],Qe=Se.forwardRef(function(Qt,Je){var Nt,nt=Qt.prefixCls,et=nt===void 0?"rc-switch":nt,ct=Qt.className,lt=Qt.checked,pt=Qt.defaultChecked,vt=Qt.disabled,xt=Qt.loadingIcon,Lt=Qt.checkedChildren,Ot=Qt.unCheckedChildren,Ht=Qt.onClick,te=Qt.onChange,_t=Qt.onKeyDown,Xt=(0,Be.Z)(Qt,Vt),ve=(0,je.Z)(!1,{value:lt,defaultValue:pt}),oe=(0,ye.Z)(ve,2),Re=oe[0],Ye=oe[1];function en(vn,ne){var jt=Re;return vt||(jt=vn,Ye(jt),te==null||te(jt,ne)),jt}function Rn(vn){vn.which===ce.Z.LEFT?en(!1,vn):vn.which===ce.Z.RIGHT&&en(!0,vn),_t==null||_t(vn)}function wn(vn){var ne=en(!Re,vn);Ht==null||Ht(ne,vn)}var un=ie()(et,ct,(Nt={},(0,se.Z)(Nt,"".concat(et,"-checked"),Re),(0,se.Z)(Nt,"".concat(et,"-disabled"),vt),Nt));return Se.createElement("button",(0,Ft.Z)({},Xt,{type:"button",role:"switch","aria-checked":Re,disabled:vt,className:un,ref:Je,onKeyDown:Rn,onClick:wn}),xt,Se.createElement("span",{className:"".concat(et,"-inner")},Se.createElement("span",{className:"".concat(et,"-inner-checked")},Lt),Se.createElement("span",{className:"".concat(et,"-inner-unchecked")},Ot)))});Qe.displayName="Switch",oi.Z=Qe},86351:function(Tn,oi,Dt){"use strict";Dt.d(oi,{R:function(){return se},w:function(){return Ft}});var Ft={},se="rc-table-internal-hook"},97347:function(Tn,oi,Dt){"use strict";Dt.d(oi,{L:function(){return et},Z:function(){return xt}});var Ft=Dt(11036),se=Dt(87075),ye=Dt(62730),Be=Dt(28788),Se=Dt(89490),Rt=Dt(39224),ie=Dt(11592),je=Dt(48736),ce=Dt(59301),Vt=Dt(86351),Qe=Dt(54451);function Qt(Lt){var Ot=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"";return typeof Ot=="number"?Ot:Ot.endsWith("%")?Lt*parseFloat(Ot)/100:null}function Je(Lt,Ot,Ht){return ce.useMemo(function(){if(Ot&&Ot>0){var te=0,_t=0;Lt.forEach(function(wn){var un=Qt(Ot,wn.width);un?te+=un:_t+=1});var Xt=Math.max(Ot,Ht),ve=Math.max(Xt-te,_t),oe=_t,Re=ve/_t,Ye=0,en=Lt.map(function(wn){var un=(0,Se.Z)({},wn),vn=Qt(Ot,un.width);if(vn)un.width=vn;else{var ne=Math.floor(Re);un.width=oe===1?ve:ne,ve-=ne,oe-=1}return Ye+=un.width,un});if(Ye<Xt){var Rn=Xt/Ye;ve=Xt,en.forEach(function(wn,un){var vn=Math.floor(wn.width*Rn);wn.width=un===en.length-1?ve:vn,ve-=vn})}return[en,Math.max(Ye,Xt)]}return[Lt,Ot]},[Lt,Ot,Ht])}var Nt=["children"],nt=["fixed"];function et(Lt){return(0,ie.Z)(Lt).filter(function(Ot){return ce.isValidElement(Ot)}).map(function(Ot){var Ht=Ot.key,te=Ot.props,_t=te.children,Xt=(0,Rt.Z)(te,Nt),ve=(0,Se.Z)({key:Ht},Xt);return _t&&(ve.children=et(_t)),ve})}function ct(Lt){return Lt.filter(function(Ot){return Ot&&(0,Be.Z)(Ot)==="object"&&!Ot.hidden}).map(function(Ot){var Ht=Ot.children;return Ht&&Ht.length>0?(0,Se.Z)((0,Se.Z)({},Ot),{},{children:ct(Ht)}):Ot})}function lt(Lt){var Ot=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"key";return Lt.filter(function(Ht){return Ht&&(0,Be.Z)(Ht)==="object"}).reduce(function(Ht,te,_t){var Xt=te.fixed,ve=Xt===!0?"left":Xt,oe="".concat(Ot,"-").concat(_t),Re=te.children;return Re&&Re.length>0?[].concat((0,ye.Z)(Ht),(0,ye.Z)(lt(Re,oe).map(function(Ye){return(0,Se.Z)({fixed:ve},Ye)}))):[].concat((0,ye.Z)(Ht),[(0,Se.Z)((0,Se.Z)({key:oe},te),{},{fixed:ve})])},[])}function pt(Lt){return Lt.map(function(Ot){var Ht=Ot.fixed,te=(0,Rt.Z)(Ot,nt),_t=Ht;return Ht==="left"?_t="right":Ht==="right"&&(_t="left"),(0,Se.Z)({fixed:_t},te)})}function vt(Lt,Ot){var Ht=Lt.prefixCls,te=Lt.columns,_t=Lt.children,Xt=Lt.expandable,ve=Lt.expandedKeys,oe=Lt.columnTitle,Re=Lt.getRowKey,Ye=Lt.onTriggerExpand,en=Lt.expandIcon,Rn=Lt.rowExpandable,wn=Lt.expandIconColumnIndex,un=Lt.direction,vn=Lt.expandRowByClick,ne=Lt.columnWidth,jt=Lt.fixed,Fe=Lt.scrollWidth,We=Lt.clientWidth,Pn=ce.useMemo(function(){var di=te||et(_t)||[];return ct(di.slice())},[te,_t]),ke=ce.useMemo(function(){if(Xt){var di=Pn.slice();if(!di.includes(Vt.w)){var Tt=wn||0;Tt>=0&&(Tt||jt==="left"||!jt)&&di.splice(Tt,0,Vt.w),jt==="right"&&di.splice(Pn.length,0,Vt.w)}var Et=di.indexOf(Vt.w);di=di.filter(function(kt,Ut){return kt!==Vt.w||Ut===Et});var St=Pn[Et],Mt;jt?Mt=jt:Mt=St?St.fixed:null;var zt=(0,se.Z)((0,se.Z)((0,se.Z)((0,se.Z)((0,se.Z)((0,se.Z)({},Qe.v,{className:"".concat(Ht,"-expand-icon-col"),columnType:"EXPAND_COLUMN"}),"title",oe),"fixed",Mt),"className","".concat(Ht,"-row-expand-icon-cell")),"width",ne),"render",function(Ut,Oe,Te){var _e=Re(Oe,Te),ee=ve.has(_e),de=Rn?Rn(Oe):!0,pe=en({prefixCls:Ht,expanded:ee,expandable:de,record:Oe,onExpand:Ye});return vn?ce.createElement("span",{onClick:function(ze){return ze.stopPropagation()}},pe):pe});return di.map(function(kt){return kt===Vt.w?zt:kt})}return Pn.filter(function(kt){return kt!==Vt.w})},[Xt,Pn,Re,ve,en,un]),tn=ce.useMemo(function(){var di=ke;return Ot&&(di=Ot(di)),di.length||(di=[{render:function(){return null}}]),di},[Ot,ke,un]),fn=ce.useMemo(function(){return un==="rtl"?pt(lt(tn)):lt(tn)},[tn,un,Fe]),Jn=ce.useMemo(function(){for(var di=-1,Tt=fn.length-1;Tt>=0;Tt-=1){var Et=fn[Tt].fixed;if(Et==="left"||Et===!0){di=Tt;break}}if(di>=0)for(var St=0;St<=di;St+=1){var Mt=fn[St].fixed;if(Mt!=="left"&&Mt!==!0)return!0}var zt=fn.findIndex(function(Oe){var Te=Oe.fixed;return Te==="right"});if(zt>=0)for(var kt=zt;kt<fn.length;kt+=1){var Ut=fn[kt].fixed;if(Ut!=="right")return!0}return!1},[fn]),Pe=Je(fn,Fe,We),an=(0,Ft.Z)(Pe,2),re=an[0],hn=an[1];return[tn,re,hn,Jn]}var xt=vt},4030:function(Tn,oi,Dt){"use strict";Dt.d(oi,{w2:function(){return Ft.w},vP:function(){return Hi.v},RQ:function(){return Ft.R},ER:function(){return _e},Q$:function(){return dr},TN:function(){return kr}});var Ft=Dt(86351),se=Dt(11036),ye=Dt(6089),Be=Dt(34280),Se=Dt(13697),Rt=Dt(59301),ie=Dt(4676);function je(Ae){var gn=Rt.createContext(void 0),Me=function(Nn){var Hn=Nn.value,gi=Nn.children,ci=Rt.useRef(Hn);ci.current=Hn;var ti=Rt.useState(function(){return{getValue:function(){return ci.current},listeners:new Set}}),sn=(0,se.Z)(ti,1),Dn=sn[0];return(0,Be.Z)(function(){(0,ie.unstable_batchedUpdates)(function(){Dn.listeners.forEach(function(Gn){Gn(Hn)})})},[Hn]),Rt.createElement(gn.Provider,{value:Dn},gi)};return{Context:gn,Provider:Me,defaultValue:Ae}}function ce(Ae,gn){var Me=(0,ye.Z)(typeof gn=="function"?gn:function(Gn){if(gn===void 0)return Gn;if(!Array.isArray(gn))return Gn[gn];var Ln={};return gn.forEach(function(Zn){Ln[Zn]=Gn[Zn]}),Ln}),At=Rt.useContext(Ae==null?void 0:Ae.Context),Nn=At||{},Hn=Nn.listeners,gi=Nn.getValue,ci=Rt.useRef();ci.current=Me(At?gi():Ae==null?void 0:Ae.defaultValue);var ti=Rt.useState({}),sn=(0,se.Z)(ti,2),Dn=sn[1];return(0,Be.Z)(function(){if(!At)return;function Gn(Ln){var Zn=Me(Ln);(0,Se.Z)(ci.current,Zn,!0)||Dn({})}return Hn.add(Gn),function(){Hn.delete(Gn)}},[At]),ci.current}var Vt=Dt(71409),Qe=Dt(8654);function Qt(){var Ae=Rt.createContext(null);function gn(){return Rt.useContext(Ae)}function Me(Nn,Hn){var gi=(0,Qe.Yr)(Nn),ci=function(sn,Dn){var Gn=gi?{ref:Dn}:{},Ln=Rt.useRef(0),Zn=Rt.useRef(sn),Mi=gn();return Mi!==null?Rt.createElement(Nn,(0,Vt.Z)({},sn,Gn)):((!Hn||Hn(Zn.current,sn))&&(Ln.current+=1),Zn.current=sn,Rt.createElement(Ae.Provider,{value:Ln.current},Rt.createElement(Nn,(0,Vt.Z)({},sn,Gn))))};return gi?Rt.forwardRef(ci):ci}function At(Nn,Hn){var gi=(0,Qe.Yr)(Nn),ci=function(sn,Dn){var Gn=gi?{ref:Dn}:{};return gn(),Rt.createElement(Nn,(0,Vt.Z)({},sn,Gn))};return gi?Rt.memo(Rt.forwardRef(ci),Hn):Rt.memo(ci,Hn)}return{makeImmutable:Me,responseImmutable:At,useImmutableMark:gn}}var Je=Qt(),Nt=Je.makeImmutable,nt=Je.responseImmutable,et=Je.useImmutableMark,ct=Qt(),lt=ct.makeImmutable,pt=ct.responseImmutable,vt=ct.useImmutableMark,xt=je(),Lt=xt;function Ot(Ae,gn){var Me=React.useRef(0);Me.current+=1;var At=React.useRef(Ae),Nn=[];Object.keys(Ae||{}).map(function(gi){var ci;(Ae==null?void 0:Ae[gi])!==((ci=At.current)===null||ci===void 0?void 0:ci[gi])&&Nn.push(gi)}),At.current=Ae;var Hn=React.useRef([]);return Nn.length&&(Hn.current=Nn),React.useDebugValue(Me.current),React.useDebugValue(Hn.current.join(", ")),gn&&console.log("".concat(gn,":"),Me.current,Hn.current),Me.current}var Ht=null,te=null,_t=Dt(28788),Xt=Dt(89490),ve=Dt(87075),oe=Dt(92310),Re=Dt.n(oe),Ye=Dt(80547),en=Dt(97938),Rn=Dt(48736),wn=Rt.createContext({renderWithProps:!1}),un=wn,vn="RC_TABLE_KEY";function ne(Ae){return Ae==null?[]:Array.isArray(Ae)?Ae:[Ae]}function jt(Ae){var gn=[],Me={};return Ae.forEach(function(At){for(var Nn=At||{},Hn=Nn.key,gi=Nn.dataIndex,ci=Hn||ne(gi).join("-")||vn;Me[ci];)ci="".concat(ci,"_next");Me[ci]=!0,gn.push(ci)}),gn}function Fe(Ae){return Ae!=null}function We(Ae){return typeof Ae=="number"&&!Number.isNaN(Ae)}function Pn(Ae){return Ae&&(0,_t.Z)(Ae)==="object"&&!Array.isArray(Ae)&&!Rt.isValidElement(Ae)}function ke(Ae,gn,Me,At,Nn,Hn){var gi=Rt.useContext(un),ci=vt(),ti=(0,Ye.Z)(function(){if(Fe(At))return[At];var sn=gn==null||gn===""?[]:Array.isArray(gn)?gn:[gn],Dn=(0,en.Z)(Ae,sn),Gn=Dn,Ln=void 0;if(Nn){var Zn=Nn(Dn,Ae,Me);Pn(Zn)?(Gn=Zn.children,Ln=Zn.props,gi.renderWithProps=!0):Gn=Zn}return[Gn,Ln]},[ci,Ae,At,gn,Nn,Me],function(sn,Dn){if(Hn){var Gn=(0,se.Z)(sn,2),Ln=Gn[1],Zn=(0,se.Z)(Dn,2),Mi=Zn[1];return Hn(Mi,Ln)}return gi.renderWithProps?!0:!(0,Se.Z)(sn,Dn,!0)});return ti}function tn(Ae,gn,Me,At){var Nn=Ae+gn-1;return Ae<=At&&Nn>=Me}function fn(Ae,gn){return ce(Lt,function(Me){var At=tn(Ae,gn||1,Me.hoverStartRow,Me.hoverEndRow);return[At,Me.onHover]})}var Jn=Dt(70425),Pe=function(gn){var Me=gn.ellipsis,At=gn.rowType,Nn=gn.children,Hn,gi=Me===!0?{showTitle:!0}:Me;return gi&&(gi.showTitle||At==="header")&&(typeof Nn=="string"||typeof Nn=="number"?Hn=Nn.toString():Rt.isValidElement(Nn)&&typeof Nn.props.children=="string"&&(Hn=Nn.props.children)),Hn};function an(Ae){var gn,Me,At,Nn,Hn,gi,ci,ti,sn=Ae.component,Dn=Ae.children,Gn=Ae.ellipsis,Ln=Ae.scope,Zn=Ae.prefixCls,Mi=Ae.className,hi=Ae.align,bn=Ae.record,Ke=Ae.render,qn=Ae.dataIndex,Ci=Ae.renderIndex,ar=Ae.shouldCellUpdate,Oi=Ae.index,ur=Ae.rowType,sr=Ae.colSpan,yr=Ae.rowSpan,Tr=Ae.fixLeft,jr=Ae.fixRight,Jr=Ae.firstFixLeft,Ee=Ae.lastFixLeft,Fr=Ae.firstFixRight,Mr=Ae.lastFixRight,Ui=Ae.appendNode,vr=Ae.additionalProps,mr=vr===void 0?{}:vr,_r=Ae.isSticky,Yr="".concat(Zn,"-cell"),Pr=ce(Lt,["supportSticky","allColumnsFixedLeft","rowHoverable"]),oo=Pr.supportSticky,va=Pr.allColumnsFixedLeft,wo=Pr.rowHoverable,ha=ke(bn,qn,Ci,Dn,Ke,ar),da=(0,se.Z)(ha,2),Ji=da[0],Fo=da[1],So={},$o=typeof Tr=="number"&&oo,Do=typeof jr=="number"&&oo;$o&&(So.position="sticky",So.left=Tr),Do&&(So.position="sticky",So.right=jr);var Vo=(gn=(Me=(At=Fo==null?void 0:Fo.colSpan)!==null&&At!==void 0?At:mr.colSpan)!==null&&Me!==void 0?Me:sr)!==null&&gn!==void 0?gn:1,li=(Nn=(Hn=(gi=Fo==null?void 0:Fo.rowSpan)!==null&&gi!==void 0?gi:mr.rowSpan)!==null&&Hn!==void 0?Hn:yr)!==null&&Nn!==void 0?Nn:1,qi=fn(Oi,li),Sr=(0,se.Z)(qi,2),Ir=Sr[0],Gr=Sr[1],lo=(0,Jn.zX)(function(ba){var ko;bn&&Gr(Oi,Oi+li-1),mr==null||(ko=mr.onMouseEnter)===null||ko===void 0||ko.call(mr,ba)}),er=(0,Jn.zX)(function(ba){var ko;bn&&Gr(-1,-1),mr==null||(ko=mr.onMouseLeave)===null||ko===void 0||ko.call(mr,ba)});if(Vo===0||li===0)return null;var La=(ci=mr.title)!==null&&ci!==void 0?ci:Pe({rowType:ur,ellipsis:Gn,children:Ji}),Ro=Re()(Yr,Mi,(ti={},(0,ve.Z)((0,ve.Z)((0,ve.Z)((0,ve.Z)((0,ve.Z)((0,ve.Z)((0,ve.Z)((0,ve.Z)((0,ve.Z)((0,ve.Z)(ti,"".concat(Yr,"-fix-left"),$o&&oo),"".concat(Yr,"-fix-left-first"),Jr&&oo),"".concat(Yr,"-fix-left-last"),Ee&&oo),"".concat(Yr,"-fix-left-all"),Ee&&va&&oo),"".concat(Yr,"-fix-right"),Do&&oo),"".concat(Yr,"-fix-right-first"),Fr&&oo),"".concat(Yr,"-fix-right-last"),Mr&&oo),"".concat(Yr,"-ellipsis"),Gn),"".concat(Yr,"-with-append"),Ui),"".concat(Yr,"-fix-sticky"),($o||Do)&&_r&&oo),(0,ve.Z)(ti,"".concat(Yr,"-row-hover"),!Fo&&Ir)),mr.className,Fo==null?void 0:Fo.className),bo={};hi&&(bo.textAlign=hi);var Hr=(0,Xt.Z)((0,Xt.Z)((0,Xt.Z)((0,Xt.Z)({},Fo==null?void 0:Fo.style),So),bo),mr.style),Uo=Ji;return(0,_t.Z)(Uo)==="object"&&!Array.isArray(Uo)&&!Rt.isValidElement(Uo)&&(Uo=null),Gn&&(Ee||Fr)&&(Uo=Rt.createElement("span",{className:"".concat(Yr,"-content")},Uo)),Rt.createElement(sn,(0,Vt.Z)({},Fo,mr,{className:Ro,style:Hr,title:La,scope:Ln,onMouseEnter:wo?lo:void 0,onMouseLeave:wo?er:void 0,colSpan:Vo!==1?Vo:null,rowSpan:li!==1?li:null}),Ui,Uo)}var re=Rt.memo(an);function hn(Ae,gn,Me,At,Nn){var Hn=Me[Ae]||{},gi=Me[gn]||{},ci,ti;Hn.fixed==="left"?ci=At.left[Nn==="rtl"?gn:Ae]:gi.fixed==="right"&&(ti=At.right[Nn==="rtl"?Ae:gn]);var sn=!1,Dn=!1,Gn=!1,Ln=!1,Zn=Me[gn+1],Mi=Me[Ae-1],hi=Zn&&!Zn.fixed||Mi&&!Mi.fixed||Me.every(function(ar){return ar.fixed==="left"});if(Nn==="rtl"){if(ci!==void 0){var bn=Mi&&Mi.fixed==="left";Ln=!bn&&hi}else if(ti!==void 0){var Ke=Zn&&Zn.fixed==="right";Gn=!Ke&&hi}}else if(ci!==void 0){var qn=Zn&&Zn.fixed==="left";sn=!qn&&hi}else if(ti!==void 0){var Ci=Mi&&Mi.fixed==="right";Dn=!Ci&&hi}return{fixLeft:ci,fixRight:ti,lastFixLeft:sn,firstFixRight:Dn,lastFixRight:Gn,firstFixLeft:Ln,isSticky:At.isSticky}}var di=Rt.createContext({}),Tt=di;function Et(Ae){var gn=Ae.className,Me=Ae.index,At=Ae.children,Nn=Ae.colSpan,Hn=Nn===void 0?1:Nn,gi=Ae.rowSpan,ci=Ae.align,ti=ce(Lt,["prefixCls","direction"]),sn=ti.prefixCls,Dn=ti.direction,Gn=Rt.useContext(Tt),Ln=Gn.scrollColumnIndex,Zn=Gn.stickyOffsets,Mi=Gn.flattenColumns,hi=Me+Hn-1,bn=hi+1===Ln?Hn+1:Hn,Ke=hn(Me,Me+bn-1,Mi,Zn,Dn);return Rt.createElement(re,(0,Vt.Z)({className:gn,index:Me,component:"td",prefixCls:sn,record:null,dataIndex:null,align:ci,colSpan:bn,rowSpan:gi,render:function(){return At}},Ke))}var St=Dt(39224),Mt=["children"];function zt(Ae){var gn=Ae.children,Me=(0,St.Z)(Ae,Mt);return Rt.createElement("tr",Me,gn)}function kt(Ae){var gn=Ae.children;return gn}kt.Row=zt,kt.Cell=Et;var Ut=kt;function Oe(Ae){var gn=Ae.children,Me=Ae.stickyOffsets,At=Ae.flattenColumns,Nn=ce(Lt,"prefixCls"),Hn=At.length-1,gi=At[Hn],ci=Rt.useMemo(function(){return{stickyOffsets:Me,flattenColumns:At,scrollColumnIndex:gi!=null&&gi.scrollbar?Hn:null}},[gi,At,Hn,Me]);return Rt.createElement(Tt.Provider,{value:ci},Rt.createElement("tfoot",{className:"".concat(Nn,"-summary")},gn))}var Te=pt(Oe),_e=Ut,ee=Dt(29301),de=Dt(24514),pe=Dt(75152),be=Dt(26112);function ze(Ae,gn,Me,At,Nn,Hn,gi){Ae.push({record:gn,indent:Me,index:gi});var ci=Hn(gn),ti=Nn==null?void 0:Nn.has(ci);if(gn&&Array.isArray(gn[At])&&ti)for(var sn=0;sn<gn[At].length;sn+=1)ze(Ae,gn[At][sn],Me+1,At,Nn,Hn,sn)}function rn(Ae,gn,Me,At){var Nn=Rt.useMemo(function(){if(Me!=null&&Me.size){for(var Hn=[],gi=0;gi<(Ae==null?void 0:Ae.length);gi+=1){var ci=Ae[gi];ze(Hn,ci,0,gn,Me,At,gi)}return Hn}return Ae==null?void 0:Ae.map(function(ti,sn){return{record:ti,indent:0,index:sn}})},[Ae,gn,Me,At]);return Nn}function He(Ae,gn,Me,At){var Nn=ce(Lt,["prefixCls","fixedInfoList","flattenColumns","expandableType","expandRowByClick","onTriggerExpand","rowClassName","expandedRowClassName","indentSize","expandIcon","expandedRowRender","expandIconColumnIndex","expandedKeys","childrenColumnName","rowExpandable","onRow"]),Hn=Nn.flattenColumns,gi=Nn.expandableType,ci=Nn.expandedKeys,ti=Nn.childrenColumnName,sn=Nn.onTriggerExpand,Dn=Nn.rowExpandable,Gn=Nn.onRow,Ln=Nn.expandRowByClick,Zn=Nn.rowClassName,Mi=gi==="nest",hi=gi==="row"&&(!Dn||Dn(Ae)),bn=hi||Mi,Ke=ci&&ci.has(gn),qn=ti&&Ae&&Ae[ti],Ci=(0,Jn.zX)(sn),ar=Gn==null?void 0:Gn(Ae,Me),Oi=ar==null?void 0:ar.onClick,ur=function(jr){Ln&&bn&&sn(Ae,jr);for(var Jr=arguments.length,Ee=new Array(Jr>1?Jr-1:0),Fr=1;Fr<Jr;Fr++)Ee[Fr-1]=arguments[Fr];Oi==null||Oi.apply(void 0,[jr].concat(Ee))},sr;typeof Zn=="string"?sr=Zn:typeof Zn=="function"&&(sr=Zn(Ae,Me,At));var yr=jt(Hn);return(0,Xt.Z)((0,Xt.Z)({},Nn),{},{columnsKey:yr,nestExpandable:Mi,expanded:Ke,hasNestChildren:qn,record:Ae,onTriggerExpand:Ci,rowSupportExpand:hi,expandable:bn,rowProps:(0,Xt.Z)((0,Xt.Z)({},ar),{},{className:Re()(sr,ar==null?void 0:ar.className),onClick:ur})})}function yn(Ae){var gn=Ae.prefixCls,Me=Ae.children,At=Ae.component,Nn=Ae.cellComponent,Hn=Ae.className,gi=Ae.expanded,ci=Ae.colSpan,ti=Ae.isEmpty,sn=ce(Lt,["scrollbarSize","fixHeader","fixColumn","componentWidth","horizonScroll"]),Dn=sn.scrollbarSize,Gn=sn.fixHeader,Ln=sn.fixColumn,Zn=sn.componentWidth,Mi=sn.horizonScroll,hi=Me;return(ti?Mi&&Zn:Ln)&&(hi=Rt.createElement("div",{style:{width:Zn-(Gn&&!ti?Dn:0),position:"sticky",left:0,overflow:"hidden"},className:"".concat(gn,"-expanded-row-fixed")},hi)),Rt.createElement(At,{className:Hn,style:{display:gi?null:"none"}},Rt.createElement(re,{component:Nn,prefixCls:gn,colSpan:ci},hi))}var xe=yn;function Ne(Ae){var gn=Ae.prefixCls,Me=Ae.record,At=Ae.onExpand,Nn=Ae.expanded,Hn=Ae.expandable,gi="".concat(gn,"-row-expand-icon");if(!Hn)return Rt.createElement("span",{className:Re()(gi,"".concat(gn,"-row-spaced"))});var ci=function(sn){At(Me,sn),sn.stopPropagation()};return Rt.createElement("span",{className:Re()(gi,(0,ve.Z)((0,ve.Z)({},"".concat(gn,"-row-expanded"),Nn),"".concat(gn,"-row-collapsed"),!Nn)),onClick:ci})}function Ze(Ae,gn,Me){var At=[];function Nn(Hn){(Hn||[]).forEach(function(gi,ci){At.push(gn(gi,ci)),Nn(gi[Me])})}return Nn(Ae),At}function Bn(Ae,gn,Me,At){return typeof Ae=="string"?Ae:typeof Ae=="function"?Ae(gn,Me,At):""}function le(Ae,gn,Me,At,Nn){var Hn=Ae.record,gi=Ae.prefixCls,ci=Ae.columnsKey,ti=Ae.fixedInfoList,sn=Ae.expandIconColumnIndex,Dn=Ae.nestExpandable,Gn=Ae.indentSize,Ln=Ae.expandIcon,Zn=Ae.expanded,Mi=Ae.hasNestChildren,hi=Ae.onTriggerExpand,bn=ci[Me],Ke=ti[Me],qn;Me===(sn||0)&&Dn&&(qn=Rt.createElement(Rt.Fragment,null,Rt.createElement("span",{style:{paddingLeft:"".concat(Gn*At,"px")},className:"".concat(gi,"-row-indent indent-level-").concat(At)}),Ln({prefixCls:gi,expanded:Zn,expandable:Mi,record:Hn,onExpand:hi})));var Ci;return gn.onCell&&(Ci=gn.onCell(Hn,Nn)),{key:bn,fixedInfo:Ke,appendCellNode:qn,additionalCellProps:Ci||{}}}function An(Ae){var gn=Ae.className,Me=Ae.style,At=Ae.record,Nn=Ae.index,Hn=Ae.renderIndex,gi=Ae.rowKey,ci=Ae.indent,ti=ci===void 0?0:ci,sn=Ae.rowComponent,Dn=Ae.cellComponent,Gn=Ae.scopeCellComponent,Ln=He(At,gi,Nn,ti),Zn=Ln.prefixCls,Mi=Ln.flattenColumns,hi=Ln.expandedRowClassName,bn=Ln.expandedRowRender,Ke=Ln.rowProps,qn=Ln.expanded,Ci=Ln.rowSupportExpand,ar=Rt.useRef(!1);ar.current||(ar.current=qn);var Oi=Bn(hi,At,Nn,ti),ur=Rt.createElement(sn,(0,Vt.Z)({},Ke,{"data-row-key":gi,className:Re()(gn,"".concat(Zn,"-row"),"".concat(Zn,"-row-level-").concat(ti),Ke==null?void 0:Ke.className,(0,ve.Z)({},Oi,ti>=1)),style:(0,Xt.Z)((0,Xt.Z)({},Me),Ke==null?void 0:Ke.style)}),Mi.map(function(Tr,jr){var Jr=Tr.render,Ee=Tr.dataIndex,Fr=Tr.className,Mr=le(Ln,Tr,jr,ti,Nn),Ui=Mr.key,vr=Mr.fixedInfo,mr=Mr.appendCellNode,_r=Mr.additionalCellProps;return Rt.createElement(re,(0,Vt.Z)({className:Fr,ellipsis:Tr.ellipsis,align:Tr.align,scope:Tr.rowScope,component:Tr.rowScope?Gn:Dn,prefixCls:Zn,key:Ui,record:At,index:Nn,renderIndex:Hn,dataIndex:Ee,render:Jr,shouldCellUpdate:Tr.shouldCellUpdate},vr,{appendNode:mr,additionalProps:_r}))})),sr;if(Ci&&(ar.current||qn)){var yr=bn(At,Nn,ti+1,qn);sr=Rt.createElement(xe,{expanded:qn,className:Re()("".concat(Zn,"-expanded-row"),"".concat(Zn,"-expanded-row-level-").concat(ti+1),Oi),prefixCls:Zn,component:sn,cellComponent:Dn,colSpan:Mi.length,isEmpty:!1},yr)}return Rt.createElement(Rt.Fragment,null,ur,sr)}var Kn=pt(An);function yi(Ae){var gn=Ae.columnKey,Me=Ae.onColumnResize,At=Rt.useRef();return(0,Be.Z)(function(){At.current&&Me(gn,At.current.offsetWidth)},[]),Rt.createElement(ee.Z,{data:gn},Rt.createElement("td",{ref:At,style:{padding:0,border:0,height:0}},Rt.createElement("div",{style:{height:0,overflow:"hidden"}},"\xA0")))}var Xn=Dt(29194);function Ei(Ae){var gn=Ae.prefixCls,Me=Ae.columnsKey,At=Ae.onColumnResize,Nn=Rt.useRef(null);return Rt.createElement("tr",{"aria-hidden":"true",className:"".concat(gn,"-measure-row"),style:{height:0,fontSize:0},ref:Nn},Rt.createElement(ee.Z.Collection,{onBatchResize:function(gi){(0,Xn.Z)(Nn.current)&&gi.forEach(function(ci){var ti=ci.data,sn=ci.size;At(ti,sn.offsetWidth)})}},Me.map(function(Hn){return Rt.createElement(yi,{key:Hn,columnKey:Hn,onColumnResize:At})})))}function Yi(Ae){var gn=Ae.data,Me=Ae.measureColumnWidth,At=ce(Lt,["prefixCls","getComponent","onColumnResize","flattenColumns","getRowKey","expandedKeys","childrenColumnName","emptyNode"]),Nn=At.prefixCls,Hn=At.getComponent,gi=At.onColumnResize,ci=At.flattenColumns,ti=At.getRowKey,sn=At.expandedKeys,Dn=At.childrenColumnName,Gn=At.emptyNode,Ln=rn(gn,Dn,sn,ti),Zn=Rt.useRef({renderWithProps:!1}),Mi=Hn(["body","wrapper"],"tbody"),hi=Hn(["body","row"],"tr"),bn=Hn(["body","cell"],"td"),Ke=Hn(["body","cell"],"th"),qn;gn.length?qn=Ln.map(function(ar,Oi){var ur=ar.record,sr=ar.indent,yr=ar.index,Tr=ti(ur,Oi);return Rt.createElement(Kn,{key:Tr,rowKey:Tr,record:ur,index:Oi,renderIndex:yr,rowComponent:hi,cellComponent:bn,scopeCellComponent:Ke,indent:sr})}):qn=Rt.createElement(xe,{expanded:!0,className:"".concat(Nn,"-placeholder"),prefixCls:Nn,component:hi,cellComponent:bn,colSpan:ci.length,isEmpty:!0},Gn);var Ci=jt(ci);return Rt.createElement(un.Provider,{value:Zn.current},Rt.createElement(Mi,{className:"".concat(Nn,"-tbody")},Me&&Rt.createElement(Ei,{prefixCls:Nn,columnsKey:Ci,onColumnResize:gi}),qn))}var Gi=pt(Yi),Hi=Dt(54451),Ki=["columnType"];function Qi(Ae){for(var gn=Ae.colWidths,Me=Ae.columns,At=Ae.columCount,Nn=ce(Lt,["tableLayout"]),Hn=Nn.tableLayout,gi=[],ci=At||Me.length,ti=!1,sn=ci-1;sn>=0;sn-=1){var Dn=gn[sn],Gn=Me&&Me[sn],Ln=void 0,Zn=void 0;if(Gn&&(Ln=Gn[Hi.v],Hn==="auto"&&(Zn=Gn.minWidth)),Dn||Zn||Ln||ti){var Mi=Ln||{},hi=Mi.columnType,bn=(0,St.Z)(Mi,Ki);gi.unshift(Rt.createElement("col",(0,Vt.Z)({key:sn,style:{width:Dn,minWidth:Zn}},bn))),ti=!0}}return Rt.createElement("colgroup",null,gi)}var ji=Qi,Ai=Dt(62730),Zi=["className","noData","columns","flattenColumns","colWidths","columCount","stickyOffsets","direction","fixHeader","stickyTopOffset","stickyBottomOffset","stickyClassName","onScroll","maxContentScroll","children"];function Pt(Ae,gn){return(0,Rt.useMemo)(function(){for(var Me=[],At=0;At<gn;At+=1){var Nn=Ae[At];if(Nn!==void 0)Me[At]=Nn;else return null}return Me},[Ae.join("_"),gn])}var ni=Rt.forwardRef(function(Ae,gn){var Me=Ae.className,At=Ae.noData,Nn=Ae.columns,Hn=Ae.flattenColumns,gi=Ae.colWidths,ci=Ae.columCount,ti=Ae.stickyOffsets,sn=Ae.direction,Dn=Ae.fixHeader,Gn=Ae.stickyTopOffset,Ln=Ae.stickyBottomOffset,Zn=Ae.stickyClassName,Mi=Ae.onScroll,hi=Ae.maxContentScroll,bn=Ae.children,Ke=(0,St.Z)(Ae,Zi),qn=ce(Lt,["prefixCls","scrollbarSize","isSticky","getComponent"]),Ci=qn.prefixCls,ar=qn.scrollbarSize,Oi=qn.isSticky,ur=qn.getComponent,sr=ur(["header","table"],"table"),yr=Oi&&!Dn?0:ar,Tr=Rt.useRef(null),jr=Rt.useCallback(function(_r){(0,Qe.mH)(gn,_r),(0,Qe.mH)(Tr,_r)},[]);Rt.useEffect(function(){var _r;function Yr(Pr){var oo=Pr,va=oo.currentTarget,wo=oo.deltaX;wo&&(Mi({currentTarget:va,scrollLeft:va.scrollLeft+wo}),Pr.preventDefault())}return(_r=Tr.current)===null||_r===void 0||_r.addEventListener("wheel",Yr,{passive:!1}),function(){var Pr;(Pr=Tr.current)===null||Pr===void 0||Pr.removeEventListener("wheel",Yr)}},[]);var Jr=Rt.useMemo(function(){return Hn.every(function(_r){return _r.width})},[Hn]),Ee=Hn[Hn.length-1],Fr={fixed:Ee?Ee.fixed:null,scrollbar:!0,onHeaderCell:function(){return{className:"".concat(Ci,"-cell-scrollbar")}}},Mr=(0,Rt.useMemo)(function(){return yr?[].concat((0,Ai.Z)(Nn),[Fr]):Nn},[yr,Nn]),Ui=(0,Rt.useMemo)(function(){return yr?[].concat((0,Ai.Z)(Hn),[Fr]):Hn},[yr,Hn]),vr=(0,Rt.useMemo)(function(){var _r=ti.right,Yr=ti.left;return(0,Xt.Z)((0,Xt.Z)({},ti),{},{left:sn==="rtl"?[].concat((0,Ai.Z)(Yr.map(function(Pr){return Pr+yr})),[0]):Yr,right:sn==="rtl"?_r:[].concat((0,Ai.Z)(_r.map(function(Pr){return Pr+yr})),[0]),isSticky:Oi})},[yr,ti,Oi]),mr=Pt(gi,ci);return Rt.createElement("div",{style:(0,Xt.Z)({overflow:"hidden"},Oi?{top:Gn,bottom:Ln}:{}),ref:jr,className:Re()(Me,(0,ve.Z)({},Zn,!!Zn))},Rt.createElement(sr,{style:{tableLayout:"fixed",visibility:At||mr?null:"hidden"}},(!At||!hi||Jr)&&Rt.createElement(ji,{colWidths:mr?[].concat((0,Ai.Z)(mr),[yr]):[],columCount:ci+1,columns:Ui}),bn((0,Xt.Z)((0,Xt.Z)({},Ke),{},{stickyOffsets:vr,columns:Mr,flattenColumns:Ui}))))}),Si=Rt.memo(ni),on=function(gn){var Me=gn.cells,At=gn.stickyOffsets,Nn=gn.flattenColumns,Hn=gn.rowComponent,gi=gn.cellComponent,ci=gn.onHeaderRow,ti=gn.index,sn=ce(Lt,["prefixCls","direction"]),Dn=sn.prefixCls,Gn=sn.direction,Ln;ci&&(Ln=ci(Me.map(function(Mi){return Mi.column}),ti));var Zn=jt(Me.map(function(Mi){return Mi.column}));return Rt.createElement(Hn,Ln,Me.map(function(Mi,hi){var bn=Mi.column,Ke=hn(Mi.colStart,Mi.colEnd,Nn,At,Gn),qn;return bn&&bn.onHeaderCell&&(qn=Mi.column.onHeaderCell(bn)),Rt.createElement(re,(0,Vt.Z)({},Mi,{scope:bn.title?Mi.colSpan>1?"colgroup":"col":null,ellipsis:bn.ellipsis,align:bn.align,component:gi,prefixCls:Dn,key:Zn[hi]},Ke,{additionalProps:qn,rowType:"header"}))}))},dn=on;function pn(Ae){var gn=[];function Me(gi,ci){var ti=arguments.length>2&&arguments[2]!==void 0?arguments[2]:0;gn[ti]=gn[ti]||[];var sn=ci,Dn=gi.filter(Boolean).map(function(Gn){var Ln={key:Gn.key,className:Gn.className||"",children:Gn.title,column:Gn,colStart:sn},Zn=1,Mi=Gn.children;return Mi&&Mi.length>0&&(Zn=Me(Mi,sn,ti+1).reduce(function(hi,bn){return hi+bn},0),Ln.hasSubColumns=!0),"colSpan"in Gn&&(Zn=Gn.colSpan),"rowSpan"in Gn&&(Ln.rowSpan=Gn.rowSpan),Ln.colSpan=Zn,Ln.colEnd=Ln.colStart+Zn-1,gn[ti].push(Ln),sn+=Zn,Zn});return Dn}Me(Ae,0);for(var At=gn.length,Nn=function(ci){gn[ci].forEach(function(ti){!("rowSpan"in ti)&&!ti.hasSubColumns&&(ti.rowSpan=At-ci)})},Hn=0;Hn<At;Hn+=1)Nn(Hn);return gn}var _n=function(gn){var Me=gn.stickyOffsets,At=gn.columns,Nn=gn.flattenColumns,Hn=gn.onHeaderRow,gi=ce(Lt,["prefixCls","getComponent"]),ci=gi.prefixCls,ti=gi.getComponent,sn=Rt.useMemo(function(){return pn(At)},[At]),Dn=ti(["header","wrapper"],"thead"),Gn=ti(["header","row"],"tr"),Ln=ti(["header","cell"],"th");return Rt.createElement(Dn,{className:"".concat(ci,"-thead")},sn.map(function(Zn,Mi){var hi=Rt.createElement(dn,{key:Mi,flattenColumns:Nn,cells:Zn,stickyOffsets:Me,rowComponent:Gn,cellComponent:Ln,onHeaderRow:Hn,index:Mi});return hi}))},Di=pt(_n),Bi=Dt(97347);function me(Ae,gn,Me){var At=(0,Hi.g)(Ae),Nn=At.expandIcon,Hn=At.expandedRowKeys,gi=At.defaultExpandedRowKeys,ci=At.defaultExpandAllRows,ti=At.expandedRowRender,sn=At.onExpand,Dn=At.onExpandedRowsChange,Gn=At.childrenColumnName,Ln=Nn||Ne,Zn=Gn||"children",Mi=Rt.useMemo(function(){return ti?"row":Ae.expandable&&Ae.internalHooks===Ft.R&&Ae.expandable.__PARENT_RENDER_ICON__||gn.some(function(Oi){return Oi&&(0,_t.Z)(Oi)==="object"&&Oi[Zn]})?"nest":!1},[!!ti,gn]),hi=Rt.useState(function(){return gi||(ci?Ze(gn,Me,Zn):[])}),bn=(0,se.Z)(hi,2),Ke=bn[0],qn=bn[1],Ci=Rt.useMemo(function(){return new Set(Hn||Ke||[])},[Hn,Ke]),ar=Rt.useCallback(function(Oi){var ur=Me(Oi,gn.indexOf(Oi)),sr,yr=Ci.has(ur);yr?(Ci.delete(ur),sr=(0,Ai.Z)(Ci)):sr=[].concat((0,Ai.Z)(Ci),[ur]),qn(sr),sn&&sn(!yr,Oi),Dn&&Dn(sr)},[Me,Ci,gn,sn,Dn]);return[At,Mi,Ci,Ln,Zn,ar]}function we(Ae,gn,Me){var At=Ae.map(function(Nn,Hn){return hn(Hn,Hn,Ae,gn,Me)});return(0,Ye.Z)(function(){return At},[At],function(Nn,Hn){return!(0,Se.Z)(Nn,Hn)})}function ge(Ae){var gn=(0,Rt.useRef)(Ae),Me=(0,Rt.useState)({}),At=(0,se.Z)(Me,2),Nn=At[1],Hn=(0,Rt.useRef)(null),gi=(0,Rt.useRef)([]);function ci(ti){gi.current.push(ti);var sn=Promise.resolve();Hn.current=sn,sn.then(function(){if(Hn.current===sn){var Dn=gi.current,Gn=gn.current;gi.current=[],Dn.forEach(function(Ln){gn.current=Ln(gn.current)}),Hn.current=null,Gn!==gn.current&&Nn({})}})}return(0,Rt.useEffect)(function(){return function(){Hn.current=null}},[]),[gn.current,ci]}function Wn(Ae){var gn=(0,Rt.useRef)(Ae||null),Me=(0,Rt.useRef)();function At(){window.clearTimeout(Me.current)}function Nn(gi){gn.current=gi,At(),Me.current=window.setTimeout(function(){gn.current=null,Me.current=void 0},100)}function Hn(){return gn.current}return(0,Rt.useEffect)(function(){return At},[]),[Nn,Hn]}function ai(){var Ae=Rt.useState(-1),gn=(0,se.Z)(Ae,2),Me=gn[0],At=gn[1],Nn=Rt.useState(-1),Hn=(0,se.Z)(Nn,2),gi=Hn[0],ci=Hn[1],ti=Rt.useCallback(function(sn,Dn){At(sn),ci(Dn)},[]);return[Me,gi,ti]}var si=Dt(47273),ln=(0,si.Z)()?window:null;function jn(Ae,gn){var Me=(0,_t.Z)(Ae)==="object"?Ae:{},At=Me.offsetHeader,Nn=At===void 0?0:At,Hn=Me.offsetSummary,gi=Hn===void 0?0:Hn,ci=Me.offsetScroll,ti=ci===void 0?0:ci,sn=Me.getContainer,Dn=sn===void 0?function(){return ln}:sn,Gn=Dn()||ln,Ln=!!Ae;return Rt.useMemo(function(){return{isSticky:Ln,stickyClassName:Ln?"".concat(gn,"-sticky-holder"):"",offsetHeader:Nn,offsetSummary:gi,offsetScroll:ti,container:Gn}},[Ln,ti,Nn,gi,gn,Gn])}function ii(Ae,gn,Me){var At=(0,Rt.useMemo)(function(){var Nn=gn.length,Hn=function(sn,Dn,Gn){for(var Ln=[],Zn=0,Mi=sn;Mi!==Dn;Mi+=Gn)Ln.push(Zn),gn[Mi].fixed&&(Zn+=Ae[Mi]||0);return Ln},gi=Hn(0,Nn,1),ci=Hn(Nn-1,-1,-1).reverse();return Me==="rtl"?{left:ci,right:gi}:{left:gi,right:ci}},[Ae,gn,Me]);return At}var ki=ii;function Ri(Ae){var gn=Ae.className,Me=Ae.children;return Rt.createElement("div",{className:gn},Me)}var Gt=Ri,fe=Dt(8224),Mn=Dt(16089),zn=Dt(76846);function De(Ae){var gn=(0,zn.bn)(Ae),Me=gn.getBoundingClientRect(),At=document.documentElement;return{left:Me.left+(window.pageXOffset||At.scrollLeft)-(At.clientLeft||document.body.clientLeft||0),top:Me.top+(window.pageYOffset||At.scrollTop)-(At.clientTop||document.body.clientTop||0)}}var kn=function(gn,Me){var At,Nn,Hn=gn.scrollBodyRef,gi=gn.onScroll,ci=gn.offsetScroll,ti=gn.container,sn=gn.direction,Dn=ce(Lt,"prefixCls"),Gn=((At=Hn.current)===null||At===void 0?void 0:At.scrollWidth)||0,Ln=((Nn=Hn.current)===null||Nn===void 0?void 0:Nn.clientWidth)||0,Zn=Gn&&Ln*(Ln/Gn),Mi=Rt.useRef(),hi=ge({scrollLeft:0,isHiddenScrollBar:!0}),bn=(0,se.Z)(hi,2),Ke=bn[0],qn=bn[1],Ci=Rt.useRef({delta:0,x:0}),ar=Rt.useState(!1),Oi=(0,se.Z)(ar,2),ur=Oi[0],sr=Oi[1],yr=Rt.useRef(null);Rt.useEffect(function(){return function(){Mn.Z.cancel(yr.current)}},[]);var Tr=function(){sr(!1)},jr=function(Ui){Ui.persist(),Ci.current.delta=Ui.pageX-Ke.scrollLeft,Ci.current.x=0,sr(!0),Ui.preventDefault()},Jr=function(Ui){var vr,mr=Ui||((vr=window)===null||vr===void 0?void 0:vr.event),_r=mr.buttons;if(!ur||_r===0){ur&&sr(!1);return}var Yr=Ci.current.x+Ui.pageX-Ci.current.x-Ci.current.delta,Pr=sn==="rtl";Yr=Math.max(Pr?Zn-Ln:0,Math.min(Pr?0:Ln-Zn,Yr));var oo=!Pr||Math.abs(Yr)+Math.abs(Zn)<Ln;oo&&(gi({scrollLeft:Yr/Ln*(Gn+2)}),Ci.current.x=Ui.pageX)},Ee=function(){Mn.Z.cancel(yr.current),yr.current=(0,Mn.Z)(function(){if(Hn.current){var Ui=De(Hn.current).top,vr=Ui+Hn.current.offsetHeight,mr=ti===window?document.documentElement.scrollTop+window.innerHeight:De(ti).top+ti.clientHeight;vr-(0,pe.Z)()<=mr||Ui>=mr-ci?qn(function(_r){return(0,Xt.Z)((0,Xt.Z)({},_r),{},{isHiddenScrollBar:!0})}):qn(function(_r){return(0,Xt.Z)((0,Xt.Z)({},_r),{},{isHiddenScrollBar:!1})})}})},Fr=function(Ui){qn(function(vr){return(0,Xt.Z)((0,Xt.Z)({},vr),{},{scrollLeft:Ui/Gn*Ln||0})})};return Rt.useImperativeHandle(Me,function(){return{setScrollLeft:Fr,checkScrollBarVisible:Ee}}),Rt.useEffect(function(){var Mr=(0,fe.Z)(document.body,"mouseup",Tr,!1),Ui=(0,fe.Z)(document.body,"mousemove",Jr,!1);return Ee(),function(){Mr.remove(),Ui.remove()}},[Zn,ur]),Rt.useEffect(function(){if(Hn.current){for(var Mr=[],Ui=(0,zn.bn)(Hn.current);Ui;)Mr.push(Ui),Ui=Ui.parentElement;return Mr.forEach(function(vr){return vr.addEventListener("scroll",Ee,!1)}),window.addEventListener("resize",Ee,!1),window.addEventListener("scroll",Ee,!1),ti.addEventListener("scroll",Ee,!1),function(){Mr.forEach(function(vr){return vr.removeEventListener("scroll",Ee)}),window.removeEventListener("resize",Ee),window.removeEventListener("scroll",Ee),ti.removeEventListener("scroll",Ee)}}},[ti]),Rt.useEffect(function(){Ke.isHiddenScrollBar||qn(function(Mr){var Ui=Hn.current;return Ui?(0,Xt.Z)((0,Xt.Z)({},Mr),{},{scrollLeft:Ui.scrollLeft/Ui.scrollWidth*Ui.clientWidth}):Mr})},[Ke.isHiddenScrollBar]),Gn<=Ln||!Zn||Ke.isHiddenScrollBar?null:Rt.createElement("div",{style:{height:(0,pe.Z)(),width:Ln,bottom:ci},className:"".concat(Dn,"-sticky-scroll")},Rt.createElement("div",{onMouseDown:jr,ref:Mi,className:Re()("".concat(Dn,"-sticky-scroll-bar"),(0,ve.Z)({},"".concat(Dn,"-sticky-scroll-bar-active"),ur)),style:{width:"".concat(Zn,"px"),transform:"translate3d(".concat(Ke.scrollLeft,"px, 0, 0)")}}))},Sn=Rt.forwardRef(kn);function Fn(Ae){return null}var ei=Fn;function On(Ae){return null}var Qn=On,Yn="rc-table",Ni=[],Pi={};function bi(){return"No Data"}function Ge(Ae,gn){var Me=(0,Xt.Z)({rowKey:"key",prefixCls:Yn,emptyText:bi},Ae),At=Me.prefixCls,Nn=Me.className,Hn=Me.rowClassName,gi=Me.style,ci=Me.data,ti=Me.rowKey,sn=Me.scroll,Dn=Me.tableLayout,Gn=Me.direction,Ln=Me.title,Zn=Me.footer,Mi=Me.summary,hi=Me.caption,bn=Me.id,Ke=Me.showHeader,qn=Me.components,Ci=Me.emptyText,ar=Me.onRow,Oi=Me.onHeaderRow,ur=Me.onScroll,sr=Me.internalHooks,yr=Me.transformColumns,Tr=Me.internalRefs,jr=Me.tailor,Jr=Me.getContainerWidth,Ee=Me.sticky,Fr=Me.rowHoverable,Mr=Fr===void 0?!0:Fr,Ui=ci||Ni,vr=!!Ui.length,mr=sr===Ft.R,_r=Rt.useCallback(function(to,po){return(0,en.Z)(qn,to)||po},[qn]),Yr=Rt.useMemo(function(){return typeof ti=="function"?ti:function(to){var po=to&&to[ti];return po}},[ti]),Pr=_r(["body"]),oo=ai(),va=(0,se.Z)(oo,3),wo=va[0],ha=va[1],da=va[2],Ji=me(Me,Ui,Yr),Fo=(0,se.Z)(Ji,6),So=Fo[0],$o=Fo[1],Do=Fo[2],Vo=Fo[3],li=Fo[4],qi=Fo[5],Sr=sn==null?void 0:sn.x,Ir=Rt.useState(0),Gr=(0,se.Z)(Ir,2),lo=Gr[0],er=Gr[1],La=(0,Bi.Z)((0,Xt.Z)((0,Xt.Z)((0,Xt.Z)({},Me),So),{},{expandable:!!So.expandedRowRender,columnTitle:So.columnTitle,expandedKeys:Do,getRowKey:Yr,onTriggerExpand:qi,expandIcon:Vo,expandIconColumnIndex:So.expandIconColumnIndex,direction:Gn,scrollWidth:mr&&jr&&typeof Sr=="number"?Sr:null,clientWidth:lo}),mr?yr:null),Ro=(0,se.Z)(La,4),bo=Ro[0],Hr=Ro[1],Uo=Ro[2],ba=Ro[3],ko=Uo!=null?Uo:Sr,Ha=Rt.useMemo(function(){return{columns:bo,flattenColumns:Hr}},[bo,Hr]),Ba=Rt.useRef(),cs=Rt.useRef(),ea=Rt.useRef(),ru=Rt.useRef();Rt.useImperativeHandle(gn,function(){return{nativeElement:Ba.current,scrollTo:function(po){var ra;if(ea.current instanceof HTMLElement){var Za=po.index,Ia=po.top,wu=po.key;if(We(Ia)){var uu;(uu=ea.current)===null||uu===void 0||uu.scrollTo({top:Ia})}else{var Pu,fl=wu!=null?wu:Yr(Ui[Za]);(Pu=ea.current.querySelector('[data-row-key="'.concat(fl,'"]')))===null||Pu===void 0||Pu.scrollIntoView()}}else(ra=ea.current)!==null&&ra!==void 0&&ra.scrollTo&&ea.current.scrollTo(po)}}});var Hl=Rt.useRef(),As=Rt.useState(!1),Hs=(0,se.Z)(As,2),fs=Hs[0],kl=Hs[1],ou=Rt.useState(!1),Ll=(0,se.Z)(ou,2),Bo=Ll[0],Ve=Ll[1],au=Rt.useState(new Map),bl=(0,se.Z)(au,2),Ml=bl[0],Ma=bl[1],ya=jt(Hr),na=ya.map(function(to){return Ml.get(to)}),Sa=Rt.useMemo(function(){return na},[na.join("_")]),_s=ki(Sa,Hr,Gn),Oa=sn&&Fe(sn.y),yo=sn&&Fe(ko)||!!So.fixed,Cr=yo&&Hr.some(function(to){var po=to.fixed;return po}),$r=Rt.useRef(),Oo=jn(Ee,At),Ii=Oo.isSticky,ca=Oo.offsetHeader,ue=Oo.offsetSummary,xn=Oo.offsetScroll,Ns=Oo.stickyClassName,dl=Oo.container,ta=Rt.useMemo(function(){return Mi==null?void 0:Mi(Ui)},[Mi,Ui]),Ea=(Oa||Ii)&&Rt.isValidElement(ta)&&ta.type===Ut&&ta.props.fixed,ws,Ds,Kl;Oa&&(Ds={overflowY:vr?"scroll":"auto",maxHeight:sn.y}),yo&&(ws={overflowX:"auto"},Oa||(Ds={overflowY:"hidden"}),Kl={width:ko===!0?"auto":ko,minWidth:"100%"});var jo=Rt.useCallback(function(to,po){Ma(function(ra){if(ra.get(to)!==po){var Za=new Map(ra);return Za.set(to,po),Za}return ra})},[]),Or=Wn(null),Ka=(0,se.Z)(Or,2),Ps=Ka[0],zo=Ka[1];function ri(to,po){po&&(typeof po=="function"?po(to):po.scrollLeft!==to&&(po.scrollLeft=to,po.scrollLeft!==to&&setTimeout(function(){po.scrollLeft=to},0)))}var Ar=(0,ye.Z)(function(to){var po=to.currentTarget,ra=to.scrollLeft,Za=Gn==="rtl",Ia=typeof ra=="number"?ra:po.scrollLeft,wu=po||Pi;if(!zo()||zo()===wu){var uu;Ps(wu),ri(Ia,cs.current),ri(Ia,ea.current),ri(Ia,Hl.current),ri(Ia,(uu=$r.current)===null||uu===void 0?void 0:uu.setScrollLeft)}var Pu=po||cs.current;if(Pu){var fl=mr&&jr&&typeof ko=="number"?ko:Pu.scrollWidth,Ul=Pu.clientWidth;if(fl===Ul){kl(!1),Ve(!1);return}Za?(kl(-Ia<fl-Ul),Ve(-Ia>0)):(kl(Ia>0),Ve(Ia<fl-Ul))}}),Zr=(0,ye.Z)(function(to){Ar(to),ur==null||ur(to)}),Qr=function(){if(yo&&ea.current){var po;Ar({currentTarget:(0,zn.bn)(ea.current),scrollLeft:(po=ea.current)===null||po===void 0?void 0:po.scrollLeft})}else kl(!1),Ve(!1)},Co=function(po){var ra,Za=po.width;(ra=$r.current)===null||ra===void 0||ra.checkScrollBarVisible();var Ia=Ba.current?Ba.current.offsetWidth:Za;mr&&Jr&&Ba.current&&(Ia=Jr(Ba.current,Ia)||Ia),Ia!==lo&&(Qr(),er(Ia))},ia=Rt.useRef(!1);Rt.useEffect(function(){ia.current&&Qr()},[yo,ci,bo.length]),Rt.useEffect(function(){ia.current=!0},[]);var Qs=Rt.useState(0),ao=(0,se.Z)(Qs,2),fa=ao[0],no=ao[1],Po=Rt.useState(!0),Eo=(0,se.Z)(Po,2),To=Eo[0],uo=Eo[1];(0,Be.Z)(function(){(!jr||!mr)&&(ea.current instanceof Element?no((0,pe.o)(ea.current).width):no((0,pe.o)(ru.current).width)),uo((0,de.G)("position","sticky"))},[]),Rt.useEffect(function(){mr&&Tr&&(Tr.body.current=ea.current)});var qs=Rt.useCallback(function(to){return Rt.createElement(Rt.Fragment,null,Rt.createElement(Di,to),Ea==="top"&&Rt.createElement(Te,to,ta))},[Ea,ta]),wr=Rt.useCallback(function(to){return Rt.createElement(Te,to,ta)},[ta]),Zl=_r(["table"],"table"),qr=Rt.useMemo(function(){return Dn||(Cr?ko==="max-content"?"auto":"fixed":Oa||Ii||Hr.some(function(to){var po=to.ellipsis;return po})?"fixed":"auto")},[Oa,Cr,Hr,Dn,Ii]),Nr,Wl={colWidths:Sa,columCount:Hr.length,stickyOffsets:_s,onHeaderRow:Oi,fixHeader:Oa,scroll:sn},oh=Rt.useMemo(function(){return vr?null:typeof Ci=="function"?Ci():Ci},[vr,Ci]),kd=Rt.createElement(Gi,{data:Ui,measureColumnWidth:Oa||yo||Ii}),Gh=Rt.createElement(ji,{colWidths:Hr.map(function(to){var po=to.width;return po}),columns:Hr}),Vl=hi!=null?Rt.createElement("caption",{className:"".concat(At,"-caption")},hi):void 0,Hu=(0,be.Z)(Me,{data:!0}),vo=(0,be.Z)(Me,{aria:!0});if(Oa||Ii){var cl;typeof Pr=="function"?(cl=Pr(Ui,{scrollbarSize:fa,ref:ea,onScroll:Ar}),Wl.colWidths=Hr.map(function(to,po){var ra=to.width,Za=po===Hr.length-1?ra-fa:ra;return typeof Za=="number"&&!Number.isNaN(Za)?Za:0})):cl=Rt.createElement("div",{style:(0,Xt.Z)((0,Xt.Z)({},ws),Ds),onScroll:Zr,ref:ea,className:Re()("".concat(At,"-body"))},Rt.createElement(Zl,(0,Vt.Z)({style:(0,Xt.Z)((0,Xt.Z)({},Kl),{},{tableLayout:qr})},vo),Vl,Gh,kd,!Ea&&ta&&Rt.createElement(Te,{stickyOffsets:_s,flattenColumns:Hr},ta)));var Hh=(0,Xt.Z)((0,Xt.Z)((0,Xt.Z)({noData:!Ui.length,maxContentScroll:yo&&ko==="max-content"},Wl),Ha),{},{direction:Gn,stickyClassName:Ns,onScroll:Ar});Nr=Rt.createElement(Rt.Fragment,null,Ke!==!1&&Rt.createElement(Si,(0,Vt.Z)({},Hh,{stickyTopOffset:ca,className:"".concat(At,"-header"),ref:cs}),qs),cl,Ea&&Ea!=="top"&&Rt.createElement(Si,(0,Vt.Z)({},Hh,{stickyBottomOffset:ue,className:"".concat(At,"-summary"),ref:Hl}),wr),Ii&&ea.current&&ea.current instanceof Element&&Rt.createElement(Sn,{ref:$r,offsetScroll:xn,scrollBodyRef:ea,onScroll:Ar,container:dl,direction:Gn}))}else Nr=Rt.createElement("div",{style:(0,Xt.Z)((0,Xt.Z)({},ws),Ds),className:Re()("".concat(At,"-content")),onScroll:Ar,ref:ea},Rt.createElement(Zl,(0,Vt.Z)({style:(0,Xt.Z)((0,Xt.Z)({},Kl),{},{tableLayout:qr})},vo),Vl,Gh,Ke!==!1&&Rt.createElement(Di,(0,Vt.Z)({},Wl,Ha)),kd,ta&&Rt.createElement(Te,{stickyOffsets:_s,flattenColumns:Hr},ta)));var su=Rt.createElement("div",(0,Vt.Z)({className:Re()(At,Nn,(0,ve.Z)((0,ve.Z)((0,ve.Z)((0,ve.Z)((0,ve.Z)((0,ve.Z)((0,ve.Z)((0,ve.Z)((0,ve.Z)((0,ve.Z)({},"".concat(At,"-rtl"),Gn==="rtl"),"".concat(At,"-ping-left"),fs),"".concat(At,"-ping-right"),Bo),"".concat(At,"-layout-fixed"),Dn==="fixed"),"".concat(At,"-fixed-header"),Oa),"".concat(At,"-fixed-column"),Cr),"".concat(At,"-fixed-column-gapped"),Cr&&ba),"".concat(At,"-scroll-horizontal"),yo),"".concat(At,"-has-fix-left"),Hr[0]&&Hr[0].fixed),"".concat(At,"-has-fix-right"),Hr[Hr.length-1]&&Hr[Hr.length-1].fixed==="right")),style:gi,id:bn,ref:Ba},Hu),Ln&&Rt.createElement(Gt,{className:"".concat(At,"-title")},Ln(Ui)),Rt.createElement("div",{ref:ru,className:"".concat(At,"-container")},Nr),Zn&&Rt.createElement(Gt,{className:"".concat(At,"-footer")},Zn(Ui)));yo&&(su=Rt.createElement(ee.Z,{onResize:Co},su));var Ld=we(Hr,_s,Gn),lu=Rt.useMemo(function(){return{scrollX:ko,prefixCls:At,getComponent:_r,scrollbarSize:fa,direction:Gn,fixedInfoList:Ld,isSticky:Ii,supportSticky:To,componentWidth:lo,fixHeader:Oa,fixColumn:Cr,horizonScroll:yo,tableLayout:qr,rowClassName:Hn,expandedRowClassName:So.expandedRowClassName,expandIcon:Vo,expandableType:$o,expandRowByClick:So.expandRowByClick,expandedRowRender:So.expandedRowRender,onTriggerExpand:qi,expandIconColumnIndex:So.expandIconColumnIndex,indentSize:So.indentSize,allColumnsFixedLeft:Hr.every(function(to){return to.fixed==="left"}),emptyNode:oh,columns:bo,flattenColumns:Hr,onColumnResize:jo,hoverStartRow:wo,hoverEndRow:ha,onHover:da,rowExpandable:So.rowExpandable,onRow:ar,getRowKey:Yr,expandedKeys:Do,childrenColumnName:li,rowHoverable:Mr}},[ko,At,_r,fa,Gn,Ld,Ii,To,lo,Oa,Cr,yo,qr,Hn,So.expandedRowClassName,Vo,$o,So.expandRowByClick,So.expandedRowRender,qi,So.expandIconColumnIndex,So.indentSize,oh,bo,Hr,jo,wo,ha,da,So.rowExpandable,ar,Yr,Do,li,Mr]);return Rt.createElement(Lt.Provider,{value:lu},su)}var Xi=Rt.forwardRef(Ge);function dr(Ae){return lt(Xi,Ae)}var br=dr();br.EXPAND_COLUMN=Ft.w,br.INTERNAL_HOOKS=Ft.R,br.Column=ei,br.ColumnGroup=Qn,br.Summary=_e;var Ue=br,Vn=Dt(65283),vi=je(null),pi=je(null);function Fi(Ae,gn,Me){var At=gn||1;return Me[Ae+At]-(Me[Ae]||0)}function Wi(Ae){var gn=Ae.rowInfo,Me=Ae.column,At=Ae.colIndex,Nn=Ae.indent,Hn=Ae.index,gi=Ae.component,ci=Ae.renderIndex,ti=Ae.record,sn=Ae.style,Dn=Ae.className,Gn=Ae.inverse,Ln=Ae.getHeight,Zn=Me.render,Mi=Me.dataIndex,hi=Me.className,bn=Me.width,Ke=ce(pi,["columnsOffset"]),qn=Ke.columnsOffset,Ci=le(gn,Me,At,Nn,Hn),ar=Ci.key,Oi=Ci.fixedInfo,ur=Ci.appendCellNode,sr=Ci.additionalCellProps,yr=sr.style,Tr=sr.colSpan,jr=Tr===void 0?1:Tr,Jr=sr.rowSpan,Ee=Jr===void 0?1:Jr,Fr=At-1,Mr=Fi(Fr,jr,qn),Ui=jr>1?bn-Mr:0,vr=(0,Xt.Z)((0,Xt.Z)((0,Xt.Z)({},yr),sn),{},{flex:"0 0 ".concat(Mr,"px"),width:"".concat(Mr,"px"),marginRight:Ui,pointerEvents:"auto"}),mr=Rt.useMemo(function(){return Gn?Ee<=1:jr===0||Ee===0||Ee>1},[Ee,jr,Gn]);mr?vr.visibility="hidden":Gn&&(vr.height=Ln==null?void 0:Ln(Ee));var _r=mr?function(){return null}:Zn,Yr={};return(Ee===0||jr===0)&&(Yr.rowSpan=1,Yr.colSpan=1),Rt.createElement(re,(0,Vt.Z)({className:Re()(hi,Dn),ellipsis:Me.ellipsis,align:Me.align,scope:Me.rowScope,component:gi,prefixCls:gn.prefixCls,key:ar,record:ti,index:Hn,renderIndex:ci,dataIndex:Mi,render:_r,shouldCellUpdate:Me.shouldCellUpdate},Oi,{appendNode:ur,additionalProps:(0,Xt.Z)((0,Xt.Z)({},sr),{},{style:vr},Yr)}))}var Vi=Wi,pr=["data","index","className","rowKey","style","extra","getHeight"],or=Rt.forwardRef(function(Ae,gn){var Me=Ae.data,At=Ae.index,Nn=Ae.className,Hn=Ae.rowKey,gi=Ae.style,ci=Ae.extra,ti=Ae.getHeight,sn=(0,St.Z)(Ae,pr),Dn=Me.record,Gn=Me.indent,Ln=Me.index,Zn=ce(Lt,["prefixCls","flattenColumns","fixColumn","componentWidth","scrollX"]),Mi=Zn.scrollX,hi=Zn.flattenColumns,bn=Zn.prefixCls,Ke=Zn.fixColumn,qn=Zn.componentWidth,Ci=ce(vi,["getComponent"]),ar=Ci.getComponent,Oi=He(Dn,Hn,At,Gn),ur=ar(["body","row"],"div"),sr=ar(["body","cell"],"div"),yr=Oi.rowSupportExpand,Tr=Oi.expanded,jr=Oi.rowProps,Jr=Oi.expandedRowRender,Ee=Oi.expandedRowClassName,Fr;if(yr&&Tr){var Mr=Jr(Dn,At,Gn+1,Tr),Ui=Bn(Ee,Dn,At,Gn),vr={};Ke&&(vr={style:(0,ve.Z)({},"--virtual-width","".concat(qn,"px"))});var mr="".concat(bn,"-expanded-row-cell");Fr=Rt.createElement(ur,{className:Re()("".concat(bn,"-expanded-row"),"".concat(bn,"-expanded-row-level-").concat(Gn+1),Ui)},Rt.createElement(re,{component:sr,prefixCls:bn,className:Re()(mr,(0,ve.Z)({},"".concat(mr,"-fixed"),Ke)),additionalProps:vr},Mr))}var _r=(0,Xt.Z)((0,Xt.Z)({},gi),{},{width:Mi});ci&&(_r.position="absolute",_r.pointerEvents="none");var Yr=Rt.createElement(ur,(0,Vt.Z)({},jr,sn,{"data-row-key":Hn,ref:yr?null:gn,className:Re()(Nn,"".concat(bn,"-row"),jr==null?void 0:jr.className,(0,ve.Z)({},"".concat(bn,"-row-extra"),ci)),style:(0,Xt.Z)((0,Xt.Z)({},_r),jr==null?void 0:jr.style)}),hi.map(function(Pr,oo){return Rt.createElement(Vi,{key:oo,component:sr,rowInfo:Oi,column:Pr,colIndex:oo,indent:Gn,index:At,renderIndex:Ln,record:Dn,inverse:ci,getHeight:ti})}));return yr?Rt.createElement("div",{ref:gn},Yr,Fr):Yr}),hr=pt(or),Xe=hr,nr=Rt.forwardRef(function(Ae,gn){var Me=Ae.data,At=Ae.onScroll,Nn=ce(Lt,["flattenColumns","onColumnResize","getRowKey","prefixCls","expandedKeys","childrenColumnName","scrollX","direction"]),Hn=Nn.flattenColumns,gi=Nn.onColumnResize,ci=Nn.getRowKey,ti=Nn.expandedKeys,sn=Nn.prefixCls,Dn=Nn.childrenColumnName,Gn=Nn.scrollX,Ln=Nn.direction,Zn=ce(vi),Mi=Zn.sticky,hi=Zn.scrollY,bn=Zn.listItemHeight,Ke=Zn.getComponent,qn=Zn.onScroll,Ci=Rt.useRef(),ar=rn(Me,Dn,ti,ci),Oi=Rt.useMemo(function(){var Fr=0;return Hn.map(function(Mr){var Ui=Mr.width,vr=Mr.key;return Fr+=Ui,[vr,Ui,Fr]})},[Hn]),ur=Rt.useMemo(function(){return Oi.map(function(Fr){return Fr[2]})},[Oi]);Rt.useEffect(function(){Oi.forEach(function(Fr){var Mr=(0,se.Z)(Fr,2),Ui=Mr[0],vr=Mr[1];gi(Ui,vr)})},[Oi]),Rt.useImperativeHandle(gn,function(){var Fr,Mr={scrollTo:function(vr){var mr;(mr=Ci.current)===null||mr===void 0||mr.scrollTo(vr)},nativeElement:(Fr=Ci.current)===null||Fr===void 0?void 0:Fr.nativeElement};return Object.defineProperty(Mr,"scrollLeft",{get:function(){var vr;return((vr=Ci.current)===null||vr===void 0?void 0:vr.getScrollInfo().x)||0},set:function(vr){var mr;(mr=Ci.current)===null||mr===void 0||mr.scrollTo({left:vr})}}),Mr});var sr=function(Mr,Ui){var vr,mr=(vr=ar[Ui])===null||vr===void 0?void 0:vr.record,_r=Mr.onCell;if(_r){var Yr,Pr=_r(mr,Ui);return(Yr=Pr==null?void 0:Pr.rowSpan)!==null&&Yr!==void 0?Yr:1}return 1},yr=function(Mr){var Ui=Mr.start,vr=Mr.end,mr=Mr.getSize,_r=Mr.offsetY;if(vr<0)return null;for(var Yr=Hn.filter(function(Vo){return sr(Vo,Ui)===0}),Pr=Ui,oo=function(li){if(Yr=Yr.filter(function(qi){return sr(qi,li)===0}),!Yr.length)return Pr=li,1},va=Ui;va>=0&&!oo(va);va-=1);for(var wo=Hn.filter(function(Vo){return sr(Vo,vr)!==1}),ha=vr,da=function(li){if(wo=wo.filter(function(qi){return sr(qi,li)!==1}),!wo.length)return ha=Math.max(li-1,vr),1},Ji=vr;Ji<ar.length&&!da(Ji);Ji+=1);for(var Fo=[],So=function(li){var qi=ar[li];if(!qi)return 1;Hn.some(function(Sr){return sr(Sr,li)>1})&&Fo.push(li)},$o=Pr;$o<=ha;$o+=1)So($o);var Do=Fo.map(function(Vo){var li=ar[Vo],qi=ci(li.record,Vo),Sr=function(lo){var er=Vo+lo-1,La=ci(ar[er].record,er),Ro=mr(qi,La);return Ro.bottom-Ro.top},Ir=mr(qi);return Rt.createElement(Xe,{key:Vo,data:li,rowKey:qi,index:Vo,style:{top:-_r+Ir.top},extra:!0,getHeight:Sr})});return Do},Tr=Rt.useMemo(function(){return{columnsOffset:ur}},[ur]),jr="".concat(sn,"-tbody"),Jr=Ke(["body","wrapper"]),Ee={};return Mi&&(Ee.position="sticky",Ee.bottom=0,(0,_t.Z)(Mi)==="object"&&Mi.offsetScroll&&(Ee.bottom=Mi.offsetScroll)),Rt.createElement(pi.Provider,{value:Tr},Rt.createElement(Vn.Z,{fullHeight:!1,ref:Ci,prefixCls:"".concat(jr,"-virtual"),styles:{horizontalScrollBar:Ee},className:jr,height:hi,itemHeight:bn||24,data:ar,itemKey:function(Mr){return ci(Mr.record)},component:Jr,scrollWidth:Gn,direction:Ln,onVirtualScroll:function(Mr){var Ui,vr=Mr.x;At({currentTarget:(Ui=Ci.current)===null||Ui===void 0?void 0:Ui.nativeElement,scrollLeft:vr})},onScroll:qn,extraRender:yr},function(Fr,Mr,Ui){var vr=ci(Fr.record,Mr);return Rt.createElement(Xe,{data:Fr,rowKey:vr,index:Mr,style:Ui.style})}))}),qe=pt(nr),xi=qe,ir=function(gn,Me){var At=Me.ref,Nn=Me.onScroll;return Rt.createElement(xi,{ref:At,data:gn,onScroll:Nn})};function fr(Ae,gn){var Me=Ae.data,At=Ae.columns,Nn=Ae.scroll,Hn=Ae.sticky,gi=Ae.prefixCls,ci=gi===void 0?Yn:gi,ti=Ae.className,sn=Ae.listItemHeight,Dn=Ae.components,Gn=Ae.onScroll,Ln=Nn||{},Zn=Ln.x,Mi=Ln.y;typeof Zn!="number"&&(Zn=1),typeof Mi!="number"&&(Mi=500);var hi=(0,Jn.zX)(function(qn,Ci){return(0,en.Z)(Dn,qn)||Ci}),bn=(0,Jn.zX)(Gn),Ke=Rt.useMemo(function(){return{sticky:Hn,scrollY:Mi,listItemHeight:sn,getComponent:hi,onScroll:bn}},[Hn,Mi,sn,hi,bn]);return Rt.createElement(vi.Provider,{value:Ke},Rt.createElement(Ue,(0,Vt.Z)({},Ae,{className:Re()(ti,"".concat(ci,"-virtual")),scroll:(0,Xt.Z)((0,Xt.Z)({},Nn),{},{x:Zn}),components:(0,Xt.Z)((0,Xt.Z)({},Dn),{},{body:Me!=null&&Me.length?ir:void 0}),columns:At,internalHooks:Ft.R,tailor:!0,ref:gn})))}var Br=Rt.forwardRef(fr);function kr(Ae){return lt(Br,Ae)}var rr=kr(),Kr=null},54451:function(Tn,oi,Dt){"use strict";Dt.d(oi,{g:function(){return Rt},v:function(){return Se}});var Ft=Dt(89490),se=Dt(39224),ye=Dt(48736),Be=["expandable"],Se="RC_TABLE_INTERNAL_COL_DEFINE";function Rt(ie){var je=ie.expandable,ce=(0,se.Z)(ie,Be),Vt;return"expandable"in ie?Vt=(0,Ft.Z)((0,Ft.Z)({},ce),je):Vt=ce,Vt.showExpandColumn===!1&&(Vt.expandIconColumnIndex=-1),Vt}},22711:function(Tn,oi,Dt){"use strict";Dt.r(oi),Dt.d(oi,{ResizableTextArea:function(){return oe},default:function(){return Rn}});var Ft=Dt(71409),se=Dt(87075),ye=Dt(89490),Be=Dt(62730),Se=Dt(11036),Rt=Dt(39224),ie=Dt(92310),je=Dt.n(ie),ce=Dt(36901),Vt=Dt(66003),Qe=Dt(30292),Qt=Dt(18929),Je=Dt(59301),Nt=Dt(28788),nt=Dt(29301),et=Dt(34280),ct=Dt(16089),lt=`
|
|
min-height:0 !important;
|
|
max-height:none !important;
|
|
height:0 !important;
|
|
visibility:hidden !important;
|
|
overflow:hidden !important;
|
|
position:absolute !important;
|
|
z-index:-1000 !important;
|
|
top:0 !important;
|
|
right:0 !important;
|
|
pointer-events: none !important;
|
|
`,pt=["letter-spacing","line-height","padding-top","padding-bottom","font-family","font-weight","font-size","font-variant","text-rendering","text-transform","width","text-indent","padding-left","padding-right","border-width","box-sizing","word-break","white-space"],vt={},xt;function Lt(wn){var un=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,vn=wn.getAttribute("id")||wn.getAttribute("data-reactid")||wn.getAttribute("name");if(un&&vt[vn])return vt[vn];var ne=window.getComputedStyle(wn),jt=ne.getPropertyValue("box-sizing")||ne.getPropertyValue("-moz-box-sizing")||ne.getPropertyValue("-webkit-box-sizing"),Fe=parseFloat(ne.getPropertyValue("padding-bottom"))+parseFloat(ne.getPropertyValue("padding-top")),We=parseFloat(ne.getPropertyValue("border-bottom-width"))+parseFloat(ne.getPropertyValue("border-top-width")),Pn=pt.map(function(tn){return"".concat(tn,":").concat(ne.getPropertyValue(tn))}).join(";"),ke={sizingStyle:Pn,paddingSize:Fe,borderSize:We,boxSizing:jt};return un&&vn&&(vt[vn]=ke),ke}function Ot(wn){var un=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,vn=arguments.length>2&&arguments[2]!==void 0?arguments[2]:null,ne=arguments.length>3&&arguments[3]!==void 0?arguments[3]:null;xt||(xt=document.createElement("textarea"),xt.setAttribute("tab-index","-1"),xt.setAttribute("aria-hidden","true"),xt.setAttribute("name","hiddenTextarea"),document.body.appendChild(xt)),wn.getAttribute("wrap")?xt.setAttribute("wrap",wn.getAttribute("wrap")):xt.removeAttribute("wrap");var jt=Lt(wn,un),Fe=jt.paddingSize,We=jt.borderSize,Pn=jt.boxSizing,ke=jt.sizingStyle;xt.setAttribute("style","".concat(ke,";").concat(lt)),xt.value=wn.value||wn.placeholder||"";var tn=void 0,fn=void 0,Jn,Pe=xt.scrollHeight;if(Pn==="border-box"?Pe+=We:Pn==="content-box"&&(Pe-=Fe),vn!==null||ne!==null){xt.value=" ";var an=xt.scrollHeight-Fe;vn!==null&&(tn=an*vn,Pn==="border-box"&&(tn=tn+Fe+We),Pe=Math.max(tn,Pe)),ne!==null&&(fn=an*ne,Pn==="border-box"&&(fn=fn+Fe+We),Jn=Pe>fn?"":"hidden",Pe=Math.min(fn,Pe))}var re={height:Pe,overflowY:Jn,resize:"none"};return tn&&(re.minHeight=tn),fn&&(re.maxHeight=fn),re}var Ht=["prefixCls","defaultValue","value","autoSize","onResize","className","style","disabled","onChange","onInternalAutoSize"],te=0,_t=1,Xt=2,ve=Je.forwardRef(function(wn,un){var vn=wn,ne=vn.prefixCls,jt=vn.defaultValue,Fe=vn.value,We=vn.autoSize,Pn=vn.onResize,ke=vn.className,tn=vn.style,fn=vn.disabled,Jn=vn.onChange,Pe=vn.onInternalAutoSize,an=(0,Rt.Z)(vn,Ht),re=(0,Qt.Z)(jt,{value:Fe,postState:function(Kn){return Kn!=null?Kn:""}}),hn=(0,Se.Z)(re,2),di=hn[0],Tt=hn[1],Et=function(Kn){Tt(Kn.target.value),Jn==null||Jn(Kn)},St=Je.useRef();Je.useImperativeHandle(un,function(){return{textArea:St.current}});var Mt=Je.useMemo(function(){return We&&(0,Nt.Z)(We)==="object"?[We.minRows,We.maxRows]:[]},[We]),zt=(0,Se.Z)(Mt,2),kt=zt[0],Ut=zt[1],Oe=!!We,Te=function(){try{if(document.activeElement===St.current){var Kn=St.current,yi=Kn.selectionStart,Xn=Kn.selectionEnd,Ei=Kn.scrollTop;St.current.setSelectionRange(yi,Xn),St.current.scrollTop=Ei}}catch(Yi){}},_e=Je.useState(Xt),ee=(0,Se.Z)(_e,2),de=ee[0],pe=ee[1],be=Je.useState(),ze=(0,Se.Z)(be,2),rn=ze[0],He=ze[1],yn=function(){pe(te)};(0,et.Z)(function(){Oe&&yn()},[Fe,kt,Ut,Oe]),(0,et.Z)(function(){if(de===te)pe(_t);else if(de===_t){var An=Ot(St.current,!1,kt,Ut);pe(Xt),He(An)}else Te()},[de]);var xe=Je.useRef(),Ne=function(){ct.Z.cancel(xe.current)},Ze=function(Kn){de===Xt&&(Pn==null||Pn(Kn),We&&(Ne(),xe.current=(0,ct.Z)(function(){yn()})))};Je.useEffect(function(){return Ne},[]);var Bn=Oe?rn:null,le=(0,ye.Z)((0,ye.Z)({},tn),Bn);return(de===te||de===_t)&&(le.overflowY="hidden",le.overflowX="hidden"),Je.createElement(nt.Z,{onResize:Ze,disabled:!(We||Pn)},Je.createElement("textarea",(0,Ft.Z)({},an,{ref:St,style:le,className:je()(ne,ke,(0,se.Z)({},"".concat(ne,"-disabled"),fn)),disabled:fn,value:di,onChange:Et})))}),oe=ve,Re=["defaultValue","value","onFocus","onBlur","onChange","allowClear","maxLength","onCompositionStart","onCompositionEnd","suffix","prefixCls","showCount","count","className","style","disabled","hidden","classNames","styles","onResize","onClear","onPressEnter","readOnly","autoSize","onKeyDown"],Ye=Je.forwardRef(function(wn,un){var vn,ne=wn.defaultValue,jt=wn.value,Fe=wn.onFocus,We=wn.onBlur,Pn=wn.onChange,ke=wn.allowClear,tn=wn.maxLength,fn=wn.onCompositionStart,Jn=wn.onCompositionEnd,Pe=wn.suffix,an=wn.prefixCls,re=an===void 0?"rc-textarea":an,hn=wn.showCount,di=wn.count,Tt=wn.className,Et=wn.style,St=wn.disabled,Mt=wn.hidden,zt=wn.classNames,kt=wn.styles,Ut=wn.onResize,Oe=wn.onClear,Te=wn.onPressEnter,_e=wn.readOnly,ee=wn.autoSize,de=wn.onKeyDown,pe=(0,Rt.Z)(wn,Re),be=(0,Qt.Z)(ne,{value:jt,defaultValue:ne}),ze=(0,Se.Z)(be,2),rn=ze[0],He=ze[1],yn=rn==null?"":String(rn),xe=Je.useState(!1),Ne=(0,Se.Z)(xe,2),Ze=Ne[0],Bn=Ne[1],le=Je.useRef(!1),An=Je.useState(null),Kn=(0,Se.Z)(An,2),yi=Kn[0],Xn=Kn[1],Ei=(0,Je.useRef)(null),Yi=(0,Je.useRef)(null),Gi=function(){var ii;return(ii=Yi.current)===null||ii===void 0?void 0:ii.textArea},Hi=function(){Gi().focus()};(0,Je.useImperativeHandle)(un,function(){var jn;return{resizableTextArea:Yi.current,focus:Hi,blur:function(){Gi().blur()},nativeElement:((jn=Ei.current)===null||jn===void 0?void 0:jn.nativeElement)||Gi()}}),(0,Je.useEffect)(function(){Bn(function(jn){return!St&&jn})},[St]);var Ki=Je.useState(null),Qi=(0,Se.Z)(Ki,2),ji=Qi[0],Ai=Qi[1];Je.useEffect(function(){if(ji){var jn;(jn=Gi()).setSelectionRange.apply(jn,(0,Be.Z)(ji))}},[ji]);var Zi=(0,Vt.Z)(di,hn),Pt=(vn=Zi.max)!==null&&vn!==void 0?vn:tn,ni=Number(Pt)>0,Si=Zi.strategy(yn),on=!!Pt&&Si>Pt,dn=function(ii,ki){var Ri=ki;!le.current&&Zi.exceedFormatter&&Zi.max&&Zi.strategy(ki)>Zi.max&&(Ri=Zi.exceedFormatter(ki,{max:Zi.max}),ki!==Ri&&Ai([Gi().selectionStart||0,Gi().selectionEnd||0])),He(Ri),(0,Qe.rJ)(ii.currentTarget,ii,Pn,Ri)},pn=function(ii){le.current=!0,fn==null||fn(ii)},_n=function(ii){le.current=!1,dn(ii,ii.currentTarget.value),Jn==null||Jn(ii)},Di=function(ii){dn(ii,ii.target.value)},Bi=function(ii){ii.key==="Enter"&&Te&&Te(ii),de==null||de(ii)},me=function(ii){Bn(!0),Fe==null||Fe(ii)},we=function(ii){Bn(!1),We==null||We(ii)},ge=function(ii){He(""),Hi(),(0,Qe.rJ)(Gi(),ii,Pn)},Wn=Pe,ai;Zi.show&&(Zi.showFormatter?ai=Zi.showFormatter({value:yn,count:Si,maxLength:Pt}):ai="".concat(Si).concat(ni?" / ".concat(Pt):""),Wn=Je.createElement(Je.Fragment,null,Wn,Je.createElement("span",{className:je()("".concat(re,"-data-count"),zt==null?void 0:zt.count),style:kt==null?void 0:kt.count},ai)));var si=function(ii){var ki;Ut==null||Ut(ii),(ki=Gi())!==null&&ki!==void 0&&ki.style.height&&Xn(!0)},ln=!ee&&!hn&&!ke;return Je.createElement(ce.BaseInput,{ref:Ei,value:yn,allowClear:ke,handleReset:ge,suffix:Wn,prefixCls:re,classNames:(0,ye.Z)((0,ye.Z)({},zt),{},{affixWrapper:je()(zt==null?void 0:zt.affixWrapper,(0,se.Z)((0,se.Z)({},"".concat(re,"-show-count"),hn),"".concat(re,"-textarea-allow-clear"),ke))}),disabled:St,focused:Ze,className:je()(Tt,on&&"".concat(re,"-out-of-range")),style:(0,ye.Z)((0,ye.Z)({},Et),yi&&!ln?{height:"auto"}:{}),dataAttrs:{affixWrapper:{"data-count":typeof ai=="string"?ai:void 0}},hidden:Mt,readOnly:_e,onClear:Oe},Je.createElement(oe,(0,Ft.Z)({},pe,{autoSize:ee,maxLength:tn,onKeyDown:Bi,onChange:Di,onFocus:me,onBlur:we,onCompositionStart:pn,onCompositionEnd:_n,className:je()(zt==null?void 0:zt.textarea),style:(0,ye.Z)((0,ye.Z)({},kt==null?void 0:kt.textarea),{},{resize:Et==null?void 0:Et.resize}),disabled:St,prefixCls:re,onResize:si,ref:Yi,readOnly:_e})))}),en=Ye,Rn=en},9940:function(Tn,oi,Dt){"use strict";Dt.d(oi,{Qw:function(){return hn},FJ:function(){return Tt},hT:function(){return di},OF:function(){return xt},ZP:function(){return _e}});var Ft=Dt(71409),se=Dt(62730),ye=Dt(89490),Be=Dt(11036),Se=Dt(39224),Rt=Dt(28788),ie=Dt(37463),je=Dt(6551),ce=Dt(34643),Vt=Dt(18929),Qe=Dt(48736),Qt=Dt(59301),Je=function(ee){var de=Qt.useRef({valueLabels:new Map});return Qt.useMemo(function(){var pe=de.current.valueLabels,be=new Map,ze=ee.map(function(rn){var He=rn.value,yn=rn.label,xe=yn!=null?yn:pe.get(He);return be.set(He,xe),(0,ye.Z)((0,ye.Z)({},rn),{},{label:xe})});return de.current.valueLabels=be,[ze]},[ee])},Nt=function(de,pe,be,ze){return Qt.useMemo(function(){var rn=function(An){return An.map(function(Kn){var yi=Kn.value;return yi})},He=rn(de),yn=rn(pe),xe=He.filter(function(le){return!ze[le]}),Ne=He,Ze=yn;if(be){var Bn=(0,ce.S)(He,!0,ze);Ne=Bn.checkedKeys,Ze=Bn.halfCheckedKeys}return[Array.from(new Set([].concat((0,se.Z)(xe),(0,se.Z)(Ne)))),Ze]},[de,pe,be,ze])},nt=Nt,et=Dt(34061),ct=function(ee,de){return Qt.useMemo(function(){var pe=(0,et.I8)(ee,{fieldNames:de,initWrapper:function(ze){return(0,ye.Z)((0,ye.Z)({},ze),{},{valueEntities:new Map})},processEntity:function(ze,rn){var He=ze.node[de.value];if(0)var yn;rn.valueEntities.set(He,ze)}});return pe},[ee,de])},lt=Dt(87075),pt=Dt(11592),vt=function(){return null},xt=vt,Lt=["children","value"];function Ot(ee){return(0,pt.Z)(ee).map(function(de){if(!Qt.isValidElement(de)||!de.type)return null;var pe=de,be=pe.key,ze=pe.props,rn=ze.children,He=ze.value,yn=(0,Se.Z)(ze,Lt),xe=(0,ye.Z)({key:be,value:He},yn),Ne=Ot(rn);return Ne.length&&(xe.children=Ne),xe}).filter(function(de){return de})}function Ht(ee){if(!ee)return ee;var de=(0,ye.Z)({},ee);return"props"in de||Object.defineProperty(de,"props",{get:function(){return(0,Qe.ZP)(!1,"New `rc-tree-select` not support return node instance as argument anymore. Please consider to remove `props` access."),de}}),de}function te(ee,de,pe,be,ze,rn){var He=null,yn=null;function xe(){function Ne(Ze){var Bn=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"0",le=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1;return Ze.map(function(An,Kn){var yi="".concat(Bn,"-").concat(Kn),Xn=An[rn.value],Ei=pe.includes(Xn),Yi=Ne(An[rn.children]||[],yi,Ei),Gi=Qt.createElement(xt,An,Yi.map(function(Ki){return Ki.node}));if(de===Xn&&(He=Gi),Ei){var Hi={pos:yi,node:Gi,children:Yi};return le||yn.push(Hi),Hi}return null}).filter(function(An){return An})}yn||(yn=[],Ne(be),yn.sort(function(Ze,Bn){var le=Ze.node.props.value,An=Bn.node.props.value,Kn=pe.indexOf(le),yi=pe.indexOf(An);return Kn-yi}))}Object.defineProperty(ee,"triggerNode",{get:function(){return(0,Qe.ZP)(!1,"`triggerNode` is deprecated. Please consider decoupling data with node."),xe(),He}}),Object.defineProperty(ee,"allCheckedNodes",{get:function(){return(0,Qe.ZP)(!1,"`allCheckedNodes` is deprecated. Please consider decoupling data with node."),xe(),ze?yn:yn.map(function(Ze){var Bn=Ze.node;return Bn})}})}var _t=function(de,pe,be){var ze=be.fieldNames,rn=be.treeNodeFilterProp,He=be.filterTreeNode,yn=ze.children;return Qt.useMemo(function(){if(!pe||He===!1)return de;var xe=typeof He=="function"?He:function(Ze,Bn){return String(Bn[rn]).toUpperCase().includes(pe.toUpperCase())},Ne=function Ze(Bn){var le=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;return Bn.reduce(function(An,Kn){var yi=Kn[yn],Xn=le||xe(pe,Ht(Kn)),Ei=Ze(yi||[],Xn);return(Xn||Ei.length)&&An.push((0,ye.Z)((0,ye.Z)({},Kn),{},(0,lt.Z)({isLeaf:void 0},yn,Ei))),An},[])};return Ne(de)},[de,pe,yn,rn,He])},Xt=_t;function ve(ee){var de=Qt.useRef();de.current=ee;var pe=Qt.useCallback(function(){return de.current.apply(de,arguments)},[]);return pe}function oe(ee,de){var pe=de.id,be=de.pId,ze=de.rootPId,rn=new Map,He=[];return ee.forEach(function(yn){var xe=yn[pe],Ne=(0,ye.Z)((0,ye.Z)({},yn),{},{key:yn.key||xe});rn.set(xe,Ne)}),rn.forEach(function(yn){var xe=yn[be],Ne=rn.get(xe);Ne?(Ne.children=Ne.children||[],Ne.children.push(yn)):(xe===ze||ze===null)&&He.push(yn)}),He}function Re(ee,de,pe){return Qt.useMemo(function(){if(ee){if(pe){var be=(0,ye.Z)({id:"id",pId:"pId",rootPId:null},(0,Rt.Z)(pe)==="object"?pe:{});return oe(ee,be)}return ee}return Ot(de)},[de,pe,ee])}var Ye=Qt.createContext(null),en=Ye,Rn=Dt(26356),wn=Dt(62379),un=Dt(10228),vn=Dt(80547),ne=Qt.createContext(null),jt=ne,Fe=function(de){return Array.isArray(de)?de:de!==void 0?[de]:[]},We=function(de){var pe=de||{},be=pe.label,ze=pe.value,rn=pe.children;return{_title:be?[be]:["title","label"],value:ze||"value",key:ze||"value",children:rn||"children"}},Pn=function(de){return!de||de.disabled||de.disableCheckbox||de.checkable===!1},ke=function(de,pe){var be=[],ze=function rn(He){He.forEach(function(yn){var xe=yn[pe.children];xe&&(be.push(yn[pe.value]),rn(xe))})};return ze(de),be},tn=function(de){return de==null},fn=Dt(70425),Jn={width:0,height:0,display:"flex",overflow:"hidden",opacity:0,border:0,padding:0,margin:0},Pe=function(de,pe){var be=(0,ie.lk)(),ze=be.prefixCls,rn=be.multiple,He=be.searchValue,yn=be.toggleOpen,xe=be.open,Ne=be.notFoundContent,Ze=Qt.useContext(jt),Bn=Ze.virtual,le=Ze.listHeight,An=Ze.listItemHeight,Kn=Ze.listItemScrollOffset,yi=Ze.treeData,Xn=Ze.fieldNames,Ei=Ze.onSelect,Yi=Ze.dropdownMatchSelectWidth,Gi=Ze.treeExpandAction,Hi=Ze.treeTitleRender,Ki=Ze.onPopupScroll,Qi=Ze.leftMaxCount,ji=Ze.leafCountOnly,Ai=Ze.valueEntities,Zi=Qt.useContext(en),Pt=Zi.checkable,ni=Zi.checkedKeys,Si=Zi.halfCheckedKeys,on=Zi.treeExpandedKeys,dn=Zi.treeDefaultExpandAll,pn=Zi.treeDefaultExpandedKeys,_n=Zi.onTreeExpand,Di=Zi.treeIcon,Bi=Zi.showTreeIcon,me=Zi.switcherIcon,we=Zi.treeLine,ge=Zi.treeNodeFilterProp,Wn=Zi.loadData,ai=Zi.treeLoadedKeys,si=Zi.treeMotion,ln=Zi.onTreeLoad,jn=Zi.keyEntities,ii=Qt.useRef(),ki=(0,vn.Z)(function(){return yi},[xe,yi],function(Xe,nr){return nr[0]&&Xe[1]!==nr[1]}),Ri=Qt.useMemo(function(){return Pt?{checked:ni,halfChecked:Si}:null},[Pt,ni,Si]);Qt.useEffect(function(){if(xe&&!rn&&ni.length){var Xe;(Xe=ii.current)===null||Xe===void 0||Xe.scrollTo({key:ni[0]})}},[xe]);var Gt=function(nr){nr.preventDefault()},fe=function(nr,qe){var xi=qe.node;Pt&&Pn(xi)||(Ei(xi.key,{selected:!ni.includes(xi.key)}),rn||yn(!1))},Mn=Qt.useState(pn),zn=(0,Be.Z)(Mn,2),De=zn[0],kn=zn[1],Sn=Qt.useState(null),Fn=(0,Be.Z)(Sn,2),ei=Fn[0],On=Fn[1],Qn=Qt.useMemo(function(){return on?(0,se.Z)(on):He?ei:De},[De,ei,on,He]),Yn=function(nr){kn(nr),On(nr),_n&&_n(nr)},Ni=String(He).toLowerCase(),Pi=function(nr){return Ni?String(nr[ge]).toLowerCase().includes(Ni):!1};Qt.useEffect(function(){He&&On(ke(yi,Xn))},[He]);var bi=Qt.useState(function(){return new Map}),Ge=(0,Be.Z)(bi,2),Xi=Ge[0],dr=Ge[1];Qt.useEffect(function(){Qi&&dr(new Map)},[Qi]);function br(Xe){var nr=Xe[Xn.value];if(!Xi.has(nr)){var qe=Ai.get(nr),xi=(qe.children||[]).length===0;if(xi)Xi.set(nr,!1);else{var ir=qe.children.filter(function(Br){return!Br.node.disabled&&!Br.node.disableCheckbox&&!ni.includes(Br.node[Xn.value])}),fr=ir.length;Xi.set(nr,fr>Qi)}}return Xi.get(nr)}var Ue=(0,fn.zX)(function(Xe){var nr=Xe[Xn.value];return ni.includes(nr)||Qi===null?!1:Qi<=0?!0:ji&&Qi?br(Xe):!1}),Vn=function Xe(nr){var qe=(0,Rn.Z)(nr),xi;try{for(qe.s();!(xi=qe.n()).done;){var ir=xi.value;if(!(ir.disabled||ir.selectable===!1)){if(He){if(Pi(ir))return ir}else return ir;if(ir[Xn.children]){var fr=Xe(ir[Xn.children]);if(fr)return fr}}}}catch(Br){qe.e(Br)}finally{qe.f()}return null},vi=Qt.useState(null),pi=(0,Be.Z)(vi,2),Fi=pi[0],Wi=pi[1],Vi=jn[Fi];Qt.useEffect(function(){if(xe){var Xe=null,nr=function(){var xi=Vn(ki);return xi?xi[Xn.value]:null};!rn&&ni.length&&!He?Xe=ni[0]:Xe=nr(),Wi(Xe)}},[xe,He]),Qt.useImperativeHandle(pe,function(){var Xe;return{scrollTo:(Xe=ii.current)===null||Xe===void 0?void 0:Xe.scrollTo,onKeyDown:function(qe){var xi,ir=qe.which;switch(ir){case un.Z.UP:case un.Z.DOWN:case un.Z.LEFT:case un.Z.RIGHT:(xi=ii.current)===null||xi===void 0||xi.onKeyDown(qe);break;case un.Z.ENTER:{if(Vi){var fr=Ue(Vi.node),Br=(Vi==null?void 0:Vi.node)||{},kr=Br.selectable,rr=Br.value,Kr=Br.disabled;kr!==!1&&!Kr&&!fr&&fe(null,{node:{key:Fi},selected:!ni.includes(rr)})}break}case un.Z.ESC:yn(!1)}},onKeyUp:function(){}}});var pr=(0,vn.Z)(function(){return!He},[He,on||De],function(Xe,nr){var qe=(0,Be.Z)(Xe,1),xi=qe[0],ir=(0,Be.Z)(nr,2),fr=ir[0],Br=ir[1];return xi!==fr&&!!(fr||Br)}),or=pr?Wn:null;if(ki.length===0)return Qt.createElement("div",{role:"listbox",className:"".concat(ze,"-empty"),onMouseDown:Gt},Ne);var hr={fieldNames:Xn};return ai&&(hr.loadedKeys=ai),Qn&&(hr.expandedKeys=Qn),Qt.createElement("div",{onMouseDown:Gt},Vi&&xe&&Qt.createElement("span",{style:Jn,"aria-live":"assertive"},Vi.node.value),Qt.createElement(wn.y6.Provider,{value:{nodeDisabled:Ue}},Qt.createElement(wn.ZP,(0,Ft.Z)({ref:ii,focusable:!1,prefixCls:"".concat(ze,"-tree"),treeData:ki,height:le,itemHeight:An,itemScrollOffset:Kn,virtual:Bn!==!1&&Yi!==!1,multiple:rn,icon:Di,showIcon:Bi,switcherIcon:me,showLine:we,loadData:or,motion:si,activeKey:Fi,checkable:Pt,checkStrictly:!0,checkedKeys:Ri,selectedKeys:Pt?[]:ni,defaultExpandAll:dn,titleRender:Hi},hr,{onActiveChange:Wi,onSelect:fe,onCheck:fe,onExpand:Yn,onLoad:ln,filterTreeNode:Pi,expandAction:Gi,onScroll:Ki}))))},an=Qt.forwardRef(Pe),re=an,hn="SHOW_ALL",di="SHOW_PARENT",Tt="SHOW_CHILD";function Et(ee,de,pe,be){var ze=new Set(ee);return de===Tt?ee.filter(function(rn){var He=pe[rn];return!He||!He.children||!He.children.some(function(yn){var xe=yn.node;return ze.has(xe[be.value])})||!He.children.every(function(yn){var xe=yn.node;return Pn(xe)||ze.has(xe[be.value])})}):de===di?ee.filter(function(rn){var He=pe[rn],yn=He?He.parent:null;return!yn||Pn(yn.node)||!ze.has(yn.key)}):ee}function St(ee){var de=ee.searchPlaceholder,pe=ee.treeCheckStrictly,be=ee.treeCheckable,ze=ee.labelInValue,rn=ee.value,He=ee.multiple,yn=ee.showCheckedStrategy,xe=ee.maxCount;warning(!de,"`searchPlaceholder` has been removed."),pe&&ze===!1&&warning(!1,"`treeCheckStrictly` will force set `labelInValue` to `true`."),(ze||pe)&&warning(toArray(rn).every(function(Ne){return Ne&&_typeof(Ne)==="object"&&"value"in Ne}),"Invalid prop `value` supplied to `TreeSelect`. You should use { label: string, value: string | number } or [{ label: string, value: string | number }] instead."),pe||He||be?warning(!rn||Array.isArray(rn),"`value` should be an array when `TreeSelect` is checkable or multiple."):warning(!Array.isArray(rn),"`value` should not be array when `TreeSelect` is single mode."),xe&&(yn==="SHOW_ALL"&&!pe||yn==="SHOW_PARENT")&&warning(!1,"`maxCount` not work with `showCheckedStrategy=SHOW_ALL` (when `treeCheckStrictly=false`) or `showCheckedStrategy=SHOW_PARENT`.")}var Mt=null,zt=["id","prefixCls","value","defaultValue","onChange","onSelect","onDeselect","searchValue","inputValue","onSearch","autoClearSearchValue","filterTreeNode","treeNodeFilterProp","showCheckedStrategy","treeNodeLabelProp","multiple","treeCheckable","treeCheckStrictly","labelInValue","maxCount","fieldNames","treeDataSimpleMode","treeData","children","loadData","treeLoadedKeys","onTreeLoad","treeDefaultExpandAll","treeExpandedKeys","treeDefaultExpandedKeys","onTreeExpand","treeExpandAction","virtual","listHeight","listItemHeight","listItemScrollOffset","onDropdownVisibleChange","dropdownMatchSelectWidth","treeLine","treeIcon","showTreeIcon","switcherIcon","treeMotion","treeTitleRender","onPopupScroll"];function kt(ee){return!ee||(0,Rt.Z)(ee)!=="object"}var Ut=Qt.forwardRef(function(ee,de){var pe=ee.id,be=ee.prefixCls,ze=be===void 0?"rc-tree-select":be,rn=ee.value,He=ee.defaultValue,yn=ee.onChange,xe=ee.onSelect,Ne=ee.onDeselect,Ze=ee.searchValue,Bn=ee.inputValue,le=ee.onSearch,An=ee.autoClearSearchValue,Kn=An===void 0?!0:An,yi=ee.filterTreeNode,Xn=ee.treeNodeFilterProp,Ei=Xn===void 0?"value":Xn,Yi=ee.showCheckedStrategy,Gi=ee.treeNodeLabelProp,Hi=ee.multiple,Ki=ee.treeCheckable,Qi=ee.treeCheckStrictly,ji=ee.labelInValue,Ai=ee.maxCount,Zi=ee.fieldNames,Pt=ee.treeDataSimpleMode,ni=ee.treeData,Si=ee.children,on=ee.loadData,dn=ee.treeLoadedKeys,pn=ee.onTreeLoad,_n=ee.treeDefaultExpandAll,Di=ee.treeExpandedKeys,Bi=ee.treeDefaultExpandedKeys,me=ee.onTreeExpand,we=ee.treeExpandAction,ge=ee.virtual,Wn=ee.listHeight,ai=Wn===void 0?200:Wn,si=ee.listItemHeight,ln=si===void 0?20:si,jn=ee.listItemScrollOffset,ii=jn===void 0?0:jn,ki=ee.onDropdownVisibleChange,Ri=ee.dropdownMatchSelectWidth,Gt=Ri===void 0?!0:Ri,fe=ee.treeLine,Mn=ee.treeIcon,zn=ee.showTreeIcon,De=ee.switcherIcon,kn=ee.treeMotion,Sn=ee.treeTitleRender,Fn=ee.onPopupScroll,ei=(0,Se.Z)(ee,zt),On=(0,je.ZP)(pe),Qn=Ki&&!Qi,Yn=Ki||Qi,Ni=Qi||ji,Pi=Yn||Hi,bi=(0,Vt.Z)(He,{value:rn}),Ge=(0,Be.Z)(bi,2),Xi=Ge[0],dr=Ge[1],br=Qt.useMemo(function(){return Ki?Yi||Tt:hn},[Yi,Ki]),Ue=Qt.useMemo(function(){return We(Zi)},[JSON.stringify(Zi)]),Vn=(0,Vt.Z)("",{value:Ze!==void 0?Ze:Bn,postState:function(Ke){return Ke||""}}),vi=(0,Be.Z)(Vn,2),pi=vi[0],Fi=vi[1],Wi=function(Ke){Fi(Ke),le==null||le(Ke)},Vi=Re(ni,Si,Pt),pr=ct(Vi,Ue),or=pr.keyEntities,hr=pr.valueEntities,Xe=Qt.useCallback(function(bn){var Ke=[],qn=[];return bn.forEach(function(Ci){hr.has(Ci)?qn.push(Ci):Ke.push(Ci)}),{missingRawValues:Ke,existRawValues:qn}},[hr]),nr=Xt(Vi,pi,{fieldNames:Ue,treeNodeFilterProp:Ei,filterTreeNode:yi}),qe=Qt.useCallback(function(bn){if(bn){if(Gi)return bn[Gi];for(var Ke=Ue._title,qn=0;qn<Ke.length;qn+=1){var Ci=bn[Ke[qn]];if(Ci!==void 0)return Ci}}},[Ue,Gi]),xi=Qt.useCallback(function(bn){var Ke=Fe(bn);return Ke.map(function(qn){return kt(qn)?{value:qn}:qn})},[]),ir=Qt.useCallback(function(bn){var Ke=xi(bn);return Ke.map(function(qn){var Ci=qn.label,ar=qn.value,Oi=qn.halfChecked,ur,sr=hr.get(ar);if(sr){var yr;Ci=Sn?Sn(sr.node):(yr=Ci)!==null&&yr!==void 0?yr:qe(sr.node),ur=sr.node.disabled}else if(Ci===void 0){var Tr=xi(Xi).find(function(jr){return jr.value===ar});Ci=Tr.label}return{label:Ci,value:ar,halfChecked:Oi,disabled:ur}})},[hr,qe,xi,Xi]),fr=Qt.useMemo(function(){return xi(Xi===null?[]:Xi)},[xi,Xi]),Br=Qt.useMemo(function(){var bn=[],Ke=[];return fr.forEach(function(qn){qn.halfChecked?Ke.push(qn):bn.push(qn)}),[bn,Ke]},[fr]),kr=(0,Be.Z)(Br,2),rr=kr[0],Kr=kr[1],Ae=Qt.useMemo(function(){return rr.map(function(bn){return bn.value})},[rr]),gn=nt(rr,Kr,Qn,or),Me=(0,Be.Z)(gn,2),At=Me[0],Nn=Me[1],Hn=Qt.useMemo(function(){var bn=Et(At,br,or,Ue),Ke=bn.map(function(Oi){var ur,sr;return(ur=(sr=or[Oi])===null||sr===void 0||(sr=sr.node)===null||sr===void 0?void 0:sr[Ue.value])!==null&&ur!==void 0?ur:Oi}),qn=Ke.map(function(Oi){var ur=rr.find(function(yr){return yr.value===Oi}),sr=ji?ur==null?void 0:ur.label:Sn==null?void 0:Sn(ur);return{value:Oi,label:sr}}),Ci=ir(qn),ar=Ci[0];return!Pi&&ar&&tn(ar.value)&&tn(ar.label)?[]:Ci.map(function(Oi){var ur;return(0,ye.Z)((0,ye.Z)({},Oi),{},{label:(ur=Oi.label)!==null&&ur!==void 0?ur:Oi.value})})},[Ue,Pi,At,rr,ir,br,or]),gi=Je(Hn),ci=(0,Be.Z)(gi,1),ti=ci[0],sn=Qt.useMemo(function(){return Pi&&(br==="SHOW_CHILD"||Qi||!Ki)?Ai:null},[Ai,Pi,Qi,br,Ki]),Dn=ve(function(bn,Ke,qn){var Ci=Et(bn,br,or,Ue);if(!(sn&&Ci.length>sn)){var ar=ir(bn);if(dr(ar),Kn&&Fi(""),yn){var Oi=bn;Qn&&(Oi=Ci.map(function(Ui){var vr=hr.get(Ui);return vr?vr.node[Ue.value]:Ui}));var ur=Ke||{triggerValue:void 0,selected:void 0},sr=ur.triggerValue,yr=ur.selected,Tr=Oi;if(Qi){var jr=Kr.filter(function(Ui){return!Oi.includes(Ui.value)});Tr=[].concat((0,se.Z)(Tr),(0,se.Z)(jr))}var Jr=ir(Tr),Ee={preValue:rr,triggerValue:sr},Fr=!0;(Qi||qn==="selection"&&!yr)&&(Fr=!1),te(Ee,sr,bn,Vi,Fr,Ue),Yn?Ee.checked=yr:Ee.selected=yr;var Mr=Ni?Jr:Jr.map(function(Ui){return Ui.value});yn(Pi?Mr:Mr[0],Ni?null:Jr.map(function(Ui){return Ui.label}),Ee)}}}),Gn=Qt.useCallback(function(bn,Ke){var qn,Ci=Ke.selected,ar=Ke.source,Oi=or[bn],ur=Oi==null?void 0:Oi.node,sr=(qn=ur==null?void 0:ur[Ue.value])!==null&&qn!==void 0?qn:bn;if(!Pi)Dn([sr],{selected:!0,triggerValue:sr},"option");else{var yr=Ci?[].concat((0,se.Z)(Ae),[sr]):At.filter(function(vr){return vr!==sr});if(Qn){var Tr=Xe(yr),jr=Tr.missingRawValues,Jr=Tr.existRawValues,Ee=Jr.map(function(vr){return hr.get(vr).key}),Fr;if(Ci){var Mr=(0,ce.S)(Ee,!0,or);Fr=Mr.checkedKeys}else{var Ui=(0,ce.S)(Ee,{checked:!1,halfCheckedKeys:Nn},or);Fr=Ui.checkedKeys}yr=[].concat((0,se.Z)(jr),(0,se.Z)(Fr.map(function(vr){return or[vr].node[Ue.value]})))}Dn(yr,{selected:Ci,triggerValue:sr},ar||"option")}Ci||!Pi?xe==null||xe(sr,Ht(ur)):Ne==null||Ne(sr,Ht(ur))},[Xe,hr,or,Ue,Pi,Ae,Dn,Qn,xe,Ne,At,Nn,Ai]),Ln=Qt.useCallback(function(bn){if(ki){var Ke={};Object.defineProperty(Ke,"documentClickClose",{get:function(){return(0,Qe.ZP)(!1,"Second param of `onDropdownVisibleChange` has been removed."),!1}}),ki(bn,Ke)}},[ki]),Zn=ve(function(bn,Ke){var qn=bn.map(function(Ci){return Ci.value});if(Ke.type==="clear"){Dn(qn,{},"selection");return}Ke.values.length&&Gn(Ke.values[0].value,{selected:!1,source:"selection"})}),Mi=Qt.useMemo(function(){return{virtual:ge,dropdownMatchSelectWidth:Gt,listHeight:ai,listItemHeight:ln,listItemScrollOffset:ii,treeData:nr,fieldNames:Ue,onSelect:Gn,treeExpandAction:we,treeTitleRender:Sn,onPopupScroll:Fn,leftMaxCount:Ai===void 0?null:Ai-ti.length,leafCountOnly:br==="SHOW_CHILD"&&!Qi&&!!Ki,valueEntities:hr}},[ge,Gt,ai,ln,ii,nr,Ue,Gn,we,Sn,Fn,Ai,ti.length,br,Qi,Ki,hr]),hi=Qt.useMemo(function(){return{checkable:Yn,loadData:on,treeLoadedKeys:dn,onTreeLoad:pn,checkedKeys:At,halfCheckedKeys:Nn,treeDefaultExpandAll:_n,treeExpandedKeys:Di,treeDefaultExpandedKeys:Bi,onTreeExpand:me,treeIcon:Mn,treeMotion:kn,showTreeIcon:zn,switcherIcon:De,treeLine:fe,treeNodeFilterProp:Ei,keyEntities:or}},[Yn,on,dn,pn,At,Nn,_n,Di,Bi,me,Mn,kn,zn,De,fe,Ei,or]);return Qt.createElement(jt.Provider,{value:Mi},Qt.createElement(en.Provider,{value:hi},Qt.createElement(ie.Ac,(0,Ft.Z)({ref:de},ei,{id:On,prefixCls:ze,mode:Pi?"multiple":void 0,displayValues:ti,onDisplayValuesChange:Zn,searchValue:pi,onSearch:Wi,OptionList:re,emptyOptions:!Vi.length,onDropdownVisibleChange:Ln,dropdownMatchSelectWidth:Gt}))))}),Oe=Ut;Oe.TreeNode=xt,Oe.SHOW_ALL=hn,Oe.SHOW_PARENT=di,Oe.SHOW_CHILD=Tt;var Te=Oe,_e=Te},639:function(Tn,oi,Dt){"use strict";Dt.d(oi,{Z:function(){return vt}});var Ft=Dt(71409),se=Dt(87075),ye=Dt(89490),Be=Dt(11036),Se=Dt(39224),Rt=Dt(59301),ie=Dt(92310),je=Dt.n(ie),ce=Dt(26112),Vt=Dt(30699),Qe=function(Lt){for(var Ot=Lt.prefixCls,Ht=Lt.level,te=Lt.isStart,_t=Lt.isEnd,Xt="".concat(Ot,"-indent-unit"),ve=[],oe=0;oe<Ht;oe+=1)ve.push(Rt.createElement("span",{key:oe,className:je()(Xt,(0,se.Z)((0,se.Z)({},"".concat(Xt,"-start"),te[oe]),"".concat(Xt,"-end"),_t[oe]))}));return Rt.createElement("span",{"aria-hidden":"true",className:"".concat(Ot,"-indent")},ve)},Qt=Rt.memo(Qe),Je=Dt(65065),Nt=Dt(34061),nt=["eventKey","className","style","dragOver","dragOverGapTop","dragOverGapBottom","isLeaf","isStart","isEnd","expanded","selected","checked","halfChecked","loading","domRef","active","data","onMouseMove","selectable"],et="open",ct="close",lt="---",pt=function(Lt){var Ot,Ht,te,_t=Lt.eventKey,Xt=Lt.className,ve=Lt.style,oe=Lt.dragOver,Re=Lt.dragOverGapTop,Ye=Lt.dragOverGapBottom,en=Lt.isLeaf,Rn=Lt.isStart,wn=Lt.isEnd,un=Lt.expanded,vn=Lt.selected,ne=Lt.checked,jt=Lt.halfChecked,Fe=Lt.loading,We=Lt.domRef,Pn=Lt.active,ke=Lt.data,tn=Lt.onMouseMove,fn=Lt.selectable,Jn=(0,Se.Z)(Lt,nt),Pe=Rt.useContext(Vt.k),an=Rt.useContext(Vt.y),re=Rt.useRef(null),hn=Rt.useState(!1),di=(0,Be.Z)(hn,2),Tt=di[0],Et=di[1],St=!!(Pe.disabled||Lt.disabled||(Ot=an.nodeDisabled)!==null&&Ot!==void 0&&Ot.call(an,ke)),Mt=Rt.useMemo(function(){return!Pe.checkable||Lt.checkable===!1?!1:Pe.checkable},[Pe.checkable,Lt.checkable]),zt=function(Si){St||Pe.onNodeSelect(Si,(0,Nt.F)(Lt))},kt=function(Si){St||!Mt||Lt.disableCheckbox||Pe.onNodeCheck(Si,(0,Nt.F)(Lt),!ne)},Ut=Rt.useMemo(function(){return typeof fn=="boolean"?fn:Pe.selectable},[fn,Pe.selectable]),Oe=function(Si){Pe.onNodeClick(Si,(0,Nt.F)(Lt)),Ut?zt(Si):kt(Si)},Te=function(Si){Pe.onNodeDoubleClick(Si,(0,Nt.F)(Lt))},_e=function(Si){Pe.onNodeMouseEnter(Si,(0,Nt.F)(Lt))},ee=function(Si){Pe.onNodeMouseLeave(Si,(0,Nt.F)(Lt))},de=function(Si){Pe.onNodeContextMenu(Si,(0,Nt.F)(Lt))},pe=Rt.useMemo(function(){return!!(Pe.draggable&&(!Pe.draggable.nodeDraggable||Pe.draggable.nodeDraggable(ke)))},[Pe.draggable,ke]),be=function(Si){Si.stopPropagation(),Et(!0),Pe.onNodeDragStart(Si,Lt);try{Si.dataTransfer.setData("text/plain","")}catch(on){}},ze=function(Si){Si.preventDefault(),Si.stopPropagation(),Pe.onNodeDragEnter(Si,Lt)},rn=function(Si){Si.preventDefault(),Si.stopPropagation(),Pe.onNodeDragOver(Si,Lt)},He=function(Si){Si.stopPropagation(),Pe.onNodeDragLeave(Si,Lt)},yn=function(Si){Si.stopPropagation(),Et(!1),Pe.onNodeDragEnd(Si,Lt)},xe=function(Si){Si.preventDefault(),Si.stopPropagation(),Et(!1),Pe.onNodeDrop(Si,Lt)},Ne=function(Si){Fe||Pe.onNodeExpand(Si,(0,Nt.F)(Lt))},Ze=Rt.useMemo(function(){var ni=(0,Je.Z)(Pe.keyEntities,_t)||{},Si=ni.children;return!!(Si||[]).length},[Pe.keyEntities,_t]),Bn=Rt.useMemo(function(){return en===!1?!1:en||!Pe.loadData&&!Ze||Pe.loadData&&Lt.loaded&&!Ze},[en,Pe.loadData,Ze,Lt.loaded]);Rt.useEffect(function(){Fe||typeof Pe.loadData=="function"&&un&&!Bn&&!Lt.loaded&&Pe.onNodeLoad((0,Nt.F)(Lt))},[Fe,Pe.loadData,Pe.onNodeLoad,un,Bn,Lt]);var le=Rt.useMemo(function(){var ni;return(ni=Pe.draggable)!==null&&ni!==void 0&&ni.icon?Rt.createElement("span",{className:"".concat(Pe.prefixCls,"-draggable-icon")},Pe.draggable.icon):null},[Pe.draggable]),An=function(Si){var on=Lt.switcherIcon||Pe.switcherIcon;return typeof on=="function"?on((0,ye.Z)((0,ye.Z)({},Lt),{},{isLeaf:Si})):on},Kn=function(){if(Bn){var Si=An(!0);return Si!==!1?Rt.createElement("span",{className:je()("".concat(Pe.prefixCls,"-switcher"),"".concat(Pe.prefixCls,"-switcher-noop"))},Si):null}var on=An(!1);return on!==!1?Rt.createElement("span",{onClick:Ne,className:je()("".concat(Pe.prefixCls,"-switcher"),"".concat(Pe.prefixCls,"-switcher_").concat(un?et:ct))},on):null},yi=Rt.useMemo(function(){if(!Mt)return null;var ni=typeof Mt!="boolean"?Mt:null;return Rt.createElement("span",{className:je()("".concat(Pe.prefixCls,"-checkbox"),(0,se.Z)((0,se.Z)((0,se.Z)({},"".concat(Pe.prefixCls,"-checkbox-checked"),ne),"".concat(Pe.prefixCls,"-checkbox-indeterminate"),!ne&&jt),"".concat(Pe.prefixCls,"-checkbox-disabled"),St||Lt.disableCheckbox)),onClick:kt,role:"checkbox","aria-checked":jt?"mixed":ne,"aria-disabled":St||Lt.disableCheckbox,"aria-label":"Select ".concat(typeof Lt.title=="string"?Lt.title:"tree node")},ni)},[Mt,ne,jt,St,Lt.disableCheckbox,Lt.title]),Xn=Rt.useMemo(function(){return Bn?null:un?et:ct},[Bn,un]),Ei=Rt.useMemo(function(){return Rt.createElement("span",{className:je()("".concat(Pe.prefixCls,"-iconEle"),"".concat(Pe.prefixCls,"-icon__").concat(Xn||"docu"),(0,se.Z)({},"".concat(Pe.prefixCls,"-icon_loading"),Fe))})},[Pe.prefixCls,Xn,Fe]),Yi=Rt.useMemo(function(){var ni=!!Pe.draggable,Si=!Lt.disabled&&ni&&Pe.dragOverNodeKey===_t;return Si?Pe.dropIndicatorRender({dropPosition:Pe.dropPosition,dropLevelOffset:Pe.dropLevelOffset,indent:Pe.indent,prefixCls:Pe.prefixCls,direction:Pe.direction}):null},[Pe.dropPosition,Pe.dropLevelOffset,Pe.indent,Pe.prefixCls,Pe.direction,Pe.draggable,Pe.dragOverNodeKey,Pe.dropIndicatorRender]),Gi=Rt.useMemo(function(){var ni=Lt.title,Si=ni===void 0?lt:ni,on="".concat(Pe.prefixCls,"-node-content-wrapper"),dn;if(Pe.showIcon){var pn=Lt.icon||Pe.icon;dn=pn?Rt.createElement("span",{className:je()("".concat(Pe.prefixCls,"-iconEle"),"".concat(Pe.prefixCls,"-icon__customize"))},typeof pn=="function"?pn(Lt):pn):Ei}else Pe.loadData&&Fe&&(dn=Ei);var _n;return typeof Si=="function"?_n=Si(ke):Pe.titleRender?_n=Pe.titleRender(ke):_n=Si,Rt.createElement("span",{ref:re,title:typeof Si=="string"?Si:"",className:je()(on,"".concat(on,"-").concat(Xn||"normal"),(0,se.Z)({},"".concat(Pe.prefixCls,"-node-selected"),!St&&(vn||Tt))),onMouseEnter:_e,onMouseLeave:ee,onContextMenu:de,onClick:Oe,onDoubleClick:Te},dn,Rt.createElement("span",{className:"".concat(Pe.prefixCls,"-title")},_n),Yi)},[Pe.prefixCls,Pe.showIcon,Lt,Pe.icon,Ei,Pe.titleRender,ke,Xn,_e,ee,de,Oe,Te]),Hi=(0,ce.Z)(Jn,{aria:!0,data:!0}),Ki=(0,Je.Z)(Pe.keyEntities,_t)||{},Qi=Ki.level,ji=wn[wn.length-1],Ai=!St&&pe,Zi=Pe.draggingNodeKey===_t,Pt=fn!==void 0?{"aria-selected":!!fn}:void 0;return Rt.createElement("div",(0,Ft.Z)({ref:We,role:"treeitem","aria-expanded":en?void 0:un,className:je()(Xt,"".concat(Pe.prefixCls,"-treenode"),(te={},(0,se.Z)((0,se.Z)((0,se.Z)((0,se.Z)((0,se.Z)((0,se.Z)((0,se.Z)((0,se.Z)((0,se.Z)((0,se.Z)(te,"".concat(Pe.prefixCls,"-treenode-disabled"),St),"".concat(Pe.prefixCls,"-treenode-switcher-").concat(un?"open":"close"),!en),"".concat(Pe.prefixCls,"-treenode-checkbox-checked"),ne),"".concat(Pe.prefixCls,"-treenode-checkbox-indeterminate"),jt),"".concat(Pe.prefixCls,"-treenode-selected"),vn),"".concat(Pe.prefixCls,"-treenode-loading"),Fe),"".concat(Pe.prefixCls,"-treenode-active"),Pn),"".concat(Pe.prefixCls,"-treenode-leaf-last"),ji),"".concat(Pe.prefixCls,"-treenode-draggable"),pe),"dragging",Zi),(0,se.Z)((0,se.Z)((0,se.Z)((0,se.Z)((0,se.Z)((0,se.Z)((0,se.Z)(te,"drop-target",Pe.dropTargetKey===_t),"drop-container",Pe.dropContainerKey===_t),"drag-over",!St&&oe),"drag-over-gap-top",!St&&Re),"drag-over-gap-bottom",!St&&Ye),"filter-node",(Ht=Pe.filterTreeNode)===null||Ht===void 0?void 0:Ht.call(Pe,(0,Nt.F)(Lt))),"".concat(Pe.prefixCls,"-treenode-leaf"),Bn))),style:ve,draggable:Ai,onDragStart:Ai?be:void 0,onDragEnter:pe?ze:void 0,onDragOver:pe?rn:void 0,onDragLeave:pe?He:void 0,onDrop:pe?xe:void 0,onDragEnd:pe?yn:void 0,onMouseMove:tn},Pt,Hi),Rt.createElement(Qt,{prefixCls:Pe.prefixCls,level:Qi,isStart:Rn,isEnd:wn}),le,Kn(),yi,Gi)};pt.isTreeNode=1;var vt=pt},30699:function(Tn,oi,Dt){"use strict";Dt.d(oi,{k:function(){return se},y:function(){return ye}});var Ft=Dt(59301),se=Ft.createContext(null),ye=Ft.createContext({})},62379:function(Tn,oi,Dt){"use strict";Dt.d(oi,{OF:function(){return _t.Z},y6:function(){return ct.y},ZP:function(){return St}});var Ft=Dt(71409),se=Dt(28788),ye=Dt(89490),Be=Dt(62730),Se=Dt(16552),Rt=Dt(19210),ie=Dt(90264),je=Dt(46654),ce=Dt(37205),Vt=Dt(87075),Qe=Dt(92310),Qt=Dt.n(Qe),Je=Dt(10228),Nt=Dt(26112),nt=Dt(48736),et=Dt(59301),ct=Dt(30699),lt=function(zt){var kt=zt.dropPosition,Ut=zt.dropLevelOffset,Oe=zt.indent,Te={pointerEvents:"none",position:"absolute",right:0,backgroundColor:"red",height:2};switch(kt){case-1:Te.top=0,Te.left=-Ut*Oe;break;case 1:Te.bottom=0,Te.left=-Ut*Oe;break;case 0:Te.bottom=0,Te.left=Oe;break}return et.createElement("div",{style:Te})},pt=lt;function vt(Mt){if(Mt==null)throw new TypeError("Cannot destructure "+Mt)}var xt=Dt(11036),Lt=Dt(39224),Ot=Dt(34280),Ht=Dt(65283),te=Dt(77900),_t=Dt(639);function Xt(Mt,zt){var kt=et.useState(!1),Ut=(0,xt.Z)(kt,2),Oe=Ut[0],Te=Ut[1];(0,Ot.Z)(function(){if(Oe)return Mt(),function(){zt()}},[Oe]),(0,Ot.Z)(function(){return Te(!0),function(){Te(!1)}},[])}var ve=Xt,oe=Dt(34061),Re=["className","style","motion","motionNodes","motionType","onMotionStart","onMotionEnd","active","treeNodeRequiredProps"],Ye=et.forwardRef(function(Mt,zt){var kt=Mt.className,Ut=Mt.style,Oe=Mt.motion,Te=Mt.motionNodes,_e=Mt.motionType,ee=Mt.onMotionStart,de=Mt.onMotionEnd,pe=Mt.active,be=Mt.treeNodeRequiredProps,ze=(0,Lt.Z)(Mt,Re),rn=et.useState(!0),He=(0,xt.Z)(rn,2),yn=He[0],xe=He[1],Ne=et.useContext(ct.k),Ze=Ne.prefixCls,Bn=Te&&_e!=="hide";(0,Ot.Z)(function(){Te&&Bn!==yn&&xe(Bn)},[Te]);var le=function(){Te&&ee()},An=et.useRef(!1),Kn=function(){Te&&!An.current&&(An.current=!0,de())};ve(le,Kn);var yi=function(Ei){Bn===Ei&&Kn()};return Te?et.createElement(te.default,(0,Ft.Z)({ref:zt,visible:yn},Oe,{motionAppear:_e==="show",onVisibleChanged:yi}),function(Xn,Ei){var Yi=Xn.className,Gi=Xn.style;return et.createElement("div",{ref:Ei,className:Qt()("".concat(Ze,"-treenode-motion"),Yi),style:Gi},Te.map(function(Hi){var Ki=Object.assign({},(vt(Hi.data),Hi.data)),Qi=Hi.title,ji=Hi.key,Ai=Hi.isStart,Zi=Hi.isEnd;delete Ki.children;var Pt=(0,oe.H8)(ji,be);return et.createElement(_t.Z,(0,Ft.Z)({},Ki,Pt,{title:Qi,active:pe,data:Hi.data,key:ji,isStart:Ai,isEnd:Zi}))}))}):et.createElement(_t.Z,(0,Ft.Z)({domRef:zt,className:kt,style:Ut},ze,{active:pe}))}),en=Ye;function Rn(){var Mt=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[],zt=arguments.length>1&&arguments[1]!==void 0?arguments[1]:[],kt=Mt.length,Ut=zt.length;if(Math.abs(kt-Ut)!==1)return{add:!1,key:null};function Oe(Te,_e){var ee=new Map;Te.forEach(function(pe){ee.set(pe,!0)});var de=_e.filter(function(pe){return!ee.has(pe)});return de.length===1?de[0]:null}return kt<Ut?{add:!0,key:Oe(Mt,zt)}:{add:!1,key:Oe(zt,Mt)}}function wn(Mt,zt,kt){var Ut=Mt.findIndex(function(ee){return ee.key===kt}),Oe=Mt[Ut+1],Te=zt.findIndex(function(ee){return ee.key===kt});if(Oe){var _e=zt.findIndex(function(ee){return ee.key===Oe.key});return zt.slice(Te+1,_e)}return zt.slice(Te+1)}var un=["prefixCls","data","selectable","checkable","expandedKeys","selectedKeys","checkedKeys","loadedKeys","loadingKeys","halfCheckedKeys","keyEntities","disabled","dragging","dragOverNodeKey","dropPosition","motion","height","itemHeight","virtual","scrollWidth","focusable","activeItem","focused","tabIndex","onKeyDown","onFocus","onBlur","onActiveChange","onListChangeStart","onListChangeEnd"],vn={width:0,height:0,display:"flex",overflow:"hidden",opacity:0,border:0,padding:0,margin:0},ne=function(){},jt="RC_TREE_MOTION_".concat(Math.random()),Fe={key:jt},We={key:jt,level:0,index:0,pos:"0",node:Fe,nodes:[Fe]},Pn={parent:null,children:[],pos:We.pos,data:Fe,title:null,key:jt,isStart:[],isEnd:[]};function ke(Mt,zt,kt,Ut){return zt===!1||!kt?Mt:Mt.slice(0,Math.ceil(kt/Ut)+1)}function tn(Mt){var zt=Mt.key,kt=Mt.pos;return(0,oe.km)(zt,kt)}function fn(Mt){for(var zt=String(Mt.data.key),kt=Mt;kt.parent;)kt=kt.parent,zt="".concat(kt.data.key," > ").concat(zt);return zt}var Jn=et.forwardRef(function(Mt,zt){var kt=Mt.prefixCls,Ut=Mt.data,Oe=Mt.selectable,Te=Mt.checkable,_e=Mt.expandedKeys,ee=Mt.selectedKeys,de=Mt.checkedKeys,pe=Mt.loadedKeys,be=Mt.loadingKeys,ze=Mt.halfCheckedKeys,rn=Mt.keyEntities,He=Mt.disabled,yn=Mt.dragging,xe=Mt.dragOverNodeKey,Ne=Mt.dropPosition,Ze=Mt.motion,Bn=Mt.height,le=Mt.itemHeight,An=Mt.virtual,Kn=Mt.scrollWidth,yi=Mt.focusable,Xn=Mt.activeItem,Ei=Mt.focused,Yi=Mt.tabIndex,Gi=Mt.onKeyDown,Hi=Mt.onFocus,Ki=Mt.onBlur,Qi=Mt.onActiveChange,ji=Mt.onListChangeStart,Ai=Mt.onListChangeEnd,Zi=(0,Lt.Z)(Mt,un),Pt=et.useRef(null),ni=et.useRef(null);et.useImperativeHandle(zt,function(){return{scrollTo:function(Fn){Pt.current.scrollTo(Fn)},getIndentWidth:function(){return ni.current.offsetWidth}}});var Si=et.useState(_e),on=(0,xt.Z)(Si,2),dn=on[0],pn=on[1],_n=et.useState(Ut),Di=(0,xt.Z)(_n,2),Bi=Di[0],me=Di[1],we=et.useState(Ut),ge=(0,xt.Z)(we,2),Wn=ge[0],ai=ge[1],si=et.useState([]),ln=(0,xt.Z)(si,2),jn=ln[0],ii=ln[1],ki=et.useState(null),Ri=(0,xt.Z)(ki,2),Gt=Ri[0],fe=Ri[1],Mn=et.useRef(Ut);Mn.current=Ut;function zn(){var Sn=Mn.current;me(Sn),ai(Sn),ii([]),fe(null),Ai()}(0,Ot.Z)(function(){pn(_e);var Sn=Rn(dn,_e);if(Sn.key!==null)if(Sn.add){var Fn=Bi.findIndex(function(Pi){var bi=Pi.key;return bi===Sn.key}),ei=ke(wn(Bi,Ut,Sn.key),An,Bn,le),On=Bi.slice();On.splice(Fn+1,0,Pn),ai(On),ii(ei),fe("show")}else{var Qn=Ut.findIndex(function(Pi){var bi=Pi.key;return bi===Sn.key}),Yn=ke(wn(Ut,Bi,Sn.key),An,Bn,le),Ni=Ut.slice();Ni.splice(Qn+1,0,Pn),ai(Ni),ii(Yn),fe("hide")}else Bi!==Ut&&(me(Ut),ai(Ut))},[_e,Ut]),et.useEffect(function(){yn||zn()},[yn]);var De=Ze?Wn:Ut,kn={expandedKeys:_e,selectedKeys:ee,loadedKeys:pe,loadingKeys:be,checkedKeys:de,halfCheckedKeys:ze,dragOverNodeKey:xe,dropPosition:Ne,keyEntities:rn};return et.createElement(et.Fragment,null,Ei&&Xn&&et.createElement("span",{style:vn,"aria-live":"assertive"},fn(Xn)),et.createElement("div",null,et.createElement("input",{style:vn,disabled:yi===!1||He,tabIndex:yi!==!1?Yi:null,onKeyDown:Gi,onFocus:Hi,onBlur:Ki,value:"",onChange:ne,"aria-label":"for screen reader"})),et.createElement("div",{className:"".concat(kt,"-treenode"),"aria-hidden":!0,style:{position:"absolute",pointerEvents:"none",visibility:"hidden",height:0,overflow:"hidden",border:0,padding:0}},et.createElement("div",{className:"".concat(kt,"-indent")},et.createElement("div",{ref:ni,className:"".concat(kt,"-indent-unit")}))),et.createElement(Ht.Z,(0,Ft.Z)({},Zi,{data:De,itemKey:tn,height:Bn,fullHeight:!1,virtual:An,itemHeight:le,scrollWidth:Kn,prefixCls:"".concat(kt,"-list"),ref:Pt,role:"tree",onVisibleChange:function(Fn){Fn.every(function(ei){return tn(ei)!==jt})&&zn()}}),function(Sn){var Fn=Sn.pos,ei=Object.assign({},(vt(Sn.data),Sn.data)),On=Sn.title,Qn=Sn.key,Yn=Sn.isStart,Ni=Sn.isEnd,Pi=(0,oe.km)(Qn,Fn);delete ei.key,delete ei.children;var bi=(0,oe.H8)(Pi,kn);return et.createElement(en,(0,Ft.Z)({},ei,bi,{title:On,active:!!Xn&&Qn===Xn.key,pos:Fn,data:Sn.data,isStart:Yn,isEnd:Ni,motion:Ze,motionNodes:Qn===jt?jn:null,motionType:Gt,onMotionStart:ji,onMotionEnd:zn,treeNodeRequiredProps:kn,onMouseMove:function(){Qi(null)}}))}))}),Pe=Jn,an=Dt(82661),re=Dt(34643),hn=Dt(65065),di=10,Tt=function(Mt){(0,je.Z)(kt,Mt);var zt=(0,ce.Z)(kt);function kt(){var Ut;(0,Se.Z)(this,kt);for(var Oe=arguments.length,Te=new Array(Oe),_e=0;_e<Oe;_e++)Te[_e]=arguments[_e];return Ut=zt.call.apply(zt,[this].concat(Te)),(0,Vt.Z)((0,ie.Z)(Ut),"destroyed",!1),(0,Vt.Z)((0,ie.Z)(Ut),"delayedDragEnterLogic",void 0),(0,Vt.Z)((0,ie.Z)(Ut),"loadingRetryTimes",{}),(0,Vt.Z)((0,ie.Z)(Ut),"state",{keyEntities:{},indent:null,selectedKeys:[],checkedKeys:[],halfCheckedKeys:[],loadedKeys:[],loadingKeys:[],expandedKeys:[],draggingNodeKey:null,dragChildrenKeys:[],dropTargetKey:null,dropPosition:null,dropContainerKey:null,dropLevelOffset:null,dropTargetPos:null,dropAllowed:!0,dragOverNodeKey:null,treeData:[],flattenNodes:[],focused:!1,activeKey:null,listChanging:!1,prevProps:null,fieldNames:(0,oe.w$)()}),(0,Vt.Z)((0,ie.Z)(Ut),"dragStartMousePosition",null),(0,Vt.Z)((0,ie.Z)(Ut),"dragNodeProps",null),(0,Vt.Z)((0,ie.Z)(Ut),"currentMouseOverDroppableNodeKey",null),(0,Vt.Z)((0,ie.Z)(Ut),"listRef",et.createRef()),(0,Vt.Z)((0,ie.Z)(Ut),"onNodeDragStart",function(ee,de){var pe=Ut.state,be=pe.expandedKeys,ze=pe.keyEntities,rn=Ut.props.onDragStart,He=de.eventKey;Ut.dragNodeProps=de,Ut.dragStartMousePosition={x:ee.clientX,y:ee.clientY};var yn=(0,an._5)(be,He);Ut.setState({draggingNodeKey:He,dragChildrenKeys:(0,an.wA)(He,ze),indent:Ut.listRef.current.getIndentWidth()}),Ut.setExpandedKeys(yn),window.addEventListener("dragend",Ut.onWindowDragEnd),rn==null||rn({event:ee,node:(0,oe.F)(de)})}),(0,Vt.Z)((0,ie.Z)(Ut),"onNodeDragEnter",function(ee,de){var pe=Ut.state,be=pe.expandedKeys,ze=pe.keyEntities,rn=pe.dragChildrenKeys,He=pe.flattenNodes,yn=pe.indent,xe=Ut.props,Ne=xe.onDragEnter,Ze=xe.onExpand,Bn=xe.allowDrop,le=xe.direction,An=de.pos,Kn=de.eventKey;if(Ut.currentMouseOverDroppableNodeKey!==Kn&&(Ut.currentMouseOverDroppableNodeKey=Kn),!Ut.dragNodeProps){Ut.resetDragState();return}var yi=(0,an.OM)(ee,Ut.dragNodeProps,de,yn,Ut.dragStartMousePosition,Bn,He,ze,be,le),Xn=yi.dropPosition,Ei=yi.dropLevelOffset,Yi=yi.dropTargetKey,Gi=yi.dropContainerKey,Hi=yi.dropTargetPos,Ki=yi.dropAllowed,Qi=yi.dragOverNodeKey;if(rn.includes(Yi)||!Ki){Ut.resetDragState();return}if(Ut.delayedDragEnterLogic||(Ut.delayedDragEnterLogic={}),Object.keys(Ut.delayedDragEnterLogic).forEach(function(ji){clearTimeout(Ut.delayedDragEnterLogic[ji])}),Ut.dragNodeProps.eventKey!==de.eventKey&&(ee.persist(),Ut.delayedDragEnterLogic[An]=window.setTimeout(function(){if(Ut.state.draggingNodeKey!==null){var ji=(0,Be.Z)(be),Ai=(0,hn.Z)(ze,de.eventKey);Ai&&(Ai.children||[]).length&&(ji=(0,an.L0)(be,de.eventKey)),Ut.props.hasOwnProperty("expandedKeys")||Ut.setExpandedKeys(ji),Ze==null||Ze(ji,{node:(0,oe.F)(de),expanded:!0,nativeEvent:ee.nativeEvent})}},800)),Ut.dragNodeProps.eventKey===Yi&&Ei===0){Ut.resetDragState();return}Ut.setState({dragOverNodeKey:Qi,dropPosition:Xn,dropLevelOffset:Ei,dropTargetKey:Yi,dropContainerKey:Gi,dropTargetPos:Hi,dropAllowed:Ki}),Ne==null||Ne({event:ee,node:(0,oe.F)(de),expandedKeys:be})}),(0,Vt.Z)((0,ie.Z)(Ut),"onNodeDragOver",function(ee,de){var pe=Ut.state,be=pe.dragChildrenKeys,ze=pe.flattenNodes,rn=pe.keyEntities,He=pe.expandedKeys,yn=pe.indent,xe=Ut.props,Ne=xe.onDragOver,Ze=xe.allowDrop,Bn=xe.direction;if(Ut.dragNodeProps){var le=(0,an.OM)(ee,Ut.dragNodeProps,de,yn,Ut.dragStartMousePosition,Ze,ze,rn,He,Bn),An=le.dropPosition,Kn=le.dropLevelOffset,yi=le.dropTargetKey,Xn=le.dropContainerKey,Ei=le.dropTargetPos,Yi=le.dropAllowed,Gi=le.dragOverNodeKey;be.includes(yi)||!Yi||(Ut.dragNodeProps.eventKey===yi&&Kn===0?Ut.state.dropPosition===null&&Ut.state.dropLevelOffset===null&&Ut.state.dropTargetKey===null&&Ut.state.dropContainerKey===null&&Ut.state.dropTargetPos===null&&Ut.state.dropAllowed===!1&&Ut.state.dragOverNodeKey===null||Ut.resetDragState():An===Ut.state.dropPosition&&Kn===Ut.state.dropLevelOffset&&yi===Ut.state.dropTargetKey&&Xn===Ut.state.dropContainerKey&&Ei===Ut.state.dropTargetPos&&Yi===Ut.state.dropAllowed&&Gi===Ut.state.dragOverNodeKey||Ut.setState({dropPosition:An,dropLevelOffset:Kn,dropTargetKey:yi,dropContainerKey:Xn,dropTargetPos:Ei,dropAllowed:Yi,dragOverNodeKey:Gi}),Ne==null||Ne({event:ee,node:(0,oe.F)(de)}))}}),(0,Vt.Z)((0,ie.Z)(Ut),"onNodeDragLeave",function(ee,de){Ut.currentMouseOverDroppableNodeKey===de.eventKey&&!ee.currentTarget.contains(ee.relatedTarget)&&(Ut.resetDragState(),Ut.currentMouseOverDroppableNodeKey=null);var pe=Ut.props.onDragLeave;pe==null||pe({event:ee,node:(0,oe.F)(de)})}),(0,Vt.Z)((0,ie.Z)(Ut),"onWindowDragEnd",function(ee){Ut.onNodeDragEnd(ee,null,!0),window.removeEventListener("dragend",Ut.onWindowDragEnd)}),(0,Vt.Z)((0,ie.Z)(Ut),"onNodeDragEnd",function(ee,de){var pe=Ut.props.onDragEnd;Ut.setState({dragOverNodeKey:null}),Ut.cleanDragState(),pe==null||pe({event:ee,node:(0,oe.F)(de)}),Ut.dragNodeProps=null,window.removeEventListener("dragend",Ut.onWindowDragEnd)}),(0,Vt.Z)((0,ie.Z)(Ut),"onNodeDrop",function(ee,de){var pe,be=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1,ze=Ut.state,rn=ze.dragChildrenKeys,He=ze.dropPosition,yn=ze.dropTargetKey,xe=ze.dropTargetPos,Ne=ze.dropAllowed;if(Ne){var Ze=Ut.props.onDrop;if(Ut.setState({dragOverNodeKey:null}),Ut.cleanDragState(),yn!==null){var Bn=(0,ye.Z)((0,ye.Z)({},(0,oe.H8)(yn,Ut.getTreeNodeRequiredProps())),{},{active:((pe=Ut.getActiveItem())===null||pe===void 0?void 0:pe.key)===yn,data:(0,hn.Z)(Ut.state.keyEntities,yn).node}),le=rn.includes(yn);(0,nt.ZP)(!le,"Can not drop to dragNode's children node. This is a bug of rc-tree. Please report an issue.");var An=(0,an.yx)(xe),Kn={event:ee,node:(0,oe.F)(Bn),dragNode:Ut.dragNodeProps?(0,oe.F)(Ut.dragNodeProps):null,dragNodesKeys:[Ut.dragNodeProps.eventKey].concat(rn),dropToGap:He!==0,dropPosition:He+Number(An[An.length-1])};be||Ze==null||Ze(Kn),Ut.dragNodeProps=null}}}),(0,Vt.Z)((0,ie.Z)(Ut),"cleanDragState",function(){var ee=Ut.state.draggingNodeKey;ee!==null&&Ut.setState({draggingNodeKey:null,dropPosition:null,dropContainerKey:null,dropTargetKey:null,dropLevelOffset:null,dropAllowed:!0,dragOverNodeKey:null}),Ut.dragStartMousePosition=null,Ut.currentMouseOverDroppableNodeKey=null}),(0,Vt.Z)((0,ie.Z)(Ut),"triggerExpandActionExpand",function(ee,de){var pe=Ut.state,be=pe.expandedKeys,ze=pe.flattenNodes,rn=de.expanded,He=de.key,yn=de.isLeaf;if(!(yn||ee.shiftKey||ee.metaKey||ee.ctrlKey)){var xe=ze.filter(function(Ze){return Ze.key===He})[0],Ne=(0,oe.F)((0,ye.Z)((0,ye.Z)({},(0,oe.H8)(He,Ut.getTreeNodeRequiredProps())),{},{data:xe.data}));Ut.setExpandedKeys(rn?(0,an._5)(be,He):(0,an.L0)(be,He)),Ut.onNodeExpand(ee,Ne)}}),(0,Vt.Z)((0,ie.Z)(Ut),"onNodeClick",function(ee,de){var pe=Ut.props,be=pe.onClick,ze=pe.expandAction;ze==="click"&&Ut.triggerExpandActionExpand(ee,de),be==null||be(ee,de)}),(0,Vt.Z)((0,ie.Z)(Ut),"onNodeDoubleClick",function(ee,de){var pe=Ut.props,be=pe.onDoubleClick,ze=pe.expandAction;ze==="doubleClick"&&Ut.triggerExpandActionExpand(ee,de),be==null||be(ee,de)}),(0,Vt.Z)((0,ie.Z)(Ut),"onNodeSelect",function(ee,de){var pe=Ut.state.selectedKeys,be=Ut.state,ze=be.keyEntities,rn=be.fieldNames,He=Ut.props,yn=He.onSelect,xe=He.multiple,Ne=de.selected,Ze=de[rn.key],Bn=!Ne;Bn?xe?pe=(0,an.L0)(pe,Ze):pe=[Ze]:pe=(0,an._5)(pe,Ze);var le=pe.map(function(An){var Kn=(0,hn.Z)(ze,An);return Kn?Kn.node:null}).filter(Boolean);Ut.setUncontrolledState({selectedKeys:pe}),yn==null||yn(pe,{event:"select",selected:Bn,node:de,selectedNodes:le,nativeEvent:ee.nativeEvent})}),(0,Vt.Z)((0,ie.Z)(Ut),"onNodeCheck",function(ee,de,pe){var be=Ut.state,ze=be.keyEntities,rn=be.checkedKeys,He=be.halfCheckedKeys,yn=Ut.props,xe=yn.checkStrictly,Ne=yn.onCheck,Ze=de.key,Bn,le={event:"check",node:de,checked:pe,nativeEvent:ee.nativeEvent};if(xe){var An=pe?(0,an.L0)(rn,Ze):(0,an._5)(rn,Ze),Kn=(0,an._5)(He,Ze);Bn={checked:An,halfChecked:Kn},le.checkedNodes=An.map(function(Hi){return(0,hn.Z)(ze,Hi)}).filter(Boolean).map(function(Hi){return Hi.node}),Ut.setUncontrolledState({checkedKeys:An})}else{var yi=(0,re.S)([].concat((0,Be.Z)(rn),[Ze]),!0,ze),Xn=yi.checkedKeys,Ei=yi.halfCheckedKeys;if(!pe){var Yi=new Set(Xn);Yi.delete(Ze);var Gi=(0,re.S)(Array.from(Yi),{checked:!1,halfCheckedKeys:Ei},ze);Xn=Gi.checkedKeys,Ei=Gi.halfCheckedKeys}Bn=Xn,le.checkedNodes=[],le.checkedNodesPositions=[],le.halfCheckedKeys=Ei,Xn.forEach(function(Hi){var Ki=(0,hn.Z)(ze,Hi);if(Ki){var Qi=Ki.node,ji=Ki.pos;le.checkedNodes.push(Qi),le.checkedNodesPositions.push({node:Qi,pos:ji})}}),Ut.setUncontrolledState({checkedKeys:Xn},!1,{halfCheckedKeys:Ei})}Ne==null||Ne(Bn,le)}),(0,Vt.Z)((0,ie.Z)(Ut),"onNodeLoad",function(ee){var de,pe=ee.key,be=Ut.state.keyEntities,ze=(0,hn.Z)(be,pe);if(!(ze!=null&&(de=ze.children)!==null&&de!==void 0&&de.length)){var rn=new Promise(function(He,yn){Ut.setState(function(xe){var Ne=xe.loadedKeys,Ze=Ne===void 0?[]:Ne,Bn=xe.loadingKeys,le=Bn===void 0?[]:Bn,An=Ut.props,Kn=An.loadData,yi=An.onLoad;if(!Kn||Ze.includes(pe)||le.includes(pe))return null;var Xn=Kn(ee);return Xn.then(function(){var Ei=Ut.state.loadedKeys,Yi=(0,an.L0)(Ei,pe);yi==null||yi(Yi,{event:"load",node:ee}),Ut.setUncontrolledState({loadedKeys:Yi}),Ut.setState(function(Gi){return{loadingKeys:(0,an._5)(Gi.loadingKeys,pe)}}),He()}).catch(function(Ei){if(Ut.setState(function(Gi){return{loadingKeys:(0,an._5)(Gi.loadingKeys,pe)}}),Ut.loadingRetryTimes[pe]=(Ut.loadingRetryTimes[pe]||0)+1,Ut.loadingRetryTimes[pe]>=di){var Yi=Ut.state.loadedKeys;(0,nt.ZP)(!1,"Retry for `loadData` many times but still failed. No more retry."),Ut.setUncontrolledState({loadedKeys:(0,an.L0)(Yi,pe)}),He()}yn(Ei)}),{loadingKeys:(0,an.L0)(le,pe)}})});return rn.catch(function(){}),rn}}),(0,Vt.Z)((0,ie.Z)(Ut),"onNodeMouseEnter",function(ee,de){var pe=Ut.props.onMouseEnter;pe==null||pe({event:ee,node:de})}),(0,Vt.Z)((0,ie.Z)(Ut),"onNodeMouseLeave",function(ee,de){var pe=Ut.props.onMouseLeave;pe==null||pe({event:ee,node:de})}),(0,Vt.Z)((0,ie.Z)(Ut),"onNodeContextMenu",function(ee,de){var pe=Ut.props.onRightClick;pe&&(ee.preventDefault(),pe({event:ee,node:de}))}),(0,Vt.Z)((0,ie.Z)(Ut),"onFocus",function(){var ee=Ut.props.onFocus;Ut.setState({focused:!0});for(var de=arguments.length,pe=new Array(de),be=0;be<de;be++)pe[be]=arguments[be];ee==null||ee.apply(void 0,pe)}),(0,Vt.Z)((0,ie.Z)(Ut),"onBlur",function(){var ee=Ut.props.onBlur;Ut.setState({focused:!1}),Ut.onActiveChange(null);for(var de=arguments.length,pe=new Array(de),be=0;be<de;be++)pe[be]=arguments[be];ee==null||ee.apply(void 0,pe)}),(0,Vt.Z)((0,ie.Z)(Ut),"getTreeNodeRequiredProps",function(){var ee=Ut.state,de=ee.expandedKeys,pe=ee.selectedKeys,be=ee.loadedKeys,ze=ee.loadingKeys,rn=ee.checkedKeys,He=ee.halfCheckedKeys,yn=ee.dragOverNodeKey,xe=ee.dropPosition,Ne=ee.keyEntities;return{expandedKeys:de||[],selectedKeys:pe||[],loadedKeys:be||[],loadingKeys:ze||[],checkedKeys:rn||[],halfCheckedKeys:He||[],dragOverNodeKey:yn,dropPosition:xe,keyEntities:Ne}}),(0,Vt.Z)((0,ie.Z)(Ut),"setExpandedKeys",function(ee){var de=Ut.state,pe=de.treeData,be=de.fieldNames,ze=(0,oe.oH)(pe,ee,be);Ut.setUncontrolledState({expandedKeys:ee,flattenNodes:ze},!0)}),(0,Vt.Z)((0,ie.Z)(Ut),"onNodeExpand",function(ee,de){var pe=Ut.state.expandedKeys,be=Ut.state,ze=be.listChanging,rn=be.fieldNames,He=Ut.props,yn=He.onExpand,xe=He.loadData,Ne=de.expanded,Ze=de[rn.key];if(!ze){var Bn=pe.includes(Ze),le=!Ne;if((0,nt.ZP)(Ne&&Bn||!Ne&&!Bn,"Expand state not sync with index check"),pe=le?(0,an.L0)(pe,Ze):(0,an._5)(pe,Ze),Ut.setExpandedKeys(pe),yn==null||yn(pe,{node:de,expanded:le,nativeEvent:ee.nativeEvent}),le&&xe){var An=Ut.onNodeLoad(de);An&&An.then(function(){var Kn=(0,oe.oH)(Ut.state.treeData,pe,rn);Ut.setUncontrolledState({flattenNodes:Kn})}).catch(function(){var Kn=Ut.state.expandedKeys,yi=(0,an._5)(Kn,Ze);Ut.setExpandedKeys(yi)})}}}),(0,Vt.Z)((0,ie.Z)(Ut),"onListChangeStart",function(){Ut.setUncontrolledState({listChanging:!0})}),(0,Vt.Z)((0,ie.Z)(Ut),"onListChangeEnd",function(){setTimeout(function(){Ut.setUncontrolledState({listChanging:!1})})}),(0,Vt.Z)((0,ie.Z)(Ut),"onActiveChange",function(ee){var de=Ut.state.activeKey,pe=Ut.props,be=pe.onActiveChange,ze=pe.itemScrollOffset,rn=ze===void 0?0:ze;de!==ee&&(Ut.setState({activeKey:ee}),ee!==null&&Ut.scrollTo({key:ee,offset:rn}),be==null||be(ee))}),(0,Vt.Z)((0,ie.Z)(Ut),"getActiveItem",function(){var ee=Ut.state,de=ee.activeKey,pe=ee.flattenNodes;return de===null?null:pe.find(function(be){var ze=be.key;return ze===de})||null}),(0,Vt.Z)((0,ie.Z)(Ut),"offsetActiveKey",function(ee){var de=Ut.state,pe=de.flattenNodes,be=de.activeKey,ze=pe.findIndex(function(yn){var xe=yn.key;return xe===be});ze===-1&&ee<0&&(ze=pe.length),ze=(ze+ee+pe.length)%pe.length;var rn=pe[ze];if(rn){var He=rn.key;Ut.onActiveChange(He)}else Ut.onActiveChange(null)}),(0,Vt.Z)((0,ie.Z)(Ut),"onKeyDown",function(ee){var de=Ut.state,pe=de.activeKey,be=de.expandedKeys,ze=de.checkedKeys,rn=de.fieldNames,He=Ut.props,yn=He.onKeyDown,xe=He.checkable,Ne=He.selectable;switch(ee.which){case Je.Z.UP:{Ut.offsetActiveKey(-1),ee.preventDefault();break}case Je.Z.DOWN:{Ut.offsetActiveKey(1),ee.preventDefault();break}}var Ze=Ut.getActiveItem();if(Ze&&Ze.data){var Bn=Ut.getTreeNodeRequiredProps(),le=Ze.data.isLeaf===!1||!!(Ze.data[rn.children]||[]).length,An=(0,oe.F)((0,ye.Z)((0,ye.Z)({},(0,oe.H8)(pe,Bn)),{},{data:Ze.data,active:!0}));switch(ee.which){case Je.Z.LEFT:{le&&be.includes(pe)?Ut.onNodeExpand({},An):Ze.parent&&Ut.onActiveChange(Ze.parent.key),ee.preventDefault();break}case Je.Z.RIGHT:{le&&!be.includes(pe)?Ut.onNodeExpand({},An):Ze.children&&Ze.children.length&&Ut.onActiveChange(Ze.children[0].key),ee.preventDefault();break}case Je.Z.ENTER:case Je.Z.SPACE:{xe&&!An.disabled&&An.checkable!==!1&&!An.disableCheckbox?Ut.onNodeCheck({},An,!ze.includes(pe)):!xe&&Ne&&!An.disabled&&An.selectable!==!1&&Ut.onNodeSelect({},An);break}}}yn==null||yn(ee)}),(0,Vt.Z)((0,ie.Z)(Ut),"setUncontrolledState",function(ee){var de=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,pe=arguments.length>2&&arguments[2]!==void 0?arguments[2]:null;if(!Ut.destroyed){var be=!1,ze=!0,rn={};Object.keys(ee).forEach(function(He){if(Ut.props.hasOwnProperty(He)){ze=!1;return}be=!0,rn[He]=ee[He]}),be&&(!de||ze)&&Ut.setState((0,ye.Z)((0,ye.Z)({},rn),pe))}}),(0,Vt.Z)((0,ie.Z)(Ut),"scrollTo",function(ee){Ut.listRef.current.scrollTo(ee)}),Ut}return(0,Rt.Z)(kt,[{key:"componentDidMount",value:function(){this.destroyed=!1,this.onUpdated()}},{key:"componentDidUpdate",value:function(){this.onUpdated()}},{key:"onUpdated",value:function(){var Oe=this.props,Te=Oe.activeKey,_e=Oe.itemScrollOffset,ee=_e===void 0?0:_e;Te!==void 0&&Te!==this.state.activeKey&&(this.setState({activeKey:Te}),Te!==null&&this.scrollTo({key:Te,offset:ee}))}},{key:"componentWillUnmount",value:function(){window.removeEventListener("dragend",this.onWindowDragEnd),this.destroyed=!0}},{key:"resetDragState",value:function(){this.setState({dragOverNodeKey:null,dropPosition:null,dropLevelOffset:null,dropTargetKey:null,dropContainerKey:null,dropTargetPos:null,dropAllowed:!1})}},{key:"render",value:function(){var Oe=this.state,Te=Oe.focused,_e=Oe.flattenNodes,ee=Oe.keyEntities,de=Oe.draggingNodeKey,pe=Oe.activeKey,be=Oe.dropLevelOffset,ze=Oe.dropContainerKey,rn=Oe.dropTargetKey,He=Oe.dropPosition,yn=Oe.dragOverNodeKey,xe=Oe.indent,Ne=this.props,Ze=Ne.prefixCls,Bn=Ne.className,le=Ne.style,An=Ne.showLine,Kn=Ne.focusable,yi=Ne.tabIndex,Xn=yi===void 0?0:yi,Ei=Ne.selectable,Yi=Ne.showIcon,Gi=Ne.icon,Hi=Ne.switcherIcon,Ki=Ne.draggable,Qi=Ne.checkable,ji=Ne.checkStrictly,Ai=Ne.disabled,Zi=Ne.motion,Pt=Ne.loadData,ni=Ne.filterTreeNode,Si=Ne.height,on=Ne.itemHeight,dn=Ne.scrollWidth,pn=Ne.virtual,_n=Ne.titleRender,Di=Ne.dropIndicatorRender,Bi=Ne.onContextMenu,me=Ne.onScroll,we=Ne.direction,ge=Ne.rootClassName,Wn=Ne.rootStyle,ai=(0,Nt.Z)(this.props,{aria:!0,data:!0}),si;Ki&&((0,se.Z)(Ki)==="object"?si=Ki:typeof Ki=="function"?si={nodeDraggable:Ki}:si={});var ln={prefixCls:Ze,selectable:Ei,showIcon:Yi,icon:Gi,switcherIcon:Hi,draggable:si,draggingNodeKey:de,checkable:Qi,checkStrictly:ji,disabled:Ai,keyEntities:ee,dropLevelOffset:be,dropContainerKey:ze,dropTargetKey:rn,dropPosition:He,dragOverNodeKey:yn,indent:xe,direction:we,dropIndicatorRender:Di,loadData:Pt,filterTreeNode:ni,titleRender:_n,onNodeClick:this.onNodeClick,onNodeDoubleClick:this.onNodeDoubleClick,onNodeExpand:this.onNodeExpand,onNodeSelect:this.onNodeSelect,onNodeCheck:this.onNodeCheck,onNodeLoad:this.onNodeLoad,onNodeMouseEnter:this.onNodeMouseEnter,onNodeMouseLeave:this.onNodeMouseLeave,onNodeContextMenu:this.onNodeContextMenu,onNodeDragStart:this.onNodeDragStart,onNodeDragEnter:this.onNodeDragEnter,onNodeDragOver:this.onNodeDragOver,onNodeDragLeave:this.onNodeDragLeave,onNodeDragEnd:this.onNodeDragEnd,onNodeDrop:this.onNodeDrop};return et.createElement(ct.k.Provider,{value:ln},et.createElement("div",{className:Qt()(Ze,Bn,ge,(0,Vt.Z)((0,Vt.Z)((0,Vt.Z)({},"".concat(Ze,"-show-line"),An),"".concat(Ze,"-focused"),Te),"".concat(Ze,"-active-focused"),pe!==null)),style:Wn},et.createElement(Pe,(0,Ft.Z)({ref:this.listRef,prefixCls:Ze,style:le,data:_e,disabled:Ai,selectable:Ei,checkable:!!Qi,motion:Zi,dragging:de!==null,height:Si,itemHeight:on,virtual:pn,focusable:Kn,focused:Te,tabIndex:Xn,activeItem:this.getActiveItem(),onFocus:this.onFocus,onBlur:this.onBlur,onKeyDown:this.onKeyDown,onActiveChange:this.onActiveChange,onListChangeStart:this.onListChangeStart,onListChangeEnd:this.onListChangeEnd,onContextMenu:Bi,onScroll:me,scrollWidth:dn},this.getTreeNodeRequiredProps(),ai))))}}],[{key:"getDerivedStateFromProps",value:function(Oe,Te){var _e=Te.prevProps,ee={prevProps:Oe};function de(Xn){return!_e&&Oe.hasOwnProperty(Xn)||_e&&_e[Xn]!==Oe[Xn]}var pe,be=Te.fieldNames;if(de("fieldNames")&&(be=(0,oe.w$)(Oe.fieldNames),ee.fieldNames=be),de("treeData")?pe=Oe.treeData:de("children")&&((0,nt.ZP)(!1,"`children` of Tree is deprecated. Please use `treeData` instead."),pe=(0,oe.zn)(Oe.children)),pe){ee.treeData=pe;var ze=(0,oe.I8)(pe,{fieldNames:be});ee.keyEntities=(0,ye.Z)((0,Vt.Z)({},jt,We),ze.keyEntities)}var rn=ee.keyEntities||Te.keyEntities;if(de("expandedKeys")||_e&&de("autoExpandParent"))ee.expandedKeys=Oe.autoExpandParent||!_e&&Oe.defaultExpandParent?(0,an.r7)(Oe.expandedKeys,rn):Oe.expandedKeys;else if(!_e&&Oe.defaultExpandAll){var He=(0,ye.Z)({},rn);delete He[jt];var yn=[];Object.keys(He).forEach(function(Xn){var Ei=He[Xn];Ei.children&&Ei.children.length&&yn.push(Ei.key)}),ee.expandedKeys=yn}else!_e&&Oe.defaultExpandedKeys&&(ee.expandedKeys=Oe.autoExpandParent||Oe.defaultExpandParent?(0,an.r7)(Oe.defaultExpandedKeys,rn):Oe.defaultExpandedKeys);if(ee.expandedKeys||delete ee.expandedKeys,pe||ee.expandedKeys){var xe=(0,oe.oH)(pe||Te.treeData,ee.expandedKeys||Te.expandedKeys,be);ee.flattenNodes=xe}if(Oe.selectable&&(de("selectedKeys")?ee.selectedKeys=(0,an.BT)(Oe.selectedKeys,Oe):!_e&&Oe.defaultSelectedKeys&&(ee.selectedKeys=(0,an.BT)(Oe.defaultSelectedKeys,Oe))),Oe.checkable){var Ne;if(de("checkedKeys")?Ne=(0,an.E6)(Oe.checkedKeys)||{}:!_e&&Oe.defaultCheckedKeys?Ne=(0,an.E6)(Oe.defaultCheckedKeys)||{}:pe&&(Ne=(0,an.E6)(Oe.checkedKeys)||{checkedKeys:Te.checkedKeys,halfCheckedKeys:Te.halfCheckedKeys}),Ne){var Ze=Ne,Bn=Ze.checkedKeys,le=Bn===void 0?[]:Bn,An=Ze.halfCheckedKeys,Kn=An===void 0?[]:An;if(!Oe.checkStrictly){var yi=(0,re.S)(le,!0,rn);le=yi.checkedKeys,Kn=yi.halfCheckedKeys}ee.checkedKeys=le,ee.halfCheckedKeys=Kn}}return de("loadedKeys")&&(ee.loadedKeys=Oe.loadedKeys),ee}}]),kt}(et.Component);(0,Vt.Z)(Tt,"defaultProps",{prefixCls:"rc-tree",showLine:!1,showIcon:!0,selectable:!0,multiple:!1,checkable:!1,disabled:!1,checkStrictly:!1,draggable:!1,defaultExpandParent:!0,autoExpandParent:!1,defaultExpandAll:!1,defaultExpandedKeys:[],defaultCheckedKeys:[],defaultSelectedKeys:[],dropIndicatorRender:pt,allowDrop:function(){return!0},expandAction:!1}),(0,Vt.Z)(Tt,"TreeNode",_t.Z);var Et=Tt,St=Et},82661:function(Tn,oi,Dt){"use strict";Dt.d(oi,{BT:function(){return et},E6:function(){return pt},L0:function(){return Vt},OM:function(){return nt},_5:function(){return ce},r7:function(){return vt},wA:function(){return Qt},yx:function(){return Qe}});var Ft=Dt(62730),se=Dt(28788),ye=Dt(48736),Be=Dt(59301),Se=Dt(639),Rt=Dt(65065),ie=Dt(34061),je=null;function ce(xt,Lt){if(!xt)return[];var Ot=xt.slice(),Ht=Ot.indexOf(Lt);return Ht>=0&&Ot.splice(Ht,1),Ot}function Vt(xt,Lt){var Ot=(xt||[]).slice();return Ot.indexOf(Lt)===-1&&Ot.push(Lt),Ot}function Qe(xt){return xt.split("-")}function Qt(xt,Lt){var Ot=[],Ht=(0,Rt.Z)(Lt,xt);function te(){var _t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[];_t.forEach(function(Xt){var ve=Xt.key,oe=Xt.children;Ot.push(ve),te(oe)})}return te(Ht.children),Ot}function Je(xt){if(xt.parent){var Lt=Qe(xt.pos);return Number(Lt[Lt.length-1])===xt.parent.children.length-1}return!1}function Nt(xt){var Lt=Qe(xt.pos);return Number(Lt[Lt.length-1])===0}function nt(xt,Lt,Ot,Ht,te,_t,Xt,ve,oe,Re){var Ye,en=xt.clientX,Rn=xt.clientY,wn=xt.target.getBoundingClientRect(),un=wn.top,vn=wn.height,ne=(Re==="rtl"?-1:1)*(((te==null?void 0:te.x)||0)-en),jt=(ne-12)/Ht,Fe=oe.filter(function(St){var Mt;return(Mt=ve[St])===null||Mt===void 0||(Mt=Mt.children)===null||Mt===void 0?void 0:Mt.length}),We=(0,Rt.Z)(ve,Ot.eventKey);if(Rn<un+vn/2){var Pn=Xt.findIndex(function(St){return St.key===We.key}),ke=Pn<=0?0:Pn-1,tn=Xt[ke].key;We=(0,Rt.Z)(ve,tn)}var fn=We.key,Jn=We,Pe=We.key,an=0,re=0;if(!Fe.includes(fn))for(var hn=0;hn<jt&&Je(We);hn+=1)We=We.parent,re+=1;var di=Lt.data,Tt=We.node,Et=!0;return Nt(We)&&We.level===0&&Rn<un+vn/2&&_t({dragNode:di,dropNode:Tt,dropPosition:-1})&&We.key===Ot.eventKey?an=-1:(Jn.children||[]).length&&Fe.includes(Pe)?_t({dragNode:di,dropNode:Tt,dropPosition:0})?an=0:Et=!1:re===0?jt>-1.5?_t({dragNode:di,dropNode:Tt,dropPosition:1})?an=1:Et=!1:_t({dragNode:di,dropNode:Tt,dropPosition:0})?an=0:_t({dragNode:di,dropNode:Tt,dropPosition:1})?an=1:Et=!1:_t({dragNode:di,dropNode:Tt,dropPosition:1})?an=1:Et=!1,{dropPosition:an,dropLevelOffset:re,dropTargetKey:We.key,dropTargetPos:We.pos,dragOverNodeKey:Pe,dropContainerKey:an===0?null:((Ye=We.parent)===null||Ye===void 0?void 0:Ye.key)||null,dropAllowed:Et}}function et(xt,Lt){if(xt){var Ot=Lt.multiple;return Ot?xt.slice():xt.length?[xt[0]]:xt}}var ct=function(Lt){return Lt};function lt(xt,Lt){if(!xt)return[];var Ot=Lt||{},Ht=Ot.processProps,te=Ht===void 0?ct:Ht,_t=Array.isArray(xt)?xt:[xt];return _t.map(function(Xt){var ve=Xt.children,oe=_objectWithoutProperties(Xt,je),Re=lt(ve,Lt);return React.createElement(TreeNode,_extends({key:oe.key},te(oe)),Re)})}function pt(xt){if(!xt)return null;var Lt;if(Array.isArray(xt))Lt={checkedKeys:xt,halfCheckedKeys:void 0};else if((0,se.Z)(xt)==="object")Lt={checkedKeys:xt.checked||void 0,halfCheckedKeys:xt.halfChecked||void 0};else return(0,ye.ZP)(!1,"`checkedKeys` is not an array or an object"),null;return Lt}function vt(xt,Lt){var Ot=new Set;function Ht(te){if(!Ot.has(te)){var _t=(0,Rt.Z)(Lt,te);if(_t){Ot.add(te);var Xt=_t.parent,ve=_t.node;ve.disabled||Xt&&Ht(Xt.key)}}}return(xt||[]).forEach(function(te){Ht(te)}),(0,Ft.Z)(Ot)}},34643:function(Tn,oi,Dt){"use strict";Dt.d(oi,{S:function(){return ie}});var Ft=Dt(48736),se=Dt(65065);function ye(je,ce){var Vt=new Set;return je.forEach(function(Qe){ce.has(Qe)||Vt.add(Qe)}),Vt}function Be(je){var ce=je||{},Vt=ce.disabled,Qe=ce.disableCheckbox,Qt=ce.checkable;return!!(Vt||Qe)||Qt===!1}function Se(je,ce,Vt,Qe){for(var Qt=new Set(je),Je=new Set,Nt=0;Nt<=Vt;Nt+=1){var nt=ce.get(Nt)||new Set;nt.forEach(function(pt){var vt=pt.key,xt=pt.node,Lt=pt.children,Ot=Lt===void 0?[]:Lt;Qt.has(vt)&&!Qe(xt)&&Ot.filter(function(Ht){return!Qe(Ht.node)}).forEach(function(Ht){Qt.add(Ht.key)})})}for(var et=new Set,ct=Vt;ct>=0;ct-=1){var lt=ce.get(ct)||new Set;lt.forEach(function(pt){var vt=pt.parent,xt=pt.node;if(!(Qe(xt)||!pt.parent||et.has(pt.parent.key))){if(Qe(pt.parent.node)){et.add(vt.key);return}var Lt=!0,Ot=!1;(vt.children||[]).filter(function(Ht){return!Qe(Ht.node)}).forEach(function(Ht){var te=Ht.key,_t=Qt.has(te);Lt&&!_t&&(Lt=!1),!Ot&&(_t||Je.has(te))&&(Ot=!0)}),Lt&&Qt.add(vt.key),Ot&&Je.add(vt.key),et.add(vt.key)}})}return{checkedKeys:Array.from(Qt),halfCheckedKeys:Array.from(ye(Je,Qt))}}function Rt(je,ce,Vt,Qe,Qt){for(var Je=new Set(je),Nt=new Set(ce),nt=0;nt<=Qe;nt+=1){var et=Vt.get(nt)||new Set;et.forEach(function(vt){var xt=vt.key,Lt=vt.node,Ot=vt.children,Ht=Ot===void 0?[]:Ot;!Je.has(xt)&&!Nt.has(xt)&&!Qt(Lt)&&Ht.filter(function(te){return!Qt(te.node)}).forEach(function(te){Je.delete(te.key)})})}Nt=new Set;for(var ct=new Set,lt=Qe;lt>=0;lt-=1){var pt=Vt.get(lt)||new Set;pt.forEach(function(vt){var xt=vt.parent,Lt=vt.node;if(!(Qt(Lt)||!vt.parent||ct.has(vt.parent.key))){if(Qt(vt.parent.node)){ct.add(xt.key);return}var Ot=!0,Ht=!1;(xt.children||[]).filter(function(te){return!Qt(te.node)}).forEach(function(te){var _t=te.key,Xt=Je.has(_t);Ot&&!Xt&&(Ot=!1),!Ht&&(Xt||Nt.has(_t))&&(Ht=!0)}),Ot||Je.delete(xt.key),Ht&&Nt.add(xt.key),ct.add(xt.key)}})}return{checkedKeys:Array.from(Je),halfCheckedKeys:Array.from(ye(Nt,Je))}}function ie(je,ce,Vt,Qe){var Qt=[],Je;Qe?Je=Qe:Je=Be;var Nt=new Set(je.filter(function(lt){var pt=!!(0,se.Z)(Vt,lt);return pt||Qt.push(lt),pt})),nt=new Map,et=0;Object.keys(Vt).forEach(function(lt){var pt=Vt[lt],vt=pt.level,xt=nt.get(vt);xt||(xt=new Set,nt.set(vt,xt)),xt.add(pt),et=Math.max(et,vt)}),(0,Ft.ZP)(!Qt.length,"Tree missing follow keys: ".concat(Qt.slice(0,100).map(function(lt){return"'".concat(lt,"'")}).join(", ")));var ct;return ce===!0?ct=Se(Nt,nt,et,Je):ct=Rt(Nt,ce.halfCheckedKeys,nt,et,Je),ct}},65065:function(Tn,oi,Dt){"use strict";Dt.d(oi,{Z:function(){return Ft}});function Ft(se,ye){return se[ye]}},34061:function(Tn,oi,Dt){"use strict";Dt.d(oi,{F:function(){return vt},H8:function(){return pt},I8:function(){return lt},km:function(){return Qt},oH:function(){return et},w$:function(){return Je},zn:function(){return nt}});var Ft=Dt(28788),se=Dt(62730),ye=Dt(89490),Be=Dt(39224),Se=Dt(11592),Rt=Dt(2738),ie=Dt(48736),je=Dt(65065),ce=["children"];function Vt(xt,Lt){return"".concat(xt,"-").concat(Lt)}function Qe(xt){return xt&&xt.type&&xt.type.isTreeNode}function Qt(xt,Lt){return xt!=null?xt:Lt}function Je(xt){var Lt=xt||{},Ot=Lt.title,Ht=Lt._title,te=Lt.key,_t=Lt.children,Xt=Ot||"title";return{title:Xt,_title:Ht||[Xt],key:te||"key",children:_t||"children"}}function Nt(xt,Lt){var Ot=new Map;function Ht(te){var _t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"";(te||[]).forEach(function(Xt){var ve=Xt[Lt.key],oe=Xt[Lt.children];warning(ve!=null,"Tree node must have a certain key: [".concat(_t).concat(ve,"]"));var Re=String(ve);warning(!Ot.has(Re)||ve===null||ve===void 0,"Same 'key' exist in the Tree: ".concat(Re)),Ot.set(Re,!0),Ht(oe,"".concat(_t).concat(Re," > "))})}Ht(xt)}function nt(xt){function Lt(Ot){var Ht=(0,Se.Z)(Ot);return Ht.map(function(te){if(!Qe(te))return(0,ie.ZP)(!te,"Tree/TreeNode can only accept TreeNode as children."),null;var _t=te.key,Xt=te.props,ve=Xt.children,oe=(0,Be.Z)(Xt,ce),Re=(0,ye.Z)({key:_t},oe),Ye=Lt(ve);return Ye.length&&(Re.children=Ye),Re}).filter(function(te){return te})}return Lt(xt)}function et(xt,Lt,Ot){var Ht=Je(Ot),te=Ht._title,_t=Ht.key,Xt=Ht.children,ve=new Set(Lt===!0?[]:Lt),oe=[];function Re(Ye){var en=arguments.length>1&&arguments[1]!==void 0?arguments[1]:null;return Ye.map(function(Rn,wn){for(var un=Vt(en?en.pos:"0",wn),vn=Qt(Rn[_t],un),ne,jt=0;jt<te.length;jt+=1){var Fe=te[jt];if(Rn[Fe]!==void 0){ne=Rn[Fe];break}}var We=Object.assign((0,Rt.Z)(Rn,[].concat((0,se.Z)(te),[_t,Xt])),{title:ne,key:vn,parent:en,pos:un,children:null,data:Rn,isStart:[].concat((0,se.Z)(en?en.isStart:[]),[wn===0]),isEnd:[].concat((0,se.Z)(en?en.isEnd:[]),[wn===Ye.length-1])});return oe.push(We),Lt===!0||ve.has(vn)?We.children=Re(Rn[Xt]||[],We):We.children=[],We})}return Re(xt),oe}function ct(xt,Lt,Ot){var Ht={};(0,Ft.Z)(Ot)==="object"?Ht=Ot:Ht={externalGetKey:Ot},Ht=Ht||{};var te=Ht,_t=te.childrenPropName,Xt=te.externalGetKey,ve=te.fieldNames,oe=Je(ve),Re=oe.key,Ye=oe.children,en=_t||Ye,Rn;Xt?typeof Xt=="string"?Rn=function(vn){return vn[Xt]}:typeof Xt=="function"&&(Rn=function(vn){return Xt(vn)}):Rn=function(vn,ne){return Qt(vn[Re],ne)};function wn(un,vn,ne,jt){var Fe=un?un[en]:xt,We=un?Vt(ne.pos,vn):"0",Pn=un?[].concat((0,se.Z)(jt),[un]):[];if(un){var ke=Rn(un,We),tn={node:un,index:vn,pos:We,key:ke,parentPos:ne.node?ne.pos:null,level:ne.level+1,nodes:Pn};Lt(tn)}Fe&&Fe.forEach(function(fn,Jn){wn(fn,Jn,{node:un,pos:We,level:ne?ne.level+1:-1},Pn)})}wn(null)}function lt(xt){var Lt=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},Ot=Lt.initWrapper,Ht=Lt.processEntity,te=Lt.onProcessFinished,_t=Lt.externalGetKey,Xt=Lt.childrenPropName,ve=Lt.fieldNames,oe=arguments.length>2?arguments[2]:void 0,Re=_t||oe,Ye={},en={},Rn={posEntities:Ye,keyEntities:en};return Ot&&(Rn=Ot(Rn)||Rn),ct(xt,function(wn){var un=wn.node,vn=wn.index,ne=wn.pos,jt=wn.key,Fe=wn.parentPos,We=wn.level,Pn=wn.nodes,ke={node:un,nodes:Pn,index:vn,key:jt,pos:ne,level:We},tn=Qt(jt,ne);Ye[ne]=ke,en[tn]=ke,ke.parent=Ye[Fe],ke.parent&&(ke.parent.children=ke.parent.children||[],ke.parent.children.push(ke)),Ht&&Ht(ke,Rn)},{externalGetKey:Re,childrenPropName:Xt,fieldNames:ve}),te&&te(Rn),Rn}function pt(xt,Lt){var Ot=Lt.expandedKeys,Ht=Lt.selectedKeys,te=Lt.loadedKeys,_t=Lt.loadingKeys,Xt=Lt.checkedKeys,ve=Lt.halfCheckedKeys,oe=Lt.dragOverNodeKey,Re=Lt.dropPosition,Ye=Lt.keyEntities,en=(0,je.Z)(Ye,xt),Rn={eventKey:xt,expanded:Ot.indexOf(xt)!==-1,selected:Ht.indexOf(xt)!==-1,loaded:te.indexOf(xt)!==-1,loading:_t.indexOf(xt)!==-1,checked:Xt.indexOf(xt)!==-1,halfChecked:ve.indexOf(xt)!==-1,pos:String(en?en.pos:""),dragOver:oe===xt&&Re===0,dragOverGapTop:oe===xt&&Re===-1,dragOverGapBottom:oe===xt&&Re===1};return Rn}function vt(xt){var Lt=xt.data,Ot=xt.expanded,Ht=xt.selected,te=xt.checked,_t=xt.loaded,Xt=xt.loading,ve=xt.halfChecked,oe=xt.dragOver,Re=xt.dragOverGapTop,Ye=xt.dragOverGapBottom,en=xt.pos,Rn=xt.active,wn=xt.eventKey,un=(0,ye.Z)((0,ye.Z)({},Lt),{},{expanded:Ot,selected:Ht,checked:te,loaded:_t,loading:Xt,halfChecked:ve,dragOver:oe,dragOverGapTop:Re,dragOverGapBottom:Ye,pos:en,active:Rn,key:wn});return"props"in un||Object.defineProperty(un,"props",{get:function(){return(0,ie.ZP)(!1,"Second param return from event is node data instead of TreeNode instance. Please read value directly instead of reading from `props`."),xt}}),un}},90472:function(Tn,oi,Dt){"use strict";Dt.d(oi,{Z:function(){return wn}});var Ft=Dt(71409),se=Dt(16552),ye=Dt(19210),Be=Dt(90264),Se=Dt(46654),Rt=Dt(37205),ie=Dt(87075),je=Dt(59301),ce=Dt(89490),Vt=Dt(39224),Qe=Dt(28788),Qt=Dt(58676),Je=Dt(93195),Nt=Dt(62730),nt=Dt(92310),et=Dt.n(nt),ct=Dt(26112),lt=Dt(48736),pt=function(un,vn){if(un&&vn){var ne=Array.isArray(vn)?vn:vn.split(","),jt=un.name||"",Fe=un.type||"",We=Fe.replace(/\/.*$/,"");return ne.some(function(Pn){var ke=Pn.trim();if(/^\*(\/\*)?$/.test(Pn))return!0;if(ke.charAt(0)==="."){var tn=jt.toLowerCase(),fn=ke.toLowerCase(),Jn=[fn];return(fn===".jpg"||fn===".jpeg")&&(Jn=[".jpg",".jpeg"]),Jn.some(function(Pe){return tn.endsWith(Pe)})}return/\/\*$/.test(ke)?We===ke.replace(/\/.*$/,""):Fe===ke?!0:/^\w+$/.test(ke)?((0,lt.ZP)(!1,"Upload takes an invalidate 'accept' type '".concat(ke,"'.Skip for check.")),!0):!1})}return!0};function vt(un,vn){var ne="cannot ".concat(un.method," ").concat(un.action," ").concat(vn.status,"'"),jt=new Error(ne);return jt.status=vn.status,jt.method=un.method,jt.url=un.action,jt}function xt(un){var vn=un.responseText||un.response;if(!vn)return vn;try{return JSON.parse(vn)}catch(ne){return vn}}function Lt(un){var vn=new XMLHttpRequest;un.onProgress&&vn.upload&&(vn.upload.onprogress=function(We){We.total>0&&(We.percent=We.loaded/We.total*100),un.onProgress(We)});var ne=new FormData;un.data&&Object.keys(un.data).forEach(function(Fe){var We=un.data[Fe];if(Array.isArray(We)){We.forEach(function(Pn){ne.append("".concat(Fe,"[]"),Pn)});return}ne.append(Fe,We)}),un.file instanceof Blob?ne.append(un.filename,un.file,un.file.name):ne.append(un.filename,un.file),vn.onerror=function(We){un.onError(We)},vn.onload=function(){return vn.status<200||vn.status>=300?un.onError(vt(un,vn),xt(vn)):un.onSuccess(xt(vn),vn)},vn.open(un.method,un.action,!0),un.withCredentials&&"withCredentials"in vn&&(vn.withCredentials=!0);var jt=un.headers||{};return jt["X-Requested-With"]!==null&&vn.setRequestHeader("X-Requested-With","XMLHttpRequest"),Object.keys(jt).forEach(function(Fe){jt[Fe]!==null&&vn.setRequestHeader(Fe,jt[Fe])}),vn.send(ne),{abort:function(){vn.abort()}}}var Ot=function(){var un=(0,Je.Z)((0,Qt.Z)().mark(function vn(ne,jt){var Fe,We,Pn,ke,tn,fn,Jn,Pe;return(0,Qt.Z)().wrap(function(re){for(;;)switch(re.prev=re.next){case 0:fn=function(){return fn=(0,Je.Z)((0,Qt.Z)().mark(function di(Tt){return(0,Qt.Z)().wrap(function(St){for(;;)switch(St.prev=St.next){case 0:return St.abrupt("return",new Promise(function(Mt){Tt.file(function(zt){jt(zt)?(Tt.fullPath&&!zt.webkitRelativePath&&(Object.defineProperties(zt,{webkitRelativePath:{writable:!0}}),zt.webkitRelativePath=Tt.fullPath.replace(/^\//,""),Object.defineProperties(zt,{webkitRelativePath:{writable:!1}})),Mt(zt)):Mt(null)})}));case 1:case"end":return St.stop()}},di)})),fn.apply(this,arguments)},tn=function(di){return fn.apply(this,arguments)},ke=function(){return ke=(0,Je.Z)((0,Qt.Z)().mark(function di(Tt){var Et,St,Mt,zt,kt;return(0,Qt.Z)().wrap(function(Oe){for(;;)switch(Oe.prev=Oe.next){case 0:Et=Tt.createReader(),St=[];case 2:return Oe.next=5,new Promise(function(Te){Et.readEntries(Te,function(){return Te([])})});case 5:if(Mt=Oe.sent,zt=Mt.length,zt){Oe.next=9;break}return Oe.abrupt("break",12);case 9:for(kt=0;kt<zt;kt++)St.push(Mt[kt]);Oe.next=2;break;case 12:return Oe.abrupt("return",St);case 13:case"end":return Oe.stop()}},di)})),ke.apply(this,arguments)},Pn=function(di){return ke.apply(this,arguments)},Fe=[],We=[],ne.forEach(function(hn){return We.push(hn.webkitGetAsEntry())}),Jn=function(){var hn=(0,Je.Z)((0,Qt.Z)().mark(function di(Tt,Et){var St,Mt;return(0,Qt.Z)().wrap(function(kt){for(;;)switch(kt.prev=kt.next){case 0:if(Tt){kt.next=2;break}return kt.abrupt("return");case 2:if(Tt.path=Et||"",!Tt.isFile){kt.next=10;break}return kt.next=6,tn(Tt);case 6:St=kt.sent,St&&Fe.push(St),kt.next=15;break;case 10:if(!Tt.isDirectory){kt.next=15;break}return kt.next=13,Pn(Tt);case 13:Mt=kt.sent,We.push.apply(We,(0,Nt.Z)(Mt));case 15:case"end":return kt.stop()}},di)}));return function(Tt,Et){return hn.apply(this,arguments)}}(),Pe=0;case 9:if(!(Pe<We.length)){re.next=15;break}return re.next=12,Jn(We[Pe]);case 12:Pe++,re.next=9;break;case 15:return re.abrupt("return",Fe);case 16:case"end":return re.stop()}},vn)}));return function(ne,jt){return un.apply(this,arguments)}}(),Ht=Ot,te=+new Date,_t=0;function Xt(){return"rc-upload-".concat(te,"-").concat(++_t)}var ve=["component","prefixCls","className","classNames","disabled","id","name","style","styles","multiple","accept","capture","children","directory","openFileDialogOnClick","onMouseEnter","onMouseLeave","hasControlInside"],oe=function(un){(0,Se.Z)(ne,un);var vn=(0,Rt.Z)(ne);function ne(){var jt;(0,se.Z)(this,ne);for(var Fe=arguments.length,We=new Array(Fe),Pn=0;Pn<Fe;Pn++)We[Pn]=arguments[Pn];return jt=vn.call.apply(vn,[this].concat(We)),(0,ie.Z)((0,Be.Z)(jt),"state",{uid:Xt()}),(0,ie.Z)((0,Be.Z)(jt),"reqs",{}),(0,ie.Z)((0,Be.Z)(jt),"fileInput",void 0),(0,ie.Z)((0,Be.Z)(jt),"_isMounted",void 0),(0,ie.Z)((0,Be.Z)(jt),"onChange",function(ke){var tn=jt.props,fn=tn.accept,Jn=tn.directory,Pe=ke.target.files,an=(0,Nt.Z)(Pe).filter(function(re){return!Jn||pt(re,fn)});jt.uploadFiles(an),jt.reset()}),(0,ie.Z)((0,Be.Z)(jt),"onClick",function(ke){var tn=jt.fileInput;if(tn){var fn=ke.target,Jn=jt.props.onClick;if(fn&&fn.tagName==="BUTTON"){var Pe=tn.parentNode;Pe.focus(),fn.blur()}tn.click(),Jn&&Jn(ke)}}),(0,ie.Z)((0,Be.Z)(jt),"onKeyDown",function(ke){ke.key==="Enter"&&jt.onClick(ke)}),(0,ie.Z)((0,Be.Z)(jt),"onFileDrop",function(){var ke=(0,Je.Z)((0,Qt.Z)().mark(function tn(fn){var Jn,Pe,an;return(0,Qt.Z)().wrap(function(hn){for(;;)switch(hn.prev=hn.next){case 0:if(Jn=jt.props.multiple,fn.preventDefault(),fn.type!=="dragover"){hn.next=4;break}return hn.abrupt("return");case 4:if(!jt.props.directory){hn.next=11;break}return hn.next=7,Ht(Array.prototype.slice.call(fn.dataTransfer.items),function(di){return pt(di,jt.props.accept)});case 7:Pe=hn.sent,jt.uploadFiles(Pe),hn.next=14;break;case 11:an=(0,Nt.Z)(fn.dataTransfer.files).filter(function(di){return pt(di,jt.props.accept)}),Jn===!1&&(an=an.slice(0,1)),jt.uploadFiles(an);case 14:case"end":return hn.stop()}},tn)}));return function(tn){return ke.apply(this,arguments)}}()),(0,ie.Z)((0,Be.Z)(jt),"uploadFiles",function(ke){var tn=(0,Nt.Z)(ke),fn=tn.map(function(Jn){return Jn.uid=Xt(),jt.processFile(Jn,tn)});Promise.all(fn).then(function(Jn){var Pe=jt.props.onBatchStart;Pe==null||Pe(Jn.map(function(an){var re=an.origin,hn=an.parsedFile;return{file:re,parsedFile:hn}})),Jn.filter(function(an){return an.parsedFile!==null}).forEach(function(an){jt.post(an)})})}),(0,ie.Z)((0,Be.Z)(jt),"processFile",function(){var ke=(0,Je.Z)((0,Qt.Z)().mark(function tn(fn,Jn){var Pe,an,re,hn,di,Tt,Et,St,Mt;return(0,Qt.Z)().wrap(function(kt){for(;;)switch(kt.prev=kt.next){case 0:if(Pe=jt.props.beforeUpload,an=fn,!Pe){kt.next=14;break}return kt.prev=3,kt.next=6,Pe(fn,Jn);case 6:an=kt.sent,kt.next=12;break;case 9:kt.prev=9,kt.t0=kt.catch(3),an=!1;case 12:if(an!==!1){kt.next=14;break}return kt.abrupt("return",{origin:fn,parsedFile:null,action:null,data:null});case 14:if(re=jt.props.action,typeof re!="function"){kt.next=21;break}return kt.next=18,re(fn);case 18:hn=kt.sent,kt.next=22;break;case 21:hn=re;case 22:if(di=jt.props.data,typeof di!="function"){kt.next=29;break}return kt.next=26,di(fn);case 26:Tt=kt.sent,kt.next=30;break;case 29:Tt=di;case 30:return Et=((0,Qe.Z)(an)==="object"||typeof an=="string")&&an?an:fn,Et instanceof File?St=Et:St=new File([Et],fn.name,{type:fn.type}),Mt=St,Mt.uid=fn.uid,kt.abrupt("return",{origin:fn,data:Tt,parsedFile:Mt,action:hn});case 35:case"end":return kt.stop()}},tn,null,[[3,9]])}));return function(tn,fn){return ke.apply(this,arguments)}}()),(0,ie.Z)((0,Be.Z)(jt),"saveFileInput",function(ke){jt.fileInput=ke}),jt}return(0,ye.Z)(ne,[{key:"componentDidMount",value:function(){this._isMounted=!0}},{key:"componentWillUnmount",value:function(){this._isMounted=!1,this.abort()}},{key:"post",value:function(Fe){var We=this,Pn=Fe.data,ke=Fe.origin,tn=Fe.action,fn=Fe.parsedFile;if(this._isMounted){var Jn=this.props,Pe=Jn.onStart,an=Jn.customRequest,re=Jn.name,hn=Jn.headers,di=Jn.withCredentials,Tt=Jn.method,Et=ke.uid,St=an||Lt,Mt={action:tn,filename:re,data:Pn,file:fn,headers:hn,withCredentials:di,method:Tt||"post",onProgress:function(kt){var Ut=We.props.onProgress;Ut==null||Ut(kt,fn)},onSuccess:function(kt,Ut){var Oe=We.props.onSuccess;Oe==null||Oe(kt,fn,Ut),delete We.reqs[Et]},onError:function(kt,Ut){var Oe=We.props.onError;Oe==null||Oe(kt,Ut,fn),delete We.reqs[Et]}};Pe(ke),this.reqs[Et]=St(Mt)}}},{key:"reset",value:function(){this.setState({uid:Xt()})}},{key:"abort",value:function(Fe){var We=this.reqs;if(Fe){var Pn=Fe.uid?Fe.uid:Fe;We[Pn]&&We[Pn].abort&&We[Pn].abort(),delete We[Pn]}else Object.keys(We).forEach(function(ke){We[ke]&&We[ke].abort&&We[ke].abort(),delete We[ke]})}},{key:"render",value:function(){var Fe=this.props,We=Fe.component,Pn=Fe.prefixCls,ke=Fe.className,tn=Fe.classNames,fn=tn===void 0?{}:tn,Jn=Fe.disabled,Pe=Fe.id,an=Fe.name,re=Fe.style,hn=Fe.styles,di=hn===void 0?{}:hn,Tt=Fe.multiple,Et=Fe.accept,St=Fe.capture,Mt=Fe.children,zt=Fe.directory,kt=Fe.openFileDialogOnClick,Ut=Fe.onMouseEnter,Oe=Fe.onMouseLeave,Te=Fe.hasControlInside,_e=(0,Vt.Z)(Fe,ve),ee=et()((0,ie.Z)((0,ie.Z)((0,ie.Z)({},Pn,!0),"".concat(Pn,"-disabled"),Jn),ke,ke)),de=zt?{directory:"directory",webkitdirectory:"webkitdirectory"}:{},pe=Jn?{}:{onClick:kt?this.onClick:function(){},onKeyDown:kt?this.onKeyDown:function(){},onMouseEnter:Ut,onMouseLeave:Oe,onDrop:this.onFileDrop,onDragOver:this.onFileDrop,tabIndex:Te?void 0:"0"};return je.createElement(We,(0,Ft.Z)({},pe,{className:ee,role:Te?void 0:"button",style:re}),je.createElement("input",(0,Ft.Z)({},(0,ct.Z)(_e,{aria:!0,data:!0}),{id:Pe,name:an,disabled:Jn,type:"file",ref:this.saveFileInput,onClick:function(ze){return ze.stopPropagation()},key:this.state.uid,style:(0,ce.Z)({display:"none"},di.input),className:fn.input,accept:Et},de,{multiple:Tt,onChange:this.onChange},St!=null?{capture:St}:{})),Mt)}}]),ne}(je.Component),Re=oe;function Ye(){}var en=function(un){(0,Se.Z)(ne,un);var vn=(0,Rt.Z)(ne);function ne(){var jt;(0,se.Z)(this,ne);for(var Fe=arguments.length,We=new Array(Fe),Pn=0;Pn<Fe;Pn++)We[Pn]=arguments[Pn];return jt=vn.call.apply(vn,[this].concat(We)),(0,ie.Z)((0,Be.Z)(jt),"uploader",void 0),(0,ie.Z)((0,Be.Z)(jt),"saveUploader",function(ke){jt.uploader=ke}),jt}return(0,ye.Z)(ne,[{key:"abort",value:function(Fe){this.uploader.abort(Fe)}},{key:"render",value:function(){return je.createElement(Re,(0,Ft.Z)({},this.props,{ref:this.saveUploader}))}}]),ne}(je.Component);(0,ie.Z)(en,"defaultProps",{component:"span",prefixCls:"rc-upload",data:{},headers:{},name:"file",multipart:!1,onStart:Ye,onError:Ye,onSuccess:Ye,multiple:!1,beforeUpload:null,customRequest:null,withCredentials:!1,openFileDialogOnClick:!0,hasControlInside:!1});var Rn=en,wn=Rn},8224:function(Tn,oi,Dt){"use strict";Dt.d(oi,{Z:function(){return se}});var Ft=Dt(4676);function se(ye,Be,Se,Rt){var ie=Ft.unstable_batchedUpdates?function(ce){Ft.unstable_batchedUpdates(Se,ce)}:Se;return ye!=null&&ye.addEventListener&&ye.addEventListener(Be,ie,Rt),{remove:function(){ye!=null&&ye.removeEventListener&&ye.removeEventListener(Be,ie,Rt)}}}},24514:function(Tn,oi,Dt){"use strict";Dt.d(oi,{G:function(){return Be}});var Ft=Dt(47273),se=function(Rt){if((0,Ft.Z)()&&window.document.documentElement){var ie=Array.isArray(Rt)?Rt:[Rt],je=window.document.documentElement;return ie.some(function(ce){return ce in je.style})}return!1},ye=function(Rt,ie){if(!se(Rt))return!1;var je=document.createElement("div"),ce=je.style[Rt];return je.style[Rt]=ie,je.style[Rt]!==ce};function Be(Se,Rt){return!Array.isArray(Se)&&Rt!==void 0?ye(Se,Rt):se(Se)}},65283:function(Tn,oi,Dt){"use strict";Dt.d(oi,{Z:function(){return di}});var Ft=Dt(71409),se=Dt(28788),ye=Dt(89490),Be=Dt(87075),Se=Dt(11036),Rt=Dt(39224),ie=Dt(92310),je=Dt.n(ie),ce=Dt(29301),Vt=Dt(70425),Qe=Dt(34280),Qt=Dt(59301),Je=Dt(4676),Nt=Qt.forwardRef(function(Tt,Et){var St=Tt.height,Mt=Tt.offsetY,zt=Tt.offsetX,kt=Tt.children,Ut=Tt.prefixCls,Oe=Tt.onInnerResize,Te=Tt.innerProps,_e=Tt.rtl,ee=Tt.extra,de={},pe={display:"flex",flexDirection:"column"};return Mt!==void 0&&(de={height:St,position:"relative",overflow:"hidden"},pe=(0,ye.Z)((0,ye.Z)({},pe),{},(0,Be.Z)((0,Be.Z)((0,Be.Z)((0,Be.Z)((0,Be.Z)({transform:"translateY(".concat(Mt,"px)")},_e?"marginRight":"marginLeft",-zt),"position","absolute"),"left",0),"right",0),"top",0))),Qt.createElement("div",{style:de},Qt.createElement(ce.Z,{onResize:function(ze){var rn=ze.offsetHeight;rn&&Oe&&Oe()}},Qt.createElement("div",(0,Ft.Z)({style:pe,className:je()((0,Be.Z)({},"".concat(Ut,"-holder-inner"),Ut)),ref:Et},Te),kt,ee)))});Nt.displayName="Filler";var nt=Nt;function et(Tt){var Et=Tt.children,St=Tt.setRef,Mt=Qt.useCallback(function(zt){St(zt)},[]);return Qt.cloneElement(Et,{ref:Mt})}function ct(Tt,Et,St,Mt,zt,kt,Ut,Oe){var Te=Oe.getKey;return Tt.slice(Et,St+1).map(function(_e,ee){var de=Et+ee,pe=Ut(_e,de,{style:{width:Mt},offsetX:zt}),be=Te(_e);return Qt.createElement(et,{key:be,setRef:function(rn){return kt(_e,rn)}},pe)})}function lt(Tt,Et,St,Mt){var zt=St-Tt,kt=Et-St,Ut=Math.min(zt,kt)*2;if(Mt<=Ut){var Oe=Math.floor(Mt/2);return Mt%2?St+Oe+1:St-Oe}return zt>kt?St-(Mt-kt):St+(Mt-zt)}function pt(Tt,Et,St){var Mt=Tt.length,zt=Et.length,kt,Ut;if(Mt===0&&zt===0)return null;Mt<zt?(kt=Tt,Ut=Et):(kt=Et,Ut=Tt);var Oe={__EMPTY_ITEM__:!0};function Te(ze){return ze!==void 0?St(ze):Oe}for(var _e=null,ee=Math.abs(Mt-zt)!==1,de=0;de<Ut.length;de+=1){var pe=Te(kt[de]),be=Te(Ut[de]);if(pe!==be){_e=de,ee=ee||pe!==Te(Ut[de+1]);break}}return _e===null?null:{index:_e,multiple:ee}}function vt(Tt,Et,St){var Mt=Qt.useState(Tt),zt=(0,Se.Z)(Mt,2),kt=zt[0],Ut=zt[1],Oe=Qt.useState(null),Te=(0,Se.Z)(Oe,2),_e=Te[0],ee=Te[1];return Qt.useEffect(function(){var de=pt(kt||[],Tt||[],Et);(de==null?void 0:de.index)!==void 0&&(St==null||St(de.index),ee(Tt[de.index])),Ut(Tt)},[Tt]),[_e]}var xt=Dt(16089),Lt=(typeof navigator=="undefined"?"undefined":(0,se.Z)(navigator))==="object"&&/Firefox/i.test(navigator.userAgent),Ot=Lt,Ht=function(Tt,Et,St,Mt){var zt=(0,Qt.useRef)(!1),kt=(0,Qt.useRef)(null);function Ut(){clearTimeout(kt.current),zt.current=!0,kt.current=setTimeout(function(){zt.current=!1},50)}var Oe=(0,Qt.useRef)({top:Tt,bottom:Et,left:St,right:Mt});return Oe.current.top=Tt,Oe.current.bottom=Et,Oe.current.left=St,Oe.current.right=Mt,function(Te,_e){var ee=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1,de=Te?_e<0&&Oe.current.left||_e>0&&Oe.current.right:_e<0&&Oe.current.top||_e>0&&Oe.current.bottom;return ee&&de?(clearTimeout(kt.current),zt.current=!1):(!de||zt.current)&&Ut(),!zt.current&&de}};function te(Tt,Et,St,Mt,zt,kt,Ut){var Oe=(0,Qt.useRef)(0),Te=(0,Qt.useRef)(null),_e=(0,Qt.useRef)(null),ee=(0,Qt.useRef)(!1),de=Ht(Et,St,Mt,zt);function pe(xe,Ne){if(xt.Z.cancel(Te.current),!de(!1,Ne)){var Ze=xe;if(!Ze._virtualHandled)Ze._virtualHandled=!0;else return;Oe.current+=Ne,_e.current=Ne,Ot||Ze.preventDefault(),Te.current=(0,xt.Z)(function(){var Bn=ee.current?10:1;Ut(Oe.current*Bn,!1),Oe.current=0})}}function be(xe,Ne){Ut(Ne,!0),Ot||xe.preventDefault()}var ze=(0,Qt.useRef)(null),rn=(0,Qt.useRef)(null);function He(xe){if(Tt){xt.Z.cancel(rn.current),rn.current=(0,xt.Z)(function(){ze.current=null},2);var Ne=xe.deltaX,Ze=xe.deltaY,Bn=xe.shiftKey,le=Ne,An=Ze;(ze.current==="sx"||!ze.current&&Bn&&Ze&&!Ne)&&(le=Ze,An=0,ze.current="sx");var Kn=Math.abs(le),yi=Math.abs(An);ze.current===null&&(ze.current=kt&&Kn>yi?"x":"y"),ze.current==="y"?pe(xe,An):be(xe,le)}}function yn(xe){Tt&&(ee.current=xe.detail===_e.current)}return[He,yn]}function _t(Tt,Et,St,Mt){var zt=Qt.useMemo(function(){return[new Map,[]]},[Tt,St.id,Mt]),kt=(0,Se.Z)(zt,2),Ut=kt[0],Oe=kt[1],Te=function(ee){var de=arguments.length>1&&arguments[1]!==void 0?arguments[1]:ee,pe=Ut.get(ee),be=Ut.get(de);if(pe===void 0||be===void 0)for(var ze=Tt.length,rn=Oe.length;rn<ze;rn+=1){var He,yn=Tt[rn],xe=Et(yn);Ut.set(xe,rn);var Ne=(He=St.get(xe))!==null&&He!==void 0?He:Mt;if(Oe[rn]=(Oe[rn-1]||0)+Ne,xe===ee&&(pe=rn),xe===de&&(be=rn),pe!==void 0&&be!==void 0)break}return{top:Oe[pe-1]||0,bottom:Oe[be]}};return Te}var Xt=Dt(16552),ve=Dt(19210),oe=function(){function Tt(){(0,Xt.Z)(this,Tt),(0,Be.Z)(this,"maps",void 0),(0,Be.Z)(this,"id",0),(0,Be.Z)(this,"diffRecords",new Map),this.maps=Object.create(null)}return(0,ve.Z)(Tt,[{key:"set",value:function(St,Mt){this.diffRecords.set(St,this.maps[St]),this.maps[St]=Mt,this.id+=1}},{key:"get",value:function(St){return this.maps[St]}},{key:"resetRecord",value:function(){this.diffRecords.clear()}},{key:"getRecord",value:function(){return this.diffRecords}}]),Tt}(),Re=oe;function Ye(Tt){var Et=parseFloat(Tt);return isNaN(Et)?0:Et}function en(Tt,Et,St){var Mt=Qt.useState(0),zt=(0,Se.Z)(Mt,2),kt=zt[0],Ut=zt[1],Oe=(0,Qt.useRef)(new Map),Te=(0,Qt.useRef)(new Re),_e=(0,Qt.useRef)(0);function ee(){_e.current+=1}function de(){var be=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!1;ee();var ze=function(){var yn=!1;Oe.current.forEach(function(xe,Ne){if(xe&&xe.offsetParent){var Ze=xe.offsetHeight,Bn=getComputedStyle(xe),le=Bn.marginTop,An=Bn.marginBottom,Kn=Ye(le),yi=Ye(An),Xn=Ze+Kn+yi;Te.current.get(Ne)!==Xn&&(Te.current.set(Ne,Xn),yn=!0)}}),yn&&Ut(function(xe){return xe+1})};if(be)ze();else{_e.current+=1;var rn=_e.current;Promise.resolve().then(function(){rn===_e.current&&ze()})}}function pe(be,ze){var rn=Tt(be),He=Oe.current.get(rn);ze?(Oe.current.set(rn,ze),de()):Oe.current.delete(rn),!He!=!ze&&(ze?Et==null||Et(be):St==null||St(be))}return(0,Qt.useEffect)(function(){return ee},[]),[pe,de,Te.current,kt]}var Rn=14/15;function wn(Tt,Et,St){var Mt=(0,Qt.useRef)(!1),zt=(0,Qt.useRef)(0),kt=(0,Qt.useRef)(0),Ut=(0,Qt.useRef)(null),Oe=(0,Qt.useRef)(null),Te,_e=function(be){if(Mt.current){var ze=Math.ceil(be.touches[0].pageX),rn=Math.ceil(be.touches[0].pageY),He=zt.current-ze,yn=kt.current-rn,xe=Math.abs(He)>Math.abs(yn);xe?zt.current=ze:kt.current=rn;var Ne=St(xe,xe?He:yn,!1,be);Ne&&be.preventDefault(),clearInterval(Oe.current),Ne&&(Oe.current=setInterval(function(){xe?He*=Rn:yn*=Rn;var Ze=Math.floor(xe?He:yn);(!St(xe,Ze,!0)||Math.abs(Ze)<=.1)&&clearInterval(Oe.current)},16))}},ee=function(){Mt.current=!1,Te()},de=function(be){Te(),be.touches.length===1&&!Mt.current&&(Mt.current=!0,zt.current=Math.ceil(be.touches[0].pageX),kt.current=Math.ceil(be.touches[0].pageY),Ut.current=be.target,Ut.current.addEventListener("touchmove",_e,{passive:!1}),Ut.current.addEventListener("touchend",ee,{passive:!0}))};Te=function(){Ut.current&&(Ut.current.removeEventListener("touchmove",_e),Ut.current.removeEventListener("touchend",ee))},(0,Qe.Z)(function(){return Tt&&Et.current.addEventListener("touchstart",de,{passive:!0}),function(){var pe;(pe=Et.current)===null||pe===void 0||pe.removeEventListener("touchstart",de),Te(),clearInterval(Oe.current)}},[Tt])}function un(Tt){return Math.floor(Math.pow(Tt,.5))}function vn(Tt,Et){var St="touches"in Tt?Tt.touches[0]:Tt;return St[Et?"pageX":"pageY"]-window[Et?"scrollX":"scrollY"]}function ne(Tt,Et,St){Qt.useEffect(function(){var Mt=Et.current;if(Tt&&Mt){var zt=!1,kt,Ut,Oe=function(){xt.Z.cancel(kt)},Te=function pe(){Oe(),kt=(0,xt.Z)(function(){St(Ut),pe()})},_e=function(be){if(!(be.target.draggable||be.button!==0)){var ze=be;ze._virtualHandled||(ze._virtualHandled=!0,zt=!0)}},ee=function(){zt=!1,Oe()},de=function(be){if(zt){var ze=vn(be,!1),rn=Mt.getBoundingClientRect(),He=rn.top,yn=rn.bottom;if(ze<=He){var xe=He-ze;Ut=-un(xe),Te()}else if(ze>=yn){var Ne=ze-yn;Ut=un(Ne),Te()}else Oe()}};return Mt.addEventListener("mousedown",_e),Mt.ownerDocument.addEventListener("mouseup",ee),Mt.ownerDocument.addEventListener("mousemove",de),function(){Mt.removeEventListener("mousedown",_e),Mt.ownerDocument.removeEventListener("mouseup",ee),Mt.ownerDocument.removeEventListener("mousemove",de),Oe()}}},[Tt])}var jt=10;function Fe(Tt,Et,St,Mt,zt,kt,Ut,Oe){var Te=Qt.useRef(),_e=Qt.useState(null),ee=(0,Se.Z)(_e,2),de=ee[0],pe=ee[1];return(0,Qe.Z)(function(){if(de&&de.times<jt){if(!Tt.current){pe(function(Zi){return(0,ye.Z)({},Zi)});return}kt();var be=de.targetAlign,ze=de.originAlign,rn=de.index,He=de.offset,yn=Tt.current.clientHeight,xe=!1,Ne=be,Ze=null;if(yn){for(var Bn=be||ze,le=0,An=0,Kn=0,yi=Math.min(Et.length-1,rn),Xn=0;Xn<=yi;Xn+=1){var Ei=zt(Et[Xn]);An=le;var Yi=St.get(Ei);Kn=An+(Yi===void 0?Mt:Yi),le=Kn}for(var Gi=Bn==="top"?He:yn-He,Hi=yi;Hi>=0;Hi-=1){var Ki=zt(Et[Hi]),Qi=St.get(Ki);if(Qi===void 0){xe=!0;break}if(Gi-=Qi,Gi<=0)break}switch(Bn){case"top":Ze=An-He;break;case"bottom":Ze=Kn-yn+He;break;default:{var ji=Tt.current.scrollTop,Ai=ji+yn;An<ji?Ne="top":Kn>Ai&&(Ne="bottom")}}Ze!==null&&Ut(Ze),Ze!==de.lastTop&&(xe=!0)}xe&&pe((0,ye.Z)((0,ye.Z)({},de),{},{times:de.times+1,targetAlign:Ne,lastTop:Ze}))}},[de,Tt.current]),function(be){if(be==null){Oe();return}if(xt.Z.cancel(Te.current),typeof be=="number")Ut(be);else if(be&&(0,se.Z)(be)==="object"){var ze,rn=be.align;"index"in be?ze=be.index:ze=Et.findIndex(function(xe){return zt(xe)===be.key});var He=be.offset,yn=He===void 0?0:He;pe({times:0,index:ze,offset:yn,originAlign:rn})}}}var We=Qt.forwardRef(function(Tt,Et){var St=Tt.prefixCls,Mt=Tt.rtl,zt=Tt.scrollOffset,kt=Tt.scrollRange,Ut=Tt.onStartMove,Oe=Tt.onStopMove,Te=Tt.onScroll,_e=Tt.horizontal,ee=Tt.spinSize,de=Tt.containerSize,pe=Tt.style,be=Tt.thumbStyle,ze=Tt.showScrollBar,rn=Qt.useState(!1),He=(0,Se.Z)(rn,2),yn=He[0],xe=He[1],Ne=Qt.useState(null),Ze=(0,Se.Z)(Ne,2),Bn=Ze[0],le=Ze[1],An=Qt.useState(null),Kn=(0,Se.Z)(An,2),yi=Kn[0],Xn=Kn[1],Ei=!Mt,Yi=Qt.useRef(),Gi=Qt.useRef(),Hi=Qt.useState(ze),Ki=(0,Se.Z)(Hi,2),Qi=Ki[0],ji=Ki[1],Ai=Qt.useRef(),Zi=function(){ze===!0||ze===!1||(clearTimeout(Ai.current),ji(!0),Ai.current=setTimeout(function(){ji(!1)},3e3))},Pt=kt-de||0,ni=de-ee||0,Si=Qt.useMemo(function(){if(zt===0||Pt===0)return 0;var ge=zt/Pt;return ge*ni},[zt,Pt,ni]),on=function(Wn){Wn.stopPropagation(),Wn.preventDefault()},dn=Qt.useRef({top:Si,dragging:yn,pageY:Bn,startTop:yi});dn.current={top:Si,dragging:yn,pageY:Bn,startTop:yi};var pn=function(Wn){xe(!0),le(vn(Wn,_e)),Xn(dn.current.top),Ut(),Wn.stopPropagation(),Wn.preventDefault()};Qt.useEffect(function(){var ge=function(ln){ln.preventDefault()},Wn=Yi.current,ai=Gi.current;return Wn.addEventListener("touchstart",ge,{passive:!1}),ai.addEventListener("touchstart",pn,{passive:!1}),function(){Wn.removeEventListener("touchstart",ge),ai.removeEventListener("touchstart",pn)}},[]);var _n=Qt.useRef();_n.current=Pt;var Di=Qt.useRef();Di.current=ni,Qt.useEffect(function(){if(yn){var ge,Wn=function(ln){var jn=dn.current,ii=jn.dragging,ki=jn.pageY,Ri=jn.startTop;xt.Z.cancel(ge);var Gt=Yi.current.getBoundingClientRect(),fe=de/(_e?Gt.width:Gt.height);if(ii){var Mn=(vn(ln,_e)-ki)*fe,zn=Ri;!Ei&&_e?zn-=Mn:zn+=Mn;var De=_n.current,kn=Di.current,Sn=kn?zn/kn:0,Fn=Math.ceil(Sn*De);Fn=Math.max(Fn,0),Fn=Math.min(Fn,De),ge=(0,xt.Z)(function(){Te(Fn,_e)})}},ai=function(){xe(!1),Oe()};return window.addEventListener("mousemove",Wn,{passive:!0}),window.addEventListener("touchmove",Wn,{passive:!0}),window.addEventListener("mouseup",ai,{passive:!0}),window.addEventListener("touchend",ai,{passive:!0}),function(){window.removeEventListener("mousemove",Wn),window.removeEventListener("touchmove",Wn),window.removeEventListener("mouseup",ai),window.removeEventListener("touchend",ai),xt.Z.cancel(ge)}}},[yn]),Qt.useEffect(function(){return Zi(),function(){clearTimeout(Ai.current)}},[zt]),Qt.useImperativeHandle(Et,function(){return{delayHidden:Zi}});var Bi="".concat(St,"-scrollbar"),me={position:"absolute",visibility:Qi?null:"hidden"},we={position:"absolute",background:"rgba(0, 0, 0, 0.5)",borderRadius:99,cursor:"pointer",userSelect:"none"};return _e?(me.height=8,me.left=0,me.right=0,me.bottom=0,we.height="100%",we.width=ee,Ei?we.left=Si:we.right=Si):(me.width=8,me.top=0,me.bottom=0,Ei?me.right=0:me.left=0,we.width="100%",we.height=ee,we.top=Si),Qt.createElement("div",{ref:Yi,className:je()(Bi,(0,Be.Z)((0,Be.Z)((0,Be.Z)({},"".concat(Bi,"-horizontal"),_e),"".concat(Bi,"-vertical"),!_e),"".concat(Bi,"-visible"),Qi)),style:(0,ye.Z)((0,ye.Z)({},me),pe),onMouseDown:on,onMouseMove:Zi},Qt.createElement("div",{ref:Gi,className:je()("".concat(Bi,"-thumb"),(0,Be.Z)({},"".concat(Bi,"-thumb-moving"),yn)),style:(0,ye.Z)((0,ye.Z)({},we),be),onMouseDown:pn}))}),Pn=We,ke=20;function tn(){var Tt=arguments.length>0&&arguments[0]!==void 0?arguments[0]:0,Et=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,St=Tt/Et*Tt;return isNaN(St)&&(St=0),St=Math.max(St,ke),Math.floor(St)}var fn=["prefixCls","className","height","itemHeight","fullHeight","style","data","children","itemKey","virtual","direction","scrollWidth","component","onScroll","onVirtualScroll","onVisibleChange","innerProps","extraRender","styles","showScrollBar"],Jn=[],Pe={overflowY:"auto",overflowAnchor:"none"};function an(Tt,Et){var St=Tt.prefixCls,Mt=St===void 0?"rc-virtual-list":St,zt=Tt.className,kt=Tt.height,Ut=Tt.itemHeight,Oe=Tt.fullHeight,Te=Oe===void 0?!0:Oe,_e=Tt.style,ee=Tt.data,de=Tt.children,pe=Tt.itemKey,be=Tt.virtual,ze=Tt.direction,rn=Tt.scrollWidth,He=Tt.component,yn=He===void 0?"div":He,xe=Tt.onScroll,Ne=Tt.onVirtualScroll,Ze=Tt.onVisibleChange,Bn=Tt.innerProps,le=Tt.extraRender,An=Tt.styles,Kn=Tt.showScrollBar,yi=Kn===void 0?"optional":Kn,Xn=(0,Rt.Z)(Tt,fn),Ei=Qt.useCallback(function(sn){return typeof pe=="function"?pe(sn):sn==null?void 0:sn[pe]},[pe]),Yi=en(Ei,null,null),Gi=(0,Se.Z)(Yi,4),Hi=Gi[0],Ki=Gi[1],Qi=Gi[2],ji=Gi[3],Ai=!!(be!==!1&&kt&&Ut),Zi=Qt.useMemo(function(){return Object.values(Qi.maps).reduce(function(sn,Dn){return sn+Dn},0)},[Qi.id,Qi.maps]),Pt=Ai&&ee&&(Math.max(Ut*ee.length,Zi)>kt||!!rn),ni=ze==="rtl",Si=je()(Mt,(0,Be.Z)({},"".concat(Mt,"-rtl"),ni),zt),on=ee||Jn,dn=(0,Qt.useRef)(),pn=(0,Qt.useRef)(),_n=(0,Qt.useRef)(),Di=(0,Qt.useState)(0),Bi=(0,Se.Z)(Di,2),me=Bi[0],we=Bi[1],ge=(0,Qt.useState)(0),Wn=(0,Se.Z)(ge,2),ai=Wn[0],si=Wn[1],ln=(0,Qt.useState)(!1),jn=(0,Se.Z)(ln,2),ii=jn[0],ki=jn[1],Ri=function(){ki(!0)},Gt=function(){ki(!1)},fe={getKey:Ei};function Mn(sn){we(function(Dn){var Gn;typeof sn=="function"?Gn=sn(Dn):Gn=sn;var Ln=Wi(Gn);return dn.current.scrollTop=Ln,Ln})}var zn=(0,Qt.useRef)({start:0,end:on.length}),De=(0,Qt.useRef)(),kn=vt(on,Ei),Sn=(0,Se.Z)(kn,1),Fn=Sn[0];De.current=Fn;var ei=Qt.useMemo(function(){if(!Ai)return{scrollHeight:void 0,start:0,end:on.length-1,offset:void 0};if(!Pt){var sn;return{scrollHeight:((sn=pn.current)===null||sn===void 0?void 0:sn.offsetHeight)||0,start:0,end:on.length-1,offset:void 0}}for(var Dn=0,Gn,Ln,Zn,Mi=on.length,hi=0;hi<Mi;hi+=1){var bn=on[hi],Ke=Ei(bn),qn=Qi.get(Ke),Ci=Dn+(qn===void 0?Ut:qn);Ci>=me&&Gn===void 0&&(Gn=hi,Ln=Dn),Ci>me+kt&&Zn===void 0&&(Zn=hi),Dn=Ci}return Gn===void 0&&(Gn=0,Ln=0,Zn=Math.ceil(kt/Ut)),Zn===void 0&&(Zn=on.length-1),Zn=Math.min(Zn+1,on.length-1),{scrollHeight:Dn,start:Gn,end:Zn,offset:Ln}},[Pt,Ai,me,on,ji,kt]),On=ei.scrollHeight,Qn=ei.start,Yn=ei.end,Ni=ei.offset;zn.current.start=Qn,zn.current.end=Yn,Qt.useLayoutEffect(function(){var sn=Qi.getRecord();if(sn.size===1){var Dn=Array.from(sn.keys())[0],Gn=sn.get(Dn),Ln=on[Qn];if(Ln&&Gn===void 0){var Zn=Ei(Ln);if(Zn===Dn){var Mi=Qi.get(Dn),hi=Mi-Ut;Mn(function(bn){return bn+hi})}}}Qi.resetRecord()},[On]);var Pi=Qt.useState({width:0,height:kt}),bi=(0,Se.Z)(Pi,2),Ge=bi[0],Xi=bi[1],dr=function(Dn){Xi({width:Dn.offsetWidth,height:Dn.offsetHeight})},br=(0,Qt.useRef)(),Ue=(0,Qt.useRef)(),Vn=Qt.useMemo(function(){return tn(Ge.width,rn)},[Ge.width,rn]),vi=Qt.useMemo(function(){return tn(Ge.height,On)},[Ge.height,On]),pi=On-kt,Fi=(0,Qt.useRef)(pi);Fi.current=pi;function Wi(sn){var Dn=sn;return Number.isNaN(Fi.current)||(Dn=Math.min(Dn,Fi.current)),Dn=Math.max(Dn,0),Dn}var Vi=me<=0,pr=me>=pi,or=ai<=0,hr=ai>=rn,Xe=Ht(Vi,pr,or,hr),nr=function(){return{x:ni?-ai:ai,y:me}},qe=(0,Qt.useRef)(nr()),xi=(0,Vt.zX)(function(sn){if(Ne){var Dn=(0,ye.Z)((0,ye.Z)({},nr()),sn);(qe.current.x!==Dn.x||qe.current.y!==Dn.y)&&(Ne(Dn),qe.current=Dn)}});function ir(sn,Dn){var Gn=sn;Dn?((0,Je.flushSync)(function(){si(Gn)}),xi()):Mn(Gn)}function fr(sn){var Dn=sn.currentTarget.scrollTop;Dn!==me&&Mn(Dn),xe==null||xe(sn),xi()}var Br=function(Dn){var Gn=Dn,Ln=rn?rn-Ge.width:0;return Gn=Math.max(Gn,0),Gn=Math.min(Gn,Ln),Gn},kr=(0,Vt.zX)(function(sn,Dn){Dn?((0,Je.flushSync)(function(){si(function(Gn){var Ln=Gn+(ni?-sn:sn);return Br(Ln)})}),xi()):Mn(function(Gn){var Ln=Gn+sn;return Ln})}),rr=te(Ai,Vi,pr,or,hr,!!rn,kr),Kr=(0,Se.Z)(rr,2),Ae=Kr[0],gn=Kr[1];wn(Ai,dn,function(sn,Dn,Gn,Ln){var Zn=Ln;return Xe(sn,Dn,Gn)?!1:!Zn||!Zn._virtualHandled?(Zn&&(Zn._virtualHandled=!0),Ae({preventDefault:function(){},deltaX:sn?Dn:0,deltaY:sn?0:Dn}),!0):!1}),ne(Pt,dn,function(sn){Mn(function(Dn){return Dn+sn})}),(0,Qe.Z)(function(){function sn(Gn){var Ln=Vi&&Gn.detail<0,Zn=pr&&Gn.detail>0;Ai&&!Ln&&!Zn&&Gn.preventDefault()}var Dn=dn.current;return Dn.addEventListener("wheel",Ae,{passive:!1}),Dn.addEventListener("DOMMouseScroll",gn,{passive:!0}),Dn.addEventListener("MozMousePixelScroll",sn,{passive:!1}),function(){Dn.removeEventListener("wheel",Ae),Dn.removeEventListener("DOMMouseScroll",gn),Dn.removeEventListener("MozMousePixelScroll",sn)}},[Ai,Vi,pr]),(0,Qe.Z)(function(){if(rn){var sn=Br(ai);si(sn),xi({x:sn})}},[Ge.width,rn]);var Me=function(){var Dn,Gn;(Dn=br.current)===null||Dn===void 0||Dn.delayHidden(),(Gn=Ue.current)===null||Gn===void 0||Gn.delayHidden()},At=Fe(dn,on,Qi,Ut,Ei,function(){return Ki(!0)},Mn,Me);Qt.useImperativeHandle(Et,function(){return{nativeElement:_n.current,getScrollInfo:nr,scrollTo:function(Dn){function Gn(Ln){return Ln&&(0,se.Z)(Ln)==="object"&&("left"in Ln||"top"in Ln)}Gn(Dn)?(Dn.left!==void 0&&si(Br(Dn.left)),At(Dn.top)):At(Dn)}}}),(0,Qe.Z)(function(){if(Ze){var sn=on.slice(Qn,Yn+1);Ze(sn,on)}},[Qn,Yn,on]);var Nn=_t(on,Ei,Qi,Ut),Hn=le==null?void 0:le({start:Qn,end:Yn,virtual:Pt,offsetX:ai,offsetY:Ni,rtl:ni,getSize:Nn}),gi=ct(on,Qn,Yn,rn,ai,Hi,de,fe),ci=null;kt&&(ci=(0,ye.Z)((0,Be.Z)({},Te?"height":"maxHeight",kt),Pe),Ai&&(ci.overflowY="hidden",rn&&(ci.overflowX="hidden"),ii&&(ci.pointerEvents="none")));var ti={};return ni&&(ti.dir="rtl"),Qt.createElement("div",(0,Ft.Z)({ref:_n,style:(0,ye.Z)((0,ye.Z)({},_e),{},{position:"relative"}),className:Si},ti,Xn),Qt.createElement(ce.Z,{onResize:dr},Qt.createElement(yn,{className:"".concat(Mt,"-holder"),style:ci,ref:dn,onScroll:fr,onMouseEnter:Me},Qt.createElement(nt,{prefixCls:Mt,height:On,offsetX:ai,offsetY:Ni,scrollWidth:rn,onInnerResize:Ki,ref:pn,innerProps:Bn,rtl:ni,extra:Hn},gi))),Pt&&On>kt&&Qt.createElement(Pn,{ref:br,prefixCls:Mt,scrollOffset:me,scrollRange:On,rtl:ni,onScroll:ir,onStartMove:Ri,onStopMove:Gt,spinSize:vi,containerSize:Ge.height,style:An==null?void 0:An.verticalScrollBar,thumbStyle:An==null?void 0:An.verticalScrollBarThumb,showScrollBar:yi}),Pt&&rn>Ge.width&&Qt.createElement(Pn,{ref:Ue,prefixCls:Mt,scrollOffset:ai,scrollRange:rn,rtl:ni,onScroll:ir,onStartMove:Ri,onStopMove:Gt,spinSize:Vn,containerSize:Ge.width,horizontal:!0,style:An==null?void 0:An.horizontalScrollBar,thumbStyle:An==null?void 0:An.horizontalScrollBarThumb,showScrollBar:yi}))}var re=Qt.forwardRef(an);re.displayName="List";var hn=re,di=hn},32637:function(Tn,oi,Dt){"use strict";Tn.exports=Dt.p+"static/AssistantCode3.a8740efb.jpeg"},93314:function(Tn){"use strict";Tn.exports="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAMwAAACaCAYAAADl9acYAAAAAXNSR0IArs4c6QAAIABJREFUeF7tXQd4U1Ubfs/NaJtO9kzLahFQEJkiUBBFUFFkCCjiAAVFERT5FREQQQXBBcpysWRP2RtkKRsEOphNodCZdDfjnv85CU2TZt2bhABNDw9PmtzvrO+c957xLQIP0pkz1yrQIEmwwcDzHhTj91klEo7jpcG5zetWUJdmRjmPvTM9GI9JgSGvadOoLE9KJJ5kPp2YXLtZdO1kT8ooz2vigCNelvPYezPEG7z0CDAn4pJqPvJA5A3vdcl/S3LEy3Iee29OeIOX5YDx3nh4VFI5YDxin6DM5YARxKb7g6gcMHd+nMoBc+d57LKGhCQ1ZURBCoVL2nKCO8sBZWW50x1TOWDuLP8FlV4OGEFs8glROWB8wmbPKikHjGf882bucsB4k5t3qKxywNwhxrpRbJkGTOx0ehlA3d9e5VEtzA3ulGe55zmg1QOfrCVo34BgQGvr5rLDRl4RRZG+5NjBESBc4FHw1LlrCAuPsCo0JjKi7J5hYqfTXADBq4byCJLf82Nf3kA3OfD9LgKdgeCzZ4CUTJ1VKQFyKQgpmeMSjiKvQC+oplspN/wOMDcBVFv0Bo+KwYJ4VE50H3Jg7j6CWzkEX74A3MrSgTfeKZpSaBCHcAVn/JunBHlFPDR5BkG9LMjPt7mZLOtbskQADea9wqOW9coqiGHlRPcHBxYcJriQQvB9P+v2cqCwWFxgoOJk6JeTNX4HmJMAHv6xP4/6VXw/+OxNx/bM/pIohdUE9VW/VxwjOHiJYO5A6xolpGSpYW3jIW4w/A8wM+h+UHSY2pvHgzV9NXymeor0wPc7Cf7XzWJ/4Nsm+Ly2LzZx+OwZ3yuVbzhNsPEMwcI3rM8wMikHiURi5gNbbQoKrc84zpjkj2eYzQC6f96DomUd305ctrp8tp5gSk/f1utzlFhUOHYthy9f8D1gdpwnWHiEYOVQ6zNM6QM/AY+CImHnF9YtfwTMCgB9P+5G0SHa9xP3bk2gT9cBU3r6Hjp95nBYNcz3gDlwkRhX843vlfS59PmFHfjFzgC/2pJ1nEEnEIpIAG+834Wia2Ox7PJ8wt0twLz7J8Gsl3zf316zCVYPsz5oe85F1yUcu0YwcQPBjlElZyjL8wsrQeyBn+XxK8DETqefgyACFCPe6kjxfDPfT6C7BpilBLMG+L6/A34h+P1VikCZ60nuTYpzN4AxqznjCqPOMZ1RSp9f2OVLYZH1lbOrNvjVlswIGEAKYOyrj1K82NL3E+huAWbEMnbFSn1+Qzd4AcE3fajPZV6X04D3lnHGM4xOawKFJwLLYiD5H2AoCkHwJQMLA42v090CzJjVBBN7UCh8rN3AgDrqCYq6lX3L6RQ1MGQRhwWvA7UrALbnFzCJjOhG+d2WjFCkUYKZPZpSDIv1PWDGrycY34NCahI0+yxN/Ivg3c4UlUN8VqWxok/XEfRrSdG0tm/rzcoHBv7KYc5AILqqLWDcOb/45RmGEFyhFL8/0Yga33y+Tl9uJhjxOEVIoG9rnrqVKSJSRFb0fb3tG1A81sC39TLRSu85HL57Eaii0Bm3oqEKqZXSJaUURUxTU0Tyuy0ZAc5SYCUbxE+6+x4w3+0kGNiWooqP3/Qz9xB0bUTRsLqI2eEFUlbvA9WBJxv5ltdMit9jFocpLwB1InQIkBEQTmLUHStOBoMBOr24K2+/AwwPHOKArS2iKCY9VzKIg34jyMgTv6f1wpwqL8JLHKgUTLHwjZIxZTKg0V2Bzg2tLzvYBYA75xe/25J1mkEnGAzYyXE40KQmMK23uLeLN8b1j0ME7epTxFTzRmnCy/jzXyCqIny+NVryDzFeKfd+xLcrDOMMO8MMfgx45iFrOZA7AstiTvvVoZ91usM3tClHcLpeZWDmAN8DZtlRgkY1KJr5+BC87hQQLAeebCwcZN6gXH6MgG2P+rfyDmD+WLoV8xZugkIRiNh2TTHghcfRoF4tFBZpkXgpGQ81rmdu9puLOLzwMPBYPR1Cgzw/v7CC/WpLxjrc/jtaT2LApRrhwC+DfA+Y9aeI0dKzbT3vTCChk3r7eaBABzzfTGgO79CtPUmM9b7U2jv9bf3kOyjSlihLcoSg93MdkZ2Th227j2Hoq8/inTeeNzZ+xFIOsTHAsw/pAeL5+cUvAdPuG1pVRnArQgEsGex7wGw7RxAgBTo19M4EEjqtD1wEkrPYm15oDu/QbfkPSM0hHsu8du0/gSnfLkFGVrbThjFLynULJ6FOZHUw2RNbyd/qUJLFHZV+ywr9aksWO4Ou0BK8KueRz/bVq++CUuD+RGbhB3R/0LeAOZEEnFIRvPGYb+vdGw+cvU7w3uOe1dv+mfeRk5svCMUfvz8AA3o9jgkbCJQVgPe7lGTz5MDvj4f+VXs/JH1ip1PmAkHy17u8z42bjl4lxjf9C809m0CCZo4FUVwKsDPOJLz0ZTp6Fdh6jtnWe1bvuCm/4q/tRwQ1/b03e2LIwGfw1RaCkADg425AOvPkYCHZd0cG43dbsk4zaDFgWHiHcG85wjBQoEhnMhAzf5r/Jihkf9/+fjXDtDXqGA108+Eqcy0DYAfwMU95NnEFzVgLovibwK8HCab19qze61s24Pf5K7A5KwB5vHM1CblMij9m/Q87rtc1jsek54CMPIBayGD0BgP0ImUw/gwYFiqjllhHGAcvAkuPcijU8cgv0KGgSGv8LNJqweu1MOh14A3ss+S78W+Dzuo3RsPoTy0YgIjQALFz0C36tBzg570EE3p4NnHFVn5TA0zaSPDzy57Vu2bIS6jF67BDHYBHgnVI0kow+6ZjLyZNm9RD+35jkZINfNO7ZIVhEn+e16NQ6157/OqWjJ1h9n1IXoydTi8AeGD+KzxqinCEsfkswfBJC2HQacXOG7v0B+e9CGXVUK+U5aoQdm5iE3eqh296R/XoDEBu0e3/hcz3FzF+Z292trI91Zgav7N2tKrDrrfFTdgTI4dAl61BipZDDXYINRCMvBrusNvBikAMHT8LTM3/pwElK4xMAuQV6uBuKK4yA5hEVfY8SvmmHCETGyjDtzqbQLHf0KMgaCnWEcaW/whGT1mAHHZP6oW09bueaFy3khdKcl0EO+y+v4xgphs2MWxbs+K46bLCDIoi6+9iVLKY4PbTp8UB5t8h/UB53qimz1aJA9lyLExz7H1vyMCnUa15L/x9EfhtkIk/nh74y9ShPz5JnUGA26qFZIdcTofWqR5xxd5Uip1O9wDoJNYRxs4LBB9PXYxUdaHrGSqAYuWUp9GmSQ0BlN4h8cTq8qVfOGgKStpBeAoJb4DEYPrPsU89b/5e/LvEYPubLCIQX06NEtWpfwa/yA4h0FEgqVCK71OCUeTARdLLfbpg9PAXsfGsBBtOA0uHmKpyV0PZsqFl5lo5QaXWgRqNw4pTHiEYGa2M+KX0yMROpxsA9BDrCGNvAsG4GcuQdMt45eJx+nXsk3iyNbOY9k161wOry8/GqZCr1t4GBA/O3T0Nm7gSDl/89IBRHiU0nRk3CgU3knEmT4pZN51rrjI5TN2oGmCOMP44BKx7B8jINemP8ZRCK2Y5LNXAMrMlS0hSpwKw9TRGME+XHf5ekybEfPCInU7/BDBArCOMw5cIPvt+JRJUGqHj7JRu2rsd0P+JGBuanELTTVpwwO3/cnjFxNcTwMz95hquxud5pd+skIEfR6NJA+F2y6o1S3Fj4xpj/X9lBmK7OsDuChMUKMf+v36AXC4Fc4QxYwew/X0gM8/k5VKvN0BvcF9gfc8CJuGWuh4twgoQnJSBzK+nDP+3eLTsBahJSNL8DdD29kaUAFsDSU4vpVJp3FTETqdzAbwl1hHGySSCCTPX41RimlcmzthBrTCsV1Obss5cJ2hWXQupTIoiHUW+1nRYZkcn5kRbTzlIOQq5hBmimfRu2RwoeU4gl5rAFiI3Odpmb/NRK0zXu+zgKzZtWZWK/VvTxWZzSP/EK5HoEivcxsFQWIBzk8caVxmWmMT+g6thNlfMg/p1xYfv9DXSMEcYEzYAu247wnBXQ9myE/fslixRpf6FUgw2N5bgDChmk6Lw33MMqkqlg8JeVKmn8hRjHI0QIdgbiJynGWhiZ9AZoPhgaEeK50Q4wmDCvwmzt+HwGe8EcH67V1N8MshWV4UBpnlNLQID3Lcn5nkKrZ6iUEex4azEqC08di0BW1XDgsTP+2NHsrH6F+/0m9Xetns1PN9b3IWHPi8XyetXIOPoEeg1WbhYKMGK9CCoiiSoWq0SnuvWzqhLVuyoz+wI411mmi3epZI9Lt2zgElIUht9INtpdDJPMUsSGf59NCFFxc8TknI6AoZ9LqbCmj+V4X33zMAEAOMHtaXoJ0KLVpUJjJuzD3v+vSh+xtnJ0ffxaMwY0dHuCtO8pg6BAcK3LI4axCTai/4hRsBM3kww5DGK6o5vYx32S52pw9QxbEi8k6o2DMeoj2q5VVhqNnB29JsI0TP5M6Dj5Gg7dwmkpVZOsyOMtyg4joDyBhRq3d+Osbru3S2ZSp0LCmf+9ZM5CUY3qBWx3LREUy5RpbkKQOl0FAimvrksPAME08Q6wmD74DGz/8H2A/+5NdClM8U2r4VFE7rZBcwjtXQIkHsOGLbSLP7XBJhvdxD0fJiinhs+pVk5n41IBM/UFryQSHggvpxRooovpsgdFwjoD8MQri3ZIso/XYzm9a2FwDfUAFPxX/AaRYSCeCR/KW7fvQuYJE0RQF3vSQh2UQn3bsOaYXEJSZrPADrJBfP5BceCVx+4LO0r1hGG3gC8//Np/LXrmJjxdUhbv1YE9vzU22eAmbOPBRmieNCNFzvP8/jhaxVSL3vn4M9zBJN/bgSZgJsyplZ0KQ24oSZgq8vmE4V4+9hrkNIS8O5uPhbNOz+CprWpWRhd7Ahj9svMYM871rT38pbM/q2XvelHoeU4bpxBgt+Jjr8MAqfi80NXZEW/H1UEuOMIY/zCRPyxZr9XABMSJMP5pbelahYlsjNMi1p6402Pp8lyhWEhIBpVp2hdV1yp6nwgPAhYvzQF/+zOEpfZCfXgz6LRIMrxKsq0B5YcKsL6UxRFvBygelBdLjhZGMCx/RfTKWMCUGZzbAClvJEmtiGH97oEGLdhzBHGjL4UDyvLOmBUmn9AaamAay7GimAXgdErzG1RlX36k9el+PlgsPFtK9YRxtwtNzBl7havTZoLywYhuJRbSCNgauvBlAg9TQYDjyVHOeOWbOVxoEoo0Mn2JttpNZvOcmhfn0KTXoTr8TlITSnCrRSt8TMvV7gj79KVPDskCo+1tb/rZkLScavzcTlTARBrZUu+MB1coHNHZ8rQXEzvH4T+8yWY9DzQrj6QptFDzzRlPUj37JbM5pZMeCfZK5CNgsPt3PlbEny3LwSlHWEIqWLzcTWGfbFaCKkgml0zeyNaaa3QdqcAs+msSa2k+4OCmmYm2nyWQ98W9idabo4eqSla3EopMn6m3mRgKkJ6KlM6dV5Plz418ES3CjZE7Ar9w2X5UGXbv3bmC1NBAiqBEOf34zFhKlzLq40PuxK0i8qFutBzRdd7FjDx1zSDCKELxA2tmZoyyztqqc9tUdDlDAm+2hUCdxxhHIwrwOAJy5EvIkSCsz78Nq4rnmhpfU/BANOytgEydwQmpSpjQro/b68we+JNArzej4jjKouz0q+luDwGAzWCxnI1Kr0qPfpEZTzXv6pVwUzf6+MVBTiX6vi+hxoKQfUF4AJswWZZGF+UCUN2IsYMaINnbcVd4jp0m/qePcNcvJlTldcaUm5vVN3qnKNM1zUcJm4LhTuOMP65qMWYGWtxJcU76jGT3nwUrz1j7ZnCCBilAbLS96RucIFJtv88ZpLD/HMZSEgFXmkrrqANp2yjEYsroYRar6f44I3zxh9qNwnH8FHWNxBLj2ix6F85SKltmGV9lBrAF6RConCuh8fotCn7MSC2Fob3ELkPddDBexYwrL2JSZqtFPQpdwfHUT7mf+zjTWFwxxHG8St6zPhtCw6cZXcSnqdhLzTF2FethZcMMK2UBki9DBgmbz18mYAJbMUk5shiYBsxORzT5ucZ8PHbcUaC4OpBGDe55AbiShqP9/40gHLOt058UZbxXMPJnQuUKK+DLi8DEs0R/PJBLIIVwjULHPXgnt2SsQbHq7JeIJSYFIi8mNgeeeT6cFRQAItFOsL4L5li0do9WLrLriK06FZ2e7QO5v3PwugcgDcBo9MbsPT2CnMxFcYwdiNFuMhlKjcs/J23AMMEoONHJhj5JA2T44tvS2TTo5cX4kKqY5X9YuYacq9CEhzlMngmr8uGQasFLUpDPcUV/DCiKwrcNBwrrvueBsyKFVTSvG32aQraRPRMdJKBWaa+vSrcqNAo1hEGsyD8Y/1R/LzmjFea1EBZAbtn9rIqywiYSB5Siecey3U6A5YeN23JmCCPORIcK8IWhV0ps1Wpj8hzjyPmsDPN5P+ZNCWInMOXPz9g/PtgohZfbpEZ3SE5TxSGXBUkIa61vPnCDLCzFEuGrOMY1q02Xunq2VS6p7dkrKOJ17N7UAPP1PG9moatCoOBJ9go0hEGe+P+vC4e3yw84JX2VAoLxMmFL9sApnUkD4kXAKPV6bHsuNQIGDb5p28nmCwixmZSJnA5jeCZh1x3NzfpKi7M/xlFGRmo0qoNqnfohPAG1mcH1dUCfDP+sqkwjuCreY2Mf478swiJGa6V3Az518EFVgHhXMu0DYUZ4G8Dhuqy0Sg0EfM+8myHf88DhjEzIUmzAaA9XA+ZcIqR60KRp+XgjiOM3Sdu4s0vtyAkSIrgQCmCg6QIYZ+BMuPf7Dfzs9vP2bPi34ICZTh2szJ6NM41HuyrV7f2G8tWmNZRPCSc5yuMJWCYGcjHawm+7Sv8DPPfdSBfS9C5oWveHhg+GFqNyfRBEhgIeWgY2kz7AZysRDh5KT4fP0y5vZ0lwBdzGoO9FwbOK4S6KMDpCkP1eaD6fCNghCSDNhe8zmTsVznrMD59XIGa7Wx194SUVUxzT2/JihuZmJJThWoNZ0HgNY/EH28MRUY+B7GOMFibcrJzkJuXB3Z1zXHc7U9ivNlh0mX2aXpm/7ekLA57E6R44zHm5slWAs0A0ybKpDDoaWLhHJafMK0wLIm1ujx0iYD56WgrQO3ryuplSN6xzajkqM83+RCr1aUrol95A5zUJIT971QO5n2bZPybXYRNntsYvx4guLJrL1qkbsD2moOQHP6wlUskRkt5PfiCm5AEC/exa9DmgNcVoVL2KQy59RsqhAQg6tPvwAU5U1F0zvH7AjCsC4mqnE6UGpitvsfSJ0IIHb8lmNzIlkCsIwxPJzDLf10NrDtJMNyBjzDvAkaH5SdkbgOGOf5oVAN4sKawnl+YOwspf+81EzPIh9VvgCbvfoDAKlVx9JAai+ZcNz4PVBBE9W+M07uPo9/laeBgknSeC22ObbVeQ06QCRzselivuQhZBNveCX+JGAoyEZEThyE3fkIYNa00yh69UPdF6y2wsJ6ZqO6LLZl5pUlW9wHFMkrh6mTokgdf7QzG5UwpxDrCcFmwAAImPPztIMHorva3RkbA1GEhGoRPDkfVMj/EVoARaabM2vliCxj9QQtJ1GDAtU3rcGPXDmjVWWDfWWJbtHp9BiCwRScU6KQICJRg4VEp4g8ex4tXvrFSpGT0JxXNsKraIEgVFaHLuQ5ZSE1wAeLsEioRFZ5PnAVlTok5hiQwCG1+mAupwr1V5r4CDGNkgkrzEij93Znqi5CB/XafAhduySDWEYaQsl3RFGiB6Tsce4NkgGlbx+WtqatqjM9ZlOAVJ0tWmPeWEvzYX3gYcOY9cuKzsLE1EVK5oagQJ7/4DDlXS67gZTVqI6dlXxwNaIXrJ06j75UZkFhoHbNyK7Zqh2E3usHAlCupDgFhtSAJEmdsxsqJqZSHevmJaHPoC6vm1nvpNdTu7t6R+L4DjAk06t7M+tKuDb+QkQTw00EFTl2XQawjDIHFOyVj6h+frSeY4uC2it1MRVXgIeUIpBLTWcjdxMJArDgpN2/JPlpF8PlzwoPDjl9v0vZ1N2k1apz+ehJyVaZzS3HimUMKIoWUWrusqtDqUTR46308/bUKekghU1QBkbq+PbPXPkNuEog8DAOS5+ABzVEzSWj9GDSf+JVbXbovAcNs+oODFYSjsp8oqCm2gcj06z9BOHJNbjTZ7RDt/oQQWa2ZXEw0ZWY1yYzYGdCYuj5L7AJNwgBlvHRgj3mjnfvtx0YlS/Zcp9dj6wU5nmpiysccdLMYm5UECr3HruHwQ3/P+KPLzcWZ6VOQfdG5xWbVzl0R9fJgEI7DjO0Eu85rQSTuH1lbV45HbmYSzl1OR+2im4g0ZEJpyETdAC26zpnv1tDdt4AptulPNJ1rplMKUY6uFh8PxL5LARDrCMMtLtvJJAYw3qqTlcOCw7JYLUoBwWHZWWvBIYJxz3jeAiZxv7R0AZJ3bIetdT1B7T4voebTPc0VMbe2G08Wur26sII+6JyD5x4JQU6+FkfOp+DA2es4fO4GsvO1qFk5BE3qVEaTupWNn9G1K0AmILT1fQ8YxhhKqfTi9ewBoPQjSiFAxAasOh2AbfGBRr0qMY4wPJ86phLuFmBm7ibo2oSioYAL+uPXgKvpBIMe9VavgctnE5C7fyuyz58Bc2oRVKMWaj7XBxVbWGuELjxMsOxIAYjUtaqMo9Z90CkHz7WwXkoNPMXZy2k4ePYGDvx3HVdSTHIjBqCVn7verJQJwBQzjKnzJyRlPcZJuJ6UxwsAHEoP/joXgA3nAiHWEYa3ps7dAgyTeTwSRdHcuecDYzdXHCN4oBrwaH3v9Fqr55GWmY2ICNe3XWtOEvyy17MVZmRsLnq2dH4bdv5qBt6Ytg3d29TDOAFvhjIFmNLDGp+c1UxCycs8xTu3jcrMJDvi5VhxOghiHWF4Z+rcvRXGGBy2EvCYABB8sZHggycpqoa6f+lgya/MXC20RUUIDXV9gGJueb/d5tkZ5r0OOejd2nldm/+5gkkLDuOzQe3QrY1r2+0yDZjiwbp4PUNJeelKSqlZSX3/ZRkWHVNArCMMbwFm/AaC8c9Qt65rPWkDCw7Lggw9YVLhcprWnCCoH5qKGmHUaC4tl8sgl0kgl7FPqWhdt6upuQiWc1AoXN96MSd849ez62/31YPeeSwHL7Z1DpixvxzA7hNJWP9lL1RmjgtcJL8ADOOBSkWDCqiGaQoYlYn+TZJh/hEF3HGE4YqpQp7/sC0PrzRPhYxPg9yQjmCkoTA/HUV5aZDq0wBZBQQ0my6kKFE028/BGODpOYHBYfPy8qDT6aDT6Y2flolpUxeDhznscAWkfxKzEFNDAbncteIk8xIzYinxSBj1VrtcvPSo4y0Zs0Z96qPVqFpBgcXjnhXEx/saMCZfZNmTQCjTmZCAEC0oUglPU3iOnDEYtCcb16nCrDaN6ZxKU1HK0xOEIOrMDSlmHnDPEYZLzhoKAW0aivLSQXRpCKRp4HTpKMxNAy1KN36XE+cRAHjKIb/pckhk7h967bXz70STao47wWHZ9bZebwJOMYDY38Zrb4vEtKwZeAKMq5IJSDKZFOuPpqFr8yqCNBjYDd3AXwwgnPu+2Qa3zccrjzleNY7G3cR7P+7G8+2jMWaAMH8r9zVg4pKynudA1jmawExnjKf8fwRkAwF+j46MuJSoyupEKdkdnyoh0/e65wjDUX1c3MdA3hUEEO+YL6fU+BwRNUQa07tAM7v5OpNM8LoXg8PqDXrotHrojUDSQafXgXmrKZ3i0uV4vKkwiT2TJ/WcqYWBBLp8PzkieK1NIV5r71iO8/2qE1i2O8542GeHfiHpvgbMRVX2RzzlpwnpKCGEOa76i5dynxCeTriaTvpP2RnqliMMhwC9MBaBBaeFNEcQTU7FvpDWeU0QrVCiCynA7jjHip9Cy3FFxxz/mVYi0//sPD2u5wWgXUOBSmkAXvtVj7R819s3R215ta0Orz/m2FVVnwkbkJyWa7xOZtfKQtJ9DZiEpKzXAfKbkI6W0JAiQrDyZjZ5adyWUM4dRxiO6qOqRVCkLRPXHCfUt2gjhLXw7jmGBYdl18Uf+Tg47K4LBCz0uZh6P1oJnL/p/qH/5dYGvNnBfv5rN7PRb9JGVAoLwoavrC1enQ3gfQ2YC1ey6kil3CV2lhE7S7MKuMIxf4UGuuMIw1FdhszjCLk6XmxTHNLrqRT5TVdAJnNfPaR04cbgsPsIJjzrmbqL2E4evgxsPy+uXubM7+Vfmbss9661X2lDMdhuABRgyc4LmLnmJGKbKfHlW8KNyu5rwLBBS0zSbKBuWGOyWCoj1rrnCMPRZNEX5SLk3ACmVih2PjmkV9WYiso1RHrec1I7i1HJ5Ct3Kjiso6rPXgeY9P6bPsKB2uSRWKSlZbjNy3FjhuOTD5kIzja9891OnEhMxVs9muHVbsL5e98DJu5ydkNOxh934enfhmPsUDl0ZRgCZUS0IwyHWzJmqPPfcATorrk9yKUzZld5DTKlKUCQNxLr98jlJhV/X6ZrmcBXmwnmDBReb2R0CxQWmiOaiG5uj+5dsOyPH23yMd2ybmNWg6nJfDv8cbRpLDzO6H0PGMaN2zYyi8Q6/Ru+Ogw6A8FfIh1hOBs5evE7KLJ3ih5cRxluSR5FWLNxXiuPFeRJ6D53G5KWC3y4gmDhG8IAw7Ssa9Vlpsrup8jaNXHh+A6bAnYcu4bPfjto/H3z1D4IZ5JcgalMAIb1NVGlHkwpmQ1QwRf3H6wPRU6Re44wHPHXcGMTQm7+LJD9rsnU+soIaO2ux1z75Yu163fdStcUuYXA6wsIVg4VBpjMLDUeaOrgAOK6OjNFcvwhVCiluzbh90PYdvQqqlcMxuovSjSkhRRbZgDDOnsxOaczpYaFlEKQp4Sxm0KQlidxyxGGI+Zqs+IRfuUDIbwXTJMWsxghIc79CAsu7C6Ndg0lAAAdVklEQVStMEws88Jsgg3DhQEmSXUdLdt55hLJuIKs/g2x7UvcdrJtWPcxq40q/h2bKfGViAM/K69MAYZ16NKlzHCDlHwBwr0FUKdr7efbQpCs8a4jjMKCfITHDQRH3d97l578qmqTUblWczGYcErLzjDT+/hej63HLA5r32YOCl135dyFeHTuahtsynVOa4qvPv8II4aVyLJOXUzFsG9NW+bXuz+EISK9lJc5wBSz69KNzEheLxlFQVnEIrvmUlN3B+NiuncdYWi1OsjjP0KQznvxIDVVh0Bem1kreCcZg8N2pwhzX4juVkN6zebwx+u8oHr/OXoCPXrZBpsSW/GAvj3wy6yvzdl+WnsKi3aYnKFPHtIBnZu79qBpWWeZBUxxJ69coYE6ae4zlOqfIyBPM59uxc++36/AuZvedYTBJNz6+OkIL3AVn1b40N8K6oawRu8Jz+CCcvImgiEdKKoLF7p7pe4B8zl8148XVO+uPQcwYNAwj+tt0iga/+4t0Z4a8MUms9HY0vE9ECnUHc7tlpR5wFhyfA+l0lqq7L4A/QlAhTmHgnA8We51Rxh5FxejcvZSjwe7uIAk/cOo0nqK18qbsYPghebUGO7Dl+n1Pzh89iwvqN71G7fhzbc/9Lh5LALCzr+PQVMkR2w0Na4u566m49J1tVElRqyDEb8CTDH3LyblPMhTw67fjwZVPXTV+44wspP2oVq6IBU3QRPiprYWwtvOE0QrhGj2PoKO0dSoR+fL9O5SDm/H8oLq/XP5Gowc7R2tic9/XIlNyU2wY5RH1gJGVvklYFjHL6k0Ty85EbhxV6KceNsRRuatS6h1fYTX5mK+IQR5TZcbDb+8kVhw2MY1KFrV8UZpwsv4ZC3BCw8LC0o7/7fF+HRCydnDWS1FOSmQh1S363aX5XtlxGTEBfbCxveAIMFCB/s1+i1gGDsGL9Cvvpgm6eVtRxgZGZmomTQYHNUKn01OKHlIcEG5AfWE+eB2WefKY0DVMCDWO0G5XNZXTMDOTu3qUzxuinDhNH0/cx6+nGYrpS+diflxLkhPgFRRGfIQ+wzq9OxA5DUei5VDgYruObw0V+vXgOn8LR3L85jibUcY6iw1KiV9CLnhpqt5Ieg5DxkOV16PRyKFyTBcFbrxDPNZJj44rKtyXT1nvsYaVqeC4k1OmfoDfpjl2ncYb9CiMOOS0edyUOVoEGM4cuvUuGkrBHdbgIVvALWs4++6arLNc78GTOx0yq6efvS2I4zs7ByEJY1HkNYUactZ4kkg9FwE9JIKMEgijH8bjN/Z36bftCQcudLaeKC6q9KEPd8dB2Tliw8OK6x0x1Q/7SWoGkrRt4XrksZN/Brzfl3skpB59S9IN13hy0KrQxZkK+ANCQ1Do7ePYO5AoIF1DFqX5Zcm8G/AfENfB8Fv3naEkZubi6CkbxCou2yc9CZARJgBwcCRVlgZV3KC0aSmAhwnQYBcYowHI5FIwIN9MjPfkt/shcUQPdq3Mxy5DLDwfQNFBod1t77ifMyxuVxCBdX7wZgJWLzUdXh3Zh7NtmSgPCQBIQgIt+8/qtmw3fj5zep4yDoGregu+TVgOk2nTNl8pbcdYeTnFyA9U2MMDhQYIIFcwoGTSGCgnHHLECTnIJVIMG2H1BjywtcCRBYc9shlgrdEBocVPbtKZVjyDwGLLyqk3mHvjsGa9ZtdV0k4FGZdBa/NM/JbUcX+wSy692z8PDoWAjwpOa3TvwEzjXajHLa0b0DxSXfvnA9cj3AJxfe7TG5bq4aKyeU5bWIqsOkswcguvu3zyuPE6IBDSL2DBr+Hrdv3uOxshVqNkZqwH7q8NCNtYKUG4CS2V2G1OozE7ClvoZOHFx3+DZjptD0F/m4RRTHpOd9OHja4c/cRdHuQGh3r+TKxScuMuXz9kmDRmM/dgKB6+wwYgv0HjrhkS6+Bb2PlbzNQpDbZILEtGdualU4VH3gaX0/92ii89HZSVpY7NQllzvOLfYG7W7d7Nqe3a/NGA1hR7WfQZhKKU0yAN62396wkhTKFyUPa1qVo6KXDvNB62YH/2x0EXzzv/cnjrA07zhPsT4SgepkeGdMnc5V++nE6Phz/PTITmEIlhSykOmQK24M/W3mmzV2Lpxp7f5z9BjCPT6P1DRwuetMRhqsBtnzOnFHEVAMeVvp24hbpmata4lHcFzH9LKZl8TJXn4Cgep98+kWcPmtSknSWVi/7BZNmrsc/G2eC1xVAqqgEeYjtVRjhpPji1wN49qE7x+uYyAi7C4E3XvA+XWFU6Vo1ABsP2MzJwvDlMnjTEYarAbZ8zrYoVUKBR+vduUF01J67YUR2OhmYs49g9suu+9uhy/OIT2DyFedpz/bVWLXtFL77/F3o8zMhCQxHQJh9nZ/RU5diYJc7p95QZgCTnKHLppTaHK3Zm3bwYhkqKIDFg72/VLsabLZFYbYhnRu6nkCuyhL7/G4AJuEWwKT9QsyUWz3WDdeSkl1268zR3ThwLgtDBzyFIo0KnDwYgRH2VfYrP/jCzKTdX3pPZ8ll60wE990Kk5yhi6OU2kSaZx5OBy2UIkDqPUcYAnloJDtwkSC7AHj6Dm4THK4wIoPDiumXI1pVJjBqBcGqYa5fEA+16IxbqaabL2cp+dJJ3MqRoGXL1si7cRKcNAiBFe2vIopqDZemn133kqsyvf38fgTMJkops4WxSUOWSFGoI9joRUcYQhl+SgUkZZK7EtBp3DpgsjhzdqHdckiXlQcMWcReTq4Bw+z5mV2/sxQcrMCVuH+NoQof7DwESf/+aTz4B1WyH8tDHl7zhDpxlwA9A4+7alXAfQcYVYb2V1C8YY8N7y6XQl1AsGoojyD3vZK6zWHm9siDmK9u13u3Mgrtb71GbZCbm+e0mbVq1cDJIyavMK99OAvrfp0IfVEOFJWj7earUKUG9mxZ45WuOzqv2Cv8vgNMcqZuCuXpWHudGb1GipvZxKuOMLwyIn5eSGSDR8AiQDtLDzZ+ALu3rTKSzPrzAMa//xK0OSlQVLHZfd8uhuDQ/p1QKDyPiFCmAaNK17KD3g/2mP/ZXxJcyeAw/xUeNT3UZPXzOe7V7tes2wx6vcFpme3btcaa5SbX2gfP56Dnk62NipiKqo7tB1at+BMPPdjE47a6kr1YVnD/rTAZ+r6U8ivscWnyVgnibnL4sT+P+l6yN/F4NMoLQLXIh2zizpRmy9PduuCP+ab3YE4h8OCjzyMzfrvDMwyjm/rVZPR8vofHHC7TgLmRpetoMFC7Ximm75TgVDJn1G96srHrw6jHnC4vQBAHqipd+zvu/2JP/Dhjsrm8zv0n4sSWHx3KYRjh0DcH44NRnt8sl2nApGTROnqD7oq9kZq1T4IjV0Q7/xc06OVE7nPg6DS2bXL+AqvW4hVEdvnEXEna2bW4uGY4pEGO99ZPPv4YZs3y3DNpmQYM42hyujaBAjbXJxvOcFhxggHGI+UD92dGeU67HDg6/SGAd36GqfHoMNTuULJaFGZexem5T4CTOL7ufCCmAf7dv0EQ11MyrWN6WmYq84C5lqEdyVF8J4hTlkQc+URZUSbMG4PowsVlSEhSO3zlBtm5+alR0UOPD+KaZ5fa0aQryM+3oi/d/ocfaYOCQudxQCeOHYUPRrxpLocZk8U0i8Wt1HSHLQ+Qy3Hj0jFjzE1Xya8Bw4IuJWfoFgJ42RWjip8TQlbVqijtbwz3dw8kfwJM23YdkaXWOOX6tMljMWzIQCuawW9/hJVrNznNt37Fr+jc8VGXI+rXgCnmjipT353w/Es80IIALDAIM56QMFBQSpmkLAUEJzmeX1qrSuBfLrnqQwJ/AkyXJ7sh+bo5ALZdLs+cPgmvDuxj9ezPFesxbETJucZexrfeeAnTv3QdQqTMAyY5TdeZEspcjdjXjfDm5Ka4REDerF1F5tos0Ev1+hNger7QGxfiLzrl3PyfpqJfb+sr4vSMTDR4qCOYy15HSVmrJs4ddx3Dp8wDRpWhvQQKYfGjvTGJCS4rK8nvPDhvt9WfADPwlUE4etx5ROpFv/6A55950mYkn+zxMv45etLpCB/esw5NGjm3Vy77gEnX+lyQIua2xFOM+hNghg8fjp17Djhl2aolc9C1i21A1x9//h3jJn3jNO+EsaPwocWFgT3isg+Y8hXGatzv51uyTz75GGvWb3E66Teu+h0dLYIlFRNfuapCs7bOgzG1a9MCW9ezKI+OU5kHTPkZxnrw72fAfP3VFPy+yK42k7mTOzf+idYt7cfB7PBkH6cmzsz/29ULhxAe5thlT5kHjOV0SUzKfp6CLwkMAnIjJjLcyo3bRZV6Kk8xxpyPIjsmqiQgYkKS5jpAzfauBFzP6Miw9Z5urdzN709bsjmzZ+K7mb84ZdWBnavR9MFGdmm+/XE+Jn7pXOy2cP536NnD8UrkX4BRaSZQSieauUnIphhl+LNWoFJpFlFKSy7yCYmLUYabRyBBpdkISp8pzkMImRitDP/c3QnvaT5/AsyyJQswYcq3Tll29O+NaBht/45HyLZs0Et9MOvbSQ7r8DfArKOUPm/BjSkxkRFWl++JKvUuSvF4CSCwO1oZ0aX4e0KSmmn2fWoBmPXRynAf2ymW9MCfALNt8zqMGD3BKWDOHt2BKKVj36+du/XD8VNnHZZRu2YNnD+xqxwwjAOJKvU1SlHiDYGgT4wywspZb8I19QUQlBhPULokJqqCecVJUKl7g8JkocS0zQiSopURUZ6uFO7m9yfA/HtoL14Z8r5TViWe2Y9qVR2HUftp7kJ84iLGjLNVqsysMKcTk2s3i67t0KXIheTsSlJK0yilJRqVFPVjoiIuW59z1Ew5q8T9EsE3McoI85km4Zq6HgjMvn4IIVRPSJVGtcMy3J30nuTzJ8AkXjiJZ3uXRD+2xzdV/BGEhzsO1JlyMxWNHnncqRDzmymfYuhg+9pS3gKMq/kqZE54pBp85sy1CjRIEmww2BfnKoKC23NEsrzk/IKc/PycRjzTzrudQoLCAi3BwH6mlH6eV5Bjjo3HEUIUitALoDBfpfDU0C+/IM+5gEAIB9ygCVGEXXeUrawpX2bcvIx2jzuPHJ167SQCA5yHZevR9w3s+9uxy9mnn+qMZQtYyFPb5Awwaek3BcUBkEg4jhQY8po2jcpyY8gtprAnuV3kTVCpPwKFOcgkIdgbrYzobJntokrTgKfUKjY4B/RvEBlRAjTT1m4Ppehk0fIxMcoI51KxO9Q3f1phaFEmHmhuNWQ2XNWknHMYpq+YePGytXhnpPkYalNGSEgwkuIOQyq11V721grjjeng0QrjqgGJKs0SSqmF/ynyfUxk+CjLfAlJWR0BYmWFKZVyHevVDPvbmk7zHUBHFv9GCPkzWhkuWOPZVVvFPPcnwFQI5lE1qrlD9jA1/bSkUy7Zl52TiwYPdkBhUZFD2u0blqBta9u6/AcwSZrzFNR8PcxR8mqDqHCm2m9O8Uma/gTUKjY4R0h0A2W4lcbfxWuaQTyhC8yAAbkQHRne2OVI3QECfwIME7pWr9sC+QUFdjkZFhqK5MR/BHH5taEfOtUa+GT0u/hk9Ds2ZfkFYG7coIo8gyabUpiDHUqItGl9ZYjV/WJikmYUBbW66A+RhgfXrEmsLJsuqXIfMlD9mZIVBoZgSXhYaTpBI+chkb8BpknLJ6BKvmGXa1WrVMbFs/sFcXT7rv3o8/Iwh7SO1GT8AjCJydmPUp4/ZMGdwmhleCghRG+11VKpp4HiI4vfNDGRETbG4JRSaaJKk8Ni9ZhBw3HtomuHHRY0Wl4kEgsYL1bt9aJcWVyyCnv1HYBz5+x78K9Zswb27NwqqF16gwGxnZ9Eerr9y01mffnv4QNQKIIElceIfKl0y+q7Y2eY+CTNOwS05NqDkKMxyvDWpTmRqNIsppRanEXIhRgHW60ElYb5I21VXAYFGd4wMtxzTwqCh8dE6G+AGfzW2zhwwPLdV8KwunXqYOtm4VpKX0+bjt//cKxs+cu8n9Gh/WOCR6TMACZRlT2PUr7E0Jtw82KUYUNLcyL+mno3ISi5hiFkV4wy/Al7HEtQZc8F5d8q2ZZx86OVYebvgrnsIaG/Aeaj/43Fhr/smxs3bBiDDWtXCubohbg49OzVzyH9kMGv46MPzXc7LsstO4BJ0hyloC3Nkxt4JzoyYnZpDiRcU8eBwOxTlFK6uGFUhVfscSoxSf02BcwrCgE5Fh0Zbl5xXHLXSwRiAXM/ayuztn88/mv8PM/qrsbMyRbNH8KeLVYSAJdcZnKd/87H26Vr3uxB7NtmrR1d5s8w7LxxUZWdQ0Etzhvk0eja4TaSq4Qko4cFs5iYI9y0Bsqw/9kFTLKmLeWp+cxCQAobKMNszkUuR8xDAn8DzLTv5mDy1B/tcq1d25bYus4+mByxedacBRg7cardxxzH4VrcYSt1/zIPmMuqzKZ6ylnatRpCpPlhNWvWtLr5unmTBmdrNbmWnCOUjIqOCv/eHjdv3LihyNUrspmzjOLnUsI3q6esaL498xALgrL7G2B+W7gcI8fYVw5/PPYxrFvO3DcIT2npGWj4cGfo9Vb3P+YCmMSfSf6LU5kHTPy17FcJ4f8o2Y6R89GR4Taepy+pNNEGShOsAYN+0VERDi2WEpM05yioWf5CKfdaw6gws3xG+LC5T+lvgNmwaQcGDravgNm9a2csX2hfpcUZh/u/+i42b9ttl2T40Ffx1eclm4wyD5jEJM131FoqvyRaGW7tuMqo7pIVSynZa8k1Cr5jw8iKVlJ+y+elb9UIyPfRpbQH3IeCsJz+BphDR46jW0+7x0qj4RczABObNm7ZhZdef89uNmaMxozS/GaFSVSp91KKWAtufBQTGTG9NHcuXtf05w3WUn4CNIiOjHAYhTQhST0agFmHjBDsi1ZGlOiYiR05N+j9DTDxiZfRqoOVzZ+Za/369MD8WfbPI85Yq9Pp0fDhTmDumEondo5hZssRtzWgy/QKw1T5L6o0WZbq+pTiiYZRETYWQolJ2R9Q8DMsGRakDFcoCbGvhwEg/pq6CyEwO7MigKaBMrwCU/l3Y+67lcXfAMNC9tVp1M4ur159uQ9mznBsLemMwWMnTMOsueaduxXp0j9m4ZluJpvCMg2YxCR1fQqY9cDYRA4MC6usDCc2r5KEJDVbKdiKUZzUMZERFZwxWaXSVCwE0i1tbFytSm6hwkkmR4Cxp9rPirnfr5WZM75KymYwGGw99Qr1XmmPnefjEtG2k6UxbgmV5TmmbAMmWd2H8jBLsgjBtWhlhN1wuglJmiWAlTbz+Rg7lwOlmZ2oUl+lFGaLS8Khb3TtCLNFprcBUro8fwMM6z/zYpmaZutc/L23X8eUCZaaTeK437l7Pxw/aWu+3Oyhxvh7h2lIyzZgktRTKGCOY0kI1kUrI+xaICUkqZl715LzB8WumKgIu1J+y2FIVKnXUgqzTT8BvoyOjHBsbCFuDF1SiwWMywLvIoEQXTLWvB49+yAhwcpsydjqYUOHYNT79g/vQrq1bPkqTPj8CxtSdo759/DfCA1lLrcdp/te0p+g0myCRWhx5jGmYVQFu5f4CSpNHCg1S/kJIYuileGDXDE6/lrWBOY5xkxHyOYYZbjZq4yr/J4+90fAvPbGWzh8xFaNf8S772D4OzYaT4JZnJubi/Ydu9gNqTF39kx0irX1qGlZuM8Bc+PGZa86k8jVVzwGwOwRQQLD4CCpxq5LkFxDxXOgCC5mAOEwO5jLdHnlUqAP72KA5FcLxqWHSDPNajiCR8tNwlx9xav2sjo6w9ymTeCobjTR3bpjQlaDvLbddjnrptAV5oPRH2PTZlsPmLVrVv1q7+bf57rJSmO2Zu36TM3LLzArmAVWqo+qD/dD96c6Y1T3CiASx/F1JNpku9t9T9rjLO8d01a+Uw0uL/fucCCoSqPvCYGN9JJS8n5B2nn7ejMCmxpUpUl7TsL9HRHdBVWbD0CYspXRNZA+Lz394IQq91SI4HLACBxUfydTVGs8FpROseUDHZafGufRCtNxOh1nyM+YKFVUMqs86fLSaW7y0U1n5j/teahlLw5eOWC8yMyyXJSiWqMhoLBRGiOUvpaXFueRalLsdPongAGMfwUZl6G4sARtcw4e/XrXNhv7qbvN43sCMGcSUyy1Asw8aRpdw+gcw9FzMcwrLktMnnLaEg4oqjV8DpSzsRSjPAYUpF9Y5gmvOs2gbXke069tm8A9l7enaYNQWXCAhKMNK4ZFdl6yxqHfO0/qdDfvPQEYdxtfns93HIj9xpBm0BVUpgYteH0ReL0W1FAEWXDl/w5+VvEhIS1JSbli98VYnLdGjbr7furWZVGYXDawYlAAgmTSMY8vXn1XXGk56k+ZBYw3ViV7TLvXVipXk1DIRHZGwyYxex47nf4LwJ6xXuK+0cR5CDERjdjzWs8IXsvdvJRTGDDt7HXt9QLtmIJbF34QUcQdJS2zgLmjXPPHwmu2UCj0+SxYr1XiCN8l91a8fT19kXwqBv9Xg975fuHZaw9reZN6YLWqlfYe2rGoRO4motxiwIvI4pS0HDDe4qSflDPrqS5aA6UyAtAR23dz3u52gyffH3vj9HYWrcE0Nyl0lCOjC255dnXtrXaWA8ZbnPSTcna/3PsyBa0LILPLkjWVvN3tyk2emp+fljTEVC5N43j0zU2Ps/KM6u06xZRXDhgx3Cqnxe6Xe12gYKFJSF6XJaudK3qJ5xdRVG3ETNvZJcI5nqPPFt6ME629IL5a4TnKNGAopfLkbIRIDAgBj2BQnUJPiUIqQRD7JNSgAIgCBIGUkkCOIIAHH0gIFwBKAkH5QEogJwRyUCKn4OWEcDJCIQeBnFLIACoFAfOgLQX7TnH7O5UCHAdQCQjhQKkEIKbvAGf8m4DAFAqEEGIcCnLbbMH4m3FDAtDbtj70dtADCmb7w/6B8gB4gBiMfxNiAGW/se8sogLRg0IPYvyvA2D6DqIn7DuFlhJoKeV1BJwWhGophZZQaEG4QhBaSClfxIEr/HbR1mZrli2unp/8X6tcHW92bhJdv/6cLRvW/AIiyweHPIMEubXDkEsI0QqfhibK4KqNXqEA86hxOF9X1B1Zl5mDlHsq3dOASU2lIQYZKuv0usrgSCUJIRUBvgLlSQVKEMGBhPOgEaB8OEDCKBBGYAyJEUKBEAI2ocuTOxw4dfoMzp0/j/j4RJw5+x/i4uJZGBKbotq0boWFf9jGwKSAjgDMwUkuBXIIkA3QbBBOw4GoeVANoVATjmYBXJaB0syWrR79SSaX33rhuef7zpr2P/u+ad3pjBfz3BXAUEq5lCzUNhj0dQmhUQBRArQWBalBCGoAtBqlqAZAuM9QLzKlvCjgzaHDceCgydslc+Eqk8nNoSiYIRn7r9PpUCEiAn/vMxvAepN1BYTgFkBuUYoUApoCEBYcWEUpuSaRSK/UqIBkQghbZX2W7jhgKKWylCx9WwOPdoTQhylIE0IRbemzzGe9La+oTHGA+aWjBIkE9Byl5JSEw6EaFaRHCCFs+3lH0h0FTHK6bjIFhoNtm8pTOQd8wgGiJsBPtSvLrAIPe6vqOw8YguGg5YDx1oCVl+OCA4SoCb1PAcO6Zt6SAe0IpQ9TigcBRANwHhSxfGaUc8A1B1g4s0RC8B8l5JQE9/mWzFF/iw/9hOjrGkCiYKDmQz9AaxKCqpSSagAtP/S7njRllIIUEELZgT+VgqZwIDeMh34JUUlAr1FaRg/9noxm8bUy1esq6+1cK5vORiS8/FrZEy7fmbzOrpUBqgGImhCoCUqulaU8zSBSWbpEh/SqVYmVz+0700rxpd7RM4z45ng3hz3BJSREoadQSDkSZKBQgPIKUAeCS8IHMiElE16aBZeAnICTWQouCYHUJMQ0Ci9vCy6JlIJKOJOAkqNMcGkrwCTMFJdYCCwtBZilBZbsO5NWwiQPoaUFlsQouGQSS8oTkzCzRHAJGIWVtLTgEryOAtpiwSUTWjJhJqi14JKnKCKEFoKgEITLlxDk63laICXIh4Hme0Nw6d3RvzOl/R8AdGoXzom1qQAAAABJRU5ErkJggg=="},96908:function(Tn){"use strict";Tn.exports="data:image/png;base64,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"},57177:function(Tn){"use strict";Tn.exports="data:image/png;base64,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"},81378:function(Tn){"use strict";Tn.exports="data:image/png;base64,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"},26356:function(Tn,oi,Dt){"use strict";Dt.d(oi,{Z:function(){return se}});var Ft=Dt(39787);function se(ye,Be){var Se=typeof Symbol!="undefined"&&ye[Symbol.iterator]||ye["@@iterator"];if(!Se){if(Array.isArray(ye)||(Se=(0,Ft.Z)(ye))||Be&&ye&&typeof ye.length=="number"){Se&&(ye=Se);var Rt=0,ie=function(){};return{s:ie,n:function(){return Rt>=ye.length?{done:!0}:{done:!1,value:ye[Rt++]}},e:function(Qt){throw Qt},f:ie}}throw new TypeError(`Invalid attempt to iterate non-iterable instance.
|
|
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}var je,ce=!0,Vt=!1;return{s:function(){Se=Se.call(ye)},n:function(){var Qt=Se.next();return ce=Qt.done,Qt},e:function(Qt){Vt=!0,je=Qt},f:function(){try{ce||Se.return==null||Se.return()}finally{if(Vt)throw je}}}}},16722:function(Tn,oi,Dt){"use strict";Dt.d(oi,{Z:function(){return je}});const Ft=ce=>typeof ce=="object"&&ce!=null&&ce.nodeType===1,se=(ce,Vt)=>(!Vt||ce!=="hidden")&&ce!=="visible"&&ce!=="clip",ye=(ce,Vt)=>{if(ce.clientHeight<ce.scrollHeight||ce.clientWidth<ce.scrollWidth){const Qe=getComputedStyle(ce,null);return se(Qe.overflowY,Vt)||se(Qe.overflowX,Vt)||(Qt=>{const Je=(Nt=>{if(!Nt.ownerDocument||!Nt.ownerDocument.defaultView)return null;try{return Nt.ownerDocument.defaultView.frameElement}catch(nt){return null}})(Qt);return!!Je&&(Je.clientHeight<Qt.scrollHeight||Je.clientWidth<Qt.scrollWidth)})(ce)}return!1},Be=(ce,Vt,Qe,Qt,Je,Nt,nt,et)=>Nt<ce&&nt>Vt||Nt>ce&&nt<Vt?0:Nt<=ce&&et<=Qe||nt>=Vt&&et>=Qe?Nt-ce-Qt:nt>Vt&&et<Qe||Nt<ce&&et>Qe?nt-Vt+Je:0,Se=ce=>{const Vt=ce.parentElement;return Vt==null?ce.getRootNode().host||null:Vt},Rt=(ce,Vt)=>{var Qe,Qt,Je,Nt;if(typeof document=="undefined")return[];const{scrollMode:nt,block:et,inline:ct,boundary:lt,skipOverflowHiddenElements:pt}=Vt,vt=typeof lt=="function"?lt:Pn=>Pn!==lt;if(!Ft(ce))throw new TypeError("Invalid target");const xt=document.scrollingElement||document.documentElement,Lt=[];let Ot=ce;for(;Ft(Ot)&&vt(Ot);){if(Ot=Se(Ot),Ot===xt){Lt.push(Ot);break}Ot!=null&&Ot===document.body&&ye(Ot)&&!ye(document.documentElement)||Ot!=null&&ye(Ot,pt)&&Lt.push(Ot)}const Ht=(Qt=(Qe=window.visualViewport)==null?void 0:Qe.width)!=null?Qt:innerWidth,te=(Nt=(Je=window.visualViewport)==null?void 0:Je.height)!=null?Nt:innerHeight,{scrollX:_t,scrollY:Xt}=window,{height:ve,width:oe,top:Re,right:Ye,bottom:en,left:Rn}=ce.getBoundingClientRect(),{top:wn,right:un,bottom:vn,left:ne}=(Pn=>{const ke=window.getComputedStyle(Pn);return{top:parseFloat(ke.scrollMarginTop)||0,right:parseFloat(ke.scrollMarginRight)||0,bottom:parseFloat(ke.scrollMarginBottom)||0,left:parseFloat(ke.scrollMarginLeft)||0}})(ce);let jt=et==="start"||et==="nearest"?Re-wn:et==="end"?en+vn:Re+ve/2-wn+vn,Fe=ct==="center"?Rn+oe/2-ne+un:ct==="end"?Ye+un:Rn-ne;const We=[];for(let Pn=0;Pn<Lt.length;Pn++){const ke=Lt[Pn],{height:tn,width:fn,top:Jn,right:Pe,bottom:an,left:re}=ke.getBoundingClientRect();if(nt==="if-needed"&&Re>=0&&Rn>=0&&en<=te&&Ye<=Ht&&(ke===xt&&!ye(ke)||Re>=Jn&&en<=an&&Rn>=re&&Ye<=Pe))return We;const hn=getComputedStyle(ke),di=parseInt(hn.borderLeftWidth,10),Tt=parseInt(hn.borderTopWidth,10),Et=parseInt(hn.borderRightWidth,10),St=parseInt(hn.borderBottomWidth,10);let Mt=0,zt=0;const kt="offsetWidth"in ke?ke.offsetWidth-ke.clientWidth-di-Et:0,Ut="offsetHeight"in ke?ke.offsetHeight-ke.clientHeight-Tt-St:0,Oe="offsetWidth"in ke?ke.offsetWidth===0?0:fn/ke.offsetWidth:0,Te="offsetHeight"in ke?ke.offsetHeight===0?0:tn/ke.offsetHeight:0;if(xt===ke)Mt=et==="start"?jt:et==="end"?jt-te:et==="nearest"?Be(Xt,Xt+te,te,Tt,St,Xt+jt,Xt+jt+ve,ve):jt-te/2,zt=ct==="start"?Fe:ct==="center"?Fe-Ht/2:ct==="end"?Fe-Ht:Be(_t,_t+Ht,Ht,di,Et,_t+Fe,_t+Fe+oe,oe),Mt=Math.max(0,Mt+Xt),zt=Math.max(0,zt+_t);else{Mt=et==="start"?jt-Jn-Tt:et==="end"?jt-an+St+Ut:et==="nearest"?Be(Jn,an,tn,Tt,St+Ut,jt,jt+ve,ve):jt-(Jn+tn/2)+Ut/2,zt=ct==="start"?Fe-re-di:ct==="center"?Fe-(re+fn/2)+kt/2:ct==="end"?Fe-Pe+Et+kt:Be(re,Pe,fn,di,Et+kt,Fe,Fe+oe,oe);const{scrollLeft:_e,scrollTop:ee}=ke;Mt=Te===0?0:Math.max(0,Math.min(ee+Mt/Te,ke.scrollHeight-tn/Te+Ut)),zt=Oe===0?0:Math.max(0,Math.min(_e+zt/Oe,ke.scrollWidth-fn/Oe+kt)),jt+=ee-Mt,Fe+=_e-zt}We.push({el:ke,top:Mt,left:zt})}return We},ie=ce=>ce===!1?{block:"end",inline:"nearest"}:(Vt=>Vt===Object(Vt)&&Object.keys(Vt).length!==0)(ce)?ce:{block:"start",inline:"nearest"};function je(ce,Vt){if(!ce.isConnected||!(Je=>{let Nt=Je;for(;Nt&&Nt.parentNode;){if(Nt.parentNode===document)return!0;Nt=Nt.parentNode instanceof ShadowRoot?Nt.parentNode.host:Nt.parentNode}return!1})(ce))return;const Qe=(Je=>{const Nt=window.getComputedStyle(Je);return{top:parseFloat(Nt.scrollMarginTop)||0,right:parseFloat(Nt.scrollMarginRight)||0,bottom:parseFloat(Nt.scrollMarginBottom)||0,left:parseFloat(Nt.scrollMarginLeft)||0}})(ce);if((Je=>typeof Je=="object"&&typeof Je.behavior=="function")(Vt))return Vt.behavior(Rt(ce,Vt));const Qt=typeof Vt=="boolean"||Vt==null?void 0:Vt.behavior;for(const{el:Je,top:Nt,left:nt}of Rt(ce,ie(Vt))){const et=Nt-Qe.top+Qe.bottom,ct=nt-Qe.left+Qe.right;Je.scroll({top:et,left:ct,behavior:Qt})}}}}]);
|