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.
NewEduCoderBuild/p__Message__index.1a95cef5....

1254 lines
2.1 MiB

(self.webpackChunk=self.webpackChunk||[]).push([[67],{8336:function(){"use strict"},12469:function(){"use strict"},99587:function(Cn,mi){"use strict";mi.Z={lists:"lists___xhHyq",item:"item___pWJAA",children:"children___sDG61",diamond:"diamond___FwgzD",button:"button___WPN6r",mathWrap:"mathWrap___FmnMJ",mathFillWrap:"mathFillWrap___PmY3H"}},3878:function(Cn,mi){"use strict";mi.Z={flex_box_center:"flex_box_center___vG4eV",flex_space_between:"flex_space_between___qVVxe",flex_box_vertical_center:"flex_box_vertical_center___P8Z8s",flex_box_center_end:"flex_box_center_end___VMme3",flex_box_column:"flex_box_column___VMHwm",dropdownmenus:"dropdownmenus___oVzoj",popupClassNames:"popupClassNames___OcZq7",selectdown:"selectdown___mmcA8"}},63720:function(){"use strict";function Cn(Ut,et,nt,ct){nt===void 0&&(nt=0),ct===void 0&&(ct=1/0),this._name=Ut,this._defaultValue=et,this._minimum=nt,this._maximum=ct}Object.defineProperty(Cn.prototype,"name",{get:function(){return this._name},set:function(Ut){if(typeof Ut!="string"||Ut==="")throw new Error("Shape name must be a valid string.");this._name=Ut}}),Object.defineProperty(Cn.prototype,"defaultValue",{get:function(){return this._defaultValue},set:function(Ut){if(typeof Ut!="number"||isNaN(Ut))throw new Error("The default value must be a real number, not: "+Ut);this._defaultValue=Ut}}),Object.defineProperty(Cn.prototype,"minimum",{get:function(){return this._minimum},set:function(Ut){if(typeof Ut!="number"||isNaN(Ut))throw new Error("Minimum must be a real number, not: "+Ut);this._minimum=Ut}}),Object.defineProperty(Cn.prototype,"maximum",{get:function(){return this._maximum},set:function(Ut){if(typeof Ut!="number"||isNaN(Ut))throw new Error("Maximum must be a real number, not: "+Ut);this._maximum=Ut}}),go.Shape._FigureParameters={},go.Shape.getFigureParameter=function(Ut,et){var nt=go.Shape._FigureParameters[Ut];return nt?nt[et]:null},go.Shape.setFigureParameter=function(Ut,et,nt){if(!(nt instanceof Cn))throw new Error("Third argument to Shape.setFigureParameter is not FigureParameter: "+nt);if(nt.defaultValue<nt.minimum||nt.defaultValue>nt.maximum)throw new Error("defaultValue must be between minimum and maximum, not: "+nt.defaultValue);var ct=go.Shape._FigureParameters[Ut];ct||(ct=[],go.Shape._FigureParameters[Ut]=ct),ct[et]=nt};var mi=[];function ne(Ut,et){var nt=mi.pop();return nt===void 0?new go.Point(Ut,et):(nt.x=Ut,nt.y=et,nt)}function bt(){var Ut=mi.pop();return Ut===void 0?new go.Point:Ut}function Be(Ut){mi.push(Ut)}function Ee(Ut,et,nt,ct,lt,gt,yt,Lt,It){It||(It=new go.Point);var Wt=Ut-nt,qt=lt-yt,he=NaN,fe=NaN;if(Wt===0)if(qt===0)Ut===nt&&(he=Ut,fe=et);else{var Ae=(gt-Lt)/qt,Ve=gt-Ae*lt;he=Ut,fe=Ae*he+Ve}else if(qt===0){var ye=(et-ct)/Wt,on=et-ye*Ut;he=lt,fe=ye*he+on}else{var ye=(et-ct)/Wt,Ae=(gt-Lt)/qt,on=et-ye*Ut,Ve=gt-Ae*lt;he=(Ve-on)/(ye-Ae),fe=ye*he+on}return It.x=he,It.y=fe,It}function Ze(Ut,et,nt,ct,lt,gt,yt,Lt,It,Wt,qt,he,fe,Ae){var Ve=1-It,ye=It,on=Ut*Ve+nt*ye,pn=et*Ve+ct*ye,Vn=nt*Ve+lt*ye,ti=ct*Ve+gt*ye,Xn=lt*Ve+yt*ye,Li=gt*Ve+Lt*ye,Ii=on*Ve+Vn*ye,ue=pn*Ve+ti*ye,jt=Vn*Ve+Xn*ye,En=ti*Ve+Li*ye,Si=Ii*Ve+jt*ye,pi=ue*Ve+En*ye;Wt.x=on,Wt.y=pn,qt.x=Ii,qt.y=ue,he.x=Si,he.y=pi,fe.x=jt,fe.y=En,Ae.x=Xn,Ae.y=Li}var Fe=new go.Spot(.156,.156),we=new go.Spot(.844,.844),ve=4*((Math.sqrt(2)-1)/3);go.Shape.setFigureParameter("RoundedRectangle",0,new Cn("CornerRounding",5)),go.Shape.defineFigureGenerator("RoundedRectangle",function(Ut,et,nt){var ct=Ut?Ut.parameter1:NaN;(isNaN(ct)||ct<0)&&(ct=5),ct=Math.min(ct,et/3),ct=Math.min(ct,nt/3);var lt=ct*ve,gt=new go.Geometry().add(new go.PathFigure(ct,0,!0).add(new go.PathSegment(go.PathSegment.Line,et-ct,0)).add(new go.PathSegment(go.PathSegment.Bezier,et,ct,et-lt,0,et,lt)).add(new go.PathSegment(go.PathSegment.Line,et,nt-ct)).add(new go.PathSegment(go.PathSegment.Bezier,et-ct,nt,et,nt-lt,et-lt,nt)).add(new go.PathSegment(go.PathSegment.Line,ct,nt)).add(new go.PathSegment(go.PathSegment.Bezier,0,nt-ct,lt,nt,0,nt-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&&(gt.spot1=new go.Spot(0,0,lt,lt),gt.spot2=new go.Spot(1,1,-lt,-lt)),gt}),go.Shape.defineFigureGenerator("Border","RoundedRectangle"),go.Shape.defineFigureGenerator("TriangleRight",function(Ut,et,nt){return new go.Geometry().add(new go.PathFigure(0,0).add(new go.PathSegment(go.PathSegment.Line,et,.5*nt)).add(new go.PathSegment(go.PathSegment.Line,0,nt).close())).setSpots(0,.25,.5,.75)}),go.Shape.defineFigureGenerator("TriangleDown",function(Ut,et,nt){return new go.Geometry().add(new go.PathFigure(0,0).add(new go.PathSegment(go.PathSegment.Line,et,0)).add(new go.PathSegment(go.PathSegment.Line,.5*et,nt).close())).setSpots(.25,0,.75,.5)}),go.Shape.defineFigureGenerator("TriangleLeft",function(Ut,et,nt){return new go.Geometry().add(new go.PathFigure(et,nt).add(new go.PathSegment(go.PathSegment.Line,0,.5*nt)).add(new go.PathSegment(go.PathSegment.Line,et,0).close())).setSpots(.5,.25,1,.75)}),go.Shape.defineFigureGenerator("TriangleUp",function(Ut,et,nt){return new go.Geometry().add(new go.PathFigure(et,nt).add(new go.PathSegment(go.PathSegment.Line,0,nt)).add(new go.PathSegment(go.PathSegment.Line,.5*et,0).close())).setSpots(.25,.5,.75,1)}),go.Shape.defineFigureGenerator("Triangle","TriangleUp"),go.Shape.defineFigureGenerator("Diamond",function(Ut,et,nt){return new go.Geometry().add(new go.PathFigure(.5*et,0).add(new go.PathSegment(go.PathSegment.Line,0,.5*nt)).add(new go.PathSegment(go.PathSegment.Line,.5*et,nt)).add(new go.PathSegment(go.PathSegment.Line,et,.5*nt).close())).setSpots(.25,.25,.75,.75)}),go.Shape.defineFigureGenerator("LineH",function(Ut,et,nt){var ct=new go.Geometry(go.Geometry.Line);return ct.startX=0,ct.startY=nt/2,ct.endX=et,ct.endY=nt/2,ct}),go.Shape.defineFigureGenerator("LineV",function(Ut,et,nt){var ct=new go.Geometry(go.Geometry.Line);return ct.startX=et/2,ct.startY=0,ct.endX=et/2,ct.endY=nt,ct}),go.Shape.defineFigureGenerator("BarH","Rectangle"),go.Shape.defineFigureGenerator("BarV","Rectangle"),go.Shape.defineFigureGenerator("MinusLine","LineH"),go.Shape.defineFigureGenerator("PlusLine",function(Ut,et,nt){return new go.Geometry().add(new go.PathFigure(0,nt/2,!1).add(new go.PathSegment(go.PathSegment.Line,et,nt/2)).add(new go.PathSegment(go.PathSegment.Move,et/2,0)).add(new go.PathSegment(go.PathSegment.Line,et/2,nt)))}),go.Shape.defineFigureGenerator("XLine",function(Ut,et,nt){return new go.Geometry().add(new go.PathFigure(0,nt,!1).add(new go.PathSegment(go.PathSegment.Line,et,0)).add(new go.PathSegment(go.PathSegment.Move,0,0)).add(new go.PathSegment(go.PathSegment.Line,et,nt)))}),go.Shape.defineFigureGenerator("LineRight",function(Ut,et,nt){return new go.Geometry().add(new go.PathFigure(.25*et,0,!1).add(new go.PathSegment(go.PathSegment.Line,.75*et,.5*nt)).add(new go.PathSegment(go.PathSegment.Line,.25*et,nt)))}),go.Shape.defineFigureGenerator("LineDown",function(Ut,et,nt){return new go.Geometry().add(new go.PathFigure(0,.25*nt,!1).add(new go.PathSegment(go.PathSegment.Line,.5*et,.75*nt)).add(new go.PathSegment(go.PathSegment.Line,et,.25*nt)))}),go.Shape.defineFigureGenerator("LineLeft",function(Ut,et,nt){return new go.Geometry().add(new go.PathFigure(.75*et,0,!1).add(new go.PathSegment(go.PathSegment.Line,.25*et,.5*nt)).add(new go.PathSegment(go.PathSegment.Line,.75*et,nt)))}),go.Shape.defineFigureGenerator("LineUp",function(Ut,et,nt){return new go.Geometry().add(new go.PathFigure(0,.75*nt,!1).add(new go.PathSegment(go.PathSegment.Line,.5*et,.25*nt)).add(new go.PathSegment(go.PathSegment.Line,et,.75*nt)))}),go.Shape.defineFigureGenerator("AsteriskLine",function(Ut,et,nt){var ct=.2/Math.SQRT2;return new go.Geometry().add(new go.PathFigure(ct*et,(1-ct)*nt,!1).add(new go.PathSegment(go.PathSegment.Line,(1-ct)*et,ct*nt)).add(new go.PathSegment(go.PathSegment.Move,ct*et,ct*nt)).add(new go.PathSegment(go.PathSegment.Line,(1-ct)*et,(1-ct)*nt)).add(new go.PathSegment(go.PathSegment.Move,0,nt/2)).add(new go.PathSegment(go.PathSegment.Line,et,nt/2)).add(new go.PathSegment(go.PathSegment.Move,et/2,0)).add(new go.PathSegment(go.PathSegment.Line,et/2,nt)))}),go.Shape.defineFigureGenerator("CircleLine",function(Ut,et,nt){var ct=et/2,lt=new go.Geometry().add(new go.PathFigure(et,et/2,!1).add(new go.PathSegment(go.PathSegment.Arc,0,360,ct,ct,ct,ct).close()));return lt.spot1=Fe,lt.spot2=we,lt.defaultStretch=go.GraphObject.Uniform,lt}),go.Shape.defineFigureGenerator("Line1",function(Ut,et,nt){var ct=new go.Geometry(go.Geometry.Line);return ct.startX=0,ct.startY=0,ct.endX=et,ct.endY=nt,ct}),go.Shape.defineFigureGenerator("Line2",function(Ut,et,nt){var ct=new go.Geometry(go.Geometry.Line);return ct.startX=et,ct.startY=0,ct.endX=0,ct.endY=nt,ct}),go.Shape.defineFigureGenerator("Curve1",function(Ut,et,nt){return new go.Geometry().add(new go.PathFigure(0,0,!1).add(new go.PathSegment(go.PathSegment.Bezier,et,nt,ve*et,0,et,(1-ve)*nt)))}),go.Shape.defineFigureGenerator("Curve2",function(Ut,et,nt){return new go.Geometry().add(new go.PathFigure(0,0,!1).add(new go.PathSegment(go.PathSegment.Bezier,et,nt,0,ve*nt,(1-ve)*et,nt)))}),go.Shape.defineFigureGenerator("Curve3",function(Ut,et,nt){return new go.Geometry().add(new go.PathFigure(et,0,!1).add(new go.PathSegment(go.PathSegment.Bezier,0,nt,et,ve*nt,ve*et,nt)))}),go.Shape.defineFigureGenerator("Curve4",function(Ut,et,nt){return new go.Geometry().add(new go.PathFigure(et,0,!1).add(new go.PathSegment(go.PathSegment.Bezier,0,nt,(1-ve)*et,0,0,(1-ve)*nt)))}),go.Shape.defineFigureGenerator("TriangleDownLeft",function(Ut,et,nt){return new go.Geometry().add(new go.PathFigure(0,0,!0).add(new go.PathSegment(go.PathSegment.Line,et,nt)).add(new go.PathSegment(go.PathSegment.Line,0,nt).close())).setSpots(0,.5,.5,1)}),go.Shape.defineFigureGenerator("TriangleDownRight",function(Ut,et,nt){return new go.Geometry().add(new go.PathFigure(et,0,!0).add(new go.PathSegment(go.PathSegment.Line,et,nt)).add(new go.PathSegment(go.PathSegment.Line,0,nt).close())).setSpots(.5,.5,1,1)}),go.Shape.defineFigureGenerator("TriangleUpLeft",function(Ut,et,nt){return new go.Geometry().add(new go.PathFigure(0,0,!0).add(new go.PathSegment(go.PathSegment.Line,et,0)).add(new go.PathSegment(go.PathSegment.Line,0,nt).close())).setSpots(0,0,.5,.5)}),go.Shape.defineFigureGenerator("TriangleUpRight",function(Ut,et,nt){return new go.Geometry().add(new go.PathFigure(0,0,!0).add(new go.PathSegment(go.PathSegment.Line,et,0)).add(new go.PathSegment(go.PathSegment.Line,et,nt).close())).setSpots(.5,0,1,.5)}),go.Shape.defineFigureGenerator("RightTriangle","TriangleDownLeft"),go.Shape.setFigureParameter("Parallelogram1",0,new Cn("Indent",.1,-.99,.99)),go.Shape.defineFigureGenerator("Parallelogram1",function(Ut,et,nt){var ct=Ut?Ut.parameter1:NaN;isNaN(ct)?ct=.1:ct<-1?ct=-1:ct>1&&(ct=1);var lt=Math.abs(ct)*et;if(ct===0){var gt=new go.Geometry(go.Geometry.Rectangle);return gt.startX=0,gt.startY=0,gt.endX=et,gt.endY=nt,gt}else{var gt=new go.Geometry;return ct>0?gt.add(new go.PathFigure(lt,0).add(new go.PathSegment(go.PathSegment.Line,et,0)).add(new go.PathSegment(go.PathSegment.Line,et-lt,nt)).add(new go.PathSegment(go.PathSegment.Line,0,nt).close())):gt.add(new go.PathFigure(0,0).add(new go.PathSegment(go.PathSegment.Line,et-lt,0)).add(new go.PathSegment(go.PathSegment.Line,et,nt)).add(new go.PathSegment(go.PathSegment.Line,lt,nt).close())),lt<et/2&&gt.setSpots(lt/et,0,(et-lt)/et,1),gt}}),go.Shape.defineFigureGenerator("Parallelogram","Parallelogram1"),go.Shape.setFigureParameter("Parallelogram2",0,new Cn("Indent",10,-1/0,1/0)),go.Shape.defineFigureGenerator("Parallelogram2",function(Ut,et,nt){var ct=Ut?Ut.parameter1:NaN;isNaN(ct)?ct=10:ct<-et?ct=-et:ct>et&&(ct=et);var lt=Math.abs(ct);if(ct===0){var gt=new go.Geometry(go.Geometry.Rectangle);return gt.startX=0,gt.startY=0,gt.endX=et,gt.endY=nt,gt}else{var gt=new go.Geometry;return ct>0?gt.add(new go.PathFigure(lt,0).add(new go.PathSegment(go.PathSegment.Line,et,0)).add(new go.PathSegment(go.PathSegment.Line,et-lt,nt)).add(new go.PathSegment(go.PathSegment.Line,0,nt).close())):gt.add(new go.PathFigure(0,0).add(new go.PathSegment(go.PathSegment.Line,et-lt,0)).add(new go.PathSegment(go.PathSegment.Line,et,nt)).add(new go.PathSegment(go.PathSegment.Line,lt,nt).close())),lt<et/2&&gt.setSpots(lt/et,0,(et-lt)/et,1),gt}}),go.Shape.setFigureParameter("Trapezoid1",0,new Cn("Indent",.2,-.99,.99)),go.Shape.defineFigureGenerator("Trapezoid1",function(Ut,et,nt){var ct=Ut?Ut.parameter1:NaN;isNaN(ct)?ct=.2:ct<.5?ct=-.5:ct>.5&&(ct=.5);var lt=Math.abs(ct)*et;if(ct===0){var gt=new go.Geometry(go.Geometry.Rectangle);return gt.startX=0,gt.startY=0,gt.endX=et,gt.endY=nt,gt}else{var gt=new go.Geometry;return ct>0?gt.add(new go.PathFigure(lt,0).add(new go.PathSegment(go.PathSegment.Line,et-lt,0)).add(new go.PathSegment(go.PathSegment.Line,et,nt)).add(new go.PathSegment(go.PathSegment.Line,0,nt).close())):gt.add(new go.PathFigure(0,0).add(new go.PathSegment(go.PathSegment.Line,et,0)).add(new go.PathSegment(go.PathSegment.Line,et-lt,nt)).add(new go.PathSegment(go.PathSegment.Line,lt,nt).close())),lt<et/2&&gt.setSpots(lt/et,0,(et-lt)/et,1),gt}}),go.Shape.defineFigureGenerator("Trapezoid","Trapezoid1"),go.Shape.setFigureParameter("Trapezoid2",0,new Cn("Indent",20,-1/0,1/0)),go.Shape.defineFigureGenerator("Trapezoid2",function(Ut,et,nt){var ct=Ut?Ut.parameter1:NaN;isNaN(ct)?ct=20:ct<-et?ct=-et/2:ct>et&&(ct=et/2);var lt=Math.abs(ct);if(ct===0){var gt=new go.Geometry(go.Geometry.Rectangle);return gt.startX=0,gt.startY=0,gt.endX=et,gt.endY=nt,gt}else{var gt=new go.Geometry;return ct>0?gt.add(new go.PathFigure(lt,0).add(new go.PathSegment(go.PathSegment.Line,et-lt,0)).add(new go.PathSegment(go.PathSegment.Line,et,nt)).add(new go.PathSegment(go.PathSegment.Line,0,nt).close())):gt.add(new go.PathFigure(0,0).add(new go.PathSegment(go.PathSegment.Line,et,0)).add(new go.PathSegment(go.PathSegment.Line,et-lt,nt)).add(new go.PathSegment(go.PathSegment.Line,lt,nt).close())),lt<et/2&&gt.setSpots(lt/et,0,(et-lt)/et,1),gt}}),go.Shape.setFigureParameter("ManualOperation",0,new Cn("Indent",10,-1/0,1/0)),go.Shape.defineFigureGenerator("ManualOperation",function(Ut,et,nt){var ct=Ut?Ut.parameter1:NaN;isNaN(ct)?ct=10:ct<-et?ct=-et/2:ct>et&&(ct=et/2);var lt=Math.abs(ct);if(ct===0){var gt=new go.Geometry(go.Geometry.Rectangle);return gt.startX=0,gt.startY=0,gt.endX=et,gt.endY=nt,gt}else{var gt=new go.Geometry;return ct>0?gt.add(new go.PathFigure(0,0).add(new go.PathSegment(go.PathSegment.Line,et,0)).add(new go.PathSegment(go.PathSegment.Line,et-lt,nt)).add(new go.PathSegment(go.PathSegment.Line,lt,nt).close())):gt.add(new go.PathFigure(lt,0).add(new go.PathSegment(go.PathSegment.Line,et-lt,0)).add(new go.PathSegment(go.PathSegment.Line,et,nt)).add(new go.PathSegment(go.PathSegment.Line,0,nt).close())),lt<et/2&&gt.setSpots(lt/et,0,(et-lt)/et,1),gt}});var Qe=[];function ge(){var Ut=Qe.pop();return Ut===void 0?[]:Ut}function se(Ut){Ut.length=0,Qe.push(Ut)}function hn(Ut){for(var et=ge(),nt=.5,ct=.5,lt=Math.PI*1.5,gt=0,yt=0;yt<Ut;yt++)gt=2*Math.PI/Ut*yt+lt,et[yt]=new go.Point(ct+nt*Math.cos(gt),ct+nt*Math.sin(gt));return et.push(et[0]),et}function Se(Ut){var et=xn(Ut),nt=ge();nt[0]=et[0];for(var ct=1,lt=1;ct<et.length;ct+=2,lt+=3)nt[lt]=et[ct],nt[lt+1]=et[ct],nt[lt+2]=et[ct+1];return se(et),nt}function xn(Ut){for(var et=hn(Ut),nt=ge(),ct=Math.floor(et.length/2),lt=et.length-1,gt=Ut%2===0?2:1,yt=0;yt<lt;yt++){var Lt=et[yt],It=et[yt+1],Wt=et[(ct+yt-1)%lt],qt=et[(ct+yt+gt)%lt];nt[yt*2]=Lt,nt[yt*2+1]=Ee(Lt.x,Lt.y,Wt.x,Wt.y,It.x,It.y,qt.x,qt.y,new go.Point)}return nt[nt.length]=nt[0],se(et),nt}go.Shape.defineFigureGenerator("Pentagon",function(Ut,et,nt){var ct=hn(5),lt=new go.Geometry,gt=new go.PathFigure(ct[0].x*et,ct[0].y*nt,!0);lt.add(gt);for(var yt=1;yt<5;yt++)gt.add(new go.PathSegment(go.PathSegment.Line,ct[yt].x*et,ct[yt].y*nt));return gt.add(new go.PathSegment(go.PathSegment.Line,ct[0].x*et,ct[0].y*nt).close()),se(ct),lt.spot1=new go.Spot(.2,.22),lt.spot2=new go.Spot(.8,.9),lt}),go.Shape.defineFigureGenerator("Hexagon",function(Ut,et,nt){var ct=hn(6),lt=new go.Geometry,gt=new go.PathFigure(ct[0].x*et,ct[0].y*nt,!0);lt.add(gt);for(var yt=1;yt<6;yt++)gt.add(new go.PathSegment(go.PathSegment.Line,ct[yt].x*et,ct[yt].y*nt));return gt.add(new go.PathSegment(go.PathSegment.Line,ct[0].x*et,ct[0].y*nt).close()),se(ct),lt.spot1=new go.Spot(.07,.25),lt.spot2=new go.Spot(.93,.75),lt}),go.Shape.defineFigureGenerator("Heptagon",function(Ut,et,nt){var ct=hn(7),lt=new go.Geometry,gt=new go.PathFigure(ct[0].x*et,ct[0].y*nt,!0);lt.add(gt);for(var yt=1;yt<7;yt++)gt.add(new go.PathSegment(go.PathSegment.Line,ct[yt].x*et,ct[yt].y*nt));return gt.add(new go.PathSegment(go.PathSegment.Line,ct[0].x*et,ct[0].y*nt).close()),se(ct),lt.spot1=new go.Spot(.2,.15),lt.spot2=new go.Spot(.8,.85),lt}),go.Shape.defineFigureGenerator("Octagon",function(Ut,et,nt){var ct=hn(8),lt=new go.Geometry,gt=new go.PathFigure(ct[0].x*et,ct[0].y*nt,!0);lt.add(gt);for(var yt=1;yt<8;yt++)gt.add(new go.PathSegment(go.PathSegment.Line,ct[yt].x*et,ct[yt].y*nt));return gt.add(new go.PathSegment(go.PathSegment.Line,ct[0].x*et,ct[0].y*nt).close()),se(ct),lt.spot1=new go.Spot(.15,.15),lt.spot2=new go.Spot(.85,.85),lt}),go.Shape.defineFigureGenerator("Nonagon",function(Ut,et,nt){var ct=hn(9),lt=new go.Geometry,gt=new go.PathFigure(ct[0].x*et,ct[0].y*nt,!0);lt.add(gt);for(var yt=1;yt<9;yt++)gt.add(new go.PathSegment(go.PathSegment.Line,ct[yt].x*et,ct[yt].y*nt));return gt.add(new go.PathSegment(go.PathSegment.Line,ct[0].x*et,ct[0].y*nt).close()),se(ct),lt.spot1=new go.Spot(.17,.13),lt.spot2=new go.Spot(.82,.82),lt}),go.Shape.defineFigureGenerator("Decagon",function(Ut,et,nt){var ct=hn(10),lt=new go.Geometry,gt=new go.PathFigure(ct[0].x*et,ct[0].y*nt,!0);lt.add(gt);for(var yt=1;yt<10;yt++)gt.add(new go.PathSegment(go.PathSegment.Line,ct[yt].x*et,ct[yt].y*nt));return gt.add(new go.PathSegment(go.PathSegment.Line,ct[0].x*et,ct[0].y*nt).close()),se(ct),lt.spot1=new go.Spot(.16,.16),lt.spot2=new go.Spot(.84,.84),lt}),go.Shape.defineFigureGenerator("Dodecagon",function(Ut,et,nt){var ct=hn(12),lt=new go.Geometry,gt=new go.PathFigure(ct[0].x*et,ct[0].y*nt,!0);lt.add(gt);for(var yt=1;yt<12;yt++)gt.add(new go.PathSegment(go.PathSegment.Line,ct[yt].x*et,ct[yt].y*nt));return gt.add(new go.PathSegment(go.PathSegment.Line,ct[0].x*et,ct[0].y*nt).close()),se(ct),lt.spot1=new go.Spot(.16,.16),lt.spot2=new go.Spot(.84,.84),lt}),go.Shape.defineFigureGenerator("FivePointedStar",function(Ut,et,nt){var ct=xn(5),lt=new go.Geometry,gt=new go.PathFigure(ct[0].x*et,ct[0].y*nt,!0);lt.add(gt);for(var yt=1;yt<10;yt++)gt.add(new go.PathSegment(go.PathSegment.Line,ct[yt].x*et,ct[yt].y*nt));return gt.add(new go.PathSegment(go.PathSegment.Line,ct[0].x*et,ct[0].y*nt).close()),se(ct),lt.spot1=new go.Spot(.266,.333),lt.spot2=new go.Spot(.733,.733),lt}),go.Shape.defineFigureGenerator("SixPointedStar",function(Ut,et,nt){var ct=xn(6),lt=new go.Geometry,gt=new go.PathFigure(ct[0].x*et,ct[0].y*nt,!0);lt.add(gt);for(var yt=1;yt<12;yt++)gt.add(new go.PathSegment(go.PathSegment.Line,ct[yt].x*et,ct[yt].y*nt));return gt.add(new go.PathSegment(go.PathSegment.Line,ct[0].x*et,ct[0].y*nt).close()),se(ct),lt.spot1=new go.Spot(.17,.25),lt.spot2=new go.Spot(.83,.75),lt}),go.Shape.defineFigureGenerator("SevenPointedStar",function(Ut,et,nt){var ct=xn(7),lt=new go.Geometry,gt=new go.PathFigure(ct[0].x*et,ct[0].y*nt,!0);lt.add(gt);for(var yt=1;yt<14;yt++)gt.add(new go.PathSegment(go.PathSegment.Line,ct[yt].x*et,ct[yt].y*nt));return gt.add(new go.PathSegment(go.PathSegment.Line,ct[0].x*et,ct[0].y*nt).close()),se(ct),lt.spot1=new go.Spot(.222,.277),lt.spot2=new go.Spot(.777,.666),lt}),go.Shape.defineFigureGenerator("EightPointedStar",function(Ut,et,nt){var ct=xn(8),lt=new go.Geometry,gt=new go.PathFigure(ct[0].x*et,ct[0].y*nt,!0);lt.add(gt);for(var yt=1;yt<16;yt++)gt.add(new go.PathSegment(go.PathSegment.Line,ct[yt].x*et,ct[yt].y*nt));return gt.add(new go.PathSegment(go.PathSegment.Line,ct[0].x*et,ct[0].y*nt).close()),se(ct),lt.spot1=new go.Spot(.25,.25),lt.spot2=new go.Spot(.75,.75),lt}),go.Shape.defineFigureGenerator("NinePointedStar",function(Ut,et,nt){var ct=xn(9),lt=new go.Geometry,gt=new go.PathFigure(ct[0].x*et,ct[0].y*nt,!0);lt.add(gt);for(var yt=1;yt<18;yt++)gt.add(new go.PathSegment(go.PathSegment.Line,ct[yt].x*et,ct[yt].y*nt));return gt.add(new go.PathSegment(go.PathSegment.Line,ct[0].x*et,ct[0].y*nt).close()),se(ct),lt.spot1=new go.Spot(.222,.277),lt.spot2=new go.Spot(.777,.666),lt}),go.Shape.defineFigureGenerator("TenPointedStar",function(Ut,et,nt){var ct=xn(10),lt=new go.Geometry,gt=new go.PathFigure(ct[0].x*et,ct[0].y*nt,!0);lt.add(gt);for(var yt=1;yt<20;yt++)gt.add(new go.PathSegment(go.PathSegment.Line,ct[yt].x*et,ct[yt].y*nt));return gt.add(new go.PathSegment(go.PathSegment.Line,ct[0].x*et,ct[0].y*nt).close()),se(ct),lt.spot1=new go.Spot(.281,.261),lt.spot2=new go.Spot(.723,.748),lt}),go.Shape.defineFigureGenerator("FivePointedBurst",function(Ut,et,nt){var ct=Se(5),lt=new go.Geometry,gt=new go.PathFigure(ct[0].x*et,ct[0].y*nt,!0);lt.add(gt);for(var yt=1;yt<ct.length;yt+=3)gt.add(new go.PathSegment(go.PathSegment.Bezier,ct[yt+2].x*et,ct[yt+2].y*nt,ct[yt].x*et,ct[yt].y*nt,ct[yt+1].x*et,ct[yt+1].y*nt));return gt.segments.last().close(),se(ct),lt.spot1=new go.Spot(.222,.277),lt.spot2=new go.Spot(.777,.777),lt}),go.Shape.defineFigureGenerator("SixPointedBurst",function(Ut,et,nt){var ct=Se(6),lt=new go.Geometry,gt=new go.PathFigure(ct[0].x*et,ct[0].y*nt,!0);lt.add(gt);for(var yt=1;yt<ct.length;yt+=3)gt.add(new go.PathSegment(go.PathSegment.Bezier,ct[yt+2].x*et,ct[yt+2].y*nt,ct[yt].x*et,ct[yt].y*nt,ct[yt+1].x*et,ct[yt+1].y*nt));return gt.segments.last().close(),se(ct),lt.spot1=new go.Spot(.17,.222),lt.spot2=new go.Spot(.833,.777),lt}),go.Shape.defineFigureGenerator("SevenPointedBurst",function(Ut,et,nt){var ct=Se(7),lt=new go.Geometry,gt=new go.PathFigure(ct[0].x*et,ct[0].y*nt,!0);lt.add(gt);for(var yt=1;yt<ct.length;yt+=3)gt.add(new go.PathSegment(go.PathSegment.Bezier,ct[yt+2].x*et,ct[yt+2].y*nt,ct[yt].x*et,ct[yt].y*nt,ct[yt+1].x*et,ct[yt+1].y*nt));return gt.segments.last().close(),se(ct),lt.spot1=new go.Spot(.222,.222),lt.spot2=new go.Spot(.777,.777),lt}),go.Shape.defineFigureGenerator("EightPointedBurst",function(Ut,et,nt){var ct=Se(8),lt=new go.Geometry,gt=new go.PathFigure(ct[0].x*et,ct[0].y*nt,!0);lt.add(gt);for(var yt=1;yt<ct.length;yt+=3)gt.add(new go.PathSegment(go.PathSegment.Bezier,ct[yt+2].x*et,ct[yt+2].y*nt,ct[yt].x*et,ct[yt].y*nt,ct[yt+1].x*et,ct[yt+1].y*nt));return gt.segments.last().close(),se(ct),lt.spot1=new go.Spot(.222,.222),lt.spot2=new go.Spot(.777,.777),lt}),go.Shape.defineFigureGenerator("NinePointedBurst",function(Ut,et,nt){var ct=Se(9),lt=new go.Geometry,gt=new go.PathFigure(ct[0].x*et,ct[0].y*nt,!0);lt.add(gt);for(var yt=1;yt<ct.length;yt+=3)gt.add(new go.PathSegment(go.PathSegment.Bezier,ct[yt+2].x*et,ct[yt+2].y*nt,ct[yt].x*et,ct[yt].y*nt,ct[yt+1].x*et,ct[yt+1].y*nt));return gt.segments.last().close(),se(ct),lt.spot1=new go.Spot(.222,.222),lt.spot2=new go.Spot(.777,.777),lt}),go.Shape.defineFigureGenerator("TenPointedBurst",function(Ut,et,nt){var ct=Se(10),lt=new go.Geometry,gt=new go.PathFigure(ct[0].x*et,ct[0].y*nt,!0);lt.add(gt);for(var yt=1;yt<ct.length;yt+=3)gt.add(new go.PathSegment(go.PathSegment.Bezier,ct[yt+2].x*et,ct[yt+2].y*nt,ct[yt].x*et,ct[yt].y*nt,ct[yt+1].x*et,ct[yt+1].y*nt));return gt.segments.last().close(),se(ct),lt.spot1=new go.Spot(.222,.222),lt.spot2=new go.Spot(.777,.777),lt}),go.Shape.setFigureParameter("FramedRectangle",0,new Cn("ThicknessX",8)),go.Shape.setFigureParameter("FramedRectangle",1,new Cn("ThicknessY",8)),go.Shape.defineFigureGenerator("FramedRectangle",function(Ut,et,nt){var ct=Ut?Ut.parameter1:NaN,lt=Ut?Ut.parameter2:NaN;isNaN(ct)&&(ct=8),isNaN(lt)&&(lt=8);var gt=new go.Geometry,yt=new go.PathFigure(0,0,!0);return gt.add(yt),yt.add(new go.PathSegment(go.PathSegment.Line,et,0)),yt.add(new go.PathSegment(go.PathSegment.Line,et,nt)),yt.add(new go.PathSegment(go.PathSegment.Line,0,nt).close()),ct<et/2&&lt<nt/2&&(yt.add(new go.PathSegment(go.PathSegment.Move,ct,lt)),yt.add(new go.PathSegment(go.PathSegment.Line,ct,nt-lt)),yt.add(new go.PathSegment(go.PathSegment.Line,et-ct,nt-lt)),yt.add(new go.PathSegment(go.PathSegment.Line,et-ct,lt).close())),gt.setSpots(0,0,1,1,ct,lt,-ct,-lt),gt}),go.Shape.setFigureParameter("Ring",0,new Cn("Thickness",8)),go.Shape.defineFigureGenerator("Ring",function(Ut,et,nt){var ct=Ut?Ut.parameter1:NaN;(isNaN(ct)||ct<0)&&(ct=8);var lt=et/2,gt=new go.Geometry,yt=new go.PathFigure(et,et/2,!0);gt.add(yt),yt.add(new go.PathSegment(go.PathSegment.Arc,0,360,lt,lt,lt,lt).close());var Lt=Math.max(lt-ct,0);return Lt>0&&(yt.add(new go.PathSegment(go.PathSegment.Move,et/2+Lt,et/2)),yt.add(new go.PathSegment(go.PathSegment.Arc,0,-360,lt,lt,Lt,Lt).close())),gt.spot1=Fe,gt.spot2=we,gt.defaultStretch=go.GraphObject.Uniform,gt}),go.Shape.defineFigureGenerator("Cloud",function(Ut,et,nt){return new go.Geometry().add(new go.PathFigure(.08034461*et,.1944299*nt,!0).add(new go.PathSegment(go.PathSegment.Bezier,.2008615*et,.05349299*nt,-.09239631*et,.07836421*nt,.1406031*et,-.0542823*nt)).add(new go.PathSegment(go.PathSegment.Bezier,.4338609*et,.074219*nt,.2450511*et,-.00697547*nt,.3776197*et,-.01112067*nt)).add(new go.PathSegment(go.PathSegment.Bezier,.6558228*et,.07004196*nt,.4539471*et,0,.6066018*et,-.02526587*nt)).add(new go.PathSegment(go.PathSegment.Bezier,.8921095*et,.08370865*nt,.6914277*et,-.01904177*nt,.8921095*et,-.01220843*nt)).add(new go.PathSegment(go.PathSegment.Bezier,.9147671*et,.3194596*nt,1.036446*et,.04105738*nt,1.020377*et,.3022052*nt)).add(new go.PathSegment(go.PathSegment.Bezier,.9082935*et,.562044*nt,1.04448*et,.360238*nt,.992256*et,.5219009*nt)).add(new go.PathSegment(go.PathSegment.Bezier,.9212406*et,.8217117*nt,1.032337*et,.5771781*nt,1.018411*et,.8120651*nt)).add(new go.PathSegment(go.PathSegment.Bezier,.7592566*et,.9156953*nt,1.028411*et,.9571472*nt,.8556702*et,1.052487*nt)).add(new go.PathSegment(go.PathSegment.Bezier,.5101666*et,.9310455*nt,.7431877*et,1.009325*nt,.5624123*et,1.021761*nt)).add(new go.PathSegment(go.PathSegment.Bezier,.2609328*et,.9344623*nt,.4820677*et,1.031761*nt,.3030112*et,1.002796*nt)).add(new go.PathSegment(go.PathSegment.Bezier,.08034461*et,.870098*nt,.2329994*et,1.01518*nt,.03213784*et,1.01518*nt)).add(new go.PathSegment(go.PathSegment.Bezier,.06829292*et,.6545475*nt,-.02812061*et,.9032597*nt,-.01205169*et,.6835638*nt)).add(new go.PathSegment(go.PathSegment.Bezier,.06427569*et,.4265613*nt,-.01812061*et,.6089503*nt,-.00606892*et,.4555777*nt)).add(new go.PathSegment(go.PathSegment.Bezier,.08034461*et,.1944299*nt,-.01606892*et,.3892545*nt,-.01205169*et,.1944299*nt))).setSpots(.1,.1,.9,.9)}),go.Shape.defineFigureGenerator("StopSign",function(Ut,et,nt){var ct=1/(Math.SQRT2+2);return new go.Geometry().add(new go.PathFigure(ct*et,0,!0).add(new go.PathSegment(go.PathSegment.Line,(1-ct)*et,0)).add(new go.PathSegment(go.PathSegment.Line,et,ct*nt)).add(new go.PathSegment(go.PathSegment.Line,et,(1-ct)*nt)).add(new go.PathSegment(go.PathSegment.Line,(1-ct)*et,nt)).add(new go.PathSegment(go.PathSegment.Line,ct*et,nt)).add(new go.PathSegment(go.PathSegment.Line,0,(1-ct)*nt)).add(new go.PathSegment(go.PathSegment.Line,0,ct*nt).close())).setSpots(ct/2,ct/2,1-ct/2,1-ct/2)}),go.Shape.setFigureParameter("Pie",0,new Cn("Start",0,-360,360)),go.Shape.setFigureParameter("Pie",1,new Cn("Sweep",315,-360,360)),go.Shape.defineFigureGenerator("Pie",function(Ut,et,nt){var ct=Ut?Ut.parameter1:NaN,lt=Ut?Ut.parameter2:NaN;isNaN(ct)&&(ct=0),isNaN(lt)&&(lt=315);var gt=ct%360;gt<0&&(gt+=360);var yt=lt%360,Lt=Math.min(et,nt)/2;return new go.Geometry().add(new go.PathFigure(Lt,Lt).add(new go.PathSegment(go.PathSegment.Arc,gt,yt,Lt,Lt,Lt,Lt).close()))}),go.Shape.defineFigureGenerator("PiePiece",function(Ut,et,nt){var ct=ve/Math.SQRT2*.5,lt=Math.SQRT2/2,gt=1-Math.SQRT2/2;return new go.Geometry().add(new go.PathFigure(et,nt,!0).add(new go.PathSegment(go.PathSegment.Bezier,lt*et,gt*nt,et,(1-ct)*nt,(lt+ct)*et,(gt+ct)*nt)).add(new go.PathSegment(go.PathSegment.Line,0,nt).close()))}),go.Shape.setFigureParameter("ThickCross",0,new Cn("Thickness",30)),go.Shape.defineFigureGenerator("ThickCross",function(Ut,et,nt){var ct=Ut?Ut.parameter1:NaN;(isNaN(ct)||ct<0)&&(ct=30);var lt=Math.min(ct,et)/2,gt=et/2,yt=nt/2;return new go.Geometry().add(new go.PathFigure(gt-lt,0,!0).add(new go.PathSegment(go.PathSegment.Line,gt+lt,0)).add(new go.PathSegment(go.PathSegment.Line,gt+lt,yt-lt)).add(new go.PathSegment(go.PathSegment.Line,et,yt-lt)).add(new go.PathSegment(go.PathSegment.Line,et,yt+lt)).add(new go.PathSegment(go.PathSegment.Line,gt+lt,yt+lt)).add(new go.PathSegment(go.PathSegment.Line,gt+lt,nt)).add(new go.PathSegment(go.PathSegment.Line,gt-lt,nt)).add(new go.PathSegment(go.PathSegment.Line,gt-lt,yt+lt)).add(new go.PathSegment(go.PathSegment.Line,0,yt+lt)).add(new go.PathSegment(go.PathSegment.Line,0,yt-lt)).add(new go.PathSegment(go.PathSegment.Line,gt-lt,yt-lt).close()))}),go.Shape.setFigureParameter("ThinCross",0,new Cn("Thickness",10)),go.Shape.defineFigureGenerator("ThinCross",function(Ut,et,nt){var ct=Ut?Ut.parameter1:NaN;(isNaN(ct)||ct<0)&&(ct=10);var lt=Math.min(ct,et)/2,gt=et/2,yt=nt/2;return new go.Geometry().add(new go.PathFigure(gt-lt,0,!0).add(new go.PathSegment(go.PathSegment.Line,gt+lt,0)).add(new go.PathSegment(go.PathSegment.Line,gt+lt,yt-lt)).add(new go.PathSegment(go.PathSegment.Line,et,yt-lt)).add(new go.PathSegment(go.PathSegment.Line,et,yt+lt)).add(new go.PathSegment(go.PathSegment.Line,gt+lt,yt+lt)).add(new go.PathSegment(go.PathSegment.Line,gt+lt,nt)).add(new go.PathSegment(go.PathSegment.Line,gt-lt,nt)).add(new go.PathSegment(go.PathSegment.Line,gt-lt,yt+lt)).add(new go.PathSegment(go.PathSegment.Line,0,yt+lt)).add(new go.PathSegment(go.PathSegment.Line,0,yt-lt)).add(new go.PathSegment(go.PathSegment.Line,gt-lt,yt-lt).close()))}),go.Shape.setFigureParameter("ThickX",0,new Cn("Thickness",30)),go.Shape.defineFigureGenerator("ThickX",function(Ut,et,nt){var ct=Ut?Ut.parameter1:NaN;if((isNaN(ct)||ct<0)&&(ct=30),et===0||nt===0){var lt=new go.Geometry(go.Geometry.Rectangle);return lt.startX=0,lt.startY=0,lt.endX=et,lt.endY=nt,lt}else{var gt=et/2,yt=nt/2,Lt=Math.atan2(nt,et),It=ct-Math.min(Math.cos(Lt)*ct/2,gt),Wt=ct-Math.min(Math.sin(Lt)*ct/2,yt),lt=new go.Geometry,qt=new go.PathFigure(It,0,!0);return lt.add(qt),qt.add(new go.PathSegment(go.PathSegment.Line,gt,.2*nt)),qt.add(new go.PathSegment(go.PathSegment.Line,et-It,0)),qt.add(new go.PathSegment(go.PathSegment.Line,et,Wt)),qt.add(new go.PathSegment(go.PathSegment.Line,.8*et,yt)),qt.add(new go.PathSegment(go.PathSegment.Line,et,nt-Wt)),qt.add(new go.PathSegment(go.PathSegment.Line,et-It,nt)),qt.add(new go.PathSegment(go.PathSegment.Line,gt,.8*nt)),qt.add(new go.PathSegment(go.PathSegment.Line,It,nt)),qt.add(new go.PathSegment(go.PathSegment.Line,0,nt-Wt)),qt.add(new go.PathSegment(go.PathSegment.Line,.2*et,yt)),qt.add(new go.PathSegment(go.PathSegment.Line,0,Wt).close()),lt}}),go.Shape.setFigureParameter("ThinX",0,new Cn("Thickness",10)),go.Shape.defineFigureGenerator("ThinX",function(Ut,et,nt){var ct=Ut?Ut.parameter1:NaN;(isNaN(ct)||ct<0)&&(ct=10);var lt=new go.Geometry,gt=new go.PathFigure(.1*et,0,!0);return lt.add(gt),gt.add(new go.PathSegment(go.PathSegment.Line,.5*et,.4*nt)),gt.add(new go.PathSegment(go.PathSegment.Line,.9*et,0)),gt.add(new go.PathSegment(go.PathSegment.Line,et,.1*nt)),gt.add(new go.PathSegment(go.PathSegment.Line,.6*et,.5*nt)),gt.add(new go.PathSegment(go.PathSegment.Line,et,.9*nt)),gt.add(new go.PathSegment(go.PathSegment.Line,.9*et,nt)),gt.add(new go.PathSegment(go.PathSegment.Line,.5*et,.6*nt)),gt.add(new go.PathSegment(go.PathSegment.Line,.1*et,nt)),gt.add(new go.PathSegment(go.PathSegment.Line,0,.9*nt)),gt.add(new go.PathSegment(go.PathSegment.Line,.4*et,.5*nt)),gt.add(new go.PathSegment(go.PathSegment.Line,0,.1*nt).close()),lt}),go.Shape.setFigureParameter("SquareIBeam",0,new Cn("BeamWidth",.2,.1,.9)),go.Shape.defineFigureGenerator("SquareIBeam",function(Ut,et,nt){var ct=Ut?Ut.parameter1:NaN;isNaN(ct)&&(ct=.2);var lt=new go.Geometry,gt=new go.PathFigure(0,0,!0);return lt.add(gt),gt.add(new go.PathSegment(go.PathSegment.Line,et,0)),gt.add(new go.PathSegment(go.PathSegment.Line,et,ct*nt)),gt.add(new go.PathSegment(go.PathSegment.Line,(.5+ct/2)*et,ct*nt)),gt.add(new go.PathSegment(go.PathSegment.Line,(.5+ct/2)*et,(1-ct)*nt)),gt.add(new go.PathSegment(go.PathSegment.Line,et,(1-ct)*nt)),gt.add(new go.PathSegment(go.PathSegment.Line,et,nt)),gt.add(new go.PathSegment(go.PathSegment.Line,0,nt)),gt.add(new go.PathSegment(go.PathSegment.Line,0,(1-ct)*nt)),gt.add(new go.PathSegment(go.PathSegment.Line,(.5-ct/2)*et,(1-ct)*nt)),gt.add(new go.PathSegment(go.PathSegment.Line,(.5-ct/2)*et,ct*nt)),gt.add(new go.PathSegment(go.PathSegment.Line,0,ct*nt).close()),lt}),go.Shape.setFigureParameter("RoundedIBeam",0,new Cn("Curviness",.5,.05,.65)),go.Shape.defineFigureGenerator("RoundedIBeam",function(Ut,et,nt){var ct=Ut?Ut.parameter1:NaN;isNaN(ct)&&(ct=.5);var lt=new go.Geometry,gt=new go.PathFigure(0,0,!0);return lt.add(gt),gt.add(new go.PathSegment(go.PathSegment.Line,et,0)),gt.add(new go.PathSegment(go.PathSegment.Bezier,et,nt,Math.abs(1-ct)*et,.25*nt,Math.abs(1-ct)*et,.75*nt)),gt.add(new go.PathSegment(go.PathSegment.Line,0,nt)),gt.add(new go.PathSegment(go.PathSegment.Bezier,0,0,ct*et,.75*nt,ct*et,.25*nt).close()),lt}),go.Shape.defineFigureGenerator("HalfEllipse",function(Ut,et,nt){return new go.Geometry().add(new go.PathFigure(0,0,!0).add(new go.PathSegment(go.PathSegment.Bezier,et,.5*nt,ve*et,0,et,(.5-ve/2)*nt)).add(new go.PathSegment(go.PathSegment.Bezier,0,nt,et,(.5+ve/2)*nt,ve*et,nt).close())).setSpots(0,.156,.844,.844)}),go.Shape.defineFigureGenerator("Crescent",function(Ut,et,nt){return new go.Geometry().add(new go.PathFigure(0,0,!0).add(new go.PathSegment(go.PathSegment.Bezier,0,nt,et,0,et,nt)).add(new go.PathSegment(go.PathSegment.Bezier,0,0,.5*et,.75*nt,.5*et,.25*nt).close())).setSpots(.311,.266,.744,.744)}),go.Shape.defineFigureGenerator("Heart",function(Ut,et,nt){return new go.Geometry().add(new go.PathFigure(.5*et,nt,!0).add(new go.PathSegment(go.PathSegment.Bezier,0,.3*nt,.1*et,.8*nt,0,.5*nt)).add(new go.PathSegment(go.PathSegment.Bezier,.5*et,.3*nt,0,0,.45*et,0)).add(new go.PathSegment(go.PathSegment.Bezier,et,.3*nt,.55*et,0,et,0)).add(new go.PathSegment(go.PathSegment.Bezier,.5*et,nt,et,.5*nt,.9*et,.8*nt).close())).setSpots(.14,.29,.86,.78)}),go.Shape.defineFigureGenerator("Spade",function(Ut,et,nt){return new go.Geometry().add(new go.PathFigure(.5*et,0,!0).add(new go.PathSegment(go.PathSegment.Line,.51*et,.01*nt)).add(new go.PathSegment(go.PathSegment.Bezier,et,.5*nt,.6*et,.2*nt,et,.25*nt)).add(new go.PathSegment(go.PathSegment.Bezier,.55*et,.7*nt,et,.8*nt,.6*et,.8*nt)).add(new go.PathSegment(go.PathSegment.Bezier,.75*et,nt,.5*et,.75*nt,.55*et,.95*nt)).add(new go.PathSegment(go.PathSegment.Line,.25*et,nt)).add(new go.PathSegment(go.PathSegment.Bezier,.45*et,.7*nt,.45*et,.95*nt,.5*et,.75*nt)).add(new go.PathSegment(go.PathSegment.Bezier,0,.5*nt,.4*et,.8*nt,0,.8*nt)).add(new go.PathSegment(go.PathSegment.Bezier,.49*et,.01*nt,0,.25*nt,.4*et,.2*nt).close())).setSpots(.14,.26,.86,.78)}),go.Shape.defineFigureGenerator("Club",function(Ut,et,nt){var ct=new go.Geometry,lt=new go.PathFigure(.4*et,.6*nt,!0);ct.add(lt),lt.add(new go.PathSegment(go.PathSegment.Bezier,.15*et,nt,.5*et,.75*nt,.45*et,.95*nt)),lt.add(new go.PathSegment(go.PathSegment.Line,.85*et,nt)),lt.add(new go.PathSegment(go.PathSegment.Bezier,.6*et,.6*nt,.55*et,.95*nt,.5*et,.75*nt));var gt=.2,yt=.3,Lt=0,It=gt*ve;return lt.add(new go.PathSegment(go.PathSegment.Bezier,(.5+yt)*et,(.5+gt+Lt)*nt,(.5-gt+yt)*et,(.5+It+Lt)*nt,(.5-It+yt)*et,(.5+gt+Lt)*nt)),lt.add(new go.PathSegment(go.PathSegment.Bezier,(1-.5+gt+yt)*et,(.5+Lt)*nt,(.5+It+yt)*et,(.5+gt+Lt)*nt,(.5+gt+yt)*et,(.5+It+Lt)*nt)),lt.add(new go.PathSegment(go.PathSegment.Bezier,(.5+yt)*et,(.5-gt+Lt)*nt,(1-.5+gt+yt)*et,(.5-It+Lt)*nt,(.5+It+yt)*et,(.5-gt+Lt)*nt)),lt.add(new go.PathSegment(go.PathSegment.Bezier,.65*et,.36771243*nt,(.5-It+yt)*et,(.5-gt+Lt)*nt,(.5-gt+yt+.05)*et,(.5-It+Lt-.02)*nt)),gt=.2,yt=0,Lt=-.3,It=gt*ve,lt.add(new go.PathSegment(go.PathSegment.Bezier,(1-.5+gt+yt)*et,(.5+Lt)*nt,(.5+It+yt)*et,(.5+gt+Lt)*nt,(.5+gt+yt)*et,(.5+It+Lt)*nt)),lt.add(new go.PathSegment(go.PathSegment.Bezier,(.5+yt)*et,(.5-gt+Lt)*nt,(1-.5+gt+yt)*et,(.5-It+Lt)*nt,(.5+It+yt)*et,(.5-gt+Lt)*nt)),lt.add(new go.PathSegment(go.PathSegment.Bezier,(.5-gt+yt)*et,(.5+Lt)*nt,(.5-It+yt)*et,(.5-gt+Lt)*nt,(.5-gt+yt)*et,(.5-It+Lt)*nt)),lt.add(new go.PathSegment(go.PathSegment.Bezier,(.5-It+yt)*et,(.5+gt+Lt)*nt,(.5-gt+yt)*et,(.5+It+Lt)*nt,(.5-It+yt)*et,(.5+gt+Lt)*nt)),gt=.2,yt=-.3,Lt=0,It=gt*ve,lt.add(new go.PathSegment(go.PathSegment.Bezier,(.5+yt)*et,(.5-gt+Lt)*nt,(1-.5+gt+yt-.05)*et,(.5-It+Lt-.02)*nt,(.5+It+yt)*et,(.5-gt+Lt)*nt)),lt.add(new go.PathSegment(go.PathSegment.Bezier,(.5-gt+yt)*et,(.5+Lt)*nt,(.5-It+yt)*et,(.5-gt+Lt)*nt,(.5-gt+yt)*et,(.5-It+Lt)*nt)),lt.add(new go.PathSegment(go.PathSegment.Bezier,(.5+yt)*et,(.5+gt+Lt)*nt,(.5-gt+yt)*et,(.5+It+Lt)*nt,(.5-It+yt)*et,(.5+gt+Lt)*nt)),lt.add(new go.PathSegment(go.PathSegment.Bezier,.4*et,.6*nt,(.5+It+yt)*et,(.5+gt+Lt)*nt,(.5+gt+yt)*et,(.5+It+Lt)*nt).close()),ct.setSpots(.06,.33,.93,.68),ct}),go.Shape.defineFigureGenerator("YinYang",function(Ut,et,nt){var ct=new go.Geometry,lt=new go.PathFigure(et*.5,0,!0);ct.add(lt),lt.add(new go.PathSegment(go.PathSegment.Arc,270,180,et*.5,et*.5,et*.5,et*.5)),lt.add(new go.PathSegment(go.PathSegment.Arc,90,-180,et*.5,et*.75,et*.25,et*.25)),lt.add(new go.PathSegment(go.PathSegment.Arc,90,180,et*.5,et*.25,et*.25,et*.25));var gt=.1,yt=.5,Lt=.25;return lt.add(new go.PathSegment(go.PathSegment.Move,(yt+gt)*et,Lt*nt)),lt.add(new go.PathSegment(go.PathSegment.Arc,0,-360,et*yt,nt*Lt,gt*et,gt*et).close()),lt=new go.PathFigure(et*.5,0,!1),ct.add(lt),lt.add(new go.PathSegment(go.PathSegment.Arc,270,-180,et*.5,et*.5,et*.5,et*.5)),Lt=.75,lt=new go.PathFigure((yt+gt)*et,Lt*nt,!0),ct.add(lt),lt.add(new go.PathSegment(go.PathSegment.Arc,0,360,et*yt,nt*Lt,gt*et,gt*et).close()),ct.defaultStretch=go.GraphObject.Uniform,ct}),go.Shape.defineFigureGenerator("Peace",function(Ut,et,nt){var ct=.8535533905932737,lt=.5*et,gt=.5*nt;return new go.Geometry().add(new go.PathFigure(lt,0,!1).add(new go.PathSegment(go.PathSegment.Arc,270,360,lt,gt,lt,gt)).add(new go.PathSegment(go.PathSegment.Line,lt,nt)).add(new go.PathSegment(go.PathSegment.Move,lt,gt)).add(new go.PathSegment(go.PathSegment.Line,(1-ct)*et,ct*nt)).add(new go.PathSegment(go.PathSegment.Move,lt,gt)).add(new go.PathSegment(go.PathSegment.Line,ct*et,ct*nt)))}),go.Shape.defineFigureGenerator("NotAllowed",function(Ut,et,nt){var ct=new go.Geometry,lt=ve*.5,gt=.5,yt=.5,Lt=.5,It=new go.PathFigure(yt*et,(Lt-gt)*nt);ct.add(It),It.add(new go.PathSegment(go.PathSegment.Bezier,(yt-gt)*et,Lt*nt,(yt-lt)*et,(Lt-gt)*nt,(yt-gt)*et,(Lt-lt)*nt)),It.add(new go.PathSegment(go.PathSegment.Bezier,yt*et,(Lt+gt)*nt,(yt-gt)*et,(Lt+lt)*nt,(yt-lt)*et,(Lt+gt)*nt)),It.add(new go.PathSegment(go.PathSegment.Bezier,(yt+gt)*et,Lt*nt,(yt+lt)*et,(Lt+gt)*nt,(yt+gt)*et,(Lt+lt)*nt)),It.add(new go.PathSegment(go.PathSegment.Bezier,yt*et,(Lt-gt)*nt,(yt+gt)*et,(Lt-lt)*nt,(yt+lt)*et,(Lt-gt)*nt)),gt=.4,lt=ve*.4;var Wt=bt(),qt=bt(),he=bt(),fe=bt();Ze(yt,Lt-gt,yt+lt,Lt-gt,yt+gt,Lt-lt,yt+gt,Lt,.42,Wt,qt,he,fe,fe);var Ae=bt(),Ve=bt(),ye=bt();Ze(yt,Lt-gt,yt+lt,Lt-gt,yt+gt,Lt-lt,yt+gt,Lt,.58,fe,fe,ye,Ae,Ve);var on=bt(),pn=bt(),Vn=bt();Ze(yt,Lt+gt,yt-lt,Lt+gt,yt-gt,Lt+lt,yt-gt,Lt,.42,on,pn,Vn,fe,fe);var ti=bt(),Xn=bt(),Li=bt();return Ze(yt,Lt+gt,yt-lt,Lt+gt,yt-gt,Lt+lt,yt-gt,Lt,.58,fe,fe,Li,ti,Xn),It.add(new go.PathSegment(go.PathSegment.Move,Li.x*et,Li.y*nt)),It.add(new go.PathSegment(go.PathSegment.Bezier,(yt-gt)*et,Lt*nt,ti.x*et,ti.y*nt,Xn.x*et,Xn.y*nt)),It.add(new go.PathSegment(go.PathSegment.Bezier,yt*et,(Lt-gt)*nt,(yt-gt)*et,(Lt-lt)*nt,(yt-lt)*et,(Lt-gt)*nt)),It.add(new go.PathSegment(go.PathSegment.Bezier,he.x*et,he.y*nt,Wt.x*et,Wt.y*nt,qt.x*et,qt.y*nt)),It.add(new go.PathSegment(go.PathSegment.Line,Li.x*et,Li.y*nt).close()),It.add(new go.PathSegment(go.PathSegment.Move,Vn.x*et,Vn.y*nt)),It.add(new go.PathSegment(go.PathSegment.Line,ye.x*et,ye.y*nt)),It.add(new go.PathSegment(go.PathSegment.Bezier,(yt+gt)*et,Lt*nt,Ae.x*et,Ae.y*nt,Ve.x*et,Ve.y*nt)),It.add(new go.PathSegment(go.PathSegment.Bezier,yt*et,(Lt+gt)*nt,(yt+gt)*et,(Lt+lt)*nt,(yt+lt)*et,(Lt+gt)*nt)),It.add(new go.PathSegment(go.PathSegment.Bezier,Vn.x*et,Vn.y*nt,on.x*et,on.y*nt,pn.x*et,pn.y*nt).close()),Be(Wt),Be(qt),Be(he),Be(fe),Be(Ae),Be(Ve),Be(ye),Be(on),Be(pn),Be(Vn),Be(ti),Be(Xn),Be(Li),ct.defaultStretch=go.GraphObject.Uniform,ct}),go.Shape.defineFigureGenerator("Fragile",function(Ut,et,nt){return new go.Geometry().add(new go.PathFigure(0,0,!0).add(new go.PathSegment(go.PathSegment.Line,.25*et,0)).add(new go.PathSegment(go.PathSegment.Line,.2*et,.15*nt)).add(new go.PathSegment(go.PathSegment.Line,.3*et,.25*nt)).add(new go.PathSegment(go.PathSegment.Line,.29*et,.33*nt)).add(new go.PathSegment(go.PathSegment.Line,.35*et,.25*nt)).add(new go.PathSegment(go.PathSegment.Line,.3*et,.15*nt)).add(new go.PathSegment(go.PathSegment.Line,.4*et,0)).add(new go.PathSegment(go.PathSegment.Line,et,0)).add(new go.PathSegment(go.PathSegment.Bezier,.55*et,.5*nt,et,.25*nt,.75*et,.5*nt)).add(new go.PathSegment(go.PathSegment.Line,.55*et,.9*nt)).add(new go.PathSegment(go.PathSegment.Line,.7*et,.9*nt)).add(new go.PathSegment(go.PathSegment.Line,.7*et,nt)).add(new go.PathSegment(go.PathSegment.Line,.3*et,nt)).add(new go.PathSegment(go.PathSegment.Line,.3*et,.9*nt)).add(new go.PathSegment(go.PathSegment.Line,.45*et,.9*nt)).add(new go.PathSegment(go.PathSegment.Line,.45*et,.5*nt)).add(new go.PathSegment(go.PathSegment.Bezier,0,0,.25*et,.5*nt,0,.25*nt).close()))}),go.Shape.setFigureParameter("HourGlass",0,new Cn("Thickness",30)),go.Shape.defineFigureGenerator("HourGlass",function(Ut,et,nt){var ct=Ut?Ut.parameter1:NaN;(isNaN(ct)||ct<0)&&(ct=30),ct>et&&(ct=et);var lt=(et-ct)/2,gt=lt+ct;return new go.Geometry().add(new go.PathFigure(gt,.5*nt).add(new go.PathSegment(go.PathSegment.Line,et,nt)).add(new go.PathSegment(go.PathSegment.Line,0,nt)).add(new go.PathSegment(go.PathSegment.Line,lt,.5*nt)).add(new go.PathSegment(go.PathSegment.Line,0,0)).add(new go.PathSegment(go.PathSegment.Line,et,0).close()))}),go.Shape.defineFigureGenerator("Lightning",function(Ut,et,nt){return new go.Geometry().add(new go.PathFigure(0,.55*nt).add(new go.PathSegment(go.PathSegment.Line,.6*et,0)).add(new go.PathSegment(go.PathSegment.Line,.3*et,.45*nt)).add(new go.PathSegment(go.PathSegment.Line,et,.45*nt)).add(new go.PathSegment(go.PathSegment.Line,.4*et,nt)).add(new go.PathSegment(go.PathSegment.Line,.7*et,.55*nt).close()))}),go.Shape.defineFigureGenerator("GenderMale",function(Ut,et,nt){var ct=new go.Geometry,lt=ve*.4,gt=.4,yt=.5,Lt=.5,It=bt(),Wt=bt(),qt=bt(),he=bt(),fe=new go.PathFigure((yt-gt)*et,Lt*nt,!1);ct.add(fe),fe.add(new go.PathSegment(go.PathSegment.Bezier,yt*et,(Lt-gt)*nt,(yt-gt)*et,(Lt-lt)*nt,(yt-lt)*et,(Lt-gt)*nt)),Ze(yt,Lt-gt,yt+lt,Lt-gt,yt+gt,Lt-lt,yt+gt,Lt,.44,qt,he,Wt,It,It),fe.add(new go.PathSegment(go.PathSegment.Bezier,Wt.x*et,Wt.y*nt,qt.x*et,qt.y*nt,he.x*et,he.y*nt));var Ae=ne(Wt.x,Wt.y);Ze(yt,Lt-gt,yt+lt,Lt-gt,yt+gt,Lt-lt,yt+gt,Lt,.56,It,It,Wt,qt,he);var Ve=ne(Wt.x,Wt.y);fe.add(new go.PathSegment(go.PathSegment.Line,(Ae.x*.1+.95*.9)*et,Ae.y*.1*nt)),fe.add(new go.PathSegment(go.PathSegment.Line,.85*et,Ae.y*.1*nt)),fe.add(new go.PathSegment(go.PathSegment.Line,.85*et,0)),fe.add(new go.PathSegment(go.PathSegment.Line,et,0)),fe.add(new go.PathSegment(go.PathSegment.Line,et,.15*nt)),fe.add(new go.PathSegment(go.PathSegment.Line,(Ve.x*.1+.9)*et,.15*nt)),fe.add(new go.PathSegment(go.PathSegment.Line,(Ve.x*.1+.9)*et,(Ve.y*.1+.05*.9)*nt)),fe.add(new go.PathSegment(go.PathSegment.Line,Ve.x*et,Ve.y*nt)),fe.add(new go.PathSegment(go.PathSegment.Bezier,(yt+gt)*et,Lt*nt,qt.x*et,qt.y*nt,he.x*et,he.y*nt)),fe.add(new go.PathSegment(go.PathSegment.Bezier,yt*et,(Lt+gt)*nt,(yt+gt)*et,(Lt+lt)*nt,(yt+lt)*et,(Lt+gt)*nt)),fe.add(new go.PathSegment(go.PathSegment.Bezier,(yt-gt)*et,Lt*nt,(yt-lt)*et,(Lt+gt)*nt,(yt-gt)*et,(Lt+lt)*nt)),gt=.35,lt=ve*.35;var ye=new go.PathFigure(yt*et,(Lt-gt)*nt,!1);ct.add(ye),ye.add(new go.PathSegment(go.PathSegment.Bezier,(yt-gt)*et,Lt*nt,(yt-lt)*et,(Lt-gt)*nt,(yt-gt)*et,(Lt-lt)*nt)),ye.add(new go.PathSegment(go.PathSegment.Bezier,yt*et,(Lt+gt)*nt,(yt-gt)*et,(Lt+lt)*nt,(yt-lt)*et,(Lt+gt)*nt)),ye.add(new go.PathSegment(go.PathSegment.Bezier,(yt+gt)*et,Lt*nt,(yt+lt)*et,(Lt+gt)*nt,(yt+gt)*et,(Lt+lt)*nt)),ye.add(new go.PathSegment(go.PathSegment.Bezier,yt*et,(Lt-gt)*nt,(yt+gt)*et,(Lt-lt)*nt,(yt+lt)*et,(Lt-gt)*nt));var on=new go.PathFigure((yt-gt)*et,Lt*nt,!1);return ct.add(on),Be(It),Be(Wt),Be(qt),Be(he),Be(Ae),Be(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(Ut,et,nt){var ct=new go.Geometry,lt=.375,gt=0,yt=-.125,Lt=lt*ve,It=new go.PathFigure((.525+gt)*et,(.5+lt+yt)*nt,!1);ct.add(It),It.add(new go.PathSegment(go.PathSegment.Bezier,(1-.5+lt+gt)*et,(.5+yt)*nt,(.5+Lt+gt)*et,(.5+lt+yt)*nt,(.5+lt+gt)*et,(.5+Lt+yt)*nt)),It.add(new go.PathSegment(go.PathSegment.Bezier,(.5+gt)*et,(.5-lt+yt)*nt,(1-.5+lt+gt)*et,(.5-Lt+yt)*nt,(.5+Lt+gt)*et,(.5-lt+yt)*nt)),It.add(new go.PathSegment(go.PathSegment.Bezier,(.5-lt+gt)*et,(.5+yt)*nt,(.5-Lt+gt)*et,(.5-lt+yt)*nt,(.5-lt+gt)*et,(.5-Lt+yt)*nt)),It.add(new go.PathSegment(go.PathSegment.Bezier,(.475+gt)*et,(.5+lt+yt)*nt,(.5-lt+gt)*et,(.5+Lt+yt)*nt,(.5-Lt+gt)*et,(.5+lt+yt)*nt)),It.add(new go.PathSegment(go.PathSegment.Line,.475*et,.85*nt)),It.add(new go.PathSegment(go.PathSegment.Line,.425*et,.85*nt)),It.add(new go.PathSegment(go.PathSegment.Line,.425*et,.9*nt)),It.add(new go.PathSegment(go.PathSegment.Line,.475*et,.9*nt)),It.add(new go.PathSegment(go.PathSegment.Line,.475*et,nt)),It.add(new go.PathSegment(go.PathSegment.Line,.525*et,nt)),It.add(new go.PathSegment(go.PathSegment.Line,.525*et,.9*nt)),It.add(new go.PathSegment(go.PathSegment.Line,.575*et,.9*nt)),It.add(new go.PathSegment(go.PathSegment.Line,.575*et,.85*nt)),It.add(new go.PathSegment(go.PathSegment.Line,.525*et,.85*nt).close()),lt=.325,gt=0,yt=-.125,Lt=lt*ve;var It=new go.PathFigure((1-.5+lt+gt)*et,(.5+yt)*nt,!1);ct.add(It),It.add(new go.PathSegment(go.PathSegment.Bezier,(.5+gt)*et,(.5+lt+yt)*nt,(.5+lt+gt)*et,(.5+Lt+yt)*nt,(.5+Lt+gt)*et,(.5+lt+yt)*nt)),It.add(new go.PathSegment(go.PathSegment.Bezier,(.5-lt+gt)*et,(.5+yt)*nt,(.5-Lt+gt)*et,(.5+lt+yt)*nt,(.5-lt+gt)*et,(.5+Lt+yt)*nt)),It.add(new go.PathSegment(go.PathSegment.Bezier,(.5+gt)*et,(.5-lt+yt)*nt,(.5-lt+gt)*et,(.5-Lt+yt)*nt,(.5-Lt+gt)*et,(.5-lt+yt)*nt)),It.add(new go.PathSegment(go.PathSegment.Bezier,(1-.5+lt+gt)*et,(.5+yt)*nt,(.5+Lt+gt)*et,(.5-lt+yt)*nt,(1-.5+lt+gt)*et,(.5-Lt+yt)*nt));var It=new go.PathFigure((.525+gt)*et,(.5+lt+yt)*nt,!1);return ct.add(It),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(Ut,et,nt){var ct=Ut?Ut.parameter1:NaN;return isNaN(ct)&&(ct=.2),new go.Geometry().add(new go.PathFigure((1-ct)*et,0,!1).add(new go.PathSegment(go.PathSegment.Line,et,.5*nt)).add(new go.PathSegment(go.PathSegment.Line,(1-ct)*et,nt)).add(new go.PathSegment(go.PathSegment.Move,0,.5*nt)).add(new go.PathSegment(go.PathSegment.Line,et,.5*nt))).setSpots(0,0,.8,.5)}),go.Shape.defineFigureGenerator("LogicIff",function(Ut,et,nt){var ct=Ut?Ut.parameter1:NaN;return isNaN(ct)&&(ct=.2),new go.Geometry().add(new go.PathFigure((1-ct)*et,0,!1).add(new go.PathSegment(go.PathSegment.Line,et,.5*nt)).add(new go.PathSegment(go.PathSegment.Line,(1-ct)*et,nt)).add(new go.PathSegment(go.PathSegment.Move,0,.5*nt)).add(new go.PathSegment(go.PathSegment.Line,et,.5*nt)).add(new go.PathSegment(go.PathSegment.Move,ct*et,0)).add(new go.PathSegment(go.PathSegment.Line,0,.5*nt)).add(new go.PathSegment(go.PathSegment.Line,ct*et,nt))).setSpots(.2,0,.8,.5)}),go.Shape.defineFigureGenerator("LogicNot",function(Ut,et,nt){return new go.Geometry().add(new go.PathFigure(0,0,!1).add(new go.PathSegment(go.PathSegment.Line,et,0)).add(new go.PathSegment(go.PathSegment.Line,et,nt)))}),go.Shape.defineFigureGenerator("LogicAnd",function(Ut,et,nt){return new go.Geometry().add(new go.PathFigure(0,nt,!1).add(new go.PathSegment(go.PathSegment.Line,.5*et,0)).add(new go.PathSegment(go.PathSegment.Line,et,nt))).setSpots(.25,.5,.75,1)}),go.Shape.defineFigureGenerator("LogicOr",function(Ut,et,nt){return new go.Geometry().add(new go.PathFigure(0,0,!1).add(new go.PathSegment(go.PathSegment.Line,.5*et,nt)).add(new go.PathSegment(go.PathSegment.Line,et,0))).setSpots(.219,0,.78,.409)}),go.Shape.defineFigureGenerator("LogicXor",function(Ut,et,nt){var ct=new go.Geometry().add(new go.PathFigure(.5*et,0,!1).add(new go.PathSegment(go.PathSegment.Line,.5*et,nt)).add(new go.PathSegment(go.PathSegment.Move,0,.5*nt)).add(new go.PathSegment(go.PathSegment.Line,et,.5*nt)).add(new go.PathSegment(go.PathSegment.Arc,0,360,.5*et,.5*nt,.5*et,.5*nt)));return ct.defaultStretch=go.GraphObject.Uniform,ct}),go.Shape.defineFigureGenerator("LogicTruth",function(Ut,et,nt){return new go.Geometry().add(new go.PathFigure(0,0,!1).add(new go.PathSegment(go.PathSegment.Line,et,0)).add(new go.PathSegment(go.PathSegment.Move,.5*et,0)).add(new go.PathSegment(go.PathSegment.Line,.5*et,nt)))}),go.Shape.defineFigureGenerator("LogicFalsity",function(Ut,et,nt){return new go.Geometry().add(new go.PathFigure(0,nt,!1).add(new go.PathSegment(go.PathSegment.Line,et,nt)).add(new go.PathSegment(go.PathSegment.Move,.5*et,nt)).add(new go.PathSegment(go.PathSegment.Line,.5*et,0)))}),go.Shape.defineFigureGenerator("LogicThereExists",function(Ut,et,nt){return new go.Geometry().add(new go.PathFigure(0,0,!1).add(new go.PathSegment(go.PathSegment.Line,et,0)).add(new go.PathSegment(go.PathSegment.Line,et,.5*nt)).add(new go.PathSegment(go.PathSegment.Line,0,.5*nt)).add(new go.PathSegment(go.PathSegment.Move,et,.5*nt)).add(new go.PathSegment(go.PathSegment.Line,et,nt)).add(new go.PathSegment(go.PathSegment.Line,0,nt)))}),go.Shape.defineFigureGenerator("LogicForAll",function(Ut,et,nt){return new go.Geometry().add(new go.PathFigure(0,0,!1).add(new go.PathSegment(go.PathSegment.Line,.5*et,nt)).add(new go.PathSegment(go.PathSegment.Line,et,0)).add(new go.PathSegment(go.PathSegment.Move,.25*et,.5*nt)).add(new go.PathSegment(go.PathSegment.Line,.75*et,.5*nt))).setSpots(.25,0,.75,.5)}),go.Shape.defineFigureGenerator("LogicIsDefinedAs",function(Ut,et,nt){return new go.Geometry().add(new go.PathFigure(0,0,!1).add(new go.PathSegment(go.PathSegment.Line,et,0)).add(new go.PathSegment(go.PathSegment.Move,0,.5*nt)).add(new go.PathSegment(go.PathSegment.Line,et,.5*nt)).add(new go.PathSegment(go.PathSegment.Move,0,nt)).add(new go.PathSegment(go.PathSegment.Line,et,nt))).setSpots(.01,.01,.99,.49)}),go.Shape.defineFigureGenerator("LogicIntersect",function(Ut,et,nt){var ct=.5;return new go.Geometry().add(new go.PathFigure(0,nt,!1).add(new go.PathSegment(go.PathSegment.Line,0,ct*nt)).add(new go.PathSegment(go.PathSegment.Arc,180,180,ct*et,ct*nt,ct*et,ct*nt)).add(new go.PathSegment(go.PathSegment.Line,et,nt))).setSpots(0,.5,1,1)}),go.Shape.defineFigureGenerator("LogicUnion",function(Ut,et,nt){var ct=.5;return new go.Geometry().add(new go.PathFigure(et,0,!1).add(new go.PathSegment(go.PathSegment.Line,et,ct*nt)).add(new go.PathSegment(go.PathSegment.Arc,0,180,ct*et,ct*nt,ct*et,ct*nt)).add(new go.PathSegment(go.PathSegment.Line,0,0))).setSpots(0,0,1,.5)}),go.Shape.setFigureParameter("Arrow",0,new Cn("ArrowheadWidth",.3,.01,.99)),go.Shape.setFigureParameter("Arrow",1,new Cn("TailHeight",.3,.01,.99)),go.Shape.defineFigureGenerator("Arrow",function(Ut,et,nt){var ct=Ut?Ut.parameter1:NaN;isNaN(ct)&&(ct=.3);var lt=Ut?Ut.parameter2:NaN;isNaN(lt)&&(lt=.3);var gt=(1-ct)*et,yt=(.5-lt/2)*nt,Lt=(.5+lt/2)*nt,It=new go.Geometry,Wt=new go.PathFigure(0,yt,!0);It.add(Wt),Wt.add(new go.PathSegment(go.PathSegment.Line,gt,yt)),Wt.add(new go.PathSegment(go.PathSegment.Line,gt,0)),Wt.add(new go.PathSegment(go.PathSegment.Line,et,.5*nt)),Wt.add(new go.PathSegment(go.PathSegment.Line,gt,nt)),Wt.add(new go.PathSegment(go.PathSegment.Line,gt,Lt)),Wt.add(new go.PathSegment(go.PathSegment.Line,0,Lt).close()),It.spot1=new go.Spot(0,yt/nt);var qt=Ee(0,Lt/nt,1,Lt/nt,gt/et,1,1,.5,bt());return It.spot2=new go.Spot(qt.x,qt.y),Be(qt),It}),go.Shape.setFigureParameter("Arrow2",0,new Cn("ArrowheadWidth",30)),go.Shape.setFigureParameter("Arrow2",0,new Cn("TailHeight",30)),go.Shape.defineFigureGenerator("Arrow2",function(Ut,et,nt){var ct=Ut?Ut.parameter1:NaN;isNaN(ct)&&(ct=30),ct>et&&(ct=et);var lt=Ut?Ut.parameter2:NaN;isNaN(lt)&&(lt=30),lt=Math.min(lt,nt/2);var gt=et-ct,yt=(nt-lt)/2,Lt=yt+lt,It=new go.Geometry,Wt=new go.PathFigure(0,yt,!0);It.add(Wt),Wt.add(new go.PathSegment(go.PathSegment.Line,gt,yt)),Wt.add(new go.PathSegment(go.PathSegment.Line,gt,0)),Wt.add(new go.PathSegment(go.PathSegment.Line,et,.5*nt)),Wt.add(new go.PathSegment(go.PathSegment.Line,gt,nt)),Wt.add(new go.PathSegment(go.PathSegment.Line,gt,Lt)),Wt.add(new go.PathSegment(go.PathSegment.Line,0,Lt).close()),It.spot1=new go.Spot(0,yt/nt);var qt=Ee(0,Lt/nt,1,Lt/nt,gt/et,1,1,.5,bt());return It.spot2=new go.Spot(qt.x,qt.y),Be(qt),It}),go.Shape.defineFigureGenerator("Chevron",function(Ut,et,nt){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*et,0)),lt.add(new go.PathSegment(go.PathSegment.Line,et,.5*nt)),lt.add(new go.PathSegment(go.PathSegment.Line,.5*et,nt)),lt.add(new go.PathSegment(go.PathSegment.Line,0,nt)),lt.add(new go.PathSegment(go.PathSegment.Line,.5*et,.5*nt).close()),ct}),go.Shape.defineFigureGenerator("DoubleArrow",function(Ut,et,nt){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*et,.214*nt)),lt.add(new go.PathSegment(go.PathSegment.Line,.3*et,0)),lt.add(new go.PathSegment(go.PathSegment.Line,1*et,.5*nt)),lt.add(new go.PathSegment(go.PathSegment.Line,.3*et,1*nt)),lt.add(new go.PathSegment(go.PathSegment.Line,.3*et,.786*nt)),lt.add(new go.PathSegment(go.PathSegment.Line,0,1*nt).close()),ct}),go.Shape.setFigureParameter("DoubleEndArrow",0,new Cn("ConnecterHeight",.3,.01,.99)),go.Shape.defineFigureGenerator("DoubleEndArrow",function(Ut,et,nt){var ct=Ut?Ut.parameter1:NaN;isNaN(ct)&&(ct=.3);var lt=(.5-ct/2)*nt,gt=(.5+ct/2)*nt,yt=new go.Geometry,Lt=new go.PathFigure(et,.5*nt,!0);yt.add(Lt),Lt.add(new go.PathSegment(go.PathSegment.Line,.7*et,nt)),Lt.add(new go.PathSegment(go.PathSegment.Line,.7*et,gt)),Lt.add(new go.PathSegment(go.PathSegment.Line,.3*et,gt)),Lt.add(new go.PathSegment(go.PathSegment.Line,.3*et,nt)),Lt.add(new go.PathSegment(go.PathSegment.Line,0,.5*nt)),Lt.add(new go.PathSegment(go.PathSegment.Line,.3*et,0)),Lt.add(new go.PathSegment(go.PathSegment.Line,.3*et,lt)),Lt.add(new go.PathSegment(go.PathSegment.Line,.7*et,lt)),Lt.add(new go.PathSegment(go.PathSegment.Line,.7*et,0).close());var It=Ee(0,.5,.3,0,0,lt/nt,.1,lt/nt,bt());return yt.spot1=new go.Spot(It.x,It.y),It=Ee(.7,1,1,.5,0,gt/nt,1,gt/nt,It),yt.spot2=new go.Spot(It.x,It.y),Be(It),yt}),go.Shape.setFigureParameter("DoubleEndArrow2",0,new Cn("ConnecterHeight",40)),go.Shape.setFigureParameter("DoubleEndArrow2",1,new Cn("ArrowHeight",100)),go.Shape.defineFigureGenerator("DoubleEndArrow2",function(Ut,et,nt){var ct=Ut?Ut.parameter1:NaN;isNaN(ct)&&(ct=40);var lt=Ut?Ut.parameter2:NaN;isNaN(lt)&&(lt=100);var gt=(nt-ct)/2,yt=gt+ct,Lt=(nt-lt)/2,It=Lt+lt;(ct>nt||lt>nt)&&(lt>ct?(ct=ct*nt/lt,gt=(nt-ct)/2,yt=gt+ct,Lt=0,It=nt):(gt=0,yt=nt,Lt=0,It=nt));var Wt=new go.Geometry,qt=new go.PathFigure(et,.5*nt,!0);Wt.add(qt),qt.add(new go.PathSegment(go.PathSegment.Line,.7*et,It)),qt.add(new go.PathSegment(go.PathSegment.Line,.7*et,yt)),qt.add(new go.PathSegment(go.PathSegment.Line,.3*et,yt)),qt.add(new go.PathSegment(go.PathSegment.Line,.3*et,It)),qt.add(new go.PathSegment(go.PathSegment.Line,0,.5*nt)),qt.add(new go.PathSegment(go.PathSegment.Line,.3*et,Lt)),qt.add(new go.PathSegment(go.PathSegment.Line,.3*et,gt)),qt.add(new go.PathSegment(go.PathSegment.Line,.7*et,gt)),qt.add(new go.PathSegment(go.PathSegment.Line,.7*et,Lt).close());var he=Ee(0,.5,.3,Lt/nt,0,gt/nt,1,gt/nt,bt());return Wt.spot1=new go.Spot(he.x,he.y),he=Ee(.7,It/nt,1,.5,0,yt/nt,1,yt/nt,he),Wt.spot2=new go.Spot(he.x,he.y),Be(he),Wt}),go.Shape.setFigureParameter("IBeamArrow",0,new Cn("ConnectorHeight",.7,.51,.97)),go.Shape.defineFigureGenerator("IBeamArrow",function(Ut,et,nt){var ct=Ut?Ut.parameter1:NaN;isNaN(ct)&&(ct=.3);var lt=(.5-ct/2)*nt,gt=(.5+ct/2)*nt,yt=new go.Geometry,Lt=new go.PathFigure(et,.5*nt,!0);yt.add(Lt),Lt.add(new go.PathSegment(go.PathSegment.Line,.7*et,nt)),Lt.add(new go.PathSegment(go.PathSegment.Line,.7*et,gt)),Lt.add(new go.PathSegment(go.PathSegment.Line,.2*et,gt)),Lt.add(new go.PathSegment(go.PathSegment.Line,.2*et,nt)),Lt.add(new go.PathSegment(go.PathSegment.Line,0,nt)),Lt.add(new go.PathSegment(go.PathSegment.Line,0,0)),Lt.add(new go.PathSegment(go.PathSegment.Line,.2*et,0)),Lt.add(new go.PathSegment(go.PathSegment.Line,.2*et,lt)),Lt.add(new go.PathSegment(go.PathSegment.Line,.7*et,lt)),Lt.add(new go.PathSegment(go.PathSegment.Line,.7*et,0).close()),yt.spot1=new go.Spot(0,lt/nt);var It=Ee(.7,1,1,.5,0,gt/nt,1,gt/nt,bt());return yt.spot2=new go.Spot(It.x,It.y),Be(It),yt}),go.Shape.setFigureParameter("IBeamArrow2",0,new Cn("ConnectorHeight",40)),go.Shape.setFigureParameter("IBeamArrow2",1,new Cn("BeamArrowHeight",100)),go.Shape.defineFigureGenerator("IBeamArrow2",function(Ut,et,nt){var ct=Ut?Ut.parameter1:NaN;isNaN(ct)&&(ct=40);var lt=Ut?Ut.parameter2:NaN;isNaN(lt)&&(lt=100);var gt=(nt-ct)/2,yt=gt+ct,Lt=(nt-lt)/2,It=Lt+lt;(ct>nt||lt>nt)&&(lt>ct?(ct=ct*nt/lt,gt=(nt-ct)/2,yt=gt+ct,Lt=0,It=nt):(gt=0,yt=nt,Lt=0,It=nt));var Wt=new go.Geometry,qt=new go.PathFigure(et,.5*nt,!0);Wt.add(qt),qt.add(new go.PathSegment(go.PathSegment.Line,.7*et,It)),qt.add(new go.PathSegment(go.PathSegment.Line,.7*et,yt)),qt.add(new go.PathSegment(go.PathSegment.Line,.2*et,yt)),qt.add(new go.PathSegment(go.PathSegment.Line,.2*et,It)),qt.add(new go.PathSegment(go.PathSegment.Line,0,It)),qt.add(new go.PathSegment(go.PathSegment.Line,0,Lt)),qt.add(new go.PathSegment(go.PathSegment.Line,.2*et,Lt)),qt.add(new go.PathSegment(go.PathSegment.Line,.2*et,gt)),qt.add(new go.PathSegment(go.PathSegment.Line,.7*et,gt)),qt.add(new go.PathSegment(go.PathSegment.Line,.7*et,Lt).close()),Wt.spot1=new go.Spot(0,gt/nt);var he=Ee(.7,It/nt,1,.5,0,yt/nt,1,yt/nt,bt());return Wt.spot2=new go.Spot(he.x,he.y),Be(he),Wt}),go.Shape.setFigureParameter("Pointer",0,new Cn("BackPoint",.1,0,.2)),go.Shape.defineFigureGenerator("Pointer",function(Ut,et,nt){var ct=Ut?Ut.parameter1:NaN;isNaN(ct)&&(ct=.1);var lt=new go.Geometry,gt=new go.PathFigure(et,.5*nt,!0);lt.add(gt),gt.add(new go.PathSegment(go.PathSegment.Line,0,nt)),gt.add(new go.PathSegment(go.PathSegment.Line,ct*et,.5*nt)),gt.add(new go.PathSegment(go.PathSegment.Line,0,0).close()),lt.spot1=new go.Spot(ct,.35);var yt=Ee(.2,.65,1,.65,0,1,1,.5,bt());return lt.spot2=new go.Spot(yt.x,yt.y),Be(yt),lt}),go.Shape.setFigureParameter("RoundedPointer",0,new Cn("RoundedEdge",.3,0,.5)),go.Shape.defineFigureGenerator("RoundedPointer",function(Ut,et,nt){var ct=Ut?Ut.parameter1:NaN;isNaN(ct)&&(ct=.3);var lt=new go.Geometry,gt=new go.PathFigure(et,.5*nt,!0);lt.add(gt),gt.add(new go.PathSegment(go.PathSegment.Line,0,nt)),gt.add(new go.PathSegment(go.PathSegment.Bezier,0,0,ct*et,.75*nt,ct*et,.25*nt).close()),lt.spot1=new go.Spot(ct,.35);var yt=Ee(0,.65,1,.65,0,1,1,.5,bt());return lt.spot2=new go.Spot(yt.x,yt.y),Be(yt),lt}),go.Shape.setFigureParameter("SplitEndArrow",0,new Cn("TailHeight",.4,.01,.99)),go.Shape.defineFigureGenerator("SplitEndArrow",function(Ut,et,nt){var ct=Ut?Ut.parameter1:NaN;isNaN(ct)&&(ct=.4);var lt=(.5-ct/2)*nt,gt=(.5+ct/2)*nt,yt=new go.Geometry,Lt=new go.PathFigure(et,.5*nt,!0);yt.add(Lt),Lt.add(new go.PathSegment(go.PathSegment.Line,.7*et,nt)),Lt.add(new go.PathSegment(go.PathSegment.Line,.7*et,gt)),Lt.add(new go.PathSegment(go.PathSegment.Line,0,gt)),Lt.add(new go.PathSegment(go.PathSegment.Line,.2*et,.5*nt)),Lt.add(new go.PathSegment(go.PathSegment.Line,0,lt)),Lt.add(new go.PathSegment(go.PathSegment.Line,.7*et,lt)),Lt.add(new go.PathSegment(go.PathSegment.Line,.7*et,0).close()),yt.spot1=new go.Spot(.2,.3);var It=Ee(.7,1,1,.5,0,gt/nt,1,gt/nt,bt());return yt.spot2=new go.Spot(It.x,It.y),Be(It),yt}),go.Shape.setFigureParameter("SplitEndArrow2",0,new Cn("TailThickness",50)),go.Shape.defineFigureGenerator("SplitEndArrow2",function(Ut,et,nt){var ct=Ut?Ut.parameter1:NaN;isNaN(ct)&&(ct=50);var lt=(nt-ct)/2,gt=lt+ct;ct>nt&&(lt=0,gt=nt);var yt=new go.Geometry,Lt=new go.PathFigure(et,.5*nt,!0);yt.add(Lt),Lt.add(new go.PathSegment(go.PathSegment.Line,.7*et,nt)),Lt.add(new go.PathSegment(go.PathSegment.Line,.7*et,gt)),Lt.add(new go.PathSegment(go.PathSegment.Line,0,gt)),Lt.add(new go.PathSegment(go.PathSegment.Line,.2*et,.5*nt)),Lt.add(new go.PathSegment(go.PathSegment.Line,0,lt)),Lt.add(new go.PathSegment(go.PathSegment.Line,.7*et,lt)),Lt.add(new go.PathSegment(go.PathSegment.Line,.7*et,0).close()),yt.spot1=new go.Spot(.2,lt/nt);var It=Ee(.7,1,1,.5,0,gt/nt,1,gt/nt,bt());return yt.spot2=new go.Spot(It.x,It.y),Be(It),yt}),go.Shape.setFigureParameter("SquareArrow",0,new Cn("ArrowPoint",.7,.2,.9)),go.Shape.defineFigureGenerator("SquareArrow",function(Ut,et,nt){var ct=Ut?Ut.parameter1:NaN;isNaN(ct)&&(ct=.7);var lt=new go.Geometry,gt=new go.PathFigure(et,.5*nt,!0);return lt.add(gt),gt.add(new go.PathSegment(go.PathSegment.Line,ct*et,nt)),gt.add(new go.PathSegment(go.PathSegment.Line,0,nt)),gt.add(new go.PathSegment(go.PathSegment.Line,0,0)),gt.add(new go.PathSegment(go.PathSegment.Line,ct*et,0).close()),lt.spot1=go.Spot.TopLeft,lt.spot2=new go.Spot(ct,1),lt}),go.Shape.defineFigureGenerator("Cone1",function(Ut,et,nt){var ct=new go.Geometry,lt=ve*.5,gt=ve*.1,yt=new go.PathFigure(0,.9*nt,!0);return ct.add(yt),yt.add(new go.PathSegment(go.PathSegment.Line,.5*et,0)),yt.add(new go.PathSegment(go.PathSegment.Line,et,.9*nt)),yt.add(new go.PathSegment(go.PathSegment.Bezier,.5*et,nt,et,(.9+gt)*nt,(.5+lt)*et,nt)),yt.add(new go.PathSegment(go.PathSegment.Bezier,0,.9*nt,(.5-lt)*et,nt,0,(.9+gt)*nt).close()),ct.spot1=new go.Spot(.25,.5),ct.spot2=new go.Spot(.75,.97),ct}),go.Shape.defineFigureGenerator("Cone2",function(Ut,et,nt){var ct=new go.Geometry,lt=new go.PathFigure(0,.9*nt,!0);ct.add(lt),lt.add(new go.PathSegment(go.PathSegment.Bezier,et,.9*nt,(1-.85/.9)*et,nt,.85/.9*et,nt)),lt.add(new go.PathSegment(go.PathSegment.Line,.5*et,0)),lt.add(new go.PathSegment(go.PathSegment.Line,0,.9*nt).close());var gt=new go.PathFigure(0,.9*nt,!1);return ct.add(gt),gt.add(new go.PathSegment(go.PathSegment.Bezier,et,.9*nt,(1-.85/.9)*et,.8*nt,.85/.9*et,.8*nt)),ct.spot1=new go.Spot(.25,.5),ct.spot2=new go.Spot(.75,.82),ct}),go.Shape.defineFigureGenerator("Cube1",function(Ut,et,nt){var ct=new go.Geometry,lt=new go.PathFigure(.5*et,nt,!0);ct.add(lt),lt.add(new go.PathSegment(go.PathSegment.Line,et,.85*nt)),lt.add(new go.PathSegment(go.PathSegment.Line,et,.15*nt)),lt.add(new go.PathSegment(go.PathSegment.Line,.5*et,0)),lt.add(new go.PathSegment(go.PathSegment.Line,0,.15*nt)),lt.add(new go.PathSegment(go.PathSegment.Line,0,.85*nt).close());var gt=new go.PathFigure(.5*et,nt,!1);return ct.add(gt),gt.add(new go.PathSegment(go.PathSegment.Line,.5*et,.3*nt)),gt.add(new go.PathSegment(go.PathSegment.Line,0,.15*nt)),gt.add(new go.PathSegment(go.PathSegment.Move,.5*et,.3*nt)),gt.add(new go.PathSegment(go.PathSegment.Line,et,.15*nt)),ct.spot1=new go.Spot(0,.3),ct.spot2=new go.Spot(.5,.85),ct}),go.Shape.defineFigureGenerator("Cube2",function(Ut,et,nt){var ct=new go.Geometry,lt=new go.PathFigure(0,.3*nt,!0);ct.add(lt),lt.add(new go.PathSegment(go.PathSegment.Line,0,nt)),lt.add(new go.PathSegment(go.PathSegment.Line,.7*et,nt)),lt.add(new go.PathSegment(go.PathSegment.Line,et,.7*nt)),lt.add(new go.PathSegment(go.PathSegment.Line,et,0)),lt.add(new go.PathSegment(go.PathSegment.Line,.3*et,0).close());var gt=new go.PathFigure(0,.3*nt,!1);return ct.add(gt),gt.add(new go.PathSegment(go.PathSegment.Line,.7*et,.3*nt)),gt.add(new go.PathSegment(go.PathSegment.Line,et,0)),gt.add(new go.PathSegment(go.PathSegment.Move,.7*et,.3*nt)),gt.add(new go.PathSegment(go.PathSegment.Line,.7*et,nt)),ct.spot1=new go.Spot(0,.3),ct.spot2=new go.Spot(.7,1),ct}),go.Shape.defineFigureGenerator("Cylinder1",function(Ut,et,nt){var ct=Ut?Ut.parameter1:NaN;isNaN(ct)&&(ct=5),ct=Math.min(ct,nt/3);var lt=new go.Geometry,gt=ve*.5,yt=new go.PathFigure(0,ct,!0);lt.add(yt),yt.add(new go.PathSegment(go.PathSegment.Bezier,.5*et,0,0,ve*ct,(.5-gt)*et,0)),yt.add(new go.PathSegment(go.PathSegment.Bezier,1*et,ct,(.5+gt)*et,0,1*et,ve*ct)),yt.add(new go.PathSegment(go.PathSegment.Line,et,nt-ct)),yt.add(new go.PathSegment(go.PathSegment.Bezier,.5*et,1*nt,1*et,nt-ve*ct,(.5+gt)*et,1*nt)),yt.add(new go.PathSegment(go.PathSegment.Bezier,0,nt-ct,(.5-gt)*et,1*nt,0,nt-ve*ct)),yt.add(new go.PathSegment(go.PathSegment.Line,0,ct));var Lt=new go.PathFigure(et,ct,!1);return lt.add(Lt),Lt.add(new go.PathSegment(go.PathSegment.Bezier,.5*et,2*ct,1*et,2*ct-ve*ct,(.5+gt)*et,2*ct)),Lt.add(new go.PathSegment(go.PathSegment.Bezier,0,ct,(.5-gt)*et,2*ct,0,2*ct-ve*ct)),lt.spot1=new go.Spot(0,0,0,2*ct),lt.spot2=new go.Spot(1,1),lt}),go.Shape.defineFigureGenerator("Cylinder2",function(Ut,et,nt){var ct=Ut?Ut.parameter1:NaN;isNaN(ct)&&(ct=5),ct=Math.min(ct,nt/3);var lt=new go.Geometry,gt=ve*.5,yt=new go.PathFigure(0,nt-ct,!0);lt.add(yt),yt.add(new go.PathSegment(go.PathSegment.Line,0,ct)),yt.add(new go.PathSegment(go.PathSegment.Bezier,.5*et,0,0,ve*ct,(.5-gt)*et,0)),yt.add(new go.PathSegment(go.PathSegment.Bezier,et,ct,(.5+gt)*et,0,et,ve*ct)),yt.add(new go.PathSegment(go.PathSegment.Line,et,nt-ct)),yt.add(new go.PathSegment(go.PathSegment.Bezier,.5*et,nt,et,nt-ve*ct,(.5+gt)*et,nt)),yt.add(new go.PathSegment(go.PathSegment.Bezier,0,nt-ct,(.5-gt)*et,nt,0,nt-ve*ct));var Lt=new go.PathFigure(0,nt-ct,!1);return lt.add(Lt),Lt.add(new go.PathSegment(go.PathSegment.Bezier,.5*et,nt-2*ct,0,nt-ct-ve*ct,(.5-gt)*et,nt-2*ct)),Lt.add(new go.PathSegment(go.PathSegment.Bezier,et,nt-ct,(.5+gt)*et,nt-2*ct,et,nt-ct-ve*ct)),lt.spot1=new go.Spot(0,0),lt.spot2=new go.Spot(1,1,0,-2*ct),lt}),go.Shape.defineFigureGenerator("Cylinder3",function(Ut,et,nt){var ct=Ut?Ut.parameter1:NaN;isNaN(ct)&&(ct=5),ct=Math.min(ct,et/3);var lt=new go.Geometry,gt=ve*.5,yt=new go.PathFigure(ct,0,!0);lt.add(yt),yt.add(new go.PathSegment(go.PathSegment.Line,et-ct,0)),yt.add(new go.PathSegment(go.PathSegment.Bezier,et,.5*nt,et-ve*ct,0,et,(.5-gt)*nt)),yt.add(new go.PathSegment(go.PathSegment.Bezier,et-ct,nt,et,(.5+gt)*nt,et-ve*ct,nt)),yt.add(new go.PathSegment(go.PathSegment.Line,ct,nt)),yt.add(new go.PathSegment(go.PathSegment.Bezier,0,.5*nt,ve*ct,nt,0,(.5+gt)*nt)),yt.add(new go.PathSegment(go.PathSegment.Bezier,ct,0,0,(.5-gt)*nt,ve*ct,0));var Lt=new go.PathFigure(ct,0,!1);return lt.add(Lt),Lt.add(new go.PathSegment(go.PathSegment.Bezier,2*ct,.5*nt,ct+ve*ct,0,2*ct,(.5-gt)*nt)),Lt.add(new go.PathSegment(go.PathSegment.Bezier,ct,nt,2*ct,(.5+gt)*nt,ct+ve*ct,nt)),lt.spot1=new go.Spot(0,0,2*ct,0),lt.spot2=new go.Spot(1,1),lt}),go.Shape.defineFigureGenerator("Cylinder4",function(Ut,et,nt){var ct=Ut?Ut.parameter1:NaN;isNaN(ct)&&(ct=5),ct=Math.min(ct,et/3);var lt=new go.Geometry,gt=ve*.5,yt=new go.PathFigure(et-ct,0,!0);lt.add(yt),yt.add(new go.PathSegment(go.PathSegment.Bezier,et,.5*nt,et-ve*ct,0,et,(.5-gt)*nt)),yt.add(new go.PathSegment(go.PathSegment.Bezier,et-ct,nt,et,(.5+gt)*nt,et-ve*ct,nt)),yt.add(new go.PathSegment(go.PathSegment.Line,ct,nt)),yt.add(new go.PathSegment(go.PathSegment.Bezier,0,.5*nt,ve*ct,nt,0,(.5+gt)*nt)),yt.add(new go.PathSegment(go.PathSegment.Bezier,ct,0,0,(.5-gt)*nt,ve*ct,0)),yt.add(new go.PathSegment(go.PathSegment.Line,et-ct,0));var Lt=new go.PathFigure(et-ct,0,!1);return lt.add(Lt),Lt.add(new go.PathSegment(go.PathSegment.Bezier,et-2*ct,.5*nt,et-ct-ve*ct,0,et-2*ct,(.5-gt)*nt)),Lt.add(new go.PathSegment(go.PathSegment.Bezier,et-ct,nt,et-2*ct,(.5+gt)*nt,et-ct-ve*ct,nt)),lt.spot1=new go.Spot(0,0),lt.spot2=new go.Spot(1,1,-2*ct,0),lt}),go.Shape.defineFigureGenerator("Prism1",function(Ut,et,nt){var ct=new go.Geometry,lt=new go.PathFigure(.25*et,.25*nt,!0);ct.add(lt),lt.add(new go.PathSegment(go.PathSegment.Line,.75*et,0)),lt.add(new go.PathSegment(go.PathSegment.Line,et,.5*nt)),lt.add(new go.PathSegment(go.PathSegment.Line,.5*et,nt)),lt.add(new go.PathSegment(go.PathSegment.Line,0,nt).close());var gt=new go.PathFigure(.25*et,.25*nt,!1);return ct.add(gt),gt.add(new go.PathSegment(go.PathSegment.Line,.5*et,nt)),ct.spot1=new go.Spot(.408,.172),ct.spot2=new go.Spot(.833,.662),ct}),go.Shape.defineFigureGenerator("Prism2",function(Ut,et,nt){var ct=new go.Geometry,lt=new go.PathFigure(0,.25*nt,!0);ct.add(lt),lt.add(new go.PathSegment(go.PathSegment.Line,.75*et,0)),lt.add(new go.PathSegment(go.PathSegment.Line,et,.25*nt)),lt.add(new go.PathSegment(go.PathSegment.Line,.75*et,.75*nt)),lt.add(new go.PathSegment(go.PathSegment.Line,0,nt).close());var gt=new go.PathFigure(0,nt,!1);return ct.add(gt),gt.add(new go.PathSegment(go.PathSegment.Line,.25*et,.5*nt)),gt.add(new go.PathSegment(go.PathSegment.Line,et,.25*nt)),gt.add(new go.PathSegment(go.PathSegment.Move,0,.25*nt)),gt.add(new go.PathSegment(go.PathSegment.Line,.25*et,.5*nt)),ct.spot1=new go.Spot(.25,.5),ct.spot2=new go.Spot(.75,.75),ct}),go.Shape.defineFigureGenerator("Pyramid1",function(Ut,et,nt){var ct=new go.Geometry,lt=new go.PathFigure(.5*et,0,!0);ct.add(lt),lt.add(new go.PathSegment(go.PathSegment.Line,et,.75*nt)),lt.add(new go.PathSegment(go.PathSegment.Line,.5*et,nt)),lt.add(new go.PathSegment(go.PathSegment.Line,0,.75*nt).close());var gt=new go.PathFigure(.5*et,0,!1);return ct.add(gt),gt.add(new go.PathSegment(go.PathSegment.Line,.5*et,nt)),ct.spot1=new go.Spot(.25,.367),ct.spot2=new go.Spot(.75,.875),ct}),go.Shape.defineFigureGenerator("Pyramid2",function(Ut,et,nt){var ct=new go.Geometry,lt=new go.PathFigure(.5*et,0,!0);ct.add(lt),lt.add(new go.PathSegment(go.PathSegment.Line,et,.85*nt)),lt.add(new go.PathSegment(go.PathSegment.Line,.5*et,nt)),lt.add(new go.PathSegment(go.PathSegment.Line,0,.85*nt).close());var gt=new go.PathFigure(.5*et,0,!1);return ct.add(gt),gt.add(new go.PathSegment(go.PathSegment.Line,.5*et,.7*nt)),gt.add(new go.PathSegment(go.PathSegment.Line,0,.85*nt)),gt.add(new go.PathSegment(go.PathSegment.Move,.5*et,.7*nt)),gt.add(new go.PathSegment(go.PathSegment.Line,et,.85*nt)),ct.spot1=new go.Spot(.25,.367),ct.spot2=new go.Spot(.75,.875),ct}),go.Shape.defineFigureGenerator("Actor",function(Ut,et,nt){var ct=new go.Geometry,lt=.2,gt=.1,yt=ve*lt,Lt=ve*gt,It=.5,Wt=.1,qt=new go.PathFigure(It*et,(Wt+gt)*nt,!0);ct.add(qt),qt.add(new go.PathSegment(go.PathSegment.Bezier,(It-lt)*et,Wt*nt,(It-yt)*et,(Wt+gt)*nt,(It-lt)*et,(Wt+Lt)*nt)),qt.add(new go.PathSegment(go.PathSegment.Bezier,It*et,(Wt-gt)*nt,(It-lt)*et,(Wt-Lt)*nt,(It-yt)*et,(Wt-gt)*nt)),qt.add(new go.PathSegment(go.PathSegment.Bezier,(It+lt)*et,Wt*nt,(It+yt)*et,(Wt-gt)*nt,(It+lt)*et,(Wt-Lt)*nt)),qt.add(new go.PathSegment(go.PathSegment.Bezier,It*et,(Wt+gt)*nt,(It+lt)*et,(Wt+Lt)*nt,(It+yt)*et,(Wt+gt)*nt));var he=.05,fe=ve*he;It=.05,Wt=.25;var Ae=new go.PathFigure(.5*et,.2*nt,!0);return ct.add(Ae),Ae.add(new go.PathSegment(go.PathSegment.Line,.95*et,.2*nt)),It=.95,Wt=.25,Ae.add(new go.PathSegment(go.PathSegment.Bezier,(It+he)*et,Wt*nt,(It+fe)*et,(Wt-he)*nt,(It+he)*et,(Wt-fe)*nt)),Ae.add(new go.PathSegment(go.PathSegment.Line,et,.6*nt)),Ae.add(new go.PathSegment(go.PathSegment.Line,.85*et,.6*nt)),Ae.add(new go.PathSegment(go.PathSegment.Line,.85*et,.35*nt)),he=.025,fe=ve*he,It=.825,Wt=.35,Ae.add(new go.PathSegment(go.PathSegment.Bezier,It*et,(Wt-he)*nt,(It+he)*et,(Wt-fe)*nt,(It+fe)*et,(Wt-he)*nt)),Ae.add(new go.PathSegment(go.PathSegment.Bezier,(It-he)*et,Wt*nt,(It-fe)*et,(Wt-he)*nt,(It-he)*et,(Wt-fe)*nt)),Ae.add(new go.PathSegment(go.PathSegment.Line,.8*et,nt)),Ae.add(new go.PathSegment(go.PathSegment.Line,.55*et,nt)),Ae.add(new go.PathSegment(go.PathSegment.Line,.55*et,.7*nt)),he=.05,fe=ve*he,It=.5,Wt=.7,Ae.add(new go.PathSegment(go.PathSegment.Bezier,It*et,(Wt-he)*nt,(It+he)*et,(Wt-fe)*nt,(It+fe)*et,(Wt-he)*nt)),Ae.add(new go.PathSegment(go.PathSegment.Bezier,(It-he)*et,Wt*nt,(It-fe)*et,(Wt-he)*nt,(It-he)*et,(Wt-fe)*nt)),Ae.add(new go.PathSegment(go.PathSegment.Line,.45*et,nt)),Ae.add(new go.PathSegment(go.PathSegment.Line,.2*et,nt)),Ae.add(new go.PathSegment(go.PathSegment.Line,.2*et,.35*nt)),he=.025,fe=ve*he,It=.175,Wt=.35,Ae.add(new go.PathSegment(go.PathSegment.Bezier,It*et,(Wt-he)*nt,(It+he)*et,(Wt-fe)*nt,(It+fe)*et,(Wt-he)*nt)),Ae.add(new go.PathSegment(go.PathSegment.Bezier,(It-he)*et,Wt*nt,(It-fe)*et,(Wt-he)*nt,(It-he)*et,(Wt-fe)*nt)),Ae.add(new go.PathSegment(go.PathSegment.Line,.15*et,.6*nt)),Ae.add(new go.PathSegment(go.PathSegment.Line,0,.6*nt)),Ae.add(new go.PathSegment(go.PathSegment.Line,0,.25*nt)),he=.05,fe=ve*he,It=.05,Wt=.25,Ae.add(new go.PathSegment(go.PathSegment.Bezier,It*et,(Wt-he)*nt,(It-he)*et,(Wt-fe)*nt,(It-fe)*et,(Wt-he)*nt)),Ae.add(new go.PathSegment(go.PathSegment.Line,.5*et,.2*nt)),ct.spot1=new go.Spot(.2,.2),ct.spot2=new go.Spot(.8,.65),ct}),go.Shape.setFigureParameter("Card",0,new Cn("CornerCutoutSize",.2,.1,.9)),go.Shape.defineFigureGenerator("Card",function(Ut,et,nt){var ct=Ut?Ut.parameter1:NaN;isNaN(ct)&&(ct=.2);var lt=new go.Geometry,gt=new go.PathFigure(et,0,!0);return lt.add(gt),gt.add(new go.PathSegment(go.PathSegment.Line,et,nt)),gt.add(new go.PathSegment(go.PathSegment.Line,0,nt)),gt.add(new go.PathSegment(go.PathSegment.Line,0,ct*nt)),gt.add(new go.PathSegment(go.PathSegment.Line,ct*et,0).close()),lt.spot1=new go.Spot(0,ct),lt.spot2=go.Spot.BottomRight,lt}),go.Shape.defineFigureGenerator("Collate",function(Ut,et,nt){var ct=new go.Geometry,lt=new go.PathFigure(.5*et,.5*nt,!0);ct.add(lt),lt.add(new go.PathSegment(go.PathSegment.Line,0,0)),lt.add(new go.PathSegment(go.PathSegment.Line,et,0)),lt.add(new go.PathSegment(go.PathSegment.Line,.5*et,.5*nt));var gt=new go.PathFigure(.5*et,.5*nt,!0);return ct.add(gt),gt.add(new go.PathSegment(go.PathSegment.Line,et,nt)),gt.add(new go.PathSegment(go.PathSegment.Line,0,nt)),gt.add(new go.PathSegment(go.PathSegment.Line,.5*et,.5*nt)),ct.spot1=new go.Spot(.25,0),ct.spot2=new go.Spot(.75,.25),ct}),go.Shape.defineFigureGenerator("CreateRequest",function(Ut,et,nt){var ct=new go.Geometry,lt=Ut?Ut.parameter1:NaN;isNaN(lt)&&(lt=.1);var gt=new go.PathFigure(0,0,!0);ct.add(gt),gt.add(new go.PathSegment(go.PathSegment.Line,et,0)),gt.add(new go.PathSegment(go.PathSegment.Line,et,nt)),gt.add(new go.PathSegment(go.PathSegment.Line,0,nt).close());var yt=new go.PathFigure(0,lt*nt,!1);return ct.add(yt),yt.add(new go.PathSegment(go.PathSegment.Line,et,lt*nt)),yt.add(new go.PathSegment(go.PathSegment.Move,0,(1-lt)*nt)),yt.add(new go.PathSegment(go.PathSegment.Line,et,(1-lt)*nt)),ct}),go.Shape.defineFigureGenerator("Database",function(Ut,et,nt){var ct=new go.Geometry,lt=ve*.5,gt=ve*.1,yt=new go.PathFigure(et,.1*nt,!0);ct.add(yt),yt.add(new go.PathSegment(go.PathSegment.Line,et,.9*nt)),yt.add(new go.PathSegment(go.PathSegment.Bezier,.5*et,nt,et,(.9+gt)*nt,(.5+lt)*et,nt)),yt.add(new go.PathSegment(go.PathSegment.Bezier,0,.9*nt,(.5-lt)*et,nt,0,(.9+gt)*nt)),yt.add(new go.PathSegment(go.PathSegment.Line,0,.1*nt)),yt.add(new go.PathSegment(go.PathSegment.Bezier,.5*et,0,0,(.1-gt)*nt,(.5-lt)*et,0)),yt.add(new go.PathSegment(go.PathSegment.Bezier,et,.1*nt,(.5+lt)*et,0,et,(.1-gt)*nt));var Lt=new go.PathFigure(et,.1*nt,!1);return ct.add(Lt),Lt.add(new go.PathSegment(go.PathSegment.Bezier,.5*et,.2*nt,et,(.1+gt)*nt,(.5+lt)*et,.2*nt)),Lt.add(new go.PathSegment(go.PathSegment.Bezier,0,.1*nt,(.5-lt)*et,.2*nt,0,(.1+gt)*nt)),Lt.add(new go.PathSegment(go.PathSegment.Move,et,.2*nt)),Lt.add(new go.PathSegment(go.PathSegment.Bezier,.5*et,.3*nt,et,(.2+gt)*nt,(.5+lt)*et,.3*nt)),Lt.add(new go.PathSegment(go.PathSegment.Bezier,0,.2*nt,(.5-lt)*et,.3*nt,0,(.2+gt)*nt)),Lt.add(new go.PathSegment(go.PathSegment.Move,et,.3*nt)),Lt.add(new go.PathSegment(go.PathSegment.Bezier,.5*et,.4*nt,et,(.3+gt)*nt,(.5+lt)*et,.4*nt)),Lt.add(new go.PathSegment(go.PathSegment.Bezier,0,.3*nt,(.5-lt)*et,.4*nt,0,(.3+gt)*nt)),ct.spot1=new go.Spot(0,.4),ct.spot2=new go.Spot(1,.9),ct}),go.Shape.defineFigureGenerator("DataStorage",function(Ut,et,nt){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*et,0)),lt.add(new go.PathSegment(go.PathSegment.Bezier,.75*et,nt,et,0,et,nt)),lt.add(new go.PathSegment(go.PathSegment.Line,0,nt)),lt.add(new go.PathSegment(go.PathSegment.Bezier,0,0,.25*et,.9*nt,.25*et,.1*nt).close()),ct.spot1=new go.Spot(.226,0),ct.spot2=new go.Spot(.81,1),ct}),go.Shape.defineFigureGenerator("DiskStorage",function(Ut,et,nt){var ct=new go.Geometry,lt=ve*.5,gt=ve*.1,yt=new go.PathFigure(et,.1*nt,!0);ct.add(yt),yt.add(new go.PathSegment(go.PathSegment.Line,et,.9*nt)),yt.add(new go.PathSegment(go.PathSegment.Bezier,.5*et,nt,et,(.9+gt)*nt,(.5+lt)*et,nt)),yt.add(new go.PathSegment(go.PathSegment.Bezier,0,.9*nt,(.5-lt)*et,nt,0,(.9+gt)*nt)),yt.add(new go.PathSegment(go.PathSegment.Line,0,.1*nt)),yt.add(new go.PathSegment(go.PathSegment.Bezier,.5*et,0,0,(.1-gt)*nt,(.5-lt)*et,0)),yt.add(new go.PathSegment(go.PathSegment.Bezier,et,.1*nt,(.5+lt)*et,0,et,(.1-gt)*nt));var Lt=new go.PathFigure(et,.1*nt,!1);return ct.add(Lt),Lt.add(new go.PathSegment(go.PathSegment.Bezier,.5*et,.2*nt,et,(.1+gt)*nt,(.5+lt)*et,.2*nt)),Lt.add(new go.PathSegment(go.PathSegment.Bezier,0,.1*nt,(.5-lt)*et,.2*nt,0,(.1+gt)*nt)),Lt.add(new go.PathSegment(go.PathSegment.Move,et,.2*nt)),Lt.add(new go.PathSegment(go.PathSegment.Bezier,.5*et,.3*nt,et,(.2+gt)*nt,(.5+lt)*et,.3*nt)),Lt.add(new go.PathSegment(go.PathSegment.Bezier,0,.2*nt,(.5-lt)*et,.3*nt,0,(.2+gt)*nt)),ct.spot1=new go.Spot(0,.3),ct.spot2=new go.Spot(1,.9),ct}),go.Shape.defineFigureGenerator("Display",function(Ut,et,nt){var ct=new go.Geometry,lt=new go.PathFigure(.25*et,0,!0);return ct.add(lt),lt.add(new go.PathSegment(go.PathSegment.Line,.75*et,0)),lt.add(new go.PathSegment(go.PathSegment.Bezier,.75*et,nt,et,0,et,nt)),lt.add(new go.PathSegment(go.PathSegment.Line,.25*et,nt)),lt.add(new go.PathSegment(go.PathSegment.Line,0,.5*nt).close()),ct.spot1=new go.Spot(.25,0),ct.spot2=new go.Spot(.75,1),ct}),go.Shape.defineFigureGenerator("DividedEvent",function(Ut,et,nt){var ct=new go.Geometry,lt=Ut?Ut.parameter1:NaN;isNaN(lt)?lt=.2:lt<.15&&(lt=.15);var gt=ve*.2,yt=new go.PathFigure(0,.2*nt,!0);ct.add(yt),yt.add(new go.PathSegment(go.PathSegment.Bezier,.2*et,0,0,(.2-gt)*nt,(.2-gt)*et,0)),yt.add(new go.PathSegment(go.PathSegment.Line,.8*et,0)),yt.add(new go.PathSegment(go.PathSegment.Bezier,et,.2*nt,(.8+gt)*et,0,et,(.2-gt)*nt)),yt.add(new go.PathSegment(go.PathSegment.Line,et,.8*nt)),yt.add(new go.PathSegment(go.PathSegment.Bezier,.8*et,nt,et,(.8+gt)*nt,(.8+gt)*et,nt)),yt.add(new go.PathSegment(go.PathSegment.Line,.2*et,nt)),yt.add(new go.PathSegment(go.PathSegment.Bezier,0,.8*nt,(.2-gt)*et,nt,0,(.8+gt)*nt)),yt.add(new go.PathSegment(go.PathSegment.Line,0,.2*nt));var Lt=new go.PathFigure(0,lt*nt,!1);return ct.add(Lt),Lt.add(new go.PathSegment(go.PathSegment.Line,et,lt*nt)),ct}),go.Shape.defineFigureGenerator("DividedProcess",function(Ut,et,nt){var ct=new go.Geometry,lt=Ut?Ut.parameter1:NaN;(isNaN(lt)||lt<.1)&&(lt=.1);var gt=new go.PathFigure(0,0,!0);ct.add(gt),gt.add(new go.PathSegment(go.PathSegment.Line,et,0)),gt.add(new go.PathSegment(go.PathSegment.Line,et,nt)),gt.add(new go.PathSegment(go.PathSegment.Line,0,nt).close());var yt=new go.PathFigure(0,lt*nt,!1);return ct.add(yt),yt.add(new go.PathSegment(go.PathSegment.Line,et,lt*nt)),ct}),go.Shape.defineFigureGenerator("Document",function(Ut,et,nt){var ct=new go.Geometry;nt=nt/.8;var lt=new go.PathFigure(0,.7*nt,!0);return ct.add(lt),lt.add(new go.PathSegment(go.PathSegment.Line,0,0)),lt.add(new go.PathSegment(go.PathSegment.Line,et,0)),lt.add(new go.PathSegment(go.PathSegment.Line,et,.7*nt)),lt.add(new go.PathSegment(go.PathSegment.Bezier,0,.7*nt,.5*et,.4*nt,.5*et,nt).close()),ct.spot1=go.Spot.TopLeft,ct.spot2=new go.Spot(1,.6),ct}),go.Shape.defineFigureGenerator("ExternalOrganization",function(Ut,et,nt){var ct=new go.Geometry,lt=Ut?Ut.parameter1:NaN;(isNaN(lt)||lt<.2)&&(lt=.2);var gt=new go.PathFigure(0,0,!0);ct.add(gt),gt.add(new go.PathSegment(go.PathSegment.Line,et,0)),gt.add(new go.PathSegment(go.PathSegment.Line,et,nt)),gt.add(new go.PathSegment(go.PathSegment.Line,0,nt).close());var yt=new go.PathFigure(lt*et,0,!1);return ct.add(yt),yt.add(new go.PathSegment(go.PathSegment.Line,0,lt*nt)),yt.add(new go.PathSegment(go.PathSegment.Move,et,lt*nt)),yt.add(new go.PathSegment(go.PathSegment.Line,(1-lt)*et,0)),yt.add(new go.PathSegment(go.PathSegment.Move,0,(1-lt)*nt)),yt.add(new go.PathSegment(go.PathSegment.Line,lt*et,nt)),yt.add(new go.PathSegment(go.PathSegment.Move,(1-lt)*et,nt)),yt.add(new go.PathSegment(go.PathSegment.Line,et,(1-lt)*nt)),ct}),go.Shape.defineFigureGenerator("ExternalProcess",function(Ut,et,nt){var ct=new go.Geometry,lt=new go.PathFigure(.5*et,0,!0);ct.add(lt),lt.add(new go.PathSegment(go.PathSegment.Line,et,.5*nt)),lt.add(new go.PathSegment(go.PathSegment.Line,.5*et,nt)),lt.add(new go.PathSegment(go.PathSegment.Line,0,.5*nt).close());var gt=new go.PathFigure(.1*et,.4*nt,!1);return ct.add(gt),gt.add(new go.PathSegment(go.PathSegment.Line,.1*et,.6*nt)),gt.add(new go.PathSegment(go.PathSegment.Move,.9*et,.6*nt)),gt.add(new go.PathSegment(go.PathSegment.Line,.9*et,.4*nt)),gt.add(new go.PathSegment(go.PathSegment.Move,.6*et,.1*nt)),gt.add(new go.PathSegment(go.PathSegment.Line,.4*et,.1*nt)),gt.add(new go.PathSegment(go.PathSegment.Move,.4*et,.9*nt)),gt.add(new go.PathSegment(go.PathSegment.Line,.6*et,.9*nt)),ct.spot1=new go.Spot(.25,.25),ct.spot2=new go.Spot(.75,.75),ct}),go.Shape.defineFigureGenerator("File",function(Ut,et,nt){var ct=new go.Geometry,lt=new go.PathFigure(0,0,!0);ct.add(lt),lt.add(new go.PathSegment(go.PathSegment.Line,.75*et,0)),lt.add(new go.PathSegment(go.PathSegment.Line,et,.25*nt)),lt.add(new go.PathSegment(go.PathSegment.Line,et,nt)),lt.add(new go.PathSegment(go.PathSegment.Line,0,nt).close());var gt=new go.PathFigure(.75*et,0,!1);return ct.add(gt),gt.add(new go.PathSegment(go.PathSegment.Line,.75*et,.25*nt)),gt.add(new go.PathSegment(go.PathSegment.Line,et,.25*nt)),ct.spot1=new go.Spot(0,.25),ct.spot2=go.Spot.BottomRight,ct}),go.Shape.defineFigureGenerator("Interrupt",function(Ut,et,nt){var ct=new go.Geometry,lt=new go.PathFigure(et,.5*nt,!0);ct.add(lt),lt.add(new go.PathSegment(go.PathSegment.Line,0,nt)),lt.add(new go.PathSegment(go.PathSegment.Line,0,0)),lt.add(new go.PathSegment(go.PathSegment.Line,et,.5*nt));var gt=new go.PathFigure(et,.5*nt,!1);ct.add(gt),gt.add(new go.PathSegment(go.PathSegment.Line,et,nt));var yt=new go.PathFigure(et,.5*nt,!1);return ct.add(yt),yt.add(new go.PathSegment(go.PathSegment.Line,et,0)),ct.spot1=new go.Spot(0,.25),ct.spot2=new go.Spot(.5,.75),ct}),go.Shape.defineFigureGenerator("InternalStorage",function(Ut,et,nt){var ct=new go.Geometry,lt=Ut?Ut.parameter1:NaN,gt=Ut?Ut.parameter2:NaN;isNaN(lt)&&(lt=.1),isNaN(gt)&&(gt=.1);var yt=new go.PathFigure(0,0,!0);ct.add(yt),yt.add(new go.PathSegment(go.PathSegment.Line,et,0)),yt.add(new go.PathSegment(go.PathSegment.Line,et,nt)),yt.add(new go.PathSegment(go.PathSegment.Line,0,nt).close());var Lt=new go.PathFigure(lt*et,0,!1);return ct.add(Lt),Lt.add(new go.PathSegment(go.PathSegment.Line,lt*et,nt)),Lt.add(new go.PathSegment(go.PathSegment.Move,0,gt*nt)),Lt.add(new go.PathSegment(go.PathSegment.Line,et,gt*nt)),ct}),go.Shape.defineFigureGenerator("Junction",function(Ut,et,nt){var ct=new go.Geometry,lt=1/Math.SQRT2,gt=(1-1/Math.SQRT2)/2,yt=ve*.5,Lt=.5,It=new go.PathFigure(et,Lt*nt,!0);ct.add(It),It.add(new go.PathSegment(go.PathSegment.Bezier,Lt*et,nt,et,(Lt+yt)*nt,(Lt+yt)*et,nt)),It.add(new go.PathSegment(go.PathSegment.Bezier,0,Lt*nt,(Lt-yt)*et,nt,0,(Lt+yt)*nt)),It.add(new go.PathSegment(go.PathSegment.Bezier,Lt*et,0,0,(Lt-yt)*nt,(Lt-yt)*et,0)),It.add(new go.PathSegment(go.PathSegment.Bezier,et,Lt*nt,(Lt+yt)*et,0,et,(Lt-yt)*nt));var Wt=new go.PathFigure((gt+lt)*et,(gt+lt)*nt,!1);return ct.add(Wt),Wt.add(new go.PathSegment(go.PathSegment.Line,gt*et,gt*nt)),Wt.add(new go.PathSegment(go.PathSegment.Move,gt*et,(gt+lt)*nt)),Wt.add(new go.PathSegment(go.PathSegment.Line,(gt+lt)*et,gt*nt)),ct}),go.Shape.defineFigureGenerator("LinedDocument",function(Ut,et,nt){var ct=new go.Geometry;nt=nt/.8;var lt=new go.PathFigure(0,.7*nt,!0);ct.add(lt),lt.add(new go.PathSegment(go.PathSegment.Line,0,0)),lt.add(new go.PathSegment(go.PathSegment.Line,et,0)),lt.add(new go.PathSegment(go.PathSegment.Line,et,.7*nt)),lt.add(new go.PathSegment(go.PathSegment.Bezier,0,.7*nt,.5*et,.4*nt,.5*et,nt).close());var gt=new go.PathFigure(.1*et,0,!1);return ct.add(gt),gt.add(new go.PathSegment(go.PathSegment.Line,.1*et,.75*nt)),ct.spot1=new go.Spot(.1,0),ct.spot2=new go.Spot(1,.6),ct}),go.Shape.defineFigureGenerator("LoopLimit",function(Ut,et,nt){var ct=new go.Geometry,lt=new go.PathFigure(0,nt,!0);return ct.add(lt),lt.add(new go.PathSegment(go.PathSegment.Line,0,.25*nt)),lt.add(new go.PathSegment(go.PathSegment.Line,.25*et,0)),lt.add(new go.PathSegment(go.PathSegment.Line,.75*et,0)),lt.add(new go.PathSegment(go.PathSegment.Line,et,.25*nt)),lt.add(new go.PathSegment(go.PathSegment.Line,et,nt).close()),ct.spot1=new go.Spot(0,.25),ct.spot2=go.Spot.BottomRight,ct}),go.Shape.defineFigureGenerator("MagneticTape",function(Ut,et,nt){var ct=new go.Geometry,lt=ve*.5,gt=.5,yt=new go.PathFigure(.5*et,nt,!0);return ct.add(yt),yt.add(new go.PathSegment(go.PathSegment.Bezier,0,gt*nt,(gt-lt)*et,nt,0,(gt+lt)*nt)),yt.add(new go.PathSegment(go.PathSegment.Bezier,gt*et,0,0,(gt-lt)*nt,(gt-lt)*et,0)),yt.add(new go.PathSegment(go.PathSegment.Bezier,et,gt*nt,(gt+lt)*et,0,et,(gt-lt)*nt)),yt.add(new go.PathSegment(go.PathSegment.Bezier,(gt+.1)*et,.9*nt,et,(gt+lt)*nt,(gt+lt)*et,.9*nt)),yt.add(new go.PathSegment(go.PathSegment.Line,et,.9*nt)),yt.add(new go.PathSegment(go.PathSegment.Line,et,nt)),yt.add(new go.PathSegment(go.PathSegment.Line,.5*et,nt)),ct.spot1=new go.Spot(.15,.15),ct.spot2=new go.Spot(.85,.8),ct}),go.Shape.defineFigureGenerator("ManualInput",function(Ut,et,nt){var ct=new go.Geometry,lt=new go.PathFigure(et,0,!0);return ct.add(lt),lt.add(new go.PathSegment(go.PathSegment.Line,et,nt)),lt.add(new go.PathSegment(go.PathSegment.Line,0,nt)),lt.add(new go.PathSegment(go.PathSegment.Line,0,.25*nt).close()),ct.spot1=new go.Spot(0,.25),ct.spot2=go.Spot.BottomRight,ct}),go.Shape.defineFigureGenerator("MessageFromUser",function(Ut,et,nt){var ct=new go.Geometry,lt=Ut?Ut.parameter1:NaN;isNaN(lt)&&(lt=.7);var gt=new go.PathFigure(0,0,!0);return ct.add(gt),gt.add(new go.PathSegment(go.PathSegment.Line,et,0)),gt.add(new go.PathSegment(go.PathSegment.Line,lt*et,.5*nt)),gt.add(new go.PathSegment(go.PathSegment.Line,et,nt)),gt.add(new go.PathSegment(go.PathSegment.Line,0,nt).close()),ct.spot1=go.Spot.TopLeft,ct}),go.Shape.defineFigureGenerator("MicroformProcessing",function(Ut,et,nt){var ct=new go.Geometry,lt=Ut?Ut.parameter1:NaN;isNaN(lt)&&(lt=.25);var gt=new go.PathFigure(0,0,!0);return ct.add(gt),gt.add(new go.PathSegment(go.PathSegment.Line,.5*et,lt*nt)),gt.add(new go.PathSegment(go.PathSegment.Line,et,0)),gt.add(new go.PathSegment(go.PathSegment.Line,et,nt)),gt.add(new go.PathSegment(go.PathSegment.Line,.5*et,(1-lt)*nt)),gt.add(new go.PathSegment(go.PathSegment.Line,0,nt).close()),ct}),go.Shape.defineFigureGenerator("MicroformRecording",function(Ut,et,nt){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*et,.25*nt)),lt.add(new go.PathSegment(go.PathSegment.Line,et,.15*nt)),lt.add(new go.PathSegment(go.PathSegment.Line,et,.85*nt)),lt.add(new go.PathSegment(go.PathSegment.Line,.75*et,.75*nt)),lt.add(new go.PathSegment(go.PathSegment.Line,0,nt).close()),ct.spot1=new go.Spot(0,.25),ct.spot2=new go.Spot(1,.75),ct}),go.Shape.defineFigureGenerator("MultiDocument",function(Ut,et,nt){var ct=new go.Geometry;nt=nt/.8;var lt=new go.PathFigure(et,0,!0);ct.add(lt),lt.add(new go.PathSegment(go.PathSegment.Line,et,.5*nt)),lt.add(new go.PathSegment(go.PathSegment.Bezier,.9*et,.44*nt,.96*et,.47*nt,.93*et,.45*nt)),lt.add(new go.PathSegment(go.PathSegment.Line,.9*et,.6*nt)),lt.add(new go.PathSegment(go.PathSegment.Bezier,.8*et,.54*nt,.86*et,.57*nt,.83*et,.55*nt)),lt.add(new go.PathSegment(go.PathSegment.Line,.8*et,.7*nt)),lt.add(new go.PathSegment(go.PathSegment.Bezier,0,.7*nt,.4*et,.4*nt,.4*et,nt)),lt.add(new go.PathSegment(go.PathSegment.Line,0,.2*nt)),lt.add(new go.PathSegment(go.PathSegment.Line,.1*et,.2*nt)),lt.add(new go.PathSegment(go.PathSegment.Line,.1*et,.1*nt)),lt.add(new go.PathSegment(go.PathSegment.Line,.2*et,.1*nt)),lt.add(new go.PathSegment(go.PathSegment.Line,.2*et,0).close());var gt=new go.PathFigure(.1*et,.2*nt,!1);return ct.add(gt),gt.add(new go.PathSegment(go.PathSegment.Line,.8*et,.2*nt)),gt.add(new go.PathSegment(go.PathSegment.Line,.8*et,.54*nt)),gt.add(new go.PathSegment(go.PathSegment.Move,.2*et,.1*nt)),gt.add(new go.PathSegment(go.PathSegment.Line,.9*et,.1*nt)),gt.add(new go.PathSegment(go.PathSegment.Line,.9*et,.44*nt)),ct.spot1=new go.Spot(0,.25),ct.spot2=new go.Spot(.8,.77),ct}),go.Shape.defineFigureGenerator("MultiProcess",function(Ut,et,nt){var ct=new go.Geometry,lt=new go.PathFigure(.1*et,.1*nt,!0);ct.add(lt),lt.add(new go.PathSegment(go.PathSegment.Line,.2*et,.1*nt)),lt.add(new go.PathSegment(go.PathSegment.Line,.2*et,0)),lt.add(new go.PathSegment(go.PathSegment.Line,et,0)),lt.add(new go.PathSegment(go.PathSegment.Line,et,.8*nt)),lt.add(new go.PathSegment(go.PathSegment.Line,.9*et,.8*nt)),lt.add(new go.PathSegment(go.PathSegment.Line,.9*et,.9*nt)),lt.add(new go.PathSegment(go.PathSegment.Line,.8*et,.9*nt)),lt.add(new go.PathSegment(go.PathSegment.Line,.8*et,nt)),lt.add(new go.PathSegment(go.PathSegment.Line,0,nt)),lt.add(new go.PathSegment(go.PathSegment.Line,0,.2*nt)),lt.add(new go.PathSegment(go.PathSegment.Line,.1*et,.2*nt).close());var gt=new go.PathFigure(.2*et,.1*nt,!1);return ct.add(gt),gt.add(new go.PathSegment(go.PathSegment.Line,.9*et,.1*nt)),gt.add(new go.PathSegment(go.PathSegment.Line,.9*et,.8*nt)),gt.add(new go.PathSegment(go.PathSegment.Move,.1*et,.2*nt)),gt.add(new go.PathSegment(go.PathSegment.Line,.8*et,.2*nt)),gt.add(new go.PathSegment(go.PathSegment.Line,.8*et,.9*nt)),ct.spot1=new go.Spot(0,.2),ct.spot2=new go.Spot(.8,1),ct}),go.Shape.defineFigureGenerator("OfflineStorage",function(Ut,et,nt){var ct=new go.Geometry,lt=Ut?Ut.parameter1:NaN;isNaN(lt)&&(lt=.1);var gt=1-lt,yt=new go.PathFigure(0,0,!0);ct.add(yt),yt.add(new go.PathSegment(go.PathSegment.Line,et,0)),yt.add(new go.PathSegment(go.PathSegment.Line,.5*et,nt).close());var Lt=new go.PathFigure(.5*lt*et,lt*nt,!1);return ct.add(Lt),Lt.add(new go.PathSegment(go.PathSegment.Line,(1-.5*lt)*et,lt*nt)),ct}),go.Shape.defineFigureGenerator("OffPageConnector",function(Ut,et,nt){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*et,0)),lt.add(new go.PathSegment(go.PathSegment.Line,et,.5*nt)),lt.add(new go.PathSegment(go.PathSegment.Line,.75*et,nt)),lt.add(new go.PathSegment(go.PathSegment.Line,0,nt).close()),ct.spot1=go.Spot.TopLeft,ct.spot2=new go.Spot(.75,1),ct}),go.Shape.defineFigureGenerator("Or",function(Ut,et,nt){var ct=new go.Geometry,lt=ve*.5,gt=.5,yt=new go.PathFigure(et,gt*nt,!0);ct.add(yt),yt.add(new go.PathSegment(go.PathSegment.Bezier,gt*et,nt,et,(gt+lt)*nt,(gt+lt)*et,nt)),yt.add(new go.PathSegment(go.PathSegment.Bezier,0,gt*nt,(gt-lt)*et,nt,0,(gt+lt)*nt)),yt.add(new go.PathSegment(go.PathSegment.Bezier,gt*et,0,0,(gt-lt)*nt,(gt-lt)*et,0)),yt.add(new go.PathSegment(go.PathSegment.Bezier,et,gt*nt,(gt+lt)*et,0,et,(gt-lt)*nt));var Lt=new go.PathFigure(et,.5*nt,!1);return ct.add(Lt),Lt.add(new go.PathSegment(go.PathSegment.Line,0,.5*nt)),Lt.add(new go.PathSegment(go.PathSegment.Move,.5*et,nt)),Lt.add(new go.PathSegment(go.PathSegment.Line,.5*et,0)),ct}),go.Shape.defineFigureGenerator("PaperTape",function(Ut,et,nt){var ct=new go.Geometry;nt=nt/.8;var lt=new go.PathFigure(0,.7*nt,!0);return ct.add(lt),lt.add(new go.PathSegment(go.PathSegment.Line,0,.3*nt)),lt.add(new go.PathSegment(go.PathSegment.Bezier,et,.3*nt,.5*et,.6*nt,.5*et,0)),lt.add(new go.PathSegment(go.PathSegment.Line,et,.7*nt)),lt.add(new go.PathSegment(go.PathSegment.Bezier,0,.7*nt,.5*et,.4*nt,.5*et,nt).close()),ct.spot1=new go.Spot(0,.49),ct.spot2=new go.Spot(1,.75),ct}),go.Shape.defineFigureGenerator("PrimitiveFromCall",function(Ut,et,nt){var ct=new go.Geometry,lt=Ut?Ut.parameter1:NaN,gt=Ut?Ut.parameter2:NaN;isNaN(lt)&&(lt=.1),isNaN(gt)&&(gt=.3);var yt=new go.PathFigure(0,0,!0);return ct.add(yt),yt.add(new go.PathSegment(go.PathSegment.Line,et,0)),yt.add(new go.PathSegment(go.PathSegment.Line,(1-gt)*et,.5*nt)),yt.add(new go.PathSegment(go.PathSegment.Line,et,nt)),yt.add(new go.PathSegment(go.PathSegment.Line,0,nt).close()),ct}),go.Shape.defineFigureGenerator("PrimitiveToCall",function(Ut,et,nt){var ct=new go.Geometry,lt=Ut?Ut.parameter1:NaN,gt=Ut?Ut.parameter2:NaN;isNaN(lt)&&(lt=.1),isNaN(gt)&&(gt=.3);var yt=new go.PathFigure(0,0,!0);return ct.add(yt),yt.add(new go.PathSegment(go.PathSegment.Line,(1-gt)*et,0)),yt.add(new go.PathSegment(go.PathSegment.Line,et,.5*nt)),yt.add(new go.PathSegment(go.PathSegment.Line,(1-gt)*et,nt)),yt.add(new go.PathSegment(go.PathSegment.Line,0,nt).close()),ct}),go.Shape.defineFigureGenerator("Procedure",function(Ut,et,nt){var ct=new go.Geometry,lt=Ut?Ut.parameter1:NaN;isNaN(lt)&&(lt=.1);var gt=new go.PathFigure(0,0,!0);ct.add(gt),gt.add(new go.PathSegment(go.PathSegment.Line,et,0)),gt.add(new go.PathSegment(go.PathSegment.Line,et,nt)),gt.add(new go.PathSegment(go.PathSegment.Line,0,nt).close());var yt=new go.PathFigure((1-lt)*et,0,!1);return ct.add(yt),yt.add(new go.PathSegment(go.PathSegment.Line,(1-lt)*et,nt)),yt.add(new go.PathSegment(go.PathSegment.Move,lt*et,0)),yt.add(new go.PathSegment(go.PathSegment.Line,lt*et,nt)),ct}),go.Shape.defineFigureGenerator("Process",function(Ut,et,nt){var ct=new go.Geometry,lt=Ut?Ut.parameter1:NaN;isNaN(lt)&&(lt=.1);var gt=new go.PathFigure(0,0,!0);ct.add(gt),gt.add(new go.PathSegment(go.PathSegment.Line,et,0)),gt.add(new go.PathSegment(go.PathSegment.Line,et,nt)),gt.add(new go.PathSegment(go.PathSegment.Line,0,nt).close());var yt=new go.PathFigure(lt*et,0,!1);return ct.add(yt),yt.add(new go.PathSegment(go.PathSegment.Line,lt*et,nt)),ct.spot2=go.Spot.BottomRight,ct}),go.Shape.defineFigureGenerator("Sort",function(Ut,et,nt){var ct=new go.Geometry,lt=new go.PathFigure(.5*et,0,!0);ct.add(lt),lt.add(new go.PathSegment(go.PathSegment.Line,et,.5*nt)),lt.add(new go.PathSegment(go.PathSegment.Line,.5*et,nt)),lt.add(new go.PathSegment(go.PathSegment.Line,0,.5*nt).close());var gt=new go.PathFigure(0,.5*nt,!1);return ct.add(gt),gt.add(new go.PathSegment(go.PathSegment.Line,et,.5*nt)),ct.spot1=new go.Spot(.25,.25),ct.spot2=new go.Spot(.75,.5),ct}),go.Shape.defineFigureGenerator("Start",function(Ut,et,nt){var ct=new go.Geometry,lt=Ut?Ut.parameter1:NaN;isNaN(lt)&&(lt=.25);var gt=new go.PathFigure(lt*et,0,!0);ct.add(gt),gt.add(new go.PathSegment(go.PathSegment.Arc,270,180,.75*et,.5*nt,.25*et,.5*nt)),gt.add(new go.PathSegment(go.PathSegment.Arc,90,180,.25*et,.5*nt,.25*et,.5*nt));var yt=new go.PathFigure(lt*et,0,!1);return ct.add(yt),yt.add(new go.PathSegment(go.PathSegment.Line,lt*et,nt)),yt.add(new go.PathSegment(go.PathSegment.Move,(1-lt)*et,0)),yt.add(new go.PathSegment(go.PathSegment.Line,(1-lt)*et,nt)),ct.spot1=new go.Spot(lt,0),ct.spot2=new go.Spot(1-lt,1),ct}),go.Shape.defineFigureGenerator("Terminator",function(Ut,et,nt){var ct=new go.Geometry,lt=new go.PathFigure(.25*et,0,!0);return ct.add(lt),lt.add(new go.PathSegment(go.PathSegment.Arc,270,180,.75*et,.5*nt,.25*et,.5*nt)),lt.add(new go.PathSegment(go.PathSegment.Arc,90,180,.25*et,.5*nt,.25*et,.5*nt)),ct.spot1=new go.Spot(.23,0),ct.spot2=new go.Spot(.77,1),ct}),go.Shape.defineFigureGenerator("TransmittalTape",function(Ut,et,nt){var ct=new go.Geometry,lt=Ut?Ut.parameter1:NaN;isNaN(lt)&&(lt=.1);var gt=new go.PathFigure(0,0,!0);return ct.add(gt),gt.add(new go.PathSegment(go.PathSegment.Line,et,0)),gt.add(new go.PathSegment(go.PathSegment.Line,et,nt)),gt.add(new go.PathSegment(go.PathSegment.Line,.75*et,(1-lt)*nt)),gt.add(new go.PathSegment(go.PathSegment.Line,0,(1-lt)*nt).close()),ct.spot1=go.Spot.TopLeft,ct}),go.Shape.defineFigureGenerator("AndGate",function(Ut,et,nt){var ct=new go.Geometry,lt=ve*.5,gt=new go.PathFigure(0,0,!0);return ct.add(gt),gt.add(new go.PathSegment(go.PathSegment.Line,.5*et,0)),gt.add(new go.PathSegment(go.PathSegment.Bezier,et,.5*nt,(.5+lt)*et,0,et,(.5-lt)*nt)),gt.add(new go.PathSegment(go.PathSegment.Bezier,.5*et,nt,et,(.5+lt)*nt,(.5+lt)*et,nt)),gt.add(new go.PathSegment(go.PathSegment.Line,0,nt).close()),ct.spot1=go.Spot.TopLeft,ct.spot2=new go.Spot(.55,1),ct}),go.Shape.defineFigureGenerator("Buffer",function(Ut,et,nt){var ct=new go.Geometry,lt=new go.PathFigure(0,0,!0);return ct.add(lt),lt.add(new go.PathSegment(go.PathSegment.Line,et,.5*nt)),lt.add(new go.PathSegment(go.PathSegment.Line,0,nt).close()),ct.spot1=new go.Spot(0,.25),ct.spot2=new go.Spot(.5,.75),ct}),go.Shape.defineFigureGenerator("Clock",function(Ut,et,nt){var ct=new go.Geometry,lt=ve*.5,gt=.5,yt=new go.PathFigure(et,gt*nt,!0);ct.add(yt),yt.add(new go.PathSegment(go.PathSegment.Bezier,gt*et,nt,et,(gt+lt)*nt,(gt+lt)*et,nt)),yt.add(new go.PathSegment(go.PathSegment.Bezier,0,gt*nt,(gt-lt)*et,nt,0,(gt+lt)*nt)),yt.add(new go.PathSegment(go.PathSegment.Bezier,gt*et,0,0,(gt-lt)*nt,(gt-lt)*et,0)),yt.add(new go.PathSegment(go.PathSegment.Bezier,et,gt*nt,(gt+lt)*et,0,et,(gt-lt)*nt));var Lt=new go.PathFigure(et,gt*nt,!1);ct.add(Lt),Lt.add(new go.PathSegment(go.PathSegment.Line,et,gt*nt));var It=new go.PathFigure(.8*et,.75*nt,!1);return ct.add(It),It.add(new go.PathSegment(go.PathSegment.Line,.8*et,.25*nt)),It.add(new go.PathSegment(go.PathSegment.Line,.6*et,.25*nt)),It.add(new go.PathSegment(go.PathSegment.Line,.6*et,.75*nt)),It.add(new go.PathSegment(go.PathSegment.Line,.4*et,.75*nt)),It.add(new go.PathSegment(go.PathSegment.Line,.4*et,.25*nt)),It.add(new go.PathSegment(go.PathSegment.Line,.2*et,.25*nt)),It.add(new go.PathSegment(go.PathSegment.Line,.2*et,.75*nt)),ct}),go.Shape.defineFigureGenerator("Ground",function(Ut,et,nt){var ct=new go.Geometry,lt=new go.PathFigure(.5*et,0,!1);return ct.add(lt),lt.add(new go.PathSegment(go.PathSegment.Line,.5*et,.4*nt)),lt.add(new go.PathSegment(go.PathSegment.Move,.2*et,.6*nt)),lt.add(new go.PathSegment(go.PathSegment.Line,.8*et,.6*nt)),lt.add(new go.PathSegment(go.PathSegment.Move,.3*et,.8*nt)),lt.add(new go.PathSegment(go.PathSegment.Line,.7*et,.8*nt)),lt.add(new go.PathSegment(go.PathSegment.Move,.4*et,nt)),lt.add(new go.PathSegment(go.PathSegment.Line,.6*et,nt)),ct}),go.Shape.defineFigureGenerator("Inverter",function(Ut,et,nt){var ct=new go.Geometry,lt=ve*.1,gt=.1,yt=.9,Lt=.5,It=new go.PathFigure(.8*et,.5*nt,!0);ct.add(It),It.add(new go.PathSegment(go.PathSegment.Line,0,nt)),It.add(new go.PathSegment(go.PathSegment.Line,0,0)),It.add(new go.PathSegment(go.PathSegment.Line,.8*et,.5*nt));var Wt=new go.PathFigure((yt+gt)*et,Lt*nt,!0);return ct.add(Wt),Wt.add(new go.PathSegment(go.PathSegment.Bezier,yt*et,(Lt+gt)*nt,(yt+gt)*et,(Lt+lt)*nt,(yt+lt)*et,(Lt+gt)*nt)),Wt.add(new go.PathSegment(go.PathSegment.Bezier,(yt-gt)*et,Lt*nt,(yt-lt)*et,(Lt+gt)*nt,(yt-gt)*et,(Lt+lt)*nt)),Wt.add(new go.PathSegment(go.PathSegment.Bezier,yt*et,(Lt-gt)*nt,(yt-gt)*et,(Lt-lt)*nt,(yt-lt)*et,(Lt-gt)*nt)),Wt.add(new go.PathSegment(go.PathSegment.Bezier,(yt+gt)*et,Lt*nt,(yt+lt)*et,(Lt-gt)*nt,(yt+gt)*et,(Lt-lt)*nt)),ct.spot1=new go.Spot(0,.25),ct.spot2=new go.Spot(.4,.75),ct}),go.Shape.defineFigureGenerator("NandGate",function(Ut,et,nt){var ct=new go.Geometry,lt=ve*.5,gt=ve*.4,yt=ve*.1,Lt=.1,It=.9,Wt=.5,qt=new go.PathFigure(.8*et,.5*nt,!0);ct.add(qt),qt.add(new go.PathSegment(go.PathSegment.Bezier,.4*et,nt,.8*et,(.5+gt)*nt,(.4+lt)*et,nt)),qt.add(new go.PathSegment(go.PathSegment.Line,0,nt)),qt.add(new go.PathSegment(go.PathSegment.Line,0,0)),qt.add(new go.PathSegment(go.PathSegment.Line,.4*et,0)),qt.add(new go.PathSegment(go.PathSegment.Bezier,.8*et,.5*nt,(.4+lt)*et,0,.8*et,(.5-gt)*nt));var he=new go.PathFigure((It+Lt)*et,Wt*nt,!0);return ct.add(he),he.add(new go.PathSegment(go.PathSegment.Bezier,It*et,(Wt+Lt)*nt,(It+Lt)*et,(Wt+yt)*nt,(It+yt)*et,(Wt+Lt)*nt)),he.add(new go.PathSegment(go.PathSegment.Bezier,(It-Lt)*et,Wt*nt,(It-yt)*et,(Wt+Lt)*nt,(It-Lt)*et,(Wt+yt)*nt)),he.add(new go.PathSegment(go.PathSegment.Bezier,It*et,(Wt-Lt)*nt,(It-Lt)*et,(Wt-yt)*nt,(It-yt)*et,(Wt-Lt)*nt)),he.add(new go.PathSegment(go.PathSegment.Bezier,(It+Lt)*et,Wt*nt,(It+yt)*et,(Wt-Lt)*nt,(It+Lt)*et,(Wt-yt)*nt)),ct.spot1=new go.Spot(0,.05),ct.spot2=new go.Spot(.55,.95),ct}),go.Shape.defineFigureGenerator("NorGate",function(Ut,et,nt){var ct=new go.Geometry,lt=.5,gt=ve*lt,yt=0,Lt=.5,It=new go.PathFigure(.8*et,.5*nt,!0);ct.add(It),It.add(new go.PathSegment(go.PathSegment.Bezier,0,nt,.7*et,(Lt+gt)*nt,(yt+gt)*et,(Lt+lt)*nt)),It.add(new go.PathSegment(go.PathSegment.Bezier,0,0,.25*et,.75*nt,.25*et,.25*nt)),It.add(new go.PathSegment(go.PathSegment.Bezier,.8*et,.5*nt,(yt+gt)*et,(Lt-lt)*nt,.7*et,(Lt-gt)*nt)),lt=.1,gt=ve*.1,yt=.9,Lt=.5;var Wt=new go.PathFigure((yt-lt)*et,Lt*nt,!0);return ct.add(Wt),Wt.add(new go.PathSegment(go.PathSegment.Bezier,yt*et,(Lt-lt)*nt,(yt-lt)*et,(Lt-gt)*nt,(yt-gt)*et,(Lt-lt)*nt)),Wt.add(new go.PathSegment(go.PathSegment.Bezier,(yt+lt)*et,Lt*nt,(yt+gt)*et,(Lt-lt)*nt,(yt+lt)*et,(Lt-gt)*nt)),Wt.add(new go.PathSegment(go.PathSegment.Bezier,yt*et,(Lt+lt)*nt,(yt+lt)*et,(Lt+gt)*nt,(yt+gt)*et,(Lt+lt)*nt)),Wt.add(new go.PathSegment(go.PathSegment.Bezier,(yt-lt)*et,Lt*nt,(yt-gt)*et,(Lt+lt)*nt,(yt-lt)*et,(Lt+gt)*nt)),ct.spot1=new go.Spot(.2,.25),ct.spot2=new go.Spot(.6,.75),ct}),go.Shape.defineFigureGenerator("OrGate",function(Ut,et,nt){var ct=new go.Geometry,lt=.5,gt=ve*lt,yt=0,Lt=.5,It=new go.PathFigure(0,0,!0);return ct.add(It),It.add(new go.PathSegment(go.PathSegment.Bezier,et,.5*nt,(yt+gt+gt)*et,(Lt-lt)*nt,.8*et,(Lt-gt)*nt)),It.add(new go.PathSegment(go.PathSegment.Bezier,0,nt,.8*et,(Lt+gt)*nt,(yt+gt+gt)*et,(Lt+lt)*nt)),It.add(new go.PathSegment(go.PathSegment.Bezier,0,0,.25*et,.75*nt,.25*et,.25*nt).close()),ct.spot1=new go.Spot(.2,.25),ct.spot2=new go.Spot(.75,.75),ct}),go.Shape.defineFigureGenerator("XnorGate",function(Ut,et,nt){var ct=new go.Geometry,lt=.5,gt=ve*lt,yt=.2,Lt=.5,It=new go.PathFigure(.1*et,0,!1);ct.add(It),It.add(new go.PathSegment(go.PathSegment.Bezier,.1*et,nt,.35*et,.25*nt,.35*et,.75*nt));var Wt=new go.PathFigure(.8*et,.5*nt,!0);ct.add(Wt),Wt.add(new go.PathSegment(go.PathSegment.Bezier,.2*et,nt,.7*et,(Lt+gt)*nt,(yt+gt)*et,(Lt+lt)*nt)),Wt.add(new go.PathSegment(go.PathSegment.Bezier,.2*et,0,.45*et,.75*nt,.45*et,.25*nt)),Wt.add(new go.PathSegment(go.PathSegment.Bezier,.8*et,.5*nt,(yt+gt)*et,(Lt-lt)*nt,.7*et,(Lt-gt)*nt)),lt=.1,gt=ve*.1,yt=.9,Lt=.5;var qt=new go.PathFigure((yt-lt)*et,Lt*nt,!0);return ct.add(qt),qt.add(new go.PathSegment(go.PathSegment.Bezier,yt*et,(Lt-lt)*nt,(yt-lt)*et,(Lt-gt)*nt,(yt-gt)*et,(Lt-lt)*nt)),qt.add(new go.PathSegment(go.PathSegment.Bezier,(yt+lt)*et,Lt*nt,(yt+gt)*et,(Lt-lt)*nt,(yt+lt)*et,(Lt-gt)*nt)),qt.add(new go.PathSegment(go.PathSegment.Bezier,yt*et,(Lt+lt)*nt,(yt+lt)*et,(Lt+gt)*nt,(yt+gt)*et,(Lt+lt)*nt)),qt.add(new go.PathSegment(go.PathSegment.Bezier,(yt-lt)*et,Lt*nt,(yt-gt)*et,(Lt+lt)*nt,(yt-lt)*et,(Lt+gt)*nt)),ct.spot1=new go.Spot(.4,.25),ct.spot2=new go.Spot(.65,.75),ct}),go.Shape.defineFigureGenerator("XorGate",function(Ut,et,nt){var ct=new go.Geometry,lt=.5,gt=ve*lt,yt=.2,Lt=.5,It=new go.PathFigure(.1*et,0,!1);ct.add(It),It.add(new go.PathSegment(go.PathSegment.Bezier,.1*et,nt,.35*et,.25*nt,.35*et,.75*nt));var Wt=new go.PathFigure(.2*et,0,!0);return ct.add(Wt),Wt.add(new go.PathSegment(go.PathSegment.Bezier,et,.5*nt,(yt+gt)*et,(Lt-lt)*nt,.9*et,(Lt-gt)*nt)),Wt.add(new go.PathSegment(go.PathSegment.Bezier,.2*et,nt,.9*et,(Lt+gt)*nt,(yt+gt)*et,(Lt+lt)*nt)),Wt.add(new go.PathSegment(go.PathSegment.Bezier,.2*et,0,.45*et,.75*nt,.45*et,.25*nt).close()),ct.spot1=new go.Spot(.4,.25),ct.spot2=new go.Spot(.8,.75),ct}),go.Shape.defineFigureGenerator("Capacitor",function(Ut,et,nt){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,nt)),lt.add(new go.PathSegment(go.PathSegment.Move,et,0)),lt.add(new go.PathSegment(go.PathSegment.Line,et,nt)),ct}),go.Shape.defineFigureGenerator("Resistor",function(Ut,et,nt){var ct=new go.Geometry,lt=new go.PathFigure(0,.5*nt,!1);return ct.add(lt),lt.add(new go.PathSegment(go.PathSegment.Line,.1*et,0)),lt.add(new go.PathSegment(go.PathSegment.Line,.2*et,nt)),lt.add(new go.PathSegment(go.PathSegment.Line,.3*et,0)),lt.add(new go.PathSegment(go.PathSegment.Line,.4*et,nt)),lt.add(new go.PathSegment(go.PathSegment.Line,.5*et,0)),lt.add(new go.PathSegment(go.PathSegment.Line,.6*et,nt)),lt.add(new go.PathSegment(go.PathSegment.Line,.7*et,.5*nt)),ct}),go.Shape.defineFigureGenerator("Inductor",function(Ut,et,nt){var ct=new go.Geometry,lt=ve*.1,gt=.1,yt=.1,Lt=.5,It=new go.PathFigure((yt-lt*.5)*et,nt,!1);return ct.add(It),It.add(new go.PathSegment(go.PathSegment.Bezier,(yt+gt)*et,0,(yt-lt)*et,nt,(yt-gt)*et,0)),yt=.3,It.add(new go.PathSegment(go.PathSegment.Bezier,yt*et,nt,(yt+gt)*et,0,(yt+lt)*et,nt)),It.add(new go.PathSegment(go.PathSegment.Bezier,(yt+gt)*et,0,(yt-lt)*et,nt,(yt-gt)*et,0)),yt=.5,It.add(new go.PathSegment(go.PathSegment.Bezier,yt*et,nt,(yt+gt)*et,0,(yt+lt)*et,nt)),It.add(new go.PathSegment(go.PathSegment.Bezier,(yt+gt)*et,0,(yt-lt)*et,nt,(yt-gt)*et,0)),yt=.7,It.add(new go.PathSegment(go.PathSegment.Bezier,yt*et,nt,(yt+gt)*et,0,(yt+lt)*et,nt)),It.add(new go.PathSegment(go.PathSegment.Bezier,(yt+gt)*et,0,(yt-lt)*et,nt,(yt-gt)*et,0)),yt=.9,It.add(new go.PathSegment(go.PathSegment.Bezier,(yt+lt*.5)*et,nt,(yt+gt)*et,0,(yt+lt)*et,nt)),ct}),go.Shape.defineFigureGenerator("ACvoltageSource",function(Ut,et,nt){var ct=new go.Geometry,lt=ve*.5,gt=.5,yt=.5,Lt=.5,It=new go.PathFigure((yt-gt)*et,Lt*nt,!1);return ct.add(It),It.add(new go.PathSegment(go.PathSegment.Bezier,yt*et,(Lt-gt)*nt,(yt-gt)*et,(Lt-lt)*nt,(yt-lt)*et,(Lt-gt)*nt)),It.add(new go.PathSegment(go.PathSegment.Bezier,(yt+gt)*et,Lt*nt,(yt+lt)*et,(Lt-gt)*nt,(yt+gt)*et,(Lt-lt)*nt)),It.add(new go.PathSegment(go.PathSegment.Bezier,yt*et,(Lt+gt)*nt,(yt+gt)*et,(Lt+lt)*nt,(yt+lt)*et,(Lt+gt)*nt)),It.add(new go.PathSegment(go.PathSegment.Bezier,(yt-gt)*et,Lt*nt,(yt-lt)*et,(Lt+gt)*nt,(yt-gt)*et,(Lt+lt)*nt)),It.add(new go.PathSegment(go.PathSegment.Move,(yt-gt+.1)*et,Lt*nt)),It.add(new go.PathSegment(go.PathSegment.Bezier,(yt+gt-.1)*et,Lt*nt,yt*et,(Lt-gt)*nt,yt*et,(Lt+gt)*nt)),ct}),go.Shape.defineFigureGenerator("DCvoltageSource",function(Ut,et,nt){var ct=new go.Geometry,lt=new go.PathFigure(0,.75*nt,!1);return ct.add(lt),lt.add(new go.PathSegment(go.PathSegment.Line,0,.25*nt)),lt.add(new go.PathSegment(go.PathSegment.Move,et,0)),lt.add(new go.PathSegment(go.PathSegment.Line,et,nt)),ct}),go.Shape.defineFigureGenerator("Diode",function(Ut,et,nt){var ct=new go.Geometry,lt=new go.PathFigure(et,0,!1);return ct.add(lt),lt.add(new go.PathSegment(go.PathSegment.Line,et,.5*nt)),lt.add(new go.PathSegment(go.PathSegment.Line,0,nt)),lt.add(new go.PathSegment(go.PathSegment.Line,0,0)),lt.add(new go.PathSegment(go.PathSegment.Line,et,.5*nt)),lt.add(new go.PathSegment(go.PathSegment.Line,et,nt)),ct.spot1=new go.Spot(0,.25),ct.spot2=new go.Spot(.5,.75),ct}),go.Shape.defineFigureGenerator("Wifi",function(Ut,et,nt){var ct=new go.Geometry,lt=et,gt=nt;et=et*.38,nt=nt*.6;var yt=ve*.8,Lt=.8,It=0,Wt=.5,qt=(lt-et)/2,he=(gt-nt)/2,fe=new go.PathFigure(It*et+qt,(Wt+Lt)*nt+he,!0);ct.add(fe),fe.add(new go.PathSegment(go.PathSegment.Bezier,(It-Lt)*et+qt,Wt*nt+he,(It-yt)*et+qt,(Wt+Lt)*nt+he,(It-Lt)*et+qt,(Wt+yt)*nt+he)),fe.add(new go.PathSegment(go.PathSegment.Bezier,It*et+qt,(Wt-Lt)*nt+he,(It-Lt)*et+qt,(Wt-yt)*nt+he,(It-yt)*et+qt,(Wt-Lt)*nt+he)),fe.add(new go.PathSegment(go.PathSegment.Bezier,(It-Lt+yt*.5)*et+qt,Wt*nt+he,It*et+qt,(Wt-Lt)*nt+he,(It-Lt+yt*.5)*et+qt,(Wt-yt)*nt+he)),fe.add(new go.PathSegment(go.PathSegment.Bezier,It*et+qt,(Wt+Lt)*nt+he,(It-Lt+yt*.5)*et+qt,(Wt+yt)*nt+he,It*et+qt,(Wt+Lt)*nt+he).close()),yt=ve*.4,Lt=.4,It=.2,Wt=.5;var Ae=new go.PathFigure(It*et+qt,(Wt+Lt)*nt+he,!0);ct.add(Ae),Ae.add(new go.PathSegment(go.PathSegment.Bezier,(It-Lt)*et+qt,Wt*nt+he,(It-yt)*et+qt,(Wt+Lt)*nt+he,(It-Lt)*et+qt,(Wt+yt)*nt+he)),Ae.add(new go.PathSegment(go.PathSegment.Bezier,It*et+qt,(Wt-Lt)*nt+he,(It-Lt)*et+qt,(Wt-yt)*nt+he,(It-yt)*et+qt,(Wt-Lt)*nt+he)),Ae.add(new go.PathSegment(go.PathSegment.Bezier,(It-Lt+yt*.5)*et+qt,Wt*nt+he,It*et+qt,(Wt-Lt)*nt+he,(It-Lt+yt*.5)*et+qt,(Wt-yt)*nt+he)),Ae.add(new go.PathSegment(go.PathSegment.Bezier,It*et+qt,(Wt+Lt)*nt+he,(It-Lt+yt*.5)*et+qt,(Wt+yt)*nt+he,It*et+qt,(Wt+Lt)*nt+he).close()),yt=ve*.2,Lt=.2,It=.5,Wt=.5;var Ve=new go.PathFigure((It-Lt)*et+qt,Wt*nt+he,!0);ct.add(Ve),Ve.add(new go.PathSegment(go.PathSegment.Bezier,It*et+qt,(Wt-Lt)*nt+he,(It-Lt)*et+qt,(Wt-yt)*nt+he,(It-yt)*et+qt,(Wt-Lt)*nt+he)),Ve.add(new go.PathSegment(go.PathSegment.Bezier,(It+Lt)*et+qt,Wt*nt+he,(It+yt)*et+qt,(Wt-Lt)*nt+he,(It+Lt)*et+qt,(Wt-yt)*nt+he)),Ve.add(new go.PathSegment(go.PathSegment.Bezier,It*et+qt,(Wt+Lt)*nt+he,(It+Lt)*et+qt,(Wt+yt)*nt+he,(It+yt)*et+qt,(Wt+Lt)*nt+he)),Ve.add(new go.PathSegment(go.PathSegment.Bezier,(It-Lt)*et+qt,Wt*nt+he,(It-yt)*et+qt,(Wt+Lt)*nt+he,(It-Lt)*et+qt,(Wt+yt)*nt+he)),yt=ve*.4,Lt=.4,It=.8,Wt=.5;var ye=new go.PathFigure(It*et+qt,(Wt-Lt)*nt+he,!0);ct.add(ye),ye.add(new go.PathSegment(go.PathSegment.Bezier,(It+Lt)*et+qt,Wt*nt+he,(It+yt)*et+qt,(Wt-Lt)*nt+he,(It+Lt)*et+qt,(Wt-yt)*nt+he)),ye.add(new go.PathSegment(go.PathSegment.Bezier,It*et+qt,(Wt+Lt)*nt+he,(It+Lt)*et+qt,(Wt+yt)*nt+he,(It+yt)*et+qt,(Wt+Lt)*nt+he)),ye.add(new go.PathSegment(go.PathSegment.Bezier,(It+Lt-yt*.5)*et+qt,Wt*nt+he,It*et+qt,(Wt+Lt)*nt+he,(It+Lt-yt*.5)*et+qt,(Wt+yt)*nt+he)),ye.add(new go.PathSegment(go.PathSegment.Bezier,It*et+qt,(Wt-Lt)*nt+he,(It+Lt-yt*.5)*et+qt,(Wt-yt)*nt+he,It*et+qt,(Wt-Lt)*nt+he).close()),yt=ve*.8,Lt=.8,It=1,Wt=.5;var on=new go.PathFigure(It*et+qt,(Wt-Lt)*nt+he,!0);return ct.add(on),on.add(new go.PathSegment(go.PathSegment.Bezier,(It+Lt)*et+qt,Wt*nt+he,(It+yt)*et+qt,(Wt-Lt)*nt+he,(It+Lt)*et+qt,(Wt-yt)*nt+he)),on.add(new go.PathSegment(go.PathSegment.Bezier,It*et+qt,(Wt+Lt)*nt+he,(It+Lt)*et+qt,(Wt+yt)*nt+he,(It+yt)*et+qt,(Wt+Lt)*nt+he)),on.add(new go.PathSegment(go.PathSegment.Bezier,(It+Lt-yt*.5)*et+qt,Wt*nt+he,It*et+qt,(Wt+Lt)*nt+he,(It+Lt-yt*.5)*et+qt,(Wt+yt)*nt+he)),on.add(new go.PathSegment(go.PathSegment.Bezier,It*et+qt,(Wt-Lt)*nt+he,(It+Lt-yt*.5)*et+qt,(Wt-yt)*nt+he,It*et+qt,(Wt-Lt)*nt+he).close()),ct}),go.Shape.defineFigureGenerator("Email",function(Ut,et,nt){var ct=new go.Geometry,lt=new go.PathFigure(0,0,!0);ct.add(lt),lt.add(new go.PathSegment(go.PathSegment.Line,et,0)),lt.add(new go.PathSegment(go.PathSegment.Line,et,nt)),lt.add(new go.PathSegment(go.PathSegment.Line,0,nt)),lt.add(new go.PathSegment(go.PathSegment.Line,0,0).close());var gt=new go.PathFigure(0,0,!1);return ct.add(gt),gt.add(new go.PathSegment(go.PathSegment.Line,.5*et,.6*nt)),gt.add(new go.PathSegment(go.PathSegment.Line,et,0)),gt.add(new go.PathSegment(go.PathSegment.Move,0,nt)),gt.add(new go.PathSegment(go.PathSegment.Line,.45*et,.54*nt)),gt.add(new go.PathSegment(go.PathSegment.Move,et,nt)),gt.add(new go.PathSegment(go.PathSegment.Line,.55*et,.54*nt)),ct}),go.Shape.defineFigureGenerator("Ethernet",function(Ut,et,nt){var ct=new go.Geometry,lt=new go.PathFigure(.35*et,0,!0);ct.add(lt),lt.add(new go.PathSegment(go.PathSegment.Line,.65*et,0)),lt.add(new go.PathSegment(go.PathSegment.Line,.65*et,.4*nt)),lt.add(new go.PathSegment(go.PathSegment.Line,.35*et,.4*nt)),lt.add(new go.PathSegment(go.PathSegment.Line,.35*et,0).close());var gt=new go.PathFigure(.1*et,nt,!0,!0);ct.add(gt),gt.add(new go.PathSegment(go.PathSegment.Line,.4*et,nt)),gt.add(new go.PathSegment(go.PathSegment.Line,.4*et,.6*nt)),gt.add(new go.PathSegment(go.PathSegment.Line,.1*et,.6*nt)),gt.add(new go.PathSegment(go.PathSegment.Line,.1*et,nt).close());var yt=new go.PathFigure(.6*et,nt,!0,!0);ct.add(yt),yt.add(new go.PathSegment(go.PathSegment.Line,.9*et,nt)),yt.add(new go.PathSegment(go.PathSegment.Line,.9*et,.6*nt)),yt.add(new go.PathSegment(go.PathSegment.Line,.6*et,.6*nt)),yt.add(new go.PathSegment(go.PathSegment.Line,.6*et,nt).close());var Lt=new go.PathFigure(0,.5*nt,!1);return ct.add(Lt),Lt.add(new go.PathSegment(go.PathSegment.Line,et,.5*nt)),Lt.add(new go.PathSegment(go.PathSegment.Move,.5*et,.5*nt)),Lt.add(new go.PathSegment(go.PathSegment.Line,.5*et,.4*nt)),Lt.add(new go.PathSegment(go.PathSegment.Move,.75*et,.5*nt)),Lt.add(new go.PathSegment(go.PathSegment.Line,.75*et,.6*nt)),Lt.add(new go.PathSegment(go.PathSegment.Move,.25*et,.5*nt)),Lt.add(new go.PathSegment(go.PathSegment.Line,.25*et,.6*nt)),ct}),go.Shape.defineFigureGenerator("Power",function(Ut,et,nt){var ct=new go.Geometry,lt=ve*.4,gt=.4,yt=.5,Lt=.5,It=bt(),Wt=bt(),qt=bt(),he=bt();Ze(yt,Lt-gt,yt+lt,Lt-gt,yt+gt,Lt-lt,yt+gt,Lt,.5,It,It,Wt,qt,he);var fe=ne(Wt.x,Wt.y),Ae=new go.PathFigure(Wt.x*et,Wt.y*nt,!0);ct.add(Ae),Ae.add(new go.PathSegment(go.PathSegment.Bezier,(yt+gt)*et,Lt*nt,qt.x*et,qt.y*nt,he.x*et,he.y*nt)),Ae.add(new go.PathSegment(go.PathSegment.Bezier,yt*et,(Lt+gt)*nt,(yt+gt)*et,(Lt+lt)*nt,(yt+lt)*et,(Lt+gt)*nt)),Ae.add(new go.PathSegment(go.PathSegment.Bezier,(yt-gt)*et,Lt*nt,(yt-lt)*et,(Lt+gt)*nt,(yt-gt)*et,(Lt+lt)*nt)),Ze(yt-gt,Lt,yt-gt,Lt-lt,yt-lt,Lt-gt,yt,Lt-gt,.5,qt,he,Wt,It,It),Ae.add(new go.PathSegment(go.PathSegment.Bezier,Wt.x*et,Wt.y*nt,qt.x*et,qt.y*nt,he.x*et,he.y*nt)),lt=ve*.3,gt=.3,Ze(yt-gt,Lt,yt-gt,Lt-lt,yt-lt,Lt-gt,yt,Lt-gt,.5,qt,he,Wt,It,It),Ae.add(new go.PathSegment(go.PathSegment.Line,Wt.x*et,Wt.y*nt)),Ae.add(new go.PathSegment(go.PathSegment.Bezier,(yt-gt)*et,Lt*nt,he.x*et,he.y*nt,qt.x*et,qt.y*nt)),Ae.add(new go.PathSegment(go.PathSegment.Bezier,yt*et,(Lt+gt)*nt,(yt-gt)*et,(Lt+lt)*nt,(yt-lt)*et,(Lt+gt)*nt)),Ae.add(new go.PathSegment(go.PathSegment.Bezier,(yt+gt)*et,Lt*nt,(yt+lt)*et,(Lt+gt)*nt,(yt+gt)*et,(Lt+lt)*nt)),Ze(yt,Lt-gt,yt+lt,Lt-gt,yt+gt,Lt-lt,yt+gt,Lt,.5,It,It,Wt,qt,he),Ae.add(new go.PathSegment(go.PathSegment.Bezier,Wt.x*et,Wt.y*nt,he.x*et,he.y*nt,qt.x*et,qt.y*nt).close());var Ae=new go.PathFigure(.45*et,0,!0);return ct.add(Ae),Ae.add(new go.PathSegment(go.PathSegment.Line,.45*et,.5*nt)),Ae.add(new go.PathSegment(go.PathSegment.Line,.55*et,.5*nt)),Ae.add(new go.PathSegment(go.PathSegment.Line,.55*et,0).close()),Be(It),Be(Wt),Be(qt),Be(he),Be(fe),ct.spot1=new go.Spot(.25,.45),ct.spot2=new go.Spot(.75,.8),ct}),go.Shape.defineFigureGenerator("Fallout",function(Ut,et,nt){var ct=new go.Geometry,lt=new go.PathFigure(0,nt/2,!0);ct.add(lt),lt.add(new go.PathSegment(go.PathSegment.Arc,180,360,et/2,nt/2,et/2,nt/2));function gt(yt,Lt,It){yt.add(new go.PathSegment(go.PathSegment.Move,(.3+Lt)*et,(.8+It)*nt)),yt.add(new go.PathSegment(go.PathSegment.Line,(.5+Lt)*et,(.5+It)*nt)),yt.add(new go.PathSegment(go.PathSegment.Line,(.1+Lt)*et,(.5+It)*nt)),yt.add(new go.PathSegment(go.PathSegment.Line,(.3+Lt)*et,(.8+It)*nt).close())}return gt(lt,0,0),gt(lt,.4,0),gt(lt,.2,-.3),ct}),go.Shape.defineFigureGenerator("IrritationHazard",function(Ut,et,nt){var ct=new go.Geometry,lt=new go.PathFigure(.2*et,0,!0);return ct.add(lt),lt.add(new go.PathSegment(go.PathSegment.Line,.5*et,.3*nt)),lt.add(new go.PathSegment(go.PathSegment.Line,.8*et,0)),lt.add(new go.PathSegment(go.PathSegment.Line,et,.2*nt)),lt.add(new go.PathSegment(go.PathSegment.Line,.7*et,.5*nt)),lt.add(new go.PathSegment(go.PathSegment.Line,et,.8*nt)),lt.add(new go.PathSegment(go.PathSegment.Line,.8*et,nt)),lt.add(new go.PathSegment(go.PathSegment.Line,.5*et,.7*nt)),lt.add(new go.PathSegment(go.PathSegment.Line,.2*et,nt)),lt.add(new go.PathSegment(go.PathSegment.Line,0,.8*nt)),lt.add(new go.PathSegment(go.PathSegment.Line,.3*et,.5*nt)),lt.add(new go.PathSegment(go.PathSegment.Line,0,.2*nt).close()),ct.spot1=new go.Spot(.3,.3),ct.spot2=new go.Spot(.7,.7),ct}),go.Shape.defineFigureGenerator("ElectricalHazard",function(Ut,et,nt){var ct=new go.Geometry,lt=new go.PathFigure(.37*et,0,!0);return ct.add(lt),lt.add(new go.PathSegment(go.PathSegment.Line,.5*et,.11*nt)),lt.add(new go.PathSegment(go.PathSegment.Line,.77*et,.04*nt)),lt.add(new go.PathSegment(go.PathSegment.Line,.33*et,.49*nt)),lt.add(new go.PathSegment(go.PathSegment.Line,et,.37*nt)),lt.add(new go.PathSegment(go.PathSegment.Line,.63*et,.86*nt)),lt.add(new go.PathSegment(go.PathSegment.Line,.77*et,.91*nt)),lt.add(new go.PathSegment(go.PathSegment.Line,.34*et,nt)),lt.add(new go.PathSegment(go.PathSegment.Line,.34*et,.78*nt)),lt.add(new go.PathSegment(go.PathSegment.Line,.44*et,.8*nt)),lt.add(new go.PathSegment(go.PathSegment.Line,.65*et,.56*nt)),lt.add(new go.PathSegment(go.PathSegment.Line,0,.68*nt).close()),ct}),go.Shape.defineFigureGenerator("FireHazard",function(Ut,et,nt){var ct=new go.Geometry,lt=new go.PathFigure(.1*et,nt,!0);return ct.add(lt),lt.add(new go.PathSegment(go.PathSegment.Bezier,.29*et,0,-.25*et,.63*nt,.45*et,.44*nt)),lt.add(new go.PathSegment(go.PathSegment.Bezier,.51*et,.42*nt,.48*et,.17*nt,.54*et,.35*nt)),lt.add(new go.PathSegment(go.PathSegment.Bezier,.59*et,.18*nt,.59*et,.29*nt,.58*et,.28*nt)),lt.add(new go.PathSegment(go.PathSegment.Bezier,.75*et,.6*nt,.8*et,.34*nt,.88*et,.43*nt)),lt.add(new go.PathSegment(go.PathSegment.Bezier,.88*et,.31*nt,.87*et,.48*nt,.88*et,.43*nt)),lt.add(new go.PathSegment(go.PathSegment.Bezier,.9*et,nt,1.17*et,.76*nt,.82*et,.8*nt).close()),ct.spot1=new go.Spot(.07,.445),ct.spot2=new go.Spot(.884,.958),ct}),go.Shape.defineFigureGenerator("BpmnActivityLoop",function(Ut,et,nt){var ct=new go.Geometry,lt=.5,gt=0,yt=0,Lt=lt*ve,It=.4*Math.SQRT2/2+.5,Wt=.5-.5*Math.SQRT2/2,qt=1,he=.5,fe=.5,Ae=0,Ve=new go.PathFigure(It*et,(1-Wt)*nt,!1);return ct.add(Ve),Ve.add(new go.PathSegment(go.PathSegment.Bezier,qt*et,he*nt,qt*et,.7*nt,qt*et,he*nt)),Ve.add(new go.PathSegment(go.PathSegment.Bezier,(fe+gt)*et,(Ae+gt)*nt,(.5+lt+gt)*et,(.5-Lt+gt)*nt,(.5+Lt+gt)*et,(.5-lt+gt)*nt)),Ve.add(new go.PathSegment(go.PathSegment.Bezier,(.5-lt+gt)*et,(.5+yt)*nt,(.5-Lt+gt)*et,(.5-lt+yt)*nt,(.5-lt+gt)*et,(.5-Lt+yt)*nt)),Ve.add(new go.PathSegment(go.PathSegment.Bezier,(.35+gt)*et,.9*nt,(.5-lt+gt)*et,(.5+Lt+yt)*nt,(.5-Lt+gt)*et,.9*nt)),Ve.add(new go.PathSegment(go.PathSegment.Move,(.25+gt)*et,.8*nt)),Ve.add(new go.PathSegment(go.PathSegment.Line,(.35+gt)*et,.9*nt)),Ve.add(new go.PathSegment(go.PathSegment.Line,(.2+gt)*et,.95*nt)),ct}),go.Shape.defineFigureGenerator("BpmnActivityParallel",function(Ut,et,nt){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,nt)),lt.add(new go.PathSegment(go.PathSegment.Move,.5*et,0)),lt.add(new go.PathSegment(go.PathSegment.Line,.5*et,nt)),lt.add(new go.PathSegment(go.PathSegment.Move,et,0)),lt.add(new go.PathSegment(go.PathSegment.Line,et,nt)),ct}),go.Shape.defineFigureGenerator("BpmnActivitySequential",function(Ut,et,nt){var ct=new go.Geometry,lt=new go.PathFigure(0,0,!1);return ct.add(lt),lt.add(new go.PathSegment(go.PathSegment.Line,et,0)),lt.add(new go.PathSegment(go.PathSegment.Move,0,.5*nt)),lt.add(new go.PathSegment(go.PathSegment.Line,et,.5*nt)),lt.add(new go.PathSegment(go.PathSegment.Move,0,nt)),lt.add(new go.PathSegment(go.PathSegment.Line,et,nt)),ct}),go.Shape.defineFigureGenerator("BpmnActivityAdHoc",function(Ut,et,nt){var ct=new go.Geometry,lt=new go.PathFigure(0,0,!1);ct.add(lt);var gt=new go.PathFigure(et,nt,!1);ct.add(gt);var yt=new go.PathFigure(0,.5*nt,!1);return ct.add(yt),yt.add(new go.PathSegment(go.PathSegment.Bezier,.5*et,.5*nt,.2*et,.35*nt,.3*et,.35*nt)),yt.add(new go.PathSegment(go.PathSegment.Bezier,et,.5*nt,.7*et,.65*nt,.8*et,.65*nt)),ct}),go.Shape.defineFigureGenerator("BpmnActivityCompensation",function(Ut,et,nt){var ct=new go.Geometry,lt=new go.PathFigure(0,.5*nt,!0);return ct.add(lt),lt.add(new go.PathSegment(go.PathSegment.Line,.5*et,0)),lt.add(new go.PathSegment(go.PathSegment.Line,.5*et,.5*nt)),lt.add(new go.PathSegment(go.PathSegment.Line,et,nt)),lt.add(new go.PathSegment(go.PathSegment.Line,et,0)),lt.add(new go.PathSegment(go.PathSegment.Line,.5*et,.5*nt)),lt.add(new go.PathSegment(go.PathSegment.Line,.5*et,nt).close()),ct}),go.Shape.defineFigureGenerator("BpmnTaskMessage",function(Ut,et,nt){var ct=new go.Geometry,lt=new go.PathFigure(0,.2*nt,!0);ct.add(lt),lt.add(new go.PathSegment(go.PathSegment.Line,et,.2*nt)),lt.add(new go.PathSegment(go.PathSegment.Line,et,.8*nt)),lt.add(new go.PathSegment(go.PathSegment.Line,0,.8*nt)),lt.add(new go.PathSegment(go.PathSegment.Line,0,.8*nt).close());var lt=new go.PathFigure(0,.2*nt,!1);return ct.add(lt),lt.add(new go.PathSegment(go.PathSegment.Line,.5*et,.5*nt)),lt.add(new go.PathSegment(go.PathSegment.Line,et,.2*nt)),ct}),go.Shape.defineFigureGenerator("BpmnTaskScript",function(Ut,et,nt){var ct=new go.Geometry,lt=new go.PathFigure(.7*et,nt,!0);ct.add(lt),lt.add(new go.PathSegment(go.PathSegment.Line,.3*et,nt)),lt.add(new go.PathSegment(go.PathSegment.Bezier,.3*et,0,.6*et,.5*nt,0,.5*nt)),lt.add(new go.PathSegment(go.PathSegment.Line,.7*et,0)),lt.add(new go.PathSegment(go.PathSegment.Bezier,.7*et,nt,.4*et,.5*nt,et,.5*nt).close());var gt=new go.PathFigure(.45*et,.73*nt,!1);return ct.add(gt),gt.add(new go.PathSegment(go.PathSegment.Line,.7*et,.73*nt)),gt.add(new go.PathSegment(go.PathSegment.Move,.38*et,.5*nt)),gt.add(new go.PathSegment(go.PathSegment.Line,.63*et,.5*nt)),gt.add(new go.PathSegment(go.PathSegment.Move,.31*et,.27*nt)),gt.add(new go.PathSegment(go.PathSegment.Line,.56*et,.27*nt)),ct}),go.Shape.defineFigureGenerator("BpmnTaskUser",function(Ut,et,nt){var ct=new go.Geometry,lt=new go.PathFigure(0,0,!1);ct.add(lt);var gt=new go.PathFigure(.335*et,(1-.555)*nt,!0);ct.add(gt),gt.add(new go.PathSegment(go.PathSegment.Line,.335*et,(1-.405)*nt)),gt.add(new go.PathSegment(go.PathSegment.Line,(1-.335)*et,(1-.405)*nt)),gt.add(new go.PathSegment(go.PathSegment.Line,(1-.335)*et,(1-.555)*nt)),gt.add(new go.PathSegment(go.PathSegment.Bezier,et,.68*nt,(1-.12)*et,.46*nt,(1-.02)*et,.54*nt)),gt.add(new go.PathSegment(go.PathSegment.Line,et,nt)),gt.add(new go.PathSegment(go.PathSegment.Line,0,nt)),gt.add(new go.PathSegment(go.PathSegment.Line,0,.68*nt)),gt.add(new go.PathSegment(go.PathSegment.Bezier,.335*et,(1-.555)*nt,.02*et,.54*nt,.12*et,.46*nt)),gt.add(new go.PathSegment(go.PathSegment.Line,.365*et,(1-.595)*nt));var yt=.5-.285,Lt=.5,It=yt,Wt=Math.PI/4,qt=4*(1-Math.cos(Wt))/(3*Math.sin(Wt)),he=qt*.5,fe=yt,Ae=yt,Ve=qt*fe,ye=qt*Ae;gt.add(new go.PathSegment(go.PathSegment.Bezier,(Lt-fe)*et,It*nt,(Lt-(Ve+fe)/2)*et,(It+(Ae+ye)/2)*nt,(Lt-fe)*et,(It+ye)*nt)),gt.add(new go.PathSegment(go.PathSegment.Bezier,Lt*et,(It-Ae)*nt,(Lt-fe)*et,(It-ye)*nt,(Lt-Ve)*et,(It-Ae)*nt)),gt.add(new go.PathSegment(go.PathSegment.Bezier,(Lt+fe)*et,It*nt,(Lt+Ve)*et,(It-Ae)*nt,(Lt+fe)*et,(It-ye)*nt)),gt.add(new go.PathSegment(go.PathSegment.Bezier,(1-.365)*et,(1-.595)*nt,(Lt+fe)*et,(It+ye)*nt,(Lt+(Ve+fe)/2)*et,(It+(Ae+ye)/2)*nt)),gt.add(new go.PathSegment(go.PathSegment.Line,(1-.365)*et,(1-.595)*nt)),gt.add(new go.PathSegment(go.PathSegment.Line,(1-.335)*et,(1-.555)*nt)),gt.add(new go.PathSegment(go.PathSegment.Line,(1-.335)*et,(1-.405)*nt)),gt.add(new go.PathSegment(go.PathSegment.Line,.335*et,(1-.405)*nt));var on=new go.PathFigure(.2*et,nt,!1);ct.add(on),on.add(new go.PathSegment(go.PathSegment.Line,.2*et,.8*nt));var pn=new go.PathFigure(.8*et,nt,!1);return ct.add(pn),pn.add(new go.PathSegment(go.PathSegment.Line,.8*et,.8*nt)),ct}),go.Shape.defineFigureGenerator("BpmnEventConditional",function(Ut,et,nt){var ct=new go.Geometry,lt=new go.PathFigure(.1*et,0,!0);ct.add(lt),lt.add(new go.PathSegment(go.PathSegment.Line,.9*et,0)),lt.add(new go.PathSegment(go.PathSegment.Line,.9*et,nt)),lt.add(new go.PathSegment(go.PathSegment.Line,.1*et,nt).close());var gt=new go.PathFigure(.2*et,.2*nt,!1);return ct.add(gt),gt.add(new go.PathSegment(go.PathSegment.Line,.8*et,.2*nt)),gt.add(new go.PathSegment(go.PathSegment.Move,.2*et,.4*nt)),gt.add(new go.PathSegment(go.PathSegment.Line,.8*et,.4*nt)),gt.add(new go.PathSegment(go.PathSegment.Move,.2*et,.6*nt)),gt.add(new go.PathSegment(go.PathSegment.Line,.8*et,.6*nt)),gt.add(new go.PathSegment(go.PathSegment.Move,.2*et,.8*nt)),gt.add(new go.PathSegment(go.PathSegment.Line,.8*et,.8*nt)),ct}),go.Shape.defineFigureGenerator("BpmnEventError",function(Ut,et,nt){var ct=new go.Geometry,lt=new go.PathFigure(0,nt,!0);return ct.add(lt),lt.add(new go.PathSegment(go.PathSegment.Line,.33*et,0)),lt.add(new go.PathSegment(go.PathSegment.Line,.66*et,.5*nt)),lt.add(new go.PathSegment(go.PathSegment.Line,et,0)),lt.add(new go.PathSegment(go.PathSegment.Line,.66*et,nt)),lt.add(new go.PathSegment(go.PathSegment.Line,.33*et,.5*nt).close()),ct}),go.Shape.defineFigureGenerator("BpmnEventEscalation",function(Ut,et,nt){var ct=new go.Geometry,lt=new go.PathFigure(0,0,!1);ct.add(lt);var gt=new go.PathFigure(et,nt,!1);ct.add(gt);var yt=new go.PathFigure(.1*et,nt,!0);return ct.add(yt),yt.add(new go.PathSegment(go.PathSegment.Line,.5*et,0)),yt.add(new go.PathSegment(go.PathSegment.Line,.9*et,nt)),yt.add(new go.PathSegment(go.PathSegment.Line,.5*et,.5*nt).close()),ct}),go.Shape.defineFigureGenerator("Caution",function(Ut,et,nt){var ct=new go.Geometry,lt=new go.PathFigure(.05*et,nt,!0);ct.add(lt),lt.add(new go.PathSegment(go.PathSegment.Bezier,.1*et,.8*nt,0,nt,0,nt)),lt.add(new go.PathSegment(go.PathSegment.Line,.45*et,.1*nt)),lt.add(new go.PathSegment(go.PathSegment.Bezier,.55*et,.1*nt,.5*et,0,.5*et,0)),lt.add(new go.PathSegment(go.PathSegment.Line,.95*et,.9*nt)),lt.add(new go.PathSegment(go.PathSegment.Bezier,.9*et,nt,et,nt,et,nt)),lt.add(new go.PathSegment(go.PathSegment.Line,.05*et,nt));var gt=.05;return lt.add(new go.PathSegment(go.PathSegment.Move,(.5-gt)*et,.875*nt)),lt.add(new go.PathSegment(go.PathSegment.Arc,180,-360,.5*et,.875*nt,gt*et,gt*nt)),lt.add(new go.PathSegment(go.PathSegment.Move,.5*et,.75*nt)),lt.add(new go.PathSegment(go.PathSegment.Bezier,.5*et,.325*nt,.575*et,.725*nt,.625*et,.375*nt)),lt.add(new go.PathSegment(go.PathSegment.Bezier,.5*et,.75*nt,.375*et,.375*nt,.425*et,.725*nt)),ct}),go.Shape.defineFigureGenerator("Recycle",function(Ut,et,nt){var ct=new go.Geometry,lt=new go.PathFigure(.45*et,.95*nt,!1);ct.add(lt),lt.add(new go.PathSegment(go.PathSegment.Line,.2*et,.95*nt)),lt.add(new go.PathSegment(go.PathSegment.Bezier,.185*et,.85*nt,.17*et,.95*nt,.15*et,.9*nt)),lt.add(new go.PathSegment(go.PathSegment.Line,.235*et,.75*nt)),lt.add(new go.PathSegment(go.PathSegment.Line,.3*et,.625*nt)),lt.add(new go.PathSegment(go.PathSegment.Line,.35*et,.65*nt)),lt.add(new go.PathSegment(go.PathSegment.Line,.275*et,.45*nt)),lt.add(new go.PathSegment(go.PathSegment.Line,.05*et,.45*nt)),lt.add(new go.PathSegment(go.PathSegment.Line,.1*et,.5*nt)),lt.add(new go.PathSegment(go.PathSegment.Line,.05*et,.575*nt)),lt.add(new go.PathSegment(go.PathSegment.Bezier,.1875*et,.95*nt,0,.675*nt,0,.7*nt)),lt.add(new go.PathSegment(go.PathSegment.Move,.45*et,.95*nt)),lt.add(new go.PathSegment(go.PathSegment.Line,.45*et,.775*nt)),lt.add(new go.PathSegment(go.PathSegment.Line,.22*et,.775*nt));var gt=new go.PathFigure(.475*et,.2*nt,!1);ct.add(gt),gt.add(new go.PathSegment(go.PathSegment.Line,.4*et,.4*nt)),gt.add(new go.PathSegment(go.PathSegment.Line,.225*et,.3*nt)),gt.add(new go.PathSegment(go.PathSegment.Line,.275*et,.175*nt)),gt.add(new go.PathSegment(go.PathSegment.Line,.325*et,.05*nt)),gt.add(new go.PathSegment(go.PathSegment.Bezier,.4*et,.05*nt,.35*et,0,.375*et,0)),gt.add(new go.PathSegment(go.PathSegment.Line,.575*et,.375*nt)),gt.add(new go.PathSegment(go.PathSegment.Line,.525*et,.4*nt)),gt.add(new go.PathSegment(go.PathSegment.Line,.75*et,.475*nt)),gt.add(new go.PathSegment(go.PathSegment.Line,.85*et,.315*nt)),gt.add(new go.PathSegment(go.PathSegment.Line,.8*et,.32*nt)),gt.add(new go.PathSegment(go.PathSegment.Line,.65*et,.05*nt)),gt.add(new go.PathSegment(go.PathSegment.Bezier,.575*et,0,.65*et,.05*nt,.625*et,0)),gt.add(new go.PathSegment(go.PathSegment.Line,.38*et,.0105*nt));var yt=new go.PathFigure(.675*et,.575*nt,!1);return ct.add(yt),yt.add(new go.PathSegment(go.PathSegment.Line,.875*et,.525*nt)),yt.add(new go.PathSegment(go.PathSegment.Line,et,.775*nt)),yt.add(new go.PathSegment(go.PathSegment.Bezier,.85*et,.95*nt,et,.8*nt,et,.85*nt)),yt.add(new go.PathSegment(go.PathSegment.Line,.65*et,.95*nt)),yt.add(new go.PathSegment(go.PathSegment.Line,.65*et,nt)),yt.add(new go.PathSegment(go.PathSegment.Line,.55*et,.85*nt)),yt.add(new go.PathSegment(go.PathSegment.Line,.65*et,.725*nt)),yt.add(new go.PathSegment(go.PathSegment.Line,.65*et,.775*nt)),yt.add(new go.PathSegment(go.PathSegment.Line,.7*et,.775*nt)),yt.add(new go.PathSegment(go.PathSegment.Line,et,.775*nt)),yt.add(new go.PathSegment(go.PathSegment.Move,.675*et,.575*nt)),yt.add(new go.PathSegment(go.PathSegment.Line,.775*et,.775*nt)),ct}),go.Shape.defineFigureGenerator("BpmnEventTimer",function(Ut,et,nt){var ct=new go.Geometry,lt=.5,gt=ve*.5,yt=new go.PathFigure(et,lt*nt,!0);ct.add(yt),yt.add(new go.PathSegment(go.PathSegment.Bezier,lt*et,nt,et,(lt+gt)*nt,(lt+gt)*et,nt)),yt.add(new go.PathSegment(go.PathSegment.Bezier,0,lt*nt,(lt-gt)*et,nt,0,(lt+gt)*nt)),yt.add(new go.PathSegment(go.PathSegment.Bezier,lt*et,0,0,(lt-gt)*nt,(lt-gt)*et,0)),yt.add(new go.PathSegment(go.PathSegment.Bezier,et,lt*nt,(lt+gt)*et,0,et,(lt-gt)*nt));var Lt=new go.PathFigure(lt*et,0,!1);return ct.add(Lt),Lt.add(new go.PathSegment(go.PathSegment.Line,lt*et,.15*nt)),Lt.add(new go.PathSegment(go.PathSegment.Move,lt*et,nt)),Lt.add(new go.PathSegment(go.PathSegment.Line,lt*et,.85*nt)),Lt.add(new go.PathSegment(go.PathSegment.Move,0,lt*nt)),Lt.add(new go.PathSegment(go.PathSegment.Line,.15*et,lt*nt)),Lt.add(new go.PathSegment(go.PathSegment.Move,et,lt*nt)),Lt.add(new go.PathSegment(go.PathSegment.Line,.85*et,lt*nt)),Lt.add(new go.PathSegment(go.PathSegment.Move,lt*et,lt*nt)),Lt.add(new go.PathSegment(go.PathSegment.Line,.58*et,.1*nt)),Lt.add(new go.PathSegment(go.PathSegment.Move,lt*et,lt*nt)),Lt.add(new go.PathSegment(go.PathSegment.Line,.78*et,.54*nt)),ct}),go.Shape.defineFigureGenerator("Package",function(Ut,et,nt){var ct=new go.Geometry,lt=new go.PathFigure(0,.15*nt,!0);ct.add(lt),lt.add(new go.PathSegment(go.PathSegment.Line,et,.15*nt)),lt.add(new go.PathSegment(go.PathSegment.Line,et,nt)),lt.add(new go.PathSegment(go.PathSegment.Line,0,nt).close());var gt=new go.PathFigure(0,.15*nt,!0);return ct.add(gt),gt.add(new go.PathSegment(go.PathSegment.Line,0,0)),gt.add(new go.PathSegment(go.PathSegment.Line,.6*et,0)),gt.add(new go.PathSegment(go.PathSegment.Line,.65*et,.15*nt).close()),ct.spot1=new go.Spot(0,.1),ct.spot2=new go.Spot(1,1),ct}),go.Shape.defineFigureGenerator("Class",function(Ut,et,nt){var ct=new go.Geometry,lt=new go.PathFigure(0,0,!0);ct.add(lt),lt.add(new go.PathSegment(go.PathSegment.Line,et,0)),lt.add(new go.PathSegment(go.PathSegment.Line,et,nt)),lt.add(new go.PathSegment(go.PathSegment.Line,0,nt)),lt.add(new go.PathSegment(go.PathSegment.Line,0,0).close());var gt=new go.PathFigure(0,.2*nt,!1);ct.add(gt),gt.add(new go.PathSegment(go.PathSegment.Line,et,.2*nt).close());var yt=new go.PathFigure(0,.5*nt,!1);return ct.add(yt),yt.add(new go.PathSegment(go.PathSegment.Line,et,.5*nt).close()),ct}),go.Shape.defineFigureGenerator("Component",function(Ut,et,nt){var ct=new go.Geometry,lt=new go.PathFigure(et,nt,!0);ct.add(lt),lt.add(new go.PathSegment(go.PathSegment.Line,et,0)),lt.add(new go.PathSegment(go.PathSegment.Line,.15*et,0)),lt.add(new go.PathSegment(go.PathSegment.Line,.15*et,nt)),lt.add(new go.PathSegment(go.PathSegment.Line,et,nt).close());var gt=new go.PathFigure(0,.2*nt,!0);ct.add(gt),gt.add(new go.PathSegment(go.PathSegment.Line,.45*et,.2*nt)),gt.add(new go.PathSegment(go.PathSegment.Line,.45*et,.4*nt)),gt.add(new go.PathSegment(go.PathSegment.Line,0,.4*nt)),gt.add(new go.PathSegment(go.PathSegment.Line,0,.2*nt).close());var yt=new go.PathFigure(0,.6*nt,!0);return ct.add(yt),yt.add(new go.PathSegment(go.PathSegment.Line,.45*et,.6*nt)),yt.add(new go.PathSegment(go.PathSegment.Line,.45*et,.8*nt)),yt.add(new go.PathSegment(go.PathSegment.Line,0,.8*nt)),yt.add(new go.PathSegment(go.PathSegment.Line,0,.6*nt).close()),ct}),go.Shape.defineFigureGenerator("Boat Shipment",function(Ut,et,nt){var ct=new go.Geometry,lt=new go.PathFigure(.15*et,.6*nt,!0);ct.add(lt),lt.add(new go.PathSegment(go.PathSegment.Line,.15*et,.6*nt)),lt.add(new go.PathSegment(go.PathSegment.Line,0,.6*nt)),lt.add(new go.PathSegment(go.PathSegment.Line,.15*et,nt)),lt.add(new go.PathSegment(go.PathSegment.Line,.85*et,nt)),lt.add(new go.PathSegment(go.PathSegment.Line,et,.6*nt)),lt.add(new go.PathSegment(go.PathSegment.Line,.85*et,.6*nt)),lt.add(new go.PathSegment(go.PathSegment.Line,.5*et,0)),lt.add(new go.PathSegment(go.PathSegment.Line,.15*et,.6*nt));var gt=new go.PathFigure(.15*et,.6*nt,!1);return ct.add(gt),gt.add(new go.PathSegment(go.PathSegment.Line,.85*et,.6*nt)),ct}),go.Shape.defineFigureGenerator("Customer/Supplier",function(Ut,et,nt){var ct=new go.Geometry,lt=new go.PathFigure(et,nt,!0);return ct.add(lt),lt.add(new go.PathSegment(go.PathSegment.Line,et,0)),lt.add(new go.PathSegment(go.PathSegment.Line,.66*et,.33*nt)),lt.add(new go.PathSegment(go.PathSegment.Line,.66*et,0)),lt.add(new go.PathSegment(go.PathSegment.Line,.33*et,.33*nt)),lt.add(new go.PathSegment(go.PathSegment.Line,.33*et,0)),lt.add(new go.PathSegment(go.PathSegment.Line,0,.33*nt)),lt.add(new go.PathSegment(go.PathSegment.Line,0,nt)),lt.add(new go.PathSegment(go.PathSegment.Line,et,nt).close()),ct}),go.Shape.defineFigureGenerator("Workcell",function(Ut,et,nt){var ct=new go.Geometry,lt=new go.PathFigure(0,nt,!0);return ct.add(lt),lt.add(new go.PathSegment(go.PathSegment.Line,0,0)),lt.add(new go.PathSegment(go.PathSegment.Line,et,0)),lt.add(new go.PathSegment(go.PathSegment.Line,et,nt)),lt.add(new go.PathSegment(go.PathSegment.Line,.65*et,nt)),lt.add(new go.PathSegment(go.PathSegment.Line,.65*et,.4*nt)),lt.add(new go.PathSegment(go.PathSegment.Line,.35*et,.4*nt)),lt.add(new go.PathSegment(go.PathSegment.Line,.35*et,nt)),lt.add(new go.PathSegment(go.PathSegment.Line,0,nt).close()),ct}),go.Shape.defineFigureGenerator("Supermarket",function(Ut,et,nt){var ct=new go.Geometry,lt=new go.PathFigure(0,0,!1);return ct.add(lt),lt.add(new go.PathSegment(go.PathSegment.Line,et,0)),lt.add(new go.PathSegment(go.PathSegment.Line,et,.33*nt)),lt.add(new go.PathSegment(go.PathSegment.Line,0,.33*nt)),lt.add(new go.PathSegment(go.PathSegment.Move,et,.33*nt)),lt.add(new go.PathSegment(go.PathSegment.Line,et,.66*nt)),lt.add(new go.PathSegment(go.PathSegment.Line,0,.66*nt)),lt.add(new go.PathSegment(go.PathSegment.Move,et,.66*nt)),lt.add(new go.PathSegment(go.PathSegment.Line,et,nt)),lt.add(new go.PathSegment(go.PathSegment.Line,0,nt)),ct}),go.Shape.defineFigureGenerator("TruckShipment",function(Ut,et,nt){var ct=new go.Geometry,lt=new go.PathFigure(0,0,!0);ct.add(lt),lt.add(new go.PathSegment(go.PathSegment.Line,.6*et,0)),lt.add(new go.PathSegment(go.PathSegment.Line,.6*et,.8*nt)),lt.add(new go.PathSegment(go.PathSegment.Line,0,.8*nt)),lt.add(new go.PathSegment(go.PathSegment.Line,0,0).close());var gt=new go.PathFigure(et,.8*nt,!0);ct.add(gt),gt.add(new go.PathSegment(go.PathSegment.Line,et,.4*nt)),gt.add(new go.PathSegment(go.PathSegment.Line,.6*et,.4*nt)),gt.add(new go.PathSegment(go.PathSegment.Line,.6*et,.8*nt)),gt.add(new go.PathSegment(go.PathSegment.Line,et,.8*nt).close());var yt=.1,Lt=ve*.1,It=.2,Wt=.9,qt=new go.PathFigure((It-yt)*et,Wt*nt,!0);ct.add(qt),qt.add(new go.PathSegment(go.PathSegment.Bezier,It*et,(Wt-yt)*nt,(It-yt)*et,(Wt-Lt)*nt,(It-Lt)*et,(Wt-yt)*nt)),qt.add(new go.PathSegment(go.PathSegment.Bezier,(It+yt)*et,Wt*nt,(It+Lt)*et,(Wt-yt)*nt,(It+yt)*et,(Wt-Lt)*nt)),qt.add(new go.PathSegment(go.PathSegment.Bezier,It*et,(Wt+yt)*nt,(It+yt)*et,(Wt+Lt)*nt,(It+Lt)*et,(Wt+yt)*nt)),qt.add(new go.PathSegment(go.PathSegment.Bezier,(It-yt)*et,Wt*nt,(It-Lt)*et,(Wt+yt)*nt,(It-yt)*et,(Wt+Lt)*nt).close()),yt=.1,Lt=ve*.1,It=.8,Wt=.9;var he=new go.PathFigure((It-yt)*et,Wt*nt,!0);return ct.add(he),he.add(new go.PathSegment(go.PathSegment.Bezier,It*et,(Wt-yt)*nt,(It-yt)*et,(Wt-Lt)*nt,(It-Lt)*et,(Wt-yt)*nt)),he.add(new go.PathSegment(go.PathSegment.Bezier,(It+yt)*et,Wt*nt,(It+Lt)*et,(Wt-yt)*nt,(It+yt)*et,(Wt-Lt)*nt)),he.add(new go.PathSegment(go.PathSegment.Bezier,It*et,(Wt+yt)*nt,(It+yt)*et,(Wt+Lt)*nt,(It+Lt)*et,(Wt+yt)*nt)),he.add(new go.PathSegment(go.PathSegment.Bezier,(It-yt)*et,Wt*nt,(It-Lt)*et,(Wt+yt)*nt,(It-yt)*et,(Wt+Lt)*nt).close()),ct}),go.Shape.defineFigureGenerator("KanbanPost",function(Ut,et,nt){var ct=new go.Geometry,lt=new go.PathFigure(.2*et,0,!1);return ct.add(lt),lt.add(new go.PathSegment(go.PathSegment.Line,.2*et,.5*nt)),lt.add(new go.PathSegment(go.PathSegment.Line,.8*et,.5*nt)),lt.add(new go.PathSegment(go.PathSegment.Line,.8*et,0)),lt.add(new go.PathSegment(go.PathSegment.Move,.5*et,.5*nt)),lt.add(new go.PathSegment(go.PathSegment.Line,.5*et,nt)),lt.add(new go.PathSegment(go.PathSegment.Line,.2*et,nt)),lt.add(new go.PathSegment(go.PathSegment.Move,.5*et,nt)),lt.add(new go.PathSegment(go.PathSegment.Line,.8*et,nt)),ct}),go.Shape.defineFigureGenerator("Forklift",function(Ut,et,nt){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*nt)),lt.add(new go.PathSegment(go.PathSegment.Line,.5*et,.5*nt)),lt.add(new go.PathSegment(go.PathSegment.Line,.4*et,0)),lt.add(new go.PathSegment(go.PathSegment.Line,0,0));var gt=new go.PathFigure(0,.5*nt,!0);ct.add(gt),gt.add(new go.PathSegment(go.PathSegment.Line,0,.8*nt)),gt.add(new go.PathSegment(go.PathSegment.Line,.5*et,.8*nt)),gt.add(new go.PathSegment(go.PathSegment.Line,.5*et,.5*nt)),gt.add(new go.PathSegment(go.PathSegment.Line,0,.5*nt));var yt=new go.PathFigure(.5*et,.8*nt,!0);ct.add(yt),yt.add(new go.PathSegment(go.PathSegment.Line,.5*et,.1*nt)),yt.add(new go.PathSegment(go.PathSegment.Line,.55*et,.1*nt)),yt.add(new go.PathSegment(go.PathSegment.Line,.55*et,.8*nt)),yt.add(new go.PathSegment(go.PathSegment.Line,.5*et,.8*nt));var Lt=new go.PathFigure(.5*et,.7*nt,!1);ct.add(Lt),Lt.add(new go.PathSegment(go.PathSegment.Line,et,.7*nt));var It=.1,Wt=ve*.1,qt=.1,he=.9,fe=new go.PathFigure((qt-It)*et,he*nt,!0);ct.add(fe),fe.add(new go.PathSegment(go.PathSegment.Bezier,qt*et,(he-It)*nt,(qt-It)*et,(he-Wt)*nt,(qt-Wt)*et,(he-It)*nt)),fe.add(new go.PathSegment(go.PathSegment.Bezier,(qt+It)*et,he*nt,(qt+Wt)*et,(he-It)*nt,(qt+It)*et,(he-Wt)*nt)),fe.add(new go.PathSegment(go.PathSegment.Bezier,qt*et,(he+It)*nt,(qt+It)*et,(he+Wt)*nt,(qt+Wt)*et,(he+It)*nt)),fe.add(new go.PathSegment(go.PathSegment.Bezier,(qt-It)*et,he*nt,(qt-Wt)*et,(he+It)*nt,(qt-It)*et,(he+Wt)*nt)),It=.1,Wt=ve*.1,qt=.4,he=.9;var Ae=new go.PathFigure((qt-It)*et,he*nt,!0);return ct.add(Ae),Ae.add(new go.PathSegment(go.PathSegment.Bezier,qt*et,(he-It)*nt,(qt-It)*et,(he-Wt)*nt,(qt-Wt)*et,(he-It)*nt)),Ae.add(new go.PathSegment(go.PathSegment.Bezier,(qt+It)*et,he*nt,(qt+Wt)*et,(he-It)*nt,(qt+It)*et,(he-Wt)*nt)),Ae.add(new go.PathSegment(go.PathSegment.Bezier,qt*et,(he+It)*nt,(qt+It)*et,(he+Wt)*nt,(qt+Wt)*et,(he+It)*nt)),Ae.add(new go.PathSegment(go.PathSegment.Bezier,(qt-It)*et,he*nt,(qt-Wt)*et,(he+It)*nt,(qt-It)*et,(he+Wt)*nt)),ct}),go.Shape.defineFigureGenerator("RailShipment",function(Ut,et,nt){var ct=new go.Geometry,lt=new go.PathFigure(.1*et,.4*nt,!0);ct.add(lt),lt.add(new go.PathSegment(go.PathSegment.Line,.45*et,.4*nt)),lt.add(new go.PathSegment(go.PathSegment.Line,.45*et,.9*nt)),lt.add(new go.PathSegment(go.PathSegment.Line,.1*et,.9*nt)),lt.add(new go.PathSegment(go.PathSegment.Line,.1*et,.4*nt).close());var gt=new go.PathFigure(.45*et,.7*nt,!1);ct.add(gt),gt.add(new go.PathSegment(go.PathSegment.Line,.55*et,.7*nt));var yt=new go.PathFigure(.55*et,.4*nt,!0);ct.add(yt),yt.add(new go.PathSegment(go.PathSegment.Line,.9*et,.4*nt)),yt.add(new go.PathSegment(go.PathSegment.Line,.9*et,.9*nt)),yt.add(new go.PathSegment(go.PathSegment.Line,.55*et,.9*nt)),yt.add(new go.PathSegment(go.PathSegment.Line,.55*et,.4*nt).close());var qt=.05,he=ve*.05,fe=.175,Ae=.95,Lt=new go.PathFigure((fe-qt)*et,Ae*nt,!0);ct.add(Lt),Lt.add(new go.PathSegment(go.PathSegment.Bezier,fe*et,(Ae-qt)*nt,(fe-qt)*et,(Ae-he)*nt,(fe-he)*et,(Ae-qt)*nt)),Lt.add(new go.PathSegment(go.PathSegment.Bezier,(fe+qt)*et,Ae*nt,(fe+he)*et,(Ae-qt)*nt,(fe+qt)*et,(Ae-he)*nt)),Lt.add(new go.PathSegment(go.PathSegment.Bezier,fe*et,(Ae+qt)*nt,(fe+qt)*et,(Ae+he)*nt,(fe+he)*et,(Ae+qt)*nt)),Lt.add(new go.PathSegment(go.PathSegment.Bezier,(fe-qt)*et,Ae*nt,(fe-he)*et,(Ae+qt)*nt,(fe-qt)*et,(Ae+he)*nt));var qt=.05,he=ve*.05,fe=.375,Ae=.95,It=new go.PathFigure((fe-qt)*et,Ae*nt,!0);ct.add(It),It.add(new go.PathSegment(go.PathSegment.Bezier,fe*et,(Ae-qt)*nt,(fe-qt)*et,(Ae-he)*nt,(fe-he)*et,(Ae-qt)*nt)),It.add(new go.PathSegment(go.PathSegment.Bezier,(fe+qt)*et,Ae*nt,(fe+he)*et,(Ae-qt)*nt,(fe+qt)*et,(Ae-he)*nt)),It.add(new go.PathSegment(go.PathSegment.Bezier,fe*et,(Ae+qt)*nt,(fe+qt)*et,(Ae+he)*nt,(fe+he)*et,(Ae+qt)*nt)),It.add(new go.PathSegment(go.PathSegment.Bezier,(fe-qt)*et,Ae*nt,(fe-he)*et,(Ae+qt)*nt,(fe-qt)*et,(Ae+he)*nt));var qt=.05,he=ve*.05,fe=.625,Ae=.95,Wt=new go.PathFigure((fe-qt)*et,Ae*nt,!0);ct.add(Wt),Wt.add(new go.PathSegment(go.PathSegment.Bezier,fe*et,(Ae-qt)*nt,(fe-qt)*et,(Ae-he)*nt,(fe-he)*et,(Ae-qt)*nt)),Wt.add(new go.PathSegment(go.PathSegment.Bezier,(fe+qt)*et,Ae*nt,(fe+he)*et,(Ae-qt)*nt,(fe+qt)*et,(Ae-he)*nt)),Wt.add(new go.PathSegment(go.PathSegment.Bezier,fe*et,(Ae+qt)*nt,(fe+qt)*et,(Ae+he)*nt,(fe+he)*et,(Ae+qt)*nt)),Wt.add(new go.PathSegment(go.PathSegment.Bezier,(fe-qt)*et,Ae*nt,(fe-he)*et,(Ae+qt)*nt,(fe-qt)*et,(Ae+he)*nt));var qt=.05,he=ve*.05,fe=.825,Ae=.95,Ve=new go.PathFigure((fe-qt)*et,Ae*nt,!0);ct.add(Ve),Ve.add(new go.PathSegment(go.PathSegment.Bezier,fe*et,(Ae-qt)*nt,(fe-qt)*et,(Ae-he)*nt,(fe-he)*et,(Ae-qt)*nt)),Ve.add(new go.PathSegment(go.PathSegment.Bezier,(fe+qt)*et,Ae*nt,(fe+he)*et,(Ae-qt)*nt,(fe+qt)*et,(Ae-he)*nt)),Ve.add(new go.PathSegment(go.PathSegment.Bezier,fe*et,(Ae+qt)*nt,(fe+qt)*et,(Ae+he)*nt,(fe+he)*et,(Ae+qt)*nt)),Ve.add(new go.PathSegment(go.PathSegment.Bezier,(fe-qt)*et,Ae*nt,(fe-he)*et,(Ae+qt)*nt,(fe-qt)*et,(Ae+he)*nt).close());var ye=new go.PathFigure(0,nt,!1);return ct.add(ye),ye.add(new go.PathSegment(go.PathSegment.Line,et,nt).close()),ct}),go.Shape.defineFigureGenerator("Warehouse",function(Ut,et,nt){var ct=new go.Geometry,lt=new go.PathFigure(0,0,!0);ct.add(lt),lt.add(new go.PathSegment(go.PathSegment.Line,et,0)),lt.add(new go.PathSegment(go.PathSegment.Line,et,nt)),lt.add(new go.PathSegment(go.PathSegment.Line,0,nt)),lt.add(new go.PathSegment(go.PathSegment.Line,0,0).close());var gt=new go.PathFigure(0,.2*nt,!1);ct.add(gt),gt.add(new go.PathSegment(go.PathSegment.Line,et,.2*nt).close());var yt=new go.PathFigure(.15*et,nt,!0);ct.add(yt),yt.add(new go.PathSegment(go.PathSegment.Line,.15*et,.5*nt)),yt.add(new go.PathSegment(go.PathSegment.Line,.4*et,.5*nt)),yt.add(new go.PathSegment(go.PathSegment.Line,.4*et,nt)),yt.add(new go.PathSegment(go.PathSegment.Line,.15*et,nt).close());var Lt=.05,It=ve*.05,Wt=.35,qt=.775,he=new go.PathFigure((Wt-Lt)*et,qt*nt,!0);return ct.add(he),he.add(new go.PathSegment(go.PathSegment.Bezier,Wt*et,(qt-Lt)*nt,(Wt-Lt)*et,(qt-It)*nt,(Wt-It)*et,(qt-Lt)*nt)),he.add(new go.PathSegment(go.PathSegment.Bezier,(Wt+Lt)*et,qt*nt,(Wt+It)*et,(qt-Lt)*nt,(Wt+Lt)*et,(qt-It)*nt)),he.add(new go.PathSegment(go.PathSegment.Bezier,Wt*et,(qt+Lt)*nt,(Wt+Lt)*et,(qt+It)*nt,(Wt+It)*et,(qt+Lt)*nt)),he.add(new go.PathSegment(go.PathSegment.Bezier,(Wt-Lt)*et,qt*nt,(Wt-It)*et,(qt+Lt)*nt,(Wt-Lt)*et,(qt+It)*nt).close()),ct}),go.Shape.defineFigureGenerator("ControlCenter",function(Ut,et,nt){var ct=new go.Geometry,lt=new go.PathFigure(0,nt,!0);return ct.add(lt),lt.add(new go.PathSegment(go.PathSegment.Line,0,.8*nt)),lt.add(new go.PathSegment(go.PathSegment.Line,.1*et,.8*nt)),lt.add(new go.PathSegment(go.PathSegment.Line,.1*et,0)),lt.add(new go.PathSegment(go.PathSegment.Line,.9*et,0)),lt.add(new go.PathSegment(go.PathSegment.Line,.9*et,.8*nt)),lt.add(new go.PathSegment(go.PathSegment.Line,et,.8*nt)),lt.add(new go.PathSegment(go.PathSegment.Line,et,nt)),lt.add(new go.PathSegment(go.PathSegment.Line,0,nt)),lt.add(new go.PathSegment(go.PathSegment.Move,.1*et,.8*nt)),lt.add(new go.PathSegment(go.PathSegment.Line,.9*et,.8*nt).close()),ct}),go.Shape.defineFigureGenerator("Bluetooth",function(Ut,et,nt){var ct=new go.Geometry,lt=new go.PathFigure(0,.75*nt,!1);return ct.add(lt),lt.add(new go.PathSegment(go.PathSegment.Line,0,.75*nt)),lt.add(new go.PathSegment(go.PathSegment.Line,et,.25*nt)),lt.add(new go.PathSegment(go.PathSegment.Line,.5*et,0)),lt.add(new go.PathSegment(go.PathSegment.Line,.5*et,nt)),lt.add(new go.PathSegment(go.PathSegment.Line,et,.75*nt)),lt.add(new go.PathSegment(go.PathSegment.Line,0,.25*nt)),ct}),go.Shape.defineFigureGenerator("Bookmark",function(Ut,et,nt){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,nt)),lt.add(new go.PathSegment(go.PathSegment.Line,.5*et,.6*nt)),lt.add(new go.PathSegment(go.PathSegment.Line,et,nt)),lt.add(new go.PathSegment(go.PathSegment.Line,et,0)),lt.add(new go.PathSegment(go.PathSegment.Line,0,0)),lt.add(new go.PathSegment(go.PathSegment.Move,.2*et,.2*nt)),lt.add(new go.PathSegment(go.PathSegment.Line,.8*et,.2*nt)),lt.add(new go.PathSegment(go.PathSegment.Move,.2*et,.4*nt)),lt.add(new go.PathSegment(go.PathSegment.Line,.8*et,.4*nt)),ct}),go.Shape.defineFigureGenerator("Bookmark",function(Ut,et,nt){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,nt)),lt.add(new go.PathSegment(go.PathSegment.Line,.5*et,.6*nt)),lt.add(new go.PathSegment(go.PathSegment.Line,et,nt)),lt.add(new go.PathSegment(go.PathSegment.Line,et,0)),lt.add(new go.PathSegment(go.PathSegment.Line,0,0)),lt.add(new go.PathSegment(go.PathSegment.Move,.2*et,.2*nt)),lt.add(new go.PathSegment(go.PathSegment.Line,.8*et,.2*nt)),lt.add(new go.PathSegment(go.PathSegment.Move,.2*et,.4*nt)),lt.add(new go.PathSegment(go.PathSegment.Line,.8*et,.4*nt)),ct}),go.Shape.defineFigureGenerator("Globe",function(Ut,et,nt){var ct=new go.Geometry,lt=new go.PathFigure(.5*et,0,!1);return ct.add(lt),lt.add(new go.PathSegment(go.PathSegment.Line,.5*et,nt)),lt.add(new go.PathSegment(go.PathSegment.Move,0,.5*nt)),lt.add(new go.PathSegment(go.PathSegment.Line,et,.5*nt)),lt.add(new go.PathSegment(go.PathSegment.Move,.5*et,0)),lt.add(new go.PathSegment(go.PathSegment.Bezier,et,.5*nt,.75*et,0,et,.25*nt)),lt.add(new go.PathSegment(go.PathSegment.Bezier,.5*et,nt,et,.75*nt,.75*et,nt)),lt.add(new go.PathSegment(go.PathSegment.Bezier,0,.5*nt,.25*et,nt,0,.75*nt)),lt.add(new go.PathSegment(go.PathSegment.Bezier,.5*et,0,0,.25*nt,.25*et,0)),lt.add(new go.PathSegment(go.PathSegment.Bezier,.5*et,nt,.15*et,.25*nt,.15*et,.75*nt)),lt.add(new go.PathSegment(go.PathSegment.Bezier,.5*et,0,.85*et,.75*nt,.85*et,.25*nt)),lt.add(new go.PathSegment(go.PathSegment.Move,.1675*et,.15*nt)),lt.add(new go.PathSegment(go.PathSegment.Bezier,.8325*et,.15*nt,.35*et,.3*nt,.65*et,.3*nt)),lt.add(new go.PathSegment(go.PathSegment.Move,.1675*et,.85*nt)),lt.add(new go.PathSegment(go.PathSegment.Bezier,.8325*et,.85*nt,.35*et,.7*nt,.65*et,.7*nt)),ct}),go.Shape.defineFigureGenerator("Wave",function(Ut,et,nt){var ct=new go.Geometry,lt=new go.PathFigure(0,.25*nt,!1);return ct.add(lt),lt.add(new go.PathSegment(go.PathSegment.Bezier,.3*et,.25*nt,.1*et,0,.2*et,0)),lt.add(new go.PathSegment(go.PathSegment.Bezier,.7*et,.25*nt,.425*et,.5*nt,.575*et,.5*nt)),lt.add(new go.PathSegment(go.PathSegment.Bezier,et,.25*nt,.8*et,0,.9*et,0)),lt.add(new go.PathSegment(go.PathSegment.Line,et,.75*nt)),lt.add(new go.PathSegment(go.PathSegment.Move,0,.25*nt)),lt.add(new go.PathSegment(go.PathSegment.Line,0,.75*nt)),lt.add(new go.PathSegment(go.PathSegment.Bezier,.3*et,.75*nt,.1*et,.5*nt,.2*et,.5*nt)),lt.add(new go.PathSegment(go.PathSegment.Bezier,.7*et,.75*nt,.425*et,nt,.575*et,nt)),lt.add(new go.PathSegment(go.PathSegment.Bezier,et,.75*nt,.8*et,.5*nt,.9*et,.5*nt)),ct}),go.Shape.defineFigureGenerator("Operator",function(Ut,et,nt){var ct=new go.Geometry,lt=.3,gt=ve*.3,yt=.5,Lt=.7,It=new go.PathFigure((yt-lt)*et,Lt*nt,!0);ct.add(It),It.add(new go.PathSegment(go.PathSegment.Bezier,yt*et,(Lt-lt)*nt,(yt-lt)*et,(Lt-gt)*nt,(yt-gt)*et,(Lt-lt)*nt)),It.add(new go.PathSegment(go.PathSegment.Bezier,(yt+lt)*et,Lt*nt,(yt+gt)*et,(Lt-lt)*nt,(yt+lt)*et,(Lt-gt)*nt)),It.add(new go.PathSegment(go.PathSegment.Bezier,yt*et,(Lt+lt)*nt,(yt+lt)*et,(Lt+gt)*nt,(yt+gt)*et,(Lt+lt)*nt)),It.add(new go.PathSegment(go.PathSegment.Bezier,(yt-lt)*et,Lt*nt,(yt-gt)*et,(Lt+lt)*nt,(yt-lt)*et,(Lt+gt)*nt));var Wt=new go.PathFigure(0,.7*nt,!1);return ct.add(Wt),Wt.add(new go.PathSegment(go.PathSegment.Bezier,et,.7*nt,0,0,et,0)),ct}),go.Shape.defineFigureGenerator("TripleFanBlades",function(Ut,et,nt){var ct=new go.Geometry,lt=new go.PathFigure(.5*et,0,!0);return ct.add(lt),lt.add(new go.PathSegment(go.PathSegment.Bezier,.5*et,.65*nt,.65*et,.3*nt,.65*et,.5*nt)),lt.add(new go.PathSegment(go.PathSegment.Bezier,.5*et,0,.35*et,.5*nt,.35*et,.3*nt)),lt.add(new go.PathSegment(go.PathSegment.Move,.5*et,.65*nt)),lt.add(new go.PathSegment(go.PathSegment.Bezier,0,nt,.3*et,.6*nt,.1*et,.8*nt)),lt.add(new go.PathSegment(go.PathSegment.Bezier,.5*et,.65*nt,.2*et,nt,.35*et,.95*nt)),lt.add(new go.PathSegment(go.PathSegment.Move,.5*et,.65*nt)),lt.add(new go.PathSegment(go.PathSegment.Bezier,et,nt,.7*et,.6*nt,.9*et,.8*nt)),lt.add(new go.PathSegment(go.PathSegment.Bezier,.5*et,.65*nt,.8*et,nt,.65*et,.95*nt)),ct}),go.Shape.defineFigureGenerator("CentrifugalPump",function(Ut,et,nt){var ct=new go.Geometry,lt=new go.PathFigure(et,0,!0);return ct.add(lt),lt.add(new go.PathSegment(go.PathSegment.Line,.4*et,0)),lt.add(new go.PathSegment(go.PathSegment.Bezier,0,.5*nt,0,.075*nt,0,.5*nt)),lt.add(new go.PathSegment(go.PathSegment.Bezier,.4*et,nt,0,nt,.4*et,nt)),lt.add(new go.PathSegment(go.PathSegment.Bezier,.8*et,.4*nt,.8*et,nt,.85*et,.6*nt)),lt.add(new go.PathSegment(go.PathSegment.Line,et,.4*nt)),lt.add(new go.PathSegment(go.PathSegment.Line,et,0)),ct}),go.Shape.defineFigureGenerator("Battery",function(Ut,et,nt){var ct=new go.Geometry,lt=new go.PathFigure(0,nt,!0);ct.add(lt),lt.add(new go.PathSegment(go.PathSegment.Line,0,.1*nt)),lt.add(new go.PathSegment(go.PathSegment.Line,et,.1*nt)),lt.add(new go.PathSegment(go.PathSegment.Line,et,nt)),lt.add(new go.PathSegment(go.PathSegment.Line,0,nt)),lt.add(new go.PathSegment(go.PathSegment.Move,.4*et,.1*nt)),lt.add(new go.PathSegment(go.PathSegment.Line,.4*et,0)),lt.add(new go.PathSegment(go.PathSegment.Line,.6*et,0)),lt.add(new go.PathSegment(go.PathSegment.Line,.6*et,.1*nt));var gt=new go.PathFigure(0,.6*nt,!1);return ct.add(gt),gt.add(new go.PathSegment(go.PathSegment.Move,0,.4*nt)),gt.add(new go.PathSegment(go.PathSegment.Line,et,.4*nt)),ct}),go.Shape.defineFigureGenerator("Delete",function(Ut,et,nt){var ct=new go.Geometry,lt=.5,gt=ve*.5,yt=.5,Lt=.5,It=new go.PathFigure((yt-lt)*et,Lt*nt,!0);ct.add(It),It.add(new go.PathSegment(go.PathSegment.Bezier,yt*et,(Lt-lt)*nt,(yt-lt)*et,(Lt-gt)*nt,(yt-gt)*et,(Lt-lt)*nt)),It.add(new go.PathSegment(go.PathSegment.Bezier,(yt+lt)*et,Lt*nt,(yt+gt)*et,(Lt-lt)*nt,(yt+lt)*et,(Lt-gt)*nt)),It.add(new go.PathSegment(go.PathSegment.Bezier,yt*et,(Lt+lt)*nt,(yt+lt)*et,(Lt+gt)*nt,(yt+gt)*et,(Lt+lt)*nt)),It.add(new go.PathSegment(go.PathSegment.Bezier,(yt-lt)*et,Lt*nt,(yt-gt)*et,(Lt+lt)*nt,(yt-lt)*et,(Lt+gt)*nt));var Wt=new go.PathFigure(.15*et,.5*nt,!1);return ct.add(Wt),Wt.add(new go.PathSegment(go.PathSegment.Line,.85*et,.5*nt)),ct}),go.Shape.defineFigureGenerator("Flag",function(Ut,et,nt){var ct=new go.Geometry,lt=new go.PathFigure(0,.1*nt,!0);return ct.add(lt),lt.add(new go.PathSegment(go.PathSegment.Line,0,nt)),lt.add(new go.PathSegment(go.PathSegment.Move,0,.1*nt)),lt.add(new go.PathSegment(go.PathSegment.Bezier,.5*et,.1*nt,.15*et,0,.35*et,0)),lt.add(new go.PathSegment(go.PathSegment.Bezier,et,.1*nt,.65*et,.2*nt,.85*et,.2*nt)),lt.add(new go.PathSegment(go.PathSegment.Line,et,.5*nt)),lt.add(new go.PathSegment(go.PathSegment.Bezier,.5*et,.5*nt,.85*et,.6*nt,.65*et,.6*nt)),lt.add(new go.PathSegment(go.PathSegment.Bezier,0,.5*nt,.35*et,.4*nt,.15*et,.4*nt).close()),ct}),go.Shape.defineFigureGenerator("Help",function(Ut,et,nt){var ct=new go.Geometry,lt=.5,gt=ve*.5,yt=.5,Lt=.5,It=new go.PathFigure((yt-lt)*et,Lt*nt,!1);ct.add(It),It.add(new go.PathSegment(go.PathSegment.Bezier,yt*et,(Lt-lt)*nt,(yt-lt)*et,(Lt-gt)*nt,(yt-gt)*et,(Lt-lt)*nt)),It.add(new go.PathSegment(go.PathSegment.Bezier,(yt+lt)*et,Lt*nt,(yt+gt)*et,(Lt-lt)*nt,(yt+lt)*et,(Lt-gt)*nt)),It.add(new go.PathSegment(go.PathSegment.Bezier,yt*et,(Lt+lt)*nt,(yt+lt)*et,(Lt+gt)*nt,(yt+gt)*et,(Lt+lt)*nt)),It.add(new go.PathSegment(go.PathSegment.Bezier,(yt-lt)*et,Lt*nt,(yt-gt)*et,(Lt+lt)*nt,(yt-lt)*et,(Lt+gt)*nt).close()),lt=.05,gt=ve*.05,yt=.5,Lt=.8;var Wt=new go.PathFigure((yt-lt)*et,Lt*nt,!1);return ct.add(Wt),Wt.add(new go.PathSegment(go.PathSegment.Bezier,yt*et,(Lt-lt)*nt,(yt-lt)*et,(Lt-gt)*nt,(yt-gt)*et,(Lt-lt)*nt)),Wt.add(new go.PathSegment(go.PathSegment.Bezier,(yt+lt)*et,Lt*nt,(yt+gt)*et,(Lt-lt)*nt,(yt+lt)*et,(Lt-gt)*nt)),Wt.add(new go.PathSegment(go.PathSegment.Bezier,yt*et,(Lt+lt)*nt,(yt+lt)*et,(Lt+gt)*nt,(yt+gt)*et,(Lt+lt)*nt)),Wt.add(new go.PathSegment(go.PathSegment.Bezier,(yt-lt)*et,Lt*nt,(yt-gt)*et,(Lt+lt)*nt,(yt-lt)*et,(Lt+gt)*nt).close()),Wt.add(new go.PathSegment(go.PathSegment.Move,.5*et,.7*nt)),Wt.add(new go.PathSegment(go.PathSegment.Line,.5*et,.5*nt)),Wt.add(new go.PathSegment(go.PathSegment.Bezier,.5*et,.2*nt,.75*et,.475*nt,.75*et,.225*nt)),Wt.add(new go.PathSegment(go.PathSegment.Bezier,.3*et,.35*nt,.4*et,.2*nt,.3*et,.25*nt)),ct}),go.Shape.defineFigureGenerator("Location",function(Ut,et,nt){return new go.Geometry().add(new go.PathFigure(.5*et,nt,!0).add(new go.PathSegment(go.PathSegment.Line,.75*et,.5*nt)).add(new go.PathSegment(go.PathSegment.Bezier,.5*et,0,.975*et,.025*nt,.5*et,0)).add(new go.PathSegment(go.PathSegment.Bezier,.25*et,.5*nt,.5*et,0,.025*et,.025*nt).close()).add(new go.PathSegment(go.PathSegment.Move,.5*et,.2*nt)).add(new go.PathSegment(go.PathSegment.Arc,270,360,.5*et,.3*nt,.1*et,.1*nt).close()))}),go.Shape.defineFigureGenerator("Lock",function(Ut,et,nt){var ct=new go.Geometry,lt=new go.PathFigure(0,.5*nt,!0);ct.add(lt),lt.add(new go.PathSegment(go.PathSegment.Line,0,nt)),lt.add(new go.PathSegment(go.PathSegment.Line,et,nt)),lt.add(new go.PathSegment(go.PathSegment.Line,et,.5*nt)),lt.add(new go.PathSegment(go.PathSegment.Line,0,.5*nt));var gt=new go.PathFigure(.2*et,.5*nt,!1);return ct.add(gt),gt.add(new go.PathSegment(go.PathSegment.Move,.2*et,.5*nt)),gt.add(new go.PathSegment(go.PathSegment.Line,.2*et,.3*nt)),gt.add(new go.PathSegment(go.PathSegment.Bezier,.8*et,.3*nt,.25*et,0,.75*et,0)),gt.add(new go.PathSegment(go.PathSegment.Line,.8*et,.5*nt)),gt.add(new go.PathSegment(go.PathSegment.Line,.8*et,.3*nt)),ct}),go.Shape.defineFigureGenerator("Unlocked",function(Ut,et,nt){var ct=new go.Geometry,lt=new go.PathFigure(0,.5*nt,!0);ct.add(lt),lt.add(new go.PathSegment(go.PathSegment.Line,0,nt)),lt.add(new go.PathSegment(go.PathSegment.Line,et,nt)),lt.add(new go.PathSegment(go.PathSegment.Line,et,.5*nt)),lt.add(new go.PathSegment(go.PathSegment.Line,0,.5*nt));var gt=new go.PathFigure(.2*et,.5*nt,!1);return ct.add(gt),gt.add(new go.PathSegment(go.PathSegment.Move,.2*et,.5*nt)),gt.add(new go.PathSegment(go.PathSegment.Line,.2*et,.3*nt)),gt.add(new go.PathSegment(go.PathSegment.Bezier,.8*et,.3*nt,.25*et,0,.75*et,0)),gt.add(new go.PathSegment(go.PathSegment.Line,.8*et,.35*nt)),ct}),go.Shape.defineFigureGenerator("Gear",function(Ut,et,nt){return new go.Geometry().add(new go.PathFigure(.9375*et,.56246875*nt,!0).add(new go.PathSegment(go.PathSegment.Line,.9375*et,.4375*nt)).add(new go.PathSegment(go.PathSegment.Line,.80621875*et,.4375*nt)).add(new go.PathSegment(go.PathSegment.Bezier,.763*et,.3316875*nt,.79840625*et,.39915625*nt,.7834375*et,.3635*nt)).add(new go.PathSegment(go.PathSegment.Line,.8566875*et,.23796875*nt)).add(new go.PathSegment(go.PathSegment.Line,.76825*et,.14959375*nt)).add(new go.PathSegment(go.PathSegment.Line,.67596875*et,.24184375*nt)).add(new go.PathSegment(go.PathSegment.Bezier,.5625*et,.19378125*nt,.64228125*et,.2188125*nt,.603875*et,.2021875*nt)).add(new go.PathSegment(go.PathSegment.Line,.5625*et,.0625*nt)).add(new go.PathSegment(go.PathSegment.Line,.4375*et,.0625*nt)).add(new go.PathSegment(go.PathSegment.Line,.4375*et,.19378125*nt)).add(new go.PathSegment(go.PathSegment.Bezier,.32775*et,.239375*nt,.39759375*et,.20190625*nt,.36053125*et,.2176875*nt)).add(new go.PathSegment(go.PathSegment.Line,.2379375*et,.14959375*nt)).add(new go.PathSegment(go.PathSegment.Line,.14953125*et,.2379375*nt)).add(new go.PathSegment(go.PathSegment.Line,.23934375*et,.3278125*nt)).add(new go.PathSegment(go.PathSegment.Bezier,.19378125*et,.4375*nt,.21765625*et,.36059375*nt,.201875*et,.397625*nt)).add(new go.PathSegment(go.PathSegment.Line,.0625*et,.4375*nt)).add(new go.PathSegment(go.PathSegment.Line,.0625*et,.5625*nt)).add(new go.PathSegment(go.PathSegment.Line,.1938125*et,.5625*nt)).add(new go.PathSegment(go.PathSegment.Bezier,.241875*et,.67596875*nt,.20221875*et,.603875*nt,.21884375*et,.64228125*nt)).add(new go.PathSegment(go.PathSegment.Line,.1495625*et,.76825*nt)).add(new go.PathSegment(go.PathSegment.Line,.238*et,.8566875*nt)).add(new go.PathSegment(go.PathSegment.Line,.3316875*et,.76296875*nt)).add(new go.PathSegment(go.PathSegment.Bezier,.43753125*et,.80621875*nt,.36353125*et,.78340625*nt,.3991875*et,.79840625*nt)).add(new go.PathSegment(go.PathSegment.Line,.43753125*et,.9375*nt)).add(new go.PathSegment(go.PathSegment.Line,.5625*et,.9375*nt)).add(new go.PathSegment(go.PathSegment.Line,.5625*et,.80621875*nt)).add(new go.PathSegment(go.PathSegment.Bezier,.67225*et,.760625*nt,.602375*et,.79809375*nt,.63946875*et,.78234375*nt)).add(new go.PathSegment(go.PathSegment.Line,.76828125*et,.8566875*nt)).add(new go.PathSegment(go.PathSegment.Line,.85671875*et,.76825*nt)).add(new go.PathSegment(go.PathSegment.Line,.76065625*et,.67221875*nt)).add(new go.PathSegment(go.PathSegment.Bezier,.80621875*et,.56246875*nt,.78234375*et,.63940625*nt,.798125*et,.602375*nt)).add(new go.PathSegment(go.PathSegment.Line,.9375*et,.56246875*nt).close()).add(new go.PathSegment(go.PathSegment.Move,.5*et,.6*nt)).add(new go.PathSegment(go.PathSegment.Arc,90,360,.5*et,.5*nt,.1*et,.1*nt).close()))}),go.Shape.defineFigureGenerator("Hand",function(Ut,et,nt){var ct=new go.Geometry,lt=new go.PathFigure(0,.5*nt,!0);return ct.add(lt),lt.add(new go.PathSegment(go.PathSegment.Bezier,.1*et,.3*nt,0,.375*nt,.05*et,.325*nt)),lt.add(new go.PathSegment(go.PathSegment.Bezier,.45*et,.075*nt,.3*et,.225*nt,.4*et,.175*nt)),lt.add(new go.PathSegment(go.PathSegment.Bezier,.525*et,.075*nt,.46*et,.05*nt,.525*et,.05*nt)),lt.add(new go.PathSegment(go.PathSegment.Bezier,.3*et,.4*nt,.525*et,.275*nt,.475*et,.325*nt)),lt.add(new go.PathSegment(go.PathSegment.Line,.9*et,.4*nt)),lt.add(new go.PathSegment(go.PathSegment.Bezier,.9*et,.55*nt,et,.4*nt,et,.55*nt)),lt.add(new go.PathSegment(go.PathSegment.Line,.425*et,.55*nt)),lt.add(new go.PathSegment(go.PathSegment.Line,.6*et,.55*nt)),lt.add(new go.PathSegment(go.PathSegment.Bezier,.6*et,.7*nt,.675*et,.55*nt,.675*et,.7*nt)),lt.add(new go.PathSegment(go.PathSegment.Line,.4*et,.7*nt)),lt.add(new go.PathSegment(go.PathSegment.Line,.575*et,.7*nt)),lt.add(new go.PathSegment(go.PathSegment.Bezier,.575*et,.85*nt,.65*et,.7*nt,.65*et,.85*nt)),lt.add(new go.PathSegment(go.PathSegment.Line,.4*et,.85*nt)),lt.add(new go.PathSegment(go.PathSegment.Line,.525*et,.85*nt)),lt.add(new go.PathSegment(go.PathSegment.Bezier,.535*et,nt,.61*et,.85*nt,.61*et,nt)),lt.add(new go.PathSegment(go.PathSegment.Bezier,0,.9*nt,.435*et,nt,0,nt).close()),ct}),go.Shape.defineFigureGenerator("Map",function(Ut,et,nt){var ct=new go.Geometry,lt=new go.PathFigure(0,.2*nt,!0);return ct.add(lt),lt.add(new go.PathSegment(go.PathSegment.Line,.25*et,0)),lt.add(new go.PathSegment(go.PathSegment.Line,.5*et,.2*nt)),lt.add(new go.PathSegment(go.PathSegment.Line,.75*et,0)),lt.add(new go.PathSegment(go.PathSegment.Line,et,.2*nt)),lt.add(new go.PathSegment(go.PathSegment.Line,et,nt)),lt.add(new go.PathSegment(go.PathSegment.Line,.75*et,.8*nt)),lt.add(new go.PathSegment(go.PathSegment.Line,.5*et,nt)),lt.add(new go.PathSegment(go.PathSegment.Line,.25*et,.8*nt)),lt.add(new go.PathSegment(go.PathSegment.Line,0,nt).close()),lt.add(new go.PathSegment(go.PathSegment.Move,.25*et,0)),lt.add(new go.PathSegment(go.PathSegment.Line,.25*et,.8*nt)),lt.add(new go.PathSegment(go.PathSegment.Move,.5*et,.2*nt)),lt.add(new go.PathSegment(go.PathSegment.Line,.5*et,nt)),lt.add(new go.PathSegment(go.PathSegment.Move,.75*et,0)),lt.add(new go.PathSegment(go.PathSegment.Line,.75*et,.8*nt)),ct}),go.Shape.defineFigureGenerator("Eject",function(Ut,et,nt){var ct=new go.Geometry,lt=new go.PathFigure(0,nt,!0);ct.add(lt),lt.add(new go.PathSegment(go.PathSegment.Line,et,nt)),lt.add(new go.PathSegment(go.PathSegment.Line,et,nt*.7)),lt.add(new go.PathSegment(go.PathSegment.Line,0,nt*.7).close());var gt=new go.PathFigure(0,nt*.6,!0);return ct.add(gt),gt.add(new go.PathSegment(go.PathSegment.Line,et,.6*nt)),gt.add(new go.PathSegment(go.PathSegment.Line,.5*et,0).close()),ct}),go.Shape.defineFigureGenerator("Pencil",function(Ut,et,nt){return new go.Geometry().add(new go.PathFigure(0,0,!0).add(new go.PathSegment(go.PathSegment.Line,.2*et,.1*nt)).add(new go.PathSegment(go.PathSegment.Line,et,.9*nt)).add(new go.PathSegment(go.PathSegment.Line,.9*et,nt)).add(new go.PathSegment(go.PathSegment.Line,.1*et,.2*nt).close()))}),go.Shape.defineFigureGenerator("Building",function(Ut,et,nt){var ct=new go.Geometry,lt=new go.PathFigure(et*1,nt*1,!1);ct.add(lt),lt.add(new go.PathSegment(go.PathSegment.Line,0,nt*1)),lt.add(new go.PathSegment(go.PathSegment.Line,0,nt*.85)),lt.add(new go.PathSegment(go.PathSegment.Line,.046*et,nt*.85)),lt.add(new go.PathSegment(go.PathSegment.Line,.046*et,nt*.45)),lt.add(new go.PathSegment(go.PathSegment.Line,0,nt*.45)),lt.add(new go.PathSegment(go.PathSegment.Line,0,nt*.3)),lt.add(new go.PathSegment(go.PathSegment.Line,.046*et,nt*.3)),lt.add(new go.PathSegment(go.PathSegment.Line,.5*et,nt*0)),lt.add(new go.PathSegment(go.PathSegment.Line,(1-.046)*et,nt*.3)),lt.add(new go.PathSegment(go.PathSegment.Line,et,nt*.3)),lt.add(new go.PathSegment(go.PathSegment.Line,et,nt*.45)),lt.add(new go.PathSegment(go.PathSegment.Line,(1-.046)*et,nt*.45)),lt.add(new go.PathSegment(go.PathSegment.Line,(1-.046)*et,nt*.85)),lt.add(new go.PathSegment(go.PathSegment.Line,et,nt*.85).close());var gt=new go.PathFigure(.126*et,.85*nt,!1);ct.add(gt),gt.add(new go.PathSegment(go.PathSegment.Line,.126*et,.45*nt)),gt.add(new go.PathSegment(go.PathSegment.Line,.322*et,.45*nt)),gt.add(new go.PathSegment(go.PathSegment.Line,.322*et,.85*nt).close());var yt=new go.PathFigure(.402*et,.85*nt,!1);ct.add(yt),yt.add(new go.PathSegment(go.PathSegment.Line,.402*et,.45*nt)),yt.add(new go.PathSegment(go.PathSegment.Line,.598*et,.45*nt)),yt.add(new go.PathSegment(go.PathSegment.Line,.598*et,.85*nt).close());var Lt=new go.PathFigure(.678*et,.85*nt,!1);ct.add(Lt),Lt.add(new go.PathSegment(go.PathSegment.Line,.678*et,.45*nt)),Lt.add(new go.PathSegment(go.PathSegment.Line,.874*et,.45*nt)),Lt.add(new go.PathSegment(go.PathSegment.Line,.874*et,.85*nt).close());var It=new go.PathFigure(.5*et,.1*nt,!1);return ct.add(It),It.add(new go.PathSegment(go.PathSegment.Line,(.046+.15)*et,.3*nt)),It.add(new go.PathSegment(go.PathSegment.Line,(1-(.046+.15))*et,.3*nt).close()),ct}),go.Shape.defineFigureGenerator("Staircase",function(Ut,et,nt){var ct=new go.Geometry,lt=new go.PathFigure(0,nt*1,!0);return ct.add(lt),lt.add(new go.PathSegment(go.PathSegment.Line,et*.2,nt*1)),lt.add(new go.PathSegment(go.PathSegment.Line,et*.2,nt*.8)),lt.add(new go.PathSegment(go.PathSegment.Line,et*.4,nt*.8)),lt.add(new go.PathSegment(go.PathSegment.Line,et*.4,nt*.6)),lt.add(new go.PathSegment(go.PathSegment.Line,et*.6,nt*.6)),lt.add(new go.PathSegment(go.PathSegment.Line,et*.6,nt*.4)),lt.add(new go.PathSegment(go.PathSegment.Line,et*.8,nt*.4)),lt.add(new go.PathSegment(go.PathSegment.Line,et*.8,nt*.2)),lt.add(new go.PathSegment(go.PathSegment.Line,et*1,nt*.2)),lt.add(new go.PathSegment(go.PathSegment.Line,et*1,nt*.15)),lt.add(new go.PathSegment(go.PathSegment.Line,et*.75,nt*.15)),lt.add(new go.PathSegment(go.PathSegment.Line,et*.75,nt*.35)),lt.add(new go.PathSegment(go.PathSegment.Line,et*.55,nt*.35)),lt.add(new go.PathSegment(go.PathSegment.Line,et*.55,nt*.55)),lt.add(new go.PathSegment(go.PathSegment.Line,et*.35,nt*.55)),lt.add(new go.PathSegment(go.PathSegment.Line,et*.35,nt*.75)),lt.add(new go.PathSegment(go.PathSegment.Line,et*.15,nt*.75)),lt.add(new go.PathSegment(go.PathSegment.Line,et*.15,nt*.95)),lt.add(new go.PathSegment(go.PathSegment.Line,0,nt*.95).close()),ct}),go.Shape.defineFigureGenerator("5Bars",function(Ut,et,nt){var ct=new go.Geometry,lt=new go.PathFigure(0,nt*1,!0);ct.add(lt),lt.add(new go.PathSegment(go.PathSegment.Line,et*.184,nt*1)),lt.add(new go.PathSegment(go.PathSegment.Line,et*.184,nt*(1-.184)).close());var gt=new go.PathFigure(et*.204,nt,!0);ct.add(gt),gt.add(new go.PathSegment(go.PathSegment.Line,et*.204,nt*(1-.184))),gt.add(new go.PathSegment(go.PathSegment.Line,et*.388,nt*(1-.184*2))),gt.add(new go.PathSegment(go.PathSegment.Line,et*.388,nt*1).close());var yt=new go.PathFigure(et*.408,nt,!0);ct.add(yt),yt.add(new go.PathSegment(go.PathSegment.Line,et*.408,nt*(1-.184*2))),yt.add(new go.PathSegment(go.PathSegment.Line,et*.592,nt*(1-.184*3))),yt.add(new go.PathSegment(go.PathSegment.Line,et*.592,nt*1).close());var Lt=new go.PathFigure(et*.612,nt,!0);ct.add(Lt),Lt.add(new go.PathSegment(go.PathSegment.Line,et*.612,nt*(1-.184*3))),Lt.add(new go.PathSegment(go.PathSegment.Line,et*.796,nt*(1-.184*4))),Lt.add(new go.PathSegment(go.PathSegment.Line,et*.796,nt*1).close());var It=new go.PathFigure(et*.816,nt,!0);return ct.add(It),It.add(new go.PathSegment(go.PathSegment.Line,et*.816,nt*(1-.184*4))),It.add(new go.PathSegment(go.PathSegment.Line,et*1,nt*(1-.184*5))),It.add(new go.PathSegment(go.PathSegment.Line,et*1,nt*1).close()),ct}),go.Shape.defineFigureGenerator("PC",function(Ut,et,nt){var ct=new go.Geometry,lt=new go.PathFigure(0,0,!0);ct.add(lt),lt.add(new go.PathSegment(go.PathSegment.Line,0,nt*1)),lt.add(new go.PathSegment(go.PathSegment.Line,et*.3,nt*1)),lt.add(new go.PathSegment(go.PathSegment.Line,et*.3,0).close());var gt=new go.PathFigure(et*.055,.07*nt,!0);ct.add(gt),gt.add(new go.PathSegment(go.PathSegment.Line,et*.245,nt*.07)),gt.add(new go.PathSegment(go.PathSegment.Line,et*.245,nt*.1)),gt.add(new go.PathSegment(go.PathSegment.Line,et*.055,nt*.1).close());var yt=new go.PathFigure(et*.055,.13*nt,!0);ct.add(yt),yt.add(new go.PathSegment(go.PathSegment.Line,et*.245,nt*.13)),yt.add(new go.PathSegment(go.PathSegment.Line,et*.245,nt*.16)),yt.add(new go.PathSegment(go.PathSegment.Line,et*.055,nt*.16).close());var Lt=new go.PathFigure(et*.055,.18*nt,!0);ct.add(Lt),Lt.add(new go.PathSegment(go.PathSegment.Line,et*.245,nt*.18)),Lt.add(new go.PathSegment(go.PathSegment.Line,et*.245,nt*.21)),Lt.add(new go.PathSegment(go.PathSegment.Line,et*.055,nt*.21).close());var It=new go.PathFigure(et*1,0,!0);return ct.add(It),It.add(new go.PathSegment(go.PathSegment.Line,et*.4,0)),It.add(new go.PathSegment(go.PathSegment.Line,et*.4,nt*.65)),It.add(new go.PathSegment(go.PathSegment.Line,et*1,nt*.65).close()),ct}),go.Shape.defineFigureGenerator("Plane",function(Ut,et,nt){var ct=new go.Geometry,lt=new go.PathFigure(.55*et,nt,!0);return ct.add(lt),lt.add(new go.PathSegment(go.PathSegment.Line,.5*et,.6*nt)),lt.add(new go.PathSegment(go.PathSegment.Line,.4*et,.7*nt)),lt.add(new go.PathSegment(go.PathSegment.Line,.1*et,.475*nt)),lt.add(new go.PathSegment(go.PathSegment.Bezier,.35*et,.525*nt,0,.4*nt,.225*et,.45*nt)),lt.add(new go.PathSegment(go.PathSegment.Line,.4*et,.475*nt)),lt.add(new go.PathSegment(go.PathSegment.Line,.15*et,.35*nt)),lt.add(new go.PathSegment(go.PathSegment.Line,.2*et,.325*nt)),lt.add(new go.PathSegment(go.PathSegment.Line,.6*et,.325*nt)),lt.add(new go.PathSegment(go.PathSegment.Line,.85*et,.1*nt)),lt.add(new go.PathSegment(go.PathSegment.Bezier,.9*et,.2*nt,.975*et,0,et,.08*nt)),lt.add(new go.PathSegment(go.PathSegment.Line,.7*et,.45*nt)),lt.add(new go.PathSegment(go.PathSegment.Line,.6*et,.95*nt)),lt.add(new go.PathSegment(go.PathSegment.Line,.55*et,nt).close()),ct}),go.Shape.defineFigureGenerator("Key",function(Ut,et,nt){var ct=new go.Geometry,lt=new go.PathFigure(et*1,nt*.5,!0);return ct.add(lt),lt.add(new go.PathSegment(go.PathSegment.Line,et*.9,.4*nt)),lt.add(new go.PathSegment(go.PathSegment.Line,et*.5,.4*nt)),lt.add(new go.PathSegment(go.PathSegment.Line,et*.5,.35*nt)),lt.add(new go.PathSegment(go.PathSegment.Line,et*.45,.35*nt)),lt.add(new go.PathSegment(go.PathSegment.Line,et*.3,.2*nt)),lt.add(new go.PathSegment(go.PathSegment.Line,et*.15,.2*nt)),lt.add(new go.PathSegment(go.PathSegment.Line,0,.35*nt)),lt.add(new go.PathSegment(go.PathSegment.Line,0,.65*nt)),lt.add(new go.PathSegment(go.PathSegment.Line,et*.15,.8*nt)),lt.add(new go.PathSegment(go.PathSegment.Line,et*.3,.8*nt)),lt.add(new go.PathSegment(go.PathSegment.Line,et*.45,.65*nt)),lt.add(new go.PathSegment(go.PathSegment.Line,et*.5,.65*nt)),lt.add(new go.PathSegment(go.PathSegment.Line,et*.5,.6*nt)),lt.add(new go.PathSegment(go.PathSegment.Line,et*.6,.6*nt)),lt.add(new go.PathSegment(go.PathSegment.Line,et*.65,.55*nt)),lt.add(new go.PathSegment(go.PathSegment.Line,et*.7,.6*nt)),lt.add(new go.PathSegment(go.PathSegment.Line,et*.75,.55*nt)),lt.add(new go.PathSegment(go.PathSegment.Line,et*.8,.6*nt)),lt.add(new go.PathSegment(go.PathSegment.Line,et*.85,.575*nt)),lt.add(new go.PathSegment(go.PathSegment.Line,et*.9,.6*nt).close()),lt.add(new go.PathSegment(go.PathSegment.Move,.17*et,.425*nt)),lt.add(new go.PathSegment(go.PathSegment.Arc,270,360,.17*et,.5*nt,.075*et,.075*nt).close()),ct}),go.Shape.defineFigureGenerator("FilmTape",function(Ut,et,nt){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,et*0,et*.3,et*.055)),lt.add(new go.PathSegment(go.PathSegment.Line,0,nt*1)),lt.add(new go.PathSegment(go.PathSegment.Line,et*.08,nt*1)),lt.add(new go.PathSegment(go.PathSegment.Line,et*.08,nt*.95)),lt.add(new go.PathSegment(go.PathSegment.Line,et*(.08+.056*1),nt*.95)),lt.add(new go.PathSegment(go.PathSegment.Line,et*(.08+.056*1),nt*1)),lt.add(new go.PathSegment(go.PathSegment.Line,et*(.08+.056*2),nt*1)),lt.add(new go.PathSegment(go.PathSegment.Line,et*(.08+.056*2),nt*.95)),lt.add(new go.PathSegment(go.PathSegment.Line,et*(.08+.056*3),nt*.95)),lt.add(new go.PathSegment(go.PathSegment.Line,et*(.08+.056*3),nt*1)),lt.add(new go.PathSegment(go.PathSegment.Line,et*(.08+.056*4),nt*1)),lt.add(new go.PathSegment(go.PathSegment.Line,et*(.08+.056*4),nt*.95)),lt.add(new go.PathSegment(go.PathSegment.Line,et*(.08+.056*5),nt*.95)),lt.add(new go.PathSegment(go.PathSegment.Line,et*(.08+.056*5),nt*1)),lt.add(new go.PathSegment(go.PathSegment.Line,et*(.08+.056*6),nt*1)),lt.add(new go.PathSegment(go.PathSegment.Line,et*(.08+.056*6),nt*.95)),lt.add(new go.PathSegment(go.PathSegment.Line,et*(.08+.056*7),nt*.95)),lt.add(new go.PathSegment(go.PathSegment.Line,et*(.08+.056*7),nt*1)),lt.add(new go.PathSegment(go.PathSegment.Line,et*(.08+.056*8),nt*1)),lt.add(new go.PathSegment(go.PathSegment.Line,et*(.08+.056*8),nt*.95)),lt.add(new go.PathSegment(go.PathSegment.Line,et*(.08+.056*9),nt*.95)),lt.add(new go.PathSegment(go.PathSegment.Line,et*(.08+.056*9),nt*1)),lt.add(new go.PathSegment(go.PathSegment.Line,et*(.08+.056*10),nt*1)),lt.add(new go.PathSegment(go.PathSegment.Line,et*(.08+.056*10),nt*.95)),lt.add(new go.PathSegment(go.PathSegment.Line,et*(.08+.056*11),nt*.95)),lt.add(new go.PathSegment(go.PathSegment.Line,et*(.08+.056*11),nt*1)),lt.add(new go.PathSegment(go.PathSegment.Line,et*(.08+.056*12),nt*1)),lt.add(new go.PathSegment(go.PathSegment.Line,et*(.08+.056*12),nt*.95)),lt.add(new go.PathSegment(go.PathSegment.Line,et*(.08+.056*13),nt*.95)),lt.add(new go.PathSegment(go.PathSegment.Line,et*(.08+.056*13),nt*1)),lt.add(new go.PathSegment(go.PathSegment.Line,et*(.08+.056*14),nt*1)),lt.add(new go.PathSegment(go.PathSegment.Line,et*(.08+.056*14),nt*.95)),lt.add(new go.PathSegment(go.PathSegment.Line,et*(.08+.056*15),nt*.95)),lt.add(new go.PathSegment(go.PathSegment.Line,et*(.08+.056*15),nt*1)),lt.add(new go.PathSegment(go.PathSegment.Line,et*1,nt*1)),lt.add(new go.PathSegment(go.PathSegment.Line,et*1,nt*1));var gt=new go.PathFigure(0,0,!1);ct.add(gt),gt.add(new go.PathSegment(go.PathSegment.Line,et*1,nt*0)),gt.add(new go.PathSegment(go.PathSegment.Arc,270,-180,et*1,et*.3,et*.055)),gt.add(new go.PathSegment(go.PathSegment.Line,et*1,nt*1));var yt=new go.PathFigure(et*.11,nt*.1,!1);ct.add(yt),yt.add(new go.PathSegment(go.PathSegment.Line,et*(.11+.24133333*1+.028*0),nt*.1)),yt.add(new go.PathSegment(go.PathSegment.Line,et*(.11+.24133333*1+.028*0),nt*.8)),yt.add(new go.PathSegment(go.PathSegment.Line,et*.11,nt*.8).close());var Lt=new go.PathFigure(et*(.11+.24133333*1+.028*1),nt*.1,!1);ct.add(Lt),Lt.add(new go.PathSegment(go.PathSegment.Line,et*(.11+.24133333*2+.028*1),nt*.1)),Lt.add(new go.PathSegment(go.PathSegment.Line,et*(.11+.24133333*2+.028*1),nt*.8)),Lt.add(new go.PathSegment(go.PathSegment.Line,et*(.11+.24133333*1+.028*1),nt*.8).close());var It=new go.PathFigure(et*(.11+.24133333*2+.028*2),nt*.1,!1);return ct.add(It),It.add(new go.PathSegment(go.PathSegment.Line,et*(.11+.24133333*3+.028*2),nt*.1)),It.add(new go.PathSegment(go.PathSegment.Line,et*(.11+.24133333*3+.028*2),nt*.8)),It.add(new go.PathSegment(go.PathSegment.Line,et*(.11+.24133333*2+.028*2),nt*.8).close()),ct}),go.Shape.defineFigureGenerator("FloppyDisk",function(Ut,et,nt){var ct=new go.Geometry,lt=8,gt=lt*ve,yt=new go.PathFigure(lt,0,!1);ct.add(yt),yt.add(new go.PathSegment(go.PathSegment.Line,et*.86,0)),yt.add(new go.PathSegment(go.PathSegment.Line,et*1,nt*.14)),yt.add(new go.PathSegment(go.PathSegment.Line,et,nt-lt)),yt.add(new go.PathSegment(go.PathSegment.Bezier,et-lt,nt,et,nt-gt,et-gt,nt)),yt.add(new go.PathSegment(go.PathSegment.Line,lt,nt)),yt.add(new go.PathSegment(go.PathSegment.Bezier,0,nt-lt,gt,nt,0,nt-gt)),yt.add(new go.PathSegment(go.PathSegment.Line,0,lt)),yt.add(new go.PathSegment(go.PathSegment.Bezier,lt,0,0,gt,gt,0).close());var Lt=new go.PathFigure(et*.83,0,!1);ct.add(Lt),Lt.add(new go.PathSegment(go.PathSegment.Line,et*.83,nt*.3)),Lt.add(new go.PathSegment(go.PathSegment.Line,et*.17,nt*.3)),Lt.add(new go.PathSegment(go.PathSegment.Line,et*.17,nt*0).close());var It=new go.PathFigure(et*.83,nt*1,!1);ct.add(It),It.add(new go.PathSegment(go.PathSegment.Line,et*.83,nt*.5)),It.add(new go.PathSegment(go.PathSegment.Line,et*.17,nt*.5)),It.add(new go.PathSegment(go.PathSegment.Line,et*.17,nt*1).close());var Wt=new go.PathFigure(et*.78,nt*.05,!1);return ct.add(Wt),Wt.add(new go.PathSegment(go.PathSegment.Line,et*.66,nt*.05)),Wt.add(new go.PathSegment(go.PathSegment.Line,et*.66,nt*.25)),Wt.add(new go.PathSegment(go.PathSegment.Line,et*.78,nt*.25).close()),ct}),go.Shape.defineFigureGenerator("SpeechBubble",function(Ut,et,nt){var ct=Ut?Ut.parameter1:NaN;(isNaN(ct)||ct<0)&&(ct=15),ct=Math.min(ct,et/3),ct=Math.min(ct,nt/3);var lt=ct*ve,gt=nt*.8,yt=new go.Geometry,Lt=new go.PathFigure(ct,0,!0);return yt.add(Lt),Lt.add(new go.PathSegment(go.PathSegment.Line,et-ct,0)),Lt.add(new go.PathSegment(go.PathSegment.Bezier,et,ct,et-lt,0,et,lt)),Lt.add(new go.PathSegment(go.PathSegment.Line,et,gt-ct)),Lt.add(new go.PathSegment(go.PathSegment.Bezier,et-ct,gt,et,gt-lt,et-lt,gt)),Lt.add(new go.PathSegment(go.PathSegment.Line,et*.7,gt)),Lt.add(new go.PathSegment(go.PathSegment.Line,et*.7,nt)),Lt.add(new go.PathSegment(go.PathSegment.Line,et*.55,gt)),Lt.add(new go.PathSegment(go.PathSegment.Line,ct,gt)),Lt.add(new go.PathSegment(go.PathSegment.Bezier,0,gt-ct,lt,gt,0,gt-lt)),Lt.add(new go.PathSegment(go.PathSegment.Line,0,ct)),Lt.add(new go.PathSegment(go.PathSegment.Bezier,ct,0,0,lt,lt,0).close()),lt>1?(yt.spot1=new go.Spot(0,0,lt,lt),yt.spot2=new go.Spot(1,.8,-lt,-lt)):(yt.spot1=go.Spot.TopLeft,yt.spot2=new go.Spot(1,.8)),yt}),go.Shape.defineFigureGenerator("Repeat",function(Ut,et,nt){var ct=new go.Geometry,lt=new go.PathFigure(et*0,nt*.45,!0);ct.add(lt),lt.add(new go.PathSegment(go.PathSegment.Line,et*.25,nt*0)),lt.add(new go.PathSegment(go.PathSegment.Line,et*.5,nt*.45)),lt.add(new go.PathSegment(go.PathSegment.Line,et*.3,nt*.45)),lt.add(new go.PathSegment(go.PathSegment.Line,et*.3,nt*.9)),lt.add(new go.PathSegment(go.PathSegment.Line,et*.6,nt*.9)),lt.add(new go.PathSegment(go.PathSegment.Line,et*.65,nt*1)),lt.add(new go.PathSegment(go.PathSegment.Line,et*.2,nt*1)),lt.add(new go.PathSegment(go.PathSegment.Line,et*.2,nt*.45).close());var gt=new go.PathFigure(et*1,nt*.55,!0);return ct.add(gt),gt.add(new go.PathSegment(go.PathSegment.Line,et*.75,nt*1)),gt.add(new go.PathSegment(go.PathSegment.Line,et*.5,nt*.55)),gt.add(new go.PathSegment(go.PathSegment.Line,et*.7,nt*.55)),gt.add(new go.PathSegment(go.PathSegment.Line,et*.7,nt*.1)),gt.add(new go.PathSegment(go.PathSegment.Line,et*.4,nt*.1)),gt.add(new go.PathSegment(go.PathSegment.Line,et*.35,nt*0)),gt.add(new go.PathSegment(go.PathSegment.Line,et*.8,nt*0)),gt.add(new go.PathSegment(go.PathSegment.Line,et*.8,nt*.55).close()),ct}),go.Shape.defineFigureGenerator("Windows",function(Ut,et,nt){return new go.Geometry().add(new go.PathFigure(0,0,!0).add(new go.PathSegment(go.PathSegment.Line,et,0)).add(new go.PathSegment(go.PathSegment.Line,et,nt)).add(new go.PathSegment(go.PathSegment.Line,0,nt).close()).add(new go.PathSegment(go.PathSegment.Move,.4*et,.4*nt)).add(new go.PathSegment(go.PathSegment.Line,.4*et,.8*nt)).add(new go.PathSegment(go.PathSegment.Line,.9*et,.8*nt)).add(new go.PathSegment(go.PathSegment.Line,.9*et,.4*nt).close()).add(new go.PathSegment(go.PathSegment.Move,.2*et,.1*nt)).add(new go.PathSegment(go.PathSegment.Line,.2*et,.6*nt)).add(new go.PathSegment(go.PathSegment.Line,.7*et,.6*nt)).add(new go.PathSegment(go.PathSegment.Line,.7*et,.1*nt).close()).add(new go.PathSegment(go.PathSegment.Move,.1*et,.6*nt)).add(new go.PathSegment(go.PathSegment.Line,.1*et,.9*nt)).add(new go.PathSegment(go.PathSegment.Line,.5*et,.9*nt)).add(new go.PathSegment(go.PathSegment.Line,.5*et,.6*nt).close()))}),go.Shape.defineFigureGenerator("Terminal",function(Ut,et,nt){var ct=new go.Geometry,lt=new go.PathFigure(et*0,nt*.1,!1);ct.add(lt),lt.add(new go.PathSegment(go.PathSegment.Line,et*1,nt*.1)),lt.add(new go.PathSegment(go.PathSegment.Line,et*1,nt*.9)),lt.add(new go.PathSegment(go.PathSegment.Line,et*0,nt*.9).close());var gt=new go.PathFigure(et*.1,nt*.2,!0);ct.add(gt),gt.add(new go.PathSegment(go.PathSegment.Line,et*.1,nt*.25)),gt.add(new go.PathSegment(go.PathSegment.Line,et*.22,nt*.285)),gt.add(new go.PathSegment(go.PathSegment.Line,et*.1,nt*.32)),gt.add(new go.PathSegment(go.PathSegment.Line,et*.1,nt*.37)),gt.add(new go.PathSegment(go.PathSegment.Line,et*.275,nt*.32)),gt.add(new go.PathSegment(go.PathSegment.Line,et*.275,nt*.25).close());var yt=new go.PathFigure(et*.28,nt*.37,!0);return ct.add(yt),yt.add(new go.PathSegment(go.PathSegment.Line,et*.45,nt*.37)),yt.add(new go.PathSegment(go.PathSegment.Line,et*.45,nt*.41)),yt.add(new go.PathSegment(go.PathSegment.Line,et*.28,nt*.41).close()),ct}),go.Shape.defineFigureGenerator("Beaker",function(Ut,et,nt){var ct=new go.Geometry,lt=15,gt=lt*ve,yt=new go.PathFigure(et*.62,nt*.475,!0);return ct.add(yt),yt.add(new go.PathSegment(go.PathSegment.Line,et,nt-lt)),yt.add(new go.PathSegment(go.PathSegment.Bezier,et-lt,nt,et,nt-gt,et-gt,nt)),yt.add(new go.PathSegment(go.PathSegment.Line,lt,nt)),yt.add(new go.PathSegment(go.PathSegment.Bezier,0,nt-lt,gt,nt,0,nt-gt)),yt.add(new go.PathSegment(go.PathSegment.Line,et*.38,nt*.475)),yt.add(new go.PathSegment(go.PathSegment.Line,et*.38,nt*.03)),yt.add(new go.PathSegment(go.PathSegment.Line,et*.36,nt*0)),yt.add(new go.PathSegment(go.PathSegment.Line,et*.64,nt*0)),yt.add(new go.PathSegment(go.PathSegment.Line,et*.62,nt*.03).close()),gt>1?(ct.spot1=new go.Spot(0,0,gt,gt),ct.spot2=new go.Spot(1,1,-gt,-gt)):(ct.spot1=go.Spot.TopLeft,ct.spot2=go.Spot.BottomRight),ct}),go.Shape.defineFigureGenerator("Download",function(Ut,et,nt){var ct=new go.Geometry,lt=new go.PathFigure(et*0,nt*1,!0);ct.add(lt);var gt=.1/.3;lt.add(new go.PathSegment(go.PathSegment.Line,et*1,nt*1)),lt.add(new go.PathSegment(go.PathSegment.Line,et*1,nt*(1-gt))),lt.add(new go.PathSegment(go.PathSegment.Line,et*.8,nt*0)),lt.add(new go.PathSegment(go.PathSegment.Line,et*.66,nt*0)),lt.add(new go.PathSegment(go.PathSegment.Line,et*.66,nt*.055)),lt.add(new go.PathSegment(go.PathSegment.Line,et*.755,nt*.055)),lt.add(new go.PathSegment(go.PathSegment.Line,et*.93,nt*(1-gt))),lt.add(new go.PathSegment(go.PathSegment.Line,et*.64,nt*(1-gt))),lt.add(new go.PathSegment(go.PathSegment.Line,et*.61,nt*.75)),lt.add(new go.PathSegment(go.PathSegment.Line,et*.5,nt*.75)),lt.add(new go.PathSegment(go.PathSegment.Line,et*.39,nt*.75)),lt.add(new go.PathSegment(go.PathSegment.Line,et*.36,nt*(1-gt))),lt.add(new go.PathSegment(go.PathSegment.Line,et*.07,nt*(1-gt))),lt.add(new go.PathSegment(go.PathSegment.Line,et*(1-.755),nt*.055)),lt.add(new go.PathSegment(go.PathSegment.Line,et*(1-.66),nt*.055)),lt.add(new go.PathSegment(go.PathSegment.Line,et*(1-.66),nt*0)),lt.add(new go.PathSegment(go.PathSegment.Line,et*(1-.8),nt*0)),lt.add(new go.PathSegment(go.PathSegment.Line,et*0,nt*(1-gt)).close());var yt=new go.PathFigure(et*.4,nt*0,!0);return ct.add(yt),yt.add(new go.PathSegment(go.PathSegment.Line,et*.4,nt*.44)),yt.add(new go.PathSegment(go.PathSegment.Line,et*.26,nt*.44)),yt.add(new go.PathSegment(go.PathSegment.Line,et*.5,nt*.66)),yt.add(new go.PathSegment(go.PathSegment.Line,et*(1-.26),nt*.44)),yt.add(new go.PathSegment(go.PathSegment.Line,et*.6,nt*.44)),yt.add(new go.PathSegment(go.PathSegment.Line,et*.6,nt*0).close()),ct}),go.Shape.defineFigureGenerator("Bin",function(Ut,et,nt){var ct=new go.Geometry,lt=new go.PathFigure(et*0,nt*1,!0);ct.add(lt);var gt=.1/.3;return lt.add(new go.PathSegment(go.PathSegment.Line,et*1,nt*1)),lt.add(new go.PathSegment(go.PathSegment.Line,et*1,nt*(1-gt))),lt.add(new go.PathSegment(go.PathSegment.Line,et*.8,nt*0)),lt.add(new go.PathSegment(go.PathSegment.Line,et*.66,nt*0)),lt.add(new go.PathSegment(go.PathSegment.Line,et*.66,nt*.055)),lt.add(new go.PathSegment(go.PathSegment.Line,et*.755,nt*.055)),lt.add(new go.PathSegment(go.PathSegment.Line,et*.93,nt*(1-gt))),lt.add(new go.PathSegment(go.PathSegment.Line,et*.64,nt*(1-gt))),lt.add(new go.PathSegment(go.PathSegment.Line,et*.61,nt*.75)),lt.add(new go.PathSegment(go.PathSegment.Line,et*.5,nt*.75)),lt.add(new go.PathSegment(go.PathSegment.Line,et*.39,nt*.75)),lt.add(new go.PathSegment(go.PathSegment.Line,et*.36,nt*(1-gt))),lt.add(new go.PathSegment(go.PathSegment.Line,et*.07,nt*(1-gt))),lt.add(new go.PathSegment(go.PathSegment.Line,et*(1-.755),nt*.055)),lt.add(new go.PathSegment(go.PathSegment.Line,et*(1-.66),nt*.055)),lt.add(new go.PathSegment(go.PathSegment.Line,et*(1-.66),nt*0)),lt.add(new go.PathSegment(go.PathSegment.Line,et*(1-.8),nt*0)),lt.add(new go.PathSegment(go.PathSegment.Line,et*0,nt*(1-gt)).close()),ct}),go.Shape.defineFigureGenerator("Upload",function(Ut,et,nt){var ct=new go.Geometry,lt=new go.PathFigure(et*0,nt*1,!0);ct.add(lt);var gt=.1/.3;lt.add(new go.PathSegment(go.PathSegment.Line,et*1,nt*1)),lt.add(new go.PathSegment(go.PathSegment.Line,et*1,nt*(1-gt))),lt.add(new go.PathSegment(go.PathSegment.Line,et*.8,nt*0)),lt.add(new go.PathSegment(go.PathSegment.Line,et*.66,nt*0)),lt.add(new go.PathSegment(go.PathSegment.Line,et*.66,nt*.055)),lt.add(new go.PathSegment(go.PathSegment.Line,et*.755,nt*.055)),lt.add(new go.PathSegment(go.PathSegment.Line,et*.93,nt*(1-gt))),lt.add(new go.PathSegment(go.PathSegment.Line,et*.64,nt*(1-gt))),lt.add(new go.PathSegment(go.PathSegment.Line,et*.61,nt*.75)),lt.add(new go.PathSegment(go.PathSegment.Line,et*.5,nt*.75)),lt.add(new go.PathSegment(go.PathSegment.Line,et*.39,nt*.75)),lt.add(new go.PathSegment(go.PathSegment.Line,et*.36,nt*(1-gt))),lt.add(new go.PathSegment(go.PathSegment.Line,et*.07,nt*(1-gt))),lt.add(new go.PathSegment(go.PathSegment.Line,et*(1-.755),nt*.055)),lt.add(new go.PathSegment(go.PathSegment.Line,et*(1-.66),nt*.055)),lt.add(new go.PathSegment(go.PathSegment.Line,et*(1-.66),nt*0)),lt.add(new go.PathSegment(go.PathSegment.Line,et*(1-.8),nt*0)),lt.add(new go.PathSegment(go.PathSegment.Line,et*0,nt*(1-gt)).close());var yt=new go.PathFigure(et*.5,nt*0,!0);return ct.add(yt),yt.add(new go.PathSegment(go.PathSegment.Line,et*.26,nt*.25)),yt.add(new go.PathSegment(go.PathSegment.Line,et*.4,nt*.25)),yt.add(new go.PathSegment(go.PathSegment.Line,et*.4,nt*.63)),yt.add(new go.PathSegment(go.PathSegment.Line,et*.6,nt*.63)),yt.add(new go.PathSegment(go.PathSegment.Line,et*.6,nt*.25)),yt.add(new go.PathSegment(go.PathSegment.Line,et*.74,nt*.25).close()),ct}),go.Shape.defineFigureGenerator("EmptyDrink",function(Ut,et,nt){var ct=new go.Geometry,lt=new go.PathFigure(et*.15,nt*0,!1);return ct.add(lt),lt.add(new go.PathSegment(go.PathSegment.Line,et*.85,nt*0)),lt.add(new go.PathSegment(go.PathSegment.Line,et*.7,nt*1)),lt.add(new go.PathSegment(go.PathSegment.Line,et*.3,nt*1).close()),ct}),go.Shape.defineFigureGenerator("Drink",function(Ut,et,nt){var ct=new go.Geometry,lt=new go.PathFigure(et*.15,nt*0,!1);ct.add(lt),lt.add(new go.PathSegment(go.PathSegment.Line,et*.85,nt*0)),lt.add(new go.PathSegment(go.PathSegment.Line,et*.7,nt*1)),lt.add(new go.PathSegment(go.PathSegment.Line,et*.3,nt*1).close());var gt=new go.PathFigure(et*.235,nt*.28,!0);return ct.add(gt),gt.add(new go.PathSegment(go.PathSegment.Line,et*.765,nt*.28)),gt.add(new go.PathSegment(go.PathSegment.Line,et*.655,nt*.97)),gt.add(new go.PathSegment(go.PathSegment.Line,et*.345,nt*.97).close()),ct}),go.Shape.defineFigureGenerator("4Arrows",function(Ut,et,nt){var ct=new go.Geometry,lt=new go.PathFigure(et*.5,nt*0,!0);return ct.add(lt),lt.add(new go.PathSegment(go.PathSegment.Line,et*.65,nt*.25)),lt.add(new go.PathSegment(go.PathSegment.Line,et*.55,nt*.25)),lt.add(new go.PathSegment(go.PathSegment.Line,et*.55,nt*.45)),lt.add(new go.PathSegment(go.PathSegment.Line,et*.75,nt*.45)),lt.add(new go.PathSegment(go.PathSegment.Line,et*.75,nt*.35)),lt.add(new go.PathSegment(go.PathSegment.Line,et*1,nt*.5)),lt.add(new go.PathSegment(go.PathSegment.Line,et*.75,nt*.65)),lt.add(new go.PathSegment(go.PathSegment.Line,et*.75,nt*.55)),lt.add(new go.PathSegment(go.PathSegment.Line,et*.55,nt*.55)),lt.add(new go.PathSegment(go.PathSegment.Line,et*.55,nt*.75)),lt.add(new go.PathSegment(go.PathSegment.Line,et*.65,nt*.75)),lt.add(new go.PathSegment(go.PathSegment.Line,et*.5,nt*1)),lt.add(new go.PathSegment(go.PathSegment.Line,et*.35,nt*.75)),lt.add(new go.PathSegment(go.PathSegment.Line,et*.45,nt*.75)),lt.add(new go.PathSegment(go.PathSegment.Line,et*.45,nt*.55)),lt.add(new go.PathSegment(go.PathSegment.Line,et*.25,nt*.55)),lt.add(new go.PathSegment(go.PathSegment.Line,et*.25,nt*.65)),lt.add(new go.PathSegment(go.PathSegment.Line,et*0,nt*.5)),lt.add(new go.PathSegment(go.PathSegment.Line,et*.25,nt*.35)),lt.add(new go.PathSegment(go.PathSegment.Line,et*.25,nt*.45)),lt.add(new go.PathSegment(go.PathSegment.Line,et*.45,nt*.45)),lt.add(new go.PathSegment(go.PathSegment.Line,et*.45,nt*.25)),lt.add(new go.PathSegment(go.PathSegment.Line,et*.35,nt*.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 Cn={},mi="5.0",ne={},bt=null,Be=!1,Ee=!1,Ze=null,Fe=!1,we=null,ve=null,Qe=0;Qe<arguments.length;Qe++){var ge=arguments[Qe];if(ge!==null)switch(typeof ge){case"number":mi=ge.toFixed(1);break;case"string":ge.match(new RegExp("^[0-9]\\.[0-9]+$"))?mi=ge:Ze=ge;break;case"object":typeof ge.is3D!="undefined"?bt=ge:ne=ge;break;case"boolean":Be=ge,Ee=!0;break}}bt===null&&(bt={is3D:!1,AV:!1,SV:!1,CV:!1,EV2:!1,CP:!1,PC:!1,DA:!1,FI:!1,PV:!1,macro:!1},ne.material_id!==void 0&&!Ee&&(Be=!0)),Ze!==null&&ne.id===void 0&&(ne.id=Ze);var se="",hn="",Se=!1,xn=null,Ut=null,et=null,nt=!1,ct=null,lt=null,gt=null,yt=null,Lt=null;ne.height!==void 0&&(ne.height=Math.round(ne.height)),ne.width!==void 0&&(ne.width=Math.round(ne.width));var It=function(Ke){return parseFloat(Ke)>4?parseFloat(Ke):5};Cn.setHTML5Codebase=function(Ke,Pn){ve=Ke,En(Ke,Pn)},Cn.setJavaCodebase=Cn.setJavaCodebaseVersion=Cn.isCompiledInstalled=Cn.setPreCompiledScriptPath=Cn.setPreCompiledResourcePath=function(){},Cn.setHTML5CodebaseVersion=function(Ke,Pn){var qn=parseFloat(Ke);if(qn!==NaN&&qn<5){console.log("The GeoGebra HTML5 codebase version "+qn+" is deprecated. Using version latest instead.");return}we=Ke,jt(Ke,Pn)},Cn.getHTML5CodebaseVersion=function(){return Ut},Cn.getParameters=function(){return ne},Cn.setFontsCSSURL=function(Ke){yt=Ke},Cn.setGiacJSURL=function(Ke){},Cn.setJNLPFile=function(Ke){se=Ke},Cn.setJNLPBaseDir=function(Ke){},Cn.inject=function(){function Ke(){return window.frameElement&&window.frameElement.getAttribute("data-singleton")}for(var Pn="auto",qn=ne.id,xi,kn=!1,Ce=0;Ce<arguments.length;Ce++){var Ge=arguments[Ce];typeof Ge=="string"?(Ge=Ge.toLowerCase(),Ge.match(/^(prefer)?(java|html5|compiled|auto|screenshot)$/)?Pn=Ge:qn=arguments[Ce]):typeof Ge=="boolean"?kn=Ge:Ge instanceof HTMLElement&&(xi=Ge)}gi();function gi(){if(!Fe){setTimeout(gi,200);return}Pn=Ii(Pn);var yi=xi||document.getElementById(qn);if(!yi){console.log("possibly bug on ajax loading? ");return}if(Cn.removeExistingApplet(yi,!1),ne.width===void 0&&yi.clientWidth&&(ne.width=yi.clientWidth),ne.height===void 0&&yi.clientHeight&&(ne.height=yi.clientHeight),!(ne.width&&ne.height)&&Pn==="html5"&&(delete ne.width,delete ne.height),xn=Pn,Pn==="screenshot")pn(yi,ne);else{var Ht=!1;ne.hasOwnProperty("playButton")&&ne.playButton||ne.hasOwnProperty("clickToLoad")&&ne.clickToLoad?Ht=!0:ne.hasOwnProperty("playButtonAutoDecide")&&ne.playButtonAutoDecide&&(Ht=(!Wt()||Ke())&&qt()),Ht?(xn="screenshot",ti(yi,ne,kn,Pn)):on(yi,ne,kn)}}};function Wt(){try{return window.self!==window.top}catch(Ke){return!0}}function qt(){return ne.hasOwnProperty("screenshotGenerator")&&ne.screenshotGenerator?!1:Math.max(screen.width,screen.height)<800}Cn.getViews=function(){return bt},Cn.isJavaInstalled=function(){return!1};var he=function(Ke){var Pn=function(Ce){var Ge=JSON.parse(Ce),gi=function(Et){return Et.type=="G"||Et.type=="E"},yi=Ge.elements?Ge.elements.filter(gi)[0]:Ge;if(!yi||!yi.url){qn();return}ne.fileName=yi.url,fe(yi.settings||{}),bt.is3D=!0;var Ht="https://www.geogebra.org/images/";Cn.setPreviewImage(ct||yi.previewUrl,Ht+"GeoGebra_loading.png",Ht+"applet_play.png"),Ke()},qn=function(){ne.onError&&ne.onError(),Si("Error: Fetching material (id "+ne.material_id+") failed.",ne)},xi=location.host.match(/(www|stage|beta|groot|alpha).geogebra.(org|net)/)?location.host:"www.geogebra.org",kn="/materials/"+ne.material_id+"?scope=basic";Ae("https://"+xi+"/api/proxy.php?path="+encodeURIComponent(kn),Pn,qn)};function fe(Ke){var Pn=["width","height","showToolBar","showMenuBar","showAlgebraInput","allowStyleBar","showResetIcon","enableLabelDrags","enableShiftDragZoom","enableRightClick","appName"];["enableLabelDrags","enableShiftDragZoom","enableRightClick"].forEach(function(qn){Ke[qn]=!!Ke[qn]}),Pn.forEach(function(qn){ne[qn]===void 0&&Ke[qn]!==void 0&&(ne[qn]=Ke[qn])}),ne.showToolBarHelp===void 0&&(ne.showToolBarHelp=ne.showToolBar)}function Ae(Ke,Pn,qn){var xi=new XMLHttpRequest;xi.open("GET",Ke),xi.onload=function(){Pn(xi.responseText)},xi.onerror=qn,xi.send()}Cn.isHTML5Installed=function(){return!0},Cn.getLoadedAppletType=function(){return xn},Cn.setPreviewImage=function(Ke,Pn,qn){ct=Ke,lt=Pn,gt=qn},Cn.removeExistingApplet=function(Ke,Pn){var qn;typeof Ke=="string"&&(Ke=document.getElementById(Ke)),xn=null;var xi=null;for(qn=0;qn<Ke.childNodes.length;qn++){var kn=Ke.childNodes[qn],Ce=kn.className;Ce==="applet_screenshot"?Pn?(kn.style.display="block",xn="screenshot"):kn.style.display="none":Ce!=="applet_scaler prerender"&&(Ke.removeChild(kn),xi=Ce&&Ce.indexOf("appletParameters")!=-1?kn.id:null,qn--)}var Ge=ne.id!==void 0?ne.id:xi,gi=window[Ge];gi&&typeof gi.getBase64=="function"&&(gi.remove(),window[Ge]=null)},Cn.refreshHitPoints=function(){if(It(ggbHTML5LoadedCodebaseVersion)>=5)return!0;var Ke=Cn.getAppletObject();return Ke&&typeof Ke.recalculateEnvironments=="function"?(Ke.recalculateEnvironments(),!0):!1},Cn.startAnimation=function(){var Ke=Cn.getAppletObject();return Ke&&typeof Ke.startAnimation=="function"?(Ke.startAnimation(),!0):!1},Cn.stopAnimation=function(){var Ke=Cn.getAppletObject();return Ke&&typeof Ke.stopAnimation=="function"?(Ke.stopAnimation(),!0):!1},Cn.getAppletObject=function(){var Ke=ne.id!==void 0?ne.id:"ggbApplet";return window[Ke]},Cn.resize=function(){};var Ve=function(Ke,Pn,qn){var xi=document.createElement("param");xi.setAttribute("name",Pn),xi.setAttribute("value",qn),Ke.appendChild(xi)},ye=function(Ke){return Ke&&Ke!=="false"},on=function(Ke,Pn,qn){It(Ut)<=4.2&&(qn=!0);var xi=!isRenderGGBElementEnabled&&!scriptLoadStarted;(!isRenderGGBElementEnabled&&!scriptLoadStarted||ggbHTML5LoadedCodebaseVersion!==Ut||ggbHTML5LoadedCodebaseIsWebSimple&&!nt)&&(xi=!0,isRenderGGBElementEnabled=!1,scriptLoadStarted=!1);var kn=document.createElement("div");kn.classList.add("appletParameters","notranslate");var Ce=Pn.width,Ge=Pn.height;if(Pn.disableAutoScale=Pn.disableAutoScale===void 0?GGBAppletUtils.isFlexibleWorksheetEditor():Pn.disableAutoScale,Pn.width!==void 0)if(It(Ut)<=4.4)ye(Pn.showToolBar)&&(Pn.height-=7),ye(Pn.showAlgebraInput)&&(Pn.height-=37),Pn.width<605&&ye(Pn.showToolBar)&&(Pn.width=605,Ce=605);else{var gi=100;(ye(Pn.showToolBar)||ye(Pn.showMenuBar))&&(Pn.hasOwnProperty("customToolBar")&&(Pn.customToolbar=Pn.customToolBar),gi=ye(Pn.showMenuBar)?245:155),Ce<gi&&(Pn.width=gi,Ce=gi)}kn.style.border="none",kn.style.display="inline-block";for(var yi in Pn)Pn.hasOwnProperty(yi)&&yi!=="appletOnLoad"&&kn.setAttribute("data-param-"+yi,Pn[yi]);yt&&kn.setAttribute("data-param-fontscssurl",yt),Cn.resize=function(){GGBAppletUtils.responsiveResize(Ke,Pn)},window.addEventListener("resize",function(mn){Cn.resize()});var Ht=typeof Pn.appletOnLoad=="function"?Pn.appletOnLoad:function(){};if(!qn&&Pn.width!==void 0){Pn.hasOwnProperty("showSplash")||kn.setAttribute("data-param-showSplash","false");var Et=Ke.querySelector(".applet_scaler.prerender"),Ct=Et!==null;if(Ct)var Nt=Et.querySelector(".ggb_preview");else{var Nt=Li(Ce,Ge,Pn.borderColor,!1);Et=document.createElement("div"),Et.className="applet_scaler",Et.style.position="relative",Et.style.display="block",Et.style.width=Ce+"px",Et.style.height=Ge+"px"}window.GGBT_spinner&&window.GGBT_spinner.attachSpinner(Et,"66%"),It(Ut)>=5?(Pn.appletOnLoad=function(mn){var cn=Ke.querySelector(".ggb_preview");cn&&cn.parentNode.removeChild(cn),window.GGBT_spinner&&window.GGBT_spinner.removeSpinner(Et),window.GGBT_wsf_view&&$(window).trigger("resize"),Ht(mn)},Ct||Et.appendChild(Nt)):kn.appendChild(Nt),Et.appendChild(kn),Ct||Ke.appendChild(Et),setTimeout(function(){Cn.resize()},1)}else{var Kt=document.createElement("div");Kt.className="applet_scaler",Kt.style.position="relative",Kt.style.display="block",Kt.appendChild(kn),Ke.appendChild(Kt),Pn.appletOnLoad=function(mn){Cn.resize(),Ht(mn)}}function kt(mn,cn){cn&&typeof cn.appletOnLoad=="function"&&typeof renderGGBElement=="function"?renderGGBElement(mn,cn.appletOnLoad):renderGGBElement(mn),Si("GeoGebra HTML5 applet injected and rendered with previously loaded codebase.",cn)}function be(mn,cn){typeof renderGGBElement=="undefined"?(html5AppletsToProcess===null&&(html5AppletsToProcess=[]),html5AppletsToProcess.push({article:mn,params:cn}),window.renderGGBElementReady=function(){isRenderGGBElementEnabled=!0,html5AppletsToProcess!==null&&html5AppletsToProcess.length&&(html5AppletsToProcess.forEach(function(Mn){kt(Mn.article,Mn.params)}),html5AppletsToProcess=null)},It(Ut)<5&&(mn.className+=" geogebraweb")):kt(mn,cn)}if(xi){scriptLoadStarted=!0;for(var An=0;An<kn.childNodes.length;An++){var ze=kn.childNodes[An].tagName;ze==="TABLE"&&(kn.removeChild(kn.childNodes[An]),An--)}if(ggbHTML5LoadedScript!==null){var Je=document.querySelector('script[src="'+ggbHTML5LoadedScript+'"]');Je!=null&&Je.parentNode.removeChild(Je)}var rn=document.createElement("script"),Oe=function(){be(kn,Pn)};rn.src=hn+et,ggbHTML5LoadedCodebaseIsWebSimple=nt,ggbHTML5LoadedCodebaseVersion=Ut,ggbHTML5LoadedScript=rn.src,Si("GeoGebra HTML5 codebase loaded: '"+hn+"'.",Pn),!ve&&(!we||we=="5.0")?(nt?webSimple.succeeded=webSimple.succeeded||webSimple():web3d.succeeded=web3d.succeeded||web3d(),Oe()):hn.requirejs?__webpack_require__.e(7963).then(function(){var mn=[__webpack_require__(87963)];Oe.apply(null,mn)}.bind(this)).catch(__webpack_require__.oe):(rn.onload=Oe,Ke.appendChild(rn))}else be(kn,Pn);Pn.height=Ge,Pn.width=Ce},pn=function(Ke,Pn,qn){var xi=Li(Pn.width,Pn.height,Pn.borderColor,qn),kn=document.createElement("div");kn.style.position="relative",kn.style.display="block",kn.style.width=Pn.width+"px",kn.style.height=Pn.height+"px",kn.className="applet_screenshot applet_scaler"+(qn?" applet_screenshot_play":""),kn.appendChild(xi);var Ce=GGBAppletUtils.getScale(Pn,Ke,qn);qn?(Ke.appendChild(Xn()),window.GGBT_wsf_view||(Ke.style.position="relative")):window.GGBT_spinner&&window.GGBT_spinner.attachSpinner(kn,"66%"),Ke.appendChild(kn),Ce!==1&&!isNaN(Ce)&&(GGBAppletUtils.scaleElement(kn,Ce),kn.style.width=Pn.width+"px",kn.style.height=Pn.height+"px",kn.parentNode.style.width=Pn.width*Ce+"px",kn.parentNode.style.height=Pn.height*Ce+"px"),Cn.resize=function(){Vn(Ke,xi,kn,qn)},window.addEventListener("resize",function(Ge){Cn.resize()}),Cn.resize()};function Vn(Ke,Pn,qn,xi){if(Ke.contains(Pn)){if(typeof window.GGBT_wsf_view=="object"&&window.GGBT_wsf_view.isFullscreen()){if(Ke.id!=="fullscreencontent")return;window.GGBT_wsf_view.setCloseBtnPosition(Ke)}var kn=GGBAppletUtils.getScale(ne,Ke,xi);qn.parentNode!==null&&(!isNaN(kn)&&kn!==1?(GGBAppletUtils.scaleElement(qn,kn),qn.parentNode.style.width=ne.width*kn+"px",qn.parentNode.style.height=ne.height*kn+"px"):(GGBAppletUtils.scaleElement(qn,1),qn.parentNode.style.width=ne.width+"px",qn.parentNode.style.height=ne.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()}}Cn.onExitFullscreen=function(Ke,Pn){Pn.appendChild(Ke)};var ti=function(Ke,Pn,qn,xi){pn(Ke,Pn,!0);for(var kn=function(){var gi=[];for(Ge=0;Ge<Ke.childNodes.length;Ge++)gi.push(Ke.childNodes[Ge]);if(window.GGBT_wsf_view){var yi=window.GGBT_wsf_view.renderFullScreen(Ke,Pn.id),Ht=document.getElementById("fullscreencontainer"),Et=jQuery(Ke).find(".fullscreencontent");Et.length>0?(yi.remove(),Et.attr("id","fullscreencontent").show(),jQuery(Ht).append(Et),window.dispatchEvent(new Event("resize"))):on(yi,Pn,!1),window.GGBT_wsf_view.launchFullScreen(Ht)}else xn=xi,on(Ke,Pn,!1);if(!window.GGBT_wsf_view)for(Ge=0;Ge<gi.length;Ge++)Ke.removeChild(gi[Ge])},Ce=Ke.getElementsByClassName("ggb_preview_play"),Ge=0;Ge<Ce.length;Ge++)Ce[Ge].addEventListener("click",kn,!1),Ce[Ge].addEventListener("ontouchstart",kn,!1);typeof window.ggbAppletPlayerOnload=="function"&&window.ggbAppletPlayerOnload(Ke),qt()&&window.GGBT_wsf_view&&$(".wsf-element-fullscreen-button").remove()},Xn=function(){var Ke=document.createElement("div");if(Ke.className="ggb_preview_play icon-applet-play",!window.GGBT_wsf_view){var Pn='.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");}',qn=document.createElement("style");qn.styleSheet?qn.styleSheet.cssText=Pn:qn.appendChild(document.createTextNode(Pn)),document.getElementsByTagName("head")[0].appendChild(qn)}return Ke},Li=function(Ke,Pn,qn,xi){var kn=document.createElement("div");kn.className="ggb_preview",kn.style.position="absolute",kn.style.zIndex="90",kn.style.width=Ke-2+"px",kn.style.height=Pn-2+"px",kn.style.top="0px",kn.style.left="0px",kn.style.overflow="hidden",kn.style.backgroundColor="white";var Ce="lightgrey";qn!==void 0&&(qn==="none"?Ce="transparent":Ce=qn),kn.style.border="1px solid "+Ce;var Ge=document.createElement("img");if(Ge.style.position="relative",Ge.style.zIndex="1000",Ge.style.top="-1px",Ge.style.left="-1px",ct!==null&&Ge.setAttribute("src",ct),Ge.style.opacity=.7,lt!==null){var gi,yi,Ht;if(!xi){gi=document.createElement("img"),gi.style.position="absolute",gi.style.zIndex="1001",gi.style.opacity=1,Ge.style.opacity=.3,yi=360,yi>Ke/4*3&&(yi=Ke/4*3),Ht=yi/5.8,gi.setAttribute("src",lt),gi.setAttribute("width",yi),gi.setAttribute("height",Ht);var Et=(Ke-yi)/2,Ct=(Pn-Ht)/2;gi.style.left=Et+"px",gi.style.top=Ct+"px",kn.appendChild(gi)}}return kn.appendChild(Ge),kn},Ii=function(Ke){return Ke=Ke.toLowerCase(),Ke==="html5"||Ke==="screenshot"?Ke:"html5"},ue=["web","webSimple","web3d","tablet","tablet3d","phone"],jt=function(Ke,Pn){if(Ut=Ke,Pn){En(Ut,!0);return}var qn=!Be;if(qn){var xi=It(Ut);!isNaN(xi)&&xi<4.4&&(qn=!1)}var kn,Ce;window.location.protocol.substr(0,4)==="http"?kn=window.location.protocol:kn="http:";var Ge=Ut.indexOf("//");Ge>0?Ce=Ut:Ge===0?Ce=kn+Ut:Ce="https://www.geogebra.org/apps/5.2.814.0/";for(var gi in ue)if(Ut.slice(ue[gi].length*-1)===ue[gi]||Ut.slice((ue[gi].length+1)*-1)===ue[gi]+"/"){En(Ce,!1);return}!GGBAppletUtils.isFlexibleWorksheetEditor()&&qn&&!bt.is3D&&!bt.AV&&!bt.SV&&!bt.CV&&!bt.EV2&&!bt.CP&&!bt.PC&&!bt.DA&&!bt.FI&&!bt.PV&&!ye(ne.showToolBar)&&!ye(ne.showMenuBar)&&!ye(ne.showAlgebraInput)&&!ye(ne.enableRightClick)&&(!ne.appName||ne.appName=="classic")?Ce+="webSimple/":Ce+="web3d/",En(Ce,!1)},En=function(Ke,Pn){if(Ke.requirejs){hn=Ke;return}Ke.slice(-1)!=="/"&&(Ke+="/"),hn=Ke,Pn===null&&(Pn=Ke.indexOf("http")===-1),Se=Pn,et="web.nocache.js",nt=!1;var qn=hn.split("/");qn.length>1&&(!Pn&&qn[qn.length-2]==="webSimple"?(et="webSimple.nocache.js",nt=!0):ue.indexOf(qn[qn.length-2])>=0&&(et=qn[qn.length-2]+".nocache.js")),qn=Ke.split("/"),Ut=qn[qn.length-3],Ut.substr(0,4)==="test"?Ut=Ut.substr(4,1)+"."+Ut.substr(5,1):(Ut.substr(0,3)==="war"||Ut.substr(0,4)==="beta")&&(Ut="5.0");var xi=parseFloat(Ut);xi!==NaN&&xi<5&&Ke.indexOf("geogebra.org")>=0&&(console.log("The GeoGebra HTML5 codebase version "+xi+" is deprecated. Using version latest instead."),jt("5.0",Pn))},Si=function(Ke,Pn){window.console&&window.console.log&&(!Pn||typeof Pn.showLogging=="undefined"||Pn.showLogging&&Pn.showLogging!=="false")&&console.log(Ke)};ne.material_id!==void 0?he(pi):pi();function pi(){var Ke=mi;we!==null?Ke=we:parseFloat(Ke)<5&&(Ke="5.0"),jt(Ke,!1),ve!==null&&En(ve,Se),Fe=!0}return Cn},GGBAppletUtils=function(){"use strict";function Cn(){return window.GGBT_wsf_edit!==void 0}function mi(Fe,we){we!=1?(Fe.style.transformOrigin="0% 0% 0px",Fe.style.webkitTransformOrigin="0% 0% 0px",Fe.style.transform="scale("+we+","+we+")",Fe.style.webkitTransform="scale("+we+","+we+")",Fe.style.maxWidth="initial",Fe.querySelector(".ggb_preview")!==null&&(Fe.querySelector(".ggb_preview").style.maxWidth="initial"),Fe.querySelectorAll(".ggb_preview img")[0]!==void 0&&(Fe.querySelectorAll(".ggb_preview img")[0].style.maxWidth="initial"),Fe.querySelectorAll(".ggb_preview img")[1]!==void 0&&(Fe.querySelectorAll(".ggb_preview img")[1].style.maxWidth="initial")):(Fe.style.transform="none",Fe.style.webkitTransform="none")}function ne(Fe,we,ve,Qe,ge,se){var hn=null;if(se!=null&&se!="")for(var Se=Fe.parentNode;Se!=null;)if((" "+Se.className+" ").indexOf(" "+se+" ")>-1){hn=Se;break}else Se=Se.parentNode;var xn=0,Ut=0,et=0,nt=0,ct=0,lt=0,gt=0;if(hn)xn=hn.offsetWidth,Ut=Math.max(Qe?hn.offsetWidth:0,hn.offsetHeight);else{if(window.innerWidth&&document.documentElement.clientWidth?(xn=Math.min(window.innerWidth,document.documentElement.clientWidth),Ut=Math.min(window.innerHeight,document.documentElement.clientHeight),et=xn):(xn=window.innerWidth,Ut=window.innerHeight,et=window.innerWidth),Fe){var yt=Fe.getBoundingClientRect();yt.left>0&&yt.left<=xn&&(ge===void 0||!ge)&&(document.dir==="rtl"?(ct=xn-yt.width-yt.left,lt=et<=480?10:30):(lt=yt.left,ct=et<=480?10:30),nt=lt+ct)}if(Fe&&typeof window.GGBT_wsf_view=="object"&&window.GGBT_wsf_view.isFullscreen()){var Lt=Fe.getBoundingClientRect();window.GGBT_wsf_view.getCloseBtnPosition()==="closePositionRight"?(nt=40,gt=0):window.GGBT_wsf_view.getCloseBtnPosition()==="closePositionTop"&&(nt=0,gt=40)}}return Fe&&((ve===void 0||!ve)&&we>0&&we+nt<xn?xn=we:xn-=nt,typeof window.GGBT_wsf_view=="object"&&window.GGBT_wsf_view.isFullscreen()&&(ve===void 0||!ve)&&(Ut-=gt)),{width:xn,height:Ut}}function bt(Fe,we,ve,Qe,ge){if(Fe.isScreenshoGenerator)return 1;var se=Qe!==void 0&&Qe,hn=Fe.noScaleMargin!=null&&Fe.noScaleMargin,Se=function(Lt){return Lt&&Lt!=="false"},xn=Se(Fe.autoHeight),Ut=ne(we,Fe.width,ve,xn,se&&window.GGBT_wsf_view||hn,ge),et=parseInt(Ut.width),nt=Fe.width,ct=Fe.height;if(nt===void 0){var lt=we.querySelector(".appletParameters");lt&&(nt=lt.offsetWidth,ct=lt.offsetHeight)}var gt=et/nt,yt=se?1:Ut.height/ct;return ve!==void 0&&!ve&&(gt=Math.min(1,gt),yt=Math.min(1,yt)),Math.min(gt,yt)}function Be(Fe,we,ve){var Qe=1,ge,se=!1;if(Fe.hasOwnProperty("allowUpscale")&&(se=Fe.allowUpscale),Fe.hasOwnProperty("scale")&&(Qe=parseFloat(Fe.scale),(isNaN(Qe)||Qe===null||Qe===0)&&(Qe=1),Qe>1&&(se=!0)),we&&typeof window.GGBT_wsf_view=="object"&&window.GGBT_wsf_view.isFullscreen()&&(se=!0),!(Fe.hasOwnProperty("disableAutoScale")&&Fe.disableAutoScale))ge=bt(Fe,we,se,ve,Fe.scaleContainerClass);else return Qe;return se&&(!Fe.hasOwnProperty("scale")||Qe===1)?ge:Math.min(Qe,ge)}function Ee(Fe){var we=Math.min(window.innerWidth,document.documentElement.clientWidth),ve=Math.min(window.innerHeight,document.documentElement.clientHeight),Qe=Fe.getBoundingClientRect(),ge=(we-Qe.width)/2,se=(ve-Qe.height)/2;se<0&&(se=0),Fe.style.position="relative",window.GGBT_wsf_view.getCloseBtnPosition()==="closePositionRight"?(ge<40?Fe.style.left="40px":Fe.style.left=ge+"px",Fe.style.top=se+"px"):window.GGBT_wsf_view.getCloseBtnPosition()==="closePositionTop"&&(se<40?Fe.style.top="40px":Fe.style.top=se+"px",Fe.style.left=ge+"px")}function Ze(Fe,we){var ve=Fe.querySelector(".appletParameters");if(ve){if(typeof window.GGBT_wsf_view=="object"&&window.GGBT_wsf_view.isFullscreen()){if(we.id!==ve.getAttribute("data-param-id"))return;window.GGBT_wsf_view.setCloseBtnPosition(Fe)}if(ve.parentElement&&/fullscreen/.test(ve.parentElement.className))return;var Qe=Be(we,Fe);Cn()&&ve.setAttribute("data-param-scale",Qe);for(var ge=null,se=0;se<Fe.childNodes.length;se++)if(Fe.childNodes[se].className!==void 0&&Fe.childNodes[se].className.match(/^applet_scaler/)){ge=Fe.childNodes[se];break}if(ge!==null&&ge.querySelector(".noscale")!==null)return;var hn=we.id!==void 0?we.id:"ggbApplet",Se=window[hn];(Se==null||!Se.recalculateEnvironments)&&ge!==null&&!ge.className.match(/fullscreen/)&&(ge.parentNode.style.transform="",!isNaN(Qe)&&Qe!==1?(ge.parentNode.style.width=we.width*Qe+"px",ge.parentNode.style.height=we.height*Qe+"px",mi(ge,Qe)):(mi(ge,1),ge.parentNode.style.width=we.width+"px",ge.parentNode.style.height=we.height+"px")),typeof window.GGBT_wsf_view=="object"&&window.GGBT_wsf_view.isFullscreen()&&Ee(Fe),window.GGBT_wsf_view&&!window.GGBT_wsf_view.isFullscreen()&&window.GGBT_wsf_general.adjustContentToResize($(ve).parents(".content-added-content"))}}return{responsiveResize:Ze,isFlexibleWorksheetEditor:Cn,positionCenter:Ee,getScale:Be,scaleElement:mi}}();__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 Cn=n.location.search;return Cn.indexOf(J)!=-1||Cn.indexOf(K)!=-1}function q(Cn,mi){}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(Cn){var mi=s[L].bindings;s[L].bindings=function(){for(var ne=mi?mi():{},bt=Cn[webModule.__softPermutationId],Be=O;Be<bt.length;Be++){var Ee=bt[Be];ne[Ee[O]]=Ee[P]}return ne}};var t;function u(){return v(),t}function v(){if(!t){var Cn=o.createElement(Q);if(Cn.id=L,Cn.style.cssText=R+S,Cn.tabIndex=-1,o.body.appendChild(Cn),t=Cn.contentWindow.document,navigator.userAgent.indexOf(T)==-1){t.open();var mi=document.compatMode==U?V:W;t.write(mi+X),t.close()}}}function w(Cn){function mi(bt){function Be(){return typeof o.readyState==Y?typeof o.body!=Y&&o.body!=null:/loaded|complete/.test(o.readyState)}var Ee=Be();if(Ee){bt();return}function Ze(){if(!Ee){if(!Be())return;Ee=!0,bt(),o.removeEventListener&&o.removeEventListener(Z,Ze,!1),Fe&&clearInterval(Fe)}}o.addEventListener&&o.addEventListener(Z,Ze,!1);var Fe=setInterval(function(){Ze()},$)}function ne(bt){var Be=u(),Ee=Be.body,Ze=Be.createElement(_);Ze.language=ab,Ze.crossOrigin=W,Ze.src=bt,webModule.__errFn&&(Ze.onerror=function(){webModule.__errFn(L,new Error(bb+bt))}),Ee.appendChild(Ze)}mi(function(){ne(Cn)})}webModule.__startLoadingFragment=function(Cn){return C(Cn)},webModule.__installRunAsyncCode=function(Cn){var mi=u(),ne=mi.body,bt=mi.createElement(_);bt.language=ab,bt.text=Cn,ne.appendChild(bt),ne.removeChild(bt)};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(Cn){alert(nb+k+ob)}}else if(j==pb&&(k=i.getAttribute(kb),k))try{e=eval(k)}catch(Cn){alert(nb+k+qb)}}}__gwt_getMetaProperty=function(Cn){var mi=c[Cn];return mi==null?null:mi},r=d,webModule.__errFn=e}function B(){function Cn(Fe){var we=Fe.lastIndexOf(rb);we==-1&&(we=Fe.length);var ve=Fe.indexOf(sb);ve==-1&&(ve=Fe.length);var Qe=Fe.lastIndexOf(tb,Math.min(ve,we));return Qe>=O?Fe.substring(O,Qe+P):W}function mi(Fe){if(!Fe.match(/^\w+:\/\//)){var we=o.createElement(ub);we.src=Fe+vb,Fe=Cn(we.src)}return Fe}function ne(){var Fe=__gwt_getMetaProperty(wb);return Fe!=null?Fe:W}function bt(){for(var Fe=o.getElementsByTagName(_),we=O;we<Fe.length;++we)if(Fe[we].src.indexOf(xb)!=-1)return Cn(Fe[we].src);return W}function Be(){var Fe=o.getElementsByTagName(yb);return Fe.length>O?Fe[Fe.length-P].href:W}function Ee(){var Fe=o.location;return Fe.href==Fe.protocol+zb+Fe.host+Fe.pathname+Fe.search+Fe.hash}var Ze=ne();return Ze==W&&(Ze=bt()),Ze==W&&(Ze=Be()),Ze==W&&Ee()&&(Ze=Cn(o.location.href)),Ze=mi(Ze),Ze}function C(Cn){return Cn.match(/^\//)||Cn.match(/^[a-zA-Z]+:\/\//)?Cn:webModule.__moduleBase+Cn}function D(){var Cn=[],mi=O,ne=[],bt=[];function Be(Fe){var we=bt[Fe](),ve=ne[Fe];if(we in ve)return we;var Qe=[];for(var ge in ve)Qe[ve[ge]]=ge;throw r&&r(Fe,Qe,we),null}if(__gwt_isKnownPropertyValue=function(Fe,we){return we in ne[Fe]},webModule.__getPropMap=function(){var Fe={};for(var we in ne)ne.hasOwnProperty(we)&&(Fe[we]=Be(we));return Fe},webModule.__computePropValue=Be,n.__gwt_activeModules[L].bindings=webModule.__getPropMap,p())return C(Bb);var Ee;try{Ee=Cb;var Ze=Ee.indexOf(Db);Ze!=-1&&(mi=parseInt(Ee.substring(Ze+P),$),Ee=Ee.substring(O,Ze))}catch(Fe){}return webModule.__softPermutationId=mi,C(Ee+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(Cn,mi,ne){"use strict";ne.d(mi,{Ax:function(){return Ze},Ds:function(){return Fe},KI:function(){return ve},SI:function(){return Ee},f1:function(){return Be}});var bt=ne(346);function Be(Qe){let ge=!0;if(Qe.length>0){for(let se=0;se<Qe.length;se++)if(Qe[se].compile_success==0||!Qe[se].compile_success){ge=!1;break}}else ge=!1;return ge}function Ee(Qe,ge=""){let se=[];for(let hn=0;hn<Qe.length;hn++){let Se=Qe[hn],xn=ge?`${ge}/${Se.name}`:`${Se.name}`;se.push({title:Se.name,type:Se.type,isLeaf:Se.type!=="tree",key:xn})}return se}function Ze(Qe,ge,se){for(let hn=0;hn<Qe.length;hn++){let Se=Qe[hn];if(Se.key===ge){Se.children=se;break}Se.children&&Ze(Se.children,ge,se)}return Qe}function Fe(Qe,ge,se){let hn;return function(){let Se=this,xn=arguments,Ut=function(){hn=null,se||Qe.apply(Se,xn)},et=se&&!hn;clearTimeout(hn),hn=setTimeout(Ut,ge),et&&Qe.apply(Se,xn)}}const we=!0,ve=bt.Z.API_SERVER},9507:function(Cn,mi,ne){"use strict";ne.d(mi,{Z:function(){return hn}});var bt=ne(59301),Be={imageDimensions:"imageDimensions___a7crR",img:"img___Kroat",fullWidth:"fullWidth___c492T"},Ee=ne(92310),Ze=ne.n(Ee),Fe=ne(29787),we=ne(2859),ve=ne(38986),Qe=ne(51257),ge=(Se,xn,Ut)=>new Promise((et,nt)=>{var ct=yt=>{try{gt(Ut.next(yt))}catch(Lt){nt(Lt)}},lt=yt=>{try{gt(Ut.throw(yt))}catch(Lt){nt(Lt)}},gt=yt=>yt.done?et(yt.value):Promise.resolve(yt.value).then(ct,lt);gt((Ut=Ut.apply(Se,xn)).next())}),hn=({data:Se,className:xn,fullWidth:Ut,style:et={},onClose:nt,onOk:ct,showFullTools:lt,noAssociationId:gt})=>{const yt=(0,bt.useRef)(null),Lt=(0,bt.useRef)(null),It=(0,bt.useRef)(null),Wt=(0,bt.useRef)(null),[qt,he]=(0,bt.useState)(!1),[fe,Ae]=(0,bt.useState)("\u6B63\u5728\u52A0\u8F7D\u4E2D");(0,bt.useEffect)(()=>(It.current||(It.current=document.createElement("style"),document.head.appendChild(It.current)),Se!=null&&Se.visible?(document.body.setAttribute("data-custom","y-hidden"),It.current.innerHTML=" html { overflow-y: hidden; }",Se!=null&&Se.src&&Ve()):(document.body.removeAttribute("data-custom"),It.current&&(document.head.removeChild(It.current),It.current=null)),()=>{document.body.removeAttribute("data-custom"),It.current&&(document.head.removeChild(It.current),It.current=null)}),[Se==null?void 0:Se.visible]);const Ve=()=>ge(void 0,null,function*(){he(!0),Ae("\u6B63\u5728\u52A0\u8F7D\u4E2D");const Vn=yield(0,Qe.ZJ)(Se==null?void 0:Se.src);yt.current.src="",yt.current.src=Vn,yt.current.onload=function(){pn()},he(!1),Ae("")}),ye=Vn=>ge(void 0,null,function*(){he(!0),Ae("\u6B63\u5728\u4FDD\u5B58\u4E2D");const ti=yield(0,ve.ZP)("/api/attachments.json",{method:"post",body:{file_type:"base64",original_filename:Se.title,file:Vn.dataUrl}});ti!=null&&ti.id&&!gt?(yield(0,ve.ZP)(`/api/attachments/${Se.id}/add_subitem.json`,{method:"post",body:{subitem_id:ti==null?void 0:ti.id,settings:JSON.stringify(Vn.state)}})).status===0&&ct():ti!=null&&ti.id&&ct(ti),he(!1),Ae("")}),on=()=>{const Vn=document.querySelector('a[href="https://markerjs.com/"]');Vn&&Vn.parentNode&&(Vn.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(Xn=>{const Li=document.querySelector(Xn.name);Li&&Li.setAttribute("title",Xn.title)})},pn=()=>{Lt.current=new we.hP(yt.current),Lt.current.targetRoot=Wt.current,Lt.current.addEventListener("render",ye),Lt.current.addEventListener("beforeclose",nt),lt&&(Lt.current.availableMarkerTypes=Lt.current.ALL_MARKER_TYPES,Lt.current.uiStyleSettings.redoButtonVisible=!0,Lt.current.uiStyleSettings.notesButtonVisible=!0,Lt.current.uiStyleSettings.zoomButtonVisible=!0,Lt.current.uiStyleSettings.zoomOutButtonVisible=!0,Lt.current.uiStyleSettings.clearButtonVisible=!0),window.markerArea=Lt.current.uiStyleSettings,Lt.current.show(),Se!=null&&Se.snapshotData&&Lt.current.restoreState(Se.snapshotData),setTimeout(()=>{window.scrollTo(0,0),on()},300)};return bt.createElement(bt.Fragment,null,(Se==null?void 0:Se.visible)&&bt.createElement(Fe.Z,{spinning:qt,tip:fe,style:{position:"absolute",width:"100vw"}},bt.createElement("div",{ref:Wt,className:Ze()(Be.imageDimensions,xn,Ut?Be.fullWidth:""),style:et},bt.createElement("img",{className:Be.img,ref:yt}))))}},76562:function(Cn,mi,ne){"use strict";var bt=ne(59301),Be=ne(77019),Ee=ne(5269),Ze=ne(20554),Fe=ne(99571),we=ne(76902),ve=ne(99587),Qe=ne(48136),ge=ne(59301);const se=(0,bt.forwardRef)(({callback:hn,showSaveButton:Se,value:xn=""},Ut)=>{const et=(0,bt.useRef)(),nt=[{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=Lt=>{et.current.setValue(et.current.getValue()+" "+Lt.value+" ")},gt=[{key:"1",label:"\u5FEB\u6377\u6A21\u677F",children:ge.createElement(Be.Z,{className:ve.Z.lists,gutter:[10,10]},nt.map((Lt,It)=>ge.createElement(Ee.Z,{flex:"110px",className:ve.Z.item},ge.createElement("div",null,ge.createElement(we.Z,{value:`$$${Lt.value}$$`}),Lt.name),ge.createElement("div",{className:ve.Z.children},Lt.children.map((Wt,qt)=>ge.createElement("div",{key:qt},ge.createElement("h1",null,Wt.name),ge.createElement(Be.Z,{gutter:[10,10]},Wt.data.map((he,fe)=>ge.createElement(Ee.Z,{key:fe,onClick:()=>lt(he),className:ve.Z.diamond},ge.createElement(we.Z,{value:"`$$"+he.value+"$$`"}))))))))))},{key:"2",label:"\u516C\u5F0F\u6A21\u677F",children:ge.createElement(Be.Z,{className:ve.Z.lists,gutter:[10,10]},ct.map((Lt,It)=>ge.createElement(Ee.Z,{flex:"110px",className:ve.Z.item},ge.createElement("div",null,ge.createElement(we.Z,{value:"`$$"+Lt.value+"$$`"}),Lt.name),ge.createElement("div",{className:ve.Z.children},Lt.children.map((Wt,qt)=>ge.createElement("div",{key:qt},Wt.name&&ge.createElement("h1",null,Wt.name),ge.createElement(Be.Z,{gutter:[10,10]},Wt.data.map((he,fe)=>ge.createElement(Ee.Z,{key:fe,onClick:()=>lt(he),className:ve.Z.diamond},ge.createElement(we.Z,{value:"`$$"+he.value+"$$`"}))))))))))}],yt=()=>{var Lt=document.createElement("div");Lt.innerHTML=et.current.getValue();var It=Lt.innerText;return hn&&hn(It),It};return(0,bt.useImperativeHandle)(Ut,()=>({getData:yt})),ge.createElement("div",{className:ve.Z.mathWrap},ge.createElement(Ze.default,{defaultActiveKey:"1",items:gt}),ge.createElement("math-field",{locale:"zh_cn",className:ve.Z.mathField,placeholder:"\u8BF7\u6253\u5F00\u952E\u76D8\uFF0C\u8F93\u5165\u516C\u5F0F",ref:et,style:{width:800,marginTop:30,fontSize:18}},xn||""),Se&&ge.createElement("div",{className:ve.Z.button},ge.createElement(Fe.ZP,{size:"large",onClick:yt,style:{zIndex:8,marginTop:10},type:"primary"},"\u4FDD\u5B58\u5230\u7F16\u8F91\u5668")))});mi.Z=se},28426:function(Cn,mi,ne){"use strict";var bt=ne(59301),Be=ne(93314),Ee=ne(99571),Ze=Object.defineProperty,Fe=Object.defineProperties,we=Object.getOwnPropertyDescriptors,ve=Object.getOwnPropertySymbols,Qe=Object.prototype.hasOwnProperty,ge=Object.prototype.propertyIsEnumerable,se=(Ut,et,nt)=>et in Ut?Ze(Ut,et,{enumerable:!0,configurable:!0,writable:!0,value:nt}):Ut[et]=nt,hn=(Ut,et)=>{for(var nt in et||(et={}))Qe.call(et,nt)&&se(Ut,nt,et[nt]);if(ve)for(var nt of ve(et))ge.call(et,nt)&&se(Ut,nt,et[nt]);return Ut},Se=(Ut,et)=>Fe(Ut,we(et));const xn=({img:Ut,buttonProps:et={},styles:nt={},customText:ct,ButtonText:lt,ButtonClick:gt,Buttonclass:yt,ButtonTwo:Lt,imgStyles:It,loading:Wt=!1,className:qt=""})=>bt.createElement("section",{className:`tc animated fadeIn ${qt}`,style:hn({color:"#999",margin:"100px auto",visibility:Wt?"hidden":"visible"},nt)},bt.createElement("img",{src:Ut||Be,style:Se(hn({},It),{pointerEvents:"none",userSelect:"none"})}),bt.createElement("p",{className:"mt20 font14"},ct||"\u6682\u65F6\u8FD8\u6CA1\u6709\u76F8\u5173\u6570\u636E\u54E6!"),lt&&bt.createElement(Ee.ZP,hn({className:yt,onClick:gt},et),lt),Lt&&Lt);mi.Z=xn},45677:function(Cn,mi,ne){"use strict";ne.d(mi,{Z:function(){return yt}});var bt=ne(59301),Be={wrp:"wrp___dq7YK",bgBlack:"bgBlack___ARIUV",monaco:"monaco___VnZC3",darkBlue:"darkBlue___UprA9",close:"close___LKoWu",embed:"embed___hvpEJ"},Ee=ne(99571),Ze=ne(70557),Fe=ne(75975),we=ne(25399),ve=ne(51257),Qe=ne(81722),ge=ne(28426),se=ne(346),hn=ne(44203),Se=ne(59301),xn=Object.defineProperty,Ut=Object.getOwnPropertySymbols,et=Object.prototype.hasOwnProperty,nt=Object.prototype.propertyIsEnumerable,ct=(Lt,It,Wt)=>It in Lt?xn(Lt,It,{enumerable:!0,configurable:!0,writable:!0,value:Wt}):Lt[It]=Wt,lt=(Lt,It)=>{for(var Wt in It||(It={}))et.call(It,Wt)&&ct(Lt,Wt,It[Wt]);if(Ut)for(var Wt of Ut(It))nt.call(It,Wt)&&ct(Lt,Wt,It[Wt]);return Lt},gt=(Lt,It,Wt)=>new Promise((qt,he)=>{var fe=ye=>{try{Ve(Wt.next(ye))}catch(on){he(on)}},Ae=ye=>{try{Ve(Wt.throw(ye))}catch(on){he(on)}},Ve=ye=>ye.done?qt(ye.value):Promise.resolve(ye.value).then(fe,Ae);Ve((Wt=Wt.apply(Lt,It)).next())}),yt=({editOffice:Lt="view",data:It,issaver:Wt,onSaver:qt,theme:he,type:fe,filename:Ae,monacoEditor:Ve,className:ye,style:on,close:pn,onClose:Vn,hasMask:ti,disabledDownload:Xn,onImgDimensions:Li,showNodata:Ii,recordInfo:ue})=>{const[jt,En]=(0,bt.useState)("https://view.officeapps.live.com/op/view.aspx?src=http://testgs.educoder.net//rails/active_storage/blobs/eyJfcmFpbHMiOnsibWVzc2FnZSI6IkJBaHBCZz09IiwiZXhwIjpudWxsLCJwdXIiOiJibG9iX2lkIn19--03541f6234b93d7ac3b2d84e7eb0e6594a952945/1.ppt"),[Si,pi]=(0,bt.useState)(""),[Ke,Pn]=(0,bt.useState)(),qn=window.ENV==="build"?"/react/build":"",xi=location.host.startsWith("localhost")?se.Z.PROXY_SERVER:se.Z.API_SERVER,Ce=10*(1024*1024),Ge=(0,bt.useRef)();It!=null&&It.startsWith("/api")&&fe!=="txt"&&(It=se.Z.API_SERVER+It);const gi=Nt=>Nt.substring(Nt.lastIndexOf("/")+1).split(".").pop();Ae&&Ve&&(Ve.filename=Ae),(0,bt.useEffect)(()=>{var Nt,Kt;const kt=(Kt=(Nt=document.cookie)==null?void 0:Nt.replace(/\s/g,""))==null?void 0:Kt.split(";");kt==null||kt.map(be=>{let An=be.split("=");An[0]==="_educoder_session"&&pi(An[1])})},[]),(0,bt.useEffect)(()=>{fe==="office"&&(It.indexOf("bigfilescdn.")>-1||It.indexOf("bigfiles1")>-1?Pn({url:It,fileType:gi(It),model:It.indexOf("model=edit")?"edit":"view"}):Ht())},[fe,It]);function yi(Nt){return gt(this,null,function*(){Nt.data.type==="pdfdata"&&(qt(Nt.data.data),window.removeEventListener("message",yi,!1)),console.log("mess---:",Nt.data)})}const Ht=()=>gt(void 0,null,function*(){console.log("data:",It);let Nt=It;It.startsWith("http")||(Nt=location.origin+Nt);let Kt=new URL(Nt).pathname.split("/").pop();const kt=yield(0,Qe.gJ)({attachment_id:Kt});kt.url=xi+kt.url,Pn(kt)}),Et=()=>{if(It.startsWith("http")||It.startsWith("blob:")){Ct();return}(0,ve.Sv)(Ae||"educoder",It,Ae)},Ct=()=>{ue&&(0,hn.fc)({id:ue==null?void 0:ue.id,watch_type:1,course_id:ue==null?void 0:ue.course_id}),(0,ve.Nd)(Ae||"educoder",decodeURIComponent(It))};return Se.createElement("div",{style:lt({},on||{}),className:`${ti&&Be.bgBlack} ${fe?Be.wrp:"hide"}`},pn&&Se.createElement("div",{className:Be.close,ref:Ge},!!Li&&Se.createElement(we.Z,{title:"\u70B9\u51FB\u5BF9\u56FE\u7247\u8FDB\u884C\u6279\u6CE8",getPopupContainer:()=>Ge.current},Se.createElement("span",{onClick:()=>{Vn(),Li()}},Se.createElement("i",{className:"icon-yulanpizhu"}))),!Xn&&Se.createElement(we.Z,{title:"\u70B9\u51FB\u4E0B\u8F7D\u6B64\u6587\u4EF6",getPopupContainer:()=>Ge.current},Se.createElement("span",{onClick:Ct},Se.createElement("i",{className:"icon-quxiaozhiding"}))),Wt&&Se.createElement(we.Z,{title:"\u4FDD\u5B58pdf\u5E76\u9000\u51FA",getPopupContainer:()=>Ge.current},Se.createElement("span",{className:"",onClick:()=>{const Nt=document.getElementById("pdfiframe");window.addEventListener("message",yi,!1),setTimeout(()=>{Nt.contentWindow.postMessage("getData","*")},300)}},Se.createElement("i",{className:"icon-baocun"}))),Se.createElement(we.Z,{title:"\u5173\u95ED",getPopupContainer:()=>Ge.current},Se.createElement("span",{className:"",onClick:()=>{Vn()}},Se.createElement("i",{className:"icon-guanbi1"})))),Se.createElement("div",{className:`${Be[ye]} ${ye} ${Be.monaco} ${fe==="txt"?"show":"hide"}`},fe==="txt"&&Se.createElement(Se.Fragment,null,Se.createElement(Fe.ZP,lt({},Ve)))),fe==="audio"&&Se.createElement("audio",{src:`${(It==null?void 0:It.indexOf("http://"))>-1||(It==null?void 0:It.indexOf("https://"))>-1?"":"data:audio/mp3;base64,"}${It}`,autoPlay:!0}),fe==="video"&&Se.createElement(Se.Fragment,null,(It==null?void 0:It.indexOf("http"))>-1?Se.createElement("video",{controls:!0,src:`${It}`,autoPlay:!0}):Se.createElement("video",{controls:!0,src:`data:video/mp4;base64,${It}`,autoPlay:!0})),fe==="office"&&Ke&&Se.createElement("iframe",{src:`${qn}/office.html?key=${Ke.key}&url=${btoa(Ke.url)}&callbackUrl=${xi+(Ke.callbackUrl||"")}&fileType=${Ke.fileType}&title=${Ke.title||""}&model=${Lt}&officeServer=${se.Z.ONLYOFFICE}&disabledDownload=${!!Xn}`}),fe==="html"&&Se.createElement("iframe",{src:It+"&disposition=inline"}),fe==="pdf"&&Se.createElement("iframe",{id:"pdfiframe",src:`${qn}/js/pdfview/index.html?filename=${Ae||"educoder.pdf"}&url=${encodeURIComponent(It)}&disabledDownload=${!!Xn}&model=${Lt}`}),fe==="image"&&Se.createElement("img",{src:`${(It==null?void 0:It.indexOf("http://"))>-1||(It==null?void 0:It.indexOf("https://"))>-1?"":"data:image/png;base64,"}${It}`}),(fe==="other"||fe==="download")&&Se.createElement(Se.Fragment,null,Ii?Se.createElement(ge.Z,{customText:"\u5F53\u524D\u6587\u4EF6\u4E0D\u652F\u6301\u9884\u89C8\uFF0C\u53EF\u70B9\u51FB\u4E0B\u8F7D\u67E5\u770B",ButtonTwo:Se.createElement(Ee.ZP,{icon:Se.createElement("i",{className:"iconfont icon-xiazai4 font14"}),type:"primary",size:"middle",onClick:Et,disabled:Xn},"\u4E0B\u8F7D")}):Se.createElement(Ee.ZP,{type:"primary",size:"middle",onClick:Et,disabled:Xn},Se.createElement(Ze.Z,null),"\u70B9\u51FB\u4E0B\u8F7D")))}},76902:function(Cn,mi,ne){"use strict";ne.d(mi,{z:function(){return he},Z:function(){return fe}});var bt=ne(59301),Be=ne(8944),Ee=ne(81428),Ze=ne(64018),Fe=ne(15360),we=ne(346),ve=ne(51257),Qe=ne(15342),ge=ne(1012),se=ne(45677),hn=ne(59301),xn=({html:Ae})=>{const Ve=(0,bt.useRef)(null),ye=(0,bt.useRef)(null),on=`.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,bt.useEffect)(()=>{const pn=Ve.current.attachShadow({mode:"open"});ye.current=document.createElement("div"),ye.current.className="markdown-body",ye.current.innerHTML=Ae,pn.appendChild(ye.current);const Vn=document.createElement("style");return Vn.textContent=on,pn.appendChild(Vn),()=>{pn.innerHTML=""}},[]),(0,bt.useEffect)(()=>{ye.current&&(ye.current.innerHTML=Ae)},[Ae]),hn.createElement("div",{ref:Ve})};function Ut(Ae){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"],ye=new RegExp(`\\b(${Ve.join("|")})\\s*=\\s*(?:"[^"]*"|'[^']*'|[^\\s>]*)`,"gi");return Ae.replace(ye,"").trim()}var et=Object.defineProperty,nt=Object.getOwnPropertySymbols,ct=Object.prototype.hasOwnProperty,lt=Object.prototype.propertyIsEnumerable,gt=(Ae,Ve,ye)=>Ve in Ae?et(Ae,Ve,{enumerable:!0,configurable:!0,writable:!0,value:ye}):Ae[Ve]=ye,yt=(Ae,Ve)=>{for(var ye in Ve||(Ve={}))ct.call(Ve,ye)&&gt(Ae,ye,Ve[ye]);if(nt)for(var ye of nt(Ve))lt.call(Ve,ye)&&gt(Ae,ye,Ve[ye]);return Ae};const Lt="@\u2581\u2581@",It="@\u2581@",Wt=/<pre[^>]*>/g;function qt(Ae){let Ve=document.createElement("div");return Ve.innerHTML=Ae,Ve.childNodes.length===0?"":Ve.childNodes[0].nodeValue}const he=(Ae,Ve)=>{Ae=Ae||"";const ye=/(?:https?:\/\/[^\/]+)?\/api\/attachments\/([A-Za-z0-9+/=]+)(\?.*?)?\)|(?:https?:\/\/[^\/]+)?\/api\/attachments\/([A-Za-z0-9+/=]+)(\?.*?)?|(?:https?:\/\/[^\/]+)?\/attachments\/download\/([A-Za-z0-9+/=]+)(\?.*?)?\//g,on=/\"(?:https?:\/\/[^\/]+)?\/api\/attachments\/([A-Za-z0-9+/=]+)(\?.*?)?|\"(?:https?:\/\/[^\/]+)?\/attachments\/download\/([A-Za-z0-9+/=]+)(\?.*?)?\//g,pn=/\(\s+(?:https?:\/\/[^\/]+)?\/files\/uploads\/([A-Za-z0-9+/=]+)(\?.*?)?|\"(?:https?:\/\/[^\/]+)?\/files\/uploads\/([A-Za-z0-9+/=]+)(\?.*?)?\//g,Vn=/(?:https?:\/\/[^\/]+)?\/attachments\/download\/([A-Za-z0-9+/=]+)(\?.*?)?\//g;return Ve?Ae.replaceAll("https://www.educoder.net","").replaceAll("https://www-cdn.educoder.net","").replaceAll("//api/attachments","/api/attachments").replace(ye,(ti,Xn,Li,Ii,ue,jt,En)=>{const Si=Xn||Ii||jt,pi=Li||ue||En||"?";return we.Z.API_SERVER+"/api/attachments/"+Si+pi+"&t="+(0,ve.Jn)(Si,Date.now())+(ti.indexOf(")")>-1?")":"&")}).replaceAll('src="(','src="').replaceAll("src='(",'src="'):(Ae=Ae.replace(Vn,(ti,Xn,Li,Ii,ue,jt,En)=>{const Si=Xn||Ii||jt,pi=Li||ue||En||"?";return we.Z.API_SERVER+"/attachments/download/"+Si+pi+"&t="+(0,ve.Jn)(Si,Date.now())+(ti.indexOf(")")>-1?")":"&")}).replace(ye,(ti,Xn,Li,Ii,ue,jt,En)=>{const Si=Xn||Ii||jt,pi=Li||ue||En||"?";return we.Z.API_SERVER+"/api/attachments/"+Si+pi+"&t="+(0,ve.Jn)(Si,Date.now())+(ti.indexOf(")")>-1?")":"&")}).replace(on,(ti,Xn,Li,Ii,ue)=>{const jt=Xn||Ii,En=Li||ue||"";return'"'+we.Z.API_SERVER+"/api/attachments/"+jt+En+jt+En+"&t="+(0,ve.Jn)(jt,Date.now())}).replace(pn,(ti,Xn,Li,Ii,ue)=>{const jt=Xn||Ii,En=Li||ue||"";return"("+we.Z.API_SERVER+"/files/uploads/"+jt+En+jt+En+"&t="+(0,ve.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,`
`),Ae)};var fe=({value:Ae="",className:Ve,showTextOnly:ye,showLines:on,style:pn={},stylesPrev:Vn={},highlightKeywords:ti,showProgramFill:Xn,isProgramFill:Li,disabledFill:Ii=!1,programFillValue:ue,onFillChange:jt=pi=>{},onFillBlur:En=()=>{},onFillFocus:Si=()=>{}})=>{let pi=Ut(String(Ae||""));const[Ke,Pn]=(0,bt.useState)(""),[qn,xi]=(0,bt.useState)("office"),[kn,Ce]=(0,bt.useState)([]),Ge=(0,bt.useRef)("a"+(0,ge.Z)()),gi={},yi=Oe=>/<style[\s\S]*?>/i.test(Oe||""),Ht=(Oe,mn,cn)=>{const Mn=document.createElement(Oe===It?"input":"textarea");Mn.style.width="100%",Mn.style.height=Oe===It?"40px":"151px",Mn.rows=5,Mn.spellcheck=!1,Mn.name="edu-program-fill",Mn.placeholder="\u8BF7\u8F93\u5165",Mn.dataset.id=mn;const zn=Object.keys(gi).length;return gi[zn]=Mn,`<span class="edu-program-fill-wrap ${Oe===It?"":"show"}" style="width:${Oe===It?"400px":"100%"}" title=${cn||""}><span>${Mn.outerHTML}<span class="edu-program-fill-score" style="margin:0 6px"></span></span></span>`};function Et(Oe){return Oe=Oe.replace(/!\[.*?\]\(.*?\)/g,""),Oe=Oe.replace(/\[.*?\]\(.*?\)/g,""),Oe=Oe.replace(new RegExp("<iframe.*?<\\/iframe>","gs"),""),Oe=Oe.replace(/<embed.*?>/g,""),Oe=Oe.replace(/<img.*?>/g,""),Oe=Oe.replace(new RegExp("<video.*?>.*?<\\/video>","gs"),""),Oe=Oe.replace(new RegExp("<audio.*?>.*?<\\/audio>","gs"),""),Oe=Oe.replace(new RegExp("<style.*?>.*?<\\/style>","gs"),""),Oe=Oe.replace(new RegExp("<script.*?>.*?<\\/script>","gs"),""),Oe}const Ct=Oe=>!ye&&yi(pi)?Oe:Oe.replace(/<style.*?>([\s\S]+?)<\/style>/gim,function(mn,cn){let Mn=cn.replace(/(\n|\r)/g,"").split("}"),zn=[];return Mn.map(dn=>{dn!=""&&zn.push(`.${Ge.current} ${dn}`)}),`<style>${zn.join("}")}</style>`}),Nt=(0,bt.useMemo)(()=>{try{const Mn=/\(\s+\/api\/attachments\/|\(\/api\/attachments\//g,zn=/\"\/api\/attachments\/|\"\/attachments\/download\//g,dn=/\(\s+\/files\/uploads\/|\"\/files\/uploads\//g,oi=/\(\/attachments\/download\//g;pi=pi.replace(oi,"("+we.Z.API_SERVER+"/attachments/download/").replace(Mn,"("+we.Z.API_SERVER+"/api/attachments/").replace(zn,'"'+we.Z.API_SERVER+"/api/attachments/").replace(dn,'"'+we.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(Mn){}if(Xn){let Mn=-1;return pi=pi.replaceAll("<","&lt;").replaceAll(">","&gt;").replace(/(@▁▁@|@▁@)/g,function(zn,dn,oi){var Ai;return++Mn,Ht(zn,Mn,(Ai=ue==null?void 0:ue[Mn])==null?void 0:Ai.value.replaceAll("<","&lt;").replaceAll(">","&gt;"))}),`<pre style="background:#fff;padding:4px">${Ct(pi||"")}</pre>`}let Oe=Ct(pi);Oe=(0,Ee.ZP)(Oe);const mn=(0,Ee.ez)();pi.match(/\[TOC\]/)&&(Oe=Oe.replace("<p>[TOC]</p>",(0,Ee.Qv)()),(0,Ee.Iy)()),Oe=Oe.replace(/(__special_katext_id_\d+__)/g,(Mn,zn)=>{const{type:dn,expression:oi}=mn[zn];return(0,Qe.renderToString)(qt(oi)||"",{displayMode:dn==="block",throwOnError:!1,output:"html"})}),Oe=Oe.replace(/▁/g,"\u2581\u2581\u2581\u2581\u2581"),(0,Ee.AL)();const cn=document.createElement("div");if(cn.innerHTML=Oe,ye)return cn.innerText;if(ti){const Mn=ti.replace(/[.*+?^${}()|[\]\\]/g,"\\$&");return An(cn,Mn),cn.innerHTML}return setTimeout(()=>rn(),500),cn.innerHTML},[pi,ti]);(0,bt.useEffect)(()=>{ze.current&&ze.current.querySelectorAll(["input","textarea"]).forEach(mn=>{mn.oninput=Kt,mn.onblur=kt,mn.onfocus=be})},[kn]),(0,bt.useEffect)(()=>{var Oe,mn,cn,Mn,zn;if(ue!=null&&ue.length)try{const dn=ze.current.querySelectorAll(".edu-program-fill-score"),oi=ze.current.querySelectorAll('[name="edu-program-fill"]');for(const[Ai,Zi]of oi.entries())Zi.value=((Oe=ue==null?void 0:ue[Ai])==null?void 0:Oe.value)||"",((mn=ue==null?void 0:ue[Ai])==null?void 0:mn.type)==="warning"?Zi.className="program-fill-warning":((cn=ue==null?void 0:ue[Ai])==null?void 0:cn.type)==="success"?Zi.className="program-fill-success":Zi.className="";for(const[Ai,Zi]of dn.entries())Zi.innerHTML=(Mn=ue==null?void 0:ue[Ai])!=null&&Mn.score?`${(zn=ue==null?void 0:ue[Ai])==null?void 0:zn.score}\u5206`:"";Ce(ue)}catch(dn){console.log(dn,"error")}},[ue]);const Kt=Oe=>{kn[Oe.target.dataset.id]=kn[Oe.target.dataset.id]||{},kn[Oe.target.dataset.id].value=Oe.target.value,Ce([...kn]),jt(kn,Oe.target.dataset.id)},kt=Oe=>{kn[Oe.target.dataset.id]=kn[Oe.target.dataset.id]||{},kn[Oe.target.dataset.id].value=Oe.target.value,Ce([...kn]),En(kn,Oe.target.dataset.id)},be=Oe=>{kn[Oe.target.dataset.id]=kn[Oe.target.dataset.id]||{},kn[Oe.target.dataset.id].value=Oe.target.value,Ce([...kn]),Si(kn,Oe.target.dataset.id)};function An(Oe,mn){return Oe.childNodes.forEach(cn=>{var Mn;if(cn.childNodes.length>0)An(cn,mn);else if(cn.nodeName!=="IMG")if(cn.innerHTML)cn.innerHTML=(Mn=cn.innerHTML)==null?void 0:Mn.replace(new RegExp(mn,"gi"),'<span style="color:#0152d9;background-color:#1890ff33">$&</span>');else{const zn=document.createElement("span");zn.innerHTML=cn.textContent.replace(new RegExp(mn,"gi"),'<span style="color:#0152d9;background-color:#1890ff33">$&</span>'),cn.replaceWith(zn)}})}const ze=(0,bt.useRef)();Ee.jb.WebkitLineClamp=on,on&&(pn=yt(yt({},pn),Ee.jb));function Je(Oe){let mn=Oe.target;if(mn.tagName.toUpperCase()==="A"){let cn=mn.getAttribute("href");if(cn.indexOf("office")>-1)Oe.preventDefault(),Pn(cn),xi("office");else if(cn.indexOf("application/pdf")>-1)Oe.preventDefault(),Pn(cn),xi("pdf");else if(cn.indexOf("text/html")>-1)Oe.preventDefault(),Pn(cn),xi("html");else if(cn.startsWith("#")){Oe.preventDefault();let Mn=document.getElementById(cn.replace("#",""));Mn&&Mn.scrollIntoView(!0)}}}const rn=()=>{var Oe;const mn=(Oe=ze.current)==null?void 0:Oe.querySelectorAll("video");mn==null||mn.forEach(cn=>{if(cn.oncontextmenu=()=>!1,cn.src.indexOf(".m3u8")>-1&&!cn.canPlayType("application/vnd.apple.mpegurl")){if(Fe.ZP.isSupported()){var Mn=new Fe.ZP;Mn.loadSource(cn.src),Mn.attachMedia(cn)}}})};return(0,bt.useEffect)(()=>{if(ze.current&&Nt&&Nt.match(Wt)&&window.PR.prettyPrint(),ze.current)return ze.current.addEventListener("click",Je),()=>{var Oe;(Oe=ze.current)==null||Oe.removeEventListener("click",Je),(0,Ee.AL)(),(0,Ee.Iy)()}},[Nt,ze.current,Je]),(0,bt.useEffect)(()=>{var Oe;const mn=cn=>{cn.preventDefault(),cn.clipboardData.setData("text",window.getSelection().toString())};return(Oe=ze.current)==null||Oe.addEventListener("copy",mn),()=>{var cn;(cn=ze.current)==null||cn.removeEventListener("copy",mn)}},[ze.current]),bt.createElement(bt.Fragment,null,ye&&bt.createElement("div",{ref:ze},Nt),!ye&&!yi(Nt)&&bt.createElement("div",{ref:ze,style:yt({},pn),className:`${Ve||""} ${Ii?"disabled-fill":""} markdown-body ${Ge.current}`,dangerouslySetInnerHTML:{__html:Nt}}),!ye&&yi(Nt)&&bt.createElement(xn,{html:Nt}),bt.createElement(se.Z,{close:!0,data:Ke,type:Ke!=null&&Ke.length?qn:"",style:yt({},Vn),onClose:()=>Pn("")}))}},69720:function(Cn,mi,ne){"use strict";ne.d(mi,{h:function(){return Lt}});var bt=ne(59301),Be=ne(82326),Ee=ne(28284),Ze=ne(99571),Fe=ne(89780),we=ne.n(Fe),ve=ne(8336),Qe=ne(12469),ge=Object.defineProperty,se=Object.defineProperties,hn=Object.getOwnPropertyDescriptors,Se=Object.getOwnPropertySymbols,xn=Object.prototype.hasOwnProperty,Ut=Object.prototype.propertyIsEnumerable,et=(It,Wt,qt)=>Wt in It?ge(It,Wt,{enumerable:!0,configurable:!0,writable:!0,value:qt}):It[Wt]=qt,nt=(It,Wt)=>{for(var qt in Wt||(Wt={}))xn.call(Wt,qt)&&et(It,qt,Wt[qt]);if(Se)for(var qt of Se(Wt))Ut.call(Wt,qt)&&et(It,qt,Wt[qt]);return It},ct=(It,Wt)=>se(It,hn(Wt));const lt=Be.default.Option,gt={labelCol:{span:4},wrapperCol:{span:20}},yt={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"]};mi.Z=({callback:It,onCancel:Wt})=>{const[qt,he]=(0,bt.useState)("python");function fe(Ve){he(yt[Ve][1])}function Ae(Ve){It(Ve)}return bt.createElement(Ee.default,ct(nt({},gt),{className:"code-block-panel",initialValues:{language:"python",content:""},onFinish:Ae,style:{width:500}}),bt.createElement(Ee.default.Item,{label:"\u4EE3\u7801\u8BED\u8A00",name:"language"},bt.createElement(Be.default,{getPopupContainer:Ve=>Ve.parentNode,onChange:fe},Object.keys(yt).map(Ve=>bt.createElement(lt,{key:Ve,value:Ve},yt[Ve][0])))),bt.createElement(Ee.default.Item,{label:"\u4EE3\u7801\u5185\u5BB9",name:"content",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u4EE3\u7801\u5185\u5BB9"}]},bt.createElement(Lt,{mode:qt})),bt.createElement("div",{className:"flex-container flex-end"},bt.createElement(Ze.ZP,{type:"primary",htmlType:"submit",style:{marginRight:10}},"\u786E\u5B9A"),bt.createElement(Ze.ZP,{type:"ghost",onClick:Wt},"\u53D6\u6D88")))};function Lt({value:It,onChange:Wt,mode:qt,options:he={}}){const fe=(0,bt.useRef)(),[Ae,Ve]=(0,bt.useState)();return(0,bt.useEffect)(()=>{if(Ae){let ye=function(on){const pn=on.getValue();Wt&&Wt(pn)};return Ae.on("change",ye),()=>{Ae.off("change",ye)}}},[Ae,Wt]),(0,bt.useEffect)(()=>{Ae&&Ae.setOption("mode",qt)},[Ae,qt]),(0,bt.useEffect)(()=>{Ae&&(It!==Ae.getValue()||It==="")&&setTimeout(()=>{Ae.setValue(It||"")},300)},[Ae,It]),(0,bt.useEffect)(()=>{if(fe.current&&!Ae){const ye=we().fromTextArea(fe.current,nt({mode:qt,lineNumbers:!0,lineWrapping:!0,autoCloseBrackets:!0,tabSize:4,autofocus:!0,autoCloseTags:!0,matchBrackets:!0,styleActiveLine:!0},he));Ve(ye)}},[fe.current,Ae]),bt.createElement("div",{className:"my-codemirror-container"},bt.createElement("textarea",{ref:fe}))}},39793:function(Cn,mi,ne){"use strict";ne.d(mi,{Z:function(){return Tr}});var bt=ne(59301),Be=ne(89780),Ee=ne.n(Be),Ze=ne(76374),Fe=ne(8336),we=ne(6313),ve=ne(25717),Qe=ne(99498),ge=ne(25419),se=ne(67549),hn=ne(76902),Se=({value:Ue="",className:Ie,showTextOnly:Le,showLines:We,style:wi={}})=>{const hi=(0,bt.useMemo)(()=>"",[Ue]);return bt.createElement(bt.Fragment,null,bt.createElement("div",{dangerouslySetInnerHTML:{__html:hi}}))},xn=Object.defineProperty,Ut=Object.defineProperties,et=Object.getOwnPropertyDescriptors,nt=Object.getOwnPropertySymbols,ct=Object.prototype.hasOwnProperty,lt=Object.prototype.propertyIsEnumerable,gt=(Ue,Ie,Le)=>Ie in Ue?xn(Ue,Ie,{enumerable:!0,configurable:!0,writable:!0,value:Le}):Ue[Ie]=Le,yt=(Ue,Ie)=>{for(var Le in Ie||(Ie={}))ct.call(Ie,Le)&&gt(Ue,Le,Ie[Le]);if(nt)for(var Le of nt(Ie))lt.call(Ie,Le)&&gt(Ue,Le,Ie[Le]);return Ue},Lt=(Ue,Ie)=>Ut(Ue,et(Ie));let It=[{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\u516C\u5F0F",icon:"iconfont icon-shuxuetuxiang2",actionName:"maths-latex"},{title:"\u591A\u884C\u516C\u5F0F",icon:"md-iconfont icon-formula",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 Wt({onActionCallback:Ue,title:Ie,icon:Le,actionName:We,className:wi="",children:hi}){function Yi(){Ue(We)}return bt.createElement("a",{title:Ie,className:wi,onClick:Yi},bt.createElement("i",{className:`${Le}`}),hi)}var qt=({watch:Ue,showNullButton:Ie,showNullProgramButton:Le,onActionCallback:We,fullScreen:wi,insertTemp:hi,hidetoolBar:Yi,extraUse:sn})=>{const He=[...It,{title:`${Ue?"\u5173\u95ED\u5B9E\u65F6\u9884\u89C8":"\u5F00\u542F\u5B9E\u65F6\u9884\u89C8"}`,icon:`${Ue?"md-iconfont icon-eye-slash":"md-iconfont icon-eye"}`,actionName:"trigger-watch"}];return bt.createElement("ul",{className:"markdown-toolbar-container"},!Yi&&He.map((li,_i)=>bt.createElement("li",{key:_i},li.actionName?bt.createElement(Wt,Lt(yt({},li),{onActionCallback:We})):bt.createElement("span",{className:"v-line"}))),Ie?bt.createElement("li",null,bt.createElement(Wt,{icon:"md-iconfont icon-edit insert-blank",className:"btn-null",title:"\u589E\u52A0\u586B\u7A7A",actionName:"add-null-ch",onActionCallback:We},bt.createElement("span",{className:"fill-tip"},"\u70B9\u51FB\u63D2\u5165\b\u586B\u7A7A\u9879"))):null,Le?bt.createElement(bt.Fragment,null,bt.createElement("li",null,bt.createElement(Wt,{icon:"md-iconfont icon-edit insert-blank",className:"btn-null",title:"\u589E\u52A0\u586B\u7A7A",actionName:"add-signal",onActionCallback:We},bt.createElement("span",{className:"fill-tip"},"\u6DFB\u52A0\u5355\u884C\u586B\u7A7A\u9879"))),bt.createElement("li",null,bt.createElement(Wt,{icon:"md-iconfont icon-uniE900 insert-blank",className:"btn-null",title:"\u589E\u52A0\u586B\u7A7A",actionName:"add-multiple",onActionCallback:We},bt.createElement("span",{className:"fill-tip"},"\u6DFB\u52A0\u591A\u884C\u586B\u7A7A\u9879")))):null,hi&&bt.createElement("li",null,bt.createElement(Wt,{icon:"md-iconfont icon-edit",className:"btn-null",title:"\u63D2\u5165\u6A21\u677F",actionName:`inster-template-${hi}`,onActionCallback:We},bt.createElement("span",{className:"fill-tip"},"\u63D2\u5165\u6A21\u677F"))),sn&&bt.createElement("li",null,sn),bt.createElement("li",{className:"btn-full-screen"},bt.createElement(Wt,{icon:`${wi?"md-iconfont icon-shrink":"md-iconfont icon-enlarge"}`,title:wi?"\u5173\u95ED\u5168\u5C4F":"\u5F00\u542F\u5168\u5C4F",actionName:"trigger-full-screen",onActionCallback:We})))},he=ne(91558),fe=ne(28284),Ae=ne(37568),Ve=ne(99571),ye=Object.defineProperty,on=Object.defineProperties,pn=Object.getOwnPropertyDescriptors,Vn=Object.getOwnPropertySymbols,ti=Object.prototype.hasOwnProperty,Xn=Object.prototype.propertyIsEnumerable,Li=(Ue,Ie,Le)=>Ie in Ue?ye(Ue,Ie,{enumerable:!0,configurable:!0,writable:!0,value:Le}):Ue[Ie]=Le,Ii=(Ue,Ie)=>{for(var Le in Ie||(Ie={}))ti.call(Ie,Le)&&Li(Ue,Le,Ie[Le]);if(Vn)for(var Le of Vn(Ie))Xn.call(Ie,Le)&&Li(Ue,Le,Ie[Le]);return Ue},ue=(Ue,Ie)=>on(Ue,pn(Ie));const jt={labelCol:{span:4},wrapperCol:{span:20}};var En=({callback:Ue,onCancel:Ie})=>{function Le(We){Ue(We)}return bt.createElement(fe.default,ue(Ii({},jt),{initialValues:{link:"http://",title:""},className:"link-panel",onFinish:Le,style:{width:500}}),bt.createElement(fe.default.Item,{label:"\u94FE\u63A5\u5730\u5740",name:"link",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u94FE\u63A5\u5730\u5740"}]},bt.createElement(Ae.default,null)),bt.createElement(fe.default.Item,{label:"\u94FE\u63A5\u6807\u9898",name:"title",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u94FE\u63A5\u6807\u9898"}]},bt.createElement(Ae.default,null)),bt.createElement("div",{className:"flex-container flex-end"},bt.createElement(Ve.ZP,{type:"primary",htmlType:"submit",style:{marginRight:10}},"\u786E\u5B9A"),bt.createElement(Ve.ZP,{type:"ghost",onClick:Ie},"\u53D6\u6D88")))},Si=ne(69720),pi=ne(17077),Ke=ne(62957),Pn=ne(77019),qn=ne(9507),xi=ne(59301),kn=({callback:Ue,onCancel:Ie})=>{const Le=document.createElement("canvas"),We=Le.getContext("2d");Le.width=1e3,Le.height=800,We.fillStyle="#ffffff",We.fillRect(0,0,Le.width,Le.height);const wi=Le.toDataURL("image/png");return xi.createElement(Ke.default,{open:!0,width:"100vw",style:{height:"100vh",top:0},footer:null,title:null,closable:!1},xi.createElement(Pn.Z,{style:{height:"100vh"}},xi.createElement(qn.Z,{fullWidth:!0,noAssociationId:!0,showFullTools:!0,data:{src:wi,visible:!0,title:String(Date.now())},onOk:hi=>{Ue({src:hi.url})},onClose:Ie})))},Ce=ne(12378);function Ge(){go.CommandHandler.call(this),this._arrowKeyBehavior="move",this._pasteOffset=new go.Point(10,10),this._lastPasteOffset=new go.Point(0,0)}go.Diagram.inherit(Ge,go.CommandHandler),Ge.prototype.canAlignSelection=function(){var Ue=this.diagram;return!(Ue===null||Ue.isReadOnly||Ue.isModelReadOnly||Ue.selection.count<2)},Ge.prototype.alignLeft=function(){var Ue=this.diagram;Ue.startTransaction("aligning left");var Ie=1/0;Ue.selection.each(function(Le){Le instanceof go.Link||(Ie=Math.min(Le.position.x,Ie))}),Ue.selection.each(function(Le){Le instanceof go.Link||Le.move(new go.Point(Ie,Le.position.y))}),Ue.commitTransaction("aligning left")},Ge.prototype.alignRight=function(){var Ue=this.diagram;Ue.startTransaction("aligning right");var Ie=-1/0;Ue.selection.each(function(Le){if(!(Le instanceof go.Link)){var We=Le.actualBounds.x+Le.actualBounds.width;Ie=Math.max(We,Ie)}}),Ue.selection.each(function(Le){Le instanceof go.Link||Le.move(new go.Point(Ie-Le.actualBounds.width,Le.position.y))}),Ue.commitTransaction("aligning right")},Ge.prototype.alignTop=function(){var Ue=this.diagram;Ue.startTransaction("alignTop");var Ie=1/0;Ue.selection.each(function(Le){Le instanceof go.Link||(Ie=Math.min(Le.position.y,Ie))}),Ue.selection.each(function(Le){Le instanceof go.Link||Le.move(new go.Point(Le.position.x,Ie))}),Ue.commitTransaction("alignTop")},Ge.prototype.alignBottom=function(){var Ue=this.diagram;Ue.startTransaction("aligning bottom");var Ie=-1/0;Ue.selection.each(function(Le){if(!(Le instanceof go.Link)){var We=Le.actualBounds.y+Le.actualBounds.height;Ie=Math.max(We,Ie)}}),Ue.selection.each(function(Le){Le instanceof go.Link||Le.move(new go.Point(Le.actualBounds.x,Ie-Le.actualBounds.height))}),Ue.commitTransaction("aligning bottom")},Ge.prototype.alignCenterX=function(){var Ue=this.diagram,Ie=Ue.selection.first();if(Ie){Ue.startTransaction("aligning Center X");var Le=Ie.actualBounds.x+Ie.actualBounds.width/2;Ue.selection.each(function(We){We instanceof go.Link||We.move(new go.Point(Le-We.actualBounds.width/2,We.actualBounds.y))}),Ue.commitTransaction("aligning Center X")}},Ge.prototype.alignCenterY=function(){var Ue=this.diagram,Ie=Ue.selection.first();if(Ie){Ue.startTransaction("aligning Center Y");var Le=Ie.actualBounds.y+Ie.actualBounds.height/2;Ue.selection.each(function(We){We instanceof go.Link||We.move(new go.Point(We.actualBounds.x,Le-We.actualBounds.height/2))}),Ue.commitTransaction("aligning Center Y")}},Ge.prototype.alignColumn=function(Ue){var Ie=this.diagram;Ie.startTransaction("align Column"),Ue===void 0&&(Ue=0),Ue=parseFloat(Ue);var Le=new Array;Ie.selection.each(function(sn){sn instanceof go.Link||Le.push(sn)});for(var We=0;We<Le.length-1;We++){var wi=Le[We],hi=wi.actualBounds.y+wi.actualBounds.height+Ue,Yi=Le[We+1];Yi.move(new go.Point(wi.actualBounds.x,hi))}Ie.commitTransaction("align Column")},Ge.prototype.alignRow=function(Ue){Ue===void 0&&(Ue=0),Ue=parseFloat(Ue);var Ie=this.diagram;Ie.startTransaction("align Row");var Le=new Array;Ie.selection.each(function(sn){sn instanceof go.Link||Le.push(sn)});for(var We=0;We<Le.length-1;We++){var wi=Le[We],hi=wi.actualBounds.x+wi.actualBounds.width+Ue,Yi=Le[We+1];Yi.move(new go.Point(hi,wi.actualBounds.y))}Ie.commitTransaction("align Row")},Ge.prototype.canRotate=function(Ue){var Ie=this.diagram;return!(Ie===null||Ie.isReadOnly||Ie.isModelReadOnly||Ie.selection.count<1)},Ge.prototype.rotate=function(Ue){Ue===void 0&&(Ue=90);var Ie=this.diagram;Ie.startTransaction("rotate "+Ue.toString());var Ie=this.diagram;Ie.selection.each(function(Le){Le instanceof go.Link||Le instanceof go.Group||(Le.angle+=Ue)}),Ie.commitTransaction("rotate "+Ue.toString())},Ge.prototype.pullToFront=function(){var Ue=this.diagram;Ue.startTransaction("pullToFront");var Ie=new go.Map;Ue.selection.each(function(Le){Ie.set(Le.layer,0)}),Ie.iteratorKeys.each(function(Le){var We=0;Le.parts.each(function(wi){if(!wi.isSelected){var hi=wi.zOrder;isNaN(hi)?wi.zOrder=0:We=Math.max(We,hi)}}),Ie.set(Le,We)}),Ue.selection.each(function(Le){Ge._assignZOrder(Le,Ie.get(Le.layer)+1)}),Ue.commitTransaction("pullToFront")},Ge.prototype.pushToBack=function(){var Ue=this.diagram;Ue.startTransaction("pushToBack");var Ie=new go.Map;Ue.selection.each(function(Le){Ie.set(Le.layer,0)}),Ie.iteratorKeys.each(function(Le){var We=0;Le.parts.each(function(wi){if(!wi.isSelected){var hi=wi.zOrder;isNaN(hi)?wi.zOrder=0:We=Math.min(We,hi)}}),Ie.set(Le,We)}),Ue.selection.each(function(Le){Ge._assignZOrder(Le,Ie.get(Le.layer)-1-Ge._findGroupDepth(Le))}),Ue.commitTransaction("pushToBack")},Ge._assignZOrder=function(Ue,Ie,Le){Le===void 0&&(Le=Ue),Ue.layer===Le.layer&&(Ue.zOrder=Ie),Ue instanceof go.Group&&Ue.memberParts.each(function(We){Ge._assignZOrder(We,Ie+1,Le)})},Ge._findGroupDepth=function(Ue){if(Ue instanceof go.Group){var Ie=0;return Ue.memberParts.each(function(Le){Ie=Math.max(Ie,Ge._findGroupDepth(Le))}),Ie+1}else return 0},Ge.prototype.doKeyDown=function(){var Ue=this.diagram;if(Ue!==null){var Ie=Ue.lastInput;if(Ie.key==="Up"||Ie.key==="Down"||Ie.key==="Left"||Ie.key==="Right"){var Le=this.arrowKeyBehavior;if(Le==="none")return;if(Le==="select"){this._arrowKeySelect();return}else if(Le==="move"){this._arrowKeyMove();return}else if(Le==="tree"){this._arrowKeyTree();return}}go.CommandHandler.prototype.doKeyDown.call(this)}},Ge.prototype._getAllParts=function(){var Ue=new Array;return this.diagram.nodes.each(function(Ie){Ue.push(Ie)}),this.diagram.parts.each(function(Ie){Ue.push(Ie)}),Ue},Ge.prototype._arrowKeyMove=function(){var Ue=this.diagram,Ie=Ue.lastInput,Le=0,We=0;if(Ie.control||Ie.meta)Le=1,We=1;else if(Ue.grid!==null){var wi=Ue.grid.gridCellSize;We=wi.width,Le=wi.height}Ue.startTransaction("arrowKeyMove"),Ue.selection.each(function(hi){Ie.key==="Up"?hi.move(new go.Point(hi.actualBounds.x,hi.actualBounds.y-Le)):Ie.key==="Down"?hi.move(new go.Point(hi.actualBounds.x,hi.actualBounds.y+Le)):Ie.key==="Left"?hi.move(new go.Point(hi.actualBounds.x-We,hi.actualBounds.y)):Ie.key==="Right"&&hi.move(new go.Point(hi.actualBounds.x+We,hi.actualBounds.y))}),Ue.commitTransaction("arrowKeyMove")},Ge.prototype._arrowKeySelect=function(){var Ue=this.diagram,Ie=Ue.lastInput,Le=null;Ie.key==="Up"?Le=this._findNearestPartTowards(270):Ie.key==="Down"?Le=this._findNearestPartTowards(90):Ie.key==="Left"?Le=this._findNearestPartTowards(180):Ie.key==="Right"&&(Le=this._findNearestPartTowards(0)),Le!==null&&(Ie.shift?Le.isSelected=!0:Ie.control||Ie.meta?Le.isSelected=!Le.isSelected:Ue.select(Le))},Ge.prototype._findNearestPartTowards=function(Ue){var Ie=this.diagram.selection.first();if(Ie===null)return null;for(var Le=Ie.actualBounds.center,We=this._getAllParts(),wi=1/0,hi=Ie,Yi=0;Yi<We.length;Yi++){var sn=We[Yi];if(sn!==Ie&&sn.canSelect()){var He=sn.actualBounds.center,li=Le.directionPoint(He),_i=this._angleCloseness(li,Ue);if(_i<=45){var un=Le.distanceSquaredPoint(He);un*=1+Math.sin(_i*Math.PI/180),un<wi&&(wi=un,hi=sn)}}}return hi},Ge.prototype._angleCloseness=function(Ue,Ie){return Math.min(Math.abs(Ie-Ue),Math.min(Math.abs(Ie+360-Ue),Math.abs(Ie-360-Ue)))},Ge.prototype._arrowKeyTree=function(){var Ue=this.diagram,Ie=Ue.selection.first();if(Ie instanceof go.Node){var Le=Ue.lastInput;if(Le.key==="Right"){if(!Ie.isTreeLeaf)if(!Ie.isTreeExpanded)Ue.commandHandler.canExpandTree(Ie)&&Ue.commandHandler.expandTree(Ie);else{var We=this._sortTreeChildrenByY(Ie).first();We!==null&&Ue.select(We)}}else if(Le.key==="Left")if(!Ie.isTreeLeaf&&Ie.isTreeExpanded)Ue.commandHandler.canCollapseTree(Ie)&&Ue.commandHandler.collapseTree(Ie);else{var wi=Ie.findTreeParentNode();wi!==null&&Ue.select(wi)}else if(Le.key==="Up"){var wi=Ie.findTreeParentNode();if(wi!==null){var hi=this._sortTreeChildrenByY(wi),Yi=hi.indexOf(Ie);if(Yi>0){for(var sn=hi.elt(Yi-1);sn!==null&&sn.isTreeExpanded&&!sn.isTreeLeaf;){var He=this._sortTreeChildrenByY(sn);sn=He.last()}sn!==null&&Ue.select(sn)}else Ue.select(wi)}}else if(Le.key==="Down")if(Ie.isTreeExpanded&&!Ie.isTreeLeaf){var We=this._sortTreeChildrenByY(Ie).first();We!==null&&Ue.select(We)}else for(;Ie!==null;){var wi=Ie.findTreeParentNode();if(wi===null)break;var hi=this._sortTreeChildrenByY(wi),Yi=hi.indexOf(Ie);if(Yi<hi.length-1){Ue.select(hi.elt(Yi+1));break}else Ie=wi}var li=Ue.selection.first();li!==null&&Ue.scrollToRect(li.actualBounds)}},Ge.prototype._sortTreeChildrenByY=function(Ue){var Ie=new go.List().addAll(Ue.findTreeChildrenNodes());return Ie.sort(function(Le,We){var wi=Le.location,hi=We.location;return wi.y<hi.y?-1:wi.y>hi.y?1:wi.x<hi.x?-1:wi.x>hi.x?1:0}),Ie},Ge.prototype.copyToClipboard=function(Ue){go.CommandHandler.prototype.copyToClipboard.call(this,Ue),this._lastPasteOffset.set(this.pasteOffset)},Ge.prototype.pasteFromClipboard=function(){var Ue=go.CommandHandler.prototype.pasteFromClipboard.call(this);return this.diagram.moveParts(Ue,this._lastPasteOffset),this._lastPasteOffset.add(this.pasteOffset),Ue},Object.defineProperty(Ge.prototype,"arrowKeyBehavior",{get:function(){return this._arrowKeyBehavior},set:function(Ue){if(Ue!=="move"&&Ue!=="select"&&Ue!=="scroll"&&Ue!=="tree"&&Ue!=="none")throw new Error('DrawCommandHandler.arrowKeyBehavior must be either "move", "select", "scroll", "tree", or "none", not: '+Ue);this._arrowKeyBehavior=Ue}}),Object.defineProperty(Ge.prototype,"pasteOffset",{get:function(){return this._pasteOffset},set:function(Ue){if(!(Ue instanceof go.Point))throw new Error("DrawCommandHandler.pasteOffset must be a Point, not: "+Ue);this._pasteOffset.set(Ue)}});var gi=Ge,yi=ne(63720),Ht=ne(5269),Et=ne(38986),Ct={myPaletteDiv:"myPaletteDiv___Xjz2I",flowChartWrp:"flowChartWrp____f45r",maxH60:"maxH60___Pd4Re"},Nt=ne(48790),Kt=ne(59301),kt=(Ue,Ie,Le)=>new Promise((We,wi)=>{var hi=He=>{try{sn(Le.next(He))}catch(li){wi(li)}},Yi=He=>{try{sn(Le.throw(He))}catch(li){wi(li)}},sn=He=>He.done?We(He.value):Promise.resolve(He.value).then(hi,Yi);sn((Le=Le.apply(Ue,Ie)).next())});function be({onCancel:Ue,callback:Ie}){let Le=(0,bt.useRef)(),We=(0,bt.useRef)(),wi=(0,bt.useRef)(),hi=(0,bt.useRef)(!1);const Yi=(0,bt.useRef)(!1),[sn,He]=(0,bt.useState)(0);function li(){const un=Ce.bx.make,Yt={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"};Le.current=new Ce.S0(We.current,{padding:20,grid:un(Ce.s_,"Grid",un(Ce.bn,"LineH",{stroke:"lightgray",strokeWidth:.5}),un(Ce.bn,"LineV",{stroke:"lightgray",strokeWidth:.5})),"draggingTool.isGridSnapEnabled":!0,handlesDragDropForTopLevelParts:!0,mouseDrop:xe=>{var Jn=xe.diagram.commandHandler.addTopLevelParts(xe.diagram.selection,!0);Jn||xe.diagram.currentTool.doCancel()},commandHandler:un(gi),"clickCreatingTool.archetypeNodeData":{text:"\u672A\u547D\u540D",fill:null,stroke:null,borderColor:"rgba(0,0,0,0)"},PartCreated:xe=>{var Jn=xe.subject;Jn.location=Jn.location.copy().snapToGridPoint(xe.diagram.grid.gridOrigin,xe.diagram.grid.gridCellSize),setTimeout(()=>{xe.diagram.commandHandler.editTextBlock()},20)},"commandHandler.archetypeGroupData":{isGroup:!0,text:"NEW GROUP"},SelectionGrouped:xe=>{var Jn=xe.subject;setTimeout(()=>{xe.diagram.commandHandler.editTextBlock()})},LinkRelinked:xe=>{var Jn=xe.parameter.part;Jn.invalidateConnectedLinks();var Pi=xe.subject;xe.diagram.toolManager.linkingTool.isForwards?Pi.toNode.invalidateConnectedLinks():Pi.fromNode.invalidateConnectedLinks()},"undoManager.isEnabled":!0}),Le.current.nodeTemplate=un(Ce.NB,"Auto",{locationSpot:Ce.z6.Center,locationObjectName:"SHAPE",desiredSize:new Ce.$u(120,60),minSize:new Ce.$u(40,40),resizable:!0,resizeCellSize:new Ce.$u(10,10),rotatable:!0},new Ce.KX("location","loc",Ce.E9.parse).makeTwoWay(Ce.E9.stringify),new Ce.KX("desiredSize","size",Ce.$u.parse).makeTwoWay(Ce.$u.stringify),un(Ce.bn,{name:"SHAPE",fill:Yt.white,cursor:"pointer",portId:"",fromLinkable:!0,toLinkable:!0,fromLinkableDuplicates:!0,toLinkableDuplicates:!0,fromSpot:Ce.z6.AllSides,toSpot:Ce.z6.AllSides},new Ce.KX("figure"),new Ce.KX("fill"),new Ce.KX("stroke","borderColor"),new Ce.KX("strokeWidth","thickness"),new Ce.KX("strokeDashArray","dash")),un(Ce.bn,{width:100,height:20,strokeWidth:0,fill:"transparent"}),un(Ce.al,{margin:1,textAlign:"center",overflow:Ce.al.OverflowEllipsis,editable:!0},new Ce.KX("text").makeTwoWay(),new Ce.KX("stroke","color"))),Le.current.nodeTemplate.toolTip=un("ToolTip",un(Ce.s_,"Vertical",{maxSize:new Ce.$u(200,NaN)},un(Ce.al,{font:"bold 10pt sans-serif",textAlign:"center"},new Ce.KX("text")),un(Ce.al,{font:"10pt sans-serif",textAlign:"center"},new Ce.KX("text","details"))));function de(xe,Jn){var Pi=(Hn,ur)=>{Hn.handled=!0,Hn.diagram.model.commit(ji=>{var or=ur.part.adornedPart,cr=new Ce.E9().setRectSpot(or.actualBounds,xe);cr.subtract(or.location),cr.scale(2,2),cr.x+=Math.sign(cr.x)*130,cr.y+=Math.sign(cr.y)*130,cr.add(or.location),cr.snapToGridPoint(Hn.diagram.grid.gridOrigin,Hn.diagram.grid.gridCellSize);var Jt=ji.copyNodeData(or.data);ji.setGroupKeyForNodeData(Jt,ji.getGroupKeyForNodeData(or.data)),ji.addNodeData(Jt);var $t={from:or.key,to:ji.getKeyForNodeData(Jt)};ji.addLinkData($t);var Vt=Hn.diagram.findNodeForData(Jt);Vt.location=cr,Hn.diagram.select(Vt),setTimeout(()=>{Hn.diagram.commandHandler.editTextBlock()},20)})};return un(Ce.bn,{figure:Jn,alignment:xe,alignmentFocus:xe.opposite(),width:xe.equals(Ce.z6.Top)||xe.equals(Ce.z6.Bottom)?25:18,height:xe.equals(Ce.z6.Top)||xe.equals(Ce.z6.Bottom)?18:25,fill:"orange",stroke:Yt.white,strokeWidth:4,mouseEnter:(Hn,ur)=>ur.fill="dodgerblue",mouseLeave:(Hn,ur)=>ur.fill="orange",isActionable:!0,click:Pi,contextClick:Pi})}function Sn(xe){return un(Ce.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:(Jn,Pi)=>Pi.fill="dodgerblue",mouseLeave:(Jn,Pi)=>Pi.fill="orange",click:(Jn,Pi)=>{Jn.diagram.commandHandler.showContextMenu(Pi.part.adornedPart)}},xe||{})}Le.current.nodeTemplate.selectionAdornmentTemplate=un(Ce.uz,"Spot",un(Ce.Vm,{padding:10}),de(Ce.z6.Top,"TriangleUp"),de(Ce.z6.Left,"TriangleLeft"),de(Ce.z6.Right,"TriangleRight"),de(Ce.z6.Bottom,"TriangleDown"),Sn({alignment:new Ce.z6(.75,0)}));function wn(xe,Jn){return(Pi,Hn)=>{Pi.handled=!0,Pi.diagram.model.commit(ur=>{ur.set(Hn.part.adornedPart.data,xe,Jn)})}}function Ne(xe,Jn){return Jn||(Jn="color"),un(Ce.bn,{width:16,height:16,stroke:"lightgray",fill:xe,margin:1,background:"transparent",mouseEnter:(Pi,Hn)=>Hn.stroke="dodgerblue",mouseLeave:(Pi,Hn)=>Hn.stroke="lightgray",click:wn(Jn,xe),contextClick:wn(Jn,xe)})}function Bn(){return[un("ContextMenuButton",un(Ce.s_,"Horizontal",Ne(Yt.white,"fill"),Ne(Yt.beige,"fill"),Ne(Yt.extralightblue,"fill"),Ne(Yt.extralightred,"fill"))),un("ContextMenuButton",un(Ce.s_,"Horizontal",Ne(Yt.lightgray,"fill"),Ne(Yt.lightgreen,"fill"),Ne(Yt.lightblue,"fill"),Ne(Yt.lightred,"fill")))]}function Ln(){return[un("ContextMenuButton",un(Ce.s_,"Horizontal",Ne(Yt.black),Ne(Yt.green),Ne(Yt.blue),Ne(Yt.red))),un("ContextMenuButton",un(Ce.s_,"Horizontal",Ne(Yt.white),Ne(Yt.magenta),Ne(Yt.purple),Ne(Yt.orange)))]}function bn(xe,Jn){return Jn||(Jn="thickness"),un(Ce.bn,"LineH",{width:16,height:16,strokeWidth:xe,margin:1,background:"transparent",mouseEnter:(Pi,Hn)=>Hn.background="dodgerblue",mouseLeave:(Pi,Hn)=>Hn.background="transparent",click:wn(Jn,xe),contextClick:wn(Jn,xe)})}function ci(xe,Jn){return Jn||(Jn="dash"),un(Ce.bn,"LineH",{width:24,height:16,strokeWidth:2,strokeDashArray:xe,margin:1,background:"transparent",mouseEnter:(Pi,Hn)=>Hn.background="dodgerblue",mouseLeave:(Pi,Hn)=>Hn.background="transparent",click:wn(Jn,xe),contextClick:wn(Jn,xe)})}function Qn(){return[un("ContextMenuButton",un(Ce.s_,"Horizontal",bn(1),bn(2),bn(3),bn(4))),un("ContextMenuButton",un(Ce.s_,"Horizontal",ci(null),ci([2,4]),ci([4,4])))]}function Dn(xe,Jn){return Jn||(Jn="figure"),un(Ce.bn,{width:32,height:32,scale:.5,fill:"lightgray",figure:xe,margin:1,background:"transparent",mouseEnter:(Pi,Hn)=>Hn.fill="dodgerblue",mouseLeave:(Pi,Hn)=>Hn.fill="lightgray",click:wn(Jn,xe),contextClick:wn(Jn,xe)})}Le.current.nodeTemplate.contextMenu=un("ContextMenu",un("ContextMenuButton",un(Ce.s_,"Horizontal",Dn("Rectangle"),Dn("RoundedRectangle"),Dn("Ellipse"),Dn("Diamond"))),un("ContextMenuButton",un(Ce.s_,"Horizontal",Dn("Parallelogram2"),Dn("ManualOperation"),Dn("Procedure"),Dn("Cylinder1"))),un("ContextMenuButton",un(Ce.s_,"Horizontal",Dn("Terminator"),Dn("CreateRequest"),Dn("Document"),Dn("TriangleDown"))),Bn(),Ln(),Qn()),Le.current.groupTemplate=un(Ce.ZA,"Spot",{layerName:"Background",ungroupable:!0,locationSpot:Ce.z6.Center,selectionObjectName:"BODY",computesBoundsAfterDrag:!0,handlesDragDropForMembers:!0,mouseDrop:(xe,Jn)=>{var Pi=Jn.addMembers(Jn.diagram.selection,!0);Pi||Jn.diagram.currentTool.doCancel()},avoidable:!1},new Ce.KX("location","loc",Ce.E9.parse).makeTwoWay(Ce.E9.stringify),un(Ce.s_,"Auto",{name:"BODY"},un(Ce.bn,{parameter1:10,fill:Yt.white,strokeWidth:2,cursor:"pointer",fromLinkable:!0,toLinkable:!0,fromLinkableDuplicates:!0,toLinkableDuplicates:!0,fromSpot:Ce.z6.AllSides,toSpot:Ce.z6.AllSides},new Ce.KX("fill"),new Ce.KX("stroke","color"),new Ce.KX("strokeWidth","thickness"),new Ce.KX("strokeDashArray","dash")),un(Ce.Vm,{background:"transparent",margin:20})),un(Ce.al,{alignment:Ce.z6.Top,alignmentFocus:Ce.z6.Bottom,font:"bold 12pt sans-serif",editable:!0},new Ce.KX("text"),new Ce.KX("stroke","color"))),Le.current.groupTemplate.selectionAdornmentTemplate=un(Ce.uz,"Spot",un(Ce.s_,"Auto",un(Ce.bn,{fill:null,stroke:"dodgerblue",strokeWidth:3}),un(Ce.Vm,{margin:1.5})),Sn({alignment:Ce.z6.TopRight,alignmentFocus:Ce.z6.BottomRight})),Le.current.groupTemplate.contextMenu=un("ContextMenu",Bn(),Ln(),Qn()),Le.current.linkTemplate=un(Ce.rU,{layerName:"Foreground",routing:Ce.rU.AvoidsNodes,corner:10,fromShortLength:10,toShortLength:15,relinkableFrom:!0,relinkableTo:!0,reshapable:!0,resegmentable:!0},new Ce.KX("fromSpot","fromSpot",Ce.z6.parse),new Ce.KX("toSpot","toSpot",Ce.z6.parse),new Ce.KX("fromShortLength","dir",xe=>xe>=1?10:0),new Ce.KX("toShortLength","dir",xe=>xe>=1?10:0),new Ce.KX("points").makeTwoWay(),un(Ce.bn,{strokeWidth:2},new Ce.KX("stroke","color"),new Ce.KX("strokeWidth","thickness"),new Ce.KX("strokeDashArray","dash")),un(Ce.bn,{segmentIndex:0,segmentOffset:new Ce.E9(15,0),segmentOrientation:Ce.rU.OrientAlong,alignmentFocus:Ce.z6.Right,figure:"circle",width:10,strokeWidth:0},new Ce.KX("fill","color"),new Ce.KX("visible","dir",xe=>xe===1)),un(Ce.bn,{segmentIndex:-1,segmentOffset:new Ce.E9(-10,6),segmentOrientation:Ce.rU.OrientPlus90,alignmentFocus:Ce.z6.Right,figure:"triangle",width:12,height:12,strokeWidth:0},new Ce.KX("fill","color"),new Ce.KX("visible","dir",xe=>xe>=1),new Ce.KX("width","thickness",xe=>7+3*xe),new Ce.KX("height","thickness",xe=>7+3*xe),new Ce.KX("segmentOffset","thickness",xe=>new Ce.E9(-15,4+1.5*xe))),un(Ce.bn,{segmentIndex:0,segmentOffset:new Ce.E9(15,-6),segmentOrientation:Ce.rU.OrientMinus90,alignmentFocus:Ce.z6.Right,figure:"triangle",width:12,height:12,strokeWidth:0},new Ce.KX("fill","color"),new Ce.KX("visible","dir",xe=>xe===2),new Ce.KX("width","thickness",xe=>7+3*xe),new Ce.KX("height","thickness",xe=>7+3*xe),new Ce.KX("segmentOffset","thickness",xe=>new Ce.E9(-15,4+1.5*xe))),un(Ce.al,{alignmentFocus:new Ce.z6(0,1,-4,0),editable:!0},new Ce.KX("text").makeTwoWay(),new Ce.KX("stroke","color"))),Le.current.linkTemplate.selectionAdornmentTemplate=un(Ce.uz,un(Ce.bn,{isPanelMain:!0,stroke:"transparent",strokeWidth:6,pathPattern:Zn(2)},new Ce.KX("pathPattern","thickness",Zn)),Sn({alignmentFocus:new Ce.z6(0,0,-6,-4)}));function Zn(xe){return un(Ce.bn,{stroke:"dodgerblue",strokeWidth:2,strokeCap:"square",geometryString:"M0 0 M4 2 H3 M4 "+(xe+4).toString()+" H3"})}function rr(xe){var Jn="M0 0 M8 16 M0 8 L16 8 M12 11 L16 8 L12 5";return xe===0?Jn="M0 0 M16 16 M0 8 L16 8":xe===2&&(Jn="M0 0 M16 16 M0 8 L16 8 M12 11 L16 8 L12 5 M4 11 L0 8 L4 5"),un(Ce.bn,{geometryString:Jn,margin:2,background:"transparent",mouseEnter:(Pi,Hn)=>Hn.background="dodgerblue",mouseLeave:(Pi,Hn)=>Hn.background="transparent",click:wn("dir",xe),contextClick:wn("dir",xe)})}function Gi(xe){var Jn=(Pi,Hn)=>{Pi.handled=!0,Pi.diagram.model.commit(ur=>{var ji=Hn.part.adornedPart;ur.set(ji.data,xe?"toSpot":"fromSpot",Ce.z6.stringify(Ce.z6.AllSides)),(xe?ji.toNode:ji.fromNode).invalidateConnectedLinks()})};return un(Ce.bn,{width:12,height:12,fill:"transparent",mouseEnter:(Pi,Hn)=>Hn.background="dodgerblue",mouseLeave:(Pi,Hn)=>Hn.background="transparent",click:Jn,contextClick:Jn})}function an(xe,Jn){var Pi=0,Hn=Ce.z6.RightSide;xe.equals(Ce.z6.Top)?(Pi=270,Hn=Ce.z6.TopSide):xe.equals(Ce.z6.Left)?(Pi=180,Hn=Ce.z6.LeftSide):xe.equals(Ce.z6.Bottom)&&(Pi=90,Hn=Ce.z6.BottomSide),Jn||(Pi-=180);var ur=(ji,or)=>{ji.handled=!0,ji.diagram.model.commit(cr=>{var Jt=or.part.adornedPart;cr.set(Jt.data,Jn?"toSpot":"fromSpot",Ce.z6.stringify(Hn)),(Jn?Jt.toNode:Jt.fromNode).invalidateConnectedLinks()})};return un(Ce.bn,{alignment:xe,alignmentFocus:xe.opposite(),geometryString:"M0 0 M12 12 M12 6 L1 6 L4 4 M1 6 L4 8",angle:Pi,background:"transparent",mouseEnter:(ji,or)=>or.background="dodgerblue",mouseLeave:(ji,or)=>or.background="transparent",click:ur,contextClick:ur})}Le.current.linkTemplate.contextMenu=un("ContextMenu",Ln(),Qn(),un("ContextMenuButton",un(Ce.s_,"Horizontal",rr(0),rr(1),rr(2))),un("ContextMenuButton",un(Ce.s_,"Horizontal",un(Ce.s_,"Spot",Gi(!1),an(Ce.z6.Top,!1),an(Ce.z6.Left,!1),an(Ce.z6.Right,!1),an(Ce.z6.Bottom,!1)),un(Ce.s_,"Spot",{margin:new Ce.Zt(0,0,0,2)},Gi(!0),an(Ce.z6.Top,!0),an(Ce.z6.Left,!0),an(Ce.z6.Right,!0),an(Ce.z6.Bottom,!0)))));const Nn=`{ "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 hr=["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 Cr(xe){return console.log("shapeName:",xe),hr.indexOf(xe)>=0}var Yr=new Ce.YI(wi.current,{maxSelectionCount:1,linkTemplate:un(Ce.rU,{locationSpot:Ce.z6.Center,selectionAdornmentTemplate:un(Ce.uz,"Link",{locationSpot:Ce.z6.Center},un(Ce.bn,{isPanelMain:!0,fill:null,stroke:"deepskyblue",strokeWidth:0}),un(Ce.bn,{toArrow:"Standard",stroke:null}))},{routing:Ce.rU.AvoidsNodes,curve:Ce.rU.JumpOver,corner:5,toShortLength:4},new Ce.KX("points"),un(Ce.bn,{isPanelMain:!0,strokeWidth:2}),un(Ce.bn,{toArrow:"Standard",stroke:null})),model:new Ce.FJ([{text:"\u672A\u547D\u540D",size:"100 100",fill:null,stroke:"#000"},...Ce.bn.getFigureGenerators().toArray().map(xe=>({text:"\u672A\u547D\u540D",size:"100 100",figure:xe.key,fill:"white",stroke:"#666",borderColor:"#000"}))])});return Le.current.addDiagramListener("TextEdited",function(xe){var Jn;const Pi=xe.subject.part;var Hn=(Jn=document.activeElement)==null?void 0:Jn.value;typeof Hn=="string"&&Hn.trim()===""&&Le.current.model.commit(function(ur){ur.set(Pi.data,"text","\u672A\u547D\u540D"),Le.current.commandHandler.stopCommand()},"increment")}),Yr.nodeTemplate=un(Ce.NB,"Auto",{locationSpot:Ce.z6.Center},new Ce.KX("location","location",Ce.E9.parse).makeTwoWay(Ce.E9.stringify),un(Ce.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 Ce.KX("stroke").makeTwoWay(),new Ce.KX("fill").makeTwoWay(),new Ce.KX("figure")),un(Ce.al,{margin:new Ce.Zt(5,5,3,5),font:"10pt sans-serif",minSize:new Ce.$u(16,16),maxSize:new Ce.$u(10,NaN),textAlign:"center",editable:!0},new Ce.KX("key").makeTwoWay())),setTimeout(()=>{Le.current.grid=un(Ce.s_,"Grid",un(Ce.bn,"LineH",{stroke:"lightgray",strokeWidth:.5}),un(Ce.bn,"LineV",{stroke:"lightgray",strokeWidth:.5})),Le.current.grid.visible=!0,Le.current.grid.gridCellStroke="darkgray",Le.current.grid.gridCellStrokeWidth=1},300),window.myDiagrams=Le.current,Le.current}const _i=()=>kt(this,null,function*(){var un,Yt=Le.current.makeImage();const de=yield(0,Et.ZP)("/api/attachments.json",{method:"post",body:{file_type:"base64",original_filename:Date.now(),file:Yt.src,file_data:JSON.stringify({login:(un=(0,Nt.eY)())==null?void 0:un.login,data:JSON.parse(Le.current.model.toJson())})}});Ie({src:de.url})});return(0,bt.useEffect)(()=>(setTimeout(()=>{li()},500),He(sn+1),()=>{Le.current=null}),[]),Kt.createElement("div",{ref:Yi,className:"body-overflow-initial"},Kt.createElement(Ke.default,{width:1200,icon:null,footer:null,closable:!0,visible:!!sn,destroyOnClose:!0,maskClosable:!1,rootClassName:"zIndex-9999",title:Kt.createElement(Pn.Z,null,Kt.createElement(Ht.Z,{flex:1},"\u63D2\u5165\u6D41\u7A0B\u56FE"),Kt.createElement(Ht.Z,{onClick:()=>{var un,Yt,de=Le.current.selection.first();if(hi.current=!hi.current,document.activeElement&&de){let Sn=(Yt=(un=document.activeElement)==null?void 0:un.value)==null?void 0:Yt.trim();typeof Sn=="string"&&Le.current.model.commit(function(wn){wn.set(de.data,"text",Sn||"\u672A\u547D\u540D"),Le.current.commandHandler.stopCommand()},"increment")}He(sn+1)}},Kt.createElement("span",{className:"current c-blue mr30",style:{fontWeight:400}},"\u5C55\u5F00/\u6536\u8D77"))),onCancel:Ue},Kt.createElement("div",{style:{width:"100%",height:"80vh",overflow:"hidden",position:"relative",display:hi.current?"none":"block"},className:Ct.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:Ct.myPaletteDiv,ref:wi})),Kt.createElement("div",{style:{flex:1,position:"relative"}},Kt.createElement("div",{ref:We,style:{height:"80vh"}}))),Kt.createElement("div",{className:"tr"},Kt.createElement(Ve.ZP,{size:"large",onClick:_i,style:{position:"absolute",right:0,bottom:0,zIndex:8},type:"primary"},"\u4FDD\u5B58\u5230\u7F16\u8F91\u5668")))))}var An=be,ze=ne(47889),Je=ne(71051);const rn=ze.ZP.Group,Oe={margin:"0 8px"};var mn=({callback:Ue,onCancel:Ie})=>{function Le(We){Ue(We)}return bt.createElement(fe.default,{className:"add-table-panel",initialValues:{row:3,col:2,align:"default"},onFinish:Le},bt.createElement("div",{className:"flex-container",style:{alignItems:"baseline"}},bt.createElement("span",{style:Oe},"\u5355\u5143\u683C\u6570\uFF1A"),bt.createElement("span",{style:Oe},"\u884C\u6570"),bt.createElement(fe.default.Item,{name:"row",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u884C\u6570"}]},bt.createElement(Je.Z,null)),bt.createElement("span",{style:Oe},"\u5217\u6570"),bt.createElement(fe.default.Item,{name:"col",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u5217\u6570"}]},bt.createElement(Je.Z,null))),bt.createElement("div",{className:"flex-container",style:{marginTop:12,alignItems:"baseline"}},bt.createElement("span",{style:Oe},"\u5BF9\u9F50\u65B9\u5F0F\uFF1A"),bt.createElement(fe.default.Item,{name:"align"},bt.createElement(rn,null,bt.createElement(ze.ZP,{value:"default"},bt.createElement("i",{className:"fa fa-align-justify"})),bt.createElement(ze.ZP,{value:"left"},bt.createElement("i",{className:"fa fa-align-left"})),bt.createElement(ze.ZP,{value:"center"},bt.createElement("i",{className:"fa fa-align-center"})),bt.createElement(ze.ZP,{value:"right"},bt.createElement("i",{className:"fa fa-align-right"}))))),bt.createElement("div",{className:"flex-container flex-end"},bt.createElement(Ve.ZP,{type:"primary",htmlType:"submit",style:{marginRight:10}},"\u786E\u5B9A"),bt.createElement(Ve.ZP,{type:"ghost",onClick:Ie},"\u53D6\u6D88")))},cn=ne(71411),Mn=ne(43001),zn=ne.n(Mn),oi=(0,bt.forwardRef)(({use3d:Ue,width:Ie,height:Le,callback:We,showSaveButton:wi},hi)=>{const Yi=(0,bt.useRef)(),sn=(0,bt.useRef)(),[He,li]=(0,bt.useState)(!1),_i=(0,bt.useRef)({id:Yi,appName:"graphing",width:Ie||1e3,height:Le||600,showToolBar:!0,showMenuBar:!0,allowStyleBar:!0,showAlgebraInput:!0,enableLabelDrags:!1,enableShiftDragZoom:!0,showToolBarHelp:!1,errorDialogsActive:!0,showTutorialLink:!0,showLogging:!0,useBrowserForJS:!1});(0,bt.useEffect)(()=>{sn.current=new(zn())(_i.current,!0),window.onload=function(){sn.current.inject("applet_container")}},[]);const un=()=>{var Yt=window.ggbApplet.getPNGBase64(1,!0,72);return We&&We(Yt),Yt};return(0,bt.useEffect)(()=>{_i.current.appName=He?"3D":"graphing",sn.current.inject("applet_container")},[He]),(0,bt.useEffect)(()=>{li(Ue)},[Ue]),(0,bt.useImperativeHandle)(hi,()=>({getImgData:un})),bt.createElement(bt.Fragment,null,bt.createElement("div",{style:{width:"100%",height:"100%"},id:"applet_container",ref:Yi}),bt.createElement(Pn.Z,{align:"middle"},bt.createElement(Ht.Z,{flex:1},bt.createElement(cn.Z,{size:"default",checkedChildren:"\u5173\u95ED3D\u56FE\u50CF",unCheckedChildren:"\u5F00\u542F3D\u56FE\u50CF",checked:He,onChange:Yt=>li(Yt)})),bt.createElement(Ht.Z,null,bt.createElement(Ve.ZP,{size:"large",onClick:un,style:{zIndex:8,marginTop:10},type:"primary"},"\u4FDD\u5B58\u5230\u7F16\u8F91\u5668"))))}),Ai=ne(76562),Zi=ne(6767);const tr="link",ro="upload-image",ar="add-flowchart",pr="draw-image",wr="add-flowchart",mo="code-block",Eo="add-table",Hr="------------",Ur={default:Hr,left:`:${Hr}`,center:`:${Hr}:`,right:`${Hr}:`};var no=ne(37808);function _o(){}let bo=0;const Mo=1e4,oo="\u2581",Er="@\u2581\u2581@",Rr="@\u2581@",Pt=`
**\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`,er=["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 Gr(Ue){return/^\d+$/.test(Ue)?`${Ue}px`:Ue}const ui=navigator.platform.toUpperCase().indexOf("MAC")>=0?"Cmd":"Ctrl",Ci={[ui+"-B"]:"bold",[ui+"-I"]:"italic"},Ri={[tr]:"\u6DFB\u52A0\u94FE\u63A5",[mo]:"\u6DFB\u52A0\u4EE3\u7801\u5757",[ro]:"\u6DFB\u52A0\u56FE\u7247",[pr]:"\u6DFB\u52A0\u753B\u56FE",[ar]:"\u63D2\u5165\u6D41\u7A0B\u56FE",[Eo]:"\u6DFB\u52A0\u8868\u683C","maths-latex":"\u6570\u5B66\u56FE\u50CF","inline-latex":"LATEX\u516C\u5F0F"};var Tr=({defaultValue:Ue="",onChange:Ie,width:Le="100%",height:We=400,miniToolbar:wi=!1,isFocus:hi=!1,watch:Yi,insertTemp:sn,mode:He="markdown",id:li="markdown-editor-id",showResizeBar:_i=!1,noStorage:un=!1,showNullButton:Yt=!1,showNullProgramButton:de=!1,hidetoolBar:Sn=!1,fullScreen:wn=!1,onBlur:Ne,onCMBeforeChange:Bn,onFullScreen:Ln,className:bn="",disablePaste:ci=!1,disabled:Qn=!1,disabledFill:Dn=!1,placeholder:Zn="",values:rr="",extraUse:Gi})=>{const[an,Nn]=(0,bt.useState)(null),[hr,Cr]=(0,bt.useState)(Ue),[Yr,xe]=(0,bt.useState)(Yi),[Jn,Pi]=(0,bt.useState)(wn),[Hn,ur]=(0,bt.useState)(""),[ji,or]=(0,bt.useState)(0),[cr,Jt]=(0,bt.useState)(We),[$t,Vt]=(0,bt.useState)(!1),[Te,le]=(0,bt.useState)(0),[nn,_n]=(0,bt.useState)(0),On=(0,bt.useRef)(),vi=(0,bt.useRef)(),Gn=(0,bt.useRef)(),fn=(0,bt.useRef)();(0,bt.useEffect)(()=>{const $n=window.scrollY||window.pageYOffset;Cr(rr),an==null||an.setValue(rr),window.scrollTo(0,$n)},[rr]),(0,bt.useEffect)(()=>{Ln==null||Ln(Jn)},[Jn]),(0,bt.useEffect)(()=>{if(On.current){let $n=function(fi,Xe){var nr;if(ci){Xe.preventDefault();return}const mr=Xe.clipboardData;if(mr){const Or=mr.types.toString(),ir=mr.items;if(Or==="Files"||mr.types.indexOf("Files")>-1){if(Xe.preventDefault(),He=="stex")return;try{let jr=ir[1];((nr=ir[0])==null?void 0:nr.kind)==="file"&&(jr=ir[0]);const Vr=jr.getAsFile(),Ho=Vr.name.split(".").pop();(0,pi.I)(Vr,so=>{var To,uo,Me;so.id?((To=Vr==null?void 0:Vr.type)==null?void 0:To.indexOf("image"))>-1?Tn.replaceSelection(`<img width="100%" src="/api/attachments/${so.id}?type=${so.content_type})" alt="" />`):((uo=Vr==null?void 0:Vr.type)==null?void 0:uo.indexOf("video"))>-1?Tn.replaceSelection(`<video width="100%" controls src="/api/attachments/${so.id}"></video>`):((Me=Vr==null?void 0:Vr.type)==null?void 0:Me.indexOf("pdf"))>-1?Tn.replaceSelection(`<a href="/api/attachments/${so.id}?type=${Vr.type}&disposition=inline" target="_blank">${Vr.name}</a>`):er.includes(Ho)?Tn.replaceSelection(`<a href="/api/attachments/${so.id}?type=office&disposition=inline" target="_blank">${Vr.name}</a>`):Tn.replaceSelection(`[${Vr.name}](/api/attachments/${so.id}?type=${so.content_type})`):(so==null?void 0:so.status)===401&&(document.location.href="/user/login")})}catch(jr){Zi.ZP.warning("\u8BF7\u4F7F\u7528chrome\u6D4F\u89C8\u5668\u7C98\u8D34")}return!0}else return!0}return!0};const Tn=Ee().fromTextArea(On.current,{mode:He,lineNumbers:!wi,lineWrapping:!0,value:Ue,autoCloseTags:!0,autoCloseBrackets:!0});return Tn.on("keyup",function(fi,Xe){Xe.keyCode===8&&(fi.getValue()==""?Tn.setOption("placeholder",Zn):Tn.setOption("placeholder",null))}),Tn.on("keydown",function(fi,Xe){if(Xe.keyCode===8){var nr=Vi(fi);nr&&Xe.preventDefault()}}),hi&&Tn.focus(),Tn.on("paste",$n),Qn&&Tn.on("beforeChange",function(fi,Xe){(Xe.origin==="paste"||Xe.origin==="+input")&&Xe.cancel()}),Nn(Tn),()=>{Tn.off("paste",$n)}}},[]);const Wn=(0,bt.useCallback)(()=>{if(vi.current)try{}catch($n){console.log($n,"---- to set md editor body height")}},[cr,vi,Jn]);(0,bt.useEffect)(()=>{function $n(){let Tn=new Ze.Z(fi=>{for(let Xe of fi)(Xe.target.offsetHeight>0||Xe.target.offsetWidth>0)&&(Wn(),an.setSize("100%","100%"),an.refresh())});return Tn.observe(On.current.parentElement),Tn}if(an){const Tn=$n();return()=>{var fi,Xe;(fi=On.current)!=null&&fi.parentElement&&Tn.unobserve((Xe=On.current)==null?void 0:Xe.parentElement)}}},[an,Wn]),(0,bt.useEffect)(()=>{if(an){let $n=[];for(const[Tn,fi]of Object.entries(Ci)){let Xe={[Tn]:()=>{Wi(fi)}};$n.push(Xe),an.addKeyMap(Xe)}return()=>{for(let Tn of $n)an.removeKeyMap(Tn)}}},[an]),(0,bt.useEffect)(()=>{wn!==Jn&&Pi(wn)},[wn]),(0,no.Z)(()=>{if(!un&&ji>0){let $n=new Date().getTime(),Tn=window.sessionStorage.getItem(li);$n>=ji+Mo&&(!Tn||Tn!==hr)&&(window.sessionStorage.setItem(li,hr),Vt(!0))}},Mo),(0,bt.useEffect)(()=>{xe(Yi)},[an,Yi]),(0,bt.useEffect)(()=>{an&&hi&&an.focus()},[an,hi]),(0,bt.useEffect)(()=>{if(Yr&&an){let $n=function(fi){let Xe=fi.target;if(fn.current){let nr=Xe.scrollTop/Xe.scrollHeight;fn.current.scrollTop=fn.current.scrollHeight*nr}};const Tn=an.getScrollerElement();return Tn.addEventListener("scroll",$n),()=>{Tn.removeEventListener("scroll",$n)}}},[an,Yr]),(0,bt.useEffect)(()=>{if(an&&Bn){let $n=function(Tn,fi){Bn(Tn,fi)};return an.on("beforeChange",$n),()=>{an.off("beforeChange",$n)}}},[an,Bn]),(0,bt.useEffect)(()=>{if(an&&Ne){let $n=function(){Ne(an.getValue())};return an.on("blur",$n),()=>{an.off("blur",$n)}}},[an,Ne]);function Vi($n,Tn){var fi=$n.getDoc(),Xe=fi.getCursor(),nr=fi.getLine(Xe.line),mr=nr.charAt(Xe.ch-1),Or=nr.lastIndexOf("@\u2581@",Xe.ch),ir=nr.lastIndexOf("@\u2581\u2581@",Xe.ch),jr=Or>ir?Or:ir,Vr=Or>ir?3:4;if(Er.indexOf(mr)===-1)return null;if(console.log("change1:",Tn,$n,nr,Xe,jr,Or,ir,mr),jr>=0&&Xe.ch-jr<5){var Ho=jr+Vr;return fi.replaceRange("",{line:Xe.line,ch:jr},{line:Xe.line,ch:Ho}),{line:Xe.line,ch:Ho}}return null}(0,bt.useEffect)(()=>{if(an){let $n=function(Tn,fi){const Xe=Tn.getValue();Cr(Xe),or(new Date().getTime()),Tn.getScrollerElement().dispatchEvent(new CustomEvent("scroll")),Ie&&(de?Ie(Xe,Kn(Xe)):Ie(Xe))};return an.on("change",$n),()=>{an.off("change",$n)}}},[an,Ie]),(0,bt.useEffect)(()=>{if(an)if(Ue==null)an.setValue(""),Cr("");else{const $n=window.scrollY||window.pageYOffset;Ue!==an.getValue()&&(an.setValue(Ue),Cr(Ue),an.setCursor(Qn?1:an.lineCount(),0),window.scrollTo(0,$n))}},[an,Ue]);const Wi=(0,bt.useCallback)($n=>{const Tn=an.getCursor(),fi=an.getSelection();let Xe=fi.split(`
`);switch($n){case"bold":return an.replaceSelection("**"+fi+"**"),fi===""&&an.setCursor(Tn.line,Tn.ch+2),an.focus();case"italic":return an.replaceSelection("*"+fi+"*"),fi===""&&an.setCursor(Tn.line,Tn.ch+1),an.focus();case"code":return an.replaceSelection("`"+fi+"`"),fi===""&&an.setCursor(Tn.line,Tn.ch+1),an.focus();case"inline-latex":return ur("inline-latex"),an.focus();case"latex":return an.replaceSelection("```latex\n"+fi+"\n```"),an.setCursor(Tn.line+1,fi.length+1),an.focus();case"line-break":return an.replaceSelection(`<br/>
`),an.focus();case"list-ul":return fi===""?an.replaceSelection("- "+fi):an.replaceSelection(Xe.map(nr=>nr===""?"":`- ${nr}`).join(`
`)),an.focus();case"list-ol":return fi===""?an.replaceSelection("1. "+fi):an.replaceSelection(Xe.map((nr,mr)=>nr===""?"":`${mr+1}. ${nr}`).join(`
`)),an.focus();case"add-null-ch":return fi===""&&an.setCursor(Tn.line,Tn.ch),an.replaceSelection(oo),an.focus();case"add-signal":return fi===""&&an.setCursor(Tn.line,Tn.ch),an.replaceSelection(Rr),an.focus();case"add-multiple":return fi===""&&an.setCursor(Tn.line,Tn.ch),an.replaceSelection(Er),an.focus();case"inster-template-1":return fi===""&&an.setCursor(Tn.line,Tn.ch),an.replaceSelection(Pt),an.focus();case"eraser":return an.setValue(""),an.focus();case"trigger-watch":return xe(!Yr),an.focus();case"trigger-full-screen":return Pi(!Jn),an.focus();case tr:ur(tr);return;case mo:ur(mo);return;case ro:ur(ro);return;case pr:ur(pr);return;case"maths-latex":ur("maths-latex");return;case ar:ur(ar);return;case Eo:ur(Eo);return;default:throw new Error}},[an,Yr,Jn]),yn=(0,bt.useCallback)(($n,Tn)=>{var fi,Xe,nr,mr,Or,ir;switch(ur(""),Hn){case tr:const{title:To,link:uo}=$n;return an.replaceSelection(`[${To}](${uo})`),an.focus();case mo:const{language:Me,content:ho}=$n;return an.replaceSelection(["```"+Me,ho,"```"].join(`
`)),an.focus();case"maths-latex":for(var jr=atob($n),Vr=new Uint8Array(jr.length),Ho=0;Ho<jr.length;Ho++)Vr[Ho]=jr.charCodeAt(Ho);var so=new Blob([Vr],{type:"image/png"});(0,pi.I)(so,Vs=>{Vs.id?an.replaceSelection(`![,](/api/attachments/${Vs.id}?type=${Vs.content_type})`):(Vs==null?void 0:Vs.status)===401&&(document.location.href="/user/login")});break;case"inline-latex":an.replaceSelection("`$$"+$n+"$$`");break;case ro:case pr:case wr:const{src:ls,alt:ks}=$n,ao=Tn,xa=(nr=(Xe=(fi=ao==null?void 0:ao.name)==null?void 0:fi.split("."))==null?void 0:Xe.pop)==null?void 0:nr.call(Xe);return((mr=ao==null?void 0:ao.type)==null?void 0:mr.indexOf("image"))>-1||!(ao!=null&&ao.type)?ao!=null&&ao.align||ao!=null&&ao.width?an.replaceSelection(`<p style="text-align:${ao.align||"initial"}"><img width="${ao.width?ao.width+"%":"initial"}" src="${ls}" alt="${ks||""}" /></p>`):an.replaceSelection(`<img width="100%" src="${ls}" alt="${ks||""}" />`):((Or=ao==null?void 0:ao.type)==null?void 0:Or.indexOf("video"))>-1?an.replaceSelection(`<video width="100%" controls src="${ls}"></video>`):((ir=ao==null?void 0:ao.type)==null?void 0:ir.indexOf("pdf"))>-1?an.replaceSelection(`<a href="${ls}?type=${ao.type}&disposition=inline" target="_blank">${ao.name}</a>`):er.includes(xa)?an.replaceSelection(`<a href="${ls}?type=office&disposition=inline" target="_blank">${ao.name}</a>`):an.replaceSelection(`[${ao.name}](${ls})`),an.focus();case Eo:const{row:ta,col:Da,align:Kr}=$n;let Ro=`
`;for(let Vs=0;Vs<ta;Vs++){let Vl=[],zA=[];for(let Ba=0;Ba<Da;Ba++)Vs===1&&zA.push(Ur[Kr]),Vl.push(" ");Vs===1&&(Ro+=`| ${zA.join(" | ")} |
`),Ro+=`| ${Vl.join(Da===1?"":" | ")} |
`}return an.replaceSelection(Ro+`
`),an.focus();default:throw new Error}},[an,Hn]),Ot=(0,bt.useMemo)(()=>{switch(Hn){case tr:return bt.createElement(En,{callback:yn,onCancel:Ni});case mo:return bt.createElement(Si.Z,{callback:yn,onCancel:Ni});case ro:return bt.createElement(pi.Z,{callback:yn,onCancel:Ni});case ar:return bt.createElement(An,{callback:yn,onCancel:Ni});case Eo:return bt.createElement(mn,{callback:yn,onCancel:Ni});case"maths-latex":return bt.createElement(oi,{showSaveButton:!0,callback:yn});case"inline-latex":return bt.createElement(Ai.Z,{showSaveButton:!0,callback:yn});default:return null}},[Hn]);function Ni(){ur("")}(0,bt.useEffect)(()=>{if(Gn.current){let $n=function(Or){nr=!0,mr=Or.pageY},Tn=function(){nr=!1},fi=function(Or){if(nr){let ir=Or.pageY-mr;ir<0&&(ir=0),ir>300&&(ir=300);let jr=We+ir+"px";Jt(jr)}},Xe=Gn.current,nr=!1,mr=0;return Xe.addEventListener("mousedown",$n),document.addEventListener("mousemove",fi),document.addEventListener("mouseup",Tn),()=>{Xe.removeEventListener("mousedown",$n),document.removeEventListener("mousemove",fi),document.removeEventListener("mouseup",Tn)}}},[an,Gn]),(0,bt.useEffect)(()=>{Jt(We)},[We]);const br=Gr(Le),zr=Gr(cr),xr={width:br,height:zr},ki=(0,bt.useMemo)(()=>{if(ji){let $n=new Date(ji),Tn=$n.getHours(),fi=$n.getMinutes(),Xe=$n.getSeconds();return Tn=Tn<10?"0"+Tn:Tn,fi=fi<10?"0"+fi:fi,Xe=Xe<10?"0"+Xe:Xe,`${Tn}:${fi}:${Xe}`}return 0},[ji]),Kn=$n=>{const Tn=[];if(de){let fi=-1;$n=$n.replace(/(@▁▁@|@▁@)/g,function(Xe,nr,mr){Tn.push({multiLine:Xe!==Rr})})}return Tn};function ai(){window.sessionStorage.removeItem(li),Vt(!1),or(0)}function Fi(){Vt(!1),or(0),an.setValue(window.sessionStorage.getItem(li))}(0,bt.useEffect)(()=>{Ri[Hn]&&Hn!==pr&&Hn!==ar&&setTimeout(()=>{const $n=document.getElementsByClassName("markdown-popup-form")[0],Tn=window.innerWidth/2-$n.offsetWidth/2,fi=window.innerHeight/2-$n.offsetHeight/2;le(Tn),_n(fi)},0)},[Hn]);const In=$n=>{$n.preventDefault();const Tn=$n.clientX-Te,fi=$n.clientY-nn;document.body.onmousemove=Xe=>{let nr=Xe.clientX-Tn,mr=Xe.clientY-fi;const Or=document.getElementsByClassName("markdown-popup-form")[0],ir=window.innerWidth-Or.offsetWidth,jr=window.innerHeight-Or.offsetHeight;nr=Math.max(0,Math.min(nr,ir)),mr=Math.max(0,Math.min(mr,jr)),ni(Xe.clientX,Xe.clientY,Tn,fi)&&(le(nr),_n(mr))},document.body.onmouseup=function(){document.body.onmousemove=null}},ni=($n,Tn,fi,Xe)=>{const nr=document.body.clientHeight,mr=document.body.clientWidth;return $n<20&&fi>$n||$n>mr-20&&fi<$n||Tn<20&&Xe>Tn||Tn>nr-20&&Xe<Tn?(document.body.onmousemove=null,document.body.onmouseup=null,!1):!0};return bt.createElement(bt.Fragment,null,bt.createElement("div",{className:"markdown-editor-wrapper",ref:vi},bt.createElement("div",{className:`markdown-editor-container ${bn} ${Yr?"on-preview":""} ${wi?"mini":""} ${Jn?"full-screen":""}`,style:xr},bt.createElement(qt,{insertTemp:sn,watch:Yr,fullScreen:Jn,showNullButton:Yt,showNullProgramButton:de,onActionCallback:Wi,hidetoolBar:Sn,extraUse:Gi}),bt.createElement("div",{className:"markdown-editor-body"},bt.createElement("div",{className:"codemirror-container"},bt.createElement("textarea",{ref:On,placeholder:Zn})),Yr?bt.createElement("div",{ref:fn,className:"preview-container"},He==="stex"&&bt.createElement(Se,{value:hr}),He!=="stex"&&bt.createElement(hn.Z,{disabledFill:Dn,showProgramFill:de,value:hr})):null))),_i?bt.createElement("a",{ref:Gn,className:"editor-resize"}):null,Hn===pr&&bt.createElement(kn,{callback:yn,onCancel:Ni}),Hn===ar&&bt.createElement(An,{callback:yn,onCancel:Ni}),bt.createElement(he.Z,null,Ri[Hn]&&Hn!==pr&&Hn!==ar?bt.createElement(Ke.default,{maskClosable:!1,centered:!0,style:{position:"absolute",left:Te,top:nn},title:bt.createElement("div",{style:{cursor:"move"},onMouseDown:In},Ri[Hn]),open:!0,onCancel:Ni,footer:null,destroyOnClose:!0,width:Hn===ar?"1200px":null,height:Hn===ar?"80vh":null,className:"markdown-popup-form"},Ot):null))}},17077:function(Cn,mi,ne){"use strict";ne.d(mi,{Z:function(){return Wt},I:function(){return he}});var bt=ne(28284),Be=ne(6767),Ee=ne(37568),Ze=ne(77736),Fe=ne(71051),we=ne(47889),ve=ne(99571),Qe=ne(46699),ge=ne(59301),se=ne(59301),hn=Object.defineProperty,Se=Object.defineProperties,xn=Object.getOwnPropertyDescriptors,Ut=Object.getOwnPropertySymbols,et=Object.prototype.hasOwnProperty,nt=Object.prototype.propertyIsEnumerable,ct=(fe,Ae,Ve)=>Ae in fe?hn(fe,Ae,{enumerable:!0,configurable:!0,writable:!0,value:Ve}):fe[Ae]=Ve,lt=(fe,Ae)=>{for(var Ve in Ae||(Ae={}))et.call(Ae,Ve)&&ct(fe,Ve,Ae[Ve]);if(Ut)for(var Ve of Ut(Ae))nt.call(Ae,Ve)&&ct(fe,Ve,Ae[Ve]);return fe},gt=(fe,Ae)=>Se(fe,xn(Ae));const{useForm:yt}=bt.default,Lt={width:280,marginRight:10},It={labelCol:{span:5},wrapperCol:{span:19}};var Wt=({callback:fe,onCancel:Ae})=>{const[Ve]=yt();let ye=(0,ge.useRef)();function on(ti){ye.current.width=Ve.getFieldValue("width"),ye.current.align=Ve.getFieldValue("align"),fe(ti,ye.current)}function pn(ti,Xn){if(ti.status===-1){Be.ZP.error(ti.message);return}Ve.setFieldsValue({src:`/api/attachments/${ti.id}`,type:Xn.type})}function Vn(ti){let Xn=ti.target.files[0];ye.current=Xn,he(Xn,pn)}return se.createElement(bt.default,gt(lt({form:Ve},It),{className:"upload-image-panel",onFinish:on,style:{width:470,overflow:"hidden"}}),se.createElement(bt.default.Item,{label:"\u56FE\u7247\u5730\u5740",required:!0},se.createElement("div",{className:"flex-container"},se.createElement(bt.default.Item,{noStyle:!0,name:"src",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u56FE\u7247\u5730\u5740"}]},se.createElement(Ee.default,{style:Lt})),se.createElement(qt,{onFileChange:Vn}))),se.createElement(bt.default.Item,{label:"\u56FE\u7247\u63CF\u8FF0",name:"alt"},se.createElement(Ee.default,{style:{width:264}})),se.createElement(bt.default.Item,{label:"\u56FE\u7247\u5BBD\u5EA6",name:"width"},se.createElement(Ze.Z,null,se.createElement(bt.default.Item,{name:"width",style:{margin:0}},se.createElement(Fe.Z,{style:{width:264}})),se.createElement("span",{className:"ml8"},"%"))),se.createElement(bt.default.Item,{label:"\u5BF9\u9F50\u65B9\u5F0F",name:"align"},se.createElement(we.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"}]})),se.createElement("aside",null,se.createElement(bt.default.Item,{style:{textAlign:"right",position:"relative",right:-98}},se.createElement(ve.ZP,{type:"primary",htmlType:"submit",style:{marginRight:10}},"\u786E\u5B9A"),se.createElement(ve.ZP,{type:"default",onClick:Ae},"\u53D6\u6D88"))))};function qt({onFileChange:fe}){return se.createElement("label",{className:"upload-button",style:{cursor:"pointer"}},"\u672C\u5730\u4E0A\u4F20",se.createElement("input",{type:"file",onChange:fe}))}function he(fe,Ae){if(!fe)throw new String("\u6CA1\u6709\u6587\u4EF6");let Ve=new FormData;Ve.append("editormd-image-file",fe),Ve.append("file_param_name","editormd-image-file"),Ve.append("byxhr","true");var ye=new window.XMLHttpRequest;ye.withCredentials=!0,ye.addEventListener("load",function(on){Ae(JSON.parse(on.target.responseText),fe)},!1),ye.addEventListener("error",function(on){console.error(on)},!1),ye.open("POST",`${Qe.KI}/api/attachments.json`),ye.send(Ve)}},91558:function(Cn,mi,ne){"use strict";ne.d(mi,{Z:function(){return Ee}});var bt=ne(59301),Be=ne(4676);class Ee extends bt.Component{constructor(Fe){super(Fe);const we=window.document;this.node=we.createElement("div"),we.body.appendChild(this.node)}render(){const{children:Fe}=this.props;return(0,Be.createPortal)(Fe,this.node)}componentWillUnmount(){window.document.body.removeChild(this.node)}}},75975:function(Cn,mi,ne){"use strict";ne.d(mi,{SV:function(){return An},ZP:function(){return be}});var bt=ne(59301),Be=ne(76374);const Ee={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"]},Ze={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"]},Fe={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(`
`)}]},we={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(`
`)}]},ve={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 Qe=ne(53184),ge=ne.n(Qe),se=Object.defineProperty,hn=Object.defineProperties,Se=Object.getOwnPropertyDescriptors,xn=Object.getOwnPropertySymbols,Ut=Object.prototype.hasOwnProperty,et=Object.prototype.propertyIsEnumerable,nt=(ze,Je,rn)=>Je in ze?se(ze,Je,{enumerable:!0,configurable:!0,writable:!0,value:rn}):ze[Je]=rn,ct=(ze,Je)=>{for(var rn in Je||(Je={}))Ut.call(Je,rn)&&nt(ze,rn,Je[rn]);if(xn)for(var rn of xn(Je))et.call(Je,rn)&&nt(ze,rn,Je[rn]);return ze},lt=(ze,Je)=>hn(ze,Se(Je)),gt=(ze,Je,rn)=>new Promise((Oe,mn)=>{var cn=dn=>{try{zn(rn.next(dn))}catch(oi){mn(oi)}},Mn=dn=>{try{zn(rn.throw(dn))}catch(oi){mn(oi)}},zn=dn=>dn.done?Oe(dn.value):Promise.resolve(dn.value).then(cn,Mn);zn((rn=rn.apply(ze,Je)).next())});const yt={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"]}},Lt=(ze,Je)=>Je.map(rn=>({label:rn,kind:ze.languages.CompletionItemKind.Keyword,insertText:rn})),It=ze=>Object.keys(yt.tables).map(Je=>({label:Je,kind:ze.languages.CompletionItemKind.Variable,insertText:Je})),Wt=(ze,Je)=>{const rn=yt.tables[ze];return rn?rn.map(Oe=>({label:Oe,kind:Je.languages.CompletionItemKind.Field,insertText:Oe})):[]};function qt(ze,Je,rn,Oe,mn){let cn=Je.getWordUntilPosition(rn),Mn={startLineNumber:rn.lineNumber,endLineNumber:rn.lineNumber,startColumn:cn.startColumn,endColumn:cn.endColumn},zn=Oe.map(dn=>({label:dn,kind:ze.languages.CompletionItemKind.Keyword,insertText:dn,insertTextRules:ze.languages.CompletionItemInsertTextRule.InsertAsSnippet,range:Mn}));return mn.map(dn=>{zn.push(lt(ct({},dn),{range:Mn}))}),zn}var he=ze=>{yt.languages.map(mn=>(ze.languages.registerDocumentFormattingEditProvider(mn,{provideDocumentFormattingEdits(cn,Mn,zn){return gt(this,null,function*(){const dn=ge()(cn.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:cn.getFullModelRange(),text:dn}]})}}),mn));const Je=Fe.quickKey.map(mn=>({label:mn.label,kind:ze.languages.CompletionItemKind.Method,insertText:mn.content,insertTextRules:ze.languages.CompletionItemInsertTextRule.InsertAsSnippet})),rn=we.quickKey.map(mn=>({label:mn.label,kind:ze.languages.CompletionItemKind.Method,insertText:mn.content,insertTextRules:ze.languages.CompletionItemInsertTextRule.InsertAsSnippet})),Oe=Ze.quickKey.map(mn=>({label:mn.label,kind:ze.languages.CompletionItemKind.Method,insertText:mn.content,insertTextRules:ze.languages.CompletionItemInsertTextRule.InsertAsSnippet}));ze.languages.registerCompletionItemProvider("cpp",{provideCompletionItems:function(mn,cn){var Mn=mn.getWordUntilPosition(cn),zn={startLineNumber:cn.lineNumber,endLineNumber:cn.lineNumber,startColumn:Mn.startColumn,endColumn:Mn.endColumn},dn=mn.getLineContent(cn.lineNumber).substring(Mn.startColumn-2,Mn.endColumn);return{suggestions:[...Fe.keywords.map(oi=>({label:oi,kind:ze.languages.CompletionItemKind.Function,documentation:oi,insertText:oi,insertTextRules:ze.languages.CompletionItemInsertTextRule.InsertAsSnippet,range:zn})),...Fe.quickKey.map(oi=>({label:oi.label,kind:ze.languages.CompletionItemKind.Function,documentation:oi.content,insertText:dn.startsWith("#")?oi.content.replace(/#/,""):oi.content,insertTextRules:ze.languages.CompletionItemInsertTextRule.InsertAsSnippet,range:zn}))]}}}),ze.languages.registerCompletionItemProvider("c",{provideCompletionItems:function(mn,cn){var Mn=mn.getWordUntilPosition(cn),zn={startLineNumber:cn.lineNumber,endLineNumber:cn.lineNumber,startColumn:Mn.startColumn,endColumn:Mn.endColumn};return{suggestions:[...Ee.keywords.map(dn=>({label:dn,kind:ze.languages.CompletionItemKind.Function,documentation:dn,insertText:dn,insertTextRules:ze.languages.CompletionItemInsertTextRule.InsertAsSnippet,range:zn}))]}}}),ze.languages.registerCompletionItemProvider("java",{provideCompletionItems:function(mn,cn){var Mn=mn.getWordUntilPosition(cn),zn={startLineNumber:cn.lineNumber,endLineNumber:cn.lineNumber,startColumn:Mn.startColumn,endColumn:Mn.endColumn},dn=mn.getLineContent(cn.lineNumber).substring(Mn.startColumn-2,Mn.endColumn);return{suggestions:[...Ze.keywords.map(oi=>({label:oi,kind:ze.languages.CompletionItemKind.Function,documentation:oi,insertText:oi,insertTextRules:ze.languages.CompletionItemInsertTextRule.InsertAsSnippet,range:zn})),...Ze.quickKey.map(oi=>({label:oi.label,kind:ze.languages.CompletionItemKind.Function,documentation:oi.content,insertText:dn.startsWith("#")?oi.content.replace(/#/,""):oi.content,insertTextRules:ze.languages.CompletionItemInsertTextRule.InsertAsSnippet,range:zn}))]}}}),ze.languages.registerCompletionItemProvider("scala",{provideCompletionItems:function(mn,cn){var Mn=mn.getWordUntilPosition(cn),zn={startLineNumber:cn.lineNumber,endLineNumber:cn.lineNumber,startColumn:Mn.startColumn,endColumn:Mn.endColumn},dn=mn.getLineContent(cn.lineNumber).substring(Mn.startColumn-2,Mn.endColumn);return{suggestions:[...ve.keywords.map(oi=>({label:oi,kind:ze.languages.CompletionItemKind.Function,documentation:oi,insertText:oi,insertTextRules:ze.languages.CompletionItemInsertTextRule.InsertAsSnippet,range:zn})),...ve.quickKey.map(oi=>({label:oi.label,kind:ze.languages.CompletionItemKind.Function,documentation:oi.content,insertText:dn.startsWith("#")?oi.content.replace(/#/,""):oi.content,insertTextRules:ze.languages.CompletionItemInsertTextRule.InsertAsSnippet,range:zn}))]}}}),ze.languages.registerCompletionItemProvider("python",{provideCompletionItems:function(mn,cn){var Mn=mn.getWordUntilPosition(cn),zn={startLineNumber:cn.lineNumber,endLineNumber:cn.lineNumber,startColumn:Mn.startColumn,endColumn:Mn.endColumn},dn=mn.getLineContent(cn.lineNumber).substring(Mn.startColumn-2,Mn.endColumn);return{suggestions:[...we.keywords.map(oi=>({label:oi,kind:ze.languages.CompletionItemKind.Function,documentation:oi,insertText:oi,insertTextRules:ze.languages.CompletionItemInsertTextRule.InsertAsSnippet,range:zn})),...we.quickKey.map(oi=>({label:oi.label,kind:ze.languages.CompletionItemKind.Function,documentation:oi.content,insertText:dn.startsWith("#")?oi.content.replace(/#/,""):oi.content,insertTextRules:ze.languages.CompletionItemInsertTextRule.InsertAsSnippet,range:zn}))]}}})};const fe="\u8BE5\u4EFB\u52A1\u5173\u5361\u8BBE\u7F6E\u4E86\u7981\u6B62\u590D\u5236\u7C98\u8D34\uFF0C\u8BF7\u624B\u52A8\u8F93\u5165\u4EE3\u7801\u3002";var Ae=Object.defineProperty,Ve=(ze,Je,rn)=>Je in ze?Ae(ze,Je,{enumerable:!0,configurable:!0,writable:!0,value:rn}):ze[Je]=rn,ye=(ze,Je,rn)=>Ve(ze,typeof Je!="symbol"?Je+"":Je,rn);const on=class p1{constructor(Je,rn,Oe){this.placeholder=Je,this.editor=rn,this.monaco=Oe,rn.onDidChangeModelContent(()=>this.onDidChangeModelContent()),this.onDidChangeModelContent()}onDidChangeModelContent(){this.editor.getValue()===""?this.editor.addContentWidget(this):this.editor.removeContentWidget(this)}getId(){return p1.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)}};ye(on,"ID","editor.widget.placeholderHint");var Vn=on,ti=ne(96236),Xn=ne(6767),Li=ne(25399),Ii=ne(89392),ue=ne(49535),jt=ne(56102),En=Object.defineProperty,Si=Object.defineProperties,pi=Object.getOwnPropertyDescriptors,Ke=Object.getOwnPropertySymbols,Pn=Object.prototype.hasOwnProperty,qn=Object.prototype.propertyIsEnumerable,xi=(ze,Je,rn)=>Je in ze?En(ze,Je,{enumerable:!0,configurable:!0,writable:!0,value:rn}):ze[Je]=rn,kn=(ze,Je)=>{for(var rn in Je||(Je={}))Pn.call(Je,rn)&&xi(ze,rn,Je[rn]);if(Ke)for(var rn of Ke(Je))qn.call(Je,rn)&&xi(ze,rn,Je[rn]);return ze},Ce=(ze,Je)=>Si(ze,pi(Je)),Ge=(ze,Je)=>{var rn={};for(var Oe in ze)Pn.call(ze,Oe)&&Je.indexOf(Oe)<0&&(rn[Oe]=ze[Oe]);if(ze!=null&&Ke)for(var Oe of Ke(ze))Je.indexOf(Oe)<0&&qn.call(ze,Oe)&&(rn[Oe]=ze[Oe]);return rn},gi=(ze,Je,rn)=>new Promise((Oe,mn)=>{var cn=dn=>{try{zn(rn.next(dn))}catch(oi){mn(oi)}},Mn=dn=>{try{zn(rn.throw(dn))}catch(oi){mn(oi)}},zn=dn=>dn.done?Oe(dn.value):Promise.resolve(dn.value).then(cn,Mn);zn((rn=rn.apply(ze,Je)).next())});function yi(ze){return/^\d+$/.test(ze)?`${ze}px`:ze}function Ht(){}let Et=!1;const Ct={"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 Nt(ze=[]){let Je=ze;if(Array.isArray(ze)){for(let rn=0;rn<ze.length;rn++){let Oe=Ct[ze[rn]];if(Oe)return Oe}return Je[0]}return Ct[Je]||Je}let Kt=null;const kt=()=>gi(void 0,null,function*(){try{yield navigator.clipboard.writeText(" "),console.log("\u5185\u5BB9\u5DF2\u81EA\u52A8\u590D\u5236\u5230\u526A\u8D34\u677F:")}catch(ze){console.error("\u81EA\u52A8\u590D\u5236\u5931\u8D25:",ze)}});var be=ze=>{var Je=ze,{width:rn="100%",height:Oe="100%",value:mn,language:cn="javascript",style:Mn={},options:zn={},overrideServices:dn={},theme:oi="vs-dark",onEditBlur:Ai,isCopy:Zi=!1,onSave:tr,autoHeight:ro=!1,forbidCopy:ar=!1,onChange:pr=Ht,editorDidMount:wr=Ht,onFocus:mo=Ht,onBreakPoint:Eo=Ht,breakPointValue:Hr=[],filename:Ur="educoder.txt",errorLine:no,errorContent:_o="",highlightLine:bo,openBreakPoint:Mo=!1,placeholder:oo="",showMiniMap:Er=!0}=Je,Rr=Ge(Je,["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,bt.useRef)(),er=(0,bt.useRef)({}),Gr=(0,bt.useRef)(),si=(0,bt.useRef)(),ui=(0,bt.useRef)([]),Ci=(0,bt.useRef)(!1),Ri=(0,bt.useRef)(),Tr=(0,bt.useRef)(),Ue=(0,bt.useRef)(!1),[Ie,Le]=(0,bt.useState)(!1);function We(){let Ln;return Pt.current&&(Ln=new Be.Z(bn=>{for(let ci of bn)(ci.target.offsetHeight>0||ci.target.offsetWidth>0)&&er.current.instance.layout()}),Ln.observe(Pt.current)),Ln}function wi(){Xn.ZP.warning({content:decodeURIComponent(fe),key:"monaco-editor-tip"})}const hi=()=>{let Ln=er.current.instance;if(mn!=null&&Ln&&Ie){const bn=Ln.getModel();bn&&mn!==bn.getValue()&&(Et=!0,bn.setValue(mn),Ln.layout(),Et=!1)}};(0,bt.useEffect)(()=>{const Ln=ue.Z.subscribe("formatDocument",bn=>{var ci;let Qn=er.current.instance;(ci=Qn==null?void 0:Qn.getAction)==null||ci.call(Qn,"editor.action.formatDocument").run()});return window.updateMonacoValue=bn=>{pr(bn)},Ln},[]),(0,bt.useEffect)(()=>{var Ln;let bn=er.current.instance;si.current&&clearTimeout(si.current),si.current=setTimeout(()=>{hi()},500),mn&&(mn!=null&&mn.length)&&((Ln=bn==null?void 0:bn.updateOptions)==null||Ln.call(bn,{lineNumbersMinChars:Math.max(Math.floor(Math.log10(mn.split(/\r\n|\r|\n/g).length))+3,5)}))},[mn,Ie,er.current]),(0,bt.useEffect)(()=>{if(no&&er.current&&er.current.instance){let bn=er.current.instance;bn.changeViewZones(function(ci){var Qn=document.createElement("div");Qn.style.padding="10px 20px",Qn.style.width="calc(100% - 20px)",Qn.className="my-error-line-wrp",Qn.innerHTML=_o,ci.addZone({afterLineNumber:no||11,heightInLines:3,domNode:Qn})});var Ln={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}};bn.addOverlayWidget(Ln),bn.revealPositionInCenter({lineNumber:20,column:1})}},[no,er.current,Ie]);const Yi=(Ln="",bn)=>{if(!Ln||Ln.trim()==="")return!0;const Qn=er.current.instance.getModel().getLineTokens(bn);let Dn=!1;for(let Zn=0;Zn<2;Zn++)Qn.getStandardTokenType(Zn)===1&&(Dn=!0);return Dn};(0,bt.useEffect)(()=>{var Ln;const bn=(Ln=er.current)==null?void 0:Ln.instance;if(bn&&Ie&&ar){const ci=bn.onDidBlurEditorWidget(()=>{Ue.current=!1}),Qn=bn.onDidFocusEditorText(()=>{Ue.current=!0});return()=>{ci.dispose(),Qn.dispose()}}},[er.current,Ie,ar]),(0,bt.useEffect)(()=>{var Ln;if((Ln=er.current)!=null&&Ln.instance&&Ie&&Mo){let bn=er.current.instance,ci=bn.getModel();if(!ci)return;(()=>{var Jn;let Pi=[],Hn=[];const ur=ci.getAllDecorations();for(let or of ur)or.options.className==="highlighted-line"&&(Pi.push((Jn=or==null?void 0:or.range)==null?void 0:Jn.startLineNumber),Hn.push(or==null?void 0:or.id));if(bo===Pi[0])return;ci.deltaDecorations(Hn,[]);const ji=ci.getLineCount();bo&&bo<=ji&&(bn.deltaDecorations([],[{range:new Kt.Range(bo,1,bo,ci.getLineMaxColumn(bo)),options:{isWholeLine:!0,className:"highlighted-line"}}]),bn.revealLineInCenter(bo))})();const Dn=(Jn=!1)=>{var Pi;let Hn=[],ur=[];const ji=ci.getAllDecorations();for(let or of ji)or.options.linesDecorationsClassName==="breakpoints-select"&&(Hn.push((Pi=or==null?void 0:or.range)==null?void 0:Pi.startLineNumber),ur.push(or==null?void 0:or.id));if(Jn)return{lines:Hn,ids:ur};Eo(Hn)},Zn=Jn=>gi(void 0,null,function*(){let Pi={range:new Kt.Range(Jn,1,Jn,1),options:{isWholeLine:!1,linesDecorationsClassName:"breakpoints-select"}};yield ci.deltaDecorations([],[Pi]),Dn()}),rr=Jn=>gi(void 0,null,function*(){let Pi=[];const Hn=bn.getLineDecorations(Jn);for(let ur of Hn)ur.options.linesDecorationsClassName==="breakpoints-select"&&Pi.push(ur.id);yield ci.deltaDecorations(Pi,[]),Dn()}),Gi=Jn=>{let Pi=bn.getLineDecorations(Jn);for(let Hn of Pi)if(Hn.options.linesDecorationsClassName==="breakpoints-select")return!0;return!1};if(!(0,Ii.isEqual)(Hr,Dn(!0).lines)){ci.deltaDecorations(Dn(!0).ids,[]);const Jn=Hr.map(Pi=>({range:new Kt.Range(Pi,1,Pi,1),options:{isWholeLine:!1,linesDecorationsClassName:"breakpoints-select"}}));ci.deltaDecorations([],Jn)}const an=bn.onDidChangeModelContent(Jn=>{let Pi=bn.getPosition();if(Pi){let Hn=Pi.lineNumber;clearTimeout(Tr.current),Tr.current=setTimeout(()=>{Yi(ci.getLineContent(Hn),Hn)?rr(Hn):Gi(Hn)?(rr(Hn),Zn(Hn)):Dn()},100)}}),Nn=bn.onMouseDown(Jn=>{var Pi,Hn,ur;if(Jn.target.detail&&((ur=(Hn=(Pi=Jn.target)==null?void 0:Pi.element)==null?void 0:Hn.className)!=null&&ur.includes("line-numbers"))){let ji=Jn.target.position.lineNumber;if(Yi(ci.getLineContent(ji),ji))return;Gi(ji)?rr(ji):Zn(ji)}}),hr=Jn=>{let Pi={range:new Kt.Range(Jn,1,Jn,1),options:{isWholeLine:!1,linesDecorationsClassName:"breakpoints-fake"}};ui.current=bn.deltaDecorations(ui.current,[Pi])},Cr=()=>{ui.current=bn.deltaDecorations(ui.current,[])},Yr=bn.onMouseMove(Jn=>{var Pi,Hn,ur;if(Cr(),Jn.target.detail&&((ur=(Hn=(Pi=Jn.target)==null?void 0:Pi.element)==null?void 0:Hn.className)!=null&&ur.includes("line-numbers"))){let ji=Jn.target.position.lineNumber;if(Yi(ci.getLineContent(ji),ji))return;hr(ji)}}),xe=bn.onMouseLeave(()=>{Cr()});return()=>{an.dispose(),Nn.dispose(),Yr.dispose(),xe.dispose()}}},[er.current,Ie,Hr,bo,Mo,cn]),(0,bt.useEffect)(()=>{var Ln;(Ln=er.current)!=null&&Ln.instance&&Mo&&er.current.instance.setPosition({lineNumber:0,column:0})},[bo]);function sn(){let Ln=er.current.instance;if(Ln){const bn=Ln.getSelection(),ci=er.current.pastePos||{},Qn=new Kt.Range(ci.startLineNumber||bn.endLineNumber,ci.startColumn||bn.endColumn,ci.endLineNumber||bn.endLineNumber,ci.endColumn||bn.endColumn);setTimeout(()=>{Ln.executeEdits("",[{range:Qn,text:""}])},300)}}function He(Ln){(window.navigator.platform.match("Mac")?Ln.metaKey:Ln.ctrlKey)&&Ln.keyCode==83&&(Ln.preventDefault(),tr())}const li=()=>{if(ro&&er.current.instance){const Ln=er.current.instance.getContentHeight();Ne(Ln<Oe?Oe:Ln)}else Ne(Oe)};function _i(Ln){var bn=document.createEvent("MouseEvents");bn.initMouseEvent("click",!0,!1,window,0,0,0,0,0,!1,!1,!1,!1,0,null),Ln.dispatchEvent(bn)}const un=Ln=>{if(!Ue.current)return;const{keyCode:bn,ctrlKey:ci,metaKey:Qn,target:Dn,type:Zn}=Ln;return(Zn==="paste"||(bn===67||bn===86)&&(Qn||ci))&&Dn.nodeName==="TEXTAREA"&&(wi(),Ln.preventDefault()),!1};function Yt(Ln,bn){var ci=window.URL||window.webkitURL||window,Qn=new Blob([bn]),Dn=document.createElementNS("http://www.w3.org/1999/xhtml","a");Dn.href=ci.createObjectURL(Qn),Dn.download=Ln,_i(Dn)}(0,bt.useEffect)(()=>{li()},[li]),(0,bt.useEffect)(()=>{Pt.current&&!Ie&&Promise.all([ne.e(8909),ne.e(6656)]).then(ne.bind(ne,71448)).then(Ln=>{try{Kt=Ln,er.current.instance=Kt.editor.create(Pt.current,{value:mn,language:Nt(cn),theme:oi,requireConfig:{"vs/nls":{availableLanguages:{"*":"zh-cn"}}},wordWrap:!0,autoIndent:!0,contextmenu:!0,formatOnType:!0,minimap:{enabled:Er||!1}},dn);const bn=er.current.instance;let Dn=[...ti.BH._menuItems].find(an=>an[0]._debugName=="EditorContext")[1],Zn=["editor.action.clipboardCopyWithSyntaxHighlightingAction","editor.action.quickCommand","editor.action.clipboardCopyAction","editor.action.clipboardPasteAction","editor.action.clipboardCutAction"],rr=(an,Nn)=>{var hr,Cr;let Yr=an._first;do Nn.includes((Cr=(hr=Yr.element)==null?void 0:hr.command)==null?void 0:Cr.id)&&an._remove(Yr);while(Yr=Yr.next)};if(wr(bn,Kt),setTimeout(()=>{li(),er.current.instance.addAction({id:"d123123",label:"Download File",contextMenuGroupId:"9_cutcopypaste",run:()=>{Yt(Ur||"educoder.txt",bn.getValue())}})},500),er.current.subscription=bn.onDidChangeModelContent(an=>{Ci.current?clearTimeout(Ri.current):(li(),pr(bn.getValue(),an)),Ri.current=setTimeout(()=>{Ci.current=!1},500)}),window.Monaco||he(Kt,Nt(cn)),ar&&(rr(Dn,Zn),Pt.current.classList.add("noCopyPaste"),window.removeEventListener("keydown",un),window.removeEventListener("paste",un),window.addEventListener("keydown",un),window.addEventListener("paste",un)),window.Monaco=Kt,Ai&&bn.onDidBlurEditorWidget(()=>{Ai(bn.getValue())}),mo&&bn.onDidFocusEditorText(()=>{ar&&kt(),mo(bn.getValue())}),ar){kt();try{bn.onDidPaste(an=>{const Nn=bn.getSelection(),hr=er.current.pastePos||{},Cr=new Kt.Range(hr.startLineNumber||Nn.endLineNumber,hr.startColumn||Nn.endColumn,hr.endLineNumber||Nn.endLineNumber,hr.endColumn||Nn.endColumn);bn.executeEdits("",[{range:an.range,text:""}])})}catch(an){}}let Gi=We();return oo&&typeof oo=="string"&&new Vn(oo,bn,Kt),Le(!0),()=>{const an=er.current.instance;an.dispose();const Nn=an.getModel();Nn&&Nn.dispose(),er.current.subscription&&er.current.subscription.dispose(),Gi.unobserve(Pt.current)}}catch(bn){}})},[]),(0,bt.useEffect)(()=>{if(er.current.instance&&Ie)return document.addEventListener("keydown",He,!1),()=>{document.removeEventListener("keydown",He)}},[tr,Ie]),(0,bt.useEffect)(()=>{let Ln=er.current.instance;if(Ln&&Ie){let bn=Nt(cn);Kt.editor.setModelLanguage(Ln.getModel(),bn)}},[cn,Ie]),(0,bt.useEffect)(()=>{er.current.instance&&Ie&&Kt.editor.setTheme(oi)},[oi,Ie]),(0,bt.useEffect)(()=>{let Ln=er.current.instance;Gr.current=zn,Ln&&Ie&&(Ln.updateOptions(kn({},zn)),setTimeout(()=>{Ln.getModel().updateOptions(kn({},zn))},200))},[JSON.stringify(zn),Ie]),(0,bt.useEffect)(()=>{let Ln=er.current.instance;Ln&&Ie&&Ln.layout()},[rn,Oe,Ie]);const[de,Sn]=(0,bt.useState)(yi(rn)),[wn,Ne]=(0,bt.useState)(yi(Oe)),Bn=Ce(kn({},Mn),{width:de,height:wn,position:"relative"});return bt.createElement("div",{className:"my-monaco-editor",ref:Pt,style:Bn},Zi&&bt.createElement(jt.CopyToClipboard,{text:mn,onCopy:()=>Xn.ZP.success("\u590D\u5236\u6210\u529F")},bt.createElement(Li.Z,{title:"\u590D\u5236\u4EE3\u7801"},bt.createElement("div",{style:{position:"absolute",top:0,right:10,cursor:"pointer",zIndex:10,color:"#165DFF"}},bt.createElement("i",{className:"iconfont icon-fuzhi8",style:{fontSize:14}})," \u590D\u5236\u4EE3\u7801"))))};function An({width:ze="100%",height:Je="100%",original:rn,modified:Oe,language:mn,options:cn={}}){const Mn=(0,bt.useRef)(),[zn,dn]=(0,bt.useState)(null);function oi(ro){let ar;return Mn.current&&(ar=new Be.Z(pr=>{for(let wr of pr)(wr.target.offsetHeight>0||wr.target.offsetWidth>0)&&ro.layout()}),ar.observe(Mn.current)),ar}(0,bt.useEffect)(()=>(Mn.current&&Promise.all([ne.e(8909),ne.e(9404)]).then(ne.bind(ne,2550)).then(ro=>{Kt=ro;const ar=Kt.editor.createDiffEditor(Mn.current,Ce(kn({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},cn),{wordWrap:!0}));dn(ar);let pr=oi(ar);return()=>{ar.dispose();const wr=ar.getModel();wr&&wr.dispose(),pr.unobserve(Mn.current)}}),()=>{window.removeEventListener("keydown",checkPaste),window.removeEventListener("paste",checkPaste)}),[]),(0,bt.useEffect)(()=>{zn&&zn.setModel({original:Kt.editor.createModel(rn,mn),modified:Kt.editor.createModel(Oe,mn)})},[rn,Oe,mn,zn]);const Ai=yi(ze),Zi=yi(Je),tr={width:Ai,height:Zi};return bt.createElement("div",{className:"my-diff-editor",ref:Mn,style:tr})}},10661:function(Cn,mi,ne){"use strict";ne.d(mi,{Z:function(){return hn}});var bt={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"},Be=ne(29787),Ee=ne(25399),Ze=ne(92310),Fe=ne.n(Ze),we=ne(51257),ve=ne(28426),Qe=ne(48790),ge=ne(59301),hn=({className:Se,dataSource:xn=[],col:Ut=4,right:et,bottom:nt=23,precision:ct=0,wrapWidth:lt=1200,trackEventItems:gt,loading:yt,onRemove:Lt=()=>{},isCurrent:It=!0,showAlias:Wt=!1})=>{const qt=Math.floor((lt-(Ut-1)*et)/Ut),he=[{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 ge.createElement(Be.Z,{spinning:yt},ge.createElement("div",{className:Fe()(bt.list,Se)},!!(xn!=null&&xn.length)&&(xn==null?void 0:xn.map((fe,Ae)=>{var Ve;const{name:ye,id:on,identifier:pn,featured:Vn,school_name:ti,image_url:Xn,excellent:Li,is_plan:Ii}=fe;return ge.createElement("div",{key:on,className:bt.wrap,style:{width:qt,marginRight:(1+Ae)%Ut===0?0:et+ct,marginBottom:nt}},ge.createElement("a",{className:bt.li,onClick:ue=>{ue.preventDefault(),ue.stopPropagation(),gt&&(0,we.L9)([gt]),(0,we.xg)(`/paths/${pn}`)}},ge.createElement("div",{className:bt.img},ge.createElement("img",{className:bt.cover,src:`${Xn}`}),It&&(0,Qe.bg)()&&(fe==null?void 0:fe.studying)&&ge.createElement("div",{className:`${bt.movebq} user-path-items`,onClick:ue=>{ue.stopPropagation(),Lt(fe)}},ge.createElement("i",{className:"iconfont icon-yichu1 mr5 c-red"}),ge.createElement("span",{className:"c-red"},"\u79FB\u9664")),(Ve=fe==null?void 0:fe.subject_tags)==null?void 0:Ve.map((ue,jt)=>{var En,Si;if(jt===0){const Ke=(En=he.find(Pn=>Pn.name==ue))==null?void 0:En.swimg;return ge.createElement("img",{className:bt.sign,src:Ke,style:{left:"-4px"}})}const pi=(Si=he.find(Ke=>Ke.name==ue))==null?void 0:Si.ptimg;return ge.createElement("img",{className:bt.sign,src:pi,style:{left:`${48+52*(jt-1)+2*jt}px`}})}),ge.createElement("div",{style:{position:"absolute",top:"150px",left:"4px"}},(fe==null?void 0:fe.excellent)&&ge.createElement("div",{className:bt.bq},"\u5F00\u653E\u8BFE\u7A0B"))),ge.createElement("div",{className:bt.name},ge.createElement(Ee.Z,{title:Wt&&(fe!=null&&fe.excellent_alias_name)?ge.createElement("span",null,`\u8BFE\u7A0B\u539F\u540D\uFF1A${ye}`,ge.createElement("br",null),ge.createElement("span",null,`\u8BFE\u7A0B\u522B\u540D\uFF1A${fe==null?void 0:fe.excellent_alias_name}`)):ye},ge.createElement("span",{className:bt.e},Wt&&(fe==null?void 0:fe.excellent_alias_name)||ye))),ge.createElement(Ee.Z,{title:`\u53D1\u5E03\u5355\u4F4D\uFF1A${ti}`},ge.createElement("div",{className:bt.unit},ge.createElement("i",{className:"iconfont icon-danwei1 font14 mr3"}),ti)),ge.createElement("div",{className:bt.tags},ge.createElement("div",null,ge.createElement(Ee.Z,{placement:"bottom",title:"\u7AE0\u8282\u6570"},ge.createElement("span",null,ge.createElement("i",{className:"iconfont icon-zhangjie1 font14 mr3"}),ge.createElement("span",null,fe.stages_count))),ge.createElement(Ee.Z,{placement:"bottom",title:"\u5B66\u4E60\u4EBA\u6570"},ge.createElement("span",null,ge.createElement("i",{className:"iconfont icon-chengyuan font14 mr3"}),ge.createElement("span",null,fe.members_count)))))))})),!xn.length&&ge.createElement(ve.Z,null)))}},9148:function(Cn,mi,ne){"use strict";ne.d(mi,{jL:function(){return Fe},w9:function(){return En},QD:function(){return Ai},cQ:function(){return Xn.Z},op:function(){return mn},O5:function(){return Gr},_b:function(){return wr},t7:function(){return lt},Gi:function(){return xi},YG:function(){return Pn},qp:function(){return hn},vr:function(){return ro},qE:function(){return zn},Je:function(){return Lt},wb:function(){return ti},cq:function(){return Ht},tp:function(){return Ut}});var bt=ne(59301),Be={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"},Ee="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAE4AAAA0CAYAAAAkEw66AAAAAXNSR0IArs4c6QAAGNVJREFUeF7VmwmwHVWdxr9zuvvu9+3ZXsxCiNkIQZOwEzMgyADjggsWgzPqOAJaMiCjYiGKqDBQAo4iWGAxA+ooMm7gBhSyhBBRIIBSAQlrHuTt7913t97PmfpOd4cXlLAFGO6rW9237719+/z6+6/nPIHX+XHttddaex38nlW2lLO1svq1wJ4aeFMM9CqFnNKoaYVapDAOicfjGEMKqKk2nrx59Lbt5xx6aPR6DEG8Hj/K3xwY0YtjSx2vYnlspLEsX0BRKUBrINtyX+PZp0r3fR+IIgzFSo9EsahFUfSHWIj7Pa919zvf2vlo+rFXdWivObjHJvR8S6vTJORHckV0+4GBAF4InwQlBCAIkEMXgCLA9Mn9WCef4ft8HWkgVIDn6ckwUA/HQfCzoFX71TsP6n/41aL3moHTWotnJnGysPEFx8ZcAtMqGTjh2NmVTL+iDB6BZurjsRSe2SogjhNwMZIngbZbqgXom8N26/KjV3femB7ebRxfE3DbRnW/k8c3LQvv5yCjOFVVqhgCyNnJmAhoxyOFasz1OeCM2lLTJryI4BQQUn1RAhI24Lc1dBjc2K6Nnv2edfP+sLvIvergxqb0vpHA1fk8lre9xBZpZsYKU9sMYiDvAHKaqU4HuANcZrIpcILiezRdo7z0aUw3BoJYI4gELAeI/bjZmBq9+PGNd5x/+unHua8U4KsKbriujxUSV9gW+rwg9WPTfpHgpEgUQgAFJwU6LSDwjSxA8F2jslSBBJaZKwVGJRv1pSAJLyQ8qlwLOA4Q1us31Z58+OTj3rX/E68E3qsGbmhK/6Nt40oIFMJwZ5URFh/cZoGgHQKODeSsaUEiA5iSy6IqYRnfmPq66YojPILbYbqpGXuhRhRrFPMSUaP+6OTAtuPff8ze97xceK8KuJGG/oBl4XsaKMTTsiwDKVXZjm1qsgRBU84TXi5VXqo24/syP5ce2xEg0gBDeAZWFijo79JnpLQxXSo7iICiIyD8qUfdxuQRRx24x5MvB95uBzfW1G+XFn4GoMMojQNOYWUK45b+jG9mW+PvFNAKEkqVYgI583VZcOB7WRrCqGwiaQovU1lAlaXKM/BMQNIGbN0FLGh0lySCVv0OP3aPOnKf2a2XCm+3ghuc1AvzOdwmLSwIwkQlBoxMtgZYCkvwQLafBYo0l2v6gBcCxRxQyifwM9PckRCniXIGbjo8wiI4bgnRRFul0XAZMABbaggVoytvo12vff7Qt/Rc8LqBm5jQndrBr3MFHOwyemaJbGaaAKzMp00zV2O+6VVnSTCPcYCNdrItEGAOcKxpVUQKLjPZ6VHVgEuf3Kf/rLk0Y4ViTpiAEUYKJaEgVDg2OTq1+j3r5w68FHi7TXFDU/El1Yr8VLudDM4IjUpLVWW2Mg0GgubybATNfN/0C5+eqjQ9oO0ngAmR0ZF5X2bKjLRZBUFgNE03AKhcPqk62wJsm+qjvyM4Aa0idFN1zcmvHraq90uvObihqej4YsH6nzCEyHwRB0WFZeZJ05xupsZSp6sty+2mXX2a/5rP0fT8MAHRZpmWph48J38zi6xUF1Vqft9KAg2BES6PmyChGGFTBVJ1kb/dq7XeeuTBs0deLLxXrLhHn2nP6+4s3Gk7Yl6Q5mpZMMjAGWjT0o+dgkR6BVnUzJSW2PpzhpHVqIygdPiEET3rzwiHP2QCSlrjUm1epE0el+R1/E6SmjDa2nGEat5Bu9089bC9O7/1moDT0GJkMv5eR6f1oVY7MRfjp2SiNgOO5pkFBpnkadmD/qflRrAtiUrBhJFdPnauJhI6SU6noXSyb2BmUZUqzYKEqSSSZ6SUSU34WagYVUsg9N27R7DtkONWrmRcf8HHK1Lc4EjrqHJn6ZdxBIsXkXU2MqVZqU/ja5ZU/MyWR5/Bps1/wfD2p+G7TUy1QziWRHfZgVXsREd3H1YtnoW+vl709nSjv7f0V4MwPnRaRUGlxSm8rG7N0pAMlim/CE4Jk+tRbTxmAoYK4Qit/Mhb9/a9eze9ILW/YQwv5jvmM/fcs720YMnMDeWStabtJrmVUVaqtsy3sRqgAm+96yH85qbb4DZqWNjfi57uHlRKJViWjSCM0Wr5aDRaqDebqDeaqLkRLFugp7OIQudMrFn+JvT3z8Ee8+dgVldxp+tkpUB42ZZgqLrEnyUq89MkODkunjVVoREFMao5G367een6lZ2fejEQXrbiBgbbn+qZUbyETcWs2KZ/Ynsoi6aMgEPjLVz6Xz/B1OjT2P8tyzB7Zm/i6IMQYRghDGk2ielkLaKIPiiM4PshGk0XzWYDU40a6m6Ickmi3N2Lt+y1B5a+eQ+sXLIQM7rLxi1QiR47I2l3xPizFFyitsQnmqhq8juNks1go2BrDRG4WwMv3veItT1TLwTvZYH7w0NP9y7sn3NPqSgXMiCYRuNz1MbE9eEnRnDhpVdh1fxu7L1iCYIwghcECKMYUfaMY4Rh8jogxJgQNQjP+CECpUK4H8bwPR8tgmzW0Ao8lEsW+vrn4sA1S7Fs2VKsXDIP1UrO3BymMD7PEwvj6wJjnjTTJFAEsUJOJj4y8iMUWIfE8bp1Kzs2virgtg23PtHTV7os9JI0wASFNPWg4vI54LGBMZz/je/i71YvQv/sWXA9D2EYIooiAzCOYoRxDM/z4Xo+PC+Az2MR31NpkU4fpKGUQKRkoiSCjCSiSCAKVPLddgON9hQsK0TXjA7su3YVDjt0Hdbu82ZzbQYgVZb6OJOW0GQjZW54XtACInTkHXjt5kXr9+r4zG4Hd/bZZ8uTTz1rY7liHxiHiR9h+sFAQHNxJMulCGed/x2jtHlv6ofruogILaZpEl6MIAiML2u1XQRhaIDxeKZGqoEAObgoTkBGkUp7bvRRfC0QRpZRkYqk6SjHcYDQryNXVNj/oLX4yIc/iMULZyVVSFr0GxVmlQWDg0xSFG5j372rV1fXr1wpdhldX7Kpbn2mtbqrs7jRkqLIC6VDzgIBwZUKwGXfuwFjA49g331WoO26CSwDh/BieK6HyakaPM9LTZbv0WQJL0r2o9ioMkhN2gDka0JkDhYpExW1FtCQEMKGlg6gbWhTxjPFaKBvZgUfP/njOHz9WrRS5QXG9AkvzeXoHxXrVw0n9puxEm8+dGVlaFeqe8ngBifiT1Y65aUha7+0+M7Sj0IeeOixYXznO1fiHQfvY1REs4wiBoIAcRQZkBOTk/B9P1GSCRBBoraQn/dTmDxOiATGLV+nioxjA49wINjAY4YtIaQFwX1hQYtkn/AtW+Okfzsdf/+OA9H2Uj+XdoiZltBebaGh2a9DrONYvfdtK8q/2L3gaurXxaI4WqUJJH2ETTPltVsaX73wvzG7IjGrrwce4RhoieKCMMDY+LiBZ2AwGJjAQKg0Sx6jCrWBmQAlTJo3vx+ZvIvOXLBEEAJCMPFNQrkBBwnNfcuGMFAFlIqRyxdw+he/gv1WL0PDTftzSicd41jBYaURa/SUHLTrjc+vX9mxy47JS1LcpoGB4qKOuZvzebFMpyUPT0BoTD023P0wfvWL67DfPsvhut4O80z8Woip+hQma41UWVQRDMwEXIQ43Se4OApSYEAYeAijwADSmp1RghPGt3Kb5MMJxEx9VJ2QNu8mYNlQUYj+hUtx9nnnolIpw83KrrSSMOCURmfOQejWr37bis6P7DbFba/ptZal77SlyPFy6WC5ZedBKYWLLrkKs6oOCvl8AoR+zWwjeL6L4dFRuJ5CEGpTsEeBQBD4iFWMWEWIwjpU6Ca+kNswNll+zCgECSkcKM02CQtS/nK0oxPDFDzRIYFSfYRIcFRfzgDktRz7z5/E8Scci7ar0g4xc0aePen0VaSAiLxHutVTe6/cRfn1khQ3OBEdU6xYv4oZbzjJopJISrX96aFtuOaH12D5ogXw/QABVZQFhCDC5NQ4xienEIQCbijh+RKTvXPhVYrIPTGAXLOOOJ4AwhAxzTKomTTEdHy1l/guc5voWTmXSPWFSVAwf7FRH83YuD5jxgQooS3HqE9Bomf2fJx9wcXo7KjAp3swLSZApjPeJUvDioLBkttYvHZtf/v5VPeSwD09Fp9Z7pDnEhzvD1MEqo2d2ut+swEPbr4fM3p7jIqYbhjlBKHxdcMjQ0ZtXmjDbSsMLFqJx048AWDWv/kvWPjNy2DXB5hXAHEIpZqwZNVct1INSFkyoJRyE1g6hjaFnp2IDyrxezqFaMClHQdjsjljsrzuk8/4Cg46ZF9zPQYc05k0qpYswFH+uCW9VYcsm7F994CbiL5fKlkf4lyC1nSswnRlWcBfftVP0RgZRqGQR2jKKd/4JZrpxOQExicmEIQWvDCHhu9gyz99FN76VQCt0AZmnnUxSg/cAUuGEKoJaBdSZjVpBCk7EnDahxRlKHCfjbccNPMis29mWSGMH6TqNKQxWStJVayccQvrjv4ATj7lRLTcpL1k2kym0GUJJlASvuvo6JADV3RtfsngbtXa3gsoBA3k3Rakb8GtiuiaUtk+xveUqRjoU9gmKuYFLr/yGkwMjSBH5xrQ4dNPBaYiGBwehOu24QUCXuhgSnTjsTPOQDxvRjqjrNB31tdRfvwB5O0cEI9BaA9SVhCpGqA56+NAa/oIC5AER2XlmfdDhT60FLBoxlYAof0UnjLukAo1arPyxhev2vcAnHbWOSaJNmWe6elRCAm4TukrS0XvOGivrt+9aHDba8GaQt56r4A8XADztYIVKgimXH6M7iDUebackzJLIm8LlIsSP/jRz/HU1ieQcywDLnHwAWq1BsbGR5M6lYrzJEZmLsHw5z8LlOm0AWwfQ885X0Ol/oypHRFPwpZF2FYXwngEgoBEHpEaNwpTyJsqROsCgupMtFeshLt8Oap/ug8d998CKQgvgICfRFppm/QEBAdg1oIlOOMrF6BcLsAPlCnHIjPvClQcgW4nhFThPxy8ovPXLwjugaGh8uxyzwXlvPOxsoPC9PUaZpYoLZobHtAMtAEhoVDKSXSUHdy+YSN+d9MGFKm4NK0gwKHhUTSaNZPL+ZEFzwXGVrwNk6edlkDjHMLmrei78DzkLR8W18qoEUiRgxR5xKoJ2+ox4EJVh5B9UDqPel8vWgccAW/Naug5Myk84OkJzDn3FOTbIwacFASXJMSC/XOZhxISHTP6ceZ5F6GzuxNekEb5IKlIOvISvU7AhPiog5ZVbtgluE0DurigHPx4RnfunXQXbNJm8wEZQAYCphDs99c9YMqDKbALtjJNyNGRQVx++dWwtDA5GHMyz/ewfXAYntdE4AfwjFkINHsXY+JzXwPmdptGXunKH6D79uuRzxVhqwBKDSFnzTTRNIrHIQXz+RAxTVF1obFqPcY/ehLQVU2CLG+AApwNGzHjR99GTk0Bqg0pvCQ9sRxIY6o5aGmjWOnCmed/A70zZ8INmCpxbGwoAF0Fgd5cEBVkfNj+Szvu2CW4rUPumTN6C+faCijwxqTTeNmXssV+bM1w9oiqm2wToELgt1AtSHQULVxzzU/w5/u2mKUMcRCg3W7hmeFhBF4rKaPY6WDGJDrQnrcUrdX7wRkcQuXe22HHU7CFgDT+zE/AKR9au7CsPkSqAWWiaieG3nkCvPe9G+DSGQrqwUdRuHUjylvvQS4ahaObELoBAVqFSCsJzto4Jkg4OQdn/sd/ord/Plw/MtAIj5Y1oywxq+DXrThae8CKzq3PC+6ux4dndRZ67uut2nM68sn6jWxtx/QvZebKiWKCq7WAmtm2IZSPGR0FjI9uxxVXfB+tqTokYgNu++AQVOSZ1EErunSWRBXTyYASkLIAbdGnMBhI6Lhu5COlA61Ck39JUTHRVAtO73ej0TMbEyeeBj1vjlGauP8RVL7/A+SDQdiowVF1SN02UVaa2fAkl2NU5TNnC5z+5QswY/5iuG4EN1KmhtWxwNwuBws7w+G85S1ftaBr8nnB3f1Y8/hqtfzDzhzQU0qm0v4WOLam6ecIjl2GWhuYaFF5IcamJtFZtNDX4WDzvZvxv9dej9BzoaIIo+Oj0FEAzSxfhyYSa50W5iAU20RNafIuwmol/k0yGPAGJJ0OZSJqHkqWEcU22vPegua/nAR0dxvVWZv+iI6fXomcrsNRDWhNU9UmAWZoVVYOgsFBOCjlLXzqjC+ia+6eaHsRmp5GMScxu8NCf4eF7qKIRBQ8mnfkz4PQ/83SuX/d2BSbHmne3Fktv72vDHQUEsWxGnjuIwPH3hf93FQbGKnTXDUeGhiCFDFmVHPoKlu49dYN+O1vb4alYozXpqBjggvNBHDyYIHDhJVQ+IiSYolFuXHqBQhGT+VCWiUTGaOYQIuIhYWQ34tLcBeugH/ch4DuXmBkEJXvXoB8ewwWXGiT77GWSBoA9G9cKBcLB92dFZx02umI8r0m9Vszv4QVsx10FYUZu7GuNHeuN1XkB9FN7Xbwmb0XVh/KuIhNWwOvs2Tn+6rCZAecITezU9PWc5i0Ml0JZKbfwsTHDU0Bky6wYcs20w7qrThGeaW8xJ0bN+HW2+5Eo9k0lQT9jWkEMVHl2dnhoNp4VLBc4uI4JrKRAcgEO7HDXFLQE64oGNz0k0pUkvUhCxZDrz4A4tEHkXvwLtgihNSJa0gEQNfAXp0NZTnGVSxeuADHHHcCpJXD+9f0YcUc2zRgn6sXnr9O3yeBlqeGJyfDE1cvKlxvkuvfP6512QF6y8kCFwYHllHZsgSezAwh7ZhyPIRHH/fMJDDWAn72x8dQb7XRVbZNoKgWLBRyAvfe/wBuuf0u1CYnIWVaQ9K5pRMrdNw8v5khM2rjZ2iYVGJWfxJunJbwBGjm0kx6ohj/zQpryyS82lKQpopgI0AnLodmaop9C4rVAwTWH3wgluy9Fh/cbxbWLSqa6idbJfpcS3PNupNkQnuioVrDk976I1eV7xW3b2lvL5eKczoLQKWQrIqk6rIeWwYuWw1kymwFTLaAgQlgsK5xxa1bUGu66ChYqOSpXMss4Ms5EtsGnsatGzahMTaWhutsLWsaug2s7F5nix7S/CKZ/08L+7RlZMqpDJ4hk62JShWbLj805Ve2II9zlCbJQqW7C/sftA4HrZiPUw/vRweD7S7A0a/XXW1SsLYSeGpIbxiZeOpIccufG8dVOys/5r2o5JNVQaw9WUrxhDRbk46k62/5moobbySKu397gK/9ZgsKFlDNSZQJzhHI2xKOJVDISTRbbfzpwS0YePxxxL73rJzNwNJZ62yG2dzydNlOUqVnK4PTdpKRWLqfLe/JPpO9nuZnTFRNyFj5Apbtswr5rpn4wpELcPiyqhHKrhTHsTJ4TLnCWNdgA3Dr/lHiuo2j1XJf7x2VvNiHTbZyBs9OA8U02zcTMjKJrsNTwEgT+NE9ow9864Ytt/dVZVDNW6LsSBT5XUsgZ7P7L5BzbDPX+qeHH8HAlr+YZQeJjSWpwk4P2pdhk05mcHfHa3YyzXKa9GD6mez9hOiOhHjHwjzzOzZ65s3B/D2XolSt7nnh+5a9a0mfZcZLkTz3MrJronVxoQ+ziPEWsL3GXDZ60NjIr/6sjynk8EsHEPRxDBK8E1ztw+k+njhHFTqJCTMl4Qm21eDd/KR7+NePLt35fPnO/8fj592ljz5sPn49rwBUC4mF0bqmp2HZMguKhOC4kpPpF8fNgLEjkPzyz/qzjo3zcwKSyqOfy2avePKuNHgwUjEB3j4FbB1R973/3zfsh9ten/+nerk35RM36MPfswdu2qMDoqOY9BO59jhb6zJdbVneyhSMixPpnphR7BSBr3tAf9i2cH45j9k0Dy58Zreitwr0dSRK5J0YbwJDLfo39eWTDrTOebkDeL2+13e5nnPZfrh/UTdmVvOJb6fq6OsIzziK9H8lCI6RldtMcX46ZbDT9V//oJ6fAz4iBI7VMfYp5SBmEFw1uTNcezFcB56YQPv329qHfPXo8n2vF4BX8rsXbdS/WD0L72ZThfA4NrqiLIdlMGSfjtBYn1Nx9HH1wDQ7Nj9v6/zGB3S5HWCvUlFfvWiGWMYFQpQzzXSoAfxlWD1w0X1y33tPEkyy33CPk6/TBx8yF7f05pDjuIrOzuaaVUoExxKT43a5akFCtVys3+Wcwweu1dbHV+LxN3VhPsEx8jANGfOAh4eiL5x0iHPeG47YtAv+9I3xp9f0yIvLDAw6ySIY/ExSnpkqVcels/x/syLgtXHpx9bhlF2CO/tanVuzHHfPqmJVOf0nNdr5SFP7D02Eb/3iEfkdtdsbFeCXbtYfXlDGueU85iKZsjXZklnpyZdpGmgWFcS4pGsQnzvuOBG/4CzXFX/Qp+zZi28pPzkZHeNIS337X2+Qp+IckWajb1RsyXWffqOeN8tRH+rKyWOhsSBnYyYziiCAa0k8EQKb2kF01acPc3akXS8IbsW1Onf6AnVib16ewqWz21vq9qu2yNPeqL7thW7xZ65391jcV1jE/1qKFcaeCfDwOYeK9D83nv32/wHzrWgvjJ8Q7AAAAABJRU5ErkJggg==",Fe=({dataSource:si=[],img:ui,imgWidth:Ci=346,title:Ri,sunTitle:Tr,bannerExtraContent:Ue})=>bt.createElement("div",{className:Be.banner},bt.createElement("div",{className:Be.content},bt.createElement("aside",null,bt.createElement("p",null,bt.createElement("b",null,Ri),bt.createElement("span",null,Tr)),si.length>0&&bt.createElement("div",{className:Be.btns},si.map((Ie,Le)=>bt.createElement("div",{key:Le,onClick:Ie.click},Ie.name,Ie.sign?bt.createElement("img",{src:Ee,width:39}):null))),Ue),ui&&bt.createElement("img",{style:{marginTop:33,marginRight:38},src:ui,width:Ci}))),we={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"},ve=ne(92310),Qe=ne.n(ve),ge=ne(89392),hn=({dataSource:si=[],value:ui,onChange:Ci,onTitleChange:Ri,className:Tr,title:Ue,titleWidth:Ie=41,style:Le={},fontColor:We="#6A7283",showCount:wi})=>{const[hi,Yi]=(0,bt.useState)(0),[sn,He]=(0,bt.useState)(!1),li=(0,bt.useRef)(null),_i=(0,bt.useRef)(null);return(0,bt.useEffect)(()=>{var un;si.length!==0&&(((un=li==null?void 0:li.current)==null?void 0:un.clientHeight)>97?Yi(1):Yi(0)),si.length===0&&Yi(0),He(!1)},[si]),bt.createElement("div",{className:Qe()(we.row,Tr),style:Le},bt.createElement("div",{onClick:(0,ge.throttle)(()=>Ri==null?void 0:Ri(),2e3),style:{width:Ie,marginTop:sn?12:4},className:`${we.title} ${Ri?"current":""}`},Ue),bt.createElement("div",{className:sn?`${we.tagsWrap} ${we.tagsBorderWrap}`:we.tagsWrap},bt.createElement("div",{className:we.bar,ref:_i,style:hi>0?{height:hi===1?97:"auto",overflow:hi===1?"hidden":"auto",paddingRight:55}:{paddingRight:0}},bt.createElement("div",{className:we.tag,ref:li},si==null?void 0:si.map(un=>bt.createElement("span",{onClick:()=>Ci(un.id),key:un.id,style:{color:We},className:ui===un.id?we.active:""},bt.createElement("span",{title:un.name,className:we.name},un.name),!!wi&&bt.createElement("span",{className:we.num},un.count))))),!!hi&&bt.createElement(bt.Fragment,null,hi===1?bt.createElement("div",{onClick:()=>{var un;Yi(2),((un=li==null?void 0:li.current)==null?void 0:un.clientHeight)>245?He(!0):He(!1)},className:we.action},"\u5C55\u5F00",bt.createElement("i",{style:{transform:"translateY(1px) scale(0.6)"},className:"iconfont icon-zhankai4"})):bt.createElement("div",{onClick:()=>{_i.current.scrollTop=0,Yi(1),He(!1)},className:we.action},"\u6536\u8D77",bt.createElement("i",{style:{transform:"translateY(0px) scale(0.6)"},className:"iconfont icon-shouqi3"})))))},Se={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"},Ut=({dataSource:si=[],value:ui,onChange:Ci,className:Ri,style:Tr={}})=>bt.createElement("div",{style:Tr,className:Qe()(Se.tabs,Ri)},si.map(Ue=>bt.createElement("span",{onClick:()=>Ci(Ue.id),className:ui===Ue.id?Se.active:"",key:Ue.id},Ue.name))),et={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"},nt=ne(37568),lt=({dataSource:si=[],value:ui="",onChange:Ci,onInputChange:Ri=()=>{},className:Tr,style:Ue={},placeholder:Ie,allowClear:Le=!1})=>{var We;const[wi,hi]=(0,bt.useState)(""),[Yi,sn]=(0,bt.useState)("");(0,bt.useEffect)(()=>{var _i;let un=ui;(_i=JSON.stringify(ui))!=null&&_i.includes("{")&&(hi(ui.id),un=ui.value||"");try{sn(decodeURIComponent(un||""))}catch(Yt){sn(decodeURIComponent(un||""))}},[ui]);const He=()=>{Ci(encodeURIComponent(Yi),wi||null)},li=_i=>{_i!==wi&&(hi(_i),Ci(encodeURIComponent(Yi),_i))};return bt.createElement("div",{className:Qe()(et.input,Tr),style:Ue},!!si.length&&bt.createElement("div",{className:et.dropdown},bt.createElement("div",{className:et.text},(We=si.find(_i=>_i.id===wi))==null?void 0:We.name,bt.createElement("i",{className:"iconfont icon-zhankai4"}),bt.createElement("b",{className:et.b1}),bt.createElement("b",{className:et.b2})),bt.createElement("div",{className:et.menu},si.map((_i,un)=>bt.createElement("div",{key:un,onClick:()=>li(_i.id)},_i.name)))),bt.createElement(nt.default,{onPressEnter:He,value:Yi,onChange:_i=>{sn(_i.target.value),Ri(encodeURIComponent(_i.target.value),wi||null)},bordered:!1,placeholder:Ie}),bt.createElement("i",{onClick:He,className:"iconfont icon-sousuo9 font14 pl10 current"}))},gt={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"},Lt=({value:si,onChange:ui,className:Ci,total:Ri,pageSize:Tr,style:Ue={}})=>{const Ie=si<2,Le=si>=Math.ceil(Ri/Tr);return Ri<=Tr?bt.createElement(bt.Fragment,null):bt.createElement("div",{className:Qe()(gt.quickPager,Ci),style:Ue},bt.createElement("div",{onClick:()=>{Ie||ui(si-1,"prev")},className:Ie?gt.disabled:""},"\u4E0A\u4E00\u9875"),bt.createElement("div",{onClick:()=>{Le||ui(si+1,"next")},className:Le?gt.disabled:""},"\u4E0B\u4E00\u9875"))},It={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"},Wt=ne(29787),qt=ne(25399),he=ne(58018),fe=ne(346),Ae=ne(51257),Ve=ne(96908),ye=ne(57177),on=ne(81378),pn=ne(28426),ti=({className:si,dataSource:ui=[],col:Ci=4,right:Ri,bottom:Tr=23,precision:Ue=0,wrapWidth:Ie=1200,trackEventItems:Le,loading:We})=>{const wi=Math.floor((Ie-(Ci-1)*Ri)/Ci);return bt.createElement(Wt.Z,{spinning:We},bt.createElement("div",{className:Qe()(It.list,si)},!!ui.length&&ui.map((hi,Yi)=>{const{name:sn,id:He,identifier:li,power:_i,cover_image_id:un,pic:Yt}=hi;return bt.createElement("div",{className:It.wrap,key:He,style:{width:wi,marginRight:(1+Yi)%Ci===0?0:Ri+Ue,marginBottom:Tr}},bt.createElement("a",{target:"_blank",href:`/shixuns/${li}/challenges`,className:It.li,onClick:de=>{de.preventDefault(),Le&&(0,Ae.L9)([Le]),_i&&(0,Ae.xg)(`/shixuns/${li}/challenges`)}},bt.createElement("div",{className:It.img},bt.createElement("img",{className:It.cover,src:`${Yt}`}),hi.is_jupyter&&bt.createElement("img",{className:It.sign,src:Ve}),hi.is_jupyter_lab&&bt.createElement("img",{className:It.sign,src:ye}),hi.is_unity_3d&&bt.createElement("img",{className:It.sign,src:on})),bt.createElement("div",{className:It.name},bt.createElement(qt.Z,{title:sn||"\u5B9E\u8DF5\u9879\u76EE\u540D\u79F0-\u672A\u586B\u5199"},bt.createElement("span",{className:It.e},sn||"\u5B9E\u8DF5\u9879\u76EE\u540D\u79F0-\u672A\u586B\u5199"))),bt.createElement("div",{className:It.tags},bt.createElement(qt.Z,{placement:"bottom",title:"\u5173\u5361\u6570"},bt.createElement("span",null,bt.createElement("i",{className:"iconfont icon-shixunguanqia font14 mr2"}),bt.createElement("span",null,hi.challenges_count))),!!hi.myshixuns_count&&bt.createElement(qt.Z,{placement:"bottom",title:"\u5B66\u4E60\u4EBA\u6570"},bt.createElement("span",null,bt.createElement("i",{className:"iconfont icon-chengyuan font14 mr2"}),bt.createElement("span",null,hi.myshixuns_count))),bt.createElement(qt.Z,{placement:"bottom",title:"\u96BE\u5EA6\u7B49\u7EA7"},bt.createElement("span",null,bt.createElement("span",null,hi.level))),bt.createElement("div",{className:It.rate},bt.createElement(he.Z,{allowHalf:!0,disabled:!0,defaultValue:hi.score_info}),bt.createElement("span",null,"\xA0",hi.score_info?`${hi.score_info}\u5206`:"5\u5206")))),!_i&&bt.createElement("div",{className:It.lockWrap},bt.createElement("img",{src:`${fe.Z.IMG_SERVER}/images/educoder/icon/lockclose.svg`}),bt.createElement("span",{className:"mt15 font16 c-white"},"\u5B9A\u5411\u5F00\u653E\u5185\u5BB9\uFF0C\u9700\u8981\u6388\u6743")))}),!ui.length&&bt.createElement(pn.Z,null)))},Xn=ne(10661),Li={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"},Ii="data:image/png;base64,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",ue=ne(59301),En=({className:si,dataSource:ui=[],col:Ci=4,right:Ri,bottom:Tr=23,precision:Ue=0,wrapWidth:Ie=1200,trackEventItems:Le,loading:We,handleVery:wi=()=>!0})=>{const hi=Math.floor((Ie-(Ci-1)*Ri)/Ci);return ue.createElement(Wt.Z,{spinning:We},ue.createElement("div",{className:Qe()(Li.list,si)},!!ui.length&&ui.map((Yi,sn)=>{const{subject_identifier:He,id:li,identifier:_i,power:un}=Yi,Yt=Yi.is_public!=0&&Yi.is_public;return ue.createElement("div",{className:Li.wrap,key:li,style:{width:hi,marginRight:(1+sn)%Ci===0?0:Ri+Ue,marginBottom:Tr}},ue.createElement("a",{className:Li.li,onClick:de=>{de.preventDefault(),wi(Yi==null?void 0:Yi.first_category_url)&&(Le&&(0,Ae.L9)([Le]),(0,Ae.xg)(Yi.first_category_url))}},ue.createElement("div",{className:Li.top},ue.createElement(qt.Z,{title:Yi.name},ue.createElement("div",{className:Li.name},Yi.name)),ue.createElement("img",{className:Li.img,src:fe.Z.IMG_SERVER+"/images/"+Yi.avatar_url}),ue.createElement("div",{className:Li.text,title:Yi.creator},Yi.creator),He&&ue.createElement("div",{className:Li.btns},ue.createElement("div",null,"\u5F00\u653E\u8BFE\u7A0B"),ue.createElement("aside",null,"\u5F00\u653E\u8BFE\u5802")),Yt&&ue.createElement("div",{className:Li.sign},"\u516C\u5F00")),ue.createElement("div",{className:Li.bottom},Yi.visits>0&&ue.createElement(qt.Z,{title:"\u8BBF\u95EE\u91CF",placement:"bottom"},ue.createElement("span",null,ue.createElement("i",{className:"iconfont icon-liulanyan"}),ue.createElement("span",null,Yi.visits))),Yi.course_members_count>0&&ue.createElement(qt.Z,{title:"\u6210\u5458",placement:"bottom"},ue.createElement("span",null,ue.createElement("i",{className:"iconfont icon-chengyuan"}),Yi.course_members_count)),Yi.tasks_count>0&&ue.createElement(qt.Z,{title:"\u4F5C\u4E1A",placement:"bottom"},ue.createElement("span",null,ue.createElement("i",{className:"iconfont icon-zuoye"}),Yi.tasks_count)),Yi.is_end?ue.createElement("div",{style:{color:"#6B758B"}},"\u5DF2\u7ED3\u675F"):ue.createElement("div",{style:{color:"#00B187"}},"\u8FDB\u884C\u4E2D"))),!Yi.is_accessible&&ue.createElement("div",{className:Li.lockWrap},ue.createElement("img",{src:`${fe.Z.IMG_SERVER}/images/educoder/icon/lockclose.svg`}),ue.createElement("span",{className:"mt15 font16 c-white"},"\u975E\u8BFE\u5802\u6210\u5458\u4E0D\u53EF\u8FDB\u5165")))}),!ui.length&&ue.createElement(pn.Z,null)))},Si={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"},pi=ne(25690),Pn=({dataSource:si=[],value:ui,onChange:Ci,className:Ri,style:Tr={},tabBarExtraContent:Ue})=>bt.createElement("div",{className:Qe()(Si.tabs,Ri),style:Tr},bt.createElement("div",{className:Si.tabsWrap},si.map((Ie,Le)=>!(Ie!=null&&Ie.hide)&&bt.createElement("aside",{className:Si.tab,onClick:()=>{Ci(Ie.id),Ie.link&&pi.history.push(Ie.link)},key:Le},bt.createElement("div",{className:ui===Ie.id?Si.active:""},Ie.name),(Ie==null?void 0:Ie.resetCount)==null&&(Ie==null?void 0:Ie.total)!==void 0&&bt.createElement("span",null,"\uFF08",Ie==null?void 0:Ie.total,"\uFF09"),(Ie==null?void 0:Ie.resetCount)!==void 0&&(Ie==null?void 0:Ie.total)!==void 0&&bt.createElement(qt.Z,{title:(Ie==null?void 0:Ie.tip)!=null?Ie==null?void 0:Ie.tip:""},bt.createElement("span",{style:{color:"#9096A3"}},"\uFF08",bt.createElement("span",{style:{color:"#000"}},Ie==null?void 0:Ie.resetCount),"/",bt.createElement("span",null,Ie==null?void 0:Ie.total),"\uFF09"))))),bt.createElement("div",{className:Si.tabBar},Ue)),xi=({className:si,style:ui={},children:Ci})=>bt.createElement("div",{className:Qe()(si),style:ui},Ci),kn={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"},Ce=ne(75727),Ge=ne(93041);const gi=[{id:"updated_at",name:"\u6700\u65B0\u52A8\u6001"},{id:"created_at",name:"\u6700\u65B0\u521B\u5EFA"},{id:"name",name:"\u540D\u79F0\u6392\u5E8F"}];var Ht=({sortValue:si,dropValue:ui,className:Ci,onSort:Ri,onDrop:Tr,dataSource:Ue=gi})=>{var Ie;return bt.createElement("div",{className:Qe()(kn.orderWrap,Ci)},bt.createElement(Ce.Z,{dropdownRender:()=>bt.createElement(Ge.default,null,Ue.map((Le,We)=>bt.createElement(Ge.default.Item,{key:We,onClick:()=>Tr(Le.id)},Le.name)))},bt.createElement("span",{className:kn.orderTextWrap},(Ie=Ue.find(Le=>ui===Le.id))==null?void 0:Ie.name)),bt.createElement("span",{className:kn.orderIconWrap},bt.createElement("span",{className:kn.orderAsc},bt.createElement("i",{className:si==="asc"?`iconfont icon-sanjiaoxing-up font12 ${kn.cursorPointer} ${kn.active}`:`iconfont icon-sanjiaoxing-up font12 ${kn.cursorPointer}`,onClick:()=>Ri(si==="asc"?"desc":"asc")})),bt.createElement("span",{className:kn.orderDesc},bt.createElement("i",{className:si==="desc"?`iconfont icon-sanjiaoxing-down font12 ${kn.cursorPointer} ${kn.active}`:`iconfont icon-sanjiaoxing-down font12 ${kn.cursorPointer}`,onClick:()=>Ri(si==="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"},Ct=ne(99571),Nt=Object.defineProperty,Kt=Object.getOwnPropertySymbols,kt=Object.prototype.hasOwnProperty,be=Object.prototype.propertyIsEnumerable,An=(si,ui,Ci)=>ui in si?Nt(si,ui,{enumerable:!0,configurable:!0,writable:!0,value:Ci}):si[ui]=Ci,ze=(si,ui)=>{for(var Ci in ui||(ui={}))kt.call(ui,Ci)&&An(si,Ci,ui[Ci]);if(Kt)for(var Ci of Kt(ui))be.call(ui,Ci)&&An(si,Ci,ui[Ci]);return si},Je=(si,ui)=>{var Ci={};for(var Ri in si)kt.call(si,Ri)&&ui.indexOf(Ri)<0&&(Ci[Ri]=si[Ri]);if(si!=null&&Kt)for(var Ri of Kt(si))ui.indexOf(Ri)<0&&be.call(si,Ri)&&(Ci[Ri]=si[Ri]);return Ci},rn=(si,ui,Ci)=>new Promise((Ri,Tr)=>{var Ue=We=>{try{Le(Ci.next(We))}catch(wi){Tr(wi)}},Ie=We=>{try{Le(Ci.throw(We))}catch(wi){Tr(wi)}},Le=We=>We.done?Ri(We.value):Promise.resolve(We.value).then(Ue,Ie);Le((Ci=Ci.apply(si,ui)).next())}),mn=si=>{var ui=si,{className:Ci,style:Ri,children:Tr,loading:Ue=!1,openLoading:Ie,onClick:Le=()=>{},size:We="middle",shape:wi="round"}=ui,hi=Je(ui,["className","style","children","loading","openLoading","onClick","size","shape"]);const[Yi,sn]=(0,bt.useState)(!1);return bt.createElement(Ct.ZP,ze({onClick:(0,ge.throttle)(He=>rn(void 0,null,function*(){Ie&&sn(!0);try{yield Le(He)}catch(li){console.log("error",li)}Ie&&sn(!1)}),2e3,{leading:!0,trailing:!1}),className:Qe()(Et.btn,Et[`${We}-${wi}`],Ci),style:Ri,size:We,shape:wi,loading:Yi||Ue},hi),Tr)},cn={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"},zn=({className:si,style:ui,children:Ci=null,onClick:Ri,title:Tr})=>bt.createElement("div",{className:Qe()(cn.head,si),style:ui},bt.createElement("span",{className:"primary-hover",onClick:Ri},bt.createElement("i",{className:"iconfont icon-fanhui2 font12"}),"\u8FD4\u56DE"),bt.createElement("b",{title:Tr},Tr),bt.createElement("div",{className:cn.node},Ci)),dn={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"},Ai=({confirmShow:si=!0,confirmTitle:ui,confirmClick:Ci,cancelShow:Ri=!0,cancelTitle:Tr,cancelClick:Ue,className:Ie,style:Le,confirmLoading:We=!1})=>bt.createElement("div",{className:Qe()(dn.btns,Ie),style:Le},si&&bt.createElement(Ct.ZP,{loading:We,onClick:Ci,type:"primary",className:dn.confirm},ui),Ri&&bt.createElement(Ct.ZP,{onClick:Ue,className:dn.cancel},Tr)),Zi={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"},ro=({className:si,style:ui={},LeftContent:Ci,children:Ri,RightContent:Tr})=>bt.createElement("div",{className:Qe()(Zi.fixedBottom,si),style:ui},bt.createElement("div",{className:Zi.wrap},bt.createElement("div",{className:Zi.left},Ci),bt.createElement("div",{className:Zi.center},Ri),bt.createElement("div",{className:Zi.right},Tr))),ar={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"},wr=({className:si,style:ui={},dataSource:Ci=[]})=>bt.createElement("div",{className:Qe()(ar.crumbs,si),style:ui},Ci.map((Ri,Tr)=>Tr<Ci.length-1?bt.createElement(bt.Fragment,{key:Tr},Ri.path||Ri.onClick?bt.createElement("span",{className:ar.hover,onClick:Ri!=null&&Ri.onClick?Ri.onClick:()=>pi.history.push(Ri.path)},Ri.name):bt.createElement("span",null,Ri.name),bt.createElement("span",null,"\xA0",">","\xA0")):bt.createElement("span",{key:Tr,style:{color:"#5F6368"}},Ri.name))),mo=ne(11938),Eo=Object.defineProperty,Hr=Object.defineProperties,Ur=Object.getOwnPropertyDescriptors,no=Object.getOwnPropertySymbols,_o=Object.prototype.hasOwnProperty,bo=Object.prototype.propertyIsEnumerable,Mo=(si,ui,Ci)=>ui in si?Eo(si,ui,{enumerable:!0,configurable:!0,writable:!0,value:Ci}):si[ui]=Ci,oo=(si,ui)=>{for(var Ci in ui||(ui={}))_o.call(ui,Ci)&&Mo(si,Ci,ui[Ci]);if(no)for(var Ci of no(ui))bo.call(ui,Ci)&&Mo(si,Ci,ui[Ci]);return si},Er=(si,ui)=>Hr(si,Ur(ui)),Rr=(si,ui)=>{var Ci={};for(var Ri in si)_o.call(si,Ri)&&ui.indexOf(Ri)<0&&(Ci[Ri]=si[Ri]);if(si!=null&&no)for(var Ri of no(si))ui.indexOf(Ri)<0&&bo.call(si,Ri)&&(Ci[Ri]=si[Ri]);return Ci};const{Countdown:Pt}=mo.default;var Gr=si=>{var ui=si,{onChange:Ci}=ui,Ri=Rr(ui,["onChange"]);const[Tr,Ue]=(0,bt.useState)(null);(0,bt.useEffect)(()=>{typeof Tr=="number"&&Tr>=0&&Ci(Tr)},[Tr]);const Ie=Le=>{const We=Math.floor(Le/1e3);Ue(We)};return bt.createElement(Pt,Er(oo({},Ri),{onChange:Ie}))}},37808:function(Cn,mi,ne){"use strict";ne.d(mi,{Z:function(){return Be}});var bt=ne(59301);function Be(Ee,Ze){const Fe=(0,bt.useRef)();(0,bt.useEffect)(()=>{Fe.current=Ee}),(0,bt.useEffect)(()=>{function we(){Fe.current()}if(Ze!==null){let ve=setInterval(we,Ze);return()=>clearInterval(ve)}},[Ze])}},73752:function(Cn,mi,ne){"use strict";ne.r(mi),ne.d(mi,{default:function(){return Ce}});var bt=ne(59301),Be=ne(6767),Ee=ne(62957),Ze=ne(29787),Fe=ne(37639),we=ne(47889),ve=ne(77736),Qe={flex_box_center:"flex_box_center___Ja97S",flex_space_between:"flex_space_between___RJu4E",flex_box_vertical_center:"flex_box_vertical_center___jhPTF",flex_box_center_end:"flex_box_center_end___ZtezU",flex_box_column:"flex_box_column___MqeI4",wrap:"wrap___k3OOZ",head:"head___h6t3O",empty:"empty___S6QaM",content:"content___sMZPl",left:"left___J41Si",title:"title___GUZvZ",add:"add___zhwIv",leftBar:"leftBar___u_UUF",li:"li___Hnrra",active:"active___N4MxL",right:"right___eLWWO",rightBar:"rightBar___fMTLo",center:"center____NDzP",tabs:"tabs___jdS5u",cut:"cut___w1Pz_",action:"action___QkQ0f",tagBtn:"tagBtn___g2gHo",actActive:"actActive___ESHzD",answers:"answers___dVktP",btn:"btn___BnDvU",disableBtn:"disableBtn___WYJSQ",open_md:"open_md___Qcc2e",tip_container:"tip_container___cApBC",container_text:"container_text___riFvY",btn_send:"btn_send___jN38z",hide:"hide___wZuLt","md-container":"md-container___Am7nQ",unsolved:"unsolved___z4SON",box:"box____EpoE",hot:"hot___oUwVX",animation:"animation___YQjk7",stop:"stop___R1QBJ",disabledElement:"disabledElement___jKwzo",text:"text___Si2da",md_editor:"md_editor___vGEmh"},ge=ne(38986),se=ne(25690),hn=ne(51257),Se=ne(346),xn=ne(3878),Ut=ne(61186),et=ne.n(Ut),nt="data:image/png;base64,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",ct=ne(39793),lt=ne(76902),gt=ne(56102),yt=ne(44164),Lt=ne.n(yt),It=(Ge,gi,yi)=>new Promise((Ht,Et)=>{var Ct=kt=>{try{Kt(yi.next(kt))}catch(be){Et(be)}},Nt=kt=>{try{Kt(yi.throw(kt))}catch(be){Et(be)}},Kt=kt=>kt.done?Ht(kt.value):Promise.resolve(kt.value).then(Ct,Nt);Kt((yi=yi.apply(Ge,gi)).next())});const Wt=Ge=>{const gi=/```[a-z]*\n([\s\S]*?)```/g;return Ge.replace(gi,(yi,Ht)=>`<code>${Ht.trim()}</code>`)},qt=(Ge,gi,yi)=>{const Ht={markdown:"text/markdown",html:"text/html"},Et=new Blob([Ge],{type:Ht[yi]}),Ct=URL.createObjectURL(Et),Nt=document.createElement("a");Nt.href=Ct,Nt.download=gi,Nt.click(),URL.revokeObjectURL(Ct)},he=Ge=>et()(Ge).format("YYYY-MM-DD HH:mm:ss"),fe=(Ge,gi,yi)=>Ge.map((Ht,Et)=>`
${Et!==0?`
<div class="message">
<p class="user-name">${gi}<span class="timestamp">${he(Ht.updated_at)}</span></p>
<pre class="code">${Wt(Ht.question)}</pre>
</div>`:""}
<div class="message">
<p class="user-name">${yi}<span class="timestamp">${he(Ht.updated_at)}</span></p>
<pre class="code">${Wt(Ht.answer)}</pre>
</div>
`).join(""),Ae=(Ge,gi,yi)=>Ge.map((Ht,Et)=>`${Et!==0?`${gi}
${he(Ht.updated_at)}
${Ht.question}
`:""}${yi}
${he(Ht.updated_at)}
${Ht.answer}
`).join(""),Ve=(Ge,gi)=>It(void 0,null,function*(){const yi=fe(Ge.data,Ge.my_user_name,Ge.user_name),Ht=Ae(Ge.data,Ge.my_user_name,Ge.user_name),Et=`export-id-${String(Math.random()).slice(-6)}`,Ct=`
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<style>
.wrap {
font-family: Arial, sans-serif;
line-height: 1.6;
color: #333;
padding: 20px 20px 0 20px;
background-color: #f9f9f9;
position:fixed;
left: 0;
top: 0;
z-index: 100;
width: 100vw;
height: 100vh;
overflow: auto;
box-sizing: border-box;
}
.message {
margin-bottom: 20px;
padding: 10px;
border-radius: 5px;
background-color: #fff;
box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}
.user-name {
font-weight: bold;
color: #333;
margin: 0;
}
.timestamp {
display: block;
font-size: 0.8em;
color: #666;
margin-top: 5px;
}
pre.code {
background-color: #f5f5f5;
padding: 10px;
border-radius: 5px;
overflow-x: auto;
white-space: pre-wrap;
word-wrap: break-word;
margin: 10px 0 0;
}
</style>
</head>
<body>
<div class='wrap' id=${Et}>
${yi}
</div>
</body>
</html>
`;if(gi.key==="html")qt(Ct,`\u4E0E${Ge.user_name}\u5BF9\u8BDD\u5185\u5BB9.html`,"html");else if(gi.key==="markdown")qt(Ht,`\u4E0E${Ge.user_name}\u5BF9\u8BDD\u5185\u5BB9.md`,"markdown");else if(gi.key==="pdf"){const Nt=Ee.default.info({icon:null,width:460,title:"\u63D0\u793A",content:"\u6B63\u5728\u5BFC\u51FAPDF\u4E2D...",maskClosable:!1,keyboard:!1,okButtonProps:{style:{display:"none"}}}),Kt=document.createElement("div");Kt.innerHTML=Ct.replaceAll("box-shadow","// box-shadow"),document.body.appendChild(Kt);const kt=document.getElementById(Et);if(!kt){console.error("PDF \u5143\u7D20\u672A\u627E\u5230");return}kt.style.width="auto",kt.style.height="auto",kt.style.position="initial";const be={html2canvas:{letterRendering:!0,useCORS:!0,allowTaint:!1},jsPDF:{unit:"in",format:"letter",orientation:"portrait"},pagebreak:{mode:["avoid-all"]}};Lt()().set(be).from(kt).toPdf().get("pdf").save(`\u4E0E${Ge.user_name}\u5BF9\u8BDD\u5185\u5BB9.pdf`).finally(()=>{Nt.destroy(),document.body.removeChild(Kt)})}});var ye={cursor:"cursor___XqlqI"},pn=({text:Ge,open:gi=!1,onTextChange:yi})=>{const[Ht,Et]=(0,bt.useState)(""),[Ct,Nt]=(0,bt.useState)(0),[Kt,kt]=(0,bt.useState)(!0);return(0,bt.useEffect)(()=>{if(gi)if(Ct<Ge.length){kt(!1);const be=setTimeout(()=>{Et(An=>An+Ge[Ct]),Nt(Ct+1),yi()},50);return()=>clearTimeout(be)}else kt(!0),yi();else Et(Ge),Nt(0),kt(!0)},[Ct,Ge,gi]),bt.createElement(lt.Z,{value:Ht+(Kt?"":`<span class='${ye.cursor}'></span>`)})},Vn={menuWrap:"menuWrap___GDodS",menuMask:"menuMask___dldKr",menu:"menu___OrkS3",itemTwo:"itemTwo___gOXTT",item:"item___XhZWJ",itemDisabled:"itemDisabled___pRoiI",menuWrapRight:"menuWrapRight___Tgo4N"},ti=ne(9148),Xn=ne(92310),Li=ne.n(Xn),ue=({disabled:Ge=!1,recoverDisabled:gi=!1,onFileType:yi,onRecover:Ht,onEmpty:Et})=>{const[Ct,Nt]=(0,bt.useState)(!1),[Kt,kt]=(0,bt.useState)(!1),be=(0,bt.useRef)(null),An=[{key:"html",label:"\u5BFC\u51FA\u6210HTML"},{key:"markdown",label:"\u5BFC\u51FA\u6210Markdown"},{key:"pdf",label:"\u5BFC\u51FA\u6210PDF"}],ze=()=>{if(!Ge){if(be.current){const Je=be.current.getBoundingClientRect(),rn=window.innerWidth-Je.right;kt(rn>300)}Nt(!0)}};return console.log(Kt),bt.createElement("div",{ref:be,className:Li()(Vn.menuWrap,Kt&&Vn.menuWrapRight),onMouseEnter:ze,onMouseLeave:()=>Nt(!1)},bt.createElement(ti.op,{disabled:Ge},bt.createElement("i",{className:"iconfont icon-gengduo6 font12 mr5"}),"\u66F4\u591A\u64CD\u4F5C"),bt.createElement("div",{className:Vn.menuMask,style:{display:Ct?"block":"none"}},bt.createElement("div",{className:Vn.menu},bt.createElement("div",{className:Vn.itemOne},bt.createElement("div",{className:Vn.item,style:{cursor:"auto"}},bt.createElement("span",null,"\u5BFC\u51FA\u5BF9\u8BDD"),bt.createElement("div",{className:Vn.itemTwo},An.map(Je=>bt.createElement("div",{key:Je.key,onClick:()=>{Nt(!1),yi(Je)},className:Vn.item},Je.label)))),gi?bt.createElement("div",{className:Vn.itemDisabled},"\u6062\u590D\u5BF9\u8BDD"):bt.createElement("div",{onClick:Je=>{Nt(!1),Ht(Je)},className:Vn.item},"\u6062\u590D\u5BF9\u8BDD"),bt.createElement("div",{onClick:Je=>{Nt(!1),Et(Je)},className:Vn.item},"\u6E05\u7A7A\u5BF9\u8BDD")))))},jt=ne(59301),En=Object.defineProperty,Si=Object.getOwnPropertySymbols,pi=Object.prototype.hasOwnProperty,Ke=Object.prototype.propertyIsEnumerable,Pn=(Ge,gi,yi)=>gi in Ge?En(Ge,gi,{enumerable:!0,configurable:!0,writable:!0,value:yi}):Ge[gi]=yi,qn=(Ge,gi)=>{for(var yi in gi||(gi={}))pi.call(gi,yi)&&Pn(Ge,yi,gi[yi]);if(Si)for(var yi of Si(gi))Ke.call(gi,yi)&&Pn(Ge,yi,gi[yi]);return Ge},xi=(Ge,gi,yi)=>new Promise((Ht,Et)=>{var Ct=kt=>{try{Kt(yi.next(kt))}catch(be){Et(be)}},Nt=kt=>{try{Kt(yi.throw(kt))}catch(be){Et(be)}},Kt=kt=>kt.done?Ht(kt.value):Promise.resolve(kt.value).then(Ct,Nt);Kt((yi=yi.apply(Ge,gi)).next())}),Ce=({})=>{var Ge,gi,yi,Ht;const{id:Et,position:Ct}=(0,hn.oP)(),[Nt,Kt]=(0,bt.useState)(!0),[kt,be]=(0,bt.useState)(!1),An=(0,bt.useRef)("bottomRight"),ze=(0,bt.useRef)();let[Je,rn]=(0,bt.useState)({});const[Oe,mn]=(0,bt.useState)(Number(Et)),[cn,Mn]=(0,bt.useState)([]),[zn,dn]=(0,bt.useState)(1),[oi,Ai]=(0,bt.useState)(Number(Ct)),Zi=(0,bt.useRef)(Number(Ct)),[tr,ro]=(0,bt.useState)([]),[ar,pr]=(0,bt.useState)(!1),[wr,mo]=(0,bt.useState)(!0),Eo=(0,bt.useRef)(null),Hr=(0,bt.useRef)(1),[Ur,no]=(0,bt.useState)({});let[_o,bo]=(0,bt.useState)("");const[Mo,oo]=(0,bt.useState)(!1),[Er,Rr]=(0,bt.useState)(!1),[Pt]=(0,se.useSearchParams)();(0,bt.useEffect)(()=>((0,se.getDvaApp)()._store.dispatch({type:"globalSetting/footerToggle",payload:!1}),()=>{(0,se.getDvaApp)()._store.dispatch({type:"globalSetting/footerToggle",payload:!0})}),[]),(0,bt.useEffect)(()=>{er()},[]),(0,bt.useEffect)(()=>{Eo.current.scrollTop=Eo.current.scrollHeight},[zn]),(0,bt.useEffect)(()=>{const He=document.getElementById("wechat_QR_code_ids");return He.classList.add("hide"),()=>{He.classList.remove("hide")}},[]);const er=()=>xi(void 0,null,function*(){var He,li;const _i=yield(0,ge.ZP)("/api/chats.json",{method:"post",body:{to_user_id:Et}});if((_i==null?void 0:_i.status)===0){const un=yield(0,ge.ZP)("/api/chats.json",{method:"get",params:{to_user_id:Et,challenge_id:Number(Ct)||""}});if(un!=null&&un.data){mo(!1),Mn((un==null?void 0:un.data)||[]);const Yt=(li=(He=un==null?void 0:un.data)==null?void 0:He.find(de=>de.to_user_id===Number(Et)))==null?void 0:li.id;mn(Yt),Gr(Yt),ui(Yt,Ct)}}}),Gr=He=>xi(void 0,null,function*(){const li=yield(0,ge.ZP)("/api/chats/challenge_list.json",{method:"get",params:{id:He,challenge_id:oi||""}});li!=null&&li.challenges&&ro([{id:0,subject:"\u5168\u90E8"},...li.challenges])}),si=(He,li)=>xi(void 0,null,function*(){const _i=yield(0,ge.ZP)("/api/chats.json",{method:"get",params:{to_user_id:He,challenge_id:li||""}});_i!=null&&_i.data&&Mn((_i==null?void 0:_i.data)||[]),mo(!1)}),ui=(He,li,_i)=>xi(void 0,null,function*(){var un;Kt(!0);const Yt=yield(0,ge.ZP)(`/api/chats/${He}.json`,{method:"get",params:{challenge_id:Number(li)||""}});if(Yt!=null&&Yt.data){_i&&(Yt.data[Yt.data.length-1].open=!0),no(qn({},Yt)||{}),pr(!0),be(!1);const de=(un=cn==null?void 0:cn.find(Sn=>Sn.id===He))==null?void 0:un.to_user_id;window.location.host==="gpt.educoder.net"?Pt.get("homeworkId")?se.history.replace(`/chatgpt?id=0&position=0&homeworkId=${Pt.get("homeworkId")}`):se.history.replace("/chatgpt?id=0&position=0"):Pt.get("homeworkId")?se.history.replace(`/chatgpt?id=${de||Et}&position=${li}&homeworkId=${Pt.get("homeworkId")}`):se.history.replace(`/chatgpt?id=${de||Et}&position=${li}`),_i&&(dn(Math.random()),si(de,li))}Kt(!1)}),Ci=He=>{var li;bo(He),(li=He==null?void 0:He.trim())==null||li.length},Ri=He=>{Hr.current=Hr.current+1,mn(He),Ai(0),bo(""),be(!1),ui(He,0),Gr(He)},Tr=()=>xi(void 0,null,function*(){var He;if(_o.trim().length===0){Be.ZP.error("\u4E0D\u80FD\u8F93\u5165\u7EAF\u7A7A\u683C");return}if(!_o){Be.ZP.warning("\u8BF7\u8F93\u5165\u4F60\u8981\u95EE\u7684\u95EE\u9898");return}be(!0);const li=et()().format("YYYY-MM-DDTHH:mm:ss.SSSZ"),_i=qn({},Ur);(He=_i==null?void 0:_i.data)==null||He.push({id:0,updated_at:li,question:_o,answer:jt.createElement("div",{className:Qe.animation},"\u8001\u5E08\u6B63\u5728\u56DE\u7B54\u4E2D\uFF0C\u8BF7\u7A0D\u540E")}),no(_i),dn(zn+1),bo(""),Hr.current=Hr.current+1;const un=Hr.current,Yt=yield(0,ge.ZP)("/api/chats/get_answer",{method:"post",body:{chat_id:Oe,to_user_id:Et,question:_o,challenge_id:oi||"",time:li}});un===Hr.current&&(Yt==null?void 0:Yt.status)===0&&ui(Oe,oi,!0)}),Ue=()=>{ui(Oe,oi),si(Et,oi),oo(!1)},Ie=(He,li,_i="")=>xi(void 0,null,function*(){Kt(!0);let un={};Pt.get("homeworkId")?un={id:He,satisfied:li,content:_i,homework_common_id:Pt.get("homeworkId")}:un={id:He,satisfied:li,content:_i};const Yt=yield(0,ge.ZP)("/api/chats/praise.json",{method:"post",body:un});(Yt==null?void 0:Yt.status)===0&&ui(Oe,oi)}),Le=He=>{He.shiftKey&&He.keyCode===13||He.keyCode===13&&(He.preventDefault(),Tr())},We=He=>xi(void 0,null,function*(){Ee.default.confirm({icon:null,centered:!0,okText:"\u786E\u5B9A",cancelText:"\u53D6\u6D88",title:"\u63D0\u793A",content:"\u8BF7\u786E\u8BA4\u662F\u5426\u5C06\u8BE5\u95EE\u7B54\u5185\u5BB9\u8FDB\u884C\u5220\u9664\uFF1F",onOk:()=>xi(void 0,null,function*(){(yield(0,ge.ZP)("/api/chats/delete_one.json",{method:"delete",body:{id:He}})).status===0&&(Be.ZP.success("\u5220\u9664\u6210\u529F"),ui(Oe,oi))})})}),wi=()=>xi(void 0,null,function*(){Kt(!0),Hr.current=Hr.current+1,(yield(0,ge.ZP)("/api/chats/stop_one.json",{method:"delete",body:{challenge_id:oi,id:Oe}})).status===0&&ui(Oe,oi),Kt(!1)}),hi=[`\u8BF7${Ur==null?void 0:Ur.user_name}\u8001\u5E08\u5C1D\u8BD5\u518D\u56DE\u7B54\u4E00\u6B21`,"\u53EF\u80FD\u542F\u7528\u4E86\u673A\u5668\u4EBA\uFF0C\u8BF7\u8001\u5E08\u4EB2\u81EA\u56DE\u7B54"],Yi=He=>{Ve(Ur,He)},sn=()=>{};return jt.createElement("div",{className:Qe.wrap},jt.createElement("div",{className:Qe.head},jt.createElement("b",null,"\u5B9E\u8BAD >"),"\u6559\u5B66\u8F85\u5BFC\uFF08beta\u7248\u672C\uFF09"),jt.createElement("div",{className:Qe.content},jt.createElement(Ze.Z,{spinning:wr},jt.createElement("div",{className:Qe.left,onClick:()=>{Rr(!1)}},jt.createElement("div",{className:Qe.title},jt.createElement("span",null,"\u95EE\u7B54\u5217\u8868"),jt.createElement("div",{className:Li()(Qe.add,kt&&Qe.disabledElement),onClick:()=>xi(void 0,null,function*(){if(kt)return;mo(!0);const He=yield(0,ge.ZP)("/api/chats.json",{method:"post",body:{to_user_id:Et,new_chat:!0}});if(He.status===0){const li=He==null?void 0:He.id;if(li===Oe){Be.ZP.warning("\u5F53\u524D\u5DF2\u7ECF\u5728\u65B0\u5BF9\u8BDD\u7A97\u53E3"),mo(!1);return}yield si(-1,0),mn(li),Ai(0),yield ui(li,0)}mo(!1)})})),jt.createElement("div",{className:Qe.leftBar},cn.map(He=>jt.createElement("div",{key:He.id,onClick:()=>Ri(He.id),className:`${Qe.li} ${He.id===Oe?Qe.active:""}`},He!=null&&He.avatar?jt.createElement("img",{src:`${Se.Z.IMG_SERVER}/images/${He==null?void 0:He.avatar}`}):jt.createElement("img",{src:nt}),jt.createElement("aside",null,jt.createElement("p",null,jt.createElement("b",{title:He.user_name},He.user_name),jt.createElement("span",null,He.time)),jt.createElement("div",null,He.last_message))))))),jt.createElement("div",{className:Qe.right},ar&&jt.createElement("div",{className:Qe.title,onClick:()=>{Rr(!1)}},jt.createElement("section",{className:Qe.center},jt.createElement("span",null,"\u4E0E",Ur==null?void 0:Ur.user_name,"\u8001\u5E08\u6C9F\u901A\u4E2D\u2026"),jt.createElement("div",{className:Qe.tabs},jt.createElement("i",{className:"iconfont icon-lianjie3"}),jt.createElement("span",null,"\u5F53\u524D\u5BF9\u8BDD\u5173\u8054\uFF1A",Ur!=null&&Ur.challenge_name?`${(gi=(Ge=Ur==null?void 0:Ur.data[0])==null?void 0:Ge.shixun)==null?void 0:gi.name} \u5B9E\u8BAD---\u7B2C${Ur==null?void 0:Ur.challenge_position}\u5173`:"\u5168\u90E8"),jt.createElement("span",{onClick:()=>{kt||(Zi.current=oi,oo(!0))},className:Li()(Qe.cut,kt&&Qe.disabledElement)},"\u5207\u6362")),jt.createElement(ue,{disabled:kt,recoverDisabled:!(Ur!=null&&Ur.can_recycle),onFileType:Yi,onRecover:()=>xi(void 0,null,function*(){Kt(!0),(yield(0,ge.ZP)("/api/chats/recycle.json",{method:"post",body:{challenge_id:oi,id:Oe}})).status===0&&(Be.ZP.success("\u6062\u590D\u5BF9\u8BDD\u6210\u529F"),si(Et,oi),ui(Oe,oi)),Kt(!1)}),onEmpty:()=>{Ee.default.confirm({icon:null,centered:!0,okText:"\u786E\u5B9A",cancelText:"\u53D6\u6D88",title:"\u63D0\u793A",content:"\u8BF7\u786E\u8BA4\u662F\u5426\u5C06\u5F53\u524D\u5BF9\u8BDD\u7A97\u53E3\u4E2D\u7684\u5BF9\u8BDD\u5185\u5BB9\u5168\u90E8\u6E05\u7A7A\uFF1F",onOk:()=>xi(void 0,null,function*(){(yield(0,ge.ZP)("/api/chats/clean.json",{method:"delete",body:{challenge_id:oi,id:Oe}})).status===0&&(Be.ZP.success("\u6E05\u7A7A\u5BF9\u8BDD\u6210\u529F"),si(Et,oi),ui(Oe,oi))})})}}))),jt.createElement("div",{onClick:()=>{Rr(!1)},className:Qe.rightBar,ref:Eo},jt.createElement(Ze.Z,{spinning:Nt},!((yi=Ur==null?void 0:Ur.data)!=null&&yi.length)&&jt.createElement("div",{className:Qe.empty}),(Ht=Ur==null?void 0:Ur.data)==null?void 0:Ht.map((He,li)=>{var _i,un,Yt;return jt.createElement(bt.Fragment,{key:li},!!He.question&&jt.createElement("div",{className:Qe.li},jt.createElement("img",{src:`${Se.Z.IMG_SERVER}/images/${Ur==null?void 0:Ur.my_avatar}`,style:{borderRadius:"50%",width:56,height:56}}),jt.createElement("aside",null,jt.createElement("p",null,jt.createElement("b",null,Ur.my_user_name),jt.createElement("span",null,et()(He.updated_at).format("YYYY-MM-DD HH:mm"))),jt.createElement(lt.Z,{value:He.question}),jt.createElement("div",{className:Qe.action},jt.createElement(gt.CopyToClipboard,{text:He.question,onCopy:()=>Be.ZP.success("\u5185\u5BB9\u5DF2\u590D\u5236\u5230\u7C98\u8D34\u677F\u4E2D")},jt.createElement("div",{className:Qe.tagBtn},jt.createElement("i",{className:"iconfont icon-fuzhi8"}),"\u590D\u5236")),!kt&&jt.createElement("div",{onClick:()=>We(He.id),className:Qe.tagBtn},jt.createElement("i",{className:"iconfont icon-shanchu8"}),"\u5220\u9664")))),!!He.answer&&jt.createElement("div",{style:li===0?{borderTop:0}:{},className:`${Qe.li} ${Qe.active}`},Ur!=null&&Ur.avatar?jt.createElement("img",{src:`${Se.Z.IMG_SERVER}/images/${Ur==null?void 0:Ur.avatar}`,style:{borderRadius:"50%",width:56,height:56}}):jt.createElement("img",{src:nt,style:{borderRadius:"50%",width:56,height:56}}),jt.createElement("aside",null,jt.createElement("p",null,jt.createElement("div",{style:{display:"flex"}},jt.createElement("b",{style:{marginRight:"20px"}},Ur.user_name),(_i=He.shixun)!=null&&_i.name?jt.createElement("span",{style:{display:"flex",alignItems:"center"}},"\u5F53\u524D\u5BF9\u8BDD\u5173\u8054\uFF1A",(un=He.shixun)==null?void 0:un.name," \u5B9E\u8BAD---\u7B2C",(Yt=He.challenge)==null?void 0:Yt.position,"\u5173"):jt.createElement("span",{style:{display:"flex",alignItems:"center"}},"\u5F53\u524D\u5BF9\u8BDD\u5173\u8054\uFF1A\u5168\u90E8")),jt.createElement("span",null,et()(He.updated_at).format("YYYY-MM-DD HH:mm"))),He.id===0?He.answer:jt.createElement(pn,{onTextChange:sn,open:!!(He!=null&&He.open),text:He.answer}),He.id===0&&jt.createElement("div",{className:Qe.action},jt.createElement("div",{onClick:wi,className:Qe.tagBtn},jt.createElement("i",{className:"iconfont icon-tingzhishengcheng"}),"\u505C\u6B62\u751F\u6210")),(He==null?void 0:He.id)!==0&&jt.createElement("div",{className:Qe.action},!!He.question&&jt.createElement(jt.Fragment,null,jt.createElement("div",{onClick:()=>{_o=He.question,Tr()},className:Qe.tagBtn},jt.createElement("i",{className:"iconfont icon-zhongxinshengcheng"}),"\u91CD\u65B0\u751F\u6210"),jt.createElement(gt.CopyToClipboard,{text:He.answer,onCopy:()=>Be.ZP.success("\u5185\u5BB9\u5DF2\u590D\u5236\u5230\u7C98\u8D34\u677F\u4E2D")},jt.createElement("div",{className:Qe.tagBtn},jt.createElement("i",{className:"iconfont icon-fuzhi8"}),"\u590D\u5236")),!kt&&jt.createElement("div",{onClick:()=>We(He.id),className:Qe.tagBtn},jt.createElement("i",{className:"iconfont icon-shanchu8"}),"\u5220\u9664")),jt.createElement("span",{style:{marginLeft:"auto"},onClick:()=>{Ie(He.id,He.satisfied===1?-1:1)},className:`mr30 ${He.satisfied===1?Qe.actActive:""}`},jt.createElement("i",{className:"iconfont icon-yijiejue"}),"\u5DF2\u89E3\u51B3"),jt.createElement(Fe.Z,{autoAdjustOverflow:!1,destroyTooltipOnHide:!0,open:Je[li],getPopupContainer:de=>de,placement:An.current,content:jt.createElement("div",{className:Qe.box,onMouseLeave:de=>{clearTimeout(ze.current),Je[li]=!1,rn(qn({},Je))},onMouseOver:()=>{clearTimeout(ze.current)}},jt.createElement("p",null,"\u62B1\u6B49\u8BA9\u4F60\u5931\u671B\u4E86\uFF0C\u8BF7\u7EE7\u7EED\u5C1D\u8BD5\uFF1A"),hi.map((de,Sn)=>{const wn=de===He.content;return jt.createElement("div",{onClick:()=>{Ie(He.id,wn?-1:0,wn?"":de)},className:wn?Qe.hot:"",key:de},de)}))},jt.createElement("span",{onMouseOver:de=>{clearTimeout(ze.current),window.innerHeight-de.target.getBoundingClientRect().top<350?An.current="topRight":An.current="bottomRight",Je={},Je[li]=!0,rn(qn({},Je))},onMouseOut:de=>{ze.current=setTimeout(()=>{clearTimeout(ze.current),Je[li]=!1,rn(qn({},Je))},800)},className:`${Qe.unsolved} ${He.satisfied===0?Qe.actActive:""}`},jt.createElement("i",{className:"iconfont icon-weijiejuezhengchang"}),"\u672A\u89E3\u51B3"))))))}))),ar&&jt.createElement("div",{className:Qe.answers},!Er&&jt.createElement("div",{className:Qe.open_md,onClick:()=>{Rr(!0)}},"\u8BF7\u8F93\u5165\u4F60\u7684\u95EE\u9898"),jt.createElement("div",{className:Er?"md_container":"md_container hide",style:{marginTop:20}},jt.createElement(ct.Z,{id:"discuss-input-editor",miniToolbar:!0,watch:!1,noStorage:!0,defaultValue:_o,height:240,width:1e3,onChange:Ci,className:Qe.md_editor}),jt.createElement("div",{className:Qe.tip_container,style:{display:"flex"},onClick:()=>{Rr(!1)}},jt.createElement("div",{className:Qe.btn_send,onClick:Tr},"\u53D1\u9001")))))),jt.createElement(Ee.default,{centered:!0,keyboard:!1,closable:!1,destroyOnClose:!0,onCancel:()=>{Ai(Zi.current),oo(!1)},onOk:Ue,open:Mo,wrapClassName:xn.Z.CustomCss,title:"\u66F4\u6362\u5173\u8054",width:"666px"},jt.createElement("div",null,jt.createElement(we.ZP.Group,{value:oi,onChange:He=>Ai(He.target.value)},jt.createElement(ve.Z,{direction:"vertical"},tr==null?void 0:tr.map(He=>{var li;return jt.createElement(we.ZP,{key:He.id,value:He.id},He.id===0?He.subject:`${(li=He.shixun)==null?void 0:li.name} \u5B9E\u8BAD---\u7B2C${He==null?void 0:He.challenge_position}\u5173`)}))))))}},81428:function(Cn,mi,ne){"use strict";ne.d(mi,{AL:function(){return Lt},Iy:function(){return hn},Qv:function(){return Ut},ez:function(){return yt},jb:function(){return Se}});var bt=ne(32834),Be=ne.n(bt),Ee=ne(11690),Ze=ne.n(Ee);let Fe=1;function we(fe,Ae){const Ve=fe.match(/^(\s+)(?:```)/);if(Ve===null)return Ae;const ye=Ve[1];return Ae.split(`
`).map(on=>{const pn=on.match(/^\s+/);if(pn===null)return on;const[Vn]=pn;return Vn.length>=ye.length?on.slice(ye.length):on}).join(`
`)}let ve=[],Qe=["<ul>"];const ge=new(Be()).Renderer,se=/^ *(#{1,6}) *([^\n]+?) *(?:#+ *)?(?:\n+|$)/;function hn(){ve.length=0,Qe=["<ul>"]}const Se={overflow:"hidden",WebkitBoxOrient:"vertical",display:"-webkit-box",WebkitLineClamp:2};function xn(fe,Ae,Ve,ye){if(Ae>=fe.length||fe[Ae].level<=Ve)return Ae;var on=fe[Ae];ye.push("<li><a href='#"+Fe+on.anchor+"'>"+on.text+"</a>"),Ae++;var pn=[];return Ae=xn(fe,Ae,on.level,pn),pn.length>0&&(ye.push("<ul>"),pn.forEach(function(Vn){ye.push(Vn)}),ye.push("</ul>")),ye.push("</li>"),Ae=xn(fe,Ae,Ve,ye),Ae}function Ut(){return xn(ve,0,0,Qe),Qe.push("</ul>"),Qe.join("")}const et={heading(fe){const Ae=se.exec(fe);if(Fe+=1,Ae)return{type:"heading",raw:Ae[0],depth:Ae[1].length,text:Ae[2]}},fences(fe){const Ae=this.rules.block.fences.exec(fe);if(Ae){const Ve=Ae[0];let ye=we(Ve,Ae[3]||"");const on=Ae[2]?Ae[2].trim():Ae[2];if(["latex","katex","math"].indexOf(on)>=0){const pn=lt(),Vn=ye;ye=pn,gt[pn]={type:"block",expression:Vn}}return{type:"code",raw:Ve,lang:on,text:ye}}}},nt=/(?:\${2})([^\n`]+?)(?:\${2})/gi;let ct=0;const lt=()=>`__special_katext_id_${ct++}__`;let gt={};function yt(){return gt}function Lt(){ct=0,gt={}}function It(fe){return fe=fe.replace(nt,(Ae,Ve)=>{const ye=lt();return gt[ye]={type:"inline",expression:Ve},ye}),fe}const Wt=ge.listitem;ge.listitem=function(fe){return Wt(It(fe))};const qt=ge.paragraph;ge.paragraph=function(fe){return qt(It(fe))};const he=ge.tablecell;ge.tablecell=function(fe,Ae){return he(It(fe),Ae)},ge.code=function(fe,Ae,Ve){const ye=(Ae||"").match(/\S*/)[0];return ye?["latex","katex","math"].indexOf(ye)>=0?`<p class='editormd-tex'>${fe}</p>`:`<pre class="prettyprint linenums"><code class="language-${Ae}">${Ve?fe:(0,Ee.escape)(fe,!0)}</code></pre>
`:'<pre class="prettyprint linenums"><code>'+(Ve?fe:(0,Ee.escape)(fe,!0))+"</code></pre>"},ge.heading=function(fe,Ae,Ve){let ye=this.options.headerPrefix+Ve.toLowerCase().replace(/[^\w\\u4e00-\\u9fa5]]+/g,"-");return ve.push({anchor:ye,level:Ae,text:fe}),"<h"+Ae+' id="'+Fe+ye+'">'+fe+"</h"+Ae+">"},Be().setOptions({silent:!0,gfm:!0,pedantic:!1}),Be().use({tokenizer:et,renderer:ge}),mi.ZP=Be()},99498:function(Cn,mi,ne){(function(bt){bt(ne(89780))})(function(bt){bt.defineOption("placeholder","",function(Qe,ge,se){var hn=se&&se!=bt.Init;if(ge&&!hn)Qe.on("blur",Fe),Qe.on("change",we),Qe.on("swapDoc",we),bt.on(Qe.getInputField(),"compositionupdate",Qe.state.placeholderCompose=function(){Ze(Qe)}),we(Qe);else if(!ge&&hn){Qe.off("blur",Fe),Qe.off("change",we),Qe.off("swapDoc",we),bt.off(Qe.getInputField(),"compositionupdate",Qe.state.placeholderCompose),Be(Qe);var Se=Qe.getWrapperElement();Se.className=Se.className.replace(" CodeMirror-empty","")}ge&&!Qe.hasFocus()&&Fe(Qe)});function Be(Qe){Qe.state.placeholder&&(Qe.state.placeholder.parentNode.removeChild(Qe.state.placeholder),Qe.state.placeholder=null)}function Ee(Qe){Be(Qe);var ge=Qe.state.placeholder=document.createElement("pre");ge.style.cssText="height: 0; overflow: visible",ge.style.direction=Qe.getOption("direction"),ge.className="CodeMirror-placeholder CodeMirror-line-like";var se=Qe.getOption("placeholder");typeof se=="string"&&(se=document.createTextNode(se)),ge.appendChild(se),Qe.display.lineSpace.insertBefore(ge,Qe.display.lineSpace.firstChild)}function Ze(Qe){setTimeout(function(){var ge=!1,se=Qe.getInputField();se.nodeName=="TEXTAREA"?ge=!se.value:Qe.lineCount()==1&&(ge=!/[^\u200b]/.test(se.querySelector(".CodeMirror-line").textContent)),ge?Ee(Qe):Be(Qe)},20)}function Fe(Qe){ve(Qe)&&Ee(Qe)}function we(Qe){var ge=Qe.getWrapperElement(),se=ve(Qe);ge.className=ge.className.replace(" CodeMirror-empty","")+(se?" CodeMirror-empty":""),se?Ee(Qe):Be(Qe)}function ve(Qe){return Qe.lineCount()===1&&Qe.getLine(0)===""}})},25717:function(Cn,mi,ne){(function(bt){bt(ne(89780))})(function(bt){var Be={pairs:`()[]{}''""`,closeBefore:`)]}'":;>`,triples:"",explode:"[]{}"},Ee=bt.Pos;bt.defineOption("autoCloseBrackets",!1,function(et,nt,ct){ct&&ct!=bt.Init&&(et.removeKeyMap(Fe),et.state.closeBrackets=null),nt&&(we(Ze(nt,"pairs")),et.state.closeBrackets=nt,et.addKeyMap(Fe))});function Ze(et,nt){return nt=="pairs"&&typeof et=="string"?et:typeof et=="object"&&et[nt]!=null?et[nt]:Be[nt]}var Fe={Backspace:ge,Enter:se};function we(et){for(var nt=0;nt<et.length;nt++){var ct=et.charAt(nt),lt="'"+ct+"'";Fe[lt]||(Fe[lt]=ve(ct))}}we(Be.pairs+"`");function ve(et){return function(nt){return Se(nt,et)}}function Qe(et){var nt=et.state.closeBrackets;if(!nt||nt.override)return nt;var ct=et.getModeAt(et.getCursor());return ct.closeBrackets||nt}function ge(et){var nt=Qe(et);if(!nt||et.getOption("disableInput"))return bt.Pass;for(var ct=Ze(nt,"pairs"),lt=et.listSelections(),gt=0;gt<lt.length;gt++){if(!lt[gt].empty())return bt.Pass;var yt=xn(et,lt[gt].head);if(!yt||ct.indexOf(yt)%2!=0)return bt.Pass}for(var gt=lt.length-1;gt>=0;gt--){var Lt=lt[gt].head;et.replaceRange("",Ee(Lt.line,Lt.ch-1),Ee(Lt.line,Lt.ch+1),"+delete")}}function se(et){var nt=Qe(et),ct=nt&&Ze(nt,"explode");if(!ct||et.getOption("disableInput"))return bt.Pass;for(var lt=et.listSelections(),gt=0;gt<lt.length;gt++){if(!lt[gt].empty())return bt.Pass;var yt=xn(et,lt[gt].head);if(!yt||ct.indexOf(yt)%2!=0)return bt.Pass}et.operation(function(){var Lt=et.lineSeparator()||`
`;et.replaceSelection(Lt+Lt,null),et.execCommand("goCharLeft"),lt=et.listSelections();for(var It=0;It<lt.length;It++){var Wt=lt[It].head.line;et.indentLine(Wt,null,!0),et.indentLine(Wt+1,null,!0)}})}function hn(et){var nt=bt.cmpPos(et.anchor,et.head)>0;return{anchor:new Ee(et.anchor.line,et.anchor.ch+(nt?-1:1)),head:new Ee(et.head.line,et.head.ch+(nt?1:-1))}}function Se(et,nt){var ct=Qe(et);if(!ct||et.getOption("disableInput"))return bt.Pass;var lt=Ze(ct,"pairs"),gt=lt.indexOf(nt);if(gt==-1)return bt.Pass;for(var yt=Ze(ct,"closeBefore"),Lt=Ze(ct,"triples"),It=lt.charAt(gt+1)==nt,Wt=et.listSelections(),qt=gt%2==0,he,fe=0;fe<Wt.length;fe++){var Ae=Wt[fe],Ve=Ae.head,ye,on=et.getRange(Ve,Ee(Ve.line,Ve.ch+1));if(qt&&!Ae.empty())ye="surround";else if((It||!qt)&&on==nt)It&&Ut(et,Ve)?ye="both":Lt.indexOf(nt)>=0&&et.getRange(Ve,Ee(Ve.line,Ve.ch+3))==nt+nt+nt?ye="skipThree":ye="skip";else if(It&&Ve.ch>1&&Lt.indexOf(nt)>=0&&et.getRange(Ee(Ve.line,Ve.ch-2),Ve)==nt+nt){if(Ve.ch>2&&/\bstring/.test(et.getTokenTypeAt(Ee(Ve.line,Ve.ch-2))))return bt.Pass;ye="addFour"}else if(It){var pn=Ve.ch==0?" ":et.getRange(Ee(Ve.line,Ve.ch-1),Ve);if(!bt.isWordChar(on)&&pn!=nt&&!bt.isWordChar(pn))ye="both";else return bt.Pass}else if(qt&&(on.length===0||/\s/.test(on)||yt.indexOf(on)>-1))ye="both";else return bt.Pass;if(!he)he=ye;else if(he!=ye)return bt.Pass}var Vn=gt%2?lt.charAt(gt-1):nt,ti=gt%2?nt:lt.charAt(gt+1);et.operation(function(){if(he=="skip")et.execCommand("goCharRight");else if(he=="skipThree")for(var Xn=0;Xn<3;Xn++)et.execCommand("goCharRight");else if(he=="surround"){for(var Li=et.getSelections(),Xn=0;Xn<Li.length;Xn++)Li[Xn]=Vn+Li[Xn]+ti;et.replaceSelections(Li,"around"),Li=et.listSelections().slice();for(var Xn=0;Xn<Li.length;Xn++)Li[Xn]=hn(Li[Xn]);et.setSelections(Li)}else he=="both"?(et.replaceSelection(Vn+ti,null),et.triggerElectric(Vn+ti),et.execCommand("goCharLeft")):he=="addFour"&&(et.replaceSelection(Vn+Vn+Vn+Vn,"before"),et.execCommand("goCharRight"))})}function xn(et,nt){var ct=et.getRange(Ee(nt.line,nt.ch-1),Ee(nt.line,nt.ch+1));return ct.length==2?ct:null}function Ut(et,nt){var ct=et.getTokenAt(Ee(nt.line,nt.ch+1));return/\bstring/.test(ct.type)&&ct.start==nt.ch&&(nt.ch==0||!/\bstring/.test(et.getTokenTypeAt(nt)))}})},6313:function(Cn,mi,ne){(function(bt){bt(ne(89780),ne(32855))})(function(bt){bt.defineOption("autoCloseTags",!1,function(ge,se,hn){if(hn!=bt.Init&&hn&&ge.removeKeyMap("autoCloseTags"),!!se){var Se={name:"autoCloseTags"};(typeof se!="object"||se.whenClosing!==!1)&&(Se["'/'"]=function(xn){return we(xn)}),(typeof se!="object"||se.whenOpening!==!1)&&(Se["'>'"]=function(xn){return Ze(xn)}),ge.addKeyMap(Se)}});var Be=["area","base","br","col","command","embed","hr","img","input","keygen","link","meta","param","source","track","wbr"],Ee=["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 Ze(ge){if(ge.getOption("disableInput"))return bt.Pass;for(var se=ge.listSelections(),hn=[],Se=ge.getOption("autoCloseTags"),xn=0;xn<se.length;xn++){if(!se[xn].empty())return bt.Pass;var Ut=se[xn].head,et=ge.getTokenAt(Ut),nt=bt.innerMode(ge.getMode(),et.state),ct=nt.state,lt=nt.mode.xmlCurrentTag&&nt.mode.xmlCurrentTag(ct),gt=lt&&lt.name;if(!gt)return bt.Pass;var yt=nt.mode.configuration=="html",Lt=typeof Se=="object"&&Se.dontCloseTags||yt&&Be,It=typeof Se=="object"&&Se.indentTags||yt&&Ee;et.end>Ut.ch&&(gt=gt.slice(0,gt.length-et.end+Ut.ch));var Wt=gt.toLowerCase();if(!gt||et.type=="string"&&(et.end!=Ut.ch||!/[\"\']/.test(et.string.charAt(et.string.length-1))||et.string.length==1)||et.type=="tag"&&lt.close||et.string.indexOf("/")==Ut.ch-et.start-1||Lt&&ve(Lt,Wt)>-1||Qe(ge,nt.mode.xmlCurrentContext&&nt.mode.xmlCurrentContext(ct)||[],gt,Ut,!0))return bt.Pass;var qt=typeof Se=="object"&&Se.emptyTags;if(qt&&ve(qt,gt)>-1){hn[xn]={text:"/>",newPos:bt.Pos(Ut.line,Ut.ch+2)};continue}var he=It&&ve(It,Wt)>-1;hn[xn]={indent:he,text:">"+(he?`
`:"")+"</"+gt+">",newPos:he?bt.Pos(Ut.line+1,0):bt.Pos(Ut.line,Ut.ch+1)}}for(var fe=typeof Se=="object"&&Se.dontIndentOnAutoClose,xn=se.length-1;xn>=0;xn--){var Ae=hn[xn];ge.replaceRange(Ae.text,se[xn].head,se[xn].anchor,"+insert");var Ve=ge.listSelections().slice(0);Ve[xn]={head:Ae.newPos,anchor:Ae.newPos},ge.setSelections(Ve),!fe&&Ae.indent&&(ge.indentLine(Ae.newPos.line,null,!0),ge.indentLine(Ae.newPos.line+1,null,!0))}}function Fe(ge,se){for(var hn=ge.listSelections(),Se=[],xn=se?"/":"</",Ut=ge.getOption("autoCloseTags"),et=typeof Ut=="object"&&Ut.dontIndentOnSlash,nt=0;nt<hn.length;nt++){if(!hn[nt].empty())return bt.Pass;var ct=hn[nt].head,lt=ge.getTokenAt(ct),gt=bt.innerMode(ge.getMode(),lt.state),yt=gt.state;if(se&&(lt.type=="string"||lt.string.charAt(0)!="<"||lt.start!=ct.ch-1))return bt.Pass;var Lt,It=gt.mode.name!="xml"&&ge.getMode().name=="htmlmixed";if(It&&gt.mode.name=="javascript")Lt=xn+"script";else if(It&&gt.mode.name=="css")Lt=xn+"style";else{var Wt=gt.mode.xmlCurrentContext&&gt.mode.xmlCurrentContext(yt);if(!Wt||Wt.length&&Qe(ge,Wt,Wt[Wt.length-1],ct))return bt.Pass;Lt=xn+Wt[Wt.length-1]}ge.getLine(ct.line).charAt(lt.end)!=">"&&(Lt+=">"),Se[nt]=Lt}if(ge.replaceSelections(Se),hn=ge.listSelections(),!et)for(var nt=0;nt<hn.length;nt++)(nt==hn.length-1||hn[nt].head.line<hn[nt+1].head.line)&&ge.indentLine(hn[nt].head.line)}function we(ge){return ge.getOption("disableInput")?bt.Pass:Fe(ge,!0)}bt.commands.closeTag=function(ge){return Fe(ge)};function ve(ge,se){if(ge.indexOf)return ge.indexOf(se);for(var hn=0,Se=ge.length;hn<Se;++hn)if(ge[hn]==se)return hn;return-1}function Qe(ge,se,hn,Se,xn){if(!bt.scanForClosingTag)return!1;var Ut=Math.min(ge.lastLine()+1,Se.line+500),et=bt.scanForClosingTag(ge,Se,null,Ut);if(!et||et.tag!=hn)return!1;for(var nt=xn?1:0,ct=se.length-1;ct>=0&&se[ct]==hn;ct--)++nt;Se=et.to;for(var ct=1;ct<nt;ct++){var lt=bt.scanForClosingTag(ge,Se,null,Ut);if(!lt||lt.tag!=hn)return!1;Se=lt.to}return!0}})},32855:function(Cn,mi,ne){(function(bt){bt(ne(89780))})(function(bt){"use strict";var Be=bt.Pos;function Ee(ct,lt){return ct.line-lt.line||ct.ch-lt.ch}var Ze="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",Fe=Ze+"-:.0-9\\u00B7\\u0300-\\u036F\\u203F-\\u2040",we=new RegExp("<(/?)(["+Ze+"]["+Fe+"]*)","g");function ve(ct,lt,gt,yt){this.line=lt,this.ch=gt,this.cm=ct,this.text=ct.getLine(lt),this.min=yt?Math.max(yt.from,ct.firstLine()):ct.firstLine(),this.max=yt?Math.min(yt.to-1,ct.lastLine()):ct.lastLine()}function Qe(ct,lt){var gt=ct.cm.getTokenTypeAt(Be(ct.line,lt));return gt&&/\btag\b/.test(gt)}function ge(ct){if(!(ct.line>=ct.max))return ct.ch=0,ct.text=ct.cm.getLine(++ct.line),!0}function se(ct){if(!(ct.line<=ct.min))return ct.text=ct.cm.getLine(--ct.line),ct.ch=ct.text.length,!0}function hn(ct){for(;;){var lt=ct.text.indexOf(">",ct.ch);if(lt==-1){if(ge(ct))continue;return}if(!Qe(ct,lt+1)){ct.ch=lt+1;continue}var gt=ct.text.lastIndexOf("/",lt),yt=gt>-1&&!/\S/.test(ct.text.slice(gt+1,lt));return ct.ch=lt+1,yt?"selfClose":"regular"}}function Se(ct){for(;;){var lt=ct.ch?ct.text.lastIndexOf("<",ct.ch-1):-1;if(lt==-1){if(se(ct))continue;return}if(!Qe(ct,lt+1)){ct.ch=lt;continue}we.lastIndex=lt,ct.ch=lt;var gt=we.exec(ct.text);if(gt&&gt.index==lt)return gt}}function xn(ct){for(;;){we.lastIndex=ct.ch;var lt=we.exec(ct.text);if(!lt){if(ge(ct))continue;return}if(!Qe(ct,lt.index+1)){ct.ch=lt.index+1;continue}return ct.ch=lt.index+lt[0].length,lt}}function Ut(ct){for(;;){var lt=ct.ch?ct.text.lastIndexOf(">",ct.ch-1):-1;if(lt==-1){if(se(ct))continue;return}if(!Qe(ct,lt+1)){ct.ch=lt;continue}var gt=ct.text.lastIndexOf("/",lt),yt=gt>-1&&!/\S/.test(ct.text.slice(gt+1,lt));return ct.ch=lt+1,yt?"selfClose":"regular"}}function et(ct,lt){for(var gt=[];;){var yt=xn(ct),Lt,It=ct.line,Wt=ct.ch-(yt?yt[0].length:0);if(!yt||!(Lt=hn(ct)))return;if(Lt!="selfClose")if(yt[1]){for(var qt=gt.length-1;qt>=0;--qt)if(gt[qt]==yt[2]){gt.length=qt;break}if(qt<0&&(!lt||lt==yt[2]))return{tag:yt[2],from:Be(It,Wt),to:Be(ct.line,ct.ch)}}else gt.push(yt[2])}}function nt(ct,lt){for(var gt=[];;){var yt=Ut(ct);if(!yt)return;if(yt=="selfClose"){Se(ct);continue}var Lt=ct.line,It=ct.ch,Wt=Se(ct);if(!Wt)return;if(Wt[1])gt.push(Wt[2]);else{for(var qt=gt.length-1;qt>=0;--qt)if(gt[qt]==Wt[2]){gt.length=qt;break}if(qt<0&&(!lt||lt==Wt[2]))return{tag:Wt[2],from:Be(ct.line,ct.ch),to:Be(Lt,It)}}}}bt.registerHelper("fold","xml",function(ct,lt){for(var gt=new ve(ct,lt.line,0);;){var yt=xn(gt);if(!yt||gt.line!=lt.line)return;var Lt=hn(gt);if(!Lt)return;if(!yt[1]&&Lt!="selfClose"){var It=Be(gt.line,gt.ch),Wt=et(gt,yt[2]);return Wt&&Ee(Wt.from,It)>0?{from:It,to:Wt.from}:null}}}),bt.findMatchingTag=function(ct,lt,gt){var yt=new ve(ct,lt.line,lt.ch,gt);if(!(yt.text.indexOf(">")==-1&&yt.text.indexOf("<")==-1)){var Lt=hn(yt),It=Lt&&Be(yt.line,yt.ch),Wt=Lt&&Se(yt);if(!(!Lt||!Wt||Ee(yt,lt)>0)){var qt={from:Be(yt.line,yt.ch),to:It,tag:Wt[2]};return Lt=="selfClose"?{open:qt,close:null,at:"open"}:Wt[1]?{open:nt(yt,Wt[2]),close:qt,at:"close"}:(yt=new ve(ct,It.line,It.ch,gt),{open:qt,close:et(yt,Wt[2]),at:"open"})}}},bt.findEnclosingTag=function(ct,lt,gt,yt){for(var Lt=new ve(ct,lt.line,lt.ch,gt);;){var It=nt(Lt,yt);if(!It)break;var Wt=new ve(ct,lt.line,lt.ch,gt),qt=et(Wt,It.tag);if(qt)return{open:It,close:qt}}},bt.scanForClosingTag=function(ct,lt,gt,yt){var Lt=new ve(ct,lt.line,lt.ch,yt?{from:0,to:yt}:null);return et(Lt,gt)}})},89780:function(Cn){(function(mi,ne){Cn.exports=ne()})(this,function(){"use strict";var mi=navigator.userAgent,ne=navigator.platform,bt=/gecko\/\d/i.test(mi),Be=/MSIE \d/.test(mi),Ee=/Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(mi),Ze=/Edge\/(\d+)/.exec(mi),Fe=Be||Ee||Ze,we=Fe&&(Be?document.documentMode||6:+(Ze||Ee)[1]),ve=!Ze&&/WebKit\//.test(mi),Qe=ve&&/Qt\/\d+\.\d+/.test(mi),ge=!Ze&&/Chrome\//.test(mi),se=/Opera\//.test(mi),hn=/Apple Computer/.test(navigator.vendor),Se=/Mac OS X 1\d\D([8-9]|\d\d)\D/.test(mi),xn=/PhantomJS/.test(mi),Ut=!Ze&&/AppleWebKit/.test(mi)&&/Mobile\/\w+/.test(mi),et=/Android/.test(mi),nt=Ut||et||/webOS|BlackBerry|Opera Mini|Opera Mobi|IEMobile/i.test(mi),ct=Ut||/Mac/.test(ne),lt=/\bCrOS\b/.test(mi),gt=/win/i.test(ne),yt=se&&mi.match(/Version\/(\d*\.\d*)/);yt&&(yt=Number(yt[1])),yt&&yt>=15&&(se=!1,ve=!0);var Lt=ct&&(Qe||se&&(yt==null||yt<12.11)),It=bt||Fe&&we>=9;function Wt(it){return new RegExp("(^|\\s)"+it+"(?:$|\\s)\\s*")}var qt=function(it,st){var ht=it.className,ut=Wt(st).exec(ht);if(ut){var dt=ht.slice(ut.index+ut[0].length);it.className=ht.slice(0,ut.index)+(dt?ut[1]+dt:"")}};function he(it){for(var st=it.childNodes.length;st>0;--st)it.removeChild(it.firstChild);return it}function fe(it,st){return he(it).appendChild(st)}function Ae(it,st,ht,ut){var dt=document.createElement(it);if(ht&&(dt.className=ht),ut&&(dt.style.cssText=ut),typeof st=="string")dt.appendChild(document.createTextNode(st));else if(st)for(var Ft=0;Ft<st.length;++Ft)dt.appendChild(st[Ft]);return dt}function Ve(it,st,ht,ut){var dt=Ae(it,st,ht,ut);return dt.setAttribute("role","presentation"),dt}var ye;document.createRange?ye=function(it,st,ht,ut){var dt=document.createRange();return dt.setEnd(ut||it,ht),dt.setStart(it,st),dt}:ye=function(it,st,ht){var ut=document.body.createTextRange();try{ut.moveToElementText(it.parentNode)}catch(dt){return ut}return ut.collapse(!0),ut.moveEnd("character",ht),ut.moveStart("character",st),ut};function on(it,st){if(st.nodeType==3&&(st=st.parentNode),it.contains)return it.contains(st);do if(st.nodeType==11&&(st=st.host),st==it)return!0;while(st=st.parentNode)}function pn(){var it;try{it=document.activeElement}catch(st){it=document.body||null}for(;it&&it.shadowRoot&&it.shadowRoot.activeElement;)it=it.shadowRoot.activeElement;return it}function Vn(it,st){var ht=it.className;Wt(st).test(ht)||(it.className+=(ht?" ":"")+st)}function ti(it,st){for(var ht=it.split(" "),ut=0;ut<ht.length;ut++)ht[ut]&&!Wt(ht[ut]).test(st)&&(st+=" "+ht[ut]);return st}var Xn=function(it){it.select()};Ut?Xn=function(it){it.selectionStart=0,it.selectionEnd=it.value.length}:Fe&&(Xn=function(it){try{it.select()}catch(st){}});function Li(it){var st=Array.prototype.slice.call(arguments,1);return function(){return it.apply(null,st)}}function Ii(it,st,ht){st||(st={});for(var ut in it)it.hasOwnProperty(ut)&&(ht!==!1||!st.hasOwnProperty(ut))&&(st[ut]=it[ut]);return st}function ue(it,st,ht,ut,dt){st==null&&(st=it.search(/[^\s\u00a0]/),st==-1&&(st=it.length));for(var Ft=ut||0,Tt=dt||0;;){var zt=it.indexOf(" ",Ft);if(zt<0||zt>=st)return Tt+(st-Ft);Tt+=zt-Ft,Tt+=ht-Tt%ht,Ft=zt+1}}var jt=function(){this.id=null,this.f=null,this.time=0,this.handler=Li(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,st){this.f=st;var ht=+new Date+it;(!this.id||ht<this.time)&&(clearTimeout(this.id),this.id=setTimeout(this.handler,it),this.time=ht)};function En(it,st){for(var ht=0;ht<it.length;++ht)if(it[ht]==st)return ht;return-1}var Si=50,pi={toString:function(){return"CodeMirror.Pass"}},Ke={scroll:!1},Pn={origin:"*mouse"},qn={origin:"+move"};function xi(it,st,ht){for(var ut=0,dt=0;;){var Ft=it.indexOf(" ",ut);Ft==-1&&(Ft=it.length);var Tt=Ft-ut;if(Ft==it.length||dt+Tt>=st)return ut+Math.min(Tt,st-dt);if(dt+=Ft-ut,dt+=ht-dt%ht,ut=Ft+1,dt>=st)return ut}}var kn=[""];function Ce(it){for(;kn.length<=it;)kn.push(Ge(kn)+" ");return kn[it]}function Ge(it){return it[it.length-1]}function gi(it,st){for(var ht=[],ut=0;ut<it.length;ut++)ht[ut]=st(it[ut],ut);return ht}function yi(it,st,ht){for(var ut=0,dt=ht(st);ut<it.length&&ht(it[ut])<=dt;)ut++;it.splice(ut,0,st)}function Ht(){}function Et(it,st){var ht;return Object.create?ht=Object.create(it):(Ht.prototype=it,ht=new Ht),st&&Ii(st,ht),ht}var Ct=/[\u00df\u0587\u0590-\u05f4\u0600-\u06ff\u3040-\u309f\u30a0-\u30ff\u3400-\u4db5\u4e00-\u9fcc\uac00-\ud7af]/;function Nt(it){return/\w/.test(it)||it>"\x80"&&(it.toUpperCase()!=it.toLowerCase()||Ct.test(it))}function Kt(it,st){return st?st.source.indexOf("\\w")>-1&&Nt(it)?!0:st.test(it):Nt(it)}function kt(it){for(var st in it)if(it.hasOwnProperty(st)&&it[st])return!1;return!0}var be=/[\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 An(it){return it.charCodeAt(0)>=768&&be.test(it)}function ze(it,st,ht){for(;(ht<0?st>0:st<it.length)&&An(it.charAt(st));)st+=ht;return st}function Je(it,st,ht){for(var ut=st>ht?-1:1;;){if(st==ht)return st;var dt=(st+ht)/2,Ft=ut<0?Math.ceil(dt):Math.floor(dt);if(Ft==st)return it(Ft)?st:ht;it(Ft)?ht=Ft:st=Ft+ut}}function rn(it,st,ht,ut){if(!it)return ut(st,ht,"ltr",0);for(var dt=!1,Ft=0;Ft<it.length;++Ft){var Tt=it[Ft];(Tt.from<ht&&Tt.to>st||st==ht&&Tt.to==st)&&(ut(Math.max(Tt.from,st),Math.min(Tt.to,ht),Tt.level==1?"rtl":"ltr",Ft),dt=!0)}dt||ut(st,ht,"ltr")}var Oe=null;function mn(it,st,ht){var ut;Oe=null;for(var dt=0;dt<it.length;++dt){var Ft=it[dt];if(Ft.from<st&&Ft.to>st)return dt;Ft.to==st&&(Ft.from!=Ft.to&&ht=="before"?ut=dt:Oe=dt),Ft.from==st&&(Ft.from!=Ft.to&&ht!="before"?ut=dt:Oe=dt)}return ut!=null?ut:Oe}var cn=function(){var it="bbbbbbbbbtstwsbbbbbbbbbbbbbbssstwNN%%%NNNNNN,N,N1111111111NNNNNNNLLLLLLLLLLLLLLLLLLLLLLLLLLNNNNNNLLLLLLLLLLLLLLLLLLLLLLLLLLNNNNbbbbbbsbbbbbbbbbbbbbbbbbbbbbbbbbb,N%%%%NNNNLNNNNN%%11NLNNN1LNNNNNLLLLLLLLLLLLLLLLLLLLLLLNLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLN",st="nnnnnnNNr%%r,rNNmmmmmmmmmmmrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrmmmmmmmmmmmmmmmmmmmmmnnnnnnnnnn%nnrrrmrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrmmmmmmmnNmmmmmmrrmmNmmmmrr1111111111";function ht(ee){return ee<=247?it.charAt(ee):1424<=ee&&ee<=1524?"R":1536<=ee&&ee<=1785?st.charAt(ee-1536):1774<=ee&&ee<=2220?"r":8192<=ee&&ee<=8203?"w":ee==8204?"b":"L"}var ut=/[\u0590-\u05f4\u0600-\u06ff\u0700-\u08ac]/,dt=/[stwN]/,Ft=/[LRr]/,Tt=/[Lb1n]/,zt=/[1n]/;function Rt(ee,ke,re){this.level=ee,this.from=ke,this.to=re}return function(ee,ke){var re=ke=="ltr"?"L":"R";if(ee.length==0||ke=="ltr"&&!ut.test(ee))return!1;for(var _e=ee.length,Re=[],Rn=0;Rn<_e;++Rn)Re.push(ht(ee.charCodeAt(Rn)));for(var Yn=0,di=re;Yn<_e;++Yn){var Mi=Re[Yn];Mi=="m"?Re[Yn]=di:di=Mi}for(var Ji=0,zi=re;Ji<_e;++Ji){var lr=Re[Ji];lr=="1"&&zi=="r"?Re[Ji]="n":Ft.test(lr)&&(zi=lr,lr=="r"&&(Re[Ji]="R"))}for(var Ir=1,Hi=Re[0];Ir<_e-1;++Ir){var to=Re[Ir];to=="+"&&Hi=="1"&&Re[Ir+1]=="1"?Re[Ir]="1":to==","&&Hi==Re[Ir+1]&&(Hi=="1"||Hi=="n")&&(Re[Ir]=Hi),Hi=to}for(var cs=0;cs<_e;++cs){var na=Re[cs];if(na==",")Re[cs]="N";else if(na=="%"){var ws=void 0;for(ws=cs+1;ws<_e&&Re[ws]=="%";++ws);for(var qa=cs&&Re[cs-1]=="!"||ws<_e&&Re[ws]=="1"?"1":"N",ua=cs;ua<ws;++ua)Re[ua]=qa;cs=ws-1}}for(var Js=0,Ga=re;Js<_e;++Js){var pa=Re[Js];Ga=="L"&&pa=="1"?Re[Js]="L":Ft.test(pa)&&(Ga=pa)}for(var Di=0;Di<_e;++Di)if(dt.test(Re[Di])){var yo=void 0;for(yo=Di+1;yo<_e&&dt.test(Re[yo]);++yo);for(var fs=(Di?Re[Di-1]:re)=="L",es=(yo<_e?Re[yo]:re)=="L",ma=fs==es?fs?"L":"R":re,Po=Di;Po<yo;++Po)Re[Po]=ma;Di=yo-1}for(var Zr=[],$a,Ms=0;Ms<_e;)if(Tt.test(Re[Ms])){var Nu=Ms;for(++Ms;Ms<_e&&Tt.test(Re[Ms]);++Ms);Zr.push(new Rt(0,Nu,Ms))}else{var Ll=Ms,La=Zr.length,tl=ke=="rtl"?1:0;for(++Ms;Ms<_e&&Re[Ms]!="L";++Ms);for(var Zo=Ll;Zo<Ms;)if(zt.test(Re[Zo])){Ll<Zo&&(Zr.splice(La,0,new Rt(1,Ll,Zo)),La+=tl);var ia=Zo;for(++Zo;Zo<Ms&&zt.test(Re[Zo]);++Zo);Zr.splice(La,0,new Rt(2,ia,Zo)),La+=tl,Ll=Zo}else++Zo;Ll<Ms&&Zr.splice(La,0,new Rt(1,Ll,Ms))}return ke=="ltr"&&(Zr[0].level==1&&($a=ee.match(/^\s+/))&&(Zr[0].from=$a[0].length,Zr.unshift(new Rt(0,0,$a[0].length))),Ge(Zr).level==1&&($a=ee.match(/\s+$/))&&(Ge(Zr).to-=$a[0].length,Zr.push(new Rt(0,_e-$a[0].length,_e)))),ke=="rtl"?Zr.reverse():Zr}}();function Mn(it,st){var ht=it.order;return ht==null&&(ht=it.order=cn(it.text,st)),ht}var zn=[],dn=function(it,st,ht){if(it.addEventListener)it.addEventListener(st,ht,!1);else if(it.attachEvent)it.attachEvent("on"+st,ht);else{var ut=it._handlers||(it._handlers={});ut[st]=(ut[st]||zn).concat(ht)}};function oi(it,st){return it._handlers&&it._handlers[st]||zn}function Ai(it,st,ht){if(it.removeEventListener)it.removeEventListener(st,ht,!1);else if(it.detachEvent)it.detachEvent("on"+st,ht);else{var ut=it._handlers,dt=ut&&ut[st];if(dt){var Ft=En(dt,ht);Ft>-1&&(ut[st]=dt.slice(0,Ft).concat(dt.slice(Ft+1)))}}}function Zi(it,st){var ht=oi(it,st);if(ht.length)for(var ut=Array.prototype.slice.call(arguments,2),dt=0;dt<ht.length;++dt)ht[dt].apply(null,ut)}function tr(it,st,ht){return typeof st=="string"&&(st={type:st,preventDefault:function(){this.defaultPrevented=!0}}),Zi(it,ht||st.type,it,st),Eo(st)||st.codemirrorIgnore}function ro(it){var st=it._handlers&&it._handlers.cursorActivity;if(st)for(var ht=it.curOp.cursorActivityHandlers||(it.curOp.cursorActivityHandlers=[]),ut=0;ut<st.length;++ut)En(ht,st[ut])==-1&&ht.push(st[ut])}function ar(it,st){return oi(it,st).length>0}function pr(it){it.prototype.on=function(st,ht){dn(this,st,ht)},it.prototype.off=function(st,ht){Ai(this,st,ht)}}function wr(it){it.preventDefault?it.preventDefault():it.returnValue=!1}function mo(it){it.stopPropagation?it.stopPropagation():it.cancelBubble=!0}function Eo(it){return it.defaultPrevented!=null?it.defaultPrevented:it.returnValue==!1}function Hr(it){wr(it),mo(it)}function Ur(it){return it.target||it.srcElement}function no(it){var st=it.which;return st==null&&(it.button&1?st=1:it.button&2?st=3:it.button&4&&(st=2)),ct&&it.ctrlKey&&st==1&&(st=3),st}var _o=function(){if(Fe&&we<9)return!1;var it=Ae("div");return"draggable"in it||"dragDrop"in it}(),bo;function Mo(it){if(bo==null){var st=Ae("span","\u200B");fe(it,Ae("span",[st,document.createTextNode("x")])),it.firstChild.offsetHeight!=0&&(bo=st.offsetWidth<=1&&st.offsetHeight>2&&!(Fe&&we<8))}var ht=bo?Ae("span","\u200B"):Ae("span","\xA0",null,"display: inline-block; width: 1px; margin-right: -1px");return ht.setAttribute("cm-text",""),ht}var oo;function Er(it){if(oo!=null)return oo;var st=fe(it,document.createTextNode("A\u062EA")),ht=ye(st,0,1).getBoundingClientRect(),ut=ye(st,1,2).getBoundingClientRect();return he(it),!ht||ht.left==ht.right?!1:oo=ut.right-ht.right<3}var Rr=`
b`.split(/\n/).length!=3?function(it){for(var st=0,ht=[],ut=it.length;st<=ut;){var dt=it.indexOf(`
`,st);dt==-1&&(dt=it.length);var Ft=it.slice(st,it.charAt(dt-1)=="\r"?dt-1:dt),Tt=Ft.indexOf("\r");Tt!=-1?(ht.push(Ft.slice(0,Tt)),st+=Tt+1):(ht.push(Ft),st=dt+1)}return ht}:function(it){return it.split(/\r\n?|\n/)},Pt=window.getSelection?function(it){try{return it.selectionStart!=it.selectionEnd}catch(st){return!1}}:function(it){var st;try{st=it.ownerDocument.selection.createRange()}catch(ht){}return!st||st.parentElement()!=it?!1:st.compareEndPoints("StartToEnd",st)!=0},er=function(){var it=Ae("div");return"oncopy"in it?!0:(it.setAttribute("oncopy","return;"),typeof it.oncopy=="function")}(),Gr=null;function si(it){if(Gr!=null)return Gr;var st=fe(it,Ae("span","x")),ht=st.getBoundingClientRect(),ut=ye(st,0,1).getBoundingClientRect();return Gr=Math.abs(ht.left-ut.left)>1}var ui={},Ci={};function Ri(it,st){arguments.length>2&&(st.dependencies=Array.prototype.slice.call(arguments,2)),ui[it]=st}function Tr(it,st){Ci[it]=st}function Ue(it){if(typeof it=="string"&&Ci.hasOwnProperty(it))it=Ci[it];else if(it&&typeof it.name=="string"&&Ci.hasOwnProperty(it.name)){var st=Ci[it.name];typeof st=="string"&&(st={name:st}),it=Et(st,it),it.name=st.name}else{if(typeof it=="string"&&/^[\w\-]+\/[\w\-]+\+xml$/.test(it))return Ue("application/xml");if(typeof it=="string"&&/^[\w\-]+\/[\w\-]+\+json$/.test(it))return Ue("application/json")}return typeof it=="string"?{name:it}:it||{name:"null"}}function Ie(it,st){st=Ue(st);var ht=ui[st.name];if(!ht)return Ie(it,"text/plain");var ut=ht(it,st);if(Le.hasOwnProperty(st.name)){var dt=Le[st.name];for(var Ft in dt)dt.hasOwnProperty(Ft)&&(ut.hasOwnProperty(Ft)&&(ut["_"+Ft]=ut[Ft]),ut[Ft]=dt[Ft])}if(ut.name=st.name,st.helperType&&(ut.helperType=st.helperType),st.modeProps)for(var Tt in st.modeProps)ut[Tt]=st.modeProps[Tt];return ut}var Le={};function We(it,st){var ht=Le.hasOwnProperty(it)?Le[it]:Le[it]={};Ii(st,ht)}function wi(it,st){if(st===!0)return st;if(it.copyState)return it.copyState(st);var ht={};for(var ut in st){var dt=st[ut];dt instanceof Array&&(dt=dt.concat([])),ht[ut]=dt}return ht}function hi(it,st){for(var ht;it.innerMode&&(ht=it.innerMode(st),!(!ht||ht.mode==it));)st=ht.state,it=ht.mode;return ht||{mode:it,state:st}}function Yi(it,st,ht){return it.startState?it.startState(st,ht):!0}var sn=function(it,st,ht){this.pos=this.start=0,this.string=it,this.tabSize=st||8,this.lastColumnPos=this.lastColumnValue=0,this.lineStart=0,this.lineOracle=ht};sn.prototype.eol=function(){return this.pos>=this.string.length},sn.prototype.sol=function(){return this.pos==this.lineStart},sn.prototype.peek=function(){return this.string.charAt(this.pos)||void 0},sn.prototype.next=function(){if(this.pos<this.string.length)return this.string.charAt(this.pos++)},sn.prototype.eat=function(it){var st=this.string.charAt(this.pos),ht;if(typeof it=="string"?ht=st==it:ht=st&&(it.test?it.test(st):it(st)),ht)return++this.pos,st},sn.prototype.eatWhile=function(it){for(var st=this.pos;this.eat(it););return this.pos>st},sn.prototype.eatSpace=function(){for(var it=this.pos;/[\s\u00a0]/.test(this.string.charAt(this.pos));)++this.pos;return this.pos>it},sn.prototype.skipToEnd=function(){this.pos=this.string.length},sn.prototype.skipTo=function(it){var st=this.string.indexOf(it,this.pos);if(st>-1)return this.pos=st,!0},sn.prototype.backUp=function(it){this.pos-=it},sn.prototype.column=function(){return this.lastColumnPos<this.start&&(this.lastColumnValue=ue(this.string,this.start,this.tabSize,this.lastColumnPos,this.lastColumnValue),this.lastColumnPos=this.start),this.lastColumnValue-(this.lineStart?ue(this.string,this.lineStart,this.tabSize):0)},sn.prototype.indentation=function(){return ue(this.string,null,this.tabSize)-(this.lineStart?ue(this.string,this.lineStart,this.tabSize):0)},sn.prototype.match=function(it,st,ht){if(typeof it=="string"){var ut=function(Tt){return ht?Tt.toLowerCase():Tt},dt=this.string.substr(this.pos,it.length);if(ut(dt)==ut(it))return st!==!1&&(this.pos+=it.length),!0}else{var Ft=this.string.slice(this.pos).match(it);return Ft&&Ft.index>0?null:(Ft&&st!==!1&&(this.pos+=Ft[0].length),Ft)}},sn.prototype.current=function(){return this.string.slice(this.start,this.pos)},sn.prototype.hideFirstChars=function(it,st){this.lineStart+=it;try{return st()}finally{this.lineStart-=it}},sn.prototype.lookAhead=function(it){var st=this.lineOracle;return st&&st.lookAhead(it)},sn.prototype.baseToken=function(){var it=this.lineOracle;return it&&it.baseToken(this.pos)};function He(it,st){if(st-=it.first,st<0||st>=it.size)throw new Error("There is no line "+(st+it.first)+" in the document.");for(var ht=it;!ht.lines;)for(var ut=0;;++ut){var dt=ht.children[ut],Ft=dt.chunkSize();if(st<Ft){ht=dt;break}st-=Ft}return ht.lines[st]}function li(it,st,ht){var ut=[],dt=st.line;return it.iter(st.line,ht.line+1,function(Ft){var Tt=Ft.text;dt==ht.line&&(Tt=Tt.slice(0,ht.ch)),dt==st.line&&(Tt=Tt.slice(st.ch)),ut.push(Tt),++dt}),ut}function _i(it,st,ht){var ut=[];return it.iter(st,ht,function(dt){ut.push(dt.text)}),ut}function un(it,st){var ht=st-it.height;if(ht)for(var ut=it;ut;ut=ut.parent)ut.height+=ht}function Yt(it){if(it.parent==null)return null;for(var st=it.parent,ht=En(st.lines,it),ut=st.parent;ut;st=ut,ut=ut.parent)for(var dt=0;ut.children[dt]!=st;++dt)ht+=ut.children[dt].chunkSize();return ht+st.first}function de(it,st){var ht=it.first;t:do{for(var ut=0;ut<it.children.length;++ut){var dt=it.children[ut],Ft=dt.height;if(st<Ft){it=dt;continue t}st-=Ft,ht+=dt.chunkSize()}return ht}while(!it.lines);for(var Tt=0;Tt<it.lines.length;++Tt){var zt=it.lines[Tt],Rt=zt.height;if(st<Rt)break;st-=Rt}return ht+Tt}function Sn(it,st){return st>=it.first&&st<it.first+it.size}function wn(it,st){return String(it.lineNumberFormatter(st+it.firstLineNumber))}function Ne(it,st,ht){if(ht===void 0&&(ht=null),!(this instanceof Ne))return new Ne(it,st,ht);this.line=it,this.ch=st,this.sticky=ht}function Bn(it,st){return it.line-st.line||it.ch-st.ch}function Ln(it,st){return it.sticky==st.sticky&&Bn(it,st)==0}function bn(it){return Ne(it.line,it.ch)}function ci(it,st){return Bn(it,st)<0?st:it}function Qn(it,st){return Bn(it,st)<0?it:st}function Dn(it,st){return Math.max(it.first,Math.min(st,it.first+it.size-1))}function Zn(it,st){if(st.line<it.first)return Ne(it.first,0);var ht=it.first+it.size-1;return st.line>ht?Ne(ht,He(it,ht).text.length):rr(st,He(it,st.line).text.length)}function rr(it,st){var ht=it.ch;return ht==null||ht>st?Ne(it.line,st):ht<0?Ne(it.line,0):it}function Gi(it,st){for(var ht=[],ut=0;ut<st.length;ut++)ht[ut]=Zn(it,st[ut]);return ht}var an=function(it,st){this.state=it,this.lookAhead=st},Nn=function(it,st,ht,ut){this.state=st,this.doc=it,this.line=ht,this.maxLookAhead=ut||0,this.baseTokens=null,this.baseTokenPos=1};Nn.prototype.lookAhead=function(it){var st=this.doc.getLine(this.line+it);return st!=null&&it>this.maxLookAhead&&(this.maxLookAhead=it),st},Nn.prototype.baseToken=function(it){if(!this.baseTokens)return null;for(;this.baseTokens[this.baseTokenPos]<=it;)this.baseTokenPos+=2;var st=this.baseTokens[this.baseTokenPos+1];return{type:st&&st.replace(/( |^)overlay .*/,""),size:this.baseTokens[this.baseTokenPos]-it}},Nn.prototype.nextLine=function(){this.line++,this.maxLookAhead>0&&this.maxLookAhead--},Nn.fromSaved=function(it,st,ht){return st instanceof an?new Nn(it,wi(it.mode,st.state),ht,st.lookAhead):new Nn(it,wi(it.mode,st),ht)},Nn.prototype.save=function(it){var st=it!==!1?wi(this.doc.mode,this.state):this.state;return this.maxLookAhead>0?new an(st,this.maxLookAhead):st};function hr(it,st,ht,ut){var dt=[it.state.modeGen],Ft={};or(it,st.text,it.doc.mode,ht,function(ee,ke){return dt.push(ee,ke)},Ft,ut);for(var Tt=ht.state,zt=function(ee){ht.baseTokens=dt;var ke=it.state.overlays[ee],re=1,_e=0;ht.state=!0,or(it,st.text,ke.mode,ht,function(Re,Rn){for(var Yn=re;_e<Re;){var di=dt[re];di>Re&&dt.splice(re,1,Re,dt[re+1],di),re+=2,_e=Math.min(Re,di)}if(Rn)if(ke.opaque)dt.splice(Yn,re-Yn,Re,"overlay "+Rn),re=Yn+2;else for(;Yn<re;Yn+=2){var Mi=dt[Yn+1];dt[Yn+1]=(Mi?Mi+" ":"")+"overlay "+Rn}},Ft),ht.state=Tt,ht.baseTokens=null,ht.baseTokenPos=1},Rt=0;Rt<it.state.overlays.length;++Rt)zt(Rt);return{styles:dt,classes:Ft.bgClass||Ft.textClass?Ft:null}}function Cr(it,st,ht){if(!st.styles||st.styles[0]!=it.state.modeGen){var ut=Yr(it,Yt(st)),dt=st.text.length>it.options.maxHighlightLength&&wi(it.doc.mode,ut.state),Ft=hr(it,st,ut);dt&&(ut.state=dt),st.stateAfter=ut.save(!dt),st.styles=Ft.styles,Ft.classes?st.styleClasses=Ft.classes:st.styleClasses&&(st.styleClasses=null),ht===it.doc.highlightFrontier&&(it.doc.modeFrontier=Math.max(it.doc.modeFrontier,++it.doc.highlightFrontier))}return st.styles}function Yr(it,st,ht){var ut=it.doc,dt=it.display;if(!ut.mode.startState)return new Nn(ut,!0,st);var Ft=cr(it,st,ht),Tt=Ft>ut.first&&He(ut,Ft-1).stateAfter,zt=Tt?Nn.fromSaved(ut,Tt,Ft):new Nn(ut,Yi(ut.mode),Ft);return ut.iter(Ft,st,function(Rt){xe(it,Rt.text,zt);var ee=zt.line;Rt.stateAfter=ee==st-1||ee%5==0||ee>=dt.viewFrom&&ee<dt.viewTo?zt.save():null,zt.nextLine()}),ht&&(ut.modeFrontier=zt.line),zt}function xe(it,st,ht,ut){var dt=it.doc.mode,Ft=new sn(st,it.options.tabSize,ht);for(Ft.start=Ft.pos=ut||0,st==""&&Jn(dt,ht.state);!Ft.eol();)Pi(dt,Ft,ht.state),Ft.start=Ft.pos}function Jn(it,st){if(it.blankLine)return it.blankLine(st);if(it.innerMode){var ht=hi(it,st);if(ht.mode.blankLine)return ht.mode.blankLine(ht.state)}}function Pi(it,st,ht,ut){for(var dt=0;dt<10;dt++){ut&&(ut[0]=hi(it,ht).mode);var Ft=it.token(st,ht);if(st.pos>st.start)return Ft}throw new Error("Mode "+it.name+" failed to advance stream.")}var Hn=function(it,st,ht){this.start=it.start,this.end=it.pos,this.string=it.current(),this.type=st||null,this.state=ht};function ur(it,st,ht,ut){var dt=it.doc,Ft=dt.mode,Tt;st=Zn(dt,st);var zt=He(dt,st.line),Rt=Yr(it,st.line,ht),ee=new sn(zt.text,it.options.tabSize,Rt),ke;for(ut&&(ke=[]);(ut||ee.pos<st.ch)&&!ee.eol();)ee.start=ee.pos,Tt=Pi(Ft,ee,Rt.state),ut&&ke.push(new Hn(ee,Tt,wi(dt.mode,Rt.state)));return ut?ke:new Hn(ee,Tt,Rt.state)}function ji(it,st){if(it)for(;;){var ht=it.match(/(?:^|\s+)line-(background-)?(\S+)/);if(!ht)break;it=it.slice(0,ht.index)+it.slice(ht.index+ht[0].length);var ut=ht[1]?"bgClass":"textClass";st[ut]==null?st[ut]=ht[2]:new RegExp("(?:^|\\s)"+ht[2]+"(?:$|\\s)").test(st[ut])||(st[ut]+=" "+ht[2])}return it}function or(it,st,ht,ut,dt,Ft,Tt){var zt=ht.flattenSpans;zt==null&&(zt=it.options.flattenSpans);var Rt=0,ee=null,ke=new sn(st,it.options.tabSize,ut),re,_e=it.options.addModeClass&&[null];for(st==""&&ji(Jn(ht,ut.state),Ft);!ke.eol();){if(ke.pos>it.options.maxHighlightLength?(zt=!1,Tt&&xe(it,st,ut,ke.pos),ke.pos=st.length,re=null):re=ji(Pi(ht,ke,ut.state,_e),Ft),_e){var Re=_e[0].name;Re&&(re="m-"+(re?Re+" "+re:Re))}if(!zt||ee!=re){for(;Rt<ke.start;)Rt=Math.min(ke.start,Rt+5e3),dt(Rt,ee);ee=re}ke.start=ke.pos}for(;Rt<ke.pos;){var Rn=Math.min(ke.pos,Rt+5e3);dt(Rn,ee),Rt=Rn}}function cr(it,st,ht){for(var ut,dt,Ft=it.doc,Tt=ht?-1:st-(it.doc.mode.innerMode?1e3:100),zt=st;zt>Tt;--zt){if(zt<=Ft.first)return Ft.first;var Rt=He(Ft,zt-1),ee=Rt.stateAfter;if(ee&&(!ht||zt+(ee instanceof an?ee.lookAhead:0)<=Ft.modeFrontier))return zt;var ke=ue(Rt.text,null,it.options.tabSize);(dt==null||ut>ke)&&(dt=zt-1,ut=ke)}return dt}function Jt(it,st){if(it.modeFrontier=Math.min(it.modeFrontier,st),!(it.highlightFrontier<st-10)){for(var ht=it.first,ut=st-1;ut>ht;ut--){var dt=He(it,ut).stateAfter;if(dt&&(!(dt instanceof an)||ut+dt.lookAhead<st)){ht=ut+1;break}}it.highlightFrontier=Math.min(it.highlightFrontier,ht)}}var $t=!1,Vt=!1;function Te(){$t=!0}function le(){Vt=!0}function nn(it,st,ht){this.marker=it,this.from=st,this.to=ht}function _n(it,st){if(it)for(var ht=0;ht<it.length;++ht){var ut=it[ht];if(ut.marker==st)return ut}}function On(it,st){for(var ht,ut=0;ut<it.length;++ut)it[ut]!=st&&(ht||(ht=[])).push(it[ut]);return ht}function vi(it,st){it.markedSpans=it.markedSpans?it.markedSpans.concat([st]):[st],st.marker.attachLine(it)}function Gn(it,st,ht){var ut;if(it)for(var dt=0;dt<it.length;++dt){var Ft=it[dt],Tt=Ft.marker,zt=Ft.from==null||(Tt.inclusiveLeft?Ft.from<=st:Ft.from<st);if(zt||Ft.from==st&&Tt.type=="bookmark"&&(!ht||!Ft.marker.insertLeft)){var Rt=Ft.to==null||(Tt.inclusiveRight?Ft.to>=st:Ft.to>st);(ut||(ut=[])).push(new nn(Tt,Ft.from,Rt?null:Ft.to))}}return ut}function fn(it,st,ht){var ut;if(it)for(var dt=0;dt<it.length;++dt){var Ft=it[dt],Tt=Ft.marker,zt=Ft.to==null||(Tt.inclusiveRight?Ft.to>=st:Ft.to>st);if(zt||Ft.from==st&&Tt.type=="bookmark"&&(!ht||Ft.marker.insertLeft)){var Rt=Ft.from==null||(Tt.inclusiveLeft?Ft.from<=st:Ft.from<st);(ut||(ut=[])).push(new nn(Tt,Rt?null:Ft.from-st,Ft.to==null?null:Ft.to-st))}}return ut}function Wn(it,st){if(st.full)return null;var ht=Sn(it,st.from.line)&&He(it,st.from.line).markedSpans,ut=Sn(it,st.to.line)&&He(it,st.to.line).markedSpans;if(!ht&&!ut)return null;var dt=st.from.ch,Ft=st.to.ch,Tt=Bn(st.from,st.to)==0,zt=Gn(ht,dt,Tt),Rt=fn(ut,Ft,Tt),ee=st.text.length==1,ke=Ge(st.text).length+(ee?dt:0);if(zt)for(var re=0;re<zt.length;++re){var _e=zt[re];if(_e.to==null){var Re=_n(Rt,_e.marker);Re?ee&&(_e.to=Re.to==null?null:Re.to+ke):_e.to=dt}}if(Rt)for(var Rn=0;Rn<Rt.length;++Rn){var Yn=Rt[Rn];if(Yn.to!=null&&(Yn.to+=ke),Yn.from==null){var di=_n(zt,Yn.marker);di||(Yn.from=ke,ee&&(zt||(zt=[])).push(Yn))}else Yn.from+=ke,ee&&(zt||(zt=[])).push(Yn)}zt&&(zt=Vi(zt)),Rt&&Rt!=zt&&(Rt=Vi(Rt));var Mi=[zt];if(!ee){var Ji=st.text.length-2,zi;if(Ji>0&&zt)for(var lr=0;lr<zt.length;++lr)zt[lr].to==null&&(zi||(zi=[])).push(new nn(zt[lr].marker,null,null));for(var Ir=0;Ir<Ji;++Ir)Mi.push(zi);Mi.push(Rt)}return Mi}function Vi(it){for(var st=0;st<it.length;++st){var ht=it[st];ht.from!=null&&ht.from==ht.to&&ht.marker.clearWhenEmpty!==!1&&it.splice(st--,1)}return it.length?it:null}function Wi(it,st,ht){var ut=null;if(it.iter(st.line,ht.line+1,function(Re){if(Re.markedSpans)for(var Rn=0;Rn<Re.markedSpans.length;++Rn){var Yn=Re.markedSpans[Rn].marker;Yn.readOnly&&(!ut||En(ut,Yn)==-1)&&(ut||(ut=[])).push(Yn)}}),!ut)return null;for(var dt=[{from:st,to:ht}],Ft=0;Ft<ut.length;++Ft)for(var Tt=ut[Ft],zt=Tt.find(0),Rt=0;Rt<dt.length;++Rt){var ee=dt[Rt];if(!(Bn(ee.to,zt.from)<0||Bn(ee.from,zt.to)>0)){var ke=[Rt,1],re=Bn(ee.from,zt.from),_e=Bn(ee.to,zt.to);(re<0||!Tt.inclusiveLeft&&!re)&&ke.push({from:ee.from,to:zt.from}),(_e>0||!Tt.inclusiveRight&&!_e)&&ke.push({from:zt.to,to:ee.to}),dt.splice.apply(dt,ke),Rt+=ke.length-3}}return dt}function yn(it){var st=it.markedSpans;if(st){for(var ht=0;ht<st.length;++ht)st[ht].marker.detachLine(it);it.markedSpans=null}}function Ot(it,st){if(st){for(var ht=0;ht<st.length;++ht)st[ht].marker.attachLine(it);it.markedSpans=st}}function Ni(it){return it.inclusiveLeft?-1:0}function br(it){return it.inclusiveRight?1:0}function zr(it,st){var ht=it.lines.length-st.lines.length;if(ht!=0)return ht;var ut=it.find(),dt=st.find(),Ft=Bn(ut.from,dt.from)||Ni(it)-Ni(st);if(Ft)return-Ft;var Tt=Bn(ut.to,dt.to)||br(it)-br(st);return Tt||st.id-it.id}function xr(it,st){var ht=Vt&&it.markedSpans,ut;if(ht)for(var dt=void 0,Ft=0;Ft<ht.length;++Ft)dt=ht[Ft],dt.marker.collapsed&&(st?dt.from:dt.to)==null&&(!ut||zr(ut,dt.marker)<0)&&(ut=dt.marker);return ut}function ki(it){return xr(it,!0)}function Kn(it){return xr(it,!1)}function ai(it,st){var ht=Vt&&it.markedSpans,ut;if(ht)for(var dt=0;dt<ht.length;++dt){var Ft=ht[dt];Ft.marker.collapsed&&(Ft.from==null||Ft.from<st)&&(Ft.to==null||Ft.to>st)&&(!ut||zr(ut,Ft.marker)<0)&&(ut=Ft.marker)}return ut}function Fi(it,st,ht,ut,dt){var Ft=He(it,st),Tt=Vt&&Ft.markedSpans;if(Tt)for(var zt=0;zt<Tt.length;++zt){var Rt=Tt[zt];if(Rt.marker.collapsed){var ee=Rt.marker.find(0),ke=Bn(ee.from,ht)||Ni(Rt.marker)-Ni(dt),re=Bn(ee.to,ut)||br(Rt.marker)-br(dt);if(!(ke>=0&&re<=0||ke<=0&&re>=0)&&(ke<=0&&(Rt.marker.inclusiveRight&&dt.inclusiveLeft?Bn(ee.to,ht)>=0:Bn(ee.to,ht)>0)||ke>=0&&(Rt.marker.inclusiveRight&&dt.inclusiveLeft?Bn(ee.from,ut)<=0:Bn(ee.from,ut)<0)))return!0}}}function In(it){for(var st;st=ki(it);)it=st.find(-1,!0).line;return it}function ni(it){for(var st;st=Kn(it);)it=st.find(1,!0).line;return it}function $n(it){for(var st,ht;st=Kn(it);)it=st.find(1,!0).line,(ht||(ht=[])).push(it);return ht}function Tn(it,st){var ht=He(it,st),ut=In(ht);return ht==ut?st:Yt(ut)}function fi(it,st){if(st>it.lastLine())return st;var ht=He(it,st),ut;if(!Xe(it,ht))return st;for(;ut=Kn(ht);)ht=ut.find(1,!0).line;return Yt(ht)+1}function Xe(it,st){var ht=Vt&&st.markedSpans;if(ht){for(var ut=void 0,dt=0;dt<ht.length;++dt)if(ut=ht[dt],!!ut.marker.collapsed){if(ut.from==null)return!0;if(!ut.marker.widgetNode&&ut.from==0&&ut.marker.inclusiveLeft&&nr(it,st,ut))return!0}}}function nr(it,st,ht){if(ht.to==null){var ut=ht.marker.find(1,!0);return nr(it,ut.line,_n(ut.line.markedSpans,ht.marker))}if(ht.marker.inclusiveRight&&ht.to==st.text.length)return!0;for(var dt=void 0,Ft=0;Ft<st.markedSpans.length;++Ft)if(dt=st.markedSpans[Ft],dt.marker.collapsed&&!dt.marker.widgetNode&&dt.from==ht.to&&(dt.to==null||dt.to!=ht.from)&&(dt.marker.inclusiveLeft||ht.marker.inclusiveRight)&&nr(it,st,dt))return!0}function mr(it){it=In(it);for(var st=0,ht=it.parent,ut=0;ut<ht.lines.length;++ut){var dt=ht.lines[ut];if(dt==it)break;st+=dt.height}for(var Ft=ht.parent;Ft;ht=Ft,Ft=ht.parent)for(var Tt=0;Tt<Ft.children.length;++Tt){var zt=Ft.children[Tt];if(zt==ht)break;st+=zt.height}return st}function Or(it){if(it.height==0)return 0;for(var st=it.text.length,ht,ut=it;ht=ki(ut);){var dt=ht.find(0,!0);ut=dt.from.line,st+=dt.from.ch-dt.to.ch}for(ut=it;ht=Kn(ut);){var Ft=ht.find(0,!0);st-=ut.text.length-Ft.from.ch,ut=Ft.to.line,st+=ut.text.length-Ft.to.ch}return st}function ir(it){var st=it.display,ht=it.doc;st.maxLine=He(ht,ht.first),st.maxLineLength=Or(st.maxLine),st.maxLineChanged=!0,ht.iter(function(ut){var dt=Or(ut);dt>st.maxLineLength&&(st.maxLineLength=dt,st.maxLine=ut)})}var jr=function(it,st,ht){this.text=it,Ot(this,st),this.height=ht?ht(this):1};jr.prototype.lineNo=function(){return Yt(this)},pr(jr);function Vr(it,st,ht,ut){it.text=st,it.stateAfter&&(it.stateAfter=null),it.styles&&(it.styles=null),it.order!=null&&(it.order=null),yn(it),Ot(it,ht);var dt=ut?ut(it):1;dt!=it.height&&un(it,dt)}function Ho(it){it.parent=null,yn(it)}var so={},To={};function uo(it,st){if(!it||/^\s*$/.test(it))return null;var ht=st.addModeClass?To:so;return ht[it]||(ht[it]=it.replace(/\S+/g,"cm-$&"))}function Me(it,st){var ht=Ve("span",null,null,ve?"padding-right: .1px":null),ut={pre:Ve("pre",[ht],"CodeMirror-line"),content:ht,col:0,pos:0,cm:it,trailingSpace:!1,splitSpaces:it.getOption("lineWrapping")};st.measure={};for(var dt=0;dt<=(st.rest?st.rest.length:0);dt++){var Ft=dt?st.rest[dt-1]:st.line,Tt=void 0;ut.pos=0,ut.addToken=ls,Er(it.display.measure)&&(Tt=Mn(Ft,it.doc.direction))&&(ut.addToken=ao(ut.addToken,Tt)),ut.map=[];var zt=st!=it.display.externalMeasured&&Yt(Ft);ta(Ft,ut,Cr(it,Ft,zt)),Ft.styleClasses&&(Ft.styleClasses.bgClass&&(ut.bgClass=ti(Ft.styleClasses.bgClass,ut.bgClass||"")),Ft.styleClasses.textClass&&(ut.textClass=ti(Ft.styleClasses.textClass,ut.textClass||""))),ut.map.length==0&&ut.map.push(0,0,ut.content.appendChild(Mo(it.display.measure))),dt==0?(st.measure.map=ut.map,st.measure.cache={}):((st.measure.maps||(st.measure.maps=[])).push(ut.map),(st.measure.caches||(st.measure.caches=[])).push({}))}if(ve){var Rt=ut.content.lastChild;(/\bcm-tab\b/.test(Rt.className)||Rt.querySelector&&Rt.querySelector(".cm-tab"))&&(ut.content.className="cm-tab-wrap-hack")}return Zi(it,"renderLine",it,st.line,ut.pre),ut.pre.className&&(ut.textClass=ti(ut.pre.className,ut.textClass||"")),ut}function ho(it){var st=Ae("span","\u2022","cm-invalidchar");return st.title="\\u"+it.charCodeAt(0).toString(16),st.setAttribute("aria-label",st.title),st}function ls(it,st,ht,ut,dt,Ft,Tt){if(st){var zt=it.splitSpaces?ks(st,it.trailingSpace):st,Rt=it.cm.state.specialChars,ee=!1,ke;if(!Rt.test(st))it.col+=st.length,ke=document.createTextNode(zt),it.map.push(it.pos,it.pos+st.length,ke),Fe&&we<9&&(ee=!0),it.pos+=st.length;else{ke=document.createDocumentFragment();for(var re=0;;){Rt.lastIndex=re;var _e=Rt.exec(st),Re=_e?_e.index-re:st.length-re;if(Re){var Rn=document.createTextNode(zt.slice(re,re+Re));Fe&&we<9?ke.appendChild(Ae("span",[Rn])):ke.appendChild(Rn),it.map.push(it.pos,it.pos+Re,Rn),it.col+=Re,it.pos+=Re}if(!_e)break;re+=Re+1;var Yn=void 0;if(_e[0]==" "){var di=it.cm.options.tabSize,Mi=di-it.col%di;Yn=ke.appendChild(Ae("span",Ce(Mi),"cm-tab")),Yn.setAttribute("role","presentation"),Yn.setAttribute("cm-text"," "),it.col+=Mi}else _e[0]=="\r"||_e[0]==`
`?(Yn=ke.appendChild(Ae("span",_e[0]=="\r"?"\u240D":"\u2424","cm-invalidchar")),Yn.setAttribute("cm-text",_e[0]),it.col+=1):(Yn=it.cm.options.specialCharPlaceholder(_e[0]),Yn.setAttribute("cm-text",_e[0]),Fe&&we<9?ke.appendChild(Ae("span",[Yn])):ke.appendChild(Yn),it.col+=1);it.map.push(it.pos,it.pos+1,Yn),it.pos++}}if(it.trailingSpace=zt.charCodeAt(st.length-1)==32,ht||ut||dt||ee||Ft||Tt){var Ji=ht||"";ut&&(Ji+=ut),dt&&(Ji+=dt);var zi=Ae("span",[ke],Ji,Ft);if(Tt)for(var lr in Tt)Tt.hasOwnProperty(lr)&&lr!="style"&&lr!="class"&&zi.setAttribute(lr,Tt[lr]);return it.content.appendChild(zi)}it.content.appendChild(ke)}}function ks(it,st){if(it.length>1&&!/ /.test(it))return it;for(var ht=st,ut="",dt=0;dt<it.length;dt++){var Ft=it.charAt(dt);Ft==" "&&ht&&(dt==it.length-1||it.charCodeAt(dt+1)==32)&&(Ft="\xA0"),ut+=Ft,ht=Ft==" "}return ut}function ao(it,st){return function(ht,ut,dt,Ft,Tt,zt,Rt){dt=dt?dt+" cm-force-border":"cm-force-border";for(var ee=ht.pos,ke=ee+ut.length;;){for(var re=void 0,_e=0;_e<st.length&&(re=st[_e],!(re.to>ee&&re.from<=ee));_e++);if(re.to>=ke)return it(ht,ut,dt,Ft,Tt,zt,Rt);it(ht,ut.slice(0,re.to-ee),dt,Ft,null,zt,Rt),Ft=null,ut=ut.slice(re.to-ee),ee=re.to}}}function xa(it,st,ht,ut){var dt=!ut&&ht.widgetNode;dt&&it.map.push(it.pos,it.pos+st,dt),!ut&&it.cm.display.input.needsContentAttribute&&(dt||(dt=it.content.appendChild(document.createElement("span"))),dt.setAttribute("cm-marker",ht.id)),dt&&(it.cm.display.input.setUneditable(dt),it.content.appendChild(dt)),it.pos+=st,it.trailingSpace=!1}function ta(it,st,ht){var ut=it.markedSpans,dt=it.text,Ft=0;if(!ut){for(var Tt=1;Tt<ht.length;Tt+=2)st.addToken(st,dt.slice(Ft,Ft=ht[Tt]),uo(ht[Tt+1],st.cm.options));return}for(var zt=dt.length,Rt=0,ee=1,ke="",re,_e,Re=0,Rn,Yn,di,Mi,Ji;;){if(Re==Rt){Rn=Yn=di=_e="",Ji=null,Mi=null,Re=1/0;for(var zi=[],lr=void 0,Ir=0;Ir<ut.length;++Ir){var Hi=ut[Ir],to=Hi.marker;if(to.type=="bookmark"&&Hi.from==Rt&&to.widgetNode)zi.push(to);else if(Hi.from<=Rt&&(Hi.to==null||Hi.to>Rt||to.collapsed&&Hi.to==Rt&&Hi.from==Rt)){if(Hi.to!=null&&Hi.to!=Rt&&Re>Hi.to&&(Re=Hi.to,Yn=""),to.className&&(Rn+=" "+to.className),to.css&&(_e=(_e?_e+";":"")+to.css),to.startStyle&&Hi.from==Rt&&(di+=" "+to.startStyle),to.endStyle&&Hi.to==Re&&(lr||(lr=[])).push(to.endStyle,Hi.to),to.title&&((Ji||(Ji={})).title=to.title),to.attributes)for(var cs in to.attributes)(Ji||(Ji={}))[cs]=to.attributes[cs];to.collapsed&&(!Mi||zr(Mi.marker,to)<0)&&(Mi=Hi)}else Hi.from>Rt&&Re>Hi.from&&(Re=Hi.from)}if(lr)for(var na=0;na<lr.length;na+=2)lr[na+1]==Re&&(Yn+=" "+lr[na]);if(!Mi||Mi.from==Rt)for(var ws=0;ws<zi.length;++ws)xa(st,0,zi[ws]);if(Mi&&(Mi.from||0)==Rt){if(xa(st,(Mi.to==null?zt+1:Mi.to)-Rt,Mi.marker,Mi.from==null),Mi.to==null)return;Mi.to==Rt&&(Mi=!1)}}if(Rt>=zt)break;for(var qa=Math.min(zt,Re);;){if(ke){var ua=Rt+ke.length;if(!Mi){var Js=ua>qa?ke.slice(0,qa-Rt):ke;st.addToken(st,Js,re?re+Rn:Rn,di,Rt+Js.length==Re?Yn:"",_e,Ji)}if(ua>=qa){ke=ke.slice(qa-Rt),Rt=qa;break}Rt=ua,di=""}ke=dt.slice(Ft,Ft=ht[ee++]),re=uo(ht[ee++],st.cm.options)}}}function Da(it,st,ht){this.line=st,this.rest=$n(st),this.size=this.rest?Yt(Ge(this.rest))-ht+1:1,this.node=this.text=null,this.hidden=Xe(it,st)}function Kr(it,st,ht){for(var ut=[],dt,Ft=st;Ft<ht;Ft=dt){var Tt=new Da(it.doc,He(it.doc,Ft),Ft);dt=Ft+Tt.size,ut.push(Tt)}return ut}var Ro=null;function Vs(it){Ro?Ro.ops.push(it):it.ownsGroup=Ro={ops:[it],delayedCallbacks:[]}}function Vl(it){var st=it.delayedCallbacks,ht=0;do{for(;ht<st.length;ht++)st[ht].call(null);for(var ut=0;ut<it.ops.length;ut++){var dt=it.ops[ut];if(dt.cursorActivityHandlers)for(;dt.cursorActivityCalled<dt.cursorActivityHandlers.length;)dt.cursorActivityHandlers[dt.cursorActivityCalled++].call(null,dt.cm)}}while(ht<st.length)}function zA(it,st){var ht=it.ownsGroup;if(ht)try{Vl(ht)}finally{Ro=null,st(ht)}}var Ba=null;function Xi(it,st){var ht=oi(it,st);if(ht.length){var ut=Array.prototype.slice.call(arguments,2),dt;Ro?dt=Ro.delayedCallbacks:Ba?dt=Ba:(dt=Ba=[],setTimeout(xA,0));for(var Ft=function(zt){dt.push(function(){return ht[zt].apply(null,ut)})},Tt=0;Tt<ht.length;++Tt)Ft(Tt)}}function xA(){var it=Ba;Ba=null;for(var st=0;st<it.length;++st)it[st]()}function KA(it,st,ht,ut){for(var dt=0;dt<st.changes.length;dt++){var Ft=st.changes[dt];Ft=="text"?ri(it,st):Ft=="gutter"?vr(it,st,ht,ut):Ft=="class"?$i(it,st):Ft=="widget"&&Fr(it,st,ut)}st.changes=null}function Wa(it){return it.node==it.text&&(it.node=Ae("div",null,null,"position: relative"),it.text.parentNode&&it.text.parentNode.replaceChild(it.node,it.text),it.node.appendChild(it.text),Fe&&we<8&&(it.node.style.zIndex=2)),it.node}function Hs(it,st){var ht=st.bgClass?st.bgClass+" "+(st.line.bgClass||""):st.line.bgClass;if(ht&&(ht+=" CodeMirror-linebackground"),st.background)ht?st.background.className=ht:(st.background.parentNode.removeChild(st.background),st.background=null);else if(ht){var ut=Wa(st);st.background=ut.insertBefore(Ae("div",null,ht),ut.firstChild),it.display.input.setUneditable(st.background)}}function hu(it,st){var ht=it.display.externalMeasured;return ht&&ht.line==st.line?(it.display.externalMeasured=null,st.measure=ht.measure,ht.built):Me(it,st)}function ri(it,st){var ht=st.text.className,ut=hu(it,st);st.text==st.node&&(st.node=ut.pre),st.text.parentNode.replaceChild(ut.pre,st.text),st.text=ut.pre,ut.bgClass!=st.bgClass||ut.textClass!=st.textClass?(st.bgClass=ut.bgClass,st.textClass=ut.textClass,$i(it,st)):ht&&(st.text.className=ht)}function $i(it,st){Hs(it,st),st.line.wrapClass?Wa(st).className=st.line.wrapClass:st.node!=st.text&&(st.node.className="");var ht=st.textClass?st.textClass+" "+(st.line.textClass||""):st.line.textClass;st.text.className=ht||""}function vr(it,st,ht,ut){if(st.gutter&&(st.node.removeChild(st.gutter),st.gutter=null),st.gutterBackground&&(st.node.removeChild(st.gutterBackground),st.gutterBackground=null),st.line.gutterClass){var dt=Wa(st);st.gutterBackground=Ae("div",null,"CodeMirror-gutter-background "+st.line.gutterClass,"left: "+(it.options.fixedGutter?ut.fixedPos:-ut.gutterTotalWidth)+"px; width: "+ut.gutterTotalWidth+"px"),it.display.input.setUneditable(st.gutterBackground),dt.insertBefore(st.gutterBackground,st.text)}var Ft=st.line.gutterMarkers;if(it.options.lineNumbers||Ft){var Tt=Wa(st),zt=st.gutter=Ae("div",null,"CodeMirror-gutter-wrapper","left: "+(it.options.fixedGutter?ut.fixedPos:-ut.gutterTotalWidth)+"px");if(it.display.input.setUneditable(zt),Tt.insertBefore(zt,st.text),st.line.gutterClass&&(zt.className+=" "+st.line.gutterClass),it.options.lineNumbers&&(!Ft||!Ft["CodeMirror-linenumbers"])&&(st.lineNumber=zt.appendChild(Ae("div",wn(it.options,ht),"CodeMirror-linenumber CodeMirror-gutter-elt","left: "+ut.gutterLeft["CodeMirror-linenumbers"]+"px; width: "+it.display.lineNumInnerWidth+"px"))),Ft)for(var Rt=0;Rt<it.display.gutterSpecs.length;++Rt){var ee=it.display.gutterSpecs[Rt].className,ke=Ft.hasOwnProperty(ee)&&Ft[ee];ke&&zt.appendChild(Ae("div",[ke],"CodeMirror-gutter-elt","left: "+ut.gutterLeft[ee]+"px; width: "+ut.gutterWidth[ee]+"px"))}}}function Fr(it,st,ht){st.alignable&&(st.alignable=null);for(var ut=Wt("CodeMirror-linewidget"),dt=st.node.firstChild,Ft=void 0;dt;dt=Ft)Ft=dt.nextSibling,ut.test(dt.className)&&st.node.removeChild(dt);wo(it,st,ht)}function Dr(it,st,ht,ut){var dt=hu(it,st);return st.text=st.node=dt.pre,dt.bgClass&&(st.bgClass=dt.bgClass),dt.textClass&&(st.textClass=dt.textClass),$i(it,st),vr(it,st,ht,ut),wo(it,st,ut),st.node}function wo(it,st,ht){if(Ui(it,st.line,st,ht,!0),st.rest)for(var ut=0;ut<st.rest.length;ut++)Ui(it,st.rest[ut],st,ht,!1)}function Ui(it,st,ht,ut,dt){if(st.widgets)for(var Ft=Wa(ht),Tt=0,zt=st.widgets;Tt<zt.length;++Tt){var Rt=zt[Tt],ee=Ae("div",[Rt.node],"CodeMirror-linewidget"+(Rt.className?" "+Rt.className:""));Rt.handleMouseEvents||ee.setAttribute("cm-ignore-events","true"),So(Rt,ee,ht,ut),it.display.input.setUneditable(ee),dt&&Rt.above?Ft.insertBefore(ee,ht.gutter||ht.text):Ft.appendChild(ee),Xi(Rt,"redraw")}}function So(it,st,ht,ut){if(it.noHScroll){(ht.alignable||(ht.alignable=[])).push(st);var dt=ut.wrapperWidth;st.style.left=ut.fixedPos+"px",it.coverGutter||(dt-=ut.gutterTotalWidth,st.style.paddingLeft=ut.gutterTotalWidth+"px"),st.style.width=dt+"px"}it.coverGutter&&(st.style.zIndex=5,st.style.position="relative",it.noHScroll||(st.style.marginLeft=-ut.gutterTotalWidth+"px"))}function ea(it){if(it.height!=null)return it.height;var st=it.doc.cm;if(!st)return 0;if(!on(document.body,it.node)){var ht="position: relative;";it.coverGutter&&(ht+="margin-left: -"+st.display.gutters.offsetWidth+"px;"),it.noHScroll&&(ht+="width: "+st.display.wrapper.clientWidth+"px;"),fe(st.display.measure,Ae("div",[it.node],null,ht))}return it.height=it.node.parentNode.offsetHeight}function Bs(it,st){for(var ht=Ur(st);ht!=it.wrapper;ht=ht.parentNode)if(!ht||ht.nodeType==1&&ht.getAttribute("cm-ignore-events")=="true"||ht.parentNode==it.sizer&&ht!=it.mover)return!0}function Go(it){return it.lineSpace.offsetTop}function _s(it){return it.mover.offsetHeight-it.lineSpace.offsetHeight}function bs(it){if(it.cachedPaddingH)return it.cachedPaddingH;var st=fe(it.measure,Ae("pre","x","CodeMirror-line-like")),ht=window.getComputedStyle?window.getComputedStyle(st):st.currentStyle,ut={left:parseInt(ht.paddingLeft),right:parseInt(ht.paddingRight)};return!isNaN(ut.left)&&!isNaN(ut.right)&&(it.cachedPaddingH=ut),ut}function ca(it){return Si-it.display.nativeBarWidth}function Ws(it){return it.display.scroller.clientWidth-ca(it)-it.display.barWidth}function ns(it){return it.display.scroller.clientHeight-ca(it)-it.display.barHeight}function xl(it,st,ht){var ut=it.options.lineWrapping,dt=ut&&Ws(it);if(!st.measure.heights||ut&&st.measure.width!=dt){var Ft=st.measure.heights=[];if(ut){st.measure.width=dt;for(var Tt=st.text.firstChild.getClientRects(),zt=0;zt<Tt.length-1;zt++){var Rt=Tt[zt],ee=Tt[zt+1];Math.abs(Rt.bottom-ee.bottom)>2&&Ft.push((Rt.bottom+ee.top)/2-ht.top)}}Ft.push(ht.bottom-ht.top)}}function Ts(it,st,ht){if(it.line==st)return{map:it.measure.map,cache:it.measure.cache};for(var ut=0;ut<it.rest.length;ut++)if(it.rest[ut]==st)return{map:it.measure.maps[ut],cache:it.measure.caches[ut]};for(var dt=0;dt<it.rest.length;dt++)if(Yt(it.rest[dt])>ht)return{map:it.measure.maps[dt],cache:it.measure.caches[dt],before:!0}}function Zu(it,st){st=In(st);var ht=Yt(st),ut=it.display.externalMeasured=new Da(it.doc,st,ht);ut.lineN=ht;var dt=ut.built=Me(it,ut);return ut.text=dt.pre,fe(it.display.lineMeasure,dt.pre),ut}function Il(it,st,ht,ut){return al(it,Qo(it,st),ht,ut)}function Ya(it,st){if(st>=it.display.viewFrom&&st<it.display.viewTo)return it.display.view[Al(it,st)];var ht=it.display.externalMeasured;if(ht&&st>=ht.lineN&&st<ht.lineN+ht.size)return ht}function Qo(it,st){var ht=Yt(st),ut=Ya(it,ht);ut&&!ut.text?ut=null:ut&&ut.changes&&(KA(it,ut,ht,jA(it)),it.curOp.forceUpdate=!0),ut||(ut=Zu(it,st));var dt=Ts(ut,st,ht);return{line:st,view:ut,rect:null,map:dt.map,cache:dt.cache,before:dt.before,hasHeights:!1}}function al(it,st,ht,ut,dt){st.before&&(ht=-1);var Ft=ht+(ut||""),Tt;return st.cache.hasOwnProperty(Ft)?Tt=st.cache[Ft]:(st.rect||(st.rect=st.view.text.getBoundingClientRect()),st.hasHeights||(xl(it,st.view,st.rect),st.hasHeights=!0),Tt=is(it,st,ht,ut),Tt.bogus||(st.cache[Ft]=Tt)),{left:Tt.left,right:Tt.right,top:dt?Tt.rtop:Tt.top,bottom:dt?Tt.rbottom:Tt.bottom}}var Ju={left:0,right:0,top:0,bottom:0};function qu(it,st,ht){for(var ut,dt,Ft,Tt,zt,Rt,ee=0;ee<it.length;ee+=3)if(zt=it[ee],Rt=it[ee+1],st<zt?(dt=0,Ft=1,Tt="left"):st<Rt?(dt=st-zt,Ft=dt+1):(ee==it.length-3||st==Rt&&it[ee+3]>st)&&(Ft=Rt-zt,dt=Ft-1,st>=Rt&&(Tt="right")),dt!=null){if(ut=it[ee+2],zt==Rt&&ht==(ut.insertLeft?"left":"right")&&(Tt=ht),ht=="left"&&dt==0)for(;ee&&it[ee-2]==it[ee-3]&&it[ee-1].insertLeft;)ut=it[(ee-=3)+2],Tt="left";if(ht=="right"&&dt==Rt-zt)for(;ee<it.length-3&&it[ee+3]==it[ee+4]&&!it[ee+5].insertLeft;)ut=it[(ee+=3)+2],Tt="right";break}return{node:ut,start:dt,end:Ft,collapse:Tt,coverStart:zt,coverEnd:Rt}}function Eh(it,st){var ht=Ju;if(st=="left")for(var ut=0;ut<it.length&&(ht=it[ut]).left==ht.right;ut++);else for(var dt=it.length-1;dt>=0&&(ht=it[dt]).left==ht.right;dt--);return ht}function is(it,st,ht,ut){var dt=qu(st.map,ht,ut),Ft=dt.node,Tt=dt.start,zt=dt.end,Rt=dt.collapse,ee;if(Ft.nodeType==3){for(var ke=0;ke<4;ke++){for(;Tt&&An(st.line.text.charAt(dt.coverStart+Tt));)--Tt;for(;dt.coverStart+zt<dt.coverEnd&&An(st.line.text.charAt(dt.coverStart+zt));)++zt;if(Fe&&we<9&&Tt==0&&zt==dt.coverEnd-dt.coverStart?ee=Ft.parentNode.getBoundingClientRect():ee=Eh(ye(Ft,Tt,zt).getClientRects(),ut),ee.left||ee.right||Tt==0)break;zt=Tt,Tt=Tt-1,Rt="right"}Fe&&we<11&&(ee=Lc(it.display.measure,ee))}else{Tt>0&&(Rt=ut="right");var re;it.options.lineWrapping&&(re=Ft.getClientRects()).length>1?ee=re[ut=="right"?re.length-1:0]:ee=Ft.getBoundingClientRect()}if(Fe&&we<9&&!Tt&&(!ee||!ee.left&&!ee.right)){var _e=Ft.parentNode.getClientRects()[0];_e?ee={left:_e.left,right:_e.left+_l(it.display),top:_e.top,bottom:_e.bottom}:ee=Ju}for(var Re=ee.top-st.rect.top,Rn=ee.bottom-st.rect.top,Yn=(Re+Rn)/2,di=st.view.measure.heights,Mi=0;Mi<di.length-1&&!(Yn<di[Mi]);Mi++);var Ji=Mi?di[Mi-1]:0,zi=di[Mi],lr={left:(Rt=="right"?ee.right:ee.left)-st.rect.left,right:(Rt=="left"?ee.left:ee.right)-st.rect.left,top:Ji,bottom:zi};return!ee.left&&!ee.right&&(lr.bogus=!0),it.options.singleCursorHeightPerLine||(lr.rtop=Re,lr.rbottom=Rn),lr}function Lc(it,st){if(!window.screen||screen.logicalXDPI==null||screen.logicalXDPI==screen.deviceXDPI||!si(it))return st;var ht=screen.logicalXDPI/screen.deviceXDPI,ut=screen.logicalYDPI/screen.deviceYDPI;return{left:st.left*ht,right:st.right*ht,top:st.top*ut,bottom:st.bottom*ut}}function $u(it){if(it.measure&&(it.measure.cache={},it.measure.heights=null,it.rest))for(var st=0;st<it.rest.length;st++)it.measure.caches[st]={}}function fa(it){it.display.externalMeasure=null,he(it.display.lineMeasure);for(var st=0;st<it.display.view.length;st++)$u(it.display.view[st])}function ll(it){fa(it),it.display.cachedCharWidth=it.display.cachedTextHeight=it.display.cachedPaddingH=null,it.options.lineWrapping||(it.display.maxLineChanged=!0),it.display.lineNumChars=null}function vs(){return ge&&et?-(document.body.getBoundingClientRect().left-parseInt(getComputedStyle(document.body).marginLeft)):window.pageXOffset||(document.documentElement||document.body).scrollLeft}function No(){return ge&&et?-(document.body.getBoundingClientRect().top-parseInt(getComputedStyle(document.body).marginTop)):window.pageYOffset||(document.documentElement||document.body).scrollTop}function rs(it){var st=0;if(it.widgets)for(var ht=0;ht<it.widgets.length;++ht)it.widgets[ht].above&&(st+=ea(it.widgets[ht]));return st}function Ys(it,st,ht,ut,dt){if(!dt){var Ft=rs(st);ht.top+=Ft,ht.bottom+=Ft}if(ut=="line")return ht;ut||(ut="local");var Tt=mr(st);if(ut=="local"?Tt+=Go(it.display):Tt-=it.display.viewOffset,ut=="page"||ut=="window"){var zt=it.display.lineSpace.getBoundingClientRect();Tt+=zt.top+(ut=="window"?0:No());var Rt=zt.left+(ut=="window"?0:vs());ht.left+=Rt,ht.right+=Rt}return ht.top+=Tt,ht.bottom+=Tt,ht}function th(it,st,ht){if(ht=="div")return st;var ut=st.left,dt=st.top;if(ht=="page")ut-=vs(),dt-=No();else if(ht=="local"||!ht){var Ft=it.display.sizer.getBoundingClientRect();ut+=Ft.left,dt+=Ft.top}var Tt=it.display.lineSpace.getBoundingClientRect();return{left:ut-Tt.left,top:dt-Tt.top}}function BA(it,st,ht,ut,dt){return ut||(ut=He(it.doc,st.line)),Ys(it,ut,Il(it,ut,st.ch,dt),ht)}function Yo(it,st,ht,ut,dt,Ft){ut=ut||He(it.doc,st.line),dt||(dt=Qo(it,ut));function Tt(Rn,Yn){var di=al(it,dt,Rn,Yn?"right":"left",Ft);return Yn?di.left=di.right:di.right=di.left,Ys(it,ut,di,ht)}var zt=Mn(ut,it.doc.direction),Rt=st.ch,ee=st.sticky;if(Rt>=ut.text.length?(Rt=ut.text.length,ee="before"):Rt<=0&&(Rt=0,ee="after"),!zt)return Tt(ee=="before"?Rt-1:Rt,ee=="before");function ke(Rn,Yn,di){var Mi=zt[Yn],Ji=Mi.level==1;return Tt(di?Rn-1:Rn,Ji!=di)}var re=mn(zt,Rt,ee),_e=Oe,Re=ke(Rt,re,ee=="before");return _e!=null&&(Re.other=ke(Rt,_e,ee!="before")),Re}function ko(it,st){var ht=0;st=Zn(it.doc,st),it.options.lineWrapping||(ht=_l(it.display)*st.ch);var ut=He(it.doc,st.line),dt=mr(ut)+Go(it.display);return{left:ht,right:ht,top:dt,bottom:dt+ut.height}}function Xr(it,st,ht,ut,dt){var Ft=Ne(it,st,ht);return Ft.xRel=dt,ut&&(Ft.outside=ut),Ft}function ys(it,st,ht){var ut=it.doc;if(ht+=it.display.viewOffset,ht<0)return Xr(ut.first,0,null,-1,-1);var dt=de(ut,ht),Ft=ut.first+ut.size-1;if(dt>Ft)return Xr(ut.first+ut.size-1,He(ut,Ft).text.length,null,1,1);st<0&&(st=0);for(var Tt=He(ut,dt);;){var zt=qe(it,Tt,dt,st,ht),Rt=ai(Tt,zt.ch+(zt.xRel>0||zt.outside>0?1:0));if(!Rt)return zt;var ee=Rt.find(1);if(ee.line==dt)return ee;Tt=He(ut,dt=ee.line)}}function Ei(it,st,ht,ut){ut-=rs(st);var dt=st.text.length,Ft=Je(function(Tt){return al(it,ht,Tt-1).bottom<=ut},dt,0);return dt=Je(function(Tt){return al(it,ht,Tt).top>ut},Ft,dt),{begin:Ft,end:dt}}function Rs(it,st,ht,ut){ht||(ht=Qo(it,st));var dt=Ys(it,st,al(it,ht,ut),"line").top;return Ei(it,st,ht,dt)}function oe(it,st,ht,ut){return it.bottom<=ht?!1:it.top>ht?!0:(ut?it.left:it.right)>st}function qe(it,st,ht,ut,dt){dt-=mr(st);var Ft=Qo(it,st),Tt=rs(st),zt=0,Rt=st.text.length,ee=!0,ke=Mn(st,it.doc.direction);if(ke){var re=(it.options.lineWrapping?CA:Nl)(it,st,ht,Ft,ke,ut,dt);ee=re.level!=1,zt=ee?re.from:re.to-1,Rt=ee?re.to:re.from-1}var _e=null,Re=null,Rn=Je(function(Ir){var Hi=al(it,Ft,Ir);return Hi.top+=Tt,Hi.bottom+=Tt,oe(Hi,ut,dt,!1)?(Hi.top<=dt&&Hi.left<=ut&&(_e=Ir,Re=Hi),!0):!1},zt,Rt),Yn,di,Mi=!1;if(Re){var Ji=ut-Re.left<Re.right-ut,zi=Ji==ee;Rn=_e+(zi?0:1),di=zi?"after":"before",Yn=Ji?Re.left:Re.right}else{!ee&&(Rn==Rt||Rn==zt)&&Rn++,di=Rn==0?"after":Rn==st.text.length?"before":al(it,Ft,Rn-(ee?1:0)).bottom+Tt<=dt==ee?"after":"before";var lr=Yo(it,Ne(ht,Rn,di),"line",st,Ft);Yn=lr.left,Mi=dt<lr.top?-1:dt>=lr.bottom?1:0}return Rn=ze(st.text,Rn,1),Xr(ht,Rn,di,Mi,ut-Yn)}function Nl(it,st,ht,ut,dt,Ft,Tt){var zt=Je(function(re){var _e=dt[re],Re=_e.level!=1;return oe(Yo(it,Ne(ht,Re?_e.to:_e.from,Re?"before":"after"),"line",st,ut),Ft,Tt,!0)},0,dt.length-1),Rt=dt[zt];if(zt>0){var ee=Rt.level!=1,ke=Yo(it,Ne(ht,ee?Rt.from:Rt.to,ee?"after":"before"),"line",st,ut);oe(ke,Ft,Tt,!0)&&ke.top>Tt&&(Rt=dt[zt-1])}return Rt}function CA(it,st,ht,ut,dt,Ft,Tt){var zt=Ei(it,st,ut,Tt),Rt=zt.begin,ee=zt.end;/\s/.test(st.text.charAt(ee-1))&&ee--;for(var ke=null,re=null,_e=0;_e<dt.length;_e++){var Re=dt[_e];if(!(Re.from>=ee||Re.to<=Rt)){var Rn=Re.level!=1,Yn=al(it,ut,Rn?Math.min(ee,Re.to)-1:Math.max(Rt,Re.from)).right,di=Yn<Ft?Ft-Yn+1e9:Yn-Ft;(!ke||re>di)&&(ke=Re,re=di)}}return ke||(ke=dt[dt.length-1]),ke.from<Rt&&(ke={from:Rt,to:ke.to,level:ke.level}),ke.to>ee&&(ke={from:ke.from,to:ee,level:ke.level}),ke}var Cs;function Ca(it){if(it.cachedTextHeight!=null)return it.cachedTextHeight;if(Cs==null){Cs=Ae("pre",null,"CodeMirror-line-like");for(var st=0;st<49;++st)Cs.appendChild(document.createTextNode("x")),Cs.appendChild(Ae("br"));Cs.appendChild(document.createTextNode("x"))}fe(it.measure,Cs);var ht=Cs.offsetHeight/50;return ht>3&&(it.cachedTextHeight=ht),he(it.measure),ht||1}function _l(it){if(it.cachedCharWidth!=null)return it.cachedCharWidth;var st=Ae("span","xxxxxxxxxx"),ht=Ae("pre",[st],"CodeMirror-line-like");fe(it.measure,ht);var ut=st.getBoundingClientRect(),dt=(ut.right-ut.left)/10;return dt>2&&(it.cachedCharWidth=dt),dt||10}function jA(it){for(var st=it.display,ht={},ut={},dt=st.gutters.clientLeft,Ft=st.gutters.firstChild,Tt=0;Ft;Ft=Ft.nextSibling,++Tt){var zt=it.display.gutterSpecs[Tt].className;ht[zt]=Ft.offsetLeft+Ft.clientLeft+dt,ut[zt]=Ft.clientWidth}return{fixedPos:cu(st),gutterTotalWidth:st.gutters.offsetWidth,gutterLeft:ht,gutterWidth:ut,wrapperWidth:st.wrapper.clientWidth}}function cu(it){return it.scroller.getBoundingClientRect().left-it.sizer.getBoundingClientRect().left}function As(it){var st=Ca(it.display),ht=it.options.lineWrapping,ut=ht&&Math.max(5,it.display.scroller.clientWidth/_l(it.display)-3);return function(dt){if(Xe(it.doc,dt))return 0;var Ft=0;if(dt.widgets)for(var Tt=0;Tt<dt.widgets.length;Tt++)dt.widgets[Tt].height&&(Ft+=dt.widgets[Tt].height);return ht?Ft+(Math.ceil(dt.text.length/ut)||1)*st:Ft+st}}function yr(it){var st=it.doc,ht=As(it);st.iter(function(ut){var dt=ht(ut);dt!=ut.height&&un(ut,dt)})}function Pa(it,st,ht,ut){var dt=it.display;if(!ht&&Ur(st).getAttribute("cm-not-content")=="true")return null;var Ft,Tt,zt=dt.lineSpace.getBoundingClientRect();try{Ft=st.clientX-zt.left,Tt=st.clientY-zt.top}catch(re){return null}var Rt=ys(it,Ft,Tt),ee;if(ut&&Rt.xRel>0&&(ee=He(it.doc,Rt.line).text).length==Rt.ch){var ke=ue(ee,ee.length,it.options.tabSize)-ee.length;Rt=Ne(Rt.line,Math.max(0,Math.round((Ft-bs(it.display).left)/_l(it.display))-ke))}return Rt}function Al(it,st){if(st>=it.display.viewTo||(st-=it.display.viewFrom,st<0))return null;for(var ht=it.display.view,ut=0;ut<ht.length;ut++)if(st-=ht[ut].size,st<0)return ut}function os(it,st,ht,ut){st==null&&(st=it.doc.first),ht==null&&(ht=it.doc.first+it.doc.size),ut||(ut=0);var dt=it.display;if(ut&&ht<dt.viewTo&&(dt.updateLineNumbers==null||dt.updateLineNumbers>st)&&(dt.updateLineNumbers=st),it.curOp.viewChanged=!0,st>=dt.viewTo)Vt&&Tn(it.doc,st)<dt.viewTo&&Es(it);else if(ht<=dt.viewFrom)Vt&&fi(it.doc,ht+ut)>dt.viewFrom?Es(it):(dt.viewFrom+=ut,dt.viewTo+=ut);else if(st<=dt.viewFrom&&ht>=dt.viewTo)Es(it);else if(st<=dt.viewFrom){var Ft=Oa(it,ht,ht+ut,1);Ft?(dt.view=dt.view.slice(Ft.index),dt.viewFrom=Ft.lineN,dt.viewTo+=ut):Es(it)}else if(ht>=dt.viewTo){var Tt=Oa(it,st,st,-1);Tt?(dt.view=dt.view.slice(0,Tt.index),dt.viewTo=Tt.lineN):Es(it)}else{var zt=Oa(it,st,st,-1),Rt=Oa(it,ht,ht+ut,1);zt&&Rt?(dt.view=dt.view.slice(0,zt.index).concat(Kr(it,zt.lineN,Rt.lineN)).concat(dt.view.slice(Rt.index)),dt.viewTo+=ut):Es(it)}var ee=dt.externalMeasured;ee&&(ht<ee.lineN?ee.lineN+=ut:st<ee.lineN+ee.size&&(dt.externalMeasured=null))}function _r(it,st,ht){it.curOp.viewChanged=!0;var ut=it.display,dt=it.display.externalMeasured;if(dt&&st>=dt.lineN&&st<dt.lineN+dt.size&&(ut.externalMeasured=null),!(st<ut.viewFrom||st>=ut.viewTo)){var Ft=ut.view[Al(it,st)];if(Ft.node!=null){var Tt=Ft.changes||(Ft.changes=[]);En(Tt,ht)==-1&&Tt.push(ht)}}}function Es(it){it.display.viewFrom=it.display.viewTo=it.doc.first,it.display.view=[],it.display.viewOffset=0}function Oa(it,st,ht,ut){var dt=Al(it,st),Ft,Tt=it.display.view;if(!Vt||ht==it.doc.first+it.doc.size)return{index:dt,lineN:ht};for(var zt=it.display.viewFrom,Rt=0;Rt<dt;Rt++)zt+=Tt[Rt].size;if(zt!=st){if(ut>0){if(dt==Tt.length-1)return null;Ft=zt+Tt[dt].size-st,dt++}else Ft=zt-st;st+=Ft,ht+=Ft}for(;Tn(it.doc,ht)!=ht;){if(dt==(ut<0?0:Tt.length-1))return null;ht+=ut*Tt[dt-(ut<0?1:0)].size,dt+=ut}return{index:dt,lineN:ht}}function zo(it,st,ht){var ut=it.display,dt=ut.view;dt.length==0||st>=ut.viewTo||ht<=ut.viewFrom?(ut.view=Kr(it,st,ht),ut.viewFrom=st):(ut.viewFrom>st?ut.view=Kr(it,st,ut.viewFrom).concat(ut.view):ut.viewFrom<st&&(ut.view=ut.view.slice(Al(it,st))),ut.viewFrom=st,ut.viewTo<ht?ut.view=ut.view.concat(Kr(it,ut.viewTo,ht)):ut.viewTo>ht&&(ut.view=ut.view.slice(0,Al(it,ht)))),ut.viewTo=ht}function ul(it){for(var st=it.display.view,ht=0,ut=0;ut<st.length;ut++){var dt=st[ut];!dt.hidden&&(!dt.node||dt.changes)&&++ht}return ht}function Is(it){it.display.input.showSelection(it.display.input.prepareSelection())}function fu(it,st){st===void 0&&(st=!0);for(var ht=it.doc,ut={},dt=ut.cursors=document.createDocumentFragment(),Ft=ut.selection=document.createDocumentFragment(),Tt=0;Tt<ht.sel.ranges.length;Tt++)if(!(!st&&Tt==ht.sel.primIndex)){var zt=ht.sel.ranges[Tt];if(!(zt.from().line>=it.display.viewTo||zt.to().line<it.display.viewFrom)){var Rt=zt.empty();(Rt||it.options.showCursorWhenSelecting)&&vo(it,zt.head,dt),Rt||co(it,zt,Ft)}}return ut}function vo(it,st,ht){var ut=Yo(it,st,"div",null,null,!it.options.singleCursorHeightPerLine),dt=ht.appendChild(Ae("div","\xA0","CodeMirror-cursor"));if(dt.style.left=ut.left+"px",dt.style.top=ut.top+"px",dt.style.height=Math.max(0,ut.bottom-ut.top)*it.options.cursorHeight+"px",ut.other){var Ft=ht.appendChild(Ae("div","\xA0","CodeMirror-cursor CodeMirror-secondarycursor"));Ft.style.display="",Ft.style.left=ut.other.left+"px",Ft.style.top=ut.other.top+"px",Ft.style.height=(ut.other.bottom-ut.other.top)*.85+"px"}}function da(it,st){return it.top-st.top||it.left-st.left}function co(it,st,ht){var ut=it.display,dt=it.doc,Ft=document.createDocumentFragment(),Tt=bs(it.display),zt=Tt.left,Rt=Math.max(ut.sizerWidth,Ws(it)-ut.sizer.offsetLeft)-Tt.right,ee=dt.direction=="ltr";function ke(zi,lr,Ir,Hi){lr<0&&(lr=0),lr=Math.round(lr),Hi=Math.round(Hi),Ft.appendChild(Ae("div",null,"CodeMirror-selected","position: absolute; left: "+zi+`px;
top: `+lr+"px; width: "+(Ir==null?Rt-zi:Ir)+`px;
height: `+(Hi-lr)+"px"))}function re(zi,lr,Ir){var Hi=He(dt,zi),to=Hi.text.length,cs,na;function ws(Js,Ga){return BA(it,Ne(zi,Js),"div",Hi,Ga)}function qa(Js,Ga,pa){var Di=Rs(it,Hi,null,Js),yo=Ga=="ltr"==(pa=="after")?"left":"right",fs=pa=="after"?Di.begin:Di.end-(/\s/.test(Hi.text.charAt(Di.end-1))?2:1);return ws(fs,yo)[yo]}var ua=Mn(Hi,dt.direction);return rn(ua,lr||0,Ir==null?to:Ir,function(Js,Ga,pa,Di){var yo=pa=="ltr",fs=ws(Js,yo?"left":"right"),es=ws(Ga-1,yo?"right":"left"),ma=lr==null&&Js==0,Po=Ir==null&&Ga==to,Zr=Di==0,$a=!ua||Di==ua.length-1;if(es.top-fs.top<=3){var Ms=(ee?ma:Po)&&Zr,Nu=(ee?Po:ma)&&$a,Ll=Ms?zt:(yo?fs:es).left,La=Nu?Rt:(yo?es:fs).right;ke(Ll,fs.top,La-Ll,fs.bottom)}else{var tl,Zo,ia,bA;yo?(tl=ee&&ma&&Zr?zt:fs.left,Zo=ee?Rt:qa(Js,pa,"before"),ia=ee?zt:qa(Ga,pa,"after"),bA=ee&&Po&&$a?Rt:es.right):(tl=ee?qa(Js,pa,"before"):zt,Zo=!ee&&ma&&Zr?Rt:fs.right,ia=!ee&&Po&&$a?zt:es.left,bA=ee?qa(Ga,pa,"after"):Rt),ke(tl,fs.top,Zo-tl,fs.bottom),fs.bottom<es.top&&ke(zt,fs.bottom,null,es.top),ke(ia,es.top,bA-ia,es.bottom)}(!cs||da(fs,cs)<0)&&(cs=fs),da(es,cs)<0&&(cs=es),(!na||da(fs,na)<0)&&(na=fs),da(es,na)<0&&(na=es)}),{start:cs,end:na}}var _e=st.from(),Re=st.to();if(_e.line==Re.line)re(_e.line,_e.ch,Re.ch);else{var Rn=He(dt,_e.line),Yn=He(dt,Re.line),di=In(Rn)==In(Yn),Mi=re(_e.line,_e.ch,di?Rn.text.length+1:null).end,Ji=re(Re.line,di?0:null,Re.ch).start;di&&(Mi.top<Ji.top-2?(ke(Mi.right,Mi.top,null,Mi.bottom),ke(zt,Ji.top,Ji.left,Ji.bottom)):ke(Mi.right,Mi.top,Ji.left-Mi.right,Mi.bottom)),Mi.bottom<Ji.top&&ke(zt,Mi.bottom,null,Ji.top)}ht.appendChild(Ft)}function Uo(it){if(it.state.focused){var st=it.display;clearInterval(st.blinker);var ht=!0;st.cursorDiv.style.visibility="",it.options.cursorBlinkRate>0?st.blinker=setInterval(function(){it.hasFocus()||eh(it),st.cursorDiv.style.visibility=(ht=!ht)?"":"hidden"},it.options.cursorBlinkRate):it.options.cursorBlinkRate<0&&(st.cursorDiv.style.visibility="hidden")}}function ts(it){it.state.focused||(it.display.input.focus(),xo(it))}function ps(it){it.state.delayingBlurEvent=!0,setTimeout(function(){it.state.delayingBlurEvent&&(it.state.delayingBlurEvent=!1,eh(it))},100)}function xo(it,st){it.state.delayingBlurEvent&&(it.state.delayingBlurEvent=!1),it.options.readOnly!="nocursor"&&(it.state.focused||(Zi(it,"focus",it,st),it.state.focused=!0,Vn(it.display.wrapper,"CodeMirror-focused"),!it.curOp&&it.display.selForContextMenu!=it.doc.sel&&(it.display.input.reset(),ve&&setTimeout(function(){return it.display.input.reset(!0)},20)),it.display.input.receivedFocus()),Uo(it))}function eh(it,st){it.state.delayingBlurEvent||(it.state.focused&&(Zi(it,"blur",it,st),it.state.focused=!1,qt(it.display.wrapper,"CodeMirror-focused")),clearInterval(it.display.blinker),setTimeout(function(){it.state.focused||(it.display.shift=!1)},150))}function fr(it){for(var st=it.display,ht=st.lineDiv.offsetTop,ut=0;ut<st.view.length;ut++){var dt=st.view[ut],Ft=it.options.lineWrapping,Tt=void 0,zt=0;if(!dt.hidden){if(Fe&&we<8){var Rt=dt.node.offsetTop+dt.node.offsetHeight;Tt=Rt-ht,ht=Rt}else{var ee=dt.node.getBoundingClientRect();Tt=ee.bottom-ee.top,!Ft&&dt.text.firstChild&&(zt=dt.text.firstChild.getBoundingClientRect().right-ee.left-1)}var ke=dt.line.height-Tt;if((ke>.005||ke<-.005)&&(un(dt.line,Tt),nh(dt.line),dt.rest))for(var re=0;re<dt.rest.length;re++)nh(dt.rest[re]);if(zt>it.display.sizerWidth){var _e=Math.ceil(zt/_l(it.display));_e>it.display.maxLineLength&&(it.display.maxLineLength=_e,it.display.maxLine=dt.line,it.display.maxLineChanged=!0)}}}}function nh(it){if(it.widgets)for(var st=0;st<it.widgets.length;++st){var ht=it.widgets[st],ut=ht.node.parentNode;ut&&(ht.height=ut.offsetHeight)}}function lo(it,st,ht){var ut=ht&&ht.top!=null?Math.max(0,ht.top):it.scroller.scrollTop;ut=Math.floor(ut-Go(it));var dt=ht&&ht.bottom!=null?ht.bottom:ut+it.wrapper.clientHeight,Ft=de(st,ut),Tt=de(st,dt);if(ht&&ht.ensure){var zt=ht.ensure.from.line,Rt=ht.ensure.to.line;zt<Ft?(Ft=zt,Tt=de(st,mr(He(st,zt))+it.wrapper.clientHeight)):Math.min(Rt,st.lastLine())>=Tt&&(Ft=de(st,mr(He(st,Rt))-it.wrapper.clientHeight),Tt=Rt)}return{from:Ft,to:Math.max(Tt,Ft+1)}}function ig(it,st){if(!tr(it,"scrollCursorIntoView")){var ht=it.display,ut=ht.sizer.getBoundingClientRect(),dt=null;if(st.top+ut.top<0?dt=!0:st.bottom+ut.top>(window.innerHeight||document.documentElement.clientHeight)&&(dt=!1),dt!=null&&!xn){var Ft=Ae("div","\u200B",null,`position: absolute;
top: `+(st.top-ht.viewOffset-Go(it.display))+`px;
height: `+(st.bottom-st.top+ca(it)+ht.barHeight)+`px;
left: `+st.left+"px; width: "+Math.max(2,st.right-st.left)+"px;");it.display.lineSpace.appendChild(Ft),Ft.scrollIntoView(dt),it.display.lineSpace.removeChild(Ft)}}}function VA(it,st,ht,ut){ut==null&&(ut=0);var dt;!it.options.lineWrapping&&st==ht&&(st=st.ch?Ne(st.line,st.sticky=="before"?st.ch-1:st.ch,"after"):st,ht=st.sticky=="before"?Ne(st.line,st.ch+1,"before"):st);for(var Ft=0;Ft<5;Ft++){var Tt=!1,zt=Yo(it,st),Rt=!ht||ht==st?zt:Yo(it,ht);dt={left:Math.min(zt.left,Rt.left),top:Math.min(zt.top,Rt.top)-ut,right:Math.max(zt.left,Rt.left),bottom:Math.max(zt.bottom,Rt.bottom)+ut};var ee=sd(it,dt),ke=it.doc.scrollTop,re=it.doc.scrollLeft;if(ee.scrollTop!=null&&(ih(it,ee.scrollTop),Math.abs(it.doc.scrollTop-ke)>1&&(Tt=!0)),ee.scrollLeft!=null&&(WA(it,ee.scrollLeft),Math.abs(it.doc.scrollLeft-re)>1&&(Tt=!0)),!Tt)break}return dt}function Ec(it,st){var ht=sd(it,st);ht.scrollTop!=null&&ih(it,ht.scrollTop),ht.scrollLeft!=null&&WA(it,ht.scrollLeft)}function sd(it,st){var ht=it.display,ut=Ca(it.display);st.top<0&&(st.top=0);var dt=it.curOp&&it.curOp.scrollTop!=null?it.curOp.scrollTop:ht.scroller.scrollTop,Ft=ns(it),Tt={};st.bottom-st.top>Ft&&(st.bottom=st.top+Ft);var zt=it.doc.height+_s(ht),Rt=st.top<ut,ee=st.bottom>zt-ut;if(st.top<dt)Tt.scrollTop=Rt?0:st.top;else if(st.bottom>dt+Ft){var ke=Math.min(st.top,(ee?zt:st.bottom)-Ft);ke!=dt&&(Tt.scrollTop=ke)}var re=it.options.fixedGutter?0:ht.gutters.offsetWidth,_e=it.curOp&&it.curOp.scrollLeft!=null?it.curOp.scrollLeft:ht.scroller.scrollLeft-re,Re=Ws(it)-ht.gutters.offsetWidth,Rn=st.right-st.left>Re;return Rn&&(st.right=st.left+Re),st.left<10?Tt.scrollLeft=0:st.left<_e?Tt.scrollLeft=Math.max(0,st.left+re-(Rn?0:10)):st.right>Re+_e-3&&(Tt.scrollLeft=st.right+(Rn?0:10)-Re),Tt}function vf(it,st){st!=null&&(FA(it),it.curOp.scrollTop=(it.curOp.scrollTop==null?it.doc.scrollTop:it.curOp.scrollTop)+st)}function _A(it){FA(it);var st=it.getCursor();it.curOp.scrollToPos={from:st,to:st,margin:it.options.cursorScrollMargin}}function PA(it,st,ht){(st!=null||ht!=null)&&FA(it),st!=null&&(it.curOp.scrollLeft=st),ht!=null&&(it.curOp.scrollTop=ht)}function Bo(it,st){FA(it),it.curOp.scrollToPos=st}function FA(it){var st=it.curOp.scrollToPos;if(st){it.curOp.scrollToPos=null;var ht=ko(it,st.from),ut=ko(it,st.to);yf(it,ht,ut,st.margin)}}function yf(it,st,ht,ut){var dt=sd(it,{left:Math.min(st.left,ht.left),top:Math.min(st.top,ht.top)-ut,right:Math.max(st.right,ht.right),bottom:Math.max(st.bottom,ht.bottom)+ut});PA(it,dt.scrollLeft,dt.scrollTop)}function ih(it,st){Math.abs(it.doc.scrollTop-st)<2||(bt||nA(it,{top:st}),Mh(it,st,!0),bt&&nA(it),vu(it,100))}function Mh(it,st,ht){st=Math.max(0,Math.min(it.display.scroller.scrollHeight-it.display.scroller.clientHeight,st)),!(it.display.scroller.scrollTop==st&&!ht)&&(it.doc.scrollTop=st,it.display.scrollbars.setScrollTop(st),it.display.scroller.scrollTop!=st&&(it.display.scroller.scrollTop=st))}function WA(it,st,ht,ut){st=Math.max(0,Math.min(st,it.display.scroller.scrollWidth-it.display.scroller.clientWidth)),!((ht?st==it.doc.scrollLeft:Math.abs(it.doc.scrollLeft-st)<2)&&!ut)&&(it.doc.scrollLeft=st,xf(it),it.display.scroller.scrollLeft!=st&&(it.display.scroller.scrollLeft=st),it.display.scrollbars.setScrollLeft(st))}function Ql(it){var st=it.display,ht=st.gutters.offsetWidth,ut=Math.round(it.doc.height+_s(it.display));return{clientHeight:st.scroller.clientHeight,viewHeight:st.wrapper.clientHeight,scrollWidth:st.scroller.scrollWidth,clientWidth:st.scroller.clientWidth,viewWidth:st.wrapper.clientWidth,barLeft:it.options.fixedGutter?ht:0,docHeight:ut,scrollHeight:ut+ca(it)+st.barHeight,nativeBarWidth:st.nativeBarWidth,gutterWidth:ht}}var du=function(it,st,ht){this.cm=ht;var ut=this.vert=Ae("div",[Ae("div",null,null,"min-width: 1px")],"CodeMirror-vscrollbar"),dt=this.horiz=Ae("div",[Ae("div",null,null,"height: 100%; min-height: 1px")],"CodeMirror-hscrollbar");ut.tabIndex=dt.tabIndex=-1,it(ut),it(dt),dn(ut,"scroll",function(){ut.clientHeight&&st(ut.scrollTop,"vertical")}),dn(dt,"scroll",function(){dt.clientWidth&&st(dt.scrollLeft,"horizontal")}),this.checkedZeroWidth=!1,Fe&&we<8&&(this.horiz.style.minHeight=this.vert.style.minWidth="18px")};du.prototype.update=function(it){var st=it.scrollWidth>it.clientWidth+1,ht=it.scrollHeight>it.clientHeight+1,ut=it.nativeBarWidth;if(ht){this.vert.style.display="block",this.vert.style.bottom=st?ut+"px":"0";var dt=it.viewHeight-(st?ut:0);this.vert.firstChild.style.height=Math.max(0,it.scrollHeight-it.clientHeight+dt)+"px"}else this.vert.style.display="",this.vert.firstChild.style.height="0";if(st){this.horiz.style.display="block",this.horiz.style.right=ht?ut+"px":"0",this.horiz.style.left=it.barLeft+"px";var Ft=it.viewWidth-it.barLeft-(ht?ut:0);this.horiz.firstChild.style.width=Math.max(0,it.scrollWidth-it.clientWidth+Ft)+"px"}else this.horiz.style.display="",this.horiz.firstChild.style.width="0";return!this.checkedZeroWidth&&it.clientHeight>0&&(ut==0&&this.zeroWidthHack(),this.checkedZeroWidth=!0),{right:ht?ut:0,bottom:st?ut:0}},du.prototype.setScrollLeft=function(it){this.horiz.scrollLeft!=it&&(this.horiz.scrollLeft=it),this.disableHoriz&&this.enableZeroWidthBar(this.horiz,this.disableHoriz,"horiz")},du.prototype.setScrollTop=function(it){this.vert.scrollTop!=it&&(this.vert.scrollTop=it),this.disableVert&&this.enableZeroWidthBar(this.vert,this.disableVert,"vert")},du.prototype.zeroWidthHack=function(){var it=ct&&!Se?"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},du.prototype.enableZeroWidthBar=function(it,st,ht){it.style.pointerEvents="auto";function ut(){var dt=it.getBoundingClientRect(),Ft=ht=="vert"?document.elementFromPoint(dt.right-1,(dt.top+dt.bottom)/2):document.elementFromPoint((dt.right+dt.left)/2,dt.bottom-1);Ft!=it?it.style.pointerEvents="none":st.set(1e3,ut)}st.set(1e3,ut)},du.prototype.clear=function(){var it=this.horiz.parentNode;it.removeChild(this.horiz),it.removeChild(this.vert)};var tA=function(){};tA.prototype.update=function(){return{bottom:0,right:0}},tA.prototype.setScrollLeft=function(){},tA.prototype.setScrollTop=function(){},tA.prototype.clear=function(){};function eA(it,st){st||(st=Ql(it));var ht=it.display.barWidth,ut=it.display.barHeight;wf(it,st);for(var dt=0;dt<4&&ht!=it.display.barWidth||ut!=it.display.barHeight;dt++)ht!=it.display.barWidth&&it.options.lineWrapping&&fr(it),wf(it,Ql(it)),ht=it.display.barWidth,ut=it.display.barHeight}function wf(it,st){var ht=it.display,ut=ht.scrollbars.update(st);ht.sizer.style.paddingRight=(ht.barWidth=ut.right)+"px",ht.sizer.style.paddingBottom=(ht.barHeight=ut.bottom)+"px",ht.heightForcer.style.borderBottom=ut.bottom+"px solid transparent",ut.right&&ut.bottom?(ht.scrollbarFiller.style.display="block",ht.scrollbarFiller.style.height=ut.bottom+"px",ht.scrollbarFiller.style.width=ut.right+"px"):ht.scrollbarFiller.style.display="",ut.bottom&&it.options.coverGutterNextToScrollbar&&it.options.fixedGutter?(ht.gutterFiller.style.display="block",ht.gutterFiller.style.height=ut.bottom+"px",ht.gutterFiller.style.width=st.gutterWidth+"px"):ht.gutterFiller.style.display=""}var ad={native:du,null:tA};function ld(it){it.display.scrollbars&&(it.display.scrollbars.clear(),it.display.scrollbars.addClass&&qt(it.display.wrapper,it.display.scrollbars.addClass)),it.display.scrollbars=new ad[it.options.scrollbarStyle](function(st){it.display.wrapper.insertBefore(st,it.display.scrollbarFiller),dn(st,"mousedown",function(){it.state.focused&&setTimeout(function(){return it.display.input.focus()},0)}),st.setAttribute("cm-not-content","true")},function(st,ht){ht=="horizontal"?WA(it,st):ih(it,st)},it),it.display.scrollbars.addClass&&Vn(it.display.wrapper,it.display.scrollbars.addClass)}var rg=0;function gu(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:++rg},Vs(it.curOp)}function pu(it){var st=it.curOp;st&&zA(st,function(ht){for(var ut=0;ut<ht.ops.length;ut++)ht.ops[ut].cm.curOp=null;Jg(ht)})}function Jg(it){for(var st=it.ops,ht=0;ht<st.length;ht++)qg(st[ht]);for(var ut=0;ut<st.length;ut++)$g(st[ut]);for(var dt=0;dt<st.length;dt++)og(st[dt]);for(var Ft=0;Ft<st.length;Ft++)us(st[Ft]);for(var Tt=0;Tt<st.length;Tt++)mu(st[Tt])}function qg(it){var st=it.cm,ht=st.display;sg(st),it.updateMaxLine&&ir(st),it.mustUpdate=it.viewChanged||it.forceUpdate||it.scrollTop!=null||it.scrollToPos&&(it.scrollToPos.from.line<ht.viewFrom||it.scrollToPos.to.line>=ht.viewTo)||ht.maxLineChanged&&st.options.lineWrapping,it.update=it.mustUpdate&&new rh(st,it.mustUpdate&&{top:it.scrollTop,ensure:it.scrollToPos},it.forceUpdate)}function $g(it){it.updatedDisplay=it.mustUpdate&&Sf(it.cm,it.update)}function og(it){var st=it.cm,ht=st.display;it.updatedDisplay&&fr(st),it.barMeasure=Ql(st),ht.maxLineChanged&&!st.options.lineWrapping&&(it.adjustWidthTo=Il(st,ht.maxLine,ht.maxLine.text.length).left+3,st.display.sizerWidth=it.adjustWidthTo,it.barMeasure.scrollWidth=Math.max(ht.scroller.clientWidth,ht.sizer.offsetLeft+it.adjustWidthTo+ca(st)+st.display.barWidth),it.maxScrollLeft=Math.max(0,ht.sizer.offsetLeft+it.adjustWidthTo-Ws(st))),(it.updatedDisplay||it.selectionChanged)&&(it.preparedSelection=ht.input.prepareSelection())}function us(it){var st=it.cm;it.adjustWidthTo!=null&&(st.display.sizer.style.minWidth=it.adjustWidthTo+"px",it.maxScrollLeft<st.doc.scrollLeft&&WA(st,Math.min(st.display.scroller.scrollLeft,it.maxScrollLeft),!0),st.display.maxLineChanged=!1);var ht=it.focus&&it.focus==pn();it.preparedSelection&&st.display.input.showSelection(it.preparedSelection,ht),(it.updatedDisplay||it.startHeight!=st.doc.height)&&eA(st,it.barMeasure),it.updatedDisplay&&wu(st,it.barMeasure),it.selectionChanged&&Uo(st),st.state.focused&&it.updateInput&&st.display.input.reset(it.typing),ht&&ts(it.cm)}function mu(it){var st=it.cm,ht=st.display,ut=st.doc;if(it.updatedDisplay&&Ko(st,it.update),ht.wheelStartX!=null&&(it.scrollTop!=null||it.scrollLeft!=null||it.scrollToPos)&&(ht.wheelStartX=ht.wheelStartY=null),it.scrollTop!=null&&Mh(st,it.scrollTop,it.forceScroll),it.scrollLeft!=null&&WA(st,it.scrollLeft,!0,!0),it.scrollToPos){var dt=VA(st,Zn(ut,it.scrollToPos.from),Zn(ut,it.scrollToPos.to),it.scrollToPos.margin);ig(st,dt)}var Ft=it.maybeHiddenMarkers,Tt=it.maybeUnhiddenMarkers;if(Ft)for(var zt=0;zt<Ft.length;++zt)Ft[zt].lines.length||Zi(Ft[zt],"hide");if(Tt)for(var Rt=0;Rt<Tt.length;++Rt)Tt[Rt].lines.length&&Zi(Tt[Rt],"unhide");ht.wrapper.offsetHeight&&(ut.scrollTop=st.display.scroller.scrollTop),it.changeObjs&&Zi(st,"changes",st,it.changeObjs),it.update&&it.update.finish()}function Io(it,st){if(it.curOp)return st();gu(it);try{return st()}finally{pu(it)}}function Xs(it,st){return function(){if(it.curOp)return st.apply(it,arguments);gu(it);try{return st.apply(it,arguments)}finally{pu(it)}}}function oa(it){return function(){if(this.curOp)return it.apply(this,arguments);gu(this);try{return it.apply(this,arguments)}finally{pu(this)}}}function sa(it){return function(){var st=this.cm;if(!st||st.curOp)return it.apply(this,arguments);gu(st);try{return it.apply(this,arguments)}finally{pu(st)}}}function vu(it,st){it.doc.highlightFrontier<it.display.viewTo&&it.state.highlight.set(st,Li(Gs,it))}function Gs(it){var st=it.doc;if(!(st.highlightFrontier>=it.display.viewTo)){var ht=+new Date+it.options.workTime,ut=Yr(it,st.highlightFrontier),dt=[];st.iter(ut.line,Math.min(st.first+st.size,it.display.viewTo+500),function(Ft){if(ut.line>=it.display.viewFrom){var Tt=Ft.styles,zt=Ft.text.length>it.options.maxHighlightLength?wi(st.mode,ut.state):null,Rt=hr(it,Ft,ut,!0);zt&&(ut.state=zt),Ft.styles=Rt.styles;var ee=Ft.styleClasses,ke=Rt.classes;ke?Ft.styleClasses=ke:ee&&(Ft.styleClasses=null);for(var re=!Tt||Tt.length!=Ft.styles.length||ee!=ke&&(!ee||!ke||ee.bgClass!=ke.bgClass||ee.textClass!=ke.textClass),_e=0;!re&&_e<Tt.length;++_e)re=Tt[_e]!=Ft.styles[_e];re&&dt.push(ut.line),Ft.stateAfter=ut.save(),ut.nextLine()}else Ft.text.length<=it.options.maxHighlightLength&&xe(it,Ft.text,ut),Ft.stateAfter=ut.line%5==0?ut.save():null,ut.nextLine();if(+new Date>ht)return vu(it,it.options.workDelay),!0}),st.highlightFrontier=ut.line,st.modeFrontier=Math.max(st.modeFrontier,ut.line),dt.length&&Io(it,function(){for(var Ft=0;Ft<dt.length;Ft++)_r(it,dt[Ft],"text")})}}var rh=function(it,st,ht){var ut=it.display;this.viewport=st,this.visible=lo(ut,it.doc,st),this.editorIsHidden=!ut.wrapper.offsetWidth,this.wrapperHeight=ut.wrapper.clientHeight,this.wrapperWidth=ut.wrapper.clientWidth,this.oldDisplayWidth=Ws(it),this.force=ht,this.dims=jA(it),this.events=[]};rh.prototype.signal=function(it,st){ar(it,st)&&this.events.push(arguments)},rh.prototype.finish=function(){for(var it=0;it<this.events.length;it++)Zi.apply(null,this.events[it])};function sg(it){var st=it.display;!st.scrollbarsClipped&&st.scroller.offsetWidth&&(st.nativeBarWidth=st.scroller.offsetWidth-st.scroller.clientWidth,st.heightForcer.style.height=ca(it)+"px",st.sizer.style.marginBottom=-st.nativeBarWidth+"px",st.sizer.style.borderRightWidth=ca(it)+"px",st.scrollbarsClipped=!0)}function ag(it){if(it.hasFocus())return null;var st=pn();if(!st||!on(it.display.lineDiv,st))return null;var ht={activeElt:st};if(window.getSelection){var ut=window.getSelection();ut.anchorNode&&ut.extend&&on(it.display.lineDiv,ut.anchorNode)&&(ht.anchorNode=ut.anchorNode,ht.anchorOffset=ut.anchorOffset,ht.focusNode=ut.focusNode,ht.focusOffset=ut.focusOffset)}return ht}function Xa(it){if(!(!it||!it.activeElt||it.activeElt==pn())&&(it.activeElt.focus(),!/^(INPUT|TEXTAREA)$/.test(it.activeElt.nodeName)&&it.anchorNode&&on(document.body,it.anchorNode)&&on(document.body,it.focusNode))){var st=window.getSelection(),ht=document.createRange();ht.setEnd(it.anchorNode,it.anchorOffset),ht.collapse(!1),st.removeAllRanges(),st.addRange(ht),st.extend(it.focusNode,it.focusOffset)}}function Sf(it,st){var ht=it.display,ut=it.doc;if(st.editorIsHidden)return Es(it),!1;if(!st.force&&st.visible.from>=ht.viewFrom&&st.visible.to<=ht.viewTo&&(ht.updateLineNumbers==null||ht.updateLineNumbers>=ht.viewTo)&&ht.renderedView==ht.view&&ul(it)==0)return!1;zs(it)&&(Es(it),st.dims=jA(it));var dt=ut.first+ut.size,Ft=Math.max(st.visible.from-it.options.viewportMargin,ut.first),Tt=Math.min(dt,st.visible.to+it.options.viewportMargin);ht.viewFrom<Ft&&Ft-ht.viewFrom<20&&(Ft=Math.max(ut.first,ht.viewFrom)),ht.viewTo>Tt&&ht.viewTo-Tt<20&&(Tt=Math.min(dt,ht.viewTo)),Vt&&(Ft=Tn(it.doc,Ft),Tt=fi(it.doc,Tt));var zt=Ft!=ht.viewFrom||Tt!=ht.viewTo||ht.lastWrapHeight!=st.wrapperHeight||ht.lastWrapWidth!=st.wrapperWidth;zo(it,Ft,Tt),ht.viewOffset=mr(He(it.doc,ht.viewFrom)),it.display.mover.style.top=ht.viewOffset+"px";var Rt=ul(it);if(!zt&&Rt==0&&!st.force&&ht.renderedView==ht.view&&(ht.updateLineNumbers==null||ht.updateLineNumbers>=ht.viewTo))return!1;var ee=ag(it);return Rt>4&&(ht.lineDiv.style.display="none"),Ad(it,ht.updateLineNumbers,st.dims),Rt>4&&(ht.lineDiv.style.display=""),ht.renderedView=ht.view,Xa(ee),he(ht.cursorDiv),he(ht.selectionDiv),ht.gutters.style.height=ht.sizer.style.minHeight=0,zt&&(ht.lastWrapHeight=st.wrapperHeight,ht.lastWrapWidth=st.wrapperWidth,vu(it,400)),ht.updateLineNumbers=null,!0}function Ko(it,st){for(var ht=st.viewport,ut=!0;;ut=!1){if(!ut||!it.options.lineWrapping||st.oldDisplayWidth==Ws(it)){if(ht&&ht.top!=null&&(ht={top:Math.min(it.doc.height+_s(it.display)-ns(it),ht.top)}),st.visible=lo(it.display,it.doc,ht),st.visible.from>=it.display.viewFrom&&st.visible.to<=it.display.viewTo)break}else ut&&(st.visible=lo(it.display,it.doc,ht));if(!Sf(it,st))break;fr(it);var dt=Ql(it);Is(it),eA(it,dt),wu(it,dt),st.force=!1}st.signal(it,"update",it),(it.display.viewFrom!=it.display.reportedViewFrom||it.display.viewTo!=it.display.reportedViewTo)&&(st.signal(it,"viewportChange",it,it.display.viewFrom,it.display.viewTo),it.display.reportedViewFrom=it.display.viewFrom,it.display.reportedViewTo=it.display.viewTo)}function nA(it,st){var ht=new rh(it,st);if(Sf(it,ht)){fr(it),Ko(it,ht);var ut=Ql(it);Is(it),eA(it,ut),wu(it,ut),ht.finish()}}function Ad(it,st,ht){var ut=it.display,dt=it.options.lineNumbers,Ft=ut.lineDiv,Tt=Ft.firstChild;function zt(Rn){var Yn=Rn.nextSibling;return ve&&ct&&it.display.currentWheelTarget==Rn?Rn.style.display="none":Rn.parentNode.removeChild(Rn),Yn}for(var Rt=ut.view,ee=ut.viewFrom,ke=0;ke<Rt.length;ke++){var re=Rt[ke];if(!re.hidden)if(!re.node||re.node.parentNode!=Ft){var _e=Dr(it,re,ee,ht);Ft.insertBefore(_e,Tt)}else{for(;Tt!=re.node;)Tt=zt(Tt);var Re=dt&&st!=null&&st<=ee&&re.lineNumber;re.changes&&(En(re.changes,"gutter")>-1&&(Re=!1),KA(it,re,ee,ht)),Re&&(he(re.lineNumber),re.lineNumber.appendChild(document.createTextNode(wn(it.options,ee)))),Tt=re.node.nextSibling}ee+=re.size}for(;Tt;)Tt=zt(Tt)}function yu(it){var st=it.gutters.offsetWidth;it.sizer.style.marginLeft=st+"px"}function wu(it,st){it.display.sizer.style.minHeight=st.docHeight+"px",it.display.heightForcer.style.top=st.docHeight+"px",it.display.gutters.style.height=st.docHeight+it.display.barHeight+ca(it)+"px"}function xf(it){var st=it.display,ht=st.view;if(!(!st.alignWidgets&&(!st.gutters.firstChild||!it.options.fixedGutter))){for(var ut=cu(st)-st.scroller.scrollLeft+it.doc.scrollLeft,dt=st.gutters.offsetWidth,Ft=ut+"px",Tt=0;Tt<ht.length;Tt++)if(!ht[Tt].hidden){it.options.fixedGutter&&(ht[Tt].gutter&&(ht[Tt].gutter.style.left=Ft),ht[Tt].gutterBackground&&(ht[Tt].gutterBackground.style.left=Ft));var zt=ht[Tt].alignable;if(zt)for(var Rt=0;Rt<zt.length;Rt++)zt[Rt].style.left=Ft}it.options.fixedGutter&&(st.gutters.style.left=ut+dt+"px")}}function zs(it){if(!it.options.lineNumbers)return!1;var st=it.doc,ht=wn(it.options,st.first+st.size-1),ut=it.display;if(ht.length!=ut.lineNumChars){var dt=ut.measure.appendChild(Ae("div",[Ae("div",ht)],"CodeMirror-linenumber CodeMirror-gutter-elt")),Ft=dt.firstChild.offsetWidth,Tt=dt.offsetWidth-Ft;return ut.lineGutter.style.width="",ut.lineNumInnerWidth=Math.max(Ft,ut.lineGutter.offsetWidth-Tt)+1,ut.lineNumWidth=ut.lineNumInnerWidth+Tt,ut.lineNumChars=ut.lineNumInnerWidth?ht.length:-1,ut.lineGutter.style.width=ut.lineNumWidth+"px",yu(it.display),!0}return!1}function aa(it,st){for(var ht=[],ut=!1,dt=0;dt<it.length;dt++){var Ft=it[dt],Tt=null;if(typeof Ft!="string"&&(Tt=Ft.style,Ft=Ft.className),Ft=="CodeMirror-linenumbers")if(st)ut=!0;else continue;ht.push({className:Ft,style:Tt})}return st&&!ut&&ht.push({className:"CodeMirror-linenumbers",style:null}),ht}function oh(it){var st=it.gutters,ht=it.gutterSpecs;he(st),it.lineGutter=null;for(var ut=0;ut<ht.length;++ut){var dt=ht[ut],Ft=dt.className,Tt=dt.style,zt=st.appendChild(Ae("div",null,"CodeMirror-gutter "+Ft));Tt&&(zt.style.cssText=Tt),Ft=="CodeMirror-linenumbers"&&(it.lineGutter=zt,zt.style.width=(it.lineNumWidth||1)+"px")}st.style.display=ht.length?"":"none",yu(it)}function Bl(it){oh(it.display),os(it),xf(it)}function Su(it,st,ht,ut){var dt=this;this.input=ht,dt.scrollbarFiller=Ae("div",null,"CodeMirror-scrollbar-filler"),dt.scrollbarFiller.setAttribute("cm-not-content","true"),dt.gutterFiller=Ae("div",null,"CodeMirror-gutter-filler"),dt.gutterFiller.setAttribute("cm-not-content","true"),dt.lineDiv=Ve("div",null,"CodeMirror-code"),dt.selectionDiv=Ae("div",null,null,"position: relative; z-index: 1"),dt.cursorDiv=Ae("div",null,"CodeMirror-cursors"),dt.measure=Ae("div",null,"CodeMirror-measure"),dt.lineMeasure=Ae("div",null,"CodeMirror-measure"),dt.lineSpace=Ve("div",[dt.measure,dt.lineMeasure,dt.selectionDiv,dt.cursorDiv,dt.lineDiv],null,"position: relative; outline: none");var Ft=Ve("div",[dt.lineSpace],"CodeMirror-lines");dt.mover=Ae("div",[Ft],null,"position: relative"),dt.sizer=Ae("div",[dt.mover],"CodeMirror-sizer"),dt.sizerWidth=null,dt.heightForcer=Ae("div",null,null,"position: absolute; height: "+Si+"px; width: 1px;"),dt.gutters=Ae("div",null,"CodeMirror-gutters"),dt.lineGutter=null,dt.scroller=Ae("div",[dt.sizer,dt.heightForcer,dt.gutters],"CodeMirror-scroll"),dt.scroller.setAttribute("tabIndex","-1"),dt.wrapper=Ae("div",[dt.scrollbarFiller,dt.gutterFiller,dt.scroller],"CodeMirror"),Fe&&we<8&&(dt.gutters.style.zIndex=-1,dt.scroller.style.paddingRight=0),!ve&&!(bt&&nt)&&(dt.scroller.draggable=!0),it&&(it.appendChild?it.appendChild(dt.wrapper):it(dt.wrapper)),dt.viewFrom=dt.viewTo=st.first,dt.reportedViewFrom=dt.reportedViewTo=st.first,dt.view=[],dt.renderedView=null,dt.externalMeasured=null,dt.viewOffset=0,dt.lastWrapHeight=dt.lastWrapWidth=0,dt.updateLineNumbers=null,dt.nativeBarWidth=dt.barHeight=dt.barWidth=0,dt.scrollbarsClipped=!1,dt.lineNumWidth=dt.lineNumInnerWidth=dt.lineNumChars=null,dt.alignWidgets=!1,dt.cachedCharWidth=dt.cachedTextHeight=dt.cachedPaddingH=null,dt.maxLine=null,dt.maxLineLength=0,dt.maxLineChanged=!1,dt.wheelDX=dt.wheelDY=dt.wheelStartX=dt.wheelStartY=null,dt.shift=!1,dt.selForContextMenu=null,dt.activeTouch=null,dt.gutterSpecs=aa(ut.gutters,ut.lineNumbers),oh(dt),ht.init(dt)}var hl=0,Ns=null;Fe?Ns=-.53:bt?Ns=15:ge?Ns=-.7:hn&&(Ns=-1/3);function iA(it){var st=it.wheelDeltaX,ht=it.wheelDeltaY;return st==null&&it.detail&&it.axis==it.HORIZONTAL_AXIS&&(st=it.detail),ht==null&&it.detail&&it.axis==it.VERTICAL_AXIS?ht=it.detail:ht==null&&(ht=it.wheelDelta),{x:st,y:ht}}function cl(it){var st=iA(it);return st.x*=Ns,st.y*=Ns,st}function la(it,st){var ht=iA(st),ut=ht.x,dt=ht.y,Ft=it.display,Tt=Ft.scroller,zt=Tt.scrollWidth>Tt.clientWidth,Rt=Tt.scrollHeight>Tt.clientHeight;if(ut&&zt||dt&&Rt){if(dt&&ct&&ve){t:for(var ee=st.target,ke=Ft.view;ee!=Tt;ee=ee.parentNode)for(var re=0;re<ke.length;re++)if(ke[re].node==ee){it.display.currentWheelTarget=ee;break t}}if(ut&&!bt&&!se&&Ns!=null){dt&&Rt&&ih(it,Math.max(0,Tt.scrollTop+dt*Ns)),WA(it,Math.max(0,Tt.scrollLeft+ut*Ns)),(!dt||dt&&Rt)&&wr(st),Ft.wheelStartX=null;return}if(dt&&Ns!=null){var _e=dt*Ns,Re=it.doc.scrollTop,Rn=Re+Ft.wrapper.clientHeight;_e<0?Re=Math.max(0,Re+_e-50):Rn=Math.min(it.doc.height,Rn+_e+50),nA(it,{top:Re,bottom:Rn})}hl<20&&(Ft.wheelStartX==null?(Ft.wheelStartX=Tt.scrollLeft,Ft.wheelStartY=Tt.scrollTop,Ft.wheelDX=ut,Ft.wheelDY=dt,setTimeout(function(){if(Ft.wheelStartX!=null){var Yn=Tt.scrollLeft-Ft.wheelStartX,di=Tt.scrollTop-Ft.wheelStartY,Mi=di&&Ft.wheelDY&&di/Ft.wheelDY||Yn&&Ft.wheelDX&&Yn/Ft.wheelDX;Ft.wheelStartX=Ft.wheelStartY=null,Mi&&(Ns=(Ns*hl+Mi)/(hl+1),++hl)}},200)):(Ft.wheelDX+=ut,Ft.wheelDY+=dt))}}var Ul=function(it,st){this.ranges=it,this.primIndex=st};Ul.prototype.primary=function(){return this.ranges[this.primIndex]},Ul.prototype.equals=function(it){if(it==this)return!0;if(it.primIndex!=this.primIndex||it.ranges.length!=this.ranges.length)return!1;for(var st=0;st<this.ranges.length;st++){var ht=this.ranges[st],ut=it.ranges[st];if(!Ln(ht.anchor,ut.anchor)||!Ln(ht.head,ut.head))return!1}return!0},Ul.prototype.deepCopy=function(){for(var it=[],st=0;st<this.ranges.length;st++)it[st]=new jo(bn(this.ranges[st].anchor),bn(this.ranges[st].head));return new Ul(it,this.primIndex)},Ul.prototype.somethingSelected=function(){for(var it=0;it<this.ranges.length;it++)if(!this.ranges[it].empty())return!0;return!1},Ul.prototype.contains=function(it,st){st||(st=it);for(var ht=0;ht<this.ranges.length;ht++){var ut=this.ranges[ht];if(Bn(st,ut.from())>=0&&Bn(it,ut.to())<=0)return ht}return-1};var jo=function(it,st){this.anchor=it,this.head=st};jo.prototype.from=function(){return Qn(this.anchor,this.head)},jo.prototype.to=function(){return ci(this.anchor,this.head)},jo.prototype.empty=function(){return this.head.line==this.anchor.line&&this.head.ch==this.anchor.ch};function Za(it,st,ht){var ut=it&&it.options.selectionsMayTouch,dt=st[ht];st.sort(function(_e,Re){return Bn(_e.from(),Re.from())}),ht=En(st,dt);for(var Ft=1;Ft<st.length;Ft++){var Tt=st[Ft],zt=st[Ft-1],Rt=Bn(zt.to(),Tt.from());if(ut&&!Tt.empty()?Rt>0:Rt>=0){var ee=Qn(zt.from(),Tt.from()),ke=ci(zt.to(),Tt.to()),re=zt.empty()?Tt.from()==Tt.head:zt.from()==zt.head;Ft<=ht&&--ht,st.splice(--Ft,2,new jo(re?ke:ee,re?ee:ke))}}return new Ul(st,ht)}function YA(it,st){return new Ul([new jo(it,st||it)],0)}function xu(it){return it.text?Ne(it.from.line+it.text.length-1,Ge(it.text).length+(it.text.length==1?it.from.ch:0)):it.to}function Bu(it,st){if(Bn(it,st.from)<0)return it;if(Bn(it,st.to)<=0)return xu(st);var ht=it.line+st.text.length-(st.to.line-st.from.line)-1,ut=it.ch;return it.line==st.to.line&&(ut+=xu(st).ch-st.to.ch),Ne(ht,ut)}function Mc(it,st){for(var ht=[],ut=0;ut<it.sel.ranges.length;ut++){var dt=it.sel.ranges[ut];ht.push(new jo(Bu(dt.anchor,st),Bu(dt.head,st)))}return Za(it.cm,ht,it.sel.primIndex)}function kh(it,st,ht){return it.line==st.line?Ne(ht.line,it.ch-st.ch+ht.ch):Ne(ht.line+(it.line-st.line),it.ch)}function kc(it,st,ht){for(var ut=[],dt=Ne(it.first,0),Ft=dt,Tt=0;Tt<st.length;Tt++){var zt=st[Tt],Rt=kh(zt.from,dt,Ft),ee=kh(xu(zt),dt,Ft);if(dt=zt.to,Ft=ee,ht=="around"){var ke=it.sel.ranges[Tt],re=Bn(ke.head,ke.anchor)<0;ut[Tt]=new jo(re?ee:Rt,re?Rt:ee)}else ut[Tt]=new jo(Rt,Rt)}return new Ul(ut,it.sel.primIndex)}function $r(it){it.doc.mode=Ie(it.options,it.doc.modeOption),bc(it)}function bc(it){it.doc.iter(function(st){st.stateAfter&&(st.stateAfter=null),st.styles&&(st.styles=null)}),it.doc.modeFrontier=it.doc.highlightFrontier=it.doc.first,vu(it,100),it.state.modeGen++,it.curOp&&os(it)}function ud(it,st){return st.from.ch==0&&st.to.ch==0&&Ge(st.text)==""&&(!it.cm||it.cm.options.wholeLineUpdateBefore)}function Bf(it,st,ht,ut){function dt(Ji){return ht?ht[Ji]:null}function Ft(Ji,zi,lr){Vr(Ji,zi,lr,ut),Xi(Ji,"change",Ji,st)}function Tt(Ji,zi){for(var lr=[],Ir=Ji;Ir<zi;++Ir)lr.push(new jr(ee[Ir],dt(Ir),ut));return lr}var zt=st.from,Rt=st.to,ee=st.text,ke=He(it,zt.line),re=He(it,Rt.line),_e=Ge(ee),Re=dt(ee.length-1),Rn=Rt.line-zt.line;if(st.full)it.insert(0,Tt(0,ee.length)),it.remove(ee.length,it.size-ee.length);else if(ud(it,st)){var Yn=Tt(0,ee.length-1);Ft(re,re.text,Re),Rn&&it.remove(zt.line,Rn),Yn.length&&it.insert(zt.line,Yn)}else if(ke==re)if(ee.length==1)Ft(ke,ke.text.slice(0,zt.ch)+_e+ke.text.slice(Rt.ch),Re);else{var di=Tt(1,ee.length-1);di.push(new jr(_e+ke.text.slice(Rt.ch),Re,ut)),Ft(ke,ke.text.slice(0,zt.ch)+ee[0],dt(0)),it.insert(zt.line+1,di)}else if(ee.length==1)Ft(ke,ke.text.slice(0,zt.ch)+ee[0]+re.text.slice(Rt.ch),dt(0)),it.remove(zt.line+1,Rn);else{Ft(ke,ke.text.slice(0,zt.ch)+ee[0],dt(0)),Ft(re,_e+re.text.slice(Rt.ch),Re);var Mi=Tt(1,ee.length-1);Rn>1&&it.remove(zt.line+1,Rn-1),it.insert(zt.line+1,Mi)}Xi(it,"change",it,st)}function rA(it,st,ht){function ut(dt,Ft,Tt){if(dt.linked)for(var zt=0;zt<dt.linked.length;++zt){var Rt=dt.linked[zt];if(Rt.doc!=Ft){var ee=Tt&&Rt.sharedHist;ht&&!ee||(st(Rt.doc,ee),ut(Rt.doc,dt,ee))}}}ut(it,null,!0)}function Zs(it,st){if(st.cm)throw new Error("This document is already in use.");it.doc=st,st.cm=it,yr(it),$r(it),Tc(it),it.options.lineWrapping||ir(it),it.options.mode=st.modeOption,os(it)}function Tc(it){(it.doc.direction=="rtl"?Vn:qt)(it.display.lineDiv,"CodeMirror-rtl")}function tp(it){Io(it,function(){Tc(it),os(it)})}function bh(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 Cf(it,st){var ht={from:bn(st.from),to:xu(st),text:li(it,st.from,st.to)};return Cu(it,ht,st.from.line,st.to.line+1),rA(it,function(ut){return Cu(ut,ht,st.from.line,st.to.line+1)},!0),ht}function Th(it){for(;it.length;){var st=Ge(it);if(st.ranges)it.pop();else break}}function Ih(it,st){if(st)return Th(it.done),Ge(it.done);if(it.done.length&&!Ge(it.done).ranges)return Ge(it.done);if(it.done.length>1&&!it.done[it.done.length-2].ranges)return it.done.pop(),Ge(it.done)}function Ic(it,st,ht,ut){var dt=it.history;dt.undone.length=0;var Ft=+new Date,Tt,zt;if((dt.lastOp==ut||dt.lastOrigin==st.origin&&st.origin&&(st.origin.charAt(0)=="+"&&dt.lastModTime>Ft-(it.cm?it.cm.options.historyEventDelay:500)||st.origin.charAt(0)=="*"))&&(Tt=Ih(dt,dt.lastOp==ut)))zt=Ge(Tt.changes),Bn(st.from,st.to)==0&&Bn(st.from,zt.to)==0?zt.to=xu(st):Tt.changes.push(Cf(it,st));else{var Rt=Ge(dt.done);for((!Rt||!Rt.ranges)&&Nh(it.sel,dt.done),Tt={changes:[Cf(it,st)],generation:dt.generation},dt.done.push(Tt);dt.done.length>dt.undoDepth;)dt.done.shift(),dt.done[0].ranges||dt.done.shift()}dt.done.push(ht),dt.generation=++dt.maxGeneration,dt.lastModTime=dt.lastSelTime=Ft,dt.lastOp=dt.lastSelOp=ut,dt.lastOrigin=dt.lastSelOrigin=st.origin,zt||Zi(it,"historyAdded")}function hd(it,st,ht,ut){var dt=st.charAt(0);return dt=="*"||dt=="+"&&ht.ranges.length==ut.ranges.length&&ht.somethingSelected()==ut.somethingSelected()&&new Date-it.history.lastSelTime<=(it.cm?it.cm.options.historyEventDelay:500)}function Nc(it,st,ht,ut){var dt=it.history,Ft=ut&&ut.origin;ht==dt.lastSelOp||Ft&&dt.lastSelOrigin==Ft&&(dt.lastModTime==dt.lastSelTime&&dt.lastOrigin==Ft||hd(it,Ft,Ge(dt.done),st))?dt.done[dt.done.length-1]=st:Nh(st,dt.done),dt.lastSelTime=+new Date,dt.lastSelOrigin=Ft,dt.lastSelOp=ht,ut&&ut.clearRedo!==!1&&Th(dt.undone)}function Nh(it,st){var ht=Ge(st);ht&&ht.ranges&&ht.equals(it)||st.push(it)}function Cu(it,st,ht,ut){var dt=st["spans_"+it.id],Ft=0;it.iter(Math.max(it.first,ht),Math.min(it.first+it.size,ut),function(Tt){Tt.markedSpans&&((dt||(dt=st["spans_"+it.id]={}))[Ft]=Tt.markedSpans),++Ft})}function Ha(it){if(!it)return null;for(var st,ht=0;ht<it.length;++ht)it[ht].marker.explicitlyCleared?st||(st=it.slice(0,ht)):st&&st.push(it[ht]);return st?st.length?st:null:it}function oA(it,st){var ht=st["spans_"+it.id];if(!ht)return null;for(var ut=[],dt=0;dt<st.text.length;++dt)ut.push(Ha(ht[dt]));return ut}function dr(it,st){var ht=oA(it,st),ut=Wn(it,st);if(!ht)return ut;if(!ut)return ht;for(var dt=0;dt<ht.length;++dt){var Ft=ht[dt],Tt=ut[dt];if(Ft&&Tt)t:for(var zt=0;zt<Tt.length;++zt){for(var Rt=Tt[zt],ee=0;ee<Ft.length;++ee)if(Ft[ee].marker==Rt.marker)continue t;Ft.push(Rt)}else Tt&&(ht[dt]=Tt)}return ht}function XA(it,st,ht){for(var ut=[],dt=0;dt<it.length;++dt){var Ft=it[dt];if(Ft.ranges){ut.push(ht?Ul.prototype.deepCopy.call(Ft):Ft);continue}var Tt=Ft.changes,zt=[];ut.push({changes:zt});for(var Rt=0;Rt<Tt.length;++Rt){var ee=Tt[Rt],ke=void 0;if(zt.push({from:ee.from,to:ee.to,text:ee.text}),st)for(var re in ee)(ke=re.match(/^spans_(\d+)$/))&&En(st,Number(ke[1]))>-1&&(Ge(zt)[re]=ee[re],delete ee[re])}}return ut}function Pf(it,st,ht,ut){if(ut){var dt=it.anchor;if(ht){var Ft=Bn(st,dt)<0;Ft!=Bn(ht,dt)<0?(dt=st,st=ht):Ft!=Bn(st,ht)<0&&(st=ht)}return new jo(dt,st)}else return new jo(ht||st,st)}function Qh(it,st,ht,ut,dt){dt==null&&(dt=it.cm&&(it.cm.display.shift||it.extend)),Fa(it,new Ul([Pf(it.sel.primary(),st,ht,dt)],0),ut)}function sA(it,st,ht){for(var ut=[],dt=it.cm&&(it.cm.display.shift||it.extend),Ft=0;Ft<it.sel.ranges.length;Ft++)ut[Ft]=Pf(it.sel.ranges[Ft],st[Ft],null,dt);var Tt=Za(it.cm,ut,it.sel.primIndex);Fa(it,Tt,ht)}function Pu(it,st,ht,ut){var dt=it.sel.ranges.slice(0);dt[st]=ht,Fa(it,Za(it.cm,dt,it.sel.primIndex),ut)}function Fu(it,st,ht,ut){Fa(it,YA(st,ht),ut)}function Uh(it,st,ht){var ut={ranges:st.ranges,update:function(dt){this.ranges=[];for(var Ft=0;Ft<dt.length;Ft++)this.ranges[Ft]=new jo(Zn(it,dt[Ft].anchor),Zn(it,dt[Ft].head))},origin:ht&&ht.origin};return Zi(it,"beforeSelectionChange",it,ut),it.cm&&Zi(it.cm,"beforeSelectionChange",it.cm,ut),ut.ranges!=st.ranges?Za(it.cm,ut.ranges,ut.ranges.length-1):st}function sh(it,st,ht){var ut=it.history.done,dt=Ge(ut);dt&&dt.ranges?(ut[ut.length-1]=st,ah(it,st,ht)):Fa(it,st,ht)}function Fa(it,st,ht){ah(it,st,ht),Nc(it,it.sel,it.cm?it.cm.curOp.id:NaN,ht)}function ah(it,st,ht){(ar(it,"beforeSelectionChange")||it.cm&&ar(it.cm,"beforeSelectionChange"))&&(st=Uh(it,st,ht));var ut=ht&&ht.bias||(Bn(st.primary().head,it.sel.primary().head)<0?-1:1);cd(it,lh(it,st,ut,!0)),!(ht&&ht.scroll===!1)&&it.cm&&_A(it.cm)}function cd(it,st){st.equals(it.sel)||(it.sel=st,it.cm&&(it.cm.curOp.updateInput=1,it.cm.curOp.selectionChanged=!0,ro(it.cm)),Xi(it,"cursorActivity",it))}function aA(it){cd(it,lh(it,it.sel,null,!1))}function lh(it,st,ht,ut){for(var dt,Ft=0;Ft<st.ranges.length;Ft++){var Tt=st.ranges[Ft],zt=st.ranges.length==it.sel.ranges.length&&it.sel.ranges[Ft],Rt=Qc(it,Tt.anchor,zt&&zt.anchor,ht,ut),ee=Qc(it,Tt.head,zt&&zt.head,ht,ut);(dt||Rt!=Tt.anchor||ee!=Tt.head)&&(dt||(dt=st.ranges.slice(0,Ft)),dt[Ft]=new jo(Rt,ee))}return dt?Za(it.cm,dt,st.primIndex):st}function lA(it,st,ht,ut,dt){var Ft=He(it,st.line);if(Ft.markedSpans)for(var Tt=0;Tt<Ft.markedSpans.length;++Tt){var zt=Ft.markedSpans[Tt],Rt=zt.marker,ee="selectLeft"in Rt?!Rt.selectLeft:Rt.inclusiveLeft,ke="selectRight"in Rt?!Rt.selectRight:Rt.inclusiveRight;if((zt.from==null||(ee?zt.from<=st.ch:zt.from<st.ch))&&(zt.to==null||(ke?zt.to>=st.ch:zt.to>st.ch))){if(dt&&(Zi(Rt,"beforeCursorEnter"),Rt.explicitlyCleared))if(Ft.markedSpans){--Tt;continue}else break;if(!Rt.atomic)continue;if(ht){var re=Rt.find(ut<0?1:-1),_e=void 0;if((ut<0?ke:ee)&&(re=Ff(it,re,-ut,re&&re.line==st.line?Ft:null)),re&&re.line==st.line&&(_e=Bn(re,ht))&&(ut<0?_e<0:_e>0))return lA(it,re,st,ut,dt)}var Re=Rt.find(ut<0?-1:1);return(ut<0?ee:ke)&&(Re=Ff(it,Re,ut,Re.line==st.line?Ft:null)),Re?lA(it,Re,st,ut,dt):null}}return st}function Qc(it,st,ht,ut,dt){var Ft=ut||1,Tt=lA(it,st,ht,Ft,dt)||!dt&&lA(it,st,ht,Ft,!0)||lA(it,st,ht,-Ft,dt)||!dt&&lA(it,st,ht,-Ft,!0);return Tt||(it.cantEdit=!0,Ne(it.first,0))}function Ff(it,st,ht,ut){return ht<0&&st.ch==0?st.line>it.first?Zn(it,Ne(st.line-1)):null:ht>0&&st.ch==(ut||He(it,st.line)).text.length?st.line<it.first+it.size-1?Ne(st.line+1,0):null:new Ne(st.line,st.ch+ht)}function Qs(it){it.setSelection(Ne(it.firstLine(),0),Ne(it.lastLine()),Ke)}function Ah(it,st,ht){var ut={canceled:!1,from:st.from,to:st.to,text:st.text,origin:st.origin,cancel:function(){return ut.canceled=!0}};return ht&&(ut.update=function(dt,Ft,Tt,zt){dt&&(ut.from=Zn(it,dt)),Ft&&(ut.to=Zn(it,Ft)),Tt&&(ut.text=Tt),zt!==void 0&&(ut.origin=zt)}),Zi(it,"beforeChange",it,ut),it.cm&&Zi(it.cm,"beforeChange",it.cm,ut),ut.canceled?(it.cm&&(it.cm.curOp.updateInput=2),null):{from:ut.from,to:ut.to,text:ut.text,origin:ut.origin}}function Lu(it,st,ht){if(it.cm){if(!it.cm.curOp)return Xs(it.cm,Lu)(it,st,ht);if(it.cm.state.suppressEdits)return}if(!((ar(it,"beforeChange")||it.cm&&ar(it.cm,"beforeChange"))&&(st=Ah(it,st,!0),!st))){var ut=$t&&!ht&&Wi(it,st.from,st.to);if(ut)for(var dt=ut.length-1;dt>=0;--dt)uh(it,{from:ut[dt].from,to:ut[dt].to,text:dt?[""]:st.text,origin:st.origin});else uh(it,st)}}function uh(it,st){if(!(st.text.length==1&&st.text[0]==""&&Bn(st.from,st.to)==0)){var ht=Mc(it,st);Ic(it,st,ht,it.cm?it.cm.curOp.id:NaN),Dh(it,st,ht,Wn(it,st));var ut=[];rA(it,function(dt,Ft){!Ft&&En(ut,dt.history)==-1&&(gd(dt.history,st),ut.push(dt.history)),Dh(dt,st,null,Wn(dt,st))})}}function Uc(it,st,ht){var ut=it.cm&&it.cm.state.suppressEdits;if(!(ut&&!ht)){for(var dt=it.history,Ft,Tt=it.sel,zt=st=="undo"?dt.done:dt.undone,Rt=st=="undo"?dt.undone:dt.done,ee=0;ee<zt.length&&(Ft=zt[ee],!(ht?Ft.ranges&&!Ft.equals(it.sel):!Ft.ranges));ee++);if(ee!=zt.length){for(dt.lastOrigin=dt.lastSelOrigin=null;;)if(Ft=zt.pop(),Ft.ranges){if(Nh(Ft,Rt),ht&&!Ft.equals(it.sel)){Fa(it,Ft,{clearRedo:!1});return}Tt=Ft}else if(ut){zt.push(Ft);return}else break;var ke=[];Nh(Tt,Rt),Rt.push({changes:ke,generation:dt.generation}),dt.generation=Ft.generation||++dt.maxGeneration;for(var re=ar(it,"beforeChange")||it.cm&&ar(it.cm,"beforeChange"),_e=function(Yn){var di=Ft.changes[Yn];if(di.origin=st,re&&!Ah(it,di,!1))return zt.length=0,{};ke.push(Cf(it,di));var Mi=Yn?Mc(it,di):Ge(zt);Dh(it,di,Mi,dr(it,di)),!Yn&&it.cm&&it.cm.scrollIntoView({from:di.from,to:xu(di)});var Ji=[];rA(it,function(zi,lr){!lr&&En(Ji,zi.history)==-1&&(gd(zi.history,di),Ji.push(zi.history)),Dh(zi,di,null,dr(zi,di))})},Re=Ft.changes.length-1;Re>=0;--Re){var Rn=_e(Re);if(Rn)return Rn.v}}}}function fd(it,st){if(st!=0&&(it.first+=st,it.sel=new Ul(gi(it.sel.ranges,function(dt){return new jo(Ne(dt.anchor.line+st,dt.anchor.ch),Ne(dt.head.line+st,dt.head.ch))}),it.sel.primIndex),it.cm)){os(it.cm,it.first,it.first-st,st);for(var ht=it.cm.display,ut=ht.viewFrom;ut<ht.viewTo;ut++)_r(it.cm,ut,"gutter")}}function Dh(it,st,ht,ut){if(it.cm&&!it.cm.curOp)return Xs(it.cm,Dh)(it,st,ht,ut);if(st.to.line<it.first){fd(it,st.text.length-1-(st.to.line-st.from.line));return}if(!(st.from.line>it.lastLine())){if(st.from.line<it.first){var dt=st.text.length-1-(it.first-st.from.line);fd(it,dt),st={from:Ne(it.first,0),to:Ne(st.to.line+dt,st.to.ch),text:[Ge(st.text)],origin:st.origin}}var Ft=it.lastLine();st.to.line>Ft&&(st={from:st.from,to:Ne(Ft,He(it,Ft).text.length),text:[st.text[0]],origin:st.origin}),st.removed=li(it,st.from,st.to),ht||(ht=Mc(it,st)),it.cm?lg(it.cm,st,ut):Bf(it,st,ut),ah(it,ht,Ke),it.cantEdit&&Qc(it,Ne(it.firstLine(),0))&&(it.cantEdit=!1)}}function lg(it,st,ht){var ut=it.doc,dt=it.display,Ft=st.from,Tt=st.to,zt=!1,Rt=Ft.line;it.options.lineWrapping||(Rt=Yt(In(He(ut,Ft.line))),ut.iter(Rt,Tt.line+1,function(Re){if(Re==dt.maxLine)return zt=!0,!0})),ut.sel.contains(st.from,st.to)>-1&&ro(it),Bf(ut,st,ht,As(it)),it.options.lineWrapping||(ut.iter(Rt,Ft.line+st.text.length,function(Re){var Rn=Or(Re);Rn>dt.maxLineLength&&(dt.maxLine=Re,dt.maxLineLength=Rn,dt.maxLineChanged=!0,zt=!1)}),zt&&(it.curOp.updateMaxLine=!0)),Jt(ut,Ft.line),vu(it,400);var ee=st.text.length-(Tt.line-Ft.line)-1;st.full?os(it):Ft.line==Tt.line&&st.text.length==1&&!ud(it.doc,st)?_r(it,Ft.line,"text"):os(it,Ft.line,Tt.line+1,ee);var ke=ar(it,"changes"),re=ar(it,"change");if(re||ke){var _e={from:Ft,to:Tt,text:st.text,removed:st.removed,origin:st.origin};re&&Xi(it,"change",it,_e),ke&&(it.curOp.changeObjs||(it.curOp.changeObjs=[])).push(_e)}it.display.selForContextMenu=null}function hh(it,st,ht,ut,dt){var Ft;ut||(ut=ht),Bn(ut,ht)<0&&(Ft=[ut,ht],ht=Ft[0],ut=Ft[1]),typeof st=="string"&&(st=it.splitLines(st)),Lu(it,{from:ht,to:ut,text:st,origin:dt})}function Dl(it,st,ht,ut){ht<it.line?it.line+=ut:st<it.line&&(it.line=st,it.ch=0)}function dd(it,st,ht,ut){for(var dt=0;dt<it.length;++dt){var Ft=it[dt],Tt=!0;if(Ft.ranges){Ft.copied||(Ft=it[dt]=Ft.deepCopy(),Ft.copied=!0);for(var zt=0;zt<Ft.ranges.length;zt++)Dl(Ft.ranges[zt].anchor,st,ht,ut),Dl(Ft.ranges[zt].head,st,ht,ut);continue}for(var Rt=0;Rt<Ft.changes.length;++Rt){var ee=Ft.changes[Rt];if(ht<ee.from.line)ee.from=Ne(ee.from.line+ut,ee.from.ch),ee.to=Ne(ee.to.line+ut,ee.to.ch);else if(st<=ee.to.line){Tt=!1;break}}Tt||(it.splice(0,dt+1),dt=0)}}function gd(it,st){var ht=st.from.line,ut=st.to.line,dt=st.text.length-(ut-ht)-1;dd(it.done,ht,ut,dt),dd(it.undone,ht,ut,dt)}function ch(it,st,ht,ut){var dt=st,Ft=st;return typeof st=="number"?Ft=He(it,Dn(it,st)):dt=Yt(st),dt==null?null:(ut(Ft,dt)&&it.cm&&_r(it.cm,dt,ht),Ft)}function Oh(it){this.lines=it,this.parent=null;for(var st=0,ht=0;ht<it.length;++ht)it[ht].parent=this,st+=it[ht].height;this.height=st}Oh.prototype={chunkSize:function(){return this.lines.length},removeInner:function(it,st){for(var ht=it,ut=it+st;ht<ut;++ht){var dt=this.lines[ht];this.height-=dt.height,Ho(dt),Xi(dt,"delete")}this.lines.splice(it,st)},collapse:function(it){it.push.apply(it,this.lines)},insertInner:function(it,st,ht){this.height+=ht,this.lines=this.lines.slice(0,it).concat(st).concat(this.lines.slice(it));for(var ut=0;ut<st.length;++ut)st[ut].parent=this},iterN:function(it,st,ht){for(var ut=it+st;it<ut;++it)if(ht(this.lines[it]))return!0}};function ms(it){this.children=it;for(var st=0,ht=0,ut=0;ut<it.length;++ut){var dt=it[ut];st+=dt.chunkSize(),ht+=dt.height,dt.parent=this}this.size=st,this.height=ht,this.parent=null}ms.prototype={chunkSize:function(){return this.size},removeInner:function(it,st){this.size-=st;for(var ht=0;ht<this.children.length;++ht){var ut=this.children[ht],dt=ut.chunkSize();if(it<dt){var Ft=Math.min(st,dt-it),Tt=ut.height;if(ut.removeInner(it,Ft),this.height-=Tt-ut.height,dt==Ft&&(this.children.splice(ht--,1),ut.parent=null),(st-=Ft)==0)break;it=0}else it-=dt}if(this.size-st<25&&(this.children.length>1||!(this.children[0]instanceof Oh))){var zt=[];this.collapse(zt),this.children=[new Oh(zt)],this.children[0].parent=this}},collapse:function(it){for(var st=0;st<this.children.length;++st)this.children[st].collapse(it)},insertInner:function(it,st,ht){this.size+=st.length,this.height+=ht;for(var ut=0;ut<this.children.length;++ut){var dt=this.children[ut],Ft=dt.chunkSize();if(it<=Ft){if(dt.insertInner(it,st,ht),dt.lines&&dt.lines.length>50){for(var Tt=dt.lines.length%25+25,zt=Tt;zt<dt.lines.length;){var Rt=new Oh(dt.lines.slice(zt,zt+=25));dt.height-=Rt.height,this.children.splice(++ut,0,Rt),Rt.parent=this}dt.lines=dt.lines.slice(0,Tt),this.maybeSpill()}break}it-=Ft}},maybeSpill:function(){if(!(this.children.length<=10)){var it=this;do{var st=it.children.splice(it.children.length-5,5),ht=new ms(st);if(it.parent){it.size-=ht.size,it.height-=ht.height;var dt=En(it.parent.children,it);it.parent.children.splice(dt+1,0,ht)}else{var ut=new ms(it.children);ut.parent=it,it.children=[ut,ht],it=ut}ht.parent=it.parent}while(it.children.length>10);it.parent.maybeSpill()}},iterN:function(it,st,ht){for(var ut=0;ut<this.children.length;++ut){var dt=this.children[ut],Ft=dt.chunkSize();if(it<Ft){var Tt=Math.min(st,Ft-it);if(dt.iterN(it,Tt,ht))return!0;if((st-=Tt)==0)break;it=0}else it-=Ft}}};var ZA=function(it,st,ht){if(ht)for(var ut in ht)ht.hasOwnProperty(ut)&&(this[ut]=ht[ut]);this.doc=it,this.node=st};ZA.prototype.clear=function(){var it=this.doc.cm,st=this.line.widgets,ht=this.line,ut=Yt(ht);if(!(ut==null||!st)){for(var dt=0;dt<st.length;++dt)st[dt]==this&&st.splice(dt--,1);st.length||(ht.widgets=null);var Ft=ea(this);un(ht,Math.max(0,ht.height-Ft)),it&&(Io(it,function(){Dc(it,ht,-Ft),_r(it,ut,"widget")}),Xi(it,"lineWidgetCleared",it,this,ut))}},ZA.prototype.changed=function(){var it=this,st=this.height,ht=this.doc.cm,ut=this.line;this.height=null;var dt=ea(this)-st;dt&&(Xe(this.doc,ut)||un(ut,ut.height+dt),ht&&Io(ht,function(){ht.curOp.forceUpdate=!0,Dc(ht,ut,dt),Xi(ht,"lineWidgetChanged",ht,it,Yt(ut))}))},pr(ZA);function Dc(it,st,ht){mr(st)<(it.curOp&&it.curOp.scrollTop||it.doc.scrollTop)&&vf(it,ht)}function Lf(it,st,ht,ut){var dt=new ZA(it,ht,ut),Ft=it.cm;return Ft&&dt.noHScroll&&(Ft.display.alignWidgets=!0),ch(it,st,"widget",function(Tt){var zt=Tt.widgets||(Tt.widgets=[]);if(dt.insertAt==null?zt.push(dt):zt.splice(Math.min(zt.length-1,Math.max(0,dt.insertAt)),0,dt),dt.line=Tt,Ft&&!Xe(it,Tt)){var Rt=mr(Tt)<it.scrollTop;un(Tt,Tt.height+ea(dt)),Rt&&vf(Ft,dt.height),Ft.curOp.forceUpdate=!0}return!0}),Ft&&Xi(Ft,"lineWidgetAdded",Ft,dt,typeof st=="number"?st:Yt(st)),dt}var Ef=0,pe=function(it,st){this.lines=[],this.type=st,this.doc=it,this.id=++Ef};pe.prototype.clear=function(){if(!this.explicitlyCleared){var it=this.doc.cm,st=it&&!it.curOp;if(st&&gu(it),ar(this,"clear")){var ht=this.find();ht&&Xi(this,"clear",ht.from,ht.to)}for(var ut=null,dt=null,Ft=0;Ft<this.lines.length;++Ft){var Tt=this.lines[Ft],zt=_n(Tt.markedSpans,this);it&&!this.collapsed?_r(it,Yt(Tt),"text"):it&&(zt.to!=null&&(dt=Yt(Tt)),zt.from!=null&&(ut=Yt(Tt))),Tt.markedSpans=On(Tt.markedSpans,zt),zt.from==null&&this.collapsed&&!Xe(this.doc,Tt)&&it&&un(Tt,Ca(it.display))}if(it&&this.collapsed&&!it.options.lineWrapping)for(var Rt=0;Rt<this.lines.length;++Rt){var ee=In(this.lines[Rt]),ke=Or(ee);ke>it.display.maxLineLength&&(it.display.maxLine=ee,it.display.maxLineLength=ke,it.display.maxLineChanged=!0)}ut!=null&&it&&this.collapsed&&os(it,ut,dt+1),this.lines.length=0,this.explicitlyCleared=!0,this.atomic&&this.doc.cantEdit&&(this.doc.cantEdit=!1,it&&aA(it.doc)),it&&Xi(it,"markerCleared",it,this,ut,dt),st&&pu(it),this.parent&&this.parent.clear()}},pe.prototype.find=function(it,st){it==null&&this.type=="bookmark"&&(it=1);for(var ht,ut,dt=0;dt<this.lines.length;++dt){var Ft=this.lines[dt],Tt=_n(Ft.markedSpans,this);if(Tt.from!=null&&(ht=Ne(st?Ft:Yt(Ft),Tt.from),it==-1))return ht;if(Tt.to!=null&&(ut=Ne(st?Ft:Yt(Ft),Tt.to),it==1))return ut}return ht&&{from:ht,to:ut}},pe.prototype.changed=function(){var it=this,st=this.find(-1,!0),ht=this,ut=this.doc.cm;!st||!ut||Io(ut,function(){var dt=st.line,Ft=Yt(st.line),Tt=Ya(ut,Ft);if(Tt&&($u(Tt),ut.curOp.selectionChanged=ut.curOp.forceUpdate=!0),ut.curOp.updateMaxLine=!0,!Xe(ht.doc,dt)&&ht.height!=null){var zt=ht.height;ht.height=null;var Rt=ea(ht)-zt;Rt&&un(dt,dt.height+Rt)}Xi(ut,"markerChanged",ut,it)})},pe.prototype.attachLine=function(it){if(!this.lines.length&&this.doc.cm){var st=this.doc.cm.curOp;(!st.maybeHiddenMarkers||En(st.maybeHiddenMarkers,this)==-1)&&(st.maybeUnhiddenMarkers||(st.maybeUnhiddenMarkers=[])).push(this)}this.lines.push(it)},pe.prototype.detachLine=function(it){if(this.lines.splice(En(this.lines,it),1),!this.lines.length&&this.doc.cm){var st=this.doc.cm.curOp;(st.maybeHiddenMarkers||(st.maybeHiddenMarkers=[])).push(this)}},pr(pe);function Eu(it,st,ht,ut,dt){if(ut&&ut.shared)return Ag(it,st,ht,ut,dt);if(it.cm&&!it.cm.curOp)return Xs(it.cm,Eu)(it,st,ht,ut,dt);var Ft=new pe(it,dt),Tt=Bn(st,ht);if(ut&&Ii(ut,Ft,!1),Tt>0||Tt==0&&Ft.clearWhenEmpty!==!1)return Ft;if(Ft.replacedWith&&(Ft.collapsed=!0,Ft.widgetNode=Ve("span",[Ft.replacedWith],"CodeMirror-widget"),ut.handleMouseEvents||Ft.widgetNode.setAttribute("cm-ignore-events","true"),ut.insertLeft&&(Ft.widgetNode.insertLeft=!0)),Ft.collapsed){if(Fi(it,st.line,st,ht,Ft)||st.line!=ht.line&&Fi(it,ht.line,st,ht,Ft))throw new Error("Inserting collapsed marker partially overlapping an existing one");le()}Ft.addToHistory&&Ic(it,{from:st,to:ht,origin:"markText"},it.sel,NaN);var zt=st.line,Rt=it.cm,ee;if(it.iter(zt,ht.line+1,function(re){Rt&&Ft.collapsed&&!Rt.options.lineWrapping&&In(re)==Rt.display.maxLine&&(ee=!0),Ft.collapsed&&zt!=st.line&&un(re,0),vi(re,new nn(Ft,zt==st.line?st.ch:null,zt==ht.line?ht.ch:null)),++zt}),Ft.collapsed&&it.iter(st.line,ht.line+1,function(re){Xe(it,re)&&un(re,0)}),Ft.clearOnEnter&&dn(Ft,"beforeCursorEnter",function(){return Ft.clear()}),Ft.readOnly&&(Te(),(it.history.done.length||it.history.undone.length)&&it.clearHistory()),Ft.collapsed&&(Ft.id=++Ef,Ft.atomic=!0),Rt){if(ee&&(Rt.curOp.updateMaxLine=!0),Ft.collapsed)os(Rt,st.line,ht.line+1);else if(Ft.className||Ft.startStyle||Ft.endStyle||Ft.css||Ft.attributes||Ft.title)for(var ke=st.line;ke<=ht.line;ke++)_r(Rt,ke,"text");Ft.atomic&&aA(Rt.doc),Xi(Rt,"markerAdded",Rt,Ft)}return Ft}var AA=function(it,st){this.markers=it,this.primary=st;for(var ht=0;ht<it.length;++ht)it[ht].parent=this};AA.prototype.clear=function(){if(!this.explicitlyCleared){this.explicitlyCleared=!0;for(var it=0;it<this.markers.length;++it)this.markers[it].clear();Xi(this,"clear")}},AA.prototype.find=function(it,st){return this.primary.find(it,st)},pr(AA);function Ag(it,st,ht,ut,dt){ut=Ii(ut),ut.shared=!1;var Ft=[Eu(it,st,ht,ut,dt)],Tt=Ft[0],zt=ut.widgetNode;return rA(it,function(Rt){zt&&(ut.widgetNode=zt.cloneNode(!0)),Ft.push(Eu(Rt,Zn(Rt,st),Zn(Rt,ht),ut,dt));for(var ee=0;ee<Rt.linked.length;++ee)if(Rt.linked[ee].isParent)return;Tt=Ge(Ft)}),new AA(Ft,Tt)}function Mf(it){return it.findMarks(Ne(it.first,0),it.clipPos(Ne(it.lastLine())),function(st){return st.parent})}function kf(it,st){for(var ht=0;ht<st.length;ht++){var ut=st[ht],dt=ut.find(),Ft=it.clipPos(dt.from),Tt=it.clipPos(dt.to);if(Bn(Ft,Tt)){var zt=Eu(it,Ft,Tt,ut.primary,ut.primary.type);ut.markers.push(zt),zt.parent=ut}}}function Oc(it){for(var st=function(ut){var dt=it[ut],Ft=[dt.primary.doc];rA(dt.primary.doc,function(Rt){return Ft.push(Rt)});for(var Tt=0;Tt<dt.markers.length;Tt++){var zt=dt.markers[Tt];En(Ft,zt.doc)==-1&&(zt.parent=null,dt.markers.splice(Tt--,1))}},ht=0;ht<it.length;ht++)st(ht)}var ug=0,Aa=function(it,st,ht,ut,dt){if(!(this instanceof Aa))return new Aa(it,st,ht,ut,dt);ht==null&&(ht=0),ms.call(this,[new Oh([new jr("",null)])]),this.first=ht,this.scrollTop=this.scrollLeft=0,this.cantEdit=!1,this.cleanGeneration=1,this.modeFrontier=this.highlightFrontier=ht;var Ft=Ne(ht,0);this.sel=YA(Ft),this.history=new bh(null),this.id=++ug,this.modeOption=st,this.lineSep=ut,this.direction=dt=="rtl"?"rtl":"ltr",this.extend=!1,typeof it=="string"&&(it=this.splitLines(it)),Bf(this,{from:Ft,to:Ft,text:it}),Fa(this,YA(Ft),Ke)};Aa.prototype=Et(ms.prototype,{constructor:Aa,iter:function(it,st,ht){ht?this.iterN(it-this.first,st-it,ht):this.iterN(this.first,this.first+this.size,it)},insert:function(it,st){for(var ht=0,ut=0;ut<st.length;++ut)ht+=st[ut].height;this.insertInner(it-this.first,st,ht)},remove:function(it,st){this.removeInner(it-this.first,st)},getValue:function(it){var st=_i(this,this.first,this.first+this.size);return it===!1?st:st.join(it||this.lineSeparator())},setValue:sa(function(it){var st=Ne(this.first,0),ht=this.first+this.size-1;Lu(this,{from:st,to:Ne(ht,He(this,ht).text.length),text:this.splitLines(it),origin:"setValue",full:!0},!0),this.cm&&PA(this.cm,0,0),Fa(this,YA(st),Ke)}),replaceRange:function(it,st,ht,ut){st=Zn(this,st),ht=ht?Zn(this,ht):st,hh(this,it,st,ht,ut)},getRange:function(it,st,ht){var ut=li(this,Zn(this,it),Zn(this,st));return ht===!1?ut:ut.join(ht||this.lineSeparator())},getLine:function(it){var st=this.getLineHandle(it);return st&&st.text},getLineHandle:function(it){if(Sn(this,it))return He(this,it)},getLineNumber:function(it){return Yt(it)},getLineHandleVisualStart:function(it){return typeof it=="number"&&(it=He(this,it)),In(it)},lineCount:function(){return this.size},firstLine:function(){return this.first},lastLine:function(){return this.first+this.size-1},clipPos:function(it){return Zn(this,it)},getCursor:function(it){var st=this.sel.primary(),ht;return it==null||it=="head"?ht=st.head:it=="anchor"?ht=st.anchor:it=="end"||it=="to"||it===!1?ht=st.to():ht=st.from(),ht},listSelections:function(){return this.sel.ranges},somethingSelected:function(){return this.sel.somethingSelected()},setCursor:sa(function(it,st,ht){Fu(this,Zn(this,typeof it=="number"?Ne(it,st||0):it),null,ht)}),setSelection:sa(function(it,st,ht){Fu(this,Zn(this,it),Zn(this,st||it),ht)}),extendSelection:sa(function(it,st,ht){Qh(this,Zn(this,it),st&&Zn(this,st),ht)}),extendSelections:sa(function(it,st){sA(this,Gi(this,it),st)}),extendSelectionsBy:sa(function(it,st){var ht=gi(this.sel.ranges,it);sA(this,Gi(this,ht),st)}),setSelections:sa(function(it,st,ht){if(it.length){for(var ut=[],dt=0;dt<it.length;dt++)ut[dt]=new jo(Zn(this,it[dt].anchor),Zn(this,it[dt].head));st==null&&(st=Math.min(it.length-1,this.sel.primIndex)),Fa(this,Za(this.cm,ut,st),ht)}}),addSelection:sa(function(it,st,ht){var ut=this.sel.ranges.slice(0);ut.push(new jo(Zn(this,it),Zn(this,st||it))),Fa(this,Za(this.cm,ut,ut.length-1),ht)}),getSelection:function(it){for(var st=this.sel.ranges,ht,ut=0;ut<st.length;ut++){var dt=li(this,st[ut].from(),st[ut].to());ht=ht?ht.concat(dt):dt}return it===!1?ht:ht.join(it||this.lineSeparator())},getSelections:function(it){for(var st=[],ht=this.sel.ranges,ut=0;ut<ht.length;ut++){var dt=li(this,ht[ut].from(),ht[ut].to());it!==!1&&(dt=dt.join(it||this.lineSeparator())),st[ut]=dt}return st},replaceSelection:function(it,st,ht){for(var ut=[],dt=0;dt<this.sel.ranges.length;dt++)ut[dt]=it;this.replaceSelections(ut,st,ht||"+input")},replaceSelections:sa(function(it,st,ht){for(var ut=[],dt=this.sel,Ft=0;Ft<dt.ranges.length;Ft++){var Tt=dt.ranges[Ft];ut[Ft]={from:Tt.from(),to:Tt.to(),text:this.splitLines(it[Ft]),origin:ht}}for(var zt=st&&st!="end"&&kc(this,ut,st),Rt=ut.length-1;Rt>=0;Rt--)Lu(this,ut[Rt]);zt?sh(this,zt):this.cm&&_A(this.cm)}),undo:sa(function(){Uc(this,"undo")}),redo:sa(function(){Uc(this,"redo")}),undoSelection:sa(function(){Uc(this,"undo",!0)}),redoSelection:sa(function(){Uc(this,"redo",!0)}),setExtending:function(it){this.extend=it},getExtending:function(){return this.extend},historySize:function(){for(var it=this.history,st=0,ht=0,ut=0;ut<it.done.length;ut++)it.done[ut].ranges||++st;for(var dt=0;dt<it.undone.length;dt++)it.undone[dt].ranges||++ht;return{undo:st,redo:ht}},clearHistory:function(){var it=this;this.history=new bh(this.history.maxGeneration),rA(this,function(st){return st.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:XA(this.history.done),undone:XA(this.history.undone)}},setHistory:function(it){var st=this.history=new bh(this.history.maxGeneration);st.done=XA(it.done.slice(0),null,!0),st.undone=XA(it.undone.slice(0),null,!0)},setGutterMarker:sa(function(it,st,ht){return ch(this,it,"gutter",function(ut){var dt=ut.gutterMarkers||(ut.gutterMarkers={});return dt[st]=ht,!ht&&kt(dt)&&(ut.gutterMarkers=null),!0})}),clearGutter:sa(function(it){var st=this;this.iter(function(ht){ht.gutterMarkers&&ht.gutterMarkers[it]&&ch(st,ht,"gutter",function(){return ht.gutterMarkers[it]=null,kt(ht.gutterMarkers)&&(ht.gutterMarkers=null),!0})})}),lineInfo:function(it){var st;if(typeof it=="number"){if(!Sn(this,it)||(st=it,it=He(this,it),!it))return null}else if(st=Yt(it),st==null)return null;return{line:st,handle:it,text:it.text,gutterMarkers:it.gutterMarkers,textClass:it.textClass,bgClass:it.bgClass,wrapClass:it.wrapClass,widgets:it.widgets}},addLineClass:sa(function(it,st,ht){return ch(this,it,st=="gutter"?"gutter":"class",function(ut){var dt=st=="text"?"textClass":st=="background"?"bgClass":st=="gutter"?"gutterClass":"wrapClass";if(!ut[dt])ut[dt]=ht;else{if(Wt(ht).test(ut[dt]))return!1;ut[dt]+=" "+ht}return!0})}),removeLineClass:sa(function(it,st,ht){return ch(this,it,st=="gutter"?"gutter":"class",function(ut){var dt=st=="text"?"textClass":st=="background"?"bgClass":st=="gutter"?"gutterClass":"wrapClass",Ft=ut[dt];if(Ft)if(ht==null)ut[dt]=null;else{var Tt=Ft.match(Wt(ht));if(!Tt)return!1;var zt=Tt.index+Tt[0].length;ut[dt]=Ft.slice(0,Tt.index)+(!Tt.index||zt==Ft.length?"":" ")+Ft.slice(zt)||null}else return!1;return!0})}),addLineWidget:sa(function(it,st,ht){return Lf(this,it,st,ht)}),removeLineWidget:function(it){it.clear()},markText:function(it,st,ht){return Eu(this,Zn(this,it),Zn(this,st),ht,ht&&ht.type||"range")},setBookmark:function(it,st){var ht={replacedWith:st&&(st.nodeType==null?st.widget:st),insertLeft:st&&st.insertLeft,clearWhenEmpty:!1,shared:st&&st.shared,handleMouseEvents:st&&st.handleMouseEvents};return it=Zn(this,it),Eu(this,it,it,ht,"bookmark")},findMarksAt:function(it){it=Zn(this,it);var st=[],ht=He(this,it.line).markedSpans;if(ht)for(var ut=0;ut<ht.length;++ut){var dt=ht[ut];(dt.from==null||dt.from<=it.ch)&&(dt.to==null||dt.to>=it.ch)&&st.push(dt.marker.parent||dt.marker)}return st},findMarks:function(it,st,ht){it=Zn(this,it),st=Zn(this,st);var ut=[],dt=it.line;return this.iter(it.line,st.line+1,function(Ft){var Tt=Ft.markedSpans;if(Tt)for(var zt=0;zt<Tt.length;zt++){var Rt=Tt[zt];!(Rt.to!=null&&dt==it.line&&it.ch>=Rt.to||Rt.from==null&&dt!=it.line||Rt.from!=null&&dt==st.line&&Rt.from>=st.ch)&&(!ht||ht(Rt.marker))&&ut.push(Rt.marker.parent||Rt.marker)}++dt}),ut},getAllMarks:function(){var it=[];return this.iter(function(st){var ht=st.markedSpans;if(ht)for(var ut=0;ut<ht.length;++ut)ht[ut].from!=null&&it.push(ht[ut].marker)}),it},posFromIndex:function(it){var st,ht=this.first,ut=this.lineSeparator().length;return this.iter(function(dt){var Ft=dt.text.length+ut;if(Ft>it)return st=it,!0;it-=Ft,++ht}),Zn(this,Ne(ht,st))},indexFromPos:function(it){it=Zn(this,it);var st=it.ch;if(it.line<this.first||it.ch<0)return 0;var ht=this.lineSeparator().length;return this.iter(this.first,it.line,function(ut){st+=ut.text.length+ht}),st},copy:function(it){var st=new Aa(_i(this,this.first,this.first+this.size),this.modeOption,this.first,this.lineSep,this.direction);return st.scrollTop=this.scrollTop,st.scrollLeft=this.scrollLeft,st.sel=this.sel,st.extend=!1,it&&(st.history.undoDepth=this.history.undoDepth,st.setHistory(this.getHistory())),st},linkedDoc:function(it){it||(it={});var st=this.first,ht=this.first+this.size;it.from!=null&&it.from>st&&(st=it.from),it.to!=null&&it.to<ht&&(ht=it.to);var ut=new Aa(_i(this,st,ht),it.mode||this.modeOption,st,this.lineSep,this.direction);return it.sharedHist&&(ut.history=this.history),(this.linked||(this.linked=[])).push({doc:ut,sharedHist:it.sharedHist}),ut.linked=[{doc:this,isParent:!0,sharedHist:it.sharedHist}],kf(ut,Mf(this)),ut},unlinkDoc:function(it){if(it instanceof Co&&(it=it.doc),this.linked)for(var st=0;st<this.linked.length;++st){var ht=this.linked[st];if(ht.doc==it){this.linked.splice(st,1),it.unlinkDoc(this),Oc(Mf(this));break}}if(it.history==this.history){var ut=[it.id];rA(it,function(dt){return ut.push(dt.id)},!0),it.history=new bh(null),it.history.done=XA(this.history.done,ut),it.history.undone=XA(this.history.undone,ut)}},iterLinkedDocs:function(it){rA(this,it)},getMode:function(){return this.mode},getEditor:function(){return this.cm},splitLines:function(it){return this.lineSep?it.split(this.lineSep):Rr(it)},lineSeparator:function(){return this.lineSep||`
`},setDirection:sa(function(it){it!="rtl"&&(it="ltr"),it!=this.direction&&(this.direction=it,this.iter(function(st){return st.order=null}),this.cm&&tp(this.cm))})}),Aa.prototype.eachLine=Aa.prototype.iter;var Hh=0;function bf(it){var st=this;if(cg(st),!(tr(st,it)||Bs(st.display,it))){wr(it),Fe&&(Hh=+new Date);var ht=Pa(st,it,!0),ut=it.dataTransfer.files;if(!(!ht||st.isReadOnly()))if(ut&&ut.length&&window.FileReader&&window.File)for(var dt=ut.length,Ft=Array(dt),Tt=0,zt=function(){++Tt==dt&&Xs(st,function(){ht=Zn(st.doc,ht);var Re={from:ht,to:ht,text:st.doc.splitLines(Ft.filter(function(Rn){return Rn!=null}).join(st.doc.lineSeparator())),origin:"paste"};Lu(st.doc,Re),sh(st.doc,YA(Zn(st.doc,ht),Zn(st.doc,xu(Re))))})()},Rt=function(Re,Rn){if(st.options.allowDropFileTypes&&En(st.options.allowDropFileTypes,Re.type)==-1){zt();return}var Yn=new FileReader;Yn.onerror=function(){return zt()},Yn.onload=function(){var di=Yn.result;if(/[\x00-\x08\x0e-\x1f]{2}/.test(di)){zt();return}Ft[Rn]=di,zt()},Yn.readAsText(Re)},ee=0;ee<ut.length;ee++)Rt(ut[ee],ee);else{if(st.state.draggingText&&st.doc.sel.contains(ht)>-1){st.state.draggingText(it),setTimeout(function(){return st.display.input.focus()},20);return}try{var ke=it.dataTransfer.getData("Text");if(ke){var re;if(st.state.draggingText&&!st.state.draggingText.copy&&(re=st.listSelections()),ah(st.doc,YA(ht,ht)),re)for(var _e=0;_e<re.length;++_e)hh(st.doc,"",re[_e].anchor,re[_e].head,"drag");st.replaceSelection(ke,"around","paste"),st.display.input.focus()}}catch(Re){}}}}function Tf(it,st){if(Fe&&(!it.state.draggingText||+new Date-Hh<100)){Hr(st);return}if(!(tr(it,st)||Bs(it.display,st))&&(st.dataTransfer.setData("Text",it.getSelection()),st.dataTransfer.effectAllowed="copyMove",st.dataTransfer.setDragImage&&!hn)){var ht=Ae("img",null,null,"position: fixed; left: 0; top: 0;");ht.src="data:image/gif;base64,R0lGODlhAQABAAAAACH5BAEKAAEALAAAAAABAAEAAAICTAEAOw==",se&&(ht.width=ht.height=1,it.display.wrapper.appendChild(ht),ht._top=ht.offsetTop),st.dataTransfer.setDragImage(ht,0,0),se&&ht.parentNode.removeChild(ht)}}function hg(it,st){var ht=Pa(it,st);if(ht){var ut=document.createDocumentFragment();vo(it,ht,ut),it.display.dragCursor||(it.display.dragCursor=Ae("div",null,"CodeMirror-cursors CodeMirror-dragcursors"),it.display.lineSpace.insertBefore(it.display.dragCursor,it.display.cursorDiv)),fe(it.display.dragCursor,ut)}}function cg(it){it.display.dragCursor&&(it.display.lineSpace.removeChild(it.display.dragCursor),it.display.dragCursor=null)}function fg(it){if(document.getElementsByClassName){for(var st=document.getElementsByClassName("CodeMirror"),ht=[],ut=0;ut<st.length;ut++){var dt=st[ut].CodeMirror;dt&&ht.push(dt)}ht.length&&ht[0].operation(function(){for(var Ft=0;Ft<ht.length;Ft++)it(ht[Ft])})}}var Cl=!1;function Ja(){Cl||(Rh(),Cl=!0)}function Rh(){var it;dn(window,"resize",function(){it==null&&(it=setTimeout(function(){it=null,fg(pd)},100))}),dn(window,"blur",function(){return fg(eh)})}function pd(it){var st=it.display;st.cachedCharWidth=st.cachedTextHeight=st.cachedPaddingH=null,st.scrollbarsClipped=!1,it.setSize()}for(var LA={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"},Hc=0;Hc<10;Hc++)LA[Hc+48]=LA[Hc+96]=String(Hc);for(var If=65;If<=90;If++)LA[If]=String.fromCharCode(If);for(var Rc=1;Rc<=12;Rc++)LA[Rc+111]=LA[Rc+63235]="F"+Rc;var fl={};fl.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"},fl.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"},fl.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"},fl.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"]},fl.default=ct?fl.macDefault:fl.pcDefault;function md(it){var st=it.split(/-(?!$)/);it=st[st.length-1];for(var ht,ut,dt,Ft,Tt=0;Tt<st.length-1;Tt++){var zt=st[Tt];if(/^(cmd|meta|m)$/i.test(zt))Ft=!0;else if(/^a(lt)?$/i.test(zt))ht=!0;else if(/^(c|ctrl|control)$/i.test(zt))ut=!0;else if(/^s(hift)?$/i.test(zt))dt=!0;else throw new Error("Unrecognized modifier name: "+zt)}return ht&&(it="Alt-"+it),ut&&(it="Ctrl-"+it),Ft&&(it="Cmd-"+it),dt&&(it="Shift-"+it),it}function vd(it){var st={};for(var ht in it)if(it.hasOwnProperty(ht)){var ut=it[ht];if(/^(name|fallthrough|(de|at)tach)$/.test(ht))continue;if(ut=="..."){delete it[ht];continue}for(var dt=gi(ht.split(" "),md),Ft=0;Ft<dt.length;Ft++){var Tt=void 0,zt=void 0;Ft==dt.length-1?(zt=dt.join(" "),Tt=ut):(zt=dt.slice(0,Ft+1).join(" "),Tt="...");var Rt=st[zt];if(!Rt)st[zt]=Tt;else if(Rt!=Tt)throw new Error("Inconsistent bindings for "+zt)}delete it[ht]}for(var ee in st)it[ee]=st[ee];return it}function Pl(it,st,ht,ut){st=Ks(st);var dt=st.call?st.call(it,ut):st[it];if(dt===!1)return"nothing";if(dt==="...")return"multi";if(dt!=null&&ht(dt))return"handled";if(st.fallthrough){if(Object.prototype.toString.call(st.fallthrough)!="[object Array]")return Pl(it,st.fallthrough,ht,ut);for(var Ft=0;Ft<st.fallthrough.length;Ft++){var Tt=Pl(it,st.fallthrough[Ft],ht,ut);if(Tt)return Tt}}}function Gh(it){var st=typeof it=="string"?it:LA[it.keyCode];return st=="Ctrl"||st=="Alt"||st=="Shift"||st=="Mod"}function Gc(it,st,ht){var ut=it;return st.altKey&&ut!="Alt"&&(it="Alt-"+it),(Lt?st.metaKey:st.ctrlKey)&&ut!="Ctrl"&&(it="Ctrl-"+it),(Lt?st.ctrlKey:st.metaKey)&&ut!="Mod"&&(it="Cmd-"+it),!ht&&st.shiftKey&&ut!="Shift"&&(it="Shift-"+it),it}function yd(it,st){if(se&&it.keyCode==34&&it.char)return!1;var ht=LA[it.keyCode];return ht==null||it.altGraphKey?!1:(it.keyCode==3&&it.code&&(ht=it.code),Gc(ht,it,st))}function Ks(it){return typeof it=="string"?fl[it]:it}function ga(it,st){for(var ht=it.doc.sel.ranges,ut=[],dt=0;dt<ht.length;dt++){for(var Ft=st(ht[dt]);ut.length&&Bn(Ft.from,Ge(ut).to)<=0;){var Tt=ut.pop();if(Bn(Tt.from,Ft.from)<0){Ft.from=Tt.from;break}}ut.push(Ft)}Io(it,function(){for(var zt=ut.length-1;zt>=0;zt--)hh(it.doc,"",ut[zt].from,ut[zt].to,"+delete");_A(it)})}function wd(it,st,ht){var ut=ze(it.text,st+ht,ht);return ut<0||ut>it.text.length?null:ut}function Us(it,st,ht){var ut=wd(it,st.ch,ht);return ut==null?null:new Ne(st.line,ut,ht<0?"after":"before")}function zh(it,st,ht,ut,dt){if(it){st.doc.direction=="rtl"&&(dt=-dt);var Ft=Mn(ht,st.doc.direction);if(Ft){var Tt=dt<0?Ge(Ft):Ft[0],zt=dt<0==(Tt.level==1),Rt=zt?"after":"before",ee;if(Tt.level>0||st.doc.direction=="rtl"){var ke=Qo(st,ht);ee=dt<0?ht.text.length-1:0;var re=al(st,ke,ee).top;ee=Je(function(_e){return al(st,ke,_e).top==re},dt<0==(Tt.level==1)?Tt.from:Tt.to-1,ee),Rt=="before"&&(ee=wd(ht,ee,1))}else ee=dt<0?Tt.to:Tt.from;return new Ne(ut,ee,Rt)}}return new Ne(ut,dt<0?ht.text.length:0,dt<0?"before":"after")}function Kh(it,st,ht,ut){var dt=Mn(st,it.doc.direction);if(!dt)return Us(st,ht,ut);ht.ch>=st.text.length?(ht.ch=st.text.length,ht.sticky="before"):ht.ch<=0&&(ht.ch=0,ht.sticky="after");var Ft=mn(dt,ht.ch,ht.sticky),Tt=dt[Ft];if(it.doc.direction=="ltr"&&Tt.level%2==0&&(ut>0?Tt.to>ht.ch:Tt.from<ht.ch))return Us(st,ht,ut);var zt=function(Mi,Ji){return wd(st,Mi instanceof Ne?Mi.ch:Mi,Ji)},Rt,ee=function(Mi){return it.options.lineWrapping?(Rt=Rt||Qo(it,st),Rs(it,st,Rt,Mi)):{begin:0,end:st.text.length}},ke=ee(ht.sticky=="before"?zt(ht,-1):ht.ch);if(it.doc.direction=="rtl"||Tt.level==1){var re=Tt.level==1==ut<0,_e=zt(ht,re?1:-1);if(_e!=null&&(re?_e<=Tt.to&&_e<=ke.end:_e>=Tt.from&&_e>=ke.begin)){var Re=re?"before":"after";return new Ne(ht.line,_e,Re)}}var Rn=function(Mi,Ji,zi){for(var lr=function(cs,na){return na?new Ne(ht.line,zt(cs,1),"before"):new Ne(ht.line,cs,"after")};Mi>=0&&Mi<dt.length;Mi+=Ji){var Ir=dt[Mi],Hi=Ji>0==(Ir.level!=1),to=Hi?zi.begin:zt(zi.end,-1);if(Ir.from<=to&&to<Ir.to||(to=Hi?Ir.from:zt(Ir.to,-1),zi.begin<=to&&to<zi.end))return lr(to,Hi)}},Yn=Rn(Ft+ut,ut,ke);if(Yn)return Yn;var di=ut>0?ke.end:zt(ke.begin,-1);return di!=null&&!(ut>0&&di==st.text.length)&&(Yn=Rn(ut>0?0:dt.length-1,ut,ee(di)),Yn)?Yn:null}var Mu={selectAll:Qs,singleSelection:function(it){return it.setSelection(it.getCursor("anchor"),it.getCursor("head"),Ke)},killLine:function(it){return ga(it,function(st){if(st.empty()){var ht=He(it.doc,st.head.line).text.length;return st.head.ch==ht&&st.head.line<it.lastLine()?{from:st.head,to:Ne(st.head.line+1,0)}:{from:st.head,to:Ne(st.head.line,ht)}}else return{from:st.from(),to:st.to()}})},deleteLine:function(it){return ga(it,function(st){return{from:Ne(st.from().line,0),to:Zn(it.doc,Ne(st.to().line+1,0))}})},delLineLeft:function(it){return ga(it,function(st){return{from:Ne(st.from().line,0),to:st.from()}})},delWrappedLineLeft:function(it){return ga(it,function(st){var ht=it.charCoords(st.head,"div").top+5,ut=it.coordsChar({left:0,top:ht},"div");return{from:ut,to:st.from()}})},delWrappedLineRight:function(it){return ga(it,function(st){var ht=it.charCoords(st.head,"div").top+5,ut=it.coordsChar({left:it.display.lineDiv.offsetWidth+100,top:ht},"div");return{from:st.from(),to:ut}})},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(Ne(it.firstLine(),0))},goDocEnd:function(it){return it.extendSelection(Ne(it.lastLine()))},goLineStart:function(it){return it.extendSelectionsBy(function(st){return jh(it,st.head.line)},{origin:"+move",bias:1})},goLineStartSmart:function(it){return it.extendSelectionsBy(function(st){return Sd(it,st.head)},{origin:"+move",bias:1})},goLineEnd:function(it){return it.extendSelectionsBy(function(st){return Vh(it,st.head.line)},{origin:"+move",bias:-1})},goLineRight:function(it){return it.extendSelectionsBy(function(st){var ht=it.cursorCoords(st.head,"div").top+5;return it.coordsChar({left:it.display.lineDiv.offsetWidth+100,top:ht},"div")},qn)},goLineLeft:function(it){return it.extendSelectionsBy(function(st){var ht=it.cursorCoords(st.head,"div").top+5;return it.coordsChar({left:0,top:ht},"div")},qn)},goLineLeftSmart:function(it){return it.extendSelectionsBy(function(st){var ht=it.cursorCoords(st.head,"div").top+5,ut=it.coordsChar({left:0,top:ht},"div");return ut.ch<it.getLine(ut.line).search(/\S/)?Sd(it,st.head):ut},qn)},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 st=[],ht=it.listSelections(),ut=it.options.tabSize,dt=0;dt<ht.length;dt++){var Ft=ht[dt].from(),Tt=ue(it.getLine(Ft.line),Ft.ch,ut);st.push(Ce(ut-Tt%ut))}it.replaceSelections(st)},defaultTab:function(it){it.somethingSelected()?it.indentSelection("add"):it.execCommand("insertTab")},transposeChars:function(it){return Io(it,function(){for(var st=it.listSelections(),ht=[],ut=0;ut<st.length;ut++)if(st[ut].empty()){var dt=st[ut].head,Ft=He(it.doc,dt.line).text;if(Ft){if(dt.ch==Ft.length&&(dt=new Ne(dt.line,dt.ch-1)),dt.ch>0)dt=new Ne(dt.line,dt.ch+1),it.replaceRange(Ft.charAt(dt.ch-1)+Ft.charAt(dt.ch-2),Ne(dt.line,dt.ch-2),dt,"+transpose");else if(dt.line>it.doc.first){var Tt=He(it.doc,dt.line-1).text;Tt&&(dt=new Ne(dt.line,1),it.replaceRange(Ft.charAt(0)+it.doc.lineSeparator()+Tt.charAt(Tt.length-1),Ne(dt.line-1,Tt.length-1),dt,"+transpose"))}}ht.push(new jo(dt,dt))}it.setSelections(ht)})},newlineAndIndent:function(it){return Io(it,function(){for(var st=it.listSelections(),ht=st.length-1;ht>=0;ht--)it.replaceRange(it.doc.lineSeparator(),st[ht].anchor,st[ht].head,"+input");st=it.listSelections();for(var ut=0;ut<st.length;ut++)it.indentLine(st[ut].from().line,null,!0);_A(it)})},openLine:function(it){return it.replaceSelection(`
`,"start")},toggleOverwrite:function(it){return it.toggleOverwrite()}};function jh(it,st){var ht=He(it.doc,st),ut=In(ht);return ut!=ht&&(st=Yt(ut)),zh(!0,it,ut,st,1)}function Vh(it,st){var ht=He(it.doc,st),ut=ni(ht);return ut!=ht&&(st=Yt(ut)),zh(!0,it,ht,st,-1)}function Sd(it,st){var ht=jh(it,st.line),ut=He(it.doc,ht.line),dt=Mn(ut,it.doc.direction);if(!dt||dt[0].level==0){var Ft=Math.max(ht.ch,ut.text.search(/\S/)),Tt=st.line==ht.line&&st.ch<=Ft&&st.ch;return Ne(ht.line,Tt?0:Ft,ht.sticky)}return ht}function _h(it,st,ht){if(typeof st=="string"&&(st=Mu[st],!st))return!1;it.display.input.ensurePolled();var ut=it.display.shift,dt=!1;try{it.isReadOnly()&&(it.state.suppressEdits=!0),ht&&(it.display.shift=!1),dt=st(it)!=pi}finally{it.display.shift=ut,it.state.suppressEdits=!1}return dt}function xd(it,st,ht){for(var ut=0;ut<it.state.keyMaps.length;ut++){var dt=Pl(st,it.state.keyMaps[ut],ht,it);if(dt)return dt}return it.options.extraKeys&&Pl(st,it.options.extraKeys,ht,it)||Pl(st,it.options.keyMap,ht,it)}var EA=new jt;function fh(it,st,ht,ut){var dt=it.state.keySeq;if(dt){if(Gh(st))return"handled";if(/\'$/.test(st)?it.state.keySeq=null:EA.set(50,function(){it.state.keySeq==dt&&(it.state.keySeq=null,it.display.input.reset())}),zc(it,dt+" "+st,ht,ut))return!0}return zc(it,st,ht,ut)}function zc(it,st,ht,ut){var dt=xd(it,st,ut);return dt=="multi"&&(it.state.keySeq=st),dt=="handled"&&Xi(it,"keyHandled",it,st,ht),(dt=="handled"||dt=="multi")&&(wr(ht),Uo(it)),!!dt}function Kc(it,st){var ht=yd(st,!0);return ht?st.shiftKey&&!it.state.keySeq?fh(it,"Shift-"+ht,st,function(ut){return _h(it,ut,!0)})||fh(it,ht,st,function(ut){if(typeof ut=="string"?/^go[A-Z]/.test(ut):ut.motion)return _h(it,ut)}):fh(it,ht,st,function(ut){return _h(it,ut)}):!1}function jc(it,st,ht){return fh(it,"'"+ht+"'",st,function(ut){return _h(it,ut,!0)})}var ku=null;function Vc(it){var st=this;if(!(it.target&&it.target!=st.display.input.getField())&&(st.curOp.focus=pn(),!tr(st,it))){Fe&&we<11&&it.keyCode==27&&(it.returnValue=!1);var ht=it.keyCode;st.display.shift=ht==16||it.shiftKey;var ut=Kc(st,it);se&&(ku=ut?ht:null,!ut&&ht==88&&!er&&(ct?it.metaKey:it.ctrlKey)&&st.replaceSelection("",null,"cut")),bt&&!ct&&!ut&&ht==46&&it.shiftKey&&!it.ctrlKey&&document.execCommand&&document.execCommand("cut"),ht==18&&!/\bCodeMirror-crosshair\b/.test(st.display.lineDiv.className)&&Bd(st)}}function Bd(it){var st=it.display.lineDiv;Vn(st,"CodeMirror-crosshair");function ht(ut){(ut.keyCode==18||!ut.altKey)&&(qt(st,"CodeMirror-crosshair"),Ai(document,"keyup",ht),Ai(document,"mouseover",ht))}dn(document,"keyup",ht),dn(document,"mouseover",ht)}function Cd(it){it.keyCode==16&&(this.doc.sel.shift=!1),tr(this,it)}function uA(it){var st=this;if(!(it.target&&it.target!=st.display.input.getField())&&!(Bs(st.display,it)||tr(st,it)||it.ctrlKey&&!it.altKey||ct&&it.metaKey)){var ht=it.keyCode,ut=it.charCode;if(se&&ht==ku){ku=null,wr(it);return}if(!(se&&(!it.which||it.which<10)&&Kc(st,it))){var dt=String.fromCharCode(ut==null?ht:ut);dt!="\b"&&(jc(st,it,dt)||st.display.input.onKeyPress(it))}}}var dg=400,Wh=function(it,st,ht){this.time=it,this.pos=st,this.button=ht};Wh.prototype.compare=function(it,st,ht){return this.time+dg>it&&Bn(st,this.pos)==0&&ht==this.button};var JA,dh;function Nf(it,st){var ht=+new Date;return dh&&dh.compare(ht,it,st)?(JA=dh=null,"triple"):JA&&JA.compare(ht,it,st)?(dh=new Wh(ht,it,st),JA=null,"double"):(JA=new Wh(ht,it,st),dh=null,"single")}function Ol(it){var st=this,ht=st.display;if(!(tr(st,it)||ht.activeTouch&&ht.input.supportsTouch())){if(ht.input.ensurePolled(),ht.shift=it.shiftKey,Bs(ht,it)){ve||(ht.scroller.draggable=!1,setTimeout(function(){return ht.scroller.draggable=!0},100));return}if(!Df(st,it)){var ut=Pa(st,it),dt=no(it),Ft=ut?Nf(ut,dt):"single";window.focus(),dt==1&&st.state.selectingText&&st.state.selectingText(it),!(ut&&Qf(st,dt,ut,Ft,it))&&(dt==1?ut?Pd(st,ut,Ft,it):Ur(it)==ht.scroller&&wr(it):dt==2?(ut&&Qh(st.doc,ut),setTimeout(function(){return ht.input.focus()},20)):dt==3&&(It?st.display.input.onContextMenu(it):ps(st)))}}}function Qf(it,st,ht,ut,dt){var Ft="Click";return ut=="double"?Ft="Double"+Ft:ut=="triple"&&(Ft="Triple"+Ft),Ft=(st==1?"Left":st==2?"Middle":"Right")+Ft,fh(it,Gc(Ft,dt),dt,function(Tt){if(typeof Tt=="string"&&(Tt=Mu[Tt]),!Tt)return!1;var zt=!1;try{it.isReadOnly()&&(it.state.suppressEdits=!0),zt=Tt(it,ht)!=pi}finally{it.state.suppressEdits=!1}return zt})}function _c(it,st,ht){var ut=it.getOption("configureMouse"),dt=ut?ut(it,st,ht):{};if(dt.unit==null){var Ft=lt?ht.shiftKey&&ht.metaKey:ht.altKey;dt.unit=Ft?"rectangle":st=="single"?"char":st=="double"?"word":"line"}return(dt.extend==null||it.doc.extend)&&(dt.extend=it.doc.extend||ht.shiftKey),dt.addNew==null&&(dt.addNew=ct?ht.metaKey:ht.ctrlKey),dt.moveOnDrag==null&&(dt.moveOnDrag=!(ct?ht.altKey:ht.ctrlKey)),dt}function Pd(it,st,ht,ut){Fe?setTimeout(Li(ts,it),0):it.curOp.focus=pn();var dt=_c(it,ht,ut),Ft=it.doc.sel,Tt;it.options.dragDrop&&_o&&!it.isReadOnly()&&ht=="single"&&(Tt=Ft.contains(st))>-1&&(Bn((Tt=Ft.ranges[Tt]).from(),st)<0||st.xRel>0)&&(Bn(Tt.to(),st)>0||st.xRel<0)?Fd(it,ut,st,dt):gg(it,ut,st,dt)}function Fd(it,st,ht,ut){var dt=it.display,Ft=!1,Tt=Xs(it,function(ee){ve&&(dt.scroller.draggable=!1),it.state.draggingText=!1,Ai(dt.wrapper.ownerDocument,"mouseup",Tt),Ai(dt.wrapper.ownerDocument,"mousemove",zt),Ai(dt.scroller,"dragstart",Rt),Ai(dt.scroller,"drop",Tt),Ft||(wr(ee),ut.addNew||Qh(it.doc,ht,null,null,ut.extend),ve&&!hn||Fe&&we==9?setTimeout(function(){dt.wrapper.ownerDocument.body.focus({preventScroll:!0}),dt.input.focus()},20):dt.input.focus())}),zt=function(ee){Ft=Ft||Math.abs(st.clientX-ee.clientX)+Math.abs(st.clientY-ee.clientY)>=10},Rt=function(){return Ft=!0};ve&&(dt.scroller.draggable=!0),it.state.draggingText=Tt,Tt.copy=!ut.moveOnDrag,dt.scroller.dragDrop&&dt.scroller.dragDrop(),dn(dt.wrapper.ownerDocument,"mouseup",Tt),dn(dt.wrapper.ownerDocument,"mousemove",zt),dn(dt.scroller,"dragstart",Rt),dn(dt.scroller,"drop",Tt),ps(it),setTimeout(function(){return dt.input.focus()},20)}function Yh(it,st,ht){if(ht=="char")return new jo(st,st);if(ht=="word")return it.findWordAt(st);if(ht=="line")return new jo(Ne(st.line,0),Zn(it.doc,Ne(st.line+1,0)));var ut=ht(it,st);return new jo(ut.from,ut.to)}function gg(it,st,ht,ut){var dt=it.display,Ft=it.doc;wr(st);var Tt,zt,Rt=Ft.sel,ee=Rt.ranges;if(ut.addNew&&!ut.extend?(zt=Ft.sel.contains(ht),zt>-1?Tt=ee[zt]:Tt=new jo(ht,ht)):(Tt=Ft.sel.primary(),zt=Ft.sel.primIndex),ut.unit=="rectangle")ut.addNew||(Tt=new jo(ht,ht)),ht=Pa(it,st,!0,!0),zt=-1;else{var ke=Yh(it,ht,ut.unit);ut.extend?Tt=Pf(Tt,ke.anchor,ke.head,ut.extend):Tt=ke}ut.addNew?zt==-1?(zt=ee.length,Fa(Ft,Za(it,ee.concat([Tt]),zt),{scroll:!1,origin:"*mouse"})):ee.length>1&&ee[zt].empty()&&ut.unit=="char"&&!ut.extend?(Fa(Ft,Za(it,ee.slice(0,zt).concat(ee.slice(zt+1)),0),{scroll:!1,origin:"*mouse"}),Rt=Ft.sel):Pu(Ft,zt,Tt,Pn):(zt=0,Fa(Ft,new Ul([Tt],0),Pn),Rt=Ft.sel);var re=ht;function _e(zi){if(Bn(re,zi)!=0)if(re=zi,ut.unit=="rectangle"){for(var lr=[],Ir=it.options.tabSize,Hi=ue(He(Ft,ht.line).text,ht.ch,Ir),to=ue(He(Ft,zi.line).text,zi.ch,Ir),cs=Math.min(Hi,to),na=Math.max(Hi,to),ws=Math.min(ht.line,zi.line),qa=Math.min(it.lastLine(),Math.max(ht.line,zi.line));ws<=qa;ws++){var ua=He(Ft,ws).text,Js=xi(ua,cs,Ir);cs==na?lr.push(new jo(Ne(ws,Js),Ne(ws,Js))):ua.length>Js&&lr.push(new jo(Ne(ws,Js),Ne(ws,xi(ua,na,Ir))))}lr.length||lr.push(new jo(ht,ht)),Fa(Ft,Za(it,Rt.ranges.slice(0,zt).concat(lr),zt),{origin:"*mouse",scroll:!1}),it.scrollIntoView(zi)}else{var Ga=Tt,pa=Yh(it,zi,ut.unit),Di=Ga.anchor,yo;Bn(pa.anchor,Di)>0?(yo=pa.head,Di=Qn(Ga.from(),pa.anchor)):(yo=pa.anchor,Di=ci(Ga.to(),pa.head));var fs=Rt.ranges.slice(0);fs[zt]=Ld(it,new jo(Zn(Ft,Di),yo)),Fa(Ft,Za(it,fs,zt),Pn)}}var Re=dt.wrapper.getBoundingClientRect(),Rn=0;function Yn(zi){var lr=++Rn,Ir=Pa(it,zi,!0,ut.unit=="rectangle");if(Ir)if(Bn(Ir,re)!=0){it.curOp.focus=pn(),_e(Ir);var Hi=lo(dt,Ft);(Ir.line>=Hi.to||Ir.line<Hi.from)&&setTimeout(Xs(it,function(){Rn==lr&&Yn(zi)}),150)}else{var to=zi.clientY<Re.top?-20:zi.clientY>Re.bottom?20:0;to&&setTimeout(Xs(it,function(){Rn==lr&&(dt.scroller.scrollTop+=to,Yn(zi))}),50)}}function di(zi){it.state.selectingText=!1,Rn=1/0,zi&&(wr(zi),dt.input.focus()),Ai(dt.wrapper.ownerDocument,"mousemove",Mi),Ai(dt.wrapper.ownerDocument,"mouseup",Ji),Ft.history.lastSelOrigin=null}var Mi=Xs(it,function(zi){zi.buttons===0||!no(zi)?di(zi):Yn(zi)}),Ji=Xs(it,di);it.state.selectingText=Ji,dn(dt.wrapper.ownerDocument,"mousemove",Mi),dn(dt.wrapper.ownerDocument,"mouseup",Ji)}function Ld(it,st){var ht=st.anchor,ut=st.head,dt=He(it.doc,ht.line);if(Bn(ht,ut)==0&&ht.sticky==ut.sticky)return st;var Ft=Mn(dt);if(!Ft)return st;var Tt=mn(Ft,ht.ch,ht.sticky),zt=Ft[Tt];if(zt.from!=ht.ch&&zt.to!=ht.ch)return st;var Rt=Tt+(zt.from==ht.ch==(zt.level!=1)?0:1);if(Rt==0||Rt==Ft.length)return st;var ee;if(ut.line!=ht.line)ee=(ut.line-ht.line)*(it.doc.direction=="ltr"?1:-1)>0;else{var ke=mn(Ft,ut.ch,ut.sticky),re=ke-Tt||(ut.ch-ht.ch)*(zt.level==1?-1:1);ke==Rt-1||ke==Rt?ee=re<0:ee=re>0}var _e=Ft[Rt+(ee?-1:0)],Re=ee==(_e.level==1),Rn=Re?_e.from:_e.to,Yn=Re?"after":"before";return ht.ch==Rn&&ht.sticky==Yn?st:new jo(new Ne(ht.line,Rn,Yn),ut)}function Uf(it,st,ht,ut){var dt,Ft;if(st.touches)dt=st.touches[0].clientX,Ft=st.touches[0].clientY;else try{dt=st.clientX,Ft=st.clientY}catch(_e){return!1}if(dt>=Math.floor(it.display.gutters.getBoundingClientRect().right))return!1;ut&&wr(st);var Tt=it.display,zt=Tt.lineDiv.getBoundingClientRect();if(Ft>zt.bottom||!ar(it,ht))return Eo(st);Ft-=zt.top-Tt.viewOffset;for(var Rt=0;Rt<it.display.gutterSpecs.length;++Rt){var ee=Tt.gutters.childNodes[Rt];if(ee&&ee.getBoundingClientRect().right>=dt){var ke=de(it.doc,Ft),re=it.display.gutterSpecs[Rt];return Zi(it,ht,it,ke,re.className,st),Eo(st)}}}function Df(it,st){return Uf(it,st,"gutterClick",!0)}function Wc(it,st){Bs(it.display,st)||gh(it,st)||tr(it,st,"contextmenu")||It||it.display.input.onContextMenu(st)}function gh(it,st){return ar(it,"gutterContextMenu")?Uf(it,st,"gutterContextMenu",!1):!1}function Xh(it){it.display.wrapper.className=it.display.wrapper.className.replace(/\s*cm-s-\S+/g,"")+it.options.theme.replace(/(^|\s)\s*/g," cm-s-"),ll(it)}var hA={toString:function(){return"CodeMirror.Init"}},Ed={},Yc={};function pg(it){var st=it.optionHandlers;function ht(ut,dt,Ft,Tt){it.defaults[ut]=dt,Ft&&(st[ut]=Tt?function(zt,Rt,ee){ee!=hA&&Ft(zt,Rt,ee)}:Ft)}it.defineOption=ht,it.Init=hA,ht("value","",function(ut,dt){return ut.setValue(dt)},!0),ht("mode",null,function(ut,dt){ut.doc.modeOption=dt,$r(ut)},!0),ht("indentUnit",2,$r,!0),ht("indentWithTabs",!1),ht("smartIndent",!0),ht("tabSize",4,function(ut){bc(ut),ll(ut),os(ut)},!0),ht("lineSeparator",null,function(ut,dt){if(ut.doc.lineSep=dt,!!dt){var Ft=[],Tt=ut.doc.first;ut.doc.iter(function(Rt){for(var ee=0;;){var ke=Rt.text.indexOf(dt,ee);if(ke==-1)break;ee=ke+dt.length,Ft.push(Ne(Tt,ke))}Tt++});for(var zt=Ft.length-1;zt>=0;zt--)hh(ut.doc,dt,Ft[zt],Ne(Ft[zt].line,Ft[zt].ch+dt.length))}}),ht("specialChars",/[\u0000-\u001f\u007f-\u009f\u00ad\u061c\u200b-\u200c\u200e\u200f\u2028\u2029\ufeff\ufff9-\ufffc]/g,function(ut,dt,Ft){ut.state.specialChars=new RegExp(dt.source+(dt.test(" ")?"":"| "),"g"),Ft!=hA&&ut.refresh()}),ht("specialCharPlaceholder",ho,function(ut){return ut.refresh()},!0),ht("electricChars",!0),ht("inputStyle",nt?"contenteditable":"textarea",function(){throw new Error("inputStyle can not (yet) be changed in a running editor")},!0),ht("spellcheck",!1,function(ut,dt){return ut.getInputField().spellcheck=dt},!0),ht("autocorrect",!1,function(ut,dt){return ut.getInputField().autocorrect=dt},!0),ht("autocapitalize",!1,function(ut,dt){return ut.getInputField().autocapitalize=dt},!0),ht("rtlMoveVisually",!gt),ht("wholeLineUpdateBefore",!0),ht("theme","default",function(ut){Xh(ut),Bl(ut)},!0),ht("keyMap","default",function(ut,dt,Ft){var Tt=Ks(dt),zt=Ft!=hA&&Ks(Ft);zt&&zt.detach&&zt.detach(ut,Tt),Tt.attach&&Tt.attach(ut,zt||null)}),ht("extraKeys",null),ht("configureMouse",null),ht("lineWrapping",!1,Md,!0),ht("gutters",[],function(ut,dt){ut.display.gutterSpecs=aa(dt,ut.options.lineNumbers),Bl(ut)},!0),ht("fixedGutter",!0,function(ut,dt){ut.display.gutters.style.left=dt?cu(ut.display)+"px":"0",ut.refresh()},!0),ht("coverGutterNextToScrollbar",!1,function(ut){return eA(ut)},!0),ht("scrollbarStyle","native",function(ut){ld(ut),eA(ut),ut.display.scrollbars.setScrollTop(ut.doc.scrollTop),ut.display.scrollbars.setScrollLeft(ut.doc.scrollLeft)},!0),ht("lineNumbers",!1,function(ut,dt){ut.display.gutterSpecs=aa(ut.options.gutters,dt),Bl(ut)},!0),ht("firstLineNumber",1,Bl,!0),ht("lineNumberFormatter",function(ut){return ut},Bl,!0),ht("showCursorWhenSelecting",!1,Is,!0),ht("resetSelectionOnContextMenu",!0),ht("lineWiseCopyCut",!0),ht("pasteLinesPerSelection",!0),ht("selectionsMayTouch",!1),ht("readOnly",!1,function(ut,dt){dt=="nocursor"&&(eh(ut),ut.display.input.blur()),ut.display.input.readOnlyChanged(dt)}),ht("screenReaderLabel",null,function(ut,dt){dt=dt===""?null:dt,ut.display.input.screenReaderLabelChanged(dt)}),ht("disableInput",!1,function(ut,dt){dt||ut.display.input.reset()},!0),ht("dragDrop",!0,Of),ht("allowDropFileTypes",null),ht("cursorBlinkRate",530),ht("cursorScrollMargin",0),ht("cursorHeight",1,Is,!0),ht("singleCursorHeightPerLine",!0,Is,!0),ht("workTime",100),ht("workDelay",100),ht("flattenSpans",!0,bc,!0),ht("addModeClass",!1,bc,!0),ht("pollInterval",100),ht("undoDepth",200,function(ut,dt){return ut.doc.history.undoDepth=dt}),ht("historyEventDelay",1250),ht("viewportMargin",10,function(ut){return ut.refresh()},!0),ht("maxHighlightLength",1e4,bc,!0),ht("moveInputWithCursor",!0,function(ut,dt){dt||ut.display.input.resetPosition()}),ht("tabindex",null,function(ut,dt){return ut.display.input.getField().tabIndex=dt||""}),ht("autofocus",null),ht("direction","ltr",function(ut,dt){return ut.doc.setDirection(dt)},!0),ht("phrases",null)}function Of(it,st,ht){var ut=ht&&ht!=hA;if(!st!=!ut){var dt=it.display.dragFunctions,Ft=st?dn:Ai;Ft(it.display.scroller,"dragstart",dt.start),Ft(it.display.scroller,"dragenter",dt.enter),Ft(it.display.scroller,"dragover",dt.over),Ft(it.display.scroller,"dragleave",dt.leave),Ft(it.display.scroller,"drop",dt.drop)}}function Md(it){it.options.lineWrapping?(Vn(it.display.wrapper,"CodeMirror-wrap"),it.display.sizer.style.minWidth="",it.display.sizerWidth=null):(qt(it.display.wrapper,"CodeMirror-wrap"),ir(it)),yr(it),os(it),ll(it),setTimeout(function(){return eA(it)},100)}function Co(it,st){var ht=this;if(!(this instanceof Co))return new Co(it,st);this.options=st=st?Ii(st):{},Ii(Ed,st,!1);var ut=st.value;typeof ut=="string"?ut=new Aa(ut,st.mode,null,st.lineSeparator,st.direction):st.mode&&(ut.modeOption=st.mode),this.doc=ut;var dt=new Co.inputStyles[st.inputStyle](this),Ft=this.display=new Su(it,ut,dt,st);Ft.wrapper.CodeMirror=this,Xh(this),st.lineWrapping&&(this.display.wrapper.className+=" CodeMirror-wrap"),ld(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},st.autofocus&&!nt&&Ft.input.focus(),Fe&&we<11&&setTimeout(function(){return ht.display.input.reset(!0)},20),ph(this),Ja(),gu(this),this.curOp.forceUpdate=!0,Zs(this,ut),st.autofocus&&!nt||this.hasFocus()?setTimeout(function(){ht.hasFocus()&&!ht.state.focused&&xo(ht)},20):eh(this);for(var Tt in Yc)Yc.hasOwnProperty(Tt)&&Yc[Tt](this,st[Tt],hA);zs(this),st.finishInit&&st.finishInit(this);for(var zt=0;zt<bu.length;++zt)bu[zt](this);pu(this),ve&&st.lineWrapping&&getComputedStyle(Ft.lineDiv).textRendering=="optimizelegibility"&&(Ft.lineDiv.style.textRendering="auto")}Co.defaults=Ed,Co.optionHandlers=Yc;function ph(it){var st=it.display;dn(st.scroller,"mousedown",Xs(it,Ol)),Fe&&we<11?dn(st.scroller,"dblclick",Xs(it,function(Rt){if(!tr(it,Rt)){var ee=Pa(it,Rt);if(!(!ee||Df(it,Rt)||Bs(it.display,Rt))){wr(Rt);var ke=it.findWordAt(ee);Qh(it.doc,ke.anchor,ke.head)}}})):dn(st.scroller,"dblclick",function(Rt){return tr(it,Rt)||wr(Rt)}),dn(st.scroller,"contextmenu",function(Rt){return Wc(it,Rt)}),dn(st.input.getField(),"contextmenu",function(Rt){st.scroller.contains(Rt.target)||Wc(it,Rt)});var ht,ut={end:0};function dt(){st.activeTouch&&(ht=setTimeout(function(){return st.activeTouch=null},1e3),ut=st.activeTouch,ut.end=+new Date)}function Ft(Rt){if(Rt.touches.length!=1)return!1;var ee=Rt.touches[0];return ee.radiusX<=1&&ee.radiusY<=1}function Tt(Rt,ee){if(ee.left==null)return!0;var ke=ee.left-Rt.left,re=ee.top-Rt.top;return ke*ke+re*re>20*20}dn(st.scroller,"touchstart",function(Rt){if(!tr(it,Rt)&&!Ft(Rt)&&!Df(it,Rt)){st.input.ensurePolled(),clearTimeout(ht);var ee=+new Date;st.activeTouch={start:ee,moved:!1,prev:ee-ut.end<=300?ut:null},Rt.touches.length==1&&(st.activeTouch.left=Rt.touches[0].pageX,st.activeTouch.top=Rt.touches[0].pageY)}}),dn(st.scroller,"touchmove",function(){st.activeTouch&&(st.activeTouch.moved=!0)}),dn(st.scroller,"touchend",function(Rt){var ee=st.activeTouch;if(ee&&!Bs(st,Rt)&&ee.left!=null&&!ee.moved&&new Date-ee.start<300){var ke=it.coordsChar(st.activeTouch,"page"),re;!ee.prev||Tt(ee,ee.prev)?re=new jo(ke,ke):!ee.prev.prev||Tt(ee,ee.prev.prev)?re=it.findWordAt(ke):re=new jo(Ne(ke.line,0),Zn(it.doc,Ne(ke.line+1,0))),it.setSelection(re.anchor,re.head),it.focus(),wr(Rt)}dt()}),dn(st.scroller,"touchcancel",dt),dn(st.scroller,"scroll",function(){st.scroller.clientHeight&&(ih(it,st.scroller.scrollTop),WA(it,st.scroller.scrollLeft,!0),Zi(it,"scroll",it))}),dn(st.scroller,"mousewheel",function(Rt){return la(it,Rt)}),dn(st.scroller,"DOMMouseScroll",function(Rt){return la(it,Rt)}),dn(st.wrapper,"scroll",function(){return st.wrapper.scrollTop=st.wrapper.scrollLeft=0}),st.dragFunctions={enter:function(Rt){tr(it,Rt)||Hr(Rt)},over:function(Rt){tr(it,Rt)||(hg(it,Rt),Hr(Rt))},start:function(Rt){return Tf(it,Rt)},drop:Xs(it,bf),leave:function(Rt){tr(it,Rt)||cg(it)}};var zt=st.input.getField();dn(zt,"keyup",function(Rt){return Cd.call(it,Rt)}),dn(zt,"keydown",Xs(it,Vc)),dn(zt,"keypress",Xs(it,uA)),dn(zt,"focus",function(Rt){return xo(it,Rt)}),dn(zt,"blur",function(Rt){return eh(it,Rt)})}var bu=[];Co.defineInitHook=function(it){return bu.push(it)};function js(it,st,ht,ut){var dt=it.doc,Ft;ht==null&&(ht="add"),ht=="smart"&&(dt.mode.indent?Ft=Yr(it,st).state:ht="prev");var Tt=it.options.tabSize,zt=He(dt,st),Rt=ue(zt.text,null,Tt);zt.stateAfter&&(zt.stateAfter=null);var ee=zt.text.match(/^\s*/)[0],ke;if(!ut&&!/\S/.test(zt.text))ke=0,ht="not";else if(ht=="smart"&&(ke=dt.mode.indent(Ft,zt.text.slice(ee.length),zt.text),ke==pi||ke>150)){if(!ut)return;ht="prev"}ht=="prev"?st>dt.first?ke=ue(He(dt,st-1).text,null,Tt):ke=0:ht=="add"?ke=Rt+it.options.indentUnit:ht=="subtract"?ke=Rt-it.options.indentUnit:typeof ht=="number"&&(ke=Rt+ht),ke=Math.max(0,ke);var re="",_e=0;if(it.options.indentWithTabs)for(var Re=Math.floor(ke/Tt);Re;--Re)_e+=Tt,re+=" ";if(_e<ke&&(re+=Ce(ke-_e)),re!=ee)return hh(dt,re,Ne(st,0),Ne(st,ee.length),"+input"),zt.stateAfter=null,!0;for(var Rn=0;Rn<dt.sel.ranges.length;Rn++){var Yn=dt.sel.ranges[Rn];if(Yn.head.line==st&&Yn.head.ch<ee.length){var di=Ne(st,ee.length);Pu(dt,Rn,new jo(di,di));break}}}var Ra=null;function Tu(it){Ra=it}function Xc(it,st,ht,ut,dt){var Ft=it.doc;it.display.shift=!1,ut||(ut=Ft.sel);var Tt=+new Date-200,zt=dt=="paste"||it.state.pasteIncoming>Tt,Rt=Rr(st),ee=null;if(zt&&ut.ranges.length>1)if(Ra&&Ra.text.join(`
`)==st){if(ut.ranges.length%Ra.text.length==0){ee=[];for(var ke=0;ke<Ra.text.length;ke++)ee.push(Ft.splitLines(Ra.text[ke]))}}else Rt.length==ut.ranges.length&&it.options.pasteLinesPerSelection&&(ee=gi(Rt,function(Mi){return[Mi]}));for(var re=it.curOp.updateInput,_e=ut.ranges.length-1;_e>=0;_e--){var Re=ut.ranges[_e],Rn=Re.from(),Yn=Re.to();Re.empty()&&(ht&&ht>0?Rn=Ne(Rn.line,Rn.ch-ht):it.state.overwrite&&!zt?Yn=Ne(Yn.line,Math.min(He(Ft,Yn.line).text.length,Yn.ch+Ge(Rt).length)):zt&&Ra&&Ra.lineWise&&Ra.text.join(`
`)==Rt.join(`
`)&&(Rn=Yn=Ne(Rn.line,0)));var di={from:Rn,to:Yn,text:ee?ee[_e%ee.length]:Rt,origin:dt||(zt?"paste":it.state.cutIncoming>Tt?"cut":"+input")};Lu(it.doc,di),Xi(it,"inputRead",it,di)}st&&!zt&&Jh(it,st),_A(it),it.curOp.updateInput<2&&(it.curOp.updateInput=re),it.curOp.typing=!0,it.state.pasteIncoming=it.state.cutIncoming=-1}function Zh(it,st){var ht=it.clipboardData&&it.clipboardData.getData("Text");if(ht)return it.preventDefault(),!st.isReadOnly()&&!st.options.disableInput&&Io(st,function(){return Xc(st,ht,0,null,"paste")}),!0}function Jh(it,st){if(!(!it.options.electricChars||!it.options.smartIndent))for(var ht=it.doc.sel,ut=ht.ranges.length-1;ut>=0;ut--){var dt=ht.ranges[ut];if(!(dt.head.ch>100||ut&&ht.ranges[ut-1].head.line==dt.head.line)){var Ft=it.getModeAt(dt.head),Tt=!1;if(Ft.electricChars){for(var zt=0;zt<Ft.electricChars.length;zt++)if(st.indexOf(Ft.electricChars.charAt(zt))>-1){Tt=js(it,dt.head.line,"smart");break}}else Ft.electricInput&&Ft.electricInput.test(He(it.doc,dt.head.line).text.slice(0,dt.head.ch))&&(Tt=js(it,dt.head.line,"smart"));Tt&&Xi(it,"electricInput",it,dt.head.line)}}}function Hf(it){for(var st=[],ht=[],ut=0;ut<it.doc.sel.ranges.length;ut++){var dt=it.doc.sel.ranges[ut].head.line,Ft={anchor:Ne(dt,0),head:Ne(dt+1,0)};ht.push(Ft),st.push(it.getRange(Ft.anchor,Ft.head))}return{text:st,ranges:ht}}function Rf(it,st,ht,ut){it.setAttribute("autocorrect",ht?"":"off"),it.setAttribute("autocapitalize",ut?"":"off"),it.setAttribute("spellcheck",!!st)}function kd(){var it=Ae("textarea",null,null,"position: absolute; bottom: -1em; padding: 0; width: 1px; height: 1em; outline: none"),st=Ae("div",[it],null,"overflow: hidden; position: relative; width: 3px; height: 0px;");return ve?it.style.width="1000px":it.setAttribute("wrap","off"),Ut&&(it.style.border="1px solid black"),Rf(it),st}function qA(it){var st=it.optionHandlers,ht=it.helpers={};it.prototype={constructor:it,focus:function(){window.focus(),this.display.input.focus()},setOption:function(ut,dt){var Ft=this.options,Tt=Ft[ut];Ft[ut]==dt&&ut!="mode"||(Ft[ut]=dt,st.hasOwnProperty(ut)&&Xs(this,st[ut])(this,dt,Tt),Zi(this,"optionChange",this,ut))},getOption:function(ut){return this.options[ut]},getDoc:function(){return this.doc},addKeyMap:function(ut,dt){this.state.keyMaps[dt?"push":"unshift"](Ks(ut))},removeKeyMap:function(ut){for(var dt=this.state.keyMaps,Ft=0;Ft<dt.length;++Ft)if(dt[Ft]==ut||dt[Ft].name==ut)return dt.splice(Ft,1),!0},addOverlay:oa(function(ut,dt){var Ft=ut.token?ut:it.getMode(this.options,ut);if(Ft.startState)throw new Error("Overlays may not be stateful.");yi(this.state.overlays,{mode:Ft,modeSpec:ut,opaque:dt&&dt.opaque,priority:dt&&dt.priority||0},function(Tt){return Tt.priority}),this.state.modeGen++,os(this)}),removeOverlay:oa(function(ut){for(var dt=this.state.overlays,Ft=0;Ft<dt.length;++Ft){var Tt=dt[Ft].modeSpec;if(Tt==ut||typeof ut=="string"&&Tt.name==ut){dt.splice(Ft,1),this.state.modeGen++,os(this);return}}}),indentLine:oa(function(ut,dt,Ft){typeof dt!="string"&&typeof dt!="number"&&(dt==null?dt=this.options.smartIndent?"smart":"prev":dt=dt?"add":"subtract"),Sn(this.doc,ut)&&js(this,ut,dt,Ft)}),indentSelection:oa(function(ut){for(var dt=this.doc.sel.ranges,Ft=-1,Tt=0;Tt<dt.length;Tt++){var zt=dt[Tt];if(zt.empty())zt.head.line>Ft&&(js(this,zt.head.line,ut,!0),Ft=zt.head.line,Tt==this.doc.sel.primIndex&&_A(this));else{var Rt=zt.from(),ee=zt.to(),ke=Math.max(Ft,Rt.line);Ft=Math.min(this.lastLine(),ee.line-(ee.ch?0:1))+1;for(var re=ke;re<Ft;++re)js(this,re,ut);var _e=this.doc.sel.ranges;Rt.ch==0&&dt.length==_e.length&&_e[Tt].from().ch>0&&Pu(this.doc,Tt,new jo(Rt,_e[Tt].to()),Ke)}}}),getTokenAt:function(ut,dt){return ur(this,ut,dt)},getLineTokens:function(ut,dt){return ur(this,Ne(ut),dt,!0)},getTokenTypeAt:function(ut){ut=Zn(this.doc,ut);var dt=Cr(this,He(this.doc,ut.line)),Ft=0,Tt=(dt.length-1)/2,zt=ut.ch,Rt;if(zt==0)Rt=dt[2];else for(;;){var ee=Ft+Tt>>1;if((ee?dt[ee*2-1]:0)>=zt)Tt=ee;else if(dt[ee*2+1]<zt)Ft=ee+1;else{Rt=dt[ee*2+2];break}}var ke=Rt?Rt.indexOf("overlay "):-1;return ke<0?Rt:ke==0?null:Rt.slice(0,ke-1)},getModeAt:function(ut){var dt=this.doc.mode;return dt.innerMode?it.innerMode(dt,this.getTokenAt(ut).state).mode:dt},getHelper:function(ut,dt){return this.getHelpers(ut,dt)[0]},getHelpers:function(ut,dt){var Ft=[];if(!ht.hasOwnProperty(dt))return Ft;var Tt=ht[dt],zt=this.getModeAt(ut);if(typeof zt[dt]=="string")Tt[zt[dt]]&&Ft.push(Tt[zt[dt]]);else if(zt[dt])for(var Rt=0;Rt<zt[dt].length;Rt++){var ee=Tt[zt[dt][Rt]];ee&&Ft.push(ee)}else zt.helperType&&Tt[zt.helperType]?Ft.push(Tt[zt.helperType]):Tt[zt.name]&&Ft.push(Tt[zt.name]);for(var ke=0;ke<Tt._global.length;ke++){var re=Tt._global[ke];re.pred(zt,this)&&En(Ft,re.val)==-1&&Ft.push(re.val)}return Ft},getStateAfter:function(ut,dt){var Ft=this.doc;return ut=Dn(Ft,ut==null?Ft.first+Ft.size-1:ut),Yr(this,ut+1,dt).state},cursorCoords:function(ut,dt){var Ft,Tt=this.doc.sel.primary();return ut==null?Ft=Tt.head:typeof ut=="object"?Ft=Zn(this.doc,ut):Ft=ut?Tt.from():Tt.to(),Yo(this,Ft,dt||"page")},charCoords:function(ut,dt){return BA(this,Zn(this.doc,ut),dt||"page")},coordsChar:function(ut,dt){return ut=th(this,ut,dt||"page"),ys(this,ut.left,ut.top)},lineAtHeight:function(ut,dt){return ut=th(this,{top:ut,left:0},dt||"page").top,de(this.doc,ut+this.display.viewOffset)},heightAtLine:function(ut,dt,Ft){var Tt=!1,zt;if(typeof ut=="number"){var Rt=this.doc.first+this.doc.size-1;ut<this.doc.first?ut=this.doc.first:ut>Rt&&(ut=Rt,Tt=!0),zt=He(this.doc,ut)}else zt=ut;return Ys(this,zt,{top:0,left:0},dt||"page",Ft||Tt).top+(Tt?this.doc.height-mr(zt):0)},defaultTextHeight:function(){return Ca(this.display)},defaultCharWidth:function(){return _l(this.display)},getViewport:function(){return{from:this.display.viewFrom,to:this.display.viewTo}},addWidget:function(ut,dt,Ft,Tt,zt){var Rt=this.display;ut=Yo(this,Zn(this.doc,ut));var ee=ut.bottom,ke=ut.left;if(dt.style.position="absolute",dt.setAttribute("cm-ignore-events","true"),this.display.input.setUneditable(dt),Rt.sizer.appendChild(dt),Tt=="over")ee=ut.top;else if(Tt=="above"||Tt=="near"){var re=Math.max(Rt.wrapper.clientHeight,this.doc.height),_e=Math.max(Rt.sizer.clientWidth,Rt.lineSpace.clientWidth);(Tt=="above"||ut.bottom+dt.offsetHeight>re)&&ut.top>dt.offsetHeight?ee=ut.top-dt.offsetHeight:ut.bottom+dt.offsetHeight<=re&&(ee=ut.bottom),ke+dt.offsetWidth>_e&&(ke=_e-dt.offsetWidth)}dt.style.top=ee+"px",dt.style.left=dt.style.right="",zt=="right"?(ke=Rt.sizer.clientWidth-dt.offsetWidth,dt.style.right="0px"):(zt=="left"?ke=0:zt=="middle"&&(ke=(Rt.sizer.clientWidth-dt.offsetWidth)/2),dt.style.left=ke+"px"),Ft&&Ec(this,{left:ke,top:ee,right:ke+dt.offsetWidth,bottom:ee+dt.offsetHeight})},triggerOnKeyDown:oa(Vc),triggerOnKeyPress:oa(uA),triggerOnKeyUp:Cd,triggerOnMouseDown:oa(Ol),execCommand:function(ut){if(Mu.hasOwnProperty(ut))return Mu[ut].call(null,this)},triggerElectric:oa(function(ut){Jh(this,ut)}),findPosH:function(ut,dt,Ft,Tt){var zt=1;dt<0&&(zt=-1,dt=-dt);for(var Rt=Zn(this.doc,ut),ee=0;ee<dt&&(Rt=qh(this.doc,Rt,zt,Ft,Tt),!Rt.hitSide);++ee);return Rt},moveH:oa(function(ut,dt){var Ft=this;this.extendSelectionsBy(function(Tt){return Ft.display.shift||Ft.doc.extend||Tt.empty()?qh(Ft.doc,Tt.head,ut,dt,Ft.options.rtlMoveVisually):ut<0?Tt.from():Tt.to()},qn)}),deleteH:oa(function(ut,dt){var Ft=this.doc.sel,Tt=this.doc;Ft.somethingSelected()?Tt.replaceSelection("",null,"+delete"):ga(this,function(zt){var Rt=qh(Tt,zt.head,ut,dt,!1);return ut<0?{from:Rt,to:zt.head}:{from:zt.head,to:Rt}})}),findPosV:function(ut,dt,Ft,Tt){var zt=1,Rt=Tt;dt<0&&(zt=-1,dt=-dt);for(var ee=Zn(this.doc,ut),ke=0;ke<dt;++ke){var re=Yo(this,ee,"div");if(Rt==null?Rt=re.left:re.left=Rt,ee=Iu(this,re,zt,Ft),ee.hitSide)break}return ee},moveV:oa(function(ut,dt){var Ft=this,Tt=this.doc,zt=[],Rt=!this.display.shift&&!Tt.extend&&Tt.sel.somethingSelected();if(Tt.extendSelectionsBy(function(ke){if(Rt)return ut<0?ke.from():ke.to();var re=Yo(Ft,ke.head,"div");ke.goalColumn!=null&&(re.left=ke.goalColumn),zt.push(re.left);var _e=Iu(Ft,re,ut,dt);return dt=="page"&&ke==Tt.sel.primary()&&vf(Ft,BA(Ft,_e,"div").top-re.top),_e},qn),zt.length)for(var ee=0;ee<Tt.sel.ranges.length;ee++)Tt.sel.ranges[ee].goalColumn=zt[ee]}),findWordAt:function(ut){var dt=this.doc,Ft=He(dt,ut.line).text,Tt=ut.ch,zt=ut.ch;if(Ft){var Rt=this.getHelper(ut,"wordChars");(ut.sticky=="before"||zt==Ft.length)&&Tt?--Tt:++zt;for(var ee=Ft.charAt(Tt),ke=Kt(ee,Rt)?function(re){return Kt(re,Rt)}:/\s/.test(ee)?function(re){return/\s/.test(re)}:function(re){return!/\s/.test(re)&&!Kt(re)};Tt>0&&ke(Ft.charAt(Tt-1));)--Tt;for(;zt<Ft.length&&ke(Ft.charAt(zt));)++zt}return new jo(Ne(ut.line,Tt),Ne(ut.line,zt))},toggleOverwrite:function(ut){ut!=null&&ut==this.state.overwrite||((this.state.overwrite=!this.state.overwrite)?Vn(this.display.cursorDiv,"CodeMirror-overwrite"):qt(this.display.cursorDiv,"CodeMirror-overwrite"),Zi(this,"overwriteToggle",this,this.state.overwrite))},hasFocus:function(){return this.display.input.getField()==pn()},isReadOnly:function(){return!!(this.options.readOnly||this.doc.cantEdit)},scrollTo:oa(function(ut,dt){PA(this,ut,dt)}),getScrollInfo:function(){var ut=this.display.scroller;return{left:ut.scrollLeft,top:ut.scrollTop,height:ut.scrollHeight-ca(this)-this.display.barHeight,width:ut.scrollWidth-ca(this)-this.display.barWidth,clientHeight:ns(this),clientWidth:Ws(this)}},scrollIntoView:oa(function(ut,dt){ut==null?(ut={from:this.doc.sel.primary().head,to:null},dt==null&&(dt=this.options.cursorScrollMargin)):typeof ut=="number"?ut={from:Ne(ut,0),to:null}:ut.from==null&&(ut={from:ut,to:null}),ut.to||(ut.to=ut.from),ut.margin=dt||0,ut.from.line!=null?Bo(this,ut):yf(this,ut.from,ut.to,ut.margin)}),setSize:oa(function(ut,dt){var Ft=this,Tt=function(Rt){return typeof Rt=="number"||/^\d+$/.test(String(Rt))?Rt+"px":Rt};ut!=null&&(this.display.wrapper.style.width=Tt(ut)),dt!=null&&(this.display.wrapper.style.height=Tt(dt)),this.options.lineWrapping&&fa(this);var zt=this.display.viewFrom;this.doc.iter(zt,this.display.viewTo,function(Rt){if(Rt.widgets){for(var ee=0;ee<Rt.widgets.length;ee++)if(Rt.widgets[ee].noHScroll){_r(Ft,zt,"widget");break}}++zt}),this.curOp.forceUpdate=!0,Zi(this,"refresh",this)}),operation:function(ut){return Io(this,ut)},startOperation:function(){return gu(this)},endOperation:function(){return pu(this)},refresh:oa(function(){var ut=this.display.cachedTextHeight;os(this),this.curOp.forceUpdate=!0,ll(this),PA(this,this.doc.scrollLeft,this.doc.scrollTop),yu(this.display),(ut==null||Math.abs(ut-Ca(this.display))>.5||this.options.lineWrapping)&&yr(this),Zi(this,"refresh",this)}),swapDoc:oa(function(ut){var dt=this.doc;return dt.cm=null,this.state.selectingText&&this.state.selectingText(),Zs(this,ut),ll(this),this.display.input.reset(),PA(this,ut.scrollLeft,ut.scrollTop),this.curOp.forceScroll=!0,Xi(this,"swapDoc",this,dt),dt}),phrase:function(ut){var dt=this.options.phrases;return dt&&Object.prototype.hasOwnProperty.call(dt,ut)?dt[ut]:ut},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}},pr(it),it.registerHelper=function(ut,dt,Ft){ht.hasOwnProperty(ut)||(ht[ut]=it[ut]={_global:[]}),ht[ut][dt]=Ft},it.registerGlobalHelper=function(ut,dt,Ft,Tt){it.registerHelper(ut,dt,Tt),ht[ut]._global.push({pred:Ft,val:Tt})}}function qh(it,st,ht,ut,dt){var Ft=st,Tt=ht,zt=He(it,st.line),Rt=dt&&it.direction=="rtl"?-ht:ht;function ee(){var Ji=st.line+Rt;return Ji<it.first||Ji>=it.first+it.size?!1:(st=new Ne(Ji,st.ch,st.sticky),zt=He(it,Ji))}function ke(Ji){var zi;if(ut=="codepoint"){var lr=zt.text.charCodeAt(st.ch+(ut>0?0:-1));isNaN(lr)?zi=null:zi=new Ne(st.line,Math.max(0,Math.min(zt.text.length,st.ch+ht*(lr>=55296&&lr<56320?2:1))),-ht)}else dt?zi=Kh(it.cm,zt,st,ht):zi=Us(zt,st,ht);if(zi==null)if(!Ji&&ee())st=zh(dt,it.cm,zt,st.line,Rt);else return!1;else st=zi;return!0}if(ut=="char"||ut=="codepoint")ke();else if(ut=="column")ke(!0);else if(ut=="word"||ut=="group")for(var re=null,_e=ut=="group",Re=it.cm&&it.cm.getHelper(st,"wordChars"),Rn=!0;!(ht<0&&!ke(!Rn));Rn=!1){var Yn=zt.text.charAt(st.ch)||`
`,di=Kt(Yn,Re)?"w":_e&&Yn==`
`?"n":!_e||/\s/.test(Yn)?null:"p";if(_e&&!Rn&&!di&&(di="s"),re&&re!=di){ht<0&&(ht=1,ke(),st.sticky="after");break}if(di&&(re=di),ht>0&&!ke(!Rn))break}var Mi=Qc(it,st,Ft,Tt,!0);return Ln(Ft,Mi)&&(Mi.hitSide=!0),Mi}function Iu(it,st,ht,ut){var dt=it.doc,Ft=st.left,Tt;if(ut=="page"){var zt=Math.min(it.display.wrapper.clientHeight,window.innerHeight||document.documentElement.clientHeight),Rt=Math.max(zt-.5*Ca(it.display),3);Tt=(ht>0?st.bottom:st.top)+ht*Rt}else ut=="line"&&(Tt=ht>0?st.bottom+3:st.top-3);for(var ee;ee=ys(it,Ft,Tt),!!ee.outside;){if(ht<0?Tt<=0:Tt>=dt.height){ee.hitSide=!0;break}Tt+=ht*5}return ee}var Xo=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};Xo.prototype.init=function(it){var st=this,ht=this,ut=ht.cm,dt=ht.div=it.lineDiv;Rf(dt,ut.options.spellcheck,ut.options.autocorrect,ut.options.autocapitalize);function Ft(zt){for(var Rt=zt.target;Rt;Rt=Rt.parentNode){if(Rt==dt)return!0;if(/\bCodeMirror-(?:line)?widget\b/.test(Rt.className))break}return!1}dn(dt,"paste",function(zt){!Ft(zt)||tr(ut,zt)||Zh(zt,ut)||we<=11&&setTimeout(Xs(ut,function(){return st.updateFromDOM()}),20)}),dn(dt,"compositionstart",function(zt){st.composing={data:zt.data,done:!1}}),dn(dt,"compositionupdate",function(zt){st.composing||(st.composing={data:zt.data,done:!1})}),dn(dt,"compositionend",function(zt){st.composing&&(zt.data!=st.composing.data&&st.readFromDOMSoon(),st.composing.done=!0)}),dn(dt,"touchstart",function(){return ht.forceCompositionEnd()}),dn(dt,"input",function(){st.composing||st.readFromDOMSoon()});function Tt(zt){if(!(!Ft(zt)||tr(ut,zt))){if(ut.somethingSelected())Tu({lineWise:!1,text:ut.getSelections()}),zt.type=="cut"&&ut.replaceSelection("",null,"cut");else if(ut.options.lineWiseCopyCut){var Rt=Hf(ut);Tu({lineWise:!0,text:Rt.text}),zt.type=="cut"&&ut.operation(function(){ut.setSelections(Rt.ranges,0,Ke),ut.replaceSelection("",null,"cut")})}else return;if(zt.clipboardData){zt.clipboardData.clearData();var ee=Ra.text.join(`
`);if(zt.clipboardData.setData("Text",ee),zt.clipboardData.getData("Text")==ee){zt.preventDefault();return}}var ke=kd(),re=ke.firstChild;ut.display.lineSpace.insertBefore(ke,ut.display.lineSpace.firstChild),re.value=Ra.text.join(`
`);var _e=document.activeElement;Xn(re),setTimeout(function(){ut.display.lineSpace.removeChild(ke),_e.focus(),_e==dt&&ht.showPrimarySelection()},50)}}dn(dt,"copy",Tt),dn(dt,"cut",Tt)},Xo.prototype.screenReaderLabelChanged=function(it){it?this.div.setAttribute("aria-label",it):this.div.removeAttribute("aria-label")},Xo.prototype.prepareSelection=function(){var it=fu(this.cm,!1);return it.focus=document.activeElement==this.div,it},Xo.prototype.showSelection=function(it,st){!it||!this.cm.display.view.length||((it.focus||st)&&this.showPrimarySelection(),this.showMultipleSelections(it))},Xo.prototype.getSelection=function(){return this.cm.display.wrapper.ownerDocument.getSelection()},Xo.prototype.showPrimarySelection=function(){var it=this.getSelection(),st=this.cm,ht=st.doc.sel.primary(),ut=ht.from(),dt=ht.to();if(st.display.viewTo==st.display.viewFrom||ut.line>=st.display.viewTo||dt.line<st.display.viewFrom){it.removeAllRanges();return}var Ft=MA(st,it.anchorNode,it.anchorOffset),Tt=MA(st,it.focusNode,it.focusOffset);if(!(Ft&&!Ft.bad&&Tt&&!Tt.bad&&Bn(Qn(Ft,Tt),ut)==0&&Bn(ci(Ft,Tt),dt)==0)){var zt=st.display.view,Rt=ut.line>=st.display.viewFrom&&$A(st,ut)||{node:zt[0].measure.map[2],offset:0},ee=dt.line<st.display.viewTo&&$A(st,dt);if(!ee){var ke=zt[zt.length-1].measure,re=ke.maps?ke.maps[ke.maps.length-1]:ke.map;ee={node:re[re.length-1],offset:re[re.length-2]-re[re.length-3]}}if(!Rt||!ee){it.removeAllRanges();return}var _e=it.rangeCount&&it.getRangeAt(0),Re;try{Re=ye(Rt.node,Rt.offset,ee.offset,ee.node)}catch(Rn){}Re&&(!bt&&st.state.focused?(it.collapse(Rt.node,Rt.offset),Re.collapsed||(it.removeAllRanges(),it.addRange(Re))):(it.removeAllRanges(),it.addRange(Re)),_e&&it.anchorNode==null?it.addRange(_e):bt&&this.startGracePeriod()),this.rememberSelection()}},Xo.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)},Xo.prototype.showMultipleSelections=function(it){fe(this.cm.display.cursorDiv,it.cursors),fe(this.cm.display.selectionDiv,it.selection)},Xo.prototype.rememberSelection=function(){var it=this.getSelection();this.lastAnchorNode=it.anchorNode,this.lastAnchorOffset=it.anchorOffset,this.lastFocusNode=it.focusNode,this.lastFocusOffset=it.focusOffset},Xo.prototype.selectionInEditor=function(){var it=this.getSelection();if(!it.rangeCount)return!1;var st=it.getRangeAt(0).commonAncestorContainer;return on(this.div,st)},Xo.prototype.focus=function(){this.cm.options.readOnly!="nocursor"&&((!this.selectionInEditor()||document.activeElement!=this.div)&&this.showSelection(this.prepareSelection(),!0),this.div.focus())},Xo.prototype.blur=function(){this.div.blur()},Xo.prototype.getField=function(){return this.div},Xo.prototype.supportsTouch=function(){return!0},Xo.prototype.receivedFocus=function(){var it=this;this.selectionInEditor()?this.pollSelection():Io(this.cm,function(){return it.cm.curOp.selectionChanged=!0});function st(){it.cm.state.focused&&(it.pollSelection(),it.polling.set(it.cm.options.pollInterval,st))}this.polling.set(this.cm.options.pollInterval,st)},Xo.prototype.selectionChanged=function(){var it=this.getSelection();return it.anchorNode!=this.lastAnchorNode||it.anchorOffset!=this.lastAnchorOffset||it.focusNode!=this.lastFocusNode||it.focusOffset!=this.lastFocusOffset},Xo.prototype.pollSelection=function(){if(!(this.readDOMTimeout!=null||this.gracePeriod||!this.selectionChanged())){var it=this.getSelection(),st=this.cm;if(et&&ge&&this.cm.display.gutterSpecs.length&&Gf(it.anchorNode)){this.cm.triggerOnKeyDown({type:"keydown",keyCode:8,preventDefault:Math.abs}),this.blur(),this.focus();return}if(!this.composing){this.rememberSelection();var ht=MA(st,it.anchorNode,it.anchorOffset),ut=MA(st,it.focusNode,it.focusOffset);ht&&ut&&Io(st,function(){Fa(st.doc,YA(ht,ut),Ke),(ht.bad||ut.bad)&&(st.curOp.selectionChanged=!0)})}}},Xo.prototype.pollContent=function(){this.readDOMTimeout!=null&&(clearTimeout(this.readDOMTimeout),this.readDOMTimeout=null);var it=this.cm,st=it.display,ht=it.doc.sel.primary(),ut=ht.from(),dt=ht.to();if(ut.ch==0&&ut.line>it.firstLine()&&(ut=Ne(ut.line-1,He(it.doc,ut.line-1).length)),dt.ch==He(it.doc,dt.line).text.length&&dt.line<it.lastLine()&&(dt=Ne(dt.line+1,0)),ut.line<st.viewFrom||dt.line>st.viewTo-1)return!1;var Ft,Tt,zt;ut.line==st.viewFrom||(Ft=Al(it,ut.line))==0?(Tt=Yt(st.view[0].line),zt=st.view[0].node):(Tt=Yt(st.view[Ft].line),zt=st.view[Ft-1].node.nextSibling);var Rt=Al(it,dt.line),ee,ke;if(Rt==st.view.length-1?(ee=st.viewTo-1,ke=st.lineDiv.lastChild):(ee=Yt(st.view[Rt+1].line)-1,ke=st.view[Rt+1].node.previousSibling),!zt)return!1;for(var re=it.doc.splitLines(Wl(it,zt,ke,Tt,ee)),_e=li(it.doc,Ne(Tt,0),Ne(ee,He(it.doc,ee).text.length));re.length>1&&_e.length>1;)if(Ge(re)==Ge(_e))re.pop(),_e.pop(),ee--;else if(re[0]==_e[0])re.shift(),_e.shift(),Tt++;else break;for(var Re=0,Rn=0,Yn=re[0],di=_e[0],Mi=Math.min(Yn.length,di.length);Re<Mi&&Yn.charCodeAt(Re)==di.charCodeAt(Re);)++Re;for(var Ji=Ge(re),zi=Ge(_e),lr=Math.min(Ji.length-(re.length==1?Re:0),zi.length-(_e.length==1?Re:0));Rn<lr&&Ji.charCodeAt(Ji.length-Rn-1)==zi.charCodeAt(zi.length-Rn-1);)++Rn;if(re.length==1&&_e.length==1&&Tt==ut.line)for(;Re&&Re>ut.ch&&Ji.charCodeAt(Ji.length-Rn-1)==zi.charCodeAt(zi.length-Rn-1);)Re--,Rn++;re[re.length-1]=Ji.slice(0,Ji.length-Rn).replace(/^\u200b+/,""),re[0]=re[0].slice(Re).replace(/\u200b+$/,"");var Ir=Ne(Tt,Re),Hi=Ne(ee,_e.length?Ge(_e).length-Rn:0);if(re.length>1||re[0]||Bn(Ir,Hi))return hh(it.doc,re,Ir,Hi,"+input"),!0},Xo.prototype.ensurePolled=function(){this.forceCompositionEnd()},Xo.prototype.reset=function(){this.forceCompositionEnd()},Xo.prototype.forceCompositionEnd=function(){this.composing&&(clearTimeout(this.readDOMTimeout),this.composing=null,this.updateFromDOM(),this.div.blur(),this.div.focus())},Xo.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))},Xo.prototype.updateFromDOM=function(){var it=this;(this.cm.isReadOnly()||!this.pollContent())&&Io(this.cm,function(){return os(it.cm)})},Xo.prototype.setUneditable=function(it){it.contentEditable="false"},Xo.prototype.onKeyPress=function(it){it.charCode==0||this.composing||(it.preventDefault(),this.cm.isReadOnly()||Xs(this.cm,Xc)(this.cm,String.fromCharCode(it.charCode==null?it.keyCode:it.charCode),0))},Xo.prototype.readOnlyChanged=function(it){this.div.contentEditable=String(it!="nocursor")},Xo.prototype.onContextMenu=function(){},Xo.prototype.resetPosition=function(){},Xo.prototype.needsContentAttribute=!0;function $A(it,st){var ht=Ya(it,st.line);if(!ht||ht.hidden)return null;var ut=He(it.doc,st.line),dt=Ts(ht,ut,st.line),Ft=Mn(ut,it.doc.direction),Tt="left";if(Ft){var zt=mn(Ft,st.ch);Tt=zt%2?"right":"left"}var Rt=qu(dt.map,st.ch,Tt);return Rt.offset=Rt.collapse=="right"?Rt.end:Rt.start,Rt}function Gf(it){for(var st=it;st;st=st.parentNode)if(/CodeMirror-gutter-wrapper/.test(st.className))return!0;return!1}function Ps(it,st){return st&&(it.bad=!0),it}function Wl(it,st,ht,ut,dt){var Ft="",Tt=!1,zt=it.doc.lineSeparator(),Rt=!1;function ee(Re){return function(Rn){return Rn.id==Re}}function ke(){Tt&&(Ft+=zt,Rt&&(Ft+=zt),Tt=Rt=!1)}function re(Re){Re&&(ke(),Ft+=Re)}function _e(Re){if(Re.nodeType==1){var Rn=Re.getAttribute("cm-text");if(Rn){re(Rn);return}var Yn=Re.getAttribute("cm-marker"),di;if(Yn){var Mi=it.findMarks(Ne(ut,0),Ne(dt+1,0),ee(+Yn));Mi.length&&(di=Mi[0].find(0))&&re(li(it.doc,di.from,di.to).join(zt));return}if(Re.getAttribute("contenteditable")=="false")return;var Ji=/^(pre|div|p|li|table|br)$/i.test(Re.nodeName);if(!/^br$/i.test(Re.nodeName)&&Re.textContent.length==0)return;Ji&&ke();for(var zi=0;zi<Re.childNodes.length;zi++)_e(Re.childNodes[zi]);/^(pre|p)$/i.test(Re.nodeName)&&(Rt=!0),Ji&&(Tt=!0)}else Re.nodeType==3&&re(Re.nodeValue.replace(/\u200b/g,"").replace(/\u00a0/g," "))}for(;_e(st),st!=ht;)st=st.nextSibling,Rt=!1;return Ft}function MA(it,st,ht){var ut;if(st==it.display.lineDiv){if(ut=it.display.lineDiv.childNodes[ht],!ut)return Ps(it.clipPos(Ne(it.display.viewTo-1)),!0);st=null,ht=0}else for(ut=st;;ut=ut.parentNode){if(!ut||ut==it.display.lineDiv)return null;if(ut.parentNode&&ut.parentNode==it.display.lineDiv)break}for(var dt=0;dt<it.display.view.length;dt++){var Ft=it.display.view[dt];if(Ft.node==ut)return tu(Ft,st,ht)}}function tu(it,st,ht){var ut=it.text.firstChild,dt=!1;if(!st||!on(ut,st))return Ps(Ne(Yt(it.line),0),!0);if(st==ut&&(dt=!0,st=ut.childNodes[ht],ht=0,!st)){var Ft=it.rest?Ge(it.rest):it.line;return Ps(Ne(Yt(Ft),Ft.text.length),dt)}var Tt=st.nodeType==3?st:null,zt=st;for(!Tt&&st.childNodes.length==1&&st.firstChild.nodeType==3&&(Tt=st.firstChild,ht&&(ht=Tt.nodeValue.length));zt.parentNode!=ut;)zt=zt.parentNode;var Rt=it.measure,ee=Rt.maps;function ke(di,Mi,Ji){for(var zi=-1;zi<(ee?ee.length:0);zi++)for(var lr=zi<0?Rt.map:ee[zi],Ir=0;Ir<lr.length;Ir+=3){var Hi=lr[Ir+2];if(Hi==di||Hi==Mi){var to=Yt(zi<0?it.line:it.rest[zi]),cs=lr[Ir]+Ji;return(Ji<0||Hi!=di)&&(cs=lr[Ir+(Ji?1:0)]),Ne(to,cs)}}}var re=ke(Tt,zt,ht);if(re)return Ps(re,dt);for(var _e=zt.nextSibling,Re=Tt?Tt.nodeValue.length-ht:0;_e;_e=_e.nextSibling){if(re=ke(_e,_e.firstChild,0),re)return Ps(Ne(re.line,re.ch-Re),dt);Re+=_e.textContent.length}for(var Rn=zt.previousSibling,Yn=ht;Rn;Rn=Rn.previousSibling){if(re=ke(Rn,Rn.firstChild,-1),re)return Ps(Ne(re.line,re.ch+Yn),dt);Yn+=Rn.textContent.length}}var hs=function(it){this.cm=it,this.prevInput="",this.pollingFast=!1,this.polling=new jt,this.hasSelection=!1,this.composing=null};hs.prototype.init=function(it){var st=this,ht=this,ut=this.cm;this.createField(it);var dt=this.textarea;it.wrapper.insertBefore(this.wrapper,it.wrapper.firstChild),Ut&&(dt.style.width="0px"),dn(dt,"input",function(){Fe&&we>=9&&st.hasSelection&&(st.hasSelection=null),ht.poll()}),dn(dt,"paste",function(Tt){tr(ut,Tt)||Zh(Tt,ut)||(ut.state.pasteIncoming=+new Date,ht.fastPoll())});function Ft(Tt){if(!tr(ut,Tt)){if(ut.somethingSelected())Tu({lineWise:!1,text:ut.getSelections()});else if(ut.options.lineWiseCopyCut){var zt=Hf(ut);Tu({lineWise:!0,text:zt.text}),Tt.type=="cut"?ut.setSelections(zt.ranges,null,Ke):(ht.prevInput="",dt.value=zt.text.join(`
`),Xn(dt))}else return;Tt.type=="cut"&&(ut.state.cutIncoming=+new Date)}}dn(dt,"cut",Ft),dn(dt,"copy",Ft),dn(it.scroller,"paste",function(Tt){if(!(Bs(it,Tt)||tr(ut,Tt))){if(!dt.dispatchEvent){ut.state.pasteIncoming=+new Date,ht.focus();return}var zt=new Event("paste");zt.clipboardData=Tt.clipboardData,dt.dispatchEvent(zt)}}),dn(it.lineSpace,"selectstart",function(Tt){Bs(it,Tt)||wr(Tt)}),dn(dt,"compositionstart",function(){var Tt=ut.getCursor("from");ht.composing&&ht.composing.range.clear(),ht.composing={start:Tt,range:ut.markText(Tt,ut.getCursor("to"),{className:"CodeMirror-composing"})}}),dn(dt,"compositionend",function(){ht.composing&&(ht.poll(),ht.composing.range.clear(),ht.composing=null)})},hs.prototype.createField=function(it){this.wrapper=kd(),this.textarea=this.wrapper.firstChild},hs.prototype.screenReaderLabelChanged=function(it){it?this.textarea.setAttribute("aria-label",it):this.textarea.removeAttribute("aria-label")},hs.prototype.prepareSelection=function(){var it=this.cm,st=it.display,ht=it.doc,ut=fu(it);if(it.options.moveInputWithCursor){var dt=Yo(it,ht.sel.primary().head,"div"),Ft=st.wrapper.getBoundingClientRect(),Tt=st.lineDiv.getBoundingClientRect();ut.teTop=Math.max(0,Math.min(st.wrapper.clientHeight-10,dt.top+Tt.top-Ft.top)),ut.teLeft=Math.max(0,Math.min(st.wrapper.clientWidth-10,dt.left+Tt.left-Ft.left))}return ut},hs.prototype.showSelection=function(it){var st=this.cm,ht=st.display;fe(ht.cursorDiv,it.cursors),fe(ht.selectionDiv,it.selection),it.teTop!=null&&(this.wrapper.style.top=it.teTop+"px",this.wrapper.style.left=it.teLeft+"px")},hs.prototype.reset=function(it){if(!(this.contextMenuPending||this.composing)){var st=this.cm;if(st.somethingSelected()){this.prevInput="";var ht=st.getSelection();this.textarea.value=ht,st.state.focused&&Xn(this.textarea),Fe&&we>=9&&(this.hasSelection=ht)}else it||(this.prevInput=this.textarea.value="",Fe&&we>=9&&(this.hasSelection=null))}},hs.prototype.getField=function(){return this.textarea},hs.prototype.supportsTouch=function(){return!1},hs.prototype.focus=function(){if(this.cm.options.readOnly!="nocursor"&&(!nt||pn()!=this.textarea))try{this.textarea.focus()}catch(it){}},hs.prototype.blur=function(){this.textarea.blur()},hs.prototype.resetPosition=function(){this.wrapper.style.top=this.wrapper.style.left=0},hs.prototype.receivedFocus=function(){this.slowPoll()},hs.prototype.slowPoll=function(){var it=this;this.pollingFast||this.polling.set(this.cm.options.pollInterval,function(){it.poll(),it.cm.state.focused&&it.slowPoll()})},hs.prototype.fastPoll=function(){var it=!1,st=this;st.pollingFast=!0;function ht(){var ut=st.poll();!ut&&!it?(it=!0,st.polling.set(60,ht)):(st.pollingFast=!1,st.slowPoll())}st.polling.set(20,ht)},hs.prototype.poll=function(){var it=this,st=this.cm,ht=this.textarea,ut=this.prevInput;if(this.contextMenuPending||!st.state.focused||Pt(ht)&&!ut&&!this.composing||st.isReadOnly()||st.options.disableInput||st.state.keySeq)return!1;var dt=ht.value;if(dt==ut&&!st.somethingSelected())return!1;if(Fe&&we>=9&&this.hasSelection===dt||ct&&/[\uf700-\uf7ff]/.test(dt))return st.display.input.reset(),!1;if(st.doc.sel==st.display.selForContextMenu){var Ft=dt.charCodeAt(0);if(Ft==8203&&!ut&&(ut="\u200B"),Ft==8666)return this.reset(),this.cm.execCommand("undo")}for(var Tt=0,zt=Math.min(ut.length,dt.length);Tt<zt&&ut.charCodeAt(Tt)==dt.charCodeAt(Tt);)++Tt;return Io(st,function(){Xc(st,dt.slice(Tt),ut.length-Tt,null,it.composing?"*compose":null),dt.length>1e3||dt.indexOf(`
`)>-1?ht.value=it.prevInput="":it.prevInput=dt,it.composing&&(it.composing.range.clear(),it.composing.range=st.markText(it.composing.start,st.getCursor("to"),{className:"CodeMirror-composing"}))}),!0},hs.prototype.ensurePolled=function(){this.pollingFast&&this.poll()&&(this.pollingFast=!1)},hs.prototype.onKeyPress=function(){Fe&&we>=9&&(this.hasSelection=null),this.fastPoll()},hs.prototype.onContextMenu=function(it){var st=this,ht=st.cm,ut=ht.display,dt=st.textarea;st.contextMenuPending&&st.contextMenuPending();var Ft=Pa(ht,it),Tt=ut.scroller.scrollTop;if(!Ft||se)return;var zt=ht.options.resetSelectionOnContextMenu;zt&&ht.doc.sel.contains(Ft)==-1&&Xs(ht,Fa)(ht.doc,YA(Ft),Ke);var Rt=dt.style.cssText,ee=st.wrapper.style.cssText,ke=st.wrapper.offsetParent.getBoundingClientRect();st.wrapper.style.cssText="position: static",dt.style.cssText=`position: absolute; width: 30px; height: 30px;
top: `+(it.clientY-ke.top-5)+"px; left: "+(it.clientX-ke.left-5)+`px;
z-index: 1000; background: `+(Fe?"rgba(255, 255, 255, .05)":"transparent")+`;
outline: none; border-width: 0; outline: none; overflow: hidden; opacity: .05; filter: alpha(opacity=5);`;var re;ve&&(re=window.scrollY),ut.input.focus(),ve&&window.scrollTo(null,re),ut.input.reset(),ht.somethingSelected()||(dt.value=st.prevInput=" "),st.contextMenuPending=Re,ut.selForContextMenu=ht.doc.sel,clearTimeout(ut.detectingSelectAll);function _e(){if(dt.selectionStart!=null){var Yn=ht.somethingSelected(),di="\u200B"+(Yn?dt.value:"");dt.value="\u21DA",dt.value=di,st.prevInput=Yn?"":"\u200B",dt.selectionStart=1,dt.selectionEnd=di.length,ut.selForContextMenu=ht.doc.sel}}function Re(){if(st.contextMenuPending==Re&&(st.contextMenuPending=!1,st.wrapper.style.cssText=ee,dt.style.cssText=Rt,Fe&&we<9&&ut.scrollbars.setScrollTop(ut.scroller.scrollTop=Tt),dt.selectionStart!=null)){(!Fe||Fe&&we<9)&&_e();var Yn=0,di=function(){ut.selForContextMenu==ht.doc.sel&&dt.selectionStart==0&&dt.selectionEnd>0&&st.prevInput=="\u200B"?Xs(ht,Qs)(ht):Yn++<10?ut.detectingSelectAll=setTimeout(di,500):(ut.selForContextMenu=null,ut.input.reset())};ut.detectingSelectAll=setTimeout(di,200)}}if(Fe&&we>=9&&_e(),It){Hr(it);var Rn=function(){Ai(window,"mouseup",Rn),setTimeout(Re,20)};dn(window,"mouseup",Rn)}else setTimeout(Re,50)},hs.prototype.readOnlyChanged=function(it){it||this.reset(),this.textarea.disabled=it=="nocursor",this.textarea.readOnly=!!it},hs.prototype.setUneditable=function(){},hs.prototype.needsContentAttribute=!1;function $h(it,st){if(st=st?Ii(st):{},st.value=it.value,!st.tabindex&&it.tabIndex&&(st.tabindex=it.tabIndex),!st.placeholder&&it.placeholder&&(st.placeholder=it.placeholder),st.autofocus==null){var ht=pn();st.autofocus=ht==it||it.getAttribute("autofocus")!=null&&ht==document.body}function ut(){it.value=zt.getValue()}var dt;if(it.form&&(dn(it.form,"submit",ut),!st.leaveSubmitMethodAlone)){var Ft=it.form;dt=Ft.submit;try{var Tt=Ft.submit=function(){ut(),Ft.submit=dt,Ft.submit(),Ft.submit=Tt}}catch(Rt){}}st.finishInit=function(Rt){Rt.save=ut,Rt.getTextArea=function(){return it},Rt.toTextArea=function(){Rt.toTextArea=isNaN,ut(),it.parentNode.removeChild(Rt.getWrapperElement()),it.style.display="",it.form&&(Ai(it.form,"submit",ut),!st.leaveSubmitMethodAlone&&typeof it.form.submit=="function"&&(it.form.submit=dt))}},it.style.display="none";var zt=Co(function(Rt){return it.parentNode.insertBefore(Rt,it.nextSibling)},st);return zt}function Fl(it){it.off=Ai,it.on=dn,it.wheelEventPixels=cl,it.Doc=Aa,it.splitLines=Rr,it.countColumn=ue,it.findColumn=xi,it.isWordChar=Nt,it.Pass=pi,it.signal=Zi,it.Line=jr,it.changeEnd=xu,it.scrollbarModel=ad,it.Pos=Ne,it.cmpPos=Bn,it.modes=ui,it.mimeModes=Ci,it.resolveMode=Ue,it.getMode=Ie,it.modeExtensions=Le,it.extendMode=We,it.copyState=wi,it.startState=Yi,it.innerMode=hi,it.commands=Mu,it.keyMap=fl,it.keyName=yd,it.isModifierKey=Gh,it.lookupKey=Pl,it.normalizeKeyMap=vd,it.StringStream=sn,it.SharedTextMarker=AA,it.TextMarker=pe,it.LineWidget=ZA,it.e_preventDefault=wr,it.e_stopPropagation=mo,it.e_stop=Hr,it.addClass=Vn,it.contains=on,it.rmClass=qt,it.keyNames=LA}pg(Co),qA(Co);var kA="iter insert remove copy getEditor constructor".split(" ");for(var tc in Aa.prototype)Aa.prototype.hasOwnProperty(tc)&&En(kA,tc)<0&&(Co.prototype[tc]=function(it){return function(){return it.apply(this.doc,arguments)}}(Aa.prototype[tc]));return pr(Aa),Co.inputStyles={textarea:hs,contenteditable:Xo},Co.defineMode=function(it){!Co.defaults.mode&&it!="null"&&(Co.defaults.mode=it),Ri.apply(this,arguments)},Co.defineMIME=Tr,Co.defineMode("null",function(){return{token:function(it){return it.skipToEnd()}}}),Co.defineMIME("text/plain","null"),Co.defineExtension=function(it,st){Co.prototype[it]=st},Co.defineDocExtension=function(it,st){Aa.prototype[it]=st},Co.fromTextArea=$h,Fl(Co),Co.version="5.58.2",Co})},25419:function(Cn,mi,ne){(function(bt){bt(ne(89780),ne(15525),ne(98101))})(function(bt){"use strict";bt.defineMode("markdown",function(Be,Ee){var Ze=bt.getMode(Be,"text/html"),Fe=Ze.name=="null";function we(ue){if(bt.findModeByName){var jt=bt.findModeByName(ue);jt&&(ue=jt.mime||jt.mimes[0])}var En=bt.getMode(Be,ue);return En.name=="null"?null:En}Ee.highlightFormatting===void 0&&(Ee.highlightFormatting=!1),Ee.maxBlockquoteDepth===void 0&&(Ee.maxBlockquoteDepth=0),Ee.taskLists===void 0&&(Ee.taskLists=!1),Ee.strikethrough===void 0&&(Ee.strikethrough=!1),Ee.emoji===void 0&&(Ee.emoji=!1),Ee.fencedCodeBlockHighlighting===void 0&&(Ee.fencedCodeBlockHighlighting=!0),Ee.fencedCodeBlockDefaultMode===void 0&&(Ee.fencedCodeBlockDefaultMode="text/plain"),Ee.xml===void 0&&(Ee.xml=!0),Ee.tokenTypeOverrides===void 0&&(Ee.tokenTypeOverrides={});var ve={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 Qe in ve)ve.hasOwnProperty(Qe)&&Ee.tokenTypeOverrides[Qe]&&(ve[Qe]=Ee.tokenTypeOverrides[Qe]);var ge=/^([*\-_])(?:\s*\1){2,}\s*$/,se=/^(?:[*\-+]|^[0-9]+([.)]))\s+/,hn=/^\[(x| )\](?=\s)/i,Se=Ee.allowAtxHeaderWithoutSpace?/^(#+)/:/^(#+)(?: |$)/,xn=/^ {0,3}(?:\={1,}|-{2,})\s*$/,Ut=/^[^#!\[\]*_\\<>` "'(~:]+/,et=/^(~~~+|```+)[ \t]*([\w\/+#-]*)[^\n`]*$/,nt=/^\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 gt(ue,jt,En){return jt.f=jt.inline=En,En(ue,jt)}function yt(ue,jt,En){return jt.f=jt.block=En,En(ue,jt)}function Lt(ue){return!ue||!/\S/.test(ue.string)}function It(ue){if(ue.linkTitle=!1,ue.linkHref=!1,ue.linkText=!1,ue.em=!1,ue.strong=!1,ue.strikethrough=!1,ue.quote=0,ue.indentedCode=!1,ue.f==qt){var jt=Fe;if(!jt){var En=bt.innerMode(Ze,ue.htmlState);jt=En.mode.name=="xml"&&En.state.tagStart===null&&!En.state.context&&En.state.tokenize.isInText}jt&&(ue.f=Ve,ue.block=Wt,ue.htmlState=null)}return ue.trailingSpace=0,ue.trailingSpaceNewLine=!1,ue.prevLine=ue.thisLine,ue.thisLine={stream:null},null}function Wt(ue,jt){var En=ue.column()===jt.indentation,Si=Lt(jt.prevLine.stream),pi=jt.indentedCode,Ke=jt.prevLine.hr,Pn=jt.list!==!1,qn=(jt.listStack[jt.listStack.length-1]||0)+3;jt.indentedCode=!1;var xi=jt.indentation;if(jt.indentationDiff===null&&(jt.indentationDiff=jt.indentation,Pn)){for(jt.list=null;xi<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=xi-jt.listStack[jt.listStack.length-1])}var kn=!Si&&!Ke&&!jt.prevLine.header&&(!Pn||!pi)&&!jt.prevLine.fencedCodeEnd,Ce=(jt.list===!1||Ke||Si)&&jt.indentation<=qn&&ue.match(ge),Ge=null;if(jt.indentationDiff>=4&&(pi||jt.prevLine.fencedCodeEnd||jt.prevLine.header||Si))return ue.skipToEnd(),jt.indentedCode=!0,ve.code;if(ue.eatSpace())return null;if(En&&jt.indentation<=qn&&(Ge=ue.match(Se))&&Ge[1].length<=6)return jt.quote=0,jt.header=Ge[1].length,jt.thisLine.header=!0,Ee.highlightFormatting&&(jt.formatting="header"),jt.f=jt.inline,fe(jt);if(jt.indentation<=qn&&ue.eat(">"))return jt.quote=En?1:jt.quote+1,Ee.highlightFormatting&&(jt.formatting="quote"),ue.eatSpace(),fe(jt);if(!Ce&&!jt.setext&&En&&jt.indentation<=qn&&(Ge=ue.match(se))){var gi=Ge[1]?"ol":"ul";return jt.indentation=xi+ue.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,Ee.taskLists&&ue.match(hn,!1)&&(jt.taskList=!0),jt.f=jt.inline,Ee.highlightFormatting&&(jt.formatting=["list","list-"+gi]),fe(jt)}else{if(En&&jt.indentation<=qn&&(Ge=ue.match(et,!0)))return jt.quote=0,jt.fencedEndRE=new RegExp(Ge[1]+"+ *$"),jt.localMode=Ee.fencedCodeBlockHighlighting&&we(Ge[2]||Ee.fencedCodeBlockDefaultMode),jt.localMode&&(jt.localState=bt.startState(jt.localMode)),jt.f=jt.block=he,Ee.highlightFormatting&&(jt.formatting="code-block"),jt.code=-1,fe(jt);if(jt.setext||(!kn||!Pn)&&!jt.quote&&jt.list===!1&&!jt.code&&!Ce&&!nt.test(ue.string)&&(Ge=ue.lookAhead(1))&&(Ge=Ge.match(xn)))return jt.setext?(jt.header=jt.setext,jt.setext=0,ue.skipToEnd(),Ee.highlightFormatting&&(jt.formatting="header")):(jt.header=Ge[0].charAt(0)=="="?1:2,jt.setext=jt.header),jt.thisLine.header=!0,jt.f=jt.inline,fe(jt);if(Ce)return ue.skipToEnd(),jt.hr=!0,jt.thisLine.hr=!0,ve.hr;if(ue.peek()==="[")return gt(ue,jt,ti)}return gt(ue,jt,jt.inline)}function qt(ue,jt){var En=Ze.token(ue,jt.htmlState);if(!Fe){var Si=bt.innerMode(Ze,jt.htmlState);(Si.mode.name=="xml"&&Si.state.tagStart===null&&!Si.state.context&&Si.state.tokenize.isInText||jt.md_inside&&ue.current().indexOf(">")>-1)&&(jt.f=Ve,jt.block=Wt,jt.htmlState=null)}return En}function he(ue,jt){var En=jt.listStack[jt.listStack.length-1]||0,Si=jt.indentation<En,pi=En+3;if(jt.fencedEndRE&&jt.indentation<=pi&&(Si||ue.match(jt.fencedEndRE))){Ee.highlightFormatting&&(jt.formatting="code-block");var Ke;return Si||(Ke=fe(jt)),jt.localMode=jt.localState=null,jt.block=Wt,jt.f=Ve,jt.fencedEndRE=null,jt.code=0,jt.thisLine.fencedCodeEnd=!0,Si?yt(ue,jt,jt.block):Ke}else return jt.localMode?jt.localMode.token(ue,jt.localState):(ue.skipToEnd(),ve.code)}function fe(ue){var jt=[];if(ue.formatting){jt.push(ve.formatting),typeof ue.formatting=="string"&&(ue.formatting=[ue.formatting]);for(var En=0;En<ue.formatting.length;En++)jt.push(ve.formatting+"-"+ue.formatting[En]),ue.formatting[En]==="header"&&jt.push(ve.formatting+"-"+ue.formatting[En]+"-"+ue.header),ue.formatting[En]==="quote"&&(!Ee.maxBlockquoteDepth||Ee.maxBlockquoteDepth>=ue.quote?jt.push(ve.formatting+"-"+ue.formatting[En]+"-"+ue.quote):jt.push("error"))}if(ue.taskOpen)return jt.push("meta"),jt.length?jt.join(" "):null;if(ue.taskClosed)return jt.push("property"),jt.length?jt.join(" "):null;if(ue.linkHref?jt.push(ve.linkHref,"url"):(ue.strong&&jt.push(ve.strong),ue.em&&jt.push(ve.em),ue.strikethrough&&jt.push(ve.strikethrough),ue.emoji&&jt.push(ve.emoji),ue.linkText&&jt.push(ve.linkText),ue.code&&jt.push(ve.code),ue.image&&jt.push(ve.image),ue.imageAltText&&jt.push(ve.imageAltText,"link"),ue.imageMarker&&jt.push(ve.imageMarker)),ue.header&&jt.push(ve.header,ve.header+"-"+ue.header),ue.quote&&(jt.push(ve.quote),!Ee.maxBlockquoteDepth||Ee.maxBlockquoteDepth>=ue.quote?jt.push(ve.quote+"-"+ue.quote):jt.push(ve.quote+"-"+Ee.maxBlockquoteDepth)),ue.list!==!1){var Si=(ue.listStack.length-1)%3;Si?Si===1?jt.push(ve.list2):jt.push(ve.list3):jt.push(ve.list1)}return ue.trailingSpaceNewLine?jt.push("trailing-space-new-line"):ue.trailingSpace&&jt.push("trailing-space-"+(ue.trailingSpace%2?"a":"b")),jt.length?jt.join(" "):null}function Ae(ue,jt){if(ue.match(Ut,!0))return fe(jt)}function Ve(ue,jt){var En=jt.text(ue,jt);if(typeof En!="undefined")return En;if(jt.list)return jt.list=null,fe(jt);if(jt.taskList){var Si=ue.match(hn,!0)[1]===" ";return Si?jt.taskOpen=!0:jt.taskClosed=!0,Ee.highlightFormatting&&(jt.formatting="task"),jt.taskList=!1,fe(jt)}if(jt.taskOpen=!1,jt.taskClosed=!1,jt.header&&ue.match(/^#+$/,!0))return Ee.highlightFormatting&&(jt.formatting="header"),fe(jt);var pi=ue.next();if(jt.linkTitle){jt.linkTitle=!1;var Ke=pi;pi==="("&&(Ke=")"),Ke=(Ke+"").replace(/([.?*+^\[\]\\(){}|-])/g,"\\$1");var Pn="^\\s*(?:[^"+Ke+"\\\\]+|\\\\\\\\|\\\\.)"+Ke;if(ue.match(new RegExp(Pn),!0))return ve.linkHref}if(pi==="`"){var qn=jt.formatting;Ee.highlightFormatting&&(jt.formatting="code"),ue.eatWhile("`");var xi=ue.current().length;if(jt.code==0&&(!jt.quote||xi==1))return jt.code=xi,fe(jt);if(xi==jt.code){var kn=fe(jt);return jt.code=0,kn}else return jt.formatting=qn,fe(jt)}else if(jt.code)return fe(jt);if(pi==="\\"&&(ue.next(),Ee.highlightFormatting)){var Ce=fe(jt),Ge=ve.formatting+"-escape";return Ce?Ce+" "+Ge:Ge}if(pi==="!"&&ue.match(/\[[^\]]*\] ?(?:\(|\[)/,!1))return jt.imageMarker=!0,jt.image=!0,Ee.highlightFormatting&&(jt.formatting="image"),fe(jt);if(pi==="["&&jt.imageMarker&&ue.match(/[^\]]*\](\(.*?\)| ?\[.*?\])/,!1))return jt.imageMarker=!1,jt.imageAltText=!0,Ee.highlightFormatting&&(jt.formatting="image"),fe(jt);if(pi==="]"&&jt.imageAltText){Ee.highlightFormatting&&(jt.formatting="image");var Ce=fe(jt);return jt.imageAltText=!1,jt.image=!1,jt.inline=jt.f=on,Ce}if(pi==="["&&!jt.image)return jt.linkText&&ue.match(/^.*?\]/)||(jt.linkText=!0,Ee.highlightFormatting&&(jt.formatting="link")),fe(jt);if(pi==="]"&&jt.linkText){Ee.highlightFormatting&&(jt.formatting="link");var Ce=fe(jt);return jt.linkText=!1,jt.inline=jt.f=ue.match(/\(.*?\)| ?\[.*?\]/,!1)?on:Ve,Ce}if(pi==="<"&&ue.match(/^(https?|ftps?):\/\/(?:[^\\>]|\\.)+>/,!1)){jt.f=jt.inline=ye,Ee.highlightFormatting&&(jt.formatting="link");var Ce=fe(jt);return Ce?Ce+=" ":Ce="",Ce+ve.linkInline}if(pi==="<"&&ue.match(/^[^> \\]+@(?:[^\\>]|\\.)+>/,!1)){jt.f=jt.inline=ye,Ee.highlightFormatting&&(jt.formatting="link");var Ce=fe(jt);return Ce?Ce+=" ":Ce="",Ce+ve.linkEmail}if(Ee.xml&&pi==="<"&&ue.match(/^(!--|\?|!\[CDATA\[|[a-z][a-z0-9-]*(?:\s+[a-z_:.\-]+(?:\s*=\s*[^>]+)?)*\s*(?:>|$))/i,!1)){var gi=ue.string.indexOf(">",ue.pos);if(gi!=-1){var yi=ue.string.substring(ue.start,gi);/markdown\s*=\s*('|"){0,1}1('|"){0,1}/.test(yi)&&(jt.md_inside=!0)}return ue.backUp(1),jt.htmlState=bt.startState(Ze),yt(ue,jt,qt)}if(Ee.xml&&pi==="<"&&ue.match(/^\/\w*?>/))return jt.md_inside=!1,"tag";if(pi==="*"||pi==="_"){for(var Ht=1,Et=ue.pos==1?" ":ue.string.charAt(ue.pos-2);Ht<3&&ue.eat(pi);)Ht++;var Ct=ue.peek()||" ",Nt=!/\s/.test(Ct)&&(!ct.test(Ct)||/\s/.test(Et)||ct.test(Et)),Kt=!/\s/.test(Et)&&(!ct.test(Et)||/\s/.test(Ct)||ct.test(Ct)),kt=null,be=null;if(Ht%2&&(!jt.em&&Nt&&(pi==="*"||!Kt||ct.test(Et))?kt=!0:jt.em==pi&&Kt&&(pi==="*"||!Nt||ct.test(Ct))&&(kt=!1)),Ht>1&&(!jt.strong&&Nt&&(pi==="*"||!Kt||ct.test(Et))?be=!0:jt.strong==pi&&Kt&&(pi==="*"||!Nt||ct.test(Ct))&&(be=!1)),be!=null||kt!=null){Ee.highlightFormatting&&(jt.formatting=kt==null?"strong":be==null?"em":"strong em"),kt===!0&&(jt.em=pi),be===!0&&(jt.strong=pi);var kn=fe(jt);return kt===!1&&(jt.em=!1),be===!1&&(jt.strong=!1),kn}}else if(pi===" "&&(ue.eat("*")||ue.eat("_"))){if(ue.peek()===" ")return fe(jt);ue.backUp(1)}if(Ee.strikethrough){if(pi==="~"&&ue.eatWhile(pi)){if(jt.strikethrough){Ee.highlightFormatting&&(jt.formatting="strikethrough");var kn=fe(jt);return jt.strikethrough=!1,kn}else if(ue.match(/^[^\s]/,!1))return jt.strikethrough=!0,Ee.highlightFormatting&&(jt.formatting="strikethrough"),fe(jt)}else if(pi===" "&&ue.match(/^~~/,!0)){if(ue.peek()===" ")return fe(jt);ue.backUp(2)}}if(Ee.emoji&&pi===":"&&ue.match(/^(?:[a-z_\d+][a-z_\d+-]*|\-[a-z_\d+][a-z_\d+-]*):/)){jt.emoji=!0,Ee.highlightFormatting&&(jt.formatting="emoji");var An=fe(jt);return jt.emoji=!1,An}return pi===" "&&(ue.match(/^ +$/,!1)?jt.trailingSpace++:jt.trailingSpace&&(jt.trailingSpaceNewLine=!0)),fe(jt)}function ye(ue,jt){var En=ue.next();if(En===">"){jt.f=jt.inline=Ve,Ee.highlightFormatting&&(jt.formatting="link");var Si=fe(jt);return Si?Si+=" ":Si="",Si+ve.linkInline}return ue.match(/^[^>]+/,!0),ve.linkInline}function on(ue,jt){if(ue.eatSpace())return null;var En=ue.next();return En==="("||En==="["?(jt.f=jt.inline=Vn(En==="("?")":"]"),Ee.highlightFormatting&&(jt.formatting="link-string"),jt.linkHref=!0,fe(jt)):"error"}var pn={")":/^(?:[^\\\(\)]|\\.|\((?:[^\\\(\)]|\\.)*\))*?(?=\))/,"]":/^(?:[^\\\[\]]|\\.|\[(?:[^\\\[\]]|\\.)*\])*?(?=\])/};function Vn(ue){return function(jt,En){var Si=jt.next();if(Si===ue){En.f=En.inline=Ve,Ee.highlightFormatting&&(En.formatting="link-string");var pi=fe(En);return En.linkHref=!1,pi}return jt.match(pn[ue]),En.linkHref=!0,fe(En)}}function ti(ue,jt){return ue.match(/^([^\]\\]|\\.)*\]:/,!1)?(jt.f=Xn,ue.next(),Ee.highlightFormatting&&(jt.formatting="link"),jt.linkText=!0,fe(jt)):gt(ue,jt,Ve)}function Xn(ue,jt){if(ue.match(/^\]:/,!0)){jt.f=jt.inline=Li,Ee.highlightFormatting&&(jt.formatting="link");var En=fe(jt);return jt.linkText=!1,En}return ue.match(/^([^\]\\]|\\.)+/,!0),ve.linkText}function Li(ue,jt){return ue.eatSpace()?null:(ue.match(/^[^\s]+/,!0),ue.peek()===void 0?jt.linkTitle=!0:ue.match(/^(?:\s+(?:"(?:[^"\\]|\\\\|\\.)+"|'(?:[^'\\]|\\\\|\\.)+'|\((?:[^)\\]|\\\\|\\.)+\)))?/,!0),jt.f=jt.inline=Ve,ve.linkHref+" url")}var Ii={startState:function(){return{f:Wt,prevLine:{stream:null},thisLine:{stream:null},block:Wt,htmlState:null,indentation:0,inline:Ve,text:Ae,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(ue){return{f:ue.f,prevLine:ue.prevLine,thisLine:ue.thisLine,block:ue.block,htmlState:ue.htmlState&&bt.copyState(Ze,ue.htmlState),indentation:ue.indentation,localMode:ue.localMode,localState:ue.localMode?bt.copyState(ue.localMode,ue.localState):null,inline:ue.inline,text:ue.text,formatting:!1,linkText:ue.linkText,linkTitle:ue.linkTitle,linkHref:ue.linkHref,code:ue.code,em:ue.em,strong:ue.strong,strikethrough:ue.strikethrough,emoji:ue.emoji,header:ue.header,setext:ue.setext,hr:ue.hr,taskList:ue.taskList,list:ue.list,listStack:ue.listStack.slice(0),quote:ue.quote,indentedCode:ue.indentedCode,trailingSpace:ue.trailingSpace,trailingSpaceNewLine:ue.trailingSpaceNewLine,md_inside:ue.md_inside,fencedEndRE:ue.fencedEndRE}},token:function(ue,jt){if(jt.formatting=!1,ue!=jt.thisLine.stream){if(jt.header=0,jt.hr=!1,ue.match(/^\s*$/,!0))return It(jt),null;if(jt.prevLine=jt.thisLine,jt.thisLine={stream:ue},jt.taskList=!1,jt.trailingSpace=0,jt.trailingSpaceNewLine=!1,!jt.localState&&(jt.f=jt.block,jt.f!=qt)){var En=ue.match(/^\s*/,!0)[0].replace(/\t/g,lt).length;if(jt.indentation=En,jt.indentationDiff=null,En>0)return null}}return jt.f(ue,jt)},innerMode:function(ue){return ue.block==qt?{state:ue.htmlState,mode:Ze}:ue.localState?{state:ue.localState,mode:ue.localMode}:{state:ue,mode:Ii}},indent:function(ue,jt,En){return ue.block==qt&&Ze.indent?Ze.indent(ue.htmlState,jt,En):ue.localState&&ue.localMode.indent?ue.localMode.indent(ue.localState,jt,En):bt.Pass},blankLine:It,getType:fe,blockCommentStart:"<!--",blockCommentEnd:"-->",closeBrackets:"()[]{}''\"\"``",fold:"markdown"};return Ii},"xml"),bt.defineMIME("text/markdown","markdown"),bt.defineMIME("text/x-markdown","markdown")})},98101:function(Cn,mi,ne){(function(bt){bt(ne(89780))})(function(bt){"use strict";bt.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 Be=0;Be<bt.modeInfo.length;Be++){var Ee=bt.modeInfo[Be];Ee.mimes&&(Ee.mime=Ee.mimes[0])}bt.findModeByMIME=function(Ze){Ze=Ze.toLowerCase();for(var Fe=0;Fe<bt.modeInfo.length;Fe++){var we=bt.modeInfo[Fe];if(we.mime==Ze)return we;if(we.mimes){for(var ve=0;ve<we.mimes.length;ve++)if(we.mimes[ve]==Ze)return we}}if(/\+xml$/.test(Ze))return bt.findModeByMIME("application/xml");if(/\+json$/.test(Ze))return bt.findModeByMIME("application/json")},bt.findModeByExtension=function(Ze){Ze=Ze.toLowerCase();for(var Fe=0;Fe<bt.modeInfo.length;Fe++){var we=bt.modeInfo[Fe];if(we.ext){for(var ve=0;ve<we.ext.length;ve++)if(we.ext[ve]==Ze)return we}}},bt.findModeByFileName=function(Ze){for(var Fe=0;Fe<bt.modeInfo.length;Fe++){var we=bt.modeInfo[Fe];if(we.file&&we.file.test(Ze))return we}var ve=Ze.lastIndexOf("."),Qe=ve>-1&&Ze.substring(ve+1,Ze.length);if(Qe)return bt.findModeByExtension(Qe)},bt.findModeByName=function(Ze){Ze=Ze.toLowerCase();for(var Fe=0;Fe<bt.modeInfo.length;Fe++){var we=bt.modeInfo[Fe];if(we.name.toLowerCase()==Ze)return we;if(we.alias){for(var ve=0;ve<we.alias.length;ve++)if(we.alias[ve].toLowerCase()==Ze)return we}}}})},67549:function(Cn,mi,ne){(function(bt){bt(ne(89780))})(function(bt){"use strict";bt.defineMode("stex",function(Be,Ee){"use strict";function Ze(Ut,et){Ut.cmdState.push(et)}function Fe(Ut){return Ut.cmdState.length>0?Ut.cmdState[Ut.cmdState.length-1]:null}function we(Ut){var et=Ut.cmdState.pop();et&&et.closeBracket()}function ve(Ut){for(var et=Ut.cmdState,nt=et.length-1;nt>=0;nt--){var ct=et[nt];if(ct.name!="DEFAULT")return ct}return{styleIdentifier:function(){return null}}}function Qe(Ut,et,nt){return function(){this.name=Ut,this.bracketNo=0,this.style=et,this.styles=nt,this.argument=null,this.styleIdentifier=function(){return this.styles[this.bracketNo-1]||null},this.openBracket=function(){return this.bracketNo++,"bracket"},this.closeBracket=function(){}}}var ge={};ge.importmodule=Qe("importmodule","tag",["string","builtin"]),ge.documentclass=Qe("documentclass","tag",["","atom"]),ge.usepackage=Qe("usepackage","tag",["atom"]),ge.begin=Qe("begin","tag",["atom"]),ge.end=Qe("end","tag",["atom"]),ge.label=Qe("label","tag",["atom"]),ge.ref=Qe("ref","tag",["atom"]),ge.eqref=Qe("eqref","tag",["atom"]),ge.cite=Qe("cite","tag",["atom"]),ge.bibitem=Qe("bibitem","tag",["atom"]),ge.Bibitem=Qe("Bibitem","tag",["atom"]),ge.RBibitem=Qe("RBibitem","tag",["atom"]),ge.DEFAULT=function(){this.name="DEFAULT",this.style="tag",this.styleIdentifier=this.openBracket=this.closeBracket=function(){}};function se(Ut,et){Ut.f=et}function hn(Ut,et){var nt;if(Ut.match(/^\\[a-zA-Z@]+/)){var ct=Ut.current().slice(1);return nt=ge.hasOwnProperty(ct)?ge[ct]:ge.DEFAULT,nt=new nt,Ze(et,nt),se(et,xn),nt.style}if(Ut.match(/^\\[$&%#{}_]/)||Ut.match(/^\\[,;!\/\\]/))return"tag";if(Ut.match("\\["))return se(et,function(gt,yt){return Se(gt,yt,"\\]")}),"keyword";if(Ut.match("\\("))return se(et,function(gt,yt){return Se(gt,yt,"\\)")}),"keyword";if(Ut.match("$$"))return se(et,function(gt,yt){return Se(gt,yt,"$$")}),"keyword";if(Ut.match("$"))return se(et,function(gt,yt){return Se(gt,yt,"$")}),"keyword";var lt=Ut.next();if(lt=="%")return Ut.skipToEnd(),"comment";if(lt=="}"||lt=="]"){if(nt=Fe(et),nt)nt.closeBracket(lt),se(et,xn);else return"error";return"bracket"}else return lt=="{"||lt=="["?(nt=ge.DEFAULT,nt=new nt,Ze(et,nt),"bracket"):/\d/.test(lt)?(Ut.eatWhile(/[\w.%]/),"atom"):(Ut.eatWhile(/[\w\-_]/),nt=ve(et),nt.name=="begin"&&(nt.argument=Ut.current()),nt.styleIdentifier())}function Se(Ut,et,nt){if(Ut.eatSpace())return null;if(nt&&Ut.match(nt))return se(et,hn),"keyword";if(Ut.match(/^\\[a-zA-Z@]+/))return"tag";if(Ut.match(/^[a-zA-Z]+/))return"variable-2";if(Ut.match(/^\\[$&%#{}_]/)||Ut.match(/^\\[,;!\/]/)||Ut.match(/^[\^_&]/))return"tag";if(Ut.match(/^[+\-<>|=,\/@!*:;'"`~#?]/))return null;if(Ut.match(/^(\d+\.\d*|\d*\.\d+|\d+)/))return"number";var ct=Ut.next();return ct=="{"||ct=="}"||ct=="["||ct=="]"||ct=="("||ct==")"?"bracket":ct=="%"?(Ut.skipToEnd(),"comment"):"error"}function xn(Ut,et){var nt=Ut.peek(),ct;return nt=="{"||nt=="["?(ct=Fe(et),ct.openBracket(nt),Ut.eat(nt),se(et,hn),"bracket"):/[ \t\r]/.test(nt)?(Ut.eat(nt),null):(se(et,hn),we(et),hn(Ut,et))}return{startState:function(){var Ut=Ee.inMathMode?function(et,nt){return Se(et,nt)}:hn;return{cmdState:[],f:Ut}},copyState:function(Ut){return{cmdState:Ut.cmdState.slice(),f:Ut.f}},token:function(Ut,et){return et.f(Ut,et)},blankLine:function(Ut){Ut.f=hn,Ut.cmdState.length=0},lineComment:"%"}}),bt.defineMIME("text/x-stex","stex"),bt.defineMIME("text/x-latex","stex")})},15525:function(Cn,mi,ne){(function(bt){bt(ne(89780))})(function(bt){"use strict";var Be={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},Ee={autoSelfClosers:{},implicitlyClosed:{},contextGrabbers:{},doNotIndent:{},allowUnquoted:!1,allowMissing:!1,allowMissingTagName:!1,caseFold:!1};bt.defineMode("xml",function(Ze,Fe){var we=Ze.indentUnit,ve={},Qe=Fe.htmlMode?Be:Ee;for(var ge in Qe)ve[ge]=Qe[ge];for(var ge in Fe)ve[ge]=Fe[ge];var se,hn;function Se(ye,on){function pn(Xn){return on.tokenize=Xn,Xn(ye,on)}var Vn=ye.next();if(Vn=="<")return ye.eat("!")?ye.eat("[")?ye.match("CDATA[")?pn(et("atom","]]>")):null:ye.match("--")?pn(et("comment","-->")):ye.match("DOCTYPE",!0,!0)?(ye.eatWhile(/[\w\._\-]/),pn(nt(1))):null:ye.eat("?")?(ye.eatWhile(/[\w\._\-]/),on.tokenize=et("meta","?>"),"meta"):(se=ye.eat("/")?"closeTag":"openTag",on.tokenize=xn,"tag bracket");if(Vn=="&"){var ti;return ye.eat("#")?ye.eat("x")?ti=ye.eatWhile(/[a-fA-F\d]/)&&ye.eat(";"):ti=ye.eatWhile(/[\d]/)&&ye.eat(";"):ti=ye.eatWhile(/[\w\.\-:]/)&&ye.eat(";"),ti?"atom":"error"}else return ye.eatWhile(/[^&<]/),null}Se.isInText=!0;function xn(ye,on){var pn=ye.next();if(pn==">"||pn=="/"&&ye.eat(">"))return on.tokenize=Se,se=pn==">"?"endTag":"selfcloseTag","tag bracket";if(pn=="=")return se="equals",null;if(pn=="<"){on.tokenize=Se,on.state=yt,on.tagName=on.tagStart=null;var Vn=on.tokenize(ye,on);return Vn?Vn+" tag error":"tag error"}else return/[\'\"]/.test(pn)?(on.tokenize=Ut(pn),on.stringStartCol=ye.column(),on.tokenize(ye,on)):(ye.match(/^[^\s\u00a0=<>\"\']*[^\s\u00a0=<>\"\'\/]/),"word")}function Ut(ye){var on=function(pn,Vn){for(;!pn.eol();)if(pn.next()==ye){Vn.tokenize=xn;break}return"string"};return on.isInAttribute=!0,on}function et(ye,on){return function(pn,Vn){for(;!pn.eol();){if(pn.match(on)){Vn.tokenize=Se;break}pn.next()}return ye}}function nt(ye){return function(on,pn){for(var Vn;(Vn=on.next())!=null;){if(Vn=="<")return pn.tokenize=nt(ye+1),pn.tokenize(on,pn);if(Vn==">")if(ye==1){pn.tokenize=Se;break}else return pn.tokenize=nt(ye-1),pn.tokenize(on,pn)}return"meta"}}function ct(ye,on,pn){this.prev=ye.context,this.tagName=on,this.indent=ye.indented,this.startOfLine=pn,(ve.doNotIndent.hasOwnProperty(on)||ye.context&&ye.context.noIndent)&&(this.noIndent=!0)}function lt(ye){ye.context&&(ye.context=ye.context.prev)}function gt(ye,on){for(var pn;;){if(!ye.context||(pn=ye.context.tagName,!ve.contextGrabbers.hasOwnProperty(pn)||!ve.contextGrabbers[pn].hasOwnProperty(on)))return;lt(ye)}}function yt(ye,on,pn){return ye=="openTag"?(pn.tagStart=on.column(),Lt):ye=="closeTag"?It:yt}function Lt(ye,on,pn){return ye=="word"?(pn.tagName=on.current(),hn="tag",he):ve.allowMissingTagName&&ye=="endTag"?(hn="tag bracket",he(ye,on,pn)):(hn="error",Lt)}function It(ye,on,pn){if(ye=="word"){var Vn=on.current();return pn.context&&pn.context.tagName!=Vn&&ve.implicitlyClosed.hasOwnProperty(pn.context.tagName)&&lt(pn),pn.context&&pn.context.tagName==Vn||ve.matchClosing===!1?(hn="tag",Wt):(hn="tag error",qt)}else return ve.allowMissingTagName&&ye=="endTag"?(hn="tag bracket",Wt(ye,on,pn)):(hn="error",qt)}function Wt(ye,on,pn){return ye!="endTag"?(hn="error",Wt):(lt(pn),yt)}function qt(ye,on,pn){return hn="error",Wt(ye,on,pn)}function he(ye,on,pn){if(ye=="word")return hn="attribute",fe;if(ye=="endTag"||ye=="selfcloseTag"){var Vn=pn.tagName,ti=pn.tagStart;return pn.tagName=pn.tagStart=null,ye=="selfcloseTag"||ve.autoSelfClosers.hasOwnProperty(Vn)?gt(pn,Vn):(gt(pn,Vn),pn.context=new ct(pn,Vn,ti==pn.indented)),yt}return hn="error",he}function fe(ye,on,pn){return ye=="equals"?Ae:(ve.allowMissing||(hn="error"),he(ye,on,pn))}function Ae(ye,on,pn){return ye=="string"?Ve:ye=="word"&&ve.allowUnquoted?(hn="string",he):(hn="error",he(ye,on,pn))}function Ve(ye,on,pn){return ye=="string"?Ve:he(ye,on,pn)}return{startState:function(ye){var on={tokenize:Se,state:yt,indented:ye||0,tagName:null,tagStart:null,context:null};return ye!=null&&(on.baseIndent=ye),on},token:function(ye,on){if(!on.tagName&&ye.sol()&&(on.indented=ye.indentation()),ye.eatSpace())return null;se=null;var pn=on.tokenize(ye,on);return(pn||se)&&pn!="comment"&&(hn=null,on.state=on.state(se||pn,ye,on),hn&&(pn=hn=="error"?pn+" error":hn)),pn},indent:function(ye,on,pn){var Vn=ye.context;if(ye.tokenize.isInAttribute)return ye.tagStart==ye.indented?ye.stringStartCol+1:ye.indented+we;if(Vn&&Vn.noIndent)return bt.Pass;if(ye.tokenize!=xn&&ye.tokenize!=Se)return pn?pn.match(/^(\s*)/)[0].length:0;if(ye.tagName)return ve.multilineTagIndentPastTag!==!1?ye.tagStart+ye.tagName.length+2:ye.tagStart+we*(ve.multilineTagIndentFactor||1);if(ve.alignCDATA&&/<!\[CDATA\[/.test(on))return 0;var ti=on&&/^<(\/)?([\w_:\.-]*)/.exec(on);if(ti&&ti[1])for(;Vn;)if(Vn.tagName==ti[2]){Vn=Vn.prev;break}else if(ve.implicitlyClosed.hasOwnProperty(Vn.tagName))Vn=Vn.prev;else break;else if(ti)for(;Vn;){var Xn=ve.contextGrabbers[Vn.tagName];if(Xn&&Xn.hasOwnProperty(ti[2]))Vn=Vn.prev;else break}for(;Vn&&Vn.prev&&!Vn.startOfLine;)Vn=Vn.prev;return Vn?Vn.indent+we:ye.baseIndent||0},electricInput:/<\/[\s\w:]+>$/,blockCommentStart:"<!--",blockCommentEnd:"-->",configuration:ve.htmlMode?"html":"xml",helperType:ve.htmlMode?"html":"xml",skipAttribute:function(ye){ye.state==Ae&&(ye.state=he)},xmlCurrentTag:function(ye){return ye.tagName?{name:ye.tagName,close:ye.type=="closeTag"}:null},xmlCurrentContext:function(ye){for(var on=[],pn=ye.context;pn;pn=pn.prev)pn.tagName&&on.push(pn.tagName);return on.reverse()}}}),bt.defineMIME("text/xml","xml"),bt.defineMIME("application/xml","xml"),bt.mimeModes.hasOwnProperty("text/html")||bt.defineMIME("text/html",{name:"xml",htmlMode:!0})})},6330:function(Cn,mi,ne){"use strict";ne.d(mi,{HT:function(){return hi},iZ:function(){return Ie}});var bt={},Be=function(Jt,$t,Vt,Te,le){var nn=new Worker(bt[$t]||(bt[$t]=URL.createObjectURL(new Blob([Jt+';addEventListener("error",function(e){e=e.error;postMessage({$e$:[e.message,e.code,e.stack]})})'],{type:"text/javascript"}))));return nn.onmessage=function(_n){var On=_n.data,vi=On.$e$;if(vi){var Gn=new Error(vi[0]);Gn.code=vi[1],Gn.stack=vi[2],le(Gn,null)}else le(null,On)},nn.postMessage(Vt,Te),nn},Ee=Uint8Array,Ze=Uint16Array,Fe=Int32Array,we=new Ee([0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0,0,0,0]),ve=new Ee([0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13,0,0]),Qe=new Ee([16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15]),ge=function(Jt,$t){for(var Vt=new Ze(31),Te=0;Te<31;++Te)Vt[Te]=$t+=1<<Jt[Te-1];for(var le=new Fe(Vt[30]),Te=1;Te<30;++Te)for(var nn=Vt[Te];nn<Vt[Te+1];++nn)le[nn]=nn-Vt[Te]<<5|Te;return{b:Vt,r:le}},se=ge(we,2),hn=se.b,Se=se.r;hn[28]=258,Se[258]=28;for(var xn=ge(ve,0),Ut=xn.b,et=xn.r,nt=new Ze(32768),ct=0;ct<32768;++ct){var lt=(ct&43690)>>1|(ct&21845)<<1;lt=(lt&52428)>>2|(lt&13107)<<2,lt=(lt&61680)>>4|(lt&3855)<<4,nt[ct]=((lt&65280)>>8|(lt&255)<<8)>>1}for(var gt=function(Jt,$t,Vt){for(var Te=Jt.length,le=0,nn=new Ze($t);le<Te;++le)Jt[le]&&++nn[Jt[le]-1];var _n=new Ze($t);for(le=1;le<$t;++le)_n[le]=_n[le-1]+nn[le-1]<<1;var On;if(Vt){On=new Ze(1<<$t);var vi=15-$t;for(le=0;le<Te;++le)if(Jt[le])for(var Gn=le<<4|Jt[le],fn=$t-Jt[le],Wn=_n[Jt[le]-1]++<<fn,Vi=Wn|(1<<fn)-1;Wn<=Vi;++Wn)On[nt[Wn]>>vi]=Gn}else for(On=new Ze(Te),le=0;le<Te;++le)Jt[le]&&(On[le]=nt[_n[Jt[le]-1]++]>>15-Jt[le]);return On},yt=new Ee(288),ct=0;ct<144;++ct)yt[ct]=8;for(var ct=144;ct<256;++ct)yt[ct]=9;for(var ct=256;ct<280;++ct)yt[ct]=7;for(var ct=280;ct<288;++ct)yt[ct]=8;for(var Lt=new Ee(32),ct=0;ct<32;++ct)Lt[ct]=5;var It=gt(yt,9,0),Wt=gt(yt,9,1),qt=gt(Lt,5,0),he=gt(Lt,5,1),fe=function(Jt){for(var $t=Jt[0],Vt=1;Vt<Jt.length;++Vt)Jt[Vt]>$t&&($t=Jt[Vt]);return $t},Ae=function(Jt,$t,Vt){var Te=$t/8|0;return(Jt[Te]|Jt[Te+1]<<8)>>($t&7)&Vt},Ve=function(Jt,$t){var Vt=$t/8|0;return(Jt[Vt]|Jt[Vt+1]<<8|Jt[Vt+2]<<16)>>($t&7)},ye=function(Jt){return(Jt+7)/8|0},on=function(Jt,$t,Vt){return($t==null||$t<0)&&($t=0),(Vt==null||Vt>Jt.length)&&(Vt=Jt.length),new Ee(Jt.subarray($t,Vt))},pn={UnexpectedEOF:0,InvalidBlockType:1,InvalidLengthLiteral:2,InvalidDistance:3,StreamFinished:4,NoStreamHandler:5,InvalidHeader:6,NoCallback:7,InvalidUTF8:8,ExtraFieldTooLong:9,InvalidDate:10,FilenameTooLong:11,StreamFinishing:12,InvalidZipData:13,UnknownCompressionMethod:14},Vn=["unexpected EOF","invalid block type","invalid length/literal","invalid distance","stream finished","no stream handler",,"no callback","invalid UTF-8 data","extra field too long","date not in range 1980-2099","filename too long","stream finishing","invalid zip data"],ti=function(Jt,$t,Vt){var Te=new Error($t||Vn[Jt]);if(Te.code=Jt,Error.captureStackTrace&&Error.captureStackTrace(Te,ti),!Vt)throw Te;return Te},Xn=function(Jt,$t,Vt,Te){var le=Jt.length,nn=Te?Te.length:0;if(!le||$t.f&&!$t.l)return Vt||new Ee(0);var _n=!Vt,On=_n||$t.i!=2,vi=$t.i;_n&&(Vt=new Ee(le*3));var Gn=function(Da){var Kr=Vt.length;if(Da>Kr){var Ro=new Ee(Math.max(Kr*2,Da));Ro.set(Vt),Vt=Ro}},fn=$t.f||0,Wn=$t.p||0,Vi=$t.b||0,Wi=$t.l,yn=$t.d,Ot=$t.m,Ni=$t.n,br=le*8;do{if(!Wi){fn=Ae(Jt,Wn,1);var zr=Ae(Jt,Wn+1,3);if(Wn+=3,zr)if(zr==1)Wi=Wt,yn=he,Ot=9,Ni=5;else if(zr==2){var ai=Ae(Jt,Wn,31)+257,Fi=Ae(Jt,Wn+10,15)+4,In=ai+Ae(Jt,Wn+5,31)+1;Wn+=14;for(var ni=new Ee(In),$n=new Ee(19),Tn=0;Tn<Fi;++Tn)$n[Qe[Tn]]=Ae(Jt,Wn+Tn*3,7);Wn+=Fi*3;for(var fi=fe($n),Xe=(1<<fi)-1,nr=gt($n,fi,1),Tn=0;Tn<In;){var mr=nr[Ae(Jt,Wn,Xe)];Wn+=mr&15;var xr=mr>>4;if(xr<16)ni[Tn++]=xr;else{var Or=0,ir=0;for(xr==16?(ir=3+Ae(Jt,Wn,3),Wn+=2,Or=ni[Tn-1]):xr==17?(ir=3+Ae(Jt,Wn,7),Wn+=3):xr==18&&(ir=11+Ae(Jt,Wn,127),Wn+=7);ir--;)ni[Tn++]=Or}}var jr=ni.subarray(0,ai),Vr=ni.subarray(ai);Ot=fe(jr),Ni=fe(Vr),Wi=gt(jr,Ot,1),yn=gt(Vr,Ni,1)}else ti(1);else{var xr=ye(Wn)+4,ki=Jt[xr-4]|Jt[xr-3]<<8,Kn=xr+ki;if(Kn>le){vi&&ti(0);break}On&&Gn(Vi+ki),Vt.set(Jt.subarray(xr,Kn),Vi),$t.b=Vi+=ki,$t.p=Wn=Kn*8,$t.f=fn;continue}if(Wn>br){vi&&ti(0);break}}On&&Gn(Vi+131072);for(var Ho=(1<<Ot)-1,so=(1<<Ni)-1,To=Wn;;To=Wn){var Or=Wi[Ve(Jt,Wn)&Ho],uo=Or>>4;if(Wn+=Or&15,Wn>br){vi&&ti(0);break}if(Or||ti(2),uo<256)Vt[Vi++]=uo;else if(uo==256){To=Wn,Wi=null;break}else{var Me=uo-254;if(uo>264){var Tn=uo-257,ho=we[Tn];Me=Ae(Jt,Wn,(1<<ho)-1)+hn[Tn],Wn+=ho}var ls=yn[Ve(Jt,Wn)&so],ks=ls>>4;ls||ti(3),Wn+=ls&15;var Vr=Ut[ks];if(ks>3){var ho=ve[ks];Vr+=Ve(Jt,Wn)&(1<<ho)-1,Wn+=ho}if(Wn>br){vi&&ti(0);break}On&&Gn(Vi+131072);var ao=Vi+Me;if(Vi<Vr){var xa=nn-Vr,ta=Math.min(Vr,ao);for(xa+Vi<0&&ti(3);Vi<ta;++Vi)Vt[Vi]=Te[xa+Vi]}for(;Vi<ao;++Vi)Vt[Vi]=Vt[Vi-Vr]}}$t.l=Wi,$t.p=To,$t.b=Vi,$t.f=fn,Wi&&(fn=1,$t.m=Ot,$t.d=yn,$t.n=Ni)}while(!fn);return Vi!=Vt.length&&_n?on(Vt,0,Vi):Vt.subarray(0,Vi)},Li=function(Jt,$t,Vt){Vt<<=$t&7;var Te=$t/8|0;Jt[Te]|=Vt,Jt[Te+1]|=Vt>>8},Ii=function(Jt,$t,Vt){Vt<<=$t&7;var Te=$t/8|0;Jt[Te]|=Vt,Jt[Te+1]|=Vt>>8,Jt[Te+2]|=Vt>>16},ue=function(Jt,$t){for(var Vt=[],Te=0;Te<Jt.length;++Te)Jt[Te]&&Vt.push({s:Te,f:Jt[Te]});var le=Vt.length,nn=Vt.slice();if(!le)return{t:qn,l:0};if(le==1){var _n=new Ee(Vt[0].s+1);return _n[Vt[0].s]=1,{t:_n,l:1}}Vt.sort(function(Kn,ai){return Kn.f-ai.f}),Vt.push({s:-1,f:25001});var On=Vt[0],vi=Vt[1],Gn=0,fn=1,Wn=2;for(Vt[0]={s:-1,f:On.f+vi.f,l:On,r:vi};fn!=le-1;)On=Vt[Vt[Gn].f<Vt[Wn].f?Gn++:Wn++],vi=Vt[Gn!=fn&&Vt[Gn].f<Vt[Wn].f?Gn++:Wn++],Vt[fn++]={s:-1,f:On.f+vi.f,l:On,r:vi};for(var Vi=nn[0].s,Te=1;Te<le;++Te)nn[Te].s>Vi&&(Vi=nn[Te].s);var Wi=new Ze(Vi+1),yn=jt(Vt[fn-1],Wi,0);if(yn>$t){var Te=0,Ot=0,Ni=yn-$t,br=1<<Ni;for(nn.sort(function(ai,Fi){return Wi[Fi.s]-Wi[ai.s]||ai.f-Fi.f});Te<le;++Te){var zr=nn[Te].s;if(Wi[zr]>$t)Ot+=br-(1<<yn-Wi[zr]),Wi[zr]=$t;else break}for(Ot>>=Ni;Ot>0;){var xr=nn[Te].s;Wi[xr]<$t?Ot-=1<<$t-Wi[xr]++-1:++Te}for(;Te>=0&&Ot;--Te){var ki=nn[Te].s;Wi[ki]==$t&&(--Wi[ki],++Ot)}yn=$t}return{t:new Ee(Wi),l:yn}},jt=function(Jt,$t,Vt){return Jt.s==-1?Math.max(jt(Jt.l,$t,Vt+1),jt(Jt.r,$t,Vt+1)):$t[Jt.s]=Vt},En=function(Jt){for(var $t=Jt.length;$t&&!Jt[--$t];);for(var Vt=new Ze(++$t),Te=0,le=Jt[0],nn=1,_n=function(vi){Vt[Te++]=vi},On=1;On<=$t;++On)if(Jt[On]==le&&On!=$t)++nn;else{if(!le&&nn>2){for(;nn>138;nn-=138)_n(32754);nn>2&&(_n(nn>10?nn-11<<5|28690:nn-3<<5|12305),nn=0)}else if(nn>3){for(_n(le),--nn;nn>6;nn-=6)_n(8304);nn>2&&(_n(nn-3<<5|8208),nn=0)}for(;nn--;)_n(le);nn=1,le=Jt[On]}return{c:Vt.subarray(0,Te),n:$t}},Si=function(Jt,$t){for(var Vt=0,Te=0;Te<$t.length;++Te)Vt+=Jt[Te]*$t[Te];return Vt},pi=function(Jt,$t,Vt){var Te=Vt.length,le=ye($t+2);Jt[le]=Te&255,Jt[le+1]=Te>>8,Jt[le+2]=Jt[le]^255,Jt[le+3]=Jt[le+1]^255;for(var nn=0;nn<Te;++nn)Jt[le+nn+4]=Vt[nn];return(le+4+Te)*8},Ke=function(Jt,$t,Vt,Te,le,nn,_n,On,vi,Gn,fn){Li($t,fn++,Vt),++le[256];for(var Wn=ue(le,15),Vi=Wn.t,Wi=Wn.l,yn=ue(nn,15),Ot=yn.t,Ni=yn.l,br=En(Vi),zr=br.c,xr=br.n,ki=En(Ot),Kn=ki.c,ai=ki.n,Fi=new Ze(19),In=0;In<zr.length;++In)++Fi[zr[In]&31];for(var In=0;In<Kn.length;++In)++Fi[Kn[In]&31];for(var ni=ue(Fi,7),$n=ni.t,Tn=ni.l,fi=19;fi>4&&!$n[Qe[fi-1]];--fi);var Xe=Gn+5<<3,nr=Si(le,yt)+Si(nn,Lt)+_n,mr=Si(le,Vi)+Si(nn,Ot)+_n+14+3*fi+Si(Fi,$n)+2*Fi[16]+3*Fi[17]+7*Fi[18];if(vi>=0&&Xe<=nr&&Xe<=mr)return pi($t,fn,Jt.subarray(vi,vi+Gn));var Or,ir,jr,Vr;if(Li($t,fn,1+(mr<nr)),fn+=2,mr<nr){Or=gt(Vi,Wi,0),ir=Vi,jr=gt(Ot,Ni,0),Vr=Ot;var Ho=gt($n,Tn,0);Li($t,fn,xr-257),Li($t,fn+5,ai-1),Li($t,fn+10,fi-4),fn+=14;for(var In=0;In<fi;++In)Li($t,fn+3*In,$n[Qe[In]]);fn+=3*fi;for(var so=[zr,Kn],To=0;To<2;++To)for(var uo=so[To],In=0;In<uo.length;++In){var Me=uo[In]&31;Li($t,fn,Ho[Me]),fn+=$n[Me],Me>15&&(Li($t,fn,uo[In]>>5&127),fn+=uo[In]>>12)}}else Or=It,ir=yt,jr=qt,Vr=Lt;for(var In=0;In<On;++In){var ho=Te[In];if(ho>255){var Me=ho>>18&31;Ii($t,fn,Or[Me+257]),fn+=ir[Me+257],Me>7&&(Li($t,fn,ho>>23&31),fn+=we[Me]);var ls=ho&31;Ii($t,fn,jr[ls]),fn+=Vr[ls],ls>3&&(Ii($t,fn,ho>>5&8191),fn+=ve[ls])}else Ii($t,fn,Or[ho]),fn+=ir[ho]}return Ii($t,fn,Or[256]),fn+ir[256]},Pn=new Fe([65540,131080,131088,131104,262176,1048704,1048832,2114560,2117632]),qn=new Ee(0),xi=function(Jt,$t,Vt,Te,le,nn){var _n=nn.z||Jt.length,On=new Ee(Te+_n+5*(1+Math.ceil(_n/7e3))+le),vi=On.subarray(Te,On.length-le),Gn=nn.l,fn=(nn.r||0)&7;if($t){fn&&(vi[0]=nn.r>>3);for(var Wn=Pn[$t-1],Vi=Wn>>13,Wi=Wn&8191,yn=(1<<Vt)-1,Ot=nn.p||new Ze(32768),Ni=nn.h||new Ze(yn+1),br=Math.ceil(Vt/3),zr=2*br,xr=function(Vs){return(Jt[Vs]^Jt[Vs+1]<<br^Jt[Vs+2]<<zr)&yn},ki=new Fe(25e3),Kn=new Ze(288),ai=new Ze(32),Fi=0,In=0,ni=nn.i||0,$n=0,Tn=nn.w||0,fi=0;ni+2<_n;++ni){var Xe=xr(ni),nr=ni&32767,mr=Ni[Xe];if(Ot[nr]=mr,Ni[Xe]=nr,Tn<=ni){var Or=_n-ni;if((Fi>7e3||$n>24576)&&(Or>423||!Gn)){fn=Ke(Jt,vi,0,ki,Kn,ai,In,$n,fi,ni-fi,fn),$n=Fi=In=0,fi=ni;for(var ir=0;ir<286;++ir)Kn[ir]=0;for(var ir=0;ir<30;++ir)ai[ir]=0}var jr=2,Vr=0,Ho=Wi,so=nr-mr&32767;if(Or>2&&Xe==xr(ni-so))for(var To=Math.min(Vi,Or)-1,uo=Math.min(32767,ni),Me=Math.min(258,Or);so<=uo&&--Ho&&nr!=mr;){if(Jt[ni+jr]==Jt[ni+jr-so]){for(var ho=0;ho<Me&&Jt[ni+ho]==Jt[ni+ho-so];++ho);if(ho>jr){if(jr=ho,Vr=so,ho>To)break;for(var ls=Math.min(so,ho-2),ks=0,ir=0;ir<ls;++ir){var ao=ni-so+ir&32767,xa=Ot[ao],ta=ao-xa&32767;ta>ks&&(ks=ta,mr=ao)}}}nr=mr,mr=Ot[nr],so+=nr-mr&32767}if(Vr){ki[$n++]=268435456|Se[jr]<<18|et[Vr];var Da=Se[jr]&31,Kr=et[Vr]&31;In+=we[Da]+ve[Kr],++Kn[257+Da],++ai[Kr],Tn=ni+jr,++Fi}else ki[$n++]=Jt[ni],++Kn[Jt[ni]]}}for(ni=Math.max(ni,Tn);ni<_n;++ni)ki[$n++]=Jt[ni],++Kn[Jt[ni]];fn=Ke(Jt,vi,Gn,ki,Kn,ai,In,$n,fi,ni-fi,fn),Gn||(nn.r=fn&7|vi[fn/8|0]<<3,fn-=7,nn.h=Ni,nn.p=Ot,nn.i=ni,nn.w=Tn)}else{for(var ni=nn.w||0;ni<_n+Gn;ni+=65535){var Ro=ni+65535;Ro>=_n&&(vi[fn/8|0]=Gn,Ro=_n),fn=pi(vi,fn+1,Jt.subarray(ni,Ro))}nn.i=_n}return on(On,0,Te+ye(fn)+le)},kn=null,Ce=function(){var Jt=-1;return{p:function($t){for(var Vt=Jt,Te=0;Te<$t.length;++Te)Vt=kn[Vt&255^$t[Te]]^Vt>>>8;Jt=Vt},d:function(){return~Jt}}},Ge=function(){var Jt=1,$t=0;return{p:function(Vt){for(var Te=Jt,le=$t,nn=Vt.length|0,_n=0;_n!=nn;){for(var On=Math.min(_n+2655,nn);_n<On;++_n)le+=Te+=Vt[_n];Te=(Te&65535)+15*(Te>>16),le=(le&65535)+15*(le>>16)}Jt=Te,$t=le},d:function(){return Jt%=65521,$t%=65521,(Jt&255)<<24|(Jt&65280)<<8|($t&255)<<8|$t>>8}}},gi=function(Jt,$t,Vt,Te,le){if(!le&&(le={l:1},$t.dictionary)){var nn=$t.dictionary.subarray(-32768),_n=new Ee(nn.length+Jt.length);_n.set(nn),_n.set(Jt,nn.length),Jt=_n,le.w=nn.length}return xi(Jt,$t.level==null?6:$t.level,$t.mem==null?le.l?Math.ceil(Math.max(8,Math.min(13,Math.log(Jt.length)))*1.5):20:12+$t.mem,Vt,Te,le)},yi=function(Jt,$t){var Vt={};for(var Te in Jt)Vt[Te]=Jt[Te];for(var Te in $t)Vt[Te]=$t[Te];return Vt},Ht=function(Jt,$t,Vt){for(var Te=Jt(),le=Jt.toString(),nn=le.slice(le.indexOf("[")+1,le.lastIndexOf("]")).replace(/\s+/g,"").split(","),_n=0;_n<Te.length;++_n){var On=Te[_n],vi=nn[_n];if(typeof On=="function"){$t+=";"+vi+"=";var Gn=On.toString();if(On.prototype)if(Gn.indexOf("[native code]")!=-1){var fn=Gn.indexOf(" ",8)+1;$t+=Gn.slice(fn,Gn.indexOf("(",fn))}else{$t+=Gn;for(var Wn in On.prototype)$t+=";"+vi+".prototype."+Wn+"="+On.prototype[Wn].toString()}else $t+=Gn}else Vt[vi]=On}return $t},Et=null,Ct=function(Jt){var $t=[];for(var Vt in Jt)Jt[Vt].buffer&&$t.push((Jt[Vt]=new Jt[Vt].constructor(Jt[Vt])).buffer);return $t},Nt=function(Jt,$t,Vt,Te){if(!Et[Vt]){for(var le="",nn={},_n=Jt.length-1,On=0;On<_n;++On)le=Ht(Jt[On],le,nn);Et[Vt]={c:Ht(Jt[_n],le,nn),e:nn}}var vi=yi({},Et[Vt].e);return Be(Et[Vt].c+";onmessage=function(e){for(var k in e.data)self[k]=e.data[k];onmessage="+$t.toString()+"}",Vt,vi,Ct(vi),Te)},Kt=function(){return[Ee,Ze,Fe,we,ve,Qe,hn,Ut,Wt,he,nt,Vn,gt,fe,Ae,Ve,ye,on,ti,Xn,oo,rn,Oe]},kt=function(){return[Ee,Ze,Fe,we,ve,Qe,Se,et,It,yt,qt,Lt,nt,Pn,qn,gt,Li,Ii,ue,jt,En,Si,pi,Ke,ye,on,xi,gi,no,rn]},be=function(){return[Zi,ar,Ai,Ce,kn]},An=function(){return[tr,ro]},ze=function(){return[pr,Ai,Ge]},Je=function(){return[wr]},rn=function(Jt){return postMessage(Jt,[Jt.buffer])},Oe=function(Jt){return Jt&&{out:Jt.size&&new Ee(Jt.size),dictionary:Jt.dictionary}},mn=function(Jt,$t,Vt,Te,le,nn){var _n=Nt(Vt,Te,le,function(On,vi){_n.terminate(),nn(On,vi)});return _n.postMessage([Jt,$t],$t.consume?[Jt.buffer]:[]),function(){_n.terminate()}},cn=function(Jt){return Jt.ondata=function($t,Vt){return postMessage([$t,Vt],[$t.buffer])},function($t){$t.data.length?(Jt.push($t.data[0],$t.data[1]),postMessage([$t.data[0].length])):Jt.flush()}},Mn=function(Jt,$t,Vt,Te,le,nn,_n){var On,vi=Nt(Jt,Te,le,function(Gn,fn){Gn?(vi.terminate(),$t.ondata.call($t,Gn)):Array.isArray(fn)?fn.length==1?($t.queuedSize-=fn[0],$t.ondrain&&$t.ondrain(fn[0])):(fn[1]&&vi.terminate(),$t.ondata.call($t,Gn,fn[0],fn[1])):_n(fn)});vi.postMessage(Vt),$t.queuedSize=0,$t.push=function(Gn,fn){$t.ondata||ti(5),On&&$t.ondata(ti(4,0,1),null,!!fn),$t.queuedSize+=Gn.length,vi.postMessage([Gn,On=fn],[Gn.buffer])},$t.terminate=function(){vi.terminate()},nn&&($t.flush=function(){vi.postMessage([])})},zn=function(Jt,$t){return Jt[$t]|Jt[$t+1]<<8},dn=function(Jt,$t){return(Jt[$t]|Jt[$t+1]<<8|Jt[$t+2]<<16|Jt[$t+3]<<24)>>>0},oi=function(Jt,$t){return dn(Jt,$t)+dn(Jt,$t+4)*4294967296},Ai=function(Jt,$t,Vt){for(;Vt;++$t)Jt[$t]=Vt,Vt>>>=8},Zi=function(Jt,$t){var Vt=$t.filename;if(Jt[0]=31,Jt[1]=139,Jt[2]=8,Jt[8]=$t.level<2?4:$t.level==9?2:0,Jt[9]=3,$t.mtime!=0&&Ai(Jt,4,Math.floor(new Date($t.mtime||Date.now())/1e3)),Vt){Jt[3]=8;for(var Te=0;Te<=Vt.length;++Te)Jt[Te+10]=Vt.charCodeAt(Te)}},tr=function(Jt){(Jt[0]!=31||Jt[1]!=139||Jt[2]!=8)&&ti(6,"invalid gzip data");var $t=Jt[3],Vt=10;$t&4&&(Vt+=(Jt[10]|Jt[11]<<8)+2);for(var Te=($t>>3&1)+($t>>4&1);Te>0;Te-=!Jt[Vt++]);return Vt+($t&2)},ro=function(Jt){var $t=Jt.length;return(Jt[$t-4]|Jt[$t-3]<<8|Jt[$t-2]<<16|Jt[$t-1]<<24)>>>0},ar=function(Jt){return 10+(Jt.filename?Jt.filename.length+1:0)},pr=function(Jt,$t){var Vt=$t.level,Te=Vt==0?0:Vt<6?1:Vt==9?3:2;if(Jt[0]=120,Jt[1]=Te<<6|($t.dictionary&&32),Jt[1]|=31-(Jt[0]<<8|Jt[1])%31,$t.dictionary){var le=Ge();le.p($t.dictionary),Ai(Jt,2,le.d())}},wr=function(Jt,$t){return((Jt[0]&15)!=8||Jt[0]>>4>7||(Jt[0]<<8|Jt[1])%31)&&ti(6,"invalid zlib data"),(Jt[1]>>5&1)==+!$t&&ti(6,"invalid zlib data: "+(Jt[1]&32?"need":"unexpected")+" dictionary"),(Jt[1]>>3&4)+2};function mo(Jt,$t){return typeof Jt=="function"&&($t=Jt,Jt={}),this.ondata=$t,Jt}var Eo=null,Hr=null;function Ur(Jt,$t,Vt){return Vt||(Vt=$t,$t={}),typeof Vt!="function"&&ti(7),mn(Jt,$t,[kt],function(Te){return rn(no(Te.data[0],Te.data[1]))},0,Vt)}function no(Jt,$t){return gi(Jt,$t||{},0,0)}var _o=null,bo=null;function Mo(Jt,$t,Vt){return Vt||(Vt=$t,$t={}),typeof Vt!="function"&&ti(7),mn(Jt,$t,[Kt],function(Te){return rn(oo(Te.data[0],Oe(Te.data[1])))},1,Vt)}function oo(Jt,$t){return Xn(Jt,{i:2},$t&&$t.out,$t&&$t.dictionary)}var Er=null,Rr=null;function Pt(Jt,$t,Vt){return Vt||(Vt=$t,$t={}),typeof Vt!="function"&&ti(7),mn(Jt,$t,[kt,be,function(){return[er]}],function(Te){return rn(er(Te.data[0],Te.data[1]))},2,Vt)}function er(Jt,$t){$t||($t={});var Vt=Ce(),Te=Jt.length;Vt.p(Jt);var le=gi(Jt,$t,ar($t),8),nn=le.length;return Zi(le,$t),Ai(le,nn-8,Vt.d()),Ai(le,nn-4,Te),le}var Gr=null,si=null;function ui(Jt,$t,Vt){return Vt||(Vt=$t,$t={}),typeof Vt!="function"&&ti(7),mn(Jt,$t,[Kt,An,function(){return[Ci]}],function(Te){return rn(Ci(Te.data[0],Te.data[1]))},3,Vt)}function Ci(Jt,$t){var Vt=tr(Jt);return Vt+8>Jt.length&&ti(6,"invalid gzip data"),Xn(Jt.subarray(Vt,-8),{i:2},$t&&$t.out||new Ee(ro(Jt)),$t&&$t.dictionary)}var Ri=null,Tr=null;function Ue(Jt,$t,Vt){return Vt||(Vt=$t,$t={}),typeof Vt!="function"&&ti(7),mn(Jt,$t,[kt,ze,function(){return[Ie]}],function(Te){return rn(Ie(Te.data[0],Te.data[1]))},4,Vt)}function Ie(Jt,$t){$t||($t={});var Vt=Ge();Vt.p(Jt);var Te=gi(Jt,$t,$t.dictionary?6:2,4);return pr(Te,$t),Ai(Te,Te.length-4,Vt.d()),Te}var Le=null,We=null;function wi(Jt,$t,Vt){return Vt||(Vt=$t,$t={}),typeof Vt!="function"&&ti(7),mn(Jt,$t,[Kt,Je,function(){return[hi]}],function(Te){return rn(hi(Te.data[0],Oe(Te.data[1])))},5,Vt)}function hi(Jt,$t){return Xn(Jt.subarray(wr(Jt,$t&&$t.dictionary),-4),{i:2},$t&&$t.out,$t&&$t.dictionary)}var Yi=null,sn=null;function He(Jt,$t,Vt){return Vt||(Vt=$t,$t={}),typeof Vt!="function"&&ti(7),Jt[0]==31&&Jt[1]==139&&Jt[2]==8?ui(Jt,$t,Vt):(Jt[0]&15)!=8||Jt[0]>>4>7||(Jt[0]<<8|Jt[1])%31?Mo(Jt,$t,Vt):wi(Jt,$t,Vt)}function li(Jt,$t){return Jt[0]==31&&Jt[1]==139&&Jt[2]==8?Ci(Jt,$t):(Jt[0]&15)!=8||Jt[0]>>4>7||(Jt[0]<<8|Jt[1])%31?oo(Jt,$t):hi(Jt,$t)}var _i=function(Jt,$t,Vt,Te){for(var le in Jt){var nn=Jt[le],_n=$t+le,On=Te;Array.isArray(nn)&&(On=yi(Te,nn[1]),nn=nn[0]),nn instanceof Ee?Vt[_n]=[nn,On]:(Vt[_n+="/"]=[new Ee(0),On],_i(nn,_n,Vt,Te))}},un=typeof TextEncoder!="undefined"&&new TextEncoder,Yt=typeof TextDecoder!="undefined"&&new TextDecoder,de=0;try{Yt.decode(qn,{stream:!0}),de=1}catch(Jt){}var Sn=function(Jt){for(var $t="",Vt=0;;){var Te=Jt[Vt++],le=(Te>127)+(Te>223)+(Te>239);if(Vt+le>Jt.length)return{s:$t,r:on(Jt,Vt-1)};le?le==3?(Te=((Te&15)<<18|(Jt[Vt++]&63)<<12|(Jt[Vt++]&63)<<6|Jt[Vt++]&63)-65536,$t+=String.fromCharCode(55296|Te>>10,56320|Te&1023)):le&1?$t+=String.fromCharCode((Te&31)<<6|Jt[Vt++]&63):$t+=String.fromCharCode((Te&15)<<12|(Jt[Vt++]&63)<<6|Jt[Vt++]&63):$t+=String.fromCharCode(Te)}},wn=null,Ne=null;function Bn(Jt,$t){if($t){for(var Vt=new Ee(Jt.length),Te=0;Te<Jt.length;++Te)Vt[Te]=Jt.charCodeAt(Te);return Vt}if(un)return un.encode(Jt);for(var le=Jt.length,nn=new Ee(Jt.length+(Jt.length>>1)),_n=0,On=function(fn){nn[_n++]=fn},Te=0;Te<le;++Te){if(_n+5>nn.length){var vi=new Ee(_n+8+(le-Te<<1));vi.set(nn),nn=vi}var Gn=Jt.charCodeAt(Te);Gn<128||$t?On(Gn):Gn<2048?(On(192|Gn>>6),On(128|Gn&63)):Gn>55295&&Gn<57344?(Gn=65536+(Gn&1047552)|Jt.charCodeAt(++Te)&1023,On(240|Gn>>18),On(128|Gn>>12&63),On(128|Gn>>6&63),On(128|Gn&63)):(On(224|Gn>>12),On(128|Gn>>6&63),On(128|Gn&63))}return on(nn,0,_n)}function Ln(Jt,$t){if($t){for(var Vt="",Te=0;Te<Jt.length;Te+=16384)Vt+=String.fromCharCode.apply(null,Jt.subarray(Te,Te+16384));return Vt}else{if(Yt)return Yt.decode(Jt);var le=Sn(Jt),nn=le.s,Vt=le.r;return Vt.length&&ti(8),nn}}var bn=function(Jt){return Jt==1?3:Jt<6?2:Jt==9?1:0},ci=function(Jt,$t){return $t+30+zn(Jt,$t+26)+zn(Jt,$t+28)},Qn=function(Jt,$t,Vt){var Te=zn(Jt,$t+28),le=Ln(Jt.subarray($t+46,$t+46+Te),!(zn(Jt,$t+8)&2048)),nn=$t+46+Te,_n=dn(Jt,$t+20),On=Vt&&_n==4294967295?Dn(Jt,nn):[_n,dn(Jt,$t+24),dn(Jt,$t+42)],vi=On[0],Gn=On[1],fn=On[2];return[zn(Jt,$t+10),vi,Gn,le,nn+zn(Jt,$t+30)+zn(Jt,$t+32),fn]},Dn=function(Jt,$t){for(;zn(Jt,$t)!=1;$t+=4+zn(Jt,$t+2));return[oi(Jt,$t+12),oi(Jt,$t+4),oi(Jt,$t+20)]},Zn=function(Jt){var $t=0;if(Jt)for(var Vt in Jt){var Te=Jt[Vt].length;Te>65535&&ti(9),$t+=Te+4}return $t},rr=function(Jt,$t,Vt,Te,le,nn,_n,On){var vi=Te.length,Gn=Vt.extra,fn=On&&On.length,Wn=Zn(Gn);Ai(Jt,$t,_n!=null?33639248:67324752),$t+=4,_n!=null&&(Jt[$t++]=20,Jt[$t++]=Vt.os),Jt[$t]=20,$t+=2,Jt[$t++]=Vt.flag<<1|(nn<0&&8),Jt[$t++]=le&&8,Jt[$t++]=Vt.compression&255,Jt[$t++]=Vt.compression>>8;var Vi=new Date(Vt.mtime==null?Date.now():Vt.mtime),Wi=Vi.getFullYear()-1980;if((Wi<0||Wi>119)&&ti(10),Ai(Jt,$t,Wi<<25|Vi.getMonth()+1<<21|Vi.getDate()<<16|Vi.getHours()<<11|Vi.getMinutes()<<5|Vi.getSeconds()>>1),$t+=4,nn!=-1&&(Ai(Jt,$t,Vt.crc),Ai(Jt,$t+4,nn<0?-nn-2:nn),Ai(Jt,$t+8,Vt.size)),Ai(Jt,$t+12,vi),Ai(Jt,$t+14,Wn),$t+=16,_n!=null&&(Ai(Jt,$t,fn),Ai(Jt,$t+6,Vt.attrs),Ai(Jt,$t+10,_n),$t+=14),Jt.set(Te,$t),$t+=vi,Wn)for(var yn in Gn){var Ot=Gn[yn],Ni=Ot.length;Ai(Jt,$t,+yn),Ai(Jt,$t+2,Ni),Jt.set(Ot,$t+4),$t+=4+Ni}return fn&&(Jt.set(On,$t),$t+=fn),$t},Gi=function(Jt,$t,Vt,Te,le){Ai(Jt,$t,101010256),Ai(Jt,$t+8,Vt),Ai(Jt,$t+10,Vt),Ai(Jt,$t+12,Te),Ai(Jt,$t+16,le)},an=null,Nn=null,hr=null,Cr=null;function Yr(Jt,$t,Vt){Vt||(Vt=$t,$t={}),typeof Vt!="function"&&ti(7);var Te={};_i(Jt,"",Te,$t);var le=Object.keys(Te),nn=le.length,_n=0,On=0,vi=nn,Gn=new Array(nn),fn=[],Wn=function(){for(var Ni=0;Ni<fn.length;++Ni)fn[Ni]()},Vi=function(Ni,br){ji(function(){Vt(Ni,br)})};ji(function(){Vi=Vt});var Wi=function(){var Ni=new Ee(On+22),br=_n,zr=On-_n;On=0;for(var xr=0;xr<vi;++xr){var ki=Gn[xr];try{var Kn=ki.c.length;rr(Ni,On,ki,ki.f,ki.u,Kn);var ai=30+ki.f.length+Zn(ki.extra),Fi=On+ai;Ni.set(ki.c,Fi),rr(Ni,_n,ki,ki.f,ki.u,Kn,On,ki.m),_n+=16+ai+(ki.m?ki.m.length:0),On=Fi+Kn}catch(In){return Vi(In,null)}}Gi(Ni,_n,Gn.length,zr,br),Vi(null,Ni)};nn||Wi();for(var yn=function(Ni){var br=le[Ni],zr=Te[br],xr=zr[0],ki=zr[1],Kn=Ce(),ai=xr.length;Kn.p(xr);var Fi=Bn(br),In=Fi.length,ni=ki.comment,$n=ni&&Bn(ni),Tn=$n&&$n.length,fi=Zn(ki.extra),Xe=ki.level==0?0:8,nr=function(mr,Or){if(mr)Wn(),Vi(mr,null);else{var ir=Or.length;Gn[Ni]=yi(ki,{size:ai,crc:Kn.d(),c:Or,f:Fi,m:$n,u:In!=br.length||$n&&ni.length!=Tn,compression:Xe}),_n+=30+In+fi+ir,On+=76+2*(In+fi)+(Tn||0)+ir,--nn||Wi()}};if(In>65535&&nr(ti(11,0,1),null),!Xe)nr(null,xr);else if(ai<16e4)try{nr(null,no(xr,ki))}catch(mr){nr(mr,null)}else fn.push(Ur(xr,ki,nr))},Ot=0;Ot<vi;++Ot)yn(Ot);return Wn}function xe(Jt,$t){$t||($t={});var Vt={},Te=[];_i(Jt,"",Vt,$t);var le=0,nn=0;for(var _n in Vt){var On=Vt[_n],vi=On[0],Gn=On[1],fn=Gn.level==0?0:8,Wn=Bn(_n),Vi=Wn.length,Wi=Gn.comment,yn=Wi&&Bn(Wi),Ot=yn&&yn.length,Ni=Zn(Gn.extra);Vi>65535&&ti(11);var br=fn?no(vi,Gn):vi,zr=br.length,xr=Ce();xr.p(vi),Te.push(yi(Gn,{size:vi.length,crc:xr.d(),c:br,f:Wn,m:yn,u:Vi!=_n.length||yn&&Wi.length!=Ot,o:le,compression:fn})),le+=30+Vi+Ni+zr,nn+=76+2*(Vi+Ni)+(Ot||0)+zr}for(var ki=new Ee(nn+22),Kn=le,ai=nn-le,Fi=0;Fi<Te.length;++Fi){var Wn=Te[Fi];rr(ki,Wn.o,Wn,Wn.f,Wn.u,Wn.c.length);var In=30+Wn.f.length+Zn(Wn.extra);ki.set(Wn.c,Wn.o+In),rr(ki,le,Wn,Wn.f,Wn.u,Wn.c.length,Wn.o,Wn.m),le+=16+In+(Wn.m?Wn.m.length:0)}return Gi(ki,le,Te.length,ai,Kn),ki}var Jn=null,Pi=null,Hn=null,ur=null,ji=typeof queueMicrotask=="function"?queueMicrotask:typeof setTimeout=="function"?setTimeout:function(Jt){Jt()};function or(Jt,$t,Vt){Vt||(Vt=$t,$t={}),typeof Vt!="function"&&ti(7);var Te=[],le=function(){for(var Ni=0;Ni<Te.length;++Ni)Te[Ni]()},nn={},_n=function(Ni,br){ji(function(){Vt(Ni,br)})};ji(function(){_n=Vt});for(var On=Jt.length-22;dn(Jt,On)!=101010256;--On)if(!On||Jt.length-On>65558)return _n(ti(13,0,1),null),le;var vi=zn(Jt,On+8);if(vi){var Gn=vi,fn=dn(Jt,On+16),Wn=fn==4294967295||Gn==65535;if(Wn){var Vi=dn(Jt,On-12);Wn=dn(Jt,Vi)==101075792,Wn&&(Gn=vi=dn(Jt,Vi+32),fn=dn(Jt,Vi+48))}for(var Wi=$t&&$t.filter,yn=function(Ni){var br=Qn(Jt,fn,Wn),zr=br[0],xr=br[1],ki=br[2],Kn=br[3],ai=br[4],Fi=br[5],In=ci(Jt,Fi);fn=ai;var ni=function(Tn,fi){Tn?(le(),_n(Tn,null)):(fi&&(nn[Kn]=fi),--vi||_n(null,nn))};if(!Wi||Wi({name:Kn,size:xr,originalSize:ki,compression:zr}))if(!zr)ni(null,on(Jt,In,In+xr));else if(zr==8){var $n=Jt.subarray(In,In+xr);if(ki<524288||xr>.8*ki)try{ni(null,oo($n,{out:new Ee(ki)}))}catch(Tn){ni(Tn,null)}else Te.push(Mo($n,{size:ki},ni))}else ni(ti(14,"unknown compression type "+zr,1),null);else ni(null,null)},Ot=0;Ot<Gn;++Ot)yn(Ot)}else _n(null,{});return le}function cr(Jt,$t){for(var Vt={},Te=Jt.length-22;dn(Jt,Te)!=101010256;--Te)(!Te||Jt.length-Te>65558)&&ti(13);var le=zn(Jt,Te+8);if(!le)return{};var nn=dn(Jt,Te+16),_n=nn==4294967295||le==65535;if(_n){var On=dn(Jt,Te-12);_n=dn(Jt,On)==101075792,_n&&(le=dn(Jt,On+32),nn=dn(Jt,On+48))}for(var vi=$t&&$t.filter,Gn=0;Gn<le;++Gn){var fn=Qn(Jt,nn,_n),Wn=fn[0],Vi=fn[1],Wi=fn[2],yn=fn[3],Ot=fn[4],Ni=fn[5],br=ci(Jt,Ni);nn=Ot,(!vi||vi({name:yn,size:Vi,originalSize:Wi,compression:Wn}))&&(Wn?Wn==8?Vt[yn]=oo(Jt.subarray(br,br+Vi),{out:new Ee(Wi)}):ti(14,"unknown compression type "+Wn):Vt[yn]=on(Jt,br,br+Vi))}return Vt}},12378:function(Cn,mi,ne){"use strict";ne.d(mi,{$u:function(){return ge},BD:function(){return Ht},E9:function(){return Qe},FF:function(){return bo},FJ:function(){return yt},Hn:function(){return gt},KX:function(){return It},NB:function(){return rn},S0:function(){return Ge},UL:function(){return se},Vk:function(){return lt},Vm:function(){return mn},YI:function(){return gi},ZA:function(){return Ee},Zt:function(){return hn},al:function(){return kt},bn:function(){return Kt},bx:function(){return Et},g2:function(){return yi},h1:function(){return Ae},hD:function(){return pr},l4:function(){return we},rU:function(){return Oe},s_:function(){return Ct},uz:function(){return Je},z6:function(){return Se}}),Cn=ne.hmd(Cn),function(){var Pt;function er(a){var y=0;return function(){return y<a.length?{done:!1,value:a[y++]}:{done:!0}}}function Gr(a){var y=typeof Symbol!="undefined"&&Symbol.iterator&&a[Symbol.iterator];return y?y.call(a):{next:er(a)}}function si(a){for(var y,x=[];!(y=a.next()).done;)x.push(y.value);return x}var ui=typeof Object.create=="function"?Object.create:function(a){function y(){}return y.prototype=a,new y},Ci;if(typeof Object.setPrototypeOf=="function")Ci=Object.setPrototypeOf;else{var Ri;t:{var Tr={a:!0},Ue={};try{Ue.__proto__=Tr,Ri=Ue.a;break t}catch(a){}Ri=!1}Ci=Ri?function(a,y){if(a.__proto__=y,a.__proto__!==y)throw new TypeError(a+" is not extensible");return a}:null}var Ie=Ci;function Le(a,y){if(a.prototype=ui(y.prototype),a.prototype.constructor=a,Ie)Ie(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 We=typeof ne.g!="undefined"&&ne.g!=null?ne.g:self,wi=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},hi=typeof Object.defineProperties=="function"?Object.defineProperty:function(a,y,x){a!=Array.prototype&&a!=Object.prototype&&(a[y]=x.value)};function Yi(a,y){if(y){var x=We;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&&hi(x,a,{writable:!0,value:y})}}Yi("Object.assign",function(a){return a||wi}),Yi("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 sn=typeof globalThis=="object"&&globalThis||typeof ne.g=="object"&&ne.g.global===ne.g&&ne.g||typeof self=="object"&&self.self===self&&self||{};sn.requestAnimationFrame===void 0&&(sn.setImmediate===void 0?sn.requestAnimationFrame=function(a){sn.setTimeout(a,0)}:sn.requestAnimationFrame=sn.setImmediate);function He(){}function li(a,y){var x=-1;return function(){var E=this,b=arguments;x!==-1&&sn.clearTimeout(x),x=_i(function(){x=-1,a.apply(E,b)},y)}}function _i(a,y){return sn.setTimeout(a,y)}function un(a){return sn.document.createElement(a)}function Yt(a){throw Error(a)}function de(a,y){a="The object is frozen, so its properties cannot be set: "+a.toString(),y!==void 0&&(a+=" to value: "+y),Yt(a)}function Sn(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),Yt(x+" is not in the range "+y+": "+a)}function wn(a){sn.console&&sn.console.log(a)}function Ne(a){return typeof a=="object"&&a!==null}function Bn(a){return Array.isArray(a)||sn.NodeList&&a instanceof sn.NodeList||sn.HTMLCollection&&a instanceof sn.HTMLCollection}function Ln(a){return Array.prototype.slice.call(a)}function bn(a,y,x){Array.isArray(a)?y>=a.length?a.push(x):a.splice(y,0,x):Yt("Cannot insert an object into an HTMLCollection or NodeList: "+x+" at "+y)}function ci(a,y){Array.isArray(a)?y>=a.length?a.pop():a.splice(y,1):Yt("Cannot remove an object from an HTMLCollection or NodeList at "+y)}function Qn(){var a=Yr.pop();return a===void 0?[]:a}function Dn(a){a.length=0,Yr.push(a)}function Zn(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(Ne(a)&&a.constructor)return Zn(a.constructor);return typeof a}function rr(a){var y=a;return Ne(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 Gi(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 an(a,y,x){Object.defineProperty(lo.prototype,a,{get:y,set:x})}function Nn(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 hr=sn.navigator!==void 0&&0<sn.navigator.userAgent.indexOf("Trident/7"),Cr=sn.navigator!==void 0&&sn.navigator.platform!==void 0&&sn.navigator.platform.match(/(iPhone|iPod|iPad|Mac)/i)!==null,Yr=[];Object.freeze([]),He.className="Util",He.Dx="32ab5ff3b26f42dc0ed90f21472913b5",He.adym="gojs.net",He.vfo="28e645fdb266",He.className="Util";function xe(a,y,x){nn(this),this.j=a,this.xa=y,this.o=x}xe.prototype.toString=function(){return"EnumValue."+this.xa};function Jn(a,y){return y==null||y===""?null:a[y]}We.Object.defineProperties(xe.prototype,{classType:{get:function(){return this.j}},name:{get:function(){return this.xa}},value:{get:function(){return this.o}}}),xe.className="EnumValue";function Pi(){this.ew=[]}Pi.prototype.toString=function(){return this.ew.join("")},Pi.prototype.add=function(a){a!==""&&this.ew.push(a)},Pi.className="StringBuilder";function Hn(){}Hn.className="PropertyCollection";var ur={EA:!1,JA:!1,GA:!1,IA:!1,NA:!1,LA:!1,nx:!1,FA:null,trace:function(a){sn.console&&sn.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 ji(){}ji.prototype.reset=function(){},ji.prototype.next=function(){return!1},ji.prototype.Ad=function(){return!1},ji.prototype.first=function(){return null},ji.prototype.any=function(){return!1},ji.prototype.all=function(){return!0},ji.prototype.each=function(){return this},ji.prototype.map=function(){return this},ji.prototype.filter=function(){return this},ji.prototype.de=function(){},ji.prototype.toString=function(){return"EmptyIterator"},We.Object.defineProperties(ji.prototype,{iterator:{get:function(){return this}},count:{get:function(){return 0}}}),ji.prototype.first=ji.prototype.first,ji.prototype.hasNext=ji.prototype.Ad,ji.prototype.next=ji.prototype.next,ji.prototype.reset=ji.prototype.reset;var or=null;ji.className="EmptyIterator",or=new ji;function cr(a){this.key=-1,this.value=a}cr.prototype.reset=function(){this.key=-1},cr.prototype.next=function(){return this.key===-1?(this.key=0,!0):!1},cr.prototype.Ad=function(){return this.next()},cr.prototype.first=function(){return this.key=0,this.value},cr.prototype.any=function(a){return this.key=-1,a(this.value)},cr.prototype.all=function(a){return this.key=-1,a(this.value)},cr.prototype.each=function(a){return this.key=-1,a(this.value),this},cr.prototype.map=function(a){return new cr(a(this.value))},cr.prototype.filter=function(a){return a(this.value)?new cr(this.value):or},cr.prototype.de=function(){this.value=null},cr.prototype.toString=function(){return"SingletonIterator("+this.value+")"},We.Object.defineProperties(cr.prototype,{iterator:{get:function(){return this}},count:{get:function(){return 1}}}),cr.prototype.first=cr.prototype.first,cr.prototype.hasNext=cr.prototype.Ad,cr.prototype.next=cr.prototype.next,cr.prototype.reset=cr.prototype.reset,cr.className="SingletonIterator";function Jt(a){this.Bb=a,this.qf=null,a.Sa=null,this.qa=a.Ja,this.Za=-1}Jt.prototype.reset=function(){var a=this.Bb;a.Sa=null,this.qa=a.Ja,this.Za=-1},Jt.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},Jt.prototype.Ad=function(){return this.next()},Jt.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},Jt.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},Jt.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},Jt.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},Jt.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 Vt,a.s=x,a.xb(),a.iterator},Jt.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 Vt,a.s=x,a.xb(),a.iterator},Jt.prototype.de=function(){this.key=-1,this.value=null,this.qa=-1,this.qf=null,this.Bb.Sa=this},Jt.prototype.toString=function(){return"ListIterator@"+this.Za+"/"+this.Bb.count},We.Object.defineProperties(Jt.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}}}),Jt.prototype.first=Jt.prototype.first,Jt.prototype.hasNext=Jt.prototype.Ad,Jt.prototype.next=Jt.prototype.next,Jt.prototype.reset=Jt.prototype.reset,Jt.className="ListIterator";function $t(a){this.Bb=a,a.Hg=null,this.qa=a.Ja,this.Za=a.s.length}$t.prototype.reset=function(){var a=this.Bb;a.Hg=null,this.qa=a.Ja,this.Za=a.s.length},$t.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)},$t.prototype.Ad=function(){return this.next()},$t.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},$t.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},$t.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},$t.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},$t.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 Vt,a.s=x,a.xb(),a.iterator},$t.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 Vt,a.s=x,a.xb(),a.iterator},$t.prototype.de=function(){this.key=-1,this.value=null,this.qa=-1,this.Bb.Hg=this},$t.prototype.toString=function(){return"ListIteratorBackwards("+this.Za+"/"+this.Bb.count+")"},We.Object.defineProperties($t.prototype,{iterator:{get:function(){return this}},count:{get:function(){return this.Bb.s.length}}}),$t.prototype.first=$t.prototype.first,$t.prototype.hasNext=$t.prototype.Ad,$t.prototype.next=$t.prototype.next,$t.prototype.reset=$t.prototype.reset,$t.className="ListIteratorBackwards";function Vt(a){nn(this),this._isFrozen=!1,this.s=[],this.Ja=0,this.Hg=this.Sa=null,typeof a=="string"&&Yt("Error: Since 2.0 List/Map/Set constructors no longer take an argument that enforces type."),a!==void 0&&this.addAll(a)}Pt=Vt.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()#"+On(this)},Pt.add=function(a){return a===null?this:(this._isFrozen&&de(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&&de(this);var y=this.s;if(Bn(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&&de(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)&&Sn(a,"0 <= i < length",Vt,"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)&&Sn(a,"0 <= i < length",Vt,"setElt:i"),this._isFrozen&&de(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&&de(this);var a=this.s;return 0<a.length?a.pop():null},Vt.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},Vt.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},Vt.prototype.each=function(a){for(var y=this.s,x=y.length,E=0;E<x;E++)a(y[E]);return this},Vt.prototype.map=function(a){for(var y=new Vt,x=[],E=this.s,b=E.length,z=0;z<b;z++)x.push(a(E[z]));return y.s=x,y.xb(),y},Vt.prototype.filter=function(a){for(var y=new Vt,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=Vt.prototype,Pt.Gb=function(a,y){0>a&&Sn(a,">= 0",Vt,"insertAt:i"),this._isFrozen&&de(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&&de(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)&&Sn(a,"0 <= i < length",Vt,"removeAt:i"),this._isFrozen&&de(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&&de(this);for(var b=a,z=y+1;z<E;)x[b++]=x[z++];return x.length=E-(y-a+1),this.xb(),this},Vt.prototype.copy=function(){var a=new Vt,y=this.s;return 0<y.length&&(a.s=Array.prototype.slice.call(y)),a},Pt=Vt.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 le,y=this.s,x=this.count,E=0;E<x;E++)a.add(y[E]);return a},Pt.sort=function(a){return this._isFrozen&&de(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&&de(this);var z=x-y;if(1>=z)return this;if((0>y||y>=b-1)&&Sn(y,"0 <= from < length",Vt,"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&&de(this),this.s.reverse(),this.xb(),this},We.Object.defineProperties(Vt.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 or;var a=this.Sa;return a!==null?(a.reset(),a):new Jt(this)}},iteratorBackwards:{get:function(){if(0>=this.s.length)return or;var a=this.Hg;return a!==null?(a.reset(),a):new $t(this)}}}),Vt.prototype.reverse=Vt.prototype.reverse,Vt.prototype.sortRange=Vt.prototype.zi,Vt.prototype.sort=Vt.prototype.sort,Vt.prototype.toSet=Vt.prototype.Iv,Vt.prototype.toArray=Vt.prototype.Fa,Vt.prototype.removeRange=Vt.prototype.removeRange,Vt.prototype.removeAt=Vt.prototype.mb,Vt.prototype.delete=Vt.prototype.delete,Vt.prototype.remove=Vt.prototype.remove,Vt.prototype.insertAt=Vt.prototype.Gb,Vt.prototype.pop=Vt.prototype.pop,Vt.prototype.last=Vt.prototype.jc,Vt.prototype.first=Vt.prototype.first,Vt.prototype.set=Vt.prototype.set,Vt.prototype.setElt=Vt.prototype.cd,Vt.prototype.get=Vt.prototype.get,Vt.prototype.elt=Vt.prototype.M,Vt.prototype.indexOf=Vt.prototype.indexOf,Vt.prototype.has=Vt.prototype.has,Vt.prototype.contains=Vt.prototype.contains,Vt.prototype.clear=Vt.prototype.clear,Vt.prototype.addAll=Vt.prototype.addAll,Vt.prototype.push=Vt.prototype.push,Vt.prototype.add=Vt.prototype.add,Vt.prototype.thaw=Vt.prototype.ka,Vt.prototype.freeze=Vt.prototype.freeze,Vt.className="List";function Te(a){this.eg=a,a.Sa=null,this.qa=a.Ja,this.sa=null}Te.prototype.reset=function(){var a=this.eg;a.Sa=null,this.qa=a.Ja,this.sa=null},Te.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)},Te.prototype.Ad=function(){return this.next()},Te.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},Te.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},Te.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},Te.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},Te.prototype.map=function(a){var y=this.eg;y.Sa=null;var x=new Vt;for(y=y.ea;y!==null;)x.add(a(y.value)),y=y.va;return x.iterator},Te.prototype.filter=function(a){var y=this.eg;y.Sa=null;var x=new Vt;for(y=y.ea;y!==null;){var E=y.value;a(E)&&x.add(E),y=y.va}return x.iterator},Te.prototype.de=function(){this.value=this.key=null,this.qa=-1,this.eg.Sa=this},Te.prototype.toString=function(){return this.sa!==null?"SetIterator@"+this.sa.value:"SetIterator"},We.Object.defineProperties(Te.prototype,{iterator:{get:function(){return this}},count:{get:function(){return this.eg.Sb}}}),Te.prototype.first=Te.prototype.first,Te.prototype.hasNext=Te.prototype.Ad,Te.prototype.next=Te.prototype.next,Te.prototype.reset=Te.prototype.reset,Te.className="SetIterator";function le(a){nn(this),this._isFrozen=!1,this.Tb={},this.Sb=0,this.Sa=null,this.Ja=0,this.kf=this.ea=null,typeof a=="string"&&Yt("Error: Since 2.0 List/Map/Set constructors no longer take an argument that enforces type."),a!==void 0&&this.addAll(a)}Pt=le.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()#"+On(this)},Pt.add=function(a){if(a===null)return this;this._isFrozen&&de(this,a);var y=a;return Ne(a)&&(y=_n(a)),this.Tb[y]===void 0&&(this.Sb++,a=new Vi(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&&de(this),Bn(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 Ne(a)&&(y=On(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},le.prototype.any=function(a){for(var y=this.ea;y!==null;){if(a(y.value))return!0;y=y.va}return!1},le.prototype.all=function(a){for(var y=this.ea;y!==null;){if(!a(y.value))return!1;y=y.va}return!0},le.prototype.each=function(a){for(var y=this.ea;y!==null;)a(y.value),y=y.va;return this},le.prototype.map=function(a){for(var y=new le,x=this.ea;x!==null;)y.add(a(x.value)),x=x.va;return y},le.prototype.filter=function(a){for(var y=new le,x=this.ea;x!==null;){var E=x.value;a(E)&&y.add(E),x=x.va}return y},Pt=le.prototype,Pt.remove=function(a){if(a===null)return!1;this._isFrozen&&de(this,a);var y=a;if(Ne(a)&&(y=On(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&&de(this),Bn(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&&de(this);var y=new le;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&&de(this),this.Tb={},this.Sb=0,this.Sa!==null&&this.Sa.reset(),this.kf=this.ea=null,this.xb()},le.prototype.copy=function(){var a=new le,y=this.Tb,x;for(x in y)a.add(y[x].value);return a},le.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},le.prototype.Hv=function(){var a=new Vt,y=this.Tb,x;for(x in y)a.add(y[x].value);return a};function nn(a){a.__gohashid=vi++}function _n(a){var y=a.__gohashid;return y===void 0&&(y=vi++,a.__gohashid=y),y}function On(a){return a.__gohashid}We.Object.defineProperties(le.prototype,{count:{get:function(){return this.Sb}},size:{get:function(){return this.Sb}},iterator:{get:function(){if(0>=this.Sb)return or;var a=this.Sa;return a!==null?(a.reset(),a):new Te(this)}}}),le.prototype.toList=le.prototype.Hv,le.prototype.toArray=le.prototype.Fa,le.prototype.clear=le.prototype.clear,le.prototype.retainAll=le.prototype.pA,le.prototype.removeAll=le.prototype.hp,le.prototype.delete=le.prototype.delete,le.prototype.remove=le.prototype.remove,le.prototype.first=le.prototype.first,le.prototype.containsAny=le.prototype.Ty,le.prototype.containsAll=le.prototype.Sy,le.prototype.has=le.prototype.has,le.prototype.contains=le.prototype.contains,le.prototype.addAll=le.prototype.addAll,le.prototype.add=le.prototype.add,le.prototype.thaw=le.prototype.ka,le.prototype.freeze=le.prototype.freeze;var vi=1;le.className="Set",le.uniqueHash=nn,le.hashIdUnique=_n,le.hashId=On;function Gn(a){this.ma=a,this.qa=a.Ja,this.sa=null}Gn.prototype.reset=function(){this.qa=this.ma.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.value=this.key=a=y.key,!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.value=this.key=a=a.key):null},Gn.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},Gn.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},Gn.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},Gn.prototype.map=function(a){var y=this.ma;this.sa=null;var x=new Vt;for(y=y.ea;y!==null;)x.add(a(y.key)),y=y.va;return x.iterator},Gn.prototype.filter=function(a){var y=this.ma;this.sa=null;var x=new Vt;for(y=y.ea;y!==null;){var E=y.key;a(E)&&x.add(E),y=y.va}return x.iterator},Gn.prototype.de=function(){this.value=this.key=null,this.qa=-1},Gn.prototype.toString=function(){return this.sa!==null?"MapKeySetIterator@"+this.sa.value:"MapKeySetIterator"},We.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="MapKeySetIterator";function fn(a){le.call(this),nn(this),this._isFrozen=!0,this.ma=a}Le(fn,le),Pt=fn.prototype,Pt.freeze=function(){return this},Pt.ka=function(){return this},Pt.toString=function(){return"MapKeySet("+this.ma.toString()+")"},Pt.add=function(){Yt("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(){Yt("This Set is read-only: "+this.toString())},Pt.delete=function(a){return this.remove(a)},Pt.clear=function(){Yt("This Set is read-only: "+this.toString())},Pt.first=function(){var a=this.ma.ea;return a!==null?a.key:null},fn.prototype.any=function(a){for(var y=this.ma.ea;y!==null;){if(a(y.key))return!0;y=y.va}return!1},fn.prototype.all=function(a){for(var y=this.ma.ea;y!==null;){if(!a(y.key))return!1;y=y.va}return!0},fn.prototype.each=function(a){for(var y=this.ma.ea;y!==null;)a(y.key),y=y.va;return this},fn.prototype.map=function(a){for(var y=new le,x=this.ma.ea;x!==null;)y.add(a(x.key)),x=x.va;return y},fn.prototype.filter=function(a){for(var y=new le,x=this.ma.ea;x!==null;){var E=x.key;a(E)&&y.add(E),x=x.va}return y},fn.prototype.copy=function(){return new fn(this.ma)},fn.prototype.Iv=function(){var a=new le,y=this.ma.Tb,x;for(x in y)a.add(y[x].key);return a},fn.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},fn.prototype.Hv=function(){var a=new Vt,y=this.ma.Tb,x;for(x in y)a.add(y[x].key);return a},We.Object.defineProperties(fn.prototype,{count:{get:function(){return this.ma.Sb}},size:{get:function(){return this.ma.Sb}},iterator:{get:function(){return 0>=this.ma.Sb?or:new Gn(this.ma)}}}),fn.prototype.toList=fn.prototype.Hv,fn.prototype.toArray=fn.prototype.Fa,fn.prototype.toSet=fn.prototype.Iv,fn.prototype.first=fn.prototype.first,fn.prototype.clear=fn.prototype.clear,fn.prototype.delete=fn.prototype.delete,fn.prototype.remove=fn.prototype.remove,fn.prototype.has=fn.prototype.has,fn.prototype.contains=fn.prototype.contains,fn.prototype.add=fn.prototype.add,fn.prototype.thaw=fn.prototype.ka,fn.prototype.freeze=fn.prototype.freeze,fn.className="MapKeySet";function Wn(a){this.ma=a,a.jf=null,this.qa=a.Ja,this.sa=null}Wn.prototype.reset=function(){var a=this.ma;a.jf=null,this.qa=a.Ja,this.sa=null},Wn.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)},Wn.prototype.Ad=function(){return this.next()},Wn.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},Wn.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},Wn.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},Wn.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},Wn.prototype.map=function(a){var y=this.ma;this.sa=y.jf=null;var x=new Vt;for(y=y.ea;y!==null;)x.add(a(y.value)),y=y.va;return x.iterator},Wn.prototype.filter=function(a){var y=this.ma;this.sa=y.jf=null;var x=new Vt;for(y=y.ea;y!==null;){var E=y.value;a(E)&&x.add(E),y=y.va}return x.iterator},Wn.prototype.de=function(){this.value=this.key=null,this.qa=-1,this.ma.jf=this},Wn.prototype.toString=function(){return this.sa!==null?"MapValueSetIterator@"+this.sa.value:"MapValueSetIterator"},We.Object.defineProperties(Wn.prototype,{iterator:{get:function(){return this}},count:{get:function(){return this.ma.Sb}}}),Wn.prototype.first=Wn.prototype.first,Wn.prototype.hasNext=Wn.prototype.Ad,Wn.prototype.next=Wn.prototype.next,Wn.prototype.reset=Wn.prototype.reset,Wn.className="MapValueSetIterator";function Vi(a,y){this.key=a,this.value=y,this.ll=this.va=null}Vi.prototype.toString=function(){return"{"+this.key+":"+this.value+"}"},Vi.className="KeyValuePair";function Wi(a){this.ma=a,a.Sa=null,this.qa=a.Ja,this.sa=null}Wi.prototype.reset=function(){var a=this.ma;a.Sa=null,this.qa=a.Ja,this.sa=null},Wi.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)},Wi.prototype.Ad=function(){return this.next()},Wi.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},Wi.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},Wi.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},Wi.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},Wi.prototype.map=function(a){var y=this.ma;this.sa=y.Sa=null;var x=new Vt;for(y=y.ea;y!==null;)x.add(a(y)),y=y.va;return x.iterator},Wi.prototype.filter=function(a){var y=this.ma;this.sa=y.Sa=null;var x=new Vt;for(y=y.ea;y!==null;)a(y)&&x.add(y),y=y.va;return x.iterator},Wi.prototype.de=function(){this.value=this.key=null,this.qa=-1,this.ma.Sa=this},Wi.prototype.toString=function(){return this.sa!==null?"MapIterator@"+this.sa:"MapIterator"},We.Object.defineProperties(Wi.prototype,{iterator:{get:function(){return this}},count:{get:function(){return this.ma.Sb}}}),Wi.prototype.first=Wi.prototype.first,Wi.prototype.hasNext=Wi.prototype.Ad,Wi.prototype.next=Wi.prototype.next,Wi.prototype.reset=Wi.prototype.reset,Wi.className="MapIterator";function yn(a){nn(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"&&Yt("Error: Since 2.0 List/Map/Set constructors no longer take an argument that enforces type."),a!==void 0&&this.addAll(a)}Pt=yn.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()#"+On(this)},Pt.add=function(a,y){this._isFrozen&&de(this,a);var x=a;Ne(a)&&(x=_n(a));var E=this.Tb[x];return E===void 0?(this.Sb++,a=new Vi(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(Bn(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 yn)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},yn.prototype.any=function(a){for(var y=this.ea;y!==null;){if(a(y))return!0;y=y.va}return!1},yn.prototype.all=function(a){for(var y=this.ea;y!==null;){if(!a(y))return!1;y=y.va}return!0},yn.prototype.each=function(a){for(var y=this.ea;y!==null;)a(y),y=y.va;return this},yn.prototype.map=function(a){for(var y=new yn,x=this.ea;x!==null;)y.add(x.key,a(x)),x=x.va;return y},yn.prototype.filter=function(a){for(var y=new yn,x=this.ea;x!==null;)a(x)&&y.add(x.key,x.value),x=x.va;return y},Pt=yn.prototype,Pt.contains=function(a){var y=a;return Ne(a)&&(y=On(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 Ne(a)&&(y=On(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&&de(this,a);var y=a;if(Ne(a)&&(y=On(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&&de(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()},yn.prototype.copy=function(){var a=new yn,y=this.Tb,x;for(x in y){var E=y[x];a.add(E.key,E.value)}return a},yn.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 Vi(b.key,b.value),x++}return y},yn.prototype.Lf=function(){return new fn(this)},We.Object.defineProperties(yn.prototype,{count:{get:function(){return this.Sb}},size:{get:function(){return this.Sb}},iterator:{get:function(){if(0>=this.count)return or;var a=this.Sa;return a!==null?(a.reset(),a):new Wi(this)}},iteratorKeys:{get:function(){return 0>=this.count?or:new Gn(this)}},iteratorValues:{get:function(){if(0>=this.count)return or;var a=this.jf;return a!==null?(a.reset(),a):new Wn(this)}}}),yn.prototype.toKeySet=yn.prototype.Lf,yn.prototype.toArray=yn.prototype.Fa,yn.prototype.clear=yn.prototype.clear,yn.prototype.delete=yn.prototype.delete,yn.prototype.remove=yn.prototype.remove,yn.prototype.get=yn.prototype.get,yn.prototype.getValue=yn.prototype.I,yn.prototype.has=yn.prototype.has,yn.prototype.contains=yn.prototype.contains,yn.prototype.first=yn.prototype.first,yn.prototype.addAll=yn.prototype.addAll,yn.prototype.set=yn.prototype.set,yn.prototype.add=yn.prototype.add,yn.prototype.thaw=yn.prototype.ka,yn.prototype.freeze=yn.prototype.freeze,yn.className="Map";function Ot(a,y){a===void 0?this.y=this.x=0:typeof a=="number"&&typeof y=="number"?(this.x=a,this.y=y):Yt("Invalid arguments to Point constructor: "+a+", "+y),this._isFrozen=!1}var Ni,br,zr,xr,ki;Ot.prototype.assign=function(a){return this.x=a.x,this.y=a.y,this},Ot.prototype.h=function(a,y){return this.x=a,this.y=y,this},Ot.prototype.sg=function(a,y){return this.x=a,this.y=y,this},Ot.prototype.set=function(a){return this.x=a.x,this.y=a.y,this},Ot.prototype.copy=function(){var a=new Ot;return a.x=this.x,a.y=this.y,a},Pt=Ot.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)&&Yt("cannot thaw constant: "+this),this._isFrozen=!1,this};function Kn(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 Ot(x,b)}return new Ot}function ai(a){return a.x.toString()+" "+a.y.toString()}Pt.toString=function(){return"Point("+this.x+","+this.y+")"},Pt.D=function(a){return a instanceof Ot?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 oe.B(this.x,a.x)&&oe.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},Ot.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=Ot.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 Fi(a.x-this.x,a.y-this.y)},Pt.direction=function(a,y){return Fi(a-this.x,y-this.y)};function Fi(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 oe.Fl(a.x,a.y,y.x,y.y,this.x,this.y)},Pt.fA=function(a,y,x,E){return oe.qh(a,y,x,E,this.x,this.y,this),this},Pt.gA=function(a,y){return oe.qh(a.x,a.y,y.x,y.y,this.x,this.y,this),this},Pt.uA=function(a,y,x,E){return oe.No(this.x,this.y,a,y,x,E,this),this},Pt.vA=function(a,y){return oe.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 In(a,y){return y.Cd(a),a}function ni(a,y,x,E,b,z){var tt=b-x,rt=z-E,ot=tt*tt+rt*rt;x-=a,E-=y;var at=-x*tt-E*rt;return 0>=at||at>=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 $n(a,y,x,E){return a=x-a,y=E-y,a*a+y*y}function Tn(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)},Ot.alloc=function(){var a=fi.pop();return a===void 0?new Ot:a},Ot.allocAt=function(a,y){var x=fi.pop();return x===void 0?new Ot(a,y):(x.x=a,x.y=y,x)},Ot.free=function(a){fi.push(a)},Ot.prototype.isReal=Ot.prototype.w,Ot.prototype.setSpot=Ot.prototype.yi,Ot.prototype.setRectSpot=Ot.prototype.xi,Ot.prototype.snapToGridPoint=Ot.prototype.vA,Ot.prototype.snapToGrid=Ot.prototype.uA,Ot.prototype.projectOntoLineSegmentPoint=Ot.prototype.gA,Ot.prototype.projectOntoLineSegment=Ot.prototype.fA,Ot.intersectingLineSegments=function(a,y,x,E,b,z,tt,rt){return oe.Rl(a,y,x,E,b,z,tt,rt)},Ot.prototype.compareWithLineSegmentPoint=Ot.prototype.Ry,Ot.compareWithLineSegment=function(a,y,x,E,b,z){return oe.Fl(a,y,x,E,b,z)},Ot.prototype.direction=Ot.prototype.direction,Ot.prototype.directionPoint=Ot.prototype.ab,Ot.prototype.normalize=Ot.prototype.normalize,Ot.prototype.distanceSquared=Ot.prototype.zd,Ot.prototype.distanceSquaredPoint=Ot.prototype.Bf,Ot.prototype.scale=Ot.prototype.scale,Ot.prototype.rotate=Ot.prototype.rotate,Ot.prototype.offset=Ot.prototype.offset,Ot.prototype.subtract=Ot.prototype.re,Ot.prototype.add=Ot.prototype.add,Ot.prototype.equalsApprox=Ot.prototype.Xa,Ot.prototype.equalTo=Ot.prototype.hi,Ot.prototype.equals=Ot.prototype.D,Ot.prototype.set=Ot.prototype.set,Ot.prototype.setTo=Ot.prototype.sg;var fi=[];Ot.className="Point",Ot.parse=Kn,Ot.stringify=ai,Ot.distanceLineSegmentSquared=ni,Ot.distanceSquared=$n,Ot.direction=Tn,Ot.Origin=Ni=new Ot(0,0).ja(),Ot.InfiniteTopLeft=br=new Ot(-1/0,-1/0).ja(),Ot.InfiniteBottomRight=zr=new Ot(1/0,1/0).ja(),Ot.SixPoint=xr=new Ot(6,6).ja(),Ot.NoPoint=ki=new Ot(NaN,NaN).ja(),Ot.parse=Kn,Ot.stringify=ai,Ot.distanceLineSegmentSquared=ni,Ot.distanceSquared=$n,Ot.direction=Tn;function Xe(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):Yt("Invalid arguments to Size constructor: "+a+", "+y),this._isFrozen=!1}var nr,mr,Or,ir,jr,Vr,Ho;Xe.prototype.assign=function(a){return this.width=a.width,this.height=a.height,this},Xe.prototype.h=function(a,y){return this.width=a,this.height=y,this},Xe.prototype.sg=function(a,y){return this.width=a,this.height=y,this},Xe.prototype.set=function(a){return this.width=a.width,this.height=a.height,this},Xe.prototype.copy=function(){var a=new Xe;return a.width=this.width,a.height=this.height,a},Pt=Xe.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)&&Yt("cannot thaw constant: "+this),this._isFrozen=!1,this};function so(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 Xe(x,b)}return new Xe}function To(a){return a.width.toString()+" "+a.height.toString()}Pt.toString=function(){return"Size("+this.width+","+this.height+")"},Pt.D=function(a){return a instanceof Xe?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 oe.B(this.width,a.width)&&oe.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)},Xe.alloc=function(){var a=uo.pop();return a===void 0?new Xe:a},Xe.free=function(a){uo.push(a)},Xe.prototype.isReal=Xe.prototype.w,Xe.prototype.inflate=Xe.prototype.Bc,Xe.prototype.equalsApprox=Xe.prototype.Xa,Xe.prototype.equalTo=Xe.prototype.hi,Xe.prototype.equals=Xe.prototype.D,Xe.prototype.set=Xe.prototype.set,Xe.prototype.setTo=Xe.prototype.sg;var uo=[];Xe.className="Size",Xe.parse=so,Xe.stringify=To,Xe.ZeroSize=nr=new Xe(0,0).ja(),Xe.OneSize=mr=new Xe(1,1).ja(),Xe.SixSize=Or=new Xe(6,6).ja(),Xe.EightSize=ir=new Xe(8,8).ja(),Xe.TenSize=jr=new Xe(10,10).ja(),Xe.InfiniteSize=Vr=new Xe(1/0,1/0).ja(),Xe.NoSize=Ho=new Xe(NaN,NaN).ja(),Xe.parse=so,Xe.stringify=To;function Me(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 Ot?(x=a.x,a=a.y,y instanceof Ot?(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 Xe?(this.x=x,this.y=a,this.width=y.width,this.height=y.height):Yt("Incorrect second argument supplied to Rect constructor "+y)):Yt("Invalid arguments to Rect constructor: "+a+", "+y+", "+x+", "+E),this._isFrozen=!1}Pt=Me.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 ho(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},Me.prototype.copy=function(){var a=new Me;return a.x=this.x,a.y=this.y,a.width=this.width,a.height=this.height,a},Pt=Me.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)&&Yt("cannot thaw constant: "+this),this._isFrozen=!1,this};function ls(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 Me(x,b,z,tt)}return new Me}function ks(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 Me?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 oe.B(this.x,a.x)&&oe.B(this.y,a.y)&&oe.B(this.width,a.width)&&oe.B(this.height,a.height)};function ao(a,y){return oe.$(a.x,y.x)&&oe.$(a.y,y.y)&&oe.$(a.width,y.width)&&oe.$(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 xa(this,y,a,y,a)},Pt.Co=function(a){return xa(this,a.top,a.right,a.bottom,a.left)},Pt.Fv=function(a){return xa(this,-a.top,-a.right,-a.bottom,-a.left)},Pt.Hz=function(a,y,x,E){return xa(this,a,y,x,E)};function xa(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 ta(this,a.x,a.y,a.width,a.height)},Pt.Uu=function(a,y,x,E){return ta(this,a,y,x,E)};function ta(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 Da(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 Kr(this,a.x,a.y,0,0)},Pt.ed=function(a){return Kr(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),Kr(this,a,y,x,E)};function Kr(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 Ro(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 Vs(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},Me.alloc=function(){var a=Ba.pop();return a===void 0?new Me:a},Me.allocAt=function(a,y,x,E){var b=Ba.pop();return b===void 0?new Me(a,y,x,E):b.h(a,y,x,E)},Me.free=function(a){Ba.push(a)},We.Object.defineProperties(Me.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 Ot(this.x,this.y)},set:function(a){this.x=a.x,this.y=a.y}},size:{get:function(){return new Xe(this.width,this.height)},set:function(a){this.width=a.width,this.height=a.height}},center:{get:function(){return new Ot(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}}}),Me.prototype.isEmpty=Me.prototype.Mz,Me.prototype.isReal=Me.prototype.w,Me.intersectsLineSegment=function(a,y,x,E,b,z,tt,rt){return oe.Fx(a,y,x,E,b,z,tt,rt)},Me.prototype.setSpot=Me.prototype.yi,Me.prototype.union=Me.prototype.Kv,Me.prototype.unionRect=Me.prototype.ed,Me.prototype.unionPoint=Me.prototype.Ye,Me.prototype.intersects=Me.prototype.Vu,Me.prototype.intersectsRect=Me.prototype.Yc,Me.prototype.intersect=Me.prototype.Uu,Me.prototype.intersectRect=Me.prototype.Ex,Me.prototype.grow=Me.prototype.Hz,Me.prototype.subtractMargin=Me.prototype.Fv,Me.prototype.addMargin=Me.prototype.Co,Me.prototype.inflate=Me.prototype.Bc,Me.prototype.offset=Me.prototype.offset,Me.prototype.contains=Me.prototype.contains,Me.prototype.containsRect=Me.prototype.Re,Me.prototype.containsPoint=Me.prototype.ca,Me.prototype.equalsApprox=Me.prototype.Xa,Me.prototype.equalTo=Me.prototype.hi,Me.prototype.equals=Me.prototype.D,Me.prototype.setSize=Me.prototype.tA,Me.prototype.setPoint=Me.prototype.dd,Me.prototype.set=Me.prototype.set,Me.prototype.setTo=Me.prototype.sg;var Vl=null,zA=null,Ba=[];Me.className="Rect",Me.parse=ls,Me.stringify=ks,Me.contains=Ro,Me.intersects=Vs,Me.ZeroRect=Vl=new Me(0,0,0,0).ja(),Me.NoRect=zA=new Me(NaN,NaN,NaN,NaN).ja(),Me.parse=ls,Me.stringify=ks,Me.contains=Ro,Me.intersects=Vs;function Xi(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):Yt("Invalid arguments to Margin constructor: "+a+", "+y+", "+x+", "+E),this._isFrozen=!1}Xi.prototype.assign=function(a){return this.top=a.top,this.right=a.right,this.bottom=a.bottom,this.left=a.left,this},Xi.prototype.sg=function(a,y,x,E){return this.top=a,this.right=y,this.bottom=x,this.left=E,this},Xi.prototype.set=function(a){return this.top=a.top,this.right=a.right,this.bottom=a.bottom,this.left=a.left,this},Xi.prototype.copy=function(){var a=new Xi;return a.top=this.top,a.right=this.right,a.bottom=this.bottom,a.left=this.left,a},Pt=Xi.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)&&Yt("cannot thaw constant: "+this),this._isFrozen=!1,this};function xA(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 Xi;for(var b=NaN;a[y]==="";)y++;if((E=a[y++])&&(b=parseFloat(E)),isNaN(b))return new Xi(x);for(var z=NaN;a[y]==="";)y++;if((E=a[y++])&&(z=parseFloat(E)),isNaN(z))return new Xi(x,b);for(var tt=NaN;a[y]==="";)y++;return(E=a[y++])&&(tt=parseFloat(E)),isNaN(tt)?new Xi(x,b):new Xi(x,b,z,tt)}return new Xi}function KA(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 Xi?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 oe.B(this.top,a.top)&&oe.B(this.right,a.right)&&oe.B(this.bottom,a.bottom)&&oe.B(this.left,a.left)},Pt.w=function(){return isFinite(this.top)&&isFinite(this.right)&&isFinite(this.bottom)&&isFinite(this.left)},Xi.alloc=function(){var a=hu.pop();return a===void 0?new Xi:a},Xi.free=function(a){hu.push(a)},Xi.prototype.isReal=Xi.prototype.w,Xi.prototype.equalsApprox=Xi.prototype.Xa,Xi.prototype.equalTo=Xi.prototype.hi,Xi.prototype.equals=Xi.prototype.D,Xi.prototype.set=Xi.prototype.set,Xi.prototype.setTo=Xi.prototype.sg;var Wa=null,Hs=null,hu=[];Xi.className="Margin",Xi.parse=xA,Xi.stringify=KA,Xi.ZeroMargin=Wa=new Xi(0,0,0,0).ja(),Xi.TwoMargin=Hs=new Xi(2,2,2,2).ja(),Xi.parse=xA,Xi.stringify=KA;function ri(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 $i,vr,Fr,Dr,wo,Ui,So,ea,Bs,Go,_s,bs,ca,Ws,ns,xl,Ts,Zu,Il,Ya,Qo,al,Ju,qu,Eh,is,Lc,$u,fa,ll,vs,No,rs,Ys,th,BA;ri.prototype.assign=function(a){return this.x=a.x,this.y=a.y,this.offsetX=a.offsetX,this.offsetY=a.offsetY,this},ri.prototype.sg=function(a,y,x,E){return this.x=a,this.y=y,this.offsetX=x,this.offsetY=E,this},ri.prototype.set=function(a){return this.x=a.x,this.y=a.y,this.offsetX=a.offsetX,this.offsetY=a.offsetY,this},ri.prototype.copy=function(){var a=new ri;return a.x=this.x,a.y=this.y,a.offsetX=this.offsetX,a.offsetY=this.offsetY,a},Pt=ri.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)&&Yt("cannot thaw constant: "+this),this._isFrozen=!1,this};function Yo(a,y){return a.x=NaN,a.y=NaN,a.offsetX=y,a}function ko(a){if(typeof a=="string"){if(a=a.trim(),a==="None")return $i;if(a==="TopLeft")return vr;if(a==="Top"||a==="TopCenter"||a==="MiddleTop")return Fr;if(a==="TopRight")return Dr;if(a==="Left"||a==="LeftCenter"||a==="MiddleLeft")return wo;if(a==="Center")return Ui;if(a==="Right"||a==="RightCenter"||a==="MiddleRight")return So;if(a==="BottomLeft")return ea;if(a==="Bottom"||a==="BottomCenter"||a==="MiddleBottom")return Bs;if(a==="BottomRight")return Go;if(a==="TopSide")return _s;if(a==="LeftSide")return bs;if(a==="RightSide")return ca;if(a==="BottomSide")return Ws;if(a==="TopBottomSides")return ns;if(a==="LeftRightSides")return xl;if(a==="TopLeftSides")return Ts;if(a==="TopRightSides")return Zu;if(a==="BottomLeftSides")return Il;if(a==="BottomRightSides")return Ya;if(a==="NotTopSide")return Qo;if(a==="NotLeftSide")return al;if(a==="NotRightSide")return Ju;if(a==="NotBottomSide")return qu;if(a==="AllSides")return Eh;if(a==="Default")return is;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 ri(x,b,z,tt)}return new ri}function Xr(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($i)?"None":this.D(vr)?"TopLeft":this.D(Fr)?"Top":this.D(Dr)?"TopRight":this.D(wo)?"Left":this.D(Ui)?"Center":this.D(So)?"Right":this.D(ea)?"BottomLeft":this.D(Bs)?"Bottom":this.D(Go)?"BottomRight":this.D(_s)?"TopSide":this.D(bs)?"LeftSide":this.D(ca)?"RightSide":this.D(Ws)?"BottomSide":this.D(ns)?"TopBottomSides":this.D(xl)?"LeftRightSides":this.D(Ts)?"TopLeftSides":this.D(Zu)?"TopRightSides":this.D(Il)?"BottomLeftSides":this.D(Ya)?"BottomRightSides":this.D(Qo)?"NotTopSide":this.D(al)?"NotLeftSide":this.D(Ju)?"NotRightSide":this.D(qu)?"NotBottomSide":this.D(Eh)?"AllSides":this.D(is)?"Default":"None"},Pt.D=function(a){return a instanceof ri?(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 ri(.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(Lc))a=bs;else if(a.D($u))a=ca;else if(a.D(fa))a=_s;else if(a.D(ll))a=Ws;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},ri.alloc=function(){var a=ys.pop();return a===void 0?new ri:a},ri.free=function(a){ys.push(a)},ri.prototype.isDefault=ri.prototype.Xb,ri.prototype.isNone=ri.prototype.ys,ri.prototype.isSide=ri.prototype.$c,ri.prototype.isNoSpot=ri.prototype.Mc,ri.prototype.isSpot=ri.prototype.sb,ri.prototype.includesSide=ri.prototype.Hf,ri.prototype.opposite=ri.prototype.gv,ri.prototype.equals=ri.prototype.D,ri.prototype.set=ri.prototype.set,ri.prototype.setTo=ri.prototype.sg;var ys=[];ri.className="Spot",ri.parse=ko,ri.stringify=Xr,ri.None=$i=Yo(new ri(0,0,0,0),0).ja(),ri.Default=is=Yo(new ri(0,0,-1,0),-1).ja(),ri.TopLeft=vr=new ri(0,0,0,0).ja(),ri.TopCenter=Fr=new ri(.5,0,0,0).ja(),ri.TopRight=Dr=new ri(1,0,0,0).ja(),ri.LeftCenter=wo=new ri(0,.5,0,0).ja(),ri.Center=Ui=new ri(.5,.5,0,0).ja(),ri.RightCenter=So=new ri(1,.5,0,0).ja(),ri.BottomLeft=ea=new ri(0,1,0,0).ja(),ri.BottomCenter=Bs=new ri(.5,1,0,0).ja(),ri.BottomRight=Go=new ri(1,1,0,0).ja(),ri.MiddleTop=vs=Fr,ri.MiddleLeft=No=wo,ri.MiddleRight=rs=So,ri.MiddleBottom=Ys=Bs,ri.Top=fa=Fr,ri.Left=Lc=wo,ri.Right=$u=So,ri.Bottom=ll=Bs,ri.TopSide=_s=Yo(new ri(0,0,1,1),1).ja(),ri.LeftSide=bs=Yo(new ri(0,0,1,2),1).ja(),ri.RightSide=ca=Yo(new ri(0,0,1,4),1).ja(),ri.BottomSide=Ws=Yo(new ri(0,0,1,8),1).ja(),ri.TopBottomSides=ns=Yo(new ri(0,0,1,9),1).ja(),ri.LeftRightSides=xl=Yo(new ri(0,0,1,6),1).ja(),ri.TopLeftSides=Ts=Yo(new ri(0,0,1,3),1).ja(),ri.TopRightSides=Zu=Yo(new ri(0,0,1,5),1).ja(),ri.BottomLeftSides=Il=Yo(new ri(0,0,1,10),1).ja(),ri.BottomRightSides=Ya=Yo(new ri(0,0,1,12),1).ja(),ri.NotTopSide=Qo=Yo(new ri(0,0,1,14),1).ja(),ri.NotLeftSide=al=Yo(new ri(0,0,1,13),1).ja(),ri.NotRightSide=Ju=Yo(new ri(0,0,1,11),1).ja(),ri.NotBottomSide=qu=Yo(new ri(0,0,1,7),1).ja(),ri.AllSides=Eh=Yo(new ri(0,0,1,15),1).ja(),th=new ri(.156,.156).ja(),BA=new ri(.844,.844).ja(),ri.parse=ko,ri.stringify=Xr;function Ei(){this.m11=1,this.m21=this.m12=0,this.m22=1,this.dy=this.dx=0}Ei.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},Ei.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},Ei.prototype.copy=function(){var a=new Ei;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},Ei.prototype.toString=function(){return"Transform("+this.m11+","+this.m12+","+this.m21+","+this.m22+","+this.dx+","+this.dy+")"},Ei.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},Ei.prototype.ws=function(){return this.dx===0&&this.dy===0&&this.m11===1&&this.m12===0&&this.m21===0&&this.m22===1},Ei.prototype.reset=function(){return this.m11=1,this.m21=this.m12=0,this.m22=1,this.dy=this.dx=0,this},Ei.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},Ei.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},Ei.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},Ei.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=Ei.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,at=this.dx,At=this.dy,ft=y*z+x*rt+at,pt=y*tt+x*ot+At,xt=E*z+x*rt+at,Bt=E*tt+x*ot+At;return x=y*z+b*rt+at,y=y*tt+b*ot+At,z=E*z+b*rt+at,E=E*tt+b*ot+At,b=Math.min(ft,xt),ft=Math.max(ft,xt),xt=Math.min(pt,Bt),pt=Math.max(pt,Bt),b=Math.min(b,x),ft=Math.max(ft,x),xt=Math.min(xt,y),pt=Math.max(pt,y),b=Math.min(b,z),ft=Math.max(ft,z),xt=Math.min(xt,E),pt=Math.max(pt,E),a.h(b,xt,ft-b,pt-xt),a},Ei.alloc=function(){var a=Rs.pop();return a===void 0?new Ei:a},Ei.free=function(a){Rs.push(a)},Ei.prototype.transformRect=Ei.prototype.pp,Ei.prototype.transformPoint=Ei.prototype.Ga,Ei.prototype.scale=Ei.prototype.scale,Ei.prototype.translate=Ei.prototype.translate,Ei.prototype.rotate=Ei.prototype.rotate,Ei.prototype.invert=Ei.prototype.Vj,Ei.prototype.multiplyInverted=Ei.prototype.bv,Ei.prototype.multiply=Ei.prototype.multiply,Ei.prototype.reset=Ei.prototype.reset,Ei.prototype.isIdentity=Ei.prototype.ws,Ei.prototype.equals=Ei.prototype.D,Ei.prototype.setTransform=Ei.prototype.setTransform,Ei.prototype.set=Ei.prototype.set;var Rs=[];Ei.className="Transform",Ei.xF="54a702f3e53909c447824c6706603faf4c";var oe={AA:"7da71ca0ad381e90",wg:(Math.sqrt(2)-1)/3*4,Uv:null,sqrt:function(a){if(0>=a)return 0;var y=oe.Uv;if(y===null){y=[];for(var x=0;2e3>=x;x++)y[x]=Math.sqrt(x);oe.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 at=y,At=E;else at=E,At=y;if(a===x)return at<=tt&&tt<=At&&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&&(At+=b,at-=b,at<=tt&&tt<=At))if(ot-rt>At-at)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,at,At,ft){if(oe.Yb(a,y,tt,rt,ft,x,E)&&oe.Yb(a,y,tt,rt,ft,b,z))return oe.Yb(a,y,tt,rt,ft,at,At);var pt=(a+x)/2,xt=(y+E)/2,Bt=(x+b)/2,Mt=(E+z)/2;b=(b+tt)/2,z=(z+rt)/2,E=(pt+Bt)/2,x=(xt+Mt)/2,Bt=(Bt+b)/2,Mt=(Mt+z)/2;var Gt=(E+Bt)/2,Dt=(x+Mt)/2;return oe.cs(a,y,pt,xt,E,x,Gt,Dt,ot,at,At,ft)||oe.cs(Gt,Dt,Bt,Mt,b,z,tt,rt,ot,at,At,ft)},ax:function(a,y,x,E,b,z,tt,rt,ot){var at=(x+b)/2,At=(E+z)/2;return ot.h((((a+x)/2+at)/2+(at+(b+tt)/2)/2)/2,(((y+E)/2+At)/2+(At+(z+rt)/2)/2)/2),ot},My:function(a,y,x,E,b,z,tt,rt){var ot=(x+b)/2,at=(E+z)/2;return Tn(((a+x)/2+ot)/2,((y+E)/2+at)/2,(ot+(b+tt)/2)/2,(at+(z+rt)/2)/2)},Dl:function(a,y,x,E,b,z,tt,rt,ot,at){if(oe.Yb(a,y,tt,rt,ot,x,E)&&oe.Yb(a,y,tt,rt,ot,b,z))Kr(at,a,y,0,0),Kr(at,tt,rt,0,0);else{var At=(a+x)/2,ft=(y+E)/2,pt=(x+b)/2,xt=(E+z)/2;b=(b+tt)/2,z=(z+rt)/2,E=(At+pt)/2,x=(ft+xt)/2,pt=(pt+b)/2,xt=(xt+z)/2;var Bt=(E+pt)/2,Mt=(x+xt)/2;oe.Dl(a,y,At,ft,E,x,Bt,Mt,ot,at),oe.Dl(Bt,Mt,pt,xt,b,z,tt,rt,ot,at)}return at},Qe:function(a,y,x,E,b,z,tt,rt,ot,at){if(oe.Yb(a,y,tt,rt,ot,x,E)&&oe.Yb(a,y,tt,rt,ot,b,z))at.length===0&&(at.push(a),at.push(y)),at.push(tt),at.push(rt);else{var At=(a+x)/2,ft=(y+E)/2,pt=(x+b)/2,xt=(E+z)/2;b=(b+tt)/2,z=(z+rt)/2,E=(At+pt)/2,x=(ft+xt)/2,pt=(pt+b)/2,xt=(xt+z)/2;var Bt=(E+pt)/2,Mt=(x+xt)/2;oe.Qe(a,y,At,ft,E,x,Bt,Mt,ot,at),oe.Qe(Bt,Mt,pt,xt,b,z,tt,rt,ot,at)}return at},jv:function(a,y,x,E,b,z,tt,rt,ot,at){if(oe.Yb(a,y,b,z,at,x,E))return oe.Yb(a,y,b,z,at,rt,ot);var At=(a+x)/2,ft=(y+E)/2;x=(x+b)/2,E=(E+z)/2;var pt=(At+x)/2,xt=(ft+E)/2;return oe.jv(a,y,At,ft,pt,xt,tt,rt,ot,at)||oe.jv(pt,xt,x,E,b,z,tt,rt,ot,at)},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(oe.Yb(a,y,b,z,tt,x,E))Kr(rt,a,y,0,0),Kr(rt,b,z,0,0);else{var ot=(a+x)/2,at=(y+E)/2;x=(x+b)/2,E=(E+z)/2;var At=(ot+x)/2,ft=(at+E)/2;oe.iv(a,y,ot,at,At,ft,tt,rt),oe.iv(At,ft,x,E,b,z,tt,rt)}return rt},ep:function(a,y,x,E,b,z,tt,rt){if(oe.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,at=(y+E)/2;x=(x+b)/2,E=(E+z)/2;var At=(ot+x)/2,ft=(at+E)/2;oe.ep(a,y,ot,at,At,ft,tt,rt),oe.ep(At,ft,x,E,b,z,tt,rt)}return rt},Eo:function(a,y,x,E,b,z,tt,rt,ot,at,At,ft,pt,xt){if(oe.Yb(a,y,tt,rt,pt,x,E)&&oe.Yb(a,y,tt,rt,pt,b,z))return!oe.Rl(a,y,tt,rt,ot,at,At,ft)||(pt=(a-tt)*(at-ft)-(y-rt)*(ot-At),pt===0)?!1:(xt.h(((a*rt-y*tt)*(ot-At)-(a-tt)*(ot*ft-at*At))/pt,((a*rt-y*tt)*(at-ft)-(y-rt)*(ot*ft-at*At))/pt),!0);var Bt=(a+x)/2,Mt=(y+E)/2,Gt=(x+b)/2,Dt=(E+z)/2;b=(b+tt)/2,z=(z+rt)/2,E=(Bt+Gt)/2,x=(Mt+Dt)/2,Gt=(Gt+b)/2,Dt=(Dt+z)/2;var _t=(E+Gt)/2,Zt=(x+Dt)/2,te=1/0,ie=!1,me=0,ln=0;return oe.Eo(a,y,Bt,Mt,E,x,_t,Zt,ot,at,At,ft,pt,xt)&&(a=(xt.x-ot)*(xt.x-ot)+(xt.y-at)*(xt.y-at),a<te&&(te=a,ie=!0,me=xt.x,ln=xt.y)),oe.Eo(_t,Zt,Gt,Dt,b,z,tt,rt,ot,at,At,ft,pt,xt)&&(xt.x-ot)*(xt.x-ot)+(xt.y-at)*(xt.y-at)<te&&(ie=!0,me=xt.x,ln=xt.y),ie&&(xt.x=me,xt.y=ln),ie},Fo:function(a,y,x,E,b,z,tt,rt,ot,at,At,ft,pt){var xt=0;if(oe.Yb(a,y,tt,rt,pt,x,E)&&oe.Yb(a,y,tt,rt,pt,b,z)){if(pt=(a-tt)*(at-ft)-(y-rt)*(ot-At),pt===0)return xt;var Bt=((a*rt-y*tt)*(ot-At)-(a-tt)*(ot*ft-at*At))/pt,Mt=((a*rt-y*tt)*(at-ft)-(y-rt)*(ot*ft-at*At))/pt;if(Bt>=At)return xt;if((ot>At?ot-At:At-ot)<(at>ft?at-ft:ft-at)){if(y<rt?(ot=y,a=rt):(ot=rt,a=y),Mt<ot||Mt>a)return xt}else if(a<tt?(ot=a,a=tt):ot=tt,Bt<ot||Bt>a)return xt;0<pt?xt++:0>pt&&xt--}else{Bt=(a+x)/2,Mt=(y+E)/2;var Gt=(x+b)/2,Dt=(E+z)/2;b=(b+tt)/2,z=(z+rt)/2,E=(Bt+Gt)/2,x=(Mt+Dt)/2,Gt=(Gt+b)/2,Dt=(Dt+z)/2;var _t=(E+Gt)/2,Zt=(x+Dt)/2;xt+=oe.Fo(a,y,Bt,Mt,E,x,_t,Zt,ot,at,At,ft,pt),xt+=oe.Fo(_t,Zt,Gt,Dt,b,z,tt,rt,ot,at,At,ft,pt)}return xt},qh:function(a,y,x,E,b,z,tt){return oe.$(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)):oe.$(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 oe.B(a,x)&&oe.B(y,E)?(ot.h(a,y),!1):oe.$(b,tt)?oe.$(a,x)?(oe.qh(a,y,x,E,b,z,ot),!1):oe.qh(a,y,x,E,b,(E-y)/(x-a)*(b-a)+y,ot):(rt=(rt-z)/(tt-b),oe.$(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),oe.$(rt,tt)?(oe.qh(a,y,x,E,b,z,ot),!1):(b=(tt*a-rt*b+z-y)/(tt-rt),oe.$(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)):oe.qh(a,y,x,E,b,tt*(b-a)+y,ot))))},MA:function(a,y,x,E,b){return oe.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,at){function At(Gt,Dt){var _t=(Gt-a)*(Gt-a)+(Dt-y)*(Dt-y);_t<ft&&(ft=_t,ot.h(Gt,Dt))}var ft=1/0;At(ot.x,ot.y);var pt=0,xt=0,Bt=0,Mt=0;if(b<tt?(pt=b,xt=tt):(pt=tt,xt=b),z<rt?(Bt=b,Mt=tt):(Bt=tt,Mt=b),pt=(xt-pt)/2+at,at=(Mt-Bt)/2+at,b=(b+tt)/2,z=(z+rt)/2,pt===0||at===0)return ot;if(.5>(x>a?x-a:a-x)){if(pt=1-(x-b)*(x-b)/(pt*pt),0>pt)return ot;pt=Math.sqrt(pt),E=-at*pt+z,At(x,at*pt+z),At(x,E)}else{if(x=(E-y)/(x-a),E=1/(pt*pt)+x*x/(at*at),rt=2*x*(y-x*a)/(at*at)-2*x*z/(at*at)-2*b/(pt*pt),pt=rt*rt-4*E*(2*x*a*z/(at*at)-2*y*z/(at*at)+z*z/(at*at)+b*b/(pt*pt)-1+(y-x*a)*(y-x*a)/(at*at)),0>pt)return ot;pt=Math.sqrt(pt),at=(-rt+pt)/(2*E),At(at,x*at-x*a+y),pt=(-rt-pt)/(2*E),At(pt,x*pt-x*a+y)}return ot},Ff:function(a,y,x,E,b,z,tt,rt,ot){var at=1e21,At=a,ft=y;if(oe.Ve(a,y,a,E,b,z,tt,rt,ot)){var pt=(ot.x-b)*(ot.x-b)+(ot.y-z)*(ot.y-z);pt<at&&(at=pt,At=ot.x,ft=ot.y)}return oe.Ve(x,y,x,E,b,z,tt,rt,ot)&&(pt=(ot.x-b)*(ot.x-b)+(ot.y-z)*(ot.y-z),pt<at&&(at=pt,At=ot.x,ft=ot.y)),oe.Ve(a,y,x,y,b,z,tt,rt,ot)&&(y=(ot.x-b)*(ot.x-b)+(ot.y-z)*(ot.y-z),y<at&&(at=y,At=ot.x,ft=ot.y)),oe.Ve(a,E,x,E,b,z,tt,rt,ot)&&(a=(ot.x-b)*(ot.x-b)+(ot.y-z)*(ot.y-z),a<at&&(at=a,At=ot.x,ft=ot.y)),ot.h(At,ft),1e21>at},us:function(a,y,x){return oe.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,at=y+E;return b===tt?(z<rt?(tt=z,z=rt):tt=rt,a<=b&&b<=ot&&tt<=at&&z>=y):z===rt?(b<tt?(rt=b,b=tt):rt=tt,y<=z&&z<=at&&rt<=ot&&b>=a):!!(Ro(a,y,x,E,b,z)||Ro(a,y,x,E,tt,rt)||oe.Rl(a,y,ot,y,b,z,tt,rt)||oe.Rl(ot,y,ot,at,b,z,tt,rt)||oe.Rl(ot,at,a,at,b,z,tt,rt)||oe.Rl(a,at,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>=oe.Fl(a,y,x,E,b,z)*oe.Fl(a,y,x,E,tt,rt)&&0>=oe.Fl(b,z,tt,rt,a,y)*oe.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,at=E;if(E=Math.min(2*tt,Math.abs(b-E)),1e-5>E)return ot=at+rt*Math.min(E,ot),rt=a+x*Math.cos(at),at=y+x*Math.sin(at),a+=x*Math.cos(ot),y+=x*Math.sin(ot),x=(rt+a)/2,ot=(at+y)/2,z.push([rt,at,x,ot,x,ot,a,y]),z;for(;1e-5<E;)b=at+rt*Math.min(E,ot),z.push(oe.Vy(x,at,b,a,y)),E-=Math.abs(b-at),at=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,at=tt*tt+ot*ot,At=at+tt*tt+ot*rt;return at=4/3*(Math.sqrt(2*at*At)-At)/(tt*rt-ot*tt),rt=tt-at*ot,tt=ot+at*tt,ot=-tt,at=z+y,z=Math.cos(at),at=Math.sin(at),[E+a*Math.cos(y),b+a*Math.sin(y),E+rt*z-tt*at,b+rt*at+tt*z,E+rt*z-ot*at,b+rt*at+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,at=tt===0?x:E;return(tt===0?b:z)&&(at=-at),tt=rt,x=tt===0?x:E,(tt===0?b:z)&&(x=-x),oe.az(ot,tt===0?a:y,at,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 at=0;9999999999>at&&(y=.5*(rt+ot),!(y===rt||y===ot));++at){var At=a/(y+b),ft=tt/(y+z);if(At=At*At+ft*ft-1,0<At)rt=y;else if(0>At)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 Hn,um:new Hn,Mf:new Hn,Nf:0,vm:100};oe.za=oe.AA;function qe(a){nn(this),this.l=2,a===void 0&&(a=qe.o),this.na=a,this.Ec=this.Dc=this.pd=this.od=0,a===qe.o?this.ee=new Vt:(qe.V===null&&(qe.V=new Vt().freeze()),this.ee=qe.V),this.aq=this.ee.Ja,this.Ip=new Me().freeze(),this.ym=this.tk=null,this.zm=NaN,this.fg=vr,this.gg=Go,this.Rk=this.Sk=NaN,this.Uf=_e}qe.prototype.copy=function(){var a=new qe;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===qe.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},qe.prototype.ja=function(){return this.freeze(),Object.freeze(this),this},qe.prototype.freeze=function(){if(this._isFrozen=!0,this.type!==qe.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},qe.prototype.ka=function(){if(Object.isFrozen(this)&&Yt("cannot thaw constant: "+this),this._isFrozen=!1,this.type!==qe.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},qe.prototype.Xa=function(a){if(!(a instanceof qe))return!1;if(this.type!==a.type)return this.type===qe.j&&a.type===qe.o?Nl(this,a):a.type===qe.j&&this.type===qe.o?Nl(a,this):!1;if(this.type===qe.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 oe.B(this.startX,a.startX)&&oe.B(this.startY,a.startY)&&oe.B(this.endX,a.endX)&&oe.B(this.endY,a.endY)};function Nl(a,y){return a.type!==qe.j||y.type!==qe.o?!1:!!(y.figures.count===1&&(y=y.figures.M(0),y.segments.count===1&&oe.B(a.startX,y.startX)&&oe.B(a.startY,y.startY)&&(y=y.segments.M(0),y.type===_r&&oe.B(a.endX,y.endX)&&oe.B(a.endY,y.endY))))}qe.ia=function(a){return a.toString()},qe.prototype.qb=function(a){a.classType===qe&&(this.type=a)},qe.prototype.toString=function(a){switch(a===void 0&&(a=-1),this.type){case qe.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 qe.u:var y=new Me(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 qe.F:if(y=new Me(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 qe.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()}},qe.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},qe.parse=function(a,y){function x(){return Mt>=te-1?!0:at[Mt+1].match(ie)!==null}function E(){return Mt++,at[Mt]}function b(bi){var Bi=parseFloat(E()),Br=parseFloat(E());Gt===Gt.toLowerCase()&&(Bi=Zt.x+Bi,Br=Zt.y+Br),bi.h(Bi,Br)}function z(){return b(Zt),Zt}function tt(){return b(_t),_t}function rt(){var bi=Dt.toLowerCase();return bi!=="c"&&bi!=="s"&&bi!=="q"&&bi!=="t"?Zt:new Ot(2*Zt.x-_t.x,2*Zt.y-_t.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 at=a.split(" ");for(a=0;a<at.length;a++){var At=at[a];if(At.match(/(\.[0-9]*)(\.)/gm)!==null){ot=Qn();for(var ft="",pt=!1,xt=0;xt<At.length;xt++){var Bt=At[xt];Bt!=="."||pt?Bt==="."?(ot.push(ft),ft="."):ft+=Bt:(pt=!0,ft+=Bt)}for(ot.push(ft),at.splice(a,1),At=0;At<ot.length;At++)at.splice(a+At,0,ot[At]);a+=ot.length-1,Dn(ot)}}var Mt=-1,Gt="",Dt="";ot=new Ot(0,0);var _t=new Ot(0,0),Zt=new Ot(0,0),te=at.length;a=by(null),pt=ft=At=!1,xt=!0,Bt=null;for(var ie=/[UuBbMmZzLlHhVvCcSsQqTtAaFfXx]/;!(Mt>=te-1);)if(Dt=Gt,Gt=E(),Gt!=="")switch(Gt.toUpperCase()){case"X":xt=!0,ft=At=!1;break;case"M":for(Bt=z(),a.mc===null||xt===!0?(Cg(a,Bt.x,Bt.y,At,!ft,pt),xt=!1):a.moveTo(Bt.x,Bt.y),ot.assign(Zt);!x();)Bt=z(),a.lineTo(Bt.x,Bt.y);break;case"L":for(;!x();)Bt=z(),a.lineTo(Bt.x,Bt.y);break;case"H":for(;!x();)Zt=new Ot((Gt===Gt.toLowerCase()?Zt.x:0)+parseFloat(E()),Zt.y),a.lineTo(Zt.x,Zt.y);break;case"V":for(;!x();)Zt=new Ot(Zt.x,(Gt===Gt.toLowerCase()?Zt.y:0)+parseFloat(E())),a.lineTo(Zt.x,Zt.y);break;case"C":for(;!x();){Bt=new Ot,b(Bt);var me=tt(),ln=z();Ac(a,Bt.x,Bt.y,me.x,me.y,ln.x,ln.y)}break;case"S":for(;!x();)Bt=rt(),me=tt(),ln=z(),Ac(a,Bt.x,Bt.y,me.x,me.y,ln.x,ln.y);break;case"Q":for(;!x();)Bt=tt(),me=z(),p0(a,Bt.x,Bt.y,me.x,me.y);break;case"T":for(;!x();)_t=Bt=rt(),me=z(),p0(a,Bt.x,Bt.y,me.x,me.y);break;case"B":for(;!x();){Bt=parseFloat(E()),me=parseFloat(E()),ln=parseFloat(E());var Un=parseFloat(E()),Fn=parseFloat(E()),tn=Fn,De=!1;x()||(tn=parseFloat(E()),x()||(De=parseFloat(E())!==0)),Gt===Gt.toLowerCase()&&(ln+=Zt.x,Un+=Zt.y),a.arcTo(Bt,me,ln,Un,Fn,tn,De)}break;case"A":for(;!x();)Bt=Math.abs(parseFloat(E())),me=Math.abs(parseFloat(E())),ln=parseFloat(E()),Fn=Un=!1,De=tn=0,tn=E(),tn.length===1?(Un=!!parseFloat(tn),Fn=!!parseFloat(E()),tn=parseFloat(E())):tn.length===2?(Un=!!parseFloat(tn[0]),Fn=!!parseFloat(tn[1]),tn=parseFloat(E())):(Un=!!parseFloat(tn[0]),Fn=!!parseFloat(tn[1]),tn=parseFloat(tn.slice(2))),De=parseFloat(E()),Gt===Gt.toLowerCase()&&(tn=Zt.x+tn,De=Zt.y+De),Zt.h(tn,De),x1(a,Bt,me,ln,Un,Fn,tn,De);break;case"Z":S1(a),Zt.assign(ot);break;case"F":for(Bt="",me=1;at[Mt+me];)if(at[Mt+me]==="0")pt=!0,me++;else if(at[Mt+me].match(/[Uu]/)!==null)me++;else if(at[Mt+me].match(ie)===null)me++;else{Bt=at[Mt+me];break}Bt.match(/[Mm]/)?At=!0:0<a.mc.segments.length&&(a.mc.isFilled=!0);break;case"U":for(Bt="",me=1;at[Mt+me];)if(at[Mt+me].match(/[Ff]/)!==null)me++;else if(at[Mt+me].match(ie)===null)me++;else{Bt=at[Mt+me];break}Bt.match(/[Mm]/)?ft=!0:a.mc.isShadowed=!1}if(ot=a.os,m0=a,y)for(y=ot.figures.iterator;y.next();)y.value.isFilled=!0;return ot},qe.Ha=function(a,y){for(var x=a.length,E=Ot.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}Ot.free(E)},qe.prototype.Zu=function(){if(this._isInvalidBounds)return!0;if(this.type===qe.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},qe.prototype.computeBounds=function(){if(this._isInvalidBounds=!1,this.ym=this.tk=null,this.zm=NaN,this.type===qe.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),CA(this,a,!1),Kr(a,0,0,0,0),a.freeze()},qe.prototype.ix=function(){var a=new Me;return CA(this,a,!0),a};function CA(a,y,x){switch(a.type){case qe.j:case qe.u:case qe.F:x?y.h(a.od,a.pd,0,0):Kr(y,a.od,a.pd,0,0),Kr(y,a.Dc,a.Ec,0,0);break;case qe.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):Kr(y,z.startX,z.startY,0,0);for(var tt=z.segments.s,rt=tt.length,ot=z.startX,at=z.startY,At=0;At<rt;At++){var ft=tt[At];switch(ft.type){case _r:case os:ot=ft.endX,at=ft.endY,Kr(y,ot,at,0,0);break;case Es:oe.Dl(ot,at,ft.point1X,ft.point1Y,ft.point2X,ft.point2Y,ft.endX,ft.endY,.5,y),ot=ft.endX,at=ft.endY;break;case Oa:oe.iv(ot,at,ft.point1X,ft.point1Y,ft.endX,ft.endY,.5,y),ot=ft.endX,at=ft.endY;break;case zo:case ul:var pt=ft.type===zo?Pa(ft,z):Al(ft,z,ot,at),xt=pt.length;if(xt===0){ot=ft.type===zo?ft.centerX:ft.endX,at=ft.type===zo?ft.centerY:ft.endY,Kr(y,ot,at,0,0);break}ft=null;for(var Bt=0;Bt<xt;Bt++)ft=pt[Bt],oe.Dl(ft[0],ft[1],ft[2],ft[3],ft[4],ft[5],ft[6],ft[7],.5,y);ft!==null&&(ot=ft[6],at=ft[7]);break;default:Yt("Unknown Segment type: "+ft.type)}}}break;default:Yt("Unknown Geometry type: "+a.type)}}qe.prototype.normalize=function(){this._isFrozen&&de(this);var a=this.ix();return this.offset(-a.x,-a.y),new Ot(-a.x,-a.y)},qe.prototype.offset=function(a,y){return this._isFrozen&&de(this),this.transform(1,0,0,1,a,y),this},qe.prototype.scale=function(a,y){return this._isFrozen&&de(this),this.transform(a,0,0,y,0,0),this},qe.prototype.rotate=function(a,y,x){this._isFrozen&&de(this),y===void 0&&(y=0),x===void 0&&(x=0);var E=Ei.alloc();return E.reset(),E.rotate(a,y,x),this.transform(E.m11,E.m12,E.m21,E.m22,E.dx,E.dy),Ei.free(E),this},Pt=qe.prototype,Pt.transform=function(a,y,x,E,b,z){switch(this.type){case qe.j:case qe.u:case qe.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 qe.o:for(var ot=this.figures.s,at=ot.length,At=0;At<at;At++){var ft=ot[At];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 pt=ft.length,xt=0;xt<pt;xt++){var Bt=ft[xt];switch(Bt.type){case _r:case os:tt=Bt.endX,rt=Bt.endY,Bt.endX=tt*a+rt*x+b,Bt.endY=tt*y+rt*E+z;break;case Es:tt=Bt.point1X,rt=Bt.point1Y,Bt.point1X=tt*a+rt*x+b,Bt.point1Y=tt*y+rt*E+z,tt=Bt.point2X,rt=Bt.point2Y,Bt.point2X=tt*a+rt*x+b,Bt.point2Y=tt*y+rt*E+z,tt=Bt.endX,rt=Bt.endY,Bt.endX=tt*a+rt*x+b,Bt.endY=tt*y+rt*E+z;break;case Oa:tt=Bt.point1X,rt=Bt.point1Y,Bt.point1X=tt*a+rt*x+b,Bt.point1Y=tt*y+rt*E+z,tt=Bt.endX,rt=Bt.endY,Bt.endX=tt*a+rt*x+b,Bt.endY=tt*y+rt*E+z;break;case zo:tt=Bt.centerX,rt=Bt.centerY,Bt.centerX=tt*a+rt*x+b,Bt.centerY=tt*y+rt*E+z,y!==0&&(tt=180*Math.atan2(y,a)/Math.PI,0>tt&&(tt+=360),Bt.startAngle+=tt),0>a&&(Bt.startAngle=180-Bt.startAngle,Bt.sweepAngle=-Bt.sweepAngle),0>E&&(Bt.startAngle=-Bt.startAngle,Bt.sweepAngle=-Bt.sweepAngle),Bt.radiusX*=Math.sqrt(a*a+x*x),Bt.radiusY!==void 0&&(Bt.radiusY*=Math.sqrt(y*y+E*E));break;case ul:if(tt=Bt.endX,rt=Bt.endY,Bt.endX=tt*a+rt*x+b,Bt.endY=tt*y+rt*E+z,Bt.radiusX===0||Bt.radiusY===0)break;y!==0&&(tt=180*Math.atan2(y,a)/Math.PI,0>tt&&(tt+=360),Bt.xAxisRotation+=tt),0>a&&(Bt.xAxisRotation=180-Bt.xAxisRotation,Bt.isClockwiseArc=!Bt.isClockwiseArc),0>E&&(Bt.xAxisRotation=-Bt.xAxisRotation,Bt.isClockwiseArc=!Bt.isClockwiseArc),Bt.radiusX*=Math.sqrt(a*a+x*x),Bt.radiusY*=Math.sqrt(y*y+E*E);break;default:Yt("Unknown Segment type: "+Bt.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 qe.j:return oe.Yb(x,E,b,z,y,a.x,a.y);case qe.u:var tt=Me.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),Me.free(tt),a;case qe.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 qe.o:return Cs(this,a,y,!0,!1);default:return!1}};function Cs(a,y,x,E,b){var z=y.x;y=y.y;for(var tt=a.bounds.x-20,rt=0,ot,at,At,ft,pt=a.figures.s,xt=pt.length,Bt=0;Bt<xt;Bt++){var Mt=pt[Bt],Gt=!Mt.isEvenOdd;if(Mt.isFilled){if(E&&Mt.ca(z,y,x))return!0;var Dt=Mt.segments;ot=Mt.startX,at=Mt.startY;for(var _t=ot,Zt=at,te=Dt.s,ie=0;ie<=Dt.length;ie++){var me=void 0;if(ie!==Dt.length){me=te[ie];var ln=me.type;a=me.endX,ft=me.endY}else ln=_r,a=_t,ft=Zt;switch(ln){case os:if(_t=Ca(z,y,tt,y,ot,at,_t,Zt),isNaN(_t))return!0;rt+=_t,_t=a,Zt=ft;break;case _r:if(ot=Ca(z,y,tt,y,ot,at,a,ft),isNaN(ot))return!0;rt+=ot;break;case Es:At=oe.Fo(ot,at,me.point1X,me.point1Y,me.point2X,me.point2Y,a,ft,tt,y,z,y,.5),rt+=At;break;case Oa:At=oe.Fo(ot,at,(ot+2*me.point1X)/3,(at+2*me.point1Y)/3,(2*me.point1X+a)/3,(2*me.point1Y+ft)/3,a,ft,tt,y,z,y,.5),rt+=At;break;case zo:case ul:ln=me.type===zo?Pa(me,Mt):Al(me,Mt,ot,at);var Un=ln.length;if(Un===0){if(ot=Ca(z,y,tt,y,ot,at,me.type===zo?me.centerX:me.endX,me.type===zo?me.centerY:me.endY),isNaN(ot))return!0;rt+=ot;break}me=null;for(var Fn=0;Fn<Un;Fn++){if(me=ln[Fn],Fn===0){if(At=Ca(z,y,tt,y,ot,at,me[0],me[1]),isNaN(At))return!0;rt+=At}At=oe.Fo(me[0],me[1],me[2],me[3],me[4],me[5],me[6],me[7],tt,y,z,y,.5),rt+=At}me!==null&&(a=me[6],ft=me[7]);break;default:Yt("Unknown Segment type: "+me.type)}ot=a,at=ft}if(Gt){if(rt!==0)return!0}else if(rt%2!==0)return!0;rt=0}else if(Mt.ca(z,y,b?x:x+2))return!0}return!1}function Ca(a,y,x,E,b,z,tt,rt){if(oe.Yb(b,z,tt,rt,.05,a,y))return NaN;var ot=(a-x)*(z-rt);if(ot===0)return 0;var at=((a*E-y*x)*(b-tt)-(a-x)*(b*rt-z*tt))/ot;if(y=(a*E-y*x)*(z-rt)/ot,at>=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(at<b||at>tt)return 0}else if(at<tt||at>b)return 0;return 0<ot?1:-1}function _l(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 Ot),this.type===qe.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],at=ot.length;for(a=0;a<at;a++){var At=ot[a];if(tt+At>=z)return E=z-tt,E=At===0?0:E/At,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+=At}}return y},Pt.wx=function(a){if(0>a?a=0:1<a&&(a=1),this.type===qe.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 at=rt[a];if(z+at>=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+=at}}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===qe.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],at=ot.length;for(a=0;a<at;a++){var At=ot[a];if(tt+At>=z)return E=z-tt,E=At===0?0:E/At,At=x[rt],x=At[2*a],rt=At[2*a+1],b=At[2*a+2],a=At[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+=At}}return y},Pt.xx=function(a){if(this.type===qe.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=Ot.alloc();return oe.qh(y,x,E,b,z,a,rt),a=rt.x,z=rt.y,Ot.free(rt),Math.sqrt(((a-y)*(a-y)+(z-x)*(z-x))/tt)}}else if(this.type===qe.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 at=Math.min(tt,ot,rt,b);if(at===rt)return E/z;if(at===ot)return(y+a)/z;if(at===b)return(2*y+x-E)/z;if(at===tt)return(2*y+2*x-a)/z}}else{y=this.flattenedSegments,x=this.flattenedLengths,z=this.flattenedTotalLength,E=Ot.alloc(),b=1/0,rt=tt=0,ot=y.length;for(var At=at=0,ft=0;ft<ot;ft++)for(var pt=y[ft],xt=x[ft],Bt=pt.length,Mt=0;Mt<Bt;Mt+=2){var Gt=pt[Mt],Dt=pt[Mt+1];if(Mt!==0){oe.qh(at,At,Gt,Dt,a.x,a.y,E);var _t=(E.x-a.x)*(E.x-a.x)+(E.y-a.y)*(E.y-a.y);_t<b&&(b=_t,tt=rt,tt+=Math.sqrt((E.x-at)*(E.x-at)+(E.y-At)*(E.y-At))),rt+=xt[(Mt-2)/2]}at=Gt,At=Dt}return Ot.free(E),a=tt/z,0>a?0:1<a?1:a}return 0};function jA(a){if(a.tk===null){var y=a.tk=[],x=a.ym=[],E=[],b=[];if(a.type===qe.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===qe.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===qe.F){var z=new As;z.startX=a.endX,z.startY=(a.startY+a.endY)/2;var tt=new yr(zo);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=Pa(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];oe.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(cu(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 at=b.segments.s,At=at.length,ft=0;ft<At;ft++){var pt=at[ft];switch(pt.type){case os:4<=E.length&&(y.push(E),x.push(cu(E))),E=[],E.push(pt.endX),E.push(pt.endY),tt=pt.endX,z=pt.endY,rt=tt,ot=z;break;case _r:E.push(pt.endX),E.push(pt.endY),tt=pt.endX,z=pt.endY;break;case Es:oe.Qe(tt,z,pt.point1X,pt.point1Y,pt.point2X,pt.point2Y,pt.endX,pt.endY,.5,E),tt=pt.endX,z=pt.endY;break;case Oa:oe.ep(tt,z,pt.point1X,pt.point1Y,pt.endX,pt.endY,.5,E),tt=pt.endX,z=pt.endY;break;case zo:var xt=Pa(pt,b),Bt=xt.length;if(Bt===0){E.push(pt.centerX),E.push(pt.centerY),tt=pt.centerX,z=pt.centerY;break}for(var Mt=0;Mt<Bt;Mt++){var Gt=xt[Mt];oe.Qe(tt,z,Gt[2],Gt[3],Gt[4],Gt[5],Gt[6],Gt[7],.5,E),tt=Gt[6],z=Gt[7]}break;case ul:if(xt=Al(pt,b,tt,z),Bt=xt.length,Mt=pt.endX,Gt=pt.endY,Bt===0){E.push(Mt),E.push(Gt),tt=Mt,z=Gt;break}for(Mt=0;Mt<Bt;Mt++)Gt=xt[Mt],oe.Qe(tt,z,Gt[2],Gt[3],Gt[4],Gt[5],Gt[6],Gt[7],.5,E),tt=Gt[6],z=Gt[7];break;default:Yt("Segment not of valid type: "+pt.type)}pt.isClosed&&(E.push(rt),E.push(ot))}4<=E.length&&(y.push(E),x.push(cu(E)))}}}function cu(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($n(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&&de(this),this.fg=new ri(a,y,b,z).freeze(),this.gg=new ri(x,E,tt,rt).freeze(),this},We.Object.defineProperties(qe.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 jA(this),this.tk}},flattenedLengths:{get:function(){return jA(this),this.ym}},flattenedTotalLength:{get:function(){var a=this.zm;if(isNaN(a)){if(this.type===qe.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===qe.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&&de(this,a),this.na=a,a===qe.o?this.ee=new Vt:(qe.V===null&&(qe.V=new Vt().freeze()),this.ee=qe.V),this._isInvalidBounds=!0)}},startX:{get:function(){return this.od},set:function(a){this.od!==a&&(this._isFrozen&&de(this,a),this.od=a,this._isInvalidBounds=!0)}},startY:{get:function(){return this.pd},set:function(a){this.pd!==a&&(this._isFrozen&&de(this,a),this.pd=a,this._isInvalidBounds=!0)}},endX:{get:function(){return this.Dc},set:function(a){this.Dc!==a&&(this._isFrozen&&de(this,a),this.Dc=a,this._isInvalidBounds=!0)}},endY:{get:function(){return this.Ec},set:function(a){this.Ec!==a&&(this._isFrozen&&de(this,a),this.Ec=a,this._isInvalidBounds=!0)}},figures:{get:function(){return this.ee},set:function(a){this.ee!==a&&(this._isFrozen&&de(this,a),this.ee=a,this._isInvalidBounds=!0)}},spot1:{get:function(){return this.fg},set:function(a){this._isFrozen&&de(this,a),this.fg=a.J()}},spot2:{get:function(){return this.gg},set:function(a){this._isFrozen&&de(this,a),this.gg=a.J()}},defaultStretch:{get:function(){return this.Uf},set:function(a){this._isFrozen&&de(this,a),this.Uf=a}},bounds:{get:function(){return this.Zu()&&this.computeBounds(),this.Ip}}}),qe.prototype.setSpots=qe.prototype.pm,qe.prototype.add=qe.prototype.add,qe.prototype.getFractionForPoint=qe.prototype.xx,qe.prototype.getPointAndAngleAlongPath=qe.prototype.Qu,qe.prototype.getAngleAlongPath=qe.prototype.wx,qe.prototype.getPointAlongPath=qe.prototype.Pu,qe.prototype.containsPoint=qe.prototype.ca,qe.prototype.transform=qe.prototype.transform,qe.prototype.rotate=qe.prototype.rotate,qe.prototype.scale=qe.prototype.scale,qe.prototype.offset=qe.prototype.offset,qe.prototype.normalize=qe.prototype.normalize,qe.prototype.computeBoundsWithoutOrigin=qe.prototype.ix,qe.prototype.equalsApprox=qe.prototype.Xa,qe.className="Geometry",qe.j=new xe(qe,"Line",0),qe.u=new xe(qe,"Rectangle",1),qe.F=new xe(qe,"Ellipse",2),qe.o=new xe(qe,"Path",3),qe.V=null,qe.hb="UuBbMmZzLlHhVvCcSsQqTtAaFfXx",qe.className="Geometry",qe.stringify=qe.ia,qe.fillPath=qe.nb,qe.parse=qe.parse,qe.Line=qe.j,qe.Rectangle=qe.u,qe.Ellipse=qe.F,qe.Path=qe.o;function As(a,y,x,E,b){nn(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 Vt,this.sr=this.pl.Ja,this.fw=null}As.prototype.copy=function(){var a=new As;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=As.prototype,Pt.Xa=function(a){if(!(a instanceof As&&oe.B(this.startX,a.startX)&&oe.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,at=0;at<ot;at++){var At=rt[at];switch(At.type){case os:z=At.endX,tt=At.endY,E=At.endX,b=At.endY;break;case _r:if(oe.Yb(E,b,At.endX,At.endY,x,a,y))return!0;E=At.endX,b=At.endY;break;case Es:if(oe.cs(E,b,At.point1X,At.point1Y,At.point2X,At.point2Y,At.endX,At.endY,.5,a,y,x))return!0;E=At.endX,b=At.endY;break;case Oa:if(oe.jv(E,b,At.point1X,At.point1Y,At.endX,At.endY,.5,a,y,x))return!0;E=At.endX,b=At.endY;break;case zo:case ul:var ft=At.type===zo?Pa(At,this):Al(At,this,E,b),pt=ft.length,xt=At.type===zo?At.centerX:At.endX,Bt=At.type===zo?At.centerY:At.endY;if(pt===0){if(oe.Yb(E,b,xt,Bt,x,a,y))return!0;E=xt,b=Bt;break}for(xt=null,Bt=0;Bt<pt;Bt++)if(xt=ft[Bt],Bt===0&&oe.Yb(E,b,xt[0],xt[1],x,a,y)||oe.cs(xt[0],xt[1],xt[2],xt[3],xt[4],xt[5],xt[6],xt[7],.5,a,y,x))return!0;xt!==null&&(E=xt[6],b=xt[7]);break;default:Yt("Unknown Segment type: "+At.type)}if(At.isClosed&&(E!==z||b!==tt)&&oe.Yb(E,b,z,tt,x,a,y))return!0}return!1},We.Object.defineProperties(As.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&&de(this,a),this.l=a?this.l|4:this.l&-5}},isShadowed:{get:function(){return(this.l&8)!==0},set:function(a){this._isFrozen&&de(this,a),this.l=a?this.l|8:this.l&-9}},isEvenOdd:{get:function(){return(this.l&16)!==0},set:function(a){this._isFrozen&&de(this,a),this.l=a?this.l|16:this.l&-17}},startX:{get:function(){return this.od},set:function(a){this._isFrozen&&de(this,a),this.od=a,this._isInvalidBounds=!0}},startY:{get:function(){return this.pd},set:function(a){this._isFrozen&&de(this,a),this.pd=a,this._isInvalidBounds=!0}},segments:{get:function(){return this.pl},set:function(a){this._isFrozen&&de(this,a),this.pl=a,this._isInvalidBounds=!0}}}),As.prototype.add=As.prototype.add,As.prototype.equalsApprox=As.prototype.Xa,As.className="PathFigure";function yr(a,y,x,E,b,z,tt,rt){nn(this),a===void 0&&(a=_r),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===ul?(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===zo&&(z=Math.max(z,0)),this.Wh=z,typeof tt=="number"?(a===zo&&(tt=Math.max(tt,0)),this.Pg=tt):this.Pg=0),this.ae=null}yr.prototype.copy=function(){var a=new yr;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=yr.prototype,Pt.Xa=function(a){if(!(a instanceof yr)||this.type!==a.type||this.isClosed!==a.isClosed)return!1;switch(this.type){case os:case _r:return oe.B(this.endX,a.endX)&&oe.B(this.endY,a.endY);case Es:return oe.B(this.endX,a.endX)&&oe.B(this.endY,a.endY)&&oe.B(this.point1X,a.point1X)&&oe.B(this.point1Y,a.point1Y)&&oe.B(this.point2X,a.point2X)&&oe.B(this.point2Y,a.point2Y);case Oa:return oe.B(this.endX,a.endX)&&oe.B(this.endY,a.endY)&&oe.B(this.point1X,a.point1X)&&oe.B(this.point1Y,a.point1Y);case zo:return oe.B(this.startAngle,a.startAngle)&&oe.B(this.sweepAngle,a.sweepAngle)&&oe.B(this.centerX,a.centerX)&&oe.B(this.centerY,a.centerY)&&oe.B(this.radiusX,a.radiusX)&&oe.B(this.radiusY,a.radiusY);case ul:return this.isClockwiseArc===a.isClockwiseArc&&this.isLargeArc===a.isLargeArc&&oe.B(this.xAxisRotation,a.xAxisRotation)&&oe.B(this.endX,a.endX)&&oe.B(this.endY,a.endY)&&oe.B(this.radiusX,a.radiusX)&&oe.B(this.radiusY,a.radiusY);default:return!1}},Pt.qb=function(a){a.classType===yr&&(this.type=a)},Pt.toString=function(a){switch(a===void 0&&(a=-1),this.type){case os:a=0>a?"M"+this.endX.toString()+" "+this.endY.toString():"M"+this.endX.toFixed(a)+" "+this.endY.toFixed(a);break;case _r:a=0>a?"L"+this.endX.toString()+" "+this.endY.toString():"L"+this.endX.toFixed(a)+" "+this.endY.toFixed(a);break;case Es: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 Oa: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 zo: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 ul: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 Pa(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=oe.jx(0,0,x<E?x:E,a.startAngle,a.startAngle+a.sweepAngle,!1);if(x!==E){var tt=Ei.alloc();tt.reset(),x<E?tt.scale(1,E/x):tt.scale(x/E,1),qe.Ha(z,tt),Ei.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 Al(a,y,x,E){function b(Mt,Gt,Dt,_t){return(Mt*_t<Gt*Dt?-1:1)*Math.acos((Mt*Dt+Gt*_t)/(Math.sqrt(Mt*Mt+Gt*Gt)*Math.sqrt(Dt*Dt+_t*_t)))}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,at=a.Dc,At=a.Ec,ft=Math.cos(tt),pt=Math.sin(tt),xt=ft*(x-at)/2+pt*(E-At)/2;tt=-pt*(x-at)/2+ft*(E-At)/2;var Bt=xt*xt/(y*y)+tt*tt/(z*z);return 1<Bt&&(y*=Math.sqrt(Bt),z*=Math.sqrt(Bt)),Bt=(rt===ot?-1:1)*Math.sqrt((y*y*z*z-y*y*tt*tt-z*z*xt*xt)/(y*y*tt*tt+z*z*xt*xt)),isNaN(Bt)&&(Bt=0),rt=Bt*y*tt/z,Bt=Bt*-z*xt/y,isNaN(rt)&&(rt=0),isNaN(Bt)&&(Bt=0),x=(x+at)/2+ft*rt-pt*Bt,E=(E+At)/2+pt*rt+ft*Bt,At=b(1,0,(xt-rt)/y,(tt-Bt)/z),ft=(xt-rt)/y,at=(tt-Bt)/z,xt=(-xt-rt)/y,rt=(-tt-Bt)/z,tt=b(ft,at,xt,rt),xt=(ft*xt+at*rt)/(Math.sqrt(ft*ft+at*at)*Math.sqrt(xt*xt+rt*rt)),-1>=xt?tt=Math.PI:1<=xt&&(tt=0),!ot&&0<tt&&(tt-=2*Math.PI),ot&&0>tt&&(tt+=2*Math.PI),ot=y>z?1:y/z,xt=y>z?z/y:1,y=oe.jx(0,0,y>z?y:z,At,At+tt,!0),z=Ei.alloc(),z.reset(),z.translate(x,E),z.rotate(a.Ne,0,0),z.scale(ot,xt),qe.Ha(y,z),Ei.free(z),a.ae=y,a.ae}We.Object.defineProperties(yr.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&&de(this,a),this.na=a,this._isInvalidBounds=!0}},endX:{get:function(){return this.Dc},set:function(a){this._isFrozen&&de(this,a),this.Dc=a,this._isInvalidBounds=!0}},endY:{get:function(){return this.Ec},set:function(a){this._isFrozen&&de(this,a),this.Ec=a,this._isInvalidBounds=!0}},point1X:{get:function(){return this.Ne},set:function(a){this._isFrozen&&de(this,a),this.Ne=a,this._isInvalidBounds=!0}},point1Y:{get:function(){return this.Vh},set:function(a){this._isFrozen&&de(this,a),this.Vh=a,this._isInvalidBounds=!0}},point2X:{get:function(){return this.Wh},set:function(a){this._isFrozen&&de(this,a),this.Wh=a,this._isInvalidBounds=!0}},point2Y:{get:function(){return this.Pg},set:function(a){this._isFrozen&&de(this,a),this.Pg=a,this._isInvalidBounds=!0}},centerX:{get:function(){return this.Ne},set:function(a){this._isFrozen&&de(this,a),this.Ne=a,this._isInvalidBounds=!0}},centerY:{get:function(){return this.Vh},set:function(a){this._isFrozen&&de(this,a),this.Vh=a,this._isInvalidBounds=!0}},radiusX:{get:function(){return this.Wh},set:function(a){0>a&&Sn(a,">= zero",yr,"radiusX"),this._isFrozen&&de(this,a),this.Wh=a,this._isInvalidBounds=!0}},radiusY:{get:function(){return this.Pg},set:function(a){0>a&&Sn(a,">= zero",yr,"radiusY"),this._isFrozen&&de(this,a),this.Pg=a,this._isInvalidBounds=!0}},startAngle:{get:function(){return this.Dc},set:function(a){this._isFrozen&&de(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&&de(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&&de(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&&de(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&&de(this,a),a%=360,0>a&&(a+=360),this.Ne=a,this._isInvalidBounds=!0}}}),yr.prototype.equalsApprox=yr.prototype.Xa;var os=new xe(yr,"Move",0),_r=new xe(yr,"Line",1),Es=new xe(yr,"Bezier",2),Oa=new xe(yr,"QuadraticBezier",3),zo=new xe(yr,"Arc",4),ul=new xe(yr,"SvgArc",4);yr.className="PathSegment",yr.Move=os,yr.Line=_r,yr.Bezier=Es,yr.QuadraticBezier=Oa,yr.Arc=zo,yr.SvgArc=ul;function Is(){this.H=null,this.xu=new Ot(0,0).freeze(),this.mt=new Ot(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}Is.prototype.copy=function(){var a=new Is;return this.clone(a)},Is.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},Is.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},Is.prototype.So=function(a,y){var x=this.diagram;return x===null||Gc(x,a,y),y},Is.prototype.Bz=function(a,y){var x=this.diagram;return x===null||(Gc(x,a,y),y.assign(x.Ps(y))),y},We.Object.defineProperties(Is.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}}}),Is.prototype.getMultiTouchDocumentPoint=Is.prototype.Bz,Is.prototype.getMultiTouchViewPoint=Is.prototype.So,Is.className="InputEvent";function fu(){this.H=null,this.xa="",this.ar=this.Lr=null}fu.prototype.copy=function(){var a=new fu;return a.H=this.H,a.xa=this.xa,a.Lr=this.Lr,a.ar=this.ar,a},fu.prototype.toString=function(){var a="*"+this.name;return this.subject!==null&&(a+=":"+this.subject.toString()),this.parameter!==null&&(a+="("+this.parameter.toString()+")"),a},We.Object.defineProperties(fu.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}}}),fu.className="DiagramEvent";function vo(){this.Fm=co,this.rf=this.Qq="",this.Ln=this.Mn=this.Rn=this.Sn=this.Qn=this.H=this.cc=null}vo.prototype.clear=function(){this.Ln=this.Mn=this.Rn=this.Sn=this.Qn=this.H=this.cc=null},vo.prototype.copy=function(){var a=new vo;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=Ne(y)&&typeof y.J=="function"?y.J():y,y=this.Rn,a.Rn=Ne(y)&&typeof y.J=="function"?y.J():y,y=this.Mn,a.Mn=Ne(y)&&typeof y.J=="function"?y.J():y,y=this.Ln,a.Ln=Ne(y)&&typeof y.J=="function"?y.J():y,a},vo.prototype.qb=function(a){a.classType===vo&&(this.change=a)},vo.prototype.toString=function(){var a="";return a=this.change===da?a+"* ":this.change===co?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===da?this.oldValue!==null&&(a+=" "+this.oldValue):(this.object!==null&&(a+=rr(this.object)),this.oldValue!==null&&(a+=" old: "+rr(this.oldValue)),this.oldParam!==null&&(a+=" "+this.oldParam),this.newValue!==null&&(a+=" new: "+rr(this.newValue)),this.newParam!==null&&(a+=" "+this.newParam)),a},vo.prototype.I=function(a){return a?this.oldValue:this.newValue},vo.prototype.Dz=function(a){return a?this.oldParam:this.newParam},vo.prototype.canUndo=function(){return this.model!==null||this.diagram!==null},vo.prototype.undo=function(){this.canUndo()&&(this.model!==null?this.model.changeState(this,!0):this.diagram!==null&&this.diagram.changeState(this,!0))},vo.prototype.canRedo=function(){return this.model!==null||this.diagram!==null},vo.prototype.redo=function(){this.canRedo()&&(this.model!==null?this.model.changeState(this,!1):this.diagram!==null&&this.diagram.changeState(this,!1))},We.Object.defineProperties(vo.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===da&&(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}}}),vo.prototype.redo=vo.prototype.redo,vo.prototype.canRedo=vo.prototype.canRedo,vo.prototype.undo=vo.prototype.undo,vo.prototype.canUndo=vo.prototype.canUndo,vo.prototype.getParam=vo.prototype.Dz,vo.prototype.getValue=vo.prototype.I,vo.prototype.clear=vo.prototype.clear;var da=new xe(vo,"Transaction",-1),co=new xe(vo,"Property",0),Uo=new xe(vo,"Insert",1),ts=new xe(vo,"Remove",2);vo.className="ChangedEvent",vo.Transaction=da,vo.Property=co,vo.Insert=Uo,vo.Remove=ts;function ps(){this.o=new Vt().freeze(),this.xa="",this.j=!1}ps.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},ps.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()},ps.prototype.canUndo=function(){return this.isComplete},ps.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()}},ps.prototype.canRedo=function(){return this.isComplete},ps.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()}},ps.prototype.ak=function(){if(this.isComplete){var a=this.changes;a.ka();for(var y=new yn,x=0;x<a.count;x++){var E=a.M(x);if(E!==null&&E.change===co&&E.object){var b=y.get(E.object);b||(b=new yn,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()}},We.Object.defineProperties(ps.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}}}),ps.prototype.optimize=ps.prototype.ak,ps.prototype.redo=ps.prototype.redo,ps.prototype.canRedo=ps.prototype.canRedo,ps.prototype.undo=ps.prototype.undo,ps.prototype.canUndo=ps.prototype.canUndo,ps.prototype.clear=ps.prototype.clear,ps.className="Transaction";function xo(){this.Pt=new le,this.Jd=!1,this.u=new Vt().freeze(),this.Ce=-1,this.o=999,this.Fe=!1,this.Np=null,this.bi=0,this.j=!1,this.Ie=new Vt().freeze(),this.hl=new Vt,this.tt=!0,this.Dt=this.rq=this.Gt=this.Ft=!1}xo.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},xo.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},xo.prototype.copyProperties=function(a){this.isEnabled=a.isEnabled,this.maxHistoryLength=a.maxHistoryLength,this.checksTransactionLevel=a.checksTransactionLevel},Pt=xo.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=""),eh(this,!0,a)},Pt.Kf=function(){return eh(this,!1,"")};function eh(a,y,x){if(a.isUndoingRedoing)return!1;a.checksTransactionLevel&&1>a.transactionLevel&&wn("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()}},xo.prototype.canUndo=function(){if(!this.isEnabled||0<this.transactionLevel)return!1;var a=this.transactionToUndo;return!!(a!==null&&a.canUndo())},xo.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){wn("undo error: "+y.toString())}finally{this.Ob("FinishedUndo","Undo",a),this.Fe=!1}}},xo.prototype.canRedo=function(){if(!this.isEnabled||0<this.transactionLevel)return!1;var a=this.transactionToRedo;return!!(a!==null&&a.canRedo())},xo.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){wn("redo error: "+y.toString())}finally{this.Ob("FinishedRedo","Redo",a),this.Fe=!1}}},xo.prototype.Ob=function(a,y,x){x===void 0&&(x=null);var E=new vo;for(E.change=da,E.propertyName=a,E.object=x,E.oldValue=y,a=this.models;a.next();)y=a.value,E.model=y,y.ds(E)},xo.prototype.Tu=function(a){if(this.isEnabled&&!this.isUndoingRedoing&&!this.skipsEvent(a)){var y=this.currentTransaction;y===null&&(this.Np=y=new ps);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||wn("Change not within a transaction: "+x.toString()))}},xo.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},We.Object.defineProperties(xo.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}}}),xo.prototype.handleChanged=xo.prototype.Tu,xo.prototype.redo=xo.prototype.redo,xo.prototype.undo=xo.prototype.undo,xo.prototype.canUndo=xo.prototype.canUndo,xo.prototype.discardHistoryAfterIndex=xo.prototype.lx,xo.prototype.rollbackTransaction=xo.prototype.Kf,xo.prototype.commitTransaction=xo.prototype.eb,xo.prototype.startTransaction=xo.prototype.Ea,xo.prototype.removeModel=xo.prototype.Rx,xo.prototype.addModel=xo.prototype.Xw,xo.prototype.clear=xo.prototype.clear,xo.className="UndoManager";function fr(){nn(this),this.H=AA,this.xa="",this.Jd=!0,this.nb=!1,this.wm=null,this.yy=new Is,this.Zr=-1}fr.prototype.toString=function(){return this.name!==""?this.name+" Tool":Zn(this.constructor)},fr.prototype.updateAdornments=function(){},fr.prototype.canStart=function(){return this.isEnabled},fr.prototype.doStart=function(){},fr.prototype.doActivate=function(){this.isActive=!0},fr.prototype.doDeactivate=function(){this.isActive=!1},fr.prototype.doStop=function(){},fr.prototype.doCancel=function(){this.transactionResult=null,this.stopTool()},fr.prototype.stopTool=function(){var a=this.diagram;a.currentTool===this&&(a.currentTool=null,a.currentCursor="")},fr.prototype.doMouseDown=function(){!this.isActive&&this.canStart()&&this.doActivate()},fr.prototype.doMouseMove=function(){},fr.prototype.doMouseUp=function(){this.stopTool()},fr.prototype.doMouseWheel=function(){},fr.prototype.canStartMultiTouch=function(){return!0},fr.prototype.standardPinchZoomStart=function(){var a=this.diagram,y=a.lastInput,x=y.So(0,Ot.allocAt(NaN,NaN)),E=y.So(1,Ot.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}Ot.free(x),Ot.free(E)},fr.prototype.standardPinchZoomMove=function(){var a=this.diagram,y=a.lastInput,x=y.So(0,Ot.allocAt(NaN,NaN)),E=y.So(1,Ot.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 Ot((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}Ot.free(x),Ot.free(E)},fr.prototype.doKeyDown=function(){this.diagram.lastInput.key==="Esc"&&this.doCancel()},fr.prototype.doKeyUp=function(){},fr.prototype.Ea=function(a){return a===void 0&&(a=this.name),this.transactionResult=null,this.diagram.Ea(a)},fr.prototype.stopTransaction=function(){var a=this.diagram;return this.transactionResult===null?a.Kf():a.eb(this.transactionResult)},fr.prototype.standardMouseSelect=function(){var a=this.diagram;if(a.allowSelect){var y=a.lastInput,x=a.Ol(y.documentPoint,!1);if(x!==null){if(Cr?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||(Cr?y.meta:y.control)||y.shift||a.clearSelection()}},fr.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,nh(a,E,x),E.handled};function nh(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)}}}fr.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}},fr.prototype.doUpdateCursor=function(){var a=this.diagram;a&&(a.currentCursor="")},fr.prototype.doCurrentObjectChanged=function(){},fr.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===Ec&&!y.shift||b===VA&&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===Ec&&y.shift||b===VA&&!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)}}},fr.prototype.doWheelChange=function(a,y,x){a.position.D(y)&&x.event.wheelDeltaX===0||(x.bubbles=!1)},fr.prototype.standardWaitAfter=function(a,y){y===void 0&&(y=this.diagram.lastInput),this.cancelWaitAfter();var x=this,E=y.clone(this.yy);this.Zr=_i(function(){x.doWaitAfter(E)},a)},fr.prototype.cancelWaitAfter=function(){this.Zr!==-1&&sn.clearTimeout(this.Zr),this.Zr=-1},fr.prototype.doWaitAfter=function(){},fr.prototype.findToolHandleAt=function(a,y){return a=this.diagram.ic(a,function(x){for(;x!==null&&!(x.panel instanceof Sr);)x=x.panel;return x}),a===null?null:a.part.category===y?a:null},fr.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},We.Object.defineProperties(fr.prototype,{diagram:{get:function(){return this.H},set:function(a){a instanceof pe&&(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}}}),fr.prototype.startTransaction=fr.prototype.Ea,fr.className="Tool";function lo(){fr.call(this),this.name="ToolManager",this.hb=new Vt,this.ob=new Vt,this.Hb=new Vt,this.F=this.V=850,this.o=new Xe(2,2).ja(),this.Ha=5e3,this.ia=VA,this.u=vf,this.Mp=this.j=null,this.zj=-1}Le(lo,fr),lo.prototype.initializeStandardTools=function(){},lo.prototype.updateAdornments=function(a){var y=this.currentToolTip;if(y instanceof Sr&&this.Mp===a){var x=y.adornedObject;(a!==null?x.part===a:x===null)?this.showToolTip(y,x):this.hideToolTip()}},lo.prototype.doMouseDown=function(){var a=this.diagram,y=a.lastInput;if(y.isTouchEvent&&this.gestureBehavior===_A&&(y.bubbles=!1),y.isMultiTouch){if(this.cancelWaitAfter(),this.gestureBehavior===PA){y.bubbles=!0;return}if(this.gestureBehavior===_A)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===VA?this.mouseWheelBehavior=Ec:this.mouseWheelBehavior===Ec&&(this.mouseWheelBehavior=VA)),this.doActivate(),this.standardWaitAfter(this.holdDelay,y)},lo.prototype.doMouseMove=function(){var a=this.diagram,y=a.lastInput;if(y.isMultiTouch){if(this.gestureBehavior===PA){y.bubbles=!0;return}if(this.gestureBehavior===_A)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}}ig(this,a),a=y.event,a===null||a.type!=="pointermove"&&a.cancelable||(y.bubbles=!0)};function ig(a,y){a.standardMouseOver(),a.isBeyondDragSize()&&a.standardWaitAfter(a.isActive?a.holdDelay:a.hoverDelay,y.lastInput)}lo.prototype.doCurrentObjectChanged=function(a,y){a=this.currentToolTip,a===null||y!==null&&a instanceof Sr&&(y===a||y.rg(a))||this.hideToolTip()},lo.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()))},lo.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)},lo.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 Sr)||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()},lo.prototype.showToolTip=function(a,y){var x=this.diagram;if(a!==this.currentToolTip&&this.hideToolTip(),a instanceof Sr){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 iA&&a!==this.currentToolTip&&a.show(y,x,this);if(this.currentToolTip=a,this.zj!==-1&&(sn.clearTimeout(this.zj),this.zj=-1),a=this.toolTipDuration,0<a&&a!==1/0){var b=this;this.zj=_i(function(){b.hideToolTip()},a)}},lo.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}},lo.prototype.hideToolTip=function(){this.zj!==-1&&(sn.clearTimeout(this.zj),this.zj=-1);var a=this.diagram,y=this.currentToolTip;y!==null&&(y instanceof Sr?(a.remove(y),this.Mp!==null&&this.Mp.Jf(y.category),y.data=null,y.adornedObject=null):y instanceof iA&&y.hide!==null&&y.hide(a,this),this.currentToolTip=null)},lo.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()},lo.prototype.doMouseWheel=function(){this.standardMouseWheel()},lo.prototype.doKeyDown=function(){var a=this.diagram;a.commandHandler!==null&&a.commandHandler.doKeyDown()},lo.prototype.doKeyUp=function(){var a=this.diagram;a.commandHandler!==null&&a.commandHandler.doKeyUp()},lo.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},lo.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},lo.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)},We.Object.defineProperties(lo.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 Sr?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}}}),lo.prototype.replaceStandardTool=lo.prototype.gb;var VA=new xe(lo,"WheelScroll",0),Ec=new xe(lo,"WheelZoom",1),sd=new xe(lo,"WheelNone",2),vf=new xe(lo,"GestureZoom",3),_A=new xe(lo,"GestureCancel",4),PA=new xe(lo,"GestureNone",5);lo.className="ToolManager",lo.WheelScroll=VA,lo.WheelZoom=Ec,lo.WheelNone=sd,lo.GestureZoom=vf,lo.GestureCancel=_A,lo.GestureNone=PA;function Bo(){fr.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 Ot(NaN,NaN),this.Fr=new Ot,this.hb=!0,this.Ik=100,this.Cg=[],this.te=new le().freeze(),this.ia=new st,this.Bn=null,this.F="copy",this.Oc="",this.Pc="no-drop"}var FA;Le(Bo,fr),Bo.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},Bo.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},Bo.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,(Cr?y.meta:y.control)||y.shift||a.clearSelection(!0),this.currentPart.isSelected=!0,a.R("ChangedSelection",a.selection))}}},Bo.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),us=null,this.isActive=!0,this.tl.set(a.position),yf(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&&Aa(a),jc(a,this.draggedParts),this.Ea("Drag"),this.startPoint=a.firstInput.documentPoint,a.isMouseCaptured=!0,a.allowDragOut&&(this.isDragOutStarted=!0,this.Ym=!1,us=this,mu=this.diagram,this.doSimulatedDragOut()))};function yf(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 Xa,a.Oe.diagram=x),a.Oe.originalLink=a.draggedLink):(a.draggedLink=null,a.Oe=null))}}Bo.prototype.computeEffectiveCollection=function(a,y){return this.diagram.commandHandler.computeEffectiveCollection(a,y)},Bo.prototype.Pd=function(a){return a===void 0?new kA(Ni):this.isGridSnapEnabled?new kA(new Ot(Math.round(1e3*a.x)/1e3,Math.round(1e3*a.y)/1e3)):new kA(a.copy())},Bo.prototype.doDeactivate=function(){this.isActive=!1;var a=this.diagram;if(this.diagram.layout.isRealtime=this.Sw,a.Fu(!1),a.ug(),ih(this),ku(a,this.draggedParts),this.draggedParts=this.currentPart=this.Bn=null,this.Ym=this.isDragOutStarted=!1,0<FA.count){for(var y=FA,x=y.length,E=0;E<x;E++){var b=y.M(E);du(b),Ql(b),ih(b),b.diagram.ug()}y.clear()}du(this),this.tl.h(NaN,NaN),mu!==null&&(mu.currentCursor=""),us=mu=null,Ql(this),a.isMouseCaptured=!1,a.currentCursor="",a.Ns=!1,this.stopTransaction(),Hh(a,!0)},Bo.prototype.stopTransaction=function(){var a=this.diagram,y=fr.prototype.stopTransaction.call(this);return y&&a.undoManager.transactionToUndo!==null&&a.undoManager.transactionToUndo.ak(),y};function ih(a){var y=a.diagram,x=y.skipsUndoManager;y.skipsUndoManager=!0,ad(a,y.lastInput,null),y.skipsUndoManager=x,a.Cg.length=0}function Mh(){var a=us;Ql(a),eA(a);var y=a.diagram;a.tl.w()&&(y.position=a.tl),y.ug()}Bo.prototype.doCancel=function(){Ql(this),eA(this);var a=this.diagram;this.tl.w()&&(a.position=this.tl),this.stopTool()},Bo.prototype.doKeyDown=function(){var a=this.diagram,y=a.lastInput;this.isActive&&(y.key==="Esc"?this.doCancel():y.key!==a.previousInput.key&&this.doMouseMove())},Bo.prototype.doKeyUp=function(){this.isActive&&this.doMouseMove()};function WA(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")):eA(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 yn,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,yf(a,x.Lf()),a.draggedLink!==null&&(x=a.draggedLink,y=x.routeBounds,cc(x,a.startPoint.x-(y.x+y.width/2),a.startPoint.y-(y.y+y.height/2))),a.doUpdateCursor(null)}}}function Ql(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 Ot(0,0));a.doUpdateCursor(null)}y.skipsUndoManager=!1,y.partManager.addsToTemporaryLayer=!1,a.startPoint=y.firstInput.documentPoint}function du(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 tA(a,y,x){var E=a.diagram,b=a.startPoint,z=Ot.alloc();z.assign(E.lastInput.documentPoint),a.moveParts(y,z.re(b),x),Ot.free(z),E.Gf("temporaryPixelRatio")===!0&&E.Yh===null&&30<E.$w&&(Aa(E),E.hk())}Bo.prototype.moveParts=function(a,y,x){x===void 0&&(x=!1);var E=this.diagram;E!==null&&fh(E,a,y,this.dragOptions,x)};function eA(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()),cc(E,-b.x,-b.y)}y.bd()}}function wf(a,y){var x=a.diagram;a.dragsLink&&(a.draggedLink!==null&&(a.draggedLink.fromNode=null,a.draggedLink.toNode=null),gu(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=ad(a,b,E),!a.isActive&&us===null)return;var rt=E!==null?E.part:null;if(rt===null||x.handlesDragDropForTopLevelParts&&rt.isTopLevel&&!(rt instanceof Ti)){var ot=x.mouseDragOver;ot!==null&&(ot(b),tt=!0)}if(!a.isActive&&us===null||(a.doDragOver(y,E),!a.isActive&&us===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)}Bo.prototype.findDragOverObject=function(a){var y=this;return LA(this.diagram,a,null,function(x){return x===null?x=!0:(x=x.part,x=!!(x===null||x instanceof Sr||x.layer.isTemporary||y.draggedParts&&y.draggedParts.contains(x)||y.copiedParts&&y.copiedParts.contains(x))),!x})},Bo.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 ad(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&&us===null||x===null)return E;for(y.handled=!1,b=x;b!==null;)a.Cg.push(b),b=ld(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 ld(a){var y=a.panel;return y!==null?y:a instanceof ii&&!(a instanceof Ti)&&(a=a.containingGroup,a!==null&&a.handlesDragDropForMembers)?a:null}function rg(a,y,x){var E=a.Oe;if(E===null)return null;var b=a.diagram.og(y,E.portGravity,function(at){return E.findValidLinkablePort(at,x)});a=Ot.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(Ui,a);ot=y.Bf(ot),ot<z&&(tt=rt,z=ot)}}return Ot.free(a),tt}function gu(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=rg(a,x.i(0),!1),z!==null&&(tt=z.part));var rt=null,ot=null;x.toNode===null&&(rt=rg(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)):Sf(b,tt,z,ot,rt):Sf(b,null,null,null,null)}}}}Bo.prototype.doDragOver=function(){};function pu(a,y){var x=a.diagram;a.dragsLink&&gu(a,!0),ih(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;Jg(a,b,z),z=ld(z)}}else z=x.mouseDrop,z!==null&&z(b);if(a.isActive||us!==null){for(b=(a.copiedParts||a.draggedParts).iterator;b.next();)z=b.key,z instanceof gn&&z.linksConnected.each(function(rt){rt.suspendsRouting=!1});if(a.doDropOnto(y,E),a.isActive||us!==null){for(a=Me.alloc(),y=x.selection.iterator;y.next();)E=y.value,E instanceof gn&&qg(x,E,a);Me.free(a)}}}function Jg(a,y,x){a=a.diagram,x=x.part,!a.handlesDragDropForTopLevelParts||!x.isTopLevel||x instanceof Ti||(x=a.mouseDrop,x!==null&&x(y))}function qg(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()}Bo.prototype.doDropOnto=function(){},Bo.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()?(WA(this,!1),jc(a,this.copiedParts),tA(this,this.copiedParts,!1),ku(a,this.copiedParts)):this.mayMove()?(Ql(this),tA(this,this.draggedParts,!0)):this.mayDragOut()?(WA(this,!1),tA(this,this.copiedParts,!1)):Ql(this),wf(this,a.lastInput.documentPoint))}},Bo.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?(Ql(this),WA(this,!0),jc(a,this.copiedParts),tA(this,this.copiedParts,!1),ku(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,Ql(this),this.mayMove()&&(tA(this,this.draggedParts,!0),wf(this,a.lastInput.documentPoint))),this.Ym=!0,pu(this,a.lastInput.documentPoint),this.isActive){var E=x?this.copiedParts.Lf():this.draggedParts.Lf();this.copiedParts=null,y&&$g(this),a.Ya(),ku(a,this.draggedParts),this.transactionResult=x?"Copy":"Move",a.R(x?"SelectionCopied":"SelectionMoved",E)}this.stopTool(),x&&a.R("ChangedSelection",a.selection)}}},Bo.prototype.simulatedMouseMove=function(a,y,x){if(us===null)return!1;var E=us.diagram;x instanceof pe||(x=null);var b=mu;return x!==b&&(b!==null&&b!==E&&(b.ug(),us.isDragOutStarted=!1,b=b.toolManager.findTool("Dragging"),b!==null&&b.doSimulatedDragLeave()),mu=x,x!==null&&x!==E&&(Mh(),b=x.toolManager.findTool("Dragging"),b!==null&&(FA.contains(b)||FA.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)},Bo.prototype.simulatedMouseUp=function(a,y,x){if(us===null)return!1;var E=mu,b=us.diagram;if(x===null)return us.doCancel(),!0;if(x!==E){var z=E.toolManager.findTool("Dragging");if(E!==null&&E!==b&&z!==null)return E.ug(),us.isDragOutStarted=!1,z.doSimulatedDragLeave(),!1;mu=x,E=x.toolManager.findTool("Dragging"),E!==null&&(Mh(),FA.contains(E)||FA.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 Ot),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=us,a!==null&&(x=a.mayCopy(),a.transactionResult=x?"Copy":"Move",a.stopTool()),!0):!1};function $g(a){if(a.draggedParts!==null)for(var y=a.draggedParts.iterator;y.next();){var x=y.key;x instanceof gn&&(x=x.containingGroup,x===null||x.placeholder===null||a.draggedParts.contains(x)||x.placeholder.v())}}Bo.prototype.mayCopy=function(){if(!this.isCopyEnabled)return!1;var a=this.diagram;if(a.isReadOnly||a.isModelReadOnly||!a.allowInsert||!a.allowCopy||(Cr?!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())},Bo.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())},Bo.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())},Bo.prototype.computeBorder=function(a,y,x){return this.Ym||this.draggedParts===null||this.draggedParts.contains(a)?null:x.assign(y)},Bo.prototype.Az=function(){return us},Bo.prototype.mayDragIn=function(){var a=this.diagram;if(!a.allowDrop||a.isReadOnly||a.isModelReadOnly||!a.allowInsert)return!1;var y=us;return!(y===null||y.diagram.model.dataFormat!==a.model.dataFormat)},Bo.prototype.doSimulatedDragEnter=function(){if(this.mayDragIn()){var a=this.diagram;a.animationManager.Cc(),ga(a),a.animationManager.Cc(),a=us,a!==null&&(a.diagram.Ns=!1),this.doUpdateCursor(null)}},Bo.prototype.doSimulatedDragLeave=function(){var a=us;a!==null&&a.doSimulatedDragOut(),this.doCancel()},Bo.prototype.doSimulatedDragOver=function(){var a=this.diagram;a.animationManager.Dm=!0;var y=us;if(y!==null&&y.draggedParts!==null){if(!this.mayDragIn())return;og(this,y.draggedParts.Lf(),!1,a.firstInput),tA(this,this.copiedParts,!1),wf(this,a.lastInput.documentPoint)}a.animationManager.Dm=!1},Bo.prototype.doSimulatedDrop=function(){var a=this.diagram,y=us;if(y!==null){var x=y.diagram;if(y.Ym=!0,Ql(this),!this.mayDragIn())return;a.animationManager.Dm=!0,a.R("ChangingSelection",a.selection),this.Ea("Drop"),og(this,y.draggedParts.Lf(),!0,a.lastInput),tA(this,this.copiedParts,!1);var E=new le;this.copiedParts!==null&&(a.clearSelection(!0),this.copiedParts.iteratorKeys.each(function(b){b.isSelected=!0,E.add(b)})),pu(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 og(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=Me.alloc();b=E=1/0;for(var tt=-1/0,rt=-1/0,ot=y.iterator;ot.next();){var at=ot.value;if(at.isVisible()){var At=at.location;at=At.x,At=At.y,isNaN(at)||isNaN(At)||(at<E&&(E=at),At<b&&(b=At),at>tt&&(tt=at),At>rt&&(rt=At))}}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,Me.free(z),z=a.Fr,tt=new yn,rt=Ot.alloc(),ot=y.iterator;ot.next();)at=ot.value,at instanceof en&&at.canCopy()&&(At=x.I(at),At!==null&&(At.points=at.points,cc(At,z.x-E,z.y-b),At.suspendsRouting=!0,tt.add(At,a.Pd())));for(y=y.iterator;y.next();)at=y.value,at.Zc()&&at.canCopy()&&(ot=x.I(at),ot!==null&&(at=at.location,rt.h(z.x-(E-at.x),z.y-(b-at.y)),ot.location=rt,ot.Va(),tt.add(ot,a.Pd(rt))));Ot.free(rt),a.copiedParts=tt,yf(a,tt.Lf()),a.draggedLink!==null&&(x=a.draggedLink,y=x.routeBounds,cc(x,a.startPoint.x-(y.x+y.width/2),a.startPoint.y-(y.y+y.height/2))),a.doUpdateCursor(null)}}}Bo.prototype.doSimulatedDragOut=function(){var a=this.diagram;a.Ns=!1,this.mayCopy()||this.mayMove()?a.currentCursor="":a.currentCursor=this.nodropCursor,this.Bn=null},Bo.prototype.computeMove=function(a,y,x,E){return x=this.diagram,x!==null?x.computeMove(a,y,this.dragOptions,E):new Ot},We.Object.defineProperties(Bo.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}}}),Bo.prototype.getDraggingSource=Bo.prototype.Az;var us=null,mu=null;Bo.className="DraggingTool",FA=new Vt,an("draggingTool",function(){return this.findTool("Dragging")},function(a){this.gb("Dragging",a,this.mouseMoveTools)}),lo.prototype.doCancel=function(){us!==null&&us.doCancel(),fr.prototype.doCancel.call(this)};function Io(){fr.call(this),this.te=100,this.Ha=!1,this.u="pointer";var a=new en,y=new Oi;y.isPanelMain=!0,y.stroke="blue",a.add(y),y=new Oi,y.toArrow="Standard",y.fill="blue",y.stroke="blue",a.add(y),a.layerName="Tool",this.Ci=a,a=new gn,y=new Oi,y.portId="",y.figure="Rectangle",y.fill=null,y.stroke="magenta",y.strokeWidth=2,y.desiredSize=mr,a.add(y),a.selectable=!1,a.layerName="Tool",this.Bi=a,this.j=y,a=new gn,y=new Oi,y.portId="",y.figure="Rectangle",y.fill=null,y.stroke="magenta",y.strokeWidth=2,y.desiredSize=mr,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 yn,this.Of=this.gj=this.Pf=null}Le(Io,fr),Io.prototype.doStop=function(){this.diagram.ug(),this.originalToPort=this.originalToNode=this.originalFromPort=this.originalFromNode=this.originalLink=null,this.validPortsCache.clear(),this.targetPort=null},Io.prototype.copyPortProperties=function(a,y,x,E,b){if(a!==null&&y!==null&&x!==null&&E!==null){var z=y.Df(),tt=Xe.alloc();tt.width=y.naturalBounds.width*z,tt.height=y.naturalBounds.height*z,E.desiredSize=tt,Xe.free(tt),b?(E.toSpot=y.toSpot,E.toEndSegmentLength=y.toEndSegmentLength):(E.fromSpot=y.fromSpot,E.fromEndSegmentLength=y.fromEndSegmentLength),x.locationSpot=Ui,z=Ot.alloc(),x.location=y.ga(Ui,z),Ot.free(z),E.angle=y.li(),this.portTargeted!==null&&this.portTargeted(a,y,x,E,b)}},Io.prototype.setNoTargetPortProperties=function(a,y,x){y!==null&&(y.desiredSize=mr,y.fromSpot=$i,y.toSpot=$i),a!==null&&(a.location=this.diagram.lastInput.documentPoint),this.portTargeted!==null&&this.portTargeted(null,null,a,y,x)},Io.prototype.doMouseDown=function(){this.isActive&&this.doMouseMove()},Io.prototype.doMouseMove=function(){if(this.isActive){var a=this.diagram;if(this.targetPort=this.findTargetPort(this.isForwards),this.targetPort!==null&&this.targetPort.part instanceof gn){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)}},Io.prototype.findValidLinkablePort=function(a,y){if(a===null)return null;var x=a.part;if(!(x instanceof gn))return null;for(;a!==null;){var E=y?a.toLinkable:a.fromLinkable;if(E===!0&&(a.portId!==null||a instanceof gn)&&(y?this.isValidTo(x,a):this.isValidFrom(x,a)))return a;if(E===!1)break;a=a.panel}return null},Io.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 gn){var ot=tt.ga(Ui,Ot.alloc()),at=x.x-ot.x,At=x.y-ot.y;Ot.free(ot),ot=at*at+At*At,ot<E&&(at=this.validPortsCache.I(tt),at!==null?at&&(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 gn&&(x.layer===null||x.layer.allowLink))?y:null},Io.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},Io.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},Io.prototype.isInSameNode=function(a,y){return a===null||y===null?!1:a===y?!0:(a=a.part,y=y.part,a!==null&&a===y)},Io.prototype.isLinked=function(a,y){if(a===null||y===null)return!1;var x=a.part;if(!(x instanceof gn))return!1;a=a.portId,a===null&&(a="");var E=y.part;if(!(E instanceof gn))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},Io.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)},Io.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 le;return E.add(a),Xs(this,x,y,E)};function Xs(a,y,x,E){if(y===x)return!0;var b=y.fromNode;return b!==null&&b.isLinkLabel&&(E.add(b),Xs(a,b.labeledLink,x,E))?!0:(y=y.toNode,!!(y!==null&&y.isLinkLabel&&(E.add(y),Xs(a,y.labeledLink,x,E))))}Io.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!==Xc){if(E===Rf){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!oa(this,a,y,x,!0)}if(E===kd){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!oa(this,a,y,x,!0)}if(E===Zh)return a===y?a=!0:(E=new le,E.add(y),a=sa(this,E,a,y,x)),!a;if(E===Jh)return!oa(this,a,y,x,!1);if(E===Hf)return a===y?a=!0:(E=new le,E.add(y),a=vu(this,E,a,y,x)),!a}return!0};function oa(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&&oa(a,tt,x,E,b)))return!0}return!1}function sa(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&&sa(a,y,tt,E,b)))return!0}return!1}function vu(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&&vu(a,y,rt,E,b))return!0}}return!1}We.Object.defineProperties(Io.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}}}),Io.className="LinkingBaseTool";function Gs(){Io.call(this),this.name="Linking",this.V={},this.F=null,this.K=rh,this.Xd=null}Le(Gs,Io),Gs.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},Gs.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 gn)))return null;var x=this.direction;if(x===rh||x===sg){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===rh||x===ag)&&(y=this.findValidLinkablePort(y,!0),y!==null||this.startObject===a&&(y=a.port,this.findValidLinkablePort(y,!0)))?(this.isForwards=!1,y):null},Gs.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 gn&&(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 gn&&(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)},Gs.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()},Gs.prototype.doStop=function(){Io.prototype.doStop.call(this),this.startObject=null},Gs.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 gn&&(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)}}},Gs.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)},Gs.prototype.insertLink=function(a,y,x,E){return this.diagram.partManager.insertLink(a,y,x,E)},Gs.prototype.doNoLink=function(){},We.Object.defineProperties(Gs.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 rh=new xe(Gs,"Either",0),sg=new xe(Gs,"ForwardsOnly",0),ag=new xe(Gs,"BackwardsOnly",0);Gs.className="LinkingTool",Gs.Either=rh,Gs.ForwardsOnly=sg,Gs.BackwardsOnly=ag;function Xa(){Io.call(this),this.name="Relinking";var a=new Oi;a.figure="Diamond",a.desiredSize=ir,a.fill="lightblue",a.stroke="dodgerblue",a.cursor=this.linkingCursor,a.segmentIndex=0,this.V=a,a=new Oi,a.figure="Diamond",a.desiredSize=ir,a.fill="lightblue",a.stroke="dodgerblue",a.cursor=this.linkingCursor,a.segmentIndex=-1,this.Xd=a,this.F=null,this.Ew=new Me}Le(Xa,Io),Xa.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)}},Xa.prototype.makeAdornment=function(a,y){var x=new Sr;return x.type=je.Link,y=y?this.toHandleArchetype:this.fromHandleArchetype,y!==null&&x.add(y.copy()),x.adornedObject=a,x},Xa.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},Xa.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 Sr&&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=nr),this.temporaryFromNode!==null&&(this.temporaryFromNode.location=this.originalLink.i(0))),this.originalLink.toNode===null&&(this.temporaryToPort!==null&&(this.temporaryToPort.desiredSize=nr),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},Xa.prototype.copyLinkProperties=function(a,y){if(a!==null&&y!==null){y.adjusting=a.adjusting,y.corner=a.corner;var x=a.curve;(x===Lg||x===fc)&&(x=ka),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}},Xa.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()},Xa.prototype.doStop=function(){Io.prototype.doStop.call(this),this.handle=null},Xa.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 gn&&(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()}}},Xa.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},Xa.prototype.doNoRelink=function(){};function Sf(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)}We.Object.defineProperties(Xa.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 Sr))throw Error("new handle is not in an Adornment: "+a);this.F=a}}}),Xa.className="RelinkingTool",an("linkingTool",function(){return this.findTool("Linking")},function(a){this.gb("Linking",a,this.mouseMoveTools)}),an("relinkingTool",function(){return this.findTool("Relinking")},function(a){this.gb("Relinking",a,this.mouseDownTools)});function Ko(){fr.call(this),this.name="LinkReshaping";var a=new Oi;a.figure="Rectangle",a.desiredSize=Or,a.fill="lightblue",a.stroke="dodgerblue",this.o=a,a=new Oi,a.figure="Diamond",a.desiredSize=ir,a.fill="lightblue",a.stroke="dodgerblue",a.cursor="move",this.u=a,this.F=3,this.Ts=this.j=null,this.Fw=new Ot,this.Yq=new Vt}Le(Ko,fr),Ko.prototype.Ru=function(a){return a&&a.reshapingBehavior.value!==0?a.reshapingBehavior:Ad},Ko.prototype.om=function(a,y){a.reshapingBehavior=y},Ko.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)}},Ko.prototype.makeAdornment=function(a){var y=a.part,x=y.pointsCount,E=y.isOrthogonal,b=null;if(y.points!==null&&1<x){b=new Sr,b.type=je.Link,x=y.firstPickIndex;var z=y.lastPickIndex,tt=E?1:0;if(y.resegmentable&&y.computeCurve()!==kl)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 at=y.i(x+1);oe.B(ot.x,at.x)&&oe.B(ot.y,at.y)&&(at=y.i(x-1)),oe.B(ot.x,at.x)?(this.om(rt,wu),rt.cursor="n-resize"):oe.B(ot.y,at.y)&&(this.om(rt,yu),rt.cursor="w-resize")}else tt===z-1&&E?(ot=y.i(z-1),at=y.i(z),oe.B(ot.x,at.x)&&oe.B(ot.y,at.y)&&(ot=y.i(z+1)),oe.B(ot.x,at.x)?(this.om(rt,wu),rt.cursor="n-resize"):oe.B(ot.y,at.y)&&(this.om(rt,yu),rt.cursor="w-resize")):tt!==z&&(this.om(rt,xf),rt.cursor="move");b.add(rt)}b.adornedObject=a}return b},Ko.prototype.makeHandle=function(){var a=this.handleArchetype;return a===null?null:a.copy()},Ko.prototype.makeResegmentHandle=function(){var a=this.midHandleArchetype;return a===null?null:a.copy()},Ko.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},Ko.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}}},Ko.prototype.doDeactivate=function(){this.stopTransaction(),this.Ts=this.handle=null,this.isActive=this.diagram.isMouseCaptured=!1},Ko.prototype.stopTransaction=function(){var a=this.diagram,y=fr.prototype.stopTransaction.call(this);return y&&a.undoManager.transactionToUndo!==null&&a.undoManager.transactionToUndo.ak(),y},Ko.prototype.doCancel=function(){var a=this.adornedLink;a!==null&&(a.points=this.Yq),this.stopTool()},Ko.prototype.getResegmentingPoint=function(){return this.handle.ga(Ui)},Ko.prototype.doMouseMove=function(){var a=this.diagram;this.isActive&&(a=this.computeReshape(a.lastInput.documentPoint),this.reshape(a))},Ko.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&&(nA(this,tt,E,b,z,!0)||nA(this,tt,E,b,z,!1))){var rt=y.points.copy();nA(this,tt,E,b,z,!0)?(rt.cd(x-2,new Ot(tt.x,(z.y+tt.y)/2)),rt.cd(x+1,new Ot(z.x,(z.y+tt.y)/2))):(rt.cd(x-2,new Ot((z.x+tt.x)/2,tt.y)),rt.cd(x+1,new Ot((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&&(nA(this,E,b,z,tt,!0)||nA(this,E,b,z,tt,!1))&&(rt=y.points.copy(),nA(this,E,b,z,tt,!0)?(rt.cd(x-1,new Ot(E.x,(E.y+tt.y)/2)),rt.cd(x+2,new Ot(tt.x,(E.y+tt.y)/2))):(rt.cd(x-1,new Ot((E.x+tt.x)/2,E.y)),rt.cd(x+2,new Ot((E.x+tt.x)/2,tt.y))),rt.mb(x+1),rt.mb(x),y.points=rt,y.Wb())}}else tt=Ot.alloc(),oe.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()),Ot.free(tt)}a.Ya(),this.transactionResult=this.name,a.R("LinkReshaped",this.adornedLink,this.Yq)}this.stopTool()};function nA(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}Ko.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===wu?(y.L(x,y.i(x-1).x,a.y),y.L(x+1,y.i(x+2).x,a.y)):E===yu&&(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===wu?(y.L(x-1,y.i(x-2).x,a.y),y.L(x,y.i(x+1).x,a.y)):E===yu&&(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);oe.B(z.x,b.x)&&oe.B(b.y,tt.y)?(oe.B(z.x,y.i(E-2).x)&&!oe.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),oe.B(tt.y,y.i(E+2).y)&&!oe.B(tt.x,y.i(E+2).x)?y.m(E+1,tt.x,a.y):y.L(E+1,tt.x,a.y)):oe.B(z.y,b.y)&&oe.B(b.x,tt.x)?(oe.B(z.y,y.i(E-2).y)&&!oe.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),oe.B(tt.x,y.i(E+2).x)&&!oe.B(tt.y,y.i(E+2).y)?y.m(E+1,a.x,tt.y):y.L(E+1,a.x,tt.y)):oe.B(z.x,b.x)&&oe.B(b.x,tt.x)?(oe.B(z.x,y.i(E-2).x)&&!oe.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),oe.B(tt.x,y.i(E+2).x)&&!oe.B(tt.y,y.i(E+2).y)?y.m(E+1,a.x,tt.y):y.L(E+1,a.x,tt.y)):oe.B(z.y,b.y)&&oe.B(b.y,tt.y)&&(oe.B(z.y,y.i(E-2).y)&&!oe.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),oe.B(tt.y,y.i(E+2).y)&&!oe.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(Ui,Ot.alloc()),E=y.getLinkPointFromPoint(E,b,z,a,!0,Ot.alloc()),y.L(0,E.x,E.y),Ot.free(z),Ot.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(Ui,Ot.alloc()),a=y.getLinkPointFromPoint(E,b,x,a,!1,Ot.alloc()),y.L(y.pointsCount-1,a.x,a.y),Ot.free(x),Ot.free(a));y.zf()},Ko.prototype.computeReshape=function(a){var y=this.adornedLink,x=this.handle.segmentIndex;switch(this.Ru(this.handle)){case xf:return a;case wu:return new Ot(y.i(x).x,a.y);case yu:return new Ot(a.x,y.i(x).y);default:case Ad:return y.i(x)}},We.Object.defineProperties(Ko.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 Sr))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}}}),Ko.prototype.setReshapingBehavior=Ko.prototype.om,Ko.prototype.getReshapingBehavior=Ko.prototype.Ru;var Ad=new xe(Ko,"None",0),yu=new xe(Ko,"Horizontal",1),wu=new xe(Ko,"Vertical",2),xf=new xe(Ko,"All",3);Ko.className="LinkReshapingTool",Ko.None=Ad,Ko.Horizontal=yu,Ko.Vertical=wu,Ko.All=xf,an("linkReshapingTool",function(){return this.findTool("LinkReshaping")},function(a){this.gb("LinkReshaping",a,this.mouseDownTools)});function zs(){fr.call(this),this.name="Resizing",this.o=new Xe(1,1).freeze(),this.j=new Xe(9999,9999).freeze(),this.yg=new Xe(NaN,NaN).freeze(),this.V=!1,this.ia=!0,this.ue=null;var a=new Oi;a.alignmentFocus=Ui,a.figure="Rectangle",a.desiredSize=Or,a.fill="lightblue",a.stroke="dodgerblue",a.strokeWidth=1,a.cursor="pointer",this.F=a,this.u=null,this.Xq=new Ot,this.Dw=new Xe,this.Tn=new Ot,this.rt=new Xe(0,0),this.qt=new Xe(1/0,1/0),this.pt=new Xe(1,1)}Le(zs,fr),zs.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(),Jc(a)&&this.updateResizeHandles(x,y),a.bh(this.name,x);return}}a.Jf(this.name)}},zs.prototype.makeAdornment=function(a){var y=a.part.resizeAdornmentTemplate;if(y===null){y=new Sr,y.type=je.Spot,y.locationSpot=Ui;var x=new Ma;x.isPanelMain=!0,y.add(x),y.add(this.makeHandle(a,vr)),y.add(this.makeHandle(a,Dr)),y.add(this.makeHandle(a,Go)),y.add(this.makeHandle(a,ea)),y.add(this.makeHandle(a,vs)),y.add(this.makeHandle(a,rs)),y.add(this.makeHandle(a,Ys)),y.add(this.makeHandle(a,No))}else if(Yl(y),y=y.copy(),y===null)return null;return y.adornedObject=a,y},zs.prototype.makeHandle=function(a,y){return a=this.handleArchetype,a===null?null:(a=a.copy(),a.alignment=y,a)},zs.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=Ui),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 je)for(a=a.elements;a.next();)this.updateResizeHandles(a.value,y)}},zs.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},zs.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))},zs.prototype.doDeactivate=function(){var a=this.diagram;this.stopTransaction(),this.ue=this.handle=null,this.isActive=a.isMouseCaptured=!1},zs.prototype.stopTransaction=function(){var a=this.diagram,y=fr.prototype.stopTransaction.call(this);return y&&a.undoManager.transactionToUndo!==null&&a.undoManager.transactionToUndo.ak(),y},zs.prototype.doCancel=function(){this.adornedObject!==null&&(this.adornedObject.desiredSize=this.originalDesiredSize,this.adornedObject.part.location=this.originalLocation),this.stopTool()},zs.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,Ot.alloc()),z=this.computeReshape();y=this.computeResize(b,this.handle.alignment,y,x,E,z),this.resize(y),a.bd(),Ot.free(b)}},zs.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,Ot.alloc()),z=this.computeReshape();y=this.computeResize(b,this.handle.alignment,y,x,E,z),this.resize(y),Ot.free(b),a.Ya(),this.transactionResult=this.name,a.R("PartResized",this.adornedObject,this.originalDesiredSize)}this.stopTool()},zs.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 Ti){var E=new Vt;if(E.add(a),!this.dragsMembers&&a.placeholder===null){var b=new st;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()}},zs.prototype.computeResize=function(a,y,x,E,b,z){y.Mc()&&(y=Ui);var tt=this.adornedObject.naturalBounds,rt=tt.x,ot=tt.y,at=tt.x+tt.width,At=tt.y+tt.height,ft=1;if(!z){ft=tt.width;var pt=tt.height;0>=ft&&(ft=1),0>=pt&&(pt=1),ft=pt/ft}return pt=Ot.alloc(),oe.No(a.x,a.y,rt,ot,b.width,b.height,pt),a=tt.copy(),0>=y.x?0>=y.y?(a.x=Math.max(pt.x,at-E.width),a.x=Math.min(a.x,at-x.width),a.width=Math.max(at-a.x,x.width),a.y=Math.max(pt.y,At-E.height),a.y=Math.min(a.y,At-x.height),a.height=Math.max(At-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=at-a.width,a.y=At-a.height)):1<=y.y?(a.x=Math.max(pt.x,at-E.width),a.x=Math.min(a.x,at-x.width),a.width=Math.max(at-a.x,x.width),a.height=Math.max(Math.min(pt.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=at-a.width)):(a.x=Math.max(pt.x,at-E.width),a.x=Math.min(a.x,at-x.width),a.width=at-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*(At-ot-a.height))):1<=y.x?0>=y.y?(a.width=Math.max(Math.min(pt.x-rt,E.width),x.width),a.y=Math.max(pt.y,At-E.height),a.y=Math.min(a.y,At-x.height),a.height=Math.max(At-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=At-a.height)):1<=y.y?(a.width=Math.max(Math.min(pt.x-rt,E.width),x.width),a.height=Math.max(Math.min(pt.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(pt.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*(At-ot-a.height))):0>=y.y?(a.y=Math.max(pt.y,At-E.height),a.y=Math.min(a.y,At-x.height),a.height=At-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*(at-rt-a.width))):1<=y.y&&(a.height=Math.max(Math.min(pt.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*(at-rt-a.width))),Ot.free(pt),a},zs.prototype.computeReshape=function(){var a=Re;return this.adornedObject instanceof Oi&&(a=Hm(this.adornedObject)),!(a===Rn||this.diagram.lastInput.shift)},zs.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},zs.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},zs.prototype.computeCellSize=function(){var a=new Xe(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},We.Object.defineProperties(zs.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 Sr))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 Sr)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}}}),zs.className="ResizingTool",an("resizingTool",function(){return this.findTool("Resizing")},function(a){this.gb("Resizing",a,this.mouseDownTools)});function aa(){fr.call(this),this.name="Rotating",this.ia=45,this.V=2,this.Tn=new Ot,this.ue=null;var a=new Oi;a.figure="Ellipse",a.desiredSize=ir,a.fill="lightblue",a.stroke="dodgerblue",a.strokeWidth=1,a.cursor="pointer",this.o=a,this.j=null,this.Cw=0,this.kr=new Ot(NaN,NaN),this.u=0,this.F=50}Le(aa,fr),aa.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)}},aa.prototype.makeAdornment=function(a){var y=a.part.rotateAdornmentTemplate;if(y===null){y=new Sr,y.type=je.Position,y.locationSpot=Ui;var x=this.handleArchetype;x!==null&&y.add(x.copy())}else if(Yl(y),y=y.copy(),y===null)return null;return y.adornedObject=a,y},aa.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},aa.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)},aa.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(Ui)},aa.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)},aa.prototype.doDeactivate=function(){var a=this.diagram;this.stopTransaction(),this.ue=this.handle=null,this.kr=new Ot(NaN,NaN),this.isActive=a.isMouseCaptured=!1},aa.prototype.stopTransaction=function(){var a=this.diagram,y=fr.prototype.stopTransaction.call(this);return y&&a.undoManager.transactionToUndo!==null&&a.undoManager.transactionToUndo.ak(),y},aa.prototype.doCancel=function(){this.diagram.delaysLayout=!1,this.rotate(this.originalAngle),this.stopTool()},aa.prototype.doMouseMove=function(){var a=this.diagram;this.isActive&&(a=this.computeRotate(a.lastInput.documentPoint),this.rotate(a))},aa.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()},aa.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()}},aa.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},We.Object.defineProperties(aa.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 Sr))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 Sr)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}}}),aa.className="RotatingTool",an("rotatingTool",function(){return this.findTool("Rotating")},function(a){this.gb("Rotating",a,this.mouseDownTools)});function oh(){fr.call(this),this.name="ClickSelecting"}Le(oh,fr),oh.prototype.canStart=function(){return!(!this.isEnabled||this.isBeyondDragSize())},oh.prototype.doMouseUp=function(){this.isActive&&(this.standardMouseSelect(),!this.standardMouseClick()&&this.diagram.lastInput.isTouchEvent&&this.diagram.toolManager.doToolTip()),this.stopTool()},oh.className="ClickSelectingTool";function Bl(){fr.call(this),this.name="Action",this.pk=null}Le(Bl,fr),Bl.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},Bl.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()},Bl.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))}},Bl.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()},Bl.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())},Bl.prototype.doStop=function(){this.pk=null},Bl.className="ActionTool";function Su(){fr.call(this),this.name="ClickCreating",this.Ri=null,this.o=!0,this.j=!1,this.mw=new Ot(0,0)}Le(Su,fr),Su.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)},Su.prototype.doMouseUp=function(){var a=this.diagram;this.isActive&&this.insertPart(a.lastInput.documentPoint),this.stopTool()},Su.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 ii)x.Zc()&&(Yl(x),E=x.copy(),E!==null&&y.add(E));else if(x!==null){var b=y.model.copyNodeData(x);Ne(b)&&(y.model.xf(b),E=y.Lc(b))}if(E!==null){var z=Ot.allocAt(a.x,a.y);this.isGridSnapEnabled&&Kc(this.diagram,E,a,z),E.location=z,y.allowSelect&&(y.clearSelection(!0),E.isSelected=!0),Ot.free(z)}y.Ya(),this.transactionResult=this.name,y.R("PartCreated",E)}finally{this.stopTransaction(),y.R("ChangedSelection",y.selection)}return E},We.Object.defineProperties(Su.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}}}),Su.className="ClickCreatingTool";function hl(){fr.call(this),this.name="DragSelecting",this.Ik=175,this.o=!1;var a=new ii;a.layerName="Tool",a.selectable=!1;var y=new Oi;y.name="SHAPE",y.figure="Rectangle",y.fill=null,y.stroke="magenta",a.add(y),this.j=a}Le(hl,fr),hl.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))},hl.prototype.doActivate=function(){var a=this.diagram;this.isActive=!0,a.isMouseCaptured=!0,a.skipsUndoManager=!0,a.add(this.box),this.doMouseMove()},hl.prototype.doDeactivate=function(){var a=this.diagram;a.ug(),a.remove(this.box),a.skipsUndoManager=!1,this.isActive=a.isMouseCaptured=!1},hl.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=Xe.alloc().h(y.width,y.height);x.desiredSize=E,this.box.mm(y.x,y.y,!1),Xe.free(E),(a.allowHorizontalScroll||a.allowVerticalScroll)&&a.gs(a.lastInput.viewPoint)}},hl.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()},hl.prototype.computeBoxBounds=function(){var a=this.diagram;return new Me(a.firstInput.documentPoint,a.lastInput.documentPoint)},hl.prototype.selectInRect=function(a){var y=this.diagram,x=y.lastInput;if(a=y.ux(a,this.isPartialInclusion),Cr?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 Vt,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)}},We.Object.defineProperties(hl.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}}}),hl.className="DragSelectingTool";function Ns(){fr.call(this),this.name="Panning",this.Xt=new Ot,this.xy=new Ot,this.xg=!1;var a=this;this.Kw=function(){var y=a.diagram;y!==null&&y.removeEventListener(sn.document,"scroll",a.Kw,!1),a.stopTool()}}Le(Ns,fr),Ns.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())},Ns.prototype.doActivate=function(){var a=this.diagram;this.xg?(a.lastInput.bubbles=!0,a.addEventListener(sn.document,"scroll",this.Kw,!1)):(a.currentCursor="move",a.isMouseCaptured=!0,this.Xt.assign(a.position)),this.isActive=!0},Ns.prototype.doDeactivate=function(){var a=this.diagram;a.currentCursor="",this.isActive=a.isMouseCaptured=!1},Ns.prototype.doCancel=function(){var a=this.diagram;a.position=this.Xt,a.isMouseCaptured=!1,this.stopTool()},Ns.prototype.doMouseMove=function(){this.move()},Ns.prototype.doMouseUp=function(){this.move(),this.stopTool()},Ns.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)}},We.Object.defineProperties(Ns.prototype,{bubbles:{get:function(){return this.xg},set:function(a){this.xg=a}},originalPosition:{get:function(){return this.Xt}}}),Ns.className="PanningTool",an("clickCreatingTool",function(){return this.findTool("ClickCreating")},function(a){this.gb("ClickCreating",a,this.mouseUpTools)}),an("clickSelectingTool",function(){return this.findTool("ClickSelecting")},function(a){this.gb("ClickSelecting",a,this.mouseUpTools)}),an("panningTool",function(){return this.findTool("Panning")},function(a){this.gb("Panning",a,this.mouseMoveTools)}),an("dragSelectingTool",function(){return this.findTool("DragSelecting")},function(a){this.gb("DragSelecting",a,this.mouseMoveTools)}),an("actionTool",function(){return this.findTool("Action")},function(a){this.gb("Action",a,this.mouseDownTools)});function iA(){this.F=this.u=this.j=this.o=null}We.Object.defineProperties(iA.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}}}),iA.className="HTMLInfo";function cl(a,y,x){this.text=a,this.hx=y,this.visible=x}cl.className="ContextMenuButtonInfo";function la(){fr.call(this),this.name="ContextMenu",this.o=this.ht=this.j=null,this.yw=new Ot,this.jt=null,this.Et=!1;var a=this;this.tu=function(){a.stopTool()}}Le(la,fr);function Ul(a){var y=new iA;y.show=function(b,z,tt){tt.showDefaultContextMenu()},y.hide=function(b,z){z.hideDefaultContextMenu()},Bu=y,a.tu=function(){a.stopTool()},y=un("div");var x=un("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=un("style");sn.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",jo,!1),E.addEventListener(y,"selectstart",jo,!1),E.addEventListener(x,"contextmenu",jo,!1)),y.className="goCXforeground",x.className="goCXbackground",sn.document.body&&(sn.document.body.appendChild(y),sn.document.body.appendChild(x)),kc=y,kh=x,Mc=!0}function jo(a){return a.preventDefault(),!1}la.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)},la.prototype.doStart=function(){this.yw.set(this.diagram.firstInput.documentPoint)},la.prototype.doStop=function(){this.hideContextMenu(),this.currentObject=null},la.prototype.findObjectWithContextMenu=function(a){a===void 0&&(a=null);var y=this.diagram,x=y.lastInput,E=null;if(a instanceof pe||(a instanceof re?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},la.prototype.doActivate=function(){},la.prototype.doMouseDown=function(){if(fr.prototype.doMouseDown.call(this),this.isActive&&this.currentContextMenu instanceof Sr){var a=this.diagram.toolManager.findTool("Action");a!==null&&a.canStart()&&(a.doActivate(),a.doMouseDown(),a.doDeactivate())}this.diagram.toolManager.mouseDownTools.contains(this)&&Za(this)},la.prototype.doMouseUp=function(){if(this.isActive&&this.currentContextMenu instanceof Sr){var a=this.diagram.toolManager.findTool("Action");a!==null&&a.canStart()&&(a.doActivate(),a.doCancel(),a.doDeactivate())}Za(this)};function Za(a){var y=a.diagram;if(a.isActive){var x=a.currentContextMenu;if(x!==null){var E=null;x instanceof iA||(E=y.ic(y.lastInput.documentPoint,null,null),E!==null&&E.rg(x)&&a.standardMouseClick(null,null)),a.maybeStopTool(E)}}else a.canStart()&&(YA(a,!0),a.isActive||a.stopTool())}la.prototype.maybeStopTool=function(){this.stopTool(),this.canStart()&&(this.diagram.currentTool=this,this.doMouseUp())};function YA(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=Bu,x===null&&(x=a.findObjectWithContextMenu()),x!==null){var E=x.contextMenu;E!==null?(a.currentObject=x instanceof re?x:null,a.showContextMenu(E,a.currentObject)):y!==null&&a.showContextMenu(y,a.currentObject)}else y!==null&&a.showContextMenu(y,null);a.currentContextMenu instanceof Sr&&!a.currentContextMenu.visible&&a.stopTool()}}la.prototype.doMouseMove=function(){var a=this.diagram.toolManager.findTool("Action");a!==null&&a.doMouseMove(),this.isActive&&this.diagram.toolManager.doMouseMove()},la.prototype.showContextMenu=function(a,y){var x=this.diagram;if(a!==this.currentContextMenu&&this.hideContextMenu(),a instanceof Sr){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 iA&&a.show(y,x,this);this.currentContextMenu=a},la.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}},la.prototype.hideContextMenu=function(){var a=this.diagram,y=this.currentContextMenu;y!==null&&(y instanceof Sr?(a.remove(y),this.ht!==null&&this.ht.Jf(y.category),y.data=null,y.adornedObject=null):y instanceof iA&&(y.hide!==null?y.hide(a,this):y.mainElement!==null&&(y.mainElement.style.display="none")),this.currentContextMenu=null,this.standardMouseOver())};function xu(a){var y=new Vt;return y.add(new cl("Copy",function(x){x.commandHandler.copySelection()},function(x){return x.commandHandler.canCopySelection()})),y.add(new cl("Cut",function(x){x.commandHandler.cutSelection()},function(x){return x.commandHandler.canCutSelection()})),y.add(new cl("Delete",function(x){x.commandHandler.deleteSelection()},function(x){return x.commandHandler.canDeleteSelection()})),y.add(new cl("Paste",function(x){x.commandHandler.pasteSelection(a.mouseDownPoint)},function(x){return x.commandHandler.canPasteSelection(a.mouseDownPoint)})),y.add(new cl("Select All",function(x){x.commandHandler.selectAll()},function(x){return x.commandHandler.canSelectAll()})),y.add(new cl("Undo",function(x){x.commandHandler.undo()},function(x){return x.commandHandler.canUndo()})),y.add(new cl("Redo",function(x){x.commandHandler.redo()},function(x){return x.commandHandler.canRedo()})),y.add(new cl("Scroll To Part",function(x){x.commandHandler.scrollToPart()},function(x){return x.commandHandler.canScrollToPart()})),y.add(new cl("Zoom To Fit",function(x){x.commandHandler.zoomToFit()},function(x){return x.commandHandler.canZoomToFit()})),y.add(new cl("Reset Zoom",function(x){x.commandHandler.resetZoom()},function(x){return x.commandHandler.canResetZoom()})),y.add(new cl("Group Selection",function(x){x.commandHandler.groupSelection()},function(x){return x.commandHandler.canGroupSelection()})),y.add(new cl("Ungroup Selection",function(x){x.commandHandler.ungroupSelection()},function(x){return x.commandHandler.canUngroupSelection()})),y.add(new cl("Edit Text",function(x){x.commandHandler.editTextBlock()},function(x){return x.commandHandler.canEditTextBlock()})),y}la.prototype.showDefaultContextMenu=function(){var a=this.diagram;this.jt===null&&(this.jt=xu(this)),kc.innerHTML="",kh.addEventListener("pointerdown",this.tu,!1);var y=this,x=un("ul");x.className="goCXul",kc.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=un("li"),z.className="goCXli";var tt=un("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)}}kc.style.display="block",kh.style.display="block"},la.prototype.hideDefaultContextMenu=function(){if(this.currentContextMenu!==null&&this.currentContextMenu===Bu){kc.style.display="none",kh.style.display="none";var a=this.diagram;a!==null&&a.removeEventListener(kh,"pointerdown",this.tu,!1),this.currentContextMenu=null}},We.Object.defineProperties(la.prototype,{currentContextMenu:{get:function(){return this.j},set:function(a){this.j=a,this.ht=a instanceof Sr?a.adornedPart:null}},defaultTouchContextMenu:{get:function(){return Mc===!1&&Bu===null&&Co&&Ul(this),Bu},set:function(a){a===null&&(Mc=!0),Bu=a}},currentObject:{get:function(){return this.o},set:function(a){this.o=a}},mouseDownPoint:{get:function(){return this.yw}}});var Bu=null,Mc=!1,kh=null,kc=null;la.className="ContextMenuTool",an("contextMenuTool",function(){return this.findTool("ContextMenu")},function(a){this.gb("ContextMenu",a,this.mouseUpTools)});function $r(){fr.call(this),this.name="TextEditing",this.Zh=new Jr,this.ia=null,this.V=bh,this.vj=null,this.qa=Th,this.u=1,this.F=!0,this.o=null,this.j=new iA,this.kt=null,bc(this,this.j)}Le($r,fr);function bc(a,y){if(Co){var x=un("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(Tc)):b==="Tab"?(a.acceptText(Zs),E.preventDefault()):b==="Escape"&&(a.doCancel(),a.diagram!==null&&a.diagram.doFocus())}},!1),x.addEventListener("focus",function(){if(a.currentTextEditor!==null&&a.state!==Th){var E=a.kt;a.qa===Ih&&(a.qa=Ic),typeof E.select=="function"&&a.selectsTextOnActivate&&(E.select(),E.setSelectionRange(0,9999))}},!1),x.addEventListener("blur",function(){if(a.currentTextEditor!==null&&a.state!==Th){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 Jr&&z instanceof $r)if(z.state===Nc)x.style.border="3px solid red",x.focus();else{var tt=E.ga(Ui),rt=b.position,ot=b.scale,at=E.Df()*ot;at<z.minimumEditorScale&&(at=z.minimumEditorScale);var At=E.naturalBounds.width*at+6,ft=E.naturalBounds.height*at+2,pt=(tt.x-rt.x)*ot;tt=(tt.y-rt.y)*ot,rt=E.verticalAlignment,ot=(E.lineHeight+E.spacingAbove+E.spacingBelow)*E.lineCount*at,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*at+"%",x.style.lineHeight="normal",x.style.width=At+"px",x.style.left=(pt-At/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=at,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)}}}$r.prototype.canStart=function(){if(!this.isEnabled)return!1;var a=this.diagram;if(a===null||a.isReadOnly||Cu&&Cu!==this&&(Cu.acceptText(rA),Cu&&Cu!==this)||!a.lastInput.left||this.isBeyondDragSize())return!1;var y=a.ic(a.lastInput.documentPoint);return y!==null&&y instanceof Jr&&y.editable&&y.part.canEdit()?(y=y.part,!(y===null||this.starting===bh&&!y.isSelected||this.starting===Cf&&2>a.lastInput.clickCount)):!1},$r.prototype.doStart=function(){Cu=this,this.textBlock!==null&&this.doActivate()},$r.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 Jr&&(this.textBlock=y,y.part!==null)){a.animationManager.Cc(),this.isActive=!0,this.qa=Ih;var x=this.defaultTextEditor;y.textEditor!==null&&(x=y.textEditor),this.Zh=this.textBlock.copy();var E=new Me(this.textBlock.ga(vr),this.textBlock.ga(Go));a.tv(E),x.show(y,a,this),this.currentTextEditor=x}}}},$r.prototype.doCancel=function(){this.stopTool()},$r.prototype.doMouseUp=function(){this.canStart()&&this.doActivate()},$r.prototype.doMouseDown=function(){this.isActive&&this.acceptText(rA)},$r.prototype.acceptText=function(a){switch(a){case rA:this.qa===Nh?this.currentTextEditor instanceof HTMLElement&&this.currentTextEditor.focus():(this.qa===Ih||this.qa===Nc||this.qa===Ic)&&(this.qa=hd,ud(this));break;case Bf:case Tc:case Zs:(Tc!==a||this.textBlock.isMultiline!==!0)&&(this.qa===Ih||this.qa===Nc||this.qa===Ic)&&(this.qa=hd,ud(this))}};function ud(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=Nh,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=Nc,a.doError(b,z))}}$r.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)},$r.prototype.doSuccess=function(a,y){var x=this.textBlock;x.textEdited!==null&&x.textEdited(x,a,y)},$r.prototype.doDeactivate=function(){var a=this.diagram;a!==null&&(this.qa=Th,this.currentTextEditor!==null&&this.currentTextEditor.hide(a,this),this.textBlock=null,this.isActive=!1)},$r.prototype.doStop=function(){Cu=null},$r.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)))},$r.prototype.Lx=function(a){var y=this.Zh;return y.text=a,y.measure(this.textBlock.Ih,1/0),y},We.Object.defineProperties($r.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)}}}),$r.prototype.measureTemporaryTextBlock=$r.prototype.Lx;var Bf=new xe($r,"LostFocus",0),rA=new xe($r,"MouseDown",1),Zs=new xe($r,"Tab",2),Tc=new xe($r,"Enter",3),tp=new xe($r,"SingleClick",0),bh=new xe($r,"SingleClickSelected",1),Cf=new xe($r,"DoubleClick",2),Th=new xe($r,"StateNone",0),Ih=new xe($r,"StateActive",1),Ic=new xe($r,"StateEditing",2),hd=new xe($r,"StateValidating",3),Nc=new xe($r,"StateInvalid",4),Nh=new xe($r,"StateValidated",5),Cu=null;$r.className="TextEditingTool",$r.LostFocus=Bf,$r.MouseDown=rA,$r.Tab=Zs,$r.Enter=Tc,$r.SingleClick=tp,$r.SingleClickSelected=bh,$r.DoubleClick=Cf,$r.StateNone=Th,$r.StateActive=Ih,$r.StateEditing=Ic,$r.StateValidating=hd,$r.StateInvalid=Nc,$r.StateValidated=Nh,an("textEditingTool",function(){return this.findTool("TextEditing")},function(a){this.gb("TextEditing",a,this.mouseUpTools)});function Ha(a){lh||(cd(),lh=!0),this.H=AA,this.Ok=this.zb=this.vq=this.bc=!1,this.Qw=!0,this.Pk=lA,this.Dm=!1,this.Gh=this.Jd=!0,this.Dg=600,this.cw=this.Ow=!1,this.Zd=new le,this.ce=new Qs,this.ce.Yd=this,this.Ei=new le,this.pu=new le,this.Sr=new le,this.pr=new le,a&&Object.assign(this,a)}Ha.prototype.Xe=function(a){this.H=a},Ha.prototype.canStart=function(){return!0};function oA(a,y){a.Jd&&a.canStart(y)&&(a.Zd.add(y),a.defaultAnimation.isAnimating&&a.Cc(),Us(a.H),a.zb=!0)}function dr(a){if(a.Jd&&a.zb){var y=a.ce,x=a.H,E=a.Zd.contains("Model");E&&(a.Ok=!0,a.Pk===lA?(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===Ff&&y.vc.clear(),a.Qw=!!(a.Pk===Qc&&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(),Ah(y,x),a.Ok=!1,x.N()):(a.Zd.clear(),x.kg=!1,E=y.vc.get(x),x.autoScale!==js&&E!==null&&(delete E.start.scale,delete E.end.scale),sn.requestAnimationFrame(function(){a.zb===!1||y.bc||(x.Gf("temporaryPixelRatio")&&Aa(x),bf(x),a.zb=!1,y.start(),y.bc&&(Pu(a),x.Ya(),fd(y,0),ga(x,!0),Fu(a),x.R("AnimationStarting",a)))}))}}function XA(a){return a.Zd.contains("Trigger")&&a.Zd.count===1}function Pf(a,y,x,E){a.isTicking||XA(a)||y instanceof en&&(y.fromNode!==null||y.toNode!==null)||a.ce.add(y,"position",x,E,!1)}Pt=Ha.prototype,Pt.fv=function(a){return this.ce.fv(a)},Pt.Xu=function(a){return this.ce.Xu(a)};function Qh(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 re&&ot.diagram!==null||ot instanceof pe){rt=!0;break t}}rt=!1}rt?Uc(tt,!1):tt.Xk=!0}}b.pu.clear(),b.bc!==!1&&(Pu(b),ga(b.H),Fu(b)),sn.requestAnimationFrame(x)}}var E=a.Ei,b=a;a.bc?a.Sr.add(y):(a.bc=!0,E.add(y),sn.requestAnimationFrame(function(){x()}))}function sA(a){for(a=a.Ei.iterator;a.next();)a.value.Xk=!1}function Pu(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 Fu(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(),Ah(y,null),a===!0)for(a=this.Ei.Fa(),y=0;y<a.length;y++)a[y].Ml(!0)}else y.vc.clear(),Ah(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),Fa(this,a))},Pt.Aj=function(a,y){this.zb&&(this.Zd.contains("Collapse Tree")||this.Zd.contains("Collapse SubGraph"))&&(this.ce.Aj(a,y),Lu(this.ce,y,"position",y.position,y.position),Fa(this,a))};function Uh(a,y,x){!a.zb||y.D(x)||XA(a)||(a.H.pi||(y=x.copy()),Lu(a.ce,a.H,"position",y,x))}function sh(a,y,x){y.fd&&(y.Tg=x,a.pr.add(y))}function Fa(a,y){for(y=y.findLinksConnected();y.next();){var x=y.value;x.fd&&(x.Tg=x.points.copy(),a.pr.add(x))}}function ah(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],at=y[1],At=y[2];return y=y[3],rt===0||rt===100?(z=ot,tt=at):(At===0||At===100)&&(ot=z,at=tt),180<Math.abs(ot-z)&&(ot>z?z+=360:ot+=360),z=b(x,z,ot-z,E)%360,tt=b(x,tt,at-tt,E),rt=b(x,rt,At-rt,E),x=b(x,a,y-a,E),"hsla("+z+", "+tt+"%, "+rt+"%, "+x+")"}function cd(){function a(x,E,b,z,tt,rt){x.position=new Ot(z(tt,E.x,b.x-E.x,rt),z(tt,E.y,b.y-E.y,rt))}var y=new yn;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 Ot(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 Ot(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 Ot(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,at=b.actualBounds;b=at.x+at.width/2-ot.width/2,ot=at.y+at.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 Ot(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 Me(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=ah(E,b,tt,rt,z)}),y.add("stroke",function(x,E,b,z,tt,rt){x.stroke=ah(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=ah(E,b,tt,rt,z)}),y.add("areaBackground",function(x,E,b,z,tt,rt){x.areaBackground=ah(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)}),aA=y}We.Object.defineProperties(Ha.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&&Sn(a,">= 1",Ha,"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}}}),Ha.prototype.stopAnimation=Ha.prototype.Cc;var aA=null,lh=!1,lA=new xe(Ha,"Default",1),Qc=new xe(Ha,"AnimateLocations",2),Ff=new xe(Ha,"None",3);Ha.className="AnimationManager",Ha.defineAnimationEffect=function(a,y){lh||(cd(),lh=!0),aA.add(a,y)},Ha.Default=lA,Ha.AnimateLocations=Qc,Ha.None=Ff;function Qs(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=Dh,this.Wk=this.ho=!1,this.cu=1,this.au=0,this.Gd=this.Dg=NaN,this.gw=0,this.dn=null,this.o=Ni,this.vc=new yn,this.Tt=new yn,this.yl=new le,this.Ut=new le,this.dw=qA,a&&Object.assign(this,a)}Qs.prototype.suspend=function(){this.Xk=!0},Qs.prototype.advanceTo=function(a,y){y&&(this.Xk=!1),this.ho&&a>=this.Gd&&(this.Wk=!0,a-=this.Gd),this.gw=a,Uc(this,!0),Pu(this.Yd),ga(this.H),Fu(this.Yd),this.H.redraw()};function Ah(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=Qs.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 pe?a=x:x instanceof re&&(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===lA&&this===y.defaultAnimation&&(this.Lp=lg,this.Gd=isNaN(this.Dg)?y.duration===600?900:y.duration:this.Dg),this.dw=a.scrollMode,this.isViewportUnconstrained&&(a.sj=qh),Pu(y),this.yl.each(function(E){E.data=null,a.add(E)}),Fu(y),this.bc=!0,this.Qd=+new Date,this.cn=this.Qd+this.Gd,Qh(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 pe?this.H=a:a instanceof re&&a.diagram!==null&&(this.H=a.diagram)),a instanceof ii){if(!a.isAnimated)return this;y==="position"&&(y="position:part")}return Lu(this,a,y,x,E,b),this};function Lu(a,y,x,E,b,z){var tt=a.vc;if(y instanceof pe&&x==="position"&&(x="position:diagram"),(x==="fill"||x==="stroke"||x==="background"||x==="areaBackground")&&(nu(E),np(),E=[Ye.j,Ye.u,Ye.o,Ye.F],nu(b),np(),b=[Ye.j,Ye.u,Ye.o,Ye.F]),tt.contains(y)){var rt=tt.I(y),ot=rt.start,at=rt.end;ot[x]===void 0&&(ot[x]=uh(E)),at[x]=uh(b)}else ot={},at={},ot[x]=uh(E),at[x]=uh(b),rt=ot.position,y instanceof re&&rt instanceof Ot&&!rt.w()&&y.diagram.animationManager.Zd.contains("Expand SubGraph")&&rt.assign(at.position),rt=new hh(ot,at,z),tt.add(y,rt);tt=ot[x],tt instanceof Ot&&!tt.w()&&tt.assign(a.o),z&&x.indexOf("position:")===0&&y instanceof ii?rt.Ku.location=uh(y.location):z&&(rt.Ku[x]=uh(E))}function uh(a){return a instanceof Ot||a instanceof Xe?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 Uc(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),Pu(x),fd(a,b),ga(a.H,!0),Fu(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 fd(a,y){for(var x=a.Gd,E=a.vc.iterator,b=a.Wk;E.next();){var z=E.key;if(!(z instanceof re&&z.diagram===null)){var tt=E.value,rt=b?tt.end:tt.start;tt=b?tt.start:tt.end;var ot=aA,at;for(at in tt)at==="position"&&(tt["position:placeholder"]||tt["position:nodeCollapse"])||ot.get(at)===null||ot.get(at)(z,rt[at],tt[at],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,Pu(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=aA;E.next();){var tt=E.key,rt=E.value,ot=b?rt.end:rt.start,at=b?rt.start:rt.end,At=rt.Ku,ft;for(ft in at)if(z.get(ft)!==null){var pt=ft;!rt.Hu||pt!=="position:nodeCollapse"&&pt!=="position:placeholder"||(pt="position"),z.get(pt)(tt,ot[ft],At[ft]!==void 0?At[ft]:rt.Hu?ot[ft]:at[ft],this.Lp,this.Gd,this.Gd,this)}rt.Hu&&At.location!==void 0&&tt instanceof ii&&(tt.location=At.location),rt.nv&&tt instanceof ii&&tt.Zb(!1)}if(y.As.clear(),Hh(y,!1),y.Ya(),y.N(),ga(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()}ga(y,!0),this.isViewportUnconstrained&&(y.scrollMode=this.dw),Fu(x),this.au++,!a&&this.cu>this.au?(this.Wk=!1,this.start()):(this.dn&&this.dn(this),Ah(this,null),x.Ml(this),y.$b())}},Pt.Cj=function(a,y){var x=y.actualBounds,E=null;if(y instanceof Ti&&(E=y.placeholder),E!==null?(x=E.ga(vr),E=E.padding,x.x+=E.left,x.y+=E.top,this.add(a,"position",x,a.position,!1)):this.add(a,"position",new Ot(x.x+x.width/2,x.y+x.height/2),a.position,!1),this.add(a,"scale",.01,a.scale,!1),a instanceof Ti)for(a=a.memberParts;a.next();)E=a.value,E instanceof gn&&this.Cj(E,y)},Pt.Aj=function(a,y){if(a.isVisible()){var x=null;if(y instanceof Ti&&(x=y.placeholder),x!==null){var E=x.ga(vr);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 Ti)for(a=a.memberParts;a.next();)E=a.value,E instanceof gn&&this.Aj(E,y)}},Pt.Ez=function(a){var y=this.Tt.get(a);return y===null&&(y={},this.Tt.add(a,y)),y},We.Object.defineProperties(Qs.prototype,{duration:{get:function(){return this.Dg},set:function(a){1>a&&Sn(a,">= 1",Qs,"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:Yt("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}}}),Qs.prototype.getTemporaryState=Qs.prototype.Ez,Qs.prototype.stop=Qs.prototype.stop,Qs.prototype.add=Qs.prototype.add,Qs.prototype.addTemporaryPart=Qs.prototype.Iy;function Dh(a,y,x,E){return a/=E/2,1>a?x/2*a*a+y:-x/2*(--a*(a-2)-1)+y}function lg(a,y,x,E){return a===E?y+x:x*(-Math.pow(2,-10*a/E)+1)+y}Qs.className="Animation",Qs.EaseLinear=function(a,y,x,E){return x*a/E+y},Qs.EaseInOutQuad=Dh,Qs.EaseInQuad=function(a,y,x,E){return x*(a/=E)*a+y},Qs.EaseOutQuad=function(a,y,x,E){return-x*(a/=E)*(a-2)+y},Qs.EaseInExpo=function(a,y,x,E){return a===0?y:x*Math.pow(2,10*(a/E-1))+y},Qs.EaseOutExpo=lg;function hh(a,y,x){this.start=a,this.end=y,this.Ku={},this.Hu=x,this.nv=!1}hh.className="AnimationState";function Dl(a,y,x){this.xd=null,this.rf=a,this.so=x||gd,this.uk=null,y!==void 0&&(this.uk=y,x===void 0&&(this.so=ch))}Dl.prototype.copy=function(){var a=new Dl(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 dd(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))}We.Object.defineProperties(Dl.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 gd=new xe(Dl,"Default",1),ch=new xe(Dl,"Immediate",2),Oh=new xe(Dl,"Bundled",3);Dl.className="AnimationTrigger",Dl.Default=gd,Dl.Immediate=ch,Dl.Bundled=Oh;function ms(a){nn(this),this.H=null,this.Pa=new Vt,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=ms.prototype,Pt.clear=function(){for(var a=this.Pa,y=0;y<a.length;y++){var x=a.s[y];x.Ig=null,Di(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 Ti?b++:ot instanceof gn?E++:ot instanceof en?z++:ot instanceof Sr?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&&On(E)&&(rt+=" #"+On(E)),x instanceof gn?rt+=" "+rr(E):x instanceof en&&(rt+=" "+rr(x.fromNode)+" "+rr(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=Ot.alloc(),z=this.Pa.s,tt=z.length;tt--;){var rt=z[tt];if((E!==!0||Jc(rt)!==!1)&&rt.isVisible()&&(b.assign(a),In(b,rt.oe),rt=rt.ic(b,y,x),rt!==null&&(y!==null&&(rt=y(rt)),rt!==null&&(x===null||x(rt)))))return Ot.free(b),rt}return Ot.free(b),null},Pt.ji=function(a,y,x,E){if(y===void 0&&(y=null),x===void 0&&(x=null),E instanceof Vt||E instanceof le||(E=new le),this.Uh===!1)return E;var b=!1;this.diagram!==null&&this.diagram.viewportBounds.ca(a)&&(b=!0);for(var z=Ot.alloc(),tt=this.Pa.s,rt=tt.length;rt--;){var ot=tt[rt];if((b!==!0||Jc(ot)!==!1)&&ot.isVisible()){z.assign(a),In(z,ot.oe);var at=ot;ot.ji(z,y,x,E)&&(y!==null&&(at=y(at)),at===null||x!==null&&!x(at)||E.add(at))}}return Ot.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 Vt||b instanceof le||(b=new le),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||Jc(ot)!==!1)&&ot.isVisible()){var at=ot;ot.Cf(a,y,x,E,b)&&(y!==null&&(at=y(at)),at===null||x!==null&&!x(at)||b.add(at))}}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 at=rt[ot];if((tt!==!0||Jc(at)!==!1)&&z(at)&&at.isVisible()){var At=at;at.Cf(a,y,x,E,b)&&(y!==null&&(At=y(At)),At===null||x!==null&&!x(At)||b.add(At))}}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 Vt||b instanceof le)&&(z=b),b=!0),z instanceof Vt||z instanceof le||(z=new le),this.Uh===!1)return z;var tt=!1;this.diagram!==null&&this.diagram.viewportBounds.ca(a)&&(tt=!0);for(var rt=Ot.alloc(),ot=Ot.alloc(),at=this.Pa.s,At=at.length;At--;){var ft=at[At];if((tt!==!0||Jc(ft)!==!1)&&ft.isVisible()){rt.assign(a),In(rt,ft.oe),ot.h(a.x+y,a.y),In(ot,ft.oe);var pt=ft;ft.og(rt,ot,x,E,b,z)&&(x!==null&&(pt=x(pt)),pt===null||E!==null&&!E(pt)||z.add(pt))}}return Ot.free(rt),Ot.free(ot),z},Pt.Fd=function(a,y){if(this.visible){var x=this.Pa.s,E=x.length;if(E!==0){a=Qn();for(var b=Qn(),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 Sr&&tt.adornedPart!==null)continue;var rt=tt.actualBounds;tt.isVisible()&&Da(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],Zm(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++)Zm(b[y]);Dn(a),Dn(b)}}};function ZA(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=ZA(this,a);var z=this.Zq;z.length=0;for(var tt=y.scale,rt=Me.alloc(),ot=0;ot<E;ot++)this.Oj(a,x[ot],y,z,tt,rt,!0);if(Me.free(rt),a.isTemporary)for(y=0;y<E;y++)x[y].Gj();a.globalAlpha=b}}};function Dc(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=ZA(a,y),rt=a.Zq;rt.length=0;for(var ot=x.scale,at=Me.alloc(),At=0;At<z;At++){var ft=b[At];E.contains(ft)&&a.Oj(y,ft,x,rt,ot,at,!1)}Me.free(at),y.globalAlpha=tt}}}Pt.Oj=function(a,y,x,E,b,z,tt){if(tt&&!Jc(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 Ea?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&&(yo(y,a,y.areaBackground,!0,!0,z,b),a.fillRect(b.x,b.y,b.width,b.height)),y.areaBackground===null&&y.background===null&&(yo(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),yo(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(co,a,this,y,x,E,b)},Pt.oi=function(a,y,x){var E=this.Pa;if(y.Ig=this,this===null&&Di(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,Di(y),a};function Lf(a,y,x){if(y=Ef(a,y,x),x instanceof Ti&&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 Ef(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}We.Object.defineProperties(ms.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===""&&Yt("Cannot rename default Layer to: "+a),x=x.layers;x.next();)x.value.name===a&&Yt("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)&&Sn(a,"0 <= value <= 1",ms,"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))}}}),ms.prototype.findObjectsNear=ms.prototype.og,ms.prototype.findObjectsIn=ms.prototype.Cf,ms.prototype.findObjectsAt=ms.prototype.ji,ms.prototype.findObjectAt=ms.prototype.ic,ms.className="Layer";function pe(a,y){if(tu||(hs(),tu=!0),nn(this),AA=this,this.vb=!0,this.Ka=null,this.ya=this.Aa=0,this.ta=null,Co){var x=this,E=function(){x.removeEventListener(sn.document,"DOMContentLoaded",E,!1),x.setRTL()};sn.document.body!==null?this.setRTL():x.addEventListener(sn.document,"DOMContentLoaded",E,!1)}this.ol=null,Of.add("Model",Nr);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===co&&tt.updateDataBindings(z.object,z.propertyName)}finally{tt.diagram.aa=!0}}},this.Oc=function(z){b.partManager.doModelChanged(z)},this.hu=this.ku=null,Ag(this),this.model=Pv(),this.Wg=!0,Tf(this),this.layout=new po,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 $h,a!==void 0&&(typeof a=="string"||sn.Element&&a instanceof Element?Oc(this,a):y=a),this.vb=!1,y&&this.nm(y),this}var Eu,AA;function Ag(a){a.Yd=new Ha,a.Yd.Xe(a),a.Db=17,a.Gw=!1,a.tn=!1,a.bu="default",a.Wa=new Vt,a.pj=new yn,a.nl="default",a.Tx(),a.Sx(),a.pb=1,a.pa=new Ot(NaN,NaN).freeze(),a.du=new Ot(NaN,NaN),a.Ca=1,a.Pp=1,a.zt=new Ot(NaN,NaN).freeze(),a.At=NaN,a.Ot=1e-4,a.Mt=100,a.Ab=new Ei,a.zu=new Ot(NaN,NaN).freeze(),a.ut=new Me(NaN,NaN,NaN,NaN).freeze(),a.rj=new Xi(0,0,0,0).freeze(),a.sj=qA,a.nu=!1,a.Zt=null,a.fu=null,a.yh=js,a.zk=is,a.Fg=js,a.pq=is,a.yt=vr,a.Bt=vr,a.Fc=!0,a.pn=!1,a.De=new le,a.Eh=new yn,a.Xm=!0,a.vp=250,a.vk=-1,a.xp=new Xi(16,16,16,16).freeze(),a.kg=!1,a.Jk=!1,a.fn=!0,a.bq=new Is,a.bq.diagram=a,a.Qg=new Is,a.Qg.diagram=a,a.cj=new Is,a.cj.diagram=a,a.zg=null,a.pf=null,a.qu=!1,gg(a),a.ai=new le,a.Ht=!0,a.uu=Iu,a.pw=!1,a.wu=Xc,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 yn,a.Xn=new Vt,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 Xi(5).freeze(),a.Hw=new le().freeze(),a.Nt=999999999,a.nw=new le().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 le,a.ow=new le,a.Xh=null,a.aw=new Xe(8,8),a.bw=999,a.Bw=1,a.Jw=0,a.fc={scale:1,position:new Ot,bounds:new Me,Py:new Xe,bA:new Xe,Oz:!1},a.fc.canvasSize=a.fc.Py,a.fc.newCanvasSize=a.fc.bA,a.fc.isScroll=!1,a.Rw=new Me(NaN,NaN,NaN,NaN).freeze(),a.wo=new Xe(NaN,NaN).freeze(),a.Sp=new Me(NaN,NaN,NaN,NaN).freeze(),a.It=!1,a.Lg=new yn;var y=new gn,x=new Jr;x.bind(new Jo("text","",rr)),y.add(x),a.ny=y,a.Lg.add("",y),y=new gn,x=new Jr,x.stroke="brown",x.bind(new Jo("text","",rr)),y.add(x),a.Lg.add("Comment",y),y=new gn,y.selectable=!1,y.avoidable=!1,x=new Oi,x.figure="Ellipse",x.fill="black",x.stroke=null,x.desiredSize=new Xe(3,3).ja(),y.add(x),a.Lg.add("LinkLabel",y),a.Yi=new yn,y=new Ti,y.selectionObjectName="GROUPPANEL",y.type=je.Vertical,x=new Jr,x.font="bold 12pt sans-serif",x.bind(new Jo("text","",rr)),y.add(x),x=new je(je.Auto),x.name="GROUPPANEL";var E=new Oi;E.figure="Rectangle",E.fill="rgba(128,128,128,0.2)",E.stroke="black",x.add(E),E=new Ma,E.padding=new Xi(5,5,5,5).ja(),x.add(E),y.add(x),a.ly=y,a.Yi.add("",y),a.Kh=new yn,y=new en,x=new Oi,x.isPanelMain=!0,y.add(x),x=new Oi,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 Oi,x.isPanelMain=!0,x.stroke="brown",y.add(x),a.Kh.add("Comment",y),y=new Sr,y.type=je.Auto,x=new Oi,x.fill=null,x.stroke="dodgerblue",x.strokeWidth=3,y.add(x),x=new Ma,x.margin=new Xi(1.5,1.5,1.5,1.5).ja(),y.add(x),a.St=y,a.wt=y,y=new Sr,y.type=je.Link,x=new Oi,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 Nr,a.toolManager=new lo,a.toolManager.initializeStandardTools(),a.defaultTool=a.toolManager,a.currentTool=a.defaultTool,a.nt=null,a.Wm=new st,a.Vt=null,a.Wt=null,a.Mr=!1,a.commandHandler=kf(),a.eq=null,a.fq=ki,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 Ot,a.zy=500,a.wp=new Ot,a.wq=!1}pe.prototype.clear=function(){this.animationManager.Cc(),this.model.clear(),ph=null,bu="",Mf(this,!1),this.Xn.clear(),xg(),this.Og.clear(),this.Xh=null,this.Ya(),this.Va(),this.N()};function Mf(a,y){a.animationManager.Cc(!0),a.Hw=new le().freeze(),a.nw=new le().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(),xg(),a.Og.clear(),Yr=[],b!==null&&(a.add(b),a.partManager.parts.remove(b)),E&&(a.skipsUndoManager=x),z}function kf(){return null}pe.prototype.reset=function(){this.clear(),this.vb=!0,Ag(this),Ol(this),this.Wg=!0,Tf(this),this.layout=new po,this.Wg=!1,this.model=Pv(),this.model.undoManager=new xo,this.vb=this.rn=!1,this.N()},pe.prototype.setRTL=function(a){a=a===void 0?this.div:a,a===null&&(a=sn.document.body);var y=un("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},pe.prototype.setScrollWidth=function(a){a=a===void 0?this.div:a,a===null&&(a=sn.document.body);var y=0;if(Co){var x=Md;y=Eu,x===null&&(x=Md=un("p"),x.style.width="100%",x.style.height="200px",x.style.boxSizing="content-box",y=Eu=un("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||Cr||(y=11)}this.Db=y,this.Gw=!0},pe.prototype.qb=function(a){a.classType===pe&&(this.autoScale=a)},pe.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 Oc(a,y){if(Co){if(y!=null||Yt("Diagram setup requires an argument DIV."),a.Ka!==null&&Yt("Diagram has already completed setup."),typeof y=="string"?a.Ka=sn.document.getElementById(y):y instanceof HTMLDivElement?a.Ka=y:Yt("No DIV or DIV id supplied: "+y),a.Ka===null&&Yt("Invalid DIV id; could not get element with id: "+y),a.Ka.H!==void 0&&Yt("Invalid div id; div already has a Diagram associated with it."),!a.ol&&sn.ResizeObserver){var x=li(function(){a.$b()},250);a.ol=new sn.ResizeObserver(function(){x()}),a.ol.observe(a.Ka)}sn.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=sn.go;var b=new El(a);if(b.style!==void 0&&(b.style.position="absolute",b.style.top="0px",b.style.left="0px",sn.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),Sd(a,a.Aa,a.ya),a.Ka.insertBefore(b.Oa,a.Ka.firstChild),b=new El(null),b.width=1,b.height=1,a.jw=b,a.oy=b.context,Co){b=un("div");var z=un("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=cg,b.addEventListener("pointerdown",fg),b.H=a,b.uy=!0,b.vy=!0,a.ku=b,a.hu=z}a.hk=li(function(){a.Yh=null,a.N()},300),a.Ov=li(function(){bf(a)},250),a.preventDefault=function(tt){return tt.preventDefault(),!1},a.$j=function(tt){if(a.isEnabled){var rt=fl(a,tt,!0);rt.bubbles=!0;var ot=0,at=0;rt.delta=0,tt.deltaX!==void 0?(tt.deltaX!==0&&(ot=0<tt.deltaX?1:-1),tt.deltaY!==0&&(at=0<tt.deltaY?1:-1),rt.delta=Math.abs(tt.deltaX)>Math.abs(tt.deltaY)?-ot:-at):tt.wheelDeltaX!==void 0?(tt.wheelDeltaX!==0&&(ot=0<tt.wheelDeltaX?-1:1),tt.wheelDeltaY!==0&&(at=0<tt.wheelDeltaY?-1:1),rt.delta=Math.abs(tt.wheelDeltaX)>Math.abs(tt.wheelDeltaY)?-ot:-at):tt.wheelDelta!==void 0&&tt.wheelDelta!==0&&(rt.delta=0<tt.wheelDelta?1:-1),a.doMouseWheel(),Pl(rt,tt)}},a.aA=function(tt){a.isEnabled&&(a.Vk=!1,fl(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 at=ot;ot=vd(a,tt,!0,!1,!0,at),Gh(a,tt,ot),ot.targetDiagram=md(tt,tt.target),ot.targetObject=null,at||ot.clone(a.bq),at=a.uw,rt=rt?25:10,tt.timeStamp-a.tw<a.zy&&!(Math.abs(at.x-tt.screenX)>rt||Math.abs(at.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():Pl(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=vd(a,tt,!1,!1,!1,rt[1]!==null);var ot=sn.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 at=a,At=tt;ot&&ot.H&&(At=tt,at=ot.H),rt.targetDiagram=at,Gh(a,At,rt),rt.targetObject=null,a.doMouseMove(),Pl(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=vd(a,tt,!1,!0,!0,!1);var at=sn.document.elementFromPoint(tt.clientX,tt.clientY)||null;at!==null&&at.shadowRoot!==void 0&&at.shadowRoot!==null&&(at=at.shadowRoot.elementFromPoint(tt.clientX,tt.clientY)),at!==null&&at.H instanceof pe&&at.H!==a&&Gh(at.H,tt,ot),at===null&&(at=tt.target),Gh(a,tt,ot),ot.clickCount=a.yq,ot.targetDiagram=md(tt,at),ot.targetObject=null,a.doMouseUp(),Pl(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"+tc[1]+tc[2]+"wI"+Wl.slice(1,5)]["b"+T1.slice(1,y)](E.Z,MA,y,y),E.Vc(!0),ug(a),a.nl==="svg"&&(y=a.pj.get("svg"),a.Ka.appendChild(y.Oa),a.ib=y.context)}}pe.prototype.addEventListener=function(a,y,x,E){a.addEventListener(y,x,{capture:E,passive:!1})},pe.prototype.removeEventListener=function(a,y,x,E){a.removeEventListener(y,x,{capture:E})};function ug(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(sn,"resize",a.Ov,!1)}function Aa(a){30<a.Sq&&(a.Yh=1)}function Hh(a,y){a.Yh!==null&&(a.Yh=null,y&&a.hk(),ur&&ur.nx||(a.Sq=0,a.zw=[0,0,0,0,0],a.Tq=0))}pe.prototype.computePixelRatio=function(){return this.Yh!==null?this.Yh:sn.devicePixelRatio||1},pe.prototype.doMouseMove=function(){this.currentTool.doMouseMove()},pe.prototype.doMouseDown=function(){this.currentTool.doMouseDown()},pe.prototype.doMouseUp=function(){this.currentTool.doMouseUp()},pe.prototype.doMouseWheel=function(){this.currentTool.doMouseWheel()},pe.prototype.doKeyDown=function(){this.currentTool.doKeyDown()},pe.prototype.doKeyUp=function(){this.currentTool.doKeyUp()},pe.prototype.doFocus=function(){this.focus()},pe.prototype.focus=function(){if(this.ta)if(this.scrollsPageOnFocus)this.ta.focus();else{var a=sn.scrollX||sn.pageXOffset,y=sn.scrollY||sn.pageYOffset;this.ta.focus(),sn.scrollTo(a,y)}},pe.prototype.Oy=function(){this.H.R("GainedFocus")},pe.prototype.Ny=function(){this.H.R("LostFocus")};function bf(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===js&&(a.Jk=!0,y.C()),a.ld||a.$b())}}}function Tf(a){var y=new ms;y.name="Background",a.Al(y),y=new ms,y.name="",a.Al(y),y=new ms,y.name="Foreground",a.Al(y),y=new ms,y.name="Adornment",y.isTemporary=!0,y.isInDocumentBounds=!1,a.Al(y),y=new ms,y.name="Tool",y.isTemporary=!0,y.isInDocumentBounds=!0,a.Al(y),y=new ms,y.name="Grid",y.allowSelect=!1,y.pickable=!1,y.isTemporary=!0,y.isInDocumentBounds=!1,a.Ww(y,a.Qj("Background"))}function hg(a){var y=new je(je.Grid);y.name="GRID";var x=new Oi;return x.figure="LineH",x.stroke="lightgray",x.strokeWidth=.5,x.interval=1,y.add(x),x=new Oi,x.figure="LineH",x.stroke="gray",x.strokeWidth=.5,x.interval=5,y.add(x),x=new Oi,x.figure="LineH",x.stroke="gray",x.strokeWidth=1,x.interval=10,y.add(x),x=new Oi,x.figure="LineV",x.stroke="lightgray",x.strokeWidth=.5,x.interval=1,y.add(x),x=new Oi,x.figure="LineV",x.stroke="gray",x.strokeWidth=.5,x.interval=5,y.add(x),x=new Oi,x.figure="LineV",x.stroke="gray",x.strokeWidth=1,x.interval=10,y.add(x),x=new ii,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 cg(){this.H.gu?this.H.gu=!1:this.H.isEnabled?this.H.kx(this):_h(this.H)}function fg(a){this.H.isEnabled?(this.H.lu=a.target.scrollTop,this.H.ju=a.target.scrollLeft):_h(this.H)}pe.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,at=E.height+z.top+z.bottom,At=E.right+z.right;z=E.bottom+z.bottom;var ft=b.x;E=b.y;var pt=b.width,xt=b.height,Bt=b.right,Mt=b.bottom;b=this.scale;var Gt=a.scrollLeft;if(this.tn)switch(this.bu){case"negative":Gt=Gt+a.scrollWidth-a.clientWidth;break;case"reverse":Gt=a.scrollWidth-Gt-a.clientWidth}var Dt=Gt;pt<ot||xt<at?(Gt=Ot.allocAt(this.position.x,this.position.y),this.allowHorizontalScroll&&this.ju!==Dt&&(Gt.x=Dt/b+tt,this.ju=Dt),this.allowVerticalScroll&&this.lu!==a.scrollTop&&(Gt.y=a.scrollTop/b+rt,this.lu=a.scrollTop),this.position=Gt,Ot.free(Gt),this.Ee=this.qr=!1):(Gt=Ot.alloc(),a.uy&&this.allowHorizontalScroll&&(tt<ft&&(this.position=Gt.h(Dt+tt,this.position.y)),At>Bt&&(this.position=Gt.h(-(y.scrollWidth-this.Aa)+Dt-this.Aa/b+At,this.position.y))),a.vy&&this.allowVerticalScroll&&(rt<E&&(this.position=Gt.h(this.position.x,a.scrollTop+rt)),z>Mt&&(this.position=Gt.h(this.position.x,-(y.scrollHeight-this.ya)+a.scrollTop-this.ya/b+z))),Ot.free(Gt),this.vd=!0,this.Ee=this.qr=!1,E=this.documentBounds,b=this.viewportBounds,At=E.right,Bt=b.right,z=E.bottom,Mt=b.bottom,tt=E.x,ft=b.x,rt=E.y,E=b.y,pt>=ot&&tt>=ft&&At<=Bt&&(x.style.width="1px"),xt>=at&&rt>=E&&z<=Mt&&(x.style.height="1px"))}},pe.prototype.computeBounds=function(a){return a===void 0&&(a=new Me),Us(this),Cl(this,a)};function Cl(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 at=tt[ot];at.isInDocumentBounds&&at.isVisible()&&(at=at.actualBounds,at.w()&&(x?(x=!1,y.assign(at)):y.ed(at)))}}}return x&&y.h(0,0,0,0),y.Co(a.yb),y}pe.prototype.computePartsBounds=function(a,y){y===void 0&&(y=!1);var x=null;if(Bn(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 Me(NaN,NaN,0,0):x};function Ja(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=Ot.alloc(),x.xi(a.documentBounds,a.initialDocumentSpot);var E=a.viewportBounds;E=Me.allocAt(0,0,E.width,E.height);var b=Ot.alloc();b.xi(E,a.initialViewportSpot),b.h(x.x-b.x,x.y-b.y),a.position=b,Me.free(E),Ot.free(b),Ot.free(x)}x=a.yh,y&&a.Fg!==js&&(x=a.Fg);var z=x!==js?Rh(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()?Ui:ot),pd(a,a.documentBounds,b,tt,rt,y),y=a.scale,a.scale=z,a.vb=!1,z=a.viewportBounds,oe.B(z.x,x)&&oe.B(z.y,E)&&oe.B(z.width,b)&&oe.B(z.height,tt)||a.onViewportBoundsChanged(new Me(x,E,b,tt),z,y,!1)}}function Rh(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===Ra?(y=Math.min(ot,rt),y>x&&(y=x),y<a.minScale&&(y=a.minScale),y>a.maxScale&&(y=a.maxScale),y):y===Tu?(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}pe.prototype.zoomToFit=function(){var a=this.sj;this.sj=qA,this.scale=Rh(this,Ra),a!==qA&&(Ja(this,!1),pd(this,this.documentBounds,this.Aa/this.Ca,this.ya/this.Ca,this.zk,!1)),this.sj=a},Pt=pe.prototype,Pt.BA=function(a,y){y===void 0&&(y=Ra);var x=a.width,E=a.height;if(!(x===0||E===0||isNaN(x)&&isNaN(E))){var b=1;if(y===Ra||y===Tu)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===Tu?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 Ot(a.x,a.y)}},Pt.Jy=function(a,y){this.Va();var x=this.documentBounds,E=this.viewportBounds;this.position=new Ot(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 re){this.eq=a;var y=Ot.alloc();this.fq=this.op(a.ga(vr,y)),Ot.free(y)}else this.eq=null,this.fq=ki};function pd(a,y,x,E,b,z){var tt=Ot.allocAt(a.pa.x,a.pa.y),rt=tt.x,ot=tt.y;if(a.eq!==null){var at=Ot.alloc();at=a.eq.ga(vr,at),rt=at.x-a.fq.x/a.scale,ot=at.y-a.fq.y/a.scale,b=$i,Ot.free(at)}(z||a.scrollMode===qA)&&(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),Uh(a.Yd,a.pa,tt),a.pa.h(tt.x,tt.y),Ol(a),Ot.free(tt)}Pt.Ol=function(a,y){if(y===void 0&&(y=!0),y){if(a=LA(this,a,function(x){return x.part},function(x){return x.canSelect()}),a instanceof ii)return a}else if(a=LA(this,a,function(x){return x.part}),a instanceof ii)return a;return null},Pt.ic=function(a,y,x){y===void 0&&(y=null),x===void 0&&(x=null),Us(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 LA(a,y,x,E){for(x===void 0&&(x=null),E===void 0&&(E=null),Us(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),Hc(this,a,function(E){return E.part},y?function(E){return E instanceof ii&&E.canSelect()}:null,x)};function Hc(a,y,x,E,b){for(x===void 0&&(x=null),E===void 0&&(E=null),b instanceof Vt||b instanceof le||(b=new le),Us(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 Vt||E instanceof le||(E=new le),Us(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),If(this,a,function(b){return b instanceof ii&&(!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 Vt||b instanceof le||(b=new le),Us(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 le;Us(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 If(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 Vt||b instanceof le||(b=new le),Us(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),Rc(this,a,y,function(z){return z instanceof ii&&(!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 Vt||b instanceof le)&&(z=b),b=!0),z instanceof Vt||z instanceof le||(z=new le),Us(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 Rc(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 Vt||b instanceof le)&&(z=b),b=!0),z instanceof Vt||z instanceof le||(z=new le),Us(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}pe.prototype.acceptEvent=function(a){return fl(this,a,a instanceof MouseEvent)};function fl(a,y,x){var E=a.Qg;return a.Qg=a.cj,a.cj=E,E.diagram=a,E.event=y,x?Gh(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),Cr&&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=md(y,y.target),E.targetObject=null,E}function md(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 vd(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,Cr&&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 Pl(a,y){return a.bubbles?!0:(y.stopPropagation!==void 0&&y.stopPropagation(),y.cancelable!==!1&&y.preventDefault(),y.cancelBubble=!0,!1)}pe.prototype.Qz=function(a){var y=this.H;if(!this.H.isEnabled)return!1;var x=fl(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(),Pl(x,a)},pe.prototype.Rz=function(a){var y=this.H;if(!y.isEnabled)return!1;var x=fl(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(),Pl(x,a)},pe.prototype.bz=function(a){var y=this.H;if(!y.isEnabled)return!1;var x=fl(y,a,!0);return y.mouseEnter!==null&&y.mouseEnter(x),y.currentTool.standardMouseOver(),Pl(x,a)},pe.prototype.cz=function(a){var y=this.H;if(!y.isEnabled)return!1;var x=fl(y,a,!0);return y.mouseLeave!==null&&y.mouseLeave(x),Pl(x,a)},pe.prototype.getMouse=function(a){var y=this.ta;if(y===null)return new Ot(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?In(new Ot(y,a),this.Ab):new Ot(y,a)};function Gh(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=Ot.allocAt(tt,rt),a.Ab.Cd(y),x.documentPoint.assign(y),Ot.free(y)):x.documentPoint.h(tt,rt)}function Gc(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))}}pe.prototype.Ya=function(){this.Zi||(this.Zi=!0,this.$b(!1))};function yd(a){a.ld||Us(a),a.Va()}pe.prototype.redraw=function(){this.vb||this.ld||(this.N(),this.bd())},Pt=pe.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,ga(this),this.hf=!1,this.du=new Ot(NaN,NaN),y.isEnabled=x,this.ld=!0;var E=this;a!==null&&_i(function(){E.ld=!1,oA(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;sn.requestAnimationFrame(function(){y.kg&&y.bd()})}},Pt.bd=function(){(!this.fn||this.kg)&&(this.fn&&(this.fn=!1),ga(this))};function Ks(a,y,x){!a.Ee||a.vb||a.animationManager.defaultAnimation.isAnimating||_h(a)||(y&&Us(a),x&&Ja(a,!1))}function ga(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];Zo(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||bf(a),Ks(a,!1,!0),a.fe!==null&&(a.fe.visible&&!a.mq&&(uA(a),a.mq=!0),!a.fe.visible&&a.mq&&(a.mq=!1)),Us(a),z=!1,(!a.hf||a.xh)&&(a.hf?Fd(a,!a.Jk):(a.Ea("Initial Layout"),x.isEnabled===!1&&x.Cc(),Fd(a,!1)),z=!0),a.Jk=!1,Us(a),a.ou||yd(a),Ks(a,!0,!1),tt=!1,z?(x=Me.alloc(),x.assign(a.viewportBounds),a.hf||(tt=a.hf=!0,a.skipsUndoManager||(a.undoManager.isPendingClear=!0),a.undoManager.isPendingUnmodified=!0,wd(a)),a.R("LayoutCompleted"),Ks(a,!0,!1),Me.free(x)):x.Ok&&x.Qw&&(a.Fg!==js?a.scale=Rh(a,a.Fg):a.yh!==js?a.scale=Rh(a,a.yh):(x=a.initialScale,isFinite(x)&&0<x&&(a.scale=x)),Ja(a,!0)),z&&tt&&a.eb("Initial Layout"),Us(a),y||a.gc(a.ib),b&&(a.skipsUndoManager=E),a.ld=!1}}function wd(a){if(a.Fg!==js)a.scale=Rh(a,a.Fg);else if(a.yh!==js)a.scale=Rh(a,a.yh);else{var y=a.initialScale;isFinite(y)&&0<y&&(a.scale=y)}Ja(a,!0),y=a.Wa.s,a.Fd(y,y.length,a,a.viewportBounds),a.R("InitialLayoutCompleted"),a.du.assign(a.pa),uA(a)}function Us(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 le,a.Nv(x,a.De)}a.nodes.each(function(E){E instanceof Ti&&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 Ti||(x.si()?(x.measure(1/0,1/0),x.arrange()):y.add(x))}for(a.reset();a.next();)x=a.value,x instanceof Ti&&x.isVisible()&&zh(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 Sr&&x.isVisible()&&(x.si()?(x.measure(1/0,1/0),x.arrange()):y.add(x))};function zh(a,y){for(var x=Qn(),E=Qn(),b=y.memberParts;b.next();){var z=b.value;z.isVisible()&&(z instanceof Ti?(tl(z)||ia(z)||Zc(z))&&zh(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(Dn(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();Dn(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&&Yt("No canvas specified"),this.nl==="svg"){if(this.Ka!==null){var y=this.animationManager;if(!y.zb&&(!y.isAnimating||y.isTicking)){Vh(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,Id(a,rt.m11,rt.m12,rt.m21,rt.m22,rt.dx,rt.dy),this.pb!==1&&(a.globalAlpha=this.pb),Mu(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?Fl(this.Yf,this)&&(a=this.Vp()):a=!0,a&&(Ei.prototype.Cd=Ei.prototype.Eu),this.Fc=this.vd=!1}}}}else t:if(z=this.animationManager,!z.zb&&(!z.isAnimating||z.isTicking)&&(x=new Date,Vh(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,at=Math.round(rt.x*ot)/ot,At=Math.round(rt.y*ot)/ot;for(ot!==1&&z.scale(ot),rt.x===0&&rt.y===0||z.translate(-at,-At),a.setTransform(tt,0,0,tt,0,0),a.clearRect(0,0,this.Aa,this.ya),this.pb!==1&&(a.globalAlpha=this.pb),Mu(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?Fl(this.Yf,this)&&(y=this.Vp()):y=!0,y&&(Ei.prototype.Cd=Ei.prototype.Eu),E?(this.ib.Vc(!0),this.vd=!0):this.Fc=this.vd=!1,y=+new Date-+x,E=ur&&ur.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 Kh(a,y,x,E,b,z,tt,rt,ot,at){if(a.Ka!==null){a.ta===null&&Yt("No canvas specified"),tt===void 0&&(tt=null),rt===void 0&&(rt=null),ot===void 0&&(ot=!1),at===void 0&&(at=!1),Vh(a),a.ib.Vc(!0),a.vd=!0,a.$i=!0;var At=a.Ca;a.Ca=b;var ft=a.Wa.s,pt=ft.length;try{var xt=new Me(z.x,z.y,E.width/b,E.height/b),Bt=xt.copy();Bt.Co(x),uA(a,Bt),Us(a),a.Fd(ft,pt,a,xt),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 Mt=a.Mb;y.scale(Mt,Mt);var Gt=Ei.alloc();Gt.reset(),Gt.translate(x.left,x.top),Gt.scale(b),z.x===0&&z.y===0||Gt.translate(-z.x,-z.y),y.setTransform(Gt.m11,Gt.m12,Gt.m21,Gt.m22,Gt.dx,Gt.dy),y.yc(),y instanceof Ea&&Id(y,Gt.m11,Gt.m12,Gt.m21,Gt.m22,Gt.dx,Gt.dy),Ei.free(Gt),Mu(a,y),y.globalAlpha=a.pb;var Dt=a.Qj("Grid");if(tt){var _t=new le,Zt=tt.iterator;for(Zt.reset();Zt.next();){var te=Zt.value;te instanceof ii&&(at||te.layer!==Dt)&&(te.Gj(),_t.add(te))}for(at=0;at<pt;at++)Dc(ft[at],y,a,_t,ot);_t.each(function(me){return me.Gj()})}else for(_t=0;_t<pt;_t++){var ie=ft[_t];ie===Dt?at&&ie.gc(y,a,!0):ie.gc(y,a,ot)}a.$i=!1,a.Yf&&Fl(a.Yf,a)&&a.Vp()}finally{a.Ca=At,a.ib.Vc(!0),a.vd=!0,a.Fd(ft,pt,a,a.viewportBounds),uA(a),a.ib instanceof Ea&&(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 Hn,this.Rg.drawShadows=!0,this.Rg.textGreeking=!0,this.Rg.viewportOptimizations=!(Cr||hr),this.Rg.temporaryPixelRatio=!0,this.Rg.pictureRatioOptimization=!0,this.Oq=this.Rg.minDrawingLength=1};function Mu(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 Hn,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 jh(this,a),this};function jh(a,y){var x=a instanceof je,E=a instanceof pe,b;for(b in y){b===""&&Yt("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])),Ne(z)?tt=b.substr(rt+1):Yt("Unable to find object named: "+ot+" in "+a.toString()+" when trying to set property: "+b)}}if(tt[0]!=="_"&&!Gi(z,tt))if(E&&tt==="ModelChanged"){a.Yw(y[tt]);continue}else if(E&&tt==="Changed"){a.Pe(y[tt]);continue}else if(E&&Gi(a.toolManager,tt))z=a.toolManager;else if(E&&Ld(a,tt)){a.Bj(tt,y[tt]);continue}else if(a instanceof jn&&tt==="Changed"){a.Pe(y[tt]);continue}else Yt('Trying to set undefined property "'+tt+'" on object: '+z.toString());z[tt]=y[b],tt[0]==="_"&&z instanceof re&&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 yn,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")},pe.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!==qh&&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=Me.alloc(),Qf(this,this.computeBounds(E)),Me.free(E)),E=this.ta,E===null||E instanceof qs)))){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 at=70*tt,At=Math.max(z,0),ft=Math.max(y,0),pt=Math.floor(b-At),xt=Math.floor(rt-ft);a.drawImage(E.Oa,At,ft,pt,xt,0,0,pt,xt),Fl(this.Yf,this)&&a.clearRect(0,0,ot,at),E=Qn(),a=Qn(),xt=Math.abs(z),pt=Math.abs(y);var Bt=At===0?0:b-xt;At=Ot.allocAt(Bt,0),xt=Ot.allocAt(xt+Bt,rt),a.push(new Me(Math.min(At.x,xt.x),Math.min(At.y,xt.y),Math.abs(At.x-xt.x),Math.abs(At.y-xt.y)));var Mt=this.Ab;if(Mt.reset(),Mt.scale(tt,tt),this.Ca!==1&&Mt.scale(this.Ca),tt=this.pa,(tt.x!==0||tt.y!==0)&&isFinite(tt.x)&&isFinite(tt.y)&&Mt.translate(-tt.x,-tt.y),In(At,Mt),In(xt,Mt),E.push(new Me(Math.min(At.x,xt.x),Math.min(At.y,xt.y),Math.abs(At.x-xt.x),Math.abs(At.y-xt.y))),Bt=ft===0?0:rt-pt,At.h(0,Bt),xt.h(b,pt+Bt),a.push(new Me(Math.min(At.x,xt.x),Math.min(At.y,xt.y),Math.abs(At.x-xt.x),Math.abs(At.y-xt.y))),In(At,Mt),In(xt,Mt),E.push(new Me(Math.min(At.x,xt.x),Math.min(At.y,xt.y),Math.abs(At.x-xt.x),Math.abs(At.y-xt.y))),Fl(this.Yf,this)&&(b=0<z?0:-z,rt=0<y?0:-y,At.h(b,rt),xt.h(ot+b,at+rt),a.push(new Me(Math.min(At.x,xt.x),Math.min(At.y,xt.y),Math.abs(At.x-xt.x),Math.abs(At.y-xt.y))),In(At,Mt),In(xt,Mt),E.push(new Me(Math.min(At.x,xt.x),Math.min(At.y,xt.y),Math.abs(At.x-xt.x),Math.abs(At.y-xt.y)))),Ot.free(At),Ot.free(xt),Ks(this,!1,!0),this.Ka===null&&Yt("No div specified"),this.ta===null&&Yt("No canvas specified"),!this.animationManager.zb&&(b=this.ib,this.Fc)){for(Vh(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,at=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,-at),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),Mu(this,b),b.globalAlpha=this.pb,rt=0;rt<z;rt++)if(tt=y[rt],ot=E,tt.visible&&tt.pb!==0){at=ZA(tt,b),ft=tt.Zq,ft.length=0,At=this.scale,pt=Me.alloc(),xt=tt.Pa.s,Mt=xt.length,Bt=ot.length;for(var Gt=0;Gt<Mt;Gt++){var Dt=xt[Gt],_t=Yf(Dt,Dt.actualBounds);t:{for(var Zt=2/At,te=4/At,ie=0;ie<Bt;ie++){var me=ot[ie];if(me.width!==0&&me.height!==0&&_t.Vu(me.x-Zt,me.y-Zt,me.width+te,me.height+te)){_t=!0;break t}}_t=!1}_t&&tt.Oj(b,Dt,this,ft,At,pt,!0)}Me.free(pt),b.globalAlpha=at}b.restore(),b.Vc(!0),this.Yf&&Fl(this.Yf,this)&&this.Vp(),this.Fc=this.vd=!1,this.hk()}Dn(E),Dn(a),this.ld=!1}}else this.bd();x&&(Aa(this),this.bd(),Hh(this,!0))}else x?(Aa(this),this.bd(),Hh(this,!0)):this.bd()}};function Vh(a){a.pn!==!1&&(a.pn=!1,Sd(a,a.Aa,a.ya))}function Sd(a,y,x){Ol(a);var E=a.Mb;a.ta.resize(y*E,x*E,y,x)&&(a.Fc=!0,a.ib.Vc(!0))}function _h(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,at=b.clientHeight||E+rt,At=a.viewportBounds;b=At.x;var ft=At.y,pt=At.width,xt=At.height;if((ot!==x+tt||at!==E+rt)&&(a.gf=!1,a.Be=!1,rt=tt=0,a.Aa=ot,a.ya=at,z=a.pn=!0,Ol(a)),!a.hf||!a.viewportBounds.w())return!0;var Bt=a.ku,Mt=a.hu;if(a.Ee=!1,!(z||a.gf||a.Be||a.mn||a.nn))return!0;var Gt=a.documentBounds,Dt=0,_t=0,Zt=0,te=0,ie=At.width,me=At.height,ln=a.rj;a.contentAlignment.sb()?(Gt.width>ie&&(Dt=ln.left,_t=ln.right),Gt.height>me&&(Zt=ln.top,te=ln.bottom)):(Dt=ln.left,_t=ln.right,Zt=ln.top,te=ln.bottom);var Un=Gt.width+Dt+_t,Fn=Gt.height+Zt+te;ln=a.scale;var tn=Un>ot/ln,De=Fn>at/ln;if(!(z||a.gf||a.Be||tn||De))return!0;Dt=Gt.x-Dt,ot=At.x,_t=Gt.right+_t,at=At.right+tt,Zt=Gt.y-Zt;var bi=At.y;Gt=Gt.bottom+te,At=At.bottom+rt;var Bi="1px";if(te="1px",a.scrollMode===qA&&(tn||De)&&(tn&&a.hasHorizontalScrollbar&&a.allowHorizontalScroll&&(tn=1,Dt+1<ot&&(tn=Math.max((ot-Dt)*ln+a.Aa,tn)),_t>at+1&&(tn=Math.max((_t-at)*ln+a.Aa,tn)),ie+tt+1<Un&&(tn=Math.max((Un-ie)*ln+a.Aa,tn)),Bi=tn.toString()+"px"),De&&a.hasVerticalScrollbar&&a.allowVerticalScroll&&(tn=1,Zt+1<bi&&(tn=Math.max((bi-Zt)*ln+a.ya,tn)),Gt>At+1&&(tn=Math.max((Gt-At)*ln+a.ya,tn)),me+rt+1<Fn&&(tn=Math.max((Fn-me)*ln+a.ya,tn)),te=tn.toString()+"px")),tn=Bi!=="1px",De=te!=="1px",tn&&De||!tn&&!De||(De&&(at-=a.Db),tn&&(At-=a.Db),Un<ie+tt||!a.hasHorizontalScrollbar||!a.allowHorizontalScroll||(tt=1,Dt+1<ot&&(tt=Math.max((ot-Dt)*ln+a.Aa,tt)),_t>at+1&&(tt=Math.max((_t-at)*ln+a.Aa,tt)),ie+1<Un&&(tt=Math.max((Un-ie)*ln+a.Aa,tt)),Bi=tt.toString()+"px"),tn=Bi!=="1px",tt=a.ya,tn!==a.Be&&(tt=tn?a.ya-a.Db:a.ya+a.Db),Fn<me+rt||!a.hasVerticalScrollbar||!a.allowVerticalScroll||(rt=1,Zt+1<bi&&(rt=Math.max((bi-Zt)*ln+tt,rt)),Gt>At+1&&(rt=Math.max((Gt-At)*ln+tt,rt)),me+1<Fn&&(rt=Math.max((Fn-me)*ln+tt,rt)),te=rt.toString()+"px"),De=te!=="1px"),a.qr&&tn===a.Be&&De===a.gf)return x===a.Aa&&E===a.ya||a.bd(),!1;if(tn!==a.Be&&(Bi==="1px"?a.ya=a.ya+a.Db:a.ya=Math.max(a.ya-a.Db,1),z=!0),a.Be=tn,Mt.style.width=Bi,De!==a.gf&&(te==="1px"?a.Aa=a.Aa+a.Db:a.Aa=Math.max(a.Aa-a.Db,1),z=!0,a.tn&&(rt=Ot.alloc(),De?(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)),Ot.free(rt))),z&&Ol(a),a.gf=De,Mt.style.height=te,a.gu=!0,z&&(a.pn=!0),y=Bt.scrollLeft,a.hasHorizontalScrollbar&&a.allowHorizontalScroll&&(ie+1<Un?y=(a.position.x-Dt)*ln:Dt+1<ot?y=Bt.scrollWidth-Bt.clientWidth:_t>at+1&&(y=a.position.x*ln)),a.tn)switch(a.bu){case"negative":y=-(Bt.scrollWidth-y-Bt.clientWidth);break;case"reverse":y=Bt.scrollWidth-y-Bt.clientWidth}return Bt.scrollLeft=y,a.hasVerticalScrollbar&&a.allowVerticalScroll&&(me+1<Fn?Bt.scrollTop=(a.position.y-Zt)*ln:Zt+1<bi?Bt.scrollTop=Bt.scrollHeight-Bt.clientHeight:Gt>At+1&&(Bt.scrollTop=a.position.y*ln)),ot=a.Aa,at=a.ya,Bt.style.width=ot+(a.gf?a.Db:0)+"px",Bt.style.height=at+(a.Be?a.Db:0)+"px",x!==ot||E!==at||a.animationManager.zb?(x=Me.allocAt(b,ft,pt,xt),a.onViewportBoundsChanged(x,a.viewportBounds,ln,z),Me.free(x),!1):!0}Pt=pe.prototype,Pt.add=function(a){var y=a.diagram;if(y!==this&&(y!==null&&Yt("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&&Yt('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(Uo,"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;fA(a,function(x){JA(y,x)}),(a instanceof Sr||a instanceof Ti&&a.placeholder!==null)&&a.v(),a.data!==null&&fA(a,function(x){xv(y.partManager,x)}),ia(a)!==!0&&Zc(a)!==!0||this.De.add(a),Oy(a,!0,this),Ry(a)?(a.actualBounds.w()&&this.N(Yf(a,a.actualBounds)),this.Ya()):a.isVisible()&&a.actualBounds.w()&&this.N(Yf(a,a.actualBounds)),this.$b()},Pt.pc=function(a){a.Ej(),this.partManager.pc(a);var y=this;a.data!==null&&fA(a,function(x){Bv(y.partManager,x,y)}),this.De.remove(a),Ry(a)?(a.actualBounds.w()&&this.N(Yf(a,a.actualBounds)),this.Ya()):a.isVisible()&&a.actualBounds.w()&&this.N(Yf(a,a.actualBounds)),this.$b()},Pt.remove=function(a){xd(this,a,!0)};function xd(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(ts,"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),Bn(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 le,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)},pe.prototype.moveParts=function(a,y,x,E){if(x===void 0&&(x=!1),E===void 0&&(E=zc(this)),this.toolManager!==null){var b=new yn;if(a!==null)if(Bn(a))for(var z=0;z<a.length;z++)EA(this,b,a[z],x,E);else for(a=a.iterator;a.next();)EA(this,b,a.value,x,E);else{for(a=this.parts;a.next();)EA(this,b,a.value,x,E);for(a=this.nodes;a.next();)EA(this,b,a.value,x,E);for(a=this.links;a.next();)EA(this,b,a.value,x,E)}fh(this,b,y,E,x)}};function EA(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=zc(a)),x instanceof gn){if(y.add(x,a.Pd(b,x,x.location)),x instanceof Ti&&(x.placeholder!==null||b.dragsMembers))for(z=x.memberParts;z.next();)EA(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)&&EA(a,y,tt,E,b)}}if(b.dragsTree)for(x=x.Ou();x.next();)EA(a,y,x.value,E,b)}else if(x instanceof en)for(y.add(x,a.Pd(b,x)),x=x.labelNodes;x.next();)EA(a,y,x.value,E,b);else x instanceof Sr||y.add(x,a.Pd(b,x,x.location))}function fh(a,y,x,E,b){if(y!==null&&y.count!==0){var z=Ot.alloc(),tt=Ot.alloc();tt.assign(x),isNaN(tt.x)&&(tt.x=0),isNaN(tt.y)&&(tt.y=0),(x=a.Mr)||jc(a,y);for(var rt=Qn(),ot=Qn(),at=y.iterator,At=Ot.alloc();at.next();){var ft=at.key,pt=at.value;if(ft.Zc()){var xt=Vc(a,ft,y);xt!==null?rt.push(new it(ft,pt,xt)):(!b||ft.canMove())&&(xt=pt.point,z.assign(xt),a.computeMove(ft,z.add(tt),E,At),ft.location=At,pt.shifted===void 0&&(pt.shifted=new Ot),pt.shifted.assign(At.re(xt)))}else at.key instanceof en&&ot.push(at.sa)}for(Ot.free(At),b=rt.length,at=0;at<b;at++)ft=rt[at],z.assign(ft.info.point),ft.Su.shifted===void 0&&(ft.Su.shifted=new Ot),ft.node.location=z.add(ft.Su.shifted);for(b=Ot.alloc(),at=Ot.alloc(),ft=ot.length,pt=0;pt<ft;pt++){var Bt=ot[pt];if(xt=Bt.key,xt instanceof en)if(xt.suspendsRouting){xt.Tg=null,At=xt.fromNode;var Mt=xt.toNode;if(a.draggedLink!==null&&E.dragsLink)if(Mt=Bt.value.point,xt.dragComputation===null)y.add(xt,a.Pd(E,xt,tt)),cc(xt,tt.x-Mt.x,tt.y-Mt.y);else{Bt=Ot.allocAt(0,0),(At=xt.i(0))&&At.w()&&Bt.assign(At);var Gt=At=Ot.alloc().assign(Bt).add(tt);E.isGridSnapEnabled&&(E.isGridSnapRealtime||a.lastInput.up)&&(Gt=Ot.alloc(),Kc(a,xt,At,Gt,E)),At.assign(xt.dragComputation(xt,At,Gt)).re(Bt),y.add(xt,a.Pd(E,xt,At)),cc(xt,At.x-Mt.x,At.y-Mt.y),Ot.free(Bt),Ot.free(At),Gt!==At&&Ot.free(Gt)}else At!==null&&(b.assign(At.location),Gt=y.I(At),Gt!==null&&b.re(Gt.point)),Mt!==null&&(at.assign(Mt.location),Gt=y.I(Mt),Gt!==null&&at.re(Gt.point)),At!==null&&Mt!==null?b.Xa(at)?(At=Bt.value.point,Mt=z,Mt.assign(b),Mt.re(At),y.add(xt,a.Pd(E,xt,b)),cc(xt,Mt.x,Mt.y)):(xt.suspendsRouting=!1,xt.bb()):(Bt=Bt.value.point,At=At!==null?b:Mt!==null?at:tt,y.add(xt,a.Pd(E,xt,At)),cc(xt,At.x-Bt.x,At.y-Bt.y))}else(xt.fromNode===null||xt.toNode===null)&&(At=Bt.value.point,y.add(xt,a.Pd(E,xt,tt)),cc(xt,tt.x-At.x,tt.y-At.y))}Ot.free(z),Ot.free(tt),Ot.free(b),Ot.free(at),Dn(rt),Dn(ot),x||(Us(a),ku(a,y))}}pe.prototype.computeMove=function(a,y,x,E){if(E===void 0&&(E=new Ot),E.assign(y),a===null)return E;var b=y,z=x.isGridSnapEnabled;z&&(x.isGridSnapRealtime||this.lastInput.up)&&(b=Ot.alloc(),Kc(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,at=ot.x;return isNaN(at)&&(at=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,at)),Math.max(tt,Math.min(x.y,ot))),b!==y&&Ot.free(b),E};function zc(a){var y=a.toolManager.findTool("Dragging");return y!==null?y.dragOptions:a.Wm}function Kc(a,y,x,E,b){if(b===void 0&&(b=zc(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=Ot.allocAt(0,0),z.yi(0,0,a,y,b),oe.No(x.x,x.y,rt+z.x,tt+z.y,a,y,E),Ot.free(z)}}function jc(a,y){if(y!==null)for(a.Mr=!0,a=y.iterator;a.next();)y=a.key,y instanceof en&&(y.suspendsRouting=!0)}function ku(a,y){if(y!==null){for(y=y.iterator;y.next();){var x=y.key;x instanceof en&&(x.suspendsRouting=!1,lv(x)&&x.bb())}a.Mr=!1}}function Vc(a,y,x){return y=y.containingGroup,y!==null&&(a=Vc(a,y,x),a!==null||(a=x.I(y),a!==null))?a:null}Pt=pe.prototype,Pt.Pd=function(a,y,x){if(x===void 0)return new kA(Ni);var E=a.isGridSnapEnabled;return a.groupsSnapMembers||y.containingGroup===null||(E=!1),E?new kA(new Ot(Math.round(1e3*x.x)/1e3,Math.round(1e3*x.y)/1e3)):new kA(x.copy())};function Bd(a,y,x){if(y.diagram!==null&&y.diagram!==a&&Yt("Cannot share a Layer with another Diagram: "+y+" of "+y.diagram),x===null?y.diagram!==null&&Yt("Cannot add an existing Layer to this Diagram again: "+y):(x.diagram!==a&&Yt("Existing Layer must be in this Diagram: "+x+" not in "+x.diagram),y===x&&Yt("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&&Yt("Cannot add Layer with the name '"+y+"'; a Layer with the same name is already present in this Diagram.")}}Pt.Al=function(a){Bd(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(Uo,"layers",this,null,a,null,x+1),this.N(),this.Ya(),this},Pt.Ww=function(a,y){Bd(this,a,y),a.Xe(this);var x=this.Wa,E=x.indexOf(a);0<=E&&(x.remove(a),this.cc!==null&&this.cb(ts,"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(Uo,"layers",this,null,a,null,z),this.N(),0>E&&this.Ya(),this},Pt.Cy=function(a,y){Bd(this,a,y),a.Xe(this);var x=this.Wa,E=x.indexOf(a);0<=E&&(x.remove(a),this.cc!==null&&this.cb(ts,"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(Uo,"layers",this,null,a,null,z+1),this.N(),0>E&&this.Ya(),this},Pt.kA=function(a){if(a.diagram!==this&&Yt("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(ts,"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 Vt),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 Vt),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!==da&&(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 vo;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(co,a,this,y,x,E,b)},pe.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===co){var b=a.object;if(Ao(b,a.propertyName,a.I(y)),b instanceof re){var z=b.part;z!==null&&z.Wb()}this.isModified=!0}else if(E===Uo){var tt=a.object,rt=a.newParam,ot=a.newValue;if(tt instanceof je)if(typeof rt=="number"&&ot instanceof re){y?tt.pc(rt):tt.Gb(rt,ot);var at=tt.part;at!==null&&at.Wb()}else typeof rt=="number"&&ot instanceof ss&&(ot.isRow?hy(tt,rt,y?void 0:ot):cy(tt,rt,y?void 0:ot));else if(tt instanceof ms){var At=a.oldParam===!0;typeof rt=="number"&&ot instanceof ii&&(y?(ot.isSelected=!1,ot.isHighlighted=!1,ot.Wb(),tt.pc(At?rt:-1,ot,At)):tt.oi(rt,ot,At))}else tt instanceof pe?typeof rt=="number"&&ot instanceof ms&&(y?this.Wa.mb(rt):(ot.Xe(this),this.Wa.Gb(rt,ot))):Yt("unknown ChangedEvent.Insert object: "+a.toString());this.isModified=!0}else if(E===ts){var ft=a.object,pt=a.oldParam,xt=a.oldValue;if(ft instanceof je)typeof pt=="number"&&xt instanceof re?y?ft.Gb(pt,xt):ft.pc(pt):typeof pt=="number"&&xt instanceof ss&&(xt.isRow?hy(ft,pt,y?xt:void 0):cy(ft,pt,y?xt:void 0));else if(ft instanceof ms){var Bt=a.newParam===!0;typeof pt=="number"&&xt instanceof ii&&(y?0>ft.Pa.indexOf(xt)&&ft.oi(pt,xt,Bt):(xt.isSelected=!1,xt.isHighlighted=!1,xt.Wb(),ft.pc(Bt?pt:-1,xt,Bt)))}else ft instanceof pe?typeof pt=="number"&&xt instanceof ms&&(y?(xt.Xe(this),this.Wa.Gb(pt,xt)):this.Wa.mb(pt)):Yt("unknown ChangedEvent.Remove object: "+a.toString());this.isModified=!0}else E!==da&&Yt("unknown ChangedEvent: "+a.toString())}finally{this.skipsModelSourceBindings=x}}},pe.prototype.Ea=function(a){return this.undoManager.Ea(a)},pe.prototype.eb=function(a){return this.undoManager.eb(a)},pe.prototype.Kf=function(){return this.undoManager.Kf()},pe.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}},pe.prototype.updateAllTargetBindings=function(a){this.partManager.updateAllTargetBindings(a)},pe.prototype.rp=function(){this.partManager.rp()};function Cd(a,y,x){var E=a.animationManager;if(a.vb||a.ld)a.Ca=x,Ol(a),a.N(),a.Ee=!0,E.zb&&(XA(E)||E.ce.add(E.H,"scale",y,a.Ca));else if(a.ta===null)a.Ca=x,Ol(a);else{a.vb=!0;var b=a.viewportBounds.copy(),z=a.Aa,tt=a.ya,rt=a.zoomPoint.x,ot=a.zoomPoint.y,at=a.contentAlignment;isNaN(rt)&&(at.$c()?at.Hf(bs)?rt=0:at.Hf(ca)&&(rt=z-1):rt=at.sb()?at.x*(z-1):z/2),isNaN(ot)&&(at.$c()?at.Hf(_s)?ot=0:at.Hf(Ws)&&(ot=tt-1):ot=at.sb()?at.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=Ot.allocAt(a.pa.x+rt/y-rt/x,a.pa.y+ot/y-ot/x),a.position=z,Ot.free(z),a.Ca=x,Ol(a),a.vb=!1,a.onViewportBoundsChanged(b,a.viewportBounds,y,!1),Ja(a,!1),E.zb&&(XA(E)||E.ce.add(E.H,"scale",y,a.Ca))}}pe.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!==js||a.width===y.width&&a.height===y.height||b.C(),b=this.currentTool,this.Vk===!0&&b instanceof lo&&(this.lastInput.documentPoint=this.Ps(this.lastInput.viewPoint),ig(b,this)),this.vb||this.invalidateViewport(a,y),uA(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 uA(a,y){var x=a.fe;if(x!==null&&x.visible){for(var E=Xe.alloc(),b=1,z=1,tt=x.O.s,rt=tt.length,ot=0;ot<rt;ot++){var at=tt[ot],At=Math.abs(at.interval);2>At||(yh(at.figure)?z=z*At/oe.vx(z,At):b=b*At/oe.vx(b,At))}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=Me.alloc(),a=a.viewportBounds,y.h(a.x,a.y,a.width,a.height),!y.w()){Me.free(y);return}b=y.width,z=y.height,a=y.x,tt=y.y,Me.free(y)}x.width=b+2*E.width,x.height=z+2*E.height,y=Ot.alloc(),oe.No(a,tt,0,0,E.width,E.height,y),y.offset(-E.width,-E.height),Xe.free(E),x.part.location=y,Ot.free(y)}}pe.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)}},pe.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))},pe.prototype.rA=function(a){if(this.R("ChangingSelection",this.selection),this.clearSelection(!0),Bn(a))for(var y=a.length,x=0;x<y;x++){var E=a[x];E instanceof ii||Yt("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 ii||Yt("Diagram.selectCollection given something that is not a Part: "+y),y.isSelected=!0;this.R("ChangedSelection",this.selection)},pe.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=pe.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 le().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 ii||Yt("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=Ot.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)),Ot.free(z);return}Yt("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):Yt("scrolling direction must be 'up', 'down', 'left', or 'right', not: "+y),Ot.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,at=y.m22,At=y.dx,ft=y.dy,pt=x*tt+E*ot+At;y=x*rt+E*at+ft;var xt=b*tt+E*ot+At;return a=b*rt+E*at+ft,E=x*tt+z*ot+At,x=x*rt+z*at+ft,tt=b*tt+z*ot+At,b=b*rt+z*at+ft,z=Math.min(pt,xt),pt=Math.max(pt,xt),xt=Math.min(y,a),y=Math.max(y,a),z=Math.min(z,E),pt=Math.max(pt,E),xt=Math.min(xt,x),y=Math.max(y,x),z=Math.min(z,tt),pt=Math.max(pt,tt),xt=Math.min(xt,b),y=Math.max(y,b),new Me(z,xt,pt-z,y-xt)},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),In(a.copy(),this.Ab)};function dg(a){var y=a.isModified;a.Tw!==y&&(a.Tw=y,a.R("Modified"))}function Wh(a){return a=Of.get(a),a!==null?new a:new Nr}pe.prototype.doModelChanged=function(a){var y=this;if(a.model===this.model){var x=a.change,E=a.propertyName;if(x===da&&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===da){(E==="FinishedUndo"||E==="FinishedRedo")&&(this.R("ChangedSelection",this.selection),Us(this));var z=this.animationManager;E==="RolledBackTransaction"&&z.Cc(),this.bx(),this.Jk=!0,this.bd(),this.undoManager.transactionLevel!==0&&this.undoManager.transactionLevel!==1||dr(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&&(dg(this),this.As.clear(),sA(this.animationManager)),!this.Rt&&tt&&this.lastInput.targetDiagram){this.Rt=!0;var rt=this;_i(function(){rt.currentTool.standardMouseOver(),rt.Rt=!1},10)}}}finally{this.aa=!0}}}};function JA(a,y){y=y.O.s;for(var x=y.length,E=0;E<x;E++)dh(a,y[E])}function dh(a,y){if(y instanceof ja){var x=y.element;if(x!==null&&x instanceof HTMLImageElement){x.Bg instanceof le&&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 Nf(a,y){if(y instanceof ja){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 le&&x.Bg.remove(a),xg(E));break}}}}}pe.prototype.Wd=function(){this.partManager.Wd()},pe.prototype.Aj=function(a,y){this.Yd.Aj(a,y)},pe.prototype.Cj=function(a,y){this.Yd.Cj(a,y)},pe.prototype.findPartForKey=function(a){return this.partManager.findPartForKey(a)},pe.prototype.Vb=function(a){return this.partManager.Vb(a)},pe.prototype.findLinkForKey=function(a){return this.partManager.findLinkForKey(a)},Pt=pe.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:si(Gr(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:si(Gr(y)))};function Ol(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 Qf(a,y){a.Zi=!1;var x=a.Sp;x.D(y)||(x=x.copy(),a.Sp.assign(y),Ja(a,!1),a.R("DocumentBoundsChanged",void 0,x),a.Ee=!0,a.N())}Pt.Va=function(){if(this.Zi){var a=Me.alloc();Qf(this,this.computeBounds(a)),Me.free(a)}},Pt.rz=function(){for(var a=new le,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){Us(this),a&&_c(this,!0),this.ld?Fd(this,!1):(this.Jk=!0,ga(this))};function _c(a,y){for(var x=a.ai.iterator;x.next();)Pd(a,x.value,y);a.layout&&(y?a.layout.isValidLayout=!1:a.layout.C())}function Pd(a,y,x){if(y!==null){for(var E=y.gl.iterator;E.next();)Pd(a,E.value,x);y.layout!==null&&(x?y.layout.isValidLayout=!1:y.layout.C())}}function Fd(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||oA(z,"Layout")),a.xh=!1;for(var tt=a.ai.iterator;tt.next();)Yh(a,tt.value,y,E);b.isValidLayout||(!y||b.isRealtime||b.isRealtime===null||E===0?(b.doLayout(a),Us(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||dr(z),a.aa=x}}}function Yh(a,y,x,E){if(y!==null){for(var b=y.gl.iterator;b.next();)Yh(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),zh(a,y),b.isValidLayout=!0):a.xh=!0)}}Pt.yz=function(){for(var a=new Vt,y=this.nodes;y.next();){var x=y.value;x.isTopLevel&&x.kh()===null&&a.add(x)}return a.iterator};function gg(a){function y(b){var z=b.toLowerCase(),tt=new Vt;x.add(b,tt),x.add(z,tt),E.add(b,b),E.add(z,b)}var x=new yn,E=new yn;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 Ld(a,y){var x=a.hw.I(y);return x!==null?x:a.hw.I(y.toLowerCase())}function Uf(a,y){var x=a.iw.I(y);if(x!==null||(x=a.iw.I(y.toLowerCase()),x!==null))return x;Yt("Unknown DiagramEvent name: "+y)}Pt.Bj=function(a,y){return a=Uf(this,a),a!==null&&a.add(y),this},Pt.am=function(a,y){a=Uf(this,a),a!==null&&a.remove(y)},Pt.R=function(a,y,x){var E=Uf(this,a),b=new fu;if(b.diagram=this,a=Ld(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 Df(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 Wc(this,!1,null,y||null).Yj(a.x,a.y,a.width,a.height)},pe.prototype.computeOccupiedArea=function(a){return this.isVirtualized?this.viewportBounds.copy():this.Zi?Cl(this,a):a.assign(this.documentBounds)};function Wc(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=gh(a,x)),x===null){y=Me.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&&Xh(a,tt,E,y)}Me.free(y)}else{for(0<x.memberParts.count&&(y=a.computePartsBounds(x.memberParts,!1),y.Bc(20,20),b.initialize(y)),y=Me.alloc(),z=x.memberParts;z.next();)tt=z.value,tt instanceof gn&&Xh(a,tt,E,y);Me.free(y)}b.group=x,b.Yx=E,b.vs=!1}else y&&ow(b);return b}function gh(a,y){return y.avoidable&&!y.isLinkLabel?y:y.containingGroup!==null?gh(a,y.containingGroup):null}function Xh(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(Eg(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(dc,x,y+1);else for(var tt=x;tt<=y;tt++)z[tt]=dc}else if(y instanceof Ti)for(y=y.memberParts;y.next();)b=y.value,b instanceof gn&&Xh(a,b,x,E)}}function hA(a,y){a.Xh===null||a.Xh.vs||y!==void 0&&(!y.avoidable||y.isLinkLabel)||(a.Xh.vs=!0)}pe.prototype.gs=function(a){this.wp.assign(a),this.computeAutoScrollPosition(this.wp).Xa(this.position)?this.ug():Ed(this)};function Ed(a){a.vk===-1&&(a.vk=_i(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=Me.alloc(),a.computeBounds(y),y.ed(a.documentBounds),Qf(a,y),Me.free(y),a.Fc=!0,a.bd(),Ed(a))}},a.vp))}pe.prototype.ug=function(){this.vk!==-1&&(sn.clearTimeout(this.vk),this.vk=-1)},pe.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=Me.allocAt(0,0,E.width*b,E.height*b);var z=Ot.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(Ni)||(y=new Ot(y.x+z.x/b,y.y+z.y/b)),Me.free(E),Ot.free(z),y},Pt=pe.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 Ti&&(y.$p=null)})};function Yc(a,y,x){function E(){var At=+new Date;for(z=!0,tt.reset();tt.next();)if(!tt.value[0].al){z=!1;break}z||At-at>ot?y(x,b,rt):sn.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,at=+new Date;return sn.requestAnimationFrame(function(){E()}),null}Pt.Wz=function(a){return Co?(a===void 0&&(a={}),a.returnType="Image",this.Jx(a)):null},Pt.Jx=function(a){return a===void 0&&(a={}),Yc(this,this.Xz,a)},Pt.Xz=function(a,y,x){var E=pg(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 Wl+"data":b=E.getImageData(0,0,x.width,x.height);break;case Wl:E=(a.document||document).createElement("img"),E.src=x.toDataURL(a.type,a.details),b=E;break;case"blob":return typeof y!="function"&&Yt('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 pg(a,y,x,E){if(a.animationManager.Cc(),a.bd(),a.ta===null)return null;typeof y!="object"&&Yt("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 Xe(1/0,1/0):new Xe(2e3,2e3));var rt=y.position||null,ot=y.parts||null,at=y.padding===void 0?1:y.padding,At=y.background||null,ft=y.omitTemporary;ft===void 0&&(ft=!0);var pt=y.document||document,xt=y.elementFinished||null,Bt=y.showTemporary;Bt===void 0&&(Bt=!ft),y=y.showGrid,y===void 0&&(y=Bt),b!==null&&isNaN(b.width)&&isNaN(b.height)&&(b=null),typeof at=="number"?at=new Xi(at):at instanceof Xi||Yt("MakeImage padding must be a Margin or a number."),at.left=Math.max(at.left,0),at.right=Math.max(at.right,0),at.top=Math.max(at.top,0),at.bottom=Math.max(at.bottom,0),a.ib.Vc(!0),ft=new El(null,pt,void 0,!0);var Mt=ft.context;if(!(b||z||ot||rt))return ft.width=a.Aa+Math.ceil(at.left+at.right),ft.height=a.ya+Math.ceil(at.top+at.bottom),x==="SVG"?E===null?null:(E.resize(ft.width,ft.height,ft.width,ft.height),E.ownerDocument=pt,E.hs=xt,Kh(a,E.context,at,new Xe(ft.width,ft.height),a.Ca,a.pa,ot,At,Bt,y),E.context):(a.Xm=!1,Kh(a,Mt,at,new Xe(ft.width,ft.height),a.Ca,a.pa,ot,At,Bt,y),a.Xm=!0,ft.context);var Gt=a.Pp,Dt=a.documentBounds.copy();if(Dt.Fv(a.yb),Bt)for(var _t=a.Wa.s,Zt=_t.length,te=0;te<Zt;te++){var ie=_t[te];if(ie.visible&&ie.isTemporary){ie=ie.Pa.s;for(var me=ie.length,ln=0;ln<me;ln++){var Un=ie[ln];Un.isInDocumentBounds&&Un.isVisible()&&(Un=Un.actualBounds,Un.w()&&Dt.ed(Un))}}}if(_t=new Ot(Dt.x,Dt.y),ot!==null){for(Zt=new Me(0,0,0,0),te=!0,ie=ot.iterator,ie.reset();ie.next();)me=ie.value,me instanceof ii&&(ln=me.layer,ln!==null&&!ln.visible||ln!==null&&!Bt&&ln.isTemporary||!me.isVisible()||(me=me.actualBounds,me.w()&&(te?(te=!1,Zt.assign(me)):Zt.ed(me))));Dt.width=Zt.width,Dt.height=Zt.height,_t.x=Zt.x,_t.y=Zt.y}return rt!==null&&rt.w()&&(_t=rt,z||(z=Gt)),Zt=rt=0,at!==null&&(rt=at.left+at.right,Zt=at.top+at.bottom),te=ie=0,b!==null&&(ie=b.width,te=b.height,isFinite(ie)&&(ie=Math.max(0,ie-rt)),isFinite(te)&&(te=Math.max(0,te-Zt))),b!==null&&z!==null?(z==="NaN"&&(z=Gt),b.w()?(b=ie,Dt=te):isNaN(te)?(b=ie,Dt=Dt.height*z):(b=Dt.width*z,Dt=te)):b!==null?b.w()?(z=Math.min(ie/Dt.width,te/Dt.height),b=ie,Dt=te):isNaN(te)?(z=ie/Dt.width,b=ie,Dt=Dt.height*z):(z=te/Dt.height,b=Dt.width*z,Dt=te):z!==null?z==="NaN"&&tt.w()?(z=Math.min((tt.width-rt)/Dt.width,(tt.height-Zt)/Dt.height),z>Gt?(z=Gt,b=Dt.width,Dt=Dt.height):(b=tt.width,Dt=tt.height)):(b=Dt.width*z,Dt=Dt.height*z):(z=Gt,b=Dt.width,Dt=Dt.height),at!==null?(b+=rt,Dt+=Zt):at=new Xi(0),tt!==null&&(Gt=tt.width,tt=tt.height,isNaN(Gt)&&(Gt=2e3),isNaN(tt)&&(tt=2e3),isFinite(Gt)&&(b=Math.min(b,Gt)),isFinite(tt)&&(Dt=Math.min(Dt,tt))),ft.width=Math.ceil(b),ft.height=Math.ceil(Dt),x==="SVG"?E===null?null:(E.resize(ft.width,ft.height,ft.width,ft.height),E.ownerDocument=pt,E.hs=xt,Kh(a,E.context,at,new Xe(Math.ceil(b),Math.ceil(Dt)),z,_t,ot,At,Bt,y),E.context):(a.Xm=!1,Kh(a,Mt,at,new Xe(Math.ceil(b),Math.ceil(Dt)),z,_t,ot,At,Bt,y),a.Xm=!0,ft.context)}We.Object.defineProperties(pe.prototype,{renderer:{get:function(){return this.nl},set:function(a){this instanceof dt||(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 qs(this,sn.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 qs(this,sn.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(sn,"resize",this.Ov,!1),this.removeEventListener(sn,"wheel",this.$j,!0),AA===this&&(AA=null)):this.ui===null&&(this.hf=!1),this.Ka=null,a!==null&&((y=a.H)&&(y.div=null),Oc(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)&&Sn(a,"0 <= value <= 1",pe,"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),Ja(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),Ja(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),Ja(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),Ja(this,!1))}},scrollHorizontalLineChange:{get:function(){return this.iu},set:function(a){var y=this.iu;y!==a&&(0>a&&Sn(a,">= 0",pe,"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&&Sn(a,">= 0",pe,"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 Sn(a,">= 0",pe,"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||dg(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&&Yt("Do not replace a Diagram.model while a transaction is in progress."),this.animationManager.Cc(!0);var x=Mf(this,!0);this.hf=!1,this.fn=!0,this.Ce=-2,this.kg=!1;var E=this.vb;this.vb=!0,oA(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=Wh(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(sn,"pointermove",this.dk,!0),this.addEventListener(sn,"pointerdown",this.ui,!0),this.addEventListener(sn,"pointerup",this.fk,!0),this.addEventListener(sn,"pointerout",this.ek,!0),this.addEventListener(sn,"pointercancel",this.ck,!0),this.removeEventListener(y,"wheel",this.$j,!1),this.addEventListener(sn,"wheel",this.$j,!0),this.addEventListener(sn,"selectstart",this.preventDefault,!1)):(this.removeEventListener(sn,"pointermove",this.dk,!0),this.removeEventListener(sn,"pointerdown",this.ui,!0),this.removeEventListener(sn,"pointerup",this.fk,!0),this.removeEventListener(sn,"pointerout",this.ek,!0),this.removeEventListener(sn,"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(sn,"wheel",this.$j,!0),this.removeEventListener(sn,"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=Ot.alloc().assign(this.pa);if(!y.D(a)){var x=this.viewportBounds.copy();this.pa.assign(a),Uh(this.animationManager,y,this.pa),this.vb||this.ta===null&&!this.wo.w()?Ol(this):(this.vb=!0,a=this.scale,pd(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)}Ot.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=hg(this)),this.fe},set:function(a){var y=this.fe;if(y!==a){y===null&&(y=this.fe=hg(this)),a.type!==je.Grid&&Yt("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),uA(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),Ol(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||Yt("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 Xi(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===qA&&Ja(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,Ja(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,Cd(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&&Cd(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!==js&&Ja(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()||Yt("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()||Yt("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)):Sn(a,"> 0",pe,"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)):Sn(a,"> 0",pe,"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),Ja(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 Xi(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&&Yt("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();)hp(a.value)}},treeCollapsePolicy:{get:function(){return this.uu},set:function(a){var y=this.uu;y!==a&&(a!==Iu&&a!==Xo&&a!==$A&&Yt("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 Xe(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 Xi(a));var y=this.xp;y.D(a)||(this.xp=a=a.J(),this.Ya(),this.g("autoScrollRegion",y,a))}}}),We.Object.defineProperties(pe,{licenseKey:{get:function(){return Gf.jc()},set:function(a){Gf.add(a.replace(/\s/g,""))}},version:{get:function(){return Ps}}}),pe.prototype.makeImageData=pe.prototype.Jx,pe.prototype.makeImage=pe.prototype.Wz,pe.prototype.cacheGroupExternalLinks=pe.prototype.Fu,pe.prototype.addRenderer=pe.prototype.bs,pe.prototype.makeSVG=pe.prototype.av,pe.prototype.makeSvg=pe.prototype.Cs,pe.prototype.stopAutoScroll=pe.prototype.ug,pe.prototype.doAutoScroll=pe.prototype.gs,pe.prototype.isUnoccupied=pe.prototype.Yj,pe.prototype.raiseDiagramEvent=pe.prototype.R,pe.prototype.removeDiagramListener=pe.prototype.am,pe.prototype.addDiagramListener=pe.prototype.Bj,pe.prototype.findTreeRoots=pe.prototype.yz,pe.prototype.layoutDiagram=pe.prototype.Uz,pe.prototype.findTopLevelGroups=pe.prototype.qz,pe.prototype.findTopLevelNodesAndLinks=pe.prototype.rz,pe.prototype.ensureBounds=pe.prototype.Va,pe.prototype.findLinksByExample=pe.prototype.ls,pe.prototype.findNodesByExample=pe.prototype.ms,pe.prototype.findLinkForData=pe.prototype.Kc,pe.prototype.findNodeForData=pe.prototype.ii,pe.prototype.findPartForData=pe.prototype.Lc,pe.prototype.findLinkForKey=pe.prototype.findLinkForKey,pe.prototype.findNodeForKey=pe.prototype.Vb,pe.prototype.findPartForKey=pe.prototype.findPartForKey,pe.prototype.rebuildParts=pe.prototype.Wd,pe.prototype.transformViewToDoc=pe.prototype.Ps,pe.prototype.transformRectDocToView=pe.prototype.zA,pe.prototype.transformDocToView=pe.prototype.op,pe.prototype.centerRect=pe.prototype.es,pe.prototype.scrollToRect=pe.prototype.tv,pe.prototype.scroll=pe.prototype.scroll,pe.prototype.highlightCollection=pe.prototype.Jz,pe.prototype.highlight=pe.prototype.Iz,pe.prototype.selectCollection=pe.prototype.rA,pe.prototype.select=pe.prototype.select,pe.prototype.updateAllRelationshipsFromData=pe.prototype.rp,pe.prototype.updateAllTargetBindings=pe.prototype.updateAllTargetBindings,pe.prototype.commit=pe.prototype.commit,pe.prototype.rollbackTransaction=pe.prototype.Kf,pe.prototype.commitTransaction=pe.prototype.eb,pe.prototype.startTransaction=pe.prototype.Ea,pe.prototype.raiseChanged=pe.prototype.g,pe.prototype.raiseChangedEvent=pe.prototype.cb,pe.prototype.removeChangedListener=pe.prototype.ik,pe.prototype.addChangedListener=pe.prototype.Pe,pe.prototype.removeModelChangedListener=pe.prototype.mA,pe.prototype.addModelChangedListener=pe.prototype.Yw,pe.prototype.findLayer=pe.prototype.Qj,pe.prototype.removeLayer=pe.prototype.kA,pe.prototype.addLayerAfter=pe.prototype.Cy,pe.prototype.addLayerBefore=pe.prototype.Ww,pe.prototype.addLayer=pe.prototype.Al,pe.prototype.moveParts=pe.prototype.moveParts,pe.prototype.copyParts=pe.prototype.Kj,pe.prototype.removeParts=pe.prototype.Is,pe.prototype.remove=pe.prototype.remove,pe.prototype.add=pe.prototype.add,pe.prototype.clearDelayedGeometries=pe.prototype.bx,pe.prototype.setProperties=pe.prototype.nm,pe.prototype.attach=pe.prototype.Du,pe.prototype.set=pe.prototype.set,pe.prototype.resetInputOptions=pe.prototype.Sx,pe.prototype.setInputOption=pe.prototype.sA,pe.prototype.getInputOption=pe.prototype.Ql,pe.prototype.resetRenderingHints=pe.prototype.Tx,pe.prototype.setRenderingHint=pe.prototype.Xx,pe.prototype.getRenderingHint=pe.prototype.Gf,pe.prototype.maybeUpdate=pe.prototype.bd,pe.prototype.requestUpdate=pe.prototype.$b,pe.prototype.delayInitialization=pe.prototype.Xy,pe.prototype.isUpdateRequested=pe.prototype.Pz,pe.prototype.invalidateDocumentBounds=pe.prototype.Ya,pe.prototype.findObjectsNear=pe.prototype.og,pe.prototype.findPartsNear=pe.prototype.mz,pe.prototype.findObjectsIn=pe.prototype.Cf,pe.prototype.findPartsIn=pe.prototype.ux,pe.prototype.findObjectsAt=pe.prototype.ji,pe.prototype.findPartsAt=pe.prototype.lz,pe.prototype.findObjectAt=pe.prototype.ic,pe.prototype.findPartAt=pe.prototype.Ol,pe.prototype.focusObject=pe.prototype.zz,pe.prototype.alignDocument=pe.prototype.Jy,pe.prototype.zoomToRect=pe.prototype.BA,pe.prototype.zoomToFit=pe.prototype.zoomToFit,pe.prototype.diagramScroll=pe.prototype.kx,pe.prototype.focus=pe.prototype.focus;var Of=new yn,Md=null,Co=sn.document!==void 0,ph=null,bu="",js=new xe(pe,"None",0),Ra=new xe(pe,"Uniform",1),Tu=new xe(pe,"UniformToFill",2),Xc=new xe(pe,"CycleAll",10),Zh=new xe(pe,"CycleNotDirected",11),Jh=new xe(pe,"CycleNotDirectedFast",12),Hf=new xe(pe,"CycleNotUndirected",13),Rf=new xe(pe,"CycleDestinationTree",14),kd=new xe(pe,"CycleSourceTree",15),qA=new xe(pe,"DocumentScroll",1),qh=new xe(pe,"InfiniteScroll",2),Iu=new xe(pe,"TreeParentCollapsed",21),Xo=new xe(pe,"AllParentsCollapsed",22),$A=new xe(pe,"AnyParentsCollapsed",23),Gf=new Vt,Ps="2.3.10",Wl="image",MA=null,tu=!1;function hs(){if(Co){var a=sn.document.createElement("canvas"),y=a.getContext("2d"),x=Nn("7ca11abfd022028846");y[x]=Nn("398c3597c01238");for(var E=["5da73c80a36455d7038e4972187c3cae51fd22",He.Dx+"4ae6247590da4bb21c324ba3a84e385776",Ei.xF+"fb236cdfda5de14c134ba1a95a2d4c7cc6f93c1387",oe.za],b=1;5>b;b++)y[Nn("7ca11abfd7330390")](Nn(E[b-1]),10,15*b);for(y[x]=Nn("39f046ebb36e4b"),x=1;5>x;x++)y[Nn("7ca11abfd7330390")](Nn(E[x-1]),10,15*x);(E.length!==4||E[0][0]!=="5"||E[3][0]!=="7")&&(Ei.prototype.Cd=Ei.prototype.Eu),MA=a}}pe.className="Diagram",pe.fromDiv=function(a){var y=a;return typeof a=="string"&&(y=sn.document.getElementById(a)),y instanceof HTMLDivElement&&y.H instanceof pe?y.H:null},pe.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},pe.useDOM=function(a){Co=a?sn.document!==void 0:!1},pe.isUsingDOM=function(){return Co},pe.None=js,pe.Uniform=Ra,pe.UniformToFill=Tu,pe.CycleAll=Xc,pe.CycleNotDirected=Zh,pe.CycleNotDirectedFast=Jh,pe.CycleNotUndirected=Hf,pe.CycleDestinationTree=Rf,pe.CycleSourceTree=kd,pe.DocumentScroll=qA,pe.InfiniteScroll=qh,pe.TreeParentCollapsed=Iu,pe.AllParentsCollapsed=Xo,pe.AnyParentsCollapsed=$A;function $h(){this.wy=null,this.j="zz@orderNum",this._tk==="63ad05bbe23a1786468a4c741b6d2"?this.Rc=this.j=!0:this.Rc=null}function Fl(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=sn[Nn("76a715b2f73f148a")][Nn("72ba13b5")]||"";if(a.Rc=!0,Co){var E=pe[Nn("76a115b6ed251eaf4692")];if(E)for(var b=Gf.iterator;b.next()&&(E=b.value,E=Nn(E).split(Nn("39e9")),!(6>E.length));){var z=Nn(E[1]).split(".");if(E[4]!=="7da71ca0")break;var tt=Nn(He[Nn("6cae19")]).split(".");if(z[0]>tt[0]||z[0]===tt[0]&&z[1]>=tt[1]){var rt=sn[Nn("74a900bae4370f8b51")][Nn("6fbb13a1c2311e8a57")].toLowerCase();if(tt=rt[Nn("73a612b6fb191d")](Nn("3aad1ab6e022098b4dc4")),z=Nn(E[2]),-1<tt&&(rt=rt[Nn("73a612b6fb191d")](z.toLowerCase()+"/"),a.Rc=!(-1<rt&&rt<tt),!a.Rc))break;for(tt=x[Nn("76ad18b4f73e")],rt=x[Nn("73a612b6fb191d")](Nn("35e7"))+2;rt<tt;rt++)y+=x[rt];if(tt=y[Nn("73a612b6fb191d")](z),0>tt&&z!==Nn("7da71ca0ad381e90")&&(tt=y[Nn("73a612b6fb191d")](Nn("76a715b2ef3e149757"))),0>tt&&(tt=y[Nn("73a612b6fb191d")](Nn("76a715b2ef3e149757"))),0>tt&&(tt=y[Nn("73a612b6fb191d")](Nn("2bfa41fdb3784bca12"))),0>tt&&(tt=x[Nn("73a612b6fb191d")](Nn("7baa19a6f76c1988428554"))),a.Rc=!(0<=tt&&tt<y[Nn("73a612b6fb191d")](Nn("35"))||y[Nn("73a612b6fb191d")](Nn("35"))===-1),!a.Rc||x[Nn("73a612b6fb191d")](Nn("7fb002b6ed25128b4da25b2e"))&&(a.Rc=!(-1<x[Nn("73a612b6fb191d")](z)),!a.Rc)||(tt=sn[Nn("76a715b2f73f148a")][Nn("69ad17a1e03e")],rt=tt[Nn("73a612b6fb191d")](Nn("7fb002b6ed25128b4da25b2e")),-1<rt&&(a.Rc=!(tt[Nn("73a612b6fb191d")](z)>rt),!a.Rc)))break;if(z[0]==="#"){tt=sn.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[Nn("79a417a0f0181a8946")]=E,sn.document[Nn("78a712aa")]){sn.document[Nn("78a712aa")][Nn("7bb806b6ed32388c4a875b")](tt),ot=sn.getComputedStyle(tt).getPropertyValue(Nn("78a704b7e62456904c9b12701b6532a8"));var at=sn.getComputedStyle(tt).getPropertyValue(Nn("75b817b0ea2202"));if(sn.document[Nn("78a712aa")][Nn("68ad1bbcf533388c4a875b")](tt),ot){if(tt=sn[Nn("77a902b0eb1b1e804a8a")],at==="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(Nn("32ae19a1e0331fc94084537c067a67fa59f1386b89d006")).matches)for(E="."+E,z=0;z<document.styleSheets.length;z++){tt=document.styleSheets[z].rules||document.styleSheets[z].cssRules;for(var At in tt)if(E===tt[At].selectorText){a.Rc=!1;break t}}}}else a.Rc=null,a.Rc=!1}}}else{for(At=x[Nn("76ad18b4f73e")],b=x[Nn("73a612b6fb191d")](Nn("35e7"))+2;b<At;b++)y+=x[b];x=y[Nn("73a612b6fb191d")](Nn("7da71ca0ad381e90")),a.Rc=!(0<=x&&x<y[Nn("73a612b6fb191d")](Nn("35")))}}}return 0<a.Rc&&a!==a.wy}$h.className="DiagramHelper";function kA(a){this.j=a===void 0?new Ot:a,this.o=new Ot}We.Object.defineProperties(kA.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 tc="DraggingInfo";kA.className="DraggingInfo";function it(a,y,x){this.node=a,this.info=y,this.Su=x}it.className="DraggingNodeInfoPair";function st(){this.reset()}st.prototype.reset=function(){this.isGridSnapEnabled=!1,this.isGridSnapRealtime=!0,this.gridSnapCellSize=new Xe(NaN,NaN).freeze(),this.gridSnapCellSpot=vr,this.gridSnapOrigin=new Ot(NaN,NaN).freeze(),this.groupsSnapMembers=this.dragsTree=this.dragsLink=!1,this.dragsMembers=this.groupsAlwaysMove=!0},st.className="DraggingOptions";function ht(a,y){if(typeof a=="string"||sn.Element&&a instanceof Element)var x=pe.call(this,a)||this;else x=pe.call(this)||this,y=a;return ut(x),y&&x.nm(y),x}Le(ht,pe);function ut(a){a.allowDragOut=!0,a.allowMove=!1,a.isReadOnly=!0,a.contentAlignment=Fr,a.layout=new Ds}ht.prototype.reset=function(){pe.prototype.reset.call(this),ut(this)},ht.className="Palette";function dt(a,y){if(typeof a=="string"||sn.Element&&a instanceof Element)var x=pe.call(this,a)||this;else x=pe.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 ii;var b=new Oi;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 Xi(0,0,0,0),x.pa.h(0,0),x.toolManager.gb("Dragging",new zt,x.toolManager.mouseMoveTools),x.click=function(){var z=E.observed;if(z!==null){var tt=z.viewportBounds,rt=E.lastInput.documentPoint;z.position=new Ot(rt.x-tt.width/2,rt.y-tt.height/2)}},x.Pf=function(){E.Ya(),Tt(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&&Tt(E)},x.autoScale=Ra,x.vb=!1,y&&Object.assign(x,y),x}Le(dt,pe),dt.prototype.computePixelRatio=function(){return 1},dt.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(Vh(this),this.ql===null){var x=new El(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),Ft(this)}finally{this.ta=a,this.ib=y}}}pe.prototype.redraw.call(this)},dt.prototype.gc=function(){if(this.Ka===null&&Yt("No div specified"),this.ta===null&&Yt("No canvas specified"),!(this.ta instanceof qs)&&(Zm(this.box),this.Fc)){var a=this.observed;if(a!==null&&!a.animationManager.defaultAnimation.isAnimating&&a.pi){Vh(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?Ft(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 Ft(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=Me.alloc().assign(a.viewportBounds).ed(y.viewportBounds),uA(y,b),Me.free(b),Us(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 at=rt.diagram.grid.part;if(!x&&rt.isTemporary)E&&at.layer===rt&&(rt=ZA(rt,b),at.gc(b,ot),b.globalAlpha=rt);else{for(var At=ZA(rt,b),ft=ot.scale,pt=Me.alloc(),xt=rt.Pa.s,Bt=xt.length,Mt=0;Mt<Bt;Mt++){var Gt=xt[Mt];(E||Gt!==at)&&rt.Oj(b,Gt,ot,null,ft,pt,!1)}Me.free(pt),b.globalAlpha=At}}}}}function Tt(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=Xe.alloc();b.h(x.width,x.height),E.desiredSize=b,Xe.free(b),a=2/a.scale,E instanceof Oi&&(E.strokeWidth=a),y.location=new Ot(x.x-a/2,x.y-a/2),y.isSelected=!0}}}dt.prototype.computeBounds=function(){var a=this.observed;if(a===null)return Vl;var y=a.documentBounds.copy();return y.ed(a.viewportBounds),y},dt.prototype.invalidateViewport=function(){this.Fc!==!0&&(this.Fc=!0,this.$b())},dt.prototype.onViewportBoundsChanged=function(a,y,x,E){this.vb||(this.vd=!0,this.N(),this.Ee=!0,this.Ya(),Tt(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))},We.Object.defineProperties(dt.prototype,{observed:{get:function(){return this.V},set:function(a){var y=this.V;if(a instanceof dt&&Yt("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),Tt(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),Tt(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)}}}),dt.className="Overview";function zt(){Bo.call(this),this.j=null}Le(zt,Bo),zt.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 Ot(x.width/2,x.height/2),a=a.firstInput.documentPoint,y.position=new Ot(a.x-this.j.x,a.y-this.j.y)),!0)},zt.prototype.doActivate=function(){this.j=null,Bo.prototype.doActivate.call(this)},zt.prototype.doUpdateCursor=function(){var a=this.diagram,y=a.box;y!==null&&y.cursor&&(a.currentCursor=y.cursor)},zt.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 Ot(E.x-x.x,E.y-x.y)}a=a.lastInput.documentPoint,y.position=new Ot(a.x-this.j.x,a.y-this.j.y)}}},zt.className="OverviewDraggingTool";function Rt(){nn(this),this.H=AA,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=Vl,this.hb=!0,this.cg=null,this.ob=200}Rt.prototype.toString=function(){return"CommandHandler"},Rt.prototype.Xe=function(a){this.H=a},Rt.prototype.doKeyDown=function(){var a=this.diagram,y=a.lastInput,x=Cr?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()},Rt.prototype.doKeyUp=function(){this.diagram.lastInput.bubbles=!0},Rt.prototype.stopCommand=function(){var a=this.diagram,y=a.currentTool;y instanceof lo&&a.allowSelect&&a.clearSelection(),y!==null&&y.doCancel()},Rt.prototype.canStopCommand=function(){return!0},Rt.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=""}},Rt.prototype.canSelectAll=function(){return this.diagram.allowSelect},Rt.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 le,x=a.selection.iterator;x.next();)qc(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=""}},Rt.prototype.canDeleteSelection=function(){var a=this.diagram;return!(a.isReadOnly||a.isModelReadOnly||!a.allowDelete||a.selection.count===0)},Rt.prototype.copySelection=function(){var a=this.diagram,y=new le;for(a=a.selection.iterator;a.next();)qc(y,a.value,!0,this.copiesTree?1/0:0,this.copiesConnectedLinks,function(x){return x.canCopy()});this.copyToClipboard(y)},Rt.prototype.canCopySelection=function(){var a=this.diagram;return!!(a.allowCopy&&a.allowClipboard&&a.selection.count!==0)},Rt.prototype.cutSelection=function(){this.copySelection(),this.deleteSelection()},Rt.prototype.canCutSelection=function(){var a=this.diagram;return!!(!a.isReadOnly&&!a.isModelReadOnly&&a.allowCopy&&a.allowDelete&&a.allowClipboard&&a.selection.count!==0)},Rt.prototype.copyToClipboard=function(a){var y=this.diagram,x=null;if(a===null)ph=null,bu="";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 Vt,x.addAll(z),ph=x,bu=y.model.dataFormat}}y.R("ClipboardChanged",x)},Rt.prototype.pasteFromClipboard=function(){var a=new le,y=ph;if(y===null)return a;var x=this.diagram;if(bu!==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},Rt.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);fh(y,z,new Ot(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=""}},Rt.prototype.canPasteSelection=function(){var a=this.diagram;return!(a.isReadOnly||a.isModelReadOnly||!a.allowInsert||!a.allowClipboard||ph===null||ph.count===0||bu!==a.model.dataFormat)},Rt.prototype.undo=function(){this.diagram.undoManager.undo()},Rt.prototype.canUndo=function(){var a=this.diagram;return a.isReadOnly||a.isModelReadOnly?!1:a.allowUndo&&a.undoManager.canUndo()},Rt.prototype.redo=function(){this.diagram.undoManager.redo()},Rt.prototype.canRedo=function(){var a=this.diagram;return a.isReadOnly||a.isModelReadOnly?!1:a.allowUndo&&a.undoManager.canRedo()},Rt.prototype.decreaseZoom=function(a){a===void 0&&(a=1/this.zoomFactor);var y=this.diagram;y.autoScale===js&&(a=y.scale*a,a<y.minScale||a>y.maxScale||(y.scale=a))},Rt.prototype.canDecreaseZoom=function(a){a===void 0&&(a=1/this.zoomFactor);var y=this.diagram;return y.autoScale!==js?!1:(a=y.scale*a,a<y.minScale||a>y.maxScale?!1:y.allowZoom)},Rt.prototype.increaseZoom=function(a){a===void 0&&(a=this.zoomFactor);var y=this.diagram;y.autoScale===js&&(a=y.scale*a,a<y.minScale||a>y.maxScale||(y.scale=a))},Rt.prototype.canIncreaseZoom=function(a){a===void 0&&(a=this.zoomFactor);var y=this.diagram;return y.autoScale!==js?!1:(a=y.scale*a,a<y.minScale||a>y.maxScale?!1:y.allowZoom)},Rt.prototype.resetZoom=function(a){a===void 0&&(a=this.defaultScale);var y=this.diagram;a<y.minScale||a>y.maxScale||(y.scale=a)},Rt.prototype.canResetZoom=function(a){a===void 0&&(a=this.defaultScale);var y=this.diagram;return a<y.minScale||a>y.maxScale?!1:y.allowZoom},Rt.prototype.zoomToFit=function(){var a=this.diagram,y=a.animationManager;y.Cc(),a.redraw();var x=a.position,E=a.scale;oA(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=Vl):(this.Jt=E,this.sw=x.copy(),a.zoomToFit(),this.Au=a.scale,this.yu=a.documentBounds.copy()),dr(y)},Rt.prototype.canZoomToFit=function(){return this.diagram.allowZoom},Rt.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;oA(x,"Scroll To Part");var E=this.scrollToPartPause;if(0<E){var b=ee(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 gn&&ot.isTreeExpanded&&(!(ot instanceof Ti)||ot.isSubGraphExpanded);)ot=b.pop();0<b.length?(ot instanceof ii&&y.tv(ot.actualBounds),ot instanceof gn&&!ot.isTreeExpanded&&(ot.isTreeExpanded=!0),ot instanceof Ti&&!ot.isSubGraphExpanded&&(ot.isSubGraphExpanded=!0)):(ot instanceof ii&&y.es(ot.actualBounds),y.am("LayoutCompleted",tt)),y.eb("Scroll To Part")},tt=function(){_i(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 ee(a,y,x){if(y.isVisible())return x;if(y instanceof Sr)ee(a,y.adornedPart,x);else if(y instanceof en){var E=y.fromNode;E!==null&&ee(a,E,x),y=y.toNode,y!==null&&ee(a,y,x)}else y instanceof gn&&(E=y.labeledLink,E!==null&&ee(a,E,x),E=y.pg(),E!==null&&(E.isTreeExpanded||E.wasTreeExpanded||x.push(E),ee(a,E,x))),y=y.containingGroup,y!==null&&(y.isSubGraphExpanded||y.wasSubGraphExpanded||x.push(y),ee(a,y,x));return x}Rt.prototype.canScrollToPart=function(a){return a===void 0&&(a=null),a!==null&&!(a instanceof ii)?!1:(a=this.diagram,a.selection.count===0&&a.highlighteds.count===0?!1:a.allowHorizontalScroll&&a.allowVerticalScroll)},Rt.prototype.collapseTree=function(a){a===void 0&&(a=null);var y=this.diagram;try{y.Ea("Collapse Tree"),oA(y.animationManager,"Collapse Tree");var x=new Vt;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 gn&&b.isTreeExpanded&&(b.collapseTree(),x.add(b))}y.R("TreeCollapsed",x)}finally{y.eb("Collapse Tree")}},Rt.prototype.canCollapseTree=function(a){a===void 0&&(a=null);var y=this.diagram;if(y.isReadOnly)return!1;if(a!==null){if(!(a instanceof gn&&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 gn&&y.isTreeExpanded&&0<y.Qo().count)return!0;return!1},Rt.prototype.expandTree=function(a){a===void 0&&(a=null);var y=this.diagram;try{y.Ea("Expand Tree"),oA(y.animationManager,"Expand Tree");var x=new Vt;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 gn&&!b.isTreeExpanded&&(b.expandTree(),x.add(b))}y.R("TreeExpanded",x)}finally{y.eb("Expand Tree")}},Rt.prototype.canExpandTree=function(a){a===void 0&&(a=null);var y=this.diagram;if(y.isReadOnly)return!1;if(a!==null){if(!(a instanceof gn)||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 gn&&!y.isTreeExpanded&&0<y.Qo().count)return!0;return!1},Rt.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 Vt,z=a.selection.iterator;z.next();){var tt=z.value;tt.Zc()&&tt.canGroup()&&b.add(tt)}for(var rt=new Vt,ot=b.iterator;ot.next();){var at=ot.value;z=!1;for(var At=b.iterator;At.next();)if(at.Td(At.value)){z=!0;break}z||rt.add(at)}if(0<rt.count){var ft=rt.first().containingGroup;if(ft!==null)for(;ft!==null;){b=!1;for(var pt=rt.iterator;pt.next();)if(!pt.value.Td(ft)){b=!0;break}if(b)ft=ft.containingGroup;else break}if(x instanceof Ti)Yl(x),E=x.copy(),E!==null&&a.add(E);else if(y.Yu(x)){var xt=y.copyNodeData(x);Ne(xt)&&(y.xf(xt),E=a.ii(xt))}if(E!==null){ft!==null&&this.isValidMember(ft,E)&&(E.containingGroup=ft);for(var Bt=rt.iterator;Bt.next();){var Mt=Bt.value;this.isValidMember(E,Mt)&&(Mt.containingGroup=E)}a.clearSelection(!0),E.isSelected=!0}}a.R("SelectionGrouped",E)}finally{a.eb("Group"),a.R("ChangedSelection",a.selection),a.currentCursor=""}}}},Rt.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 ke(a){var y=Qn();for(a=a.iterator;a.next();){var x=a.value;x instanceof en||y.push(x)}a=new le,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 Dn(y),a}Rt.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},Rt.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 Vt;if(a!==null)E.add(a);else for(var b=y.selection.iterator;b.next();){var z=b.value;z instanceof Ti&&z.canUngroup()&&E.add(z)}var tt=new Vt;if(0<E.count){y.clearSelection(!0);for(var rt=E.iterator;rt.next();){var ot=rt.value;ot.expandSubGraph();var at=ot.containingGroup,At=at!==null&&at.data!==null?x.wa(at.data):void 0;tt.addAll(ot.memberParts);for(var ft=tt.iterator;ft.next();){var pt=ft.value;if(pt.isSelected=!0,!(pt instanceof en)){var xt=pt.data;xt!==null?x.mp(xt,At):pt.containingGroup=at}}y.remove(ot)}}y.R("SelectionUngrouped",E,tt)}finally{y.eb("Ungroup"),y.R("ChangedSelection",y.selection),y.currentCursor=""}},Rt.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 Ti))return!1;if(a.canUngroup())return!0}else for(a=y.selection.iterator;a.next();)if(y=a.value,y instanceof Ti&&y.canUngroup())return!0;return!1},Rt.prototype.addTopLevelParts=function(a,y){var x=!0;for(a=ke(a).iterator;a.next();){var E=a.value;E.containingGroup!==null&&(!y||this.isValidMember(null,E)?E.containingGroup=null:x=!1)}return x},Rt.prototype.collapseSubGraph=function(a){a===void 0&&(a=null);var y=this.diagram;try{y.Ea("Collapse SubGraph"),oA(y.animationManager,"Collapse SubGraph");var x=new Vt;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 Ti&&b.isSubGraphExpanded&&(b.collapseSubGraph(),x.add(b))}y.R("SubGraphCollapsed",x)}finally{y.eb("Collapse SubGraph")}},Rt.prototype.canCollapseSubGraph=function(a){a===void 0&&(a=null);var y=this.diagram;if(y.isReadOnly)return!1;if(a!==null)return!!(a instanceof Ti&&a.isSubGraphExpanded);for(a=y.selection.iterator;a.next();)if(y=a.value,y instanceof Ti&&y.isSubGraphExpanded)return!0;return!1},Rt.prototype.expandSubGraph=function(a){a===void 0&&(a=null);var y=this.diagram;try{y.Ea("Expand SubGraph"),oA(y.animationManager,"Expand SubGraph");var x=new Vt;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 Ti&&!b.isSubGraphExpanded&&(b.expandSubGraph(),x.add(b))}y.R("SubGraphExpanded",x)}finally{y.eb("Expand SubGraph")}},Rt.prototype.canExpandSubGraph=function(a){a===void 0&&(a=null);var y=this.diagram;if(y.isReadOnly)return!1;if(a!==null)return a instanceof Ti&&!a.isSubGraphExpanded;for(a=y.selection.iterator;a.next();)if(y=a.value,y instanceof Ti&&!y.isSubGraphExpanded)return!0;return!1},Rt.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 Jr&&z.editable})}a!==null&&(y.currentTool=null,x.textBlock=a,y.currentTool=x)}},Rt.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 Jr))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 Jr&&x.editable}),a!==null))return!0;return!1},Rt.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 re?b=a.ga(Ui):y.viewportBounds.ca(E.documentPoint)||(b=y.viewportBounds,b=new Ot(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,YA(x,!1,a)}},Rt.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)},Rt.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 yn,a===null)return E;for(var z=a.iterator;z.next();)EA(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},We.Object.defineProperties(Rt.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||Yt("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}}}),Rt.className="CommandHandler",kf=function(){return new Rt};function re(){nn(this),this.l=30723,this.pb=1,this.bn="",this.Ma=this.Me=null,this.pa=new Ot(NaN,NaN).freeze(),this.jd=Ho,this.Ab=new Ei,this.wh=new Ei,this.Lb=null,this.Ca=this.Kk=1,this.Kb=0,this.Kg=Wa,this.uc=new Me(NaN,NaN,NaN,NaN).freeze(),this.Ib=new Me(NaN,NaN,NaN,NaN).freeze(),this.dc=new Me(0,0,NaN,NaN).freeze(),this.ba=this.Yn=this.Zn=null,this.sk=this.Jb=is,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 _e,Re,Rn,Yn,di,Mi,Ji,zi,lr,Ir;re.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=Ln(this.Dh)),this.tb!==null&&(a.tb=this.tb.copy())},re.prototype.Vw=function(a){var y=this.Dh;if(Bn(y)){for(var x=0;x<y.length;x++)if(y[x]===a)return}else this.Dh=y=[];y.push(a)},re.prototype.Af=function(a){a.Zn=null,a.Ng=null,a.v()},re.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},re.prototype.copy=function(){return this.clone()},Pt=re.prototype,Pt.qb=function(a){a.classType===en?a.name.indexOf("Orient")===0?this.segmentOrientation=a:Yt("Unknown Link enum value for GraphObject.segmentOrientation property: "+a):a.classType===re&&(this.stretch=a)},Pt.toString=function(){return Zn(this.constructor)+"#"+On(this)},Pt.th=function(){this.A!==null&&(this.A.nc=!0)};function Hi(a){a.A===null?a.A=new ec:a.A.nc&&(a.A=a.A.copy())}Pt.Xc=function(){if(this.ba===null){var a=new Td;a.Xi=$i,a.yj=$i,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===co&&Ms(this)&&to(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 yn),tt=z.undoManager.transactionLevel===0,a.startCondition===ch?tt=!0:a.startCondition===Oh&&(tt=!1),tt?(z=new Qs,dd(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()):(oA(z.animationManager,"Trigger"),z.animationManager.defaultAnimation.add(this,y,E,b)))),this instanceof je&&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 je&&fA(rt,function(ot){ot.data!==null&&ot.l&16777216&&ot.La(y)})};function to(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=Lw(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(co,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 Ei);var z=this.Lb;z.reset(),this.no(z,a,y,x,E),z.pp(b)}};function cs(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?ni(a.x,a.y,0,0,0,E.height)<=y||ni(a.x,a.y,0,E.height,E.width,E.height)<=y||ni(a.x,a.y,E.width,E.height,E.width,0)<=y||ni(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=Ot.alloc();y.assign(a),this.transform.Ga(y);var x=this.actualBounds;if(!x.w())return Ot.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=Ro(x.x-tt*ot,x.y-tt*ot,x.width+z*ot,x.height+z*ot,y.x,y.y),Ot.free(y),a}return b=!1,(this instanceof Sr||this instanceof Oi?Ro(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)),Ot.free(y),b},Pt.gh=function(a){var y=this.naturalBounds;return Ro(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=Me.allocAt(0,0,y.width,y.height);var x=this.transform,E=!1,b=Ot.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)))),Ot.free(b),Me.free(y),E},Pt.fh=function(a,y){if(y===void 0)return a.Re(this.actualBounds);var x=this.naturalBounds,E=!1,b=Ot.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)))),Ot.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=Ot.allocAt(0,0),b=Ot.allocAt(0,x.height),z=Ot.allocAt(x.width,x.height),tt=Ot.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=Me.allocAt(0,0,x.width,x.height);var ot=Ot.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)))),Ot.free(ot),Me.free(x),!rt&&(oe.us(a,E,b)||oe.us(a,b,z)||oe.us(a,z,tt)||oe.us(a,tt,E))&&(rt=!0)}return Ot.free(E),Ot.free(b),Ot.free(z),Ot.free(tt),rt},Pt.ga=function(a,y){if(y===void 0&&(y=new Ot),a instanceof ri){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 Me);var y=this.naturalBounds,x=this.oe,E=Ot.allocAt(0,0).transform(x);return a.h(E.x,E.y,0,0),E.h(y.width,0).transform(x),Kr(a,E.x,E.y,0,0),E.h(y.width,y.height).transform(x),Kr(a,E.x,E.y,0,0),E.h(0,y.height).transform(x),Kr(a,E.x,E.y,0,0),Ot.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 Ot),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,at=-z.m21*tt,At=z.m11*tt,ft=tt*(z.m21*z.dy-z.m22*z.dx),pt=tt*(z.m12*z.dx-z.m11*z.dy);return this.areaBackground!==null?(z=this.actualBounds,oe.Ff(z.left,z.top,z.right,z.bottom,a,y,x,E,b)):(tt=a*rt+y*at+ft,a=a*ot+y*At+pt,y=x*rt+E*at+ft,x=x*ot+E*At+pt,b.h(0,0),E=this.naturalBounds,x=oe.Ff(0,0,E.width,E.height,tt,a,y,x,b),b.transform(z),x)},re.prototype.measure=function(a,y,x,E){if(tl(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 je;switch(ma(this,!0)){case Re:tt=b=0,rt&&(y=a=1/0);break;case _e:isFinite(a)&&a>x&&(b=a),isFinite(y)&&y>E&&(tt=y);break;case Yn:isFinite(a)&&a>x&&(b=a),tt=0,rt&&(y=1/0);break;case di: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()||Yt("Non-real measuredBounds has been set. Object "+this+", measuredBounds: "+this.uc.toString()),Zo(this,!1)}},re.prototype.Wl=function(){},re.prototype.Dd=function(){return!1},re.prototype.arrange=function(a,y,x,E,b){this.Uk();var z=Me.alloc();z.assign(this.Ib),this.Ib.ka(),ia(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&&lc(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 Jr&&(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()||Yt("Non-real actualBounds has been set. Object "+this+", actualBounds: "+this.Ib.toString()),this.Xl(z,this.Ib),bA(this,!1),Me.free(z)},Pt=re.prototype,Pt.eh=function(){};function na(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=ma(a,!0),x===E&&z===b&&(y=Re),y){case Re:(x>E||z>b)&&(Zo(a,!0),a.measure(x>E?E:x,z>b?b:z,0,0));break;case _e:Zo(a,!0),a.measure(E,b,0,0);break;case Yn:Zo(a,!0),a.measure(E,z,0,0);break;case di:Zo(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||$m(x,!0),this.N(),ao(a,y)||(x.oh(),this.Pn(x)))},Pt.Pn=function(a){this.portId!==null&&($m(a,!0),a instanceof gn&&jy(a,this))},Pt.gc=function(a,y){if(!Ga(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 je&&lc(this),tt=this.Ib;if(z){var rt=this.Ib,ot=this.dc,at=this.areaBackground,At=this.Ma;at===null&&At===null||a.yc(),at!==null&&(yo(this,a,at,!0,!0,ot,rt),at instanceof Mr&&at.type===Ki?(a.beginPath(),a.rect(rt.x,rt.y,rt.width,rt.height),a.ng(at)):a.fillRect(rt.x,rt.y,rt.width,rt.height)),At!==null&&(yo(this,a,At,!0,!1,ot,rt),At instanceof Mr&&At.type===Ki?(a.beginPath(),a.rect(rt.x,rt.y,rt.width,rt.height),a.ng(At)):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&&fs(this),at=this.part,ot=!1;var ft=0;at&&y.Gf("drawShadows")&&(ot=at.isShadowed)&&(At=at.shadowOffset,ft=Math.max(At.y,At.x)*y.scale*y.Mb),At=this.Dd();var pt;if(!(pt=y.$i||!At)){var xt=this.naturalBounds;pt=this.wh;var Bt=pt.m11,Mt=pt.m21,Gt=pt.dx,Dt=pt.m12,_t=pt.m22,Zt=pt.dy,te,ie=te=0;pt=te*Bt+ie*Mt+Gt;var me=te*Dt+ie*_t+Zt;te=xt.width+ft,ie=0;var ln=te*Bt+ie*Mt+Gt;te=te*Dt+ie*_t+Zt,ie=Math.min(pt,ln);var Un=Math.min(me,te),Fn=Math.max(pt+0,ln)-ie,tn=Math.max(me+0,te)-Un;pt=ie,me=Un,te=xt.width+ft,ie=xt.height+ft,ln=te*Bt+ie*Mt+Gt,te=te*Dt+ie*_t+Zt,ie=Math.min(pt,ln),Un=Math.min(me,te),Fn=Math.max(pt+Fn,ln)-ie,tn=Math.max(me+tn,te)-Un,pt=ie,me=Un,te=0,ie=xt.height+ft,ln=te*Bt+ie*Mt+Gt,te=te*Dt+ie*_t+Zt,ie=Math.min(pt,ln),Un=Math.min(me,te),Fn=Math.max(pt+Fn,ln)-ie,tn=Math.max(me+tn,te)-Un,pt=ie,me=Un,ft=y.viewportBounds,xt=ft.x,Bt=ft.y,pt=!(pt>ft.width+xt||xt>Fn+pt||me>ft.height+Bt||Bt>tn+me)}if(pt){if(pt=(this.l&256)!==0,a.clipInsteadOfFill&&(pt=!1),this instanceof Jr&&(a.font=this.font),pt){if(me=rt.se()?rt.naturalBounds:rt.actualBounds,Fn=Math.max(tt.x,me.x),tn=Math.max(tt.y,me.y),ft=Math.min(tt.right,me.right)-Fn,xt=Math.min(tt.bottom,me.bottom)-tn,Bt=this.tb,Bt!==null&&(Fn=Bt.x,tn=Bt.y,ft=Bt.width,xt=Bt.height),Fn>tt.width+tt.x||tt.x>me.width+me.x){x!==1&&(a.globalAlpha=E),this.filter!==""&&(a.filter=b);return}a.save(),a.beginPath(),a.rect(Fn,tn,ft,xt),a.clip()}if(At){if(!at.isVisible()){x!==1&&(a.globalAlpha=E),this.filter!==""&&(a.filter=b);return}ot&&(me=at.shadowOffset,a.Ev(me.x*y.scale*this.scale*y.Mb,me.y*y.scale*this.scale*y.Mb,at.shadowBlur),eu(a),a.shadowColor=at.shadowColor)}ot&&this.shadowVisible===!0?eu(a):ot&&this.shadowVisible===!1&&cA(a),at=this.naturalBounds,this.areaBackground!==null&&(a.yc(),qa(this,a,at,tt)),a.transform(z.m11,z.m12,z.m21,z.m22,z.dx,z.dy),ot&&ws(this,rt)&&this.shadowVisible===null&&cA(a),this.Ma!==null&&(a.yc(),ua(this,a,at,tt)),ot&&(this.Ma!==null||this.areaBackground!==null||ws(this,rt))?($a(this,!0),this.shadowVisible===null&&cA(a)):$a(this,!1),this.hh(a,y),ot&&this.l&512&&eu(a),At&&ot&&cA(a),pt&&(a.restore(),a.Vc(this instanceof je)),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 ws(a,y){return y===null?!1:(lc(y)&&(y=y.panel),(y.l&512)!==0||(y.type===je.Auto||y.type===je.Spot)&&y.Pb()!==a)}Pt.Dv=function(){};function qa(a,y,x,E){yo(a,y,a.areaBackground,!0,!0,x,E),a.areaBackground instanceof Mr&&a.areaBackground.type===Ki?(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 ua(a,y,x,E){var b=a.kq(),z=x.x,tt=x.y,rt=x.width+b,ot=x.height+b;yo(a,y,a.Ma,!0,!1,x,E),a.Ma instanceof Mr&&a.Ma.type===Ki?(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 Js(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===je.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 Ga(a,y,x){if(!(y instanceof Ea))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&&Js(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),eu(y),y.shadowColor=a.shadowColor}a instanceof Jr&&(y.font=a.font),y.yd=null;var tt=a.transform;z=a instanceof je;var rt=a instanceof je?lc(a):!1;a.l&4096&&fs(a);var ot=a.Ib;if(y.rb.ha=[1,0,0,1,0,0],y.o=!1,b&&(y.o=!0,z&&rt?(Qd(y,1,0,0,1,0,0),a.svg=y.ad):z?(Qd(y,tt.m11,tt.m12,tt.m21,tt.m22,tt.dx,tt.dy),a.svg=y.ad):Qd(y,1,0,0,1,0,0)),b=a.naturalBounds,a.areaBackground!==null){var at=tt.copy().Vj();y.rb.ha=[at.m11,at.m12,at.m21,at.m22,at.dx,at.dy],qa(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]),ua(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],ua(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&&eu(y),rt&&a.shadowVisible===!0?eu(y):rt&&a.shadowVisible===!1&&cA(y),b=a.panel,rt&&ws(a,b)&&a.shadowVisible===null&&cA(y),y.Il&&(at=x.computePixelRatio(),at="drop-shadow("+y.shadowOffsetX/at+"px "+y.shadowOffsetY/at+"px "+y.shadowBlur/at/2+"px "+y.shadowColor+")",a.background!==null&&tt.Ma.setAttributeNS(null,"filter",at),a.areaBackground!==null&&tt.gd.setAttributeNS(null,"filter",at)),rt&&(a.Ma!==null||a.areaBackground!==null||ws(a,b))?($a(a,!0),a.shadowVisible===null&&cA(y)):$a(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,at=a.svg,!z&&at!==null&&rt!==at&&at.parentNode===a.panel.svg?(a.svg.replaceWith(rt),a.svg=rt,rt!==null&&a.$o(y,E,ot,rt),pa(y,at),!0):(a.svg=rt,tt!==null&&rt===null&&(vg(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&&eu(y),a.Dd()&&cA(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&&Js(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"+vi++,rt=a.Ud("clipPath",{id:z}),y=a.Ud("rect",{x:y,y:b,width:tt,height:x}),this instanceof je&&(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"),pa(a,E)};function pa(a,y){y=y.getAttribute("clip-path"),y!==null&&(a=a.svg.getElementById(y.split("#")[1].slice(0,-1)),a!==null&&a.remove())}function Di(a){if(a.svg!==null){var y=a.svg.innerHTML.match(/url\(#((CLIP|GRAD).+?)\)/g),x=a.svg.ownerDocument;if(y!==null){y=Gr(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 je?lc(this):!1;if(!(this instanceof je&&b))if(this instanceof ja){var z=this.bt;a.rb.ha=[E.m11,E.m12,E.m21,E.m22,E.dx,E.dy],z!==null&&qp(a,z[0],z[1],z[2],z[3],z[4],z[5],z[6],z[7]),x?y.lastElementChild.setAttributeNS(null,"transform",$p(a)):y.setAttributeNS(null,"transform",$p(a))}else if(!x||this instanceof je)y.setAttributeNS(null,"transform","matrix("+E.m11+", "+E.m12+", "+E.m21+", "+E.m22+", "+E.dx+", "+E.dy+")");else if(this instanceof Oi){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],qa(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&&Ud(a,z)),(this.background!==null||y.Ma!==void 0)&&(z=y.Ma,this.background===null?(Ud(a,y.Ma),y.Ma.remove(),y.Ma=void 0):((b||x&&!(this instanceof je))&&(a.rb.ha=[E.m11,E.m12,E.m21,E.m22,E.dx,E.dy]),ua(this,a,this.naturalBounds,this.actualBounds),y.Ma?(Ud(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&&Ud(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 yo(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===sr)E?y.fillStyle=x.color:y.strokeStyle=x.color;else{var at=a.kq();if(rt=z.width,ot=z.height,b?(rt=tt.width,ot=tt.height):E||(rt+=at,ot+=at),(z=y instanceof sc)&&x.xe&&(x.type===fo||x.yk===rt&&x.ft===ot))var At=x.xe;else{var ft=0,pt=0,xt=0,Bt=0,Mt=0,Gt=0;if(Gt=Mt=0,b?(Mt=tt.x,Gt=tt.y):E||(Mt-=at/2,Gt-=at/2),ft=x.start.x*rt+x.start.offsetX,pt=x.start.y*ot+x.start.offsetY,xt=x.end.x*rt+x.end.offsetX,Bt=x.end.y*ot+x.end.offsetY,ft+=Mt,xt+=Mt,pt+=Gt,Bt+=Gt,x.type===Qi)At=y.createLinearGradient(ft,pt,xt,Bt);else if(x.type===Ki)Gt=isNaN(x.endRadius)?Math.max(rt,ot)/2:x.endRadius,isNaN(x.startRadius)?(Mt=0,Gt=Math.max(rt,ot)/2):Mt=x.startRadius,At=y.createRadialGradient(ft,pt,Mt,xt,Bt,Gt);else if(x.type===fo)try{At=y.createPattern(x.pattern,"repeat")}catch(_t){At=null}if(x.type!==fo&&(b=x.colorStops,b!==null))for(b=b.iterator;b.next();)At.addColorStop(b.key,b.value);if(z&&(x.xe=At,At!==null&&(x.yk=rt,x.ft=ot),At===null&&x.type===fo&&x.yk!==-1)){x.yk=-1;var Dt=a.diagram;Dt!==null&&x.yk===-1&&_i(function(){Dt.redraw()},600)}}E?y.fillStyle=At:y.strokeStyle=At}}}Pt.rg=function(a){if(a instanceof je)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 je?this:this.panel;a!==null&&a.isEnabled;)a=a.panel;return a===null};function fs(a){if(a.l&2048){var y=a.Ab;if(y.reset(),!a.Ib.w()||!a.uc.w()){Ll(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)}Ll(a,!1),La(a,!0)}a.l&4096&&(y=a.panel,y===null?(a.wh.set(a.Ab),a.Kk=a.scale,La(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,La(a,!1)))}Pt.no=function(a,y,x,E,b){if(this.Ca!==1&&a.scale(this.Ca),this.Kb!==0){var z=Ot.alloc();z.yi(y,x,E,b,Ui),a.rotate(this.Kb,z.x,z.y),Ot.free(z)}},Pt.v=function(a){if(!tl(this)){a===void 0&&(a=!1),Zo(this,!0),bA(this,!0);var y=this.panel;y===null||a||y.v()}},Pt.Uj=function(){tl(this)||(Zo(this,!0),bA(this,!0))};function es(a){if(!ia(a)){var y=a.panel;y!==null?y.v():a.Dd()&&(y=a.diagram,y!==null&&(y.De.add(a),a instanceof gn&&a.Bd(),y.$b())),bA(a,!0)}}Pt.Uk=function(){!(this.l&2048)&&(Ll(this,!0),La(this,!0))},Pt.Wu=function(){La(this,!0)},Pt.N=function(){var a=this.part;a!==null&&a.N()};function ma(a,y){var x=a.stretch,E=a.panel;return E!==null&&E.type===je.Table?Po(a,E.Fb(a.row),E.Eb(a.column),y):E!==null&&E.type===je.Auto&&E.Pb()===a?Zr(a,_e,y):x===Mi?E!==null?E.type===je.Spot&&E.Pb()===a?Zr(a,_e,y):(x=E.defaultStretch,x===Mi?Zr(a,Re,y):Zr(a,x,y)):Zr(a,Re,y):Zr(a,x,y)}function Po(a,y,x,E){var b=a.stretch;if(b!==Mi)return Zr(a,b,E);var z=b=null;switch(y.stretch){case di:z=!0;break;case _e:z=!0}switch(x.stretch){case Yn:b=!0;break;case _e:b=!0}return y=a.panel.defaultStretch,b===null&&(b=y===Yn||y===_e),z===null&&(z=y===di||y===_e),b===!0&&z===!0?Zr(a,_e,E):b===!0?Zr(a,Yn,E):z===!0?Zr(a,di,E):Zr(a,Re,E)}function Zr(a,y,x){if(x)return y;if(y===Re||(x=a.desiredSize,x.w()))return Re;if(a=a.angle,!isNaN(x.width))if(a!==90&&a!==270){if(y===Yn)return Re;if(y===_e)return di}else{if(y===di)return Re;if(y===_e)return Yn}if(!isNaN(x.height))if(a!==90&&a!==270){if(y===di)return Re;if(y===_e)return Yn}else{if(y===Yn)return Re;if(y===_e)return di}return y}function $a(a,y){a.l=y?a.l|512:a.l&-513}function Ms(a){return(a.l&1024)!==0}function Nu(a,y){a.l=y?a.l|1024:a.l&-1025}function Ll(a,y){a.l=y?a.l|2048:a.l&-2049}function La(a,y){a.l=y?a.l|4096:a.l&-4097}function tl(a){return(a.l&8192)!==0}function Zo(a,y){a.l=y?a.l|8192:a.l&-8193}function ia(a){return(a.l&16384)!==0}function bA(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 mh(a){var y=a.part;if(y instanceof gn&&(a.portId!==null||a===y.port)){var x=y.diagram;x===null||x.undoManager.isUndoingRedoing||jy(y,a)}}function Jp(a){var y=a.diagram;y===null||y.undoManager.isUndoingRedoing||(a instanceof je?a instanceof gn?a.Bd():a.qm(a,function(x){mh(x)}):mh(a))}Pt.bind=function(a,y,x,E){var b=null;return typeof a=="string"?b=new Jo(a,y,x,E):b=a,b.xd=this,a=this.ih(),a!==null&&fy(a)&&Yt("Cannot add a Binding to a template that has already been copied: "+b),this.localBindings===null&&(this.localBindings=new Vt),this.localBindings.add(b),this},Pt.set=function(a){return Object.assign(this,a),this},Pt.Du=function(a){return mg(this,a),this},Pt.apply=function(a){return a(this),this},Pt.nm=function(a){return jh(this,a),this},Pt.pz=function(){return this.ih()},Pt.ih=function(){for(var a=this instanceof je?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 yn),this.animationTriggers.add(a.propertyName,a),this};function el(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=zf.I(a);typeof z=="function"?(x=Ln(arguments),E=z(x),Ne(E)||Yt('GraphObject.make invoked object builder "'+a+'", but it did not return an Object')):b=sn.go[a]}if(E===null&&(b!=null&&b.constructor||Yt("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 pe&&1<x.length){z=E;var tt=x[1];(typeof tt=="string"||tt instanceof HTMLDivElement)&&(Oc(z,tt),b++)}for(;b<x.length;b++)z=x[b],z===void 0?Yt("Undefined value at argument "+b+" for object being constructed by GraphObject.make: "+E):mg(E,z);return E}function mg(a,y){if(typeof y=="string")if(a instanceof Jr)a.text=y;else if(a instanceof Oi)a.figure=y;else if(a instanceof ja)a.source=y;else if(a instanceof je)y=dA.I(y),y!==null&&(a.type=y);else if(a instanceof Mr){var x=Jn(Mr,y);x!==null?a.type=x:Yt("Unknown Brush type as an argument to GraphObject.make: "+y)}else a instanceof qe?(y=Jn(qe,y),y!==null&&(a.type=y)):a instanceof yr&&(y=Jn(yr,y),y!==null&&(a.type=y));else if(y instanceof re)a instanceof je||Yt("A GraphObject can only be added to a Panel, not to: "+a),a.add(y);else if(y instanceof ss){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 ss?o0(E,y):Yt("A RowColumnDefinition can only be added to an object that implements getRowDefinition/getColumnDefinition, not to: "+a)}else if(y instanceof xe)typeof a.qb=="function"&&a.qb(y);else if(y instanceof kr)a.type=y;else if(y instanceof Jo)a instanceof re||a instanceof ss?a.bind(y):Yt("A Binding can only be applied to a GraphObject or RowColumnDefinition, not to: "+a);else if(y instanceof Dl)a instanceof re?a.Jv(y):Yt("An AnimationTrigger can only be applied to a GraphObject, not to: "+a);else if(y instanceof As)a instanceof qe&&a.type===qe.o?a.figures.add(y):Yt("A PathFigure can only be added to a Path Geometry, not to: "+a);else if(y instanceof yr)a instanceof As?a.segments.add(y):Yt("A PathSegment can only be added to a PathFigure, not to: "+a);else if(y instanceof po)a instanceof pe||a instanceof Ti?a.layout=y:Yt("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++)mg(a,y[x]);else if(typeof y=="object"&&y!==null)if(a instanceof Mr){x=new Hn;for(var b in y)E=parseFloat(b),isNaN(E)?x[b]=y[b]:a.addColorStop(E,y[b]);jh(a,x)}else if(a instanceof ss){y.row!==void 0?(b=y.row,(b==null||b===1/0||isNaN(b)||0>b)&&Yt("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)&&Yt("Must specify non-negative integer column for RowColumnDefinition "+y+", not: "+b),a.isRow=!1,a.index=b),b=new Hn;for(x in y)x!=="row"&&x!=="column"&&(b[x]=y[x]);jh(a,b)}else jh(a,y);else Yt('Unknown initializer "'+y+'" for object being constructed by GraphObject.make: '+a)}function TA(a,y){zf.add(a,y)}function bd(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}We.Object.defineProperties(re.prototype,{bindingId:{get:function(){return this.A!==null?this.A.zp:-1},set:function(a){this.bindingId!==a&&(this.A===null&&(this.A=new ec),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 ec),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 ec),this.A.wm=a)}},shadowVisible:{get:function(){return this.A!==null?this.A.Ci:null},set:function(a){var y=this.shadowVisible;y!==a&&(Hi(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&&(Hi(this),this.A.Hb=a,this.g("enabledChanged",y,a))}},segmentOrientation:{get:function(){return this.Ua!==null?this.Ua.rr:ka},set:function(a){var y=this.segmentOrientation;y!==a&&(this.Ua===null&&(this.Ua=new vh),this.Ua.rr=a,this.v(),this.g("segmentOrientation",y,a),a===ka&&(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 vh),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 vh),this.Ua.o=a,this.v(),this.g("segmentFraction",y,a))}},segmentOffset:{get:function(){return this.Ua!==null?this.Ua.F:Ni},set:function(a){var y=this.segmentOffset;y.D(a)||(a=a.J(),this.Ua===null&&(this.Ua=new vh),this.Ua.F=a,this.v(),this.g("segmentOffset",y,a))}},stretch:{get:function(){return this.A!==null?this.A.hg:Mi},set:function(a){var y=this.stretch;y!==a&&(Hi(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&&(Hi(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)&&Sn(a,"0 <= value <= 1",re,"opacity"),this.pb=a,this.g("opacity",y,a),a=this.diagram,y=this.part,a!==null&&y!==null&&a.N(Yf(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(Yf(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(),Jp(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&&St(a,"GraphObject.areaBackground"),a instanceof Mr&&a.freeze(),Hi(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&&St(a,"GraphObject.background"),a instanceof Mr&&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 ii)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 Ot(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&&Yt("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,Jp(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 Oi&&this.qc(),this.g("desiredSize",E,a),Ms(this)&&(a=this.part,a!==null&&(to(this,a,"width"),to(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 Xe(a,this.jd.height).freeze(),this.v(),this instanceof Oi&&this.qc(),this.g("desiredSize",y,a),Ms(this)&&(a=this.part,a!==null&&to(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 Xe(this.jd.width,a).freeze(),this.v(),this instanceof Oi&&this.qc(),this.g("desiredSize",y,a),Ms(this)&&(a=this.part,a!==null&&to(this,a,"height")))}},minSize:{get:function(){return this.A!==null?this.A.u:nr},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(),Hi(this),this.A.u=a,this.v(),this.g("minSize",y,a))}},maxSize:{get:function(){return this.A!==null?this.A.o:Vr},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(),Hi(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 Xi(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&&fs(this),this.Ab}},oe:{get:function(){return this.l&4096&&fs(this),this.wh}},animationTriggers:{get:function(){return this.A!==null?this.A.hb:null},set:function(a){this.animationTriggers!==a&&(Hi(this),this.A.hb=a)}},reshapingBehavior:{get:function(){return this.A!==null?this.A.Pf:Re},set:function(a){this.reshapingBehavior!==a&&(Hi(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()&&Yt("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&&Sn(a,">= 0",re,"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&&Sn(a,">= 1",re,"columnSpan"),Hi(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&&Sn(a,">= 0",re,"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&&Sn(a,">= 1",re,"rowSpan"),Hi(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&&(Hi(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 gn||Yt("Cannot set portID on a Link: "+a),y!==null&&x!==null&&iv(x,this),this.Yn=a,a!==null&&x!==null&&(x.Te=!0,Wy(x,this)),this.g("portId",y,a)}}},toSpot:{get:function(){return this.ba!==null?this.ba.yj:$i},set:function(a){var y=this.toSpot;y.D(a)||(a=a.J(),this.Xc(),this.ba.yj=a,this.g("toSpot",y,a),mh(this))}},toEndSegmentLength:{get:function(){return this.ba!==null?this.ba.wj:10},set:function(a){var y=this.toEndSegmentLength;y!==a&&(0>a&&Sn(a,">= 0",re,"toEndSegmentLength"),this.Xc(),this.ba.wj=a,this.g("toEndSegmentLength",y,a),mh(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),mh(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&&Sn(a,">= 0",re,"toMaxLinks"),this.Xc(),this.ba.Ur=a,this.g("toMaxLinks",y,a))}},fromSpot:{get:function(){return this.ba!==null?this.ba.Xi:$i},set:function(a){var y=this.fromSpot;y.D(a)||(a=a.J(),this.Xc(),this.ba.Xi=a,this.g("fromSpot",y,a),mh(this))}},fromEndSegmentLength:{get:function(){return this.ba!==null?this.ba.Vi:10},set:function(a){var y=this.fromEndSegmentLength;y!==a&&(0>a&&Sn(a,">= 0",re,"fromEndSegmentLength"),this.Xc(),this.ba.Vi=a,this.g("fromEndSegmentLength",y,a),mh(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),mh(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&&Sn(a,">= 0",re,"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&&(Hi(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&&(Hi(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&&(Hi(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&&(Hi(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&&(Hi(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&&(Hi(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&&(Hi(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&&(Hi(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&&(Hi(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&&(Hi(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&&(Hi(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&&(Hi(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&&(Hi(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&&(Hi(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&&(Hi(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&&(Hi(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&&(Hi(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&&(Hi(this),this.A.Ch=a,this.g("contextMenu",y,a))}}}),re.prototype.trigger=re.prototype.Jv,re.prototype.findBindingPanel=re.prototype.ih,re.prototype.findTemplateBinder=re.prototype.pz,re.prototype.setProperties=re.prototype.nm,re.prototype.apply=re.prototype.apply,re.prototype.attach=re.prototype.Du,re.prototype.set=re.prototype.set,re.prototype.isEnabledObject=re.prototype.If,re.prototype.isVisibleObject=re.prototype.Ed,re.prototype.isContainedBy=re.prototype.rg,re.prototype.getNearestIntersectionPoint=re.prototype.rs,re.prototype.getLocalPoint=re.prototype.qs,re.prototype.getDocumentScale=re.prototype.Df,re.prototype.getDocumentAngle=re.prototype.li,re.prototype.getDocumentBounds=re.prototype.mi,re.prototype.getDocumentPoint=re.prototype.ga,re.prototype.intersectsRect=re.prototype.Yc,re.prototype.containedInRect=re.prototype.fh,re.prototype.containsRect=re.prototype.Re,re.prototype.containsPoint=re.prototype.ca,re.prototype.raiseChanged=re.prototype.g,re.prototype.raiseChangedEvent=re.prototype.cb,re.prototype.addCopyProperty=re.prototype.Vw;var zf=null;re.className="GraphObject",zf=new yn,TA("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=el(je,je.Auto,{isActionable:!0,enabledChanged:function(x,E){if(x instanceof je){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"},el(Oi,{name:"ButtonBorder",figure:"RoundedRectangle",spot1:new ri(0,0,2.76142374915397,2.761423749153969),spot2:new ri(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 je&&(x=E.fb("ButtonBorder"),x instanceof Oi)){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 je&&(x=E.fb("ButtonBorder"),x instanceof Oi&&(x.fill=E._buttonFillNormal,x.stroke=E._buttonStrokeNormal))},y.actionDown=function(x,E){if(E.If()&&E instanceof je&&E._buttonFillPressed!==null&&x.button===0){var b=E.fb("ButtonBorder");if(b instanceof Oi){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 je&&E._buttonFillPressed!==null&&x.button===0){var b=E.fb("ButtonBorder");if(b instanceof Oi){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 je&&E._buttonFillPressed!==null){var b=E.fb("ButtonBorder");if(b instanceof Oi){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 je&&E._buttonFillPressed!==null){var b=x.diagram;if(b.firstInput.button===0&&(b.currentTool.standardMouseOver(),a(x,E)&&(x=E.fb("ButtonBorder"),x instanceof Oi))){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}),TA("TreeExpanderButton",function(){var a=el("Button",{_treeExpandedFigure:"MinusLine",_treeCollapsedFigure:"PlusLine"},el(Oi,{name:"ButtonIcon",figure:"MinusLine",stroke:"#424242",strokeWidth:2,desiredSize:ir},new Jo("figure","isTreeExpanded",function(y,x){return x=x.panel,y?x._treeExpandedFigure:x._treeCollapsedFigure}).cp()),{visible:!1},new Jo("visible","isTreeLeaf",function(y){return!y}).cp());return a.click=function(y,x){if(x=x.part,x instanceof Sr&&(x=x.adornedPart),x instanceof gn){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}),TA("SubGraphExpanderButton",function(){var a=el("Button",{_subGraphExpandedFigure:"MinusLine",_subGraphCollapsedFigure:"PlusLine"},el(Oi,{name:"ButtonIcon",figure:"MinusLine",stroke:"#424242",strokeWidth:2,desiredSize:ir},new Jo("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 Sr&&(x=x.adornedPart),x instanceof Ti){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}),TA("ToolTip",function(){return el(Sr,je.Auto,{isShadowed:!0,shadowColor:"rgba(0, 0, 0, .4)",shadowOffset:new Ot(0,3),shadowBlur:5},el(Oi,{name:"Border",figure:"RoundedRectangle",parameter1:1,parameter2:1,fill:"#F5F5F5",stroke:"#F0F0F0",spot1:new ri(0,0,4,6),spot2:new ri(1,1,-4,-4)}))}),TA("ContextMenu",function(){return el(Sr,je.Vertical,{background:"#F5F5F5",isShadowed:!0,shadowColor:"rgba(0, 0, 0, .4)",shadowOffset:new Ot(0,3),shadowBlur:5},new Jo("background","",function(a){return a.adornedPart!==null&&a.placeholder!==null?null:"#F5F5F5"}))}),TA("ContextMenuButton",function(){var a=el("Button");a.stretch=Yn;var y=a.fb("ButtonBorder");return y instanceof Oi&&(y.figure="Rectangle",y.strokeWidth=0,y.spot1=new ri(0,0,2,3),y.spot2=new ri(1,1,-2,-2)),a}),TA("PanelExpanderButton",function(a){var y=bd(a,"COLLAPSIBLE"),x=el("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},el(Oi,{name:"ButtonIcon",strokeWidth:2},new Jo("geometryString","visible",function(E){return E?x._buttonExpandedFigure:x._buttonCollapsedFigure}).cp(y)));return a=x.fb("ButtonBorder"),a instanceof Oi&&(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}),TA("CheckBoxButton",function(a){var y=bd(a);return a=el("Button",{desiredSize:new Xe(14,14)},el(Oi,{name:"ButtonIcon",geometryString:"M0 0 M0 8.85 L4.9 13.75 16.2 2.45 M16.2 16.2",strokeWidth:2,stretch:_e,geometryStretch:Rn,visible:!1},y!==""?new Jo("visible",y).Kx():[])),a.click=function(x,E){if(E instanceof je){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}),TA("CheckBox",function(a){a=bd(a),a=el("CheckBoxButton",a,{name:"Button",isActionable:!1,margin:new Xi(0,1,0,0)});var y=el(je,"Horizontal",a,{isActionable:!0,cursor:a.cursor,margin:new Xi(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}),re.None=Re=new xe(re,"None",0),re.Default=Mi=new xe(re,"Default",0),re.Vertical=di=new xe(re,"Vertical",4),re.Horizontal=Yn=new xe(re,"Horizontal",5),re.Fill=_e=new xe(re,"Fill",3),re.Uniform=Rn=new xe(re,"Uniform",1),re.UniformToFill=Ji=new xe(re,"UniformToFill",2),re.FlipVertical=zi=new xe(re,"FlipVertical",1),re.FlipHorizontal=lr=new xe(re,"FlipHorizontal",2),re.FlipBoth=Ir=new xe(re,"FlipBoth",3),re.make=el,re.getBuilders=function(){var a=new yn,y;for(y in zf)if(y!==y.toLowerCase()){var x=zf.I(y);typeof x=="function"&&a.add(y,x)}return a.freeze(),a},re.defineBuilder=TA,re.build=function(a,y,x){for(var E=[],b=2;b<arguments.length;++b)E[b-2]=arguments[b];if(b=zf.I(a),typeof b=="function"&&(E=b([a].concat(E)),E instanceof re))return y&&E.set(y),E;Yt('GraphObject.build invoked object builder "'+a+'", but it did not return an Object')},re.takeBuilderArgument=bd;function ec(){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=nr,this.o=Vr,this.hg=Mi,this.ob=this.Bi=1,this.Pf=Re,this.Pc=this.Ci=this.gd=null,this.Oc="category"}ec.prototype.copy=function(){var a=new ec;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 vh(){this.u=-1/0,this.o=0,this.F=Ni,this.rr=ka,this.j=this.V="None"}vh.prototype.copy=function(){var a=new vh;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},vh.className="LinkElementSettings";function Td(){this.yj=this.Xi=is,this.xj=this.Wi=this.wj=this.Vi=NaN,this.Tr=this.hq=null,this.Ur=this.iq=1/0}Td.prototype.copy=function(){var a=new Td;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},Td.className="LinkSettings";function nc(){this.ha=[1,0,0,1,0,0]}nc.prototype.copy=function(){var a=new nc;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},nc.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},nc.prototype.scale=function(a,y){this.ha[0]*=a,this.ha[1]*=a,this.ha[2]*=y,this.ha[3]*=y},nc.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)}},nc.className="STransform";function Qu(a){this.type=a,this.r2=this.y2=this.x2=this.r1=this.y1=this.x1=0,this.gx=[],this.pattern=null}Qu.prototype.addColorStop=function(a,y){this.gx.push({offset:a,color:y})},Qu.className="SGradient";function qs(a,y,x){this.ownerDocument=a=y===void 0?sn.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 Ea(this,x)}qs.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},qs.prototype.Ud=function(a,y,x){if(a=this.ownerDocument.createElementNS(this.cA,a),Ne(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},qs.prototype.getBoundingClientRect=function(){return this.Oa.getBoundingClientRect()},qs.prototype.focus=function(){this.Oa.focus()},qs.prototype.mx=function(){this.ownerDocument=null},We.Object.defineProperties(qs.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}}}),qs.className="SVGSurface";function Ea(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 nc,this.j=vg(this),this.Nj=vg(this,"gojs-diagram"),this.Hl=this.ti=null;var x=vi++,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 Id(a,y,x,E,b,z,tt){a.Nj===void 0?Qd(a,y,x,E,b,z,tt):a.Nj.setAttribute("transform","matrix("+y+", "+x+", "+E+", "+b+", "+z+", "+tt+")")}Pt=Ea.prototype,Pt.arc=function(a,y,x,E,b,z,tt,rt){var ot=2*Math.PI,at=ot-1e-6,At=x*Math.cos(E),ft=x*Math.sin(E),pt=a+At,xt=y+ft,Bt=z?0:1;E=z?E-b:b-E,(1e-6<Math.abs(tt-pt)||1e-6<Math.abs(rt-xt))&&this.path.push(["L",pt,+xt]),0>E&&(E=E%ot+ot),E>at?(this.path.push(["A",x,x,0,1,Bt,a-At,y-ft]),this.path.push(["A",x,x,0,1,Bt,pt,xt])):1e-6<E&&this.path.push(["A",x,x,0,+(E>=Math.PI),Bt,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 Qu("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"+vi++,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(Wl,b)),this.svg.appendChild(a),x[y]=E,"url(#"+E+")"},Pt.createRadialGradient=function(a,y,x,E,b,z){var tt=new Qu("radial");return tt.x1=a,tt.y1=y,tt.r1=x,tt.x2=E,tt.y2=b,tt.r2=z,tt};function qp(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 at="";a instanceof HTMLCanvasElement&&(at=a.toDataURL()),a instanceof HTMLImageElement&&(at=a.getAttribute("src"));var At=a instanceof HTMLImageElement?a.naturalWidth:a.width;a=a instanceof HTMLImageElement?a.naturalHeight:a.height,E===void 0&&(z=y,tt=x,rt=E=At,ot=b=a),E=E||0,b=b||0,rt=rt||0,ot=ot||0,qp(this,y,x,E,b,z||0,tt||0,rt,ot),z={x:0,y:0,width:At||E,height:a||b,href:at},oe.$(E,rt)&&oe.$(b,ot)?at.toLowerCase().indexOf(".svg")===-1&&at.toLowerCase().indexOf("data:image/svg")===-1&&(z.preserveAspectRatio="xMidYMid slice"):z.preserveAspectRatio="none",(y!==0||x!==0||E!==At||b!==a)&&(E+=y,b+=x,z["clip-path"]="path('M "+y+","+x+" L "+E+" "+x+" L "+E+" "+b+" L "+y+" "+b+" z')"),ic(this,Wl,z,this.rb),this.addElement(Wl,z)},Pt.fill=function(a){a&&(this.Yl["fill-rule"]="evenodd"),rc(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]},ic(this,"fill",a,this.rb),this.addElement("rect",a)},Pt.ox=function(a,y,x,E){a={x:a,y,width:x,height:E},ic(this,"fill",a,this.rb),rc(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},ic(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||Qd(this,a,y,x,E,b,z)};function $p(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(){t0(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 ic(a,y,x,E){y==="fill"?rc(a,x):y==="stroke"&&t0(a,x),E!==null&&(a=E.ha,x.transform="matrix("+a[0]+", "+a[1]+", "+a[2]+", "+a[3]+", "+a[4]+", "+a[5]+")")}function rc(a,y){a.fillStyle instanceof Qu?y.fill=oc(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 Nd(a,y,x){x=x?"fill":"stroke",a.fillStyle instanceof Qu?y.setAttributeNS(null,"fill",oc(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 t0(a,y){if(a.strokeStyle instanceof Qu)y.stroke=oc(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 oc(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"+vi++,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(at,At){return at.offset>At.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=Ln(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,ic(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 Qd(a,y,x,E,b,z,tt){var rt=new nc;rt.ha=[y,x,E,b,z,tt],y={},ic(a,"g",y,rt),rt=a.addElement("g",y),a.nh.push(rt)}function vg(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 cA(a){a.Il=!1,a.shadowOffsetX=0,a.shadowOffsetY=0,a.shadowBlur=0}function eu(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(){},Ea.prototype.rotate=function(a){this.rb.rotate(57.2958*a,0,0)},Ea.prototype.getImageData=function(){return null},Ea.prototype.measureText=function(){return null};function Ud(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()))}Ea.prototype.Hs=function(a){a.svg!==null&&a.svg.parentNode===this.Nj&&a.svg.remove()},Ea.className="SVGContext",pe.prototype.Cs=function(a){this.pj.contains("SVG")||this.bs("SVG",new qs(this,sn.document));var y=new qs(this,sn.document,!0);a===void 0&&(a=new Hn);var x=this;return Yc(this,function(E,b){return E=pg(x,E,"SVG",y),E=E!==null?E.svg:null,typeof b=="function"?(b(E),null):E},a)},pe.prototype.makeSvg=pe.prototype.Cs,pe.prototype.av=function(a){return this.Cs(a)},pe.prototype.makeSVG=pe.prototype.av;function El(a,y,x,E){this.ownerDocument=y=y===void 0?sn.document:y,this.hs=null,y=y.createElement("canvas"),y.tabIndex=0,this.Oa=y,this.context=new sc(y,x,E),y.H=a}El.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},El.prototype.toDataURL=function(a,y){return this.Oa.toDataURL(a,y)},El.prototype.getBoundingClientRect=function(){return this.Oa.getBoundingClientRect()},El.prototype.focus=function(){this.Oa.focus()},El.prototype.mx=function(){this.ownerDocument=this.Oa.H=null},We.Object.defineProperties(El.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}}}),El.className="CanvasSurface";function sc(a,y,x){this.Z=a.getContext?a.getContext("2d",y):null,this.Z===null&&Yt("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 Ei,this.isTemporary=!!x}Pt=sc.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()},sc.prototype.rotate=function(a){this.El.rotate(57.2958*a,0,0)},Pt=sc.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 Mr&&a.type===Ki){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(km),a.lineDashOffset=0)},Pt.Vc=function(a){a&&(this.dt=""),this.ct=this.et=""},Pt.Hs=function(){},We.Object.defineProperties(sc.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 km=Object.freeze([]);sc.className="CanvasSurfaceContext";function Dd(){this.F=this.o=this.u=this.j=0}Dd.className="ColorNumbers";function Mr(a,y){ei||(wt(),ei=!0),nn(this),this._isFrozen=!1,a===void 0?(this.na=sr,this.xk="black"):typeof a=="string"?(this.na=sr,this.xk=a):(this.na=a,this.xk="black"),a=this.na,a===Qi?(this.Qd=Fr,this.Lk=Bs):this.Lk=a===Ki?this.Qd=Ui:this.Qd=$i,this.Gr=0,this.Xp=NaN,this.xe=this.cr=this.we=null,this.ft=this.yk=0,y&&Object.assign(this,y)}Mr.prototype.copy=function(){var a=new Mr;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=Mr.prototype,Pt.freeze=function(){return this._isFrozen=!0,this.we!==null&&this.we.freeze(),this},Pt.ka=function(){return Object.isFrozen(this)&&Yt("cannot thaw constant: "+this),this._isFrozen=!1,this.we!==null&&this.we.ka(),this},Pt.qb=function(a){a.classType===Mr&&(this.type=a)},Pt.toString=function(){var a="Brush(";if(this.type===sr)a+=this.color;else if(a=this.type===Qi?a+"Linear ":this.type===Ki?a+"Radial ":this.type===fo?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&&de(this),(typeof a!="number"||!isFinite(a)||1<a||0>a)&&Sn(a,"0 <= loc <= 1",Mr,"addColorStop:loc"),this.we===null&&(this.we=new yn),this.we.add(a,y),this.na===sr&&(this.type=Qi),this.xe=null,this},Pt.Vz=function(a,y){if(this._isFrozen&&de(this),a=a===void 0||typeof a!="number"?.2:a,y=y===void 0?Pr:y,this.type===sr)nu(this.color),this.color=jf(a,y);else if((this.type===Qi||this.type===Ki)&&this.colorStops!==null)for(var x=this.colorStops.iterator;x.next();)nu(x.value),this.addColorStop(x.key,jf(a,y));return this};function e0(a,y,x){return y=y===void 0||typeof y!="number"?.2:y,x=x===void 0?Pr:x,nu(a),jf(y,x)}Pt.Wy=function(a,y){if(this._isFrozen&&de(this),a=a===void 0||typeof a!="number"?.2:a,y=y===void 0?Pr:y,this.type===sr)nu(this.color),this.color=jf(-a,y);else if((this.type===Qi||this.type===Ki)&&this.colorStops!==null)for(var x=this.colorStops.iterator;x.next();)nu(x.value),this.addColorStop(x.key,jf(-a,y));return this};function n0(a,y,x){return y=y===void 0||typeof y!="number"?.2:y,x=x===void 0?Pr:x,nu(a),jf(-y,x)}function ep(a,y,x){nu(a),a=ce.j;var E=ce.u,b=ce.o,z=ce.F;return nu(y),x===void 0&&(x=.5),"rgba("+Math.round((ce.j-a)*x+a)+", "+Math.round((ce.u-E)*x+E)+", "+Math.round((ce.o-b)*x+b)+", "+Math.round((ce.F-z)*x+z)+")"}Pt.Gx=function(){if(this.type===sr)return Kf(this.color);if((this.type===Qi||this.type===Ki)&&this.colorStops!==null){var a=this.colorStops;if(this.type===Ki)return Kf(a.first().value);if(a.get(.5)!==null)return Kf(a.get(.5));if(a.count===2)return a=a.Fa(),Kf(ep(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,Kf(ep(a.get(x),a.get(E),1-z/b))}return!1};function Kf(a){return a?a instanceof Mr?a.Gx():(nu(a),128>(299*ce.j+587*ce.u+114*ce.o)/1e3):!1}function jf(a,y){switch(y){case Pr:y=100*ip(ce.j);var x=100*ip(ce.u),E=100*ip(ce.o);return $e.j=.4124564*y+.3575761*x+.1804375*E,$e.u=.2126729*y+.7151522*x+.072175*E,$e.o=.0193339*y+.119192*x+.9503041*E,$e.F=ce.F,y=vt($e.j/ae[0]),x=vt($e.u/ae[1]),E=vt($e.o/ae[2]),vn.j=116*x-16,vn.u=500*(y-x),vn.o=200*(x-E),vn.F=$e.F,vn.j=Math.min(100,Math.max(0,vn.j+100*a)),a=(vn.j+16)/116,y=a-vn.o/200,$e.j=ae[0]*mt(vn.u/500+a),$e.u=ae[1]*(vn.j>Xt*Qt?Math.pow(a,3):vn.j/Xt),$e.o=ae[2]*mt(y),$e.F=vn.F,a=-.969266*$e.j+1.8760108*$e.u+.041556*$e.o,y=.0556434*$e.j+-.2040259*$e.u+1.0572252*$e.o,ce.j=255*rp((3.2404542*$e.j+-1.5371385*$e.u+-.4985314*$e.o)/100),ce.u=255*rp(a/100),ce.o=255*rp(y/100),ce.F=$e.F,ce.j=Math.round(ce.j),255<ce.j?ce.j=255:0>ce.j&&(ce.j=0),ce.u=Math.round(ce.u),255<ce.u?ce.u=255:0>ce.u&&(ce.u=0),ce.o=Math.round(ce.o),255<ce.o?ce.o=255:0>ce.o&&(ce.o=0),"rgba("+ce.j+", "+ce.u+", "+ce.o+", "+ce.F+")";case Lr:return np(),Ye.o=Math.min(100,Math.max(0,Ye.o+100*a)),"hsla("+Ye.j+", "+Ye.u+"%, "+Ye.o+"%, "+Ye.F+")";default:Yt("Unknown color space: "+y)}}function nu(a){ei||(wt(),ei=!0);var y=Pe;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,ce.j=a[0],ce.u=a[1],ce.o=a[2],ce.F=a[3]/255):(y.fillStyle="#FFFFFF",y.fillStyle=a,ce.j=0,ce.u=0,ce.o=0,ce.F=1)}}function np(){var a=ce.j/255,y=ce.u/255,x=ce.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))}Ye.j=Math.round(tt),Ye.u=Math.round(100*a),Ye.o=Math.round(100*b),Ye.F=ce.F}function ip(a){return a/=255,.04045>=a?a/12.92:Math.pow((a+.055)/1.055,2.4)}function rp(a){return .0031308>=a?12.92*a:1.055*Math.pow(a,1/2.4)-.055}function vt(a){return a>Qt?Math.pow(a,1/3):(Xt*a+16)/116}function mt(a){var y=a*a*a;return y>Qt?y:(116*a-16)/Xt}function St(a,y){typeof a!="string"&&(a instanceof Mr||Yt("Value for "+y+" must be a color string or a Brush, not "+a))}function wt(){Pe=Co?new El(null,void 0,{willReadFrequently:!0}).context:null}We.Object.defineProperties(Mr.prototype,{type:{get:function(){return this.na},set:function(a){this._isFrozen&&de(this,a),this.na=a,this.start.Mc()&&(a===Qi?this.start=Fr:a===Ki&&(this.start=Ui)),this.end.Mc()&&(a===Qi?this.end=Bs:a===Ki&&(this.end=Ui)),this.xe=null}},color:{get:function(){return this.xk},set:function(a){this._isFrozen&&de(this,a),this.xk=a,this.xe=null}},start:{get:function(){return this.Qd},set:function(a){this._isFrozen&&de(this,a),this.Qd=a.J(),this.xe=null}},end:{get:function(){return this.Lk},set:function(a){this._isFrozen&&de(this,a),this.Lk=a.J(),this.xe=null}},startRadius:{get:function(){return this.Gr},set:function(a){this._isFrozen&&de(this,a),0>a&&Sn(a,">= zero",Mr,"startRadius"),this.Gr=a,this.xe=null}},endRadius:{get:function(){return this.Xp},set:function(a){this._isFrozen&&de(this,a),0>a&&Sn(a,">= zero",Mr,"endRadius"),this.Xp=a,this.xe=null}},colorStops:{get:function(){return this.we},set:function(a){this._isFrozen&&de(this,a),this.we=a,this.xe=null}},pattern:{get:function(){return this.cr},set:function(a){this._isFrozen&&de(this,a),this.cr=a,this.xe=null}}}),Mr.prototype.isDark=Mr.prototype.Gx,Mr.prototype.darkenBy=Mr.prototype.Wy,Mr.prototype.lightenBy=Mr.prototype.Vz,Mr.prototype.addColorStop=Mr.prototype.addColorStop;var Qt=216/24389,Xt=24389/27,ae=[95.047,100,108.883],Pe=null,ce=new Dd,Ye=new Dd,$e=new Dd,vn=new Dd,ei=!1;Mr.className="Brush";var sr;Mr.Solid=sr=new xe(Mr,"Solid",0);var Qi;Mr.Linear=Qi=new xe(Mr,"Linear",1);var Ki;Mr.Radial=Ki=new xe(Mr,"Radial",2);var fo;Mr.Pattern=fo=new xe(Mr,"Pattern",4);var Pr;Mr.Lab=Pr=new xe(Mr,"Lab",5);var Lr;Mr.HSL=Lr=new xe(Mr,"HSL",6),Mr.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},Mr.isValidColor=function(a){if(a==="black")return!0;if(a==="")return!1;ei||(wt(),ei=!0);var y=Pe;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)},Mr.lighten=function(a){return e0(a)},Mr.lightenBy=e0,Mr.darken=function(a){return n0(a)},Mr.darkenBy=n0,Mr.mix=ep,Mr.isDark=Kf;function kr(){this.xa="Base"}kr.prototype.measure=function(){},kr.prototype.Yz=function(a,y,x,E,b){a.measure(y,x,E,b)},kr.prototype.arrange=function(){},kr.prototype.Ly=function(a,y,x,E,b,z){a.arrange(y,x,E,b,z)},kr.prototype.iA=function(a){a.Uj()},kr.prototype.gc=function(){},We.Object.defineProperties(kr.prototype,{name:{get:function(){return this.xa},set:function(a){this.xa=a}},classType:{get:function(){return je}}}),kr.prototype.remeasureObject=kr.prototype.iA,kr.prototype.arrangeElement=kr.prototype.Ly,kr.prototype.measureElement=kr.prototype.Yz,kr.className="PanelLayout";function Fo(){this.xa="Base"}Le(Fo,kr),Fo.prototype.measure=function(a,y,x,E,b,z,tt){var rt=E.length;a=za(a);for(var ot=0;ot<rt;ot++){var at=E[ot];if(at.visible||at===a){var At=at.margin,ft=At.right+At.left;At=At.top+At.bottom,at.measure(y,x,z,tt);var pt=at.measuredBounds;ft=Math.max(pt.width+ft,0),At=Math.max(pt.height+At,0),pt=at.position.x;var xt=at.position.y;isFinite(pt)||(pt=0),isFinite(xt)||(xt=0),at instanceof Oi&&at.isGeometryPositioned&&(at=at.strokeWidth/2,pt-=at,xt-=at),Kr(b,pt,xt,ft,At)}}},Fo.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,at=z.position.y;if(ot=isNaN(ot)?-a:ot-a,at=isNaN(at)?-x:at-x,z instanceof Oi&&z.isGeometryPositioned){var At=z.strokeWidth/2;ot-=At,at-=At}z.visible&&z.arrange(ot+rt.left,at+rt.top,tt.width,tt.height)}};function eo(){this.xa="Base"}Le(eo,kr),eo.prototype.measure=function(a,y,x,E,b,z,tt){var rt=E.length;y=Qn(),z=za(a);for(var ot=0;ot<rt;ot++){var at=E[ot];if(at.visible||at===z){var At=ma(at,!1);if(At!==Re&&At!==Yn)y.push(at);else{at.measure(1/0,x,0,tt),At=at.margin,at=at.measuredBounds;var ft=Math.max(at.height+At.top+At.bottom,0);b.width+=Math.max(at.width+At.right+At.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)&&(At=ot.margin,rt=At.right+At.left,At=At.top+At.bottom,ot.measure(1/0,x,0,tt),ot=ot.measuredBounds,At=Math.max(ot.height+At,0),b.width+=Math.max(ot.width+rt,0),b.height=Math.max(b.height,At));Dn(y)},eo.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 at=z,At=y[ot];if(At.visible){var ft=At.measuredBounds,pt=At.margin,xt=pt.top+pt.bottom,Bt=z+b.bottom,Mt=ft.height,Gt=ma(At,!1);(isNaN(At.desiredSize.height)&&Gt===_e||Gt===di)&&(Mt=Math.max(x.height-xt-Bt,0)),xt=Mt+xt+Bt,Bt=At.alignment,Bt.Xb()&&(Bt=a.defaultAlignment),Bt.sb()||(Bt=Ui),tt&&(rt-=ft.width+pt.left+pt.right),At.arrange(rt+Bt.offsetX+pt.left,at+Bt.offsetY+pt.top+(x.height*Bt.y-xt*Bt.y),ft.width,Mt),tt||(rt+=ft.width+pt.left+pt.right)}}};function gr(){this.xa="Base"}Le(gr,kr),gr.prototype.measure=function(a,y,x,E,b,z){var tt=E.length;x=Qn();for(var rt=za(a),ot=0;ot<tt;ot++){var at=E[ot];if(at.visible||at===rt){var At=ma(at,!1);if(At!==Re&&At!==di)x.push(at);else{var ft=at.margin;At=ft.right+ft.left,ft=ft.top+ft.bottom,at.measure(y,1/0,z,0),at=at.measuredBounds,ho(b,Math.max(b.width,Math.max(at.width+At,0)),b.height+Math.max(at.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)&&(at=ot.margin,tt=at.right+at.left,at=at.top+at.bottom,ot.measure(y,1/0,z,0),ot=ot.measuredBounds,at=Math.max(ot.height+at,0),b.width=Math.max(b.width,Math.max(ot.width+tt,0)),b.height+=at);Dn(x)}},gr.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 at=z,At=y[ot];if(At.visible){var ft=At.measuredBounds,pt=At.margin,xt=pt.left+pt.right,Bt=z+b.right,Mt=ft.width,Gt=ma(At,!1);(isNaN(At.desiredSize.width)&&Gt===_e||Gt===Yn)&&(Mt=Math.max(x.width-xt-Bt,0)),xt=Mt+xt+Bt,Bt=At.alignment,Bt.Xb()&&(Bt=a.defaultAlignment),Bt.sb()||(Bt=Ui),tt&&(rt-=ft.height+pt.bottom+pt.top),At.arrange(at+Bt.offsetX+pt.left+(x.width*Bt.x-xt*Bt.x),rt+Bt.offsetY+pt.top,Mt,ft.height),tt||(rt+=ft.height+pt.bottom+pt.top)}}};function Do(){this.xa="Base"}Le(Do,kr),Do.prototype.measure=function(a,y,x,E,b,z,tt){var rt=E.length,ot=a.Pb(),at=ot.margin,At=at.right+at.left,ft=at.top+at.bottom;ot.measure(y,x,z,tt);var pt=ot.measuredBounds;z=pt.width,tt=pt.height;var xt=Math.max(z+At,0),Bt=Math.max(tt+ft,0),Mt=a.isClipping,Gt=Me.allocAt(-at.left,-at.top,xt,Bt),Dt=Me.allocAt(0,0,z,tt);Vo(ot,Dt,!0),z=Dt.width,tt=Dt.height;for(var _t=!0,Zt=za(a),te=0;te<rt;te++){var ie=E[te];pt=y;var me=x;if(ie!==ot&&(ie.visible||ie===Zt)){at=ie.margin;var ln=at.left,Un=at.top;switch(xt=at.right+at.left,Bt=at.top+at.bottom,at=ma(ie,!1),at){case _e:pt=z,me=tt,Un=ln=Bt=xt=0;break;case Yn:pt=z,ln=xt=0;break;case di:me=tt,Un=Bt=0}ie.measure(pt,me,0,0),pt=ie.measuredBounds,xt=Math.max(pt.width+xt,0),Bt=Math.max(pt.height+Bt,0),at=ie.alignment,at.Xb()&&(at=a.defaultAlignment),at.sb()||(at=Ui);var Fn=ie.alignmentFocus;if(Fn.Xb()&&(Fn=Ui),me=null,ie instanceof je&&ie.$e!==""&&(me=ie.fb(ie.$e),me===ie&&(me=null)),ln=Dt.x-ln,Un=Dt.y-Un,me!==null){for(ie.arrange(0,0,pt.width,pt.height),pt=me.actualBounds,pt=Ot.allocAt(pt.x+(Fn.x*pt.width-Fn.offsetX),pt.y+(Fn.y*pt.height-Fn.offsetY)),me=me.panel;me!==ie;)me.transform.Ga(pt),me=me.panel;ln+=at.x*z+at.offsetX-pt.x,Un+=at.y*tt+at.offsetY-pt.y,Ot.free(pt)}else ln+=at.x*z+at.offsetX-(Fn.x*pt.width+Fn.offsetX),Un+=at.y*tt+at.offsetY-(Fn.y*pt.height+Fn.offsetY);_t?(_t=!1,b.h(ln,Un,xt,Bt)):Kr(b,ln,Un,xt,Bt)}}switch(_t?b.assign(Gt):Mt?b.Uu(Dt.x,Dt.y,Dt.width,Dt.height):Kr(b,Gt.x,Gt.y,Gt.width,Gt.height),Me.free(Gt),Me.free(Dt),at=ot.stretch,at===Mi&&(at=ma(ot,!1)),at){case Re:return;case _e:if(!isFinite(y)&&!isFinite(x))return;break;case Yn:if(!isFinite(y))return;break;case di:if(!isFinite(x))return}for(pt=ot.measuredBounds,z=pt.width,tt=pt.height,xt=Math.max(z+At,0),Bt=Math.max(tt+ft,0),at=ot.margin,Dt=Me.allocAt(-at.left,-at.top,xt,Bt),Vo(ot,Dt,!0),z=Dt.width,tt=Dt.height,y=0;y<rt;y++)x=E[y],x===ot||!x.visible&&x!==Zt||(at=x.margin,xt=at.right+at.left,Bt=at.top+at.bottom,pt=x.measuredBounds,xt=Math.max(pt.width+xt,0),Bt=Math.max(pt.height+Bt,0),At=x.alignment,At.Xb()&&(At=a.defaultAlignment),At.sb()||(At=Ui),x=x.alignmentFocus,x.Xb()&&(x=Ui),_t?(_t=!1,b.h(At.x*z+At.offsetX-(x.x*pt.width+x.offsetX)-at.left,At.y*tt+At.offsetY-(x.y*pt.height+x.offsetY)-at.top,xt,Bt)):Kr(b,At.x*z+At.offsetX-(x.x*pt.width+x.offsetX)-at.left,At.y*tt+At.offsetY-(x.y*pt.height+x.offsetY)-at.top,xt,Bt));_t?b.assign(Gt):Mt?b.Uu(Dt.x,Dt.y,Dt.width,Dt.height):Kr(b,Gt.x,Gt.y,Gt.width,Gt.height),Me.free(Dt)},Do.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 at=z-x.x,At=ot-x.y;for(b.arrange(at,At,tt,rt),tt=Me.allocAt(0,0,tt,rt),Vo(b,tt,!1),rt=0;rt<E;rt++){var ft=y[rt];if(ft!==b){at=ft.measuredBounds;var pt=at.width,xt=at.height;At=ft.alignment,At.Xb()&&(At=a.defaultAlignment),At.sb()||(At=Ui);var Bt=ft.alignmentFocus;if(Bt.Xb()&&(Bt=Ui),at=null,ft instanceof je&&ft.$e!==""&&(at=ft.fb(ft.$e),at===ft&&(at=null)),at!==null){var Mt=at.actualBounds;for(Bt=Ot.allocAt(Mt.x+(Bt.x*Mt.width-Bt.offsetX),Mt.y+(Bt.y*Mt.height-Bt.offsetY)),at=at.panel;at!==ft;)at.transform.Ga(Bt),at=at.panel;at=At.x*tt.width+At.offsetX-Bt.x,At=At.y*tt.height+At.offsetY-Bt.y,Ot.free(Bt)}else at=At.x*tt.width+At.offsetX-(Bt.x*pt+Bt.offsetX),At=At.y*tt.height+At.offsetY-(Bt.y*xt+Bt.offsetY);at+=tt.x-x.x,At+=tt.y-x.y,ft.visible&&ft.arrange(z+at,ot+At,pt,xt)}}Me.free(tt)};function Vo(a,y,x){var E=null;if(a instanceof je&&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 io(){this.xa="Base"}Le(io,kr),io.prototype.measure=function(a,y,x,E,b,z,tt){var rt=E.length,ot=a.Pb(),at=ot.margin,At=y,ft=x,pt=at.right+at.left,xt=at.top+at.bottom;ot.measure(y,x,z,tt),at=ot.measuredBounds;var Bt=0,Mt=null;ot instanceof Oi&&(Mt=ot,Bt=Mt.strokeWidth*Mt.scale);var Gt=Math.max(at.width+pt,0);at=Math.max(at.height+xt,0);var Dt=Tm(ot),_t=Dt.x*Gt+Dt.offsetX;Dt=Dt.y*at+Dt.offsetY;var Zt=Im(ot),te=Zt.x*Gt+Zt.offsetX;for(Zt=Zt.y*at+Zt.offsetY,isFinite(y)&&(At=Math.max(Math.abs(_t-te)-Bt,0)),isFinite(x)&&(ft=Math.max(Math.abs(Dt-Zt)-Bt,0)),Bt=Xe.alloc(),Bt.h(0,0),a=za(a),Zt=0;Zt<rt;Zt++)Dt=E[Zt],Dt===ot||!Dt.visible&&Dt!==a||(at=Dt.margin,Gt=at.right+at.left,_t=at.top+at.bottom,Dt.measure(At,ft,0,0),at=Dt.measuredBounds,Gt=Math.max(at.width+Gt,0),at=Math.max(at.height+_t,0),Bt.h(Math.max(Gt,Bt.width),Math.max(at,Bt.height)));if(rt===1)b.width=Gt,b.height=at,Xe.free(Bt);else{switch(Dt=Tm(ot),Zt=Im(ot),rt=E=0,Zt.x!==Dt.x&&Zt.y!==Dt.y&&(E=Bt.width/Math.abs(Zt.x-Dt.x),rt=Bt.height/Math.abs(Zt.y-Dt.y)),Xe.free(Bt),Bt=0,Mt!==null&&(Bt=Mt.strokeWidth*Mt.scale,Hm(Mt)===Rn&&(E=rt=Math.max(E,rt))),E+=Math.abs(Dt.offsetX)+Math.abs(Zt.offsetX)+Bt,rt+=Math.abs(Dt.offsetY)+Math.abs(Zt.offsetY)+Bt,Mt=ot.stretch,Mt===Mi&&(Mt=ma(ot,!1)),Mt){case Re:tt=z=0;break;case _e:isFinite(y)&&(E=y),isFinite(x)&&(rt=x);break;case Yn:isFinite(y)&&(E=y),tt=0;break;case di:z=0,isFinite(x)&&(rt=x)}ot.Uj(),ot.measure(E,rt,z,tt),b.width=ot.measuredBounds.width+pt,b.height=ot.measuredBounds.height+xt}},io.prototype.arrange=function(a,y){var x=y.length,E=a.Pb(),b=E.measuredBounds,z=Me.alloc();z.h(0,0,1,1);var tt=E.margin,rt=tt.left;tt=tt.top;var ot=a.padding,at=ot.left;ot=ot.top,E.arrange(at+rt,ot+tt,b.width,b.height);var At=Tm(E),ft=Im(E),pt=At.y*b.height+At.offsetY,xt=ft.x*b.width+ft.offsetX;for(ft=ft.y*b.height+ft.offsetY,z.x=At.x*b.width+At.offsetX,z.y=pt,Kr(z,xt,ft,0,0),z.x+=rt+at,z.y+=tt+ot,b=0;b<x;b++)rt=y[b],rt!==E&&(at=rt.measuredBounds,tt=rt.margin,ot=Math.max(at.width+tt.right+tt.left,0),At=Math.max(at.height+tt.top+tt.bottom,0),pt=rt.alignment,pt.Xb()&&(pt=a.defaultAlignment),pt.sb()||(pt=Ui),ot=z.width*pt.x+pt.offsetX-ot*pt.x+tt.left+z.x,tt=z.height*pt.y+pt.offsetY-At*pt.y+tt.top+z.y,rt.visible&&(Ro(z.x,z.y,z.width,z.height,ot,tt,at.width,at.height)?rt.arrange(ot,tt,at.width,at.height):rt.arrange(ot,tt,at.width,at.height,new Me(z.x,z.y,z.width,z.height))));Me.free(z)};function ra(){this.xa="Base",this.name="Table"}Le(ra,kr),ra.prototype.measure=function(a,y,x,E,b){for(var z=E.length,tt=Qn(),rt=Qn(),ot=0;ot<z;ot++){var at=E[ot],At=at instanceof je?at:null;if(At!==null&&lc(At)&&at.visible){rt.push(At);for(var ft=At.O.s,pt=ft.length,xt=0;xt<pt;xt++){var Bt=ft[xt];At.type===je.TableRow?Bt.row=at.row:At.type===je.TableColumn&&(Bt.column=at.column),tt.push(Bt)}}else tt.push(at)}z=tt.length,z===0&&(a.Fb(0),a.Eb(0));for(var Mt=[],Gt=0;Gt<z;Gt++){var Dt=tt[Gt];Dt.visible&&(Zo(Dt,!0),bA(Dt,!0),Mt[Dt.row]||(Mt[Dt.row]=[]),Mt[Dt.row][Dt.column]||(Mt[Dt.row][Dt.column]=[]),Mt[Dt.row][Dt.column].push(Dt))}Dn(tt);var _t=Qn(),Zt=Qn(),te=Qn(),ie={count:0},me={count:0},ln=y,Un=x,Fn=a.rowDefs,tn=a.colDefs,De=null;z=Fn.length;for(var bi=0;bi<z;bi++)De=Fn[bi],De!==void 0&&(De.actual=0);z=tn.length;for(var Bi=0;Bi<z;Bi++)De=tn[Bi],De!==void 0&&(De.actual=0);for(var Br=Mt.length,Wr=0,Ss=0;Ss<Br;Ss++)Mt[Ss]&&(Wr=Math.max(Wr,Mt[Ss].length));var Ls=Math.min(a.topIndex,Br-1),ya=Math.min(a.leftIndex,Wr-1),xs=0;Br=Mt.length;for(var vc=za(a),qo=0;qo<Br;qo++)if(Mt[qo]){Wr=Mt[qo].length;var DA=a.Fb(qo);DA.actual=0;for(var wa=DA.oc=0;wa<Wr;wa++)if(Mt[qo][wa]){var yc=a.Eb(wa);_t[wa]===void 0&&(yc.actual=0,yc.oc=0,_t[wa]=!0);for(var Tl=Mt[qo][wa],Jl=Tl.length,vl=0;vl<Jl;vl++){var il=Tl[vl];if(il.visible||il===vc){var uf=1<il.rowSpan||1<il.columnSpan;uf&&(qo<Ls||wa<ya||Zt.push(il));var OA=il.margin,Gg=OA.right+OA.left,yl=OA.top+OA.bottom,Sa=Po(il,DA,yc,!1),Kp=il.desiredSize,Xd=!isNaN(Kp.height),au=!isNaN(Kp.width)&&Xd;if(uf||Sa===Re||au||qo<Ls||wa<ya||(ie[wa]!==void 0||Sa!==_e&&Sa!==Yn||(ie[wa]=-1,ie.count++),me[qo]!==void 0||Sa!==_e&&Sa!==di||(me[qo]=-1,me.count++),te.push(il)),il.measure(1/0,1/0,0,0),!(qo<Ls||wa<ya)){var rl=il.measuredBounds,$f=Math.max(rl.width+Gg,0),wl=Math.max(rl.height+yl,0);if(il.rowSpan===1&&(Sa===Re||Sa===Yn)){De=a.Fb(qo);var hf=De.Wc();xs=Math.max(wl-De.actual,0),xs+hf>Un&&(xs=Math.max(Un-hf,0));var ym=De.oa===0;De.oc=De.oc+xs,De.actual=De.oa+xs,Un=Math.max(Un-(xs+(ym?hf:0)),0)}if(il.columnSpan===1&&(Sa===Re||Sa===di)){De=a.Eb(wa);var jp=De.Wc();xs=Math.max($f-De.actual,0),xs+jp>ln&&(xs=Math.max(ln-jp,0));var ey=De.oa===0;De.oc=De.oc+xs,De.actual=De.oa+xs,ln=Math.max(ln-(xs+(ey?jp:0)),0)}uf&&il.Uj()}}}}}Dn(_t);var Wu=0,xh=0;z=a.columnCount;for(var Zd=0;Zd<z;Zd++){var cf=tn[Zd];cf!==void 0&&(Wu+=isNaN(cf.Hc)?cf.oc:cf.Hc,cf.oc!==0&&(Wu+=cf.Wc()))}z=a.rowCount;for(var zg=0;zg<z;zg++){var ff=Fn[zg];ff!==void 0&&(xh+=isNaN(ff.Hc)?ff.oc:ff.Hc,ff.oc!==0&&(xh+=ff.Wc()))}ln=Math.max(y-Wu,0);var Yu=Un=Math.max(x-xh,0),wc=ln;z=te.length;for(var ol=0;ol<z;ol++){var lu=te[ol],wm=a.Fb(lu.row),Bh=a.Eb(lu.column),Kg=lu.measuredBounds,HA=lu.margin,td=HA.right+HA.left,Au=HA.top+HA.bottom;ie[lu.column]=Bh.oc===0&&ie[lu.column]!==void 0?Math.max(Kg.width+td,ie[lu.column]):null,me[lu.row]=wm.oc===0&&me[lu.row]!==void 0?Math.max(Kg.height+Au,me[lu.row]):null}var Jd=0,jg=0,wA;for(wA in me)wA!=="count"&&(Jd+=me[wA]);for(wA in ie)wA!=="count"&&(jg+=ie[wA]);for(var Os=Xe.alloc(),Vp=0;Vp<z;Vp++){var Qa=te[Vp];if(Qa.visible||Qa===vc){var $o=a.Fb(Qa.row),Ua=a.Eb(Qa.column),Ch=0;isFinite(Ua.width)?Ch=Ua.width:(isFinite(ln)&&ie[Qa.column]!==null?jg===0?Ch=Ua.actual+ln:Ch=ie[Qa.column]/jg*wc:ie[Qa.column]!==null?Ch=ln:Ch=Ua.actual||ln,Ch=Math.max(0,Ch-Ua.Wc()));var Sc=0;switch(isFinite($o.height)?Sc=$o.height:(isFinite(Un)&&me[Qa.row]!==null?Jd===0?Sc=$o.actual+Un:Sc=me[Qa.row]/Jd*Yu:me[Qa.row]!==null?Sc=Un:Sc=$o.actual||Un,Sc=Math.max(0,Sc-$o.Wc())),Os.h(Math.max(Ua.minimum,Math.min(Ch,Ua.maximum)),Math.max($o.minimum,Math.min(Sc,$o.maximum))),Sa=Po(Qa,$o,Ua,!1),Sa){case Yn:Os.height=Math.max(Os.height,$o.actual+Un);break;case di:Os.width=Math.max(Os.width,Ua.actual+ln)}var ed=Qa.margin,ny=ed.right+ed.left,Sm=ed.top+ed.bottom;Qa.Uj(),Qa.measure(Os.width,Os.height,Ua.minimum,$o.minimum);var Vg=Qa.measuredBounds,nd=Math.max(Vg.width+ny,0),qd=Math.max(Vg.height+Sm,0);isFinite(ln)&&(nd=Math.min(nd,Os.width)),isFinite(Un)&&(qd=Math.min(qd,Os.height));var sl=0;sl=$o.actual,$o.actual=Math.max($o.actual,qd),$o.oc=Math.max($o.oc,qd),xs=$o.actual-sl,Un=Math.max(Un-xs,0),me[Qa.row]===null&&(Yu=Math.max(Yu-xs,0)),sl=Ua.actual,Ua.actual=Math.max(Ua.actual,nd),Ua.oc=Math.max(Ua.oc,nd),xs=Ua.actual-sl,ln=Math.max(ln-xs,0),ie[Qa.column]===null&&(wc=Math.max(wc-xs,0))}}Dn(te);var Ph=Xe.alloc(),RA=Qn(),jl=Qn();if(z=Zt.length,z!==0){for(var df=0;df<Br;df++)if(Mt[df]){Wr=Mt[df].length;var _g=a.Fb(df);RA[df]=_g.actual;for(var gf=0;gf<Wr;gf++)if(Mt[df][gf]){var xm=a.Eb(gf);jl[gf]=xm.actual}}}for(var Wg=0;Wg<z;Wg++){var Oo=Zt[Wg];if(Oo.visible||Oo===vc){var SA=a.Fb(Oo.row),ql=a.Eb(Oo.column);switch(Os.h(Math.max(ql.minimum,Math.min(y,ql.maximum)),Math.max(SA.minimum,Math.min(x,SA.maximum))),Sa=Po(Oo,SA,ql,!1),Sa){case _e:jl[ql.index]!==0&&(Os.width=Math.min(Os.width,jl[ql.index])),RA[SA.index]!==0&&(Os.height=Math.min(Os.height,RA[SA.index]));break;case Yn:jl[ql.index]!==0&&(Os.width=Math.min(Os.width,jl[ql.index]));break;case di:RA[SA.index]!==0&&(Os.height=Math.min(Os.height,RA[SA.index]))}isFinite(ql.width)&&(Os.width=ql.width),isFinite(SA.height)&&(Os.height=SA.height),Ph.h(0,0);for(var Bm=ql.minimum,Sl=SA.minimum,xc=1;xc<Oo.rowSpan&&!(Oo.row+xc>=a.rowCount);xc++)De=a.Fb(Oo.row+xc),xs=0,xs=Sa===_e||Sa===di?Math.max(De.minimum,RA[Oo.row+xc]===0?De.maximum:Math.min(RA[Oo.row+xc],De.maximum)):Math.max(De.minimum,isNaN(De.Hc)?De.maximum:Math.min(De.Hc,De.maximum)),Ph.height+=xs,Sl+=De.minimum;for(var $l=1;$l<Oo.columnSpan&&!(Oo.column+$l>=a.columnCount);$l++)De=a.Eb(Oo.column+$l),xs=0,xs=Sa===_e||Sa===Yn?Math.max(De.minimum,jl[Oo.column+$l]===0?De.maximum:Math.min(jl[Oo.column+$l],De.maximum)):Math.max(De.minimum,isNaN(De.Hc)?De.maximum:Math.min(De.Hc,De.maximum)),Ph.width+=xs,Bm+=De.minimum;Os.width+=Ph.width,Os.height+=Ph.height;var Yg=Oo.margin,pf=Yg.right+Yg.left,_p=Yg.top+Yg.bottom;Oo.measure(Os.width,Os.height,Bm,Sl);for(var Xg=Oo.measuredBounds,uu=Math.max(Xg.width+pf,0),id=Math.max(Xg.height+_p,0),mf=0,Zg=0;Zg<Oo.rowSpan&&!(Oo.row+Zg>=a.rowCount);Zg++)De=a.Fb(Oo.row+Zg),mf+=De.total||0;if(mf<id){var Bc=id-mf,Xu=id-mf;if(Oo.spanAllocation!==null)for(var Cc=Oo.spanAllocation,Fh=0;Fh<Oo.rowSpan&&!(0>=Bc)&&!(Oo.row+Fh>=a.rowCount);Fh++){De=a.Fb(Oo.row+Fh);var Pc=De.oa||0,rd=Cc(Oo,De,Xu);De.actual=Math.min(De.maximum,Pc+rd),De.oa!==Pc&&(Bc-=De.oa-Pc)}for(;0<Bc;){var GA=De.oa||0;if(isNaN(De.height)&&De.maximum>GA&&(De.actual=Math.min(De.maximum,GA+Bc),De.oa!==GA&&(Bc-=De.oa-GA)),De.index===0)break;De=a.Fb(De.index-1)}}for(var $d=0,Fc=0;Fc<Oo.columnSpan&&!(Oo.column+Fc>=a.columnCount);Fc++)De=a.Eb(Oo.column+Fc),$d+=De.total||0;if($d<uu){var tg=uu-$d,iy=uu-$d;if(Oo.spanAllocation!==null)for(var Lh=Oo.spanAllocation,od=0;od<Oo.columnSpan&&!(0>=tg)&&!(Oo.column+od>=a.columnCount);od++){De=a.Eb(Oo.column+od);var Wp=De.oa||0,ry=Lh(Oo,De,iy);De.actual=Math.min(De.maximum,Wp+ry),De.oa!==Wp&&(tg-=De.oa-Wp)}for(;0<tg;){var Cm=De.oa||0;if(isNaN(De.width)&&De.maximum>Cm&&(De.actual=Math.min(De.maximum,Cm+tg),De.oa!==Cm&&(tg-=De.oa-Cm)),De.index===0)break;De=a.Eb(De.index-1)}}}}Dn(Zt),Xe.free(Ph),Xe.free(Os),RA!==void 0&&Dn(RA),jl!==void 0&&Dn(jl);var eg=0,ng=0,Pm=a.desiredSize,g1=a.maxSize;Sa=ma(a,!0);var Yp=xh=Wu=0,Xp=0;z=a.columnCount;for(var Fm=0;Fm<z;Fm++)tn[Fm]!==void 0&&(De=a.Eb(Fm),isFinite(De.width)?(Yp+=De.width,Yp+=De.Wc()):s0(De)===sp?(Yp+=De.oa,Yp+=De.Wc()):De.oa!==0&&(Wu+=De.oa,Wu+=De.Wc()));isFinite(Pm.width)?eg=Math.min(Pm.width,g1.width):eg=Sa!==Re&&isFinite(y)?y:Wu,eg=Math.max(eg,a.minSize.width),eg=Math.max(eg-Yp,0);for(var J1=Wu===0?1:Math.max(eg/Wu,1),Lm=0;Lm<z;Lm++)tn[Lm]!==void 0&&(De=a.Eb(Lm),isFinite(De.width)||s0(De)===sp||(De.actual=De.oa*J1),De.position=b.width,De.oa!==0&&(b.width+=De.oa,b.width+=De.Wc()));z=a.rowCount;for(var Em=0;Em<z;Em++)Fn[Em]!==void 0&&(De=a.Fb(Em),isFinite(De.height)?(Xp+=De.height,Xp+=De.Wc()):s0(De)===sp?(Xp+=De.oa,Xp+=De.Wc()):De.oa!==0&&(xh+=De.oa,xh+=De.Wc()));isFinite(Pm.height)?ng=Math.min(Pm.height,g1.height):ng=Sa!==Re&&isFinite(x)?x:xh,ng=Math.max(ng,a.minSize.height),ng=Math.max(ng-Xp,0);for(var q1=xh===0?1:Math.max(ng/xh,1),Mm=0;Mm<z;Mm++)Fn[Mm]!==void 0&&(De=a.Fb(Mm),isFinite(De.height)||s0(De)===sp||(De.actual=De.oa*q1),De.position=b.height,De.oa!==0&&(b.height+=De.oa,b.height+=De.Wc()));z=rt.length;for(var oy=0;oy<z;oy++){var Zp=rt[oy],sy=0,ay=0;Zp.type===je.TableRow?(sy=b.width,De=a.Fb(Zp.row),ay=De.actual):(De=a.Eb(Zp.column),sy=De.actual,ay=b.height),Zp.measuredBounds.h(0,0,sy,ay),Zo(Zp,!1)}Dn(rt),a.inRowsCols=Mt},ra.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,at=tt.length,At=0,ft=0;ft<at;ft++)tt[ft]&&(At=Math.max(At,tt[ft].length));ot=a.rowDefs,rt=a.colDefs;var pt=ft=0,xt=Math.min(a.topIndex,at-1);if(0<ot.length){for(;xt!==at&&(ot[xt]===void 0||ot[xt].oa===0);)xt++;xt=Math.max(Math.min(xt,at-1),0),ft=-ot[xt].position}var Bt=Math.min(a.leftIndex,At-1);if(0<rt.length){for(;Bt!==At&&(rt[Bt]===void 0||rt[Bt].oa===0);)Bt++;Bt=Math.max(Math.min(Bt,At-1),0),pt=-rt[Bt].position}for(var Mt=0,Gt=0;Mt!==at&&ot[Mt]===void 0;)Mt++;for(;Gt!==at&&rt[Gt]===void 0;)Gt++;At=a.part,a.Fb(Mt),a.Eb(Gt);for(var Dt=0;Dt<y.length;Dt++){var _t=y[Dt];if(_t instanceof je&&_t.visible&&lc(_t)){if(_t.type===je.TableRow){rt=a.Fb(_t.row);var Zt=a.Eb(Gt)}else rt=a.Fb(Mt),Zt=a.Eb(_t.column);ot=rt.position+ft+b,rt.oa!==0&&(ot+=rt.Io(Math.max(Mt,xt))),rt=Zt.position+pt+z,Zt.oa!==0&&(rt+=Zt.Io(Math.max(Gt,Bt))),Zt=_t.measuredBounds,_t.Uk(),_t.actualBounds.ka();var te=_t.actualBounds,ie=Me.allocAt(te.x,te.y,te.width,te.height);te.x=_t.type===je.TableRow?z:rt,te.y=_t.type===je.TableColumn?b:ot,te.width=Zt.width,te.height=Zt.height,_t.actualBounds.freeze(),bA(_t,!1),ao(ie,te)||At===null||(At.oh(),_t.Pn(At)),Me.free(ie)}}for(Dt=Xe.alloc(),_t=0;_t<at;_t++)if(tt[_t]){for(At=tt[_t].length,Zt=a.Fb(_t),ot=Zt.position+ft+b,Zt.oa!==0&&(ot+=Zt.Io(Math.max(Mt,xt))),te=0;te<At;te++)if(tt[_t][te]){ie=a.Eb(te),rt=ie.position+pt+z,ie.oa!==0&&(rt+=ie.Io(Math.max(Gt,Bt)));for(var me=tt[_t][te],ln=me.length,Un=0;Un<ln;Un++){var Fn=me[Un],tn=Fn.measuredBounds;Dt.h(0,0);for(var De=1;De<Fn.rowSpan&&!(_t+De>=a.rowCount);De++){var bi=a.Fb(_t+De);bi.oa!==0&&(Dt.height+=bi.total)}for(De=1;De<Fn.columnSpan&&!(te+De>=a.columnCount);De++)bi=a.Eb(te+De),bi.oa!==0&&(Dt.width+=bi.total);var Bi=ie.oa+Dt.width,Br=Zt.oa+Dt.height;De=rt,bi=ot;var Wr=Bi,Ss=Br,Ls=rt,ya=ot,xs=Bi,vc=Br;rt+Bi>x.width&&(xs=Math.max(x.width-rt,0)),ot+Br>x.height&&(vc=Math.max(x.height-ot,0));var qo=Fn.alignment;if(qo.Xb()){qo=a.defaultAlignment,qo.sb()||(qo=Ui);var DA=qo.x,wa=qo.y,yc=qo.offsetX;qo=qo.offsetY;var Tl=ie.alignment,Jl=Zt.alignment;Tl.sb()&&(DA=Tl.x,yc=Tl.offsetX),Jl.sb()&&(wa=Jl.y,qo=Jl.offsetY)}else DA=qo.x,wa=qo.y,yc=qo.offsetX,qo=qo.offsetY;(isNaN(DA)||isNaN(wa))&&(wa=DA=.5,qo=yc=0),Tl=tn.width,Jl=tn.height;var vl=Fn.margin,il=vl.left+vl.right,uf=vl.top+vl.bottom,OA=Po(Fn,Zt,ie,!1);!isNaN(Fn.desiredSize.width)||OA!==_e&&OA!==Yn||(Tl=Math.max(Bi-il,0)),!isNaN(Fn.desiredSize.height)||OA!==_e&&OA!==di||(Jl=Math.max(Br-uf,0)),Bi=Fn.maxSize,Br=Fn.minSize,Tl=Math.min(Bi.width,Tl),Jl=Math.min(Bi.height,Jl),Tl=Math.max(Br.width,Tl),Jl=Math.max(Br.height,Jl),Bi=Jl+uf,De+=Wr*DA-(Tl+il)*DA+yc+vl.left,bi+=Ss*wa-Bi*wa+qo+vl.top,Fn.visible&&(Ro(Ls,ya,xs,vc,De,bi,tn.width,tn.height)?Fn.arrange(De,bi,Tl,Jl):Fn.arrange(De,bi,Tl,Jl,new Me(Ls,ya,xs,vc)))}}}for(Xe.free(Dt),a=0;a<E;a++)x=y[a],z=x instanceof je?x:null,z!==null&&lc(z)&&(z=x.actualBounds,x.naturalBounds.ka(),x.naturalBounds.h(0,0,z.width,z.height),x.naturalBounds.freeze())}};function dl(){this.xa="Base"}Le(dl,kr),dl.prototype.measure=function(){},dl.prototype.arrange=function(){};function Ml(){this.xa="Base"}Le(Ml,kr),Ml.prototype.measure=function(){},Ml.prototype.arrange=function(){};function ds(){this.xa="Base"}Le(ds,kr),ds.prototype.measure=function(a,y,x,E,b,z,tt){1<E.length&&Yt("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,at=ot.right+ot.left;if(ot=ot.top+ot.bottom,isFinite(y)||isFinite(x)){var At=E.scale,ft=rt.width;rt=rt.height;var pt=Math.max(y-at,0),xt=Math.max(x-ot,0),Bt=1;a.viewboxStretch===Rn?ft!==0&&rt!==0&&(Bt=Math.min(pt/ft,xt/rt)):ft!==0&&rt!==0&&(Bt=Math.max(pt/ft,xt/rt)),Bt===0&&(Bt=1e-4),E.Ca*=Bt,At!==E.scale&&(Zo(E,!0),E.measure(1/0,1/0,z,tt))}rt=E.measuredBounds,b.width=isFinite(y)?y:Math.max(rt.width+at,0),b.height=isFinite(x)?x:Math.max(rt.height+ot,0)},ds.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=Ui),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 va(){this.xa="Base"}Le(va,kr),va.prototype.measure=function(){},va.prototype.arrange=function(){},va.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,at=Math.ceil(rt/b),At=Math.ceil(ot/E),ft=a.gridOrigin,pt=ft.x;ft=ft.y,y.save(),y.beginPath(),y.rect(0,0,rt,ot),y.clip(),y.Se();for(var xt=[],Bt=a.O.s,Mt=Bt.length,Gt=0;Gt<Mt;Gt++){var Dt=Bt[Gt],_t=[];if(xt.push(_t),Dt.visible){var Zt=Dt.interval;if(!(0>Zt)){Dt=yh(Dt.figure);for(var te=0;te<Mt;te++)if(te!==Gt){var ie=Bt[te];ie.visible&&yh(ie.figure)===Dt&&(ie=ie.interval,ie>Zt&&_t.push(ie))}}}}for(Bt=a.O.s,Mt=Bt.length,Gt=0;Gt<Mt;Gt++){var me=Bt[Gt];if(me.visible&&(_t=me.interval||1,Dt=Math.abs(_t),!(2>b*Dt*x))){if(Zt=me.segmentIndex,(!isFinite(Zt)||isNaN(Zt))&&(Zt=0),0>Zt&&(Zt=Dt-Math.min(-Zt,Dt)),Zt=Math.round(Zt%Dt),Dt=me.opacity,te=1,Dt!==1){if(Dt===0)continue;te=y.globalAlpha,y.globalAlpha=te*Dt}ie=xt[Gt];var ln=!1,Un=me.strokeDashArray;if(Un!==null&&(ln=!0,y.js(Un,me.strokeDashOffset)),me.figure==="LineV"&&me.stroke!==null&&0<me.strokeWidth){for(y.lineWidth=me.strokeWidth,yo(a,y,me.stroke,!1,!1,z,tt),y.beginPath(),Un=me=Math.floor((pt-b)/b);Un<=me+at;Un++){var Fn=Un*b+pt;0<=Fn&&Fn<=rt&&iu(Un,_t,Zt,ie)&&(y.moveTo(Fn,0),y.lineTo(Fn,ot))}y.stroke(),y.Se()}else if(me.figure==="LineH"&&me.stroke!==null&&0<me.strokeWidth){for(y.lineWidth=me.strokeWidth,yo(a,y,me.stroke,!1,!1,z,tt),y.beginPath(),Un=me=Math.floor((ft-E)/E);Un<=me+At;Un++)Fn=Un*E+ft,0<=Fn&&Fn<=ot&&iu(Un,_t,Zt,ie)&&(y.moveTo(0,Fn),y.lineTo(rt,Fn));y.stroke(),y.Se()}else if(me.figure==="BarV"&&me.fill!==null)for(yo(a,y,me.fill,!0,!1,z,tt),me=me.width,isNaN(me)&&(me=b),Fn=Un=Math.floor((pt-b)/b);Fn<=Un+at;Fn++){var tn=Fn*b+pt;0<=tn+me&&tn<=rt&&iu(Fn,_t,Zt,ie)&&y.fillRect(tn,0,me,ot)}else if(me.figure==="BarH"&&me.fill!==null)for(yo(a,y,me.fill,!0,!1,z,tt),me=me.height,isNaN(me)&&(me=E),Fn=Un=Math.floor((ft-E)/E);Fn<=Un+At;Fn++)tn=Fn*E+ft,0<=tn+me&&tn<=ot&&iu(Fn,_t,Zt,ie)&&y.fillRect(0,tn,rt,me);ln&&y.fs(),Dt!==1&&(y.globalAlpha=te)}}y.restore(),y.Vc(!1)};function iu(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 gl(){this.xa="Base"}Le(gl,kr),gl.prototype.measure=function(a,y,x,E,b){var z=E.length;if(a instanceof Sr||a instanceof en){var tt=null,rt=null;if(a instanceof en&&(tt=a),a instanceof Sr&&(rt=a,tt=rt.adornedPart,a.j===null&&(a.j=[])),tt instanceof en){var ot=tt;if(z===0)ho(a.naturalBounds,0,0),a.measuredBounds.h(0,0,0,0);else{var at=a instanceof Sr?null:tt.path;y=tt.routeBounds,x=a.jg,x.h(0,0,y.width,y.height);var At=ot.points,ft=tt.pointsCount;rt!==null?rt.Ul(!1):tt!==null&&tt.Ul(!1),rt=y.width;var pt=y.height,xt=a.j;if(xt.length=0,at!==null){Hl(a,rt,pt,at);var Bt=at.measuredBounds;x.ed(Bt),xt.push(Bt)}Bt=Ei.alloc();for(var Mt=Ot.alloc(),Gt=Ot.alloc(),Dt=0;Dt<z;Dt++){var _t=E[Dt];if(_t!==at)if(_t.isPanelMain&&_t instanceof Oi){Hl(a,rt,pt,_t);var Zt=_t.measuredBounds;x.ed(Zt),xt.push(Zt)}else if(2>ft)_t.measure(1/0,1/0,0,0),Zt=_t.measuredBounds,x.ed(Zt),xt.push(Zt);else{var te=_t.segmentIndex,ie=_t.segmentFraction,me=_t.alignmentFocus;me.Mc()&&(me=Ui);var ln=_t.segmentOrientation,Un=_t.segmentOffset;if(isNaN(te)){var Fn=ot.ua;Zt=Qn(),Fn.Qu(ie,Zt);var tn=Ot.allocAt(Zt[0],Zt[1]);if(tn.add(ot.i(0)),Fn.type===qe.j?tn.offset(-Fn.startX,-Fn.startY):(Fn=Fn.figures.first(),Fn!==null&&tn.offset(-Fn.startX,-Fn.startY)),Fn=Zt[2],ln!==ka){var De=ot.computeAngle(_t,ln,Fn);_t.Kb=De}De=tn.x-y.x;var bi=tn.y-y.y;Ot.free(tn),Dn(Zt)}else if(te<-ft||te>=ft)Zt=Ot.alloc(),ot.vg(),ot.computeMidPoint(Zt),Fn=ot.midAngle,ln!==ka&&(De=ot.computeAngle(_t,ln,Fn),_t.Kb=De),De=Zt.x-y.x,bi=Zt.y-y.y,Ot.free(Zt);else{if(De=0,0<=te?(bi=At.M(te),Zt=te<ft-1?At.M(te+1):bi):(De=ft+te,bi=At.M(De),Zt=0<De?At.M(De-1):bi),bi.Xa(Zt)){0<=te?(Fn=0<te?At.M(te-1):bi,De=te<ft-2?At.M(te+2):Zt):(Fn=De<ft-1?At.M(De+1):bi,De=1<De?At.M(De-2):Zt),tn=Fn.Bf(bi);var Bi=Zt.Bf(De);Fn=tn>Bi+10?0<=te?Fn.ab(bi):bi.ab(Fn):Bi>tn+10?0<=te?Zt.ab(De):De.ab(Zt):0<=te?Fn.ab(De):De.ab(Fn)}else Fn=0<=te?bi.ab(Zt):Zt.ab(bi);ln!==ka&&(De=ot.computeAngle(_t,ln,Fn),_t.Kb=De),De=bi.x+(Zt.x-bi.x)*ie-y.x,bi=bi.y+(Zt.y-bi.y)*ie-y.y}_t.measure(1/0,1/0,0,0),Zt=_t.measuredBounds,tn=_t.naturalBounds;var Br=0;_t instanceof Oi&&(Br=_t.strokeWidth),Bi=tn.width+Br;var Wr=tn.height+Br;Bt.reset(),Bt.translate(-Zt.x,-Zt.y),Bt.scale(_t.scale,_t.scale),Bt.rotate(ln===ka?_t.angle:Fn,Bi/2,Wr/2),ln!==pp&&ln!==vp||Bt.rotate(90,Bi/2,Wr/2),ln!==mp&&ln!==yp||Bt.rotate(-90,Bi/2,Wr/2),ln===b0&&(45<Fn&&135>Fn||225<Fn&&315>Fn)&&Bt.rotate(-Fn,Bi/2,Wr/2),tn=new Me(0,0,Bi,Wr),Mt.xi(tn,me),Bt.Ga(Mt),me=-Mt.x+Br/2*_t.scale,_t=-Mt.y+Br/2*_t.scale,Gt.assign(Un),Br=isNaN(Un.x);var Ss=isNaN(Un.y);if(Br||Ss){Bi=Bi/2+3,Wr=Wr/2+3;var Ls=45<=Fn&&135>=Fn,ya=225<=Fn&&315>=Fn;ln===ka&&(Ls||ya)?(Gt.x=Ss?Bi:Un.y,Gt.y=Br?Wr:Un.x,Ls?0<=te||isNaN(te)&&.5>ie||!Br||(Gt.y=-Wr):ya&&((0<=te||isNaN(te)&&.5>ie)&&Br&&(Gt.y=-Wr),Ss&&(Gt.x=-Bi))):(Br&&(Gt.x=0<=te||isNaN(te)&&.5>ie?Bi:-Bi),Ss&&(Gt.y=-Wr),Gt.rotate(Fn))}else Gt.rotate(Fn);De+=Gt.x,bi+=Gt.y,tn.set(Zt),tn.h(De+me,bi+_t,Zt.width,Zt.height),xt.push(tn),x.ed(tn)}}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),ho(b,x.width||0,x.height||0),Ei.free(Bt),Ot.free(Mt),Ot.free(Gt)}}}},gl.prototype.arrange=function(a,y){var x=y.length;if(a instanceof Sr||a instanceof en){var E=a,b=null;a instanceof Sr&&(b=a,E=b.adornedPart);var z=a instanceof Sr?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 at=y[ot];if(at!==z&&rt<tt.length){var At=tt[rt];rt++,at.arrange(At.x-a.jg.x,At.y-a.jg.y,At.width,At.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 pt=tt.alignmentFocus;if(at=tt.segmentOrientation,At=tt.segmentOffset,isNaN(rt)){var xt=ft.ua,Bt=Qn();xt.Qu(ot,Bt);var Mt=Ot.allocAt(Bt[0],Bt[1]);Mt.add(ft.i(0)),xt.type===qe.j||(xt=xt.figures.first()),Mt.offset(-xt.startX,-xt.startY),xt=Bt[2],at!==ka&&(ft=ft.computeAngle(tt,at,xt),tt.angle=ft),ft=Mt.x;var Gt=Mt.y;Ot.free(Mt),Dn(Bt)}else if(rt<-x||rt>=x)Bt=Ot.alloc(),xt=ft,Gt=Bt,xt.vg(),xt.computeMidPoint(Gt),xt=ft.midAngle,at!==ka&&(ft=ft.computeAngle(tt,at,xt),tt.angle=ft),ft=Bt.x,Gt=Bt.y,Ot.free(Bt);else{if(Mt=0,0<=rt?(Bt=y.s[rt],Gt=rt<x-1?y.s[rt+1]:Bt):(Mt=x+rt,Bt=y.s[Mt],Gt=0<Mt?y.s[Mt-1]:Bt),Bt.Xa(Gt)){0<=rt?(xt=0<rt?y.s[rt-1]:Bt,Mt=rt<x-2?y.s[rt+2]:Gt):(xt=Mt<x-1?y.s[Mt+1]:Bt,Mt=1<Mt?y.s[Mt-2]:Gt);var Dt=xt.Bf(Bt),_t=Gt.Bf(Mt);xt=Dt>_t+10?0<=rt?xt.ab(Bt):Bt.ab(xt):_t>Dt+10?0<=rt?Gt.ab(Mt):Mt.ab(Gt):0<=rt?xt.ab(Mt):Mt.ab(xt)}else xt=0<=rt?Bt.ab(Gt):Gt.ab(Bt);at!==ka&&(ft=ft.computeAngle(tt,at,xt),tt.angle=ft),ft=Bt.x+(Gt.x-Bt.x)*ot,Gt=Bt.y+(Gt.y-Bt.y)*ot}if(pt.ys())tt.location=new Ot(ft,Gt);else{pt.Mc()&&(pt=Ui),Bt=Ei.alloc(),Bt.reset(),Bt.scale(tt.scale,tt.scale),Bt.rotate(tt.angle,0,0);var Zt=tt.naturalBounds;Mt=Me.allocAt(0,0,Zt.width,Zt.height),Dt=Ot.alloc(),Dt.xi(Mt,pt),Bt.Ga(Dt),pt=-Dt.x,_t=-Dt.y;var te=Zt.width,ie=Zt.height;Zt=Ot.alloc(),Zt.assign(At);var me=isNaN(At.x),ln=isNaN(At.y);if(me||ln){te=te/2+3,ie=ie/2+3;var Un=45<=xt&&135>=xt,Fn=225<=xt&&315>=xt;at===ka&&(Un||Fn)?(Zt.x=ln?te:At.y,Zt.y=me?ie:At.x,Un?0<=rt||isNaN(rt)&&.5>ot||!me||(Zt.y=-ie):Fn&&((0<=rt||isNaN(rt)&&.5>ot)&&me&&(Zt.y=-ie),ln&&(Zt.x=-te))):(me&&(Zt.x=0<=rt||isNaN(rt)&&.5>ot?te:-te),ln&&(Zt.y=-ie),Zt.rotate(xt))}else Zt.rotate(xt);ft+=Zt.x,Gt+=Zt.y,Bt.pp(Mt),pt+=Mt.x,_t+=Mt.y,rt=Ot.allocAt(ft+pt,Gt+_t),tt.move(rt),Ot.free(rt),Ot.free(Zt),Ot.free(Dt),Me.free(Mt),Ei.free(Bt)}}b!==null?b.Ul(!1):E.Ul(!1),E=Iy(a),a.location.h(a.position.x+E.x,a.position.y+E.y),Ot.free(E)}};function Hl(a,y,x,E){if(tl(E)!==!1){var b=E.strokeWidth;b===0&&a instanceof Sr&&a.type===je.Link&&a.adornedObject instanceof Oi&&(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 Sr&&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),Zo(E,!1)}}function ru(){this.xa="Base"}Le(ru,kr),ru.prototype.measure=function(a,y,x,E,b,z,tt){var rt=a.Pb();a.graduatedBounds=[];var ot=rt.margin,at=ot.right+ot.left,At=ot.top+ot.bottom;rt.measure(y,x,z,tt);var ft=rt.measuredBounds,pt=new Me(-ot.left,-ot.top,Math.max(ft.width+at,0),Math.max(ft.height+At,0));a.graduatedBounds.push(pt),b.assign(pt);for(var xt=rt.geometry,Bt=rt.strokeWidth,Mt=xt.flattenedSegments,Gt=xt.flattenedLengths,Dt=xt.flattenedTotalLength,_t=Mt.length,Zt=0,te=0,ie=Qn(),me=0;me<_t;me++){var ln=Mt[me],Un=[];te=Zt=0;for(var Fn=ln.length,tn=0;tn<Fn;tn+=2){var De=ln[tn],bi=ln[tn+1];if(tn!==0){var Bi=180*Math.atan2(bi-te,De-Zt)/Math.PI;0>Bi&&(Bi+=360),Un.push(Bi)}Zt=De,te=bi}ie.push(Un)}if(a.graduatedIntervals===null){for(var Br=[],Wr=a.O.s,Ss=Wr.length,Ls=0;Ls<Ss;Ls++){var ya=Wr[Ls],xs=[];if(Br.push(xs),ya.visible){var vc=ya.interval;if(!(0>vc)){for(var qo=0;qo<Ss;qo++)if(qo!==Ls){var DA=Wr[qo];if(DA.visible&&ya.constructor===DA.constructor){var wa=DA.interval;wa>vc&&xs.push(wa)}}}}}a.graduatedIntervals=Br}var yc=a.graduatedIntervals,Tl=a.O.s,Jl=Tl.length,vl=0,il=0,uf=Dt;a.graduatedMarks=[];for(var OA,Gg=0;Gg<Jl;Gg++){var yl=Tl[Gg];if(OA=[],yl.visible&&yl!==rt){var Sa=Math.abs(yl.interval),Kp=a.graduatedTickUnit;if(!(2>Kp*Sa*Dt/a.graduatedRange&&yl.graduatedSkip===null)){var Xd=Gt[0][0],au=0,rl=0;il=Dt*yl.graduatedStart-1e-4,uf=Dt*yl.graduatedEnd+1e-4;var $f=Kp*Sa,wl=a.graduatedTickBase;if(wl<a.graduatedMin){var hf=(a.graduatedMin-wl)/$f;hf=hf%1===0?hf:Math.floor(hf+1),wl+=hf*$f}else wl>a.graduatedMin+$f&&(wl-=Math.floor((wl-a.graduatedMin)/$f)*$f);for(var ym=yc[Gg],jp=wl,ey=1e-6*a.graduatedMax,Wu=1;wl<=a.graduatedMax+ey;Wu++){t:{for(var xh=ym.length,Zd=0;Zd<xh;Zd++){var cf=(wl-a.graduatedTickBase)%(ym[Zd]*a.graduatedTickUnit),zg=1e-6*a.graduatedTickUnit;if(cf<zg&&cf>-zg){var ff=!1;break t}}ff=!0}if(ff&&(wl>a.graduatedMax&&(wl=a.graduatedMax),yl.graduatedSkip===null||yl instanceof Jr&&!yl.graduatedSkip(wl,yl)||yl instanceof Oi&&!yl.graduatedSkip(wl,yl))&&(vl=(wl-a.graduatedMin)*Dt/a.graduatedRange,vl>Dt&&(vl=Dt),il<=vl&&vl<=uf)){for(var Yu=ie[au][rl],wc=Gt[au][rl];au<Gt.length;){for(;vl>Xd&&rl<Gt[au].length-1;)rl++,Yu=ie[au][rl],wc=Gt[au][rl],Xd+=wc;if(vl<=Xd)break;au++,rl=0,Yu=ie[au][rl],wc=Gt[au][rl],Xd+=wc}var ol=Mt[au],lu=ol[2*rl],wm=ol[2*rl+1],Bh=(vl-(Xd-wc))/wc,Kg=new Ot(lu+(ol[2*rl+2]-lu)*Bh+Bt/2-xt.bounds.x,wm+(ol[2*rl+3]-wm)*Bh+Bt/2-xt.bounds.y);Kg.scale(rt.scale,rt.scale);t:{var HA=Yu,td=ie[au];if(!(.5005>Bh&&.4995<Bh)){var Au=HA;if(.5>Bh?0<rl?Au=td[rl-1]:oe.$(ol[0],ol[ol.length-2])&&oe.$(ol[1],ol[ol.length-1])&&(Au=td[td.length-1]):.5<Bh&&(rl+1<td.length?Au=td[rl+1]:oe.$(ol[0],ol[ol.length-2])&&oe.$(ol[1],ol[ol.length-1])&&(Au=td[0])),HA!==Au){var Jd=Math.abs(HA-Au);if(180<Jd&&(HA<Au?HA+=360:Au+=360,Jd=Math.abs(HA-Au)),5e-4>Bh||.9995<Bh){Yu=(HA+Au)/2%360;break t}if(10>Jd){var jg=1-Math.abs(.5-Bh);Yu=(HA*jg+Au*(1-jg))%360;break t}}}Yu=HA}if(yl instanceof Jr){var wA="";yl.graduatedFunction!==null?(wA=yl.graduatedFunction(wl,yl),wA=wA!=null?wA.toString():""):wA=(+wl.toFixed(2)).toString(),wA!==""&&OA.push({$l:Kg,angle:Yu,text:wA})}else OA.push({$l:Kg,angle:Yu})}wl=jp+Wu*$f}}}a.graduatedMarks.push(OA)}Dn(ie);var Os=a.graduatedMarks;if(Os!==null)for(var Vp=E.length,Qa=0;Qa<Vp;Qa++){var $o=E[Qa],Ua=Os[Qa];if($o.visible&&$o!==rt&&Ua.length!==0){if($o instanceof Oi){var Ch=a,Sc=b,ed=$o.alignmentFocus;ed.Mc()&&(ed=Fr);var ny=$o.angle;$o.Kb=0,$o.measure(1/0,1/0,0,0),$o.Kb=ny;var Sm=$o.measuredBounds,Vg=Sm.width,nd=Sm.height,qd=Me.allocAt(0,0,Vg,nd),sl=Ot.alloc();sl.xi(qd,ed),Me.free(qd);for(var Ph=-sl.x,RA=-sl.y,jl=new Me,df=Ua.length,_g=0;_g<df;_g++)for(var gf=Ua[_g],xm=gf.$l.x,Wg=gf.$l.y,Oo=gf.angle,SA=0;4>SA;SA++){switch(SA){case 0:sl.h(Ph,RA);break;case 1:sl.h(Ph+Vg,RA);break;case 2:sl.h(Ph,RA+nd);break;case 3:sl.h(Ph+Vg,RA+nd)}sl.rotate(Oo+$o.angle),sl.offset(xm,Wg),_g===0&&SA===0?jl.h(sl.x,sl.y,0,0):jl.Ye(sl),sl.offset(-xm,-Wg),sl.rotate(-Oo-$o.angle)}Ot.free(sl),Ch.graduatedBounds!==null&&Ch.graduatedBounds.push(jl),Kr(Sc,jl.x,jl.y,jl.width,jl.height)}else if($o instanceof Jr){var ql=a,Bm=b;ql.temporaryTextBlock===null&&(ql.temporaryTextBlock=new Jr);var Sl=ql.temporaryTextBlock;yy(Sl,$o);var xc=$o.alignmentFocus;xc.Mc()&&(xc=Fr);for(var $l=$o.segmentOrientation,Yg=$o.segmentOffset,pf=new Me,_p=0,Xg=0,uu=0,id=0,mf=0,Zg=Ua.length,Bc=0;Bc<Zg;Bc++){var Xu=Ua[Bc];_p=Xu.$l.x,Xg=Xu.$l.y,uu=Xu.angle,mf=id=$o.angle,$l!==ka&&(mf=$l===gp||$l===k0?uu+$o.angle:uu,id=en.computeAngle($l,mf)),Sl.Kb=id,Sl.text=Xu.text||"",Sl.measure(1/0,1/0,0,0);var Cc=Sl.measuredBounds,Fh=Sl.naturalBounds,Pc=Fh.width,rd=Fh.height,GA=Ei.alloc();GA.reset(),GA.translate(-Cc.x,-Cc.y),GA.scale(Sl.scale,Sl.scale),GA.rotate(mf,Pc/2,rd/2),$l!==pp&&$l!==vp||GA.rotate(90,Pc/2,rd/2),$l!==mp&&$l!==yp||GA.rotate(-90,Pc/2,rd/2),$l===b0&&(45<uu&&135>uu||225<uu&&315>uu)&&GA.rotate(-uu,Pc/2,rd/2);var $d=Me.allocAt(0,0,Pc,rd),Fc=Ot.alloc();Fc.xi($d,xc),GA.Ga(Fc);var tg=-Fc.x,iy=-Fc.y,Lh=Ot.alloc();Lh.assign(Yg),isNaN(Lh.x)&&(Lh.x=Pc/2+3),isNaN(Lh.y)&&(Lh.y=-(rd/2+3)),Lh.rotate(uu),_p+=Lh.x+tg,Xg+=Lh.y+iy;var od=new Me(_p,Xg,Cc.width,Cc.height),Wp=new Me(Cc.x,Cc.y,Cc.width,Cc.height),ry=new Me(Fh.x,Fh.y,Fh.width,Fh.height);Xu.Sz=id,Xu.lineCount=Sl.lineCount,Xu.lines=[Sl.Cb,Sl.Ih,Sl.df,Sl.Le,Sl.Qc,Sl.Qb,Sl.ze],Xu.actualBounds=od,Xu.measuredBounds=Wp,Xu.naturalBounds=ry,Bc===0?pf.assign(od):pf.ed(od),Ot.free(Lh),Ot.free(Fc),Me.free($d),Ei.free(GA)}ql.graduatedBounds!==null&&ql.graduatedBounds.push(pf),Kr(Bm,pf.x,pf.y,pf.width,pf.height)}Zo($o,!1)}}},ru.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,at=0;at<ot;at++){var At=y[at];rt=b[at],At.visible&&At!==E&&rt.length!==0&&(rt=z[tt],tt++,At.arrange(rt.x-x.x,rt.y-x.y,rt.width,rt.height))}a.graduatedBounds=null}}},ru.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 Ea,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,at=a.graduatedMarks,At=ot.length,ft=0;ft<At;ft++){var pt=ot[ft],xt=at[ft],Bt=xt.length;if(pt.visible&&pt!==z&&xt.length!==0){if(pt instanceof Oi){if(!(2>a.graduatedTickUnit*pt.interval*z.geometry.flattenedTotalLength/a.graduatedRange*tt&&pt.graduatedSkip===null)){var Mt=pt.measuredBounds,Gt=pt.strokeWidth*pt.scale,Dt=pt.alignmentFocus;Dt.Mc()&&(Dt=Fr);for(var _t=0;_t<Bt;_t++){var Zt=xt[_t].$l,te=xt[_t].angle,ie=Dt,me=pt.Ab;me.reset(),me.translate(Zt.x+rt.x,Zt.y+rt.y),me.rotate(te+pt.angle,0,0),me.translate(-Mt.width*ie.x+ie.offsetX+Gt/2,-Mt.height*ie.y+ie.offsetY+Gt/2),me.scale(pt.scale,pt.scale),Ll(pt,!1),pt.wh.set(pt.Ab),pt.Kk=pt.scale,La(pt,!1),pt.gc(y,x),b&&(a.svg.appendChild(pt.svg),pt.svg=null),pt.Ab.reset()}}}else if(pt instanceof Jr)for(a.temporaryTextBlock===null&&(a.temporaryTextBlock=new Jr),Mt=a.temporaryTextBlock,yy(Mt,pt),Gt=0;Gt<Bt;Gt++)Dt=xt[Gt],Dt.actualBounds&&Dt.measuredBounds&&Dt.naturalBounds&&(Mt.ec=Dt.text||"",Mt.Kb=Dt.Sz||0,Mt.Gc=Dt.lineCount||0,_t=Dt.lines,_t!==void 0&&(Mt.Cb=_t[0],Mt.Ih=_t[1],Mt.df=_t[2],Mt.Le=_t[3],Mt.Qc=_t[4],Mt.Qb=_t[5],Mt.ze=_t[6]),Dt.naturalBounds&&(Mt.dc=Dt.naturalBounds),Dt.actualBounds&&(_t=Dt.actualBounds,Mt.arrange(_t.x,_t.y,_t.width,_t.height)),_t=Dt.actualBounds,Mt.arrange(_t.x,_t.y,_t.width,_t.height),Zt=Dt.measuredBounds,Dt=Dt.naturalBounds,te=Mt.Ab,te.reset(),te.translate(_t.x+rt.x,_t.y+rt.y),te.translate(-Zt.x,-Zt.y),Mt.no(te,Dt.x,Dt.y,Dt.width,Dt.height),Ll(Mt,!1),Mt.wh.set(Mt.Ab),Mt.Kk=Mt.scale,La(Mt,!1),Mt.Ng=pt.part,Mt.Me=pt.panel,Mt.gc(y,x),Mt.Me=null,Mt.Ng=null,b&&(a.svg.appendChild(Mt.svg),Mt.svg=null))}}x.$i=E,y.restore(),y.Vc(!0)};function je(a,y){if(re.call(this),this.na=null,a===void 0)this.na=je.Position;else if(typeof a=="string"){var x=dA.I(a);x!==null&&(this.na=x)}else a instanceof kr?this.na=a:a&&(this.na=je.Position,y=a);this.na===null&&Yt("Panel type not specified or PanelLayout not loaded: "+a),this.l=this.l|4194304|(this.na===je.Grid?1048576:0),this.O=new Vt,this.yb=Wa,this.Tm=is,this.Uf=Mi,this.$g=null,this.$e="",this.jg=new Me(NaN,NaN,NaN,NaN),this.T=this.F=null,this.xo=Rn,this.jn=jr,this.kn=Ni,this.ub=this.ra=null,this.zn=NaN,this.ge=this.Hh=null,y&&Object.assign(this,y)}Le(je,re),je.prototype.cloneProtected=function(a){re.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},je.prototype.Af=function(a){re.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},je.prototype.copy=function(){var a=re.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 gn&&(z.Te=!0);var rt=a.diagram;rt!==null&&rt.undoManager.isUndoingRedoing||z.cb(Uo,"elements",a,null,b,null,tt)}}return a}return null},Pt=je.prototype,Pt.toString=function(){return"Panel("+this.type.name+")#"+On(this)},Pt.Pn=function(a){re.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===je.Grid)a.yc(),this.na.gc(this,a,y);else if(this.na===je.Graduated)a.yc(),this.na.gc(this,a,y);else{if(this.na===je.Table)if(a.yc(),a instanceof Ea){var x=a.yd;a.yd=vg(a,"gojs-ts"),Uu(this,a),a.nh.pop(),a.yd=x}else Uu(this,a);(x=this.isClipping&&this.na===je.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 Uu(a,y){y.lineCap="butt";var x=0<a.rowCount?a.rowDefs:null,E=0<a.columnCount?a.colDefs:null;x!==null&&Du(a,y,!0,x,!0),E!==null&&Du(a,y,!1,E,!0),x!==null&&ac(a,y,!0,x),E!==null&&ac(a,y,!1,E),x!==null&&Du(a,y,!0,x,!1),E!==null&&Du(a,y,!1,E,!1)}function ac(a,y,x,E){for(var b=E.length,z=a.actualBounds,tt=a.naturalBounds,rt=!0,ot=0;ot<b;ot++){var at=E[ot];if(at!==void 0&&at.actual!==0)if(rt)rt=!1;else{if(x){if(at.position>tt.height)continue}else if(at.position>tt.width)continue;var At=at.separatorStrokeWidth;isNaN(At)&&(At=x?a.defaultRowSeparatorStrokeWidth:a.defaultColumnSeparatorStrokeWidth);var ft=at.separatorStroke;if(ft===null&&(ft=x?a.defaultRowSeparatorStroke:a.defaultColumnSeparatorStroke),At!==0&&ft!==null){yo(a,y,ft,!1,!1,tt,z),ft=!1;var pt=at.separatorDashArray;pt===null&&(pt=x?a.defaultRowSeparatorDashArray:a.defaultColumnSeparatorDashArray),pt!==null&&(ft=!0,y.js(pt,0)),y.beginPath(),pt=at.position+At,x?pt>tt.height&&(At-=pt-tt.height):pt>tt.width&&(At-=pt-tt.width),at=at.position+At/2,y.lineWidth=At,At=a.yb,x?(at+=At.top,pt=tt.width-At.right,y.moveTo(At.left,at),y.lineTo(pt,at)):(at+=At.left,pt=tt.height-At.bottom,y.moveTo(at,At.top),y.lineTo(at,pt)),y.stroke(),y.Se(),ft&&y.fs()}}}}function Du(a,y,x,E,b){for(var z=E.length,tt=a.actualBounds,rt=a.naturalBounds,ot=Ou(a,!0),at=Ou(a,!1),At=0;At<z;At++){var ft=E[At];if(ft!==void 0&&ft.background!==null&&ft.coversSeparators!==b&&ft.actual!==0){var pt=x?tt.height:tt.width;if(!(ft.position>pt)){var xt=ft.Wc(),Bt=ft.separatorStrokeWidth;isNaN(Bt)&&(Bt=x?a.defaultRowSeparatorStrokeWidth:a.defaultColumnSeparatorStrokeWidth);var Mt=ft.separatorStroke;Mt===null&&(Mt=x?a.defaultRowSeparatorStroke:a.defaultColumnSeparatorStroke),(Mt===null||ft.index===(x?ot:at))&&(Bt=0),xt-=Bt,Bt=ft.position+Bt,xt+=ft.actual,Bt+xt>pt&&(xt=pt-Bt),0>=xt||(pt=a.yb,yo(a,y,ft.background,!0,!1,rt,tt),x?y.fillRect(pt.left,Bt+pt.top,tt.width-(pt.left+pt.right),xt):y.fillRect(Bt+pt.left,pt.top,xt,tt.height-(pt.top+pt.bottom)))}}}}function Ou(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 yh(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(!re.prototype.kk.call(this,a,y,x))return!1;if(this.type===je.Table)x=this.svg.getElementsByClassName("gojs-ts"),x=x.length!==0?x[0]:null,x!==null&&(x.innerHTML=""),a.yd=x,Uu(this,a),a.yd=null;else if(this.na===je.Grid||this.na===je.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 re.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,at=-tt.m12*rt,At=-tt.m21*rt,ft=tt.m11*rt,pt=rt*(tt.m21*tt.dy-tt.m22*tt.dx),xt=rt*(tt.m12*tt.dx-tt.m11*tt.dy);if(this.areaBackground!==null)return tt=this.actualBounds,oe.Ff(tt.left,tt.top,tt.right,tt.bottom,a,y,x,E,b);if(this.background!==null)return z=a*ot+y*At+pt,rt=a*at+y*ft+xt,a=x*ot+E*At+pt,ot=x*at+E*ft+xt,b.h(0,0),x=this.naturalBounds,z=oe.Ff(0,0,x.width,x.height,z,rt,a,ot,b),b.transform(tt),z;z||(ot=1,At=at=0,ft=1,xt=pt=0),rt=a*ot+y*At+pt,a=a*at+y*ft+xt,ot=x*ot+E*At+pt,x=x*at+E*ft+xt,b.h(ot,x),E=(ot-rt)*(ot-rt)+(x-a)*(x-a),at=!1,ft=this.O.s,xt=ft.length,At=Ot.alloc(),pt=null,y=1/0;var Bt=null,Mt=this.isClipping&&this.na===je.Spot;Mt&&(Bt=Ot.alloc(),pt=this.Pb(),(at=pt.Sj(rt,a,ot,x,Bt))&&(y=(rt-Bt.x)*(rt-Bt.x)+(a-Bt.y)*(a-Bt.y)));for(var Gt=0;Gt<xt;Gt++){var Dt=ft[Gt];Dt.visible&&Dt!==pt&&Dt.Sj(rt,a,ot,x,At)&&(at=!0,Dt=(rt-At.x)*(rt-At.x)+(a-At.y)*(a-At.y),Dt<E&&(E=Dt,b.set(At)))}return Mt&&(y>E&&b.set(Bt),Ot.free(Bt)),Ot.free(At),z&&b.transform(tt),at},Pt.Gj=function(){for(var a=this.O.s,y=a.length,x=0;x<y;x++)a[x].Gj();re.prototype.Gj.call(this)},Pt.v=function(a){if(!tl(this)){re.prototype.v.call(this,a),a=null,(this.na===je.Auto||this.na===je.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=ma(b,!1);(b instanceof Ma||b instanceof je||b instanceof Jr||z!==Re)&&b.v(!0)}}}},Pt.Uj=function(){if(!tl(this)){Zo(this,!0),bA(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)){Ll(this,!0),La(this,!0);for(var a=this.O.s,y=a.length,x=0;x<y;x++)a[x].Wu()}},Pt.Wu=function(){La(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 at=this.O.s;at.length!==0&&this.na.measure(this,a,y,at,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),ho(b,a,ot),ho(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 za(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=ma(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=Re),a){case Re:(y>x||z>E)&&(this.v(),this.measure(y>x?x:y,z>E?E:z,0,0));break;case _e:this.v(!0),this.measure(x+rt,E+tt,0,0);break;case Yn:this.v(!0),this.measure(x+rt,z+tt,0,0);break;case di: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=za(this);if(Ro(0,0,y.width,y.height,a.x,a.y)){y=this.O.s;for(var E=y.length,b=Ot.allocAt(0,0);E--;){var z=y[E];if((z.visible||z===x)&&(In(b.set(a),z.transform),z.ca(b)))return Ot.free(b),!0}return Ot.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 je){a=a.O.s;for(var x=a.length,E=0;E<x;E++)this.qm(a[E],y)}};function fA(a,y){Vf(a,a,y)}function Vf(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 je&&Vf(a,z,x)}}function m1(a,y){ly(a,a,y)}function ly(a,y,x){if(x(y),y instanceof je){y=y.O.s;for(var E=y.length,b=0;b<E;b++)ly(a,y[b],x)}}Pt.Nl=function(a){return Ay(this,this,a)};function Ay(a,y,x){if(x(y))return y;if(y instanceof je){y=y.O.s;for(var E=y.length,b=0;b<E;b++){var z=Ay(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=op(this));for(var E=0;E<x;E++){var b=y[E];if(b instanceof je){var z=b.fb(a);if(z!==null)return z}if(b.name===a)return b}return null};function uy(a){a=a.O.s;for(var y=a.length,x=0,E=0;E<y;E++){var b=a[E];b instanceof je?x=Math.max(x,uy(b)):b instanceof Oi&&(x=Math.max(x,b.ig/2*b.strokeMiterLimit*b.Df()))}return x}Pt.se=function(){return!(this.type===je.TableRow||this.type===je.TableColumn)};function lc(a){return a.type===je.TableRow||a.type===je.TableColumn}Pt.ic=function(a,y,x){if(this.pickable===!1||(y===void 0&&(y=null),x===void 0&&(x=null),ia(this)))return null;var E=this.naturalBounds,b=1/this.Df(),z=this.se(),tt=z?a:In(Ot.allocAt(a.x,a.y),this.transform),rt=this.diagram,ot=10,at=5;if(rt!==null&&(ot=rt.Ql("extraTouchArea"),at=ot/2),Ro(-(at*b),-(at*b),E.width+ot*b,E.height+ot*b,tt.x,tt.y)){if(!this.isAtomic){b=this.O.s;var At=b.length;if(rt=Ot.alloc(),at=(ot=this.isClipping&&this.na===je.Spot)?this.Pb():null,ot&&(at.se()?In(rt.set(a),at.transform):rt.set(a),!at.ca(rt)))return Ot.free(rt),z||Ot.free(tt),null;for(var ft=za(this);At--;){var pt=b[At];if((pt.visible||pt===ft)&&(pt.se()?In(rt.set(a),pt.transform):rt.set(a),!ot||pt!==at)){var xt=null;if(pt instanceof je?xt=pt.ic(rt,y,x):pt.pickable===!0&&pt.ca(rt)&&(xt=pt),xt!==null&&(y!==null&&(xt=y(xt)),xt!==null&&(x===null||x(xt))))return Ot.free(rt),z||Ot.free(tt),xt}}Ot.free(rt)}return this.background===null&&this.areaBackground===null?(z||Ot.free(tt),null):(a=Ro(0,0,E.width,E.height,tt.x,tt.y)?this:null,z||Ot.free(tt),a)}return z||Ot.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:In(Ot.allocAt(a.x,a.y),this.transform);if(b=Ro(0,0,b.width,b.height,tt.x,tt.y),lc(this)||b){if(!this.isAtomic){for(var rt=this.O.s,ot=rt.length,at=Ot.alloc(),At=za(this);ot--;){var ft=rt[ot];if(ft.visible||ft===At){ft.se()?In(at.set(a),ft.transform):at.set(a);var pt=ft;ft=ft instanceof je?ft:null,(ft!==null?ft.ji(at,y,x,E):pt.ca(at))&&pt.pickable!==!1&&(y!==null&&(pt=y(pt)),pt===null||x!==null&&!x(pt)||E.add(pt))}}Ot.free(at)}return z||Ot.free(tt),b&&(this.background!==null||this.areaBackground!==null)}return z||Ot.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=Ei.alloc(),tt.reset()),tt.multiply(this.transform),this.fh(a,tt))return bm(this,y,x,b),z===void 0&&Ei.free(tt),!0;if(this.Yc(a,tt)){if(!this.isAtomic)for(var rt=za(this),ot=this.O.s,at=ot.length;at--;){var At=ot[at];if(At.visible||At===rt){var ft=At.actualBounds,pt=this.naturalBounds;ft.x>pt.width||ft.y>pt.height||0>ft.x+ft.width||0>ft.y+ft.height||(ft=At,At=At instanceof je?At:null,pt=Ei.alloc(),pt.set(tt),(At!==null?At.Cf(a,y,x,E,b,pt):cs(ft,a,E,pt))&&(y!==null&&(ft=y(ft)),ft===null||x!==null&&!x(ft)||b.add(ft)),Ei.free(pt))}}return z===void 0&&Ei.free(tt),E}return z===void 0&&Ei.free(tt),!1};function bm(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 je&&bm(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:In(Ot.allocAt(a.x,a.y),this.transform),at=rt?y:In(Ot.allocAt(y.x,y.y),this.transform),At=ot.Bf(at),ft=0<ot.x&&ot.x<tt.width&&0<ot.y&&ot.y<tt.height||ni(ot.x,ot.y,0,0,0,tt.height)<=At||ni(ot.x,ot.y,0,tt.height,tt.width,tt.height)<=At||ni(ot.x,ot.y,tt.width,tt.height,tt.width,0)<=At||ni(ot.x,ot.y,tt.width,0,0,0)<=At;if(tt=ot.zd(0,0)<=At&&ot.zd(0,tt.height)<=At&&ot.zd(tt.width,0)<=At&&ot.zd(tt.width,tt.height)<=At,rt||(Ot.free(ot),Ot.free(at)),ft){if(!this.isAtomic){ot=Ot.alloc(),at=Ot.alloc(),At=za(this);for(var pt=this.O.s,xt=pt.length;xt--;){var Bt=pt[xt];if(Bt.visible||Bt===At){var Mt=Bt.actualBounds,Gt=this.naturalBounds;(!rt||!(Mt.x>Gt.width||Mt.y>Gt.height||0>Mt.x+Mt.width||0>Mt.y+Mt.height))&&(Bt.se()?(Mt=Bt.transform,In(ot.set(a),Mt),In(at.set(y),Mt)):(ot.set(a),at.set(y)),Mt=Bt,Bt=Bt instanceof je?Bt:null,(Bt!==null?Bt.og(ot,at,x,E,b,z):Mt.tx(ot,at,b))&&(x!==null&&(Mt=x(Mt)),Mt===null||E!==null&&!E(Mt)||z.add(Mt)))}}Ot.free(ot),Ot.free(at)}return b?ft:tt}return!1};function Tm(a){var y=null;return a instanceof Oi&&(y=a.spot1,y===is&&(y=null),a=a.geometry,a!==null&&y===null&&(y=a.spot1)),y===null&&(y=vr),y}function Im(a){var y=null;return a instanceof Oi&&(y=a.spot2,y===is&&(y=null),a=a.geometry,a!==null&&y===null&&(y=a.spot2)),y===null&&(y=Go),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 ii&&Yt("Cannot add a Part to a Panel: "+y+"; use a Panel instead"),(this===y||this.rg(y))&&(this===y&&Yt("Cannot make a Panel contain itself: "+this.toString()),Yt("Cannot make a Panel indirectly contain itself: "+this.toString()+" already contains "+y.toString()));var x=y.panel;if(x!==null&&x!==this&&Yt("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!==je.Grid||y instanceof Oi||Yt("Can only add Shapes to a Grid Panel, not: "+y),this.na!==je.Graduated||y instanceof Oi||y instanceof Jr||Yt("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 yn),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 Yt("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),tl(this)||this.v(),y.v(!1),y.portId!==null?this.Te=!0:y instanceof je&&y.Te===!0&&(this.Te=!0),this.graduatedIntervals=null,this.If()||r0(this,y,!1),x=this.part,x!==null&&(x.Rh=null,x.ag=NaN,this.Te&&x instanceof gn&&(x.Te=!0),x.Te&&x instanceof gn&&(x.wc=null),b=this.diagram,b!==null&&b.undoManager.isUndoingRedoing||(E!==-1&&x.cb(ts,"elements",this,y,null,E,null),x.cb(Uo,"elements",this,null,y,null,a)))};function Nm(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),Zo(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 gn&&(E instanceof je?E.qm(E,function(tt,rt){iv(z,rt,y)}):iv(z,E,y)),x=this.diagram,x!==null&&x.undoManager.isUndoingRedoing||z.cb(ts,"elements",this,E,null,a,null))},Pt.Fb=function(a){0>a&&Sn(a,">= 0",je,"getRowDefinition:idx"),a=Math.round(a);var y=this.rowDefs;if(y[a]===void 0){var x=new ss;x.wi(this),x.isRow=!0,x.index=a,y[a]=x,this.cb(Uo,"rowdefs",this,null,x,null,a)}return y[a]},Pt.oA=function(a){if(0>a&&Sn(a,">= 0",je,"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(ts,"rowdefs",this,x,null,a,null),this.v()}}};function hy(a,y,x){var E=a.rowDefs;if(!(0>y)){if(E[y]=x instanceof ss?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&&Sn(a,">= 0",je,"getColumnDefinition:idx"),a=Math.round(a);var y=this.colDefs;if(y[a]===void 0){var x=new ss;x.wi(this),x.isRow=!1,x.index=a,y[a]=x,this.cb(Uo,"coldefs",this,null,x,null,a)}return y[a]},Pt.jA=function(a){if(0>a&&Sn(a,">= 0",je,"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(ts,"coldefs",this,x,null,a,null),this.v()}}};function cy(a,y,x){var E=a.colDefs;if(!(0>y)){if(E[y]=x instanceof ss?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&&o0(y,a),this},Pt.Hy=function(a,y){return(a=this.Fb(a))&&o0(a,new ss(y)),this},Pt.By=function(a,y){return(a=this.Eb(a))&&o0(a,new ss(y)),this},Pt.nz=function(a){if(0>a||this.type!==je.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!==je.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 Ot(NaN,NaN)),this.type!==je.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!==je.Graduated)return NaN;var y=this.Pb();return y.transform.Cd(a),y.geometry.xx(a)*this.graduatedRange+this.graduatedMin};function fy(a){return a=a.allBindings,a!==null&&a._isFrozen}function Yl(a){var y=a.allBindings;if(y===null)a.data!==null&&Yt("Template cannot have .data be non-null: "+a),a.allBindings=y=new Vt;else if(y._isFrozen)return;var x=new Vt;Nm(a,!1),a.qm(a,function(at,At){At.th();var ft=At.localBindings;if(ft!==null)for(Nu(At,!1),ft=ft.iterator;ft.next();){var pt=ft.value;pt.mode===Lp&&Nu(At,!0);var xt=pt.sourceName;xt!==null&&(xt==="/"&&Nm(at,!0),xt=Lw(pt,at,At),xt!==null&&(x.add(xt),xt.srcBindings===null&&(xt.srcBindings=new Vt),xt.srcBindings.add(pt))),y.add(pt)}if(At instanceof je&&At.type===je.Table){if(0<At.rowCount){for(at=At.rowDefs,ft=at.length,pt=0;pt<ft;pt++)if(xt=at[pt],xt!==void 0&&xt.be!==null)for(var Bt=xt.be.iterator;Bt.next();){var Mt=Bt.value;Mt.xd=xt,Mt.to=2,Mt.wl=xt.index,y.add(Mt)}}if(0<At.columnCount){for(At=At.colDefs,at=At.length,ft=0;ft<at;ft++)if(pt=At[ft],pt!==void 0&&pt.be!==null)for(xt=pt.be.iterator;xt.next();)Bt=xt.value,Bt.xd=pt,Bt.to=1,Bt.wl=pt.index,y.add(Bt)}}});for(var E=x.iterator;E.next();){var b=E.value;if(b.srcBindings!==null){Nu(b,!0);for(var z=b.srcBindings.iterator;z.next();){var tt=z.value;b.localBindings===null&&(b.localBindings=new Vt),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 je&&(tt=rt.substring(0,ot),rt=rt.substr(ot+1),ot=z.fb(tt),ot!==null?(z=ot,b.targetProperty=rt):wn('Warning: unable to find GraphObject named "'+tt+'" for Binding: '+b.toString())),z instanceof ss?(tt=On(z.panel),b.Ai=tt===void 0?-1:tt,z.panel.bindingId=b.Ai):z instanceof re?(tt=On(z),b.Ai=tt===void 0?-1:tt,z.bindingId=b.Ai):Yt("Unknown type of binding target: "+z)}y.freeze(),a instanceof ii&&a.Zc()&&a.Va()}Pt.Uy=function(a){a===void 0&&(a=!1);var y=this.copy();return m1(y,function(x){x instanceof je&&(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&&Yl(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 je))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 v1(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 je&&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 je)||z.data!==y[tt])return!0;b++,tt++}return!1}function op(a){if(a.type===je.Spot||a.type===je.Auto)return Math.min(a.O.length,1);if(a.type===je.Link){a=a.O;for(var y=a.length,x=0;x<y;x++){var E=a.M(x);if(!(E instanceof Oi&&E.isPanelMain))break}return x}return a.type===je.Table&&0<a.O.length&&(a=a.O.M(0),a.isPanelMain&&a instanceof je&&lc(a))?1:0}Pt.mv=function(){for(var a=op(this);this.O.length>a;)this.pc(this.O.length-1,!1);dy(this,this.itemArray)};function dy(a,y){var x=op(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++)i0(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 je){if(tt.data!==z){var rt=Um(a,tt.data),ot=Um(a,z),at=ot!==rt;at||(rt=Dm(a,rt),at=Dm(a,ot)!==rt),at?(a.pc(E,!1),i0(a,z,b,!1)):tt.data=z}}else i0(a,z,b,!1)}for(;E<a.O.length;)a.pc(E,!1);a.$g=null,Qm(a,x,0),tl(a)||a.v(),a.graduatedIntervals=null,a.If()||r0(a,a,!1),y=a.part,y!==null&&(y.Rh=null,y.ag=NaN,a.Te&&y instanceof gn&&(y.Te=!0),y.Te&&y instanceof gn&&(y.wc=null))}}function i0(a,y,x,E){if(!(y==null||0>x)){var b=Um(a,y);if(b=Dm(a,b),b!==null){if(Yl(b),b=b.copy(),b.l&16777216){var z=a.ih();z!==null&&Nm(z,!0)}typeof y=="object"&&(a.ge===null&&(a.ge=new yn),a.ge.add(y,b)),z=x+op(a),a.Gb(z,b),E&&(b.ub=y,Qm(a,z,x),b.ub=null),b.data=y}}}function Qm(a,y,x){for(a=a.O;y<a.length;){var E=a.M(y);if(E instanceof je){var b=y,z=x;E.type===je.TableRow?E.row=b:E.type===je.TableColumn&&(E.column=b),E.itemIndex=z}y++,x++}}function Um(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=Wo(y,a)}else return"";if(a===void 0)return"";if(typeof a=="string")return a;Yt("Panel.getCategoryForItemData found a non-string category for "+y+": "+a)}function Dm(a,y){var x=a.itemTemplateMap,E=null;return x!==null&&(E=x.I(y)),E===null&&(x!==null&&(E=x.I("")),E===null&&(gy||(gy=!0,wn('No item template Panel found for category "'+y+'" on '+a),wn(" Using default item template."),a=new je,y=new Jr,y.bind(new Jo("text","",rr)),a.add(y),py=a),E=py)),E}function r0(a,y,x){var E=y.enabledChanged;if(E!==null&&E(y,x),y instanceof je){y=y.O.s,E=y.length;for(var b=0;b<E;b++){var z=y[b];x&&z instanceof je&&!z.isEnabled||r0(a,z,x)}}}function ou(a,y){y.name=a,dA.add(a,y)}We.Object.defineProperties(je.prototype,{type:{get:function(){return this.na},set:function(a){var y=this.na;y!==a&&(this.na=a,this.isAtomic=this.na===je.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&&Sn(a,">= 0",je,"padding"),a=new Xi(a)):(0>a.left&&Sn(a.left,">= 0",je,"padding:value.left"),0>a.right&&Sn(a.right,">= 0",je,"padding:value.right"),0>a.top&&Sn(a.top,">= 0",je,"padding:value.top"),0>a.bottom&&Sn(a.bottom,">= 0",je,"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:Wa},set:function(a){typeof a=="number"&&(a=new Xi(a));var y=this.defaultSeparatorPadding;y.D(a)||(a=a.J(),this.T===null&&(this.T=new Rl),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 Mr)&&(a instanceof Mr&&a.freeze(),this.T===null&&(this.T=new Rl),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 Rl),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)||Yt("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 Rl),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 Mr)&&(a instanceof Mr&&a.freeze(),this.T===null&&(this.T=new Rl),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 Rl),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)||Yt("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 Rl),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 Rl),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||Yt("Invalid Panel.gridCellSize: "+a),this.jn=a.J();var x=this.diagram;x!==null&&this===x.grid&&uA(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()||Yt("Invalid Panel.gridOrigin: "+a),this.kn=a.J();var x=this.diagram;x!==null&&this===x.grid&&uA(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 wh),this.ra.lq=a,this.v(),this.g("graduatedMin",y,a),Ms(this)&&(a=this.part,a!==null&&to(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 wh),this.ra.F=a,this.v(),this.g("graduatedMax",y,a),Ms(this)&&(a=this.part,a!==null&&to(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 wh),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 wh),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 wh,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 wh,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 wh,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 wh,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 Rl),this.T.Pc}},rowCount:{get:function(){return this.T===null?0:this.rowDefs.length}},colDefs:{get:function(){return this.T===null&&(this.T=new Rl),this.T.Oc}},columnCount:{get:function(){return this.T===null?0:this.colDefs.length}},rowSizing:{get:function(){return this.T!==null?this.T.ob:a0},set:function(a){var y=this.rowSizing;y!==a&&(this.T===null&&(this.T=new Rl),this.T.ob=a,this.v(),this.g("rowSizing",y,a))}},columnSizing:{get:function(){return this.T!==null?this.T.j:a0},set:function(a){var y=this.columnSizing;y!==a&&(this.T===null&&(this.T=new Rl),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)&&Yt("Panel.topIndex must be greater than zero and a real number, not: "+a),this.T===null&&(this.T=new Rl),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)&&Yt("Panel.leftIndex must be greater than zero and a real number, not: "+a),this.T===null&&(this.T=new Rl),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 ii&&!(this instanceof Sr);Yl(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 ii&&(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 ec),this.A.nb=a)}},itemArray:{get:function(){return this.Hh},set:function(a){var y=this.Hh;if(y!==a||a!==null&&v1(this,a)){var x=this.diagram;y!==a&&(x!==null&&y!==null&&Bv(x.partManager,this,x),this.Hh=a,x!==null&&a!==null&&xv(x.partManager,this)),this.g("itemArray",y,a),x!==null&&x.undoManager.isUndoingRedoing||dy(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 yn}var y=this.itemTemplateMap.I("");y!==a&&((a instanceof ii||a.isPanelMain)&&Yt("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(););Hi(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&&(Hi(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 Ti&&(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&&r0(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))}}}),We.Object.defineProperties(je,{Position:{get:function(){return dA.I("Position")}},Horizontal:{get:function(){return dA.I("Horizontal")}},Vertical:{get:function(){return dA.I("Vertical")}},Spot:{get:function(){return dA.I("Spot")}},Auto:{get:function(){return dA.I("Auto")}},Table:{get:function(){return dA.I("Table")}},Viewbox:{get:function(){return dA.I("Viewbox")}},TableRow:{get:function(){return dA.I("TableRow")}},TableColumn:{get:function(){return dA.I("TableColumn")}},Link:{get:function(){return dA.I("Link")}},Grid:{get:function(){return dA.I("Grid")}},Graduated:{get:function(){return dA.I("Graduated")}}}),je.prototype.rebuildItemElements=je.prototype.mv,je.prototype.findItemPanelForData=je.prototype.sx,je.prototype.updateTargetBindings=je.prototype.La,je.prototype.copyTemplate=je.prototype.Uy,je.prototype.graduatedValueForPoint=je.prototype.Gz,je.prototype.graduatedPointForValue=je.prototype.Fz,je.prototype.findColumnForLocalX=je.prototype.fz,je.prototype.findRowForLocalY=je.prototype.nz,je.prototype.addColumnDefinition=je.prototype.By,je.prototype.addRowDefinition=je.prototype.Hy,je.prototype.addRowColumnDefinition=je.prototype.Gy,je.prototype.removeColumnDefinition=je.prototype.jA,je.prototype.getColumnDefinition=je.prototype.Eb,je.prototype.removeRowDefinition=je.prototype.oA,je.prototype.getRowDefinition=je.prototype.Fb,je.prototype.removeAt=je.prototype.mb,je.prototype.remove=je.prototype.remove,je.prototype.insertAt=je.prototype.Gb,je.prototype.elt=je.prototype.M,je.prototype.add=je.prototype.add,je.prototype.findObject=je.prototype.fb,je.prototype.findInVisualTree=je.prototype.Nl,je.prototype.walkVisualTreeFrom=je.prototype.qm,je.prototype.findMainElement=je.prototype.Pb;var gy=!1,py=null,dA=new yn;je.className="Panel",je.definePanelLayout=ou,ou("Position",new Fo),ou("Vertical",new gr),ou("Auto",new io),ou("Link",new gl);function wh(){this.lq=0,this.F=100,this.ia=10,this.V=0,this.Zh=this.o=this.j=this.u=null}wh.prototype.copy=function(){var a=new wh;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},wh.className="GradPanelSettings";function Rl(){this.Pc=[],this.Oc=[],this.j=this.ob=a0,this.hb=this.Hb=0,this.Qp=Wa,this.Ha=1,this.V=this.ia=null,this.F=1,this.nb=this.o=this.u=null}Rl.prototype.copy=function(a){for(var y=new Rl,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},Rl.className="TablePanelSettings";function ss(a){nn(this),this.Me=null,this.uq=!0,this.Za=0,this.Hc=NaN,this.jj=0,this.hj=1/0,this.Jb=is,this.pa=this.oc=this.oa=0,this.be=null,this.oo=Om,this.hg=Mi,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))}ss.prototype.copy=function(){var a=new ss;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=Ln(this.separatorDashArray)),a.Ma=this.Ma,a.Pm=this.Pm,a.be=this.be,a};function o0(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=Ln(y.separatorDashArray)),a.background=y.background,a.coversSeparators=y.coversSeparators,a.be=y.be}Pt=ss.prototype,Pt.qb=function(a){a.classType===ss&&(this.sizing=a)},Pt.toString=function(){return"RowColumnDefinition "+(this.isRow?"(Row ":"(Column ")+this.index+") #"+On(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===je.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(co,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 s0(a){if(a.sizing===Om){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 Jo(a,y,x,E):b=a,b.xd=this,a=this.panel,a!==null&&(y=a.ih(),y!==null&&fy(y)&&Yt("Cannot add a Binding to a RowColumnDefinition that is already frozen: "+b+" on "+a)),this.be===null&&(this.be=new Vt),this.be.add(b),this},We.Object.defineProperties(ss.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&&Sn(a,">= 0",ss,"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&&Sn(a,">= 0",ss,"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))&&Sn(a,">= 0",ss,"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&&Sn(a,">= 0",ss,"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 Xi(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&&St(a,"RowColumnDefinition.separatorStroke"),a instanceof Mr&&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)||Yt("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&&St(a,"RowColumnDefinition.background"),a instanceof Mr&&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}}}),ss.prototype.computeEffectiveSpacing=ss.prototype.Wc,ss.prototype.computeEffectiveSpacingTop=ss.prototype.Io;var Om=new xe(ss,"Default",0),sp=new xe(ss,"None",1),a0=new xe(ss,"ProportionalExtra",2);ss.className="RowColumnDefinition",ss.Default=Om,ss.None=sp,ss.ProportionalExtra=a0;function Oi(a,y){re.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)}Le(Oi,re),Oi.prototype.cloneProtected=function(a){re.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=Ln(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 _f(a){a.Na===null?a.Na=new Gm:a.Na.nc&&(a.Na=a.Na.copy())}Pt=Oi.prototype,Pt.th=function(){re.prototype.th.call(this),this.Na!==null&&(this.Na.nc=!0)},Pt.qb=function(a){a===Re||a===Rn||a===Ji||a===Mi?this.geometryStretch=a:re.prototype.qb.call(this,a)},Pt.toString=function(){return"Shape("+(this.figure!=="None"?this.figure:this.toArrow!=="None"?this.toArrow:this.fromArrow)+")#"+On(this)};function yg(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],at,At,ft,pt,xt,Bt,Mt=0,Gt=Qn(),Dt=2;Dt<b;Dt+=2)at=x[Dt],At=x[Dt+1],ft=at-rt,rt=At-ot,ft===0&&(ft=.001),pt=rt/ft,xt=Math.atan2(rt,ft),Bt=Math.sqrt(ft*ft+rt*rt),Gt.push([ft,xt,pt,Bt]),Mt+=Bt,rt=at,ot=At;rt=x[0],ot=x[1],ft=E.measuredBounds.width,E instanceof Oi&&(ft-=E.strokeWidth),1>ft&&(ft=1),b=x=ft,at=tt/2,At=at!==0,Dt=0,Bt=Gt[Dt],ft=Bt[0],xt=Bt[1],pt=Bt[2],Bt=Bt[3];for(var _t=0;.1<=Mt;){if(_t===0&&(At?(b=x,b-=at,Mt-=at,At=!1):b=x,b===0&&(b=1)),b>Mt){Dn(Gt);return}b>Bt?(_t=b-Bt,b=Bt):_t=0;var Zt=Math.sqrt(b*b/(1+pt*pt));if(0>ft&&(Zt=-Zt),rt+=Zt,ot+=pt*Zt,a.translate(rt,ot),a.rotate(xt),a.translate(-(tt/2),-(z/2)),_t===0&&E.hh(a,y),a.translate(tt/2,z/2),a.rotate(-xt),a.translate(-rt,-ot),Mt-=b,Bt-=b,_t!==0){if(Dt++,Dt===Gt.length){Dn(Gt);return}Bt=Gt[Dt],ft=Bt[0],xt=Bt[1],pt=Bt[2],Bt=Bt[3],b=_t}}Dn(Gt)}}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&&yo(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===je.Link&&rt instanceof Sr&&rt.category==="Selection"&&rt.adornedObject instanceof Oi&&rt.adornedPart.Pb()===rt.adornedObject?rt.adornedObject.strokeWidth:0),ot===0&&(x=null),x!==null&&ot!==0&&(yo(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===qe.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===qe.u){var at=b.startX;ot=b.startY;var At=b.endX,ft=b.endY;b=Math.min(at,At);var pt=Math.min(ot,ft);at=Math.abs(At-at),ot=Math.abs(ft-ot),a.beginPath(),a.rect(b,pt,at,ot),E!==null&&a.ng(E),x!==null&&(rt&&z&&cA(a),a.jk(),rt&&z&&eu(a)),a.Se()}else if(b.type===qe.F)at=b.startX,ot=b.startY,At=b.endX,ft=b.endY,b=Math.abs(At-at)/2,pt=Math.abs(ft-ot)/2,at=Math.min(at,At)+b,ot=Math.min(ot,ft)+pt,a.beginPath(),a.moveTo(at,ot-pt),a.bezierCurveTo(at+oe.wg*b,ot-pt,at+b,ot-oe.wg*pt,at+b,ot),a.bezierCurveTo(at+b,ot+oe.wg*pt,at+oe.wg*b,ot+pt,at,ot+pt),a.bezierCurveTo(at-oe.wg*b,ot+pt,at-b,ot+oe.wg*pt,at-b,ot),a.bezierCurveTo(at-b,ot-oe.wg*pt,at-oe.wg*b,ot-pt,at,ot-pt),a.closePath(),E!==null&&a.ng(E),x!==null&&(rt&&z&&cA(a),a.jk(),rt&&z&&eu(a)),a.Se();else if(b.type===qe.o)for(b=b.figures,ot=b.length,pt=0;pt<ot;pt++){at=b.s[pt],a.beginPath(),a.moveTo(at.startX,at.startY),At=at.segments.s,ft=At.length;for(var xt=null,Bt=0;Bt<ft;Bt++){var Mt=At[Bt];switch(Mt.type){case os:a.moveTo(Mt.endX,Mt.endY);break;case _r:a.lineTo(Mt.endX,Mt.endY);break;case Es:a.bezierCurveTo(Mt.point1X,Mt.point1Y,Mt.point2X,Mt.point2Y,Mt.endX,Mt.endY);break;case Oa:a.quadraticCurveTo(Mt.point1X,Mt.point1Y,Mt.endX,Mt.endY);break;case zo:if(Mt.radiusX===Mt.radiusY){var Gt=Math.PI/180;a.arc(Mt.point1X,Mt.point1Y,Mt.radiusX,Mt.startAngle*Gt,(Mt.startAngle+Mt.sweepAngle)*Gt,0>Mt.sweepAngle,xt!==null?xt.endX:at.startX,xt!==null?xt.endY:at.startY)}else if(xt=Pa(Mt,at),Gt=xt.length,Gt===0)a.lineTo(Mt.centerX,Mt.centerY);else for(var Dt=0;Dt<Gt;Dt++){var _t=xt[Dt];Dt===0&&a.lineTo(_t[0],_t[1]),a.bezierCurveTo(_t[2],_t[3],_t[4],_t[5],_t[6],_t[7])}break;case ul:if(Dt=Gt=0,xt!==null&&xt.type===zo){if(xt=Pa(xt,at),_t=xt.length,_t===0){a.lineTo(Mt.endX,Mt.endY);break}xt=xt[_t-1]||null,xt!==null&&(Gt=xt[6],Dt=xt[7])}else Gt=xt!==null?xt.endX:at.startX,Dt=xt!==null?xt.endY:at.startY;if(xt=Al(Mt,at,Gt,Dt),Gt=xt.length,Gt===0){a.lineTo(Mt.endX,Mt.endY);break}for(Dt=0;Dt<Gt;Dt++)_t=xt[Dt],a.bezierCurveTo(_t[2],_t[3],_t[4],_t[5],_t[6],_t[7]);break;default:Yt("Segment not of valid type: "+Mt.type)}Mt.isClosed&&a.closePath(),xt=Mt}At=at.isFilled,z?at.isShadowed?(At===!0&&E!=="transparent"&&E!==null&&a.ng(E,at.isEvenOdd),x!==null&&(At&&rt&&cA(a),a.jk(),At&&rt&&eu(a))):(cA(a),At&&E!=="transparent"&&E!==null&&a.ng(E,at.isEvenOdd),x!==null&&a.jk(),eu(a)):(At&&E!==null&&a.ng(E,at.isEvenOdd),x!==null&&a.jk()),a.Se(pt)}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=Qn(),z.type===qe.j)E.push(z.startX),E.push(z.startY),E.push(z.endX),E.push(z.endY),yg(a,y,E,x);else if(z.type===qe.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,pt=b,at=rt.segments.s,At=at.length,ft=0;ft<At;ft++){switch(Bt=at[ft],Bt.type){case os:yg(a,y,E,x),E.length=0,E.push(Bt.endX),E.push(Bt.endY),tt=Bt.endX,b=Bt.endY,ot=tt,pt=b;break;case _r:E.push(Bt.endX),E.push(Bt.endY),tt=Bt.endX,b=Bt.endY;break;case Es:oe.Qe(tt,b,Bt.point1X,Bt.point1Y,Bt.point2X,Bt.point2Y,Bt.endX,Bt.endY,.5,E),tt=Bt.endX,b=Bt.endY;break;case Oa:oe.ep(tt,b,Bt.point1X,Bt.point1Y,Bt.endX,Bt.endY,.5,E),tt=Bt.endX,b=Bt.endY;break;case zo:if(Mt=Pa(Bt,rt),xt=Mt.length,xt===0){E.push(Bt.centerX),E.push(Bt.centerY),tt=Bt.centerX,b=Bt.centerY;break}for(Gt=0;Gt<xt;Gt++)Dt=Mt[Gt],oe.Qe(tt,b,Dt[2],Dt[3],Dt[4],Dt[5],Dt[6],Dt[7],.5,E),tt=Dt[6],b=Dt[7];break;case ul:if(Mt=Al(Bt,rt,tt,b),xt=Mt.length,xt===0){E.push(Bt.endX),E.push(Bt.endY),tt=Bt.endX,b=Bt.endY;break}for(Gt=0;Gt<xt;Gt++)Dt=Mt[Gt],oe.Qe(tt,b,Dt[2],Dt[3],Dt[4],Dt[5],Dt[6],Dt[7],.5,E),tt=Dt[6],b=Dt[7];break;default:Yt("Segment not of valid type: "+Bt.type)}Bt.isClosed&&(E.push(ot),E.push(pt),yg(a,y,E,x))}yg(a,y,E,x)}else if(z.type===qe.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),yg(a,y,E,x);else if(z.type===qe.F){if(b=new As,b.startX=z.endX,b.startY=(z.startY+z.endY)/2,tt=new yr(zo),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=Pa(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++)pt=z[ot],oe.Qe(tt,b,pt[2],pt[3],pt[4],pt[5],pt[6],pt[7],.5,E),tt=pt[6],b=pt[7];yg(a,y,E,x)}Dn(E),a.restore(),a.Vc(!1)}}}},Pt.kk=function(a,y,x){return!re.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:re.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 Ot),a instanceof ri){a.Mc()&&Yt("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 Me);var y=this.naturalBounds,x=this.oe;y=Me.allocAt(y.x,y.y,y.width,y.height);var E=this.strokeWidth;return y.Bc(E/2,E/2),E=Ot.allocAt(y.x,y.y).transform(x),a.h(E.x,E.y,0,0),E.h(y.right,y.y).transform(x),Kr(a,E.x,E.y,0,0),E.h(y.right,y.bottom).transform(x),Kr(a,E.x,E.y,0,0),E.h(y.x,y.bottom).transform(x),Kr(a,E.x,E.y,0,0),Me.free(y),Ot.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!==qe.j||y||(b+=2);var z=Me.alloc();if(z.assign(E),z.Bc(b+2,b+2),!z.ca(a))return Me.free(z),!1;if(E=b+1e-4,x.type===qe.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:(Me.free(z),oe.Yb(x.startX,x.startY,x.endX,x.endY,b,a.x,a.y));if(x.type===qe.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 Me.free(z),!1;z.Bc(E,E)}return this.stroke!==null&&z.Bc(b,b),a=z.ca(a),Me.free(z),a}if(x.type===qe.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 Me.free(z),!1;tt+=E,b+=E}return this.stroke!==null&&(tt+=E,b+=E),Me.free(z),0>=tt||0>=b?!1:1>=x*x/(tt*tt)+y*y/(b*b)}if(x.type===qe.o)return Me.free(z),this.fill===null?_l(x,a.x,a.y,b):Cs(x,a,b,1<this.strokeWidth,y);Yt("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=Rm[rt];if(ot===void 0){var at=oe.Ze[rt];typeof at=="string"&&(at=oe.Ze[at]),typeof at=="function"?(ot=at(null,100,100),Rm[rt]=ot):Yt("Unsupported Figure: "+rt)}tt=ot.bounds}rt=tt.width,ot=tt.height,at=tt.width;var At=tt.height;switch(ma(this,!0)){case Re:E=x=0;break;case _e:at=Math.max(a-z,0),At=Math.max(y-z,0);break;case Yn:at=Math.max(a-z,0),E=0;break;case di:x=0,At=Math.max(y-z,0)}isFinite(b.width)&&(at=b.width),isFinite(b.height)&&(At=b.height);var ft=this.maxSize,pt=this.minSize;switch(x=Math.max(x-z,pt.width),E=Math.max(E-z,pt.height),at=Math.min(ft.width,at),At=Math.min(ft.height,At),at=isFinite(at)?Math.max(x,at):Math.max(rt,x),At=isFinite(At)?Math.max(E,At):Math.max(ot,E),x=Hm(this),x){case Re:break;case _e:rt=at,ot=At;break;case Rn:x=Math.min(at/rt,At/ot),isFinite(x)||(x=1),rt*=x,ot*=x;break;default:Yt(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&&oe.$(this.ua.Sk,a-z)&&oe.$(this.ua.Rk,y-z)||(this.ua=Oi.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),at+z,At+z),b.w()?(at=b.width,At=b.height,at=Math.min(ft.width,at),At=Math.min(ft.height,At),at=Math.max(pt.width,at),At=Math.max(pt.height,At),this.dc.h(0,0,at,At)):this.dc.assign(tt)};function Hm(a){var y=a.geometryStretch;return a.Rd!==null?y===Mi?_e:y:y===Mi?Rm[a.figure].defaultStretch:y}Pt.eh=function(a,y,x,E){na(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,at=-z.m21*tt,At=z.m11*tt,ft=tt*(z.m21*z.dy-z.m22*z.dx),pt=tt*(z.m12*z.dx-z.m11*z.dy);z=a*rt+y*at+ft,tt=a*ot+y*At+pt,rt=x*rt+E*at+ft,ot=x*ot+E*At+pt,ft=this.ig/2,at=this.ua,at===null&&(this.measure(1/0,1/0),at=this.ua);var xt=at.bounds;if(At=!1,at.type===qe.j)if(1.5>=this.strokeWidth)At=oe.Ve(at.startX,at.startY,at.endX,at.endY,z,tt,rt,ot,b);else{if(at.startX===at.endX?(E=ft,At=0):(y=(at.endY-at.startY)/(at.endX-at.startX),At=ft/Math.sqrt(1+y*y),E=At*y),y=Qn(),a=new Ot,oe.Ve(at.startX+E,at.startY+At,at.endX+E,at.endY+At,z,tt,rt,ot,a)&&y.push(a),a=new Ot,oe.Ve(at.startX-E,at.startY-At,at.endX-E,at.endY-At,z,tt,rt,ot,a)&&y.push(a),a=new Ot,oe.Ve(at.startX+E,at.startY+At,at.startX-E,at.startY-At,z,tt,rt,ot,a)&&y.push(a),a=new Ot,oe.Ve(at.endX+E,at.endY+At,at.endX-E,at.endY-At,z,tt,rt,ot,a)&&y.push(a),rt=y.length,rt===0)return Dn(y),!1;for(At=!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);Dn(y)}else if(at.type===qe.u)At=oe.Ff(xt.x-ft,xt.y-ft,xt.x+xt.width+ft,xt.y+xt.height+ft,z,tt,rt,ot,b);else if(at.type===qe.F){y=Me.allocAt(xt.x,xt.y,xt.width,xt.height).Bc(ft,ft);t:if(y.width===0)At=oe.Ve(y.x,y.y,y.x,y.y+y.height,z,tt,rt,ot,b);else if(y.height===0)At=oe.Ve(y.x,y.y,y.x+y.width,y.y,z,tt,rt,ot,b);else{if(a=y.width/2,at=y.height/2,E=y.x+a,At=y.y+at,x=9999,z!==rt&&(x=(tt-ot)/(z-rt)),9999>Math.abs(x)){if(ot=tt-At-x*(z-E),0>a*a*x*x+at*at-ot*ot){b.x=NaN,b.y=NaN,At=!1;break t}ft=Math.sqrt(a*a*x*x+at*at-ot*ot),rt=(-(a*a*x*ot)+a*at*ft)/(at*at+a*a*x*x)+E,a=(-(a*a*x*ot)-a*at*ft)/(at*at+a*a*x*x)+E,at=x*(rt-E)+ot+At,ot=x*(a-E)+ot+At,Math.abs((z-rt)*(z-rt))+Math.abs((tt-at)*(tt-at))<Math.abs((z-a)*(z-a))+Math.abs((tt-ot)*(tt-ot))?(b.x=rt,b.y=at):(b.x=a,b.y=ot)}else{if(rt=at*at,ot=z-E,rt-=rt/(a*a)*ot*ot,0>rt){b.x=NaN,b.y=NaN,At=!1;break t}ot=Math.sqrt(rt),rt=At+ot,ot=At-ot,Math.abs(rt-tt)<Math.abs(ot-tt)?(b.x=z,b.y=rt):(b.x=z,b.y=ot)}At=!0}Me.free(y)}else if(at.type===qe.o){pt=Ot.alloc();var Bt=rt-z,Mt=ot-tt,Gt=Bt*Bt+Mt*Mt,Dt=z,_t=tt;if(0<Gt&&xt.contains(Dt,_t)&&(pt.x=Dt,pt.y=_t,this.ca(pt)))for(Bt!==0&&.5>Math.abs(Bt)?(Mt*=.5/Bt,Bt=.5):Mt!==0&&.5>Math.abs(Mt)&&(Bt*=.5/Mt,Mt=.5),Dt-=Bt,_t-=Mt;xt.contains(Dt,_t);)Dt-=Bt,_t-=Mt;for(b.x=rt,b.y=ot,Mt=0;Mt<at.figures.count;Mt++){var Zt=at.figures.s[Mt],te=Zt.isFilled?Dt:z,ie=Zt.isFilled?_t:tt,me=Zt.segments;xt=Zt.startX,Bt=Zt.startY;for(var ln=xt,Un=Bt,Fn=0;Fn<me.count;Fn++){var tn=me.s[Fn],De=tn.type,bi=tn.endX,Bi=tn.endY,Br=!1;switch(De){case os:ln=bi,Un=Bi;break;case _r:Br=A0(xt,Bt,bi,Bi,te,ie,rt,ot,pt);break;case Es:Br=oe.Eo(xt,Bt,tn.point1X,tn.point1Y,tn.point2X,tn.point2Y,bi,Bi,te,ie,rt,ot,.6,pt);break;case Oa:Br=oe.Eo(xt,Bt,xt+2/3*(tn.point1X-xt),Bt+2/3*(tn.point1Y-Bt),bi+2/3*(tn.point1X-bi),Bi+2/3*(tn.point1Y-Bi),bi,Bi,te,ie,rt,ot,.6,pt);break;case zo:case ul:De=tn.type===zo?Pa(tn,Zt):Al(tn,Zt,xt,Bt);var Wr=De.length;if(Wr===0){Br=A0(xt,Bt,tn.type===zo?tn.centerX:tn.endX,tn.type===zo?tn.centerY:tn.endY,te,ie,rt,ot,pt);break}for(Bi=null,bi=0;bi<Wr;bi++){if(Bi=De[bi],bi===0&&A0(xt,Bt,Bi[0],Bi[1],te,ie,rt,ot,pt)){var Ss=l0(te,ie,pt,Gt,b);Ss<Gt&&(Gt=Ss,At=!0)}oe.Eo(Bi[0],Bi[1],Bi[2],Bi[3],Bi[4],Bi[5],Bi[6],Bi[7],te,ie,rt,ot,.6,pt)&&(Ss=l0(te,ie,pt,Gt,b),Ss<Gt&&(Gt=Ss,At=!0))}bi=Bi[6],Bi=Bi[7];break;default:Yt("Unknown Segment type: "+De)}xt=bi,Bt=Bi,Br&&(Br=l0(te,ie,pt,Gt,b),Br<Gt&&(Gt=Br,At=!0)),tn.isClosed&&(bi=ln,Bi=Un,A0(xt,Bt,bi,Bi,te,ie,rt,ot,pt)&&(tn=l0(te,ie,pt,Gt,b),tn<Gt&&(Gt=tn,At=!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,Ot.free(pt)}else Yt("Unknown Geometry type: "+at.type);return At?(this.transform.Ga(b),!0):!1};function l0(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 A0(a,y,x,E,b,z,tt,rt,ot){if(oe.$(a,x)&&oe.$(y,E)||oe.$(b,tt)&&oe.$(z,rt))return!1;var at=!1,At=(b-tt)*(y-E)-(z-rt)*(a-x);return At===0?!1:(ot.x=((b*rt-z*tt)*(a-x)-(b-tt)*(a*E-y*x))/At,ot.y=((b*rt-z*tt)*(y-E)-(z-rt)*(a*E-y*x))/At,(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||oe.$(ot.y,a))&&(ot.y<y||oe.$(ot.y,y))&&(at=!0)):(y=a<x?a:x,a=a<x?x:a,(ot.x>y||oe.$(ot.x,y))&&(ot.x<a||oe.$(ot.x,a))&&(at=!0)),at)}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=Ot.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)))),Ot.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=Ei.alloc();x.set(y),x.Vj();var E=a.left,b=a.right,z=a.top;a=a.bottom;var tt=Ot.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 Ot.free(tt),!0;var rt=Ot.alloc(),ot=Ot.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,Wf(this,tt,rt,ot)?y=!0:(tt.x=b,tt.y=a,tt.transform(x),Wf(this,tt,rt,ot)?y=!0:(rt.x=E,rt.y=a,rt.transform(x),Wf(this,tt,rt,ot)?y=!0:(tt.x=E,tt.y=z,tt.transform(x),Wf(this,tt,rt,ot)&&(y=!0)))),Ot.free(tt),Ei.free(x),Ot.free(rt),Ot.free(ot),y};function Wf(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(Gt,Dt){for(var _t=Gt.length,Zt=0;Zt<_t;Zt+=2)if(Dt.zd(Gt[Zt],Gt[Zt+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,at=tt.x+tt.width;if(tt=tt.y+tt.height,$n(a.x,a.y,rt,ot)<=b&&$n(a.x,a.y,at,ot)<=b&&$n(a.x,a.y,rt,tt)<=b&&$n(a.x,a.y,at,tt)<=b)return!0}if(rt=y.startX,ot=y.startY,at=y.endX,tt=y.endY,y.type===qe.j){if(x=(rt-at)*(a.x-at)+(ot-tt)*(a.y-tt),ni(a.x,a.y,rt,ot,at,tt)<=(0<=(at-rt)*(a.x-rt)+(tt-ot)*(a.y-ot)&&0<=x?b:z))return!0}else{if(y.type===qe.u)return y=!1,x&&(y=ni(a.x,a.y,rt,ot,rt,tt)<=b||ni(a.x,a.y,rt,ot,at,ot)<=b||ni(a.x,a.y,at,ot,at,tt)<=b||ni(a.x,a.y,rt,tt,at,tt)<=b),y;if(y.type===qe.F){y=a.x-(rt+at)/2,z=a.y-(ot+tt)/2;var At=Math.abs(at-rt)/2,ft=Math.abs(tt-ot)/2;if(At===0||ft===0)return ni(a.x,a.y,rt,ot,at,tt)<=b;if(x){if(a=oe.$y(At,ft,y,z),a*a<=b)return!0}else return!($n(y,z,-At,0)>=b||$n(y,z,0,-ft)>=b||$n(y,z,0,ft)>=b||$n(y,z,At,0)>=b)}else if(y.type===qe.o){if(at=y.bounds,z=at.x,rt=at.y,ot=at.x+at.width,at=at.y+at.height,a.x>ot&&a.x<z&&a.y>at&&a.y<rt&&ni(a.x,a.y,z,rt,z,at)>b&&ni(a.x,a.y,z,rt,ot,rt)>b&&ni(a.x,a.y,ot,at,z,at)>b&&ni(a.x,a.y,ot,at,ot,rt)>b)return!1;if(z=Math.sqrt(b),x){if(this.fill===null?_l(y,a.x,a.y,z):Cs(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,At=z.startY,a.zd(tt,At)>b)return!1;for(rt=z.segments.s,ot=rt.length,at=0;at<ot;at++)switch(ft=rt[at],ft.type){case os:case _r:if(tt=ft.endX,At=ft.endY,a.zd(tt,At)>b)return!1;break;case Es:var pt=Qn();if(oe.Qe(tt,At,ft.point1X,ft.point1Y,ft.point2X,ft.point2Y,ft.endX,ft.endY,.8,pt),tt=E(pt,a),Dn(pt),tt||(tt=ft.endX,At=ft.endY,a.zd(tt,At)>b))return!1;break;case Oa:if(pt=Qn(),oe.ep(tt,At,ft.point1X,ft.point1Y,ft.endX,ft.endY,.8,pt),tt=E(pt,a),Dn(pt),tt||(tt=ft.endX,At=ft.endY,a.zd(tt,At)>b))return!1;break;case zo:case ul:pt=ft.type===zo?Pa(ft,z):Al(ft,z,tt,At);var xt=pt.length;if(xt===0){if(tt=ft.type===zo?ft.centerX:ft.endX,At=ft.type===zo?ft.centerY:ft.endY,a.zd(tt,At)>b)return!1;break}ft=null;for(var Bt=Qn(),Mt=0;Mt<xt;Mt++)if(ft=pt[Mt],Bt.length=0,oe.Qe(ft[0],ft[1],ft[2],ft[3],ft[4],ft[5],ft[6],ft[7],.8,Bt),E(Bt,a))return Dn(Bt),!1;Dn(Bt),ft!==null&&(tt=ft[6],At=ft[7]);break;default:Yt("Unknown Segment type: "+ft.type)}}return!0}}}return!1},Pt.qc=function(){this.ua=null},Pt.kq=function(){return this.ig};function my(a){var y=a.diagram;y!==null&&y.undoManager.isUndoingRedoing||(a.segmentOrientation=gp,a.toArrow!=="None"?(a.segmentIndex=-1,a.alignmentFocus=rs):a.fromArrow!=="None"&&(a.segmentIndex=0,a.alignmentFocus=new ri(1-rs.x,rs.y)))}Oi.makeGeometry=function(a,y,x){if(a.toArrow!=="None")var E=Hu[a.toArrow];else a.fromArrow!=="None"?E=Hu[a.fromArrow]:(E=oe.Ze[a.figure],typeof E=="string"&&(E=oe.Ze[E]),E===void 0&&Yt("Unknown Shape.figure: "+a.figure),E=E(a,y,x),E.Sk=y,E.Rk=x);if(E===null){var b=oe.Ze.Rectangle;typeof b=="function"&&(E=b(a,y,x))}return E};function vy(a){var y=Hu[a];if(y===void 0){var x=a.toLowerCase();if(x==="none")return"None";if(y=Hu[x],y===void 0){var E=null,b;for(b in oe.um)if(b.toLowerCase()===x){E=b;break}if(E!==null)return a=qe.parse(oe.um[E],!1),Hu[E]=a,x!==E&&(Hu[x]=E),E}}return typeof y=="string"?y:y instanceof qe?a:null}We.Object.defineProperties(Oi.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),Ms(this)&&(a=this.part,a!==null&&to(this,a,"geometryString"))}}},geometryString:{get:function(){return this.geometry===null?"":this.geometry.toString()},set:function(a){a=qe.parse(a);var y=a.normalize();this.geometry=a,this.position=a=Ot.allocAt(-y.x,-y.y),Ot.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&&St(a,"Shape.fill"),a instanceof Mr&&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&&St(a,"Shape.stroke"),a instanceof Mr&&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 Sn(a,"value >= 0",Oi,"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"?Sn(a,'"butt", "round", or "square"',Oi,"strokeCap"):(_f(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"?Sn(a,'"miter", "bevel", or "round"',Oi,"strokeJoin"):(_f(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){_f(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)||Yt("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&&(_f(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=oe.Ze[a];typeof x=="function"?x=a:(x=oe.Ze[a.toLowerCase()])||Yt("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=vy(a);x===null?Yt("Unknown Shape.toArrow: "+a):y!==x&&(this.Ua===null&&(this.Ua=new vh),this.Ua.V=x,this.Rd=null,this.qc(),this.v(),my(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=vy(a);x===null?Yt("Unknown Shape.fromArrow: "+a):y!==x&&(this.Ua===null&&(this.Ua=new vh),this.Ua.j=x,this.Rd=null,this.qc(),this.v(),my(this),this.g("fromArrow",y,x))}}},spot1:{get:function(){return this.Na!==null?this.Na.fg:is},set:function(a){var y=this.spot1;y.D(a)||(a=a.J(),_f(this),this.Na.fg=a,this.v(),this.g("spot1",y,a))}},spot2:{get:function(){return this.Na!==null?this.Na.gg:is},set:function(a){var y=this.spot2;y.D(a)||(a=a.J(),_f(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&&(_f(this),this.Na.br=a,this.N(),this.g("pathPattern",y,a))}},geometryStretch:{get:function(){return this.Na!==null?this.Na.jq:Mi},set:function(a){var y=this.geometryStretch;y!==a&&(_f(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 Ru),this.fa.Tk=a;var x=this.diagram;x!==null&&this.panel===x.grid&&uA(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 Ru),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 Ru),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 Ru),this.fa.o=a,this.v(),this.g("graduatedSkip",y,a))}}}),Oi.prototype.intersectsRect=Oi.prototype.Yc,Oi.prototype.containedInRect=Oi.prototype.fh,Oi.prototype.getNearestIntersectionPoint=Oi.prototype.rs,Oi.prototype.getDocumentBounds=Oi.prototype.mi,Oi.prototype.getDocumentPoint=Oi.prototype.ga;var Hu=new Hn,Rm=new Hn;Oi.className="Shape",Oi.getFigureGenerators=function(){var a=new yn,y;for(y in oe.Ze)y!==y.toLowerCase()&&a.add(y,oe.Ze[y]);return a.freeze(),a},Oi.defineFigureGenerator=function(a,y){var x=a.toLowerCase(),E=oe.Ze;E[a]=y,E[x]=a},Oi.getArrowheadGeometries=function(){var a=new yn;for(E in oe.um)if(Hu[E]===void 0){var y=qe.parse(oe.um[E],!1);Hu[E]=y,y=E.toLowerCase(),y!==E&&(Hu[y]=E)}for(var x in Hu)if(x!==x.toLowerCase()){var E=Hu[x];E instanceof qe&&a.add(x,E)}return a.freeze(),a},Oi.defineArrowheadGeometry=function(a,y){var x=null;typeof y=="string"?x=qe.parse(y,!1):x=y,y=a.toLowerCase(),y!=="none"&&a!==y||Yt("Shape.defineArrowheadGeometry name must not be empty or None or all-lower-case: "+a);var E=Hu;E[a]=x,E[y]=a};function Gm(){this.nc=!1,this.Hr="butt",this.Ir="miter",this.Jr=10,this.uj=0,this.br=null,this.jq=Mi,this.gg=this.fg=is}Gm.prototype.copy=function(){var a=new Gm;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 Jr(a,y){return re.call(this),d0||(Ka=Co?new El(null).context:null,d0=!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}Le(Jr,re),Jr.prototype.cloneProtected=function(a){re.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 su(a){a.da===null?a.da=new Ym:a.da.nc&&(a.da=a.da.copy())}Pt=Jr.prototype,Pt.th=function(){re.prototype.th.call(this),this.da!==null&&(this.da.nc=!0)};function yy(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===Jr?this.wrap=a:re.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(){re.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=lp(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 at=this.isStrikethrough;yo(this,a,this.xc,!0,!1,x,E),(ot||at)&&yo(this,a,this.xc,!1,!1,x,E),E=0,x=!1;var At=this.oe,ft=At.dx-(tt*At.m21+At.dx);At=At.dy-(tt*At.m22+At.dy);var pt=y.scale;switch(8>(ft*ft+At*At)*pt*pt&&(x=!0),y.ib!==a&&(x=!1),y.ib instanceof Ea&&(x=!1),y.Gf("textGreeking")===!1&&(x=!1),y=this.spacingAbove,ft=this.spacingBelow,this.flip){case lr:a.translate(b,0),a.scale(-1,1);break;case zi:a.translate(0,z),a.scale(1,-1);break;case Ir:a.translate(b,z),a.scale(-1,-1)}if(a.yc(),At=this.Gc,pt=(y+tt+ft)*At,z>pt&&(E=this.verticalAlignment,E=E.y*z-E.y*pt+E.offsetY),At===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,at);else if(this.Qc!==null&&this.Qb!==null)for(pt=0;pt<At;pt++){var xt=this.Qc[pt];xt>b&&(xt=b),E+=y,this.Oj(this.Qb[pt],a,0,E,b,tt,xt,x,rt,ot,at),E+=tt+ft}switch(this.flip){case lr:a.scale(-1,1),a.translate(-b,0);break;case zi:a.scale(1,-1),a.translate(0,-z);break;case Ir:a.scale(-1,-1),a.translate(-b,-z)}}},Pt.Oj=function(a,y,x,E,b,z,tt,rt,ot,at,At){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=u0!==null?u0(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),at){rt=h0!==null?h0(this,z):.8*z,ot=x+ft,at=E+rt,b=x+ft+tt,rt=E+rt;var pt=a;y.beginPath(),y.lineWidth=pt,y.moveTo(ot,at),y.lineTo(b,rt),y.stroke(),y.Se(),y instanceof Ea&&y.ad.classList.add("gojs-td")}At&&(At=E+z-z/2.2|0,a%2!==0&&(At+=.5),E=x+ft,z=At,x=x+ft+tt,tt=At,ft=a,y.beginPath(),y.lineWidth=ft,y.moveTo(E,z),y.lineTo(x,tt),y.stroke(),y.Se(),y instanceof Ea&&y.ad.classList.add("gojs-td"))}},Pt.kk=function(a,y,x){if(!re.prototype.kk.call(this,a,y,x))return!1;if(yo(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++)Nd(a,y[x],!1)}else y=this.svg,y.innerHTML=this.text,Nd(a,y,!0);return!0},Pt.nk=function(a){return 1<this.lineCount||this.isUnderline||this.isStrikethrough?!0:re.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;Ka!==null&&Fy!==z&&(Fy=Ka.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 at=z.indexOf(`
`,rt);at===-1&&(at=z.length,ot=!0),rt=z.substr(rt,at-rt),this.formatting===Ap&&(rt=rt.trim()),tt=Math.max(tt,gA(rt)),rt=at+1}z=tt}else tt=z.indexOf(`
`,0),0<=tt&&(z=z.substr(0,tt)),z=gA(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=Sy(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===c0&&(y=this.Ae,y=this.overflow===c0?wy(y):0,at=this.spacingAbove+this.spacingBelow,at=Math.max(0,lp(this)+at),ot=Math.min(this.maxLines-1,Math.max(Math.floor(ot/at+.01)-1,0)),!(ot+1>=this.Qb.length))){for(this.l|=16777216,at=this.Qb[ot],y=Math.max(1,a-y);gA(at)>y&&1<at.length;)at=at.substr(0,at.length-1);at+=up,y=gA(at),this.Qb[ot]=at,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===xy||isNaN(this.desiredSize.width))&&(z=isNaN(a)?this.Cb:Math.min(a,this.Cb)),z=Math.max(x,z),tt=Math.max(E,tt),ho(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){na(this,a,y,x,E)};function ap(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 zm(a,y,x,E){var b=a.formatting===Ap;b&&(y=y.trim());var z=0,tt=a.Ae,rt=a.spacingAbove+a.spacingBelow;rt=Math.max(0,lp(a)+rt);var ot=a.overflow===c0?wy(tt):0;if(a.Gc>=a.maxLines)E!==null&&E.h(0,rt);else if(tt=y,a.wrap===Km){a.Le=1;var at=gA(y);if(ot===0||at<=x)a.Cb=Math.max(a.Cb,at),ap(a,y,a.Cb),E!==null&&E.h(at,rt);else{for(z=wg(a,tt),tt=tt.substr(z.length),y=wg(a,tt),at=gA(z+y);0<y.length&&at<=x;)z+=y,tt=tt.substr(y.length),y=wg(a,tt),at=z+y,b&&(at=at.trim()),at=gA(at);for(b&&(y=y.trim()),z+=y,x=Math.max(1,x-ot);gA(z)>x&&1<z.length;)z=z.substr(0,z.length-1);a.l|=16777216,z+=up;var At=gA(z);a.Cb=At,ap(a,z,At),E!==null&&E.h(At,rt)}}else{for(ot=0,tt.length===0&&(ot=1,ap(a,tt,0));0<tt.length;){for(y=wg(a,tt),tt=tt.substr(y.length);gA(y)>x;){var ft=1;for(at=gA(y.substr(0,ft)),At=0;at<=x;)ft++,At=at,at=gA(y.substr(0,ft));if(ft===1){var pt=at;z=Math.max(z,at)}else pt=At,z=Math.max(z,At);if(ft--,1>ft&&(ft=1),ap(a,y.substr(0,ft),pt),ot++,y=y.substr(ft),a.Gc+ot>a.maxLines)break}for(At=wg(a,tt),at=gA(y+At);0<At.length&&at<=x;)y+=At,tt=tt.substr(At.length),At=wg(a,tt),at=y+At,b&&(at=at.trim()),at=gA(at);if(b&&(y=y.trim()),y!==""&&(y[y.length-1]==="\xAD"&&(y=y.substring(0,y.length-1)+"\u2010"),At.length===0?(ft=at,z=Math.max(z,at)):(ft=At=gA(y),z=Math.max(z,At)),ap(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 wg(a,y){if(a.wrap===By)return y.substr(0,1);for(var x=y.length,E=0,b=y1;E<x&&!b.test(y.charAt(E));)E++;for(a.formatting===Cy&&(x=Math.min(x,E+1));E<x&&b.test(y.charAt(E));)E++;return E>=y.length?y:y.substr(0,E)}function gA(a){return Ka===null?8*a.length:Ka.measureText(a).width}function lp(a){if(a.df!==null)return a.df;var y=a.Ae;if(Ka===null){var x=16;return a.df=x}return _m[y]!==void 0&&5e3>Py?x=_m[y]:(x=1.3*Ka.measureText("M").width,_m[y]=x,Py++),a.df=x}function wy(a){if(Ka===null)return 6;if(f0[a]!==void 0&&5e3>Wm)var y=f0[a];else y=Ka.measureText(up).width,f0[a]=y,Wm++;return y}function Sy(a,y){var x=a.ec.replace(/\r\n/g,`
`).replace(/\r/g,`
`),E=a.spacingAbove+a.spacingBelow;if(E=Math.max(0,lp(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!==Km){a.Le=0;var ot=Xe.alloc();zm(a,z,y,ot),b+=ot.height,Xe.free(ot),a.Gc+=a.Le}else zm(a,z,y,null),b+=E,a.Gc++;a.Gc===a.maxLines&&(rt=!0)}z=tt+1}return a.Lq=b}We.Object.defineProperties(Jr.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"||(su(this),this.da.Or=a,this.N(),this.g("textAlign",y,a))}},flip:{get:function(){return this.da!==null?this.da.Xf:Re},set:function(a){var y=this.flip;y!==a&&(su(this),this.da.Xf=a,this.N(),this.g("flip",y,a))}},verticalAlignment:{get:function(){return this.da!==null?this.da.Yr:fa},set:function(a){var y=this.verticalAlignment;y.D(a)||(a=a.J(),su(this),this.da.Yr=a,es(this),this.g("verticalAlignment",y,a))}},naturalBounds:{get:function(){if(!this.dc.w()){var a=Xe.alloc();zm(this,this.ec,999999,a);var y=a.width;Xe.free(a),a=Sy(this,y);var x=this.desiredSize;isNaN(x.width)||(y=x.width),isNaN(x.height)||(a=x.height),ho(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:jm},set:function(a){var y=this.wrap;y!==a&&(su(this),this.da.$r=a,this.v(),this.g("wrap",y,a))}},overflow:{get:function(){return this.da!==null?this.da.$q:Vm},set:function(a){var y=this.overflow;y!==a&&(su(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&&St(a,"TextBlock.stroke"),a instanceof Mr&&a.freeze(),this.xc=a,this.N(),this.g("stroke",y,a))}},lineCount:{get:function(){return this.Gc}},lineHeight:{get:function(){return lp(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&&(su(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&&(su(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 Ru),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 Ru),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 Ru),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 Ru),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 Ru),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&&(su(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&&(su(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&&(su(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&&(su(this),this.da.Er=a,this.v(),this.g("spacingBelow",y,a))}},formatting:{get:function(){return this.da!==null?this.da.gq:Ap},set:function(a){var y=this.formatting;y!==a&&(su(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&&Sn(a,"> 0",Jr,"maxLines"),su(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 u0=null,h0=null,Km=new xe(Jr,"None",0),xy=new xe(Jr,"WrapFit",1),jm=new xe(Jr,"WrapDesiredSize",2),By=new xe(Jr,"WrapBreakAll",3),Vm=new xe(Jr,"OverflowClip",0),c0=new xe(Jr,"OverflowEllipsis",1),Ap=new xe(Jr,"FormatTrim",0),Cy=new xe(Jr,"FormatNone",0),y1=/[ \u200b\u00ad]/,_m=new Hn,Py=0,f0=new Hn,Wm=0,up="...",Fy="",Ka=null,d0=!1;Jr.className="TextBlock";function Ym(){this.nc=!1,this.Hd=null,this.Xf=Re,this.gq=Ap,this.Jq=1/0,this.$q=Vm,this.Er=this.Dr=0,this.Or="start",this.vj=this.Qr=this.Pr=null,this.Yr=fa,this.$r=jm}Ym.prototype.copy=function(){var a=new Ym;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},Jr.getEllipsis=function(){return up},Jr.setEllipsis=function(a){up=a,f0=new Hn,Wm=0},Jr.getBaseline=function(){return u0},Jr.setBaseline=function(a){u0=a},Jr.getUnderline=function(){return h0},Jr.setUnderline=function(a){h0=a},Jr.isValidFont=function(a){if(d0||(Ka=Co?new El(null).context:null,d0=!0),Ka===null)return!0;var y=Ka.font;if(a===y||a==="10px sans-serif")return!0;Ka.font="10px sans-serif",Ka.font=a;var x=Ka.font;if(x!=="10px sans-serif")return Ka.font=y,!0;Ka.font="19px serif";var E=Ka.font;return Ka.font=a,x=Ka.font,Ka.font=y,x!==E},Jr.FormatNone=Cy,Jr.FormatTrim=Ap,Jr.None=Km,Jr.OverflowClip=Vm,Jr.OverflowEllipsis=c0,Jr.WrapBreakAll=By,Jr.WrapDesiredSize=jm,Jr.WrapFit=xy;function Ru(){this.Tk=1,this.u=0,this.j=1,this.o=this.F=null}Ru.prototype.copy=function(){var a=new Ru;return a.Tk=this.Tk,a.u=this.u,a.j=this.j,a.F=this.F,a.o=this.o,a},Ru.className="GradElementSettings";function ja(a,y){re.call(this),this.Eg=null,this.qo="",this.Xg=zA,this.Nk=_e,this.Zg=this.Hd=null,this.Mk=Ui,this.Xf=Re,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 Sg;Le(ja,re),ja.prototype.cloneProtected=function(a){re.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},ja.prototype.qb=function(a){a===Re||a===Rn||a===Ji?this.imageStretch=a:re.prototype.qb.call(this,a)},ja.prototype.toString=function(){return"Picture("+this.source+")#"+On(this)};function xg(a){a===void 0&&(a=""),a!==""?Sg[a]&&(delete Sg[a],g0--):(Sg=new Hn,g0=0)}function Ly(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()||(Zo(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=Qn();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);Dn(z)}}y.Bg.clear()}},y.addEventListener("load",y.Fq),y.addEventListener("error",y.Yp),y.qy=!0)}ja.prototype.hA=function(){if(this.source!==""){xg(this.source);var a=this.source;this.source="",this.source=a}},ja.prototype.redraw=function(){this.N(),this.Uc=!0},ja.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 sc)){var b=a instanceof Ea;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 at=ot,At=rt;this.sourceRect.w()&&(z=this.Xg.x,tt=this.Xg.y,ot=this.Xg.width,rt=this.Xg.height);var ft=ot,pt=rt,xt=this.Nk,Bt=this.Mk;switch(xt){case Re:if(this.sourceRect.w())break;ft>=E.width&&(z=z+Bt.offsetX+(ft*Bt.x-E.width*Bt.x)),pt>=E.height&&(tt=tt+Bt.offsetY+(pt*Bt.y-E.height*Bt.y)),ot=Math.min(E.width,ft),rt=Math.min(E.height,pt);break;case _e:ft=E.width,pt=E.height;break;case Rn:case Ji:xt===Rn?(xt=Math.min(E.height/pt,E.width/ft),ft*=xt,pt*=xt):xt===Ji&&(xt=Math.max(E.height/pt,E.width/ft),ft*=xt,pt*=xt,ft>=E.width&&(z=(z+Bt.offsetX+(ft*Bt.x-E.width*Bt.x)/ft)*ot),pt>=E.height&&(tt=(tt+Bt.offsetY+(pt*Bt.y-E.height*Bt.y)/pt)*rt),ot*=1/(ft/E.width),rt*=1/(pt/E.height),ft=E.width,pt=E.height)}xt=this.Df()*y.scale;var Mt=ft*xt*pt*xt,Gt=ot*rt/Mt,Dt=x.__goCache;xt=null;var _t=w1;if(!b){if(x.sq&&Dt!==void 0&&4<Mt&&Gt>_t*_t)for(Dt.gi===null&&(My(Dt,4,at,At,x),My(Dt,16,at,At,x)),b=Dt.gi,at=b.length,At=0;At<at&&b[At].ratio*b[At].ratio<Gt;At++)xt=b[At];if(!y.Xm){if(this.vl===null)if(this.Eg===null)this.vl=!1;else{b=new El(null).context;try{b.drawImage(this.Eg,0,0)}catch(Zt){this.en=!1}try{b.getImageData(0,0,1,1).data[3]&&(this.vl=!1),this.vl=!1}catch(Zt){this.vl=!0}}if(this.vl)return}}switch(b=ft<E.width?Bt.offsetX+(E.width*Bt.x-ft*Bt.x):0,Bt=pt<E.height?Bt.offsetY+(E.height*Bt.y-pt*Bt.y):0,this.flip){case lr:a.translate(Math.min(E.width,ft),0),a.scale(-1,1);break;case zi:a.translate(0,Math.min(E.height,pt)),a.scale(1,-1);break;case Ir:a.translate(Math.min(E.width,ft),Math.min(E.height,pt)),a.scale(-1,-1)}if(a.yc(),y.Gf("pictureRatioOptimization")&&!y.$i&&Dt!==void 0&&xt!==null&&xt.ratio!==1){a.save(),y=xt.ratio;try{a.drawImage(xt.source,z/y,tt/y,Math.min(xt.source.width,ot/y),Math.min(xt.source.height,rt/y),b,Bt,Math.min(E.width,ft),Math.min(E.height,pt)),a instanceof Ea&&(this.bt=[z/y,tt/y,Math.min(xt.source.width,ot/y),Math.min(xt.source.height,rt/y),b,Bt,Math.min(E.width,ft),Math.min(E.height,pt)])}catch(Zt){this.en=!1}a.restore()}else try{a.drawImage(x,z,tt,ot,rt,b,Bt,Math.min(E.width,ft),Math.min(E.height,pt)),a instanceof Ea&&(this.bt=[z,tt,ot,rt,b,Bt,Math.min(E.width,ft),Math.min(E.height,pt)])}catch(Zt){this.en=!1}switch(this.flip){case lr:a.scale(-1,1),a.translate(-Math.min(E.width,ft),0);break;case zi:a.scale(1,-1),a.translate(0,-Math.min(E.height,pt));break;case Ir:a.scale(-1,-1),a.translate(-Math.min(E.width,ft),-Math.min(E.height,pt))}}}}},ja.prototype.Wl=function(a,y,x,E){var b=this.desiredSize,z=ma(this,!0),tt=this.Eg,rt=this.qn,ot=0,at=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,at=rt?+tt.height:tt.naturalHeight),isFinite(b.width)||z===_e||z===Yn?(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===_e||z===di?(isFinite(y)||(this.sourceRect.w()?y=this.sourceRect.height:tt!==null&&(y=at)),E=0):tt!==null&&this.al!==!1&&(y=this.sourceRect.w()?this.sourceRect.height:at),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)),ho(this.dc,a,y),this.Ge(0,0,a,y)},ja.prototype.eh=function(a,y,x,E){na(this,a,y,x,E)},We.Object.defineProperties(ja.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||Yt("Picture.element must be an instance of Image, Canvas, or Video, not: "+a);var E=this.diagram;E!==null&&Nf(E,this),this.Eg=a,a!==null&&x&&a.Bg===void 0&&(a.Bg=new le),E!==null&&x&&dh(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()||(Zo(this,!1),this.v())):x&&Ly(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=Sg;if(Co){var E=null;if(x[a]!==void 0)E=x[a];else if(a!==""){30<g0&&(xg(),x=Sg),E=un("img"),E.hn=!0,Ly(this,E);var b=this.rl;b!==null&&(E.crossOrigin=b(this)),E.src=a,x[a]=E,g0++}this.element=E,E!==null&&E.__goCache===void 0&&(E.__goCache=new Ey),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}}}),ja.prototype.redraw=ja.prototype.redraw,ja.prototype.reloadSource=ja.prototype.hA;var g0=0,w1=4;ja.className="Picture",Sg=new Hn,ja.clearCache=xg;function Ey(){this.gi=null}function My(a,y,x,E,b){a.gi===null&&(a.gi=[]);var z=new El(null),tt=z.context,rt=1/y;z.width=x/y,z.height=E/y,z.width!==0&&z.height!==0&&(y=new ky(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))}Ey.className="PictureCacheArray";function ky(a,y){this.source=a,this.ratio=y}ky.className="PictureCacheInstance";function Bg(){this.os=new qe,this.mc=null}Bg.prototype.reset=function(a){a!==null?(a.ka(),this.os=a,a.figures.clear()):this.os=new qe,this.mc=null};function Cg(a,y,x,E,b,z){a.mc=new As,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 S1(a){var y=a.mc.segments.length;0<y&&a.mc.segments.M(y-1).close()}Bg.prototype.moveTo=function(a,y,x){x===void 0&&(x=!1);var E=new yr(os);E.endX=a,E.endY=y,x&&E.close(),this.mc.segments.add(E)},Bg.prototype.lineTo=function(a,y,x){x===void 0&&(x=!1);var E=new yr(_r);E.endX=a,E.endY=y,x&&E.close(),this.mc.segments.add(E)};function Ac(a,y,x,E,b,z,tt){var rt;rt===void 0&&(rt=!1);var ot=new yr(Es);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 p0(a,y,x,E,b){var z;z===void 0&&(z=!1);var tt=new yr(Oa);tt.point1X=y,tt.point1Y=x,tt.endX=E,tt.endY=b,z&&tt.close(),a.mc.segments.add(tt)}Bg.prototype.arcTo=function(a,y,x,E,b,z,tt){z===void 0&&(z=0),tt===void 0&&(tt=!1);var rt=new yr(zo);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 x1(a,y,x,E,b,z,tt,rt){var ot;ot===void 0&&(ot=!1),y=new yr(ul,tt,rt,y,x,E,b,z),ot&&y.close(),a.mc.segments.add(y)}function by(a){var y=m0;return y!==null?(m0=null,y.reset(a),y):(y=new Bg,y.reset(a),y)}var m0=null;Bg.className="StreamGeometryContext";function ha(a,y){var x=a.toLowerCase(),E=oe.Ze;E[a]=y,E[x]=a}ha("Rectangle",function(a,y,x){a="r"+y+","+x;var E=oe.Mf[a];return E!==void 0||(E=new qe(qe.u),E.endX=y,E.endY=x,oe.Nf<oe.vm&&(oe.Mf[a]=E,oe.Nf++)),E}),ha("Square",function(a,y,x){a="s"+y+","+x;var E=oe.Mf[a];return E!==void 0||(E=new qe(qe.u),E.endX=y,E.endY=x,E.defaultStretch=Rn,oe.Nf<oe.vm&&(oe.Mf[a]=E,oe.Nf++)),E}),ha("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=oe.Mf[E];if(b!==void 0)return b;var z=a*oe.wg;return b=new qe().add(new As(a,0,!0).add(new yr(_r,y-a,0)).add(new yr(Es,y,a,y-z,0,y,z)).add(new yr(_r,y,x-a)).add(new yr(Es,y-a,x,y,x-z,y-z,x)).add(new yr(_r,a,x)).add(new yr(Es,0,x-a,z,x,0,x-z)).add(new yr(_r,0,a)).add(new yr(Es,a,0,0,z,z,0).close())),1<z&&(b.spot1=new ri(0,0,z,z),b.spot2=new ri(1,1,-z,-z)),oe.Nf<oe.vm&&(oe.Mf[E]=b,oe.Nf++),b}),ha("Border","RoundedRectangle"),ha("Ellipse",function(a,y,x){a="e"+y+","+x;var E=oe.Mf[a];return E!==void 0||(E=new qe(qe.F),E.endX=y,E.endY=x,E.spot1=th,E.spot2=BA,oe.Nf<oe.vm&&(oe.Mf[a]=E,oe.Nf++)),E}),ha("Circle",function(a,y,x){a="c"+y+","+x;var E=oe.Mf[a];return E!==void 0||(E=new qe(qe.F),E.endX=y,E.endY=x,E.spot1=th,E.spot2=BA,E.defaultStretch=Rn,oe.Nf<oe.vm&&(oe.Mf[a]=E,oe.Nf++)),E}),ha("TriangleRight",function(a,y,x){return new qe().add(new As(0,0).add(new yr(_r,y,.5*x)).add(new yr(_r,0,x).close())).pm(0,.25,.5,.75)}),ha("TriangleDown",function(a,y,x){return new qe().add(new As(0,0).add(new yr(_r,y,0)).add(new yr(_r,.5*y,x).close())).pm(.25,0,.75,.5)}),ha("TriangleLeft",function(a,y,x){return new qe().add(new As(y,x).add(new yr(_r,0,.5*x)).add(new yr(_r,y,0).close())).pm(.5,.25,1,.75)}),ha("TriangleUp",function(a,y,x){return new qe().add(new As(y,x).add(new yr(_r,0,x)).add(new yr(_r,.5*y,0).close())).pm(.25,.5,.75,1)}),ha("Triangle","TriangleUp"),ha("Diamond",function(a,y,x){return new qe().add(new As(.5*y,0).add(new yr(_r,0,.5*x)).add(new yr(_r,.5*y,x)).add(new yr(_r,y,.5*x).close())).pm(.25,.25,.75,.75)}),ha("LineH",function(a,y,x){return a=new qe(qe.j),a.startX=0,a.startY=x/2,a.endX=y,a.endY=x/2,a}),ha("LineV",function(a,y,x){return a=new qe(qe.j),a.startX=y/2,a.startY=0,a.endX=y/2,a.endY=x,a}),ha("None","Rectangle"),ha("BarH","Rectangle"),ha("BarV","Rectangle"),ha("MinusLine","LineH"),ha("PlusLine",function(a,y,x){return new qe().add(new As(0,x/2,!1).add(new yr(_r,y,x/2)).add(new yr(os,y/2,0)).add(new yr(_r,y/2,x)))}),ha("XLine",function(a,y,x){return new qe().add(new As(0,x,!1).add(new yr(_r,y,0)).add(new yr(os,0,0)).add(new yr(_r,y,x)))}),ha("LineRight",function(a,y,x){return new qe().add(new As(.25*y,0,!1).add(new yr(_r,.75*y,.5*x)).add(new yr(_r,.25*y,x)))}),ha("LineDown",function(a,y,x){return new qe().add(new As(0,.25*x,!1).add(new yr(_r,.5*y,.75*x)).add(new yr(_r,y,.25*x)))}),ha("LineLeft",function(a,y,x){return new qe().add(new As(.75*y,0,!1).add(new yr(_r,.25*y,.5*x)).add(new yr(_r,.75*y,x)))}),ha("LineUp",function(a,y,x){return new qe().add(new As(0,.75*x,!1).add(new yr(_r,.5*y,.25*x)).add(new yr(_r,y,.75*x)))}),oe.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 Xm(){this.nc=!1,this.tr=this.Kp=this.zq=null,this.vr="",this.fr=this.oq=this.ur=null,this.hr="",this.gr=Ho,this.ir=null,this.jr="",this.lr=is,this.Gq="",this.Hq=vr,this.Pq=br,this.Kq=zr,this.Up=null,this.Cq=127,this.zr=xr,this.yr="gray",this.Vg=4}Xm.prototype.copy=function(){var a=new Xm;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 ii(a,y){a===void 0||a instanceof kr||typeof a=="string"?je.call(this,a):(je.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 Ot(NaN,NaN).freeze(),this.nf=null,this.Ao=NaN,this.vw=-1,this.py=new Me,this.Rh=null,this.ag=NaN,y&&Object.assign(this,y)}Le(ii,je),ii.prototype.cloneProtected=function(a){je.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=ii.prototype,Pt.Af=function(a){je.prototype.Af.call(this,a),a.oh(),a.Ug=null,a.nf=null,a.Rh=null},Pt.toString=function(){var a=Zn(this.constructor)+"#"+On(this);return this.data!==null&&(a+="("+rr(this.data)+")"),a};function Va(a){a.P===null?a.P=new Xm:a.P.nc&&(a.P=a.P.copy())}Pt.th=function(){je.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===Uo&&y==="elements"?b instanceof je?fA(b,function(ot){xv(rt.partManager,ot),JA(rt,ot)}):dh(rt,b):a===ts&&y==="elements"&&(b instanceof je?fA(b,function(ot){Bv(rt.partManager,ot,rt)}):Nf(rt,b)),rt.cb(a,y,x,E,b,z,tt))},Pt.La=function(a){if(je.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 je&&fA(b,function(z){z.data!==null&&z.La()})}for(y=this.adornments;y.next();)y.value.La(a)}},ii.prototype.updateRelationshipsFromData=function(){var a;this.data!==null&&((a=this.diagram)===null||a===void 0||a.partManager.updateRelationshipsFromData(this))},ii.prototype.Pj=function(a){var y=this.Qf;return y===null?null:y.I(a)},ii.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 yn),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)))}}},ii.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)}},ii.prototype.Ej=function(){var a=this.Qf;if(a!==null){var y=Qn();for(a=a.iterator;a.next();)y.push(a.key);a=y.length;for(var x=0;x<a;x++)this.Jf(y[x]);Dn(y)}},ii.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 Ti?a.groupSelectionAdornmentTemplate:a.nodeSelectionAdornmentTemplate),!(x instanceof Sr))break t;Yl(x),x=x.copy(),x!==null&&(this.ph()&&this.selectionObject===this.path&&(x.type=je.Link),x.adornedObject=y)}if(x!==null){x.type===je.Link&&x.v(),this.bh("Selection",x);break t}}this.Jf("Selection")}for(B1(this,a),y=this.adornments;y.next();)y.value.La()}},ii.prototype.Wb=function(){var a=this.diagram;a!==null&&(a.vd=!0,!(this.G&16384)&&(this.G|=16384))};function Zm(a){a.G&16384&&(a.updateAdornments(),a.G&=-16385)}function B1(a,y){y.toolManager.mouseDownTools.each(function(x){x.isEnabled&&x.updateAdornments(a)}),y.toolManager.updateAdornments(a)}function v0(a){if(Zc(a)===!1){qm(a,!0),a.Uk();var y=a.diagram;y!==null&&(y.De.add(a),y.$b())}}function Ty(a){if(a.G|=2097152,Zc(a)!==!1){var y=a.position,x=a.location;x.w()&&y.w()||Qy(a,y,x),x=a.Ib;var E=Me.alloc().assign(x);x.ka(),x.x=y.x,x.y=y.y,x.freeze(),a.Xl(E,x),Me.free(E),qm(a,!1)}}ii.prototype.Ge=function(a,y,x,E){var b=this.uc;b.h(a,y,x,E),this.Lb===null&&(this.Lb=new Ei);var z=this.Lb;z.reset(),this.no(z,a,y,x,E),this.Lb=z,z.ws()||z.pp(b)},ii.prototype.no=function(a,y,x,E,b){if(this.Ca!==1&&a.scale(this.Ca),this.Kb!==0){var z=Ui;this.locationSpot.sb()&&(z=this.locationSpot);var tt=Ot.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),Ot.free(tt)}},ii.prototype.move=function(a,y){y===!0?this.location=a:this.position=a},ii.prototype.moveTo=function(a,y,x){a=Ot.allocAt(a,y),this.move(a,x),Ot.free(a)},ii.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())},ii.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())},ii.prototype.fb=function(a){if(this.name===a)return this;var y=this.Rh;if(y===null&&(this.Rh=y=new yn),y.I(a)!==null)return y.I(a);var x=je.prototype.fb.call(this,a);return x!==null?(y.set(a,x),x):(y.set(a,null),null)};function uc(a,y,x,E){E===void 0&&(E=new Ot),x=x.Mc()?Ui: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}ii.prototype.mi=function(a){return a===void 0&&(a=new Me),a.assign(this.actualBounds)},ii.prototype.Va=function(){this.measure(1/0,1/0),this.arrange()};function Iy(a){var y=Ot.alloc(),x=a.locationObject,E=x.naturalBounds,b=x instanceof Oi?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 Yf(a,y){var x=a.py;isNaN(a.ag)&&(a.ag=uy(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}ii.prototype.arrange=function(){if(ia(this)===!1)Ty(this);else{bA(this,!1);var a=this.Ib,y=Me.alloc();y.assign(a);var x=Jc(this);this.eh(0,0,this.uc.width,this.uc.height);var E=this.position;Qy(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()||oe.B(y.width,a.width)&&oe.B(y.height,a.height)||0<=this.vw&&this.C(16),Me.free(y),qm(this,!1)}},Pt=ii.prototype,Pt.Xl=function(a,y){var x=this.diagram;if(x!==null){var E=!1;if(x.Zi===!1&&a.w()){var b=Me.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),Me.free(b)}!(this.G&65536)&&a.D(y)||Oy(this,E,x),x.N(),!a.w()&&!y.w()||ao(a,y)||(this instanceof gn&&!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&&Ny(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 Ot(E.x+(a.x-y),E.y+(a.y-x)),this.g("location",E,this.ke.copy())),Zc(this)===!1&&ia(this)===!1&&(v0(this),Ty(this)),!0};function Ny(a,y,x,E,b){y===null||a instanceof Sr||(y=y.animationManager,y.zb&&Pf(y,a,new Ot(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;Zc(this)||ia(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)}v0(this)},Pt.Av=function(){this.G&=-2097153,v0(this)};function Qy(a,y,x){var E=Iy(a),b=a.diagram,z=x.w(),tt=y.w();z&&tt?a.G&2097152?Uy(a,y,x,b,E):Dy(a,y,x,b,E):z?Uy(a,y,x,b,E):tt&&Dy(a,y,x,b,E),a.G|=2097152,Ot.free(E),a.Uk()}function Uy(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 Sr||Pf(x,a,new Ot(z,tt),y),E||y.x===z&&y.y===tt||a.g("position",new Ot(z,tt),y.copy()))}function Dy(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 Oy(a,y,x){$m(a,!1),a instanceof gn&&hA(x,a),a.layer.isTemporary||y||x.Ya(),y=a.Ib;var E=x.viewportBounds;E.w()?Jc(a)?(Da(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 Jm(a,y,x,E){y.constructor===a.constructor||Gy||(Gy=!0,wn('Should not change the class of the Part when changing category from "'+x+'" to "'+E+'"'),wn(" Old class: "+Zn(a.constructor)+", new class: "+Zn(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,at=!1;a instanceof gn&&(rt=a.isTreeLeaf,ot=a.isTreeExpanded,at=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 gn&&(a.U=rt?a.U|4:a.U&-5,a.U=ot?a.U|1:a.U&-2,a.U=at?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)}ii.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},ii.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},ii.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},ii.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},ii.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},ii.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},ii.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},ii.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},ii.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 Zc(a){return(a.G&32768)!==0}function qm(a,y){a.G=y?a.G|32768:a.G&-32769}function $m(a,y){a.G=y?a.G|65536:a.G&-65537}function Jc(a){return(a.G&131072)!==0}Pt=ii.prototype,Pt.Fd=function(a){this.G=a?this.G|131072:this.G&-131073};function y0(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&&!ia(this)&&!Zc(this)&&this.isVisible()&&this.Ib.w()&&a.N(Yf(this,this.Ib))},Pt.v=function(){je.prototype.v.call(this);var a=this.diagram;a!==null&&(a.De.add(this),this instanceof gn&&this.labeledLink!==null&&es(this.labeledLink),a.$b(!0))},Pt.Vo=function(a){a||(a=this.Ah,a!==null&&ov(a,this))},Pt.Wo=function(a){a||(a=this.Ah,a!==null&&sv(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 tv(this,this)};function tv(a,y){var x=y.containingGroup;return x!==null?1+tv(a,x):y instanceof gn&&(y=y.labeledLink,y!==null)?tv(a,y):0}Pt.sz=function(){return Hy(this,this)};function Hy(a,y){var x=y.containingGroup;return x!==null||y instanceof gn&&(x=y.labeledLink,x!==null)?Hy(a,x):y}Pt.Td=function(a){return a instanceof Ti?ev(this,this,a):!1};function ev(a,y,x){if(y===x||x===null)return!1;var E=y.containingGroup;return E===null||E!==x&&!ev(a,E,x)?y instanceof gn&&(y=y.labeledLink,y!==null)?ev(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 Ti&&y0(y,!0),y instanceof gn){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 gn&&(a=y.labeledLink,a!==null&&(y=a)),y=y.containingGroup}for(y=this;y!==null;)y instanceof Ti&&y0(y,!1),y instanceof gn&&(a=y.labeledLink,a!==null&&(y=a)),y=y.containingGroup;return x},ii.prototype.canLayout=function(){if(!this.isLayoutPositioned||!this.isVisible())return!1;var a=this.layer;return!(a!==null&&a.isTemporary||this instanceof gn&&this.isLinkLabel)},ii.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 gn&&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 Ry(a){return a.isVisible()?(a=a.layer,!(a!==null&&a.isTemporary)):!1}function qc(a,y,x,E,b,z){if(z===void 0&&(z=null),!(a.contains(y)||z!==null&&!z(y)||y instanceof Sr)){if(a.add(y),y instanceof gn){if(x&&y instanceof Ti)for(var tt=y.memberParts;tt.next();)qc(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,at=rt.toNode;ot=ot===null||a.contains(ot),at=at===null||a.contains(at),(b?ot&&at:ot||at)&&qc(a,rt,x,E,b,z)}}if(1<E)for(y=y.Ou();y.next();)qc(a,y.value,x,E-1,b,z)}else if(y instanceof en)for(y=y.labelNodes;y.next();)qc(a,y.value,x,E,b,z)}}We.Object.defineProperties(ii.prototype,{key:{get:function(){var a=this.diagram;if(a!==null)return a.model.wa(this.data)}},adornments:{get:function(){return this.Qf===null?or: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(ts,"parts",y,this,null,E,!0),E=a.oi(99999999,this,!0),y.visible!==a.visible&&this.Zb(a.visible),0<=E&&x.cb(Uo,"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&&(Va(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 Sr?this.type!==je.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:br},set:function(a){var y=this.minLocation;y.D(a)||(a=a.J(),Va(this),this.P.Pq=a,this.g("minLocation",y,a))}},maxLocation:{get:function(){return this.P!==null?this.P.Kq:zr},set:function(a){var y=this.maxLocation;y.D(a)||(a=a.J(),Va(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&&(Va(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:vr},set:function(a){var y=this.locationSpot;y.D(a)||(a=a.J(),Va(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,ia(this)===!1&&(v0(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)),Ny(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 Sr)){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 Sr?this instanceof Sr&&(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&&(Yl(x),x=x.copy(),x!==null&&Jm(this,x,y,a))):(z!==null&&z.jm(E,a),x=cw(x.partManager,E,a),x!==null&&(Yl(x),x=x.copy(),x===null||x instanceof en||(E=this.location.copy(),Jm(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){Jm(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&&(Va(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&&(Va(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&&(Va(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&&(Va(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&&(Va(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&&(Va(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:Ho},set:function(a){var y=this.resizeCellSize;y.D(a)||(a=a.J(),Va(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&&(Va(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&&(Va(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:is},set:function(a){var y=this.rotationSpot;y.D(a)||(a=a.J(),Va(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&&Yt("Cannot make a Group a member of itself: "+this.toString()),Yt("Cannot make a Group indirectly contain itself: "+this.toString()+" already contains "+a.toString())),this.C(2);var x=this.diagram;if(y!==null?sv(y,this):this instanceof Ti&&x!==null&&x.ai.remove(this),this.Ah=a,a!==null?ov(a,this):this instanceof Ti&&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 Ti){for(x=new le,qc(x,this,!0,0,!0),x=x.iterator;x.next();)if(E=x.value,E instanceof gn)for(E=E.linksConnected;E.next();)Pg(E.value)}if(this instanceof gn){for(x=this.linksConnected;x.next();)Pg(x.value);x=this.labeledLink,x!==null&&Pg(x)}this.g("containingGroup",y,a),a!==null&&(y=a.layer,y!==null&&Lf(y,-1,a))}}else Yt("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&&(Va(this),this.P.Kp=a,this.g("containingGroupChanged",y,a))}},isTopLevel:{get:function(){return!(this.containingGroup!==null||this instanceof gn&&this.labeledLink!==null)}},layoutConditions:{get:function(){return this.P!==null?this.P.Cq:127},set:function(a){var y=this.layoutConditions;y!==a&&(Va(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&&(Va(this),this.P.Up=a,this.g("dragComputation",y,a))}},shadowOffset:{get:function(){return this.P!==null?this.P.zr:xr},set:function(a){var y=this.shadowOffset;y.D(a)||(a=a.J(),Va(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&&(Va(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&&(Va(this),this.P.Vg=a,this.N(),this.g("shadowBlur",y,a))}}}),ii.prototype.invalidateLayout=ii.prototype.C,ii.prototype.findCommonContainingGroup=ii.prototype.px,ii.prototype.isMemberOf=ii.prototype.Td,ii.prototype.findTopLevelPart=ii.prototype.sz,ii.prototype.findSubGraphLevel=ii.prototype.oz,ii.prototype.ensureBounds=ii.prototype.Va,ii.prototype.getDocumentBounds=ii.prototype.mi,ii.prototype.findObject=ii.prototype.fb,ii.prototype.moveTo=ii.prototype.moveTo,ii.prototype.invalidateAdornments=ii.prototype.Wb,ii.prototype.clearAdornments=ii.prototype.Ej,ii.prototype.removeAdornment=ii.prototype.Jf,ii.prototype.addAdornment=ii.prototype.bh,ii.prototype.findAdornment=ii.prototype.Pj,ii.prototype.updateTargetBindings=ii.prototype.La;var Gy=!1;ii.className="Part",ii.LayoutNone=0,ii.LayoutAdded=1,ii.LayoutRemoved=2,ii.LayoutShown=4,ii.LayoutHidden=8,ii.LayoutNodeSized=16,ii.LayoutGroupLayout=32,ii.LayoutNodeReplaced=64,ii.LayoutStandard=127,ii.LayoutAll=16777215;function Sr(a,y){a===void 0||a instanceof kr||typeof a=="string"?ii.call(this,a):(ii.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)}Le(Sr,ii),Sr.prototype.toString=function(){var a=this.adornedPart;return"Adornment("+this.category+")"+(a!==null?a.toString():"")},Sr.prototype.updateRelationshipsFromData=function(){},Sr.prototype.Ul=function(a){var y=this.adornedObject,x=y==null?void 0:y.part;if(x instanceof en&&y instanceof Oi){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 Oi&&(b.ua=a)}}},Sr.prototype.si=function(){var a=this.ue;return a===null?!0:(a=a.part,a===null||!ia(a))},Sr.prototype.Zc=function(){return!1},Sr.prototype.gk=function(a,y,x,E,b,z,tt){if(a===Uo&&y==="elements"){if(b instanceof Ma)this.$a===null&&(this.$a=b);else if(b instanceof je){var rt=b.Nl(function(ot){return ot instanceof Ma});rt instanceof Ma&&this.$a===null&&(this.$a=rt)}}else a===ts&&y==="elements"&&this.$a!==null&&(E===this.$a?this.$a=null:E instanceof je&&this.$a.rg(E)&&(this.$a=null));ii.prototype.gk.call(this,a,y,x,E,b,z,tt)},Sr.prototype.updateAdornments=function(){},Sr.prototype.Lj=function(){},We.Object.defineProperties(Sr.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}}}),Sr.className="Adornment";function nv(){this.nc=!1,this.Vr=this.gj=this.Eq=this.Dq=null,this.yp=Hs,this.er=x0,this.Kr=this.ij=this.Nq=this.Mq=null}nv.prototype.copy=function(){var a=new nv;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 gn(a,y){a===void 0||a instanceof kr||typeof a=="string"?ii.call(this,a):(ii.call(this),a&&(y=a)),this.U=13,this.Ba=null,this.jb=new Vt,this.wc=this.af=this.Yk=null,this.ci=!1,y&&Object.assign(this,y)}Le(gn,ii),gn.prototype.cloneProtected=function(a){ii.prototype.cloneProtected.call(this,a),a.U=this.U,this.Ba!==null&&(a.Ba=this.Ba.nc?this.Ba:this.Ba.copy())},Pt=gn.prototype,Pt.Af=function(a){ii.prototype.Af.call(this,a),a.Bd(),a.af=this.af,a.wc=null};function hc(a){a.Ba===null?a.Ba=new nv:a.Ba.nc&&(a.Ba=a.Ba.copy())}Pt.th=function(){ii.prototype.th.call(this),this.Ba!==null&&(this.Ba.nc=!0)};function zy(a,y){y!==null&&(a.af===null&&(a.af=new le),a.af.add(y))}function Ky(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=Ky(this,a,y,x),a!==null&&a.Sl()},Pt.gk=function(a,y,x,E,b,z,tt){a===Uo&&y==="elements"?this.wc=null:a===ts&&y==="elements"&&(this.wc=null),ii.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)||(pl(x.fromPort),pl(x.toPort),x.bb())}};function jy(a,y){for(a=a.linksConnected;a.next();){var x=a.value;(x.fromPort===y||x.toPort===y)&&(pl(x.fromPort),pl(x.toPort),x.bb())}}function pl(a){if(a!==null){var y=a.Zn;y!==null&&y.Sl(),a=a.part,y=a.containingGroup,y===null||a.isVisible()||pl(y.port)}}Pt.si=function(){return!0},gn.prototype.getAvoidableRect=function(a){return a.set(this.actualBounds),a.Co(this.avoidableMargin),a},gn.prototype.findVisibleNode=function(){for(var a=this;a!==null&&!a.isVisible();)a=a.containingGroup;return a},gn.prototype.isVisible=function(){if(!ii.prototype.isVisible.call(this))return!1;var a=!0,y=Iu,x=this.diagram;if(x!==null&&(a=x.isTreePathToChildren,y=x.treeCollapsePolicy),y===Iu){if(a=this.pg(),a!==null&&!a.isTreeExpanded)return!1}else if(y===Xo){if(a=a?this.Oo():this.Po(),0<a.count&&a.all(function(E){return!E.isTreeExpanded}))return!1}else if(y===$A&&(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},gn.prototype.Zb=function(a){ii.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)}},gn.prototype.qx=function(){var a=new le,y=new le;return Vy(this,this,a,y),y.iterator};function Vy(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)&&Vy(a,b?tt.toNode:tt.fromNode,x,E):E.add(tt)})}}gn.prototype.findLinksConnected=function(a){if(a===void 0&&(a=null),a===null)return this.jb.iterator;var y=new Jt(this.jb),x=this;return y.predicate=function(E){return E.fromNode===x&&E.fromPortId===a||E.toNode===x&&E.toPortId===a},y},Pt=gn.prototype,Pt.Mo=function(a){a===void 0&&(a=null);var y=new Jt(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 Jt(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 le,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 le,y.add(x),y.add(b)):x=b)}return y!==null?y.iterator:x!==null?new cr(x):or},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 le,y.add(x),y.add(b)):x=b)}return y!==null?y.iterator:x!==null?new cr(x):or},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 le,y.add(x),y.add(b)):x=b)}return y!==null?y.iterator:x!==null?new cr(x):or},Pt.jz=function(a,y,x){y===void 0&&(y=null),x===void 0&&(x=null);var E=new Jt(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 Jt(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 w0(a,y,x){pl(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 S0(a,y,x){pl(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)):hp(y)))}function hp(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}}}gn.prototype.updateRelationshipsFromData=function(){var a=this.diagram;a!==null&&a.partManager.updateRelationshipsFromData(this)},Pt=gn.prototype,Pt.Vo=function(a){ii.prototype.Vo.call(this,a),a||(hp(this),a=this.Yk,a!==null&&tw(a,this))},Pt.Wo=function(a){ii.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,ii.prototype.Lj.call(this)},Pt.ns=function(a){if(this.wc===null){if(a===""&&this.Te===!1)return this;_y(this)}var y=this.wc.I(a);return y!==null||a!==""&&(y=this.wc.I(""),y!==null)?y:this};function _y(a){a.wc===null?a.wc=new yn:a.wc.clear(),a.qm(a,function(y,x){Wy(y,x)}),a.wc.count===0&&a.wc.add("",a)}function Wy(a,y){var x=y.portId;x!==null&&a.wc!==null&&a.wc.add(x,y)}function iv(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=Qn()),x.push(E);if(x!==null){for(a=0;a<x.length;a++)y.remove(x[a]);Dn(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;)y0(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;)y0(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 gn)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 le;return a(this,y),y},Pt.uz=function(){return Yy(this,this)};function Yy(a,y){return y=y.pg(),y===null?0:1+Yy(a,y)}Pt.Qo=function(){var a=!0,y=this.diagram;y!==null&&(a=y.isTreePathToChildren),y=new Jt(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 Vt,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 Vt,y.add(x),y.add(a)):x=a);return y!==null?y.iterator:x!==null?new cr(x):or},Pt.wz=function(a){a===void 0&&(a=1/0);var y=new le;return qc(y,this,!1,a,!0),y},gn.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 le;x.add(this),Xy(this,x,y.isTreePathToChildren,a,y,this,y.treeCollapsePolicy===Iu),y.Ue=!1}};function Xy(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),Xy(ot,y,x,E-1,b,z,tt)))}else Zy(a,y,x,b,z,tt)}function Zy(a,y,x,E,b,z){for(var tt=b===a?!0:a.isTreeExpanded,rt=x?a.Mo():a.Sd(),ot={};rt.next();){var at=rt.value;if(at.isTreeLink&&(at=at.To(a),at!==null&&at!==a)){var At=y.contains(at);if(At||y.add(at),tt){var ft=x?at.Oo():at.Po();ot.uv=a,ft.all(function(pt){return function(xt){return xt===pt.uv||!xt.isTreeExpanded}}(ot))&&E.Aj(at,b),at.oh(),at.Zb(!1)}at.isTreeExpanded&&(at.wasTreeExpanded=at.isTreeExpanded,At||Zy(at,y,x,E,b,z))}ot={uv:ot.uv}}a.isTreeExpanded=!1}gn.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 le;x.add(this),Jy(this,x,y.isTreePathToChildren,a,y,this,y.treeCollapsePolicy===Iu),y.Ue=!1}};function Jy(a,y,x,E,b,z,tt){for(var rt=z===a?!1:a.isTreeExpanded,ot=x?a.Mo():a.Sd(),at={};ot.next();){var At=ot.value;if(At.isTreeLink&&(rt||At.fd||At.bb(),At=At.To(a),At!==null&&At!==a&&!y.contains(At))){if(y.add(At),!rt){At.Zb(!0),At.oh();var ft=x?At.Oo():At.Po();at.vv=a,ft.all(function(pt){return function(xt){return xt===pt.vv||!xt.isTreeExpanded}}(at))&&b.Cj(At,z)}(2<E||At.wasTreeExpanded)&&(At.wasTreeExpanded=!1,Jy(At,y,x,E-1,b,z,tt))}at={vv:at.vv}}a.isTreeExpanded=!0}We.Object.defineProperties(gn.prototype,{portSpreading:{get:function(){return this.Ba!==null?this.Ba.er:x0},set:function(a){var y=this.portSpreading;y!==a&&(hc(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&&hA(x,this),this.g("avoidable",y,a)}}},avoidableMargin:{get:function(){return this.Ba!==null?this.Ba.yp:Hs},set:function(a){typeof a=="number"&&(a=new Xi(a));var y=this.avoidableMargin;if(!y.D(a)){a=a.J(),hc(this),this.Ba.yp=a;var x=this.diagram;x!==null&&hA(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&&(hc(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&&(hc(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&&(hc(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&&(tw(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&&_y(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&&(hc(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))}}}),gn.prototype.expandTree=gn.prototype.expandTree,gn.prototype.collapseTree=gn.prototype.collapseTree,gn.prototype.findTreeParts=gn.prototype.wz,gn.prototype.findTreeChildrenNodes=gn.prototype.Ou,gn.prototype.findTreeChildrenLinks=gn.prototype.Qo,gn.prototype.findTreeLevel=gn.prototype.uz,gn.prototype.findTreeParentChain=gn.prototype.vz,gn.prototype.findTreeParentNode=gn.prototype.pg,gn.prototype.findTreeParentLink=gn.prototype.kh,gn.prototype.findCommonTreeParent=gn.prototype.gz,gn.prototype.findTreeRoot=gn.prototype.xz,gn.prototype.isInTreeOf=gn.prototype.Nz,gn.prototype.findPort=gn.prototype.ns,gn.prototype.findLinksTo=gn.prototype.kz,gn.prototype.findLinksBetween=gn.prototype.jz,gn.prototype.findNodesInto=gn.prototype.Oo,gn.prototype.findNodesOutOf=gn.prototype.Po,gn.prototype.findNodesConnected=gn.prototype.Mu,gn.prototype.findLinksInto=gn.prototype.Sd,gn.prototype.findLinksOutOf=gn.prototype.Mo,gn.prototype.findExternalTreeLinksConnected=gn.prototype.qx,gn.prototype.invalidateConnectedLinks=gn.prototype.Bd,gn.prototype.invalidateLinkBundle=gn.prototype.Lz;var C1=new xe(gn,"SpreadingNone",10),x0=new xe(gn,"SpreadingEvenly",11),rv=new xe(gn,"SpreadingPacked",12);gn.className="Node",gn.SpreadingNone=C1,gn.SpreadingEvenly=x0,gn.SpreadingPacked=rv;function Ti(a,y){a===void 0||a instanceof kr||typeof a=="string"?gn.call(this,a):(gn.call(this),a&&(y=a)),this.U|=4608,this.Gn=new le,this.$a=null,this.Sc=new po,this.Sc.group=this,this.gl=new le,this.tb=this.$p=null,y&&Object.assign(this,y)}Le(Ti,gn),Ti.prototype.cloneProtected=function(a){gn.prototype.cloneProtected.call(this,a),this.U=this.U&-32769;var y=a.Nl(function(x){return x instanceof Ma});y instanceof Ma?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=Ti.prototype,Pt.Af=function(a){gn.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 gn)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===Uo&&y==="elements"){if(b instanceof Ma)this.$a===null?this.$a=b:this.$a!==b&&Yt("Cannot insert a second Placeholder into the visual tree of a Group.");else if(b instanceof je){var rt=b.Nl(function(ot){return ot instanceof Ma});rt instanceof Ma&&(this.$a===null?this.$a=rt:this.$a!==rt&&Yt("Cannot insert a second Placeholder into the visual tree of a Group."))}}else a===ts&&y==="elements"&&this.$a!==null&&(E===this.$a?this.$a=null:E instanceof je&&this.$a.rg(E)&&(this.$a=null));gn.prototype.gk.call(this,a,y,x,E,b,z,tt)},Pt.Xl=function(a,y){gn.prototype.Xl.call(this,a,y),this.isClipping&&this.type!==je.Spot&&this.isSubGraphExpanded&&(a=this.resizeObject,a instanceof je&&(a=a.Pb()),this.tb===null&&(this.tb=new Me),a.mi(this.tb),a instanceof Oi&&this.tb.Bc(-a.strokeWidth,-a.strokeWidth))},Pt.eh=function(a,y,x,E){this.nf=this.$a,gn.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()}),gn.prototype.Va.call(this)},Pt.si=function(){if(!gn.prototype.si.call(this))return!1;for(var a=this.memberParts;a.next();){var y=a.value;if(y instanceof gn){if(y.isVisible()&&ia(y))return!1}else if(y instanceof en&&y.isVisible()&&ia(y)&&y.fromNode!==this&&y.toNode!==this)return!1}return!0};function ov(a,y){if(a.Gn.add(y)){y instanceof Ti&&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 sv(a,y){if(a.Gn.remove(y)){y instanceof Ti&&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)}gn.prototype.Lj.call(this)},Ti.prototype.canAddMembers=function(a){var y=this.diagram;if(y===null)return!1;for(y=y.commandHandler,a=ke(a).iterator;a.next();)if(!y.isValidMember(this,a.value))return!1;return!0},Ti.prototype.addMembers=function(a,y){var x=this.diagram;if(x===null)return!1;x=x.commandHandler;var E=!0;for(a=ke(a).iterator;a.next();){var b=a.value;!y||x.isValidMember(this,b)?b.containingGroup=this:E=!1}return E},Ti.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=Ti.prototype,Pt.Bd=function(a){var y=(this.U&65536)!==0;if(gn.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()?(pl(x.fromPort),pl(x.toPort),x.bb()):(E=x.toNode,E!==null&&E!==this&&E.Td(this)&&!E.isVisible()&&(pl(x.fromPort),pl(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 le,E=y.iterator;E.next();){var b=E.value;if(b instanceof gn)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 le,x=a.iterator;x.next();){var E=x.value;if(E instanceof gn)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 le;return a(this,y),y},Pt.Rj=function(){var a=new le;return qc(a,this,!0,0,!0),a.remove(this),a},Pt.Zb=function(a){gn.prototype.Zb.call(this,a);for(var y=this.memberParts;y.next();)y.value.Zb(a)},Ti.prototype.collapseSubGraph=function(){var a=this.diagram;if(a!==null&&!a.Ue){a.Ue=!0;var y=this.Rj();qy(this,y,a,this),a.Ue=!1}};function qy(a,y,x,E){for(var b=a.memberParts;b.next();){var z=b.value;if(z.Zb(!1),z instanceof Ti&&z.isSubGraphExpanded&&(z.wasSubGraphExpanded=z.isSubGraphExpanded,qy(z,y,x,E)),z instanceof gn)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}Ti.prototype.expandSubGraph=function(){var a=this.diagram;if(a!==null&&!a.Ue){a.Ue=!0;var y=this.Rj();$y(this,y,a,this),a.Ue=!1}};function $y(a,y,x,E){for(var b=a.memberParts;b.next();){var z=b.value;if(z.Zb(!0),z instanceof Ti&&z.wasSubGraphExpanded&&(z.wasSubGraphExpanded=!1,$y(z,y,x,E)),z instanceof gn)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}Ti.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=Ot.alloc(),gn.prototype.move.call(this,a,y),a=new le,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 gn&&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(),lv(b)&&b.bb());Ot.free(z)}},We.Object.defineProperties(Ti.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&&Yt("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&&(hc(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&&(hc(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&&(hc(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&&(hc(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)}}}),Ti.prototype.expandSubGraph=Ti.prototype.expandSubGraph,Ti.prototype.collapseSubGraph=Ti.prototype.collapseSubGraph,Ti.prototype.findSubGraphParts=Ti.prototype.Rj,Ti.prototype.findContainingGroupChain=Ti.prototype.hz,Ti.prototype.findExternalNodesConnected=Ti.prototype.iz,Ti.prototype.findExternalLinksConnected=Ti.prototype.Lu,Ti.prototype.ensureBounds=Ti.prototype.Va,Ti.className="Group";function Ma(a){re.call(this),this.yb=Wa,this.ko=new Me(NaN,NaN,NaN,NaN),a&&Object.assign(this,a)}Le(Ma,re),Ma.prototype.cloneProtected=function(a){re.prototype.cloneProtected.call(this,a),a.yb=this.yb.J(),a.ko=this.ko.copy()},Ma.prototype.gh=function(a){if(this.background===null&&this.areaBackground===null)return!1;var y=this.naturalBounds;return Ro(0,0,y.width,y.height,a.x,a.y)},Ma.prototype.Wl=function(){var a=this.part;if(a!==null&&(a instanceof Ti||a instanceof Sr)||Yt("Placeholder is not inside a Group or Adornment."),a instanceof Ti){var y=this.computeBorder(this.ko),x=this.minSize,E=this.dc;for(ho(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=Ot.alloc(),x.xi(y,a.locationSpot),x.D(a.location)||(a.location=x),Ot.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 Oi&&(tt=z.strokeWidth);var rt=z.Df(),ot=z.naturalBounds,at=(ot.width+tt)*rt;tt=(ot.height+tt)*rt,a.type!==je.Link&&(rt=z.ga(a.category==="Selection"?vr:a.locationSpot,Ot.alloc()),a.location=rt,Ot.free(rt)),isNaN(at)||isNaN(tt)?(a=z.ga(vr,Ot.alloc()),at=Me.allocAt(a.x,a.y,0,0),at.Ye(z.ga(Go,a)),at.Ye(z.ga(Dr,a)),at.Ye(z.ga(ea,a)),ho(y,at.width+E||0,at.height+b||0),this.Ge(-x.left,-x.top,y.width,y.height),Ot.free(a),Me.free(at)):(ho(y,at+E||0,tt+b||0),this.Ge(-x.left,-x.top,y.width,y.height))}},Ma.prototype.eh=function(a,y,x,E){this.actualBounds.h(a,y,x,E)},Ma.prototype.computeBorder=function(a){var y=this.part,x=y.diagram,E=x===null||!x.animationManager.isAnimating;if(x!==null&&y instanceof Ti&&!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=Me.alloc(),b=this.computeMemberBounds(x);var z=this.yb;return y instanceof Ti&&!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)),Me.free(x),E&&y instanceof Ti&&y.computesBoundsIncludingLocation&&y.location.w()&&a.Ye(y.location),a},Ma.prototype.computeMemberBounds=function(a){if(!(this.part instanceof Ti))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||tl(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},We.Object.defineProperties(Ma.prototype,{padding:{get:function(){return this.yb},set:function(a){typeof a=="number"&&(a=new Xi(a));var y=this.yb;y.D(a)||(this.yb=a=a.J(),this.g("padding",y,a),this.v())}}}),Ma.className="Placeholder";function en(a){ii.call(this,je.Link),this.Qa=8,this.ef=null,this.ff="",this.uf=this.gn=null,this.vf="",this.uo=null,this.qk=ka,this.Om=0,this.Qm=ka,this.Rm=NaN,this.qj=hv,this.po=.5,this.wd=null,this.Nb=new Vt().freeze(),this.Tg=this.Mg=null,this.ml=new Me,this.ua=new qe,this.u=this.o=this.Sf=this.Wf=null,this.su=new Ot,this.cq=this.Mw=this.Lw=null,this.vt=NaN,this.ba=null,this.j=[],a&&Object.assign(this,a)}Le(en,ii),en.prototype.cloneProtected=function(a){ii.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){ii.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&&pl(y),a=a.toPort,a!==null&&pl(a)},Pt.qb=function(a){a.classType===en?(a.value&2)===2?this.routing=a:a===kl||a===fc||a===Lg?this.curve=a:a===dp||a===E0||a===M0?this.adjusting=a:a!==hv&&a!==ka&&Yt("Unknown Link enum value for a Link property: "+a):ii.prototype.qb.call(this,a)},Pt.Xc=function(){this.ba===null&&(this.ba=new Td)},Pt.si=function(){var a=this.fromNode;if(a!==null){var y=a.findVisibleNode();if(y!==null&&(a=y),ia(a)||Zc(a))return!1}return a=this.toNode,!(a!==null&&(y=a.findVisibleNode(),y!==null&&(a=y),ia(a)||Zc(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 ka:a=0;break;case gp:a=y;break;case pp:a=y+90;break;case mp:a=y-90;break;case cv:a=y+180;break;case k0:a=oe.bp(y),90<a&&270>a&&(a-=180);break;case vp:a=oe.bp(y+90),90<a&&270>a&&(a-=180);break;case yp:a=oe.bp(y-90),90<a&&270>a&&(a-=180);break;case b0:if(a=oe.bp(y),45<a&&135>a||225<a&&315>a)return 0;90<a&&270>a&&(a-=180)}return oe.bp(a)};function Pg(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&&sv(x,a),a.Ah=y,y!==null&&ov(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&&ii.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 tw(a,y){a.wd===null&&(a.wd=new le),a.wd.add(y),a.v()}Pt.Vo=function(a){if(ii.prototype.Vo.call(this,a),Xf(this)&&this.Xo(this.actualBounds),!a){a=this.ef;var y=null;a!==null&&(y=this.fromPort,w0(a,this,y));var x=this.uf;if(x!==null){var E=this.toPort;x===a&&E===y||w0(x,this,E)}cp(this)}},Pt.Wo=function(a){if(ii.prototype.Wo.call(this,a),Xf(this)&&this.Xo(this.actualBounds),!a){a=this.ef;var y=null;a!==null&&(y=this.fromPort,S0(a,this,y));var x=this.uf;if(x!==null){var E=this.toPort;x===a&&E===y||S0(x,this,E)}fp(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?ii.prototype.move.call(this,a,!1):(a=Ot.allocAt(x.x+E,x.y+b),ii.prototype.move.call(this,a,!1),Ot.free(a)),cc(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(ki),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()===kl))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()===kl){if(y===3){x=this.i(0),E=this.i(1);var b=this.i(2);return oe.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),oe.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()===kl))return this.ua.wx(.5);if(this.computeCurve()===kl&&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),oe.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 Ot(y,x))},Pt.Kz=function(a,y){this.Nb.Gb(a,y)},Pt.m=function(a,y,x){this.Nb.Gb(a,new Ot(y,x))},Pt.ne=function(a){this.Nb.add(a)},Pt.yf=function(a,y){this.Nb.add(new Ot(a,y))},Pt.pv=function(a){this.Nb.mb(a)},Pt.Fj=function(){this.Nb.clear()};function cc(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 Vt,z=a.Nb.iterator;z.next();){var tt=z.value;b.add(new Ot(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?B0(a):(a.defaultFromPoint&&(a.defaultFromPoint=a.i(0)),a.defaultToPoint&&(a.defaultToPoint=a.i(a.pointsCount-1))),tt!==null&&tt.animationManager.zb&&sh(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,at=ot.length,At=0;At<at;At++){var ft=ot[At];tt=Math.min(ft.x,tt),rt=Math.min(ft.y,rt),ft.freeze()}if(y.freeze(),at===z){for(z=0;z<at;z++)if(At=b[z],ft=ot[z],At.x-x!==ft.x-tt||At.y-E!==ft.y-rt){this.qc();break}}else this.qc();this.Mg=null,x=this.diagram,x!==null&&x.animationManager.zb&&sh(x.animationManager,this,y),B0(this),this.g("points",a,y)}},Pt.rv=function(){this.Mg!==null&&(this.Nb=this.Mg,this.Mg=null)};function B0(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),L0(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?(Rd||(Rd=new gn,Rd.desiredSize=nr,Rd.Va()),this.defaultFromPoint&&(Rd.location=this.defaultFromPoint,Rd.Va(),y=a=Rd)):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?(Gd||(Gd=new gn,Gd.desiredSize=nr,Gd.Va()),this.defaultToPoint&&(Gd.location=this.defaultToPoint,Gd.Va(),b=E=Gd)):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=Fg(tt),ot=Fg(x),at=y===b&&y!==null,At=this.isOrthogonal,ft=this.curve===kl;this.Wf=at&&!At?ft=!0:!1;var pt=this.computeAdjusting()===ka||at;if(!At&&!at&&rt&&ot){if(rt=!1,!pt&&3<=z&&(pt=this.getLinkPoint(a,y,tt,!0,!1,E,b),ot=this.getLinkPoint(E,b,x,!1,!1,a,y),rt=this.adjustPoints(0,pt,z-1,ot))&&(pt=this.getLinkPoint(a,y,tt,!0,!1,E,b),ot=this.getLinkPoint(E,b,x,!1,!1,a,y),this.adjustPoints(0,pt,z-1,ot)),!rt)if(this.Fj(),ft){z=this.getLinkPoint(a,y,tt,!0,!1,E,b),pt=this.getLinkPoint(E,b,x,!1,!1,a,y),rt=pt.x-z.x,ot=pt.y-z.y,at=this.computeCurviness(),ft=At=0;var xt=z.x+rt/3,Bt=z.y+ot/3,Mt=xt,Gt=Bt;oe.B(ot,0)?Gt=0<rt?Gt-at:Gt+at:(At=-rt/ot,ft=Math.sqrt(at*at/(At*At+1)),0>at&&(ft=-ft),Mt=(0>ot?-1:1)*ft+xt,Gt=At*(Mt-xt)+Bt),xt=z.x+2*rt/3,Bt=z.y+2*ot/3;var Dt=xt,_t=Bt;oe.B(ot,0)?_t=0<rt?_t-at:_t+at:(Dt=(0>ot?-1:1)*ft+xt,_t=At*(Dt-xt)+Bt),this.Fj(),this.ne(z),this.yf(Mt,Gt),this.yf(Dt,_t),this.ne(pt),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,pt=b,E=this.getLinkPoint(a,y,tt,!0,!1,z,pt),b=this.getLinkPoint(z,pt,x,!1,!1,a,y),this.hasCurviness()?(pt=b.x-E.x,x=b.y-E.y,tt=this.computeCurviness(),a=E.x+pt/2,y=E.y+x/2,z=a,rt=y,oe.B(x,0)?rt=0<pt?rt-tt:rt+tt:(pt=-pt/x,z=Math.sqrt(tt*tt/(pt*pt+1)),0>tt&&(z=-z),z=(0>x?-1:1)*z+a,rt=pt*(z-a)+y),this.ne(E),this.yf(z,rt),this.ne(b)):(this.ne(E),this.ne(b),rt=Me.alloc(),y.mi(rt),ot=rt.ca(b),pt.mi(rt),at=rt.ca(E),(ot||at)&&(tt=y.ga(P0(tt),new Ot),this.dd(0,this.getLinkPointFromPoint(a,y,tt,b,!0,tt)),x=pt.ga(P0(x),new Ot),this.dd(1,this.getLinkPointFromPoint(z,pt,x,E,!1,x))),Me.free(rt))}else{ft=this.isAvoiding,pt&&(At&&ft||at)&&this.Fj();var Zt=at?this.computeCurviness():0;ft=this.getLinkPoint(a,y,tt,!0,At,E,b),xt=Mt=Bt=0,(At||!rt||at)&&(Gt=this.computeEndSegmentLength(a,y,tt,!0),xt=this.getLinkDirection(a,y,ft,tt,!0,At,E,b),at&&(rt||tt.D(x)||!At&&tt.x+x.x===1&&tt.y+x.y===1)&&(xt-=At?90:30,0>Zt&&(xt-=180)),0>xt?xt+=360:360<=xt&&(xt-=360),at&&(Gt+=Math.abs(Zt)*(At?1:2)),xt===0?Bt=Gt:xt===90?Mt=Gt:xt===180?Bt=-Gt:xt===270?Mt=-Gt:(Bt=Gt*Math.cos(xt*Math.PI/180),Mt=Gt*Math.sin(xt*Math.PI/180)),tt.Mc()&&at&&(Gt=y.ga(Ui,Ot.alloc()),Dt=Ot.allocAt(Gt.x+1e3*Bt,Gt.y+1e3*Mt),this.getLinkPointFromPoint(a,y,Gt,Dt,!0,ft),Ot.free(Gt),Ot.free(Dt))),Gt=this.getLinkPoint(E,b,x,!1,At,a,y);var te=_t=Dt=0;if(At||!ot||at){var ie=this.computeEndSegmentLength(E,b,x,!1);te=this.getLinkDirection(E,b,Gt,x,!1,At,a,y),at&&(ot||tt.D(x)||!At&&tt.x+x.x===1&&tt.y+x.y===1)&&(te+=At?0:30,0>Zt&&(te+=180)),0>te?te+=360:360<=te&&(te-=360),at&&(ie+=Math.abs(Zt)*(At?1:2)),te===0?Dt=ie:te===90?_t=ie:te===180?Dt=-ie:te===270?_t=-ie:(Dt=ie*Math.cos(te*Math.PI/180),_t=ie*Math.sin(te*Math.PI/180)),x.Mc()&&at&&(x=b.ga(Ui,Ot.alloc()),tt=Ot.allocAt(x.x+1e3*Dt,x.y+1e3*_t),this.getLinkPointFromPoint(E,b,x,tt,!1,Gt),Ot.free(x),Ot.free(tt))}x=ft,(At||!rt||at)&&(x=new Ot(ft.x+Bt,ft.y+Mt)),tt=Gt,(At||!ot||at)&&(tt=new Ot(Gt.x+Dt,Gt.y+_t)),!pt&&!At&&rt&&3<z&&this.adjustPoints(0,ft,z-2,tt)?this.dd(z-1,Gt):!pt&&!At&&ot&&3<z&&this.adjustPoints(1,x,z-1,Gt)?this.dd(0,ft):!pt&&(At?6<=z:4<z)&&this.adjustPoints(1,x,z-2,tt)?(this.dd(0,ft),this.dd(z-1,Gt)):(this.Fj(),this.ne(ft),(At||!rt||at)&&this.ne(x),At&&this.addOrthoPoints(x,xt,tt,te,a,E),(At||!ot||at)&&this.ne(tt),this.ne(Gt))}return!0};function av(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 Ot),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,at=a.m11*b,At=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+At,E=E.x*rt+E.y*at+ft,tt=x.x*tt+x.y*ot+At,x=x.x*rt+x.y*at+ft}return y.Sj(b,E,tt,x,z),a!==null&&z.transform(a),z};function C0(a,y){var x=y.Zn;return x===null&&(x=new zd,x.port=y,x.node=y.part,y.Zn=x),lw(x,a)}en.prototype.getLinkPoint=function(a,y,x,E,b,z,tt,rt){if(rt===void 0&&(rt=new Ot),x.sb()&&!Fg(x))return y.ga(x,rt),rt;if(x.$c()){var ot=C0(this,y);if(ot!==null){if(rt.assign(ot.Zo),b&&this.routing===nw){var at=C0(this,tt);if(at!==null&&ot.Gl<at.Gl){ot=Ot.alloc(),at=Ot.alloc();var At=new Me(y.ga(vr,ot),y.ga(Go,at)),ft=this.computeSpot(!E,tt);a=this.getLinkPoint(z,tt,ft,!E,b,a,y,at),(x.Hf(bs)||x.Hf(ca))&&a.y>=At.y&&a.y<=At.y+At.height?rt.y=a.y:(x.Hf(_s)||x.Hf(Ws))&&a.x>=At.x&&a.x<=At.x+At.width&&(rt.x=a.x),Ot.free(ot),Ot.free(at)}}return rt}}return x=y.ga(P0(x),Ot.alloc()),this.pointsCount>(b?6:2)?(tt=E?this.i(1):this.i(this.pointsCount-2),b&&(tt=av(x,tt.copy()))):(ot=this.computeSpot(!E,tt),z=Ot.alloc(),tt=tt.ga(P0(ot),z),b&&(tt=av(x,tt)),Ot.free(z)),this.getLinkPointFromPoint(a,y,x,tt,E,rt),Ot.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=C0(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(Ui,Ot.alloc()),this.pointsCount>(z?6:2)?(rt=b?this.i(1):this.i(this.pointsCount-2),rt=z?av(ot,rt.copy()):x):(x=Ot.alloc(),rt=rt.ga(Ui,x),Ot.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,Ot.free(ot),ot=x}return E.Mc()&&tt.Td(a)&&(ot+=180,360<=ot&&(ot-=360)),Fg(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=C0(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=Ui:(y=this.fromSpot,y.Xb()&&(y=a.fromSpot),a=y===is?$i:y)):(a=y||this.toPort,a===null?a=Ui:(y=this.toSpot,y.Xb()&&(y=a.toSpot),a=y===is?$i:y)),a};function Fg(a){return a===$i||a.x===.5&&a.y===.5}function P0(a){return a.x===.5&&a.y===.5?a:Ui}en.prototype.computeOtherPoint=function(a,y){return this.computeAdjusting()!==ka&&4<this.pointsCount?this.computeMidPoint(new Ot):(a=y.Zn,a=a!==null?lw(a,this):null,a!==null?a.Zo:y.ga(Ui))},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=Ei.alloc(),tt.reset()),tt.multiply(this.transform),this.fh(a,tt))return bm(this,y,x,b),z===void 0&&Ei.free(tt),!0;if(this.Yc(a,tt)){var rt=!1;if(!this.isAtomic)for(var ot=this.O.s,at=ot.length;at--;){var At=ot[at];if(At.visible||At===this.locationObject){var ft=At.actualBounds,pt=this.naturalBounds;if(!(ft.x>pt.width||ft.y>pt.height||0>ft.x+ft.width||0>ft.y+ft.height)){if(ft=Ei.alloc(),ft.set(tt),At instanceof je)rt=At.Cf(a,y,x,E,b,ft);else if(this.path===At){if(At instanceof Oi)if(rt=a,pt=E,At.pickable===!1)rt=!1;else if(ft.multiply(At.transform),pt)t:{var xt=rt,Bt=ft;if(At.fh(xt,Bt))rt=!0;else{if(Bt===void 0&&(Bt=At.transform,xt.Re(At.actualBounds))){rt=!0;break t}rt=xt.left,pt=xt.right;var Mt=xt.top;xt=xt.bottom;var Gt=Ot.alloc(),Dt=Ot.alloc(),_t=Ot.alloc(),Zt=Ei.alloc();Zt.set(Bt),Zt.bv(At.transform),Zt.Vj(),Dt.x=pt,Dt.y=Mt,Dt.transform(Zt),Gt.x=rt,Gt.y=Mt,Gt.transform(Zt),Bt=!1,Wf(At,Gt,Dt,_t)?Bt=!0:(Gt.x=pt,Gt.y=xt,Gt.transform(Zt),Wf(At,Gt,Dt,_t)?Bt=!0:(Dt.x=rt,Dt.y=xt,Dt.transform(Zt),Wf(At,Gt,Dt,_t)?Bt=!0:(Gt.x=rt,Gt.y=Mt,Gt.transform(Zt),Wf(At,Gt,Dt,_t)&&(Bt=!0)))),Ei.free(Zt),Ot.free(Gt),Ot.free(Dt),Ot.free(_t),rt=Bt}}else rt=At.fh(rt,ft)}else rt=cs(At,a,E,ft);rt&&(pt=At,y!==null&&(pt=y(At)),pt&&(x===null||x(pt))&&b.add(pt)),Ei.free(ft)}}}return z===void 0&&Ei.free(tt),rt||this.background!==null||this.areaBackground!==null}return z===void 0&&Ei.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?kl:this.curve},en.prototype.computeCorner=function(){if(this.curve===kl)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=rw;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===gp||E===k0||E===cv?a=Math.max(a,b):E===mp||E===yp||E===pp||E===vp?a=Math.max(a,tt):(y=y.ga(Ui).ab(x.ga(Ui))/180*Math.PI,a=Math.max(a,Math.abs(Math.sin(y)*tt)+Math.abs(Math.cos(y)*b)+1)),this.curve===kl&&(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()===ka&&x.bb()}},en.prototype.computeCurviness=function(){var a=this.curviness;if(isNaN(a)){a=iw;var y=this.Sf;if(y!==null){for(var x=Qn(),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),Dn(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===E0)return!1;b===M0&&(b=dp)}switch(b){case E0: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,at=Math.sqrt(rt*rt+ot*ot);if(!oe.$(at,0)){if(oe.$(rt,0))var At=0>ot?-Math.PI/2:Math.PI/2;else At=Math.atan(ot/Math.abs(rt)),0>rt&&(At=Math.PI-At);tt=y.x;var ft=y.y;rt=E.x-tt;var pt=E.y-ft;for(ot=Math.sqrt(rt*rt+pt*pt),oe.$(rt,0)?pt=0>pt?-Math.PI/2:Math.PI/2:(pt=Math.atan(pt/Math.abs(rt)),0>rt&&(pt=Math.PI-pt)),at=ot/at,At=pt-At,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),oe.$(y,0)||(oe.$(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+At,y*=at,this.L(a,tt+y*Math.cos(rt),ft+y*Math.sin(rt)));this.dd(x,E)}}return!0;case M0: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,at=(tt-b)*(tt-b)+(ft-z)*(ft-z),rt=y.x,At=y.y,ot=E.x,pt=E.y;var xt=1;if(ot-rt!==0){var Bt=(pt-At)/(ot-rt);xt=Math.sqrt(1+1/(Bt*Bt))}else Bt=9e9;for(this.dd(a,y),a+=1;a<x;a++){y=this.i(a);var Mt=y.x,Gt=y.y,Dt=.5;at!==0&&(Dt=((b-Mt)*(b-tt)+(z-Gt)*(z-ft))/at);var _t=b+Dt*(tt-b),Zt=z+Dt*(ft-z);y=Math.sqrt((Mt-_t)*(Mt-_t)+(Gt-Zt)*(Gt-Zt)),Gt<Bt*(Mt-_t)+Zt&&(y=-y),0<Bt&&(y=-y),Mt=rt+Dt*(ot-rt),Dt=At+Dt*(pt-At),Bt!==0?(y=Mt+y/xt,this.L(a,y,Dt-(y-Mt)/Bt)):this.L(a,Mt,Dt+y)}this.dd(x,E)}return!0;case dp:t:{if(this.isOrthogonal&&(b=this.i(a),z=this.i(a+1),tt=this.i(a+2),rt=z.x,At=z.y,ft=rt,at=At,oe.B(b.y,z.y)?oe.B(z.x,tt.x)?At=y.y:oe.B(z.y,tt.y)&&(rt=y.x):oe.B(b.x,z.x)&&(oe.B(z.y,tt.y)?rt=y.x:oe.B(z.x,tt.x)&&(At=y.y)),this.L(a+1,rt,At),b=this.i(x),z=this.i(x-1),tt=this.i(x-2),rt=z.x,At=z.y,ot=rt,pt=At,oe.B(b.y,z.y)?oe.B(z.x,tt.x)?At=E.y:oe.B(z.y,tt.y)&&(rt=E.x):oe.B(b.x,z.x)&&(oe.B(z.y,tt.y)?rt=E.x:oe.B(z.x,tt.x)&&(At=E.y)),this.L(x-1,rt,At),lv(this))){this.L(a+1,ft,at),this.L(x-1,ot,pt),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(wp,wp),ot.Bc(wp,wp),rt.Ye(a),ot.Ye(x);var at=Ot.alloc(),At=Ot.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?(at.h(x.x,a.y),At.h(x.x,(a.y+x.y)/2),E===180?(at.x=this.computeMidOrthoPosition(a.x,a.y,x.x,x.y,!1),At.x=at.x,At.y=x.y):E===270&&x.y<a.y||E===90&&x.y>a.y?(at.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,At.x=at.x,At.y=x.y):E===0&&a.x<ot.left&&a.y>ot.top&&a.y<ot.bottom&&(at.x=a.x,at.y=a.y<x.y?Math.min(x.y,ot.top):Math.max(x.y,ot.bottom),At.y=at.y)):(at.h(a.x,x.y),At.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))?at.y=this.computeMidOrthoPosition(a.x,a.y,x.x,x.y,!0):x.y<a.y&&(E===180||E===90)?at.y=this.computeMidOrthoPosition(a.x,rt.top,x.x,Math.max(x.y,ot.bottom),!0):x.y>a.y&&(E===180||E===270)&&(at.y=this.computeMidOrthoPosition(a.x,rt.bottom,x.x,Math.min(x.y,ot.top),!0)),At.x=x.x,At.y=at.y),at.y>rt.top&&at.y<rt.bottom&&(x.x>=rt.left&&x.x<=a.x||a.x<=ot.right&&a.x>=x.x?(E===90||E===270)&&(at.h(Math.max((a.x+x.x)/2,a.x),a.y),At.h(at.x,x.y)):(at.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)),At.x=x.x,At.y=at.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?(at.h(x.x,a.y),At.h(x.x,(a.y+x.y)/2),E===0?(at.x=this.computeMidOrthoPosition(a.x,a.y,x.x,x.y,!1),At.x=at.x,At.y=x.y):E===270&&x.y<a.y||E===90&&x.y>a.y?(at.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,At.x=at.x,At.y=x.y):E===180&&a.x>ot.right&&a.y>ot.top&&a.y<ot.bottom&&(at.x=a.x,at.y=a.y<x.y?Math.min(x.y,ot.top):Math.max(x.y,ot.bottom),At.y=at.y)):(at.h(a.x,x.y),At.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))?at.y=this.computeMidOrthoPosition(a.x,a.y,x.x,x.y,!0):x.y<a.y&&(E===0||E===90)?at.y=this.computeMidOrthoPosition(a.x,rt.top,x.x,Math.max(x.y,ot.bottom),!0):x.y>a.y&&(E===0||E===270)&&(at.y=this.computeMidOrthoPosition(a.x,rt.bottom,x.x,Math.min(x.y,ot.top),!0)),At.x=x.x,At.y=at.y),at.y>rt.top&&at.y<rt.bottom&&(x.x<=rt.right&&x.x>=a.x||a.x>=ot.left&&a.x<=x.x?(E===90||E===270)&&(at.h(Math.min((a.x+x.x)/2,a.x),a.y),At.h(at.x,x.y)):(at.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)),At.x=x.x,At.y=at.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?(at.h(a.x,x.y),At.h((a.x+x.x)/2,x.y),E===270?(at.y=this.computeMidOrthoPosition(a.x,a.y,x.x,x.y,!0),At.x=x.x,At.y=at.y):E===180&&x.x<a.x||E===0&&x.x>a.x?(at.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,At.x=x.x,At.y=at.y):E===90&&a.y<ot.top&&a.x>ot.left&&a.x<ot.right&&(at.x=a.x<x.x?Math.min(x.x,ot.left):Math.max(x.x,ot.right),at.y=a.y,At.x=at.x)):(at.h(x.x,a.y),At.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))?at.x=this.computeMidOrthoPosition(a.x,a.y,x.x,x.y,!1):x.x<a.x&&(E===270||E===0)?at.x=this.computeMidOrthoPosition(rt.left,a.y,Math.max(x.x,ot.right),x.y,!1):x.x>a.x&&(E===270||E===180)&&(at.x=this.computeMidOrthoPosition(rt.right,a.y,Math.min(x.x,ot.left),x.y,!1)),At.x=at.x,At.y=x.y),at.x>rt.left&&at.x<rt.right&&(x.y>=rt.top&&x.y<=a.y||a.y<=ot.bottom&&a.y>=x.y?(E===0||E===180)&&(at.h(a.x,Math.max((a.y+x.y)/2,a.y)),At.h(x.x,at.y)):(at.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)),At.x=at.x,At.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?(at.h(a.x,x.y),At.h((a.x+x.x)/2,x.y),E===90?(at.y=this.computeMidOrthoPosition(a.x,a.y,x.x,x.y,!0),At.x=x.x,At.y=at.y):E===180&&x.x<a.x||E===0&&x.x>=a.x?(at.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,At.x=x.x,At.y=at.y):E===270&&a.y>ot.bottom&&a.x>ot.left&&a.x<ot.right&&(at.x=a.x<x.x?Math.min(x.x,ot.left):Math.max(x.x,ot.right),at.y=a.y,At.x=at.x)):(at.h(x.x,a.y),At.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))?at.x=this.computeMidOrthoPosition(a.x,a.y,x.x,x.y,!1):x.x<a.x&&(E===90||E===0)?at.x=this.computeMidOrthoPosition(rt.left,a.y,Math.max(x.x,ot.right),x.y,!1):x.x>a.x&&(E===90||E===180)&&(at.x=this.computeMidOrthoPosition(rt.right,a.y,Math.min(x.x,ot.left),x.y,!1)),At.x=at.x,At.y=x.y),at.x>rt.left&&at.x<rt.right&&(x.y<=rt.bottom&&x.y>=a.y||a.y>=ot.top&&a.y<=x.y?(E===0||E===180)&&(at.h(a.x,Math.min((a.y+x.y)/2,a.y)),At.h(x.x,at.y)):(at.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)),At.x=at.x,At.y=x.y)));var ft=x;if(this.isAvoiding){var pt=this.diagram;if(pt===null||b===z||this.layer.isTemporary||!Df(pt)||rt.ca(ft)&&!z.Td(b)||ot.ca(a)&&!b.Td(z))y=!1;else{var xt=Wc(pt,!0,this.containingGroup,null);if(this.segmentIndex!==17&&xt.Yj(Math.min(a.x,at.x),Math.min(a.y,at.y),Math.abs(a.x-at.x),Math.abs(a.y-at.y))&&xt.Yj(Math.min(at.x,At.x),Math.min(at.y,At.y),Math.abs(at.x-At.x),Math.abs(at.y-At.y))&&xt.Yj(Math.min(At.x,ft.x),Math.min(At.y,ft.y),Math.abs(At.x-ft.x),Math.abs(At.y-ft.y)))y=!1;else{b=a,z=ft;var Bt=x=null;if(pt.isVirtualized){pt=xt.bounds.copy(),pt.Bc(-xt.Ho,-xt.Go);var Mt=Ot.alloc();Eg(xt,a.x,a.y)||(oe.Ff(pt.x,pt.y,pt.x+pt.width,pt.y+pt.height,a.x,a.y,at.x,at.y,Mt)?(x=a=Mt.copy(),y=Mt.ab(at)):oe.Ff(pt.x,pt.y,pt.x+pt.width,pt.y+pt.height,at.x,at.y,At.x,At.y,Mt)?(x=a=Mt.copy(),y=Mt.ab(At)):oe.Ff(pt.x,pt.y,pt.x+pt.width,pt.y+pt.height,At.x,At.y,ft.x,ft.y,Mt)&&(x=a=Mt.copy(),y=Mt.ab(ft))),Eg(xt,ft.x,ft.y)||(oe.Ff(pt.x,pt.y,pt.x+pt.width,pt.y+pt.height,ft.x,ft.y,At.x,At.y,Mt)?(Bt=ft=Mt.copy(),E=At.ab(Mt)):oe.Ff(pt.x,pt.y,pt.x+pt.width,pt.y+pt.height,At.x,At.y,at.x,at.y,Mt)?(Bt=ft=Mt.copy(),E=at.ab(Mt)):oe.Ff(pt.x,pt.y,pt.x+pt.width,pt.y+pt.height,at.x,at.y,a.x,a.y,Mt)&&(Bt=ft=Mt.copy(),E=a.ab(Mt))),Ot.free(Mt)}rt=rt.copy().ed(ot),rt.Bc(xt.Ho*xt.Os,xt.Go*xt.Os),sw(xt,a,y,ft,E,rt,!0),ot=Gu(xt,ft.x,ft.y),!xt.abort&&ot>=Mg&&(ow(xt),rt.Bc(xt.Ho*xt.Hx,xt.Go*xt.Ix),sw(xt,a,y,ft,E,rt,!1),ot=Gu(xt,ft.x,ft.y)),!xt.abort&&ot<Mg&&Gu(xt,ft.x,ft.y)!==dc?(Av(this,xt,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?oe.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)):oe.B(rt.y,tt.y)?(Math.abs(a.y-rt.y)<=xt.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)&&(oe.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)):oe.B(rt.x,tt.x)?(Math.abs(a.x-rt.x)<=xt.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)),Bt!==null&&(E===0||E===180?this.yf(z.x,Bt.y):this.yf(Bt.x,z.y)),y=!0):y=!1}}}else y=!1;y||(this.ne(at.copy()),this.ne(At.copy())),Ot.free(at),Ot.free(At)}},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 lv(a){if(a.diagram===null||!a.isAvoiding||!Df(a.diagram))return!1;var y=a.points.s,x=y.length;if(4>x)return!1;a=Wc(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 Av(a,y,x,E,b,z,tt){var rt=y.Ho,ot=y.Go,at=Gu(y,x,E),At=x,ft=E;for(b===0?At+=rt:b===90?ft+=ot:b===180?At-=rt:ft-=ot,b!==tt&&at>Zf&&Gu(y,At,ft)!==at-1&&(Gu(y,x-rt,E)===at-1?(b=180,At=x-rt,ft=E):Gu(y,x+rt,E)===at-1?(b=0,At=x+rt,ft=E):Gu(y,x,E-ot)===at-1?(b=270,At=x,ft=E-ot):Gu(y,x,E+ot)===at-1&&(b=90,At=x,ft=E+ot));at>Zf&&Gu(y,At,ft)===at-1;)x=At,E=ft,b===0?At+=rt:b===90?ft+=ot:b===180?At-=rt:ft-=ot,--at;z?at>Zf&&(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),at>Zf&&(z=b,tt=x,At=E,b===0?(z=90,At+=ot):b===90?(z=180,tt-=rt):b===180?(z=270,At-=ot):b===270&&(z=0,tt+=rt),Gu(y,tt,At)===at-1?Av(a,y,tt,At,z,!1,z):(tt=x,At=E,b===0?(z=270,At-=ot):b===90?(z=0,tt+=rt):b===180?(z=90,At+=ot):b===270&&(z=180,tt-=rt),Gu(y,tt,At)===at-1&&Av(a,y,tt,At,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=ni(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=ni(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 Oi&&(b.ua=this.ua)}}},en.prototype.makeGeometry=function(){var a=this.ua,y=this.pointsCount,x=!1,E=this.diagram;E!==null&&Xf(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===kl&&3<=y&&!oe.$(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||Xf(this)){if(a.type=qe.o,rt=by(a),this.computeShortLength(!0)!==0&&(b=Od(this,b,!0,z)),Cg(rt,b.x,b.y,!1),tt===kl&&3<=y&&!oe.$(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=Od(this,b,!1,z)),Ac(rt,y,x,y,x,b.x,b.y);else if(this.isOrthogonal){y=Ot.allocAt(E,ot),x=Ot.alloc(),x.assign(this.i(1)),z=Ot.allocAt(E,ot),b=Ot.allocAt(E,ot),tt=this.i(0);for(var at,At=this.smoothness/3,ft=1;ft<this.pointsCount-1;ft++){at=this.i(ft);var pt=tt,xt=at,Bt=this.i(uv(this,at,ft,!1));if((!oe.$(pt.x,xt.x)||!oe.$(xt.x,Bt.x))&&(!oe.$(pt.y,xt.y)||!oe.$(xt.y,Bt.y))){var Mt=At;isNaN(Mt)&&(Mt=this.smoothness/3);var Gt=pt.x;pt=pt.y;var Dt=xt.x;xt=xt.y;var _t=Bt.x;Bt=Bt.y;var Zt=Mt*F0(Gt,pt,Dt,xt);Mt*=F0(Dt,xt,_t,Bt),oe.$(pt,xt)&&oe.$(Dt,_t)&&(Dt>Gt?Bt>xt?(z.x=Dt-Zt,z.y=xt-Zt,b.x=Dt+Mt,b.y=xt+Mt):(z.x=Dt-Zt,z.y=xt+Zt,b.x=Dt+Mt,b.y=xt-Mt):Bt>xt?(z.x=Dt+Zt,z.y=xt-Zt,b.x=Dt-Mt,b.y=xt+Mt):(z.x=Dt+Zt,z.y=xt+Zt,b.x=Dt-Mt,b.y=xt-Mt)),oe.$(Gt,Dt)&&oe.$(xt,Bt)&&(xt>pt?(_t>Dt?(z.x=Dt-Zt,z.y=xt-Zt,b.x=Dt+Mt):(z.x=Dt+Zt,z.y=xt-Zt,b.x=Dt-Mt),b.y=xt+Mt):(_t>Dt?(z.x=Dt-Zt,z.y=xt+Zt,b.x=Dt+Mt):(z.x=Dt+Zt,z.y=xt+Zt,b.x=Dt-Mt),b.y=xt-Mt)),(oe.$(Gt,Dt)&&oe.$(Dt,_t)||oe.$(pt,xt)&&oe.$(xt,Bt))&&(Gt=.5*(Gt+_t),pt=.5*(pt+Bt),z.x=Gt,z.y=pt,b.x=Gt,b.y=pt),(ft===1||ft===2&&oe.$(tt.x,this.i(0).x)&&oe.$(tt.y,this.i(0).y))&&(x.x=.5*(tt.x+at.x),x.y=.5*(tt.y+at.y)),Ac(rt,x.x-E,x.y-ot,z.x-E,z.y-ot,at.x-E,at.y-ot),y.set(z),x.set(b),tt=at}}at=tt.x,tt=tt.y,At=this.i(this.pointsCount-1),this.computeShortLength(!1)!==0&&(At=Od(this,At.copy(),!1,Ni)),at=.5*(at+At.x),tt=.5*(tt+At.y),Ac(rt,b.x-E,b.y-ot,at-E,tt-ot,At.x-E,At.y-ot),Ot.free(y),Ot.free(x),Ot.free(z),Ot.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=Od(this,tt.copy(),!1,Ni)),Ac(rt,z.x-E,z.y-ot,b.x-E,b.y-ot,tt.x-E,tt.y-ot);else{for(z=Ot.alloc(),z.assign(this.i(0)),b=Ot.alloc(),b.assign(z),tt=this.computeCorner(),ft=1,at=0;ft<y;){if(ft=uv(this,z,ft,1<ft),At=this.i(ft),ft>=y-1){if(!z.D(At))this.computeShortLength(!1)!==0&&(At=Od(this,At.copy(),!1,Ni)),Hd(this,rt,-E,-ot,z,At,x);else if(at===0)for(ft=1;ft<y;)b.assign(z),At=this.i(ft++),Hd(this,rt,-E,-ot,z,At,x),z.assign(At);break}if(at=uv(this,At,ft+1,ft<y-3),ft=-E,Gt=-ot,pt=At,Dt=this.i(at),Mt=x,oe.B(z.y,pt.y)&&oe.B(pt.x,Dt.x))if(Bt=Math.min(tt,Math.abs(pt.x-b.x)/2),Bt=Zt=Math.min(Bt,Math.abs(Dt.y-pt.y)/2),oe.B(Bt,0))Hd(this,rt,ft,Gt,z,pt,Mt),z.assign(pt);else{var te=pt.x,ie=pt.y;xt=te,_t=ie,pt.x>z.x?te=pt.x-Bt:te=pt.x+Bt,Dt.y>pt.y?_t=pt.y+Zt:_t=pt.y-Zt,Dt=Ot.allocAt(te,ie),Hd(this,rt,ft,Gt,z,Dt,Mt),Ot.free(Dt),p0(rt,pt.x+ft,pt.y+Gt,xt+ft,_t+Gt),z.h(xt,_t)}else oe.B(z.x,pt.x)&&oe.B(pt.y,Dt.y)?(Bt=Math.min(tt,Math.abs(pt.y-b.y)/2),Bt=Zt=Math.min(Bt,Math.abs(Dt.x-pt.x)/2),oe.B(Zt,0)?(Hd(this,rt,ft,Gt,z,pt,Mt),z.assign(pt)):(te=pt.x,ie=pt.y,xt=te,_t=ie,pt.y>z.y?ie=pt.y-Bt:ie=pt.y+Bt,Dt.x>pt.x?xt=pt.x+Zt:xt=pt.x-Zt,Dt=Ot.allocAt(te,ie),Hd(this,rt,ft,Gt,z,Dt,Mt),Ot.free(Dt),p0(rt,pt.x+ft,pt.y+Gt,xt+ft,_t+Gt),z.h(xt,_t))):(Hd(this,rt,ft,Gt,z,pt,Mt),z.assign(pt));b.assign(At),ft=at}Ot.free(z)}m0=rt}else rt=this.i(1).copy(),rt.x-=E,rt.y-=ot,this.computeShortLength(!0)!==0&&(b=Od(this,b,!0,z)),this.computeShortLength(!1)!==0&&(rt=Od(this,rt,!1,z)),a.type=qe.j,a.startX=b.x,a.startY=b.y,a.endX=rt.x,a.endY=rt.y;return this.lk=!0,a};function F0(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),oe.$(a,0)?y:oe.$(y,0)?a:Math.sqrt(a*a+y*y)))}function Od(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=F0(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=F0(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 uv(a,y,x,E){for(var b=a.pointsCount,z=y;oe.$(y.x,z.x)&&oe.$(y.y,z.y);){if(x>=b)return b-1;z=a.i(x++)}if(!oe.$(y.x,z.x)&&!oe.$(y.y,z.y))return x-1;for(var tt=z;oe.$(y.x,z.x)&&oe.$(z.x,tt.x)&&(!E||(y.y>=z.y?z.y>=tt.y:z.y<=tt.y))||oe.$(y.y,z.y)&&oe.$(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 Hd(a,y,x,E,b,z,tt){if(!tt&&Xf(a)){tt=a.computeJumpLength();var rt=tt/2,ot=[],at=0;if(a.isVisible()&&(at=P1(a,b,z,ot)),0<at){if(oe.B(b.y,z.y))if(b.x<z.x)for(var At=0;At<at;){var ft=Math.max(b.x,Math.min(ot[At++]-rt,z.x-tt));y.lineTo(ft+x,z.y+E);for(var pt=ft+x,xt=Math.min(ft+tt,z.x);At<at&&(ft=ot[At],ft<xt+tt);)At++,xt=Math.min(ft+rt,z.x);ft=z.y-tt+E,xt+=x;var Bt=z.y+E;a.curve===fc?Cg(y,xt,Bt,!1):Ac(y,pt,ft,xt,ft,xt,Bt)}else for(--at;0<=at;){for(At=Math.min(b.x,Math.max(ot[at--]+rt,z.x+tt)),y.lineTo(At+x,z.y+E),pt=At+x,ft=Math.max(At-tt,z.x);0<=at&&(At=ot[at],At>ft-tt);)at--,ft=Math.max(At-rt,z.x);At=z.y-tt+E,ft+=x,xt=z.y+E,a.curve===fc?Cg(y,ft,xt,!1):Ac(y,pt,At,ft,At,ft,xt)}else if(oe.B(b.x,z.x))if(b.y<z.y)for(At=0;At<at;){for(ft=Math.max(b.y,Math.min(ot[At++]-rt,z.y-tt)),y.lineTo(z.x+x,ft+E),pt=ft+E,ft=Math.min(ft+tt,z.y);At<at&&(xt=ot[At],xt<ft+tt);)At++,ft=Math.min(xt+rt,z.y);xt=z.x-tt+x,Bt=z.x+x,ft+=E,a.curve===fc?Cg(y,Bt,ft,!1):Ac(y,xt,pt,xt,ft,Bt,ft)}else for(--at;0<=at;){for(At=Math.min(b.y,Math.max(ot[at--]+rt,z.y+tt)),y.lineTo(z.x+x,At+E),pt=At+E,At=Math.max(At-tt,z.y);0<=at&&(ft=ot[at],ft>At-tt);)at--,At=Math.max(ft-rt,z.y);ft=z.x-tt+x,xt=z.x+x,At+=E,a.curve===fc?Cg(y,xt,At,!1):Ac(y,ft,pt,ft,At,xt,At)}}}y.lineTo(z.x+x,z.y+E)}function P1(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(At,ft){return At-ft}),E.length;if(ot.isVisible()&&Xf(ot)){var at=ot.routeBounds;at.w()&&a.routeBounds.Yc(at)&&!a.usesSamePort(ot)&&(at=ot.path,at!==null&&at.Ed()&&F1(y,x,E,ot))}}}}}return 0<E.length&&E.sort(function(At,ft){return At-ft}),E.length}function F1(a,y,x,E){for(var b=oe.B(a.y,y.y),z=E.pointsCount,tt=E.i(0),rt=Ot.alloc(),ot=1;ot<z;ot++){var at=E.i(ot);if(ot<z-1){var At=E.i(ot+1);if(tt.y===at.y&&at.y===At.y){if(at.x>tt.x&&At.x>=at.x||at.x<tt.x&&At.x<=at.x)continue}else if(tt.x===at.x&&at.x===At.x&&(at.y>tt.y&&At.y>=at.y||at.y<tt.y&&At.y<=at.y))continue}t:{At=a.x;var ft=a.y,pt=y.x,xt=y.y,Bt=tt.x;tt=tt.y;var Mt=at.x,Gt=at.y;if(oe.B(At,pt)){if(!oe.B(ft,xt)&&oe.B(tt,Gt)&&Math.min(ft,xt)<tt&&Math.max(ft,xt)>tt&&Math.min(Bt,Mt)<At&&Math.max(Bt,Mt)>At&&!oe.B(Bt,Mt)){rt.x=At,rt.y=tt,At=!0;break t}}else if(oe.B(ft,xt)&&oe.B(Bt,Mt)&&Math.min(At,pt)<Bt&&Math.max(At,pt)>Bt&&Math.min(tt,Gt)<ft&&Math.max(tt,Gt)>ft&&!oe.B(tt,Gt)){rt.x=Bt,rt.y=ft,At=!0;break t}rt.x=0,rt.y=0,At=!1}At&&(b?x.push(rt.x):x.push(rt.y)),tt=at}Ot.free(rt)}function Xf(a){return a=a.curve,a===Lg||a===fc}function L0(a,y){(y||Xf(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&&ew(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&&ew(this,rt,a)}}}}};function ew(a,y,x){if(y!==null&&y.lk&&y.fd&&Xf(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(!ii.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(ii.prototype.Zb.call(this,a),a&&L0(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?dp:this.qk};function cp(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 at=tt[ot];(at.ef===y&&at.ff===E&&at.uf===x&&at.vf===b||at.ef===x&&at.ff===b&&at.uf===y&&at.vf===E)&&(z===null?z=at:(a===null&&(a=[],a.push(z)),a.push(at)))}if(a!==null){for(z=Ky(y,x,E,b),z===null&&(z=new T0(y,E,x,b),zy(y,z),zy(x,z)),z.links=a,y=0;y<a.length;y++)a[y].Sf=z;z.Sl()}}}}function fp(a){var y=a.Sf;y!==null&&isNaN(a.curviness)&&(a.Sf=null,a=y.links.indexOf(a),0<=a&&(ci(y.links,a),y.Sl()))}en.prototype.ph=function(){return!0},We.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&&S0(y,this,x),fp(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&&w0(a,this,b),cp(this),this.C(1)),this.g("fromNode",y,a),Pg(this)}}},fromPortId:{get:function(){return this.ff},set:function(a){var y=this.ff;if(y!==a){var x=this.fromPort;x!==null&&pl(x),fp(this),this.ff=a;var E=this.fromPort;E!==null&&pl(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))),cp(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&&S0(y,this,x),fp(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&&w0(a,this,b),cp(this),this.C(1)),this.g("toNode",y,a),Pg(this)}}},toPortId:{get:function(){return this.vf},set:function(a){var y=this.vf;if(y!==a){var x=this.toPort;x!==null&&pl(x),fp(this),this.vf=a;var E=this.toPort;E!==null&&pl(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))),cp(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:is},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&&pl(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&&Sn(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:is},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&&pl(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&&Sn(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?or: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&&hp(this.fromNode),this.toNode!==null&&hp(this.toNode))}},path:{get:function(){var a=this.Pb();return a instanceof Oi?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()===kl&&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),oe.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);oe.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 Ot)}},midAngle:{get:function(){return this.vg(),this.computeMidAngle()}},flattenedLengths:{get:function(){if(this.cq===null){this.fd||B0(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);oe.$(E.x,b.x)?(E=b.y-E.y,0>E&&(E=-E)):oe.$(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 Vt,E=0;E<a.length/2;E++)b=new Ot(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(!Ne(z)||typeof z.x!="number"||isNaN(z.x)||typeof z.y!="number"||isNaN(z.y)){E=!1;break}}if(E)for(x=new Vt,E=0;E<a.length;E++)b=a[E],x.add(new Ot(b.x,b.y).freeze())}}else if(a instanceof Vt)for(x=a.copy(),a=x.iterator;a.next();)a.value.freeze();else Yt("Link.points value is not an instance of List or Array: "+a);x.freeze(),this.Nb=x,this.qc(),B0(this),a=this.diagram,a!==null&&(a.pi||a.undoManager.isUndoingRedoing||a.As.add(this),a.animationManager.zb&&sh(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||!Fg(this.computeSpot(!0))?1:0}},lastPickIndex:{get:function(){var a=this.pointsCount;return a===0?0:2>=a?a-1:this.isOrthogonal||!Fg(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(),L0(this,y===fc||y===Lg||a===fc||a===Lg),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(),L0(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 Rd=null,Gd=null,hv=new xe(en,"Normal",1),L1=new xe(en,"Orthogonal",2),E1=new xe(en,"AvoidsNodes",6),nw=new xe(en,"AvoidsNodesStraight",7),ka=new xe(en,"None",0),kl=new xe(en,"Bezier",9),fc=new xe(en,"JumpGap",10),Lg=new xe(en,"JumpOver",11),dp=new xe(en,"End",17),E0=new xe(en,"Scale",18),M0=new xe(en,"Stretch",19),gp=new xe(en,"OrientAlong",21),pp=new xe(en,"OrientPlus90",22),mp=new xe(en,"OrientMinus90",23),cv=new xe(en,"OrientOpposite",24),k0=new xe(en,"OrientUpright",25),vp=new xe(en,"OrientPlus90Upright",26),yp=new xe(en,"OrientMinus90Upright",27),b0=new xe(en,"OrientUpright45",28),iw=16,rw=14,wp=8;en.className="Link",en.Normal=hv,en.Orthogonal=L1,en.AvoidsNodes=E1,en.AvoidsNodesStraight=nw,en.None=ka,en.Bezier=kl,en.JumpGap=fc,en.JumpOver=Lg,en.End=dp,en.Scale=E0,en.Stretch=M0,en.OrientAlong=gp,en.OrientPlus90=pp,en.OrientMinus90=mp,en.OrientOpposite=cv,en.OrientUpright=k0,en.OrientPlus90Upright=vp,en.OrientMinus90Upright=yp,en.OrientUpright45=b0,en.EndSegmentStep=8,en.CurvinessStart=iw,en.SpacingMin=rw,en.OrthoShortCut=wp;function T0(a,y,x,E){nn(this),this.Fe=this.qq=!1,this.Ds=a,this.Ox=y,this.cv=x,this.Px=E,this.links=[]}T0.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},T0.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))}},T0.className="LinkBundle";function Sp(a){nn(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=fv,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 Eg(a,y,x){return a.Nd<=y&&y<=a.En&&a.Od<=x&&x<=a.Fn}function Gu(a,y,x){return Eg(a,y,x)?(y-=a.Nd,y/=a.rc,x-=a.Od,x/=a.sc,a.ac[y|0][x|0]):fv}function ow(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]>=Zf&&(x[E]=fv)}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]===dc)return!1}return!0};function zu(a,y,x,E,b,z,tt,rt,ot){if(!(y<z||y>tt||x<rt||x>ot)){var at=y|0,At=x|0,ft=a.ac[at][At];if(ft>=Zf&&ft<Mg)for(b?At+=E:at+=E,ft+=1;z<=at&&at<=tt&&rt<=At&&At<=ot&&!(ft>=a.ac[at][At]);)a.ac[at][At]=ft,ft+=1,b?At+=E:at+=E;if(at=b?At:at,b)if(0<E)for(x+=E;x<at;x+=E)zu(a,y,x,1,!b,z,tt,rt,ot),zu(a,y,x,-1,!b,z,tt,rt,ot);else for(x+=E;x>at;x+=E)zu(a,y,x,1,!b,z,tt,rt,ot),zu(a,y,x,-1,!b,z,tt,rt,ot);else if(0<E)for(y+=E;y<at;y+=E)zu(a,y,x,1,!b,z,tt,rt,ot),zu(a,y,x,-1,!b,z,tt,rt,ot);else for(y+=E;y>at;y+=E)zu(a,y,x,1,!b,z,tt,rt,ot),zu(a,y,x,-1,!b,z,tt,rt,ot)}}function I0(a,y,x,E,b,z,tt,rt,ot){y|=0,x|=0;var at=dc,At=Zf;for(a.ac[y][x]=At;at===dc&&y>z&&y<tt&&x>rt&&x<ot;)At+=1,a.ac[y][x]=At,b?x+=E:y+=E,at=a.ac[y][x]}function N0(a,y,x,E,b,z,tt,rt,ot){y|=0,x|=0;var at=dc,At=Mg;for(a.ac[y][x]=At;at===dc&&y>z&&y<tt&&x>rt&&x<ot;)a.ac[y][x]=At,b?x+=E:y+=E,at=a.ac[y][x]}function sw(a,y,x,E,b,z,tt){if(a.ac!==null){a.abort=!1;var rt=y.x,ot=y.y;if(Eg(a,rt,ot)){rt-=a.Nd,rt/=a.rc,ot-=a.Od,ot/=a.sc;var at=E.x,At=E.y;if(Eg(a,at,At))if(at-=a.Nd,at/=a.rc,At-=a.Od,At/=a.sc,1>=Math.abs(rt-at)&&1>=Math.abs(ot-At))a.abort=!0;else{var ft=z.x;E=z.y,y=z.x+z.width;var pt=z.y+z.height;ft-=a.Nd,ft/=a.rc,E-=a.Od,E/=a.sc,y-=a.Nd,y/=a.rc,pt-=a.Od,pt/=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)),pt=Math.min(a.ei,Math.max(0,pt|0)),E=a.ac,rt|=0,ot|=0,at|=0,At|=0;var xt=x===0||x===90?1:-1;if(x=x===90||x===270,E[rt][ot]===dc?(I0(a,rt,ot,xt,x,z,y,ft,pt),I0(a,rt,ot,1,!x,z,y,ft,pt),I0(a,rt,ot,-1,!x,z,y,ft,pt)):I0(a,rt,ot,xt,x,rt,ot,rt,ot),E[at][At]===dc?(N0(a,at,At,b===0||b===90?1:-1,b===90||b===270,z,y,ft,pt),N0(a,at,At,1,!(b===90||b===270),z,y,ft,pt),N0(a,at,At,-1,!(b===90||b===270),z,y,ft,pt)):N0(a,at,At,xt,x,at,At,at,At),x=Qn(),tt&&aw(a,at,At,b,rt,ot,x))for((x[0]!==at||x[1]!==At)&&(x.unshift(At),x.unshift(at)),(x[x.length-2]!==rt||x[x.length-1]!==ot)&&(x.push(rt),x.push(ot)),a=Zf,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],at=x[z+1];y>b?b++:y<b?b--:at>tt?tt++:at<tt&&tt--,E[b][tt]=a++,b!==y||tt!==at;);else zu(a,rt,ot,1,!1,z,y,ft,pt),zu(a,rt,ot,-1,!1,z,y,ft,pt),zu(a,rt,ot,1,!0,z,y,ft,pt),zu(a,rt,ot,-1,!0,z,y,ft,pt);Dn(x)}}}}function aw(a,y,x,E,b,z,tt){for(var rt=a.ac,ot=y,at=x;;){if(ot===b&&at===z)return!0;var At=ot,ft=at;if(E===0)if(At<b)At++;else break;else if(E===90)if(ft<z)ft++;else break;else if(E===180)if(At>b)At--;else break;else if(ft>z)ft--;else break;var pt=rt[At][ft];if(pt===0||pt===dv)break;ot=At,at=ft}for(;;){if(At=E,ft=ot,pt=at,E===0?pt<z?(At=90,pt++):pt>z&&(At=270,pt--):E===90?ft<b?(At=0,ft++):ft>b&&(At=180,ft--):E===180?pt<z?(At=90,pt++):pt>z&&(At=270,pt--):ft<b?(At=0,ft++):ft>b&&(At=180,ft--),ft=rt[ft][pt],At!==E&&ft!==0&&ft!==dv){if(tt.push(ot),tt.push(at),aw(a,ot,at,At,b,z,tt))return!0;tt.pop(),tt.pop()}if(rt[ot][at]=dv,E===0){if(ot===y)return!1;ot--}else if(E===90){if(at===x)return!1;at--}else if(E===180){if(ot===y)return!1;ot++}else{if(at===x)return!1;at++}}}We.Object.defineProperties(Sp.prototype,{bounds:{get:function(){return new Me(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 dc=0,Zf=1,Mg=999999,fv=Mg+1,dv=Mg+2;Sp.className="PositionArray";function zd(){nn(this),this.port=this.node=null,this.pe=[],this.ap=!1}zd.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 M1(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}zd.prototype.Sl=function(){this.pe.length=0};function lw(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 Ti?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(vr,Ot.alloc()),ot=a.port.ga(Go,Ot.alloc());for(b=Me.allocAt(rt.x,rt.y,0,0),b.Ye(ot),Ot.free(rt),Ot.free(ot),rt=Ot.allocAt(b.x+b.width/2,b.y+b.height/2),ot=a.port.li(),tt=tt.iterator;tt.next();){var at=tt.value;if(at.isVisible()&&at.fromPort!==at.toPort){var At=at.fromPort===a.port||at.fromNode!==null&&at.fromNode.Td(E),ft=at.computeSpot(At,a.port);if(ft.$c()&&(At=At?at.toPort:at.fromPort,At!==null)){var pt=At.part;if(pt!==null){var xt=pt.findVisibleNode();xt!==null&&xt!==pt&&(pt=xt,At=pt.port),At=at.computeOtherPoint(pt,At),pt=rt.ab(At),pt-=ot,0>pt?pt+=360:360<=pt&&(pt-=360),ft=M1(b,ft,pt,at.isOrthogonal),ft===0?(ft=4,180<pt&&(pt-=360)):ft===90?(ft=8,270<pt&&(pt-=360)):ft===180?ft=2:(ft=1,90>pt&&(pt+=360)),xt=a.pe[z],xt===void 0?(xt=new gv(at,pt,ft),a.pe[z]=xt):(xt.link=at,xt.angle=pt,xt.Nc=ft),xt.hv.set(At),z++}}}}for(Ot.free(rt),a.pe.sort(zd.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=Ot.alloc(),ot=Ot.alloc(),tt=Ot.alloc(),at=Ot.alloc(),ft.ga(vr,rt),ft.ga(Dr,ot),ft.ga(Go,tt),ft.ga(ea,at),xt=pt=At=ft=0,E===rv)for(var Bt=0;Bt<z.length;Bt++){var Mt=z[Bt];if(Mt!==null){var Gt=Mt.link.computeThickness();switch(Mt.Nc){case 8:pt+=Gt;break;case 2:xt+=Gt;break;case 1:ft+=Gt;break;default:case 4:At+=Gt}}}var Dt=Bt=0,_t=1,Zt=Mt=0;for(Gt=0;Gt<z.length;Gt++){var te=z[Gt];if(te!==null){if(Bt!==te.Nc){switch(Bt=te.Nc,Bt){case 8:var ie=tt;Dt=at;break;case 2:ie=at,Dt=rt;break;case 1:ie=rt,Dt=ot;break;default:case 4:ie=ot,Dt=tt}switch(Mt=Dt.x-ie.x,Zt=Dt.y-ie.y,Bt){case 8:pt>Math.abs(Mt)?(_t=Math.abs(Mt)/pt,pt=Math.abs(Mt)):_t=1;break;case 2:xt>Math.abs(Zt)?(_t=Math.abs(Zt)/xt,xt=Math.abs(Zt)):_t=1;break;case 1:ft>Math.abs(Mt)?(_t=Math.abs(Mt)/ft,ft=Math.abs(Mt)):_t=1;break;default:case 4:At>Math.abs(Zt)?(_t=Math.abs(Zt)/At,At=Math.abs(Zt)):_t=1}Dt=0}var me=te.Zo;if(E===rv){switch(te=te.link.computeThickness(),te*=_t,me.set(ie),Bt){case 8:me.x=ie.x+Mt/2+pt/2-Dt-te/2;break;case 2:me.y=ie.y+Zt/2+xt/2-Dt-te/2;break;case 1:me.x=ie.x+Mt/2-ft/2+Dt+te/2;break;default:case 4:me.y=ie.y+Zt/2-At/2+Dt+te/2}Dt+=te}else{var ln=.5;E===x0&&(ln=(te.Uo+1)/(te.Gl+1)),me.x=ie.x+Mt*ln,me.y=ie.y+Zt*ln}}}for(Ot.free(rt),Ot.free(ot),Ot.free(tt),Ot.free(at),ie=a.pe,z=0;z<ie.length;z++)E=ie[z],E!==null&&(E.Ju=a.computeEndSegmentLength(E));a.ap=x,Me.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}zd.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},zd.prototype.computeEndSegmentLength=function(a){var y=a.link,x=y.computeEndSegmentLength(this.node,this.port,$i,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)},zd.className="Knot";function gv(a,y,x){this.link=a,this.angle=y,this.Nc=x,this.hv=new Ot,this.Gl=this.Uo=0,this.Zo=new Ot,this.Ju=0}gv.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()},gv.className="LinkInfo";function po(a){nn(this),this.o=this.H=null,this.Gh=this.sn=!0,this.yn=!1,this.Am=new Ot(0,0).freeze(),this.vn=!0,this.Em=this.un=null,this.xn=!1,this.j=null,a&&Object.assign(this,a)}po.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},po.prototype.copy=function(){var a=new this.constructor;return this.cloneProtected(a),a},po.prototype.qb=function(){},po.prototype.toString=function(){var a=Zn(this.constructor);return a+="(",this.group!==null&&(a+=" in "+this.group),this.diagram!==null&&(a+=" for "+this.diagram),a+")"},po.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())}}},po.prototype.createNetwork=function(){return new qr(this)},po.prototype.makeNetwork=function(a){var y=this.createNetwork();return a instanceof pe?(y.lg(a.nodes,!0),y.lg(a.links,!0)):a instanceof Ti?y.lg(a.memberParts):y.lg(a.iterator),y},po.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")}},po.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()}},po.prototype.doLayout=function(a){var y=new le;a instanceof pe?($c(this,y,a.nodes,!0,this.rh,!0,!1,!0),$c(this,y,a.parts,!0,this.rh,!0,!1,!0)):a instanceof Ti?$c(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},po.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;xp(rt);var ot=rt.measuredBounds,at=ot.width;ot=ot.height,rt.moveTo(E,b),rt instanceof Ti&&(rt.rh=!1),E+=Math.max(at,50)+20,tt=Math.max(tt,Math.max(ot,50)),z>=y-1?(z=0,E=x,b+=tt+20,tt=0):z++}},po.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)&&(xp(rt),this.rh(rt))){var ot=rt.measuredBounds,at=ot.width;ot=ot.height,rt.moveTo(x,E),rt instanceof Ti&&(rt.rh=!1),x+=Math.max(at,50)+20,z=Math.max(z,Math.max(ot,50)),b>=a-1?(b=0,x=y,E+=z+20,z=0):b++}}},po.prototype.rh=function(a){return!!(!a.location.w()||a instanceof Ti&&a.rh)};function $c(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 gn?ot.isLinkLabel||(ot instanceof Ti&&ot.layout===null?$c(a,y,ot.memberParts,!1,b,z,tt,rt):(xp(ot),y.add(ot))):tt&&ot instanceof en?y.add(ot):!rt||!ot.Zc()||ot instanceof gn||(xp(ot),y.add(ot)))}}function xp(a){var y=a.actualBounds;(y.width===0||y.height===0||isNaN(y.width)||isNaN(y.height))&&a.Va()}po.prototype.ni=function(a,y){var x=this.boundsComputation;return x!==null?(y||(y=new Me),x(a,this,y)):y?(y.set(a.actualBounds),y):a.actualBounds},po.prototype.ex=function(a){var y=new le;return a instanceof pe?($c(this,y,a.nodes,!0,null,!0,!0,!0),$c(this,y,a.links,!0,null,!0,!0,!0),$c(this,y,a.parts,!0,null,!0,!0,!0)):a instanceof Ti?$c(this,y,a.memberParts,!1,null,!0,!0,!0):$c(this,y,a.iterator,!1,null,!0,!0,!0),y},po.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(vr),(isNaN(x.x)||isNaN(x.y))&&x.set(a),a=y.padding,x.x+=a.left,x.y+=a.top),x}return a},We.Object.defineProperties(po.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())}}}),po.prototype.collectParts=po.prototype.ex,po.prototype.getLayoutBounds=po.prototype.ni,po.prototype.invalidateLayout=po.prototype.C,po.className="Layout";function qr(a){nn(this),this.Sc=a,this.wf=new le,this.ye=new le,this.Es=new yn,this.zs=new yn}qr.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 le,this.ye=new le,this.Es=new yn,this.zs=new yn},qr.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},qr.prototype.createVertex=function(){return new gs(this)},qr.prototype.createEdge=function(){return new ml(this)},qr.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 gn)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 gn&&(!y||E.isTopLevel)&&E.canLayout()&&x(E)){if(E instanceof Ti&&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))}}},qr.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=qr.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&&Aw(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 Aw(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){pv(this,a);var y=a.toVertex;y!==null&&y.Cl(a),y=a.fromVertex,y!==null&&y.zl(a)}};function pv(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),mv(this,a)}};function mv(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=Qn(),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]);Dn(a)},qr.prototype.deleteArtificialVertexes=function(){for(var a=Qn(),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=Qn(),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]);Dn(a),Dn(y)};function k1(a){for(var y=Qn(),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]);Dn(y)}qr.prototype.Zx=function(a){a===void 0&&(a=!0),a&&(this.deleteArtificialVertexes(),k1(this),this.Ko()),a=new Vt;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),vv(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 vv(a,y,x){if(x!==null&&x.network!==y){Aw(a,x),y.dh(x);for(var E=x.sourceEdges;E.next();){var b=E.value;b.network!==y&&(mv(a,b),pv(y,b),vv(a,y,b.fromVertex))}for(E=x.destinationEdges;E.next();)x=E.value,x.network!==y&&(mv(a,x),pv(y,x),vv(a,y,x.toVertex))}}qr.prototype.dz=function(){for(var a=new le,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},We.Object.defineProperties(qr.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}}}),qr.prototype.findAllParts=qr.prototype.dz,qr.prototype.splitIntoSubNetworks=qr.prototype.Zx,qr.prototype.deleteSelfEdges=qr.prototype.Ko,qr.prototype.reverseEdge=qr.prototype.gm,qr.prototype.linkVertexes=qr.prototype.Zj,qr.prototype.findEdge=qr.prototype.Lo,qr.prototype.deleteLink=qr.prototype.Yy,qr.prototype.deleteEdge=qr.prototype.Mj,qr.prototype.addLink=qr.prototype.Dy,qr.prototype.addEdge=qr.prototype.Bo,qr.prototype.findVertex=qr.prototype.ki,qr.prototype.deleteNode=qr.prototype.Zy,qr.prototype.deleteVertex=qr.prototype.Iu,qr.prototype.addNode=qr.prototype.Bl,qr.prototype.addVertex=qr.prototype.dh,qr.prototype.addParts=qr.prototype.lg,qr.className="LayoutNetwork";function gs(a){nn(this),this.ob=a,this.j=new Me(0,0,10,10).freeze(),this.o=new Ot(5,5).freeze(),this.Sh=this.ub=null,this.tg=new Vt,this.mg=new Vt}gs.prototype.clear=function(){this.Sh=this.ub=null,this.tg=new Vt,this.mg=new Vt},gs.prototype.toString=function(a){a===void 0&&(a=0);var y="LayoutVertex#"+On(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},gs.prototype.commit=function(){var a=this.ub;if(a!==null){var y=this.bounds,x=a.bounds;Ne(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 Ti)){x=Me.alloc(),a.Va();var E=this.network.layout.ni(a,x),b=a.locationObject.ga(Ui);if(E.w()&&b.w()){a.moveTo(y.x+this.focusX-(b.x-E.x),y.y+this.focusY-(b.y-E.y)),Me.free(x);return}Me.free(x)}a.moveTo(y.x,y.y)}},gs.prototype.Cl=function(a){a!==null&&(this.tg.contains(a)||this.tg.add(a))},gs.prototype.Kl=function(a){a!==null&&this.tg.remove(a)},gs.prototype.zl=function(a){a!==null&&(this.mg.contains(a)||this.mg.add(a))},gs.prototype.Jl=function(a){a!==null&&this.mg.remove(a)};function yv(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}We.Object.defineProperties(gs.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=Me.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),Me.free(x),!(a instanceof Ti)&&(a=a.locationObject.ga(Ui),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 le,y=this.sourceEdges;y.next();)a.add(y.value.fromVertex);return a.iterator}},destinationVertexes:{get:function(){for(var a=new le,y=this.destinationEdges;y.next();)a.add(y.value.toVertex);return a.iterator}},vertexes:{get:function(){for(var a=new le,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 Vt,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}}}),gs.prototype.deleteDestinationEdge=gs.prototype.Jl,gs.prototype.addDestinationEdge=gs.prototype.zl,gs.prototype.deleteSourceEdge=gs.prototype.Kl,gs.prototype.addSourceEdge=gs.prototype.Cl,gs.className="LayoutVertex",gs.standardComparer=yv,gs.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 ml(a){nn(this),this.nb=a,this.qd=this.kd=this.$k=this.ub=null}ml.prototype.clear=function(){this.qd=this.kd=this.$k=this.ub=null},ml.prototype.toString=function(a){a===void 0&&(a=0);var y="LayoutEdge#"+On(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},ml.prototype.gm=function(){var a=this.kd;this.kd=this.qd,this.qd=a},ml.prototype.commit=function(){},ml.prototype.Ax=function(a){return this.qd===a?this.kd:this.kd===a?this.qd:null},We.Object.defineProperties(ml.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)}}}),ml.prototype.getOtherVertex=ml.prototype.Ax,ml.className="LayoutEdge";function Ds(a){po.call(this),this.isViewportSized=!0,this.yo=this.zo=NaN,this.yg=new Xe(NaN,NaN).freeze(),this.tf=new Xe(10,10).freeze(),this.Jb=Bp,this.Rb=U0,this.nd=Cp,this.hd=uw,a&&Object.assign(this,a)}Le(Ds,po),Ds.prototype.cloneProtected=function(a){po.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},Ds.prototype.qb=function(a){a.classType===Ds?a===Cp||a===O0||a===wv||a===D0?this.sorting=a:a===U0||a===IA?this.arrangement=a:a===Bp||a===Q0?this.alignment=a:Yt("Unknown enum value: "+a):po.prototype.qb.call(this,a)},Ds.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 Ti)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 D0:b.reverse();break;case Cp:b.sort(this.comparer);break;case O0: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 Q0:var rt=y,ot=x,at=Me.alloc(),At=Math.max(this.cellSize.width,1);if(!isFinite(At))for(var ft=At=0;ft<b.length;ft++){var pt=this.ni(b[ft],at);At=Math.max(At,pt.width)}if(At=Math.max(At+rt,1),ft=Math.max(this.cellSize.height,1),!isFinite(ft))for(pt=ft=0;pt<b.length;pt++){var xt=this.ni(b[pt],at);ft=Math.max(ft,xt.height)}ft=Math.max(ft+ot,1),pt=this.arrangement;for(var Bt=xt=this.arrangementOrigin.x,Mt=this.arrangementOrigin.y,Gt=0,Dt=0,_t=0;_t<b.length;_t++){var Zt=b[_t],te=this.ni(Zt,at),ie=Math.ceil((te.width+rt)/At)*At,me=Math.ceil((te.height+ot)/ft)*ft;switch(pt){case IA:var ln=Math.abs(Bt-te.width);break;default:ln=Bt+te.width}switch((0<z&&Gt>z-1||0<tt&&0<Gt&&ln-xt>tt)&&(E.push(new Me(0,Mt,tt+rt,Dt)),Gt=0,Bt=xt,Mt+=Dt,Dt=0),Dt=Math.max(Dt,me),pt){case IA:te=-te.width;break;default:te=0}switch(Zt.moveTo(Bt+te,Mt),pt){case IA:Bt-=ie;break;default:Bt+=ie}Gt++}E.push(new Me(0,Mt,tt+rt,Dt)),Me.free(at);break;case Bp:for(ot=tt,At=z,ft=y,pt=x,tt=Me.alloc(),xt=Math.max(this.cellSize.width,1),z=Mt=at=0,rt=Ot.alloc(),Bt=0;Bt<b.length;Bt++)Dt=b[Bt],Gt=this.ni(Dt,tt),Dt=uc(Dt,Dt.locationObject,Dt.locationSpot,rt),at=Math.max(at,Dt.x),Mt=Math.max(Mt,Gt.width-Dt.x),z=Math.max(z,Dt.y);switch(Bt=this.arrangement,Bt){case IA:at+=ft;break;default:Mt+=ft}xt=isFinite(xt)?Math.max(xt+ft,1):Math.max(at+Mt,1);var Un=Dt=this.arrangementOrigin.x;for(_t=this.arrangementOrigin.y,Mt=0,ot>=at&&(ot-=at),at=Zt=0,ie=Math.max(this.cellSize.height,1),te=z=0,me=!0,Gt=Ot.alloc(),ln=0;ln<b.length;ln++){var Fn=b[ln],tn=this.ni(Fn,tt),De=uc(Fn,Fn.locationObject,Fn.locationSpot,rt);if(0<Mt)switch(Bt){case IA:Un=(Un-Dt-(tn.width-De.x))/xt,Un=oe.$(Math.round(Un),Un)?Math.round(Un):Math.floor(Un),Un=Un*xt+Dt;break;default:Un=(Un-Dt+De.x)/xt,Un=oe.$(Math.round(Un),Un)?Math.round(Un):Math.ceil(Un),Un=Un*xt+Dt}else switch(Bt){case IA:Zt=Un+De.x+tn.width;break;default:Zt=Un-De.x}switch(Bt){case IA:var bi=-(Un+De.x)+Zt;break;default:bi=Un+tn.width-De.x-Zt}if(0<At&&Mt>At-1||0<ot&&0<Mt&&bi>ot){for(E.push(new Me(0,me?_t-z:_t,ot+ft,te+z+pt)),Un=0;Un<Mt&&ln!==Mt;Un++){bi=b[ln-Mt+Un];var Bi=uc(bi,bi.locationObject,bi.locationSpot,Gt);bi.moveTo(bi.position.x,bi.position.y+z-Bi.y)}te+=pt,_t=me?_t+te:_t+(te+z),Mt=te=z=0,Un=Dt,me=!1}switch(Un===Dt&&(at=Bt===IA?Math.max(at,tn.width-De.x):Math.min(at,-De.x)),z=Math.max(z,De.y),te=Math.max(te,tn.height-De.y),isFinite(ie)&&(te=Math.max(te,Math.max(tn.height,ie)-De.y)),me?Fn.moveTo(Un-De.x,_t-De.y):Fn.moveTo(Un-De.x,_t),Bt){case IA:Un-=De.x+ft;break;default:Un+=tn.width-De.x+ft}Mt++}if(E.push(new Me(0,_t,ot+ft,(me?te:te+z)+pt)),b.length!==Mt)for(ot=0;ot<Mt;ot++)At=b[b.length-Mt+ot],ft=uc(At,At.locationObject,At.locationSpot,rt),At.moveTo(At.position.x,At.position.y+z-ft.y);if(Ot.free(rt),Ot.free(Gt),Bt===IA)for(b=0;b<E.length;b++)z=E[b],z.width+=at,z.x-=at;else for(b=0;b<E.length;b++)z=E[b],z.x>at&&(z.width+=z.x-at,z.x=at);Me.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===IA?this.commitLayers(E,new Ot(b+y/2-(z+b),tt-x/2)):this.commitLayers(E,new Ot(b-y/2,tt-x/2)),a!==null&&a.eb("Layout"),this.isValidLayout=!0}},Ds.prototype.commitLayers=function(){};function uw(a,y){return a=a.text,y=y.text,a<y?-1:a>y?1:0}We.Object.defineProperties(Ds.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!==Bp&&a!==Q0||(this.Jb=a,this.C())}},arrangement:{get:function(){return this.Rb},set:function(a){this.Rb===a||a!==U0&&a!==IA||(this.Rb=a,this.C())}},sorting:{get:function(){return this.nd},set:function(a){this.nd===a||a!==wv&&a!==D0&&a!==Cp&&a!==O0||(this.nd=a,this.C())}},comparer:{get:function(){return this.hd},set:function(a){this.hd!==a&&(this.hd=a,this.C())}}});var Q0=new xe(Ds,"Position",0),Bp=new xe(Ds,"Location",1),U0=new xe(Ds,"LeftToRight",2),IA=new xe(Ds,"RightToLeft",3),wv=new xe(Ds,"Forward",4),D0=new xe(Ds,"Reverse",5),Cp=new xe(Ds,"Ascending",6),O0=new xe(Ds,"Descending",7);Ds.className="GridLayout",Ds.standardComparer=uw,Ds.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},Ds.Position=Q0,Ds.Location=Bp,Ds.LeftToRight=U0,Ds.RightToLeft=IA,Ds.Forward=wv,Ds.Reverse=D0,Ds.Ascending=Cp,Ds.Descending=O0;function Nr(){this.On=new le,this.Dn=new le,this.Pa=new le,this.cf=new yn,this.bf=new yn,this.aj=new yn,this.H=null,this.tp=!1}Pt=Nr.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 gn){if(this.On.add(a),a instanceof Ti){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 Sr||this.Pa.add(a);y=a.data,y===null||a instanceof Sr||(a instanceof en?this.bf.add(y,a):this.cf.add(y,a))},Pt.pc=function(a){if(a.Ej(),a instanceof gn){if(this.On.remove(a),a instanceof Ti){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 Sr||this.Pa.remove(a);y=a.data,y===null||a instanceof Sr||(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 Ti)&&Yt('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 Ti||Yt('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||Yt('Invalid link template in Diagram.linkTemplateMap: template for "'+E+'" must be a Link, not a normal Node or simple Part: '+x);for(y=Qn(),x=a.selection.iterator;x.next();)(E=x.value.data)&&y.push(E);for(x=Qn(),a=a.highlighteds.iterator;a.next();)(E=a.value.data)&&x.push(E);for(a=Qn(),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]);Dn(y),Dn(x),Dn(a)}},Nr.prototype.addAllModeledParts=function(){this.addModeledParts(this.diagram.model.nodeDataArray)},Nr.prototype.addModeledParts=function(a,y){var x=this,E=this.diagram.model;a.forEach(function(b){E.lb(b)&&hw(x,b,!1)}),a.forEach(function(b){E.lb(b)&&x.resolveReferencesForData(b)}),y!==!1&&_c(this.diagram,!1)};function hw(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=cw(a,y,E);if(b!==null&&(Yl(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)}}Nr.prototype.insertLink=function(){return null},Nr.prototype.resolveReferencesForData=function(){},Nr.prototype.Ro=function(a){return this.H.model.Ro(a)};function cw(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&&(gw||(gw=!0,wn('No Group template found for category "'+x+'"'),wn(" Using default group template")),y=a.ly))):(y=a.nodeTemplateMap.I(x),y===null&&(y=a.nodeTemplateMap.I(""),y===null&&(dw||(dw=!0,wn('No Node template found for category "'+x+'"'),wn(" Using default node template")),y=a.ny))),y}Nr.prototype.getLinkCategoryForData=function(){return""},Nr.prototype.setLinkCategoryForData=function(){},Nr.prototype.setFromNodeForLink=function(){},Nr.prototype.setToNodeForLink=function(){},Nr.prototype.findLinkTemplateForCategory=function(a){var y=this.H,x=y.linkTemplateMap.I(a);return x===null&&(x=y.linkTemplateMap.I(""),x===null&&(pw||(pw=!0,wn('No Link template found for category "'+a+'"'),wn(" Using default link template")),x=y.my)),x},Nr.prototype.removeAllModeledParts=function(){this.Gs(this.diagram.model.nodeDataArray)},Nr.prototype.Gs=function(a){var y=this;a.forEach(function(x){y.ip(x)})},Nr.prototype.ip=function(a){a=this.Lc(a),a!==null&&(xd(this.diagram,a,!1),this.unresolveReferencesForPart(a))},Nr.prototype.unresolveReferencesForPart=function(){},Nr.prototype.removeDataForLink=function(){},Nr.prototype.findPartForKey=function(a){return a==null?null:(a=this.H.model.hc(a),a!==null?this.cf.I(a):null)},Nr.prototype.Vb=function(a){return a==null||(a=this.H.model.hc(a),a===null)?null:(a=this.cf.I(a),a instanceof gn?a:null)},Nr.prototype.findLinkForKey=function(){return null},Pt=Nr.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 gn?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 le;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(Ne(tt)&&Sv(this,b,tt)){y.add(E);break}}}return y.iterator},Pt.ls=function(a){for(var y=0;y<arguments.length;++y);y=new le;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(Ne(tt)&&Sv(this,b,tt)){y.add(E);break}}}return y.iterator};function Sv(a,y,x){for(var E in x){var b=y[E],z=x[E];if(Bn(z)){if(!Bn(b)||b.length<z.length)return!1;for(var tt=0;tt<b.length;tt++){var rt=z[tt];if(rt!==void 0&&!fw(a,b[tt],rt))return!1}}else if(!fw(a,b,z))return!1}return!0}function fw(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(Ne(y)&&Ne(x)){if(!Sv(a,y,x))return!1}else if(y!==x)return!1;return!0}Nr.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===co){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===Uo){var tt=a.newValue;E==="nodeDataArray"&&Ne(tt)&&hw(this,tt),y.isModified=!0}else if(x===ts){var rt=a.oldValue;E==="nodeDataArray"&&Ne(rt)&&this.ip(rt),y.isModified=!0}else x===da&&(E==="SourceChanged"?a.object!==null?this.updateDataBindings(a.object,a.propertyName):(this.rp(),this.updateAllTargetBindings()):E==="ModelDisplaced"&&this.Wd());else if(x===co){var ot=a.propertyName,at=a.object;at===y.model?(ot==="nodeKeyProperty"||ot==="nodeCategoryProperty")&&(y.undoManager.isUndoingRedoing||this.Wd()):this.updateDataBindings(at,ot),y.isModified=!0}else if(x===Uo||x===ts){var At=a.change===Uo,ft=At?a.newParam:a.oldParam,pt=At?a.newValue:a.oldValue,xt=this.aj.I(a.object);if(Array.isArray(xt))for(a=0;a<xt.length;a++){var Bt=xt[a];if(At)i0(Bt,pt,ft,!0);else if(!(0>ft)){var Mt=ft+op(Bt);Bt.pc(Mt,!0),Qm(Bt,Mt,ft)}}y.isModified=!0}}finally{y.aa=!0}}}}},Nr.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)},Nr.prototype.rp=function(){for(var a=this.H.model,y=new le,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){Pw(a,tt,!1)}),E=0;E<x.length;E++){var z=x[E];this.Lc(z)===null&&Cw(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()},Nr.prototype.refreshDataBoundLinks=function(){},Nr.prototype.updateRelationshipsFromData=function(){},Nr.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=Qn()),x.push(tt))}if(x!==null)break}if(x!==null){for(E=0;E<x.length;E++)x[E].La(y);Dn(x)}}a===this.diagram.model.modelData&&this.updateAllTargetBindings(y)}};function xv(a,y){var x=y.Hh;if(Bn(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 Bv(a,y,x){fA(y,function(tt){tt=tt.O.s;for(var rt=tt.length,ot=0;ot<rt;ot++)Nf(x,tt[ot])});var E=y.Hh;if(Bn(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}}}}Nr.prototype.Kj=function(a,y,x){x===void 0&&(x=!1);var E=new yn;if(Bn(a))for(var b=0;b<a.length;b++)H0(this,a[b],y,E,x);else for(a=a.iterator;a.next();)H0(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 le;for(var z=new yn,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 gn&&rt.data!==null&&x.Tl()){var ot=rt;rt=tt.key;var at=rt.pg();at!==null&&(at=E.I(at),at!==null?(x.qe(ot.data,x.wa(at.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 At=new yn;E.each(function(ft){ft.key.data!==null&&At.add(ft.key.data,ft.value.data)}),x(At,y,this.H.model)}for(y=E.iterator;y.next();)y.value.La();return E};function H0(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 ii))return null;if(z.isSelected=!1,z.isHighlighted=!1,E.add(y,z),y instanceof gn){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 Ti&&z instanceof Ti)for(y=y.memberParts;y.next();)tt=H0(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=H0(a,y.value,x,E,b),tt!==null&&tt instanceof gn&&(tt.labeledLink=z);return z}Nr.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),Ne(E)&&(b.xf(E),x=y.Lc(E)))}else Yl(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)),Ne(b)&&(x.data=b)));return x},We.Object.defineProperties(Nr.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}}}),Nr.prototype.updateAllRelationshipsFromData=Nr.prototype.rp,Nr.prototype.findLinksByExample=Nr.prototype.ls,Nr.prototype.findNodesByExample=Nr.prototype.ms,Nr.prototype.findLinkForData=Nr.prototype.Kc,Nr.prototype.findNodeForData=Nr.prototype.ii,Nr.prototype.findPartForData=Nr.prototype.Lc,Nr.prototype.findNodeForKey=Nr.prototype.Vb,Nr.prototype.removeModeledPart=Nr.prototype.ip,Nr.prototype.removeModeledParts=Nr.prototype.Gs,Nr.prototype.rebuildParts=Nr.prototype.Wd;var dw=!1,gw=!1,pw=!1;Nr.className="PartManager";function Fs(a){Nr.apply(this,arguments)}Le(Fs,Nr),Fs.prototype.addAllModeledParts=function(){var a=this.diagram.model;this.addModeledParts(a.nodeDataArray),mw(this,a.linkDataArray)},Fs.prototype.addModeledParts=function(a){for(Nr.prototype.addModeledParts.call(this,a,!1),a=this.links.iterator;a.next();)Pg(a.value);_c(this.diagram,!1)};function mw(a,y){y.forEach(function(x){vw(a,x)}),_c(a.diagram,!1)}function vw(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){Yl(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=K0(x,y,!0);z!==""&&(b.fromPortId=z),z=bl(x,y,!0),z!==void 0&&(z=a.Vb(z),z instanceof gn&&(b.fromNode=z)),z=K0(x,y,!1),z!==""&&(b.toPortId=z),z=bl(x,y,!1),z!==void 0&&(z=a.Vb(z),z instanceof gn&&(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}}}}Fs.prototype.removeAllModeledParts=function(){var a=this.diagram.model;yw(this,a.linkDataArray),this.Gs(a.nodeDataArray)};function yw(a,y){y.forEach(function(x){a.ip(x)})}Fs.prototype.getLinkCategoryForData=function(a){return this.diagram.model.ps(a)},Fs.prototype.setLinkCategoryForData=function(a,y){return this.diagram.model.lp(a,y)},Fs.prototype.setFromNodeForLink=function(a,y){var x=this.diagram.model;x.wv(a.data,x.wa(y!==null?y.data:null))},Fs.prototype.setToNodeForLink=function(a,y){var x=this.diagram.model;x.Bv(a.data,x.wa(y!==null?y.data:null))},Fs.prototype.removeDataForLink=function(a){this.diagram.model.bm(a.data)},Fs.prototype.findPartForKey=function(a){var y=Nr.prototype.findPartForKey.call(this,a);return y===null&&(a=this.diagram.model.jh(a),a!==null)?this.bf.I(a):y},Fs.prototype.findLinkForKey=function(a){return a==null?null:(a=this.diagram.model.jh(a),a!==null?this.bf.I(a):null)},Fs.prototype.doModelChanged=function(a){var y=this;if(Nr.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===co){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 at=this.Kc(a.object);if(at!==null){var At=a.newValue;typeof At=="string"&&(at.fromPortId=At)}}else if(b==="linkToPortId"){var ft=this.Kc(a.object);if(ft!==null){var pt=a.newValue;typeof pt=="string"&&(ft.toPortId=pt)}}else if(b==="nodeGroupKey"){var xt=this.Lc(a.object);if(xt!==null){var Bt=a.newValue;if(Bt!==void 0){var Mt=this.Vb(Bt);Mt instanceof Ti?xt.containingGroup=Mt:xt.containingGroup=null}else xt.containingGroup=null}}else if(b==="linkLabelKeys"){var Gt=this.Kc(a.object);if(Gt!==null){var Dt=a.oldValue,_t=a.newValue;Array.isArray(Dt)&&Dt.forEach(function(De){0<=_t.indexOf(De)||(De=y.Vb(De),De!==null&&(De.labeledLink=null))}),Array.isArray(_t)&&_t.forEach(function(De){De=y.Vb(De),De!==null&&(De.labeledLink=Gt)})}}else if(b==="linkCategory"){var Zt=this.Kc(a.object),te=a.newValue;Zt!==null&&typeof te=="string"&&(Zt.category=te)}else b==="linkDataArray"&&(yw(this,a.oldValue),mw(this,a.newValue));x.isModified=!0}else if(E===Uo){var ie=a.newValue;if(b==="linkDataArray"&&typeof ie=="object"&&ie!==null)vw(this,ie);else if(b==="linkLabelKeys"&&ef(ie)){var me=this.Kc(a.object),ln=this.Vb(ie);me!==null&&ln!==null&&(ln.labeledLink=me)}x.isModified=!0}else if(E===ts){var Un=a.oldValue;if(b==="linkDataArray"&&typeof Un=="object"&&Un!==null)this.ip(Un);else if(b==="linkLabelKeys"&&ef(Un)){var Fn=this.Vb(Un);Fn!==null&&(Fn.labeledLink=null)}x.isModified=!0}}else if(E===co){var tn=a.propertyName;a.object!==x.model||tn!=="linkFromKeyProperty"&&tn!=="linkToKeyProperty"&&tn!=="linkFromPortIdProperty"&&tn!=="linkToPortIdProperty"&&tn!=="linkLabelKeysProperty"&&tn!=="nodeIsGroupProperty"&&tn!=="nodeGroupKeyProperty"&&tn!=="linkCategoryProperty"||x.undoManager.isUndoingRedoing||this.Wd(),x.isModified=!0}}finally{x.aa=!0}}}}},Fs.prototype.refreshDataBoundLinks=function(){var a=this,y=this.diagram.model,x=new le,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){bw(y,z,!1)}),E.forEach(function(z){a.Kc(z)===null&&kw(y,z,!1)})},Fs.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=bl(E,y,!0);if(b=x.Vb(b),a.fromNode=b,b=bl(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 le().addAll(y);var tt=new le;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 Sr)&&(y=E.lh(y),y=x.findPartForKey(y),y===null||y instanceof Ti)&&(a.containingGroup=y)}}},Fs.prototype.resolveReferencesForData=function(a){var y=this.diagram.model,x=y.wa(a);if(x!==void 0){var E=Pp(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 Ti&&y.lh(tt)===x&&(tt=this.Lc(tt),tt!==null&&(tt.containingGroup=b)):(z.link=this.Kc(tt),z.link!==null&&b instanceof gn&&(bl(y,tt,!0)===x&&(z.link.fromNode=b),bl(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}}QA(y,x)}a=y.lh(a),a!==void 0&&(a=this.Vb(a),a instanceof Ti&&(b.containingGroup=a))}},Fs.prototype.unresolveReferencesForPart=function(a){var y=this.diagram.model;if(a instanceof gn){var x=y.wa(a.data);if(x!==void 0){for(var E=a.linksConnected;E.next();)NA(y,x,E.value.data);if(a.isLinkLabel&&(E=a.labeledLink,E!==null&&NA(y,x,E.data)),a instanceof Ti)for(a=a.memberParts;a.next();)E=a.value.data,y.lb(E)&&NA(y,x,E)}}},Fs.prototype.copyPartData=function(a,y){var x=Nr.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},Fs.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(Yl(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 gn&&(Yl(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&&bg(z,E,z.wa(a.data),!0),Tg(z,E,rt,!0),x!==null&&bg(z,E,z.wa(x.data),!1),Tg(z,E,y,!1),z.fi(E),a=tt.archetypeLabelNodeData,a===null||a instanceof gn||(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},Fs.prototype.findLinkForKey=Fs.prototype.findLinkForKey,Fs.prototype.findPartForKey=Fs.prototype.findPartForKey,Fs.prototype.removeAllModeledParts=Fs.prototype.removeAllModeledParts,Fs.prototype.addModeledParts=Fs.prototype.addModeledParts,Fs.prototype.addAllModeledParts=Fs.prototype.addAllModeledParts,Fs.className="GraphLinksPartManager";function Gl(){Nr.apply(this,arguments),this.Sg=null}Le(Gl,Nr);function R0(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||!oa(E,b,z,null,!0))&&(y=a.getLinkCategoryForData(x.data),E=a.findLinkTemplateForCategory(y),E!==null&&(Yl(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}}}Gl.prototype.getLinkCategoryForData=function(a){return this.diagram.model.ss(a)},Gl.prototype.setLinkCategoryForData=function(a,y){this.diagram.model.Ms(a,y)},Gl.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}},Gl.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))},Gl.prototype.removeDataForLink=function(a){this.diagram.model.qe(a.data,void 0)},Gl.prototype.findLinkForKey=function(a){return a==null?null:(a=this.diagram.model.hc(a),a!==null?this.bf.I(a):null)},Gl.prototype.doModelChanged=function(a){if(Nr.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===co){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:R0(this,z,tt)}}else if(E==="parentLinkCategory"){var ot=this.ii(a.object),at=a.newValue;if(ot!==null&&typeof at=="string"){var At=ot.kh();At!==null&&(At.category=at)}}y.isModified=!0}}else if(x===co){var ft=a.propertyName;a.object===y.model&&ft==="nodeParentKeyProperty"&&(y.undoManager.isUndoingRedoing||this.Wd()),y.isModified=!0}}finally{y.aa=!0}}}}},Gl.prototype.updateRelationshipsFromData=function(a){var y=a.data;if(y!==null){var x=a.diagram;if(x!==null){var E=x.model;a instanceof gn&&(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:R0(this,y,a):E!==null&&xd(x,E,!1)))}}},Gl.prototype.updateDataBindings=function(a,y){Nr.prototype.updateDataBindings.call(this,a,y),typeof y=="string"&&this.Lc(a)!==null&&(a=this.Kc(a),a!==null&&a.La(y))},Gl.prototype.resolveReferencesForData=function(a){var y=this.diagram.model,x=y.wa(a);if(x!==void 0){var E=Pp(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 gn&&y.mh(z)===x&&R0(this,b,this.ii(z))}QA(y,x)}a=y.mh(a),a!==void 0&&b instanceof gn&&(a=this.Vb(a),R0(this,a,b))}},Gl.prototype.unresolveReferencesForPart=function(a){var y=this.diagram.model;if(a instanceof gn){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(ts,"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)&&NA(y,x,b)}},Gl.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},Gl.prototype.findLinkForKey=Gl.prototype.findLinkForKey,Gl.className="TreePartManager";function jn(a,y){this.kl=new le,this.il=new le,this.Wv=`,
"insertedNodeKeys": `,this.jy=`,
"modifiedNodeData": `,this.Yv=`,
"removedNodeKeys": `,this.vh=null,nn(this),this.Sm=this.xa="",this.Gg=!1,this.j={},this.Tc=[],this.kb=new yn,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 yn,this.Lt=new Vt,this.Wg=!1,this.o=null,this.undoManager=new xo,a!==void 0&&(Bn(a)?this.nodeDataArray=a:y=a),y&&(Object.assign(this,y),a=y.Changed)&&(delete this.Changed,this.Pe(a))}jn.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},jn.prototype.copy=function(){var a=new this.constructor;return this.cloneProtected(a),a},jn.prototype.clear=function(){this.Tc=[],this.kb.clear(),this.Vf.clear(),this.undoManager.clear()},jn.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)+":"+rr(b)}}return y},jn.prototype.xA=function(a){a.change!==da&&Yt("Model.toIncrementalData argument is not a Transaction ChangedEvent:"+a.toString());var y=a.object;return a.isTransactionFinished&&y instanceof ps?(Sw(this,y),a=this.Qv(y,a.propertyName==="FinishedUndo"),this.vh=null,a):null},jn.prototype.Qv=function(a,y){var x=this,E=!1,b=new le,z=new le,tt=new le,rt=this.vh;a.changes.each(function(ft){ft.model===x&&(ft.modelChange==="nodeDataArray"?ft.change===Uo?b.add(ft.newValue):ft.change===ts&&tt.add(ft.oldValue):x.lb(ft.object)?z.add(ft.object):ft.change!==co||x.modelData!==ft.object&&ft.propertyName!=="modelData"?ft.object!==null&&(rt&&rt.contains(ft.object)?rt.get(ft.object).each(function(pt){x.lb(pt)&&z.add(pt)}):ft.object instanceof jn||x.ri()&&x.Jc(ft.object)||xw(x,ft.object).each(function(pt){z.add(pt)})):E=!0)});var ot=this.il;ot.clear(),b.each(function(ft){ot.add(x.wa(ft)),y||z.add(ft)});var at=this.kl;at.clear(),tt.each(function(ft){at.add(x.wa(ft)),y&&z.add(ft)}),a=x.cloneDeep(z.Fa());var At=null;return E&&(At===null&&(At={}),At.modelData=this.cloneDeep(this.modelData)),0<ot.count&&(At===null&&(At={}),y?At.removedNodeKeys=ot.Fa():At.insertedNodeKeys=ot.Fa()),0<a.length&&(At===null&&(At={}),At.modifiedNodeData=a),0<at.count&&(At===null&&(At={}),y?At.insertedNodeKeys=at.Fa():At.removedNodeKeys=at.Fa()),at.clear(),ot.clear(),At},jn.prototype.cloneDeep=function(a){return kg(this,a,!0)};function kg(a,y,x,E,b,z){function tt(ft,pt){rt?(ft.__gohashid===void 0&&z.push(ft),E.set(ft,pt)):(ft=vi++,E.set(ft,pt),b.set(ft,y))}if(!Ne(y))return y;z||(z=[]);var rt=Object.isExtensible(y);if(E||(E=new yn),rt){var ot=E.get(y);if(ot)return ot}else for(b||(b=new yn),ot=b.iterator;ot.next();){var at=ot.key;if(ot.value===y&&(at=E.get(at)))return at}if(Array.isArray(y)){ot=[],tt(y,ot);for(var At=0;At<y.length;At++)ot.push(kg(a,y[At],!1,E,b,z))}else if(y instanceof Ot||y instanceof Xe||y instanceof Me||y instanceof Xi||y instanceof ri)ot=y.copy(),tt(y,ot);else{if(y instanceof Mr||y instanceof qe||y instanceof xe)return y;if(y instanceof Vt)ot=new Vt().addAll(kg(a,y.Fa(),!1,E,b,z)),tt(y,ot);else if(y instanceof le)ot=new le().addAll(kg(a,y.Fa(),!1,E,b,z)),tt(y,ot);else if(y instanceof yn)ot=new yn().addAll(kg(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(At in ot={},tt(y,ot),y)At!=="__gohashid"&&(ot[At]=kg(a,y[At],!1,E,b,z))}return x&&z.forEach(function(ft){delete ft.__gohashid}),ot}Pt=jn.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 ww(a,y){y=y.modelData,Ne(y)&&(a.dm(y),a.modelData=y)}Pt.Rv=function(){var a=this.modelData,y=!1,x;for(x in a)if(!Bw(x,a[x])){y=!0;break}return a="",y&&(a=`,
"modelData": `+Cv(this,this.modelData)),a+`,
"nodeDataArray": `+tf(this,this.nodeDataArray,!0)},Pt.kv=function(a){ww(this,a),a=a.nodeDataArray,Bn(a)&&(this.dm(a),this.nodeDataArray=a)};function Sw(a,y){function x(b,z){if((z=z.part)&&(z=z.data,b!==z)){var tt=E.get(b);tt===null?(tt=new le,tt.add(z),E.add(b,tt)):tt.add(z)}}var E=a.vh;E===null&&(E=new yn,y.changes.each(function(b){if(b.diagram!==null){var z=b.change;z===co?(b=b.object.panel)&&(z=b.data)&&x(z,b):(z===Uo||z===ts)&&(b=b.object,(z=b.itemArray)&&x(z,b))}}),a.vh=E)}function xw(a,y){for(var x=new le,E=0;E<a.nodeDataArray.length;E++){var b=a.nodeDataArray[E];G0(a,y,b,b,x)}return x}function G0(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(G0(a,y,tt,E,b))return!0}else if(Ne(x)&&Object.getPrototypeOf(x)===Object.prototype)for(z in x){if(tt=x[z],tt===y)return b.add(E),!0;if(G0(a,y,tt,E,b))return!0}return!1}Pt.Pv=function(a,y){var x=this,E=!1,b=new le,z=new le,tt=new le,rt=this.vh;a.changes.each(function(At){At.model===x&&(At.modelChange==="nodeDataArray"?At.change===Uo?b.add(At.newValue):At.change===ts&&tt.add(At.oldValue):x.lb(At.object)?z.add(At.object):At.change!==co||x.modelData!==At.object&&At.propertyName!=="modelData"?At.object!==null&&(rt&&rt.contains(At.object)?rt.get(At.object).each(function(ft){x.lb(ft)&&z.add(ft)}):At.object instanceof jn||x.ri()&&x.Jc(At.object)||xw(x,At.object).each(function(ft){z.add(ft)})):E=!0)});var ot=this.il;ot.clear(),b.each(function(At){ot.add(x.wa(At)),y||z.add(At)});var at=this.kl;return at.clear(),tt.each(function(At){at.add(x.wa(At)),y&&z.add(At)}),a="",E&&(a+=`,
"modelData": `+Cv(this,this.modelData)),0<ot.count&&(a+=(y?this.Yv:this.Wv)+tf(this,ot.Fa(),!0)),0<z.count&&(a+=this.jy+tf(this,z.Fa(),!0)),0<at.count&&(a+=(y?this.Wv:this.Yv)+tf(this,at.Fa(),!0)),at.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)&&Yt("applyIncrementalJson cannot change Model properties"),ww(this,a);var y=a.insertedNodeKeys,x=a.modifiedNodeData,E=new yn;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!==da&&Yt("Model.toIncrementalJson argument is not a Transaction ChangedEvent:"+a.toString());var x=a.object;return a.isTransactionFinished&&x instanceof ps?(y===void 0&&(y=Fp(this,this)),Sw(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=Fp(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=sn.JSON.parse(a)}catch(E){}else typeof a=="object"?y=a:Yt("Unable to modify a Model from: "+a);var x=y.incremental;typeof x!="number"&&Yt("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)},jn.constructGraphLinksModel=function(){return new jn},Pt=jn.prototype,Pt.dm=function(a){if(Bn(a))for(var y=a.length,x=0;x<y;x++){var E=a[x];if(Ne(E)){var b=x;E=this.dm(E),Array.isArray(a)?a[b]=E:Yt("Cannot replace an object in an HTMLCollection or NodeList at "+b)}}else if(Ne(a)){for(y in a)if(x=a[y],Ne(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 Vt,E=0;E<x.length/2;E++)b.add(new Ot(x[2*E],x[2*E+1]));b.freeze(),a[y]=b}}return b1(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()):Bn(a)?tf(this,a):Ne(a)?Cv(this,a):typeof a=="function"?"null":a.toString()};function tf(a,y,x){x===void 0&&(x=!1);var E=y.length;if(0>=E)return"[]";var b=new Pi;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 Bw(a,y){return y===void 0||a==="__gohashid"||a[0]==="_"||typeof y=="function"}function ba(a){return isNaN(a)?"NaN":a===1/0?"9e9999":a===-1/0?"-9e9999":a}function Cv(a,y){var x=y;if(x instanceof Ot)y={class:"go.Point",x:ba(x.x),y:ba(x.y)};else if(x instanceof Xe)y={class:"go.Size",width:ba(x.width),height:ba(x.height)};else if(x instanceof Me)y={class:"go.Rect",x:ba(x.x),y:ba(x.y),width:ba(x.width),height:ba(x.height)};else if(x instanceof Xi)y={class:"go.Margin",top:ba(x.top),right:ba(x.right),bottom:ba(x.bottom),left:ba(x.left)};else if(x instanceof ri)x.sb()?y={class:"go.Spot",x:ba(x.x),y:ba(x.y),offsetX:ba(x.offsetX),offsetY:ba(x.offsetY)}:y={class:"go.Spot",enum:x.toString()};else if(x instanceof Mr){if(y={class:"go.Brush",type:x.type.name},x.type===sr?y.color=x.color:(x.type===Qi||x.type===Ki)&&(y.start=x.start,y.end=x.end,x.type===Ki&&(x.startRadius!==0&&(y.startRadius=ba(x.startRadius)),isNaN(x.endRadius)||(y.endRadius=ba(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 qe?(y={class:"go.Geometry",type:x.type.name},x.startX!==0&&(y.startX=ba(x.startX)),x.startY!==0&&(y.startY=ba(x.startY)),x.endX!==0&&(y.endX=ba(x.endX)),x.endY!==0&&(y.endY=ba(x.endY)),x.spot1.D(vr)||(y.spot1=x.spot1),x.spot2.D(Go)||(y.spot2=x.spot2),x.type===qe.o&&(y.path=qe.ia(x))):x instanceof xe&&(y={class:"go.EnumValue",classType:Fp(a,x.classType),name:x.name});E="{",x=!0;for(var b in y){var z=Wo(y,b);if(!Bw(b,z))if(x?x=!1:E+=",",E+=a.quote(b)+":",b==="points"&&z instanceof Vt){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 Ta(a){return typeof a=="number"?a:a==="NaN"?NaN:a==="9e9999"?1/0:a==="-9e9999"?-1/0:parseFloat(a)}function b1(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 Ot(Ta(a.x),Ta(a.y));else if(y==="Size")x=new Xe(Ta(a.width),Ta(a.height));else if(y==="Rect")x=new Me(Ta(a.x),Ta(a.y),Ta(a.width),Ta(a.height));else if(y==="Margin")x=new Xi(Ta(a.top),Ta(a.right),Ta(a.bottom),Ta(a.left));else if(y==="Spot")typeof a.enum=="string"?x=ko(a.enum):x=new ri(Ta(a.x),Ta(a.y),Ta(a.offsetX),Ta(a.offsetY));else if(y==="Brush"){if(x=new Mr,x.type=Jn(Mr,a.type),typeof a.color=="string"&&(x.color=a.color),a.start instanceof ri&&(x.start=a.start),a.end instanceof ri&&(x.end=a.end),typeof a.startRadius=="number"&&(x.startRadius=Ta(a.startRadius)),typeof a.endRadius=="number"&&(x.endRadius=Ta(a.endRadius)),a=a.colorStops,Ne(a))for(var E in a)x.addColorStop(parseFloat(E),a[E])}else y==="Geometry"?(x=null,typeof a.path=="string"?x=qe.parse(a.path):x=new qe,x.type=Jn(qe,a.type),typeof a.startX=="number"&&(x.startX=Ta(a.startX)),typeof a.startY=="number"&&(x.startY=Ta(a.startY)),typeof a.endX=="number"&&(x.endX=Ta(a.endX)),typeof a.endY=="number"&&(x.endY=Ta(a.endY)),a.spot1 instanceof ri&&(x.spot1=a.spot1),a.spot2 instanceof ri&&(x.spot2=a.spot2)):y==="EnumValue"&&(E=a.classType,E.indexOf("go.")===0&&(E=E.substr(3)),E=Fv(E),typeof E=="function"&&(x=Jn(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){as(this,"",a,y,x,E,b,z,tt)},Pt.g=function(a,y,x,E,b){as(this,"",co,a,this,y,x,E,b)},Pt.Fs=function(a,y,x,E,b,z){as(this,"",co,y,a,x,E,b,z)};function as(a,y,x,E,b,z,tt,rt,ot){rt===void 0&&(rt=null),ot===void 0&&(ot=null);var at=new vo;at.model=a,at.change=x,at.modelChange=y,at.propertyName=E,at.object=b,at.oldValue=z,at.oldParam=rt,at.newValue=tt,at.newParam=ot,a.ds(at)}jn.prototype.changeState=function(a,y){if(a!==null&&a.model===this)if(a.change===co){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)),Ao(x,E,b)}else a.change===Uo?(x=a.newParam,a.modelChange==="nodeDataArray"?(a=a.newValue,Ne(a)&&typeof x=="number"&&(E=this.wa(a),y?(this.Tc[x]===a&&ci(this.Tc,x),E!==void 0&&this.kb.remove(E)):(this.Tc[x]!==a&&bn(this.Tc,x,a),E!==void 0&&this.kb.add(E,a)))):a.modelChange===""?((E=a.object)&&!Bn(E)&&a.propertyName&&(E=Wo(a.object,a.propertyName)),Bn(E)&&typeof x=="number"&&(a=a.newValue,y?ci(E,x):bn(E,x,a))):Yt("unknown ChangedEvent.Insert modelChange: "+a.toString())):a.change===ts?(x=a.oldParam,a.modelChange==="nodeDataArray"?(a=a.oldValue,Ne(a)&&typeof x=="number"&&(E=this.wa(a),y?(this.Tc[x]!==a&&bn(this.Tc,x,a),E!==void 0&&this.kb.add(E,a)):(this.Tc[x]===a&&ci(this.Tc,x),E!==void 0&&this.kb.remove(E)))):a.modelChange===""?((E=a.object)&&!Bn(E)&&a.propertyName&&(E=Wo(a.object,a.propertyName)),Bn(E)&&typeof x=="number"&&(a=a.oldValue,y?bn(E,x,a):ci(E,x))):Yt("unknown ChangedEvent.Remove modelChange: "+a.toString())):a.change!==da&&Yt("unknown ChangedEvent: "+a.toString())},jn.prototype.Ea=function(a){return this.undoManager.Ea(a)},jn.prototype.eb=function(a){return this.undoManager.eb(a)},jn.prototype.Kf=function(){return this.undoManager.Kf()},jn.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=jn.prototype,Pt.La=function(a,y){y===void 0&&(y=""),as(this,"SourceChanged",da,y,a,null,null)},Pt.wa=function(a){if(a!==null){var y=this.Th;if(y!==""&&(y=Wo(a,y),y!==void 0)){if(ef(y))return y;Yt("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=Wo(a,x);E!==y&&this.hc(y)===null&&(Ao(a,x,y),E!==void 0&&this.kb.remove(E),this.kb.add(y,a),as(this,"nodeKey",co,x,a,E,y),typeof x=="string"&&this.La(a,x),this.jp(E,y))}else Ao(a,x,y)}};function ef(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&&Yt("Model.findNodeDataForKey:key must not be null"),a!==void 0&&ef(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))){Ao(a,y,x);return}if(typeof x=="string"){for(E=2;this.kb.contains(x+E);)E++;Ao(a,y,x+E)}else if(x===void 0||typeof x=="number"){for(x=-this.kb.count-1;this.kb.contains(x);)x--;Ao(a,y,x)}}}}},Pt.xf=function(a){a!==null&&(_n(a),this.lb(a)||Cw(this,a,!0))};function Cw(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&&Yt("Model.makeNodeDataKeyUnique failed on "+y+". Data not added to Model."),a.kb.add(E,y),E=null,x&&(E=a.Tc.length,bn(a.Tc,E,y)),as(a,"nodeDataArray",Uo,"nodeDataArray",a,null,y,null,E),a.fm(y),a.em(y))}Pt.Fy=function(a){if(Bn(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&&Pw(this,a,!0)};function Pw(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;ci(a.Tc,E)}as(a,"nodeDataArray",ts,"nodeDataArray",a,y,null,E,null),a.qp(y)}Pt.nA=function(a){if(Bn(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&&Bn(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=Pp(this,a),a instanceof le&&this.Vf.add(y,a))},Pt.Lv=function(){},Pt.fm=function(){},Pt.em=function(){},Pt.qp=function(){};function NA(a,y,x){if(y!==void 0){var E=a.Vf.I(y);E===null&&(E=new le,a.Vf.add(y,E)),E.add(x)}}function QA(a,y,x){if(y!==void 0){var E=a.Vf.I(y);E instanceof le&&(x==null?a.Vf.remove(y):(E.remove(x),E.count===0&&a.Vf.remove(y)))}}function Pp(a,y){return y===void 0?null:(a=a.Vf.I(y),a instanceof le?a:null)}Pt.Qy=function(a){a===void 0?this.Vf.clear():this.Vf.remove(a)},jn.prototype.copyNodeData=function(a){if(a===null)return null;var y=this.Bk;return a=y!==null?y(a,this):z0(this,a,!0),Ne(a)&&nn(a),a};function z0(a,y,x){if(a.copiesArrays&&Array.isArray(y)){var E=[];for(x=0;x<y.length;x++){var b=z0(a,y[x],a.copiesArrayObjects);E.push(b)}return nn(E),E}if(x&&Ne(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=Wo(y,E),tt=Fp(a,z);tt==="GraphObject"||tt==="Diagram"||tt==="Layer"||tt==="RowColumnDefinition"||tt==="AnimationManager"||tt==="Tool"||tt==="CommandHandler"||tt==="Layout"||tt==="InputEvent"||tt==="DiagramEvent"||z instanceof jn||z instanceof xo||z instanceof ps||z instanceof vo||(z=z0(a,z,!1)),Ao(x,E,z)}return nn(x),x}return y instanceof Ot||y instanceof Xe||y instanceof Me||y instanceof ri||y instanceof Xi?y.copy():y}jn.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!Fw&&a instanceof re&&(Fw=!0,wn('Model.setDataProperty is modifying a GraphObject, "'+a.toString()+'"'),wn(" Is that really your intent?"));var E=Wo(a,y);E!==x&&(Ao(a,y,x),this.Fs(a,y,E,x))},Pt=jn.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),bn(a,y,x),as(this,"",Uo,"",a,null,x,null,y)},Pt.ov=function(a,y){y===void 0&&(y=-1),a===this.Tc&&Yt("Model.removeArrayItem should not be called on the Model.nodeDataArray"),y===-1&&(y=a.length-1);var x=a[y];ci(a,y),as(this,"",ts,"",a,x,null,y,null)},Pt.Ro=function(a){if(a===null)return"";var y=this.lj;if(y===""||(y=Wo(a,y),y===void 0))return"";if(typeof y=="string")return y;Yt("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=Wo(a,x);E===void 0&&(E=""),E!==y&&(Ao(a,x,y),as(this,"nodeCategory",co,x,a,E,y))}else Ao(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 Pv(){return new jn}function Fp(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 Fp(a,y.constructor);return typeof y}function Fv(a){return pA[a]?pA[a]:sn.go!==void 0&&sn.go[a]?sn.go[a]:null}function Wo(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 Ao(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){}}We.Object.defineProperties(jn.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===""&&Yt("Model.nodeKeyProperty may not be the empty string"),0<this.kb.count&&Yt("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];Ne(b)||Yt("Model.nodeDataArray must only contain Objects, not: "+b),_n(b)}for(this.Tc=a,E=new Vt,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(as(this,"nodeDataArray",co,"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"}}}),jn.prototype.setCategoryForNodeData=jn.prototype.jm,jn.prototype.getCategoryForNodeData=jn.prototype.Ro,jn.prototype.removeArrayItem=jn.prototype.ov,jn.prototype.insertArrayItem=jn.prototype.ts,jn.prototype.addArrayItem=jn.prototype.Ay,jn.prototype.assignAllDataProperties=jn.prototype.Do,jn.prototype.set=jn.prototype.set,jn.prototype.clearUnresolvedReferences=jn.prototype.Qy,jn.prototype.mergeNodeDataArray=jn.prototype.$z,jn.prototype.removeNodeDataCollection=jn.prototype.nA,jn.prototype.removeNodeData=jn.prototype.cm,jn.prototype.addNodeDataCollection=jn.prototype.Fy,jn.prototype.addNodeData=jn.prototype.xf,jn.prototype.makeNodeDataKeyUnique=jn.prototype.$u,jn.prototype.findNodeDataForKey=jn.prototype.hc,jn.prototype.containsNodeData=jn.prototype.lb,jn.prototype.setKeyForNodeData=jn.prototype.km,jn.prototype.getKeyForNodeData=jn.prototype.wa,jn.prototype.updateTargetBindings=jn.prototype.La,jn.prototype.commit=jn.prototype.commit,jn.prototype.rollbackTransaction=jn.prototype.Kf,jn.prototype.commitTransaction=jn.prototype.eb,jn.prototype.startTransaction=jn.prototype.Ea,jn.prototype.raiseDataChanged=jn.prototype.Fs,jn.prototype.raiseChanged=jn.prototype.g,jn.prototype.raiseChangedEvent=jn.prototype.cb,jn.prototype.removeChangedListener=jn.prototype.ik,jn.prototype.addChangedListener=jn.prototype.Pe,jn.prototype.writeJsonValue=jn.prototype.sm,jn.prototype.replaceJsonObjects=jn.prototype.dm,jn.prototype.applyIncrementalJSON=jn.prototype.Ky,jn.prototype.applyIncrementalJson=jn.prototype.Zw,jn.prototype.toJSON=jn.prototype.toJSON,jn.prototype.toJson=jn.prototype.np,jn.prototype.toIncrementalJSON=jn.prototype.yA,jn.prototype.toIncrementalJson=jn.prototype.$x,jn.prototype.toIncrementalData=jn.prototype.xA,jn.prototype.clear=jn.prototype.clear;var Fw=!1,pA={};jn.className="Model",jn.fromJSON=jn.fromJson=function(a,y){y===void 0&&(y=null);var x=null;if(typeof a=="string")try{x=sn.JSON.parse(a)}catch(z){}else typeof a=="object"?x=a:Yt("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=Fv(E)):(b=Fv(E),b===null&&(b=sn[E])),typeof b=="function"&&(a=new b)}catch(z){}a===null||a instanceof jn?y=a:Yt("Unable to construct a Model of declared class: "+x.class)}return y===null&&(y=jn.constructGraphLinksModel()),y.gp(x),y.kv(x),y},jn.safePropertyValue=Wo,jn.safePropertySet=Ao,pA.Brush=Mr,pA.ChangedEvent=vo,pA.Geometry=qe,pA.Margin=Xi,pA.Panel=je,pA.Point=Ot,pA.Rect=Me,pA.Size=Xe,pA.Spot=ri,pA.Transaction=ps,pA.UndoManager=xo;function Jo(a,y,x,E){nn(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=Ew,this.wk=null):(this.el=Lp,this.wk=E),this.st=new le}Jo.prototype.copy=function(){var a=new Jo;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=Jo.prototype,Pt.qb=function(a){a.classType===Jo&&(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=Lp,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 Lw(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==="")wn("Binding error: target property is the empty string: "+this.toString());else{var z=y;if(E!==""&&(z=Wo(y,E)),z!==void 0)if(b===null)x!==""&&Ao(a,x,z);else try{if(x!==""){var tt=b(z,a);Ao(a,x,tt)}else b(z,a)}catch(rt){}}}},Pt.sp=function(a,y,x,E){if(this.el===Lp){var b=this.xl;if(x===void 0||b===x){x=this.sl;var z=this.wk,tt=a;if(b!==""&&(tt=Wo(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):Ao(y,x,tt);else if(ot!==null&&E!==null&&0<=E.itemIndex&&E.panel!==null&&Array.isArray(E.panel.itemArray)){var at=E.itemIndex,At=E.panel.itemArray;ot.ov(At,at),ot.ts(At,at,tt)}}else try{if(x!==""){var ft=z(tt,y,ot);ot!==null?ot.setDataProperty(y,x,ft):Ao(y,x,ft)}else{var pt=z(tt,y,ot);if(pt!==void 0&&ot!==null&&E!==null&&0<=E.itemIndex&&E.panel!==null&&Array.isArray(E.panel.itemArray)){var xt=E.itemIndex,Bt=E.panel.itemArray;ot.ov(Bt,xt),ot.ts(Bt,xt,pt)}}}catch(Mt){}}finally{this.st.remove(a)}}}},We.Object.defineProperties(Jo.prototype,{Ai:{get:function(){return this.j},set:function(a){this._isFrozen&&de(this),this.j=a}},targetProperty:{get:function(){return this.xl},set:function(a){this._isFrozen&&de(this),this.xl=a}},sourceName:{get:function(){return this.Cr},set:function(a){this._isFrozen&&de(this),this.Cr=a,a!==null&&(this.wn=!1)}},isToModel:{get:function(){return this.wn},set:function(a){this._isFrozen&&de(this),this.wn=a}},sourceProperty:{get:function(){return this.sl},set:function(a){this._isFrozen&&de(this),this.sl=a}},converter:{get:function(){return this.Im},set:function(a){this._isFrozen&&de(this),this.Im=a}},backConverter:{get:function(){return this.wk},set:function(a){this._isFrozen&&de(this),this.wk=a}},mode:{get:function(){return this.el},set:function(a){this._isFrozen&&de(this),this.el=a}}}),Jo.prototype.updateSource=Jo.prototype.sp,Jo.prototype.updateTarget=Jo.prototype.Mv,Jo.prototype.ofModel=Jo.prototype.dA,Jo.prototype.ofObject=Jo.prototype.cp,Jo.prototype.makeTwoWay=Jo.prototype.Kx;var T1="Binding",Ew=new xe(Jo,"OneWay",1),Lp=new xe(Jo,"TwoWay",2);Jo.className="Binding",Jo.parseEnum=function(a,y){return function(x){return x=Jn(a,x),x===null?y:x}},Jo.toString=rr,Jo.OneWay=Ew,Jo.TwoWay=Lp;function Ar(a,y,x){jn.call(this),this.Vv=`,
"insertedLinkKeys": `,this.iy=`,
"modifiedLinkData": `,this.Xv=`,
"removedLinkKeys": `,this.md=[],this.$f=new le,this.wb=new yn,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&&(Bn(a)?this.nodeDataArray=a:x=a),x&&(Object.assign(this,x),a=x.Changed)&&(delete this.Changed,this.Pe(a))}Le(Ar,jn),Ar.constructGraphLinksModel=jn.constructGraphLinksModel,Ar.prototype.cloneProtected=function(a){jn.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=Ar.prototype,Pt.clear=function(){jn.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)+":"+rr(b)}for(y+=`
link data:`,a=this.linkDataArray,x=a.length,E=0;E<x;E++)b=a[E],y+=" "+bl(this,b,!0)+"-->"+bl(this,b,!1)}return y},Pt.Qv=function(a,y){this.linkKeyProperty===""&&Yt("GraphLinksModel.linkKeyProperty must not be an empty string for .toIncrementalData() to succeed.");var x=jn.prototype.Qv.call(this,a,y),E=this,b=new le,z=new le,tt=new le,rt=this.vh;a.changes.each(function(At){At.model===E&&(At.modelChange==="linkDataArray"?At.change===Uo?b.add(At.newValue):At.change===ts&&tt.add(At.oldValue):E.Jc(At.object)?z.add(At.object):At.object!==null&&(At.object!==null&&rt&&rt.contains(At.object)?rt.get(At.object).each(function(ft){E.Jc(ft)&&z.add(ft)}):At.object instanceof jn||E.lb(At.object)||Mw(E,At.object).each(function(ft){z.add(ft)})))});var ot=this.il;ot.clear(),b.each(function(At){ot.add(E.Ac(At)),y||z.add(At)});var at=this.kl;return at.clear(),tt.each(function(At){at.add(E.Ac(At)),y&&z.add(At)}),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<at.count&&(x===null&&(x={}),y?x.insertedLinkKeys=at.Fa():x.removedLinkKeys=at.Fa()),at.clear(),ot.clear(),x},Pt.rm=function(){var a=jn.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){jn.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=jn.prototype.Rv.call(this),y=`,
"linkDataArray": `+tf(this,this.linkDataArray,!0);return a+y},Pt.kv=function(a){jn.prototype.kv.call(this,a),a=a.linkDataArray,Array.isArray(a)&&(this.dm(a),this.linkDataArray=a)};function Mw(a,y){for(var x=new le,E=0;E<a.linkDataArray.length;E++){var b=a.linkDataArray[E];G0(a,y,b,b,x)}return x}Pt.Pv=function(a,y){this.linkKeyProperty===""&&Yt("GraphLinksModel.linkKeyProperty must not be an empty string for .toIncrementalJson() to succeed.");var x=jn.prototype.Pv.call(this,a,y),E=this,b=new le,z=new le,tt=new le,rt=this.vh;a.changes.each(function(At){At.model===E&&(At.modelChange==="linkDataArray"?At.change===Uo?b.add(At.newValue):At.change===ts&&tt.add(At.oldValue):E.Jc(At.object)?z.add(At.object):At.object!==null&&(At.object!==null&&rt&&rt.contains(At.object)?rt.get(At.object).each(function(ft){E.Jc(ft)&&z.add(ft)}):At.object instanceof jn||E.lb(At.object)||Mw(E,At.object).each(function(ft){z.add(ft)})))});var ot=this.il;ot.clear(),b.each(function(At){ot.add(E.Ac(At)),y||z.add(At)});var at=this.kl;return at.clear(),tt.each(function(At){at.add(E.Ac(At)),y&&z.add(At)}),a=x,0<ot.count&&(a+=(y?this.Xv:this.Vv)+tf(this,ot.Fa(),!0)),0<z.count&&(a+=this.iy+tf(this,z.Fa(),!0)),0<at.count&&(a+=(y?this.Vv:this.Xv)+tf(this,at.Fa(),!0)),at.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)&&Yt("applyIncrementalJson cannot change Model properties"),jn.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]);Tw(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)},Ar.prototype.changeState=function(a,y){if(a!==null&&a.model===this){if(a.change===co){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),Ao(x,E,b);return}}else if(a.change===Uo){if(x=a.newParam,a.modelChange==="linkDataArray"){a=a.newValue,Ne(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===ts){if(x=a.oldParam,a.modelChange==="linkDataArray"){a=a.oldValue,Ne(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}}jn.prototype.changeState.call(this,a,y)}},Pt=Ar.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),Ao(x,this.nodeKeyProperty,a),this.xf(x))}return a}},Pt.yx=function(a){return bl(this,a,!0)},Pt.wv=function(a,y){bg(this,a,y,!0)},Pt.Bx=function(a){return bl(this,a,!1)},Pt.Bv=function(a,y){bg(this,a,y,!1)};function bl(a,y,x){if(y!==null&&(a=x?a.lf:a.mf,a!==""&&(a=Wo(y,a),a!==void 0))){if(ef(a))return a;Yt((x?"FromKey":"ToKey")+" value for link data "+y+" is not a number or a string: "+a)}}function bg(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=Wo(y,b);z!==x&&(QA(a,z,y),Ao(y,b,x),a.hc(x)===null&&NA(a,x,y),as(a,E?"linkFromKey":"linkToKey",co,b,y,z,x),typeof b=="string"&&a.La(y,b))}else Ao(y,b,x)}}Pt.zx=function(a){return K0(this,a,!0)},Pt.xv=function(a,y){Tg(this,a,y,!0)},Pt.Cx=function(a){return K0(this,a,!1)},Pt.Cv=function(a,y){Tg(this,a,y,!1)};function K0(a,y,x){return y===null||(a=x?a.ej:a.fj,a==="")?"":(y=Wo(y,a),y===void 0?"":y)}function Tg(a,y,x,E){if(y!==null){var b=E?a.ej:a.fj;if(b!=="")if(a.Jc(y)){var z=Wo(y,b);z===void 0&&(z=""),z!==x&&(Ao(y,b,x),as(a,E?"linkFromPortId":"linkToPortId",co,b,y,z,x),typeof b=="string"&&a.La(y,b))}else Ao(y,b,x)}}Pt.Ef=function(a){if(a===null)return j0;var y=this.je;return y===""?j0:(a=Wo(a,y),a===void 0?j0:a)},Pt.Ls=function(a,y){if(a!==null){var x=this.je;if(x!=="")if(this.Jc(a)){var E=Wo(a,x);if(E===void 0&&(E=j0),E!==y){if(Array.isArray(E))for(var b=E.length,z=0;z<b;z++)QA(this,E[z],a);for(Ao(a,x,y),b=y.length,z=0;z<b;z++){var tt=y[z];this.hc(tt)===null&&NA(this,tt,a)}as(this,"linkLabelKeys",co,x,a,E,y),typeof x=="string"&&this.La(a,x)}}else Ao(a,x,y)}},Pt.Bu=function(a,y){if(y!=null&&a!==null){var x=this.je;if(x!==""){var E=Wo(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&&NA(this,y,a),as(this,"linkLabelKeys",Uo,x,a,null,y,null,b)))}else Yt(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=Wo(a,x);if(Array.isArray(E)){var b=E.indexOf(y);0>b||(E.splice(b,1),this.Jc(a)&&(QA(this,y,a),as(this,"linkLabelKeys",ts,x,a,y,null,b,null)))}else E!==void 0&&Yt(x+" property is not an Array; cannot removeLabelKeyforLinkData: "+a)}}},Pt.Ac=function(a){if(a!==null){var y=this.Jh;if(y!==""&&(y=Wo(a,y),y!==void 0)){if(ef(y))return y;Yt("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=Wo(a,x);E!==y&&this.jh(y)===null&&(Ao(a,x,y),E!==void 0&&this.wb.remove(E),this.wb.add(y,a),as(this,"linkKey",co,x,a,E,y),typeof x=="string"&&this.La(a,x))}else Ao(a,x,y)}},Pt.jh=function(a){return a===null&&Yt("GraphLinksModel.findLinkDataForKey:key must not be null"),a!==void 0&&ef(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))){Ao(a,y,x);return}if(typeof x=="string"){for(E=2;this.wb.contains(x+E);)E++;Ao(a,y,x+E)}else if(x===void 0||typeof x=="number"){for(x=-this.wb.count-1;this.wb.contains(x);)x--;Ao(a,y,x)}}}}},Pt.Jc=function(a){return a===null?!1:this.$f.contains(a)},Pt.fi=function(a){a!==null&&(_n(a),this.Jc(a)||kw(this,a,!0))};function kw(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&&Yt("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)),as(a,"linkDataArray",Uo,"linkDataArray",a,null,y,null,E),Lv(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&&bw(this,a,!0)};function bw(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(as(a,"linkDataArray",ts,"linkDataArray",a,y,null,E,null),x=bl(a,y,!0),QA(a,x,y),x=bl(a,y,!1),QA(a,x,y),E=a.Ef(y),Array.isArray(E))for(var b=E.length,z=0;z<b;z++)x=E[z],QA(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===""&&Yt("GraphLinksModel.linkKeyProperty must not be an empty string for .mergeLinkDataArray() to succeed."),a!==this.linkDataArray&&Bn(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),Tw(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 Lv(a,y){var x=bl(a,y,!0);x=a.Vl(x),a.hc(x)===null&&NA(a,x,y),x=bl(a,y,!1),x=a.Vl(x),a.hc(x)===null&&NA(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&&NA(a,x,y)}Pt.Jo=function(a){if(a===null)return null;var y=this.Ak;return a=y!==null?y(a,this):z0(this,a,!0),Ne(a)&&(nn(a),this.lf!==""&&Ao(a,this.lf,void 0),this.mf!==""&&Ao(a,this.mf,void 0),this.je!==""&&Ao(a,this.je,[])),a},Pt.Yu=function(a){if(a===null)return!1;var y=this.jl;return y===""?!1:!!Wo(a,y)},Pt.lh=function(a){if(a!==null){var y=this.Je;if(y!==""&&(y=Wo(a,y),y!==void 0)){if(ef(y))return y;Yt("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=Wo(a,x);E!==y&&(QA(this,E,a),Ao(a,x,y),this.hc(y)===null&&NA(this,y,a),as(this,"nodeGroupKey",co,x,a,E,y),typeof x=="string"&&this.La(a,x))}else Ao(a,x,y)}},Ar.prototype.copyNodeData=function(a){return a===null?null:(a=jn.prototype.copyNodeData.call(this,a),this.Ij||this.Je===""||Wo(a,this.Je)===void 0||Ao(a,this.Je,void 0),a)},Ar.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){bg(this,a,x,!0);return}if(y===this.linkToKeyProperty){bg(this,a,x,!1);return}if(y===this.linkFromPortIdProperty){Tg(this,a,x,!0);return}if(y===this.linkToPortIdProperty){Tg(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=Wo(a,y);E!==x&&(Ao(a,y,x),this.Fs(a,y,E,x))},Pt=Ar.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&&Wo(a,b)===y[b]||E&&b===this.linkKeyProperty||this.setDataProperty(a,b,y[b])}},Pt.jp=function(a,y){jn.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(bl(this,E,!0)===b){var tt=this.lf;Ao(E,tt,z),as(this,"linkFromKey",co,tt,E,b,z),typeof tt=="string"&&this.La(E,tt)}if(bl(this,E,!1)===b&&(tt=this.mf,Ao(E,tt,z),as(this,"linkToKey",co,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,at=0;at<rt;at++)tt[at]===b&&(tt[at]=z,as(this,"linkLabelKeys",Uo,ot,E,b,z,at,at))}},Pt.qv=function(a,y,x){if(this.lh(a)===y){var E=this.Je;Ao(a,E,x),as(this,"nodeGroupKey",co,E,a,y,x),typeof E=="string"&&this.La(a,E)}},Pt.Lv=function(){jn.prototype.Lv.call(this);for(var a=this.linkDataArray,y=a.length,x=0;x<y;x++)Lv(this,a[x])},Pt.fm=function(a){jn.prototype.fm.call(this,a),a=this.wa(a);var y=Pp(this,a);if(y!==null){var x=Qn();for(y=y.iterator;y.next();){var E=y.value;if(this.lb(E)){if(this.lh(E)===a){var b=this.Je;as(this,"nodeGroupKey",co,b,E,a,a),typeof b=="string"&&this.La(E,b),x.push(E)}}else if(bl(this,E,!0)===a&&(b=this.lf,as(this,"linkFromKey",co,b,E,a,a),typeof b=="string"&&this.La(E,b),x.push(E)),bl(this,E,!1)===a&&(b=this.mf,as(this,"linkToKey",co,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&&(as(this,"linkLabelKeys",Uo,tt,E,a,a,rt,rt),x.push(E))}for(y=0;y<x.length;y++)QA(this,a,x[y]);Dn(x)}},Pt.em=function(a){jn.prototype.em.call(this,a);var y=this.lh(a);this.hc(y)===null&&NA(this,y,a)},Pt.qp=function(a){jn.prototype.qp.call(this,a);var y=this.lh(a);QA(this,y,a)},Pt.ps=function(a){if(a===null)return"";var y=this.dj;if(y===""||(y=Wo(a,y),y===void 0))return"";if(typeof y=="string")return y;Yt("getCategoryForLinkData found a non-string category for "+a+": "+y)},Ar.prototype.getLinkCategoryForData=function(a){return this.ps(a)},Ar.prototype.lp=function(a,y){if(a!==null){var x=this.dj;if(x!=="")if(this.Jc(a)){var E=Wo(a,x);E===void 0&&(E=""),E!==y&&(Ao(a,x,y),as(this,"linkCategory",co,x,a,E,y),typeof x=="string"&&this.La(a,x))}else Ao(a,x,y)}},Ar.prototype.setLinkCategoryForData=function(a,y){this.lp(a,y)},Pt=Ar.prototype,Pt.lm=function(a,y){jn.prototype.lm.call(this,a,y),this.mp(y,this.lh(a))};function Tw(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},We.Object.defineProperties(Ar.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];Ne(b)||Yt("GraphLinksModel.linkDataArray must only contain Objects, not: "+b),_n(b)}if(this.md=a,this.linkKeyProperty!==""){for(E=new Vt,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 le,b=0;b<x;b++)E.add(a[b]);for(this.$f=E,as(this,"linkDataArray",co,"linkDataArray",this,y,a),y=0;y<x;y++)Lv(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"}}}),Ar.prototype.setCategoryForLinkData=Ar.prototype.lp,Ar.prototype.getCategoryForLinkData=Ar.prototype.ps,Ar.prototype.assignAllDataProperties=Ar.prototype.Do,Ar.prototype.setGroupKeyForNodeData=Ar.prototype.mp,Ar.prototype.getGroupKeyForNodeData=Ar.prototype.lh,Ar.prototype.isGroupForNodeData=Ar.prototype.Yu,Ar.prototype.copyLinkData=Ar.prototype.Jo,Ar.prototype.mergeLinkDataArray=Ar.prototype.Zz,Ar.prototype.removeLinkDataCollection=Ar.prototype.lA,Ar.prototype.removeLinkData=Ar.prototype.bm,Ar.prototype.addLinkDataCollection=Ar.prototype.Ey,Ar.prototype.addLinkData=Ar.prototype.fi,Ar.prototype.containsLinkData=Ar.prototype.Jc,Ar.prototype.makeLinkDataKeyUnique=Ar.prototype.Bs,Ar.prototype.findLinkDataForKey=Ar.prototype.jh,Ar.prototype.setKeyForLinkData=Ar.prototype.Ks,Ar.prototype.getKeyForLinkData=Ar.prototype.Ac,Ar.prototype.removeLabelKeyForLinkData=Ar.prototype.Qx,Ar.prototype.addLabelKeyForLinkData=Ar.prototype.Bu,Ar.prototype.setLabelKeysForLinkData=Ar.prototype.Ls,Ar.prototype.getLabelKeysForLinkData=Ar.prototype.Ef,Ar.prototype.setToPortIdForLinkData=Ar.prototype.Cv,Ar.prototype.getToPortIdForLinkData=Ar.prototype.Cx,Ar.prototype.setFromPortIdForLinkData=Ar.prototype.xv,Ar.prototype.getFromPortIdForLinkData=Ar.prototype.zx,Ar.prototype.setToKeyForLinkData=Ar.prototype.Bv,Ar.prototype.getToKeyForLinkData=Ar.prototype.Bx,Ar.prototype.setFromKeyForLinkData=Ar.prototype.wv,Ar.prototype.getFromKeyForLinkData=Ar.prototype.yx,Ar.prototype.clear=Ar.prototype.clear;var j0=Object.freeze([]);Ar.className="GraphLinksModel",pA.GraphLinksModel=Ar,jn.constructGraphLinksModel=jn.constructGraphLinksModel=function(){return new Ar},jn.initDiagramModel=Pv=function(){return new Ar};function Ia(a,y){jn.call(this),this.Ke="parent",this.Nm=!1,this.nj="parentLinkCategory",a!==void 0&&(Bn(a)?this.nodeDataArray=a:y=a),y&&(Object.assign(this,y),a=y.Changed)&&(delete this.Changed,this.Pe(a))}Le(Ia,jn),Ia.constructGraphLinksModel=jn.constructGraphLinksModel,Ia.prototype.cloneProtected=function(a){jn.prototype.cloneProtected.call(this,a),a.Ke=this.Ke,a.Nm=this.Nm,a.nj=this.nj},Pt=Ia.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)+":"+rr(b)}}return y},Pt.rm=function(){var a=jn.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){jn.prototype.gp.call(this,a),a.nodeParentKeyProperty&&(this.nodeParentKeyProperty=a.nodeParentKeyProperty)},Pt.fp=function(a){a.nodeParentKeyProperty!==void 0&&a.nodeParentKeyProperty!==this.nodeParentKeyProperty&&Yt("applyIncrementalJson cannot change Model properties"),jn.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=Wo(a,y),y!==void 0)){if(ef(y))return y;Yt("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=Wo(a,x);E!==y&&(QA(this,E,a),Ao(a,x,y),this.hc(y)===null&&NA(this,y,a),as(this,"nodeParentKey",co,x,a,E,y),typeof x=="string"&&this.La(a,x))}else Ao(a,x,y)}},Pt.ss=function(a){if(a===null)return"";var y=this.nj;return y===""||(y=Wo(a,y),y===void 0)?"":typeof y=="string"?y:(Yt("getParentLinkCategoryForNodeData found a non-string category for "+a+": "+y),"")},Ia.prototype.getLinkCategoryForData=function(a){return this.ss(a)},Ia.prototype.Ms=function(a,y){if(a!==null){var x=this.nj;if(x!=="")if(this.lb(a)){var E=Wo(a,x);E===void 0&&(E=""),E!==y&&(Ao(a,x,y),as(this,"parentLinkCategory",co,x,a,E,y),typeof x=="string"&&this.La(a,x))}else Ao(a,x,y)}},Ia.prototype.setLinkCategoryForData=function(a,y){this.Ms(a,y)},Ia.prototype.copyNodeData=function(a){return a===null?null:(a=jn.prototype.copyNodeData.call(this,a),this.Jj||this.Ke===""||Wo(a,this.Ke)===void 0||Ao(a,this.Ke,void 0),a)},Ia.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=Wo(a,y);E!==x&&(Ao(a,y,x),this.Fs(a,y,E,x))},Pt=Ia.prototype,Pt.jp=function(a,y){jn.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;Ao(a,E,x),as(this,"nodeParentKey",co,E,a,y,x),typeof E=="string"&&this.La(a,E)}},Pt.fm=function(a){jn.prototype.fm.call(this,a),a=this.wa(a);var y=Pp(this,a);if(y!==null){var x=Qn();for(y=y.iterator;y.next();){var E=y.value;if(this.lb(E)&&this.mh(E)===a){var b=this.Ke;as(this,"nodeParentKey",co,b,E,a,a),typeof b=="string"&&this.La(E,b),x.push(E)}}for(y=0;y<x.length;y++)QA(this,a,x[y]);Dn(x)}},Pt.em=function(a){jn.prototype.em.call(this,a);var y=this.mh(a);y=this.Vl(y),this.hc(y)===null&&NA(this,y,a)},Pt.qp=function(a){jn.prototype.qp.call(this,a);var y=this.mh(a);QA(this,y,a)},Pt.lm=function(a,y){jn.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},We.Object.defineProperties(Ia.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"}}}),Ia.prototype.setParentLinkCategoryForNodeData=Ia.prototype.Ms,Ia.prototype.getParentLinkCategoryForNodeData=Ia.prototype.ss,Ia.prototype.setParentKeyForNodeData=Ia.prototype.qe,Ia.prototype.getParentKeyForNodeData=Ia.prototype.mh,Ia.className="TreeModel",pA.TreeModel=Ia;function Lo(a){po.call(this),this.lw=this.Zm=this.lc=0,this.Wp=360,this.kw=mA,this.Ti=0,this.Zv=new Ot,this.Jp=this.me=0,this.Xr=new bp,this.gt=this.mj=0,this.ty=600,this.eo=NaN,this.Cm=1,this.ro=0,this.ul=360,this.Rb=mA,this.K=Na,this.nd=Ng,this.hd=yv,this.tf=6,this.Nn=J0,a&&Object.assign(this,a)}Le(Lo,po),Lo.prototype.cloneProtected=function(a){po.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},Lo.prototype.qb=function(a){a.classType===Lo?a===X0||a===Z0||a===W0||a===Y0||a===Ng?this.sorting=a:a===Jf||a===Ig||a===Na||a===rf?this.direction=a:a===gc||a===nf||a===mA||a===vA?this.arrangement=a:(a===Kd||a===J0)&&(this.nodeDiameterFormula=a):po.prototype.qb.call(this,a)},Lo.prototype.createNetwork=function(){return new Qg(this)},Lo.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 Vt;y.addAll(a.iterator),a=new Vt;var x=new Vt,E=this.sort(y),b,z,tt=this.Jp,rt=this.arrangement,ot=this.nodeDiameterFormula,at=this.radius;(!isFinite(at)||0>=at)&&(at=NaN);var At=this.aspectRatio;(!isFinite(At)||0>=At)&&(At=1);var ft=this.startAngle;isFinite(ft)||(ft=0);var pt=this.sweepAngle;if((!isFinite(pt)||360<pt||1>pt)&&(pt=360),y=this.spacing,isFinite(y)||(y=NaN),rt===vA&&ot===Kd?rt=mA:rt===vA&&ot!==Kd&&(rt=this.arrangement),(this.direction===Jf||this.direction===Ig)&&this.sorting!==Ng){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===Jf?(this.arrangement===vA&&a.reverse(),E=new Vt,E.addAll(a),E.addAll(x)):(this.arrangement===vA&&x.reverse(),E=new Vt,E.addAll(x),E.addAll(a))}ot=E.length;for(var xt=z=b=0;xt<E.length;xt++){var Bt=ft+pt*z*(this.direction===Na?1:-1)/ot,Mt=E.M(xt).diameter;isNaN(Mt)&&(Mt=of(E.M(xt),Bt)),360>pt&&(xt===0||xt===E.length-1)&&(Mt/=2),b+=Mt,z++}if(isNaN(at)||rt===vA){if(isNaN(y)&&(y=6),rt!==mA&&rt!==vA){for(z=-1/0,tt=0;tt<ot;tt++)xt=E.M(tt),b=E.M(tt===ot-1?0:tt+1),isNaN(xt.diameter)&&of(xt,0),isNaN(b.diameter)&&of(b,0),z=Math.max(z,(xt.diameter+b.diameter)/2);tt=z+y,rt===gc?at=(z+y)/(2*Math.PI/ot):at=V0(this,tt*(360<=pt?ot:ot-1),At,ft*Math.PI/180,pt*Math.PI/180)}else at=V0(this,b+(360<=pt?ot:ot-1)*(rt!==vA?y:1.6*y),At,ft*Math.PI/180,pt*Math.PI/180);z=at*At}else if(z=at*At,xt=Ev(this,at,z,ft*Math.PI/180,pt*Math.PI/180),isNaN(y))(rt===mA||rt===vA)&&(y=(xt-b)/(360<=pt?ot:ot-1));else if(rt===mA||rt===vA)xt=(xt-b)/(360<=pt?ot:ot-1),xt<y?(at=V0(this,b+y*(360<=pt?ot:ot-1),At,ft*Math.PI/180,pt*Math.PI/180),z=at*At):y=xt;else{for(tt=-1/0,b=0;b<ot;b++)Bt=E.M(b),Mt=E.M(b===ot-1?0:b+1),isNaN(Bt.diameter)&&of(Bt,0),isNaN(Mt.diameter)&&of(Mt,0),tt=Math.max(tt,(Bt.diameter+Mt.diameter)/2);tt+=y,b=V0(this,tt*(360<=pt?ot:ot-1),At,ft*Math.PI/180,pt*Math.PI/180),b>at?(at=b,z=at*At):tt=xt/(360<=pt?ot:ot-1)}if(this.kw=rt,this.lc=at,this.Zm=At,this.lw=ft,this.Wp=pt,this.Ti=y,this.me=z,this.Jp=tt,y=E,E=this.kw,rt=this.lc,at=this.lw,At=this.Wp,ft=this.Ti,pt=this.me,ot=this.Jp,this.direction!==Jf&&this.direction!==Ig||E!==vA)if(this.direction===Jf||this.direction===Ig){switch(tt=0,E){case nf:tt=180*_0(this,rt,pt,at,ot)/Math.PI;break;case mA:ot=y=0,tt=a.first(),tt!==null&&(y=of(tt,Math.PI/2)),tt=x.first(),tt!==null&&(ot=of(tt,Math.PI/2)),tt=180*_0(this,rt,pt,at,ft+(y+ot)/2)/Math.PI;break;case gc:tt=At/y.length}if(this.direction===Jf){switch(E){case nf:kp(this,a,at,rf);break;case mA:Mp(this,a,at,rf);break;case gc:Ep(this,a,At/2,at,rf)}switch(E){case nf:kp(this,x,at+tt,Na);break;case mA:Mp(this,x,at+tt,Na);break;case gc:Ep(this,x,At/2,at+tt,Na)}}else{switch(E){case nf:kp(this,x,at,rf);break;case mA:Mp(this,x,at,rf);break;case gc:Ep(this,x,At/2,at,rf)}switch(E){case nf:kp(this,a,at+tt,Na);break;case mA:Mp(this,a,at+tt,Na);break;case gc:Ep(this,a,At/2,at+tt,Na)}}}else switch(E){case nf:kp(this,y,at,this.direction);break;case mA:Mp(this,y,at,this.direction);break;case gc:Ep(this,y,At,at,this.direction);break;case vA:Iw(this,y,At,at,this.direction)}else Iw(this,y,At,at-At/2,Na)}this.updateParts(),this.network=null,this.isValidLayout=!0};function Ep(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 at=E+(b===Na?ot*x/(360<=z?rt:rt-1):-(ot*x)/rt),At=y.M(ot),ft=tt*Math.tan(at)/a;ft=Math.sqrt((tt*tt+a*a*ft*ft)/(1+ft*ft)),At.centerX=ft*Math.cos(at),At.centerY=ft*Math.sin(at),At.actualAngle=180*at/Math.PI}}function Mp(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 at=y.M(ot),At=y.M(ot===rt-1?0:ot+1),ft=z*Math.sin(x);at.centerX=b*Math.cos(x),at.centerY=ft,at.actualAngle=180*x/Math.PI,isNaN(at.diameter)&&of(at,0),isNaN(At.diameter)&&of(At,0),at=_0(a,b,z,E===Na?x:-x,(at.diameter+At.diameter)/2+tt),x+=E===Na?at:-at}}function kp(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 at=y.M(ot);at.centerX=b*Math.cos(x),at.centerY=z*Math.sin(x),at.actualAngle=180*x/Math.PI,at=_0(a,b,z,E===Na?x:-x,tt),x+=E===Na?at:-at}}function Iw(a,y,x,E,b){var z=a.Wp;if(a.mj=0,a.Xr=new bp,360>x){for(z=E+(b===Na?z:-z);0>z;)z+=360;z%=360,180<z&&(z-=360),z*=Math.PI/180,a.gt=z,Qw(a,y,x,E,b)}else Nw(a,y,x,E,b);a.Xr.commit(y)}function Nw(a,y,x,E,b){var z=a.lc,tt=a.Ti,rt=a.Zm,ot=z*Math.cos(E*Math.PI/180),at=a.me*Math.sin(E*Math.PI/180),At=y.Fa();if(At.length===3)At[0].centerX=z,At[0].centerY=0,At[1].centerX=At[0].centerX-At[0].width/2-At[1].width/2-tt,At[1].y=At[0].y,At[2].centerX=(At[0].centerX+At[1].centerX)/2,At[2].y=At[0].y-At[2].height-tt;else if(At.length===4)At[0].centerX=z,At[0].centerY=0,At[2].centerX=-At[0].centerX,At[2].centerY=At[0].centerY,At[1].centerX=0,At[1].y=Math.min(At[0].y,At[2].y)-At[1].height-tt,At[3].centerX=0,At[3].y=Math.max(At[0].y+At[0].height+tt,At[2].y+At[2].height+tt);else{z=Ot.alloc();for(var ft=0;ft<At.length&&(At[ft].centerX=ot,At[ft].centerY=at,!(ft>=At.length-1));ft++)Uw(a,ot,at,At,ft,b,z)||Dw(a,ot,at,At,ft,b,z),ot=z.x,at=z.y;if(Ot.free(z),a.mj++,!(23<a.mj)){ot=At[0].centerX,at=At[0].centerY,z=At[At.length-1].centerX,ft=At[At.length-1].centerY;var pt=Math.abs(ot-z)-((At[0].width+At[At.length-1].width)/2+tt),xt=Math.abs(at-ft)-((At[0].height+At[At.length-1].height)/2+tt);tt=0,1>Math.abs(xt)?Math.abs(ot-z)<(At[0].width+At[At.length-1].width)/2&&(tt=0):tt=0<xt?xt:1>Math.abs(pt)?0:pt,ot=Math.abs(z)>Math.abs(ft)?0<z!=at>ft:0<ft!=ot<z,(ot=b===Na?ot:!ot)&&(tt=-Math.abs(tt),tt=Math.min(tt,-At[At.length-1].width),tt=Math.min(tt,-At[At.length-1].height)),a.Xr.compare(tt,At),1<Math.abs(tt)&&(a.lc=8>a.mj?a.lc-tt/(2*Math.PI):5>At.length&&10<tt?a.lc/2:a.lc-(0<tt?1.7:-2.3),a.me=a.lc*rt,Nw(a,y,x,E,b))}}}function Qw(a,y,x,E,b){for(var z=a.lc,tt=a.me,rt=a.Zm,ot=z*Math.cos(E*Math.PI/180),at=tt*Math.sin(E*Math.PI/180),At=Ot.alloc(),ft=y.Fa(),pt=0;pt<ft.length&&(ft[pt].centerX=ot,ft[pt].centerY=at,!(pt>=ft.length-1));pt++)Uw(a,ot,at,ft,pt,b,At)||Dw(a,ot,at,ft,pt,b,At),ot=At.x,at=At.y;if(Ot.free(At),a.mj++,!(23<a.mj)){if(ot=Math.atan2(at,ot),ot=b===Na?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,Qw(a,y,x,E,b))}}function Uw(a,y,x,E,b,z,tt){var rt=a.lc,ot=a.me,at=0;a=(E[b].width+E[b+1].width)/2+a.Ti;var At=!1;if(0<=x!=(z===Na)){if(z=y+a,z>rt){if(z=y-a,z<-rt)return tt.x=z,tt.y=at,!1;At=!0}}else if(z=y-a,z<-rt){if(z=y+a,z>rt)return tt.x=z,tt.y=at,!1;At=!0}return at=Math.sqrt(1-Math.min(1,z*z/(rt*rt)))*ot,0>x!==At&&(at=-at),Math.abs(x-at)>(E[b].height+E[b+1].height)/2?(tt.x=z,tt.y=at,!1):(tt.x=z,tt.y=at,!0)}function Dw(a,y,x,E,b,z,tt){var rt=a.lc,ot=a.me,at=0;if(a=(E[b].height+E[b+1].height)/2+a.Ti,E=!1,0<=y!=(z===Na)){if(z=x-a,z<-ot){if(z=x+a,z>ot){tt.x=at,tt.y=z;return}E=!0}}else if(z=x+a,z>ot){if(z=x-a,z<-ot){tt.x=at,tt.y=z;return}E=!0}at=Math.sqrt(1-Math.min(1,z*z/(ot*ot)))*rt,0>y!==E&&(at=-at),tt.x=at,tt.y=z}Lo.prototype.commitLayout=function(){this.commitNodes(),this.isRouting&&this.commitLinks()},Lo.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 Ot(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))},Lo.prototype.commitLinks=function(){for(var a=this.network.edges.iterator;a.next();)a.value.commit()};function Ev(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,at=0;at<=z;at++){E!==void 0&&b!==void 0?ot=E+at*b/z:ot=at*Math.PI/(2*z);var At=Math.sin(ot);tt+=Math.sqrt(1-a*a*At*At)*rt}return E!==void 0&&b!==void 0?(y>x?y:x)*tt:4*(y>x?y:x)*tt}function V0(a,y,x,E,b){return y/(E!==void 0&&b!==void 0?Ev(a,1,x,E,b):Ev(a,1,x))}function _0(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}}Lo.prototype.sort=function(a){switch(this.sorting){case W0:break;case Y0:a.reverse();break;case X0:a.sort(this.comparer);break;case Z0:a.sort(this.comparer),a.reverse();break;case Ng:return this.ak(I1(a));default:Yt("Invalid sorting type.")}return a};function I1(a){for(var y=[],x=0;x<a.length;x++)y.push(0);x=new Vt;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}Lo.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 Vt;for(var ot=0,at=0;at<y.length;at++){var At=y[at].length;if(At===1)E.push(at);else if(At===0)b.add(a.M(at));else{if(ot===0)x.push(at);else{for(var ft=At=1/0,pt=-1,xt=[],Bt=0;Bt<x.length;Bt++)0>y[x[Bt]].indexOf(x[Bt===x.length-1?0:Bt+1])&&xt.push(Bt===x.length-1?0:Bt+1);if(xt.length===0)for(Bt=0;Bt<x.length;Bt++)xt.push(Bt);for(Bt=0;Bt<xt.length;Bt++){for(var Mt=xt[Bt],Gt=y[at],Dt=0,_t=0;_t<tt.length;_t++){var Zt=z[tt[_t]],te=z[rt[_t]];if(Zt<te){var ie=Zt;Zt=te}else ie=te;if(ie<Mt&&Mt<=Zt)for(te=0;te<Gt.length;te++){var me=Gt[te];0>x.indexOf(me)||ie<z[me]&&z[me]<Zt||ie===z[me]||Zt===z[me]||Dt++}else for(te=0;te<Gt.length;te++)me=Gt[te],0>x.indexOf(me)||ie<z[me]&&z[me]<Zt&&ie!==z[me]&&Zt!==z[me]&&Dt++}for(Gt=Dt,_t=Dt=0;_t<y[at].length;_t++)ie=x.indexOf(y[at][_t]),0<=ie&&(ie=Math.abs(Mt-(ie>=Mt?ie+1:ie)),Dt+=ie<x.length+1-ie?ie:x.length+1-ie);for(_t=0;_t<tt.length;_t++)ie=z[tt[_t]],Zt=z[rt[_t]],ie>=Mt&&ie++,Zt>=Mt&&Zt++,ie>Zt&&(te=Zt,Zt=ie,ie=te),Zt-ie<(x.length+2)/2==(ie<Mt&&Mt<=Zt)&&Dt++;(Gt<At||Gt===At&&Dt<ft)&&(At=Gt,ft=Dt,pt=Mt)}for(x.splice(pt,0,at),At=0;At<x.length;At++)z[x[At]]=At;for(At=0;At<y[at].length;At++)ft=y[at][At],0<=x.indexOf(ft)&&(tt.push(at),rt.push(ft))}ot++}}for(tt=x.length;;){for(z=!0,rt=0;rt<E.length;rt++)if(ot=E[rt],at=y[ot][0],At=x.indexOf(at),0<=At){for(pt=ft=0;pt<y[at].length;pt++)xt=x.indexOf(y[at][pt]),0>xt||xt===At||(Bt=xt>At?xt-At:At-xt,ft+=xt<At!=Bt>tt-Bt?1:-1);x.splice(0>ft?At:At+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},We.Object.defineProperties(Lo.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!==vA&&a!==mA&&a!==nf&&a!==gc||(this.Rb=a,this.C())}},direction:{get:function(){return this.K},set:function(a){this.K===a||a!==Na&&a!==rf&&a!==Jf&&a!==Ig||(this.K=a,this.C())}},sorting:{get:function(){return this.nd},set:function(a){this.nd===a||a!==W0&&a!==Y0&&a!==X0&&!Z0&&a!==Ng||(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!==J0&&a!==Kd||(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 mA=new xe(Lo,"ConstantSpacing",0),nf=new xe(Lo,"ConstantDistance",1),gc=new xe(Lo,"ConstantAngle",2),vA=new xe(Lo,"Packed",3),Na=new xe(Lo,"Clockwise",4),rf=new xe(Lo,"Counterclockwise",5),Jf=new xe(Lo,"BidirectionalLeft",6),Ig=new xe(Lo,"BidirectionalRight",7),W0=new xe(Lo,"Forwards",8),Y0=new xe(Lo,"Reverse",9),X0=new xe(Lo,"Ascending",10),Z0=new xe(Lo,"Descending",11),Ng=new xe(Lo,"Optimized",12),J0=new xe(Lo,"Pythagorean",13),Kd=new xe(Lo,"Circular",14);Lo.className="CircularLayout",Lo.ConstantSpacing=mA,Lo.ConstantDistance=nf,Lo.ConstantAngle=gc,Lo.Packed=vA,Lo.Clockwise=Na,Lo.Counterclockwise=rf,Lo.BidirectionalLeft=Jf,Lo.BidirectionalRight=Ig,Lo.Forwards=W0,Lo.Reverse=Y0,Lo.Ascending=X0,Lo.Descending=Z0,Lo.Optimized=Ng,Lo.Pythagorean=J0,Lo.Circular=Kd;function bp(){this.Pl=-1/0,this.tm=this.mk=null}bp.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},bp.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]}},bp.className="VertexArrangement";function Qg(a){qr.call(this,a)}Le(Qg,qr),Qg.prototype.createVertex=function(){return new Tp(this)},Qg.prototype.createEdge=function(){return new q0(this)},Qg.className="CircularNetwork";function Tp(a){gs.call(this,a),this.u=this.Si=NaN}Le(Tp,gs);function of(a,y){var x=a.network;if(x===null)return NaN;if(x=x.layout,x===null)return NaN;if(x.arrangement===vA)if(x.nodeDiameterFormula===Kd)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===Kd?Math.max(a.width,a.height):Math.sqrt(a.width*a.width+a.height*a.height);return a.Si}We.Object.defineProperties(Tp.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)}}}),Tp.className="CircularVertex";function q0(a){ml.call(this,a)}Le(q0,ml),q0.className="CircularEdge";function $s(a){po.call(this),this.ah=null,this.An=0,this.$d=new Xe(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)}Le($s,po),$s.prototype.cloneProtected=function(a){po.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},$s.prototype.createNetwork=function(){return new jd(this)},$s.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}Ow(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 at=Qn(),At=0;At<rt+y.vertexes.count+2;At++)at[At]=null;rt=0,tt.reset();for(var ft=Me.alloc();tt.next();)if(At=tt.value,this.computeBounds(At,ft),ot)ot=!1,b=ft.x+ft.width/2,z=ft.y+ft.height/2,at[0]=new Ot(ft.x+ft.width+E.width,ft.y),at[1]=new Ot(ft.x,ft.y+ft.height+E.height),rt=2;else{var pt=Hw(at,rt,b,z,ft.width,ft.height,E),xt=at[pt],Bt=new Ot(xt.x+ft.width+E.width,xt.y),Mt=new Ot(xt.x,xt.y+ft.height+E.height);for(pt+1<rt&&at.splice(pt+1,0,null),at[pt]=Bt,at[pt+1]=Mt,rt++,pt=xt.x-ft.x,xt=xt.y-ft.y,At=At.vertexes.iterator;At.next();)Bt=At.value,Bt.centerX+=pt,Bt.centerY+=xt}for(Me.free(ft),At=y.vertexes.iterator;At.next();)tt=At.value,pt=tt.bounds,2>rt?(b=pt.x+pt.width/2,z=pt.y+pt.height/2,at[0]=new Ot(pt.x+pt.width+E.width,pt.y),at[1]=new Ot(pt.x,pt.y+pt.height+E.height),rt=2):(ot=Hw(at,rt,b,z,pt.width,pt.height,E),ft=at[ot],xt=new Ot(ft.x+pt.width+E.width,ft.y),pt=new Ot(ft.x,ft.y+pt.height+E.height),ot+1<rt&&at.splice(ot+1,0,null),at[ot]=xt,at[ot+1]=pt,rt++,tt.centerX=ft.x+tt.width/2,tt.centerY=ft.y+tt.height/2);for(Dn(at),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)}}Gw(this,a),this.updateParts()}this.dl=a,this.network=null,this.isValidLayout=!0},$s.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},$s.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 Ow(a,y,x){if(N1(a,y)){var E=a.Zf;a.Zf*=1+1/(y+1);var b=Q1(a,y),z=Math.max(0,Math.max(Math.min(a.network.vertexes.count,x*(y+1)/11),10));for(a.maxIterations+=z,Ow(a,y+1,x),Gw(a,z),U1(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++)D1(a,y[x]);a.Zf=E}}function N1(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 Q1(a,y){for(var x=a.network,E=new jd(a),b=0;b<a.ah.length;b++){var z=a.ah[b];if(1<z.Vd){E.dh(z);var tt=new zw;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 Vt),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 Vt,b.Hj=rt),rt.add(tt),b.Vd--,b.sh+=tt.sh):tt.network===E&&(rt=tt.Hj,rt===null&&(rt=new Vt,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,oe.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 at=rt=0,At=ot.count-tt;At<ot.count;At++){var ft=ot.M(At),pt=null;for(z=ft.edges.iterator;z.next();){var xt=z.value;if(xt.Ax(ft)===b){pt=xt;break}}pt!==null&&(at+=pt.length,rt+=ft.width*ft.height)}z=b.centerX,ot=b.centerY,At=b.width,ft=b.height,pt=b.focus,xt=At*ft,1>xt&&(xt=1),rt=oe.sqrt((rt+xt+at*at*4/(tt*tt))/xt),tt=(rt-1)*At/2,rt=(rt-1)*ft/2,b.bounds=new Me(z-pt.x-tt,ot-pt.y-rt,At+2*tt,ft+2*rt),b.focus=new Ot(pt.x+tt,pt.y+rt)}}return a.network=E,x}function U1(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 Me(E.centerX-z,E.centerY-tt,b.Ss,b.Qs),E.focus=new Ot(z,tt),E.sv--}}for(x=a.network.edges.iterator;x.next();)x.value.network=y;a.network=y}function D1(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=oe.sqrt(z*z+tt*tt)/2;for(var rt=!1,ot=tt=0,at=0,At=y.vertexes.iterator;At.next();){var ft=At.value;1>=ft.Vd?ot++:(rt=!0,at++,tt+=Math.atan2(y.centerY-ft.centerY,y.centerX-ft.centerX))}if(ot!==0){for(0<at&&(tt/=at),at=y=0,y=rt?2*Math.PI/(ot+1):2*Math.PI/ot,ot%2===0&&(at=y/2),1<x.count&&x.sort(function(xt,Bt){return xt===null||Bt===null||xt===Bt?0:Bt.width*Bt.height-xt.width*xt.height}),rt=ot%2===0?0:1,x=x.iterator;x.next();)if(ot=x.value,!(1<ot.Vd||a.isFixed(ot))){for(At=null,ft=ot.edges.iterator;ft.next();){At=ft.value;break}ft=ot.width;var pt=ot.height;ft=oe.sqrt(ft*ft+pt*pt)/2,At=z+At.length+ft,ft=tt+(y*(rt/2>>1)+at)*(rt%2===0?1:-1),ot.centerX=E+At*Math.cos(ft),ot.centerY=b+At*Math.sin(ft),rt++}}}}function Hw(a,y,x,E,b,z,tt){var rt=9e19,ot=-1,at=0;t:for(;at<y;at++){var At=a[at],ft=At.x-x,pt=At.y-E;if(ft=ft*ft+pt*pt,ft<rt){for(pt=at-1;0<=pt;pt--)if(a[pt].y>At.y&&a[pt].x-At.x<b+tt.width)continue t;for(pt=at+1;pt<y;pt++)if(a[pt].x>At.x&&a[pt].y-At.y<z+tt.height)continue t;ot=at,rt=ft}}return ot}$s.prototype.Cu=function(){if(this.comments)for(var a=this.network.vertexes.iterator;a.next();)this.addComments(a.value)},$s.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 Rw(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,oe.sqrt(x*x+a*a)):a+x<y?(E=E+b-tt,a=a+x-y,oe.sqrt(E*E+a*a)):tt-(E+b):E>tt+rt?a>y+z?(x=E-tt-rt,a=a-y-z,oe.sqrt(x*x+a*a)):a+x<y?(E=E-tt-rt,a=a+x-y,oe.sqrt(E*E+a*a)):E-(tt+rt):a>y+z?a-(y+z):a+x<y?y-(a+x):.1}function Gw(a,y){for(a.ah=null,y=a.An+y;a.An<y&&(a.An++,O1(a)););a.ah=null}function O1(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(Mt,Gt){return Mt===null||Gt===null||Mt===Gt?0:Mt.centerX-Gt.centerX}):y.sort(function(Mt,Gt){return Mt===null||Gt===null||Mt===Gt?0:Mt.centerY-Gt.centerY}),x=a.Zf;var at=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 At=E.y+rt.y;E=tt.charge*a.electricalFieldX(ot,At),at=tt.charge*a.electricalFieldY(ot,At),E+=tt.mass*a.gravitationalFieldX(ot,At),at+=tt.mass*a.gravitationalFieldY(ot,At),tt.forceX+=E,tt.forceY+=at;for(var ft=z+1;ft<y.length;ft++){var pt=y[ft];if(pt!==tt){E=pt.bounds,rt=pt.focus,at=E.x+rt.x;var xt=E.y+rt.y;if(ot-at>x||at-ot>x){if(b)break}else if(At-xt>x||xt-At>x){if(!b)break}else{var Bt=Rw(tt,pt);1>Bt?(E=a.randomNumberGenerator,E===null&&(a.randomNumberGenerator=E=new $0),Bt=E.random(),rt=E.random(),ot>at?(E=Math.abs(pt.bounds.right-tt.bounds.x),E=(1+E)*Bt):ot<at?(E=Math.abs(pt.bounds.x-tt.bounds.right),E=-(1+E)*Bt):(E=Math.max(pt.width,tt.width),E=(1+E)*Bt-E/2),At>xt?(at=Math.abs(pt.bounds.bottom-tt.bounds.y),at=(1+at)*rt):ot<at?(at=Math.abs(pt.bounds.y-tt.bounds.bottom),at=-(1+at)*rt):(at=Math.max(pt.height,tt.height),at=(1+at)*rt-at/2)):(rt=-(tt.charge*pt.charge)/(Bt*Bt),E=(at-ot)/Bt*rt,at=(xt-At)/Bt*rt),tt.forceX+=E,tt.forceY+=at,pt.forceX-=E,pt.forceY-=at}}}}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,At=z.bounds,ft=z.focus,ot=At.x+ft.x,At=At.y+ft.y,ft=Rw(x,z),1>ft?(ft=a.randomNumberGenerator,ft===null&&(a.randomNumberGenerator=ft=new $0),rt=ft.random(),ft=ft.random(),E=(E>ot?1:-1)*(1+(z.width>x.width?z.width:x.width))*rt,at=(tt>At?1:-1)*(1+(z.height>x.height?z.height:x.height))*ft):(rt=rt.stiffness*(ft-rt.length),E=(ot-E)/ft*rt,at=(At-tt)/ft*rt),x.forceX+=E,x.forceY+=at,z.forceX-=E,z.forceY-=at;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}$s.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},$s.prototype.moveFixedVertex=function(){},$s.prototype.commitLayout=function(){this.yv(),this.commitNodes(),this.isRouting&&this.commitLinks()},$s.prototype.yv=function(){if(this.setsPortSpots)for(var a=this.network.edges.iterator;a.next();){var y=a.value.link;y!==null&&(y.fromSpot=is,y.toSpot=is)}},$s.prototype.commitNodes=function(){var a=0,y=0;if(this.arrangesToOrigin){var x=Me.alloc();this.computeBounds(this.network,x),y=this.arrangementOrigin,a=y.x-x.x,y=y.y-x.y,Me.free(x)}x=Me.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()}Me.free(x)},$s.prototype.commitLinks=function(){for(var a=this.network.edges.iterator;a.next();)a.value.commit()},$s.prototype.springStiffness=function(a){return a=a.stiffness,isNaN(a)?this.Hk:a},$s.prototype.springLength=function(a){return a=a.length,isNaN(a)?this.Gk:a},$s.prototype.electricalCharge=function(a){return a=a.charge,isNaN(a)?this.Ek:a},$s.prototype.electricalFieldX=function(){return 0},$s.prototype.electricalFieldY=function(){return 0},$s.prototype.gravitationalMass=function(a){return a=a.mass,isNaN(a)?this.Fk:a},$s.prototype.gravitationalFieldX=function(){return 0},$s.prototype.gravitationalFieldY=function(){return 0},$s.prototype.isFixed=function(a){return a.isFixed},We.Object.defineProperties($s.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"&&Yt('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())}}}),$s.className="ForceDirectedLayout";function zw(){this.Tv=this.Sv=this.Qs=this.Ss=this.Rs=0}zw.className="ForceDirectedSubnet";function jd(a){qr.call(this,a)}Le(jd,qr),jd.prototype.createVertex=function(){return new Ip(this)},jd.prototype.createEdge=function(){return new Np(this)},jd.className="ForceDirectedNetwork";function Ip(a){gs.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}Le(Ip,gs),We.Object.defineProperties(Ip.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)}}}),Ip.className="ForceDirectedVertex";function Np(a){ml.call(this,a),this.j=this.o=NaN}Le(Np,ml),We.Object.defineProperties(Np.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)}}}),Np.className="ForceDirectedEdge";function $0(){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()}$0.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},$0.className="RandomNumberGenerator";function Qr(a){po.call(this),this.kc=this.ie=25,this.K=0,this.Dk=rm,this.Zk=om,this.Qk=sm,this.bj=4,this.rk=am,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 Ot,this.He=[],this.He.length=100,this.xw=this.ve=0,a&&Object.assign(this,a)}Le(Qr,po),Qr.prototype.cloneProtected=function(a){po.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},Qr.prototype.qb=function(a){a.classType===Qr?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:Yt("Unknown enum value: "+a):po.prototype.qb.call(this,a)},Qr.prototype.createNetwork=function(){return new Dg(this)},Qr.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!==Up&&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===Up&&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,at=0;if(E.link!==null){if(rt=E.link,rt===null)continue;var At=b.node;if(tt=z.node,At===null||tt===null)continue;var ft=rt.fromNode;ot=rt.toNode;for(var pt=rt.fromPort;pt!==null&&!pt.Ed();)pt=pt.panel;for(rt=rt.toPort;rt!==null&&!rt.Ed();)rt=rt.panel;if(E.rev){at=ft;var xt=pt;ft=ot,pt=rt,ot=at,rt=xt}var Bt=b.focus;at=z.focus;var Mt=E.rev?z.bounds:b.bounds;xt=Ot.alloc(),At!==ft?Mt.w()&&ft.isVisible()?ft.actualBounds.w()?(uc(ft,pt,Ui,xt),xt.x+=ft.actualBounds.x-Mt.x,xt.y+=ft.actualBounds.y-Mt.y):(uc(ft,pt,Ui,xt),xt.w()||xt.assign(Bt)):xt.assign(Bt):Mt.w()?(uc(ft,pt,Ui,xt),xt.w()||xt.assign(Bt)):xt.assign(Bt),ft=E.rev?b.bounds:z.bounds,At=Ot.alloc(),tt!==ot?ft.w()&&ot.isVisible()?ot.actualBounds.w()?(uc(ot,rt,Ui,At),At.x+=ot.actualBounds.x-ft.x,At.y+=ot.actualBounds.y-ft.y):(uc(ot,rt,Ui,At),At.w()||At.assign(at)):At.assign(at):ft.w()?(uc(ot,rt,Ui,At),At.w()||At.assign(at)):At.assign(at),this.K===90||this.K===270?(tt=Math.round((xt.x-Bt.x)/this.kc),ot=xt.x,rt=Math.round((At.x-at.x)/this.kc),at=At.x):(tt=Math.round((xt.y-Bt.y)/this.kc),ot=xt.y,rt=Math.round((At.y-at.y)/this.kc),at=At.y),Ot.free(xt),Ot.free(At),E.portFromColOffset=tt,E.portFromPos=ot,E.portToColOffset=rt,E.portToPos=at}else E.portFromColOffset=0,E.portFromPos=0,E.portToColOffset=0,E.portToPos=0;if(xt=b.layer,At=z.layer,ft=0,Mt=E.link,Mt!==null){var Gt=Mt.fromPort,Dt=Mt.toPort;if(Gt!==null&&Dt!==null){var _t=Mt.fromNode;if(pt=Mt.toNode,_t!==null&&pt!==null){var Zt=im(this,!0),te=im(this,!1),ie=this.setsPortSpots?Zt:Mt.computeSpot(!0,Gt);Bt=this.setsPortSpots?te:Mt.computeSpot(!1,Dt);var me=Mt.isOrthogonal;ie.$c()&&ie.Hf(te)&&Bt.$c()&&Bt.Hf(Zt)?ft=0:(Zt=Mt.getLinkPoint(_t,Gt,ie,!0,me,pt,Dt,Ot.alloc()),te=Mt.getLinkDirection(_t,Gt,Zt,ie,!0,me,pt,Dt),Ot.free(Zt),ie.ys()||te!==Jw(this,E,!0)?this.setsPortSpots&&_t!==null&&_t.ports.count===1&&E.rev&&(ft+=1):ft+=1,ie=Mt.getLinkPoint(pt,Dt,Bt,!1,me,_t,Gt,Ot.alloc()),Mt=Mt.getLinkDirection(pt,Dt,ie,Bt,!1,me,_t,Gt),Ot.free(ie),Bt.ys()||Mt!==Jw(this,E,!1)?this.setsPortSpots&&pt!==null&&pt.ports.count===1&&E.rev&&(ft+=2):ft+=2)}}}if(pt=ft,ft=pt===1||pt===3,(pt=pt===2||pt===3)&&(Bt=a.createVertex(),Bt.node=null,Bt.Dj=1,Bt.layer=xt,Bt.near=b,a.dh(Bt),b=a.Zj(b,Bt,E.link),b.valid=!1,b.rev=E.rev,b.portFromColOffset=tt,b.portToColOffset=0,b.portFromPos=ot,b.portToPos=0,b=Bt),Mt=1,ft&&Mt--,xt-At>Mt&&0<xt){for(E.valid=!1,Bt=a.createVertex(),Bt.node=null,Bt.Dj=2,Bt.layer=xt-1,a.dh(Bt),b=a.Zj(b,Bt,E.link),b.valid=!0,b.rev=E.rev,b.portFromColOffset=pt?0:tt,b.portToColOffset=0,b.portFromPos=pt?0:ot,b.portToPos=0,b=Bt,xt--;xt-At>Mt&&0<xt;)Bt=a.createVertex(),Bt.node=null,Bt.Dj=3,Bt.layer=xt-1,a.dh(Bt),b=a.Zj(b,Bt,E.link),b.valid=!0,b.rev=E.rev,b.portFromColOffset=0,b.portToColOffset=0,b.portFromPos=0,b.portToPos=0,b=Bt,xt--;b=a.Zj(Bt,z,E.link),b.valid=!ft,ft&&(Bt.near=z),b.rev=E.rev,b.portFromColOffset=0,b.portToColOffset=rt,b.portFromPos=0,b.portToPos=at}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=sf(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),af(this,a,y)}this.reduceCrossings(),this.straightenAndPack(),this.updateParts()}this.network=null,this.isValidLayout=!0},Qr.prototype.linkMinLength=function(){return 1};function Mv(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}Qr.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},Qr.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 _a(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 zl(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 Kw(a,y,x){var E=sf(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],at=ot.near;if(at!==null&&at.layer===ot.layer)if(ot=at.index,ot>tt)for(var At=tt+1;At<ot;At++){var ft=E[At];ft.near===at&&ft.Dj===at.Dj||rt++}else for(At=tt-1;At>ot;At--)ft=E[At],ft.near===at&&ft.Dj===at.Dj||rt++;var pt;if(0<=x)for(ot=E[tt].sourceEdgesArrayAccess,at=0;at<ot.length;at++){var xt=ot[at];if(xt.valid&&xt.fromVertex.layer!==y)for(ft=xt.fromVertex.index,At=xt.portToPos,xt=xt.portFromPos,pt=at+1;pt<ot.length;pt++){var Bt=ot[pt];if(Bt.valid&&Bt.fromVertex.layer!==y){var Mt=Bt.fromVertex.index,Gt=Bt.portToPos;Bt=Bt.portFromPos,At<Gt&&(ft>Mt||ft===Mt&&xt>Bt)&&rt++,Gt<At&&(Mt>ft||Mt===ft&&Bt>xt)&&rt++}}}if(0>=x){for(ot=E[tt].destinationEdgesArrayAccess,at=0;at<ot.length;at++)if(xt=ot[at],xt.valid&&xt.toVertex.layer!==y)for(ft=xt.toVertex.index,At=xt.portToPos,xt=xt.portFromPos,pt=at+1;pt<ot.length;pt++)Bt=ot[pt],Bt.valid&&Bt.toVertex.layer!==y&&(Mt=Bt.toVertex.index,Gt=Bt.portToPos,Bt=Bt.portFromPos,xt<Bt&&(ft>Mt||ft===Mt&&At>Gt)&&rt++,Bt<xt&&(Mt>ft||Mt===ft&&Gt>At)&&rt++)}for(z[tt*b+tt]=rt,ot=tt+1;ot<b;ot++){var Dt=0,_t=0;if(0<=x){rt=E[tt].sourceEdgesArrayAccess;var Zt=E[ot].sourceEdgesArrayAccess;for(at=0;at<rt.length;at++)if(xt=rt[at],xt.valid&&xt.fromVertex.layer!==y)for(ft=xt.fromVertex.index,xt=xt.portFromPos,pt=0;pt<Zt.length;pt++)Bt=Zt[pt],Bt.valid&&Bt.fromVertex.layer!==y&&(Mt=Bt.fromVertex.index,Bt=Bt.portFromPos,(ft<Mt||ft===Mt&&xt<Bt)&&_t++,(Mt<ft||Mt===ft&&Bt<xt)&&Dt++)}if(0>=x){for(rt=E[tt].destinationEdgesArrayAccess,Zt=E[ot].destinationEdgesArrayAccess,at=0;at<rt.length;at++)if(xt=rt[at],xt.valid&&xt.toVertex.layer!==y)for(ft=xt.toVertex.index,At=xt.portToPos,pt=0;pt<Zt.length;pt++)Bt=Zt[pt],Bt.valid&&Bt.toVertex.layer!==y&&(Mt=Bt.toVertex.index,Gt=Bt.portToPos,(ft<Mt||ft===Mt&&At<Gt)&&_t++,(Mt<ft||Mt===ft&&Gt<At)&&Dt++)}z[tt*b+ot]=Dt,z[ot*b+tt]=_t}}return af(a,y,E),z}Qr.prototype.countCrossings=function(){for(var a=0,y=0;y<=this.Ia;y++)for(var x=Kw(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 tm(a){for(var y=0,x=0;x<=a.Ia;x++){for(var E=a,b=x,z=sf(E,b),tt=E.tc[b],rt=0,ot=0;ot<tt;ot++){var at=z[ot].destinationEdgesArrayAccess;if(at!==null)for(var At=0;At<at.length;At++){var ft=at[At];if(ft.valid&&ft.toVertex.layer!==b){var pt=ft.fromVertex.column+ft.portFromColOffset,xt=ft.toVertex.column+ft.portToColOffset;rt+=(Math.abs(pt-xt)+1)*Mv(ft)}}}af(E,b,z),y+=rt}return y}Qr.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 kv(a,y,x){for(var E=sf(a,y),b=a.tc[y],z=[],tt=0;tt<b;tt++){var rt=E[tt],ot=null;0>=x&&(ot=rt.sourceEdgesArrayAccess);var at=null;0<=x&&(at=rt.destinationEdgesArrayAccess);var At=0,ft=0,pt=rt.near;if(pt!==null&&pt.layer===rt.layer&&(At+=pt.column-1,ft++),ot!==null)for(pt=0;pt<ot.length;pt++){rt=ot[pt];var xt=rt.fromVertex;rt.valid&&!rt.rev&&xt.layer!==y&&(At+=xt.column,ft++)}if(at!==null)for(ot=0;ot<at.length;ot++)rt=at[ot],pt=rt.toVertex,rt.valid&&!rt.rev&&pt.layer!==y&&(At+=pt.column,ft++);z[tt]=ft===0?-1:At/ft}return af(a,y,E),z}function jw(a,y,x){for(var E=sf(a,y),b=a.tc[y],z=[],tt=0;tt<b;tt++){var rt=E[tt],ot=null;0>=x&&(ot=rt.sourceEdgesArrayAccess);var at=null;0<=x&&(at=rt.destinationEdgesArrayAccess);var At=0,ft=[],pt=rt.near;if(pt!==null&&pt.layer===rt.layer&&(ft[At]=pt.column-1,At++),rt=void 0,ot!==null)for(pt=0;pt<ot.length;pt++){rt=ot[pt];var xt=rt.fromVertex;rt.valid&&!rt.rev&&xt.layer!==y&&(ft[At]=xt.column+rt.portFromColOffset,At++)}if(at!==null)for(ot=0;ot<at.length;ot++)rt=at[ot],pt=rt.toVertex,rt.valid&&!rt.rev&&pt.layer!==y&&(ft[At]=pt.column+rt.portToColOffset,At++);At===0?z[tt]=-1:(ft.sort(function(Bt,Mt){return Bt-Mt}),at=At>>1,z[tt]=At&1?ft[at]:ft[at-1]+ft[at]>>1)}return af(a,y,E),z}function Qp(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,at=y.layer-ot.layer;rt=a.linkMinLength(rt),at===rt&&Qp(a,ot,x,E,b,z)}if(z)for(tt=y.sourceEdges;tt.next();)rt=tt.value,ot=rt.fromVertex,at=ot.layer-y.layer,rt=a.linkMinLength(rt),at===rt&&Qp(a,ot,x,E,b,z)}}function bv(a,y,x,E,b,z){if(y.component===E){if(y.component=x,b)for(var tt=y.destinationEdges;tt.next();)bv(a,tt.value.toVertex,x,E,b,z);if(z)for(y=y.sourceEdges;y.next();)bv(a,y.value.fromVertex,x,E,b,z)}}Qr.prototype.removeCycles=function(){for(var a=this.network.edges.iterator;a.next();)a.value.rev=!1;switch(this.Dk){default:case Nv: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(;H1(a)!==null;){for(b=Vw(a);b!==null;)E[x]=b,x--,b.valid=!1,b=Vw(a);for(b=_w(a);b!==null;)E[y]=b,y++,b.valid=!1,b=_w(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,at=rt.destinationEdges;at.next();)at.value.toVertex.valid&&ot++;at=0;for(var At=rt.sourceEdges;At.next();)At.value.fromVertex.valid&&at++;(b===null||z<ot-at)&&(b=rt,z=ot-at)}}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 rm: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&&Tv(this,y);for(E.reset();E.next();)y=E.value,y.Ll===-1&&Tv(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 Up: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 H1(a){for(a=a.vertexes.iterator;a.next();){var y=a.value;if(y.valid)return y}return null}function Vw(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 _w(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 Tv(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,Tv(a,b))}y.finish=a.Kn,a.Kn++}Qr.prototype.assignLayers=function(){switch(this.Zk){case Qv:Ww(this);break;case Uv:for(var a,y=this.network.vertexes.iterator;y.next();)a=Xw(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 om:for(Ww(this),y=this.network.vertexes.iterator;y.next();)y.value.valid=!1;for(y.reset();y.next();)a=y.value,a.sourceEdges.count===0&&Zw(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 Ww(a){for(var y=a.network.vertexes.iterator;y.next();){var x=Yw(a,y.value);a.Ia=Math.max(x,a.Ia)}}function Yw(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,Yw(a,z)+b)}y.layer=x}else x=y.layer;return x}function Xw(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,Xw(a,z)+b)}y.layer=x}else x=y.layer;return x}function Zw(a,y){if(!y.valid){y.valid=!0;for(var x=y.destinationEdges;x.next();)Zw(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&&Qp(a,rt,0,-1,!0,!1)}for(Qp(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 at=tt.value;if(at.component===1){var At=0,ft=!1,pt=at.sourceEdgesArrayAccess;b=pt.length;for(var xt=0;xt<b;xt++){var Bt=pt[xt],Mt=Bt.fromVertex;At+=1,Mt.component!==1&&(z+=1,Mt=Mt.layer-at.layer,Bt=a.linkMinLength(Bt),E=Math.min(E,Mt-Bt))}for(pt=at.destinationEdgesArrayAccess,b=pt.length,xt=0;xt<b;xt++)Bt=pt[xt].toVertex,--At,Bt.component!==1?--z:ft=!0;(ot===null||At<rt)&&!ft&&(ot=at,rt=At)}}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(Qp(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(at=0,At=!1,pt=tt.sourceEdgesArrayAccess,ft=pt.length,xt=0;xt<ft;xt++)Bt=pt[xt].fromVertex,at+=1,Bt.component!==1?E+=1:At=!0;for(pt=tt.destinationEdgesArrayAccess,ft=pt.length,xt=0;xt<ft;xt++)Bt=pt[xt],Mt=Bt.toVertex,--at,Mt.component!==1&&(--E,Mt=tt.layer-Mt.layer,Bt=a.linkMinLength(Bt),b=Math.min(b,Mt-Bt));(rt===null||at>z)&&!At&&(rt=tt,z=at)}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 Jw(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}Qr.prototype.initializeIndices=function(){switch(this.Qk){default:case Ov: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 sm: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&&qw(this,x);break;case Dv: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&&$w(this,x)}};function qw(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&&qw(a,E))}function $w(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&&$w(a,E))}Qr.prototype.reduceCrossings=function(){var a=this.countCrossings(),y=_a(this),x,E;for(x=0;x<this.bj;x++){for(E=0;E<=this.Ia;E++)em(this,E,1),Xl(this,E,1);var b=this.countCrossings();for(b<a&&(a=b,y=_a(this)),E=this.Ia;0<=E;E--)em(this,E,-1),Xl(this,E,-1);b=this.countCrossings(),b<a&&(a=b,y=_a(this))}for(zl(this,y),x=0;x<this.bj;x++){for(E=0;E<=this.Ia;E++)em(this,E,0),Xl(this,E,0);for(b=this.countCrossings(),b<a&&(a=b,y=_a(this)),E=this.Ia;0<=E;E--)em(this,E,0),Xl(this,E,0);b=this.countCrossings(),b<a&&(a=b,y=_a(this))}zl(this,y);var z,tt,rt;switch(this.rk){case Hv:break;case Rv: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?zl(this,y):(a=b,y=_a(this)),z=!0;z;)for(z=!1,E=x;E>=tt;E--)z=Xl(this,E,1)||z;for(b=this.countCrossings(),b>=a?zl(this,y):(a=b,y=_a(this)),z=!0;z;)for(z=!1,E=tt;E<=x;E++)z=Xl(this,E,1)||z;for(b>=a?zl(this,y):(a=b,y=_a(this)),z=!0;z;)for(z=!1,E=tt;E<=x;E++)z=Xl(this,E,-1)||z;for(b>=a?zl(this,y):(a=b,y=_a(this)),z=!0;z;)for(z=!1,E=x;E>=tt;E--)z=Xl(this,E,0)||z;for(b>=a?zl(this,y):(a=b,y=_a(this)),z=!0;z;)for(z=!1,E=tt;E<=x;E++)z=Xl(this,E,0)||z;b>=a?zl(this,y):(a=b,y=_a(this))}break;default:case am: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?zl(this,y):(a=b,y=_a(this)),z=!0;z;)for(z=!1,E=x;E>=tt;E--)z=Xl(this,E,1)||z;for(b=this.countCrossings(),b>=a?zl(this,y):(a=b,y=_a(this)),z=!0;z;)for(z=!1,E=tt;E<=x;E++)z=Xl(this,E,1)||z;for(b>=a?zl(this,y):(a=b,y=_a(this)),z=!0;z;)for(z=!1,E=tt;E<=x;E++)z=Xl(this,E,-1)||z;for(b>=a?zl(this,y):(a=b,y=_a(this)),z=!0;z;)for(z=!1,E=x;E>=tt;E--)z=Xl(this,E,0)||z;for(b>=a?zl(this,y):(a=b,y=_a(this)),z=!0;z;)for(z=!1,E=tt;E<=x;E++)z=Xl(this,E,0)||z;b>=a?zl(this,y):(a=b,y=_a(this))}}zl(this,y)};function em(a,y,x){var E=sf(a,y),b=a.tc[y],z=jw(a,y,x),tt=kv(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);af(a,y,E)}function Xl(a,y,x){var E=sf(a,y),b=a.tc[y];x=Kw(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,at=!0;at;)for(at=!1,z=0;z<b-1;z++){var At=x[E[z].index*b+E[z+1].index],ft=x[E[z+1].index*b+E[z].index],pt=0,xt=0,Bt=E[z].column,Mt=E[z+1].column,Gt=a.nodeMinColumnSpace(E[z],!0),Dt=a.nodeMinColumnSpace(E[z],!1),_t=a.nodeMinColumnSpace(E[z+1],!0),Zt=a.nodeMinColumnSpace(E[z+1],!1);Gt=Bt-Gt+_t,Dt=Mt-Dt+Zt;var te=E[z].sourceEdges.iterator;for(te.reset();te.next();)if(_t=te.value,Zt=_t.fromVertex,_t.valid&&Zt.layer===y){for(_t=0;E[_t]!==Zt;)_t++;_t<z&&(pt+=2*(z-_t),xt+=2*(z+1-_t)),_t===z+1&&(pt+=1),_t>z+1&&(pt+=4*(_t-z),xt+=4*(_t-(z+1)))}for(te=E[z].destinationEdges.iterator,te.reset();te.next();)if(_t=te.value,Zt=_t.toVertex,_t.valid&&Zt.layer===y){for(_t=0;E[_t]!==Zt;)_t++;_t===z+1&&(xt+=1)}for(te=E[z+1].sourceEdges.iterator,te.reset();te.next();)if(_t=te.value,Zt=_t.fromVertex,_t.valid&&Zt.layer===y){for(_t=0;E[_t]!==Zt;)_t++;_t<z&&(pt+=2*(z+1-_t),xt+=2*(z-_t)),_t===z&&(xt+=1),_t>z+1&&(pt+=4*(_t-(z+1)),xt+=4*(_t-z))}for(te=E[z+1].destinationEdges.iterator,te.reset();te.next();)if(_t=te.value,Zt=_t.toVertex,_t.valid&&Zt.layer===y){for(_t=0;E[_t]!==Zt;)_t++;_t===z&&(pt+=1)}_t=Zt=0,te=tt[E[z].index];var ie=rt[E[z].index],me=tt[E[z+1].index],ln=rt[E[z+1].index];te!==-1&&(Zt+=Math.abs(te-Bt),_t+=Math.abs(te-Dt)),ie!==-1&&(Zt+=Math.abs(ie-Bt),_t+=Math.abs(ie-Dt)),me!==-1&&(Zt+=Math.abs(me-Mt),_t+=Math.abs(me-Gt)),ln!==-1&&(Zt+=Math.abs(ln-Mt),_t+=Math.abs(ln-Gt)),(xt<pt-.5||xt===pt&&ft<At-.5||xt===pt&&ft===At&&_t<Zt-.5)&&(at=ot=!0,E[z].column=Dt,E[z+1].column=Gt,At=E[z],E[z]=E[z+1],E[z+1]=At)}for(z=0;z<b;z++)E[z].index=z;return af(a,y,E),ot}Qr.prototype.straightenAndPack=function(){if(this.ve===0){var a=(this.bg&1)!==0,y=(this.bg&W1)!==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=Ug(this,y,1)||x;for(y=this.Md-1;0<=y;y--)x=Ug(this,y,-1)||x;x=Ug(this,this.Md,0)||x}if(this.bg&4){for(y=this.Md+1;y<=this.Ia;y++)Iv(this,y,1);for(y=this.Md-1;0<=y;y--)Iv(this,y,-1);Iv(this,this.Md,0)}if(a&&(t1(this,-1),t1(this,1)),this.bg&2)for(x=!0;x;){for(x=!1,x=Ug(this,this.Md,0)||x,y=this.Md+1;y<=this.Ia;y++)x=Ug(this,y,0)||x;for(y=this.Md-1;0<=y;y--)x=Ug(this,y,0)||x}}else K1(this)};function Ug(a,y,x){for(var E=!1;R1(a,y,x);)E=!0;return E}function R1(a,y,x){var E,b=sf(a,y),z=a.tc[y],tt=kv(a,y,-1);if(0<x)for(E=0;E<z;E++)tt[E]=-1;var rt=kv(a,y,1);if(0>x)for(E=0;E<z;E++)rt[E]=-1;for(var ot=!1,at=!0;at;)for(at=!1,E=0;E<z;E++){var At=b[E].column,ft=a.nodeMinColumnSpace(b[E],!0),pt=a.nodeMinColumnSpace(b[E],!1),xt=0;0>E-1||At-b[E-1].column-1>ft+a.nodeMinColumnSpace(b[E-1],!1)?xt=At-1:xt=At,ft=E+1>=z||b[E+1].column-At-1>pt+a.nodeMinColumnSpace(b[E+1],!0)?At+1:At;var Bt=pt=0,Mt=0;if(0>=x)for(var Gt=b[E].sourceEdges.iterator;Gt.next();){var Dt=Gt.value,_t=Dt.fromVertex;if(Dt.valid&&_t.layer!==y){var Zt=Mv(Dt),te=Dt.portFromColOffset;Dt=Dt.portToColOffset,_t=_t.column,pt+=(Math.abs(At+Dt-(_t+te))+1)*Zt,Bt+=(Math.abs(xt+Dt-(_t+te))+1)*Zt,Mt+=(Math.abs(ft+Dt-(_t+te))+1)*Zt}}if(0<=x)for(Gt=b[E].destinationEdges.iterator;Gt.next();)Dt=Gt.value,_t=Dt.toVertex,Dt.valid&&_t.layer!==y&&(Zt=Mv(Dt),te=Dt.portFromColOffset,Dt=Dt.portToColOffset,_t=_t.column,pt+=(Math.abs(At+te-(_t+Dt))+1)*Zt,Bt+=(Math.abs(xt+te-(_t+Dt))+1)*Zt,Mt+=(Math.abs(ft+te-(_t+Dt))+1)*Zt);Dt=te=Zt=0,Gt=tt[b[E].index],_t=rt[b[E].index],Gt!==-1&&(Zt+=Math.abs(Gt-At),te+=Math.abs(Gt-xt),Dt+=Math.abs(Gt-ft)),_t!==-1&&(Zt+=Math.abs(_t-At),te+=Math.abs(_t-xt),Dt+=Math.abs(_t-ft)),Bt<pt||Bt===pt&&te<Zt?(at=ot=!0,b[E].column=xt):(Mt<pt||Mt===pt&&Dt<Zt)&&(at=ot=!0,b[E].column=ft)}return af(a,y,b),a.normalize(),ot}function Iv(a,y,x){var E=sf(a,y),b=a.tc[y],z=jw(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),at=a.nodeMinColumnSpace(E[x],!1),At=0;if(tt[x]===-1)if(x===0&&x===b-1)At=rt;else if(x===0){var ft=E[x+1].column;ft-rt===at+a.nodeMinColumnSpace(E[x+1],!0)?At=rt-1:At=rt}else x===b-1?(ft=E[x-1].column,At=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,at=ft-a.nodeMinColumnSpace(E[x+1],!0)-at-1,At=(ot+at)/2|0);else x===0&&x===b-1?At=tt[x]:x===0?(ft=E[x+1].column,at=ft-a.nodeMinColumnSpace(E[x+1],!0)-at-1,At=Math.min(tt[x],at)):x===b-1?(ft=E[x-1].column,ot=ft+a.nodeMinColumnSpace(E[x-1],!1)+ot+1,At=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,at=ft-a.nodeMinColumnSpace(E[x+1],!0)-at-1,ot<tt[x]&&tt[x]<at?At=tt[x]:ot>=tt[x]?At=ot:at<=tt[x]&&(At=at));At!==rt&&(z=!0,E[x].column=At)}af(a,y,E),a.normalize()}function G1(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 z1(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 t1(a,y){for(var x=0;x<=a.Ra;x++)for(;G1(a,x););for(a.normalize(),x=0;x<a.Ra;x++)for(;z1(a,x););a.normalize();var E;if(0<y)for(x=0;x<=a.Ra;x++){var b=_a(a),z=tm(a);for(E=z+1;z<E;){E=z,e1(a,x,1);var tt=tm(a);tt>z?zl(a,b):tt<z&&(z=tt,b=_a(a))}}if(0>y)for(x=a.Ra;0<=x;x--)for(b=_a(a),z=tm(a),E=z+1;z<E;)E=z,e1(a,x,-1),tt=tm(a),tt>z?zl(a,b):tt<z&&(z=tt,b=_a(a));a.normalize()}function e1(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&&(bv(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 K1(a){for(var y=Qn(),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 le,j1(y,x);var z=null,tt=null,rt=null,ot=null,at=(a.ve&1)!==0,At=(a.ve&2)!==0,ft=(a.ve&4)!==0,pt=(a.ve&8)!==0;for(at&&(a.verticalAlignment(y,x,!0),z=nm(a,y,!0,!1)),y.reverse(),ft&&(a.verticalAlignment(y,x,!1),rt=nm(a,y,!1,!1)),E=Gr(y),b=E.next();!b.done;b=E.next())b.value.reverse();pt&&(a.verticalAlignment(y,x,!1),ot=nm(a,y,!1,!0)),y.reverse(),At&&(a.verticalAlignment(y,x,!0),tt=nm(a,y,!0,!0)),Dn(y),a.u(z,tt,rt,ot),a.network.vertexes.each(function(xt){var Bt=Qn();at&&Bt.push(z.get(xt)),At&&Bt.push(tt.get(xt)),ft&&Bt.push(rt.get(xt)),pt&&Bt.push(ot.get(xt)),Bt.sort(function(Gt,Dt){return Gt-Dt});var Mt=Bt.length;Mt=(Bt[Math.floor((Mt-1)/2)]+Bt[Math.ceil((Mt-1)/2)])/2,Dn(Bt),xt.zc=Mt})}function j1(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 at=rt[ot];t:{if(at.node===null){var At=Gv(at);if(0<At.length){At=At[0].node===null;break t}}At=!1}var ft=At;if(ot===rt.length-1||ft){for(At=tt.length-1,ft&&(At=Gv(at)[0].index);z<=ot;){if(at=rt[z],!at.bo){ft=[];for(var pt=Gr(at.sourceEdgesArrayAccess),xt=pt.next();!xt.done;xt=pt.next())xt=xt.value,xt.valid&&ft.push(xt);at.bo=ft}for(at=Gr(at.bo),ft=at.next();!ft.done;ft=at.next())ft=ft.value,pt=ft.fromVertex.index,(pt<b||pt>At)&&y.add(ft);z++}b=At}}}Qr.prototype.verticalAlignment=function(a,y,x){V1(a),a=Gr(a);for(var E=a.next();!E.done;E=a.next()){var b=-1;E=Gr(E.value);for(var z=E.next();!z.done;z=E.next()){z=z.value;var tt=x?Gv(z):Y1(z),rt=tt.length;if(0<rt){tt.sort(function(ft,pt){return ft.vi-pt.vi});var ot=(rt-1)/2;for(rt=Math.floor(ot),ot=Math.ceil(ot);rt<=ot;rt++)if(z.align===z){var at=tt[rt],At=void 0;At=x?lm(at,z):lm(z,at),!y.contains(At)&&b<at.vi&&(at.align=z,z.root=at.root,z.align=at.root,b=at.vi)}}}}};function V1(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 nm(a,y,x,E){for(var b=a.K===90||a.K===270,z=Gr(y),tt=z.next();!tt.done;tt=z.next()){var rt=Gr(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=Gr(y),rt=z.next();!rt.done;rt=z.next()){rt=Gr(rt.value);for(var ot=rt.next();!ot.done;ot=rt.next())if(ot=ot.value,ot.root===ot){for(var at=0,At=ot;At.align!==ot;){var ft=At.align,pt=tt?At.width:At.height,xt=tt?ft.width:ft.height;if(x){var Bt=lm(At,ft),Mt=Bt.portFromPos,Gt=Bt.portToPos;Bt.link!==null&&(At.node&&At.node!==Bt.link.fromNode&&(Mt=tt?At.focusX:At.focusY),ft.node&&ft.node!==Bt.link.toNode&&(Gt=tt?ft.focusX:ft.focusY))}else Bt=lm(ft,At),Mt=Bt.portToPos,Gt=Bt.portFromPos,Bt.link!==null&&(At.node&&At.node!==Bt.link.toNode&&(Mt=tt?At.focusX:At.focusY),ft.node&&ft.node!==Bt.link.fromNode&&(Gt=tt?ft.focusX:ft.focusY));pt=E?At.qg+(pt-Mt)-(xt-Gt):At.qg+Mt-Gt,ft.qg=pt,at=Math.min(at,pt),At=At.align}At=ot;do At.qg=At.qg-at,At=At.align;while(At!==ot)}}for(x=Gr(y),tt=x.next();!tt.done;tt=x.next())for(z=Gr(tt.value),tt=z.next();!tt.done;tt=z.next())tt=tt.value,tt.root===tt&&n1(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=i1(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 yn,y=Gr(y),tt=y.next();!tt.done;tt=y.next())for(x=Gr(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 n1(a,y,x){if(isNaN(y.zc)){y.zc=0;var E=y;do{if(0<E.vi){var b=i1(E,x),z=b.root;n1(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 i1(a,y){var x=a.Tz;return a=a.vi,1>a&&Yt("Could not determine previous vertex in layer"),y[x][a-1]}Qr.prototype.u=function(a){for(var y=[],x=0;x<arguments.length;++x)y[x]=arguments[x];x=-1;for(var E=Qn(),b=Qn(),z=1/0,tt=0;4>tt;tt++)if(y[tt]){var rt=_1(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(at){at.value+=ot.delta}}(z)));Dn(E),Dn(b)};function _1(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}Qr.prototype.commitLayout=function(){if(this.setsPortSpots)for(var a=im(this,!0),y=im(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 im(a,y){return a.K===270?y?vs:Ys:a.K===90?y?Ys:vs:a.K===180?y?No:rs:y?rs:No}Qr.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,at=ot.layer,At=ot.column|0;E?(tt=y.x+this.kc*At,at=this.Kd[at]):(tt=this.Kd[at],at=y.y+this.kc*At),ot.centerX=tt,ot.centerY=at,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 Ot(x&&E?0:z,x&&!E?0:y),a.reset();a.next();)x=a.value,x.x+=z,x.y+=y,x.commit()},Qr.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 Me(0,0,x,Math.abs(this.Ta[0]))):y.push(new Me(0,this.Ta[E-1],x,Math.abs(this.Ta[E-1]-this.Ta[E]))):this.K===90?E===0?y.push(new Me(0,this.Ta[0],x,Math.abs(this.Ta[0]-a))):y.push(new Me(0,this.Ta[E],x,Math.abs(this.Ta[E-1]-this.Ta[E]))):this.K===180?E===0?y.push(new Me(0,0,Math.abs(this.Ta[0]),x)):y.push(new Me(this.Ta[E-1],0,Math.abs(this.Ta[E-1]-this.Ta[E]),x)):E===0?y.push(new Me(this.Ta[0],0,Math.abs(this.Ta[0]-a),x)):y.push(new Me(this.Ta[E],0,Math.abs(this.Ta[E-1]-this.Ta[E]),x));this.commitLayers(y,this.Rf)},Qr.prototype.commitLayers=function(){},Qr.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 at=y.computeSpot(!0,tt);ot=y.computeSpot(!1,rt);var At=x.fromVertex,ft=x.toVertex;if(x.valid)y.curve===kl&&y.pointsCount===4&&(At.column===ft.column&&this.alignOption===0?(x=y.getLinkPoint(b,tt,at,!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&&at===$i&&(E=!0),rt!==null&&ot===$i&&(x=!0),(E||x)&&(ot=null,E&&(ot=y.getLinkPointFromPoint(b,tt,tt.ga(Ui),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(Ui),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(At.layer===ft.layer)y.zf();else{var pt=!1,xt=!1,Bt=this.ie,Mt=y.firstPickIndex+1;if(y.isOrthogonal){xt=!0;var Gt=y.pointsCount;4<Gt&&y.points.removeRange(2,Gt-3)}else if(y.curve===kl)pt=!0,Gt=y.pointsCount,4<Gt&&y.points.removeRange(2,Gt-3),Gt===4&&(Mt=2);else{Gt=y.pointsCount;var Dt=at===$i,_t=ot===$i;2<Gt&&Dt&&_t?y.points.removeRange(1,Gt-2):3<Gt&&Dt&&!_t?y.points.removeRange(1,Gt-3):3<Gt&&!Dt&&_t?y.points.removeRange(2,Gt-2):4<Gt&&!Dt&&!_t&&y.points.removeRange(2,Gt-3)}if(x.rev){for(;ft!==null&&At!==ft;){var Zt=Gt=null;for(Dt=ft.sourceEdges.iterator;Dt.next()&&(_t=Dt.value,_t.link!==x.link||(Gt=_t.fromVertex,Zt=_t.toVertex,Gt.node!==null)););if(Gt===null)break;if(Gt!==At){Dt=y.i(Mt-1).x,_t=y.i(Mt-1).y;var te=Gt.centerX,ie=Gt.centerY;if(xt)this.K===180||this.K===0?Mt===y.firstPickIndex+1?(y.m(Mt++,Dt,_t),y.m(Mt++,Dt,ie)):(Zt!==null?Zt.centerY:_t)!==ie&&(Zt=this.Ta[Gt.layer-1]+this.Rf.x,y.m(Mt++,Zt,_t),y.m(Mt++,Zt,ie)):Mt===y.firstPickIndex+1?(y.m(Mt++,Dt,_t),y.m(Mt++,te,_t)):(Zt!==null?Zt.centerX:Dt)!==te&&(Zt=this.Ta[Gt.layer-1]+this.Rf.y,y.m(Mt++,Dt,Zt),y.m(Mt++,te,Zt));else if(Mt===y.firstPickIndex+1){Zt=Math.max(10,this.he[ft.layer]);var me=Math.max(10,this.Ld[ft.layer]);if(pt)this.K===180?te<=ft.bounds.x?(ft=ft.bounds.x,y.m(Mt++,ft-Zt,ie),y.m(Mt++,ft,ie),y.m(Mt++,ft+me,ie)):(y.m(Mt++,te-Zt,ie),y.m(Mt++,te,ie),y.m(Mt++,te+me,ie)):this.K===90?ie>=ft.bounds.bottom?(ft=ft.bounds.y+ft.bounds.height,y.m(Mt++,te,ft+me),y.m(Mt++,te,ft),y.m(Mt++,te,ft-Zt)):(y.m(Mt++,te,ie+me),y.m(Mt++,te,ie),y.m(Mt++,te,ie-Zt)):this.K===270?ie<=ft.bounds.y?(ft=ft.bounds.y,y.m(Mt++,te,ft-Zt),y.m(Mt++,te,ft),y.m(Mt++,te,ft+me)):(y.m(Mt++,te,ie-Zt),y.m(Mt++,te,ie),y.m(Mt++,te,ie+me)):this.K===0&&(te>=ft.bounds.right?(ft=ft.bounds.x+ft.bounds.width,y.m(Mt++,ft+me,ie),y.m(Mt++,ft,ie),y.m(Mt++,ft-Zt,ie)):(y.m(Mt++,te+me,ie),y.m(Mt++,te,ie),y.m(Mt++,te-Zt,ie)));else{y.m(Mt++,Dt,_t);var ln=0;this.K===180||this.K===0?((this.K===180?te>=ft.bounds.right:te<=ft.bounds.x)&&(ln=(this.K===0?-Zt:me)/2),y.m(Mt++,Dt+ln,ie)):((this.K===270?ie>=ft.bounds.bottom:ie<=ft.bounds.y)&&(ln=(this.K===90?-Zt:me)/2),y.m(Mt++,te,_t+ln)),y.m(Mt++,te,ie)}}else Zt=Math.max(10,this.he[Gt.layer]),me=Math.max(10,this.Ld[Gt.layer]),pt?this.K===180?(y.m(Mt++,te-Zt-Bt,ie),y.m(Mt++,Math.min(te-Zt+Bt/2,te),ie),y.m(Mt++,te,ie),y.m(Mt++,te,ie),y.m(Mt++,Math.max(te+me-Bt/2,te),ie),y.m(Mt++,te+me+Bt,ie)):this.K===90?(y.m(Mt++,te,ie+me+Bt),y.m(Mt++,te,Math.max(ie+me-Bt/2,ie)),y.m(Mt++,te,ie),y.m(Mt++,te,ie),y.m(Mt++,te,Math.min(ie-Zt+Bt/2,ie)),y.m(Mt++,te,ie-Zt-Bt)):this.K===270?(y.m(Mt++,te,ie-Zt-Bt),y.m(Mt++,te,Math.min(ie-Zt+Bt/2,ie)),y.m(Mt++,te,ie),y.m(Mt++,te,ie),y.m(Mt++,te,Math.max(ie+me-Bt/2,ie)),y.m(Mt++,te,ie+me+Bt)):(y.m(Mt++,te+me+Bt,ie),y.m(Mt++,Math.max(te+me-Bt/2,te),ie),y.m(Mt++,te,ie),y.m(Mt++,te,ie),y.m(Mt++,Math.min(te-Zt+Bt/2,te),ie),y.m(Mt++,te-Zt-Bt,ie)):y.m(Mt++,te,ie)}ft=Gt}(rt===null||at!==$i||xt)&&(Dt=y.i(Mt-1).x,_t=y.i(Mt-1).y,te=y.i(Mt).x,ie=y.i(Mt).y,xt?(Bt=this.Ld[At.layer],this.K===180||this.K===0?(xt=_t,xt>=At.bounds.y&&xt<=At.bounds.bottom&&(this.K===180?te>=At.bounds.x:te<=At.bounds.right)&&(ft=At.centerX+(this.K===180?-Bt:Bt),xt<At.bounds.y+At.bounds.height/2?xt=At.bounds.y-this.kc/2:xt=At.bounds.bottom+this.kc/2,y.m(Mt++,ft,_t),y.m(Mt++,ft,xt)),y.m(Mt++,te,xt)):(xt=Dt,xt>=At.bounds.x&&xt<=At.bounds.right&&(this.K===270?ie>=At.bounds.y:ie<=At.bounds.bottom)&&(ft=At.centerY+(this.K===270?-Bt:Bt),xt<At.bounds.x+At.bounds.width/2?xt=At.bounds.x-this.kc/2:xt=At.bounds.right+this.kc/2,y.m(Mt++,Dt,ft),y.m(Mt++,xt,ft)),y.m(Mt++,xt,ie)),y.m(Mt++,te,ie)):pt?(Zt=Math.max(10,this.he[At.layer]),me=Math.max(10,this.Ld[At.layer]),this.K===180&&te>=At.bounds.x?(ft=At.bounds.x+At.bounds.width,y.L(Mt-2,ft,_t),y.L(Mt-1,ft+me,_t)):this.K===90&&ie<=At.bounds.bottom?(ft=At.bounds.y,y.L(Mt-2,Dt,ft),y.L(Mt-1,Dt,ft-Zt)):this.K===270&&ie>=At.bounds.y?(ft=At.bounds.y+At.bounds.height,y.L(Mt-2,Dt,ft),y.L(Mt-1,Dt,ft+me)):this.K===0&&te<=At.bounds.right&&(ft=At.bounds.x,y.L(Mt-2,ft,_t),y.L(Mt-1,ft-Zt,_t))):(Zt=Math.max(10,this.he[At.layer]),me=Math.max(10,this.Ld[At.layer]),xt=0,this.K===180||this.K===0?((this.K===180?te<=At.bounds.x:te>=At.bounds.right)&&(xt=(this.K===0?me:-Zt)/2),y.m(Mt++,te+xt,_t)):((this.K===270?ie<=At.bounds.y:ie>=At.bounds.bottom)&&(xt=(this.K===90?me:-Zt)/2),y.m(Mt++,Dt,ie+xt)),y.m(Mt++,te,ie)))}else{for(;At!==null&&At!==ft;){for(Zt=Gt=null,At=At.destinationEdges.iterator;At.next()&&(Dt=At.value,Dt.link!==x.link||(Gt=Dt.toVertex,Zt=Dt.fromVertex,Zt.node!==null&&(Zt=null),Gt.node!==null)););if(Gt===null)break;Gt!==ft&&(Dt=y.i(Mt-1).x,_t=y.i(Mt-1).y,te=Gt.centerX,ie=Gt.centerY,xt?this.K===180||this.K===0?(Zt!==null?Zt.centerY:_t)!==ie&&(Zt=this.Ta[Gt.layer]+this.Rf.x,Mt===y.firstPickIndex+1&&(Zt=this.K===0?Math.max(Zt,Dt):Math.min(Zt,Dt)),y.m(Mt++,Zt,_t),y.m(Mt++,Zt,ie)):(Zt!==null?Zt.centerX:Dt)!==te&&(Zt=this.Ta[Gt.layer]+this.Rf.y,Mt===y.firstPickIndex+1&&(Zt=this.K===90?Math.max(Zt,_t):Math.min(Zt,_t)),y.m(Mt++,Dt,Zt),y.m(Mt++,te,Zt)):(Zt=Math.max(10,this.he[Gt.layer]),me=Math.max(10,this.Ld[Gt.layer]),pt?this.K===180?(y.m(Mt++,te+me+Bt,ie),y.m(Mt++,Math.max(te+me-Bt/2,te),ie),y.m(Mt++,te,ie),y.m(Mt++,te,ie),y.m(Mt++,Math.min(te-Zt+Bt/2,te),ie),y.m(Mt++,te-Zt-Bt,ie)):this.K===90?(y.m(Mt++,te,ie-Zt-Bt),y.m(Mt++,te,Math.min(ie-Zt+Bt/2,ie)),y.m(Mt++,te,ie),y.m(Mt++,te,ie),y.m(Mt++,te,Math.max(ie+me-Bt/2,ie)),y.m(Mt++,te,ie+me+Bt)):this.K===270?(y.m(Mt++,te,ie+me+Bt),y.m(Mt++,te,Math.max(ie+me-Bt/2,ie)),y.m(Mt++,te,ie),y.m(Mt++,te,ie),y.m(Mt++,te,Math.min(ie-Zt+Bt/2,ie)),y.m(Mt++,te,ie-Zt-Bt)):(y.m(Mt++,te-Zt-Bt,ie),y.m(Mt++,Math.min(te-Zt+Bt/2,te),ie),y.m(Mt++,te,ie),y.m(Mt++,te,ie),y.m(Mt++,Math.max(te+me-Bt/2,te),ie),y.m(Mt++,te+me+Bt,ie)):this.K===180?(y.m(Mt++,te+me,ie),y.m(Mt++,te-Zt,ie)):this.K===90?(y.m(Mt++,te,ie-Zt),y.m(Mt++,te,ie+me)):this.K===270?(y.m(Mt++,te,ie+me),y.m(Mt++,te,ie-Zt)):(y.m(Mt++,te-Zt,ie),y.m(Mt++,te+me,ie)))),At=Gt}xt&&(Dt=y.i(Mt-1).x,_t=y.i(Mt-1).y,te=y.i(Mt).x,ie=y.i(Mt).y,this.K===180||this.K===0?_t!==ie&&(Zt=this.K===0?Math.min(Math.max((te+Dt)/2,this.Ta[ft.layer]+this.Rf.x),te):Math.max(Math.min((te+Dt)/2,this.Ta[ft.layer]+this.Rf.x),te),y.m(Mt++,Zt,_t),y.m(Mt++,Zt,ie)):Dt!==te&&(Zt=this.K===90?Math.min(Math.max((ie+_t)/2,this.Ta[ft.layer]+this.Rf.y),ie):Math.max(Math.min((ie+_t)/2,this.Ta[ft.layer]+this.Rf.y),ie),y.m(Mt++,Dt,Zt),y.m(Mt++,te,Zt)))}E!==null&&pt&&4<=y.pointsCount&&(tt!==null&&(tt=at===$i?y.getLinkPointFromPoint(b,tt,tt.ga(Ui),y.i(3),!0):y.i(0),at===$i&&(at=y.i(2),E=y.i(3),this.direction===90||this.direction===270?(y.L(1,(tt.x+at.x)/2,at.y),y.L(2,E.x,(at.y+E.y)/2)):(y.L(1,at.x,(tt.y+at.y)/2),y.L(2,(at.x+E.x)/2,E.y))),tt.w()||tt.set(b.actualBounds.center),y.L(0,tt.x,tt.y)),rt!==null&&(b=ot===$i?y.getLinkPointFromPoint(z,rt,rt.ga(Ui),y.i(y.pointsCount-4),!1):y.i(y.pointsCount-1),ot===$i&&(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()},Qr.prototype.avoidOrthogonalOverlaps=function(){if(!(0>=this.linkSpacing)){for(var a=new Vt,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 lf;rt.layer=Math.floor(z.y/2);var ot=E.i(0),at=E.i(E.pointsCount-1);if(rt.first=ot.x*ot.x+ot.y,rt.jc=at.x*at.x+at.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),at=E.i(b+2);var At=0;ot.y<z.y?At=at.y<z.y?3:z.x<tt.x?2:1:ot.y>z.y&&(At=at.y>z.y?0:tt.x<z.x?2:1),rt.j=At}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),At=1,rt=x[z].jc,ot=z;ot<b;ot++)at=x[ot],at.jc!==rt&&(At++,rt=at.jc);this.zi(x,this.Ux,z,z+tt);var ft=1;for(rt=x[z].first,ot=z;ot<b;ot++)at=x[ot],at.first!==rt&&(ft++,rt=at.first);for(ot=!0,at=ft,At<ft?(ot=!1,at=At,rt=x[z].jc,this.zi(x,this.Js,z,z+tt)):rt=x[z].first,At=0,ft=z;ft<b;ft++){var pt=x[ft];(ot?pt.first:pt.jc)!==rt&&(At++,rt=ot?pt.first:pt.jc);var xt=pt.link;z=xt.i(pt.index),tt=xt.i(pt.index+1);var Bt=this.linkSpacing*(At-(at-1)/2);y++,xt.uh(),xt.L(pt.index,z.x,z.y+Bt),xt.L(pt.index+1,tt.x,tt.y+Bt),xt.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 lf,rt.layer=Math.floor(z.x/2),ot=E.i(0),at=E.i(E.pointsCount-1),rt.first=ot.x+ot.y*ot.y,rt.jc=at.x+at.y*at.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),at=E.i(b+2),At=0,ot.x<z.x?At=at.x<z.x?3:z.y<tt.y?2:1:ot.x>z.x&&(At=at.x>z.x?0:tt.y<z.y?2:1),rt.j=At),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),At=1,rt=x[z].jc,ot=z;ot<b;ot++)at=x[ot],at.jc!==rt&&(At++,rt=at.jc);for(this.zi(x,this.Ux,z,z+tt),ft=1,rt=x[z].first,ot=z;ot<b;ot++)at=x[ot],at.first!==rt&&(ft++,rt=at.first);for(ot=!0,at=ft,At<ft?(ot=!1,at=At,rt=x[z].jc,this.zi(x,this.Js,z,z+tt)):rt=x[z].first,At=0,ft=z;ft<b;ft++)pt=x[ft],(ot?pt.first:pt.jc)!==rt&&(At++,rt=ot?pt.first:pt.jc),xt=pt.link,z=xt.i(pt.index),tt=xt.i(pt.index+1),Bt=this.linkSpacing*(At-(at-1)/2),y++,xt.uh(),xt.L(pt.index,z.x+Bt,z.y),xt.L(pt.index+1,tt.x+Bt,tt.y),xt.zf()}z=b}a=E}}}},Pt=Qr.prototype,Pt.Vx=function(a,y){return a instanceof lf&&y instanceof lf&&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 lf&&y instanceof lf&&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 lf&&y instanceof lf&&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)&&Yt("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 sf(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 af(a,y,x){a.He[a.tc[y]]=x}We.Object.defineProperties(Qr.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()):Yt("LayeredDigraphLayout.direction must be 0, 90, 180, or 270"))}},cycleRemoveOption:{get:function(){return this.Dk},set:function(a){this.Dk===a||a!==Nv&&a!==rm&&a!==Up||(this.Dk=a,this.C())}},layeringOption:{get:function(){return this.Zk},set:function(a){this.Zk===a||a!==om&&a!==Qv&&a!==Uv||(this.Zk=a,this.C())}},initializeOption:{get:function(){return this.Qk},set:function(a){this.Qk===a||a!==sm&&a!==Dv&&a!==Ov||(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!==Hv&&a!==am&&a!==Rv||(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 rm=new xe(Qr,"CycleDepthFirst",0),Nv=new xe(Qr,"CycleGreedy",1),Up=new xe(Qr,"CycleFromLayers",2),om=new xe(Qr,"LayerOptimalLinkLength",0),Qv=new xe(Qr,"LayerLongestPathSink",1),Uv=new xe(Qr,"LayerLongestPathSource",2),sm=new xe(Qr,"InitDepthFirstOut",0),Dv=new xe(Qr,"InitDepthFirstIn",1),Ov=new xe(Qr,"InitNaive",2),Hv=new xe(Qr,"AggressiveNone",0),am=new xe(Qr,"AggressiveLess",1),Rv=new xe(Qr,"AggressiveMore",2),W1=8;Qr.className="LayeredDigraphLayout",Qr.CycleDepthFirst=rm,Qr.CycleGreedy=Nv,Qr.CycleFromLayers=Up,Qr.LayerOptimalLinkLength=om,Qr.LayerLongestPathSink=Qv,Qr.LayerLongestPathSource=Uv,Qr.InitDepthFirstOut=sm,Qr.InitDepthFirstIn=Dv,Qr.InitNaive=Ov,Qr.AggressiveNone=Hv,Qr.AggressiveLess=am,Qr.AggressiveMore=Rv,Qr.PackNone=0,Qr.PackExpand=1,Qr.PackStraighten=2,Qr.PackMedian=4,Qr.PackAll=15,Qr.AlignNone=0,Qr.AlignUpperLeft=1,Qr.AlignUpperRight=2,Qr.AlignLowerLeft=4,Qr.AlignLowerRight=8,Qr.AlignAll=15;function lf(){this.index=this.Ic=this.rd=this.jc=this.first=this.layer=0,this.link=null,this.j=0}lf.className="SegInfo";function Dg(a){qr.call(this,a)}Le(Dg,qr),Dg.prototype.createVertex=function(){return new Kl(this)},Dg.prototype.createEdge=function(){return new Dp(this)},Dg.className="LayeredDigraphNetwork";function Kl(a){gs.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}Le(Kl,gs);function r1(a,y){return a.index-y.index}function lm(a,y){if(!a.$n){for(var x=[],E=Gr(a.destinationEdgesArrayAccess),b=E.next();!b.done;b=E.next())b=b.value,b.valid&&x.push(b);a.$n=x}for(a=Gr(a.$n),x=a.next();!x.done;x=a.next())if(x=x.value,x.toVertex===y)return x;Yt("Unable to find destination edge to given vertex")}function Gv(a){if(!a.co){for(var y=[],x=Gr(a.sourceEdgesArrayAccess),E=x.next();!E.done;E=x.next())E=E.value,E.valid&&y.push(E.fromVertex);y.sort(r1),a.co=y}return a.co}function Y1(a){if(!a.ao){for(var y=[],x=Gr(a.destinationEdgesArrayAccess),E=x.next();!E.done;E=x.next())E=E.value,E.valid&&y.push(E.toVertex);y.sort(r1),a.ao=y}return a.ao}Kl.prototype.Cl=function(a){gs.prototype.Cl.call(this,a),this.bo=this.co=null},Kl.prototype.Kl=function(a){gs.prototype.Kl.call(this,a),this.bo=this.co=null},Kl.prototype.zl=function(a){gs.prototype.zl.call(this,a),this.$n=this.ao=null},Kl.prototype.Jl=function(a){gs.prototype.Jl.call(this,a),this.$n=this.ao=null},We.Object.defineProperties(Kl.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)}}}),Kl.prototype.deleteDestinationEdge=Kl.prototype.Jl,Kl.prototype.addDestinationEdge=Kl.prototype.zl,Kl.prototype.deleteSourceEdge=Kl.prototype.Kl,Kl.prototype.addSourceEdge=Kl.prototype.Cl,Kl.className="LayeredDigraphVertex";function Dp(a){ml.call(this,a),this.j=this.ia=this.Ha=!1,this.V=this.u=NaN,this.F=this.o=0}Le(Dp,ml),We.Object.defineProperties(Dp.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)}}}),Dp.className="LayeredDigraphEdge";function qi(a){po.call(this),this.Ub=new le,this.Wn=cm,this.ud=Ku,this.vo=dm,this.Bq=qv,this.$v=[],this.td=!0,this.Rb=gm,this.$d=new Xe(10,10).freeze();var y=new Yd(this);this.W=new Zl(y),this.Y=new Zl(y),this.ru=[],a&&Object.assign(this,a)}Le(qi,po),qi.prototype.cloneProtected=function(a){po.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)},qi.prototype.qb=function(a){a.classType===qi?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:Yt("Unknown enum value: "+a):po.prototype.qb.call(this,a)},qi.prototype.createNetwork=function(){return new Yd(this)},qi.prototype.makeNetwork=function(a){function y(E){if(E instanceof gn)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 pe?(x.lg(a.nodes,!0,y),x.lg(a.links,!0,y)):a instanceof Ti?x.lg(a.memberParts,!1,y):x.lg(a.iterator,!1,y),x},qi.prototype.doLayout=function(a){this.network===null&&(this.network=this.makeNetwork(a)),this.arrangement!==pm&&(this.arrangementOrigin=this.initialOrigin(this.arrangementOrigin));var y=this.diagram;if(y===null&&a instanceof pe&&(y=a),this.path===cm&&y!==null?this.ud=y.isTreePathToChildren?Ku:_d:this.ud=this.path===cm?Ku: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 le,y=this.Ub.iterator;y.next();){var x=y.value;x instanceof gn?(x=this.network.ki(x),x!==null&&a.add(x)):x instanceof Zl&&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,zv(this,y));for(y=this.network.vertexes,a=null;a=X1(y),0<a.count;)y=o1(this,a),y!==null&&this.Ub.add(y),y.initialized=!0,zv(this,y),y=a;for(a=this.Ub.iterator;a.next();)y=a.value,y instanceof Zl&&a1(this,y);for(a=this.Ub.iterator;a.next();)y=a.value,y instanceof Zl&&l1(this,y);for(a=this.Ub.iterator;a.next();)y=a.value,y instanceof Zl&&A1(this,y);if(this.Cu(),this.layerStyle===mm){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===$v)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 Zl&&this.layoutTree(y);this.arrangeTrees(),this.updateParts()}this.network=null,this.Ub=new le,this.isValidLayout=!0};function X1(a){var y=new le;for(a=a.iterator;a.next();){var x=a.value;x.initialized||y.add(x)}return y}qi.prototype.findRoots=function(){for(var a=this.network.vertexes,y=a.iterator;y.next();){var x=y.value;switch(this.ud){case Ku:x.sourceEdges.count===0&&this.Ub.add(x);break;case _d:x.destinationEdges.count===0&&this.Ub.add(x);break;default:Yt("Unhandled path value "+this.ud.toString())}}this.Ub.count===0&&(a=o1(this,a),a!==null&&this.Ub.add(a))};function o1(a,y){var x=999999,E=null;for(y=y.iterator;y.next();){var b=y.value;switch(a.ud){case Ku:b.sourceEdges.count<x&&(x=b.sourceEdges.count,E=b);break;case _d:b.destinationEdges.count<x&&(x=b.destinationEdges.count,E=b);break;default:Yt("Unhandled path value "+a.ud.toString())}}return E}function zv(a,y){if(y!==null){switch(a.ud){case Ku:if(0<y.destinationEdges.count){for(var x=new Vt,E=y.destinationVertexes;E.next();){var b=E.value;s1(a,y,b)&&x.add(b)}0<x.count&&(y.children=x.Fa())}break;case _d:if(0<y.sourceEdges.count){for(x=new Vt,E=y.sourceVertexes;E.next();)b=E.value,s1(a,y,b)&&x.add(b);0<x.count&&(y.children=x.Fa())}break;default:Yt("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++)zv(a,x[y])}}function s1(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}qi.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 a1(a,y){if(y!==null){a.initializeTreeVertexValues(y),y.alignment===_u&&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];a1(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 Z1(a,y){switch(a.vo){default:case dm:return y.parent!==null?y.parent:a.W;case Zv:return y.parent===null?a.W:y.parent.parent===null?a.Y:y.parent;case Xv:return y.parent!==null?y.parent.parent!==null?y.parent.parent:a.Y:a.W;case Yv: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}}qi.prototype.initializeTreeVertexValues=function(a){if(a.copyInheritedPropertiesFrom(Z1(this,a)),a.parent!==null&&a.parent.alignment===_u){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 l1(a,y){if(y!==null){a.assignTreeVertexValues(y),y=y.children;for(var x=y.length,E=0;E<x;E++)l1(a,y[E])}}qi.prototype.assignTreeVertexValues=function(){};function A1(a,y){if(y!==null){y.alignment!==_u&&a.sortTreeVertexChildren(y),y=y.children;for(var x=y.length,E=0;E<x;E++)A1(a,y[E])}}qi.prototype.sortTreeVertexChildren=function(a){switch(a.sorting){case Og:break;case Hp:a.children.reverse();break;case Rp:a.children.sort(a.comparer);break;case Gp:a.children.sort(a.comparer),a.children.reverse();break;default:Yt("Unhandled sorting value "+a.sorting.toString())}},qi.prototype.Cu=function(){if(this.comments)for(var a=this.network.vertexes.iterator;a.next();)this.addComments(a.value)},qi.prototype.addComments=function(a){var y=a.angle,x=a.parent,E=0,b=!1;x!==null&&(E=x.angle,b=x.alignment,b=Af(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 at=a.node.Mu();at.next();){var At=at.value;At.category==="Comment"&&At.canLayout()&&(a.comments===null&&(a.comments=[]),a.comments.push(At),At.Va(),At=At.measuredBounds,y&&!x||!b&&!E&&x||b&&E&&x?(z=Math.max(z,At.width),tt+=At.height+Math.abs(rt)):(z+=At.width+Math.abs(rt),tt=Math.max(tt,At.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=Me.allocAt(0,0,a.bounds.width+z,a.bounds.height+tt),a.bounds=b,Me.free(b))};function Af(a){return a===pc||a===_u||a===mc||a===Sh}function Op(a){return a===pc||a===_u}function Kv(a){var y=a.parent;if(y!==null){var x=y.alignment;if(Af(x)){if(Op(x)){for(y=y.children,x=0;x<y.length&&a!==y[x];)x++;return x%2===0}if(x===mc)return!0}}return!1}qi.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=Af(z)),E=E===90||E===270,x=b===90||b===270;for(var tt=a.childrenCount===0,rt=Kv(a),ot=0,at=a.comments,At=at.length,ft=Ot.alloc(),pt=0;pt<At;pt++){var xt=at[pt],Bt=xt.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-Bt.width,a.bounds.y+ot),xt.move(ft),xt=xt.Sd();xt.next();){var Mt=xt.value;Mt.fromSpot=No,Mt.toSpot=rs}else for(ft.h(a.bounds.x+2*a.focus.x-a.commentMargin,a.bounds.y+ot),xt.move(ft),xt=xt.Sd();xt.next();)Mt=xt.value,Mt.fromSpot=rs,Mt.toSpot=No;else if(0<=a.commentMargin)for(ft.h(a.bounds.x+2*a.focus.x+a.commentMargin,a.bounds.y+ot),xt.move(ft),xt=xt.Sd();xt.next();)Mt=xt.value,Mt.fromSpot=rs,Mt.toSpot=No;else for(ft.h(a.bounds.x+a.commentMargin-Bt.width,a.bounds.y+ot),xt.move(ft),xt=xt.Sd();xt.next();)Mt=xt.value,Mt.fromSpot=No,Mt.toSpot=rs;ot=0<=a.commentSpacing?ot+(Bt.height+a.commentSpacing):ot+(a.commentSpacing-Bt.height)}else{if(135<b&&!z||!x&&rt)if(0<=a.commentMargin)for(ft.h(a.bounds.x+ot,a.bounds.y-a.commentMargin-Bt.height),xt.move(ft),xt=xt.Sd();xt.next();)Mt=xt.value,Mt.fromSpot=vs,Mt.toSpot=Ys;else for(ft.h(a.bounds.x+ot,a.bounds.y+2*a.focus.y-a.commentMargin),xt.move(ft),xt=xt.Sd();xt.next();)Mt=xt.value,Mt.fromSpot=Ys,Mt.toSpot=vs;else if(0<=a.commentMargin)for(ft.h(a.bounds.x+ot,a.bounds.y+2*a.focus.y+a.commentMargin),xt.move(ft),xt=xt.Sd();xt.next();)Mt=xt.value,Mt.fromSpot=Ys,Mt.toSpot=vs;else for(ft.h(a.bounds.x+ot,a.bounds.y+a.commentMargin-Bt.height),xt.move(ft),xt=xt.Sd();xt.next();)Mt=xt.value,Mt.fromSpot=vs,Mt.toSpot=Ys;ot=0<=a.commentSpacing?ot+(Bt.width+a.commentSpacing):ot+(a.commentSpacing-Bt.width)}}if(Ot.free(ft),y=ot-a.commentSpacing-(E?y.height:y.width),this.ud===Ku)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)}},qi.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 fm:u1(this,a);break;case zp:if(a.alignment===_u)u1(this,a);else if(a.childrenCount===0)E=a.parent,x=!1,y=0,E!==null&&(y=E.angle,x=E.alignment,x=Af(x)),E=Kv(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=yA(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===ju;var at=ot===Vu,At=Af(ot),ft=Math.max(0,a.breadthLimit);x=this.computeLayerSpacing(a);var pt=a.nodeSpacing,xt=this.computeNodeIndent(a),Bt=a.rowSpacing,Mt=0;(E||at||a.hm||a.im&&a.maxGenerationCount===1)&&(Mt=Math.max(0,a.rowIndent)),E=a.width;var Gt=a.height,Dt=0,_t=0,Zt=0,te=null,ie=null,me=0,ln=0,Un=0,Fn=0,tn=0,De=0,bi=0,Bi=0;if(At&&!Op(ot)&&135<b&&tt.reverse(),Op(ot))if(1<rt)for(var Br=0;Br<rt;Br++)Br%2===0&&Br!==rt-1&&(Bi=Math.max(Bi,y?tt[Br].Da.width:tt[Br].Da.height));else rt===1&&(Bi=y?tt[0].Da.width:tt[0].Da.height);if(At){switch(ot){case pc:_t=135>b?h1(this,a,tt,Bi,Dt,_t):c1(this,a,tt,Bi,Dt,_t),Bi=_t.x,Dt=_t.width,_t=_t.height;break;case mc:for(te=0;te<rt;te++)ie=tt[te],ft=ie.Da,Zt=De===0?0:Bt,y?(ie.S.h(z-ft.width,Fn+Zt),Dt=Math.max(Dt,ft.width),_t=Math.max(_t,Fn+Zt+ft.height),Fn+=Zt+ft.height):(ie.S.h(Un+Zt,z-ft.height),Dt=Math.max(Dt,Un+Zt+ft.width),_t=Math.max(_t,ft.height),Un+=Zt+ft.width),De++;break;case Sh:for(te=0;te<rt;te++)ie=tt[te],z=ie.Da,ft=De===0?0:Bt,y?(ie.S.h(pt/2+a.focus.x,Fn+ft),Dt=Math.max(Dt,z.width),_t=Math.max(_t,Fn+ft+z.height),Fn+=ft+z.height):(ie.S.h(Un+ft,pt/2+a.focus.y),Dt=Math.max(Dt,Un+ft+z.width),_t=Math.max(_t,z.height),Un+=ft+z.width),De++}te=nl(this,2),ie=nl(this,2),y?(te[0].h(0,0),te[1].h(0,_t),ie[0].h(Dt,0)):(te[0].h(0,0),te[1].h(Dt,0),ie[0].h(0,_t)),ie[1].h(Dt,_t)}else for(Br=0;Br<rt;Br++){var Wr=tt[Br],Ss=Wr.Da;if(y){0<ft&&0<De&&Un+pt+Ss.width>ft&&(Un<z&&qf(a,ot,z-Un,0,bi,Br-1),tn++,De=0,bi=Br,Zt=_t,Un=0,Fn=135<b?-_t-Bt:_t+Bt),um(this,Wr,0,Fn);var Ls=0;if(De===0)te=Wr.Yo,ie=Wr.kp,me=Ss.width,ln=Ss.height,(te===null||ie===null||b!==yA(Wr))&&(te=nl(this,2),ie=nl(this,2),te[0].h(0,0),te[1].h(0,ln),ie[0].h(me,0),ie[1].h(me,ln));else{var ya=Qn();ln=f1(this,a,Wr,te,ie,me,ln,ya),Ls=ln.x,te=ya[0],ie=ya[1],me=ln.width,ln=ln.height,Dn(ya),Un<Ss.width&&0>Ls&&(Vd(a,-Ls,0,bi,Br-1),hm(te,-Ls,0),hm(ie,-Ls,0),Ls=0)}Wr.S.h(Ls,Fn),Dt=Math.max(Dt,me),_t=Math.max(_t,Zt+(tn===0?0:Bt)+Ss.height),Un=me}else 0<ft&&0<De&&Fn+pt+Ss.height>ft&&(Fn<z&&qf(a,ot,0,z-Fn,bi,Br-1),tn++,De=0,bi=Br,Zt=Dt,Fn=0,Un=135<b?-Dt-Bt:Dt+Bt),um(this,Wr,Un,0),Ls=0,De===0?(te=Wr.Yo,ie=Wr.kp,me=Ss.width,ln=Ss.height,(te===null||ie===null||b!==yA(Wr))&&(te=nl(this,2),ie=nl(this,2),te[0].h(0,0),te[1].h(me,0),ie[0].h(0,ln),ie[1].h(me,ln))):(ya=Qn(),ln=f1(this,a,Wr,te,ie,me,ln,ya),Ls=ln.x,te=ya[0],ie=ya[1],me=ln.width,ln=ln.height,Dn(ya),Fn<Ss.height&&0>Ls&&(Vd(a,0,-Ls,bi,Br-1),hm(te,0,-Ls),hm(ie,0,-Ls),Ls=0)),Wr.S.h(Un,Ls),_t=Math.max(_t,ln),Dt=Math.max(Dt,Zt+(tn===0?0:Bt)+Ss.width),Fn=ln;De++}switch(0<tn&&(y?(_t+=Math.max(0,x),Un<Dt&&qf(a,ot,Dt-Un,0,bi,rt-1),0<Mt&&(at||Vd(a,Mt,0,0,rt-1),Dt+=Mt)):(Dt+=Math.max(0,x),Fn<_t&&qf(a,ot,0,_t-Fn,bi,rt-1),0<Mt&&(at||Vd(a,0,Mt,0,rt-1),_t+=Mt))),Mt=at=0,ot){case Hg:y?at+=Dt/2-a.focus.x-xt/2:Mt+=_t/2-a.focus.y-xt/2;break;case Wd:0<tn?y?at+=Dt/2-a.focus.x-xt/2:Mt+=_t/2-a.focus.y-xt/2:y?(Bi=tt[0].S.x+tt[0].la.x,at+=Bi+(tt[rt-1].S.x+tt[rt-1].la.x+2*tt[rt-1].focus.x-Bi)/2-a.focus.x-xt/2):(Bi=tt[0].S.y+tt[0].la.y,Mt+=Bi+(tt[rt-1].S.y+tt[rt-1].la.y+2*tt[rt-1].focus.y-Bi)/2-a.focus.y-xt/2);break;case ju:y?(at-=xt,Dt+=xt):(Mt-=xt,_t+=xt);break;case Vu:y?(at+=Dt-a.width+xt,Dt+=xt):(Mt+=_t-a.height+xt,_t+=xt);break;case pc:y?1<rt?at+=Bi+pt/2-a.focus.x:at+=tt[0].focus.x-a.focus.x+tt[0].la.x:1<rt?Mt+=Bi+pt/2-a.focus.y:Mt+=tt[0].focus.y-a.focus.y+tt[0].la.y;break;case mc:y?at+=Dt+pt/2-a.focus.x:Mt+=_t+pt/2-a.focus.y;break;case Sh:break;default:_t=this.customAlignment(a,at,Mt,Dt,_t),at=_t[0],Mt=_t[1],Dt=_t[2],_t=_t[3]}for(xt=0;xt<rt;xt++)Bi=tt[xt],y?Bi.S.h(Bi.S.x+Bi.la.x-at,Bi.S.y+(135<b?(At?-_t:-Bi.Da.height)+Bi.la.y-x:Gt+x+Bi.la.y)):Bi.S.h(Bi.S.x+(135<b?(At?-Dt:-Bi.Da.width)+Bi.la.x-x:E+x+Bi.la.x),Bi.S.y+Bi.la.y-Mt);if(rt=tt=0,At?y?(Dt=jv(a,Dt,at),0>at&&(at=0),135<b&&(Mt+=_t+x),_t+=Gt+x,ot===Sh&&(tt+=pt/2+a.focus.x),rt+=Gt+x):(135<b&&(at+=Dt+x),Dt+=E+x,_t=Vv(a,_t,Mt),0>Mt&&(Mt=0),ot===Sh&&(rt+=pt/2+a.focus.y),tt+=E+x):y?(a.comments===null?E>Dt&&(Dt=_v(ot,E-Dt,0),tt=Dt.x,rt=Dt.y,Dt=E,at=0):Dt=jv(a,Dt,at),0>at&&(tt-=at,at=0),135<b&&(Mt+=_t+x),_t=Math.max(Math.max(_t,Gt),_t+Gt+x),rt+=Gt+x):(135<b&&(at+=Dt+x),Dt=Math.max(Math.max(Dt,E),Dt+E+x),a.comments===null?Gt>_t&&(_t=_v(ot,0,Gt-_t),tt=_t.x,rt=_t.y,_t=Gt,Mt=0):_t=Vv(a,_t,Mt),0>Mt&&(rt-=Mt,Mt=0),tt+=E+x),0<tn)b=nl(this,4),tn=nl(this,4),y?(b[2].h(0,Gt+x),b[3].h(b[2].x,_t),tn[2].h(Dt,b[2].y),tn[3].h(tn[2].x,b[3].y)):(b[2].h(E+x,0),b[3].h(Dt,b[2].y),tn[2].h(b[2].x,_t),tn[3].h(b[3].x,tn[2].y));else{for(b=nl(this,te.length+2),tn=nl(this,ie.length+2),ot=0;ot<te.length;ot++)At=te[ot],b[ot+2].h(At.x+tt,At.y+rt);for(ot=0;ot<ie.length;ot++)At=ie[ot],tn[ot+2].h(At.x+tt,At.y+rt)}y?(b[0].h(at,0),b[1].h(b[0].x,Gt),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])),tn[0].h(at+E,0),tn[1].h(tn[0].x,Gt),tn[2].y<tn[1].y&&(tn[2].x<tn[0].x?tn[2].assign(tn[1]):tn[1].assign(tn[2])),tn[3].y<tn[2].y&&(tn[3].x<tn[0].x?tn[3].assign(tn[2]):tn[2].assign(tn[3])),b[2].y-=x/2,tn[2].y-=x/2):(b[0].h(0,Mt),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])),tn[0].h(0,Mt+Gt),tn[1].h(E,tn[0].y),tn[2].x<tn[1].x&&(tn[2].y<tn[0].y?tn[2].assign(tn[1]):tn[1].assign(tn[2])),tn[3].x<tn[2].x&&(tn[3].y<tn[0].y?tn[3].assign(tn[2]):tn[2].assign(tn[3])),b[2].x-=x/2,tn[2].x-=x/2),UA(this,te),UA(this,ie),a.Yo=b,a.kp=tn,a.la.h(at,Mt),a.Da.h(Dt,_t)}break;default:Yt("Unhandled compaction value "+a.compaction.toString())}}};function u1(a,y){if(y.childrenCount===0){var x=!1,E=0;y.parent!==null&&(E=y.parent.angle,x=y.parent.alignment,x=Af(x));var b=Kv(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=yA(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 at=y.alignment,At=at===ju,ft=at===Vu;rt=Af(at);var pt=Math.max(0,y.breadthLimit);ot=a.computeLayerSpacing(y);var xt=y.nodeSpacing,Bt=a.computeNodeIndent(y),Mt=At||ft?0:Bt/2,Gt=y.rowSpacing,Dt=0;(At||ft||y.hm||y.im&&y.maxGenerationCount===1)&&(Dt=Math.max(0,y.rowIndent)),At=y.width;var _t=y.height,Zt=0,te=0,ie=0,me=0,ln=0,Un=0,Fn=0,tn=0,De=0,bi=0;if(rt&&!Op(at)&&135<E&&b.reverse(),Op(at))if(1<tt)for(var Bi=0;Bi<tt;Bi++){var Br=b[Bi],Wr=Br.Da;Bi%2===0&&Bi!==tt-1?De=Math.max(De,(x?Wr.width:Wr.height)+a.computeBusNodeSpacing(Br)-xt):Bi%2!==0&&(bi=Math.max(bi,(x?Wr.width:Wr.height)+a.computeBusNodeSpacing(Br)-xt))}else tt===1&&(De=x?b[0].Da.width:b[0].Da.height);if(rt)switch(at){case pc:case _u:te=135>E?h1(a,y,b,De,Zt,te):c1(a,y,b,De,Zt,te),De=te.x,Zt=te.width,te=te.height;break;case mc:for(pt=0;pt<tt;pt++)Mt=b[pt],ie=Mt.Da,bi=Fn===0?0:Gt,x?(Mt.S.h(z-ie.width,ln+bi),Zt=Math.max(Zt,ie.width),te=Math.max(te,ln+bi+ie.height),ln+=bi+ie.height):(Mt.S.h(me+bi,z-ie.height),Zt=Math.max(Zt,me+bi+ie.width),te=Math.max(te,ie.height),me+=bi+ie.width),Fn++;break;case Sh:for(z=0;z<tt;z++)pt=b[z],Mt=pt.Da,ie=Fn===0?0:Gt,x?(pt.S.h(xt/2+y.focus.x,ln+ie),Zt=Math.max(Zt,Mt.width),te=Math.max(te,ln+ie+Mt.height),ln+=ie+Mt.height):(pt.S.h(me+ie,xt/2+y.focus.y),Zt=Math.max(Zt,me+ie+Mt.width),te=Math.max(te,Mt.height),me+=ie+Mt.width),Fn++}else for(bi=0;bi<tt;bi++)Bi=b[bi],Br=Bi.Da,x?(0<pt&&0<Fn&&me+xt+Br.width>pt&&(me<z&&qf(y,at,z-me,0,tn,bi-1),Un++,Fn=0,tn=bi,ie=te,me=0,ln=135<E?-te-Gt:te+Gt),Wr=Fn===0?Mt:xt,um(a,Bi,0,ln),Bi.S.h(me+Wr,ln),Zt=Math.max(Zt,me+Wr+Br.width),te=Math.max(te,ie+(Un===0?0:Gt)+Br.height),me+=Wr+Br.width):(0<pt&&0<Fn&&ln+xt+Br.height>pt&&(ln<z&&qf(y,at,0,z-ln,tn,bi-1),Un++,Fn=0,tn=bi,ie=Zt,ln=0,me=135<E?-Zt-Gt:Zt+Gt),Wr=Fn===0?Mt:xt,um(a,Bi,me,0),Bi.S.h(me,ln+Wr),te=Math.max(te,ln+Wr+Br.height),Zt=Math.max(Zt,ie+(Un===0?0:Gt)+Br.width),ln+=Wr+Br.height),Fn++;switch(0<Un&&(x?(te+=Math.max(0,ot),me<Zt&&qf(y,at,Zt-me,0,tn,tt-1),0<Dt&&(ft||Vd(y,Dt,0,0,tt-1),Zt+=Dt)):(Zt+=Math.max(0,ot),ln<te&&qf(y,at,0,te-ln,tn,tt-1),0<Dt&&(ft||Vd(y,0,Dt,0,tt-1),te+=Dt))),Dt=ft=0,at){case Hg:x?ft+=Zt/2-y.focus.x-Bt/2:Dt+=te/2-y.focus.y-Bt/2;break;case Wd:0<Un?x?ft+=Zt/2-y.focus.x-Bt/2:Dt+=te/2-y.focus.y-Bt/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-Bt/2):(a=b[0].S.y+b[0].la.y,Dt+=a+(b[tt-1].S.y+b[tt-1].la.y+2*b[tt-1].focus.y-a)/2-y.focus.y-Bt/2);break;case ju:x?(ft-=Bt,Zt+=Bt):(Dt-=Bt,te+=Bt);break;case Vu:x?(ft+=Zt-y.width+Bt,Zt+=Bt):(Dt+=te-y.height+Bt,te+=Bt);break;case pc:case _u:x?1<tt?ft+=De+xt/2-y.focus.x:ft+=b[0].focus.x-y.focus.x+b[0].la.x:1<tt?Dt+=De+xt/2-y.focus.y:Dt+=b[0].focus.y-y.focus.y+b[0].la.y;break;case mc:x?ft+=Zt+xt/2-y.focus.x:Dt+=te+xt/2-y.focus.y;break;case Sh:break;default:a=a.customAlignment(y,ft,Dt,Zt,te),ft=a[0],Dt=a[1],Zt=a[2],te=a[3]}for(a=0;a<tt;a++)Bt=b[a],x?Bt.S.h(Bt.S.x+Bt.la.x-ft,Bt.S.y+(135<E?(rt?-te:-Bt.Da.height)+Bt.la.y-ot:_t+ot+Bt.la.y)):Bt.S.h(Bt.S.x+(135<E?(rt?-Zt:-Bt.Da.width)+Bt.la.x-ot:At+ot+Bt.la.x),Bt.S.y+Bt.la.y-Dt);x?(Zt=jv(y,Zt,ft),0>ft&&(ft=0),135<E&&(Dt+=te+ot),te=Math.max(Math.max(te,_t),te+_t+ot)):(135<E&&(ft+=Zt+ot),Zt=Math.max(Math.max(Zt,At),Zt+At+ot),te=Vv(y,te,Dt),0>Dt&&(Dt=0)),y.la.h(ft,Dt),y.Da.h(Zt,te)}}qi.prototype.customAlignment=function(a,y,x,E,b){return[y,x,E,b]};function h1(a,y,x,E,b,z){var tt=x.length;if(tt===0)return new Me(E,0,b,z);if(tt===1)return y=x[0],b=y.Da.width,z=y.Da.height,new Me(E,0,b,z);for(var rt=y.nodeSpacing,ot=y.rowSpacing,at=yA(y)===90,At=0,ft=0,pt=0,xt=0;xt<tt;xt++)if(!(xt%2!==0||1<tt&&xt===tt-1)){var Bt=x[xt],Mt=Bt.Da,Gt=At===0?0:ot;if(at){var Dt=a.computeBusNodeSpacing(Bt)-rt;Bt.S.h(E-(Mt.width+Dt),pt+Gt),b=Math.max(b,Mt.width+Dt),z=Math.max(z,pt+Gt+Mt.height),pt+=Gt+Mt.height}else Dt=a.computeBusNodeSpacing(Bt)-rt,Bt.S.h(ft+Gt,E-(Mt.height+Dt)),z=Math.max(z,Mt.height+Dt),b=Math.max(b,ft+Gt+Mt.width),ft+=Gt+Mt.width;At++}for(At=0,Bt=ft,xt=pt,at?(ft=E+rt,pt=0):(ft=0,pt=E+rt),Mt=0;Mt<tt;Mt++)if(Mt%2!==0){Gt=x[Mt],Dt=Gt.Da;var _t=At===0?0:ot;if(at){var Zt=a.computeBusNodeSpacing(Gt)-rt;Gt.S.h(ft+Zt,pt+_t),b=Math.max(b,ft+Dt.width+Zt),z=Math.max(z,pt+_t+Dt.height),pt+=_t+Dt.height}else Zt=a.computeBusNodeSpacing(Gt)-rt,Gt.S.h(ft+_t,pt+Zt),b=Math.max(b,ft+_t+Dt.width),z=Math.max(z,pt+Dt.height+Zt),ft+=_t+Dt.width;At++}return 1<tt&&tt%2===1&&(x=x[tt-1],tt=x.Da,a=a.computeBusLastRowSpacing(x,at?Math.max(Math.abs(xt),Math.abs(pt)):Math.max(Math.abs(Bt),Math.abs(ft))),at?(x.S.h(E+rt/2-x.focus.x-x.la.x,z+a),at=E+rt/2-x.focus.x-x.la.x,b=Math.max(b,at+tt.width),0>at&&(b-=at),z=Math.max(z,Math.max(xt,pt)+a+tt.height),0>x.S.x&&(E=Am(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(Bt,ft)+a+tt.width),pt=E+rt/2-x.focus.y-x.la.y,z=Math.max(z,pt+tt.height),0>pt&&(z-=pt),0>x.S.y&&(E=Am(y,x.S.y,!0,E,rt)))),new Me(E,0,b,z)}function c1(a,y,x,E,b,z){var tt=x.length;if(tt===0)return new Me(E,0,b,z);if(tt===1)return x=x[0],b=x.Da.width,z=x.Da.height,new Me(E,0,b,z);for(var rt=y.nodeSpacing,ot=y.rowSpacing,at=yA(y)===270,At=0,ft=0,pt=0,xt=0;xt<tt;xt++)if(!(xt%2!==0||1<tt&&xt===tt-1)){var Bt=x[xt],Mt=Bt.Da,Gt=At===0?0:ot;if(at){var Dt=a.computeBusNodeSpacing(Bt)-rt;pt-=Gt+Mt.height,Bt.S.h(E-(Mt.width+Dt),pt),b=Math.max(b,Mt.width+Dt),z=Math.max(z,Math.abs(pt))}else Dt=a.computeBusNodeSpacing(Bt)-rt,ft-=Gt+Mt.width,Bt.S.h(ft,E-(Mt.height+Dt)),z=Math.max(z,Mt.height+Dt),b=Math.max(b,Math.abs(ft));At++}for(At=0,Bt=ft,xt=pt,at?(ft=E+rt,pt=0):(ft=0,pt=E+rt),Mt=0;Mt<tt;Mt++)if(Mt%2!==0){Gt=x[Mt],Dt=Gt.Da;var _t=At===0?0:ot;if(at){var Zt=a.computeBusNodeSpacing(Gt)-rt;pt-=_t+Dt.height,Gt.S.h(ft+Zt,pt),b=Math.max(b,ft+Dt.width+Zt),z=Math.max(z,Math.abs(pt))}else Zt=a.computeBusNodeSpacing(Gt)-rt,ft-=_t+Dt.width,Gt.S.h(ft,pt+Zt),z=Math.max(z,pt+Dt.height+Zt),b=Math.max(b,Math.abs(ft));At++}for(1<tt&&tt%2===1&&(ot=x[tt-1],At=ot.Da,a=a.computeBusLastRowSpacing(ot,at?Math.max(Math.abs(xt),Math.abs(pt)):Math.max(Math.abs(Bt),Math.abs(ft))),at?(ot.S.h(E+rt/2-ot.focus.x-ot.la.x,-z-At.height-a),ft=E+rt/2-ot.focus.x-ot.la.x,b=Math.max(b,ft+At.width),0>ft&&(b-=ft),z=Math.max(z,Math.abs(Math.min(xt,pt))+a+At.height),0>ot.S.x&&(E=Am(y,ot.S.x,!1,E,rt))):(ot.S.h(-b-At.width-a,E+rt/2-ot.focus.y-ot.la.y),b=Math.max(b,Math.abs(Math.min(Bt,ft))+a+At.width),pt=E+rt/2-ot.focus.y-ot.la.y,z=Math.max(z,pt+At.height),0>pt&&(z-=pt),0>ot.S.y&&(E=Am(y,ot.S.y,!0,E,rt)))),y=0;y<tt;y++)rt=x[y],at?rt.S.h(rt.S.x,rt.S.y+z):rt.S.h(rt.S.x+b,rt.S.y);return new Me(E,0,b,z)}qi.prototype.computeBusNodeSpacing=function(a){return a.parent===null?0:a.parent.nodeSpacing},qi.prototype.computeBusLastRowSpacing=function(a){return a.parent===null?0:a.parent.rowSpacing};function Am(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 jv(a,y,x){switch(a.alignment){case Wd:case Hg:return x+a.width>y&&(y=x+a.width),0>x&&(y-=x),y;case ju:return a.width>y?a.width:y;case Vu:return 2*a.focus.x>y?a.width:y+a.width-2*a.focus.x;case pc:case _u:return Math.max(a.width,Math.max(y,x+a.width)-Math.min(0,x));case mc:return a.width-a.focus.x+a.nodeSpacing/2+y;case Sh:return Math.max(a.width,a.focus.x+a.nodeSpacing/2+y);default:return y}}function Vv(a,y,x){switch(a.alignment){case Wd:case Hg:return x+a.height>y&&(y=x+a.height),0>x&&(y-=x),y;case ju:return a.height>y?a.height:y;case Vu:return 2*a.focus.y>y?a.height:y+a.height-2*a.focus.y;case pc:case _u:return Math.max(a.height,Math.max(y,x+a.height)-Math.min(0,x));case mc:return a.height-a.focus.y+a.nodeSpacing/2+y;case Sh:return Math.max(a.height,a.focus.y+a.nodeSpacing/2+y);default:return y}}function _v(a,y,x){switch(a){case Hg:y/=2,x/=2;break;case Wd:y/=2,x/=2;break;case ju:x=y=0;break;case Vu:break;default:Yt("Unhandled alignment value "+a.toString())}return new Ot(y,x)}function qf(a,y,x,E,b,z){y=_v(y,x,E),Vd(a,y.x,y.y,b,z)}function Vd(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 um(a,y,x,E){var b=y.parent;switch(a.ud){case Ku:for(a=y.sourceEdges;a.next();)y=a.value,y.fromVertex===b&&y.relativePoint.h(x,E);break;case _d:for(a=y.destinationEdges;a.next();)y=a.value,y.toVertex===b&&y.relativePoint.h(x,E);break;default:Yt("Unhandled path value "+a.ud.toString())}}function hm(a,y,x){for(var E=0;E<a.length;E++){var b=a[E];b.x+=y,b.y+=x}}function f1(a,y,x,E,b,z,tt,rt){var ot=yA(y),at=ot===90||ot===270,At=y.nodeSpacing;y=E;var ft=b;E=z;var pt=tt,xt=x.Yo,Bt=x.kp;tt=x.Da;var Mt=at?Math.max(pt,tt.height):Math.max(E,tt.width);if((xt===null||ot!==yA(x))&&(xt=nl(a,2),Bt=nl(a,2),at?(xt[0].h(0,0),xt[1].h(0,tt.height),Bt[0].h(tt.width,0),Bt[1].h(Bt[0].x,xt[1].y)):(xt[0].h(0,0),xt[1].h(tt.width,0),Bt[0].h(0,tt.height),Bt[1].h(xt[1].x,Bt[0].y))),at){if(pt=9999999,!(ft===null||2>ft.length||xt===null||2>xt.length))for(b=x=0;x<ft.length&&b<xt.length;){z=ft[x];var Gt=xt[b];ot=Gt.x,at=Gt.y,ot+=E;var Dt=z;x+1<ft.length&&(Dt=ft[x+1]);var _t=Gt;Gt=_t.x,_t=_t.y,b+1<xt.length&&(_t=xt[b+1],Gt=_t.x,_t=_t.y,Gt+=E);var Zt=pt;z.y===at?Zt=ot-z.x:z.y>at&&z.y<_t?Zt=ot+(z.y-at)/(_t-at)*(Gt-ot)-z.x:at>z.y&&at<Dt.y&&(Zt=ot-(z.x+(at-z.y)/(Dt.y-z.y)*(Dt.x-z.x))),Zt<pt&&(pt=Zt),Dt.y<=z.y?x++:_t<=at?b++:(Dt.y<=_t&&x++,_t<=Dt.y&&b++)}if(pt=E-pt,pt+=At,x=xt,b=pt,y===null||2>y.length||x===null||2>x.length)E=null;else{for(At=nl(a,y.length+x.length),E=z=ot=0;z<x.length&&x[z].y<y[0].y;)at=x[z++],At[E++].h(at.x+b,at.y);for(;ot<y.length;)at=y[ot++],At[E++].h(at.x,at.y);for(ot=y[y.length-1].y;z<x.length&&x[z].y<=ot;)z++;for(;z<x.length&&x[z].y>ot;)at=x[z++],At[E++].h(at.x+b,at.y);for(x=nl(a,E),ot=0;ot<E;ot++)x[ot].assign(At[ot]);UA(a,At),E=x}if(z=Bt,ot=pt,ft===null||2>ft.length||z===null||2>z.length)b=null;else{for(At=nl(a,ft.length+z.length),b=at=x=0;x<ft.length&&ft[x].y<z[0].y;)Dt=ft[x++],At[b++].h(Dt.x,Dt.y);for(;at<z.length;)Dt=z[at++],At[b++].h(Dt.x+ot,Dt.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++],At[b++].h(ot.x,ot.y);for(z=nl(a,b),x=0;x<b;x++)z[x].assign(At[x]);UA(a,At),b=z}return z=Math.max(0,pt)+tt.width,tt=Mt,UA(a,y),UA(a,xt),UA(a,ft),UA(a,Bt),rt[0]=E,rt[1]=b,new Me(pt,0,z,tt)}if(E=9999999,!(ft===null||2>ft.length||xt===null||2>xt.length))for(b=x=0;x<ft.length&&b<xt.length;)z=ft[x],Gt=xt[b],ot=Gt.x,at=Gt.y,at+=pt,Dt=z,x+1<ft.length&&(Dt=ft[x+1]),_t=Gt,Gt=_t.x,_t=_t.y,b+1<xt.length&&(_t=xt[b+1],Gt=_t.x,_t=_t.y,_t+=pt),Zt=E,z.x===ot?Zt=at-z.y:z.x>ot&&z.x<Gt?Zt=at+(z.x-ot)/(Gt-ot)*(_t-at)-z.y:ot>z.x&&ot<Dt.x&&(Zt=at-(z.y+(ot-z.x)/(Dt.x-z.x)*(Dt.y-z.y))),Zt<E&&(E=Zt),Dt.x<=z.x?x++:Gt<=ot?b++:(Dt.x<=Gt&&x++,Gt<=Dt.x&&b++);if(pt-=E,pt+=At,x=xt,b=pt,y===null||2>y.length||x===null||2>x.length)E=null;else{for(At=nl(a,y.length+x.length),E=z=ot=0;z<x.length&&x[z].x<y[0].x;)at=x[z++],At[E++].h(at.x,at.y+b);for(;ot<y.length;)at=y[ot++],At[E++].h(at.x,at.y);for(ot=y[y.length-1].x;z<x.length&&x[z].x<=ot;)z++;for(;z<x.length&&x[z].x>ot;)at=x[z++],At[E++].h(at.x,at.y+b);for(x=nl(a,E),ot=0;ot<E;ot++)x[ot].assign(At[ot]);UA(a,At),E=x}if(z=Bt,ot=pt,ft===null||2>ft.length||z===null||2>z.length)b=null;else{for(At=nl(a,ft.length+z.length),b=at=x=0;x<ft.length&&ft[x].x<z[0].x;)Dt=ft[x++],At[b++].h(Dt.x,Dt.y);for(;at<z.length;)Dt=z[at++],At[b++].h(Dt.x,Dt.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++],At[b++].h(ot.x,ot.y);for(z=nl(a,b),x=0;x<b;x++)z[x].assign(At[x]);UA(a,At),b=z}return z=Mt,tt=Math.max(0,pt)+tt.height,UA(a,y),UA(a,xt),UA(a,ft),UA(a,Bt),rt[0]=E,rt[1]=b,new Me(pt,0,z,tt)}function nl(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 Ot;return a}function UA(a,y){var x=y.length,E=a.ru[x];E===void 0&&(E=[],a.ru[x]=E),E.push(y)}qi.prototype.arrangeTrees=function(){if(this.Rb===pm)for(var a=this.Ub.iterator;a.next();){var y=a.value;if(y instanceof Zl){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),Wv(this,y,x,E)}}}else{for(a=[],y=this.Ub.iterator;y.next();)x=y.value,x instanceof Zl&&a.push(x);switch(this.sorting){case Og:break;case Hp:a.reverse();break;case Rp:a.sort(this.comparer);break;case Gp:a.sort(this.comparer),a.reverse();break;default:Yt("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(Wv(this,b,y+b.la.x,x+b.la.y),this.Rb){case gm:x+=b.Da.height+this.$d.height;break;case Jv:y+=b.Da.width+this.$d.width;break;default:Yt("Unhandled arrangement value "+this.Rb.toString())}}}};function Wv(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];Wv(a,tt,x+tt.S.x,E+tt.S.y)}}}qi.prototype.commitLayout=function(){this.yv(),this.commitNodes(),this.Gu(),this.isRouting&&this.commitLinks()},qi.prototype.commitNodes=function(){for(var a=this.network.vertexes.iterator;a.next();)a.value.commit();for(a.reset();a.next();)this.layoutComments(a.value)},qi.prototype.Gu=function(){if(this.layerStyle===mm){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 Ot(-this.nodeSpacing/2,-this.layerSpacing/2)):(x.Bc(this.layerSpacing,this.nodeSpacing/2),E=new Ot(-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 Me(0,z,x,rt))):this.angle===90?(b.push(new Me(0,z,x,rt)),z+=rt):this.angle===180?(z-=rt,b.push(new Me(z,0,rt,x))):(b.push(new Me(z,0,rt,x)),z+=rt)}this.commitLayers(b,E)}},qi.prototype.commitLayers=function(){},qi.prototype.commitLinks=function(){for(var a=this.network.edges.iterator;a.next();)a.value.commit()},qi.prototype.yv=function(){for(var a=this.Ub.iterator;a.next();){var y=a.value;y instanceof Zl&&d1(this,y)}};function d1(a,y){if(y!==null){a.setPortSpots(y),y=y.children;for(var x=y.length,E=0;E<x;E++)d1(a,y[E])}}qi.prototype.setPortSpots=function(a){var y=a.alignment;if(Af(y)){var x=this.ud===Ku,E=yA(a);switch(E){case 0:var b=rs;break;case 90:b=Ys;break;case 180:b=No;break;default:b=vs}var z=a.children,tt=z.length;switch(y){case pc:case _u: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?No:vs;if(tt===1||y===tt-1&&tt%2===1)switch(E){case 0:ot=No;break;case 90:ot=vs;break;case 180:ot=rs;break;default:ot=Ys}else y%2===0&&(ot=E===90||E===270?rs:Ys);x?(a.setsPortSpot&&(rt.fromSpot=b),a.setsChildPortSpot&&(rt.toSpot=ot)):(a.setsPortSpot&&(rt.fromSpot=ot),a.setsChildPortSpot&&(rt.toSpot=b))}}break;case mc:for(E=E===90||E===270?rs:Ys,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 Sh:for(E=E===90||E===270?No:vs,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=yA(a),this.ud===Ku){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=rs;break;case 90:E.fromSpot=Ys;break;case 180:E.fromSpot=No;break;default:E.fromSpot=vs}else E.fromSpot=a.portSpot;if(a.setsChildPortSpot)if(a.childPortSpot.Xb())switch(x){case 0:E.toSpot=No;break;case 90:E.toSpot=vs;break;case 180:E.toSpot=rs;break;default:E.toSpot=Ys}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=rs;break;case 90:E.toSpot=Ys;break;case 180:E.toSpot=No;break;default:E.toSpot=vs}else E.toSpot=a.portSpot;if(a.setsChildPortSpot)if(a.childPortSpot.Xb())switch(x){case 0:E.fromSpot=No;break;case 90:E.fromSpot=vs;break;case 180:E.fromSpot=rs;break;default:E.fromSpot=Ys}else E.fromSpot=a.childPortSpot}};function yA(a){return a=a.angle,45>=a?0:135>=a?90:225>=a?180:315>=a?270:0}qi.prototype.computeLayerSpacing=function(a){var y=yA(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},qi.prototype.computeNodeIndent=function(a){var y=yA(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)},We.Object.defineProperties(qi.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!==dm&&a!==Xv&&a!==Yv&&a!==Zv||(this.vo=a,this.C())}},layerStyle:{get:function(){return this.Bq},set:function(a){this.Rb===a||a!==qv&&a!==$v&&a!==mm||(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!==gm&&a!==Jv&&a!==pm||(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!==Og&&a!==Hp&&a!==Rp&&!Gp||(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()):Yt("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!==fm&&a!==zp||(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!==Og&&a!==Hp&&a!==Rp&&!Gp||(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!==fm&&a!==zp||(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 cm=new xe(qi,"PathDefault",-1),Ku=new xe(qi,"PathDestination",0),_d=new xe(qi,"PathSource",1),Og=new xe(qi,"SortingForwards",10),Hp=new xe(qi,"SortingReverse",11),Rp=new xe(qi,"SortingAscending",12),Gp=new xe(qi,"SortingDescending",13),Hg=new xe(qi,"AlignmentCenterSubtrees",20),Wd=new xe(qi,"AlignmentCenterChildren",21),ju=new xe(qi,"AlignmentStart",22),Vu=new xe(qi,"AlignmentEnd",23),pc=new xe(qi,"AlignmentBus",24),_u=new xe(qi,"AlignmentBusBranching",25),mc=new xe(qi,"AlignmentTopLeftBus",26),Sh=new xe(qi,"AlignmentBottomRightBus",27),fm=new xe(qi,"CompactionNone",30),zp=new xe(qi,"CompactionBlock",31),dm=new xe(qi,"StyleLayered",40),Yv=new xe(qi,"StyleLastParents",41),Xv=new xe(qi,"StyleAlternating",42),Zv=new xe(qi,"StyleRootOnly",43),gm=new xe(qi,"ArrangementVertical",50),Jv=new xe(qi,"ArrangementHorizontal",51),pm=new xe(qi,"ArrangementFixedRoots",52),qv=new xe(qi,"LayerIndividual",60),$v=new xe(qi,"LayerSiblings",61),mm=new xe(qi,"LayerUniform",62);qi.className="TreeLayout",qi.PathDefault=cm,qi.PathDestination=Ku,qi.PathSource=_d,qi.SortingForwards=Og,qi.SortingReverse=Hp,qi.SortingAscending=Rp,qi.SortingDescending=Gp,qi.AlignmentCenterSubtrees=Hg,qi.AlignmentCenterChildren=Wd,qi.AlignmentStart=ju,qi.AlignmentEnd=Vu,qi.AlignmentBus=pc,qi.AlignmentBusBranching=_u,qi.AlignmentTopLeftBus=mc,qi.AlignmentBottomRightBus=Sh,qi.CompactionNone=fm,qi.CompactionBlock=zp,qi.StyleLayered=dm,qi.StyleLastParents=Yv,qi.StyleAlternating=Xv,qi.StyleRootOnly=Zv,qi.ArrangementVertical=gm,qi.ArrangementHorizontal=Jv,qi.ArrangementFixedRoots=pm,qi.LayerIndividual=qv,qi.LayerSiblings=$v,qi.LayerUniform=mm;function Yd(a){qr.call(this,a)}Le(Yd,qr),Yd.prototype.createVertex=function(){return new Zl(this)},Yd.prototype.createEdge=function(){return new Rg(this)},Yd.className="TreeNetwork";function Zl(a){gs.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 Ot(0,0),this.Da=new Xe(0,0),this.la=new Ot(0,0),this.im=this.hm=this.qA=!1,this.kp=this.Yo=null,this.nd=Og,this.hd=yv,this.Kb=0,this.Jb=Wd,this.Vq=this.Uq=0,this.Wq=20,this.ie=50,this.Aq=0,this.Hp=zp,this.Ap=0,this.nr=25,this.Gp=this.mr=10,this.Fp=20,this.xr=!0,this.dr=is,this.wr=!0,this.Dp=is}Le(Zl,gs),Zl.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)},We.Object.defineProperties(Zl.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)}}}),Zl.className="TreeVertex";function Rg(a){ml.call(this,a),this.$t=new Ot(0,0)}Le(Rg,ml),Rg.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 Ku:x=this.fromVertex,E=this.toVertex;break;case _d:x=this.toVertex,E=this.fromVertex;break;default:Yt("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=yA(x),tt=y.computeLayerSpacing(x),rt=x.rowSpacing;a.vg();var ot=a.curve===kl,at=a.isOrthogonal,At;if(a.uh(),at||ot){for(At=2;4<a.pointsCount;)a.pv(2);var ft=a.i(1),pt=a.i(2)}else{for(At=1;3<a.pointsCount;)a.pv(1);ft=a.i(0),pt=a.i(a.pointsCount-1)}var xt=a.i(a.pointsCount-1);z===0?(x.alignment===Vu?(z=E.bottom+b.y,b.y===0&&ft.y>xt.y+x.rowIndent&&(z=Math.min(z,Math.max(ft.y,z-y.computeNodeIndent(x))))):x.alignment===ju?(z=E.top+b.y,b.y===0&&ft.y<xt.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(At,ft.x,z),At++,a.m(At,E.right+tt,z),At++,a.m(At,E.right+tt+(b.x-rt)/3,z),At++,a.m(At,E.right+tt+2*(b.x-rt)/3,z),At++,a.m(At,E.right+tt+(b.x-rt),z),At++,a.m(At,pt.x,z)):(at&&(a.m(At,E.right+tt/2,ft.y),At++),a.m(At,E.right+tt/2,z),At++,a.m(At,E.right+tt+b.x-(at?rt/2:rt),z),At++,at&&a.m(At,a.i(At-1).x,pt.y))):z===90?(x.alignment===Vu?(z=E.right+b.x,b.x===0&&ft.x>xt.x+x.rowIndent&&(z=Math.min(z,Math.max(ft.x,z-y.computeNodeIndent(x))))):x.alignment===ju?(z=E.left+b.x,b.x===0&&ft.x<xt.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(At,z,ft.y),At++,a.m(At,z,E.bottom+tt),At++,a.m(At,z,E.bottom+tt+(b.y-rt)/3),At++,a.m(At,z,E.bottom+tt+2*(b.y-rt)/3),At++,a.m(At,z,E.bottom+tt+(b.y-rt)),At++,a.m(At,z,pt.y)):(at&&(a.m(At,ft.x,E.bottom+tt/2),At++),a.m(At,z,E.bottom+tt/2),At++,a.m(At,z,E.bottom+tt+b.y-(at?rt/2:rt)),At++,at&&a.m(At,pt.x,a.i(At-1).y))):z===180?(x.alignment===Vu?(z=E.bottom+b.y,b.y===0&&ft.y>xt.y+x.rowIndent&&(z=Math.min(z,Math.max(ft.y,z-y.computeNodeIndent(x))))):x.alignment===ju?(z=E.top+b.y,b.y===0&&ft.y<xt.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(At,ft.x,z),At++,a.m(At,E.left-tt,z),At++,a.m(At,E.left-tt+(b.x+rt)/3,z),At++,a.m(At,E.left-tt+2*(b.x+rt)/3,z),At++,a.m(At,E.left-tt+(b.x+rt),z),At++,a.m(At,pt.x,z)):(at&&(a.m(At,E.left-tt/2,ft.y),At++),a.m(At,E.left-tt/2,z),At++,a.m(At,E.left-tt+b.x+(at?rt/2:rt),z),At++,at&&a.m(At,a.i(At-1).x,pt.y))):z===270?(x.alignment===Vu?(z=E.right+b.x,b.x===0&&ft.x>xt.x+x.rowIndent&&(z=Math.min(z,Math.max(ft.x,z-y.computeNodeIndent(x))))):x.alignment===ju?(z=E.left+b.x,b.x===0&&ft.x<xt.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(At,z,ft.y),At++,a.m(At,z,E.top-tt),At++,a.m(At,z,E.top-tt+(b.y+rt)/3),At++,a.m(At,z,E.top-tt+2*(b.y+rt)/3),At++,a.m(At,z,E.top-tt+(b.y+rt)),At++,a.m(At,z,pt.y)):(at&&(a.m(At,ft.x,E.top-tt/2),At++),a.m(At,z,E.top-tt/2),At++,a.m(At,z,E.top-tt+b.y+(at?rt/2:rt)),At++,at&&a.m(At,pt.x,a.i(At-1).y))):Yt("Invalid angle "+z),a.zf()}else b=E,a=this.link,E=this.network.layout,y=yA(x),y!==yA(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===kl,b=a.isOrthogonal,E=Af(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()))}}},We.Object.defineProperties(Rg.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)}}}),Rg.className="TreeEdge",lo.prototype.initializeStandardTools=function(){this.gb("Action",new Bl,this.mouseDownTools),this.gb("Relinking",new Xa,this.mouseDownTools),this.gb("LinkReshaping",new Ko,this.mouseDownTools),this.gb("Rotating",new aa,this.mouseDownTools),this.gb("Resizing",new zs,this.mouseDownTools),this.gb("Linking",new Gs,this.mouseMoveTools),this.gb("Dragging",new Bo,this.mouseMoveTools),this.gb("DragSelecting",new hl,this.mouseMoveTools),this.gb("Panning",new Ns,this.mouseMoveTools),this.gb("ContextMenu",new la,this.mouseUpTools),this.gb("TextEditing",new $r,this.mouseUpTools),this.gb("ClickCreating",new Su,this.mouseUpTools),this.gb("ClickSelecting",new oh,this.mouseUpTools)},ou("Horizontal",new eo),ou("Spot",new Do),ou("Table",new ra),ou("Viewbox",new ds),ou("TableRow",new dl),ou("TableColumn",new Ml),ou("Graduated",new ru),ou("Grid",new va),Of.add("GraphLinksModel",Fs),Of.add("TreeModel",Gl);var vm=sn.go,ty={get licenseKey(){return pe.licenseKey},set licenseKey(a){pe.licenseKey=a},get version(){return pe.version},Group:Ti,EnumValue:xe,List:Vt,Set:le,Map:yn,Point:Ot,Size:Xe,Rect:Me,Margin:Xi,Spot:ri,Geometry:qe,PathFigure:As,PathSegment:yr,InputEvent:Is,DiagramEvent:fu,ChangedEvent:vo,Model:jn,GraphLinksModel:Ar,TreeModel:Ia,Binding:Jo,Transaction:ps,UndoManager:xo,CommandHandler:Rt,Tool:fr,DraggingTool:Bo,DraggingInfo:kA,DraggingOptions:st,LinkingBaseTool:Io,LinkingTool:Gs,RelinkingTool:Xa,LinkReshapingTool:Ko,ResizingTool:zs,RotatingTool:aa,ClickSelectingTool:oh,ActionTool:Bl,ClickCreatingTool:Su,HTMLInfo:iA,ContextMenuTool:la,DragSelectingTool:hl,PanningTool:Ns,TextEditingTool:$r,ToolManager:lo,Animation:Qs,AnimationManager:Ha,AnimationTrigger:Dl,Layer:ms,Diagram:pe,Palette:ht,Overview:dt,Brush:Mr,GraphObject:re,Panel:je,RowColumnDefinition:ss,Shape:Oi,TextBlock:Jr,Picture:ja,Part:ii,Adornment:Sr,Node:gn,Link:en,Placeholder:Ma,Layout:po,LayoutNetwork:qr,LayoutVertex:gs,LayoutEdge:ml,GridLayout:Ds,PanelLayout:kr,CircularLayout:Lo,CircularNetwork:Qg,CircularVertex:Tp,CircularEdge:q0,ForceDirectedLayout:$s,ForceDirectedNetwork:jd,ForceDirectedVertex:Ip,ForceDirectedEdge:Np,LayeredDigraphLayout:Qr,LayeredDigraphNetwork:Dg,LayeredDigraphVertex:Kl,LayeredDigraphEdge:Dp,TreeLayout:qi,TreeNetwork:Yd,TreeVertex:Zl,TreeEdge:Rg};typeof vm=="object"&&vm.version&&wn("WARNING: a `go` object on the root object is already defined. "+("Debug"in vm?"debug ":"")+"version: "+vm.version+", replaced with version: "+ty.version),pe.prototype.go=ty,sn.go=ty,typeof Cn.exports=="object"&&(Cn.exports=typeof ne.g!="undefined"?ne.g.go:self.go)}();var bt=typeof ne.g!="undefined"?ne.g.go:self.go;const Be=typeof ne.g!="undefined"?ne.g.go:self.go,Ee=Be.Group,Ze=Be.EnumValue,Fe=Be.List,we=Be.Set,ve=Be.Map,Qe=Be.Point,ge=Be.Size,se=Be.Rect,hn=Be.Margin,Se=Be.Spot,xn=Be.Geometry,Ut=Be.PathFigure,et=Be.PathSegment,nt=Be.InputEvent,ct=Be.DiagramEvent,lt=Be.ChangedEvent,gt=Be.Model,yt=Be.GraphLinksModel,Lt=Be.TreeModel,It=Be.Binding,Wt=Be.Transaction,qt=Be.UndoManager,he=Be.CommandHandler,fe=Be.Tool,Ae=Be.DraggingTool,Ve=Be.DraggingInfo,ye=Be.LinkingBaseTool,on=Be.LinkingTool,pn=Be.RelinkingTool,Vn=Be.LinkReshapingTool,ti=Be.ResizingTool,Xn=Be.RotatingTool,Li=Be.ClickSelectingTool,Ii=Be.ActionTool,ue=Be.ClickCreatingTool,jt=Be.HTMLInfo,En=Be.ContextMenuTool,Si=Be.DragSelectingTool,pi=Be.PanningTool,Ke=Be.TextEditingTool,Pn=Be.ToolManager,qn=Be.Animation,xi=Be.AnimationManager,kn=Be.AnimationTrigger,Ce=Be.Layer,Ge=Be.Diagram,gi=Be.Palette,yi=Be.Overview,Ht=Be.Brush,Et=Be.GraphObject,Ct=Be.Panel,Nt=Be.RowColumnDefinition,Kt=Be.Shape,kt=Be.TextBlock,be=Be.TextBlockMetrics,An=Be.Picture,ze=Be.Part,Je=Be.Adornment,rn=Be.Node,Oe=Be.Link,mn=Be.Placeholder,cn=Be.Layout,Mn=Be.LayoutNetwork,zn=Be.LayoutVertex,dn=Be.LayoutEdge,oi=Be.GridLayout,Ai=Be.PanelLayout,Zi=Be.CircularLayout,tr=Be.CircularNetwork,ro=Be.CircularVertex,ar=Be.CircularEdge,pr=Be.ForceDirectedLayout,wr=Be.ForceDirectedNetwork,mo=Be.ForceDirectedVertex,Eo=Be.ForceDirectedEdge,Hr=Be.LayeredDigraphLayout,Ur=Be.LayeredDigraphNetwork,no=Be.LayeredDigraphVertex,_o=Be.LayeredDigraphEdge,bo=Be.TreeLayout,Mo=Be.TreeNetwork,oo=Be.TreeVertex,Er=Be.TreeEdge,Rr=Be.version},64270:function(Cn){(function(mi,ne){Cn.exports=ne()})(this,function(){"use strict";var mi=function(vt,mt){return mi=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(St,wt){St.__proto__=wt}||function(St,wt){for(var Qt in wt)Object.prototype.hasOwnProperty.call(wt,Qt)&&(St[Qt]=wt[Qt])},mi(vt,mt)};function ne(vt,mt){if(typeof mt!="function"&&mt!==null)throw new TypeError("Class extends value "+String(mt)+" is not a constructor or null");mi(vt,mt);function St(){this.constructor=vt}vt.prototype=mt===null?Object.create(mt):(St.prototype=mt.prototype,new St)}var bt=function(){return bt=Object.assign||function(mt){for(var St,wt=1,Qt=arguments.length;wt<Qt;wt++){St=arguments[wt];for(var Xt in St)Object.prototype.hasOwnProperty.call(St,Xt)&&(mt[Xt]=St[Xt])}return mt},bt.apply(this,arguments)};function Be(vt,mt,St,wt){function Qt(Xt){return Xt instanceof St?Xt:new St(function(ae){ae(Xt)})}return new(St||(St=Promise))(function(Xt,ae){function Pe($e){try{Ye(wt.next($e))}catch(vn){ae(vn)}}function ce($e){try{Ye(wt.throw($e))}catch(vn){ae(vn)}}function Ye($e){$e.done?Xt($e.value):Qt($e.value).then(Pe,ce)}Ye((wt=wt.apply(vt,mt||[])).next())})}function Ee(vt,mt){var St={label:0,sent:function(){if(Xt[0]&1)throw Xt[1];return Xt[1]},trys:[],ops:[]},wt,Qt,Xt,ae;return ae={next:Pe(0),throw:Pe(1),return:Pe(2)},typeof Symbol=="function"&&(ae[Symbol.iterator]=function(){return this}),ae;function Pe(Ye){return function($e){return ce([Ye,$e])}}function ce(Ye){if(wt)throw new TypeError("Generator is already executing.");for(;St;)try{if(wt=1,Qt&&(Xt=Ye[0]&2?Qt.return:Ye[0]?Qt.throw||((Xt=Qt.return)&&Xt.call(Qt),0):Qt.next)&&!(Xt=Xt.call(Qt,Ye[1])).done)return Xt;switch(Qt=0,Xt&&(Ye=[Ye[0]&2,Xt.value]),Ye[0]){case 0:case 1:Xt=Ye;break;case 4:return St.label++,{value:Ye[1],done:!1};case 5:St.label++,Qt=Ye[1],Ye=[0];continue;case 7:Ye=St.ops.pop(),St.trys.pop();continue;default:if(Xt=St.trys,!(Xt=Xt.length>0&&Xt[Xt.length-1])&&(Ye[0]===6||Ye[0]===2)){St=0;continue}if(Ye[0]===3&&(!Xt||Ye[1]>Xt[0]&&Ye[1]<Xt[3])){St.label=Ye[1];break}if(Ye[0]===6&&St.label<Xt[1]){St.label=Xt[1],Xt=Ye;break}if(Xt&&St.label<Xt[2]){St.label=Xt[2],St.ops.push(Ye);break}Xt[2]&&St.ops.pop(),St.trys.pop();continue}Ye=mt.call(vt,St)}catch($e){Ye=[6,$e],Qt=0}finally{wt=Xt=0}if(Ye[0]&5)throw Ye[1];return{value:Ye[0]?Ye[1]:void 0,done:!0}}}function Ze(vt,mt,St){if(St||arguments.length===2)for(var wt=0,Qt=mt.length,Xt;wt<Qt;wt++)(Xt||!(wt in mt))&&(Xt||(Xt=Array.prototype.slice.call(mt,0,wt)),Xt[wt]=mt[wt]);return vt.concat(Xt||mt)}for(var Fe=function(){function vt(mt,St,wt,Qt){this.left=mt,this.top=St,this.width=wt,this.height=Qt}return vt.prototype.add=function(mt,St,wt,Qt){return new vt(this.left+mt,this.top+St,this.width+wt,this.height+Qt)},vt.fromClientRect=function(mt,St){return new vt(St.left+mt.windowBounds.left,St.top+mt.windowBounds.top,St.width,St.height)},vt.fromDOMRectList=function(mt,St){var wt=Array.from(St).find(function(Qt){return Qt.width!==0});return wt?new vt(wt.left+mt.windowBounds.left,wt.top+mt.windowBounds.top,wt.width,wt.height):vt.EMPTY},vt.EMPTY=new vt(0,0,0,0),vt}(),we=function(vt,mt){return Fe.fromClientRect(vt,mt.getBoundingClientRect())},ve=function(vt){var mt=vt.body,St=vt.documentElement;if(!mt||!St)throw new Error("Unable to get document size");var wt=Math.max(Math.max(mt.scrollWidth,St.scrollWidth),Math.max(mt.offsetWidth,St.offsetWidth),Math.max(mt.clientWidth,St.clientWidth)),Qt=Math.max(Math.max(mt.scrollHeight,St.scrollHeight),Math.max(mt.offsetHeight,St.offsetHeight),Math.max(mt.clientHeight,St.clientHeight));return new Fe(0,0,wt,Qt)},Qe=function(vt){for(var mt=[],St=0,wt=vt.length;St<wt;){var Qt=vt.charCodeAt(St++);if(Qt>=55296&&Qt<=56319&&St<wt){var Xt=vt.charCodeAt(St++);(Xt&64512)===56320?mt.push(((Qt&1023)<<10)+(Xt&1023)+65536):(mt.push(Qt),St--)}else mt.push(Qt)}return mt},ge=function(){for(var vt=[],mt=0;mt<arguments.length;mt++)vt[mt]=arguments[mt];if(String.fromCodePoint)return String.fromCodePoint.apply(String,vt);var St=vt.length;if(!St)return"";for(var wt=[],Qt=-1,Xt="";++Qt<St;){var ae=vt[Qt];ae<=65535?wt.push(ae):(ae-=65536,wt.push((ae>>10)+55296,ae%1024+56320)),(Qt+1===St||wt.length>16384)&&(Xt+=String.fromCharCode.apply(String,wt),wt.length=0)}return Xt},se="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",hn=typeof Uint8Array=="undefined"?[]:new Uint8Array(256),Se=0;Se<se.length;Se++)hn[se.charCodeAt(Se)]=Se;for(var xn="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",Ut=typeof Uint8Array=="undefined"?[]:new Uint8Array(256),et=0;et<xn.length;et++)Ut[xn.charCodeAt(et)]=et;for(var nt=function(vt){var mt=vt.length*.75,St=vt.length,wt,Qt=0,Xt,ae,Pe,ce;vt[vt.length-1]==="="&&(mt--,vt[vt.length-2]==="="&&mt--);var Ye=typeof ArrayBuffer!="undefined"&&typeof Uint8Array!="undefined"&&typeof Uint8Array.prototype.slice!="undefined"?new ArrayBuffer(mt):new Array(mt),$e=Array.isArray(Ye)?Ye:new Uint8Array(Ye);for(wt=0;wt<St;wt+=4)Xt=Ut[vt.charCodeAt(wt)],ae=Ut[vt.charCodeAt(wt+1)],Pe=Ut[vt.charCodeAt(wt+2)],ce=Ut[vt.charCodeAt(wt+3)],$e[Qt++]=Xt<<2|ae>>4,$e[Qt++]=(ae&15)<<4|Pe>>2,$e[Qt++]=(Pe&3)<<6|ce&63;return Ye},ct=function(vt){for(var mt=vt.length,St=[],wt=0;wt<mt;wt+=2)St.push(vt[wt+1]<<8|vt[wt]);return St},lt=function(vt){for(var mt=vt.length,St=[],wt=0;wt<mt;wt+=4)St.push(vt[wt+3]<<24|vt[wt+2]<<16|vt[wt+1]<<8|vt[wt]);return St},gt=5,yt=11,Lt=2,It=yt-gt,Wt=65536>>gt,qt=1<<gt,he=qt-1,fe=1024>>gt,Ae=Wt+fe,Ve=Ae,ye=32,on=Ve+ye,pn=65536>>yt,Vn=1<<It,ti=Vn-1,Xn=function(vt,mt,St){return vt.slice?vt.slice(mt,St):new Uint16Array(Array.prototype.slice.call(vt,mt,St))},Li=function(vt,mt,St){return vt.slice?vt.slice(mt,St):new Uint32Array(Array.prototype.slice.call(vt,mt,St))},Ii=function(vt,mt){var St=nt(vt),wt=Array.isArray(St)?lt(St):new Uint32Array(St),Qt=Array.isArray(St)?ct(St):new Uint16Array(St),Xt=24,ae=Xn(Qt,Xt/2,wt[4]/2),Pe=wt[5]===2?Xn(Qt,(Xt+wt[4])/2):Li(wt,Math.ceil((Xt+wt[4])/4));return new ue(wt[0],wt[1],wt[2],wt[3],ae,Pe)},ue=function(){function vt(mt,St,wt,Qt,Xt,ae){this.initialValue=mt,this.errorValue=St,this.highStart=wt,this.highValueIndex=Qt,this.index=Xt,this.data=ae}return vt.prototype.get=function(mt){var St;if(mt>=0){if(mt<55296||mt>56319&&mt<=65535)return St=this.index[mt>>gt],St=(St<<Lt)+(mt&he),this.data[St];if(mt<=65535)return St=this.index[Wt+(mt-55296>>gt)],St=(St<<Lt)+(mt&he),this.data[St];if(mt<this.highStart)return St=on-pn+(mt>>yt),St=this.index[St],St+=mt>>gt&ti,St=this.index[St],St=(St<<Lt)+(mt&he),this.data[St];if(mt<=1114111)return this.data[this.highValueIndex]}return this.errorValue},vt}(),jt="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",En=typeof Uint8Array=="undefined"?[]:new Uint8Array(256),Si=0;Si<jt.length;Si++)En[jt.charCodeAt(Si)]=Si;var pi="KwAAAAAAAAAACA4AUD0AADAgAAACAAAAAAAIABAAGABAAEgAUABYAGAAaABgAGgAYgBqAF8AZwBgAGgAcQB5AHUAfQCFAI0AlQCdAKIAqgCyALoAYABoAGAAaABgAGgAwgDKAGAAaADGAM4A0wDbAOEA6QDxAPkAAQEJAQ8BFwF1AH0AHAEkASwBNAE6AUIBQQFJAVEBWQFhAWgBcAF4ATAAgAGGAY4BlQGXAZ8BpwGvAbUBvQHFAc0B0wHbAeMB6wHxAfkBAQIJAvEBEQIZAiECKQIxAjgCQAJGAk4CVgJeAmQCbAJ0AnwCgQKJApECmQKgAqgCsAK4ArwCxAIwAMwC0wLbAjAA4wLrAvMC+AIAAwcDDwMwABcDHQMlAy0DNQN1AD0DQQNJA0kDSQNRA1EDVwNZA1kDdQB1AGEDdQBpA20DdQN1AHsDdQCBA4kDkQN1AHUAmQOhA3UAdQB1AHUAdQB1AHUAdQB1AHUAdQB1AHUAdQB1AHUAdQB1AKYDrgN1AHUAtgO+A8YDzgPWAxcD3gPjA+sD8wN1AHUA+wMDBAkEdQANBBUEHQQlBCoEFwMyBDgEYABABBcDSARQBFgEYARoBDAAcAQzAXgEgASIBJAEdQCXBHUAnwSnBK4EtgS6BMIEyAR1AHUAdQB1AHUAdQCVANAEYABgAGAAYABgAGAAYABgANgEYADcBOQEYADsBPQE/AQEBQwFFAUcBSQFLAU0BWQEPAVEBUsFUwVbBWAAYgVgAGoFcgV6BYIFigWRBWAAmQWfBaYFYABgAGAAYABgAKoFYACxBbAFuQW6BcEFwQXHBcEFwQXPBdMF2wXjBeoF8gX6BQIGCgYSBhoGIgYqBjIGOgZgAD4GRgZMBmAAUwZaBmAAYABgAGAAYABgAGAAYABgAGAAYABgAGIGYABpBnAGYABgAGAAYABgAGAAYABgAGAAYAB4Bn8GhQZgAGAAYAB1AHcDFQSLBmAAYABgAJMGdQA9A3UAmwajBqsGqwaVALMGuwbDBjAAywbSBtIG1QbSBtIG0gbSBtIG0gbdBuMG6wbzBvsGAwcLBxMHAwcbByMHJwcsBywHMQcsB9IGOAdAB0gHTgfSBkgHVgfSBtIG0gbSBtIG0gbSBtIG0gbSBiwHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAdgAGAALAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAdbB2MHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsB2kH0gZwB64EdQB1AHUAdQB1AHUAdQB1AHUHfQdgAIUHjQd1AHUAlQedB2AAYAClB6sHYACzB7YHvgfGB3UAzgfWBzMB3gfmB1EB7gf1B/0HlQENAQUIDQh1ABUIHQglCBcDLQg1CD0IRQhNCEEDUwh1AHUAdQBbCGMIZAhlCGYIZwhoCGkIYwhkCGUIZghnCGgIaQhjCGQIZQhmCGcIaAhpCGMIZAhlCGYIZwhoCGkIYwhkCGUIZghnCGgIaQhjCGQIZQhmCGcIaAhpCGMIZAhlCGYIZwhoCGkIYwhkCGUIZghnCGgIaQhjCGQIZQhmCGcIaAhpCGMIZAhlCGYIZwhoCGkIYwhkCGUIZghnCGgIaQhjCGQIZQhmCGcIaAhpCGMIZAhlCGYIZwhoCGkIYwhkCGUIZghnCGgIaQhjCGQIZQhmCGcIaAhpCGMIZAhlCGYIZwhoCGkIYwhkCGUIZghnCGgIaQhjCGQIZQhmCGcIaAhpCGMIZAhlCGYIZwhoCGkIYwhkCGUIZghnCGgIaQhjCGQIZQhmCGcIaAhpCGMIZAhlCGYIZwhoCGkIYwhkCGUIZghnCGgIaQhjCGQIZQhmCGcIaAhpCGMIZAhlCGYIZwhoCGkIYwhkCGUIZghnCGgIaQhjCGQIZQhmCGcIaAhpCGMIZAhlCGYIZwhoCGkIYwhkCGUIZghnCGgIaQhjCGQIZQhmCGcIaAhpCGMIZAhlCGYIZwhoCGkIYwhkCGUIZghnCGgIaQhjCGQIZQhmCGcIaAhpCGMIZAhlCGYIZwhoCGkIYwhkCGUIZghnCGgIaQhjCGQIZQhmCGcIaAhpCGMIZAhlCGYIZwhoCGkIYwhkCGUIZghnCGgIaQhjCGQIZQhmCGcIaAhpCGMIZAhlCGYIZwhoCGkIYwhkCGUIZghnCGgIaQhjCGQIZQhmCGcIaAhpCGMIZAhlCGYIZwhoCGkIYwhkCGUIZghnCGgIaQhjCGQIZQhmCGcIaAhpCGMIZAhlCGYIZwhoCGkIYwhkCGUIZghnCGgIaQhjCGQIZQhmCGcIaAhpCGMIZAhlCGYIZwhoCGkIYwhkCGUIZghnCGgIcAh3CHoIMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwAIIIggiCCIIIggiCCIIIggiCCIIIggiCCIIIggiCCIIIggiCCIIIggiCCIIIggiCCIIIggiCCIIIggiCCIIIgggwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAALAcsBywHLAcsBywHLAcsBywHLAcsB4oILAcsB44I0gaWCJ4Ipgh1AHUAqgiyCHUAdQB1AHUAdQB1AHUAdQB1AHUAtwh8AXUAvwh1AMUIyQjRCNkI4AjoCHUAdQB1AO4I9gj+CAYJDgkTCS0HGwkjCYIIggiCCIIIggiCCIIIggiCCIIIggiCCIIIggiCCIIIggiCCIIIggiCCIIIggiCCIIIggiCCIIIggiCCIIIggiAAIAAAAFAAYABgAGIAXwBgAHEAdQBFAJUAogCyAKAAYABgAEIA4ABGANMA4QDxAMEBDwE1AFwBLAE6AQEBUQF4QkhCmEKoQrhCgAHIQsAB0MLAAcABwAHAAeDC6ABoAHDCwMMAAcABwAHAAdDDGMMAAcAB6MM4wwjDWMNow3jDaABoAGgAaABoAGgAaABoAGgAaABoAGgAaABoAGgAaABoAGgAaABoAEjDqABWw6bDqABpg6gAaABoAHcDvwOPA+gAaABfA/8DvwO/A78DvwO/A78DvwO/A78DvwO/A78DvwO/A78DvwO/A78DvwO/A78DvwO/A78DvwO/A78DpcPAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcAB9cPKwkyCToJMAB1AHUAdQBCCUoJTQl1AFUJXAljCWcJawkwADAAMAAwAHMJdQB2CX4JdQCECYoJjgmWCXUAngkwAGAAYABxAHUApgn3A64JtAl1ALkJdQDACTAAMAAwADAAdQB1AHUAdQB1AHUAdQB1AHUAowYNBMUIMAAwADAAMADICcsJ0wnZCRUE4QkwAOkJ8An4CTAAMAB1AAAKvwh1AAgKDwoXCh8KdQAwACcKLgp1ADYKqAmICT4KRgowADAAdQB1AE4KMAB1AFYKdQBeCnUAZQowADAAMAAwADAAMAAwADAAMAAVBHUAbQowADAAdQC5CXUKMAAwAHwBxAijBogEMgF9CoQKiASMCpQKmgqIBKIKqgquCogEDQG2Cr4KxgrLCjAAMADTCtsKCgHjCusK8Qr5CgELMAAwADAAMAB1AIsECQsRC3UANAEZCzAAMAAwADAAMAB1ACELKQswAHUANAExCzkLdQBBC0kLMABRC1kLMAAwADAAMAAwADAAdQBhCzAAMAAwAGAAYABpC3ELdwt/CzAAMACHC4sLkwubC58Lpwt1AK4Ltgt1APsDMAAwADAAMAAwADAAMAAwAL4LwwvLC9IL1wvdCzAAMADlC+kL8Qv5C/8LSQswADAAMAAwADAAMAAwADAAMAAHDDAAMAAwADAAMAAODBYMHgx1AHUAdQB1AHUAdQB1AHUAdQB1AHUAdQB1AHUAdQB1AHUAdQB1AHUAdQB1AHUAdQB1AHUAdQB1ACYMMAAwADAAdQB1AHUALgx1AHUAdQB1AHUAdQA2DDAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwAHUAdQB1AHUAdQB1AHUAdQB1AHUAdQB1AHUAdQB1AHUAdQB1AD4MdQBGDHUAdQB1AHUAdQB1AEkMdQB1AHUAdQB1AFAMMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwAHUAdQB1AHUAdQB1AHUAdQB1AHUAdQB1AHUAdQBYDHUAdQB1AF8MMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAB1AHUAdQB1AHUAdQB1AHUAdQB1AHUAdQB1AHUAdQB1AHUA+wMVBGcMMAAwAHwBbwx1AHcMfwyHDI8MMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAYABgAJcMMAAwADAAdQB1AJ8MlQClDDAAMACtDCwHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsB7UMLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHdQB1AHUAdQB1AHUAdQB1AHUAdQB1AHUAdQB1AA0EMAC9DDAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAsBywHLAcsBywHLAcsBywHLQcwAMEMyAwsBywHLAcsBywHLAcsBywHLAcsBywHzAwwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwAHUAdQB1ANQM2QzhDDAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMABgAGAAYABgAGAAYABgAOkMYADxDGAA+AwADQYNYABhCWAAYAAODTAAMAAwADAAFg1gAGAAHg37AzAAMAAwADAAYABgACYNYAAsDTQNPA1gAEMNPg1LDWAAYABgAGAAYABgAGAAYABgAGAAUg1aDYsGVglhDV0NcQBnDW0NdQ15DWAAYABgAGAAYABgAGAAYABgAGAAYABgAGAAYABgAGAAlQCBDZUAiA2PDZcNMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAnw2nDTAAMAAwADAAMAAwAHUArw23DTAAMAAwADAAMAAwADAAMAAwADAAMAB1AL8NMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAB1AHUAdQB1AHUAdQDHDTAAYABgAM8NMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAA1w11ANwNMAAwAD0B5A0wADAAMAAwADAAMADsDfQN/A0EDgwOFA4wABsOMAAwADAAMAAwADAAMAAwANIG0gbSBtIG0gbSBtIG0gYjDigOwQUuDsEFMw7SBjoO0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIGQg5KDlIOVg7SBtIGXg5lDm0OdQ7SBtIGfQ6EDooOjQ6UDtIGmg6hDtIG0gaoDqwO0ga0DrwO0gZgAGAAYADEDmAAYAAkBtIGzA5gANIOYADaDokO0gbSBt8O5w7SBu8O0gb1DvwO0gZgAGAAxA7SBtIG0gbSBtIGYABgAGAAYAAED2AAsAUMD9IG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIGFA8sBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAccD9IGLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHJA8sBywHLAcsBywHLAccDywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywPLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAc0D9IG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIGLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAccD9IG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIGFA8sBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHPA/SBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gYUD0QPlQCVAJUAMAAwADAAMACVAJUAlQCVAJUAlQCVAEwPMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAA//8EAAQABAAEAAQABAAEAAQABAANAAMAAQABAAIABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQACgATABcAHgAbABoAHgAXABYAEgAeABsAGAAPABgAHABLAEsASwBLAEsASwBLAEsASwBLABgAGAAeAB4AHgATAB4AUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQABYAGwASAB4AHgAeAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAAWAA0AEQAeAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArAAQABAAEAAQABAAFAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAJABYAGgAbABsAGwAeAB0AHQAeAE8AFwAeAA0AHgAeABoAGwBPAE8ADgBQAB0AHQAdAE8ATwAXAE8ATwBPABYAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAB0AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAdAFAAUABQAFAAUABQAFAAUAAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAFAAHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAAeAB4AHgAeAFAATwBAAE8ATwBPAEAATwBQAFAATwBQAB4AHgAeAB4AHgAeAB0AHQAdAB0AHgAdAB4ADgBQAFAAUABQAFAAHgAeAB4AHgAeAB4AHgBQAB4AUAAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4ABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAJAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAkACQAJAAkACQAJAAkABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAeAB4AHgAeAFAAHgAeAB4AKwArAFAAUABQAFAAGABQACsAKwArACsAHgAeAFAAHgBQAFAAUAArAFAAKwAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AKwAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4ABAAEAAQABAAEAAQABAAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArACsAUAAeAB4AHgAeAB4AHgBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAAYAA0AKwArAB4AHgAbACsABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQADQAEAB4ABAAEAB4ABAAEABMABAArACsAKwArACsAKwArACsAVgBWAFYAVgBWAFYAVgBWAFYAVgBWAFYAVgBWAFYAVgBWAFYAVgBWAFYAVgBWAFYAVgBWAFYAKwArACsAKwBWAFYAVgBWAB4AHgArACsAKwArACsAKwArACsAKwArACsAHgAeAB4AHgAeAB4AHgAeAB4AGgAaABoAGAAYAB4AHgAEAAQABAAEAAQABAAEAAQABAAEAAQAEwAEACsAEwATAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABABLAEsASwBLAEsASwBLAEsASwBLABoAGQAZAB4AUABQAAQAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQABMAUAAEAAQABAAEAAQABAAEAB4AHgAEAAQABAAEAAQABABQAFAABAAEAB4ABAAEAAQABABQAFAASwBLAEsASwBLAEsASwBLAEsASwBQAFAAUAAeAB4AUAAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AKwAeAFAABABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAABAAEAAQABAAEAAQABAAEAAQABAAEAFAAKwArACsAKwArACsAKwArACsAKwArACsAKwArAEsASwBLAEsASwBLAEsASwBLAEsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAABAAEAAQABAAEAAQABAAEAAQAUABQAB4AHgAYABMAUAArACsABAAbABsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAAEAAQABAAEAFAABAAEAAQABAAEAFAABAAEAAQAUAAEAAQABAAEAAQAKwArAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAAEAAQABAArACsAHgArAFAAUABQAFAAUABQAFAAUABQAFAAUAArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArAFAAUABQAFAAUABQAFAAUABQAFAAKwArACsAKwArACsAKwArACsAKwArAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAB4ABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAAQABAAEAFAABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQAUAAEAAQABAAEAAQABAAEAFAAUABQAFAAUABQAFAAUABQAFAABAAEAA0ADQBLAEsASwBLAEsASwBLAEsASwBLAB4AUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAAEAAQABAArAFAAUABQAFAAUABQAFAAUAArACsAUABQACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwBQAFAAUABQAFAAUABQACsAUAArACsAKwBQAFAAUABQACsAKwAEAFAABAAEAAQABAAEAAQABAArACsABAAEACsAKwAEAAQABABQACsAKwArACsAKwArACsAKwAEACsAKwArACsAUABQACsAUABQAFAABAAEACsAKwBLAEsASwBLAEsASwBLAEsASwBLAFAAUAAaABoAUABQAFAAUABQAEwAHgAbAFAAHgAEACsAKwAEAAQABAArAFAAUABQAFAAUABQACsAKwArACsAUABQACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwBQAFAAUABQAFAAUABQACsAUABQACsAUABQACsAUABQACsAKwAEACsABAAEAAQABAAEACsAKwArACsABAAEACsAKwAEAAQABAArACsAKwAEACsAKwArACsAKwArACsAUABQAFAAUAArAFAAKwArACsAKwArACsAKwBLAEsASwBLAEsASwBLAEsASwBLAAQABABQAFAAUAAEAB4AKwArACsAKwArACsAKwArACsAKwAEAAQABAArAFAAUABQAFAAUABQAFAAUABQACsAUABQAFAAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwBQAFAAUABQAFAAUABQACsAUABQACsAUABQAFAAUABQACsAKwAEAFAABAAEAAQABAAEAAQABAAEACsABAAEAAQAKwAEAAQABAArACsAUAArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwBQAFAABAAEACsAKwBLAEsASwBLAEsASwBLAEsASwBLAB4AGwArACsAKwArACsAKwArAFAABAAEAAQABAAEAAQAKwAEAAQABAArAFAAUABQAFAAUABQAFAAUAArACsAUABQACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAAQABAAEAAQABAArACsABAAEACsAKwAEAAQABAArACsAKwArACsAKwArAAQABAAEACsAKwArACsAUABQACsAUABQAFAABAAEACsAKwBLAEsASwBLAEsASwBLAEsASwBLAB4AUABQAFAAUABQAFAAUAArACsAKwArACsAKwArACsAKwArAAQAUAArAFAAUABQAFAAUABQACsAKwArAFAAUABQACsAUABQAFAAUAArACsAKwBQAFAAKwBQACsAUABQACsAKwArAFAAUAArACsAKwBQAFAAUAArACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUAArACsAKwArAAQABAAEAAQABAArACsAKwAEAAQABAArAAQABAAEAAQAKwArAFAAKwArACsAKwArACsABAArACsAKwArACsAKwArACsAKwArAEsASwBLAEsASwBLAEsASwBLAEsAUABQAFAAHgAeAB4AHgAeAB4AGwAeACsAKwArACsAKwAEAAQABAAEAAQAUABQAFAAUABQAFAAUABQACsAUABQAFAAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwArACsAUAAEAAQABAAEAAQABAAEACsABAAEAAQAKwAEAAQABAAEACsAKwArACsAKwArACsABAAEACsAUABQAFAAKwArACsAKwArAFAAUAAEAAQAKwArAEsASwBLAEsASwBLAEsASwBLAEsAKwArACsAKwArACsAKwAOAFAAUABQAFAAUABQAFAAHgBQAAQABAAEAA4AUABQAFAAUABQAFAAUABQACsAUABQAFAAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArAFAAUABQAFAAUABQAFAAUABQAFAAKwBQAFAAUABQAFAAKwArAAQAUAAEAAQABAAEAAQABAAEACsABAAEAAQAKwAEAAQABAAEACsAKwArACsAKwArACsABAAEACsAKwArACsAKwArACsAUAArAFAAUAAEAAQAKwArAEsASwBLAEsASwBLAEsASwBLAEsAKwBQAFAAKwArACsAKwArACsAKwArACsAKwArACsAKwAEAAQABAAEAFAAUABQAFAAUABQAFAAUABQACsAUABQAFAAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAABAAEAFAABAAEAAQABAAEAAQABAArAAQABAAEACsABAAEAAQABABQAB4AKwArACsAKwBQAFAAUAAEAFAAUABQAFAAUABQAFAAUABQAFAABAAEACsAKwBLAEsASwBLAEsASwBLAEsASwBLAFAAUABQAFAAUABQAFAAUABQABoAUABQAFAAUABQAFAAKwAEAAQABAArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQACsAKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArAFAAUABQAFAAUABQAFAAUABQACsAUAArACsAUABQAFAAUABQAFAAUAArACsAKwAEACsAKwArACsABAAEAAQABAAEAAQAKwAEACsABAAEAAQABAAEAAQABAAEACsAKwArACsAKwArAEsASwBLAEsASwBLAEsASwBLAEsAKwArAAQABAAeACsAKwArACsAKwArACsAKwArACsAKwArAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXAAqAFwAXAAqACoAKgAqACoAKgAqACsAKwArACsAGwBcAFwAXABcAFwAXABcACoAKgAqACoAKgAqACoAKgAeAEsASwBLAEsASwBLAEsASwBLAEsADQANACsAKwArACsAKwBcAFwAKwBcACsAXABcAFwAXABcACsAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcACsAXAArAFwAXABcAFwAXABcAFwAXABcAFwAKgBcAFwAKgAqACoAKgAqACoAKgAqACoAXAArACsAXABcAFwAXABcACsAXAArACoAKgAqACoAKgAqACsAKwBLAEsASwBLAEsASwBLAEsASwBLACsAKwBcAFwAXABcAFAADgAOAA4ADgAeAA4ADgAJAA4ADgANAAkAEwATABMAEwATAAkAHgATAB4AHgAeAAQABAAeAB4AHgAeAB4AHgBLAEsASwBLAEsASwBLAEsASwBLAFAAUABQAFAAUABQAFAAUABQAFAADQAEAB4ABAAeAAQAFgARABYAEQAEAAQAUABQAFAAUABQAFAAUABQACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwArACsAKwAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQADQAEAAQABAAEAAQADQAEAAQAUABQAFAAUABQAAQABAAEAAQABAAEAAQABAAEAAQABAArAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAArAA0ADQAeAB4AHgAeAB4AHgAEAB4AHgAeAB4AHgAeACsAHgAeAA4ADgANAA4AHgAeAB4AHgAeAAkACQArACsAKwArACsAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcACoAKgAqACoAKgAqACoAKgAqACoAKgAqACoAKgAqACoAKgAqACoAKgBcAEsASwBLAEsASwBLAEsASwBLAEsADQANAB4AHgAeAB4AXABcAFwAXABcAFwAKgAqACoAKgBcAFwAXABcACoAKgAqAFwAKgAqACoAXABcACoAKgAqACoAKgAqACoAXABcAFwAKgAqACoAKgBcAFwAXABcAFwAXABcAFwAXABcAFwAXABcACoAKgAqACoAKgAqACoAKgAqACoAKgAqAFwAKgBLAEsASwBLAEsASwBLAEsASwBLACoAKgAqACoAKgAqAFAAUABQAFAAUABQACsAUAArACsAKwArACsAUAArACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAHgBQAFAAUABQAFgAWABYAFgAWABYAFgAWABYAFgAWABYAFgAWABYAFgAWABYAFgAWABYAFgAWABYAFgAWABYAFgAWABYAFgAWABZAFkAWQBZAFkAWQBZAFkAWQBZAFkAWQBZAFkAWQBZAFkAWQBZAFkAWQBZAFkAWQBZAFkAWQBZAFkAWQBZAFkAWgBaAFoAWgBaAFoAWgBaAFoAWgBaAFoAWgBaAFoAWgBaAFoAWgBaAFoAWgBaAFoAWgBaAFoAWgBaAFoAWgBaAFAAUABQAFAAUABQAFAAUABQACsAUABQAFAAUAArACsAUABQAFAAUABQAFAAUAArAFAAKwBQAFAAUABQACsAKwBQAFAAUABQAFAAUABQAFAAUAArAFAAUABQAFAAKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArAFAAUABQAFAAKwArAFAAUABQAFAAUABQAFAAKwBQACsAUABQAFAAUAArACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwBQAFAAUABQACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArACsABAAEAAQAHgANAB4AHgAeAB4AHgAeAB4AUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQACsAKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAHgAeAB4AHgAeAB4AHgAeAB4AHgArACsAKwArACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQACsAKwBQAFAAUABQAFAAUAArACsADQBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAHgAeAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAANAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAAWABEAKwArACsAUABQAFAAUABQAFAAUABQAFAAUABQAA0ADQANAFAAUABQAFAAUABQAFAAUABQAFAAUAArACsAKwArACsAKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwBQAFAAUABQAAQABAAEACsAKwArACsAKwArACsAKwArACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAAEAAQABAANAA0AKwArACsAKwArACsAKwArACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAABAAEACsAKwArACsAKwArACsAKwArACsAKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwBQAFAAUAArAAQABAArACsAKwArACsAKwArACsAKwArACsAKwBcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAKgAqACoAKgAqACoAKgAqACoAKgAqACoAKgAqACoAKgAqACoAKgAqAA0ADQAVAFwADQAeAA0AGwBcACoAKwArAEsASwBLAEsASwBLAEsASwBLAEsAKwArACsAKwArACsAUABQAFAAUABQAFAAUABQAFAAUAArACsAKwArACsAKwAeAB4AEwATAA0ADQAOAB4AEwATAB4ABAAEAAQACQArAEsASwBLAEsASwBLAEsASwBLAEsAKwArACsAKwArACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArACsAKwArACsAKwArAFAAUABQAFAAUAAEAAQAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAAQAUAArACsAKwArACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArACsAKwArACsAKwArACsAKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwAEAAQABAAEAAQABAAEAAQABAAEAAQABAArACsAKwArAAQABAAEAAQABAAEAAQABAAEAAQABAAEACsAKwArACsAHgArACsAKwATABMASwBLAEsASwBLAEsASwBLAEsASwBcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXAArACsAXABcAFwAXABcACsAKwArACsAKwArACsAKwArACsAKwBcAFwAXABcAFwAXABcAFwAXABcAFwAXAArACsAKwArAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcACsAKwArACsAKwArAEsASwBLAEsASwBLAEsASwBLAEsAXAArACsAKwAqACoAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAAQABAAEAAQABAArACsAHgAeAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcACoAKgAqACoAKgAqACoAKgAqACoAKwAqACoAKgAqACoAKgAqACoAKgAqACoAKgAqACoAKgAqACoAKgAqACoAKgAqACoAKgAqACoAKgAqACoAKwArAAQASwBLAEsASwBLAEsASwBLAEsASwArACsAKwArACsAKwBLAEsASwBLAEsASwBLAEsASwBLACsAKwArACsAKwArACoAKgAqACoAKgAqACoAXAAqACoAKgAqACoAKgArACsABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsABAAEAAQABAAEAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAAQABAAEAAQABABQAFAAUABQAFAAUABQACsAKwArACsASwBLAEsASwBLAEsASwBLAEsASwANAA0AHgANAA0ADQANAB4AHgAeAB4AHgAeAB4AHgAeAB4ABAAEAAQABAAEAAQABAAEAAQAHgAeAB4AHgAeAB4AHgAeAB4AKwArACsABAAEAAQAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAABAAEAAQABAAEAAQABAAEAAQABAAEAAQABABQAFAASwBLAEsASwBLAEsASwBLAEsASwBQAFAAUABQAFAAUABQAFAABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEACsAKwArACsAKwArACsAKwAeAB4AHgAeAFAAUABQAFAABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEACsAKwArAA0ADQANAA0ADQBLAEsASwBLAEsASwBLAEsASwBLACsAKwArAFAAUABQAEsASwBLAEsASwBLAEsASwBLAEsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAA0ADQBQAFAAUABQAFAAUABQAFAAUAArACsAKwArACsAKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQACsAKwBQAFAAUAAeAB4AHgAeAB4AHgAeAB4AKwArACsAKwArACsAKwArAAQABAAEAB4ABAAEAAQABAAEAAQABAAEAAQABAAEAAQABABQAFAAUABQAAQAUABQAFAAUABQAFAABABQAFAABAAEAAQAUAArACsAKwArACsABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEACsABAAEAAQABAAEAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AKwArAFAAUABQAFAAUABQACsAKwBQAFAAUABQAFAAUABQAFAAKwBQACsAUAArAFAAKwAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeACsAKwAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgArAB4AHgAeAB4AHgAeAB4AHgBQAB4AHgAeAFAAUABQACsAHgAeAB4AHgAeAB4AHgAeAB4AHgBQAFAAUABQACsAKwAeAB4AHgAeAB4AHgArAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AKwArAFAAUABQACsAHgAeAB4AHgAeAB4AHgAOAB4AKwANAA0ADQANAA0ADQANAAkADQANAA0ACAAEAAsABAAEAA0ACQANAA0ADAAdAB0AHgAXABcAFgAXABcAFwAWABcAHQAdAB4AHgAUABQAFAANAAEAAQAEAAQABAAEAAQACQAaABoAGgAaABoAGgAaABoAHgAXABcAHQAVABUAHgAeAB4AHgAeAB4AGAAWABEAFQAVABUAHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4ADQAeAA0ADQANAA0AHgANAA0ADQAHAB4AHgAeAB4AKwAEAAQABAAEAAQABAAEAAQABAAEAFAAUAArACsATwBQAFAAUABQAFAAHgAeAB4AFgARAE8AUABPAE8ATwBPAFAAUABQAFAAUAAeAB4AHgAWABEAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQACsAKwArABsAGwAbABsAGwAbABsAGgAbABsAGwAbABsAGwAbABsAGwAbABsAGwAbABsAGgAbABsAGwAbABoAGwAbABoAGwAbABsAGwAbABsAGwAbABsAGwAbABsAGwAbABsAGwAbAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQAHgAeAFAAGgAeAB0AHgBQAB4AGgAeAB4AHgAeAB4AHgAeAB4AHgBPAB4AUAAbAB4AHgBQAFAAUABQAFAAHgAeAB4AHQAdAB4AUAAeAFAAHgBQAB4AUABPAFAAUAAeAB4AHgAeAB4AHgAeAFAAUABQAFAAUAAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAFAAHgBQAFAAUABQAE8ATwBQAFAAUABQAFAATwBQAFAATwBQAE8ATwBPAE8ATwBPAE8ATwBPAE8ATwBPAFAAUABQAFAATwBPAE8ATwBPAE8ATwBPAE8ATwBQAFAAUABQAFAAUABQAFAAUAAeAB4AUABQAFAAUABPAB4AHgArACsAKwArAB0AHQAdAB0AHQAdAB0AHQAdAB0AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB0AHgAdAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAdAB4AHQAdAB4AHgAeAB0AHQAeAB4AHQAeAB4AHgAdAB4AHQAbABsAHgAdAB4AHgAeAB4AHQAeAB4AHQAdAB0AHQAeAB4AHQAeAB0AHgAdAB0AHQAdAB0AHQAeAB0AHgAeAB4AHgAeAB0AHQAdAB0AHgAeAB4AHgAdAB0AHgAeAB4AHgAeAB4AHgAeAB4AHgAdAB4AHgAeAB0AHgAeAB4AHgAeAB0AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAdAB0AHgAeAB0AHQAdAB0AHgAeAB0AHQAeAB4AHQAdAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB0AHQAeAB4AHQAdAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHQAeAB4AHgAdAB4AHgAeAB4AHgAeAB4AHQAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB0AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AFAAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeABYAEQAWABEAHgAeAB4AHgAeAB4AHQAeAB4AHgAeAB4AHgAeACUAJQAeAB4AHgAeAB4AHgAeAB4AHgAWABEAHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AJQAlACUAJQAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArAE8ATwBPAE8ATwBPAE8ATwBPAE8ATwBPAE8ATwBPAE8ATwBPAE8ATwBPAE8ATwBPAE8ATwBPAE8ATwBPAE8ATwAdAB0AHQAdAB0AHQAdAB0AHQAdAB0AHQAdAB0AHQAdAB0AHQAdAB0AHQAdAB0AHQAdAB0AHQAdAB0AHQAdAB0AHQAdAE8ATwBPAE8ATwBPAE8ATwBPAE8ATwBPAE8ATwBPAE8ATwBPAE8ATwBPAFAAHQAdAB0AHQAdAB0AHQAdAB0AHQAdAB0AHgAeAB4AHgAdAB0AHQAdAB0AHQAdAB0AHQAdAB0AHQAdAB0AHQAdAB0AHQAdAB0AHQAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHQAdAB0AHQAdAB0AHQAdAB0AHQAdAB0AHQAdAB0AHQAeAB4AHQAdAB0AHQAeAB4AHgAeAB4AHgAeAB4AHgAeAB0AHQAeAB0AHQAdAB0AHQAdAB0AHgAeAB4AHgAeAB4AHgAeAB0AHQAeAB4AHQAdAB4AHgAeAB4AHQAdAB4AHgAeAB4AHQAdAB0AHgAeAB0AHgAeAB0AHQAdAB0AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAdAB0AHQAdAB4AHgAeAB4AHgAeAB4AHgAeAB0AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAlACUAJQAlAB4AHQAdAB4AHgAdAB4AHgAeAB4AHQAdAB4AHgAeAB4AJQAlAB0AHQAlAB4AJQAlACUAIAAlACUAHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAlACUAJQAeAB4AHgAeAB0AHgAdAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAdAB0AHgAdAB0AHQAeAB0AJQAdAB0AHgAdAB0AHgAdAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeACUAHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHQAdAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAlACUAJQAlACUAJQAlACUAJQAlACUAJQAdAB0AHQAdACUAHgAlACUAJQAdACUAJQAdAB0AHQAlACUAHQAdACUAHQAdACUAJQAlAB4AHQAeAB4AHgAeAB0AHQAlAB0AHQAdAB0AHQAdACUAJQAlACUAJQAdACUAJQAgACUAHQAdACUAJQAlACUAJQAlACUAJQAeAB4AHgAlACUAIAAgACAAIAAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB0AHgAeAB4AFwAXABcAFwAXABcAHgATABMAJQAeAB4AHgAWABEAFgARABYAEQAWABEAFgARABYAEQAWABEATwBPAE8ATwBPAE8ATwBPAE8ATwBPAE8ATwBPAE8ATwBPAE8ATwBPAE8ATwAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeABYAEQAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAWABEAFgARABYAEQAWABEAFgARAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AFgARABYAEQAWABEAFgARABYAEQAWABEAFgARABYAEQAWABEAFgARABYAEQAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAWABEAFgARAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AFgARAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAdAB0AHQAdAB0AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgArACsAHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AKwAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AUABQAFAAUAAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAEAAQABAAeAB4AKwArACsAKwArABMADQANAA0AUAATAA0AUABQAFAAUABQAFAAUABQACsAKwArACsAKwArACsAUAANACsAKwArACsAKwArACsAKwArACsAKwArACsAKwAEAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArACsAKwArACsAKwArACsAKwBQAFAAUABQAFAAUABQACsAUABQAFAAUABQAFAAUAArAFAAUABQAFAAUABQAFAAKwBQAFAAUABQAFAAUABQACsAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXAA0ADQANAA0ADQANAA0ADQAeAA0AFgANAB4AHgAXABcAHgAeABcAFwAWABEAFgARABYAEQAWABEADQANAA0ADQATAFAADQANAB4ADQANAB4AHgAeAB4AHgAMAAwADQANAA0AHgANAA0AFgANAA0ADQANAA0ADQANAA0AHgANAB4ADQANAB4AHgAeACsAKwArACsAKwArACsAKwArACsAKwArACsAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACsAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAKwArACsAKwArACsAKwArACsAKwArACsAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwAlACUAJQAlACUAJQAlACUAJQAlACUAJQArACsAKwArAA0AEQARACUAJQBHAFcAVwAWABEAFgARABYAEQAWABEAFgARACUAJQAWABEAFgARABYAEQAWABEAFQAWABEAEQAlAFcAVwBXAFcAVwBXAFcAVwBXAAQABAAEAAQABAAEACUAVwBXAFcAVwA2ACUAJQBXAFcAVwBHAEcAJQAlACUAKwBRAFcAUQBXAFEAVwBRAFcAUQBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFEAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBRAFcAUQBXAFEAVwBXAFcAVwBXAFcAUQBXAFcAVwBXAFcAVwBRAFEAKwArAAQABAAVABUARwBHAFcAFQBRAFcAUQBXAFEAVwBRAFcAUQBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFEAVwBRAFcAUQBXAFcAVwBXAFcAVwBRAFcAVwBXAFcAVwBXAFEAUQBXAFcAVwBXABUAUQBHAEcAVwArACsAKwArACsAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAKwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAKwAlACUAVwBXAFcAVwAlACUAJQAlACUAJQAlACUAJQAlACsAKwArACsAKwArACsAKwArACsAKwArAFEAUQBRAFEAUQBRAFEAUQBRAFEAUQBRAFEAUQBRAFEAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQArAFcAVwBXAFcAVwBXAFcAVwBXAFcAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQBPAE8ATwBPAE8ATwBPAE8AJQBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXACUAJQAlAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAEcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAKwArACsAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQArACsAKwArACsAKwArACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAADQATAA0AUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABLAEsASwBLAEsASwBLAEsASwBLAFAAUAArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAFAABAAEAAQABAAeAAQABAAEAAQABAAEAAQABAAEAAQAHgBQAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AUABQAAQABABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAAQABAAeAA0ADQANAA0ADQArACsAKwArACsAKwArACsAHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAFAAUABQAFAAUABQAFAAUABQAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AUAAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgBQAB4AHgAeAB4AHgAeAFAAHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgArACsAHgAeAB4AHgAeAB4AHgAeAB4AKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwAeAB4AUABQAFAAUABQAFAAUABQAFAAUABQAAQAUABQAFAABABQAFAAUABQAAQAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAAQABAAEAAQABAAeAB4AHgAeAAQAKwArACsAUABQAFAAUABQAFAAHgAeABoAHgArACsAKwArACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAADgAOABMAEwArACsAKwArACsAKwArACsABAAEAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAAQABAAEAAQABAAEACsAKwArACsAKwArACsAKwANAA0ASwBLAEsASwBLAEsASwBLAEsASwArACsAKwArACsAKwAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABABQAFAAUABQAFAAUAAeAB4AHgBQAA4AUABQAAQAUABQAFAAUABQAFAABAAEAAQABAAEAAQABAAEAA0ADQBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQAKwArACsAKwArACsAKwArACsAKwArAB4AWABYAFgAWABYAFgAWABYAFgAWABYAFgAWABYAFgAWABYAFgAWABYAFgAWABYAFgAWABYAFgAWABYACsAKwArAAQAHgAeAB4AHgAeAB4ADQANAA0AHgAeAB4AHgArAFAASwBLAEsASwBLAEsASwBLAEsASwArACsAKwArAB4AHgBcAFwAXABcAFwAKgBcAFwAXABcAFwAXABcAFwAXABcAEsASwBLAEsASwBLAEsASwBLAEsAXABcAFwAXABcACsAUABQAFAAUABQAFAAUABQAFAABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEACsAKwArACsAKwArACsAKwArAFAAUABQAAQAUABQAFAAUABQAFAAUABQAAQABAArACsASwBLAEsASwBLAEsASwBLAEsASwArACsAHgANAA0ADQBcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAKgAqACoAXAAqACoAKgBcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXAAqAFwAKgAqACoAXABcACoAKgBcAFwAXABcAFwAKgAqAFwAKgBcACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArAFwAXABcACoAKgBQAFAAUABQAFAAUABQAFAAUABQAFAABAAEAAQABAAEAA0ADQBQAFAAUAAEAAQAKwArACsAKwArACsAKwArACsAKwBQAFAAUABQAFAAUAArACsAUABQAFAAUABQAFAAKwArAFAAUABQAFAAUABQACsAKwArACsAKwArACsAKwArAFAAUABQAFAAUABQAFAAKwBQAFAAUABQAFAAUABQACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAHgAeACsAKwArACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAAEAAQABAAEAAQABAAEAAQADQAEAAQAKwArAEsASwBLAEsASwBLAEsASwBLAEsAKwArACsAKwArACsAVABVAFUAVQBVAFUAVQBVAFUAVQBVAFUAVQBVAFUAVQBVAFUAVQBVAFUAVQBVAFUAVQBVAFUAVQBUAFUAVQBVAFUAVQBVAFUAVQBVAFUAVQBVAFUAVQBVAFUAVQBVAFUAVQBVAFUAVQBVAFUAVQBVACsAKwArACsAKwArACsAKwArACsAKwArAFkAWQBZAFkAWQBZAFkAWQBZAFkAWQBZAFkAWQBZAFkAWQBZAFkAKwArACsAKwBaAFoAWgBaAFoAWgBaAFoAWgBaAFoAWgBaAFoAWgBaAFoAWgBaAFoAWgBaAFoAWgBaAFoAWgBaAFoAKwArACsAKwAGAAYABgAGAAYABgAGAAYABgAGAAYABgAGAAYABgAGAAYABgAGAAYABgAGAAYABgAGAAYABgAGAAYABgAGAAYAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXACUAJQBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAJQAlACUAJQAlACUAUABQAFAAUABQAFAAUAArACsAKwArACsAKwArACsAKwArACsAKwBQAFAAUABQAFAAKwArACsAKwArAFYABABWAFYAVgBWAFYAVgBWAFYAVgBWAB4AVgBWAFYAVgBWAFYAVgBWAFYAVgBWAFYAVgArAFYAVgBWAFYAVgArAFYAKwBWAFYAKwBWAFYAKwBWAFYAVgBWAFYAVgBWAFYAVgBWAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAEQAWAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUAAaAB4AKwArAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQAGAARABEAGAAYABMAEwAWABEAFAArACsAKwArACsAKwAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEACUAJQAlACUAJQAWABEAFgARABYAEQAWABEAFgARABYAEQAlACUAFgARACUAJQAlACUAJQAlACUAEQAlABEAKwAVABUAEwATACUAFgARABYAEQAWABEAJQAlACUAJQAlACUAJQAlACsAJQAbABoAJQArACsAKwArAFAAUABQAFAAUAArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwArAAcAKwATACUAJQAbABoAJQAlABYAEQAlACUAEQAlABEAJQBXAFcAVwBXAFcAVwBXAFcAVwBXABUAFQAlACUAJQATACUAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXABYAJQARACUAJQAlAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwAWACUAEQAlABYAEQARABYAEQARABUAVwBRAFEAUQBRAFEAUQBRAFEAUQBRAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAEcARwArACsAVwBXAFcAVwBXAFcAKwArAFcAVwBXAFcAVwBXACsAKwBXAFcAVwBXAFcAVwArACsAVwBXAFcAKwArACsAGgAbACUAJQAlABsAGwArAB4AHgAeAB4AHgAeAB4AKwArACsAKwArACsAKwArACsAKwAEAAQABAAQAB0AKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwBQAFAAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArACsAKwArACsADQANAA0AKwArACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQACsAKwArAB4AHgAeAB4AHgAeAB4AHgAeAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgBQAFAAHgAeAB4AKwAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAAQAKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwAEAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQACsAKwArACsAKwArACsAKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwArACsAKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAABAAEAAQABAAEACsAKwArACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArAA0AUABQAFAAUAArACsAKwArAFAAUABQAFAAUABQAFAAUAANAFAAUABQAFAAUAArACsAKwArACsAKwArACsAKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwArACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQACsAKwArACsAKwArACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQACsAKwArACsAKwArACsAKwArACsAKwAeACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAUABQAFAAUABQAFAAKwArAFAAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArAFAAUAArACsAKwBQACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwANAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAAeAB4AUABQAFAAUABQAFAAUAArACsAKwArACsAKwArAFAAUABQAFAAUABQAFAAUABQACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArAFAAUAArACsAKwArACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQACsAKwArAA0AUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQACsAKwArACsAKwAeAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQACsAKwArACsAUABQAFAAUABQAAQABAAEACsABAAEACsAKwArACsAKwAEAAQABAAEAFAAUABQAFAAKwBQAFAAUAArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwArAAQABAAEACsAKwArACsABABQAFAAUABQAFAAUABQAFAAUAArACsAKwArACsAKwArAA0ADQANAA0ADQANAA0ADQAeACsAKwArACsAKwArACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAAeAFAAUABQAFAAUABQAFAAUAAeAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAAQABAArACsAKwArAFAAUABQAFAAUAANAA0ADQANAA0ADQAUACsAKwArACsAKwArACsAKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwArACsADQANAA0ADQANAA0ADQBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArACsAKwArACsAKwArAB4AHgAeAB4AKwArACsAKwArACsAKwArACsAKwArACsAUABQAFAAUABQAFAAUAArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArAFAAUABQAFAAUABQAFAAUABQACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQACsAKwArACsAKwArACsAKwArACsAKwArACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArACsAKwArACsAKwArAFAAUABQAFAAUABQAAQABAAEAAQAKwArACsAKwArACsAKwArAEsASwBLAEsASwBLAEsASwBLAEsAKwArACsAKwArACsAUABQAFAAUABQAFAAUABQAFAAUAArAAQABAANACsAKwBQAFAAKwArACsAKwArACsAKwArACsAKwArACsAKwArAFAAUABQAFAAUABQAAQABAAEAAQABAAEAAQABAAEAAQABABQAFAAUABQAB4AHgAeAB4AHgArACsAKwArACsAKwAEAAQABAAEAAQABAAEAA0ADQAeAB4AHgAeAB4AKwArACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAEsASwBLAEsASwBLAEsASwBLAEsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsABABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAAQABAAEAAQABAAEAAQABAAEAAQABAAeAB4AHgANAA0ADQANACsAKwArACsAKwArACsAKwArACsAKwAeACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwArACsAKwArACsAKwBLAEsASwBLAEsASwBLAEsASwBLACsAKwArACsAKwArAFAAUABQAFAAUABQAFAABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEACsASwBLAEsASwBLAEsASwBLAEsASwANAA0ADQANAFAABAAEAFAAKwArACsAKwArACsAKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAABAAeAA4AUAArACsAKwArACsAKwArACsAKwAEAFAAUABQAFAADQANAB4ADQAEAAQABAAEAB4ABAAEAEsASwBLAEsASwBLAEsASwBLAEsAUAAOAFAADQANAA0AKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwArACsAKwArACsAKwArACsAKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAAEAAQABAAEAAQABAAEAAQABAAEAAQABAANAA0AHgANAA0AHgAEACsAUABQAFAAUABQAFAAUAArAFAAKwBQAFAAUABQACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwBQAFAAUABQAFAAUABQAFAAUABQAA0AKwArACsAKwArACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAAEAAQABAAEAAQABAAEAAQABAAEAAQAKwArACsAKwArAEsASwBLAEsASwBLAEsASwBLAEsAKwArACsAKwArACsABAAEAAQABAArAFAAUABQAFAAUABQAFAAUAArACsAUABQACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwBQAFAAUABQAFAAUABQACsAUABQACsAUABQAFAAUABQACsABAAEAFAABAAEAAQABAAEAAQABAArACsABAAEACsAKwAEAAQABAArACsAUAArACsAKwArACsAKwAEACsAKwArACsAKwBQAFAAUABQAFAABAAEACsAKwAEAAQABAAEAAQABAAEACsAKwArAAQABAAEAAQABAArACsAKwArACsAKwArACsAKwArACsABAAEAAQABAAEAAQABABQAFAAUABQAA0ADQANAA0AHgBLAEsASwBLAEsASwBLAEsASwBLAA0ADQArAB4ABABQAFAAUAArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwAEAAQABAAEAFAAUAAeAFAAKwArACsAKwArACsAKwArAEsASwBLAEsASwBLAEsASwBLAEsAKwArACsAKwArACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAABAAEAAQABAAEAAQABAArACsABAAEAAQABAAEAAQABAAEAAQADgANAA0AEwATAB4AHgAeAA0ADQANAA0ADQANAA0ADQANAA0ADQANAA0ADQANAFAAUABQAFAABAAEACsAKwAEAA0ADQAeAFAAKwArACsAKwArACsAKwArACsAKwArAEsASwBLAEsASwBLAEsASwBLAEsAKwArACsAKwArACsADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArAFAAUABQAFAAUABQAFAAUABQAFAAUAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAFAAKwArACsAKwArACsAKwBLAEsASwBLAEsASwBLAEsASwBLACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAKwArACoAKgAqACoAKgAqACoAKgAqACoAKgAqACoAKgAqACsAKwArACsASwBLAEsASwBLAEsASwBLAEsASwBcAFwADQANAA0AKgBQAFAAUABQAFAAUABQAFAAUABQAFAAUAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAeACsAKwArACsASwBLAEsASwBLAEsASwBLAEsASwBQAFAAUABQAFAAUABQAFAAUAArACsAKwArACsAKwArACsAKwArACsAKwBQAFAAUABQAFAAUABQAFAAKwArAFAAKwArAFAAUABQAFAAUABQAFAAUAArAFAAUAArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAABAAEAAQABAAEAAQAKwAEAAQAKwArAAQABAAEAAQAUAAEAFAABAAEAA0ADQANACsAKwArACsAKwArACsAKwArAEsASwBLAEsASwBLAEsASwBLAEsAKwArACsAKwArACsAUABQAFAAUABQAFAAUABQACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAABAAEAAQABAAEAAQABAArACsABAAEAAQABAAEAAQABABQAA4AUAAEACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArAFAABAAEAAQABAAEAAQABAAEAAQABABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAAEAAQABAAEAAQABAAEAFAABAAEAAQABAAOAB4ADQANAA0ADQAOAB4ABAArACsAKwArACsAKwArACsAUAAEAAQABAAEAAQABAAEAAQABAAEAAQAUABQAFAAUABQAFAAUABQAFAAUAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAA0ADQANAFAADgAOAA4ADQANACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwBQAFAAUABQAFAAUABQAFAAUAArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAABAAEAAQABAAEAAQABAAEACsABAAEAAQABAAEAAQABAAEAFAADQANAA0ADQANACsAKwArACsAKwArACsAKwArACsASwBLAEsASwBLAEsASwBLAEsASwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArACsAKwAOABMAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwArAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAArAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAArACsAKwArACsAKwArACsAKwBQAFAAUABQAFAAUABQACsAUABQACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAAEAAQABAAEAAQABAArACsAKwAEACsABAAEACsABAAEAAQABAAEAAQABABQAAQAKwArACsAKwArACsAKwArAEsASwBLAEsASwBLAEsASwBLAEsAKwArACsAKwArACsAUABQAFAAUABQAFAAKwBQAFAAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAAEAAQABAAEAAQAKwAEAAQAKwAEAAQABAAEAAQAUAArACsAKwArACsAKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAABAAEAAQABAAeAB4AKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwBQACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAB4AHgAeAB4AHgAeAB4AHgAaABoAGgAaAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgArACsAKwArACsAKwArACsAKwArACsAKwArAA0AUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQACsAKwArACsAKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQACsADQANAA0ADQANACsAKwArACsAKwArACsAKwArACsAKwBQAFAAUABQACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAASABIAEgAQwBDAEMAUABQAFAAUABDAFAAUABQAEgAQwBIAEMAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAASABDAEMAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwAJAAkACQAJAAkACQAJABYAEQArACsAKwArACsAKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABIAEMAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArAEsASwBLAEsASwBLAEsASwBLAEsAKwArACsAKwANAA0AKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwArAAQABAAEAAQABAANACsAKwArACsAKwArACsAKwArACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAAEAAQABAAEAAQABAAEAA0ADQANAB4AHgAeAB4AHgAeAFAAUABQAFAADQAeACsAKwArACsAKwArACsAKwArACsASwBLAEsASwBLAEsASwBLAEsASwArAFAAUABQAFAAUABQAFAAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArACsAKwArACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAANAA0AHgAeACsAKwArACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAKwArACsAKwAEAFAABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQAKwArACsAKwArACsAKwAEAAQABAAEAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAARwBHABUARwAJACsAKwArACsAKwArACsAKwArACsAKwAEAAQAKwArACsAKwArACsAKwArACsAKwArACsAKwArAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXACsAKwArACsAKwArACsAKwBXAFcAVwBXAFcAVwBXAFcAVwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAUQBRAFEAKwArACsAKwArACsAKwArACsAKwArACsAKwBRAFEAUQBRACsAKwArACsAKwArACsAKwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXACsAKwArACsAUABQAFAAUABQAFAAUABQAFAAUABQACsAKwArACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQACsAKwArACsAKwArACsAUABQAFAAUABQAFAAUABQAFAAUAArACsAHgAEAAQADQAEAAQABAAEACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgArACsAKwArACsAKwArACsAKwArAB4AHgAeAB4AHgAeAB4AKwArAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAAQABAAEAAQABAAeAB4AHgAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAB4AHgAEAAQABAAEAAQABAAEAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4ABAAEAAQABAAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4ABAAEAAQAHgArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQACsAKwArACsAKwArACsAKwArACsAKwArAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgArACsAKwArACsAKwArACsAKwAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgArAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AKwBQAFAAKwArAFAAKwArAFAAUAArACsAUABQAFAAUAArAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeACsAUAArAFAAUABQAFAAUABQAFAAKwAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AKwBQAFAAUABQACsAKwBQAFAAUABQAFAAUABQAFAAKwBQAFAAUABQAFAAUABQACsAHgAeAFAAUABQAFAAUAArAFAAKwArACsAUABQAFAAUABQAFAAUAArAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAHgBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgBQAFAAUABQAFAAUABQAFAAUABQAFAAHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAB4AHgAeAB4AHgAeAB4AHgAeACsAKwBLAEsASwBLAEsASwBLAEsASwBLAEsASwBLAEsASwBLAEsASwBLAEsASwBLAEsASwBLAEsASwBLAEsASwBLAEsASwBLAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAeAB4AHgAeAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAeAB4AHgAeAB4AHgAeAB4ABAAeAB4AHgAeAB4AHgAeAB4AHgAeAAQAHgAeAA0ADQANAA0AHgArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwAEAAQABAAEAAQAKwAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArAAQABAAEAAQABAAEAAQAKwAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQAKwArAAQABAAEAAQABAAEAAQAKwAEAAQAKwAEAAQABAAEAAQAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArACsAKwAEAAQABAAEAAQABAAEAFAAUABQAFAAUABQAFAAKwArAEsASwBLAEsASwBLAEsASwBLAEsAKwArACsAKwBQAB4AKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUAAEAAQABAAEAEsASwBLAEsASwBLAEsASwBLAEsAKwArACsAKwArABsAUABQAFAAUABQACsAKwBQAFAAUABQAFAAUABQAFAAUAAEAAQABAAEAAQABAAEACsAKwArACsAKwArACsAKwArAB4AHgAeAB4ABAAEAAQABAAEAAQABABQACsAKwArACsASwBLAEsASwBLAEsASwBLAEsASwArACsAKwArABYAFgArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAGgBQAFAAUAAaAFAAUABQAFAAKwArACsAKwArACsAKwArACsAKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAAeAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQACsAKwBQAFAAUABQACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwBQAFAAKwBQACsAKwBQACsAUABQAFAAUABQAFAAUABQAFAAUAArAFAAUABQAFAAKwBQACsAUAArACsAKwArACsAKwBQACsAKwArACsAUAArAFAAKwBQACsAUABQAFAAKwBQAFAAKwBQACsAKwBQACsAUAArAFAAKwBQACsAUAArAFAAUAArAFAAKwArAFAAUABQAFAAKwBQAFAAUABQAFAAUABQACsAUABQAFAAUAArAFAAUABQAFAAKwBQACsAUABQAFAAUABQAFAAUABQAFAAUAArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArACsAKwArACsAUABQAFAAKwBQAFAAUABQAFAAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwAeAB4AKwArACsAKwArACsAKwArACsAKwArACsAKwArAE8ATwBPAE8ATwBPAE8ATwBPAE8ATwBPAE8AJQAlACUAHQAdAB0AHQAdAB0AHQAdAB0AHQAdAB0AHQAdAB0AHQAdAB0AHgAeAB0AHQAdAB0AHQAdAB0AHQAdAB0AHQAdAB0AHQAdAB0AHQAdAB4AHgAeACUAJQAlAB0AHQAdAB0AHQAdAB0AHQAdAB0AHQAdAB0AHQAdAB0AHQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQApACkAKQApACkAKQApACkAKQApACkAKQApACkAKQApACkAKQApACkAKQApACkAKQApACkAJQAlACUAJQAlACAAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAeAB4AJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlAB4AHgAlACUAJQAlACUAHgAlACUAJQAlACUAIAAgACAAJQAlACAAJQAlACAAIAAgACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACEAIQAhACEAIQAlACUAIAAgACUAJQAgACAAIAAgACAAIAAgACAAIAAgACAAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAJQAlACUAIAAlACUAJQAlACAAIAAgACUAIAAgACAAJQAlACUAJQAlACUAJQAgACUAIAAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAHgAlAB4AJQAeACUAJQAlACUAJQAgACUAJQAlACUAHgAlAB4AHgAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlAB4AHgAeAB4AHgAeAB4AJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAeAB4AHgAeAB4AHgAeAB4AHgAeACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACAAIAAlACUAJQAlACAAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACAAJQAlACUAJQAgACAAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAHgAeAB4AHgAeAB4AHgAeACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAeAB4AHgAeAB4AHgAlACUAJQAlACUAJQAlACAAIAAgACUAJQAlACAAIAAgACAAIAAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeABcAFwAXABUAFQAVAB4AHgAeAB4AJQAlACUAIAAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACAAIAAgACUAJQAlACUAJQAlACUAJQAlACAAJQAlACUAJQAlACUAJQAlACUAJQAlACAAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AJQAlACUAJQAlACUAJQAlACUAJQAlACUAHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AJQAlACUAJQAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeACUAJQAlACUAJQAlACUAJQAeAB4AHgAeAB4AHgAeAB4AHgAeACUAJQAlACUAJQAlAB4AHgAeAB4AHgAeAB4AHgAlACUAJQAlACUAJQAlACUAHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAgACUAJQAgACUAJQAlACUAJQAlACUAJQAgACAAIAAgACAAIAAgACAAJQAlACUAJQAlACUAIAAlACUAJQAlACUAJQAlACUAJQAgACAAIAAgACAAIAAgACAAIAAgACUAJQAgACAAIAAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAgACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACAAIAAlACAAIAAlACAAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAgACAAIAAlACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAJQAlAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AKwAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArAEsASwBLAEsASwBLAEsASwBLAEsAKwArACsAKwArACsAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAKwArAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXACUAJQBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwAlACUAJQAlACUAJQAlACUAJQAlACUAVwBXACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAKwAEACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArAA==",Ke=50,Pn=1,qn=2,xi=3,kn=4,Ce=5,Ge=7,gi=8,yi=9,Ht=10,Et=11,Ct=12,Nt=13,Kt=14,kt=15,be=16,An=17,ze=18,Je=19,rn=20,Oe=21,mn=22,cn=23,Mn=24,zn=25,dn=26,oi=27,Ai=28,Zi=29,tr=30,ro=31,ar=32,pr=33,wr=34,mo=35,Eo=36,Hr=37,Ur=38,no=39,_o=40,bo=41,Mo=42,oo=43,Er=[9001,65288],Rr="!",Pt="\xD7",er="\xF7",Gr=Ii(pi),si=[tr,Eo],ui=[Pn,qn,xi,Ce],Ci=[Ht,gi],Ri=[oi,dn],Tr=ui.concat(Ci),Ue=[Ur,no,_o,wr,mo],Ie=[kt,Nt],Le=function(vt,mt){mt===void 0&&(mt="strict");var St=[],wt=[],Qt=[];return vt.forEach(function(Xt,ae){var Pe=Gr.get(Xt);if(Pe>Ke?(Qt.push(!0),Pe-=Ke):Qt.push(!1),["normal","auto","loose"].indexOf(mt)!==-1&&[8208,8211,12316,12448].indexOf(Xt)!==-1)return wt.push(ae),St.push(be);if(Pe===kn||Pe===Et){if(ae===0)return wt.push(ae),St.push(tr);var ce=St[ae-1];return Tr.indexOf(ce)===-1?(wt.push(wt[ae-1]),St.push(ce)):(wt.push(ae),St.push(tr))}if(wt.push(ae),Pe===ro)return St.push(mt==="strict"?Oe:Hr);if(Pe===Mo||Pe===Zi)return St.push(tr);if(Pe===oo)return Xt>=131072&&Xt<=196605||Xt>=196608&&Xt<=262141?St.push(Hr):St.push(tr);St.push(Pe)}),[wt,St,Qt]},We=function(vt,mt,St,wt){var Qt=wt[St];if(Array.isArray(vt)?vt.indexOf(Qt)!==-1:vt===Qt)for(var Xt=St;Xt<=wt.length;){Xt++;var ae=wt[Xt];if(ae===mt)return!0;if(ae!==Ht)break}if(Qt===Ht)for(var Xt=St;Xt>0;){Xt--;var Pe=wt[Xt];if(Array.isArray(vt)?vt.indexOf(Pe)!==-1:vt===Pe)for(var ce=St;ce<=wt.length;){ce++;var ae=wt[ce];if(ae===mt)return!0;if(ae!==Ht)break}if(Pe!==Ht)break}return!1},wi=function(vt,mt){for(var St=vt;St>=0;){var wt=mt[St];if(wt===Ht)St--;else return wt}return 0},hi=function(vt,mt,St,wt,Qt){if(St[wt]===0)return Pt;var Xt=wt-1;if(Array.isArray(Qt)&&Qt[Xt]===!0)return Pt;var ae=Xt-1,Pe=Xt+1,ce=mt[Xt],Ye=ae>=0?mt[ae]:0,$e=mt[Pe];if(ce===qn&&$e===xi)return Pt;if(ui.indexOf(ce)!==-1)return Rr;if(ui.indexOf($e)!==-1||Ci.indexOf($e)!==-1)return Pt;if(wi(Xt,mt)===gi)return er;if(Gr.get(vt[Xt])===Et||(ce===ar||ce===pr)&&Gr.get(vt[Pe])===Et||ce===Ge||$e===Ge||ce===yi||[Ht,Nt,kt].indexOf(ce)===-1&&$e===yi||[An,ze,Je,Mn,Ai].indexOf($e)!==-1||wi(Xt,mt)===mn||We(cn,mn,Xt,mt)||We([An,ze],Oe,Xt,mt)||We(Ct,Ct,Xt,mt))return Pt;if(ce===Ht)return er;if(ce===cn||$e===cn)return Pt;if($e===be||ce===be)return er;if([Nt,kt,Oe].indexOf($e)!==-1||ce===Kt||Ye===Eo&&Ie.indexOf(ce)!==-1||ce===Ai&&$e===Eo||$e===rn||si.indexOf($e)!==-1&&ce===zn||si.indexOf(ce)!==-1&&$e===zn||ce===oi&&[Hr,ar,pr].indexOf($e)!==-1||[Hr,ar,pr].indexOf(ce)!==-1&&$e===dn||si.indexOf(ce)!==-1&&Ri.indexOf($e)!==-1||Ri.indexOf(ce)!==-1&&si.indexOf($e)!==-1||[oi,dn].indexOf(ce)!==-1&&($e===zn||[mn,kt].indexOf($e)!==-1&&mt[Pe+1]===zn)||[mn,kt].indexOf(ce)!==-1&&$e===zn||ce===zn&&[zn,Ai,Mn].indexOf($e)!==-1)return Pt;if([zn,Ai,Mn,An,ze].indexOf($e)!==-1)for(var vn=Xt;vn>=0;){var ei=mt[vn];if(ei===zn)return Pt;if([Ai,Mn].indexOf(ei)!==-1)vn--;else break}if([oi,dn].indexOf($e)!==-1)for(var vn=[An,ze].indexOf(ce)!==-1?ae:Xt;vn>=0;){var ei=mt[vn];if(ei===zn)return Pt;if([Ai,Mn].indexOf(ei)!==-1)vn--;else break}if(Ur===ce&&[Ur,no,wr,mo].indexOf($e)!==-1||[no,wr].indexOf(ce)!==-1&&[no,_o].indexOf($e)!==-1||[_o,mo].indexOf(ce)!==-1&&$e===_o||Ue.indexOf(ce)!==-1&&[rn,dn].indexOf($e)!==-1||Ue.indexOf($e)!==-1&&ce===oi||si.indexOf(ce)!==-1&&si.indexOf($e)!==-1||ce===Mn&&si.indexOf($e)!==-1||si.concat(zn).indexOf(ce)!==-1&&$e===mn&&Er.indexOf(vt[Pe])===-1||si.concat(zn).indexOf($e)!==-1&&ce===ze)return Pt;if(ce===bo&&$e===bo){for(var sr=St[Xt],Qi=1;sr>0&&(sr--,mt[sr]===bo);)Qi++;if(Qi%2!==0)return Pt}return ce===ar&&$e===pr?Pt:er},Yi=function(vt,mt){mt||(mt={lineBreak:"normal",wordBreak:"normal"});var St=Le(vt,mt.lineBreak),wt=St[0],Qt=St[1],Xt=St[2];(mt.wordBreak==="break-all"||mt.wordBreak==="break-word")&&(Qt=Qt.map(function(Pe){return[zn,tr,Mo].indexOf(Pe)!==-1?Hr:Pe}));var ae=mt.wordBreak==="keep-all"?Xt.map(function(Pe,ce){return Pe&&vt[ce]>=19968&&vt[ce]<=40959}):void 0;return[wt,Qt,ae]},sn=function(){function vt(mt,St,wt,Qt){this.codePoints=mt,this.required=St===Rr,this.start=wt,this.end=Qt}return vt.prototype.slice=function(){return ge.apply(void 0,this.codePoints.slice(this.start,this.end))},vt}(),He=function(vt,mt){var St=Qe(vt),wt=Yi(St,mt),Qt=wt[0],Xt=wt[1],ae=wt[2],Pe=St.length,ce=0,Ye=0;return{next:function(){if(Ye>=Pe)return{done:!0,value:null};for(var $e=Pt;Ye<Pe&&($e=hi(St,Xt,Qt,++Ye,ae))===Pt;);if($e!==Pt||Ye===Pe){var vn=new sn(St,$e,ce,Ye);return ce=Ye,{value:vn,done:!1}}return{done:!0,value:null}}}},li=1,_i=2,un=4,Yt=8,de=10,Sn=47,wn=92,Ne=9,Bn=32,Ln=34,bn=61,ci=35,Qn=36,Dn=37,Zn=39,rr=40,Gi=41,an=95,Nn=45,hr=33,Cr=60,Yr=62,xe=64,Jn=91,Pi=93,Hn=61,ur=123,ji=63,or=125,cr=124,Jt=126,$t=128,Vt=65533,Te=42,le=43,nn=44,_n=58,On=59,vi=46,Gn=0,fn=8,Wn=11,Vi=14,Wi=31,yn=127,Ot=-1,Ni=48,br=97,zr=101,xr=102,ki=117,Kn=122,ai=65,Fi=69,In=70,ni=85,$n=90,Tn=function(vt){return vt>=Ni&&vt<=57},fi=function(vt){return vt>=55296&&vt<=57343},Xe=function(vt){return Tn(vt)||vt>=ai&&vt<=In||vt>=br&&vt<=xr},nr=function(vt){return vt>=br&&vt<=Kn},mr=function(vt){return vt>=ai&&vt<=$n},Or=function(vt){return nr(vt)||mr(vt)},ir=function(vt){return vt>=$t},jr=function(vt){return vt===de||vt===Ne||vt===Bn},Vr=function(vt){return Or(vt)||ir(vt)||vt===an},Ho=function(vt){return Vr(vt)||Tn(vt)||vt===Nn},so=function(vt){return vt>=Gn&&vt<=fn||vt===Wn||vt>=Vi&&vt<=Wi||vt===yn},To=function(vt,mt){return vt!==wn?!1:mt!==de},uo=function(vt,mt,St){return vt===Nn?Vr(mt)||To(mt,St):Vr(vt)?!0:!!(vt===wn&&To(vt,mt))},Me=function(vt,mt,St){return vt===le||vt===Nn?Tn(mt)?!0:mt===vi&&Tn(St):Tn(vt===vi?mt:vt)},ho=function(vt){var mt=0,St=1;(vt[mt]===le||vt[mt]===Nn)&&(vt[mt]===Nn&&(St=-1),mt++);for(var wt=[];Tn(vt[mt]);)wt.push(vt[mt++]);var Qt=wt.length?parseInt(ge.apply(void 0,wt),10):0;vt[mt]===vi&&mt++;for(var Xt=[];Tn(vt[mt]);)Xt.push(vt[mt++]);var ae=Xt.length,Pe=ae?parseInt(ge.apply(void 0,Xt),10):0;(vt[mt]===Fi||vt[mt]===zr)&&mt++;var ce=1;(vt[mt]===le||vt[mt]===Nn)&&(vt[mt]===Nn&&(ce=-1),mt++);for(var Ye=[];Tn(vt[mt]);)Ye.push(vt[mt++]);var $e=Ye.length?parseInt(ge.apply(void 0,Ye),10):0;return St*(Qt+Pe*Math.pow(10,-ae))*Math.pow(10,ce*$e)},ls={type:2},ks={type:3},ao={type:4},xa={type:13},ta={type:8},Da={type:21},Kr={type:9},Ro={type:10},Vs={type:11},Vl={type:12},zA={type:14},Ba={type:23},Xi={type:1},xA={type:25},KA={type:24},Wa={type:26},Hs={type:27},hu={type:28},ri={type:29},$i={type:31},vr={type:32},Fr=function(){function vt(){this._value=[]}return vt.prototype.write=function(mt){this._value=this._value.concat(Qe(mt))},vt.prototype.read=function(){for(var mt=[],St=this.consumeToken();St!==vr;)mt.push(St),St=this.consumeToken();return mt},vt.prototype.consumeToken=function(){var mt=this.consumeCodePoint();switch(mt){case Ln:return this.consumeStringToken(Ln);case ci:var St=this.peekCodePoint(0),wt=this.peekCodePoint(1),Qt=this.peekCodePoint(2);if(Ho(St)||To(wt,Qt)){var Xt=uo(St,wt,Qt)?_i:li,ae=this.consumeName();return{type:5,value:ae,flags:Xt}}break;case Qn:if(this.peekCodePoint(0)===bn)return this.consumeCodePoint(),xa;break;case Zn:return this.consumeStringToken(Zn);case rr:return ls;case Gi:return ks;case Te:if(this.peekCodePoint(0)===bn)return this.consumeCodePoint(),zA;break;case le:if(Me(mt,this.peekCodePoint(0),this.peekCodePoint(1)))return this.reconsumeCodePoint(mt),this.consumeNumericToken();break;case nn:return ao;case Nn:var Pe=mt,ce=this.peekCodePoint(0),Ye=this.peekCodePoint(1);if(Me(Pe,ce,Ye))return this.reconsumeCodePoint(mt),this.consumeNumericToken();if(uo(Pe,ce,Ye))return this.reconsumeCodePoint(mt),this.consumeIdentLikeToken();if(ce===Nn&&Ye===Yr)return this.consumeCodePoint(),this.consumeCodePoint(),KA;break;case vi:if(Me(mt,this.peekCodePoint(0),this.peekCodePoint(1)))return this.reconsumeCodePoint(mt),this.consumeNumericToken();break;case Sn:if(this.peekCodePoint(0)===Te)for(this.consumeCodePoint();;){var $e=this.consumeCodePoint();if($e===Te&&($e=this.consumeCodePoint(),$e===Sn))return this.consumeToken();if($e===Ot)return this.consumeToken()}break;case _n:return Wa;case On:return Hs;case Cr:if(this.peekCodePoint(0)===hr&&this.peekCodePoint(1)===Nn&&this.peekCodePoint(2)===Nn)return this.consumeCodePoint(),this.consumeCodePoint(),xA;break;case xe:var vn=this.peekCodePoint(0),ei=this.peekCodePoint(1),sr=this.peekCodePoint(2);if(uo(vn,ei,sr)){var ae=this.consumeName();return{type:7,value:ae}}break;case Jn:return hu;case wn:if(To(mt,this.peekCodePoint(0)))return this.reconsumeCodePoint(mt),this.consumeIdentLikeToken();break;case Pi:return ri;case Hn:if(this.peekCodePoint(0)===bn)return this.consumeCodePoint(),ta;break;case ur:return Vs;case or:return Vl;case ki:case ni:var Qi=this.peekCodePoint(0),Ki=this.peekCodePoint(1);return Qi===le&&(Xe(Ki)||Ki===ji)&&(this.consumeCodePoint(),this.consumeUnicodeRangeToken()),this.reconsumeCodePoint(mt),this.consumeIdentLikeToken();case cr:if(this.peekCodePoint(0)===bn)return this.consumeCodePoint(),Kr;if(this.peekCodePoint(0)===cr)return this.consumeCodePoint(),Da;break;case Jt:if(this.peekCodePoint(0)===bn)return this.consumeCodePoint(),Ro;break;case Ot:return vr}return jr(mt)?(this.consumeWhiteSpace(),$i):Tn(mt)?(this.reconsumeCodePoint(mt),this.consumeNumericToken()):Vr(mt)?(this.reconsumeCodePoint(mt),this.consumeIdentLikeToken()):{type:6,value:ge(mt)}},vt.prototype.consumeCodePoint=function(){var mt=this._value.shift();return typeof mt=="undefined"?-1:mt},vt.prototype.reconsumeCodePoint=function(mt){this._value.unshift(mt)},vt.prototype.peekCodePoint=function(mt){return mt>=this._value.length?-1:this._value[mt]},vt.prototype.consumeUnicodeRangeToken=function(){for(var mt=[],St=this.consumeCodePoint();Xe(St)&&mt.length<6;)mt.push(St),St=this.consumeCodePoint();for(var wt=!1;St===ji&&mt.length<6;)mt.push(St),St=this.consumeCodePoint(),wt=!0;if(wt){var Qt=parseInt(ge.apply(void 0,mt.map(function(ce){return ce===ji?Ni:ce})),16),Xt=parseInt(ge.apply(void 0,mt.map(function(ce){return ce===ji?In:ce})),16);return{type:30,start:Qt,end:Xt}}var ae=parseInt(ge.apply(void 0,mt),16);if(this.peekCodePoint(0)===Nn&&Xe(this.peekCodePoint(1))){this.consumeCodePoint(),St=this.consumeCodePoint();for(var Pe=[];Xe(St)&&Pe.length<6;)Pe.push(St),St=this.consumeCodePoint();var Xt=parseInt(ge.apply(void 0,Pe),16);return{type:30,start:ae,end:Xt}}else return{type:30,start:ae,end:ae}},vt.prototype.consumeIdentLikeToken=function(){var mt=this.consumeName();return mt.toLowerCase()==="url"&&this.peekCodePoint(0)===rr?(this.consumeCodePoint(),this.consumeUrlToken()):this.peekCodePoint(0)===rr?(this.consumeCodePoint(),{type:19,value:mt}):{type:20,value:mt}},vt.prototype.consumeUrlToken=function(){var mt=[];if(this.consumeWhiteSpace(),this.peekCodePoint(0)===Ot)return{type:22,value:""};var St=this.peekCodePoint(0);if(St===Zn||St===Ln){var wt=this.consumeStringToken(this.consumeCodePoint());return wt.type===0&&(this.consumeWhiteSpace(),this.peekCodePoint(0)===Ot||this.peekCodePoint(0)===Gi)?(this.consumeCodePoint(),{type:22,value:wt.value}):(this.consumeBadUrlRemnants(),Ba)}for(;;){var Qt=this.consumeCodePoint();if(Qt===Ot||Qt===Gi)return{type:22,value:ge.apply(void 0,mt)};if(jr(Qt))return this.consumeWhiteSpace(),this.peekCodePoint(0)===Ot||this.peekCodePoint(0)===Gi?(this.consumeCodePoint(),{type:22,value:ge.apply(void 0,mt)}):(this.consumeBadUrlRemnants(),Ba);if(Qt===Ln||Qt===Zn||Qt===rr||so(Qt))return this.consumeBadUrlRemnants(),Ba;if(Qt===wn)if(To(Qt,this.peekCodePoint(0)))mt.push(this.consumeEscapedCodePoint());else return this.consumeBadUrlRemnants(),Ba;else mt.push(Qt)}},vt.prototype.consumeWhiteSpace=function(){for(;jr(this.peekCodePoint(0));)this.consumeCodePoint()},vt.prototype.consumeBadUrlRemnants=function(){for(;;){var mt=this.consumeCodePoint();if(mt===Gi||mt===Ot)return;To(mt,this.peekCodePoint(0))&&this.consumeEscapedCodePoint()}},vt.prototype.consumeStringSlice=function(mt){for(var St=5e4,wt="";mt>0;){var Qt=Math.min(St,mt);wt+=ge.apply(void 0,this._value.splice(0,Qt)),mt-=Qt}return this._value.shift(),wt},vt.prototype.consumeStringToken=function(mt){var St="",wt=0;do{var Qt=this._value[wt];if(Qt===Ot||Qt===void 0||Qt===mt)return St+=this.consumeStringSlice(wt),{type:0,value:St};if(Qt===de)return this._value.splice(0,wt),Xi;if(Qt===wn){var Xt=this._value[wt+1];Xt!==Ot&&Xt!==void 0&&(Xt===de?(St+=this.consumeStringSlice(wt),wt=-1,this._value.shift()):To(Qt,Xt)&&(St+=this.consumeStringSlice(wt),St+=ge(this.consumeEscapedCodePoint()),wt=-1))}wt++}while(!0)},vt.prototype.consumeNumber=function(){var mt=[],St=un,wt=this.peekCodePoint(0);for((wt===le||wt===Nn)&&mt.push(this.consumeCodePoint());Tn(this.peekCodePoint(0));)mt.push(this.consumeCodePoint());wt=this.peekCodePoint(0);var Qt=this.peekCodePoint(1);if(wt===vi&&Tn(Qt))for(mt.push(this.consumeCodePoint(),this.consumeCodePoint()),St=Yt;Tn(this.peekCodePoint(0));)mt.push(this.consumeCodePoint());wt=this.peekCodePoint(0),Qt=this.peekCodePoint(1);var Xt=this.peekCodePoint(2);if((wt===Fi||wt===zr)&&((Qt===le||Qt===Nn)&&Tn(Xt)||Tn(Qt)))for(mt.push(this.consumeCodePoint(),this.consumeCodePoint()),St=Yt;Tn(this.peekCodePoint(0));)mt.push(this.consumeCodePoint());return[ho(mt),St]},vt.prototype.consumeNumericToken=function(){var mt=this.consumeNumber(),St=mt[0],wt=mt[1],Qt=this.peekCodePoint(0),Xt=this.peekCodePoint(1),ae=this.peekCodePoint(2);if(uo(Qt,Xt,ae)){var Pe=this.consumeName();return{type:15,number:St,flags:wt,unit:Pe}}return Qt===Dn?(this.consumeCodePoint(),{type:16,number:St,flags:wt}):{type:17,number:St,flags:wt}},vt.prototype.consumeEscapedCodePoint=function(){var mt=this.consumeCodePoint();if(Xe(mt)){for(var St=ge(mt);Xe(this.peekCodePoint(0))&&St.length<6;)St+=ge(this.consumeCodePoint());jr(this.peekCodePoint(0))&&this.consumeCodePoint();var wt=parseInt(St,16);return wt===0||fi(wt)||wt>1114111?Vt:wt}return mt===Ot?Vt:mt},vt.prototype.consumeName=function(){for(var mt="";;){var St=this.consumeCodePoint();if(Ho(St))mt+=ge(St);else if(To(St,this.peekCodePoint(0)))mt+=ge(this.consumeEscapedCodePoint());else return this.reconsumeCodePoint(St),mt}},vt}(),Dr=function(){function vt(mt){this._tokens=mt}return vt.create=function(mt){var St=new Fr;return St.write(mt),new vt(St.read())},vt.parseValue=function(mt){return vt.create(mt).parseComponentValue()},vt.parseValues=function(mt){return vt.create(mt).parseComponentValues()},vt.prototype.parseComponentValue=function(){for(var mt=this.consumeToken();mt.type===31;)mt=this.consumeToken();if(mt.type===32)throw new SyntaxError("Error parsing CSS component value, unexpected EOF");this.reconsumeToken(mt);var St=this.consumeComponentValue();do mt=this.consumeToken();while(mt.type===31);if(mt.type===32)return St;throw new SyntaxError("Error parsing CSS component value, multiple values found when expecting only one")},vt.prototype.parseComponentValues=function(){for(var mt=[];;){var St=this.consumeComponentValue();if(St.type===32)return mt;mt.push(St),mt.push()}},vt.prototype.consumeComponentValue=function(){var mt=this.consumeToken();switch(mt.type){case 11:case 28:case 2:return this.consumeSimpleBlock(mt.type);case 19:return this.consumeFunction(mt)}return mt},vt.prototype.consumeSimpleBlock=function(mt){for(var St={type:mt,values:[]},wt=this.consumeToken();;){if(wt.type===32||ca(wt,mt))return St;this.reconsumeToken(wt),St.values.push(this.consumeComponentValue()),wt=this.consumeToken()}},vt.prototype.consumeFunction=function(mt){for(var St={name:mt.value,values:[],type:18};;){var wt=this.consumeToken();if(wt.type===32||wt.type===3)return St;this.reconsumeToken(wt),St.values.push(this.consumeComponentValue())}},vt.prototype.consumeToken=function(){var mt=this._tokens.shift();return typeof mt=="undefined"?vr:mt},vt.prototype.reconsumeToken=function(mt){this._tokens.unshift(mt)},vt}(),wo=function(vt){return vt.type===15},Ui=function(vt){return vt.type===17},So=function(vt){return vt.type===20},ea=function(vt){return vt.type===0},Bs=function(vt,mt){return So(vt)&&vt.value===mt},Go=function(vt){return vt.type!==31},_s=function(vt){return vt.type!==31&&vt.type!==4},bs=function(vt){var mt=[],St=[];return vt.forEach(function(wt){if(wt.type===4){if(St.length===0)throw new Error("Error parsing function args, zero tokens for arg");mt.push(St),St=[];return}wt.type!==31&&St.push(wt)}),St.length&&mt.push(St),mt},ca=function(vt,mt){return mt===11&&vt.type===12||mt===28&&vt.type===29?!0:mt===2&&vt.type===3},Ws=function(vt){return vt.type===17||vt.type===15},ns=function(vt){return vt.type===16||Ws(vt)},xl=function(vt){return vt.length>1?[vt[0],vt[1]]:[vt[0]]},Ts={type:17,number:0,flags:un},Zu={type:16,number:50,flags:un},Il={type:16,number:100,flags:un},Ya=function(vt,mt,St){var wt=vt[0],Qt=vt[1];return[Qo(wt,mt),Qo(typeof Qt!="undefined"?Qt:wt,St)]},Qo=function(vt,mt){if(vt.type===16)return vt.number/100*mt;if(wo(vt))switch(vt.unit){case"rem":case"em":return 16*vt.number;case"px":default:return vt.number}return vt.number},al="deg",Ju="grad",qu="rad",Eh="turn",is={name:"angle",parse:function(vt,mt){if(mt.type===15)switch(mt.unit){case al:return Math.PI*mt.number/180;case Ju:return Math.PI/200*mt.number;case qu:return mt.number;case Eh:return Math.PI*2*mt.number}throw new Error("Unsupported angle type")}},Lc=function(vt){return vt.type===15&&(vt.unit===al||vt.unit===Ju||vt.unit===qu||vt.unit===Eh)},$u=function(vt){var mt=vt.filter(So).map(function(St){return St.value}).join(" ");switch(mt){case"to bottom right":case"to right bottom":case"left top":case"top left":return[Ts,Ts];case"to top":case"bottom":return fa(0);case"to bottom left":case"to left bottom":case"right top":case"top right":return[Ts,Il];case"to right":case"left":return fa(90);case"to top left":case"to left top":case"right bottom":case"bottom right":return[Il,Il];case"to bottom":case"top":return fa(180);case"to top right":case"to right top":case"left bottom":case"bottom left":return[Il,Ts];case"to left":case"right":return fa(270)}return 0},fa=function(vt){return Math.PI*vt/180},ll={name:"color",parse:function(vt,mt){if(mt.type===18){var St=ko[mt.name];if(typeof St=="undefined")throw new Error('Attempting to parse an unsupported color function "'+mt.name+'"');return St(vt,mt.values)}if(mt.type===5){if(mt.value.length===3){var wt=mt.value.substring(0,1),Qt=mt.value.substring(1,2),Xt=mt.value.substring(2,3);return rs(parseInt(wt+wt,16),parseInt(Qt+Qt,16),parseInt(Xt+Xt,16),1)}if(mt.value.length===4){var wt=mt.value.substring(0,1),Qt=mt.value.substring(1,2),Xt=mt.value.substring(2,3),ae=mt.value.substring(3,4);return rs(parseInt(wt+wt,16),parseInt(Qt+Qt,16),parseInt(Xt+Xt,16),parseInt(ae+ae,16)/255)}if(mt.value.length===6){var wt=mt.value.substring(0,2),Qt=mt.value.substring(2,4),Xt=mt.value.substring(4,6);return rs(parseInt(wt,16),parseInt(Qt,16),parseInt(Xt,16),1)}if(mt.value.length===8){var wt=mt.value.substring(0,2),Qt=mt.value.substring(2,4),Xt=mt.value.substring(4,6),ae=mt.value.substring(6,8);return rs(parseInt(wt,16),parseInt(Qt,16),parseInt(Xt,16),parseInt(ae,16)/255)}}if(mt.type===20){var Pe=ys[mt.value.toUpperCase()];if(typeof Pe!="undefined")return Pe}return ys.TRANSPARENT}},vs=function(vt){return(255&vt)===0},No=function(vt){var mt=255&vt,St=255&vt>>8,wt=255&vt>>16,Qt=255&vt>>24;return mt<255?"rgba("+Qt+","+wt+","+St+","+mt/255+")":"rgb("+Qt+","+wt+","+St+")"},rs=function(vt,mt,St,wt){return(vt<<24|mt<<16|St<<8|Math.round(wt*255)<<0)>>>0},Ys=function(vt,mt){if(vt.type===17)return vt.number;if(vt.type===16){var St=mt===3?1:255;return mt===3?vt.number/100*St:Math.round(vt.number/100*St)}return 0},th=function(vt,mt){var St=mt.filter(_s);if(St.length===3){var wt=St.map(Ys),Qt=wt[0],Xt=wt[1],ae=wt[2];return rs(Qt,Xt,ae,1)}if(St.length===4){var Pe=St.map(Ys),Qt=Pe[0],Xt=Pe[1],ae=Pe[2],ce=Pe[3];return rs(Qt,Xt,ae,ce)}return 0};function BA(vt,mt,St){return St<0&&(St+=1),St>=1&&(St-=1),St<1/6?(mt-vt)*St*6+vt:St<1/2?mt:St<2/3?(mt-vt)*6*(2/3-St)+vt:vt}var Yo=function(vt,mt){var St=mt.filter(_s),wt=St[0],Qt=St[1],Xt=St[2],ae=St[3],Pe=(wt.type===17?fa(wt.number):is.parse(vt,wt))/(Math.PI*2),ce=ns(Qt)?Qt.number/100:0,Ye=ns(Xt)?Xt.number/100:0,$e=typeof ae!="undefined"&&ns(ae)?Qo(ae,1):1;if(ce===0)return rs(Ye*255,Ye*255,Ye*255,1);var vn=Ye<=.5?Ye*(ce+1):Ye+ce-Ye*ce,ei=Ye*2-vn,sr=BA(ei,vn,Pe+1/3),Qi=BA(ei,vn,Pe),Ki=BA(ei,vn,Pe-1/3);return rs(sr*255,Qi*255,Ki*255,$e)},ko={hsl:Yo,hsla:Yo,rgb:th,rgba:th},Xr=function(vt,mt){return ll.parse(vt,Dr.create(mt).parseComponentValue())},ys={ALICEBLUE:4042850303,ANTIQUEWHITE:4209760255,AQUA:16777215,AQUAMARINE:2147472639,AZURE:4043309055,BEIGE:4126530815,BISQUE:4293182719,BLACK:255,BLANCHEDALMOND:4293643775,BLUE:65535,BLUEVIOLET:2318131967,BROWN:2771004159,BURLYWOOD:3736635391,CADETBLUE:1604231423,CHARTREUSE:2147418367,CHOCOLATE:3530104575,CORAL:4286533887,CORNFLOWERBLUE:1687547391,CORNSILK:4294499583,CRIMSON:3692313855,CYAN:16777215,DARKBLUE:35839,DARKCYAN:9145343,DARKGOLDENROD:3095837695,DARKGRAY:2846468607,DARKGREEN:6553855,DARKGREY:2846468607,DARKKHAKI:3182914559,DARKMAGENTA:2332068863,DARKOLIVEGREEN:1433087999,DARKORANGE:4287365375,DARKORCHID:2570243327,DARKRED:2332033279,DARKSALMON:3918953215,DARKSEAGREEN:2411499519,DARKSLATEBLUE:1211993087,DARKSLATEGRAY:793726975,DARKSLATEGREY:793726975,DARKTURQUOISE:13554175,DARKVIOLET:2483082239,DEEPPINK:4279538687,DEEPSKYBLUE:12582911,DIMGRAY:1768516095,DIMGREY:1768516095,DODGERBLUE:512819199,FIREBRICK:2988581631,FLORALWHITE:4294635775,FORESTGREEN:579543807,FUCHSIA:4278255615,GAINSBORO:3705462015,GHOSTWHITE:4177068031,GOLD:4292280575,GOLDENROD:3668254975,GRAY:2155905279,GREEN:8388863,GREENYELLOW:2919182335,GREY:2155905279,HONEYDEW:4043305215,HOTPINK:4285117695,INDIANRED:3445382399,INDIGO:1258324735,IVORY:4294963455,KHAKI:4041641215,LAVENDER:3873897215,LAVENDERBLUSH:4293981695,LAWNGREEN:2096890111,LEMONCHIFFON:4294626815,LIGHTBLUE:2916673279,LIGHTCORAL:4034953471,LIGHTCYAN:3774873599,LIGHTGOLDENRODYELLOW:4210742015,LIGHTGRAY:3553874943,LIGHTGREEN:2431553791,LIGHTGREY:3553874943,LIGHTPINK:4290167295,LIGHTSALMON:4288707327,LIGHTSEAGREEN:548580095,LIGHTSKYBLUE:2278488831,LIGHTSLATEGRAY:2005441023,LIGHTSLATEGREY:2005441023,LIGHTSTEELBLUE:2965692159,LIGHTYELLOW:4294959359,LIME:16711935,LIMEGREEN:852308735,LINEN:4210091775,MAGENTA:4278255615,MAROON:2147483903,MEDIUMAQUAMARINE:1724754687,MEDIUMBLUE:52735,MEDIUMORCHID:3126187007,MEDIUMPURPLE:2473647103,MEDIUMSEAGREEN:1018393087,MEDIUMSLATEBLUE:2070474495,MEDIUMSPRINGGREEN:16423679,MEDIUMTURQUOISE:1221709055,MEDIUMVIOLETRED:3340076543,MIDNIGHTBLUE:421097727,MINTCREAM:4127193855,MISTYROSE:4293190143,MOCCASIN:4293178879,NAVAJOWHITE:4292783615,NAVY:33023,OLDLACE:4260751103,OLIVE:2155872511,OLIVEDRAB:1804477439,ORANGE:4289003775,ORANGERED:4282712319,ORCHID:3664828159,PALEGOLDENROD:4008225535,PALEGREEN:2566625535,PALETURQUOISE:2951671551,PALEVIOLETRED:3681588223,PAPAYAWHIP:4293907967,PEACHPUFF:4292524543,PERU:3448061951,PINK:4290825215,PLUM:3718307327,POWDERBLUE:2967529215,PURPLE:2147516671,REBECCAPURPLE:1714657791,RED:4278190335,ROSYBROWN:3163525119,ROYALBLUE:1097458175,SADDLEBROWN:2336560127,SALMON:4202722047,SANDYBROWN:4104413439,SEAGREEN:780883967,SEASHELL:4294307583,SIENNA:2689740287,SILVER:3233857791,SKYBLUE:2278484991,SLATEBLUE:1784335871,SLATEGRAY:1887473919,SLATEGREY:1887473919,SNOW:4294638335,SPRINGGREEN:16744447,STEELBLUE:1182971135,TAN:3535047935,TEAL:8421631,THISTLE:3636451583,TOMATO:4284696575,TRANSPARENT:0,TURQUOISE:1088475391,VIOLET:4001558271,WHEAT:4125012991,WHITE:4294967295,WHITESMOKE:4126537215,YELLOW:4294902015,YELLOWGREEN:2597139199},Ei={name:"background-clip",initialValue:"border-box",prefix:!1,type:1,parse:function(vt,mt){return mt.map(function(St){if(So(St))switch(St.value){case"padding-box":return 1;case"content-box":return 2}return 0})}},Rs={name:"background-color",initialValue:"transparent",prefix:!1,type:3,format:"color"},oe=function(vt,mt){var St=ll.parse(vt,mt[0]),wt=mt[1];return wt&&ns(wt)?{color:St,stop:wt}:{color:St,stop:null}},qe=function(vt,mt){var St=vt[0],wt=vt[vt.length-1];St.stop===null&&(St.stop=Ts),wt.stop===null&&(wt.stop=Il);for(var Qt=[],Xt=0,ae=0;ae<vt.length;ae++){var Pe=vt[ae].stop;if(Pe!==null){var ce=Qo(Pe,mt);ce>Xt?Qt.push(ce):Qt.push(Xt),Xt=ce}else Qt.push(null)}for(var Ye=null,ae=0;ae<Qt.length;ae++){var $e=Qt[ae];if($e===null)Ye===null&&(Ye=ae);else if(Ye!==null){for(var vn=ae-Ye,ei=Qt[Ye-1],sr=($e-ei)/(vn+1),Qi=1;Qi<=vn;Qi++)Qt[Ye+Qi-1]=sr*Qi;Ye=null}}return vt.map(function(Ki,fo){var Pr=Ki.color;return{color:Pr,stop:Math.max(Math.min(1,Qt[fo]/mt),0)}})},Nl=function(vt,mt,St){var wt=mt/2,Qt=St/2,Xt=Qo(vt[0],mt)-wt,ae=Qt-Qo(vt[1],St);return(Math.atan2(ae,Xt)+Math.PI*2)%(Math.PI*2)},CA=function(vt,mt,St){var wt=typeof vt=="number"?vt:Nl(vt,mt,St),Qt=Math.abs(mt*Math.sin(wt))+Math.abs(St*Math.cos(wt)),Xt=mt/2,ae=St/2,Pe=Qt/2,ce=Math.sin(wt-Math.PI/2)*Pe,Ye=Math.cos(wt-Math.PI/2)*Pe;return[Qt,Xt-Ye,Xt+Ye,ae-ce,ae+ce]},Cs=function(vt,mt){return Math.sqrt(vt*vt+mt*mt)},Ca=function(vt,mt,St,wt,Qt){var Xt=[[0,0],[0,mt],[vt,0],[vt,mt]];return Xt.reduce(function(ae,Pe){var ce=Pe[0],Ye=Pe[1],$e=Cs(St-ce,wt-Ye);return(Qt?$e<ae.optimumDistance:$e>ae.optimumDistance)?{optimumCorner:Pe,optimumDistance:$e}:ae},{optimumDistance:Qt?1/0:-1/0,optimumCorner:null}).optimumCorner},_l=function(vt,mt,St,wt,Qt){var Xt=0,ae=0;switch(vt.size){case 0:vt.shape===0?Xt=ae=Math.min(Math.abs(mt),Math.abs(mt-wt),Math.abs(St),Math.abs(St-Qt)):vt.shape===1&&(Xt=Math.min(Math.abs(mt),Math.abs(mt-wt)),ae=Math.min(Math.abs(St),Math.abs(St-Qt)));break;case 2:if(vt.shape===0)Xt=ae=Math.min(Cs(mt,St),Cs(mt,St-Qt),Cs(mt-wt,St),Cs(mt-wt,St-Qt));else if(vt.shape===1){var Pe=Math.min(Math.abs(St),Math.abs(St-Qt))/Math.min(Math.abs(mt),Math.abs(mt-wt)),ce=Ca(wt,Qt,mt,St,!0),Ye=ce[0],$e=ce[1];Xt=Cs(Ye-mt,($e-St)/Pe),ae=Pe*Xt}break;case 1:vt.shape===0?Xt=ae=Math.max(Math.abs(mt),Math.abs(mt-wt),Math.abs(St),Math.abs(St-Qt)):vt.shape===1&&(Xt=Math.max(Math.abs(mt),Math.abs(mt-wt)),ae=Math.max(Math.abs(St),Math.abs(St-Qt)));break;case 3:if(vt.shape===0)Xt=ae=Math.max(Cs(mt,St),Cs(mt,St-Qt),Cs(mt-wt,St),Cs(mt-wt,St-Qt));else if(vt.shape===1){var Pe=Math.max(Math.abs(St),Math.abs(St-Qt))/Math.max(Math.abs(mt),Math.abs(mt-wt)),vn=Ca(wt,Qt,mt,St,!1),Ye=vn[0],$e=vn[1];Xt=Cs(Ye-mt,($e-St)/Pe),ae=Pe*Xt}break}return Array.isArray(vt.size)&&(Xt=Qo(vt.size[0],wt),ae=vt.size.length===2?Qo(vt.size[1],Qt):Xt),[Xt,ae]},jA=function(vt,mt){var St=fa(180),wt=[];return bs(mt).forEach(function(Qt,Xt){if(Xt===0){var ae=Qt[0];if(ae.type===20&&ae.value==="to"){St=$u(Qt);return}else if(Lc(ae)){St=is.parse(vt,ae);return}}var Pe=oe(vt,Qt);wt.push(Pe)}),{angle:St,stops:wt,type:1}},cu=function(vt,mt){var St=fa(180),wt=[];return bs(mt).forEach(function(Qt,Xt){if(Xt===0){var ae=Qt[0];if(ae.type===20&&["top","left","right","bottom"].indexOf(ae.value)!==-1){St=$u(Qt);return}else if(Lc(ae)){St=(is.parse(vt,ae)+fa(270))%fa(360);return}}var Pe=oe(vt,Qt);wt.push(Pe)}),{angle:St,stops:wt,type:1}},As=function(vt,mt){var St=fa(180),wt=[],Qt=1,Xt=0,ae=3,Pe=[];return bs(mt).forEach(function(ce,Ye){var $e=ce[0];if(Ye===0){if(So($e)&&$e.value==="linear"){Qt=1;return}else if(So($e)&&$e.value==="radial"){Qt=2;return}}if($e.type===18){if($e.name==="from"){var vn=ll.parse(vt,$e.values[0]);wt.push({stop:Ts,color:vn})}else if($e.name==="to"){var vn=ll.parse(vt,$e.values[0]);wt.push({stop:Il,color:vn})}else if($e.name==="color-stop"){var ei=$e.values.filter(_s);if(ei.length===2){var vn=ll.parse(vt,ei[1]),sr=ei[0];Ui(sr)&&wt.push({stop:{type:16,number:sr.number*100,flags:sr.flags},color:vn})}}}}),Qt===1?{angle:(St+fa(180))%fa(360),stops:wt,type:Qt}:{size:ae,shape:Xt,stops:wt,position:Pe,type:Qt}},yr="closest-side",Pa="farthest-side",Al="closest-corner",os="farthest-corner",_r="circle",Es="ellipse",Oa="cover",zo="contain",ul=function(vt,mt){var St=0,wt=3,Qt=[],Xt=[];return bs(mt).forEach(function(ae,Pe){var ce=!0;if(Pe===0){var Ye=!1;ce=ae.reduce(function(vn,ei){if(Ye)if(So(ei))switch(ei.value){case"center":return Xt.push(Zu),vn;case"top":case"left":return Xt.push(Ts),vn;case"right":case"bottom":return Xt.push(Il),vn}else(ns(ei)||Ws(ei))&&Xt.push(ei);else if(So(ei))switch(ei.value){case _r:return St=0,!1;case Es:return St=1,!1;case"at":return Ye=!0,!1;case yr:return wt=0,!1;case Oa:case Pa:return wt=1,!1;case zo:case Al:return wt=2,!1;case os:return wt=3,!1}else if(Ws(ei)||ns(ei))return Array.isArray(wt)||(wt=[]),wt.push(ei),!1;return vn},ce)}if(ce){var $e=oe(vt,ae);Qt.push($e)}}),{size:wt,shape:St,stops:Qt,position:Xt,type:2}},Is=function(vt,mt){var St=0,wt=3,Qt=[],Xt=[];return bs(mt).forEach(function(ae,Pe){var ce=!0;if(Pe===0?ce=ae.reduce(function($e,vn){if(So(vn))switch(vn.value){case"center":return Xt.push(Zu),!1;case"top":case"left":return Xt.push(Ts),!1;case"right":case"bottom":return Xt.push(Il),!1}else if(ns(vn)||Ws(vn))return Xt.push(vn),!1;return $e},ce):Pe===1&&(ce=ae.reduce(function($e,vn){if(So(vn))switch(vn.value){case _r:return St=0,!1;case Es:return St=1,!1;case zo:case yr:return wt=0,!1;case Pa:return wt=1,!1;case Al:return wt=2,!1;case Oa:case os:return wt=3,!1}else if(Ws(vn)||ns(vn))return Array.isArray(wt)||(wt=[]),wt.push(vn),!1;return $e},ce)),ce){var Ye=oe(vt,ae);Qt.push(Ye)}}),{size:wt,shape:St,stops:Qt,position:Xt,type:2}},fu=function(vt){return vt.type===1},vo=function(vt){return vt.type===2},da={name:"image",parse:function(vt,mt){if(mt.type===22){var St={url:mt.value,type:0};return vt.cache.addImage(mt.value),St}if(mt.type===18){var wt=Uo[mt.name];if(typeof wt=="undefined")throw new Error('Attempting to parse an unsupported image function "'+mt.name+'"');return wt(vt,mt.values)}throw new Error("Unsupported image type "+mt.type)}};function co(vt){return!(vt.type===20&&vt.value==="none")&&(vt.type!==18||!!Uo[vt.name])}var Uo={"linear-gradient":jA,"-moz-linear-gradient":cu,"-ms-linear-gradient":cu,"-o-linear-gradient":cu,"-webkit-linear-gradient":cu,"radial-gradient":ul,"-moz-radial-gradient":Is,"-ms-radial-gradient":Is,"-o-radial-gradient":Is,"-webkit-radial-gradient":Is,"-webkit-gradient":As},ts={name:"background-image",initialValue:"none",type:1,prefix:!1,parse:function(vt,mt){if(mt.length===0)return[];var St=mt[0];return St.type===20&&St.value==="none"?[]:mt.filter(function(wt){return _s(wt)&&co(wt)}).map(function(wt){return da.parse(vt,wt)})}},ps={name:"background-origin",initialValue:"border-box",prefix:!1,type:1,parse:function(vt,mt){return mt.map(function(St){if(So(St))switch(St.value){case"padding-box":return 1;case"content-box":return 2}return 0})}},xo={name:"background-position",initialValue:"0% 0%",type:1,prefix:!1,parse:function(vt,mt){return bs(mt).map(function(St){return St.filter(ns)}).map(xl)}},eh={name:"background-repeat",initialValue:"repeat",prefix:!1,type:1,parse:function(vt,mt){return bs(mt).map(function(St){return St.filter(So).map(function(wt){return wt.value}).join(" ")}).map(fr)}},fr=function(vt){switch(vt){case"no-repeat":return 1;case"repeat-x":case"repeat no-repeat":return 2;case"repeat-y":case"no-repeat repeat":return 3;case"repeat":default:return 0}},nh;(function(vt){vt.AUTO="auto",vt.CONTAIN="contain",vt.COVER="cover"})(nh||(nh={}));var lo={name:"background-size",initialValue:"0",prefix:!1,type:1,parse:function(vt,mt){return bs(mt).map(function(St){return St.filter(ig)})}},ig=function(vt){return So(vt)||ns(vt)},VA=function(vt){return{name:"border-"+vt+"-color",initialValue:"transparent",prefix:!1,type:3,format:"color"}},Ec=VA("top"),sd=VA("right"),vf=VA("bottom"),_A=VA("left"),PA=function(vt){return{name:"border-radius-"+vt,initialValue:"0 0",prefix:!1,type:1,parse:function(mt,St){return xl(St.filter(ns))}}},Bo=PA("top-left"),FA=PA("top-right"),yf=PA("bottom-right"),ih=PA("bottom-left"),Mh=function(vt){return{name:"border-"+vt+"-style",initialValue:"solid",prefix:!1,type:2,parse:function(mt,St){switch(St){case"none":return 0;case"dashed":return 2;case"dotted":return 3;case"double":return 4}return 1}}},WA=Mh("top"),Ql=Mh("right"),du=Mh("bottom"),tA=Mh("left"),eA=function(vt){return{name:"border-"+vt+"-width",initialValue:"0",type:0,prefix:!1,parse:function(mt,St){return wo(St)?St.number:0}}},wf=eA("top"),ad=eA("right"),ld=eA("bottom"),rg=eA("left"),gu={name:"color",initialValue:"transparent",prefix:!1,type:3,format:"color"},pu={name:"direction",initialValue:"ltr",prefix:!1,type:2,parse:function(vt,mt){switch(mt){case"rtl":return 1;case"ltr":default:return 0}}},Jg={name:"display",initialValue:"inline-block",prefix:!1,type:1,parse:function(vt,mt){return mt.filter(So).reduce(function(St,wt){return St|qg(wt.value)},0)}},qg=function(vt){switch(vt){case"block":case"-webkit-box":return 2;case"inline":return 4;case"run-in":return 8;case"flow":return 16;case"flow-root":return 32;case"table":return 64;case"flex":case"-webkit-flex":return 128;case"grid":case"-ms-grid":return 256;case"ruby":return 512;case"subgrid":return 1024;case"list-item":return 2048;case"table-row-group":return 4096;case"table-header-group":return 8192;case"table-footer-group":return 16384;case"table-row":return 32768;case"table-cell":return 65536;case"table-column-group":return 131072;case"table-column":return 262144;case"table-caption":return 524288;case"ruby-base":return 1048576;case"ruby-text":return 2097152;case"ruby-base-container":return 4194304;case"ruby-text-container":return 8388608;case"contents":return 16777216;case"inline-block":return 33554432;case"inline-list-item":return 67108864;case"inline-table":return 134217728;case"inline-flex":return 268435456;case"inline-grid":return 536870912}return 0},$g={name:"float",initialValue:"none",prefix:!1,type:2,parse:function(vt,mt){switch(mt){case"left":return 1;case"right":return 2;case"inline-start":return 3;case"inline-end":return 4}return 0}},og={name:"letter-spacing",initialValue:"0",prefix:!1,type:0,parse:function(vt,mt){return mt.type===20&&mt.value==="normal"?0:mt.type===17||mt.type===15?mt.number:0}},us;(function(vt){vt.NORMAL="normal",vt.STRICT="strict"})(us||(us={}));var mu={name:"line-break",initialValue:"normal",prefix:!1,type:2,parse:function(vt,mt){switch(mt){case"strict":return us.STRICT;case"normal":default:return us.NORMAL}}},Io={name:"line-height",initialValue:"normal",prefix:!1,type:4},Xs=function(vt,mt){return So(vt)&&vt.value==="normal"?1.2*mt:vt.type===17?mt*vt.number:ns(vt)?Qo(vt,mt):mt},oa={name:"list-style-image",initialValue:"none",type:0,prefix:!1,parse:function(vt,mt){return mt.type===20&&mt.value==="none"?null:da.parse(vt,mt)}},sa={name:"list-style-position",initialValue:"outside",prefix:!1,type:2,parse:function(vt,mt){switch(mt){case"inside":return 0;case"outside":default:return 1}}},vu={name:"list-style-type",initialValue:"none",prefix:!1,type:2,parse:function(vt,mt){switch(mt){case"disc":return 0;case"circle":return 1;case"square":return 2;case"decimal":return 3;case"cjk-decimal":return 4;case"decimal-leading-zero":return 5;case"lower-roman":return 6;case"upper-roman":return 7;case"lower-greek":return 8;case"lower-alpha":return 9;case"upper-alpha":return 10;case"arabic-indic":return 11;case"armenian":return 12;case"bengali":return 13;case"cambodian":return 14;case"cjk-earthly-branch":return 15;case"cjk-heavenly-stem":return 16;case"cjk-ideographic":return 17;case"devanagari":return 18;case"ethiopic-numeric":return 19;case"georgian":return 20;case"gujarati":return 21;case"gurmukhi":return 22;case"hebrew":return 22;case"hiragana":return 23;case"hiragana-iroha":return 24;case"japanese-formal":return 25;case"japanese-informal":return 26;case"kannada":return 27;case"katakana":return 28;case"katakana-iroha":return 29;case"khmer":return 30;case"korean-hangul-formal":return 31;case"korean-hanja-formal":return 32;case"korean-hanja-informal":return 33;case"lao":return 34;case"lower-armenian":return 35;case"malayalam":return 36;case"mongolian":return 37;case"myanmar":return 38;case"oriya":return 39;case"persian":return 40;case"simp-chinese-formal":return 41;case"simp-chinese-informal":return 42;case"tamil":return 43;case"telugu":return 44;case"thai":return 45;case"tibetan":return 46;case"trad-chinese-formal":return 47;case"trad-chinese-informal":return 48;case"upper-armenian":return 49;case"disclosure-open":return 50;case"disclosure-closed":return 51;case"none":default:return-1}}},Gs=function(vt){return{name:"margin-"+vt,initialValue:"0",prefix:!1,type:4}},rh=Gs("top"),sg=Gs("right"),ag=Gs("bottom"),Xa=Gs("left"),Sf={name:"overflow",initialValue:"visible",prefix:!1,type:1,parse:function(vt,mt){return mt.filter(So).map(function(St){switch(St.value){case"hidden":return 1;case"scroll":return 2;case"clip":return 3;case"auto":return 4;case"visible":default:return 0}})}},Ko={name:"overflow-wrap",initialValue:"normal",prefix:!1,type:2,parse:function(vt,mt){switch(mt){case"break-word":return"break-word";case"normal":default:return"normal"}}},nA=function(vt){return{name:"padding-"+vt,initialValue:"0",prefix:!1,type:3,format:"length-percentage"}},Ad=nA("top"),yu=nA("right"),wu=nA("bottom"),xf=nA("left"),zs={name:"text-align",initialValue:"left",prefix:!1,type:2,parse:function(vt,mt){switch(mt){case"right":return 2;case"center":case"justify":return 1;case"left":default:return 0}}},aa={name:"position",initialValue:"static",prefix:!1,type:2,parse:function(vt,mt){switch(mt){case"relative":return 1;case"absolute":return 2;case"fixed":return 3;case"sticky":return 4}return 0}},oh={name:"text-shadow",initialValue:"none",type:1,prefix:!1,parse:function(vt,mt){return mt.length===1&&Bs(mt[0],"none")?[]:bs(mt).map(function(St){for(var wt={color:ys.TRANSPARENT,offsetX:Ts,offsetY:Ts,blur:Ts},Qt=0,Xt=0;Xt<St.length;Xt++){var ae=St[Xt];Ws(ae)?(Qt===0?wt.offsetX=ae:Qt===1?wt.offsetY=ae:wt.blur=ae,Qt++):wt.color=ll.parse(vt,ae)}return wt})}},Bl={name:"text-transform",initialValue:"none",prefix:!1,type:2,parse:function(vt,mt){switch(mt){case"uppercase":return 2;case"lowercase":return 1;case"capitalize":return 3}return 0}},Su={name:"transform",initialValue:"none",prefix:!0,type:0,parse:function(vt,mt){if(mt.type===20&&mt.value==="none")return null;if(mt.type===18){var St=iA[mt.name];if(typeof St=="undefined")throw new Error('Attempting to parse an unsupported transform function "'+mt.name+'"');return St(mt.values)}return null}},hl=function(vt){var mt=vt.filter(function(St){return St.type===17}).map(function(St){return St.number});return mt.length===6?mt:null},Ns=function(vt){var mt=vt.filter(function(ce){return ce.type===17}).map(function(ce){return ce.number}),St=mt[0],wt=mt[1];mt[2],mt[3];var Qt=mt[4],Xt=mt[5];mt[6],mt[7],mt[8],mt[9],mt[10],mt[11];var ae=mt[12],Pe=mt[13];return mt[14],mt[15],mt.length===16?[St,wt,Qt,Xt,ae,Pe]:null},iA={matrix:hl,matrix3d:Ns},cl={type:16,number:50,flags:un},la=[cl,cl],Ul={name:"transform-origin",initialValue:"50% 50%",prefix:!0,type:1,parse:function(vt,mt){var St=mt.filter(ns);return St.length!==2?la:[St[0],St[1]]}},jo={name:"visible",initialValue:"none",prefix:!1,type:2,parse:function(vt,mt){switch(mt){case"hidden":return 1;case"collapse":return 2;case"visible":default:return 0}}},Za;(function(vt){vt.NORMAL="normal",vt.BREAK_ALL="break-all",vt.KEEP_ALL="keep-all"})(Za||(Za={}));for(var YA={name:"word-break",initialValue:"normal",prefix:!1,type:2,parse:function(vt,mt){switch(mt){case"break-all":return Za.BREAK_ALL;case"keep-all":return Za.KEEP_ALL;case"normal":default:return Za.NORMAL}}},xu={name:"z-index",initialValue:"auto",prefix:!1,type:0,parse:function(vt,mt){if(mt.type===20)return{auto:!0,order:0};if(Ui(mt))return{auto:!1,order:mt.number};throw new Error("Invalid z-index number parsed")}},Bu={name:"time",parse:function(vt,mt){if(mt.type===15)switch(mt.unit.toLowerCase()){case"s":return 1e3*mt.number;case"ms":return mt.number}throw new Error("Unsupported time type")}},Mc={name:"opacity",initialValue:"1",type:0,prefix:!1,parse:function(vt,mt){return Ui(mt)?mt.number:1}},kh={name:"text-decoration-color",initialValue:"transparent",prefix:!1,type:3,format:"color"},kc={name:"text-decoration-line",initialValue:"none",prefix:!1,type:1,parse:function(vt,mt){return mt.filter(So).map(function(St){switch(St.value){case"underline":return 1;case"overline":return 2;case"line-through":return 3;case"none":return 4}return 0}).filter(function(St){return St!==0})}},$r={name:"font-family",initialValue:"",prefix:!1,type:1,parse:function(vt,mt){var St=[],wt=[];return mt.forEach(function(Qt){switch(Qt.type){case 20:case 0:St.push(Qt.value);break;case 17:St.push(Qt.number.toString());break;case 4:wt.push(St.join(" ")),St.length=0;break}}),St.length&&wt.push(St.join(" ")),wt.map(function(Qt){return Qt.indexOf(" ")===-1?Qt:"'"+Qt+"'"})}},bc={name:"font-size",initialValue:"0",prefix:!1,type:3,format:"length"},ud={name:"font-weight",initialValue:"normal",type:0,prefix:!1,parse:function(vt,mt){if(Ui(mt))return mt.number;if(So(mt))switch(mt.value){case"bold":return 700;case"normal":default:return 400}return 400}},Bf={name:"font-variant",initialValue:"none",type:1,prefix:!1,parse:function(vt,mt){return mt.filter(So).map(function(St){return St.value})}},rA={name:"font-style",initialValue:"normal",prefix:!1,type:2,parse:function(vt,mt){switch(mt){case"oblique":return"oblique";case"italic":return"italic";case"normal":default:return"normal"}}},Zs=function(vt,mt){return(vt&mt)!==0},Tc={name:"content",initialValue:"none",type:1,prefix:!1,parse:function(vt,mt){if(mt.length===0)return[];var St=mt[0];return St.type===20&&St.value==="none"?[]:mt}},tp={name:"counter-increment",initialValue:"none",prefix:!0,type:1,parse:function(vt,mt){if(mt.length===0)return null;var St=mt[0];if(St.type===20&&St.value==="none")return null;for(var wt=[],Qt=mt.filter(Go),Xt=0;Xt<Qt.length;Xt++){var ae=Qt[Xt],Pe=Qt[Xt+1];if(ae.type===20){var ce=Pe&&Ui(Pe)?Pe.number:1;wt.push({counter:ae.value,increment:ce})}}return wt}},bh={name:"counter-reset",initialValue:"none",prefix:!0,type:1,parse:function(vt,mt){if(mt.length===0)return[];for(var St=[],wt=mt.filter(Go),Qt=0;Qt<wt.length;Qt++){var Xt=wt[Qt],ae=wt[Qt+1];if(So(Xt)&&Xt.value!=="none"){var Pe=ae&&Ui(ae)?ae.number:0;St.push({counter:Xt.value,reset:Pe})}}return St}},Cf={name:"duration",initialValue:"0s",prefix:!1,type:1,parse:function(vt,mt){return mt.filter(wo).map(function(St){return Bu.parse(vt,St)})}},Th={name:"quotes",initialValue:"none",prefix:!0,type:1,parse:function(vt,mt){if(mt.length===0)return null;var St=mt[0];if(St.type===20&&St.value==="none")return null;var wt=[],Qt=mt.filter(ea);if(Qt.length%2!==0)return null;for(var Xt=0;Xt<Qt.length;Xt+=2){var ae=Qt[Xt].value,Pe=Qt[Xt+1].value;wt.push({open:ae,close:Pe})}return wt}},Ih=function(vt,mt,St){if(!vt)return"";var wt=vt[Math.min(mt,vt.length-1)];return wt?St?wt.open:wt.close:""},Ic={name:"box-shadow",initialValue:"none",type:1,prefix:!1,parse:function(vt,mt){return mt.length===1&&Bs(mt[0],"none")?[]:bs(mt).map(function(St){for(var wt={color:255,offsetX:Ts,offsetY:Ts,blur:Ts,spread:Ts,inset:!1},Qt=0,Xt=0;Xt<St.length;Xt++){var ae=St[Xt];Bs(ae,"inset")?wt.inset=!0:Ws(ae)?(Qt===0?wt.offsetX=ae:Qt===1?wt.offsetY=ae:Qt===2?wt.blur=ae:wt.spread=ae,Qt++):wt.color=ll.parse(vt,ae)}return wt})}},hd={name:"paint-order",initialValue:"normal",prefix:!1,type:1,parse:function(vt,mt){var St=[0,1,2],wt=[];return mt.filter(So).forEach(function(Qt){switch(Qt.value){case"stroke":wt.push(1);break;case"fill":wt.push(0);break;case"markers":wt.push(2);break}}),St.forEach(function(Qt){wt.indexOf(Qt)===-1&&wt.push(Qt)}),wt}},Nc={name:"-webkit-text-stroke-color",initialValue:"currentcolor",prefix:!1,type:3,format:"color"},Nh={name:"-webkit-text-stroke-width",initialValue:"0",type:0,prefix:!1,parse:function(vt,mt){return wo(mt)?mt.number:0}},Cu=function(){function vt(mt,St){var wt,Qt;this.animationDuration=dr(mt,Cf,St.animationDuration),this.backgroundClip=dr(mt,Ei,St.backgroundClip),this.backgroundColor=dr(mt,Rs,St.backgroundColor),this.backgroundImage=dr(mt,ts,St.backgroundImage),this.backgroundOrigin=dr(mt,ps,St.backgroundOrigin),this.backgroundPosition=dr(mt,xo,St.backgroundPosition),this.backgroundRepeat=dr(mt,eh,St.backgroundRepeat),this.backgroundSize=dr(mt,lo,St.backgroundSize),this.borderTopColor=dr(mt,Ec,St.borderTopColor),this.borderRightColor=dr(mt,sd,St.borderRightColor),this.borderBottomColor=dr(mt,vf,St.borderBottomColor),this.borderLeftColor=dr(mt,_A,St.borderLeftColor),this.borderTopLeftRadius=dr(mt,Bo,St.borderTopLeftRadius),this.borderTopRightRadius=dr(mt,FA,St.borderTopRightRadius),this.borderBottomRightRadius=dr(mt,yf,St.borderBottomRightRadius),this.borderBottomLeftRadius=dr(mt,ih,St.borderBottomLeftRadius),this.borderTopStyle=dr(mt,WA,St.borderTopStyle),this.borderRightStyle=dr(mt,Ql,St.borderRightStyle),this.borderBottomStyle=dr(mt,du,St.borderBottomStyle),this.borderLeftStyle=dr(mt,tA,St.borderLeftStyle),this.borderTopWidth=dr(mt,wf,St.borderTopWidth),this.borderRightWidth=dr(mt,ad,St.borderRightWidth),this.borderBottomWidth=dr(mt,ld,St.borderBottomWidth),this.borderLeftWidth=dr(mt,rg,St.borderLeftWidth),this.boxShadow=dr(mt,Ic,St.boxShadow),this.color=dr(mt,gu,St.color),this.direction=dr(mt,pu,St.direction),this.display=dr(mt,Jg,St.display),this.float=dr(mt,$g,St.cssFloat),this.fontFamily=dr(mt,$r,St.fontFamily),this.fontSize=dr(mt,bc,St.fontSize),this.fontStyle=dr(mt,rA,St.fontStyle),this.fontVariant=dr(mt,Bf,St.fontVariant),this.fontWeight=dr(mt,ud,St.fontWeight),this.letterSpacing=dr(mt,og,St.letterSpacing),this.lineBreak=dr(mt,mu,St.lineBreak),this.lineHeight=dr(mt,Io,St.lineHeight),this.listStyleImage=dr(mt,oa,St.listStyleImage),this.listStylePosition=dr(mt,sa,St.listStylePosition),this.listStyleType=dr(mt,vu,St.listStyleType),this.marginTop=dr(mt,rh,St.marginTop),this.marginRight=dr(mt,sg,St.marginRight),this.marginBottom=dr(mt,ag,St.marginBottom),this.marginLeft=dr(mt,Xa,St.marginLeft),this.opacity=dr(mt,Mc,St.opacity);var Xt=dr(mt,Sf,St.overflow);this.overflowX=Xt[0],this.overflowY=Xt[Xt.length>1?1:0],this.overflowWrap=dr(mt,Ko,St.overflowWrap),this.paddingTop=dr(mt,Ad,St.paddingTop),this.paddingRight=dr(mt,yu,St.paddingRight),this.paddingBottom=dr(mt,wu,St.paddingBottom),this.paddingLeft=dr(mt,xf,St.paddingLeft),this.paintOrder=dr(mt,hd,St.paintOrder),this.position=dr(mt,aa,St.position),this.textAlign=dr(mt,zs,St.textAlign),this.textDecorationColor=dr(mt,kh,(wt=St.textDecorationColor)!==null&&wt!==void 0?wt:St.color),this.textDecorationLine=dr(mt,kc,(Qt=St.textDecorationLine)!==null&&Qt!==void 0?Qt:St.textDecoration),this.textShadow=dr(mt,oh,St.textShadow),this.textTransform=dr(mt,Bl,St.textTransform),this.transform=dr(mt,Su,St.transform),this.transformOrigin=dr(mt,Ul,St.transformOrigin),this.visibility=dr(mt,jo,St.visibility),this.webkitTextStrokeColor=dr(mt,Nc,St.webkitTextStrokeColor),this.webkitTextStrokeWidth=dr(mt,Nh,St.webkitTextStrokeWidth),this.wordBreak=dr(mt,YA,St.wordBreak),this.zIndex=dr(mt,xu,St.zIndex)}return vt.prototype.isVisible=function(){return this.display>0&&this.opacity>0&&this.visibility===0},vt.prototype.isTransparent=function(){return vs(this.backgroundColor)},vt.prototype.isTransformed=function(){return this.transform!==null},vt.prototype.isPositioned=function(){return this.position!==0},vt.prototype.isPositionedWithZIndex=function(){return this.isPositioned()&&!this.zIndex.auto},vt.prototype.isFloating=function(){return this.float!==0},vt.prototype.isInlineLevel=function(){return Zs(this.display,4)||Zs(this.display,33554432)||Zs(this.display,268435456)||Zs(this.display,536870912)||Zs(this.display,67108864)||Zs(this.display,134217728)},vt}(),Ha=function(){function vt(mt,St){this.content=dr(mt,Tc,St.content),this.quotes=dr(mt,Th,St.quotes)}return vt}(),oA=function(){function vt(mt,St){this.counterIncrement=dr(mt,tp,St.counterIncrement),this.counterReset=dr(mt,bh,St.counterReset)}return vt}(),dr=function(vt,mt,St){var wt=new Fr,Qt=St!==null&&typeof St!="undefined"?St.toString():mt.initialValue;wt.write(Qt);var Xt=new Dr(wt.read());switch(mt.type){case 2:var ae=Xt.parseComponentValue();return mt.parse(vt,So(ae)?ae.value:mt.initialValue);case 0:return mt.parse(vt,Xt.parseComponentValue());case 1:return mt.parse(vt,Xt.parseComponentValues());case 4:return Xt.parseComponentValue();case 3:switch(mt.format){case"angle":return is.parse(vt,Xt.parseComponentValue());case"color":return ll.parse(vt,Xt.parseComponentValue());case"image":return da.parse(vt,Xt.parseComponentValue());case"length":var Pe=Xt.parseComponentValue();return Ws(Pe)?Pe:Ts;case"length-percentage":var ce=Xt.parseComponentValue();return ns(ce)?ce:Ts;case"time":return Bu.parse(vt,Xt.parseComponentValue())}break}},XA="data-html2canvas-debug",Pf=function(vt){var mt=vt.getAttribute(XA);switch(mt){case"all":return 1;case"clone":return 2;case"parse":return 3;case"render":return 4;default:return 0}},Qh=function(vt,mt){var St=Pf(vt);return St===1||mt===St},sA=function(){function vt(mt,St){if(this.context=mt,this.textNodes=[],this.elements=[],this.flags=0,Qh(St,3))debugger;this.styles=new Cu(mt,window.getComputedStyle(St,null)),Xh(St)&&(this.styles.animationDuration.some(function(wt){return wt>0})&&(St.style.animationDuration="0s"),this.styles.transform!==null&&(St.style.transform="none")),this.bounds=we(this.context,St),Qh(St,4)&&(this.flags|=16)}return vt}(),Pu="AAAAAAAAAAAAEA4AGBkAAFAaAAACAAAAAAAIABAAGAAwADgACAAQAAgAEAAIABAACAAQAAgAEAAIABAACAAQAAgAEAAIABAAQABIAEQATAAIABAACAAQAAgAEAAIABAAVABcAAgAEAAIABAACAAQAGAAaABwAHgAgACIAI4AlgAIABAAmwCjAKgAsAC2AL4AvQDFAMoA0gBPAVYBWgEIAAgACACMANoAYgFkAWwBdAF8AX0BhQGNAZUBlgGeAaMBlQGWAasBswF8AbsBwwF0AcsBYwHTAQgA2wG/AOMBdAF8AekB8QF0AfkB+wHiAHQBfAEIAAMC5gQIAAsCEgIIAAgAFgIeAggAIgIpAggAMQI5AkACygEIAAgASAJQAlgCYAIIAAgACAAKBQoFCgUTBRMFGQUrBSsFCAAIAAgACAAIAAgACAAIAAgACABdAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACABoAmgCrwGvAQgAbgJ2AggAHgEIAAgACADnAXsCCAAIAAgAgwIIAAgACAAIAAgACACKAggAkQKZAggAPADJAAgAoQKkAqwCsgK6AsICCADJAggA0AIIAAgACAAIANYC3gIIAAgACAAIAAgACABAAOYCCAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAkASoB+QIEAAgACAA8AEMCCABCBQgACABJBVAFCAAIAAgACAAIAAgACAAIAAgACABTBVoFCAAIAFoFCABfBWUFCAAIAAgACAAIAAgAbQUIAAgACAAIAAgACABzBXsFfQWFBYoFigWKBZEFigWKBYoFmAWfBaYFrgWxBbkFCAAIAAgACAAIAAgACAAIAAgACAAIAMEFCAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAMgFCADQBQgACAAIAAgACAAIAAgACAAIAAgACAAIAO4CCAAIAAgAiQAIAAgACABAAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAD0AggACAD8AggACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIANYFCAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAMDvwAIAAgAJAIIAAgACAAIAAgACAAIAAgACwMTAwgACAB9BOsEGwMjAwgAKwMyAwsFYgE3A/MEPwMIAEUDTQNRAwgAWQOsAGEDCAAIAAgACAAIAAgACABpAzQFNQU2BTcFOAU5BToFNAU1BTYFNwU4BTkFOgU0BTUFNgU3BTgFOQU6BTQFNQU2BTcFOAU5BToFNAU1BTYFNwU4BTkFOgU0BTUFNgU3BTgFOQU6BTQFNQU2BTcFOAU5BToFNAU1BTYFNwU4BTkFOgU0BTUFNgU3BTgFOQU6BTQFNQU2BTcFOAU5BToFNAU1BTYFNwU4BTkFOgU0BTUFNgU3BTgFOQU6BTQFNQU2BTcFOAU5BToFNAU1BTYFNwU4BTkFOgU0BTUFNgU3BTgFOQU6BTQFNQU2BTcFOAU5BToFNAU1BTYFNwU4BTkFOgU0BTUFNgU3BTgFOQU6BTQFNQU2BTcFOAU5BToFNAU1BTYFNwU4BTkFOgU0BTUFNgU3BTgFOQU6BTQFNQU2BTcFOAU5BToFNAU1BTYFNwU4BTkFOgU0BTUFNgU3BTgFOQU6BTQFNQU2BTcFOAU5BToFNAU1BTYFNwU4BTkFOgU0BTUFNgU3BTgFOQU6BTQFNQU2BTcFOAU5BToFNAU1BTYFNwU4BTkFOgU0BTUFNgU3BTgFOQU6BTQFNQU2BTcFOAU5BToFNAU1BTYFNwU4BTkFOgU0BTUFNgU3BTgFOQU6BTQFNQU2BTcFOAU5BToFNAU1BTYFNwU4BTkFOgU0BTUFNgU3BTgFOQU6BTQFNQU2BTcFOAU5BToFNAU1BTYFNwU4BTkFOgU0BTUFNgU3BTgFOQU6BTQFNQU2BTcFOAU5BToFNAU1BTYFNwU4BTkFOgU0BTUFNgU3BTgFOQU6BTQFNQU2BTcFOAU5BToFNAU1BTYFNwU4BTkFOgU0BTUFNgU3BTgFOQU6BTQFNQU2BTcFOAU5BToFNAU1BTYFNwU4BTkFOgU0BTUFNgU3BTgFOQU6BTQFNQU2BTcFOAU5BToFNAU1BTYFNwU4BTkFIQUoBSwFCAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACABtAwgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACABMAEwACAAIAAgACAAIABgACAAIAAgACAC/AAgACAAyAQgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACACAAIAAwAAgACAAIAAgACAAIAAgACAAIAAAARABIAAgACAAIABQASAAIAAgAIABwAEAAjgCIABsAqAC2AL0AigDQAtwC+IJIQqVAZUBWQqVAZUBlQGVAZUBlQGrC5UBlQGVAZUBlQGVAZUBlQGVAXsKlQGVAbAK6wsrDGUMpQzlDJUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAfAKAAuZA64AtwCJALoC6ADwAAgAuACgA/oEpgO6AqsD+AAIAAgAswMIAAgACAAIAIkAuwP5AfsBwwPLAwgACAAIAAgACADRA9kDCAAIAOED6QMIAAgACAAIAAgACADuA/YDCAAIAP4DyQAIAAgABgQIAAgAXQAOBAgACAAIAAgACAAIABMECAAIAAgACAAIAAgACAD8AAQBCAAIAAgAGgQiBCoECAExBAgAEAEIAAgACAAIAAgACAAIAAgACAAIAAgACAA4BAgACABABEYECAAIAAgATAQYAQgAVAQIAAgACAAIAAgACAAIAAgACAAIAFoECAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgAOQEIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAB+BAcACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAEABhgSMBAgACAAIAAgAlAQIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAwAEAAQABAADAAMAAwADAAQABAAEAAQABAAEAAQABHATAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgAdQMIAAgACAAIAAgACAAIAMkACAAIAAgAfQMIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACACFA4kDCAAIAAgACAAIAOcBCAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAIcDCAAIAAgACAAIAAgACAAIAAgACAAIAJEDCAAIAAgACADFAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACABgBAgAZgQIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgAbAQCBXIECAAIAHkECAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACABAAJwEQACjBKoEsgQIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAC6BMIECAAIAAgACAAIAAgACABmBAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgAxwQIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAGYECAAIAAgAzgQIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgAigWKBYoFigWKBYoFigWKBd0FXwUIAOIF6gXxBYoF3gT5BQAGCAaKBYoFigWKBYoFigWKBYoFigWKBYoFigXWBIoFigWKBYoFigWKBYoFigWKBYsFEAaKBYoFigWKBYoFigWKBRQGCACKBYoFigWKBQgACAAIANEECAAIABgGigUgBggAJgYIAC4GMwaKBYoF0wQ3Bj4GigWKBYoFigWKBYoFigWKBYoFigWKBYoFigUIAAgACAAIAAgACAAIAAgAigWKBYoFigWKBYoFigWKBYoFigWKBYoFigWKBYoFigWKBYoFigWKBYoFigWKBYoFigWKBYoFigWKBYoFigWLBf///////wQABAAEAAQABAAEAAQABAAEAAQAAwAEAAQAAgAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAAAAAAAAAAAAAAAAAAAAAAAAAOAAAAAAAAAAQADgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAFAAUABQAFAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAAAAUAAAAFAAUAAAAFAAUAAAAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABAAEAAQABAAEAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAFAAUABQAFAAUABQAFAAUABQAAAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAFAAUABQAFAAUAAQAAAAUABQAFAAUABQAFAAAAAAAFAAUAAAAFAAUABQAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAEAAAAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAUABQAFAAUABQAFAAUABQAFAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAUABQAFAAUABQAFAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAFAAAAAAAFAAUAAQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABwAFAAUABQAFAAAABwAHAAcAAAAHAAcABwAFAAEAAAAAAAAAAAAAAAAAAAAAAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAHAAcABwAFAAUABQAFAAcABwAFAAUAAAAAAAEAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAHAAAAAQABAAAAAAAAAAAAAAAFAAUABQAFAAAABwAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAHAAcABwAHAAcAAAAHAAcAAAAAAAUABQAHAAUAAQAHAAEABwAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAFAAUABQAFAAUABwABAAUABQAFAAUAAAAAAAAAAAAAAAEAAQABAAEAAQABAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABwAFAAUAAAAAAAAAAAAAAAAABQAFAAUABQAFAAUAAQAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAFAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAQABQANAAQABAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAQABAAEAAQABAAEAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAOAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABAAEAAQABAAEAAQABAAEAAQABAAEAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAEAAQABAAEAAQABAAEAAQABAAAAAAAAAAAAAAAAAAAAAAABQAHAAUABQAFAAAAAAAAAAcABQAFAAUABQAFAAQABAAEAAQABAAEAAQABAAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAFAAUAAAAFAAUABQAFAAUAAAAFAAUABQAAAAUABQAFAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAUABQAAAAAAAAAAAAUABQAFAAcAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAHAAUAAAAHAAcABwAFAAUABQAFAAUABQAFAAUABwAHAAcABwAFAAcABwAAAAUABQAFAAUABQAFAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABwAHAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAAAAUABwAHAAUABQAFAAUAAAAAAAcABwAAAAAABwAHAAUAAAAAAAAAAAAAAAAAAAAAAAAABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAAAAAABQAFAAcAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAAABwAHAAcABQAFAAAAAAAAAAAABQAFAAAAAAAFAAUABQAAAAAAAAAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAAAAAAAAAFAAAAAAAAAAAAAAAAAAAAAAAAAAAABwAFAAUABQAFAAUAAAAFAAUABwAAAAcABwAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAUABQAFAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUAAAAFAAUABwAFAAUABQAFAAAAAAAHAAcAAAAAAAcABwAFAAAAAAAAAAAAAAAAAAAABQAFAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAcABwAAAAAAAAAHAAcABwAAAAcABwAHAAUAAAAAAAAAAAAAAAAAAAAAAAAABQAAAAAAAAAAAAAAAAAAAAAABQAHAAcABwAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABwAHAAcABwAAAAUABQAFAAAABQAFAAUABQAAAAAAAAAAAAAAAAAAAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAAAAcABQAHAAcABQAHAAcAAAAFAAcABwAAAAcABwAFAAUAAAAAAAAAAAAAAAAAAAAFAAUAAAAAAAAAAAAAAAAAAAAAAAAABQAFAAcABwAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAAAAUABwAAAAAAAAAAAAAAAAAAAAAAAAAAAAUAAAAAAAAAAAAFAAcABwAFAAUABQAAAAUAAAAHAAcABwAHAAcABwAHAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUAAAAHAAUABQAFAAUABQAFAAUAAAAAAAAAAAAAAAAAAAAAAAUABQAFAAUABQAFAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAAABwAFAAUABQAFAAUABQAFAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAFAAUABQAFAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAAAAUAAAAFAAAAAAAAAAAABwAHAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABwAFAAUABQAFAAUAAAAFAAUAAAAAAAAAAAAAAAUABQAFAAUABQAFAAUABQAFAAUABQAAAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAFAAUABwAFAAUABQAFAAUABQAAAAUABQAHAAcABQAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAHAAcABQAFAAAAAAAAAAAABQAFAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAUABQAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAAAAcABQAFAAAAAAAAAAAAAAAAAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAFAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAHAAUABQAFAAUABQAFAAUABwAHAAcABwAHAAcABwAHAAUABwAHAAUABQAFAAUABQAFAAUABQAFAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAFAAUABwAHAAcABwAFAAUABwAHAAcAAAAAAAAAAAAHAAcABQAHAAcABwAHAAcABwAFAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAFAAcABwAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAcABQAHAAUABQAFAAUABQAFAAUAAAAFAAAABQAAAAAABQAFAAUABQAFAAUABQAFAAcABwAHAAcABwAHAAUABQAFAAUABQAFAAUABQAFAAUAAAAAAAUABQAFAAUABQAHAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAFAAUABQAFAAUABwAFAAcABwAHAAcABwAFAAcABwAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAUABQAFAAUABQAFAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAUABwAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAHAAUABQAFAAUABwAHAAUABQAHAAUABQAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAcABQAFAAcABwAHAAUABwAFAAUABQAHAAcAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABwAHAAcABwAHAAcABwAHAAUABQAFAAUABQAFAAUABQAHAAcABQAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAFAAUAAAAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAcABQAFAAUABQAFAAUABQAAAAAAAAAAAAUAAAAAAAAAAAAAAAAABQAAAAAABwAFAAUAAAAAAAAAAAAAAAAABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAAABQAFAAUABQAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAFAAUABQAFAAUADgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAOAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAFAAUAAAAFAAUABQAFAAUABQAFAAUABQAFAAAAAAAAAAAABQAAAAAAAAAFAAAAAAAAAAAABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABwAHAAUABQAHAAAAAAAAAAAABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAcABwAHAAcABQAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUAAAAAAAAAAAAAAAAABQAFAAUABQAFAAUABQAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAFAAUABQAFAAUABQAFAAUABQAHAAcAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAcABwAFAAUABQAFAAcABwAFAAUABwAHAAAAAAAAAAAAAAAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAFAAUABQAFAAcABwAFAAUABwAHAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAAAAAAAAAAAAAAAAAAAAAAFAAcAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUAAAAFAAUABQAAAAAABQAFAAAAAAAAAAAAAAAFAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAcABQAFAAcABwAAAAAAAAAAAAAABwAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAcABwAFAAcABwAFAAcABwAAAAcABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAFAAUABQAAAAAAAAAAAAAAAAAFAAUABQAAAAUABQAAAAAAAAAAAAAABQAFAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAUABQAAAAAAAAAAAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAcABQAHAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAUABQAFAAUABwAFAAUABQAFAAUABQAFAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABwAHAAcABQAFAAUABQAFAAUABQAFAAUABwAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAHAAcABwAFAAUABQAHAAcABQAHAAUABQAAAAAAAAAAAAAAAAAFAAAABwAHAAcABQAFAAUABQAFAAUABQAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABwAHAAcABwAAAAAABwAHAAAAAAAHAAcABwAAAAAAAAAAAAAAAAAAAAAAAAAFAAAAAAAAAAAAAAAAAAAAAAAAAAAABwAHAAAAAAAFAAUABQAFAAUABQAFAAAAAAAAAAUABQAFAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAHAAcABwAFAAUABQAFAAUABQAFAAUABwAHAAUABQAFAAcABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAHAAcABQAFAAUABQAFAAUABwAFAAcABwAFAAcABQAFAAcABQAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAHAAcABQAFAAUABQAAAAAABwAHAAcABwAFAAUABwAFAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAcABwAHAAUABQAFAAUABQAFAAUABQAHAAcABQAHAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABwAFAAcABwAFAAUABQAFAAUABQAHAAUAAAAAAAAAAAAAAAAAAAAAAAcABwAFAAUABQAFAAcABQAFAAUABQAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAHAAcABwAFAAUABQAFAAUABQAFAAUABQAHAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAHAAcABwAFAAUABQAFAAAAAAAFAAUABwAHAAcABwAFAAAAAAAAAAcAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAUABQAFAAUABQAFAAUABQAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUAAAAAAAAAAAAAAAAAAAAAAAAABQAFAAUABQAFAAUABwAHAAUABQAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAcABQAFAAUABQAFAAUABQAAAAUABQAFAAUABQAFAAcABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAAAAHAAUABQAFAAUABQAFAAUABwAFAAUABwAFAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAFAAUABQAFAAUAAAAAAAAABQAAAAUABQAAAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAHAAcABwAHAAcAAAAFAAUAAAAHAAcABQAHAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAUABwAHAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAUABQAFAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAUABQAFAAUABQAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAAAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAAAAAAAAAAAAAAAAAAABQAFAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAcABwAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAAAAUABQAFAAAAAAAFAAUABQAFAAUABQAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAFAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAFAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAAAAAAAAAAABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAAAAAAAAAAAAAAAAAAAAAAFAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAFAAUABQAAAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAFAAUABQAFAAUABQAAAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAAAAAABQAFAAUABQAFAAUABQAAAAUABQAAAAUABQAFAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAUABQAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAFAAUABQAFAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAFAAUABQAFAAUADgAOAA4ADgAOAA4ADwAPAA8ADwAPAA8ADwAPAA8ADwAPAA8ADwAPAA8ADwAPAA8ADwAPAA8ADwAPAA8ADwAPAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAcABwAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABwAHAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAAAAAAAAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAKAAoACgAKAAoACgAKAAoACgAKAAoACgAKAAoACgAKAAoACgAKAAoACgAKAAoACgAMAAwADAAMAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkAAAAAAAAAAAAKAAoACgAKAAoACgAKAAoACgAKAAoACgAKAAoACgAKAAoACgAKAAoACgAKAAoACgAKAAoACgAKAAoACgAKAAoACgAAAAAAAAAAAAsADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwACwAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAAAAAADgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA4AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAOAA4ADgAOAA4ADgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAADgAOAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA4ADgAAAAAAAAAAAAAAAAAAAAAADgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAADgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAADgAOAA4ADgAOAA4ADgAOAA4ADgAOAAAAAAAAAAAADgAOAA4AAAAAAAAAAAAAAAAAAAAOAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAADgAOAAAAAAAAAAAAAAAAAAAAAAAAAAAADgAAAAAAAAAAAAAAAAAAAAAAAAAOAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAADgAOAA4ADgAAAA4ADgAOAA4ADgAOAAAADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4AAAAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAAAAAAAAAAAAAAAAAAAAAAAAAAAADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4AAAAAAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAAAA4AAAAOAAAAAAAAAAAAAAAAAA4AAAAAAAAAAAAAAAAADgAAAAAAAAAAAAAAAAAAAAAAAAAAAA4ADgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAADgAAAAAADgAAAAAAAAAAAA4AAAAOAAAAAAAAAAAADgAOAA4AAAAOAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAOAA4ADgAOAA4AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAOAA4ADgAAAAAAAAAAAAAAAAAAAAAAAAAOAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAOAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAOAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAOAA4AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA4ADgAOAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAADgAOAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAADgAAAAAAAAAAAA4AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAOAAAADgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAOAA4ADgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA4ADgAOAA4ADgAOAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA4ADgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAADgAAAAAADgAOAA4ADgAOAA4ADgAOAA4ADgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAAAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAAAAAAAAAAAAAAAAAAAAAAAAAAAADgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA4AAAAAAA4ADgAOAA4ADgAOAA4ADgAOAAAADgAOAA4ADgAAAAAAAAAAAAAAAAAAAAAAAAAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4AAAAAAAAAAAAAAAAADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAOAA4ADgAOAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAADgAOAA4ADgAOAA4ADgAOAAAAAAAAAAAAAAAAAAAAAAAAAAAADgAOAA4ADgAOAA4AAAAAAAAAAAAAAAAAAAAAAA4ADgAOAA4ADgAOAA4ADgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4AAAAOAA4ADgAOAA4ADgAAAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4AAAAAAAAAAAA=",Fu="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",Uh=typeof Uint8Array=="undefined"?[]:new Uint8Array(256),sh=0;sh<Fu.length;sh++)Uh[Fu.charCodeAt(sh)]=sh;for(var Fa=function(vt){var mt=vt.length*.75,St=vt.length,wt,Qt=0,Xt,ae,Pe,ce;vt[vt.length-1]==="="&&(mt--,vt[vt.length-2]==="="&&mt--);var Ye=typeof ArrayBuffer!="undefined"&&typeof Uint8Array!="undefined"&&typeof Uint8Array.prototype.slice!="undefined"?new ArrayBuffer(mt):new Array(mt),$e=Array.isArray(Ye)?Ye:new Uint8Array(Ye);for(wt=0;wt<St;wt+=4)Xt=Uh[vt.charCodeAt(wt)],ae=Uh[vt.charCodeAt(wt+1)],Pe=Uh[vt.charCodeAt(wt+2)],ce=Uh[vt.charCodeAt(wt+3)],$e[Qt++]=Xt<<2|ae>>4,$e[Qt++]=(ae&15)<<4|Pe>>2,$e[Qt++]=(Pe&3)<<6|ce&63;return Ye},ah=function(vt){for(var mt=vt.length,St=[],wt=0;wt<mt;wt+=2)St.push(vt[wt+1]<<8|vt[wt]);return St},cd=function(vt){for(var mt=vt.length,St=[],wt=0;wt<mt;wt+=4)St.push(vt[wt+3]<<24|vt[wt+2]<<16|vt[wt+1]<<8|vt[wt]);return St},aA=5,lh=11,lA=2,Qc=lh-aA,Ff=65536>>aA,Qs=1<<aA,Ah=Qs-1,Lu=1024>>aA,uh=Ff+Lu,Uc=uh,fd=32,Dh=Uc+fd,lg=65536>>lh,hh=1<<Qc,Dl=hh-1,dd=function(vt,mt,St){return vt.slice?vt.slice(mt,St):new Uint16Array(Array.prototype.slice.call(vt,mt,St))},gd=function(vt,mt,St){return vt.slice?vt.slice(mt,St):new Uint32Array(Array.prototype.slice.call(vt,mt,St))},ch=function(vt,mt){var St=Fa(vt),wt=Array.isArray(St)?cd(St):new Uint32Array(St),Qt=Array.isArray(St)?ah(St):new Uint16Array(St),Xt=24,ae=dd(Qt,Xt/2,wt[4]/2),Pe=wt[5]===2?dd(Qt,(Xt+wt[4])/2):gd(wt,Math.ceil((Xt+wt[4])/4));return new Oh(wt[0],wt[1],wt[2],wt[3],ae,Pe)},Oh=function(){function vt(mt,St,wt,Qt,Xt,ae){this.initialValue=mt,this.errorValue=St,this.highStart=wt,this.highValueIndex=Qt,this.index=Xt,this.data=ae}return vt.prototype.get=function(mt){var St;if(mt>=0){if(mt<55296||mt>56319&&mt<=65535)return St=this.index[mt>>aA],St=(St<<lA)+(mt&Ah),this.data[St];if(mt<=65535)return St=this.index[Ff+(mt-55296>>aA)],St=(St<<lA)+(mt&Ah),this.data[St];if(mt<this.highStart)return St=Dh-lg+(mt>>lh),St=this.index[St],St+=mt>>aA&Dl,St=this.index[St],St=(St<<lA)+(mt&Ah),this.data[St];if(mt<=1114111)return this.data[this.highValueIndex]}return this.errorValue},vt}(),ms="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",ZA=typeof Uint8Array=="undefined"?[]:new Uint8Array(256),Dc=0;Dc<ms.length;Dc++)ZA[ms.charCodeAt(Dc)]=Dc;var Lf=1,Ef=2,pe=3,Eu=4,AA=5,Ag=7,Mf=8,kf=9,Oc=10,ug=11,Aa=12,Hh=13,bf=14,Tf=15,hg=function(vt){for(var mt=[],St=0,wt=vt.length;St<wt;){var Qt=vt.charCodeAt(St++);if(Qt>=55296&&Qt<=56319&&St<wt){var Xt=vt.charCodeAt(St++);(Xt&64512)===56320?mt.push(((Qt&1023)<<10)+(Xt&1023)+65536):(mt.push(Qt),St--)}else mt.push(Qt)}return mt},cg=function(){for(var vt=[],mt=0;mt<arguments.length;mt++)vt[mt]=arguments[mt];if(String.fromCodePoint)return String.fromCodePoint.apply(String,vt);var St=vt.length;if(!St)return"";for(var wt=[],Qt=-1,Xt="";++Qt<St;){var ae=vt[Qt];ae<=65535?wt.push(ae):(ae-=65536,wt.push((ae>>10)+55296,ae%1024+56320)),(Qt+1===St||wt.length>16384)&&(Xt+=String.fromCharCode.apply(String,wt),wt.length=0)}return Xt},fg=ch(Pu),Cl="\xD7",Ja="\xF7",Rh=function(vt){return fg.get(vt)},pd=function(vt,mt,St){var wt=St-2,Qt=mt[wt],Xt=mt[St-1],ae=mt[St];if(Xt===Ef&&ae===pe)return Cl;if(Xt===Ef||Xt===pe||Xt===Eu||ae===Ef||ae===pe||ae===Eu)return Ja;if(Xt===Mf&&[Mf,kf,ug,Aa].indexOf(ae)!==-1||(Xt===ug||Xt===kf)&&(ae===kf||ae===Oc)||(Xt===Aa||Xt===Oc)&&ae===Oc||ae===Hh||ae===AA||ae===Ag||Xt===Lf)return Cl;if(Xt===Hh&&ae===bf){for(;Qt===AA;)Qt=mt[--wt];if(Qt===bf)return Cl}if(Xt===Tf&&ae===Tf){for(var Pe=0;Qt===Tf;)Pe++,Qt=mt[--wt];if(Pe%2===0)return Cl}return Ja},LA=function(vt){var mt=hg(vt),St=mt.length,wt=0,Qt=0,Xt=mt.map(Rh);return{next:function(){if(wt>=St)return{done:!0,value:null};for(var ae=Cl;wt<St&&(ae=pd(mt,Xt,++wt))===Cl;);if(ae!==Cl||wt===St){var Pe=cg.apply(null,mt.slice(Qt,wt));return Qt=wt,{value:Pe,done:!1}}return{done:!0,value:null}}}},Hc=function(vt){for(var mt=LA(vt),St=[],wt;!(wt=mt.next()).done;)wt.value&&St.push(wt.value.slice());return St},If=function(vt){var mt=123;if(vt.createRange){var St=vt.createRange();if(St.getBoundingClientRect){var wt=vt.createElement("boundtest");wt.style.height=mt+"px",wt.style.display="block",vt.body.appendChild(wt),St.selectNode(wt);var Qt=St.getBoundingClientRect(),Xt=Math.round(Qt.height);if(vt.body.removeChild(wt),Xt===mt)return!0}}return!1},Rc=function(vt){var mt=vt.createElement("boundtest");mt.style.width="50px",mt.style.display="block",mt.style.fontSize="12px",mt.style.letterSpacing="0px",mt.style.wordSpacing="0px",vt.body.appendChild(mt);var St=vt.createRange();mt.innerHTML=typeof"".repeat=="function"?"&#128104;".repeat(10):"";var wt=mt.firstChild,Qt=Qe(wt.data).map(function(ce){return ge(ce)}),Xt=0,ae={},Pe=Qt.every(function(ce,Ye){St.setStart(wt,Xt),St.setEnd(wt,Xt+ce.length);var $e=St.getBoundingClientRect();Xt+=ce.length;var vn=$e.x>ae.x||$e.y>ae.y;return ae=$e,Ye===0?!0:vn});return vt.body.removeChild(mt),Pe},fl=function(){return typeof new Image().crossOrigin!="undefined"},md=function(){return typeof new XMLHttpRequest().responseType=="string"},vd=function(vt){var mt=new Image,St=vt.createElement("canvas"),wt=St.getContext("2d");if(!wt)return!1;mt.src="data:image/svg+xml,<svg xmlns='http://www.w3.org/2000/svg'></svg>";try{wt.drawImage(mt,0,0),St.toDataURL()}catch(Qt){return!1}return!0},Pl=function(vt){return vt[0]===0&&vt[1]===255&&vt[2]===0&&vt[3]===255},Gh=function(vt){var mt=vt.createElement("canvas"),St=100;mt.width=St,mt.height=St;var wt=mt.getContext("2d");if(!wt)return Promise.reject(!1);wt.fillStyle="rgb(0, 255, 0)",wt.fillRect(0,0,St,St);var Qt=new Image,Xt=mt.toDataURL();Qt.src=Xt;var ae=Gc(St,St,0,0,Qt);return wt.fillStyle="red",wt.fillRect(0,0,St,St),yd(ae).then(function(Pe){wt.drawImage(Pe,0,0);var ce=wt.getImageData(0,0,St,St).data;wt.fillStyle="red",wt.fillRect(0,0,St,St);var Ye=vt.createElement("div");return Ye.style.backgroundImage="url("+Xt+")",Ye.style.height=St+"px",Pl(ce)?yd(Gc(St,St,0,0,Ye)):Promise.reject(!1)}).then(function(Pe){return wt.drawImage(Pe,0,0),Pl(wt.getImageData(0,0,St,St).data)}).catch(function(){return!1})},Gc=function(vt,mt,St,wt,Qt){var Xt="http://www.w3.org/2000/svg",ae=document.createElementNS(Xt,"svg"),Pe=document.createElementNS(Xt,"foreignObject");return ae.setAttributeNS(null,"width",vt.toString()),ae.setAttributeNS(null,"height",mt.toString()),Pe.setAttributeNS(null,"width","100%"),Pe.setAttributeNS(null,"height","100%"),Pe.setAttributeNS(null,"x",St.toString()),Pe.setAttributeNS(null,"y",wt.toString()),Pe.setAttributeNS(null,"externalResourcesRequired","true"),ae.appendChild(Pe),Pe.appendChild(Qt),ae},yd=function(vt){return new Promise(function(mt,St){var wt=new Image;wt.onload=function(){return mt(wt)},wt.onerror=St,wt.src="data:image/svg+xml;charset=utf-8,"+encodeURIComponent(new XMLSerializer().serializeToString(vt))})},Ks={get SUPPORT_RANGE_BOUNDS(){var vt=If(document);return Object.defineProperty(Ks,"SUPPORT_RANGE_BOUNDS",{value:vt}),vt},get SUPPORT_WORD_BREAKING(){var vt=Ks.SUPPORT_RANGE_BOUNDS&&Rc(document);return Object.defineProperty(Ks,"SUPPORT_WORD_BREAKING",{value:vt}),vt},get SUPPORT_SVG_DRAWING(){var vt=vd(document);return Object.defineProperty(Ks,"SUPPORT_SVG_DRAWING",{value:vt}),vt},get SUPPORT_FOREIGNOBJECT_DRAWING(){var vt=typeof Array.from=="function"&&typeof window.fetch=="function"?Gh(document):Promise.resolve(!1);return Object.defineProperty(Ks,"SUPPORT_FOREIGNOBJECT_DRAWING",{value:vt}),vt},get SUPPORT_CORS_IMAGES(){var vt=fl();return Object.defineProperty(Ks,"SUPPORT_CORS_IMAGES",{value:vt}),vt},get SUPPORT_RESPONSE_TYPE(){var vt=md();return Object.defineProperty(Ks,"SUPPORT_RESPONSE_TYPE",{value:vt}),vt},get SUPPORT_CORS_XHR(){var vt="withCredentials"in new XMLHttpRequest;return Object.defineProperty(Ks,"SUPPORT_CORS_XHR",{value:vt}),vt},get SUPPORT_NATIVE_TEXT_SEGMENTATION(){var vt=!!(typeof Intl!="undefined"&&Intl.Segmenter);return Object.defineProperty(Ks,"SUPPORT_NATIVE_TEXT_SEGMENTATION",{value:vt}),vt}},ga=function(){function vt(mt,St){this.text=mt,this.bounds=St}return vt}(),wd=function(vt,mt,St,wt){var Qt=jh(mt,St),Xt=[],ae=0;return Qt.forEach(function(Pe){if(St.textDecorationLine.length||Pe.trim().length>0)if(Ks.SUPPORT_RANGE_BOUNDS){var ce=zh(wt,ae,Pe.length).getClientRects();if(ce.length>1){var Ye=Kh(Pe),$e=0;Ye.forEach(function(ei){Xt.push(new ga(ei,Fe.fromDOMRectList(vt,zh(wt,$e+ae,ei.length).getClientRects()))),$e+=ei.length})}else Xt.push(new ga(Pe,Fe.fromDOMRectList(vt,ce)))}else{var vn=wt.splitText(Pe.length);Xt.push(new ga(Pe,Us(vt,wt))),wt=vn}else Ks.SUPPORT_RANGE_BOUNDS||(wt=wt.splitText(Pe.length));ae+=Pe.length}),Xt},Us=function(vt,mt){var St=mt.ownerDocument;if(St){var wt=St.createElement("html2canvaswrapper");wt.appendChild(mt.cloneNode(!0));var Qt=mt.parentNode;if(Qt){Qt.replaceChild(wt,mt);var Xt=we(vt,wt);return wt.firstChild&&Qt.replaceChild(wt.firstChild,wt),Xt}}return Fe.EMPTY},zh=function(vt,mt,St){var wt=vt.ownerDocument;if(!wt)throw new Error("Node has no owner document");var Qt=wt.createRange();return Qt.setStart(vt,mt),Qt.setEnd(vt,mt+St),Qt},Kh=function(vt){if(Ks.SUPPORT_NATIVE_TEXT_SEGMENTATION){var mt=new Intl.Segmenter(void 0,{granularity:"grapheme"});return Array.from(mt.segment(vt)).map(function(St){return St.segment})}return Hc(vt)},Mu=function(vt,mt){if(Ks.SUPPORT_NATIVE_TEXT_SEGMENTATION){var St=new Intl.Segmenter(void 0,{granularity:"word"});return Array.from(St.segment(vt)).map(function(wt){return wt.segment})}return Sd(vt,mt)},jh=function(vt,mt){return mt.letterSpacing!==0?Kh(vt):Mu(vt,mt)},Vh=[32,160,4961,65792,65793,4153,4241],Sd=function(vt,mt){for(var St=He(vt,{lineBreak:mt.lineBreak,wordBreak:mt.overflowWrap==="break-word"?"break-word":mt.wordBreak}),wt=[],Qt,Xt=function(){if(Qt.value){var ae=Qt.value.slice(),Pe=Qe(ae),ce="";Pe.forEach(function(Ye){Vh.indexOf(Ye)===-1?ce+=ge(Ye):(ce.length&&wt.push(ce),wt.push(ge(Ye)),ce="")}),ce.length&&wt.push(ce)}};!(Qt=St.next()).done;)Xt();return wt},_h=function(){function vt(mt,St,wt){this.text=xd(St.data,wt.textTransform),this.textBounds=wd(mt,this.text,wt,St)}return vt}(),xd=function(vt,mt){switch(mt){case 1:return vt.toLowerCase();case 3:return vt.replace(EA,fh);case 2:return vt.toUpperCase();default:return vt}},EA=/(^|\s|:|-|\(|\))([a-z])/g,fh=function(vt,mt,St){return vt.length>0?mt+St.toUpperCase():vt},zc=function(vt){ne(mt,vt);function mt(St,wt){var Qt=vt.call(this,St,wt)||this;return Qt.src=wt.currentSrc||wt.src,Qt.intrinsicWidth=wt.naturalWidth,Qt.intrinsicHeight=wt.naturalHeight,Qt.context.cache.addImage(Qt.src),Qt}return mt}(sA),Kc=function(vt){ne(mt,vt);function mt(St,wt){var Qt=vt.call(this,St,wt)||this;return Qt.canvas=wt,Qt.intrinsicWidth=wt.width,Qt.intrinsicHeight=wt.height,Qt}return mt}(sA),jc=function(vt){ne(mt,vt);function mt(St,wt){var Qt=vt.call(this,St,wt)||this,Xt=new XMLSerializer,ae=we(St,wt);return wt.setAttribute("width",ae.width+"px"),wt.setAttribute("height",ae.height+"px"),Qt.svg="data:image/svg+xml,"+encodeURIComponent(Xt.serializeToString(wt)),Qt.intrinsicWidth=wt.width.baseVal.value,Qt.intrinsicHeight=wt.height.baseVal.value,Qt.context.cache.addImage(Qt.svg),Qt}return mt}(sA),ku=function(vt){ne(mt,vt);function mt(St,wt){var Qt=vt.call(this,St,wt)||this;return Qt.value=wt.value,Qt}return mt}(sA),Vc=function(vt){ne(mt,vt);function mt(St,wt){var Qt=vt.call(this,St,wt)||this;return Qt.start=wt.start,Qt.reversed=typeof wt.reversed=="boolean"&&wt.reversed===!0,Qt}return mt}(sA),Bd=[{type:15,flags:0,unit:"px",number:3}],Cd=[{type:16,flags:0,number:50}],uA=function(vt){return vt.width>vt.height?new Fe(vt.left+(vt.width-vt.height)/2,vt.top,vt.height,vt.height):vt.width<vt.height?new Fe(vt.left,vt.top+(vt.height-vt.width)/2,vt.width,vt.width):vt},dg=function(vt){var mt=vt.type===dh?new Array(vt.value.length+1).join("\u2022"):vt.value;return mt.length===0?vt.placeholder||"":mt},Wh="checkbox",JA="radio",dh="password",Nf=707406591,Ol=function(vt){ne(mt,vt);function mt(St,wt){var Qt=vt.call(this,St,wt)||this;switch(Qt.type=wt.type.toLowerCase(),Qt.checked=wt.checked,Qt.value=dg(wt),(Qt.type===Wh||Qt.type===JA)&&(Qt.styles.backgroundColor=3739148031,Qt.styles.borderTopColor=Qt.styles.borderRightColor=Qt.styles.borderBottomColor=Qt.styles.borderLeftColor=2779096575,Qt.styles.borderTopWidth=Qt.styles.borderRightWidth=Qt.styles.borderBottomWidth=Qt.styles.borderLeftWidth=1,Qt.styles.borderTopStyle=Qt.styles.borderRightStyle=Qt.styles.borderBottomStyle=Qt.styles.borderLeftStyle=1,Qt.styles.backgroundClip=[0],Qt.styles.backgroundOrigin=[0],Qt.bounds=uA(Qt.bounds)),Qt.type){case Wh:Qt.styles.borderTopRightRadius=Qt.styles.borderTopLeftRadius=Qt.styles.borderBottomRightRadius=Qt.styles.borderBottomLeftRadius=Bd;break;case JA:Qt.styles.borderTopRightRadius=Qt.styles.borderTopLeftRadius=Qt.styles.borderBottomRightRadius=Qt.styles.borderBottomLeftRadius=Cd;break}return Qt}return mt}(sA),Qf=function(vt){ne(mt,vt);function mt(St,wt){var Qt=vt.call(this,St,wt)||this,Xt=wt.options[wt.selectedIndex||0];return Qt.value=Xt&&Xt.text||"",Qt}return mt}(sA),_c=function(vt){ne(mt,vt);function mt(St,wt){var Qt=vt.call(this,St,wt)||this;return Qt.value=wt.value,Qt}return mt}(sA),Pd=function(vt){ne(mt,vt);function mt(St,wt){var Qt=vt.call(this,St,wt)||this;Qt.src=wt.src,Qt.width=parseInt(wt.width,10)||0,Qt.height=parseInt(wt.height,10)||0,Qt.backgroundColor=Qt.styles.backgroundColor;try{if(wt.contentWindow&&wt.contentWindow.document&&wt.contentWindow.document.documentElement){Qt.tree=Ld(St,wt.contentWindow.document.documentElement);var Xt=wt.contentWindow.document.documentElement?Xr(St,getComputedStyle(wt.contentWindow.document.documentElement).backgroundColor):ys.TRANSPARENT,ae=wt.contentWindow.document.body?Xr(St,getComputedStyle(wt.contentWindow.document.body).backgroundColor):ys.TRANSPARENT;Qt.backgroundColor=vs(Xt)?vs(ae)?Qt.styles.backgroundColor:ae:Xt}}catch(Pe){}return Qt}return mt}(sA),Fd=["OL","UL","MENU"],Yh=function(vt,mt,St,wt){for(var Qt=mt.firstChild,Xt=void 0;Qt;Qt=Xt)if(Xt=Qt.nextSibling,Wc(Qt)&&Qt.data.trim().length>0)St.textNodes.push(new _h(vt,Qt,St.styles));else if(gh(Qt))if(Hf(Qt)&&Qt.assignedNodes)Qt.assignedNodes().forEach(function(Pe){return Yh(vt,Pe,St,wt)});else{var ae=gg(vt,Qt);ae.styles.isVisible()&&(Uf(Qt,ae,wt)?ae.flags|=4:Df(ae.styles)&&(ae.flags|=2),Fd.indexOf(Qt.tagName)!==-1&&(ae.flags|=8),St.elements.push(ae),Qt.slot,Qt.shadowRoot?Yh(vt,Qt.shadowRoot,ae,wt):!Zh(Qt)&&!Md(Qt)&&!Jh(Qt)&&Yh(vt,Qt,ae,wt))}},gg=function(vt,mt){return js(mt)?new zc(vt,mt):ph(mt)?new Kc(vt,mt):Md(mt)?new jc(vt,mt):Ed(mt)?new ku(vt,mt):Yc(mt)?new Vc(vt,mt):pg(mt)?new Ol(vt,mt):Jh(mt)?new Qf(vt,mt):Zh(mt)?new _c(vt,mt):Ra(mt)?new Pd(vt,mt):new sA(vt,mt)},Ld=function(vt,mt){var St=gg(vt,mt);return St.flags|=4,Yh(vt,mt,St,St),St},Uf=function(vt,mt,St){return mt.styles.isPositionedWithZIndex()||mt.styles.opacity<1||mt.styles.isTransformed()||Co(vt)&&St.styles.isTransparent()},Df=function(vt){return vt.isPositioned()||vt.isFloating()},Wc=function(vt){return vt.nodeType===Node.TEXT_NODE},gh=function(vt){return vt.nodeType===Node.ELEMENT_NODE},Xh=function(vt){return gh(vt)&&typeof vt.style!="undefined"&&!hA(vt)},hA=function(vt){return typeof vt.className=="object"},Ed=function(vt){return vt.tagName==="LI"},Yc=function(vt){return vt.tagName==="OL"},pg=function(vt){return vt.tagName==="INPUT"},Of=function(vt){return vt.tagName==="HTML"},Md=function(vt){return vt.tagName==="svg"},Co=function(vt){return vt.tagName==="BODY"},ph=function(vt){return vt.tagName==="CANVAS"},bu=function(vt){return vt.tagName==="VIDEO"},js=function(vt){return vt.tagName==="IMG"},Ra=function(vt){return vt.tagName==="IFRAME"},Tu=function(vt){return vt.tagName==="STYLE"},Xc=function(vt){return vt.tagName==="SCRIPT"},Zh=function(vt){return vt.tagName==="TEXTAREA"},Jh=function(vt){return vt.tagName==="SELECT"},Hf=function(vt){return vt.tagName==="SLOT"},Rf=function(vt){return vt.tagName.indexOf("-")>0},kd=function(){function vt(){this.counters={}}return vt.prototype.getCounterValue=function(mt){var St=this.counters[mt];return St&&St.length?St[St.length-1]:1},vt.prototype.getCounterValues=function(mt){var St=this.counters[mt];return St||[]},vt.prototype.pop=function(mt){var St=this;mt.forEach(function(wt){return St.counters[wt].pop()})},vt.prototype.parse=function(mt){var St=this,wt=mt.counterIncrement,Qt=mt.counterReset,Xt=!0;wt!==null&&wt.forEach(function(Pe){var ce=St.counters[Pe.counter];ce&&Pe.increment!==0&&(Xt=!1,ce.length||ce.push(1),ce[Math.max(0,ce.length-1)]+=Pe.increment)});var ae=[];return Xt&&Qt.forEach(function(Pe){var ce=St.counters[Pe.counter];ae.push(Pe.counter),ce||(ce=St.counters[Pe.counter]=[]),ce.push(Pe.reset)}),ae},vt}(),qA={integers:[1e3,900,500,400,100,90,50,40,10,9,5,4,1],values:["M","CM","D","CD","C","XC","L","XL","X","IX","V","IV","I"]},qh={integers:[9e3,8e3,7e3,6e3,5e3,4e3,3e3,2e3,1e3,900,800,700,600,500,400,300,200,100,90,80,70,60,50,40,30,20,10,9,8,7,6,5,4,3,2,1],values:["\u0554","\u0553","\u0552","\u0551","\u0550","\u054F","\u054E","\u054D","\u054C","\u054B","\u054A","\u0549","\u0548","\u0547","\u0546","\u0545","\u0544","\u0543","\u0542","\u0541","\u0540","\u053F","\u053E","\u053D","\u053C","\u053B","\u053A","\u0539","\u0538","\u0537","\u0536","\u0535","\u0534","\u0533","\u0532","\u0531"]},Iu={integers:[1e4,9e3,8e3,7e3,6e3,5e3,4e3,3e3,2e3,1e3,400,300,200,100,90,80,70,60,50,40,30,20,19,18,17,16,15,10,9,8,7,6,5,4,3,2,1],values:["\u05D9\u05F3","\u05D8\u05F3","\u05D7\u05F3","\u05D6\u05F3","\u05D5\u05F3","\u05D4\u05F3","\u05D3\u05F3","\u05D2\u05F3","\u05D1\u05F3","\u05D0\u05F3","\u05EA","\u05E9","\u05E8","\u05E7","\u05E6","\u05E4","\u05E2","\u05E1","\u05E0","\u05DE","\u05DC","\u05DB","\u05D9\u05D8","\u05D9\u05D7","\u05D9\u05D6","\u05D8\u05D6","\u05D8\u05D5","\u05D9","\u05D8","\u05D7","\u05D6","\u05D5","\u05D4","\u05D3","\u05D2","\u05D1","\u05D0"]},Xo={integers:[1e4,9e3,8e3,7e3,6e3,5e3,4e3,3e3,2e3,1e3,900,800,700,600,500,400,300,200,100,90,80,70,60,50,40,30,20,10,9,8,7,6,5,4,3,2,1],values:["\u10F5","\u10F0","\u10EF","\u10F4","\u10EE","\u10ED","\u10EC","\u10EB","\u10EA","\u10E9","\u10E8","\u10E7","\u10E6","\u10E5","\u10E4","\u10F3","\u10E2","\u10E1","\u10E0","\u10DF","\u10DE","\u10DD","\u10F2","\u10DC","\u10DB","\u10DA","\u10D9","\u10D8","\u10D7","\u10F1","\u10D6","\u10D5","\u10D4","\u10D3","\u10D2","\u10D1","\u10D0"]},$A=function(vt,mt,St,wt,Qt,Xt){return vt<mt||vt>St?ht(vt,Qt,Xt.length>0):wt.integers.reduce(function(ae,Pe,ce){for(;vt>=Pe;)vt-=Pe,ae+=wt.values[ce];return ae},"")+Xt},Gf=function(vt,mt,St,wt){var Qt="";do St||vt--,Qt=wt(vt)+Qt,vt/=mt;while(vt*mt>=mt);return Qt},Ps=function(vt,mt,St,wt,Qt){var Xt=St-mt+1;return(vt<0?"-":"")+(Gf(Math.abs(vt),Xt,wt,function(ae){return ge(Math.floor(ae%Xt)+mt)})+Qt)},Wl=function(vt,mt,St){St===void 0&&(St=". ");var wt=mt.length;return Gf(Math.abs(vt),wt,!1,function(Qt){return mt[Math.floor(Qt%wt)]})+St},MA=1,tu=2,hs=4,$h=8,Fl=function(vt,mt,St,wt,Qt,Xt){if(vt<-9999||vt>9999)return ht(vt,4,Qt.length>0);var ae=Math.abs(vt),Pe=Qt;if(ae===0)return mt[0]+Pe;for(var ce=0;ae>0&&ce<=4;ce++){var Ye=ae%10;Ye===0&&Zs(Xt,MA)&&Pe!==""?Pe=mt[Ye]+Pe:Ye>1||Ye===1&&ce===0||Ye===1&&ce===1&&Zs(Xt,tu)||Ye===1&&ce===1&&Zs(Xt,hs)&&vt>100||Ye===1&&ce>1&&Zs(Xt,$h)?Pe=mt[Ye]+(ce>0?St[ce-1]:"")+Pe:Ye===1&&ce>0&&(Pe=St[ce-1]+Pe),ae=Math.floor(ae/10)}return(vt<0?wt:"")+Pe},kA="\u5341\u767E\u5343\u842C",tc="\u62FE\u4F70\u4EDF\u842C",it="\u30DE\u30A4\u30CA\u30B9",st="\uB9C8\uC774\uB108\uC2A4",ht=function(vt,mt,St){var wt=St?". ":"",Qt=St?"\u3001":"",Xt=St?", ":"",ae=St?" ":"";switch(mt){case 0:return"\u2022"+ae;case 1:return"\u25E6"+ae;case 2:return"\u25FE"+ae;case 5:var Pe=Ps(vt,48,57,!0,wt);return Pe.length<4?"0"+Pe:Pe;case 4:return Wl(vt,"\u3007\u4E00\u4E8C\u4E09\u56DB\u4E94\u516D\u4E03\u516B\u4E5D",Qt);case 6:return $A(vt,1,3999,qA,3,wt).toLowerCase();case 7:return $A(vt,1,3999,qA,3,wt);case 8:return Ps(vt,945,969,!1,wt);case 9:return Ps(vt,97,122,!1,wt);case 10:return Ps(vt,65,90,!1,wt);case 11:return Ps(vt,1632,1641,!0,wt);case 12:case 49:return $A(vt,1,9999,qh,3,wt);case 35:return $A(vt,1,9999,qh,3,wt).toLowerCase();case 13:return Ps(vt,2534,2543,!0,wt);case 14:case 30:return Ps(vt,6112,6121,!0,wt);case 15:return Wl(vt,"\u5B50\u4E11\u5BC5\u536F\u8FB0\u5DF3\u5348\u672A\u7533\u9149\u620C\u4EA5",Qt);case 16:return Wl(vt,"\u7532\u4E59\u4E19\u4E01\u620A\u5DF1\u5E9A\u8F9B\u58EC\u7678",Qt);case 17:case 48:return Fl(vt,"\u96F6\u4E00\u4E8C\u4E09\u56DB\u4E94\u516D\u4E03\u516B\u4E5D",kA,"\u8CA0",Qt,tu|hs|$h);case 47:return Fl(vt,"\u96F6\u58F9\u8CB3\u53C3\u8086\u4F0D\u9678\u67D2\u634C\u7396",tc,"\u8CA0",Qt,MA|tu|hs|$h);case 42:return Fl(vt,"\u96F6\u4E00\u4E8C\u4E09\u56DB\u4E94\u516D\u4E03\u516B\u4E5D",kA,"\u8D1F",Qt,tu|hs|$h);case 41:return Fl(vt,"\u96F6\u58F9\u8D30\u53C1\u8086\u4F0D\u9646\u67D2\u634C\u7396",tc,"\u8D1F",Qt,MA|tu|hs|$h);case 26:return Fl(vt,"\u3007\u4E00\u4E8C\u4E09\u56DB\u4E94\u516D\u4E03\u516B\u4E5D","\u5341\u767E\u5343\u4E07",it,Qt,0);case 25:return Fl(vt,"\u96F6\u58F1\u5F10\u53C2\u56DB\u4F0D\u516D\u4E03\u516B\u4E5D","\u62FE\u767E\u5343\u4E07",it,Qt,MA|tu|hs);case 31:return Fl(vt,"\uC601\uC77C\uC774\uC0BC\uC0AC\uC624\uC721\uCE60\uD314\uAD6C","\uC2ED\uBC31\uCC9C\uB9CC",st,Xt,MA|tu|hs);case 33:return Fl(vt,"\u96F6\u4E00\u4E8C\u4E09\u56DB\u4E94\u516D\u4E03\u516B\u4E5D","\u5341\u767E\u5343\u842C",st,Xt,0);case 32:return Fl(vt,"\u96F6\u58F9\u8CB3\u53C3\u56DB\u4E94\u516D\u4E03\u516B\u4E5D","\u62FE\u767E\u5343",st,Xt,MA|tu|hs);case 18:return Ps(vt,2406,2415,!0,wt);case 20:return $A(vt,1,19999,Xo,3,wt);case 21:return Ps(vt,2790,2799,!0,wt);case 22:return Ps(vt,2662,2671,!0,wt);case 22:return $A(vt,1,10999,Iu,3,wt);case 23:return Wl(vt,"\u3042\u3044\u3046\u3048\u304A\u304B\u304D\u304F\u3051\u3053\u3055\u3057\u3059\u305B\u305D\u305F\u3061\u3064\u3066\u3068\u306A\u306B\u306C\u306D\u306E\u306F\u3072\u3075\u3078\u307B\u307E\u307F\u3080\u3081\u3082\u3084\u3086\u3088\u3089\u308A\u308B\u308C\u308D\u308F\u3090\u3091\u3092\u3093");case 24:return Wl(vt,"\u3044\u308D\u306F\u306B\u307B\u3078\u3068\u3061\u308A\u306C\u308B\u3092\u308F\u304B\u3088\u305F\u308C\u305D\u3064\u306D\u306A\u3089\u3080\u3046\u3090\u306E\u304A\u304F\u3084\u307E\u3051\u3075\u3053\u3048\u3066\u3042\u3055\u304D\u3086\u3081\u307F\u3057\u3091\u3072\u3082\u305B\u3059");case 27:return Ps(vt,3302,3311,!0,wt);case 28:return Wl(vt,"\u30A2\u30A4\u30A6\u30A8\u30AA\u30AB\u30AD\u30AF\u30B1\u30B3\u30B5\u30B7\u30B9\u30BB\u30BD\u30BF\u30C1\u30C4\u30C6\u30C8\u30CA\u30CB\u30CC\u30CD\u30CE\u30CF\u30D2\u30D5\u30D8\u30DB\u30DE\u30DF\u30E0\u30E1\u30E2\u30E4\u30E6\u30E8\u30E9\u30EA\u30EB\u30EC\u30ED\u30EF\u30F0\u30F1\u30F2\u30F3",Qt);case 29:return Wl(vt,"\u30A4\u30ED\u30CF\u30CB\u30DB\u30D8\u30C8\u30C1\u30EA\u30CC\u30EB\u30F2\u30EF\u30AB\u30E8\u30BF\u30EC\u30BD\u30C4\u30CD\u30CA\u30E9\u30E0\u30A6\u30F0\u30CE\u30AA\u30AF\u30E4\u30DE\u30B1\u30D5\u30B3\u30A8\u30C6\u30A2\u30B5\u30AD\u30E6\u30E1\u30DF\u30B7\u30F1\u30D2\u30E2\u30BB\u30B9",Qt);case 34:return Ps(vt,3792,3801,!0,wt);case 37:return Ps(vt,6160,6169,!0,wt);case 38:return Ps(vt,4160,4169,!0,wt);case 39:return Ps(vt,2918,2927,!0,wt);case 40:return Ps(vt,1776,1785,!0,wt);case 43:return Ps(vt,3046,3055,!0,wt);case 44:return Ps(vt,3174,3183,!0,wt);case 45:return Ps(vt,3664,3673,!0,wt);case 46:return Ps(vt,3872,3881,!0,wt);case 3:default:return Ps(vt,48,57,!0,wt)}},ut="data-html2canvas-ignore",dt=function(){function vt(mt,St,wt){if(this.context=mt,this.options=wt,this.scrolledElements=[],this.referenceElement=St,this.counters=new kd,this.quoteDepth=0,!St.ownerDocument)throw new Error("Cloned element does not have an owner document");this.documentElement=this.cloneNode(St.ownerDocument.documentElement,!1)}return vt.prototype.toIFrame=function(mt,St){var wt=this,Qt=Tt(mt,St);if(!Qt.contentWindow)return Promise.reject("Unable to find iframe window");var Xt=mt.defaultView.pageXOffset,ae=mt.defaultView.pageYOffset,Pe=Qt.contentWindow,ce=Pe.document,Ye=ee(Qt).then(function(){return Be(wt,void 0,void 0,function(){var $e,vn;return Ee(this,function(ei){switch(ei.label){case 0:return this.scrolledElements.forEach(Rn),Pe&&(Pe.scrollTo(St.left,St.top),/(iPad|iPhone|iPod)/g.test(navigator.userAgent)&&(Pe.scrollY!==St.top||Pe.scrollX!==St.left)&&(this.context.logger.warn("Unable to restore scroll position for cloned document"),this.context.windowBounds=this.context.windowBounds.add(Pe.scrollX-St.left,Pe.scrollY-St.top,0,0))),$e=this.options.onclone,vn=this.clonedReferenceElement,typeof vn=="undefined"?[2,Promise.reject("Error finding the "+this.referenceElement.nodeName+" in the cloned document")]:ce.fonts&&ce.fonts.ready?[4,ce.fonts.ready]:[3,2];case 1:ei.sent(),ei.label=2;case 2:return/(AppleWebKit)/g.test(navigator.userAgent)?[4,Rt(ce)]:[3,4];case 3:ei.sent(),ei.label=4;case 4:return typeof $e=="function"?[2,Promise.resolve().then(function(){return $e(ce,vn)}).then(function(){return Qt})]:[2,Qt]}})})});return ce.open(),ce.write(_e(document.doctype)+"<html></html>"),Re(this.referenceElement.ownerDocument,Xt,ae),ce.replaceChild(ce.adoptNode(this.documentElement),ce.documentElement),ce.close(),Ye},vt.prototype.createElementClone=function(mt){if(Qh(mt,2))debugger;if(ph(mt))return this.createCanvasClone(mt);if(bu(mt))return this.createVideoClone(mt);if(Tu(mt))return this.createStyleClone(mt);var St=mt.cloneNode(!1);return js(St)&&(js(mt)&&mt.currentSrc&&mt.currentSrc!==mt.src&&(St.src=mt.currentSrc,St.srcset=""),St.loading==="lazy"&&(St.loading="eager")),Rf(St)?this.createCustomElementClone(St):St},vt.prototype.createCustomElementClone=function(mt){var St=document.createElement("html2canvascustomelement");return re(mt.style,St),St},vt.prototype.createStyleClone=function(mt){try{var St=mt.sheet;if(St&&St.cssRules){var wt=[].slice.call(St.cssRules,0).reduce(function(Xt,ae){return ae&&typeof ae.cssText=="string"?Xt+ae.cssText:Xt},""),Qt=mt.cloneNode(!1);return Qt.textContent=wt,Qt}}catch(Xt){if(this.context.logger.error("Unable to access cssRules property",Xt),Xt.name!=="SecurityError")throw Xt}return mt.cloneNode(!1)},vt.prototype.createCanvasClone=function(mt){var St;if(this.options.inlineImages&&mt.ownerDocument){var wt=mt.ownerDocument.createElement("img");try{return wt.src=mt.toDataURL(),wt}catch(Ye){this.context.logger.info("Unable to inline canvas contents, canvas is tainted",mt)}}var Qt=mt.cloneNode(!1);try{Qt.width=mt.width,Qt.height=mt.height;var Xt=mt.getContext("2d"),ae=Qt.getContext("2d");if(ae)if(!this.options.allowTaint&&Xt)ae.putImageData(Xt.getImageData(0,0,mt.width,mt.height),0,0);else{var Pe=(St=mt.getContext("webgl2"))!==null&&St!==void 0?St:mt.getContext("webgl");if(Pe){var ce=Pe.getContextAttributes();(ce==null?void 0:ce.preserveDrawingBuffer)===!1&&this.context.logger.warn("Unable to clone WebGL context as it has preserveDrawingBuffer=false",mt)}ae.drawImage(mt,0,0)}return Qt}catch(Ye){this.context.logger.info("Unable to clone canvas as it is tainted",mt)}return Qt},vt.prototype.createVideoClone=function(mt){var St=mt.ownerDocument.createElement("canvas");St.width=mt.offsetWidth,St.height=mt.offsetHeight;var wt=St.getContext("2d");try{return wt&&(wt.drawImage(mt,0,0,St.width,St.height),this.options.allowTaint||wt.getImageData(0,0,St.width,St.height)),St}catch(Xt){this.context.logger.info("Unable to clone video as it is tainted",mt)}var Qt=mt.ownerDocument.createElement("canvas");return Qt.width=mt.offsetWidth,Qt.height=mt.offsetHeight,Qt},vt.prototype.appendChildNode=function(mt,St,wt){(!gh(St)||!Xc(St)&&!St.hasAttribute(ut)&&(typeof this.options.ignoreElements!="function"||!this.options.ignoreElements(St)))&&(!this.options.copyStyles||!gh(St)||!Tu(St))&&mt.appendChild(this.cloneNode(St,wt))},vt.prototype.cloneChildNodes=function(mt,St,wt){for(var Qt=this,Xt=mt.shadowRoot?mt.shadowRoot.firstChild:mt.firstChild;Xt;Xt=Xt.nextSibling)if(gh(Xt)&&Hf(Xt)&&typeof Xt.assignedNodes=="function"){var ae=Xt.assignedNodes();ae.length&&ae.forEach(function(Pe){return Qt.appendChildNode(St,Pe,wt)})}else this.appendChildNode(St,Xt,wt)},vt.prototype.cloneNode=function(mt,St){if(Wc(mt))return document.createTextNode(mt.data);if(!mt.ownerDocument)return mt.cloneNode(!1);var wt=mt.ownerDocument.defaultView;if(wt&&gh(mt)&&(Xh(mt)||hA(mt))){var Qt=this.createElementClone(mt);Qt.style.transitionProperty="none";var Xt=wt.getComputedStyle(mt),ae=wt.getComputedStyle(mt,":before"),Pe=wt.getComputedStyle(mt,":after");this.referenceElement===mt&&Xh(Qt)&&(this.clonedReferenceElement=Qt),Co(Qt)&&lr(Qt);var ce=this.counters.parse(new oA(this.context,Xt)),Ye=this.resolvePseudoContent(mt,Qt,ae,Ft.BEFORE);Rf(mt)&&(St=!0),bu(mt)||this.cloneChildNodes(mt,Qt,St),Ye&&Qt.insertBefore(Ye,Qt.firstChild);var $e=this.resolvePseudoContent(mt,Qt,Pe,Ft.AFTER);return $e&&Qt.appendChild($e),this.counters.pop(ce),(Xt&&(this.options.copyStyles||hA(mt))&&!Ra(mt)||St)&&re(Xt,Qt),(mt.scrollTop!==0||mt.scrollLeft!==0)&&this.scrolledElements.push([Qt,mt.scrollLeft,mt.scrollTop]),(Zh(mt)||Jh(mt))&&(Zh(Qt)||Jh(Qt))&&(Qt.value=mt.value),Qt}return mt.cloneNode(!1)},vt.prototype.resolvePseudoContent=function(mt,St,wt,Qt){var Xt=this;if(wt){var ae=wt.content,Pe=St.ownerDocument;if(!(!Pe||!ae||ae==="none"||ae==="-moz-alt-content"||wt.display==="none")){this.counters.parse(new oA(this.context,wt));var ce=new Ha(this.context,wt),Ye=Pe.createElement("html2canvaspseudoelement");re(wt,Ye),ce.content.forEach(function(vn){if(vn.type===0)Ye.appendChild(Pe.createTextNode(vn.value));else if(vn.type===22){var ei=Pe.createElement("img");ei.src=vn.value,ei.style.opacity="1",Ye.appendChild(ei)}else if(vn.type===18){if(vn.name==="attr"){var sr=vn.values.filter(So);sr.length&&Ye.appendChild(Pe.createTextNode(mt.getAttribute(sr[0].value)||""))}else if(vn.name==="counter"){var Qi=vn.values.filter(_s),Ki=Qi[0],fo=Qi[1];if(Ki&&So(Ki)){var Pr=Xt.counters.getCounterValue(Ki.value),Lr=fo&&So(fo)?vu.parse(Xt.context,fo.value):3;Ye.appendChild(Pe.createTextNode(ht(Pr,Lr,!1)))}}else if(vn.name==="counters"){var kr=vn.values.filter(_s),Ki=kr[0],Fo=kr[1],fo=kr[2];if(Ki&&So(Ki)){var eo=Xt.counters.getCounterValues(Ki.value),gr=fo&&So(fo)?vu.parse(Xt.context,fo.value):3,Do=Fo&&Fo.type===0?Fo.value:"",Vo=eo.map(function(dl){return ht(dl,gr,!1)}).join(Do);Ye.appendChild(Pe.createTextNode(Vo))}}}else if(vn.type===20)switch(vn.value){case"open-quote":Ye.appendChild(Pe.createTextNode(Ih(ce.quotes,Xt.quoteDepth++,!0)));break;case"close-quote":Ye.appendChild(Pe.createTextNode(Ih(ce.quotes,--Xt.quoteDepth,!1)));break;default:Ye.appendChild(Pe.createTextNode(vn.value))}}),Ye.className=Mi+" "+Ji;var $e=Qt===Ft.BEFORE?" "+Mi:" "+Ji;return hA(St)?St.className.baseValue+=$e:St.className+=$e,Ye}}},vt.destroy=function(mt){return mt.parentNode?(mt.parentNode.removeChild(mt),!0):!1},vt}(),Ft;(function(vt){vt[vt.BEFORE=0]="BEFORE",vt[vt.AFTER=1]="AFTER"})(Ft||(Ft={}));var Tt=function(vt,mt){var St=vt.createElement("iframe");return St.className="html2canvas-container",St.style.visibility="hidden",St.style.position="fixed",St.style.left="-10000px",St.style.top="0px",St.style.border="0",St.width=mt.width.toString(),St.height=mt.height.toString(),St.scrolling="no",St.setAttribute(ut,"true"),vt.body.appendChild(St),St},zt=function(vt){return new Promise(function(mt){if(vt.complete){mt();return}if(!vt.src){mt();return}vt.onload=mt,vt.onerror=mt})},Rt=function(vt){return Promise.all([].slice.call(vt.images,0).map(zt))},ee=function(vt){return new Promise(function(mt,St){var wt=vt.contentWindow;if(!wt)return St("No window assigned for iframe");var Qt=wt.document;wt.onload=vt.onload=function(){wt.onload=vt.onload=null;var Xt=setInterval(function(){Qt.body.childNodes.length>0&&Qt.readyState==="complete"&&(clearInterval(Xt),mt(vt))},50)}})},ke=["all","d","content"],re=function(vt,mt){for(var St=vt.length-1;St>=0;St--){var wt=vt.item(St);ke.indexOf(wt)===-1&&mt.style.setProperty(wt,vt.getPropertyValue(wt))}return mt},_e=function(vt){var mt="";return vt&&(mt+="<!DOCTYPE ",vt.name&&(mt+=vt.name),vt.internalSubset&&(mt+=vt.internalSubset),vt.publicId&&(mt+='"'+vt.publicId+'"'),vt.systemId&&(mt+='"'+vt.systemId+'"'),mt+=">"),mt},Re=function(vt,mt,St){vt&&vt.defaultView&&(mt!==vt.defaultView.pageXOffset||St!==vt.defaultView.pageYOffset)&&vt.defaultView.scrollTo(mt,St)},Rn=function(vt){var mt=vt[0],St=vt[1],wt=vt[2];mt.scrollLeft=St,mt.scrollTop=wt},Yn=":before",di=":after",Mi="___html2canvas___pseudoelement_before",Ji="___html2canvas___pseudoelement_after",zi=`{
content: "" !important;
display: none !important;
}`,lr=function(vt){Ir(vt,"."+Mi+Yn+zi+`
.`+Ji+di+zi)},Ir=function(vt,mt){var St=vt.ownerDocument;if(St){var wt=St.createElement("style");wt.textContent=mt,vt.appendChild(wt)}},Hi=function(){function vt(){}return vt.getOrigin=function(mt){var St=vt._link;return St?(St.href=mt,St.href=St.href,St.protocol+St.hostname+St.port):"about:blank"},vt.isSameOrigin=function(mt){return vt.getOrigin(mt)===vt._origin},vt.setContext=function(mt){vt._link=mt.document.createElement("a"),vt._origin=vt.getOrigin(mt.location.href)},vt._origin="about:blank",vt}(),to=function(){function vt(mt,St){this.context=mt,this._options=St,this._cache={}}return vt.prototype.addImage=function(mt){var St=Promise.resolve();return this.has(mt)||(Ga(mt)||qa(mt))&&(this._cache[mt]=this.loadImage(mt)).catch(function(){}),St},vt.prototype.match=function(mt){return this._cache[mt]},vt.prototype.loadImage=function(mt){return Be(this,void 0,void 0,function(){var St,wt,Qt,Xt,ae=this;return Ee(this,function(Pe){switch(Pe.label){case 0:return St=Hi.isSameOrigin(mt),wt=!ua(mt)&&this._options.useCORS===!0&&Ks.SUPPORT_CORS_IMAGES&&!St,Qt=!ua(mt)&&!St&&!Ga(mt)&&typeof this._options.proxy=="string"&&Ks.SUPPORT_CORS_XHR&&!wt,!St&&this._options.allowTaint===!1&&!ua(mt)&&!Ga(mt)&&!Qt&&!wt?[2]:(Xt=mt,Qt?[4,this.proxy(Xt)]:[3,2]);case 1:Xt=Pe.sent(),Pe.label=2;case 2:return this.context.logger.debug("Added image "+mt.substring(0,256)),[4,new Promise(function(ce,Ye){var $e=new Image;$e.onload=function(){return ce($e)},$e.onerror=Ye,(Js(Xt)||wt)&&($e.crossOrigin="anonymous"),$e.src=Xt,$e.complete===!0&&setTimeout(function(){return ce($e)},500),ae._options.imageTimeout>0&&setTimeout(function(){return Ye("Timed out ("+ae._options.imageTimeout+"ms) loading image")},ae._options.imageTimeout)})];case 3:return[2,Pe.sent()]}})})},vt.prototype.has=function(mt){return typeof this._cache[mt]!="undefined"},vt.prototype.keys=function(){return Promise.resolve(Object.keys(this._cache))},vt.prototype.proxy=function(mt){var St=this,wt=this._options.proxy;if(!wt)throw new Error("No proxy defined");var Qt=mt.substring(0,256);return new Promise(function(Xt,ae){var Pe=Ks.SUPPORT_RESPONSE_TYPE?"blob":"text",ce=new XMLHttpRequest;ce.onload=function(){if(ce.status===200)if(Pe==="text")Xt(ce.response);else{var vn=new FileReader;vn.addEventListener("load",function(){return Xt(vn.result)},!1),vn.addEventListener("error",function(ei){return ae(ei)},!1),vn.readAsDataURL(ce.response)}else ae("Failed to proxy resource "+Qt+" with status code "+ce.status)},ce.onerror=ae;var Ye=wt.indexOf("?")>-1?"&":"?";if(ce.open("GET",""+wt+Ye+"url="+encodeURIComponent(mt)+"&responseType="+Pe),Pe!=="text"&&ce instanceof XMLHttpRequest&&(ce.responseType=Pe),St._options.imageTimeout){var $e=St._options.imageTimeout;ce.timeout=$e,ce.ontimeout=function(){return ae("Timed out ("+$e+"ms) proxying "+Qt)}}ce.send()})},vt}(),cs=/^data:image\/svg\+xml/i,na=/^data:image\/.*;base64,/i,ws=/^data:image\/.*/i,qa=function(vt){return Ks.SUPPORT_SVG_DRAWING||!pa(vt)},ua=function(vt){return ws.test(vt)},Js=function(vt){return na.test(vt)},Ga=function(vt){return vt.substr(0,4)==="blob"},pa=function(vt){return vt.substr(-3).toLowerCase()==="svg"||cs.test(vt)},Di=function(){function vt(mt,St){this.type=0,this.x=mt,this.y=St}return vt.prototype.add=function(mt,St){return new vt(this.x+mt,this.y+St)},vt}(),yo=function(vt,mt,St){return new Di(vt.x+(mt.x-vt.x)*St,vt.y+(mt.y-vt.y)*St)},fs=function(){function vt(mt,St,wt,Qt){this.type=1,this.start=mt,this.startControl=St,this.endControl=wt,this.end=Qt}return vt.prototype.subdivide=function(mt,St){var wt=yo(this.start,this.startControl,mt),Qt=yo(this.startControl,this.endControl,mt),Xt=yo(this.endControl,this.end,mt),ae=yo(wt,Qt,mt),Pe=yo(Qt,Xt,mt),ce=yo(ae,Pe,mt);return St?new vt(this.start,wt,ae,ce):new vt(ce,Pe,Xt,this.end)},vt.prototype.add=function(mt,St){return new vt(this.start.add(mt,St),this.startControl.add(mt,St),this.endControl.add(mt,St),this.end.add(mt,St))},vt.prototype.reverse=function(){return new vt(this.end,this.endControl,this.startControl,this.start)},vt}(),es=function(vt){return vt.type===1},ma=function(){function vt(mt){var St=mt.styles,wt=mt.bounds,Qt=Ya(St.borderTopLeftRadius,wt.width,wt.height),Xt=Qt[0],ae=Qt[1],Pe=Ya(St.borderTopRightRadius,wt.width,wt.height),ce=Pe[0],Ye=Pe[1],$e=Ya(St.borderBottomRightRadius,wt.width,wt.height),vn=$e[0],ei=$e[1],sr=Ya(St.borderBottomLeftRadius,wt.width,wt.height),Qi=sr[0],Ki=sr[1],fo=[];fo.push((Xt+ce)/wt.width),fo.push((Qi+vn)/wt.width),fo.push((ae+Ki)/wt.height),fo.push((Ye+ei)/wt.height);var Pr=Math.max.apply(Math,fo);Pr>1&&(Xt/=Pr,ae/=Pr,ce/=Pr,Ye/=Pr,vn/=Pr,ei/=Pr,Qi/=Pr,Ki/=Pr);var Lr=wt.width-ce,kr=wt.height-ei,Fo=wt.width-vn,eo=wt.height-Ki,gr=St.borderTopWidth,Do=St.borderRightWidth,Vo=St.borderBottomWidth,io=St.borderLeftWidth,ra=Qo(St.paddingTop,mt.bounds.width),dl=Qo(St.paddingRight,mt.bounds.width),Ml=Qo(St.paddingBottom,mt.bounds.width),ds=Qo(St.paddingLeft,mt.bounds.width);this.topLeftBorderDoubleOuterBox=Xt>0||ae>0?Zr(wt.left+io/3,wt.top+gr/3,Xt-io/3,ae-gr/3,Po.TOP_LEFT):new Di(wt.left+io/3,wt.top+gr/3),this.topRightBorderDoubleOuterBox=Xt>0||ae>0?Zr(wt.left+Lr,wt.top+gr/3,ce-Do/3,Ye-gr/3,Po.TOP_RIGHT):new Di(wt.left+wt.width-Do/3,wt.top+gr/3),this.bottomRightBorderDoubleOuterBox=vn>0||ei>0?Zr(wt.left+Fo,wt.top+kr,vn-Do/3,ei-Vo/3,Po.BOTTOM_RIGHT):new Di(wt.left+wt.width-Do/3,wt.top+wt.height-Vo/3),this.bottomLeftBorderDoubleOuterBox=Qi>0||Ki>0?Zr(wt.left+io/3,wt.top+eo,Qi-io/3,Ki-Vo/3,Po.BOTTOM_LEFT):new Di(wt.left+io/3,wt.top+wt.height-Vo/3),this.topLeftBorderDoubleInnerBox=Xt>0||ae>0?Zr(wt.left+io*2/3,wt.top+gr*2/3,Xt-io*2/3,ae-gr*2/3,Po.TOP_LEFT):new Di(wt.left+io*2/3,wt.top+gr*2/3),this.topRightBorderDoubleInnerBox=Xt>0||ae>0?Zr(wt.left+Lr,wt.top+gr*2/3,ce-Do*2/3,Ye-gr*2/3,Po.TOP_RIGHT):new Di(wt.left+wt.width-Do*2/3,wt.top+gr*2/3),this.bottomRightBorderDoubleInnerBox=vn>0||ei>0?Zr(wt.left+Fo,wt.top+kr,vn-Do*2/3,ei-Vo*2/3,Po.BOTTOM_RIGHT):new Di(wt.left+wt.width-Do*2/3,wt.top+wt.height-Vo*2/3),this.bottomLeftBorderDoubleInnerBox=Qi>0||Ki>0?Zr(wt.left+io*2/3,wt.top+eo,Qi-io*2/3,Ki-Vo*2/3,Po.BOTTOM_LEFT):new Di(wt.left+io*2/3,wt.top+wt.height-Vo*2/3),this.topLeftBorderStroke=Xt>0||ae>0?Zr(wt.left+io/2,wt.top+gr/2,Xt-io/2,ae-gr/2,Po.TOP_LEFT):new Di(wt.left+io/2,wt.top+gr/2),this.topRightBorderStroke=Xt>0||ae>0?Zr(wt.left+Lr,wt.top+gr/2,ce-Do/2,Ye-gr/2,Po.TOP_RIGHT):new Di(wt.left+wt.width-Do/2,wt.top+gr/2),this.bottomRightBorderStroke=vn>0||ei>0?Zr(wt.left+Fo,wt.top+kr,vn-Do/2,ei-Vo/2,Po.BOTTOM_RIGHT):new Di(wt.left+wt.width-Do/2,wt.top+wt.height-Vo/2),this.bottomLeftBorderStroke=Qi>0||Ki>0?Zr(wt.left+io/2,wt.top+eo,Qi-io/2,Ki-Vo/2,Po.BOTTOM_LEFT):new Di(wt.left+io/2,wt.top+wt.height-Vo/2),this.topLeftBorderBox=Xt>0||ae>0?Zr(wt.left,wt.top,Xt,ae,Po.TOP_LEFT):new Di(wt.left,wt.top),this.topRightBorderBox=ce>0||Ye>0?Zr(wt.left+Lr,wt.top,ce,Ye,Po.TOP_RIGHT):new Di(wt.left+wt.width,wt.top),this.bottomRightBorderBox=vn>0||ei>0?Zr(wt.left+Fo,wt.top+kr,vn,ei,Po.BOTTOM_RIGHT):new Di(wt.left+wt.width,wt.top+wt.height),this.bottomLeftBorderBox=Qi>0||Ki>0?Zr(wt.left,wt.top+eo,Qi,Ki,Po.BOTTOM_LEFT):new Di(wt.left,wt.top+wt.height),this.topLeftPaddingBox=Xt>0||ae>0?Zr(wt.left+io,wt.top+gr,Math.max(0,Xt-io),Math.max(0,ae-gr),Po.TOP_LEFT):new Di(wt.left+io,wt.top+gr),this.topRightPaddingBox=ce>0||Ye>0?Zr(wt.left+Math.min(Lr,wt.width-Do),wt.top+gr,Lr>wt.width+Do?0:Math.max(0,ce-Do),Math.max(0,Ye-gr),Po.TOP_RIGHT):new Di(wt.left+wt.width-Do,wt.top+gr),this.bottomRightPaddingBox=vn>0||ei>0?Zr(wt.left+Math.min(Fo,wt.width-io),wt.top+Math.min(kr,wt.height-Vo),Math.max(0,vn-Do),Math.max(0,ei-Vo),Po.BOTTOM_RIGHT):new Di(wt.left+wt.width-Do,wt.top+wt.height-Vo),this.bottomLeftPaddingBox=Qi>0||Ki>0?Zr(wt.left+io,wt.top+Math.min(eo,wt.height-Vo),Math.max(0,Qi-io),Math.max(0,Ki-Vo),Po.BOTTOM_LEFT):new Di(wt.left+io,wt.top+wt.height-Vo),this.topLeftContentBox=Xt>0||ae>0?Zr(wt.left+io+ds,wt.top+gr+ra,Math.max(0,Xt-(io+ds)),Math.max(0,ae-(gr+ra)),Po.TOP_LEFT):new Di(wt.left+io+ds,wt.top+gr+ra),this.topRightContentBox=ce>0||Ye>0?Zr(wt.left+Math.min(Lr,wt.width+io+ds),wt.top+gr+ra,Lr>wt.width+io+ds?0:ce-io+ds,Ye-(gr+ra),Po.TOP_RIGHT):new Di(wt.left+wt.width-(Do+dl),wt.top+gr+ra),this.bottomRightContentBox=vn>0||ei>0?Zr(wt.left+Math.min(Fo,wt.width-(io+ds)),wt.top+Math.min(kr,wt.height+gr+ra),Math.max(0,vn-(Do+dl)),ei-(Vo+Ml),Po.BOTTOM_RIGHT):new Di(wt.left+wt.width-(Do+dl),wt.top+wt.height-(Vo+Ml)),this.bottomLeftContentBox=Qi>0||Ki>0?Zr(wt.left+io+ds,wt.top+eo,Math.max(0,Qi-(io+ds)),Ki-(Vo+Ml),Po.BOTTOM_LEFT):new Di(wt.left+io+ds,wt.top+wt.height-(Vo+Ml))}return vt}(),Po;(function(vt){vt[vt.TOP_LEFT=0]="TOP_LEFT",vt[vt.TOP_RIGHT=1]="TOP_RIGHT",vt[vt.BOTTOM_RIGHT=2]="BOTTOM_RIGHT",vt[vt.BOTTOM_LEFT=3]="BOTTOM_LEFT"})(Po||(Po={}));var Zr=function(vt,mt,St,wt,Qt){var Xt=4*((Math.sqrt(2)-1)/3),ae=St*Xt,Pe=wt*Xt,ce=vt+St,Ye=mt+wt;switch(Qt){case Po.TOP_LEFT:return new fs(new Di(vt,Ye),new Di(vt,Ye-Pe),new Di(ce-ae,mt),new Di(ce,mt));case Po.TOP_RIGHT:return new fs(new Di(vt,mt),new Di(vt+ae,mt),new Di(ce,Ye-Pe),new Di(ce,Ye));case Po.BOTTOM_RIGHT:return new fs(new Di(ce,mt),new Di(ce,mt+Pe),new Di(vt+ae,Ye),new Di(vt,Ye));case Po.BOTTOM_LEFT:default:return new fs(new Di(ce,Ye),new Di(ce-ae,Ye),new Di(vt,mt+Pe),new Di(vt,mt))}},$a=function(vt){return[vt.topLeftBorderBox,vt.topRightBorderBox,vt.bottomRightBorderBox,vt.bottomLeftBorderBox]},Ms=function(vt){return[vt.topLeftContentBox,vt.topRightContentBox,vt.bottomRightContentBox,vt.bottomLeftContentBox]},Nu=function(vt){return[vt.topLeftPaddingBox,vt.topRightPaddingBox,vt.bottomRightPaddingBox,vt.bottomLeftPaddingBox]},Ll=function(){function vt(mt,St,wt){this.offsetX=mt,this.offsetY=St,this.matrix=wt,this.type=0,this.target=6}return vt}(),La=function(){function vt(mt,St){this.path=mt,this.target=St,this.type=1}return vt}(),tl=function(){function vt(mt){this.opacity=mt,this.type=2,this.target=6}return vt}(),Zo=function(vt){return vt.type===0},ia=function(vt){return vt.type===1},bA=function(vt){return vt.type===2},mh=function(vt,mt){return vt.length===mt.length?vt.some(function(St,wt){return St===mt[wt]}):!1},Jp=function(vt,mt,St,wt,Qt){return vt.map(function(Xt,ae){switch(ae){case 0:return Xt.add(mt,St);case 1:return Xt.add(mt+wt,St);case 2:return Xt.add(mt+wt,St+Qt);case 3:return Xt.add(mt,St+Qt)}return Xt})},el=function(){function vt(mt){this.element=mt,this.inlineLevel=[],this.nonInlineLevel=[],this.negativeZIndex=[],this.zeroOrAutoZIndexOrTransformedOrOpacity=[],this.positiveZIndex=[],this.nonPositionedFloats=[],this.nonPositionedInlineLevel=[]}return vt}(),mg=function(){function vt(mt,St){if(this.container=mt,this.parent=St,this.effects=[],this.curves=new ma(this.container),this.container.styles.opacity<1&&this.effects.push(new tl(this.container.styles.opacity)),this.container.styles.transform!==null){var wt=this.container.bounds.left+this.container.styles.transformOrigin[0].number,Qt=this.container.bounds.top+this.container.styles.transformOrigin[1].number,Xt=this.container.styles.transform;this.effects.push(new Ll(wt,Qt,Xt))}if(this.container.styles.overflowX!==0){var ae=$a(this.curves),Pe=Nu(this.curves);mh(ae,Pe)?this.effects.push(new La(ae,6)):(this.effects.push(new La(ae,2)),this.effects.push(new La(Pe,4)))}}return vt.prototype.getEffects=function(mt){for(var St=[2,3].indexOf(this.container.styles.position)===-1,wt=this.parent,Qt=this.effects.slice(0);wt;){var Xt=wt.effects.filter(function(ce){return!ia(ce)});if(St||wt.container.styles.position!==0||!wt.parent){if(Qt.unshift.apply(Qt,Xt),St=[2,3].indexOf(wt.container.styles.position)===-1,wt.container.styles.overflowX!==0){var ae=$a(wt.curves),Pe=Nu(wt.curves);mh(ae,Pe)||Qt.unshift(new La(Pe,6))}}else Qt.unshift.apply(Qt,Xt);wt=wt.parent}return Qt.filter(function(ce){return Zs(ce.target,mt)})},vt}(),TA=function(vt,mt,St,wt){vt.container.elements.forEach(function(Qt){var Xt=Zs(Qt.flags,4),ae=Zs(Qt.flags,2),Pe=new mg(Qt,vt);Zs(Qt.styles.display,2048)&&wt.push(Pe);var ce=Zs(Qt.flags,8)?[]:wt;if(Xt||ae){var Ye=Xt||Qt.styles.isPositioned()?St:mt,$e=new el(Pe);if(Qt.styles.isPositioned()||Qt.styles.opacity<1||Qt.styles.isTransformed()){var vn=Qt.styles.zIndex.order;if(vn<0){var ei=0;Ye.negativeZIndex.some(function(Qi,Ki){return vn>Qi.element.container.styles.zIndex.order?(ei=Ki,!1):ei>0}),Ye.negativeZIndex.splice(ei,0,$e)}else if(vn>0){var sr=0;Ye.positiveZIndex.some(function(Qi,Ki){return vn>=Qi.element.container.styles.zIndex.order?(sr=Ki+1,!1):sr>0}),Ye.positiveZIndex.splice(sr,0,$e)}else Ye.zeroOrAutoZIndexOrTransformedOrOpacity.push($e)}else Qt.styles.isFloating()?Ye.nonPositionedFloats.push($e):Ye.nonPositionedInlineLevel.push($e);TA(Pe,$e,Xt?$e:St,ce)}else Qt.styles.isInlineLevel()?mt.inlineLevel.push(Pe):mt.nonInlineLevel.push(Pe),TA(Pe,mt,St,ce);Zs(Qt.flags,8)&&bd(Qt,ce)})},bd=function(vt,mt){for(var St=vt instanceof Vc?vt.start:1,wt=vt instanceof Vc?vt.reversed:!1,Qt=0;Qt<mt.length;Qt++){var Xt=mt[Qt];Xt.container instanceof ku&&typeof Xt.container.value=="number"&&Xt.container.value!==0&&(St=Xt.container.value),Xt.listValue=ht(St,Xt.container.styles.listStyleType,!0),St+=wt?-1:1}},zf=function(vt){var mt=new mg(vt,null),St=new el(mt),wt=[];return TA(mt,St,St,wt),bd(mt.container,wt),St},ec=function(vt,mt){switch(mt){case 0:return qs(vt.topLeftBorderBox,vt.topLeftPaddingBox,vt.topRightBorderBox,vt.topRightPaddingBox);case 1:return qs(vt.topRightBorderBox,vt.topRightPaddingBox,vt.bottomRightBorderBox,vt.bottomRightPaddingBox);case 2:return qs(vt.bottomRightBorderBox,vt.bottomRightPaddingBox,vt.bottomLeftBorderBox,vt.bottomLeftPaddingBox);case 3:default:return qs(vt.bottomLeftBorderBox,vt.bottomLeftPaddingBox,vt.topLeftBorderBox,vt.topLeftPaddingBox)}},vh=function(vt,mt){switch(mt){case 0:return qs(vt.topLeftBorderBox,vt.topLeftBorderDoubleOuterBox,vt.topRightBorderBox,vt.topRightBorderDoubleOuterBox);case 1:return qs(vt.topRightBorderBox,vt.topRightBorderDoubleOuterBox,vt.bottomRightBorderBox,vt.bottomRightBorderDoubleOuterBox);case 2:return qs(vt.bottomRightBorderBox,vt.bottomRightBorderDoubleOuterBox,vt.bottomLeftBorderBox,vt.bottomLeftBorderDoubleOuterBox);case 3:default:return qs(vt.bottomLeftBorderBox,vt.bottomLeftBorderDoubleOuterBox,vt.topLeftBorderBox,vt.topLeftBorderDoubleOuterBox)}},Td=function(vt,mt){switch(mt){case 0:return qs(vt.topLeftBorderDoubleInnerBox,vt.topLeftPaddingBox,vt.topRightBorderDoubleInnerBox,vt.topRightPaddingBox);case 1:return qs(vt.topRightBorderDoubleInnerBox,vt.topRightPaddingBox,vt.bottomRightBorderDoubleInnerBox,vt.bottomRightPaddingBox);case 2:return qs(vt.bottomRightBorderDoubleInnerBox,vt.bottomRightPaddingBox,vt.bottomLeftBorderDoubleInnerBox,vt.bottomLeftPaddingBox);case 3:default:return qs(vt.bottomLeftBorderDoubleInnerBox,vt.bottomLeftPaddingBox,vt.topLeftBorderDoubleInnerBox,vt.topLeftPaddingBox)}},nc=function(vt,mt){switch(mt){case 0:return Qu(vt.topLeftBorderStroke,vt.topRightBorderStroke);case 1:return Qu(vt.topRightBorderStroke,vt.bottomRightBorderStroke);case 2:return Qu(vt.bottomRightBorderStroke,vt.bottomLeftBorderStroke);case 3:default:return Qu(vt.bottomLeftBorderStroke,vt.topLeftBorderStroke)}},Qu=function(vt,mt){var St=[];return es(vt)?St.push(vt.subdivide(.5,!1)):St.push(vt),es(mt)?St.push(mt.subdivide(.5,!0)):St.push(mt),St},qs=function(vt,mt,St,wt){var Qt=[];return es(vt)?Qt.push(vt.subdivide(.5,!1)):Qt.push(vt),es(St)?Qt.push(St.subdivide(.5,!0)):Qt.push(St),es(wt)?Qt.push(wt.subdivide(.5,!0).reverse()):Qt.push(wt),es(mt)?Qt.push(mt.subdivide(.5,!1).reverse()):Qt.push(mt),Qt},Ea=function(vt){var mt=vt.bounds,St=vt.styles;return mt.add(St.borderLeftWidth,St.borderTopWidth,-(St.borderRightWidth+St.borderLeftWidth),-(St.borderTopWidth+St.borderBottomWidth))},Id=function(vt){var mt=vt.styles,St=vt.bounds,wt=Qo(mt.paddingLeft,St.width),Qt=Qo(mt.paddingRight,St.width),Xt=Qo(mt.paddingTop,St.width),ae=Qo(mt.paddingBottom,St.width);return St.add(wt+mt.borderLeftWidth,Xt+mt.borderTopWidth,-(mt.borderRightWidth+mt.borderLeftWidth+wt+Qt),-(mt.borderTopWidth+mt.borderBottomWidth+Xt+ae))},qp=function(vt,mt){return vt===0?mt.bounds:vt===2?Id(mt):Ea(mt)},$p=function(vt,mt){return vt===0?mt.bounds:vt===2?Id(mt):Ea(mt)},ic=function(vt,mt,St){var wt=qp(oc(vt.styles.backgroundOrigin,mt),vt),Qt=$p(oc(vt.styles.backgroundClip,mt),vt),Xt=t0(oc(vt.styles.backgroundSize,mt),St,wt),ae=Xt[0],Pe=Xt[1],ce=Ya(oc(vt.styles.backgroundPosition,mt),wt.width-ae,wt.height-Pe),Ye=Qd(oc(vt.styles.backgroundRepeat,mt),ce,Xt,wt,Qt),$e=Math.round(wt.left+ce[0]),vn=Math.round(wt.top+ce[1]);return[Ye,$e,vn,ae,Pe]},rc=function(vt){return So(vt)&&vt.value===nh.AUTO},Nd=function(vt){return typeof vt=="number"},t0=function(vt,mt,St){var wt=mt[0],Qt=mt[1],Xt=mt[2],ae=vt[0],Pe=vt[1];if(!ae)return[0,0];if(ns(ae)&&Pe&&ns(Pe))return[Qo(ae,St.width),Qo(Pe,St.height)];var ce=Nd(Xt);if(So(ae)&&(ae.value===nh.CONTAIN||ae.value===nh.COVER)){if(Nd(Xt)){var Ye=St.width/St.height;return Ye<Xt!=(ae.value===nh.COVER)?[St.width,St.width/Xt]:[St.height*Xt,St.height]}return[St.width,St.height]}var $e=Nd(wt),vn=Nd(Qt),ei=$e||vn;if(rc(ae)&&(!Pe||rc(Pe))){if($e&&vn)return[wt,Qt];if(!ce&&!ei)return[St.width,St.height];if(ei&&ce){var sr=$e?wt:Qt*Xt,Qi=vn?Qt:wt/Xt;return[sr,Qi]}var Ki=$e?wt:St.width,fo=vn?Qt:St.height;return[Ki,fo]}if(ce){var Pr=0,Lr=0;return ns(ae)?Pr=Qo(ae,St.width):ns(Pe)&&(Lr=Qo(Pe,St.height)),rc(ae)?Pr=Lr*Xt:(!Pe||rc(Pe))&&(Lr=Pr/Xt),[Pr,Lr]}var kr=null,Fo=null;if(ns(ae)?kr=Qo(ae,St.width):Pe&&ns(Pe)&&(Fo=Qo(Pe,St.height)),kr!==null&&(!Pe||rc(Pe))&&(Fo=$e&&vn?kr/wt*Qt:St.height),Fo!==null&&rc(ae)&&(kr=$e&&vn?Fo/Qt*wt:St.width),kr!==null&&Fo!==null)return[kr,Fo];throw new Error("Unable to calculate background-size for element")},oc=function(vt,mt){var St=vt[mt];return typeof St=="undefined"?vt[0]:St},Qd=function(vt,mt,St,wt,Qt){var Xt=mt[0],ae=mt[1],Pe=St[0],ce=St[1];switch(vt){case 2:return[new Di(Math.round(wt.left),Math.round(wt.top+ae)),new Di(Math.round(wt.left+wt.width),Math.round(wt.top+ae)),new Di(Math.round(wt.left+wt.width),Math.round(ce+wt.top+ae)),new Di(Math.round(wt.left),Math.round(ce+wt.top+ae))];case 3:return[new Di(Math.round(wt.left+Xt),Math.round(wt.top)),new Di(Math.round(wt.left+Xt+Pe),Math.round(wt.top)),new Di(Math.round(wt.left+Xt+Pe),Math.round(wt.height+wt.top)),new Di(Math.round(wt.left+Xt),Math.round(wt.height+wt.top))];case 1:return[new Di(Math.round(wt.left+Xt),Math.round(wt.top+ae)),new Di(Math.round(wt.left+Xt+Pe),Math.round(wt.top+ae)),new Di(Math.round(wt.left+Xt+Pe),Math.round(wt.top+ae+ce)),new Di(Math.round(wt.left+Xt),Math.round(wt.top+ae+ce))];default:return[new Di(Math.round(Qt.left),Math.round(Qt.top)),new Di(Math.round(Qt.left+Qt.width),Math.round(Qt.top)),new Di(Math.round(Qt.left+Qt.width),Math.round(Qt.height+Qt.top)),new Di(Math.round(Qt.left),Math.round(Qt.height+Qt.top))]}},vg="data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7",cA="Hidden Text",eu=function(){function vt(mt){this._data={},this._document=mt}return vt.prototype.parseMetrics=function(mt,St){var wt=this._document.createElement("div"),Qt=this._document.createElement("img"),Xt=this._document.createElement("span"),ae=this._document.body;wt.style.visibility="hidden",wt.style.fontFamily=mt,wt.style.fontSize=St,wt.style.margin="0",wt.style.padding="0",wt.style.whiteSpace="nowrap",ae.appendChild(wt),Qt.src=vg,Qt.width=1,Qt.height=1,Qt.style.margin="0",Qt.style.padding="0",Qt.style.verticalAlign="baseline",Xt.style.fontFamily=mt,Xt.style.fontSize=St,Xt.style.margin="0",Xt.style.padding="0",Xt.appendChild(this._document.createTextNode(cA)),wt.appendChild(Xt),wt.appendChild(Qt);var Pe=Qt.offsetTop-Xt.offsetTop+2;wt.removeChild(Xt),wt.appendChild(this._document.createTextNode(cA)),wt.style.lineHeight="normal",Qt.style.verticalAlign="super";var ce=Qt.offsetTop-wt.offsetTop+2;return ae.removeChild(wt),{baseline:Pe,middle:ce}},vt.prototype.getMetrics=function(mt,St){var wt=mt+" "+St;return typeof this._data[wt]=="undefined"&&(this._data[wt]=this.parseMetrics(mt,St)),this._data[wt]},vt}(),Ud=function(){function vt(mt,St){this.context=mt,this.options=St}return vt}(),El=1e4,sc=function(vt){ne(mt,vt);function mt(St,wt){var Qt=vt.call(this,St,wt)||this;return Qt._activeEffects=[],Qt.canvas=wt.canvas?wt.canvas:document.createElement("canvas"),Qt.ctx=Qt.canvas.getContext("2d"),wt.canvas||(Qt.canvas.width=Math.floor(wt.width*wt.scale),Qt.canvas.height=Math.floor(wt.height*wt.scale),Qt.canvas.style.width=wt.width+"px",Qt.canvas.style.height=wt.height+"px"),Qt.fontMetrics=new eu(document),Qt.ctx.scale(Qt.options.scale,Qt.options.scale),Qt.ctx.translate(-wt.x,-wt.y),Qt.ctx.textBaseline="bottom",Qt._activeEffects=[],Qt.context.logger.debug("Canvas renderer initialized ("+wt.width+"x"+wt.height+") with scale "+wt.scale),Qt}return mt.prototype.applyEffects=function(St){for(var wt=this;this._activeEffects.length;)this.popEffect();St.forEach(function(Qt){return wt.applyEffect(Qt)})},mt.prototype.applyEffect=function(St){this.ctx.save(),bA(St)&&(this.ctx.globalAlpha=St.opacity),Zo(St)&&(this.ctx.translate(St.offsetX,St.offsetY),this.ctx.transform(St.matrix[0],St.matrix[1],St.matrix[2],St.matrix[3],St.matrix[4],St.matrix[5]),this.ctx.translate(-St.offsetX,-St.offsetY)),ia(St)&&(this.path(St.path),this.ctx.clip()),this._activeEffects.push(St)},mt.prototype.popEffect=function(){this._activeEffects.pop(),this.ctx.restore()},mt.prototype.renderStack=function(St){return Be(this,void 0,void 0,function(){var wt;return Ee(this,function(Qt){switch(Qt.label){case 0:return wt=St.element.container.styles,wt.isVisible()?[4,this.renderStackContent(St)]:[3,2];case 1:Qt.sent(),Qt.label=2;case 2:return[2]}})})},mt.prototype.renderNode=function(St){return Be(this,void 0,void 0,function(){return Ee(this,function(wt){switch(wt.label){case 0:if(Zs(St.container.flags,16))debugger;return St.container.styles.isVisible()?[4,this.renderNodeBackgroundAndBorders(St)]:[3,3];case 1:return wt.sent(),[4,this.renderNodeContent(St)];case 2:wt.sent(),wt.label=3;case 3:return[2]}})})},mt.prototype.renderTextWithLetterSpacing=function(St,wt,Qt){var Xt=this;if(wt===0)this.ctx.fillText(St.text,St.bounds.left,St.bounds.top+Qt);else{var ae=Kh(St.text);ae.reduce(function(Pe,ce){return Xt.ctx.fillText(ce,Pe,St.bounds.top+Qt),Pe+Xt.ctx.measureText(ce).width},St.bounds.left)}},mt.prototype.createFontStyle=function(St){var wt=St.fontVariant.filter(function(ae){return ae==="normal"||ae==="small-caps"}).join(""),Qt=n0(St.fontFamily).join(", "),Xt=wo(St.fontSize)?""+St.fontSize.number+St.fontSize.unit:St.fontSize.number+"px";return[[St.fontStyle,wt,St.fontWeight,Xt,Qt].join(" "),Qt,Xt]},mt.prototype.renderTextNode=function(St,wt){return Be(this,void 0,void 0,function(){var Qt,Xt,ae,Pe,ce,Ye,$e,vn,ei=this;return Ee(this,function(sr){return Qt=this.createFontStyle(wt),Xt=Qt[0],ae=Qt[1],Pe=Qt[2],this.ctx.font=Xt,this.ctx.direction=wt.direction===1?"rtl":"ltr",this.ctx.textAlign="left",this.ctx.textBaseline="alphabetic",ce=this.fontMetrics.getMetrics(ae,Pe),Ye=ce.baseline,$e=ce.middle,vn=wt.paintOrder,St.textBounds.forEach(function(Qi){vn.forEach(function(Ki){switch(Ki){case 0:ei.ctx.fillStyle=No(wt.color),ei.renderTextWithLetterSpacing(Qi,wt.letterSpacing,Ye);var fo=wt.textShadow;fo.length&&Qi.text.trim().length&&(fo.slice(0).reverse().forEach(function(Pr){ei.ctx.shadowColor=No(Pr.color),ei.ctx.shadowOffsetX=Pr.offsetX.number*ei.options.scale,ei.ctx.shadowOffsetY=Pr.offsetY.number*ei.options.scale,ei.ctx.shadowBlur=Pr.blur.number,ei.renderTextWithLetterSpacing(Qi,wt.letterSpacing,Ye)}),ei.ctx.shadowColor="",ei.ctx.shadowOffsetX=0,ei.ctx.shadowOffsetY=0,ei.ctx.shadowBlur=0),wt.textDecorationLine.length&&(ei.ctx.fillStyle=No(wt.textDecorationColor||wt.color),wt.textDecorationLine.forEach(function(Pr){switch(Pr){case 1:ei.ctx.fillRect(Qi.bounds.left,Math.round(Qi.bounds.top+Ye),Qi.bounds.width,1);break;case 2:ei.ctx.fillRect(Qi.bounds.left,Math.round(Qi.bounds.top),Qi.bounds.width,1);break;case 3:ei.ctx.fillRect(Qi.bounds.left,Math.ceil(Qi.bounds.top+$e),Qi.bounds.width,1);break}}));break;case 1:wt.webkitTextStrokeWidth&&Qi.text.trim().length&&(ei.ctx.strokeStyle=No(wt.webkitTextStrokeColor),ei.ctx.lineWidth=wt.webkitTextStrokeWidth,ei.ctx.lineJoin=window.chrome?"miter":"round",ei.ctx.strokeText(Qi.text,Qi.bounds.left,Qi.bounds.top+Ye)),ei.ctx.strokeStyle="",ei.ctx.lineWidth=0,ei.ctx.lineJoin="miter";break}})}),[2]})})},mt.prototype.renderReplacedElement=function(St,wt,Qt){if(Qt&&St.intrinsicWidth>0&&St.intrinsicHeight>0){var Xt=Id(St),ae=Nu(wt);this.path(ae),this.ctx.save(),this.ctx.clip(),this.ctx.drawImage(Qt,0,0,St.intrinsicWidth,St.intrinsicHeight,Xt.left,Xt.top,Xt.width,Xt.height),this.ctx.restore()}},mt.prototype.renderNodeContent=function(St){return Be(this,void 0,void 0,function(){var wt,Qt,Xt,ae,Pe,ce,Lr,Lr,Ye,$e,vn,ei,Fo,sr,Qi,eo,Ki,fo,Pr,Lr,kr,Fo,eo;return Ee(this,function(gr){switch(gr.label){case 0:this.applyEffects(St.getEffects(4)),wt=St.container,Qt=St.curves,Xt=wt.styles,ae=0,Pe=wt.textNodes,gr.label=1;case 1:return ae<Pe.length?(ce=Pe[ae],[4,this.renderTextNode(ce,Xt)]):[3,4];case 2:gr.sent(),gr.label=3;case 3:return ae++,[3,1];case 4:if(!(wt instanceof zc))return[3,8];gr.label=5;case 5:return gr.trys.push([5,7,,8]),[4,this.context.cache.match(wt.src)];case 6:return Lr=gr.sent(),this.renderReplacedElement(wt,Qt,Lr),[3,8];case 7:return gr.sent(),this.context.logger.error("Error loading image "+wt.src),[3,8];case 8:if(wt instanceof Kc&&this.renderReplacedElement(wt,Qt,wt.canvas),!(wt instanceof jc))return[3,12];gr.label=9;case 9:return gr.trys.push([9,11,,12]),[4,this.context.cache.match(wt.svg)];case 10:return Lr=gr.sent(),this.renderReplacedElement(wt,Qt,Lr),[3,12];case 11:return gr.sent(),this.context.logger.error("Error loading svg "+wt.svg.substring(0,255)),[3,12];case 12:return wt instanceof Pd&&wt.tree?(Ye=new mt(this.context,{scale:this.options.scale,backgroundColor:wt.backgroundColor,x:0,y:0,width:wt.width,height:wt.height}),[4,Ye.render(wt.tree)]):[3,14];case 13:$e=gr.sent(),wt.width&&wt.height&&this.ctx.drawImage($e,0,0,wt.width,wt.height,wt.bounds.left,wt.bounds.top,wt.bounds.width,wt.bounds.height),gr.label=14;case 14:if(wt instanceof Ol&&(vn=Math.min(wt.bounds.width,wt.bounds.height),wt.type===Wh?wt.checked&&(this.ctx.save(),this.path([new Di(wt.bounds.left+vn*.39363,wt.bounds.top+vn*.79),new Di(wt.bounds.left+vn*.16,wt.bounds.top+vn*.5549),new Di(wt.bounds.left+vn*.27347,wt.bounds.top+vn*.44071),new Di(wt.bounds.left+vn*.39694,wt.bounds.top+vn*.5649),new Di(wt.bounds.left+vn*.72983,wt.bounds.top+vn*.23),new Di(wt.bounds.left+vn*.84,wt.bounds.top+vn*.34085),new Di(wt.bounds.left+vn*.39363,wt.bounds.top+vn*.79)]),this.ctx.fillStyle=No(Nf),this.ctx.fill(),this.ctx.restore()):wt.type===JA&&wt.checked&&(this.ctx.save(),this.ctx.beginPath(),this.ctx.arc(wt.bounds.left+vn/2,wt.bounds.top+vn/2,vn/4,0,Math.PI*2,!0),this.ctx.fillStyle=No(Nf),this.ctx.fill(),this.ctx.restore())),km(wt)&&wt.value.length){switch(ei=this.createFontStyle(Xt),Fo=ei[0],sr=ei[1],Qi=this.fontMetrics.getMetrics(Fo,sr).baseline,this.ctx.font=Fo,this.ctx.fillStyle=No(Xt.color),this.ctx.textBaseline="alphabetic",this.ctx.textAlign=Mr(wt.styles.textAlign),eo=Id(wt),Ki=0,wt.styles.textAlign){case 1:Ki+=eo.width/2;break;case 2:Ki+=eo.width;break}fo=eo.add(Ki,0,0,-eo.height/2+1),this.ctx.save(),this.path([new Di(eo.left,eo.top),new Di(eo.left+eo.width,eo.top),new Di(eo.left+eo.width,eo.top+eo.height),new Di(eo.left,eo.top+eo.height)]),this.ctx.clip(),this.renderTextWithLetterSpacing(new ga(wt.value,fo),Xt.letterSpacing,Qi),this.ctx.restore(),this.ctx.textBaseline="alphabetic",this.ctx.textAlign="left"}if(!Zs(wt.styles.display,2048))return[3,20];if(wt.styles.listStyleImage===null)return[3,19];if(Pr=wt.styles.listStyleImage,Pr.type!==0)return[3,18];Lr=void 0,kr=Pr.url,gr.label=15;case 15:return gr.trys.push([15,17,,18]),[4,this.context.cache.match(kr)];case 16:return Lr=gr.sent(),this.ctx.drawImage(Lr,wt.bounds.left-(Lr.width+10),wt.bounds.top),[3,18];case 17:return gr.sent(),this.context.logger.error("Error loading list-style-image "+kr),[3,18];case 18:return[3,20];case 19:St.listValue&&wt.styles.listStyleType!==-1&&(Fo=this.createFontStyle(Xt)[0],this.ctx.font=Fo,this.ctx.fillStyle=No(Xt.color),this.ctx.textBaseline="middle",this.ctx.textAlign="right",eo=new Fe(wt.bounds.left,wt.bounds.top+Qo(wt.styles.paddingTop,wt.bounds.width),wt.bounds.width,Xs(Xt.lineHeight,Xt.fontSize.number)/2+1),this.renderTextWithLetterSpacing(new ga(St.listValue,eo),Xt.letterSpacing,Xs(Xt.lineHeight,Xt.fontSize.number)/2+2),this.ctx.textBaseline="bottom",this.ctx.textAlign="left"),gr.label=20;case 20:return[2]}})})},mt.prototype.renderStackContent=function(St){return Be(this,void 0,void 0,function(){var wt,Qt,Pr,Xt,ae,Pr,Pe,ce,Pr,Ye,$e,Pr,vn,ei,Pr,sr,Qi,Pr,Ki,fo,Pr;return Ee(this,function(Lr){switch(Lr.label){case 0:if(Zs(St.element.container.flags,16))debugger;return[4,this.renderNodeBackgroundAndBorders(St.element)];case 1:Lr.sent(),wt=0,Qt=St.negativeZIndex,Lr.label=2;case 2:return wt<Qt.length?(Pr=Qt[wt],[4,this.renderStack(Pr)]):[3,5];case 3:Lr.sent(),Lr.label=4;case 4:return wt++,[3,2];case 5:return[4,this.renderNodeContent(St.element)];case 6:Lr.sent(),Xt=0,ae=St.nonInlineLevel,Lr.label=7;case 7:return Xt<ae.length?(Pr=ae[Xt],[4,this.renderNode(Pr)]):[3,10];case 8:Lr.sent(),Lr.label=9;case 9:return Xt++,[3,7];case 10:Pe=0,ce=St.nonPositionedFloats,Lr.label=11;case 11:return Pe<ce.length?(Pr=ce[Pe],[4,this.renderStack(Pr)]):[3,14];case 12:Lr.sent(),Lr.label=13;case 13:return Pe++,[3,11];case 14:Ye=0,$e=St.nonPositionedInlineLevel,Lr.label=15;case 15:return Ye<$e.length?(Pr=$e[Ye],[4,this.renderStack(Pr)]):[3,18];case 16:Lr.sent(),Lr.label=17;case 17:return Ye++,[3,15];case 18:vn=0,ei=St.inlineLevel,Lr.label=19;case 19:return vn<ei.length?(Pr=ei[vn],[4,this.renderNode(Pr)]):[3,22];case 20:Lr.sent(),Lr.label=21;case 21:return vn++,[3,19];case 22:sr=0,Qi=St.zeroOrAutoZIndexOrTransformedOrOpacity,Lr.label=23;case 23:return sr<Qi.length?(Pr=Qi[sr],[4,this.renderStack(Pr)]):[3,26];case 24:Lr.sent(),Lr.label=25;case 25:return sr++,[3,23];case 26:Ki=0,fo=St.positiveZIndex,Lr.label=27;case 27:return Ki<fo.length?(Pr=fo[Ki],[4,this.renderStack(Pr)]):[3,30];case 28:Lr.sent(),Lr.label=29;case 29:return Ki++,[3,27];case 30:return[2]}})})},mt.prototype.mask=function(St){this.ctx.beginPath(),this.ctx.moveTo(0,0),this.ctx.lineTo(this.canvas.width,0),this.ctx.lineTo(this.canvas.width,this.canvas.height),this.ctx.lineTo(0,this.canvas.height),this.ctx.lineTo(0,0),this.formatPath(St.slice(0).reverse()),this.ctx.closePath()},mt.prototype.path=function(St){this.ctx.beginPath(),this.formatPath(St),this.ctx.closePath()},mt.prototype.formatPath=function(St){var wt=this;St.forEach(function(Qt,Xt){var ae=es(Qt)?Qt.start:Qt;Xt===0?wt.ctx.moveTo(ae.x,ae.y):wt.ctx.lineTo(ae.x,ae.y),es(Qt)&&wt.ctx.bezierCurveTo(Qt.startControl.x,Qt.startControl.y,Qt.endControl.x,Qt.endControl.y,Qt.end.x,Qt.end.y)})},mt.prototype.renderRepeat=function(St,wt,Qt,Xt){this.path(St),this.ctx.fillStyle=wt,this.ctx.translate(Qt,Xt),this.ctx.fill(),this.ctx.translate(-Qt,-Xt)},mt.prototype.resizeImage=function(St,wt,Qt){var Xt;if(St.width===wt&&St.height===Qt)return St;var ae=(Xt=this.canvas.ownerDocument)!==null&&Xt!==void 0?Xt:document,Pe=ae.createElement("canvas");Pe.width=Math.max(1,wt),Pe.height=Math.max(1,Qt);var ce=Pe.getContext("2d");return ce.drawImage(St,0,0,St.width,St.height,0,0,wt,Qt),Pe},mt.prototype.renderBackgroundImage=function(St){return Be(this,void 0,void 0,function(){var wt,Qt,Xt,ae,Pe,ce;return Ee(this,function(Ye){switch(Ye.label){case 0:wt=St.styles.backgroundImage.length-1,Qt=function($e){var vn,ei,sr,ra,gl,Hl,ds,va,Vo,Qi,ra,gl,Hl,ds,va,Ki,fo,Pr,Lr,kr,Fo,eo,gr,Do,Vo,io,ra,dl,Ml,ds,va,iu,gl,Hl,ru,je,Uu,ac,Du,Ou,yh,za;return Ee(this,function(fA){switch(fA.label){case 0:if($e.type!==0)return[3,5];vn=void 0,ei=$e.url,fA.label=1;case 1:return fA.trys.push([1,3,,4]),[4,Xt.context.cache.match(ei)];case 2:return vn=fA.sent(),[3,4];case 3:return fA.sent(),Xt.context.logger.error("Error loading background-image "+ei),[3,4];case 4:return vn&&(sr=ic(St,wt,[vn.width,vn.height,vn.width/vn.height]),ra=sr[0],gl=sr[1],Hl=sr[2],ds=sr[3],va=sr[4],Vo=Xt.ctx.createPattern(Xt.resizeImage(vn,ds,va),"repeat"),Xt.renderRepeat(ra,Vo,gl,Hl)),[3,6];case 5:fu($e)?(Qi=ic(St,wt,[null,null,null]),ra=Qi[0],gl=Qi[1],Hl=Qi[2],ds=Qi[3],va=Qi[4],Ki=CA($e.angle,ds,va),fo=Ki[0],Pr=Ki[1],Lr=Ki[2],kr=Ki[3],Fo=Ki[4],eo=document.createElement("canvas"),eo.width=ds,eo.height=va,gr=eo.getContext("2d"),Do=gr.createLinearGradient(Pr,kr,Lr,Fo),qe($e.stops,fo).forEach(function(Vf){return Do.addColorStop(Vf.stop,No(Vf.color))}),gr.fillStyle=Do,gr.fillRect(0,0,ds,va),ds>0&&va>0&&(Vo=Xt.ctx.createPattern(eo,"repeat"),Xt.renderRepeat(ra,Vo,gl,Hl))):vo($e)&&(io=ic(St,wt,[null,null,null]),ra=io[0],dl=io[1],Ml=io[2],ds=io[3],va=io[4],iu=$e.position.length===0?[Zu]:$e.position,gl=Qo(iu[0],ds),Hl=Qo(iu[iu.length-1],va),ru=_l($e,gl,Hl,ds,va),je=ru[0],Uu=ru[1],je>0&&Uu>0&&(ac=Xt.ctx.createRadialGradient(dl+gl,Ml+Hl,0,dl+gl,Ml+Hl,je),qe($e.stops,je*2).forEach(function(Vf){return ac.addColorStop(Vf.stop,No(Vf.color))}),Xt.path(ra),Xt.ctx.fillStyle=ac,je!==Uu?(Du=St.bounds.left+.5*St.bounds.width,Ou=St.bounds.top+.5*St.bounds.height,yh=Uu/je,za=1/yh,Xt.ctx.save(),Xt.ctx.translate(Du,Ou),Xt.ctx.transform(1,0,0,yh,0,0),Xt.ctx.translate(-Du,-Ou),Xt.ctx.fillRect(dl,za*(Ml-Ou)+Ou,ds,va*za),Xt.ctx.restore()):Xt.ctx.fill())),fA.label=6;case 6:return wt--,[2]}})},Xt=this,ae=0,Pe=St.styles.backgroundImage.slice(0).reverse(),Ye.label=1;case 1:return ae<Pe.length?(ce=Pe[ae],[5,Qt(ce)]):[3,4];case 2:Ye.sent(),Ye.label=3;case 3:return ae++,[3,1];case 4:return[2]}})})},mt.prototype.renderSolidBorder=function(St,wt,Qt){return Be(this,void 0,void 0,function(){return Ee(this,function(Xt){return this.path(ec(Qt,wt)),this.ctx.fillStyle=No(St),this.ctx.fill(),[2]})})},mt.prototype.renderDoubleBorder=function(St,wt,Qt,Xt){return Be(this,void 0,void 0,function(){var ae,Pe;return Ee(this,function(ce){switch(ce.label){case 0:return wt<3?[4,this.renderSolidBorder(St,Qt,Xt)]:[3,2];case 1:return ce.sent(),[2];case 2:return ae=vh(Xt,Qt),this.path(ae),this.ctx.fillStyle=No(St),this.ctx.fill(),Pe=Td(Xt,Qt),this.path(Pe),this.ctx.fill(),[2]}})})},mt.prototype.renderNodeBackgroundAndBorders=function(St){return Be(this,void 0,void 0,function(){var wt,Qt,Xt,ae,Pe,ce,Ye,$e,vn=this;return Ee(this,function(ei){switch(ei.label){case 0:return this.applyEffects(St.getEffects(2)),wt=St.container.styles,Qt=!vs(wt.backgroundColor)||wt.backgroundImage.length,Xt=[{style:wt.borderTopStyle,color:wt.borderTopColor,width:wt.borderTopWidth},{style:wt.borderRightStyle,color:wt.borderRightColor,width:wt.borderRightWidth},{style:wt.borderBottomStyle,color:wt.borderBottomColor,width:wt.borderBottomWidth},{style:wt.borderLeftStyle,color:wt.borderLeftColor,width:wt.borderLeftWidth}],ae=Dd(oc(wt.backgroundClip,0),St.curves),Qt||wt.boxShadow.length?(this.ctx.save(),this.path(ae),this.ctx.clip(),vs(wt.backgroundColor)||(this.ctx.fillStyle=No(wt.backgroundColor),this.ctx.fill()),[4,this.renderBackgroundImage(St.container)]):[3,2];case 1:ei.sent(),this.ctx.restore(),wt.boxShadow.slice(0).reverse().forEach(function(sr){vn.ctx.save();var Qi=$a(St.curves),Ki=sr.inset?0:El,fo=Jp(Qi,-Ki+(sr.inset?1:-1)*sr.spread.number,(sr.inset?1:-1)*sr.spread.number,sr.spread.number*(sr.inset?-2:2),sr.spread.number*(sr.inset?-2:2));sr.inset?(vn.path(Qi),vn.ctx.clip(),vn.mask(fo)):(vn.mask(Qi),vn.ctx.clip(),vn.path(fo)),vn.ctx.shadowOffsetX=sr.offsetX.number+Ki,vn.ctx.shadowOffsetY=sr.offsetY.number,vn.ctx.shadowColor=No(sr.color),vn.ctx.shadowBlur=sr.blur.number,vn.ctx.fillStyle=sr.inset?No(sr.color):"rgba(0,0,0,1)",vn.ctx.fill(),vn.ctx.restore()}),ei.label=2;case 2:Pe=0,ce=0,Ye=Xt,ei.label=3;case 3:return ce<Ye.length?($e=Ye[ce],$e.style!==0&&!vs($e.color)&&$e.width>0?$e.style!==2?[3,5]:[4,this.renderDashedDottedBorder($e.color,$e.width,Pe,St.curves,2)]:[3,11]):[3,13];case 4:return ei.sent(),[3,11];case 5:return $e.style!==3?[3,7]:[4,this.renderDashedDottedBorder($e.color,$e.width,Pe,St.curves,3)];case 6:return ei.sent(),[3,11];case 7:return $e.style!==4?[3,9]:[4,this.renderDoubleBorder($e.color,$e.width,Pe,St.curves)];case 8:return ei.sent(),[3,11];case 9:return[4,this.renderSolidBorder($e.color,Pe,St.curves)];case 10:ei.sent(),ei.label=11;case 11:Pe++,ei.label=12;case 12:return ce++,[3,3];case 13:return[2]}})})},mt.prototype.renderDashedDottedBorder=function(St,wt,Qt,Xt,ae){return Be(this,void 0,void 0,function(){var Pe,ce,Ye,$e,vn,ei,sr,Qi,Ki,fo,Pr,Lr,kr,Fo,eo,gr,eo,gr;return Ee(this,function(Do){return this.ctx.save(),Pe=nc(Xt,Qt),ce=ec(Xt,Qt),ae===2&&(this.path(ce),this.ctx.clip()),es(ce[0])?(Ye=ce[0].start.x,$e=ce[0].start.y):(Ye=ce[0].x,$e=ce[0].y),es(ce[1])?(vn=ce[1].end.x,ei=ce[1].end.y):(vn=ce[1].x,ei=ce[1].y),Qt===0||Qt===2?sr=Math.abs(Ye-vn):sr=Math.abs($e-ei),this.ctx.beginPath(),ae===3?this.formatPath(Pe):this.formatPath(ce.slice(0,2)),Qi=wt<3?wt*3:wt*2,Ki=wt<3?wt*2:wt,ae===3&&(Qi=wt,Ki=wt),fo=!0,sr<=Qi*2?fo=!1:sr<=Qi*2+Ki?(Pr=sr/(2*Qi+Ki),Qi*=Pr,Ki*=Pr):(Lr=Math.floor((sr+Ki)/(Qi+Ki)),kr=(sr-Lr*Qi)/(Lr-1),Fo=(sr-(Lr+1)*Qi)/Lr,Ki=Fo<=0||Math.abs(Ki-kr)<Math.abs(Ki-Fo)?kr:Fo),fo&&(ae===3?this.ctx.setLineDash([0,Qi+Ki]):this.ctx.setLineDash([Qi,Ki])),ae===3?(this.ctx.lineCap="round",this.ctx.lineWidth=wt):this.ctx.lineWidth=wt*2+1.1,this.ctx.strokeStyle=No(St),this.ctx.stroke(),this.ctx.setLineDash([]),ae===2&&(es(ce[0])&&(eo=ce[3],gr=ce[0],this.ctx.beginPath(),this.formatPath([new Di(eo.end.x,eo.end.y),new Di(gr.start.x,gr.start.y)]),this.ctx.stroke()),es(ce[1])&&(eo=ce[1],gr=ce[2],this.ctx.beginPath(),this.formatPath([new Di(eo.end.x,eo.end.y),new Di(gr.start.x,gr.start.y)]),this.ctx.stroke())),this.ctx.restore(),[2]})})},mt.prototype.render=function(St){return Be(this,void 0,void 0,function(){var wt;return Ee(this,function(Qt){switch(Qt.label){case 0:return this.options.backgroundColor&&(this.ctx.fillStyle=No(this.options.backgroundColor),this.ctx.fillRect(this.options.x,this.options.y,this.options.width,this.options.height)),wt=zf(St),[4,this.renderStack(wt)];case 1:return Qt.sent(),this.applyEffects([]),[2,this.canvas]}})})},mt}(Ud),km=function(vt){return vt instanceof _c||vt instanceof Qf?!0:vt instanceof Ol&&vt.type!==JA&&vt.type!==Wh},Dd=function(vt,mt){switch(vt){case 0:return $a(mt);case 2:return Ms(mt);case 1:default:return Nu(mt)}},Mr=function(vt){switch(vt){case 1:return"center";case 2:return"right";case 0:default:return"left"}},e0=["-apple-system","system-ui"],n0=function(vt){return/iPhone OS 15_(0|1)/.test(window.navigator.userAgent)?vt.filter(function(mt){return e0.indexOf(mt)===-1}):vt},ep=function(vt){ne(mt,vt);function mt(St,wt){var Qt=vt.call(this,St,wt)||this;return Qt.canvas=wt.canvas?wt.canvas:document.createElement("canvas"),Qt.ctx=Qt.canvas.getContext("2d"),Qt.options=wt,Qt.canvas.width=Math.floor(wt.width*wt.scale),Qt.canvas.height=Math.floor(wt.height*wt.scale),Qt.canvas.style.width=wt.width+"px",Qt.canvas.style.height=wt.height+"px",Qt.ctx.scale(Qt.options.scale,Qt.options.scale),Qt.ctx.translate(-wt.x,-wt.y),Qt.context.logger.debug("EXPERIMENTAL ForeignObject renderer initialized ("+wt.width+"x"+wt.height+" at "+wt.x+","+wt.y+") with scale "+wt.scale),Qt}return mt.prototype.render=function(St){return Be(this,void 0,void 0,function(){var wt,Qt;return Ee(this,function(Xt){switch(Xt.label){case 0:return wt=Gc(this.options.width*this.options.scale,this.options.height*this.options.scale,this.options.scale,this.options.scale,St),[4,Kf(wt)];case 1:return Qt=Xt.sent(),this.options.backgroundColor&&(this.ctx.fillStyle=No(this.options.backgroundColor),this.ctx.fillRect(0,0,this.options.width*this.options.scale,this.options.height*this.options.scale)),this.ctx.drawImage(Qt,-this.options.x*this.options.scale,-this.options.y*this.options.scale),[2,this.canvas]}})})},mt}(Ud),Kf=function(vt){return new Promise(function(mt,St){var wt=new Image;wt.onload=function(){mt(wt)},wt.onerror=St,wt.src="data:image/svg+xml;charset=utf-8,"+encodeURIComponent(new XMLSerializer().serializeToString(vt))})},jf=function(){function vt(mt){var St=mt.id,wt=mt.enabled;this.id=St,this.enabled=wt,this.start=Date.now()}return vt.prototype.debug=function(){for(var mt=[],St=0;St<arguments.length;St++)mt[St]=arguments[St];this.enabled&&(typeof window!="undefined"&&window.console&&typeof console.debug=="function"?console.debug.apply(console,Ze([this.id,this.getTime()+"ms"],mt)):this.info.apply(this,mt))},vt.prototype.getTime=function(){return Date.now()-this.start},vt.prototype.info=function(){for(var mt=[],St=0;St<arguments.length;St++)mt[St]=arguments[St];this.enabled&&typeof window!="undefined"&&window.console&&typeof console.info=="function"&&console.info.apply(console,Ze([this.id,this.getTime()+"ms"],mt))},vt.prototype.warn=function(){for(var mt=[],St=0;St<arguments.length;St++)mt[St]=arguments[St];this.enabled&&(typeof window!="undefined"&&window.console&&typeof console.warn=="function"?console.warn.apply(console,Ze([this.id,this.getTime()+"ms"],mt)):this.info.apply(this,mt))},vt.prototype.error=function(){for(var mt=[],St=0;St<arguments.length;St++)mt[St]=arguments[St];this.enabled&&(typeof window!="undefined"&&window.console&&typeof console.error=="function"?console.error.apply(console,Ze([this.id,this.getTime()+"ms"],mt)):this.info.apply(this,mt))},vt.instances={},vt}(),nu=function(){function vt(mt,St){var wt;this.windowBounds=St,this.instanceName="#"+vt.instanceCount++,this.logger=new jf({id:this.instanceName,enabled:mt.logging}),this.cache=(wt=mt.cache)!==null&&wt!==void 0?wt:new to(this,mt)}return vt.instanceCount=1,vt}(),np=function(vt,mt){return mt===void 0&&(mt={}),ip(vt,mt)};typeof window!="undefined"&&Hi.setContext(window);var ip=function(vt,mt){return Be(void 0,void 0,void 0,function(){var St,wt,Qt,Xt,ae,Pe,ce,Ye,$e,vn,ei,sr,Qi,Ki,fo,Pr,Lr,kr,Fo,eo,Do,gr,Do,Vo,io,ra,dl,Ml,ds,va,iu,gl,Hl,ru,je,Uu,ac,Du,Ou,yh;return Ee(this,function(za){switch(za.label){case 0:if(!vt||typeof vt!="object")return[2,Promise.reject("Invalid element provided as first argument")];if(St=vt.ownerDocument,!St)throw new Error("Element is not attached to a Document");if(wt=St.defaultView,!wt)throw new Error("Document is not attached to a Window");return Qt={allowTaint:(Vo=mt.allowTaint)!==null&&Vo!==void 0?Vo:!1,imageTimeout:(io=mt.imageTimeout)!==null&&io!==void 0?io:15e3,proxy:mt.proxy,useCORS:(ra=mt.useCORS)!==null&&ra!==void 0?ra:!1},Xt=bt({logging:(dl=mt.logging)!==null&&dl!==void 0?dl:!0,cache:mt.cache},Qt),ae={windowWidth:(Ml=mt.windowWidth)!==null&&Ml!==void 0?Ml:wt.innerWidth,windowHeight:(ds=mt.windowHeight)!==null&&ds!==void 0?ds:wt.innerHeight,scrollX:(va=mt.scrollX)!==null&&va!==void 0?va:wt.pageXOffset,scrollY:(iu=mt.scrollY)!==null&&iu!==void 0?iu:wt.pageYOffset},Pe=new Fe(ae.scrollX,ae.scrollY,ae.windowWidth,ae.windowHeight),ce=new nu(Xt,Pe),Ye=(gl=mt.foreignObjectRendering)!==null&&gl!==void 0?gl:!1,$e={allowTaint:(Hl=mt.allowTaint)!==null&&Hl!==void 0?Hl:!1,onclone:mt.onclone,ignoreElements:mt.ignoreElements,inlineImages:Ye,copyStyles:Ye},ce.logger.debug("Starting document clone with size "+Pe.width+"x"+Pe.height+" scrolled to "+-Pe.left+","+-Pe.top),vn=new dt(ce,vt,$e),ei=vn.clonedReferenceElement,ei?[4,vn.toIFrame(St,Pe)]:[2,Promise.reject("Unable to find element in cloned iframe")];case 1:return sr=za.sent(),Qi=Co(ei)||Of(ei)?ve(ei.ownerDocument):we(ce,ei),Ki=Qi.width,fo=Qi.height,Pr=Qi.left,Lr=Qi.top,kr=rp(ce,ei,mt.backgroundColor),Fo={canvas:mt.canvas,backgroundColor:kr,scale:(je=(ru=mt.scale)!==null&&ru!==void 0?ru:wt.devicePixelRatio)!==null&&je!==void 0?je:1,x:((Uu=mt.x)!==null&&Uu!==void 0?Uu:0)+Pr,y:((ac=mt.y)!==null&&ac!==void 0?ac:0)+Lr,width:(Du=mt.width)!==null&&Du!==void 0?Du:Math.ceil(Ki),height:(Ou=mt.height)!==null&&Ou!==void 0?Ou:Math.ceil(fo)},Ye?(ce.logger.debug("Document cloned, using foreign object rendering"),Do=new ep(ce,Fo),[4,Do.render(ei)]):[3,3];case 2:return eo=za.sent(),[3,5];case 3:return ce.logger.debug("Document cloned, element located at "+Pr+","+Lr+" with size "+Ki+"x"+fo+" using computed rendering"),ce.logger.debug("Starting DOM parsing"),gr=Ld(ce,ei),kr===gr.styles.backgroundColor&&(gr.styles.backgroundColor=ys.TRANSPARENT),ce.logger.debug("Starting renderer for element at "+Fo.x+","+Fo.y+" with size "+Fo.width+"x"+Fo.height),Do=new sc(ce,Fo),[4,Do.render(gr)];case 4:eo=za.sent(),za.label=5;case 5:return(!((yh=mt.removeContainer)!==null&&yh!==void 0)||yh)&&(dt.destroy(sr)||ce.logger.error("Cannot detach cloned iframe as it is not in the DOM anymore")),ce.logger.debug("Finished rendering"),[2,eo]}})})},rp=function(vt,mt,St){var wt=mt.ownerDocument,Qt=wt.documentElement?Xr(vt,getComputedStyle(wt.documentElement).backgroundColor):ys.TRANSPARENT,Xt=wt.body?Xr(vt,getComputedStyle(wt.body).backgroundColor):ys.TRANSPARENT,ae=typeof St=="string"?Xr(vt,St):St===null?ys.TRANSPARENT:4294967295;return mt===wt.documentElement?vs(Qt)?vs(Xt)?ae:Xt:Qt:ae};return np})},2859:function(Cn,mi,ne){"use strict";ne.d(mi,{hP:function(){return yi}});var bt=function(Ht,Et){return(bt=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(Ct,Nt){Ct.__proto__=Nt}||function(Ct,Nt){for(var Kt in Nt)Object.prototype.hasOwnProperty.call(Nt,Kt)&&(Ct[Kt]=Nt[Kt])})(Ht,Et)};function Be(Ht,Et){function Ct(){this.constructor=Ht}bt(Ht,Et),Ht.prototype=Et===null?Object.create(Et):(Ct.prototype=Et.prototype,new Ct)}function Ee(Ht,Et,Ct,Nt){return new(Ct||(Ct=Promise))(function(Kt,kt){function be(Je){try{ze(Nt.next(Je))}catch(rn){kt(rn)}}function An(Je){try{ze(Nt.throw(Je))}catch(rn){kt(rn)}}function ze(Je){var rn;Je.done?Kt(Je.value):(rn=Je.value,rn instanceof Ct?rn:new Ct(function(Oe){Oe(rn)})).then(be,An)}ze((Nt=Nt.apply(Ht,Et||[])).next())})}function Ze(Ht,Et){var Ct,Nt,Kt,kt,be={label:0,sent:function(){if(1&Kt[0])throw Kt[1];return Kt[1]},trys:[],ops:[]};return kt={next:An(0),throw:An(1),return:An(2)},typeof Symbol=="function"&&(kt[Symbol.iterator]=function(){return this}),kt;function An(ze){return function(Je){return function(rn){if(Ct)throw new TypeError("Generator is already executing.");for(;be;)try{if(Ct=1,Nt&&(Kt=2&rn[0]?Nt.return:rn[0]?Nt.throw||((Kt=Nt.return)&&Kt.call(Nt),0):Nt.next)&&!(Kt=Kt.call(Nt,rn[1])).done)return Kt;switch(Nt=0,Kt&&(rn=[2&rn[0],Kt.value]),rn[0]){case 0:case 1:Kt=rn;break;case 4:return be.label++,{value:rn[1],done:!1};case 5:be.label++,Nt=rn[1],rn=[0];continue;case 7:rn=be.ops.pop(),be.trys.pop();continue;default:if(Kt=be.trys,!((Kt=Kt.length>0&&Kt[Kt.length-1])||rn[0]!==6&&rn[0]!==2)){be=0;continue}if(rn[0]===3&&(!Kt||rn[1]>Kt[0]&&rn[1]<Kt[3])){be.label=rn[1];break}if(rn[0]===6&&be.label<Kt[1]){be.label=Kt[1],Kt=rn;break}if(Kt&&be.label<Kt[2]){be.label=Kt[2],be.ops.push(rn);break}Kt[2]&&be.ops.pop(),be.trys.pop();continue}rn=Et.call(Ht,be)}catch(Oe){rn=[6,Oe],Nt=0}finally{Ct=Kt=0}if(5&rn[0])throw rn[1];return{value:rn[0]?rn[1]:void 0,done:!0}}([ze,Je])}}}function Fe(){for(var Ht=0,Et=0,Ct=arguments.length;Et<Ct;Et++)Ht+=arguments[Et].length;var Nt=Array(Ht),Kt=0;for(Et=0;Et<Ct;Et++)for(var kt=arguments[Et],be=0,An=kt.length;be<An;be++,Kt++)Nt[Kt]=kt[be];return Nt}var we=function(){function Ht(){}return Ht.createDefs=function(){return document.createElementNS("http://www.w3.org/2000/svg","defs")},Ht.setAttributes=function(Et,Ct){for(var Nt=0,Kt=Ct;Nt<Kt.length;Nt++){var kt=Kt[Nt],be=kt[0],An=kt[1];Et.setAttribute(be,An)}},Ht.createRect=function(Et,Ct,Nt){var Kt=document.createElementNS("http://www.w3.org/2000/svg","rect");return Kt.setAttribute("width",Et.toString()),Kt.setAttribute("height",Ct.toString()),Nt&&Ht.setAttributes(Kt,Nt),Kt},Ht.createLine=function(Et,Ct,Nt,Kt,kt){var be=document.createElementNS("http://www.w3.org/2000/svg","line");return be.setAttribute("x1",Et.toString()),be.setAttribute("y1",Ct.toString()),be.setAttribute("x2",Nt.toString()),be.setAttribute("y2",Kt.toString()),kt&&Ht.setAttributes(be,kt),be},Ht.createPolygon=function(Et,Ct){var Nt=document.createElementNS("http://www.w3.org/2000/svg","polygon");return Nt.setAttribute("points",Et),Ct&&Ht.setAttributes(Nt,Ct),Nt},Ht.createCircle=function(Et,Ct){var Nt=document.createElementNS("http://www.w3.org/2000/svg","circle");return Nt.setAttribute("cx",(Et/2).toString()),Nt.setAttribute("cy",(Et/2).toString()),Nt.setAttribute("r",Et.toString()),Ct&&Ht.setAttributes(Nt,Ct),Nt},Ht.createEllipse=function(Et,Ct,Nt){var Kt=document.createElementNS("http://www.w3.org/2000/svg","ellipse");return Kt.setAttribute("cx",(Et/2).toString()),Kt.setAttribute("cy",(Ct/2).toString()),Kt.setAttribute("rx",(Et/2).toString()),Kt.setAttribute("ry",(Ct/2).toString()),Nt&&Ht.setAttributes(Kt,Nt),Kt},Ht.createGroup=function(Et){var Ct=document.createElementNS("http://www.w3.org/2000/svg","g");return Et&&Ht.setAttributes(Ct,Et),Ct},Ht.createTransform=function(){return document.createElementNS("http://www.w3.org/2000/svg","svg").createSVGTransform()},Ht.createMarker=function(Et,Ct,Nt,Kt,kt,be,An){var ze=document.createElementNS("http://www.w3.org/2000/svg","marker");return Ht.setAttributes(ze,[["id",Et],["orient",Ct],["markerWidth",Nt.toString()],["markerHeight",Kt.toString()],["refX",kt.toString()],["refY",be.toString()]]),ze.appendChild(An),ze},Ht.createText=function(Et){var Ct=document.createElementNS("http://www.w3.org/2000/svg","text");return Ct.setAttribute("x","0"),Ct.setAttribute("y","0"),Et&&Ht.setAttributes(Ct,Et),Ct},Ht.createTSpan=function(Et,Ct){var Nt=document.createElementNS("http://www.w3.org/2000/svg","tspan");return Nt.textContent=Et,Ct&&Ht.setAttributes(Nt,Ct),Nt},Ht.createImage=function(Et){var Ct=document.createElementNS("http://www.w3.org/2000/svg","image");return Et&&Ht.setAttributes(Ct,Et),Ct},Ht.createPoint=function(Et,Ct){var Nt=document.createElementNS("http://www.w3.org/2000/svg","svg").createSVGPoint();return Nt.x=Et,Nt.y=Ct,Nt},Ht.createPath=function(Et,Ct){var Nt=document.createElementNS("http://www.w3.org/2000/svg","path");return Nt.setAttribute("d",Et),Ct&&Ht.setAttributes(Nt,Ct),Nt},Ht}(),ve=function(){function Ht(){}return Ht.addKey=function(Et){Ht.key=Et},Object.defineProperty(Ht,"isLicensed",{get:function(){return!!Ht.key&&new RegExp(/^MJS2-[A-Z][0-9]{3}-[A-Z][0-9]{3}-[0-9]{4}$/,"i").test(Ht.key)},enumerable:!1,configurable:!0}),Ht}(),Qe=function(){function Ht(){this.naturalSize=!1,this.imageType="image/png",this.markersOnly=!1}return Ht.prototype.rasterize=function(Et,Ct,Nt){var Kt=this;return new Promise(function(kt){var be=Nt!==void 0?Nt:document.createElement("canvas");Et===null&&(Kt.markersOnly=!0,Kt.naturalSize=!1);var An=document.createElementNS("http://www.w3.org/2000/svg","svg");An.setAttribute("xmlns","http://www.w3.org/2000/svg"),An.setAttribute("width",Ct.width.baseVal.valueAsString),An.setAttribute("height",Ct.height.baseVal.valueAsString),An.setAttribute("viewBox","0 0 "+Ct.viewBox.baseVal.width.toString()+" "+Ct.viewBox.baseVal.height.toString()),An.innerHTML=Ct.innerHTML,Kt.naturalSize===!0?(An.width.baseVal.value=Et.naturalWidth,An.height.baseVal.value=Et.naturalHeight):Kt.width!==void 0&&Kt.height!==void 0&&(An.width.baseVal.value=Kt.width,An.height.baseVal.value=Kt.height),be.width=An.width.baseVal.value,be.height=An.height.baseVal.value;var ze=An.outerHTML,Je=be.getContext("2d");Kt.markersOnly!==!0&&Je.drawImage(Et,0,0,be.width,be.height);var rn=window.URL,Oe=new Image(be.width,be.height);Oe.setAttribute("crossOrigin","anonymous");var mn=new Blob([ze],{type:"image/svg+xml"}),cn=rn.createObjectURL(mn);Oe.onload=function(){Je.drawImage(Oe,0,0),rn.revokeObjectURL(cn);var Mn=be.toDataURL(Kt.imageType,Kt.imageQuality);kt(Mn)},Oe.src=cn})},Ht}(),ge=function(){},se=function(){function Ht(Et){this._classNamePrefixBase="__markerjs2_",this.classes=[],this.rules=[],this.settings=this.defaultSettings,this._classNamePrefix=this._classNamePrefixBase+"_"+Et+"_"}return Object.defineProperty(Ht.prototype,"classNamePrefixBase",{get:function(){return this._classNamePrefixBase},enumerable:!1,configurable:!0}),Object.defineProperty(Ht.prototype,"classNamePrefix",{get:function(){return this._classNamePrefix},enumerable:!1,configurable:!0}),Object.defineProperty(Ht.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(Ht.prototype,"fadeInAnimationClassName",{get:function(){return this.classNamePrefix+"fade_in"},enumerable:!1,configurable:!0}),Object.defineProperty(Ht.prototype,"fadeOutAnimationClassName",{get:function(){return this.classNamePrefix+"fade_out"},enumerable:!1,configurable:!0}),Ht.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},Ht.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)},Ht.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 hn("."+this.classNamePrefix+" h3","font-family: sans-serif")),this.addRule(new hn("@keyframes "+this.classNamePrefix+"_fade_in_animation_frames",`
from {
opacity: 0;
}
to {
opacity: 1;
}
`)),this.addRule(new hn("@keyframes "+this.classNamePrefix+"_fade_out_animation_frames",`
from {
opacity: 1;
}
to {
opacity: 0;
}
`)),this.addClass(new Se("fade_in",`
animation-duration: 0.3s;
animation-name: `+this.classNamePrefix+`_fade_in_animation_frames;
`)),this.addClass(new Se("fade_out",`
animation-duration: 0.3s;
animation-name: `+this.classNamePrefix+`_fade_out_animation_frames;
`))},Ht.prototype.removeStyleSheet=function(){var Et;this.styleSheet&&(((Et=this.styleSheetRoot)!==null&&Et!==void 0?Et:document.head).removeChild(this.styleSheet),this.styleSheet=void 0)},Ht}(),hn=function(Ht,Et){this.selector=Ht,this.style=Et},Se=function(Ht,Et){this.localName=Ht,this.style=Et},xn=function(){function Ht(Et,Ct,Nt,Kt,kt){this.buttons=[],this.markerButtons=[],this.buttonClickListeners=[],this.markerjsContainer=Et,this.displayMode=Ct,this.markerItems=Nt,this.uiStyleSettings=Kt,this.styles=kt,this.addStyles(),this.adjustLayout=this.adjustLayout.bind(this),this.overflowButtonClicked=this.overflowButtonClicked.bind(this),this.setCurrentMarker=this.setCurrentMarker.bind(this)}return Ht.prototype.show=function(Et){var Ct=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 Nt=document.createElement("div");Nt.className=this.toolbarBlockStyleClass.name,Nt.style.whiteSpace="nowrap",this.uiContainer.appendChild(Nt),this.addActionButton(Nt,'<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(Nt,'<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(Nt,'<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(Nt,'<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(Nt,'<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(Nt,'<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(Nt,'<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(Nt,'<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 be=document.createElement("div");be.className=""+Ct.toolbarButtonStyleClass.name,be.setAttribute("data-type-name",kt.typeName),be.innerHTML=kt.icon,be.addEventListener("click",function(){Ct.markerToolbarButtonClicked(be,kt)}),Ct.buttons.push(be),Ct.markerButtons.push(be)}),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 Kt=document.createElement("div");Kt.className=this.toolbarBlockStyleClass.name,Kt.style.whiteSpace="nowrap",Kt.style.display=this.uiStyleSettings.resultButtonBlockVisible!==!1?"":"none",this.uiContainer.appendChild(Kt),this.addActionButton(Kt,'<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(Kt,'<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()},Ht.prototype.addButtonClickListener=function(Et){this.buttonClickListeners.push(Et)},Ht.prototype.removeButtonClickListener=function(Et){this.buttonClickListeners.indexOf(Et)>-1&&this.buttonClickListeners.splice(this.buttonClickListeners.indexOf(Et),1)},Ht.prototype.setSelectMode=function(){this.resetButtonStyles(),this.setActiveButton(this.buttons[0])},Ht.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 Ct=0;Ct<this.markerButtons.length;Ct++)Ct<Et||Ct===Et&&this.markerButtons.length-1===Et?this.markerButtonBlock.appendChild(this.markerButtons[Ct]):(Ct===Et&&this.markerButtonBlock.appendChild(this.overflowButton),this.markerButtonOverflowBlock.appendChild(this.markerButtons[Ct]))}},Ht.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")},Ht.prototype.resetButtonStyles=function(){var Et=this;this.buttons.forEach(function(Ct){Ct.className=Ct.className.replace(Et.uiStyleSettings.toolbarButtonStyleColorsClassName?Et.uiStyleSettings.toolbarButtonStyleColorsClassName:Et.toolbarButtonStyleColorsClass.name,"").trim(),Ct.className=Ct.className.replace(Et.uiStyleSettings.toolbarActiveButtonStyleColorsClassName?Et.uiStyleSettings.toolbarActiveButtonStyleColorsClassName:Et.toolbarActiveButtonStyleColorsClass.name,"").trim(),Ct.className+=" "+(Et.uiStyleSettings.toolbarButtonStyleColorsClassName?Et.uiStyleSettings.toolbarButtonStyleColorsClassName:Et.toolbarButtonStyleColorsClass.name)})},Ht.prototype.addActionButton=function(Et,Ct,Nt){var Kt=this,kt=document.createElement("div");switch(kt.className=""+this.toolbarButtonStyleClass.name,kt.innerHTML=Ct,kt.setAttribute("data-action",Nt),kt.addEventListener("click",function(){Kt.actionToolbarButtonClicked(kt,Nt)}),Nt){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)},Ht.prototype.addStyles=function(){this.toolbarStyleClass=this.styles.addClass(new Se("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 Se("toolbar_colors",`
background-color: `+this.uiStyleSettings.toolbarBackgroundColor+`;
box-shadow: 0px 3px rgba(33, 33, 33, 0.1);
`)),this.toolbarBlockStyleClass=this.styles.addClass(new Se("toolbar-block",`
display: inline-block;
box-sizing: content-box;
`)),this.toolbarOverflowBlockStyleClass=this.styles.addClass(new Se("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 Se("toolbar-overflow-block_colors",`
background-color: `+this.uiStyleSettings.toolbarBackgroundColor+`;
`));var Et=this.uiStyleSettings.toolbarHeight/4;this.toolbarButtonStyleClass=this.styles.addClass(new Se("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 Se("toolbar_button_colors",`
fill: `+this.uiStyleSettings.toolbarColor+`;
`)),this.toolbarActiveButtonStyleColorsClass=this.styles.addClass(new Se("toolbar_active_button",`
fill: `+this.uiStyleSettings.toolbarColor+`;
background-color: `+this.uiStyleSettings.toolbarBackgroundHoverColor+`
`)),this.styles.addRule(new hn("."+this.toolbarButtonStyleClass.name+" svg",`
height: `+this.uiStyleSettings.toolbarHeight/2+`px;
`)),this.styles.addRule(new hn("."+this.toolbarButtonStyleColorsClass.name+":hover",`
background-color: `+this.uiStyleSettings.toolbarBackgroundHoverColor+`
`))},Ht.prototype.markerToolbarButtonClicked=function(Et,Ct){this.setActiveButton(Et),this.buttonClickListeners&&this.buttonClickListeners.length>0&&this.buttonClickListeners.forEach(function(Nt){return Nt("marker",Ct)}),this.markerButtonOverflowBlock.style.display="none"},Ht.prototype.actionToolbarButtonClicked=function(Et,Ct){this.buttonClickListeners&&this.buttonClickListeners.length>0&&this.buttonClickListeners.forEach(function(Nt){return Nt("action",Ct)}),this.markerButtonOverflowBlock.style.display="none",this.setActiveButton(this.buttons[0])},Ht.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)},Ht.prototype.setActiveMarkerButton=function(Et){var Ct=this.markerButtons.find(function(Nt){return Nt.getAttribute("data-type-name")===Et});Ct&&this.setActiveButton(Ct)},Ht.prototype.setCurrentMarker=function(Et){var Ct=this;this.currentMarker=Et,this.buttons.filter(function(Nt){return/delete|notes/.test(Nt.getAttribute("data-action"))}).forEach(function(Nt){Ct.currentMarker===void 0?(Nt.style.fillOpacity="0.4",Nt.style.pointerEvents="none"):(Nt.style.fillOpacity="1",Nt.style.pointerEvents="all")})},Ht}(),Ut=function(){function Ht(Et,Ct,Nt,Kt){this.panels=[],this.panelButtons=[],this.markerjsContainer=Et,this.displayMode=Ct,this.uiStyleSettings=Nt,this.styles=Kt,this.panelButtonClick=this.panelButtonClick.bind(this),this.addStyles()}return Ht.prototype.addStyles=function(){var Et;this.toolboxStyleClass=this.styles.addClass(new Se("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 Se("toolbox_colors",`
color: `+this.uiStyleSettings.toolboxColor+`;
`));var Ct=this.uiStyleSettings.toolbarHeight/4;this.toolboxButtonRowStyleClass=this.styles.addClass(new Se("toolbox-button-row",`
display: flex;
cursor: default;
box-sizing: content-box;
`)),this.toolboxButtonRowStyleColorsClass=this.styles.addClass(new Se("toolbox-button-row_colors",`
background-color: `+this.uiStyleSettings.toolbarBackgroundColor+`;
`)),this.toolboxPanelRowStyleClass=this.styles.addClass(new Se("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 Se("toolbox-panel-row_colors",`
background-color: `+((Et=this.uiStyleSettings.toolboxBackgroundColor)!==null&&Et!==void 0?Et:this.uiStyleSettings.toolbarBackgroundHoverColor)+`;
`)),this.toolboxButtonStyleClass=this.styles.addClass(new Se("toolbox_button",`
display: inline-block;
width: `+(this.uiStyleSettings.toolbarHeight-2*Ct)+`px;
height: `+(this.uiStyleSettings.toolbarHeight-2*Ct)+`px;
padding: `+Ct+`px;
box-sizing: content-box;
`)),this.toolboxButtonStyleColorsClass=this.styles.addClass(new Se("toolbox-button_colors",`
fill: `+this.uiStyleSettings.toolbarColor+`;
`)),this.toolboxActiveButtonStyleColorsClass=this.styles.addClass(new Se("toolbox-active-button_colors",`
background-color: `+this.uiStyleSettings.toolbarBackgroundHoverColor+`;
fill: `+this.uiStyleSettings.toolbarColor+`;
`)),this.styles.addRule(new hn("."+this.toolboxButtonStyleColorsClass.name+":hover",`
background-color: `+this.uiStyleSettings.toolbarBackgroundHoverColor+`
`)),this.styles.addRule(new hn("."+this.toolboxButtonStyleClass.name+" svg",`
height: `+this.uiStyleSettings.toolbarHeight/2+`px;
`))},Ht.prototype.show=function(Et){var Ct;this.uiContainer=document.createElement("div"),this.uiContainer.style.visibility=Et,this.uiContainer.className=this.toolboxStyleClass.name+" "+((Ct=this.uiStyleSettings.toolboxStyleColorsClassName)!==null&&Ct!==void 0?Ct:this.toolboxStyleColorsClass.name),this.markerjsContainer.appendChild(this.uiContainer)},Ht.prototype.setPanelButtons=function(Et){var Ct,Nt,Kt=this;this.panels=Et,this.uiContainer!==void 0&&(this.uiContainer.innerHTML="",this.panelRow=document.createElement("div"),this.panelRow.className=this.toolboxPanelRowStyleClass.name+" "+((Ct=this.uiStyleSettings.toolboxPanelRowStyleColorsClassName)!==null&&Ct!==void 0?Ct:this.toolboxPanelRowStyleColorsClass.name),this.uiContainer.appendChild(this.panelRow),this.buttonRow=document.createElement("div"),this.buttonRow.className=this.toolboxButtonRowStyleClass.name+" "+((Nt=this.uiStyleSettings.toolboxButtonRowStyleColorsClassName)!==null&&Nt!==void 0?Nt:this.toolboxButtonRowStyleColorsClass.name)+" ",this.uiContainer.appendChild(this.buttonRow),this.panelButtons.splice(0),this.panels.forEach(function(kt){var be;kt.uiStyleSettings=Kt.uiStyleSettings;var An=document.createElement("div");An.className=Kt.toolboxButtonStyleClass.name+" "+((be=Kt.uiStyleSettings.toolboxButtonStyleColorsClassName)!==null&&be!==void 0?be:Kt.toolboxButtonStyleColorsClass.name),An.innerHTML=kt.icon,An.title=kt.title,An.addEventListener("click",function(){Kt.panelButtonClick(kt)}),Kt.panelButtons.push(An),Kt.buttonRow.appendChild(An)}),this.displayMode==="inline"?this.panelRow.style.display="none":this.panelRow.style.visibility="hidden")},Ht.prototype.panelButtonClick=function(Et){var Ct=this,Nt=-1;if(Et!==this.activePanel){Nt=this.panels.indexOf(Et),this.panelRow.innerHTML="";var Kt=Et.getUi();Kt.style.margin=this.uiStyleSettings.toolbarHeight/4+"px",this.panelRow.appendChild(Kt),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(){Ct.displayMode==="inline"?Ct.panelRow.style.display="none":Ct.panelRow.style.visibility="hidden"},200);this.panelButtons.forEach(function(kt,be){var An,ze;kt.className=Ct.toolboxButtonStyleClass.name+" "+(be===Nt?""+((An=Ct.uiStyleSettings.toolboxActiveButtonStyleColorsClassName)!==null&&An!==void 0?An:Ct.toolboxActiveButtonStyleColorsClass.name):""+((ze=Ct.uiStyleSettings.toolboxButtonStyleColorsClassName)!==null&&ze!==void 0?ze:Ct.toolboxButtonStyleColorsClass.name))})},Ht}(),et=function(Ht,Et){this.title=Ht,this.icon=Et},nt=function(Ht){function Et(Ct,Nt,Kt,kt){var be=Ht.call(this,Ct,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 be.colors=[],be.addTransparent=!1,be.colorBoxes=[],be.colors=Nt,be.currentColor=Kt,be.setCurrentColor=be.setCurrentColor.bind(be),be.getColorBox=be.getColorBox.bind(be),be}return Be(Et,Ht),Et.prototype.getUi=function(){var Ct=this,Nt=document.createElement("div");return Nt.style.overflow="hidden",Nt.style.whiteSpace="nowrap",this.colors.forEach(function(Kt){var kt=Ct.getColorBox(Kt);Nt.appendChild(kt),Ct.colorBoxes.push(kt)}),Nt},Et.prototype.getColorBox=function(Ct){var Nt=this,Kt=this.uiStyleSettings.toolbarHeight/4,kt=this.uiStyleSettings.toolbarHeight-Kt,be=document.createElement("div");be.style.display="inline-block",be.style.boxSizing="content-box",be.style.width=kt-2+"px",be.style.height=kt-2+"px",be.style.padding="1px",be.style.marginRight="2px",be.style.marginBottom="2px",be.style.borderWidth="2px",be.style.borderStyle="solid",be.style.borderRadius=(kt+2)/2+"px",be.style.borderColor=Ct===this.currentColor?this.uiStyleSettings.toolboxAccentColor:"transparent",be.addEventListener("click",function(){Nt.setCurrentColor(Ct,be)});var An=document.createElement("div");return An.style.display="inline-block",An.style.width=kt-2+"px",An.style.height=kt-2+"px",An.style.backgroundColor=Ct,An.style.borderRadius=kt/2+"px",Ct==="transparent"&&(An.style.fill=this.uiStyleSettings.toolboxAccentColor,An.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>`),be.appendChild(An),be},Et.prototype.setCurrentColor=function(Ct,Nt){var Kt=this;this.currentColor=Ct,this.colorBoxes.forEach(function(kt){kt.style.borderColor=kt===Nt?Kt.uiStyleSettings.toolboxAccentColor:"transparent"}),this.onColorChanged&&this.onColorChanged(Ct)},Et}(et),ct=function(){function Ht(Et,Ct,Nt){this._state="new",this._isSelected=!1,this._container=Et,this._overlayContainer=Ct,this.globalSettings=Nt,this.stateChanged=this.stateChanged.bind(this),this.colorChanged=this.colorChanged.bind(this),this.fillColorChanged=this.fillColorChanged.bind(this)}return Object.defineProperty(Ht.prototype,"typeName",{get:function(){return Object.getPrototypeOf(this).constructor.typeName},enumerable:!1,configurable:!0}),Object.defineProperty(Ht.prototype,"container",{get:function(){return this._container},enumerable:!1,configurable:!0}),Object.defineProperty(Ht.prototype,"overlayContainer",{get:function(){return this._overlayContainer},enumerable:!1,configurable:!0}),Object.defineProperty(Ht.prototype,"state",{get:function(){return this._state},enumerable:!1,configurable:!0}),Object.defineProperty(Ht.prototype,"toolboxPanels",{get:function(){return[]},enumerable:!1,configurable:!0}),Ht.prototype.ownsTarget=function(Et){return!1},Object.defineProperty(Ht.prototype,"isSelected",{get:function(){return this._isSelected},enumerable:!1,configurable:!0}),Ht.prototype.select=function(){this.container.style.cursor="move",this._isSelected=!0,this.manipulationStartState=this.getState()},Ht.prototype.deselect=function(){this.container.style.cursor="default",this._isSelected=!1,this.stateChanged()},Ht.prototype.pointerDown=function(Et,Ct){},Ht.prototype.dblClick=function(Et,Ct){},Ht.prototype.manipulate=function(Et){},Ht.prototype.pointerUp=function(Et){this.stateChanged()},Ht.prototype.dispose=function(){},Ht.prototype.addMarkerVisualToContainer=function(Et){this.container.childNodes.length>0?this.container.insertBefore(Et,this.container.childNodes[0]):this.container.appendChild(Et)},Ht.prototype.getState=function(){return{typeName:Ht.typeName,state:this.state,notes:this.notes}},Ht.prototype.restoreState=function(Et){this._state=Et.state,this.notes=Et.notes},Ht.prototype.scale=function(Et,Ct){},Ht.prototype.colorChanged=function(Et){this.onColorChanged&&this.onColorChanged(Et),this.stateChanged()},Ht.prototype.fillColorChanged=function(Et){this.onFillColorChanged&&this.onFillColorChanged(Et),this.stateChanged()},Ht.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)}},Ht.typeName="MarkerBase",Ht}(),lt=function(){function Ht(){this.findGripByVisual=this.findGripByVisual.bind(this)}return Ht.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},Ht}(),gt=function(){function Ht(){this.GRIP_SIZE=10,this.visual=we.createGroup(),this.visual.appendChild(we.createCircle(1.5*this.GRIP_SIZE,[["fill","transparent"]])),this.visual.appendChild(we.createCircle(this.GRIP_SIZE,[["fill","#cccccc"],["fill-opacity","0.7"],["stroke","#333333"],["stroke-width","2"],["stroke-opacity","0.7"]]))}return Ht.prototype.ownsTarget=function(Et){return Et===this.visual||Et===this.visual.childNodes[0]||Et===this.visual.childNodes[1]},Ht}(),yt=function(){function Ht(){}return Ht.toITransformMatrix=function(Et){return{a:Et.a,b:Et.b,c:Et.c,d:Et.d,e:Et.e,f:Et.f}},Ht.toSVGMatrix=function(Et,Ct){return Et.a=Ct.a,Et.b=Ct.b,Et.c=Ct.c,Et.d=Ct.d,Et.e=Ct.e,Et.f=Ct.f,Et},Ht}(),Lt=function(Ht){function Et(Ct,Nt,Kt){var kt=Ht.call(this,Ct,Nt,Kt)||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(we.createTransform()),kt.setupControlBox(),kt}return Be(Et,Ht),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(Ct){this._visual=Ct;var Nt=we.createTransform();this._visual.transform.baseVal.appendItem(Nt)},enumerable:!1,configurable:!0}),Et.prototype.ownsTarget=function(Ct){return!!Ht.prototype.ownsTarget.call(this,Ct)||!!(this.controlGrips.findGripByVisual(Ct)!==void 0||this.rotatorGrip!==void 0&&this.rotatorGrip.ownsTarget(Ct))},Et.prototype.pointerDown=function(Ct,Nt){Ht.prototype.pointerDown.call(this,Ct,Nt),this.state==="new"&&(this.left=Ct.x,this.top=Ct.y),this.manipulationStartLeft=this.left,this.manipulationStartTop=this.top,this.manipulationStartWidth=this.width,this.manipulationStartHeight=this.height;var Kt=this.unrotatePoint(Ct);if(this.manipulationStartX=Kt.x,this.manipulationStartY=Kt.y,this.offsetX=Kt.x-this.left,this.offsetY=Kt.y-this.top,this.state!=="new")if(this.select(),this.activeGrip=this.controlGrips.findGripByVisual(Nt),this.activeGrip!==void 0)this._state="resize";else if(this.rotatorGrip!==void 0&&this.rotatorGrip.ownsTarget(Nt)){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 be=this.container.transform.baseVal.getItem(0);be.setRotate(this.rotationAngle,this.centerX,this.centerY),this.container.transform.baseVal.replaceItem(be,0),this.adjustControlBox(),this._state="rotate"}else this._state="move"},Et.prototype.pointerUp=function(Ct){var Nt=this.state;Ht.prototype.pointerUp.call(this,Ct),this.state==="creating"&&this.width<10&&this.height<10?(this.width=this.defaultSize.x,this.height=this.defaultSize.y):this.manipulate(Ct),this._state="select",Nt==="creating"&&this.onMarkerCreated&&this._suppressMarkerCreateEvent===!1&&this.onMarkerCreated(this)},Et.prototype.moveVisual=function(Ct){this.visual.style.transform="translate("+Ct.x+"px, "+Ct.y+"px)"},Et.prototype.manipulate=function(Ct){var Nt=this.unrotatePoint(Ct);this.state==="creating"?this.resize(Ct):this.state==="move"?(this.left=this.manipulationStartLeft+(Nt.x-this.manipulationStartLeft)-this.offsetX,this.top=this.manipulationStartTop+(Nt.y-this.manipulationStartTop)-this.offsetY,this.moveVisual({x:this.left,y:this.top}),this.adjustControlBox()):this.state==="resize"?this.resize(Nt):this.state==="rotate"&&this.rotate(Ct)},Et.prototype.resize=function(Ct){var Nt=this.manipulationStartLeft,Kt=this.manipulationStartWidth,kt=this.manipulationStartTop,be=this.manipulationStartHeight;switch(this.activeGrip){case this.controlGrips.bottomLeft:case this.controlGrips.centerLeft:case this.controlGrips.topLeft:Nt=this.manipulationStartLeft+Ct.x-this.manipulationStartX,Kt=this.manipulationStartWidth+this.manipulationStartLeft-Nt;break;case this.controlGrips.bottomRight:case this.controlGrips.centerRight:case this.controlGrips.topRight:case void 0:Kt=this.manipulationStartWidth+Ct.x-this.manipulationStartX}switch(this.activeGrip){case this.controlGrips.topCenter:case this.controlGrips.topLeft:case this.controlGrips.topRight:kt=this.manipulationStartTop+Ct.y-this.manipulationStartY,be=this.manipulationStartHeight+this.manipulationStartTop-kt;break;case this.controlGrips.bottomCenter:case this.controlGrips.bottomLeft:case this.controlGrips.bottomRight:case void 0:be=this.manipulationStartHeight+Ct.y-this.manipulationStartY}Kt>=0?(this.left=Nt,this.width=Kt):(this.left=Nt+Kt,this.width=-Kt),be>=0?(this.top=kt,this.height=be):(this.top=kt+be,this.height=-be),this.setSize()},Et.prototype.setSize=function(){this.moveVisual({x:this.left,y:this.top}),this.adjustControlBox()},Et.prototype.rotate=function(Ct){if(Math.abs(Ct.x-this.centerX)>.1){var Nt=Math.sign(Ct.x-this.centerX);this.rotationAngle=180*Math.atan((Ct.y-this.centerY)/(Ct.x-this.centerX))/Math.PI+90*Nt,this.applyRotation()}},Et.prototype.applyRotation=function(){var Ct=this.container.transform.baseVal.getItem(0);Ct.setRotate(this.rotationAngle,this.centerX,this.centerY),this.container.transform.baseVal.replaceItem(Ct,0)},Et.prototype.rotatePoint=function(Ct){if(this.rotationAngle===0)return Ct;var Nt=this.container.getCTM(),Kt=we.createPoint(Ct.x,Ct.y);return{x:(Kt=Kt.matrixTransform(Nt)).x,y:Kt.y}},Et.prototype.unrotatePoint=function(Ct){if(this.rotationAngle===0)return Ct;var Nt=this.container.getCTM();Nt=Nt.inverse();var Kt=we.createPoint(Ct.x,Ct.y);return{x:(Kt=Kt.matrixTransform(Nt)).x,y:Kt.y}},Et.prototype.select=function(){Ht.prototype.select.call(this),this.adjustControlBox(),this.controlBox.style.display=""},Et.prototype.deselect=function(){Ht.prototype.deselect.call(this),this.controlBox.style.display="none"},Et.prototype.setupControlBox=function(){this.controlBox=we.createGroup();var Ct=we.createTransform();Ct.setTranslate(-this.CB_DISTANCE/2,-this.CB_DISTANCE/2),this.controlBox.transform.baseVal.appendItem(Ct),this.container.appendChild(this.controlBox),this.controlRect=we.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=we.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 Ct=this.controlBox.transform.baseVal.getItem(0);Ct.setTranslate(this.left-this.CB_DISTANCE/2,this.top-this.CB_DISTANCE/2),this.controlBox.transform.baseVal.replaceItem(Ct,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 Ct=new gt;return Ct.visual.transform.baseVal.appendItem(we.createTransform()),this.controlBox.appendChild(Ct.visual),Ct},Et.prototype.positionGrips=function(){var Ct=this.controlGrips.topLeft.GRIP_SIZE,Nt=-Ct/2,Kt=Nt,kt=(this.width+this.CB_DISTANCE)/2-Ct/2,be=(this.height+this.CB_DISTANCE)/2-Ct/2,An=this.height+this.CB_DISTANCE-Ct/2,ze=this.width+this.CB_DISTANCE-Ct/2;this.positionGrip(this.controlGrips.topLeft.visual,Nt,Kt),this.positionGrip(this.controlGrips.topCenter.visual,kt,Kt),this.positionGrip(this.controlGrips.topRight.visual,ze,Kt),this.positionGrip(this.controlGrips.centerLeft.visual,Nt,be),this.positionGrip(this.controlGrips.centerRight.visual,ze,be),this.positionGrip(this.controlGrips.bottomLeft.visual,Nt,An),this.positionGrip(this.controlGrips.bottomCenter.visual,kt,An),this.positionGrip(this.controlGrips.bottomRight.visual,ze,An),this.rotatorGrip!==void 0&&this.positionGrip(this.rotatorGrip.visual,kt,Kt-3*this.CB_DISTANCE)},Et.prototype.positionGrip=function(Ct,Nt,Kt){var kt=Ct.transform.baseVal.getItem(0);kt.setTranslate(Nt,Kt),Ct.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:yt.toITransformMatrix(this.visual.transform.baseVal.getItem(0).matrix),containerTransformMatrix:yt.toITransformMatrix(this.container.transform.baseVal.getItem(0).matrix)},Ht.prototype.getState.call(this))},Et.prototype.restoreState=function(Ct){Ht.prototype.restoreState.call(this,Ct);var Nt=Ct;this.left=Nt.left,this.top=Nt.top,this.width=Nt.width,this.height=Nt.height,this.rotationAngle=Nt.rotationAngle,this.visual.transform.baseVal.getItem(0).setMatrix(yt.toSVGMatrix(this.visual.transform.baseVal.getItem(0).matrix,Nt.visualTransformMatrix)),this.container.transform.baseVal.getItem(0).setMatrix(yt.toSVGMatrix(this.container.transform.baseVal.getItem(0).matrix,Nt.containerTransformMatrix))},Et.prototype.scale=function(Ct,Nt){Ht.prototype.scale.call(this,Ct,Nt);var Kt=this.rotatePoint({x:this.left,y:this.top}),kt=this.unrotatePoint({x:Kt.x*Ct,y:Kt.y*Nt});this.left=kt.x,this.top=kt.y,this.width=this.width*Ct,this.height=this.height*Nt,this.adjustControlBox()},Et}(ct),It=function(Ht){function Et(Ct,Nt,Kt){var kt=Ht.call(this,Ct,Nt,Kt)||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 Be(Et,Ht),Et.prototype.ownsTarget=function(Ct){return!(!Ht.prototype.ownsTarget.call(this,Ct)&&Ct!==this.visual)},Et.prototype.createVisual=function(){this.visual=we.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(Ct,Nt){Ht.prototype.pointerDown.call(this,Ct,Nt),this.state==="new"&&(this.createVisual(),this.moveVisual(Ct),this._state="creating")},Et.prototype.manipulate=function(Ct){Ht.prototype.manipulate.call(this,Ct)},Et.prototype.resize=function(Ct){Ht.prototype.resize.call(this,Ct),this.setSize()},Et.prototype.setSize=function(){Ht.prototype.setSize.call(this),we.setAttributes(this.visual,[["width",this.width.toString()],["height",this.height.toString()]])},Et.prototype.pointerUp=function(Ct){Ht.prototype.pointerUp.call(this,Ct),this.setSize()},Et.prototype.setStrokeColor=function(Ct){this.strokeColor=Ct,this.visual&&we.setAttributes(this.visual,[["stroke",this.strokeColor]]),this.colorChanged(Ct),this.stateChanged()},Et.prototype.setFillColor=function(Ct){this.fillColor=Ct,this.visual&&we.setAttributes(this.visual,[["fill",this.fillColor]]),this.stateChanged()},Et.prototype.setStrokeWidth=function(Ct){this.strokeWidth=Ct,this.visual&&we.setAttributes(this.visual,[["stroke-width",this.strokeWidth.toString()]]),this.stateChanged()},Et.prototype.setStrokeDasharray=function(Ct){this.strokeDasharray=Ct,this.visual&&we.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},Ht.prototype.getState.call(this))},Et.prototype.restoreState=function(Ct){var Nt=Ct;this.fillColor=Nt.fillColor,this.strokeColor=Nt.strokeColor,this.strokeWidth=Nt.strokeWidth,this.strokeDasharray=Nt.strokeDasharray,this.opacity=Nt.opacity,this.createVisual(),Ht.prototype.restoreState.call(this,Ct),this.setSize()},Et.prototype.scale=function(Ct,Nt){Ht.prototype.scale.call(this,Ct,Nt),this.setSize()},Et.title="Rectangle marker",Et}(Lt),Wt=function(Ht){function Et(Ct,Nt,Kt,kt){var be=Ht.call(this,Ct,kt||'<svg viewBox="0 0 24 24"><path d="M3 17h18v-2H3v2m0 3h18v-1H3v1m0-7h18v-3H3v3m0-9v4h18V4H3z"/></svg>')||this;return be.widths=[],be.widthBoxes=[],be.widths=Nt,be.currentWidth=Kt,be.setCurrentWidth=be.setCurrentWidth.bind(be),be}return Be(Et,Ht),Et.prototype.getUi=function(){var Ct=this,Nt=document.createElement("div");return Nt.style.display="flex",Nt.style.overflow="hidden",Nt.style.flexGrow="2",this.widths.forEach(function(Kt){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=Kt===Ct.currentWidth?Ct.uiStyleSettings.toolboxAccentColor:"transparent",kt.addEventListener("click",function(){Ct.setCurrentWidth(Kt,kt)}),Nt.appendChild(kt);var be=document.createElement("div");be.innerText=Kt.toString(),be.style.marginRight="5px",kt.appendChild(be);var An=document.createElement("div");An.style.minHeight="20px",An.style.flexGrow="2",An.style.display="flex",An.style.alignItems="center";var ze=document.createElement("hr");ze.style.minWidth="20px",ze.style.border="0px",ze.style.borderTop=Kt+"px solid "+Ct.uiStyleSettings.toolboxColor,ze.style.flexGrow="2",An.appendChild(ze),kt.appendChild(An),Ct.widthBoxes.push(kt)}),Nt},Et.prototype.setCurrentWidth=function(Ct,Nt){var Kt=this;this.currentWidth=Ct,this.widthBoxes.forEach(function(kt){kt.style.borderColor=kt===Nt?Kt.uiStyleSettings.toolboxAccentColor:"transparent"}),this.onWidthChanged&&this.onWidthChanged(this.currentWidth)},Et}(et),qt=function(Ht){function Et(Ct,Nt,Kt,kt){var be=Ht.call(this,Ct,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 be.styles=[],be.styleBoxes=[],be.styles=Nt,be.currentStyle=Kt,be.setCurrentStyle=be.setCurrentStyle.bind(be),be}return Be(Et,Ht),Et.prototype.getUi=function(){var Ct=this,Nt=document.createElement("div");return Nt.style.display="flex",Nt.style.overflow="hidden",Nt.style.flexGrow="2",this.styles.forEach(function(Kt){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/Ct.styles.length-5+"%",kt.style.borderColor=Kt===Ct.currentStyle?Ct.uiStyleSettings.toolboxAccentColor:"transparent",kt.addEventListener("click",function(){Ct.setCurrentStyle(Kt,kt)}),Nt.appendChild(kt);var be=document.createElement("div");be.style.minHeight="20px",be.style.flexGrow="2",be.style.overflow="hidden";var An=`<svg width="100" height="20">
<line x1="0" y1="10" x2="100" y2="10" stroke="`+Ct.uiStyleSettings.toolboxColor+'" stroke-width="3" '+(Kt!==""?'stroke-dasharray="'+Kt+'"':"")+` />
</svg>`;be.innerHTML=An,kt.appendChild(be),Ct.styleBoxes.push(kt)}),Nt},Et.prototype.setCurrentStyle=function(Ct,Nt){var Kt=this;this.currentStyle=Ct,this.styleBoxes.forEach(function(kt){kt.style.borderColor=kt===Nt?Kt.uiStyleSettings.toolboxAccentColor:"transparent"}),this.onStyleChanged&&this.onStyleChanged(this.currentStyle)},Et}(et),he=function(Ht){function Et(Ct,Nt,Kt){var kt=Ht.call(this,Ct,Nt,Kt)||this;return kt.strokeColor=Kt.defaultColor,kt.strokeWidth=Kt.defaultStrokeWidth,kt.strokeDasharray=Kt.defaultStrokeDasharray,kt.strokePanel=new nt("Line color",Kt.defaultColorSet,Kt.defaultColor),kt.strokePanel.onColorChanged=kt.setStrokeColor,kt.strokeWidthPanel=new Wt("Line width",Kt.defaultStrokeWidths,Kt.defaultStrokeWidth),kt.strokeWidthPanel.onWidthChanged=kt.setStrokeWidth,kt.strokeStylePanel=new qt("Line style",Kt.defaultStrokeDasharrays,Kt.defaultStrokeDasharray),kt.strokeStylePanel.onStyleChanged=kt.setStrokeDasharray,kt}return Be(Et,Ht),Object.defineProperty(Et.prototype,"toolboxPanels",{get:function(){return[this.strokePanel,this.strokeWidthPanel,this.strokeStylePanel]},enumerable:!1,configurable:!0}),Et.prototype.getState=function(){var Ct=Ht.prototype.getState.call(this);return Ct.typeName=Et.typeName,Ct},Et.typeName="FrameMarker",Et.title="Frame marker",Et.icon='<svg viewBox="0 0 24 24"><path d="M4 6v13h16V6H4m14 11H6V8h12v9z"/></svg>',Et}(It),fe=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"},Ae=function(Ht){function Et(Ct,Nt,Kt){var kt=Ht.call(this,Ct,Nt,Kt)||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 Be(Et,Ht),Et.prototype.ownsTarget=function(Ct){return!!Ht.prototype.ownsTarget.call(this,Ct)||!(!this.grip1.ownsTarget(Ct)&&!this.grip2.ownsTarget(Ct))},Et.prototype.pointerDown=function(Ct,Nt){Ht.prototype.pointerDown.call(this,Ct,Nt),this.manipulationStartX=Ct.x,this.manipulationStartY=Ct.y,this.state==="new"&&(this.x1=Ct.x,this.y1=Ct.y,this.x2=Ct.x,this.y2=Ct.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(Nt)?this.activeGrip=this.grip1:this.grip2.ownsTarget(Nt)?this.activeGrip=this.grip2:this.activeGrip=void 0,this.activeGrip?this._state="resize":this._state="move")},Et.prototype.pointerUp=function(Ct){var Nt=this.state;Ht.prototype.pointerUp.call(this,Ct),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(Ct),this._state="select",Nt==="creating"&&this.onMarkerCreated&&this.onMarkerCreated(this)},Et.prototype.adjustVisual=function(){},Et.prototype.manipulate=function(Ct){this.state==="creating"?this.resize(Ct):this.state==="move"?(this.x1=this.manipulationStartX1+Ct.x-this.manipulationStartX,this.y1=this.manipulationStartY1+Ct.y-this.manipulationStartY,this.x2=this.manipulationStartX2+Ct.x-this.manipulationStartX,this.y2=this.manipulationStartY2+Ct.y-this.manipulationStartY,this.adjustVisual(),this.adjustControlBox()):this.state==="resize"&&this.resize(Ct)},Et.prototype.resize=function(Ct){switch(this.activeGrip){case this.grip1:this.x1=Ct.x,this.y1=Ct.y;break;case this.grip2:case void 0:this.x2=Ct.x,this.y2=Ct.y}this.adjustVisual(),this.adjustControlBox()},Et.prototype.select=function(){Ht.prototype.select.call(this),this.adjustControlBox(),this.controlBox.style.display=""},Et.prototype.deselect=function(){Ht.prototype.deselect.call(this),this.controlBox.style.display="none"},Et.prototype.setupControlBox=function(){this.controlBox=we.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 Ct=new gt;return Ct.visual.transform.baseVal.appendItem(we.createTransform()),this.controlBox.appendChild(Ct.visual),Ct},Et.prototype.positionGrips=function(){var Ct=this.grip1.GRIP_SIZE;this.positionGrip(this.grip1.visual,this.x1-Ct/2,this.y1-Ct/2),this.positionGrip(this.grip2.visual,this.x2-Ct/2,this.y2-Ct/2)},Et.prototype.positionGrip=function(Ct,Nt,Kt){var kt=Ct.transform.baseVal.getItem(0);kt.setTranslate(Nt,Kt),Ct.transform.baseVal.replaceItem(kt,0)},Et.prototype.getState=function(){return Object.assign({x1:this.x1,y1:this.y1,x2:this.x2,y2:this.y2},Ht.prototype.getState.call(this))},Et.prototype.restoreState=function(Ct){Ht.prototype.restoreState.call(this,Ct);var Nt=Ct;this.x1=Nt.x1,this.y1=Nt.y1,this.x2=Nt.x2,this.y2=Nt.y2},Et.prototype.scale=function(Ct,Nt){Ht.prototype.scale.call(this,Ct,Nt),this.x1=this.x1*Ct,this.y1=this.y1*Nt,this.x2=this.x2*Ct,this.y2=this.y2*Nt,this.adjustVisual(),this.adjustControlBox()},Et}(ct),Ve=function(Ht){function Et(Ct,Nt,Kt){var kt=Ht.call(this,Ct,Nt,Kt)||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=Kt.defaultColor,kt.strokeWidth=Kt.defaultStrokeWidth,kt.strokeDasharray=Kt.defaultStrokeDasharray,kt.strokePanel=new nt("Line color",Kt.defaultColorSet,Kt.defaultColor),kt.strokePanel.onColorChanged=kt.setStrokeColor,kt.strokeWidthPanel=new Wt("Line width",Kt.defaultStrokeWidths,Kt.defaultStrokeWidth),kt.strokeWidthPanel.onWidthChanged=kt.setStrokeWidth,kt.strokeStylePanel=new qt("Line style",Kt.defaultStrokeDasharrays,Kt.defaultStrokeDasharray),kt.strokeStylePanel.onStyleChanged=kt.setStrokeDasharray,kt}return Be(Et,Ht),Et.prototype.ownsTarget=function(Ct){return!(!Ht.prototype.ownsTarget.call(this,Ct)&&Ct!==this.visual&&Ct!==this.selectorLine&&Ct!==this.visibleLine)},Et.prototype.createVisual=function(){this.visual=we.createGroup(),this.selectorLine=we.createLine(this.x1,this.y1,this.x2,this.y2,[["stroke","transparent"],["stroke-width",(this.strokeWidth+10).toString()]]),this.visibleLine=we.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(Ct,Nt){Ht.prototype.pointerDown.call(this,Ct,Nt),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()),we.setAttributes(this.visibleLine,[["stroke",this.strokeColor]]),we.setAttributes(this.visibleLine,[["stroke-width",this.strokeWidth.toString()]]),we.setAttributes(this.visibleLine,[["stroke-dasharray",this.strokeDasharray.toString()]]))},Et.prototype.setStrokeColor=function(Ct){this.strokeColor=Ct,this.adjustVisual(),this.colorChanged(Ct)},Et.prototype.setStrokeWidth=function(Ct){this.strokeWidth=Ct,this.adjustVisual()},Et.prototype.setStrokeDasharray=function(Ct){this.strokeDasharray=Ct,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 Ct=Object.assign({strokeColor:this.strokeColor,strokeWidth:this.strokeWidth,strokeDasharray:this.strokeDasharray},Ht.prototype.getState.call(this));return Ct.typeName=Et.typeName,Ct},Et.prototype.restoreState=function(Ct){Ht.prototype.restoreState.call(this,Ct);var Nt=Ct;this.strokeColor=Nt.strokeColor,this.strokeWidth=Nt.strokeWidth,this.strokeDasharray=Nt.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}(Ae),ye=function(Ht){function Et(Ct,Nt,Kt,kt){var be=Ht.call(this,Ct,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 be.fonts=[],be.fontBoxes=[],be.fonts=Nt,be.currentFont=Kt,be.setCurrentFont=be.setCurrentFont.bind(be),be}return Be(Et,Ht),Et.prototype.getUi=function(){var Ct=this,Nt=document.createElement("div");return Nt.style.overflow="hidden",Nt.style.flexGrow="2",this.fonts.forEach(function(Kt){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/Ct.fonts.length-5+"%",kt.style.borderColor=Kt===Ct.currentFont?Ct.uiStyleSettings.toolboxAccentColor:"transparent",kt.addEventListener("click",function(){Ct.setCurrentFont(Kt,kt)}),Nt.appendChild(kt);var be=document.createElement("div");be.style.display="flex",be.style.minHeight="20px",be.style.flexGrow="2",be.style.fontFamily=Kt,be.style.overflow="hidden";var An=document.createElement("div");An.style.whiteSpace="nowrap",An.style.overflow="hidden",An.style.textOverflow="ellipsis",An.innerHTML="The quick brown fox jumps over the lazy dog",be.appendChild(An),kt.appendChild(be),Ct.fontBoxes.push(kt)}),Nt},Et.prototype.setCurrentFont=function(Ct,Nt){var Kt=this;this.currentFont=Ct,this.fontBoxes.forEach(function(kt){kt.style.borderColor=kt===Nt?Kt.uiStyleSettings.toolboxAccentColor:"transparent"}),this.onFontChanged&&this.onFontChanged(this.currentFont)},Et}(et),on=function(Ht){function Et(Ct,Nt,Kt){var kt=Ht.call(this,Ct,Nt,Kt)||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=Kt.defaultColor,kt.fontFamily=Kt.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 nt("Color",Kt.defaultColorSet,Kt.defaultColor),kt.colorPanel.onColorChanged=kt.setColor,kt.fontFamilyPanel=new ye("Font",Kt.defaultFontFamilies,Kt.defaultFontFamily),kt.fontFamilyPanel.onFontChanged=kt.setFont,kt}return Be(Et,Ht),Et.prototype.ownsTarget=function(Ct){if(Ht.prototype.ownsTarget.call(this,Ct)||Ct===this.visual||Ct===this.textElement||Ct===this.bgRectangle)return!0;var Nt=!1;return this.textElement.childNodes.forEach(function(Kt){Kt===Ct&&(Nt=!0)}),Nt},Et.prototype.createVisual=function(){this.visual=we.createGroup(),this.bgRectangle=we.createRect(1,1,[["fill","transparent"]]),this.visual.appendChild(this.bgRectangle),this.textElement=we.createText([["fill",this.color],["font-family",this.fontFamily],["font-size","16px"],["x","0"],["y","0"]]),this.textElement.transform.baseVal.appendItem(we.createTransform()),this.textElement.transform.baseVal.appendItem(we.createTransform()),this.visual.appendChild(this.textElement),this.addMarkerVisualToContainer(this.visual),this.renderText()},Et.prototype.pointerDown=function(Ct,Nt){Ht.prototype.pointerDown.call(this,Ct,Nt),this.isMoved=!1,this.pointerDownPoint=Ct,this.pointerDownTimestamp=Date.now(),this.state==="new"&&(this.createVisual(),this.moveVisual(Ct),this._state="creating")},Et.prototype.renderText=function(){var Ct=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(Nt){Ct.textElement.appendChild(we.createTSpan(Nt.trim()===""?" ":Nt.trim(),[["x","0"],["dy","1.2em"]]))}),setTimeout(this.sizeText,10)}},Et.prototype.getTextScale=function(){var Ct=this.textElement.getBBox(),Nt=1;if(Ct.width>0&&Ct.height>0){var Kt=(1*this.width-this.width*this.padding*2/100)/Ct.width,kt=(1*this.height-this.height*this.padding*2/100)/Ct.height;Nt=Math.min(Kt,kt)}return Nt},Et.prototype.getTextPosition=function(Ct){var Nt=this.textElement.getBBox(),Kt=0,kt=0;return Nt.width>0&&Nt.height>0&&(Kt=(this.width-Nt.width*Ct)/2,kt=this.height/2-Nt.height*Ct/2),{x:Kt,y:kt}},Et.prototype.sizeText=function(){var Ct=this.textElement.getBBox(),Nt=this.getTextScale(),Kt=this.getTextPosition(Nt);Kt.y-=Ct.y*Nt,navigator.userAgent.indexOf("Edge/")>-1?this.textElement.style.transform="translate("+Kt.x+"px, "+Kt.y+"px) scale("+Nt+", "+Nt+")":(this.textElement.transform.baseVal.getItem(0).setTranslate(Kt.x,Kt.y),this.textElement.transform.baseVal.getItem(1).setScale(Nt,Nt))},Et.prototype.manipulate=function(Ct){Ht.prototype.manipulate.call(this,Ct),this.pointerDownPoint!==void 0&&(this.isMoved=Math.abs(Ct.x-this.pointerDownPoint.x)>5||Math.abs(Ct.y-this.pointerDownPoint.y)>5)},Et.prototype.resize=function(Ct){Ht.prototype.resize.call(this,Ct),this.isMoved=!0,this.setSize(),this.sizeText()},Et.prototype.setSize=function(){Ht.prototype.setSize.call(this),this.visual&&this.bgRectangle&&(we.setAttributes(this.visual,[["width",this.width.toString()],["height",this.height.toString()]]),we.setAttributes(this.bgRectangle,[["width",this.width.toString()],["height",this.height.toString()]]))},Et.prototype.pointerUp=function(Ct){var Nt=this.state;Nt==="creating"&&(this._suppressMarkerCreateEvent=!0),Ht.prototype.pointerUp.call(this,Ct),this.setSize(),(Nt==="creating"||!this.isMoved&&Date.now()-this.pointerDownTimestamp>500)&&this.showTextEditor(),this.pointerDownPoint=void 0},Et.prototype.showTextEditor=function(){var Ct=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(Nt){Nt.stopPropagation()}),this.textEditor.addEventListener("input",function(){for(var Nt=Number.parseFloat(Ct.textEditor.style.fontSize);Ct.textEditor.clientWidth>=Number.parseInt(Ct.textEditor.style.maxWidth)&&Nt>.9;)Nt-=.1,Ct.textEditor.style.fontSize=Math.max(Nt,.9)+"em"}),this.textEditor.addEventListener("keyup",function(Nt){Nt.cancelBubble=!0}),this.textEditor.addEventListener("paste",function(Nt){if(Nt.clipboardData){var Kt=Nt.clipboardData.getData("text"),kt=window.getSelection();if(!kt.rangeCount)return!1;kt.deleteFromDocument(),kt.getRangeAt(0).insertNode(document.createTextNode(Kt)),Nt.preventDefault()}}),this.textEditDiv.addEventListener("pointerup",function(){Ct.textEditDivClicked(Ct.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 Ct=this.getTextScale(),Nt=this.rotatePoint({x:this.left+this.width/2,y:this.top+this.height/2}),Kt=this.textElement.getBBox(),kt={x:Kt.width*Ct,y:Kt.height*Ct};Nt.x-=kt.x/2,Nt.y-=kt.y/2,this.textEditor.style.top=Nt.y+"px",this.textEditor.style.left=Nt.x+"px",this.textEditor.style.maxWidth=this.overlayContainer.offsetWidth-Nt.x+"px",this.textEditor.style.fontSize=Math.max(16*Ct,12)+"px",this.textElement.style.display="none"}},Et.prototype.textEditDivClicked=function(Ct){this.text=Ct.trim(),this.overlayContainer.innerHTML="",this.renderText(),this.showVisual(),this._suppressMarkerCreateEvent&&(this._suppressMarkerCreateEvent=!1,this.onMarkerCreated&&this.onMarkerCreated(this)),this.stateChanged()},Et.prototype.select=function(){Ht.prototype.select.call(this),this.state==="edit"&&this.textEditDivClicked(this.textEditor.innerText)},Et.prototype.deselect=function(){this.state==="edit"&&this.textEditDivClicked(this.textEditor.innerText),Ht.prototype.deselect.call(this)},Et.prototype.dblClick=function(Ct,Nt){Ht.prototype.dblClick.call(this,Ct,Nt),this.showTextEditor()},Et.prototype.setColor=function(Ct){this.textElement&&we.setAttributes(this.textElement,[["fill",Ct]]),this.color=Ct,this.textEditor&&(this.textEditor.style.color=this.color),this.colorChanged(Ct)},Et.prototype.setFont=function(Ct){this.textElement&&we.setAttributes(this.textElement,[["font-family",Ct]]),this.fontFamily=Ct,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 Ct=Object.assign({color:this.color,fontFamily:this.fontFamily,padding:this.padding,text:this.text},Ht.prototype.getState.call(this));return Ct.typeName=Et.typeName,Ct},Et.prototype.restoreState=function(Ct){var Nt=Ct;this.color=Nt.color,this.fontFamily=Nt.fontFamily,this.padding=Nt.padding,this.text=Nt.text,this.createVisual(),Ht.prototype.restoreState.call(this,Ct),this.setSize()},Et.prototype.scale=function(Ct,Nt){Ht.prototype.scale.call(this,Ct,Nt),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}(Lt),pn=function(Ht){function Et(Ct,Nt,Kt){var kt=Ht.call(this,Ct,Nt,Kt)||this;return kt.color="transparent",kt.lineWidth=3,kt.drawing=!1,kt.pixelRatio=1,kt.color=Kt.defaultColor,kt.lineWidth=Kt.defaultStrokeWidth,kt.pixelRatio=Kt.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 nt("Color",Kt.defaultColorSet,Kt.defaultColor),kt.colorPanel.onColorChanged=kt.setColor,kt.lineWidthPanel=new Wt("Line width",Kt.defaultStrokeWidths,Kt.defaultStrokeWidth),kt.lineWidthPanel.onWidthChanged=kt.setLineWidth,kt}return Be(Et,Ht),Et.prototype.ownsTarget=function(Ct){return!(!Ht.prototype.ownsTarget.call(this,Ct)&&Ct!==this.visual&&Ct!==this.drawingImage)},Et.prototype.createVisual=function(){this.visual=we.createGroup(),this.drawingImage=we.createImage(),this.visual.appendChild(this.drawingImage);var Ct=we.createTransform();this.visual.transform.baseVal.appendItem(Ct),this.addMarkerVisualToContainer(this.visual)},Et.prototype.pointerDown=function(Ct,Nt){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(Ct.x,Ct.y),this.drawing=!0):Ht.prototype.pointerDown.call(this,Ct,Nt)},Et.prototype.manipulate=function(Ct){this.state==="creating"?this.drawing&&(this.canvasContext.lineTo(Ct.x,Ct.y),this.canvasContext.stroke()):Ht.prototype.manipulate.call(this,Ct)},Et.prototype.resize=function(Ct){Ht.prototype.resize.call(this,Ct),we.setAttributes(this.visual,[["width",this.width.toString()],["height",this.height.toString()]]),we.setAttributes(this.drawingImage,[["width",this.width.toString()],["height",this.height.toString()]])},Et.prototype.pointerUp=function(Ct){this._state==="creating"?this.drawing&&(this.canvasContext.closePath(),this.drawing=!1,this.globalSettings.newFreehandMarkerOnPointerUp&&this.finishCreation()):Ht.prototype.pointerUp.call(this,Ct)},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(),Ht.prototype.select.call(this)},Et.prototype.deselect=function(){this.state==="creating"&&this.finishCreation(),Ht.prototype.deselect.call(this)},Et.prototype.finishCreation=function(){for(var Ct=this.canvasContext.getImageData(0,0,this.canvasElement.width,this.canvasElement.height),Nt=[this.canvasElement.width+1,this.canvasElement.height+1,-1,-1],Kt=Nt[0],kt=Nt[1],be=Nt[2],An=Nt[3],ze=!1,Je=0;Je<this.canvasElement.height;Je++)for(var rn=0;rn<this.canvasElement.width;rn++)Ct.data[Je*this.canvasElement.width*4+4*rn+3]>0&&(ze=!0,Je<kt&&(kt=Je),rn<Kt&&(Kt=rn),Je>An&&(An=Je),rn>be&&(be=rn));if(ze){this.left=Kt/this.pixelRatio,this.top=kt/this.pixelRatio,this.width=(be-Kt)/this.pixelRatio,this.height=(An-kt)/this.pixelRatio;var Oe=document.createElement("canvas");Oe.width=be-Kt,Oe.height=An-kt,Oe.getContext("2d").putImageData(this.canvasContext.getImageData(Kt,kt,be-Kt,An-kt),0,0),this.drawingImgUrl=Oe.toDataURL("image/png"),this.setDrawingImage(),this._state="select",this.onMarkerCreated&&this.onMarkerCreated(this)}this.overlayContainer.innerHTML=""},Et.prototype.setDrawingImage=function(){we.setAttributes(this.drawingImage,[["width",this.width.toString()],["height",this.height.toString()]]),we.setAttributes(this.drawingImage,[["href",this.drawingImgUrl]]),this.moveVisual({x:this.left,y:this.top})},Et.prototype.setColor=function(Ct){this.color=Ct,this.colorChanged(Ct)},Et.prototype.setLineWidth=function(Ct){this.lineWidth=Ct},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 Ct=Object.assign({drawingImgUrl:this.drawingImgUrl},Ht.prototype.getState.call(this));return Ct.typeName=Et.typeName,Ct},Et.prototype.restoreState=function(Ct){this.createVisual(),Ht.prototype.restoreState.call(this,Ct),this.drawingImgUrl=Ct.drawingImgUrl,this.setDrawingImage()},Et.prototype.scale=function(Ct,Nt){Ht.prototype.scale.call(this,Ct,Nt),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}(Lt),Vn=function(Ht){function Et(Ct,Nt,Kt){var kt=Ht.call(this,Ct,Kt||'<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=Nt,kt.setCurrentType=kt.setCurrentType.bind(kt),kt}return Be(Et,Ht),Et.prototype.getUi=function(){var Ct=this,Nt=document.createElement("div");Nt.style.display="flex",Nt.style.overflow="hidden",Nt.style.flexGrow="2";for(var Kt=function(An){var ze="both";switch(An){case 0:ze="both";break;case 1:ze="start";break;case 2:ze="end";break;case 3:ze="none"}var Je=document.createElement("div");if(Je.style.display="flex",Je.style.flexGrow="2",Je.style.alignItems="center",Je.style.justifyContent="space-between",Je.style.padding="5px",Je.style.borderWidth="2px",Je.style.borderStyle="solid",Je.style.borderColor=ze===kt.currentType?kt.uiStyleSettings.toolboxAccentColor:"transparent",Je.addEventListener("click",function(){Ct.setCurrentType(ze,Je)}),Nt.appendChild(Je),ze==="both"||ze==="start"){var rn=document.createElement("div");rn.style.display="flex",rn.style.alignItems="center",rn.style.minHeight="20px",rn.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>`,rn.style.marginLeft="5px",Je.appendChild(rn)}var Oe=document.createElement("div");Oe.style.display="flex",Oe.style.alignItems="center",Oe.style.minHeight="20px",Oe.style.flexGrow="2";var mn=document.createElement("hr");if(mn.style.minWidth="20px",mn.style.border="0px",mn.style.borderTop="3px solid "+(kt.uiStyleSettings!==void 0?kt.uiStyleSettings.toolboxColor:"#eeeeee"),mn.style.flexGrow="2",Oe.appendChild(mn),Je.appendChild(Oe),ze==="both"||ze==="end"){var cn=document.createElement("div");cn.style.display="flex",cn.style.alignItems="center",cn.style.minHeight="20px",cn.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>`,cn.style.marginRight="5px",Je.appendChild(cn)}kt.typeBoxes.push(Je)},kt=this,be=0;be<4;be++)Kt(be);return Nt},Et.prototype.setCurrentType=function(Ct,Nt){var Kt=this;this.currentType=Ct,this.typeBoxes.forEach(function(kt){kt.style.borderColor=kt===Nt?Kt.uiStyleSettings!==void 0?Kt.uiStyleSettings.toolboxAccentColor:"#3080c3":"transparent"}),this.onArrowTypeChanged&&this.onArrowTypeChanged(this.currentType)},Et}(et),ti=function(Ht){function Et(Ct,Nt,Kt){var kt=Ht.call(this,Ct,Nt,Kt)||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 Vn("Arrow type","end"),kt.arrowTypePanel.onArrowTypeChanged=kt.setArrowType,kt}return Be(Et,Ht),Et.prototype.ownsTarget=function(Ct){return!(!Ht.prototype.ownsTarget.call(this,Ct)&&Ct!==this.arrow1&&Ct!==this.arrow2)},Et.prototype.getArrowPoints=function(Ct,Nt){var Kt=this.arrowBaseWidth+2*this.strokeWidth,kt=this.arrowBaseHeight+2*this.strokeWidth;return Ct-Kt/2+","+(Nt+kt/2)+" "+Ct+","+(Nt-kt/2)+" "+(Ct+Kt/2)+","+(Nt+kt/2)},Et.prototype.createTips=function(){this.arrow1=we.createPolygon(this.getArrowPoints(this.x1,this.y1),[["fill",this.strokeColor]]),this.arrow1.transform.baseVal.appendItem(we.createTransform()),this.visual.appendChild(this.arrow1),this.arrow2=we.createPolygon(this.getArrowPoints(this.x2,this.y2),[["fill",this.strokeColor]]),this.arrow2.transform.baseVal.appendItem(we.createTransform()),this.visual.appendChild(this.arrow2)},Et.prototype.pointerDown=function(Ct,Nt){Ht.prototype.pointerDown.call(this,Ct,Nt),this.state==="creating"&&this.createTips()},Et.prototype.adjustVisual=function(){if(Ht.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",we.setAttributes(this.arrow1,[["points",this.getArrowPoints(this.x1,this.y1)],["fill",this.strokeColor]]),we.setAttributes(this.arrow2,[["points",this.getArrowPoints(this.x2,this.y2)],["fill",this.strokeColor]]);var Ct=0;Math.abs(this.x1-this.x2)>.1&&(Ct=180*Math.atan((this.y2-this.y1)/(this.x2-this.x1))/Math.PI+90*Math.sign(this.x1-this.x2));var Nt=this.arrow1.transform.baseVal.getItem(0);Nt.setRotate(Ct,this.x1,this.y1),this.arrow1.transform.baseVal.replaceItem(Nt,0);var Kt=this.arrow2.transform.baseVal.getItem(0);Kt.setRotate(Ct+180,this.x2,this.y2),this.arrow2.transform.baseVal.replaceItem(Kt,0)}},Et.prototype.setArrowType=function(Ct){this.arrowType=Ct,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 Ct=Object.assign({arrowType:this.arrowType},Ht.prototype.getState.call(this));return Ct.typeName=Et.typeName,Ct},Et.prototype.restoreState=function(Ct){Ht.prototype.restoreState.call(this,Ct);var Nt=Ct;this.arrowType=Nt.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),Xn=function(Ht){function Et(Ct,Nt,Kt){var kt=Ht.call(this,Ct,Nt,Kt)||this;return kt.fillColor=Kt.defaultFillColor,kt.strokeWidth=0,kt.fillPanel=new nt("Color",Kt.defaultColorSet,Kt.defaultFillColor),kt.fillPanel.onColorChanged=kt.setFillColor,kt}return Be(Et,Ht),Object.defineProperty(Et.prototype,"toolboxPanels",{get:function(){return[this.fillPanel]},enumerable:!1,configurable:!0}),Et.prototype.getState=function(){var Ct=Ht.prototype.getState.call(this);return Ct.typeName=Et.typeName,Ct},Et.typeName="CoverMarker",Et.title="Cover marker",Et.icon='<svg viewBox="0 0 24 24"><path d="M4 6v13h16V6H4z"/></svg>',Et}(It),Li=function(Ht){function Et(Ct,Nt,Kt,kt){var be=Ht.call(this,Ct,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 be.opacities=[],be.opacityBoxes=[],be.opacities=Nt,be.currentOpacity=Kt,be.setCurrentOpacity=be.setCurrentOpacity.bind(be),be}return Be(Et,Ht),Et.prototype.getUi=function(){var Ct=this,Nt=document.createElement("div");return Nt.style.display="flex",Nt.style.overflow="hidden",Nt.style.flexGrow="2",Nt.style.justifyContent="space-between",this.opacities.forEach(function(Kt){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=Kt===Ct.currentOpacity?Ct.uiStyleSettings.toolboxAccentColor:"transparent",kt.addEventListener("click",function(){Ct.setCurrentOpacity(Kt,kt)}),Nt.appendChild(kt);var be=document.createElement("div");be.innerText=100*Kt+"%",kt.appendChild(be),Ct.opacityBoxes.push(kt)}),Nt},Et.prototype.setCurrentOpacity=function(Ct,Nt){var Kt=this;this.currentOpacity=Ct,this.opacityBoxes.forEach(function(kt){kt.style.borderColor=kt===Nt?Kt.uiStyleSettings.toolboxAccentColor:"transparent"}),this.onOpacityChanged&&this.onOpacityChanged(this.currentOpacity)},Et}(et),Ii=function(Ht){function Et(Ct,Nt,Kt){var kt=Ht.call(this,Ct,Nt,Kt)||this;return kt.setOpacity=kt.setOpacity.bind(kt),kt.fillColor=Kt.defaultHighlightColor,kt.strokeWidth=0,kt.opacity=Kt.defaultHighlightOpacity,kt.fillPanel=new nt("Color",Kt.defaultColorSet,kt.fillColor),kt.fillPanel.onColorChanged=kt.setFillColor,kt.opacityPanel=new Li("Opacity",Kt.defaultOpacitySteps,kt.opacity),kt.opacityPanel.onOpacityChanged=kt.setOpacity,kt}return Be(Et,Ht),Et.prototype.setOpacity=function(Ct){this.opacity=Ct,this.visual&&we.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 Ct=Ht.prototype.getState.call(this);return Ct.typeName=Et.typeName,Ct},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}(Xn),ue='<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>',En=function(Ht){function Et(Ct,Nt,Kt){var kt=Ht.call(this,Ct,Nt,Kt)||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=Kt.defaultStrokeColor,kt.bgColor=Kt.defaultFillColor,kt.fontFamily=Kt.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 nt("Text color",Kt.defaultColorSet,kt.color,ue),kt.colorPanel.onColorChanged=kt.setColor,kt.bgColorPanel=new nt("Fill color",Kt.defaultColorSet,kt.bgColor,jt),kt.bgColorPanel.onColorChanged=kt.setBgColor,kt.fontFamilyPanel=new ye("Font",Kt.defaultFontFamilies,Kt.defaultFontFamily),kt.fontFamilyPanel.onFontChanged=kt.setFont,kt.tipGrip=new gt,kt.tipGrip.visual.transform.baseVal.appendItem(we.createTransform()),kt.controlBox.appendChild(kt.tipGrip.visual),kt}return Be(Et,Ht),Et.prototype.ownsTarget=function(Ct){return Ht.prototype.ownsTarget.call(this,Ct)||this.tipGrip.ownsTarget(Ct)||this.tip===Ct},Et.prototype.createTip=function(){we.setAttributes(this.bgRectangle,[["fill",this.bgColor],["rx","10px"]]),this.tip=we.createPolygon(this.getTipPoints(),[["fill",this.bgColor]]),this.visual.appendChild(this.tip)},Et.prototype.pointerDown=function(Ct,Nt){this.state==="new"&&Ht.prototype.pointerDown.call(this,Ct,Nt),this.state==="creating"?this.createTip():this.tipGrip.ownsTarget(Nt)?(this.manipulationStartLeft=this.left,this.manipulationStartTop=this.top,this.tipMoving=!0):Ht.prototype.pointerDown.call(this,Ct,Nt)},Et.prototype.pointerUp=function(Ct){if(this.tipMoving)this.tipMoving=!1,this.isMoved=!0,Ht.prototype.pointerUp.call(this,Ct);else{var Nt=this.state==="creating";Ht.prototype.pointerUp.call(this,Ct),this.setTipPoints(Nt),this.positionTip()}},Et.prototype.manipulate=function(Ct){if(this.tipMoving){var Nt=this.unrotatePoint(Ct);this.tipPosition={x:Nt.x-this.manipulationStartLeft,y:Nt.y-this.manipulationStartTop},this.positionTip()}else Ht.prototype.manipulate.call(this,Ct)},Et.prototype.setBgColor=function(Ct){this.bgRectangle&&this.tip&&(we.setAttributes(this.bgRectangle,[["fill",Ct]]),we.setAttributes(this.tip,[["fill",Ct]])),this.bgColor=Ct,this.fillColorChanged(Ct)},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(Ct){Ct===void 0&&(Ct=!1);var Nt=Math.min(this.height/2,15),Kt=this.height/5;Ct&&(this.tipPosition={x:Nt+Kt/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))?(Kt=this.width/5,Nt=Math.min(this.width/2,15),this.tipBase1Position={x:Nt,y:0},this.tipBase2Position={x:Nt+Kt,y:0}):(this.tipBase1Position={x:0,y:Nt},this.tipBase2Position={x:0,y:Nt+Kt}):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))?(Kt=this.width/5,Nt=Math.min(this.width/2,15),this.tipBase1Position={x:this.width-Nt-Kt,y:0},this.tipBase2Position={x:this.width-Nt,y:0}):(this.tipBase1Position={x:this.width,y:Nt},this.tipBase2Position={x:this.width,y:Nt+Kt}):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))?(Kt=this.width/5,Nt=Math.min(this.width/2,15),this.tipBase1Position={x:this.width-Nt-Kt,y:this.height},this.tipBase2Position={x:this.width-Nt,y:this.height}):(this.tipBase1Position={x:this.width,y:this.height-Nt-Kt},this.tipBase2Position={x:this.width,y:this.height-Nt}):kt<Math.atan((this.tipPosition.y-this.height/2)/(this.width/2-this.tipPosition.x))?(Kt=this.width/5,Nt=Math.min(this.width/2,15),this.tipBase1Position={x:Nt,y:this.height},this.tipBase2Position={x:Nt+Kt,y:this.height}):(this.tipBase1Position={x:0,y:this.height-Nt},this.tipBase2Position={x:0,y:this.height-Nt-Kt})},Et.prototype.resize=function(Ct){Ht.prototype.resize.call(this,Ct),this.positionTip()},Et.prototype.positionTip=function(){we.setAttributes(this.tip,[["points",this.getTipPoints()]]);var Ct=this.tipGrip.visual.transform.baseVal.getItem(0);Ct.setTranslate(this.tipPosition.x,this.tipPosition.y),this.tipGrip.visual.transform.baseVal.replaceItem(Ct,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(),Ht.prototype.select.call(this)},Et.prototype.getState=function(){var Ct=Object.assign({bgColor:this.bgColor,tipPosition:this.tipPosition},Ht.prototype.getState.call(this));return Ct.typeName=Et.typeName,Ct},Et.prototype.restoreState=function(Ct){var Nt=Ct;this.bgColor=Nt.bgColor,this.tipPosition=Nt.tipPosition,Ht.prototype.restoreState.call(this,Ct),this.createTip(),this.setTipPoints()},Et.prototype.scale=function(Ct,Nt){Ht.prototype.scale.call(this,Ct,Nt),this.tipPosition={x:this.tipPosition.x*Ct,y:this.tipPosition.y*Nt},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}(on),Si=function(Ht){function Et(Ct,Nt,Kt){var kt=Ht.call(this,Ct,Nt,Kt)||this;return kt.fillColor="transparent",kt.strokeColor="transparent",kt.strokeWidth=0,kt.strokeDasharray="",kt.opacity=1,kt.strokeColor=Kt.defaultColor,kt.strokeWidth=Kt.defaultStrokeWidth,kt.strokeDasharray=Kt.defaultStrokeDasharray,kt.fillColor=Kt.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 nt("Line color",Fe(Kt.defaultColorSet,["transparent"]),Kt.defaultColor),kt.strokePanel.onColorChanged=kt.setStrokeColor,kt.fillPanel=new nt("Fill color",Fe(Kt.defaultColorSet,["transparent"]),kt.fillColor,jt),kt.fillPanel.onColorChanged=kt.setFillColor,kt.strokeWidthPanel=new Wt("Line width",Kt.defaultStrokeWidths,Kt.defaultStrokeWidth),kt.strokeWidthPanel.onWidthChanged=kt.setStrokeWidth,kt.strokeStylePanel=new qt("Line style",Kt.defaultStrokeDasharrays,Kt.defaultStrokeDasharray),kt.strokeStylePanel.onStyleChanged=kt.setStrokeDasharray,kt.opacityPanel=new Li("Opacity",Kt.defaultOpacitySteps,kt.opacity),kt.opacityPanel.onOpacityChanged=kt.setOpacity,kt}return Be(Et,Ht),Et.prototype.ownsTarget=function(Ct){return!(!Ht.prototype.ownsTarget.call(this,Ct)&&Ct!==this.visual)},Et.prototype.createVisual=function(){this.visual=we.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(Ct,Nt){Ht.prototype.pointerDown.call(this,Ct,Nt),this.state==="new"&&(this.createVisual(),this.moveVisual(Ct),this._state="creating")},Et.prototype.manipulate=function(Ct){Ht.prototype.manipulate.call(this,Ct)},Et.prototype.resize=function(Ct){Ht.prototype.resize.call(this,Ct),this.setSize()},Et.prototype.setSize=function(){Ht.prototype.setSize.call(this),we.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(Ct){Ht.prototype.pointerUp.call(this,Ct),this.setSize()},Et.prototype.setStrokeColor=function(Ct){this.strokeColor=Ct,this.visual&&we.setAttributes(this.visual,[["stroke",this.strokeColor]]),this.colorChanged(Ct),this.stateChanged()},Et.prototype.setFillColor=function(Ct){this.fillColor=Ct,this.visual&&we.setAttributes(this.visual,[["fill",this.fillColor]]),this.fillColorChanged(Ct),this.stateChanged()},Et.prototype.setStrokeWidth=function(Ct){this.strokeWidth=Ct,this.visual&&we.setAttributes(this.visual,[["stroke-width",this.strokeWidth.toString()]]),this.stateChanged()},Et.prototype.setStrokeDasharray=function(Ct){this.strokeDasharray=Ct,this.visual&&we.setAttributes(this.visual,[["stroke-dasharray",this.strokeDasharray]]),this.stateChanged()},Et.prototype.setOpacity=function(Ct){this.opacity=Ct,this.visual&&we.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 Ct=Object.assign({fillColor:this.fillColor,strokeColor:this.strokeColor,strokeWidth:this.strokeWidth,strokeDasharray:this.strokeDasharray,opacity:this.opacity},Ht.prototype.getState.call(this));return Ct.typeName=Et.typeName,Ct},Et.prototype.restoreState=function(Ct){var Nt=Ct;this.fillColor=Nt.fillColor,this.strokeColor=Nt.strokeColor,this.strokeWidth=Nt.strokeWidth,this.strokeDasharray=Nt.strokeDasharray,this.opacity=Nt.opacity,this.createVisual(),Ht.prototype.restoreState.call(this,Ct),this.setSize()},Et.prototype.scale=function(Ct,Nt){Ht.prototype.scale.call(this,Ct,Nt),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}(Lt),pi=function(Ht){function Et(Ct,Nt,Kt){return Ht.call(this,Ct,Nt,Kt)||this}return Be(Et,Ht),Object.defineProperty(Et.prototype,"tipLength",{get:function(){return 10+3*this.strokeWidth},enumerable:!1,configurable:!0}),Et.prototype.ownsTarget=function(Ct){return!(!Ht.prototype.ownsTarget.call(this,Ct)&&Ct!==this.tip1&&Ct!==this.tip2)},Et.prototype.createTips=function(){this.tip1=we.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(we.createTransform()),this.visual.appendChild(this.tip1),this.tip2=we.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(we.createTransform()),this.visual.appendChild(this.tip2)},Et.prototype.pointerDown=function(Ct,Nt){Ht.prototype.pointerDown.call(this,Ct,Nt),this.state==="creating"&&this.createTips()},Et.prototype.adjustVisual=function(){if(Ht.prototype.adjustVisual.call(this),this.tip1&&this.tip2&&(we.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()]]),we.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 Ct=180*Math.atan((this.y2-this.y1)/(this.x2-this.x1))/Math.PI+90*Math.sign(this.x1-this.x2),Nt=this.tip1.transform.baseVal.getItem(0);Nt.setRotate(Ct,this.x1,this.y1),this.tip1.transform.baseVal.replaceItem(Nt,0);var Kt=this.tip2.transform.baseVal.getItem(0);Kt.setRotate(Ct+180,this.x2,this.y2),this.tip2.transform.baseVal.replaceItem(Kt,0)}},Object.defineProperty(Et.prototype,"toolboxPanels",{get:function(){return[this.strokePanel,this.strokeWidthPanel,this.strokeStylePanel]},enumerable:!1,configurable:!0}),Et.prototype.getState=function(){var Ct=Ht.prototype.getState.call(this);return Ct.typeName=Et.typeName,Ct},Et.prototype.restoreState=function(Ct){Ht.prototype.restoreState.call(this,Ct),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(Ht){function Et(Ct,Nt,Kt){var kt=Ht.call(this,Ct,Nt,Kt)||this;return kt.strokePanel.colors=Kt.defaultColorSet,kt.fillColor="transparent",kt}return Be(Et,Ht),Object.defineProperty(Et.prototype,"toolboxPanels",{get:function(){return[this.strokePanel,this.strokeWidthPanel,this.strokeStylePanel]},enumerable:!1,configurable:!0}),Et.prototype.getState=function(){var Ct=Ht.prototype.getState.call(this);return Ct.typeName=Et.typeName,Ct},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}(Si),Pn=function(){function Ht(){this.undoStack=[],this.redoStack=[]}return Object.defineProperty(Ht.prototype,"isUndoPossible",{get:function(){return this.undoStack.length>0},enumerable:!1,configurable:!0}),Object.defineProperty(Ht.prototype,"isRedoPossible",{get:function(){return this.redoStack.length>0},enumerable:!1,configurable:!0}),Object.defineProperty(Ht.prototype,"undoStepCount",{get:function(){return this.undoStack.length},enumerable:!1,configurable:!0}),Object.defineProperty(Ht.prototype,"redoStepCount",{get:function(){return this.redoStack.length},enumerable:!1,configurable:!0}),Ht.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))},Ht.prototype.replaceLastUndoStep=function(Et){this.undoStack.length>0&&(this.undoStack[this.undoStack.length-1]=Et)},Ht.prototype.getLastUndoStep=function(){return this.undoStack.length>0?this.undoStack[this.undoStack.length-1]:void 0},Ht.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}},Ht.prototype.redo=function(){return this.lastRedoStep=this.redoStack.pop(),this.lastRedoStep},Ht}(),qn=function(Ht){function Et(Ct,Nt,Kt){var kt=Ht.call(this,Ct,Nt,Kt)||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=Kt.defaultColor,kt.strokeWidth=Kt.defaultStrokeWidth,kt.strokeDasharray=Kt.defaultStrokeDasharray,kt.strokePanel=new nt("Line color",Kt.defaultColorSet,Kt.defaultColor),kt.strokePanel.onColorChanged=kt.setStrokeColor,kt.strokeWidthPanel=new Wt("Line width",Kt.defaultStrokeWidths,Kt.defaultStrokeWidth),kt.strokeWidthPanel.onWidthChanged=kt.setStrokeWidth,kt.strokeStylePanel=new qt("Line style",Kt.defaultStrokeDasharrays,Kt.defaultStrokeDasharray),kt.strokeStylePanel.onStyleChanged=kt.setStrokeDasharray,kt}return Be(Et,Ht),Et.prototype.ownsTarget=function(Ct){return!(!Ht.prototype.ownsTarget.call(this,Ct)&&Ct!==this.visual&&Ct!==this.selectorCurve&&Ct!==this.visibleCurve&&!this.curveGrip.ownsTarget(Ct))},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=we.createGroup(),this.selectorCurve=we.createPath(this.getPathD(),[["stroke","transparent"],["stroke-width",(this.strokeWidth+10).toString()],["fill","transparent"]]),this.visibleCurve=we.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(Ct,Nt){Ht.prototype.pointerDown.call(this,Ct,Nt),this.manipulationStartCurveX=this.curveX,this.manipulationStartCurveY=this.curveY,this.state==="new"&&(this.curveX=Ct.x,this.curveY=Ct.y),this.state==="new"?(this.createVisual(),this.adjustVisual(),this._state="creating"):this.curveGrip.ownsTarget(Nt)&&(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()),we.setAttributes(this.visibleCurve,[["stroke",this.strokeColor]]),we.setAttributes(this.visibleCurve,[["stroke-width",this.strokeWidth.toString()]]),we.setAttributes(this.visibleCurve,[["stroke-dasharray",this.strokeDasharray.toString()]]))},Et.prototype.setupControlBox=function(){Ht.prototype.setupControlBox.call(this),this.curveControlLine1=we.createLine(this.x1,this.y1,this.curveX,this.curveY,[["stroke","black"],["stroke-width","1"],["stroke-opacity","0.5"],["stroke-dasharray","3, 2"]]),this.curveControlLine2=we.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,Ht.prototype.addControlGrips.call(this)},Et.prototype.positionGrips=function(){Ht.prototype.positionGrips.call(this);var Ct=this.curveGrip.GRIP_SIZE;this.positionGrip(this.curveGrip.visual,this.curveX-Ct/2,this.curveY-Ct/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(Ct){this.state==="move"&&(this.curveX=this.manipulationStartCurveX+Ct.x-this.manipulationStartX,this.curveY=this.manipulationStartCurveY+Ct.y-this.manipulationStartY),Ht.prototype.manipulate.call(this,Ct)},Et.prototype.resize=function(Ct){this.activeGrip===this.curveGrip&&(this.curveX=Ct.x,this.curveY=Ct.y),Ht.prototype.resize.call(this,Ct),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(Ct){this.strokeColor=Ct,this.adjustVisual(),this.colorChanged(Ct)},Et.prototype.setStrokeWidth=function(Ct){this.strokeWidth=Ct,this.adjustVisual()},Et.prototype.setStrokeDasharray=function(Ct){this.strokeDasharray=Ct,this.adjustVisual()},Et.prototype.scale=function(Ct,Nt){this.curveX=this.curveX*Ct,this.curveY=this.curveY*Nt,Ht.prototype.scale.call(this,Ct,Nt)},Object.defineProperty(Et.prototype,"toolboxPanels",{get:function(){return[this.strokePanel,this.strokeWidthPanel,this.strokeStylePanel]},enumerable:!1,configurable:!0}),Et.prototype.getState=function(){var Ct=Object.assign({strokeColor:this.strokeColor,strokeWidth:this.strokeWidth,strokeDasharray:this.strokeDasharray,curveX:this.curveX,curveY:this.curveY},Ht.prototype.getState.call(this));return Ct.typeName=Et.typeName,Ct},Et.prototype.restoreState=function(Ct){Ht.prototype.restoreState.call(this,Ct);var Nt=Ct;this.strokeColor=Nt.strokeColor,this.strokeWidth=Nt.strokeWidth,this.strokeDasharray=Nt.strokeDasharray,this.curveX=Nt.curveX,this.curveY=Nt.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}(Ae),xi=function(Ht){function Et(Ct,Nt,Kt){var kt=Ht.call(this,Ct,Nt,Kt)||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=Kt.defaultColor,kt.strokeWidth=Kt.defaultStrokeWidth,kt.strokeDasharray=Kt.defaultStrokeDasharray,kt.fillColor=Kt.defaultFillColor,kt.textColor=Kt.defaultStrokeColor,kt.fontFamily=Kt.defaultFontFamily,kt.fontSize=Kt.defaultCaptionFontSize,kt.captionText=Kt.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 nt("Line color",Fe(Kt.defaultColorSet,["transparent"]),kt.strokeColor),kt.strokePanel.onColorChanged=kt.setStrokeColor,kt.fillPanel=new nt("Fill color",Fe(Kt.defaultColorSet,["transparent"]),kt.fillColor,jt),kt.fillPanel.onColorChanged=kt.setFillColor,kt.strokeWidthPanel=new Wt("Line width",Kt.defaultStrokeWidths,Kt.defaultStrokeWidth),kt.strokeWidthPanel.onWidthChanged=kt.setStrokeWidth,kt.strokeStylePanel=new qt("Line style",Kt.defaultStrokeDasharrays,Kt.defaultStrokeDasharray),kt.strokeStylePanel.onStyleChanged=kt.setStrokeDasharray,kt.fontFamilyPanel=new ye("Font",Kt.defaultFontFamilies,Kt.defaultFontFamily),kt.fontFamilyPanel.onFontChanged=kt.setFont,kt.textColorPanel=new nt("Text color",Kt.defaultColorSet,kt.textColor,ue),kt.textColorPanel.onColorChanged=kt.setTextColor,kt}return Be(Et,Ht),Et.prototype.ownsTarget=function(Ct){return!(!Ht.prototype.ownsTarget.call(this,Ct)&&Ct!==this.visual&&Ct!==this.frame&&Ct!==this.captionBg&&Ct!==this.captionElement)},Et.prototype.createVisual=function(){this.visual=we.createGroup(),this.addMarkerVisualToContainer(this.visual),this.captionBg=we.createRect(1,1,[["fill",this.fillColor]]),this.visual.appendChild(this.captionBg),this.captionElement=we.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=we.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(Ct){this.captionText=Ct,this.captionElement.textContent=this.captionText,this.sizeCaption()},Et.prototype.pointerDown=function(Ct,Nt){Ht.prototype.pointerDown.call(this,Ct,Nt),this.isMoved=!1,this.pointerDownPoint=Ct,this.pointerDownTimestamp=Date.now(),this.state==="new"&&(this.createVisual(),this.moveVisual(Ct),this._state="creating")},Et.prototype.manipulate=function(Ct){Ht.prototype.manipulate.call(this,Ct),this.pointerDownPoint!==void 0&&(this.isMoved=Math.abs(Ct.x-this.pointerDownPoint.x)>5||Math.abs(Ct.y-this.pointerDownPoint.y)>5)},Et.prototype.resize=function(Ct){Ht.prototype.resize.call(this,Ct),this.setSize()},Et.prototype.sizeCaption=function(){var Ct=this.captionElement.getBBox();this.captionText.trim()!==""?(this.captionBoxWidth=Ct.width+2*this.PADDING,this.captionBoxHeight=Ct.height+2*this.PADDING):(this.captionBoxWidth=0,this.captionBoxHeight=0),we.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')"]]),we.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 Ct=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(Nt){Nt.stopPropagation()}),this.textEditBox.addEventListener("keypress",function(Nt){Nt.key==="Enter"&&Ct.finishTextEditing(Ct.textEditBox.value)}),this.textEditBox.addEventListener("keyup",function(Nt){Nt.cancelBubble=!0}),this.textEditBox.addEventListener("blur",function(){Ct.finishTextEditing(Ct.textEditBox.value)}),this.textEditDiv.addEventListener("pointerup",function(){Ct.finishTextEditing(Ct.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(Ct){this.setCaptionText(Ct.trim()),this.overlayContainer.innerHTML="",this.stateChanged()},Et.prototype.setFont=function(Ct){this.captionElement&&we.setAttributes(this.captionElement,[["font-family",Ct]]),this.fontFamily=Ct,this.textEditBox&&(this.textEditBox.style.fontFamily=this.fontFamily),this.sizeCaption(),this.stateChanged()},Et.prototype.setTextColor=function(Ct){this.captionElement&&we.setAttributes(this.captionElement,[["fill",Ct]]),this.textColor=Ct,this.textEditBox&&(this.textEditBox.style.color=this.textColor),this.stateChanged()},Et.prototype.setSize=function(){Ht.prototype.setSize.call(this),we.setAttributes(this.frame,[["width",this.width.toString()],["height",this.height.toString()]]),this.sizeCaption()},Et.prototype.pointerUp=function(Ct){Ht.prototype.pointerUp.call(this,Ct),this.setSize(),!this.isMoved&&Date.now()-this.pointerDownTimestamp>500&&this.showTextEditor(),this.pointerDownPoint=void 0},Et.prototype.dblClick=function(Ct,Nt){Ht.prototype.dblClick.call(this,Ct,Nt),this.showTextEditor()},Et.prototype.setStrokeColor=function(Ct){this.strokeColor=Ct,this.frame&&we.setAttributes(this.frame,[["stroke",this.strokeColor]]),this.colorChanged(Ct),this.stateChanged()},Et.prototype.setFillColor=function(Ct){this.fillColor=Ct,this.captionBg&&we.setAttributes(this.captionBg,[["fill",this.fillColor]]),this.fillColorChanged(Ct),this.stateChanged()},Et.prototype.setStrokeWidth=function(Ct){this.strokeWidth=Ct,this.frame&&we.setAttributes(this.frame,[["stroke-width",this.strokeWidth.toString()]]),this.stateChanged()},Et.prototype.setStrokeDasharray=function(Ct){this.strokeDasharray=Ct,this.frame&&we.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 Ct=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},Ht.prototype.getState.call(this));return Ct.typeName=this.typeName,Ct},Et.prototype.restoreState=function(Ct){var Nt=Ct;this.fillColor=Nt.fillColor,this.strokeColor=Nt.strokeColor,this.strokeWidth=Nt.strokeWidth,this.strokeDasharray=Nt.strokeDasharray,this.textColor=Nt.textColor,this.fontFamily=Nt.fontFamily,this.captionText=Nt.captionText,this.fontSize=Nt.fontSize,this.createVisual(),Ht.prototype.restoreState.call(this,Ct),this.setSize()},Et.prototype.scale=function(Ct,Nt){Ht.prototype.scale.call(this,Ct,Nt),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}(Lt),kn=function(){function Ht(Et,Ct){Ct===void 0&&(Ct=!1),this.cancelable=!1,this._defaultPrevented=!1,this.markerArea=Et,this.cancelable=Ct}return Object.defineProperty(Ht.prototype,"defaultPrevented",{get:function(){return this._defaultPrevented},enumerable:!1,configurable:!0}),Ht.prototype.preventDefault=function(){this._defaultPrevented=!0},Ht}(),Ce=function(Ht){function Et(Ct,Nt,Kt){var kt=Ht.call(this,Ct,!1)||this;return kt.dataUrl=Nt,kt.state=Kt,kt}return Be(Et,Ht),Et}(kn),Ge=function(Ht){function Et(Ct,Nt,Kt){Kt===void 0&&(Kt=!1);var kt=Ht.call(this,Ct,Kt)||this;return kt.marker=Nt,kt}return Be(Et,Ht),Et}(kn),gi=function(){function Ht(){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 Ht.prototype.addEventListener=function(Et,Ct){this[Et].push(Ct)},Ht.prototype.removeEventListener=function(Et,Ct){var Nt=this[Et].indexOf(Ct);Nt>-1&&this[Et].splice(Nt,1)},Ht}(),yi=function(){function Ht(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 fe,this._isOpen=!1,this.undoRedoManager=new Pn,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 gi,this._silentRenderMode=!1,this._isFocused=!1,this._instanceNo=Ht.instanceCounter++,this.styles=new se(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(Ht.prototype,"ALL_MARKER_TYPES",{get:function(){return[he,pn,ti,on,Ke,Si,Ii,En,pi,Xn,Ve,qn,xi]},enumerable:!1,configurable:!0}),Object.defineProperty(Ht.prototype,"DEFAULT_MARKER_TYPES",{get:function(){return[he,pn,ti,on,Si,Ii,En]},enumerable:!1,configurable:!0}),Object.defineProperty(Ht.prototype,"BASIC_MARKER_TYPES",{get:function(){return[he,pn,ti,on,Ii]},enumerable:!1,configurable:!0}),Object.defineProperty(Ht.prototype,"availableMarkerTypes",{get:function(){return this._availableMarkerTypes},set:function(Et){var Ct=this;this._availableMarkerTypes.splice(0),Et.forEach(function(Nt){if(typeof Nt=="string"){var Kt=Ct.ALL_MARKER_TYPES.find(function(kt){return kt.typeName===Nt});Kt!==void 0&&Ct._availableMarkerTypes.push(Kt)}else Ct._availableMarkerTypes.push(Nt)})},enumerable:!1,configurable:!0}),Object.defineProperty(Ht.prototype,"currentMarker",{get:function(){return this._currentMarker},enumerable:!1,configurable:!0}),Object.defineProperty(Ht.prototype,"isOpen",{get:function(){return this._isOpen},enumerable:!1,configurable:!0}),Object.defineProperty(Ht.prototype,"isUndoPossible",{get:function(){return!(!this.undoRedoManager||!this.undoRedoManager.isUndoPossible)},enumerable:!1,configurable:!0}),Object.defineProperty(Ht.prototype,"isRedoPossible",{get:function(){return!(!this.undoRedoManager||!this.undoRedoManager.isRedoPossible)},enumerable:!1,configurable:!0}),Object.defineProperty(Ht.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(Ht.prototype,"instanceNo",{get:function(){return this._instanceNo},enumerable:!1,configurable:!0}),Ht.prototype.open=function(){this.setupResizeObserver(),this.setEditingTarget(),this.setTopLeft(),this.initMarkerCanvas(),this.initOverlay(),this.attachEvents(),this.settings.displayMode==="popup"&&this.onPopupTargetResize(),ve.isLicensed||this.addLogo(),this._isOpen=!0,this._isFocused=!0},Ht.prototype.show=function(){var Et=this;this.styles.styleSheetRoot===void 0&&ge.styleSheetRoot!==void 0&&(this.styles.styleSheetRoot=ge.styleSheetRoot),this.setWindowHeight(),this.showUI(),this.open(),this.eventListeners.show.forEach(function(Ct){return Ct(new kn(Et))})},Ht.prototype.render=function(){return Ee(this,void 0,void 0,function(){var Et;return Ze(this,function(Ct){switch(Ct.label){case 0:return this.setCurrentMarker(),(Et=new Qe).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 Ct.sent(),[4,Et.rasterize(this.target instanceof HTMLImageElement?this.target:null,this.markerImage,this.renderTarget)];case 2:return[2,Ct.sent()]}})})},Ht.prototype.close=function(Et){var Ct=this;if(Et===void 0&&(Et=!1),this.isOpen){var Nt=!1;Et||this.eventListeners.beforeclose.forEach(function(Kt){var kt=new kn(Ct,!0);Kt(kt),kt.defaultPrevented&&(Nt=!0)}),Nt||(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(Kt){return Kt(new kn(Ct))}),this.detachEvents(),this._isOpen=!1)}},Ht.prototype.addMarkersToToolbar=function(){for(var Et,Ct=[],Nt=0;Nt<arguments.length;Nt++)Ct[Nt]=arguments[Nt];(Et=this._availableMarkerTypes).push.apply(Et,Ct)},Ht.prototype.addRenderEventListener=function(Et){this.addEventListener("render",function(Ct){Et(Ct.dataUrl,Ct.state)})},Ht.prototype.removeRenderEventListener=function(Et){},Ht.prototype.addCloseEventListener=function(Et){this.addEventListener("close",function(){Et()})},Ht.prototype.removeCloseEventListener=function(Et){},Ht.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))},Ht.prototype.onPopupTargetResize=function(){var Et=1*this.target.clientWidth/this.target.clientHeight,Ct=this.editorCanvas.clientWidth/Et>this.editorCanvas.clientHeight?this.editorCanvas.clientHeight*Et:this.editorCanvas.clientWidth,Nt=Ct<this.editorCanvas.clientWidth?this.editorCanvas.clientHeight:this.editorCanvas.clientWidth/Et;this.resize(Ct,Nt)},Ht.prototype.setWindowHeight=function(){this.windowHeight=window.innerHeight},Ht.prototype.resize=function(Et,Ct){this._isResizing=!0;var Nt=Et/this.imageWidth,Kt=Ct/this.imageHeight;this.imageWidth=Math.round(Et),this.imageHeight=Math.round(Ct),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(Nt,Kt),this._isResizing=!1},Ht.prototype.scaleMarkers=function(Et,Ct){var Nt,Kt=this;this._currentMarker&&this._currentMarker instanceof on?this._currentMarker.scale(Et,Ct):(Nt=this._currentMarker,this.setCurrentMarker()),this.markers.forEach(function(kt){kt!==Kt._currentMarker&&kt.scale(Et,Ct)}),Nt!==void 0&&this.setCurrentMarker(Nt)},Ht.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"},Ht.prototype.setTopLeft=function(){var Et=this.editingTarget.getBoundingClientRect(),Ct=this.editorCanvas.getBoundingClientRect();this.left=Et.left-Ct.left,this.top=Et.top-Ct.top},Ht.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)},Ht.prototype.addDefs=function(){for(var Et,Ct=[],Nt=0;Nt<arguments.length;Nt++)Ct[Nt]=arguments[Nt];this.defs=we.createDefs(),this.addDefsToImage(),(Et=this.defs).append.apply(Et,Ct)},Ht.prototype.addDefsToImage=function(){this.defs&&this.markerImage.insertBefore(this.defs,this.markerImage.firstChild)},Ht.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)},Ht.prototype.positionMarkerImage=function(){this.markerImageHolder.style.top=this.top/this.zoomLevel+"px",this.markerImageHolder.style.left=this.left/this.zoomLevel+"px"},Ht.prototype.attachEvents=function(){this.markerImage.addEventListener("pointerdown",this.onPointerDown),this.markerImage.addEventListener("dblclick",this.onDblClick),this.attachWindowEvents()},Ht.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)},Ht.prototype.detachEvents=function(){this.markerImage.removeEventListener("pointerdown",this.onPointerDown),this.markerImage.removeEventListener("dblclick",this.onDblClick),this.detachWindowEvents()},Ht.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)},Ht.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()},Ht.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")},Ht.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"},Ht.prototype.restoreOverflow=function(){document.body.style.overflow=this.bodyOverflowState,window.scroll({top:this.scrollYState,left:this.scrollXState})},Ht.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 xn(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 Ut(this.uiDiv,this.settings.displayMode,this.uiStyleSettings,this.styles),this.toolbox.show(this._silentRenderMode||this.uiStyleSettings.hideToolbox?"hidden":"visible")},Ht.prototype.closeUI=function(){this.settings.displayMode==="popup"&&this.restoreOverflow(),this.targetRoot.removeChild(this.coverDiv)},Ht.prototype.removeMarker=function(Et){this.markerImage.removeChild(Et.container),this.markers.indexOf(Et)>-1&&this.markers.splice(this.markers.indexOf(Et),1),Et.dispose()},Ht.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())},Ht.prototype.toolbarButtonClicked=function(Et,Ct){if(Et==="marker"&&Ct!==void 0)this.createNewMarker(Ct);else if(Et==="action")switch(Ct){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()}},Ht.prototype.deleteSelectedMarker=function(){var Et=this;if(this._currentMarker!==void 0){var Ct=!1;if(this.eventListeners.markerbeforedelete.forEach(function(Kt){var kt=new Ge(Et,Et._currentMarker,!0);Kt(kt),kt.defaultPrevented&&(Ct=!0)}),!Ct){var Nt=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(Kt){return Kt(new Ge(Et,Nt))})}}},Ht.prototype.clear=function(){var Et=this,Ct=!1;if(this.markers.length>0&&(this.eventListeners.markerbeforedelete.forEach(function(be){var An=new Ge(Et,void 0,!0);be(An),An.defaultPrevented&&(Ct=!0)}),!Ct)){this.setCurrentMarker();for(var Nt=function(be){var An=Kt.markers[be];Kt.setCurrentMarker(Kt.markers[be]),Kt._currentMarker.dispose(),Kt.markerImage.removeChild(Kt._currentMarker.container),Kt.markers.splice(Kt.markers.indexOf(Kt._currentMarker),1),Kt.eventListeners.markerdelete.forEach(function(ze){return ze(new Ge(Et,An))})},Kt=this,kt=this.markers.length-1;kt>=0;kt--)Nt(kt);this.addUndoStep()}},Object.defineProperty(Ht.prototype,"isNotesAreaOpen",{get:function(){return this.notesArea!==void 0},enumerable:!1,configurable:!0}),Ht.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))},Ht.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)},Ht.prototype.selectLastMarker=function(){this.markers.length>0?this.setCurrentMarker(this.markers[this.markers.length-1]):this.setCurrentMarker()},Ht.prototype.addUndoStep=function(){var Et=this;if(this._currentMarker===void 0||this._currentMarker.state!=="edit"){var Ct=this.getState(),Nt=this.undoRedoManager.getLastUndoStep();if(!Nt||Nt.width===Ct.width&&Nt.height===Ct.height){var Kt=this.undoRedoManager.undoStepCount;this.undoRedoManager.addUndoStep(Ct),Kt<this.undoRedoManager.undoStepCount&&this.eventListeners.statechange.forEach(function(kt){return kt(new kn(Et))})}else this.undoRedoManager.replaceLastUndoStep(Ct),this.eventListeners.statechange.forEach(function(kt){return kt(new kn(Et))})}},Ht.prototype.undo=function(){this.switchToSelectMode(),this.addUndoStep(),this.undoStep()},Ht.prototype.undoStep=function(){var Et=this,Ct=this.undoRedoManager.undo();Ct!==void 0&&(this.restoreState(Ct),this.addDefsToImage(),this.selectLastMarker(),this.eventListeners.statechange.forEach(function(Nt){return Nt(new kn(Et))}))},Ht.prototype.redo=function(){this.switchToSelectMode(),this.redoStep()},Ht.prototype.redoStep=function(){var Et=this,Ct=this.undoRedoManager.redo();Ct!==void 0&&(this.restoreState(Ct),this.addDefsToImage(),this.selectLastMarker(),this.eventListeners.statechange.forEach(function(Nt){return Nt(new kn(Et))}))},Ht.prototype.stepZoom=function(){var Et=this.zoomSteps.indexOf(this.zoomLevel);this.zoomLevel=Et<this.zoomSteps.length-1?this.zoomSteps[Et+1]:this.zoomSteps[0]},Ht.prototype.panTo=function(Et){this.contentDiv.scrollBy({left:this.prevPanPoint.x-Et.x,top:this.prevPanPoint.y-Et.y}),this.prevPanPoint=Et},Ht.prototype.startRenderAndClose=function(){return Ee(this,void 0,void 0,function(){var Et,Ct,Nt=this;return Ze(this,function(Kt){switch(Kt.label){case 0:return[4,this.render()];case 1:return Et=Kt.sent(),Ct=this.getState(),this.eventListeners.render.forEach(function(kt){return kt(new Ce(Nt,Et,Ct))}),this.close(!0),[2]}})})},Ht.prototype.getState=function(Et){Et===!0&&this.setCurrentMarker();var Ct={width:this.imageWidth,height:this.imageHeight,markers:[]};return this.markers.forEach(function(Nt){return Ct.markers.push(Nt.getState())}),Ct},Ht.prototype.restoreState=function(Et){var Ct=this;for(this.markers.splice(0);this.markerImage.lastChild;)this.markerImage.removeChild(this.markerImage.lastChild);Et.markers.forEach(function(Nt){var Kt=Ct._availableMarkerTypes.find(function(be){return be.typeName===Nt.typeName});if(Kt!==void 0){var kt=Ct.addNewMarker(Kt);kt.restoreState(Nt),Ct.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(Nt){return Nt(new kn(Ct))})},Ht.prototype.addNewMarker=function(Et){var Ct=we.createGroup();return this.markerImage.appendChild(Ct),new Et(Ct,this.overlayContainer,this.settings)},Ht.prototype.createNewMarker=function(Et){var Ct,Nt=this;(Ct=typeof Et=="string"?this._availableMarkerTypes.find(function(Kt){return Kt.typeName===Et}):Et)&&(this.setCurrentMarker(),this.addUndoStep(),this._currentMarker=this.addNewMarker(Ct),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(Ct.typeName),this.toolbox.setPanelButtons(this._currentMarker.toolboxPanels),this.eventListeners.markercreating.forEach(function(Kt){return Kt(new Ge(Nt,Nt._currentMarker))}))},Ht.prototype.markerCreated=function(Et){var Ct=this;this.mode="select",this.markerImage.style.cursor="default",this.markers.push(Et),this.setCurrentMarker(Et),Et instanceof pn&&this.settings.newFreehandMarkerOnPointerUp?this.createNewMarker(pn):this.toolbar.setSelectMode(),this.addUndoStep(),this.eventListeners.markercreate.forEach(function(Nt){return Nt(new Ge(Ct,Ct._currentMarker))})},Ht.prototype.colorChanged=function(Et){this.settings.defaultColorsFollowCurrentColors&&(this.settings.defaultColor=Et,this.settings.defaultStrokeColor=Et)},Ht.prototype.fillColorChanged=function(Et){this.settings.defaultColorsFollowCurrentColors&&(this.settings.defaultFillColor=Et)},Ht.prototype.markerStateChanged=function(Et){var Ct=this;this.eventListeners.markerchange.forEach(function(Nt){return Nt(new Ge(Ct,Et))})},Ht.prototype.setCurrentMarker=function(Et){var Ct=this;this._currentMarker!==Et&&this._currentMarker!==void 0&&(this._currentMarker.deselect(),this.toolbar.setCurrentMarker(),this.toolbox.setPanelButtons([]),this._isResizing||this.eventListeners.markerdeselect.forEach(function(Nt){return Nt(new Ge(Ct,Ct._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(Nt){return Nt(new Ge(Ct,Ct._currentMarker))}))},Ht.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 Ct=this.markers.find(function(Nt){return Nt.ownsTarget(Et.target)});Ct!==void 0?(this.setCurrentMarker(Ct),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))},Ht.prototype.onDblClick=function(Et){if(this._isFocused||this.focus(),this.mode==="select"){var Ct=this.markers.find(function(Nt){return Nt.ownsTarget(Et.target)});Ct!==void 0&&Ct!==this._currentMarker&&this.setCurrentMarker(Ct),this._currentMarker!==void 0?this._currentMarker.dblClick(this.clientToLocalCoordinates(Et.clientX,Et.clientY),Et.target):this.setCurrentMarker()}},Ht.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}))},Ht.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()},Ht.prototype.onPointerOut=function(){this.touchPoints>0&&this.touchPoints--},Ht.prototype.onKeyUp=function(Et){this._currentMarker===void 0||this.notesArea!==void 0||Et.key!=="Delete"&&Et.key!=="Backspace"||this.deleteSelectedMarker()},Ht.prototype.clientToLocalCoordinates=function(Et,Ct){var Nt=this.markerImage.getBoundingClientRect();return{x:(Et-Nt.left)/this.zoomLevel,y:(Ct-Nt.top)/this.zoomLevel}},Ht.prototype.onWindowResize=function(){this.positionUI()},Ht.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()},Ht.prototype.addLicenseKey=function(Et){ve.addKey(Et)},Ht.prototype.addEventListener=function(Et,Ct){this.eventListeners.addEventListener(Et,Ct)},Ht.prototype.removeEventListener=function(Et,Ct){this.eventListeners.removeEventListener(Et,Ct)},Ht.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(Ht.prototype,"isFocused",{get:function(){return this._isFocused},enumerable:!1,configurable:!0}),Ht.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(Ct){return Ct(new kn(Et))}))},Ht.prototype.blur=function(){var Et=this;this._isFocused&&(this.detachWindowEvents(),this._isFocused=!1,this._previousCurrentMarker=this._currentMarker,this.setCurrentMarker(),this.eventListeners.blur.forEach(function(Ct){return Ct(new kn(Et))}))},Ht.instanceCounter=0,Ht}()},738:function(Cn,mi,ne){"use strict";ne.d(mi,{Z:function(){return yt}});var bt=ne(14809),Be=ne(4635),Ee=ne(50298),Ze=ne(62646),Fe=ne(92310),we=ne.n(Fe),ve=ne(18929),Qe=ne(10228),ge=ne(26112),se=ne(59301);function hn(Lt,It){var Wt=Lt.disabled,qt=Lt.prefixCls,he=Lt.character,fe=Lt.characterRender,Ae=Lt.index,Ve=Lt.count,ye=Lt.value,on=Lt.allowHalf,pn=Lt.focused,Vn=Lt.onHover,ti=Lt.onClick,Xn=function(Ke){Vn(Ke,Ae)},Li=function(Ke){ti(Ke,Ae)},Ii=function(Ke){Ke.keyCode===Qe.Z.ENTER&&ti(Ke,Ae)},ue=Ae+1,jt=new Set([qt]);ye===0&&Ae===0&&pn?jt.add("".concat(qt,"-focused")):on&&ye+.5>=ue&&ye<ue?(jt.add("".concat(qt,"-half")),jt.add("".concat(qt,"-active")),pn&&jt.add("".concat(qt,"-focused"))):(ue<=ye?jt.add("".concat(qt,"-full")):jt.add("".concat(qt,"-zero")),ue===ye&&pn&&jt.add("".concat(qt,"-focused")));var En=typeof he=="function"?he(Lt):he,Si=se.createElement("li",{className:we()(Array.from(jt)),ref:It},se.createElement("div",{onClick:Wt?null:Li,onKeyDown:Wt?null:Ii,onMouseMove:Wt?null:Xn,role:"radio","aria-checked":ye>Ae?"true":"false","aria-posinset":Ae+1,"aria-setsize":Ve,tabIndex:Wt?-1:0},se.createElement("div",{className:"".concat(qt,"-first")},En),se.createElement("div",{className:"".concat(qt,"-second")},En)));return fe&&(Si=fe(Si,Lt)),Si}var Se=se.forwardRef(hn);function xn(){var Lt=se.useRef({});function It(qt){return Lt.current[qt]}function Wt(qt){return function(he){Lt.current[qt]=he}}return[It,Wt]}function Ut(Lt){var It=Lt.pageXOffset,Wt="scrollLeft";if(typeof It!="number"){var qt=Lt.document;It=qt.documentElement[Wt],typeof It!="number"&&(It=qt.body[Wt])}return It}function et(Lt){var It,Wt,qt=Lt.ownerDocument,he=qt.body,fe=qt&&qt.documentElement,Ae=Lt.getBoundingClientRect();return It=Ae.left,Wt=Ae.top,It-=fe.clientLeft||he.clientLeft||0,Wt-=fe.clientTop||he.clientTop||0,{left:It,top:Wt}}function nt(Lt){var It=et(Lt),Wt=Lt.ownerDocument,qt=Wt.defaultView||Wt.parentWindow;return It.left+=Ut(qt),It.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(Lt,It){var Wt=Lt.prefixCls,qt=Wt===void 0?"rc-rate":Wt,he=Lt.className,fe=Lt.defaultValue,Ae=Lt.value,Ve=Lt.count,ye=Ve===void 0?5:Ve,on=Lt.allowHalf,pn=on===void 0?!1:on,Vn=Lt.allowClear,ti=Vn===void 0?!0:Vn,Xn=Lt.keyboard,Li=Xn===void 0?!0:Xn,Ii=Lt.character,ue=Ii===void 0?"\u2605":Ii,jt=Lt.characterRender,En=Lt.disabled,Si=Lt.direction,pi=Si===void 0?"ltr":Si,Ke=Lt.tabIndex,Pn=Ke===void 0?0:Ke,qn=Lt.autoFocus,xi=Lt.onHoverChange,kn=Lt.onChange,Ce=Lt.onFocus,Ge=Lt.onBlur,gi=Lt.onKeyDown,yi=Lt.onMouseLeave,Ht=(0,Ze.Z)(Lt,ct),Et=xn(),Ct=(0,Ee.Z)(Et,2),Nt=Ct[0],Kt=Ct[1],kt=se.useRef(null),be=function(){if(!En){var Er;(Er=kt.current)===null||Er===void 0||Er.focus()}};se.useImperativeHandle(It,function(){return{focus:be,blur:function(){if(!En){var Er;(Er=kt.current)===null||Er===void 0||Er.blur()}}}});var An=(0,ve.Z)(fe||0,{value:Ae}),ze=(0,Ee.Z)(An,2),Je=ze[0],rn=ze[1],Oe=(0,ve.Z)(null),mn=(0,Ee.Z)(Oe,2),cn=mn[0],Mn=mn[1],zn=function(Er,Rr){var Pt=pi==="rtl",er=Er+1;if(pn){var Gr=Nt(Er),si=nt(Gr),ui=Gr.clientWidth;(Pt&&Rr-si>ui/2||!Pt&&Rr-si<ui/2)&&(er-=.5)}return er},dn=function(Er){rn(Er),kn==null||kn(Er)},oi=se.useState(!1),Ai=(0,Ee.Z)(oi,2),Zi=Ai[0],tr=Ai[1],ro=function(){tr(!0),Ce==null||Ce()},ar=function(){tr(!1),Ge==null||Ge()},pr=se.useState(null),wr=(0,Ee.Z)(pr,2),mo=wr[0],Eo=wr[1],Hr=function(Er,Rr){var Pt=zn(Rr,Er.pageX);Pt!==cn&&(Eo(Pt),Mn(null)),xi==null||xi(Pt)},Ur=function(Er){En||(Eo(null),Mn(null),xi==null||xi(void 0)),Er&&(yi==null||yi(Er))},no=function(Er,Rr){var Pt=zn(Rr,Er.pageX),er=!1;ti&&(er=Pt===Je),Ur(),dn(er?0:Pt),Mn(er?Pt:null)},_o=function(Er){var Rr=Er.keyCode,Pt=pi==="rtl",er=pn?.5:1;Li&&(Rr===Qe.Z.RIGHT&&Je<ye&&!Pt?(dn(Je+er),Er.preventDefault()):Rr===Qe.Z.LEFT&&Je>0&&!Pt||Rr===Qe.Z.RIGHT&&Je>0&&Pt?(dn(Je-er),Er.preventDefault()):Rr===Qe.Z.LEFT&&Je<ye&&Pt&&(dn(Je+er),Er.preventDefault())),gi==null||gi(Er)};se.useEffect(function(){qn&&!En&&be()},[]);var bo=new Array(ye).fill(0).map(function(oo,Er){return se.createElement(Se,{ref:Kt(Er),index:Er,count:ye,disabled:En,prefixCls:"".concat(qt,"-star"),allowHalf:pn,value:mo===null?Je:mo,onClick:no,onHover:Hr,key:oo||Er,character:ue,characterRender:jt,focused:Zi})}),Mo=we()(qt,he,(0,Be.Z)((0,Be.Z)({},"".concat(qt,"-disabled"),En),"".concat(qt,"-rtl"),pi==="rtl"));return se.createElement("ul",(0,bt.Z)({className:Mo,onMouseLeave:Ur,tabIndex:En?-1:Pn,onFocus:En?null:ro,onBlur:En?null:ar,onKeyDown:En?null:_o,ref:kt},(0,ge.Z)(Ht,{aria:!0,data:!0,attr:!0})),bo)}var gt=se.forwardRef(lt),yt=gt},6551:function(Cn,mi,ne){"use strict";ne.d(mi,{ZP:function(){return ve}});var bt=ne(50298),Be=ne(59301),Ee=ne(47273),Ze=0,Fe=(0,Ee.Z)();function we(){var Qe;return Fe?(Qe=Ze,Ze+=1):Qe="TEST_OR_SSR",Qe}function ve(Qe){var ge=Be.useState(),se=(0,bt.Z)(ge,2),hn=se[0],Se=se[1];return Be.useEffect(function(){Se("rc_select_".concat(we()))},[]),Qe||hn}},37463:function(Cn,mi,ne){"use strict";ne.d(mi,{Ac:function(){return tr},Xo:function(){return ar},Wx:function(){return wr},ZP:function(){return un},lk:function(){return yt}});var bt=ne(14809),Be=ne(95190),Ee=ne(4635),Ze=ne(20439),Fe=ne(50298),we=ne(62646),ve=ne(93664),Qe=ne(18929),ge=ne(48736),se=ne(59301),hn=ne(92310),Se=ne.n(hn),xn=ne(34280),Ut=ne(49658),et=ne(8654),nt=function(de){var Sn=de.className,wn=de.customizeIcon,Ne=de.customizeIconProps,Bn=de.children,Ln=de.onMouseDown,bn=de.onClick,ci=typeof wn=="function"?wn(Ne):wn;return se.createElement("span",{className:Sn,onMouseDown:function(Dn){Dn.preventDefault(),Ln==null||Ln(Dn)},style:{userSelect:"none",WebkitUserSelect:"none"},unselectable:"on",onClick:bn,"aria-hidden":!0},ci!==void 0?ci:se.createElement("span",{className:Se()(Sn.split(/\s+/).map(function(Qn){return"".concat(Qn,"-icon")}))},Bn))},ct=nt,lt=function(de,Sn,wn,Ne,Bn){var Ln=arguments.length>5&&arguments[5]!==void 0?arguments[5]:!1,bn=arguments.length>6?arguments[6]:void 0,ci=arguments.length>7?arguments[7]:void 0,Qn=se.useMemo(function(){if((0,ve.Z)(Ne)==="object")return Ne.clearIcon;if(Bn)return Bn},[Ne,Bn]),Dn=se.useMemo(function(){return!!(!Ln&&Ne&&(wn.length||bn)&&!(ci==="combobox"&&bn===""))},[Ne,Ln,wn.length,bn,ci]);return{allowClear:Dn,clearIcon:se.createElement(ct,{className:"".concat(de,"-clear"),onMouseDown:Sn,customizeIcon:Qn},"\xD7")}},gt=se.createContext(null);function yt(){return se.useContext(gt)}function Lt(){var Yt=arguments.length>0&&arguments[0]!==void 0?arguments[0]:10,de=se.useState(!1),Sn=(0,Fe.Z)(de,2),wn=Sn[0],Ne=Sn[1],Bn=se.useRef(null),Ln=function(){window.clearTimeout(Bn.current)};se.useEffect(function(){return Ln},[]);var bn=function(Qn,Dn){Ln(),Bn.current=window.setTimeout(function(){Ne(Qn),Dn&&Dn()},Yt)};return[wn,bn,Ln]}function It(){var Yt=arguments.length>0&&arguments[0]!==void 0?arguments[0]:250,de=se.useRef(null),Sn=se.useRef(null);se.useEffect(function(){return function(){window.clearTimeout(Sn.current)}},[]);function wn(Ne){(Ne||de.current===null)&&(de.current=Ne),window.clearTimeout(Sn.current),Sn.current=window.setTimeout(function(){de.current=null},Yt)}return[function(){return de.current},wn]}function Wt(Yt,de,Sn,wn){var Ne=se.useRef(null);Ne.current={open:de,triggerOpen:Sn,customizedTrigger:wn},se.useEffect(function(){function Bn(Ln){var bn;if(!((bn=Ne.current)!==null&&bn!==void 0&&bn.customizedTrigger)){var ci=Ln.target;ci.shadowRoot&&Ln.composed&&(ci=Ln.composedPath()[0]||ci),Ne.current.open&&Yt().filter(function(Qn){return Qn}).every(function(Qn){return!Qn.contains(ci)&&Qn!==ci})&&Ne.current.triggerOpen(!1)}}return window.addEventListener("mousedown",Bn),function(){return window.removeEventListener("mousedown",Bn)}},[])}var qt=ne(10228);function he(Yt){return Yt&&![qt.Z.ESC,qt.Z.SHIFT,qt.Z.BACKSPACE,qt.Z.TAB,qt.Z.WIN_KEY,qt.Z.ALT,qt.Z.META,qt.Z.WIN_KEY_RIGHT,qt.Z.CTRL,qt.Z.SEMICOLON,qt.Z.EQUALS,qt.Z.CAPS_LOCK,qt.Z.CONTEXT_MENU,qt.Z.F1,qt.Z.F2,qt.Z.F3,qt.Z.F4,qt.Z.F5,qt.Z.F6,qt.Z.F7,qt.Z.F8,qt.Z.F9,qt.Z.F10,qt.Z.F11,qt.Z.F12].includes(Yt)}var fe=ne(26112),Ae=ne(11780);function Ve(Yt,de,Sn){var wn=(0,Ze.Z)((0,Ze.Z)({},Yt),Sn?de:{});return Object.keys(de).forEach(function(Ne){var Bn=de[Ne];typeof Bn=="function"&&(wn[Ne]=function(){for(var Ln,bn=arguments.length,ci=new Array(bn),Qn=0;Qn<bn;Qn++)ci[Qn]=arguments[Qn];return Bn.apply(void 0,ci),(Ln=Yt[Ne])===null||Ln===void 0?void 0:Ln.call.apply(Ln,[Yt].concat(ci))})}),wn}var ye=Ve,on=["prefixCls","id","inputElement","autoFocus","autoComplete","editable","activeDescendantId","value","open","attrs"],pn=function(de,Sn){var wn=de.prefixCls,Ne=de.id,Bn=de.inputElement,Ln=de.autoFocus,bn=de.autoComplete,ci=de.editable,Qn=de.activeDescendantId,Dn=de.value,Zn=de.open,rr=de.attrs,Gi=(0,we.Z)(de,on),an=Bn||se.createElement("input",null),Nn=an,hr=Nn.ref,Cr=Nn.props;return(0,ge.Kp)(!("maxLength"in an.props),"Passing 'maxLength' to input element directly may not work because input in BaseSelect is controlled."),an=se.cloneElement(an,(0,Ze.Z)((0,Ze.Z)((0,Ze.Z)({type:"search"},ye(Gi,Cr,!0)),{},{id:Ne,ref:(0,et.sQ)(Sn,hr),autoComplete:bn||"off",autoFocus:Ln,className:Se()("".concat(wn,"-selection-search-input"),Cr==null?void 0:Cr.className),role:"combobox","aria-expanded":Zn||!1,"aria-haspopup":"listbox","aria-owns":"".concat(Ne,"_list"),"aria-autocomplete":"list","aria-controls":"".concat(Ne,"_list"),"aria-activedescendant":Zn?Qn:void 0},rr),{},{value:ci?Dn:"",readOnly:!ci,unselectable:ci?null:"on",style:(0,Ze.Z)((0,Ze.Z)({},Cr.style),{},{opacity:ci?null:0})})),an},Vn=se.forwardRef(pn),ti=Vn;function Xn(Yt){return Array.isArray(Yt)?Yt:Yt!==void 0?[Yt]:[]}var Li=typeof window!="undefined"&&window.document&&window.document.documentElement,Ii=Li;function ue(Yt){return Yt!=null}function jt(Yt){return!Yt&&Yt!==0}function En(Yt){return["string","number"].includes((0,ve.Z)(Yt))}function Si(Yt){var de=void 0;return Yt&&(En(Yt.title)?de=Yt.title.toString():En(Yt.label)&&(de=Yt.label.toString())),de}function pi(Yt,de){Ii?se.useLayoutEffect(Yt,de):se.useEffect(Yt,de)}function Ke(Yt){var de;return(de=Yt.key)!==null&&de!==void 0?de:Yt.value}var Pn=function(de){de.preventDefault(),de.stopPropagation()},qn=function(de){var Sn=de.id,wn=de.prefixCls,Ne=de.values,Bn=de.open,Ln=de.searchValue,bn=de.autoClearSearchValue,ci=de.inputRef,Qn=de.placeholder,Dn=de.disabled,Zn=de.mode,rr=de.showSearch,Gi=de.autoFocus,an=de.autoComplete,Nn=de.activeDescendantId,hr=de.tabIndex,Cr=de.removeIcon,Yr=de.maxTagCount,xe=de.maxTagTextLength,Jn=de.maxTagPlaceholder,Pi=Jn===void 0?function(Fi){return"+ ".concat(Fi.length," ...")}:Jn,Hn=de.tagRender,ur=de.onToggleOpen,ji=de.onRemove,or=de.onInputChange,cr=de.onInputPaste,Jt=de.onInputKeyDown,$t=de.onInputMouseDown,Vt=de.onInputCompositionStart,Te=de.onInputCompositionEnd,le=de.onInputBlur,nn=se.useRef(null),_n=(0,se.useState)(0),On=(0,Fe.Z)(_n,2),vi=On[0],Gn=On[1],fn=(0,se.useState)(!1),Wn=(0,Fe.Z)(fn,2),Vi=Wn[0],Wi=Wn[1],yn="".concat(wn,"-selection"),Ot=Bn||Zn==="multiple"&&bn===!1||Zn==="tags"?Ln:"",Ni=Zn==="tags"||Zn==="multiple"&&bn===!1||rr&&(Bn||Vi);pi(function(){Gn(nn.current.scrollWidth)},[Ot]);var br=function(In,ni,$n,Tn,fi){return se.createElement("span",{title:Si(In),className:Se()("".concat(yn,"-item"),(0,Ee.Z)({},"".concat(yn,"-item-disabled"),$n))},se.createElement("span",{className:"".concat(yn,"-item-content")},ni),Tn&&se.createElement(ct,{className:"".concat(yn,"-item-remove"),onMouseDown:Pn,onClick:fi,customizeIcon:Cr},"\xD7"))},zr=function(In,ni,$n,Tn,fi,Xe){var nr=function(Or){Pn(Or),ur(!Bn)};return se.createElement("span",{onMouseDown:nr},Hn({label:ni,value:In,disabled:$n,closable:Tn,onClose:fi,isMaxTag:!!Xe}))},xr=function(In){var ni=In.disabled,$n=In.label,Tn=In.value,fi=!Dn&&!ni,Xe=$n;if(typeof xe=="number"&&(typeof $n=="string"||typeof $n=="number")){var nr=String(Xe);nr.length>xe&&(Xe="".concat(nr.slice(0,xe),"..."))}var mr=function(ir){ir&&ir.stopPropagation(),ji(In)};return typeof Hn=="function"?zr(Tn,Xe,ni,fi,mr):br(In,Xe,ni,fi,mr)},ki=function(In){if(!Ne.length)return null;var ni=typeof Pi=="function"?Pi(In):Pi;return typeof Hn=="function"?zr(void 0,ni,!1,!1,void 0,!0):br({title:ni},ni,!1)},Kn=se.createElement("div",{className:"".concat(yn,"-search"),style:{width:vi},onFocus:function(){Wi(!0)},onBlur:function(){Wi(!1)}},se.createElement(ti,{ref:ci,open:Bn,prefixCls:wn,id:Sn,inputElement:null,disabled:Dn,autoFocus:Gi,autoComplete:an,editable:Ni,activeDescendantId:Nn,value:Ot,onKeyDown:Jt,onMouseDown:$t,onChange:or,onPaste:cr,onCompositionStart:Vt,onCompositionEnd:Te,onBlur:le,tabIndex:hr,attrs:(0,fe.Z)(de,!0)}),se.createElement("span",{ref:nn,className:"".concat(yn,"-search-mirror"),"aria-hidden":!0},Ot,"\xA0")),ai=se.createElement(Ae.Z,{prefixCls:"".concat(yn,"-overflow"),data:Ne,renderItem:xr,renderRest:ki,suffix:Kn,itemKey:Ke,maxCount:Yr});return se.createElement("span",{className:"".concat(yn,"-wrap")},ai,!Ne.length&&!Ot&&se.createElement("span",{className:"".concat(yn,"-placeholder")},Qn))},xi=qn,kn=function(de){var Sn=de.inputElement,wn=de.prefixCls,Ne=de.id,Bn=de.inputRef,Ln=de.disabled,bn=de.autoFocus,ci=de.autoComplete,Qn=de.activeDescendantId,Dn=de.mode,Zn=de.open,rr=de.values,Gi=de.placeholder,an=de.tabIndex,Nn=de.showSearch,hr=de.searchValue,Cr=de.activeValue,Yr=de.maxLength,xe=de.onInputKeyDown,Jn=de.onInputMouseDown,Pi=de.onInputChange,Hn=de.onInputPaste,ur=de.onInputCompositionStart,ji=de.onInputCompositionEnd,or=de.onInputBlur,cr=de.title,Jt=se.useState(!1),$t=(0,Fe.Z)(Jt,2),Vt=$t[0],Te=$t[1],le=Dn==="combobox",nn=le||Nn,_n=rr[0],On=hr||"";le&&Cr&&!Vt&&(On=Cr),se.useEffect(function(){le&&Te(!1)},[le,Cr]);var vi=Dn!=="combobox"&&!Zn&&!Nn?!1:!!On,Gn=cr===void 0?Si(_n):cr,fn=se.useMemo(function(){return _n?null:se.createElement("span",{className:"".concat(wn,"-selection-placeholder"),style:vi?{visibility:"hidden"}:void 0},Gi)},[_n,vi,Gi,wn]);return se.createElement("span",{className:"".concat(wn,"-selection-wrap")},se.createElement("span",{className:"".concat(wn,"-selection-search")},se.createElement(ti,{ref:Bn,prefixCls:wn,id:Ne,open:Zn,inputElement:Sn,disabled:Ln,autoFocus:bn,autoComplete:ci,editable:nn,activeDescendantId:Qn,value:On,onKeyDown:xe,onMouseDown:Jn,onChange:function(Vi){Te(!0),Pi(Vi)},onPaste:Hn,onCompositionStart:ur,onCompositionEnd:ji,onBlur:or,tabIndex:an,attrs:(0,fe.Z)(de,!0),maxLength:le?Yr:void 0})),!le&&_n?se.createElement("span",{className:"".concat(wn,"-selection-item"),title:Gn,style:vi?{visibility:"hidden"}:void 0},_n.label):null,fn)},Ce=kn,Ge=function(de,Sn){var wn=(0,se.useRef)(null),Ne=(0,se.useRef)(!1),Bn=de.prefixCls,Ln=de.open,bn=de.mode,ci=de.showSearch,Qn=de.tokenWithEnter,Dn=de.disabled,Zn=de.prefix,rr=de.autoClearSearchValue,Gi=de.onSearch,an=de.onSearchSubmit,Nn=de.onToggleOpen,hr=de.onInputKeyDown,Cr=de.onInputBlur,Yr=de.domRef;se.useImperativeHandle(Sn,function(){return{focus:function(Gn){wn.current.focus(Gn)},blur:function(){wn.current.blur()}}});var xe=It(0),Jn=(0,Fe.Z)(xe,2),Pi=Jn[0],Hn=Jn[1],ur=function(Gn){var fn=Gn.which,Wn=wn.current instanceof HTMLTextAreaElement;!Wn&&Ln&&(fn===qt.Z.UP||fn===qt.Z.DOWN)&&Gn.preventDefault(),hr&&hr(Gn),fn===qt.Z.ENTER&&bn==="tags"&&!Ne.current&&!Ln&&(an==null||an(Gn.target.value)),!(Wn&&!Ln&&~[qt.Z.UP,qt.Z.DOWN,qt.Z.LEFT,qt.Z.RIGHT].indexOf(fn))&&he(fn)&&Nn(!0)},ji=function(){Hn(!0)},or=(0,se.useRef)(null),cr=function(Gn){Gi(Gn,!0,Ne.current)!==!1&&Nn(!0)},Jt=function(){Ne.current=!0},$t=function(Gn){Ne.current=!1,bn!=="combobox"&&cr(Gn.target.value)},Vt=function(Gn){var fn=Gn.target.value;if(Qn&&or.current&&/[\r\n]/.test(or.current)){var Wn=or.current.replace(/[\r\n]+$/,"").replace(/\r\n/g," ").replace(/[\r\n]/g," ");fn=fn.replace(Wn,or.current)}or.current=null,cr(fn)},Te=function(Gn){var fn=Gn.clipboardData,Wn=fn==null?void 0:fn.getData("text");or.current=Wn||""},le=function(Gn){var fn=Gn.target;if(fn!==wn.current){var Wn=document.body.style.msTouchAction!==void 0;Wn?setTimeout(function(){wn.current.focus()}):wn.current.focus()}},nn=function(Gn){var fn=Pi();Gn.target!==wn.current&&!fn&&!(bn==="combobox"&&Dn)&&Gn.preventDefault(),(bn!=="combobox"&&(!ci||!fn)||!Ln)&&(Ln&&rr!==!1&&Gi("",!0,!1),Nn())},_n={inputRef:wn,onInputKeyDown:ur,onInputMouseDown:ji,onInputChange:Vt,onInputPaste:Te,onInputCompositionStart:Jt,onInputCompositionEnd:$t,onInputBlur:Cr},On=bn==="multiple"||bn==="tags"?se.createElement(xi,(0,bt.Z)({},de,_n)):se.createElement(Ce,(0,bt.Z)({},de,_n));return se.createElement("div",{ref:Yr,className:"".concat(Bn,"-selector"),onClick:le,onMouseDown:nn},Zn&&se.createElement("div",{className:"".concat(Bn,"-prefix")},Zn),On)},gi=se.forwardRef(Ge),yi=gi,Ht=ne(65966),Et=["prefixCls","disabled","visible","children","popupElement","animation","transitionName","dropdownStyle","dropdownClassName","direction","placement","builtinPlacements","dropdownMatchSelectWidth","dropdownRender","dropdownAlign","getPopupContainer","empty","getTriggerDOMNode","onPopupVisibleChange","onPopupMouseEnter"],Ct=function(de){var Sn=de===!0?0:1;return{bottomLeft:{points:["tl","bl"],offset:[0,4],overflow:{adjustX:Sn,adjustY:1},htmlRegion:"scroll"},bottomRight:{points:["tr","br"],offset:[0,4],overflow:{adjustX:Sn,adjustY:1},htmlRegion:"scroll"},topLeft:{points:["bl","tl"],offset:[0,-4],overflow:{adjustX:Sn,adjustY:1},htmlRegion:"scroll"},topRight:{points:["br","tr"],offset:[0,-4],overflow:{adjustX:Sn,adjustY:1},htmlRegion:"scroll"}}},Nt=function(de,Sn){var wn=de.prefixCls,Ne=de.disabled,Bn=de.visible,Ln=de.children,bn=de.popupElement,ci=de.animation,Qn=de.transitionName,Dn=de.dropdownStyle,Zn=de.dropdownClassName,rr=de.direction,Gi=rr===void 0?"ltr":rr,an=de.placement,Nn=de.builtinPlacements,hr=de.dropdownMatchSelectWidth,Cr=de.dropdownRender,Yr=de.dropdownAlign,xe=de.getPopupContainer,Jn=de.empty,Pi=de.getTriggerDOMNode,Hn=de.onPopupVisibleChange,ur=de.onPopupMouseEnter,ji=(0,we.Z)(de,Et),or="".concat(wn,"-dropdown"),cr=bn;Cr&&(cr=Cr(bn));var Jt=se.useMemo(function(){return Nn||Ct(hr)},[Nn,hr]),$t=ci?"".concat(or,"-").concat(ci):Qn,Vt=typeof hr=="number",Te=se.useMemo(function(){return Vt?null:hr===!1?"minWidth":"width"},[hr,Vt]),le=Dn;Vt&&(le=(0,Ze.Z)((0,Ze.Z)({},le),{},{width:hr}));var nn=se.useRef(null);return se.useImperativeHandle(Sn,function(){return{getPopupElement:function(){var On;return(On=nn.current)===null||On===void 0?void 0:On.popupElement}}}),se.createElement(Ht.Z,(0,bt.Z)({},ji,{showAction:Hn?["click"]:[],hideAction:Hn?["click"]:[],popupPlacement:an||(Gi==="rtl"?"bottomRight":"bottomLeft"),builtinPlacements:Jt,prefixCls:or,popupTransitionName:$t,popup:se.createElement("div",{onMouseEnter:ur},cr),ref:nn,stretch:Te,popupAlign:Yr,popupVisible:Bn,getPopupContainer:xe,popupClassName:Se()(Zn,(0,Ee.Z)({},"".concat(or,"-empty"),Jn)),popupStyle:le,getTriggerDOMNode:Pi,onPopupVisibleChange:Hn}),Ln)},Kt=se.forwardRef(Nt),kt=Kt,be=ne(21696);function An(Yt,de){var Sn=Yt.key,wn;return"value"in Yt&&(wn=Yt.value),Sn!=null?Sn:wn!==void 0?wn:"rc-index-key-".concat(de)}function ze(Yt){return typeof Yt!="undefined"&&!Number.isNaN(Yt)}function Je(Yt,de){var Sn=Yt||{},wn=Sn.label,Ne=Sn.value,Bn=Sn.options,Ln=Sn.groupLabel,bn=wn||(de?"children":"label");return{label:bn,value:Ne||"value",options:Bn||"options",groupLabel:Ln||bn}}function rn(Yt){var de=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},Sn=de.fieldNames,wn=de.childrenAsData,Ne=[],Bn=Je(Sn,!1),Ln=Bn.label,bn=Bn.value,ci=Bn.options,Qn=Bn.groupLabel;function Dn(Zn,rr){Array.isArray(Zn)&&Zn.forEach(function(Gi){if(rr||!(ci in Gi)){var an=Gi[bn];Ne.push({key:An(Gi,Ne.length),groupOption:rr,data:Gi,label:Gi[Ln],value:an})}else{var Nn=Gi[Qn];Nn===void 0&&wn&&(Nn=Gi.label),Ne.push({key:An(Gi,Ne.length),group:!0,data:Gi,label:Nn}),Dn(Gi[ci],!0)}})}return Dn(Yt,!1),Ne}function Oe(Yt){var de=(0,Ze.Z)({},Yt);return"props"in de||Object.defineProperty(de,"props",{get:function(){return(0,ge.ZP)(!1,"Return type is option instead of Option instance. Please read value directly instead of reading from `props`."),de}}),de}var mn=function(de,Sn,wn){if(!Sn||!Sn.length)return null;var Ne=!1,Bn=function bn(ci,Qn){var Dn=(0,be.Z)(Qn),Zn=Dn[0],rr=Dn.slice(1);if(!Zn)return[ci];var Gi=ci.split(Zn);return Ne=Ne||Gi.length>1,Gi.reduce(function(an,Nn){return[].concat((0,Be.Z)(an),(0,Be.Z)(bn(Nn,rr)))},[]).filter(Boolean)},Ln=Bn(de,Sn);return Ne?typeof wn!="undefined"?Ln.slice(0,wn):Ln:null},cn=se.createContext(null),Mn=cn;function zn(Yt){var de=Yt.visible,Sn=Yt.values;if(!de)return null;var wn=50;return se.createElement("span",{"aria-live":"polite",style:{width:0,height:0,position:"absolute",overflow:"hidden",opacity:0}},"".concat(Sn.slice(0,wn).map(function(Ne){var Bn=Ne.label,Ln=Ne.value;return["number","string"].includes((0,ve.Z)(Bn))?Bn:Ln}).join(", ")),Sn.length>wn?", ...":null)}var dn=["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"],oi=["value","onChange","removeIcon","placeholder","autoFocus","maxTagCount","maxTagTextLength","maxTagPlaceholder","choiceTransitionName","onInputKeyDown","onPopupScroll","tabIndex"],Ai=function(de){return de==="tags"||de==="multiple"},Zi=se.forwardRef(function(Yt,de){var Sn,wn=Yt.id,Ne=Yt.prefixCls,Bn=Yt.className,Ln=Yt.showSearch,bn=Yt.tagRender,ci=Yt.direction,Qn=Yt.omitDomProps,Dn=Yt.displayValues,Zn=Yt.onDisplayValuesChange,rr=Yt.emptyOptions,Gi=Yt.notFoundContent,an=Gi===void 0?"Not Found":Gi,Nn=Yt.onClear,hr=Yt.mode,Cr=Yt.disabled,Yr=Yt.loading,xe=Yt.getInputElement,Jn=Yt.getRawInputElement,Pi=Yt.open,Hn=Yt.defaultOpen,ur=Yt.onDropdownVisibleChange,ji=Yt.activeValue,or=Yt.onActiveValueChange,cr=Yt.activeDescendantId,Jt=Yt.searchValue,$t=Yt.autoClearSearchValue,Vt=Yt.onSearch,Te=Yt.onSearchSplit,le=Yt.tokenSeparators,nn=Yt.allowClear,_n=Yt.prefix,On=Yt.suffixIcon,vi=Yt.clearIcon,Gn=Yt.OptionList,fn=Yt.animation,Wn=Yt.transitionName,Vi=Yt.dropdownStyle,Wi=Yt.dropdownClassName,yn=Yt.dropdownMatchSelectWidth,Ot=Yt.dropdownRender,Ni=Yt.dropdownAlign,br=Yt.placement,zr=Yt.builtinPlacements,xr=Yt.getPopupContainer,ki=Yt.showAction,Kn=ki===void 0?[]:ki,ai=Yt.onFocus,Fi=Yt.onBlur,In=Yt.onKeyUp,ni=Yt.onKeyDown,$n=Yt.onMouseDown,Tn=(0,we.Z)(Yt,dn),fi=Ai(hr),Xe=(Ln!==void 0?Ln:fi)||hr==="combobox",nr=(0,Ze.Z)({},Tn);oi.forEach(function(ko){delete nr[ko]}),Qn==null||Qn.forEach(function(ko){delete nr[ko]});var mr=se.useState(!1),Or=(0,Fe.Z)(mr,2),ir=Or[0],jr=Or[1];se.useEffect(function(){jr((0,Ut.Z)())},[]);var Vr=se.useRef(null),Ho=se.useRef(null),so=se.useRef(null),To=se.useRef(null),uo=se.useRef(null),Me=se.useRef(!1),ho=Lt(),ls=(0,Fe.Z)(ho,3),ks=ls[0],ao=ls[1],xa=ls[2];se.useImperativeHandle(de,function(){var ko,Xr;return{focus:(ko=To.current)===null||ko===void 0?void 0:ko.focus,blur:(Xr=To.current)===null||Xr===void 0?void 0:Xr.blur,scrollTo:function(Ei){var Rs;return(Rs=uo.current)===null||Rs===void 0?void 0:Rs.scrollTo(Ei)},nativeElement:Vr.current||Ho.current}});var ta=se.useMemo(function(){var ko;if(hr!=="combobox")return Jt;var Xr=(ko=Dn[0])===null||ko===void 0?void 0:ko.value;return typeof Xr=="string"||typeof Xr=="number"?String(Xr):""},[Jt,hr,Dn]),Da=hr==="combobox"&&typeof xe=="function"&&xe()||null,Kr=typeof Jn=="function"&&Jn(),Ro=(0,et.x1)(Ho,Kr==null||(Sn=Kr.props)===null||Sn===void 0?void 0:Sn.ref),Vs=se.useState(!1),Vl=(0,Fe.Z)(Vs,2),zA=Vl[0],Ba=Vl[1];(0,xn.Z)(function(){Ba(!0)},[]);var Xi=(0,Qe.Z)(!1,{defaultValue:Hn,value:Pi}),xA=(0,Fe.Z)(Xi,2),KA=xA[0],Wa=xA[1],Hs=zA?KA:!1,hu=!an&&rr;(Cr||hu&&Hs&&hr==="combobox")&&(Hs=!1);var ri=hu?!1:Hs,$i=se.useCallback(function(ko){var Xr=ko!==void 0?ko:!Hs;Cr||(Wa(Xr),Hs!==Xr&&(ur==null||ur(Xr)))},[Cr,Hs,Wa,ur]),vr=se.useMemo(function(){return(le||[]).some(function(ko){return[`
`,`\r
`].includes(ko)})},[le]),Fr=se.useContext(Mn)||{},Dr=Fr.maxCount,wo=Fr.rawValues,Ui=function(Xr,ys,Ei){if(!(fi&&ze(Dr)&&(wo==null?void 0:wo.size)>=Dr)){var Rs=!0,oe=Xr;or==null||or(null);var qe=mn(Xr,le,ze(Dr)?Dr-wo.size:void 0),Nl=Ei?null:qe;return hr!=="combobox"&&Nl&&(oe="",Te==null||Te(Nl),$i(!1),Rs=!1),Vt&&ta!==oe&&Vt(oe,{source:ys?"typing":"effect"}),Rs}},So=function(Xr){!Xr||!Xr.trim()||Vt(Xr,{source:"submit"})};se.useEffect(function(){!Hs&&!fi&&hr!=="combobox"&&Ui("",!1,!1)},[Hs]),se.useEffect(function(){KA&&Cr&&Wa(!1),Cr&&!Me.current&&ao(!1)},[Cr]);var ea=It(),Bs=(0,Fe.Z)(ea,2),Go=Bs[0],_s=Bs[1],bs=se.useRef(!1),ca=function(Xr){var ys=Go(),Ei=Xr.key,Rs=Ei==="Enter";if(Rs&&(hr!=="combobox"&&Xr.preventDefault(),Hs||$i(!0)),_s(!!ta),Ei==="Backspace"&&!ys&&fi&&!ta&&Dn.length){for(var oe=(0,Be.Z)(Dn),qe=null,Nl=oe.length-1;Nl>=0;Nl-=1){var CA=oe[Nl];if(!CA.disabled){oe.splice(Nl,1),qe=CA;break}}qe&&Zn(oe,{type:"remove",values:[qe]})}for(var Cs=arguments.length,Ca=new Array(Cs>1?Cs-1:0),_l=1;_l<Cs;_l++)Ca[_l-1]=arguments[_l];if(Hs&&(!Rs||!bs.current)){var jA;Rs&&(bs.current=!0),(jA=uo.current)===null||jA===void 0||jA.onKeyDown.apply(jA,[Xr].concat(Ca))}ni==null||ni.apply(void 0,[Xr].concat(Ca))},Ws=function(Xr){for(var ys=arguments.length,Ei=new Array(ys>1?ys-1:0),Rs=1;Rs<ys;Rs++)Ei[Rs-1]=arguments[Rs];if(Hs){var oe;(oe=uo.current)===null||oe===void 0||oe.onKeyUp.apply(oe,[Xr].concat(Ei))}Xr.key==="Enter"&&(bs.current=!1),In==null||In.apply(void 0,[Xr].concat(Ei))},ns=function(Xr){var ys=Dn.filter(function(Ei){return Ei!==Xr});Zn(ys,{type:"remove",values:[Xr]})},xl=function(){bs.current=!1},Ts=se.useRef(!1),Zu=function(){ao(!0),Cr||(ai&&!Ts.current&&ai.apply(void 0,arguments),Kn.includes("focus")&&$i(!0)),Ts.current=!0},Il=function(){Me.current=!0,ao(!1,function(){Ts.current=!1,Me.current=!1,$i(!1)}),!Cr&&(ta&&(hr==="tags"?Vt(ta,{source:"submit"}):hr==="multiple"&&Vt("",{source:"blur"})),Fi&&Fi.apply(void 0,arguments))},Ya=[];se.useEffect(function(){return function(){Ya.forEach(function(ko){return clearTimeout(ko)}),Ya.splice(0,Ya.length)}},[]);var Qo=function(Xr){var ys,Ei=Xr.target,Rs=(ys=so.current)===null||ys===void 0?void 0:ys.getPopupElement();if(Rs&&Rs.contains(Ei)){var oe=setTimeout(function(){var Cs=Ya.indexOf(oe);if(Cs!==-1&&Ya.splice(Cs,1),xa(),!ir&&!Rs.contains(document.activeElement)){var Ca;(Ca=To.current)===null||Ca===void 0||Ca.focus()}});Ya.push(oe)}for(var qe=arguments.length,Nl=new Array(qe>1?qe-1:0),CA=1;CA<qe;CA++)Nl[CA-1]=arguments[CA];$n==null||$n.apply(void 0,[Xr].concat(Nl))},al=se.useState({}),Ju=(0,Fe.Z)(al,2),qu=Ju[1];function Eh(){qu({})}var is;Kr&&(is=function(Xr){$i(Xr)}),Wt(function(){var ko;return[Vr.current,(ko=so.current)===null||ko===void 0?void 0:ko.getPopupElement()]},ri,$i,!!Kr);var Lc=se.useMemo(function(){return(0,Ze.Z)((0,Ze.Z)({},Yt),{},{notFoundContent:an,open:Hs,triggerOpen:ri,id:wn,showSearch:Xe,multiple:fi,toggleOpen:$i})},[Yt,an,ri,Hs,wn,Xe,fi,$i]),$u=!!On||Yr,fa;$u&&(fa=se.createElement(ct,{className:Se()("".concat(Ne,"-arrow"),(0,Ee.Z)({},"".concat(Ne,"-arrow-loading"),Yr)),customizeIcon:On,customizeIconProps:{loading:Yr,searchValue:ta,open:Hs,focused:ks,showSearch:Xe}}));var ll=function(){var Xr;Nn==null||Nn(),(Xr=To.current)===null||Xr===void 0||Xr.focus(),Zn([],{type:"clear",values:Dn}),Ui("",!1,!1)},vs=lt(Ne,ll,Dn,nn,vi,Cr,ta,hr),No=vs.allowClear,rs=vs.clearIcon,Ys=se.createElement(Gn,{ref:uo}),th=Se()(Ne,Bn,(0,Ee.Z)((0,Ee.Z)((0,Ee.Z)((0,Ee.Z)((0,Ee.Z)((0,Ee.Z)((0,Ee.Z)((0,Ee.Z)((0,Ee.Z)((0,Ee.Z)({},"".concat(Ne,"-focused"),ks),"".concat(Ne,"-multiple"),fi),"".concat(Ne,"-single"),!fi),"".concat(Ne,"-allow-clear"),nn),"".concat(Ne,"-show-arrow"),$u),"".concat(Ne,"-disabled"),Cr),"".concat(Ne,"-loading"),Yr),"".concat(Ne,"-open"),Hs),"".concat(Ne,"-customize-input"),Da),"".concat(Ne,"-show-search"),Xe)),BA=se.createElement(kt,{ref:so,disabled:Cr,prefixCls:Ne,visible:ri,popupElement:Ys,animation:fn,transitionName:Wn,dropdownStyle:Vi,dropdownClassName:Wi,direction:ci,dropdownMatchSelectWidth:yn,dropdownRender:Ot,dropdownAlign:Ni,placement:br,builtinPlacements:zr,getPopupContainer:xr,empty:rr,getTriggerDOMNode:function(Xr){return Ho.current||Xr},onPopupVisibleChange:is,onPopupMouseEnter:Eh},Kr?se.cloneElement(Kr,{ref:Ro}):se.createElement(yi,(0,bt.Z)({},Yt,{domRef:Ho,prefixCls:Ne,inputElement:Da,ref:To,id:wn,prefix:_n,showSearch:Xe,autoClearSearchValue:$t,mode:hr,activeDescendantId:cr,tagRender:bn,values:Dn,open:Hs,onToggleOpen:$i,activeValue:ji,searchValue:ta,onSearch:Ui,onSearchSubmit:So,onRemove:ns,tokenWithEnter:vr,onInputBlur:xl}))),Yo;return Kr?Yo=BA:Yo=se.createElement("div",(0,bt.Z)({className:th},nr,{ref:Vr,onMouseDown:Qo,onKeyDown:ca,onKeyUp:Ws,onFocus:Zu,onBlur:Il}),se.createElement(zn,{visible:ks&&!Hs,values:Dn}),BA,fa,No&&rs),se.createElement(gt.Provider,{value:Lc},Yo)}),tr=Zi,ro=function(){return null};ro.isSelectOptGroup=!0;var ar=ro,pr=function(){return null};pr.isSelectOption=!0;var wr=pr,mo=ne(80547),Eo=ne(2738),Hr=ne(65283);function Ur(){return/(mac\sos|macintosh)/i.test(navigator.appVersion)}var no=["disabled","title","children","style","className"];function _o(Yt){return typeof Yt=="string"||typeof Yt=="number"}var bo=function(de,Sn){var wn=yt(),Ne=wn.prefixCls,Bn=wn.id,Ln=wn.open,bn=wn.multiple,ci=wn.mode,Qn=wn.searchValue,Dn=wn.toggleOpen,Zn=wn.notFoundContent,rr=wn.onPopupScroll,Gi=se.useContext(Mn),an=Gi.maxCount,Nn=Gi.flattenOptions,hr=Gi.onActiveValue,Cr=Gi.defaultActiveFirstOption,Yr=Gi.onSelect,xe=Gi.menuItemSelectedIcon,Jn=Gi.rawValues,Pi=Gi.fieldNames,Hn=Gi.virtual,ur=Gi.direction,ji=Gi.listHeight,or=Gi.listItemHeight,cr=Gi.optionRender,Jt="".concat(Ne,"-item"),$t=(0,mo.Z)(function(){return Nn},[Ln,Nn],function(ki,Kn){return Kn[0]&&ki[1]!==Kn[1]}),Vt=se.useRef(null),Te=se.useMemo(function(){return bn&&ze(an)&&(Jn==null?void 0:Jn.size)>=an},[bn,an,Jn==null?void 0:Jn.size]),le=function(Kn){Kn.preventDefault()},nn=function(Kn){var ai;(ai=Vt.current)===null||ai===void 0||ai.scrollTo(typeof Kn=="number"?{index:Kn}:Kn)},_n=se.useCallback(function(ki){return ci==="combobox"?!1:Jn.has(ki)},[ci,(0,Be.Z)(Jn).toString(),Jn.size]),On=function(Kn){for(var ai=arguments.length>1&&arguments[1]!==void 0?arguments[1]:1,Fi=$t.length,In=0;In<Fi;In+=1){var ni=(Kn+In*ai+Fi)%Fi,$n=$t[ni]||{},Tn=$n.group,fi=$n.data;if(!Tn&&!(fi!=null&&fi.disabled)&&(_n(fi.value)||!Te))return ni}return-1},vi=se.useState(function(){return On(0)}),Gn=(0,Fe.Z)(vi,2),fn=Gn[0],Wn=Gn[1],Vi=function(Kn){var ai=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;Wn(Kn);var Fi={source:ai?"keyboard":"mouse"},In=$t[Kn];if(!In){hr(null,-1,Fi);return}hr(In.value,Kn,Fi)};(0,se.useEffect)(function(){Vi(Cr!==!1?On(0):-1)},[$t.length,Qn]);var Wi=se.useCallback(function(ki){return ci==="combobox"?String(ki).toLowerCase()===Qn.toLowerCase():Jn.has(ki)},[ci,Qn,(0,Be.Z)(Jn).toString(),Jn.size]);(0,se.useEffect)(function(){var ki=setTimeout(function(){if(!bn&&Ln&&Jn.size===1){var ai=Array.from(Jn)[0],Fi=$t.findIndex(function(In){var ni=In.data;return Qn?String(ni.value).startsWith(Qn):ni.value===ai});Fi!==-1&&(Vi(Fi),nn(Fi))}});if(Ln){var Kn;(Kn=Vt.current)===null||Kn===void 0||Kn.scrollTo(void 0)}return function(){return clearTimeout(ki)}},[Ln,Qn]);var yn=function(Kn){Kn!==void 0&&Yr(Kn,{selected:!Jn.has(Kn)}),bn||Dn(!1)};if(se.useImperativeHandle(Sn,function(){return{onKeyDown:function(Kn){var ai=Kn.which,Fi=Kn.ctrlKey;switch(ai){case qt.Z.N:case qt.Z.P:case qt.Z.UP:case qt.Z.DOWN:{var In=0;if(ai===qt.Z.UP?In=-1:ai===qt.Z.DOWN?In=1:Ur()&&Fi&&(ai===qt.Z.N?In=1:ai===qt.Z.P&&(In=-1)),In!==0){var ni=On(fn+In,In);nn(ni),Vi(ni,!0)}break}case qt.Z.TAB:case qt.Z.ENTER:{var $n,Tn=$t[fn];Tn&&!(Tn!=null&&($n=Tn.data)!==null&&$n!==void 0&&$n.disabled)&&!Te?yn(Tn.value):yn(void 0),Ln&&Kn.preventDefault();break}case qt.Z.ESC:Dn(!1),Ln&&Kn.stopPropagation()}},onKeyUp:function(){},scrollTo:function(Kn){nn(Kn)}}}),$t.length===0)return se.createElement("div",{role:"listbox",id:"".concat(Bn,"_list"),className:"".concat(Jt,"-empty"),onMouseDown:le},Zn);var Ot=Object.keys(Pi).map(function(ki){return Pi[ki]}),Ni=function(Kn){return Kn.label};function br(ki,Kn){var ai=ki.group;return{role:ai?"presentation":"option",id:"".concat(Bn,"_list_").concat(Kn)}}var zr=function(Kn){var ai=$t[Kn];if(!ai)return null;var Fi=ai.data||{},In=Fi.value,ni=ai.group,$n=(0,fe.Z)(Fi,!0),Tn=Ni(ai);return ai?se.createElement("div",(0,bt.Z)({"aria-label":typeof Tn=="string"&&!ni?Tn:null},$n,{key:Kn},br(ai,Kn),{"aria-selected":Wi(In)}),In):null},xr={role:"listbox",id:"".concat(Bn,"_list")};return se.createElement(se.Fragment,null,Hn&&se.createElement("div",(0,bt.Z)({},xr,{style:{height:0,width:0,overflow:"hidden"}}),zr(fn-1),zr(fn),zr(fn+1)),se.createElement(Hr.Z,{itemKey:"key",ref:Vt,data:$t,height:ji,itemHeight:or,fullHeight:!1,onMouseDown:le,onScroll:rr,virtual:Hn,direction:ur,innerProps:Hn?null:xr},function(ki,Kn){var ai=ki.group,Fi=ki.groupOption,In=ki.data,ni=ki.label,$n=ki.value,Tn=In.key;if(ai){var fi,Xe=(fi=In.title)!==null&&fi!==void 0?fi:_o(ni)?ni.toString():void 0;return se.createElement("div",{className:Se()(Jt,"".concat(Jt,"-group"),In.className),title:Xe},ni!==void 0?ni:Tn)}var nr=In.disabled,mr=In.title,Or=In.children,ir=In.style,jr=In.className,Vr=(0,we.Z)(In,no),Ho=(0,Eo.Z)(Vr,Ot),so=_n($n),To=nr||!so&&Te,uo="".concat(Jt,"-option"),Me=Se()(Jt,uo,jr,(0,Ee.Z)((0,Ee.Z)((0,Ee.Z)((0,Ee.Z)({},"".concat(uo,"-grouped"),Fi),"".concat(uo,"-active"),fn===Kn&&!To),"".concat(uo,"-disabled"),To),"".concat(uo,"-selected"),so)),ho=Ni(ki),ls=!xe||typeof xe=="function"||so,ks=typeof ho=="number"?ho:ho||$n,ao=_o(ks)?ks.toString():void 0;return mr!==void 0&&(ao=mr),se.createElement("div",(0,bt.Z)({},(0,fe.Z)(Ho),Hn?{}:br(ki,Kn),{"aria-selected":Wi($n),className:Me,title:ao,onMouseMove:function(){fn===Kn||To||Vi(Kn)},onClick:function(){To||yn($n)},style:ir}),se.createElement("div",{className:"".concat(uo,"-content")},typeof cr=="function"?cr(ki,{index:Kn}):ks),se.isValidElement(xe)||so,ls&&se.createElement(ct,{className:"".concat(Jt,"-option-state"),customizeIcon:xe,customizeIconProps:{value:$n,disabled:To,isSelected:so}},so?"\u2713":null))}))},Mo=se.forwardRef(bo),oo=Mo,Er=function(Yt,de){var Sn=se.useRef({values:new Map,options:new Map}),wn=se.useMemo(function(){var Bn=Sn.current,Ln=Bn.values,bn=Bn.options,ci=Yt.map(function(Zn){if(Zn.label===void 0){var rr;return(0,Ze.Z)((0,Ze.Z)({},Zn),{},{label:(rr=Ln.get(Zn.value))===null||rr===void 0?void 0:rr.label})}return Zn}),Qn=new Map,Dn=new Map;return ci.forEach(function(Zn){Qn.set(Zn.value,Zn),Dn.set(Zn.value,de.get(Zn.value)||bn.get(Zn.value))}),Sn.current.values=Qn,Sn.current.options=Dn,ci},[Yt,de]),Ne=se.useCallback(function(Bn){return de.get(Bn)||Sn.current.options.get(Bn)},[de]);return[wn,Ne]};function Rr(Yt,de){return Xn(Yt).join("").toUpperCase().includes(de)}var Pt=function(Yt,de,Sn,wn,Ne){return se.useMemo(function(){if(!Sn||wn===!1)return Yt;var Bn=de.options,Ln=de.label,bn=de.value,ci=[],Qn=typeof wn=="function",Dn=Sn.toUpperCase(),Zn=Qn?wn:function(Gi,an){return Ne?Rr(an[Ne],Dn):an[Bn]?Rr(an[Ln!=="children"?Ln:"label"],Dn):Rr(an[bn],Dn)},rr=Qn?function(Gi){return Oe(Gi)}:function(Gi){return Gi};return Yt.forEach(function(Gi){if(Gi[Bn]){var an=Zn(Sn,rr(Gi));if(an)ci.push(Gi);else{var Nn=Gi[Bn].filter(function(hr){return Zn(Sn,rr(hr))});Nn.length&&ci.push((0,Ze.Z)((0,Ze.Z)({},Gi),{},(0,Ee.Z)({},Bn,Nn)))}return}Zn(Sn,rr(Gi))&&ci.push(Gi)}),ci},[Yt,wn,Ne,Sn,de])},er=ne(6551),Gr=ne(11592),si=["children","value"],ui=["children"];function Ci(Yt){var de=Yt,Sn=de.key,wn=de.props,Ne=wn.children,Bn=wn.value,Ln=(0,we.Z)(wn,si);return(0,Ze.Z)({key:Sn,value:Bn!==void 0?Bn:Sn,children:Ne},Ln)}function Ri(Yt){var de=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;return(0,Gr.Z)(Yt).map(function(Sn,wn){if(!se.isValidElement(Sn)||!Sn.type)return null;var Ne=Sn,Bn=Ne.type.isSelectOptGroup,Ln=Ne.key,bn=Ne.props,ci=bn.children,Qn=(0,we.Z)(bn,ui);return de||!Bn?Ci(Sn):(0,Ze.Z)((0,Ze.Z)({key:"__RC_SELECT_GRP__".concat(Ln===null?wn:Ln,"__"),label:Ln},Qn),{},{options:Ri(ci)})}).filter(function(Sn){return Sn})}var Tr=function(de,Sn,wn,Ne,Bn){return se.useMemo(function(){var Ln=de,bn=!de;bn&&(Ln=Ri(Sn));var ci=new Map,Qn=new Map,Dn=function(Gi,an,Nn){Nn&&typeof Nn=="string"&&Gi.set(an[Nn],an)},Zn=function rr(Gi){for(var an=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,Nn=0;Nn<Gi.length;Nn+=1){var hr=Gi[Nn];!hr[wn.options]||an?(ci.set(hr[wn.value],hr),Dn(Qn,hr,wn.label),Dn(Qn,hr,Ne),Dn(Qn,hr,Bn)):rr(hr[wn.options],!0)}};return Zn(Ln),{options:Ln,valueOptions:ci,labelOptions:Qn}},[de,Sn,wn,Ne,Bn])},Ue=Tr;function Ie(Yt){var de=se.useRef();de.current=Yt;var Sn=se.useCallback(function(){return de.current.apply(de,arguments)},[]);return Sn}function Le(Yt){var de=Yt.mode,Sn=Yt.options,wn=Yt.children,Ne=Yt.backfill,Bn=Yt.allowClear,Ln=Yt.placeholder,bn=Yt.getInputElement,ci=Yt.showSearch,Qn=Yt.onSearch,Dn=Yt.defaultOpen,Zn=Yt.autoFocus,rr=Yt.labelInValue,Gi=Yt.value,an=Yt.inputValue,Nn=Yt.optionLabelProp,hr=isMultiple(de),Cr=ci!==void 0?ci:hr||de==="combobox",Yr=Sn||convertChildrenToData(wn);if(warning(de!=="tags"||Yr.every(function(Hn){return!Hn.disabled}),"Please avoid setting option to disabled in tags mode since user can always type text as tag."),de==="tags"||de==="combobox"){var xe=Yr.some(function(Hn){return Hn.options?Hn.options.some(function(ur){return typeof("value"in ur?ur.value:ur.key)=="number"}):typeof("value"in Hn?Hn.value:Hn.key)=="number"});warning(!xe,"`value` of Option should not use number type when `mode` is `tags` or `combobox`.")}if(warning(de!=="combobox"||!Nn,"`combobox` mode not support `optionLabelProp`. Please set `value` on Option directly."),warning(de==="combobox"||!Ne,"`backfill` only works with `combobox` mode."),warning(de==="combobox"||!bn,"`getInputElement` only work with `combobox` mode."),noteOnce(de!=="combobox"||!bn||!Bn||!Ln,"Customize `getInputElement` should customize clear and placeholder logic instead of configuring `allowClear` and `placeholder`."),Qn&&!Cr&&de!=="combobox"&&de!=="tags"&&warning(!1,"`onSearch` should work with `showSearch` instead of use alone."),noteOnce(!Dn||Zn,"`defaultOpen` makes Select open without focus which means it will not close by click outside. You can set `autoFocus` if needed."),Gi!=null){var Jn=toArray(Gi);warning(!rr||Jn.every(function(Hn){return _typeof(Hn)==="object"&&("key"in Hn||"value"in Hn)}),"`value` should in shape of `{ value: string | number, label?: ReactNode }` when you set `labelInValue` to `true`"),warning(!hr||Array.isArray(Gi),"`value` should be array when `mode` is `multiple` or `tags`")}if(wn){var Pi=null;toNodeArray(wn).some(function(Hn){if(!React.isValidElement(Hn)||!Hn.type)return!1;var ur=Hn,ji=ur.type;if(ji.isSelectOption)return!1;if(ji.isSelectOptGroup){var or=toNodeArray(Hn.props.children).every(function(cr){return!React.isValidElement(cr)||!Hn.type||cr.type.isSelectOption?!0:(Pi=cr.type,!1)});return!or}return Pi=ji,!0}),Pi&&warning(!1,"`children` should be `Select.Option` or `Select.OptGroup` instead of `".concat(Pi.displayName||Pi.name||Pi,"`.")),warning(an===void 0,"`inputValue` is deprecated, please use `searchValue` instead.")}}function We(Yt,de){if(Yt){var Sn=function wn(Ne){for(var Bn=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,Ln=0;Ln<Ne.length;Ln++){var bn=Ne[Ln];if(bn[de==null?void 0:de.value]===null)return warning(!1,"`value` in Select options should not be `null`."),!0;if(!Bn&&Array.isArray(bn[de==null?void 0:de.options])&&wn(bn[de==null?void 0:de.options],!0))break}};Sn(Yt)}}var wi=null,hi=["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"],Yi=["inputValue"];function sn(Yt){return!Yt||(0,ve.Z)(Yt)!=="object"}var He=se.forwardRef(function(Yt,de){var Sn=Yt.id,wn=Yt.mode,Ne=Yt.prefixCls,Bn=Ne===void 0?"rc-select":Ne,Ln=Yt.backfill,bn=Yt.fieldNames,ci=Yt.inputValue,Qn=Yt.searchValue,Dn=Yt.onSearch,Zn=Yt.autoClearSearchValue,rr=Zn===void 0?!0:Zn,Gi=Yt.onSelect,an=Yt.onDeselect,Nn=Yt.dropdownMatchSelectWidth,hr=Nn===void 0?!0:Nn,Cr=Yt.filterOption,Yr=Yt.filterSort,xe=Yt.optionFilterProp,Jn=Yt.optionLabelProp,Pi=Yt.options,Hn=Yt.optionRender,ur=Yt.children,ji=Yt.defaultActiveFirstOption,or=Yt.menuItemSelectedIcon,cr=Yt.virtual,Jt=Yt.direction,$t=Yt.listHeight,Vt=$t===void 0?200:$t,Te=Yt.listItemHeight,le=Te===void 0?20:Te,nn=Yt.labelRender,_n=Yt.value,On=Yt.defaultValue,vi=Yt.labelInValue,Gn=Yt.onChange,fn=Yt.maxCount,Wn=(0,we.Z)(Yt,hi),Vi=(0,er.ZP)(Sn),Wi=Ai(wn),yn=!!(!Pi&&ur),Ot=se.useMemo(function(){return Cr===void 0&&wn==="combobox"?!1:Cr},[Cr,wn]),Ni=se.useMemo(function(){return Je(bn,yn)},[JSON.stringify(bn),yn]),br=(0,Qe.Z)("",{value:Qn!==void 0?Qn:ci,postState:function(vr){return vr||""}}),zr=(0,Fe.Z)(br,2),xr=zr[0],ki=zr[1],Kn=Ue(Pi,ur,Ni,xe,Jn),ai=Kn.valueOptions,Fi=Kn.labelOptions,In=Kn.options,ni=se.useCallback(function($i){var vr=Xn($i);return vr.map(function(Fr){var Dr,wo,Ui,So,ea;if(sn(Fr))Dr=Fr;else{var Bs;Ui=Fr.key,wo=Fr.label,Dr=(Bs=Fr.value)!==null&&Bs!==void 0?Bs:Ui}var Go=ai.get(Dr);if(Go){var _s;if(wo===void 0&&(wo=Go==null?void 0:Go[Jn||Ni.label]),Ui===void 0&&(Ui=(_s=Go==null?void 0:Go.key)!==null&&_s!==void 0?_s:Dr),So=Go==null?void 0:Go.disabled,ea=Go==null?void 0:Go.title,0)var bs}return{label:wo,value:Dr,key:Ui,disabled:So,title:ea}})},[Ni,Jn,ai]),$n=(0,Qe.Z)(On,{value:_n}),Tn=(0,Fe.Z)($n,2),fi=Tn[0],Xe=Tn[1],nr=se.useMemo(function(){var $i,vr=Wi&&fi===null?[]:fi,Fr=ni(vr);return wn==="combobox"&&jt(($i=Fr[0])===null||$i===void 0?void 0:$i.value)?[]:Fr},[fi,ni,wn,Wi]),mr=Er(nr,ai),Or=(0,Fe.Z)(mr,2),ir=Or[0],jr=Or[1],Vr=se.useMemo(function(){if(!wn&&ir.length===1){var $i=ir[0];if($i.value===null&&($i.label===null||$i.label===void 0))return[]}return ir.map(function(vr){var Fr;return(0,Ze.Z)((0,Ze.Z)({},vr),{},{label:(Fr=typeof nn=="function"?nn(vr):vr.label)!==null&&Fr!==void 0?Fr:vr.value})})},[wn,ir,nn]),Ho=se.useMemo(function(){return new Set(ir.map(function($i){return $i.value}))},[ir]);se.useEffect(function(){if(wn==="combobox"){var $i,vr=($i=ir[0])===null||$i===void 0?void 0:$i.value;ki(ue(vr)?String(vr):"")}},[ir]);var so=Ie(function($i,vr){var Fr=vr!=null?vr:$i;return(0,Ee.Z)((0,Ee.Z)({},Ni.value,$i),Ni.label,Fr)}),To=se.useMemo(function(){if(wn!=="tags")return In;var $i=(0,Be.Z)(In),vr=function(Dr){return ai.has(Dr)};return(0,Be.Z)(ir).sort(function(Fr,Dr){return Fr.value<Dr.value?-1:1}).forEach(function(Fr){var Dr=Fr.value;vr(Dr)||$i.push(so(Dr,Fr.label))}),$i},[so,In,ai,ir,wn]),uo=Pt(To,Ni,xr,Ot,xe),Me=se.useMemo(function(){return wn!=="tags"||!xr||uo.some(function($i){return $i[xe||"value"]===xr})||uo.some(function($i){return $i[Ni.value]===xr})?uo:[so(xr)].concat((0,Be.Z)(uo))},[so,xe,wn,uo,xr,Ni]),ho=function $i(vr){var Fr=(0,Be.Z)(vr).sort(function(Dr,wo){return Yr(Dr,wo,{searchValue:xr})});return Fr.map(function(Dr){return Array.isArray(Dr.options)?(0,Ze.Z)((0,Ze.Z)({},Dr),{},{options:Dr.options.length>0?$i(Dr.options):Dr.options}):Dr})},ls=se.useMemo(function(){return Yr?ho(Me):Me},[Me,Yr,xr]),ks=se.useMemo(function(){return rn(ls,{fieldNames:Ni,childrenAsData:yn})},[ls,Ni,yn]),ao=function(vr){var Fr=ni(vr);if(Xe(Fr),Gn&&(Fr.length!==ir.length||Fr.some(function(Ui,So){var ea;return((ea=ir[So])===null||ea===void 0?void 0:ea.value)!==(Ui==null?void 0:Ui.value)}))){var Dr=vi?Fr:Fr.map(function(Ui){return Ui.value}),wo=Fr.map(function(Ui){return Oe(jr(Ui.value))});Gn(Wi?Dr:Dr[0],Wi?wo:wo[0])}},xa=se.useState(null),ta=(0,Fe.Z)(xa,2),Da=ta[0],Kr=ta[1],Ro=se.useState(0),Vs=(0,Fe.Z)(Ro,2),Vl=Vs[0],zA=Vs[1],Ba=ji!==void 0?ji:wn!=="combobox",Xi=se.useCallback(function($i,vr){var Fr=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},Dr=Fr.source,wo=Dr===void 0?"keyboard":Dr;zA(vr),Ln&&wn==="combobox"&&$i!==null&&wo==="keyboard"&&Kr(String($i))},[Ln,wn]),xA=function(vr,Fr,Dr){var wo=function(){var ns,xl=jr(vr);return[vi?{label:xl==null?void 0:xl[Ni.label],value:vr,key:(ns=xl==null?void 0:xl.key)!==null&&ns!==void 0?ns:vr}:vr,Oe(xl)]};if(Fr&&Gi){var Ui=wo(),So=(0,Fe.Z)(Ui,2),ea=So[0],Bs=So[1];Gi(ea,Bs)}else if(!Fr&&an&&Dr!=="clear"){var Go=wo(),_s=(0,Fe.Z)(Go,2),bs=_s[0],ca=_s[1];an(bs,ca)}},KA=Ie(function($i,vr){var Fr,Dr=Wi?vr.selected:!0;Dr?Fr=Wi?[].concat((0,Be.Z)(ir),[$i]):[$i]:Fr=ir.filter(function(wo){return wo.value!==$i}),ao(Fr),xA($i,Dr),wn==="combobox"?Kr(""):(!Ai||rr)&&(ki(""),Kr(""))}),Wa=function(vr,Fr){ao(vr);var Dr=Fr.type,wo=Fr.values;(Dr==="remove"||Dr==="clear")&&wo.forEach(function(Ui){xA(Ui.value,!1,Dr)})},Hs=function(vr,Fr){if(ki(vr),Kr(null),Fr.source==="submit"){var Dr=(vr||"").trim();if(Dr){var wo=Array.from(new Set([].concat((0,Be.Z)(Ho),[Dr])));ao(wo),xA(Dr,!0),ki("")}return}Fr.source!=="blur"&&(wn==="combobox"&&ao(vr),Dn==null||Dn(vr))},hu=function(vr){var Fr=vr;wn!=="tags"&&(Fr=vr.map(function(wo){var Ui=Fi.get(wo);return Ui==null?void 0:Ui.value}).filter(function(wo){return wo!==void 0}));var Dr=Array.from(new Set([].concat((0,Be.Z)(Ho),(0,Be.Z)(Fr))));ao(Dr),Dr.forEach(function(wo){xA(wo,!0)})},ri=se.useMemo(function(){var $i=cr!==!1&&hr!==!1;return(0,Ze.Z)((0,Ze.Z)({},Kn),{},{flattenOptions:ks,onActiveValue:Xi,defaultActiveFirstOption:Ba,onSelect:KA,menuItemSelectedIcon:or,rawValues:Ho,fieldNames:Ni,virtual:$i,direction:Jt,listHeight:Vt,listItemHeight:le,childrenAsData:yn,maxCount:fn,optionRender:Hn})},[fn,Kn,ks,Xi,Ba,KA,or,Ho,Ni,cr,hr,Jt,Vt,le,yn,Hn]);return se.createElement(Mn.Provider,{value:ri},se.createElement(tr,(0,bt.Z)({},Wn,{id:Vi,prefixCls:Bn,ref:de,omitDomProps:Yi,mode:wn,displayValues:Vr,onDisplayValuesChange:Wa,direction:Jt,searchValue:xr,onSearch:Hs,autoClearSearchValue:rr,onSearchSplit:hu,dropdownMatchSelectWidth:hr,OptionList:oo,emptyOptions:!ks.length,activeValue:Da,activeDescendantId:"".concat(Vi,"_list_").concat(Vl)})))}),li=He;li.Option=wr,li.OptGroup=ar;var _i=li,un=_i},63158:function(Cn,mi,ne){"use strict";var bt=ne(14809),Be=ne(4635),Ee=ne(50298),Ze=ne(62646),Fe=ne(59301),we=ne(92310),ve=ne.n(we),Qe=ne(18929),ge=ne(10228),se=["prefixCls","className","checked","defaultChecked","disabled","loadingIcon","checkedChildren","unCheckedChildren","onClick","onChange","onKeyDown"],hn=Fe.forwardRef(function(Se,xn){var Ut,et=Se.prefixCls,nt=et===void 0?"rc-switch":et,ct=Se.className,lt=Se.checked,gt=Se.defaultChecked,yt=Se.disabled,Lt=Se.loadingIcon,It=Se.checkedChildren,Wt=Se.unCheckedChildren,qt=Se.onClick,he=Se.onChange,fe=Se.onKeyDown,Ae=(0,Ze.Z)(Se,se),Ve=(0,Qe.Z)(!1,{value:lt,defaultValue:gt}),ye=(0,Ee.Z)(Ve,2),on=ye[0],pn=ye[1];function Vn(Ii,ue){var jt=on;return yt||(jt=Ii,pn(jt),he==null||he(jt,ue)),jt}function ti(Ii){Ii.which===ge.Z.LEFT?Vn(!1,Ii):Ii.which===ge.Z.RIGHT&&Vn(!0,Ii),fe==null||fe(Ii)}function Xn(Ii){var ue=Vn(!on,Ii);qt==null||qt(ue,Ii)}var Li=ve()(nt,ct,(Ut={},(0,Be.Z)(Ut,"".concat(nt,"-checked"),on),(0,Be.Z)(Ut,"".concat(nt,"-disabled"),yt),Ut));return Fe.createElement("button",(0,bt.Z)({},Ae,{type:"button",role:"switch","aria-checked":on,disabled:yt,className:Li,ref:xn,onKeyDown:ti,onClick:Xn}),Lt,Fe.createElement("span",{className:"".concat(nt,"-inner")},Fe.createElement("span",{className:"".concat(nt,"-inner-checked")},It),Fe.createElement("span",{className:"".concat(nt,"-inner-unchecked")},Wt)))});hn.displayName="Switch",mi.Z=hn},22711:function(Cn,mi,ne){"use strict";ne.r(mi),ne.d(mi,{ResizableTextArea:function(){return ye},default:function(){return ti}});var bt=ne(14809),Be=ne(4635),Ee=ne(20439),Ze=ne(95190),Fe=ne(50298),we=ne(62646),ve=ne(92310),Qe=ne.n(ve),ge=ne(36901),se=ne(66003),hn=ne(30292),Se=ne(18929),xn=ne(59301),Ut=ne(93664),et=ne(29301),nt=ne(34280),ct=ne(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;
`,gt=["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"],yt={},Lt;function It(Xn){var Li=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,Ii=Xn.getAttribute("id")||Xn.getAttribute("data-reactid")||Xn.getAttribute("name");if(Li&&yt[Ii])return yt[Ii];var ue=window.getComputedStyle(Xn),jt=ue.getPropertyValue("box-sizing")||ue.getPropertyValue("-moz-box-sizing")||ue.getPropertyValue("-webkit-box-sizing"),En=parseFloat(ue.getPropertyValue("padding-bottom"))+parseFloat(ue.getPropertyValue("padding-top")),Si=parseFloat(ue.getPropertyValue("border-bottom-width"))+parseFloat(ue.getPropertyValue("border-top-width")),pi=gt.map(function(Pn){return"".concat(Pn,":").concat(ue.getPropertyValue(Pn))}).join(";"),Ke={sizingStyle:pi,paddingSize:En,borderSize:Si,boxSizing:jt};return Li&&Ii&&(yt[Ii]=Ke),Ke}function Wt(Xn){var Li=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,Ii=arguments.length>2&&arguments[2]!==void 0?arguments[2]:null,ue=arguments.length>3&&arguments[3]!==void 0?arguments[3]:null;Lt||(Lt=document.createElement("textarea"),Lt.setAttribute("tab-index","-1"),Lt.setAttribute("aria-hidden","true"),Lt.setAttribute("name","hiddenTextarea"),document.body.appendChild(Lt)),Xn.getAttribute("wrap")?Lt.setAttribute("wrap",Xn.getAttribute("wrap")):Lt.removeAttribute("wrap");var jt=It(Xn,Li),En=jt.paddingSize,Si=jt.borderSize,pi=jt.boxSizing,Ke=jt.sizingStyle;Lt.setAttribute("style","".concat(Ke,";").concat(lt)),Lt.value=Xn.value||Xn.placeholder||"";var Pn=void 0,qn=void 0,xi,kn=Lt.scrollHeight;if(pi==="border-box"?kn+=Si:pi==="content-box"&&(kn-=En),Ii!==null||ue!==null){Lt.value=" ";var Ce=Lt.scrollHeight-En;Ii!==null&&(Pn=Ce*Ii,pi==="border-box"&&(Pn=Pn+En+Si),kn=Math.max(Pn,kn)),ue!==null&&(qn=Ce*ue,pi==="border-box"&&(qn=qn+En+Si),xi=kn>qn?"":"hidden",kn=Math.min(qn,kn))}var Ge={height:kn,overflowY:xi,resize:"none"};return Pn&&(Ge.minHeight=Pn),qn&&(Ge.maxHeight=qn),Ge}var qt=["prefixCls","defaultValue","value","autoSize","onResize","className","style","disabled","onChange","onInternalAutoSize"],he=0,fe=1,Ae=2,Ve=xn.forwardRef(function(Xn,Li){var Ii=Xn,ue=Ii.prefixCls,jt=Ii.defaultValue,En=Ii.value,Si=Ii.autoSize,pi=Ii.onResize,Ke=Ii.className,Pn=Ii.style,qn=Ii.disabled,xi=Ii.onChange,kn=Ii.onInternalAutoSize,Ce=(0,we.Z)(Ii,qt),Ge=(0,Se.Z)(jt,{value:En,postState:function(wr){return wr!=null?wr:""}}),gi=(0,Fe.Z)(Ge,2),yi=gi[0],Ht=gi[1],Et=function(wr){Ht(wr.target.value),xi==null||xi(wr)},Ct=xn.useRef();xn.useImperativeHandle(Li,function(){return{textArea:Ct.current}});var Nt=xn.useMemo(function(){return Si&&(0,Ut.Z)(Si)==="object"?[Si.minRows,Si.maxRows]:[]},[Si]),Kt=(0,Fe.Z)(Nt,2),kt=Kt[0],be=Kt[1],An=!!Si,ze=function(){try{if(document.activeElement===Ct.current){var wr=Ct.current,mo=wr.selectionStart,Eo=wr.selectionEnd,Hr=wr.scrollTop;Ct.current.setSelectionRange(mo,Eo),Ct.current.scrollTop=Hr}}catch(Ur){}},Je=xn.useState(Ae),rn=(0,Fe.Z)(Je,2),Oe=rn[0],mn=rn[1],cn=xn.useState(),Mn=(0,Fe.Z)(cn,2),zn=Mn[0],dn=Mn[1],oi=function(){mn(he)};(0,nt.Z)(function(){An&&oi()},[En,kt,be,An]),(0,nt.Z)(function(){if(Oe===he)mn(fe);else if(Oe===fe){var pr=Wt(Ct.current,!1,kt,be);mn(Ae),dn(pr)}else ze()},[Oe]);var Ai=xn.useRef(),Zi=function(){ct.Z.cancel(Ai.current)},tr=function(wr){Oe===Ae&&(pi==null||pi(wr),Si&&(Zi(),Ai.current=(0,ct.Z)(function(){oi()})))};xn.useEffect(function(){return Zi},[]);var ro=An?zn:null,ar=(0,Ee.Z)((0,Ee.Z)({},Pn),ro);return(Oe===he||Oe===fe)&&(ar.overflowY="hidden",ar.overflowX="hidden"),xn.createElement(et.Z,{onResize:tr,disabled:!(Si||pi)},xn.createElement("textarea",(0,bt.Z)({},Ce,{ref:Ct,style:ar,className:Qe()(ue,Ke,(0,Be.Z)({},"".concat(ue,"-disabled"),qn)),disabled:qn,value:yi,onChange:Et})))}),ye=Ve,on=["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"],pn=xn.forwardRef(function(Xn,Li){var Ii,ue=Xn.defaultValue,jt=Xn.value,En=Xn.onFocus,Si=Xn.onBlur,pi=Xn.onChange,Ke=Xn.allowClear,Pn=Xn.maxLength,qn=Xn.onCompositionStart,xi=Xn.onCompositionEnd,kn=Xn.suffix,Ce=Xn.prefixCls,Ge=Ce===void 0?"rc-textarea":Ce,gi=Xn.showCount,yi=Xn.count,Ht=Xn.className,Et=Xn.style,Ct=Xn.disabled,Nt=Xn.hidden,Kt=Xn.classNames,kt=Xn.styles,be=Xn.onResize,An=Xn.onClear,ze=Xn.onPressEnter,Je=Xn.readOnly,rn=Xn.autoSize,Oe=Xn.onKeyDown,mn=(0,we.Z)(Xn,on),cn=(0,Se.Z)(ue,{value:jt,defaultValue:ue}),Mn=(0,Fe.Z)(cn,2),zn=Mn[0],dn=Mn[1],oi=zn==null?"":String(zn),Ai=xn.useState(!1),Zi=(0,Fe.Z)(Ai,2),tr=Zi[0],ro=Zi[1],ar=xn.useRef(!1),pr=xn.useState(null),wr=(0,Fe.Z)(pr,2),mo=wr[0],Eo=wr[1],Hr=(0,xn.useRef)(null),Ur=(0,xn.useRef)(null),no=function(){var li;return(li=Ur.current)===null||li===void 0?void 0:li.textArea},_o=function(){no().focus()};(0,xn.useImperativeHandle)(Li,function(){var He;return{resizableTextArea:Ur.current,focus:_o,blur:function(){no().blur()},nativeElement:((He=Hr.current)===null||He===void 0?void 0:He.nativeElement)||no()}}),(0,xn.useEffect)(function(){ro(function(He){return!Ct&&He})},[Ct]);var bo=xn.useState(null),Mo=(0,Fe.Z)(bo,2),oo=Mo[0],Er=Mo[1];xn.useEffect(function(){if(oo){var He;(He=no()).setSelectionRange.apply(He,(0,Ze.Z)(oo))}},[oo]);var Rr=(0,se.Z)(yi,gi),Pt=(Ii=Rr.max)!==null&&Ii!==void 0?Ii:Pn,er=Number(Pt)>0,Gr=Rr.strategy(oi),si=!!Pt&&Gr>Pt,ui=function(li,_i){var un=_i;!ar.current&&Rr.exceedFormatter&&Rr.max&&Rr.strategy(_i)>Rr.max&&(un=Rr.exceedFormatter(_i,{max:Rr.max}),_i!==un&&Er([no().selectionStart||0,no().selectionEnd||0])),dn(un),(0,hn.rJ)(li.currentTarget,li,pi,un)},Ci=function(li){ar.current=!0,qn==null||qn(li)},Ri=function(li){ar.current=!1,ui(li,li.currentTarget.value),xi==null||xi(li)},Tr=function(li){ui(li,li.target.value)},Ue=function(li){li.key==="Enter"&&ze&&ze(li),Oe==null||Oe(li)},Ie=function(li){ro(!0),En==null||En(li)},Le=function(li){ro(!1),Si==null||Si(li)},We=function(li){dn(""),_o(),(0,hn.rJ)(no(),li,pi)},wi=kn,hi;Rr.show&&(Rr.showFormatter?hi=Rr.showFormatter({value:oi,count:Gr,maxLength:Pt}):hi="".concat(Gr).concat(er?" / ".concat(Pt):""),wi=xn.createElement(xn.Fragment,null,wi,xn.createElement("span",{className:Qe()("".concat(Ge,"-data-count"),Kt==null?void 0:Kt.count),style:kt==null?void 0:kt.count},hi)));var Yi=function(li){var _i;be==null||be(li),(_i=no())!==null&&_i!==void 0&&_i.style.height&&Eo(!0)},sn=!rn&&!gi&&!Ke;return xn.createElement(ge.BaseInput,{ref:Hr,value:oi,allowClear:Ke,handleReset:We,suffix:wi,prefixCls:Ge,classNames:(0,Ee.Z)((0,Ee.Z)({},Kt),{},{affixWrapper:Qe()(Kt==null?void 0:Kt.affixWrapper,(0,Be.Z)((0,Be.Z)({},"".concat(Ge,"-show-count"),gi),"".concat(Ge,"-textarea-allow-clear"),Ke))}),disabled:Ct,focused:tr,className:Qe()(Ht,si&&"".concat(Ge,"-out-of-range")),style:(0,Ee.Z)((0,Ee.Z)({},Et),mo&&!sn?{height:"auto"}:{}),dataAttrs:{affixWrapper:{"data-count":typeof hi=="string"?hi:void 0}},hidden:Nt,readOnly:Je,onClear:An},xn.createElement(ye,(0,bt.Z)({},mn,{autoSize:rn,maxLength:Pn,onKeyDown:Ue,onChange:Tr,onFocus:Ie,onBlur:Le,onCompositionStart:Ci,onCompositionEnd:Ri,className:Qe()(Kt==null?void 0:Kt.textarea),style:(0,Ee.Z)((0,Ee.Z)({},kt==null?void 0:kt.textarea),{},{resize:Et==null?void 0:Et.resize}),disabled:Ct,prefixCls:Ge,onResize:Yi,ref:Ur,readOnly:Je})))}),Vn=pn,ti=Vn},65283:function(Cn,mi,ne){"use strict";ne.d(mi,{Z:function(){return yi}});var bt=ne(14809),Be=ne(93664),Ee=ne(20439),Ze=ne(4635),Fe=ne(50298),we=ne(62646),ve=ne(92310),Qe=ne.n(ve),ge=ne(29301),se=ne(70425),hn=ne(34280),Se=ne(59301),xn=ne(4676),Ut=Se.forwardRef(function(Ht,Et){var Ct=Ht.height,Nt=Ht.offsetY,Kt=Ht.offsetX,kt=Ht.children,be=Ht.prefixCls,An=Ht.onInnerResize,ze=Ht.innerProps,Je=Ht.rtl,rn=Ht.extra,Oe={},mn={display:"flex",flexDirection:"column"};return Nt!==void 0&&(Oe={height:Ct,position:"relative",overflow:"hidden"},mn=(0,Ee.Z)((0,Ee.Z)({},mn),{},(0,Ze.Z)((0,Ze.Z)((0,Ze.Z)((0,Ze.Z)((0,Ze.Z)({transform:"translateY(".concat(Nt,"px)")},Je?"marginRight":"marginLeft",-Kt),"position","absolute"),"left",0),"right",0),"top",0))),Se.createElement("div",{style:Oe},Se.createElement(ge.Z,{onResize:function(Mn){var zn=Mn.offsetHeight;zn&&An&&An()}},Se.createElement("div",(0,bt.Z)({style:mn,className:Qe()((0,Ze.Z)({},"".concat(be,"-holder-inner"),be)),ref:Et},ze),kt,rn)))});Ut.displayName="Filler";var et=Ut;function nt(Ht){var Et=Ht.children,Ct=Ht.setRef,Nt=Se.useCallback(function(Kt){Ct(Kt)},[]);return Se.cloneElement(Et,{ref:Nt})}function ct(Ht,Et,Ct,Nt,Kt,kt,be,An){var ze=An.getKey;return Ht.slice(Et,Ct+1).map(function(Je,rn){var Oe=Et+rn,mn=be(Je,Oe,{style:{width:Nt},offsetX:Kt}),cn=ze(Je);return Se.createElement(nt,{key:cn,setRef:function(zn){return kt(Je,zn)}},mn)})}function lt(Ht,Et,Ct,Nt){var Kt=Ct-Ht,kt=Et-Ct,be=Math.min(Kt,kt)*2;if(Nt<=be){var An=Math.floor(Nt/2);return Nt%2?Ct+An+1:Ct-An}return Kt>kt?Ct-(Nt-kt):Ct+(Nt-Kt)}function gt(Ht,Et,Ct){var Nt=Ht.length,Kt=Et.length,kt,be;if(Nt===0&&Kt===0)return null;Nt<Kt?(kt=Ht,be=Et):(kt=Et,be=Ht);var An={__EMPTY_ITEM__:!0};function ze(Mn){return Mn!==void 0?Ct(Mn):An}for(var Je=null,rn=Math.abs(Nt-Kt)!==1,Oe=0;Oe<be.length;Oe+=1){var mn=ze(kt[Oe]),cn=ze(be[Oe]);if(mn!==cn){Je=Oe,rn=rn||mn!==ze(be[Oe+1]);break}}return Je===null?null:{index:Je,multiple:rn}}function yt(Ht,Et,Ct){var Nt=Se.useState(Ht),Kt=(0,Fe.Z)(Nt,2),kt=Kt[0],be=Kt[1],An=Se.useState(null),ze=(0,Fe.Z)(An,2),Je=ze[0],rn=ze[1];return Se.useEffect(function(){var Oe=gt(kt||[],Ht||[],Et);(Oe==null?void 0:Oe.index)!==void 0&&(Ct==null||Ct(Oe.index),rn(Ht[Oe.index])),be(Ht)},[Ht]),[Je]}var Lt=ne(16089),It=(typeof navigator=="undefined"?"undefined":(0,Be.Z)(navigator))==="object"&&/Firefox/i.test(navigator.userAgent),Wt=It,qt=function(Ht,Et,Ct,Nt){var Kt=(0,Se.useRef)(!1),kt=(0,Se.useRef)(null);function be(){clearTimeout(kt.current),Kt.current=!0,kt.current=setTimeout(function(){Kt.current=!1},50)}var An=(0,Se.useRef)({top:Ht,bottom:Et,left:Ct,right:Nt});return An.current.top=Ht,An.current.bottom=Et,An.current.left=Ct,An.current.right=Nt,function(ze,Je){var rn=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1,Oe=ze?Je<0&&An.current.left||Je>0&&An.current.right:Je<0&&An.current.top||Je>0&&An.current.bottom;return rn&&Oe?(clearTimeout(kt.current),Kt.current=!1):(!Oe||Kt.current)&&be(),!Kt.current&&Oe}};function he(Ht,Et,Ct,Nt,Kt,kt,be){var An=(0,Se.useRef)(0),ze=(0,Se.useRef)(null),Je=(0,Se.useRef)(null),rn=(0,Se.useRef)(!1),Oe=qt(Et,Ct,Nt,Kt);function mn(Ai,Zi){if(Lt.Z.cancel(ze.current),!Oe(!1,Zi)){var tr=Ai;if(!tr._virtualHandled)tr._virtualHandled=!0;else return;An.current+=Zi,Je.current=Zi,Wt||tr.preventDefault(),ze.current=(0,Lt.Z)(function(){var ro=rn.current?10:1;be(An.current*ro,!1),An.current=0})}}function cn(Ai,Zi){be(Zi,!0),Wt||Ai.preventDefault()}var Mn=(0,Se.useRef)(null),zn=(0,Se.useRef)(null);function dn(Ai){if(Ht){Lt.Z.cancel(zn.current),zn.current=(0,Lt.Z)(function(){Mn.current=null},2);var Zi=Ai.deltaX,tr=Ai.deltaY,ro=Ai.shiftKey,ar=Zi,pr=tr;(Mn.current==="sx"||!Mn.current&&ro&&tr&&!Zi)&&(ar=tr,pr=0,Mn.current="sx");var wr=Math.abs(ar),mo=Math.abs(pr);Mn.current===null&&(Mn.current=kt&&wr>mo?"x":"y"),Mn.current==="y"?mn(Ai,pr):cn(Ai,ar)}}function oi(Ai){Ht&&(rn.current=Ai.detail===Je.current)}return[dn,oi]}function fe(Ht,Et,Ct,Nt){var Kt=Se.useMemo(function(){return[new Map,[]]},[Ht,Ct.id,Nt]),kt=(0,Fe.Z)(Kt,2),be=kt[0],An=kt[1],ze=function(rn){var Oe=arguments.length>1&&arguments[1]!==void 0?arguments[1]:rn,mn=be.get(rn),cn=be.get(Oe);if(mn===void 0||cn===void 0)for(var Mn=Ht.length,zn=An.length;zn<Mn;zn+=1){var dn,oi=Ht[zn],Ai=Et(oi);be.set(Ai,zn);var Zi=(dn=Ct.get(Ai))!==null&&dn!==void 0?dn:Nt;if(An[zn]=(An[zn-1]||0)+Zi,Ai===rn&&(mn=zn),Ai===Oe&&(cn=zn),mn!==void 0&&cn!==void 0)break}return{top:An[mn-1]||0,bottom:An[cn]}};return ze}var Ae=ne(99153),Ve=ne(84851),ye=function(){function Ht(){(0,Ae.Z)(this,Ht),(0,Ze.Z)(this,"maps",void 0),(0,Ze.Z)(this,"id",0),(0,Ze.Z)(this,"diffRecords",new Map),this.maps=Object.create(null)}return(0,Ve.Z)(Ht,[{key:"set",value:function(Ct,Nt){this.diffRecords.set(Ct,this.maps[Ct]),this.maps[Ct]=Nt,this.id+=1}},{key:"get",value:function(Ct){return this.maps[Ct]}},{key:"resetRecord",value:function(){this.diffRecords.clear()}},{key:"getRecord",value:function(){return this.diffRecords}}]),Ht}(),on=ye;function pn(Ht){var Et=parseFloat(Ht);return isNaN(Et)?0:Et}function Vn(Ht,Et,Ct){var Nt=Se.useState(0),Kt=(0,Fe.Z)(Nt,2),kt=Kt[0],be=Kt[1],An=(0,Se.useRef)(new Map),ze=(0,Se.useRef)(new on),Je=(0,Se.useRef)(0);function rn(){Je.current+=1}function Oe(){var cn=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!1;rn();var Mn=function(){var oi=!1;An.current.forEach(function(Ai,Zi){if(Ai&&Ai.offsetParent){var tr=Ai.offsetHeight,ro=getComputedStyle(Ai),ar=ro.marginTop,pr=ro.marginBottom,wr=pn(ar),mo=pn(pr),Eo=tr+wr+mo;ze.current.get(Zi)!==Eo&&(ze.current.set(Zi,Eo),oi=!0)}}),oi&&be(function(Ai){return Ai+1})};if(cn)Mn();else{Je.current+=1;var zn=Je.current;Promise.resolve().then(function(){zn===Je.current&&Mn()})}}function mn(cn,Mn){var zn=Ht(cn),dn=An.current.get(zn);Mn?(An.current.set(zn,Mn),Oe()):An.current.delete(zn),!dn!=!Mn&&(Mn?Et==null||Et(cn):Ct==null||Ct(cn))}return(0,Se.useEffect)(function(){return rn},[]),[mn,Oe,ze.current,kt]}var ti=14/15;function Xn(Ht,Et,Ct){var Nt=(0,Se.useRef)(!1),Kt=(0,Se.useRef)(0),kt=(0,Se.useRef)(0),be=(0,Se.useRef)(null),An=(0,Se.useRef)(null),ze,Je=function(cn){if(Nt.current){var Mn=Math.ceil(cn.touches[0].pageX),zn=Math.ceil(cn.touches[0].pageY),dn=Kt.current-Mn,oi=kt.current-zn,Ai=Math.abs(dn)>Math.abs(oi);Ai?Kt.current=Mn:kt.current=zn;var Zi=Ct(Ai,Ai?dn:oi,!1,cn);Zi&&cn.preventDefault(),clearInterval(An.current),Zi&&(An.current=setInterval(function(){Ai?dn*=ti:oi*=ti;var tr=Math.floor(Ai?dn:oi);(!Ct(Ai,tr,!0)||Math.abs(tr)<=.1)&&clearInterval(An.current)},16))}},rn=function(){Nt.current=!1,ze()},Oe=function(cn){ze(),cn.touches.length===1&&!Nt.current&&(Nt.current=!0,Kt.current=Math.ceil(cn.touches[0].pageX),kt.current=Math.ceil(cn.touches[0].pageY),be.current=cn.target,be.current.addEventListener("touchmove",Je,{passive:!1}),be.current.addEventListener("touchend",rn,{passive:!0}))};ze=function(){be.current&&(be.current.removeEventListener("touchmove",Je),be.current.removeEventListener("touchend",rn))},(0,hn.Z)(function(){return Ht&&Et.current.addEventListener("touchstart",Oe,{passive:!0}),function(){var mn;(mn=Et.current)===null||mn===void 0||mn.removeEventListener("touchstart",Oe),ze(),clearInterval(An.current)}},[Ht])}function Li(Ht){return Math.floor(Math.pow(Ht,.5))}function Ii(Ht,Et){var Ct="touches"in Ht?Ht.touches[0]:Ht;return Ct[Et?"pageX":"pageY"]-window[Et?"scrollX":"scrollY"]}function ue(Ht,Et,Ct){Se.useEffect(function(){var Nt=Et.current;if(Ht&&Nt){var Kt=!1,kt,be,An=function(){Lt.Z.cancel(kt)},ze=function mn(){An(),kt=(0,Lt.Z)(function(){Ct(be),mn()})},Je=function(cn){if(!(cn.target.draggable||cn.button!==0)){var Mn=cn;Mn._virtualHandled||(Mn._virtualHandled=!0,Kt=!0)}},rn=function(){Kt=!1,An()},Oe=function(cn){if(Kt){var Mn=Ii(cn,!1),zn=Nt.getBoundingClientRect(),dn=zn.top,oi=zn.bottom;if(Mn<=dn){var Ai=dn-Mn;be=-Li(Ai),ze()}else if(Mn>=oi){var Zi=Mn-oi;be=Li(Zi),ze()}else An()}};return Nt.addEventListener("mousedown",Je),Nt.ownerDocument.addEventListener("mouseup",rn),Nt.ownerDocument.addEventListener("mousemove",Oe),function(){Nt.removeEventListener("mousedown",Je),Nt.ownerDocument.removeEventListener("mouseup",rn),Nt.ownerDocument.removeEventListener("mousemove",Oe),An()}}},[Ht])}var jt=10;function En(Ht,Et,Ct,Nt,Kt,kt,be,An){var ze=Se.useRef(),Je=Se.useState(null),rn=(0,Fe.Z)(Je,2),Oe=rn[0],mn=rn[1];return(0,hn.Z)(function(){if(Oe&&Oe.times<jt){if(!Ht.current){mn(function(Rr){return(0,Ee.Z)({},Rr)});return}kt();var cn=Oe.targetAlign,Mn=Oe.originAlign,zn=Oe.index,dn=Oe.offset,oi=Ht.current.clientHeight,Ai=!1,Zi=cn,tr=null;if(oi){for(var ro=cn||Mn,ar=0,pr=0,wr=0,mo=Math.min(Et.length-1,zn),Eo=0;Eo<=mo;Eo+=1){var Hr=Kt(Et[Eo]);pr=ar;var Ur=Ct.get(Hr);wr=pr+(Ur===void 0?Nt:Ur),ar=wr}for(var no=ro==="top"?dn:oi-dn,_o=mo;_o>=0;_o-=1){var bo=Kt(Et[_o]),Mo=Ct.get(bo);if(Mo===void 0){Ai=!0;break}if(no-=Mo,no<=0)break}switch(ro){case"top":tr=pr-dn;break;case"bottom":tr=wr-oi+dn;break;default:{var oo=Ht.current.scrollTop,Er=oo+oi;pr<oo?Zi="top":wr>Er&&(Zi="bottom")}}tr!==null&&be(tr),tr!==Oe.lastTop&&(Ai=!0)}Ai&&mn((0,Ee.Z)((0,Ee.Z)({},Oe),{},{times:Oe.times+1,targetAlign:Zi,lastTop:tr}))}},[Oe,Ht.current]),function(cn){if(cn==null){An();return}if(Lt.Z.cancel(ze.current),typeof cn=="number")be(cn);else if(cn&&(0,Be.Z)(cn)==="object"){var Mn,zn=cn.align;"index"in cn?Mn=cn.index:Mn=Et.findIndex(function(Ai){return Kt(Ai)===cn.key});var dn=cn.offset,oi=dn===void 0?0:dn;mn({times:0,index:Mn,offset:oi,originAlign:zn})}}}var Si=Se.forwardRef(function(Ht,Et){var Ct=Ht.prefixCls,Nt=Ht.rtl,Kt=Ht.scrollOffset,kt=Ht.scrollRange,be=Ht.onStartMove,An=Ht.onStopMove,ze=Ht.onScroll,Je=Ht.horizontal,rn=Ht.spinSize,Oe=Ht.containerSize,mn=Ht.style,cn=Ht.thumbStyle,Mn=Ht.showScrollBar,zn=Se.useState(!1),dn=(0,Fe.Z)(zn,2),oi=dn[0],Ai=dn[1],Zi=Se.useState(null),tr=(0,Fe.Z)(Zi,2),ro=tr[0],ar=tr[1],pr=Se.useState(null),wr=(0,Fe.Z)(pr,2),mo=wr[0],Eo=wr[1],Hr=!Nt,Ur=Se.useRef(),no=Se.useRef(),_o=Se.useState(Mn),bo=(0,Fe.Z)(_o,2),Mo=bo[0],oo=bo[1],Er=Se.useRef(),Rr=function(){Mn===!0||Mn===!1||(clearTimeout(Er.current),oo(!0),Er.current=setTimeout(function(){oo(!1)},3e3))},Pt=kt-Oe||0,er=Oe-rn||0,Gr=Se.useMemo(function(){if(Kt===0||Pt===0)return 0;var We=Kt/Pt;return We*er},[Kt,Pt,er]),si=function(wi){wi.stopPropagation(),wi.preventDefault()},ui=Se.useRef({top:Gr,dragging:oi,pageY:ro,startTop:mo});ui.current={top:Gr,dragging:oi,pageY:ro,startTop:mo};var Ci=function(wi){Ai(!0),ar(Ii(wi,Je)),Eo(ui.current.top),be(),wi.stopPropagation(),wi.preventDefault()};Se.useEffect(function(){var We=function(sn){sn.preventDefault()},wi=Ur.current,hi=no.current;return wi.addEventListener("touchstart",We,{passive:!1}),hi.addEventListener("touchstart",Ci,{passive:!1}),function(){wi.removeEventListener("touchstart",We),hi.removeEventListener("touchstart",Ci)}},[]);var Ri=Se.useRef();Ri.current=Pt;var Tr=Se.useRef();Tr.current=er,Se.useEffect(function(){if(oi){var We,wi=function(sn){var He=ui.current,li=He.dragging,_i=He.pageY,un=He.startTop;Lt.Z.cancel(We);var Yt=Ur.current.getBoundingClientRect(),de=Oe/(Je?Yt.width:Yt.height);if(li){var Sn=(Ii(sn,Je)-_i)*de,wn=un;!Hr&&Je?wn-=Sn:wn+=Sn;var Ne=Ri.current,Bn=Tr.current,Ln=Bn?wn/Bn:0,bn=Math.ceil(Ln*Ne);bn=Math.max(bn,0),bn=Math.min(bn,Ne),We=(0,Lt.Z)(function(){ze(bn,Je)})}},hi=function(){Ai(!1),An()};return window.addEventListener("mousemove",wi,{passive:!0}),window.addEventListener("touchmove",wi,{passive:!0}),window.addEventListener("mouseup",hi,{passive:!0}),window.addEventListener("touchend",hi,{passive:!0}),function(){window.removeEventListener("mousemove",wi),window.removeEventListener("touchmove",wi),window.removeEventListener("mouseup",hi),window.removeEventListener("touchend",hi),Lt.Z.cancel(We)}}},[oi]),Se.useEffect(function(){return Rr(),function(){clearTimeout(Er.current)}},[Kt]),Se.useImperativeHandle(Et,function(){return{delayHidden:Rr}});var Ue="".concat(Ct,"-scrollbar"),Ie={position:"absolute",visibility:Mo?null:"hidden"},Le={position:"absolute",background:"rgba(0, 0, 0, 0.5)",borderRadius:99,cursor:"pointer",userSelect:"none"};return Je?(Ie.height=8,Ie.left=0,Ie.right=0,Ie.bottom=0,Le.height="100%",Le.width=rn,Hr?Le.left=Gr:Le.right=Gr):(Ie.width=8,Ie.top=0,Ie.bottom=0,Hr?Ie.right=0:Ie.left=0,Le.width="100%",Le.height=rn,Le.top=Gr),Se.createElement("div",{ref:Ur,className:Qe()(Ue,(0,Ze.Z)((0,Ze.Z)((0,Ze.Z)({},"".concat(Ue,"-horizontal"),Je),"".concat(Ue,"-vertical"),!Je),"".concat(Ue,"-visible"),Mo)),style:(0,Ee.Z)((0,Ee.Z)({},Ie),mn),onMouseDown:si,onMouseMove:Rr},Se.createElement("div",{ref:no,className:Qe()("".concat(Ue,"-thumb"),(0,Ze.Z)({},"".concat(Ue,"-thumb-moving"),oi)),style:(0,Ee.Z)((0,Ee.Z)({},Le),cn),onMouseDown:Ci}))}),pi=Si,Ke=20;function Pn(){var Ht=arguments.length>0&&arguments[0]!==void 0?arguments[0]:0,Et=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,Ct=Ht/Et*Ht;return isNaN(Ct)&&(Ct=0),Ct=Math.max(Ct,Ke),Math.floor(Ct)}var qn=["prefixCls","className","height","itemHeight","fullHeight","style","data","children","itemKey","virtual","direction","scrollWidth","component","onScroll","onVirtualScroll","onVisibleChange","innerProps","extraRender","styles","showScrollBar"],xi=[],kn={overflowY:"auto",overflowAnchor:"none"};function Ce(Ht,Et){var Ct=Ht.prefixCls,Nt=Ct===void 0?"rc-virtual-list":Ct,Kt=Ht.className,kt=Ht.height,be=Ht.itemHeight,An=Ht.fullHeight,ze=An===void 0?!0:An,Je=Ht.style,rn=Ht.data,Oe=Ht.children,mn=Ht.itemKey,cn=Ht.virtual,Mn=Ht.direction,zn=Ht.scrollWidth,dn=Ht.component,oi=dn===void 0?"div":dn,Ai=Ht.onScroll,Zi=Ht.onVirtualScroll,tr=Ht.onVisibleChange,ro=Ht.innerProps,ar=Ht.extraRender,pr=Ht.styles,wr=Ht.showScrollBar,mo=wr===void 0?"optional":wr,Eo=(0,we.Z)(Ht,qn),Hr=Se.useCallback(function(Kn){return typeof mn=="function"?mn(Kn):Kn==null?void 0:Kn[mn]},[mn]),Ur=Vn(Hr,null,null),no=(0,Fe.Z)(Ur,4),_o=no[0],bo=no[1],Mo=no[2],oo=no[3],Er=!!(cn!==!1&&kt&&be),Rr=Se.useMemo(function(){return Object.values(Mo.maps).reduce(function(Kn,ai){return Kn+ai},0)},[Mo.id,Mo.maps]),Pt=Er&&rn&&(Math.max(be*rn.length,Rr)>kt||!!zn),er=Mn==="rtl",Gr=Qe()(Nt,(0,Ze.Z)({},"".concat(Nt,"-rtl"),er),Kt),si=rn||xi,ui=(0,Se.useRef)(),Ci=(0,Se.useRef)(),Ri=(0,Se.useRef)(),Tr=(0,Se.useState)(0),Ue=(0,Fe.Z)(Tr,2),Ie=Ue[0],Le=Ue[1],We=(0,Se.useState)(0),wi=(0,Fe.Z)(We,2),hi=wi[0],Yi=wi[1],sn=(0,Se.useState)(!1),He=(0,Fe.Z)(sn,2),li=He[0],_i=He[1],un=function(){_i(!0)},Yt=function(){_i(!1)},de={getKey:Hr};function Sn(Kn){Le(function(ai){var Fi;typeof Kn=="function"?Fi=Kn(ai):Fi=Kn;var In=ji(Fi);return ui.current.scrollTop=In,In})}var wn=(0,Se.useRef)({start:0,end:si.length}),Ne=(0,Se.useRef)(),Bn=yt(si,Hr),Ln=(0,Fe.Z)(Bn,1),bn=Ln[0];Ne.current=bn;var ci=Se.useMemo(function(){if(!Er)return{scrollHeight:void 0,start:0,end:si.length-1,offset:void 0};if(!Pt){var Kn;return{scrollHeight:((Kn=Ci.current)===null||Kn===void 0?void 0:Kn.offsetHeight)||0,start:0,end:si.length-1,offset:void 0}}for(var ai=0,Fi,In,ni,$n=si.length,Tn=0;Tn<$n;Tn+=1){var fi=si[Tn],Xe=Hr(fi),nr=Mo.get(Xe),mr=ai+(nr===void 0?be:nr);mr>=Ie&&Fi===void 0&&(Fi=Tn,In=ai),mr>Ie+kt&&ni===void 0&&(ni=Tn),ai=mr}return Fi===void 0&&(Fi=0,In=0,ni=Math.ceil(kt/be)),ni===void 0&&(ni=si.length-1),ni=Math.min(ni+1,si.length-1),{scrollHeight:ai,start:Fi,end:ni,offset:In}},[Pt,Er,Ie,si,oo,kt]),Qn=ci.scrollHeight,Dn=ci.start,Zn=ci.end,rr=ci.offset;wn.current.start=Dn,wn.current.end=Zn,Se.useLayoutEffect(function(){var Kn=Mo.getRecord();if(Kn.size===1){var ai=Array.from(Kn.keys())[0],Fi=Kn.get(ai),In=si[Dn];if(In&&Fi===void 0){var ni=Hr(In);if(ni===ai){var $n=Mo.get(ai),Tn=$n-be;Sn(function(fi){return fi+Tn})}}}Mo.resetRecord()},[Qn]);var Gi=Se.useState({width:0,height:kt}),an=(0,Fe.Z)(Gi,2),Nn=an[0],hr=an[1],Cr=function(ai){hr({width:ai.offsetWidth,height:ai.offsetHeight})},Yr=(0,Se.useRef)(),xe=(0,Se.useRef)(),Jn=Se.useMemo(function(){return Pn(Nn.width,zn)},[Nn.width,zn]),Pi=Se.useMemo(function(){return Pn(Nn.height,Qn)},[Nn.height,Qn]),Hn=Qn-kt,ur=(0,Se.useRef)(Hn);ur.current=Hn;function ji(Kn){var ai=Kn;return Number.isNaN(ur.current)||(ai=Math.min(ai,ur.current)),ai=Math.max(ai,0),ai}var or=Ie<=0,cr=Ie>=Hn,Jt=hi<=0,$t=hi>=zn,Vt=qt(or,cr,Jt,$t),Te=function(){return{x:er?-hi:hi,y:Ie}},le=(0,Se.useRef)(Te()),nn=(0,se.zX)(function(Kn){if(Zi){var ai=(0,Ee.Z)((0,Ee.Z)({},Te()),Kn);(le.current.x!==ai.x||le.current.y!==ai.y)&&(Zi(ai),le.current=ai)}});function _n(Kn,ai){var Fi=Kn;ai?((0,xn.flushSync)(function(){Yi(Fi)}),nn()):Sn(Fi)}function On(Kn){var ai=Kn.currentTarget.scrollTop;ai!==Ie&&Sn(ai),Ai==null||Ai(Kn),nn()}var vi=function(ai){var Fi=ai,In=zn?zn-Nn.width:0;return Fi=Math.max(Fi,0),Fi=Math.min(Fi,In),Fi},Gn=(0,se.zX)(function(Kn,ai){ai?((0,xn.flushSync)(function(){Yi(function(Fi){var In=Fi+(er?-Kn:Kn);return vi(In)})}),nn()):Sn(function(Fi){var In=Fi+Kn;return In})}),fn=he(Er,or,cr,Jt,$t,!!zn,Gn),Wn=(0,Fe.Z)(fn,2),Vi=Wn[0],Wi=Wn[1];Xn(Er,ui,function(Kn,ai,Fi,In){var ni=In;return Vt(Kn,ai,Fi)?!1:!ni||!ni._virtualHandled?(ni&&(ni._virtualHandled=!0),Vi({preventDefault:function(){},deltaX:Kn?ai:0,deltaY:Kn?0:ai}),!0):!1}),ue(Pt,ui,function(Kn){Sn(function(ai){return ai+Kn})}),(0,hn.Z)(function(){function Kn(Fi){var In=or&&Fi.detail<0,ni=cr&&Fi.detail>0;Er&&!In&&!ni&&Fi.preventDefault()}var ai=ui.current;return ai.addEventListener("wheel",Vi,{passive:!1}),ai.addEventListener("DOMMouseScroll",Wi,{passive:!0}),ai.addEventListener("MozMousePixelScroll",Kn,{passive:!1}),function(){ai.removeEventListener("wheel",Vi),ai.removeEventListener("DOMMouseScroll",Wi),ai.removeEventListener("MozMousePixelScroll",Kn)}},[Er,or,cr]),(0,hn.Z)(function(){if(zn){var Kn=vi(hi);Yi(Kn),nn({x:Kn})}},[Nn.width,zn]);var yn=function(){var ai,Fi;(ai=Yr.current)===null||ai===void 0||ai.delayHidden(),(Fi=xe.current)===null||Fi===void 0||Fi.delayHidden()},Ot=En(ui,si,Mo,be,Hr,function(){return bo(!0)},Sn,yn);Se.useImperativeHandle(Et,function(){return{nativeElement:Ri.current,getScrollInfo:Te,scrollTo:function(ai){function Fi(In){return In&&(0,Be.Z)(In)==="object"&&("left"in In||"top"in In)}Fi(ai)?(ai.left!==void 0&&Yi(vi(ai.left)),Ot(ai.top)):Ot(ai)}}}),(0,hn.Z)(function(){if(tr){var Kn=si.slice(Dn,Zn+1);tr(Kn,si)}},[Dn,Zn,si]);var Ni=fe(si,Hr,Mo,be),br=ar==null?void 0:ar({start:Dn,end:Zn,virtual:Pt,offsetX:hi,offsetY:rr,rtl:er,getSize:Ni}),zr=ct(si,Dn,Zn,zn,hi,_o,Oe,de),xr=null;kt&&(xr=(0,Ee.Z)((0,Ze.Z)({},ze?"height":"maxHeight",kt),kn),Er&&(xr.overflowY="hidden",zn&&(xr.overflowX="hidden"),li&&(xr.pointerEvents="none")));var ki={};return er&&(ki.dir="rtl"),Se.createElement("div",(0,bt.Z)({ref:Ri,style:(0,Ee.Z)((0,Ee.Z)({},Je),{},{position:"relative"}),className:Gr},ki,Eo),Se.createElement(ge.Z,{onResize:Cr},Se.createElement(oi,{className:"".concat(Nt,"-holder"),style:xr,ref:ui,onScroll:On,onMouseEnter:yn},Se.createElement(et,{prefixCls:Nt,height:Qn,offsetX:hi,offsetY:rr,scrollWidth:zn,onInnerResize:bo,ref:Ci,innerProps:ro,rtl:er,extra:br},zr))),Pt&&Qn>kt&&Se.createElement(pi,{ref:Yr,prefixCls:Nt,scrollOffset:Ie,scrollRange:Qn,rtl:er,onScroll:_n,onStartMove:un,onStopMove:Yt,spinSize:Pi,containerSize:Nn.height,style:pr==null?void 0:pr.verticalScrollBar,thumbStyle:pr==null?void 0:pr.verticalScrollBarThumb,showScrollBar:mo}),Pt&&zn>Nn.width&&Se.createElement(pi,{ref:xe,prefixCls:Nt,scrollOffset:hi,scrollRange:zn,rtl:er,onScroll:_n,onStartMove:un,onStopMove:Yt,spinSize:Jn,containerSize:Nn.width,horizontal:!0,style:pr==null?void 0:pr.horizontalScrollBar,thumbStyle:pr==null?void 0:pr.horizontalScrollBarThumb,showScrollBar:mo}))}var Ge=Se.forwardRef(Ce);Ge.displayName="List";var gi=Ge,yi=gi},93314:function(Cn){"use strict";Cn.exports="data:image/png;base64,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"},96908:function(Cn){"use strict";Cn.exports="data:image/png;base64,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"},57177:function(Cn){"use strict";Cn.exports="data:image/png;base64,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"},81378:function(Cn){"use strict";Cn.exports="data:image/png;base64,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"},16722:function(Cn,mi,ne){"use strict";ne.d(mi,{Z:function(){return Qe}});const bt=ge=>typeof ge=="object"&&ge!=null&&ge.nodeType===1,Be=(ge,se)=>(!se||ge!=="hidden")&&ge!=="visible"&&ge!=="clip",Ee=(ge,se)=>{if(ge.clientHeight<ge.scrollHeight||ge.clientWidth<ge.scrollWidth){const hn=getComputedStyle(ge,null);return Be(hn.overflowY,se)||Be(hn.overflowX,se)||(Se=>{const xn=(Ut=>{if(!Ut.ownerDocument||!Ut.ownerDocument.defaultView)return null;try{return Ut.ownerDocument.defaultView.frameElement}catch(et){return null}})(Se);return!!xn&&(xn.clientHeight<Se.scrollHeight||xn.clientWidth<Se.scrollWidth)})(ge)}return!1},Ze=(ge,se,hn,Se,xn,Ut,et,nt)=>Ut<ge&&et>se||Ut>ge&&et<se?0:Ut<=ge&&nt<=hn||et>=se&&nt>=hn?Ut-ge-Se:et>se&&nt<hn||Ut<ge&&nt>hn?et-se+xn:0,Fe=ge=>{const se=ge.parentElement;return se==null?ge.getRootNode().host||null:se},we=(ge,se)=>{var hn,Se,xn,Ut;if(typeof document=="undefined")return[];const{scrollMode:et,block:nt,inline:ct,boundary:lt,skipOverflowHiddenElements:gt}=se,yt=typeof lt=="function"?lt:pi=>pi!==lt;if(!bt(ge))throw new TypeError("Invalid target");const Lt=document.scrollingElement||document.documentElement,It=[];let Wt=ge;for(;bt(Wt)&&yt(Wt);){if(Wt=Fe(Wt),Wt===Lt){It.push(Wt);break}Wt!=null&&Wt===document.body&&Ee(Wt)&&!Ee(document.documentElement)||Wt!=null&&Ee(Wt,gt)&&It.push(Wt)}const qt=(Se=(hn=window.visualViewport)==null?void 0:hn.width)!=null?Se:innerWidth,he=(Ut=(xn=window.visualViewport)==null?void 0:xn.height)!=null?Ut:innerHeight,{scrollX:fe,scrollY:Ae}=window,{height:Ve,width:ye,top:on,right:pn,bottom:Vn,left:ti}=ge.getBoundingClientRect(),{top:Xn,right:Li,bottom:Ii,left:ue}=(pi=>{const Ke=window.getComputedStyle(pi);return{top:parseFloat(Ke.scrollMarginTop)||0,right:parseFloat(Ke.scrollMarginRight)||0,bottom:parseFloat(Ke.scrollMarginBottom)||0,left:parseFloat(Ke.scrollMarginLeft)||0}})(ge);let jt=nt==="start"||nt==="nearest"?on-Xn:nt==="end"?Vn+Ii:on+Ve/2-Xn+Ii,En=ct==="center"?ti+ye/2-ue+Li:ct==="end"?pn+Li:ti-ue;const Si=[];for(let pi=0;pi<It.length;pi++){const Ke=It[pi],{height:Pn,width:qn,top:xi,right:kn,bottom:Ce,left:Ge}=Ke.getBoundingClientRect();if(et==="if-needed"&&on>=0&&ti>=0&&Vn<=he&&pn<=qt&&(Ke===Lt&&!Ee(Ke)||on>=xi&&Vn<=Ce&&ti>=Ge&&pn<=kn))return Si;const gi=getComputedStyle(Ke),yi=parseInt(gi.borderLeftWidth,10),Ht=parseInt(gi.borderTopWidth,10),Et=parseInt(gi.borderRightWidth,10),Ct=parseInt(gi.borderBottomWidth,10);let Nt=0,Kt=0;const kt="offsetWidth"in Ke?Ke.offsetWidth-Ke.clientWidth-yi-Et:0,be="offsetHeight"in Ke?Ke.offsetHeight-Ke.clientHeight-Ht-Ct:0,An="offsetWidth"in Ke?Ke.offsetWidth===0?0:qn/Ke.offsetWidth:0,ze="offsetHeight"in Ke?Ke.offsetHeight===0?0:Pn/Ke.offsetHeight:0;if(Lt===Ke)Nt=nt==="start"?jt:nt==="end"?jt-he:nt==="nearest"?Ze(Ae,Ae+he,he,Ht,Ct,Ae+jt,Ae+jt+Ve,Ve):jt-he/2,Kt=ct==="start"?En:ct==="center"?En-qt/2:ct==="end"?En-qt:Ze(fe,fe+qt,qt,yi,Et,fe+En,fe+En+ye,ye),Nt=Math.max(0,Nt+Ae),Kt=Math.max(0,Kt+fe);else{Nt=nt==="start"?jt-xi-Ht:nt==="end"?jt-Ce+Ct+be:nt==="nearest"?Ze(xi,Ce,Pn,Ht,Ct+be,jt,jt+Ve,Ve):jt-(xi+Pn/2)+be/2,Kt=ct==="start"?En-Ge-yi:ct==="center"?En-(Ge+qn/2)+kt/2:ct==="end"?En-kn+Et+kt:Ze(Ge,kn,qn,yi,Et+kt,En,En+ye,ye);const{scrollLeft:Je,scrollTop:rn}=Ke;Nt=ze===0?0:Math.max(0,Math.min(rn+Nt/ze,Ke.scrollHeight-Pn/ze+be)),Kt=An===0?0:Math.max(0,Math.min(Je+Kt/An,Ke.scrollWidth-qn/An+kt)),jt+=rn-Nt,En+=Je-Kt}Si.push({el:Ke,top:Nt,left:Kt})}return Si},ve=ge=>ge===!1?{block:"end",inline:"nearest"}:(se=>se===Object(se)&&Object.keys(se).length!==0)(ge)?ge:{block:"start",inline:"nearest"};function Qe(ge,se){if(!ge.isConnected||!(xn=>{let Ut=xn;for(;Ut&&Ut.parentNode;){if(Ut.parentNode===document)return!0;Ut=Ut.parentNode instanceof ShadowRoot?Ut.parentNode.host:Ut.parentNode}return!1})(ge))return;const hn=(xn=>{const Ut=window.getComputedStyle(xn);return{top:parseFloat(Ut.scrollMarginTop)||0,right:parseFloat(Ut.scrollMarginRight)||0,bottom:parseFloat(Ut.scrollMarginBottom)||0,left:parseFloat(Ut.scrollMarginLeft)||0}})(ge);if((xn=>typeof xn=="object"&&typeof xn.behavior=="function")(se))return se.behavior(we(ge,se));const Se=typeof se=="boolean"||se==null?void 0:se.behavior;for(const{el:xn,top:Ut,left:et}of we(ge,ve(se))){const nt=Ut-hn.top+hn.bottom,ct=et-hn.left+hn.right;xn.scroll({top:nt,left:ct,behavior:Se})}}}}]);